From c3f007cbc19c6c59a62a333713e5f1cb8a0b38fa Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Mon, 30 Sep 2024 12:35:36 +0200 Subject: [PATCH 1/2] move extension files --- src/packages/core/extension-registry/models/index.ts | 3 --- src/packages/tiny-mce/index.ts | 1 + src/packages/tiny-mce/plugins/index.ts | 1 + .../plugins/tinymce-plugin.extension.ts} | 6 ++++++ 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 src/packages/tiny-mce/plugins/index.ts rename src/packages/{core/extension-registry/models/tinymce-plugin.model.ts => tiny-mce/plugins/tinymce-plugin.extension.ts} (95%) diff --git a/src/packages/core/extension-registry/models/index.ts b/src/packages/core/extension-registry/models/index.ts index 5888fef920..61ce631d0c 100644 --- a/src/packages/core/extension-registry/models/index.ts +++ b/src/packages/core/extension-registry/models/index.ts @@ -4,7 +4,6 @@ import type { ManifestDynamicRootOrigin, ManifestDynamicRootQueryStep } from './ import type { ManifestFileUploadPreview } from './file-upload-preview.model.js'; import type { ManifestExternalLoginProvider } from './external-login-provider.model.js'; import type { ManifestHealthCheck } from './health-check.model.js'; -import type { ManifestTinyMcePlugin } from './tinymce-plugin.model.js'; import type { ManifestUfmComponent } from './ufm-component.model.js'; import type { ManifestUfmFilter } from './ufm-filter.model.js'; import type { ManifestUserProfileApp } from './user-profile-app.model.js'; @@ -23,7 +22,6 @@ export type * from './mfa-login-provider.model.js'; export type * from './monaco-markdown-editor-action.model.js'; export type * from './mfa-login-provider.model.js'; export type * from './monaco-markdown-editor-action.model.js'; -export type * from './tinymce-plugin.model.js'; export type * from './ufm-component.model.js'; export type * from './ufm-filter.model.js'; export type * from './user-granular-permission.model.js'; @@ -43,7 +41,6 @@ export type ManifestTypes = | ManifestHealthCheck | ManifestMfaLoginProvider | ManifestMonacoMarkdownEditorAction - | ManifestTinyMcePlugin | ManifestUfmComponent | ManifestUfmFilter | ManifestUserProfileApp diff --git a/src/packages/tiny-mce/index.ts b/src/packages/tiny-mce/index.ts index 97c9d86639..d303eda538 100644 --- a/src/packages/tiny-mce/index.ts +++ b/src/packages/tiny-mce/index.ts @@ -1,2 +1,3 @@ export * from './components/index.js'; export * from './modals/index.js'; +export * from './plugins/index.js'; diff --git a/src/packages/tiny-mce/plugins/index.ts b/src/packages/tiny-mce/plugins/index.ts new file mode 100644 index 0000000000..0040736266 --- /dev/null +++ b/src/packages/tiny-mce/plugins/index.ts @@ -0,0 +1 @@ +export * from './tinymce-plugin.extension.js'; diff --git a/src/packages/core/extension-registry/models/tinymce-plugin.model.ts b/src/packages/tiny-mce/plugins/tinymce-plugin.extension.ts similarity index 95% rename from src/packages/core/extension-registry/models/tinymce-plugin.model.ts rename to src/packages/tiny-mce/plugins/tinymce-plugin.extension.ts index 01a891c48a..a4921daf05 100644 --- a/src/packages/core/extension-registry/models/tinymce-plugin.model.ts +++ b/src/packages/tiny-mce/plugins/tinymce-plugin.extension.ts @@ -53,3 +53,9 @@ export interface ManifestTinyMcePlugin extends ManifestApi type: 'tinyMcePlugin'; meta?: MetaTinyMcePlugin; } + +declare global { + interface UmbExtensionManifestMap { + umbTinyMcePlugin: ManifestTinyMcePlugin; + } +} From 5d329d984bea90b41928a6c548097387015417d7 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Mon, 30 Sep 2024 12:37:08 +0200 Subject: [PATCH 2/2] update imports --- .../components/input-tiny-mce/input-tiny-mce.element.ts | 3 ++- src/packages/tiny-mce/plugins/manifests.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/packages/tiny-mce/components/input-tiny-mce/input-tiny-mce.element.ts b/src/packages/tiny-mce/components/input-tiny-mce/input-tiny-mce.element.ts index 8e8f81cafa..87601bc0a2 100644 --- a/src/packages/tiny-mce/components/input-tiny-mce/input-tiny-mce.element.ts +++ b/src/packages/tiny-mce/components/input-tiny-mce/input-tiny-mce.element.ts @@ -6,7 +6,7 @@ import type { UmbTinyMcePluginBase } from './tiny-mce-plugin.js'; import { type ClassConstructor, loadManifestApi } from '@umbraco-cms/backoffice/extension-api'; import { css, customElement, html, property, query } from '@umbraco-cms/backoffice/external/lit'; import { getProcessedImageUrl, umbDeepMerge } from '@umbraco-cms/backoffice/utils'; -import { type ManifestTinyMcePlugin, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; +import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; import { UmbChangeEvent } from '@umbraco-cms/backoffice/event'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbStylesheetDetailRepository, UmbStylesheetRuleManager } from '@umbraco-cms/backoffice/stylesheet'; @@ -18,6 +18,7 @@ import { renderEditor, } from '@umbraco-cms/backoffice/external/tinymce'; import type { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor'; +import type { ManifestTinyMcePlugin } from '@umbraco-cms/backoffice/tiny-mce'; /** * Handles the resize event diff --git a/src/packages/tiny-mce/plugins/manifests.ts b/src/packages/tiny-mce/plugins/manifests.ts index f257fa8226..33397db3ae 100644 --- a/src/packages/tiny-mce/plugins/manifests.ts +++ b/src/packages/tiny-mce/plugins/manifests.ts @@ -1,4 +1,4 @@ -import type { ManifestTinyMcePlugin } from '@umbraco-cms/backoffice/extension-registry'; +import type { ManifestTinyMcePlugin } from './tinymce-plugin.extension.js'; export const manifests: Array = [ {