@esri/hub-common 29.2.0 → 29.3.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/core/schemas/internal/buildCatalogSetupUiSchemaElement.js +5 -3
- package/dist/esm/core/schemas/internal/buildCatalogSetupUiSchemaElement.js.map +1 -1
- package/dist/esm/core/schemas/internal/embed/EmbedSchema.js +85 -16
- package/dist/esm/core/schemas/internal/embed/EmbedSchema.js.map +1 -1
- package/dist/esm/groups/_internal/GroupUiSchemaCreate.js +109 -98
- package/dist/esm/groups/_internal/GroupUiSchemaCreate.js.map +1 -1
- package/dist/esm/groups/_internal/GroupUiSchemaSettings.js +62 -56
- package/dist/esm/groups/_internal/GroupUiSchemaSettings.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/sites/_internal/SiteUiSchemaSettings.js +2 -2
- package/dist/esm/sites/_internal/SiteUiSchemaSettings.js.map +1 -1
- package/dist/node/core/schemas/internal/buildCatalogSetupUiSchemaElement.js +5 -3
- package/dist/node/core/schemas/internal/buildCatalogSetupUiSchemaElement.js.map +1 -1
- package/dist/node/core/schemas/internal/embed/EmbedSchema.js +86 -17
- package/dist/node/core/schemas/internal/embed/EmbedSchema.js.map +1 -1
- package/dist/node/groups/_internal/GroupUiSchemaCreate.js +109 -98
- package/dist/node/groups/_internal/GroupUiSchemaCreate.js.map +1 -1
- package/dist/node/groups/_internal/GroupUiSchemaSettings.js +62 -56
- package/dist/node/groups/_internal/GroupUiSchemaSettings.js.map +1 -1
- package/dist/node/index.js +14 -13
- package/dist/node/index.js.map +1 -1
- package/dist/node/sites/_internal/SiteUiSchemaSettings.js +2 -2
- package/dist/node/sites/_internal/SiteUiSchemaSettings.js.map +1 -1
- package/dist/types/core/schemas/internal/embed/EmbedSchema.d.ts +17 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/layouts/layout-system-types.d.ts +1 -1
- package/package.json +9 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { checkPermission } from "../../../permissions/checkPermission";
|
|
2
|
-
import {
|
|
2
|
+
import { getUniversalCatalog } from "../../../search/universalCatalog";
|
|
3
3
|
import { UiSchemaRuleEffects } from "../../enums/uiSchemaRuleEffects";
|
|
4
|
+
import { WELL_KNOWN_GROUP_FACET_TYPES } from "../../../search/wellKnownFacets";
|
|
4
5
|
/**
|
|
5
6
|
* When creating an entity, an editor can elect to initialize
|
|
6
7
|
* the entity's catalog with a new group or an existing group.
|
|
@@ -66,8 +67,9 @@ export function buildCatalogSetupUiSchemaElement(i18nScope, context) {
|
|
|
66
67
|
control: "hub-field-input-gallery-picker",
|
|
67
68
|
targetEntity: "group",
|
|
68
69
|
linkTarget: "siteRelative",
|
|
69
|
-
catalogs:
|
|
70
|
-
facets: [
|
|
70
|
+
catalogs: [getUniversalCatalog("group")],
|
|
71
|
+
facets: [...WELL_KNOWN_GROUP_FACET_TYPES],
|
|
72
|
+
widthScale: "l",
|
|
71
73
|
canReorder: false,
|
|
72
74
|
messages: [
|
|
73
75
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildCatalogSetupUiSchemaElement.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/buildCatalogSetupUiSchemaElement.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"buildCatalogSetupUiSchemaElement.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/buildCatalogSetupUiSchemaElement.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAE/E;;;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AAK;gBACjB,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,OAAO;wBACb,OAAO,EAAE,UAAU;wBACnB,IAAI,EAAE,IAAI;wBACV,KAAK,EACH,iEAAiE;qBACpE;iBACF;aACF;YACD,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,mBAAmB,CAAC,IAAI;oBAChC,UAAU,EAAE;wBACV;4BACE,KAAK,EAAE,2CAA2C;4BAClD,MAAM,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE;yBACnC;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embed schema properties
|
|
3
|
+
*/
|
|
1
4
|
const SCHEMA_PROPERTIES = {
|
|
2
|
-
source: {
|
|
3
|
-
type: "string",
|
|
4
|
-
enum: ["content", "external"],
|
|
5
|
-
default: "content",
|
|
6
|
-
},
|
|
7
5
|
id: {
|
|
8
|
-
type: "
|
|
9
|
-
|
|
10
|
-
type: "string",
|
|
11
|
-
},
|
|
12
|
-
maxItems: 1,
|
|
13
|
-
default: [],
|
|
6
|
+
type: "string",
|
|
7
|
+
default: "",
|
|
14
8
|
},
|
|
15
9
|
url: {
|
|
16
10
|
type: "string",
|
|
@@ -28,32 +22,104 @@ const SCHEMA_PROPERTIES = {
|
|
|
28
22
|
default: false,
|
|
29
23
|
},
|
|
30
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Schema properties for the composite embed configuration
|
|
27
|
+
* editor field. Note: id is an array of strings for internal
|
|
28
|
+
* editor purposes (e.g. the gallery picker emits an array of
|
|
29
|
+
* selected ids even though the embed field limits selection to
|
|
30
|
+
* 1). Before emitting the configuration from the editor, we
|
|
31
|
+
* transform the array of ids into a string which is why id
|
|
32
|
+
* is represented as a string in the external card schema.
|
|
33
|
+
*/
|
|
34
|
+
const FIELD_SCHEMA_PROPERTIES = Object.assign(Object.assign({}, SCHEMA_PROPERTIES), { source: {
|
|
35
|
+
type: "string",
|
|
36
|
+
enum: ["content", "external"],
|
|
37
|
+
default: "content",
|
|
38
|
+
}, id: {
|
|
39
|
+
type: "array",
|
|
40
|
+
items: {
|
|
41
|
+
type: "string",
|
|
42
|
+
},
|
|
43
|
+
maxItems: 1,
|
|
44
|
+
default: [],
|
|
45
|
+
} });
|
|
46
|
+
/**
|
|
47
|
+
* Mapping of embed types to their configurable properties
|
|
48
|
+
*/
|
|
31
49
|
export const EMBED_PROPERTY_MAP = {
|
|
32
50
|
app: ["id", "height", "isScrollable"],
|
|
33
51
|
map: ["id", "height"],
|
|
34
52
|
feedback: ["id", "height"],
|
|
35
53
|
external: ["url", "height"],
|
|
36
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Array of configurable embed properties across all embed types
|
|
57
|
+
*/
|
|
37
58
|
export const embedProperties = [
|
|
38
59
|
...new Set(Object.values(EMBED_PROPERTY_MAP).reduce((acc, val) => acc.concat(val), [])),
|
|
39
60
|
];
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Helper function to build the properties for the viewport objects in
|
|
63
|
+
* the embed schemas. Properties differ between the internal field schema
|
|
64
|
+
* and the external card schema, so the function takes a boolean to
|
|
65
|
+
* determine which set of properties to use.
|
|
66
|
+
* @param isField - whether the properties are being built for the internal field schema or the external card schema
|
|
67
|
+
*/
|
|
68
|
+
const _buildViewportProperties = (isField = false) => {
|
|
69
|
+
const props = [...embedProperties];
|
|
70
|
+
if (isField) {
|
|
71
|
+
props.unshift("source");
|
|
72
|
+
}
|
|
73
|
+
return props.reduce((properties, key) => {
|
|
74
|
+
properties[key] = isField
|
|
75
|
+
? FIELD_SCHEMA_PROPERTIES[key]
|
|
76
|
+
: SCHEMA_PROPERTIES[key];
|
|
43
77
|
return properties;
|
|
44
78
|
}, {});
|
|
45
79
|
};
|
|
46
|
-
|
|
80
|
+
/**
|
|
81
|
+
* JSON schema representing the composite embed config
|
|
82
|
+
* editor field
|
|
83
|
+
*/
|
|
84
|
+
export const EmbedFieldSchema = {
|
|
47
85
|
type: "object",
|
|
48
86
|
properties: {
|
|
87
|
+
shouldApplyBreakpoints: {
|
|
88
|
+
type: "boolean",
|
|
89
|
+
default: false,
|
|
90
|
+
},
|
|
49
91
|
viewportAll: {
|
|
50
92
|
type: "object",
|
|
51
|
-
properties: _buildViewportProperties(),
|
|
93
|
+
properties: _buildViewportProperties(true),
|
|
94
|
+
},
|
|
95
|
+
viewportMobile: {
|
|
96
|
+
type: "object",
|
|
97
|
+
properties: _buildViewportProperties(true),
|
|
98
|
+
},
|
|
99
|
+
viewportTablet: {
|
|
100
|
+
type: "object",
|
|
101
|
+
properties: _buildViewportProperties(true),
|
|
102
|
+
},
|
|
103
|
+
viewportDesktop: {
|
|
104
|
+
type: "object",
|
|
105
|
+
properties: _buildViewportProperties(true),
|
|
52
106
|
},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* JSON schema representing an embed
|
|
111
|
+
*/
|
|
112
|
+
export const EmbedSchema = {
|
|
113
|
+
type: "object",
|
|
114
|
+
properties: {
|
|
53
115
|
shouldApplyBreakpoints: {
|
|
54
116
|
type: "boolean",
|
|
55
117
|
default: false,
|
|
56
118
|
},
|
|
119
|
+
viewportAll: {
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: _buildViewportProperties(),
|
|
122
|
+
},
|
|
57
123
|
viewportMobile: {
|
|
58
124
|
type: "object",
|
|
59
125
|
properties: _buildViewportProperties(),
|
|
@@ -68,6 +134,9 @@ export const EmbedSchema = {
|
|
|
68
134
|
},
|
|
69
135
|
},
|
|
70
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* JSON schema representing an embed card
|
|
139
|
+
*/
|
|
71
140
|
export const EmbedCardSchema = {
|
|
72
141
|
type: "object",
|
|
73
142
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbedSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/embed/EmbedSchema.ts"],"names":[],"mappings":"AAGA,MAAM,iBAAiB,GAAG;IACxB,
|
|
1
|
+
{"version":3,"file":"EmbedSchema.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/embed/EmbedSchema.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,iBAAiB,GAAG;IACxB,EAAE,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;KACZ;IACD,GAAG,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,EAAE;KACZ;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,IAAI;KACd;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;KACf;CAC+C,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,uBAAuB,GAAG,gCAC3B,iBAAiB,KACpB,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;QAC7B,OAAO,EAAE,SAAS;KACnB,EACD,EAAE,EAAE;QACF,IAAI,EAAE,OAAO;QACb,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;SACf;QACD,QAAQ,EAAE,CAAC;QACX,OAAO,EAAE,EAAE;KACZ,GAC+C,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAiC;IAC9D,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,CAAC;IACrC,GAAG,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAA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AAC,IAAI,CAAC;SAC3C;KACF;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAyB;IAC/C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,sBAAsB,EAAE;YACtB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;SACf;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,wBAAwB,EAAE;SACvC;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,wBAAwB,EAAE;SACvC;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,wBAAwB,EAAE;SACvC;QACD,eAAe,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,wBAAwB,EAAE;SACvC;KACF;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,WAAW;SACnB;KACF;CACF,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { getProp } from "../../objects/get-prop";
|
|
|
9
9
|
* rendered in the view group creation experience
|
|
10
10
|
*/
|
|
11
11
|
export const buildUiSchema = (i18nScope, options, context) => {
|
|
12
|
-
|
|
12
|
+
const result = {
|
|
13
13
|
type: "Layout",
|
|
14
14
|
elements: [
|
|
15
15
|
{
|
|
@@ -177,102 +177,6 @@ export const buildUiSchema = (i18nScope, options, context) => {
|
|
|
177
177
|
type: "Section",
|
|
178
178
|
labelKey: `${i18nScope}.sections.membershipAccess.label`,
|
|
179
179
|
elements: [
|
|
180
|
-
{
|
|
181
|
-
labelKey: `${i18nScope}.fields.membershipAccess.label`,
|
|
182
|
-
scope: "/properties/membershipAccess",
|
|
183
|
-
type: "Control",
|
|
184
|
-
options: {
|
|
185
|
-
control: "hub-field-input-tile-select",
|
|
186
|
-
labels: [
|
|
187
|
-
`{{${i18nScope}.fields.membershipAccess.org.label:translate}}`,
|
|
188
|
-
`{{${i18nScope}.fields.membershipAccess.collab.label:translate}}`,
|
|
189
|
-
`{{${i18nScope}.fields.membershipAccess.any.label:translate}}`,
|
|
190
|
-
],
|
|
191
|
-
descriptions: [
|
|
192
|
-
`{{${i18nScope}.fields.membershipAccess.org.description:translate}}`,
|
|
193
|
-
`{{${i18nScope}.fields.membershipAccess.collab.description:translate}}`,
|
|
194
|
-
`{{${i18nScope}.fields.membershipAccess.any.description:translate}}`,
|
|
195
|
-
],
|
|
196
|
-
// rules that pertain to the individual options
|
|
197
|
-
rules: [
|
|
198
|
-
[
|
|
199
|
-
{
|
|
200
|
-
effect: UiSchemaRuleEffects.NONE,
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
|
-
[
|
|
204
|
-
{
|
|
205
|
-
effect: UiSchemaRuleEffects.DISABLE,
|
|
206
|
-
conditions: [
|
|
207
|
-
{
|
|
208
|
-
scope: "/properties/leavingDisallowed",
|
|
209
|
-
schema: { const: true },
|
|
210
|
-
},
|
|
211
|
-
],
|
|
212
|
-
},
|
|
213
|
-
],
|
|
214
|
-
[
|
|
215
|
-
{
|
|
216
|
-
effect: UiSchemaRuleEffects.DISABLE,
|
|
217
|
-
conditions: [
|
|
218
|
-
{
|
|
219
|
-
scope: "/properties/leavingDisallowed",
|
|
220
|
-
schema: { const: true },
|
|
221
|
-
},
|
|
222
|
-
],
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
effect: UiSchemaRuleEffects.DISABLE,
|
|
226
|
-
conditions: [
|
|
227
|
-
{
|
|
228
|
-
scope: "/properties/isSharedUpdate",
|
|
229
|
-
schema: { const: true },
|
|
230
|
-
},
|
|
231
|
-
],
|
|
232
|
-
},
|
|
233
|
-
],
|
|
234
|
-
],
|
|
235
|
-
messages: [
|
|
236
|
-
{
|
|
237
|
-
type: "ERROR",
|
|
238
|
-
keyword: "pattern",
|
|
239
|
-
icon: true,
|
|
240
|
-
labelKey: `${i18nScope}.fields.membershipAccess.patternError`,
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
type: "ERROR",
|
|
244
|
-
keyword: "const",
|
|
245
|
-
icon: true,
|
|
246
|
-
labelKey: `${i18nScope}.fields.membershipAccess.constError`,
|
|
247
|
-
},
|
|
248
|
-
],
|
|
249
|
-
},
|
|
250
|
-
// rules that pertain to the control as a whole
|
|
251
|
-
rules: [
|
|
252
|
-
{
|
|
253
|
-
effect: UiSchemaRuleEffects.RESET,
|
|
254
|
-
conditions: [
|
|
255
|
-
{
|
|
256
|
-
scope: "/properties/leavingDisallowed",
|
|
257
|
-
schema: { const: true },
|
|
258
|
-
},
|
|
259
|
-
],
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
effect: UiSchemaRuleEffects.RESET,
|
|
263
|
-
conditions: [
|
|
264
|
-
{
|
|
265
|
-
scope: "/properties/isSharedUpdate",
|
|
266
|
-
schema: { const: true },
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
scope: "/properties/membershipAccess",
|
|
270
|
-
schema: { const: "anyone" },
|
|
271
|
-
},
|
|
272
|
-
],
|
|
273
|
-
},
|
|
274
|
-
],
|
|
275
|
-
},
|
|
276
180
|
{
|
|
277
181
|
labelKey: `${i18nScope}.fields.join.label`,
|
|
278
182
|
scope: "/properties/_join",
|
|
@@ -426,7 +330,114 @@ export const buildUiSchema = (i18nScope, options, context) => {
|
|
|
426
330
|
],
|
|
427
331
|
},
|
|
428
332
|
],
|
|
429
|
-
}
|
|
333
|
+
};
|
|
334
|
+
// Only add this if it's not an enterprise environment.
|
|
335
|
+
// We do this instead of using a condition because that is applied after
|
|
336
|
+
// the ui renders and can cause a flash of the option before it is hidden.
|
|
337
|
+
// Find the section by labelKey vs specific array element index
|
|
338
|
+
// in case things change in the future
|
|
339
|
+
const membershipSection = result.elements.find((el) => el && el.labelKey === `${i18nScope}.sections.membershipAccess.label`);
|
|
340
|
+
if (!context.isPortal &&
|
|
341
|
+
membershipSection &&
|
|
342
|
+
Array.isArray(membershipSection.elements)) {
|
|
343
|
+
membershipSection.elements.unshift({
|
|
344
|
+
labelKey: `${i18nScope}.fields.membershipAccess.label`,
|
|
345
|
+
scope: "/properties/membershipAccess",
|
|
346
|
+
type: "Control",
|
|
347
|
+
options: {
|
|
348
|
+
control: "hub-field-input-tile-select",
|
|
349
|
+
labels: [
|
|
350
|
+
`{{${i18nScope}.fields.membershipAccess.org.label:translate}}`,
|
|
351
|
+
`{{${i18nScope}.fields.membershipAccess.collab.label:translate}}`,
|
|
352
|
+
`{{${i18nScope}.fields.membershipAccess.any.label:translate}}`,
|
|
353
|
+
],
|
|
354
|
+
descriptions: [
|
|
355
|
+
`{{${i18nScope}.fields.membershipAccess.org.description:translate}}`,
|
|
356
|
+
`{{${i18nScope}.fields.membershipAccess.collab.description:translate}}`,
|
|
357
|
+
`{{${i18nScope}.fields.membershipAccess.any.description:translate}}`,
|
|
358
|
+
],
|
|
359
|
+
// rules that pertain to the individual options
|
|
360
|
+
rules: [
|
|
361
|
+
[
|
|
362
|
+
{
|
|
363
|
+
effect: UiSchemaRuleEffects.NONE,
|
|
364
|
+
},
|
|
365
|
+
],
|
|
366
|
+
[
|
|
367
|
+
{
|
|
368
|
+
effect: UiSchemaRuleEffects.DISABLE,
|
|
369
|
+
conditions: [
|
|
370
|
+
{
|
|
371
|
+
scope: "/properties/leavingDisallowed",
|
|
372
|
+
schema: { const: true },
|
|
373
|
+
},
|
|
374
|
+
],
|
|
375
|
+
},
|
|
376
|
+
],
|
|
377
|
+
[
|
|
378
|
+
{
|
|
379
|
+
effect: UiSchemaRuleEffects.DISABLE,
|
|
380
|
+
conditions: [
|
|
381
|
+
{
|
|
382
|
+
scope: "/properties/leavingDisallowed",
|
|
383
|
+
schema: { const: true },
|
|
384
|
+
},
|
|
385
|
+
],
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
effect: UiSchemaRuleEffects.DISABLE,
|
|
389
|
+
conditions: [
|
|
390
|
+
{
|
|
391
|
+
scope: "/properties/isSharedUpdate",
|
|
392
|
+
schema: { const: true },
|
|
393
|
+
},
|
|
394
|
+
],
|
|
395
|
+
},
|
|
396
|
+
],
|
|
397
|
+
],
|
|
398
|
+
messages: [
|
|
399
|
+
{
|
|
400
|
+
type: "ERROR",
|
|
401
|
+
keyword: "pattern",
|
|
402
|
+
icon: true,
|
|
403
|
+
labelKey: `${i18nScope}.fields.membershipAccess.patternError`,
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
type: "ERROR",
|
|
407
|
+
keyword: "const",
|
|
408
|
+
icon: true,
|
|
409
|
+
labelKey: `${i18nScope}.fields.membershipAccess.constError`,
|
|
410
|
+
},
|
|
411
|
+
],
|
|
412
|
+
},
|
|
413
|
+
// rules that pertain to the control as a whole
|
|
414
|
+
rules: [
|
|
415
|
+
{
|
|
416
|
+
effect: UiSchemaRuleEffects.RESET,
|
|
417
|
+
conditions: [
|
|
418
|
+
{
|
|
419
|
+
scope: "/properties/leavingDisallowed",
|
|
420
|
+
schema: { const: true },
|
|
421
|
+
},
|
|
422
|
+
],
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
effect: UiSchemaRuleEffects.RESET,
|
|
426
|
+
conditions: [
|
|
427
|
+
{
|
|
428
|
+
scope: "/properties/isSharedUpdate",
|
|
429
|
+
schema: { const: true },
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
scope: "/properties/membershipAccess",
|
|
433
|
+
schema: { const: "anyone" },
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
},
|
|
437
|
+
],
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
return Promise.resolve(result);
|
|
430
441
|
};
|
|
431
442
|
/**
|
|
432
443
|
* @private
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/groups/_internal/GroupUiSchemaCreate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,SAAiB,EACjB,OAA2B,EAC3B,OAAuB,EACH,EAAE;IACtB,
|
|
1
|
+
{"version":3,"file":"GroupUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/groups/_internal/GroupUiSchemaCreate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,SAAiB,EACjB,OAA2B,EAC3B,OAAuB,EACH,EAAE;IACtB,MAAM,MAAM,GAAc;QACxB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,2BAA2B;gBACjD,QAAQ,EAAE;oBACR;wBACE,QAAQ,EAAE,GAAG,SAAS,oBAAoB;wBAC1C,KAAK,EAAE,kBAAkB;wBACzB,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,UAAU;oCACnB,IAAI,EAAE,IAAI;oCACV,QAAQ,EAAE,GAAG,SAAS,4BAA4B;iCACnD;gCACD;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,WAAW;oC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OAAO,CAAC,OAAO,iCACjB,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,GACtC,OAAO,EACV,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -10,67 +10,13 @@ export const buildUiSchema = (i18nScope, options, _context) => {
|
|
|
10
10
|
// referencing them from the schema properties requires them to be actual elements
|
|
11
11
|
// in the uiSchema. Instead the entity is passed in as options and we can get them directly from the entity.
|
|
12
12
|
const { isSharedUpdate, leavingDisallowed } = options;
|
|
13
|
-
|
|
13
|
+
const result = {
|
|
14
14
|
type: "Layout",
|
|
15
15
|
elements: [
|
|
16
16
|
{
|
|
17
17
|
type: "Section",
|
|
18
18
|
labelKey: `${i18nScope}.sections.membershipAccess.label`,
|
|
19
19
|
elements: [
|
|
20
|
-
{
|
|
21
|
-
labelKey: `${i18nScope}.fields.membershipAccess.label`,
|
|
22
|
-
scope: "/properties/membershipAccess",
|
|
23
|
-
type: "Control",
|
|
24
|
-
options: {
|
|
25
|
-
control: "hub-field-input-tile-select",
|
|
26
|
-
labels: [
|
|
27
|
-
`{{${i18nScope}.fields.membershipAccess.org.description:translate}}`,
|
|
28
|
-
`{{${i18nScope}.fields.membershipAccess.collab.description:translate}}`,
|
|
29
|
-
`{{${i18nScope}.fields.membershipAccess.any.description:translate}}`,
|
|
30
|
-
],
|
|
31
|
-
// rules that pertain to the individual options
|
|
32
|
-
rules: [
|
|
33
|
-
[
|
|
34
|
-
{
|
|
35
|
-
effect: UiSchemaRuleEffects.NONE,
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
[
|
|
39
|
-
{
|
|
40
|
-
effect: UiSchemaRuleEffects.DISABLE,
|
|
41
|
-
conditions: [leavingDisallowed],
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
[
|
|
45
|
-
{
|
|
46
|
-
effect: UiSchemaRuleEffects.DISABLE,
|
|
47
|
-
conditions: [leavingDisallowed],
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
effect: UiSchemaRuleEffects.DISABLE,
|
|
51
|
-
conditions: [isSharedUpdate],
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
],
|
|
55
|
-
},
|
|
56
|
-
// rules that pertain to the control as a whole
|
|
57
|
-
rules: [
|
|
58
|
-
{
|
|
59
|
-
effect: UiSchemaRuleEffects.RESET,
|
|
60
|
-
conditions: [leavingDisallowed],
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
effect: UiSchemaRuleEffects.RESET,
|
|
64
|
-
conditions: [
|
|
65
|
-
isSharedUpdate,
|
|
66
|
-
{
|
|
67
|
-
scope: "/properties/membershipAccess",
|
|
68
|
-
schema: { const: "anyone" },
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
20
|
{
|
|
75
21
|
labelKey: `${i18nScope}.fields.contributeContent.label`,
|
|
76
22
|
scope: "/properties/isViewOnly",
|
|
@@ -86,6 +32,66 @@ export const buildUiSchema = (i18nScope, options, _context) => {
|
|
|
86
32
|
],
|
|
87
33
|
},
|
|
88
34
|
],
|
|
89
|
-
}
|
|
35
|
+
};
|
|
36
|
+
// Only add this if it's not an enterprise environment.
|
|
37
|
+
// We do this instead of using a condition because that is applied after
|
|
38
|
+
// the ui renders and can cause a flash of the option before it is hidden.
|
|
39
|
+
if (!_context.isPortal) {
|
|
40
|
+
result.elements[0].elements.unshift({
|
|
41
|
+
labelKey: `${i18nScope}.fields.membershipAccess.label`,
|
|
42
|
+
scope: "/properties/membershipAccess",
|
|
43
|
+
type: "Control",
|
|
44
|
+
options: {
|
|
45
|
+
control: "hub-field-input-tile-select",
|
|
46
|
+
labels: [
|
|
47
|
+
`{{${i18nScope}.fields.membershipAccess.org.description:translate}}`,
|
|
48
|
+
`{{${i18nScope}.fields.membershipAccess.collab.description:translate}}`,
|
|
49
|
+
`{{${i18nScope}.fields.membershipAccess.any.description:translate}}`,
|
|
50
|
+
],
|
|
51
|
+
// rules that pertain to the individual options
|
|
52
|
+
rules: [
|
|
53
|
+
[
|
|
54
|
+
{
|
|
55
|
+
effect: UiSchemaRuleEffects.NONE,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
{
|
|
60
|
+
effect: UiSchemaRuleEffects.DISABLE,
|
|
61
|
+
conditions: [leavingDisallowed],
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
{
|
|
66
|
+
effect: UiSchemaRuleEffects.DISABLE,
|
|
67
|
+
conditions: [leavingDisallowed],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
effect: UiSchemaRuleEffects.DISABLE,
|
|
71
|
+
conditions: [isSharedUpdate],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
// rules that pertain to the control as a whole
|
|
77
|
+
rules: [
|
|
78
|
+
{
|
|
79
|
+
effect: UiSchemaRuleEffects.RESET,
|
|
80
|
+
conditions: [leavingDisallowed],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
effect: UiSchemaRuleEffects.RESET,
|
|
84
|
+
conditions: [
|
|
85
|
+
isSharedUpdate,
|
|
86
|
+
{
|
|
87
|
+
scope: "/properties/membershipAccess",
|
|
88
|
+
schema: { const: "anyone" },
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return Promise.resolve(result);
|
|
90
96
|
};
|
|
91
97
|
//# sourceMappingURL=GroupUiSchemaSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/groups/_internal/GroupUiSchemaSettings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAI3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,SAAiB,EACjB,OAA2B,EAC3B,QAAwB,EACJ,EAAE;IACtB,0EAA0E;IAC1E,kFAAkF;IAClF,4GAA4G;IAC5G,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC;IACtD,
|
|
1
|
+
{"version":3,"file":"GroupUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/groups/_internal/GroupUiSchemaSettings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAI3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,SAAiB,EACjB,OAA2B,EAC3B,QAAwB,EACJ,EAAE;IACtB,0EAA0E;IAC1E,kFAAkF;IAClF,4GAA4G;IAC5G,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC;IACtD,MAAM,MAAM,GAAc;QACxB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,kCAAkC;gBACxD,QAAQ,EAAE;oBACR;wBACE,QAAQ,EAAE,GAAG,SAAS,iCAAiC;wBACvD,KAAK,EAAE,wBAAwB;wBAC/B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,6BAA6B;4BACtC,MAAM,EAAE;gCACN,KAAK,SAAS,2DAA2D;gCACzE,KAAK,SAAS,0DAA0D;6BACzE;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;IAEF,uDAAuD;IACvD,wEAAwE;IACxE,0EAA0E;IAC1E,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;YAClC,QAAQ,EAAE,GAAG,SAAS,gCAAgC;YACtD,KAAK,EAAE,8BAA8B;YACrC,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,6BAA6B;gBACtC,MAAM,EAAE;oBACN,KAAK,SAAS,sDAAsD;oBACpE,KAAK,SAAS,yDAAyD;oBACvE,KAAK,SAAS,sDAAsD;iBACrE;gBACD,+CAA+C;gBAC/C,KAAK,EAAE;oBACL;wBACE;4BACE,MAAM,EAAE,mBAAmB,CAAC,IAAI;yBACjC;qBACF;oBACD;wBACE;4BACE,MAAM,EAAE,mBAAmB,CAAC,OAAO;4BACnC,UAAU,EAAE,CAAC,iBAAiB,CAAC;yBAChC;qBACF;oBACD;wBACE;4BACE,MAAM,EAAE,mBAAmB,CAAC,OAAO;4BACnC,UAAU,EAAE,CAAC,iBAAiB,CAAC;yBAChC;wBACD;4BACE,MAAM,EAAE,mBAAmB,CAAC,OAAO;4BACnC,UAAU,EAAE,CAAC,cAAc,CAAC;yBAC7B;qBACF;iBACF;aACF;YACD,+CAA+C;YAC/C,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,mBAAmB,CAAC,KAAK;oBACjC,UAAU,EAAE,CAAC,iBAAiB,CAAC;iBAChC;gBACD;oBACE,MAAM,EAAE,mBAAmB,CAAC,KAAK;oBACjC,UAAU,EAAE;wBACV,cAAc;wBACd;4BACE,KAAK,EAAE,8BAA8B;4BACrC,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE;yBAC5B;qBACF;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -80,7 +80,7 @@ export { getHubEntityTypeFromPath, getPathForHubEntityType, parseContainmentPath
|
|
|
80
80
|
export { processActionLink, processActionLinks, } from "./core/processActionLinks";
|
|
81
81
|
export { getEditorConfig } from "./core/schemas/getEditorConfig";
|
|
82
82
|
export { fetchCategoriesUiSchemaElement, } from "./core/schemas/internal/fetchCategoriesUiSchemaElement";
|
|
83
|
-
export { EMBED_PROPERTY_MAP, embedProperties, EmbedSchema, } from "./core/schemas/internal/embed/EmbedSchema";
|
|
83
|
+
export { EMBED_PROPERTY_MAP, embedProperties, EmbedSchema, EmbedFieldSchema, } from "./core/schemas/internal/embed/EmbedSchema";
|
|
84
84
|
export { getTagItems } from "./core/schemas/internal/getTagItems";
|
|
85
85
|
export { CatalogSchema, CollectionSchema, FilterSchema, GalleryDisplayConfigSchema, PredicateSchema, QuerySchema, } from "./core/schemas/shared/CatalogSchema";
|
|
86
86
|
export { CARD_TITLE_TAGS, } from "./core/schemas/shared/enums/cardTitleTags";
|