@esri/hub-common 14.109.1 → 14.110.1
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/ContentBusinessRules.js +5 -0
- package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/esm/core/schemas/internal/follow/FollowCardUiSchema.js +98 -63
- package/dist/esm/core/schemas/internal/follow/FollowCardUiSchema.js.map +1 -1
- package/dist/esm/core/schemas/internal/follow/FollowSchema.js +2 -7
- package/dist/esm/core/schemas/internal/follow/FollowSchema.js.map +1 -1
- package/dist/esm/initiatives/_internal/computeProps.js +3 -3
- package/dist/esm/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/esm/initiatives/_internal/getPropertyMap.js +5 -0
- package/dist/esm/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/content/_internal/ContentBusinessRules.js +5 -0
- package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/node/core/schemas/internal/follow/FollowCardUiSchema.js +98 -63
- package/dist/node/core/schemas/internal/follow/FollowCardUiSchema.js.map +1 -1
- package/dist/node/core/schemas/internal/follow/FollowSchema.js +2 -7
- package/dist/node/core/schemas/internal/follow/FollowSchema.js.map +1 -1
- package/dist/node/initiatives/_internal/computeProps.js +3 -3
- package/dist/node/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/node/initiatives/_internal/getPropertyMap.js +5 -0
- package/dist/node/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/types/content/_internal/ContentBusinessRules.d.ts +1 -1
- package/dist/types/core/schemas/internal/follow/FollowCardUiSchema.d.ts +0 -5
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ export const ContentPermissions = [
|
|
|
23
23
|
"hub:content:workspace:settings",
|
|
24
24
|
"hub:content:workspace:collaborators",
|
|
25
25
|
"hub:content:manage",
|
|
26
|
+
"hub:content:canRecordDownloadErrors",
|
|
26
27
|
];
|
|
27
28
|
/**
|
|
28
29
|
* Content permission policies
|
|
@@ -112,5 +113,9 @@ export const ContentPermissionPolicies = [
|
|
|
112
113
|
permission: "hub:content:manage",
|
|
113
114
|
dependencies: ["hub:content:edit"],
|
|
114
115
|
},
|
|
116
|
+
{
|
|
117
|
+
permission: "hub:content:canRecordDownloadErrors",
|
|
118
|
+
environments: ["qaext", "devext"],
|
|
119
|
+
},
|
|
115
120
|
];
|
|
116
121
|
//# sourceMappingURL=ContentBusinessRules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBusinessRules.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentBusinessRules.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;AACnD,mEAAmE;CACpE,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,6BAA6B;IAC7B,uBAAuB;IACvB,gCAAgC;IAChC,iCAAiC;IACjC,+BAA+B;IAC/B,kCAAkC;IAClC,gCAAgC;IAChC,qCAAqC;IACrC,oBAAoB;
|
|
1
|
+
{"version":3,"file":"ContentBusinessRules.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentBusinessRules.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;AACnD,mEAAmE;CACpE,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,6BAA6B;IAC7B,uBAAuB;IACvB,gCAAgC;IAChC,iCAAiC;IACjC,+BAA+B;IAC/B,kCAAkC;IAClC,gCAAgC;IAChC,qCAAqC;IACrC,oBAAoB;IACpB,qCAAqC;CAC7B,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GA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,EAAE,+BAA+B;QAC3C,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,kCAAkC;QAC9C,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,gCAAgC;QAC5C,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,oBAAoB;QAChC,YAAY,EAAE,CAAC,kBAAkB,CAAC;KACnC;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;KAClC;CACF,CAAC"}
|
|
@@ -1,88 +1,123 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { UiSchemaRuleEffects } from "../../types";
|
|
2
|
+
import { getWellKnownCatalog, } from "../../../../search/wellKnownCatalog";
|
|
3
|
+
// Get the catalogs for the entity gallery picker
|
|
4
|
+
function getCatalogs(user) {
|
|
5
|
+
const catalogNames = [
|
|
6
|
+
"myContent",
|
|
7
|
+
"favorites",
|
|
8
|
+
"organization",
|
|
9
|
+
];
|
|
10
|
+
return catalogNames.map((name) => {
|
|
11
|
+
const opts = {
|
|
12
|
+
user,
|
|
13
|
+
collectionNames: ["site"],
|
|
14
|
+
};
|
|
15
|
+
const catalog = getWellKnownCatalog("selectContent.facets", name, "item", opts);
|
|
16
|
+
return catalog;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
6
19
|
export const buildUiSchema = (i18nScope, config, context) => {
|
|
7
20
|
return {
|
|
8
21
|
type: "Layout",
|
|
9
22
|
elements: [
|
|
10
23
|
{
|
|
11
|
-
|
|
24
|
+
labelKey: "selectContent.title",
|
|
12
25
|
scope: "/properties/entityId",
|
|
13
26
|
type: "Control",
|
|
14
27
|
options: {
|
|
15
28
|
control: "hub-field-input-gallery-picker",
|
|
16
29
|
targetEntity: "item",
|
|
17
|
-
catalogs:
|
|
30
|
+
catalogs: getCatalogs(context.currentUser),
|
|
31
|
+
facets: [
|
|
18
32
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
predicates: [
|
|
27
|
-
{
|
|
28
|
-
type: "Hub Site Application",
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
33
|
+
label: "{{selectContent.facets.sharing:translate}}",
|
|
34
|
+
key: "access",
|
|
35
|
+
display: "multi-select",
|
|
36
|
+
field: "access",
|
|
37
|
+
options: [],
|
|
38
|
+
operation: "OR",
|
|
35
39
|
},
|
|
36
40
|
],
|
|
37
41
|
},
|
|
38
42
|
},
|
|
39
43
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{
|
|
63
|
-
label: "Unfollow",
|
|
64
|
-
scope: "/properties/unfollowButtonText",
|
|
65
|
-
type: "Control",
|
|
44
|
+
type: "Section",
|
|
45
|
+
labelKey: "callToAction.title",
|
|
46
|
+
rule: HIDE_FOR_NO_ENTITY_ID,
|
|
47
|
+
elements: [
|
|
48
|
+
{
|
|
49
|
+
labelKey: "callToAction.description",
|
|
50
|
+
scope: "/properties/callToActionText",
|
|
51
|
+
type: "Control",
|
|
52
|
+
options: {
|
|
53
|
+
type: "textarea",
|
|
54
|
+
rows: 4,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
labelKey: "callToAction.alignment",
|
|
59
|
+
scope: "/properties/callToActionAlign",
|
|
60
|
+
type: "Control",
|
|
61
|
+
options: {
|
|
62
|
+
control: "hub-field-input-alignment",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
type: "Control",
|
|
68
|
+
type: "Section",
|
|
69
|
+
labelKey: "followButton.title",
|
|
71
70
|
options: {
|
|
72
|
-
|
|
73
|
-
layout: "inline-space-between",
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: "Button Style",
|
|
78
|
-
scope: "/properties/buttonStyle",
|
|
79
|
-
type: "Control",
|
|
80
|
-
options: {
|
|
81
|
-
control: "hub-field-input-select",
|
|
82
|
-
labels: ["Solid Background", "Outline"],
|
|
71
|
+
labelKey: "followButton.description",
|
|
83
72
|
},
|
|
73
|
+
rule: HIDE_FOR_NO_ENTITY_ID,
|
|
74
|
+
elements: [
|
|
75
|
+
{
|
|
76
|
+
labelKey: "followButton.buttonText",
|
|
77
|
+
scope: "/properties/buttonText",
|
|
78
|
+
type: "Control",
|
|
79
|
+
options: {
|
|
80
|
+
control: "hub-field-input-input",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
labelKey: "followButton.unfollowButtonText",
|
|
85
|
+
scope: "/properties/unfollowButtonText",
|
|
86
|
+
type: "Control",
|
|
87
|
+
options: {
|
|
88
|
+
control: "hub-field-input-input",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
labelKey: "followButton.alignment",
|
|
93
|
+
scope: "/properties/buttonAlign",
|
|
94
|
+
type: "Control",
|
|
95
|
+
options: {
|
|
96
|
+
control: "hub-field-input-alignment",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
labelKey: "followButton.buttonStyle",
|
|
101
|
+
scope: "/properties/buttonStyle",
|
|
102
|
+
type: "Control",
|
|
103
|
+
options: {
|
|
104
|
+
control: "hub-field-input-select",
|
|
105
|
+
labels: [
|
|
106
|
+
"{{followButton.solid:translate}}",
|
|
107
|
+
"{{followButton.outline:translate}}",
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
],
|
|
84
112
|
},
|
|
85
113
|
],
|
|
86
114
|
};
|
|
87
115
|
};
|
|
116
|
+
const HIDE_FOR_NO_ENTITY_ID = {
|
|
117
|
+
effect: UiSchemaRuleEffects.HIDE,
|
|
118
|
+
condition: {
|
|
119
|
+
scope: "/properties/entityId",
|
|
120
|
+
schema: { const: [] },
|
|
121
|
+
},
|
|
122
|
+
};
|
|
88
123
|
//# sourceMappingURL=FollowCardUiSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowCardUiSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/follow/FollowCardUiSchema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FollowCardUiSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/follow/FollowCardUiSchema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAGL,mBAAmB,GACpB,MAAM,qCAAqC,CAAC;AAI7C,iDAAiD;AACjD,SAAS,WAAW,CAAC,IAAW;IAC9B,MAAM,YAAY,GAAuB;QACvC,WAAW;QACX,WAAW;QACX,cAAc;KACf,CAAC;IACF,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,IAAsB,EAAE,EAAE;QACjD,MAAM,IAAI,GAAG;YACX,IAAI;YACJ,eAAe,EAAE,CAAC,MAA6B,CAAC;SACjD,CAAC;QACF,MAAM,OAAO,GAAG,mBAAmB,CACjC,sBAAsB,EACtB,IAAI,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AAE;oBACR;wBACE,QAAQ,EAAE,yBAAyB;wBACnC,KAAK,EAAE,wBAAwB;wBAC/B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,uBAAuB;yBACjC;qBACF;oBACD;wBACE,QAAQ,EAAE,iCAAiC;wBAC3C,KAAK,EAAE,gCAAgC;wBACvC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,uBAAuB;yBACjC;qBACF;oBACD;wBACE,QAAQ,EAAE,wBAAwB;wBAClC,KAAK,EAAE,yBAAyB;wBAChC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,2BAA2B;yBACrC;qBACF;oBACD;wBACE,QAAQ,EAAE,0BAA0B;wBACpC,KAAK,EAAE,yBAAyB;wBAChC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,wBAAwB;4BACjC,MAAM,EAAE;gCACN,kCAAkC;gCAClC,oCAAoC;6BACrC;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,MAAM,EAAE,mBAAmB,CAAC,IAAI;IAChC,SAAS,EAAE;QACT,KAAK,EAAE,sBAAsB;QAC7B,MAAM,EAAE,EAAE,KAAK,EAAE,EAAS,EAAE;KAC7B;CACF,CAAC"}
|
|
@@ -2,20 +2,15 @@ export const FollowSchema = {
|
|
|
2
2
|
type: "object",
|
|
3
3
|
required: [],
|
|
4
4
|
properties: {
|
|
5
|
-
|
|
5
|
+
entityId: {
|
|
6
6
|
type: "array",
|
|
7
7
|
items: {
|
|
8
8
|
type: "string",
|
|
9
9
|
},
|
|
10
|
-
maxItems:
|
|
11
|
-
default: [],
|
|
12
|
-
},
|
|
13
|
-
entityId: {
|
|
14
|
-
type: "string",
|
|
10
|
+
maxItems: 1,
|
|
15
11
|
},
|
|
16
12
|
callToActionText: {
|
|
17
13
|
type: "string",
|
|
18
|
-
default: "By following this site you will get updates about new events, surveys, and tools that you can use to help us achieve our goals.",
|
|
19
14
|
},
|
|
20
15
|
callToActionAlign: {
|
|
21
16
|
enum: ["start", "center", "end"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/follow/FollowSchema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAyB;IAChD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE;QACV,
|
|
1
|
+
{"version":3,"file":"FollowSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/follow/FollowSchema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAyB;IAChD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE,CAAC;SACZ;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;SACf;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC;YAChC,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,QAAQ;SACf;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,QAAQ;SAClB;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,UAAU;SACpB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC;YAChC,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;YAC1B,OAAO,EAAE,OAAO;SACjB;KACF;CACF,CAAC"}
|
|
@@ -13,7 +13,7 @@ import { computeBaseProps } from "../../core/_internal/computeBaseProps";
|
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
15
|
export function computeProps(model, initiative, requestOptions) {
|
|
16
|
-
var _a;
|
|
16
|
+
var _a, _b;
|
|
17
17
|
let token;
|
|
18
18
|
if (requestOptions.authentication) {
|
|
19
19
|
const session = requestOptions.authentication;
|
|
@@ -23,7 +23,7 @@ export function computeProps(model, initiative, requestOptions) {
|
|
|
23
23
|
initiative = computeBaseProps(model.item, initiative);
|
|
24
24
|
// thumbnail url
|
|
25
25
|
initiative.thumbnailUrl = getItemThumbnailUrl(model.item, requestOptions, token);
|
|
26
|
-
initiative.view = Object.assign(Object.assign({}, model.data.view), { featuredImageUrl: model.data.view.featuredImageUrl });
|
|
26
|
+
initiative.view = Object.assign(Object.assign({}, model.data.view), { featuredImageUrl: (_a = model.data.view) === null || _a === void 0 ? void 0 : _a.featuredImageUrl });
|
|
27
27
|
// Handle Dates
|
|
28
28
|
initiative.createdDate = new Date(model.item.created);
|
|
29
29
|
initiative.createdDateSource = "item.created";
|
|
@@ -33,7 +33,7 @@ export function computeProps(model, initiative, requestOptions) {
|
|
|
33
33
|
/**
|
|
34
34
|
* Features that can be disabled by the entity owner
|
|
35
35
|
*/
|
|
36
|
-
initiative.features = processEntityFeatures(((
|
|
36
|
+
initiative.features = processEntityFeatures(((_b = model.data.settings) === null || _b === void 0 ? void 0 : _b.features) || {}, InitiativeDefaultFeatures);
|
|
37
37
|
initiative.links = computeLinks(model.item, requestOptions);
|
|
38
38
|
// cast b/c this takes a partial but returns a full object
|
|
39
39
|
return initiative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeProps.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/computeProps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AA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ityKey: "permissions", storeKey: "data.permissions" });
|
|
14
14
|
map.push({ entityKey: "contacts", storeKey: "data.contacts" });
|
|
15
15
|
map.push({ entityKey: "timeline", storeKey: "data.timeline" });
|
|
16
|
+
// Deeper/Indirect mappings
|
|
16
17
|
map.push({ entityKey: "metrics", storeKey: "item.properties.metrics" });
|
|
17
18
|
map.push({
|
|
18
19
|
entityKey: "location",
|
|
19
20
|
storeKey: "item.properties.location",
|
|
20
21
|
});
|
|
22
|
+
map.push({
|
|
23
|
+
entityKey: "followersGroupId",
|
|
24
|
+
storeKey: "item.properties.followersGroupId",
|
|
25
|
+
});
|
|
21
26
|
map.push({
|
|
22
27
|
entityKey: "features",
|
|
23
28
|
storeKey: "data.settings.features",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPropertyMap.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/getPropertyMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E;;;;;GAKG;AAEH,MAAM,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,kBAAkB,EAAE,CAAC;IAEjC,yBAAyB;IACzB,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAC;IAC3D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAErE,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;
|
|
1
|
+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
|
|
26
26
|
"hub:content:workspace:settings",
|
|
27
27
|
"hub:content:workspace:collaborators",
|
|
28
28
|
"hub:content:manage",
|
|
29
|
+
"hub:content:canRecordDownloadErrors",
|
|
29
30
|
];
|
|
30
31
|
/**
|
|
31
32
|
* Content permission policies
|
|
@@ -115,5 +116,9 @@ exports.ContentPermissionPolicies = [
|
|
|
115
116
|
permission: "hub:content:manage",
|
|
116
117
|
dependencies: ["hub:content:edit"],
|
|
117
118
|
},
|
|
119
|
+
{
|
|
120
|
+
permission: "hub:content:canRecordDownloadErrors",
|
|
121
|
+
environments: ["qaext", "devext"],
|
|
122
|
+
},
|
|
118
123
|
];
|
|
119
124
|
//# sourceMappingURL=ContentBusinessRules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBusinessRules.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentBusinessRules.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,sBAAsB,GAAkB;AACnD,mEAAmE;CACpE,CAAC;AAEF;;;;GAIG;AACU,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,6BAA6B;IAC7B,uBAAuB;IACvB,gCAAgC;IAChC,iCAAiC;IACjC,+BAA+B;IAC/B,kCAAkC;IAClC,gCAAgC;IAChC,qCAAqC;IACrC,oBAAoB;
|
|
1
|
+
{"version":3,"file":"ContentBusinessRules.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentBusinessRules.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,sBAAsB,GAAkB;AACnD,mEAAmE;CACpE,CAAC;AAEF;;;;GAIG;AACU,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,6BAA6B;IAC7B,uBAAuB;IACvB,gCAAgC;IAChC,iCAAiC;IACjC,+BAA+B;IAC/B,kCAAkC;IAClC,gC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ACE,UAAU,EAAE,iCAAiC;QAC7C,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,+BAA+B;QAC3C,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,kCAAkC;QAC9C,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,gCAAgC;QAC5C,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,oBAAoB;QAChC,YAAY,EAAE,CAAC,kBAAkB,CAAC;KACnC;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;KAClC;CACF,CAAC"}
|
|
@@ -1,91 +1,126 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildUiSchema = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const types_1 = require("../../types");
|
|
5
|
+
const wellKnownCatalog_1 = require("../../../../search/wellKnownCatalog");
|
|
6
|
+
// Get the catalogs for the entity gallery picker
|
|
7
|
+
function getCatalogs(user) {
|
|
8
|
+
const catalogNames = [
|
|
9
|
+
"myContent",
|
|
10
|
+
"favorites",
|
|
11
|
+
"organization",
|
|
12
|
+
];
|
|
13
|
+
return catalogNames.map((name) => {
|
|
14
|
+
const opts = {
|
|
15
|
+
user,
|
|
16
|
+
collectionNames: ["site"],
|
|
17
|
+
};
|
|
18
|
+
const catalog = wellKnownCatalog_1.getWellKnownCatalog("selectContent.facets", name, "item", opts);
|
|
19
|
+
return catalog;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
9
22
|
exports.buildUiSchema = (i18nScope, config, context) => {
|
|
10
23
|
return {
|
|
11
24
|
type: "Layout",
|
|
12
25
|
elements: [
|
|
13
26
|
{
|
|
14
|
-
|
|
27
|
+
labelKey: "selectContent.title",
|
|
15
28
|
scope: "/properties/entityId",
|
|
16
29
|
type: "Control",
|
|
17
30
|
options: {
|
|
18
31
|
control: "hub-field-input-gallery-picker",
|
|
19
32
|
targetEntity: "item",
|
|
20
|
-
catalogs:
|
|
33
|
+
catalogs: getCatalogs(context.currentUser),
|
|
34
|
+
facets: [
|
|
21
35
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
predicates: [
|
|
30
|
-
{
|
|
31
|
-
type: "Hub Site Application",
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
},
|
|
36
|
+
label: "{{selectContent.facets.sharing:translate}}",
|
|
37
|
+
key: "access",
|
|
38
|
+
display: "multi-select",
|
|
39
|
+
field: "access",
|
|
40
|
+
options: [],
|
|
41
|
+
operation: "OR",
|
|
38
42
|
},
|
|
39
43
|
],
|
|
40
44
|
},
|
|
41
45
|
},
|
|
42
46
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{
|
|
66
|
-
label: "Unfollow",
|
|
67
|
-
scope: "/properties/unfollowButtonText",
|
|
68
|
-
type: "Control",
|
|
47
|
+
type: "Section",
|
|
48
|
+
labelKey: "callToAction.title",
|
|
49
|
+
rule: HIDE_FOR_NO_ENTITY_ID,
|
|
50
|
+
elements: [
|
|
51
|
+
{
|
|
52
|
+
labelKey: "callToAction.description",
|
|
53
|
+
scope: "/properties/callToActionText",
|
|
54
|
+
type: "Control",
|
|
55
|
+
options: {
|
|
56
|
+
type: "textarea",
|
|
57
|
+
rows: 4,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
labelKey: "callToAction.alignment",
|
|
62
|
+
scope: "/properties/callToActionAlign",
|
|
63
|
+
type: "Control",
|
|
64
|
+
options: {
|
|
65
|
+
control: "hub-field-input-alignment",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
type: "Control",
|
|
71
|
+
type: "Section",
|
|
72
|
+
labelKey: "followButton.title",
|
|
74
73
|
options: {
|
|
75
|
-
|
|
76
|
-
layout: "inline-space-between",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
label: "Button Style",
|
|
81
|
-
scope: "/properties/buttonStyle",
|
|
82
|
-
type: "Control",
|
|
83
|
-
options: {
|
|
84
|
-
control: "hub-field-input-select",
|
|
85
|
-
labels: ["Solid Background", "Outline"],
|
|
74
|
+
labelKey: "followButton.description",
|
|
86
75
|
},
|
|
76
|
+
rule: HIDE_FOR_NO_ENTITY_ID,
|
|
77
|
+
elements: [
|
|
78
|
+
{
|
|
79
|
+
labelKey: "followButton.buttonText",
|
|
80
|
+
scope: "/properties/buttonText",
|
|
81
|
+
type: "Control",
|
|
82
|
+
options: {
|
|
83
|
+
control: "hub-field-input-input",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
labelKey: "followButton.unfollowButtonText",
|
|
88
|
+
scope: "/properties/unfollowButtonText",
|
|
89
|
+
type: "Control",
|
|
90
|
+
options: {
|
|
91
|
+
control: "hub-field-input-input",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
labelKey: "followButton.alignment",
|
|
96
|
+
scope: "/properties/buttonAlign",
|
|
97
|
+
type: "Control",
|
|
98
|
+
options: {
|
|
99
|
+
control: "hub-field-input-alignment",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
labelKey: "followButton.buttonStyle",
|
|
104
|
+
scope: "/properties/buttonStyle",
|
|
105
|
+
type: "Control",
|
|
106
|
+
options: {
|
|
107
|
+
control: "hub-field-input-select",
|
|
108
|
+
labels: [
|
|
109
|
+
"{{followButton.solid:translate}}",
|
|
110
|
+
"{{followButton.outline:translate}}",
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
],
|
|
87
115
|
},
|
|
88
116
|
],
|
|
89
117
|
};
|
|
90
118
|
};
|
|
119
|
+
const HIDE_FOR_NO_ENTITY_ID = {
|
|
120
|
+
effect: types_1.UiSchemaRuleEffects.HIDE,
|
|
121
|
+
condition: {
|
|
122
|
+
scope: "/properties/entityId",
|
|
123
|
+
schema: { const: [] },
|
|
124
|
+
},
|
|
125
|
+
};
|
|
91
126
|
//# sourceMappingURL=FollowCardUiSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowCardUiSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/follow/FollowCardUiSchema.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"FollowCardUiSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/follow/FollowCardUiSchema.ts"],"names":[],"mappings":";;;AAEA,uCAA6D;AAC7D,0EAI6C;AAI7C,iDAAiD;AACjD,SAAS,WAAW,CAAC,IAAW;IAC9B,MAAM,YAAY,GAAuB;QACvC,WAAW;QACX,WAAW;QACX,cAAc;KACf,CAAC;IACF,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,IAAsB,EAAE,EAAE;QACjD,MAAM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QAAQ,EAAE,oBAAoB;gBAC9B,OAAO,EAAE;oBACP,QAAQ,EAAE,0BAA0B;iBACrC;gBACD,IAAI,EAAE,qBAAqB;gBAC3B,QAAQ,EAAE;oBACR;wBACE,QAAQ,EAAE,yBAAyB;wBACnC,KAAK,EAAE,wBAAwB;wBAC/B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,uBAAuB;yBACjC;qBACF;oBACD;wBACE,QAAQ,EAAE,iCAAiC;wBAC3C,KAAK,EAAE,gCAAgC;wBACvC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,uBAAuB;yBACjC;qBACF;oBACD;wBACE,QAAQ,EAAE,wBAAwB;wBAClC,KAAK,EAAE,yBAAyB;wBAChC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,2BAA2B;yBACrC;qBACF;oBACD;wBACE,QAAQ,EAAE,0BAA0B;wBACpC,KAAK,EAAE,yBAAyB;wBAChC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,wBAAwB;4BACjC,MAAM,EAAE;gCACN,kCAAkC;gCAClC,oCAAoC;6BACrC;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,MAAM,EAAE,2BAAmB,CAAC,IAAI;IAChC,SAAS,EAAE;QACT,KAAK,EAAE,sBAAsB;QAC7B,MAAM,EAAE,EAAE,KAAK,EAAE,EAAS,EAAE;KAC7B;CACF,CAAC"}
|
|
@@ -5,20 +5,15 @@ exports.FollowSchema = {
|
|
|
5
5
|
type: "object",
|
|
6
6
|
required: [],
|
|
7
7
|
properties: {
|
|
8
|
-
|
|
8
|
+
entityId: {
|
|
9
9
|
type: "array",
|
|
10
10
|
items: {
|
|
11
11
|
type: "string",
|
|
12
12
|
},
|
|
13
|
-
maxItems:
|
|
14
|
-
default: [],
|
|
15
|
-
},
|
|
16
|
-
entityId: {
|
|
17
|
-
type: "string",
|
|
13
|
+
maxItems: 1,
|
|
18
14
|
},
|
|
19
15
|
callToActionText: {
|
|
20
16
|
type: "string",
|
|
21
|
-
default: "By following this site you will get updates about new events, surveys, and tools that you can use to help us achieve our goals.",
|
|
22
17
|
},
|
|
23
18
|
callToActionAlign: {
|
|
24
19
|
enum: ["start", "center", "end"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/follow/FollowSchema.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAyB;IAChD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE;QACV,
|
|
1
|
+
{"version":3,"file":"FollowSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/follow/FollowSchema.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAyB;IAChD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE,CAAC;SACZ;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;SACf;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC;YAChC,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,QAAQ;SACf;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,QAAQ;SAClB;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,UAAU;SACpB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC;YAChC,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;YAC1B,OAAO,EAAE,OAAO;SACjB;KACF;CACF,CAAC"}
|
|
@@ -16,7 +16,7 @@ const computeBaseProps_1 = require("../../core/_internal/computeBaseProps");
|
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
18
|
function computeProps(model, initiative, requestOptions) {
|
|
19
|
-
var _a;
|
|
19
|
+
var _a, _b;
|
|
20
20
|
let token;
|
|
21
21
|
if (requestOptions.authentication) {
|
|
22
22
|
const session = requestOptions.authentication;
|
|
@@ -26,7 +26,7 @@ function computeProps(model, initiative, requestOptions) {
|
|
|
26
26
|
initiative = computeBaseProps_1.computeBaseProps(model.item, initiative);
|
|
27
27
|
// thumbnail url
|
|
28
28
|
initiative.thumbnailUrl = resources_1.getItemThumbnailUrl(model.item, requestOptions, token);
|
|
29
|
-
initiative.view = Object.assign(Object.assign({}, model.data.view), { featuredImageUrl: model.data.view.featuredImageUrl });
|
|
29
|
+
initiative.view = Object.assign(Object.assign({}, model.data.view), { featuredImageUrl: (_a = model.data.view) === null || _a === void 0 ? void 0 : _a.featuredImageUrl });
|
|
30
30
|
// Handle Dates
|
|
31
31
|
initiative.createdDate = new Date(model.item.created);
|
|
32
32
|
initiative.createdDateSource = "item.created";
|
|
@@ -36,7 +36,7 @@ function computeProps(model, initiative, requestOptions) {
|
|
|
36
36
|
/**
|
|
37
37
|
* Features that can be disabled by the entity owner
|
|
38
38
|
*/
|
|
39
|
-
initiative.features = processEntityFeatures_1.processEntityFeatures(((
|
|
39
|
+
initiative.features = processEntityFeatures_1.processEntityFeatures(((_b = model.data.settings) === null || _b === void 0 ? void 0 : _b.features) || {}, InitiativeBusinessRules_1.InitiativeDefaultFeatures);
|
|
40
40
|
initiative.links = computeLinks_1.computeLinks(model.item, requestOptions);
|
|
41
41
|
// cast b/c this takes a partial but returns a full object
|
|
42
42
|
return initiative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeProps.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/computeProps.ts"],"names":[],"mappings":";;;AAEA,+CAAsD;AAKtD,mDAAkD;AAClD,6FAA0F;AAC1F,uEAAsE;AACtE,iDAA8C;AAE9C,4EAAyE;AAEzE;;;;;;;GAOG;AACH,SAAgB,YAAY,CAC1B,KAAa,EACb,UAAmC,EACnC,cAA+B;;IAE/B,IAAI,KAAa,CAAC;IAClB,IAAI,cAAc,CAAC,cAAc,EAAE;QACjC,MAAM,OAAO,GAAgB,cAAc,CAAC,cAA6B,CAAC;QAC1E,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;KACvB;IAED,wCAAwC;IACxC,UAAU,GAAG,mCAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAEtD,gBAAgB;IAChB,UAAU,CAAC,YAAY,GAAG,+BAAmB,CAC3C,KAAK,CAAC,IAAI,EACV,cAAc,EACd,KAAK,CACN,CAAC;IAEF,UAAU,CAAC,IAAI,mCACV,KAAK,CAAC,IAAI,CAAC,IAAI,KAClB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"computeProps.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/computeProps.ts"],"names":[],"mappings":";;;AAEA,+CAAsD;AAKtD,mDAAkD;AAClD,6FAA0F;AAC1F,uEAAsE;AACtE,iDAA8C;AAE9C,4EAAyE;AAEzE;;;;;;;GAOG;AACH,SAAgB,YAAY,CAC1B,KAAa,EACb,UAAmC,EACnC,cAA+B;;IAE/B,IAAI,KAAa,CAAC;IAClB,IAAI,cAAc,CAAC,cAAc,EAAE;QACjC,MAAM,OAAO,GAAgB,cAAc,CAAC,cAA6B,CAAC;QAC1E,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;KACvB;IAED,wCAAwC;IACxC,UAAU,GAAG,mCAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAEtD,gBAAgB;IAChB,UAAU,CAAC,YAAY,GAAG,+BAAmB,CAC3C,KAAK,CAAC,IAAI,EACV,cAAc,EACd,KAAK,CACN,CAAC;IAEF,UAAU,CAAC,IAAI,mCACV,KAAK,CAAC,IAAI,CAAC,IAAI,KAClB,gBAAgB,QAAE,KAAK,CAAC,IAAI,CAAC,IAAI,0CAAE,gBAAgB,GACpD,CAAC;IAEF,eAAe;IACf,UAAU,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtD,UAAU,CAAC,iBAAiB,GAAG,cAAc,CAAC;IAC9C,UAAU,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvD,UAAU,CAAC,iBAAiB,GAAG,eAAe,CAAC;IAC/C,UAAU,CAAC,aAAa,GAAG,2BAAa,CAAC,UAAU,CAAC,CAAC;IAErD;;OAEG;IACH,UAAU,CAAC,QAAQ,GAAG,6CAAqB,CACzC,OAAA,KAAK,CAAC,IAAI,CAAC,QAAQ,0CAAE,QAAQ,KAAI,EAAE,EACnC,mDAAyB,CAC1B,CAAC;IAEF,UAAU,CAAC,KAAK,GAAG,2BAAY,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAE5D,0DAA0D;IAC1D,OAAO,UAA4B,CAAC;AACtC,CAAC;AA7CD,oCA6CC"}
|
|
@@ -16,11 +16,16 @@ function getPropertyMap() {
|
|
|
16
16
|
map.push({ entityKey: "permissions", storeKey: "data.permissions" });
|
|
17
17
|
map.push({ entityKey: "contacts", storeKey: "data.contacts" });
|
|
18
18
|
map.push({ entityKey: "timeline", storeKey: "data.timeline" });
|
|
19
|
+
// Deeper/Indirect mappings
|
|
19
20
|
map.push({ entityKey: "metrics", storeKey: "item.properties.metrics" });
|
|
20
21
|
map.push({
|
|
21
22
|
entityKey: "location",
|
|
22
23
|
storeKey: "item.properties.location",
|
|
23
24
|
});
|
|
25
|
+
map.push({
|
|
26
|
+
entityKey: "followersGroupId",
|
|
27
|
+
storeKey: "item.properties.followersGroupId",
|
|
28
|
+
});
|
|
24
29
|
map.push({
|
|
25
30
|
entityKey: "features",
|
|
26
31
|
storeKey: "data.settings.features",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPropertyMap.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/getPropertyMap.ts"],"names":[],"mappings":";;;AACA,gFAA6E;AAE7E;;;;;GAKG;AAEH,SAAgB,cAAc;IAC5B,MAAM,GAAG,GAAG,uCAAkB,EAAE,CAAC;IAEjC,yBAAyB;IACzB,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAC;IAC3D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAErE,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"getPropertyMap.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/getPropertyMap.ts"],"names":[],"mappings":";;;AACA,gFAA6E;AAE7E;;;;;GAKG;AAEH,SAAgB,cAAc;IAC5B,MAAM,GAAG,GAAG,uCAAkB,EAAE,CAAC;IAEjC,yBAAyB;IACzB,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAC;IAC3D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAErE,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IAE/D,2BAA2B;IAC3B,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,yBAAyB,EAAE,CAAC,CAAC;IAExE,GAAG,CAAC,IAAI,CAAC;QACP,SAAS,EAAE,UAAU;QACrB,QAAQ,EAAE,0BAA0B;KACrC,CAAC,CAAC;IAEH,GAAG,CAAC,IAAI,CAAC;QACP,SAAS,EAAE,kBAAkB;QAC7B,QAAQ,EAAE,kCAAkC;KAC7C,CAAC,CAAC;IAEH,GAAG,CAAC,IAAI,CAAC;QACP,SAAS,EAAE,UAAU;QACrB,QAAQ,EAAE,wBAAwB;KACnC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC;AA9BD,wCA8BC"}
|
|
@@ -8,7 +8,7 @@ export declare const ContentDefaultFeatures: IFeatureFlags;
|
|
|
8
8
|
* These define the requirements any user must meet to perform related actions
|
|
9
9
|
* @private
|
|
10
10
|
*/
|
|
11
|
-
export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:collaborators", "hub:content:manage"];
|
|
11
|
+
export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:collaborators", "hub:content:manage", "hub:content:canRecordDownloadErrors"];
|
|
12
12
|
/**
|
|
13
13
|
* Content permission policies
|
|
14
14
|
* No need to specify license for permissions that are available to all licenses
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { IArcGISContext } from "../../../../ArcGISContext";
|
|
2
2
|
import { CardEditorOptions } from "../EditorOptions";
|
|
3
3
|
import { IUiSchema } from "../../types";
|
|
4
|
-
/**
|
|
5
|
-
* @private
|
|
6
|
-
* Exports the uiSchema of the stat card
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
4
|
export declare const buildUiSchema: (i18nScope: string, config: CardEditorOptions, context: IArcGISContext) => IUiSchema;
|