Skip to content

Commit 24d7c03

Browse files
committed
organize
1 parent e911aa5 commit 24d7c03

File tree

10 files changed

+62
-14
lines changed

10 files changed

+62
-14
lines changed

src/packages/documents/document-blueprints/entity-actions/create/modal/document-blueprint-options-create-modal.element.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS } from '../../../tree/folder/manifests.js';
2-
import { UmbDocumentBlueprintFolderRepository } from '../../../tree/index.js';
1+
import {
2+
UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS,
3+
UmbDocumentBlueprintFolderRepository,
4+
} from '../../../tree/index.js';
35
import type {
46
UmbDocumentBlueprintOptionsCreateModalData,
57
UmbDocumentBlueprintOptionsCreateModalValue,
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export { UmbDocumentBlueprintFolderRepository } from './document-blueprint-folder.repository.js';
2-
export { UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS } from './manifests.js';
1+
export * from './repository/index.js';

src/packages/documents/document-blueprints/tree/folder/manifests.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE } from '../../entity.js';
2-
3-
export const UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS = 'Umb.Repository.DocumentBlueprint.Folder';
2+
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS } from './repository/index.js';
3+
import { manifests as repositoryManifests } from './repository/manifests.js';
44

55
export const manifests: Array<UmbExtensionManifest> = [
6-
{
7-
type: 'repository',
8-
alias: UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS,
9-
name: 'Document Blueprint Folder Repository',
10-
api: () => import('./document-blueprint-folder.repository.js'),
11-
},
126
{
137
type: 'entityAction',
148
kind: 'folderUpdate',
@@ -29,4 +23,5 @@ export const manifests: Array<UmbExtensionManifest> = [
2923
folderRepositoryAlias: UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS,
3024
},
3125
},
26+
...repositoryManifests,
3227
];
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS = 'Umb.Repository.DocumentBlueprint.Folder';
2+
export const UMB_DOCUMENT_BLUEPRINT_FOLDER_STORE_ALIAS = 'Umb.Store.DocumentBlueprint.Folder';

src/packages/documents/document-blueprints/tree/folder/document-blueprint-folder.repository.ts renamed to src/packages/documents/document-blueprints/tree/folder/repository/document-blueprint-folder.repository.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_STORE_CONTEXT } from './document-blueprint-folder.store.context-token.js';
12
import { UmbDocumentBlueprintFolderServerDataSource } from './document-blueprint-folder.server.data-source.js';
23
import { UmbDetailRepositoryBase } from '@umbraco-cms/backoffice/repository';
34
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
45
import type { UmbFolderModel } from '@umbraco-cms/backoffice/tree';
56

67
export class UmbDocumentBlueprintFolderRepository extends UmbDetailRepositoryBase<UmbFolderModel> {
78
constructor(host: UmbControllerHost) {
8-
super(host, UmbDocumentBlueprintFolderServerDataSource);
9+
super(host, UmbDocumentBlueprintFolderServerDataSource, UMB_DOCUMENT_BLUEPRINT_FOLDER_STORE_CONTEXT);
910
}
1011
}
1112

src/packages/documents/document-blueprints/tree/folder/document-blueprint-folder.server.data-source.ts renamed to src/packages/documents/document-blueprints/tree/folder/repository/document-blueprint-folder.server.data-source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE } from '../../entity.js';
1+
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE } from '../../../entity.js';
22
import type { UmbFolderModel } from '@umbraco-cms/backoffice/tree';
33
import { DocumentBlueprintService } from '@umbraco-cms/backoffice/external/backend-api';
44
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type { UmbDocumentBlueprintFolderStore } from './document-blueprint-folder.store.js';
2+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
3+
4+
export const UMB_DOCUMENT_BLUEPRINT_FOLDER_STORE_CONTEXT = new UmbContextToken<UmbDocumentBlueprintFolderStore>(
5+
'UmbDocumentBlueprintFolderStore',
6+
);
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { UMB_DOCUMENT_BLUEPRINT_FOLDER_STORE_CONTEXT } from './document-blueprint-folder.store.context-token.js';
2+
import { UmbDetailStoreBase } from '@umbraco-cms/backoffice/store';
3+
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
4+
import type { UmbFolderModel } from '@umbraco-cms/backoffice/tree';
5+
6+
/**
7+
* @class UmbDocumentBlueprintStore
8+
* @augments {UmbStoreBase}
9+
* @description - Data Store for Data Types
10+
*/
11+
export class UmbDocumentBlueprintFolderStore extends UmbDetailStoreBase<UmbFolderModel> {
12+
/**
13+
* Creates an instance of UmbDocumentBlueprintStore.
14+
* @param {UmbControllerHost} host - The controller host for this controller to be appended to
15+
* @memberof UmbDocumentBlueprintStore
16+
*/
17+
constructor(host: UmbControllerHost) {
18+
super(host, UMB_DOCUMENT_BLUEPRINT_FOLDER_STORE_CONTEXT.toString());
19+
}
20+
}
21+
22+
export { UmbDocumentBlueprintFolderStore as api };
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { UmbDocumentBlueprintFolderRepository } from './document-blueprint-folder.repository.js';
2+
export * from './constants.js';
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import {
2+
UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS,
3+
UMB_DOCUMENT_BLUEPRINT_FOLDER_STORE_ALIAS,
4+
} from './constants.js';
5+
6+
export const manifests: Array<UmbExtensionManifest> = [
7+
{
8+
type: 'repository',
9+
alias: UMB_DOCUMENT_BLUEPRINT_FOLDER_REPOSITORY_ALIAS,
10+
name: 'Document Blueprint Folder Repository',
11+
api: () => import('./document-blueprint-folder.repository.js'),
12+
},
13+
{
14+
type: 'store',
15+
alias: UMB_DOCUMENT_BLUEPRINT_FOLDER_STORE_ALIAS,
16+
name: 'Document Blueprint Folder Store',
17+
api: () => import('./document-blueprint-folder.store.js'),
18+
},
19+
];

0 commit comments

Comments
 (0)