Skip to content

Commit

Permalink
Merge pull request #2326 from umbraco/v15/fix/move-code-editor-modal
Browse files Browse the repository at this point in the history
  • Loading branch information
nielslyngsoe authored Sep 23, 2024
2 parents a9a933e + 374890f commit 7913ba9
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { UmbCodeEditorElement } from '../components/code-editor.element.js';
import type { UmbCodeEditorModalData, UmbCodeEditorModalValue } from './code-editor-modal.token.js';
import { css, html, ifDefined, customElement, query } from '@umbraco-cms/backoffice/external/lit';
import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal';
import type { UmbCodeEditorElement } from '@umbraco-cms/backoffice/code-editor';
import type { UmbCodeEditorModalData, UmbCodeEditorModalValue } from '@umbraco-cms/backoffice/modal';

import '@umbraco-cms/backoffice/code-editor';

const elementName = 'umb-code-editor-modal';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import '../confirm/confirm-modal.element.js';

import type { UmbCodeEditorModalData } from './code-editor-modal.token.js';
import type { Meta, Story } from '@storybook/web-components';
import { html } from '@umbraco-cms/backoffice/external/lit';
import type { UmbCodeEditorModalData } from '@umbraco-cms/backoffice/modal';

export default {
title: 'API/Modals/Layouts/Code Editor',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UmbModalToken } from './modal-token.js';
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';

// TODO => investigate why exporting CodeEditorLanguage in code-editor barrel
// causes the schema generation task to fail... For now, language property below
Expand Down
1 change: 1 addition & 0 deletions src/packages/code-editor/code-editor-modal/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './code-editor-modal.token.js';
8 changes: 8 additions & 0 deletions src/packages/code-editor/code-editor-modal/manifests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const manifests: Array<UmbExtensionManifest> = [
{
type: 'modal',
alias: 'Umb.Modal.CodeEditor',
name: 'Code Editor Modal',
element: () => import('./code-editor-modal.element.js'),
},
];
2 changes: 2 additions & 0 deletions src/packages/code-editor/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export * from './components/index.js';
export * from './models/index.js';
export * from './code-editor-modal/index.js';

export type { UmbCodeEditorController } from './code-editor.controller.js';

/**
Expand Down
3 changes: 2 additions & 1 deletion src/packages/code-editor/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { manifest as propertyEditorManifest } from './property-editor/manifests.js';
import { manifests as codeEditorModalManifests } from './code-editor-modal/manifests.js';

export const manifests: Array<UmbExtensionManifest> = [propertyEditorManifest];
export const manifests: Array<UmbExtensionManifest> = [propertyEditorManifest, ...codeEditorModalManifests];
6 changes: 0 additions & 6 deletions src/packages/core/modal/common/manifests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ export const manifests: Array<UmbExtensionManifest> = [
name: 'Confirm Modal',
element: () => import('./confirm/confirm-modal.element.js'),
},
{
type: 'modal',
alias: 'Umb.Modal.CodeEditor',
name: 'Code Editor Modal',
element: () => import('./code-editor/code-editor-modal.element.js'),
},
{
type: 'modal',
alias: 'Umb.Modal.EmbeddedMedia',
Expand Down
1 change: 0 additions & 1 deletion src/packages/core/modal/token/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './change-password-modal.token.js';
export * from './code-editor-modal.token.js';
export * from './confirm-modal.token.js';
export * from './debug-modal.token.js';
export * from './embedded-media-modal.token.js';
Expand Down
3 changes: 2 additions & 1 deletion src/packages/tiny-mce/plugins/tiny-mce-code-editor.plugin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { type TinyMcePluginArguments, UmbTinyMcePluginBase } from '../components/input-tiny-mce/tiny-mce-plugin.js';
import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api';
import { UMB_CODE_EDITOR_MODAL, UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
import { UMB_CODE_EDITOR_MODAL } from '@umbraco-cms/backoffice/code-editor';
import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';

export default class UmbTinyMceCodeEditorPlugin extends UmbTinyMcePluginBase {
constructor(args: TinyMcePluginArguments) {
Expand Down

0 comments on commit 7913ba9

Please sign in to comment.