lazy load create action

This commit is contained in:
Mads Rasmussen
2024-06-11 11:05:33 +02:00
parent f632f37bb0
commit 8a6ff1fb46
2 changed files with 3 additions and 2 deletions

View File

@@ -12,3 +12,5 @@ export class UmbLanguageCreateEntityAction extends UmbEntityActionBase<never> {
history.pushState(null, '', `section/settings/workspace/language/create`);
}
}
export { UmbLanguageCreateEntityAction as api };

View File

@@ -1,6 +1,5 @@
import { UMB_LANGUAGE_DETAIL_REPOSITORY_ALIAS, UMB_LANGUAGE_ITEM_REPOSITORY_ALIAS } from '../repository/index.js';
import { UMB_LANGUAGE_ENTITY_TYPE, UMB_LANGUAGE_ROOT_ENTITY_TYPE } from '../entity.js';
import { UmbLanguageCreateEntityAction } from './language-create-entity-action.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
const entityActions: Array<ManifestTypes> = [
@@ -21,7 +20,7 @@ const entityActions: Array<ManifestTypes> = [
alias: 'Umb.EntityAction.Language.Create',
name: 'Create Language Entity Action',
weight: 1200,
api: UmbLanguageCreateEntityAction,
api: () => import('./language-create-entity-action.js'),
forEntityTypes: [UMB_LANGUAGE_ROOT_ENTITY_TYPE],
meta: {
icon: 'icon-add',