react-instantsearch 7.19.0 → 7.20.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/ReverseHighlight.js +27 -0
- package/dist/cjs/widgets/Autocomplete.js +87 -46
- package/dist/cjs/widgets/ReverseHighlight.js +46 -0
- package/dist/cjs/widgets/index.js +11 -0
- package/dist/cjs/widgets/index.umd.js +12 -0
- package/dist/es/ui/ReverseHighlight.d.ts +7 -0
- package/dist/es/ui/ReverseHighlight.js +20 -0
- package/dist/es/widgets/Autocomplete.d.ts +11 -1
- package/dist/es/widgets/Autocomplete.js +87 -46
- package/dist/es/widgets/ReverseHighlight.d.ts +9 -0
- package/dist/es/widgets/ReverseHighlight.js +39 -0
- package/dist/es/widgets/index.d.ts +1 -0
- package/dist/es/widgets/index.js +1 -0
- package/dist/es/widgets/index.umd.d.ts +1 -0
- package/dist/es/widgets/index.umd.js +1 -0
- package/dist/umd/ReactInstantSearch.js +304 -163
- 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 +5 -5
|
@@ -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.20.0';
|
|
11
11
|
|
|
12
12
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
13
13
|
//
|
|
@@ -10516,6 +10516,12 @@
|
|
|
10516
10516
|
helper: helper
|
|
10517
10517
|
})));
|
|
10518
10518
|
},
|
|
10519
|
+
scheduleLocalSearch: defer(function () {
|
|
10520
|
+
if (isolated) {
|
|
10521
|
+
var _helper2;
|
|
10522
|
+
(_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.search();
|
|
10523
|
+
}
|
|
10524
|
+
}),
|
|
10519
10525
|
getWidgets: function getWidgets() {
|
|
10520
10526
|
return localWidgets;
|
|
10521
10527
|
},
|
|
@@ -10581,8 +10587,7 @@
|
|
|
10581
10587
|
}
|
|
10582
10588
|
});
|
|
10583
10589
|
if (isolated) {
|
|
10584
|
-
|
|
10585
|
-
(_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.search();
|
|
10590
|
+
this.scheduleLocalSearch();
|
|
10586
10591
|
} else {
|
|
10587
10592
|
localInstantSearchInstance.scheduleSearch();
|
|
10588
10593
|
}
|
|
@@ -10661,8 +10666,7 @@
|
|
|
10661
10666
|
helper.recommendState = cleanedRecommendState;
|
|
10662
10667
|
if (localWidgets.length) {
|
|
10663
10668
|
if (isolated) {
|
|
10664
|
-
|
|
10665
|
-
(_helper3 = helper) === null || _helper3 === void 0 ? void 0 : _helper3.search();
|
|
10669
|
+
this.scheduleLocalSearch();
|
|
10666
10670
|
} else {
|
|
10667
10671
|
localInstantSearchInstance.scheduleSearch();
|
|
10668
10672
|
}
|
|
@@ -10906,7 +10910,7 @@
|
|
|
10906
10910
|
},
|
|
10907
10911
|
dispose: function dispose() {
|
|
10908
10912
|
var _this5 = this,
|
|
10909
|
-
|
|
10913
|
+
_helper3,
|
|
10910
10914
|
_derivedHelper3;
|
|
10911
10915
|
localWidgets.forEach(function (widget) {
|
|
10912
10916
|
if (widget.dispose && helper) {
|
|
@@ -10926,7 +10930,7 @@
|
|
|
10926
10930
|
});
|
|
10927
10931
|
localInstantSearchInstance = null;
|
|
10928
10932
|
localParent = null;
|
|
10929
|
-
(
|
|
10933
|
+
(_helper3 = helper) === null || _helper3 === void 0 ? void 0 : _helper3.removeAllListeners();
|
|
10930
10934
|
helper = null;
|
|
10931
10935
|
(_derivedHelper3 = derivedHelper) === null || _derivedHelper3 === void 0 ? void 0 : _derivedHelper3.detach();
|
|
10932
10936
|
derivedHelper = null;
|
|
@@ -13347,7 +13351,7 @@
|
|
|
13347
13351
|
};
|
|
13348
13352
|
}
|
|
13349
13353
|
|
|
13350
|
-
var version$3 = '4.
|
|
13354
|
+
var version$3 = '4.84.0';
|
|
13351
13355
|
|
|
13352
13356
|
function _typeof$q(o) {
|
|
13353
13357
|
"@babel/helpers - typeof";
|
|
@@ -21177,6 +21181,7 @@
|
|
|
21177
21181
|
var createElement = _ref.createElement;
|
|
21178
21182
|
return function AutocompleteRecentSearch(_ref2) {
|
|
21179
21183
|
var item = _ref2.item,
|
|
21184
|
+
children = _ref2.children,
|
|
21180
21185
|
onSelect = _ref2.onSelect,
|
|
21181
21186
|
onRemoveRecentSearch = _ref2.onRemoveRecentSearch,
|
|
21182
21187
|
_ref2$classNames = _ref2.classNames,
|
|
@@ -21192,7 +21197,7 @@
|
|
|
21192
21197
|
createElement: createElement
|
|
21193
21198
|
})), createElement("div", {
|
|
21194
21199
|
className: cx('ais-AutocompleteItemContentBody', 'ais-AutocompleteRecentSearchItemContentBody', classNames.content)
|
|
21195
|
-
},
|
|
21200
|
+
}, children)), createElement("div", {
|
|
21196
21201
|
className: cx('ais-AutocompleteItemActions', 'ais-AutocompleteRecentSearchItemActions', classNames.actions)
|
|
21197
21202
|
}, createElement("button", {
|
|
21198
21203
|
className: cx('ais-AutocompleteItemActionButton', 'ais-AutocompleteRecentSearchItemDeleteButton', classNames.deleteButton),
|
|
@@ -21214,6 +21219,7 @@
|
|
|
21214
21219
|
onClear = _ref2.onClear,
|
|
21215
21220
|
query = _ref2.query,
|
|
21216
21221
|
isSearchStalled = _ref2.isSearchStalled;
|
|
21222
|
+
var inputRef = inputProps.ref;
|
|
21217
21223
|
return createElement("form", {
|
|
21218
21224
|
className: "ais-AutocompleteForm",
|
|
21219
21225
|
action: "",
|
|
@@ -21221,6 +21227,10 @@
|
|
|
21221
21227
|
role: "search",
|
|
21222
21228
|
onSubmit: function onSubmit(e) {
|
|
21223
21229
|
return e.preventDefault();
|
|
21230
|
+
},
|
|
21231
|
+
onReset: function onReset() {
|
|
21232
|
+
var _inputRef$current;
|
|
21233
|
+
return (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
21224
21234
|
}
|
|
21225
21235
|
}, createElement("div", {
|
|
21226
21236
|
className: "ais-AutocompleteInputWrapperPrefix"
|
|
@@ -21272,7 +21282,7 @@
|
|
|
21272
21282
|
function createAutocompleteSuggestionComponent(_ref) {
|
|
21273
21283
|
var createElement = _ref.createElement;
|
|
21274
21284
|
return function AutocompleteSuggestion(_ref2) {
|
|
21275
|
-
var
|
|
21285
|
+
var children = _ref2.children,
|
|
21276
21286
|
onSelect = _ref2.onSelect,
|
|
21277
21287
|
_ref2$classNames = _ref2.classNames,
|
|
21278
21288
|
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames;
|
|
@@ -21287,7 +21297,7 @@
|
|
|
21287
21297
|
createElement: createElement
|
|
21288
21298
|
})), createElement("div", {
|
|
21289
21299
|
className: cx('ais-AutocompleteItemContentBody', 'ais-AutocompleteSuggestionItemContentBody', classNames.content)
|
|
21290
|
-
},
|
|
21300
|
+
}, children)));
|
|
21291
21301
|
};
|
|
21292
21302
|
}
|
|
21293
21303
|
|
|
@@ -21303,6 +21313,7 @@
|
|
|
21303
21313
|
onRefine = _ref2.onRefine,
|
|
21304
21314
|
globalOnSelect = _ref2.onSelect;
|
|
21305
21315
|
var getElementId = createGetElementId(useId());
|
|
21316
|
+
var inputRef = useRef(null);
|
|
21306
21317
|
var rootRef = useRef(null);
|
|
21307
21318
|
var _useState = useState(false),
|
|
21308
21319
|
_useState2 = _slicedToArray$h(_useState, 2),
|
|
@@ -21334,7 +21345,7 @@
|
|
|
21334
21345
|
document.body.removeEventListener('click', onBodyClick);
|
|
21335
21346
|
};
|
|
21336
21347
|
}, [rootRef]);
|
|
21337
|
-
var
|
|
21348
|
+
var getNextActiveDescendant = function getNextActiveDescendant(key) {
|
|
21338
21349
|
switch (key) {
|
|
21339
21350
|
case 'ArrowLeft':
|
|
21340
21351
|
case 'ArrowUp':
|
|
@@ -21353,11 +21364,21 @@
|
|
|
21353
21364
|
}
|
|
21354
21365
|
};
|
|
21355
21366
|
var submit = function submit() {
|
|
21356
|
-
var
|
|
21357
|
-
|
|
21358
|
-
if (
|
|
21367
|
+
var _override$activeDesce;
|
|
21368
|
+
var override = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21369
|
+
if (isOpen) {
|
|
21370
|
+
setIsOpen(false);
|
|
21371
|
+
} else {
|
|
21372
|
+
var _inputRef$current;
|
|
21373
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.blur();
|
|
21374
|
+
}
|
|
21375
|
+
var actualDescendant = (_override$activeDesce = override.activeDescendant) !== null && _override$activeDesce !== void 0 ? _override$activeDesce : activeDescendant;
|
|
21376
|
+
if (!actualDescendant && override.query) {
|
|
21377
|
+
onRefine(override.query);
|
|
21378
|
+
}
|
|
21379
|
+
if (actualDescendant && items.has(actualDescendant)) {
|
|
21359
21380
|
var _getQuery;
|
|
21360
|
-
var _ref3 = items.get(
|
|
21381
|
+
var _ref3 = items.get(actualDescendant),
|
|
21361
21382
|
_item = _ref3.item,
|
|
21362
21383
|
_ref3$config = _ref3.config,
|
|
21363
21384
|
indexOnSelect = _ref3$config.onSelect,
|
|
@@ -21379,6 +21400,7 @@
|
|
|
21379
21400
|
getInputProps: function getInputProps() {
|
|
21380
21401
|
return {
|
|
21381
21402
|
id: getElementId('input'),
|
|
21403
|
+
ref: inputRef,
|
|
21382
21404
|
role: 'combobox',
|
|
21383
21405
|
'aria-autocomplete': 'list',
|
|
21384
21406
|
'aria-expanded': isOpen,
|
|
@@ -21389,33 +21411,42 @@
|
|
|
21389
21411
|
return setIsOpen(true);
|
|
21390
21412
|
},
|
|
21391
21413
|
onKeyDown: function onKeyDown(event) {
|
|
21392
|
-
if (event.key === 'Escape') {
|
|
21393
|
-
setActiveDescendant(undefined);
|
|
21394
|
-
setIsOpen(false);
|
|
21395
|
-
return;
|
|
21396
|
-
}
|
|
21397
21414
|
switch (event.key) {
|
|
21415
|
+
case 'Escape':
|
|
21416
|
+
{
|
|
21417
|
+
if (isOpen) {
|
|
21418
|
+
setIsOpen(false);
|
|
21419
|
+
event.preventDefault();
|
|
21420
|
+
} else {
|
|
21421
|
+
setActiveDescendant(undefined);
|
|
21422
|
+
}
|
|
21423
|
+
break;
|
|
21424
|
+
}
|
|
21398
21425
|
case 'ArrowLeft':
|
|
21399
21426
|
case 'ArrowUp':
|
|
21400
21427
|
case 'ArrowRight':
|
|
21401
21428
|
case 'ArrowDown':
|
|
21402
21429
|
{
|
|
21403
21430
|
var _document$getElementB;
|
|
21404
|
-
|
|
21405
|
-
|
|
21406
|
-
(
|
|
21431
|
+
setIsOpen(true);
|
|
21432
|
+
var nextActiveDescendant = getNextActiveDescendant(event.key);
|
|
21433
|
+
setActiveDescendant(nextActiveDescendant);
|
|
21434
|
+
(_document$getElementB = document.getElementById(nextActiveDescendant)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.scrollIntoView(false);
|
|
21407
21435
|
event.preventDefault();
|
|
21408
21436
|
break;
|
|
21409
21437
|
}
|
|
21410
21438
|
case 'Enter':
|
|
21411
21439
|
{
|
|
21412
|
-
submit(
|
|
21440
|
+
submit({
|
|
21441
|
+
query: event.target.value
|
|
21442
|
+
});
|
|
21413
21443
|
break;
|
|
21414
21444
|
}
|
|
21415
21445
|
case 'Tab':
|
|
21416
21446
|
setIsOpen(false);
|
|
21417
21447
|
break;
|
|
21418
21448
|
default:
|
|
21449
|
+
setIsOpen(true);
|
|
21419
21450
|
return;
|
|
21420
21451
|
}
|
|
21421
21452
|
},
|
|
@@ -21443,7 +21474,9 @@
|
|
|
21443
21474
|
role: 'row',
|
|
21444
21475
|
'aria-selected': id === activeDescendant,
|
|
21445
21476
|
onSelect: function onSelect() {
|
|
21446
|
-
return submit(
|
|
21477
|
+
return submit({
|
|
21478
|
+
activeDescendant: id
|
|
21479
|
+
});
|
|
21447
21480
|
}
|
|
21448
21481
|
};
|
|
21449
21482
|
},
|
|
@@ -21584,7 +21617,13 @@
|
|
|
21584
21617
|
return {
|
|
21585
21618
|
objectID: value,
|
|
21586
21619
|
query: value,
|
|
21587
|
-
__indexName: 'recent-searches'
|
|
21620
|
+
__indexName: 'recent-searches',
|
|
21621
|
+
_highlightResult: getHighlightedAttribute({
|
|
21622
|
+
item: {
|
|
21623
|
+
query: value
|
|
21624
|
+
},
|
|
21625
|
+
query: query || ''
|
|
21626
|
+
})
|
|
21588
21627
|
};
|
|
21589
21628
|
});
|
|
21590
21629
|
var indicesForPropGetters = _toConsumableArray$9(indices);
|
|
@@ -21620,6 +21659,24 @@
|
|
|
21620
21659
|
return false;
|
|
21621
21660
|
}
|
|
21622
21661
|
}
|
|
21662
|
+
function getHighlightedAttribute(_ref3) {
|
|
21663
|
+
var item = _ref3.item,
|
|
21664
|
+
query = _ref3.query;
|
|
21665
|
+
if (!query.trim().length) {
|
|
21666
|
+
return {
|
|
21667
|
+
query: {
|
|
21668
|
+
matchLevel: 'none'
|
|
21669
|
+
}
|
|
21670
|
+
};
|
|
21671
|
+
}
|
|
21672
|
+
return {
|
|
21673
|
+
query: {
|
|
21674
|
+
value: item.query.replace(new RegExp(query.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'), 'gi'), function (match) {
|
|
21675
|
+
return "<mark>".concat(match, "</mark>");
|
|
21676
|
+
})
|
|
21677
|
+
}
|
|
21678
|
+
};
|
|
21679
|
+
}
|
|
21623
21680
|
function getLocalStorage() {
|
|
21624
21681
|
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LOCAL_STORAGE_KEY;
|
|
21625
21682
|
if (!isLocalStorageSupported()) {
|
|
@@ -21644,10 +21701,10 @@
|
|
|
21644
21701
|
}
|
|
21645
21702
|
};
|
|
21646
21703
|
}
|
|
21647
|
-
function createStorage(
|
|
21648
|
-
var
|
|
21649
|
-
limit =
|
|
21650
|
-
storageKey =
|
|
21704
|
+
function createStorage(_ref4) {
|
|
21705
|
+
var _ref4$limit = _ref4.limit,
|
|
21706
|
+
limit = _ref4$limit === void 0 ? 5 : _ref4$limit,
|
|
21707
|
+
storageKey = _ref4.storageKey;
|
|
21651
21708
|
var storage = getLocalStorage(storageKey);
|
|
21652
21709
|
var updateListener = null;
|
|
21653
21710
|
return {
|
|
@@ -22434,8 +22491,56 @@
|
|
|
22434
22491
|
});
|
|
22435
22492
|
}
|
|
22436
22493
|
|
|
22437
|
-
var
|
|
22438
|
-
|
|
22494
|
+
var InternalHighlight = createHighlightComponent({
|
|
22495
|
+
createElement: React.createElement,
|
|
22496
|
+
Fragment: React.Fragment
|
|
22497
|
+
});
|
|
22498
|
+
|
|
22499
|
+
var _excluded$m = ["classNames"];
|
|
22500
|
+
function ReverseHighlight(_ref) {
|
|
22501
|
+
var _ref$classNames = _ref.classNames,
|
|
22502
|
+
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22503
|
+
props = _objectWithoutProperties$c(_ref, _excluded$m);
|
|
22504
|
+
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
22505
|
+
classNames: {
|
|
22506
|
+
root: cx('ais-ReverseHighlight', classNames.root),
|
|
22507
|
+
highlighted: cx('ais-ReverseHighlight-highlighted', classNames.highlighted),
|
|
22508
|
+
nonHighlighted: cx('ais-ReverseHighlight-nonHighlighted', classNames.nonHighlighted),
|
|
22509
|
+
separator: cx('ais-ReverseHighlight-separator', classNames.separator)
|
|
22510
|
+
}
|
|
22511
|
+
}, props));
|
|
22512
|
+
}
|
|
22513
|
+
|
|
22514
|
+
var _excluded$n = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"],
|
|
22515
|
+
_excluded2$4 = ["isHighlighted"];
|
|
22516
|
+
function ReverseHighlight$1(_ref) {
|
|
22517
|
+
var hit = _ref.hit,
|
|
22518
|
+
attribute = _ref.attribute,
|
|
22519
|
+
highlightedTagName = _ref.highlightedTagName,
|
|
22520
|
+
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
22521
|
+
separator = _ref.separator,
|
|
22522
|
+
props = _objectWithoutProperties$c(_ref, _excluded$n);
|
|
22523
|
+
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
22524
|
+
var properties = Array.isArray(property) ? property : [property];
|
|
22525
|
+
var parts = properties.map(function (singleValue) {
|
|
22526
|
+
return getHighlightedParts(unescape$1(singleValue.value || '')).map(function (_ref2) {
|
|
22527
|
+
var isHighlighted = _ref2.isHighlighted,
|
|
22528
|
+
rest = _objectWithoutProperties$c(_ref2, _excluded2$4);
|
|
22529
|
+
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
22530
|
+
isHighlighted: !isHighlighted
|
|
22531
|
+
});
|
|
22532
|
+
});
|
|
22533
|
+
});
|
|
22534
|
+
return /*#__PURE__*/React__default.createElement(ReverseHighlight, _extends$1({}, props, {
|
|
22535
|
+
parts: parts,
|
|
22536
|
+
highlightedTagName: highlightedTagName,
|
|
22537
|
+
nonHighlightedTagName: nonHighlightedTagName,
|
|
22538
|
+
separator: separator
|
|
22539
|
+
}));
|
|
22540
|
+
}
|
|
22541
|
+
|
|
22542
|
+
var _excluded$o = ["indices", "showSuggestions", "showRecent", "searchParameters"],
|
|
22543
|
+
_excluded2$5 = ["indicesConfig", "refineSearchBox", "getSearchPageURL", "onSelect", "indexUiState", "isSearchPage", "panelComponent", "showRecent", "showSuggestions"];
|
|
22439
22544
|
var Autocomplete = createAutocompleteComponent({
|
|
22440
22545
|
createElement: React.createElement,
|
|
22441
22546
|
Fragment: React.Fragment
|
|
@@ -22468,15 +22573,13 @@
|
|
|
22468
22573
|
useMemo: React.useMemo,
|
|
22469
22574
|
useState: React.useState
|
|
22470
22575
|
});
|
|
22471
|
-
var _ref2 = /*#__PURE__*/React__default.createElement(Configure, {
|
|
22472
|
-
hitsPerPage: 5
|
|
22473
|
-
});
|
|
22474
22576
|
function EXPERIMENTAL_Autocomplete(_ref) {
|
|
22475
22577
|
var _ref$indices = _ref.indices,
|
|
22476
22578
|
indices = _ref$indices === void 0 ? [] : _ref$indices,
|
|
22477
22579
|
showSuggestions = _ref.showSuggestions,
|
|
22478
22580
|
showRecent = _ref.showRecent,
|
|
22479
|
-
|
|
22581
|
+
userSearchParameters = _ref.searchParameters,
|
|
22582
|
+
props = _objectWithoutProperties$c(_ref, _excluded$o);
|
|
22480
22583
|
var _useInstantSearch = useInstantSearch(),
|
|
22481
22584
|
indexUiState = _useInstantSearch.indexUiState,
|
|
22482
22585
|
indexRenderState = _useInstantSearch.indexRenderState;
|
|
@@ -22485,13 +22588,25 @@
|
|
|
22485
22588
|
$$widgetType: 'ais.autocomplete'
|
|
22486
22589
|
}),
|
|
22487
22590
|
refine = _useSearchBox.refine;
|
|
22591
|
+
var searchParameters = _objectSpread2({
|
|
22592
|
+
hitsPerPage: 5
|
|
22593
|
+
}, userSearchParameters);
|
|
22488
22594
|
var indicesConfig = _toConsumableArray$8(indices);
|
|
22489
22595
|
if (showSuggestions !== null && showSuggestions !== void 0 && showSuggestions.indexName) {
|
|
22490
22596
|
var _showSuggestions$clas, _showSuggestions$clas2, _showSuggestions$clas3, _showSuggestions$clas4;
|
|
22491
22597
|
indicesConfig.unshift({
|
|
22492
22598
|
indexName: showSuggestions.indexName,
|
|
22493
22599
|
headerComponent: showSuggestions.headerComponent,
|
|
22494
|
-
itemComponent: showSuggestions.itemComponent ||
|
|
22600
|
+
itemComponent: showSuggestions.itemComponent || function (_ref2) {
|
|
22601
|
+
var item = _ref2.item,
|
|
22602
|
+
onSelect = _ref2.onSelect;
|
|
22603
|
+
return /*#__PURE__*/React__default.createElement(AutocompleteSuggestion, {
|
|
22604
|
+
item: item,
|
|
22605
|
+
onSelect: onSelect
|
|
22606
|
+
}, /*#__PURE__*/React__default.createElement(ConditionalReverseHighlight, {
|
|
22607
|
+
item: item
|
|
22608
|
+
}));
|
|
22609
|
+
},
|
|
22495
22610
|
classNames: {
|
|
22496
22611
|
root: cx('ais-AutocompleteSuggestions', showSuggestions === null || showSuggestions === void 0 ? void 0 : (_showSuggestions$clas = showSuggestions.classNames) === null || _showSuggestions$clas === void 0 ? void 0 : _showSuggestions$clas.root),
|
|
22497
22612
|
list: cx('ais-AutocompleteSuggestionsList', showSuggestions === null || showSuggestions === void 0 ? void 0 : (_showSuggestions$clas2 = showSuggestions.classNames) === null || _showSuggestions$clas2 === void 0 ? void 0 : _showSuggestions$clas2.list),
|
|
@@ -22509,17 +22624,18 @@
|
|
|
22509
22624
|
}, [indexRenderState]);
|
|
22510
22625
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Index, {
|
|
22511
22626
|
EXPERIMENTAL_isolated: true
|
|
22512
|
-
},
|
|
22627
|
+
}, /*#__PURE__*/React__default.createElement(Configure, searchParameters), indicesConfig.map(function (index) {
|
|
22513
22628
|
return /*#__PURE__*/React__default.createElement(Index, {
|
|
22514
22629
|
key: index.indexName,
|
|
22515
22630
|
indexName: index.indexName
|
|
22516
|
-
});
|
|
22631
|
+
}, /*#__PURE__*/React__default.createElement(Configure, index.searchParameters));
|
|
22517
22632
|
}), /*#__PURE__*/React__default.createElement(InnerAutocomplete, _extends$1({}, props, {
|
|
22518
22633
|
indicesConfig: indicesConfig,
|
|
22519
22634
|
refineSearchBox: refine,
|
|
22520
22635
|
indexUiState: indexUiState,
|
|
22521
22636
|
isSearchPage: isSearchPage,
|
|
22522
|
-
showRecent: showRecent
|
|
22637
|
+
showRecent: showRecent,
|
|
22638
|
+
showSuggestions: showSuggestions
|
|
22523
22639
|
}))));
|
|
22524
22640
|
}
|
|
22525
22641
|
function InnerAutocomplete(_ref3) {
|
|
@@ -22529,8 +22645,10 @@
|
|
|
22529
22645
|
userOnSelect = _ref3.onSelect,
|
|
22530
22646
|
indexUiState = _ref3.indexUiState,
|
|
22531
22647
|
isSearchPage = _ref3.isSearchPage,
|
|
22648
|
+
PanelComponent = _ref3.panelComponent,
|
|
22532
22649
|
showRecent = _ref3.showRecent,
|
|
22533
|
-
|
|
22650
|
+
showSuggestions = _ref3.showSuggestions,
|
|
22651
|
+
props = _objectWithoutProperties$c(_ref3, _excluded2$5);
|
|
22534
22652
|
var _useAutocomplete = useAutocomplete(),
|
|
22535
22653
|
indices = _useAutocomplete.indices,
|
|
22536
22654
|
refineAutocomplete = _useAutocomplete.refine,
|
|
@@ -22575,61 +22693,88 @@
|
|
|
22575
22693
|
getPanelProps = _usePropGetters.getPanelProps,
|
|
22576
22694
|
getRootProps = _usePropGetters.getRootProps;
|
|
22577
22695
|
var AutocompleteRecentSearchComponent = _typeof$S(showRecent) === 'object' && showRecent.itemComponent || AutocompleteRecentSearch;
|
|
22578
|
-
|
|
22579
|
-
|
|
22580
|
-
|
|
22581
|
-
|
|
22582
|
-
|
|
22583
|
-
|
|
22584
|
-
|
|
22585
|
-
|
|
22586
|
-
|
|
22587
|
-
|
|
22588
|
-
|
|
22589
|
-
|
|
22590
|
-
|
|
22591
|
-
|
|
22592
|
-
|
|
22593
|
-
|
|
22594
|
-
|
|
22595
|
-
|
|
22596
|
-
|
|
22597
|
-
|
|
22598
|
-
|
|
22599
|
-
|
|
22600
|
-
|
|
22601
|
-
|
|
22602
|
-
|
|
22603
|
-
|
|
22604
|
-
|
|
22605
|
-
|
|
22696
|
+
var elements = {};
|
|
22697
|
+
if (showRecent) {
|
|
22698
|
+
elements.recent = /*#__PURE__*/React__default.createElement(AutocompleteIndex
|
|
22699
|
+
// @ts-ignore - there seems to be problems with React.ComponentType and this, but it's actually correct
|
|
22700
|
+
, {
|
|
22701
|
+
ItemComponent: function ItemComponent(_ref5) {
|
|
22702
|
+
var item = _ref5.item,
|
|
22703
|
+
onSelect = _ref5.onSelect;
|
|
22704
|
+
return /*#__PURE__*/React__default.createElement(AutocompleteRecentSearchComponent, {
|
|
22705
|
+
item: item,
|
|
22706
|
+
onSelect: onSelect,
|
|
22707
|
+
onRemoveRecentSearch: function onRemoveRecentSearch() {
|
|
22708
|
+
return storage.onRemove(item.query);
|
|
22709
|
+
}
|
|
22710
|
+
}, /*#__PURE__*/React__default.createElement(ConditionalReverseHighlight, {
|
|
22711
|
+
item: item
|
|
22712
|
+
}));
|
|
22713
|
+
},
|
|
22714
|
+
classNames: {
|
|
22715
|
+
root: 'ais-AutocompleteRecentSearches',
|
|
22716
|
+
list: 'ais-AutocompleteRecentSearchesList',
|
|
22717
|
+
item: 'ais-AutocompleteRecentSearchesItem'
|
|
22718
|
+
},
|
|
22719
|
+
items: storageHits,
|
|
22720
|
+
getItemProps: getItemProps
|
|
22721
|
+
});
|
|
22722
|
+
}
|
|
22723
|
+
indices.forEach(function (_ref6, i) {
|
|
22606
22724
|
var indexId = _ref6.indexId,
|
|
22725
|
+
indexName = _ref6.indexName,
|
|
22607
22726
|
hits = _ref6.hits;
|
|
22608
|
-
|
|
22727
|
+
var elementId = indexName === (showSuggestions === null || showSuggestions === void 0 ? void 0 : showSuggestions.indexName) ? 'suggestions' : indexName;
|
|
22728
|
+
elements[elementId] = /*#__PURE__*/React__default.createElement(AutocompleteIndex, {
|
|
22609
22729
|
key: indexId
|
|
22610
22730
|
// @ts-expect-error - there seems to be problems with React.ComponentType and this, but it's actually correct
|
|
22611
22731
|
,
|
|
22612
|
-
HeaderComponent: indicesConfig[
|
|
22732
|
+
HeaderComponent: indicesConfig[i].headerComponent
|
|
22613
22733
|
// @ts-expect-error - there seems to be problems with React.ComponentType and this, but it's actually correct
|
|
22614
22734
|
,
|
|
22615
|
-
ItemComponent: indicesConfig[
|
|
22735
|
+
ItemComponent: indicesConfig[i].itemComponent,
|
|
22616
22736
|
items: hits.map(function (item) {
|
|
22617
22737
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22618
22738
|
__indexName: indexId
|
|
22619
22739
|
});
|
|
22620
22740
|
}),
|
|
22621
22741
|
getItemProps: getItemProps,
|
|
22622
|
-
classNames: indicesConfig[
|
|
22742
|
+
classNames: indicesConfig[i].classNames
|
|
22623
22743
|
});
|
|
22744
|
+
});
|
|
22745
|
+
return /*#__PURE__*/React__default.createElement(Autocomplete, _extends$1({}, props, getRootProps()), /*#__PURE__*/React__default.createElement(AutocompleteSearch, {
|
|
22746
|
+
inputProps: getInputProps(),
|
|
22747
|
+
clearQuery: function clearQuery() {
|
|
22748
|
+
refineSearchBox('');
|
|
22749
|
+
refineAutocomplete('');
|
|
22750
|
+
}
|
|
22751
|
+
}), /*#__PURE__*/React__default.createElement(AutocompletePanel, getPanelProps(), PanelComponent ? /*#__PURE__*/React__default.createElement(PanelComponent, {
|
|
22752
|
+
elements: elements,
|
|
22753
|
+
indices: indices
|
|
22754
|
+
}) : Object.keys(elements).map(function (elementId) {
|
|
22755
|
+
return elements[elementId];
|
|
22624
22756
|
})));
|
|
22625
22757
|
}
|
|
22758
|
+
function ConditionalReverseHighlight(_ref7) {
|
|
22759
|
+
var _item$_highlightResul;
|
|
22760
|
+
var item = _ref7.item;
|
|
22761
|
+
if (!((_item$_highlightResul = item._highlightResult) !== null && _item$_highlightResul !== void 0 && _item$_highlightResul.query) ||
|
|
22762
|
+
// @ts-expect-error - we should not have matchLevel as arrays here
|
|
22763
|
+
item._highlightResult.query.matchLevel === 'none') {
|
|
22764
|
+
return item.query;
|
|
22765
|
+
}
|
|
22766
|
+
return /*#__PURE__*/React__default.createElement(ReverseHighlight$1, {
|
|
22767
|
+
attribute: "query",
|
|
22768
|
+
hit: item
|
|
22769
|
+
});
|
|
22770
|
+
}
|
|
22626
22771
|
|
|
22627
22772
|
function isModifierClick(event) {
|
|
22628
22773
|
var isMiddleClick = event.button === 1;
|
|
22629
22774
|
return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
|
|
22630
22775
|
}
|
|
22631
22776
|
|
|
22632
|
-
var _excluded$
|
|
22777
|
+
var _excluded$p = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
|
|
22633
22778
|
function Breadcrumb(_ref) {
|
|
22634
22779
|
var _ref$classNames = _ref.classNames,
|
|
22635
22780
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -22641,7 +22786,7 @@
|
|
|
22641
22786
|
_ref$separator = _ref.separator,
|
|
22642
22787
|
separator = _ref$separator === void 0 ? '>' : _ref$separator,
|
|
22643
22788
|
translations = _ref.translations,
|
|
22644
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22789
|
+
props = _objectWithoutProperties$c(_ref, _excluded$p);
|
|
22645
22790
|
var handleClick = function handleClick(value) {
|
|
22646
22791
|
return function (event) {
|
|
22647
22792
|
if (!isModifierClick(event)) {
|
|
@@ -22676,14 +22821,14 @@
|
|
|
22676
22821
|
})));
|
|
22677
22822
|
}
|
|
22678
22823
|
|
|
22679
|
-
var _excluded$
|
|
22824
|
+
var _excluded$q = ["attributes", "rootPath", "separator", "transformItems", "translations"];
|
|
22680
22825
|
function Breadcrumb$1(_ref) {
|
|
22681
22826
|
var attributes = _ref.attributes,
|
|
22682
22827
|
rootPath = _ref.rootPath,
|
|
22683
22828
|
separator = _ref.separator,
|
|
22684
22829
|
transformItems = _ref.transformItems,
|
|
22685
22830
|
translations = _ref.translations,
|
|
22686
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22831
|
+
props = _objectWithoutProperties$c(_ref, _excluded$q);
|
|
22687
22832
|
var _useBreadcrumb = useBreadcrumb({
|
|
22688
22833
|
attributes: attributes,
|
|
22689
22834
|
rootPath: rootPath,
|
|
@@ -22707,7 +22852,7 @@
|
|
|
22707
22852
|
return /*#__PURE__*/React__default.createElement(Breadcrumb, _extends$1({}, props, uiProps));
|
|
22708
22853
|
}
|
|
22709
22854
|
|
|
22710
|
-
var _excluded$
|
|
22855
|
+
var _excluded$r = ["classNames", "disabled", "onClick", "translations"];
|
|
22711
22856
|
function ClearRefinements(_ref) {
|
|
22712
22857
|
var _ref$classNames = _ref.classNames,
|
|
22713
22858
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -22716,7 +22861,7 @@
|
|
|
22716
22861
|
_ref$onClick = _ref.onClick,
|
|
22717
22862
|
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
22718
22863
|
translations = _ref.translations,
|
|
22719
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22864
|
+
props = _objectWithoutProperties$c(_ref, _excluded$r);
|
|
22720
22865
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22721
22866
|
className: cx('ais-ClearRefinements', classNames.root, props.className)
|
|
22722
22867
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -22726,13 +22871,13 @@
|
|
|
22726
22871
|
}, translations.resetButtonText));
|
|
22727
22872
|
}
|
|
22728
22873
|
|
|
22729
|
-
var _excluded$
|
|
22874
|
+
var _excluded$s = ["includedAttributes", "excludedAttributes", "transformItems", "translations"];
|
|
22730
22875
|
function ClearRefinements$1(_ref) {
|
|
22731
22876
|
var includedAttributes = _ref.includedAttributes,
|
|
22732
22877
|
excludedAttributes = _ref.excludedAttributes,
|
|
22733
22878
|
transformItems = _ref.transformItems,
|
|
22734
22879
|
translations = _ref.translations,
|
|
22735
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22880
|
+
props = _objectWithoutProperties$c(_ref, _excluded$s);
|
|
22736
22881
|
var _useClearRefinements = useClearRefinements({
|
|
22737
22882
|
includedAttributes: includedAttributes,
|
|
22738
22883
|
excludedAttributes: excludedAttributes,
|
|
@@ -22756,7 +22901,7 @@
|
|
|
22756
22901
|
return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
|
|
22757
22902
|
}
|
|
22758
22903
|
|
|
22759
|
-
var _excluded$
|
|
22904
|
+
var _excluded$t = ["classNames", "items", "hasRefinements"];
|
|
22760
22905
|
function CurrentRefinements(_ref) {
|
|
22761
22906
|
var _ref$classNames = _ref.classNames,
|
|
22762
22907
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -22764,7 +22909,7 @@
|
|
|
22764
22909
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
22765
22910
|
_ref$hasRefinements = _ref.hasRefinements,
|
|
22766
22911
|
hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
|
|
22767
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22912
|
+
props = _objectWithoutProperties$c(_ref, _excluded$t);
|
|
22768
22913
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22769
22914
|
className: cx('ais-CurrentRefinements', classNames.root, !hasRefinements && cx('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
|
|
22770
22915
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -22796,12 +22941,12 @@
|
|
|
22796
22941
|
})));
|
|
22797
22942
|
}
|
|
22798
22943
|
|
|
22799
|
-
var _excluded$
|
|
22944
|
+
var _excluded$u = ["includedAttributes", "excludedAttributes", "transformItems"];
|
|
22800
22945
|
function CurrentRefinements$1(_ref) {
|
|
22801
22946
|
var includedAttributes = _ref.includedAttributes,
|
|
22802
22947
|
excludedAttributes = _ref.excludedAttributes,
|
|
22803
22948
|
transformItems = _ref.transformItems,
|
|
22804
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22949
|
+
props = _objectWithoutProperties$c(_ref, _excluded$u);
|
|
22805
22950
|
var _useCurrentRefinement = useCurrentRefinements({
|
|
22806
22951
|
includedAttributes: includedAttributes,
|
|
22807
22952
|
excludedAttributes: excludedAttributes,
|
|
@@ -22818,7 +22963,7 @@
|
|
|
22818
22963
|
return /*#__PURE__*/React__default.createElement(CurrentRefinements, _extends$1({}, props, uiProps));
|
|
22819
22964
|
}
|
|
22820
22965
|
|
|
22821
|
-
var _excluded$
|
|
22966
|
+
var _excluded$v = ["objectIDs", "limit", "threshold", "queryParameters", "fallbackParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
22822
22967
|
var FrequentlyBoughtTogetherUiComponent = createFrequentlyBoughtTogetherComponent({
|
|
22823
22968
|
createElement: React.createElement,
|
|
22824
22969
|
Fragment: React.Fragment
|
|
@@ -22835,7 +22980,7 @@
|
|
|
22835
22980
|
headerComponent = _ref.headerComponent,
|
|
22836
22981
|
emptyComponent = _ref.emptyComponent,
|
|
22837
22982
|
layoutComponent = _ref.layoutComponent,
|
|
22838
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22983
|
+
props = _objectWithoutProperties$c(_ref, _excluded$v);
|
|
22839
22984
|
var _useInstantSearch = useInstantSearch(),
|
|
22840
22985
|
status = _useInstantSearch.status;
|
|
22841
22986
|
var _useFrequentlyBoughtT = useFrequentlyBoughtTogether({
|
|
@@ -22878,17 +23023,17 @@
|
|
|
22878
23023
|
return /*#__PURE__*/React__default.createElement(FrequentlyBoughtTogetherUiComponent, _extends$1({}, props, uiProps));
|
|
22879
23024
|
}
|
|
22880
23025
|
|
|
22881
|
-
var _excluded$
|
|
23026
|
+
var _excluded$w = ["isShowingMore", "translations"];
|
|
22882
23027
|
function ShowMoreButton(_ref) {
|
|
22883
23028
|
var isShowingMore = _ref.isShowingMore,
|
|
22884
23029
|
translations = _ref.translations,
|
|
22885
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23030
|
+
props = _objectWithoutProperties$c(_ref, _excluded$w);
|
|
22886
23031
|
return /*#__PURE__*/React__default.createElement("button", props, translations.showMoreButtonText({
|
|
22887
23032
|
isShowingMore: isShowingMore
|
|
22888
23033
|
}));
|
|
22889
23034
|
}
|
|
22890
23035
|
|
|
22891
|
-
var _excluded$
|
|
23036
|
+
var _excluded$x = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
|
|
22892
23037
|
function HierarchicalList(_ref) {
|
|
22893
23038
|
var className = _ref.className,
|
|
22894
23039
|
_ref$classNames = _ref.classNames,
|
|
@@ -22940,7 +23085,7 @@
|
|
|
22940
23085
|
onToggleShowMore = _ref2.onToggleShowMore,
|
|
22941
23086
|
isShowingMore = _ref2.isShowingMore,
|
|
22942
23087
|
translations = _ref2.translations,
|
|
22943
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
23088
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$x);
|
|
22944
23089
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22945
23090
|
className: cx('ais-HierarchicalMenu', classNames.root, !hasItems && cx('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
22946
23091
|
}), /*#__PURE__*/React__default.createElement(HierarchicalList, {
|
|
@@ -22957,7 +23102,7 @@
|
|
|
22957
23102
|
}));
|
|
22958
23103
|
}
|
|
22959
23104
|
|
|
22960
|
-
var _excluded$
|
|
23105
|
+
var _excluded$y = ["attributes", "limit", "rootPath", "separator", "showMore", "showMoreLimit", "showParentLevel", "sortBy", "transformItems", "translations"];
|
|
22961
23106
|
function HierarchicalMenu$1(_ref) {
|
|
22962
23107
|
var attributes = _ref.attributes,
|
|
22963
23108
|
limit = _ref.limit,
|
|
@@ -22969,7 +23114,7 @@
|
|
|
22969
23114
|
sortBy = _ref.sortBy,
|
|
22970
23115
|
transformItems = _ref.transformItems,
|
|
22971
23116
|
translations = _ref.translations,
|
|
22972
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23117
|
+
props = _objectWithoutProperties$c(_ref, _excluded$y);
|
|
22973
23118
|
var _useHierarchicalMenu = useHierarchicalMenu({
|
|
22974
23119
|
attributes: attributes,
|
|
22975
23120
|
limit: limit,
|
|
@@ -23009,16 +23154,11 @@
|
|
|
23009
23154
|
}));
|
|
23010
23155
|
}
|
|
23011
23156
|
|
|
23012
|
-
var
|
|
23013
|
-
createElement: React.createElement,
|
|
23014
|
-
Fragment: React.Fragment
|
|
23015
|
-
});
|
|
23016
|
-
|
|
23017
|
-
var _excluded$x = ["classNames"];
|
|
23157
|
+
var _excluded$z = ["classNames"];
|
|
23018
23158
|
function Highlight(_ref) {
|
|
23019
23159
|
var _ref$classNames = _ref.classNames,
|
|
23020
23160
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23021
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23161
|
+
props = _objectWithoutProperties$c(_ref, _excluded$z);
|
|
23022
23162
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
23023
23163
|
classNames: {
|
|
23024
23164
|
root: cx('ais-Highlight', classNames.root),
|
|
@@ -23029,14 +23169,14 @@
|
|
|
23029
23169
|
}, props));
|
|
23030
23170
|
}
|
|
23031
23171
|
|
|
23032
|
-
var _excluded$
|
|
23172
|
+
var _excluded$A = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
23033
23173
|
function Highlight$1(_ref) {
|
|
23034
23174
|
var hit = _ref.hit,
|
|
23035
23175
|
attribute = _ref.attribute,
|
|
23036
23176
|
highlightedTagName = _ref.highlightedTagName,
|
|
23037
23177
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
23038
23178
|
separator = _ref.separator,
|
|
23039
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23179
|
+
props = _objectWithoutProperties$c(_ref, _excluded$A);
|
|
23040
23180
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
23041
23181
|
var properties = Array.isArray(property) ? property : [property];
|
|
23042
23182
|
var parts = properties.map(function (singleValue) {
|
|
@@ -23050,8 +23190,8 @@
|
|
|
23050
23190
|
}));
|
|
23051
23191
|
}
|
|
23052
23192
|
|
|
23053
|
-
var _excluded$
|
|
23054
|
-
_excluded2$
|
|
23193
|
+
var _excluded$B = ["escapeHTML", "transformItems", "hitComponent", "bannerComponent"],
|
|
23194
|
+
_excluded2$6 = ["hit", "index"];
|
|
23055
23195
|
// @MAJOR: Move default hit component back to the UI library
|
|
23056
23196
|
// once flavour specificities are erased
|
|
23057
23197
|
function DefaultHitComponent(_ref) {
|
|
@@ -23072,7 +23212,7 @@
|
|
|
23072
23212
|
_ref2$hitComponent = _ref2.hitComponent,
|
|
23073
23213
|
HitComponent = _ref2$hitComponent === void 0 ? DefaultHitComponent : _ref2$hitComponent,
|
|
23074
23214
|
BannerComponent = _ref2.bannerComponent,
|
|
23075
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
23215
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$B);
|
|
23076
23216
|
var _useHits = useHits({
|
|
23077
23217
|
escapeHTML: escapeHTML,
|
|
23078
23218
|
transformItems: transformItems
|
|
@@ -23086,7 +23226,7 @@
|
|
|
23086
23226
|
return function (_ref3) {
|
|
23087
23227
|
var hit = _ref3.hit,
|
|
23088
23228
|
index = _ref3.index,
|
|
23089
|
-
itemProps = _objectWithoutProperties$c(_ref3, _excluded2$
|
|
23229
|
+
itemProps = _objectWithoutProperties$c(_ref3, _excluded2$6);
|
|
23090
23230
|
return /*#__PURE__*/React__default.createElement("li", _extends$1({
|
|
23091
23231
|
key: hit.objectID
|
|
23092
23232
|
}, itemProps), /*#__PURE__*/React__default.createElement(HitComponent, {
|
|
@@ -23108,14 +23248,14 @@
|
|
|
23108
23248
|
return /*#__PURE__*/React__default.createElement(HitsUiComponent, _extends$1({}, props, uiProps));
|
|
23109
23249
|
}
|
|
23110
23250
|
|
|
23111
|
-
var _excluded$
|
|
23251
|
+
var _excluded$C = ["items", "onChange", "currentValue", "classNames"];
|
|
23112
23252
|
function HitsPerPage(_ref) {
|
|
23113
23253
|
var items = _ref.items,
|
|
23114
23254
|
_onChange = _ref.onChange,
|
|
23115
23255
|
currentValue = _ref.currentValue,
|
|
23116
23256
|
_ref$classNames = _ref.classNames,
|
|
23117
23257
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23118
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23258
|
+
props = _objectWithoutProperties$c(_ref, _excluded$C);
|
|
23119
23259
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
23120
23260
|
className: cx('ais-HitsPerPage', classNames.root, props.className)
|
|
23121
23261
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -23133,11 +23273,11 @@
|
|
|
23133
23273
|
})));
|
|
23134
23274
|
}
|
|
23135
23275
|
|
|
23136
|
-
var _excluded$
|
|
23276
|
+
var _excluded$D = ["items", "transformItems"];
|
|
23137
23277
|
function HitsPerPage$1(_ref) {
|
|
23138
23278
|
var userItems = _ref.items,
|
|
23139
23279
|
transformItems = _ref.transformItems,
|
|
23140
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23280
|
+
props = _objectWithoutProperties$c(_ref, _excluded$D);
|
|
23141
23281
|
var _useHitsPerPage = useHitsPerPage({
|
|
23142
23282
|
items: userItems,
|
|
23143
23283
|
transformItems: transformItems
|
|
@@ -23161,7 +23301,7 @@
|
|
|
23161
23301
|
return /*#__PURE__*/React__default.createElement(HitsPerPage, _extends$1({}, props, uiProps));
|
|
23162
23302
|
}
|
|
23163
23303
|
|
|
23164
|
-
var _excluded$
|
|
23304
|
+
var _excluded$E = ["hitComponent", "hits", "bannerComponent", "banner", "sendEvent", "isFirstPage", "isLastPage", "onShowPrevious", "onShowMore", "classNames", "translations"];
|
|
23165
23305
|
function DefaultHitComponent$1(_ref) {
|
|
23166
23306
|
var hit = _ref.hit;
|
|
23167
23307
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -23206,7 +23346,7 @@
|
|
|
23206
23346
|
_ref3$classNames = _ref3.classNames,
|
|
23207
23347
|
classNames = _ref3$classNames === void 0 ? {} : _ref3$classNames,
|
|
23208
23348
|
translations = _ref3.translations,
|
|
23209
|
-
props = _objectWithoutProperties$c(_ref3, _excluded$
|
|
23349
|
+
props = _objectWithoutProperties$c(_ref3, _excluded$E);
|
|
23210
23350
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
23211
23351
|
className: cx('ais-InfiniteHits', classNames.root, hits.length === 0 && cx('ais-InfiniteHits--empty', classNames.emptyRoot), props.className)
|
|
23212
23352
|
}), onShowPrevious && /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -23242,7 +23382,7 @@
|
|
|
23242
23382
|
}, translations.showMoreButtonText));
|
|
23243
23383
|
}
|
|
23244
23384
|
|
|
23245
|
-
var _excluded$
|
|
23385
|
+
var _excluded$F = ["showPrevious", "cache", "escapeHTML", "transformItems", "translations", "bannerComponent"];
|
|
23246
23386
|
function InfiniteHits$1(_ref) {
|
|
23247
23387
|
var _ref$showPrevious = _ref.showPrevious,
|
|
23248
23388
|
shouldShowPrevious = _ref$showPrevious === void 0 ? true : _ref$showPrevious,
|
|
@@ -23251,7 +23391,7 @@
|
|
|
23251
23391
|
transformItems = _ref.transformItems,
|
|
23252
23392
|
translations = _ref.translations,
|
|
23253
23393
|
BannerComponent = _ref.bannerComponent,
|
|
23254
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23394
|
+
props = _objectWithoutProperties$c(_ref, _excluded$F);
|
|
23255
23395
|
var _useInfiniteHits = useInfiniteHits({
|
|
23256
23396
|
cache: cache,
|
|
23257
23397
|
escapeHTML: escapeHTML,
|
|
@@ -23287,7 +23427,7 @@
|
|
|
23287
23427
|
return /*#__PURE__*/React__default.createElement(InfiniteHits, _extends$1({}, props, uiProps));
|
|
23288
23428
|
}
|
|
23289
23429
|
|
|
23290
|
-
var _excluded$
|
|
23430
|
+
var _excluded$G = ["objectIDs", "limit", "threshold", "queryParameters", "fallbackParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
23291
23431
|
var LookingSimilarUiComponent = createLookingSimilarComponent({
|
|
23292
23432
|
createElement: React.createElement,
|
|
23293
23433
|
Fragment: React.Fragment
|
|
@@ -23304,7 +23444,7 @@
|
|
|
23304
23444
|
headerComponent = _ref.headerComponent,
|
|
23305
23445
|
emptyComponent = _ref.emptyComponent,
|
|
23306
23446
|
layoutComponent = _ref.layoutComponent,
|
|
23307
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23447
|
+
props = _objectWithoutProperties$c(_ref, _excluded$G);
|
|
23308
23448
|
var _useInstantSearch = useInstantSearch(),
|
|
23309
23449
|
status = _useInstantSearch.status;
|
|
23310
23450
|
var _useLookingSimilar = useLookingSimilar({
|
|
@@ -23347,7 +23487,7 @@
|
|
|
23347
23487
|
return /*#__PURE__*/React__default.createElement(LookingSimilarUiComponent, _extends$1({}, props, uiProps));
|
|
23348
23488
|
}
|
|
23349
23489
|
|
|
23350
|
-
var _excluded$
|
|
23490
|
+
var _excluded$H = ["items", "classNames", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "createURL", "onRefine", "translations"];
|
|
23351
23491
|
function Menu(_ref) {
|
|
23352
23492
|
var items = _ref.items,
|
|
23353
23493
|
_ref$classNames = _ref.classNames,
|
|
@@ -23359,7 +23499,7 @@
|
|
|
23359
23499
|
createURL = _ref.createURL,
|
|
23360
23500
|
onRefine = _ref.onRefine,
|
|
23361
23501
|
translations = _ref.translations,
|
|
23362
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23502
|
+
props = _objectWithoutProperties$c(_ref, _excluded$H);
|
|
23363
23503
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
23364
23504
|
className: cx('ais-Menu', classNames.root, items.length === 0 && cx('ais-Menu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
23365
23505
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -23392,7 +23532,7 @@
|
|
|
23392
23532
|
}));
|
|
23393
23533
|
}
|
|
23394
23534
|
|
|
23395
|
-
var _excluded$
|
|
23535
|
+
var _excluded$I = ["attribute", "limit", "showMore", "showMoreLimit", "sortBy", "transformItems", "translations"];
|
|
23396
23536
|
function Menu$1(_ref) {
|
|
23397
23537
|
var attribute = _ref.attribute,
|
|
23398
23538
|
limit = _ref.limit,
|
|
@@ -23401,7 +23541,7 @@
|
|
|
23401
23541
|
sortBy = _ref.sortBy,
|
|
23402
23542
|
transformItems = _ref.transformItems,
|
|
23403
23543
|
translations = _ref.translations,
|
|
23404
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23544
|
+
props = _objectWithoutProperties$c(_ref, _excluded$I);
|
|
23405
23545
|
var _useMenu = useMenu({
|
|
23406
23546
|
attribute: attribute,
|
|
23407
23547
|
limit: limit,
|
|
@@ -23438,8 +23578,8 @@
|
|
|
23438
23578
|
}));
|
|
23439
23579
|
}
|
|
23440
23580
|
|
|
23441
|
-
var _excluded$
|
|
23442
|
-
_excluded2$
|
|
23581
|
+
var _excluded$J = ["pages", "currentPage", "nbPages", "isFirstPage", "isLastPage", "showFirst", "showPrevious", "showNext", "showLast", "createURL", "onNavigate", "translations", "classNames"],
|
|
23582
|
+
_excluded2$7 = ["isDisabled", "className", "classNames", "href", "onClick"];
|
|
23443
23583
|
function Pagination(_ref) {
|
|
23444
23584
|
var pages = _ref.pages,
|
|
23445
23585
|
currentPage = _ref.currentPage,
|
|
@@ -23459,7 +23599,7 @@
|
|
|
23459
23599
|
translations = _ref.translations,
|
|
23460
23600
|
_ref$classNames = _ref.classNames,
|
|
23461
23601
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23462
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23602
|
+
props = _objectWithoutProperties$c(_ref, _excluded$J);
|
|
23463
23603
|
var firstPageIndex = 0;
|
|
23464
23604
|
var previousPageIndex = currentPage - 1;
|
|
23465
23605
|
var nextPageIndex = currentPage + 1;
|
|
@@ -23530,7 +23670,7 @@
|
|
|
23530
23670
|
classNames = _ref2.classNames,
|
|
23531
23671
|
href = _ref2.href,
|
|
23532
23672
|
_onClick = _ref2.onClick,
|
|
23533
|
-
props = _objectWithoutProperties$c(_ref2, _excluded2$
|
|
23673
|
+
props = _objectWithoutProperties$c(_ref2, _excluded2$7);
|
|
23534
23674
|
if (isDisabled) {
|
|
23535
23675
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
23536
23676
|
className: cx('ais-Pagination-item', classNames.item, 'ais-Pagination-item--disabled', classNames.disabledItem, className)
|
|
@@ -23553,7 +23693,7 @@
|
|
|
23553
23693
|
}, props)));
|
|
23554
23694
|
}
|
|
23555
23695
|
|
|
23556
|
-
var _excluded$
|
|
23696
|
+
var _excluded$K = ["showFirst", "showPrevious", "showNext", "showLast", "padding", "totalPages", "translations"];
|
|
23557
23697
|
function Pagination$1(_ref) {
|
|
23558
23698
|
var showFirst = _ref.showFirst,
|
|
23559
23699
|
showPrevious = _ref.showPrevious,
|
|
@@ -23562,7 +23702,7 @@
|
|
|
23562
23702
|
padding = _ref.padding,
|
|
23563
23703
|
totalPages = _ref.totalPages,
|
|
23564
23704
|
translations = _ref.translations,
|
|
23565
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23705
|
+
props = _objectWithoutProperties$c(_ref, _excluded$K);
|
|
23566
23706
|
var _usePagination = usePagination({
|
|
23567
23707
|
padding: padding,
|
|
23568
23708
|
totalPages: totalPages
|
|
@@ -23611,14 +23751,14 @@
|
|
|
23611
23751
|
}));
|
|
23612
23752
|
}
|
|
23613
23753
|
|
|
23614
|
-
var _excluded$
|
|
23754
|
+
var _excluded$L = ["classNames", "url", "theme"];
|
|
23615
23755
|
function PoweredBy(_ref) {
|
|
23616
23756
|
var _ref$classNames = _ref.classNames,
|
|
23617
23757
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23618
23758
|
url = _ref.url,
|
|
23619
23759
|
_ref$theme = _ref.theme,
|
|
23620
23760
|
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
|
|
23621
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23761
|
+
props = _objectWithoutProperties$c(_ref, _excluded$L);
|
|
23622
23762
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
23623
23763
|
className: cx('ais-PoweredBy', theme === 'dark' ? cx('ais-PoweredBy--dark', classNames.dark) : cx('ais-PoweredBy--light', classNames.light), classNames.root, props.className)
|
|
23624
23764
|
}), /*#__PURE__*/React__default.createElement("a", {
|
|
@@ -23648,7 +23788,7 @@
|
|
|
23648
23788
|
return /*#__PURE__*/React__default.createElement(PoweredBy, _extends$1({}, props, uiProps));
|
|
23649
23789
|
}
|
|
23650
23790
|
|
|
23651
|
-
var _excluded$
|
|
23791
|
+
var _excluded$M = ["classNames", "range", "start", "step", "disabled", "onSubmit", "translations"];
|
|
23652
23792
|
// if the default value is undefined, React considers the component uncontrolled initially, which we don't want 0 or NaN as the default value
|
|
23653
23793
|
var unsetNumberInputValue = '';
|
|
23654
23794
|
|
|
@@ -23673,7 +23813,7 @@
|
|
|
23673
23813
|
disabled = _ref.disabled,
|
|
23674
23814
|
_onSubmit = _ref.onSubmit,
|
|
23675
23815
|
translations = _ref.translations,
|
|
23676
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23816
|
+
props = _objectWithoutProperties$c(_ref, _excluded$M);
|
|
23677
23817
|
var values = {
|
|
23678
23818
|
min: minValue !== -Infinity && minValue !== min ? minValue : unsetNumberInputValue,
|
|
23679
23819
|
max: maxValue !== Infinity && maxValue !== max ? maxValue : unsetNumberInputValue
|
|
@@ -23753,14 +23893,14 @@
|
|
|
23753
23893
|
}, translations.submitButtonText)));
|
|
23754
23894
|
}
|
|
23755
23895
|
|
|
23756
|
-
var _excluded$
|
|
23896
|
+
var _excluded$N = ["attribute", "min", "max", "precision", "translations"];
|
|
23757
23897
|
function RangeInput$1(_ref) {
|
|
23758
23898
|
var attribute = _ref.attribute,
|
|
23759
23899
|
min = _ref.min,
|
|
23760
23900
|
max = _ref.max,
|
|
23761
23901
|
precision = _ref.precision,
|
|
23762
23902
|
translations = _ref.translations,
|
|
23763
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23903
|
+
props = _objectWithoutProperties$c(_ref, _excluded$N);
|
|
23764
23904
|
var _useRange = useRange({
|
|
23765
23905
|
attribute: attribute,
|
|
23766
23906
|
min: min,
|
|
@@ -23788,7 +23928,7 @@
|
|
|
23788
23928
|
return /*#__PURE__*/React__default.createElement(RangeInput, _extends$1({}, props, uiProps));
|
|
23789
23929
|
}
|
|
23790
23930
|
|
|
23791
|
-
var _excluded$
|
|
23931
|
+
var _excluded$O = ["canRefine", "items", "onRefine", "query", "searchBox", "noResults", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "className", "classNames", "translations"];
|
|
23792
23932
|
function RefinementList$1(_ref) {
|
|
23793
23933
|
var canRefine = _ref.canRefine,
|
|
23794
23934
|
items = _ref.items,
|
|
@@ -23804,7 +23944,7 @@
|
|
|
23804
23944
|
_ref$classNames = _ref.classNames,
|
|
23805
23945
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23806
23946
|
translations = _ref.translations,
|
|
23807
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23947
|
+
props = _objectWithoutProperties$c(_ref, _excluded$O);
|
|
23808
23948
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
23809
23949
|
className: cx('ais-RefinementList', classNames.root, items.length === 0 && cx('ais-RefinementList--noRefinement', classNames.noRefinementRoot), className)
|
|
23810
23950
|
}), searchBox && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -23843,8 +23983,8 @@
|
|
|
23843
23983
|
}));
|
|
23844
23984
|
}
|
|
23845
23985
|
|
|
23846
|
-
var _excluded$
|
|
23847
|
-
var _ref2
|
|
23986
|
+
var _excluded$P = ["formRef", "inputRef", "inputProps", "isSearchStalled", "onChange", "onReset", "onSubmit", "placeholder", "value", "autoFocus", "resetIconComponent", "submitIconComponent", "loadingIconComponent", "classNames", "translations"];
|
|
23987
|
+
var _ref2 = /*#__PURE__*/React__default.createElement("path", {
|
|
23848
23988
|
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"
|
|
23849
23989
|
});
|
|
23850
23990
|
function DefaultSubmitIcon(_ref) {
|
|
@@ -23855,7 +23995,7 @@
|
|
|
23855
23995
|
height: "10",
|
|
23856
23996
|
viewBox: "0 0 40 40",
|
|
23857
23997
|
"aria-hidden": "true"
|
|
23858
|
-
}, _ref2
|
|
23998
|
+
}, _ref2);
|
|
23859
23999
|
}
|
|
23860
24000
|
var _ref4 = /*#__PURE__*/React__default.createElement("path", {
|
|
23861
24001
|
d: "M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"
|
|
@@ -23924,7 +24064,7 @@
|
|
|
23924
24064
|
_ref7$classNames = _ref7.classNames,
|
|
23925
24065
|
classNames = _ref7$classNames === void 0 ? {} : _ref7$classNames,
|
|
23926
24066
|
translations = _ref7.translations,
|
|
23927
|
-
props = _objectWithoutProperties$c(_ref7, _excluded$
|
|
24067
|
+
props = _objectWithoutProperties$c(_ref7, _excluded$P);
|
|
23928
24068
|
function handleSubmit(event) {
|
|
23929
24069
|
event.preventDefault();
|
|
23930
24070
|
event.stopPropagation();
|
|
@@ -23989,7 +24129,7 @@
|
|
|
23989
24129
|
}))));
|
|
23990
24130
|
}
|
|
23991
24131
|
|
|
23992
|
-
var _excluded$
|
|
24132
|
+
var _excluded$Q = ["searchable", "searchablePlaceholder", "searchableSelectOnSubmit", "attribute", "operator", "limit", "showMore", "showMoreLimit", "sortBy", "escapeFacetValues", "transformItems", "translations"];
|
|
23993
24133
|
function RefinementList$2(_ref) {
|
|
23994
24134
|
var searchable = _ref.searchable,
|
|
23995
24135
|
searchablePlaceholder = _ref.searchablePlaceholder,
|
|
@@ -24004,7 +24144,7 @@
|
|
|
24004
24144
|
escapeFacetValues = _ref.escapeFacetValues,
|
|
24005
24145
|
transformItems = _ref.transformItems,
|
|
24006
24146
|
translations = _ref.translations,
|
|
24007
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24147
|
+
props = _objectWithoutProperties$c(_ref, _excluded$Q);
|
|
24008
24148
|
var _useRefinementList = useRefinementList({
|
|
24009
24149
|
attribute: attribute,
|
|
24010
24150
|
operator: operator,
|
|
@@ -24096,7 +24236,7 @@
|
|
|
24096
24236
|
}));
|
|
24097
24237
|
}
|
|
24098
24238
|
|
|
24099
|
-
var _excluded$
|
|
24239
|
+
var _excluded$R = ["objectIDs", "limit", "threshold", "fallbackParameters", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
24100
24240
|
var RelatedProductsUiComponent = createRelatedProductsComponent({
|
|
24101
24241
|
createElement: React.createElement,
|
|
24102
24242
|
Fragment: React.Fragment
|
|
@@ -24113,7 +24253,7 @@
|
|
|
24113
24253
|
headerComponent = _ref.headerComponent,
|
|
24114
24254
|
emptyComponent = _ref.emptyComponent,
|
|
24115
24255
|
layoutComponent = _ref.layoutComponent,
|
|
24116
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24256
|
+
props = _objectWithoutProperties$c(_ref, _excluded$R);
|
|
24117
24257
|
var _useInstantSearch = useInstantSearch(),
|
|
24118
24258
|
status = _useInstantSearch.status;
|
|
24119
24259
|
var _useRelatedProducts = useRelatedProducts({
|
|
@@ -24156,7 +24296,7 @@
|
|
|
24156
24296
|
return /*#__PURE__*/React__default.createElement(RelatedProductsUiComponent, _extends$1({}, props, uiProps));
|
|
24157
24297
|
}
|
|
24158
24298
|
|
|
24159
|
-
var _excluded$
|
|
24299
|
+
var _excluded$S = ["queryHook", "searchAsYouType", "ignoreCompositionEvents", "translations"];
|
|
24160
24300
|
function SearchBox$1(_ref) {
|
|
24161
24301
|
var queryHook = _ref.queryHook,
|
|
24162
24302
|
_ref$searchAsYouType = _ref.searchAsYouType,
|
|
@@ -24164,7 +24304,7 @@
|
|
|
24164
24304
|
_ref$ignoreCompositio = _ref.ignoreCompositionEvents,
|
|
24165
24305
|
ignoreCompositionEvents = _ref$ignoreCompositio === void 0 ? false : _ref$ignoreCompositio,
|
|
24166
24306
|
translations = _ref.translations,
|
|
24167
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24307
|
+
props = _objectWithoutProperties$c(_ref, _excluded$S);
|
|
24168
24308
|
var _useSearchBox = useSearchBox({
|
|
24169
24309
|
queryHook: queryHook
|
|
24170
24310
|
}, {
|
|
@@ -24225,11 +24365,11 @@
|
|
|
24225
24365
|
return /*#__PURE__*/React__default.createElement(SearchBox, _extends$1({}, props, uiProps));
|
|
24226
24366
|
}
|
|
24227
24367
|
|
|
24228
|
-
var _excluded$
|
|
24368
|
+
var _excluded$T = ["classNames"];
|
|
24229
24369
|
function Snippet(_ref) {
|
|
24230
24370
|
var _ref$classNames = _ref.classNames,
|
|
24231
24371
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
24232
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24372
|
+
props = _objectWithoutProperties$c(_ref, _excluded$T);
|
|
24233
24373
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
24234
24374
|
classNames: {
|
|
24235
24375
|
root: cx('ais-Snippet', classNames.root),
|
|
@@ -24240,14 +24380,14 @@
|
|
|
24240
24380
|
}, props));
|
|
24241
24381
|
}
|
|
24242
24382
|
|
|
24243
|
-
var _excluded$
|
|
24383
|
+
var _excluded$U = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
24244
24384
|
function Snippet$1(_ref) {
|
|
24245
24385
|
var hit = _ref.hit,
|
|
24246
24386
|
attribute = _ref.attribute,
|
|
24247
24387
|
highlightedTagName = _ref.highlightedTagName,
|
|
24248
24388
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
24249
24389
|
separator = _ref.separator,
|
|
24250
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24390
|
+
props = _objectWithoutProperties$c(_ref, _excluded$U);
|
|
24251
24391
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
24252
24392
|
var properties = Array.isArray(property) ? property : [property];
|
|
24253
24393
|
var parts = properties.map(function (singleValue) {
|
|
@@ -24261,7 +24401,7 @@
|
|
|
24261
24401
|
}));
|
|
24262
24402
|
}
|
|
24263
24403
|
|
|
24264
|
-
var _excluded$
|
|
24404
|
+
var _excluded$V = ["items", "value", "onChange", "classNames"];
|
|
24265
24405
|
function SortBy(_ref) {
|
|
24266
24406
|
var items = _ref.items,
|
|
24267
24407
|
value = _ref.value,
|
|
@@ -24269,7 +24409,7 @@
|
|
|
24269
24409
|
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
24270
24410
|
_ref$classNames = _ref.classNames,
|
|
24271
24411
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
24272
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24412
|
+
props = _objectWithoutProperties$c(_ref, _excluded$V);
|
|
24273
24413
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
24274
24414
|
className: cx('ais-SortBy', classNames.root, props.className)
|
|
24275
24415
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -24288,11 +24428,11 @@
|
|
|
24288
24428
|
})));
|
|
24289
24429
|
}
|
|
24290
24430
|
|
|
24291
|
-
var _excluded$
|
|
24431
|
+
var _excluded$W = ["items", "transformItems"];
|
|
24292
24432
|
function SortBy$1(_ref) {
|
|
24293
24433
|
var items = _ref.items,
|
|
24294
24434
|
transformItems = _ref.transformItems,
|
|
24295
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24435
|
+
props = _objectWithoutProperties$c(_ref, _excluded$W);
|
|
24296
24436
|
var _useSortBy = useSortBy({
|
|
24297
24437
|
items: items,
|
|
24298
24438
|
transformItems: transformItems
|
|
@@ -24310,7 +24450,7 @@
|
|
|
24310
24450
|
return /*#__PURE__*/React__default.createElement(SortBy, _extends$1({}, props, uiProps));
|
|
24311
24451
|
}
|
|
24312
24452
|
|
|
24313
|
-
var _excluded$
|
|
24453
|
+
var _excluded$X = ["classNames", "nbHits", "processingTimeMS", "nbSortedHits", "areHitsSorted", "translations"];
|
|
24314
24454
|
function Stats(_ref) {
|
|
24315
24455
|
var _ref$classNames = _ref.classNames,
|
|
24316
24456
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -24319,7 +24459,7 @@
|
|
|
24319
24459
|
nbSortedHits = _ref.nbSortedHits,
|
|
24320
24460
|
areHitsSorted = _ref.areHitsSorted,
|
|
24321
24461
|
translations = _ref.translations,
|
|
24322
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24462
|
+
props = _objectWithoutProperties$c(_ref, _excluded$X);
|
|
24323
24463
|
var translationOptions = {
|
|
24324
24464
|
nbHits: nbHits,
|
|
24325
24465
|
processingTimeMS: processingTimeMS,
|
|
@@ -24333,10 +24473,10 @@
|
|
|
24333
24473
|
}, translations.rootElementText(translationOptions)));
|
|
24334
24474
|
}
|
|
24335
24475
|
|
|
24336
|
-
var _excluded$
|
|
24476
|
+
var _excluded$Y = ["translations"];
|
|
24337
24477
|
function Stats$1(_ref) {
|
|
24338
24478
|
var translations = _ref.translations,
|
|
24339
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24479
|
+
props = _objectWithoutProperties$c(_ref, _excluded$Y);
|
|
24340
24480
|
var _useStats = useStats(undefined, {
|
|
24341
24481
|
$$widgetType: 'ais.stats'
|
|
24342
24482
|
}),
|
|
@@ -24386,14 +24526,14 @@
|
|
|
24386
24526
|
return '';
|
|
24387
24527
|
}
|
|
24388
24528
|
|
|
24389
|
-
var _excluded$
|
|
24529
|
+
var _excluded$Z = ["classNames", "checked", "onChange", "label"];
|
|
24390
24530
|
function ToggleRefinement(_ref) {
|
|
24391
24531
|
var _ref$classNames = _ref.classNames,
|
|
24392
24532
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
24393
24533
|
checked = _ref.checked,
|
|
24394
24534
|
_onChange = _ref.onChange,
|
|
24395
24535
|
label = _ref.label,
|
|
24396
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24536
|
+
props = _objectWithoutProperties$c(_ref, _excluded$Z);
|
|
24397
24537
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
24398
24538
|
className: cx('ais-ToggleRefinement', classNames.root, props.className)
|
|
24399
24539
|
}), /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -24410,12 +24550,12 @@
|
|
|
24410
24550
|
}, label)));
|
|
24411
24551
|
}
|
|
24412
24552
|
|
|
24413
|
-
var _excluded$
|
|
24553
|
+
var _excluded$_ = ["attribute", "on", "off"];
|
|
24414
24554
|
function ToggleRefinement$1(_ref) {
|
|
24415
24555
|
var attribute = _ref.attribute,
|
|
24416
24556
|
on = _ref.on,
|
|
24417
24557
|
off = _ref.off,
|
|
24418
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24558
|
+
props = _objectWithoutProperties$c(_ref, _excluded$_);
|
|
24419
24559
|
var _useToggleRefinement = useToggleRefinement({
|
|
24420
24560
|
attribute: attribute,
|
|
24421
24561
|
on: on,
|
|
@@ -24438,7 +24578,7 @@
|
|
|
24438
24578
|
}, props, uiProps));
|
|
24439
24579
|
}
|
|
24440
24580
|
|
|
24441
|
-
var _excluded
|
|
24581
|
+
var _excluded$$ = ["facetName", "facetValue", "limit", "threshold", "fallbackParameters", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
24442
24582
|
var TrendingItemsUiComponent = createTrendingItemsComponent({
|
|
24443
24583
|
createElement: React.createElement,
|
|
24444
24584
|
Fragment: React.Fragment
|
|
@@ -24456,7 +24596,7 @@
|
|
|
24456
24596
|
headerComponent = _ref.headerComponent,
|
|
24457
24597
|
emptyComponent = _ref.emptyComponent,
|
|
24458
24598
|
layoutComponent = _ref.layoutComponent,
|
|
24459
|
-
props = _objectWithoutProperties$c(_ref, _excluded
|
|
24599
|
+
props = _objectWithoutProperties$c(_ref, _excluded$$);
|
|
24460
24600
|
var facetParameters = facetName && facetValue ? {
|
|
24461
24601
|
facetName: facetName,
|
|
24462
24602
|
facetValue: facetValue
|
|
@@ -24563,6 +24703,7 @@
|
|
|
24563
24703
|
exports.RecommendToolType = RecommendToolType;
|
|
24564
24704
|
exports.RefinementList = RefinementList$2;
|
|
24565
24705
|
exports.RelatedProducts = RelatedProducts;
|
|
24706
|
+
exports.ReverseHighlight = ReverseHighlight$1;
|
|
24566
24707
|
exports.SearchBox = SearchBox$1;
|
|
24567
24708
|
exports.SearchIndexToolType = SearchIndexToolType;
|
|
24568
24709
|
exports.Snippet = Snippet$1;
|