adjustments
This commit is contained in:
@@ -37,7 +37,7 @@ export class UmbInlineListBlockElement extends UmbLitElement {
|
||||
'observeContentUdi',
|
||||
);
|
||||
});
|
||||
this.observe(umbExtensionsRegistry.getByTypeAndAlias('workspace', UMB_BLOCK_WORKSPACE_ALIAS), (manifest) => {
|
||||
this.observe(umbExtensionsRegistry.byTypeAndAlias('workspace', UMB_BLOCK_WORKSPACE_ALIAS), (manifest) => {
|
||||
if (manifest) {
|
||||
createExtensionApi(manifest, [this, { manifest: manifest }]).then((context) => {
|
||||
if (context) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { UmbCollectionContext } from './types.js';
|
||||
import { customElement, html, property, state } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
import type { ManifestCollection} from '@umbraco-cms/backoffice/extension-registry';
|
||||
import type { ManifestCollection } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import { createExtensionApi, createExtensionElement } from '@umbraco-cms/backoffice/extension-api';
|
||||
|
||||
@@ -25,7 +25,7 @@ export class UmbCollectionElement extends UmbLitElement {
|
||||
#observeManifest() {
|
||||
if (!this._alias) return;
|
||||
this.observe(
|
||||
umbExtensionsRegistry.getByTypeAndAlias('collection', this._alias),
|
||||
umbExtensionsRegistry.byTypeAndAlias('collection', this._alias),
|
||||
async (manifest) => {
|
||||
if (!manifest) return;
|
||||
this.#manifest = manifest;
|
||||
|
||||
@@ -45,7 +45,7 @@ export class UmbPropertyTypeBasedPropertyElement extends UmbLitElement {
|
||||
if (!this._propertyEditorUiAlias && dataType?.editorAlias) {
|
||||
//use 'dataType.editorAlias' to look up the extension in the registry:
|
||||
this.observe(
|
||||
umbExtensionsRegistry.getByTypeAndAlias('propertyEditorSchema', dataType.editorAlias),
|
||||
umbExtensionsRegistry.byTypeAndAlias('propertyEditorSchema', dataType.editorAlias),
|
||||
(extension) => {
|
||||
if (!extension) return;
|
||||
this._propertyEditorUiAlias = extension?.meta.defaultPropertyEditorUiAlias;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { UmbDataTypeDetailRepository } from '../repository/detail/data-type-detail.repository.js';
|
||||
import type { UmbDataTypeDetailModel } from '../types.js';
|
||||
import type { UmbPropertyDatasetContext } from '@umbraco-cms/backoffice/property';
|
||||
import type {
|
||||
UmbInvariantableWorkspaceContextInterface} from '@umbraco-cms/backoffice/workspace';
|
||||
import type { UmbInvariantableWorkspaceContextInterface } from '@umbraco-cms/backoffice/workspace';
|
||||
import {
|
||||
UmbEditableWorkspaceContextBase,
|
||||
UmbInvariantWorkspacePropertyDatasetContext,
|
||||
@@ -17,10 +16,9 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { combineLatest, map } from '@umbraco-cms/backoffice/external/rxjs';
|
||||
import type {
|
||||
PropertyEditorConfigDefaultData,
|
||||
PropertyEditorConfigProperty} from '@umbraco-cms/backoffice/extension-registry';
|
||||
import {
|
||||
umbExtensionsRegistry,
|
||||
PropertyEditorConfigProperty,
|
||||
} from '@umbraco-cms/backoffice/extension-registry';
|
||||
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import { UMB_PROPERTY_EDITOR_SCHEMA_ALIAS_DEFAULT } from '@umbraco-cms/backoffice/property-editor';
|
||||
|
||||
export class UmbDataTypeWorkspaceContext
|
||||
@@ -102,7 +100,7 @@ export class UmbDataTypeWorkspaceContext
|
||||
|
||||
#setPropertyEditorSchemaConfig(propertyEditorSchemaAlias: string) {
|
||||
return this.observe(
|
||||
umbExtensionsRegistry.getByTypeAndAlias('propertyEditorSchema', propertyEditorSchemaAlias),
|
||||
umbExtensionsRegistry.byTypeAndAlias('propertyEditorSchema', propertyEditorSchemaAlias),
|
||||
(manifest) => {
|
||||
this._propertyEditorSchemaConfigProperties = manifest?.meta.settings?.properties || [];
|
||||
this._propertyEditorSchemaConfigDefaultData = manifest?.meta.settings?.defaultData || [];
|
||||
@@ -112,17 +110,14 @@ export class UmbDataTypeWorkspaceContext
|
||||
}
|
||||
|
||||
#setPropertyEditorUIConfig(propertyEditorUIAlias: string) {
|
||||
return this.observe(
|
||||
umbExtensionsRegistry.getByTypeAndAlias('propertyEditorUi', propertyEditorUIAlias),
|
||||
(manifest) => {
|
||||
this.#propertyEditorUiIcon.setValue(manifest?.meta.icon || null);
|
||||
this.#propertyEditorUiName.setValue(manifest?.name || null);
|
||||
return this.observe(umbExtensionsRegistry.byTypeAndAlias('propertyEditorUi', propertyEditorUIAlias), (manifest) => {
|
||||
this.#propertyEditorUiIcon.setValue(manifest?.meta.icon || null);
|
||||
this.#propertyEditorUiName.setValue(manifest?.name || null);
|
||||
|
||||
this._propertyEditorUISettingsSchemaAlias = manifest?.meta.propertyEditorSchemaAlias;
|
||||
this._propertyEditorUISettingsProperties = manifest?.meta.settings?.properties || [];
|
||||
this._propertyEditorUISettingsDefaultData = manifest?.meta.settings?.defaultData || [];
|
||||
},
|
||||
).asPromise();
|
||||
this._propertyEditorUISettingsSchemaAlias = manifest?.meta.propertyEditorSchemaAlias;
|
||||
this._propertyEditorUISettingsProperties = manifest?.meta.settings?.properties || [];
|
||||
this._propertyEditorUISettingsDefaultData = manifest?.meta.settings?.defaultData || [];
|
||||
}).asPromise();
|
||||
}
|
||||
|
||||
private _mergeConfigProperties() {
|
||||
|
||||
@@ -124,7 +124,7 @@ export class UmbModalElement extends UmbLitElement {
|
||||
#observeModal(alias: string) {
|
||||
this.#modalExtensionObserver?.destroy();
|
||||
|
||||
this.observe(umbExtensionsRegistry.getByTypeAndAlias('modal', alias), async (manifest) => {
|
||||
this.observe(umbExtensionsRegistry.byTypeAndAlias('modal', alias), async (manifest) => {
|
||||
this.#removeInnerElement();
|
||||
|
||||
if (manifest) {
|
||||
|
||||
@@ -131,7 +131,7 @@ export class UmbPropertyElement extends UmbLitElement {
|
||||
|
||||
private _observePropertyEditorUI() {
|
||||
this.observe(
|
||||
umbExtensionsRegistry.getByTypeAndAlias('propertyEditorUi', this._propertyEditorUiAlias),
|
||||
umbExtensionsRegistry.byTypeAndAlias('propertyEditorUi', this._propertyEditorUiAlias),
|
||||
(manifest) => {
|
||||
this._gotEditorUI(manifest);
|
||||
},
|
||||
|
||||
@@ -122,7 +122,7 @@ export class UmbTreeContextBase<TreeItemType extends UmbTreeItemModelBase>
|
||||
#observeTreeManifest() {
|
||||
if (this.#treeAlias) {
|
||||
this.observe(
|
||||
umbExtensionsRegistry.getByTypeAndAlias('tree', this.#treeAlias),
|
||||
umbExtensionsRegistry.byTypeAndAlias('tree', this.#treeAlias),
|
||||
async (treeManifest) => {
|
||||
if (!treeManifest) return;
|
||||
this.#observeRepository(treeManifest);
|
||||
|
||||
@@ -20,7 +20,7 @@ export class UmbRouterSlotElement extends UmbLitElement {
|
||||
#modalRouter: IRouterSlot = document.createElement('router-slot') as IRouterSlot;
|
||||
#listening = false;
|
||||
|
||||
@property()
|
||||
@property({ attribute: false })
|
||||
public get routes(): UmbRoute[] | undefined {
|
||||
return this.#router.routes;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ export class UmbRouterSlotElement extends UmbLitElement {
|
||||
}
|
||||
}
|
||||
|
||||
@property()
|
||||
@property({ attribute: false })
|
||||
public get parent(): IRouterSlot | null | undefined {
|
||||
return this.#router.parent;
|
||||
}
|
||||
@@ -103,6 +103,7 @@ export class UmbRouterSlotElement extends UmbLitElement {
|
||||
|
||||
const newActiveLocalPath = this.#router.match?.route.path;
|
||||
if (this._activeLocalPath !== newActiveLocalPath) {
|
||||
console.log('update', newActiveLocalPath);
|
||||
this._activeLocalPath = newActiveLocalPath;
|
||||
this.#routeContext._internal_routerGotActiveLocalPath(this._activeLocalPath);
|
||||
this.dispatchEvent(new UmbRouterSlotChangeEvent());
|
||||
@@ -116,6 +117,7 @@ export class UmbRouterSlotElement extends UmbLitElement {
|
||||
this.#routeContext._internal_routerGotActiveLocalPath(this._activeLocalPath);
|
||||
this.dispatchEvent(new UmbRouterSlotChangeEvent());
|
||||
} else if (event.detail.slot === this.#modalRouter) {
|
||||
console.log('modal navigation change', event.detail.match.route.path);
|
||||
const newActiveModalLocalPath = event.detail.match.route.path;
|
||||
this.#routeContext._internal_modalRouterChanged(newActiveModalLocalPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user