general clean up
This commit is contained in:
@@ -190,7 +190,7 @@ export class UmbDocumentTypeWorkspaceViewEditPropertiesElement extends UmbLitEle
|
||||
<div id="property-list" ?sort-mode-active=${this._sortModeActive}>
|
||||
${repeat(
|
||||
this._propertyStructure,
|
||||
(property) => '' + property.container?.id + property.id + '' + property.sortOrder,
|
||||
(property) => property.id,
|
||||
(property) => {
|
||||
// Note: This piece might be moved into the property component
|
||||
const inheritedFromDocument = this._ownerDocumentTypes?.find((types) =>
|
||||
@@ -209,7 +209,7 @@ export class UmbDocumentTypeWorkspaceViewEditPropertiesElement extends UmbLitEle
|
||||
this._propertyStructureHelper.partialUpdateProperty(property.id, event.detail);
|
||||
}}
|
||||
@property-delete=${() => {
|
||||
this._propertyStructureHelper.removeProperty(property.id!);
|
||||
this._propertyStructureHelper.removeProperty(property.id);
|
||||
}}>
|
||||
</umb-document-type-workspace-view-edit-property>
|
||||
`;
|
||||
|
||||
@@ -178,7 +178,7 @@ export class UmbDocumentTypeWorkspacePropertyElement extends UmbLitElement {
|
||||
?readonly=${this.inherited}
|
||||
label="sort order"
|
||||
@change=${(e: UUIInputEvent) =>
|
||||
this._partialUpdate({ sortOrder: parseInt(e.target.value as string) || 0 } as UmbPropertyTypeModel)}
|
||||
this._partialUpdate({ sortOrder: parseInt(e.target.value as string) ?? 0 } as UmbPropertyTypeModel)}
|
||||
.value=${this.property.sortOrder ?? 0}></uui-input>
|
||||
`;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ export class UmbDocumentTypeWorkspacePropertyElement extends UmbLitElement {
|
||||
<div @click=${this.#onToggleAliasLock} @keydown=${() => ''} id="alias-lock" slot="prepend">
|
||||
<uui-icon name=${this._aliasLocked ? 'icon-lock' : 'icon-unlocked'}></uui-icon>
|
||||
</div>
|
||||
</uui-input>`
|
||||
</uui-input>`
|
||||
: '';
|
||||
}
|
||||
|
||||
@@ -283,19 +283,19 @@ export class UmbDocumentTypeWorkspacePropertyElement extends UmbLitElement {
|
||||
${this.property.variesByCulture
|
||||
? html`<uui-tag look="default">
|
||||
<uui-icon name="icon-shuffle"></uui-icon> ${this.localize.term('contentTypeEditor_cultureVariantLabel')}
|
||||
</uui-tag>`
|
||||
</uui-tag>`
|
||||
: nothing}
|
||||
${this.property.appearance?.labelOnTop == true
|
||||
? html`<uui-tag look="default">
|
||||
<span>${this.localize.term('contentTypeEditor_displaySettingsLabelOnTop')}</span>
|
||||
</uui-tag>`
|
||||
</uui-tag>`
|
||||
: nothing}
|
||||
${this.property.validation.mandatory === true
|
||||
? html`<uui-tag look="default">
|
||||
<span>* ${this.localize.term('general_mandatory')}</span>
|
||||
</uui-tag>`
|
||||
</uui-tag>`
|
||||
: nothing}
|
||||
</div>`
|
||||
</div>`
|
||||
: nothing;
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ export class UmbDocumentTypeWorkspaceViewEditTabElement extends UmbLitElement {
|
||||
}
|
||||
|
||||
#renderHeader(group: UmbPropertyTypeContainerModel) {
|
||||
const inherited = !this.#groupStructureHelper.isOwnerChildContainer(group.id!);
|
||||
const inherited = !this.#groupStructureHelper.isOwnerChildContainer(group.id);
|
||||
|
||||
if (this._sortModeActive) {
|
||||
return html`<div slot="header">
|
||||
@@ -213,7 +213,7 @@ export class UmbDocumentTypeWorkspaceViewEditTabElement extends UmbLitElement {
|
||||
type="number"
|
||||
label=${this.localize.term('sort_sortOrder')}
|
||||
@change=${(e: UUIInputEvent) =>
|
||||
this.#groupStructureHelper.partialUpdateContainer(group.id!, {
|
||||
this.#groupStructureHelper.partialUpdateContainer(group.id, {
|
||||
sortOrder: parseInt(e.target.value as string) || 0,
|
||||
})}
|
||||
.value=${group.sortOrder || 0}
|
||||
@@ -233,7 +233,7 @@ export class UmbDocumentTypeWorkspaceViewEditTabElement extends UmbLitElement {
|
||||
.value=${group.name}
|
||||
@change=${(e: InputEvent) => {
|
||||
const newName = (e.target as HTMLInputElement).value;
|
||||
this.#groupStructureHelper.updateContainerName(group.id!, group.parent?.id ?? null, newName);
|
||||
this.#groupStructureHelper.updateContainerName(group.id, group.parent?.id ?? null, newName);
|
||||
}}></uui-input>`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user