Merge branch 'main' into feature/document-collection-ui
This commit is contained in:
@@ -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`
|
||||
<umb-dropdown id="document-layout-dropdown">
|
||||
<uui-symbol-more slot="label"></uui-symbol-more>
|
||||
<div slot="dropdown">
|
||||
<uui-scroll-container>
|
||||
<umb-entity-action-list
|
||||
@action-executed=${this.#onActionExecuted}
|
||||
entity-type=${ifDefined(this.value.entityType)}
|
||||
unique=${ifDefined(this.item.id)}></umb-entity-action-list>
|
||||
</uui-scroll-container>
|
||||
</div>
|
||||
</umb-dropdown>
|
||||
`;
|
||||
}
|
||||
|
||||
static styles = [css``];
|
||||
}
|
||||
|
||||
export default UmbDocumentTableActionColumnLayoutElement;
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'umb-document-table-actions-column-layout': UmbDocumentTableActionColumnLayoutElement;
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,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()
|
||||
@@ -41,13 +39,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()
|
||||
|
||||
Reference in New Issue
Block a user