@zengenti/contensis-react-base 3.0.0-beta.52 → 3.0.0-beta.55
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.
- package/cjs/forms.js +4114 -195
- package/cjs/forms.js.map +1 -1
- package/cjs/search.js +264 -131
- package/cjs/search.js.map +1 -1
- package/esm/forms.js +4114 -198
- package/esm/forms.js.map +1 -1
- package/esm/search.js +264 -132
- package/esm/search.js.map +1 -1
- package/models/forms/index.d.ts +2 -0
- package/models/search/hooks/useFacets.hook.d.ts +3 -0
- package/models/search/index.d.ts +1 -0
- package/models/search/models/SearchProps.d.ts +23 -5
- package/models/search/redux/selectors.d.ts +7 -5
- package/package-lock.json +114 -143
- package/package.json +1 -1
package/esm/search.js
CHANGED
|
@@ -219,22 +219,23 @@ const getImmutableOrJS = (state, stateKey, fallbackValue, returnType = globalThi
|
|
|
219
219
|
};
|
|
220
220
|
|
|
221
221
|
const getSearchContext = state => getImmutableOrJS(state, ['search', 'context'], Context$1.facets);
|
|
222
|
-
const getCurrent$
|
|
222
|
+
const getCurrent$2 = (state, context = Context$1.facets) => context === Context$1.facets ? getCurrentFacet(state) : getCurrentListing(state);
|
|
223
223
|
const getCurrentFacet = state => getImmutableOrJS(state, ['search', 'currentFacet']);
|
|
224
224
|
const getCurrentListing = state => getImmutableOrJS(state, ['search', 'currentListing']);
|
|
225
|
-
const getCurrentTab = state => getImmutableOrJS(state, ['search', Context$1.facets, getCurrentFacet(state), 'tabId'], 0);
|
|
225
|
+
const getCurrentTab$1 = state => getImmutableOrJS(state, ['search', Context$1.facets, getCurrentFacet(state), 'tabId'], 0);
|
|
226
226
|
const getFacets = (state, returnType) => getImmutableOrJS(state, ['search', Context$1.facets], {}, returnType);
|
|
227
|
-
const getTabFacets = state => Object.fromEntries(Object.entries(getFacets(state, 'js')).filter(([key]) => getImmutableOrJS(getFacets(state), [key, 'tabId'], 0) === getCurrentTab(state)));
|
|
228
|
-
const getFacetTitles = state => Object.entries(getFacets(state, 'js')).map(([key, facet = {}]) => {
|
|
227
|
+
const getTabFacets$1 = state => Object.fromEntries(Object.entries(getFacets(state, 'js')).filter(([key]) => getImmutableOrJS(getFacets(state), [key, 'tabId'], 0) === getCurrentTab$1(state)));
|
|
228
|
+
const getFacetTitles$1 = state => Object.entries(getFacets(state, 'js')).map(([key, facet = {}]) => {
|
|
229
229
|
var _facet$pagingInfo;
|
|
230
230
|
|
|
231
231
|
return {
|
|
232
|
+
isSelected: getCurrentFacet(state) === key,
|
|
232
233
|
key,
|
|
233
234
|
title: facet.title,
|
|
234
235
|
totalCount: (_facet$pagingInfo = facet.pagingInfo) === null || _facet$pagingInfo === void 0 ? void 0 : _facet$pagingInfo.totalCount
|
|
235
236
|
};
|
|
236
237
|
});
|
|
237
|
-
const getFacet = (state, facetName = '', context = Context$1.facets, returnType) => {
|
|
238
|
+
const getFacet$1 = (state, facetName = '', context = Context$1.facets, returnType) => {
|
|
238
239
|
const currentFacet = facetName || getCurrentFacet(state);
|
|
239
240
|
return getImmutableOrJS(state, ['search', context, currentFacet], {}, returnType);
|
|
240
241
|
};
|
|
@@ -243,9 +244,9 @@ const getListing$1 = (state, listing = '') => {
|
|
|
243
244
|
return getImmutableOrJS(state, ['search', Context$1.listings, currentListing], {});
|
|
244
245
|
};
|
|
245
246
|
const getFilters = (state, facet, context = Context$1.facets, returnType) => {
|
|
246
|
-
return getImmutableOrJS(state, ['search', context, facet || getCurrent$
|
|
247
|
+
return getImmutableOrJS(state, ['search', context, facet || getCurrent$2(state, context), 'filters'], {}, returnType);
|
|
247
248
|
};
|
|
248
|
-
const getRenderableFilters$
|
|
249
|
+
const getRenderableFilters$2 = (state, facet = '', context = Context$1.facets) => Object.fromEntries(Object.entries(getFilters(state, facet, context, 'js')).filter(([, f = {}]) => typeof f.renderable !== 'boolean' ? true : f.renderable));
|
|
249
250
|
const getFiltersToLoad = (state, facet, context = Context$1.facets, returnType) => {
|
|
250
251
|
const filters = getFilters(state, facet, context, returnType);
|
|
251
252
|
const loadedFilters = Object.entries(filters).map(([key, f = {}]) => [key, (f.items || []).filter(i => {
|
|
@@ -267,45 +268,45 @@ const getSelectedFilters = (state, facet = '', context = Context$1.facets, retur
|
|
|
267
268
|
return fromJS(selectedFilters);
|
|
268
269
|
};
|
|
269
270
|
const getResults = (state, current = '', context = Context$1.facets, returnType) => {
|
|
270
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
271
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'results'], [], returnType);
|
|
271
272
|
};
|
|
272
273
|
const getIsInternalPaging = (state, current, context = Context$1.facets) => {
|
|
273
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
274
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'queryParams', 'internalPaging'], false);
|
|
274
275
|
};
|
|
275
276
|
const getIsLoaded = (state, context = Context$1.facets, facet) => {
|
|
276
|
-
return !!getImmutableOrJS(state, ['search', context, facet || getCurrent$
|
|
277
|
+
return !!getImmutableOrJS(state, ['search', context, facet || getCurrent$2(state, context), 'queryDuration'], 0);
|
|
277
278
|
};
|
|
278
|
-
const getIsLoading$
|
|
279
|
-
return getImmutableOrJS(state, ['search', context, facet || getCurrent$
|
|
279
|
+
const getIsLoading$2 = (state, context = Context$1.facets, facet) => {
|
|
280
|
+
return getImmutableOrJS(state, ['search', context, facet || getCurrent$2(state, context), 'entries', 'isLoading']);
|
|
280
281
|
};
|
|
281
282
|
const getIsSsr = state => getImmutableOrJS(state, ['search', 'config', 'ssr'], false);
|
|
282
|
-
const getFeaturedResults$
|
|
283
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
283
|
+
const getFeaturedResults$2 = (state, current = '', context = Context$1.facets, returnType) => {
|
|
284
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'featuredResults'], [], returnType);
|
|
284
285
|
};
|
|
285
286
|
const getPaging = (state, current = '', context = Context$1.facets, returnType) => {
|
|
286
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
287
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'pagingInfo'], {}, returnType);
|
|
287
288
|
};
|
|
288
|
-
const getPageIndex$
|
|
289
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
289
|
+
const getPageIndex$2 = (state, current = '', context = Context$1.facets) => {
|
|
290
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'pagingInfo', 'pageIndex']);
|
|
290
291
|
};
|
|
291
292
|
const getPrevPageIndex = (state, current = '', context = Context$1.facets) => {
|
|
292
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
293
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'pagingInfo', 'prevPageIndex']);
|
|
293
294
|
};
|
|
294
|
-
const getPageIsLoading$
|
|
295
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
295
|
+
const getPageIsLoading$2 = (state, current = '', context = Context$1.facets) => {
|
|
296
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'pagingInfo', 'isLoading']);
|
|
296
297
|
};
|
|
297
298
|
const getPagesLoaded = (state, current = '', context = Context$1.facets) => {
|
|
298
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
299
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'pagingInfo', 'pagesLoaded'], [], 'js');
|
|
299
300
|
};
|
|
300
|
-
const getTotalCount = (state, current = '', context = Context$1.facets) => {
|
|
301
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
301
|
+
const getTotalCount$1 = (state, current = '', context = Context$1.facets) => {
|
|
302
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'pagingInfo', 'totalCount']);
|
|
302
303
|
};
|
|
303
|
-
const getSearchTerm$
|
|
304
|
+
const getSearchTerm$2 = state => getImmutableOrJS(state, ['search', 'term']);
|
|
304
305
|
const getSearchTabs = (state, returnType) => getImmutableOrJS(state, ['search', 'tabs'], [], returnType);
|
|
305
306
|
const getQueryParams = (state, current = '', context = Context$1.facets) => {
|
|
306
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
307
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'queryParams'], {}, 'js');
|
|
307
308
|
};
|
|
308
|
-
const getQueryParameter$
|
|
309
|
+
const getQueryParameter$2 = ({
|
|
309
310
|
state,
|
|
310
311
|
facet,
|
|
311
312
|
context = Context$1.facets
|
|
@@ -313,12 +314,12 @@ const getQueryParameter$1 = ({
|
|
|
313
314
|
return getImmutableOrJS(getQueryParams(state, facet, context), key, ifnull, 'js');
|
|
314
315
|
};
|
|
315
316
|
const getCustomApi = (state, current, context = Context$1.facets, returnType) => {
|
|
316
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
317
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'customApi'], null, returnType);
|
|
317
318
|
};
|
|
318
319
|
const getCustomEnv = (state, current, context = Context$1.facets) => {
|
|
319
|
-
return getImmutableOrJS(state, ['search', context, current || getCurrent$
|
|
320
|
+
return getImmutableOrJS(state, ['search', context, current || getCurrent$2(state, context), 'env']);
|
|
320
321
|
};
|
|
321
|
-
const getTabsAndFacets = (state, returnType) => {
|
|
322
|
+
const getTabsAndFacets$1 = (state, returnType) => {
|
|
322
323
|
const tabs = getSearchTabs(state, 'js');
|
|
323
324
|
const facets = getFacets(state, 'js');
|
|
324
325
|
const tabsAndFacets = (tabs || []).map((tab = {}) => {
|
|
@@ -338,12 +339,12 @@ const getTabsAndFacets = (state, returnType) => {
|
|
|
338
339
|
const fromJS = makeFromJS(returnType);
|
|
339
340
|
return fromJS(tabsAndFacets);
|
|
340
341
|
};
|
|
341
|
-
const getSearchTotalCount = state => {
|
|
342
|
-
const tabsAndFacets = getTabsAndFacets(state, 'js');
|
|
342
|
+
const getSearchTotalCount$1 = state => {
|
|
343
|
+
const tabsAndFacets = getTabsAndFacets$1(state, 'js');
|
|
343
344
|
const wholeSearchTotal = tabsAndFacets.map((t = {}) => t.totalCount).reduce((a, b) => a + b, 0);
|
|
344
345
|
return wholeSearchTotal;
|
|
345
346
|
};
|
|
346
|
-
const getFacetsTotalCount = state => {
|
|
347
|
+
const getFacetsTotalCount$1 = state => {
|
|
347
348
|
const facets = getFacets(state);
|
|
348
349
|
const wholeSearchTotal = Object.entries(facets).map(([, t = {}]) => {
|
|
349
350
|
var _t$pagingInfo;
|
|
@@ -355,67 +356,67 @@ const getFacetsTotalCount = state => {
|
|
|
355
356
|
|
|
356
357
|
const selectFacets = {
|
|
357
358
|
getCurrent: getCurrentFacet,
|
|
358
|
-
getCurrentTab,
|
|
359
|
+
getCurrentTab: getCurrentTab$1,
|
|
359
360
|
getCustomApi,
|
|
360
361
|
getCustomEnv,
|
|
361
|
-
getFacet,
|
|
362
|
-
getFacetTitles,
|
|
362
|
+
getFacet: getFacet$1,
|
|
363
|
+
getFacetTitles: getFacetTitles$1,
|
|
363
364
|
getFacets,
|
|
364
|
-
getFacetsTotalCount,
|
|
365
|
-
getFeaturedResults: getFeaturedResults$
|
|
365
|
+
getFacetsTotalCount: getFacetsTotalCount$1,
|
|
366
|
+
getFeaturedResults: getFeaturedResults$2,
|
|
366
367
|
getFilters,
|
|
367
368
|
getFiltersToLoad,
|
|
368
369
|
getIsLoaded,
|
|
369
|
-
getIsLoading: getIsLoading$
|
|
370
|
-
getPageIndex: getPageIndex$
|
|
371
|
-
getPageIsLoading: getPageIsLoading$
|
|
370
|
+
getIsLoading: getIsLoading$2,
|
|
371
|
+
getPageIndex: getPageIndex$2,
|
|
372
|
+
getPageIsLoading: getPageIsLoading$2,
|
|
372
373
|
getPagesLoaded,
|
|
373
374
|
getPaging,
|
|
374
375
|
getQueryParams: (state, facet) => getQueryParams(state, facet, Context$1.facets),
|
|
375
376
|
getQueryParameter: ({
|
|
376
377
|
state,
|
|
377
378
|
facet
|
|
378
|
-
}, key, ifnull) => getQueryParameter$
|
|
379
|
+
}, key, ifnull) => getQueryParameter$2({
|
|
379
380
|
state,
|
|
380
381
|
facet,
|
|
381
382
|
context: Context$1.facets
|
|
382
383
|
}, key, ifnull),
|
|
383
|
-
getRenderableFilters: getRenderableFilters$
|
|
384
|
+
getRenderableFilters: getRenderableFilters$2,
|
|
384
385
|
getResults,
|
|
385
|
-
getTabFacets,
|
|
386
|
-
getTabsAndFacets,
|
|
387
|
-
getTotalCount,
|
|
386
|
+
getTabFacets: getTabFacets$1,
|
|
387
|
+
getTabsAndFacets: getTabsAndFacets$1,
|
|
388
|
+
getTotalCount: getTotalCount$1,
|
|
388
389
|
getSearchTabs,
|
|
389
|
-
getSearchTerm: getSearchTerm$
|
|
390
|
-
getSearchTotalCount,
|
|
390
|
+
getSearchTerm: getSearchTerm$2,
|
|
391
|
+
getSearchTotalCount: getSearchTotalCount$1,
|
|
391
392
|
getSelectedFilters
|
|
392
393
|
}; // An exported copy of the relevant selectors pre-scoped to a listing context
|
|
393
394
|
|
|
394
395
|
const selectListing = {
|
|
395
396
|
getCurrent: getCurrentListing,
|
|
396
|
-
getFeaturedResults: (state, listing = '') => getFeaturedResults$
|
|
397
|
+
getFeaturedResults: (state, listing = '') => getFeaturedResults$2(state, listing, Context$1.listings, 'js'),
|
|
397
398
|
getFilters: (state, listing = '') => getFilters(state, listing, Context$1.listings, 'js'),
|
|
398
399
|
getFiltersToLoad: (state, listing = '') => getFiltersToLoad(state, listing, Context$1.listings),
|
|
399
400
|
getListing: getListing$1,
|
|
400
401
|
getIsLoaded: state => getIsLoaded(state, Context$1.listings),
|
|
401
|
-
getIsLoading: state => getIsLoading$
|
|
402
|
-
getPageIndex: (state, listing = '') => getPageIndex$
|
|
402
|
+
getIsLoading: state => getIsLoading$2(state, Context$1.listings),
|
|
403
|
+
getPageIndex: (state, listing = '') => getPageIndex$2(state, listing, Context$1.listings),
|
|
403
404
|
getPaging: (state, listing = '') => getPaging(state, listing, Context$1.listings, 'js'),
|
|
404
|
-
getPageIsLoading: (state, listing = '') => getPageIsLoading$
|
|
405
|
+
getPageIsLoading: (state, listing = '') => getPageIsLoading$2(state, listing, Context$1.listings),
|
|
405
406
|
getPagesLoaded: (state, listing = '') => getPagesLoaded(state, listing, Context$1.listings),
|
|
406
407
|
getQueryParams: (state, listing = '') => getQueryParams(state, listing, Context$1.listings),
|
|
407
408
|
getQueryParameter: ({
|
|
408
409
|
state,
|
|
409
410
|
facet
|
|
410
|
-
}, key, ifnull) => getQueryParameter$
|
|
411
|
+
}, key, ifnull) => getQueryParameter$2({
|
|
411
412
|
state,
|
|
412
413
|
facet,
|
|
413
414
|
context: Context$1.listings
|
|
414
415
|
}, key, ifnull),
|
|
415
|
-
getRenderableFilters: (state, listing = '') => getRenderableFilters$
|
|
416
|
+
getRenderableFilters: (state, listing = '') => getRenderableFilters$2(state, listing, Context$1.listings),
|
|
416
417
|
getResults: (state, listing = '') => getResults(state, listing, Context$1.listings, 'js'),
|
|
417
|
-
getSearchTerm: getSearchTerm$
|
|
418
|
-
getTotalCount: (state, listing = '') => getTotalCount(state, listing, Context$1.listings),
|
|
418
|
+
getSearchTerm: getSearchTerm$2,
|
|
419
|
+
getTotalCount: (state, listing = '') => getTotalCount$1(state, listing, Context$1.listings),
|
|
419
420
|
getSelectedFilters: (state, listing = '') => getSelectedFilters(state, listing, Context$1.listings, 'js')
|
|
420
421
|
};
|
|
421
422
|
const selectCurrentPath = state => getImmutableOrJS(state, ['routing', 'currentPath']);
|
|
@@ -425,40 +426,40 @@ const selectVersionStatus = state => getImmutableOrJS(state, ['version', 'conten
|
|
|
425
426
|
var selectors = /*#__PURE__*/Object.freeze({
|
|
426
427
|
__proto__: null,
|
|
427
428
|
getSearchContext: getSearchContext,
|
|
428
|
-
getCurrent: getCurrent$
|
|
429
|
+
getCurrent: getCurrent$2,
|
|
429
430
|
getCurrentFacet: getCurrentFacet,
|
|
430
431
|
getCurrentListing: getCurrentListing,
|
|
431
|
-
getCurrentTab: getCurrentTab,
|
|
432
|
+
getCurrentTab: getCurrentTab$1,
|
|
432
433
|
getFacets: getFacets,
|
|
433
|
-
getTabFacets: getTabFacets,
|
|
434
|
-
getFacetTitles: getFacetTitles,
|
|
435
|
-
getFacet: getFacet,
|
|
434
|
+
getTabFacets: getTabFacets$1,
|
|
435
|
+
getFacetTitles: getFacetTitles$1,
|
|
436
|
+
getFacet: getFacet$1,
|
|
436
437
|
getListing: getListing$1,
|
|
437
438
|
getFilters: getFilters,
|
|
438
|
-
getRenderableFilters: getRenderableFilters$
|
|
439
|
+
getRenderableFilters: getRenderableFilters$2,
|
|
439
440
|
getFiltersToLoad: getFiltersToLoad,
|
|
440
441
|
getSelectedFilters: getSelectedFilters,
|
|
441
442
|
getResults: getResults,
|
|
442
443
|
getIsInternalPaging: getIsInternalPaging,
|
|
443
444
|
getIsLoaded: getIsLoaded,
|
|
444
|
-
getIsLoading: getIsLoading$
|
|
445
|
+
getIsLoading: getIsLoading$2,
|
|
445
446
|
getIsSsr: getIsSsr,
|
|
446
|
-
getFeaturedResults: getFeaturedResults$
|
|
447
|
+
getFeaturedResults: getFeaturedResults$2,
|
|
447
448
|
getPaging: getPaging,
|
|
448
|
-
getPageIndex: getPageIndex$
|
|
449
|
+
getPageIndex: getPageIndex$2,
|
|
449
450
|
getPrevPageIndex: getPrevPageIndex,
|
|
450
|
-
getPageIsLoading: getPageIsLoading$
|
|
451
|
+
getPageIsLoading: getPageIsLoading$2,
|
|
451
452
|
getPagesLoaded: getPagesLoaded,
|
|
452
|
-
getTotalCount: getTotalCount,
|
|
453
|
-
getSearchTerm: getSearchTerm$
|
|
453
|
+
getTotalCount: getTotalCount$1,
|
|
454
|
+
getSearchTerm: getSearchTerm$2,
|
|
454
455
|
getSearchTabs: getSearchTabs,
|
|
455
456
|
getQueryParams: getQueryParams,
|
|
456
|
-
getQueryParameter: getQueryParameter$
|
|
457
|
+
getQueryParameter: getQueryParameter$2,
|
|
457
458
|
getCustomApi: getCustomApi,
|
|
458
459
|
getCustomEnv: getCustomEnv,
|
|
459
|
-
getTabsAndFacets: getTabsAndFacets,
|
|
460
|
-
getSearchTotalCount: getSearchTotalCount,
|
|
461
|
-
getFacetsTotalCount: getFacetsTotalCount,
|
|
460
|
+
getTabsAndFacets: getTabsAndFacets$1,
|
|
461
|
+
getSearchTotalCount: getSearchTotalCount$1,
|
|
462
|
+
getFacetsTotalCount: getFacetsTotalCount$1,
|
|
462
463
|
selectFacets: selectFacets,
|
|
463
464
|
selectListing: selectListing,
|
|
464
465
|
selectCurrentPath: selectCurrentPath,
|
|
@@ -478,27 +479,27 @@ const withSearch = mappers => SearchComponent => {
|
|
|
478
479
|
const mapStateToProps = state => {
|
|
479
480
|
return {
|
|
480
481
|
currentFacet: getCurrentFacet(state),
|
|
481
|
-
currentPageIndex: getPageIndex$
|
|
482
|
-
currentTabIndex: getCurrentTab(state),
|
|
483
|
-
facet: getFacet(state),
|
|
484
|
-
facets: getTabFacets(state),
|
|
485
|
-
facetsTotalCount: getFacetsTotalCount(state),
|
|
486
|
-
facetTitles: getFacetTitles(state),
|
|
487
|
-
featuredResults: getFeaturedResults$
|
|
488
|
-
filters: getRenderableFilters$
|
|
489
|
-
isLoading: getIsLoading$
|
|
482
|
+
currentPageIndex: getPageIndex$2(state),
|
|
483
|
+
currentTabIndex: getCurrentTab$1(state),
|
|
484
|
+
facet: getFacet$1(state),
|
|
485
|
+
facets: getTabFacets$1(state),
|
|
486
|
+
facetsTotalCount: getFacetsTotalCount$1(state),
|
|
487
|
+
facetTitles: getFacetTitles$1(state),
|
|
488
|
+
featuredResults: getFeaturedResults$2(state),
|
|
489
|
+
filters: getRenderableFilters$2(state),
|
|
490
|
+
isLoading: getIsLoading$2(state),
|
|
490
491
|
paging: getPaging(state),
|
|
491
|
-
pageIsLoading: getPageIsLoading$
|
|
492
|
+
pageIsLoading: getPageIsLoading$2(state),
|
|
492
493
|
results: getResults(state),
|
|
493
494
|
resultsInfo: (mappers === null || mappers === void 0 ? void 0 : mappers.resultsInfo) && mappers.resultsInfo(state),
|
|
494
|
-
searchTerm: getSearchTerm$
|
|
495
|
-
searchTotalCount: getSearchTotalCount(state),
|
|
495
|
+
searchTerm: getSearchTerm$2(state),
|
|
496
|
+
searchTotalCount: getSearchTotalCount$1(state),
|
|
496
497
|
selectedFilters: getSelectedFilters(state),
|
|
497
|
-
sortOrder: getQueryParameter$
|
|
498
|
+
sortOrder: getQueryParameter$2({
|
|
498
499
|
state
|
|
499
500
|
}, 'dynamicOrderBy', []),
|
|
500
|
-
tabsAndFacets: getTabsAndFacets(state),
|
|
501
|
-
totalCount: getTotalCount(state)
|
|
501
|
+
tabsAndFacets: getTabsAndFacets$1(state),
|
|
502
|
+
totalCount: getTotalCount$1(state)
|
|
502
503
|
};
|
|
503
504
|
};
|
|
504
505
|
|
|
@@ -962,12 +963,15 @@ const equalToOrIn = (field, value, operator = 'equalTo') => {
|
|
|
962
963
|
|
|
963
964
|
if (Array.isArray(value)) {
|
|
964
965
|
if (operator === 'equalTo' || operator === 'in') return [Op.in(field, ...value)];
|
|
965
|
-
|
|
966
|
+
const expressions = value.map(innerValue => {
|
|
967
|
+
var _between, _distanceWithin;
|
|
968
|
+
|
|
966
969
|
switch (operator) {
|
|
967
970
|
case 'between':
|
|
971
|
+
return (_between = between(field, innerValue)) === null || _between === void 0 ? void 0 : _between[0];
|
|
972
|
+
|
|
968
973
|
case 'distanceWithin':
|
|
969
|
-
|
|
970
|
-
return Op.equalTo(field, innerValue);
|
|
974
|
+
return (_distanceWithin = distanceWithin(field, innerValue)) === null || _distanceWithin === void 0 ? void 0 : _distanceWithin[0];
|
|
971
975
|
|
|
972
976
|
case 'exists':
|
|
973
977
|
return Op.exists(field, innerValue);
|
|
@@ -979,18 +983,20 @@ const equalToOrIn = (field, value, operator = 'equalTo') => {
|
|
|
979
983
|
default:
|
|
980
984
|
return Op[operator](field, innerValue);
|
|
981
985
|
}
|
|
982
|
-
})
|
|
986
|
+
});
|
|
987
|
+
return (expressions === null || expressions === void 0 ? void 0 : expressions.length) > 1 ? [Op.or(...expressions)] : expressions || [];
|
|
983
988
|
}
|
|
984
989
|
|
|
985
990
|
switch (operator) {
|
|
986
991
|
case 'between':
|
|
992
|
+
return between(field, value);
|
|
993
|
+
|
|
987
994
|
case 'distanceWithin':
|
|
988
|
-
|
|
989
|
-
return [Op.equalTo(field, value)];
|
|
995
|
+
return distanceWithin(field, value);
|
|
990
996
|
|
|
991
997
|
case 'freeText':
|
|
992
998
|
// TODO: Potentially needs further implementation of new options
|
|
993
|
-
return [Op
|
|
999
|
+
return [Op.freeText(field, value, false, undefined)];
|
|
994
1000
|
|
|
995
1001
|
default:
|
|
996
1002
|
return [Op[operator](field, value)];
|
|
@@ -1016,6 +1022,26 @@ const between = (field, value) => {
|
|
|
1016
1022
|
const op = handle(value);
|
|
1017
1023
|
return op ? [op] : [];
|
|
1018
1024
|
};
|
|
1025
|
+
|
|
1026
|
+
const distanceWithin = (field, value) => {
|
|
1027
|
+
const handle = distanceValue => {
|
|
1028
|
+
const valArr = distanceValue.split(' ');
|
|
1029
|
+
|
|
1030
|
+
if (valArr.length > 1) {
|
|
1031
|
+
const [lat, lon] = valArr;
|
|
1032
|
+
return Op.distanceWithin(field, Number(lat), Number(lon), (valArr === null || valArr === void 0 ? void 0 : valArr[2]) || '10mi');
|
|
1033
|
+
} else {
|
|
1034
|
+
// eslint-disable-next-line no-console
|
|
1035
|
+
console.log(`[search] You have supplied only one value to a "distanceWithin" operator which must be made up of "lat,lon,distance". Your supplied value "${valArr.length && valArr[0]}" has been discarded.`);
|
|
1036
|
+
return false;
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
if (value.length === 0) return [];
|
|
1041
|
+
if (Array.isArray(value)) return [Op.or(...value.map(handle).filter(bc => bc !== false))];
|
|
1042
|
+
const op = handle(value);
|
|
1043
|
+
return op ? [op] : [];
|
|
1044
|
+
};
|
|
1019
1045
|
/**
|
|
1020
1046
|
* Accept HTTP style objects and map them to
|
|
1021
1047
|
* their equivalent JS client "Op" expressions
|
|
@@ -1056,9 +1082,7 @@ const customWhereExpressions = where => {
|
|
|
1056
1082
|
const innerField = value.field; // Map the expression when we've looped and scoped to
|
|
1057
1083
|
// the second property inside the clause
|
|
1058
1084
|
|
|
1059
|
-
if (notIdx === 1)
|
|
1060
|
-
expression = innerOperator === 'between' ? Op.not(Op[innerOperator](innerField, innerValue[0], innerValue[1])) : Op.not(Op[innerOperator](innerField, innerValue));
|
|
1061
|
-
}
|
|
1085
|
+
if (notIdx === 1) expression = Op.not(makeJsExpression(innerOperator, innerField, innerValue));
|
|
1062
1086
|
});
|
|
1063
1087
|
}
|
|
1064
1088
|
} // Map the expression when we've looped and scoped to
|
|
@@ -1067,17 +1091,17 @@ const customWhereExpressions = where => {
|
|
|
1067
1091
|
|
|
1068
1092
|
operator = Object.keys(clause).find(clauseKey => !['field', 'weight'].includes(clauseKey));
|
|
1069
1093
|
|
|
1070
|
-
if (idx === 1
|
|
1071
|
-
|
|
1072
|
-
// operator !== 'between' &&
|
|
1073
|
-
operator !== 'distanceWithin') {
|
|
1074
|
-
expression = operator === 'freeText' || operator === 'contains' ? Op[operator](field, value) : operator === 'in' ? Op[operator](field, ...value) : operator === 'exists' ? Op[operator](field, value) : operator === 'between' ? Op[operator](field, value[0], value[1]) : Op[operator](field, value);
|
|
1094
|
+
if (idx === 1) {
|
|
1095
|
+
expression = makeJsExpression(operator, field, value);
|
|
1075
1096
|
if (typeof weight === 'number') expression = expression.weight(weight);
|
|
1076
1097
|
}
|
|
1077
1098
|
});
|
|
1078
1099
|
return expression;
|
|
1079
1100
|
});
|
|
1080
1101
|
};
|
|
1102
|
+
|
|
1103
|
+
const makeJsExpression = (operator, field, value) => operator === 'freeText' || operator === 'contains' ? Op[operator](field, value) : operator === 'in' ? Op[operator](field, ...value) : operator === 'exists' ? Op[operator](field, value) : operator === 'between' ? Op[operator](field, value[0], value[1]) : operator === 'distanceWithin' ? Op[operator](field, value === null || value === void 0 ? void 0 : value.lat, value === null || value === void 0 ? void 0 : value.lon, value === null || value === void 0 ? void 0 : value.distance) : Op[operator](field, value);
|
|
1104
|
+
|
|
1081
1105
|
const termExpressions = (searchTerm, weightedSearchFields) => {
|
|
1082
1106
|
if (searchTerm && weightedSearchFields && weightedSearchFields.length > 0) {
|
|
1083
1107
|
// Extract any phrases in quotes to array
|
|
@@ -1203,7 +1227,7 @@ const searchUriTemplate = {
|
|
|
1203
1227
|
const currentSearch = !term && getImmutableOrJS(state, ['routing', 'location', 'search']);
|
|
1204
1228
|
const currentQs = removeEmptyAttributes(parse(currentSearch));
|
|
1205
1229
|
if (orderBy) currentQs.orderBy = orderBy;
|
|
1206
|
-
const searchTerm = getSearchTerm$
|
|
1230
|
+
const searchTerm = getSearchTerm$2(state); // Merge the stateFilters with any current qs to build the new qs
|
|
1207
1231
|
|
|
1208
1232
|
const mergedSearch = removeEmptyAttributes({ ...merge(currentQs, stateFilters),
|
|
1209
1233
|
term: searchTerm
|
|
@@ -1390,10 +1414,10 @@ const mapFiltersToFilterExpression = (filters, selectedFilters) => {
|
|
|
1390
1414
|
};
|
|
1391
1415
|
|
|
1392
1416
|
const queryParamsTemplate = {
|
|
1393
|
-
assetTypes: root => getQueryParameter$
|
|
1394
|
-
contentTypeIds: root => getQueryParameter$
|
|
1395
|
-
customWhere: root => getQueryParameter$
|
|
1396
|
-
dynamicOrderBy: root => getQueryParameter$
|
|
1417
|
+
assetTypes: root => getQueryParameter$2(root, 'assetTypes', []),
|
|
1418
|
+
contentTypeIds: root => getQueryParameter$2(root, 'contentTypeIds', []),
|
|
1419
|
+
customWhere: root => getQueryParameter$2(root, 'customWhere', []),
|
|
1420
|
+
dynamicOrderBy: root => getQueryParameter$2(root, 'dynamicOrderBy', []),
|
|
1397
1421
|
env: ({
|
|
1398
1422
|
state,
|
|
1399
1423
|
facet,
|
|
@@ -1408,8 +1432,8 @@ const queryParamsTemplate = {
|
|
|
1408
1432
|
if (excludeIds) return Array.isArray(excludeIds) ? excludeIds : excludeIds.split(',').map(id => id.trim());
|
|
1409
1433
|
return null;
|
|
1410
1434
|
},
|
|
1411
|
-
featuredResults: root => getQueryParameter$
|
|
1412
|
-
fields: root => getQueryParameter$
|
|
1435
|
+
featuredResults: root => getQueryParameter$2(root, 'featuredResults', null),
|
|
1436
|
+
fields: root => getQueryParameter$2(root, 'fields', []),
|
|
1413
1437
|
filters: ({
|
|
1414
1438
|
state,
|
|
1415
1439
|
facet,
|
|
@@ -1421,28 +1445,28 @@ const queryParamsTemplate = {
|
|
|
1421
1445
|
const filterParams = mapFiltersToFilterExpression(stateFilters, selectedFilters);
|
|
1422
1446
|
return filterParams;
|
|
1423
1447
|
},
|
|
1424
|
-
includeInSearchFields: root => getQueryParameter$
|
|
1448
|
+
includeInSearchFields: root => getQueryParameter$2(root, 'includeInSearch', []),
|
|
1425
1449
|
internalPageIndex: ({
|
|
1426
1450
|
action,
|
|
1427
1451
|
state
|
|
1428
|
-
}) => getPageIndex$
|
|
1429
|
-
internalPaging: root => getQueryParameter$
|
|
1452
|
+
}) => getPageIndex$2(state, '', action.context),
|
|
1453
|
+
internalPaging: root => getQueryParameter$2(root, 'internalPaging', false),
|
|
1430
1454
|
languages: ({
|
|
1431
1455
|
action
|
|
1432
1456
|
}) => action.defaultLang ? [action.defaultLang] : [],
|
|
1433
|
-
linkDepth: root => getQueryParameter$
|
|
1434
|
-
loadMorePaging: root => getQueryParameter$
|
|
1435
|
-
orderBy: root => getQueryParameter$
|
|
1457
|
+
linkDepth: root => getQueryParameter$2(root, 'linkDepth', 0),
|
|
1458
|
+
loadMorePaging: root => getQueryParameter$2(root, 'loadMorePaging', false),
|
|
1459
|
+
orderBy: root => getQueryParameter$2(root, 'orderBy', []),
|
|
1436
1460
|
pageIndex: root => {
|
|
1437
1461
|
const {
|
|
1438
1462
|
action,
|
|
1439
1463
|
state
|
|
1440
1464
|
} = root;
|
|
1441
|
-
if (getQueryParameter$
|
|
1465
|
+
if (getQueryParameter$2(root, 'internalPaging', false)) return 0;
|
|
1442
1466
|
if (action.type === UPDATE_PAGE_INDEX) return action.params.pageIndex;
|
|
1443
|
-
return !action.preload ? getPageIndex$
|
|
1467
|
+
return !action.preload ? getPageIndex$2(state, action.facet, action.context) : 0;
|
|
1444
1468
|
},
|
|
1445
|
-
pageSize: root => getQueryParameter$
|
|
1469
|
+
pageSize: root => getQueryParameter$2(root, 'pageSize'),
|
|
1446
1470
|
pagesLoaded: ({
|
|
1447
1471
|
state,
|
|
1448
1472
|
facet,
|
|
@@ -1460,9 +1484,9 @@ const queryParamsTemplate = {
|
|
|
1460
1484
|
}) => {
|
|
1461
1485
|
var _getFacet;
|
|
1462
1486
|
|
|
1463
|
-
return ((_getFacet = getFacet(state, facet, context)) === null || _getFacet === void 0 ? void 0 : _getFacet.projectId) || selectCurrentProject(state);
|
|
1487
|
+
return ((_getFacet = getFacet$1(state, facet, context)) === null || _getFacet === void 0 ? void 0 : _getFacet.projectId) || selectCurrentProject(state);
|
|
1464
1488
|
},
|
|
1465
|
-
searchTerm: root => root.context !== Context$1.minilist || getQueryParameter$
|
|
1489
|
+
searchTerm: root => root.context !== Context$1.minilist || getQueryParameter$2(root, 'useSearchTerm', false) ? getSearchTerm$2(root.state) : '',
|
|
1466
1490
|
selectedFilters: ({
|
|
1467
1491
|
state,
|
|
1468
1492
|
facet,
|
|
@@ -1472,11 +1496,11 @@ const queryParamsTemplate = {
|
|
|
1472
1496
|
state
|
|
1473
1497
|
}) => selectVersionStatus(state),
|
|
1474
1498
|
weightedSearchFields: root => {
|
|
1475
|
-
const wsf = getQueryParameter$
|
|
1499
|
+
const wsf = getQueryParameter$2(root, 'weightedSearchFields', []);
|
|
1476
1500
|
const deduped = wsf.filter((v, i, a) => a.findIndex(t => t.fieldId === v.fieldId) === i);
|
|
1477
1501
|
return deduped; // return wsf;
|
|
1478
1502
|
},
|
|
1479
|
-
webpageTemplates: root => getQueryParameter$
|
|
1503
|
+
webpageTemplates: root => getQueryParameter$2(root, 'webpageTemplates', [])
|
|
1480
1504
|
};
|
|
1481
1505
|
|
|
1482
1506
|
const mapStateToQueryParams = sourceJson => mapJson(sourceJson, queryParamsTemplate);
|
|
@@ -1522,8 +1546,8 @@ const runSearch = (action, state, queryParams) => {
|
|
|
1522
1546
|
const facetIsLoaded = defaultLang ? false : getIsLoaded(state, context, facet);
|
|
1523
1547
|
const stateParams = { ...getQueryParams(ogState, facet, context)
|
|
1524
1548
|
};
|
|
1525
|
-
stateParams.pageIndex = getPageIndex$
|
|
1526
|
-
stateParams.searchTerm = getSearchTerm$
|
|
1549
|
+
stateParams.pageIndex = getPageIndex$2(ogState, facet, context);
|
|
1550
|
+
stateParams.searchTerm = getSearchTerm$2(ogState);
|
|
1527
1551
|
|
|
1528
1552
|
if (context === Context$1.facets && ssr || // context === Context.minilist ||
|
|
1529
1553
|
preload || !facetIsLoaded || filterParamsChanged(action) || defaultLang) {
|
|
@@ -1575,8 +1599,8 @@ const debugExecuteSearch = (action, state) => {
|
|
|
1575
1599
|
const [queryParams, runSearch] = generateQueryParams(action, state);
|
|
1576
1600
|
console.log('runSearch', runSearch, 'action', action, 'filterParamsChanged', filterParamsChanged(action, state), 'getIsLoaded(state, context, facet)', getIsLoaded(state, action.context, action.facet));
|
|
1577
1601
|
const stateParams = { ...getQueryParams(action.ogState || state, action.facet, action.context),
|
|
1578
|
-
pageIndex: getPageIndex$
|
|
1579
|
-
searchTerm: getSearchTerm$
|
|
1602
|
+
pageIndex: getPageIndex$2(action.ogState || state, action.facet, action.context),
|
|
1603
|
+
searchTerm: getSearchTerm$2(action.ogState || state)
|
|
1580
1604
|
};
|
|
1581
1605
|
console.log(stateParams, queryParams);
|
|
1582
1606
|
console.log('getSelectedFilters', getSelectedFilters(action.ogState || state, action.facet, action.context, 'js'), 'params', action.params);
|
|
@@ -1672,7 +1696,7 @@ function* doSearch(action) {
|
|
|
1672
1696
|
facet: action.facet || ((_action$params = action.params) === null || _action$params === void 0 ? void 0 : _action$params.facet)
|
|
1673
1697
|
};
|
|
1674
1698
|
|
|
1675
|
-
if (nextAction.facet && (action.config || Object.keys(getFacet(state, nextAction.facet, action.context, 'js')).length > 0)) {
|
|
1699
|
+
if (nextAction.facet && (action.config || Object.keys(getFacet$1(state, nextAction.facet, action.context, 'js')).length > 0)) {
|
|
1676
1700
|
yield put(nextAction); // keep track of this state ref for comparing changes to params later
|
|
1677
1701
|
|
|
1678
1702
|
const ogState = {
|
|
@@ -1700,7 +1724,7 @@ function* loadFilters(action) {
|
|
|
1700
1724
|
context
|
|
1701
1725
|
});
|
|
1702
1726
|
const selectedKeys = yield select(getSelectedFilters, facetKey, context, 'js');
|
|
1703
|
-
const facet = yield select(getFacet, facetKey, context, 'js');
|
|
1727
|
+
const facet = yield select(getFacet$1, facetKey, context, 'js');
|
|
1704
1728
|
const filters = facet.filters || {};
|
|
1705
1729
|
const projectId = facet.projectId;
|
|
1706
1730
|
const filtersToLoadSagas = filters && filtersToLoad.map((filterKey = '') => {
|
|
@@ -1921,7 +1945,7 @@ function* updateCurrentFacet(action) {
|
|
|
1921
1945
|
facet,
|
|
1922
1946
|
mappers
|
|
1923
1947
|
} = action;
|
|
1924
|
-
const pageIndex = yield select(getPageIndex$
|
|
1948
|
+
const pageIndex = yield select(getPageIndex$2, facet);
|
|
1925
1949
|
const uri = yield buildUri({
|
|
1926
1950
|
facet,
|
|
1927
1951
|
pageIndex
|
|
@@ -1996,6 +2020,114 @@ var defaultMappers = {
|
|
|
1996
2020
|
navigate: mapStateToSearchUri
|
|
1997
2021
|
};
|
|
1998
2022
|
|
|
2023
|
+
const {
|
|
2024
|
+
getCurrent: getCurrent$1,
|
|
2025
|
+
getCurrentTab,
|
|
2026
|
+
getFacet,
|
|
2027
|
+
getFacetsTotalCount,
|
|
2028
|
+
getFacetTitles,
|
|
2029
|
+
getFeaturedResults: getFeaturedResults$1,
|
|
2030
|
+
getIsLoading: getIsLoading$1,
|
|
2031
|
+
getPageIndex: getPageIndex$1,
|
|
2032
|
+
getPageIsLoading: getPageIsLoading$1,
|
|
2033
|
+
getQueryParameter: getQueryParameter$1,
|
|
2034
|
+
getRenderableFilters: getRenderableFilters$1,
|
|
2035
|
+
getSearchTerm: getSearchTerm$1,
|
|
2036
|
+
getSearchTotalCount,
|
|
2037
|
+
getTabFacets,
|
|
2038
|
+
getTabsAndFacets,
|
|
2039
|
+
getTotalCount
|
|
2040
|
+
} = selectFacets;
|
|
2041
|
+
|
|
2042
|
+
const makeSelectFacetsProps = () => createSelector(state => state, (_, mappers) => mappers, (state, mappers) => ({
|
|
2043
|
+
currentFacet: getCurrent$1(state),
|
|
2044
|
+
currentPageIndex: getPageIndex$1(state),
|
|
2045
|
+
currentTabIndex: getCurrentTab(state),
|
|
2046
|
+
facet: getFacet(state),
|
|
2047
|
+
facetTitles: getFacetTitles(state),
|
|
2048
|
+
facets: getTabFacets(state),
|
|
2049
|
+
facetsTotalCount: getFacetsTotalCount(state),
|
|
2050
|
+
featured: getFeaturedResults$1(state),
|
|
2051
|
+
filters: getRenderableFilters$1(state),
|
|
2052
|
+
isLoading: getIsLoading$1(state),
|
|
2053
|
+
pageIsLoading: getPageIsLoading$1(state),
|
|
2054
|
+
paging: getPaging(state, '', Context$1.facets, 'js'),
|
|
2055
|
+
results: getResults(state, '', Context$1.facets, 'js'),
|
|
2056
|
+
resultsInfo: mappers && typeof mappers.resultsInfo === 'function' && mappers.resultsInfo(state),
|
|
2057
|
+
searchTerm: getSearchTerm$1(state),
|
|
2058
|
+
searchTotalCount: getSearchTotalCount(state),
|
|
2059
|
+
selectedFilters: getSelectedFilters(state, '', Context$1.facets, 'js'),
|
|
2060
|
+
sortOrder: getQueryParameter$1({
|
|
2061
|
+
state
|
|
2062
|
+
}, 'dynamicOrderBy', []),
|
|
2063
|
+
tabsAndFacets: getTabsAndFacets(state),
|
|
2064
|
+
totalCount: getTotalCount(state)
|
|
2065
|
+
}));
|
|
2066
|
+
|
|
2067
|
+
const useFacets = ({
|
|
2068
|
+
mappers
|
|
2069
|
+
} = {
|
|
2070
|
+
id: ''
|
|
2071
|
+
}) => {
|
|
2072
|
+
const dispatch = useDispatch();
|
|
2073
|
+
const m = mappers || defaultMappers;
|
|
2074
|
+
const selectListingProps = useMemo(makeSelectFacetsProps, [m]);
|
|
2075
|
+
const dispatchProps = {
|
|
2076
|
+
clearFilters: () => dispatch(withMappers(clearFilters$1(), m)),
|
|
2077
|
+
updateCurrentFacet: facet => dispatch(withMappers(updateCurrentFacet$1(facet), m)),
|
|
2078
|
+
updateCurrentTab: id => withMappers(updateCurrentTab$1(id), m),
|
|
2079
|
+
updatePageIndex: pageIndex => dispatch(withMappers(updatePageIndex$1(pageIndex), m)),
|
|
2080
|
+
updateSearchTerm: term => dispatch(withMappers(updateSearchTerm$1(term), m)),
|
|
2081
|
+
updateSelectedFilters: (filter, key, isUnknownItem = false) => dispatch(withMappers(updateSelectedFilters(filter, key, isUnknownItem), m)),
|
|
2082
|
+
updateSortOrder: orderBy => dispatch(withMappers(updateSortOrder$1(orderBy), m))
|
|
2083
|
+
};
|
|
2084
|
+
const {
|
|
2085
|
+
currentFacet,
|
|
2086
|
+
currentPageIndex,
|
|
2087
|
+
currentTabIndex,
|
|
2088
|
+
facet,
|
|
2089
|
+
facets,
|
|
2090
|
+
facetsTotalCount,
|
|
2091
|
+
facetTitles,
|
|
2092
|
+
featured,
|
|
2093
|
+
filters,
|
|
2094
|
+
isLoading,
|
|
2095
|
+
paging,
|
|
2096
|
+
pageIsLoading,
|
|
2097
|
+
results,
|
|
2098
|
+
resultsInfo,
|
|
2099
|
+
searchTerm,
|
|
2100
|
+
searchTotalCount,
|
|
2101
|
+
selectedFilters,
|
|
2102
|
+
sortOrder,
|
|
2103
|
+
tabsAndFacets,
|
|
2104
|
+
totalCount
|
|
2105
|
+
} = useSelector(state => selectListingProps(state, m));
|
|
2106
|
+
return {
|
|
2107
|
+
currentFacet,
|
|
2108
|
+
currentPageIndex,
|
|
2109
|
+
currentTabIndex,
|
|
2110
|
+
facet,
|
|
2111
|
+
facets,
|
|
2112
|
+
facetsTotalCount,
|
|
2113
|
+
facetTitles,
|
|
2114
|
+
featured,
|
|
2115
|
+
filters,
|
|
2116
|
+
isLoading,
|
|
2117
|
+
paging,
|
|
2118
|
+
pageIsLoading,
|
|
2119
|
+
results,
|
|
2120
|
+
resultsInfo,
|
|
2121
|
+
searchTerm,
|
|
2122
|
+
searchTotalCount,
|
|
2123
|
+
selectedFilters,
|
|
2124
|
+
sortOrder,
|
|
2125
|
+
tabsAndFacets,
|
|
2126
|
+
totalCount,
|
|
2127
|
+
...dispatchProps
|
|
2128
|
+
};
|
|
2129
|
+
};
|
|
2130
|
+
|
|
1999
2131
|
const {
|
|
2000
2132
|
getCurrent,
|
|
2001
2133
|
getFeaturedResults,
|
|
@@ -2077,12 +2209,12 @@ const useListing = ({
|
|
|
2077
2209
|
};
|
|
2078
2210
|
|
|
2079
2211
|
const makeSelectMinilistProps = () => createSelector(state => state, (_, id) => id, (state, id) => ({
|
|
2080
|
-
facet: getFacet(state, id, Context$1.minilist, 'js'),
|
|
2212
|
+
facet: getFacet$1(state, id, Context$1.minilist, 'js'),
|
|
2081
2213
|
filters: getFilters(state, id, Context$1.minilist, 'js'),
|
|
2082
|
-
isLoading: getIsLoading$
|
|
2214
|
+
isLoading: getIsLoading$2(state, Context$1.minilist, id),
|
|
2083
2215
|
pagingInfo: getPaging(state, id, Context$1.minilist, 'js'),
|
|
2084
2216
|
results: getResults(state, id, Context$1.minilist, 'js'),
|
|
2085
|
-
searchTerm: getSearchTerm$
|
|
2217
|
+
searchTerm: getSearchTerm$2(state)
|
|
2086
2218
|
}));
|
|
2087
2219
|
|
|
2088
2220
|
const useMinilist = ({
|
|
@@ -2588,5 +2720,5 @@ const Context = {
|
|
|
2588
2720
|
minilist: 'minilist'
|
|
2589
2721
|
};
|
|
2590
2722
|
|
|
2591
|
-
export { Context, actions, doSearch, queries, reducers as reducer, searchSagas as sagas, schema, selectors, setRouteFilters, types, useListing, useMinilist, withListing, withSearch };
|
|
2723
|
+
export { Context, actions, doSearch, queries, reducers as reducer, searchSagas as sagas, schema, selectors, setRouteFilters, types, useFacets, useListing, useMinilist, withListing, withSearch };
|
|
2592
2724
|
//# sourceMappingURL=search.js.map
|