@esri/hub-common 10.0.0-next.1 → 10.0.0-next.2

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 (112) hide show
  1. package/dist/es2017/projects/HubProjects.js.map +1 -1
  2. package/dist/es2017/search/_internal/hubSearchItems.js +3 -94
  3. package/dist/es2017/search/_internal/hubSearchItems.js.map +1 -1
  4. package/dist/es2017/search/_internal/portalSearchItems.js +3 -25
  5. package/dist/es2017/search/_internal/portalSearchItems.js.map +1 -1
  6. package/dist/es2017/search/index.js +0 -7
  7. package/dist/es2017/search/index.js.map +1 -1
  8. package/dist/es2017/search/types/index.js +0 -3
  9. package/dist/es2017/search/types/index.js.map +1 -1
  10. package/dist/es2017/search/utils.js +1 -207
  11. package/dist/es2017/search/utils.js.map +1 -1
  12. package/dist/esm/projects/HubProjects.js.map +1 -1
  13. package/dist/esm/search/_internal/hubSearchItems.js +4 -102
  14. package/dist/esm/search/_internal/hubSearchItems.js.map +1 -1
  15. package/dist/esm/search/_internal/portalSearchItems.js +3 -25
  16. package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
  17. package/dist/esm/search/index.js +0 -7
  18. package/dist/esm/search/index.js.map +1 -1
  19. package/dist/esm/search/types/index.js +0 -3
  20. package/dist/esm/search/types/index.js.map +1 -1
  21. package/dist/esm/search/utils.js +1 -204
  22. package/dist/esm/search/utils.js.map +1 -1
  23. package/dist/node/projects/HubProjects.js.map +1 -1
  24. package/dist/node/search/_internal/hubSearchItems.js +3 -94
  25. package/dist/node/search/_internal/hubSearchItems.js.map +1 -1
  26. package/dist/node/search/_internal/portalSearchItems.js +4 -26
  27. package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
  28. package/dist/node/search/index.js +0 -7
  29. package/dist/node/search/index.js.map +1 -1
  30. package/dist/node/search/types/index.js +0 -3
  31. package/dist/node/search/types/index.js.map +1 -1
  32. package/dist/node/search/utils.js +1 -213
  33. package/dist/node/search/utils.js.map +1 -1
  34. package/dist/types/search/_internal/hubSearchItems.d.ts +3 -3
  35. package/dist/types/search/_internal/portalSearchItems.d.ts +15 -15
  36. package/dist/types/search/index.d.ts +0 -7
  37. package/dist/types/search/types/index.d.ts +0 -3
  38. package/dist/types/search/types/types.d.ts +0 -204
  39. package/dist/types/search/utils.d.ts +2 -58
  40. package/dist/umd/common.umd.js +101 -1459
  41. package/dist/umd/common.umd.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/es2017/search/_searchContent.js +0 -112
  44. package/dist/es2017/search/_searchContent.js.map +0 -1
  45. package/dist/es2017/search/_searchGroups.js +0 -88
  46. package/dist/es2017/search/_searchGroups.js.map +0 -1
  47. package/dist/es2017/search/_searchUsers.js +0 -89
  48. package/dist/es2017/search/_searchUsers.js.map +0 -1
  49. package/dist/es2017/search/content-utils.js +0 -390
  50. package/dist/es2017/search/content-utils.js.map +0 -1
  51. package/dist/es2017/search/filter-utils.js +0 -31
  52. package/dist/es2017/search/filter-utils.js.map +0 -1
  53. package/dist/es2017/search/group-utils.js +0 -142
  54. package/dist/es2017/search/group-utils.js.map +0 -1
  55. package/dist/es2017/search/types/ICatalog.js +0 -1
  56. package/dist/es2017/search/types/ICatalog.js.map +0 -1
  57. package/dist/es2017/search/types/ICollection.js +0 -1
  58. package/dist/es2017/search/types/ICollection.js.map +0 -1
  59. package/dist/es2017/search/types/IHubApiSearchRequest.js +0 -1
  60. package/dist/es2017/search/types/IHubApiSearchRequest.js.map +0 -1
  61. package/dist/es2017/search/user-utils.js +0 -139
  62. package/dist/es2017/search/user-utils.js.map +0 -1
  63. package/dist/esm/search/_searchContent.js +0 -114
  64. package/dist/esm/search/_searchContent.js.map +0 -1
  65. package/dist/esm/search/_searchGroups.js +0 -91
  66. package/dist/esm/search/_searchGroups.js.map +0 -1
  67. package/dist/esm/search/_searchUsers.js +0 -92
  68. package/dist/esm/search/_searchUsers.js.map +0 -1
  69. package/dist/esm/search/content-utils.js +0 -394
  70. package/dist/esm/search/content-utils.js.map +0 -1
  71. package/dist/esm/search/filter-utils.js +0 -31
  72. package/dist/esm/search/filter-utils.js.map +0 -1
  73. package/dist/esm/search/group-utils.js +0 -146
  74. package/dist/esm/search/group-utils.js.map +0 -1
  75. package/dist/esm/search/types/ICatalog.js +0 -1
  76. package/dist/esm/search/types/ICatalog.js.map +0 -1
  77. package/dist/esm/search/types/ICollection.js +0 -1
  78. package/dist/esm/search/types/ICollection.js.map +0 -1
  79. package/dist/esm/search/types/IHubApiSearchRequest.js +0 -1
  80. package/dist/esm/search/types/IHubApiSearchRequest.js.map +0 -1
  81. package/dist/esm/search/user-utils.js +0 -143
  82. package/dist/esm/search/user-utils.js.map +0 -1
  83. package/dist/node/search/_searchContent.js +0 -116
  84. package/dist/node/search/_searchContent.js.map +0 -1
  85. package/dist/node/search/_searchGroups.js +0 -92
  86. package/dist/node/search/_searchGroups.js.map +0 -1
  87. package/dist/node/search/_searchUsers.js +0 -93
  88. package/dist/node/search/_searchUsers.js.map +0 -1
  89. package/dist/node/search/content-utils.js +0 -399
  90. package/dist/node/search/content-utils.js.map +0 -1
  91. package/dist/node/search/filter-utils.js +0 -36
  92. package/dist/node/search/filter-utils.js.map +0 -1
  93. package/dist/node/search/group-utils.js +0 -148
  94. package/dist/node/search/group-utils.js.map +0 -1
  95. package/dist/node/search/types/ICatalog.js +0 -3
  96. package/dist/node/search/types/ICatalog.js.map +0 -1
  97. package/dist/node/search/types/ICollection.js +0 -3
  98. package/dist/node/search/types/ICollection.js.map +0 -1
  99. package/dist/node/search/types/IHubApiSearchRequest.js +0 -3
  100. package/dist/node/search/types/IHubApiSearchRequest.js.map +0 -1
  101. package/dist/node/search/user-utils.js +0 -145
  102. package/dist/node/search/user-utils.js.map +0 -1
  103. package/dist/types/search/_searchContent.d.ts +0 -9
  104. package/dist/types/search/_searchGroups.d.ts +0 -13
  105. package/dist/types/search/_searchUsers.d.ts +0 -31
  106. package/dist/types/search/content-utils.d.ts +0 -66
  107. package/dist/types/search/filter-utils.d.ts +0 -13
  108. package/dist/types/search/group-utils.d.ts +0 -36
  109. package/dist/types/search/types/ICatalog.d.ts +0 -82
  110. package/dist/types/search/types/ICollection.d.ts +0 -26
  111. package/dist/types/search/types/IHubApiSearchRequest.d.ts +0 -16
  112. package/dist/types/search/user-utils.d.ts +0 -35
@@ -1,399 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertContentFilterToSearchOptions = exports.serializeContentFilterForPortal = exports.convertContentDefinitionToFilter = exports.expandTypeField = exports.expandContentFilter = exports.mergeContentFilter = void 0;
4
- const __1 = require("..");
5
- // import { IFacetOption } from "./types/IFacetOption";
6
- // import { IFacet } from "./types/IFacet";
7
- const utils_1 = require("./utils");
8
- // TODO: Remove with _searchContent
9
- // TODO: Implement $dataset
10
- const ContentFilterExpansions = {
11
- $apps: [
12
- {
13
- type: {
14
- any: [
15
- "Code Sample",
16
- "Web Mapping Application",
17
- "Mobile Application",
18
- "Application",
19
- "Desktop Application Template",
20
- "Desktop Application",
21
- "Operation View",
22
- "Dashboard",
23
- "Operations Dashboard Extension",
24
- "Workforce Project",
25
- "Insights Workbook",
26
- "Insights Page",
27
- "Insights Model",
28
- "Hub Page",
29
- "Hub Initiative",
30
- "Hub Site Application",
31
- "StoryMap",
32
- "Web Experience",
33
- "Web Experience Template",
34
- "Form",
35
- ],
36
- not: [
37
- "Code Attachment",
38
- "Featured Items",
39
- "Symbol Set",
40
- "Color Set",
41
- "Windows Viewer Add In",
42
- "Windows Viewer Configuration",
43
- "Map Area",
44
- "Indoors Map Configuration",
45
- ],
46
- },
47
- typekeywords: {
48
- not: ["MapAreaPackage", "SMX"],
49
- },
50
- },
51
- ],
52
- $storymap: [
53
- {
54
- type: "StoryMap",
55
- },
56
- {
57
- type: "Web Mapping Application",
58
- typekeywords: ["Story Map"],
59
- },
60
- ],
61
- $dashboard: [
62
- {
63
- type: "Dashboard",
64
- typekeywords: {
65
- any: ["Dashboard"],
66
- not: ["ArcGIS Operation View", "Add In", "Extension"],
67
- },
68
- },
69
- ],
70
- $dataset: [],
71
- $experience: [
72
- {
73
- type: {
74
- any: ["Web Experience"],
75
- not: ["Web Experience Template"],
76
- },
77
- },
78
- ],
79
- $site: [
80
- {
81
- type: ["Hub Site Application", "Site Application"],
82
- },
83
- {
84
- type: ["Web Mapping Application"],
85
- typekeywords: ["hubSite"],
86
- },
87
- ],
88
- $initiative: [
89
- {
90
- type: {
91
- any: "Hub Initiative",
92
- not: "Hub Initiative Template",
93
- },
94
- },
95
- ],
96
- $document: [
97
- {
98
- typekeywords: {
99
- any: "Document",
100
- not: ["MapAreaPackage", "SMX"],
101
- },
102
- type: {
103
- any: [
104
- "Image",
105
- "Layout",
106
- "Desktop Style",
107
- "Project Template",
108
- "Report Template",
109
- "Pro Report",
110
- "Statistical Data Collection",
111
- "360 VR Experience",
112
- "netCDF",
113
- "PDF",
114
- "CSV",
115
- "Administrative Report",
116
- "Raster function template",
117
- ],
118
- not: [
119
- "Image Service",
120
- "Explorer Document",
121
- "Explorer Map",
122
- "Globe Document",
123
- "Scene Document",
124
- "Code Attachment",
125
- "Featured Items",
126
- "Symbol Set",
127
- "ColorSet",
128
- "Windows Viewer Add In",
129
- "Windows Viewer Configuration",
130
- "Map Area",
131
- "Indoors Map Configuration",
132
- ],
133
- },
134
- },
135
- ],
136
- };
137
- /**
138
- * Merge `Filter<"content">` objects
139
- *
140
- * Useful in components which may get partial filters from a variety of
141
- * sub-components, which are then combined into a single filter prior
142
- * to executing the search.
143
- * @param filters
144
- * @returns
145
- */
146
- function mergeContentFilter(filters) {
147
- __1.Logger.warn(`DEPRECATION: mergeContentFilter will be removed and filters should not longer be merged. Work with IFilterGroups instead`);
148
- // expand all the filters so all prop types are consistent
149
- const expanded = filters.map(expandContentFilter);
150
- // now we can merge based on fields
151
- const dateFields = ["created", "modified"];
152
- const specialFields = ["filterType", "subFilters", "term", ...dateFields];
153
- const result = expanded.reduce((acc, entry) => {
154
- // process fields
155
- Object.entries(entry).forEach(([key, value]) => {
156
- if (acc.hasOwnProperty(key)) {
157
- /* istanbul ignore else */
158
- if (!specialFields.includes(key)) {
159
- acc[key] = utils_1.mergeMatchOptions(acc[key], value);
160
- }
161
- else if (dateFields.includes(key)) {
162
- acc[key] = utils_1.mergeDateRange(acc[key], value);
163
- }
164
- else if (key === "term") {
165
- acc[key] = `${acc[key]} ${value}`;
166
- }
167
- else if (key === "subFilters") {
168
- acc[key] = mergeSubFilters(acc[key], value);
169
- }
170
- }
171
- else {
172
- acc[key] = __1.cloneObject(value);
173
- }
174
- });
175
- return acc;
176
- }, {});
177
- result.filterType = "content";
178
- return result;
179
- }
180
- exports.mergeContentFilter = mergeContentFilter;
181
- function mergeSubFilters(sf1, sf2) {
182
- // Simplistic implementation: we just merge the arrays
183
- // in the future we may try to de-dupe things as a safeguard
184
- return [...sf1, ...sf2];
185
- }
186
- /**
187
- * Prior to serialization into the query syntax for the backing APIs, we first expand [Filters](../Filter)
188
- *
189
- * Filter's can express their intent in a very terse form, but to ensure consistent structures
190
- * we expand them into their more verbose form.
191
- *
192
- * i.e. `title: "Water"` expands into `title: { any: ["Water"]}`
193
- *
194
- * - "well known" type values are expanded
195
- * - i.e. `type: "$storymap"` expands into two `subFilter` entries
196
- * - Fields defined as `string | string[] | MatchOptions` will be converted to a `MatchOptions`
197
- * - RelativeDate fields are converted to DateRange<number>
198
- *
199
- * @param filter
200
- * @returns
201
- */
202
- function expandContentFilter(filter) {
203
- __1.Logger.warn(`DEPRECATION: expandContentFilter will be removed. Work with IFilterGroups<"item"> instead`);
204
- // Expand filter.type first
205
- const expandedTypeFilter = expandTypeField(filter);
206
- // Expand subfilters
207
- // Guard - JS Clients could send in anything...
208
- if (Array.isArray(filter.subFilters)) {
209
- // Convert any strings into the coresponding ContentFilterDefinition
210
- expandedTypeFilter.subFilters = expandedTypeFilter.subFilters.reduce((acc, entry) => {
211
- if (typeof entry === "string") {
212
- // if the entry is not a key of ContentFilterExpansions
213
- // we just skip over it
214
- if (ContentFilterExpansions[entry]) {
215
- acc = acc.concat(ContentFilterExpansions[entry]);
216
- }
217
- }
218
- else {
219
- acc.push(entry); // should be a ContentFilterDefinition
220
- }
221
- return acc;
222
- }, []);
223
- }
224
- // Convert all props into MatchOptions/DateRanges
225
- return convertContentDefinitionToFilter(expandedTypeFilter);
226
- }
227
- exports.expandContentFilter = expandContentFilter;
228
- /**
229
- * @private
230
- * Expand from a well-known "type" into it's longer form
231
- *
232
- * i.e. `type: "$storymap"` expands into two subFilters entries
233
- *
234
- * @param filter
235
- * @returns
236
- */
237
- function expandTypeField(filter) {
238
- const clone = __1.cloneObject(filter);
239
- // ensure subFilters is defined as an array
240
- clone.subFilters = clone.subFilters || [];
241
- if (clone.type) {
242
- // if .type is an Array...
243
- if (Array.isArray(clone.type)) {
244
- // remove any well-known-keys and move their expansions into subfilters
245
- clone.type = clone.type.reduce((acc, entry) => {
246
- if (isWellKnownType(entry)) {
247
- // working with dynamic objects in typescript requires some assertions
248
- const key = entry;
249
- clone.subFilters = clone.subFilters.concat(lookupTypeFilters(key));
250
- }
251
- else {
252
- acc.push(entry);
253
- }
254
- return acc;
255
- }, []);
256
- }
257
- else if (isWellKnownType(clone.type)) {
258
- const key = clone.type;
259
- clone.subFilters = clone.subFilters.concat(lookupTypeFilters(key));
260
- delete clone.type;
261
- }
262
- else {
263
- // Future?: implement "expansions" inside MatchOptions
264
- // For now, we only attempt expansions for filter.type
265
- // if it's a string, or for strings inside an array
266
- // Unclear if it's of value to allow short-cuts inside MatchOptions
267
- }
268
- }
269
- return clone;
270
- }
271
- exports.expandTypeField = expandTypeField;
272
- /**
273
- * Is the argument a well-known type "key"
274
- *
275
- * Accepts `string`, `string[]` or `IMatchOptions`
276
- * but only string values can possibly be properties
277
- * on `ContentFilterExpansions`
278
- * @param key
279
- * @returns
280
- */
281
- function isWellKnownType(key) {
282
- let result = false;
283
- if (typeof key === "string") {
284
- result = key in ContentFilterExpansions;
285
- }
286
- return result;
287
- }
288
- function lookupTypeFilters(key) {
289
- return ContentFilterExpansions[key];
290
- }
291
- /**
292
- * @private
293
- * Convert a `ContentFilterDefinition` to a `ContentFilter`
294
- *
295
- * ContentFilter is a narrower version of ContentFilterDefinition, without
296
- * the union types. Using a ContentFilter makes working with the structure
297
- * in typescript much easier.
298
- *
299
- * @param filter
300
- * @returns
301
- */
302
- function convertContentDefinitionToFilter(filter) {
303
- // TODO: Remove with _searchContent
304
- __1.Logger.warn(`DEPRECATION: convertContentDefinitionToFilter will be removed. Work with IFilterGroups<"item"> instead`);
305
- const result = {};
306
- if (filter.term) {
307
- result.term = filter.term;
308
- }
309
- const dateProps = ["created", "modified"];
310
- // Some properties should not get converted to MatchOptions
311
- const specialProps = ["filterType", "subFilters", "term", ...dateProps];
312
- // Do the conversion
313
- Object.entries(filter).forEach(([key, value]) => {
314
- if (!specialProps.includes(key)) {
315
- result[key] = utils_1.valueToMatchOptions(value);
316
- }
317
- });
318
- // Special Cases
319
- // subFilters; Array of ContentFilterDefinitions
320
- if (filter.subFilters && Array.isArray(filter.subFilters)) {
321
- // downcast - would be nice to skip this or use some other constuct
322
- const sf = filter.subFilters;
323
- result.subFilters = sf.map(convertContentDefinitionToFilter);
324
- }
325
- // Dates; Ensure they are all DateRange<number>
326
- dateProps.forEach((fld) => {
327
- if (filter[fld]) {
328
- if (filter[fld].type === "relative-date") {
329
- result[fld] = utils_1.relativeDateToDateRange(filter[fld]);
330
- }
331
- else {
332
- result[fld] = __1.cloneObject(filter[fld]);
333
- }
334
- }
335
- });
336
- return result;
337
- }
338
- exports.convertContentDefinitionToFilter = convertContentDefinitionToFilter;
339
- /**
340
- * @private
341
- * Serialize a `ContentFilter` into an `ISearchOptions` for use with `searchItems`
342
- * @param filter
343
- * @returns
344
- */
345
- function serializeContentFilterForPortal(filter) {
346
- // TODO: Remove with _searchContent
347
- __1.Logger.warn(`DEPRECATION: serializeContentFilterForPortal will be removed. Work with IFilterGroups<"item"> and hubSearch() instead`);
348
- let searchOptions = convertContentFilterToSearchOptions(filter);
349
- if (filter.subFilters) {
350
- const subFilterOptions = filter.subFilters.reduce((acc, entry) => {
351
- // Next guard is present b/c this can be used from javascript
352
- // but our tests are written in typescript which prevents us
353
- // from hitting the else
354
- /* istanbul ignore else */
355
- if (typeof entry === "object") {
356
- acc = utils_1.mergeSearchOptions(acc, convertContentFilterToSearchOptions(entry), "OR");
357
- }
358
- return acc;
359
- }, { q: "", filter: "" });
360
- // merge with searchOptions using AND
361
- searchOptions = utils_1.mergeSearchOptions(searchOptions, subFilterOptions, "AND");
362
- }
363
- // term is always last, and pre-pended on searchOptions.q
364
- if (filter.term) {
365
- searchOptions.q = `${filter.term} ${searchOptions.q}`.trim();
366
- }
367
- return searchOptions;
368
- }
369
- exports.serializeContentFilterForPortal = serializeContentFilterForPortal;
370
- /**
371
- * @private
372
- * Convert a ContentFilter to a SearchOptions
373
- *
374
- * @param filter
375
- * @returns
376
- */
377
- function convertContentFilterToSearchOptions(filter) {
378
- // TODO: Remove with _searchContent
379
- __1.Logger.warn(`DEPRECATION: convertContentFilterToSearchOptions will be removed. Work with IFilterGroups<"item"> and hubSearch() instead`);
380
- let result = {
381
- q: "",
382
- filter: "",
383
- };
384
- const dateProps = ["created", "modified"];
385
- const specialProps = ["filterType", "subFilters", "term", ...dateProps];
386
- Object.entries(filter).forEach(([key, value]) => {
387
- // MatchOptions may go into either q or filter
388
- if (!specialProps.includes(key)) {
389
- result = utils_1.mergeSearchOptions(result, utils_1.serializeMatchOptions(key, value), "AND");
390
- }
391
- // Dates only go into q
392
- if (dateProps.includes(key)) {
393
- result = utils_1.mergeSearchOptions(result, utils_1.serializeDateRange(key, value), "AND");
394
- }
395
- });
396
- return result;
397
- }
398
- exports.convertContentFilterToSearchOptions = convertContentFilterToSearchOptions;
399
- //# sourceMappingURL=content-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"content-utils.js","sourceRoot":"","sources":["../../../src/search/content-utils.ts"],"names":[],"mappings":";;;AAMA,0BAAyC;AAUz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AE,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;AAlCD,kFAkCC"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEmptyFilterGroup = exports.isEmptyFilter = void 0;
4
- /**
5
- * Determine if a Filter is "empty"
6
- * @param filter
7
- * @returns
8
- */
9
- function isEmptyFilter(filter) {
10
- // if it has one property, filterType, it's empty
11
- return (Object.keys(filter).length === 1 && filter.hasOwnProperty("filterType"));
12
- }
13
- exports.isEmptyFilter = isEmptyFilter;
14
- /**
15
- * Determine if a filterGroup is "empty"
16
- * @param filterGroup
17
- * @returns
18
- */
19
- function isEmptyFilterGroup(filterGroup) {
20
- // if filters array is empty
21
- if (filterGroup.filters.length === 0) {
22
- return true;
23
- }
24
- else {
25
- // if all filters are empty
26
- const result = filterGroup.filters.reduce((acc, entry) => {
27
- if (acc) {
28
- acc = isEmptyFilter(entry);
29
- }
30
- return acc;
31
- }, true);
32
- return result;
33
- }
34
- }
35
- exports.isEmptyFilterGroup = isEmptyFilterGroup;
36
- //# sourceMappingURL=filter-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filter-utils.js","sourceRoot":"","sources":["../../../src/search/filter-utils.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,SAAgB,aAAa,CAAC,MAA0B;IACtD,iDAAiD;IACjD,OAAO,CACL,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,CACxE,CAAC;AACJ,CAAC;AALD,sCAKC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAChC,WAAqC;IAErC,4BAA4B;IAC5B,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACpC,OAAO,IAAI,CAAC;KACb;SAAM;QACL,2BAA2B;QAC3B,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACvD,IAAI,GAAG,EAAE;gBACP,GAAG,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;aAC5B;YACD,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,IAAI,CAAC,CAAC;QACT,OAAO,MAAM,CAAC;KACf;AACH,CAAC;AAhBD,gDAgBC"}
@@ -1,148 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serializeGroupFilterForPortal = exports.expandGroupFilter = exports.mergeGroupFilters = void 0;
4
- const _1 = require(".");
5
- const __1 = require("..");
6
- // TODO: Remove with _searchContent
7
- /**
8
- *
9
- * Merge `Filter<"group">` objects
10
- *
11
- * Useful in components which may get partial filters from a variety of
12
- * sub-components, which are then combined into a single filter prior
13
- * to executing the search.
14
- * @param filters
15
- * @returns
16
- */
17
- function mergeGroupFilters(filters) {
18
- // TODO: Remove with _searchContent
19
- __1.Logger.warn(`DEPRECATION: mergeGroupFilters will be removed. Work with IFilterGroups<"group"> and hubSearch() instead`);
20
- // expand all the filters so all prop types are consistent
21
- const expanded = filters.map(expandGroupFilter);
22
- // now we can merge based on fields
23
- const dateFields = ["created", "modified"];
24
- const specialFields = ["filterType", "term", ...dateFields];
25
- // acc is initialized as Filter<group> but also needs it
26
- // in the function signature... for reasons?!
27
- const result = expanded.reduce((acc, entry) => {
28
- // process fields
29
- Object.entries(entry).forEach(([key, value]) => {
30
- // Note: getProp/setProp are used to get around
31
- // typescript issues with string indexing
32
- if (acc.hasOwnProperty(key)) {
33
- const existingValue = __1.getProp(acc, key);
34
- // if the key is not to a special field
35
- if (!specialFields.includes(key)) {
36
- // treat as an IMatchOptions
37
- __1.setProp(key, _1.mergeMatchOptions(existingValue, value), acc);
38
- }
39
- else if (dateFields.includes(key)) {
40
- // treat as IDateRange
41
- __1.setProp(key, _1.mergeDateRange(existingValue, value), acc);
42
- }
43
- else if (key === "term") {
44
- // append terms
45
- acc[key] = `${acc[key]} ${value}`;
46
- }
47
- }
48
- else {
49
- // Acc does not have an entry for this yet
50
- // so just clone it
51
- __1.setProp(key, __1.cloneObject(value), acc);
52
- }
53
- });
54
- return acc;
55
- }, {
56
- filterType: "group",
57
- });
58
- return result;
59
- }
60
- exports.mergeGroupFilters = mergeGroupFilters;
61
- /**
62
- * Prior to serialization into the query syntax for the backing APIs, we first expand [Filters](../Filter)
63
- *
64
- * Filter's can express their intent in a very terse form, but to ensure consistent structures
65
- * we expand them into their more verbose form.
66
- *
67
- * i.e. `title: "Water"` expands into `title: { any: ["Water"]}`
68
- *
69
- * - Fields defined as `string | string[] | MatchOptions` will be converted to a `MatchOptions`
70
- * - RelativeDate fields are converted to DateRange<number>
71
- *
72
- * @param filter
73
- * @returns
74
- */
75
- function expandGroupFilter(filter) {
76
- // TODO: Remove with _searchContent
77
- __1.Logger.warn(`DEPRECATION: expandGroupFilters will be removed. Work with IFilterGroups<"group"> and hubSearch() instead`);
78
- const result = {};
79
- const dateProps = ["created", "modified"];
80
- // Some properties should not get converted to MatchOptions
81
- const specialProps = ["term", "searchUserAccess", ...dateProps];
82
- // Do the conversion
83
- Object.entries(filter).forEach(([key, value]) => {
84
- // handle Matchish fields
85
- if (!specialProps.includes(key)) {
86
- // setProp side-steps typescript complaining
87
- __1.setProp(key, _1.valueToMatchOptions(value), result);
88
- }
89
- // Handle date fields
90
- if (dateProps.includes(key)) {
91
- const dateFieldValue = __1.cloneObject(__1.getProp(filter, key));
92
- if (__1.getProp(filter, `${key}.type`) === "relative-date") {
93
- __1.setProp(key, _1.relativeDateToDateRange(dateFieldValue), result);
94
- }
95
- else {
96
- __1.setProp(key, dateFieldValue, result);
97
- }
98
- }
99
- });
100
- // searchUserAccess is boolean, so we check if the prop exists
101
- // vs checking if the value is truthy
102
- if (filter.hasOwnProperty("searchUserAccess")) {
103
- result.searchUserAccess = filter.searchUserAccess;
104
- }
105
- if (filter.term) {
106
- result.term = filter.term;
107
- }
108
- return result;
109
- }
110
- exports.expandGroupFilter = expandGroupFilter;
111
- /**
112
- * @private
113
- * Serialize an `IGroupFilterDefinition` into an `ISearchOptions` for use
114
- * with `searchGroups`
115
- * @param filter
116
- * @returns
117
- */
118
- function serializeGroupFilterForPortal(filter) {
119
- // TODO: Remove with _searchContent
120
- __1.Logger.warn(`DEPRECATION: serializeGroupFilterForPortal will be removed. Work with IFilterGroups<"group"> and hubSearch() instead`);
121
- let result = {
122
- q: "",
123
- filter: "",
124
- };
125
- const dateProps = ["created", "modified"];
126
- const specialProps = ["term", "searchUserAccess", "filterType", ...dateProps];
127
- Object.entries(filter).forEach(([key, value]) => {
128
- // MatchOptions fields
129
- if (!specialProps.includes(key)) {
130
- result = _1.mergeSearchOptions(result, _1.serializeMatchOptions(key, value), "AND");
131
- }
132
- // Dates only go into q
133
- if (dateProps.includes(key)) {
134
- result = _1.mergeSearchOptions(result, _1.serializeDateRange(key, value), "AND");
135
- }
136
- });
137
- // searchUserAccess is also a top-level property
138
- if (filter.hasOwnProperty("searchUserAccess")) {
139
- result.searchUserAccess = filter.searchUserAccess;
140
- }
141
- // add the term
142
- if (filter.term) {
143
- result.q = `${filter.term} ${result.q}`.trim();
144
- }
145
- return result;
146
- }
147
- exports.serializeGroupFilterForPortal = serializeGroupFilterForPortal;
148
- //# sourceMappingURL=group-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"group-utils.js","sourceRoot":"","sources":["../../../src/search/group-utils.ts"],"names":[],"mappings":";;;AACA,wBAUW;AACX,0BAA2D;AAE3D,mCAAmC;AAEnC;;;;;;;;;GASG;AACH,SAAgB,iBAAiB,CAC/B,OAA+B;IAE/B,mCAAmC;IACnC,UAAM,CAAC,IAAI,CACT,0GAA0G,CAC3G,CAAC;IACF,0DAA0D;IAC1D,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAChD,mCAAmC;IACnC,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC3C,MAAM,aAAa,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC;IAE5D,wDAAwD;IACxD,6CAA6C;IAC7C,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAC5B,CAAC,GAAoB,EAAE,KAAK,EAAE,EAAE;QAC9B,iBAAiB;QACjB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC7C,+CAA+C;YAC/C,yCAAyC;YAEzC,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBAC3B,MAAM,aAAa,GAAG,WAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;gBACxC,uCAAuC;gBACvC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBAChC,4BAA4B;oBAC5B,WAAO,CAAC,GAAG,EAAE,oBAAiB,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;iBAC5D;qBAAM,IAAI,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C,EAAE;YAC/B,MAAM,GAAG,qBAAkB,CACzB,MAAM,EACN,wBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,EACjC,KAAK,CACN,CAAC;SACH;QACD,uBAAuB;QACvB,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC3B,MAAM,GAAG,qBAAkB,CACzB,MAAM,EACN,qBAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,EAC9B,KAAK,CACN,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,gDAAgD;IAChD,IAAI,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE;QAC7C,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;KACnD;IACD,eAAe;IACf,IAAI,MAAM,CAAC,IAAI,EAAE;QACf,MAAM,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;KAChD;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAzCD,sEAyCC"}
@@ -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=IHubApiSearchRequest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IHubApiSearchRequest.js","sourceRoot":"","sources":["../../../../src/search/types/IHubApiSearchRequest.ts"],"names":[],"mappings":""}