Skip to content

Commit 4353027

Browse files
Feature: Media Type Folder workspace (#18028)
* add manifests for media type tree item children * export consts * export path consts
1 parent 0d61890 commit 4353027

File tree

23 files changed

+325
-19
lines changed

23 files changed

+325
-19
lines changed

src/Umbraco.Web.UI.Client/src/packages/media/media-types/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
export * from './entity-actions/constants.js';
2+
export * from './media-type-root/constants.js';
3+
export * from './paths.js';
24
export * from './repository/constants.js';
35
export * from './tree/constants.js';
46
export * from './workspace/constants.js';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const UMB_MEDIA_TYPE_ROOT_WORKSPACE_ALIAS = 'Umb.Workspace.MediaType.Root';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './constants.js';
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { UMB_MEDIA_TYPE_ROOT_ENTITY_TYPE } from '../entity.js';
2+
3+
export const manifests: Array<UmbExtensionManifest> = [
4+
{
5+
type: 'workspace',
6+
kind: 'default',
7+
alias: 'Umb.Workspace.MediaType.Root',
8+
name: 'Media Type Root Workspace',
9+
meta: {
10+
entityType: UMB_MEDIA_TYPE_ROOT_ENTITY_TYPE,
11+
headline: '#treeHeaders_mediaTypes',
12+
},
13+
},
14+
];
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { UMB_MEDIA_TYPE_ENTITY_TYPE, UMB_MEDIA_TYPE_ROOT_ENTITY_TYPE } from './entity.js';
2+
import { UMB_WORKSPACE_PATH_PATTERN } from '@umbraco-cms/backoffice/workspace';
3+
import { UMB_SETTINGS_SECTION_PATHNAME } from '@umbraco-cms/backoffice/settings';
4+
import { UmbPathPattern } from '@umbraco-cms/backoffice/router';
5+
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
6+
7+
export const UMB_MEDIA_TYPE_WORKSPACE_PATH = UMB_WORKSPACE_PATH_PATTERN.generateAbsolute({
8+
sectionName: UMB_SETTINGS_SECTION_PATHNAME,
9+
entityType: UMB_MEDIA_TYPE_ENTITY_TYPE,
10+
});
11+
12+
export const UMB_MEDIA_TYPE_ROOT_WORKSPACE_PATH = UMB_WORKSPACE_PATH_PATTERN.generateAbsolute({
13+
sectionName: UMB_SETTINGS_SECTION_PATHNAME,
14+
entityType: UMB_MEDIA_TYPE_ROOT_ENTITY_TYPE,
15+
});
16+
17+
export const UMB_CREATE_MEDIA_TYPE_WORKSPACE_PATH_PATTERN = new UmbPathPattern<{
18+
parentEntityType: UmbEntityModel['entityType'];
19+
parentUnique: UmbEntityModel['unique'];
20+
}>('create/parent/:parentEntityType/:parentUnique', UMB_MEDIA_TYPE_WORKSPACE_PATH);
21+
22+
export const UMB_EDIT_MEDIA_TYPE_WORKSPACE_PATH_PATTERN = new UmbPathPattern<{ unique: string }>(
23+
'edit/:unique',
24+
UMB_MEDIA_TYPE_WORKSPACE_PATH,
25+
);

src/Umbraco.Web.UI.Client/src/packages/media/media-types/tree/constants.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
export * from './folder/constants.js';
2+
export * from './tree-item-children/constants.js';
3+
14
export const UMB_MEDIA_TYPE_TREE_REPOSITORY_ALIAS = 'Umb.Repository.MediaType.Tree';
25
export const UMB_MEDIA_TYPE_TREE_STORE_ALIAS = 'Umb.Store.MediaType.Tree';
36
export const UMB_MEDIA_TYPE_TREE_ALIAS = 'Umb.Tree.MediaType';
47
export { UMB_MEDIA_TYPE_PICKER_MODAL } from './media-type-picker-modal.token.js';
58
export { UMB_MEDIA_TYPE_TREE_STORE_CONTEXT } from './media-type-tree.store.context-token.js';
6-
export * from './folder/constants.js';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export const UMB_MEDIA_TYPE_FOLDER_WORKSPACE_ALIAS = 'Umb.Workspace.MediaType.Folder';
22
export * from './media-type-folder.workspace.context-token.js';
3+
export * from './paths.js';
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { UMB_MEDIA_TYPE_FOLDER_ENTITY_TYPE } from '../../../entity.js';
2+
import { UmbPathPattern } from '@umbraco-cms/backoffice/router';
3+
import { UMB_SETTINGS_SECTION_PATHNAME } from '@umbraco-cms/backoffice/settings';
4+
import { UMB_WORKSPACE_PATH_PATTERN } from '@umbraco-cms/backoffice/workspace';
5+
6+
export const UMB_MEDIA_TYPE_FOLDER_WORKSPACE_PATH = UMB_WORKSPACE_PATH_PATTERN.generateAbsolute({
7+
sectionName: UMB_SETTINGS_SECTION_PATHNAME,
8+
entityType: UMB_MEDIA_TYPE_FOLDER_ENTITY_TYPE,
9+
});
10+
11+
export const UMB_EDIT_MEDIA_TYPE_FOLDER_WORKSPACE_PATH_PATTERN = new UmbPathPattern<{ unique: string }>(
12+
'edit/:unique',
13+
UMB_MEDIA_TYPE_FOLDER_WORKSPACE_PATH,
14+
);

src/Umbraco.Web.UI.Client/src/packages/media/media-types/tree/manifests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
UMB_MEDIA_TYPE_TREE_STORE_ALIAS,
1010
} from './constants.js';
1111
import { manifests as folderManifests } from './folder/manifests.js';
12-
import { manifests as reloadTreeItemChildrenManifest } from './reload-tree-item-children/manifests.js';
12+
import { manifests as treeItemChildrenManifest } from './tree-item-children/manifests.js';
1313

1414
export const manifests: Array<UmbExtensionManifest> = [
1515
{
@@ -51,5 +51,5 @@ export const manifests: Array<UmbExtensionManifest> = [
5151
},
5252
},
5353
...folderManifests,
54-
...reloadTreeItemChildrenManifest,
54+
...treeItemChildrenManifest,
5555
];

src/Umbraco.Web.UI.Client/src/packages/media/media-types/tree/reload-tree-item-children/manifests.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)