@umbraco-cms/backoffice 1.0.0-next.f2af51c4 → 1.0.0-next.f63da516
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 +493 -74
- package/collection.d.ts +38 -0
- package/content-type.d.ts +127 -0
- package/context-api.d.ts +4 -4
- package/controller.d.ts +1 -1
- package/custom-elements.json +1399 -1353
- package/element.d.ts +4 -4
- package/entity-action.d.ts +6 -13
- package/extensions-api.d.ts +13 -13
- package/extensions-registry.d.ts +290 -91
- package/id.d.ts +6 -0
- package/modal.d.ts +28 -25
- package/models.d.ts +3 -70
- package/notification.d.ts +1 -1
- package/observable-api.d.ts +14 -2
- package/package.json +1 -1
- package/picker-input.d.ts +4 -4
- package/repository.d.ts +71 -38
- package/resources.d.ts +24 -15
- package/router.d.ts +4 -16
- package/section.d.ts +29 -0
- package/sorter.d.ts +103 -0
- package/store.d.ts +5 -5
- package/tree.d.ts +14 -0
- package/umbraco-package-schema.json +37755 -0
- package/utils.d.ts +1 -11
- package/vscode-html-custom-data.json +435 -468
- package/workspace.d.ts +37 -19
- package/property-editor.d.ts +0 -8
package/modal.d.ts
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import * as lit_html from 'lit-html';
|
|
4
3
|
import * as lit from 'lit';
|
|
5
4
|
import { LitElement, TemplateResult } from 'lit';
|
|
5
|
+
import * as lit_html from 'lit-html';
|
|
6
6
|
import { UUIModalDialogElement, UUIModalSidebarElement, UUIModalSidebarSize } from '@umbraco-ui/uui';
|
|
7
|
-
import { UmbControllerHostElement, UmbControllerInterface } from '
|
|
8
|
-
import { UmbContextToken } from '
|
|
9
|
-
import { Params } from '
|
|
10
|
-
import { UmbModalToken as UmbModalToken$1, UmbModalConfig as UmbModalConfig$1, UmbPickerModalData as UmbPickerModalData$1 } from '
|
|
11
|
-
import { LanguageResponseModel, FolderReponseModel } from '
|
|
12
|
-
import { UserDetails } from './models';
|
|
7
|
+
import { UmbControllerHostElement, UmbControllerInterface } from '@umbraco-cms/backoffice/controller';
|
|
8
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
9
|
+
import { Params } from '@umbraco-cms/backoffice/router';
|
|
10
|
+
import { UmbModalToken as UmbModalToken$1, UmbModalConfig as UmbModalConfig$1, UmbPickerModalData as UmbPickerModalData$1 } from '@umbraco-cms/backoffice/modal';
|
|
11
|
+
import { LanguageResponseModel, UserResponseModel, FolderReponseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
13
12
|
|
|
14
13
|
declare class UmbSearchModalElement extends LitElement {
|
|
15
14
|
#private;
|
|
16
|
-
static styles: lit.CSSResult[];
|
|
17
15
|
private _input;
|
|
18
16
|
private _search;
|
|
19
17
|
private _groups;
|
|
20
18
|
connectedCallback(): void;
|
|
21
19
|
render(): lit_html.TemplateResult<1>;
|
|
20
|
+
static styles: lit.CSSResult[];
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
declare global {
|
|
@@ -210,10 +209,10 @@ declare const UMB_CONTEXT_DEBUGGER_MODAL: UmbModalToken$1<UmbContextDebuggerModa
|
|
|
210
209
|
|
|
211
210
|
interface UmbDocumentPickerModalData {
|
|
212
211
|
multiple?: boolean;
|
|
213
|
-
selection?: Array<string>;
|
|
212
|
+
selection?: Array<string | null>;
|
|
214
213
|
}
|
|
215
214
|
interface UmbDocumentPickerModalResult {
|
|
216
|
-
selection: Array<string>;
|
|
215
|
+
selection: Array<string | null>;
|
|
217
216
|
}
|
|
218
217
|
declare const UMB_DOCUMENT_PICKER_MODAL: UmbModalToken$1<UmbDocumentPickerModalData, UmbDocumentPickerModalResult>;
|
|
219
218
|
|
|
@@ -222,7 +221,7 @@ interface UmbDocumentTypePickerModalData {
|
|
|
222
221
|
selection?: Array<string>;
|
|
223
222
|
}
|
|
224
223
|
interface UmbDocumentTypePickerModalResult {
|
|
225
|
-
selection: Array<string>;
|
|
224
|
+
selection: Array<string | null>;
|
|
226
225
|
}
|
|
227
226
|
declare const UMB_DOCUMENT_TYPE_PICKER_MODAL: UmbModalToken$1<UmbDocumentTypePickerModalData, UmbDocumentTypePickerModalResult>;
|
|
228
227
|
|
|
@@ -267,8 +266,8 @@ interface UmbExportDictionaryModalResult {
|
|
|
267
266
|
declare const UMB_EXPORT_DICTIONARY_MODAL: UmbModalToken$1<UmbExportDictionaryModalData, UmbExportDictionaryModalResult>;
|
|
268
267
|
|
|
269
268
|
interface UmbIconPickerModalData {
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
color: string | undefined;
|
|
270
|
+
icon: string | undefined;
|
|
272
271
|
}
|
|
273
272
|
interface UmbIconPickerModalResult {
|
|
274
273
|
color: string | undefined;
|
|
@@ -328,7 +327,7 @@ interface UmbMediaPickerModalData {
|
|
|
328
327
|
selection: Array<string>;
|
|
329
328
|
}
|
|
330
329
|
interface UmbMediaPickerModalResult {
|
|
331
|
-
selection: Array<string>;
|
|
330
|
+
selection: Array<string | null>;
|
|
332
331
|
}
|
|
333
332
|
declare const UMB_MEDIA_PICKER_MODAL: UmbModalToken$1<UmbMediaPickerModalData, UmbMediaPickerModalResult>;
|
|
334
333
|
|
|
@@ -375,16 +374,20 @@ declare const UMB_TEMPLATE_MODAL: UmbModalToken$1<UmbTemplateModalData, UmbTempl
|
|
|
375
374
|
|
|
376
375
|
interface UmbTemplatePickerModalData {
|
|
377
376
|
multiple: boolean;
|
|
378
|
-
selection: string
|
|
377
|
+
selection: Array<string | null>;
|
|
379
378
|
}
|
|
380
379
|
interface UmbTemplatePickerModalResult {
|
|
381
|
-
selection: string
|
|
380
|
+
selection: Array<string | null>;
|
|
382
381
|
}
|
|
383
382
|
declare const UMB_TEMPLATE_PICKER_MODAL: UmbModalToken$1<UmbTemplatePickerModalData, UmbTemplatePickerModalResult>;
|
|
384
383
|
|
|
385
|
-
declare const UMB_USER_GROUP_PICKER_MODAL: UmbModalToken$1<UmbPickerModalData$1<
|
|
384
|
+
declare const UMB_USER_GROUP_PICKER_MODAL: UmbModalToken$1<UmbPickerModalData$1<any>, unknown>;
|
|
386
385
|
|
|
387
|
-
|
|
386
|
+
type UmbUserPickerModalData = UmbPickerModalData$1<UserResponseModel>;
|
|
387
|
+
interface UmbUserPickerModalResult {
|
|
388
|
+
selection: Array<string>;
|
|
389
|
+
}
|
|
390
|
+
declare const UMB_USER_PICKER_MODAL: UmbModalToken$1<UmbUserPickerModalData, UmbUserPickerModalResult>;
|
|
388
391
|
|
|
389
392
|
interface UmbFolderModalData {
|
|
390
393
|
repositoryAlias: string;
|
|
@@ -396,21 +399,21 @@ interface UmbFolderModalResult {
|
|
|
396
399
|
declare const UMB_FOLDER_MODAL: UmbModalToken$1<UmbFolderModalData, UmbFolderModalResult>;
|
|
397
400
|
|
|
398
401
|
interface UmbDataTypePickerModalData {
|
|
399
|
-
selection?: Array<string>;
|
|
402
|
+
selection?: Array<string | null>;
|
|
400
403
|
multiple?: boolean;
|
|
401
404
|
}
|
|
402
405
|
interface UmbDataTypePickerModalResult {
|
|
403
|
-
selection: Array<string>;
|
|
406
|
+
selection: Array<string | null>;
|
|
404
407
|
}
|
|
405
408
|
declare const UMB_DATA_TYPE_PICKER_MODAL: UmbModalToken$1<UmbDataTypePickerModalData, UmbDataTypePickerModalResult>;
|
|
406
409
|
|
|
407
410
|
interface UmbPickerModalData<T> {
|
|
408
411
|
multiple: boolean;
|
|
409
|
-
selection: Array<string>;
|
|
410
|
-
filter?: (
|
|
412
|
+
selection: Array<string | null>;
|
|
413
|
+
filter?: (item: T) => boolean;
|
|
411
414
|
}
|
|
412
|
-
interface UmbPickerModalResult
|
|
413
|
-
selection: Array<string>;
|
|
415
|
+
interface UmbPickerModalResult {
|
|
416
|
+
selection: Array<string | null>;
|
|
414
417
|
}
|
|
415
418
|
|
|
416
|
-
export { OEmbedResult, OEmbedStatus, UMB_ALLOWED_DOCUMENT_TYPES_MODAL, UMB_CHANGE_PASSWORD_MODAL, UMB_CONFIRM_MODAL, UMB_CONTEXT_DEBUGGER_MODAL, UMB_CREATE_DICTIONARY_MODAL, UMB_CREATE_USER_MODAL, UMB_CURRENT_USER_MODAL, UMB_DATA_TYPE_PICKER_MODAL, UMB_DOCUMENT_PICKER_MODAL, UMB_DOCUMENT_TYPE_PICKER_MODAL, UMB_EMBEDDED_MEDIA_MODAL, UMB_EXAMINE_FIELDS_SETTINGS_MODAL, UMB_EXPORT_DICTIONARY_MODAL, UMB_FOLDER_MODAL, UMB_ICON_PICKER_MODAL, UMB_IMPORT_DICTIONARY_MODAL, UMB_INVITE_USER_MODAL, UMB_LANGUAGE_PICKER_MODAL, UMB_LINK_PICKER_MODAL, UMB_MEDIA_PICKER_MODAL, UMB_MODAL_CONTEXT_TOKEN, UMB_PROPERTY_EDITOR_UI_PICKER_MODAL, UMB_PROPERTY_SETTINGS_MODAL, UMB_SEARCH_MODAL, UMB_SECTION_PICKER_MODAL, UMB_TEMPLATE_MODAL, UMB_TEMPLATE_PICKER_MODAL, UMB_USER_GROUP_PICKER_MODAL, UMB_USER_PICKER_MODAL, UmbAllowedDocumentTypesModalData, UmbAllowedDocumentTypesModalResult, UmbChangePasswordModalData, UmbConfirmModalData, UmbConfirmModalResult, UmbContextDebuggerModalData, UmbCreateDictionaryModalData, UmbCreateDictionaryModalResult, UmbCreateDocumentModalResultData, UmbDataTypePickerModalData, UmbDataTypePickerModalResult, UmbDocumentPickerModalData, UmbDocumentPickerModalResult, UmbDocumentTypePickerModalData, UmbDocumentTypePickerModalResult, UmbEmbeddedMediaModalData, UmbEmbeddedMediaModalResult, UmbExamineFieldsSettingsModalData, UmbExportDictionaryModalData, UmbExportDictionaryModalResult, UmbFolderModalData, UmbFolderModalResult, UmbIconPickerModalData, UmbIconPickerModalResult, UmbImportDictionaryModalData, UmbImportDictionaryModalResult, UmbLanguagePickerModalData, UmbLanguagePickerModalResult, UmbLinkPickerConfig, UmbLinkPickerLink, UmbLinkPickerModalData, UmbLinkPickerModalResult, UmbMediaPickerModalData, UmbMediaPickerModalResult, UmbModalConfig, UmbModalContext, UmbModalHandler, UmbModalHandlerClass, UmbModalRouteBuilder, UmbModalRouteRegistration, UmbModalRouteRegistrationController, UmbModalToken, UmbModalType, UmbPickerModalData, UmbPickerModalResult, UmbPropertyEditorUIPickerModalData, UmbPropertyEditorUIPickerModalResult, UmbPropertySettingsModalResult, UmbSectionPickerModalData, UmbTemplateModalData, UmbTemplateModalResult, UmbTemplatePickerModalData, UmbTemplatePickerModalResult };
|
|
419
|
+
export { OEmbedResult, OEmbedStatus, UMB_ALLOWED_DOCUMENT_TYPES_MODAL, UMB_CHANGE_PASSWORD_MODAL, UMB_CONFIRM_MODAL, UMB_CONTEXT_DEBUGGER_MODAL, UMB_CREATE_DICTIONARY_MODAL, UMB_CREATE_USER_MODAL, UMB_CURRENT_USER_MODAL, UMB_DATA_TYPE_PICKER_MODAL, UMB_DOCUMENT_PICKER_MODAL, UMB_DOCUMENT_TYPE_PICKER_MODAL, UMB_EMBEDDED_MEDIA_MODAL, UMB_EXAMINE_FIELDS_SETTINGS_MODAL, UMB_EXPORT_DICTIONARY_MODAL, UMB_FOLDER_MODAL, UMB_ICON_PICKER_MODAL, UMB_IMPORT_DICTIONARY_MODAL, UMB_INVITE_USER_MODAL, UMB_LANGUAGE_PICKER_MODAL, UMB_LINK_PICKER_MODAL, UMB_MEDIA_PICKER_MODAL, UMB_MODAL_CONTEXT_TOKEN, UMB_PROPERTY_EDITOR_UI_PICKER_MODAL, UMB_PROPERTY_SETTINGS_MODAL, UMB_SEARCH_MODAL, UMB_SECTION_PICKER_MODAL, UMB_TEMPLATE_MODAL, UMB_TEMPLATE_PICKER_MODAL, UMB_USER_GROUP_PICKER_MODAL, UMB_USER_PICKER_MODAL, UmbAllowedDocumentTypesModalData, UmbAllowedDocumentTypesModalResult, UmbChangePasswordModalData, UmbConfirmModalData, UmbConfirmModalResult, UmbContextDebuggerModalData, UmbCreateDictionaryModalData, UmbCreateDictionaryModalResult, UmbCreateDocumentModalResultData, UmbDataTypePickerModalData, UmbDataTypePickerModalResult, UmbDocumentPickerModalData, UmbDocumentPickerModalResult, UmbDocumentTypePickerModalData, UmbDocumentTypePickerModalResult, UmbEmbeddedMediaModalData, UmbEmbeddedMediaModalResult, UmbExamineFieldsSettingsModalData, UmbExportDictionaryModalData, UmbExportDictionaryModalResult, UmbFolderModalData, UmbFolderModalResult, UmbIconPickerModalData, UmbIconPickerModalResult, UmbImportDictionaryModalData, UmbImportDictionaryModalResult, UmbLanguagePickerModalData, UmbLanguagePickerModalResult, UmbLinkPickerConfig, UmbLinkPickerLink, UmbLinkPickerModalData, UmbLinkPickerModalResult, UmbMediaPickerModalData, UmbMediaPickerModalResult, UmbModalConfig, UmbModalContext, UmbModalHandler, UmbModalHandlerClass, UmbModalRouteBuilder, UmbModalRouteRegistration, UmbModalRouteRegistrationController, UmbModalToken, UmbModalType, UmbPickerModalData, UmbPickerModalResult, UmbPropertyEditorUIPickerModalData, UmbPropertyEditorUIPickerModalResult, UmbPropertySettingsModalResult, UmbSectionPickerModalData, UmbTemplateModalData, UmbTemplateModalResult, UmbTemplatePickerModalData, UmbTemplatePickerModalResult, UmbUserPickerModalData, UmbUserPickerModalResult };
|
package/models.d.ts
CHANGED
|
@@ -1,80 +1,13 @@
|
|
|
1
|
-
import { EntityTreeItemResponseModel, FolderTreeItemResponseModel, PackageManifestResponseModel } from './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/notification.d.ts
CHANGED
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 '
|
|
3
|
+
import { UmbControllerInterface, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
4
4
|
|
|
5
5
|
declare class UmbObserver<T> {
|
|
6
6
|
#private;
|
|
@@ -261,6 +261,18 @@ declare function createObservablePart<R, T>(source$: Observable<T>, mappingFunct
|
|
|
261
261
|
*/
|
|
262
262
|
declare function appendToFrozenArray<T>(data: T[], entry: T, getUniqueMethod?: (entry: T) => unknown): T[];
|
|
263
263
|
|
|
264
|
+
/**
|
|
265
|
+
* @export
|
|
266
|
+
* @method filterFrozenArray
|
|
267
|
+
* @param {Array<T>} data - RxJS Subject to use for this Observable.
|
|
268
|
+
* @param {(entry: T) => boolean} filterMethod - Method to filter the array.
|
|
269
|
+
* @description - Creates a RxJS Observable from RxJS Subject.
|
|
270
|
+
* @example <caption>Example remove an entry of a ArrayState or a part of DeepState/ObjectState it which is an array. Where the key is unique and the item will be updated if matched with existing.</caption>
|
|
271
|
+
* const newDataSet = filterFrozenArray(mySubject.getValue(), x => x.id !== "myKey");
|
|
272
|
+
* mySubject.next(newDataSet);
|
|
273
|
+
*/
|
|
274
|
+
declare function filterFrozenArray<T>(data: T[], filterMethod: (entry: T) => boolean): T[];
|
|
275
|
+
|
|
264
276
|
/**
|
|
265
277
|
* @export
|
|
266
278
|
* @method partialUpdateFrozenArray
|
|
@@ -275,4 +287,4 @@ declare function appendToFrozenArray<T>(data: T[], entry: T, getUniqueMethod?: (
|
|
|
275
287
|
*/
|
|
276
288
|
declare function partialUpdateFrozenArray<T>(data: T[], partialEntry: Partial<T>, findMethod: (entry: T) => boolean): T[];
|
|
277
289
|
|
|
278
|
-
export { MappingFunction, UmbArrayState, UmbBasicState, UmbBooleanState, UmbClassState, UmbDeepState, UmbNumberState, UmbObjectState, UmbObserver, UmbObserverController, UmbStringState, appendToFrozenArray, createObservablePart, partialUpdateFrozenArray };
|
|
290
|
+
export { MappingFunction, UmbArrayState, UmbBasicState, UmbBooleanState, UmbClassState, UmbDeepState, UmbNumberState, UmbObjectState, UmbObserver, UmbObserverController, UmbStringState, appendToFrozenArray, createObservablePart, filterFrozenArray, partialUpdateFrozenArray };
|
package/package.json
CHANGED
package/picker-input.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
|
-
import { UmbItemRepository } from '
|
|
3
|
-
import { UmbControllerHostElement } from '
|
|
4
|
-
import { UmbModalToken, UmbModalContext } from '
|
|
5
|
-
import { ItemResponseModelBaseModel } from '
|
|
2
|
+
import { UmbItemRepository } from '@umbraco-cms/backoffice/repository';
|
|
3
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
4
|
+
import { UmbModalToken, UmbModalContext } from '@umbraco-cms/backoffice/modal';
|
|
5
|
+
import { ItemResponseModelBaseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
6
6
|
|
|
7
7
|
declare class UmbPickerInputContext<ItemType extends ItemResponseModelBaseModel> {
|
|
8
8
|
#private;
|
package/repository.d.ts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DataSourceResponse as DataSourceResponse$1 } from '
|
|
1
|
+
import { ApiError, CancelError, FolderReponseModel, CreateFolderRequestModel, UpdateFolderReponseModel, TreeItemPresentationModel, ProblemDetailsModel, FolderModelBaseModel, ItemResponseModelBaseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
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
|
-
interface DataSourceResponse<T = undefined> {
|
|
6
|
+
interface DataSourceResponse<T = undefined> extends UmbDataSourceErrorResponse {
|
|
6
7
|
data?: T;
|
|
7
|
-
|
|
8
|
+
}
|
|
9
|
+
interface UmbDataSourceErrorResponse {
|
|
10
|
+
error?: ApiError | CancelError;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
|
-
interface UmbDataSource<CreateRequestType, UpdateRequestType, ResponseType> {
|
|
13
|
+
interface UmbDataSource<CreateRequestType, CreateResponseType, UpdateRequestType, ResponseType> {
|
|
11
14
|
createScaffold(parentId: string | null): Promise<DataSourceResponse$1<CreateRequestType>>;
|
|
12
15
|
get(unique: string): Promise<DataSourceResponse$1<ResponseType>>;
|
|
13
|
-
insert(data: CreateRequestType): Promise<
|
|
16
|
+
insert(data: CreateRequestType): Promise<DataSourceResponse$1<CreateResponseType>>;
|
|
14
17
|
update(unique: string, data: UpdateRequestType): Promise<DataSourceResponse$1<ResponseType>>;
|
|
15
18
|
delete(unique: string): Promise<DataSourceResponse$1>;
|
|
16
19
|
}
|
|
@@ -23,55 +26,73 @@ interface UmbFolderDataSource {
|
|
|
23
26
|
delete(unique: string): Promise<DataSourceResponse>;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
interface
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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>>>;
|
|
30
62
|
}
|
|
31
63
|
|
|
32
64
|
interface UmbItemDataSource<ItemType> {
|
|
33
65
|
getItems(unique: Array<string>): Promise<DataSourceResponse$1<Array<ItemType>>>;
|
|
34
66
|
}
|
|
35
67
|
|
|
68
|
+
interface UmbMoveDataSource {
|
|
69
|
+
move(unique: string, targetUnique: string | null): Promise<UmbDataSourceErrorResponse$1>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface UmbCopyDataSource {
|
|
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>>;
|
|
79
|
+
}
|
|
80
|
+
|
|
36
81
|
interface UmbRepositoryErrorResponse {
|
|
37
82
|
error?: ProblemDetailsModel;
|
|
38
83
|
}
|
|
39
84
|
interface UmbRepositoryResponse<T> extends UmbRepositoryErrorResponse {
|
|
40
85
|
data?: T;
|
|
41
86
|
}
|
|
42
|
-
interface UmbDetailRepository<CreateRequestType = any, UpdateRequestType = any, ResponseType = any> {
|
|
87
|
+
interface UmbDetailRepository<CreateRequestType = any, CreateResponseType = any, UpdateRequestType = any, ResponseType = any> {
|
|
43
88
|
createScaffold(parentId: string | null): Promise<UmbRepositoryResponse<CreateRequestType>>;
|
|
44
89
|
requestById(id: string): Promise<UmbRepositoryResponse<ResponseType>>;
|
|
45
|
-
|
|
90
|
+
byId(id: string): Promise<Observable<ResponseType>>;
|
|
91
|
+
create(data: CreateRequestType): Promise<UmbRepositoryResponse<CreateResponseType>>;
|
|
46
92
|
save(id: string, data: UpdateRequestType): Promise<UmbRepositoryErrorResponse>;
|
|
47
93
|
delete(id: string): Promise<UmbRepositoryErrorResponse>;
|
|
48
94
|
}
|
|
49
95
|
|
|
50
|
-
interface UmbPagedData<T> {
|
|
51
|
-
total: number;
|
|
52
|
-
items: Array<T>;
|
|
53
|
-
}
|
|
54
|
-
interface UmbTreeRepository<ItemType = any, PagedItemType = UmbPagedData<ItemType>> {
|
|
55
|
-
requestRootTreeItems: () => Promise<{
|
|
56
|
-
data: PagedItemType | undefined;
|
|
57
|
-
error: ProblemDetailsModel | undefined;
|
|
58
|
-
asObservable?: () => Observable<ItemType[]>;
|
|
59
|
-
}>;
|
|
60
|
-
requestTreeItemsOf: (parentUnique: string | null) => Promise<{
|
|
61
|
-
data: PagedItemType | undefined;
|
|
62
|
-
error: ProblemDetailsModel | undefined;
|
|
63
|
-
asObservable?: () => Observable<ItemType[]>;
|
|
64
|
-
}>;
|
|
65
|
-
requestItemsLegacy?: (uniques: string[]) => Promise<{
|
|
66
|
-
data: Array<ItemType> | undefined;
|
|
67
|
-
error: ProblemDetailsModel | undefined;
|
|
68
|
-
asObservable?: () => Observable<ItemType[]>;
|
|
69
|
-
}>;
|
|
70
|
-
rootTreeItems: () => Promise<Observable<ItemType[]>>;
|
|
71
|
-
treeItemsOf: (parentUnique: string | null) => Promise<Observable<ItemType[]>>;
|
|
72
|
-
itemsLegacy?: (uniques: string[]) => Promise<Observable<ItemType[]>>;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
96
|
interface UmbFolderRepository {
|
|
76
97
|
createFolderScaffold(parentId: string | null): Promise<{
|
|
77
98
|
data?: FolderReponseModel;
|
|
@@ -94,6 +115,10 @@ interface UmbFolderRepository {
|
|
|
94
115
|
}>;
|
|
95
116
|
}
|
|
96
117
|
|
|
118
|
+
interface UmbCollectionRepository {
|
|
119
|
+
requestCollection(filter?: any): Promise<any>;
|
|
120
|
+
}
|
|
121
|
+
|
|
97
122
|
interface UmbItemRepository<ItemType extends ItemResponseModelBaseModel> {
|
|
98
123
|
requestItems: (uniques: string[]) => Promise<{
|
|
99
124
|
data?: Array<ItemType> | undefined;
|
|
@@ -103,4 +128,12 @@ interface UmbItemRepository<ItemType extends ItemResponseModelBaseModel> {
|
|
|
103
128
|
items: (uniques: string[]) => Promise<Observable<Array<ItemType>>>;
|
|
104
129
|
}
|
|
105
130
|
|
|
106
|
-
|
|
131
|
+
interface UmbMoveRepository {
|
|
132
|
+
move(unique: string, targetUnique: string): Promise<UmbRepositoryErrorResponse>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
interface UmbCopyRepository {
|
|
136
|
+
copy(unique: string, targetUnique: string): Promise<UmbRepositoryResponse<string>>;
|
|
137
|
+
}
|
|
138
|
+
|
|
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,20 @@
|
|
|
1
|
-
import { UmbNotificationOptions } from '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { UmbNotificationOptions } from '@umbraco-cms/backoffice/notification';
|
|
2
|
+
import { UmbController, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
3
|
+
import { DataSourceResponse as DataSourceResponse$1 } from '@umbraco-cms/backoffice/repository';
|
|
4
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
5
|
+
import { ApiError, CancelError } from '@umbraco-cms/backoffice/backend-api';
|
|
5
6
|
|
|
6
7
|
declare class UmbResourceController extends UmbController {
|
|
7
8
|
#private;
|
|
8
9
|
constructor(host: UmbControllerHostElement, promise: Promise<any>, alias?: string);
|
|
9
10
|
hostConnected(): void;
|
|
10
11
|
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
12
|
/**
|
|
18
13
|
* Base execute function with a try/catch block and return a tuple with the result and the error.
|
|
19
14
|
*/
|
|
20
15
|
static tryExecute<T>(promise: Promise<T>): Promise<DataSourceResponse$1<T>>;
|
|
21
16
|
/**
|
|
22
|
-
* Wrap the {
|
|
17
|
+
* Wrap the {tryExecute} function in a try/catch block and return the result.
|
|
23
18
|
* If the executor function throws an error, then show the details in a notification.
|
|
24
19
|
*/
|
|
25
20
|
tryExecuteAndNotify<T>(options?: UmbNotificationOptions): Promise<DataSourceResponse$1<T>>;
|
|
@@ -38,13 +33,27 @@ declare class UmbResourceController extends UmbController {
|
|
|
38
33
|
destroy(): void;
|
|
39
34
|
}
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
/**
|
|
37
|
+
* The base URL of the configured Umbraco server.
|
|
38
|
+
* If the server is local, this will be an empty string.
|
|
39
|
+
*
|
|
40
|
+
* @remarks This is the base URL of the Umbraco server, not the base URL of the backoffice.
|
|
41
|
+
*
|
|
42
|
+
* @example https://localhost:44300
|
|
43
|
+
* @example https://my-umbraco-site.com
|
|
44
|
+
* @example ''
|
|
45
|
+
*/
|
|
46
|
+
declare const UMB_SERVER_URL: UmbContextToken<string>;
|
|
47
|
+
|
|
48
|
+
interface DataSourceResponse<T = undefined> extends UmbDataSourceErrorResponse {
|
|
42
49
|
data?: T;
|
|
43
|
-
|
|
50
|
+
}
|
|
51
|
+
interface UmbDataSourceErrorResponse {
|
|
52
|
+
error?: ApiError | CancelError;
|
|
44
53
|
}
|
|
45
54
|
|
|
46
55
|
declare function tryExecute<T>(promise: Promise<T>): Promise<DataSourceResponse<T>>;
|
|
47
56
|
|
|
48
|
-
declare function tryExecuteAndNotify<T>(host: UmbControllerHostElement, resource: Promise<T>, options?: UmbNotificationOptions
|
|
57
|
+
declare function tryExecuteAndNotify<T>(host: UmbControllerHostElement, resource: Promise<T>, options?: UmbNotificationOptions): Promise<DataSourceResponse<T>>;
|
|
49
58
|
|
|
50
|
-
export { UmbResourceController, tryExecute, tryExecuteAndNotify };
|
|
59
|
+
export { UMB_SERVER_URL, UmbResourceController, tryExecute, tryExecuteAndNotify };
|
package/router.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UmbContextToken } from '
|
|
2
|
-
import { UmbControllerHostElement } from '
|
|
3
|
-
import { UmbModalRouteRegistration } from '
|
|
1
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
2
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
3
|
+
import { UmbModalRouteRegistration } from '@umbraco-cms/backoffice/modal';
|
|
4
4
|
|
|
5
5
|
interface IRouterSlot<D = any, P = any> extends HTMLElement {
|
|
6
6
|
readonly route: IRoute<D> | null;
|
|
@@ -22,7 +22,6 @@ type IRoutingInfo<D = any, P = any> = {
|
|
|
22
22
|
};
|
|
23
23
|
type CustomResolver<D = any, P = any> = ((info: IRoutingInfo<D>) => boolean | void | Promise<boolean> | Promise<void>);
|
|
24
24
|
type Guard<D = any, P = any> = ((info: IRoutingInfo<D, P>) => boolean | Promise<boolean>);
|
|
25
|
-
type Cancel = (() => boolean);
|
|
26
25
|
type PageComponent = HTMLElement | undefined;
|
|
27
26
|
type ModuleResolver = Promise<{
|
|
28
27
|
default: any;
|
|
@@ -99,10 +98,6 @@ type Query = {
|
|
|
99
98
|
[key: string]: string;
|
|
100
99
|
};
|
|
101
100
|
type EventListenerSubscription = (() => void);
|
|
102
|
-
/**
|
|
103
|
-
* RouterSlot related events.
|
|
104
|
-
*/
|
|
105
|
-
type RouterSlotEvent = "changestate";
|
|
106
101
|
/**
|
|
107
102
|
* History related events.
|
|
108
103
|
*/
|
|
@@ -355,13 +350,6 @@ declare function toQueryString(query: Query): string;
|
|
|
355
350
|
*/
|
|
356
351
|
declare function ensureAnchorHistory(): void;
|
|
357
352
|
|
|
358
|
-
interface UmbRouteLocation {
|
|
359
|
-
name?: string;
|
|
360
|
-
params: {
|
|
361
|
-
[key: string]: string;
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
|
|
365
353
|
declare class UmbRouteContext {
|
|
366
354
|
#private;
|
|
367
355
|
private _onGotModals;
|
|
@@ -377,4 +365,4 @@ declare function generateRoutePathBuilder(path: string): (params: {
|
|
|
377
365
|
[key: string]: string | number;
|
|
378
366
|
}) => string;
|
|
379
367
|
|
|
380
|
-
export {
|
|
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 };
|