Merge pull request #202 from umbraco/feature/weight-property-on-all-manifests
Feature/Weight property on all manifests
This commit is contained in:
@@ -566,13 +566,9 @@ components:
|
||||
type: string
|
||||
pathname:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- label
|
||||
- pathname
|
||||
- weight
|
||||
IManifestSection:
|
||||
type: object
|
||||
properties:
|
||||
@@ -590,6 +586,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -634,6 +633,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -642,15 +644,11 @@ components:
|
||||
MetaTree:
|
||||
type: object
|
||||
properties:
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
sections:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
required:
|
||||
- weight
|
||||
- sections
|
||||
IManifestTree:
|
||||
type: object
|
||||
@@ -669,6 +667,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -698,6 +699,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -729,6 +733,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -743,9 +750,6 @@ components:
|
||||
type: string
|
||||
pathname:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
label:
|
||||
type: string
|
||||
icon:
|
||||
@@ -753,7 +757,6 @@ components:
|
||||
required:
|
||||
- editors
|
||||
- pathname
|
||||
- weight
|
||||
- label
|
||||
- icon
|
||||
IManifestEditorView:
|
||||
@@ -773,6 +776,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -789,14 +795,10 @@ components:
|
||||
type: string
|
||||
icon:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- trees
|
||||
- label
|
||||
- icon
|
||||
- weight
|
||||
IManifestTreeItemAction:
|
||||
type: object
|
||||
properties:
|
||||
@@ -814,6 +816,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -911,6 +916,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -925,15 +933,11 @@ components:
|
||||
type: string
|
||||
pathname:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
label:
|
||||
type: string
|
||||
required:
|
||||
- sections
|
||||
- pathname
|
||||
- weight
|
||||
IManifestDashboard:
|
||||
type: object
|
||||
properties:
|
||||
@@ -951,6 +955,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -982,6 +989,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -1011,6 +1021,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- meta
|
||||
@@ -1029,6 +1042,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- js
|
||||
@@ -1047,6 +1063,9 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
weight:
|
||||
type: number
|
||||
format: float
|
||||
required:
|
||||
- type
|
||||
- alias
|
||||
|
||||
@@ -142,8 +142,6 @@ export interface components {
|
||||
MetaSection: {
|
||||
label: string;
|
||||
pathname: string;
|
||||
/** Format: float */
|
||||
weight: number;
|
||||
};
|
||||
IManifestSection: {
|
||||
/** @enum {string} */
|
||||
@@ -153,6 +151,8 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
MetaSectionView: {
|
||||
sections: string[];
|
||||
@@ -170,10 +170,10 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
MetaTree: {
|
||||
/** Format: float */
|
||||
weight: number;
|
||||
sections: string[];
|
||||
};
|
||||
IManifestTree: {
|
||||
@@ -184,6 +184,8 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
MetaEditor: {
|
||||
entityType: string;
|
||||
@@ -196,6 +198,8 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
MetaEditorAction: {
|
||||
editors: string[];
|
||||
@@ -208,12 +212,12 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
MetaEditorView: {
|
||||
editors: string[];
|
||||
pathname: string;
|
||||
/** Format: float */
|
||||
weight: number;
|
||||
label: string;
|
||||
icon: string;
|
||||
};
|
||||
@@ -225,13 +229,13 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
MetaTreeItemAction: {
|
||||
trees: string[];
|
||||
label: string;
|
||||
icon: string;
|
||||
/** Format: float */
|
||||
weight: number;
|
||||
};
|
||||
IManifestTreeItemAction: {
|
||||
/** @enum {string} */
|
||||
@@ -241,6 +245,8 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
PropertyEditorConfigProperty: {
|
||||
label: string;
|
||||
@@ -282,12 +288,12 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
MetaDashboard: {
|
||||
sections: string[];
|
||||
pathname: string;
|
||||
/** Format: float */
|
||||
weight: number;
|
||||
label?: string;
|
||||
};
|
||||
IManifestDashboard: {
|
||||
@@ -298,6 +304,8 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
MetaPropertyAction: {
|
||||
propertyEditors: string[];
|
||||
@@ -310,6 +318,8 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
MetaPackageView: {
|
||||
packageAlias: string;
|
||||
@@ -322,6 +332,8 @@ export interface components {
|
||||
elementName?: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
IManifestEntrypoint: {
|
||||
/** @enum {string} */
|
||||
@@ -329,6 +341,8 @@ export interface components {
|
||||
js: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
IManifestCustom: {
|
||||
/** @enum {string} */
|
||||
@@ -336,6 +350,8 @@ export interface components {
|
||||
meta?: { [key: string]: unknown };
|
||||
alias: string;
|
||||
name: string;
|
||||
/** Format: float */
|
||||
weight?: number;
|
||||
};
|
||||
Manifest:
|
||||
| components["schemas"]["IManifestSection"]
|
||||
|
||||
@@ -37,11 +37,6 @@ export class UmbEditorExtensionsElement extends UmbContextConsumerMixin(LitEleme
|
||||
this._extensionsSubscription = this._extensionRegistry.extensions.subscribe((extensions) => {
|
||||
this._extensions = [...extensions]; // TODO: Though, this is a shallow clone, wouldn't we either do a deep clone or no clone at all?
|
||||
});
|
||||
|
||||
this._extensionsSubscription = this._extensionRegistry.extensionsOfType('section').subscribe((sections) => {
|
||||
// In this callback sections are typed. Example meta.weight...
|
||||
console.log(sections[0].meta.weight);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -122,13 +122,7 @@ export class UmbEditorEntityLayout extends UmbContextConsumerMixin(LitElement) {
|
||||
|
||||
this._editorViewsSubscription = this._extensionRegistry
|
||||
?.extensionsOfType('editorView')
|
||||
.pipe(
|
||||
map((extensions) =>
|
||||
extensions
|
||||
.filter((extension) => extension.meta.editors.includes(this.alias))
|
||||
.sort((a, b) => b.meta.weight - a.meta.weight)
|
||||
)
|
||||
)
|
||||
.pipe(map((extensions) => extensions.filter((extension) => extension.meta.editors.includes(this.alias))))
|
||||
.subscribe((editorViews) => {
|
||||
this._editorViews = editorViews;
|
||||
this._createRoutes();
|
||||
|
||||
@@ -11,10 +11,10 @@ export class UmbSectionContext {
|
||||
name: '',
|
||||
js: '',
|
||||
elementName: '',
|
||||
weight: 0,
|
||||
meta: {
|
||||
label: '',
|
||||
pathname: '',
|
||||
weight: 0,
|
||||
},
|
||||
});
|
||||
public readonly data = this._data.asObservable();
|
||||
|
||||
@@ -94,9 +94,7 @@ export class UmbSectionDashboardsElement extends UmbContextConsumerMixin(LitElem
|
||||
?.extensionsOfType('dashboard')
|
||||
.pipe(
|
||||
map((extensions) =>
|
||||
extensions
|
||||
.filter((extension) => extension.meta.sections.includes(this._currentSectionAlias))
|
||||
.sort((a, b) => b.meta.weight - a.meta.weight)
|
||||
extensions.filter((extension) => extension.meta.sections.includes(this._currentSectionAlias))
|
||||
)
|
||||
)
|
||||
.subscribe((dashboards) => {
|
||||
|
||||
@@ -48,14 +48,13 @@ export class UmbSectionTreesElement extends UmbContextConsumerMixin(LitElement)
|
||||
if (!section) return EMPTY;
|
||||
|
||||
return (
|
||||
this._extensionStore?.extensionsOfType('tree').pipe(
|
||||
map((trees) =>
|
||||
trees
|
||||
.filter((tree) => tree.meta.sections.includes(section.alias))
|
||||
.sort((a, b) => b.meta.weight - a.meta.weight)
|
||||
.map((tree) => tree.alias)
|
||||
)
|
||||
) ?? of([])
|
||||
this._extensionStore
|
||||
?.extensionsOfType('tree')
|
||||
.pipe(
|
||||
map((trees) =>
|
||||
trees.filter((tree) => tree.meta.sections.includes(section.alias)).map((tree) => tree.alias)
|
||||
)
|
||||
) ?? of([])
|
||||
);
|
||||
})
|
||||
)
|
||||
|
||||
@@ -95,13 +95,7 @@ export class UmbSectionElement extends UmbContextConsumerMixin(LitElement) {
|
||||
return (
|
||||
this._extensionRegistry
|
||||
?.extensionsOfType('tree')
|
||||
.pipe(
|
||||
map((trees) =>
|
||||
trees
|
||||
.filter((tree) => tree.meta.sections.includes(section.alias))
|
||||
.sort((a, b) => b.meta.weight - a.meta.weight)
|
||||
)
|
||||
) ?? of([])
|
||||
.pipe(map((trees) => trees.filter((tree) => tree.meta.sections.includes(section.alias)))) ?? of([])
|
||||
);
|
||||
})
|
||||
)
|
||||
|
||||
@@ -90,11 +90,9 @@ export class UmbTreeContextMenuPageActionListElement extends UmbContextConsumerM
|
||||
}
|
||||
|
||||
private _renderActions() {
|
||||
return this._actions
|
||||
.sort((a, b) => a.meta.weight - b.meta.weight)
|
||||
.map((action) => {
|
||||
return html`<umb-tree-item-action-extension .treeAction=${action}></umb-tree-item-action-extension> `;
|
||||
});
|
||||
return this._actions.map((action) => {
|
||||
return html`<umb-tree-item-action-extension .treeAction=${action}></umb-tree-item-action-extension> `;
|
||||
});
|
||||
}
|
||||
|
||||
disconnectedCallback(): void {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export * from './extension.registry';
|
||||
export * from './registry/extension.registry';
|
||||
export * from './create-extension-element.function';
|
||||
export * from './load-extension.function';
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
import { expect } from '@open-wc/testing';
|
||||
import type { ManifestTypes } from '../../models';
|
||||
import { UmbExtensionRegistry } from './extension.registry';
|
||||
|
||||
describe('UmbContextRequestEvent', () => {
|
||||
let extensionRegistry: UmbExtensionRegistry;
|
||||
let manifests: Array<ManifestTypes>;
|
||||
|
||||
beforeEach(() => {
|
||||
extensionRegistry = new UmbExtensionRegistry();
|
||||
manifests = [
|
||||
{
|
||||
type: 'section',
|
||||
name: 'test-section-1',
|
||||
alias: 'Umb.Test.Section.1',
|
||||
weight: 1,
|
||||
meta: {
|
||||
label: 'Test Section 1',
|
||||
pathname: 'test-section-1',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'section',
|
||||
name: 'test-section-2',
|
||||
alias: 'Umb.Test.Section.2',
|
||||
weight: 200,
|
||||
meta: {
|
||||
label: 'Test Section 2',
|
||||
pathname: 'test-section-2',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'section',
|
||||
name: 'test-section-3',
|
||||
alias: 'Umb.Test.Section.3',
|
||||
weight: 25,
|
||||
meta: {
|
||||
label: 'Test Section 3',
|
||||
pathname: 'test-section-3',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'editor',
|
||||
name: 'test-editor-1',
|
||||
alias: 'Umb.Test.Editor.1',
|
||||
meta: {
|
||||
entityType: 'testEntity',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
manifests.forEach((manifest) => extensionRegistry.register(manifest));
|
||||
});
|
||||
|
||||
it('should register an extension', () => {
|
||||
const registeredExtensions = extensionRegistry['_extensions'].getValue();
|
||||
expect(registeredExtensions).to.have.lengthOf(4);
|
||||
expect(registeredExtensions?.[0]?.name).to.eq('test-section-1');
|
||||
});
|
||||
|
||||
it('should get an extension by alias', (done) => {
|
||||
const alias = 'Umb.Test.Section.1';
|
||||
extensionRegistry.getByAlias(alias).subscribe((extension) => {
|
||||
expect(extension?.alias).to.eq(alias);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
describe('getByType', () => {
|
||||
const type = 'section';
|
||||
|
||||
it('should get all extensions by type', (done) => {
|
||||
extensionRegistry.extensionsOfType(type).subscribe((extensions) => {
|
||||
expect(extensions).to.have.lengthOf(3);
|
||||
expect(extensions?.[0]?.type).to.eq(type);
|
||||
expect(extensions?.[1]?.type).to.eq(type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should return extensions ordered by weight', (done) => {
|
||||
extensionRegistry.extensionsOfType(type).subscribe((extensions) => {
|
||||
expect(extensions?.[0]?.weight).to.eq(200);
|
||||
expect(extensions?.[1]?.weight).to.eq(25);
|
||||
expect(extensions?.[2]?.weight).to.eq(1);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -14,8 +14,8 @@ import type {
|
||||
ManifestEditorAction,
|
||||
ManifestCustom,
|
||||
ManifestPackageView,
|
||||
} from '../models';
|
||||
import { createExtensionElement } from './create-extension-element.function';
|
||||
} from '../../models';
|
||||
import { createExtensionElement } from '../create-extension-element.function';
|
||||
|
||||
export type UmbExtensionManifestJSModel = {
|
||||
elementName?: string;
|
||||
@@ -74,6 +74,14 @@ export class UmbExtensionRegistry {
|
||||
extensionsOfType(type: 'custom'): Observable<Array<ManifestCustom>>;
|
||||
extensionsOfType<T extends ManifestTypes>(type: string): Observable<Array<T>>;
|
||||
extensionsOfType(type: string): Observable<Array<ManifestTypes>> {
|
||||
return this.extensions.pipe(map((exts) => exts.filter((ext) => ext.type === type)));
|
||||
return this.extensions.pipe(
|
||||
map((exts) =>
|
||||
exts
|
||||
.filter((ext) => ext.type === type)
|
||||
.sort((a, b) => {
|
||||
return (b.weight || 0) - (a.weight || 0);
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -20,9 +20,7 @@ export class UmbSectionStore {
|
||||
this._allowedSection = data.sections;
|
||||
*/
|
||||
|
||||
return this._extensionRegistry
|
||||
?.extensionsOfType('section')
|
||||
.pipe(map((extensions) => extensions.sort((a, b) => b.meta.weight - a.meta.weight)));
|
||||
return this._extensionRegistry?.extensionsOfType('section');
|
||||
}
|
||||
|
||||
public setCurrent(alias: string) {
|
||||
|
||||
@@ -16,10 +16,10 @@ export const manifestDevelopmentHandler = rest.get(umbracoPath('/manifests'), (_
|
||||
name: 'Custom Section',
|
||||
js: '/src/mocks/App_Plugins/section.js',
|
||||
elementName: 'my-section-custom',
|
||||
weight: 1,
|
||||
meta: {
|
||||
label: 'Custom',
|
||||
pathname: 'my-custom',
|
||||
weight: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { ManifestTypes } from '../core/models';
|
||||
import { manifests as propertyEditorUIManifests } from './property-editor-ui';
|
||||
|
||||
// TODO: consider moving weight from meta to the main part of the manifest. We need it for every extension.
|
||||
export const internalManifests: Array<ManifestTypes & { loader: () => Promise<object | HTMLElement> }> = [
|
||||
...propertyEditorUIManifests,
|
||||
{
|
||||
@@ -10,10 +9,10 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Content Section',
|
||||
elementName: 'umb-content-section',
|
||||
loader: () => import('../backoffice/sections/content/content-section.element'),
|
||||
weight: 50,
|
||||
meta: {
|
||||
label: 'Content',
|
||||
pathname: 'content', // TODO: how to we want to support pretty urls?
|
||||
weight: 50,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -22,10 +21,10 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Media Section',
|
||||
elementName: 'umb-media-section',
|
||||
loader: () => import('../backoffice/sections/media/media-section.element'),
|
||||
weight: 50,
|
||||
meta: {
|
||||
label: 'Media',
|
||||
pathname: 'media', // TODO: how to we want to support pretty urls?
|
||||
weight: 50,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -34,10 +33,10 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Members Section',
|
||||
elementName: 'umb-section-members',
|
||||
loader: () => import('../backoffice/sections/members/section-members.element'),
|
||||
weight: 30,
|
||||
meta: {
|
||||
label: 'Members',
|
||||
pathname: 'members',
|
||||
weight: 30,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -45,10 +44,10 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.Section.Settings',
|
||||
name: 'Settings Section',
|
||||
loader: () => import('../backoffice/sections/settings/settings-section.element'),
|
||||
weight: 20,
|
||||
meta: {
|
||||
label: 'Settings',
|
||||
pathname: 'settings', // TODO: how to we want to support pretty urls?
|
||||
weight: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -57,10 +56,10 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Packages Section',
|
||||
elementName: 'umb-packages-section',
|
||||
loader: () => import('../backoffice/sections/packages/packages-section.element'),
|
||||
weight: 20,
|
||||
meta: {
|
||||
label: 'Packages',
|
||||
pathname: 'packages',
|
||||
weight: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -68,10 +67,10 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.Section.Users',
|
||||
name: 'Users',
|
||||
loader: () => import('../backoffice/sections/users/section-users.element'),
|
||||
weight: 20,
|
||||
meta: {
|
||||
label: 'Users',
|
||||
pathname: 'users',
|
||||
weight: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -80,11 +79,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Welcome Dashboard',
|
||||
elementName: 'umb-dashboard-welcome',
|
||||
loader: () => import('../backoffice/dashboards/welcome/dashboard-welcome.element'),
|
||||
weight: 20,
|
||||
meta: {
|
||||
label: 'Welcome',
|
||||
sections: ['Umb.Section.Content'],
|
||||
pathname: 'welcome', // TODO: how to we want to support pretty urls?
|
||||
weight: 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -93,11 +92,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Redirect Management Dashboard',
|
||||
elementName: 'umb-dashboard-redirect-management',
|
||||
loader: () => import('../backoffice/dashboards/redirect-management/dashboard-redirect-management.element'),
|
||||
weight: 10,
|
||||
meta: {
|
||||
label: 'Redirect Management',
|
||||
sections: ['Umb.Section.Content'],
|
||||
pathname: 'redirect-management', // TODO: how to we want to support pretty urls?
|
||||
weight: 10,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -106,11 +105,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Welcome Settings Dashboard',
|
||||
elementName: 'umb-dashboard-settings-welcome',
|
||||
loader: () => import('../backoffice/dashboards/settings-welcome/dashboard-settings-welcome.element'),
|
||||
weight: 10,
|
||||
meta: {
|
||||
label: 'Welcome',
|
||||
sections: ['Umb.Section.Settings'],
|
||||
pathname: 'welcome', // TODO: how to we want to support pretty urls?
|
||||
weight: 10,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -119,11 +118,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Telemetry',
|
||||
elementName: 'umb-dashboard-telemetry',
|
||||
loader: () => import('../backoffice/dashboards/telemetry/dashboard-telemetry.element'),
|
||||
weight: 0,
|
||||
meta: {
|
||||
label: 'Telemetry Data',
|
||||
sections: ['Umb.Section.Settings'],
|
||||
pathname: 'telemetry', // TODO: how do we want to support pretty urls?
|
||||
weight: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -132,11 +131,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Examine Management Dashboard',
|
||||
elementName: 'umb-dashboard-examine-management',
|
||||
loader: () => import('../backoffice/dashboards/examine-management/dashboard-examine-management.element'),
|
||||
weight: 10,
|
||||
meta: {
|
||||
label: 'Examine Management',
|
||||
sections: ['Umb.Section.Settings'],
|
||||
pathname: 'examine-management', // TODO: how to we want to support pretty urls?
|
||||
weight: 10,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -145,11 +144,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Models Builder Dashboard',
|
||||
elementName: 'umb-dashboard-models-builder',
|
||||
loader: () => import('../backoffice/dashboards/models-builder/dashboard-models-builder.element'),
|
||||
weight: 10,
|
||||
meta: {
|
||||
label: 'Models Builder',
|
||||
sections: ['Umb.Section.Settings'],
|
||||
pathname: 'models-builder', // TODO: how to we want to support pretty urls?
|
||||
weight: 10,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -158,11 +157,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Published Status Dashboard',
|
||||
elementName: 'umb-dashboard-published-status',
|
||||
loader: () => import('../backoffice/dashboards/published-status/dashboard-published-status.element'),
|
||||
weight: 9,
|
||||
meta: {
|
||||
label: 'Published Status',
|
||||
sections: ['Umb.Section.Settings'],
|
||||
pathname: 'published-status', // TODO: how to we want to support pretty urls?
|
||||
weight: 9,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -171,11 +170,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Media Dashboard',
|
||||
elementName: 'umb-dashboard-media-management',
|
||||
loader: () => import('../backoffice/dashboards/media-management/dashboard-media-management.element'),
|
||||
weight: 10,
|
||||
meta: {
|
||||
label: 'Media',
|
||||
sections: ['Umb.Section.Media'],
|
||||
pathname: 'media-management', // TODO: how to we want to support pretty urls?
|
||||
weight: 10,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -184,13 +183,13 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Content Editor Edit View',
|
||||
elementName: 'umb-editor-view-node-edit',
|
||||
loader: () => import('../backoffice/editors/shared/node/views/edit/editor-view-node-edit.element'),
|
||||
weight: 100,
|
||||
meta: {
|
||||
// TODO: how do we want to filter where editor views are shown? https://our.umbraco.com/documentation/extending/Content-Apps/#setting-up-the-plugin
|
||||
// this is a temp solution
|
||||
editors: ['Umb.Editor.Document', 'Umb.Editor.Media'],
|
||||
label: 'Info',
|
||||
pathname: 'content',
|
||||
weight: 100,
|
||||
icon: 'document',
|
||||
},
|
||||
},
|
||||
@@ -200,13 +199,13 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Content Editor Info View',
|
||||
elementName: 'umb-editor-view-node-info',
|
||||
loader: () => import('../backoffice/editors/shared/node/views/info/editor-view-node-info.element'),
|
||||
weight: 90,
|
||||
meta: {
|
||||
// TODO: how do we want to filter where editor views are shown? https://our.umbraco.com/documentation/extending/Content-Apps/#setting-up-the-plugin
|
||||
// this is a temp solution
|
||||
editors: ['Umb.Editor.Document', 'Umb.Editor.Media'],
|
||||
label: 'Info',
|
||||
pathname: 'info',
|
||||
weight: 90,
|
||||
icon: 'info',
|
||||
},
|
||||
},
|
||||
@@ -215,13 +214,13 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.EditorView.DataType.Edit',
|
||||
name: 'Data Type Editor Edit View',
|
||||
loader: () => import('../backoffice/editors/data-type/views/edit/editor-view-data-type-edit.element'),
|
||||
weight: 90,
|
||||
meta: {
|
||||
// TODO: how do we want to filter where editor views are shown? https://our.umbraco.com/documentation/extending/Content-Apps/#setting-up-the-plugin
|
||||
// this is a temp solution
|
||||
editors: ['Umb.Editor.DataType'],
|
||||
label: 'Edit',
|
||||
pathname: 'edit',
|
||||
weight: 90,
|
||||
icon: 'edit',
|
||||
},
|
||||
},
|
||||
@@ -230,13 +229,13 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.EditorView.DataType.Info',
|
||||
name: 'Data Type Editor Info View',
|
||||
loader: () => import('../backoffice/editors/data-type/views/info/editor-view-data-type-info.element'),
|
||||
weight: 90,
|
||||
meta: {
|
||||
// TODO: how do we want to filter where editor views are shown? https://our.umbraco.com/documentation/extending/Content-Apps/#setting-up-the-plugin
|
||||
// this is a temp solution
|
||||
editors: ['Umb.Editor.DataType'],
|
||||
label: 'Info',
|
||||
pathname: 'info',
|
||||
weight: 90,
|
||||
icon: 'info',
|
||||
},
|
||||
},
|
||||
@@ -246,13 +245,13 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Document Type Editor Design View',
|
||||
elementName: 'umb-editor-view-document-type-design',
|
||||
loader: () => import('../backoffice/editors/document-type/views/editor-view-document-type-design.element'),
|
||||
weight: 90,
|
||||
meta: {
|
||||
// TODO: how do we want to filter where editor views are shown? https://our.umbraco.com/documentation/extending/Content-Apps/#setting-up-the-plugin
|
||||
// this is a temp solution
|
||||
editors: ['Umb.Editor.DocumentType'],
|
||||
label: 'Design',
|
||||
pathname: 'design',
|
||||
weight: 90,
|
||||
icon: 'edit',
|
||||
},
|
||||
},
|
||||
@@ -262,12 +261,12 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Packages Editor Overview View',
|
||||
elementName: 'umb-packages-overview',
|
||||
loader: () => import('../backoffice/sections/packages/packages-overview.element'),
|
||||
weight: 10,
|
||||
meta: {
|
||||
icon: 'document',
|
||||
label: 'Packages',
|
||||
pathname: 'repo',
|
||||
editors: ['Umb.Editor.Packages'],
|
||||
weight: 10,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -276,12 +275,12 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Packages Editor Installed View',
|
||||
elementName: 'umb-packages-installed',
|
||||
loader: () => import('../backoffice/sections/packages/packages-installed.element'),
|
||||
weight: 0,
|
||||
meta: {
|
||||
icon: 'document',
|
||||
label: 'Installed',
|
||||
pathname: 'installed',
|
||||
editors: ['Umb.Editor.Packages'],
|
||||
weight: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -336,8 +335,8 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.Tree.DataTypes',
|
||||
name: 'Data Types Tree',
|
||||
loader: () => import('../backoffice/trees/data-types/tree-data-types.element'),
|
||||
weight: 1,
|
||||
meta: {
|
||||
weight: 1,
|
||||
sections: ['Umb.Section.Settings'],
|
||||
},
|
||||
},
|
||||
@@ -346,8 +345,8 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.Tree.DocumentTypes',
|
||||
name: 'Document Types Tree',
|
||||
loader: () => import('../backoffice/trees/document-types/tree-document-types.element'),
|
||||
weight: 2,
|
||||
meta: {
|
||||
weight: 2,
|
||||
sections: ['Umb.Section.Settings'],
|
||||
},
|
||||
},
|
||||
@@ -357,8 +356,8 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
name: 'Members Test',
|
||||
elementName: 'umb-dashboard-welcome',
|
||||
loader: () => import('../backoffice/dashboards/welcome/dashboard-welcome.element'),
|
||||
weight: -10,
|
||||
meta: {
|
||||
weight: -10,
|
||||
pathname: 'welcome',
|
||||
sections: ['Umb.Section.Members'],
|
||||
},
|
||||
@@ -368,8 +367,8 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.Tree.Members',
|
||||
name: 'Members Tree',
|
||||
loader: () => import('../backoffice/trees/members/tree-members.element'),
|
||||
weight: 0,
|
||||
meta: {
|
||||
weight: 0,
|
||||
sections: ['Umb.Section.Members'],
|
||||
},
|
||||
},
|
||||
@@ -378,8 +377,8 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.Tree.MemberGroups',
|
||||
name: 'Members Groups Tree',
|
||||
loader: () => import('../backoffice/trees/member-groups/tree-member-groups.element'),
|
||||
weight: 1,
|
||||
meta: {
|
||||
weight: 1,
|
||||
sections: ['Umb.Section.Members'],
|
||||
},
|
||||
},
|
||||
@@ -388,8 +387,8 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.Tree.Extensions',
|
||||
name: 'Extensions Tree',
|
||||
loader: () => import('../backoffice/trees/extensions/tree-extensions.element'),
|
||||
weight: 3,
|
||||
meta: {
|
||||
weight: 3,
|
||||
sections: ['Umb.Section.Settings'],
|
||||
},
|
||||
},
|
||||
@@ -398,8 +397,8 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.Tree.Media',
|
||||
name: 'Media Tree',
|
||||
loader: () => import('../backoffice/trees/media/tree-media.element'),
|
||||
weight: 100,
|
||||
meta: {
|
||||
weight: 100,
|
||||
sections: ['Umb.Section.Media'],
|
||||
},
|
||||
},
|
||||
@@ -408,8 +407,8 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.Tree.Content',
|
||||
name: 'Content Tree',
|
||||
loader: () => import('../backoffice/trees/documents/tree-documents.element'),
|
||||
weight: 100,
|
||||
meta: {
|
||||
weight: 100,
|
||||
sections: ['Umb.Section.Content'],
|
||||
},
|
||||
},
|
||||
@@ -481,11 +480,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.TreeItemAction.Document.Create',
|
||||
name: 'Document Tree Item Action Create',
|
||||
loader: () => import('../backoffice/trees/documents/actions/action-document-create.element'),
|
||||
weight: 100,
|
||||
meta: {
|
||||
trees: ['Umb.Tree.Content'],
|
||||
label: 'Create',
|
||||
icon: 'add',
|
||||
weight: 100,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -493,11 +492,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.TreeItemAction.Document.Delete',
|
||||
name: 'Document Tree Item Action Delete',
|
||||
loader: () => import('../backoffice/trees/documents/actions/action-document-delete.element'),
|
||||
weight: 100,
|
||||
meta: {
|
||||
trees: ['Umb.Tree.Content'],
|
||||
label: 'Delete',
|
||||
icon: 'delete',
|
||||
weight: 100,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -505,11 +504,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.TreeItemAction.Document.Paged',
|
||||
name: 'Document Tree Item Action Paged',
|
||||
loader: () => import('../backoffice/trees/documents/actions/action-document-paged.element'),
|
||||
weight: 100,
|
||||
meta: {
|
||||
trees: ['Umb.Tree.Content'],
|
||||
label: 'Paged',
|
||||
icon: 'favorite',
|
||||
weight: 100,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -517,11 +516,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.TreeItemAction.DataType.Create',
|
||||
name: 'Tree Item Action Create',
|
||||
loader: () => import('../backoffice/trees/data-types/actions/action-data-type-create.element'),
|
||||
weight: 100,
|
||||
meta: {
|
||||
trees: ['Umb.Tree.DataTypes'],
|
||||
label: 'Create',
|
||||
icon: 'add',
|
||||
weight: 100,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -529,11 +528,11 @@ export const internalManifests: Array<ManifestTypes & { loader: () => Promise<ob
|
||||
alias: 'Umb.TreeItemAction.DataType.Delete',
|
||||
name: 'Tree Item Action Delete',
|
||||
loader: () => import('../backoffice/trees/data-types/actions/action-data-type-delete.element'),
|
||||
weight: 100,
|
||||
meta: {
|
||||
trees: ['Umb.Tree.DataTypes'],
|
||||
label: 'Delete',
|
||||
icon: 'delete',
|
||||
weight: 100,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -81,12 +81,12 @@ export interface IManifest {
|
||||
type: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
weight?: number;
|
||||
}
|
||||
|
||||
export interface MetaSection {
|
||||
label: string;
|
||||
pathname: string;
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export interface MetaSectionView {
|
||||
@@ -98,7 +98,6 @@ export interface MetaSectionView {
|
||||
}
|
||||
|
||||
export interface MetaTree {
|
||||
weight: number;
|
||||
sections: Array<string>;
|
||||
}
|
||||
|
||||
@@ -110,7 +109,6 @@ export interface MetaTreeItemAction {
|
||||
trees: Array<string>;
|
||||
label: string;
|
||||
icon: string;
|
||||
weight: number;
|
||||
}
|
||||
export interface MetaPropertyEditorUI {
|
||||
label: string;
|
||||
@@ -123,14 +121,12 @@ export interface MetaPropertyEditorUI {
|
||||
export interface MetaDashboard {
|
||||
sections: string[];
|
||||
pathname: string;
|
||||
weight: number;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export interface MetaEditorView {
|
||||
editors: string[];
|
||||
pathname: string;
|
||||
weight: number;
|
||||
label: string;
|
||||
icon: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user