Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: move code editor modal #2326

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading