investigation clean up
This commit is contained in:
@@ -111,8 +111,6 @@ export class UmbModalRouteRegistration<UmbModalTokenData extends object = object
|
||||
};
|
||||
|
||||
routeSetup(router: IRouterSlot, modalContext: UmbModalContext, params: Params) {
|
||||
console.log('routeSetup', this.active);
|
||||
|
||||
// If already open, don't do anything:
|
||||
if (this.active) return;
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import '../../src/packages/search/search-modal/search-modal.element';
|
||||
|
||||
import type { UUIModalDialogElement, UUIModalSidebarSize } from '@umbraco-ui/uui';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { appendToFrozenArray } from '../observable-api';
|
||||
import { UmbModalHandler, UmbModalHandlerClass } from './modal-handler';
|
||||
import type { UmbModalToken } from './token/modal-token';
|
||||
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
||||
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { appendToFrozenArray } from '../observable-api';
|
||||
|
||||
export type UmbModalType = 'dialog' | 'sidebar';
|
||||
|
||||
|
||||
@@ -98,10 +98,8 @@ export class UmbRouteContext {
|
||||
public _internal_modalRouterChanged(activeModalPath: string | undefined) {
|
||||
if (this.#activeModalPath === activeModalPath) return;
|
||||
if (this.#activeModalPath) {
|
||||
console.log('_internal_modalRouterChanged', this.#activeModalPath);
|
||||
// If if there is a modal using the old path.
|
||||
const activeModal = this.#modalRegistrations.find((registration) => {
|
||||
console.log('/' + registration.generateModalPath(), ' === ', this.#activeModalPath);
|
||||
return '/' + registration.generateModalPath() === this.#activeModalPath;
|
||||
});
|
||||
if (activeModal) {
|
||||
|
||||
@@ -47,9 +47,6 @@ export class UmbBackofficeMainElement extends UmbLitElement {
|
||||
private _createRoutes() {
|
||||
if (!this._sections) return;
|
||||
|
||||
//if (this._sections.length < 8) return;
|
||||
console.log('€€€€ create routes', this._sections);
|
||||
|
||||
// TODO: Refactor this for re-use across the app where the routes are re-generated at any time.
|
||||
this._routes = this._sections.map((section) => {
|
||||
const path = this._routePrefix + section.meta.pathname;
|
||||
@@ -61,7 +58,6 @@ export class UmbBackofficeMainElement extends UmbLitElement {
|
||||
path: path,
|
||||
component: () => createExtensionElementOrFallback(section, 'umb-section-default'),
|
||||
setup: (component) => {
|
||||
console.log('€€€€ setup route', this._routePrefix + section.meta.pathname);
|
||||
(component as UmbSectionExtensionElement).manifest = section;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -29,8 +29,6 @@ export class UmbDocumentTypeWorkspaceEditorElement extends UmbLitElement {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
console.log('#### constructor workspace editor...');
|
||||
|
||||
this.consumeContext(UMB_ENTITY_WORKSPACE_CONTEXT, (instance) => {
|
||||
this.#workspaceContext = instance as UmbDocumentTypeWorkspaceContext;
|
||||
this.#observeDocumentType();
|
||||
|
||||
@@ -24,12 +24,6 @@ export class UmbDocumentTypeWorkspaceElement extends UmbLitElement {
|
||||
},
|
||||
];
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
console.log('!!## constructor workspace element!');
|
||||
}
|
||||
|
||||
render() {
|
||||
return html` <umb-router-slot .routes=${this._routes}></umb-router-slot> `;
|
||||
}
|
||||
|
||||
@@ -89,8 +89,6 @@ export class UmbDocumentTypeWorkspaceViewEditPropertiesElement extends UmbLitEle
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
console.log('#### constructor properties...');
|
||||
|
||||
this.consumeContext(UMB_ENTITY_WORKSPACE_CONTEXT, (workspaceContext) => {
|
||||
this._propertyStructureHelper.setStructureManager(
|
||||
(workspaceContext as UmbDocumentTypeWorkspaceContext).structure
|
||||
|
||||
@@ -48,13 +48,10 @@ export class UmbDocumentTypeWorkspacePropertyElement extends UmbLitElement {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
console.log('### constructor');
|
||||
|
||||
const rnd = Math.random();
|
||||
this.#modalRegistration = new UmbModalRouteRegistrationController(this, UMB_PROPERTY_SETTINGS_MODAL)
|
||||
.addUniquePaths(['propertyId'])
|
||||
.onSetup(() => {
|
||||
console.log('UMB_PROPERTY_SETTINGS_MODAL setup!', this.#modalRegistration, rnd);
|
||||
return this.property ?? false;
|
||||
})
|
||||
.onSubmit((result) => {
|
||||
|
||||
@@ -39,8 +39,6 @@ export class UmbDocumentTypeWorkspaceViewEditElement
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
console.log('#### constructor edit...');
|
||||
|
||||
this._tabsStructureHelper.setIsRoot(true);
|
||||
this._tabsStructureHelper.setContainerChildType('Tab');
|
||||
this.observe(this._tabsStructureHelper.containers, (tabs) => {
|
||||
|
||||
Reference in New Issue
Block a user