react-instantsearch 7.18.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 +117 -30
- package/dist/cjs/widgets/Chat.js +34 -25
- 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 +25 -1
- package/dist/es/widgets/Autocomplete.js +117 -30
- package/dist/es/widgets/Chat.d.ts +10 -6
- package/dist/es/widgets/Chat.js +34 -25
- 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 +766 -320
- 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
|
//
|
|
@@ -4360,8 +4360,8 @@
|
|
|
4360
4360
|
|
|
4361
4361
|
return recSort(
|
|
4362
4362
|
function (data, facetName) {
|
|
4363
|
+
var facetOrdering = getFacetOrdering(results, facetName);
|
|
4363
4364
|
if (options.facetOrdering) {
|
|
4364
|
-
var facetOrdering = getFacetOrdering(results, facetName);
|
|
4365
4365
|
if (facetOrdering) {
|
|
4366
4366
|
return sortViaFacetOrdering(data, facetOrdering);
|
|
4367
4367
|
}
|
|
@@ -4369,7 +4369,24 @@
|
|
|
4369
4369
|
|
|
4370
4370
|
if (Array.isArray(options.sortBy)) {
|
|
4371
4371
|
var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT);
|
|
4372
|
-
|
|
4372
|
+
var items = orderBy_1(data, order[0], order[1]);
|
|
4373
|
+
|
|
4374
|
+
var hide =
|
|
4375
|
+
facetOrdering && facetOrdering.hide ? facetOrdering.hide : [];
|
|
4376
|
+
if (hide.length > 0) {
|
|
4377
|
+
var visible = [];
|
|
4378
|
+
items.forEach(function (item) {
|
|
4379
|
+
// hierarchical facets get sorted using their raw name
|
|
4380
|
+
var name = item.path || item.name;
|
|
4381
|
+
if (hide.indexOf(name) === -1) {
|
|
4382
|
+
visible.push(item);
|
|
4383
|
+
}
|
|
4384
|
+
});
|
|
4385
|
+
|
|
4386
|
+
return visible;
|
|
4387
|
+
}
|
|
4388
|
+
|
|
4389
|
+
return items;
|
|
4373
4390
|
} else if (typeof options.sortBy === 'function') {
|
|
4374
4391
|
return vanillaSortFn(options.sortBy, data);
|
|
4375
4392
|
}
|
|
@@ -4634,7 +4651,7 @@
|
|
|
4634
4651
|
|
|
4635
4652
|
var sortAndMergeRecommendations_1 = sortAndMergeRecommendations;
|
|
4636
4653
|
|
|
4637
|
-
var version$1 = '3.26.
|
|
4654
|
+
var version$1 = '3.26.1';
|
|
4638
4655
|
|
|
4639
4656
|
var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
|
|
4640
4657
|
|
|
@@ -5087,16 +5104,19 @@
|
|
|
5087
5104
|
|
|
5088
5105
|
content = Array.isArray(content) ? content[0] : content;
|
|
5089
5106
|
|
|
5090
|
-
content.facetHits.
|
|
5107
|
+
content.facetHits = content.facetHits.reduce(function (acc, f) {
|
|
5091
5108
|
if (hide.indexOf(f.value) > -1) {
|
|
5092
|
-
|
|
5093
|
-
return;
|
|
5109
|
+
return acc;
|
|
5094
5110
|
}
|
|
5111
|
+
|
|
5095
5112
|
f.escapedValue = escapeFacetValue$3(f.value);
|
|
5096
5113
|
f.isRefined = isDisjunctive
|
|
5097
5114
|
? state.isDisjunctiveFacetRefined(facet, f.escapedValue)
|
|
5098
5115
|
: state.isFacetRefined(facet, f.escapedValue);
|
|
5099
|
-
|
|
5116
|
+
|
|
5117
|
+
acc.push(f);
|
|
5118
|
+
return acc;
|
|
5119
|
+
}, []);
|
|
5100
5120
|
|
|
5101
5121
|
return content;
|
|
5102
5122
|
},
|
|
@@ -10496,6 +10516,12 @@
|
|
|
10496
10516
|
helper: helper
|
|
10497
10517
|
})));
|
|
10498
10518
|
},
|
|
10519
|
+
scheduleLocalSearch: defer(function () {
|
|
10520
|
+
if (isolated) {
|
|
10521
|
+
var _helper2;
|
|
10522
|
+
(_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.search();
|
|
10523
|
+
}
|
|
10524
|
+
}),
|
|
10499
10525
|
getWidgets: function getWidgets() {
|
|
10500
10526
|
return localWidgets;
|
|
10501
10527
|
},
|
|
@@ -10561,8 +10587,7 @@
|
|
|
10561
10587
|
}
|
|
10562
10588
|
});
|
|
10563
10589
|
if (isolated) {
|
|
10564
|
-
|
|
10565
|
-
(_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.search();
|
|
10590
|
+
this.scheduleLocalSearch();
|
|
10566
10591
|
} else {
|
|
10567
10592
|
localInstantSearchInstance.scheduleSearch();
|
|
10568
10593
|
}
|
|
@@ -10641,8 +10666,7 @@
|
|
|
10641
10666
|
helper.recommendState = cleanedRecommendState;
|
|
10642
10667
|
if (localWidgets.length) {
|
|
10643
10668
|
if (isolated) {
|
|
10644
|
-
|
|
10645
|
-
(_helper3 = helper) === null || _helper3 === void 0 ? void 0 : _helper3.search();
|
|
10669
|
+
this.scheduleLocalSearch();
|
|
10646
10670
|
} else {
|
|
10647
10671
|
localInstantSearchInstance.scheduleSearch();
|
|
10648
10672
|
}
|
|
@@ -10714,12 +10738,6 @@
|
|
|
10714
10738
|
helper.searchWithoutTriggeringOnStateChange = function () {
|
|
10715
10739
|
return mainHelper.search();
|
|
10716
10740
|
};
|
|
10717
|
-
|
|
10718
|
-
// We use the same pattern for the `searchForFacetValues`.
|
|
10719
|
-
helper.searchForFacetValues = function (facetName, facetValue, maxFacetHits, userState) {
|
|
10720
|
-
var state = helper.state.setQueryParameters(userState);
|
|
10721
|
-
return mainHelper.searchForFacetValues(facetName, facetValue, maxFacetHits, state);
|
|
10722
|
-
};
|
|
10723
10741
|
var isolatedHelper = indexName ? helper : algoliasearchHelper_1({}, '__empty_index__', {});
|
|
10724
10742
|
var derivingHelper = isolated ? isolatedHelper : nearestIsolatedHelper(parent, mainHelper);
|
|
10725
10743
|
derivedHelper = derivingHelper.derive(function () {
|
|
@@ -10892,7 +10910,7 @@
|
|
|
10892
10910
|
},
|
|
10893
10911
|
dispose: function dispose() {
|
|
10894
10912
|
var _this5 = this,
|
|
10895
|
-
|
|
10913
|
+
_helper3,
|
|
10896
10914
|
_derivedHelper3;
|
|
10897
10915
|
localWidgets.forEach(function (widget) {
|
|
10898
10916
|
if (widget.dispose && helper) {
|
|
@@ -10912,7 +10930,7 @@
|
|
|
10912
10930
|
});
|
|
10913
10931
|
localInstantSearchInstance = null;
|
|
10914
10932
|
localParent = null;
|
|
10915
|
-
(
|
|
10933
|
+
(_helper3 = helper) === null || _helper3 === void 0 ? void 0 : _helper3.removeAllListeners();
|
|
10916
10934
|
helper = null;
|
|
10917
10935
|
(_derivedHelper3 = derivedHelper) === null || _derivedHelper3 === void 0 ? void 0 : _derivedHelper3.detach();
|
|
10918
10936
|
derivedHelper = null;
|
|
@@ -13333,7 +13351,7 @@
|
|
|
13333
13351
|
};
|
|
13334
13352
|
}
|
|
13335
13353
|
|
|
13336
|
-
var version$3 = '4.
|
|
13354
|
+
var version$3 = '4.84.0';
|
|
13337
13355
|
|
|
13338
13356
|
function _typeof$q(o) {
|
|
13339
13357
|
"@babel/helpers - typeof";
|
|
@@ -20809,6 +20827,15 @@
|
|
|
20809
20827
|
var i = _toPrimitive$N(t, "string");
|
|
20810
20828
|
return "symbol" == typeof i ? i : i + "";
|
|
20811
20829
|
}
|
|
20830
|
+
function _typeof$S(o) {
|
|
20831
|
+
"@babel/helpers - typeof";
|
|
20832
|
+
|
|
20833
|
+
return _typeof$S = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
20834
|
+
return typeof o;
|
|
20835
|
+
} : function (o) {
|
|
20836
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
20837
|
+
}, _typeof$S(o);
|
|
20838
|
+
}
|
|
20812
20839
|
function _unsupportedIterableToArray$n(r, a) {
|
|
20813
20840
|
if (r) {
|
|
20814
20841
|
if ("string" == typeof r) return _arrayLikeToArray$n(r, a);
|
|
@@ -20941,117 +20968,6 @@
|
|
|
20941
20968
|
};
|
|
20942
20969
|
}
|
|
20943
20970
|
|
|
20944
|
-
function AutocompleteSubmitIcon(_ref) {
|
|
20945
|
-
var createElement = _ref.createElement;
|
|
20946
|
-
return createElement("svg", {
|
|
20947
|
-
className: "ais-AutocompleteSubmitIcon",
|
|
20948
|
-
viewBox: "0 0 24 24",
|
|
20949
|
-
width: "20",
|
|
20950
|
-
height: "20",
|
|
20951
|
-
fill: "currentColor"
|
|
20952
|
-
}, createElement("path", {
|
|
20953
|
-
d: "M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"
|
|
20954
|
-
}));
|
|
20955
|
-
}
|
|
20956
|
-
function AutocompleteLoadingIcon(_ref2) {
|
|
20957
|
-
var createElement = _ref2.createElement;
|
|
20958
|
-
return createElement("svg", {
|
|
20959
|
-
className: "ais-AutocompleteLoadingIcon",
|
|
20960
|
-
viewBox: "0 0 100 100",
|
|
20961
|
-
width: "20",
|
|
20962
|
-
height: "20"
|
|
20963
|
-
}, createElement("circle", {
|
|
20964
|
-
cx: "50",
|
|
20965
|
-
cy: "50",
|
|
20966
|
-
fill: "none",
|
|
20967
|
-
r: "35",
|
|
20968
|
-
stroke: "currentColor",
|
|
20969
|
-
strokeDasharray: "164.93361431346415 56.97787143782138",
|
|
20970
|
-
strokeWidth: "6"
|
|
20971
|
-
}, createElement("animateTransform", {
|
|
20972
|
-
attributeName: "transform",
|
|
20973
|
-
type: "rotate",
|
|
20974
|
-
repeatCount: "indefinite",
|
|
20975
|
-
dur: "1s",
|
|
20976
|
-
values: "0 50 50;90 50 50;180 50 50;360 50 50",
|
|
20977
|
-
keyTimes: "0;0.40;0.65;1"
|
|
20978
|
-
})));
|
|
20979
|
-
}
|
|
20980
|
-
function AutocompleteClearIcon(_ref3) {
|
|
20981
|
-
var createElement = _ref3.createElement;
|
|
20982
|
-
return createElement("svg", {
|
|
20983
|
-
className: "ais-AutocompleteClearIcon",
|
|
20984
|
-
viewBox: "0 0 24 24",
|
|
20985
|
-
width: "18",
|
|
20986
|
-
height: "18",
|
|
20987
|
-
fill: "currentColor"
|
|
20988
|
-
}, createElement("path", {
|
|
20989
|
-
d: "M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"
|
|
20990
|
-
}));
|
|
20991
|
-
}
|
|
20992
|
-
|
|
20993
|
-
function createAutocompleteSearchComponent(_ref) {
|
|
20994
|
-
var createElement = _ref.createElement;
|
|
20995
|
-
return function AutocompleteSearch(_ref2) {
|
|
20996
|
-
var inputProps = _ref2.inputProps,
|
|
20997
|
-
onClear = _ref2.onClear,
|
|
20998
|
-
query = _ref2.query,
|
|
20999
|
-
isSearchStalled = _ref2.isSearchStalled;
|
|
21000
|
-
return createElement("form", {
|
|
21001
|
-
className: "ais-AutocompleteForm",
|
|
21002
|
-
action: "",
|
|
21003
|
-
noValidate: true,
|
|
21004
|
-
role: "search",
|
|
21005
|
-
onSubmit: function onSubmit(e) {
|
|
21006
|
-
return e.preventDefault();
|
|
21007
|
-
}
|
|
21008
|
-
}, createElement("div", {
|
|
21009
|
-
className: "ais-AutocompleteInputWrapperPrefix"
|
|
21010
|
-
}, createElement("label", {
|
|
21011
|
-
className: "ais-AutocompleteLabel",
|
|
21012
|
-
"aria-label": "Submit",
|
|
21013
|
-
htmlFor: inputProps.id,
|
|
21014
|
-
id: "".concat(inputProps.id, "-label")
|
|
21015
|
-
}, createElement("button", {
|
|
21016
|
-
className: "ais-AutocompleteSubmitButton",
|
|
21017
|
-
type: "submit",
|
|
21018
|
-
title: "Submit"
|
|
21019
|
-
}, createElement(AutocompleteSubmitIcon, {
|
|
21020
|
-
createElement: createElement
|
|
21021
|
-
}))), createElement("div", {
|
|
21022
|
-
className: "ais-AutocompleteLoadingIndicator",
|
|
21023
|
-
hidden: !isSearchStalled
|
|
21024
|
-
}, createElement(AutocompleteLoadingIcon, {
|
|
21025
|
-
createElement: createElement
|
|
21026
|
-
}))), createElement("div", {
|
|
21027
|
-
className: "ais-AutocompleteInputWrapper"
|
|
21028
|
-
}, createElement("input", _extends$2({
|
|
21029
|
-
className: "ais-AutocompleteInput",
|
|
21030
|
-
"aria-autocomplete": "both",
|
|
21031
|
-
"aria-labelledby": "".concat(inputProps.id, "-label"),
|
|
21032
|
-
autoComplete: "off",
|
|
21033
|
-
autoCorrect: "off",
|
|
21034
|
-
autoCapitalize: "off",
|
|
21035
|
-
enterKeyHint: "search",
|
|
21036
|
-
spellCheck: "false",
|
|
21037
|
-
placeholder: "",
|
|
21038
|
-
maxLength: 512,
|
|
21039
|
-
type: "search",
|
|
21040
|
-
value: query
|
|
21041
|
-
}, inputProps))), createElement("div", {
|
|
21042
|
-
className: "ais-AutocompleteInputWrapperSuffix"
|
|
21043
|
-
}, createElement("button", {
|
|
21044
|
-
className: "ais-AutocompleteClearButton",
|
|
21045
|
-
type: "reset",
|
|
21046
|
-
title: "Clear",
|
|
21047
|
-
hidden: query.length === 0 || isSearchStalled,
|
|
21048
|
-
onClick: onClear
|
|
21049
|
-
}, createElement(AutocompleteClearIcon, {
|
|
21050
|
-
createElement: createElement
|
|
21051
|
-
}))));
|
|
21052
|
-
};
|
|
21053
|
-
}
|
|
21054
|
-
|
|
21055
20971
|
var _typeof_1 = createCommonjsModule(function (module) {
|
|
21056
20972
|
function _typeof(o) {
|
|
21057
20973
|
"@babel/helpers - typeof";
|
|
@@ -21065,7 +20981,7 @@
|
|
|
21065
20981
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
21066
20982
|
});
|
|
21067
20983
|
|
|
21068
|
-
var _typeof$
|
|
20984
|
+
var _typeof$T = unwrapExports(_typeof_1);
|
|
21069
20985
|
|
|
21070
20986
|
var toPrimitive_1 = createCommonjsModule(function (module) {
|
|
21071
20987
|
var _typeof = _typeof_1["default"];
|
|
@@ -21194,73 +21110,251 @@
|
|
|
21194
21110
|
|
|
21195
21111
|
var _slicedToArray$h = unwrapExports(slicedToArray);
|
|
21196
21112
|
|
|
21197
|
-
function
|
|
21113
|
+
function AutocompleteSubmitIcon(_ref) {
|
|
21198
21114
|
var createElement = _ref.createElement;
|
|
21199
|
-
return
|
|
21115
|
+
return createElement("svg", {
|
|
21116
|
+
className: "ais-AutocompleteSubmitIcon",
|
|
21117
|
+
viewBox: "0 0 24 24",
|
|
21118
|
+
width: "20",
|
|
21119
|
+
height: "20",
|
|
21120
|
+
fill: "currentColor"
|
|
21121
|
+
}, createElement("path", {
|
|
21122
|
+
d: "M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"
|
|
21123
|
+
}));
|
|
21124
|
+
}
|
|
21125
|
+
function AutocompleteLoadingIcon(_ref2) {
|
|
21126
|
+
var createElement = _ref2.createElement;
|
|
21127
|
+
return createElement("svg", {
|
|
21128
|
+
className: "ais-AutocompleteLoadingIcon",
|
|
21129
|
+
viewBox: "0 0 100 100",
|
|
21130
|
+
width: "20",
|
|
21131
|
+
height: "20"
|
|
21132
|
+
}, createElement("circle", {
|
|
21133
|
+
cx: "50",
|
|
21134
|
+
cy: "50",
|
|
21135
|
+
fill: "none",
|
|
21136
|
+
r: "35",
|
|
21137
|
+
stroke: "currentColor",
|
|
21138
|
+
strokeDasharray: "164.93361431346415 56.97787143782138",
|
|
21139
|
+
strokeWidth: "6"
|
|
21140
|
+
}, createElement("animateTransform", {
|
|
21141
|
+
attributeName: "transform",
|
|
21142
|
+
type: "rotate",
|
|
21143
|
+
repeatCount: "indefinite",
|
|
21144
|
+
dur: "1s",
|
|
21145
|
+
values: "0 50 50;90 50 50;180 50 50;360 50 50",
|
|
21146
|
+
keyTimes: "0;0.40;0.65;1"
|
|
21147
|
+
})));
|
|
21148
|
+
}
|
|
21149
|
+
function AutocompleteClearIcon(_ref3) {
|
|
21150
|
+
var createElement = _ref3.createElement;
|
|
21151
|
+
return createElement("svg", {
|
|
21152
|
+
className: "ais-AutocompleteClearIcon",
|
|
21153
|
+
viewBox: "0 0 24 24",
|
|
21154
|
+
width: "18",
|
|
21155
|
+
height: "18",
|
|
21156
|
+
fill: "currentColor"
|
|
21157
|
+
}, createElement("path", {
|
|
21158
|
+
d: "M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"
|
|
21159
|
+
}));
|
|
21160
|
+
}
|
|
21161
|
+
function AutocompleteClockIcon(_ref4) {
|
|
21162
|
+
var createElement = _ref4.createElement;
|
|
21163
|
+
return createElement("svg", {
|
|
21164
|
+
viewBox: "0 0 24 24",
|
|
21165
|
+
fill: "currentColor"
|
|
21166
|
+
}, createElement("path", {
|
|
21167
|
+
d: "M12.516 6.984v5.25l4.5 2.672-0.75 1.266-5.25-3.188v-6h1.5zM12 20.016q3.281 0 5.648-2.367t2.367-5.648-2.367-5.648-5.648-2.367-5.648 2.367-2.367 5.648 2.367 5.648 5.648 2.367zM12 2.016q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055-7.055 2.93-7.055-2.93-2.93-7.055 2.93-7.055 7.055-2.93z"
|
|
21168
|
+
}));
|
|
21169
|
+
}
|
|
21170
|
+
function AutocompleteTrashIcon(_ref5) {
|
|
21171
|
+
var createElement = _ref5.createElement;
|
|
21172
|
+
return createElement("svg", {
|
|
21173
|
+
viewBox: "0 0 24 24",
|
|
21174
|
+
fill: "currentColor"
|
|
21175
|
+
}, createElement("path", {
|
|
21176
|
+
d: "M18 7v13c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-10c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-13zM17 5v-1c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879h-4c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v1h-4c-0.552 0-1 0.448-1 1s0.448 1 1 1h1v13c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h10c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-13h1c0.552 0 1-0.448 1-1s-0.448-1-1-1zM9 5v-1c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293h4c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v1zM9 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1zM13 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1z"
|
|
21177
|
+
}));
|
|
21178
|
+
}
|
|
21179
|
+
|
|
21180
|
+
function createAutocompleteRecentSearchComponent(_ref) {
|
|
21181
|
+
var createElement = _ref.createElement;
|
|
21182
|
+
return function AutocompleteRecentSearch(_ref2) {
|
|
21200
21183
|
var item = _ref2.item,
|
|
21184
|
+
children = _ref2.children,
|
|
21201
21185
|
onSelect = _ref2.onSelect,
|
|
21186
|
+
onRemoveRecentSearch = _ref2.onRemoveRecentSearch,
|
|
21202
21187
|
_ref2$classNames = _ref2.classNames,
|
|
21203
21188
|
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames;
|
|
21204
21189
|
return createElement("div", {
|
|
21205
21190
|
onClick: onSelect,
|
|
21206
|
-
className: cx('ais-
|
|
21207
|
-
},
|
|
21191
|
+
className: cx('ais-AutocompleteItemWrapper ais-AutocompleteRecentSearchWrapper', classNames.root)
|
|
21192
|
+
}, createElement("div", {
|
|
21193
|
+
className: cx('ais-AutocompleteItemContent', 'ais-AutocompleteRecentSearchItemContent', classNames.content)
|
|
21194
|
+
}, createElement("div", {
|
|
21195
|
+
className: cx('ais-AutocompleteItemIcon', 'ais-AutocompleteRecentSearchItemIcon', classNames.content)
|
|
21196
|
+
}, createElement(AutocompleteClockIcon, {
|
|
21197
|
+
createElement: createElement
|
|
21198
|
+
})), createElement("div", {
|
|
21199
|
+
className: cx('ais-AutocompleteItemContentBody', 'ais-AutocompleteRecentSearchItemContentBody', classNames.content)
|
|
21200
|
+
}, children)), createElement("div", {
|
|
21201
|
+
className: cx('ais-AutocompleteItemActions', 'ais-AutocompleteRecentSearchItemActions', classNames.actions)
|
|
21202
|
+
}, createElement("button", {
|
|
21203
|
+
className: cx('ais-AutocompleteItemActionButton', 'ais-AutocompleteRecentSearchItemDeleteButton', classNames.deleteButton),
|
|
21204
|
+
title: "Remove ".concat(item.query, " from recent searches"),
|
|
21205
|
+
onClick: function onClick(evt) {
|
|
21206
|
+
evt.stopPropagation();
|
|
21207
|
+
onRemoveRecentSearch();
|
|
21208
|
+
}
|
|
21209
|
+
}, createElement(AutocompleteTrashIcon, {
|
|
21210
|
+
createElement: createElement
|
|
21211
|
+
}))));
|
|
21208
21212
|
};
|
|
21209
21213
|
}
|
|
21210
21214
|
|
|
21211
|
-
function
|
|
21212
|
-
var
|
|
21213
|
-
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
var
|
|
21219
|
-
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21226
|
-
|
|
21227
|
-
|
|
21228
|
-
|
|
21229
|
-
|
|
21230
|
-
|
|
21231
|
-
|
|
21232
|
-
|
|
21233
|
-
|
|
21234
|
-
|
|
21235
|
-
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
|
|
21241
|
-
|
|
21242
|
-
|
|
21243
|
-
|
|
21244
|
-
|
|
21245
|
-
|
|
21246
|
-
|
|
21247
|
-
|
|
21248
|
-
|
|
21249
|
-
|
|
21250
|
-
|
|
21251
|
-
|
|
21252
|
-
|
|
21253
|
-
|
|
21254
|
-
|
|
21255
|
-
|
|
21256
|
-
|
|
21257
|
-
|
|
21258
|
-
|
|
21259
|
-
|
|
21260
|
-
|
|
21261
|
-
|
|
21262
|
-
|
|
21263
|
-
|
|
21215
|
+
function createAutocompleteSearchComponent(_ref) {
|
|
21216
|
+
var createElement = _ref.createElement;
|
|
21217
|
+
return function AutocompleteSearch(_ref2) {
|
|
21218
|
+
var inputProps = _ref2.inputProps,
|
|
21219
|
+
onClear = _ref2.onClear,
|
|
21220
|
+
query = _ref2.query,
|
|
21221
|
+
isSearchStalled = _ref2.isSearchStalled;
|
|
21222
|
+
var inputRef = inputProps.ref;
|
|
21223
|
+
return createElement("form", {
|
|
21224
|
+
className: "ais-AutocompleteForm",
|
|
21225
|
+
action: "",
|
|
21226
|
+
noValidate: true,
|
|
21227
|
+
role: "search",
|
|
21228
|
+
onSubmit: function onSubmit(e) {
|
|
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();
|
|
21234
|
+
}
|
|
21235
|
+
}, createElement("div", {
|
|
21236
|
+
className: "ais-AutocompleteInputWrapperPrefix"
|
|
21237
|
+
}, createElement("label", {
|
|
21238
|
+
className: "ais-AutocompleteLabel",
|
|
21239
|
+
"aria-label": "Submit",
|
|
21240
|
+
htmlFor: inputProps.id,
|
|
21241
|
+
id: "".concat(inputProps.id, "-label")
|
|
21242
|
+
}, createElement("button", {
|
|
21243
|
+
className: "ais-AutocompleteSubmitButton",
|
|
21244
|
+
type: "submit",
|
|
21245
|
+
title: "Submit"
|
|
21246
|
+
}, createElement(AutocompleteSubmitIcon, {
|
|
21247
|
+
createElement: createElement
|
|
21248
|
+
}))), createElement("div", {
|
|
21249
|
+
className: "ais-AutocompleteLoadingIndicator",
|
|
21250
|
+
hidden: !isSearchStalled
|
|
21251
|
+
}, createElement(AutocompleteLoadingIcon, {
|
|
21252
|
+
createElement: createElement
|
|
21253
|
+
}))), createElement("div", {
|
|
21254
|
+
className: "ais-AutocompleteInputWrapper"
|
|
21255
|
+
}, createElement("input", _extends$2({
|
|
21256
|
+
className: "ais-AutocompleteInput",
|
|
21257
|
+
"aria-autocomplete": "both",
|
|
21258
|
+
"aria-labelledby": "".concat(inputProps.id, "-label"),
|
|
21259
|
+
autoComplete: "off",
|
|
21260
|
+
autoCorrect: "off",
|
|
21261
|
+
autoCapitalize: "off",
|
|
21262
|
+
enterKeyHint: "search",
|
|
21263
|
+
spellCheck: "false",
|
|
21264
|
+
placeholder: "",
|
|
21265
|
+
maxLength: 512,
|
|
21266
|
+
type: "search",
|
|
21267
|
+
value: query
|
|
21268
|
+
}, inputProps))), createElement("div", {
|
|
21269
|
+
className: "ais-AutocompleteInputWrapperSuffix"
|
|
21270
|
+
}, createElement("button", {
|
|
21271
|
+
className: "ais-AutocompleteClearButton",
|
|
21272
|
+
type: "reset",
|
|
21273
|
+
title: "Clear",
|
|
21274
|
+
hidden: query.length === 0 || isSearchStalled,
|
|
21275
|
+
onClick: onClear
|
|
21276
|
+
}, createElement(AutocompleteClearIcon, {
|
|
21277
|
+
createElement: createElement
|
|
21278
|
+
}))));
|
|
21279
|
+
};
|
|
21280
|
+
}
|
|
21281
|
+
|
|
21282
|
+
function createAutocompleteSuggestionComponent(_ref) {
|
|
21283
|
+
var createElement = _ref.createElement;
|
|
21284
|
+
return function AutocompleteSuggestion(_ref2) {
|
|
21285
|
+
var children = _ref2.children,
|
|
21286
|
+
onSelect = _ref2.onSelect,
|
|
21287
|
+
_ref2$classNames = _ref2.classNames,
|
|
21288
|
+
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames;
|
|
21289
|
+
return createElement("div", {
|
|
21290
|
+
onClick: onSelect,
|
|
21291
|
+
className: cx('ais-AutocompleteItemWrapper', 'ais-AutocompleteSuggestionWrapper', classNames.root)
|
|
21292
|
+
}, createElement("div", {
|
|
21293
|
+
className: cx('ais-AutocompleteItemContent', 'ais-AutocompleteSuggestionItemContent', classNames.content)
|
|
21294
|
+
}, createElement("div", {
|
|
21295
|
+
className: cx('ais-AutocompleteItemIcon', 'ais-AutocompleteSuggestionItemIcon', classNames.content)
|
|
21296
|
+
}, createElement(AutocompleteSubmitIcon, {
|
|
21297
|
+
createElement: createElement
|
|
21298
|
+
})), createElement("div", {
|
|
21299
|
+
className: cx('ais-AutocompleteItemContentBody', 'ais-AutocompleteSuggestionItemContentBody', classNames.content)
|
|
21300
|
+
}, children)));
|
|
21301
|
+
};
|
|
21302
|
+
}
|
|
21303
|
+
|
|
21304
|
+
function createAutocompletePropGetters(_ref) {
|
|
21305
|
+
var useEffect = _ref.useEffect,
|
|
21306
|
+
useId = _ref.useId,
|
|
21307
|
+
useMemo = _ref.useMemo,
|
|
21308
|
+
useRef = _ref.useRef,
|
|
21309
|
+
useState = _ref.useState;
|
|
21310
|
+
return function usePropGetters(_ref2) {
|
|
21311
|
+
var indices = _ref2.indices,
|
|
21312
|
+
indicesConfig = _ref2.indicesConfig,
|
|
21313
|
+
onRefine = _ref2.onRefine,
|
|
21314
|
+
globalOnSelect = _ref2.onSelect;
|
|
21315
|
+
var getElementId = createGetElementId(useId());
|
|
21316
|
+
var inputRef = useRef(null);
|
|
21317
|
+
var rootRef = useRef(null);
|
|
21318
|
+
var _useState = useState(false),
|
|
21319
|
+
_useState2 = _slicedToArray$h(_useState, 2),
|
|
21320
|
+
isOpen = _useState2[0],
|
|
21321
|
+
setIsOpen = _useState2[1];
|
|
21322
|
+
var _useState3 = useState(undefined),
|
|
21323
|
+
_useState4 = _slicedToArray$h(_useState3, 2),
|
|
21324
|
+
activeDescendant = _useState4[0],
|
|
21325
|
+
setActiveDescendant = _useState4[1];
|
|
21326
|
+
var _useMemo = useMemo(function () {
|
|
21327
|
+
return buildItems({
|
|
21328
|
+
indices: indices,
|
|
21329
|
+
indicesConfig: indicesConfig,
|
|
21330
|
+
getElementId: getElementId
|
|
21331
|
+
});
|
|
21332
|
+
}, [indices, indicesConfig, getElementId]),
|
|
21333
|
+
items = _useMemo.items,
|
|
21334
|
+
itemsIds = _useMemo.itemsIds;
|
|
21335
|
+
useEffect(function () {
|
|
21336
|
+
var onBodyClick = function onBodyClick(event) {
|
|
21337
|
+
var _unwrapRef;
|
|
21338
|
+
if ((_unwrapRef = unwrapRef(rootRef)) !== null && _unwrapRef !== void 0 && _unwrapRef.contains(event.target)) {
|
|
21339
|
+
return;
|
|
21340
|
+
}
|
|
21341
|
+
setIsOpen(false);
|
|
21342
|
+
};
|
|
21343
|
+
document.body.addEventListener('click', onBodyClick);
|
|
21344
|
+
return function () {
|
|
21345
|
+
document.body.removeEventListener('click', onBodyClick);
|
|
21346
|
+
};
|
|
21347
|
+
}, [rootRef]);
|
|
21348
|
+
var getNextActiveDescendant = function getNextActiveDescendant(key) {
|
|
21349
|
+
switch (key) {
|
|
21350
|
+
case 'ArrowLeft':
|
|
21351
|
+
case 'ArrowUp':
|
|
21352
|
+
{
|
|
21353
|
+
var prevIndex = itemsIds.indexOf(activeDescendant || '') - 1;
|
|
21354
|
+
return itemsIds[prevIndex] || itemsIds[itemsIds.length - 1];
|
|
21355
|
+
}
|
|
21356
|
+
case 'ArrowRight':
|
|
21357
|
+
case 'ArrowDown':
|
|
21264
21358
|
{
|
|
21265
21359
|
var nextIndex = itemsIds.indexOf(activeDescendant || '') + 1;
|
|
21266
21360
|
return itemsIds[nextIndex] || itemsIds[0];
|
|
@@ -21270,11 +21364,21 @@
|
|
|
21270
21364
|
}
|
|
21271
21365
|
};
|
|
21272
21366
|
var submit = function submit() {
|
|
21273
|
-
var
|
|
21274
|
-
|
|
21275
|
-
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)) {
|
|
21276
21380
|
var _getQuery;
|
|
21277
|
-
var _ref3 = items.get(
|
|
21381
|
+
var _ref3 = items.get(actualDescendant),
|
|
21278
21382
|
_item = _ref3.item,
|
|
21279
21383
|
_ref3$config = _ref3.config,
|
|
21280
21384
|
indexOnSelect = _ref3$config.onSelect,
|
|
@@ -21296,6 +21400,7 @@
|
|
|
21296
21400
|
getInputProps: function getInputProps() {
|
|
21297
21401
|
return {
|
|
21298
21402
|
id: getElementId('input'),
|
|
21403
|
+
ref: inputRef,
|
|
21299
21404
|
role: 'combobox',
|
|
21300
21405
|
'aria-autocomplete': 'list',
|
|
21301
21406
|
'aria-expanded': isOpen,
|
|
@@ -21306,33 +21411,42 @@
|
|
|
21306
21411
|
return setIsOpen(true);
|
|
21307
21412
|
},
|
|
21308
21413
|
onKeyDown: function onKeyDown(event) {
|
|
21309
|
-
if (event.key === 'Escape') {
|
|
21310
|
-
setActiveDescendant(undefined);
|
|
21311
|
-
setIsOpen(false);
|
|
21312
|
-
return;
|
|
21313
|
-
}
|
|
21314
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
|
+
}
|
|
21315
21425
|
case 'ArrowLeft':
|
|
21316
21426
|
case 'ArrowUp':
|
|
21317
21427
|
case 'ArrowRight':
|
|
21318
21428
|
case 'ArrowDown':
|
|
21319
21429
|
{
|
|
21320
21430
|
var _document$getElementB;
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
(
|
|
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);
|
|
21324
21435
|
event.preventDefault();
|
|
21325
21436
|
break;
|
|
21326
21437
|
}
|
|
21327
21438
|
case 'Enter':
|
|
21328
21439
|
{
|
|
21329
|
-
submit(
|
|
21440
|
+
submit({
|
|
21441
|
+
query: event.target.value
|
|
21442
|
+
});
|
|
21330
21443
|
break;
|
|
21331
21444
|
}
|
|
21332
21445
|
case 'Tab':
|
|
21333
21446
|
setIsOpen(false);
|
|
21334
21447
|
break;
|
|
21335
21448
|
default:
|
|
21449
|
+
setIsOpen(true);
|
|
21336
21450
|
return;
|
|
21337
21451
|
}
|
|
21338
21452
|
},
|
|
@@ -21360,7 +21474,9 @@
|
|
|
21360
21474
|
role: 'row',
|
|
21361
21475
|
'aria-selected': id === activeDescendant,
|
|
21362
21476
|
onSelect: function onSelect() {
|
|
21363
|
-
return submit(
|
|
21477
|
+
return submit({
|
|
21478
|
+
activeDescendant: id
|
|
21479
|
+
});
|
|
21364
21480
|
}
|
|
21365
21481
|
};
|
|
21366
21482
|
},
|
|
@@ -21418,10 +21534,210 @@
|
|
|
21418
21534
|
* Returns the framework-agnostic value of a ref.
|
|
21419
21535
|
*/
|
|
21420
21536
|
function unwrapRef(ref) {
|
|
21421
|
-
return ref.current && _typeof$
|
|
21537
|
+
return ref.current && _typeof$T(ref.current) === 'object' && 'base' in ref.current ? ref.current.base // Preact
|
|
21422
21538
|
: ref.current; // React
|
|
21423
21539
|
}
|
|
21424
21540
|
|
|
21541
|
+
var arrayWithoutHoles = createCommonjsModule(function (module) {
|
|
21542
|
+
function _arrayWithoutHoles(r) {
|
|
21543
|
+
if (Array.isArray(r)) return arrayLikeToArray(r);
|
|
21544
|
+
}
|
|
21545
|
+
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
21546
|
+
});
|
|
21547
|
+
|
|
21548
|
+
unwrapExports(arrayWithoutHoles);
|
|
21549
|
+
|
|
21550
|
+
var iterableToArray = createCommonjsModule(function (module) {
|
|
21551
|
+
function _iterableToArray(r) {
|
|
21552
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
21553
|
+
}
|
|
21554
|
+
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
21555
|
+
});
|
|
21556
|
+
|
|
21557
|
+
unwrapExports(iterableToArray);
|
|
21558
|
+
|
|
21559
|
+
var nonIterableSpread = createCommonjsModule(function (module) {
|
|
21560
|
+
function _nonIterableSpread() {
|
|
21561
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
21562
|
+
}
|
|
21563
|
+
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
21564
|
+
});
|
|
21565
|
+
|
|
21566
|
+
unwrapExports(nonIterableSpread);
|
|
21567
|
+
|
|
21568
|
+
var toConsumableArray = createCommonjsModule(function (module) {
|
|
21569
|
+
function _toConsumableArray(r) {
|
|
21570
|
+
return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();
|
|
21571
|
+
}
|
|
21572
|
+
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
21573
|
+
});
|
|
21574
|
+
|
|
21575
|
+
var _toConsumableArray$9 = unwrapExports(toConsumableArray);
|
|
21576
|
+
|
|
21577
|
+
function createAutocompleteStorage(_ref) {
|
|
21578
|
+
var useEffect = _ref.useEffect,
|
|
21579
|
+
useMemo = _ref.useMemo,
|
|
21580
|
+
useState = _ref.useState;
|
|
21581
|
+
return function useStorage(_ref2) {
|
|
21582
|
+
var showRecent = _ref2.showRecent,
|
|
21583
|
+
query = _ref2.query,
|
|
21584
|
+
indices = _ref2.indices,
|
|
21585
|
+
indicesConfig = _ref2.indicesConfig;
|
|
21586
|
+
var storageKey = showRecent && _typeof$T(showRecent) === 'object' ? showRecent.storageKey : undefined;
|
|
21587
|
+
var storage = useMemo(function () {
|
|
21588
|
+
return createStorage({
|
|
21589
|
+
limit: 5,
|
|
21590
|
+
storageKey: storageKey
|
|
21591
|
+
});
|
|
21592
|
+
}, [storageKey]);
|
|
21593
|
+
var _useState = useState(storage.getSnapshot()),
|
|
21594
|
+
_useState2 = _slicedToArray$h(_useState, 2),
|
|
21595
|
+
snapshot = _useState2[0],
|
|
21596
|
+
setSnapshot = _useState2[1];
|
|
21597
|
+
useEffect(function () {
|
|
21598
|
+
storage.registerUpdateListener(function () {
|
|
21599
|
+
setSnapshot(storage.getSnapshot());
|
|
21600
|
+
});
|
|
21601
|
+
return function () {
|
|
21602
|
+
storage.unregisterUpdateListener();
|
|
21603
|
+
};
|
|
21604
|
+
}, [storage]);
|
|
21605
|
+
if (!showRecent) {
|
|
21606
|
+
return {
|
|
21607
|
+
storage: {
|
|
21608
|
+
onAdd: function onAdd() {},
|
|
21609
|
+
onRemove: function onRemove() {}
|
|
21610
|
+
},
|
|
21611
|
+
storageHits: [],
|
|
21612
|
+
indicesForPropGetters: indices,
|
|
21613
|
+
indicesConfigForPropGetters: indicesConfig
|
|
21614
|
+
};
|
|
21615
|
+
}
|
|
21616
|
+
var storageHits = snapshot.getAll(query).map(function (value) {
|
|
21617
|
+
return {
|
|
21618
|
+
objectID: value,
|
|
21619
|
+
query: value,
|
|
21620
|
+
__indexName: 'recent-searches',
|
|
21621
|
+
_highlightResult: getHighlightedAttribute({
|
|
21622
|
+
item: {
|
|
21623
|
+
query: value
|
|
21624
|
+
},
|
|
21625
|
+
query: query || ''
|
|
21626
|
+
})
|
|
21627
|
+
};
|
|
21628
|
+
});
|
|
21629
|
+
var indicesForPropGetters = _toConsumableArray$9(indices);
|
|
21630
|
+
var indicesConfigForPropGetters = _toConsumableArray$9(indicesConfig);
|
|
21631
|
+
indicesForPropGetters.unshift({
|
|
21632
|
+
indexName: 'recent-searches',
|
|
21633
|
+
indexId: 'recent-searches',
|
|
21634
|
+
hits: storageHits
|
|
21635
|
+
});
|
|
21636
|
+
indicesConfigForPropGetters.unshift({
|
|
21637
|
+
indexName: 'recent-searches',
|
|
21638
|
+
// @ts-expect-error - we know it has query as it's generated from storageHits
|
|
21639
|
+
getQuery: function getQuery(item) {
|
|
21640
|
+
return item.query;
|
|
21641
|
+
}
|
|
21642
|
+
});
|
|
21643
|
+
return {
|
|
21644
|
+
storage: storage,
|
|
21645
|
+
storageHits: storageHits,
|
|
21646
|
+
indicesForPropGetters: indicesForPropGetters,
|
|
21647
|
+
indicesConfigForPropGetters: indicesConfigForPropGetters
|
|
21648
|
+
};
|
|
21649
|
+
};
|
|
21650
|
+
}
|
|
21651
|
+
var LOCAL_STORAGE_KEY_TEST = 'test-localstorage-support';
|
|
21652
|
+
var LOCAL_STORAGE_KEY = 'autocomplete-recent-searches';
|
|
21653
|
+
function isLocalStorageSupported() {
|
|
21654
|
+
try {
|
|
21655
|
+
localStorage.setItem(LOCAL_STORAGE_KEY_TEST, '');
|
|
21656
|
+
localStorage.removeItem(LOCAL_STORAGE_KEY_TEST);
|
|
21657
|
+
return true;
|
|
21658
|
+
} catch (error) {
|
|
21659
|
+
return false;
|
|
21660
|
+
}
|
|
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
|
+
}
|
|
21680
|
+
function getLocalStorage() {
|
|
21681
|
+
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LOCAL_STORAGE_KEY;
|
|
21682
|
+
if (!isLocalStorageSupported()) {
|
|
21683
|
+
return {
|
|
21684
|
+
setItems: function setItems() {},
|
|
21685
|
+
getItems: function getItems() {
|
|
21686
|
+
return [];
|
|
21687
|
+
}
|
|
21688
|
+
};
|
|
21689
|
+
}
|
|
21690
|
+
return {
|
|
21691
|
+
setItems: function setItems(items) {
|
|
21692
|
+
try {
|
|
21693
|
+
window.localStorage.setItem(key, JSON.stringify(items));
|
|
21694
|
+
} catch (_unused) {
|
|
21695
|
+
// do nothing, this likely means the storage is full
|
|
21696
|
+
}
|
|
21697
|
+
},
|
|
21698
|
+
getItems: function getItems() {
|
|
21699
|
+
var items = window.localStorage.getItem(key);
|
|
21700
|
+
return items ? JSON.parse(items) : [];
|
|
21701
|
+
}
|
|
21702
|
+
};
|
|
21703
|
+
}
|
|
21704
|
+
function createStorage(_ref4) {
|
|
21705
|
+
var _ref4$limit = _ref4.limit,
|
|
21706
|
+
limit = _ref4$limit === void 0 ? 5 : _ref4$limit,
|
|
21707
|
+
storageKey = _ref4.storageKey;
|
|
21708
|
+
var storage = getLocalStorage(storageKey);
|
|
21709
|
+
var updateListener = null;
|
|
21710
|
+
return {
|
|
21711
|
+
onAdd: function onAdd(query) {
|
|
21712
|
+
this.onRemove(query);
|
|
21713
|
+
storage.setItems([query].concat(_toConsumableArray$9(storage.getItems())));
|
|
21714
|
+
},
|
|
21715
|
+
onRemove: function onRemove(query) {
|
|
21716
|
+
var _updateListener;
|
|
21717
|
+
storage.setItems(storage.getItems().filter(function (q) {
|
|
21718
|
+
return q !== query;
|
|
21719
|
+
}));
|
|
21720
|
+
(_updateListener = updateListener) === null || _updateListener === void 0 ? void 0 : _updateListener();
|
|
21721
|
+
},
|
|
21722
|
+
registerUpdateListener: function registerUpdateListener(callback) {
|
|
21723
|
+
updateListener = callback;
|
|
21724
|
+
},
|
|
21725
|
+
unregisterUpdateListener: function unregisterUpdateListener() {
|
|
21726
|
+
updateListener = null;
|
|
21727
|
+
},
|
|
21728
|
+
getSnapshot: function getSnapshot() {
|
|
21729
|
+
return {
|
|
21730
|
+
getAll: function getAll() {
|
|
21731
|
+
var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
21732
|
+
return storage.getItems().filter(function (q) {
|
|
21733
|
+
return q.includes(query);
|
|
21734
|
+
}).slice(0, limit);
|
|
21735
|
+
}
|
|
21736
|
+
};
|
|
21737
|
+
}
|
|
21738
|
+
};
|
|
21739
|
+
}
|
|
21740
|
+
|
|
21425
21741
|
function createDefaultEmptyComponent(_ref) {
|
|
21426
21742
|
var createElement = _ref.createElement,
|
|
21427
21743
|
Fragment = _ref.Fragment;
|
|
@@ -22175,8 +22491,56 @@
|
|
|
22175
22491
|
});
|
|
22176
22492
|
}
|
|
22177
22493
|
|
|
22178
|
-
var
|
|
22179
|
-
|
|
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"];
|
|
22180
22544
|
var Autocomplete = createAutocompleteComponent({
|
|
22181
22545
|
createElement: React.createElement,
|
|
22182
22546
|
Fragment: React.Fragment
|
|
@@ -22193,6 +22557,10 @@
|
|
|
22193
22557
|
createElement: React.createElement,
|
|
22194
22558
|
Fragment: React.Fragment
|
|
22195
22559
|
});
|
|
22560
|
+
var AutocompleteRecentSearch = createAutocompleteRecentSearchComponent({
|
|
22561
|
+
createElement: React.createElement,
|
|
22562
|
+
Fragment: React.Fragment
|
|
22563
|
+
});
|
|
22196
22564
|
var usePropGetters = createAutocompletePropGetters({
|
|
22197
22565
|
useEffect: React.useEffect,
|
|
22198
22566
|
useId: React.useId,
|
|
@@ -22200,14 +22568,18 @@
|
|
|
22200
22568
|
useRef: React.useRef,
|
|
22201
22569
|
useState: React.useState
|
|
22202
22570
|
});
|
|
22203
|
-
var
|
|
22204
|
-
|
|
22571
|
+
var useStorage = createAutocompleteStorage({
|
|
22572
|
+
useEffect: React.useEffect,
|
|
22573
|
+
useMemo: React.useMemo,
|
|
22574
|
+
useState: React.useState
|
|
22205
22575
|
});
|
|
22206
22576
|
function EXPERIMENTAL_Autocomplete(_ref) {
|
|
22207
22577
|
var _ref$indices = _ref.indices,
|
|
22208
22578
|
indices = _ref$indices === void 0 ? [] : _ref$indices,
|
|
22209
22579
|
showSuggestions = _ref.showSuggestions,
|
|
22210
|
-
|
|
22580
|
+
showRecent = _ref.showRecent,
|
|
22581
|
+
userSearchParameters = _ref.searchParameters,
|
|
22582
|
+
props = _objectWithoutProperties$c(_ref, _excluded$o);
|
|
22211
22583
|
var _useInstantSearch = useInstantSearch(),
|
|
22212
22584
|
indexUiState = _useInstantSearch.indexUiState,
|
|
22213
22585
|
indexRenderState = _useInstantSearch.indexRenderState;
|
|
@@ -22216,13 +22588,25 @@
|
|
|
22216
22588
|
$$widgetType: 'ais.autocomplete'
|
|
22217
22589
|
}),
|
|
22218
22590
|
refine = _useSearchBox.refine;
|
|
22591
|
+
var searchParameters = _objectSpread2({
|
|
22592
|
+
hitsPerPage: 5
|
|
22593
|
+
}, userSearchParameters);
|
|
22219
22594
|
var indicesConfig = _toConsumableArray$8(indices);
|
|
22220
22595
|
if (showSuggestions !== null && showSuggestions !== void 0 && showSuggestions.indexName) {
|
|
22221
22596
|
var _showSuggestions$clas, _showSuggestions$clas2, _showSuggestions$clas3, _showSuggestions$clas4;
|
|
22222
22597
|
indicesConfig.unshift({
|
|
22223
22598
|
indexName: showSuggestions.indexName,
|
|
22224
22599
|
headerComponent: showSuggestions.headerComponent,
|
|
22225
|
-
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
|
+
},
|
|
22226
22610
|
classNames: {
|
|
22227
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),
|
|
22228
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),
|
|
@@ -22240,16 +22624,18 @@
|
|
|
22240
22624
|
}, [indexRenderState]);
|
|
22241
22625
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Index, {
|
|
22242
22626
|
EXPERIMENTAL_isolated: true
|
|
22243
|
-
},
|
|
22627
|
+
}, /*#__PURE__*/React__default.createElement(Configure, searchParameters), indicesConfig.map(function (index) {
|
|
22244
22628
|
return /*#__PURE__*/React__default.createElement(Index, {
|
|
22245
22629
|
key: index.indexName,
|
|
22246
22630
|
indexName: index.indexName
|
|
22247
|
-
});
|
|
22631
|
+
}, /*#__PURE__*/React__default.createElement(Configure, index.searchParameters));
|
|
22248
22632
|
}), /*#__PURE__*/React__default.createElement(InnerAutocomplete, _extends$1({}, props, {
|
|
22249
22633
|
indicesConfig: indicesConfig,
|
|
22250
22634
|
refineSearchBox: refine,
|
|
22251
22635
|
indexUiState: indexUiState,
|
|
22252
|
-
isSearchPage: isSearchPage
|
|
22636
|
+
isSearchPage: isSearchPage,
|
|
22637
|
+
showRecent: showRecent,
|
|
22638
|
+
showSuggestions: showSuggestions
|
|
22253
22639
|
}))));
|
|
22254
22640
|
}
|
|
22255
22641
|
function InnerAutocomplete(_ref3) {
|
|
@@ -22259,16 +22645,31 @@
|
|
|
22259
22645
|
userOnSelect = _ref3.onSelect,
|
|
22260
22646
|
indexUiState = _ref3.indexUiState,
|
|
22261
22647
|
isSearchPage = _ref3.isSearchPage,
|
|
22262
|
-
|
|
22648
|
+
PanelComponent = _ref3.panelComponent,
|
|
22649
|
+
showRecent = _ref3.showRecent,
|
|
22650
|
+
showSuggestions = _ref3.showSuggestions,
|
|
22651
|
+
props = _objectWithoutProperties$c(_ref3, _excluded2$5);
|
|
22263
22652
|
var _useAutocomplete = useAutocomplete(),
|
|
22264
22653
|
indices = _useAutocomplete.indices,
|
|
22265
|
-
refineAutocomplete = _useAutocomplete.refine
|
|
22266
|
-
|
|
22654
|
+
refineAutocomplete = _useAutocomplete.refine,
|
|
22655
|
+
currentRefinement = _useAutocomplete.currentRefinement;
|
|
22656
|
+
var _useStorage = useStorage({
|
|
22657
|
+
showRecent: showRecent,
|
|
22658
|
+
query: currentRefinement,
|
|
22267
22659
|
indices: indices,
|
|
22268
|
-
indicesConfig: indicesConfig
|
|
22660
|
+
indicesConfig: indicesConfig
|
|
22661
|
+
}),
|
|
22662
|
+
storage = _useStorage.storage,
|
|
22663
|
+
storageHits = _useStorage.storageHits,
|
|
22664
|
+
indicesForPropGetters = _useStorage.indicesForPropGetters,
|
|
22665
|
+
indicesConfigForPropGetters = _useStorage.indicesConfigForPropGetters;
|
|
22666
|
+
var _usePropGetters = usePropGetters({
|
|
22667
|
+
indices: indicesForPropGetters,
|
|
22668
|
+
indicesConfig: indicesConfigForPropGetters,
|
|
22269
22669
|
onRefine: function onRefine(query) {
|
|
22270
22670
|
refineAutocomplete(query);
|
|
22271
22671
|
refineSearchBox(query);
|
|
22672
|
+
storage.onAdd(query);
|
|
22272
22673
|
},
|
|
22273
22674
|
onSelect: userOnSelect !== null && userOnSelect !== void 0 ? userOnSelect : function (_ref4) {
|
|
22274
22675
|
var query = _ref4.query,
|
|
@@ -22291,40 +22692,89 @@
|
|
|
22291
22692
|
getItemProps = _usePropGetters.getItemProps,
|
|
22292
22693
|
getPanelProps = _usePropGetters.getPanelProps,
|
|
22293
22694
|
getRootProps = _usePropGetters.getRootProps;
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
|
|
22301
|
-
|
|
22302
|
-
|
|
22303
|
-
|
|
22695
|
+
var AutocompleteRecentSearchComponent = _typeof$S(showRecent) === 'object' && showRecent.itemComponent || AutocompleteRecentSearch;
|
|
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) {
|
|
22724
|
+
var indexId = _ref6.indexId,
|
|
22725
|
+
indexName = _ref6.indexName,
|
|
22726
|
+
hits = _ref6.hits;
|
|
22727
|
+
var elementId = indexName === (showSuggestions === null || showSuggestions === void 0 ? void 0 : showSuggestions.indexName) ? 'suggestions' : indexName;
|
|
22728
|
+
elements[elementId] = /*#__PURE__*/React__default.createElement(AutocompleteIndex, {
|
|
22304
22729
|
key: indexId
|
|
22305
22730
|
// @ts-expect-error - there seems to be problems with React.ComponentType and this, but it's actually correct
|
|
22306
22731
|
,
|
|
22307
|
-
HeaderComponent: indicesConfig[
|
|
22732
|
+
HeaderComponent: indicesConfig[i].headerComponent
|
|
22308
22733
|
// @ts-expect-error - there seems to be problems with React.ComponentType and this, but it's actually correct
|
|
22309
22734
|
,
|
|
22310
|
-
ItemComponent: indicesConfig[
|
|
22735
|
+
ItemComponent: indicesConfig[i].itemComponent,
|
|
22311
22736
|
items: hits.map(function (item) {
|
|
22312
22737
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22313
22738
|
__indexName: indexId
|
|
22314
22739
|
});
|
|
22315
22740
|
}),
|
|
22316
22741
|
getItemProps: getItemProps,
|
|
22317
|
-
classNames: indicesConfig[
|
|
22742
|
+
classNames: indicesConfig[i].classNames
|
|
22318
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];
|
|
22319
22756
|
})));
|
|
22320
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
|
+
}
|
|
22321
22771
|
|
|
22322
22772
|
function isModifierClick(event) {
|
|
22323
22773
|
var isMiddleClick = event.button === 1;
|
|
22324
22774
|
return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
|
|
22325
22775
|
}
|
|
22326
22776
|
|
|
22327
|
-
var _excluded$
|
|
22777
|
+
var _excluded$p = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
|
|
22328
22778
|
function Breadcrumb(_ref) {
|
|
22329
22779
|
var _ref$classNames = _ref.classNames,
|
|
22330
22780
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -22336,7 +22786,7 @@
|
|
|
22336
22786
|
_ref$separator = _ref.separator,
|
|
22337
22787
|
separator = _ref$separator === void 0 ? '>' : _ref$separator,
|
|
22338
22788
|
translations = _ref.translations,
|
|
22339
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22789
|
+
props = _objectWithoutProperties$c(_ref, _excluded$p);
|
|
22340
22790
|
var handleClick = function handleClick(value) {
|
|
22341
22791
|
return function (event) {
|
|
22342
22792
|
if (!isModifierClick(event)) {
|
|
@@ -22371,14 +22821,14 @@
|
|
|
22371
22821
|
})));
|
|
22372
22822
|
}
|
|
22373
22823
|
|
|
22374
|
-
var _excluded$
|
|
22824
|
+
var _excluded$q = ["attributes", "rootPath", "separator", "transformItems", "translations"];
|
|
22375
22825
|
function Breadcrumb$1(_ref) {
|
|
22376
22826
|
var attributes = _ref.attributes,
|
|
22377
22827
|
rootPath = _ref.rootPath,
|
|
22378
22828
|
separator = _ref.separator,
|
|
22379
22829
|
transformItems = _ref.transformItems,
|
|
22380
22830
|
translations = _ref.translations,
|
|
22381
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22831
|
+
props = _objectWithoutProperties$c(_ref, _excluded$q);
|
|
22382
22832
|
var _useBreadcrumb = useBreadcrumb({
|
|
22383
22833
|
attributes: attributes,
|
|
22384
22834
|
rootPath: rootPath,
|
|
@@ -22402,7 +22852,7 @@
|
|
|
22402
22852
|
return /*#__PURE__*/React__default.createElement(Breadcrumb, _extends$1({}, props, uiProps));
|
|
22403
22853
|
}
|
|
22404
22854
|
|
|
22405
|
-
var _excluded$
|
|
22855
|
+
var _excluded$r = ["classNames", "disabled", "onClick", "translations"];
|
|
22406
22856
|
function ClearRefinements(_ref) {
|
|
22407
22857
|
var _ref$classNames = _ref.classNames,
|
|
22408
22858
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -22411,7 +22861,7 @@
|
|
|
22411
22861
|
_ref$onClick = _ref.onClick,
|
|
22412
22862
|
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
22413
22863
|
translations = _ref.translations,
|
|
22414
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22864
|
+
props = _objectWithoutProperties$c(_ref, _excluded$r);
|
|
22415
22865
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22416
22866
|
className: cx('ais-ClearRefinements', classNames.root, props.className)
|
|
22417
22867
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -22421,13 +22871,13 @@
|
|
|
22421
22871
|
}, translations.resetButtonText));
|
|
22422
22872
|
}
|
|
22423
22873
|
|
|
22424
|
-
var _excluded$
|
|
22874
|
+
var _excluded$s = ["includedAttributes", "excludedAttributes", "transformItems", "translations"];
|
|
22425
22875
|
function ClearRefinements$1(_ref) {
|
|
22426
22876
|
var includedAttributes = _ref.includedAttributes,
|
|
22427
22877
|
excludedAttributes = _ref.excludedAttributes,
|
|
22428
22878
|
transformItems = _ref.transformItems,
|
|
22429
22879
|
translations = _ref.translations,
|
|
22430
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22880
|
+
props = _objectWithoutProperties$c(_ref, _excluded$s);
|
|
22431
22881
|
var _useClearRefinements = useClearRefinements({
|
|
22432
22882
|
includedAttributes: includedAttributes,
|
|
22433
22883
|
excludedAttributes: excludedAttributes,
|
|
@@ -22451,7 +22901,7 @@
|
|
|
22451
22901
|
return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
|
|
22452
22902
|
}
|
|
22453
22903
|
|
|
22454
|
-
var _excluded$
|
|
22904
|
+
var _excluded$t = ["classNames", "items", "hasRefinements"];
|
|
22455
22905
|
function CurrentRefinements(_ref) {
|
|
22456
22906
|
var _ref$classNames = _ref.classNames,
|
|
22457
22907
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -22459,7 +22909,7 @@
|
|
|
22459
22909
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
22460
22910
|
_ref$hasRefinements = _ref.hasRefinements,
|
|
22461
22911
|
hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
|
|
22462
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22912
|
+
props = _objectWithoutProperties$c(_ref, _excluded$t);
|
|
22463
22913
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22464
22914
|
className: cx('ais-CurrentRefinements', classNames.root, !hasRefinements && cx('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
|
|
22465
22915
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -22491,12 +22941,12 @@
|
|
|
22491
22941
|
})));
|
|
22492
22942
|
}
|
|
22493
22943
|
|
|
22494
|
-
var _excluded$
|
|
22944
|
+
var _excluded$u = ["includedAttributes", "excludedAttributes", "transformItems"];
|
|
22495
22945
|
function CurrentRefinements$1(_ref) {
|
|
22496
22946
|
var includedAttributes = _ref.includedAttributes,
|
|
22497
22947
|
excludedAttributes = _ref.excludedAttributes,
|
|
22498
22948
|
transformItems = _ref.transformItems,
|
|
22499
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22949
|
+
props = _objectWithoutProperties$c(_ref, _excluded$u);
|
|
22500
22950
|
var _useCurrentRefinement = useCurrentRefinements({
|
|
22501
22951
|
includedAttributes: includedAttributes,
|
|
22502
22952
|
excludedAttributes: excludedAttributes,
|
|
@@ -22513,7 +22963,7 @@
|
|
|
22513
22963
|
return /*#__PURE__*/React__default.createElement(CurrentRefinements, _extends$1({}, props, uiProps));
|
|
22514
22964
|
}
|
|
22515
22965
|
|
|
22516
|
-
var _excluded$
|
|
22966
|
+
var _excluded$v = ["objectIDs", "limit", "threshold", "queryParameters", "fallbackParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
22517
22967
|
var FrequentlyBoughtTogetherUiComponent = createFrequentlyBoughtTogetherComponent({
|
|
22518
22968
|
createElement: React.createElement,
|
|
22519
22969
|
Fragment: React.Fragment
|
|
@@ -22530,7 +22980,7 @@
|
|
|
22530
22980
|
headerComponent = _ref.headerComponent,
|
|
22531
22981
|
emptyComponent = _ref.emptyComponent,
|
|
22532
22982
|
layoutComponent = _ref.layoutComponent,
|
|
22533
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22983
|
+
props = _objectWithoutProperties$c(_ref, _excluded$v);
|
|
22534
22984
|
var _useInstantSearch = useInstantSearch(),
|
|
22535
22985
|
status = _useInstantSearch.status;
|
|
22536
22986
|
var _useFrequentlyBoughtT = useFrequentlyBoughtTogether({
|
|
@@ -22573,17 +23023,17 @@
|
|
|
22573
23023
|
return /*#__PURE__*/React__default.createElement(FrequentlyBoughtTogetherUiComponent, _extends$1({}, props, uiProps));
|
|
22574
23024
|
}
|
|
22575
23025
|
|
|
22576
|
-
var _excluded$
|
|
23026
|
+
var _excluded$w = ["isShowingMore", "translations"];
|
|
22577
23027
|
function ShowMoreButton(_ref) {
|
|
22578
23028
|
var isShowingMore = _ref.isShowingMore,
|
|
22579
23029
|
translations = _ref.translations,
|
|
22580
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23030
|
+
props = _objectWithoutProperties$c(_ref, _excluded$w);
|
|
22581
23031
|
return /*#__PURE__*/React__default.createElement("button", props, translations.showMoreButtonText({
|
|
22582
23032
|
isShowingMore: isShowingMore
|
|
22583
23033
|
}));
|
|
22584
23034
|
}
|
|
22585
23035
|
|
|
22586
|
-
var _excluded$
|
|
23036
|
+
var _excluded$x = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
|
|
22587
23037
|
function HierarchicalList(_ref) {
|
|
22588
23038
|
var className = _ref.className,
|
|
22589
23039
|
_ref$classNames = _ref.classNames,
|
|
@@ -22635,7 +23085,7 @@
|
|
|
22635
23085
|
onToggleShowMore = _ref2.onToggleShowMore,
|
|
22636
23086
|
isShowingMore = _ref2.isShowingMore,
|
|
22637
23087
|
translations = _ref2.translations,
|
|
22638
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
23088
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$x);
|
|
22639
23089
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22640
23090
|
className: cx('ais-HierarchicalMenu', classNames.root, !hasItems && cx('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
22641
23091
|
}), /*#__PURE__*/React__default.createElement(HierarchicalList, {
|
|
@@ -22652,7 +23102,7 @@
|
|
|
22652
23102
|
}));
|
|
22653
23103
|
}
|
|
22654
23104
|
|
|
22655
|
-
var _excluded$
|
|
23105
|
+
var _excluded$y = ["attributes", "limit", "rootPath", "separator", "showMore", "showMoreLimit", "showParentLevel", "sortBy", "transformItems", "translations"];
|
|
22656
23106
|
function HierarchicalMenu$1(_ref) {
|
|
22657
23107
|
var attributes = _ref.attributes,
|
|
22658
23108
|
limit = _ref.limit,
|
|
@@ -22664,7 +23114,7 @@
|
|
|
22664
23114
|
sortBy = _ref.sortBy,
|
|
22665
23115
|
transformItems = _ref.transformItems,
|
|
22666
23116
|
translations = _ref.translations,
|
|
22667
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23117
|
+
props = _objectWithoutProperties$c(_ref, _excluded$y);
|
|
22668
23118
|
var _useHierarchicalMenu = useHierarchicalMenu({
|
|
22669
23119
|
attributes: attributes,
|
|
22670
23120
|
limit: limit,
|
|
@@ -22704,16 +23154,11 @@
|
|
|
22704
23154
|
}));
|
|
22705
23155
|
}
|
|
22706
23156
|
|
|
22707
|
-
var
|
|
22708
|
-
createElement: React.createElement,
|
|
22709
|
-
Fragment: React.Fragment
|
|
22710
|
-
});
|
|
22711
|
-
|
|
22712
|
-
var _excluded$x = ["classNames"];
|
|
23157
|
+
var _excluded$z = ["classNames"];
|
|
22713
23158
|
function Highlight(_ref) {
|
|
22714
23159
|
var _ref$classNames = _ref.classNames,
|
|
22715
23160
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22716
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23161
|
+
props = _objectWithoutProperties$c(_ref, _excluded$z);
|
|
22717
23162
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
22718
23163
|
classNames: {
|
|
22719
23164
|
root: cx('ais-Highlight', classNames.root),
|
|
@@ -22724,14 +23169,14 @@
|
|
|
22724
23169
|
}, props));
|
|
22725
23170
|
}
|
|
22726
23171
|
|
|
22727
|
-
var _excluded$
|
|
23172
|
+
var _excluded$A = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
22728
23173
|
function Highlight$1(_ref) {
|
|
22729
23174
|
var hit = _ref.hit,
|
|
22730
23175
|
attribute = _ref.attribute,
|
|
22731
23176
|
highlightedTagName = _ref.highlightedTagName,
|
|
22732
23177
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
22733
23178
|
separator = _ref.separator,
|
|
22734
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23179
|
+
props = _objectWithoutProperties$c(_ref, _excluded$A);
|
|
22735
23180
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
22736
23181
|
var properties = Array.isArray(property) ? property : [property];
|
|
22737
23182
|
var parts = properties.map(function (singleValue) {
|
|
@@ -22745,8 +23190,8 @@
|
|
|
22745
23190
|
}));
|
|
22746
23191
|
}
|
|
22747
23192
|
|
|
22748
|
-
var _excluded$
|
|
22749
|
-
_excluded2$
|
|
23193
|
+
var _excluded$B = ["escapeHTML", "transformItems", "hitComponent", "bannerComponent"],
|
|
23194
|
+
_excluded2$6 = ["hit", "index"];
|
|
22750
23195
|
// @MAJOR: Move default hit component back to the UI library
|
|
22751
23196
|
// once flavour specificities are erased
|
|
22752
23197
|
function DefaultHitComponent(_ref) {
|
|
@@ -22767,7 +23212,7 @@
|
|
|
22767
23212
|
_ref2$hitComponent = _ref2.hitComponent,
|
|
22768
23213
|
HitComponent = _ref2$hitComponent === void 0 ? DefaultHitComponent : _ref2$hitComponent,
|
|
22769
23214
|
BannerComponent = _ref2.bannerComponent,
|
|
22770
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
23215
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$B);
|
|
22771
23216
|
var _useHits = useHits({
|
|
22772
23217
|
escapeHTML: escapeHTML,
|
|
22773
23218
|
transformItems: transformItems
|
|
@@ -22781,7 +23226,7 @@
|
|
|
22781
23226
|
return function (_ref3) {
|
|
22782
23227
|
var hit = _ref3.hit,
|
|
22783
23228
|
index = _ref3.index,
|
|
22784
|
-
itemProps = _objectWithoutProperties$c(_ref3, _excluded2$
|
|
23229
|
+
itemProps = _objectWithoutProperties$c(_ref3, _excluded2$6);
|
|
22785
23230
|
return /*#__PURE__*/React__default.createElement("li", _extends$1({
|
|
22786
23231
|
key: hit.objectID
|
|
22787
23232
|
}, itemProps), /*#__PURE__*/React__default.createElement(HitComponent, {
|
|
@@ -22803,14 +23248,14 @@
|
|
|
22803
23248
|
return /*#__PURE__*/React__default.createElement(HitsUiComponent, _extends$1({}, props, uiProps));
|
|
22804
23249
|
}
|
|
22805
23250
|
|
|
22806
|
-
var _excluded$
|
|
23251
|
+
var _excluded$C = ["items", "onChange", "currentValue", "classNames"];
|
|
22807
23252
|
function HitsPerPage(_ref) {
|
|
22808
23253
|
var items = _ref.items,
|
|
22809
23254
|
_onChange = _ref.onChange,
|
|
22810
23255
|
currentValue = _ref.currentValue,
|
|
22811
23256
|
_ref$classNames = _ref.classNames,
|
|
22812
23257
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22813
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23258
|
+
props = _objectWithoutProperties$c(_ref, _excluded$C);
|
|
22814
23259
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22815
23260
|
className: cx('ais-HitsPerPage', classNames.root, props.className)
|
|
22816
23261
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -22828,11 +23273,11 @@
|
|
|
22828
23273
|
})));
|
|
22829
23274
|
}
|
|
22830
23275
|
|
|
22831
|
-
var _excluded$
|
|
23276
|
+
var _excluded$D = ["items", "transformItems"];
|
|
22832
23277
|
function HitsPerPage$1(_ref) {
|
|
22833
23278
|
var userItems = _ref.items,
|
|
22834
23279
|
transformItems = _ref.transformItems,
|
|
22835
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23280
|
+
props = _objectWithoutProperties$c(_ref, _excluded$D);
|
|
22836
23281
|
var _useHitsPerPage = useHitsPerPage({
|
|
22837
23282
|
items: userItems,
|
|
22838
23283
|
transformItems: transformItems
|
|
@@ -22856,7 +23301,7 @@
|
|
|
22856
23301
|
return /*#__PURE__*/React__default.createElement(HitsPerPage, _extends$1({}, props, uiProps));
|
|
22857
23302
|
}
|
|
22858
23303
|
|
|
22859
|
-
var _excluded$
|
|
23304
|
+
var _excluded$E = ["hitComponent", "hits", "bannerComponent", "banner", "sendEvent", "isFirstPage", "isLastPage", "onShowPrevious", "onShowMore", "classNames", "translations"];
|
|
22860
23305
|
function DefaultHitComponent$1(_ref) {
|
|
22861
23306
|
var hit = _ref.hit;
|
|
22862
23307
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -22901,7 +23346,7 @@
|
|
|
22901
23346
|
_ref3$classNames = _ref3.classNames,
|
|
22902
23347
|
classNames = _ref3$classNames === void 0 ? {} : _ref3$classNames,
|
|
22903
23348
|
translations = _ref3.translations,
|
|
22904
|
-
props = _objectWithoutProperties$c(_ref3, _excluded$
|
|
23349
|
+
props = _objectWithoutProperties$c(_ref3, _excluded$E);
|
|
22905
23350
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22906
23351
|
className: cx('ais-InfiniteHits', classNames.root, hits.length === 0 && cx('ais-InfiniteHits--empty', classNames.emptyRoot), props.className)
|
|
22907
23352
|
}), onShowPrevious && /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -22937,7 +23382,7 @@
|
|
|
22937
23382
|
}, translations.showMoreButtonText));
|
|
22938
23383
|
}
|
|
22939
23384
|
|
|
22940
|
-
var _excluded$
|
|
23385
|
+
var _excluded$F = ["showPrevious", "cache", "escapeHTML", "transformItems", "translations", "bannerComponent"];
|
|
22941
23386
|
function InfiniteHits$1(_ref) {
|
|
22942
23387
|
var _ref$showPrevious = _ref.showPrevious,
|
|
22943
23388
|
shouldShowPrevious = _ref$showPrevious === void 0 ? true : _ref$showPrevious,
|
|
@@ -22946,7 +23391,7 @@
|
|
|
22946
23391
|
transformItems = _ref.transformItems,
|
|
22947
23392
|
translations = _ref.translations,
|
|
22948
23393
|
BannerComponent = _ref.bannerComponent,
|
|
22949
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23394
|
+
props = _objectWithoutProperties$c(_ref, _excluded$F);
|
|
22950
23395
|
var _useInfiniteHits = useInfiniteHits({
|
|
22951
23396
|
cache: cache,
|
|
22952
23397
|
escapeHTML: escapeHTML,
|
|
@@ -22982,7 +23427,7 @@
|
|
|
22982
23427
|
return /*#__PURE__*/React__default.createElement(InfiniteHits, _extends$1({}, props, uiProps));
|
|
22983
23428
|
}
|
|
22984
23429
|
|
|
22985
|
-
var _excluded$
|
|
23430
|
+
var _excluded$G = ["objectIDs", "limit", "threshold", "queryParameters", "fallbackParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
22986
23431
|
var LookingSimilarUiComponent = createLookingSimilarComponent({
|
|
22987
23432
|
createElement: React.createElement,
|
|
22988
23433
|
Fragment: React.Fragment
|
|
@@ -22999,7 +23444,7 @@
|
|
|
22999
23444
|
headerComponent = _ref.headerComponent,
|
|
23000
23445
|
emptyComponent = _ref.emptyComponent,
|
|
23001
23446
|
layoutComponent = _ref.layoutComponent,
|
|
23002
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23447
|
+
props = _objectWithoutProperties$c(_ref, _excluded$G);
|
|
23003
23448
|
var _useInstantSearch = useInstantSearch(),
|
|
23004
23449
|
status = _useInstantSearch.status;
|
|
23005
23450
|
var _useLookingSimilar = useLookingSimilar({
|
|
@@ -23042,7 +23487,7 @@
|
|
|
23042
23487
|
return /*#__PURE__*/React__default.createElement(LookingSimilarUiComponent, _extends$1({}, props, uiProps));
|
|
23043
23488
|
}
|
|
23044
23489
|
|
|
23045
|
-
var _excluded$
|
|
23490
|
+
var _excluded$H = ["items", "classNames", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "createURL", "onRefine", "translations"];
|
|
23046
23491
|
function Menu(_ref) {
|
|
23047
23492
|
var items = _ref.items,
|
|
23048
23493
|
_ref$classNames = _ref.classNames,
|
|
@@ -23054,7 +23499,7 @@
|
|
|
23054
23499
|
createURL = _ref.createURL,
|
|
23055
23500
|
onRefine = _ref.onRefine,
|
|
23056
23501
|
translations = _ref.translations,
|
|
23057
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23502
|
+
props = _objectWithoutProperties$c(_ref, _excluded$H);
|
|
23058
23503
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
23059
23504
|
className: cx('ais-Menu', classNames.root, items.length === 0 && cx('ais-Menu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
23060
23505
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -23087,7 +23532,7 @@
|
|
|
23087
23532
|
}));
|
|
23088
23533
|
}
|
|
23089
23534
|
|
|
23090
|
-
var _excluded$
|
|
23535
|
+
var _excluded$I = ["attribute", "limit", "showMore", "showMoreLimit", "sortBy", "transformItems", "translations"];
|
|
23091
23536
|
function Menu$1(_ref) {
|
|
23092
23537
|
var attribute = _ref.attribute,
|
|
23093
23538
|
limit = _ref.limit,
|
|
@@ -23096,7 +23541,7 @@
|
|
|
23096
23541
|
sortBy = _ref.sortBy,
|
|
23097
23542
|
transformItems = _ref.transformItems,
|
|
23098
23543
|
translations = _ref.translations,
|
|
23099
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23544
|
+
props = _objectWithoutProperties$c(_ref, _excluded$I);
|
|
23100
23545
|
var _useMenu = useMenu({
|
|
23101
23546
|
attribute: attribute,
|
|
23102
23547
|
limit: limit,
|
|
@@ -23133,8 +23578,8 @@
|
|
|
23133
23578
|
}));
|
|
23134
23579
|
}
|
|
23135
23580
|
|
|
23136
|
-
var _excluded$
|
|
23137
|
-
_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"];
|
|
23138
23583
|
function Pagination(_ref) {
|
|
23139
23584
|
var pages = _ref.pages,
|
|
23140
23585
|
currentPage = _ref.currentPage,
|
|
@@ -23154,7 +23599,7 @@
|
|
|
23154
23599
|
translations = _ref.translations,
|
|
23155
23600
|
_ref$classNames = _ref.classNames,
|
|
23156
23601
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23157
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23602
|
+
props = _objectWithoutProperties$c(_ref, _excluded$J);
|
|
23158
23603
|
var firstPageIndex = 0;
|
|
23159
23604
|
var previousPageIndex = currentPage - 1;
|
|
23160
23605
|
var nextPageIndex = currentPage + 1;
|
|
@@ -23225,7 +23670,7 @@
|
|
|
23225
23670
|
classNames = _ref2.classNames,
|
|
23226
23671
|
href = _ref2.href,
|
|
23227
23672
|
_onClick = _ref2.onClick,
|
|
23228
|
-
props = _objectWithoutProperties$c(_ref2, _excluded2$
|
|
23673
|
+
props = _objectWithoutProperties$c(_ref2, _excluded2$7);
|
|
23229
23674
|
if (isDisabled) {
|
|
23230
23675
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
23231
23676
|
className: cx('ais-Pagination-item', classNames.item, 'ais-Pagination-item--disabled', classNames.disabledItem, className)
|
|
@@ -23248,7 +23693,7 @@
|
|
|
23248
23693
|
}, props)));
|
|
23249
23694
|
}
|
|
23250
23695
|
|
|
23251
|
-
var _excluded$
|
|
23696
|
+
var _excluded$K = ["showFirst", "showPrevious", "showNext", "showLast", "padding", "totalPages", "translations"];
|
|
23252
23697
|
function Pagination$1(_ref) {
|
|
23253
23698
|
var showFirst = _ref.showFirst,
|
|
23254
23699
|
showPrevious = _ref.showPrevious,
|
|
@@ -23257,7 +23702,7 @@
|
|
|
23257
23702
|
padding = _ref.padding,
|
|
23258
23703
|
totalPages = _ref.totalPages,
|
|
23259
23704
|
translations = _ref.translations,
|
|
23260
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23705
|
+
props = _objectWithoutProperties$c(_ref, _excluded$K);
|
|
23261
23706
|
var _usePagination = usePagination({
|
|
23262
23707
|
padding: padding,
|
|
23263
23708
|
totalPages: totalPages
|
|
@@ -23306,14 +23751,14 @@
|
|
|
23306
23751
|
}));
|
|
23307
23752
|
}
|
|
23308
23753
|
|
|
23309
|
-
var _excluded$
|
|
23754
|
+
var _excluded$L = ["classNames", "url", "theme"];
|
|
23310
23755
|
function PoweredBy(_ref) {
|
|
23311
23756
|
var _ref$classNames = _ref.classNames,
|
|
23312
23757
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23313
23758
|
url = _ref.url,
|
|
23314
23759
|
_ref$theme = _ref.theme,
|
|
23315
23760
|
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
|
|
23316
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23761
|
+
props = _objectWithoutProperties$c(_ref, _excluded$L);
|
|
23317
23762
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
23318
23763
|
className: cx('ais-PoweredBy', theme === 'dark' ? cx('ais-PoweredBy--dark', classNames.dark) : cx('ais-PoweredBy--light', classNames.light), classNames.root, props.className)
|
|
23319
23764
|
}), /*#__PURE__*/React__default.createElement("a", {
|
|
@@ -23343,7 +23788,7 @@
|
|
|
23343
23788
|
return /*#__PURE__*/React__default.createElement(PoweredBy, _extends$1({}, props, uiProps));
|
|
23344
23789
|
}
|
|
23345
23790
|
|
|
23346
|
-
var _excluded$
|
|
23791
|
+
var _excluded$M = ["classNames", "range", "start", "step", "disabled", "onSubmit", "translations"];
|
|
23347
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
|
|
23348
23793
|
var unsetNumberInputValue = '';
|
|
23349
23794
|
|
|
@@ -23368,7 +23813,7 @@
|
|
|
23368
23813
|
disabled = _ref.disabled,
|
|
23369
23814
|
_onSubmit = _ref.onSubmit,
|
|
23370
23815
|
translations = _ref.translations,
|
|
23371
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23816
|
+
props = _objectWithoutProperties$c(_ref, _excluded$M);
|
|
23372
23817
|
var values = {
|
|
23373
23818
|
min: minValue !== -Infinity && minValue !== min ? minValue : unsetNumberInputValue,
|
|
23374
23819
|
max: maxValue !== Infinity && maxValue !== max ? maxValue : unsetNumberInputValue
|
|
@@ -23448,14 +23893,14 @@
|
|
|
23448
23893
|
}, translations.submitButtonText)));
|
|
23449
23894
|
}
|
|
23450
23895
|
|
|
23451
|
-
var _excluded$
|
|
23896
|
+
var _excluded$N = ["attribute", "min", "max", "precision", "translations"];
|
|
23452
23897
|
function RangeInput$1(_ref) {
|
|
23453
23898
|
var attribute = _ref.attribute,
|
|
23454
23899
|
min = _ref.min,
|
|
23455
23900
|
max = _ref.max,
|
|
23456
23901
|
precision = _ref.precision,
|
|
23457
23902
|
translations = _ref.translations,
|
|
23458
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23903
|
+
props = _objectWithoutProperties$c(_ref, _excluded$N);
|
|
23459
23904
|
var _useRange = useRange({
|
|
23460
23905
|
attribute: attribute,
|
|
23461
23906
|
min: min,
|
|
@@ -23483,7 +23928,7 @@
|
|
|
23483
23928
|
return /*#__PURE__*/React__default.createElement(RangeInput, _extends$1({}, props, uiProps));
|
|
23484
23929
|
}
|
|
23485
23930
|
|
|
23486
|
-
var _excluded$
|
|
23931
|
+
var _excluded$O = ["canRefine", "items", "onRefine", "query", "searchBox", "noResults", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "className", "classNames", "translations"];
|
|
23487
23932
|
function RefinementList$1(_ref) {
|
|
23488
23933
|
var canRefine = _ref.canRefine,
|
|
23489
23934
|
items = _ref.items,
|
|
@@ -23499,7 +23944,7 @@
|
|
|
23499
23944
|
_ref$classNames = _ref.classNames,
|
|
23500
23945
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23501
23946
|
translations = _ref.translations,
|
|
23502
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23947
|
+
props = _objectWithoutProperties$c(_ref, _excluded$O);
|
|
23503
23948
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
23504
23949
|
className: cx('ais-RefinementList', classNames.root, items.length === 0 && cx('ais-RefinementList--noRefinement', classNames.noRefinementRoot), className)
|
|
23505
23950
|
}), searchBox && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -23538,8 +23983,8 @@
|
|
|
23538
23983
|
}));
|
|
23539
23984
|
}
|
|
23540
23985
|
|
|
23541
|
-
var _excluded$
|
|
23542
|
-
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", {
|
|
23543
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"
|
|
23544
23989
|
});
|
|
23545
23990
|
function DefaultSubmitIcon(_ref) {
|
|
@@ -23550,7 +23995,7 @@
|
|
|
23550
23995
|
height: "10",
|
|
23551
23996
|
viewBox: "0 0 40 40",
|
|
23552
23997
|
"aria-hidden": "true"
|
|
23553
|
-
}, _ref2
|
|
23998
|
+
}, _ref2);
|
|
23554
23999
|
}
|
|
23555
24000
|
var _ref4 = /*#__PURE__*/React__default.createElement("path", {
|
|
23556
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"
|
|
@@ -23619,7 +24064,7 @@
|
|
|
23619
24064
|
_ref7$classNames = _ref7.classNames,
|
|
23620
24065
|
classNames = _ref7$classNames === void 0 ? {} : _ref7$classNames,
|
|
23621
24066
|
translations = _ref7.translations,
|
|
23622
|
-
props = _objectWithoutProperties$c(_ref7, _excluded$
|
|
24067
|
+
props = _objectWithoutProperties$c(_ref7, _excluded$P);
|
|
23623
24068
|
function handleSubmit(event) {
|
|
23624
24069
|
event.preventDefault();
|
|
23625
24070
|
event.stopPropagation();
|
|
@@ -23684,7 +24129,7 @@
|
|
|
23684
24129
|
}))));
|
|
23685
24130
|
}
|
|
23686
24131
|
|
|
23687
|
-
var _excluded$
|
|
24132
|
+
var _excluded$Q = ["searchable", "searchablePlaceholder", "searchableSelectOnSubmit", "attribute", "operator", "limit", "showMore", "showMoreLimit", "sortBy", "escapeFacetValues", "transformItems", "translations"];
|
|
23688
24133
|
function RefinementList$2(_ref) {
|
|
23689
24134
|
var searchable = _ref.searchable,
|
|
23690
24135
|
searchablePlaceholder = _ref.searchablePlaceholder,
|
|
@@ -23699,7 +24144,7 @@
|
|
|
23699
24144
|
escapeFacetValues = _ref.escapeFacetValues,
|
|
23700
24145
|
transformItems = _ref.transformItems,
|
|
23701
24146
|
translations = _ref.translations,
|
|
23702
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24147
|
+
props = _objectWithoutProperties$c(_ref, _excluded$Q);
|
|
23703
24148
|
var _useRefinementList = useRefinementList({
|
|
23704
24149
|
attribute: attribute,
|
|
23705
24150
|
operator: operator,
|
|
@@ -23791,7 +24236,7 @@
|
|
|
23791
24236
|
}));
|
|
23792
24237
|
}
|
|
23793
24238
|
|
|
23794
|
-
var _excluded$
|
|
24239
|
+
var _excluded$R = ["objectIDs", "limit", "threshold", "fallbackParameters", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
23795
24240
|
var RelatedProductsUiComponent = createRelatedProductsComponent({
|
|
23796
24241
|
createElement: React.createElement,
|
|
23797
24242
|
Fragment: React.Fragment
|
|
@@ -23808,7 +24253,7 @@
|
|
|
23808
24253
|
headerComponent = _ref.headerComponent,
|
|
23809
24254
|
emptyComponent = _ref.emptyComponent,
|
|
23810
24255
|
layoutComponent = _ref.layoutComponent,
|
|
23811
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24256
|
+
props = _objectWithoutProperties$c(_ref, _excluded$R);
|
|
23812
24257
|
var _useInstantSearch = useInstantSearch(),
|
|
23813
24258
|
status = _useInstantSearch.status;
|
|
23814
24259
|
var _useRelatedProducts = useRelatedProducts({
|
|
@@ -23851,7 +24296,7 @@
|
|
|
23851
24296
|
return /*#__PURE__*/React__default.createElement(RelatedProductsUiComponent, _extends$1({}, props, uiProps));
|
|
23852
24297
|
}
|
|
23853
24298
|
|
|
23854
|
-
var _excluded$
|
|
24299
|
+
var _excluded$S = ["queryHook", "searchAsYouType", "ignoreCompositionEvents", "translations"];
|
|
23855
24300
|
function SearchBox$1(_ref) {
|
|
23856
24301
|
var queryHook = _ref.queryHook,
|
|
23857
24302
|
_ref$searchAsYouType = _ref.searchAsYouType,
|
|
@@ -23859,7 +24304,7 @@
|
|
|
23859
24304
|
_ref$ignoreCompositio = _ref.ignoreCompositionEvents,
|
|
23860
24305
|
ignoreCompositionEvents = _ref$ignoreCompositio === void 0 ? false : _ref$ignoreCompositio,
|
|
23861
24306
|
translations = _ref.translations,
|
|
23862
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24307
|
+
props = _objectWithoutProperties$c(_ref, _excluded$S);
|
|
23863
24308
|
var _useSearchBox = useSearchBox({
|
|
23864
24309
|
queryHook: queryHook
|
|
23865
24310
|
}, {
|
|
@@ -23920,11 +24365,11 @@
|
|
|
23920
24365
|
return /*#__PURE__*/React__default.createElement(SearchBox, _extends$1({}, props, uiProps));
|
|
23921
24366
|
}
|
|
23922
24367
|
|
|
23923
|
-
var _excluded$
|
|
24368
|
+
var _excluded$T = ["classNames"];
|
|
23924
24369
|
function Snippet(_ref) {
|
|
23925
24370
|
var _ref$classNames = _ref.classNames,
|
|
23926
24371
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23927
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24372
|
+
props = _objectWithoutProperties$c(_ref, _excluded$T);
|
|
23928
24373
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
23929
24374
|
classNames: {
|
|
23930
24375
|
root: cx('ais-Snippet', classNames.root),
|
|
@@ -23935,14 +24380,14 @@
|
|
|
23935
24380
|
}, props));
|
|
23936
24381
|
}
|
|
23937
24382
|
|
|
23938
|
-
var _excluded$
|
|
24383
|
+
var _excluded$U = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
23939
24384
|
function Snippet$1(_ref) {
|
|
23940
24385
|
var hit = _ref.hit,
|
|
23941
24386
|
attribute = _ref.attribute,
|
|
23942
24387
|
highlightedTagName = _ref.highlightedTagName,
|
|
23943
24388
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
23944
24389
|
separator = _ref.separator,
|
|
23945
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24390
|
+
props = _objectWithoutProperties$c(_ref, _excluded$U);
|
|
23946
24391
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
23947
24392
|
var properties = Array.isArray(property) ? property : [property];
|
|
23948
24393
|
var parts = properties.map(function (singleValue) {
|
|
@@ -23956,7 +24401,7 @@
|
|
|
23956
24401
|
}));
|
|
23957
24402
|
}
|
|
23958
24403
|
|
|
23959
|
-
var _excluded$
|
|
24404
|
+
var _excluded$V = ["items", "value", "onChange", "classNames"];
|
|
23960
24405
|
function SortBy(_ref) {
|
|
23961
24406
|
var items = _ref.items,
|
|
23962
24407
|
value = _ref.value,
|
|
@@ -23964,7 +24409,7 @@
|
|
|
23964
24409
|
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
23965
24410
|
_ref$classNames = _ref.classNames,
|
|
23966
24411
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
23967
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24412
|
+
props = _objectWithoutProperties$c(_ref, _excluded$V);
|
|
23968
24413
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
23969
24414
|
className: cx('ais-SortBy', classNames.root, props.className)
|
|
23970
24415
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -23983,11 +24428,11 @@
|
|
|
23983
24428
|
})));
|
|
23984
24429
|
}
|
|
23985
24430
|
|
|
23986
|
-
var _excluded$
|
|
24431
|
+
var _excluded$W = ["items", "transformItems"];
|
|
23987
24432
|
function SortBy$1(_ref) {
|
|
23988
24433
|
var items = _ref.items,
|
|
23989
24434
|
transformItems = _ref.transformItems,
|
|
23990
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24435
|
+
props = _objectWithoutProperties$c(_ref, _excluded$W);
|
|
23991
24436
|
var _useSortBy = useSortBy({
|
|
23992
24437
|
items: items,
|
|
23993
24438
|
transformItems: transformItems
|
|
@@ -24005,7 +24450,7 @@
|
|
|
24005
24450
|
return /*#__PURE__*/React__default.createElement(SortBy, _extends$1({}, props, uiProps));
|
|
24006
24451
|
}
|
|
24007
24452
|
|
|
24008
|
-
var _excluded$
|
|
24453
|
+
var _excluded$X = ["classNames", "nbHits", "processingTimeMS", "nbSortedHits", "areHitsSorted", "translations"];
|
|
24009
24454
|
function Stats(_ref) {
|
|
24010
24455
|
var _ref$classNames = _ref.classNames,
|
|
24011
24456
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -24014,7 +24459,7 @@
|
|
|
24014
24459
|
nbSortedHits = _ref.nbSortedHits,
|
|
24015
24460
|
areHitsSorted = _ref.areHitsSorted,
|
|
24016
24461
|
translations = _ref.translations,
|
|
24017
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24462
|
+
props = _objectWithoutProperties$c(_ref, _excluded$X);
|
|
24018
24463
|
var translationOptions = {
|
|
24019
24464
|
nbHits: nbHits,
|
|
24020
24465
|
processingTimeMS: processingTimeMS,
|
|
@@ -24028,10 +24473,10 @@
|
|
|
24028
24473
|
}, translations.rootElementText(translationOptions)));
|
|
24029
24474
|
}
|
|
24030
24475
|
|
|
24031
|
-
var _excluded$
|
|
24476
|
+
var _excluded$Y = ["translations"];
|
|
24032
24477
|
function Stats$1(_ref) {
|
|
24033
24478
|
var translations = _ref.translations,
|
|
24034
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24479
|
+
props = _objectWithoutProperties$c(_ref, _excluded$Y);
|
|
24035
24480
|
var _useStats = useStats(undefined, {
|
|
24036
24481
|
$$widgetType: 'ais.stats'
|
|
24037
24482
|
}),
|
|
@@ -24081,14 +24526,14 @@
|
|
|
24081
24526
|
return '';
|
|
24082
24527
|
}
|
|
24083
24528
|
|
|
24084
|
-
var _excluded$
|
|
24529
|
+
var _excluded$Z = ["classNames", "checked", "onChange", "label"];
|
|
24085
24530
|
function ToggleRefinement(_ref) {
|
|
24086
24531
|
var _ref$classNames = _ref.classNames,
|
|
24087
24532
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
24088
24533
|
checked = _ref.checked,
|
|
24089
24534
|
_onChange = _ref.onChange,
|
|
24090
24535
|
label = _ref.label,
|
|
24091
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24536
|
+
props = _objectWithoutProperties$c(_ref, _excluded$Z);
|
|
24092
24537
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
24093
24538
|
className: cx('ais-ToggleRefinement', classNames.root, props.className)
|
|
24094
24539
|
}), /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -24105,12 +24550,12 @@
|
|
|
24105
24550
|
}, label)));
|
|
24106
24551
|
}
|
|
24107
24552
|
|
|
24108
|
-
var _excluded$
|
|
24553
|
+
var _excluded$_ = ["attribute", "on", "off"];
|
|
24109
24554
|
function ToggleRefinement$1(_ref) {
|
|
24110
24555
|
var attribute = _ref.attribute,
|
|
24111
24556
|
on = _ref.on,
|
|
24112
24557
|
off = _ref.off,
|
|
24113
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
24558
|
+
props = _objectWithoutProperties$c(_ref, _excluded$_);
|
|
24114
24559
|
var _useToggleRefinement = useToggleRefinement({
|
|
24115
24560
|
attribute: attribute,
|
|
24116
24561
|
on: on,
|
|
@@ -24133,7 +24578,7 @@
|
|
|
24133
24578
|
}, props, uiProps));
|
|
24134
24579
|
}
|
|
24135
24580
|
|
|
24136
|
-
var _excluded
|
|
24581
|
+
var _excluded$$ = ["facetName", "facetValue", "limit", "threshold", "fallbackParameters", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
24137
24582
|
var TrendingItemsUiComponent = createTrendingItemsComponent({
|
|
24138
24583
|
createElement: React.createElement,
|
|
24139
24584
|
Fragment: React.Fragment
|
|
@@ -24151,7 +24596,7 @@
|
|
|
24151
24596
|
headerComponent = _ref.headerComponent,
|
|
24152
24597
|
emptyComponent = _ref.emptyComponent,
|
|
24153
24598
|
layoutComponent = _ref.layoutComponent,
|
|
24154
|
-
props = _objectWithoutProperties$c(_ref, _excluded
|
|
24599
|
+
props = _objectWithoutProperties$c(_ref, _excluded$$);
|
|
24155
24600
|
var facetParameters = facetName && facetValue ? {
|
|
24156
24601
|
facetName: facetName,
|
|
24157
24602
|
facetValue: facetValue
|
|
@@ -24258,6 +24703,7 @@
|
|
|
24258
24703
|
exports.RecommendToolType = RecommendToolType;
|
|
24259
24704
|
exports.RefinementList = RefinementList$2;
|
|
24260
24705
|
exports.RelatedProducts = RelatedProducts;
|
|
24706
|
+
exports.ReverseHighlight = ReverseHighlight$1;
|
|
24261
24707
|
exports.SearchBox = SearchBox$1;
|
|
24262
24708
|
exports.SearchIndexToolType = SearchIndexToolType;
|
|
24263
24709
|
exports.Snippet = Snippet$1;
|