@esri/hub-common 9.49.1 → 10.0.0-next.3

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 (256) hide show
  1. package/dist/es2017/categories.js +4 -2
  2. package/dist/es2017/categories.js.map +1 -1
  3. package/dist/es2017/collections.js +3 -8
  4. package/dist/es2017/collections.js.map +1 -1
  5. package/dist/es2017/content/compose.js +1 -18
  6. package/dist/es2017/content/compose.js.map +1 -1
  7. package/dist/es2017/content/get-family.js +1 -3
  8. package/dist/es2017/content/get-family.js.map +1 -1
  9. package/dist/es2017/content/index.js +8 -71
  10. package/dist/es2017/content/index.js.map +1 -1
  11. package/dist/es2017/extent.js +1 -14
  12. package/dist/es2017/extent.js.map +1 -1
  13. package/dist/es2017/index.js +1 -0
  14. package/dist/es2017/index.js.map +1 -1
  15. package/dist/es2017/projects/HubProjectManager.js +0 -8
  16. package/dist/es2017/projects/HubProjectManager.js.map +1 -1
  17. package/dist/es2017/projects/HubProjects.js.map +1 -1
  18. package/dist/es2017/search/_internal/hubSearchItems.js +3 -137
  19. package/dist/es2017/search/_internal/hubSearchItems.js.map +1 -1
  20. package/dist/es2017/search/_internal/index.js +0 -1
  21. package/dist/es2017/search/_internal/index.js.map +1 -1
  22. package/dist/es2017/search/_internal/portalSearchGroups.js +0 -1
  23. package/dist/es2017/search/_internal/portalSearchGroups.js.map +1 -1
  24. package/dist/es2017/search/_internal/portalSearchItems.js +4 -29
  25. package/dist/es2017/search/_internal/portalSearchItems.js.map +1 -1
  26. package/dist/es2017/search/_internal/portalSearchUsers.js +0 -1
  27. package/dist/es2017/search/_internal/portalSearchUsers.js.map +1 -1
  28. package/dist/es2017/search/hubSearch.js +0 -16
  29. package/dist/es2017/search/hubSearch.js.map +1 -1
  30. package/dist/es2017/search/index.js +0 -9
  31. package/dist/es2017/search/index.js.map +1 -1
  32. package/dist/es2017/search/serializeQueryForPortal.js +0 -1
  33. package/dist/es2017/search/serializeQueryForPortal.js.map +1 -1
  34. package/dist/es2017/search/types/index.js +0 -5
  35. package/dist/es2017/search/types/index.js.map +1 -1
  36. package/dist/es2017/search/upgradeCatalogSchema.js +0 -8
  37. package/dist/es2017/search/upgradeCatalogSchema.js.map +1 -1
  38. package/dist/es2017/search/utils.js +1 -207
  39. package/dist/es2017/search/utils.js.map +1 -1
  40. package/dist/es2017/sites/fetchSiteModel.js +0 -9
  41. package/dist/es2017/sites/fetchSiteModel.js.map +1 -1
  42. package/dist/es2017/types.js.map +1 -1
  43. package/dist/esm/categories.js +4 -2
  44. package/dist/esm/categories.js.map +1 -1
  45. package/dist/esm/collections.js +3 -8
  46. package/dist/esm/collections.js.map +1 -1
  47. package/dist/esm/content/compose.js +1 -18
  48. package/dist/esm/content/compose.js.map +1 -1
  49. package/dist/esm/content/get-family.js +1 -3
  50. package/dist/esm/content/get-family.js.map +1 -1
  51. package/dist/esm/content/index.js +8 -71
  52. package/dist/esm/content/index.js.map +1 -1
  53. package/dist/esm/extent.js +1 -14
  54. package/dist/esm/extent.js.map +1 -1
  55. package/dist/esm/index.js +1 -0
  56. package/dist/esm/index.js.map +1 -1
  57. package/dist/esm/projects/HubProjectManager.js +0 -12
  58. package/dist/esm/projects/HubProjectManager.js.map +1 -1
  59. package/dist/esm/projects/HubProjects.js.map +1 -1
  60. package/dist/esm/search/_internal/hubSearchItems.js +4 -146
  61. package/dist/esm/search/_internal/hubSearchItems.js.map +1 -1
  62. package/dist/esm/search/_internal/index.js +0 -1
  63. package/dist/esm/search/_internal/index.js.map +1 -1
  64. package/dist/esm/search/_internal/portalSearchGroups.js +0 -1
  65. package/dist/esm/search/_internal/portalSearchGroups.js.map +1 -1
  66. package/dist/esm/search/_internal/portalSearchItems.js +5 -29
  67. package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
  68. package/dist/esm/search/_internal/portalSearchUsers.js +0 -1
  69. package/dist/esm/search/_internal/portalSearchUsers.js.map +1 -1
  70. package/dist/esm/search/hubSearch.js +0 -20
  71. package/dist/esm/search/hubSearch.js.map +1 -1
  72. package/dist/esm/search/index.js +0 -9
  73. package/dist/esm/search/index.js.map +1 -1
  74. package/dist/esm/search/serializeQueryForPortal.js +0 -1
  75. package/dist/esm/search/serializeQueryForPortal.js.map +1 -1
  76. package/dist/esm/search/types/index.js +0 -5
  77. package/dist/esm/search/types/index.js.map +1 -1
  78. package/dist/esm/search/upgradeCatalogSchema.js +0 -8
  79. package/dist/esm/search/upgradeCatalogSchema.js.map +1 -1
  80. package/dist/esm/search/utils.js +1 -204
  81. package/dist/esm/search/utils.js.map +1 -1
  82. package/dist/esm/sites/fetchSiteModel.js +0 -9
  83. package/dist/esm/sites/fetchSiteModel.js.map +1 -1
  84. package/dist/esm/types.js.map +1 -1
  85. package/dist/node/categories.js +4 -2
  86. package/dist/node/categories.js.map +1 -1
  87. package/dist/node/collections.js +3 -8
  88. package/dist/node/collections.js.map +1 -1
  89. package/dist/node/content/compose.js +1 -18
  90. package/dist/node/content/compose.js.map +1 -1
  91. package/dist/node/content/get-family.js +1 -3
  92. package/dist/node/content/get-family.js.map +1 -1
  93. package/dist/node/content/index.js +9 -73
  94. package/dist/node/content/index.js.map +1 -1
  95. package/dist/node/extent.js +2 -16
  96. package/dist/node/extent.js.map +1 -1
  97. package/dist/node/index.js +1 -0
  98. package/dist/node/index.js.map +1 -1
  99. package/dist/node/projects/HubProjectManager.js +0 -8
  100. package/dist/node/projects/HubProjectManager.js.map +1 -1
  101. package/dist/node/projects/HubProjects.js.map +1 -1
  102. package/dist/node/search/_internal/hubSearchItems.js +4 -139
  103. package/dist/node/search/_internal/hubSearchItems.js.map +1 -1
  104. package/dist/node/search/_internal/index.js +0 -1
  105. package/dist/node/search/_internal/index.js.map +1 -1
  106. package/dist/node/search/_internal/portalSearchGroups.js +0 -1
  107. package/dist/node/search/_internal/portalSearchGroups.js.map +1 -1
  108. package/dist/node/search/_internal/portalSearchItems.js +4 -29
  109. package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
  110. package/dist/node/search/_internal/portalSearchUsers.js +0 -1
  111. package/dist/node/search/_internal/portalSearchUsers.js.map +1 -1
  112. package/dist/node/search/hubSearch.js +1 -18
  113. package/dist/node/search/hubSearch.js.map +1 -1
  114. package/dist/node/search/index.js +0 -9
  115. package/dist/node/search/index.js.map +1 -1
  116. package/dist/node/search/serializeQueryForPortal.js +0 -1
  117. package/dist/node/search/serializeQueryForPortal.js.map +1 -1
  118. package/dist/node/search/types/index.js +0 -5
  119. package/dist/node/search/types/index.js.map +1 -1
  120. package/dist/node/search/upgradeCatalogSchema.js +1 -10
  121. package/dist/node/search/upgradeCatalogSchema.js.map +1 -1
  122. package/dist/node/search/utils.js +1 -213
  123. package/dist/node/search/utils.js.map +1 -1
  124. package/dist/node/sites/fetchSiteModel.js +1 -11
  125. package/dist/node/sites/fetchSiteModel.js.map +1 -1
  126. package/dist/node/types.js.map +1 -1
  127. package/dist/types/collections.d.ts +1 -6
  128. package/dist/types/content/_internal.d.ts +0 -3
  129. package/dist/types/content/get-family.d.ts +1 -1
  130. package/dist/types/content/index.d.ts +3 -36
  131. package/dist/types/core/types/IHubContent.d.ts +0 -3
  132. package/dist/types/core/types/IServerEnrichments.d.ts +0 -2
  133. package/dist/types/extent.d.ts +0 -2
  134. package/dist/types/projects/HubProjectManager.d.ts +0 -1
  135. package/dist/types/search/_internal/hubSearchItems.d.ts +3 -4
  136. package/dist/types/search/_internal/index.d.ts +0 -1
  137. package/dist/types/search/_internal/portalSearchItems.d.ts +15 -15
  138. package/dist/types/search/hubSearch.d.ts +0 -13
  139. package/dist/types/search/index.d.ts +0 -9
  140. package/dist/types/search/types/IHubSearchOptions.d.ts +1 -17
  141. package/dist/types/search/types/IHubSearchResponse.d.ts +0 -5
  142. package/dist/types/search/types/IHubSearchResult.d.ts +0 -39
  143. package/dist/types/search/types/index.d.ts +0 -5
  144. package/dist/types/search/types/types.d.ts +0 -206
  145. package/dist/types/search/upgradeCatalogSchema.d.ts +0 -5
  146. package/dist/types/search/utils.d.ts +2 -58
  147. package/dist/types/sites/fetchSiteModel.d.ts +2 -6
  148. package/dist/types/types.d.ts +0 -70
  149. package/dist/umd/common.umd.js +42 -1900
  150. package/dist/umd/common.umd.js.map +1 -1
  151. package/package.json +1 -1
  152. package/dist/es2017/search/_internal/state.js +0 -155
  153. package/dist/es2017/search/_internal/state.js.map +0 -1
  154. package/dist/es2017/search/_searchContent.js +0 -116
  155. package/dist/es2017/search/_searchContent.js.map +0 -1
  156. package/dist/es2017/search/_searchGroups.js +0 -88
  157. package/dist/es2017/search/_searchGroups.js.map +0 -1
  158. package/dist/es2017/search/_searchUsers.js +0 -89
  159. package/dist/es2017/search/_searchUsers.js.map +0 -1
  160. package/dist/es2017/search/collectionState.js +0 -60
  161. package/dist/es2017/search/collectionState.js.map +0 -1
  162. package/dist/es2017/search/content-utils.js +0 -455
  163. package/dist/es2017/search/content-utils.js.map +0 -1
  164. package/dist/es2017/search/filter-utils.js +0 -31
  165. package/dist/es2017/search/filter-utils.js.map +0 -1
  166. package/dist/es2017/search/group-utils.js +0 -142
  167. package/dist/es2017/search/group-utils.js.map +0 -1
  168. package/dist/es2017/search/hub-api-search.js +0 -19
  169. package/dist/es2017/search/hub-api-search.js.map +0 -1
  170. package/dist/es2017/search/types/ICatalog.js +0 -1
  171. package/dist/es2017/search/types/ICatalog.js.map +0 -1
  172. package/dist/es2017/search/types/ICollection.js +0 -1
  173. package/dist/es2017/search/types/ICollection.js.map +0 -1
  174. package/dist/es2017/search/types/IFacet.js +0 -1
  175. package/dist/es2017/search/types/IFacet.js.map +0 -1
  176. package/dist/es2017/search/types/IFacetOption.js +0 -1
  177. package/dist/es2017/search/types/IFacetOption.js.map +0 -1
  178. package/dist/es2017/search/types/IHubApiSearchRequest.js +0 -1
  179. package/dist/es2017/search/types/IHubApiSearchRequest.js.map +0 -1
  180. package/dist/es2017/search/user-utils.js +0 -139
  181. package/dist/es2017/search/user-utils.js.map +0 -1
  182. package/dist/esm/search/_internal/state.js +0 -155
  183. package/dist/esm/search/_internal/state.js.map +0 -1
  184. package/dist/esm/search/_searchContent.js +0 -118
  185. package/dist/esm/search/_searchContent.js.map +0 -1
  186. package/dist/esm/search/_searchGroups.js +0 -91
  187. package/dist/esm/search/_searchGroups.js.map +0 -1
  188. package/dist/esm/search/_searchUsers.js +0 -92
  189. package/dist/esm/search/_searchUsers.js.map +0 -1
  190. package/dist/esm/search/collectionState.js +0 -61
  191. package/dist/esm/search/collectionState.js.map +0 -1
  192. package/dist/esm/search/content-utils.js +0 -462
  193. package/dist/esm/search/content-utils.js.map +0 -1
  194. package/dist/esm/search/filter-utils.js +0 -31
  195. package/dist/esm/search/filter-utils.js.map +0 -1
  196. package/dist/esm/search/group-utils.js +0 -146
  197. package/dist/esm/search/group-utils.js.map +0 -1
  198. package/dist/esm/search/hub-api-search.js +0 -20
  199. package/dist/esm/search/hub-api-search.js.map +0 -1
  200. package/dist/esm/search/types/ICatalog.js +0 -1
  201. package/dist/esm/search/types/ICatalog.js.map +0 -1
  202. package/dist/esm/search/types/ICollection.js +0 -1
  203. package/dist/esm/search/types/ICollection.js.map +0 -1
  204. package/dist/esm/search/types/IFacet.js +0 -1
  205. package/dist/esm/search/types/IFacet.js.map +0 -1
  206. package/dist/esm/search/types/IFacetOption.js +0 -1
  207. package/dist/esm/search/types/IFacetOption.js.map +0 -1
  208. package/dist/esm/search/types/IHubApiSearchRequest.js +0 -1
  209. package/dist/esm/search/types/IHubApiSearchRequest.js.map +0 -1
  210. package/dist/esm/search/user-utils.js +0 -143
  211. package/dist/esm/search/user-utils.js.map +0 -1
  212. package/dist/node/search/_internal/state.js +0 -166
  213. package/dist/node/search/_internal/state.js.map +0 -1
  214. package/dist/node/search/_searchContent.js +0 -120
  215. package/dist/node/search/_searchContent.js.map +0 -1
  216. package/dist/node/search/_searchGroups.js +0 -92
  217. package/dist/node/search/_searchGroups.js.map +0 -1
  218. package/dist/node/search/_searchUsers.js +0 -93
  219. package/dist/node/search/_searchUsers.js.map +0 -1
  220. package/dist/node/search/collectionState.js +0 -65
  221. package/dist/node/search/collectionState.js.map +0 -1
  222. package/dist/node/search/content-utils.js +0 -466
  223. package/dist/node/search/content-utils.js.map +0 -1
  224. package/dist/node/search/filter-utils.js +0 -36
  225. package/dist/node/search/filter-utils.js.map +0 -1
  226. package/dist/node/search/group-utils.js +0 -148
  227. package/dist/node/search/group-utils.js.map +0 -1
  228. package/dist/node/search/hub-api-search.js +0 -23
  229. package/dist/node/search/hub-api-search.js.map +0 -1
  230. package/dist/node/search/types/ICatalog.js +0 -3
  231. package/dist/node/search/types/ICatalog.js.map +0 -1
  232. package/dist/node/search/types/ICollection.js +0 -3
  233. package/dist/node/search/types/ICollection.js.map +0 -1
  234. package/dist/node/search/types/IFacet.js +0 -3
  235. package/dist/node/search/types/IFacet.js.map +0 -1
  236. package/dist/node/search/types/IFacetOption.js +0 -3
  237. package/dist/node/search/types/IFacetOption.js.map +0 -1
  238. package/dist/node/search/types/IHubApiSearchRequest.js +0 -3
  239. package/dist/node/search/types/IHubApiSearchRequest.js.map +0 -1
  240. package/dist/node/search/user-utils.js +0 -145
  241. package/dist/node/search/user-utils.js.map +0 -1
  242. package/dist/types/search/_internal/state.d.ts +0 -70
  243. package/dist/types/search/_searchContent.d.ts +0 -9
  244. package/dist/types/search/_searchGroups.d.ts +0 -17
  245. package/dist/types/search/_searchUsers.d.ts +0 -31
  246. package/dist/types/search/collectionState.d.ts +0 -19
  247. package/dist/types/search/content-utils.d.ts +0 -83
  248. package/dist/types/search/filter-utils.d.ts +0 -13
  249. package/dist/types/search/group-utils.d.ts +0 -36
  250. package/dist/types/search/hub-api-search.d.ts +0 -10
  251. package/dist/types/search/types/ICatalog.d.ts +0 -87
  252. package/dist/types/search/types/ICollection.d.ts +0 -28
  253. package/dist/types/search/types/IFacet.d.ts +0 -62
  254. package/dist/types/search/types/IFacetOption.d.ts +0 -30
  255. package/dist/types/search/types/IHubApiSearchRequest.d.ts +0 -16
  256. package/dist/types/search/user-utils.d.ts +0 -35
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hubApiSearch = void 0;
4
- const __1 = require("..");
5
- /**
6
- * Search the Hub API
7
- *
8
- * @param requestOptions
9
- * @returns JSONAPI response
10
- */
11
- function hubApiSearch(requestOptions) {
12
- // derive default headers if authentication
13
- const authentication = requestOptions.authentication;
14
- const headers = authentication &&
15
- authentication.serialize && { authentication: authentication.serialize() };
16
- const defaults = {
17
- headers,
18
- httpMethod: "POST",
19
- };
20
- return __1.hubApiRequest("/search", Object.assign(Object.assign({}, defaults), requestOptions));
21
- }
22
- exports.hubApiSearch = hubApiSearch;
23
- //# sourceMappingURL=hub-api-search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hub-api-search.js","sourceRoot":"","sources":["../../../src/search/hub-api-search.ts"],"names":[],"mappings":";;;AAAA,0BAAwE;AACxE;;;;;GAKG;AACH,SAAgB,YAAY,CAC1B,cAAkC;IAElC,2CAA2C;IAC3C,MAAM,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC;IACrD,MAAM,OAAO,GAAG,cAAc;QAC5B,cAAc,CAAC,SAAS,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,SAAS,EAAE,EAAE,CAAC;IAC7E,MAAM,QAAQ,GAAuB;QACnC,OAAO;QACP,UAAU,EAAE,MAAM;KACnB,CAAC;IACF,OAAO,iBAAa,CAAC,SAAS,kCACzB,QAAQ,GACR,cAAc,EACjB,CAAC;AACL,CAAC;AAfD,oCAeC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ICatalog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ICatalog.js","sourceRoot":"","sources":["../../../../src/search/types/ICatalog.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ICollection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ICollection.js","sourceRoot":"","sources":["../../../../src/search/types/ICollection.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IFacet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IFacet.js","sourceRoot":"","sources":["../../../../src/search/types/IFacet.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IFacetOption.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IFacetOption.js","sourceRoot":"","sources":["../../../../src/search/types/IFacetOption.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IHubApiSearchRequest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IHubApiSearchRequest.js","sourceRoot":"","sources":["../../../../src/search/types/IHubApiSearchRequest.ts"],"names":[],"mappings":""}
@@ -1,145 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serializeUserFilterForPortal = exports.expandUserFilter = exports.mergeUserFilters = void 0;
4
- const __1 = require("..");
5
- // TODO: Remove with _searchContent
6
- /**
7
- *
8
- * Merge `Filter<"user">` objects
9
- *
10
- * Useful in components which may get partial filters from a variety of
11
- * sub-components, which are then combined into a single filter prior
12
- * to executing the search.
13
- * @param filters
14
- * @returns
15
- */
16
- function mergeUserFilters(filters) {
17
- // TODO: Remove with _searchContent
18
- __1.Logger.warn(`DEPRECATION: mergeUserFilters will be removed. Work with IFilterGroups<"user"> and hubSearch() instead`);
19
- // expand all the filters so all prop types are consistent
20
- const expanded = filters.map(expandUserFilter);
21
- // now we can merge based on fields
22
- const dateFields = ["created", "modified", "lastlogin"];
23
- const specialFields = ["disabled", "term", "filterType", ...dateFields];
24
- // acc is initialized as Filter<group> but also needs it
25
- // in the function signature... for reasons?!
26
- const result = expanded.reduce((acc, entry) => {
27
- // process fields
28
- Object.entries(entry).forEach(([key, value]) => {
29
- // Note: getProp/setProp are used to get around
30
- // typescript issues with string indexing
31
- if (acc.hasOwnProperty(key)) {
32
- const existingValue = __1.getProp(acc, key);
33
- // if the key is not to a special field
34
- if (!specialFields.includes(key)) {
35
- // treat as an IMatchOptions
36
- __1.setProp(key, __1.mergeMatchOptions(existingValue, value), acc);
37
- }
38
- else if (dateFields.includes(key)) {
39
- // treat as IDateRange
40
- __1.setProp(key, __1.mergeDateRange(existingValue, value), acc);
41
- }
42
- else if (key === "term") {
43
- // append terms
44
- acc[key] = `${acc[key]} ${value}`;
45
- }
46
- }
47
- else {
48
- // Acc does not have an entry for this yet
49
- // so just clone it
50
- __1.setProp(key, __1.cloneObject(value), acc);
51
- }
52
- });
53
- return acc;
54
- }, {
55
- filterType: "user",
56
- });
57
- return result;
58
- }
59
- exports.mergeUserFilters = mergeUserFilters;
60
- /**
61
- * Prior to serialization into the query syntax for the backing APIs, we first expand [Filters](../Filter)
62
- *
63
- * Filter's can express their intent in a very terse form, but to ensure consistent structures
64
- * we expand them into their more verbose form.
65
- *
66
- * i.e. `firstname: "John"` expands into `firstname: { any: ["John"]}`
67
- *
68
- * - Fields defined as `string | string[] | MatchOptions` will be converted to a `MatchOptions`
69
- * - RelativeDate fields are converted to DateRange<number>
70
- * @param filter
71
- * @returns
72
- */
73
- function expandUserFilter(filter) {
74
- // TODO: Remove with _searchContent
75
- __1.Logger.warn(`DEPRECATION: expandUserFilter will be removed. Work with IFilterGroups<"user"> and hubSearch() instead`);
76
- const result = {};
77
- const dateProps = ["created", "modified", "lastlogin"];
78
- const specialProps = ["disabled", "term", ...dateProps];
79
- Object.entries(filter).forEach(([key, value]) => {
80
- // handle Matchish fields
81
- if (!specialProps.includes(key)) {
82
- // setProp side-steps typescript complaining
83
- __1.setProp(key, __1.valueToMatchOptions(value), result);
84
- }
85
- // Handle date fields
86
- if (dateProps.includes(key)) {
87
- const dateFieldValue = __1.cloneObject(__1.getProp(filter, key));
88
- if (__1.getProp(filter, `${key}.type`) === "relative-date") {
89
- __1.setProp(key, __1.relativeDateToDateRange(dateFieldValue), result);
90
- }
91
- else {
92
- __1.setProp(key, dateFieldValue, result);
93
- }
94
- }
95
- });
96
- // disabled is boolean, so we check if the prop exists
97
- // vs checking if the value is truthy
98
- if (filter.hasOwnProperty("disabled")) {
99
- result.disabled = filter.disabled;
100
- }
101
- if (filter.term) {
102
- result.term = filter.term;
103
- }
104
- return result;
105
- }
106
- exports.expandUserFilter = expandUserFilter;
107
- /**
108
- * @private
109
- * Serialize an `IUserFilterDefinition` into an `ISearchOptions` for use
110
- * with `searchUsers`
111
- * @param filter
112
- * @returns
113
- */
114
- function serializeUserFilterForPortal(filter) {
115
- // TODO: Remove with _searchContent
116
- __1.Logger.warn(`DEPRECATION: serializeUserFilterForPortal will be removed. Work with IFilterGroups<"user"> and hubSearch() instead`);
117
- let result = {
118
- q: "",
119
- filter: "",
120
- };
121
- const dateProps = ["created", "modified", "lastlogin"];
122
- const specialProps = ["term", "filterType", ...dateProps];
123
- Object.entries(filter).forEach(([key, value]) => {
124
- // MatchOptions fields
125
- if (!specialProps.includes(key)) {
126
- result = __1.mergeSearchOptions(result, __1.serializeMatchOptions(key, value), "AND");
127
- }
128
- // Dates only go into q
129
- if (dateProps.includes(key)) {
130
- result = __1.mergeSearchOptions(result, __1.serializeDateRange(key, value), "AND");
131
- }
132
- });
133
- // disabled is also a top-level property
134
- if (filter.hasOwnProperty("disabled")) {
135
- result.disabled = filter.disabled;
136
- }
137
- // add the term
138
- if (filter.term) {
139
- // Note: this is slightly different from other types
140
- result.q = `(${filter.term}) ${result.q}`.trim();
141
- }
142
- return result;
143
- }
144
- exports.serializeUserFilterForPortal = serializeUserFilterForPortal;
145
- //# sourceMappingURL=user-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-utils.js","sourceRoot":"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AkB,CACzB,MAAM,EACN,sBAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,EAC9B,KAAK,CACN,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,wCAAwC;IACxC,IAAI,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE;QACrC,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;KACnC;IACD,eAAe;IACf,IAAI,MAAM,CAAC,IAAI,EAAE;QACf,oDAAoD;QACpD,MAAM,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;KAClD;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AA3CD,oEA2CC"}
@@ -1,70 +0,0 @@
1
- import { IFacet, IFacetState, ISortOption } from "../types";
2
- /**
3
- * @private
4
- * Apply the sortState to SortOptions
5
- *
6
- * @param sortOptions
7
- * @param sortState
8
- * @returns
9
- */
10
- export declare function applySortState(sortOptions: ISortOption, sortState: string): ISortOption;
11
- /**
12
- * @private
13
- * Apply FacetState to a Facet
14
- * @param facet
15
- * @param state
16
- * @returns
17
- */
18
- export declare function applyFacetState(facet: IFacet, state: IFacetState): IFacet;
19
- /**
20
- * @private
21
- * Apply the Facet State onto a single-select facet
22
- *
23
- * Intentionally mutates the facet.
24
- * @param facet
25
- * @param state
26
- * @returns
27
- */
28
- export declare function applySingleSelectFacetState(facet: IFacet, state: IFacetState): IFacet;
29
- /**
30
- * @private
31
- * Serialize single-select facet into IFacetState
32
- * @param facet
33
- * @returns
34
- */
35
- export declare function serializeSingleSelectFacetState(facet: IFacet): IFacetState;
36
- /**
37
- * @private
38
- * Apply the Facet State onto a multi-select Facet
39
- *
40
- * Intentionally mutates the facet.
41
- * @param facet
42
- * @param state
43
- * @returns
44
- */
45
- export declare function applyMultiSelectFacetState(facet: IFacet, state: IFacetState): IFacet;
46
- /**
47
- * @private
48
- * Serialize multi-select facet into IFacetState
49
- * @param facet
50
- * @returns
51
- */
52
- export declare function serializeMultiSelectFacetState(facet: IFacet): IFacetState;
53
- /**
54
- * @private
55
- * Serialize the state of the SortOption into a key/value pair
56
- *
57
- * Called from the Sort component
58
- * @param sort
59
- * @returns
60
- */
61
- export declare function serializeSortState(sort: ISortOption): string;
62
- /**
63
- * @private
64
- * Serialize the state of a facet into a key/value pair
65
- *
66
- * Called from the various facet components
67
- * @param facet
68
- * @returns
69
- */
70
- export declare function serializeFacetState(facet: IFacet): IFacetState;
@@ -1,9 +0,0 @@
1
- import { Filter, IHubSearchOptions } from "./types";
2
- import { IHubContent, ISearchResponse } from "..";
3
- /**
4
- * @private
5
- * Search for content via the Portal or Hub API
6
- * @param filter
7
- * @param options
8
- */
9
- export declare function _searchContent(filter: Filter<"content">, options: IHubSearchOptions): Promise<ISearchResponse<IHubContent>>;
@@ -1,17 +0,0 @@
1
- import { IGroup } from "@esri/arcgis-rest-portal";
2
- import { Filter, IHubSearchOptions, IFacet } from "./types";
3
- import { ISearchResponse } from "..";
4
- export interface IGroupSearchResult {
5
- groups: IGroup[];
6
- facets: IFacet[];
7
- }
8
- /**
9
- * @private
10
- * Search Groups using Filter<"group">
11
- *
12
- * Currently just returns ISearchResult<IGroup>
13
- * @param filter
14
- * @param options
15
- * @returns
16
- */
17
- export declare function _searchGroups(filter: Filter<"group">, options: IHubSearchOptions): Promise<ISearchResponse<IGroup>>;
@@ -1,31 +0,0 @@
1
- import { IUser, UserSession } from "@esri/arcgis-rest-auth";
2
- import { Filter, IHubSearchOptions, ISearchResponse } from "..";
3
- /**
4
- * Extends IHubSearchOptions to make auth mandatory
5
- */
6
- export interface IAuthenticatedHubSearchOptions extends IHubSearchOptions {
7
- authentication: UserSession;
8
- }
9
- /**
10
- * Extends `IUser` with url optional props for the user's
11
- * profile and thumbnail
12
- */
13
- export interface IHubUser extends IUser {
14
- profileUrl?: string;
15
- thumbnailUrl?: string;
16
- }
17
- /**
18
- * @private
19
- * Search for Users via the Portal API.
20
- *
21
- * **Note** Authentication is required
22
- *
23
- * Another trivial comment to force a release
24
- *
25
- * Note: in the future, there may be options to search via
26
- * a Hub specific API
27
- * @param filter
28
- * @param options
29
- * @returns
30
- */
31
- export declare function _searchUsers(filter: Filter<"user">, options: IAuthenticatedHubSearchOptions): Promise<ISearchResponse<IHubUser>>;
@@ -1,19 +0,0 @@
1
- import { ICollection, ICollectionState } from "./types";
2
- /**
3
- * Apply ICollectionState to an ICollection
4
- *
5
- * Typically used in a Gallery or Catalog component to
6
- * set the inital state, based on values deserialized
7
- * from a query string
8
- * @param collection
9
- * @param state
10
- * @returns
11
- */
12
- export declare function applyCollectionState(collection: ICollection, state: ICollectionState): ICollection;
13
- /**
14
- * Serialize the current state of a collection into a hash that
15
- * can be converted into a query string
16
- * @param collection
17
- * @returns
18
- */
19
- export declare function serializeCollectionState(collection: ICollection): ICollectionState;
@@ -1,83 +0,0 @@
1
- import { IItem, ISearchOptions, ISearchResult } from "@esri/arcgis-rest-portal";
2
- import { IContentFilter, IContentFilterDefinition, Filter } from "./types/types";
3
- import { IFacet } from "./types/IFacet";
4
- /**
5
- * @private
6
- * Convert portal search response to facets
7
- * Note: Only applicable to an item search
8
- * @param response
9
- * @returns
10
- */
11
- export declare function convertPortalResponseToFacets(response: ISearchResult<IItem>, operation?: "OR" | "AND"): IFacet[];
12
- /**
13
- * @private
14
- * Convert portal search response to facets
15
- * Note: Only applicable to an item search
16
- * @param response
17
- * @returns
18
- */
19
- export declare function convertPortalItemResponseToFacets(response: ISearchResult<IItem>, operation?: "OR" | "AND", optionProp?: "filter" | "filters"): IFacet[];
20
- /**
21
- * Merge `Filter<"content">` objects
22
- *
23
- * Useful in components which may get partial filters from a variety of
24
- * sub-components, which are then combined into a single filter prior
25
- * to executing the search.
26
- * @param filters
27
- * @returns
28
- */
29
- export declare function mergeContentFilter(filters: Array<Filter<"content">>): Filter<"content">;
30
- /**
31
- * Prior to serialization into the query syntax for the backing APIs, we first expand [Filters](../Filter)
32
- *
33
- * Filter's can express their intent in a very terse form, but to ensure consistent structures
34
- * we expand them into their more verbose form.
35
- *
36
- * i.e. `title: "Water"` expands into `title: { any: ["Water"]}`
37
- *
38
- * - "well known" type values are expanded
39
- * - i.e. `type: "$storymap"` expands into two `subFilter` entries
40
- * - Fields defined as `string | string[] | MatchOptions` will be converted to a `MatchOptions`
41
- * - RelativeDate fields are converted to DateRange<number>
42
- *
43
- * @param filter
44
- * @returns
45
- */
46
- export declare function expandContentFilter(filter: Filter<"content">): IContentFilter;
47
- /**
48
- * @private
49
- * Expand from a well-known "type" into it's longer form
50
- *
51
- * i.e. `type: "$storymap"` expands into two subFilters entries
52
- *
53
- * @param filter
54
- * @returns
55
- */
56
- export declare function expandTypeField(filter: Filter<"content">): Filter<"content">;
57
- /**
58
- * @private
59
- * Convert a `ContentFilterDefinition` to a `ContentFilter`
60
- *
61
- * ContentFilter is a narrower version of ContentFilterDefinition, without
62
- * the union types. Using a ContentFilter makes working with the structure
63
- * in typescript much easier.
64
- *
65
- * @param filter
66
- * @returns
67
- */
68
- export declare function convertContentDefinitionToFilter(filter: IContentFilterDefinition): IContentFilter;
69
- /**
70
- * @private
71
- * Serialize a `ContentFilter` into an `ISearchOptions` for use with `searchItems`
72
- * @param filter
73
- * @returns
74
- */
75
- export declare function serializeContentFilterForPortal(filter: IContentFilter): ISearchOptions;
76
- /**
77
- * @private
78
- * Convert a ContentFilter to a SearchOptions
79
- *
80
- * @param filter
81
- * @returns
82
- */
83
- export declare function convertContentFilterToSearchOptions(filter: IContentFilter): ISearchOptions;
@@ -1,13 +0,0 @@
1
- import { Filter, IFilterGroup, FilterType } from "./types";
2
- /**
3
- * Determine if a Filter is "empty"
4
- * @param filter
5
- * @returns
6
- */
7
- export declare function isEmptyFilter(filter: Filter<FilterType>): boolean;
8
- /**
9
- * Determine if a filterGroup is "empty"
10
- * @param filterGroup
11
- * @returns
12
- */
13
- export declare function isEmptyFilterGroup(filterGroup: IFilterGroup<FilterType>): boolean;
@@ -1,36 +0,0 @@
1
- import { ISearchOptions } from "@esri/arcgis-rest-portal";
2
- import { Filter, IGroupFilterDefinition } from ".";
3
- /**
4
- *
5
- * Merge `Filter<"group">` objects
6
- *
7
- * Useful in components which may get partial filters from a variety of
8
- * sub-components, which are then combined into a single filter prior
9
- * to executing the search.
10
- * @param filters
11
- * @returns
12
- */
13
- export declare function mergeGroupFilters(filters: Array<Filter<"group">>): Filter<"group">;
14
- /**
15
- * Prior to serialization into the query syntax for the backing APIs, we first expand [Filters](../Filter)
16
- *
17
- * Filter's can express their intent in a very terse form, but to ensure consistent structures
18
- * we expand them into their more verbose form.
19
- *
20
- * i.e. `title: "Water"` expands into `title: { any: ["Water"]}`
21
- *
22
- * - Fields defined as `string | string[] | MatchOptions` will be converted to a `MatchOptions`
23
- * - RelativeDate fields are converted to DateRange<number>
24
- *
25
- * @param filter
26
- * @returns
27
- */
28
- export declare function expandGroupFilter(filter: Filter<"group">): IGroupFilterDefinition;
29
- /**
30
- * @private
31
- * Serialize an `IGroupFilterDefinition` into an `ISearchOptions` for use
32
- * with `searchGroups`
33
- * @param filter
34
- * @returns
35
- */
36
- export declare function serializeGroupFilterForPortal(filter: IGroupFilterDefinition): ISearchOptions;
@@ -1,10 +0,0 @@
1
- import { DatasetResource, IHubRequestOptions } from "..";
2
- /**
3
- * Search the Hub API
4
- *
5
- * @param requestOptions
6
- * @returns JSONAPI response
7
- */
8
- export declare function hubApiSearch(requestOptions: IHubRequestOptions): Promise<{
9
- data: DatasetResource[];
10
- }>;
@@ -1,87 +0,0 @@
1
- import { ICollection } from "./ICollection";
2
- import { IFacet } from "./IFacet";
3
- import { Filter, FilterType, IFilterGroup, ISortOption } from "./types";
4
- /**
5
- * Catalog is the definition which powers what options
6
- * are available in a Gallery. It controls not only
7
- * the scoping of the search, but also the options
8
- * available to the UX.
9
- *
10
- * Thus the lower-level `searchContent`, `searchUser`, `searchGroup` functions
11
- * do not take Catalogs, rather they accept [Filters](../Filter)
12
- *
13
- * ```ts
14
- * const simpleCatalog:Catalog = {
15
- * title: "Select Map",
16
- * filters: [
17
- * {
18
- * fitlerType: "item",
19
- * operation: "AND",
20
- * fitlers
21
- * filterType: "content",
22
- * type: "Web Map",
23
- * owner: "jsmith"
24
- * }
25
- * }
26
- * ```
27
- *
28
- * ## Collections
29
- * The key feature of a Catalog is the ability to defined [Collections](../Collection).
30
- * These are essentially sub-sets of content, typically organized around
31
- * generalized content types, i.e. "Datasets", vs "Maps", vs "Documents"
32
- *
33
- *
34
- * ```ts
35
- * const complex:Catalog = {
36
- * filter: {
37
- * type: "content",
38
- * groups: ["3ef", "bc4"]
39
- * },
40
- * collections: [
41
- * {
42
- * label: "Documents",
43
- * filter: {
44
- * filterType: "content",
45
- * type: ["Microsoft Word", "PDF", "Microsoft Excel"]
46
- * }
47
- * },
48
- * {
49
- * label: "Datasets",
50
- * filter: {
51
- * filterType: "content",
52
- * type: ["Feature Layer", "Feature Service", "Map Service", "CSV"]
53
- * }
54
- * }
55
- * ]
56
- * }
57
- * ```
58
- */
59
- export interface ICatalog {
60
- /**
61
- * Title for the Gallery
62
- */
63
- title?: string;
64
- /**
65
- * Scope is a set of FilterGroups which define the limits of the Catalog.
66
- * Typically it is just a set of group ids, but it may be arbitrarily complex.
67
- * If one was to "search a catalog", this is the description of what would be returned.
68
- */
69
- scope?: Array<IFilterGroup<FilterType>>;
70
- /**
71
- * Filter defines the "scope" of the Catalog, typically a set of groups or orgids
72
- * DEPRECATED: Use `scope`
73
- */
74
- filter?: Filter<FilterType>;
75
- /**
76
- * Sort options to be shown in the Gallery
77
- */
78
- sort?: ISortOption[];
79
- /**
80
- * Collections within the Catalog
81
- */
82
- collections?: ICollection[];
83
- /**
84
- * Facets to use with all Collections
85
- */
86
- facets?: IFacet[];
87
- }
@@ -1,28 +0,0 @@
1
- import { IFacet } from "./IFacet";
2
- import { Filter, FilterType, IFilterGroup, ISortOption } from "./types";
3
- /**
4
- * A Collection is a subset of a Catalog, but can be used independently
5
- * in Galleries
6
- */
7
- export interface ICollection {
8
- label: string;
9
- key: string;
10
- /**
11
- * Filter Type used in this collection
12
- */
13
- filterType?: FilterType;
14
- /**
15
- * Scope is a set of FilterGroups which define the limits of the Collection.
16
- * Typically it is just a set of group ids, but it may be arbitrarily complex.
17
- * If one was to "search the collection", this is the description of what would be returned.
18
- */
19
- scope?: Array<IFilterGroup<FilterType>>;
20
- /**
21
- * Specify the includes to be requested when working with this collection
22
- */
23
- include?: string[];
24
- sortOption: ISortOption;
25
- facets?: IFacet[];
26
- filter?: Filter<FilterType>;
27
- defaultQuery?: string;
28
- }