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