rename workspace views
This commit is contained in:
@@ -14,28 +14,28 @@ const workspace: ManifestWorkspace = {
|
||||
const workspaceViews: Array<ManifestWorkspaceView> = [
|
||||
{
|
||||
type: 'workspaceView',
|
||||
alias: 'Umb.WorkspaceView.RelationType.Edit',
|
||||
name: 'Relation Type Workspace Edit View',
|
||||
loader: () => import('./views/edit/relation-type-workspace-view-edit.element'),
|
||||
alias: 'Umb.WorkspaceView.RelationType.RelationType',
|
||||
name: 'Relation Type Workspace RelationType View',
|
||||
loader: () => import('./views/relation-type/relation-type-workspace-view-relation-type.element'),
|
||||
weight: 90,
|
||||
meta: {
|
||||
workspaces: ['Umb.Workspace.RelationType'],
|
||||
label: 'Edit',
|
||||
pathname: 'edit',
|
||||
icon: 'edit',
|
||||
label: 'RelationType',
|
||||
pathname: 'relation-type',
|
||||
icon: 'umb:info',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'workspaceView',
|
||||
alias: 'Umb.WorkspaceView.RelationType.Info',
|
||||
name: 'Relation Type Workspace Info View',
|
||||
loader: () => import('./views/info/workspace-view-relation-type-info.element'),
|
||||
alias: 'Umb.WorkspaceView.RelationType.Relation',
|
||||
name: 'Relation Type Workspace Relation View',
|
||||
loader: () => import('./views/relation/workspace-view-relation-type-relation.element'),
|
||||
weight: 90,
|
||||
meta: {
|
||||
workspaces: ['Umb.Workspace.RelationType'],
|
||||
label: 'Info',
|
||||
pathname: 'info',
|
||||
icon: 'info',
|
||||
label: 'Relation',
|
||||
pathname: 'relation',
|
||||
icon: 'umb:trafic',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -7,8 +7,8 @@ import { UmbRelationTypeWorkspaceContext } from '../../relation-type-workspace.c
|
||||
import { UmbLitElement } from '@umbraco-cms/element';
|
||||
import type { RelationTypeBaseModel, RelationTypeResponseModel } from '@umbraco-cms/backend-api';
|
||||
|
||||
@customElement('umb-relation-type-workspace-view-edit')
|
||||
export class UmbRelationTypeWorkspaceViewEditElement extends UmbLitElement {
|
||||
@customElement('umb-relation-type-workspace-view-relation-type')
|
||||
export class UmbRelationTypeWorkspaceViewRelationTypeElement extends UmbLitElement {
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
@@ -63,7 +63,7 @@ export class UmbRelationTypeWorkspaceViewEditElement extends UmbLitElement {
|
||||
<uui-radio-group
|
||||
value=${ifDefined(this._relationType?.isBidirectional)}
|
||||
@change=${this.#handleDirectionChange}
|
||||
slot="editor">
|
||||
slot="relation-typeor">
|
||||
<uui-radio label="Parent to child" value="false"></uui-radio>
|
||||
<uui-radio label="Bidirectional" value="true"></uui-radio>
|
||||
</uui-radio-group>
|
||||
@@ -72,7 +72,7 @@ export class UmbRelationTypeWorkspaceViewEditElement extends UmbLitElement {
|
||||
<umb-workspace-property-layout label="Child"> ${this.#renderChildProperty()} </umb-workspace-property-layout>
|
||||
<umb-workspace-property-layout label="Is dependency">
|
||||
<uui-toggle
|
||||
slot="editor"
|
||||
slot="relation-typeor"
|
||||
@change=${this.#handleIsDependencyChange}
|
||||
.checked=${this._relationType?.isDependency ?? false}></uui-toggle>
|
||||
</umb-workspace-property-layout>
|
||||
@@ -81,22 +81,24 @@ export class UmbRelationTypeWorkspaceViewEditElement extends UmbLitElement {
|
||||
}
|
||||
|
||||
#renderParentProperty() {
|
||||
if (this._relationType?.key) return html`<div slot="editor">${this._relationType.parentObjectTypeName}</div>`;
|
||||
if (this._relationType?.key)
|
||||
return html`<div slot="relation-typeor">${this._relationType.parentObjectTypeName}</div>`;
|
||||
|
||||
return html`<uui-select slot="editor"></uui-select>`;
|
||||
return html`<uui-select slot="relation-typeor"></uui-select>`;
|
||||
}
|
||||
|
||||
#renderChildProperty() {
|
||||
if (this._relationType?.key) return html`<div slot="editor">${this._relationType.parentObjectTypeName}</div>`;
|
||||
if (this._relationType?.key)
|
||||
return html`<div slot="relation-typeor">${this._relationType.parentObjectTypeName}</div>`;
|
||||
|
||||
return html`<uui-select slot="editor"></uui-select>`;
|
||||
return html`<uui-select slot="relation-typeor"></uui-select>`;
|
||||
}
|
||||
}
|
||||
|
||||
export default UmbRelationTypeWorkspaceViewEditElement;
|
||||
export default UmbRelationTypeWorkspaceViewRelationTypeElement;
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'umb-relation-type-workspace-view-edit': UmbRelationTypeWorkspaceViewEditElement;
|
||||
'umb-relation-type-workspace-view-relation-type': UmbRelationTypeWorkspaceViewRelationTypeElement;
|
||||
}
|
||||
}
|
||||
@@ -3,15 +3,15 @@ import { html } from 'lit-html';
|
||||
|
||||
//import { data } from '../../../../../core/mocks/data/relation-type.data';
|
||||
|
||||
import type { UmbRelationTypeWorkspaceViewEditElement } from './relation-type-workspace-view-edit.element';
|
||||
import type { UmbRelationTypeWorkspaceViewRelationTypeElement } from './relation-type-workspace-view-relation-type.element';
|
||||
|
||||
import './relation-type-workspace-view-edit.element';
|
||||
import './relation-type-workspace-view-relation-type.element';
|
||||
//import { UmbRelationTypeWorkspaceContext } from '../../workspace-relation-type.context';
|
||||
|
||||
export default {
|
||||
title: 'Workspaces/Relation Type/Views/Edit',
|
||||
component: 'umb-relation-type-workspace-view-edit',
|
||||
id: 'umb-relation-type-workspace-view-edit',
|
||||
title: 'Workspaces/Relation Type/Views/RelationType',
|
||||
component: 'umb-relation-type-workspace-view-relation-type',
|
||||
id: 'umb-relation-type-workspace-view-relation-type',
|
||||
decorators: [
|
||||
(story) => {
|
||||
return html`TODO: make use of mocked workspace context??`;
|
||||
@@ -22,6 +22,6 @@ export default {
|
||||
],
|
||||
} as Meta;
|
||||
|
||||
export const AAAOverview: Story<UmbRelationTypeWorkspaceViewEditElement> = () =>
|
||||
html` <umb-relation-type-workspace-view-edit></umb-relation-type-workspace-view-edit>`;
|
||||
export const AAAOverview: Story<UmbRelationTypeWorkspaceViewRelationTypeElement> = () =>
|
||||
html` <umb-relation-type-workspace-view-relation-type></umb-relation-type-workspace-view-relation-type>`;
|
||||
AAAOverview.storyName = 'Overview';
|
||||
@@ -6,8 +6,8 @@ import { UmbRelationTypeWorkspaceContext } from '../../relation-type-workspace.c
|
||||
import { UmbLitElement } from '@umbraco-cms/element';
|
||||
import { RelationTypeResponseModel } from '@umbraco-cms/backend-api';
|
||||
|
||||
@customElement('umb-workspace-view-relation-type-info')
|
||||
export class UmbWorkspaceViewRelationTypeInfoElement extends UmbLitElement {
|
||||
@customElement('umb-workspace-view-relation-type-relation')
|
||||
export class UmbWorkspaceViewRelationTypeRelationElement extends UmbLitElement {
|
||||
static styles = [UUITextStyles, css``];
|
||||
|
||||
@state()
|
||||
@@ -35,21 +35,21 @@ export class UmbWorkspaceViewRelationTypeInfoElement extends UmbLitElement {
|
||||
}
|
||||
|
||||
render() {
|
||||
return html` ${this._renderGeneralInfo()}${this._renderReferences()} `;
|
||||
return html` ${this._renderGeneralRelation()}${this._renderReferences()} `;
|
||||
}
|
||||
|
||||
private _renderGeneralInfo() {
|
||||
private _renderGeneralRelation() {
|
||||
return html`
|
||||
<uui-box headline="General" style="margin-bottom: 20px;">
|
||||
<umb-workspace-property-layout label="Key">
|
||||
<div slot="editor">${this._RelationType?.key}</div>
|
||||
<div slot="relation-typeor">${this._RelationType?.key}</div>
|
||||
</umb-workspace-property-layout>
|
||||
<umb-workspace-property-layout label="Property Editor Alias">
|
||||
<div slot="editor">${this._RelationType?.propertyEditorAlias}</div>
|
||||
<umb-workspace-property-layout label="Property RelationTypeor Alias">
|
||||
<div slot="relation-typeor">${this._RelationType?.propertyRelationTypeorAlias}</div>
|
||||
</umb-workspace-property-layout>
|
||||
|
||||
<umb-workspace-property-layout label="Property Editor UI Alias">
|
||||
<div slot="editor">${this._RelationType?.propertyEditorUiAlias}</div>
|
||||
<umb-workspace-property-layout label="Property RelationTypeor UI Alias">
|
||||
<div slot="relation-typeor">${this._RelationType?.propertyRelationTypeorUiAlias}</div>
|
||||
</umb-workspace-property-layout>
|
||||
</uui-box>
|
||||
`;
|
||||
@@ -60,10 +60,10 @@ export class UmbWorkspaceViewRelationTypeInfoElement extends UmbLitElement {
|
||||
}
|
||||
}
|
||||
|
||||
export default UmbWorkspaceViewRelationTypeInfoElement;
|
||||
export default UmbWorkspaceViewRelationTypeRelationElement;
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'umb-workspace-view-relation-type-info': UmbWorkspaceViewRelationTypeInfoElement;
|
||||
'umb-workspace-view-relation-type-relation': UmbWorkspaceViewRelationTypeRelationElement;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import './workspace-view-relation-type-info.element';
|
||||
import './workspace-view-relation-type-relation.element';
|
||||
|
||||
import { Meta, Story } from '@storybook/web-components';
|
||||
import { html } from 'lit-html';
|
||||
@@ -6,12 +6,12 @@ import { html } from 'lit-html';
|
||||
//import { data } from '../../../../../core/mocks/data/relation-type.data';
|
||||
//import { UmbRelationTypeContext } from '../../relation-type.context';
|
||||
|
||||
import type { UmbWorkspaceViewRelationTypeInfoElement } from './workspace-view-relation-type-info.element';
|
||||
import type { UmbWorkspaceViewRelationTypeRelationElement } from './workspace-view-relation-type-relation.element';
|
||||
|
||||
export default {
|
||||
title: 'Workspaces/Relation Type/Views/Info',
|
||||
component: 'umb-workspace-view-relation-type-info',
|
||||
id: 'umb-workspace-view-relation-type-info',
|
||||
title: 'Workspaces/Relation Type/Views/Relation',
|
||||
component: 'umb-workspace-view-relation-type-relation',
|
||||
id: 'umb-workspace-view-relation-type-relation',
|
||||
decorators: [
|
||||
(story) => {
|
||||
return html`TODO: make use of mocked workspace context??`;
|
||||
@@ -22,6 +22,6 @@ export default {
|
||||
],
|
||||
} as Meta;
|
||||
|
||||
export const AAAOverview: Story<UmbWorkspaceViewRelationTypeInfoElement> = () =>
|
||||
html` <umb-workspace-view-relation-type-info></umb-workspace-view-relation-type-info>`;
|
||||
export const AAAOverview: Story<UmbWorkspaceViewRelationTypeRelationElement> = () =>
|
||||
html` <umb-workspace-view-relation-type-relation></umb-workspace-view-relation-type-relation>`;
|
||||
AAAOverview.storyName = 'Overview';
|
||||
Reference in New Issue
Block a user