From a1cebcb5e0af00cce5920818134cade6c066d4be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 23 Mar 2023 21:37:28 +0100 Subject: [PATCH] debug-modal --- .../modal/token/debug-modal.token.ts} | 11 ++++------- .../shared/components/debug/debug.element.ts | 4 ++-- .../debug/modals/debug/debug-modal.element.ts | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) rename src/Umbraco.Web.UI.Client/{src/backoffice/shared/components/debug/modals/debug/index.ts => libs/modal/token/debug-modal.token.ts} (52%) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/modals/debug/index.ts b/src/Umbraco.Web.UI.Client/libs/modal/token/debug-modal.token.ts similarity index 52% rename from src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/modals/debug/index.ts rename to src/Umbraco.Web.UI.Client/libs/modal/token/debug-modal.token.ts index 760efebb80..7e3f797a38 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/modals/debug/index.ts +++ b/src/Umbraco.Web.UI.Client/libs/modal/token/debug-modal.token.ts @@ -5,10 +5,7 @@ export interface UmbContextDebuggerModalData { content: TemplateResult | string; } -export const UMB_CONTEXT_DEBUGGER_MODAL_TOKEN = new UmbModalToken( - 'Umb.Modal.ContextDebugger', - { - type: 'sidebar', - size: 'small', - } -); +export const UMB_CONTEXT_DEBUGGER_MODAL = new UmbModalToken('Umb.Modal.ContextDebugger', { + type: 'sidebar', + size: 'small', +}); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts index 128dbb33bb..6f26c559c2 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts @@ -1,7 +1,7 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { css, html, nothing, TemplateResult } from 'lit'; import { customElement, property, state } from 'lit/decorators.js'; -import { UMB_CONTEXT_DEBUGGER_MODAL_TOKEN } from './modals/debug'; +import { UMB_CONTEXT_DEBUGGER_MODAL } from '../../../../../libs/modal/token/debug-modal.token'; import { UmbContextDebugRequest } from '@umbraco-cms/backoffice/context-api'; import { UmbLitElement } from '@umbraco-cms/internal/lit-element'; import { UmbModalContext, UMB_MODAL_CONTEXT_TOKEN } from '@umbraco-cms/backoffice/modal'; @@ -107,7 +107,7 @@ export class UmbDebug extends UmbLitElement { } private _openDialog() { - this._modalContext?.open(UMB_CONTEXT_DEBUGGER_MODAL_TOKEN, { + this._modalContext?.open(UMB_CONTEXT_DEBUGGER_MODAL, { content: html`${this._renderContextAliases()}`, }); } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/modals/debug/debug-modal.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/modals/debug/debug-modal.element.ts index ba14f65b7a..a68255a98b 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/modals/debug/debug-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/modals/debug/debug-modal.element.ts @@ -1,7 +1,7 @@ import { css, html } from 'lit'; import { customElement } from 'lit/decorators.js'; import { UUITextStyles } from '@umbraco-ui/uui-css'; -import { UmbContextDebuggerModalData } from '.'; +import { UmbContextDebuggerModalData } from '../../../../../../../libs/modal/token/debug-modal.token'; import { UmbModalBaseElement } from '@umbraco-cms/internal/modal'; @customElement('umb-context-debugger-modal')