@umbraco-cms/backoffice 1.0.0-next.49f05cfb → 1.0.0-next.4ca219c0
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 +2 -3
- package/backend-api.d.ts +2 -2
- package/collection.d.ts +1 -1
- package/content-type.d.ts +15 -12
- package/context-api.d.ts +2 -4
- package/{controller.d.ts → controller-api.d.ts} +2 -3
- package/custom-elements.json +1047 -668
- package/data-type.d.ts +13 -0
- package/{element.d.ts → element-api.d.ts} +5 -3
- package/entity-action.d.ts +1 -1
- package/extension-api.d.ts +657 -0
- package/{extensions-registry.d.ts → extension-registry.d.ts} +10 -137
- package/modal.d.ts +196 -30
- package/models.d.ts +7 -3
- package/observable-api.d.ts +2 -1
- package/package.json +1 -1
- package/picker-input.d.ts +1 -1
- package/repository.d.ts +19 -2
- package/resources.d.ts +1 -1
- package/router.d.ts +7 -5
- package/section.d.ts +2 -2
- package/sorter.d.ts +1 -1
- package/store.d.ts +1 -1
- package/tree.d.ts +1 -1
- package/umbraco-package-schema.json +15 -15
- package/utils.d.ts +3 -1
- package/vscode-html-custom-data.json +301 -175
- package/workspace.d.ts +1 -1
- package/extensions-api.d.ts +0 -67
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ Create an umbraco-package.json file in the root of your package.
|
|
|
40
40
|
Then create a dashboard.js file the same folder.
|
|
41
41
|
|
|
42
42
|
```javascript
|
|
43
|
-
import { UmbElementMixin } from '@umbraco-cms/backoffice/element';
|
|
43
|
+
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
|
|
44
44
|
import { UMB_NOTIFICATION_CONTEXT_TOKEN } from '@umbraco-cms/backoffice/notification';
|
|
45
45
|
|
|
46
46
|
const template = document.createElement('template');
|
|
@@ -106,12 +106,11 @@ Then go to the element located in `src/my-element.ts` and replace it with the fo
|
|
|
106
106
|
// src/my-element.ts
|
|
107
107
|
import { LitElement, html } from 'lit';
|
|
108
108
|
import { customElement } from 'lit/decorators.js';
|
|
109
|
-
import { UmbElementMixin } from '@umbraco-cms/backoffice/element';
|
|
109
|
+
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
|
|
110
110
|
import { UmbNotificationContext, UMB_NOTIFICATION_CONTEXT_TOKEN } from '@umbraco-cms/backoffice/notification';
|
|
111
111
|
|
|
112
112
|
@customElement('my-element')
|
|
113
113
|
export default class MyElement extends UmbElementMixin(LitElement) {
|
|
114
|
-
|
|
115
114
|
private _notificationContext?: UmbNotificationContext;
|
|
116
115
|
|
|
117
116
|
constructor() {
|
package/backend-api.d.ts
CHANGED
|
@@ -586,11 +586,11 @@ type DocumentTypeItemResponseModel = (ItemResponseModelBaseModel & {
|
|
|
586
586
|
icon?: string | null;
|
|
587
587
|
});
|
|
588
588
|
|
|
589
|
-
type DocumentTypeResponseModel =
|
|
589
|
+
type DocumentTypeResponseModel = ContentTypeResponseModelBaseDocumentTypePropertyTypeResponseModelDocumentTypePropertyTypeContainerResponseModel & {
|
|
590
590
|
allowedTemplateIds?: Array<string>;
|
|
591
591
|
defaultTemplateId?: string | null;
|
|
592
592
|
cleanup?: ContentTypeCleanupModel;
|
|
593
|
-
}
|
|
593
|
+
};
|
|
594
594
|
|
|
595
595
|
type FolderTreeItemResponseModel = (EntityTreeItemResponseModel & {
|
|
596
596
|
$type: string;
|
package/collection.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
2
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
3
3
|
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
4
4
|
import { UmbObserverController } from '@umbraco-cms/backoffice/observable-api';
|
|
5
5
|
import { UmbCollectionRepository } from '@umbraco-cms/backoffice/repository';
|
package/content-type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ProblemDetailsModel, DocumentTypeResponseModel, PropertyTypeContainerResponseModelBaseModel, PropertyTypeResponseModelBaseModel, DocumentTypePropertyTypeResponseModel } from '@umbraco-cms/backoffice/backend-api';
|
|
4
|
-
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
|
4
|
+
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
5
5
|
import { MappingFunction } from '@umbraco-cms/backoffice/observable-api';
|
|
6
6
|
|
|
7
7
|
interface UmbRepositoryErrorResponse {
|
|
@@ -35,19 +35,21 @@ declare class UmbContentTypePropertyStructureManager<R extends UmbDetailReposito
|
|
|
35
35
|
} | {
|
|
36
36
|
data: any;
|
|
37
37
|
}>;
|
|
38
|
-
createScaffold(parentId: string): Promise<{
|
|
38
|
+
createScaffold(parentId: string | null): Promise<{
|
|
39
39
|
data?: undefined;
|
|
40
40
|
} | {
|
|
41
41
|
data: DocumentTypeResponseModel;
|
|
42
42
|
}>;
|
|
43
|
+
save(): Promise<boolean>;
|
|
44
|
+
create(): Promise<boolean>;
|
|
43
45
|
private _ensureType;
|
|
44
46
|
private _loadType;
|
|
45
47
|
_observeDocumentType(data: T): Promise<void>;
|
|
46
48
|
private _loadDocumentTypeCompositions;
|
|
47
49
|
/** Public methods for consuming structure: */
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
ownerDocumentType(): rxjs.Observable<DocumentTypeResponseModel | undefined>;
|
|
51
|
+
getOwnerDocumentType(): DocumentTypeResponseModel | undefined;
|
|
52
|
+
updateOwnerDocumentType(entry: T): void;
|
|
51
53
|
createContainer(contentTypeId: string | null, parentId?: string | null, type?: PropertyContainerTypes, sortOrder?: number): Promise<PropertyTypeContainerResponseModelBaseModel>;
|
|
52
54
|
updateContainer(documentTypeId: string | null, groupKey: string, partialUpdate: Partial<PropertyTypeContainerResponseModelBaseModel>): Promise<void>;
|
|
53
55
|
removeContainer(documentTypeKey: string | null, containerId?: string | null): Promise<void>;
|
|
@@ -55,12 +57,13 @@ declare class UmbContentTypePropertyStructureManager<R extends UmbDetailReposito
|
|
|
55
57
|
insertProperty(documentTypeId: string | null, property: PropertyTypeResponseModelBaseModel): Promise<void>;
|
|
56
58
|
removeProperty(documentTypeId: string | null, propertyId: string): Promise<void>;
|
|
57
59
|
updateProperty(documentTypeId: string | null, propertyId: string, partialUpdate: Partial<PropertyTypeResponseModelBaseModel>): Promise<void>;
|
|
58
|
-
|
|
60
|
+
ownerDocumentTypeObservablePart<PartResult>(mappingFunction: MappingFunction<T, PartResult>): rxjs.Observable<PartResult | undefined>;
|
|
59
61
|
hasPropertyStructuresOf(containerId: string | null): rxjs.Observable<boolean>;
|
|
60
62
|
rootPropertyStructures(): rxjs.Observable<PropertyTypeResponseModelBaseModel[]>;
|
|
61
63
|
propertyStructuresOf(containerId: string | null): rxjs.Observable<PropertyTypeResponseModelBaseModel[]>;
|
|
62
64
|
rootContainers(containerType: PropertyContainerTypes): rxjs.Observable<PropertyTypeContainerResponseModelBaseModel[]>;
|
|
63
65
|
hasRootContainers(containerType: PropertyContainerTypes): rxjs.Observable<boolean>;
|
|
66
|
+
ownerContainersOf(containerType: PropertyContainerTypes): rxjs.Observable<PropertyTypeContainerResponseModelBaseModel[] | undefined>;
|
|
64
67
|
containersOfParentKey(parentId: PropertyTypeContainerResponseModelBaseModel['parentId'], containerType: PropertyContainerTypes): rxjs.Observable<PropertyTypeContainerResponseModelBaseModel[]>;
|
|
65
68
|
containersByNameAndType(name: string, containerType: PropertyContainerTypes): rxjs.Observable<PropertyTypeContainerResponseModelBaseModel[]>;
|
|
66
69
|
private _reset;
|
|
@@ -73,7 +76,7 @@ declare class UmbContentTypeContainerStructureHelper {
|
|
|
73
76
|
private _childType?;
|
|
74
77
|
private _isRoot;
|
|
75
78
|
private _ownerName?;
|
|
76
|
-
private
|
|
79
|
+
private _directContainers;
|
|
77
80
|
private _ownerContainers;
|
|
78
81
|
readonly containers: rxjs.Observable<PropertyTypeContainerResponseModelBaseModel[]>;
|
|
79
82
|
readonly hasProperties: rxjs.Observable<boolean>;
|
|
@@ -87,18 +90,18 @@ declare class UmbContentTypeContainerStructureHelper {
|
|
|
87
90
|
getName(): string | undefined;
|
|
88
91
|
setIsRoot(value: boolean): void;
|
|
89
92
|
getIsRoot(): boolean;
|
|
90
|
-
private
|
|
91
|
-
private
|
|
93
|
+
private _observeDirectContainers;
|
|
94
|
+
private _observeChildContainerProperties;
|
|
92
95
|
private _observeChildContainers;
|
|
93
96
|
private _observeRootContainers;
|
|
94
97
|
private _insertGroupContainers;
|
|
95
98
|
/**
|
|
96
99
|
* Returns true if the container is an owner container.
|
|
97
100
|
*/
|
|
98
|
-
isOwnerContainer(
|
|
101
|
+
isOwnerContainer(containerId?: string): boolean | undefined;
|
|
99
102
|
/** Manipulate methods: */
|
|
100
|
-
addContainer(
|
|
101
|
-
partialUpdateContainer(
|
|
103
|
+
addContainer(parentContainerId?: string, sortOrder?: number): Promise<void>;
|
|
104
|
+
partialUpdateContainer(containerId?: string, partialUpdate?: Partial<PropertyTypeContainerResponseModelBaseModel>): Promise<void>;
|
|
102
105
|
}
|
|
103
106
|
|
|
104
107
|
declare class UmbContentTypePropertyStructureHelper {
|
package/context-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UmbControllerHostElement, UmbControllerInterface } from '@umbraco-cms/backoffice/controller';
|
|
1
|
+
import { UmbControllerHostElement, UmbControllerInterface } from '@umbraco-cms/backoffice/controller-api';
|
|
2
2
|
import { UmbContextToken as UmbContextToken$1 } from '@umbraco-cms/backoffice/context-api';
|
|
3
3
|
import { UmbWorkspaceContextInterface } from '@umbraco-cms/backoffice/workspace';
|
|
4
4
|
import { UmbEntityBase } from '@umbraco-cms/backoffice/models';
|
|
@@ -165,9 +165,7 @@ declare class UmbContextProvideEventImplementation extends Event implements UmbC
|
|
|
165
165
|
}
|
|
166
166
|
declare const isUmbContextProvideEventType: (event: Event) => event is UmbContextProvideEventImplementation;
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
declare const UmbContextProviderElement_base: HTMLElementConstructor<UmbControllerHostElement> & {
|
|
168
|
+
declare const UmbContextProviderElement_base: (new (...args: any[]) => UmbControllerHostElement) & {
|
|
171
169
|
new (): HTMLElement;
|
|
172
170
|
prototype: HTMLElement;
|
|
173
171
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { HTMLElementConstructor } from '@umbraco-cms/backoffice/models';
|
|
2
|
-
|
|
3
1
|
interface UmbControllerInterface {
|
|
4
2
|
get unique(): string | undefined;
|
|
5
3
|
hostConnected(): void;
|
|
@@ -7,6 +5,7 @@ interface UmbControllerInterface {
|
|
|
7
5
|
destroy(): void;
|
|
8
6
|
}
|
|
9
7
|
|
|
8
|
+
type HTMLElementConstructor<T = HTMLElement> = new (...args: any[]) => T;
|
|
10
9
|
declare class UmbControllerHostElement extends HTMLElement {
|
|
11
10
|
hasController(controller: UmbControllerInterface): boolean;
|
|
12
11
|
getControllers(filterMethod: (ctrl: UmbControllerInterface) => boolean): UmbControllerInterface[];
|
|
@@ -21,7 +20,7 @@ declare class UmbControllerHostElement extends HTMLElement {
|
|
|
21
20
|
* @param {Object} superClass - superclass to be extended.
|
|
22
21
|
* @mixin
|
|
23
22
|
*/
|
|
24
|
-
declare const UmbControllerHostMixin: <T extends HTMLElementConstructor
|
|
23
|
+
declare const UmbControllerHostMixin: <T extends HTMLElementConstructor<HTMLElement>>(superClass: T) => HTMLElementConstructor<UmbControllerHostElement> & T;
|
|
25
24
|
declare global {
|
|
26
25
|
interface HTMLElement {
|
|
27
26
|
connectedCallback(): void;
|