@umbraco-cms/backoffice 14.0.0-631d8769 → 14.0.0-709b3cbf
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/dist-cms/assets/lang/en-us.js +18 -18
- package/dist-cms/assets/lang/en-us.ts +18 -18
- package/dist-cms/custom-elements.json +11 -11
- package/dist-cms/external/backend-api/index.js +1 -1
- package/dist-cms/external/backend-api/src/index.d.ts +17 -1
- package/dist-cms/external/backend-api/src/models/CreateContentRequestModelBaseDocumentValueModelDocumentVariantRequestModel.d.ts +1 -0
- package/dist-cms/external/backend-api/src/models/CreateContentRequestModelBaseMediaValueModelMediaVariantRequestModel.d.ts +1 -0
- package/dist-cms/external/backend-api/src/models/CreateContentTypeRequestModelBaseCreateDocumentTypePropertyTypeRequestModelCreateDocumentTypePropertyTypeContainerRequestModel.d.ts +2 -0
- package/dist-cms/external/backend-api/src/models/CreateContentTypeRequestModelBaseCreateMediaTypePropertyTypeRequestModelCreateMediaTypePropertyTypeContainerRequestModel.d.ts +20 -0
- package/dist-cms/external/backend-api/src/models/CreateMediaTypePropertyTypeContainerRequestModel.d.ts +2 -0
- package/dist-cms/external/backend-api/src/models/CreateMediaTypePropertyTypeRequestModel.d.ts +2 -0
- package/dist-cms/external/backend-api/src/models/CreateMediaTypeRequestModel.d.ts +2 -0
- package/dist-cms/external/backend-api/src/models/DeleteUserGroupsRequestModel.d.ts +3 -0
- package/dist-cms/external/backend-api/src/models/DeleteUsersRequestModel.d.ts +3 -0
- package/dist-cms/external/backend-api/src/models/ItemSortingRequestModel.d.ts +4 -0
- package/dist-cms/external/backend-api/src/models/ProblemDetailsBuilderModel.d.ts +1 -0
- package/dist-cms/external/backend-api/src/models/RelationResponseModel.d.ts +2 -2
- package/dist-cms/external/backend-api/src/models/ResetPasswordRequestModel.d.ts +3 -0
- package/dist-cms/external/backend-api/src/models/ResetPasswordTokenRequestModel.d.ts +4 -0
- package/dist-cms/external/backend-api/src/models/SortingRequestModel.d.ts +5 -0
- package/dist-cms/external/backend-api/src/models/UpdateContentTypeRequestModelBaseUpdateMediaTypePropertyTypeRequestModelUpdateMediaTypePropertyTypeContainerRequestModel.d.ts +18 -0
- package/dist-cms/external/backend-api/src/models/{UpdateFolderReponseModel.d.ts → UpdateFolderResponseModel.d.ts} +1 -1
- package/dist-cms/external/backend-api/src/models/UpdateMediaTypePropertyTypeContainerRequestModel.d.ts +2 -0
- package/dist-cms/external/backend-api/src/models/UpdateMediaTypePropertyTypeRequestModel.d.ts +2 -0
- package/dist-cms/external/backend-api/src/models/UpdateMediaTypeRequestModel.d.ts +2 -0
- package/dist-cms/external/backend-api/src/models/VerifyResetPasswordTokenRequestModel.d.ts +4 -0
- package/dist-cms/external/backend-api/src/services/DataTypeResource.d.ts +2 -2
- package/dist-cms/external/backend-api/src/services/DocumentResource.d.ts +21 -21
- package/dist-cms/external/backend-api/src/services/DocumentTypeResource.d.ts +35 -3
- package/dist-cms/external/backend-api/src/services/MediaResource.d.ts +13 -5
- package/dist-cms/external/backend-api/src/services/MediaTypeResource.d.ts +56 -0
- package/dist-cms/external/backend-api/src/services/RelationResource.d.ts +1 -9
- package/dist-cms/external/backend-api/src/services/SecurityResource.d.ts +24 -0
- package/dist-cms/external/backend-api/src/services/UserGroupResource.d.ts +8 -0
- package/dist-cms/external/backend-api/src/services/UserResource.d.ts +8 -0
- package/dist-cms/external/router-slot/config.d.ts +8 -0
- package/dist-cms/external/router-slot/index.d.ts +4 -3
- package/dist-cms/external/router-slot/index.js +1 -1
- package/dist-cms/external/router-slot/model.d.ts +123 -0
- package/dist-cms/external/router-slot/router-slot.d.ts +111 -0
- package/dist-cms/external/router-slot/util/anchor.d.ts +5 -0
- package/dist-cms/external/router-slot/util/events.d.ts +26 -0
- package/dist-cms/external/router-slot/util/history.d.ts +32 -0
- package/dist-cms/external/router-slot/util/index.d.ts +6 -0
- package/dist-cms/external/router-slot/util/router.d.ts +72 -0
- package/dist-cms/external/router-slot/util/shadow.d.ts +15 -0
- package/dist-cms/external/router-slot/util/url.d.ts +78 -0
- package/dist-cms/external/router-slot/util.d.ts +1 -0
- package/dist-cms/libs/observable-api/observer.js +2 -1
- package/dist-cms/mocks/browser-handlers.js +1 -1
- package/dist-cms/mocks/data/document.data.d.ts +6 -2
- package/dist-cms/mocks/data/document.data.js +54 -4
- package/dist-cms/mocks/data/entity.data.js +0 -2
- package/dist-cms/mocks/handlers/{document.handlers.js → document/document.handlers.js} +28 -40
- package/dist-cms/mocks/handlers/document/index.d.ts +1 -0
- package/dist-cms/mocks/handlers/document/index.js +5 -0
- package/dist-cms/mocks/handlers/document/item.handlers.d.ts +1 -0
- package/dist-cms/mocks/handlers/document/item.handlers.js +13 -0
- package/dist-cms/mocks/handlers/document/recycle-bin.handlers.d.ts +1 -0
- package/dist-cms/mocks/handlers/document/recycle-bin.handlers.js +16 -0
- package/dist-cms/mocks/handlers/document/slug.d.ts +1 -0
- package/dist-cms/mocks/handlers/document/slug.js +1 -0
- package/dist-cms/mocks/handlers/document/tree.handlers.d.ts +1 -0
- package/dist-cms/mocks/handlers/document/tree.handlers.js +16 -0
- package/dist-cms/packages/core/components/input-list-base/input-list-base.js +1 -1
- package/dist-cms/packages/core/content-type/content-type-container-structure-helper.class.js +2 -2
- package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.js +1 -1
- package/dist-cms/packages/core/content-type/content-type-structure-manager.class.d.ts +15 -15
- package/dist-cms/packages/core/content-type/content-type-structure-manager.class.js +79 -103
- package/dist-cms/packages/core/entity-action/common/trash/trash.action.d.ts +1 -1
- package/dist-cms/packages/core/entity-action/common/trash/trash.action.js +1 -1
- package/dist-cms/packages/core/modal/token/create-document-modal.token.d.ts +8 -0
- package/dist-cms/packages/core/modal/token/create-document-modal.token.js +5 -0
- package/dist-cms/packages/core/modal/token/index.d.ts +1 -1
- package/dist-cms/packages/core/modal/token/index.js +1 -1
- package/dist-cms/packages/core/store/store-base.d.ts +18 -6
- package/dist-cms/packages/core/store/store-base.js +22 -6
- package/dist-cms/packages/documents/document-types/manifests.js +0 -2
- package/dist-cms/packages/documents/document-types/repository/document-type.repository.d.ts +0 -21
- package/dist-cms/packages/documents/document-types/repository/document-type.repository.js +6 -18
- package/dist-cms/packages/documents/document-types/repository/sources/document-type.server.data.d.ts +1 -1
- package/dist-cms/packages/documents/document-types/repository/sources/document-type.server.data.js +1 -12
- package/dist-cms/packages/documents/document-types/workspace/document-type-workspace.context.js +27 -27
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit.element.js +8 -4
- package/dist-cms/packages/documents/documents/entity-actions/create/create-document-modal.element.d.ts +17 -0
- package/dist-cms/packages/documents/{document-types/modals/allowed-document-types/allowed-document-types-modal.element.js → documents/entity-actions/create/create-document-modal.element.js} +29 -38
- package/dist-cms/packages/documents/documents/entity-actions/create/create.action.d.ts +0 -2
- package/dist-cms/packages/documents/documents/entity-actions/create/create.action.js +7 -23
- package/dist-cms/packages/documents/documents/entity-actions/create/manifests.d.ts +2 -0
- package/dist-cms/packages/documents/documents/entity-actions/create/manifests.js +27 -0
- package/dist-cms/packages/documents/documents/entity-actions/manifests.d.ts +2 -2
- package/dist-cms/packages/documents/documents/entity-actions/manifests.js +15 -48
- package/dist-cms/packages/documents/documents/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/index.js +1 -0
- package/dist-cms/packages/documents/documents/manifests.d.ts +13 -1
- package/dist-cms/packages/documents/documents/manifests.js +2 -0
- package/dist-cms/packages/documents/documents/menu-item/manifests.js +1 -1
- package/dist-cms/packages/documents/documents/recycle-bin/entity-action/manifests.d.ts +14 -0
- package/dist-cms/packages/documents/documents/recycle-bin/entity-action/manifests.js +18 -0
- package/dist-cms/packages/documents/documents/recycle-bin/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/recycle-bin/index.js +1 -0
- package/dist-cms/packages/documents/documents/recycle-bin/manifests.d.ts +13 -0
- package/dist-cms/packages/documents/documents/recycle-bin/manifests.js +5 -0
- package/dist-cms/packages/documents/documents/recycle-bin/menu-item/manifests.d.ts +1 -0
- package/dist-cms/packages/documents/documents/recycle-bin/menu-item/manifests.js +14 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/document-recycle-bin.repository.d.ts +28 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/document-recycle-bin.repository.js +56 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/document-recycle.bin.tree.store.d.ts +18 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/document-recycle.bin.tree.store.js +19 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/index.js +1 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/manifests.d.ts +4 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/manifests.js +17 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/sources/document-recycle-bin.tree.server.data.d.ts +29 -0
- package/dist-cms/packages/documents/documents/recycle-bin/repository/sources/document-recycle-bin.tree.server.data.js +49 -0
- package/dist-cms/packages/documents/documents/recycle-bin/tree/manifests.d.ts +2 -0
- package/dist-cms/packages/documents/documents/recycle-bin/tree/manifests.js +19 -0
- package/dist-cms/packages/documents/documents/repository/document-item.store.d.ts +20 -0
- package/dist-cms/packages/documents/documents/repository/document-item.store.js +23 -0
- package/dist-cms/packages/documents/documents/repository/document.repository.d.ts +10 -9
- package/dist-cms/packages/documents/documents/repository/document.repository.js +47 -25
- package/dist-cms/packages/documents/documents/repository/document.store.d.ts +0 -12
- package/dist-cms/packages/documents/documents/repository/document.store.js +0 -16
- package/dist-cms/packages/documents/documents/repository/sources/document-item.server.data.d.ts +24 -0
- package/dist-cms/packages/documents/documents/repository/sources/document-item.server.data.js +31 -0
- package/dist-cms/packages/documents/documents/repository/sources/document.server.data.d.ts +9 -21
- package/dist-cms/packages/documents/documents/repository/sources/document.server.data.js +33 -62
- package/dist-cms/packages/documents/documents/workspace/manifests.js +6 -4
- package/dist-cms/packages/documents/manifests.d.ts +13 -1
- package/dist-cms/packages/settings/dashboards/performance-profiling/dashboard-performance-profiling.element.d.ts +3 -1
- package/dist-cms/packages/settings/dashboards/performance-profiling/dashboard-performance-profiling.element.js +26 -40
- package/dist-cms/packages/settings/relation-types/workspace/views/relation/workspace-view-relation-type-relation.element.js +17 -17
- package/dist-cms/packages/templating/templates/modals/query-builder/query-builder.element.d.ts +1 -1
- package/dist-cms/packages/templating/templates/modals/query-builder/query-builder.element.js +1 -1
- package/dist-cms/packages/users/user-groups/collection/user-group-collection-header.element.js +2 -2
- package/dist-cms/packages/users/user-groups/collection/user-group-collection-view.element.js +6 -6
- package/dist-cms/packages/users/user-groups/workspace/user-group-workspace-editor.element.js +15 -12
- package/dist-cms/packages/users/users/collection/user-collection-header.element.js +18 -11
- package/dist-cms/packages/users/users/collection/views/grid/user-collection-grid-view.element.js +6 -6
- package/dist-cms/packages/users/users/collection/views/table/column-layouts/status/user-table-status-column-layout.element.js +3 -3
- package/dist-cms/packages/users/users/index.d.ts +1 -0
- package/dist-cms/packages/users/users/index.js +1 -0
- package/dist-cms/packages/users/users/repository/index.d.ts +1 -0
- package/dist-cms/packages/users/users/repository/index.js +1 -0
- package/dist-cms/packages/users/users/workspace/user-workspace-editor.element.js +36 -35
- package/dist-cms/packages/users/utils.d.ts +5 -2
- package/dist-cms/packages/users/utils.js +14 -14
- package/dist-cms/shared/repository/data-source/folder-data-source.interface.d.ts +2 -2
- package/dist-cms/shared/repository/folder-repository.interface.d.ts +2 -2
- package/dist-cms/shared/router/index.d.ts +1 -1
- package/dist-cms/shared/router/index.js +1 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +7 -7
- package/package.json +2 -3
- package/dist-cms/packages/core/modal/token/allowed-document-types-modal.token.d.ts +0 -9
- package/dist-cms/packages/core/modal/token/allowed-document-types-modal.token.js +0 -5
- package/dist-cms/packages/documents/document-types/modals/allowed-document-types/allowed-document-types-modal.element.d.ts +0 -19
- package/dist-cms/packages/documents/document-types/modals/manifests.d.ts +0 -2
- package/dist-cms/packages/documents/document-types/modals/manifests.js +0 -9
- package/router-slot-2.3.0.tgz +0 -0
- /package/dist-cms/mocks/handlers/{document.handlers.d.ts → document/document.handlers.d.ts} +0 -0
|
@@ -18,13 +18,13 @@ export declare class UmbDocumentServerDataSource implements UmbDataSource<Create
|
|
|
18
18
|
/**
|
|
19
19
|
* Fetches a Document with the given id from the server
|
|
20
20
|
* @param {string} id
|
|
21
|
-
* @return {*}
|
|
22
21
|
* @memberof UmbDocumentServerDataSource
|
|
23
22
|
*/
|
|
24
23
|
get(id: string): Promise<import("../../../../../shared/repository/index.js").DataSourceResponse<DocumentResponseModel>>;
|
|
25
24
|
/**
|
|
26
25
|
* Creates a new Document scaffold
|
|
27
|
-
* @param {
|
|
26
|
+
* @param {string} documentTypeId
|
|
27
|
+
* @param {Partial<CreateDocumentRequestModel>} [preset]
|
|
28
28
|
* @return {*}
|
|
29
29
|
* @memberof UmbDocumentServerDataSource
|
|
30
30
|
*/
|
|
@@ -34,45 +34,33 @@ export declare class UmbDocumentServerDataSource implements UmbDataSource<Create
|
|
|
34
34
|
/**
|
|
35
35
|
* Inserts a new Document on the server
|
|
36
36
|
* @param {Document} document
|
|
37
|
-
* @return {*}
|
|
38
37
|
* @memberof UmbDocumentServerDataSource
|
|
39
38
|
*/
|
|
40
|
-
insert(document: CreateDocumentRequestModel
|
|
41
|
-
id: string;
|
|
42
|
-
}): Promise<import("../../../../../shared/repository/index.js").DataSourceResponse<string>>;
|
|
39
|
+
insert(document: CreateDocumentRequestModel): Promise<import("../../../../../shared/repository/index.js").DataSourceResponse<string>>;
|
|
43
40
|
/**
|
|
44
41
|
* Updates a Document on the server
|
|
45
|
-
* @param {
|
|
42
|
+
* @param {string} id
|
|
43
|
+
* @param {UpdateDocumentRequestModel} document
|
|
46
44
|
* @return {*}
|
|
47
45
|
* @memberof UmbDocumentServerDataSource
|
|
48
46
|
*/
|
|
49
47
|
update(id: string, document: UpdateDocumentRequestModel): Promise<import("../../../../../shared/repository/index.js").DataSourceResponse<any>>;
|
|
50
48
|
/**
|
|
51
|
-
*
|
|
52
|
-
* @param {
|
|
53
|
-
* @return {*}
|
|
49
|
+
* Moves a Document to the recycle bin on the server
|
|
50
|
+
* @param {string} id
|
|
54
51
|
* @memberof UmbDocumentServerDataSource
|
|
55
52
|
*/
|
|
56
|
-
trash(id: string): Promise<import("../../../../../shared/repository/index.js").DataSourceResponse<
|
|
53
|
+
trash(id: string): Promise<import("../../../../../shared/repository/index.js").DataSourceResponse<any>>;
|
|
57
54
|
/**
|
|
58
55
|
* Deletes a Document on the server
|
|
59
56
|
* @param {string} id
|
|
60
|
-
* @return {*}
|
|
61
57
|
* @memberof UmbDocumentServerDataSource
|
|
62
58
|
*/
|
|
63
59
|
delete(id: string): Promise<import("../../../../../shared/repository/index.js").DataSourceResponse<any>>;
|
|
64
60
|
/**
|
|
65
61
|
* Get the allowed document types for a given parent id
|
|
66
62
|
* @param {string} id
|
|
67
|
-
* @return {*}
|
|
68
|
-
* @memberof UmbDocumentTypeServerDataSource
|
|
69
|
-
*/
|
|
70
|
-
getAllowedDocumentTypesOf(id: string): Promise<import("../../../../../shared/repository/index.js").DataSourceResponse<import("../../../../../external/backend-api/index.js").PagedDocumentTypeResponseModel>>;
|
|
71
|
-
/**
|
|
72
|
-
* Get the allowed document types for root
|
|
73
|
-
* @param {string} id
|
|
74
|
-
* @return {*}
|
|
75
63
|
* @memberof UmbDocumentTypeServerDataSource
|
|
76
64
|
*/
|
|
77
|
-
|
|
65
|
+
getAllowedDocumentTypesOf(id: string | null): Promise<import("../../../../../shared/repository/index.js").DataSourceResponse<import("../../../../../external/backend-api/index.js").PagedDocumentTypeResponseModel>>;
|
|
78
66
|
}
|
|
@@ -20,20 +20,19 @@ export class UmbDocumentServerDataSource {
|
|
|
20
20
|
/**
|
|
21
21
|
* Fetches a Document with the given id from the server
|
|
22
22
|
* @param {string} id
|
|
23
|
-
* @return {*}
|
|
24
23
|
* @memberof UmbDocumentServerDataSource
|
|
25
24
|
*/
|
|
26
25
|
async get(id) {
|
|
27
|
-
if (!id)
|
|
26
|
+
if (!id)
|
|
28
27
|
throw new Error('Id is missing');
|
|
29
|
-
}
|
|
30
28
|
return tryExecuteAndNotify(this.#host, DocumentResource.getDocumentById({
|
|
31
29
|
id,
|
|
32
30
|
}));
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
33
|
* Creates a new Document scaffold
|
|
36
|
-
* @param {
|
|
34
|
+
* @param {string} documentTypeId
|
|
35
|
+
* @param {Partial<CreateDocumentRequestModel>} [preset]
|
|
37
36
|
* @return {*}
|
|
38
37
|
* @memberof UmbDocumentServerDataSource
|
|
39
38
|
*/
|
|
@@ -42,7 +41,6 @@ export class UmbDocumentServerDataSource {
|
|
|
42
41
|
urls: [],
|
|
43
42
|
templateId: null,
|
|
44
43
|
parentId: null,
|
|
45
|
-
id: UmbId.new(),
|
|
46
44
|
contentTypeId: documentTypeId,
|
|
47
45
|
values: [],
|
|
48
46
|
variants: [
|
|
@@ -57,103 +55,76 @@ export class UmbDocumentServerDataSource {
|
|
|
57
55
|
},
|
|
58
56
|
],
|
|
59
57
|
...preset,
|
|
58
|
+
id: UmbId.new(),
|
|
60
59
|
};
|
|
61
60
|
return { data };
|
|
62
61
|
}
|
|
63
62
|
/**
|
|
64
63
|
* Inserts a new Document on the server
|
|
65
64
|
* @param {Document} document
|
|
66
|
-
* @return {*}
|
|
67
65
|
* @memberof UmbDocumentServerDataSource
|
|
68
66
|
*/
|
|
69
67
|
async insert(document) {
|
|
70
68
|
if (!document.id)
|
|
71
69
|
throw new Error('Id is missing');
|
|
72
|
-
|
|
73
|
-
const unFroozenDocument = { ...document };
|
|
74
|
-
unFroozenDocument.id = undefined;
|
|
75
|
-
unFroozenDocument.variants =
|
|
76
|
-
unFroozenDocument.variants?.map((variant) => {
|
|
77
|
-
return { ...variant };
|
|
78
|
-
}) ?? [];
|
|
79
|
-
return tryExecuteAndNotify(this.#host, DocumentResource.postDocument({ requestBody: unFroozenDocument }));
|
|
70
|
+
return tryExecuteAndNotify(this.#host, DocumentResource.postDocument({ requestBody: document }));
|
|
80
71
|
}
|
|
81
72
|
/**
|
|
82
73
|
* Updates a Document on the server
|
|
83
|
-
* @param {
|
|
74
|
+
* @param {string} id
|
|
75
|
+
* @param {UpdateDocumentRequestModel} document
|
|
84
76
|
* @return {*}
|
|
85
77
|
* @memberof UmbDocumentServerDataSource
|
|
86
78
|
*/
|
|
87
79
|
async update(id, document) {
|
|
88
80
|
if (!id)
|
|
89
81
|
throw new Error('Id is missing');
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
82
|
+
/* TODO: look into why typescript doesn't complain about getting another model than UpdateDocumentRequestModel
|
|
83
|
+
Maybe we should simplify the sources, and always send the biggest model.
|
|
84
|
+
Then it is up to the data source to format the data correctly before passing it to wherever */
|
|
85
|
+
const requestBody = {
|
|
86
|
+
templateId: document.templateId,
|
|
87
|
+
values: document.values,
|
|
88
|
+
variants: document.variants?.map((variant) => ({
|
|
89
|
+
culture: variant.culture,
|
|
90
|
+
segment: variant.segment,
|
|
91
|
+
name: variant.name,
|
|
92
|
+
})),
|
|
93
|
+
};
|
|
94
|
+
return tryExecuteAndNotify(this.#host, DocumentResource.putDocumentById({ id, requestBody }));
|
|
98
95
|
}
|
|
99
96
|
/**
|
|
100
|
-
*
|
|
101
|
-
* @param {
|
|
102
|
-
* @return {*}
|
|
97
|
+
* Moves a Document to the recycle bin on the server
|
|
98
|
+
* @param {string} id
|
|
103
99
|
* @memberof UmbDocumentServerDataSource
|
|
104
100
|
*/
|
|
105
101
|
async trash(id) {
|
|
106
|
-
if (!id)
|
|
107
|
-
throw new Error('
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return tryExecuteAndNotify(this.#host, fetch('/umbraco/management/api/v1/document/trash', {
|
|
111
|
-
method: 'POST',
|
|
112
|
-
body: JSON.stringify([id]),
|
|
113
|
-
headers: {
|
|
114
|
-
'Content-Type': 'application/json',
|
|
115
|
-
},
|
|
116
|
-
}));
|
|
102
|
+
if (!id)
|
|
103
|
+
throw new Error('Document ID is missing');
|
|
104
|
+
// TODO: if we get a trash endpoint, we should use that instead.
|
|
105
|
+
return tryExecuteAndNotify(this.#host, DocumentResource.putDocumentByIdMoveToRecycleBin({ id }));
|
|
117
106
|
}
|
|
118
107
|
/**
|
|
119
108
|
* Deletes a Document on the server
|
|
120
109
|
* @param {string} id
|
|
121
|
-
* @return {*}
|
|
122
110
|
* @memberof UmbDocumentServerDataSource
|
|
123
111
|
*/
|
|
124
112
|
async delete(id) {
|
|
125
|
-
if (!id)
|
|
126
|
-
throw new Error('
|
|
127
|
-
|
|
128
|
-
return tryExecuteAndNotify(this.#host, fetch('/umbraco/management/api/v1/document/trash', {
|
|
129
|
-
method: 'POST',
|
|
130
|
-
body: JSON.stringify([id]),
|
|
131
|
-
headers: {
|
|
132
|
-
'Content-Type': 'application/json',
|
|
133
|
-
},
|
|
134
|
-
}).then((res) => res.json()));
|
|
113
|
+
if (!id)
|
|
114
|
+
throw new Error('Document ID is missing');
|
|
115
|
+
return this.trash(id);
|
|
135
116
|
}
|
|
136
117
|
/**
|
|
137
118
|
* Get the allowed document types for a given parent id
|
|
138
119
|
* @param {string} id
|
|
139
|
-
* @return {*}
|
|
140
120
|
* @memberof UmbDocumentTypeServerDataSource
|
|
141
121
|
*/
|
|
142
122
|
async getAllowedDocumentTypesOf(id) {
|
|
143
|
-
if (
|
|
123
|
+
if (id === undefined)
|
|
144
124
|
throw new Error('Id is missing');
|
|
125
|
+
// TODO: remove when null is allowed as id.
|
|
126
|
+
const hackId = id === null ? undefined : id;
|
|
145
127
|
// TODO: Notice, here we need to implement pagination.
|
|
146
|
-
return tryExecuteAndNotify(this.#host, DocumentResource.
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Get the allowed document types for root
|
|
150
|
-
* @param {string} id
|
|
151
|
-
* @return {*}
|
|
152
|
-
* @memberof UmbDocumentTypeServerDataSource
|
|
153
|
-
*/
|
|
154
|
-
async getAllowedDocumentTypesAtRoot() {
|
|
155
|
-
console.log('source requestAllowedDocumentTypesAtRoot');
|
|
156
|
-
// TODO: Notice, here we need to implement pagination.
|
|
157
|
-
return tryExecuteAndNotify(this.#host, DocumentResource.getDocumentRootAllowedDocumentTypes({}));
|
|
128
|
+
return tryExecuteAndNotify(this.#host, DocumentResource.getDocumentAllowedDocumentTypes({ parentId: hackId }));
|
|
158
129
|
}
|
|
159
130
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { UmbDocumentSaveAndPublishWorkspaceAction } from './actions/save-and-publish.action.js';
|
|
2
|
-
import { UmbDocumentSaveAndPreviewWorkspaceAction } from './actions/save-and-preview.action.js';
|
|
3
|
-
import { UmbSaveAndScheduleDocumentWorkspaceAction } from './actions/save-and-schedule.action.js';
|
|
4
1
|
import { UmbSaveWorkspaceAction } from '../../../core/workspace/index.js';
|
|
5
2
|
const workspace = {
|
|
6
3
|
type: 'workspace',
|
|
@@ -68,6 +65,7 @@ const workspaceViewCollections = [
|
|
|
68
65
|
*/
|
|
69
66
|
];
|
|
70
67
|
const workspaceActions = [
|
|
68
|
+
/*
|
|
71
69
|
{
|
|
72
70
|
type: 'workspaceAction',
|
|
73
71
|
alias: 'Umb.WorkspaceAction.Document.SaveAndPublish',
|
|
@@ -86,6 +84,7 @@ const workspaceActions = [
|
|
|
86
84
|
},
|
|
87
85
|
],
|
|
88
86
|
},
|
|
87
|
+
*/
|
|
89
88
|
{
|
|
90
89
|
type: 'workspaceAction',
|
|
91
90
|
alias: 'Umb.WorkspaceAction.Document.Save',
|
|
@@ -93,7 +92,8 @@ const workspaceActions = [
|
|
|
93
92
|
weight: 80,
|
|
94
93
|
meta: {
|
|
95
94
|
label: 'Save',
|
|
96
|
-
look: '
|
|
95
|
+
look: 'primary',
|
|
96
|
+
color: 'positive',
|
|
97
97
|
api: UmbSaveWorkspaceAction,
|
|
98
98
|
},
|
|
99
99
|
conditions: [
|
|
@@ -103,6 +103,7 @@ const workspaceActions = [
|
|
|
103
103
|
},
|
|
104
104
|
],
|
|
105
105
|
},
|
|
106
|
+
/*
|
|
106
107
|
{
|
|
107
108
|
type: 'workspaceAction',
|
|
108
109
|
alias: 'Umb.WorkspaceAction.Document.SaveAndPreview',
|
|
@@ -135,5 +136,6 @@ const workspaceActions = [
|
|
|
135
136
|
},
|
|
136
137
|
],
|
|
137
138
|
},
|
|
139
|
+
*/
|
|
138
140
|
];
|
|
139
141
|
export const manifests = [workspace, ...workspaceEditorViews, ...workspaceViewCollections, ...workspaceActions];
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
export declare const manifests: import("
|
|
1
|
+
export declare const manifests: (import("../../libs/extension-api/types.js").ManifestBase | {
|
|
2
|
+
type: string;
|
|
3
|
+
alias: string;
|
|
4
|
+
name: string;
|
|
5
|
+
weight: number;
|
|
6
|
+
meta: {
|
|
7
|
+
icon: string;
|
|
8
|
+
label: string;
|
|
9
|
+
repositoryAlias: string;
|
|
10
|
+
api: typeof import("../core/index.js").UmbTrashEntityAction;
|
|
11
|
+
entityTypes: string[];
|
|
12
|
+
};
|
|
13
|
+
})[];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { UmbLitElement } from '../../../../shared/lit-element/index.js';
|
|
2
2
|
export declare class UmbDashboardPerformanceProfilingElement extends UmbLitElement {
|
|
3
|
-
private
|
|
3
|
+
#private;
|
|
4
|
+
private _profilingStatus;
|
|
4
5
|
private _isDebugMode;
|
|
6
|
+
private _toggle;
|
|
5
7
|
firstUpdated(): void;
|
|
6
8
|
private _getProfilingStatus;
|
|
7
9
|
private _changeProfilingStatus;
|
|
@@ -4,78 +4,61 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { UmbTextStyles } from
|
|
8
|
-
import { css, html, customElement, state } from '../../../../external/lit/index.js';
|
|
7
|
+
import { UmbTextStyles } from '../../../../shared/style/index.js';
|
|
8
|
+
import { css, html, customElement, state, query, unsafeHTML } from '../../../../external/lit/index.js';
|
|
9
9
|
import { UmbLitElement } from '../../../../shared/lit-element/index.js';
|
|
10
10
|
import { ProfilingResource } from '../../../../external/backend-api/index.js';
|
|
11
11
|
import { tryExecuteAndNotify } from '../../../../shared/resources/index.js';
|
|
12
12
|
export let UmbDashboardPerformanceProfilingElement = class UmbDashboardPerformanceProfilingElement extends UmbLitElement {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
|
+
this._profilingStatus = true;
|
|
15
16
|
// TODO: Get this from the management api configuration when available
|
|
16
17
|
this._isDebugMode = true;
|
|
17
18
|
}
|
|
19
|
+
#setToggle(value) {
|
|
20
|
+
this._toggle.checked = value;
|
|
21
|
+
this._profilingStatus = value;
|
|
22
|
+
}
|
|
18
23
|
firstUpdated() {
|
|
19
24
|
this._getProfilingStatus();
|
|
20
25
|
}
|
|
21
26
|
async _getProfilingStatus() {
|
|
22
27
|
const { data } = await tryExecuteAndNotify(this, ProfilingResource.getProfilingStatus());
|
|
23
|
-
if (data)
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
if (!data || !data.enabled)
|
|
29
|
+
return;
|
|
30
|
+
this._profilingStatus = data.enabled;
|
|
26
31
|
}
|
|
27
32
|
async _changeProfilingStatus() {
|
|
28
33
|
const { error } = await tryExecuteAndNotify(this, ProfilingResource.putProfilingStatus({ requestBody: { enabled: !this._profilingStatus } }));
|
|
29
|
-
if (
|
|
30
|
-
this
|
|
34
|
+
if (error) {
|
|
35
|
+
this.#setToggle(this._profilingStatus);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.#setToggle(!this._profilingStatus);
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
41
|
renderProfilingStatus() {
|
|
34
42
|
return this._isDebugMode
|
|
35
43
|
? html `
|
|
36
|
-
|
|
37
|
-
Umbraco is running in debug mode. This means you can use the built-in performance profiler to assess
|
|
38
|
-
performance when rendering pages.
|
|
39
|
-
</p>
|
|
40
|
-
<p>
|
|
41
|
-
If you want to activate the profiler for a specific page rendering, simply add
|
|
42
|
-
<strong>umbDebug=true</strong> to the querystring when requesting the page.
|
|
43
|
-
</p>
|
|
44
|
-
|
|
45
|
-
<p>
|
|
46
|
-
If you want the profiler to be activated by default for all page renderings, you can use the toggle below.
|
|
47
|
-
It will set a cookie in your browser, which then activates the profiler automatically. In other words, the
|
|
48
|
-
profiler will only be active by default in your browser - not everyone else's.
|
|
49
|
-
</p>
|
|
44
|
+
${unsafeHTML(this.localize.term('profiling_performanceProfilingDescription'))}
|
|
50
45
|
|
|
51
46
|
<uui-toggle
|
|
47
|
+
id="toggle"
|
|
52
48
|
label="Activate the profiler by default"
|
|
53
49
|
label-position="left"
|
|
54
|
-
|
|
50
|
+
?checked="${this._profilingStatus}"
|
|
55
51
|
@change="${this._changeProfilingStatus}"></uui-toggle>
|
|
56
52
|
|
|
57
|
-
<h4
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<strong>Umbraco:CMS:Hosting:Debug</strong> to <strong>false</strong> in appsettings.json,
|
|
61
|
-
appsettings.{Environment}.json or via an environment variable.
|
|
62
|
-
</p>
|
|
53
|
+
<h4>${this.localize.term('profiling_reminder')}</h4>
|
|
54
|
+
|
|
55
|
+
${unsafeHTML(this.localize.term('profiling_reminderDescription'))}
|
|
63
56
|
`
|
|
64
|
-
: html `
|
|
65
|
-
<p>
|
|
66
|
-
Umbraco is not running in debug mode, so you can't use the built-in profiler. This is how it should be for a
|
|
67
|
-
production site.
|
|
68
|
-
</p>
|
|
69
|
-
<p>
|
|
70
|
-
Debug mode is turned on by setting <strong>Umbraco:CMS:Hosting:Debug</strong> to <strong>true</strong> in
|
|
71
|
-
appsettings.json, appsettings.{Environment}.json or via an environment variable.
|
|
72
|
-
</p>
|
|
73
|
-
`;
|
|
57
|
+
: html ` ${unsafeHTML(this.localize.term('profiling_profilerEnabledDescription'))} `;
|
|
74
58
|
}
|
|
75
59
|
render() {
|
|
76
60
|
return html `
|
|
77
|
-
<uui-box>
|
|
78
|
-
<h1>Performance Profiling</h1>
|
|
61
|
+
<uui-box headline=${this.localize.term('profiling_performanceProfiling')}>
|
|
79
62
|
${typeof this._profilingStatus === 'undefined' ? html `<uui-loader></uui-loader>` : this.renderProfilingStatus()}
|
|
80
63
|
</uui-box>
|
|
81
64
|
`;
|
|
@@ -108,6 +91,9 @@ __decorate([
|
|
|
108
91
|
__decorate([
|
|
109
92
|
state()
|
|
110
93
|
], UmbDashboardPerformanceProfilingElement.prototype, "_isDebugMode", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
query('#toggle')
|
|
96
|
+
], UmbDashboardPerformanceProfilingElement.prototype, "_toggle", void 0);
|
|
111
97
|
UmbDashboardPerformanceProfilingElement = __decorate([
|
|
112
98
|
customElement('umb-dashboard-performance-profiling')
|
|
113
99
|
], UmbDashboardPerformanceProfilingElement);
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { UmbTextStyles } from
|
|
7
|
+
import { UmbTextStyles } from '../../../../../../shared/style/index.js';
|
|
8
8
|
import { css, html, customElement, state } from '../../../../../../external/lit/index.js';
|
|
9
9
|
import { UmbLitElement } from '../../../../../../shared/lit-element/index.js';
|
|
10
10
|
export let UmbWorkspaceViewRelationTypeRelationElement = class UmbWorkspaceViewRelationTypeRelationElement extends UmbLitElement {
|
|
@@ -83,65 +83,65 @@ UmbWorkspaceViewRelationTypeRelationElement = __decorate([
|
|
|
83
83
|
], UmbWorkspaceViewRelationTypeRelationElement);
|
|
84
84
|
const MockData = [
|
|
85
85
|
{
|
|
86
|
-
parentId: 1,
|
|
86
|
+
parentId: '1',
|
|
87
87
|
parentName: 'Parent 1',
|
|
88
|
-
childId: 2,
|
|
88
|
+
childId: '2',
|
|
89
89
|
childName: 'Child 1',
|
|
90
90
|
createDate: '2021-01-01',
|
|
91
91
|
comment: 'Comment 1',
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
parentId: 1,
|
|
94
|
+
parentId: '1',
|
|
95
95
|
parentName: 'Parent 1',
|
|
96
|
-
childId: 3,
|
|
96
|
+
childId: '3',
|
|
97
97
|
childName: 'Child 2',
|
|
98
98
|
createDate: '2021-01-01',
|
|
99
99
|
comment: 'Comment 2',
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
|
-
parentId: 1,
|
|
102
|
+
parentId: '1',
|
|
103
103
|
parentName: 'Parent 1',
|
|
104
|
-
childId: 4,
|
|
104
|
+
childId: '4',
|
|
105
105
|
childName: 'Child 3',
|
|
106
106
|
createDate: '2021-01-01',
|
|
107
107
|
comment: 'Comment 3',
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
parentId: 1,
|
|
110
|
+
parentId: '1',
|
|
111
111
|
parentName: 'Parent 1',
|
|
112
|
-
childId: 5,
|
|
112
|
+
childId: '5',
|
|
113
113
|
childName: 'Child 4',
|
|
114
114
|
createDate: '2021-01-01',
|
|
115
115
|
comment: 'Comment 4',
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
|
-
parentId: 1,
|
|
118
|
+
parentId: '1',
|
|
119
119
|
parentName: 'Parent 1',
|
|
120
|
-
childId: 6,
|
|
120
|
+
childId: '6',
|
|
121
121
|
childName: 'Child 5',
|
|
122
122
|
createDate: '2021-01-01',
|
|
123
123
|
comment: 'Comment 5',
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
|
-
parentId: 1,
|
|
126
|
+
parentId: '1',
|
|
127
127
|
parentName: 'Parent 1',
|
|
128
|
-
childId: 7,
|
|
128
|
+
childId: '7',
|
|
129
129
|
childName: 'Child 6',
|
|
130
130
|
createDate: '2021-01-01',
|
|
131
131
|
comment: 'Comment 6',
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
|
-
parentId: 1,
|
|
134
|
+
parentId: '1',
|
|
135
135
|
parentName: 'Parent 1',
|
|
136
|
-
childId: 8,
|
|
136
|
+
childId: '8',
|
|
137
137
|
childName: 'Child 7',
|
|
138
138
|
createDate: '2021-01-01',
|
|
139
139
|
comment: 'Comment 7',
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
|
-
parentId: 1,
|
|
142
|
+
parentId: '1',
|
|
143
143
|
parentName: 'Parent 1',
|
|
144
|
-
childId: 9,
|
|
144
|
+
childId: '9',
|
|
145
145
|
childName: 'Child 8',
|
|
146
146
|
createDate: '2021-01-01',
|
|
147
147
|
comment: 'Comment 8',
|
package/dist-cms/packages/templating/templates/modals/query-builder/query-builder.element.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export default class UmbChooseInsertTypeModalElement extends UmbModalBaseElement
|
|
|
15
15
|
private _templateQuery?;
|
|
16
16
|
private _queryRequest;
|
|
17
17
|
private _queryBuilderSettings?;
|
|
18
|
-
private _selectedRootContentName
|
|
18
|
+
private _selectedRootContentName?;
|
|
19
19
|
private _defaultSortDirection;
|
|
20
20
|
constructor();
|
|
21
21
|
render(): import("lit-html").TemplateResult<1>;
|
package/dist-cms/packages/templating/templates/modals/query-builder/query-builder.element.js
CHANGED
|
@@ -89,7 +89,7 @@ let UmbChooseInsertTypeModalElement = class UmbChooseInsertTypeModalElement exte
|
|
|
89
89
|
#postTemplateQuery;
|
|
90
90
|
#openDocumentPicker;
|
|
91
91
|
async #getDocumentItem(ids) {
|
|
92
|
-
const { data, error } = await this.#documentRepository.
|
|
92
|
+
const { data, error } = await this.#documentRepository.requestItems(ids);
|
|
93
93
|
if (data) {
|
|
94
94
|
this._selectedRootContentName = data[0].name;
|
|
95
95
|
}
|
package/dist-cms/packages/users/user-groups/collection/user-group-collection-header.element.js
CHANGED
|
@@ -23,8 +23,8 @@ export let UmbUserGroupCollectionHeaderElement = class UmbUserGroupCollectionHea
|
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
25
|
return html `
|
|
26
|
-
<uui-button @click=${this.#onCreate} label
|
|
27
|
-
<uui-input @input=${this.#onSearch} label
|
|
26
|
+
<uui-button @click=${this.#onCreate} label=${this.localize.term('actions_createGroup')} look="outline"></uui-button>
|
|
27
|
+
<uui-input @input=${this.#onSearch} label=${this.localize.term('general_search')} placeholder=${this.localize.term('visuallyHiddenTexts_userGroupSearchLabel')} id="input-search"></uui-input>
|
|
28
28
|
`;
|
|
29
29
|
}
|
|
30
30
|
static { this.styles = [
|
package/dist-cms/packages/users/user-groups/collection/user-group-collection-view.element.js
CHANGED
|
@@ -19,21 +19,21 @@ export let UmbUserGroupCollectionViewElement = class UmbUserGroupCollectionViewE
|
|
|
19
19
|
};
|
|
20
20
|
this._tableColumns = [
|
|
21
21
|
{
|
|
22
|
-
name: '
|
|
22
|
+
name: this.localize.term('general_name'),
|
|
23
23
|
alias: 'userGroupName',
|
|
24
24
|
elementName: 'umb-user-group-table-name-column-layout',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
name: '
|
|
27
|
+
name: this.localize.term('main_sections'),
|
|
28
28
|
alias: 'userGroupSections',
|
|
29
29
|
elementName: 'umb-user-group-table-sections-column-layout',
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
name: '
|
|
32
|
+
name: this.localize.term('user_startnode'),
|
|
33
33
|
alias: 'userGroupContentStartNode',
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
name: '
|
|
36
|
+
name: this.localize.term('user_mediastartnode'),
|
|
37
37
|
alias: 'userGroupMediaStartNode',
|
|
38
38
|
},
|
|
39
39
|
];
|
|
@@ -67,11 +67,11 @@ export let UmbUserGroupCollectionViewElement = class UmbUserGroupCollectionViewE
|
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
columnAlias: 'userGroupContentStartNode',
|
|
70
|
-
value: userGroup.documentStartNodeId || '
|
|
70
|
+
value: userGroup.documentStartNodeId || this.localize.term('content_contentRoot'),
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
columnAlias: 'userGroupMediaStartNode',
|
|
74
|
-
value: userGroup.mediaStartNodeId || '
|
|
74
|
+
value: userGroup.mediaStartNodeId || this.localize.term('media_mediaRoot'),
|
|
75
75
|
},
|
|
76
76
|
],
|
|
77
77
|
};
|