react-instantsearch 7.4.0 → 7.5.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.
- package/dist/cjs/ui/HierarchicalMenu.js +1 -1
- package/dist/cjs/ui/SearchBox.js +1 -0
- package/dist/cjs/widgets/RefinementList.js +6 -2
- package/dist/cjs/widgets/SearchBox.js +4 -2
- package/dist/es/ui/HierarchicalMenu.js +1 -1
- package/dist/es/ui/SearchBox.d.ts +2 -1
- package/dist/es/ui/SearchBox.js +1 -0
- package/dist/es/widgets/RefinementList.js +6 -2
- package/dist/es/widgets/SearchBox.js +4 -2
- package/dist/umd/ReactInstantSearch.js +228 -244
- package/dist/umd/ReactInstantSearch.js.map +1 -1
- package/dist/umd/ReactInstantSearch.min.js +1 -1
- package/dist/umd/ReactInstantSearch.min.js.map +1 -1
- package/package.json +4 -4
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
var React__default = 'default' in React ? React['default'] : React;
|
|
9
9
|
|
|
10
|
-
var version = '7.
|
|
10
|
+
var version = '7.5.0';
|
|
11
11
|
|
|
12
12
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
13
13
|
//
|
|
@@ -3280,7 +3280,6 @@
|
|
|
3280
3280
|
);
|
|
3281
3281
|
}
|
|
3282
3282
|
|
|
3283
|
-
// eslint-disable-next-line valid-jsdoc
|
|
3284
3283
|
/**
|
|
3285
3284
|
* Constructor for SearchResults
|
|
3286
3285
|
* @class
|
|
@@ -3288,6 +3287,7 @@
|
|
|
3288
3287
|
* {@link AlgoliaSearchHelper}.
|
|
3289
3288
|
* @param {SearchParameters} state state that led to the response
|
|
3290
3289
|
* @param {array.<object>} results the results from algolia client
|
|
3290
|
+
* @param {object} options options to control results content
|
|
3291
3291
|
* @example <caption>SearchResults of the first query in
|
|
3292
3292
|
* <a href="http://demos.algolia.com/instant-search-demo">the instant search demo</a></caption>
|
|
3293
3293
|
{
|
|
@@ -3425,8 +3425,14 @@
|
|
|
3425
3425
|
});
|
|
3426
3426
|
|
|
3427
3427
|
// Make every key of the result options reachable from the instance
|
|
3428
|
-
|
|
3429
|
-
|
|
3428
|
+
var opts = merge_1(
|
|
3429
|
+
{
|
|
3430
|
+
persistHierarchicalRootCount: false,
|
|
3431
|
+
},
|
|
3432
|
+
options
|
|
3433
|
+
);
|
|
3434
|
+
Object.keys(opts).forEach(function (key) {
|
|
3435
|
+
self[key] = opts[key];
|
|
3430
3436
|
});
|
|
3431
3437
|
|
|
3432
3438
|
/**
|
|
@@ -3776,9 +3782,13 @@
|
|
|
3776
3782
|
// We want
|
|
3777
3783
|
// | beers (5)
|
|
3778
3784
|
// > IPA (5)
|
|
3785
|
+
// @MAJOR: remove this legacy behaviour in next major version
|
|
3779
3786
|
var defaultData = {};
|
|
3780
3787
|
|
|
3781
|
-
if (
|
|
3788
|
+
if (
|
|
3789
|
+
currentRefinement.length > 0 &&
|
|
3790
|
+
!self.persistHierarchicalRootCount
|
|
3791
|
+
) {
|
|
3782
3792
|
var root = currentRefinement[0].split(separator)[0];
|
|
3783
3793
|
defaultData[root] =
|
|
3784
3794
|
self.hierarchicalFacets[position][attributeIndex].data[root];
|
|
@@ -4327,7 +4337,7 @@
|
|
|
4327
4337
|
|
|
4328
4338
|
var SearchResults_1 = SearchResults;
|
|
4329
4339
|
|
|
4330
|
-
var version$1 = '3.
|
|
4340
|
+
var version$1 = '3.16.1';
|
|
4331
4341
|
|
|
4332
4342
|
var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
|
|
4333
4343
|
|
|
@@ -4441,8 +4451,9 @@
|
|
|
4441
4451
|
* @param {SearchParameters | object} options an object defining the initial
|
|
4442
4452
|
* config of the search. It doesn't have to be a {SearchParameters},
|
|
4443
4453
|
* just an object containing the properties you need from it.
|
|
4454
|
+
* @param {SearchResultsOptions|object} searchResultsOptions an object defining the options to use when creating the search results.
|
|
4444
4455
|
*/
|
|
4445
|
-
function AlgoliaSearchHelper(client, index, options) {
|
|
4456
|
+
function AlgoliaSearchHelper(client, index, options, searchResultsOptions) {
|
|
4446
4457
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4447
4458
|
client.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
4448
4459
|
}
|
|
@@ -4456,6 +4467,7 @@
|
|
|
4456
4467
|
this._lastQueryIdReceived = -1;
|
|
4457
4468
|
this.derivedHelpers = [];
|
|
4458
4469
|
this._currentNbQueries = 0;
|
|
4470
|
+
this._searchResultsOptions = searchResultsOptions;
|
|
4459
4471
|
}
|
|
4460
4472
|
|
|
4461
4473
|
inherits_1(AlgoliaSearchHelper, events);
|
|
@@ -5728,6 +5740,9 @@
|
|
|
5728
5740
|
queryId,
|
|
5729
5741
|
content
|
|
5730
5742
|
) {
|
|
5743
|
+
// eslint-disable-next-line consistent-this
|
|
5744
|
+
var self = this;
|
|
5745
|
+
|
|
5731
5746
|
// @TODO remove the number of outdated queries discarded instead of just one
|
|
5732
5747
|
|
|
5733
5748
|
if (queryId < this._lastQueryIdReceived) {
|
|
@@ -5756,7 +5771,11 @@
|
|
|
5756
5771
|
return;
|
|
5757
5772
|
}
|
|
5758
5773
|
|
|
5759
|
-
helper.lastResults = new SearchResults_1(
|
|
5774
|
+
helper.lastResults = new SearchResults_1(
|
|
5775
|
+
state,
|
|
5776
|
+
specificResults,
|
|
5777
|
+
self._searchResultsOptions
|
|
5778
|
+
);
|
|
5760
5779
|
|
|
5761
5780
|
helper.emit('result', {
|
|
5762
5781
|
results: helper.lastResults,
|
|
@@ -5954,10 +5973,11 @@
|
|
|
5954
5973
|
* @param {AlgoliaSearch} client an AlgoliaSearch client
|
|
5955
5974
|
* @param {string} index the name of the index to query
|
|
5956
5975
|
* @param {SearchParameters|object} opts an object defining the initial config of the search. It doesn't have to be a {SearchParameters}, just an object containing the properties you need from it.
|
|
5976
|
+
* @param {SearchResultsOptions|object} searchResultsOptions an object defining the options to use when creating the search results.
|
|
5957
5977
|
* @return {AlgoliaSearchHelper} The helper instance
|
|
5958
5978
|
*/
|
|
5959
|
-
function algoliasearchHelper(client, index, opts) {
|
|
5960
|
-
return new algoliasearch_helper(client, index, opts);
|
|
5979
|
+
function algoliasearchHelper(client, index, opts, searchResultsOptions) {
|
|
5980
|
+
return new algoliasearch_helper(client, index, opts, searchResultsOptions);
|
|
5961
5981
|
}
|
|
5962
5982
|
|
|
5963
5983
|
/**
|
|
@@ -10266,7 +10286,7 @@
|
|
|
10266
10286
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
10267
10287
|
return arr2;
|
|
10268
10288
|
}
|
|
10269
|
-
var ALGOLIA_INSIGHTS_VERSION = '2.
|
|
10289
|
+
var ALGOLIA_INSIGHTS_VERSION = '2.13.0';
|
|
10270
10290
|
var ALGOLIA_INSIGHTS_SRC = "https://cdn.jsdelivr.net/npm/search-insights@".concat(ALGOLIA_INSIGHTS_VERSION, "/dist/search-insights.min.js");
|
|
10271
10291
|
function createInsightsMiddleware() {
|
|
10272
10292
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -10347,7 +10367,7 @@
|
|
|
10347
10367
|
// set it later on.
|
|
10348
10368
|
//
|
|
10349
10369
|
// Otherwise, the `init` call might override it with anonymous user token.
|
|
10350
|
-
userTokenBeforeInit = userToken;
|
|
10370
|
+
userTokenBeforeInit = normalizeUserToken(userToken);
|
|
10351
10371
|
});
|
|
10352
10372
|
|
|
10353
10373
|
// Only `init` if the `insightsInitParams` option is passed or
|
|
@@ -10403,13 +10423,14 @@
|
|
|
10403
10423
|
}
|
|
10404
10424
|
var setUserTokenToSearch = function setUserTokenToSearch(userToken) {
|
|
10405
10425
|
var immediate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
10406
|
-
|
|
10426
|
+
var normalizedUserToken = normalizeUserToken(userToken);
|
|
10427
|
+
if (!normalizedUserToken) {
|
|
10407
10428
|
return;
|
|
10408
10429
|
}
|
|
10409
10430
|
var existingToken = helper.state.userToken;
|
|
10410
10431
|
function applyToken() {
|
|
10411
10432
|
helper.overrideStateWithoutTriggeringChangeEvent(_objectSpread$e(_objectSpread$e({}, helper.state), {}, {
|
|
10412
|
-
userToken:
|
|
10433
|
+
userToken: normalizedUserToken
|
|
10413
10434
|
}));
|
|
10414
10435
|
if (existingToken && existingToken !== userToken) {
|
|
10415
10436
|
instantSearchInstance.scheduleSearch();
|
|
@@ -10505,6 +10526,17 @@
|
|
|
10505
10526
|
return v3 || v2_6 || v1_10;
|
|
10506
10527
|
}
|
|
10507
10528
|
|
|
10529
|
+
/**
|
|
10530
|
+
* While `search-insights` supports both string and number user tokens,
|
|
10531
|
+
* the Search API only accepts strings. This function normalizes the user token.
|
|
10532
|
+
*/
|
|
10533
|
+
function normalizeUserToken(userToken) {
|
|
10534
|
+
if (!userToken) {
|
|
10535
|
+
return undefined;
|
|
10536
|
+
}
|
|
10537
|
+
return typeof userToken === 'number' ? userToken.toString() : userToken;
|
|
10538
|
+
}
|
|
10539
|
+
|
|
10508
10540
|
function extractWidgetPayload(widgets, instantSearchInstance, payload) {
|
|
10509
10541
|
var initOptions = createInitArgs(instantSearchInstance, instantSearchInstance.mainIndex, instantSearchInstance._initialUiState);
|
|
10510
10542
|
widgets.forEach(function (widget) {
|
|
@@ -11487,7 +11519,8 @@
|
|
|
11487
11519
|
getLocation = _ref.getLocation,
|
|
11488
11520
|
start = _ref.start,
|
|
11489
11521
|
dispose = _ref.dispose,
|
|
11490
|
-
push = _ref.push
|
|
11522
|
+
push = _ref.push,
|
|
11523
|
+
cleanUrlOnDispose = _ref.cleanUrlOnDispose;
|
|
11491
11524
|
_classCallCheck(this, BrowserHistory);
|
|
11492
11525
|
_defineProperty$f(this, "$$type", 'ais.browser');
|
|
11493
11526
|
/**
|
|
@@ -11537,6 +11570,7 @@
|
|
|
11537
11570
|
_defineProperty$f(this, "_start", void 0);
|
|
11538
11571
|
_defineProperty$f(this, "_dispose", void 0);
|
|
11539
11572
|
_defineProperty$f(this, "_push", void 0);
|
|
11573
|
+
_defineProperty$f(this, "_cleanUrlOnDispose", void 0);
|
|
11540
11574
|
this.windowTitle = windowTitle;
|
|
11541
11575
|
this.writeTimer = undefined;
|
|
11542
11576
|
this.writeDelay = writeDelay;
|
|
@@ -11546,6 +11580,7 @@
|
|
|
11546
11580
|
this._start = start;
|
|
11547
11581
|
this._dispose = dispose;
|
|
11548
11582
|
this._push = push;
|
|
11583
|
+
this._cleanUrlOnDispose = typeof cleanUrlOnDispose === 'undefined' ? true : cleanUrlOnDispose;
|
|
11549
11584
|
safelyRunOnBrowser(function (_ref2) {
|
|
11550
11585
|
var window = _ref2.window;
|
|
11551
11586
|
var title = _this.windowTitle && _this.windowTitle(_this.read());
|
|
@@ -11664,7 +11699,9 @@
|
|
|
11664
11699
|
if (this.writeTimer) {
|
|
11665
11700
|
clearTimeout(this.writeTimer);
|
|
11666
11701
|
}
|
|
11667
|
-
this.
|
|
11702
|
+
if (this._cleanUrlOnDispose) {
|
|
11703
|
+
this.write({});
|
|
11704
|
+
}
|
|
11668
11705
|
}
|
|
11669
11706
|
}, {
|
|
11670
11707
|
key: "start",
|
|
@@ -11753,7 +11790,8 @@
|
|
|
11753
11790
|
} : _ref7$getLocation,
|
|
11754
11791
|
start = _ref7.start,
|
|
11755
11792
|
dispose = _ref7.dispose,
|
|
11756
|
-
push = _ref7.push
|
|
11793
|
+
push = _ref7.push,
|
|
11794
|
+
cleanUrlOnDispose = _ref7.cleanUrlOnDispose;
|
|
11757
11795
|
return new BrowserHistory({
|
|
11758
11796
|
createURL: createURL,
|
|
11759
11797
|
parseURL: parseURL,
|
|
@@ -11762,7 +11800,8 @@
|
|
|
11762
11800
|
getLocation: getLocation,
|
|
11763
11801
|
start: start,
|
|
11764
11802
|
dispose: dispose,
|
|
11765
|
-
push: push
|
|
11803
|
+
push: push,
|
|
11804
|
+
cleanUrlOnDispose: cleanUrlOnDispose
|
|
11766
11805
|
});
|
|
11767
11806
|
}
|
|
11768
11807
|
|
|
@@ -12120,7 +12159,7 @@
|
|
|
12120
12159
|
};
|
|
12121
12160
|
}
|
|
12122
12161
|
|
|
12123
|
-
var version$3 = '4.
|
|
12162
|
+
var version$3 = '4.63.0';
|
|
12124
12163
|
|
|
12125
12164
|
function _typeof$o(obj) {
|
|
12126
12165
|
"@babel/helpers - typeof";
|
|
@@ -12284,7 +12323,8 @@
|
|
|
12284
12323
|
* Global options for an InstantSearch instance.
|
|
12285
12324
|
*/
|
|
12286
12325
|
var INSTANTSEARCH_FUTURE_DEFAULTS = {
|
|
12287
|
-
preserveSharedStateOnUnmount: false
|
|
12326
|
+
preserveSharedStateOnUnmount: false,
|
|
12327
|
+
persistHierarchicalRootCount: false
|
|
12288
12328
|
};
|
|
12289
12329
|
|
|
12290
12330
|
/**
|
|
@@ -12604,7 +12644,9 @@
|
|
|
12604
12644
|
// DerivedHelper scoped into the `index` widgets.
|
|
12605
12645
|
// In Vue InstantSearch' hydrate, a main helper gets set before start, so
|
|
12606
12646
|
// we need to respect this helper as a way to keep all listeners correct.
|
|
12607
|
-
var mainHelper = this.mainHelper || algoliasearchHelper_1(this.client, this.indexName
|
|
12647
|
+
var mainHelper = this.mainHelper || algoliasearchHelper_1(this.client, this.indexName, undefined, {
|
|
12648
|
+
persistHierarchicalRootCount: this.future.persistHierarchicalRootCount
|
|
12649
|
+
});
|
|
12608
12650
|
mainHelper.search = function () {
|
|
12609
12651
|
_this3.status = 'loading';
|
|
12610
12652
|
_this3.scheduleRender(false);
|
|
@@ -13259,34 +13301,6 @@
|
|
|
13259
13301
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
13260
13302
|
}, _typeof$r(obj);
|
|
13261
13303
|
}
|
|
13262
|
-
var _excluded$8 = ["hierarchicalMenu"];
|
|
13263
|
-
function _objectWithoutProperties$8(source, excluded) {
|
|
13264
|
-
if (source == null) return {};
|
|
13265
|
-
var target = _objectWithoutPropertiesLoose$9(source, excluded);
|
|
13266
|
-
var key, i;
|
|
13267
|
-
if (Object.getOwnPropertySymbols) {
|
|
13268
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
13269
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
13270
|
-
key = sourceSymbolKeys[i];
|
|
13271
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
13272
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
13273
|
-
target[key] = source[key];
|
|
13274
|
-
}
|
|
13275
|
-
}
|
|
13276
|
-
return target;
|
|
13277
|
-
}
|
|
13278
|
-
function _objectWithoutPropertiesLoose$9(source, excluded) {
|
|
13279
|
-
if (source == null) return {};
|
|
13280
|
-
var target = {};
|
|
13281
|
-
var sourceKeys = Object.keys(source);
|
|
13282
|
-
var key, i;
|
|
13283
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
13284
|
-
key = sourceKeys[i];
|
|
13285
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
13286
|
-
target[key] = source[key];
|
|
13287
|
-
}
|
|
13288
|
-
return target;
|
|
13289
|
-
}
|
|
13290
13304
|
function ownKeys$l(object, enumerableOnly) {
|
|
13291
13305
|
var keys = Object.keys(object);
|
|
13292
13306
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -13491,7 +13505,7 @@
|
|
|
13491
13505
|
var path = searchParameters.getHierarchicalFacetBreadcrumb(hierarchicalFacetName);
|
|
13492
13506
|
return removeEmptyRefinementsFromUiState(_objectSpread$l(_objectSpread$l({}, uiState), {}, {
|
|
13493
13507
|
hierarchicalMenu: _objectSpread$l(_objectSpread$l({}, uiState.hierarchicalMenu), {}, _defineProperty$m({}, hierarchicalFacetName, path))
|
|
13494
|
-
}));
|
|
13508
|
+
}), hierarchicalFacetName);
|
|
13495
13509
|
},
|
|
13496
13510
|
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref4) {
|
|
13497
13511
|
var uiState = _ref4.uiState;
|
|
@@ -13540,18 +13554,17 @@
|
|
|
13540
13554
|
};
|
|
13541
13555
|
});
|
|
13542
13556
|
}
|
|
13543
|
-
function removeEmptyRefinementsFromUiState(indexUiState) {
|
|
13544
|
-
|
|
13545
|
-
indexUiStateBase = _objectWithoutProperties$8(indexUiState, _excluded$8);
|
|
13546
|
-
if (!hierarchicalMenu) {
|
|
13557
|
+
function removeEmptyRefinementsFromUiState(indexUiState, attribute) {
|
|
13558
|
+
if (!indexUiState.hierarchicalMenu) {
|
|
13547
13559
|
return indexUiState;
|
|
13548
13560
|
}
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
}
|
|
13552
|
-
|
|
13553
|
-
hierarchicalMenu
|
|
13554
|
-
}
|
|
13561
|
+
if (!indexUiState.hierarchicalMenu[attribute] || !indexUiState.hierarchicalMenu[attribute].length) {
|
|
13562
|
+
delete indexUiState.hierarchicalMenu[attribute];
|
|
13563
|
+
}
|
|
13564
|
+
if (Object.keys(indexUiState.hierarchicalMenu).length === 0) {
|
|
13565
|
+
delete indexUiState.hierarchicalMenu;
|
|
13566
|
+
}
|
|
13567
|
+
return indexUiState;
|
|
13555
13568
|
}
|
|
13556
13569
|
|
|
13557
13570
|
function useBreadcrumb(props, additionalWidgetProperties) {
|
|
@@ -14316,8 +14329,7 @@
|
|
|
14316
14329
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
14317
14330
|
}, _typeof$v(obj);
|
|
14318
14331
|
}
|
|
14319
|
-
var _excluded$
|
|
14320
|
-
_excluded2$1 = ["hierarchicalMenu"];
|
|
14332
|
+
var _excluded$8 = ["name", "escapedValue", "data", "path"];
|
|
14321
14333
|
function ownKeys$p(object, enumerableOnly) {
|
|
14322
14334
|
var keys = Object.keys(object);
|
|
14323
14335
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -14367,9 +14379,9 @@
|
|
|
14367
14379
|
}
|
|
14368
14380
|
return (hint === "string" ? String : Number)(input);
|
|
14369
14381
|
}
|
|
14370
|
-
function _objectWithoutProperties$
|
|
14382
|
+
function _objectWithoutProperties$8(source, excluded) {
|
|
14371
14383
|
if (source == null) return {};
|
|
14372
|
-
var target = _objectWithoutPropertiesLoose$
|
|
14384
|
+
var target = _objectWithoutPropertiesLoose$9(source, excluded);
|
|
14373
14385
|
var key, i;
|
|
14374
14386
|
if (Object.getOwnPropertySymbols) {
|
|
14375
14387
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -14382,7 +14394,7 @@
|
|
|
14382
14394
|
}
|
|
14383
14395
|
return target;
|
|
14384
14396
|
}
|
|
14385
|
-
function _objectWithoutPropertiesLoose$
|
|
14397
|
+
function _objectWithoutPropertiesLoose$9(source, excluded) {
|
|
14386
14398
|
if (source == null) return {};
|
|
14387
14399
|
var target = {};
|
|
14388
14400
|
var sourceKeys = Object.keys(source);
|
|
@@ -14521,7 +14533,7 @@
|
|
|
14521
14533
|
value = _ref2.escapedValue,
|
|
14522
14534
|
data = _ref2.data,
|
|
14523
14535
|
path = _ref2.path,
|
|
14524
|
-
subValue = _objectWithoutProperties$
|
|
14536
|
+
subValue = _objectWithoutProperties$8(_ref2, _excluded$8);
|
|
14525
14537
|
var item = _objectSpread$p(_objectSpread$p({}, subValue), {}, {
|
|
14526
14538
|
value: value,
|
|
14527
14539
|
label: label,
|
|
@@ -14630,7 +14642,7 @@
|
|
|
14630
14642
|
var path = searchParameters.getHierarchicalFacetBreadcrumb(hierarchicalFacetName);
|
|
14631
14643
|
return removeEmptyRefinementsFromUiState$1(_objectSpread$p(_objectSpread$p({}, uiState), {}, {
|
|
14632
14644
|
hierarchicalMenu: _objectSpread$p(_objectSpread$p({}, uiState.hierarchicalMenu), {}, _defineProperty$q({}, hierarchicalFacetName, path))
|
|
14633
|
-
}));
|
|
14645
|
+
}), hierarchicalFacetName);
|
|
14634
14646
|
},
|
|
14635
14647
|
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref6) {
|
|
14636
14648
|
var uiState = _ref6.uiState;
|
|
@@ -14661,18 +14673,17 @@
|
|
|
14661
14673
|
};
|
|
14662
14674
|
};
|
|
14663
14675
|
};
|
|
14664
|
-
function removeEmptyRefinementsFromUiState$1(indexUiState) {
|
|
14665
|
-
|
|
14666
|
-
indexUiStateBase = _objectWithoutProperties$9(indexUiState, _excluded2$1);
|
|
14667
|
-
if (!hierarchicalMenu) {
|
|
14676
|
+
function removeEmptyRefinementsFromUiState$1(indexUiState, attribute) {
|
|
14677
|
+
if (!indexUiState.hierarchicalMenu) {
|
|
14668
14678
|
return indexUiState;
|
|
14669
14679
|
}
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
}
|
|
14673
|
-
|
|
14674
|
-
hierarchicalMenu
|
|
14675
|
-
}
|
|
14680
|
+
if (!indexUiState.hierarchicalMenu[attribute] || indexUiState.hierarchicalMenu[attribute].length === 0) {
|
|
14681
|
+
delete indexUiState.hierarchicalMenu[attribute];
|
|
14682
|
+
}
|
|
14683
|
+
if (Object.keys(indexUiState.hierarchicalMenu).length === 0) {
|
|
14684
|
+
delete indexUiState.hierarchicalMenu;
|
|
14685
|
+
}
|
|
14686
|
+
return indexUiState;
|
|
14676
14687
|
}
|
|
14677
14688
|
|
|
14678
14689
|
function useHierarchicalMenu(props, additionalWidgetProperties) {
|
|
@@ -15071,8 +15082,8 @@
|
|
|
15071
15082
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
15072
15083
|
}, _typeof$y(obj);
|
|
15073
15084
|
}
|
|
15074
|
-
var _excluded$
|
|
15075
|
-
_excluded2$
|
|
15085
|
+
var _excluded$9 = ["page"],
|
|
15086
|
+
_excluded2$1 = ["clickAnalytics", "userToken"];
|
|
15076
15087
|
function ownKeys$s(object, enumerableOnly) {
|
|
15077
15088
|
var keys = Object.keys(object);
|
|
15078
15089
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -15147,9 +15158,9 @@
|
|
|
15147
15158
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
15148
15159
|
return arr2;
|
|
15149
15160
|
}
|
|
15150
|
-
function _objectWithoutProperties$
|
|
15161
|
+
function _objectWithoutProperties$9(source, excluded) {
|
|
15151
15162
|
if (source == null) return {};
|
|
15152
|
-
var target = _objectWithoutPropertiesLoose$
|
|
15163
|
+
var target = _objectWithoutPropertiesLoose$a(source, excluded);
|
|
15153
15164
|
var key, i;
|
|
15154
15165
|
if (Object.getOwnPropertySymbols) {
|
|
15155
15166
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -15162,7 +15173,7 @@
|
|
|
15162
15173
|
}
|
|
15163
15174
|
return target;
|
|
15164
15175
|
}
|
|
15165
|
-
function _objectWithoutPropertiesLoose$
|
|
15176
|
+
function _objectWithoutPropertiesLoose$a(source, excluded) {
|
|
15166
15177
|
if (source == null) return {};
|
|
15167
15178
|
var target = {};
|
|
15168
15179
|
var sourceKeys = Object.keys(source);
|
|
@@ -15181,14 +15192,14 @@
|
|
|
15181
15192
|
function getStateWithoutPage(state) {
|
|
15182
15193
|
var _ref = state || {},
|
|
15183
15194
|
page = _ref.page,
|
|
15184
|
-
rest = _objectWithoutProperties$
|
|
15195
|
+
rest = _objectWithoutProperties$9(_ref, _excluded$9);
|
|
15185
15196
|
return rest;
|
|
15186
15197
|
}
|
|
15187
15198
|
function normalizeState(state) {
|
|
15188
15199
|
var _ref2 = state || {},
|
|
15189
15200
|
clickAnalytics = _ref2.clickAnalytics,
|
|
15190
15201
|
userToken = _ref2.userToken,
|
|
15191
|
-
rest = _objectWithoutProperties$
|
|
15202
|
+
rest = _objectWithoutProperties$9(_ref2, _excluded2$1);
|
|
15192
15203
|
return rest;
|
|
15193
15204
|
}
|
|
15194
15205
|
function getInMemoryCache() {
|
|
@@ -15421,8 +15432,7 @@
|
|
|
15421
15432
|
return useConnector(connectInfiniteHits, props, additionalWidgetProperties);
|
|
15422
15433
|
}
|
|
15423
15434
|
|
|
15424
|
-
var _excluded$
|
|
15425
|
-
_excluded2$3 = ["menu"];
|
|
15435
|
+
var _excluded$a = ["name", "escapedValue", "path"];
|
|
15426
15436
|
function _typeof$z(obj) {
|
|
15427
15437
|
"@babel/helpers - typeof";
|
|
15428
15438
|
|
|
@@ -15432,9 +15442,9 @@
|
|
|
15432
15442
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
15433
15443
|
}, _typeof$z(obj);
|
|
15434
15444
|
}
|
|
15435
|
-
function _objectWithoutProperties$
|
|
15445
|
+
function _objectWithoutProperties$a(source, excluded) {
|
|
15436
15446
|
if (source == null) return {};
|
|
15437
|
-
var target = _objectWithoutPropertiesLoose$
|
|
15447
|
+
var target = _objectWithoutPropertiesLoose$b(source, excluded);
|
|
15438
15448
|
var key, i;
|
|
15439
15449
|
if (Object.getOwnPropertySymbols) {
|
|
15440
15450
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -15447,7 +15457,7 @@
|
|
|
15447
15457
|
}
|
|
15448
15458
|
return target;
|
|
15449
15459
|
}
|
|
15450
|
-
function _objectWithoutPropertiesLoose$
|
|
15460
|
+
function _objectWithoutPropertiesLoose$b(source, excluded) {
|
|
15451
15461
|
if (source == null) return {};
|
|
15452
15462
|
var target = {};
|
|
15453
15463
|
var sourceKeys = Object.keys(source);
|
|
@@ -15688,7 +15698,7 @@
|
|
|
15688
15698
|
var label = _ref3.name,
|
|
15689
15699
|
value = _ref3.escapedValue,
|
|
15690
15700
|
path = _ref3.path,
|
|
15691
|
-
item = _objectWithoutProperties$
|
|
15701
|
+
item = _objectWithoutProperties$a(_ref3, _excluded$a);
|
|
15692
15702
|
return _objectSpread$t(_objectSpread$t({}, item), {}, {
|
|
15693
15703
|
label: label,
|
|
15694
15704
|
value: value
|
|
@@ -15716,7 +15726,7 @@
|
|
|
15716
15726
|
value = _searchParameters$get2[0];
|
|
15717
15727
|
return removeEmptyRefinementsFromUiState$2(_objectSpread$t(_objectSpread$t({}, uiState), {}, {
|
|
15718
15728
|
menu: _objectSpread$t(_objectSpread$t({}, uiState.menu), {}, _defineProperty$u({}, attribute, value))
|
|
15719
|
-
}));
|
|
15729
|
+
}), attribute);
|
|
15720
15730
|
},
|
|
15721
15731
|
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref5) {
|
|
15722
15732
|
var uiState = _ref5.uiState;
|
|
@@ -15741,26 +15751,23 @@
|
|
|
15741
15751
|
};
|
|
15742
15752
|
};
|
|
15743
15753
|
};
|
|
15744
|
-
function removeEmptyRefinementsFromUiState$2(indexUiState) {
|
|
15745
|
-
|
|
15746
|
-
indexUiStateBase = _objectWithoutProperties$b(indexUiState, _excluded2$3);
|
|
15747
|
-
if (!menu) {
|
|
15754
|
+
function removeEmptyRefinementsFromUiState$2(indexUiState, attribute) {
|
|
15755
|
+
if (!indexUiState.menu) {
|
|
15748
15756
|
return indexUiState;
|
|
15749
15757
|
}
|
|
15750
|
-
|
|
15751
|
-
|
|
15752
|
-
|
|
15753
|
-
|
|
15754
|
-
|
|
15755
|
-
|
|
15756
|
-
|
|
15758
|
+
if (indexUiState.menu[attribute] === undefined) {
|
|
15759
|
+
delete indexUiState.menu[attribute];
|
|
15760
|
+
}
|
|
15761
|
+
if (Object.keys(indexUiState.menu).length === 0) {
|
|
15762
|
+
delete indexUiState.menu;
|
|
15763
|
+
}
|
|
15764
|
+
return indexUiState;
|
|
15757
15765
|
}
|
|
15758
15766
|
|
|
15759
15767
|
function useMenu(props, additionalWidgetProperties) {
|
|
15760
15768
|
return useConnector(connectMenu, props, additionalWidgetProperties);
|
|
15761
15769
|
}
|
|
15762
15770
|
|
|
15763
|
-
var _excluded$c = ["numericMenu"];
|
|
15764
15771
|
function _typeof$A(obj) {
|
|
15765
15772
|
"@babel/helpers - typeof";
|
|
15766
15773
|
|
|
@@ -15770,33 +15777,6 @@
|
|
|
15770
15777
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
15771
15778
|
}, _typeof$A(obj);
|
|
15772
15779
|
}
|
|
15773
|
-
function _objectWithoutProperties$c(source, excluded) {
|
|
15774
|
-
if (source == null) return {};
|
|
15775
|
-
var target = _objectWithoutPropertiesLoose$d(source, excluded);
|
|
15776
|
-
var key, i;
|
|
15777
|
-
if (Object.getOwnPropertySymbols) {
|
|
15778
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
15779
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
15780
|
-
key = sourceSymbolKeys[i];
|
|
15781
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
15782
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
15783
|
-
target[key] = source[key];
|
|
15784
|
-
}
|
|
15785
|
-
}
|
|
15786
|
-
return target;
|
|
15787
|
-
}
|
|
15788
|
-
function _objectWithoutPropertiesLoose$d(source, excluded) {
|
|
15789
|
-
if (source == null) return {};
|
|
15790
|
-
var target = {};
|
|
15791
|
-
var sourceKeys = Object.keys(source);
|
|
15792
|
-
var key, i;
|
|
15793
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
15794
|
-
key = sourceKeys[i];
|
|
15795
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
15796
|
-
target[key] = source[key];
|
|
15797
|
-
}
|
|
15798
|
-
return target;
|
|
15799
|
-
}
|
|
15800
15780
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
15801
15781
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
15802
15782
|
if (!it) {
|
|
@@ -16031,7 +16011,7 @@
|
|
|
16031
16011
|
var max = values['<='] && values['<='][0] || '';
|
|
16032
16012
|
return removeEmptyRefinementsFromUiState$3(_objectSpread$u(_objectSpread$u({}, uiState), {}, {
|
|
16033
16013
|
numericMenu: _objectSpread$u(_objectSpread$u({}, uiState.numericMenu), {}, _defineProperty$v({}, attribute, "".concat(min, ":").concat(max)))
|
|
16034
|
-
}));
|
|
16014
|
+
}), attribute);
|
|
16035
16015
|
},
|
|
16036
16016
|
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref6) {
|
|
16037
16017
|
var uiState = _ref6.uiState;
|
|
@@ -16193,18 +16173,17 @@
|
|
|
16193
16173
|
function hasNumericRefinement(currentRefinements, operator, value) {
|
|
16194
16174
|
return currentRefinements[operator] !== undefined && currentRefinements[operator].includes(value);
|
|
16195
16175
|
}
|
|
16196
|
-
function removeEmptyRefinementsFromUiState$3(indexUiState) {
|
|
16197
|
-
|
|
16198
|
-
indexUiStateBase = _objectWithoutProperties$c(indexUiState, _excluded$c);
|
|
16199
|
-
if (!numericMenu) {
|
|
16176
|
+
function removeEmptyRefinementsFromUiState$3(indexUiState, attribute) {
|
|
16177
|
+
if (!indexUiState.numericMenu) {
|
|
16200
16178
|
return indexUiState;
|
|
16201
16179
|
}
|
|
16202
|
-
|
|
16203
|
-
|
|
16204
|
-
}
|
|
16205
|
-
|
|
16206
|
-
numericMenu
|
|
16207
|
-
}
|
|
16180
|
+
if (indexUiState.numericMenu[attribute] === ':') {
|
|
16181
|
+
delete indexUiState.numericMenu[attribute];
|
|
16182
|
+
}
|
|
16183
|
+
if (Object.keys(indexUiState.numericMenu).length === 0) {
|
|
16184
|
+
delete indexUiState.numericMenu;
|
|
16185
|
+
}
|
|
16186
|
+
return indexUiState;
|
|
16208
16187
|
}
|
|
16209
16188
|
|
|
16210
16189
|
function useNumericMenu(props, additionalWidgetProperties) {
|
|
@@ -17153,9 +17132,8 @@
|
|
|
17153
17132
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
17154
17133
|
}, _typeof$F(obj);
|
|
17155
17134
|
}
|
|
17156
|
-
var _excluded$
|
|
17157
|
-
_excluded2$
|
|
17158
|
-
_excluded3 = ["refinementList"];
|
|
17135
|
+
var _excluded$b = ["name", "escapedValue"],
|
|
17136
|
+
_excluded2$2 = ["escapedValue", "value"];
|
|
17159
17137
|
function ownKeys$y(object, enumerableOnly) {
|
|
17160
17138
|
var keys = Object.keys(object);
|
|
17161
17139
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17205,9 +17183,9 @@
|
|
|
17205
17183
|
}
|
|
17206
17184
|
return (hint === "string" ? String : Number)(input);
|
|
17207
17185
|
}
|
|
17208
|
-
function _objectWithoutProperties$
|
|
17186
|
+
function _objectWithoutProperties$b(source, excluded) {
|
|
17209
17187
|
if (source == null) return {};
|
|
17210
|
-
var target = _objectWithoutPropertiesLoose$
|
|
17188
|
+
var target = _objectWithoutPropertiesLoose$c(source, excluded);
|
|
17211
17189
|
var key, i;
|
|
17212
17190
|
if (Object.getOwnPropertySymbols) {
|
|
17213
17191
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -17220,7 +17198,7 @@
|
|
|
17220
17198
|
}
|
|
17221
17199
|
return target;
|
|
17222
17200
|
}
|
|
17223
|
-
function _objectWithoutPropertiesLoose$
|
|
17201
|
+
function _objectWithoutPropertiesLoose$c(source, excluded) {
|
|
17224
17202
|
if (source == null) return {};
|
|
17225
17203
|
var target = {};
|
|
17226
17204
|
var sourceKeys = Object.keys(source);
|
|
@@ -17283,7 +17261,7 @@
|
|
|
17283
17261
|
var formatItems = function formatItems(_ref2) {
|
|
17284
17262
|
var label = _ref2.name,
|
|
17285
17263
|
value = _ref2.escapedValue,
|
|
17286
|
-
item = _objectWithoutProperties$
|
|
17264
|
+
item = _objectWithoutProperties$b(_ref2, _excluded$b);
|
|
17287
17265
|
return _objectSpread$y(_objectSpread$y({}, item), {}, {
|
|
17288
17266
|
value: value,
|
|
17289
17267
|
label: label,
|
|
@@ -17340,7 +17318,7 @@
|
|
|
17340
17318
|
var normalizedFacetValues = transformItems(facetValues.map(function (_ref3) {
|
|
17341
17319
|
var escapedValue = _ref3.escapedValue,
|
|
17342
17320
|
value = _ref3.value,
|
|
17343
|
-
item = _objectWithoutProperties$
|
|
17321
|
+
item = _objectWithoutProperties$b(_ref3, _excluded2$2);
|
|
17344
17322
|
return _objectSpread$y(_objectSpread$y({}, item), {}, {
|
|
17345
17323
|
value: escapedValue,
|
|
17346
17324
|
label: value
|
|
@@ -17468,7 +17446,7 @@
|
|
|
17468
17446
|
var values = operator === 'or' ? searchParameters.getDisjunctiveRefinements(attribute) : searchParameters.getConjunctiveRefinements(attribute);
|
|
17469
17447
|
return removeEmptyRefinementsFromUiState$4(_objectSpread$y(_objectSpread$y({}, uiState), {}, {
|
|
17470
17448
|
refinementList: _objectSpread$y(_objectSpread$y({}, uiState.refinementList), {}, _defineProperty$A({}, attribute, values))
|
|
17471
|
-
}));
|
|
17449
|
+
}), attribute);
|
|
17472
17450
|
},
|
|
17473
17451
|
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref6) {
|
|
17474
17452
|
var uiState = _ref6.uiState;
|
|
@@ -17496,18 +17474,17 @@
|
|
|
17496
17474
|
};
|
|
17497
17475
|
};
|
|
17498
17476
|
};
|
|
17499
|
-
function removeEmptyRefinementsFromUiState$4(indexUiState) {
|
|
17500
|
-
|
|
17501
|
-
indexUiStateBase = _objectWithoutProperties$d(indexUiState, _excluded3);
|
|
17502
|
-
if (!refinementList) {
|
|
17477
|
+
function removeEmptyRefinementsFromUiState$4(indexUiState, attribute) {
|
|
17478
|
+
if (!indexUiState.refinementList) {
|
|
17503
17479
|
return indexUiState;
|
|
17504
17480
|
}
|
|
17505
|
-
|
|
17506
|
-
|
|
17507
|
-
}
|
|
17508
|
-
|
|
17509
|
-
refinementList
|
|
17510
|
-
}
|
|
17481
|
+
if (!indexUiState.refinementList[attribute] || indexUiState.refinementList[attribute].length === 0) {
|
|
17482
|
+
delete indexUiState.refinementList[attribute];
|
|
17483
|
+
}
|
|
17484
|
+
if (Object.keys(indexUiState.refinementList).length === 0) {
|
|
17485
|
+
delete indexUiState.refinementList;
|
|
17486
|
+
}
|
|
17487
|
+
return indexUiState;
|
|
17511
17488
|
}
|
|
17512
17489
|
|
|
17513
17490
|
function useRefinementList(props, additionalWidgetProperties) {
|
|
@@ -18886,7 +18863,7 @@
|
|
|
18886
18863
|
};
|
|
18887
18864
|
return _extends$1.apply(this, arguments);
|
|
18888
18865
|
}
|
|
18889
|
-
function _objectWithoutPropertiesLoose$
|
|
18866
|
+
function _objectWithoutPropertiesLoose$d(source, excluded) {
|
|
18890
18867
|
if (source == null) return {};
|
|
18891
18868
|
var target = {};
|
|
18892
18869
|
var sourceKeys = Object.keys(source);
|
|
@@ -18898,9 +18875,9 @@
|
|
|
18898
18875
|
}
|
|
18899
18876
|
return target;
|
|
18900
18877
|
}
|
|
18901
|
-
function _objectWithoutProperties$
|
|
18878
|
+
function _objectWithoutProperties$c(source, excluded) {
|
|
18902
18879
|
if (source == null) return {};
|
|
18903
|
-
var target = _objectWithoutPropertiesLoose$
|
|
18880
|
+
var target = _objectWithoutPropertiesLoose$d(source, excluded);
|
|
18904
18881
|
var key, i;
|
|
18905
18882
|
if (Object.getOwnPropertySymbols) {
|
|
18906
18883
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -18962,7 +18939,7 @@
|
|
|
18962
18939
|
return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
|
|
18963
18940
|
}
|
|
18964
18941
|
|
|
18965
|
-
var _excluded$
|
|
18942
|
+
var _excluded$c = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
|
|
18966
18943
|
function Breadcrumb(_ref) {
|
|
18967
18944
|
var _ref$classNames = _ref.classNames,
|
|
18968
18945
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -18974,7 +18951,7 @@
|
|
|
18974
18951
|
_ref$separator = _ref.separator,
|
|
18975
18952
|
separator = _ref$separator === void 0 ? '>' : _ref$separator,
|
|
18976
18953
|
translations = _ref.translations,
|
|
18977
|
-
props = _objectWithoutProperties$
|
|
18954
|
+
props = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
18978
18955
|
var handleClick = function handleClick(value) {
|
|
18979
18956
|
return function (event) {
|
|
18980
18957
|
if (!isModifierClick(event)) {
|
|
@@ -19009,14 +18986,14 @@
|
|
|
19009
18986
|
})));
|
|
19010
18987
|
}
|
|
19011
18988
|
|
|
19012
|
-
var _excluded$
|
|
18989
|
+
var _excluded$d = ["attributes", "rootPath", "separator", "transformItems", "translations"];
|
|
19013
18990
|
function Breadcrumb$1(_ref) {
|
|
19014
18991
|
var attributes = _ref.attributes,
|
|
19015
18992
|
rootPath = _ref.rootPath,
|
|
19016
18993
|
separator = _ref.separator,
|
|
19017
18994
|
transformItems = _ref.transformItems,
|
|
19018
18995
|
translations = _ref.translations,
|
|
19019
|
-
props = _objectWithoutProperties$
|
|
18996
|
+
props = _objectWithoutProperties$c(_ref, _excluded$d);
|
|
19020
18997
|
var _useBreadcrumb = useBreadcrumb({
|
|
19021
18998
|
attributes: attributes,
|
|
19022
18999
|
rootPath: rootPath,
|
|
@@ -19040,7 +19017,7 @@
|
|
|
19040
19017
|
return /*#__PURE__*/React__default.createElement(Breadcrumb, _extends$1({}, props, uiProps));
|
|
19041
19018
|
}
|
|
19042
19019
|
|
|
19043
|
-
var _excluded$
|
|
19020
|
+
var _excluded$e = ["classNames", "disabled", "onClick", "translations"];
|
|
19044
19021
|
function ClearRefinements(_ref) {
|
|
19045
19022
|
var _ref$classNames = _ref.classNames,
|
|
19046
19023
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -19049,7 +19026,7 @@
|
|
|
19049
19026
|
_ref$onClick = _ref.onClick,
|
|
19050
19027
|
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
19051
19028
|
translations = _ref.translations,
|
|
19052
|
-
props = _objectWithoutProperties$
|
|
19029
|
+
props = _objectWithoutProperties$c(_ref, _excluded$e);
|
|
19053
19030
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19054
19031
|
className: cx('ais-ClearRefinements', classNames.root, props.className)
|
|
19055
19032
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -19059,13 +19036,13 @@
|
|
|
19059
19036
|
}, translations.resetButtonText));
|
|
19060
19037
|
}
|
|
19061
19038
|
|
|
19062
|
-
var _excluded$
|
|
19039
|
+
var _excluded$f = ["includedAttributes", "excludedAttributes", "transformItems", "translations"];
|
|
19063
19040
|
function ClearRefinements$1(_ref) {
|
|
19064
19041
|
var includedAttributes = _ref.includedAttributes,
|
|
19065
19042
|
excludedAttributes = _ref.excludedAttributes,
|
|
19066
19043
|
transformItems = _ref.transformItems,
|
|
19067
19044
|
translations = _ref.translations,
|
|
19068
|
-
props = _objectWithoutProperties$
|
|
19045
|
+
props = _objectWithoutProperties$c(_ref, _excluded$f);
|
|
19069
19046
|
var _useClearRefinements = useClearRefinements({
|
|
19070
19047
|
includedAttributes: includedAttributes,
|
|
19071
19048
|
excludedAttributes: excludedAttributes,
|
|
@@ -19089,7 +19066,7 @@
|
|
|
19089
19066
|
return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
|
|
19090
19067
|
}
|
|
19091
19068
|
|
|
19092
|
-
var _excluded$
|
|
19069
|
+
var _excluded$g = ["classNames", "items", "hasRefinements"];
|
|
19093
19070
|
function CurrentRefinements(_ref) {
|
|
19094
19071
|
var _ref$classNames = _ref.classNames,
|
|
19095
19072
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -19097,7 +19074,7 @@
|
|
|
19097
19074
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
19098
19075
|
_ref$hasRefinements = _ref.hasRefinements,
|
|
19099
19076
|
hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
|
|
19100
|
-
props = _objectWithoutProperties$
|
|
19077
|
+
props = _objectWithoutProperties$c(_ref, _excluded$g);
|
|
19101
19078
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19102
19079
|
className: cx('ais-CurrentRefinements', classNames.root, !hasRefinements && cx('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
|
|
19103
19080
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -19129,12 +19106,12 @@
|
|
|
19129
19106
|
})));
|
|
19130
19107
|
}
|
|
19131
19108
|
|
|
19132
|
-
var _excluded$
|
|
19109
|
+
var _excluded$h = ["includedAttributes", "excludedAttributes", "transformItems"];
|
|
19133
19110
|
function CurrentRefinements$1(_ref) {
|
|
19134
19111
|
var includedAttributes = _ref.includedAttributes,
|
|
19135
19112
|
excludedAttributes = _ref.excludedAttributes,
|
|
19136
19113
|
transformItems = _ref.transformItems,
|
|
19137
|
-
props = _objectWithoutProperties$
|
|
19114
|
+
props = _objectWithoutProperties$c(_ref, _excluded$h);
|
|
19138
19115
|
var _useCurrentRefinement = useCurrentRefinements({
|
|
19139
19116
|
includedAttributes: includedAttributes,
|
|
19140
19117
|
excludedAttributes: excludedAttributes,
|
|
@@ -19151,17 +19128,17 @@
|
|
|
19151
19128
|
return /*#__PURE__*/React__default.createElement(CurrentRefinements, _extends$1({}, props, uiProps));
|
|
19152
19129
|
}
|
|
19153
19130
|
|
|
19154
|
-
var _excluded$
|
|
19131
|
+
var _excluded$i = ["isShowingMore", "translations"];
|
|
19155
19132
|
function ShowMoreButton(_ref) {
|
|
19156
19133
|
var isShowingMore = _ref.isShowingMore,
|
|
19157
19134
|
translations = _ref.translations,
|
|
19158
|
-
props = _objectWithoutProperties$
|
|
19135
|
+
props = _objectWithoutProperties$c(_ref, _excluded$i);
|
|
19159
19136
|
return /*#__PURE__*/React__default.createElement("button", props, translations.showMoreButtonText({
|
|
19160
19137
|
isShowingMore: isShowingMore
|
|
19161
19138
|
}));
|
|
19162
19139
|
}
|
|
19163
19140
|
|
|
19164
|
-
var _excluded$
|
|
19141
|
+
var _excluded$j = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
|
|
19165
19142
|
function HierarchicalList(_ref) {
|
|
19166
19143
|
var className = _ref.className,
|
|
19167
19144
|
_ref$classNames = _ref.classNames,
|
|
@@ -19177,7 +19154,7 @@
|
|
|
19177
19154
|
}, items.map(function (item) {
|
|
19178
19155
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
19179
19156
|
key: item.value,
|
|
19180
|
-
className: cx('ais-HierarchicalMenu-item', classNames.item, item.
|
|
19157
|
+
className: cx('ais-HierarchicalMenu-item', classNames.item, item.isRefined && cx('ais-HierarchicalMenu-item--selected', classNames.selectedItem), item.data && item.data.length > 0 && cx('ais-HierarchicalMenu-item--parent', classNames.parentItem))
|
|
19181
19158
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
19182
19159
|
className: cx('ais-HierarchicalMenu-link', classNames.link, item.isRefined && cx('ais-HierarchicalMenu-link--selected', classNames.selectedItemLink)),
|
|
19183
19160
|
href: createURL(item.value),
|
|
@@ -19213,7 +19190,7 @@
|
|
|
19213
19190
|
onToggleShowMore = _ref2.onToggleShowMore,
|
|
19214
19191
|
isShowingMore = _ref2.isShowingMore,
|
|
19215
19192
|
translations = _ref2.translations,
|
|
19216
|
-
props = _objectWithoutProperties$
|
|
19193
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$j);
|
|
19217
19194
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19218
19195
|
className: cx('ais-HierarchicalMenu', classNames.root, !hasItems && cx('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
19219
19196
|
}), /*#__PURE__*/React__default.createElement(HierarchicalList, {
|
|
@@ -19230,7 +19207,7 @@
|
|
|
19230
19207
|
}));
|
|
19231
19208
|
}
|
|
19232
19209
|
|
|
19233
|
-
var _excluded$
|
|
19210
|
+
var _excluded$k = ["attributes", "limit", "rootPath", "separator", "showMore", "showMoreLimit", "showParentLevel", "sortBy", "transformItems", "translations"];
|
|
19234
19211
|
function HierarchicalMenu$1(_ref) {
|
|
19235
19212
|
var attributes = _ref.attributes,
|
|
19236
19213
|
limit = _ref.limit,
|
|
@@ -19242,7 +19219,7 @@
|
|
|
19242
19219
|
sortBy = _ref.sortBy,
|
|
19243
19220
|
transformItems = _ref.transformItems,
|
|
19244
19221
|
translations = _ref.translations,
|
|
19245
|
-
props = _objectWithoutProperties$
|
|
19222
|
+
props = _objectWithoutProperties$c(_ref, _excluded$k);
|
|
19246
19223
|
var _useHierarchicalMenu = useHierarchicalMenu({
|
|
19247
19224
|
attributes: attributes,
|
|
19248
19225
|
limit: limit,
|
|
@@ -19282,7 +19259,7 @@
|
|
|
19282
19259
|
}));
|
|
19283
19260
|
}
|
|
19284
19261
|
|
|
19285
|
-
var _excluded$
|
|
19262
|
+
var _excluded$l = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
|
|
19286
19263
|
function HighlightPart(_ref) {
|
|
19287
19264
|
var classNames = _ref.classNames,
|
|
19288
19265
|
children = _ref.children,
|
|
@@ -19304,7 +19281,7 @@
|
|
|
19304
19281
|
separator = _ref2$separator === void 0 ? ', ' : _ref2$separator,
|
|
19305
19282
|
className = _ref2.className,
|
|
19306
19283
|
classNames = _ref2.classNames,
|
|
19307
|
-
props = _objectWithoutProperties$
|
|
19284
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$l);
|
|
19308
19285
|
return /*#__PURE__*/React__default.createElement("span", _extends$1({}, props, {
|
|
19309
19286
|
className: cx(classNames.root, className)
|
|
19310
19287
|
}), parts.map(function (part, partIndex) {
|
|
@@ -19325,11 +19302,11 @@
|
|
|
19325
19302
|
}));
|
|
19326
19303
|
}
|
|
19327
19304
|
|
|
19328
|
-
var _excluded$
|
|
19305
|
+
var _excluded$m = ["classNames"];
|
|
19329
19306
|
function Highlight(_ref) {
|
|
19330
19307
|
var _ref$classNames = _ref.classNames,
|
|
19331
19308
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
19332
|
-
props = _objectWithoutProperties$
|
|
19309
|
+
props = _objectWithoutProperties$c(_ref, _excluded$m);
|
|
19333
19310
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
19334
19311
|
classNames: {
|
|
19335
19312
|
root: cx('ais-Highlight', classNames.root),
|
|
@@ -19340,14 +19317,14 @@
|
|
|
19340
19317
|
}, props));
|
|
19341
19318
|
}
|
|
19342
19319
|
|
|
19343
|
-
var _excluded$
|
|
19320
|
+
var _excluded$n = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
19344
19321
|
function Highlight$1(_ref) {
|
|
19345
19322
|
var hit = _ref.hit,
|
|
19346
19323
|
attribute = _ref.attribute,
|
|
19347
19324
|
highlightedTagName = _ref.highlightedTagName,
|
|
19348
19325
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
19349
19326
|
separator = _ref.separator,
|
|
19350
|
-
props = _objectWithoutProperties$
|
|
19327
|
+
props = _objectWithoutProperties$c(_ref, _excluded$n);
|
|
19351
19328
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
19352
19329
|
var properties = Array.isArray(property) ? property : [property];
|
|
19353
19330
|
var parts = properties.map(function (singleValue) {
|
|
@@ -19361,7 +19338,7 @@
|
|
|
19361
19338
|
}));
|
|
19362
19339
|
}
|
|
19363
19340
|
|
|
19364
|
-
var _excluded$
|
|
19341
|
+
var _excluded$o = ["hits", "sendEvent", "hitComponent", "classNames"];
|
|
19365
19342
|
function DefaultHitComponent(_ref) {
|
|
19366
19343
|
var hit = _ref.hit;
|
|
19367
19344
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -19377,7 +19354,7 @@
|
|
|
19377
19354
|
HitComponent = _ref2$hitComponent === void 0 ? DefaultHitComponent : _ref2$hitComponent,
|
|
19378
19355
|
_ref2$classNames = _ref2.classNames,
|
|
19379
19356
|
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames,
|
|
19380
|
-
props = _objectWithoutProperties$
|
|
19357
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$o);
|
|
19381
19358
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19382
19359
|
className: cx('ais-Hits', classNames.root, hits.length === 0 && cx('ais-Hits--empty', classNames.emptyRoot), props.className)
|
|
19383
19360
|
}), /*#__PURE__*/React__default.createElement("ol", {
|
|
@@ -19399,11 +19376,11 @@
|
|
|
19399
19376
|
})));
|
|
19400
19377
|
}
|
|
19401
19378
|
|
|
19402
|
-
var _excluded$
|
|
19379
|
+
var _excluded$p = ["escapeHTML", "transformItems"];
|
|
19403
19380
|
function Hits$1(_ref) {
|
|
19404
19381
|
var escapeHTML = _ref.escapeHTML,
|
|
19405
19382
|
transformItems = _ref.transformItems,
|
|
19406
|
-
props = _objectWithoutProperties$
|
|
19383
|
+
props = _objectWithoutProperties$c(_ref, _excluded$p);
|
|
19407
19384
|
var _useHits = useHits({
|
|
19408
19385
|
escapeHTML: escapeHTML,
|
|
19409
19386
|
transformItems: transformItems
|
|
@@ -19419,14 +19396,14 @@
|
|
|
19419
19396
|
return /*#__PURE__*/React__default.createElement(Hits, _extends$1({}, props, uiProps));
|
|
19420
19397
|
}
|
|
19421
19398
|
|
|
19422
|
-
var _excluded$
|
|
19399
|
+
var _excluded$q = ["items", "onChange", "currentValue", "classNames"];
|
|
19423
19400
|
function HitsPerPage(_ref) {
|
|
19424
19401
|
var items = _ref.items,
|
|
19425
19402
|
_onChange = _ref.onChange,
|
|
19426
19403
|
currentValue = _ref.currentValue,
|
|
19427
19404
|
_ref$classNames = _ref.classNames,
|
|
19428
19405
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
19429
|
-
props = _objectWithoutProperties$
|
|
19406
|
+
props = _objectWithoutProperties$c(_ref, _excluded$q);
|
|
19430
19407
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19431
19408
|
className: cx('ais-HitsPerPage', classNames.root, props.className)
|
|
19432
19409
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -19444,11 +19421,11 @@
|
|
|
19444
19421
|
})));
|
|
19445
19422
|
}
|
|
19446
19423
|
|
|
19447
|
-
var _excluded$
|
|
19424
|
+
var _excluded$r = ["items", "transformItems"];
|
|
19448
19425
|
function HitsPerPage$1(_ref) {
|
|
19449
19426
|
var userItems = _ref.items,
|
|
19450
19427
|
transformItems = _ref.transformItems,
|
|
19451
|
-
props = _objectWithoutProperties$
|
|
19428
|
+
props = _objectWithoutProperties$c(_ref, _excluded$r);
|
|
19452
19429
|
var _useHitsPerPage = useHitsPerPage({
|
|
19453
19430
|
items: userItems,
|
|
19454
19431
|
transformItems: transformItems
|
|
@@ -19472,7 +19449,7 @@
|
|
|
19472
19449
|
return /*#__PURE__*/React__default.createElement(HitsPerPage, _extends$1({}, props, uiProps));
|
|
19473
19450
|
}
|
|
19474
19451
|
|
|
19475
|
-
var _excluded$
|
|
19452
|
+
var _excluded$s = ["hitComponent", "hits", "sendEvent", "isFirstPage", "isLastPage", "onShowPrevious", "onShowMore", "classNames", "translations"];
|
|
19476
19453
|
function DefaultHitComponent$1(_ref) {
|
|
19477
19454
|
var hit = _ref.hit;
|
|
19478
19455
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -19493,7 +19470,7 @@
|
|
|
19493
19470
|
_ref2$classNames = _ref2.classNames,
|
|
19494
19471
|
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames,
|
|
19495
19472
|
translations = _ref2.translations,
|
|
19496
|
-
props = _objectWithoutProperties$
|
|
19473
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$s);
|
|
19497
19474
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19498
19475
|
className: cx('ais-InfiniteHits', classNames.root, hits.length === 0 && cx('ais-InfiniteHits--empty', classNames.emptyRoot), props.className)
|
|
19499
19476
|
}), onShowPrevious && /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -19523,7 +19500,7 @@
|
|
|
19523
19500
|
}, translations.showMoreButtonText));
|
|
19524
19501
|
}
|
|
19525
19502
|
|
|
19526
|
-
var _excluded$
|
|
19503
|
+
var _excluded$t = ["showPrevious", "cache", "escapeHTML", "showPrevious", "transformItems", "translations"];
|
|
19527
19504
|
function InfiniteHits$1(_ref) {
|
|
19528
19505
|
var _ref$showPrevious = _ref.showPrevious,
|
|
19529
19506
|
shouldShowPrevious = _ref$showPrevious === void 0 ? true : _ref$showPrevious,
|
|
@@ -19532,7 +19509,7 @@
|
|
|
19532
19509
|
userShowPrevious = _ref.showPrevious,
|
|
19533
19510
|
transformItems = _ref.transformItems,
|
|
19534
19511
|
translations = _ref.translations,
|
|
19535
|
-
props = _objectWithoutProperties$
|
|
19512
|
+
props = _objectWithoutProperties$c(_ref, _excluded$t);
|
|
19536
19513
|
var _useInfiniteHits = useInfiniteHits({
|
|
19537
19514
|
cache: cache,
|
|
19538
19515
|
escapeHTML: escapeHTML,
|
|
@@ -19562,7 +19539,7 @@
|
|
|
19562
19539
|
return /*#__PURE__*/React__default.createElement(InfiniteHits, _extends$1({}, props, uiProps));
|
|
19563
19540
|
}
|
|
19564
19541
|
|
|
19565
|
-
var _excluded$
|
|
19542
|
+
var _excluded$u = ["items", "classNames", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "createURL", "onRefine", "translations"];
|
|
19566
19543
|
function Menu(_ref) {
|
|
19567
19544
|
var items = _ref.items,
|
|
19568
19545
|
_ref$classNames = _ref.classNames,
|
|
@@ -19574,7 +19551,7 @@
|
|
|
19574
19551
|
createURL = _ref.createURL,
|
|
19575
19552
|
onRefine = _ref.onRefine,
|
|
19576
19553
|
translations = _ref.translations,
|
|
19577
|
-
props = _objectWithoutProperties$
|
|
19554
|
+
props = _objectWithoutProperties$c(_ref, _excluded$u);
|
|
19578
19555
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19579
19556
|
className: cx('ais-Menu', classNames.root, items.length === 0 && cx('ais-Menu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
19580
19557
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -19604,7 +19581,7 @@
|
|
|
19604
19581
|
}));
|
|
19605
19582
|
}
|
|
19606
19583
|
|
|
19607
|
-
var _excluded$
|
|
19584
|
+
var _excluded$v = ["attribute", "limit", "showMore", "showMoreLimit", "sortBy", "transformItems", "translations"];
|
|
19608
19585
|
function Menu$1(_ref) {
|
|
19609
19586
|
var attribute = _ref.attribute,
|
|
19610
19587
|
limit = _ref.limit,
|
|
@@ -19613,7 +19590,7 @@
|
|
|
19613
19590
|
sortBy = _ref.sortBy,
|
|
19614
19591
|
transformItems = _ref.transformItems,
|
|
19615
19592
|
translations = _ref.translations,
|
|
19616
|
-
props = _objectWithoutProperties$
|
|
19593
|
+
props = _objectWithoutProperties$c(_ref, _excluded$v);
|
|
19617
19594
|
var _useMenu = useMenu({
|
|
19618
19595
|
attribute: attribute,
|
|
19619
19596
|
limit: limit,
|
|
@@ -19650,8 +19627,8 @@
|
|
|
19650
19627
|
}));
|
|
19651
19628
|
}
|
|
19652
19629
|
|
|
19653
|
-
var _excluded$
|
|
19654
|
-
_excluded2$
|
|
19630
|
+
var _excluded$w = ["pages", "currentPage", "nbPages", "isFirstPage", "isLastPage", "showFirst", "showPrevious", "showNext", "showLast", "createURL", "onNavigate", "translations", "classNames"],
|
|
19631
|
+
_excluded2$3 = ["isDisabled", "className", "classNames", "href", "onClick"];
|
|
19655
19632
|
function Pagination(_ref) {
|
|
19656
19633
|
var pages = _ref.pages,
|
|
19657
19634
|
currentPage = _ref.currentPage,
|
|
@@ -19671,7 +19648,7 @@
|
|
|
19671
19648
|
translations = _ref.translations,
|
|
19672
19649
|
_ref$classNames = _ref.classNames,
|
|
19673
19650
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
19674
|
-
props = _objectWithoutProperties$
|
|
19651
|
+
props = _objectWithoutProperties$c(_ref, _excluded$w);
|
|
19675
19652
|
var firstPageIndex = 0;
|
|
19676
19653
|
var previousPageIndex = currentPage - 1;
|
|
19677
19654
|
var nextPageIndex = currentPage + 1;
|
|
@@ -19742,7 +19719,7 @@
|
|
|
19742
19719
|
classNames = _ref2.classNames,
|
|
19743
19720
|
href = _ref2.href,
|
|
19744
19721
|
_onClick = _ref2.onClick,
|
|
19745
|
-
props = _objectWithoutProperties$
|
|
19722
|
+
props = _objectWithoutProperties$c(_ref2, _excluded2$3);
|
|
19746
19723
|
if (isDisabled) {
|
|
19747
19724
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
19748
19725
|
className: cx('ais-Pagination-item', classNames.item, 'ais-Pagination-item--disabled', classNames.disabledItem, className)
|
|
@@ -19765,7 +19742,7 @@
|
|
|
19765
19742
|
}, props)));
|
|
19766
19743
|
}
|
|
19767
19744
|
|
|
19768
|
-
var _excluded$
|
|
19745
|
+
var _excluded$x = ["showFirst", "showPrevious", "showNext", "showLast", "padding", "totalPages", "translations"];
|
|
19769
19746
|
function Pagination$1(_ref) {
|
|
19770
19747
|
var showFirst = _ref.showFirst,
|
|
19771
19748
|
showPrevious = _ref.showPrevious,
|
|
@@ -19774,7 +19751,7 @@
|
|
|
19774
19751
|
padding = _ref.padding,
|
|
19775
19752
|
totalPages = _ref.totalPages,
|
|
19776
19753
|
translations = _ref.translations,
|
|
19777
|
-
props = _objectWithoutProperties$
|
|
19754
|
+
props = _objectWithoutProperties$c(_ref, _excluded$x);
|
|
19778
19755
|
var _usePagination = usePagination({
|
|
19779
19756
|
padding: padding,
|
|
19780
19757
|
totalPages: totalPages
|
|
@@ -19823,14 +19800,14 @@
|
|
|
19823
19800
|
}));
|
|
19824
19801
|
}
|
|
19825
19802
|
|
|
19826
|
-
var _excluded$
|
|
19803
|
+
var _excluded$y = ["classNames", "url", "theme"];
|
|
19827
19804
|
function PoweredBy(_ref) {
|
|
19828
19805
|
var _ref$classNames = _ref.classNames,
|
|
19829
19806
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
19830
19807
|
url = _ref.url,
|
|
19831
19808
|
_ref$theme = _ref.theme,
|
|
19832
19809
|
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
|
|
19833
|
-
props = _objectWithoutProperties$
|
|
19810
|
+
props = _objectWithoutProperties$c(_ref, _excluded$y);
|
|
19834
19811
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
19835
19812
|
className: cx('ais-PoweredBy', theme === 'dark' ? cx('ais-PoweredBy--dark', classNames.dark) : cx('ais-PoweredBy--light', classNames.light), classNames.root, props.className)
|
|
19836
19813
|
}), /*#__PURE__*/React__default.createElement("a", {
|
|
@@ -19860,7 +19837,7 @@
|
|
|
19860
19837
|
return /*#__PURE__*/React__default.createElement(PoweredBy, _extends$1({}, props, uiProps));
|
|
19861
19838
|
}
|
|
19862
19839
|
|
|
19863
|
-
var _excluded$
|
|
19840
|
+
var _excluded$z = ["classNames", "range", "start", "step", "disabled", "onSubmit", "translations"];
|
|
19864
19841
|
// if the default value is undefined, React considers the component uncontrolled initially, which we don't want 0 or NaN as the default value
|
|
19865
19842
|
var unsetNumberInputValue = '';
|
|
19866
19843
|
|
|
@@ -19885,7 +19862,7 @@
|
|
|
19885
19862
|
disabled = _ref.disabled,
|
|
19886
19863
|
_onSubmit = _ref.onSubmit,
|
|
19887
19864
|
translations = _ref.translations,
|
|
19888
|
-
props = _objectWithoutProperties$
|
|
19865
|
+
props = _objectWithoutProperties$c(_ref, _excluded$z);
|
|
19889
19866
|
var values = {
|
|
19890
19867
|
min: minValue !== -Infinity && minValue !== min ? minValue : unsetNumberInputValue,
|
|
19891
19868
|
max: maxValue !== Infinity && maxValue !== max ? maxValue : unsetNumberInputValue
|
|
@@ -19965,14 +19942,14 @@
|
|
|
19965
19942
|
}, translations.submitButtonText)));
|
|
19966
19943
|
}
|
|
19967
19944
|
|
|
19968
|
-
var _excluded$
|
|
19945
|
+
var _excluded$A = ["attribute", "min", "max", "precision", "translations"];
|
|
19969
19946
|
function RangeInput$1(_ref) {
|
|
19970
19947
|
var attribute = _ref.attribute,
|
|
19971
19948
|
min = _ref.min,
|
|
19972
19949
|
max = _ref.max,
|
|
19973
19950
|
precision = _ref.precision,
|
|
19974
19951
|
translations = _ref.translations,
|
|
19975
|
-
props = _objectWithoutProperties$
|
|
19952
|
+
props = _objectWithoutProperties$c(_ref, _excluded$A);
|
|
19976
19953
|
var _useRange = useRange({
|
|
19977
19954
|
attribute: attribute,
|
|
19978
19955
|
min: min,
|
|
@@ -20000,7 +19977,7 @@
|
|
|
20000
19977
|
return /*#__PURE__*/React__default.createElement(RangeInput, _extends$1({}, props, uiProps));
|
|
20001
19978
|
}
|
|
20002
19979
|
|
|
20003
|
-
var _excluded$
|
|
19980
|
+
var _excluded$B = ["canRefine", "items", "onRefine", "query", "searchBox", "noResults", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "className", "classNames", "translations"];
|
|
20004
19981
|
function RefinementList$1(_ref) {
|
|
20005
19982
|
var canRefine = _ref.canRefine,
|
|
20006
19983
|
items = _ref.items,
|
|
@@ -20016,7 +19993,7 @@
|
|
|
20016
19993
|
_ref$classNames = _ref.classNames,
|
|
20017
19994
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
20018
19995
|
translations = _ref.translations,
|
|
20019
|
-
props = _objectWithoutProperties$
|
|
19996
|
+
props = _objectWithoutProperties$c(_ref, _excluded$B);
|
|
20020
19997
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
20021
19998
|
className: cx('ais-RefinementList', classNames.root, !canRefine && cx('ais-RefinementList--noRefinement', classNames.noRefinementRoot), className)
|
|
20022
19999
|
}), searchBox && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -20055,7 +20032,7 @@
|
|
|
20055
20032
|
}));
|
|
20056
20033
|
}
|
|
20057
20034
|
|
|
20058
|
-
var _excluded$
|
|
20035
|
+
var _excluded$C = ["formRef", "inputRef", "isSearchStalled", "onChange", "onReset", "onSubmit", "placeholder", "value", "autoFocus", "resetIconComponent", "submitIconComponent", "loadingIconComponent", "classNames", "translations"];
|
|
20059
20036
|
var _ref2 = /*#__PURE__*/React__default.createElement("path", {
|
|
20060
20037
|
d: "M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"
|
|
20061
20038
|
});
|
|
@@ -20135,7 +20112,7 @@
|
|
|
20135
20112
|
_ref7$classNames = _ref7.classNames,
|
|
20136
20113
|
classNames = _ref7$classNames === void 0 ? {} : _ref7$classNames,
|
|
20137
20114
|
translations = _ref7.translations,
|
|
20138
|
-
props = _objectWithoutProperties$
|
|
20115
|
+
props = _objectWithoutProperties$c(_ref7, _excluded$C);
|
|
20139
20116
|
function handleSubmit(event) {
|
|
20140
20117
|
event.preventDefault();
|
|
20141
20118
|
event.stopPropagation();
|
|
@@ -20177,6 +20154,7 @@
|
|
|
20177
20154
|
type: "search",
|
|
20178
20155
|
value: value,
|
|
20179
20156
|
onChange: onChange,
|
|
20157
|
+
onCompositionEnd: onChange,
|
|
20180
20158
|
autoFocus: autoFocus
|
|
20181
20159
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
20182
20160
|
className: cx('ais-SearchBox-submit', classNames.submit),
|
|
@@ -20201,7 +20179,7 @@
|
|
|
20201
20179
|
}))));
|
|
20202
20180
|
}
|
|
20203
20181
|
|
|
20204
|
-
var _excluded$
|
|
20182
|
+
var _excluded$D = ["searchable", "searchablePlaceholder", "attribute", "operator", "limit", "showMore", "showMoreLimit", "sortBy", "escapeFacetValues", "transformItems", "translations"];
|
|
20205
20183
|
function RefinementList$2(_ref) {
|
|
20206
20184
|
var searchable = _ref.searchable,
|
|
20207
20185
|
searchablePlaceholder = _ref.searchablePlaceholder,
|
|
@@ -20214,7 +20192,7 @@
|
|
|
20214
20192
|
escapeFacetValues = _ref.escapeFacetValues,
|
|
20215
20193
|
transformItems = _ref.transformItems,
|
|
20216
20194
|
translations = _ref.translations,
|
|
20217
|
-
props = _objectWithoutProperties$
|
|
20195
|
+
props = _objectWithoutProperties$c(_ref, _excluded$D);
|
|
20218
20196
|
var _useRefinementList = useRefinementList({
|
|
20219
20197
|
attribute: attribute,
|
|
20220
20198
|
operator: operator,
|
|
@@ -20241,15 +20219,19 @@
|
|
|
20241
20219
|
setInputValue = _useState2[1];
|
|
20242
20220
|
var inputRef = React.useRef(null);
|
|
20243
20221
|
function setQuery(newQuery) {
|
|
20222
|
+
var compositionComplete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
20244
20223
|
setInputValue(newQuery);
|
|
20245
|
-
|
|
20224
|
+
if (compositionComplete) {
|
|
20225
|
+
searchForItems(newQuery);
|
|
20226
|
+
}
|
|
20246
20227
|
}
|
|
20247
20228
|
function onRefine(item) {
|
|
20248
20229
|
refine(item.value);
|
|
20249
20230
|
setQuery('');
|
|
20250
20231
|
}
|
|
20251
20232
|
function onChange(event) {
|
|
20252
|
-
|
|
20233
|
+
var compositionComplete = event.type === 'compositionend' || !event.nativeEvent.isComposing;
|
|
20234
|
+
setQuery(event.currentTarget.value, compositionComplete);
|
|
20253
20235
|
}
|
|
20254
20236
|
function onReset() {
|
|
20255
20237
|
setQuery('');
|
|
@@ -20299,13 +20281,13 @@
|
|
|
20299
20281
|
}));
|
|
20300
20282
|
}
|
|
20301
20283
|
|
|
20302
|
-
var _excluded$
|
|
20284
|
+
var _excluded$E = ["queryHook", "searchAsYouType", "translations"];
|
|
20303
20285
|
function SearchBox$1(_ref) {
|
|
20304
20286
|
var queryHook = _ref.queryHook,
|
|
20305
20287
|
_ref$searchAsYouType = _ref.searchAsYouType,
|
|
20306
20288
|
searchAsYouType = _ref$searchAsYouType === void 0 ? true : _ref$searchAsYouType,
|
|
20307
20289
|
translations = _ref.translations,
|
|
20308
|
-
props = _objectWithoutProperties$
|
|
20290
|
+
props = _objectWithoutProperties$c(_ref, _excluded$E);
|
|
20309
20291
|
var _useSearchBox = useSearchBox({
|
|
20310
20292
|
queryHook: queryHook
|
|
20311
20293
|
}, {
|
|
@@ -20320,8 +20302,9 @@
|
|
|
20320
20302
|
setInputValue = _useState2[1];
|
|
20321
20303
|
var inputRef = React.useRef(null);
|
|
20322
20304
|
function setQuery(newQuery) {
|
|
20305
|
+
var compositionComplete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
20323
20306
|
setInputValue(newQuery);
|
|
20324
|
-
if (searchAsYouType) {
|
|
20307
|
+
if (searchAsYouType && compositionComplete) {
|
|
20325
20308
|
refine(newQuery);
|
|
20326
20309
|
}
|
|
20327
20310
|
}
|
|
@@ -20332,7 +20315,8 @@
|
|
|
20332
20315
|
}
|
|
20333
20316
|
}
|
|
20334
20317
|
function onChange(event) {
|
|
20335
|
-
|
|
20318
|
+
var compositionComplete = event.type === 'compositionend' || !event.nativeEvent.isComposing;
|
|
20319
|
+
setQuery(event.currentTarget.value, compositionComplete);
|
|
20336
20320
|
}
|
|
20337
20321
|
function onSubmit(event) {
|
|
20338
20322
|
if (!searchAsYouType) {
|
|
@@ -20365,11 +20349,11 @@
|
|
|
20365
20349
|
return /*#__PURE__*/React__default.createElement(SearchBox, _extends$1({}, props, uiProps));
|
|
20366
20350
|
}
|
|
20367
20351
|
|
|
20368
|
-
var _excluded$
|
|
20352
|
+
var _excluded$F = ["classNames"];
|
|
20369
20353
|
function Snippet(_ref) {
|
|
20370
20354
|
var _ref$classNames = _ref.classNames,
|
|
20371
20355
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
20372
|
-
props = _objectWithoutProperties$
|
|
20356
|
+
props = _objectWithoutProperties$c(_ref, _excluded$F);
|
|
20373
20357
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
20374
20358
|
classNames: {
|
|
20375
20359
|
root: cx('ais-Snippet', classNames.root),
|
|
@@ -20380,14 +20364,14 @@
|
|
|
20380
20364
|
}, props));
|
|
20381
20365
|
}
|
|
20382
20366
|
|
|
20383
|
-
var _excluded$
|
|
20367
|
+
var _excluded$G = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
20384
20368
|
function Snippet$1(_ref) {
|
|
20385
20369
|
var hit = _ref.hit,
|
|
20386
20370
|
attribute = _ref.attribute,
|
|
20387
20371
|
highlightedTagName = _ref.highlightedTagName,
|
|
20388
20372
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
20389
20373
|
separator = _ref.separator,
|
|
20390
|
-
props = _objectWithoutProperties$
|
|
20374
|
+
props = _objectWithoutProperties$c(_ref, _excluded$G);
|
|
20391
20375
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
20392
20376
|
var properties = Array.isArray(property) ? property : [property];
|
|
20393
20377
|
var parts = properties.map(function (singleValue) {
|
|
@@ -20401,7 +20385,7 @@
|
|
|
20401
20385
|
}));
|
|
20402
20386
|
}
|
|
20403
20387
|
|
|
20404
|
-
var _excluded$
|
|
20388
|
+
var _excluded$H = ["items", "value", "onChange", "classNames"];
|
|
20405
20389
|
function SortBy(_ref) {
|
|
20406
20390
|
var items = _ref.items,
|
|
20407
20391
|
value = _ref.value,
|
|
@@ -20409,7 +20393,7 @@
|
|
|
20409
20393
|
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
20410
20394
|
_ref$classNames = _ref.classNames,
|
|
20411
20395
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
20412
|
-
props = _objectWithoutProperties$
|
|
20396
|
+
props = _objectWithoutProperties$c(_ref, _excluded$H);
|
|
20413
20397
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
20414
20398
|
className: cx('ais-SortBy', classNames.root, props.className)
|
|
20415
20399
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -20428,11 +20412,11 @@
|
|
|
20428
20412
|
})));
|
|
20429
20413
|
}
|
|
20430
20414
|
|
|
20431
|
-
var _excluded$
|
|
20415
|
+
var _excluded$I = ["items", "transformItems"];
|
|
20432
20416
|
function SortBy$1(_ref) {
|
|
20433
20417
|
var items = _ref.items,
|
|
20434
20418
|
transformItems = _ref.transformItems,
|
|
20435
|
-
props = _objectWithoutProperties$
|
|
20419
|
+
props = _objectWithoutProperties$c(_ref, _excluded$I);
|
|
20436
20420
|
var _useSortBy = useSortBy({
|
|
20437
20421
|
items: items,
|
|
20438
20422
|
transformItems: transformItems
|
|
@@ -20450,7 +20434,7 @@
|
|
|
20450
20434
|
return /*#__PURE__*/React__default.createElement(SortBy, _extends$1({}, props, uiProps));
|
|
20451
20435
|
}
|
|
20452
20436
|
|
|
20453
|
-
var _excluded$
|
|
20437
|
+
var _excluded$J = ["classNames", "nbHits", "processingTimeMS", "nbSortedHits", "areHitsSorted", "translations"];
|
|
20454
20438
|
function Stats(_ref) {
|
|
20455
20439
|
var _ref$classNames = _ref.classNames,
|
|
20456
20440
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -20459,7 +20443,7 @@
|
|
|
20459
20443
|
nbSortedHits = _ref.nbSortedHits,
|
|
20460
20444
|
areHitsSorted = _ref.areHitsSorted,
|
|
20461
20445
|
translations = _ref.translations,
|
|
20462
|
-
props = _objectWithoutProperties$
|
|
20446
|
+
props = _objectWithoutProperties$c(_ref, _excluded$J);
|
|
20463
20447
|
var translationOptions = {
|
|
20464
20448
|
nbHits: nbHits,
|
|
20465
20449
|
processingTimeMS: processingTimeMS,
|
|
@@ -20473,10 +20457,10 @@
|
|
|
20473
20457
|
}, translations.rootElementText(translationOptions)));
|
|
20474
20458
|
}
|
|
20475
20459
|
|
|
20476
|
-
var _excluded$
|
|
20460
|
+
var _excluded$K = ["translations"];
|
|
20477
20461
|
function Stats$1(_ref) {
|
|
20478
20462
|
var translations = _ref.translations,
|
|
20479
|
-
props = _objectWithoutProperties$
|
|
20463
|
+
props = _objectWithoutProperties$c(_ref, _excluded$K);
|
|
20480
20464
|
var _useStats = useStats(undefined, {
|
|
20481
20465
|
$$widgetType: 'ais.stats'
|
|
20482
20466
|
}),
|
|
@@ -20526,14 +20510,14 @@
|
|
|
20526
20510
|
return '';
|
|
20527
20511
|
}
|
|
20528
20512
|
|
|
20529
|
-
var _excluded$
|
|
20513
|
+
var _excluded$L = ["classNames", "checked", "onChange", "label"];
|
|
20530
20514
|
function ToggleRefinement(_ref) {
|
|
20531
20515
|
var _ref$classNames = _ref.classNames,
|
|
20532
20516
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
20533
20517
|
checked = _ref.checked,
|
|
20534
20518
|
_onChange = _ref.onChange,
|
|
20535
20519
|
label = _ref.label,
|
|
20536
|
-
props = _objectWithoutProperties$
|
|
20520
|
+
props = _objectWithoutProperties$c(_ref, _excluded$L);
|
|
20537
20521
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
20538
20522
|
className: cx('ais-ToggleRefinement', classNames.root, props.className)
|
|
20539
20523
|
}), /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -20550,12 +20534,12 @@
|
|
|
20550
20534
|
}, label)));
|
|
20551
20535
|
}
|
|
20552
20536
|
|
|
20553
|
-
var _excluded$
|
|
20537
|
+
var _excluded$M = ["attribute", "on", "off"];
|
|
20554
20538
|
function ToggleRefinement$1(_ref) {
|
|
20555
20539
|
var attribute = _ref.attribute,
|
|
20556
20540
|
on = _ref.on,
|
|
20557
20541
|
off = _ref.off,
|
|
20558
|
-
props = _objectWithoutProperties$
|
|
20542
|
+
props = _objectWithoutProperties$c(_ref, _excluded$M);
|
|
20559
20543
|
var _useToggleRefinement = useToggleRefinement({
|
|
20560
20544
|
attribute: attribute,
|
|
20561
20545
|
on: on,
|