Skip to content

Commit 6603b9c

Browse files
committed
move code editor modal to code-editor module
1 parent 4385e9f commit 6603b9c

File tree

10 files changed

+19
-15
lines changed

10 files changed

+19
-15
lines changed

src/packages/core/modal/common/code-editor/code-editor-modal.element.ts renamed to src/packages/code-editor/code-editor-modal/code-editor-modal.element.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1+
import type { UmbCodeEditorElement } from '../components/code-editor.element.js';
2+
import type { UmbCodeEditorModalData, UmbCodeEditorModalValue } from './code-editor-modal.token.js';
13
import { css, html, ifDefined, customElement, query } from '@umbraco-cms/backoffice/external/lit';
24
import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal';
3-
import type { UmbCodeEditorElement } from '@umbraco-cms/backoffice/code-editor';
4-
import type { UmbCodeEditorModalData, UmbCodeEditorModalValue } from '@umbraco-cms/backoffice/modal';
5-
6-
import '@umbraco-cms/backoffice/code-editor';
75

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

src/packages/core/modal/common/code-editor/code-editor-modal.stories.ts renamed to src/packages/code-editor/code-editor-modal/code-editor-modal.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import '../confirm/confirm-modal.element.js';
22

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

77
export default {
88
title: 'API/Modals/Layouts/Code Editor',

src/packages/core/modal/token/code-editor-modal.token.ts renamed to src/packages/code-editor/code-editor-modal/code-editor-modal.token.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UmbModalToken } from './modal-token.js';
1+
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
22

33
// TODO => investigate why exporting CodeEditorLanguage in code-editor barrel
44
// causes the schema generation task to fail... For now, language property below
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './code-editor-modal.token.js';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export const manifests: Array<UmbExtensionManifest> = [
2+
{
3+
type: 'modal',
4+
alias: 'Umb.Modal.CodeEditor',
5+
name: 'Code Editor Modal',
6+
element: () => import('./code-editor-modal.element.js'),
7+
},
8+
];

src/packages/code-editor/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
export * from './components/index.js';
22
export * from './models/index.js';
3+
export * from './code-editor-modal/index.js';
4+
35
export type { UmbCodeEditorController } from './code-editor.controller.js';
46

57
/**

src/packages/code-editor/manifests.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
import { manifest as propertyEditorManifest } from './property-editor/manifests.js';
2+
import { manifests as codeEditorModalManifests } from './code-editor-modal/manifests.js';
23

3-
export const manifests: Array<UmbExtensionManifest> = [propertyEditorManifest];
4+
export const manifests: Array<UmbExtensionManifest> = [propertyEditorManifest, ...codeEditorModalManifests];

src/packages/core/modal/common/manifests.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ export const manifests: Array<UmbExtensionManifest> = [
55
name: 'Confirm Modal',
66
element: () => import('./confirm/confirm-modal.element.js'),
77
},
8-
{
9-
type: 'modal',
10-
alias: 'Umb.Modal.CodeEditor',
11-
name: 'Code Editor Modal',
12-
element: () => import('./code-editor/code-editor-modal.element.js'),
13-
},
148
{
159
type: 'modal',
1610
alias: 'Umb.Modal.EmbeddedMedia',

src/packages/core/modal/token/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from './change-password-modal.token.js';
2-
export * from './code-editor-modal.token.js';
32
export * from './confirm-modal.token.js';
43
export * from './debug-modal.token.js';
54
export * from './embedded-media-modal.token.js';

src/packages/tiny-mce/plugins/tiny-mce-code-editor.plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { type TinyMcePluginArguments, UmbTinyMcePluginBase } from '../components/input-tiny-mce/tiny-mce-plugin.js';
22
import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api';
3-
import { UMB_CODE_EDITOR_MODAL, UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
3+
import { UMB_CODE_EDITOR_MODAL } from '@umbraco-cms/backoffice/code-editor';
4+
import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
45

56
export default class UmbTinyMceCodeEditorPlugin extends UmbTinyMcePluginBase {
67
constructor(args: TinyMcePluginArguments) {

0 commit comments

Comments
 (0)