@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/collection.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
3
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
4
|
+
import { UmbObserverController } from '@umbraco-cms/backoffice/observable-api';
|
|
5
|
+
import { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
|
6
|
+
import { UmbCollectionFilterModel as UmbCollectionFilterModel$1 } from '@umbraco-cms/backoffice/collection';
|
|
7
|
+
|
|
8
|
+
declare class UmbCollectionContext<ItemType, FilterModelType extends UmbCollectionFilterModel$1> {
|
|
9
|
+
#private;
|
|
10
|
+
private _host;
|
|
11
|
+
private _entityType;
|
|
12
|
+
protected _dataObserver?: UmbObserverController<ItemType[]>;
|
|
13
|
+
readonly items: rxjs.Observable<ItemType[]>;
|
|
14
|
+
readonly total: rxjs.Observable<number>;
|
|
15
|
+
readonly selection: rxjs.Observable<string[]>;
|
|
16
|
+
readonly filter: rxjs.Observable<object | FilterModelType>;
|
|
17
|
+
repository?: UmbCollectionRepository;
|
|
18
|
+
constructor(host: UmbControllerHostElement, entityType: string | null, repositoryAlias: string);
|
|
19
|
+
isSelected(id: string): boolean;
|
|
20
|
+
setSelection(value: Array<string>): void;
|
|
21
|
+
clearSelection(): void;
|
|
22
|
+
select(id: string): void;
|
|
23
|
+
deselect(id: string): void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
getEntityType(): string | null;
|
|
26
|
+
protected _onRepositoryReady(): Promise<void>;
|
|
27
|
+
requestCollection(): Promise<void>;
|
|
28
|
+
setFilter(filter: Partial<FilterModelType>): void;
|
|
29
|
+
}
|
|
30
|
+
declare const UMB_COLLECTION_CONTEXT_TOKEN: UmbContextToken<UmbCollectionContext<any, any>>;
|
|
31
|
+
|
|
32
|
+
interface UmbCollectionFilterModel {
|
|
33
|
+
skip?: number;
|
|
34
|
+
take?: number;
|
|
35
|
+
filter?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { UMB_COLLECTION_CONTEXT_TOKEN, UmbCollectionContext, UmbCollectionFilterModel };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as rxjs from 'rxjs';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ProblemDetailsModel, DocumentTypeResponseModel, PropertyTypeContainerResponseModelBaseModel, PropertyTypeResponseModelBaseModel, DocumentTypePropertyTypeResponseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
4
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
5
|
+
import { MappingFunction } from '@umbraco-cms/backoffice/observable-api';
|
|
6
|
+
|
|
7
|
+
interface UmbRepositoryErrorResponse {
|
|
8
|
+
error?: ProblemDetailsModel;
|
|
9
|
+
}
|
|
10
|
+
interface UmbRepositoryResponse<T> extends UmbRepositoryErrorResponse {
|
|
11
|
+
data?: T;
|
|
12
|
+
}
|
|
13
|
+
interface UmbDetailRepository<CreateRequestType = any, CreateResponseType = any, UpdateRequestType = any, ResponseType = any> {
|
|
14
|
+
createScaffold(parentId: string | null): Promise<UmbRepositoryResponse<CreateRequestType>>;
|
|
15
|
+
requestById(id: string): Promise<UmbRepositoryResponse<ResponseType>>;
|
|
16
|
+
byId(id: string): Promise<Observable<ResponseType>>;
|
|
17
|
+
create(data: CreateRequestType): Promise<UmbRepositoryResponse<CreateResponseType>>;
|
|
18
|
+
save(id: string, data: UpdateRequestType): Promise<UmbRepositoryErrorResponse>;
|
|
19
|
+
delete(id: string): Promise<UmbRepositoryErrorResponse>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
type PropertyContainerTypes = 'Group' | 'Tab';
|
|
23
|
+
type T = DocumentTypeResponseModel;
|
|
24
|
+
declare class UmbContentTypePropertyStructureManager<R extends UmbDetailRepository<T> = UmbDetailRepository<T>> {
|
|
25
|
+
#private;
|
|
26
|
+
readonly documentTypes: rxjs.Observable<DocumentTypeResponseModel[]>;
|
|
27
|
+
private readonly _documentTypeContainers;
|
|
28
|
+
constructor(host: UmbControllerHostElement, typeRepository: R);
|
|
29
|
+
/**
|
|
30
|
+
* loadType will load the node type and all inherited and composed types.
|
|
31
|
+
* This will give us all the structure for properties and containers.
|
|
32
|
+
*/
|
|
33
|
+
loadType(id?: string): Promise<{
|
|
34
|
+
data?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
data: any;
|
|
37
|
+
}>;
|
|
38
|
+
createScaffold(parentId: string): Promise<{
|
|
39
|
+
data?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
data: DocumentTypeResponseModel;
|
|
42
|
+
}>;
|
|
43
|
+
private _ensureType;
|
|
44
|
+
private _loadType;
|
|
45
|
+
_observeDocumentType(data: T): Promise<void>;
|
|
46
|
+
private _loadDocumentTypeCompositions;
|
|
47
|
+
/** Public methods for consuming structure: */
|
|
48
|
+
rootDocumentType(): rxjs.Observable<DocumentTypeResponseModel | undefined>;
|
|
49
|
+
getRootDocumentType(): DocumentTypeResponseModel | undefined;
|
|
50
|
+
updateRootDocumentType(entry: T): void;
|
|
51
|
+
createContainer(contentTypeId: string | null, parentId?: string | null, type?: PropertyContainerTypes, sortOrder?: number): Promise<PropertyTypeContainerResponseModelBaseModel>;
|
|
52
|
+
updateContainer(documentTypeId: string | null, groupKey: string, partialUpdate: Partial<PropertyTypeContainerResponseModelBaseModel>): Promise<void>;
|
|
53
|
+
removeContainer(documentTypeKey: string | null, containerId?: string | null): Promise<void>;
|
|
54
|
+
createProperty(documentTypeId: string | null, containerId?: string | null, sortOrder?: number): Promise<PropertyTypeResponseModelBaseModel>;
|
|
55
|
+
insertProperty(documentTypeId: string | null, property: PropertyTypeResponseModelBaseModel): Promise<void>;
|
|
56
|
+
removeProperty(documentTypeId: string | null, propertyId: string): Promise<void>;
|
|
57
|
+
updateProperty(documentTypeId: string | null, propertyId: string, partialUpdate: Partial<PropertyTypeResponseModelBaseModel>): Promise<void>;
|
|
58
|
+
rootDocumentTypeObservablePart<PartResult>(mappingFunction: MappingFunction<T, PartResult>): rxjs.Observable<PartResult | undefined>;
|
|
59
|
+
hasPropertyStructuresOf(containerId: string | null): rxjs.Observable<boolean>;
|
|
60
|
+
rootPropertyStructures(): rxjs.Observable<PropertyTypeResponseModelBaseModel[]>;
|
|
61
|
+
propertyStructuresOf(containerId: string | null): rxjs.Observable<PropertyTypeResponseModelBaseModel[]>;
|
|
62
|
+
rootContainers(containerType: PropertyContainerTypes): rxjs.Observable<PropertyTypeContainerResponseModelBaseModel[]>;
|
|
63
|
+
hasRootContainers(containerType: PropertyContainerTypes): rxjs.Observable<boolean>;
|
|
64
|
+
containersOfParentKey(parentId: PropertyTypeContainerResponseModelBaseModel['parentId'], containerType: PropertyContainerTypes): rxjs.Observable<PropertyTypeContainerResponseModelBaseModel[]>;
|
|
65
|
+
containersByNameAndType(name: string, containerType: PropertyContainerTypes): rxjs.Observable<PropertyTypeContainerResponseModelBaseModel[]>;
|
|
66
|
+
private _reset;
|
|
67
|
+
destroy(): void;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class UmbContentTypeContainerStructureHelper {
|
|
71
|
+
#private;
|
|
72
|
+
private _ownerType?;
|
|
73
|
+
private _childType?;
|
|
74
|
+
private _isRoot;
|
|
75
|
+
private _ownerName?;
|
|
76
|
+
private _ownerKey?;
|
|
77
|
+
private _ownerContainers;
|
|
78
|
+
readonly containers: rxjs.Observable<PropertyTypeContainerResponseModelBaseModel[]>;
|
|
79
|
+
readonly hasProperties: rxjs.Observable<boolean>;
|
|
80
|
+
constructor(host: UmbControllerHostElement);
|
|
81
|
+
setStructureManager(structure: UmbContentTypePropertyStructureManager): void;
|
|
82
|
+
setType(value?: PropertyContainerTypes): void;
|
|
83
|
+
getType(): PropertyContainerTypes | undefined;
|
|
84
|
+
setContainerChildType(value?: PropertyContainerTypes): void;
|
|
85
|
+
getContainerChildType(): PropertyContainerTypes | undefined;
|
|
86
|
+
setName(value?: string): void;
|
|
87
|
+
getName(): string | undefined;
|
|
88
|
+
setIsRoot(value: boolean): void;
|
|
89
|
+
getIsRoot(): boolean;
|
|
90
|
+
private _observeOwnerContainers;
|
|
91
|
+
private _observeOwnerProperties;
|
|
92
|
+
private _observeChildContainers;
|
|
93
|
+
private _observeRootContainers;
|
|
94
|
+
private _insertGroupContainers;
|
|
95
|
+
/**
|
|
96
|
+
* Returns true if the container is an owner container.
|
|
97
|
+
*/
|
|
98
|
+
isOwnerContainer(groupId?: string): boolean | undefined;
|
|
99
|
+
/** Manipulate methods: */
|
|
100
|
+
addContainer(ownerId?: string, sortOrder?: number): Promise<void>;
|
|
101
|
+
partialUpdateContainer(groupId?: string, partialUpdate?: Partial<PropertyTypeContainerResponseModelBaseModel>): Promise<void>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
declare class UmbContentTypePropertyStructureHelper {
|
|
105
|
+
#private;
|
|
106
|
+
private _containerType?;
|
|
107
|
+
private _isRoot?;
|
|
108
|
+
private _containerName?;
|
|
109
|
+
readonly propertyStructure: rxjs.Observable<PropertyTypeResponseModelBaseModel[]>;
|
|
110
|
+
constructor(host: UmbControllerHostElement);
|
|
111
|
+
setStructureManager(structure: UmbContentTypePropertyStructureManager): void;
|
|
112
|
+
setContainerType(value?: PropertyContainerTypes): void;
|
|
113
|
+
getContainerType(): PropertyContainerTypes | undefined;
|
|
114
|
+
setContainerName(value?: string): void;
|
|
115
|
+
getContainerName(): string | undefined;
|
|
116
|
+
setIsRoot(value: boolean): void;
|
|
117
|
+
getIsRoot(): boolean | undefined;
|
|
118
|
+
private _observeGroupContainers;
|
|
119
|
+
private _observePropertyStructureOf;
|
|
120
|
+
/** Manipulate methods: */
|
|
121
|
+
addProperty(ownerId?: string, sortOrder?: number): Promise<PropertyTypeResponseModelBaseModel | undefined>;
|
|
122
|
+
insertProperty(property: PropertyTypeResponseModelBaseModel, sortOrder?: number): Promise<boolean>;
|
|
123
|
+
removeProperty(propertyId: string): Promise<boolean>;
|
|
124
|
+
partialUpdateProperty(propertyKey?: string, partialUpdate?: Partial<DocumentTypePropertyTypeResponseModel>): Promise<void>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { PropertyContainerTypes, UmbContentTypeContainerStructureHelper, UmbContentTypePropertyStructureHelper, UmbContentTypePropertyStructureManager };
|
package/context-api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UmbControllerHostElement, UmbControllerInterface } from '
|
|
2
|
-
import { UmbWorkspaceContextInterface } from '
|
|
3
|
-
import {
|
|
1
|
+
import { UmbControllerHostElement, UmbControllerInterface } from '@umbraco-cms/backoffice/controller';
|
|
2
|
+
import { UmbWorkspaceContextInterface } from '@umbraco-cms/backoffice/workspace';
|
|
3
|
+
import { UmbEntityBase } from '@umbraco-cms/backoffice/models';
|
|
4
4
|
|
|
5
5
|
declare class UmbContextToken<T = unknown> {
|
|
6
6
|
protected alias: string;
|
|
@@ -170,7 +170,7 @@ interface UmbEntityWorkspaceContextInterface<EntityType = unknown> extends UmbWo
|
|
|
170
170
|
save(): Promise<void>;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
declare const UMB_ENTITY_WORKSPACE_CONTEXT: UmbContextToken<UmbEntityWorkspaceContextInterface<
|
|
173
|
+
declare const UMB_ENTITY_WORKSPACE_CONTEXT: UmbContextToken<UmbEntityWorkspaceContextInterface<UmbEntityBase>>;
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* Change the collection of Contexts into a simplified array of data
|
package/controller.d.ts
CHANGED