@umbraco-cms/backoffice 1.0.0-next.16eddfa6 → 1.0.0-next.186405ee
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/backend-api.d.ts +509 -90
- package/collection.d.ts +38 -0
- package/content-type.d.ts +127 -0
- package/context-api.d.ts +45 -3
- package/custom-elements.json +4937 -4378
- package/extensions-api.d.ts +11 -12
- package/extensions-registry.d.ts +123 -81
- package/id.d.ts +6 -0
- package/modal.d.ts +67 -63
- package/models.d.ts +3 -70
- package/package.json +2 -2
- package/picker-input.d.ts +3 -2
- package/repository.d.ts +53 -38
- package/resources.d.ts +4 -10
- package/router.d.ts +1 -8
- package/section.d.ts +29 -0
- package/store.d.ts +1 -1
- package/tree.d.ts +136 -0
- package/umbraco-package-schema.json +37084 -1768
- package/utils.d.ts +27 -9
- package/variant.d.ts +21 -0
- package/vscode-html-custom-data.json +2175 -2002
- package/workspace.d.ts +62 -17
- package/property-editor.d.ts +0 -8
package/models.d.ts
CHANGED
|
@@ -1,80 +1,13 @@
|
|
|
1
|
-
import { EntityTreeItemResponseModel, FolderTreeItemResponseModel, PackageManifestResponseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
2
|
-
|
|
3
1
|
type HTMLElementConstructor<T = HTMLElement> = new (...args: any[]) => T;
|
|
4
2
|
type ClassConstructor<T> = new (...args: any[]) => T;
|
|
5
|
-
interface Entity {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
icon: string;
|
|
9
|
-
type: string;
|
|
10
|
-
hasChildren: boolean;
|
|
11
|
-
parentId: string | null;
|
|
12
|
-
}
|
|
13
3
|
/** Tried to find a common base of our entities — used by Entity Workspace Context */
|
|
14
|
-
type
|
|
4
|
+
type UmbEntityBase = {
|
|
15
5
|
id?: string;
|
|
16
6
|
name?: string;
|
|
17
7
|
};
|
|
18
|
-
interface
|
|
19
|
-
type: 'user';
|
|
20
|
-
}
|
|
21
|
-
type UserStatus = 'enabled' | 'inactive' | 'invited' | 'disabled';
|
|
22
|
-
interface UserDetails extends UserEntity {
|
|
23
|
-
email: string;
|
|
24
|
-
status: UserStatus;
|
|
25
|
-
language: string;
|
|
26
|
-
lastLoginDate?: string;
|
|
27
|
-
lastLockoutDate?: string;
|
|
28
|
-
lastPasswordChangeDate?: string;
|
|
29
|
-
updateDate: string;
|
|
30
|
-
createDate: string;
|
|
31
|
-
failedLoginAttempts: number;
|
|
32
|
-
userGroups: Array<string>;
|
|
33
|
-
contentStartNodes: Array<string>;
|
|
34
|
-
mediaStartNodes: Array<string>;
|
|
35
|
-
}
|
|
36
|
-
interface UserGroupEntity extends Entity {
|
|
37
|
-
type: 'user-group';
|
|
38
|
-
}
|
|
39
|
-
interface UserGroupDetails extends UserGroupEntity {
|
|
40
|
-
sections: Array<string>;
|
|
41
|
-
contentStartNode?: string;
|
|
42
|
-
mediaStartNode?: string;
|
|
43
|
-
permissions: Array<string>;
|
|
44
|
-
}
|
|
45
|
-
interface MemberTypeDetails extends EntityTreeItemResponseModel {
|
|
46
|
-
id: string;
|
|
47
|
-
alias: string;
|
|
48
|
-
properties: [];
|
|
49
|
-
}
|
|
50
|
-
interface MediaTypeDetails extends FolderTreeItemResponseModel {
|
|
51
|
-
id: string;
|
|
52
|
-
alias: string;
|
|
53
|
-
properties: [];
|
|
54
|
-
}
|
|
55
|
-
interface MemberGroupDetails extends EntityTreeItemResponseModel {
|
|
56
|
-
id: string;
|
|
57
|
-
}
|
|
58
|
-
interface MemberDetails extends EntityTreeItemResponseModel {
|
|
59
|
-
id: string;
|
|
60
|
-
}
|
|
61
|
-
interface DocumentBlueprintDetails {
|
|
62
|
-
id: string;
|
|
63
|
-
name: string;
|
|
64
|
-
type: 'document-blueprint';
|
|
65
|
-
properties: Array<any>;
|
|
66
|
-
data: Array<any>;
|
|
67
|
-
icon: string;
|
|
68
|
-
documentTypeKey: string;
|
|
69
|
-
}
|
|
70
|
-
interface SwatchDetails {
|
|
8
|
+
interface UmbSwatchDetails {
|
|
71
9
|
label: string;
|
|
72
10
|
value: string;
|
|
73
11
|
}
|
|
74
|
-
type UmbPackage = PackageManifestResponseModel;
|
|
75
|
-
type PackageManifestResponse = UmbPackage[];
|
|
76
|
-
type UmbPackageWithMigrationStatus = UmbPackage & {
|
|
77
|
-
hasPendingMigrations: boolean;
|
|
78
|
-
};
|
|
79
12
|
|
|
80
|
-
export {
|
|
13
|
+
export { ClassConstructor, HTMLElementConstructor, UmbEntityBase, UmbSwatchDetails };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-cms/backoffice",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.186405ee",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"umbraco",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@types/uuid": "^9.0.1",
|
|
29
|
-
"@umbraco-ui/uui": "
|
|
29
|
+
"@umbraco-ui/uui": "1.2.1",
|
|
30
30
|
"rxjs": "^7.8.0"
|
|
31
31
|
},
|
|
32
32
|
"customElements": "custom-elements.json"
|
package/picker-input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { UmbItemRepository } from '@umbraco-cms/backoffice/repository';
|
|
3
3
|
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
4
|
-
import { UmbModalToken, UmbModalContext } from '@umbraco-cms/backoffice/modal';
|
|
4
|
+
import { UmbModalToken, UmbModalContext, UmbPickerModalData } from '@umbraco-cms/backoffice/modal';
|
|
5
5
|
import { ItemResponseModelBaseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
6
6
|
|
|
7
7
|
declare class UmbPickerInputContext<ItemType extends ItemResponseModelBaseModel> {
|
|
@@ -10,6 +10,7 @@ declare class UmbPickerInputContext<ItemType extends ItemResponseModelBaseModel>
|
|
|
10
10
|
modalAlias: string | UmbModalToken;
|
|
11
11
|
repository?: UmbItemRepository<ItemType>;
|
|
12
12
|
modalContext?: UmbModalContext;
|
|
13
|
+
pickableFilter?: (item: ItemType) => boolean;
|
|
13
14
|
selection: rxjs.Observable<string[]>;
|
|
14
15
|
selectedItems: rxjs.Observable<ItemType[]>;
|
|
15
16
|
max: number;
|
|
@@ -17,7 +18,7 @@ declare class UmbPickerInputContext<ItemType extends ItemResponseModelBaseModel>
|
|
|
17
18
|
constructor(host: UmbControllerHostElement, repositoryAlias: string, modalAlias: string | UmbModalToken, getUniqueMethod?: (entry: ItemType) => string | undefined);
|
|
18
19
|
getSelection(): string[];
|
|
19
20
|
setSelection(selection: string[]): void;
|
|
20
|
-
openPicker(pickerData?:
|
|
21
|
+
openPicker(pickerData?: Partial<UmbPickerModalData<ItemType>>): void;
|
|
21
22
|
requestRemoveItem(unique: string): Promise<void>;
|
|
22
23
|
}
|
|
23
24
|
|
package/repository.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiError, CancelError, FolderReponseModel, CreateFolderRequestModel, UpdateFolderReponseModel, TreeItemPresentationModel, ProblemDetailsModel, FolderModelBaseModel, ItemResponseModelBaseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
2
2
|
import { DataSourceResponse as DataSourceResponse$1, UmbDataSourceErrorResponse as UmbDataSourceErrorResponse$1 } from '@umbraco-cms/backoffice/repository';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
+
import { UmbTreeRootModel, UmbTreeRootEntityModel } from '@umbraco-cms/backoffice/tree';
|
|
4
5
|
|
|
5
6
|
interface DataSourceResponse<T = undefined> extends UmbDataSourceErrorResponse {
|
|
6
7
|
data?: T;
|
|
7
8
|
}
|
|
8
9
|
interface UmbDataSourceErrorResponse {
|
|
9
|
-
error?:
|
|
10
|
+
error?: ApiError | CancelError;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
interface UmbDataSource<CreateRequestType, UpdateRequestType, ResponseType> {
|
|
13
|
+
interface UmbDataSource<CreateRequestType, CreateResponseType, UpdateRequestType, ResponseType> {
|
|
13
14
|
createScaffold(parentId: string | null): Promise<DataSourceResponse$1<CreateRequestType>>;
|
|
14
15
|
get(unique: string): Promise<DataSourceResponse$1<ResponseType>>;
|
|
15
|
-
insert(data: CreateRequestType): Promise<
|
|
16
|
+
insert(data: CreateRequestType): Promise<DataSourceResponse$1<CreateResponseType>>;
|
|
16
17
|
update(unique: string, data: UpdateRequestType): Promise<DataSourceResponse$1<ResponseType>>;
|
|
17
18
|
delete(unique: string): Promise<DataSourceResponse$1>;
|
|
18
19
|
}
|
|
@@ -25,10 +26,39 @@ interface UmbFolderDataSource {
|
|
|
25
26
|
delete(unique: string): Promise<DataSourceResponse>;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
interface
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
interface UmbPagedData<T> {
|
|
30
|
+
total: number;
|
|
31
|
+
items: Array<T>;
|
|
32
|
+
}
|
|
33
|
+
interface UmbTreeRepository<TreeItemType extends TreeItemPresentationModel, TreeRootType extends UmbTreeRootModel = UmbTreeRootEntityModel> {
|
|
34
|
+
requestTreeRoot: () => Promise<{
|
|
35
|
+
data?: TreeRootType;
|
|
36
|
+
error?: ProblemDetailsModel;
|
|
37
|
+
}>;
|
|
38
|
+
requestRootTreeItems: () => Promise<{
|
|
39
|
+
data?: UmbPagedData<TreeItemType>;
|
|
40
|
+
error?: ProblemDetailsModel;
|
|
41
|
+
asObservable?: () => Observable<TreeItemType[]>;
|
|
42
|
+
}>;
|
|
43
|
+
requestTreeItemsOf: (parentUnique: string | null) => Promise<{
|
|
44
|
+
data?: UmbPagedData<TreeItemType>;
|
|
45
|
+
error?: ProblemDetailsModel;
|
|
46
|
+
asObservable?: () => Observable<TreeItemType[]>;
|
|
47
|
+
}>;
|
|
48
|
+
requestItemsLegacy?: (uniques: string[]) => Promise<{
|
|
49
|
+
data?: Array<TreeItemType>;
|
|
50
|
+
error?: ProblemDetailsModel;
|
|
51
|
+
asObservable?: () => Observable<any[]>;
|
|
52
|
+
}>;
|
|
53
|
+
rootTreeItems: () => Promise<Observable<TreeItemType[]>>;
|
|
54
|
+
treeItemsOf: (parentUnique: string | null) => Promise<Observable<TreeItemType[]>>;
|
|
55
|
+
itemsLegacy?: (uniques: string[]) => Promise<Observable<any[]>>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface UmbTreeDataSource<ItemType = any, PagedItemType = UmbPagedData<ItemType>> {
|
|
59
|
+
getRootItems(): Promise<DataSourceResponse<PagedItemType>>;
|
|
60
|
+
getChildrenOf(parentUnique: string | null): Promise<DataSourceResponse<PagedItemType>>;
|
|
61
|
+
getItems(unique: Array<string>): Promise<DataSourceResponse<Array<any>>>;
|
|
32
62
|
}
|
|
33
63
|
|
|
34
64
|
interface UmbItemDataSource<ItemType> {
|
|
@@ -36,11 +66,16 @@ interface UmbItemDataSource<ItemType> {
|
|
|
36
66
|
}
|
|
37
67
|
|
|
38
68
|
interface UmbMoveDataSource {
|
|
39
|
-
move(unique: string, targetUnique: string): Promise<UmbDataSourceErrorResponse$1>;
|
|
69
|
+
move(unique: string, targetUnique: string | null): Promise<UmbDataSourceErrorResponse$1>;
|
|
40
70
|
}
|
|
41
71
|
|
|
42
72
|
interface UmbCopyDataSource {
|
|
43
|
-
copy(unique: string, targetUnique: string): Promise<DataSourceResponse$1<string>>;
|
|
73
|
+
copy(unique: string, targetUnique: string | null): Promise<DataSourceResponse$1<string>>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface UmbCollectionDataSource<ItemType = any, PagedItemType = UmbPagedData<ItemType>> {
|
|
77
|
+
getCollection(): Promise<DataSourceResponse<PagedItemType>>;
|
|
78
|
+
filterCollection(filter: any): Promise<DataSourceResponse<PagedItemType>>;
|
|
44
79
|
}
|
|
45
80
|
|
|
46
81
|
interface UmbRepositoryErrorResponse {
|
|
@@ -49,39 +84,15 @@ interface UmbRepositoryErrorResponse {
|
|
|
49
84
|
interface UmbRepositoryResponse<T> extends UmbRepositoryErrorResponse {
|
|
50
85
|
data?: T;
|
|
51
86
|
}
|
|
52
|
-
interface UmbDetailRepository<CreateRequestType = any, UpdateRequestType = any, ResponseType = any> {
|
|
87
|
+
interface UmbDetailRepository<CreateRequestType = any, CreateResponseType = any, UpdateRequestType = any, ResponseType = any> {
|
|
53
88
|
createScaffold(parentId: string | null): Promise<UmbRepositoryResponse<CreateRequestType>>;
|
|
54
89
|
requestById(id: string): Promise<UmbRepositoryResponse<ResponseType>>;
|
|
55
|
-
|
|
90
|
+
byId(id: string): Promise<Observable<ResponseType>>;
|
|
91
|
+
create(data: CreateRequestType): Promise<UmbRepositoryResponse<CreateResponseType>>;
|
|
56
92
|
save(id: string, data: UpdateRequestType): Promise<UmbRepositoryErrorResponse>;
|
|
57
93
|
delete(id: string): Promise<UmbRepositoryErrorResponse>;
|
|
58
94
|
}
|
|
59
95
|
|
|
60
|
-
interface UmbPagedData<T> {
|
|
61
|
-
total: number;
|
|
62
|
-
items: Array<T>;
|
|
63
|
-
}
|
|
64
|
-
interface UmbTreeRepository<ItemType = any, PagedItemType = UmbPagedData<ItemType>> {
|
|
65
|
-
requestRootTreeItems: () => Promise<{
|
|
66
|
-
data: PagedItemType | undefined;
|
|
67
|
-
error: ProblemDetailsModel | undefined;
|
|
68
|
-
asObservable?: () => Observable<ItemType[]>;
|
|
69
|
-
}>;
|
|
70
|
-
requestTreeItemsOf: (parentUnique: string | null) => Promise<{
|
|
71
|
-
data: PagedItemType | undefined;
|
|
72
|
-
error: ProblemDetailsModel | undefined;
|
|
73
|
-
asObservable?: () => Observable<ItemType[]>;
|
|
74
|
-
}>;
|
|
75
|
-
requestItemsLegacy?: (uniques: string[]) => Promise<{
|
|
76
|
-
data: Array<ItemType> | undefined;
|
|
77
|
-
error: ProblemDetailsModel | undefined;
|
|
78
|
-
asObservable?: () => Observable<ItemType[]>;
|
|
79
|
-
}>;
|
|
80
|
-
rootTreeItems: () => Promise<Observable<ItemType[]>>;
|
|
81
|
-
treeItemsOf: (parentUnique: string | null) => Promise<Observable<ItemType[]>>;
|
|
82
|
-
itemsLegacy?: (uniques: string[]) => Promise<Observable<ItemType[]>>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
96
|
interface UmbFolderRepository {
|
|
86
97
|
createFolderScaffold(parentId: string | null): Promise<{
|
|
87
98
|
data?: FolderReponseModel;
|
|
@@ -104,6 +115,10 @@ interface UmbFolderRepository {
|
|
|
104
115
|
}>;
|
|
105
116
|
}
|
|
106
117
|
|
|
118
|
+
interface UmbCollectionRepository {
|
|
119
|
+
requestCollection(filter?: any): Promise<any>;
|
|
120
|
+
}
|
|
121
|
+
|
|
107
122
|
interface UmbItemRepository<ItemType extends ItemResponseModelBaseModel> {
|
|
108
123
|
requestItems: (uniques: string[]) => Promise<{
|
|
109
124
|
data?: Array<ItemType> | undefined;
|
|
@@ -121,4 +136,4 @@ interface UmbCopyRepository {
|
|
|
121
136
|
copy(unique: string, targetUnique: string): Promise<UmbRepositoryResponse<string>>;
|
|
122
137
|
}
|
|
123
138
|
|
|
124
|
-
export { DataSourceResponse, UmbCopyDataSource, UmbCopyRepository, UmbDataSource, UmbDataSourceErrorResponse, UmbDetailRepository, UmbFolderDataSource, UmbFolderRepository, UmbItemDataSource, UmbItemRepository, UmbMoveDataSource, UmbMoveRepository, UmbPagedData, UmbRepositoryErrorResponse, UmbRepositoryResponse, UmbTreeDataSource, UmbTreeRepository };
|
|
139
|
+
export { DataSourceResponse, UmbCollectionDataSource, UmbCollectionRepository, UmbCopyDataSource, UmbCopyRepository, UmbDataSource, UmbDataSourceErrorResponse, UmbDetailRepository, UmbFolderDataSource, UmbFolderRepository, UmbItemDataSource, UmbItemRepository, UmbMoveDataSource, UmbMoveRepository, UmbPagedData, UmbRepositoryErrorResponse, UmbRepositoryResponse, UmbTreeDataSource, UmbTreeRepository };
|
package/resources.d.ts
CHANGED
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
import { UmbNotificationOptions } from '@umbraco-cms/backoffice/notification';
|
|
2
|
-
import { ProblemDetailsModel } from '@umbraco-cms/backoffice/backend-api';
|
|
3
2
|
import { UmbController, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
4
3
|
import { DataSourceResponse as DataSourceResponse$1 } from '@umbraco-cms/backoffice/repository';
|
|
4
|
+
import { ApiError, CancelError } from '@umbraco-cms/backoffice/backend-api';
|
|
5
5
|
|
|
6
6
|
declare class UmbResourceController extends UmbController {
|
|
7
7
|
#private;
|
|
8
8
|
constructor(host: UmbControllerHostElement, promise: Promise<any>, alias?: string);
|
|
9
9
|
hostConnected(): void;
|
|
10
10
|
hostDisconnected(): void;
|
|
11
|
-
/**
|
|
12
|
-
* Extract the ProblemDetailsModel object from an ApiError.
|
|
13
|
-
*
|
|
14
|
-
* This assumes that all ApiErrors contain a ProblemDetailsModel object in their body.
|
|
15
|
-
*/
|
|
16
|
-
static toProblemDetailsModel(error: unknown): ProblemDetailsModel | undefined;
|
|
17
11
|
/**
|
|
18
12
|
* Base execute function with a try/catch block and return a tuple with the result and the error.
|
|
19
13
|
*/
|
|
20
14
|
static tryExecute<T>(promise: Promise<T>): Promise<DataSourceResponse$1<T>>;
|
|
21
15
|
/**
|
|
22
|
-
* Wrap the {
|
|
16
|
+
* Wrap the {tryExecute} function in a try/catch block and return the result.
|
|
23
17
|
* If the executor function throws an error, then show the details in a notification.
|
|
24
18
|
*/
|
|
25
19
|
tryExecuteAndNotify<T>(options?: UmbNotificationOptions): Promise<DataSourceResponse$1<T>>;
|
|
@@ -42,11 +36,11 @@ interface DataSourceResponse<T = undefined> extends UmbDataSourceErrorResponse {
|
|
|
42
36
|
data?: T;
|
|
43
37
|
}
|
|
44
38
|
interface UmbDataSourceErrorResponse {
|
|
45
|
-
error?:
|
|
39
|
+
error?: ApiError | CancelError;
|
|
46
40
|
}
|
|
47
41
|
|
|
48
42
|
declare function tryExecute<T>(promise: Promise<T>): Promise<DataSourceResponse<T>>;
|
|
49
43
|
|
|
50
|
-
declare function tryExecuteAndNotify<T>(host: UmbControllerHostElement, resource: Promise<T>, options?: UmbNotificationOptions
|
|
44
|
+
declare function tryExecuteAndNotify<T>(host: UmbControllerHostElement, resource: Promise<T>, options?: UmbNotificationOptions): Promise<DataSourceResponse<T>>;
|
|
51
45
|
|
|
52
46
|
export { UmbResourceController, tryExecute, tryExecuteAndNotify };
|
package/router.d.ts
CHANGED
|
@@ -350,13 +350,6 @@ declare function toQueryString(query: Query): string;
|
|
|
350
350
|
*/
|
|
351
351
|
declare function ensureAnchorHistory(): void;
|
|
352
352
|
|
|
353
|
-
interface UmbRouteLocation {
|
|
354
|
-
name?: string;
|
|
355
|
-
params: {
|
|
356
|
-
[key: string]: string;
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
|
|
360
353
|
declare class UmbRouteContext {
|
|
361
354
|
#private;
|
|
362
355
|
private _onGotModals;
|
|
@@ -372,4 +365,4 @@ declare function generateRoutePathBuilder(path: string): (params: {
|
|
|
372
365
|
[key: string]: string | number;
|
|
373
366
|
}) => string;
|
|
374
367
|
|
|
375
|
-
export { Guard, IComponentRoute, IRedirectRoute, IResolverRoute,
|
|
368
|
+
export { Guard, IComponentRoute, IRedirectRoute, IResolverRoute, IRoutingInfo, PageComponent, Params, Query, UMB_ROUTE_CONTEXT_TOKEN, IRoute as UmbRoute, UmbRouteContext, addListener, attachCallback, basePath, constructAbsolutePath, constructPathWithBasePath, dispatchGlobalRouterEvent, dispatchRouteChangeEvent, ensureAnchorHistory, ensureHistoryEvents, ensureSlash, generateRoutePathBuilder, getFragments, handleRedirect, historyPatches, isPathActive, isRedirectRoute, isResolverRoute, matchRoute, matchRoutes, path, pathWithoutBasePath, query, queryParentRoots, queryParentRouterSlot, queryString, removeListeners, resolvePageComponent, saveNativeFunction, shouldNavigate, slashify, stripSlash, stripStart, toQuery, toQueryString, traverseRouterTree };
|
package/section.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
3
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
4
|
+
import { ManifestSection } from '@umbraco-cms/backoffice/extensions-registry';
|
|
5
|
+
|
|
6
|
+
declare class UmbSectionSidebarContext {
|
|
7
|
+
#private;
|
|
8
|
+
contextMenuIsOpen: rxjs.Observable<boolean>;
|
|
9
|
+
entityType: rxjs.Observable<string | undefined>;
|
|
10
|
+
unique: rxjs.Observable<string | null | undefined>;
|
|
11
|
+
headline: rxjs.Observable<string | undefined>;
|
|
12
|
+
constructor(host: UmbControllerHostElement);
|
|
13
|
+
toggleContextMenu(entityType: string, unique: string | null | undefined, headline: string): void;
|
|
14
|
+
openContextMenu(entityType: string, unique: string | null | undefined, headline: string): void;
|
|
15
|
+
closeContextMenu(): void;
|
|
16
|
+
}
|
|
17
|
+
declare const UMB_SECTION_SIDEBAR_CONTEXT_TOKEN: UmbContextToken<UmbSectionSidebarContext>;
|
|
18
|
+
|
|
19
|
+
declare class UmbSectionContext {
|
|
20
|
+
#private;
|
|
21
|
+
readonly alias: rxjs.Observable<string | undefined>;
|
|
22
|
+
readonly pathname: rxjs.Observable<string | undefined>;
|
|
23
|
+
readonly label: rxjs.Observable<string | undefined>;
|
|
24
|
+
constructor(manifest: ManifestSection);
|
|
25
|
+
setManifest(manifest?: ManifestSection): void;
|
|
26
|
+
}
|
|
27
|
+
declare const UMB_SECTION_CONTEXT_TOKEN: UmbContextToken<UmbSectionContext>;
|
|
28
|
+
|
|
29
|
+
export { UMB_SECTION_CONTEXT_TOKEN, UMB_SECTION_SIDEBAR_CONTEXT_TOKEN, UmbSectionContext, UmbSectionSidebarContext };
|
package/store.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ declare class UmbEntityTreeStore extends UmbStoreBase$1<EntityTreeItemResponseMo
|
|
|
97
97
|
* @return {*}
|
|
98
98
|
* @memberof UmbEntityTreeStore
|
|
99
99
|
*/
|
|
100
|
-
items(ids: Array<string>): rxjs.Observable<EntityTreeItemResponseModel[]>;
|
|
100
|
+
items(ids: Array<string | null>): rxjs.Observable<EntityTreeItemResponseModel[]>;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/**
|
package/tree.d.ts
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as _umbraco_cms_backoffice_backend_api from '@umbraco-cms/backoffice/backend-api';
|
|
2
|
+
import { TreeItemPresentationModel, ProblemDetailsModel } from '@umbraco-cms/backoffice/backend-api';
|
|
3
|
+
import * as rxjs from 'rxjs';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
6
|
+
import { UmbPagedData as UmbPagedData$1, UmbTreeRepository } from '@umbraco-cms/backoffice/repository';
|
|
7
|
+
import { UmbTreeContextBase as UmbTreeContextBase$1 } from '@umbraco-cms/backoffice/tree';
|
|
8
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
9
|
+
|
|
10
|
+
interface UmbTreeContext<TreeItemType extends TreeItemPresentationModel> {
|
|
11
|
+
readonly selectable: Observable<boolean>;
|
|
12
|
+
readonly selection: Observable<Array<string | null>>;
|
|
13
|
+
setSelectable(value: boolean): void;
|
|
14
|
+
getSelectable(): boolean;
|
|
15
|
+
setMultiple(value: boolean): void;
|
|
16
|
+
getMultiple(): boolean;
|
|
17
|
+
setSelection(value: Array<string | null>): void;
|
|
18
|
+
getSelection(): Array<string | null>;
|
|
19
|
+
select(unique: string | null): void;
|
|
20
|
+
deselect(unique: string | null): void;
|
|
21
|
+
requestChildrenOf: (parentUnique: string | null) => Promise<{
|
|
22
|
+
data?: UmbPagedData$1<TreeItemType>;
|
|
23
|
+
error?: ProblemDetailsModel;
|
|
24
|
+
asObservable?: () => Observable<TreeItemType[]>;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
declare class UmbTreeContextBase<TreeItemType extends TreeItemPresentationModel> implements UmbTreeContext<TreeItemType> {
|
|
28
|
+
#private;
|
|
29
|
+
host: UmbControllerHostElement;
|
|
30
|
+
readonly selectable: Observable<boolean>;
|
|
31
|
+
readonly multiple: Observable<boolean>;
|
|
32
|
+
readonly selection: Observable<(string | null)[]>;
|
|
33
|
+
repository?: UmbTreeRepository<TreeItemType>;
|
|
34
|
+
selectableFilter?: (item: TreeItemType) => boolean;
|
|
35
|
+
constructor(host: UmbControllerHostElement);
|
|
36
|
+
setTreeAlias(treeAlias?: string): Promise<void>;
|
|
37
|
+
getTreeAlias(): string | undefined;
|
|
38
|
+
setSelectable(value: boolean): void;
|
|
39
|
+
getSelectable(): boolean;
|
|
40
|
+
setMultiple(value: boolean): void;
|
|
41
|
+
getMultiple(): boolean;
|
|
42
|
+
setSelection(value: Array<string | null>): void;
|
|
43
|
+
getSelection(): (string | null)[];
|
|
44
|
+
select(unique: string | null): void;
|
|
45
|
+
deselect(unique: string | null): void;
|
|
46
|
+
requestTreeRoot(): Promise<{
|
|
47
|
+
data?: UmbTreeRootEntityModel | undefined;
|
|
48
|
+
error?: ProblemDetailsModel | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
requestRootItems(): Promise<{
|
|
51
|
+
data?: UmbPagedData$1<TreeItemType> | undefined;
|
|
52
|
+
error?: ProblemDetailsModel | undefined;
|
|
53
|
+
asObservable?: (() => Observable<TreeItemType[]>) | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
requestChildrenOf(parentUnique: string | null): Promise<{
|
|
56
|
+
data?: UmbPagedData$1<TreeItemType> | undefined;
|
|
57
|
+
error?: ProblemDetailsModel | undefined;
|
|
58
|
+
asObservable?: (() => Observable<TreeItemType[]>) | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
rootItems(): Promise<Observable<TreeItemType[]>>;
|
|
61
|
+
childrenOf(parentUnique: string | null): Promise<Observable<TreeItemType[]>>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface UmbPagedData<T> {
|
|
65
|
+
total: number;
|
|
66
|
+
items: Array<T>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface UmbTreeItemContext<TreeItemType extends TreeItemPresentationModel> {
|
|
70
|
+
host: UmbControllerHostElement;
|
|
71
|
+
unique?: string | null;
|
|
72
|
+
type?: string;
|
|
73
|
+
treeItem: Observable<TreeItemType | undefined>;
|
|
74
|
+
hasChildren: Observable<boolean>;
|
|
75
|
+
isLoading: Observable<boolean>;
|
|
76
|
+
isSelectable: Observable<boolean>;
|
|
77
|
+
isSelected: Observable<boolean>;
|
|
78
|
+
isActive: Observable<boolean>;
|
|
79
|
+
hasActions: Observable<boolean>;
|
|
80
|
+
path: Observable<string>;
|
|
81
|
+
setTreeItem(treeItem: TreeItemType | undefined): void;
|
|
82
|
+
requestChildren(): Promise<{
|
|
83
|
+
data?: UmbPagedData$1<TreeItemType> | undefined;
|
|
84
|
+
error?: ProblemDetailsModel | undefined;
|
|
85
|
+
asObservable?: () => Observable<TreeItemType[]>;
|
|
86
|
+
}>;
|
|
87
|
+
toggleContextMenu(): void;
|
|
88
|
+
select(): void;
|
|
89
|
+
deselect(): void;
|
|
90
|
+
constructPath(pathname: string, entityType: string, unique: string): string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type UmbTreeItemUniqueFunction<TreeItemType extends TreeItemPresentationModel> = (x: TreeItemType) => string | null | undefined;
|
|
94
|
+
declare class UmbTreeItemContextBase<TreeItemType extends TreeItemPresentationModel> implements UmbTreeItemContext<TreeItemType> {
|
|
95
|
+
#private;
|
|
96
|
+
host: UmbControllerHostElement;
|
|
97
|
+
unique?: string | null;
|
|
98
|
+
type?: string;
|
|
99
|
+
treeItem: rxjs.Observable<TreeItemType | undefined>;
|
|
100
|
+
hasChildren: rxjs.Observable<boolean>;
|
|
101
|
+
isLoading: rxjs.Observable<boolean>;
|
|
102
|
+
isSelectable: rxjs.Observable<boolean>;
|
|
103
|
+
isSelected: rxjs.Observable<boolean>;
|
|
104
|
+
isActive: rxjs.Observable<boolean>;
|
|
105
|
+
hasActions: rxjs.Observable<boolean>;
|
|
106
|
+
path: rxjs.Observable<string>;
|
|
107
|
+
treeContext?: UmbTreeContextBase$1<TreeItemType>;
|
|
108
|
+
constructor(host: UmbControllerHostElement, getUniqueFunction: UmbTreeItemUniqueFunction<TreeItemType>);
|
|
109
|
+
setTreeItem(treeItem: TreeItemType | undefined): void;
|
|
110
|
+
requestChildren(): Promise<{
|
|
111
|
+
data?: UmbPagedData<TreeItemType> | undefined;
|
|
112
|
+
error?: _umbraco_cms_backoffice_backend_api.ProblemDetailsModel | undefined;
|
|
113
|
+
asObservable?: (() => rxjs.Observable<TreeItemType[]>) | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
toggleContextMenu(): void;
|
|
116
|
+
select(): void;
|
|
117
|
+
deselect(): void;
|
|
118
|
+
getTreeItem(): TreeItemType | undefined;
|
|
119
|
+
constructPath(pathname: string, entityType: string, unique: string | null): string;
|
|
120
|
+
}
|
|
121
|
+
declare const UMB_TREE_ITEM_CONTEXT_TOKEN: UmbContextToken<UmbTreeItemContext<any>>;
|
|
122
|
+
|
|
123
|
+
interface UmbTreeRootModel {
|
|
124
|
+
type: string;
|
|
125
|
+
name: string;
|
|
126
|
+
hasChildren: boolean;
|
|
127
|
+
icon?: string;
|
|
128
|
+
}
|
|
129
|
+
interface UmbTreeRootEntityModel extends UmbTreeRootModel {
|
|
130
|
+
id: string | null;
|
|
131
|
+
}
|
|
132
|
+
interface UmbTreeRootFileSystemModel extends UmbTreeRootModel {
|
|
133
|
+
path: string | null;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { UMB_TREE_ITEM_CONTEXT_TOKEN, UmbTreeContext, UmbTreeContextBase, UmbTreeItemContext, UmbTreeItemContextBase, UmbTreeItemUniqueFunction, UmbTreeRootEntityModel, UmbTreeRootFileSystemModel, UmbTreeRootModel };
|