workspaceView rename to workspaceEditorView
This commit is contained in:
@@ -2,7 +2,7 @@ import type { UmbWorkspaceEditorViewExtensionElement } from '../interfaces/works
|
||||
import type { ManifestWithView } from '.';
|
||||
|
||||
export interface ManifestWorkspaceEditorView extends ManifestWithView<UmbWorkspaceEditorViewExtensionElement> {
|
||||
type: 'workspaceView';
|
||||
type: 'workspaceEditorView';
|
||||
conditions: ConditionsWorkspaceView;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ const workspace: ManifestWorkspace = {
|
||||
},
|
||||
};
|
||||
|
||||
const workspaceViews: Array<ManifestWorkspaceEditorView> = [];
|
||||
const workspaceEditorViews: Array<ManifestWorkspaceEditorView> = [];
|
||||
const workspaceActions: Array<ManifestWorkspaceAction> = [];
|
||||
|
||||
export const manifests = [workspace, ...workspaceViews, ...workspaceActions];
|
||||
export const manifests = [workspace, ...workspaceEditorViews, ...workspaceActions];
|
||||
|
||||
@@ -83,7 +83,7 @@ export class UmbDocumentTypeWorkspaceEditorElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout alias="Umb.Workspace.DocumentType">
|
||||
<umb-workspace-editor alias="Umb.Workspace.DocumentType">
|
||||
<div id="header" slot="header">
|
||||
<uui-button id="icon" @click=${this._handleIconClick} compact>
|
||||
<uui-icon name="${this._icon}" style="color: ${this._iconColorAlias}"></uui-icon>
|
||||
@@ -108,7 +108,7 @@ export class UmbDocumentTypeWorkspaceEditorElement extends UmbLitElement {
|
||||
</uui-keyboard-shortcut>
|
||||
</uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ const workspace: ManifestWorkspace = {
|
||||
},
|
||||
};
|
||||
|
||||
const workspaceViews: Array<ManifestWorkspaceEditorView> = [
|
||||
const workspaceEditorViews: Array<ManifestWorkspaceEditorView> = [
|
||||
{
|
||||
type: 'workspaceEditorView',
|
||||
alias: 'Umb.WorkspaceView.DocumentType.Design',
|
||||
@@ -95,4 +95,4 @@ const workspaceActions: Array<ManifestWorkspaceAction> = [
|
||||
},
|
||||
];
|
||||
|
||||
export const manifests = [workspace, ...workspaceViews, ...workspaceActions];
|
||||
export const manifests = [workspace, ...workspaceEditorViews, ...workspaceActions];
|
||||
|
||||
@@ -11,7 +11,7 @@ export class UmbDocumentPickerModalElement extends UmbModalBaseElement<
|
||||
UmbDocumentPickerModalData,
|
||||
UmbDocumentPickerModalResult
|
||||
> {
|
||||
|
||||
|
||||
|
||||
@state()
|
||||
_selection: Array<string> = [];
|
||||
@@ -42,7 +42,7 @@ export class UmbDocumentPickerModalElement extends UmbModalBaseElement<
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Select Content">
|
||||
<umb-workspace-editor headline="Select Content">
|
||||
<uui-box>
|
||||
<uui-input></uui-input>
|
||||
<hr />
|
||||
@@ -56,10 +56,10 @@ export class UmbDocumentPickerModalElement extends UmbModalBaseElement<
|
||||
<uui-button label="Close" @click=${this._close}></uui-button>
|
||||
<uui-button label="Submit" look="primary" color="positive" @click=${this._submit}></uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -11,7 +11,7 @@ export class UmbDocumentTypePickerModalElement extends UmbModalBaseElement<
|
||||
UmbDocumentTypePickerModalData,
|
||||
UmbDocumentTypePickerModalResult
|
||||
> {
|
||||
|
||||
|
||||
|
||||
@state()
|
||||
_selection: Array<string> = [];
|
||||
@@ -42,7 +42,7 @@ export class UmbDocumentTypePickerModalElement extends UmbModalBaseElement<
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Select Content">
|
||||
<umb-workspace-editor headline="Select Content">
|
||||
<uui-box>
|
||||
<uui-input></uui-input>
|
||||
<hr />
|
||||
@@ -56,10 +56,10 @@ export class UmbDocumentTypePickerModalElement extends UmbModalBaseElement<
|
||||
<uui-button label="Close" @click=${this._close}></uui-button>
|
||||
<uui-button label="Submit" look="primary" color="positive" @click=${this._submit}></uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -19,7 +19,7 @@ const workspace: ManifestWorkspace = {
|
||||
},
|
||||
};
|
||||
|
||||
const workspaceViews: Array<ManifestWorkspaceEditorView> = [
|
||||
const workspaceEditorViews: Array<ManifestWorkspaceEditorView> = [
|
||||
{
|
||||
type: 'workspaceEditorView',
|
||||
alias: 'Umb.WorkspaceView.Document.Edit',
|
||||
@@ -132,4 +132,4 @@ const workspaceActions: Array<ManifestWorkspaceAction> = [
|
||||
},
|
||||
];
|
||||
|
||||
export const manifests = [workspace, ...workspaceViews, ...workspaceViewCollections, ...workspaceActions];
|
||||
export const manifests = [workspace, ...workspaceEditorViews, ...workspaceViewCollections, ...workspaceActions];
|
||||
|
||||
@@ -8,7 +8,7 @@ import { UMB_ENTITY_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/context-ap
|
||||
|
||||
@customElement('umb-media-type-workspace-edit')
|
||||
export class UmbMediaTypeWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
@state()
|
||||
private _mediaTypeName?: string | null = '';
|
||||
@@ -42,11 +42,11 @@ export class UmbMediaTypeWorkspaceEditElement extends UmbLitElement {
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`<umb-workspace-layout alias="Umb.Workspace.MediaType">
|
||||
return html`<umb-workspace-editor alias="Umb.Workspace.MediaType">
|
||||
<uui-input id="header" slot="header" .value=${this._mediaTypeName} @input="${this.#handleInput}"></uui-input>
|
||||
</umb-workspace-layout>`;
|
||||
</umb-workspace-editor>`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -10,7 +10,7 @@ export class UmbMediaPickerModalElement extends UmbModalBaseElement<
|
||||
UmbMediaPickerModalData,
|
||||
UmbMediaPickerModalResult
|
||||
> {
|
||||
|
||||
|
||||
|
||||
@state()
|
||||
_selection: Array<string> = [];
|
||||
@@ -41,7 +41,7 @@ export class UmbMediaPickerModalElement extends UmbModalBaseElement<
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Select Content">
|
||||
<umb-workspace-editor headline="Select Content">
|
||||
<uui-box>
|
||||
<uui-input></uui-input>
|
||||
<hr />
|
||||
@@ -55,10 +55,10 @@ export class UmbMediaPickerModalElement extends UmbModalBaseElement<
|
||||
<uui-button label="Close" @click=${this._close}></uui-button>
|
||||
<uui-button label="Submit" look="primary" color="positive" @click=${this._submit}></uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -17,7 +17,7 @@ const workspace: ManifestWorkspace = {
|
||||
},
|
||||
};
|
||||
|
||||
const workspaceViews: Array<ManifestWorkspaceEditorView> = [
|
||||
const workspaceEditorViews: Array<ManifestWorkspaceEditorView> = [
|
||||
{
|
||||
type: 'workspaceEditorView',
|
||||
alias: 'Umb.WorkspaceView.Media.Edit',
|
||||
@@ -86,4 +86,4 @@ const workspaceActions: Array<ManifestWorkspaceAction> = [
|
||||
},
|
||||
];
|
||||
|
||||
export const manifests = [workspace, ...workspaceViews, ...workspaceViewCollections, ...workspaceActions];
|
||||
export const manifests = [workspace, ...workspaceEditorViews, ...workspaceViewCollections, ...workspaceActions];
|
||||
|
||||
@@ -7,7 +7,7 @@ import { UMB_ENTITY_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/context-ap
|
||||
|
||||
@customElement('umb-media-workspace-edit')
|
||||
export class UmbMediaWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
@state()
|
||||
_id?: string;
|
||||
@@ -30,15 +30,15 @@ export class UmbMediaWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
if (!this._id) return nothing;
|
||||
return html` <umb-workspace-layout alias="Umb.Workspace.Media">
|
||||
return html` <umb-workspace-editor alias="Umb.Workspace.Media">
|
||||
<div id="header" slot="header">TODO: MISSING INPUT COMPONENT</div>
|
||||
<umb-workspace-action-menu
|
||||
slot="action-menu"
|
||||
entity-type="media"
|
||||
unique="${this._id}"></umb-workspace-action-menu>
|
||||
</umb-workspace-layout>`;
|
||||
</umb-workspace-editor>`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -13,7 +13,7 @@ import { UMB_ENTITY_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/context-ap
|
||||
*/
|
||||
@customElement('umb-member-group-workspace-edit')
|
||||
export class UmbMemberGroupWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
#workspaceContext?: UmbWorkspaceMemberGroupContext;
|
||||
|
||||
@@ -46,13 +46,13 @@ export class UmbMemberGroupWorkspaceEditElement extends UmbLitElement {
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`<umb-workspace-layout alias="Umb.Workspace.MemberGroup">
|
||||
return html`<umb-workspace-editor alias="Umb.Workspace.MemberGroup">
|
||||
<div id="header" slot="header">
|
||||
<uui-input id="name" .value=${this._memberGroup?.name} @input="${this.#handleInput}"> </uui-input>
|
||||
</div>
|
||||
</umb-workspace-layout> `;
|
||||
</umb-workspace-editor> `;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -5,14 +5,14 @@ import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
|
||||
@customElement('umb-member-type-workspace-edit')
|
||||
export class UmbMemberTypeWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout alias="Umb.Workspace.MemberType"> Member Type Workspace </umb-workspace-layout>
|
||||
<umb-workspace-editor alias="Umb.Workspace.MemberType"> Member Type Workspace </umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -4,12 +4,12 @@ import { customElement } from 'lit/decorators.js';
|
||||
|
||||
@customElement('umb-member-workspace-edit')
|
||||
export class UmbMemberWorkspaceEditElement extends LitElement {
|
||||
|
||||
|
||||
|
||||
render() {
|
||||
return html` <umb-workspace-layout alias="Umb.Workspace.Member">Member Workspace</umb-workspace-layout> `;
|
||||
return html` <umb-workspace-editor alias="Umb.Workspace.Member">Member Workspace</umb-workspace-editor> `;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -13,7 +13,7 @@ import { UmbNotificationContext, UMB_NOTIFICATION_CONTEXT_TOKEN } from '@umbraco
|
||||
|
||||
@customElement('umb-workspace-package-builder')
|
||||
export class UmbWorkspacePackageBuilderElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
@property()
|
||||
entityId?: string;
|
||||
@@ -85,11 +85,11 @@ export class UmbWorkspacePackageBuilderElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout alias="Umb.Workspace.PackageBuilder">
|
||||
<umb-workspace-editor alias="Umb.Workspace.PackageBuilder">
|
||||
${this.#renderHeader()}
|
||||
<uui-box class="wrapper" headline="Package Content"> ${this.#renderEditors()} </uui-box>
|
||||
${this.#renderActions()}
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ export class UmbWorkspacePackageBuilderElement extends UmbLitElement {
|
||||
<umb-input-checkbox-list></umb-input-checkbox-list>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -4,7 +4,7 @@ import { customElement, property, state } from 'lit/decorators.js';
|
||||
|
||||
@customElement('umb-workspace-package')
|
||||
export class UmbWorkspacePackageElement extends LitElement {
|
||||
|
||||
|
||||
|
||||
@property()
|
||||
entityId?: string;
|
||||
@@ -40,9 +40,9 @@ export class UmbWorkspacePackageElement extends LitElement {
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`<umb-workspace-layout alias="Umb.Workspace.Package"> ${this._renderHeader()} </umb-workspace-layout> `;
|
||||
return html`<umb-workspace-editor alias="Umb.Workspace.Package"> ${this._renderHeader()} </umb-workspace-editor> `;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -52,9 +52,9 @@ export class UmbDataTypeWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout alias="Umb.Workspace.DataType">
|
||||
<umb-workspace-editor alias="Umb.Workspace.DataType">
|
||||
<uui-input slot="header" id="header" .value=${this._dataTypeName} @input="${this.#handleInput}"></uui-input>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export class UmbExtensionRootWorkspaceElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Extensions" alias="Umb.Workspace.ExtensionRoot" .enforceNoFooter=${true}>
|
||||
<umb-workspace-editor headline="Extensions" alias="Umb.Workspace.ExtensionRoot" .enforceNoFooter=${true}>
|
||||
<uui-box>
|
||||
<uui-table>
|
||||
<uui-table-head>
|
||||
@@ -91,7 +91,7 @@ export class UmbExtensionRootWorkspaceElement extends UmbLitElement {
|
||||
)}
|
||||
</uui-table>
|
||||
</uui-box>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { UMB_ENTITY_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/context-ap
|
||||
|
||||
@customElement('umb-language-workspace-edit')
|
||||
export class UmbLanguageWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
#workspaceContext?: UmbLanguageWorkspaceContext;
|
||||
|
||||
@@ -50,7 +50,7 @@ export class UmbLanguageWorkspaceEditElement extends UmbLitElement {
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`<umb-workspace-layout alias="Umb.Workspace.Language">
|
||||
return html`<umb-workspace-editor alias="Umb.Workspace.Language">
|
||||
<div id="header" slot="header">
|
||||
<uui-button label="Navigate back" href="section/settings/workspace/language-root" compact>
|
||||
<uui-icon name="umb:arrow-left"></uui-icon>
|
||||
@@ -66,9 +66,9 @@ export class UmbLanguageWorkspaceEditElement extends UmbLitElement {
|
||||
<a href="section/settings/workspace/language-root">Languages</a> /
|
||||
${this._isNew ? 'Create' : this._language?.name}
|
||||
</div>
|
||||
</umb-workspace-layout>`;
|
||||
</umb-workspace-editor>`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -13,7 +13,7 @@ import { UMB_ENTITY_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/context-ap
|
||||
*/
|
||||
@customElement('umb-relation-type-workspace-edit-element')
|
||||
export class UmbRelationTypeWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
#workspaceContext?: UmbRelationTypeWorkspaceContext;
|
||||
|
||||
@@ -47,16 +47,16 @@ export class UmbRelationTypeWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout alias="Umb.Workspace.RelationType">
|
||||
<umb-workspace-editor alias="Umb.Workspace.RelationType">
|
||||
<div id="header" slot="header">
|
||||
<uui-input id="name" .value=${this._relationType?.name} @input="${this._handleInput}">
|
||||
<div id="alias" slot="append">${this._relationType?.alias}</div>
|
||||
</uui-input>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -56,7 +56,7 @@ import './history/history-list.element';
|
||||
import './history/history-item.element';
|
||||
|
||||
import './workspace/workspace-action/workspace-action.element';
|
||||
import './workspace/workspace-layout/workspace-layout.element';
|
||||
import './workspace/workspace-editor/workspace-editor.element';
|
||||
import './workspace/workspace-footer/workspace-footer.element';
|
||||
|
||||
import './template-card/template-card.element';
|
||||
|
||||
@@ -17,7 +17,7 @@ import '../../extension-slot/extension-slot.element';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
|
||||
/**
|
||||
* @element umb-workspace-layout
|
||||
* @element umb-workspace-editor
|
||||
* @description
|
||||
* @slot icon - Slot for icon
|
||||
* @slot header - Slot for workspace header
|
||||
@@ -30,8 +30,8 @@ import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
* @extends {UmbLitElement}
|
||||
*/
|
||||
// TODO: stop naming this something with layout. as its not just an layout. it hooks up with extensions.
|
||||
@customElement('umb-workspace-layout')
|
||||
export class UmbWorkspaceLayoutElement extends UmbLitElement {
|
||||
@customElement('umb-workspace-editor')
|
||||
export class UmbWorkspaceEditorElement extends UmbLitElement {
|
||||
@property()
|
||||
public headline = '';
|
||||
|
||||
@@ -103,7 +103,7 @@ export class UmbWorkspaceLayoutElement extends UmbLitElement {
|
||||
component: () => {
|
||||
if (manifest.type === 'workspaceViewCollection') {
|
||||
return import(
|
||||
'../../../../shared/components/workspace/workspace-content/views/collection/workspace-view-collection.element'
|
||||
'../workspace-content/views/collection/workspace-view-collection.element'
|
||||
) as unknown as Promise<HTMLElement>;
|
||||
}
|
||||
return createExtensionElement(manifest);
|
||||
@@ -224,6 +224,6 @@ export class UmbWorkspaceLayoutElement extends UmbLitElement {
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'umb-workspace-layout': UmbWorkspaceLayoutElement;
|
||||
'umb-workspace-editor': UmbWorkspaceEditorElement;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
import './workspace-layout.element';
|
||||
import './workspace-editor.element';
|
||||
|
||||
import { Meta, Story } from '@storybook/web-components';
|
||||
import { html } from 'lit';
|
||||
|
||||
import type { UmbWorkspaceLayoutElement } from './workspace-layout.element';
|
||||
import type { UmbWorkspaceEditorElement } from './workspace-editor.element';
|
||||
|
||||
export default {
|
||||
title: 'Workspaces/Shared/Editor Entity Layout',
|
||||
component: 'umb-workspace-layout',
|
||||
id: 'umb-workspace-layout',
|
||||
title: 'Workspaces/Shared/Workspace Editor',
|
||||
component: 'umb-workspace-editor',
|
||||
id: 'umb-workspace-editor',
|
||||
} as Meta;
|
||||
|
||||
export const AAAOverview: Story<UmbWorkspaceLayoutElement> = () => html` <umb-workspace-layout>
|
||||
export const AAAOverview: Story<UmbWorkspaceEditorElement> = () => html` <umb-workspace-editor>
|
||||
<div slot="icon"><uui-button color="" look="placeholder">Icon slot</uui-button></div>
|
||||
<div slot="name"><uui-button color="" look="placeholder">Name slot</uui-button></div>
|
||||
<div slot="footer"><uui-button color="" look="placeholder">Footer slot</uui-button></div>
|
||||
<div slot="actions"><uui-button color="" look="placeholder">Actions slot</uui-button></div>
|
||||
<uui-button color="" look="placeholder">Default slot</uui-button>
|
||||
</umb-workspace-layout>`;
|
||||
</umb-workspace-editor>`;
|
||||
AAAOverview.storyName = 'Overview';
|
||||
@@ -1,4 +1,4 @@
|
||||
import '../workspace-layout/workspace-layout.element';
|
||||
import '../workspace-editor/workspace-editor.element';
|
||||
import './workspace-footer.element';
|
||||
|
||||
import { Meta, Story } from '@storybook/web-components';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
||||
import { css, html } from 'lit';
|
||||
import { customElement, property, state } from 'lit/decorators.js';
|
||||
|
||||
import '../workspace-layout/workspace-layout.element';
|
||||
import '../workspace-editor/workspace-editor.element';
|
||||
import '../../../../shared/components/variant-selector/variant-selector.element.ts';
|
||||
|
||||
// Lazy load
|
||||
@@ -18,8 +18,6 @@ import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
*/
|
||||
@customElement('umb-workspace-variant')
|
||||
export class UmbWorkspaceVariantContentElement extends UmbLitElement {
|
||||
|
||||
|
||||
// TODO: stop prop drilling this alias. Instead use the workspace context.
|
||||
@property()
|
||||
alias!: string;
|
||||
@@ -40,7 +38,7 @@ export class UmbWorkspaceVariantContentElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout
|
||||
<umb-workspace-editor
|
||||
.splitViewIndex=${this._splitViewIndex.toString()}
|
||||
alias=${this.alias}
|
||||
.hideNavigation=${!this.displayNavigation}
|
||||
@@ -52,10 +50,10 @@ export class UmbWorkspaceVariantContentElement extends UmbLitElement {
|
||||
? html`<umb-workspace-action-menu slot="action-menu"></umb-workspace-action-menu>`
|
||||
: ''}
|
||||
<slot name="action-menu" slot="action-menu"></slot>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -26,7 +26,7 @@ interface UmbEmbeddedMediaModalModel {
|
||||
|
||||
@customElement('umb-embedded-media-modal')
|
||||
export class UmbEmbeddedMediaModalElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
#loading = false;
|
||||
#embedResult!: OEmbedResult;
|
||||
@@ -164,7 +164,7 @@ export class UmbEmbeddedMediaModalElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Embed">
|
||||
<umb-workspace-editor headline="Embed">
|
||||
<uui-box>
|
||||
<umb-workspace-property-layout label="URL" orientation="vertical">
|
||||
<div slot="editor">
|
||||
@@ -227,10 +227,10 @@ export class UmbEmbeddedMediaModalElement extends UmbLitElement {
|
||||
look="primary"
|
||||
label="Submit"
|
||||
@click=${this.#handleConfirm}></uui-button>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -83,7 +83,7 @@ export class UmbIconPickerModalElement extends UmbModalBaseElement<UmbIconPicker
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Select Icon">
|
||||
<umb-workspace-editor headline="Select Icon">
|
||||
<div id="container">
|
||||
${this.renderSearchbar()}
|
||||
<hr />
|
||||
@@ -104,7 +104,7 @@ export class UmbIconPickerModalElement extends UmbModalBaseElement<UmbIconPicker
|
||||
<uui-button slot="actions" color="positive" look="primary" @click="${this._submit}" label="Submit">
|
||||
Submit
|
||||
</uui-button>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { buildUdi, getKeyFromUdi } from '@umbraco-cms/backoffice/utils';
|
||||
|
||||
@customElement('umb-link-picker-modal')
|
||||
export class UmbLinkPickerModalElement extends UmbModalBaseElement<UmbLinkPickerModalData, UmbLinkPickerModalResult> {
|
||||
|
||||
|
||||
|
||||
@state()
|
||||
_selectedKey?: string;
|
||||
@@ -91,7 +91,7 @@ export class UmbLinkPickerModalElement extends UmbModalBaseElement<UmbLinkPicker
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Select Link">
|
||||
<umb-workspace-editor headline="Select Link">
|
||||
<uui-box>
|
||||
<div class="url-link">${this._renderLinkUrlInput()} ${this._renderAnchorInput()}</div>
|
||||
|
||||
@@ -121,7 +121,7 @@ export class UmbLinkPickerModalElement extends UmbModalBaseElement<UmbLinkPicker
|
||||
<uui-button label="Close" @click=${this._close}></uui-button>
|
||||
<uui-button label="Submit" look="primary" color="positive" @click=${this._submit}></uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ export class UmbLinkPickerModalElement extends UmbModalBaseElement<UmbLinkPicker
|
||||
.selection=${[this._selectedKey ?? '']}
|
||||
selectable></umb-tree>`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -14,7 +14,7 @@ import { UmbModalBaseElement } from '@umbraco-cms/internal/modal';
|
||||
|
||||
@customElement('umb-property-settings-modal')
|
||||
export class UmbPropertySettingsModalElement extends UmbModalBaseElement<object, UmbPropertySettingsModalResult> {
|
||||
|
||||
|
||||
|
||||
@state() private _selectedPropertyEditorUI?: ManifestPropertyEditorUI;
|
||||
@state() private _selectedPropertyEditorUIAlias = '';
|
||||
@@ -200,7 +200,7 @@ export class UmbPropertySettingsModalElement extends UmbModalBaseElement<object,
|
||||
return html`
|
||||
<uui-form>
|
||||
<form @submit="${this.#onSubmit}">
|
||||
<umb-workspace-layout headline="Property settings">
|
||||
<umb-workspace-editor headline="Property settings">
|
||||
<div id="content">
|
||||
<uui-box>
|
||||
<div class="container">
|
||||
@@ -241,7 +241,7 @@ export class UmbPropertySettingsModalElement extends UmbModalBaseElement<object,
|
||||
<uui-button label="Close" @click=${this.#onClose}></uui-button>
|
||||
<uui-button label="Submit" look="primary" color="positive" type="submit"></uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
</form>
|
||||
</uui-form>
|
||||
`;
|
||||
@@ -333,7 +333,7 @@ export class UmbPropertySettingsModalElement extends UmbModalBaseElement<object,
|
||||
`
|
||||
: nothing} `;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { ManifestSection } from '@umbraco-cms/backoffice/extensions-registr
|
||||
|
||||
@customElement('umb-section-picker-modal')
|
||||
export class UmbSectionPickerModalElement extends UmbModalElementPickerBase<ManifestSection> {
|
||||
|
||||
|
||||
|
||||
@state()
|
||||
private _sections: Array<ManifestSection> = [];
|
||||
@@ -21,7 +21,7 @@ export class UmbSectionPickerModalElement extends UmbModalElementPickerBase<Mani
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Select sections">
|
||||
<umb-workspace-editor headline="Select sections">
|
||||
<uui-box>
|
||||
<uui-input label="search"></uui-input>
|
||||
<hr />
|
||||
@@ -42,10 +42,10 @@ export class UmbSectionPickerModalElement extends UmbModalElementPickerBase<Mani
|
||||
<uui-button label="Close" @click=${this.close}></uui-button>
|
||||
<uui-button label="Submit" look="primary" color="positive" @click=${this.submit}></uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -42,7 +42,7 @@ export class UmbTemplatePickerModalElement extends UmbModalBaseElement<
|
||||
// TODO: make umb-tree have a disabled option (string array like selection)?
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Select Content">
|
||||
<umb-workspace-editor headline="Select Content">
|
||||
<uui-box>
|
||||
<uui-input></uui-input>
|
||||
<hr />
|
||||
@@ -56,7 +56,7 @@ export class UmbTemplatePickerModalElement extends UmbModalBaseElement<
|
||||
<uui-button label="Close" @click=${this._close}></uui-button>
|
||||
<uui-button label="Submit" look="primary" color="positive" @click=${this._submit}></uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ interface GroupedPropertyEditorUIs {
|
||||
}
|
||||
@customElement('umb-property-editor-ui-picker-modal')
|
||||
export class UmbPropertyEditorUIPickerModalElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
@property({ type: Object })
|
||||
data?: UmbPropertyEditorUIPickerModalData;
|
||||
@@ -89,13 +89,13 @@ export class UmbPropertyEditorUIPickerModalElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Select Property Editor UI">
|
||||
<umb-workspace-editor headline="Select Property Editor UI">
|
||||
<uui-box> ${this._renderFilter()} ${this._renderGrid()} </uui-box>
|
||||
<div slot="actions">
|
||||
<uui-button label="Close" @click=${this._close}></uui-button>
|
||||
<uui-button label="${this._submitLabel}" look="primary" color="positive" @click=${this._submit}></uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ export class UmbPropertyEditorUIPickerModalElement extends UmbLitElement {
|
||||
)}
|
||||
</ul>`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -4,12 +4,12 @@ import { customElement } from 'lit/decorators.js';
|
||||
|
||||
@customElement('umb-stylesheet-workspace-edit')
|
||||
export class UmbStylesheetWorkspaceEditElement extends LitElement {
|
||||
|
||||
|
||||
|
||||
render() {
|
||||
return html` <umb-workspace-layout alias="Umb.Workspace.Stylesheet">Stylesheet workspace</umb-workspace-layout> `;
|
||||
return html` <umb-workspace-editor alias="Umb.Workspace.Stylesheet">Stylesheet workspace</umb-workspace-editor> `;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -8,7 +8,7 @@ import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
|
||||
@customElement('umb-template-workspace')
|
||||
export class UmbTemplateWorkspaceElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
public load(entityId: string) {
|
||||
this.#templateWorkspaceContext.load(entityId);
|
||||
@@ -66,7 +66,7 @@ export class UmbTemplateWorkspaceElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
// TODO: add correct UI elements
|
||||
return html`<umb-workspace-layout alias="Umb.Workspace.Template">
|
||||
return html`<umb-workspace-editor alias="Umb.Workspace.Template">
|
||||
<uui-input slot="header" .value=${this._name} @input=${this.#onNameInput}></uui-input>
|
||||
<uui-box>
|
||||
<uui-button color="danger" look="primary" slot="header" @click=${this.#insertCode}
|
||||
@@ -79,9 +79,9 @@ export class UmbTemplateWorkspaceElement extends UmbLitElement {
|
||||
.code=${this._content ?? ''}
|
||||
@input=${this.#onCodeEditorInput}></umb-code-editor>
|
||||
</uui-box>
|
||||
</umb-workspace-layout>`;
|
||||
</umb-workspace-editor>`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -8,7 +8,7 @@ import { UMB_ENTITY_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/context-ap
|
||||
|
||||
@customElement('umb-dictionary-workspace-edit')
|
||||
export class UmbDictionaryWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
|
||||
|
||||
@state()
|
||||
private _name?: string | null = '';
|
||||
@@ -42,17 +42,17 @@ export class UmbDictionaryWorkspaceEditElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout alias="Umb.Workspace.Dictionary">
|
||||
<umb-workspace-editor alias="Umb.Workspace.Dictionary">
|
||||
<div id="header" slot="header">
|
||||
<uui-button href="/section/translation/dashboard" label="Back to list" compact>
|
||||
<uui-icon name="umb:arrow-left"></uui-icon>
|
||||
</uui-button>
|
||||
<uui-input .value=${this._name} @input="${this.#handleInput}" label="Dictionary name"></uui-input>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -45,7 +45,7 @@ export class UmbCurrentUserModalElement extends UmbLitElement {
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="${this._currentUser?.name || ''}">
|
||||
<umb-workspace-editor headline="${this._currentUser?.name || ''}">
|
||||
<div id="main">
|
||||
<umb-extension-slot id="userProfileApps" type="userProfileApp"></umb-extension-slot>
|
||||
</div>
|
||||
@@ -53,7 +53,7 @@ export class UmbCurrentUserModalElement extends UmbLitElement {
|
||||
<uui-button @click=${this._close} look="secondary">Close</uui-button>
|
||||
<uui-button @click=${this._logout} look="primary" color="danger">Logout</uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export class UmbCurrentUserModalElement extends UmbLitElement {
|
||||
color: var(--uui-color-text);
|
||||
}
|
||||
:host,
|
||||
umb-workspace-layout {
|
||||
umb-workspace-editor {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { UserGroupDetails } from '@umbraco-cms/backoffice/models';
|
||||
|
||||
@customElement('umb-user-group-picker-modal')
|
||||
export class UmbUserGroupPickerModalElement extends UmbModalElementPickerBase<UserGroupDetails> {
|
||||
|
||||
|
||||
|
||||
@state()
|
||||
private _userGroups: Array<UserGroupDetails> = [];
|
||||
@@ -29,7 +29,7 @@ export class UmbUserGroupPickerModalElement extends UmbModalElementPickerBase<Us
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<umb-workspace-layout headline="Select user groups">
|
||||
<umb-workspace-editor headline="Select user groups">
|
||||
<uui-box>
|
||||
<uui-input label="search"></uui-input>
|
||||
<hr />
|
||||
@@ -51,10 +51,10 @@ export class UmbUserGroupPickerModalElement extends UmbModalElementPickerBase<Us
|
||||
<uui-button label="Close" @click=${this.close}></uui-button>
|
||||
<uui-button label="Submit" look="primary" color="positive" @click=${this.submit}></uui-button>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
|
||||
@@ -295,13 +295,13 @@ export class UmbUserGroupWorkspaceEditElement extends UmbLitElement {
|
||||
if (!this._userGroup) return nothing;
|
||||
|
||||
return html`
|
||||
<umb-workspace-layout alias="Umb.Workspace.UserGroup">
|
||||
<umb-workspace-editor alias="Umb.Workspace.UserGroup">
|
||||
<uui-input id="name" slot="header" .value=${this._userGroup.name} @input="${this._handleInput}"></uui-input>
|
||||
<div id="main">
|
||||
<div id="left-column">${this.renderLeftColumn()}</div>
|
||||
<div id="right-column">${this.renderRightColumn()}</div>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,13 +93,13 @@ export class UmbUserWorkspaceEditElement extends UmbLitElement {
|
||||
if (!this._user) return html`User not found`;
|
||||
|
||||
return html`
|
||||
<umb-workspace-layout alias="Umb.Workspace.User">
|
||||
<umb-workspace-editor alias="Umb.Workspace.User">
|
||||
${this.#renderHeader()}
|
||||
<div id="main">
|
||||
<div id="left-column">${this.#renderLeftColumn()}</div>
|
||||
<div id="right-column">${this.#renderRightColumn()}</div>
|
||||
</div>
|
||||
</umb-workspace-layout>
|
||||
</umb-workspace-editor>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { UmbRoute } from '@umbraco-cms/backoffice/router';
|
||||
|
||||
import '../../../shared/components/input-user-group/input-user-group.element';
|
||||
import '../../../shared/property-editors/uis/document-picker/property-editor-ui-document-picker.element';
|
||||
import '../../../shared/components/workspace/workspace-layout/workspace-layout.element';
|
||||
import '../../../shared/components/workspace/workspace-editor/workspace-editor.element';
|
||||
|
||||
@customElement('umb-user-workspace')
|
||||
export class UmbUserWorkspaceElement extends UmbLitElement {
|
||||
|
||||
Reference in New Issue
Block a user