@umbraco-cms/backoffice 14.0.0--preview004-1c6b0db7 → 14.0.0--preview004-e20cec44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cms/custom-elements.json +0 -12
- package/dist-cms/packages/core/extension-registry/models/menu-item.model.d.ts +1 -0
- package/dist-cms/packages/core/modal/token/document-picker-modal.token.js +1 -1
- package/dist-cms/packages/core/tree/tree-menu-item/tree-menu-item.element.js +7 -1
- package/dist-cms/packages/dictionary/dictionary/entities.d.ts +2 -0
- package/dist-cms/packages/dictionary/dictionary/entities.js +2 -0
- package/dist-cms/packages/dictionary/dictionary/entity-actions/manifests.js +14 -15
- package/dist-cms/packages/dictionary/dictionary/index.d.ts +1 -0
- package/dist-cms/packages/dictionary/dictionary/index.js +1 -0
- package/dist-cms/packages/dictionary/dictionary/manifests.d.ts +1 -1
- package/dist-cms/packages/dictionary/dictionary/menu-item/manifests.d.ts +1 -2
- package/dist-cms/packages/dictionary/dictionary/menu-item/manifests.js +6 -2
- package/dist-cms/packages/dictionary/dictionary/repository/dictionary.repository.d.ts +3 -35
- package/dist-cms/packages/dictionary/dictionary/repository/dictionary.repository.js +2 -62
- package/dist-cms/packages/dictionary/dictionary/repository/index.d.ts +0 -2
- package/dist-cms/packages/dictionary/dictionary/repository/index.js +0 -2
- package/dist-cms/packages/dictionary/dictionary/repository/manifests.d.ts +4 -5
- package/dist-cms/packages/dictionary/dictionary/repository/manifests.js +5 -13
- package/dist-cms/packages/dictionary/dictionary/tree/dictionary-tree.repository.d.ts +16 -0
- package/dist-cms/packages/dictionary/dictionary/tree/dictionary-tree.repository.js +19 -0
- package/dist-cms/packages/dictionary/dictionary/tree/dictionary-tree.server.data-source.d.ts +38 -0
- package/dist-cms/packages/dictionary/dictionary/{repository/sources/dictionary.tree.server.data.js → tree/dictionary-tree.server.data-source.js} +7 -8
- package/dist-cms/packages/dictionary/dictionary/{repository/dictionary.tree.store.d.ts → tree/dictionary-tree.store.d.ts} +4 -4
- package/dist-cms/packages/dictionary/dictionary/{repository/dictionary.tree.store.js → tree/dictionary-tree.store.js} +4 -4
- package/dist-cms/packages/dictionary/dictionary/tree/index.d.ts +5 -0
- package/dist-cms/packages/dictionary/dictionary/tree/index.js +4 -0
- package/dist-cms/packages/dictionary/dictionary/tree/manifests.d.ts +5 -2
- package/dist-cms/packages/dictionary/dictionary/tree/manifests.js +24 -7
- package/dist-cms/packages/dictionary/dictionary/tree/types.d.ts +4 -0
- package/dist-cms/packages/dictionary/dictionary/tree/types.js +1 -0
- package/dist-cms/packages/dictionary/manifests.d.ts +1 -1
- package/dist-cms/packages/documents/documents/menu-item/manifests.d.ts +1 -2
- package/dist-cms/packages/documents/documents/menu-item/manifests.js +3 -1
- package/dist-cms/packages/documents/documents/tree/manifests.d.ts +1 -1
- package/dist-cms/packages/documents/documents/tree/manifests.js +2 -2
- package/dist-cms/packages/media/manifests.d.ts +1 -1
- package/dist-cms/packages/media/media/manifests.d.ts +1 -1
- package/dist-cms/packages/media/media/menu-item/manifests.d.ts +1 -2
- package/dist-cms/packages/media/media/menu-item/manifests.js +3 -1
- package/dist-cms/packages/media/media/tree/manifests.js +2 -2
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/umbraco-package-schema.json +3 -0
- package/dist-cms/vscode-html-custom-data.json +0 -12
- package/package.json +1 -1
- package/dist-cms/packages/dictionary/dictionary/menu-item/dictionary-menu-item.element.d.ts +0 -10
- package/dist-cms/packages/dictionary/dictionary/menu-item/dictionary-menu-item.element.js +0 -17
- package/dist-cms/packages/dictionary/dictionary/repository/sources/dictionary.tree.server.data.d.ts +0 -37
- package/dist-cms/packages/documents/documents/menu-item/document-menu-item.element.d.ts +0 -10
- package/dist-cms/packages/documents/documents/menu-item/document-menu-item.element.js +0 -17
- package/dist-cms/packages/media/media/menu-item/media-menu-item.element.d.ts +0 -10
- package/dist-cms/packages/media/media/menu-item/media-menu-item.element.js +0 -17
|
@@ -5464,10 +5464,6 @@
|
|
|
5464
5464
|
}
|
|
5465
5465
|
]
|
|
5466
5466
|
},
|
|
5467
|
-
{
|
|
5468
|
-
"name": "umb-dictionary-menu-item",
|
|
5469
|
-
"path": "./../src/packages/dictionary/dictionary/menu-item/dictionary-menu-item.element.ts"
|
|
5470
|
-
},
|
|
5471
5467
|
{
|
|
5472
5468
|
"name": "umb-dictionary-workspace-editor",
|
|
5473
5469
|
"path": "./../src/packages/dictionary/dictionary/workspace/dictionary-workspace-editor.element.ts",
|
|
@@ -6079,10 +6075,6 @@
|
|
|
6079
6075
|
}
|
|
6080
6076
|
]
|
|
6081
6077
|
},
|
|
6082
|
-
{
|
|
6083
|
-
"name": "umb-document-menu-item",
|
|
6084
|
-
"path": "./../src/packages/documents/documents/menu-item/document-menu-item.element.ts"
|
|
6085
|
-
},
|
|
6086
6078
|
{
|
|
6087
6079
|
"name": "umb-property-editor-ui-document-picker",
|
|
6088
6080
|
"path": "./../src/packages/documents/documents/property-editors/document-picker/property-editor-ui-document-picker.element.ts",
|
|
@@ -6965,10 +6957,6 @@
|
|
|
6965
6957
|
}
|
|
6966
6958
|
]
|
|
6967
6959
|
},
|
|
6968
|
-
{
|
|
6969
|
-
"name": "umb-media-menu-item",
|
|
6970
|
-
"path": "./../src/packages/media/media/menu-item/media-menu-item.element.ts"
|
|
6971
|
-
},
|
|
6972
6960
|
{
|
|
6973
6961
|
"name": "umb-media-workspace-editor",
|
|
6974
6962
|
"path": "./../src/packages/media/media/workspace/media-workspace-editor.element.ts",
|
|
@@ -21,7 +21,13 @@ const manifest = {
|
|
|
21
21
|
umbExtensionsRegistry.register(manifest);
|
|
22
22
|
export let UmbMenuItemTreeElement = class UmbMenuItemTreeElement extends UmbLitElement {
|
|
23
23
|
render() {
|
|
24
|
-
return this.manifest
|
|
24
|
+
return this.manifest
|
|
25
|
+
? html `
|
|
26
|
+
<umb-tree
|
|
27
|
+
alias=${this.manifest?.meta.treeAlias}
|
|
28
|
+
?hide-tree-root=${this.manifest.meta.hideTreeRoot === true}></umb-tree>
|
|
29
|
+
`
|
|
30
|
+
: nothing;
|
|
25
31
|
}
|
|
26
32
|
};
|
|
27
33
|
__decorate([
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UMB_DICTIONARY_REPOSITORY_ALIAS } from '../repository/manifests.js';
|
|
2
|
+
import { UMB_DICTIONARY_ENTITY_TYPE } from '../entities.js';
|
|
2
3
|
import UmbReloadDictionaryEntityAction from './reload.action.js';
|
|
3
4
|
import UmbImportDictionaryEntityAction from './import/import.action.js';
|
|
4
5
|
import UmbExportDictionaryEntityAction from './export/export.action.js';
|
|
5
6
|
import UmbCreateDictionaryEntityAction from './create/create.action.js';
|
|
6
7
|
import { UmbDeleteEntityAction, UmbMoveEntityAction } from '../../../core/entity-action/index.js';
|
|
7
|
-
const entityType = 'dictionary-item';
|
|
8
|
-
const repositoryAlias = DICTIONARY_REPOSITORY_ALIAS;
|
|
9
8
|
const entityActions = [
|
|
10
9
|
{
|
|
11
10
|
type: 'entityAction',
|
|
@@ -16,8 +15,8 @@ const entityActions = [
|
|
|
16
15
|
meta: {
|
|
17
16
|
icon: 'icon-add',
|
|
18
17
|
label: 'Create',
|
|
19
|
-
repositoryAlias,
|
|
20
|
-
entityTypes: [
|
|
18
|
+
repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS,
|
|
19
|
+
entityTypes: [UMB_DICTIONARY_ENTITY_TYPE],
|
|
21
20
|
},
|
|
22
21
|
},
|
|
23
22
|
{
|
|
@@ -29,8 +28,8 @@ const entityActions = [
|
|
|
29
28
|
meta: {
|
|
30
29
|
icon: 'icon-enter',
|
|
31
30
|
label: 'Move',
|
|
32
|
-
repositoryAlias,
|
|
33
|
-
entityTypes: [
|
|
31
|
+
repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS,
|
|
32
|
+
entityTypes: [UMB_DICTIONARY_ENTITY_TYPE],
|
|
34
33
|
},
|
|
35
34
|
},
|
|
36
35
|
{
|
|
@@ -42,8 +41,8 @@ const entityActions = [
|
|
|
42
41
|
meta: {
|
|
43
42
|
icon: 'icon-download-alt',
|
|
44
43
|
label: 'Export',
|
|
45
|
-
repositoryAlias,
|
|
46
|
-
entityTypes: [
|
|
44
|
+
repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS,
|
|
45
|
+
entityTypes: [UMB_DICTIONARY_ENTITY_TYPE],
|
|
47
46
|
},
|
|
48
47
|
},
|
|
49
48
|
{
|
|
@@ -55,8 +54,8 @@ const entityActions = [
|
|
|
55
54
|
meta: {
|
|
56
55
|
icon: 'icon-page-up',
|
|
57
56
|
label: 'Import',
|
|
58
|
-
repositoryAlias,
|
|
59
|
-
entityTypes: [
|
|
57
|
+
repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS,
|
|
58
|
+
entityTypes: [UMB_DICTIONARY_ENTITY_TYPE],
|
|
60
59
|
},
|
|
61
60
|
},
|
|
62
61
|
{
|
|
@@ -68,8 +67,8 @@ const entityActions = [
|
|
|
68
67
|
meta: {
|
|
69
68
|
icon: 'icon-refresh',
|
|
70
69
|
label: 'Reload',
|
|
71
|
-
repositoryAlias,
|
|
72
|
-
entityTypes: [
|
|
70
|
+
repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS,
|
|
71
|
+
entityTypes: [UMB_DICTIONARY_ENTITY_TYPE],
|
|
73
72
|
},
|
|
74
73
|
},
|
|
75
74
|
{
|
|
@@ -81,8 +80,8 @@ const entityActions = [
|
|
|
81
80
|
meta: {
|
|
82
81
|
icon: 'icon-trash',
|
|
83
82
|
label: 'Delete',
|
|
84
|
-
repositoryAlias,
|
|
85
|
-
entityTypes: [
|
|
83
|
+
repositoryAlias: UMB_DICTIONARY_REPOSITORY_ALIAS,
|
|
84
|
+
entityTypes: [UMB_DICTIONARY_ENTITY_TYPE],
|
|
86
85
|
},
|
|
87
86
|
},
|
|
88
87
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const manifests: (import("../../core/index.js").ManifestModal | import("../../core/index.js").ManifestEntityAction | import("../../core/index.js").ManifestMenu | import("../../core/index.js").
|
|
1
|
+
export declare const manifests: (import("../../core/index.js").ManifestModal | import("../../core/index.js").ManifestEntityAction | import("../../core/index.js").ManifestMenu | import("../../core/index.js").ManifestMenuItemTreeKind | import("../../core/index.js").ManifestStore | import("../../core/index.js").ManifestTree | import("../../core/index.js").ManifestTreeItem | import("../../core/index.js").ManifestTreeStore | import("../../core/index.js").ManifestWorkspace | import("../../core/index.js").ManifestWorkspaceAction | import("../../core/index.js").ManifestWorkspaceEditorView | import("../../core/index.js").ManifestRepository<import("../../../libs/extension-api/types.js").UmbApi>)[];
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const manifests: ManifestMenuItem[];
|
|
1
|
+
export declare const manifests: import("../../../core/extension-registry/index.js").ManifestMenuItemTreeKind[];
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
+
import { UMB_DICTIONARY_ENTITY_TYPE } from '../entities.js';
|
|
2
|
+
import { UMB_DICTIONARY_TREE_ALIAS } from '../tree/index.js';
|
|
1
3
|
const menuItem = {
|
|
2
4
|
type: 'menuItem',
|
|
5
|
+
kind: 'tree',
|
|
3
6
|
alias: 'Umb.MenuItem.Dictionary',
|
|
4
7
|
name: 'Dictionary Menu Item',
|
|
5
8
|
weight: 400,
|
|
6
|
-
loader: () => import('./dictionary-menu-item.element.js'),
|
|
7
9
|
meta: {
|
|
8
10
|
label: 'Dictionary',
|
|
9
11
|
icon: 'icon-book-alt',
|
|
10
|
-
entityType:
|
|
12
|
+
entityType: UMB_DICTIONARY_ENTITY_TYPE,
|
|
11
13
|
menus: ['Umb.Menu.Dictionary'],
|
|
14
|
+
treeAlias: UMB_DICTIONARY_TREE_ALIAS,
|
|
15
|
+
hideTreeRoot: true,
|
|
12
16
|
},
|
|
13
17
|
};
|
|
14
18
|
export const manifests = [menuItem];
|
|
@@ -1,43 +1,11 @@
|
|
|
1
1
|
import { UmbBaseController, UmbControllerHostElement } from '../../../../libs/controller-api/index.js';
|
|
2
2
|
import { UmbDetailRepository } from '../../../core/repository/index.js';
|
|
3
|
-
import {
|
|
4
|
-
import { CreateDictionaryItemRequestModel, DictionaryOverviewResponseModel, EntityTreeItemResponseModel, ImportDictionaryRequestModel, UpdateDictionaryItemRequestModel } from '../../../../external/backend-api/index.js';
|
|
3
|
+
import { CreateDictionaryItemRequestModel, DictionaryOverviewResponseModel, ImportDictionaryRequestModel, UpdateDictionaryItemRequestModel } from '../../../../external/backend-api/index.js';
|
|
5
4
|
import type { UmbApi } from '../../../../libs/extension-api/index.js';
|
|
6
|
-
export declare class UmbDictionaryRepository extends UmbBaseController implements
|
|
5
|
+
export declare class UmbDictionaryRepository extends UmbBaseController implements UmbDetailRepository<CreateDictionaryItemRequestModel, any, UpdateDictionaryItemRequestModel, DictionaryOverviewResponseModel>, UmbApi {
|
|
7
6
|
#private;
|
|
8
7
|
constructor(host: UmbControllerHostElement);
|
|
9
|
-
|
|
10
|
-
data: {
|
|
11
|
-
id: null;
|
|
12
|
-
type: string;
|
|
13
|
-
name: string;
|
|
14
|
-
icon: string;
|
|
15
|
-
hasChildren: boolean;
|
|
16
|
-
};
|
|
17
|
-
}>;
|
|
18
|
-
requestRootTreeItems(): Promise<{
|
|
19
|
-
data: import("../../../core/repository/index.js").UmbPagedData<any> | undefined;
|
|
20
|
-
error: import("../../../../external/backend-api/index.js").ApiError | import("../../../../external/backend-api/index.js").CancelError | undefined;
|
|
21
|
-
asObservable: () => import("rxjs").Observable<EntityTreeItemResponseModel[]>;
|
|
22
|
-
}>;
|
|
23
|
-
requestTreeItemsOf(parentId: string | null): Promise<{
|
|
24
|
-
data: import("../../../core/repository/index.js").UmbPagedData<any> | undefined;
|
|
25
|
-
error: import("../../../../external/backend-api/index.js").ApiError | import("../../../../external/backend-api/index.js").CancelError | undefined;
|
|
26
|
-
asObservable: () => import("rxjs").Observable<EntityTreeItemResponseModel[]>;
|
|
27
|
-
}>;
|
|
28
|
-
requestItemsLegacy(ids: Array<string>): Promise<{
|
|
29
|
-
data: any[] | undefined;
|
|
30
|
-
error: import("../../../../external/backend-api/index.js").ApiError | import("../../../../external/backend-api/index.js").CancelError | undefined;
|
|
31
|
-
asObservable: () => import("rxjs").Observable<EntityTreeItemResponseModel[]>;
|
|
32
|
-
}>;
|
|
33
|
-
requestItems(ids: Array<string>): Promise<{
|
|
34
|
-
data: any[] | undefined;
|
|
35
|
-
error: import("../../../../external/backend-api/index.js").ApiError | import("../../../../external/backend-api/index.js").CancelError | undefined;
|
|
36
|
-
asObservable: () => import("rxjs").Observable<EntityTreeItemResponseModel[]>;
|
|
37
|
-
}>;
|
|
38
|
-
rootTreeItems(): Promise<import("rxjs").Observable<EntityTreeItemResponseModel[]>>;
|
|
39
|
-
treeItemsOf(parentId: string | null): Promise<import("rxjs").Observable<EntityTreeItemResponseModel[]>>;
|
|
40
|
-
itemsLegacy(ids: Array<string>): Promise<import("rxjs").Observable<EntityTreeItemResponseModel[]>>;
|
|
8
|
+
itemsLegacy(ids: Array<string>): Promise<import("rxjs").Observable<import("../../../../external/backend-api/index.js").EntityTreeItemResponseModel[]>>;
|
|
41
9
|
createScaffold(parentId: string | null, preset?: Partial<CreateDictionaryItemRequestModel>): Promise<{
|
|
42
10
|
data: {
|
|
43
11
|
name: string;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import { UMB_DICTIONARY_TREE_STORE_CONTEXT } from '../tree/index.js';
|
|
1
2
|
import { UMB_DICTIONARY_STORE_CONTEXT_TOKEN } from './dictionary.store.js';
|
|
2
3
|
import { UmbDictionaryDetailServerDataSource } from './sources/dictionary.detail.server.data.js';
|
|
3
|
-
import { UMB_DICTIONARY_TREE_STORE_CONTEXT_TOKEN } from './dictionary.tree.store.js';
|
|
4
|
-
import { UmbDictionaryTreeServerDataSource } from './sources/dictionary.tree.server.data.js';
|
|
5
4
|
import { UmbBaseController } from '../../../../libs/controller-api/index.js';
|
|
6
5
|
import { UMB_NOTIFICATION_CONTEXT_TOKEN } from '../../../core/notification/index.js';
|
|
7
6
|
export class UmbDictionaryRepository extends UmbBaseController {
|
|
8
7
|
#init;
|
|
9
|
-
#treeSource;
|
|
10
8
|
#treeStore;
|
|
11
9
|
#detailSource;
|
|
12
10
|
#detailStore;
|
|
@@ -14,13 +12,12 @@ export class UmbDictionaryRepository extends UmbBaseController {
|
|
|
14
12
|
constructor(host) {
|
|
15
13
|
super(host);
|
|
16
14
|
// TODO: figure out how spin up get the correct data source
|
|
17
|
-
this.#treeSource = new UmbDictionaryTreeServerDataSource(this);
|
|
18
15
|
this.#detailSource = new UmbDictionaryDetailServerDataSource(this);
|
|
19
16
|
this.#init = Promise.all([
|
|
20
17
|
this.consumeContext(UMB_DICTIONARY_STORE_CONTEXT_TOKEN, (instance) => {
|
|
21
18
|
this.#detailStore = instance;
|
|
22
19
|
}),
|
|
23
|
-
this.consumeContext(
|
|
20
|
+
this.consumeContext(UMB_DICTIONARY_TREE_STORE_CONTEXT, (instance) => {
|
|
24
21
|
this.#treeStore = instance;
|
|
25
22
|
}),
|
|
26
23
|
this.consumeContext(UMB_NOTIFICATION_CONTEXT_TOKEN, (instance) => {
|
|
@@ -28,63 +25,6 @@ export class UmbDictionaryRepository extends UmbBaseController {
|
|
|
28
25
|
}),
|
|
29
26
|
]);
|
|
30
27
|
}
|
|
31
|
-
// TREE:
|
|
32
|
-
async requestTreeRoot() {
|
|
33
|
-
await this.#init;
|
|
34
|
-
const data = {
|
|
35
|
-
id: null,
|
|
36
|
-
type: 'dictionary-root',
|
|
37
|
-
name: 'Dictionary',
|
|
38
|
-
icon: 'icon-folder',
|
|
39
|
-
hasChildren: true,
|
|
40
|
-
};
|
|
41
|
-
return { data };
|
|
42
|
-
}
|
|
43
|
-
async requestRootTreeItems() {
|
|
44
|
-
await this.#init;
|
|
45
|
-
const { data, error } = await this.#treeSource.getRootItems();
|
|
46
|
-
if (data) {
|
|
47
|
-
this.#treeStore?.appendItems(data.items);
|
|
48
|
-
}
|
|
49
|
-
return { data, error, asObservable: () => this.#treeStore.rootItems };
|
|
50
|
-
}
|
|
51
|
-
async requestTreeItemsOf(parentId) {
|
|
52
|
-
if (parentId === undefined)
|
|
53
|
-
throw new Error('Parent id is missing');
|
|
54
|
-
await this.#init;
|
|
55
|
-
const { data, error } = await this.#treeSource.getChildrenOf(parentId);
|
|
56
|
-
if (data) {
|
|
57
|
-
this.#treeStore?.appendItems(data.items);
|
|
58
|
-
}
|
|
59
|
-
return { data, error, asObservable: () => this.#treeStore.childrenOf(parentId) };
|
|
60
|
-
}
|
|
61
|
-
async requestItemsLegacy(ids) {
|
|
62
|
-
await this.#init;
|
|
63
|
-
if (!ids) {
|
|
64
|
-
throw new Error('Ids are missing');
|
|
65
|
-
}
|
|
66
|
-
const { data, error } = await this.#treeSource.getItems(ids);
|
|
67
|
-
return { data, error, asObservable: () => this.#treeStore.items(ids) };
|
|
68
|
-
}
|
|
69
|
-
async requestItems(ids) {
|
|
70
|
-
// TODO: There is a bug where the item gets removed from the tree before we confirm the delete via the modal. It doesn't delete the item unless we confirm the delete.
|
|
71
|
-
if (!ids)
|
|
72
|
-
throw new Error('Dictionary Ids are missing');
|
|
73
|
-
await this.#init;
|
|
74
|
-
const { data, error } = await this.#treeSource.getItems(ids);
|
|
75
|
-
if (data) {
|
|
76
|
-
this.#treeStore?.appendItems(data);
|
|
77
|
-
}
|
|
78
|
-
return { data, error, asObservable: () => this.#treeStore.items(ids) };
|
|
79
|
-
}
|
|
80
|
-
async rootTreeItems() {
|
|
81
|
-
await this.#init;
|
|
82
|
-
return this.#treeStore.rootItems;
|
|
83
|
-
}
|
|
84
|
-
async treeItemsOf(parentId) {
|
|
85
|
-
await this.#init;
|
|
86
|
-
return this.#treeStore.childrenOf(parentId);
|
|
87
|
-
}
|
|
88
28
|
async itemsLegacy(ids) {
|
|
89
29
|
await this.#init;
|
|
90
30
|
return this.#treeStore.items(ids);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ManifestStore,
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const manifests: (ManifestStore | ManifestTreeStore | ManifestRepository<import("../../../../libs/extension-api/types.js").UmbApi>)[];
|
|
1
|
+
import { ManifestStore, ManifestRepository } from '../../../core/extension-registry/index.js';
|
|
2
|
+
export declare const UMB_DICTIONARY_REPOSITORY_ALIAS = "Umb.Repository.Dictionary";
|
|
3
|
+
export declare const UMB_DICTIONARY_STORE_ALIAS = "Umb.Store.Dictionary";
|
|
4
|
+
export declare const manifests: (ManifestStore | ManifestRepository<import("../../../../libs/extension-api/types.js").UmbApi>)[];
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import { UmbDictionaryRepository } from './dictionary.repository.js';
|
|
2
|
-
import { UmbDictionaryTreeStore } from './dictionary.tree.store.js';
|
|
3
2
|
import { UmbDictionaryStore } from './dictionary.store.js';
|
|
4
|
-
export const
|
|
3
|
+
export const UMB_DICTIONARY_REPOSITORY_ALIAS = 'Umb.Repository.Dictionary';
|
|
5
4
|
const repository = {
|
|
6
5
|
type: 'repository',
|
|
7
|
-
alias:
|
|
6
|
+
alias: UMB_DICTIONARY_REPOSITORY_ALIAS,
|
|
8
7
|
name: 'Dictionary Repository',
|
|
9
8
|
api: UmbDictionaryRepository,
|
|
10
9
|
};
|
|
11
|
-
export const
|
|
12
|
-
export const DICTIONARY_TREE_STORE_ALIAS = 'Umb.Store.DictionaryTree';
|
|
10
|
+
export const UMB_DICTIONARY_STORE_ALIAS = 'Umb.Store.Dictionary';
|
|
13
11
|
const store = {
|
|
14
12
|
type: 'store',
|
|
15
|
-
alias:
|
|
13
|
+
alias: UMB_DICTIONARY_STORE_ALIAS,
|
|
16
14
|
name: 'Dictionary Store',
|
|
17
15
|
api: UmbDictionaryStore,
|
|
18
16
|
};
|
|
19
|
-
const
|
|
20
|
-
type: 'treeStore',
|
|
21
|
-
alias: DICTIONARY_TREE_STORE_ALIAS,
|
|
22
|
-
name: 'Dictionary Tree Store',
|
|
23
|
-
api: UmbDictionaryTreeStore,
|
|
24
|
-
};
|
|
25
|
-
export const manifests = [repository, store, treeStore];
|
|
17
|
+
export const manifests = [repository, store];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UmbDictionaryTreeItemModel, UmbDictionaryTreeRootModel } from './types.js';
|
|
2
|
+
import { UmbTreeRepositoryBase } from '../../../core/tree/index.js';
|
|
3
|
+
import { type UmbControllerHost } from '../../../../libs/controller-api/index.js';
|
|
4
|
+
import { UmbApi } from '../../../../libs/extension-api/index.js';
|
|
5
|
+
export declare class UmbDictionaryTreeRepository extends UmbTreeRepositoryBase<UmbDictionaryTreeItemModel, UmbDictionaryTreeRootModel> implements UmbApi {
|
|
6
|
+
constructor(host: UmbControllerHost);
|
|
7
|
+
requestTreeRoot(): Promise<{
|
|
8
|
+
data: {
|
|
9
|
+
id: null;
|
|
10
|
+
type: string;
|
|
11
|
+
name: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
hasChildren: boolean;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UMB_DICTIONARY_ROOT_ENTITY_TYPE } from '../entities.js';
|
|
2
|
+
import { UmbDictionaryTreeServerDataSource } from './dictionary-tree.server.data-source.js';
|
|
3
|
+
import { UMB_DICTIONARY_TREE_STORE_CONTEXT } from './dictionary-tree.store.js';
|
|
4
|
+
import { UmbTreeRepositoryBase } from '../../../core/tree/index.js';
|
|
5
|
+
export class UmbDictionaryTreeRepository extends UmbTreeRepositoryBase {
|
|
6
|
+
constructor(host) {
|
|
7
|
+
super(host, UmbDictionaryTreeServerDataSource, UMB_DICTIONARY_TREE_STORE_CONTEXT);
|
|
8
|
+
}
|
|
9
|
+
async requestTreeRoot() {
|
|
10
|
+
const data = {
|
|
11
|
+
id: null,
|
|
12
|
+
type: UMB_DICTIONARY_ROOT_ENTITY_TYPE,
|
|
13
|
+
name: 'Dictionary',
|
|
14
|
+
icon: 'icon-folder',
|
|
15
|
+
hasChildren: true,
|
|
16
|
+
};
|
|
17
|
+
return { data };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { UmbTreeDataSource } from '../../../core/tree/index.js';
|
|
2
|
+
import { EntityTreeItemResponseModel } from '../../../../external/backend-api/index.js';
|
|
3
|
+
import type { UmbControllerHost } from '../../../../libs/controller-api/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* A data source for the Dictionary tree that fetches data from the server
|
|
6
|
+
* @export
|
|
7
|
+
* @class UmbDictionaryTreeServerDataSource
|
|
8
|
+
* @implements {UmbTreeDataSource}
|
|
9
|
+
*/
|
|
10
|
+
export declare class UmbDictionaryTreeServerDataSource implements UmbTreeDataSource<EntityTreeItemResponseModel> {
|
|
11
|
+
#private;
|
|
12
|
+
/**
|
|
13
|
+
* Creates an instance of UmbDictionaryTreeServerDataSource.
|
|
14
|
+
* @param {UmbControllerHost} host
|
|
15
|
+
* @memberof UmbDictionaryTreeServerDataSource
|
|
16
|
+
*/
|
|
17
|
+
constructor(host: UmbControllerHost);
|
|
18
|
+
/**
|
|
19
|
+
* Fetches the root items for the tree from the server
|
|
20
|
+
* @return {*}
|
|
21
|
+
* @memberof UmbDictionaryTreeServerDataSource
|
|
22
|
+
*/
|
|
23
|
+
getRootItems(): Promise<import("../../../core/repository/index.js").DataSourceResponse<import("../../../../external/backend-api/index.js").PagedEntityTreeItemResponseModel>>;
|
|
24
|
+
/**
|
|
25
|
+
* Fetches the children of a given parent id from the server
|
|
26
|
+
* @param {(string)} parentId
|
|
27
|
+
* @return {*}
|
|
28
|
+
* @memberof UmbDictionaryTreeServerDataSource
|
|
29
|
+
*/
|
|
30
|
+
getChildrenOf(parentId: string | null): Promise<import("../../../core/repository/index.js").DataSourceResponse<import("../../../../external/backend-api/index.js").PagedEntityTreeItemResponseModel>>;
|
|
31
|
+
/**
|
|
32
|
+
* Fetches the items for the given ids from the server
|
|
33
|
+
* @param {Array<string>} ids
|
|
34
|
+
* @return {*}
|
|
35
|
+
* @memberof UmbDictionaryTreeServerDataSource
|
|
36
|
+
*/
|
|
37
|
+
getItems(ids: Array<string>): Promise<import("../../../core/repository/index.js").DataSourceResponse<import("../../../../external/backend-api/index.js").ItemResponseModelBaseModel[]>>;
|
|
38
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { DictionaryResource } from '
|
|
2
|
-
import { tryExecuteAndNotify } from '
|
|
1
|
+
import { DictionaryResource } from '../../../../external/backend-api/index.js';
|
|
2
|
+
import { tryExecuteAndNotify } from '../../../../shared/resources/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* A data source for the Dictionary tree that fetches data from the server
|
|
5
5
|
* @export
|
|
6
6
|
* @class UmbDictionaryTreeServerDataSource
|
|
7
|
-
* @implements {
|
|
7
|
+
* @implements {UmbTreeDataSource}
|
|
8
8
|
*/
|
|
9
9
|
export class UmbDictionaryTreeServerDataSource {
|
|
10
10
|
#host;
|
|
11
11
|
/**
|
|
12
|
-
* Creates an instance of
|
|
12
|
+
* Creates an instance of UmbDictionaryTreeServerDataSource.
|
|
13
13
|
* @param {UmbControllerHost} host
|
|
14
|
-
* @memberof
|
|
14
|
+
* @memberof UmbDictionaryTreeServerDataSource
|
|
15
15
|
*/
|
|
16
16
|
constructor(host) {
|
|
17
17
|
this.#host = host;
|
|
@@ -26,7 +26,7 @@ export class UmbDictionaryTreeServerDataSource {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Fetches the children of a given parent id from the server
|
|
29
|
-
* @param {(string
|
|
29
|
+
* @param {(string)} parentId
|
|
30
30
|
* @return {*}
|
|
31
31
|
* @memberof UmbDictionaryTreeServerDataSource
|
|
32
32
|
*/
|
|
@@ -51,9 +51,8 @@ export class UmbDictionaryTreeServerDataSource {
|
|
|
51
51
|
* @memberof UmbDictionaryTreeServerDataSource
|
|
52
52
|
*/
|
|
53
53
|
async getItems(ids) {
|
|
54
|
-
if (!ids
|
|
54
|
+
if (!ids)
|
|
55
55
|
throw new Error('Ids are missing');
|
|
56
|
-
}
|
|
57
56
|
return tryExecuteAndNotify(this.#host, DictionaryResource.getDictionaryItem({
|
|
58
57
|
id: ids,
|
|
59
58
|
}));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { UmbContextToken } from '../../../../libs/context-api/index.js';
|
|
2
|
-
import { UmbEntityTreeStore } from '../../../core/tree/index.js';
|
|
3
2
|
import { UmbControllerHostElement } from '../../../../libs/controller-api/index.js';
|
|
3
|
+
import { UmbEntityTreeStore } from '../../../core/tree/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* @export
|
|
6
6
|
* @class UmbDictionaryTreeStore
|
|
7
|
-
* @extends {
|
|
8
|
-
* @description - Tree Data Store for Dictionary
|
|
7
|
+
* @extends {UmbStoreBase}
|
|
8
|
+
* @description - Tree Data Store for Dictionary Items
|
|
9
9
|
*/
|
|
10
10
|
export declare class UmbDictionaryTreeStore extends UmbEntityTreeStore {
|
|
11
11
|
/**
|
|
@@ -15,4 +15,4 @@ export declare class UmbDictionaryTreeStore extends UmbEntityTreeStore {
|
|
|
15
15
|
*/
|
|
16
16
|
constructor(host: UmbControllerHostElement);
|
|
17
17
|
}
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const UMB_DICTIONARY_TREE_STORE_CONTEXT: UmbContextToken<UmbDictionaryTreeStore, UmbDictionaryTreeStore>;
|
|
@@ -3,8 +3,8 @@ import { UmbEntityTreeStore } from '../../../core/tree/index.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* @export
|
|
5
5
|
* @class UmbDictionaryTreeStore
|
|
6
|
-
* @extends {
|
|
7
|
-
* @description - Tree Data Store for Dictionary
|
|
6
|
+
* @extends {UmbStoreBase}
|
|
7
|
+
* @description - Tree Data Store for Dictionary Items
|
|
8
8
|
*/
|
|
9
9
|
export class UmbDictionaryTreeStore extends UmbEntityTreeStore {
|
|
10
10
|
/**
|
|
@@ -13,7 +13,7 @@ export class UmbDictionaryTreeStore extends UmbEntityTreeStore {
|
|
|
13
13
|
* @memberof UmbDictionaryTreeStore
|
|
14
14
|
*/
|
|
15
15
|
constructor(host) {
|
|
16
|
-
super(host,
|
|
16
|
+
super(host, UMB_DICTIONARY_TREE_STORE_CONTEXT.toString());
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
export const
|
|
19
|
+
export const UMB_DICTIONARY_TREE_STORE_CONTEXT = new UmbContextToken('UmbDictionaryTreeStore');
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { UmbDictionaryTreeRepository } from './dictionary-tree.repository.js';
|
|
2
|
+
export { UMB_DICTIONARY_TREE_REPOSITORY_ALIAS, UMB_DICTIONARY_TREE_STORE_ALIAS, UMB_DICTIONARY_TREE_ALIAS, } from './manifests.js';
|
|
3
|
+
export { UMB_DICTIONARY_TREE_STORE_CONTEXT } from './dictionary-tree.store.js';
|
|
4
|
+
export { type UmbDictionaryTreeStore } from './dictionary-tree.store.js';
|
|
5
|
+
export * from './types.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { UmbDictionaryTreeRepository } from './dictionary-tree.repository.js';
|
|
2
|
+
export { UMB_DICTIONARY_TREE_REPOSITORY_ALIAS, UMB_DICTIONARY_TREE_STORE_ALIAS, UMB_DICTIONARY_TREE_ALIAS, } from './manifests.js';
|
|
3
|
+
export { UMB_DICTIONARY_TREE_STORE_CONTEXT } from './dictionary-tree.store.js';
|
|
4
|
+
export * from './types.js';
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import type { ManifestTree, ManifestTreeItem } from '../../../core/extension-registry/index.js';
|
|
2
|
-
export declare const
|
|
1
|
+
import type { ManifestRepository, ManifestTree, ManifestTreeItem, ManifestTreeStore } from '../../../core/extension-registry/index.js';
|
|
2
|
+
export declare const UMB_DICTIONARY_TREE_REPOSITORY_ALIAS = "Umb.Repository.Dictionary.Tree";
|
|
3
|
+
export declare const UMB_DICTIONARY_TREE_STORE_ALIAS = "Umb.Store.Dictionary.Tree";
|
|
4
|
+
export declare const UMB_DICTIONARY_TREE_ALIAS = "Umb.Tree.Dictionary";
|
|
5
|
+
export declare const manifests: (ManifestTree | ManifestTreeItem | ManifestTreeStore | ManifestRepository<import("../../../../libs/extension-api/types.js").UmbApi>)[];
|
|
@@ -1,19 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE } from '../entities.js';
|
|
2
|
+
import { UmbDictionaryTreeRepository } from './dictionary-tree.repository.js';
|
|
3
|
+
import { UmbDictionaryTreeStore } from './dictionary-tree.store.js';
|
|
4
|
+
export const UMB_DICTIONARY_TREE_REPOSITORY_ALIAS = 'Umb.Repository.Dictionary.Tree';
|
|
5
|
+
export const UMB_DICTIONARY_TREE_STORE_ALIAS = 'Umb.Store.Dictionary.Tree';
|
|
6
|
+
export const UMB_DICTIONARY_TREE_ALIAS = 'Umb.Tree.Dictionary';
|
|
7
|
+
const treeRepository = {
|
|
8
|
+
type: 'repository',
|
|
9
|
+
alias: UMB_DICTIONARY_TREE_REPOSITORY_ALIAS,
|
|
10
|
+
name: 'Dictionary Tree Repository',
|
|
11
|
+
api: UmbDictionaryTreeRepository,
|
|
12
|
+
};
|
|
13
|
+
const treeStore = {
|
|
14
|
+
type: 'treeStore',
|
|
15
|
+
alias: UMB_DICTIONARY_TREE_STORE_ALIAS,
|
|
16
|
+
name: 'Dictionary Tree Store',
|
|
17
|
+
api: UmbDictionaryTreeStore,
|
|
18
|
+
};
|
|
2
19
|
const tree = {
|
|
3
20
|
type: 'tree',
|
|
4
|
-
alias:
|
|
21
|
+
alias: UMB_DICTIONARY_TREE_ALIAS,
|
|
5
22
|
name: 'Dictionary Tree',
|
|
6
23
|
meta: {
|
|
7
|
-
repositoryAlias:
|
|
24
|
+
repositoryAlias: UMB_DICTIONARY_TREE_REPOSITORY_ALIAS,
|
|
8
25
|
},
|
|
9
26
|
};
|
|
10
27
|
const treeItem = {
|
|
11
28
|
type: 'treeItem',
|
|
12
29
|
kind: 'entity',
|
|
13
|
-
alias: 'Umb.TreeItem.
|
|
14
|
-
name: 'Dictionary
|
|
30
|
+
alias: 'Umb.TreeItem.Dictionary',
|
|
31
|
+
name: 'Dictionary Tree Item',
|
|
15
32
|
meta: {
|
|
16
|
-
entityTypes: [
|
|
33
|
+
entityTypes: [UMB_DICTIONARY_ROOT_ENTITY_TYPE, UMB_DICTIONARY_ENTITY_TYPE],
|
|
17
34
|
},
|
|
18
35
|
};
|
|
19
|
-
export const manifests = [tree, treeItem];
|
|
36
|
+
export const manifests = [treeRepository, treeStore, tree, treeItem];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EntityTreeItemResponseModel } from '../../../../external/backend-api/index.js';
|
|
2
|
+
import type { UmbEntityTreeItemModel, UmbEntityTreeRootModel } from '../../../core/tree/index.js';
|
|
3
|
+
export type UmbDictionaryTreeItemModel = EntityTreeItemResponseModel & UmbEntityTreeItemModel;
|
|
4
|
+
export type UmbDictionaryTreeRootModel = EntityTreeItemResponseModel & UmbEntityTreeRootModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const manifests: (import("../core/index.js").ManifestSectionSidebarApp | import("../core/index.js").ManifestModal | import("../core/index.js").ManifestDashboard | import("../core/index.js").ManifestEntityAction | import("../core/index.js").ManifestMenu | import("../core/index.js").
|
|
1
|
+
export declare const manifests: (import("../core/index.js").ManifestSectionSidebarApp | import("../core/index.js").ManifestModal | import("../core/index.js").ManifestDashboard | import("../core/index.js").ManifestEntityAction | import("../core/index.js").ManifestMenu | import("../core/index.js").ManifestMenuItemTreeKind | import("../core/index.js").ManifestSection | import("../core/index.js").ManifestStore | import("../core/index.js").ManifestTree | import("../core/index.js").ManifestTreeItem | import("../core/index.js").ManifestTreeStore | import("../core/index.js").ManifestWorkspace | import("../core/index.js").ManifestWorkspaceAction | import("../core/index.js").ManifestWorkspaceEditorView | import("../core/index.js").ManifestRepository<import("../../libs/extension-api/types.js").UmbApi>)[];
|