Merge branch 'main' into feature/multiple-text-string-property-editor
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestCollectionBulkAction extends ManifestElement {
|
||||
type: 'collectionBulkAction';
|
||||
meta: MetaCollectionBulkAction;
|
||||
}
|
||||
|
||||
export interface MetaCollectionBulkAction {
|
||||
label: string;
|
||||
entityType: string;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestCollectionView extends ManifestElement {
|
||||
type: 'collectionView';
|
||||
meta: MetaCollectionView;
|
||||
}
|
||||
|
||||
export interface MetaCollectionView {
|
||||
label: string;
|
||||
icon: string;
|
||||
entityType: string;
|
||||
pathName: string;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import type { ManifestBase } from './models';
|
||||
|
||||
export interface ManifestDashboardCollection extends ManifestBase {
|
||||
type: 'dashboardCollection';
|
||||
meta: MetaDashboardCollection;
|
||||
}
|
||||
|
||||
export interface MetaDashboardCollection {
|
||||
sections: string[];
|
||||
pathname: string;
|
||||
label?: string;
|
||||
entityType: string;
|
||||
storeAlias: string;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestDashboard extends ManifestElement {
|
||||
type: 'dashboard';
|
||||
meta: MetaDashboard;
|
||||
}
|
||||
|
||||
export interface MetaDashboard {
|
||||
sections: string[];
|
||||
pathname: string;
|
||||
label?: string;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestExternalLoginProvider extends ManifestElement {
|
||||
type: 'externalLoginProvider';
|
||||
meta: MetaExternalLoginProvider;
|
||||
}
|
||||
|
||||
export interface MetaExternalLoginProvider {
|
||||
label: string;
|
||||
pathname: string;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestHeaderApp extends ManifestElement {
|
||||
type: 'headerApp';
|
||||
meta: MetaHeaderApp;
|
||||
}
|
||||
|
||||
export interface MetaHeaderApp {
|
||||
pathname: string;
|
||||
label: string;
|
||||
icon: string;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { UmbExtensionRegistry } from '@umbraco-cms/extensions-api';
|
||||
|
||||
export * from './models';
|
||||
export const umbExtensionsRegistry = new UmbExtensionRegistry();
|
||||
102
src/Umbraco.Web.UI.Client/libs/extensions-registry/models.ts
Normal file
102
src/Umbraco.Web.UI.Client/libs/extensions-registry/models.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
import type { ManifestHeaderApp } from './header-app.models';
|
||||
import type { ManifestSection } from './section.models';
|
||||
import type { ManifestSectionView } from './section-view.models';
|
||||
import type { ManifestTree } from './tree.models';
|
||||
import type { ManifestTreeItemAction } from './tree-item-action.models';
|
||||
import type { ManifestWorkspace } from './workspace.models';
|
||||
import type { ManifestWorkspaceAction } from './workspace-action.models';
|
||||
import type { ManifestWorkspaceView } from './workspace-view.models';
|
||||
import type { ManifestWorkspaceViewCollection } from './workspace-view-collection.models';
|
||||
import type { ManifestPropertyEditorUI, ManifestPropertyEditorModel } from './property-editor.models';
|
||||
import type { ManifestDashboard } from './dashboard.models';
|
||||
import type { ManifestDashboardCollection } from './dashboard-collection.models';
|
||||
import type { ManifestUserDashboard } from './user-dashboard.models';
|
||||
import type { ManifestPropertyAction } from './property-action.models';
|
||||
import type { ManifestPackageView } from './package-view.models';
|
||||
import type { ManifestExternalLoginProvider } from './external-login-provider.models';
|
||||
import type { ManifestCollectionBulkAction } from './collection-bulk-action.models';
|
||||
import type { ManifestCollectionView } from './collection-view.models';
|
||||
import type { ManifestSidebarMenuItem } from './sidebar-menu-item.models';
|
||||
|
||||
export * from './header-app.models';
|
||||
export * from './section.models';
|
||||
export * from './section-view.models';
|
||||
export * from './tree.models';
|
||||
export * from './tree-item-action.models';
|
||||
export * from './workspace.models';
|
||||
export * from './workspace-action.models';
|
||||
export * from './workspace-view.models';
|
||||
export * from './workspace-view-collection.models';
|
||||
export * from './property-editor.models';
|
||||
export * from './dashboard.models';
|
||||
export * from './dashboard-collection.models';
|
||||
export * from './user-dashboard.models';
|
||||
export * from './property-action.models';
|
||||
export * from './package-view.models';
|
||||
export * from './external-login-provider.models';
|
||||
export * from './collection-bulk-action.models';
|
||||
export * from './collection-view.models';
|
||||
export * from './sidebar-menu-item.models';
|
||||
|
||||
export type ManifestTypes =
|
||||
| ManifestCustom
|
||||
| ManifestHeaderApp
|
||||
| ManifestSection
|
||||
| ManifestSectionView
|
||||
| ManifestTree
|
||||
| ManifestWorkspace
|
||||
| ManifestWorkspaceAction
|
||||
| ManifestWorkspaceView
|
||||
| ManifestWorkspaceViewCollection
|
||||
| ManifestTreeItemAction
|
||||
| ManifestPropertyEditorUI
|
||||
| ManifestPropertyEditorModel
|
||||
| ManifestDashboard
|
||||
| ManifestDashboardCollection
|
||||
| ManifestUserDashboard
|
||||
| ManifestPropertyAction
|
||||
| ManifestPackageView
|
||||
| ManifestExternalLoginProvider
|
||||
| ManifestEntrypoint
|
||||
| ManifestCollectionBulkAction
|
||||
| ManifestCollectionView
|
||||
| ManifestSidebarMenuItem;
|
||||
|
||||
export type ManifestStandardTypes = ManifestTypes['type'];
|
||||
|
||||
export type ManifestTypeMap = {
|
||||
[Manifest in ManifestTypes as Manifest['type']]: Manifest;
|
||||
};
|
||||
|
||||
export interface ManifestBase {
|
||||
type: string;
|
||||
alias: string;
|
||||
name: string;
|
||||
weight?: number;
|
||||
}
|
||||
|
||||
export interface ManifestElement extends ManifestBase {
|
||||
type: ManifestStandardTypes;
|
||||
js?: string;
|
||||
elementName?: string;
|
||||
loader?: () => Promise<object | HTMLElement>;
|
||||
meta?: any;
|
||||
}
|
||||
|
||||
export interface ManifestElementWithElementName extends ManifestElement {
|
||||
elementName: string;
|
||||
}
|
||||
|
||||
export interface ManifestCustom extends ManifestBase {
|
||||
type: 'custom';
|
||||
meta?: any;
|
||||
}
|
||||
|
||||
export interface ManifestWithMeta extends ManifestBase {
|
||||
meta: any;
|
||||
}
|
||||
|
||||
export interface ManifestEntrypoint extends ManifestBase {
|
||||
type: 'entrypoint';
|
||||
js: string;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestPackageView extends ManifestElement {
|
||||
type: 'packageView';
|
||||
meta: MetaPackageView;
|
||||
}
|
||||
|
||||
export interface MetaPackageView {
|
||||
packageAlias: string;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestPropertyAction extends ManifestElement {
|
||||
type: 'propertyAction';
|
||||
meta: MetaPropertyAction;
|
||||
}
|
||||
|
||||
export interface MetaPropertyAction {
|
||||
propertyEditors: string[];
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import type { ManifestElement, ManifestBase } from './models';
|
||||
|
||||
// UI
|
||||
export interface ManifestPropertyEditorUI extends ManifestElement {
|
||||
type: 'propertyEditorUI';
|
||||
meta: MetaPropertyEditorUI;
|
||||
}
|
||||
|
||||
export interface MetaPropertyEditorUI {
|
||||
label: string;
|
||||
propertyEditorModel: string;
|
||||
icon: string;
|
||||
group: string;
|
||||
config?: PropertyEditorConfig;
|
||||
supportsReadOnly?: boolean;
|
||||
}
|
||||
|
||||
// Model
|
||||
export interface ManifestPropertyEditorModel extends ManifestBase {
|
||||
type: 'propertyEditorModel';
|
||||
meta: MetaPropertyEditorModel;
|
||||
}
|
||||
|
||||
export interface MetaPropertyEditorModel {
|
||||
config?: PropertyEditorConfig;
|
||||
}
|
||||
|
||||
// Config
|
||||
export interface PropertyEditorConfig {
|
||||
properties: PropertyEditorConfigProperty[];
|
||||
defaultData?: PropertyEditorConfigDefaultData[];
|
||||
}
|
||||
|
||||
export interface PropertyEditorConfigProperty {
|
||||
label: string;
|
||||
description?: string;
|
||||
alias: string;
|
||||
propertyEditorUI: string;
|
||||
}
|
||||
|
||||
export interface PropertyEditorConfigDefaultData {
|
||||
alias: string;
|
||||
value: any;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import config from '../../utils/rollup.config.js';
|
||||
export default {
|
||||
...config,
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestSectionView extends ManifestElement {
|
||||
type: 'sectionView';
|
||||
meta: MetaSectionView;
|
||||
}
|
||||
|
||||
export interface MetaSectionView {
|
||||
sections: Array<string>;
|
||||
label: string;
|
||||
pathname: string;
|
||||
weight: number;
|
||||
icon: string;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestSection extends ManifestElement {
|
||||
type: 'section';
|
||||
meta: MetaSection;
|
||||
}
|
||||
|
||||
export interface MetaSection {
|
||||
label: string;
|
||||
pathname: string;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestSidebarMenuItem extends ManifestElement {
|
||||
type: 'sidebarMenuItem';
|
||||
meta: MetaSidebarMenuItem;
|
||||
}
|
||||
|
||||
export interface MetaSidebarMenuItem {
|
||||
label: string;
|
||||
icon: string;
|
||||
sections: Array<string>;
|
||||
entityType?: string;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestTreeItemAction extends ManifestElement {
|
||||
type: 'treeItemAction';
|
||||
meta: MetaTreeItemAction;
|
||||
}
|
||||
|
||||
export interface MetaTreeItemAction {
|
||||
entityType: string;
|
||||
label: string;
|
||||
icon: string;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import type { ManifestBase } from './models';
|
||||
|
||||
export interface ManifestTree extends ManifestBase {
|
||||
type: 'tree';
|
||||
meta: MetaTree;
|
||||
}
|
||||
|
||||
export interface MetaTree {
|
||||
storeAlias: string;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestUserDashboard extends ManifestElement {
|
||||
type: 'userDashboard';
|
||||
meta: MetaUserDashboard;
|
||||
}
|
||||
|
||||
export interface MetaUserDashboard {
|
||||
label: string;
|
||||
pathname: string;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import type { InterfaceColor, InterfaceLook } from '@umbraco-ui/uui-base/lib/types/index'
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestWorkspaceAction extends ManifestElement {
|
||||
type: 'workspaceAction';
|
||||
meta: MetaEditorAction;
|
||||
}
|
||||
|
||||
export interface MetaEditorAction {
|
||||
workspaces: Array<string>;
|
||||
label?: string, //TODO: Use or implement additional label-key
|
||||
look?: InterfaceLook,
|
||||
color?: InterfaceColor,
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import type { ManifestBase } from './models';
|
||||
|
||||
export interface ManifestWorkspaceViewCollection extends ManifestBase {
|
||||
type: 'workspaceViewCollection';
|
||||
meta: MetaEditorViewCollection;
|
||||
}
|
||||
|
||||
export interface MetaEditorViewCollection {
|
||||
workspaces: string[];
|
||||
pathname: string;
|
||||
label: string;
|
||||
icon: string;
|
||||
entityType: string;
|
||||
storeAlias: string;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestWorkspaceView extends ManifestElement {
|
||||
type: 'workspaceView';
|
||||
meta: MetaEditorView;
|
||||
}
|
||||
|
||||
export interface MetaEditorView {
|
||||
workspaces: string[];
|
||||
pathname: string;
|
||||
label: string;
|
||||
icon: string;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import type { ManifestElement } from './models';
|
||||
|
||||
export interface ManifestWorkspace extends ManifestElement {
|
||||
type: 'workspace';
|
||||
meta: MetaEditor;
|
||||
}
|
||||
|
||||
export interface MetaEditor {
|
||||
entityType: string;
|
||||
}
|
||||
Reference in New Issue
Block a user