@esri/hub-common 14.9.0 → 14.10.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 (151) hide show
  1. package/dist/esm/content/HubContent.js.map +1 -1
  2. package/dist/esm/content/_internal/ContentUiSchemaEdit.js +127 -113
  3. package/dist/esm/content/_internal/ContentUiSchemaEdit.js.map +1 -1
  4. package/dist/esm/content/_internal/computeProps.js +3 -1
  5. package/dist/esm/content/_internal/computeProps.js.map +1 -1
  6. package/dist/esm/core/schemas/getEditorConfig.js +1 -3
  7. package/dist/esm/core/schemas/getEditorConfig.js.map +1 -1
  8. package/dist/esm/core/schemas/index.js +0 -1
  9. package/dist/esm/core/schemas/index.js.map +1 -1
  10. package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js +23 -27
  11. package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js.map +1 -1
  12. package/dist/esm/core/schemas/internal/getFeaturedImageUrl.js +3 -1
  13. package/dist/esm/core/schemas/internal/getFeaturedImageUrl.js.map +1 -1
  14. package/dist/esm/core/schemas/internal/index.js +0 -1
  15. package/dist/esm/core/schemas/internal/index.js.map +1 -1
  16. package/dist/esm/discussions/HubDiscussion.js.map +1 -1
  17. package/dist/esm/discussions/_internal/DiscussionUiSchemaCreate.js +23 -21
  18. package/dist/esm/discussions/_internal/DiscussionUiSchemaCreate.js.map +1 -1
  19. package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js +167 -154
  20. package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -1
  21. package/dist/esm/groups/HubGroup.js.map +1 -1
  22. package/dist/esm/groups/_internal/GroupUiSchemaEdit.js +53 -50
  23. package/dist/esm/groups/_internal/GroupUiSchemaEdit.js.map +1 -1
  24. package/dist/esm/groups/_internal/GroupUiSchemaSettings.js +39 -36
  25. package/dist/esm/groups/_internal/GroupUiSchemaSettings.js.map +1 -1
  26. package/dist/esm/initiatives/HubInitiative.js +1 -15
  27. package/dist/esm/initiatives/HubInitiative.js.map +1 -1
  28. package/dist/esm/initiatives/_internal/InitiativeUiSchemaCreate.js +118 -104
  29. package/dist/esm/initiatives/_internal/InitiativeUiSchemaCreate.js.map +1 -1
  30. package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js +108 -95
  31. package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
  32. package/dist/esm/pages/HubPage.js +1 -5
  33. package/dist/esm/pages/HubPage.js.map +1 -1
  34. package/dist/esm/pages/_internal/PageUiSchemaEdit.js +108 -97
  35. package/dist/esm/pages/_internal/PageUiSchemaEdit.js.map +1 -1
  36. package/dist/esm/projects/HubProject.js +1 -1
  37. package/dist/esm/projects/HubProject.js.map +1 -1
  38. package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js +124 -113
  39. package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
  40. package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js +206 -191
  41. package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
  42. package/dist/esm/projects/edit.js +0 -13
  43. package/dist/esm/projects/edit.js.map +1 -1
  44. package/dist/esm/sites/HubSite.js.map +1 -1
  45. package/dist/esm/sites/_internal/SiteSchema.js +1 -1
  46. package/dist/esm/sites/_internal/SiteSchema.js.map +1 -1
  47. package/dist/esm/sites/_internal/SiteUiSchemaCreate.js +118 -110
  48. package/dist/esm/sites/_internal/SiteUiSchemaCreate.js.map +1 -1
  49. package/dist/esm/sites/_internal/SiteUiSchemaEdit.js +106 -95
  50. package/dist/esm/sites/_internal/SiteUiSchemaEdit.js.map +1 -1
  51. package/dist/node/content/HubContent.js.map +1 -1
  52. package/dist/node/content/_internal/ContentUiSchemaEdit.js +128 -114
  53. package/dist/node/content/_internal/ContentUiSchemaEdit.js.map +1 -1
  54. package/dist/node/content/_internal/computeProps.js +3 -1
  55. package/dist/node/content/_internal/computeProps.js.map +1 -1
  56. package/dist/node/core/schemas/getEditorConfig.js +1 -3
  57. package/dist/node/core/schemas/getEditorConfig.js.map +1 -1
  58. package/dist/node/core/schemas/index.js +0 -1
  59. package/dist/node/core/schemas/index.js.map +1 -1
  60. package/dist/node/core/schemas/internal/getEntityEditorSchemas.js +23 -27
  61. package/dist/node/core/schemas/internal/getEntityEditorSchemas.js.map +1 -1
  62. package/dist/node/core/schemas/internal/getFeaturedImageUrl.js +3 -1
  63. package/dist/node/core/schemas/internal/getFeaturedImageUrl.js.map +1 -1
  64. package/dist/node/core/schemas/internal/index.js +0 -1
  65. package/dist/node/core/schemas/internal/index.js.map +1 -1
  66. package/dist/node/discussions/HubDiscussion.js.map +1 -1
  67. package/dist/node/discussions/_internal/DiscussionUiSchemaCreate.js +24 -22
  68. package/dist/node/discussions/_internal/DiscussionUiSchemaCreate.js.map +1 -1
  69. package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js +168 -155
  70. package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -1
  71. package/dist/node/groups/HubGroup.js.map +1 -1
  72. package/dist/node/groups/_internal/GroupUiSchemaEdit.js +54 -51
  73. package/dist/node/groups/_internal/GroupUiSchemaEdit.js.map +1 -1
  74. package/dist/node/groups/_internal/GroupUiSchemaSettings.js +40 -37
  75. package/dist/node/groups/_internal/GroupUiSchemaSettings.js.map +1 -1
  76. package/dist/node/initiatives/HubInitiative.js +1 -15
  77. package/dist/node/initiatives/HubInitiative.js.map +1 -1
  78. package/dist/node/initiatives/_internal/InitiativeUiSchemaCreate.js +119 -105
  79. package/dist/node/initiatives/_internal/InitiativeUiSchemaCreate.js.map +1 -1
  80. package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js +109 -96
  81. package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
  82. package/dist/node/pages/HubPage.js +1 -5
  83. package/dist/node/pages/HubPage.js.map +1 -1
  84. package/dist/node/pages/_internal/PageUiSchemaEdit.js +109 -98
  85. package/dist/node/pages/_internal/PageUiSchemaEdit.js.map +1 -1
  86. package/dist/node/projects/HubProject.js +1 -1
  87. package/dist/node/projects/HubProject.js.map +1 -1
  88. package/dist/node/projects/_internal/ProjectUiSchemaCreate.js +125 -114
  89. package/dist/node/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
  90. package/dist/node/projects/_internal/ProjectUiSchemaEdit.js +207 -192
  91. package/dist/node/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
  92. package/dist/node/projects/edit.js +1 -15
  93. package/dist/node/projects/edit.js.map +1 -1
  94. package/dist/node/sites/HubSite.js.map +1 -1
  95. package/dist/node/sites/_internal/SiteSchema.js +1 -1
  96. package/dist/node/sites/_internal/SiteSchema.js.map +1 -1
  97. package/dist/node/sites/_internal/SiteUiSchemaCreate.js +119 -111
  98. package/dist/node/sites/_internal/SiteUiSchemaCreate.js.map +1 -1
  99. package/dist/node/sites/_internal/SiteUiSchemaEdit.js +107 -96
  100. package/dist/node/sites/_internal/SiteUiSchemaEdit.js.map +1 -1
  101. package/dist/types/content/HubContent.d.ts +2 -2
  102. package/dist/types/content/_internal/ContentUiSchemaEdit.d.ts +6 -1
  103. package/dist/types/core/schemas/index.d.ts +0 -1
  104. package/dist/types/core/schemas/internal/getEntityEditorSchemas.d.ts +4 -2
  105. package/dist/types/core/schemas/internal/index.d.ts +0 -1
  106. package/dist/types/core/schemas/types.d.ts +1 -1
  107. package/dist/types/discussions/HubDiscussion.d.ts +2 -2
  108. package/dist/types/discussions/_internal/DiscussionUiSchemaCreate.d.ts +6 -4
  109. package/dist/types/discussions/_internal/DiscussionUiSchemaEdit.d.ts +7 -5
  110. package/dist/types/groups/HubGroup.d.ts +2 -2
  111. package/dist/types/groups/_internal/GroupUiSchemaEdit.d.ts +7 -5
  112. package/dist/types/groups/_internal/GroupUiSchemaSettings.d.ts +6 -4
  113. package/dist/types/initiatives/HubInitiative.d.ts +2 -14
  114. package/dist/types/initiatives/_internal/InitiativeUiSchemaCreate.d.ts +10 -5
  115. package/dist/types/initiatives/_internal/InitiativeUiSchemaEdit.d.ts +7 -3
  116. package/dist/types/pages/HubPage.d.ts +2 -4
  117. package/dist/types/pages/_internal/PageUiSchemaEdit.d.ts +7 -5
  118. package/dist/types/projects/HubProject.d.ts +2 -2
  119. package/dist/types/projects/_internal/ProjectUiSchemaCreate.d.ts +7 -5
  120. package/dist/types/projects/_internal/ProjectUiSchemaEdit.d.ts +7 -5
  121. package/dist/types/projects/edit.d.ts +0 -10
  122. package/dist/types/sites/HubSite.d.ts +2 -2
  123. package/dist/types/sites/_internal/SiteSchema.d.ts +1 -1
  124. package/dist/types/sites/_internal/SiteUiSchemaCreate.d.ts +10 -5
  125. package/dist/types/sites/_internal/SiteUiSchemaEdit.d.ts +5 -3
  126. package/package.json +1 -1
  127. package/dist/esm/core/schemas/getEntityEditorSchemas.js +0 -94
  128. package/dist/esm/core/schemas/getEntityEditorSchemas.js.map +0 -1
  129. package/dist/esm/core/schemas/internal/applyUiSchemaElementOptions.js +0 -31
  130. package/dist/esm/core/schemas/internal/applyUiSchemaElementOptions.js.map +0 -1
  131. package/dist/esm/core/schemas/internal/configOptionHelpers.js +0 -98
  132. package/dist/esm/core/schemas/internal/configOptionHelpers.js.map +0 -1
  133. package/dist/esm/core/schemas/internal/getConfigOptions.js +0 -15
  134. package/dist/esm/core/schemas/internal/getConfigOptions.js.map +0 -1
  135. package/dist/esm/core/schemas/internal/getEditorConfigOptions.js +0 -37
  136. package/dist/esm/core/schemas/internal/getEditorConfigOptions.js.map +0 -1
  137. package/dist/node/core/schemas/getEntityEditorSchemas.js +0 -97
  138. package/dist/node/core/schemas/getEntityEditorSchemas.js.map +0 -1
  139. package/dist/node/core/schemas/internal/applyUiSchemaElementOptions.js +0 -35
  140. package/dist/node/core/schemas/internal/applyUiSchemaElementOptions.js.map +0 -1
  141. package/dist/node/core/schemas/internal/configOptionHelpers.js +0 -101
  142. package/dist/node/core/schemas/internal/configOptionHelpers.js.map +0 -1
  143. package/dist/node/core/schemas/internal/getConfigOptions.js +0 -19
  144. package/dist/node/core/schemas/internal/getConfigOptions.js.map +0 -1
  145. package/dist/node/core/schemas/internal/getEditorConfigOptions.js +0 -41
  146. package/dist/node/core/schemas/internal/getEditorConfigOptions.js.map +0 -1
  147. package/dist/types/core/schemas/getEntityEditorSchemas.d.ts +0 -14
  148. package/dist/types/core/schemas/internal/applyUiSchemaElementOptions.d.ts +0 -10
  149. package/dist/types/core/schemas/internal/configOptionHelpers.d.ts +0 -6
  150. package/dist/types/core/schemas/internal/getConfigOptions.d.ts +0 -12
  151. package/dist/types/core/schemas/internal/getEditorConfigOptions.d.ts +0 -11
@@ -1,129 +1,137 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.uiSchema = void 0;
4
- const core_1 = require("../../core");
3
+ exports.buildUiSchema = void 0;
4
+ const checkPermission_1 = require("../../permissions/checkPermission");
5
+ const types_1 = require("../../core/schemas/types");
6
+ const getLocationExtent_1 = require("../../core/schemas/internal/getLocationExtent");
7
+ const getLocationOptions_1 = require("../../core/schemas/internal/getLocationOptions");
8
+ const getSharableGroupsComboBoxItems_1 = require("../../core/schemas/internal/getSharableGroupsComboBoxItems");
5
9
  /**
6
10
  * @private
7
- * minimal create uiSchema for Hub Projects - this defines
8
- * how the schema properties should be rendered in the
9
- * project creation experience
11
+ * constructs the minimal create uiSchema for Hub Sites.
12
+ * This defines how the schema properties should be rendered
13
+ * in the site creation experience
14
+ *
15
+ * TODO: this was copied from projects and is just a placeholder
16
+ * for now - it isn't being used anywhere in the application
10
17
  */
11
- exports.uiSchema = {
12
- type: "Layout",
13
- elements: [
14
- {
15
- type: "Section",
16
- options: { section: "stepper", scale: "l" },
17
- elements: [
18
- {
19
- type: "Step",
20
- labelKey: "{{i18nScope}}.sections.details.label",
21
- elements: [
22
- {
23
- type: "Section",
24
- labelKey: "{{i18nScope}}.sections.basicInfo.label",
25
- elements: [
26
- {
27
- labelKey: "{{i18nScope}}.fields.name.label",
28
- scope: "/properties/name",
29
- type: "Control",
30
- options: {
31
- messages: [
32
- {
33
- type: "ERROR",
34
- keyword: "required",
35
- icon: true,
36
- labelKey: "{{i18nScope}}.fields.name.requiredError",
37
- },
38
- ],
39
- },
40
- },
41
- {
42
- labelKey: "{{i18nScope}}.fields.summary.label",
43
- scope: "/properties/summary",
44
- type: "Control",
45
- options: {
46
- control: "hub-field-input-input",
47
- type: "textarea",
48
- helperText: {
49
- labelKey: "{{i18nScope}}.fields.summary.helperText",
18
+ exports.buildUiSchema = async (i18nScope, entity, context) => {
19
+ return {
20
+ type: "Layout",
21
+ elements: [
22
+ {
23
+ type: "Section",
24
+ options: { section: "stepper", scale: "l" },
25
+ elements: [
26
+ {
27
+ type: "Step",
28
+ labelKey: `${i18nScope}.sections.details.label`,
29
+ elements: [
30
+ {
31
+ type: "Section",
32
+ labelKey: `${i18nScope}.sections.basicInfo.label`,
33
+ elements: [
34
+ {
35
+ labelKey: `${i18nScope}.fields.name.label`,
36
+ scope: "/properties/name",
37
+ type: "Control",
38
+ options: {
39
+ messages: [
40
+ {
41
+ type: "ERROR",
42
+ keyword: "required",
43
+ icon: true,
44
+ labelKey: `${i18nScope}.fields.name.requiredError`,
45
+ },
46
+ ],
50
47
  },
51
48
  },
52
- },
53
- {
54
- labelKey: "{{i18nScope}}.fields.status.label",
55
- scope: "/properties/status",
56
- type: "Control",
57
- options: {
58
- control: "hub-field-input-select",
59
- enum: {
60
- i18nScope: "{{i18nScope}}.fields.status.enum",
49
+ {
50
+ labelKey: `${i18nScope}.fields.summary.label`,
51
+ scope: "/properties/summary",
52
+ type: "Control",
53
+ options: {
54
+ control: "hub-field-input-input",
55
+ type: "textarea",
56
+ helperText: {
57
+ labelKey: `${i18nScope}.fields.summary.helperText`,
58
+ },
61
59
  },
62
60
  },
63
- },
64
- ],
65
- },
66
- ],
67
- },
68
- {
69
- type: "Step",
70
- labelKey: "{{i18nScope}}.sections.location.label",
71
- rule: {
72
- effect: core_1.UiSchemaRuleEffects.DISABLE,
73
- condition: {
74
- scope: "/properties/name",
75
- schema: { const: "" },
76
- },
61
+ ],
62
+ },
63
+ ],
77
64
  },
78
- elements: [
79
- {
80
- type: "Section",
81
- labelKey: "{{i18nScope}}.sections.location.label",
82
- elements: [
83
- {
84
- scope: "/properties/location",
85
- type: "Control",
86
- options: {
87
- control: "hub-field-input-location-picker",
65
+ {
66
+ type: "Step",
67
+ labelKey: `${i18nScope}.sections.location.label`,
68
+ rule: {
69
+ effect: types_1.UiSchemaRuleEffects.DISABLE,
70
+ condition: {
71
+ scope: "/properties/name",
72
+ schema: { const: "" },
73
+ },
74
+ },
75
+ elements: [
76
+ {
77
+ type: "Section",
78
+ labelKey: `${i18nScope}.sections.location.label`,
79
+ options: {
80
+ helperText: {
81
+ labelKey: `${i18nScope}.sections.location.helperText`,
88
82
  },
89
83
  },
90
- ],
91
- },
92
- ],
93
- },
94
- {
95
- type: "Step",
96
- labelKey: "{{i18nScope}}.sections.sharing.label",
97
- rule: {
98
- effect: core_1.UiSchemaRuleEffects.DISABLE,
99
- condition: {
100
- scope: "/properties/name",
101
- schema: { const: "" },
102
- },
84
+ elements: [
85
+ {
86
+ scope: "/properties/location",
87
+ type: "Control",
88
+ options: {
89
+ control: "hub-field-input-location-picker",
90
+ extent: await getLocationExtent_1.getLocationExtent(entity, context.hubRequestOptions),
91
+ options: await getLocationOptions_1.getLocationOptions(entity, context.portal.name, context.hubRequestOptions),
92
+ },
93
+ },
94
+ ],
95
+ },
96
+ ],
103
97
  },
104
- elements: [
105
- {
106
- scope: "/properties/access",
107
- type: "Control",
108
- options: {
109
- control: "arcgis-hub-access-level-controls",
110
- itemType: "{{{{i18nScope}}.fields.access.itemType:translate}}",
98
+ {
99
+ type: "Step",
100
+ labelKey: `${i18nScope}.sections.sharing.label`,
101
+ rule: {
102
+ effect: types_1.UiSchemaRuleEffects.DISABLE,
103
+ condition: {
104
+ scope: "/properties/name",
105
+ schema: { const: "" },
111
106
  },
112
107
  },
113
- {
114
- labelKey: "{{i18nScope}}.fields.groups.label",
115
- scope: "/properties/groups",
116
- type: "Control",
117
- options: {
118
- control: "hub-field-input-combobox",
119
- allowCustomValues: false,
120
- selectionMode: "multiple",
108
+ elements: [
109
+ {
110
+ scope: "/properties/access",
111
+ type: "Control",
112
+ options: {
113
+ control: "arcgis-hub-access-level-controls",
114
+ orgName: context.portal.name,
115
+ itemType: `{{${i18nScope}.fields.access.itemType:translate}`,
116
+ },
121
117
  },
122
- },
123
- ],
124
- },
125
- ],
126
- },
127
- ],
118
+ {
119
+ labelKey: `${i18nScope}.fields.groups.label`,
120
+ scope: "/properties/_groups",
121
+ type: "Control",
122
+ options: {
123
+ control: "hub-field-input-combobox",
124
+ items: getSharableGroupsComboBoxItems_1.getSharableGroupsComboBoxItems(context.currentUser.groups),
125
+ disabled: !checkPermission_1.checkPermission("platform:portal:user:shareToGroup", context),
126
+ allowCustomValues: false,
127
+ selectionMode: "multiple",
128
+ },
129
+ },
130
+ ],
131
+ },
132
+ ],
133
+ },
134
+ ],
135
+ };
128
136
  };
129
137
  //# sourceMappingURL=SiteUiSchemaCreate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SiteUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaCreate.ts"],"names":[],"mappings":";;;AAAA,qCAA4D;AAE5D;;;;;GAKG;AACU,QAAA,QAAQ,GAAc;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;YAC3C,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,sCAAsC;oBAChD,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,SAAS;4BACf,QAAQ,EAAE,wCAAwC;4BAClD,QAAQ,EAAE;gCACR;oCACE,QAAQ,EAAE,iCAAiC;oCAC3C,KAAK,EAAE,kBAAkB;o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C,SAAS,EAAE;4BACT,KAAK,EAAE,kBAAkB;4BACzB,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;yBACtB;qBACF;oBACD,QAAQ,EAAE;wBACR;4BACE,KAAK,EAAE,oBAAoB;4BAC3B,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE;gCACP,OAAO,EAAE,kCAAkC;gCAC3C,QAAQ,EAAE,oDAAoD;6BAC/D;yBACF;wBACD;4BACE,QAAQ,EAAE,mCAAmC;4BAC7C,KAAK,EAAE,oBAAoB;4BAC3B,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE;gCACP,OAAO,EAAE,0BAA0B;gCACnC,iBAAiB,EAAE,KAAK;gCACxB,aAAa,EAAE,UAAU;6BAC1B;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"SiteUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaCreate.ts"],"names":[],"mappings":";;;AACA,uEAAoE;AAEpE,oDAA0E;AAC1E,qFAAkF;AAClF,uFAAoF;AACpF,+GAA4G;AAE5G;;;;;;;;GAQG;AACU,QAAA,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,MAAgB,EAChB,OAAuB,EACH,EAAE;IACtB,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;gBAC3C,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,GAAG,SAAS,yBAAyB;wBAC/C,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,SAAS;gCACf,QAAQ,EAAE,GAAG,SAAS,2BAA2B;gCACjD,QAAQ,EAAE;oCACR;wCACE,QAAQ,EAAE,GAAG,SAAS,oBAAoB;wCAC1C,KAAK,EAAE,kBAAkB;wCACzB,IA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ACF;qBACF;oBACD;wBACE,IAAI,EAAE,MAAM;wBACZ,QAAQ,EAAE,GAAG,SAAS,yBAAyB;wBAC/C,IAAI,EAAE;4BACJ,MAAM,EAAE,2BAAmB,CAAC,OAAO;4BACnC,SAAS,EAAE;gCACT,KAAK,EAAE,kBAAkB;gCACzB,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;6BACtB;yBACF;wBACD,QAAQ,EAAE;4BACR;gCACE,KAAK,EAAE,oBAAoB;gCAC3B,IAAI,EAAE,SAAS;gCACf,OAAO,EAAE;oCACP,OAAO,EAAE,kCAAkC;oCAC3C,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;oCAC5B,QAAQ,EAAE,KAAK,SAAS,oCAAoC;iCAC7D;6BACF;4BACD;gCACE,QAAQ,EAAE,GAAG,SAAS,sBAAsB;gCAC5C,KAAK,EAAE,qBAAqB;gCAC5B,IAAI,EAAE,SAAS;gCACf,OAAO,EAAE;oCACP,OAAO,EAAE,0BAA0B;oCACnC,KAAK,EAAE,+DAA8B,CACnC,OAAO,CAAC,WAAW,CAAC,MAAM,CAC3B;oCACD,QAAQ,EAAE,CAAC,iCAAe,CACxB,mCAAmC,EACnC,OAAO,CACR;oCACD,iBAAiB,EAAE,KAAK;oCACxB,aAAa,EAAE,UAAU;iCAC1B;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,118 +1,129 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.uiSchema = void 0;
3
+ exports.buildUiSchema = void 0;
4
+ const getCategoryItems_1 = require("../../core/schemas/internal/getCategoryItems");
5
+ const getLocationExtent_1 = require("../../core/schemas/internal/getLocationExtent");
6
+ const getLocationOptions_1 = require("../../core/schemas/internal/getLocationOptions");
7
+ const getTagItems_1 = require("../../core/schemas/internal/getTagItems");
4
8
  /**
5
9
  * @private
6
- * complete edit uiSchema for Hub Projects - this defines
10
+ * construct edit uiSchema for Hub Projects - this defines
7
11
  * how the schema properties should be rendered in the
8
12
  * project editing experience
9
13
  */
10
- exports.uiSchema = {
11
- type: "Layout",
12
- elements: [
13
- {
14
- type: "Section",
15
- labelKey: "{{i18nScope}}.sections.basicInfo.label",
16
- elements: [
17
- {
18
- labelKey: "{{i18nScope}}.fields.name.label",
19
- scope: "/properties/name",
20
- type: "Control",
21
- options: {
22
- messages: [
23
- {
24
- type: "ERROR",
25
- keyword: "required",
26
- icon: true,
27
- labelKey: "{{i18nScope}}.fields.name.requiredError",
28
- },
29
- ],
14
+ exports.buildUiSchema = async (i18nScope, entity, context) => {
15
+ return {
16
+ type: "Layout",
17
+ elements: [
18
+ {
19
+ type: "Section",
20
+ labelKey: `${i18nScope}.sections.basicInfo.label`,
21
+ elements: [
22
+ {
23
+ labelKey: `${i18nScope}.fields.name.label`,
24
+ scope: "/properties/name",
25
+ type: "Control",
26
+ options: {
27
+ messages: [
28
+ {
29
+ type: "ERROR",
30
+ keyword: "required",
31
+ icon: true,
32
+ labelKey: `${i18nScope}.fields.name.requiredError`,
33
+ },
34
+ ],
35
+ },
30
36
  },
31
- },
32
- {
33
- labelKey: "{{i18nScope}}.fields.summary.label",
34
- scope: "/properties/summary",
35
- type: "Control",
36
- options: {
37
- control: "hub-field-input-input",
38
- type: "textarea",
39
- helperText: {
40
- labelKey: "{{i18nScope}}.fields.summary.helperText",
37
+ {
38
+ labelKey: `${i18nScope}.fields.summary.label`,
39
+ scope: "/properties/summary",
40
+ type: "Control",
41
+ options: {
42
+ control: "hub-field-input-input",
43
+ type: "textarea",
44
+ helperText: {
45
+ labelKey: `${i18nScope}.fields.summary.helperText`,
46
+ },
41
47
  },
42
48
  },
43
- },
44
- {
45
- labelKey: "{{i18nScope}}.fields.description.label",
46
- scope: "/properties/description",
47
- type: "Control",
48
- options: {
49
- control: "hub-field-input-input",
50
- type: "textarea",
51
- helperText: {
52
- labelKey: "{{i18nScope}}.fields.description.helperText",
49
+ {
50
+ labelKey: `${i18nScope}.fields.description.label`,
51
+ scope: "/properties/description",
52
+ type: "Control",
53
+ options: {
54
+ control: "hub-field-input-input",
55
+ type: "textarea",
56
+ helperText: {
57
+ labelKey: `${i18nScope}.fields.description.helperText`,
58
+ },
53
59
  },
54
60
  },
55
- },
56
- {
57
- labelKey: "{{i18nScope}}.fields._thumbnail.label",
58
- scope: "/properties/_thumbnail",
59
- type: "Control",
60
- options: {
61
- control: "hub-field-input-image-picker",
62
- maxWidth: 727,
63
- maxHeight: 484,
64
- aspectRatio: 1.5,
65
- helperText: {
66
- labelKey: "{{i18nScope}}.fields._thumbnail.helperText",
61
+ {
62
+ labelKey: `${i18nScope}.fields._thumbnail.label`,
63
+ scope: "/properties/_thumbnail",
64
+ type: "Control",
65
+ options: {
66
+ control: "hub-field-input-image-picker",
67
+ imgSrc: entity.thumbnailUrl,
68
+ maxWidth: 727,
69
+ maxHeight: 484,
70
+ aspectRatio: 1.5,
71
+ helperText: {
72
+ labelKey: `${i18nScope}.fields._thumbnail.helperText`,
73
+ },
67
74
  },
68
75
  },
69
- },
70
- {
71
- labelKey: "{{i18nScope}}.fields.tags.label",
72
- scope: "/properties/tags",
73
- type: "Control",
74
- options: {
75
- control: "hub-field-input-combobox",
76
- allowCustomValues: true,
77
- selectionMode: "multiple",
78
- placeholderIcon: "label",
79
- helperText: { labelKey: "{{i18nScope}}.fields.tags.helperText" },
76
+ {
77
+ labelKey: `${i18nScope}.fields.tags.label`,
78
+ scope: "/properties/tags",
79
+ type: "Control",
80
+ options: {
81
+ control: "hub-field-input-combobox",
82
+ items: await getTagItems_1.getTagItems(entity, context.portal.id, context.hubRequestOptions),
83
+ allowCustomValues: true,
84
+ selectionMode: "multiple",
85
+ placeholderIcon: "label",
86
+ helperText: { labelKey: `${i18nScope}.fields.tags.helperText` },
87
+ },
80
88
  },
81
- },
82
- {
83
- labelKey: "{{i18nScope}}.fields.categories.label",
84
- scope: "/properties/categories",
85
- type: "Control",
86
- options: {
87
- control: "hub-field-input-combobox",
88
- allowCustomValues: false,
89
- selectionMode: "multiple",
90
- placeholderIcon: "select-category",
91
- helperText: {
92
- labelKey: "{{i18nScope}}.fields.categories.helperText",
89
+ {
90
+ labelKey: `${i18nScope}.fields.categories.label`,
91
+ scope: "/properties/categories",
92
+ type: "Control",
93
+ options: {
94
+ control: "hub-field-input-combobox",
95
+ items: await getCategoryItems_1.getCategoryItems(context.portal.id, context.hubRequestOptions),
96
+ allowCustomValues: false,
97
+ selectionMode: "multiple",
98
+ placeholderIcon: "select-category",
99
+ helperText: {
100
+ labelKey: `${i18nScope}.fields.categories.helperText`,
101
+ },
93
102
  },
94
103
  },
95
- },
96
- ],
97
- },
98
- {
99
- type: "Section",
100
- labelKey: "{{i18nScope}}.sections.location.label",
101
- options: {
102
- helperText: {
103
- labelKey: "{{i18nScope}}.sections.location.helperText",
104
- },
104
+ ],
105
105
  },
106
- elements: [
107
- {
108
- scope: "/properties/location",
109
- type: "Control",
110
- options: {
111
- control: "hub-field-input-location-picker",
106
+ {
107
+ type: "Section",
108
+ labelKey: `${i18nScope}.sections.location.label`,
109
+ options: {
110
+ helperText: {
111
+ labelKey: `${i18nScope}.sections.location.helperText`,
112
112
  },
113
113
  },
114
- ],
115
- },
116
- ],
114
+ elements: [
115
+ {
116
+ scope: "/properties/location",
117
+ type: "Control",
118
+ options: {
119
+ control: "hub-field-input-location-picker",
120
+ extent: await getLocationExtent_1.getLocationExtent(entity, context.hubRequestOptions),
121
+ options: await getLocationOptions_1.getLocationOptions(entity, context.portal.name, context.hubRequestOptions),
122
+ },
123
+ },
124
+ ],
125
+ },
126
+ ],
127
+ };
117
128
  };
118
129
  //# sourceMappingURL=SiteUiSchemaEdit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SiteUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaEdit.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACU,QAAA,QAAQ,GAAc;IACjC,IAAI,EAAE,QAAQ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wBACvB,aAAa,EAAE,UAAU;wBACzB,eAAe,EAAE,OAAO;wBACxB,UAAU,EAAE,EAAE,QAAQ,EAAE,sCAAsC,EAAE;qBACjE;iBACF;gBACD;oBACE,QAAQ,EAAE,uCAAuC;oBACjD,KAAK,EAAE,wBAAwB;oBAC/B,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,0BAA0B;wBACnC,iBAAiB,EAAE,KAAK;wBACxB,aAAa,EAAE,UAAU;wBACzB,eAAe,EAAE,iBAAiB;wBAClC,UAAU,EAAE;4BACV,QAAQ,EAAE,4CAA4C;yBACvD;qBACF;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,uCAAuC;YACjD,OAAO,EAAE;gBACP,UAAU,EAAE;oBACV,QAAQ,EAAE,4CAA4C;iBACvD;aACF;YACD,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,sBAAsB;oBAC7B,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,iCAAiC;qBAC3C;iBACF;aACF;SACF;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"SiteUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaEdit.ts"],"names":[],"mappings":";;;AACA,mFAAgF;AAChF,qFAAkF;AAClF,uFAAoF;AACpF,yEAAsE;AAItE;;;;;GAKG;AACU,QAAA,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,MAAgB,EAChB,OAAuB,EACH,EAAE;IACtB,OAAO;QACL,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,EAA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1B;4BACD,iBAAiB,EAAE,IAAI;4BACvB,aAAa,EAAE,UAAU;4BACzB,eAAe,EAAE,OAAO;4BACxB,UAAU,EAAE,EAAE,QAAQ,EAAE,GAAG,SAAS,yBAAyB,EAAE;yBAChE;qBACF;oBACD;wBACE,QAAQ,EAAE,GAAG,SAAS,0BAA0B;wBAChD,KAAK,EAAE,wBAAwB;wBAC/B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,0BAA0B;4BACnC,KAAK,EAAE,MAAM,mCAAgB,CAC3B,OAAO,CAAC,MAAM,CAAC,EAAE,EACjB,OAAO,CAAC,iBAAiB,CAC1B;4BACD,iBAAiB,EAAE,KAAK;4BACxB,aAAa,EAAE,UAAU;4BACzB,eAAe,EAAE,iBAAiB;4BAClC,UAAU,EAAE;gCACV,QAAQ,EAAE,GAAG,SAAS,+BAA+B;6BACtD;yBACF;qBACF;iBACF;aACF;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,0BAA0B;gBAChD,OAAO,EAAE;oBACP,UAAU,EAAE;wBACV,QAAQ,EAAE,GAAG,SAAS,+BAA+B;qBACtD;iBACF;gBACD,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,sBAAsB;wBAC7B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,iCAAiC;4BAC1C,MAAM,EAAE,MAAM,qCAAiB,CAC7B,MAAM,EACN,OAAO,CAAC,iBAAiB,CAC1B;4BACD,OAAO,EAAE,MAAM,uCAAkB,CAC/B,MAAM,EACN,OAAO,CAAC,MAAM,CAAC,IAAI,EACnB,OAAO,CAAC,iBAAiB,CAC1B;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { IArcGISContext } from "../ArcGISContext";
2
2
  import { HubItemEntity } from "../core/HubItemEntity";
3
- import { EditorType } from "../core/schemas/types";
4
3
  import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
5
4
  import { IHubContentEditor, IHubEditableContent } from "../core/types/IHubEditableContent";
6
5
  import { IWithStoreBehavior } from "../core/behaviors/IWithStoreBehavior";
7
6
  import { IEntityEditorContext } from "../core/types/HubEntityEditor";
7
+ import { ContentEditorType } from "./_internal/ContentSchema";
8
8
  export declare class HubContent extends HubItemEntity<IHubEditableContent> implements IWithStoreBehavior<IHubEditableContent>, IWithEditorBehavior {
9
9
  private constructor();
10
10
  /**
@@ -30,7 +30,7 @@ export declare class HubContent extends HubItemEntity<IHubEditableContent> imple
30
30
  * @returns
31
31
  */
32
32
  delete(): Promise<void>;
33
- getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
33
+ getEditorConfig(i18nScope: string, type: ContentEditorType): Promise<IEditorConfig>;
34
34
  /**
35
35
  * Return the project as an editor object
36
36
  * @param editorContext
@@ -1,5 +1,10 @@
1
1
  import { IUiSchema } from "../../core";
2
+ import { IArcGISContext } from "../../ArcGISContext";
3
+ import { IHubContent } from "../../core/types";
2
4
  /**
3
5
  * @private
6
+ * constructs the complete edit uiSchema for Hub Content.
7
+ * This defines how the schema properties should be
8
+ * rendered in the content editing experience
4
9
  */
5
- export declare const uiSchema: IUiSchema;
10
+ export declare const buildUiSchema: (i18nScope: string, entity: IHubContent, context: IArcGISContext) => Promise<IUiSchema>;
@@ -1,3 +1,2 @@
1
1
  export * from "./types";
2
- export * from "./getEntityEditorSchemas";
3
2
  export * from "./getEditorConfig";
@@ -1,5 +1,7 @@
1
1
  import { IEditorConfig } from "../../behaviors/IWithEditorBehavior";
2
- import { EditorType, UiSchemaElementOptions } from "../types";
2
+ import { EditorType } from "../types";
3
+ import { ConfigurableEntity } from "./ConfigurableEntity";
4
+ import { IArcGISContext } from "../../../ArcGISContext";
3
5
  /**
4
6
  * get the editor schema and uiSchema defined for an entity.
5
7
  * The schema and uiSchema that are returned can be used to
@@ -10,4 +12,4 @@ import { EditorType, UiSchemaElementOptions } from "../types";
10
12
  * @param options optional hash of dynamic uiSchema element options
11
13
  * @returns
12
14
  */
13
- export declare function getEntityEditorSchemas(i18nScope: string, type: EditorType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
15
+ export declare function getEntityEditorSchemas(i18nScope: string, type: EditorType, entity: ConfigurableEntity, context: IArcGISContext): Promise<IEditorConfig>;
@@ -1,4 +1,3 @@
1
1
  export * from "./getUiSchemaProps";
2
2
  export * from "./subsetSchema";
3
3
  export * from "./filterSchemaToUiSchema";
4
- export * from "./applyUiSchemaElementOptions";
@@ -5,7 +5,7 @@ import Ajv from "ajv";
5
5
  * to the supported/defined uiSchema configurations
6
6
  */
7
7
  export declare type EditorType = (typeof validEditorTypes)[number];
8
- export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:content:edit", "hub:initiative:edit", "hub:initiative:create", "hub:site:edit", "hub:discussion:edit", "hub:discussion:create", "hub:page:edit", "hub:group:edit", "hub:group:settings"];
8
+ export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:content:edit", "hub:initiative:edit", "hub:initiative:create", "hub:site:edit", "hub:site:create", "hub:discussion:edit", "hub:discussion:create", "hub:page:edit", "hub:group:edit", "hub:group:settings"];
9
9
  export declare enum UiSchemaRuleEffects {
10
10
  SHOW = "SHOW",
11
11
  HIDE = "HIDE",
@@ -2,8 +2,8 @@ import { IWithSharingBehavior, IWithStoreBehavior } from "../core/behaviors";
2
2
  import { IArcGISContext } from "../ArcGISContext";
3
3
  import { IEntityEditorContext, IHubDiscussion, IHubDiscussionEditor } from "../core/types";
4
4
  import { HubItemEntity } from "../core/HubItemEntity";
5
- import { EditorType } from "../core/schemas/types";
6
5
  import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
6
+ import { DiscussionEditorType } from "./_internal/DiscussionSchema";
7
7
  /**
8
8
  * Hub Discussion Class
9
9
  */
@@ -43,7 +43,7 @@ export declare class HubDiscussion extends HubItemEntity<IHubDiscussion> impleme
43
43
  * @returns a promise
44
44
  */
45
45
  delete(): Promise<void>;
46
- getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
46
+ getEditorConfig(i18nScope: string, type: DiscussionEditorType): Promise<IEditorConfig>;
47
47
  /**
48
48
  * Return the project as an editor object
49
49
  * @param editorContext
@@ -1,8 +1,10 @@
1
1
  import { IUiSchema } from "../../core";
2
+ import { IArcGISContext } from "../../ArcGISContext";
3
+ import { IHubDiscussion } from "../../core/types";
2
4
  /**
3
5
  * @private
4
- * create uiSchema for Hub Discussions - this
5
- * defines how the schema properties should be
6
- * rendered in the Discussions creation experience
6
+ * constructs the complete create uiSchema for Hub Discussions.
7
+ * This defines how the schema properties should be
8
+ * rendered in the discussion creation experience
7
9
  */
8
- export declare const uiSchema: IUiSchema;
10
+ export declare const buildUiSchema: (i18nScope: string, entity: IHubDiscussion, context: IArcGISContext) => Promise<IUiSchema>;