@umbraco-cms/backoffice 14.0.0--preview006-e321634a → 14.0.0--preview006-2af5bef5
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/custom-elements.json +11 -0
- package/dist-cms/packages/block/block-list/components/ref-list-block/ref-list-block.element.js +1 -1
- package/dist-cms/packages/core/data-type/components/data-type-flow-input/data-type-flow-input.element.js +1 -1
- package/dist-cms/packages/core/data-type/workspace/views/details/data-type-details-workspace-view.element.js +2 -3
- package/dist-cms/packages/documents/documents/components/input-document-root-picker/input-document-root-picker.element.js +1 -1
- package/dist-cms/packages/documents/documents/entity-actions/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/entity-actions/index.js +1 -0
- package/dist-cms/packages/documents/documents/entity-actions/manifests.js +2 -13
- package/dist-cms/packages/documents/documents/entity-actions/permissions/permissions-modal.element.js +1 -1
- package/dist-cms/packages/documents/documents/entity-actions/public-access/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/index.js +1 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/manifests.d.ts +2 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/manifests.js +27 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/modal/index.d.ts +2 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/modal/index.js +2 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/modal/public-access-modal.element.d.ts +24 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/modal/public-access-modal.element.js +271 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/modal/public-access-modal.token.d.ts +7 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/modal/public-access-modal.token.js +7 -0
- package/dist-cms/packages/documents/documents/entity-actions/{public-access.action.d.ts → public-access/public-access.action.d.ts} +4 -3
- package/dist-cms/packages/documents/documents/entity-actions/public-access/public-access.action.js +28 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/repository/index.d.ts +2 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/repository/index.js +2 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/repository/manifests.d.ts +3 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/repository/manifests.js +9 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/repository/public-access.repository.d.ts +21 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/repository/public-access.repository.js +67 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/repository/public-access.server.data.d.ts +43 -0
- package/dist-cms/packages/documents/documents/entity-actions/public-access/repository/public-access.server.data.js +74 -0
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +5 -0
- package/package.json +1 -1
- package/dist-cms/packages/documents/documents/entity-actions/public-access.action.js +0 -10
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _UmbDocumentPublicAccessRepository_dataSource, _UmbDocumentPublicAccessRepository_notificationContext;
|
|
13
|
+
import { UmbDocumentPublicAccessServerDataSource } from './public-access.server.data.js';
|
|
14
|
+
import { UmbBaseController } from '../../../../../../libs/class-api/index.js';
|
|
15
|
+
import { UMB_NOTIFICATION_CONTEXT } from '../../../../../core/notification/index.js';
|
|
16
|
+
export class UmbDocumentPublicAccessRepository extends UmbBaseController {
|
|
17
|
+
constructor(host) {
|
|
18
|
+
super(host);
|
|
19
|
+
_UmbDocumentPublicAccessRepository_dataSource.set(this, void 0);
|
|
20
|
+
_UmbDocumentPublicAccessRepository_notificationContext.set(this, void 0);
|
|
21
|
+
__classPrivateFieldSet(this, _UmbDocumentPublicAccessRepository_dataSource, new UmbDocumentPublicAccessServerDataSource(this), "f");
|
|
22
|
+
this.consumeContext(UMB_NOTIFICATION_CONTEXT, (instance) => {
|
|
23
|
+
__classPrivateFieldSet(this, _UmbDocumentPublicAccessRepository_notificationContext, instance, "f");
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
async create(unique, data) {
|
|
27
|
+
if (!unique)
|
|
28
|
+
throw new Error('unique is missing');
|
|
29
|
+
if (!data)
|
|
30
|
+
throw new Error('Data is missing');
|
|
31
|
+
const { error } = await __classPrivateFieldGet(this, _UmbDocumentPublicAccessRepository_dataSource, "f").update(unique, data);
|
|
32
|
+
if (!error) {
|
|
33
|
+
const notification = { data: { message: `Public acccess setting created` } };
|
|
34
|
+
__classPrivateFieldGet(this, _UmbDocumentPublicAccessRepository_notificationContext, "f")?.peek('positive', notification);
|
|
35
|
+
}
|
|
36
|
+
return { error };
|
|
37
|
+
}
|
|
38
|
+
async read(unique) {
|
|
39
|
+
if (!unique)
|
|
40
|
+
throw new Error('unique is missing');
|
|
41
|
+
const { data, error } = await __classPrivateFieldGet(this, _UmbDocumentPublicAccessRepository_dataSource, "f").read(unique);
|
|
42
|
+
return { data, error };
|
|
43
|
+
}
|
|
44
|
+
async update(unique, data) {
|
|
45
|
+
if (!unique)
|
|
46
|
+
throw new Error('unique is missing');
|
|
47
|
+
if (!data)
|
|
48
|
+
throw new Error('Data is missing');
|
|
49
|
+
const { error } = await __classPrivateFieldGet(this, _UmbDocumentPublicAccessRepository_dataSource, "f").update(unique, data);
|
|
50
|
+
if (!error) {
|
|
51
|
+
const notification = { data: { message: `Public acccess setting updated` } };
|
|
52
|
+
__classPrivateFieldGet(this, _UmbDocumentPublicAccessRepository_notificationContext, "f")?.peek('positive', notification);
|
|
53
|
+
}
|
|
54
|
+
return { error };
|
|
55
|
+
}
|
|
56
|
+
async delete(unique) {
|
|
57
|
+
if (!unique)
|
|
58
|
+
throw new Error('unique is missing');
|
|
59
|
+
const { error } = await __classPrivateFieldGet(this, _UmbDocumentPublicAccessRepository_dataSource, "f").delete(unique);
|
|
60
|
+
if (!error) {
|
|
61
|
+
const notification = { data: { message: `Public acccess setting deleted` } };
|
|
62
|
+
__classPrivateFieldGet(this, _UmbDocumentPublicAccessRepository_notificationContext, "f")?.peek('positive', notification);
|
|
63
|
+
}
|
|
64
|
+
return { error };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
_UmbDocumentPublicAccessRepository_dataSource = new WeakMap(), _UmbDocumentPublicAccessRepository_notificationContext = new WeakMap();
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { PublicAccessRequestModel } from '../../../../../../external/backend-api/index.js';
|
|
2
|
+
import type { UmbControllerHost } from '../../../../../../libs/controller-api/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* A data source for the Document Public Access that fetches data from the server
|
|
5
|
+
* @export
|
|
6
|
+
* @class UmbDocumentPublicAccessServerDataSource
|
|
7
|
+
* @implements {RepositoryDetailDataSource}
|
|
8
|
+
*/
|
|
9
|
+
export declare class UmbDocumentPublicAccessServerDataSource {
|
|
10
|
+
#private;
|
|
11
|
+
/**
|
|
12
|
+
* Creates an instance of UmbDocumentPublicAccessServerDataSource.
|
|
13
|
+
* @param {UmbControllerHost} host
|
|
14
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
15
|
+
*/
|
|
16
|
+
constructor(host: UmbControllerHost);
|
|
17
|
+
/**
|
|
18
|
+
* Creates the Public Access for the given Document unique
|
|
19
|
+
* @param {string} unique
|
|
20
|
+
* @param {PublicAccessRequestModel} data
|
|
21
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
22
|
+
*/
|
|
23
|
+
create(unique: string, data: PublicAccessRequestModel): Promise<import("../../../../../core/repository/index.js").DataSourceResponse<string>>;
|
|
24
|
+
/**
|
|
25
|
+
* Fetches the Public Access for the given Document unique
|
|
26
|
+
* @param {string} unique
|
|
27
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
28
|
+
*/
|
|
29
|
+
read(unique: string): Promise<import("../../../../../core/repository/index.js").DataSourceResponse<void>>;
|
|
30
|
+
/**
|
|
31
|
+
* Updates Public Access for the given Document unique
|
|
32
|
+
* @param {string} unique
|
|
33
|
+
* @param {PublicAccessRequestModel} data
|
|
34
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
35
|
+
*/
|
|
36
|
+
update(unique: string, requestBody: PublicAccessRequestModel): Promise<import("../../../../../core/repository/index.js").DataSourceResponse<any>>;
|
|
37
|
+
/**
|
|
38
|
+
* Deletes Public Access for the given Document unique
|
|
39
|
+
* @param {string} unique
|
|
40
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
41
|
+
*/
|
|
42
|
+
delete(unique: string): Promise<import("../../../../../core/repository/index.js").DataSourceResponse<any>>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _UmbDocumentPublicAccessServerDataSource_host;
|
|
13
|
+
import { DocumentResource } from '../../../../../../external/backend-api/index.js';
|
|
14
|
+
import { tryExecuteAndNotify } from '../../../../../../shared/resources/index.js';
|
|
15
|
+
/**
|
|
16
|
+
* A data source for the Document Public Access that fetches data from the server
|
|
17
|
+
* @export
|
|
18
|
+
* @class UmbDocumentPublicAccessServerDataSource
|
|
19
|
+
* @implements {RepositoryDetailDataSource}
|
|
20
|
+
*/
|
|
21
|
+
export class UmbDocumentPublicAccessServerDataSource {
|
|
22
|
+
/**
|
|
23
|
+
* Creates an instance of UmbDocumentPublicAccessServerDataSource.
|
|
24
|
+
* @param {UmbControllerHost} host
|
|
25
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
26
|
+
*/
|
|
27
|
+
constructor(host) {
|
|
28
|
+
_UmbDocumentPublicAccessServerDataSource_host.set(this, void 0);
|
|
29
|
+
__classPrivateFieldSet(this, _UmbDocumentPublicAccessServerDataSource_host, host, "f");
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates the Public Access for the given Document unique
|
|
33
|
+
* @param {string} unique
|
|
34
|
+
* @param {PublicAccessRequestModel} data
|
|
35
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
36
|
+
*/
|
|
37
|
+
async create(unique, data) {
|
|
38
|
+
if (!unique)
|
|
39
|
+
throw new Error('unique is missing');
|
|
40
|
+
return tryExecuteAndNotify(__classPrivateFieldGet(this, _UmbDocumentPublicAccessServerDataSource_host, "f"), DocumentResource.postDocumentByIdPublicAccess({ id: unique, requestBody: data }));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Fetches the Public Access for the given Document unique
|
|
44
|
+
* @param {string} unique
|
|
45
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
46
|
+
*/
|
|
47
|
+
async read(unique) {
|
|
48
|
+
if (!unique)
|
|
49
|
+
throw new Error('unique is missing');
|
|
50
|
+
return tryExecuteAndNotify(__classPrivateFieldGet(this, _UmbDocumentPublicAccessServerDataSource_host, "f"), DocumentResource.getDocumentByIdPublicAccess({ id: unique }));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Updates Public Access for the given Document unique
|
|
54
|
+
* @param {string} unique
|
|
55
|
+
* @param {PublicAccessRequestModel} data
|
|
56
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
57
|
+
*/
|
|
58
|
+
async update(unique, requestBody) {
|
|
59
|
+
if (!unique)
|
|
60
|
+
throw new Error('unique is missing');
|
|
61
|
+
return tryExecuteAndNotify(__classPrivateFieldGet(this, _UmbDocumentPublicAccessServerDataSource_host, "f"), DocumentResource.putDocumentByIdPublicAccess({ id: unique, requestBody }));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Deletes Public Access for the given Document unique
|
|
65
|
+
* @param {string} unique
|
|
66
|
+
* @memberof UmbDocumentPublicAccessServerDataSource
|
|
67
|
+
*/
|
|
68
|
+
async delete(unique) {
|
|
69
|
+
if (!unique)
|
|
70
|
+
throw new Error('unique is missing');
|
|
71
|
+
return tryExecuteAndNotify(__classPrivateFieldGet(this, _UmbDocumentPublicAccessServerDataSource_host, "f"), DocumentResource.deleteDocumentByIdPublicAccess({ id: unique }));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
_UmbDocumentPublicAccessServerDataSource_host = new WeakMap();
|