From da8b4e3db7eed8025ee30090443f59d82d432f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 13 Sep 2024 12:40:18 +0200 Subject: [PATCH 1/2] clean up --- .../dashboard-collection.element.ts | 33 ------------ .../dashboard-collection.stories.ts | 15 ------ .../models/dashboard-collection.model.ts | 54 ------------------- .../core/extension-registry/models/index.ts | 2 - 4 files changed, 104 deletions(-) delete mode 100644 src/packages/core/collection/dashboards/dashboard-collection.element.ts delete mode 100644 src/packages/core/collection/dashboards/dashboard-collection.stories.ts delete mode 100644 src/packages/core/extension-registry/models/dashboard-collection.model.ts diff --git a/src/packages/core/collection/dashboards/dashboard-collection.element.ts b/src/packages/core/collection/dashboards/dashboard-collection.element.ts deleted file mode 100644 index 21c6078aed..0000000000 --- a/src/packages/core/collection/dashboards/dashboard-collection.element.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { css, html, customElement } from '@umbraco-cms/backoffice/external/lit'; -import type { ManifestDashboardCollection } from '@umbraco-cms/backoffice/extension-registry'; -import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; - -@customElement('umb-dashboard-collection') -export class UmbDashboardCollectionElement extends UmbLitElement { - public manifest!: ManifestDashboardCollection; - - // TODO: figure out what collection to render - override render() { - return html``; - } - - static override styles = [ - css` - :host { - display: flex; - flex-direction: column; - box-sizing: border-box; - gap: var(--uui-size-space-5); - height: 100%; - } - `, - ]; -} - -export default UmbDashboardCollectionElement; - -declare global { - interface HTMLElementTagNameMap { - 'umb-dashboard-collection': UmbDashboardCollectionElement; - } -} diff --git a/src/packages/core/collection/dashboards/dashboard-collection.stories.ts b/src/packages/core/collection/dashboards/dashboard-collection.stories.ts deleted file mode 100644 index e052315819..0000000000 --- a/src/packages/core/collection/dashboards/dashboard-collection.stories.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { UmbDashboardCollectionElement } from './dashboard-collection.element.js'; -import type { Meta, Story } from '@storybook/web-components'; -import { html } from '@umbraco-cms/backoffice/external/lit'; - -import './dashboard-collection.element.js'; - -export default { - title: 'Dashboards/Media Management', - component: 'umb-dashboard-collection', - id: 'umb-dashboard-collection', -} as Meta; - -export const AAAOverview: Story = () => - html` `; -AAAOverview.storyName = 'Overview'; diff --git a/src/packages/core/extension-registry/models/dashboard-collection.model.ts b/src/packages/core/extension-registry/models/dashboard-collection.model.ts deleted file mode 100644 index 8ec72d8a82..0000000000 --- a/src/packages/core/extension-registry/models/dashboard-collection.model.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { ManifestBase } from '@umbraco-cms/backoffice/extension-api'; - -export interface ManifestDashboardCollection extends ManifestBase { - type: 'dashboardCollection'; - meta: MetaDashboardCollection; - conditions: ConditionsDashboardCollection; -} - -export interface MetaDashboardCollection { - /** - * The URL path for the dashboard which is used for navigating or deep linking directly to the dashboard - * @examples [ - * "media-management-dashboard", - * "my-awesome-dashboard" - * ] - */ - pathname: string; - - /** - * Optional string to display as the label for the dashboard collection - */ - label?: string; - - /** - * The alias of the repository that the dashboard collection is for - * @examples [ - * "Umb.Repository.Media" - * ] - */ - repositoryAlias: string; -} - -/** - * The conditions for when the dashboard should be available - */ -export interface ConditionsDashboardCollection { - /** - * An array of section aliases that the dashboard collection should be available in - * @uniqueItems true - * @examples [ - * "Umb.Section.Content", - * "Umb.Section.Settings" - * ] - */ - sections: string[]; - - /** - * The entity type that the dashboard collection should be available for - * @examples [ - * "media" - * ] - */ - entityType: string; -} diff --git a/src/packages/core/extension-registry/models/index.ts b/src/packages/core/extension-registry/models/index.ts index 00fec52d8f..0de45d0100 100644 --- a/src/packages/core/extension-registry/models/index.ts +++ b/src/packages/core/extension-registry/models/index.ts @@ -3,7 +3,6 @@ import type { ManifestCollection } from './collection.models.js'; import type { ManifestCollectionView } from './collection-view.model.js'; import type { ManifestCurrentUserAction, ManifestCurrentUserActionDefaultKind } from './current-user-action.model.js'; import type { ManifestDashboard } from './dashboard.model.js'; -import type { ManifestDashboardCollection } from './dashboard-collection.model.js'; import type { ManifestEntityAction, ManifestEntityActionDeleteKind, @@ -166,7 +165,6 @@ export type ManifestTypes = | ManifestCurrentUserAction | ManifestCurrentUserActionDefaultKind | ManifestDashboard - | ManifestDashboardCollection | ManifestDynamicRootOrigin | ManifestDynamicRootQueryStep | ManifestEntityActions From c2fa8d96209c27b53c90e2e969ed619267a082a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 13 Sep 2024 20:05:41 +0200 Subject: [PATCH 2/2] remove export --- src/packages/core/extension-registry/models/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/packages/core/extension-registry/models/index.ts b/src/packages/core/extension-registry/models/index.ts index c9fc8ad764..503ba9cc77 100644 --- a/src/packages/core/extension-registry/models/index.ts +++ b/src/packages/core/extension-registry/models/index.ts @@ -74,7 +74,6 @@ export type * from './app-entry-point.model.js'; export type * from './auth-provider.model.js'; export type * from './backoffice-entry-point.model.js'; export type * from './current-user-action.model.js'; -export type * from './dashboard-collection.model.js'; export type * from './dashboard.model.js'; export type * from './dynamic-root.model.js'; export type * from './entity-action.model.js';