@umbraco-cms/backoffice 1.0.0-next.81b4603f → 1.0.0-next.89a86779
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/collection.d.ts +1 -1
- package/content-type.d.ts +1 -1
- package/context-api.d.ts +2 -4
- package/{controller.d.ts → controller-api.d.ts} +2 -3
- package/custom-elements.json +2 -2
- package/element.d.ts +2 -2
- package/entity-action.d.ts +1 -1
- package/extension-api.d.ts +200 -0
- package/{extensions-registry.d.ts → extension-registry.d.ts} +7 -135
- package/modal.d.ts +1 -1
- package/models.d.ts +1 -3
- package/observable-api.d.ts +1 -1
- package/package.json +1 -1
- package/picker-input.d.ts +1 -1
- package/resources.d.ts +1 -1
- package/router.d.ts +1 -1
- package/section.d.ts +2 -2
- package/sorter.d.ts +1 -1
- package/store.d.ts +1 -1
- package/tree.d.ts +1 -1
- package/umbraco-package-schema.json +21 -21
- package/workspace.d.ts +1 -1
- package/extensions-api.d.ts +0 -67
package/collection.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
2
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
3
3
|
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
4
4
|
import { UmbObserverController } from '@umbraco-cms/backoffice/observable-api';
|
|
5
5
|
import { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
package/content-type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ProblemDetailsModel, DocumentTypeResponseModel, PropertyTypeContainerResponseModelBaseModel, PropertyTypeResponseModelBaseModel, DocumentTypePropertyTypeResponseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
4
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
4
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
5
5
|
import { MappingFunction } from '@umbraco-cms/backoffice/observable-api';
|
|
6
6
|
|
|
7
7
|
interface UmbRepositoryErrorResponse {
|
package/context-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UmbControllerHostElement, UmbControllerInterface } from '@umbraco-cms/backoffice/controller';
|
|
1
|
+
import { UmbControllerHostElement, UmbControllerInterface } from '@umbraco-cms/backoffice/controller-api';
|
|
2
2
|
import { UmbContextToken as UmbContextToken$1 } from '@umbraco-cms/backoffice/context-api';
|
|
3
3
|
import { UmbWorkspaceContextInterface } from '@umbraco-cms/backoffice/workspace';
|
|
4
4
|
import { UmbEntityBase } from '@umbraco-cms/backoffice/models';
|
|
@@ -165,9 +165,7 @@ declare class UmbContextProvideEventImplementation extends Event implements UmbC
|
|
|
165
165
|
}
|
|
166
166
|
declare const isUmbContextProvideEventType: (event: Event) => event is UmbContextProvideEventImplementation;
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
declare const UmbContextProviderElement_base: HTMLElementConstructor<UmbControllerHostElement> & {
|
|
168
|
+
declare const UmbContextProviderElement_base: (new (...args: any[]) => UmbControllerHostElement) & {
|
|
171
169
|
new (): HTMLElement;
|
|
172
170
|
prototype: HTMLElement;
|
|
173
171
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { HTMLElementConstructor } from '@umbraco-cms/backoffice/models';
|
|
2
|
-
|
|
3
1
|
interface UmbControllerInterface {
|
|
4
2
|
get unique(): string | undefined;
|
|
5
3
|
hostConnected(): void;
|
|
@@ -7,6 +5,7 @@ interface UmbControllerInterface {
|
|
|
7
5
|
destroy(): void;
|
|
8
6
|
}
|
|
9
7
|
|
|
8
|
+
type HTMLElementConstructor<T = HTMLElement> = new (...args: any[]) => T;
|
|
10
9
|
declare class UmbControllerHostElement extends HTMLElement {
|
|
11
10
|
hasController(controller: UmbControllerInterface): boolean;
|
|
12
11
|
getControllers(filterMethod: (ctrl: UmbControllerInterface) => boolean): UmbControllerInterface[];
|
|
@@ -21,7 +20,7 @@ declare class UmbControllerHostElement extends HTMLElement {
|
|
|
21
20
|
* @param {Object} superClass - superclass to be extended.
|
|
22
21
|
* @mixin
|
|
23
22
|
*/
|
|
24
|
-
declare const UmbControllerHostMixin: <T extends HTMLElementConstructor
|
|
23
|
+
declare const UmbControllerHostMixin: <T extends HTMLElementConstructor<HTMLElement>>(superClass: T) => HTMLElementConstructor<UmbControllerHostElement> & T;
|
|
25
24
|
declare global {
|
|
26
25
|
interface HTMLElement {
|
|
27
26
|
connectedCallback(): void;
|
package/custom-elements.json
CHANGED
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"name": "umb-controller-host-initializer",
|
|
90
|
-
"path": "./../../libs/controller/controller-host-initializer.element.ts",
|
|
90
|
+
"path": "./../../libs/controller-api/controller-host-initializer.element.ts",
|
|
91
91
|
"properties": [
|
|
92
92
|
{
|
|
93
93
|
"name": "create",
|
|
94
94
|
"description": "A way to initialize controllers.",
|
|
95
|
-
"type": "((host:
|
|
95
|
+
"type": "((host: UmbControllerHostElement) => void) | undefined"
|
|
96
96
|
}
|
|
97
97
|
]
|
|
98
98
|
},
|
package/element.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { HTMLElementConstructor } from '@umbraco-cms/backoffice/
|
|
3
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
2
|
+
import { HTMLElementConstructor } from '@umbraco-cms/backoffice/extension-api';
|
|
3
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
4
4
|
import { UmbContextToken, UmbContextProviderController, UmbContextCallback, UmbContextConsumerController } from '@umbraco-cms/backoffice/context-api';
|
|
5
5
|
import { UmbObserverController } from '@umbraco-cms/backoffice/observable-api';
|
|
6
6
|
|
package/entity-action.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
1
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
2
2
|
import { UmbEntityActionBase as UmbEntityActionBase$1 } from '@umbraco-cms/backoffice/entity-action';
|
|
3
3
|
import { UmbDetailRepository, UmbItemRepository, UmbFolderRepository } from '@umbraco-cms/backoffice/repository';
|
|
4
4
|
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
3
|
+
|
|
4
|
+
type HTMLElementConstructor<T = HTMLElement> = new (...args: any[]) => T;
|
|
5
|
+
type ClassConstructor<T> = new (...args: any[]) => T;
|
|
6
|
+
type ManifestTypeMap<ManifestTypes extends ManifestBase> = {
|
|
7
|
+
[Manifest in ManifestTypes as Manifest['type']]: Manifest;
|
|
8
|
+
} & {
|
|
9
|
+
[key: string]: ManifestBase;
|
|
10
|
+
};
|
|
11
|
+
type SpecificManifestTypeOrManifestBase<ManifestTypes extends ManifestBase, T extends keyof ManifestTypeMap<ManifestTypes> | string> = T extends keyof ManifestTypeMap<ManifestTypes> ? ManifestTypeMap<ManifestTypes>[T] : ManifestBase;
|
|
12
|
+
interface ManifestBase {
|
|
13
|
+
/**
|
|
14
|
+
* The type of extension such as dashboard etc...
|
|
15
|
+
*/
|
|
16
|
+
type: string;
|
|
17
|
+
/**
|
|
18
|
+
* The alias of the extension, ensure it is unique
|
|
19
|
+
*/
|
|
20
|
+
alias: string;
|
|
21
|
+
/**
|
|
22
|
+
* The kind of the extension, used to group extensions together
|
|
23
|
+
*
|
|
24
|
+
* @examples ["button"]
|
|
25
|
+
*/
|
|
26
|
+
kind?: unknown;
|
|
27
|
+
/**
|
|
28
|
+
* The friendly name of the extension
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
* Extensions such as dashboards are ordered by weight with lower numbers being first in the list
|
|
33
|
+
*/
|
|
34
|
+
weight?: number;
|
|
35
|
+
}
|
|
36
|
+
interface ManifestKind<ManifestTypes> {
|
|
37
|
+
type: 'kind';
|
|
38
|
+
alias: string;
|
|
39
|
+
matchType: string;
|
|
40
|
+
matchKind: string;
|
|
41
|
+
manifest: Partial<ManifestTypes>;
|
|
42
|
+
}
|
|
43
|
+
interface ManifestWithConditions<ConditionsType> {
|
|
44
|
+
/**
|
|
45
|
+
* Set the conditions for when the extension should be loaded
|
|
46
|
+
*/
|
|
47
|
+
conditions: ConditionsType;
|
|
48
|
+
}
|
|
49
|
+
interface ManifestWithLoader<LoaderReturnType> extends ManifestBase {
|
|
50
|
+
/**
|
|
51
|
+
* @TJS-ignore
|
|
52
|
+
*/
|
|
53
|
+
loader?: () => Promise<LoaderReturnType>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The type of extension such as dashboard etc...
|
|
57
|
+
*/
|
|
58
|
+
interface ManifestClass<ClassType = unknown> extends ManifestWithLoader<{
|
|
59
|
+
default: ClassConstructor<ClassType>;
|
|
60
|
+
}> {
|
|
61
|
+
readonly CLASS_TYPE?: ClassType;
|
|
62
|
+
/**
|
|
63
|
+
* The file location of the javascript file to load
|
|
64
|
+
* @TJS-required
|
|
65
|
+
*/
|
|
66
|
+
js?: string;
|
|
67
|
+
/**
|
|
68
|
+
* @TJS-ignore
|
|
69
|
+
*/
|
|
70
|
+
className?: string;
|
|
71
|
+
/**
|
|
72
|
+
* @TJS-ignore
|
|
73
|
+
*/
|
|
74
|
+
class?: ClassConstructor<ClassType>;
|
|
75
|
+
}
|
|
76
|
+
interface ManifestClassWithClassConstructor<T = unknown> extends ManifestClass<T> {
|
|
77
|
+
class: ClassConstructor<T>;
|
|
78
|
+
}
|
|
79
|
+
interface ManifestElement<ElementType extends HTMLElement = HTMLElement> extends ManifestWithLoader<{
|
|
80
|
+
default: ClassConstructor<ElementType>;
|
|
81
|
+
} | Omit<object, 'default'>> {
|
|
82
|
+
readonly ELEMENT_TYPE?: ElementType;
|
|
83
|
+
/**
|
|
84
|
+
* The file location of the javascript file to load
|
|
85
|
+
*
|
|
86
|
+
* @TJS-require
|
|
87
|
+
*/
|
|
88
|
+
js?: string;
|
|
89
|
+
/**
|
|
90
|
+
* The HTML web component name to use such as 'my-dashboard'
|
|
91
|
+
* Note it is NOT <my-dashboard></my-dashboard> but just the name
|
|
92
|
+
*/
|
|
93
|
+
elementName?: string;
|
|
94
|
+
/**
|
|
95
|
+
* This contains properties specific to the type of extension
|
|
96
|
+
*/
|
|
97
|
+
meta?: unknown;
|
|
98
|
+
}
|
|
99
|
+
interface ManifestWithView<ElementType extends HTMLElement = HTMLElement> extends ManifestElement<ElementType> {
|
|
100
|
+
meta: MetaManifestWithView;
|
|
101
|
+
}
|
|
102
|
+
interface MetaManifestWithView {
|
|
103
|
+
pathname: string;
|
|
104
|
+
label: string;
|
|
105
|
+
icon: string;
|
|
106
|
+
}
|
|
107
|
+
interface ManifestElementWithElementName extends ManifestElement {
|
|
108
|
+
/**
|
|
109
|
+
* The HTML web component name to use such as 'my-dashboard'
|
|
110
|
+
* Note it is NOT <my-dashboard></my-dashboard> but just the name
|
|
111
|
+
*/
|
|
112
|
+
elementName: string;
|
|
113
|
+
}
|
|
114
|
+
interface ManifestWithMeta extends ManifestBase {
|
|
115
|
+
/**
|
|
116
|
+
* This contains properties specific to the type of extension
|
|
117
|
+
*/
|
|
118
|
+
meta: unknown;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* This type of extension gives full control and will simply load the specified JS file
|
|
122
|
+
* You could have custom logic to decide which extensions to load/register by using extensionRegistry
|
|
123
|
+
*/
|
|
124
|
+
interface ManifestEntryPoint extends ManifestBase {
|
|
125
|
+
type: 'entryPoint';
|
|
126
|
+
/**
|
|
127
|
+
* The file location of the javascript file to load in the backoffice
|
|
128
|
+
*/
|
|
129
|
+
js: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
declare class UmbExtensionRegistry<IncomingManifestTypes extends ManifestBase, ManifestTypes extends ManifestBase = IncomingManifestTypes | ManifestBase> {
|
|
133
|
+
private _extensions;
|
|
134
|
+
readonly extensions: Observable<ManifestTypes[]>;
|
|
135
|
+
private _kinds;
|
|
136
|
+
readonly kinds: Observable<ManifestKind<ManifestTypes>[]>;
|
|
137
|
+
defineKind(kind: ManifestKind<ManifestTypes>): void;
|
|
138
|
+
register(manifest: ManifestTypes | ManifestKind<ManifestTypes>): void;
|
|
139
|
+
registerMany(manifests: Array<ManifestTypes | ManifestKind<ManifestTypes>>): void;
|
|
140
|
+
unregister(alias: string): void;
|
|
141
|
+
isRegistered(alias: string): boolean;
|
|
142
|
+
private _kindsOfType;
|
|
143
|
+
private _extensionsOfType;
|
|
144
|
+
private _kindsOfTypes;
|
|
145
|
+
private _extensionsOfTypes;
|
|
146
|
+
getByTypeAndAlias<Key extends keyof ManifestTypeMap<ManifestTypes> | string, T extends ManifestBase = SpecificManifestTypeOrManifestBase<ManifestTypes, Key>>(type: Key, alias: string): Observable<T | undefined>;
|
|
147
|
+
extensionsOfType<Key extends keyof ManifestTypeMap<ManifestTypes> | string, T extends ManifestBase = SpecificManifestTypeOrManifestBase<ManifestTypes, Key>>(type: Key): Observable<T[]>;
|
|
148
|
+
extensionsOfTypes<ExtensionTypes extends ManifestBase = ManifestBase>(types: string[]): Observable<Array<ExtensionTypes>>;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
declare function isManifestClassConstructorType(manifest: unknown): manifest is ManifestClassWithClassConstructor;
|
|
152
|
+
|
|
153
|
+
declare function isManifestClassableType(manifest: ManifestBase): manifest is ManifestClass;
|
|
154
|
+
|
|
155
|
+
declare function isManifestElementNameType(manifest: unknown): manifest is ManifestElementWithElementName;
|
|
156
|
+
|
|
157
|
+
declare function isManifestElementableType<ElementType extends HTMLElement = HTMLElement>(manifest: ManifestBase): manifest is ManifestElement;
|
|
158
|
+
|
|
159
|
+
type ManifestJSType<T> = ManifestWithLoader<T> & {
|
|
160
|
+
js: string;
|
|
161
|
+
};
|
|
162
|
+
declare function isManifestJSType<T>(manifest: ManifestBase | unknown): manifest is ManifestJSType<T>;
|
|
163
|
+
|
|
164
|
+
type ManifestLoaderType<T> = ManifestWithLoader<T> & {
|
|
165
|
+
loader: () => Promise<T>;
|
|
166
|
+
};
|
|
167
|
+
declare function isManifestLoaderType<T>(manifest: ManifestBase): manifest is ManifestLoaderType<T>;
|
|
168
|
+
|
|
169
|
+
declare function createExtensionElement<ElementType extends HTMLElement>(manifest: ManifestElement<ElementType>): Promise<ElementType | undefined>;
|
|
170
|
+
|
|
171
|
+
declare function hasDefaultExport<ConstructorType>(object: unknown): object is {
|
|
172
|
+
default: ConstructorType;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
type UmbEntryPointOnInit = (host: UmbControllerHostElement, extensionRegistry: UmbExtensionRegistry<ManifestBase>) => void;
|
|
176
|
+
/**
|
|
177
|
+
* Interface containing supported life-cycle functions for ESModule entry points
|
|
178
|
+
*/
|
|
179
|
+
interface UmbEntryPointModule {
|
|
180
|
+
onInit: UmbEntryPointOnInit;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Validate if an ESModule exports a known init function called 'onInit'
|
|
185
|
+
*/
|
|
186
|
+
declare function hasInitExport(obj: unknown): obj is Pick<UmbEntryPointModule, 'onInit'>;
|
|
187
|
+
|
|
188
|
+
declare function loadExtension<T = unknown>(manifest: ManifestWithLoader<T>): Promise<T | null>;
|
|
189
|
+
|
|
190
|
+
declare function createExtensionElementOrFallback(manifest: any, fallbackElementName: string): Promise<HTMLElement | undefined>;
|
|
191
|
+
|
|
192
|
+
declare function createExtensionClass<T = unknown>(manifest: ManifestClass, constructorArguments: unknown[]): Promise<T | undefined>;
|
|
193
|
+
|
|
194
|
+
declare class UmbEntryPointExtensionInitializer {
|
|
195
|
+
#private;
|
|
196
|
+
constructor(host: UmbControllerHostElement, extensionRegistry: UmbExtensionRegistry<ManifestEntryPoint>);
|
|
197
|
+
instantiateEntryPoint(manifest: ManifestEntryPoint): Promise<void>;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export { ClassConstructor, HTMLElementConstructor, ManifestBase, ManifestClass, ManifestClassWithClassConstructor, ManifestElement, ManifestElementWithElementName, ManifestEntryPoint, ManifestJSType, ManifestKind, ManifestLoaderType, ManifestTypeMap, ManifestWithConditions, ManifestWithLoader, ManifestWithMeta, ManifestWithView, MetaManifestWithView, SpecificManifestTypeOrManifestBase, UmbEntryPointExtensionInitializer, UmbEntryPointModule, UmbEntryPointOnInit, UmbExtensionRegistry, createExtensionClass, createExtensionElement, createExtensionElementOrFallback, hasDefaultExport, hasInitExport, isManifestClassConstructorType, isManifestClassableType, isManifestElementNameType, isManifestElementableType, isManifestJSType, isManifestLoaderType, loadExtension };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
import { ManifestElement, ManifestWithConditions, ManifestBase, ManifestClass, ManifestWithLoader, ClassConstructor, ManifestWithView, MetaManifestWithView, ManifestEntryPoint, ManifestKind, UmbExtensionRegistry } from '@umbraco-cms/backoffice/extension-api';
|
|
2
|
+
import { UmbModalHandler } from '@umbraco-cms/backoffice/modal';
|
|
1
3
|
import { DataTypePropertyPresentationModel, TreeItemPresentationModel } from '@umbraco-cms/backoffice/backend-api';
|
|
2
4
|
import { UmbStoreBase, UmbTreeStore, UmbItemStore } from '@umbraco-cms/backoffice/store';
|
|
3
5
|
import { InterfaceLook, InterfaceColor } from '@umbraco-ui/uui-base/lib/types/index';
|
|
4
|
-
import { ClassConstructor } from '@umbraco-cms/backoffice/models';
|
|
5
6
|
import { UmbWorkspaceAction } from '@umbraco-cms/backoffice/workspace';
|
|
6
|
-
import { UmbModalHandler } from '@umbraco-cms/backoffice/modal';
|
|
7
|
-
import { UmbExtensionRegistry } from '@umbraco-cms/backoffice/extensions-api';
|
|
8
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
9
7
|
|
|
10
8
|
interface ManifestCollectionView extends ManifestElement, ManifestWithConditions<ConditionsCollectionView> {
|
|
11
9
|
type: 'collectionView';
|
|
@@ -442,131 +440,7 @@ interface ConditionsEditorViewCollection {
|
|
|
442
440
|
workspaces: string[];
|
|
443
441
|
}
|
|
444
442
|
|
|
445
|
-
type ManifestTypes = ManifestCollectionView | ManifestDashboard | ManifestDashboardCollection | ManifestEntityAction | ManifestEntityBulkAction |
|
|
446
|
-
type ManifestStandardTypes = ManifestTypes['type'];
|
|
447
|
-
type ManifestTypeMap = {
|
|
448
|
-
[Manifest in ManifestTypes as Manifest['type']]: Manifest;
|
|
449
|
-
};
|
|
450
|
-
type SpecificManifestTypeOrManifestBase<T extends keyof ManifestTypeMap | string> = T extends keyof ManifestTypeMap ? ManifestTypeMap[T] : ManifestBase;
|
|
451
|
-
interface ManifestBase {
|
|
452
|
-
/**
|
|
453
|
-
* The type of extension such as dashboard etc...
|
|
454
|
-
*/
|
|
455
|
-
type: string;
|
|
456
|
-
/**
|
|
457
|
-
* The alias of the extension, ensure it is unique
|
|
458
|
-
*/
|
|
459
|
-
alias: string;
|
|
460
|
-
/**
|
|
461
|
-
* The kind of the extension, used to group extensions together
|
|
462
|
-
*
|
|
463
|
-
* @examples ["button"]
|
|
464
|
-
*/
|
|
465
|
-
kind?: unknown;
|
|
466
|
-
/**
|
|
467
|
-
* The friendly name of the extension
|
|
468
|
-
*/
|
|
469
|
-
name: string;
|
|
470
|
-
/**
|
|
471
|
-
* Extensions such as dashboards are ordered by weight with lower numbers being first in the list
|
|
472
|
-
*/
|
|
473
|
-
weight?: number;
|
|
474
|
-
}
|
|
475
|
-
interface ManifestKind {
|
|
476
|
-
type: 'kind';
|
|
477
|
-
alias: string;
|
|
478
|
-
matchType: string;
|
|
479
|
-
matchKind: string;
|
|
480
|
-
manifest: Partial<ManifestTypes>;
|
|
481
|
-
}
|
|
482
|
-
interface ManifestWithConditions<ConditionsType> {
|
|
483
|
-
/**
|
|
484
|
-
* Set the conditions for when the extension should be loaded
|
|
485
|
-
*/
|
|
486
|
-
conditions: ConditionsType;
|
|
487
|
-
}
|
|
488
|
-
interface ManifestWithLoader<LoaderReturnType> extends ManifestBase {
|
|
489
|
-
/**
|
|
490
|
-
* @TJS-ignore
|
|
491
|
-
*/
|
|
492
|
-
loader?: () => Promise<LoaderReturnType>;
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* The type of extension such as dashboard etc...
|
|
496
|
-
*/
|
|
497
|
-
interface ManifestClass<ClassType = unknown> extends ManifestWithLoader<{
|
|
498
|
-
default: ClassConstructor<ClassType>;
|
|
499
|
-
}> {
|
|
500
|
-
readonly CLASS_TYPE?: ClassType;
|
|
501
|
-
/**
|
|
502
|
-
* The file location of the javascript file to load
|
|
503
|
-
* @TJS-required
|
|
504
|
-
*/
|
|
505
|
-
js?: string;
|
|
506
|
-
/**
|
|
507
|
-
* @TJS-ignore
|
|
508
|
-
*/
|
|
509
|
-
className?: string;
|
|
510
|
-
/**
|
|
511
|
-
* @TJS-ignore
|
|
512
|
-
*/
|
|
513
|
-
class?: ClassConstructor<ClassType>;
|
|
514
|
-
}
|
|
515
|
-
interface ManifestClassWithClassConstructor<T = unknown> extends ManifestClass<T> {
|
|
516
|
-
class: ClassConstructor<T>;
|
|
517
|
-
}
|
|
518
|
-
interface ManifestElement<ElementType extends HTMLElement = HTMLElement> extends ManifestWithLoader<{
|
|
519
|
-
default: ClassConstructor<ElementType>;
|
|
520
|
-
} | Omit<object, 'default'>> {
|
|
521
|
-
readonly ELEMENT_TYPE?: ElementType;
|
|
522
|
-
/**
|
|
523
|
-
* The file location of the javascript file to load
|
|
524
|
-
*
|
|
525
|
-
* @TJS-require
|
|
526
|
-
*/
|
|
527
|
-
js?: string;
|
|
528
|
-
/**
|
|
529
|
-
* The HTML web component name to use such as 'my-dashboard'
|
|
530
|
-
* Note it is NOT <my-dashboard></my-dashboard> but just the name
|
|
531
|
-
*/
|
|
532
|
-
elementName?: string;
|
|
533
|
-
/**
|
|
534
|
-
* This contains properties specific to the type of extension
|
|
535
|
-
*/
|
|
536
|
-
meta?: unknown;
|
|
537
|
-
}
|
|
538
|
-
interface ManifestWithView<ElementType extends HTMLElement = HTMLElement> extends ManifestElement<ElementType> {
|
|
539
|
-
meta: MetaManifestWithView;
|
|
540
|
-
}
|
|
541
|
-
interface MetaManifestWithView {
|
|
542
|
-
pathname: string;
|
|
543
|
-
label: string;
|
|
544
|
-
icon: string;
|
|
545
|
-
}
|
|
546
|
-
interface ManifestElementWithElementName extends ManifestElement {
|
|
547
|
-
/**
|
|
548
|
-
* The HTML web component name to use such as 'my-dashboard'
|
|
549
|
-
* Note it is NOT <my-dashboard></my-dashboard> but just the name
|
|
550
|
-
*/
|
|
551
|
-
elementName: string;
|
|
552
|
-
}
|
|
553
|
-
interface ManifestWithMeta extends ManifestBase {
|
|
554
|
-
/**
|
|
555
|
-
* This contains properties specific to the type of extension
|
|
556
|
-
*/
|
|
557
|
-
meta: unknown;
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* This type of extension gives full control and will simply load the specified JS file
|
|
561
|
-
* You could have custom logic to decide which extensions to load/register by using extensionRegistry
|
|
562
|
-
*/
|
|
563
|
-
interface ManifestEntrypoint extends ManifestBase {
|
|
564
|
-
type: 'entryPoint';
|
|
565
|
-
/**
|
|
566
|
-
* The file location of the javascript file to load in the backoffice
|
|
567
|
-
*/
|
|
568
|
-
js: string;
|
|
569
|
-
}
|
|
443
|
+
type ManifestTypes = ManifestCollectionView | ManifestDashboard | ManifestDashboardCollection | ManifestEntityAction | ManifestEntityBulkAction | ManifestEntryPoint | ManifestExternalLoginProvider | ManifestHeaderApp | ManifestHeaderAppButtonKind | ManifestHealthCheck | ManifestItemStore | ManifestMenu | ManifestMenuItem | ManifestMenuItemTreeKind | ManifestModal | ManifestPackageView | ManifestPropertyAction | ManifestPropertyEditorModel | ManifestPropertyEditorUI | ManifestRepository | ManifestSection | ManifestSectionSidebarApp | ManifestSectionSidebarAppMenuKind | ManifestSectionView | ManifestStore | ManifestTheme | ManifestTree | ManifestTreeItem | ManifestTreeStore | ManifestUserProfileApp | ManifestWorkspace | ManifestWorkspaceAction | ManifestWorkspaceEditorView | ManifestWorkspaceViewCollection | ManifestBase;
|
|
570
444
|
|
|
571
445
|
interface UmbDashboardExtensionElement extends HTMLElement {
|
|
572
446
|
manifest?: ManifestDashboard;
|
|
@@ -591,10 +465,8 @@ interface UmbTreeItemExtensionElement extends HTMLElement {
|
|
|
591
465
|
item?: TreeItemPresentationModel;
|
|
592
466
|
}
|
|
593
467
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
instantiateEntryPoint(manifest: ManifestEntrypoint): Promise<void>;
|
|
598
|
-
}
|
|
468
|
+
type UmbBackofficeManifestKind = ManifestKind<ManifestTypes>;
|
|
469
|
+
type UmbBackofficeExtensionRegistry = UmbExtensionRegistry<ManifestTypes>;
|
|
470
|
+
declare const umbExtensionsRegistry: UmbBackofficeExtensionRegistry;
|
|
599
471
|
|
|
600
|
-
export { ConditionsCollectionView, ConditionsDashboard, ConditionsDashboardCollection, ConditionsEditorViewCollection, ConditionsEntityAction, ConditionsEntityBulkAction, ConditionsMenuItem, ConditionsPropertyAction, ConditionsSectionSidebarApp, ConditionsSectionView, ConditionsTreeItem, ConditionsWorkspaceAction, ConditionsWorkspaceView, HealthCheck,
|
|
472
|
+
export { ConditionsCollectionView, ConditionsDashboard, ConditionsDashboardCollection, ConditionsEditorViewCollection, ConditionsEntityAction, ConditionsEntityBulkAction, ConditionsMenuItem, ConditionsPropertyAction, ConditionsSectionSidebarApp, ConditionsSectionView, ConditionsTreeItem, ConditionsWorkspaceAction, ConditionsWorkspaceView, HealthCheck, ManifestCollectionView, ManifestDashboard, ManifestDashboardCollection, ManifestEntityAction, ManifestEntityBulkAction, ManifestExternalLoginProvider, ManifestHeaderApp, ManifestHeaderAppButtonKind, ManifestHealthCheck, ManifestItemStore, ManifestMenu, ManifestMenuItem, ManifestMenuItemTreeKind, ManifestModal, ManifestPackageView, ManifestPropertyAction, ManifestPropertyEditorModel, ManifestPropertyEditorUI, ManifestRepository, ManifestSection, ManifestSectionSidebarApp, ManifestSectionSidebarAppMenuKind, ManifestSectionView, ManifestStore, ManifestTheme, ManifestTree, ManifestTreeItem, ManifestTreeStore, ManifestTypes, ManifestUserProfileApp, ManifestWorkspace, ManifestWorkspaceAction, ManifestWorkspaceEditorView, ManifestWorkspaceViewCollection, MetaCollectionView, MetaDashboard, MetaDashboardCollection, MetaEditor, MetaEditorViewCollection, MetaEntityAction, MetaEntityBulkAction, MetaExternalLoginProvider, MetaHeaderApp, MetaHeaderAppButtonKind, MetaHealthCheck, MetaMenuItem, MetaMenuItemTreeKind, MetaPackageView, MetaPropertyEditorModel, MetaPropertyEditorUI, MetaSection, MetaSectionSidebarAppMenuKind, MetaSectionView, MetaTree, MetaUserProfileApp, MetaWorkspaceAction, PropertyEditorConfig, PropertyEditorConfigDefaultData, PropertyEditorConfigProperty, UmbBackofficeExtensionRegistry, UmbBackofficeManifestKind, UmbDashboardExtensionElement, UmbExternalLoginProviderExtensionElement, UmbMenuItemExtensionElement, UmbModalExtensionElement, UmbPropertyEditorExtensionElement, UmbSectionExtensionElement, UmbSectionSidebarAppExtensionElement, UmbSectionViewExtensionElement, UmbTreeItemExtensionElement, UmbWorkspaceEditorViewExtensionElement, umbExtensionsRegistry };
|
package/modal.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as lit from 'lit';
|
|
|
4
4
|
import { LitElement, TemplateResult } from 'lit';
|
|
5
5
|
import * as lit_html from 'lit-html';
|
|
6
6
|
import { UUIModalDialogElement, UUIModalSidebarElement, UUIModalSidebarSize } from '@umbraco-ui/uui';
|
|
7
|
-
import { UmbControllerHostElement, UmbControllerInterface } from '@umbraco-cms/backoffice/controller';
|
|
7
|
+
import { UmbControllerHostElement, UmbControllerInterface } from '@umbraco-cms/backoffice/controller-api';
|
|
8
8
|
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
9
9
|
import { Params } from '@umbraco-cms/backoffice/router';
|
|
10
10
|
import { UmbModalToken as UmbModalToken$1, UmbModalConfig as UmbModalConfig$1, UmbTreePickerModalData as UmbTreePickerModalData$1, UmbPickerModalResult as UmbPickerModalResult$1, UmbPickerModalData as UmbPickerModalData$1 } from '@umbraco-cms/backoffice/modal';
|
package/models.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
type HTMLElementConstructor<T = HTMLElement> = new (...args: any[]) => T;
|
|
2
|
-
type ClassConstructor<T> = new (...args: any[]) => T;
|
|
3
1
|
/** Tried to find a common base of our entities — used by Entity Workspace Context */
|
|
4
2
|
type UmbEntityBase = {
|
|
5
3
|
id?: string;
|
|
@@ -10,4 +8,4 @@ interface UmbSwatchDetails {
|
|
|
10
8
|
value: string;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
export {
|
|
11
|
+
export { UmbEntityBase, UmbSwatchDetails };
|
package/observable-api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { UmbControllerInterface, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
3
|
+
import { UmbControllerInterface, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
4
4
|
|
|
5
5
|
declare class UmbObserver<T> {
|
|
6
6
|
#private;
|
package/package.json
CHANGED
package/picker-input.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { UmbItemRepository } from '@umbraco-cms/backoffice/repository';
|
|
3
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
3
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
4
4
|
import { UmbModalToken, UmbModalContext, UmbPickerModalData } from '@umbraco-cms/backoffice/modal';
|
|
5
5
|
import { ItemResponseModelBaseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
6
6
|
|
package/resources.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UmbNotificationOptions } from '@umbraco-cms/backoffice/notification';
|
|
2
|
-
import { UmbController, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
2
|
+
import { UmbController, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
3
3
|
import { DataSourceResponse as DataSourceResponse$1 } from '@umbraco-cms/backoffice/repository';
|
|
4
4
|
import { ApiError, CancelError } from '@umbraco-cms/backoffice/backend-api';
|
|
5
5
|
|
package/router.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
2
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
2
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
3
3
|
import { UmbModalRouteRegistration } from '@umbraco-cms/backoffice/modal';
|
|
4
4
|
|
|
5
5
|
interface IRouterSlot<D = any, P = any> extends HTMLElement {
|
package/section.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
3
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
4
|
-
import { ManifestSection } from '@umbraco-cms/backoffice/
|
|
3
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
4
|
+
import { ManifestSection } from '@umbraco-cms/backoffice/extension-registry';
|
|
5
5
|
|
|
6
6
|
declare class UmbSectionSidebarContext {
|
|
7
7
|
#private;
|
package/sorter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UmbControllerInterface, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
1
|
+
import { UmbControllerInterface, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
2
2
|
|
|
3
3
|
type INTERNAL_UmbSorterConfig<T> = {
|
|
4
4
|
compareElementToModel: (el: HTMLElement, modelEntry: T) => boolean;
|
package/store.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
3
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
4
4
|
import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api';
|
|
5
5
|
import { EntityTreeItemResponseModel, FileSystemTreeItemPresentationModel } from '@umbraco-cms/backoffice/backend-api';
|
|
6
6
|
import { UmbStoreBase as UmbStoreBase$1, UmbTreeStore as UmbTreeStore$1 } from '@umbraco-cms/backoffice/store';
|
package/tree.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _umbraco_cms_backoffice_backend_api from '@umbraco-cms/backoffice/ba
|
|
|
2
2
|
import { TreeItemPresentationModel, ProblemDetailsModel } from '@umbraco-cms/backoffice/backend-api';
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
5
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
6
6
|
import { UmbPagedData as UmbPagedData$1, UmbTreeRepository } from '@umbraco-cms/backoffice/repository';
|
|
7
7
|
import { UmbTreeContextBase as UmbTreeContextBase$1 } from '@umbraco-cms/backoffice/tree';
|
|
8
8
|
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
@@ -3241,7 +3241,7 @@
|
|
|
3241
3241
|
},
|
|
3242
3242
|
"FontFaceSet": {
|
|
3243
3243
|
"properties": {
|
|
3244
|
-
"__@toStringTag@
|
|
3244
|
+
"__@toStringTag@689": {
|
|
3245
3245
|
"type": "string"
|
|
3246
3246
|
},
|
|
3247
3247
|
"onloading": {
|
|
@@ -3273,7 +3273,7 @@
|
|
|
3273
3273
|
}
|
|
3274
3274
|
},
|
|
3275
3275
|
"required": [
|
|
3276
|
-
"__@toStringTag@
|
|
3276
|
+
"__@toStringTag@689",
|
|
3277
3277
|
"onloading",
|
|
3278
3278
|
"onloadingdone",
|
|
3279
3279
|
"onloadingerror",
|
|
@@ -15290,7 +15290,7 @@
|
|
|
15290
15290
|
],
|
|
15291
15291
|
"type": "object"
|
|
15292
15292
|
},
|
|
15293
|
-
"
|
|
15293
|
+
"ManifestEntryPoint": {
|
|
15294
15294
|
"description": "This type of extension gives full control and will simply load the specified JS file\nYou could have custom logic to decide which extensions to load/register by using extensionRegistry",
|
|
15295
15295
|
"properties": {
|
|
15296
15296
|
"alias": {
|
|
@@ -16461,20 +16461,17 @@
|
|
|
16461
16461
|
},
|
|
16462
16462
|
"ManifestTypes": {
|
|
16463
16463
|
"anyOf": [
|
|
16464
|
-
{
|
|
16465
|
-
"$ref": "#/definitions/ManifestCollectionView"
|
|
16466
|
-
},
|
|
16467
16464
|
{
|
|
16468
16465
|
"$ref": "#/definitions/ManifestBase"
|
|
16469
16466
|
},
|
|
16470
16467
|
{
|
|
16471
|
-
"$ref": "#/definitions/
|
|
16468
|
+
"$ref": "#/definitions/ManifestEntryPoint"
|
|
16472
16469
|
},
|
|
16473
16470
|
{
|
|
16474
|
-
"$ref": "#/definitions/
|
|
16471
|
+
"$ref": "#/definitions/ManifestCollectionView"
|
|
16475
16472
|
},
|
|
16476
16473
|
{
|
|
16477
|
-
"$ref": "#/definitions/
|
|
16474
|
+
"$ref": "#/definitions/ManifestDashboard"
|
|
16478
16475
|
},
|
|
16479
16476
|
{
|
|
16480
16477
|
"$ref": "#/definitions/ManifestDashboardCollection"
|
|
@@ -16486,7 +16483,7 @@
|
|
|
16486
16483
|
"$ref": "#/definitions/ManifestEntityBulkAction"
|
|
16487
16484
|
},
|
|
16488
16485
|
{
|
|
16489
|
-
"$ref": "#/definitions/
|
|
16486
|
+
"$ref": "#/definitions/ManifestExternalLoginProvider"
|
|
16490
16487
|
},
|
|
16491
16488
|
{
|
|
16492
16489
|
"$ref": "#/definitions/ManifestHeaderApp"
|
|
@@ -16498,10 +16495,10 @@
|
|
|
16498
16495
|
"$ref": "#/definitions/ManifestHealthCheck"
|
|
16499
16496
|
},
|
|
16500
16497
|
{
|
|
16501
|
-
"$ref": "#/definitions/
|
|
16498
|
+
"$ref": "#/definitions/ManifestMenu"
|
|
16502
16499
|
},
|
|
16503
16500
|
{
|
|
16504
|
-
"$ref": "#/definitions/
|
|
16501
|
+
"$ref": "#/definitions/ManifestMenuItem"
|
|
16505
16502
|
},
|
|
16506
16503
|
{
|
|
16507
16504
|
"$ref": "#/definitions/ManifestMenuItemTreeKind"
|
|
@@ -16516,10 +16513,10 @@
|
|
|
16516
16513
|
"$ref": "#/definitions/ManifestPropertyAction"
|
|
16517
16514
|
},
|
|
16518
16515
|
{
|
|
16519
|
-
"$ref": "#/definitions/
|
|
16516
|
+
"$ref": "#/definitions/ManifestPropertyEditorUI"
|
|
16520
16517
|
},
|
|
16521
16518
|
{
|
|
16522
|
-
"$ref": "#/definitions/
|
|
16519
|
+
"$ref": "#/definitions/ManifestPropertyEditorModel"
|
|
16523
16520
|
},
|
|
16524
16521
|
{
|
|
16525
16522
|
"$ref": "#/definitions/ManifestRepository"
|
|
@@ -16539,6 +16536,12 @@
|
|
|
16539
16536
|
{
|
|
16540
16537
|
"$ref": "#/definitions/ManifestStore"
|
|
16541
16538
|
},
|
|
16539
|
+
{
|
|
16540
|
+
"$ref": "#/definitions/ManifestTreeStore"
|
|
16541
|
+
},
|
|
16542
|
+
{
|
|
16543
|
+
"$ref": "#/definitions/ManifestItemStore"
|
|
16544
|
+
},
|
|
16542
16545
|
{
|
|
16543
16546
|
"$ref": "#/definitions/ManifestTheme"
|
|
16544
16547
|
},
|
|
@@ -16548,9 +16551,6 @@
|
|
|
16548
16551
|
{
|
|
16549
16552
|
"$ref": "#/definitions/ManifestTreeItem"
|
|
16550
16553
|
},
|
|
16551
|
-
{
|
|
16552
|
-
"$ref": "#/definitions/ManifestTreeStore"
|
|
16553
|
-
},
|
|
16554
16554
|
{
|
|
16555
16555
|
"$ref": "#/definitions/ManifestUserProfileApp"
|
|
16556
16556
|
},
|
|
@@ -18263,23 +18263,23 @@
|
|
|
18263
18263
|
},
|
|
18264
18264
|
"Promise<FontFaceSet>": {
|
|
18265
18265
|
"properties": {
|
|
18266
|
-
"__@toStringTag@
|
|
18266
|
+
"__@toStringTag@689": {
|
|
18267
18267
|
"type": "string"
|
|
18268
18268
|
}
|
|
18269
18269
|
},
|
|
18270
18270
|
"required": [
|
|
18271
|
-
"__@toStringTag@
|
|
18271
|
+
"__@toStringTag@689"
|
|
18272
18272
|
],
|
|
18273
18273
|
"type": "object"
|
|
18274
18274
|
},
|
|
18275
18275
|
"Promise<ServiceWorkerRegistration>": {
|
|
18276
18276
|
"properties": {
|
|
18277
|
-
"__@toStringTag@
|
|
18277
|
+
"__@toStringTag@689": {
|
|
18278
18278
|
"type": "string"
|
|
18279
18279
|
}
|
|
18280
18280
|
},
|
|
18281
18281
|
"required": [
|
|
18282
|
-
"__@toStringTag@
|
|
18282
|
+
"__@toStringTag@689"
|
|
18283
18283
|
],
|
|
18284
18284
|
"type": "object"
|
|
18285
18285
|
},
|
package/workspace.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
3
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
4
4
|
import { UmbWorkspaceContextInterface as UmbWorkspaceContextInterface$1 } from '@umbraco-cms/backoffice/workspace';
|
|
5
5
|
import { UmbEntityBase } from '@umbraco-cms/backoffice/models';
|
|
6
6
|
import { UmbVariantId } from '@umbraco-cms/backoffice/variant';
|
package/extensions-api.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ManifestTypes, ManifestKind, ManifestTypeMap, ManifestBase, SpecificManifestTypeOrManifestBase, ManifestElement, ManifestElementWithElementName, ManifestWithLoader, ManifestClass } from '@umbraco-cms/backoffice/extensions-registry';
|
|
3
|
-
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
4
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
5
|
-
|
|
6
|
-
declare class UmbExtensionRegistry {
|
|
7
|
-
private _extensions;
|
|
8
|
-
readonly extensions: Observable<ManifestTypes[]>;
|
|
9
|
-
private _kinds;
|
|
10
|
-
readonly kinds: Observable<ManifestKind[]>;
|
|
11
|
-
defineKind(kind: ManifestKind): void;
|
|
12
|
-
register(manifest: ManifestTypes | ManifestKind): void;
|
|
13
|
-
registerMany(manifests: Array<ManifestTypes | ManifestKind>): void;
|
|
14
|
-
unregister(alias: string): void;
|
|
15
|
-
isRegistered(alias: string): boolean;
|
|
16
|
-
private _kindsOfType;
|
|
17
|
-
private _extensionsOfType;
|
|
18
|
-
private _kindsOfTypes;
|
|
19
|
-
private _extensionsOfTypes;
|
|
20
|
-
getByTypeAndAlias<Key extends keyof ManifestTypeMap | string, T extends ManifestBase = SpecificManifestTypeOrManifestBase<Key>>(type: Key, alias: string): Observable<T | undefined>;
|
|
21
|
-
extensionsOfType<Key extends keyof ManifestTypeMap | string, T extends ManifestBase = SpecificManifestTypeOrManifestBase<Key>>(type: Key): Observable<T[]>;
|
|
22
|
-
extensionsOfTypes<ExtensionTypes extends ManifestBase = ManifestBase>(types: string[]): Observable<Array<ExtensionTypes>>;
|
|
23
|
-
}
|
|
24
|
-
declare const UMB_EXTENSION_REGISTRY_TOKEN: UmbContextToken<UmbExtensionRegistry>;
|
|
25
|
-
|
|
26
|
-
declare function createExtensionElement<ElementType extends HTMLElement>(manifest: ManifestElement<ElementType>): Promise<ElementType | undefined>;
|
|
27
|
-
|
|
28
|
-
declare function hasDefaultExport<ConstructorType>(object: unknown): object is {
|
|
29
|
-
default: ConstructorType;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
type UmbEntrypointOnInit = (host: UmbControllerHostElement, extensionRegistry: UmbExtensionRegistry) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Interface containing supported life-cycle functions for ESModule entrypoints
|
|
35
|
-
*/
|
|
36
|
-
interface UmbEntrypointModule {
|
|
37
|
-
onInit: UmbEntrypointOnInit;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Validate if an ESModule exports a known init function called 'onInit'
|
|
42
|
-
*/
|
|
43
|
-
declare function hasInitExport(obj: unknown): obj is Pick<UmbEntrypointModule, 'onInit'>;
|
|
44
|
-
|
|
45
|
-
declare function isManifestElementNameType(manifest: unknown): manifest is ManifestElementWithElementName;
|
|
46
|
-
|
|
47
|
-
declare function isManifestElementableType<ElementType extends HTMLElement = HTMLElement>(manifest: ManifestBase): manifest is ManifestElement;
|
|
48
|
-
|
|
49
|
-
type ManifestJSType<T> = ManifestWithLoader<T> & {
|
|
50
|
-
js: string;
|
|
51
|
-
};
|
|
52
|
-
declare function isManifestJSType<T>(manifest: ManifestBase | unknown): manifest is ManifestJSType<T>;
|
|
53
|
-
|
|
54
|
-
type ManifestLoaderType<T> = ManifestWithLoader<T> & {
|
|
55
|
-
loader: () => Promise<T>;
|
|
56
|
-
};
|
|
57
|
-
declare function isManifestLoaderType<T>(manifest: ManifestBase): manifest is ManifestLoaderType<T>;
|
|
58
|
-
|
|
59
|
-
declare function loadExtension<T = unknown>(manifest: ManifestWithLoader<T>): Promise<T | null>;
|
|
60
|
-
|
|
61
|
-
declare function createExtensionElementOrFallback(manifest: any, fallbackElementName: string): Promise<HTMLElement | undefined>;
|
|
62
|
-
|
|
63
|
-
declare function createExtensionClass<T = unknown>(manifest: ManifestClass, constructorArguments: unknown[]): Promise<T | undefined>;
|
|
64
|
-
|
|
65
|
-
declare const umbExtensionsRegistry: UmbExtensionRegistry;
|
|
66
|
-
|
|
67
|
-
export { ManifestJSType, ManifestLoaderType, UMB_EXTENSION_REGISTRY_TOKEN, UmbEntrypointModule, UmbEntrypointOnInit, UmbExtensionRegistry, createExtensionClass, createExtensionElement, createExtensionElementOrFallback, hasDefaultExport, hasInitExport, isManifestElementNameType, isManifestElementableType, isManifestJSType, isManifestLoaderType, loadExtension, umbExtensionsRegistry };
|