@esri/hub-common 17.11.0 → 17.13.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/ContentUiSchemaEdit.js +46 -33
- package/dist/esm/content/_internal/ContentUiSchemaEdit.js.map +1 -1
- package/dist/esm/core/schemas/internal/fetchCategoriesUiSchemaElement.js +0 -4
- package/dist/esm/core/schemas/internal/fetchCategoriesUiSchemaElement.js.map +1 -1
- package/dist/esm/core/schemas/internal/getSlugSchemaElement.js +0 -3
- package/dist/esm/core/schemas/internal/getSlugSchemaElement.js.map +1 -1
- package/dist/esm/core/schemas/internal/getThumbnailUiSchemaElement.js +1 -12
- package/dist/esm/core/schemas/internal/getThumbnailUiSchemaElement.js.map +1 -1
- package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js +59 -46
- package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -1
- package/dist/esm/events/_internal/EventBusinessRules.js +0 -1
- package/dist/esm/events/_internal/EventBusinessRules.js.map +1 -1
- package/dist/esm/events/_internal/EventUiSchemaEdit.js +298 -200
- package/dist/esm/events/_internal/EventUiSchemaEdit.js.map +1 -1
- package/dist/esm/groups/_internal/GroupSchema.js +2 -1
- package/dist/esm/groups/_internal/GroupSchema.js.map +1 -1
- package/dist/esm/groups/_internal/GroupUiSchemaEdit.js +47 -6
- package/dist/esm/groups/_internal/GroupUiSchemaEdit.js.map +1 -1
- package/dist/esm/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js +74 -36
- package/dist/esm/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js +126 -92
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
- package/dist/esm/pages/_internal/PageUiSchemaEdit.js +45 -28
- package/dist/esm/pages/_internal/PageUiSchemaEdit.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js +221 -146
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
- package/dist/esm/sites/_internal/SiteUiSchemaEdit.js +43 -28
- package/dist/esm/sites/_internal/SiteUiSchemaEdit.js.map +1 -1
- package/dist/esm/surveys/_internal/SurveyUiSchemaEdit.js +62 -25
- package/dist/esm/surveys/_internal/SurveyUiSchemaEdit.js.map +1 -1
- package/dist/esm/templates/_internal/TemplateUiSchemaEdit.js +78 -33
- package/dist/esm/templates/_internal/TemplateUiSchemaEdit.js.map +1 -1
- package/dist/node/content/_internal/ContentUiSchemaEdit.js +46 -33
- package/dist/node/content/_internal/ContentUiSchemaEdit.js.map +1 -1
- package/dist/node/core/schemas/internal/fetchCategoriesUiSchemaElement.js +0 -4
- package/dist/node/core/schemas/internal/fetchCategoriesUiSchemaElement.js.map +1 -1
- package/dist/node/core/schemas/internal/getSlugSchemaElement.js +0 -3
- package/dist/node/core/schemas/internal/getSlugSchemaElement.js.map +1 -1
- package/dist/node/core/schemas/internal/getThumbnailUiSchemaElement.js +1 -12
- package/dist/node/core/schemas/internal/getThumbnailUiSchemaElement.js.map +1 -1
- package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js +59 -46
- package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -1
- package/dist/node/events/_internal/EventBusinessRules.js +0 -1
- package/dist/node/events/_internal/EventBusinessRules.js.map +1 -1
- package/dist/node/events/_internal/EventUiSchemaEdit.js +298 -200
- package/dist/node/events/_internal/EventUiSchemaEdit.js.map +1 -1
- package/dist/node/groups/_internal/GroupSchema.js +1 -0
- package/dist/node/groups/_internal/GroupSchema.js.map +1 -1
- package/dist/node/groups/_internal/GroupUiSchemaEdit.js +47 -6
- package/dist/node/groups/_internal/GroupUiSchemaEdit.js.map +1 -1
- package/dist/node/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js +74 -36
- package/dist/node/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js +126 -92
- package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
- package/dist/node/pages/_internal/PageUiSchemaEdit.js +45 -28
- package/dist/node/pages/_internal/PageUiSchemaEdit.js.map +1 -1
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js +221 -146
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
- package/dist/node/sites/_internal/SiteUiSchemaEdit.js +43 -28
- package/dist/node/sites/_internal/SiteUiSchemaEdit.js.map +1 -1
- package/dist/node/surveys/_internal/SurveyUiSchemaEdit.js +62 -25
- package/dist/node/surveys/_internal/SurveyUiSchemaEdit.js.map +1 -1
- package/dist/node/templates/_internal/TemplateUiSchemaEdit.js +78 -33
- package/dist/node/templates/_internal/TemplateUiSchemaEdit.js.map +1 -1
- package/dist/types/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.d.ts +2 -2
- package/dist/types/templates/_internal/TemplateUiSchemaEdit.d.ts +2 -2
- package/package.json +1 -1
|
@@ -19,6 +19,11 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
19
19
|
{
|
|
20
20
|
type: "Section",
|
|
21
21
|
labelKey: `${i18nScope}.sections.eventInfo.label`,
|
|
22
|
+
options: {
|
|
23
|
+
helperText: {
|
|
24
|
+
labelKey: `${i18nScope}.sections.eventInfo.helperText`,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
22
27
|
elements: [
|
|
23
28
|
{
|
|
24
29
|
labelKey: `${i18nScope}.fields.name.label`,
|
|
@@ -42,18 +47,67 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
42
47
|
},
|
|
43
48
|
},
|
|
44
49
|
{
|
|
45
|
-
labelKey: `${i18nScope}.fields.
|
|
46
|
-
scope: "/properties/
|
|
50
|
+
labelKey: `${i18nScope}.fields.summary.label`,
|
|
51
|
+
scope: "/properties/summary",
|
|
47
52
|
type: "Control",
|
|
48
53
|
options: {
|
|
49
|
-
control: "hub-field-input-
|
|
54
|
+
control: "hub-field-input-input",
|
|
50
55
|
type: "textarea",
|
|
56
|
+
rows: 4,
|
|
57
|
+
messages: [
|
|
58
|
+
{
|
|
59
|
+
type: "ERROR",
|
|
60
|
+
keyword: "maxLength",
|
|
61
|
+
icon: true,
|
|
62
|
+
labelKey: `shared.fields.summary.maxLengthError`,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
...getThumbnailUiSchemaElement(i18nScope, options.thumbnail, getEntityThumbnailUrl(options), "event", context.requestOptions),
|
|
68
|
+
{
|
|
69
|
+
type: "Section",
|
|
70
|
+
labelKey: `${i18nScope}.sections.description.label`,
|
|
71
|
+
options: {
|
|
72
|
+
section: "block",
|
|
73
|
+
},
|
|
74
|
+
elements: [
|
|
75
|
+
{
|
|
76
|
+
labelKey: `${i18nScope}.fields.description.label`,
|
|
77
|
+
scope: "/properties/description",
|
|
78
|
+
type: "Control",
|
|
79
|
+
options: {
|
|
80
|
+
control: "hub-field-input-rich-text",
|
|
81
|
+
type: "textarea",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: "Section",
|
|
88
|
+
labelKey: `${i18nScope}.sections.discoverability.label`,
|
|
89
|
+
options: {
|
|
90
|
+
section: "block",
|
|
51
91
|
helperText: {
|
|
52
|
-
labelKey: `${i18nScope}.
|
|
92
|
+
labelKey: `${i18nScope}.sections.discoverability.helperText`,
|
|
53
93
|
},
|
|
54
94
|
},
|
|
95
|
+
elements: [
|
|
96
|
+
{
|
|
97
|
+
labelKey: `${i18nScope}.fields.tags.label`,
|
|
98
|
+
scope: "/properties/tags",
|
|
99
|
+
type: "Control",
|
|
100
|
+
options: {
|
|
101
|
+
control: "hub-field-input-combobox",
|
|
102
|
+
items: await getTagItems(options.tags, context.portal.id, context.hubRequestOptions),
|
|
103
|
+
allowCustomValues: true,
|
|
104
|
+
selectionMode: "multiple",
|
|
105
|
+
placeholderIcon: "label",
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
...(await fetchCategoriesUiSchemaElement(i18nScope, context)),
|
|
109
|
+
],
|
|
55
110
|
},
|
|
56
|
-
...getThumbnailUiSchemaElement(i18nScope, options.thumbnail, getEntityThumbnailUrl(options), "event", context.requestOptions),
|
|
57
111
|
],
|
|
58
112
|
},
|
|
59
113
|
{
|
|
@@ -61,24 +115,16 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
61
115
|
labelKey: `${i18nScope}.sections.dateTime.label`,
|
|
62
116
|
elements: [
|
|
63
117
|
{
|
|
64
|
-
labelKey: `${i18nScope}.fields.
|
|
65
|
-
scope: "/properties/startDate",
|
|
118
|
+
labelKey: `${i18nScope}.fields.allDay.label`,
|
|
66
119
|
type: "Control",
|
|
120
|
+
scope: "/properties/isAllDay",
|
|
67
121
|
options: {
|
|
68
|
-
control: "hub-field-input-
|
|
69
|
-
messages: [
|
|
70
|
-
{
|
|
71
|
-
type: "ERROR",
|
|
72
|
-
keyword: "required",
|
|
73
|
-
icon: true,
|
|
74
|
-
labelKey: `${i18nScope}.fields.startDate.requiredError`,
|
|
75
|
-
},
|
|
76
|
-
],
|
|
122
|
+
control: "hub-field-input-switch",
|
|
77
123
|
},
|
|
78
124
|
},
|
|
79
125
|
{
|
|
80
|
-
labelKey: `${i18nScope}.fields.
|
|
81
|
-
scope: "/properties/
|
|
126
|
+
labelKey: `${i18nScope}.fields.startDate.label`,
|
|
127
|
+
scope: "/properties/startDate",
|
|
82
128
|
type: "Control",
|
|
83
129
|
options: {
|
|
84
130
|
control: "hub-field-input-date",
|
|
@@ -87,25 +133,11 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
87
133
|
type: "ERROR",
|
|
88
134
|
keyword: "required",
|
|
89
135
|
icon: true,
|
|
90
|
-
labelKey: `${i18nScope}.fields.
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
type: "ERROR",
|
|
94
|
-
keyword: "formatMinimum",
|
|
95
|
-
icon: true,
|
|
96
|
-
labelKey: `${i18nScope}.fields.endDate.minDateError`,
|
|
136
|
+
labelKey: `${i18nScope}.fields.startDate.requiredError`,
|
|
97
137
|
},
|
|
98
138
|
],
|
|
99
139
|
},
|
|
100
140
|
},
|
|
101
|
-
{
|
|
102
|
-
labelKey: `${i18nScope}.fields.allDay.label`,
|
|
103
|
-
type: "Control",
|
|
104
|
-
scope: "/properties/isAllDay",
|
|
105
|
-
options: {
|
|
106
|
-
control: "hub-field-input-switch",
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
141
|
{
|
|
110
142
|
labelKey: `${i18nScope}.fields.startTime.label`,
|
|
111
143
|
scope: "/properties/startTime",
|
|
@@ -129,6 +161,28 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
129
161
|
],
|
|
130
162
|
},
|
|
131
163
|
},
|
|
164
|
+
{
|
|
165
|
+
labelKey: `${i18nScope}.fields.endDate.label`,
|
|
166
|
+
scope: "/properties/endDate",
|
|
167
|
+
type: "Control",
|
|
168
|
+
options: {
|
|
169
|
+
control: "hub-field-input-date",
|
|
170
|
+
messages: [
|
|
171
|
+
{
|
|
172
|
+
type: "ERROR",
|
|
173
|
+
keyword: "required",
|
|
174
|
+
icon: true,
|
|
175
|
+
labelKey: `${i18nScope}.fields.endDate.requiredError`,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
type: "ERROR",
|
|
179
|
+
keyword: "formatMinimum",
|
|
180
|
+
icon: true,
|
|
181
|
+
labelKey: `${i18nScope}.fields.endDate.minDateError`,
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
},
|
|
132
186
|
{
|
|
133
187
|
labelKey: `${i18nScope}.fields.endTime.label`,
|
|
134
188
|
scope: "/properties/endTime",
|
|
@@ -185,14 +239,26 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
185
239
|
scope: "/properties/attendanceType",
|
|
186
240
|
type: "Control",
|
|
187
241
|
options: {
|
|
188
|
-
control: "hub-field-input-
|
|
189
|
-
|
|
242
|
+
control: "hub-field-input-tile-select",
|
|
243
|
+
labels: [
|
|
244
|
+
`{{${i18nScope}.fields.attendanceType.inPerson.label:translate}}`,
|
|
245
|
+
`{{${i18nScope}.fields.attendanceType.online.label:translate}}`,
|
|
246
|
+
`{{${i18nScope}.fields.attendanceType.both.label:translate}}`,
|
|
247
|
+
],
|
|
248
|
+
layout: "horizontal",
|
|
190
249
|
},
|
|
191
250
|
},
|
|
192
251
|
{
|
|
193
252
|
scope: "/properties/location",
|
|
194
253
|
type: "Control",
|
|
195
254
|
labelKey: `${i18nScope}.fields.location.label`,
|
|
255
|
+
rule: {
|
|
256
|
+
condition: {
|
|
257
|
+
scope: "/properties/attendanceType",
|
|
258
|
+
schema: { const: "online" },
|
|
259
|
+
},
|
|
260
|
+
effect: UiSchemaRuleEffects.HIDE,
|
|
261
|
+
},
|
|
196
262
|
options: {
|
|
197
263
|
control: "hub-field-input-location-picker",
|
|
198
264
|
enableInvalidGeometryWarning: true,
|
|
@@ -210,9 +276,14 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
210
276
|
},
|
|
211
277
|
},
|
|
212
278
|
{
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
279
|
+
type: "Section",
|
|
280
|
+
labelKey: `${i18nScope}.sections.inPersonRegistrationCapacity.label`,
|
|
281
|
+
options: {
|
|
282
|
+
section: "block",
|
|
283
|
+
helperText: {
|
|
284
|
+
labelKey: `${i18nScope}.sections.inPersonRegistrationCapacity.helperText`,
|
|
285
|
+
},
|
|
286
|
+
},
|
|
216
287
|
rule: {
|
|
217
288
|
condition: {
|
|
218
289
|
scope: "/properties/attendanceType",
|
|
@@ -225,56 +296,84 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
225
296
|
},
|
|
226
297
|
effect: UiSchemaRuleEffects.SHOW,
|
|
227
298
|
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
rule: {
|
|
238
|
-
condition: {
|
|
239
|
-
schema: {
|
|
240
|
-
properties: {
|
|
241
|
-
attendanceType: {
|
|
299
|
+
elements: [
|
|
300
|
+
{
|
|
301
|
+
labelKey: `${i18nScope}.fields.inPersonCapacityType.label`,
|
|
302
|
+
scope: "/properties/inPersonCapacityType",
|
|
303
|
+
type: "Control",
|
|
304
|
+
rule: {
|
|
305
|
+
condition: {
|
|
306
|
+
scope: "/properties/attendanceType",
|
|
307
|
+
schema: {
|
|
242
308
|
enum: [
|
|
243
309
|
HubEventAttendanceType.InPerson,
|
|
244
310
|
HubEventAttendanceType.Both,
|
|
245
311
|
],
|
|
246
312
|
},
|
|
247
|
-
inPersonCapacityType: {
|
|
248
|
-
const: HubEventCapacityType.Fixed,
|
|
249
|
-
},
|
|
250
313
|
},
|
|
314
|
+
effect: UiSchemaRuleEffects.SHOW,
|
|
315
|
+
},
|
|
316
|
+
options: {
|
|
317
|
+
control: "hub-field-input-tile-select",
|
|
318
|
+
labels: [
|
|
319
|
+
`{{${i18nScope}.fields.inPersonCapacityType.unlimited.label:translate}}`,
|
|
320
|
+
`{{${i18nScope}.fields.inPersonCapacityType.fixed.label:translate}}`,
|
|
321
|
+
],
|
|
322
|
+
layout: "horizontal",
|
|
251
323
|
},
|
|
252
324
|
},
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
325
|
+
{
|
|
326
|
+
labelKey: `${i18nScope}.fields.inPersonCapacity.label`,
|
|
327
|
+
scope: "/properties/inPersonCapacity",
|
|
328
|
+
type: "Control",
|
|
329
|
+
rule: {
|
|
330
|
+
condition: {
|
|
331
|
+
schema: {
|
|
332
|
+
properties: {
|
|
333
|
+
attendanceType: {
|
|
334
|
+
enum: [
|
|
335
|
+
HubEventAttendanceType.InPerson,
|
|
336
|
+
HubEventAttendanceType.Both,
|
|
337
|
+
],
|
|
338
|
+
},
|
|
339
|
+
inPersonCapacityType: {
|
|
340
|
+
const: HubEventCapacityType.Fixed,
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
effect: UiSchemaRuleEffects.SHOW,
|
|
264
346
|
},
|
|
265
|
-
{
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
347
|
+
options: {
|
|
348
|
+
control: "hub-field-input-input",
|
|
349
|
+
type: "number",
|
|
350
|
+
messages: [
|
|
351
|
+
{
|
|
352
|
+
type: "ERROR",
|
|
353
|
+
keyword: "required",
|
|
354
|
+
icon: true,
|
|
355
|
+
labelKey: `${i18nScope}.fields.inPersonCapacity.requiredError`,
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
type: "ERROR",
|
|
359
|
+
keyword: "minimum",
|
|
360
|
+
icon: true,
|
|
361
|
+
labelKey: `${i18nScope}.fields.inPersonCapacity.minimumError`,
|
|
362
|
+
},
|
|
363
|
+
],
|
|
270
364
|
},
|
|
271
|
-
|
|
272
|
-
|
|
365
|
+
},
|
|
366
|
+
],
|
|
273
367
|
},
|
|
274
368
|
{
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
369
|
+
type: "Section",
|
|
370
|
+
labelKey: `${i18nScope}.sections.onlineRegistrationDetails.label`,
|
|
371
|
+
options: {
|
|
372
|
+
section: "block",
|
|
373
|
+
helperText: {
|
|
374
|
+
labelKey: `${i18nScope}.sections.onlineRegistrationDetails.helperText`,
|
|
375
|
+
},
|
|
376
|
+
},
|
|
278
377
|
rule: {
|
|
279
378
|
condition: {
|
|
280
379
|
scope: "/properties/attendanceType",
|
|
@@ -287,73 +386,73 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
287
386
|
},
|
|
288
387
|
effect: UiSchemaRuleEffects.SHOW,
|
|
289
388
|
},
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
389
|
+
elements: [
|
|
390
|
+
{
|
|
391
|
+
labelKey: `${i18nScope}.fields.onlineUrl.label`,
|
|
392
|
+
scope: "/properties/onlineUrl",
|
|
393
|
+
type: "Control",
|
|
394
|
+
rule: {
|
|
395
|
+
condition: {
|
|
396
|
+
scope: "/properties/attendanceType",
|
|
397
|
+
schema: {
|
|
398
|
+
enum: [
|
|
399
|
+
HubEventAttendanceType.Online,
|
|
400
|
+
HubEventAttendanceType.Both,
|
|
401
|
+
],
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
effect: UiSchemaRuleEffects.SHOW,
|
|
304
405
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
406
|
+
options: {
|
|
407
|
+
control: "hub-field-input-input",
|
|
408
|
+
messages: [
|
|
409
|
+
{
|
|
410
|
+
type: "ERROR",
|
|
411
|
+
keyword: "required",
|
|
412
|
+
icon: true,
|
|
413
|
+
labelKey: `${i18nScope}.fields.onlineUrl.requiredError`,
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
type: "ERROR",
|
|
417
|
+
keyword: "format",
|
|
418
|
+
icon: true,
|
|
419
|
+
labelKey: `shared.errors.urlFormat`,
|
|
420
|
+
},
|
|
319
421
|
],
|
|
320
422
|
},
|
|
321
423
|
},
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
424
|
+
{
|
|
425
|
+
labelKey: `${i18nScope}.fields.onlineDetails.label`,
|
|
426
|
+
scope: "/properties/onlineDetails",
|
|
427
|
+
type: "Control",
|
|
428
|
+
rule: {
|
|
429
|
+
condition: {
|
|
430
|
+
scope: "/properties/attendanceType",
|
|
431
|
+
schema: {
|
|
432
|
+
enum: [
|
|
433
|
+
HubEventAttendanceType.Online,
|
|
434
|
+
HubEventAttendanceType.Both,
|
|
435
|
+
],
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
effect: UiSchemaRuleEffects.SHOW,
|
|
439
|
+
},
|
|
440
|
+
options: {
|
|
441
|
+
control: "hub-field-input-rich-text",
|
|
442
|
+
type: "textarea",
|
|
443
|
+
},
|
|
329
444
|
},
|
|
330
|
-
|
|
445
|
+
],
|
|
331
446
|
},
|
|
332
447
|
{
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
type: "Control",
|
|
336
|
-
rule: {
|
|
337
|
-
condition: {
|
|
338
|
-
scope: "/properties/attendanceType",
|
|
339
|
-
schema: {
|
|
340
|
-
enum: [
|
|
341
|
-
HubEventAttendanceType.Online,
|
|
342
|
-
HubEventAttendanceType.Both,
|
|
343
|
-
],
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
|
-
effect: UiSchemaRuleEffects.SHOW,
|
|
347
|
-
},
|
|
448
|
+
type: "Section",
|
|
449
|
+
labelKey: `${i18nScope}.sections.onlineRegistrationCapacity.label`,
|
|
348
450
|
options: {
|
|
349
|
-
|
|
350
|
-
|
|
451
|
+
section: "block",
|
|
452
|
+
helperText: {
|
|
453
|
+
labelKey: `${i18nScope}.sections.onlineRegistrationCapacity.helperText`,
|
|
454
|
+
},
|
|
351
455
|
},
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
labelKey: `${i18nScope}.fields.onlineCapacity.label`,
|
|
355
|
-
scope: "/properties/onlineCapacity",
|
|
356
|
-
type: "Control",
|
|
357
456
|
rule: {
|
|
358
457
|
condition: {
|
|
359
458
|
schema: {
|
|
@@ -364,81 +463,80 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
364
463
|
HubEventAttendanceType.Both,
|
|
365
464
|
],
|
|
366
465
|
},
|
|
367
|
-
onlineCapacityType: {
|
|
368
|
-
const: HubEventCapacityType.Fixed,
|
|
369
|
-
},
|
|
370
466
|
},
|
|
371
467
|
},
|
|
372
468
|
},
|
|
373
469
|
effect: UiSchemaRuleEffects.SHOW,
|
|
374
470
|
},
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
471
|
+
elements: [
|
|
472
|
+
{
|
|
473
|
+
labelKey: `${i18nScope}.fields.onlineCapacityType.label`,
|
|
474
|
+
scope: "/properties/onlineCapacityType",
|
|
475
|
+
type: "Control",
|
|
476
|
+
rule: {
|
|
477
|
+
condition: {
|
|
478
|
+
scope: "/properties/attendanceType",
|
|
479
|
+
schema: {
|
|
480
|
+
enum: [
|
|
481
|
+
HubEventAttendanceType.Online,
|
|
482
|
+
HubEventAttendanceType.Both,
|
|
483
|
+
],
|
|
484
|
+
},
|
|
485
|
+
},
|
|
486
|
+
effect: UiSchemaRuleEffects.SHOW,
|
|
384
487
|
},
|
|
385
|
-
{
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
488
|
+
options: {
|
|
489
|
+
control: "hub-field-input-tile-select",
|
|
490
|
+
enum: { i18nScope: `${i18nScope}.fields.onlineCapacityType` },
|
|
491
|
+
labels: [
|
|
492
|
+
`{{${i18nScope}.fields.onlineCapacityType.unlimited.label:translate}}`,
|
|
493
|
+
`{{${i18nScope}.fields.onlineCapacityType.fixed.label:translate}}`,
|
|
494
|
+
],
|
|
495
|
+
layout: "horizontal",
|
|
390
496
|
},
|
|
391
|
-
],
|
|
392
|
-
},
|
|
393
|
-
},
|
|
394
|
-
],
|
|
395
|
-
},
|
|
396
|
-
/* This field hidden for future consideration */
|
|
397
|
-
// {
|
|
398
|
-
// type: "Section",
|
|
399
|
-
// labelKey: `${i18nScope}.sections.referencedContent.label`,
|
|
400
|
-
// elements: [buildReferencedContentSchema(i18nScope, context)],
|
|
401
|
-
// },
|
|
402
|
-
{
|
|
403
|
-
type: "Section",
|
|
404
|
-
labelKey: `${i18nScope}.sections.discoverability.label`,
|
|
405
|
-
elements: [
|
|
406
|
-
{
|
|
407
|
-
labelKey: `${i18nScope}.fields.tags.label`,
|
|
408
|
-
scope: "/properties/tags",
|
|
409
|
-
type: "Control",
|
|
410
|
-
options: {
|
|
411
|
-
control: "hub-field-input-combobox",
|
|
412
|
-
items: await getTagItems(options.tags, context.portal.id, context.hubRequestOptions),
|
|
413
|
-
allowCustomValues: true,
|
|
414
|
-
selectionMode: "multiple",
|
|
415
|
-
placeholderIcon: "label",
|
|
416
|
-
helperText: {
|
|
417
|
-
labelKey: `${i18nScope}.fields.tags.helperText`,
|
|
418
|
-
},
|
|
419
|
-
},
|
|
420
|
-
},
|
|
421
|
-
...(await fetchCategoriesUiSchemaElement(i18nScope, context)),
|
|
422
|
-
{
|
|
423
|
-
labelKey: `${i18nScope}.fields.summary.label`,
|
|
424
|
-
scope: "/properties/summary",
|
|
425
|
-
type: "Control",
|
|
426
|
-
options: {
|
|
427
|
-
control: "hub-field-input-input",
|
|
428
|
-
type: "textarea",
|
|
429
|
-
rows: 4,
|
|
430
|
-
helperText: {
|
|
431
|
-
labelKey: `${i18nScope}.fields.summary.helperText`,
|
|
432
497
|
},
|
|
433
|
-
|
|
434
|
-
{
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
498
|
+
{
|
|
499
|
+
labelKey: `${i18nScope}.fields.onlineCapacity.label`,
|
|
500
|
+
scope: "/properties/onlineCapacity",
|
|
501
|
+
type: "Control",
|
|
502
|
+
rule: {
|
|
503
|
+
condition: {
|
|
504
|
+
schema: {
|
|
505
|
+
properties: {
|
|
506
|
+
attendanceType: {
|
|
507
|
+
enum: [
|
|
508
|
+
HubEventAttendanceType.Online,
|
|
509
|
+
HubEventAttendanceType.Both,
|
|
510
|
+
],
|
|
511
|
+
},
|
|
512
|
+
onlineCapacityType: {
|
|
513
|
+
const: HubEventCapacityType.Fixed,
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
effect: UiSchemaRuleEffects.SHOW,
|
|
439
519
|
},
|
|
440
|
-
|
|
441
|
-
|
|
520
|
+
options: {
|
|
521
|
+
control: "hub-field-input-input",
|
|
522
|
+
type: "number",
|
|
523
|
+
messages: [
|
|
524
|
+
{
|
|
525
|
+
type: "ERROR",
|
|
526
|
+
keyword: "required",
|
|
527
|
+
icon: true,
|
|
528
|
+
labelKey: `${i18nScope}.fields.onlineCapacity.requiredError`,
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
type: "ERROR",
|
|
532
|
+
keyword: "minimum",
|
|
533
|
+
icon: true,
|
|
534
|
+
labelKey: `${i18nScope}.fields.onlineCapacity.minimumError`,
|
|
535
|
+
},
|
|
536
|
+
],
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
],
|
|
442
540
|
},
|
|
443
541
|
],
|
|
444
542
|
},
|