This commit is contained in:
Niels Lyngsø
2024-01-16 14:15:24 +01:00
parent 988e49fc43
commit 328dd20a6d
3 changed files with 2 additions and 11 deletions

View File

@@ -1,19 +1,11 @@
import { UMB_BLOCK_WORKSPACE_CONTEXT } from './block-workspace.context.js';
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
import { customElement, css, html, state, property } from '@umbraco-cms/backoffice/external/lit';
import { customElement, css, html, property } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
import { UmbRepositoryItemsManager } from '@umbraco-cms/backoffice/repository';
import { DOCUMENT_TYPE_ITEM_REPOSITORY_ALIAS, UmbDocumentTypeItemModel } from '@umbraco-cms/backoffice/document-type';
@customElement('umb-block-workspace-editor')
export class UmbBlockWorkspaceEditorElement extends UmbLitElement {
//
#itemManager = new UmbRepositoryItemsManager<UmbDocumentTypeItemModel>(
this,
DOCUMENT_TYPE_ITEM_REPOSITORY_ALIAS,
(x) => x.id,
);
#workspaceContext?: typeof UMB_BLOCK_WORKSPACE_CONTEXT.TYPE;
@property({ type: String, attribute: false })

View File

@@ -43,7 +43,7 @@ export class UmbBlockWorkspaceContext<LayoutDataType extends UmbBlockLayoutBaseM
constructor(host: UmbControllerHost, workspaceArgs: { manifest: ManifestWorkspace }) {
// TODO: We don't need a repo here, so maybe we should not require this of the UmbEditableWorkspaceContextBase
super(host, 'Umb.Workspace.Block');
super(host, workspaceArgs.manifest.alias);
this.#entityType = workspaceArgs.manifest.meta?.entityType;
this.workspaceAlias = workspaceArgs.manifest.alias;
}

View File

@@ -96,7 +96,6 @@ export class UmbPropertyContext<ValueType = any> extends UmbBaseController {
this._observePropertyValue?.destroy();
if (subject) {
this._observePropertyValue = this.observe(subject, (value) => {
// Note: Do not try to compare new / old value, as it can of any type. We trust the UmbObjectState in doing such.
this.#value.next(value);
});
}