Skip to content

Commit c515671

Browse files
committed
fix: add a routable workspace for the blueprint root
1 parent 912278f commit c515671

File tree

1 file changed

+11
-22
lines changed
  • src/packages/documents/document-blueprints/workspace

1 file changed

+11
-22
lines changed

src/packages/documents/document-blueprints/workspace/manifests.ts

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE } from '../entity.js';
1+
import { UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE } from '../entity.js';
22
import { UmbSaveWorkspaceAction } from '@umbraco-cms/backoffice/workspace';
33
import type {
44
ManifestTypes,
55
ManifestWorkspace,
66
ManifestWorkspaceActions,
7-
ManifestWorkspaceView,
87
} from '@umbraco-cms/backoffice/extension-registry';
98

109
export const UMB_DOCUMENT_BLUEPRINT_WORKSPACE_ALIAS = 'Umb.Workspace.DocumentBlueprint';
@@ -20,26 +19,16 @@ const workspace: ManifestWorkspace = {
2019
},
2120
};
2221

23-
const workspaceViews: Array<ManifestWorkspaceView> = [
24-
{
25-
type: 'workspaceView',
26-
kind: 'contentEditor',
27-
alias: 'Umb.WorkspaceView.DocumentBlueprint.Edit',
28-
name: 'Document Blueprint Workspace Edit View',
29-
weight: 200,
30-
meta: {
31-
label: '#general_content',
32-
pathname: 'content',
33-
icon: 'document',
34-
},
35-
conditions: [
36-
{
37-
alias: 'Umb.Condition.WorkspaceAlias',
38-
match: workspace.alias,
39-
},
40-
],
22+
const rootWorkspace: ManifestWorkspace = {
23+
type: 'workspace',
24+
kind: 'routable',
25+
alias: 'Umb.Workspace.DocumentBlueprint.Root',
26+
name: 'Document Blueprint Root Workspace',
27+
api: () => import('./document-blueprint-workspace.context.js'),
28+
meta: {
29+
entityType: UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE,
4130
},
42-
];
31+
};
4332

4433
const workspaceActions: Array<ManifestWorkspaceActions> = [
4534
{
@@ -63,4 +52,4 @@ const workspaceActions: Array<ManifestWorkspaceActions> = [
6352
},
6453
];
6554

66-
export const manifests: Array<ManifestTypes> = [workspace, ...workspaceViews, ...workspaceActions];
55+
export const manifests: Array<ManifestTypes> = [rootWorkspace, workspace, ...workspaceActions];

0 commit comments

Comments
 (0)