@umbraco-cms/backoffice 1.0.0-next.ac4a890a → 1.0.0-next.ad335e6f
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 +198 -72
- package/context-api.d.ts +3 -3
- package/controller.d.ts +1 -1
- package/custom-elements.json +1273 -1221
- package/element.d.ts +4 -4
- package/entity-action.d.ts +4 -4
- package/extensions-api.d.ts +13 -13
- package/extensions-registry.d.ts +288 -89
- package/modal.d.ts +18 -14
- package/models.d.ts +7 -2
- 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 +35 -18
- package/resources.d.ts +21 -14
- package/router.d.ts +4 -16
- package/sorter.d.ts +103 -0
- package/store.d.ts +4 -4
- package/umbraco-package-schema.json +37749 -0
- package/utils.d.ts +1 -9
- package/vscode-html-custom-data.json +382 -399
- package/workspace.d.ts +19 -18
- package/property-editor.d.ts +0 -8
package/modal.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
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 '
|
|
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';
|
|
12
|
+
import { UserDetails } from '@umbraco-cms/backoffice/models';
|
|
13
13
|
|
|
14
14
|
declare class UmbSearchModalElement extends LitElement {
|
|
15
15
|
#private;
|
|
16
|
-
static styles: lit.CSSResult[];
|
|
17
16
|
private _input;
|
|
18
17
|
private _search;
|
|
19
18
|
private _groups;
|
|
20
19
|
connectedCallback(): void;
|
|
21
20
|
render(): lit_html.TemplateResult<1>;
|
|
21
|
+
static styles: lit.CSSResult[];
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
declare global {
|
|
@@ -267,8 +267,8 @@ interface UmbExportDictionaryModalResult {
|
|
|
267
267
|
declare const UMB_EXPORT_DICTIONARY_MODAL: UmbModalToken$1<UmbExportDictionaryModalData, UmbExportDictionaryModalResult>;
|
|
268
268
|
|
|
269
269
|
interface UmbIconPickerModalData {
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
color: string | undefined;
|
|
271
|
+
icon: string | undefined;
|
|
272
272
|
}
|
|
273
273
|
interface UmbIconPickerModalResult {
|
|
274
274
|
color: string | undefined;
|
|
@@ -384,7 +384,11 @@ declare const UMB_TEMPLATE_PICKER_MODAL: UmbModalToken$1<UmbTemplatePickerModalD
|
|
|
384
384
|
|
|
385
385
|
declare const UMB_USER_GROUP_PICKER_MODAL: UmbModalToken$1<UmbPickerModalData$1<UserDetails>, unknown>;
|
|
386
386
|
|
|
387
|
-
|
|
387
|
+
type UmbUserPickerModalData = UmbPickerModalData$1<UserResponseModel>;
|
|
388
|
+
interface UmbUserPickerModalResult {
|
|
389
|
+
selection: Array<string>;
|
|
390
|
+
}
|
|
391
|
+
declare const UMB_USER_PICKER_MODAL: UmbModalToken$1<UmbUserPickerModalData, UmbUserPickerModalResult>;
|
|
388
392
|
|
|
389
393
|
interface UmbFolderModalData {
|
|
390
394
|
repositoryAlias: string;
|
|
@@ -407,10 +411,10 @@ declare const UMB_DATA_TYPE_PICKER_MODAL: UmbModalToken$1<UmbDataTypePickerModal
|
|
|
407
411
|
interface UmbPickerModalData<T> {
|
|
408
412
|
multiple: boolean;
|
|
409
413
|
selection: Array<string>;
|
|
410
|
-
filter?: (
|
|
414
|
+
filter?: (item: T) => boolean;
|
|
411
415
|
}
|
|
412
|
-
interface UmbPickerModalResult
|
|
416
|
+
interface UmbPickerModalResult {
|
|
413
417
|
selection: Array<string>;
|
|
414
418
|
}
|
|
415
419
|
|
|
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 };
|
|
420
|
+
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,4 +1,4 @@
|
|
|
1
|
-
import { EntityTreeItemResponseModel, FolderTreeItemResponseModel, PackageManifestResponseModel } from '
|
|
1
|
+
import { EntityTreeItemResponseModel, FolderTreeItemResponseModel, PackageManifestResponseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
2
2
|
|
|
3
3
|
type HTMLElementConstructor<T = HTMLElement> = new (...args: any[]) => T;
|
|
4
4
|
type ClassConstructor<T> = new (...args: any[]) => T;
|
|
@@ -76,5 +76,10 @@ type PackageManifestResponse = UmbPackage[];
|
|
|
76
76
|
type UmbPackageWithMigrationStatus = UmbPackage & {
|
|
77
77
|
hasPendingMigrations: boolean;
|
|
78
78
|
};
|
|
79
|
+
interface UmbFilterModel {
|
|
80
|
+
skip?: number;
|
|
81
|
+
take?: number;
|
|
82
|
+
filter?: string;
|
|
83
|
+
}
|
|
79
84
|
|
|
80
|
-
export { BaseEntity, ClassConstructor, DocumentBlueprintDetails, Entity, HTMLElementConstructor, MediaTypeDetails, MemberDetails, MemberGroupDetails, MemberTypeDetails, PackageManifestResponse, SwatchDetails, UmbPackage, UmbPackageWithMigrationStatus, UserDetails, UserEntity, UserGroupDetails, UserGroupEntity, UserStatus };
|
|
85
|
+
export { BaseEntity, ClassConstructor, DocumentBlueprintDetails, Entity, HTMLElementConstructor, MediaTypeDetails, MemberDetails, MemberGroupDetails, MemberTypeDetails, PackageManifestResponse, SwatchDetails, UmbFilterModel, UmbPackage, UmbPackageWithMigrationStatus, UserDetails, UserEntity, UserGroupDetails, UserGroupEntity, UserStatus };
|
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,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DataSourceResponse as DataSourceResponse$1, UmbDataSourceErrorResponse as UmbDataSourceErrorResponse$1 } from '
|
|
1
|
+
import { ApiError, CancelError, FolderReponseModel, CreateFolderRequestModel, UpdateFolderReponseModel, 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
4
|
|
|
5
5
|
interface DataSourceResponse<T = undefined> extends UmbDataSourceErrorResponse {
|
|
6
6
|
data?: T;
|
|
7
7
|
}
|
|
8
8
|
interface UmbDataSourceErrorResponse {
|
|
9
|
-
error?:
|
|
9
|
+
error?: ApiError | CancelError;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
interface UmbDataSource<CreateRequestType, UpdateRequestType, ResponseType> {
|
|
12
|
+
interface UmbDataSource<CreateRequestType, CreateResponseType, UpdateRequestType, ResponseType> {
|
|
13
13
|
createScaffold(parentId: string | null): Promise<DataSourceResponse$1<CreateRequestType>>;
|
|
14
14
|
get(unique: string): Promise<DataSourceResponse$1<ResponseType>>;
|
|
15
|
-
insert(data: CreateRequestType): Promise<
|
|
15
|
+
insert(data: CreateRequestType): Promise<DataSourceResponse$1<CreateResponseType>>;
|
|
16
16
|
update(unique: string, data: UpdateRequestType): Promise<DataSourceResponse$1<ResponseType>>;
|
|
17
17
|
delete(unique: string): Promise<DataSourceResponse$1>;
|
|
18
18
|
}
|
|
@@ -39,18 +39,8 @@ interface UmbMoveDataSource {
|
|
|
39
39
|
move(unique: string, targetUnique: string): Promise<UmbDataSourceErrorResponse$1>;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
interface
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
interface UmbRepositoryResponse<T> extends UmbRepositoryErrorResponse {
|
|
46
|
-
data?: T;
|
|
47
|
-
}
|
|
48
|
-
interface UmbDetailRepository<CreateRequestType = any, UpdateRequestType = any, ResponseType = any> {
|
|
49
|
-
createScaffold(parentId: string | null): Promise<UmbRepositoryResponse<CreateRequestType>>;
|
|
50
|
-
requestById(id: string): Promise<UmbRepositoryResponse<ResponseType>>;
|
|
51
|
-
create(data: CreateRequestType): Promise<UmbRepositoryErrorResponse>;
|
|
52
|
-
save(id: string, data: UpdateRequestType): Promise<UmbRepositoryErrorResponse>;
|
|
53
|
-
delete(id: string): Promise<UmbRepositoryErrorResponse>;
|
|
42
|
+
interface UmbCopyDataSource {
|
|
43
|
+
copy(unique: string, targetUnique: string): Promise<DataSourceResponse$1<string>>;
|
|
54
44
|
}
|
|
55
45
|
|
|
56
46
|
interface UmbPagedData<T> {
|
|
@@ -78,6 +68,25 @@ interface UmbTreeRepository<ItemType = any, PagedItemType = UmbPagedData<ItemTyp
|
|
|
78
68
|
itemsLegacy?: (uniques: string[]) => Promise<Observable<ItemType[]>>;
|
|
79
69
|
}
|
|
80
70
|
|
|
71
|
+
interface UmbCollectionDataSource<ItemType = any, PagedItemType = UmbPagedData<ItemType>> {
|
|
72
|
+
getCollection(): Promise<DataSourceResponse<PagedItemType>>;
|
|
73
|
+
filterCollection(filter: any): Promise<DataSourceResponse<PagedItemType>>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface UmbRepositoryErrorResponse {
|
|
77
|
+
error?: ProblemDetailsModel;
|
|
78
|
+
}
|
|
79
|
+
interface UmbRepositoryResponse<T> extends UmbRepositoryErrorResponse {
|
|
80
|
+
data?: T;
|
|
81
|
+
}
|
|
82
|
+
interface UmbDetailRepository<CreateRequestType = any, CreateResponseType = any, UpdateRequestType = any, ResponseType = any> {
|
|
83
|
+
createScaffold(parentId: string | null): Promise<UmbRepositoryResponse<CreateRequestType>>;
|
|
84
|
+
requestById(id: string): Promise<UmbRepositoryResponse<ResponseType>>;
|
|
85
|
+
create(data: CreateRequestType): Promise<UmbRepositoryResponse<CreateResponseType>>;
|
|
86
|
+
save(id: string, data: UpdateRequestType): Promise<UmbRepositoryErrorResponse>;
|
|
87
|
+
delete(id: string): Promise<UmbRepositoryErrorResponse>;
|
|
88
|
+
}
|
|
89
|
+
|
|
81
90
|
interface UmbFolderRepository {
|
|
82
91
|
createFolderScaffold(parentId: string | null): Promise<{
|
|
83
92
|
data?: FolderReponseModel;
|
|
@@ -100,6 +109,10 @@ interface UmbFolderRepository {
|
|
|
100
109
|
}>;
|
|
101
110
|
}
|
|
102
111
|
|
|
112
|
+
interface UmbCollectionRepository {
|
|
113
|
+
requestCollection(filter?: any): Promise<any>;
|
|
114
|
+
}
|
|
115
|
+
|
|
103
116
|
interface UmbItemRepository<ItemType extends ItemResponseModelBaseModel> {
|
|
104
117
|
requestItems: (uniques: string[]) => Promise<{
|
|
105
118
|
data?: Array<ItemType> | undefined;
|
|
@@ -113,4 +126,8 @@ interface UmbMoveRepository {
|
|
|
113
126
|
move(unique: string, targetUnique: string): Promise<UmbRepositoryErrorResponse>;
|
|
114
127
|
}
|
|
115
128
|
|
|
116
|
-
|
|
129
|
+
interface UmbCopyRepository {
|
|
130
|
+
copy(unique: string, targetUnique: string): Promise<UmbRepositoryResponse<string>>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
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,15 +33,27 @@ declare class UmbResourceController extends UmbController {
|
|
|
38
33
|
destroy(): void;
|
|
39
34
|
}
|
|
40
35
|
|
|
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
|
+
|
|
41
48
|
interface DataSourceResponse<T = undefined> extends UmbDataSourceErrorResponse {
|
|
42
49
|
data?: T;
|
|
43
50
|
}
|
|
44
51
|
interface UmbDataSourceErrorResponse {
|
|
45
|
-
error?:
|
|
52
|
+
error?: ApiError | CancelError;
|
|
46
53
|
}
|
|
47
54
|
|
|
48
55
|
declare function tryExecute<T>(promise: Promise<T>): Promise<DataSourceResponse<T>>;
|
|
49
56
|
|
|
50
|
-
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>>;
|
|
51
58
|
|
|
52
|
-
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/sorter.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { UmbControllerInterface, UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
2
|
+
|
|
3
|
+
type INTERNAL_UmbSorterConfig<T> = {
|
|
4
|
+
compareElementToModel: (el: HTMLElement, modelEntry: T) => boolean;
|
|
5
|
+
querySelectModelToElement: (container: HTMLElement, modelEntry: T) => HTMLElement | null;
|
|
6
|
+
identifier: string;
|
|
7
|
+
itemSelector: string;
|
|
8
|
+
disabledItemSelector?: string;
|
|
9
|
+
containerSelector: string;
|
|
10
|
+
ignorerSelector: string;
|
|
11
|
+
placeholderClass: string;
|
|
12
|
+
draggableSelector?: string;
|
|
13
|
+
boundarySelector?: string;
|
|
14
|
+
dataTransferResolver?: (dataTransfer: DataTransfer | null, currentItem: T) => void;
|
|
15
|
+
onStart?: (argument: {
|
|
16
|
+
item: T;
|
|
17
|
+
element: HTMLElement;
|
|
18
|
+
}) => void;
|
|
19
|
+
onChange?: (argument: {
|
|
20
|
+
item: T;
|
|
21
|
+
element: HTMLElement;
|
|
22
|
+
}) => void;
|
|
23
|
+
onContainerChange?: (argument: {
|
|
24
|
+
item: T;
|
|
25
|
+
element: HTMLElement;
|
|
26
|
+
}) => void;
|
|
27
|
+
onEnd?: (argument: {
|
|
28
|
+
item: T;
|
|
29
|
+
element: HTMLElement;
|
|
30
|
+
}) => void;
|
|
31
|
+
onSync?: (argument: {
|
|
32
|
+
item: T;
|
|
33
|
+
fromController: UmbSorterController<T>;
|
|
34
|
+
toController: UmbSorterController<T>;
|
|
35
|
+
}) => void;
|
|
36
|
+
itemHasNestedContainersResolver?: (element: HTMLElement) => boolean;
|
|
37
|
+
onDisallowed?: () => void;
|
|
38
|
+
onAllowed?: () => void;
|
|
39
|
+
onRequestDrop?: (argument: {
|
|
40
|
+
item: T;
|
|
41
|
+
}) => boolean | void;
|
|
42
|
+
resolveVerticalDirection?: (argument: {
|
|
43
|
+
containerElement: Element;
|
|
44
|
+
containerRect: DOMRect;
|
|
45
|
+
item: T;
|
|
46
|
+
element: HTMLElement;
|
|
47
|
+
elementRect: DOMRect;
|
|
48
|
+
relatedElement: HTMLElement;
|
|
49
|
+
relatedRect: DOMRect;
|
|
50
|
+
placeholderIsInThisRow: boolean;
|
|
51
|
+
horizontalPlaceAfter: boolean;
|
|
52
|
+
}) => void;
|
|
53
|
+
performItemInsert?: (argument: {
|
|
54
|
+
item: T;
|
|
55
|
+
newIndex: number;
|
|
56
|
+
}) => Promise<boolean> | boolean;
|
|
57
|
+
performItemRemove?: (argument: {
|
|
58
|
+
item: T;
|
|
59
|
+
}) => Promise<boolean> | boolean;
|
|
60
|
+
};
|
|
61
|
+
type UmbSorterConfig<T> = Omit<INTERNAL_UmbSorterConfig<T>, 'placeholderClass' | 'ignorerSelector' | 'containerSelector'> & Partial<Pick<INTERNAL_UmbSorterConfig<T>, 'placeholderClass' | 'ignorerSelector' | 'containerSelector'>>;
|
|
62
|
+
/**
|
|
63
|
+
* @export
|
|
64
|
+
* @class UmbSorterController
|
|
65
|
+
* @implements {UmbControllerInterface}
|
|
66
|
+
* @description This controller can make user able to sort items.
|
|
67
|
+
*/
|
|
68
|
+
declare class UmbSorterController<T> implements UmbControllerInterface {
|
|
69
|
+
#private;
|
|
70
|
+
private _lastIndicationContainerVM;
|
|
71
|
+
get unique(): string;
|
|
72
|
+
constructor(host: UmbControllerHostElement, config: UmbSorterConfig<T>);
|
|
73
|
+
setModel(model: Array<T>): void;
|
|
74
|
+
hostConnected(): void;
|
|
75
|
+
private _onFirstRender;
|
|
76
|
+
hostDisconnected(): void;
|
|
77
|
+
setupItem(element: HTMLElement): void;
|
|
78
|
+
destroyItem(element: HTMLElement): void;
|
|
79
|
+
handleDragStart: (event: DragEvent) => void;
|
|
80
|
+
handleDragEnd: () => Promise<void>;
|
|
81
|
+
handleDragMove: (event: DragEvent) => void;
|
|
82
|
+
moveCurrentElement: () => void;
|
|
83
|
+
move(orderedContainerElements: Array<Element>, newElIndex: number): void;
|
|
84
|
+
/** Management methods: */
|
|
85
|
+
getItemOfElement(element: HTMLElement): T | null | undefined;
|
|
86
|
+
removeItem(item: T): Promise<boolean | T | null>;
|
|
87
|
+
hasOtherItemsThan(item: T): boolean;
|
|
88
|
+
sync(element: HTMLElement, fromVm: UmbSorterController<T>): Promise<boolean>;
|
|
89
|
+
updateAllowIndication(contextVM: UmbSorterController<T>, item: T): boolean;
|
|
90
|
+
removeAllowIndication(): void;
|
|
91
|
+
private autoScrollX;
|
|
92
|
+
private autoScrollY;
|
|
93
|
+
private handleAutoScroll;
|
|
94
|
+
private _performAutoScroll;
|
|
95
|
+
private stopAutoScroll;
|
|
96
|
+
notifySync(data: any): void;
|
|
97
|
+
notifyDisallowed(): void;
|
|
98
|
+
notifyAllowed(): void;
|
|
99
|
+
notifyRequestDrop(data: any): boolean;
|
|
100
|
+
destroy(): void;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export { UmbSorterConfig, UmbSorterController };
|
package/store.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { UmbControllerHostElement } from '
|
|
4
|
-
import { UmbArrayState } from '
|
|
5
|
-
import { EntityTreeItemResponseModel, FileSystemTreeItemPresentationModel } from '
|
|
6
|
-
import { UmbStoreBase as UmbStoreBase$1, UmbTreeStore as UmbTreeStore$1 } from '
|
|
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';
|
|
7
7
|
|
|
8
8
|
interface UmbDataStoreIdentifiers {
|
|
9
9
|
key?: string;
|