From 07b9b2a677cb27ba708835485ac52cb9fc5d25ad Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 8 Mar 2023 19:55:39 +0100 Subject: [PATCH] register language picker --- .../libs/modal/layouts/modal-layout-picker-base.ts | 1 + src/Umbraco.Web.UI.Client/libs/modal/modal.context.ts | 2 +- .../src/backoffice/shared/modals/manifests.ts | 6 ++++++ .../backoffice/shared/modals/section-picker/indext.ts | 11 +++++++++++ .../section-picker/picker-layout-section.element.ts | 2 ++ 5 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/section-picker/indext.ts diff --git a/src/Umbraco.Web.UI.Client/libs/modal/layouts/modal-layout-picker-base.ts b/src/Umbraco.Web.UI.Client/libs/modal/layouts/modal-layout-picker-base.ts index 7c84bd0a43..c7a85b3748 100644 --- a/src/Umbraco.Web.UI.Client/libs/modal/layouts/modal-layout-picker-base.ts +++ b/src/Umbraco.Web.UI.Client/libs/modal/layouts/modal-layout-picker-base.ts @@ -1,5 +1,6 @@ import { property } from 'lit/decorators.js'; import { UmbModalLayoutElement } from '..'; +import './modal-layout.element'; export interface UmbPickerModalData { multiple: boolean; diff --git a/src/Umbraco.Web.UI.Client/libs/modal/modal.context.ts b/src/Umbraco.Web.UI.Client/libs/modal/modal.context.ts index 29acc52f4b..1f91be6846 100644 --- a/src/Umbraco.Web.UI.Client/libs/modal/modal.context.ts +++ b/src/Umbraco.Web.UI.Client/libs/modal/modal.context.ts @@ -1,6 +1,6 @@ import './layouts/property-editor-ui-picker/modal-layout-property-editor-ui-picker.element'; import '../../src/backoffice/settings/languages/modals/language-picker/language-picker-modal.element'; -import './layouts/search/modal-layout-search.element.ts'; +import './layouts/search/modal-layout-search.element'; import { UUIModalSidebarSize } from '@umbraco-ui/uui-modal-sidebar'; import { BehaviorSubject } from 'rxjs'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/manifests.ts index 52837950b0..04774330a8 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/manifests.ts @@ -25,6 +25,12 @@ const modals: Array = [ name: 'Link Picker Modal', loader: () => import('./link-picker/link-picker-modal.element'), }, + { + type: 'modal', + alias: 'Umb.Modal.SectionPicker', + name: 'Section Picker Modal', + loader: () => import('./section-picker/picker-layout-section.element'), + }, ]; export const manifests = [...modals]; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/section-picker/indext.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/section-picker/indext.ts new file mode 100644 index 0000000000..bb5fcad076 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/section-picker/indext.ts @@ -0,0 +1,11 @@ +import { UmbModalToken } from 'libs/modal'; + +export interface UmbSectionPickerModalData { + multiple: boolean; + selection: string[]; +} + +export const UMB_SECTION_PICKER_MODAL_TOKEN = new UmbModalToken('Umb.Modal.SectionPicker', { + type: 'sidebar', + size: 'small', +}); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/section-picker/picker-layout-section.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/section-picker/picker-layout-section.element.ts index 336235f581..a65f8c2099 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/section-picker/picker-layout-section.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/modals/section-picker/picker-layout-section.element.ts @@ -91,6 +91,8 @@ export class UmbPickerLayoutSectionElement extends UmbModalLayoutPickerBase