Skip to content

Commit 502f1a3

Browse files
committed
update imports
1 parent 1cea844 commit 502f1a3

File tree

4 files changed

+96
-138
lines changed

4 files changed

+96
-138
lines changed

src/packages/core/tree/tree.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import type { ManifestTree } from './extensions/index.js';
12
import { customElement } from '@umbraco-cms/backoffice/external/lit';
2-
import type { ManifestTree } from '@umbraco-cms/backoffice/extension-registry';
33
import { UmbExtensionElementAndApiSlotElementBase } from '@umbraco-cms/backoffice/extension-registry';
44

55
@customElement('umb-tree')
Lines changed: 38 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,45 @@
11
import { UMB_MEDIA_ENTITY_TYPE, UMB_MEDIA_ROOT_ENTITY_TYPE } from '../entity.js';
22
import { UMB_MEDIA_TREE_ALIAS, UMB_MEDIA_TREE_REPOSITORY_ALIAS, UMB_MEDIA_TREE_STORE_ALIAS } from './constants.js';
33
import { manifests as reloadTreeItemChildrenManifests } from './reload-tree-item-children/manifests.js';
4-
import type {
5-
ManifestRepository,
6-
ManifestTree,
7-
ManifestTreeItem,
8-
ManifestTreeStore,
9-
ManifestTypes,
10-
} from '@umbraco-cms/backoffice/extension-registry';
114

12-
const treeRepository: ManifestRepository = {
13-
type: 'repository',
14-
alias: UMB_MEDIA_TREE_REPOSITORY_ALIAS,
15-
name: 'Media Tree Repository',
16-
api: () => import('./media-tree.repository.js'),
17-
};
18-
19-
const treeStore: ManifestTreeStore = {
20-
type: 'treeStore',
21-
alias: UMB_MEDIA_TREE_STORE_ALIAS,
22-
name: 'Media Tree Store',
23-
api: () => import('./media-tree.store.js'),
24-
};
25-
26-
const tree: ManifestTree = {
27-
type: 'tree',
28-
alias: UMB_MEDIA_TREE_ALIAS,
29-
name: 'Media Tree',
30-
element: () => import('./media-tree.element.js'),
31-
api: () => import('./media-tree.context.js'),
32-
meta: {
33-
repositoryAlias: UMB_MEDIA_TREE_REPOSITORY_ALIAS,
5+
export const manifests: Array<UmbExtensionManifest> = [
6+
{
7+
type: 'repository',
8+
alias: UMB_MEDIA_TREE_REPOSITORY_ALIAS,
9+
name: 'Media Tree Repository',
10+
api: () => import('./media-tree.repository.js'),
11+
},
12+
{
13+
type: 'treeStore',
14+
alias: UMB_MEDIA_TREE_STORE_ALIAS,
15+
name: 'Media Tree Store',
16+
api: () => import('./media-tree.store.js'),
17+
},
18+
{
19+
type: 'tree',
20+
alias: UMB_MEDIA_TREE_ALIAS,
21+
name: 'Media Tree',
22+
element: () => import('./media-tree.element.js'),
23+
api: () => import('./media-tree.context.js'),
24+
meta: {
25+
repositoryAlias: UMB_MEDIA_TREE_REPOSITORY_ALIAS,
26+
},
27+
},
28+
{
29+
type: 'treeItem',
30+
kind: 'default',
31+
alias: 'Umb.TreeItem.Media',
32+
name: 'Media Tree Item',
33+
element: () => import('./tree-item/media-tree-item.element.js'),
34+
api: () => import('./tree-item/media-tree-item.context.js'),
35+
forEntityTypes: [UMB_MEDIA_ENTITY_TYPE],
36+
},
37+
{
38+
type: 'treeItem',
39+
kind: 'default',
40+
alias: 'Umb.TreeItem.Media.Root',
41+
name: 'Media Tree Root',
42+
forEntityTypes: [UMB_MEDIA_ROOT_ENTITY_TYPE],
3443
},
35-
};
36-
37-
const treeItem: ManifestTreeItem = {
38-
type: 'treeItem',
39-
kind: 'default',
40-
alias: 'Umb.TreeItem.Media',
41-
name: 'Media Tree Item',
42-
element: () => import('./tree-item/media-tree-item.element.js'),
43-
api: () => import('./tree-item/media-tree-item.context.js'),
44-
forEntityTypes: [UMB_MEDIA_ENTITY_TYPE],
45-
};
46-
47-
const rootTreeItem: ManifestTreeItem = {
48-
type: 'treeItem',
49-
kind: 'default',
50-
alias: 'Umb.TreeItem.Media.Root',
51-
name: 'Media Tree Root',
52-
forEntityTypes: [UMB_MEDIA_ROOT_ENTITY_TYPE],
53-
};
54-
55-
export const manifests: Array<ManifestTypes> = [
56-
treeRepository,
57-
treeStore,
58-
tree,
59-
treeItem,
60-
rootTreeItem,
6144
...reloadTreeItemChildrenManifests,
6245
];
Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,38 @@
11
import { UMB_MEMBER_TYPE_ENTITY_TYPE, UMB_MEMBER_TYPE_ROOT_ENTITY_TYPE } from '../entity.js';
22
import { manifests as reloadTreeItemChildrenManifest } from './reload-tree-item-children/manifests.js';
3-
import type {
4-
ManifestRepository,
5-
ManifestTree,
6-
ManifestTreeItem,
7-
ManifestTreeStore,
8-
ManifestTypes,
9-
} from '@umbraco-cms/backoffice/extension-registry';
103

114
export const UMB_MEMBER_TYPE_TREE_REPOSITORY_ALIAS = 'Umb.Repository.MemberType.Tree';
125
export const UMB_MEMBER_TYPE_TREE_STORE_ALIAS = 'Umb.Store.MemberType.Tree';
136
export const UMB_MEMBER_TYPE_TREE_ALIAS = 'Umb.Tree.MemberType';
147

15-
const treeRepository: ManifestRepository = {
16-
type: 'repository',
17-
alias: UMB_MEMBER_TYPE_TREE_REPOSITORY_ALIAS,
18-
name: 'Member Type Tree Repository',
19-
api: () => import('./member-type-tree.repository.js'),
20-
};
21-
22-
const treeStore: ManifestTreeStore = {
23-
type: 'treeStore',
24-
alias: UMB_MEMBER_TYPE_TREE_STORE_ALIAS,
25-
name: 'Member Type Tree Store',
26-
api: () => import('./member-type-tree.store.js'),
27-
};
28-
29-
const tree: ManifestTree = {
30-
type: 'tree',
31-
kind: 'default',
32-
alias: UMB_MEMBER_TYPE_TREE_ALIAS,
33-
name: 'Member Type Tree',
34-
meta: {
35-
repositoryAlias: UMB_MEMBER_TYPE_TREE_REPOSITORY_ALIAS,
8+
export const manifests: Array<UmbExtensionManifest> = [
9+
{
10+
type: 'repository',
11+
alias: UMB_MEMBER_TYPE_TREE_REPOSITORY_ALIAS,
12+
name: 'Member Type Tree Repository',
13+
api: () => import('./member-type-tree.repository.js'),
14+
},
15+
{
16+
type: 'treeStore',
17+
alias: UMB_MEMBER_TYPE_TREE_STORE_ALIAS,
18+
name: 'Member Type Tree Store',
19+
api: () => import('./member-type-tree.store.js'),
20+
},
21+
{
22+
type: 'tree',
23+
kind: 'default',
24+
alias: UMB_MEMBER_TYPE_TREE_ALIAS,
25+
name: 'Member Type Tree',
26+
meta: {
27+
repositoryAlias: UMB_MEMBER_TYPE_TREE_REPOSITORY_ALIAS,
28+
},
29+
},
30+
{
31+
type: 'treeItem',
32+
kind: 'default',
33+
alias: 'Umb.TreeItem.MemberType',
34+
name: 'Member Type Tree Item',
35+
forEntityTypes: [UMB_MEMBER_TYPE_ROOT_ENTITY_TYPE, UMB_MEMBER_TYPE_ENTITY_TYPE],
3636
},
37-
};
38-
39-
const treeItem: ManifestTreeItem = {
40-
type: 'treeItem',
41-
kind: 'default',
42-
alias: 'Umb.TreeItem.MemberType',
43-
name: 'Member Type Tree Item',
44-
forEntityTypes: [UMB_MEMBER_TYPE_ROOT_ENTITY_TYPE, UMB_MEMBER_TYPE_ENTITY_TYPE],
45-
};
46-
47-
export const manifests: Array<ManifestTypes> = [
48-
treeRepository,
49-
treeStore,
50-
tree,
51-
treeItem,
5237
...reloadTreeItemChildrenManifest,
5338
];

src/packages/static-file/tree/manifests.ts

Lines changed: 29 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,34 @@ import {
99
UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS,
1010
UMB_STATIC_FILE_TREE_STORE_ALIAS,
1111
} from './constants.js';
12-
import type {
13-
ManifestRepository,
14-
ManifestTree,
15-
ManifestTreeStore,
16-
ManifestTreeItem,
17-
ManifestTypes,
18-
} from '@umbraco-cms/backoffice/extension-registry';
1912

20-
const treeRepository: ManifestRepository = {
21-
type: 'repository',
22-
alias: UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS,
23-
name: 'Static File Tree Repository',
24-
api: () => import('./static-file-tree.repository.js'),
25-
};
26-
27-
const treeStore: ManifestTreeStore = {
28-
type: 'treeStore',
29-
alias: UMB_STATIC_FILE_TREE_STORE_ALIAS,
30-
name: 'Static File Tree Store',
31-
api: () => import('./static-file-tree.store.js'),
32-
};
33-
34-
const tree: ManifestTree = {
35-
type: 'tree',
36-
kind: 'default',
37-
alias: UMB_STATIC_FILE_TREE_ALIAS,
38-
name: 'Static File Tree',
39-
meta: {
40-
repositoryAlias: UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS,
13+
export const manifests: Array<UmbExtensionManifest> = [
14+
{
15+
type: 'repository',
16+
alias: UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS,
17+
name: 'Static File Tree Repository',
18+
api: () => import('./static-file-tree.repository.js'),
4119
},
42-
};
43-
44-
const treeItem: ManifestTreeItem = {
45-
type: 'treeItem',
46-
kind: 'default',
47-
alias: UMB_STATIC_FILE_TREE_ITEM_ALIAS,
48-
name: 'Static File Tree Item',
49-
forEntityTypes: [UMB_STATIC_FILE_ENTITY_TYPE, UMB_STATIC_FILE_ROOT_ENTITY_TYPE, UMB_STATIC_FILE_FOLDER_ENTITY_TYPE],
50-
};
51-
52-
export const manifests: Array<ManifestTypes> = [treeRepository, treeStore, tree, treeItem];
20+
{
21+
type: 'treeStore',
22+
alias: UMB_STATIC_FILE_TREE_STORE_ALIAS,
23+
name: 'Static File Tree Store',
24+
api: () => import('./static-file-tree.store.js'),
25+
},
26+
{
27+
type: 'tree',
28+
kind: 'default',
29+
alias: UMB_STATIC_FILE_TREE_ALIAS,
30+
name: 'Static File Tree',
31+
meta: {
32+
repositoryAlias: UMB_STATIC_FILE_TREE_REPOSITORY_ALIAS,
33+
},
34+
},
35+
{
36+
type: 'treeItem',
37+
kind: 'default',
38+
alias: UMB_STATIC_FILE_TREE_ITEM_ALIAS,
39+
name: 'Static File Tree Item',
40+
forEntityTypes: [UMB_STATIC_FILE_ENTITY_TYPE, UMB_STATIC_FILE_ROOT_ENTITY_TYPE, UMB_STATIC_FILE_FOLDER_ENTITY_TYPE],
41+
},
42+
];

0 commit comments

Comments
 (0)