react-instantsearch 7.12.4 → 7.13.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/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 +351 -131
- 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.0';
|
|
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.4';
|
|
4535
4535
|
|
|
4536
4536
|
var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
|
|
4537
4537
|
|
|
@@ -13089,7 +13089,7 @@
|
|
|
13089
13089
|
};
|
|
13090
13090
|
}
|
|
13091
13091
|
|
|
13092
|
-
var version$3 = '4.
|
|
13092
|
+
var version$3 = '4.74.0';
|
|
13093
13093
|
|
|
13094
13094
|
function _typeof$q(obj) {
|
|
13095
13095
|
"@babel/helpers - typeof";
|
|
@@ -20693,9 +20693,9 @@
|
|
|
20693
20693
|
};
|
|
20694
20694
|
}
|
|
20695
20695
|
|
|
20696
|
-
function
|
|
20696
|
+
function createListComponent(_ref) {
|
|
20697
20697
|
var createElement = _ref.createElement;
|
|
20698
|
-
return function
|
|
20698
|
+
return function List(userProps) {
|
|
20699
20699
|
var _userProps$classNames = userProps.classNames,
|
|
20700
20700
|
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
20701
20701
|
ItemComponent = userProps.itemComponent,
|
|
@@ -20718,7 +20718,7 @@
|
|
|
20718
20718
|
};
|
|
20719
20719
|
}
|
|
20720
20720
|
|
|
20721
|
-
var _excluded$c = ["
|
|
20721
|
+
var _excluded$c = ["listRef", "nextButtonRef", "previousButtonRef", "carouselIdRef", "classNames", "itemComponent", "previousIconComponent", "nextIconComponent", "items", "translations"];
|
|
20722
20722
|
function ownKeys$L(object, enumerableOnly) {
|
|
20723
20723
|
var keys = Object.keys(object);
|
|
20724
20724
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -20740,6 +20740,175 @@
|
|
|
20740
20740
|
}
|
|
20741
20741
|
return target;
|
|
20742
20742
|
}
|
|
20743
|
+
var lastCarouselId = 0;
|
|
20744
|
+
function generateCarouselId() {
|
|
20745
|
+
return "ais-Carousel-".concat(lastCarouselId++);
|
|
20746
|
+
}
|
|
20747
|
+
function PreviousIconDefaultComponent(_ref) {
|
|
20748
|
+
var createElement = _ref.createElement;
|
|
20749
|
+
return createElement("svg", {
|
|
20750
|
+
width: "8",
|
|
20751
|
+
height: "16",
|
|
20752
|
+
viewBox: "0 0 8 16",
|
|
20753
|
+
fill: "none"
|
|
20754
|
+
}, createElement("path", {
|
|
20755
|
+
fillRule: "evenodd",
|
|
20756
|
+
clipRule: "evenodd",
|
|
20757
|
+
fill: "currentColor",
|
|
20758
|
+
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"
|
|
20759
|
+
}));
|
|
20760
|
+
}
|
|
20761
|
+
function NextIconDefaultComponent(_ref2) {
|
|
20762
|
+
var createElement = _ref2.createElement;
|
|
20763
|
+
return createElement("svg", {
|
|
20764
|
+
width: "8",
|
|
20765
|
+
height: "16",
|
|
20766
|
+
viewBox: "0 0 8 16",
|
|
20767
|
+
fill: "none"
|
|
20768
|
+
}, createElement("path", {
|
|
20769
|
+
fillRule: "evenodd",
|
|
20770
|
+
clipRule: "evenodd",
|
|
20771
|
+
fill: "currentColor",
|
|
20772
|
+
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"
|
|
20773
|
+
}));
|
|
20774
|
+
}
|
|
20775
|
+
function createCarouselComponent(_ref3) {
|
|
20776
|
+
var createElement = _ref3.createElement,
|
|
20777
|
+
Fragment = _ref3.Fragment;
|
|
20778
|
+
return function Carousel(userProps) {
|
|
20779
|
+
var listRef = userProps.listRef,
|
|
20780
|
+
nextButtonRef = userProps.nextButtonRef,
|
|
20781
|
+
previousButtonRef = userProps.previousButtonRef,
|
|
20782
|
+
carouselIdRef = userProps.carouselIdRef,
|
|
20783
|
+
_userProps$classNames = userProps.classNames,
|
|
20784
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
20785
|
+
_userProps$itemCompon = userProps.itemComponent,
|
|
20786
|
+
ItemComponent = _userProps$itemCompon === void 0 ? createDefaultItemComponent({
|
|
20787
|
+
createElement: createElement,
|
|
20788
|
+
Fragment: Fragment
|
|
20789
|
+
}) : _userProps$itemCompon,
|
|
20790
|
+
_userProps$previousIc = userProps.previousIconComponent,
|
|
20791
|
+
PreviousIconComponent = _userProps$previousIc === void 0 ? PreviousIconDefaultComponent : _userProps$previousIc,
|
|
20792
|
+
_userProps$nextIconCo = userProps.nextIconComponent,
|
|
20793
|
+
NextIconComponent = _userProps$nextIconCo === void 0 ? NextIconDefaultComponent : _userProps$nextIconCo,
|
|
20794
|
+
items = userProps.items,
|
|
20795
|
+
userTranslations = userProps.translations,
|
|
20796
|
+
props = _objectWithoutProperties$d(userProps, _excluded$c);
|
|
20797
|
+
var translations = _objectSpread$K({
|
|
20798
|
+
listLabel: 'Items',
|
|
20799
|
+
nextButtonLabel: 'Next',
|
|
20800
|
+
nextButtonTitle: 'Next',
|
|
20801
|
+
previousButtonLabel: 'Previous',
|
|
20802
|
+
previousButtonTitle: 'Previous'
|
|
20803
|
+
}, userTranslations);
|
|
20804
|
+
var cssClasses = {
|
|
20805
|
+
root: cx('ais-Carousel', classNames.root),
|
|
20806
|
+
list: cx('ais-Carousel-list', classNames.list),
|
|
20807
|
+
item: cx('ais-Carousel-item', classNames.item),
|
|
20808
|
+
navigation: cx('ais-Carousel-navigation', classNames.navigation),
|
|
20809
|
+
navigationNext: cx('ais-Carousel-navigation--next', classNames.navigationNext),
|
|
20810
|
+
navigationPrevious: cx('ais-Carousel-navigation--previous', classNames.navigationPrevious)
|
|
20811
|
+
};
|
|
20812
|
+
function scrollLeft() {
|
|
20813
|
+
if (listRef.current) {
|
|
20814
|
+
listRef.current.scrollLeft -= listRef.current.offsetWidth * 0.75;
|
|
20815
|
+
}
|
|
20816
|
+
}
|
|
20817
|
+
function scrollRight() {
|
|
20818
|
+
if (listRef.current) {
|
|
20819
|
+
listRef.current.scrollLeft += listRef.current.offsetWidth * 0.75;
|
|
20820
|
+
}
|
|
20821
|
+
}
|
|
20822
|
+
function updateNavigationButtonsProps() {
|
|
20823
|
+
if (!listRef.current || !previousButtonRef.current || !nextButtonRef.current) {
|
|
20824
|
+
return;
|
|
20825
|
+
}
|
|
20826
|
+
previousButtonRef.current.hidden = listRef.current.scrollLeft <= 0;
|
|
20827
|
+
nextButtonRef.current.hidden = listRef.current.scrollLeft + listRef.current.clientWidth >= listRef.current.scrollWidth;
|
|
20828
|
+
}
|
|
20829
|
+
if (items.length === 0) {
|
|
20830
|
+
return null;
|
|
20831
|
+
}
|
|
20832
|
+
return createElement("div", _extends$2({}, props, {
|
|
20833
|
+
className: cx(cssClasses.root)
|
|
20834
|
+
}), createElement("button", {
|
|
20835
|
+
ref: previousButtonRef,
|
|
20836
|
+
title: translations.previousButtonTitle,
|
|
20837
|
+
"aria-label": translations.previousButtonLabel,
|
|
20838
|
+
hidden: true,
|
|
20839
|
+
"aria-controls": carouselIdRef.current,
|
|
20840
|
+
className: cx(cssClasses.navigation, cssClasses.navigationPrevious),
|
|
20841
|
+
onClick: function onClick(event) {
|
|
20842
|
+
event.preventDefault();
|
|
20843
|
+
scrollLeft();
|
|
20844
|
+
}
|
|
20845
|
+
}, createElement(PreviousIconComponent, {
|
|
20846
|
+
createElement: createElement
|
|
20847
|
+
})), createElement("ol", {
|
|
20848
|
+
className: cx(cssClasses.list),
|
|
20849
|
+
ref: listRef,
|
|
20850
|
+
tabIndex: 0,
|
|
20851
|
+
id: carouselIdRef.current,
|
|
20852
|
+
"aria-roledescription": "carousel",
|
|
20853
|
+
"aria-label": translations.listLabel,
|
|
20854
|
+
"aria-live": "polite",
|
|
20855
|
+
onScroll: updateNavigationButtonsProps,
|
|
20856
|
+
onKeyDown: function onKeyDown(event) {
|
|
20857
|
+
if (event.key === 'ArrowLeft') {
|
|
20858
|
+
event.preventDefault();
|
|
20859
|
+
scrollLeft();
|
|
20860
|
+
} else if (event.key === 'ArrowRight') {
|
|
20861
|
+
event.preventDefault();
|
|
20862
|
+
scrollRight();
|
|
20863
|
+
}
|
|
20864
|
+
}
|
|
20865
|
+
}, items.map(function (item, index) {
|
|
20866
|
+
return createElement("li", {
|
|
20867
|
+
key: item.objectID,
|
|
20868
|
+
className: cx(cssClasses.item),
|
|
20869
|
+
"aria-roledescription": "slide",
|
|
20870
|
+
"aria-label": "".concat(index + 1, " of ").concat(items.length)
|
|
20871
|
+
}, createElement(ItemComponent, {
|
|
20872
|
+
item: item
|
|
20873
|
+
}));
|
|
20874
|
+
})), createElement("button", {
|
|
20875
|
+
ref: nextButtonRef,
|
|
20876
|
+
title: translations.nextButtonTitle,
|
|
20877
|
+
"aria-label": translations.nextButtonLabel,
|
|
20878
|
+
"aria-controls": carouselIdRef.current,
|
|
20879
|
+
className: cx(cssClasses.navigation, cssClasses.navigationNext),
|
|
20880
|
+
onClick: function onClick(event) {
|
|
20881
|
+
event.preventDefault();
|
|
20882
|
+
scrollRight();
|
|
20883
|
+
}
|
|
20884
|
+
}, createElement(NextIconComponent, {
|
|
20885
|
+
createElement: createElement
|
|
20886
|
+
})));
|
|
20887
|
+
};
|
|
20888
|
+
}
|
|
20889
|
+
|
|
20890
|
+
var _excluded$d = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
20891
|
+
function ownKeys$M(object, enumerableOnly) {
|
|
20892
|
+
var keys = Object.keys(object);
|
|
20893
|
+
if (Object.getOwnPropertySymbols) {
|
|
20894
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
20895
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
20896
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
20897
|
+
})), keys.push.apply(keys, symbols);
|
|
20898
|
+
}
|
|
20899
|
+
return keys;
|
|
20900
|
+
}
|
|
20901
|
+
function _objectSpread$L(target) {
|
|
20902
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
20903
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
20904
|
+
i % 2 ? ownKeys$M(Object(source), !0).forEach(function (key) {
|
|
20905
|
+
_defineProperty$N(target, key, source[key]);
|
|
20906
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$M(Object(source)).forEach(function (key) {
|
|
20907
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
20908
|
+
});
|
|
20909
|
+
}
|
|
20910
|
+
return target;
|
|
20911
|
+
}
|
|
20743
20912
|
function createFrequentlyBoughtTogetherComponent(_ref) {
|
|
20744
20913
|
var createElement = _ref.createElement,
|
|
20745
20914
|
Fragment = _ref.Fragment;
|
|
@@ -20761,17 +20930,17 @@
|
|
|
20761
20930
|
createElement: createElement,
|
|
20762
20931
|
Fragment: Fragment
|
|
20763
20932
|
}) : _userProps$itemCompon,
|
|
20764
|
-
_userProps$
|
|
20765
|
-
|
|
20933
|
+
_userProps$layout = userProps.layout,
|
|
20934
|
+
Layout = _userProps$layout === void 0 ? createListComponent({
|
|
20766
20935
|
createElement: createElement,
|
|
20767
20936
|
Fragment: Fragment
|
|
20768
|
-
}) : _userProps$
|
|
20937
|
+
}) : _userProps$layout,
|
|
20769
20938
|
items = userProps.items,
|
|
20770
20939
|
status = userProps.status,
|
|
20771
20940
|
userTranslations = userProps.translations,
|
|
20772
20941
|
sendEvent = userProps.sendEvent,
|
|
20773
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
20774
|
-
var translations = _objectSpread$
|
|
20942
|
+
props = _objectWithoutProperties$d(userProps, _excluded$d);
|
|
20943
|
+
var translations = _objectSpread$L({
|
|
20775
20944
|
title: 'Frequently bought together',
|
|
20776
20945
|
sliderLabel: 'Frequently bought together products'
|
|
20777
20946
|
}, userTranslations);
|
|
@@ -20794,9 +20963,8 @@
|
|
|
20794
20963
|
classNames: cssClasses,
|
|
20795
20964
|
items: items,
|
|
20796
20965
|
translations: translations
|
|
20797
|
-
}), createElement(
|
|
20966
|
+
}), createElement(Layout, {
|
|
20798
20967
|
classNames: cssClasses,
|
|
20799
|
-
translations: translations,
|
|
20800
20968
|
itemComponent: ItemComponent,
|
|
20801
20969
|
items: items,
|
|
20802
20970
|
sendEvent: sendEvent
|
|
@@ -20804,7 +20972,7 @@
|
|
|
20804
20972
|
};
|
|
20805
20973
|
}
|
|
20806
20974
|
|
|
20807
|
-
var _excluded$
|
|
20975
|
+
var _excluded$e = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
|
|
20808
20976
|
function createHighlightPartComponent(_ref) {
|
|
20809
20977
|
var createElement = _ref.createElement;
|
|
20810
20978
|
return function HighlightPart(_ref2) {
|
|
@@ -20837,7 +21005,7 @@
|
|
|
20837
21005
|
className = userProps.className,
|
|
20838
21006
|
_userProps$classNames = userProps.classNames,
|
|
20839
21007
|
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
20840
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
21008
|
+
props = _objectWithoutProperties$d(userProps, _excluded$e);
|
|
20841
21009
|
return createElement("span", _extends$2({}, props, {
|
|
20842
21010
|
className: cx(classNames.root, className)
|
|
20843
21011
|
}), parts.map(function (part, partIndex) {
|
|
@@ -20859,7 +21027,7 @@
|
|
|
20859
21027
|
};
|
|
20860
21028
|
}
|
|
20861
21029
|
|
|
20862
|
-
var _excluded$
|
|
21030
|
+
var _excluded$f = ["classNames", "hits", "itemComponent", "sendEvent", "emptyComponent", "banner", "bannerComponent"];
|
|
20863
21031
|
|
|
20864
21032
|
// Should be imported from a shared package in the future
|
|
20865
21033
|
|
|
@@ -20904,7 +21072,7 @@
|
|
|
20904
21072
|
EmptyComponent = userProps.emptyComponent,
|
|
20905
21073
|
banner = userProps.banner,
|
|
20906
21074
|
BannerComponent = userProps.bannerComponent,
|
|
20907
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
21075
|
+
props = _objectWithoutProperties$d(userProps, _excluded$f);
|
|
20908
21076
|
return createElement("div", _extends$2({}, props, {
|
|
20909
21077
|
className: cx('ais-Hits', classNames.root, hits.length === 0 && cx('ais-Hits--empty', classNames.emptyRoot), props.className)
|
|
20910
21078
|
}), banner && (BannerComponent ? createElement(BannerComponent, {
|
|
@@ -20932,8 +21100,8 @@
|
|
|
20932
21100
|
};
|
|
20933
21101
|
}
|
|
20934
21102
|
|
|
20935
|
-
var _excluded$
|
|
20936
|
-
function ownKeys$
|
|
21103
|
+
var _excluded$g = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
21104
|
+
function ownKeys$N(object, enumerableOnly) {
|
|
20937
21105
|
var keys = Object.keys(object);
|
|
20938
21106
|
if (Object.getOwnPropertySymbols) {
|
|
20939
21107
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -20943,12 +21111,12 @@
|
|
|
20943
21111
|
}
|
|
20944
21112
|
return keys;
|
|
20945
21113
|
}
|
|
20946
|
-
function _objectSpread$
|
|
21114
|
+
function _objectSpread$M(target) {
|
|
20947
21115
|
for (var i = 1; i < arguments.length; i++) {
|
|
20948
21116
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
20949
|
-
i % 2 ? ownKeys$
|
|
21117
|
+
i % 2 ? ownKeys$N(Object(source), !0).forEach(function (key) {
|
|
20950
21118
|
_defineProperty$N(target, key, source[key]);
|
|
20951
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
21119
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$N(Object(source)).forEach(function (key) {
|
|
20952
21120
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
20953
21121
|
});
|
|
20954
21122
|
}
|
|
@@ -20975,17 +21143,17 @@
|
|
|
20975
21143
|
createElement: createElement,
|
|
20976
21144
|
Fragment: Fragment
|
|
20977
21145
|
}) : _userProps$itemCompon,
|
|
20978
|
-
_userProps$
|
|
20979
|
-
|
|
21146
|
+
_userProps$layout = userProps.layout,
|
|
21147
|
+
Layout = _userProps$layout === void 0 ? createListComponent({
|
|
20980
21148
|
createElement: createElement,
|
|
20981
21149
|
Fragment: Fragment
|
|
20982
|
-
}) : _userProps$
|
|
21150
|
+
}) : _userProps$layout,
|
|
20983
21151
|
items = userProps.items,
|
|
20984
21152
|
status = userProps.status,
|
|
20985
21153
|
userTranslations = userProps.translations,
|
|
20986
21154
|
sendEvent = userProps.sendEvent,
|
|
20987
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
20988
|
-
var translations = _objectSpread$
|
|
21155
|
+
props = _objectWithoutProperties$d(userProps, _excluded$g);
|
|
21156
|
+
var translations = _objectSpread$M({
|
|
20989
21157
|
title: 'Looking similar',
|
|
20990
21158
|
sliderLabel: 'Looking similar'
|
|
20991
21159
|
}, userTranslations);
|
|
@@ -21008,9 +21176,8 @@
|
|
|
21008
21176
|
classNames: cssClasses,
|
|
21009
21177
|
items: items,
|
|
21010
21178
|
translations: translations
|
|
21011
|
-
}), createElement(
|
|
21179
|
+
}), createElement(Layout, {
|
|
21012
21180
|
classNames: cssClasses,
|
|
21013
|
-
translations: translations,
|
|
21014
21181
|
itemComponent: ItemComponent,
|
|
21015
21182
|
items: items,
|
|
21016
21183
|
sendEvent: sendEvent
|
|
@@ -21018,8 +21185,8 @@
|
|
|
21018
21185
|
};
|
|
21019
21186
|
}
|
|
21020
21187
|
|
|
21021
|
-
var _excluded$
|
|
21022
|
-
function ownKeys$
|
|
21188
|
+
var _excluded$h = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
21189
|
+
function ownKeys$O(object, enumerableOnly) {
|
|
21023
21190
|
var keys = Object.keys(object);
|
|
21024
21191
|
if (Object.getOwnPropertySymbols) {
|
|
21025
21192
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -21029,12 +21196,12 @@
|
|
|
21029
21196
|
}
|
|
21030
21197
|
return keys;
|
|
21031
21198
|
}
|
|
21032
|
-
function _objectSpread$
|
|
21199
|
+
function _objectSpread$N(target) {
|
|
21033
21200
|
for (var i = 1; i < arguments.length; i++) {
|
|
21034
21201
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
21035
|
-
i % 2 ? ownKeys$
|
|
21202
|
+
i % 2 ? ownKeys$O(Object(source), !0).forEach(function (key) {
|
|
21036
21203
|
_defineProperty$N(target, key, source[key]);
|
|
21037
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
21204
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$O(Object(source)).forEach(function (key) {
|
|
21038
21205
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
21039
21206
|
});
|
|
21040
21207
|
}
|
|
@@ -21061,17 +21228,17 @@
|
|
|
21061
21228
|
createElement: createElement,
|
|
21062
21229
|
Fragment: Fragment
|
|
21063
21230
|
}) : _userProps$itemCompon,
|
|
21064
|
-
_userProps$
|
|
21065
|
-
|
|
21231
|
+
_userProps$layout = userProps.layout,
|
|
21232
|
+
Layout = _userProps$layout === void 0 ? createListComponent({
|
|
21066
21233
|
createElement: createElement,
|
|
21067
21234
|
Fragment: Fragment
|
|
21068
|
-
}) : _userProps$
|
|
21235
|
+
}) : _userProps$layout,
|
|
21069
21236
|
items = userProps.items,
|
|
21070
21237
|
status = userProps.status,
|
|
21071
21238
|
userTranslations = userProps.translations,
|
|
21072
21239
|
sendEvent = userProps.sendEvent,
|
|
21073
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
21074
|
-
var translations = _objectSpread$
|
|
21240
|
+
props = _objectWithoutProperties$d(userProps, _excluded$h);
|
|
21241
|
+
var translations = _objectSpread$N({
|
|
21075
21242
|
title: 'Related products',
|
|
21076
21243
|
sliderLabel: 'Related products'
|
|
21077
21244
|
}, userTranslations);
|
|
@@ -21094,9 +21261,8 @@
|
|
|
21094
21261
|
classNames: cssClasses,
|
|
21095
21262
|
items: items,
|
|
21096
21263
|
translations: translations
|
|
21097
|
-
}), createElement(
|
|
21264
|
+
}), createElement(Layout, {
|
|
21098
21265
|
classNames: cssClasses,
|
|
21099
|
-
translations: translations,
|
|
21100
21266
|
itemComponent: ItemComponent,
|
|
21101
21267
|
items: items,
|
|
21102
21268
|
sendEvent: sendEvent
|
|
@@ -21104,8 +21270,8 @@
|
|
|
21104
21270
|
};
|
|
21105
21271
|
}
|
|
21106
21272
|
|
|
21107
|
-
var _excluded$
|
|
21108
|
-
function ownKeys$
|
|
21273
|
+
var _excluded$i = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
21274
|
+
function ownKeys$P(object, enumerableOnly) {
|
|
21109
21275
|
var keys = Object.keys(object);
|
|
21110
21276
|
if (Object.getOwnPropertySymbols) {
|
|
21111
21277
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -21115,12 +21281,12 @@
|
|
|
21115
21281
|
}
|
|
21116
21282
|
return keys;
|
|
21117
21283
|
}
|
|
21118
|
-
function _objectSpread$
|
|
21284
|
+
function _objectSpread$O(target) {
|
|
21119
21285
|
for (var i = 1; i < arguments.length; i++) {
|
|
21120
21286
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
21121
|
-
i % 2 ? ownKeys$
|
|
21287
|
+
i % 2 ? ownKeys$P(Object(source), !0).forEach(function (key) {
|
|
21122
21288
|
_defineProperty$N(target, key, source[key]);
|
|
21123
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$
|
|
21289
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$P(Object(source)).forEach(function (key) {
|
|
21124
21290
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
21125
21291
|
});
|
|
21126
21292
|
}
|
|
@@ -21147,17 +21313,17 @@
|
|
|
21147
21313
|
createElement: createElement,
|
|
21148
21314
|
Fragment: Fragment
|
|
21149
21315
|
}) : _userProps$itemCompon,
|
|
21150
|
-
_userProps$
|
|
21151
|
-
|
|
21316
|
+
_userProps$layout = userProps.layout,
|
|
21317
|
+
Layout = _userProps$layout === void 0 ? createListComponent({
|
|
21152
21318
|
createElement: createElement,
|
|
21153
21319
|
Fragment: Fragment
|
|
21154
|
-
}) : _userProps$
|
|
21320
|
+
}) : _userProps$layout,
|
|
21155
21321
|
items = userProps.items,
|
|
21156
21322
|
status = userProps.status,
|
|
21157
21323
|
userTranslations = userProps.translations,
|
|
21158
21324
|
sendEvent = userProps.sendEvent,
|
|
21159
|
-
props = _objectWithoutProperties$d(userProps, _excluded$
|
|
21160
|
-
var translations = _objectSpread$
|
|
21325
|
+
props = _objectWithoutProperties$d(userProps, _excluded$i);
|
|
21326
|
+
var translations = _objectSpread$O({
|
|
21161
21327
|
title: 'Trending items',
|
|
21162
21328
|
sliderLabel: 'Trending items'
|
|
21163
21329
|
}, userTranslations);
|
|
@@ -21180,9 +21346,8 @@
|
|
|
21180
21346
|
classNames: cssClasses,
|
|
21181
21347
|
items: items,
|
|
21182
21348
|
translations: translations
|
|
21183
|
-
}), createElement(
|
|
21349
|
+
}), createElement(Layout, {
|
|
21184
21350
|
classNames: cssClasses,
|
|
21185
|
-
translations: translations,
|
|
21186
21351
|
itemComponent: ItemComponent,
|
|
21187
21352
|
items: items,
|
|
21188
21353
|
sendEvent: sendEvent
|
|
@@ -21195,7 +21360,7 @@
|
|
|
21195
21360
|
return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
|
|
21196
21361
|
}
|
|
21197
21362
|
|
|
21198
|
-
var _excluded$
|
|
21363
|
+
var _excluded$j = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
|
|
21199
21364
|
function Breadcrumb(_ref) {
|
|
21200
21365
|
var _ref$classNames = _ref.classNames,
|
|
21201
21366
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -21207,7 +21372,7 @@
|
|
|
21207
21372
|
_ref$separator = _ref.separator,
|
|
21208
21373
|
separator = _ref$separator === void 0 ? '>' : _ref$separator,
|
|
21209
21374
|
translations = _ref.translations,
|
|
21210
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21375
|
+
props = _objectWithoutProperties$c(_ref, _excluded$j);
|
|
21211
21376
|
var handleClick = function handleClick(value) {
|
|
21212
21377
|
return function (event) {
|
|
21213
21378
|
if (!isModifierClick(event)) {
|
|
@@ -21242,14 +21407,14 @@
|
|
|
21242
21407
|
})));
|
|
21243
21408
|
}
|
|
21244
21409
|
|
|
21245
|
-
var _excluded$
|
|
21410
|
+
var _excluded$k = ["attributes", "rootPath", "separator", "transformItems", "translations"];
|
|
21246
21411
|
function Breadcrumb$1(_ref) {
|
|
21247
21412
|
var attributes = _ref.attributes,
|
|
21248
21413
|
rootPath = _ref.rootPath,
|
|
21249
21414
|
separator = _ref.separator,
|
|
21250
21415
|
transformItems = _ref.transformItems,
|
|
21251
21416
|
translations = _ref.translations,
|
|
21252
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21417
|
+
props = _objectWithoutProperties$c(_ref, _excluded$k);
|
|
21253
21418
|
var _useBreadcrumb = useBreadcrumb({
|
|
21254
21419
|
attributes: attributes,
|
|
21255
21420
|
rootPath: rootPath,
|
|
@@ -21273,7 +21438,7 @@
|
|
|
21273
21438
|
return /*#__PURE__*/React__default.createElement(Breadcrumb, _extends$1({}, props, uiProps));
|
|
21274
21439
|
}
|
|
21275
21440
|
|
|
21276
|
-
var _excluded$
|
|
21441
|
+
var _excluded$l = ["classNames", "disabled", "onClick", "translations"];
|
|
21277
21442
|
function ClearRefinements(_ref) {
|
|
21278
21443
|
var _ref$classNames = _ref.classNames,
|
|
21279
21444
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -21282,7 +21447,7 @@
|
|
|
21282
21447
|
_ref$onClick = _ref.onClick,
|
|
21283
21448
|
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
21284
21449
|
translations = _ref.translations,
|
|
21285
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21450
|
+
props = _objectWithoutProperties$c(_ref, _excluded$l);
|
|
21286
21451
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21287
21452
|
className: cx('ais-ClearRefinements', classNames.root, props.className)
|
|
21288
21453
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -21292,13 +21457,13 @@
|
|
|
21292
21457
|
}, translations.resetButtonText));
|
|
21293
21458
|
}
|
|
21294
21459
|
|
|
21295
|
-
var _excluded$
|
|
21460
|
+
var _excluded$m = ["includedAttributes", "excludedAttributes", "transformItems", "translations"];
|
|
21296
21461
|
function ClearRefinements$1(_ref) {
|
|
21297
21462
|
var includedAttributes = _ref.includedAttributes,
|
|
21298
21463
|
excludedAttributes = _ref.excludedAttributes,
|
|
21299
21464
|
transformItems = _ref.transformItems,
|
|
21300
21465
|
translations = _ref.translations,
|
|
21301
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21466
|
+
props = _objectWithoutProperties$c(_ref, _excluded$m);
|
|
21302
21467
|
var _useClearRefinements = useClearRefinements({
|
|
21303
21468
|
includedAttributes: includedAttributes,
|
|
21304
21469
|
excludedAttributes: excludedAttributes,
|
|
@@ -21322,7 +21487,7 @@
|
|
|
21322
21487
|
return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
|
|
21323
21488
|
}
|
|
21324
21489
|
|
|
21325
|
-
var _excluded$
|
|
21490
|
+
var _excluded$n = ["classNames", "items", "hasRefinements"];
|
|
21326
21491
|
function CurrentRefinements(_ref) {
|
|
21327
21492
|
var _ref$classNames = _ref.classNames,
|
|
21328
21493
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -21330,7 +21495,7 @@
|
|
|
21330
21495
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
21331
21496
|
_ref$hasRefinements = _ref.hasRefinements,
|
|
21332
21497
|
hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
|
|
21333
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21498
|
+
props = _objectWithoutProperties$c(_ref, _excluded$n);
|
|
21334
21499
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21335
21500
|
className: cx('ais-CurrentRefinements', classNames.root, !hasRefinements && cx('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
|
|
21336
21501
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -21362,12 +21527,12 @@
|
|
|
21362
21527
|
})));
|
|
21363
21528
|
}
|
|
21364
21529
|
|
|
21365
|
-
var _excluded$
|
|
21530
|
+
var _excluded$o = ["includedAttributes", "excludedAttributes", "transformItems"];
|
|
21366
21531
|
function CurrentRefinements$1(_ref) {
|
|
21367
21532
|
var includedAttributes = _ref.includedAttributes,
|
|
21368
21533
|
excludedAttributes = _ref.excludedAttributes,
|
|
21369
21534
|
transformItems = _ref.transformItems,
|
|
21370
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21535
|
+
props = _objectWithoutProperties$c(_ref, _excluded$o);
|
|
21371
21536
|
var _useCurrentRefinement = useCurrentRefinements({
|
|
21372
21537
|
includedAttributes: includedAttributes,
|
|
21373
21538
|
excludedAttributes: excludedAttributes,
|
|
@@ -21384,7 +21549,7 @@
|
|
|
21384
21549
|
return /*#__PURE__*/React__default.createElement(CurrentRefinements, _extends$1({}, props, uiProps));
|
|
21385
21550
|
}
|
|
21386
21551
|
|
|
21387
|
-
var _excluded$
|
|
21552
|
+
var _excluded$p = ["objectIDs", "limit", "threshold", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
21388
21553
|
var FrequentlyBoughtTogetherUiComponent = createFrequentlyBoughtTogetherComponent({
|
|
21389
21554
|
createElement: React.createElement,
|
|
21390
21555
|
Fragment: React.Fragment
|
|
@@ -21399,7 +21564,8 @@
|
|
|
21399
21564
|
itemComponent = _ref.itemComponent,
|
|
21400
21565
|
headerComponent = _ref.headerComponent,
|
|
21401
21566
|
emptyComponent = _ref.emptyComponent,
|
|
21402
|
-
|
|
21567
|
+
layoutComponent = _ref.layoutComponent,
|
|
21568
|
+
props = _objectWithoutProperties$c(_ref, _excluded$p);
|
|
21403
21569
|
var _useInstantSearch = useInstantSearch(),
|
|
21404
21570
|
status = _useInstantSearch.status;
|
|
21405
21571
|
var _useFrequentlyBoughtT = useFrequentlyBoughtTogether({
|
|
@@ -21413,28 +21579,37 @@
|
|
|
21413
21579
|
$$widgetType: 'ais.frequentlyBoughtTogether'
|
|
21414
21580
|
}),
|
|
21415
21581
|
items = _useFrequentlyBoughtT.items;
|
|
21582
|
+
var layout = layoutComponent ? function (layoutProps) {
|
|
21583
|
+
return layoutComponent(_objectSpread2(_objectSpread2({}, layoutProps), {}, {
|
|
21584
|
+
classNames: {
|
|
21585
|
+
list: layoutProps.classNames.list,
|
|
21586
|
+
item: layoutProps.classNames.item
|
|
21587
|
+
}
|
|
21588
|
+
}));
|
|
21589
|
+
} : undefined;
|
|
21416
21590
|
var uiProps = {
|
|
21417
21591
|
items: items,
|
|
21418
21592
|
itemComponent: itemComponent,
|
|
21419
21593
|
headerComponent: headerComponent,
|
|
21420
21594
|
emptyComponent: emptyComponent,
|
|
21595
|
+
layout: layout,
|
|
21421
21596
|
status: status,
|
|
21422
21597
|
sendEvent: function sendEvent() {}
|
|
21423
21598
|
};
|
|
21424
21599
|
return /*#__PURE__*/React__default.createElement(FrequentlyBoughtTogetherUiComponent, _extends$1({}, props, uiProps));
|
|
21425
21600
|
}
|
|
21426
21601
|
|
|
21427
|
-
var _excluded$
|
|
21602
|
+
var _excluded$q = ["isShowingMore", "translations"];
|
|
21428
21603
|
function ShowMoreButton(_ref) {
|
|
21429
21604
|
var isShowingMore = _ref.isShowingMore,
|
|
21430
21605
|
translations = _ref.translations,
|
|
21431
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21606
|
+
props = _objectWithoutProperties$c(_ref, _excluded$q);
|
|
21432
21607
|
return /*#__PURE__*/React__default.createElement("button", props, translations.showMoreButtonText({
|
|
21433
21608
|
isShowingMore: isShowingMore
|
|
21434
21609
|
}));
|
|
21435
21610
|
}
|
|
21436
21611
|
|
|
21437
|
-
var _excluded$
|
|
21612
|
+
var _excluded$r = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
|
|
21438
21613
|
function HierarchicalList(_ref) {
|
|
21439
21614
|
var className = _ref.className,
|
|
21440
21615
|
_ref$classNames = _ref.classNames,
|
|
@@ -21486,7 +21661,7 @@
|
|
|
21486
21661
|
onToggleShowMore = _ref2.onToggleShowMore,
|
|
21487
21662
|
isShowingMore = _ref2.isShowingMore,
|
|
21488
21663
|
translations = _ref2.translations,
|
|
21489
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
21664
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$r);
|
|
21490
21665
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21491
21666
|
className: cx('ais-HierarchicalMenu', classNames.root, !hasItems && cx('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
21492
21667
|
}), /*#__PURE__*/React__default.createElement(HierarchicalList, {
|
|
@@ -21503,7 +21678,7 @@
|
|
|
21503
21678
|
}));
|
|
21504
21679
|
}
|
|
21505
21680
|
|
|
21506
|
-
var _excluded$
|
|
21681
|
+
var _excluded$s = ["attributes", "limit", "rootPath", "separator", "showMore", "showMoreLimit", "showParentLevel", "sortBy", "transformItems", "translations"];
|
|
21507
21682
|
function HierarchicalMenu$1(_ref) {
|
|
21508
21683
|
var attributes = _ref.attributes,
|
|
21509
21684
|
limit = _ref.limit,
|
|
@@ -21515,7 +21690,7 @@
|
|
|
21515
21690
|
sortBy = _ref.sortBy,
|
|
21516
21691
|
transformItems = _ref.transformItems,
|
|
21517
21692
|
translations = _ref.translations,
|
|
21518
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21693
|
+
props = _objectWithoutProperties$c(_ref, _excluded$s);
|
|
21519
21694
|
var _useHierarchicalMenu = useHierarchicalMenu({
|
|
21520
21695
|
attributes: attributes,
|
|
21521
21696
|
limit: limit,
|
|
@@ -21560,11 +21735,11 @@
|
|
|
21560
21735
|
Fragment: React.Fragment
|
|
21561
21736
|
});
|
|
21562
21737
|
|
|
21563
|
-
var _excluded$
|
|
21738
|
+
var _excluded$t = ["classNames"];
|
|
21564
21739
|
function Highlight(_ref) {
|
|
21565
21740
|
var _ref$classNames = _ref.classNames,
|
|
21566
21741
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
21567
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21742
|
+
props = _objectWithoutProperties$c(_ref, _excluded$t);
|
|
21568
21743
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
21569
21744
|
classNames: {
|
|
21570
21745
|
root: cx('ais-Highlight', classNames.root),
|
|
@@ -21575,14 +21750,14 @@
|
|
|
21575
21750
|
}, props));
|
|
21576
21751
|
}
|
|
21577
21752
|
|
|
21578
|
-
var _excluded$
|
|
21753
|
+
var _excluded$u = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
21579
21754
|
function Highlight$1(_ref) {
|
|
21580
21755
|
var hit = _ref.hit,
|
|
21581
21756
|
attribute = _ref.attribute,
|
|
21582
21757
|
highlightedTagName = _ref.highlightedTagName,
|
|
21583
21758
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
21584
21759
|
separator = _ref.separator,
|
|
21585
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21760
|
+
props = _objectWithoutProperties$c(_ref, _excluded$u);
|
|
21586
21761
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
21587
21762
|
var properties = Array.isArray(property) ? property : [property];
|
|
21588
21763
|
var parts = properties.map(function (singleValue) {
|
|
@@ -21596,7 +21771,7 @@
|
|
|
21596
21771
|
}));
|
|
21597
21772
|
}
|
|
21598
21773
|
|
|
21599
|
-
var _excluded$
|
|
21774
|
+
var _excluded$v = ["escapeHTML", "transformItems", "hitComponent", "bannerComponent"],
|
|
21600
21775
|
_excluded2$4 = ["hit", "index"];
|
|
21601
21776
|
// @MAJOR: Move default hit component back to the UI library
|
|
21602
21777
|
// once flavour specificities are erased
|
|
@@ -21618,7 +21793,7 @@
|
|
|
21618
21793
|
_ref2$hitComponent = _ref2.hitComponent,
|
|
21619
21794
|
HitComponent = _ref2$hitComponent === void 0 ? DefaultHitComponent : _ref2$hitComponent,
|
|
21620
21795
|
BannerComponent = _ref2.bannerComponent,
|
|
21621
|
-
props = _objectWithoutProperties$c(_ref2, _excluded$
|
|
21796
|
+
props = _objectWithoutProperties$c(_ref2, _excluded$v);
|
|
21622
21797
|
var _useHits = useHits({
|
|
21623
21798
|
escapeHTML: escapeHTML,
|
|
21624
21799
|
transformItems: transformItems
|
|
@@ -21654,14 +21829,14 @@
|
|
|
21654
21829
|
return /*#__PURE__*/React__default.createElement(HitsUiComponent, _extends$1({}, props, uiProps));
|
|
21655
21830
|
}
|
|
21656
21831
|
|
|
21657
|
-
var _excluded$
|
|
21832
|
+
var _excluded$w = ["items", "onChange", "currentValue", "classNames"];
|
|
21658
21833
|
function HitsPerPage(_ref) {
|
|
21659
21834
|
var items = _ref.items,
|
|
21660
21835
|
_onChange = _ref.onChange,
|
|
21661
21836
|
currentValue = _ref.currentValue,
|
|
21662
21837
|
_ref$classNames = _ref.classNames,
|
|
21663
21838
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
21664
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21839
|
+
props = _objectWithoutProperties$c(_ref, _excluded$w);
|
|
21665
21840
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21666
21841
|
className: cx('ais-HitsPerPage', classNames.root, props.className)
|
|
21667
21842
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -21679,11 +21854,11 @@
|
|
|
21679
21854
|
})));
|
|
21680
21855
|
}
|
|
21681
21856
|
|
|
21682
|
-
var _excluded$
|
|
21857
|
+
var _excluded$x = ["items", "transformItems"];
|
|
21683
21858
|
function HitsPerPage$1(_ref) {
|
|
21684
21859
|
var userItems = _ref.items,
|
|
21685
21860
|
transformItems = _ref.transformItems,
|
|
21686
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21861
|
+
props = _objectWithoutProperties$c(_ref, _excluded$x);
|
|
21687
21862
|
var _useHitsPerPage = useHitsPerPage({
|
|
21688
21863
|
items: userItems,
|
|
21689
21864
|
transformItems: transformItems
|
|
@@ -21707,7 +21882,7 @@
|
|
|
21707
21882
|
return /*#__PURE__*/React__default.createElement(HitsPerPage, _extends$1({}, props, uiProps));
|
|
21708
21883
|
}
|
|
21709
21884
|
|
|
21710
|
-
var _excluded$
|
|
21885
|
+
var _excluded$y = ["hitComponent", "hits", "bannerComponent", "banner", "sendEvent", "isFirstPage", "isLastPage", "onShowPrevious", "onShowMore", "classNames", "translations"];
|
|
21711
21886
|
function DefaultHitComponent$1(_ref) {
|
|
21712
21887
|
var hit = _ref.hit;
|
|
21713
21888
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -21752,7 +21927,7 @@
|
|
|
21752
21927
|
_ref3$classNames = _ref3.classNames,
|
|
21753
21928
|
classNames = _ref3$classNames === void 0 ? {} : _ref3$classNames,
|
|
21754
21929
|
translations = _ref3.translations,
|
|
21755
|
-
props = _objectWithoutProperties$c(_ref3, _excluded$
|
|
21930
|
+
props = _objectWithoutProperties$c(_ref3, _excluded$y);
|
|
21756
21931
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21757
21932
|
className: cx('ais-InfiniteHits', classNames.root, hits.length === 0 && cx('ais-InfiniteHits--empty', classNames.emptyRoot), props.className)
|
|
21758
21933
|
}), onShowPrevious && /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -21788,7 +21963,7 @@
|
|
|
21788
21963
|
}, translations.showMoreButtonText));
|
|
21789
21964
|
}
|
|
21790
21965
|
|
|
21791
|
-
var _excluded$
|
|
21966
|
+
var _excluded$z = ["showPrevious", "cache", "escapeHTML", "showPrevious", "transformItems", "translations", "bannerComponent"];
|
|
21792
21967
|
function InfiniteHits$1(_ref) {
|
|
21793
21968
|
var _ref$showPrevious = _ref.showPrevious,
|
|
21794
21969
|
shouldShowPrevious = _ref$showPrevious === void 0 ? true : _ref$showPrevious,
|
|
@@ -21798,7 +21973,7 @@
|
|
|
21798
21973
|
transformItems = _ref.transformItems,
|
|
21799
21974
|
translations = _ref.translations,
|
|
21800
21975
|
BannerComponent = _ref.bannerComponent,
|
|
21801
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
21976
|
+
props = _objectWithoutProperties$c(_ref, _excluded$z);
|
|
21802
21977
|
var _useInfiniteHits = useInfiniteHits({
|
|
21803
21978
|
cache: cache,
|
|
21804
21979
|
escapeHTML: escapeHTML,
|
|
@@ -21834,7 +22009,7 @@
|
|
|
21834
22009
|
return /*#__PURE__*/React__default.createElement(InfiniteHits, _extends$1({}, props, uiProps));
|
|
21835
22010
|
}
|
|
21836
22011
|
|
|
21837
|
-
var _excluded$
|
|
22012
|
+
var _excluded$A = ["items", "classNames", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "createURL", "onRefine", "translations"];
|
|
21838
22013
|
function Menu(_ref) {
|
|
21839
22014
|
var items = _ref.items,
|
|
21840
22015
|
_ref$classNames = _ref.classNames,
|
|
@@ -21846,7 +22021,7 @@
|
|
|
21846
22021
|
createURL = _ref.createURL,
|
|
21847
22022
|
onRefine = _ref.onRefine,
|
|
21848
22023
|
translations = _ref.translations,
|
|
21849
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22024
|
+
props = _objectWithoutProperties$c(_ref, _excluded$A);
|
|
21850
22025
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
21851
22026
|
className: cx('ais-Menu', classNames.root, items.length === 0 && cx('ais-Menu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
21852
22027
|
}), /*#__PURE__*/React__default.createElement("ul", {
|
|
@@ -21876,7 +22051,7 @@
|
|
|
21876
22051
|
}));
|
|
21877
22052
|
}
|
|
21878
22053
|
|
|
21879
|
-
var _excluded$
|
|
22054
|
+
var _excluded$B = ["attribute", "limit", "showMore", "showMoreLimit", "sortBy", "transformItems", "translations"];
|
|
21880
22055
|
function Menu$1(_ref) {
|
|
21881
22056
|
var attribute = _ref.attribute,
|
|
21882
22057
|
limit = _ref.limit,
|
|
@@ -21885,7 +22060,7 @@
|
|
|
21885
22060
|
sortBy = _ref.sortBy,
|
|
21886
22061
|
transformItems = _ref.transformItems,
|
|
21887
22062
|
translations = _ref.translations,
|
|
21888
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22063
|
+
props = _objectWithoutProperties$c(_ref, _excluded$B);
|
|
21889
22064
|
var _useMenu = useMenu({
|
|
21890
22065
|
attribute: attribute,
|
|
21891
22066
|
limit: limit,
|
|
@@ -21922,7 +22097,7 @@
|
|
|
21922
22097
|
}));
|
|
21923
22098
|
}
|
|
21924
22099
|
|
|
21925
|
-
var _excluded$
|
|
22100
|
+
var _excluded$C = ["pages", "currentPage", "nbPages", "isFirstPage", "isLastPage", "showFirst", "showPrevious", "showNext", "showLast", "createURL", "onNavigate", "translations", "classNames"],
|
|
21926
22101
|
_excluded2$5 = ["isDisabled", "className", "classNames", "href", "onClick"];
|
|
21927
22102
|
function Pagination(_ref) {
|
|
21928
22103
|
var pages = _ref.pages,
|
|
@@ -21943,7 +22118,7 @@
|
|
|
21943
22118
|
translations = _ref.translations,
|
|
21944
22119
|
_ref$classNames = _ref.classNames,
|
|
21945
22120
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
21946
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22121
|
+
props = _objectWithoutProperties$c(_ref, _excluded$C);
|
|
21947
22122
|
var firstPageIndex = 0;
|
|
21948
22123
|
var previousPageIndex = currentPage - 1;
|
|
21949
22124
|
var nextPageIndex = currentPage + 1;
|
|
@@ -22037,7 +22212,7 @@
|
|
|
22037
22212
|
}, props)));
|
|
22038
22213
|
}
|
|
22039
22214
|
|
|
22040
|
-
var _excluded$
|
|
22215
|
+
var _excluded$D = ["showFirst", "showPrevious", "showNext", "showLast", "padding", "totalPages", "translations"];
|
|
22041
22216
|
function Pagination$1(_ref) {
|
|
22042
22217
|
var showFirst = _ref.showFirst,
|
|
22043
22218
|
showPrevious = _ref.showPrevious,
|
|
@@ -22046,7 +22221,7 @@
|
|
|
22046
22221
|
padding = _ref.padding,
|
|
22047
22222
|
totalPages = _ref.totalPages,
|
|
22048
22223
|
translations = _ref.translations,
|
|
22049
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22224
|
+
props = _objectWithoutProperties$c(_ref, _excluded$D);
|
|
22050
22225
|
var _usePagination = usePagination({
|
|
22051
22226
|
padding: padding,
|
|
22052
22227
|
totalPages: totalPages
|
|
@@ -22095,14 +22270,14 @@
|
|
|
22095
22270
|
}));
|
|
22096
22271
|
}
|
|
22097
22272
|
|
|
22098
|
-
var _excluded$
|
|
22273
|
+
var _excluded$E = ["classNames", "url", "theme"];
|
|
22099
22274
|
function PoweredBy(_ref) {
|
|
22100
22275
|
var _ref$classNames = _ref.classNames,
|
|
22101
22276
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22102
22277
|
url = _ref.url,
|
|
22103
22278
|
_ref$theme = _ref.theme,
|
|
22104
22279
|
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
|
|
22105
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22280
|
+
props = _objectWithoutProperties$c(_ref, _excluded$E);
|
|
22106
22281
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22107
22282
|
className: cx('ais-PoweredBy', theme === 'dark' ? cx('ais-PoweredBy--dark', classNames.dark) : cx('ais-PoweredBy--light', classNames.light), classNames.root, props.className)
|
|
22108
22283
|
}), /*#__PURE__*/React__default.createElement("a", {
|
|
@@ -22132,7 +22307,7 @@
|
|
|
22132
22307
|
return /*#__PURE__*/React__default.createElement(PoweredBy, _extends$1({}, props, uiProps));
|
|
22133
22308
|
}
|
|
22134
22309
|
|
|
22135
|
-
var _excluded$
|
|
22310
|
+
var _excluded$F = ["classNames", "range", "start", "step", "disabled", "onSubmit", "translations"];
|
|
22136
22311
|
// 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
22312
|
var unsetNumberInputValue = '';
|
|
22138
22313
|
|
|
@@ -22157,7 +22332,7 @@
|
|
|
22157
22332
|
disabled = _ref.disabled,
|
|
22158
22333
|
_onSubmit = _ref.onSubmit,
|
|
22159
22334
|
translations = _ref.translations,
|
|
22160
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22335
|
+
props = _objectWithoutProperties$c(_ref, _excluded$F);
|
|
22161
22336
|
var values = {
|
|
22162
22337
|
min: minValue !== -Infinity && minValue !== min ? minValue : unsetNumberInputValue,
|
|
22163
22338
|
max: maxValue !== Infinity && maxValue !== max ? maxValue : unsetNumberInputValue
|
|
@@ -22237,14 +22412,14 @@
|
|
|
22237
22412
|
}, translations.submitButtonText)));
|
|
22238
22413
|
}
|
|
22239
22414
|
|
|
22240
|
-
var _excluded$
|
|
22415
|
+
var _excluded$G = ["attribute", "min", "max", "precision", "translations"];
|
|
22241
22416
|
function RangeInput$1(_ref) {
|
|
22242
22417
|
var attribute = _ref.attribute,
|
|
22243
22418
|
min = _ref.min,
|
|
22244
22419
|
max = _ref.max,
|
|
22245
22420
|
precision = _ref.precision,
|
|
22246
22421
|
translations = _ref.translations,
|
|
22247
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22422
|
+
props = _objectWithoutProperties$c(_ref, _excluded$G);
|
|
22248
22423
|
var _useRange = useRange({
|
|
22249
22424
|
attribute: attribute,
|
|
22250
22425
|
min: min,
|
|
@@ -22272,7 +22447,7 @@
|
|
|
22272
22447
|
return /*#__PURE__*/React__default.createElement(RangeInput, _extends$1({}, props, uiProps));
|
|
22273
22448
|
}
|
|
22274
22449
|
|
|
22275
|
-
var _excluded$
|
|
22450
|
+
var _excluded$H = ["canRefine", "items", "onRefine", "query", "searchBox", "noResults", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "className", "classNames", "translations"];
|
|
22276
22451
|
function RefinementList$1(_ref) {
|
|
22277
22452
|
var canRefine = _ref.canRefine,
|
|
22278
22453
|
items = _ref.items,
|
|
@@ -22288,7 +22463,7 @@
|
|
|
22288
22463
|
_ref$classNames = _ref.classNames,
|
|
22289
22464
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22290
22465
|
translations = _ref.translations,
|
|
22291
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22466
|
+
props = _objectWithoutProperties$c(_ref, _excluded$H);
|
|
22292
22467
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22293
22468
|
className: cx('ais-RefinementList', classNames.root, items.length === 0 && cx('ais-RefinementList--noRefinement', classNames.noRefinementRoot), className)
|
|
22294
22469
|
}), searchBox && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -22327,7 +22502,7 @@
|
|
|
22327
22502
|
}));
|
|
22328
22503
|
}
|
|
22329
22504
|
|
|
22330
|
-
var _excluded$
|
|
22505
|
+
var _excluded$I = ["formRef", "inputRef", "isSearchStalled", "onChange", "onReset", "onSubmit", "placeholder", "value", "autoFocus", "resetIconComponent", "submitIconComponent", "loadingIconComponent", "classNames", "translations"];
|
|
22331
22506
|
var _ref2 = /*#__PURE__*/React__default.createElement("path", {
|
|
22332
22507
|
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
22508
|
});
|
|
@@ -22407,7 +22582,7 @@
|
|
|
22407
22582
|
_ref7$classNames = _ref7.classNames,
|
|
22408
22583
|
classNames = _ref7$classNames === void 0 ? {} : _ref7$classNames,
|
|
22409
22584
|
translations = _ref7.translations,
|
|
22410
|
-
props = _objectWithoutProperties$c(_ref7, _excluded$
|
|
22585
|
+
props = _objectWithoutProperties$c(_ref7, _excluded$I);
|
|
22411
22586
|
function handleSubmit(event) {
|
|
22412
22587
|
event.preventDefault();
|
|
22413
22588
|
event.stopPropagation();
|
|
@@ -22472,7 +22647,7 @@
|
|
|
22472
22647
|
}))));
|
|
22473
22648
|
}
|
|
22474
22649
|
|
|
22475
|
-
var _excluded$
|
|
22650
|
+
var _excluded$J = ["searchable", "searchablePlaceholder", "attribute", "operator", "limit", "showMore", "showMoreLimit", "sortBy", "escapeFacetValues", "transformItems", "translations"];
|
|
22476
22651
|
function RefinementList$2(_ref) {
|
|
22477
22652
|
var searchable = _ref.searchable,
|
|
22478
22653
|
searchablePlaceholder = _ref.searchablePlaceholder,
|
|
@@ -22485,7 +22660,7 @@
|
|
|
22485
22660
|
escapeFacetValues = _ref.escapeFacetValues,
|
|
22486
22661
|
transformItems = _ref.transformItems,
|
|
22487
22662
|
translations = _ref.translations,
|
|
22488
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22663
|
+
props = _objectWithoutProperties$c(_ref, _excluded$J);
|
|
22489
22664
|
var _useRefinementList = useRefinementList({
|
|
22490
22665
|
attribute: attribute,
|
|
22491
22666
|
operator: operator,
|
|
@@ -22574,7 +22749,7 @@
|
|
|
22574
22749
|
}));
|
|
22575
22750
|
}
|
|
22576
22751
|
|
|
22577
|
-
var _excluded$
|
|
22752
|
+
var _excluded$K = ["objectIDs", "limit", "threshold", "fallbackParameters", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
22578
22753
|
var RelatedProductsUiComponent = createRelatedProductsComponent({
|
|
22579
22754
|
createElement: React.createElement,
|
|
22580
22755
|
Fragment: React.Fragment
|
|
@@ -22590,7 +22765,8 @@
|
|
|
22590
22765
|
itemComponent = _ref.itemComponent,
|
|
22591
22766
|
headerComponent = _ref.headerComponent,
|
|
22592
22767
|
emptyComponent = _ref.emptyComponent,
|
|
22593
|
-
|
|
22768
|
+
layoutComponent = _ref.layoutComponent,
|
|
22769
|
+
props = _objectWithoutProperties$c(_ref, _excluded$K);
|
|
22594
22770
|
var _useInstantSearch = useInstantSearch(),
|
|
22595
22771
|
status = _useInstantSearch.status;
|
|
22596
22772
|
var _useRelatedProducts = useRelatedProducts({
|
|
@@ -22605,18 +22781,27 @@
|
|
|
22605
22781
|
$$widgetType: 'ais.relatedProducts'
|
|
22606
22782
|
}),
|
|
22607
22783
|
items = _useRelatedProducts.items;
|
|
22784
|
+
var layout = layoutComponent ? function (layoutProps) {
|
|
22785
|
+
return layoutComponent(_objectSpread2(_objectSpread2({}, layoutProps), {}, {
|
|
22786
|
+
classNames: {
|
|
22787
|
+
list: layoutProps.classNames.list,
|
|
22788
|
+
item: layoutProps.classNames.item
|
|
22789
|
+
}
|
|
22790
|
+
}));
|
|
22791
|
+
} : undefined;
|
|
22608
22792
|
var uiProps = {
|
|
22609
22793
|
items: items,
|
|
22610
22794
|
itemComponent: itemComponent,
|
|
22611
22795
|
headerComponent: headerComponent,
|
|
22612
22796
|
emptyComponent: emptyComponent,
|
|
22797
|
+
layout: layout,
|
|
22613
22798
|
status: status,
|
|
22614
22799
|
sendEvent: function sendEvent() {}
|
|
22615
22800
|
};
|
|
22616
22801
|
return /*#__PURE__*/React__default.createElement(RelatedProductsUiComponent, _extends$1({}, props, uiProps));
|
|
22617
22802
|
}
|
|
22618
22803
|
|
|
22619
|
-
var _excluded$
|
|
22804
|
+
var _excluded$L = ["queryHook", "searchAsYouType", "ignoreCompositionEvents", "translations"];
|
|
22620
22805
|
function SearchBox$1(_ref) {
|
|
22621
22806
|
var queryHook = _ref.queryHook,
|
|
22622
22807
|
_ref$searchAsYouType = _ref.searchAsYouType,
|
|
@@ -22624,7 +22809,7 @@
|
|
|
22624
22809
|
_ref$ignoreCompositio = _ref.ignoreCompositionEvents,
|
|
22625
22810
|
ignoreCompositionEvents = _ref$ignoreCompositio === void 0 ? false : _ref$ignoreCompositio,
|
|
22626
22811
|
translations = _ref.translations,
|
|
22627
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22812
|
+
props = _objectWithoutProperties$c(_ref, _excluded$L);
|
|
22628
22813
|
var _useSearchBox = useSearchBox({
|
|
22629
22814
|
queryHook: queryHook
|
|
22630
22815
|
}, {
|
|
@@ -22685,11 +22870,11 @@
|
|
|
22685
22870
|
return /*#__PURE__*/React__default.createElement(SearchBox, _extends$1({}, props, uiProps));
|
|
22686
22871
|
}
|
|
22687
22872
|
|
|
22688
|
-
var _excluded$
|
|
22873
|
+
var _excluded$M = ["classNames"];
|
|
22689
22874
|
function Snippet(_ref) {
|
|
22690
22875
|
var _ref$classNames = _ref.classNames,
|
|
22691
22876
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22692
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22877
|
+
props = _objectWithoutProperties$c(_ref, _excluded$M);
|
|
22693
22878
|
return /*#__PURE__*/React__default.createElement(InternalHighlight, _extends$1({
|
|
22694
22879
|
classNames: {
|
|
22695
22880
|
root: cx('ais-Snippet', classNames.root),
|
|
@@ -22700,14 +22885,14 @@
|
|
|
22700
22885
|
}, props));
|
|
22701
22886
|
}
|
|
22702
22887
|
|
|
22703
|
-
var _excluded$
|
|
22888
|
+
var _excluded$N = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"];
|
|
22704
22889
|
function Snippet$1(_ref) {
|
|
22705
22890
|
var hit = _ref.hit,
|
|
22706
22891
|
attribute = _ref.attribute,
|
|
22707
22892
|
highlightedTagName = _ref.highlightedTagName,
|
|
22708
22893
|
nonHighlightedTagName = _ref.nonHighlightedTagName,
|
|
22709
22894
|
separator = _ref.separator,
|
|
22710
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22895
|
+
props = _objectWithoutProperties$c(_ref, _excluded$N);
|
|
22711
22896
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
22712
22897
|
var properties = Array.isArray(property) ? property : [property];
|
|
22713
22898
|
var parts = properties.map(function (singleValue) {
|
|
@@ -22721,7 +22906,7 @@
|
|
|
22721
22906
|
}));
|
|
22722
22907
|
}
|
|
22723
22908
|
|
|
22724
|
-
var _excluded$
|
|
22909
|
+
var _excluded$O = ["items", "value", "onChange", "classNames"];
|
|
22725
22910
|
function SortBy(_ref) {
|
|
22726
22911
|
var items = _ref.items,
|
|
22727
22912
|
value = _ref.value,
|
|
@@ -22729,7 +22914,7 @@
|
|
|
22729
22914
|
_onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
22730
22915
|
_ref$classNames = _ref.classNames,
|
|
22731
22916
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22732
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22917
|
+
props = _objectWithoutProperties$c(_ref, _excluded$O);
|
|
22733
22918
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22734
22919
|
className: cx('ais-SortBy', classNames.root, props.className)
|
|
22735
22920
|
}), /*#__PURE__*/React__default.createElement("select", {
|
|
@@ -22748,11 +22933,11 @@
|
|
|
22748
22933
|
})));
|
|
22749
22934
|
}
|
|
22750
22935
|
|
|
22751
|
-
var _excluded$
|
|
22936
|
+
var _excluded$P = ["items", "transformItems"];
|
|
22752
22937
|
function SortBy$1(_ref) {
|
|
22753
22938
|
var items = _ref.items,
|
|
22754
22939
|
transformItems = _ref.transformItems,
|
|
22755
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22940
|
+
props = _objectWithoutProperties$c(_ref, _excluded$P);
|
|
22756
22941
|
var _useSortBy = useSortBy({
|
|
22757
22942
|
items: items,
|
|
22758
22943
|
transformItems: transformItems
|
|
@@ -22770,7 +22955,7 @@
|
|
|
22770
22955
|
return /*#__PURE__*/React__default.createElement(SortBy, _extends$1({}, props, uiProps));
|
|
22771
22956
|
}
|
|
22772
22957
|
|
|
22773
|
-
var _excluded$
|
|
22958
|
+
var _excluded$Q = ["classNames", "nbHits", "processingTimeMS", "nbSortedHits", "areHitsSorted", "translations"];
|
|
22774
22959
|
function Stats(_ref) {
|
|
22775
22960
|
var _ref$classNames = _ref.classNames,
|
|
22776
22961
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -22779,7 +22964,7 @@
|
|
|
22779
22964
|
nbSortedHits = _ref.nbSortedHits,
|
|
22780
22965
|
areHitsSorted = _ref.areHitsSorted,
|
|
22781
22966
|
translations = _ref.translations,
|
|
22782
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22967
|
+
props = _objectWithoutProperties$c(_ref, _excluded$Q);
|
|
22783
22968
|
var translationOptions = {
|
|
22784
22969
|
nbHits: nbHits,
|
|
22785
22970
|
processingTimeMS: processingTimeMS,
|
|
@@ -22793,10 +22978,10 @@
|
|
|
22793
22978
|
}, translations.rootElementText(translationOptions)));
|
|
22794
22979
|
}
|
|
22795
22980
|
|
|
22796
|
-
var _excluded$
|
|
22981
|
+
var _excluded$R = ["translations"];
|
|
22797
22982
|
function Stats$1(_ref) {
|
|
22798
22983
|
var translations = _ref.translations,
|
|
22799
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
22984
|
+
props = _objectWithoutProperties$c(_ref, _excluded$R);
|
|
22800
22985
|
var _useStats = useStats(undefined, {
|
|
22801
22986
|
$$widgetType: 'ais.stats'
|
|
22802
22987
|
}),
|
|
@@ -22846,14 +23031,14 @@
|
|
|
22846
23031
|
return '';
|
|
22847
23032
|
}
|
|
22848
23033
|
|
|
22849
|
-
var _excluded$
|
|
23034
|
+
var _excluded$S = ["classNames", "checked", "onChange", "label"];
|
|
22850
23035
|
function ToggleRefinement(_ref) {
|
|
22851
23036
|
var _ref$classNames = _ref.classNames,
|
|
22852
23037
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
22853
23038
|
checked = _ref.checked,
|
|
22854
23039
|
_onChange = _ref.onChange,
|
|
22855
23040
|
label = _ref.label,
|
|
22856
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23041
|
+
props = _objectWithoutProperties$c(_ref, _excluded$S);
|
|
22857
23042
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({}, props, {
|
|
22858
23043
|
className: cx('ais-ToggleRefinement', classNames.root, props.className)
|
|
22859
23044
|
}), /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -22870,12 +23055,12 @@
|
|
|
22870
23055
|
}, label)));
|
|
22871
23056
|
}
|
|
22872
23057
|
|
|
22873
|
-
var _excluded$
|
|
23058
|
+
var _excluded$T = ["attribute", "on", "off"];
|
|
22874
23059
|
function ToggleRefinement$1(_ref) {
|
|
22875
23060
|
var attribute = _ref.attribute,
|
|
22876
23061
|
on = _ref.on,
|
|
22877
23062
|
off = _ref.off,
|
|
22878
|
-
props = _objectWithoutProperties$c(_ref, _excluded$
|
|
23063
|
+
props = _objectWithoutProperties$c(_ref, _excluded$T);
|
|
22879
23064
|
var _useToggleRefinement = useToggleRefinement({
|
|
22880
23065
|
attribute: attribute,
|
|
22881
23066
|
on: on,
|
|
@@ -22898,7 +23083,7 @@
|
|
|
22898
23083
|
}, props, uiProps));
|
|
22899
23084
|
}
|
|
22900
23085
|
|
|
22901
|
-
var _excluded$
|
|
23086
|
+
var _excluded$U = ["facetName", "facetValue", "limit", "threshold", "fallbackParameters", "queryParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
22902
23087
|
var TrendingItemsUiComponent = createTrendingItemsComponent({
|
|
22903
23088
|
createElement: React.createElement,
|
|
22904
23089
|
Fragment: React.Fragment
|
|
@@ -22915,7 +23100,8 @@
|
|
|
22915
23100
|
itemComponent = _ref.itemComponent,
|
|
22916
23101
|
headerComponent = _ref.headerComponent,
|
|
22917
23102
|
emptyComponent = _ref.emptyComponent,
|
|
22918
|
-
|
|
23103
|
+
layoutComponent = _ref.layoutComponent,
|
|
23104
|
+
props = _objectWithoutProperties$c(_ref, _excluded$U);
|
|
22919
23105
|
var facetParameters = facetName && facetValue ? {
|
|
22920
23106
|
facetName: facetName,
|
|
22921
23107
|
facetValue: facetValue
|
|
@@ -22933,18 +23119,27 @@
|
|
|
22933
23119
|
$$widgetType: 'ais.trendingItems'
|
|
22934
23120
|
}),
|
|
22935
23121
|
items = _useTrendingItems.items;
|
|
23122
|
+
var layout = layoutComponent ? function (layoutProps) {
|
|
23123
|
+
return layoutComponent(_objectSpread2(_objectSpread2({}, layoutProps), {}, {
|
|
23124
|
+
classNames: {
|
|
23125
|
+
list: layoutProps.classNames.list,
|
|
23126
|
+
item: layoutProps.classNames.item
|
|
23127
|
+
}
|
|
23128
|
+
}));
|
|
23129
|
+
} : undefined;
|
|
22936
23130
|
var uiProps = {
|
|
22937
23131
|
items: items,
|
|
22938
23132
|
itemComponent: itemComponent,
|
|
22939
23133
|
headerComponent: headerComponent,
|
|
22940
23134
|
emptyComponent: emptyComponent,
|
|
23135
|
+
layout: layout,
|
|
22941
23136
|
status: status,
|
|
22942
23137
|
sendEvent: function sendEvent() {}
|
|
22943
23138
|
};
|
|
22944
23139
|
return /*#__PURE__*/React__default.createElement(TrendingItemsUiComponent, _extends$1({}, props, uiProps));
|
|
22945
23140
|
}
|
|
22946
23141
|
|
|
22947
|
-
var _excluded$
|
|
23142
|
+
var _excluded$V = ["objectIDs", "limit", "threshold", "queryParameters", "fallbackParameters", "escapeHTML", "transformItems", "itemComponent", "headerComponent", "emptyComponent", "layoutComponent"];
|
|
22948
23143
|
var LookingSimilarUiComponent = createLookingSimilarComponent({
|
|
22949
23144
|
createElement: React.createElement,
|
|
22950
23145
|
Fragment: React.Fragment
|
|
@@ -22960,7 +23155,8 @@
|
|
|
22960
23155
|
itemComponent = _ref.itemComponent,
|
|
22961
23156
|
headerComponent = _ref.headerComponent,
|
|
22962
23157
|
emptyComponent = _ref.emptyComponent,
|
|
22963
|
-
|
|
23158
|
+
layoutComponent = _ref.layoutComponent,
|
|
23159
|
+
props = _objectWithoutProperties$c(_ref, _excluded$V);
|
|
22964
23160
|
var _useInstantSearch = useInstantSearch(),
|
|
22965
23161
|
status = _useInstantSearch.status;
|
|
22966
23162
|
var _useLookingSimilar = useLookingSimilar({
|
|
@@ -22975,18 +23171,42 @@
|
|
|
22975
23171
|
$$widgetType: 'ais.lookingSimilar'
|
|
22976
23172
|
}),
|
|
22977
23173
|
items = _useLookingSimilar.items;
|
|
23174
|
+
var layout = layoutComponent ? function (layoutProps) {
|
|
23175
|
+
return layoutComponent(_objectSpread2(_objectSpread2({}, layoutProps), {}, {
|
|
23176
|
+
classNames: {
|
|
23177
|
+
list: layoutProps.classNames.list,
|
|
23178
|
+
item: layoutProps.classNames.item
|
|
23179
|
+
}
|
|
23180
|
+
}));
|
|
23181
|
+
} : undefined;
|
|
22978
23182
|
var uiProps = {
|
|
22979
23183
|
items: items,
|
|
22980
23184
|
itemComponent: itemComponent,
|
|
22981
23185
|
headerComponent: headerComponent,
|
|
22982
23186
|
emptyComponent: emptyComponent,
|
|
23187
|
+
layout: layout,
|
|
22983
23188
|
status: status,
|
|
22984
23189
|
sendEvent: function sendEvent() {}
|
|
22985
23190
|
};
|
|
22986
23191
|
return /*#__PURE__*/React__default.createElement(LookingSimilarUiComponent, _extends$1({}, props, uiProps));
|
|
22987
23192
|
}
|
|
22988
23193
|
|
|
23194
|
+
var CarouselUiComponent = createCarouselComponent({
|
|
23195
|
+
createElement: React.createElement,
|
|
23196
|
+
Fragment: React.Fragment
|
|
23197
|
+
});
|
|
23198
|
+
function Carousel(props) {
|
|
23199
|
+
var carouselRefs = {
|
|
23200
|
+
listRef: React.useRef(null),
|
|
23201
|
+
nextButtonRef: React.useRef(null),
|
|
23202
|
+
previousButtonRef: React.useRef(null),
|
|
23203
|
+
carouselIdRef: React.useRef(generateCarouselId())
|
|
23204
|
+
};
|
|
23205
|
+
return /*#__PURE__*/React__default.createElement(CarouselUiComponent, _extends$1({}, carouselRefs, props));
|
|
23206
|
+
}
|
|
23207
|
+
|
|
22989
23208
|
exports.Breadcrumb = Breadcrumb$1;
|
|
23209
|
+
exports.Carousel = Carousel;
|
|
22990
23210
|
exports.ClearRefinements = ClearRefinements$1;
|
|
22991
23211
|
exports.Configure = Configure;
|
|
22992
23212
|
exports.CurrentRefinements = CurrentRefinements$1;
|