From 79be266aae9b32081bab6dde5032af658bfbde00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 6 Mar 2024 20:25:53 +0100 Subject: [PATCH] general clean up --- ...nt-type-workspace-view-edit-properties.element.ts | 4 ++-- ...ment-type-workspace-view-edit-property.element.ts | 12 ++++++------ .../document-type-workspace-view-edit-tab.element.ts | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.ts index a3207792c4..f0c55345dd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.ts @@ -190,7 +190,7 @@ export class UmbDocumentTypeWorkspaceViewEditPropertiesElement extends UmbLitEle
${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); }}> `; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.ts index 975e0a9137..158401542e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.ts @@ -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}> `; } @@ -272,7 +272,7 @@ export class UmbDocumentTypeWorkspacePropertyElement extends UmbLitElement {
''} id="alias-lock" slot="prepend">
- ` + ` : ''; } @@ -283,19 +283,19 @@ export class UmbDocumentTypeWorkspacePropertyElement extends UmbLitElement { ${this.property.variesByCulture ? html` ${this.localize.term('contentTypeEditor_cultureVariantLabel')} - ` + ` : nothing} ${this.property.appearance?.labelOnTop == true ? html` ${this.localize.term('contentTypeEditor_displaySettingsLabelOnTop')} - ` + ` : nothing} ${this.property.validation.mandatory === true ? html` * ${this.localize.term('general_mandatory')} - ` + ` : nothing} -
` + ` : nothing; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-tab.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-tab.element.ts index b6eff02a8c..8371faefe5 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-tab.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-tab.element.ts @@ -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`
@@ -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); }}>`; }