diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/manifests.ts index 2dc8908f62..b3bbbe403f 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/manifests.ts @@ -1,4 +1,5 @@ import { UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE } from '../../entity.js'; +import { manifests as workspaceManifests } from './workspace/manifests.js'; export const UMB_DOCUMENT_TYPE_FOLDER_REPOSITORY_ALIAS = 'Umb.Repository.DocumentType.Folder'; @@ -29,4 +30,5 @@ export const manifests: Array = [ folderRepositoryAlias: UMB_DOCUMENT_TYPE_FOLDER_REPOSITORY_ALIAS, }, }, + ...workspaceManifests, ]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/workspace/constants.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/workspace/constants.ts new file mode 100644 index 0000000000..5e55ac794e --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/workspace/constants.ts @@ -0,0 +1 @@ +export const UMB_DOCUMENT_TYPE_FOLDER_WORKSPACE_ALIAS = 'Umb.Workspace.DocumentType.Folder'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/workspace/folder-collection-workspace-view.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/workspace/folder-collection-workspace-view.element.ts new file mode 100644 index 0000000000..12c30db57d --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/workspace/folder-collection-workspace-view.element.ts @@ -0,0 +1,27 @@ +import { UmbDocumentTypeTreeRepository } from '../../document-type-tree.repository.js'; +import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; +import { css, html, customElement } from '@umbraco-cms/backoffice/external/lit'; + +const elementName = 'umb-folder-collection-workspace-view'; +@customElement(elementName) +export class UmbFolderCollectionWorkspaceViewEditorElement extends UmbLitElement { + #treeRepository = new UmbDocumentTypeTreeRepository(this); + + constructor() { + super(); + } + + override render() { + return html`
Some Collection
`; + } + + static override styles = [css``]; +} + +export { UmbFolderCollectionWorkspaceViewEditorElement as element }; + +declare global { + interface HTMLElementTagNameMap { + [elementName]: UmbFolderCollectionWorkspaceViewEditorElement; + } +} diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/workspace/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/workspace/manifests.ts new file mode 100644 index 0000000000..28a5ef2fae --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/tree/folder/workspace/manifests.ts @@ -0,0 +1,32 @@ +import { UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE } from '../../../entity.js'; +import { UMB_DOCUMENT_TYPE_FOLDER_WORKSPACE_ALIAS } from './constants.js'; + +export const manifests: Array = [ + { + type: 'workspace', + kind: 'default', + alias: UMB_DOCUMENT_TYPE_FOLDER_WORKSPACE_ALIAS, + name: 'Document Type Folder Workspace', + meta: { + entityType: UMB_DOCUMENT_TYPE_FOLDER_ENTITY_TYPE, + }, + }, + { + type: 'workspaceView', + //kind: 'folderCollection', + alias: 'Umb.WorkspaceView.DocumentType.FolderCollection', + name: 'Document Type Folder Collection Workspace View', + element: () => import('./folder-collection-workspace-view.element.js'), + meta: { + pathname: 'folder', + label: 'Folder', + icon: 'folder', + }, + conditions: [ + { + alias: 'Umb.Condition.WorkspaceAlias', + match: UMB_DOCUMENT_TYPE_FOLDER_WORKSPACE_ALIAS, + }, + ], + }, +];