This commit is contained in:
Niels Lyngsø
2023-02-22 14:32:28 +01:00
parent 00c6af3b82
commit 48b8963f06

View File

@@ -53,8 +53,6 @@ export class UmbDocumentWorkspaceContext
#documentTypes = new ArrayState<DocumentTypeModel>([], (x) => x.key);
documentTypes = this.#documentTypes.asObservable();
mainDocumentType = this.#documentTypes.asObservable();
// Notice the DocumentTypePropertyTypeContainerModel is equivalent to PropertyTypeContainerViewModelBaseModel, making it easy to generalize.
#containers = new ArrayState<DocumentTypePropertyTypeContainerModel>([], (x) => x.key);
@@ -195,6 +193,8 @@ export class UmbDocumentWorkspaceContext
);
}
// TODO: Structure methods:
hasPropertyStructuresOf(containerKey: string | null) {
return this.#documentTypes.getObservablePart((docTypes) => {
return (
@@ -221,8 +221,6 @@ export class UmbDocumentWorkspaceContext
});
}
// TODO: Check what of these methods I ended actually using:
rootContainers(containerType: 'Group' | 'Tab') {
return this.#containers.getObservablePart((data) => {
return data.filter((x) => x.parentKey === null && x.type === containerType);