Skip to content

Commit 7c79157

Browse files
committed
register folder workspace for document types
1 parent 83cb339 commit 7c79157

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE } from '../../entity.js';
2+
import { manifests as workspaceManifests } from './workspace/manifests.js';
23

34
export const UMB_DOCUMENT_TYPE_FOLDER_REPOSITORY_ALIAS = 'Umb.Repository.DocumentType.Folder';
45

@@ -29,4 +30,5 @@ export const manifests: Array<UmbExtensionManifest> = [
2930
folderRepositoryAlias: UMB_DOCUMENT_TYPE_FOLDER_REPOSITORY_ALIAS,
3031
},
3132
},
33+
...workspaceManifests,
3234
];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const UMB_DOCUMENT_TYPE_FOLDER_WORKSPACE_ALIAS = 'Umb.Workspace.DocumentType.Folder';
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { UmbDocumentTypeTreeRepository } from '../../document-type-tree.repository.js';
2+
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
3+
import { css, html, customElement } from '@umbraco-cms/backoffice/external/lit';
4+
5+
const elementName = 'umb-folder-collection-workspace-view';
6+
@customElement(elementName)
7+
export class UmbFolderCollectionWorkspaceViewEditorElement extends UmbLitElement {
8+
#treeRepository = new UmbDocumentTypeTreeRepository(this);
9+
10+
constructor() {
11+
super();
12+
}
13+
14+
override render() {
15+
return html` <div>Some Collection</div>`;
16+
}
17+
18+
static override styles = [css``];
19+
}
20+
21+
export { UmbFolderCollectionWorkspaceViewEditorElement as element };
22+
23+
declare global {
24+
interface HTMLElementTagNameMap {
25+
[elementName]: UmbFolderCollectionWorkspaceViewEditorElement;
26+
}
27+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE } from '../../../entity.js';
2+
import { UMB_DOCUMENT_TYPE_FOLDER_WORKSPACE_ALIAS } from './constants.js';
3+
4+
export const manifests: Array<UmbExtensionManifest> = [
5+
{
6+
type: 'workspace',
7+
kind: 'default',
8+
alias: UMB_DOCUMENT_TYPE_FOLDER_WORKSPACE_ALIAS,
9+
name: 'Document Type Folder Workspace',
10+
meta: {
11+
entityType: UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE,
12+
},
13+
},
14+
{
15+
type: 'workspaceView',
16+
//kind: 'folderCollection',
17+
alias: 'Umb.WorkspaceView.DocumentType.FolderCollection',
18+
name: 'Document Type Folder Collection Workspace View',
19+
element: () => import('./folder-collection-workspace-view.element.js'),
20+
meta: {
21+
pathname: 'folder',
22+
label: 'Folder',
23+
icon: 'folder',
24+
},
25+
conditions: [
26+
{
27+
alias: 'Umb.Condition.WorkspaceAlias',
28+
match: UMB_DOCUMENT_TYPE_FOLDER_WORKSPACE_ALIAS,
29+
},
30+
],
31+
},
32+
];

0 commit comments

Comments
 (0)