@esri/hub-common 14.130.1 → 14.131.0
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/esm/content/_internal/ContentUiSchemaSettings.js +63 -44
- package/dist/esm/content/_internal/ContentUiSchemaSettings.js.map +1 -1
- package/dist/node/content/_internal/ContentUiSchemaSettings.js +63 -44
- package/dist/node/content/_internal/ContentUiSchemaSettings.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiSchemaMessageTypes, } from "../../core/schemas/types";
|
|
2
|
+
import { checkPermission } from "../../permissions/checkPermission";
|
|
2
3
|
import { isHostedFeatureServiceEntity } from "../hostedServiceUtils";
|
|
3
4
|
/**
|
|
4
5
|
* @private
|
|
@@ -11,52 +12,70 @@ export const buildUiSchema = async (i18nScope, options, _context) => {
|
|
|
11
12
|
type: "Layout",
|
|
12
13
|
elements: [],
|
|
13
14
|
};
|
|
14
|
-
if (checkPermission("hub:content:workspace:settings:schedule", _context)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{ type: "monthly" },
|
|
35
|
-
{ type: "yearly" },
|
|
36
|
-
{
|
|
37
|
-
type: "manual",
|
|
38
|
-
helperActionIcon: "information-f",
|
|
39
|
-
helperActionText: `{{${i18nScope}.fields.schedule.manual.helperActionText:translate}}`,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
15
|
+
if (checkPermission("hub:content:workspace:settings:schedule", _context).access) {
|
|
16
|
+
const scheduleControlElement = {
|
|
17
|
+
type: "Control",
|
|
18
|
+
scope: "/properties/schedule",
|
|
19
|
+
labelKey: `${i18nScope}.sections.schedule.helperText`,
|
|
20
|
+
options: {
|
|
21
|
+
type: "Control",
|
|
22
|
+
control: "hub-field-input-scheduler",
|
|
23
|
+
labelKey: "fieldHeader",
|
|
24
|
+
format: "radio",
|
|
25
|
+
inputs: [
|
|
26
|
+
{ type: "automatic" },
|
|
27
|
+
{ type: "daily" },
|
|
28
|
+
{ type: "weekly" },
|
|
29
|
+
{ type: "monthly" },
|
|
30
|
+
{ type: "yearly" },
|
|
31
|
+
{
|
|
32
|
+
type: "manual",
|
|
33
|
+
helperActionIcon: "information-f",
|
|
34
|
+
helperActionText: `{{${i18nScope}.fields.schedule.manual.helperActionText:translate}}`,
|
|
42
35
|
},
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const scheduleSectionElements = [
|
|
40
|
+
scheduleControlElement,
|
|
41
|
+
];
|
|
42
|
+
if (options.access !== "public") {
|
|
43
|
+
// Disable the schedule control and add the unavailable notice
|
|
44
|
+
scheduleControlElement.options.disabled = true;
|
|
45
|
+
scheduleControlElement.options.messages = [
|
|
45
46
|
{
|
|
46
|
-
type:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
descriptions: [
|
|
55
|
-
`{{${i18nScope}.fields.schedule.forceUpdateButton.description:translate}}`,
|
|
56
|
-
],
|
|
57
|
-
},
|
|
47
|
+
type: UiSchemaMessageTypes.custom,
|
|
48
|
+
display: "notice",
|
|
49
|
+
kind: "warning",
|
|
50
|
+
icon: "exclamation-mark-triangle",
|
|
51
|
+
titleKey: `${i18nScope}.fields.schedule.unavailableNotice.title`,
|
|
52
|
+
labelKey: `${i18nScope}.fields.schedule.unavailableNotice.body`,
|
|
53
|
+
allowShowBeforeInteract: true,
|
|
54
|
+
alwaysShow: true,
|
|
58
55
|
},
|
|
59
|
-
]
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
// force update checkbox -- TODO: replace with button once available
|
|
60
|
+
scheduleSectionElements.push({
|
|
61
|
+
type: "Control",
|
|
62
|
+
scope: "/properties/_forceUpdate",
|
|
63
|
+
options: {
|
|
64
|
+
control: "hub-field-input-tile-select",
|
|
65
|
+
type: "checkbox",
|
|
66
|
+
labels: [
|
|
67
|
+
`{{${i18nScope}.fields.schedule.forceUpdateButton.label:translate}}`,
|
|
68
|
+
],
|
|
69
|
+
descriptions: [
|
|
70
|
+
`{{${i18nScope}.fields.schedule.forceUpdateButton.description:translate}}`,
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
uiSchema.elements.push({
|
|
76
|
+
type: "Section",
|
|
77
|
+
labelKey: `${i18nScope}.sections.schedule.label`,
|
|
78
|
+
elements: scheduleSectionElements,
|
|
60
79
|
});
|
|
61
80
|
}
|
|
62
81
|
if (isHostedFeatureServiceEntity(options)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentUiSchemaSettings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentUiSchemaSettings.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAA4B,EAC5B,QAAwB,EACJ,EAAE;IACtB,MAAM,QAAQ,GAAc;QAC1B,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,EAAE;KACb,CAAC;IACF,IACE,eAAe,CAAC,yCAAyC,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jC,OAAO,EAAE;oBACP,OAAO,EAAE,6BAA6B;oBACtC,IAAI,EAAE,UAAU;oBAChB,MAAM,EAAE;wBACN,KAAK,SAAS,sDAAsD;qBACrE;oBACD,YAAY,EAAE;wBACZ,KAAK,SAAS,4DAA4D;qBAC3E;iBACF;aACF,CAAC,CAAC;SACJ;QAED,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;YACrB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,GAAG,SAAS,0BAA0B;YAChD,QAAQ,EAAE,uBAAuB;SAClC,CAAC,CAAC;KACJ;IAED,IAAI,4BAA4B,CAAC,OAA8B,CAAC,EAAE;QAChE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;YACrB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,GAAG,SAAS,2BAA2B;YACjD,OAAO,EAAE;gBACP,UAAU,EAAE;oBACV,QAAQ,EAAE,GAAG,SAAS,gCAAgC;iBACvD;aACF;YACD,QAAQ,EAAE;gBACR;oBACE,QAAQ,EAAE,GAAG,SAAS,uCAAuC;oBAC7D,KAAK,EAAE,qCAAqC;oBAC5C,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,UAAU,EAAE;4BACV,QAAQ,EAAE,GAAG,SAAS,4CAA4C;yBACnE;qBACF;iBACF;aACF;SACF,CAAC,CAAC;KACJ;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildUiSchema = void 0;
|
|
4
|
-
const
|
|
4
|
+
const types_1 = require("../../core/schemas/types");
|
|
5
|
+
const checkPermission_1 = require("../../permissions/checkPermission");
|
|
5
6
|
const hostedServiceUtils_1 = require("../hostedServiceUtils");
|
|
6
7
|
/**
|
|
7
8
|
* @private
|
|
@@ -14,52 +15,70 @@ exports.buildUiSchema = async (i18nScope, options, _context) => {
|
|
|
14
15
|
type: "Layout",
|
|
15
16
|
elements: [],
|
|
16
17
|
};
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{ type: "monthly" },
|
|
38
|
-
{ type: "yearly" },
|
|
39
|
-
{
|
|
40
|
-
type: "manual",
|
|
41
|
-
helperActionIcon: "information-f",
|
|
42
|
-
helperActionText: `{{${i18nScope}.fields.schedule.manual.helperActionText:translate}}`,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
18
|
+
if (checkPermission_1.checkPermission("hub:content:workspace:settings:schedule", _context).access) {
|
|
19
|
+
const scheduleControlElement = {
|
|
20
|
+
type: "Control",
|
|
21
|
+
scope: "/properties/schedule",
|
|
22
|
+
labelKey: `${i18nScope}.sections.schedule.helperText`,
|
|
23
|
+
options: {
|
|
24
|
+
type: "Control",
|
|
25
|
+
control: "hub-field-input-scheduler",
|
|
26
|
+
labelKey: "fieldHeader",
|
|
27
|
+
format: "radio",
|
|
28
|
+
inputs: [
|
|
29
|
+
{ type: "automatic" },
|
|
30
|
+
{ type: "daily" },
|
|
31
|
+
{ type: "weekly" },
|
|
32
|
+
{ type: "monthly" },
|
|
33
|
+
{ type: "yearly" },
|
|
34
|
+
{
|
|
35
|
+
type: "manual",
|
|
36
|
+
helperActionIcon: "information-f",
|
|
37
|
+
helperActionText: `{{${i18nScope}.fields.schedule.manual.helperActionText:translate}}`,
|
|
45
38
|
},
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const scheduleSectionElements = [
|
|
43
|
+
scheduleControlElement,
|
|
44
|
+
];
|
|
45
|
+
if (options.access !== "public") {
|
|
46
|
+
// Disable the schedule control and add the unavailable notice
|
|
47
|
+
scheduleControlElement.options.disabled = true;
|
|
48
|
+
scheduleControlElement.options.messages = [
|
|
48
49
|
{
|
|
49
|
-
type:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
descriptions: [
|
|
58
|
-
`{{${i18nScope}.fields.schedule.forceUpdateButton.description:translate}}`,
|
|
59
|
-
],
|
|
60
|
-
},
|
|
50
|
+
type: types_1.UiSchemaMessageTypes.custom,
|
|
51
|
+
display: "notice",
|
|
52
|
+
kind: "warning",
|
|
53
|
+
icon: "exclamation-mark-triangle",
|
|
54
|
+
titleKey: `${i18nScope}.fields.schedule.unavailableNotice.title`,
|
|
55
|
+
labelKey: `${i18nScope}.fields.schedule.unavailableNotice.body`,
|
|
56
|
+
allowShowBeforeInteract: true,
|
|
57
|
+
alwaysShow: true,
|
|
61
58
|
},
|
|
62
|
-
]
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
// force update checkbox -- TODO: replace with button once available
|
|
63
|
+
scheduleSectionElements.push({
|
|
64
|
+
type: "Control",
|
|
65
|
+
scope: "/properties/_forceUpdate",
|
|
66
|
+
options: {
|
|
67
|
+
control: "hub-field-input-tile-select",
|
|
68
|
+
type: "checkbox",
|
|
69
|
+
labels: [
|
|
70
|
+
`{{${i18nScope}.fields.schedule.forceUpdateButton.label:translate}}`,
|
|
71
|
+
],
|
|
72
|
+
descriptions: [
|
|
73
|
+
`{{${i18nScope}.fields.schedule.forceUpdateButton.description:translate}}`,
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
uiSchema.elements.push({
|
|
79
|
+
type: "Section",
|
|
80
|
+
labelKey: `${i18nScope}.sections.schedule.label`,
|
|
81
|
+
elements: scheduleSectionElements,
|
|
63
82
|
});
|
|
64
83
|
}
|
|
65
84
|
if (hostedServiceUtils_1.isHostedFeatureServiceEntity(options)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentUiSchemaSettings.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ContentUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentUiSchemaSettings.ts"],"names":[],"mappings":";;;AAEA,oDAKkC;AAElC,uEAAoE;AACpE,8DAAqE;AAErE;;;;;GAKG;AACU,QAAA,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAA4B,EAC5B,QAAwB,EACJ,EAAE;IACtB,MAAM,QAAQ,GAAc;QAC1B,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,EAAE;KACb,CAAC;IACF,IACE,iCAAe,CAAC,yCAAyC,EAAE,QAAQ,CAAC,CAAC,MAAM,EAC3E;QACA,MAAM,sBAAsB,GAAqB;YAC/C,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,sBAAsB;YAC7B,QAAQ,EAAE,GAAG,SAAS,+BAA+B;YACrD,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,aAAa;gBACvB,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE;oBACN,EAAE,IAAI,EAAE,WAAW,EAAE;oBACrB,EAAE,IAAI,EAAE,OAAO,EAAE;oBACjB,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAClB,EAAE,IAAI,EAAE,SAAS,EAAE;oBACnB,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAClB;wBACE,IAAI,EAAE,QAAQ;wBACd,gBAAgB,EAAE,eAAe;wBACjC,gBAAgB,EAAE,KAAK,SAAS,sDAAsD;qBACvF;iBACF;aACF;SACF,CAAC;QAEF,MAAM,uBAAuB,GAAuB;YAClD,sBAAsB;SACvB,CAAC;QAEF,IAAI,OA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