From b37acb339fde4fafcde3fe5d3c458c2386cf3dcb Mon Sep 17 00:00:00 2001 From: Lone Iversen <108085781+loivsen@users.noreply.github.com> Date: Mon, 4 Mar 2024 11:41:35 +0100 Subject: [PATCH] Feature: Markdown Editor Package --- .../src/apps/backoffice/backoffice.element.ts | 1 + .../src/packages/core/property-editor/uis/manifests.ts | 2 -- .../src/packages/markdown-editor/components/index.ts | 1 + .../components/input-markdown-editor/index.ts | 0 .../input-markdown-editor/input-markdown.element.ts | 0 .../input-markdown-editor/input-markdown.stories.ts | 0 .../src/packages/markdown-editor/index.ts | 1 + .../src/packages/markdown-editor/manifests.ts | 3 +++ .../markdown-editor/property-editors/manifests.ts | 4 ++++ .../property-editors}/markdown-editor/manifests.ts | 0 .../property-editor-ui-markdown-editor.element.ts | 4 ++-- .../property-editor-ui-markdown-editor.stories.ts | 0 .../property-editor-ui-markdown-editor.test.ts | 0 .../src/packages/markdown-editor/umbraco-package.ts | 9 +++++++++ .../src/packages/tiny-mce/umbraco-package.ts | 4 ++-- 15 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/index.ts rename src/Umbraco.Web.UI.Client/src/packages/{core => markdown-editor}/components/input-markdown-editor/index.ts (100%) rename src/Umbraco.Web.UI.Client/src/packages/{core => markdown-editor}/components/input-markdown-editor/input-markdown.element.ts (100%) rename src/Umbraco.Web.UI.Client/src/packages/{core => markdown-editor}/components/input-markdown-editor/input-markdown.stories.ts (100%) create mode 100644 src/Umbraco.Web.UI.Client/src/packages/markdown-editor/index.ts create mode 100644 src/Umbraco.Web.UI.Client/src/packages/markdown-editor/manifests.ts create mode 100644 src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/manifests.ts rename src/Umbraco.Web.UI.Client/src/packages/{core/property-editor/uis => markdown-editor/property-editors}/markdown-editor/manifests.ts (100%) rename src/Umbraco.Web.UI.Client/src/packages/{core/property-editor/uis => markdown-editor/property-editors}/markdown-editor/property-editor-ui-markdown-editor.element.ts (90%) rename src/Umbraco.Web.UI.Client/src/packages/{core/property-editor/uis => markdown-editor/property-editors}/markdown-editor/property-editor-ui-markdown-editor.stories.ts (100%) rename src/Umbraco.Web.UI.Client/src/packages/{core/property-editor/uis => markdown-editor/property-editors}/markdown-editor/property-editor-ui-markdown-editor.test.ts (100%) create mode 100644 src/Umbraco.Web.UI.Client/src/packages/markdown-editor/umbraco-package.ts diff --git a/src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts b/src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts index 923ebbc225..51c2146779 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts @@ -22,6 +22,7 @@ const CORE_PACKAGES = [ import('../../packages/health-check/umbraco-package.js'), import('../../packages/language/umbraco-package.js'), import('../../packages/log-viewer/umbraco-package.js'), + import('../../packages/markdown-editor/umbraco-package.js'), import('../../packages/media/umbraco-package.js'), import('../../packages/members/umbraco-package.js'), import('../../packages/models-builder/umbraco-package.js'), diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/manifests.ts index caeaf5e4c8..56a9d0a8b1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/manifests.ts @@ -6,7 +6,6 @@ import { manifest as dropdown } from './dropdown/manifests.js'; import { manifest as eyeDropper } from './eye-dropper/manifests.js'; import { manifest as iconPicker } from './icon-picker/manifests.js'; import { manifest as label } from './label/manifests.js'; -import { manifest as markdownEditor } from './markdown-editor/manifests.js'; import { manifest as memberGroupPicker } from './member-group-picker/manifests.js'; import { manifest as memberPicker } from './member-picker/manifests.js'; import { manifest as multipleTextString } from './multiple-text-string/manifests.js'; @@ -36,7 +35,6 @@ export const manifests: Array = [ eyeDropper, iconPicker, label, - markdownEditor, memberGroupPicker, memberPicker, multipleTextString, diff --git a/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/index.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/index.ts new file mode 100644 index 0000000000..f215ea19db --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/index.ts @@ -0,0 +1 @@ +export * from './input-markdown-editor/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-markdown-editor/index.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/input-markdown-editor/index.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/components/input-markdown-editor/index.ts rename to src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/input-markdown-editor/index.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-markdown-editor/input-markdown.element.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/input-markdown-editor/input-markdown.element.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/components/input-markdown-editor/input-markdown.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/input-markdown-editor/input-markdown.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-markdown-editor/input-markdown.stories.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/input-markdown-editor/input-markdown.stories.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/components/input-markdown-editor/input-markdown.stories.ts rename to src/Umbraco.Web.UI.Client/src/packages/markdown-editor/components/input-markdown-editor/input-markdown.stories.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/index.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/index.ts new file mode 100644 index 0000000000..8a8c2711ca --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/index.ts @@ -0,0 +1 @@ +export * from './components/index.js'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/manifests.ts new file mode 100644 index 0000000000..81153a42ce --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/manifests.ts @@ -0,0 +1,3 @@ +import { manifests as propertyEditors } from './property-editors/manifests.js'; + +export const manifests = [...propertyEditors]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/manifests.ts new file mode 100644 index 0000000000..cbd2b41c49 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/manifests.ts @@ -0,0 +1,4 @@ +import { manifest as markdownManifest } from './markdown-editor/manifests.js'; +import type { ManifestPropertyEditorUi } from '@umbraco-cms/backoffice/extension-registry'; + +export const manifests: Array = [markdownManifest]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/markdown-editor/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/manifests.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/markdown-editor/manifests.ts rename to src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/manifests.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/markdown-editor/property-editor-ui-markdown-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.element.ts similarity index 90% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/markdown-editor/property-editor-ui-markdown-editor.element.ts rename to src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.element.ts index 16603a50b5..ebdc5796c3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/markdown-editor/property-editor-ui-markdown-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.element.ts @@ -1,5 +1,5 @@ -import type { UmbInputMarkdownElement } from '../../../components/input-markdown-editor/index.js'; -import '../../../components/input-markdown-editor/index.js'; +import type { UmbInputMarkdownElement } from '../../components/input-markdown-editor/index.js'; +import '../../components/input-markdown-editor/index.js'; import { html, customElement, property, state } from '@umbraco-cms/backoffice/external/lit'; import type { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/extension-registry'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/markdown-editor/property-editor-ui-markdown-editor.stories.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.stories.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/markdown-editor/property-editor-ui-markdown-editor.stories.ts rename to src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.stories.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/markdown-editor/property-editor-ui-markdown-editor.test.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.test.ts similarity index 100% rename from src/Umbraco.Web.UI.Client/src/packages/core/property-editor/uis/markdown-editor/property-editor-ui-markdown-editor.test.ts rename to src/Umbraco.Web.UI.Client/src/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.test.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/umbraco-package.ts b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/umbraco-package.ts new file mode 100644 index 0000000000..ded7b5d107 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/packages/markdown-editor/umbraco-package.ts @@ -0,0 +1,9 @@ +export const name = 'Umbraco.Core.MarkdownEditor'; +export const extensions = [ + { + name: 'Markdown Editor Bundle', + alias: 'Umb.Bundle.MarkdownEditor', + type: 'bundle', + js: () => import('./manifests.js'), + }, +]; diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiny-mce/umbraco-package.ts b/src/Umbraco.Web.UI.Client/src/packages/tiny-mce/umbraco-package.ts index 1ef4351731..d1f13b0a32 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiny-mce/umbraco-package.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiny-mce/umbraco-package.ts @@ -1,9 +1,9 @@ import './index.js'; -export const name = 'Umbraco.Core.UmbracoNews'; +export const name = 'Umbraco.Core.TinyMce'; export const extensions = [ { - name: 'Umbraco News Bundle', + name: 'TinyMce Bundle', alias: 'Umb.Bundle.TinyMce', type: 'bundle', js: () => import('./manifests.js'),