react-instantsearch 7.12.4 → 7.13.1
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/README.md +1 -2
- package/dist/cjs/components/Carousel.js +25 -0
- package/dist/cjs/components/index.js +16 -0
- package/dist/cjs/index.js +11 -0
- package/dist/cjs/widgets/FrequentlyBoughtTogether.js +16 -1
- package/dist/cjs/widgets/LookingSimilar.js +16 -1
- package/dist/cjs/widgets/RelatedProducts.js +16 -1
- package/dist/cjs/widgets/TrendingItems.js +11 -1
- package/dist/es/components/Carousel.d.ts +3 -0
- package/dist/es/components/Carousel.js +16 -0
- package/dist/es/components/index.d.ts +1 -0
- package/dist/es/components/index.js +1 -0
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.js +2 -1
- package/dist/es/widgets/FrequentlyBoughtTogether.d.ts +5 -4
- package/dist/es/widgets/FrequentlyBoughtTogether.js +17 -1
- package/dist/es/widgets/LookingSimilar.d.ts +5 -4
- package/dist/es/widgets/LookingSimilar.js +17 -1
- package/dist/es/widgets/RelatedProducts.d.ts +3 -2
- package/dist/es/widgets/RelatedProducts.js +17 -1
- package/dist/es/widgets/TrendingItems.d.ts +3 -2
- package/dist/es/widgets/TrendingItems.js +11 -1
- package/dist/umd/ReactInstantSearch.js +360 -137
- 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.13.1';
|
|
11
11
|
|
|
12
12
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
13
13
|
//
|
|
@@ -4531,7 +4531,7 @@
|
|
|
4531
4531
|
|
|
4532
4532
|
var sortAndMergeRecommendations_1 = sortAndMergeRecommendations;
|
|
4533
4533
|
|
|
4534
|
-
var version$1 = '3.22.
|
|
4534
|
+
var version$1 = '3.22.5';
|
|
4535
4535
|
|
|
4536
4536
|
var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
|
|
4537
4537
|
|
|
@@ -4901,7 +4901,10 @@
|
|
|
4901
4901
|
maxFacetHits,
|
|
4902
4902
|
userState
|
|
4903
4903
|
) {
|
|
4904
|
-
var clientHasSFFV =
|
|
4904
|
+
var clientHasSFFV =
|
|
4905
|
+
typeof this.client.searchForFacetValues === 'function' &&
|
|
4906
|
+
// v5 has a wrong sffv signature
|
|
4907
|
+
typeof this.client.searchForFacets !== 'function';
|
|
4905
4908
|
var clientHasInitIndex = typeof this.client.initIndex === 'function';
|
|
4906
4909
|
if (
|
|
4907
4910
|
!clientHasSFFV &&
|
|
@@ -8355,7 +8358,7 @@
|
|
|
8355
8358
|
// search on it first.
|
|
8356
8359
|
if ('transporter' in client && !client._cacheHydrated) {
|
|
8357
8360
|
client._cacheHydrated = true;
|
|
8358
|
-
var baseMethod = client.search;
|
|
8361
|
+
var baseMethod = client.search.bind(client);
|
|
8359
8362
|
// @ts-ignore wanting type checks for v3 on this would make this too complex
|
|
8360
8363
|
client.search = function (requests) {
|
|
8361
8364
|
for (var _len = arguments.length, methodArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -10908,7 +10911,7 @@
|
|
|
10908
10911
|
_ref2$value = _ref2.value,
|
|
10909
10912
|
attributeValue = _ref2$value === void 0 ? '' : _ref2$value;
|
|
10910
10913
|
|
|
10911
|
-
// cx is not used, since it would be bundled as a dependency for Vue
|
|
10914
|
+
// cx is not used, since it would be bundled as a dependency for Vue
|
|
10912
10915
|
var className = suit({
|
|
10913
10916
|
descendantName: 'highlighted'
|
|
10914
10917
|
}) + (cssClasses.highlighted ? " ".concat(cssClasses.highlighted) : '');
|
|
@@ -10932,7 +10935,7 @@
|
|
|
10932
10935
|
_ref2$value = _ref2.value,
|
|
10933
10936
|
attributeValue = _ref2$value === void 0 ? '' : _ref2$value;
|
|
10934
10937
|
|
|
10935
|
-
// cx is not used, since it would be bundled as a dependency for Vue
|
|
10938
|
+
// cx is not used, since it would be bundled as a dependency for Vue
|
|
10936
10939
|
var className = suit$1({
|
|
10937
10940
|
descendantName: 'highlighted'
|
|
10938
10941
|
}) + (cssClasses.highlighted ? " ".concat(cssClasses.highlighted) : '');
|
|
@@ -10957,7 +10960,7 @@
|
|
|
10957
10960
|
_ref2$value = _ref2.value,
|
|
10958
10961
|
attributeValue = _ref2$value === void 0 ? '' : _ref2$value;
|
|
10959
10962
|
|
|
10960
|
-
// cx is not used, since it would be bundled as a dependency for Vue
|
|
10963
|
+
// cx is not used, since it would be bundled as a dependency for Vue
|
|
10961
10964
|
var className = suit$2({
|
|
10962
10965
|
descendantName: 'highlighted'
|
|
10963
10966
|
}) + (cssClasses.highlighted ? " ".concat(cssClasses.highlighted) : '');
|
|
@@ -10981,7 +10984,7 @@
|
|
|
10981
10984
|
_ref2$value = _ref2.value,
|
|
10982
10985
|
attributeValue = _ref2$value === void 0 ? '' : _ref2$value;
|
|
10983
10986
|
|
|
10984
|
-
// cx is not used, since it would be bundled as a dependency for Vue
|
|
10987
|
+
// cx is not used, since it would be bundled as a dependency for Vue
|
|
10985
10988
|
var className = suit$3({
|
|
10986
10989
|
descendantName: 'highlighted'
|
|
10987
10990
|
}) + (cssClasses.highlighted ? " ".concat(cssClasses.highlighted) : '');
|
|
@@ -13089,7 +13092,7 @@
|
|
|
13089
13092
|
};
|
|
13090
13093
|
}
|
|
13091
13094
|
|
|
13092
|
-
var version$3 = '4.
|
|
13095
|
+
var version$3 = '4.74.1';
|
|
13093
13096
|
|
|
13094
13097
|
function _typeof$q(obj) {
|
|
13095
13098
|
"@babel/helpers - typeof";
|
|
@@ -20693,9 +20696,9 @@
|
|
|
20693
20696
|
};
|
|
20694
20697
|
}
|
|
20695
20698
|
|
|
20696
|
-
function
|
|
20699
|
+
function createListComponent(_ref) {
|
|
20697
20700
|
var createElement = _ref.createElement;
|
|
20698
|
-
return function
|
|
20701
|
+
return function List(userProps) {
|
|
20699
20702
|
var _userProps$classNames = userProps.classNames,
|
|
20700
20703
|
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
20701
20704
|
ItemComponent = userProps.itemComponent,
|
|
@@ -20718,7 +20721,7 @@
|
|
|
20718
20721
|
};
|
|
20719
20722
|
}
|
|
20720
20723
|
|
|
20721
|
-
var _excluded$c = ["
|
|
20724
|
+
var _excluded$c = ["listRef", "nextButtonRef", "previousButtonRef", "carouselIdRef", "classNames", "itemComponent", "previousIconComponent", "nextIconComponent", "items", "translations"];
|
|
20722
20725
|
function ownKeys$L(object, enumerableOnly) {
|
|
20723
20726
|
var keys = Object.keys(object);
|
|
20724
20727
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -20740,6 +20743,175 @@
|
|
|
20740
20743
|
}
|
|
20741
20744
|
return target;
|
|
20742
20745
|
}
|
|
20746
|
+
var lastCarouselId = 0;
|
|
20747
|
+
function generateCarouselId() {
|
|
20748
|
+
return "ais-Carousel-".concat(lastCarouselId++);
|
|
20749
|
+
}
|
|
20750
|
+
function PreviousIconDefaultComponent(_ref) {
|
|
20751
|
+
var createElement = _ref.createElement;
|
|
20752
|
+
return createElement("svg", {
|
|
20753
|
+
width: "8",
|
|
20754
|
+
height: "16",
|
|
20755
|
+
viewBox: "0 0 8 16",
|
|
20756
|
+
fill: "none"
|
|
20757
|
+
}, createElement("path", {
|
|
20758
|
+
fillRule: "evenodd",
|
|
20759
|
+
clipRule: "evenodd",
|
|
20760
|
+
fill: "currentColor",
|
|
20761
|
+
d: "M7.13809 0.744078C7.39844 1.06951 7.39844 1.59715 7.13809 1.92259L2.27616 8L7.13809 14.0774C7.39844 14.4028 7.39844 14.9305 7.13809 15.2559C6.87774 15.5814 6.45563 15.5814 6.19528 15.2559L0.861949 8.58926C0.6016 8.26382 0.6016 7.73618 0.861949 7.41074L6.19528 0.744078C6.45563 0.418641 6.87774 0.418641 7.13809 0.744078Z"
|
|
20762
|
+
}));
|
|
20763
|
+
}
|
|
20764
|
+
function NextIconDefaultComponent(_ref2) {
|
|
20765
|
+
var createElement = _ref2.createElement;
|
|
20766
|
+
return createElement("svg", {
|
|
20767
|
+
width: "8",
|
|
20768
|
+
height: "16",
|
|
20769
|
+
viewBox: "0 0 8 16",
|
|
20770
|
+
fill: "none"
|
|
20771
|
+
}, createElement("path", {
|
|
20772
|
+
fillRule: "evenodd",
|
|
20773
|
+
clipRule: "evenodd",
|
|
20774
|
+
fill: "currentColor",
|
|
20775
|
+
d: "M0.861908 15.2559C0.601559 14.9305 0.601559 14.4028 0.861908 14.0774L5.72384 8L0.861908 1.92259C0.601559 1.59715 0.601559 1.06952 0.861908 0.744079C1.12226 0.418642 1.54437 0.418642 1.80472 0.744079L7.13805 7.41074C7.3984 7.73618 7.3984 8.26382 7.13805 8.58926L1.80472 15.2559C1.54437 15.5814 1.12226 15.5814 0.861908 15.2559Z"
|
|
20776
|
+
}));
|
|
20777
|
+
}
|
|
20778
|
+
function createCarouselComponent(_ref3) {
|
|
20779
|
+
var createElement = _ref3.createElement,
|
|
20780
|
+
Fragment = _ref3.Fragment;
|
|
20781
|
+
return function Carousel(userProps) {
|
|
20782
|
+
var listRef = userProps.listRef,
|
|
20783
|
+
nextButtonRef = userProps.nextButtonRef,
|
|
20784
|
+
previousButtonRef = userProps.previousButtonRef,
|
|
20785
|
+
carouselIdRef = userProps.carouselIdRef,
|
|
20786
|
+
_userProps$classNames = userProps.classNames,
|
|
20787
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
20788
|
+
_userProps$itemCompon = userProps.itemComponent,
|
|
20789
|
+
ItemComponent = _userProps$itemCompon === void 0 ? createDefaultItemComponent({
|
|
20790
|
+
createElement: createElement,
|
|
20791
|
+
Fragment: Fragment
|
|
20792
|
+
}) : _userProps$itemCompon,
|
|
20793
|
+
_userProps$previousIc = userProps.previousIconComponent,
|
|
20794
|
+
PreviousIconComponent = _userProps$previousIc === void 0 ? PreviousIconDefaultComponent : _userProps$previousIc,
|
|
20795
|
+
_userProps$nextIconCo = userProps.nextIconComponent,
|
|
20796
|
+
NextIconComponent = _userProps$nextIconCo === void 0 ? NextIconDefaultComponent : _userProps$nextIconCo,
|
|
20797
|
+
items = userProps.items,
|
|
20798
|
+
userTranslations = userProps.translations,
|
|
20799
|
+
props = _objectWithoutProperties$d(userProps, _excluded$c);
|
|
20800
|
+
var translations = _objectSpread$K({
|
|
20801
|
+
listLabel: 'Items',
|
|
20802
|
+
nextButtonLabel: 'Next',
|
|
20803
|
+
nextButtonTitle: 'Next',
|
|
20804
|
+
previousButtonLabel: 'Previous',
|
|
20805
|
+
previousButtonTitle: 'Previous'
|
|
20806
|
+
}, userTranslations);
|
|
20807
|
+
var cssClasses = {
|
|
20808
|
+
root: cx('ais-Carousel', classNames.root),
|
|
20809
|
+
list: cx('ais-Carousel-list', classNames.list),
|
|
20810
|
+
item: cx('ais-Carousel-item', classNames.item),
|
|
20811
|
+
navigation: cx('ais-Carousel-navigation', classNames.navigation),
|
|
20812
|
+
navigationNext: cx('ais-Carousel-navigation--next', classNames.navigationNext),
|
|
20813
|
+
navigationPrevious: cx('ais-Carousel-navigation--previous', classNames.navigationPrevious)
|
|
20814
|
+
};
|
|
20815
|
+
function scrollLeft() {
|
|
20816
|
+
if (listRef.current) {
|
|
20817
|
+
listRef.current.scrollLeft -= listRef.current.offsetWidth * 0.75;
|
|
20818
|
+
}
|
|
20819
|
+
}
|
|
20820
|
+
function scrollRight() {
|
|
20821
|
+
if (listRef.current) {
|
|
20822
|
+
listRef.current.scrollLeft += listRef.current.offsetWidth * 0.75;
|
|
20823
|
+
}
|
|
20824
|
+
}
|
|
20825
|
+
function updateNavigationButtonsProps() {
|
|
20826
|
+
if (!listRef.current || !previousButtonRef.current || !nextButtonRef.current) {
|
|
20827
|
+
return;
|
|
20828
|
+
}
|
|
20829
|
+
previousButtonRef.current.hidden = listRef.current.scrollLeft <= 0;
|
|
20830
|
+
nextButtonRef.current.hidden = listRef.current.scrollLeft + listRef.current.clientWidth >= listRef.current.scrollWidth;
|
|
20831
|
+
}
|
|
20832
|
+
if (items.length === 0) {
|
|
20833
|
+
return null;
|
|
20834
|
+
}
|
|
20835
|
+
return createElement("div", _extends$2({}, props, {
|
|
20836
|
+
className: cx(cssClasses.root)
|
|
20837
|
+
}), createElement("button", {
|
|
20838
|
+
ref: previousButtonRef,
|
|
20839
|
+
title: translations.previousButtonTitle,
|
|
20840
|
+
"aria-label": translations.previousButtonLabel,
|
|
20841
|
+
hidden: true,
|
|
20842
|
+
"aria-controls": carouselIdRef.current,
|
|
20843
|
+
className: cx(cssClasses.navigation, cssClasses.navigationPrevious),
|
|
20844
|
+
onClick: function onClick(event) {
|
|
20845
|
+
event.preventDefault();
|
|
20846
|
+
scrollLeft();
|
|
20847
|
+
}
|
|
20848
|
+
}, createElement(PreviousIconComponent, {
|
|
20849
|
+
createElement: createElement
|
|
20850
|
+
})), createElement("ol", {
|
|
20851
|
+
className: cx(cssClasses.list),
|
|
20852
|
+
ref: listRef,
|
|
20853
|
+
tabIndex: 0,
|
|
20854
|
+
id: carouselIdRef.current,
|
|
20855
|
+
"aria-roledescription": "carousel",
|
|
20856
|
+
"aria-label": translations.listLabel,
|
|
20857
|
+
"aria-live": "polite",
|
|
20858
|
+
onScroll: updateNavigationButtonsProps,
|
|
20859
|
+
onKeyDown: function onKeyDown(event) {
|
|
20860
|
+
if (event.key === 'ArrowLeft') {
|
|
20861
|
+
event.preventDefault();
|
|
20862
|
+
scrollLeft();
|
|
20863
|
+
} else if (event.key === 'ArrowRight') {
|
|
20864
|
+
event.preventDefault();
|
|
20865
|
+
scrollRight();
|
|
20866
|
+
}
|
|
20867
|
+
}
|
|
20868
|
+
}, items.map(function (item, index) {
|
|
20869
|
+
return createElement("li", {
|
|
20870
|
+
key: item.objectID,
|
|
20871
|
+
className: cx(cssClasses.item),
|
|
20872
|
+
"aria-roledescription": "slide",
|
|
20873
|
+
"aria-label": "".concat(index + 1, " of ").concat(items.length)
|
|
20874
|
+
}, createElement(ItemComponent, {
|
|
20875
|
+
item: item
|
|
20876
|
+
}));
|
|
20877
|
+
})), createElement("button", {
|
|
20878
|
+
ref: nextButtonRef,
|
|
20879
|
+
title: translations.nextButtonTitle,
|
|
20880
|
+
"aria-label": translations.nextButtonLabel,
|
|
20881
|
+
"aria-controls": carouselIdRef.current,
|
|
20882
|
+
className: cx(cssClasses.navigation, cssClasses.navigationNext),
|
|
20883
|
+
onClick: function onClick(event) {
|
|
20884
|
+
event.preventDefault();
|
|
20885
|
+
scrollRight();
|
|
20886
|
+
}
|
|
20887
|
+
}, createElement(NextIconComponent, {
|
|
20888
|
+
createElement: createElement
|
|
20889
|
+
})));
|
|
20890
|
+
};
|
|
20891
|
+
}
|
|
20892
|
+
|
|
20893
|
+
var _excluded$d = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
20894
|
+
function ownKeys$M(object, enumerableOnly) {
|
|
20895
|
+
var keys = Object.keys(object);
|
|
20896
|
+
if (Object.getOwnPropertySymbols) {
|
|
20897
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
20898
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
20899
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
20900
|
+
})), keys.push.apply(keys, symbols);
|
|
20901
|
+
}
|
|
20902
|
+
return keys;
|
|
20903
|
+
}
|
|
20904
|
+
function _objectSpread$L(target) {
|
|
20905
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
20906
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
20907
|
+
i % 2 ? ownKeys$M(Object(source), !0).forEach(function (key) {
|
|
20908
|
+
_defineProperty$N(target, key, source[key]);
|
|
20909
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$M(Object(source)).forEach(function (key) {
|
|
20910
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
20911
|
+
});
|
|
20912
|
+
}
|
|
20913
|
+
return target;
|
|
20914
|
+
}
|
|
20743
20915
|
function createFrequentlyBoughtTogetherComponent(_ref) {
|
|
20744
20916
|
var createElement = _ref.createElement,
|
|
20745
20917
|
Fragment = _ref.Fragment;
|
|
@@ -20761,17 +20933,17 @@
|
|
|
20761
20933
|
createElement: createElement,
|
|
20762
20934
|
Fragment: Fragment
|
|
20763
20935
|
}) : _userProps$itemCompon,
|
|
20764
|
-
_userProps$
|
|
20765
|
-
|
|
20936
|
+
_userProps$layout = userProps.layout,
|
|
20937
|
+
Layout = _userProps$layout === void 0 ? createListComponent({
|
|
20766
20938
|
createElement: createElement,
|
|
20767
20939
|
Fragment: Fragment
|
|
20768
|
-
}) : _userProps$
|
|
20940
|
+
}) : _userProps$layout,
|
|
20769
20941
|
items = userProps.items,
|
|
20770
20942
|
status = userProps.status,
|
|
20771
20943
|
userTranslations = userProps.translations,
|
|
20772
20944
|
sendEvent = userProps.sendEvent,
|
|
20773
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
20774
|
-
var translations = _objectSpread$
|
|
20945
|
+
props = _objectWithoutProperties$d(userProps, _excluded$d);
|
|
20946
|
+
var translations = _objectSpread$L({
|
|
20775
20947
|
title: 'Frequently bought together',
|
|
20776
20948
|
sliderLabel: 'Frequently bought together products'
|
|
20777
20949
|
}, userTranslations);
|
|
@@ -20794,9 +20966,8 @@
|
|
|
20794
20966
|
classNames: cssClasses,
|
|
20795
20967
|
items: items,
|
|
20796
20968
|
translations: translations
|
|
20797
|
-
}), createElement(
|
|
20969
|
+
}), createElement(Layout, {
|
|
20798
20970
|
classNames: cssClasses,
|
|
20799
|
-
translations: translations,
|
|
20800
20971
|
itemComponent: ItemComponent,
|
|
20801
20972
|
items: items,
|
|
20802
20973
|
sendEvent: sendEvent
|
|
@@ -20804,7 +20975,7 @@
|
|
|
20804
20975
|
};
|
|
20805
20976
|
}
|
|
20806
20977
|
|
|
20807
|
-
var _excluded$
|
|
20978
|
+
var _excluded$e = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
|
|
20808
20979
|
function createHighlightPartComponent(_ref) {
|
|
20809
20980
|
var createElement = _ref.createElement;
|
|
20810
20981
|
return function HighlightPart(_ref2) {
|
|
@@ -20837,7 +21008,7 @@
|
|
|
20837
21008
|
className = userProps.className,
|
|
20838
21009
|
_userProps$classNames = userProps.classNames,
|
|
20839
21010
|
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
20840
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
21011
|
+
props = _objectWithoutProperties$d(userProps, _excluded$e);
|
|
20841
21012
|
return createElement("span", _extends$2({}, props, {
|
|
20842
21013
|
className: cx(classNames.root, className)
|
|
20843
21014
|
}), parts.map(function (part, partIndex) {
|
|
@@ -20859,7 +21030,7 @@
|
|
|
20859
21030
|
};
|
|
20860
21031
|
}
|
|
20861
21032
|
|
|
20862
|
-
var _excluded$
|
|
21033
|
+
var _excluded$f = ["classNames", "hits", "itemComponent", "sendEvent", "emptyComponent", "banner", "bannerComponent"];
|
|
20863
21034
|
|
|
20864
21035
|
// Should be imported from a shared package in the future
|
|
20865
21036
|
|
|
@@ -20904,7 +21075,7 @@
|
|
|
20904
21075
|
EmptyComponent = userProps.emptyComponent,
|
|
20905
21076
|
banner = userProps.banner,
|
|
20906
21077
|
BannerComponent = userProps.bannerComponent,
|
|
20907
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
21078
|
+
props = _objectWithoutProperties$d(userProps, _excluded$f);
|
|
20908
21079
|
return createElement("div", _extends$2({}, props, {
|
|
20909
21080
|
className: cx('ais-Hits', classNames.root, hits.length === 0 && cx('ais-Hits--empty', classNames.emptyRoot), props.className)
|
|
20910
21081
|
}), banner && (BannerComponent ? createElement(BannerComponent, {
|
|
@@ -20932,8 +21103,8 @@
|
|
|
20932
21103
|
};
|
|
20933
21104
|
}
|
|
20934
21105
|
|
|
20935
|
-
var _excluded$
|
|
20936
|
-
function ownKeys$
|
|
21106
|
+
var _excluded$g = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
21107
|
+
function ownKeys$N(object, enumerableOnly) {
|
|
20937
21108
|
var keys = Object.keys(object);
|
|
20938
21109
|
if (Object.getOwnPropertySymbols) {
|
|
20939
21110
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -20943,12 +21114,12 @@
|
|
|
20943
21114
|
}
|
|
20944
21115
|
return keys;
|
|
20945
21116
|
}
|
|
20946
|
-
function _objectSpread$
|
|
21117
|
+
function _objectSpread$M(target) {
|
|
20947
21118
|
for (var i = 1; i < arguments.length; i++) {
|
|
20948
21119
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
20949
|
-
i % 2 ? ownKeys$
|
|
21120
|
+
i % 2 ? ownKeys$N(Object(source), !0).forEach(function (key) {
|
|
20950
21121
|
_defineProperty$N(target, key, source[key]);
|
|
20951
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
21122
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$N(Object(source)).forEach(function (key) {
|
|
20952
21123
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
20953
21124
|
});
|
|
20954
21125
|
}
|
|
@@ -20975,17 +21146,17 @@
|
|
|
20975
21146
|
createElement: createElement,
|
|
20976
21147
|
Fragment: Fragment
|
|
20977
21148
|
}) : _userProps$itemCompon,
|
|
20978
|
-
_userProps$
|
|
20979
|
-
|
|
21149
|
+
_userProps$layout = userProps.layout,
|
|
21150
|
+
Layout = _userProps$layout === void 0 ? createListComponent({
|
|
20980
21151
|
createElement: createElement,
|
|
20981
21152
|
Fragment: Fragment
|
|
20982
|
-
}) : _userProps$
|
|
21153
|
+
}) : _userProps$layout,
|
|
20983
21154
|
items = userProps.items,
|
|
20984
21155
|
status = userProps.status,
|
|
20985
21156
|
userTranslations = userProps.translations,
|
|
20986
21157
|
sendEvent = userProps.sendEvent,
|
|
20987
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
20988
|
-
var translations = _objectSpread$
|
|
21158
|
+
props = _objectWithoutProperties$d(userProps, _excluded$g);
|
|
21159
|
+
var translations = _objectSpread$M({
|
|
20989
21160
|
title: 'Looking similar',
|
|
20990
21161
|
sliderLabel: 'Looking similar'
|
|
20991
21162
|
}, userTranslations);
|
|
@@ -21008,9 +21179,8 @@
|
|
|
21008
21179
|
classNames: cssClasses,
|
|
21009
21180
|
items: items,
|
|
21010
21181
|
translations: translations
|
|
21011
|
-
}), createElement(
|
|
21182
|
+
}), createElement(Layout, {
|
|
21012
21183
|
classNames: cssClasses,
|
|
21013
|
-
translations: translations,
|
|
21014
21184
|
itemComponent: ItemComponent,
|
|
21015
21185
|
items: items,
|
|
21016
21186
|
sendEvent: sendEvent
|
|
@@ -21018,8 +21188,8 @@
|
|
|
21018
21188
|
};
|
|
21019
21189
|
}
|
|
21020
21190
|
|
|
21021
|
-
var _excluded$
|
|
21022
|
-
function ownKeys$
|
|
21191
|
+
var _excluded$h = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
21192
|
+
function ownKeys$O(object, enumerableOnly) {
|
|
21023
21193
|
var keys = Object.keys(object);
|
|
21024
21194
|
if (Object.getOwnPropertySymbols) {
|
|
21025
21195
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -21029,12 +21199,12 @@
|
|
|
21029
21199
|
}
|
|
21030
21200
|
return keys;
|
|
21031
21201
|
}
|
|
21032
|
-
function _objectSpread$
|
|
21202
|
+
function _objectSpread$N(target) {
|
|
21033
21203
|
for (var i = 1; i < arguments.length; i++) {
|
|
21034
21204
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
21035
|
-
i % 2 ? ownKeys$
|
|
21205
|
+
i % 2 ? ownKeys$O(Object(source), !0).forEach(function (key) {
|
|
21036
21206
|
_defineProperty$N(target, key, source[key]);
|
|
21037
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
21207
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$O(Object(source)).forEach(function (key) {
|
|
21038
21208
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
21039
21209
|
});
|
|
21040
21210
|
}
|
|
@@ -21061,17 +21231,17 @@
|
|
|
21061
21231
|
createElement: createElement,
|
|
21062
21232
|
Fragment: Fragment
|
|
21063
21233
|
}) : _userProps$itemCompon,
|
|
21064
|
-
_userProps$
|
|
21065
|
-
|
|
21234
|
+
_userProps$layout = userProps.layout,
|
|
21235
|
+
Layout = _userProps$layout === void 0 ? createListComponent({
|
|
21066
21236
|
createElement: createElement,
|
|
21067
21237
|
Fragment: Fragment
|
|
21068
|
-
}) : _userProps$
|
|
21238
|
+
}) : _userProps$layout,
|
|
21069
21239
|
items = userProps.items,
|
|
21070
21240
|
status = userProps.status,
|
|
21071
21241
|
userTranslations = userProps.translations,
|
|
21072
21242
|
sendEvent = userProps.sendEvent,
|
|
21073
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
21074
|
-
var translations = _objectSpread$
|
|
21243
|
+
props = _objectWithoutProperties$d(userProps, _excluded$h);
|
|
21244
|
+
var translations = _objectSpread$N({
|
|
21075
21245
|
title: 'Related products',
|
|
21076
21246
|
sliderLabel: 'Related products'
|
|
21077
21247
|
}, userTranslations);
|
|
@@ -21094,9 +21264,8 @@
|
|
|
21094
21264
|
classNames: cssClasses,
|
|
21095
21265
|
items: items,
|
|
21096
21266
|
translations: translations
|
|
21097
|
-
}), createElement(
|
|
21267
|
+
}), createElement(Layout, {
|
|
21098
21268
|
classNames: cssClasses,
|
|
21099
|
-
translations: translations,
|
|
21100
21269
|
itemComponent: ItemComponent,
|
|
21101
21270
|
items: items,
|
|
21102
21271
|
sendEvent: sendEvent
|
|
@@ -21104,8 +21273,8 @@
|
|
|
21104
21273
|
};
|
|
21105
21274
|
}
|
|
21106
21275
|
|
|
21107
|
-
var _excluded$
|
|
21108
|
-
function ownKeys$
|
|
21276
|
+
var _excluded$i = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
21277
|
+
function ownKeys$P(object, enumerableOnly) {
|
|
21109
21278
|
var keys = Object.keys(object);
|
|
21110
21279
|
if (Object.getOwnPropertySymbols) {
|
|
21111
21280
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -21115,12 +21284,12 @@
|
|
|
21115
21284
|
}
|
|
21116
21285
|
return keys;
|
|
21117
21286
|
}
|
|
21118
|
-
function _objectSpread$
|
|
21287
|
+
function _objectSpread$O(target) {
|
|
21119
21288
|
for (var i = 1; i < arguments.length; i++) {
|
|
21120
21289
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
21121
|
-
i % 2 ? ownKeys$
|
|
21290
|
+
i % 2 ? ownKeys$P(Object(source), !0).forEach(function (key) {
|
|
21122
21291
|
_defineProperty$N(target, key, source[key]);
|
|
21123
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
21292
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$P(Object(source)).forEach(function (key) {
|
|
21124
21293
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
21125
21294
|
});
|
|
21126
21295
|
}
|
|
@@ -21147,17 +21316,17 @@
|
|
|
21147
21316
|
createElement: createElement,
|
|
21148
21317
|
Fragment: Fragment
|
|
21149
21318
|
}) : _userProps$itemCompon,
|
|
21150
|
-
_userProps$
|
|
21151
|
-
|
|
21319
|
+
_userProps$layout = userProps.layout,
|
|
21320
|
+
Layout = _userProps$layout === void 0 ? createListComponent({
|
|
21152
21321
|
createElement: createElement,
|
|
21153
21322
|
Fragment: Fragment
|
|
21154
|
-
}) : _userProps$
|
|
21323
|
+
}) : _userProps$layout,
|
|
21155
21324
|
items = userProps.items,
|
|
21156
21325
|
status = userProps.status,
|
|
21157
21326
|
userTranslations = userProps.translations,
|
|
21158
21327
|
sendEvent = userProps.sendEvent,
|
|
21159
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
21160
|
-
var translations = _objectSpread$
|
|
21328
|
+
props = _objectWithoutProperties$d(userProps, _excluded$i);
|
|
21329
|
+
var translations = _objectSpread$O({
|
|
21161
21330
|
title: 'Trending items',
|
|
21162
21331
|
sliderLabel: 'Trending items'
|
|
21163
21332
|
}, userTranslations);
|
|
@@ -21180,9 +21349,8 @@
|
|
|
21180
21349
|
classNames: cssClasses,
|
|
21181
21350
|
items: items,
|
|
21182
21351
|
translations: translations
|
|
21183
|
-
}), createElement(
|
|
21352
|
+
}), createElement(Layout, {
|
|
21184
21353
|
classNames: cssClasses,
|
|
21185
|
-
translations: translations,
|
|
21186
21354
|
itemComponent: ItemComponent,
|
|
21187
21355
|
items: items,
|
|
21188
21356
|
sendEvent: sendEvent
|
|
@@ -21195,7 +21363,7 @@
|
|
|
21195
21363
|
return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
|
|
21196
21364
|
}
|
|
21197
21365
|
|
|
21198
|
-
var _excluded$
|
|
21366
|
+
var _excluded$j = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
|
|
21199
21367
|
function Breadcrumb(_ref) {
|
|
21200
21368
|
var _ref$classNames = _ref.classNames,
|
|
21201
21369
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -21207,7 +21375,7 @@
|
|
|
21207
21375
|
_ref$separator = _ref.separator,
|
|
21208
21376
|
separator = _ref$separator === void 0 ? '>' : _ref$separator,
|
|
21209
21377
|
translations = _ref.translations,
|
|
21210
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21378
|
+
props = _objectWithoutProperties$c(_ref, _excluded$j);
|
|
21211
21379
|
var handleClick = function handleClick(value) {
|
|
21212
21380
|
return function (event) {
|
|
21213
21381
|
if (!isModifierClick(event)) {
|
|
@@ -21242,14 +21410,14 @@
|
|
|
21242
21410
|
})));
|
|
21243
21411
|
}
|
|
21244
21412
|
|
|
21245
|
-
var _excluded$
|
|
21413
|
+
var _excluded$k = ["attributes", "rootPath", "separator", "transformItems", "translations"];
|
|
21246
21414
|
function Breadcrumb$1(_ref) {
|
|
21247
21415
|
var attributes = _ref.attributes,
|
|
21248
21416
|
rootPath = _ref.rootPath,
|
|
21249
21417
|
separator = _ref.separator,
|
|
21250
21418
|
transformItems = _ref.transformItems,
|
|
21251
21419
|
translations = _ref.translations,
|
|
21252
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21420
|
+
props = _objectWithoutProperties$c(_ref, _excluded$k);
|
|
21253
21421
|
var _useBreadcrumb = useBreadcrumb({
|
|
21254
21422
|
attributes: attributes,
|
|
21255
21423
|
rootPath: rootPath,
|
|
@@ -21273,7 +21441,7 @@
|
|
|
21273
21441
|
return /*#__PURE__*/React__default.createElement(Breadcrumb, _extends$1({}, props, uiProps));
|
|
21274
21442
|
}
|
|
21275
21443
|
|
|
21276
|
-
var _excluded$
|
|
21444
|
+
var _excluded$l = ["classNames", "disabled", "onClick", "translations"];
|
|
21277
21445
|
function ClearRefinements(_ref) {
|
|
21278
21446
|
var _ref$classNames = _ref.classNames,
|
|
21279
21447
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -21282,7 +21450,7 @@
|
|
|
21282
21450
|
_ref$onClick = _ref.onClick,
|
|
21283
21451
|
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
21284
21452
|
translations = _ref.translations,
|
|
21285
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21453
|
+
props = _objectWithoutProperties$c(_ref, _excluded$l);
|
|
21286
21454
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21287
21455
|
className: cx('ais-ClearRefinements', classNames.root, props.className)
|
|
21288
21456
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -21292,13 +21460,13 @@
|
|
|
21292
21460
|
}, translations.resetButtonText));
|
|
21293
21461
|
}
|
|
21294
21462
|
|
|
21295
|
-
var _excluded$
|
|
21463
|
+
var _excluded$m = ["includedAttributes", "excludedAttributes", "transformItems", "translations"];
|
|
21296
21464
|
function ClearRefinements$1(_ref) {
|
|
21297
21465
|
var includedAttributes = _ref.includedAttributes,
|
|
21298
21466
|
excludedAttributes = _ref.excludedAttributes,
|
|
21299
21467
|
transformItems = _ref.transformItems,
|
|
21300
21468
|
translations = _ref.translations,
|
|
21301
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21469
|
+
props = _objectWithoutProperties$c(_ref, _excluded$m);
|
|
21302
21470
|
var _useClearRefinements = useClearRefinements({
|
|
21303
21471
|
includedAttributes: includedAttributes,
|
|
21304
21472
|
excludedAttributes: excludedAttributes,
|
|
@@ -21322,7 +21490,7 @@
|
|
|
21322
21490
|
return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
|
|
21323
21491
|
}
|
|
21324
21492
|
|
|
21325
|
-
var _excluded$
|
|
21493
|
+
var _excluded$n = ["classNames", "items", "hasRefinements"];
|
|
21326
21494
|
function CurrentRefinements(_ref) {
|
|
21327
21495
|
var _ref$classNames = _ref.classNames,
|
|
21328
21496
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -21330,7 +21498,7 @@
|
|
|
21330
21498
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
21331
21499
|
_ref$hasRefinements = _ref.hasRefinements,
|
|
21332
21500
|
hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
|
|
21333
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21501
|
+
props = _objectWithoutProperties$c(_ref, _excluded$n);
|
|
21334
21502
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21335
21503
|
className: cx('ais-CurrentRefinements', classNames.root, !hasRefinements && cx('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
|
|
21336
21504
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -21362,12 +21530,12 @@
|
|
|
21362
21530
|
})));
|
|
21363
21531
|
}
|
|
21364
21532
|
|
|
21365
|
-
var _excluded$
|
|
21533
|
+
var _excluded$o = ["includedAttributes", "excludedAttributes", "transformItems"];
|
|
21366
21534
|
function CurrentRefinements$1(_ref) {
|
|
21367
21535
|
var includedAttributes = _ref.includedAttributes,
|
|
21368
21536
|
excludedAttributes = _ref.excludedAttributes,
|
|
21369
21537
|
transformItems = _ref.transformItems,
|
|
21370
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21538
|
+
props = _objectWithoutProperties$c(_ref, _excluded$o);
|
|
21371
21539
|
var _useCurrentRefinement = useCurrentRefinements({
|
|
21372
21540
|
includedAttributes: includedAttributes,
|
|
21373
21541
|
excludedAttributes: excludedAttributes,
|
|
@@ -21384,7 +21552,7 @@
|
|
|
21384
21552
|
return /*#__PURE__*/React__default.createElement(CurrentRefinements, _extends$1({}, props, uiProps));
|
|
21385
21553
|
}
|
|
21386
21554
|
|
|
21387
|
-
var _excluded$
|
|
21555
|
+
var _excluded$p = ["objectIDs", "limit", "threshold", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
21388
21556
|
var FrequentlyBoughtTogetherUiComponent = createFrequentlyBoughtTogetherComponent({
|
|
21389
21557
|
createElement: React.createElement,
|
|
21390
21558
|
Fragment: React.Fragment
|
|
@@ -21399,7 +21567,8 @@
|
|
|
21399
21567
|
itemComponent = _ref.itemComponent,
|
|
21400
21568
|
headerComponent = _ref.headerComponent,
|
|
21401
21569
|
emptyComponent = _ref.emptyComponent,
|
|
21402
|
-
|
|
21570
|
+
layoutComponent = _ref.layoutComponent,
|
|
21571
|
+
props = _objectWithoutProperties$c(_ref, _excluded$p);
|
|
21403
21572
|
var _useInstantSearch = useInstantSearch(),
|
|
21404
21573
|
status = _useInstantSearch.status;
|
|
21405
21574
|
var _useFrequentlyBoughtT = useFrequentlyBoughtTogether({
|
|
@@ -21413,28 +21582,37 @@
|
|
|
21413
21582
|
$$widgetType: 'ais.frequentlyBoughtTogether'
|
|
21414
21583
|
}),
|
|
21415
21584
|
items = _useFrequentlyBoughtT.items;
|
|
21585
|
+
var layout = layoutComponent ? function (layoutProps) {
|
|
21586
|
+
return layoutComponent(_objectSpread2(_objectSpread2({}, layoutProps), {}, {
|
|
21587
|
+
classNames: {
|
|
21588
|
+
list: layoutProps.classNames.list,
|
|
21589
|
+
item: layoutProps.classNames.item
|
|
21590
|
+
}
|
|
21591
|
+
}));
|
|
21592
|
+
} : undefined;
|
|
21416
21593
|
var uiProps = {
|
|
21417
21594
|
items: items,
|
|
21418
21595
|
itemComponent: itemComponent,
|
|
21419
21596
|
headerComponent: headerComponent,
|
|
21420
21597
|
emptyComponent: emptyComponent,
|
|
21598
|
+
layout: layout,
|
|
21421
21599
|
status: status,
|
|
21422
21600
|
sendEvent: function sendEvent() {}
|
|
21423
21601
|
};
|
|
21424
21602
|
return /*#__PURE__*/React__default.createElement(FrequentlyBoughtTogetherUiComponent, _extends$1({}, props, uiProps));
|
|
21425
21603
|
}
|
|
21426
21604
|
|
|
21427
|
-
var _excluded$
|
|
21605
|
+
var _excluded$q = ["isShowingMore", "translations"];
|
|
21428
21606
|
function ShowMoreButton(_ref) {
|
|
21429
21607
|
var isShowingMore = _ref.isShowingMore,
|
|
21430
21608
|
translations = _ref.translations,
|
|
21431
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21609
|
+
props = _objectWithoutProperties$c(_ref, _excluded$q);
|
|
21432
21610
|
return /*#__PURE__*/React__default.createElement("button", props, translations.showMoreButtonText({
|
|
21433
21611
|
isShowingMore: isShowingMore
|
|
21434
21612
|
}));
|
|
21435
21613
|
}
|
|
21436
21614
|
|
|
21437
|
-
var _excluded$
|
|
21615
|
+
var _excluded$r = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
|
|
21438
21616
|
function HierarchicalList(_ref) {
|
|
21439
21617
|
var className = _ref.className,
|
|
21440
21618
|
_ref$classNames = _ref.classNames,
|
|
@@ -21486,7 +21664,7 @@
|
|
|
21486
21664
|
onToggleShowMore = _ref2.onToggleShowMore,
|
|
21487
21665
|
isShowingMore = _ref2.isShowingMore,
|
|
21488
21666
|
translations = _ref2.translations,
|
|
21489
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
21667
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$r);
|
|
21490
21668
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21491
21669
|
className: cx('ais-HierarchicalMenu', classNames.root, !hasItems && cx('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
21492
21670
|
}), /*#__PURE__*/React__default.createElement(HierarchicalList, {
|
|
@@ -21503,7 +21681,7 @@
|
|
|
21503
21681
|
}));
|
|
21504
21682
|
}
|
|
21505
21683
|
|
|
21506
|
-
var _excluded$
|
|
21684
|
+
var _excluded$s = ["attributes", "limit", "rootPath", "separator", "showMore", "showMoreLimit", "showParentLevel", "sortBy", "transformItems", "translations"];
|
|
21507
21685
|
function HierarchicalMenu$1(_ref) {
|
|
21508
21686
|
var attributes = _ref.attributes,
|
|
21509
21687
|
limit = _ref.limit,
|
|
@@ -21515,7 +21693,7 @@
|
|
|
21515
21693
|
sortBy = _ref.sortBy,
|
|
21516
21694
|
transformItems = _ref.transformItems,
|
|
21517
21695
|
translations = _ref.translations,
|
|
21518
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21696
|
+
props = _objectWithoutProperties$c(_ref, _excluded$s);
|
|
21519
21697
|
var _useHierarchicalMenu = useHierarchicalMenu({
|
|
21520
21698
|
attributes: attributes,
|
|
21521
21699
|
limit: limit,
|
|
@@ -21560,11 +21738,11 @@
|
|
|
21560
21738
|
Fragment: React.Fragment
|
|
21561
21739
|
});
|
|
21562
21740
|
|
|
21563
|
-
var _excluded$
|
|
21741
|
+
var _excluded$t = ["classNames"];
|
|
21564
21742
|
function Highlight(_ref) {
|
|
21565
21743
|
var _ref$classNames = _ref.classNames,
|
|
21566
21744
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
21567
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21745
|
+
props = _objectWithoutProperties$c(_ref, _excluded$t);
|
|
21568
21746
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
21569
21747
|
classNames: {
|
|
21570
21748
|
root: cx('ais-Highlight', classNames.root),
|
|
@@ -21575,14 +21753,14 @@
|
|
|
21575
21753
|
}, props));
|
|
21576
21754
|
}
|
|
21577
21755
|
|
|
21578
|
-
var _excluded$
|
|
21756
|
+
var _excluded$u = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
21579
21757
|
function Highlight$1(_ref) {
|
|
21580
21758
|
var hit = _ref.hit,
|
|
21581
21759
|
attribute = _ref.attribute,
|
|
21582
21760
|
highlightedTagName = _ref.highlightedTagName,
|
|
21583
21761
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
21584
21762
|
separator = _ref.separator,
|
|
21585
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21763
|
+
props = _objectWithoutProperties$c(_ref, _excluded$u);
|
|
21586
21764
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
21587
21765
|
var properties = Array.isArray(property) ? property : [property];
|
|
21588
21766
|
var parts = properties.map(function (singleValue) {
|
|
@@ -21596,7 +21774,7 @@
|
|
|
21596
21774
|
}));
|
|
21597
21775
|
}
|
|
21598
21776
|
|
|
21599
|
-
var _excluded$
|
|
21777
|
+
var _excluded$v = ["escapeHTML", "transformItems", "hitComponent", "bannerComponent"],
|
|
21600
21778
|
_excluded2$4 = ["hit", "index"];
|
|
21601
21779
|
// @MAJOR: Move default hit component back to the UI library
|
|
21602
21780
|
// once flavour specificities are erased
|
|
@@ -21618,7 +21796,7 @@
|
|
|
21618
21796
|
_ref2$hitComponent = _ref2.hitComponent,
|
|
21619
21797
|
HitComponent = _ref2$hitComponent === void 0 ? DefaultHitComponent : _ref2$hitComponent,
|
|
21620
21798
|
BannerComponent = _ref2.bannerComponent,
|
|
21621
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
21799
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$v);
|
|
21622
21800
|
var _useHits = useHits({
|
|
21623
21801
|
escapeHTML: escapeHTML,
|
|
21624
21802
|
transformItems: transformItems
|
|
@@ -21654,14 +21832,14 @@
|
|
|
21654
21832
|
return /*#__PURE__*/React__default.createElement(HitsUiComponent, _extends$1({}, props, uiProps));
|
|
21655
21833
|
}
|
|
21656
21834
|
|
|
21657
|
-
var _excluded$
|
|
21835
|
+
var _excluded$w = ["items", "onChange", "currentValue", "classNames"];
|
|
21658
21836
|
function HitsPerPage(_ref) {
|
|
21659
21837
|
var items = _ref.items,
|
|
21660
21838
|
_onChange = _ref.onChange,
|
|
21661
21839
|
currentValue = _ref.currentValue,
|
|
21662
21840
|
_ref$classNames = _ref.classNames,
|
|
21663
21841
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
21664
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21842
|
+
props = _objectWithoutProperties$c(_ref, _excluded$w);
|
|
21665
21843
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21666
21844
|
className: cx('ais-HitsPerPage', classNames.root, props.className)
|
|
21667
21845
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -21679,11 +21857,11 @@
|
|
|
21679
21857
|
})));
|
|
21680
21858
|
}
|
|
21681
21859
|
|
|
21682
|
-
var _excluded$
|
|
21860
|
+
var _excluded$x = ["items", "transformItems"];
|
|
21683
21861
|
function HitsPerPage$1(_ref) {
|
|
21684
21862
|
var userItems = _ref.items,
|
|
21685
21863
|
transformItems = _ref.transformItems,
|
|
21686
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21864
|
+
props = _objectWithoutProperties$c(_ref, _excluded$x);
|
|
21687
21865
|
var _useHitsPerPage = useHitsPerPage({
|
|
21688
21866
|
items: userItems,
|
|
21689
21867
|
transformItems: transformItems
|
|
@@ -21707,7 +21885,7 @@
|
|
|
21707
21885
|
return /*#__PURE__*/React__default.createElement(HitsPerPage, _extends$1({}, props, uiProps));
|
|
21708
21886
|
}
|
|
21709
21887
|
|
|
21710
|
-
var _excluded$
|
|
21888
|
+
var _excluded$y = ["hitComponent", "hits", "bannerComponent", "banner", "sendEvent", "isFirstPage", "isLastPage", "onShowPrevious", "onShowMore", "classNames", "translations"];
|
|
21711
21889
|
function DefaultHitComponent$1(_ref) {
|
|
21712
21890
|
var hit = _ref.hit;
|
|
21713
21891
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -21752,7 +21930,7 @@
|
|
|
21752
21930
|
_ref3$classNames = _ref3.classNames,
|
|
21753
21931
|
classNames = _ref3$classNames === void 0 ? {} : _ref3$classNames,
|
|
21754
21932
|
translations = _ref3.translations,
|
|
21755
|
-
props = _objectWithoutProperties$c(_ref3, _excluded$
|
|
21933
|
+
props = _objectWithoutProperties$c(_ref3, _excluded$y);
|
|
21756
21934
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21757
21935
|
className: cx('ais-InfiniteHits', classNames.root, hits.length === 0 && cx('ais-InfiniteHits--empty', classNames.emptyRoot), props.className)
|
|
21758
21936
|
}), onShowPrevious && /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -21788,7 +21966,7 @@
|
|
|
21788
21966
|
}, translations.showMoreButtonText));
|
|
21789
21967
|
}
|
|
21790
21968
|
|
|
21791
|
-
var _excluded$
|
|
21969
|
+
var _excluded$z = ["showPrevious", "cache", "escapeHTML", "showPrevious", "transformItems", "translations", "bannerComponent"];
|
|
21792
21970
|
function InfiniteHits$1(_ref) {
|
|
21793
21971
|
var _ref$showPrevious = _ref.showPrevious,
|
|
21794
21972
|
shouldShowPrevious = _ref$showPrevious === void 0 ? true : _ref$showPrevious,
|
|
@@ -21798,7 +21976,7 @@
|
|
|
21798
21976
|
transformItems = _ref.transformItems,
|
|
21799
21977
|
translations = _ref.translations,
|
|
21800
21978
|
BannerComponent = _ref.bannerComponent,
|
|
21801
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21979
|
+
props = _objectWithoutProperties$c(_ref, _excluded$z);
|
|
21802
21980
|
var _useInfiniteHits = useInfiniteHits({
|
|
21803
21981
|
cache: cache,
|
|
21804
21982
|
escapeHTML: escapeHTML,
|
|
@@ -21834,7 +22012,7 @@
|
|
|
21834
22012
|
return /*#__PURE__*/React__default.createElement(InfiniteHits, _extends$1({}, props, uiProps));
|
|
21835
22013
|
}
|
|
21836
22014
|
|
|
21837
|
-
var _excluded$
|
|
22015
|
+
var _excluded$A = ["items", "classNames", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "createURL", "onRefine", "translations"];
|
|
21838
22016
|
function Menu(_ref) {
|
|
21839
22017
|
var items = _ref.items,
|
|
21840
22018
|
_ref$classNames = _ref.classNames,
|
|
@@ -21846,7 +22024,7 @@
|
|
|
21846
22024
|
createURL = _ref.createURL,
|
|
21847
22025
|
onRefine = _ref.onRefine,
|
|
21848
22026
|
translations = _ref.translations,
|
|
21849
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22027
|
+
props = _objectWithoutProperties$c(_ref, _excluded$A);
|
|
21850
22028
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21851
22029
|
className: cx('ais-Menu', classNames.root, items.length === 0 && cx('ais-Menu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
21852
22030
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -21876,7 +22054,7 @@
|
|
|
21876
22054
|
}));
|
|
21877
22055
|
}
|
|
21878
22056
|
|
|
21879
|
-
var _excluded$
|
|
22057
|
+
var _excluded$B = ["attribute", "limit", "showMore", "showMoreLimit", "sortBy", "transformItems", "translations"];
|
|
21880
22058
|
function Menu$1(_ref) {
|
|
21881
22059
|
var attribute = _ref.attribute,
|
|
21882
22060
|
limit = _ref.limit,
|
|
@@ -21885,7 +22063,7 @@
|
|
|
21885
22063
|
sortBy = _ref.sortBy,
|
|
21886
22064
|
transformItems = _ref.transformItems,
|
|
21887
22065
|
translations = _ref.translations,
|
|
21888
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22066
|
+
props = _objectWithoutProperties$c(_ref, _excluded$B);
|
|
21889
22067
|
var _useMenu = useMenu({
|
|
21890
22068
|
attribute: attribute,
|
|
21891
22069
|
limit: limit,
|
|
@@ -21922,7 +22100,7 @@
|
|
|
21922
22100
|
}));
|
|
21923
22101
|
}
|
|
21924
22102
|
|
|
21925
|
-
var _excluded$
|
|
22103
|
+
var _excluded$C = ["pages", "currentPage", "nbPages", "isFirstPage", "isLastPage", "showFirst", "showPrevious", "showNext", "showLast", "createURL", "onNavigate", "translations", "classNames"],
|
|
21926
22104
|
_excluded2$5 = ["isDisabled", "className", "classNames", "href", "onClick"];
|
|
21927
22105
|
function Pagination(_ref) {
|
|
21928
22106
|
var pages = _ref.pages,
|
|
@@ -21943,7 +22121,7 @@
|
|
|
21943
22121
|
translations = _ref.translations,
|
|
21944
22122
|
_ref$classNames = _ref.classNames,
|
|
21945
22123
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
21946
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22124
|
+
props = _objectWithoutProperties$c(_ref, _excluded$C);
|
|
21947
22125
|
var firstPageIndex = 0;
|
|
21948
22126
|
var previousPageIndex = currentPage - 1;
|
|
21949
22127
|
var nextPageIndex = currentPage + 1;
|
|
@@ -22037,7 +22215,7 @@
|
|
|
22037
22215
|
}, props)));
|
|
22038
22216
|
}
|
|
22039
22217
|
|
|
22040
|
-
var _excluded$
|
|
22218
|
+
var _excluded$D = ["showFirst", "showPrevious", "showNext", "showLast", "padding", "totalPages", "translations"];
|
|
22041
22219
|
function Pagination$1(_ref) {
|
|
22042
22220
|
var showFirst = _ref.showFirst,
|
|
22043
22221
|
showPrevious = _ref.showPrevious,
|
|
@@ -22046,7 +22224,7 @@
|
|
|
22046
22224
|
padding = _ref.padding,
|
|
22047
22225
|
totalPages = _ref.totalPages,
|
|
22048
22226
|
translations = _ref.translations,
|
|
22049
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22227
|
+
props = _objectWithoutProperties$c(_ref, _excluded$D);
|
|
22050
22228
|
var _usePagination = usePagination({
|
|
22051
22229
|
padding: padding,
|
|
22052
22230
|
totalPages: totalPages
|
|
@@ -22095,14 +22273,14 @@
|
|
|
22095
22273
|
}));
|
|
22096
22274
|
}
|
|
22097
22275
|
|
|
22098
|
-
var _excluded$
|
|
22276
|
+
var _excluded$E = ["classNames", "url", "theme"];
|
|
22099
22277
|
function PoweredBy(_ref) {
|
|
22100
22278
|
var _ref$classNames = _ref.classNames,
|
|
22101
22279
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22102
22280
|
url = _ref.url,
|
|
22103
22281
|
_ref$theme = _ref.theme,
|
|
22104
22282
|
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
|
|
22105
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22283
|
+
props = _objectWithoutProperties$c(_ref, _excluded$E);
|
|
22106
22284
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22107
22285
|
className: cx('ais-PoweredBy', theme === 'dark' ? cx('ais-PoweredBy--dark', classNames.dark) : cx('ais-PoweredBy--light', classNames.light), classNames.root, props.className)
|
|
22108
22286
|
}), /*#__PURE__*/React__default.createElement("a", {
|
|
@@ -22132,7 +22310,7 @@
|
|
|
22132
22310
|
return /*#__PURE__*/React__default.createElement(PoweredBy, _extends$1({}, props, uiProps));
|
|
22133
22311
|
}
|
|
22134
22312
|
|
|
22135
|
-
var _excluded$
|
|
22313
|
+
var _excluded$F = ["classNames", "range", "start", "step", "disabled", "onSubmit", "translations"];
|
|
22136
22314
|
// if the default value is undefined, React considers the component uncontrolled initially, which we don't want 0 or NaN as the default value
|
|
22137
22315
|
var unsetNumberInputValue = '';
|
|
22138
22316
|
|
|
@@ -22157,7 +22335,7 @@
|
|
|
22157
22335
|
disabled = _ref.disabled,
|
|
22158
22336
|
_onSubmit = _ref.onSubmit,
|
|
22159
22337
|
translations = _ref.translations,
|
|
22160
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22338
|
+
props = _objectWithoutProperties$c(_ref, _excluded$F);
|
|
22161
22339
|
var values = {
|
|
22162
22340
|
min: minValue !== -Infinity && minValue !== min ? minValue : unsetNumberInputValue,
|
|
22163
22341
|
max: maxValue !== Infinity && maxValue !== max ? maxValue : unsetNumberInputValue
|
|
@@ -22237,14 +22415,14 @@
|
|
|
22237
22415
|
}, translations.submitButtonText)));
|
|
22238
22416
|
}
|
|
22239
22417
|
|
|
22240
|
-
var _excluded$
|
|
22418
|
+
var _excluded$G = ["attribute", "min", "max", "precision", "translations"];
|
|
22241
22419
|
function RangeInput$1(_ref) {
|
|
22242
22420
|
var attribute = _ref.attribute,
|
|
22243
22421
|
min = _ref.min,
|
|
22244
22422
|
max = _ref.max,
|
|
22245
22423
|
precision = _ref.precision,
|
|
22246
22424
|
translations = _ref.translations,
|
|
22247
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22425
|
+
props = _objectWithoutProperties$c(_ref, _excluded$G);
|
|
22248
22426
|
var _useRange = useRange({
|
|
22249
22427
|
attribute: attribute,
|
|
22250
22428
|
min: min,
|
|
@@ -22272,7 +22450,7 @@
|
|
|
22272
22450
|
return /*#__PURE__*/React__default.createElement(RangeInput, _extends$1({}, props, uiProps));
|
|
22273
22451
|
}
|
|
22274
22452
|
|
|
22275
|
-
var _excluded$
|
|
22453
|
+
var _excluded$H = ["canRefine", "items", "onRefine", "query", "searchBox", "noResults", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "className", "classNames", "translations"];
|
|
22276
22454
|
function RefinementList$1(_ref) {
|
|
22277
22455
|
var canRefine = _ref.canRefine,
|
|
22278
22456
|
items = _ref.items,
|
|
@@ -22288,7 +22466,7 @@
|
|
|
22288
22466
|
_ref$classNames = _ref.classNames,
|
|
22289
22467
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22290
22468
|
translations = _ref.translations,
|
|
22291
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22469
|
+
props = _objectWithoutProperties$c(_ref, _excluded$H);
|
|
22292
22470
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22293
22471
|
className: cx('ais-RefinementList', classNames.root, items.length === 0 && cx('ais-RefinementList--noRefinement', classNames.noRefinementRoot), className)
|
|
22294
22472
|
}), searchBox && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -22327,7 +22505,7 @@
|
|
|
22327
22505
|
}));
|
|
22328
22506
|
}
|
|
22329
22507
|
|
|
22330
|
-
var _excluded$
|
|
22508
|
+
var _excluded$I = ["formRef", "inputRef", "isSearchStalled", "onChange", "onReset", "onSubmit", "placeholder", "value", "autoFocus", "resetIconComponent", "submitIconComponent", "loadingIconComponent", "classNames", "translations"];
|
|
22331
22509
|
var _ref2 = /*#__PURE__*/React__default.createElement("path", {
|
|
22332
22510
|
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"
|
|
22333
22511
|
});
|
|
@@ -22407,7 +22585,7 @@
|
|
|
22407
22585
|
_ref7$classNames = _ref7.classNames,
|
|
22408
22586
|
classNames = _ref7$classNames === void 0 ? {} : _ref7$classNames,
|
|
22409
22587
|
translations = _ref7.translations,
|
|
22410
|
-
props = _objectWithoutProperties$c(_ref7, _excluded$
|
|
22588
|
+
props = _objectWithoutProperties$c(_ref7, _excluded$I);
|
|
22411
22589
|
function handleSubmit(event) {
|
|
22412
22590
|
event.preventDefault();
|
|
22413
22591
|
event.stopPropagation();
|
|
@@ -22472,7 +22650,7 @@
|
|
|
22472
22650
|
}))));
|
|
22473
22651
|
}
|
|
22474
22652
|
|
|
22475
|
-
var _excluded$
|
|
22653
|
+
var _excluded$J = ["searchable", "searchablePlaceholder", "attribute", "operator", "limit", "showMore", "showMoreLimit", "sortBy", "escapeFacetValues", "transformItems", "translations"];
|
|
22476
22654
|
function RefinementList$2(_ref) {
|
|
22477
22655
|
var searchable = _ref.searchable,
|
|
22478
22656
|
searchablePlaceholder = _ref.searchablePlaceholder,
|
|
@@ -22485,7 +22663,7 @@
|
|
|
22485
22663
|
escapeFacetValues = _ref.escapeFacetValues,
|
|
22486
22664
|
transformItems = _ref.transformItems,
|
|
22487
22665
|
translations = _ref.translations,
|
|
22488
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22666
|
+
props = _objectWithoutProperties$c(_ref, _excluded$J);
|
|
22489
22667
|
var _useRefinementList = useRefinementList({
|
|
22490
22668
|
attribute: attribute,
|
|
22491
22669
|
operator: operator,
|
|
@@ -22574,7 +22752,7 @@
|
|
|
22574
22752
|
}));
|
|
22575
22753
|
}
|
|
22576
22754
|
|
|
22577
|
-
var _excluded$
|
|
22755
|
+
var _excluded$K = ["objectIDs", "limit", "threshold", "fallbackParameters", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
22578
22756
|
var RelatedProductsUiComponent = createRelatedProductsComponent({
|
|
22579
22757
|
createElement: React.createElement,
|
|
22580
22758
|
Fragment: React.Fragment
|
|
@@ -22590,7 +22768,8 @@
|
|
|
22590
22768
|
itemComponent = _ref.itemComponent,
|
|
22591
22769
|
headerComponent = _ref.headerComponent,
|
|
22592
22770
|
emptyComponent = _ref.emptyComponent,
|
|
22593
|
-
|
|
22771
|
+
layoutComponent = _ref.layoutComponent,
|
|
22772
|
+
props = _objectWithoutProperties$c(_ref, _excluded$K);
|
|
22594
22773
|
var _useInstantSearch = useInstantSearch(),
|
|
22595
22774
|
status = _useInstantSearch.status;
|
|
22596
22775
|
var _useRelatedProducts = useRelatedProducts({
|
|
@@ -22605,18 +22784,27 @@
|
|
|
22605
22784
|
$$widgetType: 'ais.relatedProducts'
|
|
22606
22785
|
}),
|
|
22607
22786
|
items = _useRelatedProducts.items;
|
|
22787
|
+
var layout = layoutComponent ? function (layoutProps) {
|
|
22788
|
+
return layoutComponent(_objectSpread2(_objectSpread2({}, layoutProps), {}, {
|
|
22789
|
+
classNames: {
|
|
22790
|
+
list: layoutProps.classNames.list,
|
|
22791
|
+
item: layoutProps.classNames.item
|
|
22792
|
+
}
|
|
22793
|
+
}));
|
|
22794
|
+
} : undefined;
|
|
22608
22795
|
var uiProps = {
|
|
22609
22796
|
items: items,
|
|
22610
22797
|
itemComponent: itemComponent,
|
|
22611
22798
|
headerComponent: headerComponent,
|
|
22612
22799
|
emptyComponent: emptyComponent,
|
|
22800
|
+
layout: layout,
|
|
22613
22801
|
status: status,
|
|
22614
22802
|
sendEvent: function sendEvent() {}
|
|
22615
22803
|
};
|
|
22616
22804
|
return /*#__PURE__*/React__default.createElement(RelatedProductsUiComponent, _extends$1({}, props, uiProps));
|
|
22617
22805
|
}
|
|
22618
22806
|
|
|
22619
|
-
var _excluded$
|
|
22807
|
+
var _excluded$L = ["queryHook", "searchAsYouType", "ignoreCompositionEvents", "translations"];
|
|
22620
22808
|
function SearchBox$1(_ref) {
|
|
22621
22809
|
var queryHook = _ref.queryHook,
|
|
22622
22810
|
_ref$searchAsYouType = _ref.searchAsYouType,
|
|
@@ -22624,7 +22812,7 @@
|
|
|
22624
22812
|
_ref$ignoreCompositio = _ref.ignoreCompositionEvents,
|
|
22625
22813
|
ignoreCompositionEvents = _ref$ignoreCompositio === void 0 ? false : _ref$ignoreCompositio,
|
|
22626
22814
|
translations = _ref.translations,
|
|
22627
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22815
|
+
props = _objectWithoutProperties$c(_ref, _excluded$L);
|
|
22628
22816
|
var _useSearchBox = useSearchBox({
|
|
22629
22817
|
queryHook: queryHook
|
|
22630
22818
|
}, {
|
|
@@ -22685,11 +22873,11 @@
|
|
|
22685
22873
|
return /*#__PURE__*/React__default.createElement(SearchBox, _extends$1({}, props, uiProps));
|
|
22686
22874
|
}
|
|
22687
22875
|
|
|
22688
|
-
var _excluded$
|
|
22876
|
+
var _excluded$M = ["classNames"];
|
|
22689
22877
|
function Snippet(_ref) {
|
|
22690
22878
|
var _ref$classNames = _ref.classNames,
|
|
22691
22879
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22692
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22880
|
+
props = _objectWithoutProperties$c(_ref, _excluded$M);
|
|
22693
22881
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
22694
22882
|
classNames: {
|
|
22695
22883
|
root: cx('ais-Snippet', classNames.root),
|
|
@@ -22700,14 +22888,14 @@
|
|
|
22700
22888
|
}, props));
|
|
22701
22889
|
}
|
|
22702
22890
|
|
|
22703
|
-
var _excluded$
|
|
22891
|
+
var _excluded$N = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
22704
22892
|
function Snippet$1(_ref) {
|
|
22705
22893
|
var hit = _ref.hit,
|
|
22706
22894
|
attribute = _ref.attribute,
|
|
22707
22895
|
highlightedTagName = _ref.highlightedTagName,
|
|
22708
22896
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
22709
22897
|
separator = _ref.separator,
|
|
22710
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22898
|
+
props = _objectWithoutProperties$c(_ref, _excluded$N);
|
|
22711
22899
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
22712
22900
|
var properties = Array.isArray(property) ? property : [property];
|
|
22713
22901
|
var parts = properties.map(function (singleValue) {
|
|
@@ -22721,7 +22909,7 @@
|
|
|
22721
22909
|
}));
|
|
22722
22910
|
}
|
|
22723
22911
|
|
|
22724
|
-
var _excluded$
|
|
22912
|
+
var _excluded$O = ["items", "value", "onChange", "classNames"];
|
|
22725
22913
|
function SortBy(_ref) {
|
|
22726
22914
|
var items = _ref.items,
|
|
22727
22915
|
value = _ref.value,
|
|
@@ -22729,7 +22917,7 @@
|
|
|
22729
22917
|
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
22730
22918
|
_ref$classNames = _ref.classNames,
|
|
22731
22919
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22732
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22920
|
+
props = _objectWithoutProperties$c(_ref, _excluded$O);
|
|
22733
22921
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22734
22922
|
className: cx('ais-SortBy', classNames.root, props.className)
|
|
22735
22923
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -22748,11 +22936,11 @@
|
|
|
22748
22936
|
})));
|
|
22749
22937
|
}
|
|
22750
22938
|
|
|
22751
|
-
var _excluded$
|
|
22939
|
+
var _excluded$P = ["items", "transformItems"];
|
|
22752
22940
|
function SortBy$1(_ref) {
|
|
22753
22941
|
var items = _ref.items,
|
|
22754
22942
|
transformItems = _ref.transformItems,
|
|
22755
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22943
|
+
props = _objectWithoutProperties$c(_ref, _excluded$P);
|
|
22756
22944
|
var _useSortBy = useSortBy({
|
|
22757
22945
|
items: items,
|
|
22758
22946
|
transformItems: transformItems
|
|
@@ -22770,7 +22958,7 @@
|
|
|
22770
22958
|
return /*#__PURE__*/React__default.createElement(SortBy, _extends$1({}, props, uiProps));
|
|
22771
22959
|
}
|
|
22772
22960
|
|
|
22773
|
-
var _excluded$
|
|
22961
|
+
var _excluded$Q = ["classNames", "nbHits", "processingTimeMS", "nbSortedHits", "areHitsSorted", "translations"];
|
|
22774
22962
|
function Stats(_ref) {
|
|
22775
22963
|
var _ref$classNames = _ref.classNames,
|
|
22776
22964
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -22779,7 +22967,7 @@
|
|
|
22779
22967
|
nbSortedHits = _ref.nbSortedHits,
|
|
22780
22968
|
areHitsSorted = _ref.areHitsSorted,
|
|
22781
22969
|
translations = _ref.translations,
|
|
22782
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22970
|
+
props = _objectWithoutProperties$c(_ref, _excluded$Q);
|
|
22783
22971
|
var translationOptions = {
|
|
22784
22972
|
nbHits: nbHits,
|
|
22785
22973
|
processingTimeMS: processingTimeMS,
|
|
@@ -22793,10 +22981,10 @@
|
|
|
22793
22981
|
}, translations.rootElementText(translationOptions)));
|
|
22794
22982
|
}
|
|
22795
22983
|
|
|
22796
|
-
var _excluded$
|
|
22984
|
+
var _excluded$R = ["translations"];
|
|
22797
22985
|
function Stats$1(_ref) {
|
|
22798
22986
|
var translations = _ref.translations,
|
|
22799
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22987
|
+
props = _objectWithoutProperties$c(_ref, _excluded$R);
|
|
22800
22988
|
var _useStats = useStats(undefined, {
|
|
22801
22989
|
$$widgetType: 'ais.stats'
|
|
22802
22990
|
}),
|
|
@@ -22846,14 +23034,14 @@
|
|
|
22846
23034
|
return '';
|
|
22847
23035
|
}
|
|
22848
23036
|
|
|
22849
|
-
var _excluded$
|
|
23037
|
+
var _excluded$S = ["classNames", "checked", "onChange", "label"];
|
|
22850
23038
|
function ToggleRefinement(_ref) {
|
|
22851
23039
|
var _ref$classNames = _ref.classNames,
|
|
22852
23040
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22853
23041
|
checked = _ref.checked,
|
|
22854
23042
|
_onChange = _ref.onChange,
|
|
22855
23043
|
label = _ref.label,
|
|
22856
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23044
|
+
props = _objectWithoutProperties$c(_ref, _excluded$S);
|
|
22857
23045
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22858
23046
|
className: cx('ais-ToggleRefinement', classNames.root, props.className)
|
|
22859
23047
|
}), /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -22870,12 +23058,12 @@
|
|
|
22870
23058
|
}, label)));
|
|
22871
23059
|
}
|
|
22872
23060
|
|
|
22873
|
-
var _excluded$
|
|
23061
|
+
var _excluded$T = ["attribute", "on", "off"];
|
|
22874
23062
|
function ToggleRefinement$1(_ref) {
|
|
22875
23063
|
var attribute = _ref.attribute,
|
|
22876
23064
|
on = _ref.on,
|
|
22877
23065
|
off = _ref.off,
|
|
22878
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23066
|
+
props = _objectWithoutProperties$c(_ref, _excluded$T);
|
|
22879
23067
|
var _useToggleRefinement = useToggleRefinement({
|
|
22880
23068
|
attribute: attribute,
|
|
22881
23069
|
on: on,
|
|
@@ -22898,7 +23086,7 @@
|
|
|
22898
23086
|
}, props, uiProps));
|
|
22899
23087
|
}
|
|
22900
23088
|
|
|
22901
|
-
var _excluded$
|
|
23089
|
+
var _excluded$U = ["facetName", "facetValue", "limit", "threshold", "fallbackParameters", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
22902
23090
|
var TrendingItemsUiComponent = createTrendingItemsComponent({
|
|
22903
23091
|
createElement: React.createElement,
|
|
22904
23092
|
Fragment: React.Fragment
|
|
@@ -22915,7 +23103,8 @@
|
|
|
22915
23103
|
itemComponent = _ref.itemComponent,
|
|
22916
23104
|
headerComponent = _ref.headerComponent,
|
|
22917
23105
|
emptyComponent = _ref.emptyComponent,
|
|
22918
|
-
|
|
23106
|
+
layoutComponent = _ref.layoutComponent,
|
|
23107
|
+
props = _objectWithoutProperties$c(_ref, _excluded$U);
|
|
22919
23108
|
var facetParameters = facetName && facetValue ? {
|
|
22920
23109
|
facetName: facetName,
|
|
22921
23110
|
facetValue: facetValue
|
|
@@ -22933,18 +23122,27 @@
|
|
|
22933
23122
|
$$widgetType: 'ais.trendingItems'
|
|
22934
23123
|
}),
|
|
22935
23124
|
items = _useTrendingItems.items;
|
|
23125
|
+
var layout = layoutComponent ? function (layoutProps) {
|
|
23126
|
+
return layoutComponent(_objectSpread2(_objectSpread2({}, layoutProps), {}, {
|
|
23127
|
+
classNames: {
|
|
23128
|
+
list: layoutProps.classNames.list,
|
|
23129
|
+
item: layoutProps.classNames.item
|
|
23130
|
+
}
|
|
23131
|
+
}));
|
|
23132
|
+
} : undefined;
|
|
22936
23133
|
var uiProps = {
|
|
22937
23134
|
items: items,
|
|
22938
23135
|
itemComponent: itemComponent,
|
|
22939
23136
|
headerComponent: headerComponent,
|
|
22940
23137
|
emptyComponent: emptyComponent,
|
|
23138
|
+
layout: layout,
|
|
22941
23139
|
status: status,
|
|
22942
23140
|
sendEvent: function sendEvent() {}
|
|
22943
23141
|
};
|
|
22944
23142
|
return /*#__PURE__*/React__default.createElement(TrendingItemsUiComponent, _extends$1({}, props, uiProps));
|
|
22945
23143
|
}
|
|
22946
23144
|
|
|
22947
|
-
var _excluded$
|
|
23145
|
+
var _excluded$V = ["objectIDs", "limit", "threshold", "queryParameters", "fallbackParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
22948
23146
|
var LookingSimilarUiComponent = createLookingSimilarComponent({
|
|
22949
23147
|
createElement: React.createElement,
|
|
22950
23148
|
Fragment: React.Fragment
|
|
@@ -22960,7 +23158,8 @@
|
|
|
22960
23158
|
itemComponent = _ref.itemComponent,
|
|
22961
23159
|
headerComponent = _ref.headerComponent,
|
|
22962
23160
|
emptyComponent = _ref.emptyComponent,
|
|
22963
|
-
|
|
23161
|
+
layoutComponent = _ref.layoutComponent,
|
|
23162
|
+
props = _objectWithoutProperties$c(_ref, _excluded$V);
|
|
22964
23163
|
var _useInstantSearch = useInstantSearch(),
|
|
22965
23164
|
status = _useInstantSearch.status;
|
|
22966
23165
|
var _useLookingSimilar = useLookingSimilar({
|
|
@@ -22975,18 +23174,42 @@
|
|
|
22975
23174
|
$$widgetType: 'ais.lookingSimilar'
|
|
22976
23175
|
}),
|
|
22977
23176
|
items = _useLookingSimilar.items;
|
|
23177
|
+
var layout = layoutComponent ? function (layoutProps) {
|
|
23178
|
+
return layoutComponent(_objectSpread2(_objectSpread2({}, layoutProps), {}, {
|
|
23179
|
+
classNames: {
|
|
23180
|
+
list: layoutProps.classNames.list,
|
|
23181
|
+
item: layoutProps.classNames.item
|
|
23182
|
+
}
|
|
23183
|
+
}));
|
|
23184
|
+
} : undefined;
|
|
22978
23185
|
var uiProps = {
|
|
22979
23186
|
items: items,
|
|
22980
23187
|
itemComponent: itemComponent,
|
|
22981
23188
|
headerComponent: headerComponent,
|
|
22982
23189
|
emptyComponent: emptyComponent,
|
|
23190
|
+
layout: layout,
|
|
22983
23191
|
status: status,
|
|
22984
23192
|
sendEvent: function sendEvent() {}
|
|
22985
23193
|
};
|
|
22986
23194
|
return /*#__PURE__*/React__default.createElement(LookingSimilarUiComponent, _extends$1({}, props, uiProps));
|
|
22987
23195
|
}
|
|
22988
23196
|
|
|
23197
|
+
var CarouselUiComponent = createCarouselComponent({
|
|
23198
|
+
createElement: React.createElement,
|
|
23199
|
+
Fragment: React.Fragment
|
|
23200
|
+
});
|
|
23201
|
+
function Carousel(props) {
|
|
23202
|
+
var carouselRefs = {
|
|
23203
|
+
listRef: React.useRef(null),
|
|
23204
|
+
nextButtonRef: React.useRef(null),
|
|
23205
|
+
previousButtonRef: React.useRef(null),
|
|
23206
|
+
carouselIdRef: React.useRef(generateCarouselId())
|
|
23207
|
+
};
|
|
23208
|
+
return /*#__PURE__*/React__default.createElement(CarouselUiComponent, _extends$1({}, carouselRefs, props));
|
|
23209
|
+
}
|
|
23210
|
+
|
|
22989
23211
|
exports.Breadcrumb = Breadcrumb$1;
|
|
23212
|
+
exports.Carousel = Carousel;
|
|
22990
23213
|
exports.ClearRefinements = ClearRefinements$1;
|
|
22991
23214
|
exports.Configure = Configure;
|
|
22992
23215
|
exports.CurrentRefinements = CurrentRefinements$1;
|