@esri/hub-common 14.98.1 → 14.100.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 (247) hide show
  1. package/dist/esm/core/EntityEditor.js +4 -0
  2. package/dist/esm/core/EntityEditor.js.map +1 -1
  3. package/dist/esm/core/fetchHubEntity.js +4 -0
  4. package/dist/esm/core/fetchHubEntity.js.map +1 -1
  5. package/dist/esm/core/getTypeFromEntity.js +3 -0
  6. package/dist/esm/core/getTypeFromEntity.js.map +1 -1
  7. package/dist/esm/core/schemas/internal/getEditorSchemas.js +10 -0
  8. package/dist/esm/core/schemas/internal/getEditorSchemas.js.map +1 -1
  9. package/dist/esm/core/schemas/types.js +2 -0
  10. package/dist/esm/core/schemas/types.js.map +1 -1
  11. package/dist/esm/core/types/HubEntityType.js +1 -0
  12. package/dist/esm/core/types/HubEntityType.js.map +1 -1
  13. package/dist/esm/core/types/IHubSurvey.js +1 -0
  14. package/dist/esm/core/types/IHubSurvey.js.map +1 -0
  15. package/dist/esm/core/types/index.js +1 -0
  16. package/dist/esm/core/types/index.js.map +1 -1
  17. package/dist/esm/discussions/HubDiscussion.js +1 -1
  18. package/dist/esm/discussions/api/settings/getDefaultEntitySettings.js +1 -0
  19. package/dist/esm/discussions/api/settings/getDefaultEntitySettings.js.map +1 -1
  20. package/dist/esm/index.js +1 -1
  21. package/dist/esm/index.js.map +1 -1
  22. package/dist/esm/permissions/HubPermissionPolicies.js +2 -0
  23. package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
  24. package/dist/esm/permissions/types/Permission.js +2 -0
  25. package/dist/esm/permissions/types/Permission.js.map +1 -1
  26. package/dist/esm/search/_internal/commonHelpers/getApi.js +1 -1
  27. package/dist/esm/search/_internal/commonHelpers/getApi.js.map +1 -1
  28. package/dist/esm/search/_internal/commonHelpers/getOgcApiDefinition.js +10 -5
  29. package/dist/esm/search/_internal/commonHelpers/getOgcApiDefinition.js.map +1 -1
  30. package/dist/esm/search/_internal/commonHelpers/shouldUseOgcApi.js +5 -1
  31. package/dist/esm/search/_internal/commonHelpers/shouldUseOgcApi.js.map +1 -1
  32. package/dist/esm/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js +18 -0
  33. package/dist/esm/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js.map +1 -1
  34. package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js +5 -0
  35. package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
  36. package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.js +29 -0
  37. package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.js.map +1 -0
  38. package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js.map +1 -1
  39. package/dist/esm/search/hubSearch.js +1 -0
  40. package/dist/esm/search/hubSearch.js.map +1 -1
  41. package/dist/esm/surveys/HubSurvey.js +130 -0
  42. package/dist/esm/surveys/HubSurvey.js.map +1 -0
  43. package/dist/esm/surveys/_internal/SurveyBusinessRules.js +78 -0
  44. package/dist/esm/surveys/_internal/SurveyBusinessRules.js.map +1 -0
  45. package/dist/esm/surveys/_internal/SurveySchema.js +18 -0
  46. package/dist/esm/surveys/_internal/SurveySchema.js.map +1 -0
  47. package/dist/esm/surveys/_internal/SurveyUiSchemaEdit.js +108 -0
  48. package/dist/esm/surveys/_internal/SurveyUiSchemaEdit.js.map +1 -0
  49. package/dist/esm/surveys/_internal/SurveyUiSchemaSettings.js +60 -0
  50. package/dist/esm/surveys/_internal/SurveyUiSchemaSettings.js.map +1 -0
  51. package/dist/esm/surveys/_internal/computeProps.js +35 -0
  52. package/dist/esm/surveys/_internal/computeProps.js.map +1 -0
  53. package/dist/esm/surveys/_internal/getPropertyMap.js +12 -0
  54. package/dist/esm/surveys/_internal/getPropertyMap.js.map +1 -0
  55. package/dist/esm/surveys/constants.js +2 -0
  56. package/dist/esm/surveys/constants.js.map +1 -0
  57. package/dist/esm/surveys/defaults.js +9 -0
  58. package/dist/esm/surveys/defaults.js.map +1 -0
  59. package/dist/esm/surveys/edit.js +49 -0
  60. package/dist/esm/surveys/edit.js.map +1 -0
  61. package/dist/esm/surveys/fetch.js +45 -0
  62. package/dist/esm/surveys/fetch.js.map +1 -0
  63. package/dist/esm/surveys/index.js +6 -5
  64. package/dist/esm/surveys/index.js.map +1 -1
  65. package/dist/esm/surveys/types.js +1 -0
  66. package/dist/esm/surveys/types.js.map +1 -0
  67. package/dist/esm/surveys/utils/decode-form.js +35 -0
  68. package/dist/esm/surveys/utils/decode-form.js.map +1 -0
  69. package/dist/esm/surveys/utils/get-form-info-json.js +12 -0
  70. package/dist/esm/surveys/utils/get-form-info-json.js.map +1 -0
  71. package/dist/esm/surveys/utils/get-form-json.js +65 -0
  72. package/dist/esm/surveys/utils/get-form-json.js.map +1 -0
  73. package/dist/esm/surveys/utils/get-input-feature-service-model.js.map +1 -0
  74. package/dist/esm/surveys/utils/get-map-question.js +31 -0
  75. package/dist/esm/surveys/utils/get-map-question.js.map +1 -0
  76. package/dist/esm/surveys/utils/get-source-feature-service-model-from-fieldworker.js.map +1 -0
  77. package/dist/esm/surveys/utils/get-stakeholder-model.js.map +1 -0
  78. package/dist/esm/surveys/utils/get-survey-models.js.map +1 -0
  79. package/dist/esm/surveys/utils/has-map-question.js +11 -0
  80. package/dist/esm/surveys/utils/has-map-question.js.map +1 -0
  81. package/dist/esm/surveys/utils/index.js +16 -0
  82. package/dist/esm/surveys/utils/index.js.map +1 -0
  83. package/dist/esm/surveys/utils/is-fieldworker-view.js.map +1 -0
  84. package/dist/esm/surveys/utils/is-map-question.js +16 -0
  85. package/dist/esm/surveys/utils/is-map-question.js.map +1 -0
  86. package/dist/esm/surveys/utils/is-page-question.js +9 -0
  87. package/dist/esm/surveys/utils/is-page-question.js.map +1 -0
  88. package/dist/esm/surveys/utils/is-survey123-connect.js +16 -0
  89. package/dist/esm/surveys/utils/is-survey123-connect.js.map +1 -0
  90. package/dist/esm/surveys/utils/set-display-map-keyword.js +15 -0
  91. package/dist/esm/surveys/utils/set-display-map-keyword.js.map +1 -0
  92. package/dist/esm/surveys/utils/should-display-map.js +10 -0
  93. package/dist/esm/surveys/utils/should-display-map.js.map +1 -0
  94. package/dist/node/core/EntityEditor.js +4 -0
  95. package/dist/node/core/EntityEditor.js.map +1 -1
  96. package/dist/node/core/fetchHubEntity.js +4 -0
  97. package/dist/node/core/fetchHubEntity.js.map +1 -1
  98. package/dist/node/core/getTypeFromEntity.js +3 -0
  99. package/dist/node/core/getTypeFromEntity.js.map +1 -1
  100. package/dist/node/core/schemas/internal/getEditorSchemas.js +10 -0
  101. package/dist/node/core/schemas/internal/getEditorSchemas.js.map +1 -1
  102. package/dist/node/core/schemas/types.js +2 -0
  103. package/dist/node/core/schemas/types.js.map +1 -1
  104. package/dist/node/core/types/HubEntityType.js +1 -0
  105. package/dist/node/core/types/HubEntityType.js.map +1 -1
  106. package/dist/node/core/types/IHubSurvey.js +3 -0
  107. package/dist/node/core/types/IHubSurvey.js.map +1 -0
  108. package/dist/node/core/types/index.js +1 -0
  109. package/dist/node/core/types/index.js.map +1 -1
  110. package/dist/node/discussions/HubDiscussion.js +1 -1
  111. package/dist/node/discussions/api/settings/getDefaultEntitySettings.js +1 -0
  112. package/dist/node/discussions/api/settings/getDefaultEntitySettings.js.map +1 -1
  113. package/dist/node/index.js +1 -1
  114. package/dist/node/index.js.map +1 -1
  115. package/dist/node/permissions/HubPermissionPolicies.js +2 -0
  116. package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
  117. package/dist/node/permissions/types/Permission.js +2 -0
  118. package/dist/node/permissions/types/Permission.js.map +1 -1
  119. package/dist/node/search/_internal/commonHelpers/getApi.js +1 -1
  120. package/dist/node/search/_internal/commonHelpers/getApi.js.map +1 -1
  121. package/dist/node/search/_internal/commonHelpers/getOgcApiDefinition.js +10 -5
  122. package/dist/node/search/_internal/commonHelpers/getOgcApiDefinition.js.map +1 -1
  123. package/dist/node/search/_internal/commonHelpers/shouldUseOgcApi.js +5 -1
  124. package/dist/node/search/_internal/commonHelpers/shouldUseOgcApi.js.map +1 -1
  125. package/dist/node/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js +19 -1
  126. package/dist/node/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js.map +1 -1
  127. package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js +5 -0
  128. package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
  129. package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.js +33 -0
  130. package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.js.map +1 -0
  131. package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js.map +1 -1
  132. package/dist/node/search/hubSearch.js +1 -0
  133. package/dist/node/search/hubSearch.js.map +1 -1
  134. package/dist/node/surveys/HubSurvey.js +134 -0
  135. package/dist/node/surveys/HubSurvey.js.map +1 -0
  136. package/dist/node/surveys/_internal/SurveyBusinessRules.js +81 -0
  137. package/dist/node/surveys/_internal/SurveyBusinessRules.js.map +1 -0
  138. package/dist/node/surveys/_internal/SurveySchema.js +21 -0
  139. package/dist/node/surveys/_internal/SurveySchema.js.map +1 -0
  140. package/dist/node/surveys/_internal/SurveyUiSchemaEdit.js +111 -0
  141. package/dist/node/surveys/_internal/SurveyUiSchemaEdit.js.map +1 -0
  142. package/dist/node/surveys/_internal/SurveyUiSchemaSettings.js +63 -0
  143. package/dist/node/surveys/_internal/SurveyUiSchemaSettings.js.map +1 -0
  144. package/dist/node/surveys/_internal/computeProps.js +39 -0
  145. package/dist/node/surveys/_internal/computeProps.js.map +1 -0
  146. package/dist/node/surveys/_internal/getPropertyMap.js +16 -0
  147. package/dist/node/surveys/_internal/getPropertyMap.js.map +1 -0
  148. package/dist/node/surveys/constants.js +5 -0
  149. package/dist/node/surveys/constants.js.map +1 -0
  150. package/dist/node/surveys/defaults.js +12 -0
  151. package/dist/node/surveys/defaults.js.map +1 -0
  152. package/dist/node/surveys/edit.js +54 -0
  153. package/dist/node/surveys/edit.js.map +1 -0
  154. package/dist/node/surveys/fetch.js +50 -0
  155. package/dist/node/surveys/fetch.js.map +1 -0
  156. package/dist/node/surveys/index.js +6 -5
  157. package/dist/node/surveys/index.js.map +1 -1
  158. package/dist/node/surveys/types.js +3 -0
  159. package/dist/node/surveys/types.js.map +1 -0
  160. package/dist/node/surveys/utils/decode-form.js +38 -0
  161. package/dist/node/surveys/utils/decode-form.js.map +1 -0
  162. package/dist/node/surveys/utils/get-form-info-json.js +15 -0
  163. package/dist/node/surveys/utils/get-form-info-json.js.map +1 -0
  164. package/dist/node/surveys/utils/get-form-json.js +68 -0
  165. package/dist/node/surveys/utils/get-form-json.js.map +1 -0
  166. package/dist/node/surveys/utils/get-input-feature-service-model.js.map +1 -0
  167. package/dist/node/surveys/utils/get-map-question.js +34 -0
  168. package/dist/node/surveys/utils/get-map-question.js.map +1 -0
  169. package/dist/node/surveys/utils/get-source-feature-service-model-from-fieldworker.js.map +1 -0
  170. package/dist/node/surveys/utils/get-stakeholder-model.js.map +1 -0
  171. package/dist/node/surveys/utils/get-survey-models.js.map +1 -0
  172. package/dist/node/surveys/utils/has-map-question.js +14 -0
  173. package/dist/node/surveys/utils/has-map-question.js.map +1 -0
  174. package/dist/node/surveys/utils/index.js +19 -0
  175. package/dist/node/surveys/utils/index.js.map +1 -0
  176. package/dist/node/surveys/utils/is-fieldworker-view.js.map +1 -0
  177. package/dist/node/surveys/utils/is-map-question.js +19 -0
  178. package/dist/node/surveys/utils/is-map-question.js.map +1 -0
  179. package/dist/node/surveys/utils/is-page-question.js +12 -0
  180. package/dist/node/surveys/utils/is-page-question.js.map +1 -0
  181. package/dist/node/surveys/utils/is-survey123-connect.js +19 -0
  182. package/dist/node/surveys/utils/is-survey123-connect.js.map +1 -0
  183. package/dist/node/surveys/utils/set-display-map-keyword.js +19 -0
  184. package/dist/node/surveys/utils/set-display-map-keyword.js.map +1 -0
  185. package/dist/node/surveys/utils/should-display-map.js +13 -0
  186. package/dist/node/surveys/utils/should-display-map.js.map +1 -0
  187. package/dist/types/core/schemas/types.d.ts +17 -2
  188. package/dist/types/core/types/HubEntity.d.ts +2 -1
  189. package/dist/types/core/types/HubEntityType.d.ts +1 -1
  190. package/dist/types/core/types/IHubSurvey.d.ts +11 -0
  191. package/dist/types/core/types/index.d.ts +1 -0
  192. package/dist/types/index.d.ts +1 -1
  193. package/dist/types/permissions/types/Permission.d.ts +2 -1
  194. package/dist/types/search/_internal/commonHelpers/getOgcApiDefinition.d.ts +2 -1
  195. package/dist/types/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.d.ts +1 -1
  196. package/dist/types/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.d.ts +11 -0
  197. package/dist/types/search/types/IHubCatalog.d.ts +1 -1
  198. package/dist/types/surveys/HubSurvey.d.ts +50 -0
  199. package/dist/types/surveys/_internal/SurveyBusinessRules.d.ts +12 -0
  200. package/dist/types/surveys/_internal/SurveySchema.d.ts +7 -0
  201. package/dist/types/surveys/_internal/SurveyUiSchemaEdit.d.ts +10 -0
  202. package/dist/types/surveys/_internal/SurveyUiSchemaSettings.d.ts +10 -0
  203. package/dist/types/surveys/_internal/computeProps.d.ts +12 -0
  204. package/dist/types/surveys/_internal/getPropertyMap.d.ts +8 -0
  205. package/dist/types/surveys/constants.d.ts +1 -0
  206. package/dist/types/surveys/defaults.d.ts +3 -0
  207. package/dist/types/surveys/edit.d.ts +17 -0
  208. package/dist/types/surveys/fetch.d.ts +20 -0
  209. package/dist/types/surveys/index.d.ts +6 -5
  210. package/dist/types/surveys/types.d.ts +15 -0
  211. package/dist/types/surveys/utils/decode-form.d.ts +8 -0
  212. package/dist/types/surveys/utils/get-form-info-json.d.ts +9 -0
  213. package/dist/types/surveys/utils/get-form-json.d.ts +8 -0
  214. package/dist/types/surveys/{get-input-feature-service-model.d.ts → utils/get-input-feature-service-model.d.ts} +1 -1
  215. package/dist/types/surveys/utils/get-map-question.d.ts +7 -0
  216. package/dist/types/surveys/{get-source-feature-service-model-from-fieldworker.d.ts → utils/get-source-feature-service-model-from-fieldworker.d.ts} +1 -1
  217. package/dist/types/surveys/{get-stakeholder-model.d.ts → utils/get-stakeholder-model.d.ts} +1 -1
  218. package/dist/types/surveys/{get-survey-models.d.ts → utils/get-survey-models.d.ts} +1 -1
  219. package/dist/types/surveys/utils/has-map-question.d.ts +8 -0
  220. package/dist/types/surveys/utils/index.d.ts +15 -0
  221. package/dist/types/surveys/utils/is-map-question.d.ts +7 -0
  222. package/dist/types/surveys/utils/is-page-question.d.ts +7 -0
  223. package/dist/types/surveys/utils/is-survey123-connect.d.ts +8 -0
  224. package/dist/types/surveys/utils/set-display-map-keyword.d.ts +7 -0
  225. package/dist/types/surveys/utils/should-display-map.d.ts +7 -0
  226. package/package.json +1 -1
  227. package/dist/esm/surveys/get-input-feature-service-model.js.map +0 -1
  228. package/dist/esm/surveys/get-source-feature-service-model-from-fieldworker.js.map +0 -1
  229. package/dist/esm/surveys/get-stakeholder-model.js.map +0 -1
  230. package/dist/esm/surveys/get-survey-models.js.map +0 -1
  231. package/dist/esm/surveys/is-fieldworker-view.js.map +0 -1
  232. package/dist/node/surveys/get-input-feature-service-model.js.map +0 -1
  233. package/dist/node/surveys/get-source-feature-service-model-from-fieldworker.js.map +0 -1
  234. package/dist/node/surveys/get-stakeholder-model.js.map +0 -1
  235. package/dist/node/surveys/get-survey-models.js.map +0 -1
  236. package/dist/node/surveys/is-fieldworker-view.js.map +0 -1
  237. /package/dist/esm/surveys/{get-input-feature-service-model.js → utils/get-input-feature-service-model.js} +0 -0
  238. /package/dist/esm/surveys/{get-source-feature-service-model-from-fieldworker.js → utils/get-source-feature-service-model-from-fieldworker.js} +0 -0
  239. /package/dist/esm/surveys/{get-stakeholder-model.js → utils/get-stakeholder-model.js} +0 -0
  240. /package/dist/esm/surveys/{get-survey-models.js → utils/get-survey-models.js} +0 -0
  241. /package/dist/esm/surveys/{is-fieldworker-view.js → utils/is-fieldworker-view.js} +0 -0
  242. /package/dist/node/surveys/{get-input-feature-service-model.js → utils/get-input-feature-service-model.js} +0 -0
  243. /package/dist/node/surveys/{get-source-feature-service-model-from-fieldworker.js → utils/get-source-feature-service-model-from-fieldworker.js} +0 -0
  244. /package/dist/node/surveys/{get-stakeholder-model.js → utils/get-stakeholder-model.js} +0 -0
  245. /package/dist/node/surveys/{get-survey-models.js → utils/get-survey-models.js} +0 -0
  246. /package/dist/node/surveys/{is-fieldworker-view.js → utils/is-fieldworker-view.js} +0 -0
  247. /package/dist/types/surveys/{is-fieldworker-view.d.ts → utils/is-fieldworker-view.d.ts} +0 -0
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setDisplayMapKeyword = void 0;
4
+ const constants_1 = require("../constants");
5
+ /**
6
+ * Adds or removes MAP_SURVEY_TYPEKEYWORD type keyword and returns the updated list
7
+ * @param {IGroup|IHubContent|IHubItemEntity} subject
8
+ * @param {boolean} displayMap
9
+ * @returns {string[]} updated list of type keywords
10
+ */
11
+ function setDisplayMapKeyword(typeKeywords, displayMap) {
12
+ const updatedTypeKeywords = (typeKeywords || []).filter((typeKeyword) => typeKeyword !== constants_1.MAP_SURVEY_TYPEKEYWORD);
13
+ if (displayMap) {
14
+ updatedTypeKeywords.push(constants_1.MAP_SURVEY_TYPEKEYWORD);
15
+ }
16
+ return updatedTypeKeywords;
17
+ }
18
+ exports.setDisplayMapKeyword = setDisplayMapKeyword;
19
+ //# sourceMappingURL=set-display-map-keyword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-display-map-keyword.js","sourceRoot":"","sources":["../../../../src/surveys/utils/set-display-map-keyword.ts"],"names":[],"mappings":";;;AAAA,4CAAsD;AAEtD;;;;;GAKG;AACH,SAAgB,oBAAoB,CAClC,YAAsB,EACtB,UAAmB;IAEnB,MAAM,mBAAmB,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,MAAM,CACrD,CAAC,WAAmB,EAAE,EAAE,CAAC,WAAW,KAAK,kCAAsB,CAChE,CAAC;IACF,IAAI,UAAU,EAAE;QACd,mBAAmB,CAAC,IAAI,CAAC,kCAAsB,CAAC,CAAC;KAClD;IACD,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAXD,oDAWC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shouldDisplayMap = void 0;
4
+ const constants_1 = require("../constants");
5
+ /**
6
+ * Determines the display mode of the given survey
7
+ * @param {Object} formItem A Form item
8
+ * @returns {boolean}
9
+ */
10
+ exports.shouldDisplayMap = (item) => {
11
+ return (item.type === "Form" && item.typeKeywords.includes(constants_1.MAP_SURVEY_TYPEKEYWORD));
12
+ };
13
+ //# sourceMappingURL=should-display-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"should-display-map.js","sourceRoot":"","sources":["../../../../src/surveys/utils/should-display-map.ts"],"names":[],"mappings":";;;AACA,4CAAsD;AAEtD;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,CAAC,IAAW,EAAE,EAAE;IAC9C,OAAO,CACL,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,kCAAsB,CAAC,CAC3E,CAAC;AACJ,CAAC,CAAC"}
@@ -12,7 +12,7 @@ export interface IEditorConfig {
12
12
  * to the supported/defined uiSchema configurations
13
13
  */
14
14
  export declare type EntityEditorType = (typeof validEntityEditorTypes)[number];
15
- export declare const validEntityEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit"];
15
+ export declare const validEntityEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings"];
16
16
  /** Defines the possible editor type values for a stat card. These
17
17
  * correspond to the supported/defined uiSchema configurations. This should
18
18
  * have its own signature in the getEditorConfig function.
@@ -36,7 +36,7 @@ export declare const validCardEditorTypes: readonly ["hub:card:stat", "hub:card:
36
36
  * to defined schema/uiSchema configurations
37
37
  */
38
38
  export declare type EditorType = (typeof validEditorTypes)[number];
39
- export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:card:stat", "hub:card:follow"];
39
+ export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings", "hub:card:stat", "hub:card:follow"];
40
40
  /**
41
41
  * An editor's module when dynamically imported depending on the EditorType. This
42
42
  * will always have a buildUiSchema function, and sometimes it will have a
@@ -174,3 +174,18 @@ export interface IUiSchemaCondition {
174
174
  scope?: string;
175
175
  schema: IConfigurationSchema;
176
176
  }
177
+ export interface IUiSchemaMessage {
178
+ type: UiSchemaMessageTypes;
179
+ display?: "message" | "notice";
180
+ keyword?: string;
181
+ title?: string;
182
+ titleKey?: string;
183
+ label?: string;
184
+ labelKey?: string;
185
+ icon?: boolean | string;
186
+ kind?: "brand" | "danger" | "info" | "success" | "warning";
187
+ hidden?: boolean;
188
+ condition?: IUiSchemaCondition;
189
+ allowShowBeforeInteract?: boolean;
190
+ alwaysShow?: boolean;
191
+ }
@@ -5,4 +5,5 @@ import { IHubSite } from "./IHubSite";
5
5
  import { IHubDiscussion } from "./IHubDiscussion";
6
6
  import { IHubGroup } from "./IHubGroup";
7
7
  import { IHubTemplate } from "./IHubTemplate";
8
- export declare type HubEntity = IHubSite | IHubProject | IHubDiscussion | IHubInitiative | IHubPage | IHubGroup | IHubTemplate;
8
+ import { IHubSurvey } from "./IHubSurvey";
9
+ export declare type HubEntity = IHubSite | IHubProject | IHubDiscussion | IHubInitiative | IHubPage | IHubGroup | IHubTemplate | IHubSurvey;
@@ -1,2 +1,2 @@
1
- export declare const HUB_ENTITY_TYPES: readonly ["site", "project", "initiative", "initiativeTemplate", "page", "discussion", "content", "org", "group", "template"];
1
+ export declare const HUB_ENTITY_TYPES: readonly ["site", "project", "initiative", "initiativeTemplate", "page", "discussion", "content", "org", "group", "template", "survey"];
2
2
  export declare type HubEntityType = (typeof HUB_ENTITY_TYPES)[number];
@@ -0,0 +1,11 @@
1
+ import { IWithPermissions } from "../traits";
2
+ import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
3
+ /**
4
+ * Defines properties of Hub Survey object
5
+ * @internal
6
+ */
7
+ export interface IHubSurvey extends IHubItemEntity, IWithPermissions {
8
+ hasMapQuestion: boolean;
9
+ displayMap: boolean;
10
+ }
11
+ export declare type IHubSurveyEditor = IHubItemEntityEditor<IHubSurvey> & {};
@@ -9,6 +9,7 @@ export * from "./IHubDiscussion";
9
9
  export * from "./IHubEditableContent";
10
10
  export * from "./IHubEntityBase";
11
11
  export * from "./IHubEvent";
12
+ export * from "./IHubSurvey";
12
13
  export * from "./IHubGroup";
13
14
  export * from "./IHubImage";
14
15
  export * from "./IHubInitiative";
@@ -14,6 +14,7 @@ export * from "./i18n";
14
14
  export * from "./initiatives";
15
15
  export * from "./initiative-templates";
16
16
  export * from "./discussions";
17
+ export * from "./surveys";
17
18
  export * from "./items";
18
19
  export * from "./models";
19
20
  export * from "./objects";
@@ -25,7 +26,6 @@ export * from "./request";
25
26
  export * from "./resources";
26
27
  export * from "./search";
27
28
  export * from "./sites";
28
- export * from "./surveys";
29
29
  export * from "./templates";
30
30
  export * from "./types";
31
31
  export * from "./urls";
@@ -8,6 +8,7 @@ import { PagePermissions } from "../../pages/_internal/PageBusinessRules";
8
8
  import { PlatformPermissions } from "../PlatformPermissionPolicies";
9
9
  import { InitiativeTemplatePermissions } from "../../initiative-templates/_internal/InitiativeTemplateBusinessRules";
10
10
  import { TemplatePermissions } from "../../templates/_internal/TemplateBusinessRules";
11
+ import { SurveyPermissions } from "../../surveys/_internal/SurveyBusinessRules";
11
12
  /**
12
13
  * Defines the values for Permissions
13
14
  * It's critical that the arrays defined in the modules use `as const`
@@ -18,7 +19,7 @@ declare const SystemPermissions: string[];
18
19
  /**
19
20
  * Defines the possible values for Permissions
20
21
  */
21
- export declare type Permission = (typeof SitePermissions)[number] | (typeof ProjectPermissions)[number] | (typeof InitiativePermissions)[number] | (typeof ContentPermissions)[number] | (typeof GroupPermissions)[number] | (typeof PagePermissions)[number] | (typeof PlatformPermissions)[number] | (typeof TempPermissions)[number] | (typeof DiscussionPermissions)[number] | (typeof InitiativeTemplatePermissions)[number] | (typeof TemplatePermissions)[number] | (typeof SystemPermissions)[number];
22
+ export declare type Permission = (typeof SitePermissions)[number] | (typeof ProjectPermissions)[number] | (typeof InitiativePermissions)[number] | (typeof ContentPermissions)[number] | (typeof GroupPermissions)[number] | (typeof PagePermissions)[number] | (typeof PlatformPermissions)[number] | (typeof TempPermissions)[number] | (typeof DiscussionPermissions)[number] | (typeof InitiativeTemplatePermissions)[number] | (typeof TemplatePermissions)[number] | (typeof SystemPermissions)[number] | (typeof SurveyPermissions)[number];
22
23
  /**
23
24
  * Validate a Permission
24
25
  * @param permission
@@ -1,3 +1,4 @@
1
+ import { EntityType } from "../../types";
1
2
  import { IHubSearchOptions } from "../../types/IHubSearchOptions";
2
3
  import { IApiDefinition } from "../../types/types";
3
4
  /**
@@ -7,4 +8,4 @@ import { IApiDefinition } from "../../types/types";
7
8
  * @param options IHubRequestOptions to derive OGC API info from
8
9
  * @returns an IApiDefinition with needed info to target the OGC API
9
10
  */
10
- export declare function getOgcApiDefinition(options: IHubSearchOptions): IApiDefinition;
11
+ export declare function getOgcApiDefinition(targetEntity: EntityType, options: IHubSearchOptions): IApiDefinition;
@@ -1,6 +1,6 @@
1
1
  import { IQuery } from "../../types/IHubCatalog";
2
2
  import { IHubSearchOptions } from "../../types/IHubSearchOptions";
3
3
  import { IHubSearchResponse } from "../../types/IHubSearchResponse";
4
- import { IHubSearchResult } from "../../types/IHubSearchResult";
5
4
  import { IOgcItemsResponse } from "./interfaces";
5
+ import { IHubSearchResult } from "../../types";
6
6
  export declare function formatOgcItemsResponse(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
@@ -0,0 +1,11 @@
1
+ import { IOgcItem } from "./interfaces";
2
+ import { IHubSearchResult } from "../../types";
3
+ /**
4
+ * This method is responsible for converting an OGC item whose properties
5
+ * represent an IPost into an IHubSearchResult. Although some fields do not
6
+ * apply, this is being done such that result of a discussion post search
7
+ * can automatically be used in a gallery.
8
+ * @param ogcItem
9
+ * @returns IHubSearchResult
10
+ */
11
+ export declare function ogcItemToDiscussionPostResult(ogcItem: IOgcItem): Promise<IHubSearchResult>;
@@ -50,7 +50,7 @@ export interface IHubCollection {
50
50
  */
51
51
  targetEntity: EntityType;
52
52
  }
53
- export declare type EntityType = "item" | "group" | "user" | "portalUser" | "communityUser" | "groupMember" | "event" | "channel";
53
+ export declare type EntityType = "item" | "group" | "user" | "portalUser" | "communityUser" | "groupMember" | "event" | "channel" | "discussionPost";
54
54
  /**
55
55
  * @private
56
56
  *
@@ -0,0 +1,50 @@
1
+ import { IArcGISContext } from "../ArcGISContext";
2
+ import { HubItemEntity } from "../core/HubItemEntity";
3
+ import { IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
4
+ import { IEditorConfig } from "../core/schemas/types";
5
+ import { HubEntityEditor, IEntityEditorContext } from "../core/types/HubEntityEditor";
6
+ import { IHubSurvey } from "../core/types/IHubSurvey";
7
+ import { SurveyEditorType } from "./_internal/SurveySchema";
8
+ /**
9
+ * Hub Survey Class
10
+ */
11
+ export declare class HubSurvey extends HubItemEntity<IHubSurvey> implements IWithEditorBehavior {
12
+ /**
13
+ * Create an instance from a HubSurvey object
14
+ * @param json - JSON object to create a HubSurvey from
15
+ * @param context - ArcGIS context
16
+ * @returns
17
+ */
18
+ static fromJson(json: Partial<IHubSurvey>, context: IArcGISContext): HubSurvey;
19
+ private static applyDefaults;
20
+ /**
21
+ * Apply a new state to the instance
22
+ * @param changes A partial IHubSurvey
23
+ */
24
+ update(changes: Partial<IHubSurvey>): void;
25
+ /**
26
+ * Save the class instance
27
+ */
28
+ save(): Promise<void>;
29
+ /**
30
+ * Delete the HubSurvey object from the store
31
+ * set a flag to indicate that it is destroyed
32
+ * @returns a promise
33
+ */
34
+ delete(): Promise<void>;
35
+ getEditorConfig(i18nScope: string, type: SurveyEditorType): Promise<IEditorConfig>;
36
+ /**
37
+ * Return the Survey object as an editor object
38
+ * @param editorContext
39
+ * @param include
40
+ * @returns
41
+ */
42
+ toEditor(editorContext?: IEntityEditorContext, include?: string[]): Promise<HubEntityEditor>;
43
+ /**
44
+ * Load the Survey object from the editor object
45
+ * @param editor
46
+ * @param editorContext
47
+ * @returns IHubSurvey
48
+ */
49
+ fromEditor(editor: HubEntityEditor, editorContext?: IEntityEditorContext): Promise<IHubSurvey>;
50
+ }
@@ -0,0 +1,12 @@
1
+ import { IPermissionPolicy } from "../../permissions/types/IPermissionPolicy";
2
+ /**
3
+ * survey Permission Policies
4
+ * These define the requirements any user must meet to perform related actions
5
+ * @private
6
+ */
7
+ export declare const SurveyPermissions: readonly ["hub:survey", "hub:survey:create", "hub:survey:delete", "hub:survey:edit", "hub:survey:view", "hub:survey:workspace", "hub:survey:workspace:dashboard", "hub:survey:workspace:details", "hub:survey:workspace:settings", "hub:survey:workspace:collaborators", "hub:survey:manage"];
8
+ /**
9
+ * Survey permission policies
10
+ * @private
11
+ */
12
+ export declare const SurveyPermissionPolicies: IPermissionPolicy[];
@@ -0,0 +1,7 @@
1
+ import { IConfigurationSchema } from "../../core/schemas/types";
2
+ export declare type SurveyEditorType = (typeof SurveyEditorTypes)[number];
3
+ export declare const SurveyEditorTypes: readonly ["hub:survey:edit", "hub:survey:settings"];
4
+ /**
5
+ * defines the JSON schema for a Survey entity's editable fields
6
+ */
7
+ export declare const SurveySchema: IConfigurationSchema;
@@ -0,0 +1,10 @@
1
+ import { IArcGISContext } from "../../ArcGISContext";
2
+ import { IUiSchema } from "../../core/schemas/types";
3
+ import { IHubSurvey } from "../../core/types/IHubSurvey";
4
+ /**
5
+ * @private
6
+ * constructs the complete edit uiSchema for Hub Survey.
7
+ * This defines how the schema properties should be
8
+ * rendered in the survey editing experience
9
+ */
10
+ export declare const buildUiSchema: (i18nScope: string, options: Partial<IHubSurvey>, context: IArcGISContext) => Promise<IUiSchema>;
@@ -0,0 +1,10 @@
1
+ import { IArcGISContext } from "../../ArcGISContext";
2
+ import { EntityEditorOptions } from "../../core/schemas/internal/EditorOptions";
3
+ import { IUiSchema } from "../../core/schemas/types";
4
+ /**
5
+ * @private
6
+ * settings uiSchema for Hub Survey - this
7
+ * defines how the schema properties should be
8
+ * rendered in the Survey settings experience
9
+ */
10
+ export declare const buildUiSchema: (i18nScope: string, options: EntityEditorOptions, context: IArcGISContext) => Promise<IUiSchema>;
@@ -0,0 +1,12 @@
1
+ import { IRequestOptions } from "@esri/arcgis-rest-request";
2
+ import { IHubSurvey } from "../../core/types/IHubSurvey";
3
+ import { IModel } from "../../types";
4
+ /**
5
+ * Given a model and a Survey object, set various computed properties that can't be directly mapped
6
+ * @private
7
+ * @param model
8
+ * @param survey
9
+ * @param requestOptions
10
+ * @returns an IHubSurvey object
11
+ */
12
+ export declare function computeProps(model: IModel, survey: Partial<IHubSurvey>, requestOptions: IRequestOptions): IHubSurvey;
@@ -0,0 +1,8 @@
1
+ import { IPropertyMap } from "../../core/_internal/PropertyMapper";
2
+ /**
3
+ * Returns an Array of IPropertyMap objects
4
+ * that define the projection of properties from a IModel to an IHubSurvey object
5
+ * @returns an IPropertyMap array
6
+ * @private
7
+ */
8
+ export declare function getPropertyMap(): IPropertyMap[];
@@ -0,0 +1 @@
1
+ export declare const MAP_SURVEY_TYPEKEYWORD = "hubMapSurvey";
@@ -0,0 +1,3 @@
1
+ import { IHubSurvey } from "../core/types/IHubSurvey";
2
+ /** Default values for a new IHubSurvey */
3
+ export declare const DEFAULT_SURVEY: Partial<IHubSurvey>;
@@ -0,0 +1,17 @@
1
+ import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
2
+ import { IHubSurvey } from "../core/types/IHubSurvey";
3
+ /**
4
+ * @private
5
+ * Update a Hub Survey obejct
6
+ * @param survey the survey to update
7
+ * @param requestOptions user request options
8
+ * @returns promise that resolves a IHubSurvey
9
+ */
10
+ export declare function updateSurvey(survey: IHubSurvey, requestOptions: IUserRequestOptions): Promise<IHubSurvey>;
11
+ /**
12
+ * @private
13
+ * Remove a Hub Survey object
14
+ * @param id
15
+ * @param requestOptions
16
+ */
17
+ export declare function deleteSurvey(id: string, requestOptions: IUserRequestOptions): Promise<void>;
@@ -0,0 +1,20 @@
1
+ import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IHubSurvey } from "../core/types/IHubSurvey";
3
+ import { IHubRequestOptions } from "../types";
4
+ /**
5
+ * @private
6
+ * Get a Survey entity by id or slug
7
+ * @param identifier item id or slug
8
+ * @param requestOptions request options
9
+ * @returns a promise that resolves a IHubSurvey object
10
+ */
11
+ export declare function fetchSurvey(identifier: string, requestOptions: IHubRequestOptions): Promise<IHubSurvey>;
12
+ /**
13
+ * @private
14
+ * Convert a Hub Survey Item into a Hub Survey entity, fetching any additional
15
+ * information that may be required
16
+ * @param item the Survey item
17
+ * @param auth request options
18
+ * @returns a promise that resolves a IHubSurvey object
19
+ */
20
+ export declare function convertItemToSurvey(item: IItem, requestOptions: IHubRequestOptions): Promise<IHubSurvey>;
@@ -1,5 +1,6 @@
1
- export * from "./get-input-feature-service-model";
2
- export * from "./get-source-feature-service-model-from-fieldworker";
3
- export * from "./get-stakeholder-model";
4
- export * from "./get-survey-models";
5
- export * from "./is-fieldworker-view";
1
+ export * from "./HubSurvey";
2
+ export * from "./edit";
3
+ export * from "./fetch";
4
+ export * from "./constants";
5
+ export * from "./types";
6
+ export * from "./utils";
@@ -0,0 +1,15 @@
1
+ export interface IS123Question {
2
+ id: string;
3
+ type: string;
4
+ maps?: Array<{
5
+ type: string;
6
+ itemId: string;
7
+ name: string;
8
+ }>;
9
+ questions?: IS123Question[];
10
+ [key: string]: any;
11
+ }
12
+ export interface IS123FormJSON {
13
+ questions: IS123Question[];
14
+ [key: string]: any;
15
+ }
@@ -0,0 +1,8 @@
1
+ import { IS123FormJSON, IS123Question } from "../types";
2
+ /**
3
+ * Decodes certain properties of the Survey Form json into html
4
+ * @param {IS123FormJSON} form
5
+ */
6
+ export declare const decodeForm: (form: IS123FormJSON) => {
7
+ questions: IS123Question[];
8
+ };
@@ -0,0 +1,9 @@
1
+ import { IRequestOptions } from "@esri/arcgis-rest-request";
2
+ /**
3
+ * This returns the /info/forminfo.json which simply has the form name and type.
4
+ * We need the name so we can make the getFormInfo call
5
+ * @param {string} id
6
+ * @param {IRequestOptions} requestOptions
7
+ * @returns {Promise}
8
+ */
9
+ export declare const getFormInfoJson: (id: string, requestOptions: IRequestOptions) => Promise<any>;
@@ -0,0 +1,8 @@
1
+ import { IGetItemInfoOptions, IItem } from "@esri/arcgis-rest-portal";
2
+ /**
3
+ * Given a Survey Item, return the form json, if it exists.
4
+ * @param {IItem} the survey item
5
+ * @param {IGetItemInfoOptions} requestOptions
6
+ * @returns {Promise}
7
+ */
8
+ export declare const getFormJson: (item: IItem, requestOptions: IGetItemInfoOptions) => Promise<any>;
@@ -1,5 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
- import { IModel } from "../types";
2
+ import { IModel } from "../../types";
3
3
  /**
4
4
  * Gets the primary input Feature Service for the given
5
5
  * Form ID. This will be the Fieldworker view, if it exists,
@@ -0,0 +1,7 @@
1
+ import { IS123Question } from "../types";
2
+ /**
3
+ * Gets the map question from an Array of questions
4
+ * @param {Array} questions An array of questions
5
+ * @returns {Object}
6
+ */
7
+ export declare const getMapQuestion: (questions: IS123Question[]) => IS123Question;
@@ -1,5 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
- import { IModel } from "../types";
2
+ import { IModel } from "../../types";
3
3
  /**
4
4
  * Fetches a Survey's source Feature Service from a given
5
5
  * Fieldworker View ID
@@ -1,5 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
- import { IModel } from "../types";
2
+ import { IModel } from "../../types";
3
3
  /**
4
4
  * Fetches a Survey's Stakeholder View for a given
5
5
  * Form ID
@@ -1,6 +1,6 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
2
  import { IItem } from "@esri/arcgis-rest-portal";
3
- import { IGetSurveyModelsResponse } from "../types";
3
+ import { IGetSurveyModelsResponse } from "../../types";
4
4
  /**
5
5
  * Builds a dictionary of Survey items for the given Form model
6
6
  * @param {string} formId The Form ID of the survey
@@ -0,0 +1,8 @@
1
+ import { IS123Question } from "../types";
2
+ /**
3
+ * Determines if the given Array of questions contains
4
+ * a map question
5
+ * @param {Array} questions An array of questions
6
+ * @returns {boolean}
7
+ */
8
+ export declare const hasMapQuestion: (questions: IS123Question[]) => boolean;
@@ -0,0 +1,15 @@
1
+ export * from "./decode-form";
2
+ export * from "./get-form-info-json";
3
+ export * from "./get-form-json";
4
+ export * from "./get-input-feature-service-model";
5
+ export * from "./get-map-question";
6
+ export * from "./get-source-feature-service-model-from-fieldworker";
7
+ export * from "./get-stakeholder-model";
8
+ export * from "./get-survey-models";
9
+ export * from "./has-map-question";
10
+ export * from "./is-fieldworker-view";
11
+ export * from "./is-map-question";
12
+ export * from "./is-page-question";
13
+ export * from "./is-survey123-connect";
14
+ export * from "./set-display-map-keyword";
15
+ export * from "./should-display-map";
@@ -0,0 +1,7 @@
1
+ import { IS123Question } from "../types";
2
+ /**
3
+ * Determines if the given question is a map question
4
+ * @param {Object} question A question object
5
+ * @returns {boolean}
6
+ */
7
+ export declare const isMapQuestion: (question: IS123Question) => boolean;
@@ -0,0 +1,7 @@
1
+ import { IS123Question } from "../types";
2
+ /**
3
+ * Determines if the given question is actually a page of questions
4
+ * @param {Object} question A question object
5
+ * @returns {boolean}
6
+ */
7
+ export declare const isPageQuestion: (question: IS123Question) => boolean;
@@ -0,0 +1,8 @@
1
+ import { IItem } from "@esri/arcgis-rest-types";
2
+ /**
3
+ * Returns true if the given Form item is a Survey123 Connect
4
+ * survey
5
+ * @param {IItem} formItem The Form item
6
+ * @returns {boolean}
7
+ */
8
+ export declare const isSurvey123Connect: (formItem: IItem) => boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Adds or removes MAP_SURVEY_TYPEKEYWORD type keyword and returns the updated list
3
+ * @param {IGroup|IHubContent|IHubItemEntity} subject
4
+ * @param {boolean} displayMap
5
+ * @returns {string[]} updated list of type keywords
6
+ */
7
+ export declare function setDisplayMapKeyword(typeKeywords: string[], displayMap: boolean): string[];
@@ -0,0 +1,7 @@
1
+ import { IItem } from "@esri/arcgis-rest-types";
2
+ /**
3
+ * Determines the display mode of the given survey
4
+ * @param {Object} formItem A Form item
5
+ * @returns {boolean}
6
+ */
7
+ export declare const shouldDisplayMap: (item: IItem) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.98.1",
3
+ "version": "14.100.0",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-input-feature-service-model.js","sourceRoot":"","sources":["../../../src/surveys/get-input-feature-service-model.ts"],"names":[],"mappings":"AAAA;gBACgB;AAGhB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,MAAc,EACd,cAA+B,EACd,EAAE;IACnB,OAAO,eAAe,iBACpB,EAAE,EAAE,MAAM,EACV,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,IACjB,cAAc,EACjB,CAAC,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE;QAC7C,IAAI,KAAK,CAAC;QACV,IAAI,cAAc,EAAE;YAClB,KAAK,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;SAClC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-source-feature-service-model-from-fieldworker.js","sourceRoot":"","sources":["../../../src/surveys/get-source-feature-service-model-from-fieldworker.ts"],"names":[],"mappings":"AAAA;gBACgB;AAGhB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG,CACzD,aAAqB,EACrB,cAA+B,EACd,EAAE;IACnB,OAAO,eAAe,iBACpB,EAAE,EAAE,aAAa,EACjB,gBAAgB,EAAE,cAAc,EAChC,SAAS,EAAE,SAAS,IACjB,cAAc,EACjB,CAAC,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE;QAC7C,IAAI,KAAK,CAAC;QACV,IAAI,cAAc,EAAE;YAClB,KAAK,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;SAClC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-stakeholder-model.js","sourceRoot":"","sources":["../../../src/surveys/get-stakeholder-model.ts"],"names":[],"mappings":"AAAA;gBACgB;AAGhB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,MAAc,EACd,cAA+B,EACd,EAAE;IACnB,OAAO,eAAe,iBACpB,EAAE,EAAE,MAAM,EACV,gBAAgB,EAAE,aAAa,EAC/B,SAAS,EAAE,SAAS,IACjB,cAAc,EACjB,CAAC,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,EAAE;QAC9C,IAAI,KAAK,CAAC;QACV,IAAI,eAAe,EAAE;YACnB,KAAK,GAAG,EAAE,IAAI,EAAE,eAAe,EAAY,CAAC;SAC7C;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-survey-models.js","sourceRoot":"","sources":["../../../src/surveys/get-survey-models.ts"],"names":[],"mappings":"AAAA;gBACgB;AAGhB,OAAO,EAAE,OAAO,EAAS,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,2CAA2C,EAAE,MAAM,qDAAqD,CAAC;AAClH,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,YAA4B,EAC5B,cAA+B,EACI,EAAE;IACrC,IAAI,WAAmB,CAAC;IACxB,IAAI,WAAmB,CAAC;IAExB,MAAM,OAAO,GAAG,GAAG,EAAE,CACnB,OAAO,YAAY,KAAK,QAAQ;QAC9B,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,cAAc,CAAC;QACvC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAEpC,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7B,MAAM,QAAQ,GAA2B;YACvC,sEAAsE;YACtE,8BAA8B;YAC9B,2BAA2B,CAAC,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC;YACpD,mBAAmB,CAAC,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC;SAC7C,CAAC;QAEF,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;aACzB,IAAI,CAAC,CAAC,CAAC,sCAAsC,EAAE,iBAAiB,CAAC,EAAE,EAAE;YACpE,WAAW,GAAG,iBAAiB,CAAC;YAEhC,IACE,sCAAsC;gBACtC,iBAAiB,CAAC,sCAAsC,CAAC,IAAI,CAAC,EAC9D;gBACA,WAAW,GAAG,sCAAsC,CAAC;gBACrD,iDAAiD;gBACjD,6BAA6B;gBAC7B,OAAO,2CAA2C,CAChD,WAAW,CAAC,IAAI,CAAC,EAAE,EACnB,cAAc,CACf,CAAC;aACH;iBAAM;gBACL,OAAO,sCAAsC,CAAC;aAC/C;QACH,CAAC,CAAC;aACD,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE;YACvB,OAAO;gBACL,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;gBACpB,cAAc;gBACd,WAAW;gBACX,WAAW;aACZ,CAAC;QACJ,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-fieldworker-view.js","sourceRoot":"","sources":["../../../src/surveys/is-fieldworker-view.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,kBAAyB;IACzD,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAW,EAAE,CACtD,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IAE5D,kEAAkE;IAClE,IAAI,aAAa,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAEtD,wDAAwD;IACxD,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,uBAAuB,GAAG;YAC9B,WAAW;YACX,iBAAiB;YACjB,cAAc;SACf,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACxB,aAAa;YACX,uBAAuB,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;KACjE;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-input-feature-service-model.js","sourceRoot":"","sources":["../../../src/surveys/get-input-feature-service-model.ts"],"names":[],"mappings":";AAAA;gBACgB;;;AAGhB,iEAA2D;AAG3D;;;;;;;GAOG;AACU,QAAA,2BAA2B,GAAG,CACzC,MAAc,EACd,cAA+B,EACd,EAAE;IACnB,OAAO,oCAAe,iBACpB,EAAE,EAAE,MAAM,EACV,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,IACjB,cAAc,EACjB,CAAC,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE;QAC7C,IAAI,KAAK,CAAC;QACV,IAAI,cAAc,EAAE;YAClB,KAAK,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;SAClC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-source-feature-service-model-from-fieldworker.js","sourceRoot":"","sources":["../../../src/surveys/get-source-feature-service-model-from-fieldworker.ts"],"names":[],"mappings":";AAAA;gBACgB;;;AAGhB,iEAA2D;AAG3D;;;;;;GAMG;AACU,QAAA,2CAA2C,GAAG,CACzD,aAAqB,EACrB,cAA+B,EACd,EAAE;IACnB,OAAO,oCAAe,iBACpB,EAAE,EAAE,aAAa,EACjB,gBAAgB,EAAE,cAAc,EAChC,SAAS,EAAE,SAAS,IACjB,cAAc,EACjB,CAAC,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE;QAC7C,IAAI,KAAK,CAAC;QACV,IAAI,cAAc,EAAE;YAClB,KAAK,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;SAClC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-stakeholder-model.js","sourceRoot":"","sources":["../../../src/surveys/get-stakeholder-model.ts"],"names":[],"mappings":";AAAA;gBACgB;;;AAGhB,iEAA2D;AAG3D;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG,CACjC,MAAc,EACd,cAA+B,EACd,EAAE;IACnB,OAAO,oCAAe,iBACpB,EAAE,EAAE,MAAM,EACV,gBAAgB,EAAE,aAAa,EAC/B,SAAS,EAAE,SAAS,IACjB,cAAc,EACjB,CAAC,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,EAAE;QAC9C,IAAI,KAAK,CAAC;QACV,IAAI,eAAe,EAAE;YACnB,KAAK,GAAG,EAAE,IAAI,EAAE,eAAe,EAAY,CAAC;SAC7C;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-survey-models.js","sourceRoot":"","sources":["../../../src/surveys/get-survey-models.ts"],"names":[],"mappings":";AAAA;gBACgB;;;AAGhB,iEAA0D;AAE1D,uFAAgF;AAChF,2HAAkH;AAClH,mEAA8D;AAC9D,+DAA0D;AAE1D;;;;;GAKG;AACU,QAAA,eAAe,GAAG,CAC7B,YAA4B,EAC5B,cAA+B,EACI,EAAE;IACrC,IAAI,WAAmB,CAAC;IACxB,IAAI,WAAmB,CAAC;IAExB,MAAM,OAAO,GAAG,GAAG,EAAE,CACnB,OAAO,YAAY,KAAK,QAAQ;QAC9B,CAAC,CAAC,4BAAO,CAAC,YAAY,EAAE,cAAc,CAAC;QACvC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAEpC,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7B,MAAM,QAAQ,GAA2B;YACvC,sEAAsE;YACtE,8BAA8B;YAC9B,6DAA2B,CAAC,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC;YACpD,2CAAmB,CAAC,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC;SAC7C,CAAC;QAEF,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;aACzB,IAAI,CAAC,CAAC,CAAC,sCAAsC,EAAE,iBAAiB,CAAC,EAAE,EAAE;YACpE,WAAW,GAAG,iBAAiB,CAAC;YAEhC,IACE,sCAAsC;gBACtC,uCAAiB,CAAC,sCAAsC,CAAC,IAAI,CAAC,EAC9D;gBACA,WAAW,GAAG,sCAAsC,CAAC;gBACrD,iDAAiD;gBACjD,6BAA6B;gBAC7B,OAAO,+FAA2C,CAChD,WAAW,CAAC,IAAI,CAAC,EAAE,EACnB,cAAc,CACf,CAAC;aACH;iBAAM;gBACL,OAAO,sCAAsC,CAAC;aAC/C;QACH,CAAC,CAAC;aACD,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE;YACvB,OAAO;gBACL,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;gBACpB,cAAc;gBACd,WAAW;gBACX,WAAW;aACZ,CAAC;QACJ,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-fieldworker-view.js","sourceRoot":"","sources":["../../../src/surveys/is-fieldworker-view.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,kBAAyB;IACzD,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAW,EAAE,CACtD,kBAAkB,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IAE5D,kEAAkE;IAClE,IAAI,aAAa,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAEtD,wDAAwD;IACxD,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,uBAAuB,GAAG;YAC9B,WAAW;YACX,iBAAiB;YACjB,cAAc;SACf,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACxB,aAAa;YACX,uBAAuB,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;KACjE;IAED,OAAO,aAAa,CAAC;AACvB,CAAC;AAnBD,8CAmBC"}