From f159871d475cabafb15d25f51050ae23534359d6 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Mon, 19 Feb 2024 13:30:11 +0000 Subject: [PATCH] Removes the `umb-document-table-actions-column-layout` element This isn't being currently used by the Document Collection table view. The legacy ListView did not have a row actions menu. We can discuss whether it needs to be re-introduced later on. --- ...ent-table-actions-column-layout.element.ts | 53 ------------------- .../document-table-collection-view.element.ts | 9 ---- 2 files changed, 62 deletions(-) delete mode 100644 src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/column-layouts/document-table-actions-column-layout.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/column-layouts/document-table-actions-column-layout.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/column-layouts/document-table-actions-column-layout.element.ts deleted file mode 100644 index daa68e5862..0000000000 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/column-layouts/document-table-actions-column-layout.element.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { css, html, LitElement, ifDefined, customElement, property, query } from '@umbraco-cms/backoffice/external/lit'; -import type { UmbDropdownElement, UmbTableColumn, UmbTableItem } from '@umbraco-cms/backoffice/components'; -import type { UmbActionExecutedEvent } from '@umbraco-cms/backoffice/event'; - -// TODO: this could be done more generic, but for now we just need it for the document table -@customElement('umb-document-table-actions-column-layout') -export class UmbDocumentTableActionColumnLayoutElement extends LitElement { - @query('#document-layout-dropdown') - dropdownElement?: UmbDropdownElement; - - @property({ type: Object, attribute: false }) - column!: UmbTableColumn; - - @property({ type: Object, attribute: false }) - item!: UmbTableItem; - - @property({ attribute: false }) - value!: any; - - #onActionExecuted(event: UmbActionExecutedEvent) { - event.stopPropagation(); - - if (this.dropdownElement) { - this.dropdownElement.open = false; - } - } - - render() { - return html` - - -
- - - -
-
- `; - } - - static styles = [css``]; -} - -export default UmbDocumentTableActionColumnLayoutElement; - -declare global { - interface HTMLElementTagNameMap { - 'umb-document-table-actions-column-layout': UmbDocumentTableActionColumnLayoutElement; - } -} diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/document-table-collection-view.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/document-table-collection-view.element.ts index 99aeff126e..9b5d87ffe9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/document-table-collection-view.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/document-table-collection-view.element.ts @@ -15,8 +15,6 @@ import type { } from '@umbraco-cms/backoffice/components'; import type { UmbDefaultCollectionContext } from '@umbraco-cms/backoffice/collection'; -//import './column-layouts/document-table-actions-column-layout.element.js'; - @customElement('umb-document-table-collection-view') export class UmbDocumentTableCollectionViewElement extends UmbLitElement { @state() @@ -34,13 +32,6 @@ export class UmbDocumentTableCollectionViewElement extends UmbLitElement { alias: 'entityName', allowSorting: true, }, - // TODO: actions should live in an UmbTable element when we have moved the current UmbTable to UUI. - // { - // name: 'Actions', - // alias: 'entityActions', - // elementName: 'umb-document-table-actions-column-layout', - // width: '80px', - // }, ]; @state()