From c23dd3d4ea7b0654e0bcb4ecd14bb0ed8078ec97 Mon Sep 17 00:00:00 2001 From: Julia Gru <56249914+julczka@users.noreply.github.com> Date: Tue, 9 May 2023 13:55:59 +0200 Subject: [PATCH] Revert "move modal tokens to separate file" This reverts commit 4800d03fcd5dc1001dc93be377f6596148b3d62b. --- .../templating-insert-menu.element.ts | 9 ++++++-- .../insert-choose-type-sidebar.element.ts | 11 ++++++++-- .../insert-section-input.element.ts | 1 + .../insert-section-modal.element.ts | 5 +++-- .../templating/modals/modal-tokens.ts | 22 +------------------ 5 files changed, 21 insertions(+), 27 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/templating/components/insert-menu/templating-insert-menu.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/templating/components/insert-menu/templating-insert-menu.element.ts index c069ceb8b0..b9cf26f696 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/templating/components/insert-menu/templating-insert-menu.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/templating/components/insert-menu/templating-insert-menu.element.ts @@ -20,9 +20,14 @@ import { UmbPartialViewPickerModalResult, } from '@umbraco-cms/backoffice/modal'; import { UmbLitElement } from '@umbraco-cms/internal/lit-element'; -import { UMB_MODAL_TEMPLATING_INSERT_CHOOSE_TYPE_SIDEBAR_MODAL } from '../../modals/modal-tokens'; - +export const UMB_MODAL_TEMPLATING_INSERT_CHOOSE_TYPE_SIDEBAR_MODAL = new UmbModalToken<{ hidePartialView: boolean }>( + UMB_MODAL_TEMPLATING_INSERT_CHOOSE_TYPE_SIDEBAR_ALIAS, + { + type: 'sidebar', + size: 'small', + } +); @customElement('umb-templating-insert-menu') export class UmbTemplatingInsertMenuElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-choose-type-sidebar.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-choose-type-sidebar.element.ts index 7d0578057c..e2bea884cb 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-choose-type-sidebar.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-choose-type-sidebar.element.ts @@ -1,18 +1,25 @@ import { UUITextStyles } from '@umbraco-ui/uui-css'; import { css, html } from 'lit'; import { customElement } from 'lit/decorators.js'; -import { UMB_MODAL_TEMPLATING_INSERT_FIELD_SIDEBAR_MODAL } from './modal-tokens'; +import { UMB_MODAL_TEMPLATING_INSERT_FIELD_SIDEBAR_ALIAS } from './manifests'; import { UmbModalBaseElement } from '@umbraco-cms/internal/modal'; import { UMB_MODAL_CONTEXT_TOKEN, UmbModalContext, + UmbModalToken, UMB_PARTIAL_VIEW_PICKER_MODAL, UmbModalHandler, UMB_DICTIONARY_ITEM_PICKER_MODAL, UmbDictionaryItemPickerModalResult, } from '@umbraco-cms/backoffice/modal'; - +export const UMB_MODAL_TEMPLATING_INSERT_FIELD_SIDEBAR_MODAL = new UmbModalToken( + UMB_MODAL_TEMPLATING_INSERT_FIELD_SIDEBAR_ALIAS, + { + type: 'sidebar', + size: 'small', + } +); export interface ChooseInsertTypeModalData { hidePartialViews?: boolean; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-section-modal/insert-section-input.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-section-modal/insert-section-input.element.ts index 10f8e43401..77910962ae 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-section-modal/insert-section-input.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-section-modal/insert-section-input.element.ts @@ -2,6 +2,7 @@ import { UUITextStyles } from '@umbraco-ui/uui-css'; import { css, html } from 'lit'; import { customElement, property, query } from 'lit/decorators.js'; import { UUIBooleanInputElement, UUIInputElement } from '@umbraco-ui/uui'; +import { getAddSectionSnippet, getRenderBodySnippet, getRenderSectionSnippet } from '../../utils'; @customElement('umb-insert-section-checkbox') export class UmbInsertSectionCheckboxElement extends UUIBooleanInputElement { diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-section-modal/insert-section-modal.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-section-modal/insert-section-modal.element.ts index 818d24171f..7f3bb25f16 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-section-modal/insert-section-modal.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/insert-section-modal/insert-section-modal.element.ts @@ -2,11 +2,12 @@ import { UUITextStyles } from '@umbraco-ui/uui-css'; import { css, html } from 'lit'; import { customElement, queryAll, state } from 'lit/decorators.js'; import { UMB_MODAL_TEMPLATING_INSERT_SECTION_SIDEBAR_ALIAS } from '../manifests'; -import { getAddSectionSnippet, getRenderBodySnippet, getRenderSectionSnippet } from '../../utils'; -import { UmbInsertSectionCheckboxElement } from './insert-section-input.element'; import { UmbModalBaseElement } from '@umbraco-cms/internal/modal'; import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; +import './insert-section-input.element'; +import UmbInsertSectionCheckboxElement from './insert-section-input.element'; +import { getAddSectionSnippet, getRenderBodySnippet, getRenderSectionSnippet } from '../../utils'; export const UMB_MODAL_TEMPLATING_INSERT_SECTION_MODAL = new UmbModalToken( UMB_MODAL_TEMPLATING_INSERT_SECTION_SIDEBAR_ALIAS, diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/modal-tokens.ts b/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/modal-tokens.ts index c9278d5ad1..84d366ca6c 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/modal-tokens.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/templating/modals/modal-tokens.ts @@ -1,21 +1 @@ -import { - UMB_MODAL_TEMPLATING_INSERT_CHOOSE_TYPE_SIDEBAR_ALIAS, - UMB_MODAL_TEMPLATING_INSERT_FIELD_SIDEBAR_ALIAS, -} from './manifests'; -import { UmbModalToken } from '@umbraco-cms/backoffice/modal'; - -export const UMB_MODAL_TEMPLATING_INSERT_CHOOSE_TYPE_SIDEBAR_MODAL = new UmbModalToken<{ hidePartialView: boolean }>( - UMB_MODAL_TEMPLATING_INSERT_CHOOSE_TYPE_SIDEBAR_ALIAS, - { - type: 'sidebar', - size: 'small', - } -); - -export const UMB_MODAL_TEMPLATING_INSERT_FIELD_SIDEBAR_MODAL = new UmbModalToken( - UMB_MODAL_TEMPLATING_INSERT_FIELD_SIDEBAR_ALIAS, - { - type: 'sidebar', - size: 'small', - } -); +//TODO: move tokens here nad import this file somewhere