@umbraco-cms/backoffice 1.0.0-next.37dcc47c → 1.0.0-next.3bcfb12e
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/README.md +9 -8
- package/backend-api.d.ts +1036 -295
- package/collection.d.ts +38 -0
- package/content-type.d.ts +127 -0
- package/context-api.d.ts +76 -6
- package/controller.d.ts +7 -6
- package/custom-elements.json +8752 -0
- package/element.d.ts +6 -6
- package/entity-action.d.ts +29 -19
- package/extensions-api.d.ts +14 -13
- package/extensions-registry.d.ts +310 -92
- package/id.d.ts +6 -0
- package/modal.d.ts +316 -31
- package/models.d.ts +7 -69
- package/notification.d.ts +1 -1
- package/observable-api.d.ts +90 -49
- package/package.json +7 -4
- package/picker-input.d.ts +25 -0
- package/repository.d.ts +114 -40
- package/resources.d.ts +11 -15
- package/router.d.ts +368 -0
- package/section.d.ts +29 -0
- package/sorter.d.ts +103 -0
- package/store.d.ts +93 -52
- package/tree.d.ts +136 -0
- package/umbraco-package-schema.json +37822 -0
- package/utils.d.ts +28 -8
- package/variant.d.ts +21 -0
- package/vscode-html-custom-data.json +3509 -0
- package/workspace.d.ts +72 -20
- package/property-editor.d.ts +0 -8
package/store.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
4
|
+
import { UmbArrayState } from '@umbraco-cms/backoffice/observable-api';
|
|
5
|
+
import { EntityTreeItemResponseModel, FileSystemTreeItemPresentationModel } from '@umbraco-cms/backoffice/backend-api';
|
|
6
|
+
import { UmbStoreBase as UmbStoreBase$1, UmbTreeStore as UmbTreeStore$1 } from '@umbraco-cms/backoffice/store';
|
|
6
7
|
|
|
7
8
|
interface UmbDataStoreIdentifiers {
|
|
8
9
|
key?: string;
|
|
@@ -11,24 +12,6 @@ interface UmbDataStoreIdentifiers {
|
|
|
11
12
|
interface UmbDataStore {
|
|
12
13
|
readonly storeAlias: string;
|
|
13
14
|
}
|
|
14
|
-
interface UmbTreeStore<T> extends UmbDataStore {
|
|
15
|
-
getTreeRoot(): Observable<Array<T>>;
|
|
16
|
-
getTreeItemChildren(key: string): Observable<Array<T>>;
|
|
17
|
-
/**
|
|
18
|
-
* @description - Trash data.
|
|
19
|
-
* @param {string[]} keys
|
|
20
|
-
* @return {*} {(Promise<void>)}
|
|
21
|
-
* @memberof UmbTreeStore
|
|
22
|
-
*/
|
|
23
|
-
trash(keys: string[]): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* @description - Move data.
|
|
26
|
-
* @param {string[]} keys
|
|
27
|
-
* @return {*} {(Promise<void>)}
|
|
28
|
-
* @memberof UmbTreeStore
|
|
29
|
-
*/
|
|
30
|
-
move(keys: string[], destination: string): Promise<void>;
|
|
31
|
-
}
|
|
32
15
|
interface UmbEntityDetailStore<T> extends UmbDataStore {
|
|
33
16
|
/**
|
|
34
17
|
* @description - Request scaffold data by entityType and . The data is added to the store and is returned as an Observable.
|
|
@@ -36,7 +19,7 @@ interface UmbEntityDetailStore<T> extends UmbDataStore {
|
|
|
36
19
|
* @return {*} {T}
|
|
37
20
|
* @memberof UmbEntityDetailStore
|
|
38
21
|
*/
|
|
39
|
-
getScaffold: (entityType: string,
|
|
22
|
+
getScaffold: (entityType: string, parentId: string | null) => T;
|
|
40
23
|
/**
|
|
41
24
|
* @description - Request data by key. The data is added to the store and is returned as an Observable.
|
|
42
25
|
* @param {string} key
|
|
@@ -56,58 +39,116 @@ interface UmbContentStore<T> extends UmbEntityDetailStore<T> {
|
|
|
56
39
|
save(data: T[]): Promise<void>;
|
|
57
40
|
}
|
|
58
41
|
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
interface UmbStore<T> {
|
|
43
|
+
appendItems: (items: Array<T>) => void;
|
|
44
|
+
updateItem: (unique: string, item: Partial<T>) => void;
|
|
45
|
+
removeItem: (unique: string) => void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare class UmbStoreBase<StoreItemType = any> implements UmbStore<StoreItemType> {
|
|
49
|
+
protected _host: UmbControllerHostElement;
|
|
50
|
+
protected _data: UmbArrayState<StoreItemType>;
|
|
61
51
|
readonly storeAlias: string;
|
|
62
|
-
constructor(_host:
|
|
52
|
+
constructor(_host: UmbControllerHostElement, storeAlias: string, data: UmbArrayState<StoreItemType>);
|
|
53
|
+
/**
|
|
54
|
+
* Appends items to the store
|
|
55
|
+
* @param {Array<StoreItemType>} items
|
|
56
|
+
* @memberof UmbEntityTreeStore
|
|
57
|
+
*/
|
|
58
|
+
appendItems(items: Array<StoreItemType>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Updates an item in the store
|
|
61
|
+
* @param {string} id
|
|
62
|
+
* @param {Partial<StoreItemType>} data
|
|
63
|
+
* @memberof UmbEntityTreeStore
|
|
64
|
+
*/
|
|
65
|
+
updateItem(unique: string, data: Partial<StoreItemType>): void;
|
|
66
|
+
/**
|
|
67
|
+
* Removes an item from the store
|
|
68
|
+
* @param {string} id
|
|
69
|
+
* @memberof UmbEntityTreeStore
|
|
70
|
+
*/
|
|
71
|
+
removeItem(unique: string): void;
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
/**
|
|
66
75
|
* @export
|
|
67
|
-
* @class
|
|
76
|
+
* @class UmbEntityTreeStore
|
|
68
77
|
* @extends {UmbStoreBase}
|
|
69
|
-
* @description -
|
|
78
|
+
* @description - Entity Tree Store
|
|
70
79
|
*/
|
|
71
|
-
declare class
|
|
72
|
-
|
|
80
|
+
declare class UmbEntityTreeStore extends UmbStoreBase$1<EntityTreeItemResponseModel> implements UmbTreeStore$1<EntityTreeItemResponseModel> {
|
|
81
|
+
constructor(host: UmbControllerHostElement, storeAlias: string);
|
|
73
82
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @
|
|
76
|
-
* @memberof UmbTreeStoreBase
|
|
83
|
+
* An observable to observe the root items
|
|
84
|
+
* @memberof UmbEntityTreeStore
|
|
77
85
|
*/
|
|
78
|
-
|
|
86
|
+
rootItems: rxjs.Observable<EntityTreeItemResponseModel[]>;
|
|
79
87
|
/**
|
|
80
|
-
*
|
|
81
|
-
* @param {string}
|
|
82
|
-
* @
|
|
83
|
-
* @memberof
|
|
88
|
+
* Returns an observable to observe the children of a given parent
|
|
89
|
+
* @param {(string | null)} parentId
|
|
90
|
+
* @return {*}
|
|
91
|
+
* @memberof UmbEntityTreeStore
|
|
84
92
|
*/
|
|
85
|
-
|
|
93
|
+
childrenOf(parentId: string | null): rxjs.Observable<EntityTreeItemResponseModel[]>;
|
|
86
94
|
/**
|
|
87
|
-
*
|
|
88
|
-
* @param {string}
|
|
89
|
-
* @
|
|
95
|
+
* Returns an observable to observe the items with the given ids
|
|
96
|
+
* @param {Array<string>} ids
|
|
97
|
+
* @return {*}
|
|
98
|
+
* @memberof UmbEntityTreeStore
|
|
90
99
|
*/
|
|
91
|
-
|
|
100
|
+
items(ids: Array<string | null>): rxjs.Observable<EntityTreeItemResponseModel[]>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @export
|
|
105
|
+
* @class UmbFileSystemTreeStore
|
|
106
|
+
* @extends {UmbStoreBase}
|
|
107
|
+
* @description - File System Tree Store
|
|
108
|
+
*/
|
|
109
|
+
declare class UmbFileSystemTreeStore extends UmbStoreBase$1<FileSystemTreeItemPresentationModel> implements UmbTreeStore$1<FileSystemTreeItemPresentationModel> {
|
|
110
|
+
constructor(host: UmbControllerHostElement, storeAlias: string);
|
|
92
111
|
/**
|
|
93
112
|
* An observable to observe the root items
|
|
94
|
-
* @memberof
|
|
113
|
+
* @memberof UmbFileSystemTreeStore
|
|
95
114
|
*/
|
|
96
|
-
rootItems: rxjs.Observable<
|
|
115
|
+
rootItems: rxjs.Observable<FileSystemTreeItemPresentationModel[]>;
|
|
97
116
|
/**
|
|
98
117
|
* Returns an observable to observe the children of a given parent
|
|
99
|
-
* @param {(string | null)}
|
|
118
|
+
* @param {(string | null)} parentPath
|
|
100
119
|
* @return {*}
|
|
101
|
-
* @memberof
|
|
120
|
+
* @memberof UmbFileSystemTreeStore
|
|
102
121
|
*/
|
|
103
|
-
childrenOf(
|
|
122
|
+
childrenOf(parentPath: string | null): rxjs.Observable<FileSystemTreeItemPresentationModel[]>;
|
|
104
123
|
/**
|
|
105
|
-
* Returns an observable to observe the items with the given
|
|
106
|
-
* @param {Array<string>}
|
|
124
|
+
* Returns an observable to observe the items with the given ids
|
|
125
|
+
* @param {Array<string>} paths
|
|
107
126
|
* @return {*}
|
|
108
|
-
* @memberof
|
|
127
|
+
* @memberof UmbFileSystemTreeStore
|
|
109
128
|
*/
|
|
110
|
-
items(
|
|
129
|
+
items(paths: Array<string>): rxjs.Observable<FileSystemTreeItemPresentationModel[]>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
type TreeItemPresentationModel = {
|
|
133
|
+
name?: string;
|
|
134
|
+
type?: string;
|
|
135
|
+
icon?: string;
|
|
136
|
+
hasChildren?: boolean;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
type ItemResponseModelBaseModel = {
|
|
140
|
+
name?: string;
|
|
141
|
+
id?: string;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
interface UmbTreeStore<T extends TreeItemPresentationModel = any> extends UmbStore<T> {
|
|
145
|
+
rootItems: Observable<Array<T>>;
|
|
146
|
+
childrenOf: (parentUnique: string | null) => Observable<Array<T>>;
|
|
147
|
+
items: (uniques: Array<string>) => Observable<Array<T>>;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
interface UmbItemStore<T extends ItemResponseModelBaseModel = any> extends UmbStore<T> {
|
|
151
|
+
items: (uniques: Array<string>) => Observable<Array<T>>;
|
|
111
152
|
}
|
|
112
153
|
|
|
113
|
-
export { UmbContentStore, UmbDataStore, UmbDataStoreIdentifiers, UmbEntityDetailStore, UmbStoreBase, UmbTreeStore
|
|
154
|
+
export { UmbContentStore, UmbDataStore, UmbDataStoreIdentifiers, UmbEntityDetailStore, UmbEntityTreeStore, UmbFileSystemTreeStore, UmbItemStore, UmbStoreBase, UmbTreeStore };
|
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 };
|