Wired up the Document Blueprint root route
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { UMB_DOCUMENT_BLUEPRINT_ENTITY_TYPE } from '../entity.js';
|
||||
import type { UmbDocumentBlueprintTreeItemModel } from './types.js';
|
||||
import type { UmbTreeChildrenOfRequestArgs, UmbTreeRootItemsRequestArgs } from '@umbraco-cms/backoffice/tree';
|
||||
import type {
|
||||
UmbTreeAncestorsOfRequestArgs,
|
||||
UmbTreeChildrenOfRequestArgs,
|
||||
UmbTreeRootItemsRequestArgs,
|
||||
} from '@umbraco-cms/backoffice/tree';
|
||||
import { UmbTreeServerDataSourceBase } from '@umbraco-cms/backoffice/tree';
|
||||
import type {
|
||||
DocumentBlueprintTreeItemResponseModel,
|
||||
@@ -28,6 +32,7 @@ export class UmbDocumentBlueprintTreeServerDataSource extends UmbTreeServerDataS
|
||||
super(host, {
|
||||
getRootItems,
|
||||
getChildrenOf,
|
||||
getAncestorsOf,
|
||||
mapper,
|
||||
});
|
||||
}
|
||||
@@ -51,6 +56,10 @@ const getChildrenOf = (args: UmbTreeChildrenOfRequestArgs) => {
|
||||
}
|
||||
};
|
||||
|
||||
const getAncestorsOf = (args: UmbTreeAncestorsOfRequestArgs) => {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
const mapper = (item: DocumentBlueprintTreeItemResponseModel): UmbDocumentBlueprintTreeItemModel => {
|
||||
//TODO remove temp hack when api endpoints are fixed
|
||||
const hack = item as Partial<DocumentTreeItemResponseModel>;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { UmbDocumentBlueprintEntityType, UmbDocumentBlueprintFolderEntityType } from '../entity.js';
|
||||
import type { UmbUniqueTreeItemModel, UmbUniqueTreeRootModel } from '@umbraco-cms/backoffice/tree';
|
||||
|
||||
export interface UmbDocumentBlueprintTreeRootModel extends UmbUniqueTreeRootModel {}
|
||||
|
||||
export interface UmbDocumentBlueprintTreeItemModel extends UmbUniqueTreeItemModel {
|
||||
entityType: UmbDocumentBlueprintEntityType | UmbDocumentBlueprintFolderEntityType;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export class UmbDocumentBlueprintRootWorkspaceElement extends UmbLitElement {
|
||||
];
|
||||
}
|
||||
|
||||
export { UmbDocumentBlueprintRootWorkspaceElement as element };
|
||||
export default UmbDocumentBlueprintRootWorkspaceElement;
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
|
||||
@@ -129,6 +129,10 @@ export class UmbDocumentBlueprintWorkspaceContext
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'edit/null',
|
||||
component: () => import('./document-blueprint-root-workspace.element.js'),
|
||||
},
|
||||
{
|
||||
path: 'edit/:unique',
|
||||
component: () => import('./document-blueprint-workspace-editor.element.js'),
|
||||
|
||||
Reference in New Issue
Block a user