From c94b6dd370c0feb142fc3da9ac2473e313c87907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20M=C3=B8ller=20Jensen?= <26099018+JesmoDev@users.noreply.github.com> Date: Mon, 19 Dec 2022 15:35:46 +0100 Subject: [PATCH] add table collection layout --- .../layouts/collection-layout-table.element.ts | 18 ++++++++++++++++++ .../components/collection/layouts/manifests.ts | 14 ++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/Umbraco.Web.UI.Client/src/backoffice/components/collection/layouts/collection-layout-table.element.ts diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/components/collection/layouts/collection-layout-table.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/components/collection/layouts/collection-layout-table.element.ts new file mode 100644 index 0000000000..4004cbf44b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/backoffice/components/collection/layouts/collection-layout-table.element.ts @@ -0,0 +1,18 @@ +import { UUITextStyles } from '@umbraco-ui/uui-css'; +import { css, html, LitElement } from 'lit'; +import { customElement } from 'lit/decorators.js'; + +@customElement('umb-collection-layout-table') +export class UmbCollectionLayoutTableElement extends LitElement { + static styles = [UUITextStyles, css``]; + + render() { + return html`umb-collection-layout-table`; + } +} + +declare global { + interface HTMLElementTagNameMap { + 'umb-collection-layout-table': UmbCollectionLayoutTableElement; + } +} diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/components/collection/layouts/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/components/collection/layouts/manifests.ts index 1c0e4d68aa..9f94a351b4 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/components/collection/layouts/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/components/collection/layouts/manifests.ts @@ -15,4 +15,18 @@ export const manifests: Array = [ pathName: 'grid', }, }, + { + type: 'collectionLayout', + alias: 'Umb.CollectionLayout.Table', + name: 'Table', + elementName: 'umb-collection-layout-table', + loader: () => import('./collection-layout-table.element'), + weight: 100, + meta: { + label: 'Table', + icon: 'umb:table', + entityType: 'media', + pathName: 'table', + }, + }, ];