replace ManifestMenuSectionSidebarApp with kind
This commit is contained in:
@@ -13,7 +13,7 @@ import type { ManifestPropertyAction } from './property-action.models';
|
||||
import type { ManifestPropertyEditorUI, ManifestPropertyEditorModel } from './property-editor.models';
|
||||
import type { ManifestSection } from './section.models';
|
||||
import type { ManifestSectionView } from './section-view.models';
|
||||
import type { ManifestSectionSidebarApp, ManifestMenuSectionSidebarApp } from './section-sidebar-app.models';
|
||||
import type { ManifestSectionSidebarApp } from './section-sidebar-app.models';
|
||||
import type { ManifestMenu } from './menu.models';
|
||||
import type { ManifestMenuItem } from './menu-item.models';
|
||||
import type { ManifestTheme } from './theme.models';
|
||||
@@ -76,7 +76,6 @@ export type ManifestTypes =
|
||||
| ManifestSectionSidebarApp
|
||||
| ManifestSectionSidebarAppMenuKind
|
||||
| ManifestSectionView
|
||||
| ManifestMenuSectionSidebarApp
|
||||
| ManifestMenu
|
||||
| ManifestMenuItem
|
||||
| ManifestTheme
|
||||
@@ -140,7 +139,7 @@ export interface ManifestElement extends ManifestWithLoader<object | HTMLElement
|
||||
js?: string;
|
||||
elementName?: string;
|
||||
//loader?: () => Promise<object | HTMLElement>;
|
||||
meta?: unknown;
|
||||
meta?: any;
|
||||
}
|
||||
|
||||
export interface ManifestWithView extends ManifestElement {
|
||||
|
||||
@@ -9,6 +9,7 @@ export interface ConditionsSectionSidebarApp {
|
||||
sections: Array<string>;
|
||||
}
|
||||
|
||||
/*
|
||||
// TODO: this is a temp solution until we implement kinds
|
||||
export interface ManifestMenuSectionSidebarApp extends Omit<ManifestSectionSidebarApp, 'type'> {
|
||||
type: 'menuSectionSidebarApp';
|
||||
@@ -20,3 +21,4 @@ export interface MetaMenuSectionSidebarApp {
|
||||
label: string;
|
||||
menu: string;
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MEDIA_REPOSITORY_ALIAS } from './media/repository/manifests';
|
||||
import type { ManifestDashboardCollection, ManifestSection, ManifestMenuSectionSidebarApp } from '@umbraco-cms/models';
|
||||
import type { ManifestDashboardCollection, ManifestSection, ManifestTypes } from '@umbraco-cms/models';
|
||||
|
||||
const sectionAlias = 'Umb.Section.Media';
|
||||
|
||||
@@ -32,8 +32,9 @@ const dashboards: Array<ManifestDashboardCollection> = [
|
||||
},
|
||||
];
|
||||
|
||||
const menuSectionSidebarApp: ManifestMenuSectionSidebarApp = {
|
||||
type: 'menuSectionSidebarApp',
|
||||
const menuSectionSidebarApp: ManifestTypes = {
|
||||
type: 'sectionSidebarApp',
|
||||
kind: 'Umb.Kind.Menu',
|
||||
alias: 'Umb.SectionSidebarMenu.Media',
|
||||
name: 'Media Section Sidebar Menu',
|
||||
weight: 100,
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import type { ManifestDashboard, ManifestSection, ManifestMenuSectionSidebarApp } from '@umbraco-cms/models';
|
||||
import type {
|
||||
ManifestDashboard,
|
||||
ManifestSection,
|
||||
ManifestMenuSectionSidebarApp,
|
||||
ManifestTypes,
|
||||
} from '@umbraco-cms/models';
|
||||
|
||||
const sectionAlias = 'Umb.Section.Members';
|
||||
|
||||
@@ -30,8 +35,9 @@ const dashboards: Array<ManifestDashboard> = [
|
||||
},
|
||||
];
|
||||
|
||||
const menuSectionSidebarApp: ManifestMenuSectionSidebarApp = {
|
||||
type: 'menuSectionSidebarApp',
|
||||
const menuSectionSidebarApp: ManifestTypes = {
|
||||
type: 'sectionSidebarApp',
|
||||
kind: 'Umb.Kind.Menu',
|
||||
alias: 'Umb.SectionSidebarMenu.Members',
|
||||
name: 'Members Section Sidebar Menu',
|
||||
weight: 100,
|
||||
|
||||
@@ -46,14 +46,14 @@ export class UmbSectionSidebarMenuElement extends UmbLitElement {
|
||||
];
|
||||
|
||||
@property()
|
||||
manifest?: ManifestMenuSectionSidebarApp;
|
||||
manifest?: ManifestSectionSidebarApp;
|
||||
|
||||
render() {
|
||||
// TODO: link to dashboards when clicking on the menu item header
|
||||
return html` <h3>${this.manifest?.meta.label}</h3>
|
||||
return html` <h3>${this.manifest?.meta?.label}</h3>
|
||||
<umb-extension-slot
|
||||
type="menu"
|
||||
.filter=${(menu: ManifestMenu) => menu.alias === this.manifest!.meta.menu}
|
||||
.filter=${(menu: ManifestMenu) => menu.alias === this.manifest?.meta?.menu}
|
||||
default-element="umb-menu"></umb-extension-slot>`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ManifestMenuSectionSidebarApp, ManifestMenu } from '@umbraco-cms/extensions-registry';
|
||||
import { ManifestMenu, ManifestTypes } from '@umbraco-cms/extensions-registry';
|
||||
|
||||
const menu: ManifestMenu = {
|
||||
type: 'menu',
|
||||
@@ -9,8 +9,9 @@ const menu: ManifestMenu = {
|
||||
},
|
||||
};
|
||||
|
||||
const menuSectionSidebarApp: ManifestMenuSectionSidebarApp = {
|
||||
type: 'menuSectionSidebarApp',
|
||||
const menuSectionSidebarApp: ManifestTypes = {
|
||||
type: 'sectionSidebarApp',
|
||||
kind: 'Umb.Kind.Menu',
|
||||
alias: 'Umb.SectionSidebarMenu.Templating',
|
||||
name: 'Templating Section Sidebar Menu',
|
||||
weight: 100,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ManifestDashboard, ManifestSection, ManifestMenuSectionSidebarApp } from '@umbraco-cms/models';
|
||||
import type { ManifestDashboard, ManifestSection, ManifestTypes } from '@umbraco-cms/models';
|
||||
|
||||
const sectionAlias = 'Umb.Section.Translation';
|
||||
|
||||
@@ -13,8 +13,9 @@ const section: ManifestSection = {
|
||||
},
|
||||
};
|
||||
|
||||
const menuSectionSidebarApp: ManifestMenuSectionSidebarApp = {
|
||||
type: 'menuSectionSidebarApp',
|
||||
const menuSectionSidebarApp: ManifestTypes = {
|
||||
type: 'sectionSidebarApp',
|
||||
kind: 'Umb.Kind.Menu',
|
||||
alias: 'Umb.SidebarMenu.Dictionary',
|
||||
name: 'Dictionary Sidebar Menu',
|
||||
weight: 100,
|
||||
|
||||
Reference in New Issue
Block a user