@esri/hub-common 9.3.0 → 9.4.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 (40) hide show
  1. package/dist/es2017/search/_searchContent.js +62 -0
  2. package/dist/es2017/search/_searchContent.js.map +1 -0
  3. package/dist/es2017/search/content-utils.js +422 -0
  4. package/dist/es2017/search/content-utils.js.map +1 -0
  5. package/dist/es2017/search/index.js +4 -0
  6. package/dist/es2017/search/index.js.map +1 -1
  7. package/dist/es2017/search/types.js +1 -0
  8. package/dist/es2017/search/types.js.map +1 -0
  9. package/dist/es2017/search/utils.js +344 -0
  10. package/dist/es2017/search/utils.js.map +1 -0
  11. package/dist/esm/search/_searchContent.js +70 -0
  12. package/dist/esm/search/_searchContent.js.map +1 -0
  13. package/dist/esm/search/content-utils.js +426 -0
  14. package/dist/esm/search/content-utils.js.map +1 -0
  15. package/dist/esm/search/index.js +4 -0
  16. package/dist/esm/search/index.js.map +1 -1
  17. package/dist/esm/search/types.js +1 -0
  18. package/dist/esm/search/types.js.map +1 -0
  19. package/dist/esm/search/utils.js +341 -0
  20. package/dist/esm/search/utils.js.map +1 -0
  21. package/dist/node/search/_searchContent.js +66 -0
  22. package/dist/node/search/_searchContent.js.map +1 -0
  23. package/dist/node/search/content-utils.js +432 -0
  24. package/dist/node/search/content-utils.js.map +1 -0
  25. package/dist/node/search/index.js +4 -0
  26. package/dist/node/search/index.js.map +1 -1
  27. package/dist/node/search/types.js +3 -0
  28. package/dist/node/search/types.js.map +1 -0
  29. package/dist/node/search/utils.js +357 -0
  30. package/dist/node/search/utils.js.map +1 -0
  31. package/dist/types/search/_searchContent.d.ts +7 -0
  32. package/dist/types/search/content-utils.d.ts +70 -0
  33. package/dist/types/search/index.d.ts +4 -0
  34. package/dist/types/search/types.d.ts +294 -0
  35. package/dist/types/search/utils.d.ts +92 -0
  36. package/dist/umd/common.umd.js +842 -1
  37. package/dist/umd/common.umd.js.map +1 -1
  38. package/dist/umd/common.umd.min.js +1 -1
  39. package/dist/umd/common.umd.min.js.map +1 -1
  40. package/package.json +3 -3
@@ -0,0 +1,432 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertContentFilterToSearchOptions = exports.serializeContentFilterForPortal = exports.convertContentDefinitionToFilter = exports.expandTypeField = exports.expandContentFilter = exports.mergeContentFilter = exports.convertPortalResponseToFacets = void 0;
4
+ const __1 = require("..");
5
+ const utils_1 = require("./utils");
6
+ // TODO: Implement $dataset
7
+ const ContentFilterExpansions = {
8
+ $apps: [
9
+ {
10
+ type: {
11
+ any: [
12
+ "Code Sample",
13
+ "Web Mapping Application",
14
+ "Mobile Application",
15
+ "Application",
16
+ "Desktop Application Template",
17
+ "Desktop Application",
18
+ "Operation View",
19
+ "Dashboard",
20
+ "Operations Dashboard Extension",
21
+ "Workforce Project",
22
+ "Insights Workbook",
23
+ "Insights Page",
24
+ "Insights Model",
25
+ "Hub Page",
26
+ "Hub Initiative",
27
+ "Hub Site Application",
28
+ "StoryMap",
29
+ "Web Experience",
30
+ "Web Experience Template",
31
+ "Form",
32
+ ],
33
+ not: [
34
+ "Code Attachment",
35
+ "Featured Items",
36
+ "Symbol Set",
37
+ "Color Set",
38
+ "Windows Viewer Add In",
39
+ "Windows Viewer Configuration",
40
+ "Map Area",
41
+ "Indoors Map Configuration",
42
+ ],
43
+ },
44
+ typekeywords: {
45
+ not: ["MapAreaPackage", "SMX"],
46
+ },
47
+ },
48
+ ],
49
+ $storymap: [
50
+ {
51
+ type: "StoryMap",
52
+ },
53
+ {
54
+ type: "Web Mapping Application",
55
+ typekeywords: ["Story Map"],
56
+ },
57
+ ],
58
+ $dashboard: [
59
+ {
60
+ type: "Dashboard",
61
+ typekeywords: {
62
+ any: ["Dashboard"],
63
+ not: ["ArcGIS Operation View", "Add In", "Extension"],
64
+ },
65
+ },
66
+ ],
67
+ $dataset: [],
68
+ $experience: [
69
+ {
70
+ type: {
71
+ any: ["Web Experience"],
72
+ not: ["Web Experience Template"],
73
+ },
74
+ },
75
+ ],
76
+ $site: [
77
+ {
78
+ type: ["Hub Site Application", "Site Application"],
79
+ },
80
+ {
81
+ type: ["Web Mapping Application"],
82
+ typekeywords: ["hubSite"],
83
+ },
84
+ ],
85
+ $initiative: [
86
+ {
87
+ type: {
88
+ any: "Hub Initiative",
89
+ not: "Hub Initiative Template",
90
+ },
91
+ },
92
+ ],
93
+ $document: [
94
+ {
95
+ typekeywords: {
96
+ any: "Document",
97
+ not: ["MapAreaPackage", "SMX"],
98
+ },
99
+ type: {
100
+ any: [
101
+ "Image",
102
+ "Layout",
103
+ "Desktop Style",
104
+ "Project Template",
105
+ "Report Template",
106
+ "Pro Report",
107
+ "Statistical Data Collection",
108
+ "360 VR Experience",
109
+ "netCDF",
110
+ "PDF",
111
+ "CSV",
112
+ "Administrative Report",
113
+ "Raster function template",
114
+ ],
115
+ not: [
116
+ "Image Service",
117
+ "Explorer Document",
118
+ "Explorer Map",
119
+ "Globe Document",
120
+ "Scene Document",
121
+ "Code Attachment",
122
+ "Featured Items",
123
+ "Symbol Set",
124
+ "ColorSet",
125
+ "Windows Viewer Add In",
126
+ "Windows Viewer Configuration",
127
+ "Map Area",
128
+ "Indoors Map Configuration",
129
+ ],
130
+ },
131
+ },
132
+ ],
133
+ };
134
+ /**
135
+ * @private
136
+ * Convert portal search response to items
137
+ * @param response
138
+ * @returns
139
+ */
140
+ function convertPortalResponseToFacets(response) {
141
+ var _a;
142
+ const result = [];
143
+ if ((_a = response.aggregations) === null || _a === void 0 ? void 0 : _a.counts) {
144
+ response.aggregations.counts.forEach((entry) => {
145
+ const facet = {
146
+ label: entry.fieldName,
147
+ attribute: entry.fieldName,
148
+ type: "multi-select",
149
+ };
150
+ const options = [];
151
+ entry.fieldValues.forEach((fv) => {
152
+ const filter = {
153
+ filterType: "content",
154
+ };
155
+ filter[entry.fieldName] = fv.value;
156
+ const fo = {
157
+ label: fv.value,
158
+ value: fv.value,
159
+ count: fv.count,
160
+ selected: false,
161
+ filter,
162
+ };
163
+ options.push(fo);
164
+ });
165
+ facet.options = options;
166
+ result.push(facet);
167
+ });
168
+ }
169
+ return result;
170
+ }
171
+ exports.convertPortalResponseToFacets = convertPortalResponseToFacets;
172
+ /**
173
+ * @private
174
+ * Merge `Filter<"content">` objects
175
+ * @param filters
176
+ * @returns
177
+ */
178
+ function mergeContentFilter(filters) {
179
+ // expand all the filters so all prop types are consistent
180
+ const expanded = filters.map(expandContentFilter);
181
+ // now we can merge based on fields
182
+ const dateFields = ["created", "modified"];
183
+ const specialFields = ["filterType", "subFilters", ...dateFields];
184
+ const result = expanded.reduce((acc, entry) => {
185
+ // process fields
186
+ Object.entries(entry).forEach(([key, value]) => {
187
+ // MatchOption fields
188
+ if (!specialFields.includes(key)) {
189
+ if (acc[key]) {
190
+ acc[key] = utils_1.mergeMatchOptions(acc[key], value);
191
+ }
192
+ else {
193
+ acc[key] = __1.cloneObject(value);
194
+ }
195
+ }
196
+ // Dates
197
+ if (dateFields.includes(key)) {
198
+ if (acc[key]) {
199
+ acc[key] = utils_1.mergeDateRange(acc[key], value);
200
+ }
201
+ else {
202
+ acc[key] = __1.cloneObject(value);
203
+ }
204
+ }
205
+ // SubFilters
206
+ if (key === "subFilters" && Array.isArray(value)) {
207
+ if (acc.subFilters) {
208
+ acc.subFilters = mergeSubFilters(acc.subFilters, value);
209
+ }
210
+ else {
211
+ acc.subFilters = __1.cloneObject(value);
212
+ }
213
+ }
214
+ });
215
+ return acc;
216
+ }, {});
217
+ result.filterType = "content";
218
+ return result;
219
+ }
220
+ exports.mergeContentFilter = mergeContentFilter;
221
+ function mergeSubFilters(sf1, sf2) {
222
+ // Simplistic implementation: we just merge the arrays
223
+ // in the future we may try to de-dupe things as a safeguard
224
+ return [...sf1, ...sf2];
225
+ }
226
+ /**
227
+ * Prior to serialization into the query syntax for the backing APIs, we first expand [Filters](../Filter)
228
+ *
229
+ * Filter's can express their intent in a very terse form, but to ensure consistent
230
+ * into their more verbose form.
231
+ *
232
+ * i.e. `title: "Water"` expands into `title: { any: ["Water"]}`
233
+ *
234
+ * - "well known" type values are expanded
235
+ * - i.e. `type: "$storymap"` expands into two `subFilter` entries
236
+ * - Fields defined as `string | string[] | MatchOptions` will be converted to a `MatchOptions`
237
+ * - RelativeDate fields are converted to DateRange<number>
238
+ *
239
+ * @param filter
240
+ * @returns
241
+ */
242
+ function expandContentFilter(filter) {
243
+ // Expand filter.type first
244
+ const expandedTypeFilter = expandTypeField(filter);
245
+ // Expand subfilters
246
+ // Guard - JS Clients could send in anything...
247
+ if (Array.isArray(filter.subFilters)) {
248
+ // Convert any strings into the coresponding ContentFilterDefinition
249
+ expandedTypeFilter.subFilters = expandedTypeFilter.subFilters.reduce((acc, entry) => {
250
+ if (typeof entry === "string") {
251
+ // if the entry is not a key of ContentFilterExpansions
252
+ // we just skip over it
253
+ if (ContentFilterExpansions[entry]) {
254
+ acc = acc.concat(ContentFilterExpansions[entry]);
255
+ }
256
+ }
257
+ else {
258
+ acc.push(entry); // should be a ContentFilterDefinition
259
+ }
260
+ return acc;
261
+ }, []);
262
+ }
263
+ // Convert all props into MatchOptions/DateRanges
264
+ return convertContentDefinitionToFilter(expandedTypeFilter);
265
+ }
266
+ exports.expandContentFilter = expandContentFilter;
267
+ /**
268
+ * @private
269
+ * Expand from a well-known "type" into it's longer form
270
+ *
271
+ * i.e. `type: "$storymap"` expands into two subFilters entries
272
+ *
273
+ * @param filter
274
+ * @returns
275
+ */
276
+ function expandTypeField(filter) {
277
+ const clone = __1.cloneObject(filter);
278
+ // ensure subFilters is defined as an array
279
+ clone.subFilters = clone.subFilters || [];
280
+ if (clone.type) {
281
+ // if .type is an Array...
282
+ if (Array.isArray(clone.type)) {
283
+ // remove any well-known-keys and move their expansions into subfilters
284
+ clone.type = clone.type.reduce((acc, entry) => {
285
+ if (isWellKnownType(entry)) {
286
+ // working with dynamic objects in typescript requires some assertions
287
+ const key = entry;
288
+ clone.subFilters = clone.subFilters.concat(lookupTypeFilters(key));
289
+ }
290
+ else {
291
+ acc.push(entry);
292
+ }
293
+ return acc;
294
+ }, []);
295
+ }
296
+ else if (isWellKnownType(clone.type)) {
297
+ const key = clone.type;
298
+ clone.subFilters = clone.subFilters.concat(lookupTypeFilters(key));
299
+ delete clone.type;
300
+ }
301
+ else {
302
+ // Future?: implement "expansions" inside MatchOptions
303
+ // For now, we only attempt expansions for filter.type
304
+ // if it's a string, or for strings inside an array
305
+ // Unclear if it's of value to allow short-cuts inside MatchOptions
306
+ }
307
+ }
308
+ return clone;
309
+ }
310
+ exports.expandTypeField = expandTypeField;
311
+ /**
312
+ * Is the argument a well-known type "key"
313
+ *
314
+ * Accepts `string`, `string[]` or `IMatchOptions`
315
+ * but only string values can possibly be properties
316
+ * on `ContentFilterExpansions`
317
+ * @param key
318
+ * @returns
319
+ */
320
+ function isWellKnownType(key) {
321
+ let result = false;
322
+ if (typeof key === "string") {
323
+ result = key in ContentFilterExpansions;
324
+ }
325
+ return result;
326
+ }
327
+ function lookupTypeFilters(key) {
328
+ return ContentFilterExpansions[key];
329
+ }
330
+ /**
331
+ * @private
332
+ * Convert a `ContentFilterDefinition` to a `ContentFilter`
333
+ *
334
+ * ContentFilter is a narrower version of ContentFilterDefinition, without
335
+ * the union types. Using a ContentFilter makes working with the structure
336
+ * in typescript much easier.
337
+ *
338
+ * @param filter
339
+ * @returns
340
+ */
341
+ function convertContentDefinitionToFilter(filter) {
342
+ const result = {};
343
+ if (filter.term) {
344
+ result.term = filter.term;
345
+ }
346
+ const dateProps = ["created", "modified"];
347
+ // Some properties should not get converted to MatchOptions
348
+ const specialProps = ["filterType", "subFilters", "term", ...dateProps];
349
+ // Do the conversion
350
+ Object.entries(filter).forEach(([key, value]) => {
351
+ if (!specialProps.includes(key)) {
352
+ result[key] = utils_1.valueToMatchOptions(value);
353
+ }
354
+ });
355
+ // Special Cases
356
+ // subFilters; Array of ContentFilterDefinitions
357
+ if (filter.subFilters && Array.isArray(filter.subFilters)) {
358
+ // downcast - would be nice to skip this or use some other constuct
359
+ const sf = filter.subFilters;
360
+ result.subFilters = sf.map(convertContentDefinitionToFilter);
361
+ }
362
+ // Dates; Ensure they are all DateRange<number>
363
+ dateProps.forEach((fld) => {
364
+ if (filter[fld]) {
365
+ if (filter[fld].type === "relative-date") {
366
+ result[fld] = utils_1.relativeDateToDateRange(filter[fld]);
367
+ }
368
+ else {
369
+ result[fld] = __1.cloneObject(filter[fld]);
370
+ }
371
+ }
372
+ });
373
+ return result;
374
+ }
375
+ exports.convertContentDefinitionToFilter = convertContentDefinitionToFilter;
376
+ /**
377
+ * @private
378
+ * Serialize a `ContentFilter` into an `ISearchOptions` for use with `searchItems`
379
+ * @param filter
380
+ * @returns
381
+ */
382
+ function serializeContentFilterForPortal(filter) {
383
+ let searchOptions = convertContentFilterToSearchOptions(filter);
384
+ if (filter.subFilters) {
385
+ const subFilterOptions = filter.subFilters.reduce((acc, entry) => {
386
+ // Next guard is present b/c this can be used from javascript
387
+ // but our tests are written in typescript which prevents us
388
+ // from hitting the else
389
+ /* istanbul ignore else */
390
+ if (typeof entry === "object") {
391
+ acc = utils_1.mergeSearchOptions(acc, convertContentFilterToSearchOptions(entry), "OR");
392
+ }
393
+ return acc;
394
+ }, { q: "", filter: "" });
395
+ // merge with searchOptions using AND
396
+ searchOptions = utils_1.mergeSearchOptions(searchOptions, subFilterOptions, "AND");
397
+ }
398
+ // term is always last, and pre-pended on searchOptions.q
399
+ if (filter.term) {
400
+ searchOptions.q = `${filter.term} ${searchOptions.q}`.trim();
401
+ }
402
+ return searchOptions;
403
+ }
404
+ exports.serializeContentFilterForPortal = serializeContentFilterForPortal;
405
+ /**
406
+ * @private
407
+ * Convert a ContentFilter to a SearchOptions
408
+ *
409
+ * @param filter
410
+ * @returns
411
+ */
412
+ function convertContentFilterToSearchOptions(filter) {
413
+ let result = {
414
+ q: "",
415
+ filter: "",
416
+ };
417
+ const dateProps = ["created", "modified"];
418
+ const specialProps = ["filterType", "subFilters", "term", ...dateProps];
419
+ Object.entries(filter).forEach(([key, value]) => {
420
+ // MatchOptions may go into either q or filter
421
+ if (!specialProps.includes(key)) {
422
+ result = utils_1.mergeSearchOptions(result, utils_1.serializeMatchOptions(key, value), "AND");
423
+ }
424
+ // Dates only go into q
425
+ if (dateProps.includes(key)) {
426
+ result = utils_1.mergeSearchOptions(result, utils_1.serializeDateRange(key, value), "AND");
427
+ }
428
+ });
429
+ return result;
430
+ }
431
+ exports.convertContentFilterToSearchOptions = convertContentFilterToSearchOptions;
432
+ //# sourceMappingURL=content-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-utils.js","sourceRoot":"","sources":["../../../src/search/content-utils.ts"],"names":[],"mappings":";;;AACA,0BAAiC;AAWjC,mCAQiB;AAEjB,2BAA2B;AAC3B,MAAM,uBAAuB,GAA6B;IACxD,KAAK,EAAE;QACL;YACE,IAAI,EAAE;gBACJ,GAAG,EAAE;oBACH,aAAa;oBACb,yBAAyB;oBACzB,oBAAoB;oBACpB,aAAa;oBACb,8BAA8B;oBAC9B,qBAAqB;oBACrB,gBAAgB;oBAChB,WAAW;oBACX,gCAAgC;oBAChC,mBAAmB;oBACnB,mBAAmB;oBACnB,eAAe;oBACf,gBAAgB;oBAChB,UAAU;oBACV,gBAAgB;oBAChB,sBAAsB;oBACtB,UAAU;oBACV,gBAAgB;oBAChB,yBAAyB;oBACzB,MAAM;iBACP;gBACD,GAAG,EAAE;oBACH,iBAAiB;oBACjB,gBAAgB;oBAChB,YAAY;oBACZ,WAAW;oBACX,uBAAuB;oBACvB,8BAA8B;oBAC9B,UAAU;oBACV,2BAA2B;iBAC5B;aACF;YACD,YAAY,EAAE;gBACZ,GAAG,EAAE,CAAC,gBAAgB,EAAE,KAAK,CAAC;aAC/B;SACF;KACF;IACD,SAAS,EAAE;QACT;YACE,IAAI,EAAE,UAAU;SACjB;QACD;YACE,IAAI,EAAE,yBAAyB;YAC/B,YAAY,EAAE,CAAC,WAAW,CAAC;SAC5B;KACF;I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AAC,CAAC;IAC1C,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IACxE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9C,8CAA8C;QAC9C,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,GAAG,0BAAkB,CACzB,MAAM,EACN,6BAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,EACjC,KAAK,CACN,CAAC;SACH;QACD,uBAAuB;QACvB,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC3B,MAAM,GAAG,0BAAkB,CACzB,MAAM,EACN,0BAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,EAC9B,KAAK,CACN,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AA9BD,kFA8BC"}
@@ -2,4 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./hub-api-search"), exports);
5
+ tslib_1.__exportStar(require("./content-utils"), exports);
6
+ tslib_1.__exportStar(require("./utils"), exports);
7
+ tslib_1.__exportStar(require("./types"), exports);
8
+ tslib_1.__exportStar(require("./_searchContent"), exports);
5
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/search/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/search/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,0DAAgC;AAChC,kDAAwB;AACxB,kDAAwB;AACxB,2DAAiC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/search/types.ts"],"names":[],"mappings":""}