lazy load repo + stores
This commit is contained in:
committed by
Jacob Overgaard
parent
871de6cb67
commit
319b9f7059
@@ -1,3 +1,4 @@
|
||||
import { UmbApi } from '@umbraco-cms/backoffice/extension-api';
|
||||
import type { UmbDataTypeDetailModel } from '../../types.js';
|
||||
import { UmbDataTypeServerDataSource } from './data-type-detail.server.data-source.js';
|
||||
import type { UmbDataTypeDetailStore } from './data-type-detail.store.js';
|
||||
@@ -24,3 +25,5 @@ export class UmbDataTypeDetailRepository extends UmbDetailRepositoryBase<UmbData
|
||||
return this.#detailStore!.withPropertyEditorUiAlias(propertyEditorUiAlias);
|
||||
}
|
||||
}
|
||||
|
||||
export { UmbDataTypeDetailRepository as api };
|
||||
|
||||
@@ -25,3 +25,5 @@ export class UmbDataTypeDetailStore extends UmbDetailStoreBase<UmbDataTypeDetail
|
||||
}
|
||||
|
||||
export const UMB_DATA_TYPE_DETAIL_STORE_CONTEXT = new UmbContextToken<UmbDataTypeDetailStore>('UmbDataTypeDetailStore');
|
||||
|
||||
export { UmbDataTypeDetailStore as api };
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { UmbDataTypeDetailRepository } from './data-type-detail.repository.js';
|
||||
import { UmbDataTypeDetailStore } from './data-type-detail.store.js';
|
||||
import type { ManifestRepository, ManifestStore } from '@umbraco-cms/backoffice/extension-registry';
|
||||
|
||||
export const UMB_DATA_TYPE_DETAIL_REPOSITORY_ALIAS = 'Umb.Repository.DataType.Detail';
|
||||
@@ -8,7 +6,7 @@ const repository: ManifestRepository = {
|
||||
type: 'repository',
|
||||
alias: UMB_DATA_TYPE_DETAIL_REPOSITORY_ALIAS,
|
||||
name: 'Data Type Detail Repository',
|
||||
api: UmbDataTypeDetailRepository,
|
||||
api: () => import('./data-type-detail.repository.js'),
|
||||
};
|
||||
|
||||
export const UMB_DATA_TYPE_DETAIL_STORE_ALIAS = 'Umb.Store.DataType.Detail';
|
||||
@@ -17,7 +15,7 @@ const store: ManifestStore = {
|
||||
type: 'store',
|
||||
alias: UMB_DATA_TYPE_DETAIL_STORE_ALIAS,
|
||||
name: 'Data Type Detail Store',
|
||||
api: UmbDataTypeDetailStore,
|
||||
api: () => import('./data-type-detail.store.js'),
|
||||
};
|
||||
|
||||
export const manifests = [repository, store];
|
||||
|
||||
@@ -9,3 +9,5 @@ export class UmbDataTypeItemRepository extends UmbItemRepositoryBase<UmbDataType
|
||||
super(host, UmbDataTypeItemServerDataSource, UMB_DATA_TYPE_ITEM_STORE_CONTEXT);
|
||||
}
|
||||
}
|
||||
|
||||
export { UmbDataTypeItemRepository as api };
|
||||
|
||||
@@ -22,3 +22,5 @@ export class UmbDataTypeItemStore extends UmbItemStoreBase<UmbDataTypeItemModel>
|
||||
}
|
||||
|
||||
export const UMB_DATA_TYPE_ITEM_STORE_CONTEXT = new UmbContextToken<UmbDataTypeItemStore>('UmbDataTypeItemStore');
|
||||
|
||||
export { UmbDataTypeItemStore as api };
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { UmbDataTypeItemStore } from './data-type-item.store.js';
|
||||
import { UmbDataTypeItemRepository } from './data-type-item.repository.js';
|
||||
import type { ManifestRepository, ManifestItemStore } from '@umbraco-cms/backoffice/extension-registry';
|
||||
|
||||
export const UMB_DATA_TYPE_ITEM_REPOSITORY_ALIAS = 'Umb.Repository.DataType.Item';
|
||||
@@ -9,14 +7,14 @@ const itemRepository: ManifestRepository = {
|
||||
type: 'repository',
|
||||
alias: UMB_DATA_TYPE_ITEM_REPOSITORY_ALIAS,
|
||||
name: 'Data Type Item Repository',
|
||||
api: UmbDataTypeItemRepository,
|
||||
api: () => import('./data-type-item.repository.js'),
|
||||
};
|
||||
|
||||
const itemStore: ManifestItemStore = {
|
||||
type: 'itemStore',
|
||||
alias: UMB_DATA_TYPE_STORE_ALIAS,
|
||||
name: 'Data Type Item Store',
|
||||
api: UmbDataTypeItemStore,
|
||||
api: () => import('./data-type-item.store.js'),
|
||||
};
|
||||
|
||||
export const manifests = [itemRepository, itemStore];
|
||||
|
||||
@@ -29,3 +29,5 @@ export class UmbDataTypeTreeRepository
|
||||
return { data };
|
||||
}
|
||||
}
|
||||
|
||||
export { UmbDataTypeTreeRepository as api };
|
||||
|
||||
@@ -20,3 +20,5 @@ export class UmbDataTypeTreeStore extends UmbUniqueTreeStore {
|
||||
}
|
||||
|
||||
export const UMB_DATA_TYPE_TREE_STORE_CONTEXT = new UmbContextToken<UmbDataTypeTreeStore>('UmbDataTypeTreeStore');
|
||||
|
||||
export { UmbDataTypeTreeStore as api };
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { manifests as folderManifests } from './folder/manifests.js';
|
||||
import { manifests as reloadManifests } from './reload-tree-item-children/manifests.js';
|
||||
import { UmbDataTypeTreeRepository } from './data-type-tree.repository.js';
|
||||
import { UmbDataTypeTreeStore } from './data-type-tree.store.js';
|
||||
import {
|
||||
UMB_DATA_TYPE_TREE_ALIAS,
|
||||
UMB_DATA_TYPE_TREE_REPOSITORY_ALIAS,
|
||||
@@ -18,14 +16,14 @@ const treeRepository: ManifestRepository = {
|
||||
type: 'repository',
|
||||
alias: UMB_DATA_TYPE_TREE_REPOSITORY_ALIAS,
|
||||
name: 'Data Type Tree Repository',
|
||||
api: UmbDataTypeTreeRepository,
|
||||
api: () => import('./data-type-tree.repository.js'),
|
||||
};
|
||||
|
||||
const treeStore: ManifestTreeStore = {
|
||||
type: 'treeStore',
|
||||
alias: UMB_DATA_TYPE_TREE_STORE_ALIAS,
|
||||
name: 'Data Type Tree Store',
|
||||
api: UmbDataTypeTreeStore,
|
||||
api: () => import('./data-type-tree.store.js'),
|
||||
};
|
||||
|
||||
const tree: ManifestTree = {
|
||||
|
||||
Reference in New Issue
Block a user