From 5f3f569a6e791324f8cb54409bf7092da1fdc89a Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Fri, 9 Sep 2022 15:42:53 +0200 Subject: [PATCH] update models --- .../src/backoffice/editors/data-type/data-type.context.ts | 8 ++++++-- .../editors/document-type/document-type.context.ts | 8 ++++++-- .../src/backoffice/editors/shared/node/node.context.ts | 8 +++++--- .../tree-context-menu-page-action-list.element.ts | 2 +- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/data-type.context.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/data-type.context.ts index a43a9026d7..2c23ebb6e9 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/data-type.context.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/data-type.context.ts @@ -3,10 +3,14 @@ import { DataTypeEntity } from '../../../mocks/data/data-type.data'; export class UmbDataTypeContext { // TODO: figure out how fine grained we want to make our observables. - private _data: BehaviorSubject = new BehaviorSubject({ - id: -1, + private _data = new BehaviorSubject({ key: '', name: '', + icon: '', + type: '', + hasChildren: false, + parentKey: '', + isTrashed: false, propertyEditorUIAlias: '', }); public readonly data: Observable = this._data.asObservable(); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/document-type/document-type.context.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/document-type/document-type.context.ts index aef036416b..a95a49f1b8 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/document-type/document-type.context.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/document-type/document-type.context.ts @@ -3,10 +3,14 @@ import { DocumentTypeEntity } from '../../../mocks/data/document-type.data'; export class UmbDocumentTypeContext { // TODO: figure out how fine grained we want to make our observables. - private _data: BehaviorSubject = new BehaviorSubject({ - id: -1, + private _data = new BehaviorSubject({ key: '', name: '', + icon: '', + type: '', + hasChildren: false, + parentKey: '', + isTrashed: false, alias: '', properties: [], }); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/shared/node/node.context.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/shared/node/node.context.ts index ca831214da..2901d8bd09 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/shared/node/node.context.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/shared/node/node.context.ts @@ -3,12 +3,14 @@ import { NodeEntity } from '../../../../mocks/data/node.data'; export class UmbNodeContext { // TODO: figure out how fine grained we want to make our observables. - private _data: BehaviorSubject = new BehaviorSubject({ - id: -1, + private _data = new BehaviorSubject({ key: '', name: '', - type: '', icon: '', + type: '', + hasChildren: false, + parentKey: '', + isTrashed: false, properties: [ { alias: '', diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/trees/shared/context-menu/tree-context-menu-page-action-list.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/trees/shared/context-menu/tree-context-menu-page-action-list.element.ts index 4675c2e7bd..4062329d38 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/trees/shared/context-menu/tree-context-menu-page-action-list.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/trees/shared/context-menu/tree-context-menu-page-action-list.element.ts @@ -67,7 +67,7 @@ export class UmbTreeContextMenuPageActionListElement extends UmbContextConsumerM this._treeItemActionsSubscription = this._extensionRegistry ?.extensionsOfType('treeItemAction') - .pipe(map((actions) => actions.filter((action) => action.meta.trees.includes(this._activeTree?.alias)))) + .pipe(map((actions) => actions.filter((action) => action.meta.trees.includes(this._activeTree?.alias || '')))) .subscribe((actions) => { this._actions = actions; });