remove
This commit is contained in:
@@ -1,34 +0,0 @@
|
|||||||
import type { UmbWebhookDetailModel } from '../../../../../types.js';
|
|
||||||
import { html, customElement, property, state, ifDefined } from '@umbraco-cms/backoffice/external/lit';
|
|
||||||
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
||||||
|
|
||||||
@customElement('umb-webhook-table-entity-actions-column-layout')
|
|
||||||
export class UmbWebhookTableEntityActionsColumnLayoutElement extends UmbLitElement {
|
|
||||||
@property({ attribute: false })
|
|
||||||
value!: UmbWebhookDetailModel;
|
|
||||||
|
|
||||||
@state()
|
|
||||||
_isOpen = false;
|
|
||||||
|
|
||||||
#onActionExecuted() {
|
|
||||||
this._isOpen = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return html`
|
|
||||||
<umb-dropdown .open=${this._isOpen} compact hide-expand>
|
|
||||||
<uui-symbol-more slot="label"></uui-symbol-more>
|
|
||||||
<umb-entity-action-list
|
|
||||||
@action-executed=${this.#onActionExecuted}
|
|
||||||
entity-type=${this.value.entityType}
|
|
||||||
unique=${ifDefined(this.value.unique)}></umb-entity-action-list>
|
|
||||||
</umb-dropdown>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface HTMLElementTagNameMap {
|
|
||||||
'umb-webhook-table-entity-actions-column-layout': UmbWebhookTableEntityActionsColumnLayoutElement;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import type { UmbWebhookDetailModel } from '../../../../../types.js';
|
||||||
|
import { html, customElement, property, state, ifDefined } from '@umbraco-cms/backoffice/external/lit';
|
||||||
|
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
||||||
|
|
||||||
|
@customElement('umb-webhook-table-remove-column-layout')
|
||||||
|
export class UmbWebhookTableRemoveColumnLayoutElement extends UmbLitElement {
|
||||||
|
render() {
|
||||||
|
return html` <uui-button label="remove"></uui-button> `;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'umb-webhook-table-remove-column-layout': UmbWebhookTableRemoveColumnLayoutElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|||||||
|
|
||||||
import './column-layouts/boolean/webhook-table-boolean-column-layout.element.js';
|
import './column-layouts/boolean/webhook-table-boolean-column-layout.element.js';
|
||||||
import './column-layouts/name/webhook-table-name-column-layout.element.js';
|
import './column-layouts/name/webhook-table-name-column-layout.element.js';
|
||||||
import './column-layouts/entity-actions/webhook-table-entity-actions-column-layout.element.js';
|
import './column-layouts/remove/webhook-table-remove-column-layout.element.js';
|
||||||
|
|
||||||
@customElement('umb-webhook-table-collection-view')
|
@customElement('umb-webhook-table-collection-view')
|
||||||
export class UmbWebhookTableCollectionViewElement extends UmbLitElement {
|
export class UmbWebhookTableCollectionViewElement extends UmbLitElement {
|
||||||
@@ -38,8 +38,8 @@ export class UmbWebhookTableCollectionViewElement extends UmbLitElement {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '',
|
name: '',
|
||||||
alias: 'entityActions',
|
alias: 'remove',
|
||||||
elementName: 'umb-webhook-table-entity-actions-column-layout',
|
elementName: 'umb-webhook-table-remove-column-layout',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -78,15 +78,15 @@ export class UmbWebhookTableCollectionViewElement extends UmbLitElement {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
columnAlias: 'events',
|
columnAlias: 'events',
|
||||||
value: webhook.events,
|
value: webhook.events.map((event) => event.eventName).join(', ') || 'None',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
columnAlias: 'types',
|
columnAlias: 'types',
|
||||||
value: webhook.contentTypes,
|
value: webhook.contentTypes,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
columnAlias: 'entityActions',
|
columnAlias: 'remove',
|
||||||
value: webhook,
|
value: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user