@esri/hub-common 17.12.0 → 17.13.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.
Files changed (71) 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/addDynamicSlugValidation.js +10 -1
  4. package/dist/esm/core/schemas/internal/addDynamicSlugValidation.js.map +1 -1
  5. package/dist/esm/core/schemas/internal/fetchCategoriesUiSchemaElement.js +0 -4
  6. package/dist/esm/core/schemas/internal/fetchCategoriesUiSchemaElement.js.map +1 -1
  7. package/dist/esm/core/schemas/internal/getSlugSchemaElement.js +0 -3
  8. package/dist/esm/core/schemas/internal/getSlugSchemaElement.js.map +1 -1
  9. package/dist/esm/core/schemas/internal/getThumbnailUiSchemaElement.js +1 -12
  10. package/dist/esm/core/schemas/internal/getThumbnailUiSchemaElement.js.map +1 -1
  11. package/dist/esm/core/schemas/internal/metrics/editorToEntity.js +5 -0
  12. package/dist/esm/core/schemas/internal/metrics/editorToEntity.js.map +1 -1
  13. package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js +59 -46
  14. package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -1
  15. package/dist/esm/events/_internal/EventUiSchemaEdit.js +298 -200
  16. package/dist/esm/events/_internal/EventUiSchemaEdit.js.map +1 -1
  17. package/dist/esm/groups/_internal/GroupSchema.js +2 -1
  18. package/dist/esm/groups/_internal/GroupSchema.js.map +1 -1
  19. package/dist/esm/groups/_internal/GroupUiSchemaEdit.js +47 -6
  20. package/dist/esm/groups/_internal/GroupUiSchemaEdit.js.map +1 -1
  21. package/dist/esm/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js +74 -36
  22. package/dist/esm/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js.map +1 -1
  23. package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js +126 -92
  24. package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
  25. package/dist/esm/pages/_internal/PageUiSchemaEdit.js +45 -28
  26. package/dist/esm/pages/_internal/PageUiSchemaEdit.js.map +1 -1
  27. package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js +221 -146
  28. package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
  29. package/dist/esm/sites/_internal/SiteUiSchemaEdit.js +43 -28
  30. package/dist/esm/sites/_internal/SiteUiSchemaEdit.js.map +1 -1
  31. package/dist/esm/surveys/_internal/SurveyUiSchemaEdit.js +62 -25
  32. package/dist/esm/surveys/_internal/SurveyUiSchemaEdit.js.map +1 -1
  33. package/dist/esm/templates/_internal/TemplateUiSchemaEdit.js +78 -33
  34. package/dist/esm/templates/_internal/TemplateUiSchemaEdit.js.map +1 -1
  35. package/dist/node/content/_internal/ContentUiSchemaEdit.js +46 -33
  36. package/dist/node/content/_internal/ContentUiSchemaEdit.js.map +1 -1
  37. package/dist/node/core/schemas/internal/addDynamicSlugValidation.js +10 -1
  38. package/dist/node/core/schemas/internal/addDynamicSlugValidation.js.map +1 -1
  39. package/dist/node/core/schemas/internal/fetchCategoriesUiSchemaElement.js +0 -4
  40. package/dist/node/core/schemas/internal/fetchCategoriesUiSchemaElement.js.map +1 -1
  41. package/dist/node/core/schemas/internal/getSlugSchemaElement.js +0 -3
  42. package/dist/node/core/schemas/internal/getSlugSchemaElement.js.map +1 -1
  43. package/dist/node/core/schemas/internal/getThumbnailUiSchemaElement.js +1 -12
  44. package/dist/node/core/schemas/internal/getThumbnailUiSchemaElement.js.map +1 -1
  45. package/dist/node/core/schemas/internal/metrics/editorToEntity.js +5 -0
  46. package/dist/node/core/schemas/internal/metrics/editorToEntity.js.map +1 -1
  47. package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js +59 -46
  48. package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -1
  49. package/dist/node/events/_internal/EventUiSchemaEdit.js +298 -200
  50. package/dist/node/events/_internal/EventUiSchemaEdit.js.map +1 -1
  51. package/dist/node/groups/_internal/GroupSchema.js +1 -0
  52. package/dist/node/groups/_internal/GroupSchema.js.map +1 -1
  53. package/dist/node/groups/_internal/GroupUiSchemaEdit.js +47 -6
  54. package/dist/node/groups/_internal/GroupUiSchemaEdit.js.map +1 -1
  55. package/dist/node/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js +74 -36
  56. package/dist/node/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js.map +1 -1
  57. package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js +126 -92
  58. package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
  59. package/dist/node/pages/_internal/PageUiSchemaEdit.js +45 -28
  60. package/dist/node/pages/_internal/PageUiSchemaEdit.js.map +1 -1
  61. package/dist/node/projects/_internal/ProjectUiSchemaEdit.js +221 -146
  62. package/dist/node/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
  63. package/dist/node/sites/_internal/SiteUiSchemaEdit.js +43 -28
  64. package/dist/node/sites/_internal/SiteUiSchemaEdit.js.map +1 -1
  65. package/dist/node/surveys/_internal/SurveyUiSchemaEdit.js +62 -25
  66. package/dist/node/surveys/_internal/SurveyUiSchemaEdit.js.map +1 -1
  67. package/dist/node/templates/_internal/TemplateUiSchemaEdit.js +78 -33
  68. package/dist/node/templates/_internal/TemplateUiSchemaEdit.js.map +1 -1
  69. package/dist/types/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.d.ts +2 -2
  70. package/dist/types/templates/_internal/TemplateUiSchemaEdit.d.ts +2 -2
  71. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  import { fetchCategoriesUiSchemaElement } from "../../core/schemas/internal/fetchCategoriesUiSchemaElement";
2
2
  import { getTagItems } from "../../core/schemas/internal/getTagItems";
3
3
  import { getThumbnailUiSchemaElement } from "../../core/schemas/internal/getThumbnailUiSchemaElement";
4
+ import { getLocationExtent } from "../../core/schemas/internal/getLocationExtent";
5
+ import { getLocationOptions } from "../../core/schemas/internal/getLocationOptions";
4
6
  /**
5
7
  * @private
6
8
  * constructs the complete edit uiSchema for Hub Survey.
@@ -14,6 +16,11 @@ export const buildUiSchema = async (i18nScope, options, context) => {
14
16
  {
15
17
  type: "Section",
16
18
  labelKey: `${i18nScope}.sections.basicInfo.label`,
19
+ options: {
20
+ helperText: {
21
+ labelKey: `${i18nScope}.sections.basicInfo.helperText`,
22
+ },
23
+ },
17
24
  elements: [
18
25
  {
19
26
  labelKey: `${i18nScope}.fields.name.label`,
@@ -42,18 +49,7 @@ export const buildUiSchema = async (i18nScope, options, context) => {
42
49
  ],
43
50
  },
44
51
  },
45
- {
46
- labelKey: `${i18nScope}.fields.description.label`,
47
- scope: "/properties/description",
48
- type: "Control",
49
- options: {
50
- control: "hub-field-input-rich-text",
51
- type: "textarea",
52
- helperText: {
53
- labelKey: `${i18nScope}.fields.description.helperText`,
54
- },
55
- },
56
- },
52
+ // getSlugSchemaElement(i18nScope),
57
53
  {
58
54
  labelKey: `${i18nScope}.fields.summary.label`,
59
55
  scope: "/properties/summary",
@@ -62,9 +58,6 @@ export const buildUiSchema = async (i18nScope, options, context) => {
62
58
  control: "hub-field-input-input",
63
59
  type: "textarea",
64
60
  rows: 4,
65
- helperText: {
66
- labelKey: `${i18nScope}.fields.summary.helperText`,
67
- },
68
61
  messages: [
69
62
  {
70
63
  type: "ERROR",
@@ -75,26 +68,70 @@ export const buildUiSchema = async (i18nScope, options, context) => {
75
68
  ],
76
69
  },
77
70
  },
71
+ ...getThumbnailUiSchemaElement(i18nScope, options.thumbnail, options.thumbnailUrl, "survey", context.requestOptions),
72
+ {
73
+ type: "Section",
74
+ labelKey: `${i18nScope}.sections.description.label`,
75
+ options: {
76
+ section: "block",
77
+ },
78
+ elements: [
79
+ // description
80
+ {
81
+ labelKey: `${i18nScope}.fields.description.label`,
82
+ scope: "/properties/description",
83
+ type: "Control",
84
+ options: {
85
+ control: "hub-field-input-rich-text",
86
+ type: "textarea",
87
+ },
88
+ },
89
+ ],
90
+ },
91
+ {
92
+ type: "Section",
93
+ labelKey: `${i18nScope}.sections.discoverability.label`,
94
+ options: {
95
+ section: "block",
96
+ helperText: {
97
+ labelKey: `${i18nScope}.sections.discoverability.helperText`,
98
+ },
99
+ },
100
+ elements: [
101
+ // tags
102
+ {
103
+ labelKey: `${i18nScope}.fields.tags.label`,
104
+ scope: "/properties/tags",
105
+ type: "Control",
106
+ options: {
107
+ control: "hub-field-input-combobox",
108
+ items: await getTagItems(options.tags, context.portal.id, context.hubRequestOptions),
109
+ allowCustomValues: true,
110
+ selectionMode: "multiple",
111
+ placeholderIcon: "label",
112
+ },
113
+ },
114
+ // categories
115
+ ...(await fetchCategoriesUiSchemaElement(i18nScope, context)),
116
+ ],
117
+ },
78
118
  ],
79
119
  },
120
+ // location section
80
121
  {
81
122
  type: "Section",
82
- labelKey: `${i18nScope}.sections.searchDiscoverability.label`,
123
+ labelKey: `${i18nScope}.sections.location.label`,
83
124
  elements: [
84
125
  {
85
- labelKey: `${i18nScope}.fields.tags.label`,
86
- scope: "/properties/tags",
126
+ scope: "/properties/location",
87
127
  type: "Control",
88
128
  options: {
89
- control: "hub-field-input-combobox",
90
- items: await getTagItems(options.tags, context.portal.id, context.hubRequestOptions),
91
- allowCustomValues: true,
92
- selectionMode: "multiple",
93
- placeholderIcon: "label",
129
+ control: "hub-field-input-location-picker",
130
+ extent: await getLocationExtent(options.location, context.hubRequestOptions),
131
+ options: await getLocationOptions(options.id, options.type, options.location, context.portal.name, context.hubRequestOptions),
132
+ noticeTitleElementAriaLevel: 3,
94
133
  },
95
134
  },
96
- ...(await fetchCategoriesUiSchemaElement(i18nScope, context)),
97
- ...getThumbnailUiSchemaElement(i18nScope, options.thumbnail, options.thumbnailUrl, "survey", context.requestOptions),
98
135
  ],
99
136
  },
100
137
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"SurveyUiSchemaEdit.js","s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vD;yBACF;qBACF;oBACD;wBACE,QAAQ,EAAE,GAAG,SAAS,uBAAuB;wBAC7C,KAAK,EAAE,qBAAqB;wBAC5B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,uBAAuB;4BAChC,IAAI,EAAE,UAAU;4BAChB,IAAI,EAAE,CAAC;4BACP,UAAU,EAAE;gCACV,QAAQ,EAAE,GAAG,SAAS,4BAA4B;6BACnD;4BACD,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,WAAW;oCACpB,IAAI,EAAE,IAAI;oCACV,QAAQ,EAAE,sCAAsC;iCACjD;6BACF;yBACF;qBACF;iBACF;aACF;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,uCAAuC;gBAC7D,QAAQ,EAAE;oBACR;wBACE,QAAQ,EAAE,GAAG,SAAS,oBAAoB;wBAC1C,KAAK,EAAE,kBAAkB;wBACzB,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,0BAA0B;4BACnC,KAAK,EAAE,MAAM,WAAW,CACtB,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,MAAM,CAAC,EAAE,EACjB,OAAO,CAAC,iBAAiB,CAC1B;4BACD,iBAAiB,EAAE,IAAI;4BACvB,aAAa,EAAE,UAAU;4BACzB,eAAe,EAAE,OAAO;yBACzB;qBACF;oBACD,GAAG,CAAC,MAAM,8BAA8B,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;oBAC7D,GAAG,2BAA2B,CAC5B,SAAS,EACT,OAAO,CAAC,SAAS,EACjB,OAAO,CAAC,YAAY,EACpB,QAAQ,EACR,OAAO,CAAC,cAAc,CACvB;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"SurveyUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/surveys/_internal/SurveyUiSchemaEdit.ts"],"names":[],"mappings":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B,EAAE,IAAI;oCACvB,aAAa,EAAE,UAAU;oCACzB,eAAe,EAAE,OAAO;iCACzB;6BACF;4BACD,aAAa;4BACb,GAAG,CAAC,MAAM,8BAA8B,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;yBAC9D;qBACF;iBACF;aACF;YACD,mBAAmB;YACnB;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,0BAA0B;gBAChD,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,sBAAsB;wBAC7B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,iCAAiC;4BAC1C,MAAM,EAAE,MAAM,iBAAiB,CAC7B,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,iBAAiB,CAC1B;4BACD,OAAO,EAAE,MAAM,kBAAkB,CAC/B,OAAO,CAAC,EAAE,EACV,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,MAAM,CAAC,IAAI,EACnB,OAAO,CAAC,iBAAiB,CAC1B;4BACD,2BAA2B,EAAE,CAAC;yBAC/B;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import { getThumbnailUiSchemaElement } from "../../core/schemas/internal/getThumbnailUiSchemaElement";
2
2
  import { UiSchemaMessageTypes } from "../../core/schemas/types";
3
3
  import { getEntityThumbnailUrl } from "../../core/getEntityThumbnailUrl";
4
+ import { getTagItems } from "../../core/schemas/internal/getTagItems";
5
+ import { fetchCategoriesUiSchemaElement } from "../../core/schemas/internal/fetchCategoriesUiSchemaElement";
4
6
  /**
5
7
  * @private
6
8
  * constructs the complete edit uiSchema for Hub Templates.
@@ -19,6 +21,11 @@ export const buildUiSchema = async (i18nScope, options, context) => {
19
21
  {
20
22
  type: "Section",
21
23
  labelKey: `${i18nScope}.sections.basicInfo.label`,
24
+ options: {
25
+ helperText: {
26
+ labelKey: `${i18nScope}.sections.basicInfo.helperText`,
27
+ },
28
+ },
22
29
  elements: [
23
30
  {
24
31
  type: "Control",
@@ -47,40 +54,15 @@ export const buildUiSchema = async (i18nScope, options, context) => {
47
54
  ],
48
55
  },
49
56
  },
57
+ // getSlugSchemaElement(i18nScope),
50
58
  {
51
59
  type: "Control",
52
- scope: "/properties/previewUrl",
53
- labelKey: `${i18nScope}.fields.previewUrl.label`,
54
- options: {
55
- helperText: {
56
- labelKey: `${i18nScope}.fields.previewUrl.helperText`,
57
- },
58
- messages: [
59
- {
60
- type: "ERROR",
61
- keyword: "format",
62
- icon: true,
63
- labelKey: `shared.errors.urlFormat`,
64
- },
65
- {
66
- type: "ERROR",
67
- keyword: "if",
68
- hidden: true,
69
- },
70
- ],
71
- },
72
- },
73
- {
74
- labelKey: `${i18nScope}.fields.summary.label`,
75
60
  scope: "/properties/summary",
76
- type: "Control",
61
+ labelKey: `${i18nScope}.fields.summary.label`,
77
62
  options: {
78
63
  control: "hub-field-input-input",
79
64
  type: "textarea",
80
65
  rows: 4,
81
- helperText: {
82
- labelKey: `${i18nScope}.fields.summary.helperText`,
83
- },
84
66
  messages: [
85
67
  {
86
68
  type: "ERROR",
@@ -91,19 +73,82 @@ export const buildUiSchema = async (i18nScope, options, context) => {
91
73
  ],
92
74
  },
93
75
  },
76
+ ...getThumbnailUiSchemaElement(i18nScope, options.thumbnail, getEntityThumbnailUrl(options), "template", context.requestOptions),
77
+ {
78
+ type: "Section",
79
+ labelKey: `${i18nScope}.sections.description.label`,
80
+ options: {
81
+ section: "block",
82
+ },
83
+ elements: [
84
+ // description
85
+ {
86
+ labelKey: `${i18nScope}.fields.description.label`,
87
+ scope: "/properties/description",
88
+ type: "Control",
89
+ options: {
90
+ control: "hub-field-input-rich-text",
91
+ type: "textarea",
92
+ },
93
+ },
94
+ ],
95
+ },
96
+ {
97
+ type: "Section",
98
+ labelKey: `${i18nScope}.sections.discoverability.label`,
99
+ options: {
100
+ section: "block",
101
+ helperText: {
102
+ labelKey: `${i18nScope}.sections.discoverability.helperText`,
103
+ },
104
+ },
105
+ elements: [
106
+ // tags
107
+ {
108
+ labelKey: `${i18nScope}.fields.tags.label`,
109
+ scope: "/properties/tags",
110
+ type: "Control",
111
+ options: {
112
+ control: "hub-field-input-combobox",
113
+ items: await getTagItems(options.tags, context.portal.id, context.hubRequestOptions),
114
+ allowCustomValues: true,
115
+ selectionMode: "multiple",
116
+ placeholderIcon: "label",
117
+ },
118
+ },
119
+ // categories
120
+ ...(await fetchCategoriesUiSchemaElement(i18nScope, context)),
121
+ ],
122
+ },
123
+ ],
124
+ },
125
+ {
126
+ type: "Section",
127
+ labelKey: `${i18nScope}.sections.templateDetails.label`,
128
+ elements: [
94
129
  {
95
- labelKey: `${i18nScope}.fields.description.label`,
96
- scope: "/properties/description",
97
130
  type: "Control",
131
+ scope: "/properties/previewUrl",
132
+ labelKey: `${i18nScope}.fields.previewUrl.label`,
98
133
  options: {
99
- control: "hub-field-input-rich-text",
100
- type: "textarea",
101
134
  helperText: {
102
- labelKey: `${i18nScope}.fields.description.helperText`,
135
+ labelKey: `${i18nScope}.fields.previewUrl.helperText`,
103
136
  },
137
+ messages: [
138
+ {
139
+ type: "ERROR",
140
+ keyword: "format",
141
+ icon: true,
142
+ labelKey: `shared.errors.urlFormat`,
143
+ },
144
+ {
145
+ type: "ERROR",
146
+ keyword: "if",
147
+ hidden: true,
148
+ },
149
+ ],
104
150
  },
105
151
  },
106
- ...getThumbnailUiSchemaElement(i18nScope, options.thumbnail, getEntityThumbnailUrl(options), "template", context.requestOptions),
107
152
  ],
108
153
  },
109
154
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/templates/_internal/TemplateUiSchemaEdit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yDAAyD,CAAC;AACtG,OAAO,EAAa,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,qBAA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IAAI;iCACb;6BACF;yBACF;qBACF;oBACD;wBACE,QAAQ,EAAE,GAAG,SAAS,uBAAuB;wBAC7C,KAAK,EAAE,qBAAqB;wBAC5B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,uBAAuB;4BAChC,IAAI,EAAE,UAAU;4BAChB,IAAI,EAAE,CAAC;4BACP,UAAU,EAAE;gCACV,QAAQ,EAAE,GAAG,SAAS,4BAA4B;6BACnD;4BACD,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,WAAW;oCACpB,IAAI,EAAE,IAAI;oCACV,QAAQ,EAAE,sCAAsC;iCACjD;6BACF;yBACF;qBACF;oBACD;wBACE,QAAQ,EAAE,GAAG,SAAS,2BAA2B;wBACjD,KAAK,EAAE,yBAAyB;wBAChC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,2BAA2B;4BACpC,IAAI,EAAE,UAAU;4BAChB,UAAU,EAAE;gCACV,QAAQ,EAAE,GAAG,SAAS,gCAAgC;6BACvD;yBACF;qBACF;oBACD,GAAG,2BAA2B,CAC5B,SAAS,EACT,OAAO,CAAC,SAAS,EACjB,qBAAqB,CAAC,OAAO,CAAC,EAC9B,UAAU,EACV,OAAO,CAAC,cAAc,CACvB;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"TemplateUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/templates/_internal/TemplateUiSchemaEdit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yDAAyD,CAAC;AACtG,OAAO,EAAa,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAC;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Q,EAAE,GAAG,SAAS,iCAAiC;gBACvD,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,wBAAwB;wBAC/B,QAAQ,EAAE,GAAG,SAAS,0BAA0B;wBAChD,OAAO,EAAE;4BACP,UAAU,EAAE;gCACV,QAAQ,EAAE,GAAG,SAAS,+BAA+B;6BACtD;4BACD,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,QAAQ;oCACjB,IAAI,EAAE,IAAI;oCACV,QAAQ,EAAE,yBAAyB;iCACpC;gCACD;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,IAAI;oCACb,MAAM,EAAE,IAAI;iCACb;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -6,6 +6,7 @@ const getLocationExtent_1 = require("../../core/schemas/internal/getLocationExte
6
6
  const getLocationOptions_1 = require("../../core/schemas/internal/getLocationOptions");
7
7
  const getThumbnailUiSchemaElement_1 = require("../../core/schemas/internal/getThumbnailUiSchemaElement");
8
8
  const fetchCategoriesUiSchemaElement_1 = require("../../core/schemas/internal/fetchCategoriesUiSchemaElement");
9
+ // import { getSlugSchemaElement } from "../../core/schemas/internal/getSlugSchemaElement";
9
10
  /**
10
11
  * @private
11
12
  * constructs the complete edit uiSchema for Hub Content.
@@ -19,6 +20,11 @@ exports.buildUiSchema = async (i18nScope, options, context) => {
19
20
  {
20
21
  type: "Section",
21
22
  labelKey: `${i18nScope}.sections.basic.title`,
23
+ options: {
24
+ helperText: {
25
+ labelKey: `${i18nScope}.sections.basic.helperText`,
26
+ },
27
+ },
22
28
  elements: [
23
29
  // title
24
30
  {
@@ -45,6 +51,7 @@ exports.buildUiSchema = async (i18nScope, options, context) => {
45
51
  ],
46
52
  },
47
53
  },
54
+ // getSlugSchemaElement(i18nScope),
48
55
  // summary
49
56
  {
50
57
  labelKey: `${i18nScope}.fields.summary.label`,
@@ -54,9 +61,6 @@ exports.buildUiSchema = async (i18nScope, options, context) => {
54
61
  control: "hub-field-input-input",
55
62
  type: "textarea",
56
63
  rows: 4,
57
- helperText: {
58
- labelKey: `${i18nScope}.fields.summary.hint`,
59
- },
60
64
  messages: [
61
65
  {
62
66
  type: "ERROR",
@@ -67,36 +71,53 @@ exports.buildUiSchema = async (i18nScope, options, context) => {
67
71
  ],
68
72
  },
69
73
  },
70
- // description
74
+ ...getThumbnailUiSchemaElement_1.getThumbnailUiSchemaElement(i18nScope, options.thumbnail, options.thumbnailUrl, "content", context.requestOptions),
71
75
  {
72
- labelKey: `${i18nScope}.fields.description.label`,
73
- scope: "/properties/description",
74
- type: "Control",
76
+ type: "Section",
77
+ labelKey: `${i18nScope}.sections.description.label`,
75
78
  options: {
76
- control: "hub-field-input-rich-text",
77
- type: "textarea",
78
- helperText: {
79
- labelKey: `${i18nScope}.fields.description.hint`,
80
- },
79
+ section: "block",
81
80
  },
81
+ elements: [
82
+ // description
83
+ {
84
+ labelKey: `${i18nScope}.fields.description.label`,
85
+ scope: "/properties/description",
86
+ type: "Control",
87
+ options: {
88
+ control: "hub-field-input-rich-text",
89
+ type: "textarea",
90
+ },
91
+ },
92
+ ],
82
93
  },
83
- ...getThumbnailUiSchemaElement_1.getThumbnailUiSchemaElement(i18nScope, options.thumbnail, options.thumbnailUrl, "content", context.requestOptions),
84
- // tags
85
94
  {
86
- labelKey: `${i18nScope}.fields.tags.label`,
87
- scope: "/properties/tags",
88
- type: "Control",
95
+ type: "Section",
96
+ labelKey: `${i18nScope}.sections.discoverability.label`,
89
97
  options: {
90
- control: "hub-field-input-combobox",
91
- items: await getTagItems_1.getTagItems(options.tags, context.portal.id, context.hubRequestOptions),
92
- allowCustomValues: true,
93
- selectionMode: "multiple",
94
- placeholderIcon: "label",
95
- helperText: { labelKey: `${i18nScope}.fields.tags.hint` },
98
+ section: "block",
99
+ helperText: {
100
+ labelKey: `${i18nScope}.sections.discoverability.helperText`,
101
+ },
96
102
  },
103
+ elements: [
104
+ // tags
105
+ {
106
+ labelKey: `${i18nScope}.fields.tags.label`,
107
+ scope: "/properties/tags",
108
+ type: "Control",
109
+ options: {
110
+ control: "hub-field-input-combobox",
111
+ items: await getTagItems_1.getTagItems(options.tags, context.portal.id, context.hubRequestOptions),
112
+ allowCustomValues: true,
113
+ selectionMode: "multiple",
114
+ placeholderIcon: "label",
115
+ },
116
+ },
117
+ // categories
118
+ ...(await fetchCategoriesUiSchemaElement_1.fetchCategoriesUiSchemaElement(i18nScope, context)),
119
+ ],
97
120
  },
98
- // categories
99
- ...(await fetchCategoriesUiSchemaElement_1.fetchCategoriesUiSchemaElement(i18nScope, context)),
100
121
  // license
101
122
  {
102
123
  labelKey: `${i18nScope}.fields.license.label`,
@@ -104,9 +125,6 @@ exports.buildUiSchema = async (i18nScope, options, context) => {
104
125
  type: "Control",
105
126
  options: {
106
127
  control: "arcgis-hub-license-picker",
107
- helperText: {
108
- labelKey: `${i18nScope}.fields.license.helperText`,
109
- },
110
128
  },
111
129
  },
112
130
  ],
@@ -115,11 +133,6 @@ exports.buildUiSchema = async (i18nScope, options, context) => {
115
133
  {
116
134
  type: "Section",
117
135
  labelKey: `${i18nScope}.sections.location.label`,
118
- options: {
119
- helperText: {
120
- labelKey: `${i18nScope}.sections.location.helperText`,
121
- },
122
- },
123
136
  elements: [
124
137
  {
125
138
  scope: "/properties/location",
@@ -1 +1 @@
1
- {"version":3,"file":"ContentUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentUiSchemaEdit.ts"],"names":[],"mappings":";;;AACA,yEAAsE;AACtE,qFAAkF;AAClF,uFAAoF;AAEpF,yGAAsG;AAEtG,+GAA4G;AAE5G;;;;;GAKG;AACU,QAAA,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAAqC,EACrC,OAAuB,EACH,EAAE;IACtB,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gB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,EAChB,OAAO,CAAC,iBAAiB,CAC1B;4BACD,OAAO,EAAE,MAAM,uCAAkB,CAC/B,OAAO,CAAC,EAAE,EACV,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,MAAM,CAAC,IAAI,EACnB,OAAO,CAAC,iBAAiB,CAC1B;4BACD,2BAA2B,EAAE,CAAC;yBAC/B;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"ContentUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentUiSchemaEdit.ts"],"names":[],"mappings":";;;AACA,yEAAsE;AACtE,qFAAkF;AAClF,uFAAoF;AAEpF,yGAAsG;AAEtG,+GAA4G;AAC5G,2FAA2F;AAE3F;;;;;GAKG;AACU,QAAA,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAAqC,EACrC,OAAuB,EACH,EAAE;IACtB,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,uBAAuB;gBAC7C,OAAO,EAAE;oBACP,UAAU,EAAE;wBACV,QAAQ,EAAE,GAAG,SAAS,4BAA4B;qBACnD;iBACF;gBACD,QAAQ,EAAE;oBACR,QAAQ;oBACR;wBACE,QAAQ,EAAE,GAAG,SAAS,qBAAqB;wBAC3C,KAAK,EAAE,kBAAkB;wBACzB,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,UAAU,EAAE;gCACV,QAAQ,EAAE,GAAG,SAAS,oBAAoB;6BAC3C;4BACD,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,UAAU;oCACnB,IAAI,EAAE,IAAI;oCACV,QAAQ,EAAE,GAAG,SAAS,6BAA6B;iCACpD;gCACD;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,WAAW;oCACpB,IAAI,E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AAO,EAAE;oCACP,OAAO,EAAE,0BAA0B;oCACnC,KAAK,EAAE,MAAM,yBAAW,CACtB,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,MAAM,CAAC,EAAE,EACjB,OAAO,CAAC,iBAAiB,CAC1B;oCACD,iBAAiB,EAAE,IAAI;oCACvB,aAAa,EAAE,UAAU;oCACzB,eAAe,EAAE,OAAO;iCACzB;6BACF;4BACD,aAAa;4BACb,GAAG,CAAC,MAAM,+DAA8B,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;yBAC9D;qBACF;oBACD,UAAU;oBACV;wBACE,QAAQ,EAAE,GAAG,SAAS,uBAAuB;wBAC7C,KAAK,EAAE,yBAAyB;wBAChC,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,2BAA2B;yBACrC;qBACF;iBACF;aACF;YACD,mBAAmB;YACnB;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,0BAA0B;gBAChD,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,sBAAsB;wBAC7B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,iCAAiC;4BAC1C,MAAM,EAAE,MAAM,qCAAiB,CAC7B,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,iBAAiB,CAC1B;4BACD,OAAO,EAAE,MAAM,uCAAkB,CAC/B,OAAO,CAAC,EAAE,EACV,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,MAAM,CAAC,IAAI,EACnB,OAAO,CAAC,iBAAiB,CAC1B;4BACD,2BAA2B,EAAE,CAAC;yBAC/B;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -22,11 +22,20 @@ exports.addDynamicSlugValidation = (schema, options) => {
22
22
  // add conditional validation to ensure slug is unique
23
23
  const allOf = util_1.cloneObject(schema.allOf) || [];
24
24
  const { pattern } = _slug;
25
+ // remove pattern from base schema so the form doesn't always apply the pattern
26
+ // validation. We will add it back to the allOf conditionally
27
+ delete _slug.pattern;
25
28
  const { id } = options;
26
29
  allOf.push({
30
+ // only enforce the pattern if slug has been entered
31
+ if: { properties: { _slug: { minLength: 1 } } },
32
+ then: { properties: { _slug: { pattern } } },
33
+ }, {
27
34
  // only do async isUniqueSlug check if the slug is valid
28
35
  if: { properties: { _slug: { pattern } } },
29
- then: { properties: { _slug: { isUniqueSlug: { id, orgUrlKey } } } },
36
+ then: {
37
+ properties: { _slug: { isUniqueSlug: { id, orgUrlKey } } },
38
+ },
30
39
  });
31
40
  const clone = util_1.cloneObject(schema);
32
41
  clone.properties._slug = _slug;
@@ -1 +1 @@
1
- {"version":3,"file":"addDynamicSlugValidation.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/addDynamicSlugValidation.ts"],"names":[],"mappings":";;;AACA,0DAAkE;AAClE,wCAA4C;AAM5C;;;;;;GAMG;AACU,QAAA,wBAAwB,GAAG,CACtC,MAA4B,EAC5B,OAAsB,EACA,EAAE;;IACxB,MAAM,KAAK,GAAG,kBAAW,OAAC,MAAM,CAAC,UAAU,0CAAE,KAAK,CAAe,CAAC;IAClE,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,MAAM,CAAC;KACf;IACD,yBAAyB;IACzB,MAAM,EAAE,SAAS,EAAE,GAAG,OAAoB,CAAC;IAC3C,KAAK,CAAC,SAAS,GAAG,wBAAgB,CAAC,SAAS,CAAC,CAAC;IAC9C,sDAAsD;IACtD,MAAM,KAAK,GAAG,kBAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC9C,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,EAAE,EAAE,EAAE,GAAG,OAAoB,CAAC;IACpC,KAAK,CAAC,IAAI,CAAC;QACT,wDAAwD;QACxD,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAS,EAAE,EAAE;KAC5E,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,kBAAW,CAAC,MAAM,CAAC,CAAC;IAClC,KAAK,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;IAC/B,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IACpB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
1
+ {"version":3,"file":"addDynamicSlugValidation.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/addDynamicSlugValidation.ts"],"names":[],"mappings":";;;AACA,0DAAkE;AAClE,wCAA4C;AAM5C;;;;;;GAMG;AACU,QAAA,wBAAwB,GAAG,CACtC,MAA4B,EAC5B,OAAsB,EACA,EAAE;;IACxB,MAAM,KAAK,GAAG,kBAAW,OAAC,MAAM,CAAC,UAAU,0CAAE,KAAK,CAAe,CAAC;IAClE,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,MAAM,CAAC;KACf;IACD,yBAAyB;IACzB,MAAM,EAAE,SAAS,EAAE,GAAG,OAAoB,CAAC;IAC3C,KAAK,CAAC,SAAS,GAAG,wBAAgB,CAAC,SAAS,CAAC,CAAC;IAC9C,sDAAsD;IACtD,MAAM,KAAK,GAAG,kBAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAE9C,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,+EAA+E;IAC/E,6DAA6D;IAC7D,OAAO,KAAK,CAAC,OAAO,CAAC;IAErB,MAAM,EAAE,EAAE,EAAE,GAAG,OAAoB,CAAC;IAEpC,KAAK,CAAC,IAAI,CACR;QACE,oDAAoD;QACpD,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE;QAC/C,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;KAC7C,EACD;QACE,wDAAwD;QACxD,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,IAAI,EAAE;YACJ,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAS,EAAE;SAClE;KACF,CACF,CAAC;IAEF,MAAM,KAAK,GAAG,kBAAW,CAAC,MAAM,CAAC,CAAC;IAClC,KAAK,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;IAC/B,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IACpB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
@@ -24,10 +24,6 @@ async function fetchCategoriesUiSchemaElement(i18nScope, context) {
24
24
  allowCustomValues: false,
25
25
  selectionMode: "ancestors",
26
26
  placeholderIcon: "select-category",
27
- helperText: {
28
- // helper text varies between entity types
29
- labelKey: `${i18nScope}.fields.categories.helperText`,
30
- },
31
27
  },
32
28
  rules: [
33
29
  {
@@ -1 +1 @@
1
- {"version":3,"file":"fetchCategoriesUiSchemaElement.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/fetchCategoriesUiSchemaElement.ts"],"names":[],"mappings":";;;AACA,oCAAiE;AACjE,6DAA0D;AAE1D;;;;;;;GAOG;AACI,KAAK,UAAU,8BAA8B,CAClD,SAAiB,EACjB,OAAuB;IAEvB,MAAM,aAAa,GAAG,MAAM,uCAAkB,CAC5C,OAAO,CAAC,MAAM,CAAC,EAAE,EACjB,OAAO,CAAC,iBAAiB,CAC1B,CAAC;IAEF,OAAO;QACL;YACE,QAAQ,EAAE,gCAAgC;YAC1C,KAAK,EAAE,wBAAwB;YAC/B,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,0BAA0B;gBACnC,KAAK,EAAE,aAAa;gBACpB,iBAAiB,EAAE,KAAK;gBACxB,aAAa,EAAE,WAAW;gBAC1B,eAAe,EAAE,iBAAiB;gBAClC,UAAU,EAAE;oBACV,0CAA0C;oBAC1C,QAAQ,EAAE,GAAG,SAAS,+BAA+B;iBACtD;aACF;YACD,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,2BAAmB,CAAC,OAAO;oBACnC,UAAU,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC;iBACpC;aACF;SACF;QACD;YACE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,aAAa,EAAE;wBACb,EAAE,EAAE,sBAAsB;wBAC1B,UAAU,EAAE,QAAQ;wBACpB,QAAQ,EAAE,KAAK;wBACf,IAAI,EAAE,2BAA2B;wBACjC,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,GAAG;qBACX;oBACD,OAAO,EACL,gEAAgE;oBAClE,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE;wBACP;4BACE,KAAK,EACH,gEAAgE;4BAClE,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,0EAA0E;4BAChF,MAAM,EAAE,QAAQ;yBACjB;qBACF;iBACF;aACF;YACD,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,2BAAmB,CAAC,IAAI;oBAChC,UAAU,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC;iBACpC;aACF;SACF;KACF,CAAC;AACJ,CAAC;AAlED,wEAkEC"}
1
+ {"version":3,"file":"fetchCategoriesUiSchemaElement.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/fetchCategoriesUiSchemaElement.ts"],"names":[],"mappings":";;;AACA,oCAAiE;AACjE,6DAA0D;AAE1D;;;;;;;GAOG;AACI,KAAK,UAAU,8BAA8B,CAClD,SAAiB,EACjB,OAAuB;IAEvB,MAAM,aAAa,GAAG,MAAM,uCAAkB,CAC5C,OAAO,CAAC,MAAM,CAAC,EAAE,EACjB,OAAO,CAAC,iBAAiB,CAC1B,CAAC;IAEF,OAAO;QACL;YACE,QAAQ,EAAE,gCAAgC;YAC1C,KAAK,EAAE,wBAAwB;YAC/B,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,0BAA0B;gBACnC,KAAK,EAAE,aAAa;gBACpB,iBAAiB,EAAE,KAAK;gBACxB,aAAa,EAAE,WAAW;gBAC1B,eAAe,EAAE,iBAAiB;aACnC;YACD,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,2BAAmB,CAAC,OAAO;oBACnC,UAAU,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC;iBACpC;aACF;SACF;QACD;YACE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,MAAM,EAAE;oBACN,aAAa,EAAE;wBACb,EAAE,EAAE,sBAAsB;wBAC1B,UAAU,EAAE,QAAQ;wBACpB,QAAQ,EAAE,KAAK;wBACf,IAAI,EAAE,2BAA2B;wBACjC,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,GAAG;qBACX;oBACD,OAAO,EACL,gEAAgE;oBAClE,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE;wBACP;4BACE,KAAK,EACH,gEAAgE;4BAClE,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,0EAA0E;4BAChF,MAAM,EAAE,QAAQ;yBACjB;qBACF;iBACF;aACF;YACD,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,2BAAmB,CAAC,IAAI;oBAChC,UAAU,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC;iBACpC;aACF;SACF;KACF,CAAC;AACJ,CAAC;AA9DD,wEA8DC"}
@@ -8,9 +8,6 @@ exports.getSlugSchemaElement = (i18nScope) => {
8
8
  type: "Control",
9
9
  options: {
10
10
  control: "hub-field-input-input",
11
- helperText: {
12
- labelKey: `${i18nScope}.fields.slug.helperText`,
13
- },
14
11
  messages: [
15
12
  {
16
13
  type: "ERROR",
@@ -1 +1 @@
1
- {"version":3,"file":"getSlugSchemaElement.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/getSlugSchemaElement.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAG,CAAC,SAAiB,EAAoB,EAAE;IAC1E,OAAO;QACL,QAAQ,EAAE,GAAG,SAAS,oBAAoB;QAC1C,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACP,OAAO,EAAE,uBAAuB;YAChC,UAAU,EAAE;gBACV,QAAQ,EAAE,GAAG,SAAS,yBAAyB;aAChD;YACD,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,SAAS;oBAClB,IAAI,EAAE,IAAI;oBACV,QAAQ,EAAE,GAAG,SAAS,2BAA2B;iBAClD;gBACD;oBACE,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,cAAc;oBACvB,IAAI,EAAE,IAAI;oBACV,QAAQ,EAAE,GAAG,SAAS,4BAA4B;iBACnD;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"getSlugSchemaElement.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/getSlugSchemaElement.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAG,CAAC,SAAiB,EAAoB,EAAE;IAC1E,OAAO;QACL,QAAQ,EAAE,GAAG,SAAS,oBAAoB;QAC1C,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACP,OAAO,EAAE,uBAAuB;YAChC,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,SAAS;oBAClB,IAAI,EAAE,IAAI;oBACV,QAAQ,EAAE,GAAG,SAAS,2BAA2B;iBAClD;gBACD;oBACE,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,cAAc;oBACvB,IAAI,EAAE,IAAI;oBACV,QAAQ,EAAE,GAAG,SAAS,4BAA4B;iBACnD;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -46,11 +46,6 @@ function getThumbnailUiSchemaElement(i18nScope, thumbnail, thumbnailUrl, entityT
46
46
  },
47
47
  };
48
48
  }
49
- // We want the notice to appear in the image picker rather than below it
50
- // this is a design requirement for proper element indexing
51
- const notice = !thumbnail || thumbnail === "thumbnail/ago_downloaded.png"
52
- ? "20250425-image-picker-notice"
53
- : null;
54
49
  return [
55
50
  {
56
51
  labelKey: entityType === "group"
@@ -58,13 +53,7 @@ function getThumbnailUiSchemaElement(i18nScope, thumbnail, thumbnailUrl, entityT
58
53
  : "shared.fields._thumbnail.label",
59
54
  scope: "/properties/_thumbnail",
60
55
  type: "Control",
61
- options: Object.assign({ control: "hub-field-input-image-picker", imgSrc: thumbnailUrl, defaultImgUrl, maxWidth: 727, maxHeight: 484, helperText: {
62
- // helper text varies between entity types
63
- labelKey: `${i18nScope}.fields._thumbnail.helperText`,
64
- },
65
- // Advise the user if the entity's thumbnail is either of the default values,
66
- // and this notice will appear above the image picker but below the helper text
67
- notice }, options),
56
+ options: Object.assign({ control: "hub-field-input-image-picker", imgSrc: thumbnailUrl, defaultImgUrl, maxWidth: 727, maxHeight: 484 }, options),
68
57
  },
69
58
  ];
70
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getThumbnailUiSchemaElement.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/getThumbnailUiSchemaElement.ts"],"names":[],"mappings":";;;AACA,wCAA+C;AAI/C,MAAM,yBAAyB,GAA2C;IACxE,UAAU,EACR,6EAA6E;IAC/E,KAAK,EACH,wEAAwE;IAC1E,KAAK,EACH,wEAAwE;IAC1E,OAAO,EACL,0EAA0E;CAC7E,CAAC;AAEF;;;;;;;GAOG;AACH,SAAgB,2BAA2B,CACzC,SAAiB,EACjB,SAAiB,EACjB,YAAoB,EACpB,UAAyB,EACzB,cAA+B;;IAE/B,MAAM,sBAAsB,SAC1B,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
+ {"version":3,"file":"getThumbnailUiSchemaElement.js","sourceRoot":"","sources":["../../../../../src/core/schemas/internal/getThumbnailUiSchemaElement.ts"],"names":[],"mappings":";;;AACA,wCAA+C;AAI/C,MAAM,yBAAyB,GAA2C;IACxE,UAAU,EACR,6EAA6E;IAC/E,KAAK,EACH,wEAAwE;IAC1E,KAAK,EACH,wEAAwE;IAC1E,OAAO,EACL,0EAA0E;CAC7E,CAAC;AAEF;;;;;;;GAOG;AACH,SAAgB,2BAA2B,CACzC,SAAiB,EACjB,SAAiB,EACjB,YAAoB,EACpB,UAAyB,EACzB,cAA+B;;IAE/B,MAAM,sBAAsB,SAC1B,yBAAyB,CAAC,UAAU,CAAC,mCAAI,yBAAyB,CAAC,OAAO,CAAC;IAC7E,MAAM,aAAa,GAAG,qBAAc,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC;IAE7E,IAAI,OAAO,CAAC;IACZ,IAAI,UAAU,KAAK,OAAO,EAAE;QAC1B,OAAO,GAAG;YACR,WAAW,EAAE,CAAC;YACd,eAAe,EAAE;gBACf,QAAQ,EAAE,GAAG,SAAS,oCAAoC;aAC3D;SACF,CAAC;KACH;SAAM,IAAI,UAAU,KAAK,OAAO,EAAE;QACjC,OAAO,GAAG;YACR,WAAW,EAAE,GAAG;YAChB,eAAe,EAAE;gBACf,QAAQ,EAAE,0CAA0C;aACrD;YACD,OAAO,EAAE,CAAC,KAAK,CAAC;SACjB,CAAC;KACH;SAAM;QACL,OAAO,GAAG;YACR,WAAW,EAAE,GAAG;YAChB,eAAe,EAAE;gBACf,QAAQ,EAAE,0CAA0C;aACrD;SACF,CAAC;KACH;IAED,OAAO;QACL;YACE,QAAQ,EACN,UAAU,KAAK,OAAO;gBACpB,CAAC,CAAC,GAAG,SAAS,0BAA0B;gBACxC,CAAC,CAAC,gCAAgC;YACtC,KAAK,EAAE,wBAAwB;YAC/B,IAAI,EAAE,SAAS;YACf,OAAO,kBACL,OAAO,EAAE,8BAA8B,EACvC,MAAM,EAAE,YAAY,EACpB,aAAa,EACb,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,GAAG,IACX,OAAO,CACX;SACF;KACF,CAAC;AACJ,CAAC;AAtDD,kEAsDC"}
@@ -26,6 +26,11 @@ function editorToEntity(editor, portal) {
26
26
  // ensure the slug is truncated
27
27
  entity.slug = slugs_1.truncateSlug(_slug, entity.orgUrlKey);
28
28
  }
29
+ else {
30
+ // if no slug is passed in, save an empty string as the slug, so that
31
+ // it is not saved as the orgUrlKey truncated with an empty string
32
+ entity.slug = "";
33
+ }
29
34
  return entity;
30
35
  }
31
36
  exports.editorToEntity = editorToEntity;
@@ -1 +1 @@
1
- {"version":3,"file":"editorToEntity.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/metrics/editorToEntity.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAE/C,6DAAiE;AAEjE,oEAAoE;AACpE;;;;;;GAMG;AACH,SAAgB,cAAc,CAC5B,MAA4C,EAC5C,MAAe;;IAEf,yDAAyD;IACzD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3B,OAAO,MAAM,CAAC,KAAK,CAAC;IAEpB,kEAAkE;IAClE,yBAAyB;IACzB,MAAM,MAAM,GAAG,kBAAW,CAAC,MAAM,CAAmB,CAAC;IACrD,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IAEvE,wCAAwC;IACxC,MAAM,CAAC,MAAM,SAAG,MAAM,CAAC,QAAQ,0CAAE,MAAM,CAAC;IAExC,IAAI,KAAK,EAAE;QACT,+BAA+B;QAC/B,MAAM,CAAC,IAAI,GAAG,oBAAY,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;KACrD;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAtBD,wCAsBC"}
1
+ {"version":3,"file":"editorToEntity.js","sourceRoot":"","sources":["../../../../../../src/core/schemas/internal/metrics/editorToEntity.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAE/C,6DAAiE;AAEjE,oEAAoE;AACpE;;;;;;GAMG;AACH,SAAgB,cAAc,CAC5B,MAA4C,EAC5C,MAAe;;IAEf,yDAAyD;IACzD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3B,OAAO,MAAM,CAAC,KAAK,CAAC;IAEpB,kEAAkE;IAClE,yBAAyB;IACzB,MAAM,MAAM,GAAG,kBAAW,CAAC,MAAM,CAAmB,CAAC;IACrD,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IAEvE,wCAAwC;IACxC,MAAM,CAAC,MAAM,SAAG,MAAM,CAAC,QAAQ,0CAAE,MAAM,CAAC;IAExC,IAAI,KAAK,EAAE;QACT,+BAA+B;QAC/B,MAAM,CAAC,IAAI,GAAG,oBAAY,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;KACrD;SAAM;QACL,qEAAqE;QACrE,kEAAkE;QAClE,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;KAClB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AA1BD,wCA0BC"}