rename content editor to document editor

This commit is contained in:
Mads Rasmussen
2022-08-31 10:52:49 +02:00
parent a6f154bcfe
commit cb2162ebe8
4 changed files with 29 additions and 29 deletions

View File

@@ -1,20 +0,0 @@
import './editor-content.element';
import { Meta, Story } from '@storybook/web-components';
import { html } from 'lit-html';
import { data } from '../../../mocks/data/node.data';
import type { UmbEditorContentElement } from './editor-content.element';
export default {
title: 'Editors/Content',
component: 'umb-editor-content',
id: 'umb-editor-content',
} as Meta;
const documentNodes = data.filter((node) => node.type === 'document');
export const AAAOverview: Story<UmbEditorContentElement> = () =>
html` <umb-editor-content id="${documentNodes[0].id}"></umb-editor-content>`;
AAAOverview.storyName = 'Overview';

View File

@@ -4,8 +4,8 @@ import { customElement, property } from 'lit/decorators.js';
import '../shared/node/editor-node.element';
@customElement('umb-editor-content')
export class UmbEditorContentElement extends LitElement {
@customElement('umb-editor-document')
export class UmbEditorDocumentElement extends LitElement {
static styles = [
UUITextStyles,
css`
@@ -21,14 +21,14 @@ export class UmbEditorContentElement extends LitElement {
entityKey!: string;
render() {
return html`<umb-editor-node .entityKey=${this.entityKey} alias="Umb.Editor.Content"></umb-editor-node>`;
return html`<umb-editor-node .entityKey=${this.entityKey} alias="Umb.Editor.Document"></umb-editor-node>`;
}
}
export default UmbEditorContentElement;
export default UmbEditorDocumentElement;
declare global {
interface HTMLElementTagNameMap {
'umb-editor-content': UmbEditorContentElement;
'umb-editor-document': UmbEditorDocumentElement;
}
}

View File

@@ -0,0 +1,20 @@
import './editor-document.element';
import { Meta, Story } from '@storybook/web-components';
import { html } from 'lit-html';
import { data } from '../../../mocks/data/node.data';
import type { UmbEditorDocumentElement } from './editor-document.element';
export default {
title: 'Editors/Document',
component: 'umb-editor-document',
id: 'umb-editor-document',
} as Meta;
const documentNodes = data.filter((node) => node.type === 'document');
export const AAAOverview: Story<UmbEditorDocumentElement> = () =>
html` <umb-editor-document id="${documentNodes[0].id}"></umb-editor-document>`;
AAAOverview.storyName = 'Overview';

View File

@@ -159,7 +159,7 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
meta: {
// TODO: how do we want to filter where editor views are shown? https://our.umbraco.com/documentation/extending/Content-Apps/#setting-up-the-plugin
// this is a temp solution
editors: ['Umb.Editor.Content', 'Umb.Editor.Media'],
editors: ['Umb.Editor.Document', 'Umb.Editor.Media'],
pathname: 'content',
weight: 100,
icon: 'document',
@@ -174,7 +174,7 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
meta: {
// TODO: how do we want to filter where editor views are shown? https://our.umbraco.com/documentation/extending/Content-Apps/#setting-up-the-plugin
// this is a temp solution
editors: ['Umb.Editor.Content', 'Umb.Editor.Media'],
editors: ['Umb.Editor.Document', 'Umb.Editor.Media'],
pathname: 'info',
weight: 90,
icon: 'info',
@@ -380,9 +380,9 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
},
{
type: 'editor',
alias: 'Umb.Editor.Content',
alias: 'Umb.Editor.Document',
name: 'Content Editor',
loader: () => import('./backoffice/editors/content/editor-content.element'),
loader: () => import('./backoffice/editors/document/editor-document.element'),
meta: {
entityType: 'document',
},