Skip to content

Commit dbebc3b

Browse files
committed
move menu kind to menu module
1 parent 3efb1ab commit dbebc3b

File tree

11 files changed

+34
-45
lines changed

11 files changed

+34
-45
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { UmbSectionSidebarMenuElement } from '../section-sidebar-menu/section-sidebar-menu.element.js';
2-
import type { ManifestSectionSidebarAppMenuWithEntityActionsKind } from '../types.js';
2+
import type { ManifestSectionSidebarAppMenuWithEntityActionsKind } from '../section-sidebar-menu/types.js';
33
import { css, html, customElement } from '@umbraco-cms/backoffice/external/lit';
44
import type { UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';
55
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';

src/packages/core/section/section-sidebar-menu/section-sidebar-menu.element.ts renamed to src/packages/core/menu/section-sidebar-menu/section-sidebar-menu.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ManifestSectionSidebarAppBaseMenu, ManifestSectionSidebarAppMenuKind } from '../types.js';
1+
import type { ManifestSectionSidebarAppBaseMenu, ManifestSectionSidebarAppMenuKind } from './types.js';
22
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
33
import { css, html, customElement, property } from '@umbraco-cms/backoffice/external/lit';
44
import type { ManifestMenu, UmbExtensionManifestKind } from '@umbraco-cms/backoffice/extension-registry';
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { ManifestSectionSidebarApp } from '@umbraco-cms/backoffice/section';
2+
3+
export interface MetaSectionSidebarAppMenuKind {
4+
label: string;
5+
menu: string;
6+
}
7+
8+
export interface ManifestSectionSidebarAppBaseMenu extends ManifestSectionSidebarApp {
9+
type: 'sectionSidebarApp';
10+
meta: MetaSectionSidebarAppMenuKind;
11+
}
12+
13+
export interface ManifestSectionSidebarAppMenuKind extends ManifestSectionSidebarAppBaseMenu {
14+
type: 'sectionSidebarApp';
15+
kind: 'menu';
16+
}
17+
18+
export interface ManifestSectionSidebarAppMenuWithEntityActionsKind extends ManifestSectionSidebarAppBaseMenu {
19+
type: 'sectionSidebarApp';
20+
kind: 'menuWithEntityActions';
21+
meta: MetaSectionSidebarAppMenuWithEntityActionsKind;
22+
}
23+
24+
export interface MetaSectionSidebarAppMenuWithEntityActionsKind extends MetaSectionSidebarAppMenuKind {
25+
entityType: string;
26+
}

src/packages/core/section/extensions/index.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ManifestSectionRoute } from './section-route.extension.js';
2-
import type { ManifestSectionSidebarApp, ManifestSectionSidebarAppMenuKind } from './section-sidebar-app.extension.js';
2+
import type { ManifestSectionSidebarApp } from './section-sidebar-app.extension.js';
33
import type { ManifestSectionView } from './section-view.extension.js';
44
import type { ManifestSection } from './section.extension.js';
55

@@ -10,12 +10,7 @@ export type * from './section.extension.js';
1010

1111
export type * from './types.js';
1212

13-
type UmbSectionExtensions =
14-
| ManifestSection
15-
| ManifestSectionRoute
16-
| ManifestSectionSidebarApp
17-
| ManifestSectionSidebarAppMenuKind
18-
| ManifestSectionView;
13+
type UmbSectionExtensions = ManifestSection | ManifestSectionRoute | ManifestSectionSidebarApp | ManifestSectionView;
1914

2015
declare global {
2116
interface UmbExtensionManifestMap {

src/packages/core/section/extensions/section-sidebar-app.extension.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,3 @@ export interface ManifestSectionSidebarApp
66
ManifestWithDynamicConditions<UmbExtensionCondition> {
77
type: 'sectionSidebarApp';
88
}
9-
10-
export interface ManifestSectionSidebarAppBaseMenu extends ManifestSectionSidebarApp {
11-
type: 'sectionSidebarApp';
12-
meta: MetaSectionSidebarAppMenuKind;
13-
}
14-
15-
export interface ManifestSectionSidebarAppMenuKind extends ManifestSectionSidebarAppBaseMenu {
16-
type: 'sectionSidebarApp';
17-
kind: 'menu';
18-
}
19-
20-
export interface MetaSectionSidebarAppMenuKind {
21-
label: string;
22-
menu: string;
23-
}
24-
25-
export interface ManifestSectionSidebarAppMenuWithEntityActionsKind extends ManifestSectionSidebarAppBaseMenu {
26-
type: 'sectionSidebarApp';
27-
kind: 'menuWithEntityActions';
28-
meta: MetaSectionSidebarAppMenuWithEntityActionsKind;
29-
}
30-
31-
export interface MetaSectionSidebarAppMenuWithEntityActionsKind extends MetaSectionSidebarAppMenuKind {
32-
entityType: string;
33-
}

src/packages/core/section/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export * from './section-default.element.js';
44
export * from './section-main/index.js';
55
export * from './section-picker-modal/section-picker-modal.token.js';
66
export * from './section-sidebar-context-menu/index.js';
7-
export * from './section-sidebar-menu-with-entity-actions/index.js';
8-
export * from './section-sidebar-menu/index.js';
7+
export * from '../menu/section-sidebar-menu-with-entity-actions/index.js';
8+
export * from '../menu/section-sidebar-menu/index.js';
99
export * from './section-sidebar/index.js';
1010
export * from './section.context.js';
1111
export type * from './types.js';

0 commit comments

Comments
 (0)