instantsearch.js 4.81.0 → 4.82.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/cjs/components/Answers/Answers.js +4 -4
- package/cjs/components/Breadcrumb/Breadcrumb.js +2 -2
- package/cjs/components/ClearRefinements/ClearRefinements.js +2 -2
- package/cjs/components/GeoSearchControls/GeoSearchControls.js +2 -2
- package/cjs/components/Highlight/Highlight.js +3 -3
- package/cjs/components/InfiniteHits/InfiniteHits.js +4 -4
- package/cjs/components/MenuSelect/MenuSelect.js +2 -2
- package/cjs/components/Pagination/Pagination.js +1 -1
- package/cjs/components/Panel/Panel.js +5 -5
- package/cjs/components/QueryRuleCustomData/QueryRuleCustomData.js +1 -1
- package/cjs/components/RangeInput/RangeInput.js +14 -14
- package/cjs/components/RefinementList/RefinementList.js +16 -16
- package/cjs/components/RefinementList/RefinementListItem.js +2 -2
- package/cjs/components/RelevantSort/RelevantSort.js +1 -1
- package/cjs/components/ReverseHighlight/ReverseHighlight.js +3 -3
- package/cjs/components/ReverseSnippet/ReverseSnippet.js +3 -3
- package/cjs/components/SearchBox/SearchBox.js +31 -19
- package/cjs/components/Slider/Pit.js +2 -2
- package/cjs/components/Slider/Rheostat.js +13 -13
- package/cjs/components/Slider/Slider.js +19 -19
- package/cjs/components/Snippet/Snippet.js +3 -3
- package/cjs/components/Stats/Stats.js +6 -6
- package/cjs/components/Template/Template.js +18 -18
- package/cjs/components/ToggleRefinement/ToggleRefinement.js +2 -2
- package/cjs/components/VoiceSearch/VoiceSearch.js +1 -1
- package/cjs/connectors/answers/connectAnswers.js +2 -2
- package/cjs/connectors/autocomplete/connectAutocomplete.js +2 -2
- package/cjs/connectors/breadcrumb/connectBreadcrumb.js +6 -6
- package/cjs/connectors/chat/connectChat.js +29 -8
- package/cjs/connectors/clear-refinements/connectClearRefinements.js +7 -7
- package/cjs/connectors/configure/connectConfigure.js +3 -3
- package/cjs/connectors/configure-related-items/connectConfigureRelatedItems.js +8 -8
- package/cjs/connectors/current-refinements/connectCurrentRefinements.js +7 -7
- package/cjs/connectors/dynamic-widgets/connectDynamicWidgets.js +2 -2
- package/cjs/connectors/frequently-bought-together/connectFrequentlyBoughtTogether.js +6 -3
- package/cjs/connectors/geo-search/connectGeoSearch.js +2 -2
- package/cjs/connectors/hierarchical-menu/connectHierarchicalMenu.js +28 -16
- package/cjs/connectors/hits/connectHits.js +2 -2
- package/cjs/connectors/hits/connectHitsWithInsights.js +1 -1
- package/cjs/connectors/hits-per-page/connectHitsPerPage.js +7 -7
- package/cjs/connectors/index.js +1 -1
- package/cjs/connectors/index.umd.js +1 -1
- package/cjs/connectors/infinite-hits/connectInfiniteHits.js +11 -11
- package/cjs/connectors/infinite-hits/connectInfiniteHitsWithInsights.js +1 -1
- package/cjs/connectors/looking-similar/connectLookingSimilar.js +3 -3
- package/cjs/connectors/menu/connectMenu.js +8 -8
- package/cjs/connectors/numeric-menu/connectNumericMenu.js +7 -7
- package/cjs/connectors/pagination/Paginator.js +5 -5
- package/cjs/connectors/pagination/connectPagination.js +3 -3
- package/cjs/connectors/powered-by/connectPoweredBy.js +2 -2
- package/cjs/connectors/query-rules/connectQueryRules.js +7 -7
- package/cjs/connectors/range/connectRange.js +22 -22
- package/cjs/connectors/rating-menu/connectRatingMenu.js +9 -9
- package/cjs/connectors/refinement-list/connectRefinementList.js +4 -4
- package/cjs/connectors/related-products/connectRelatedProducts.js +3 -3
- package/cjs/connectors/relevant-sort/connectRelevantSort.js +2 -2
- package/cjs/connectors/search-box/connectSearchBox.js +2 -2
- package/cjs/connectors/sort-by/connectSortBy.js +2 -2
- package/cjs/connectors/stats/connectStats.js +2 -2
- package/cjs/connectors/toggle-refinement/connectToggleRefinement.js +10 -10
- package/cjs/connectors/trending-items/connectTrendingItems.js +3 -3
- package/cjs/connectors/voice-search/connectVoiceSearch.js +3 -3
- package/cjs/helpers/components/Highlight.js +3 -3
- package/cjs/helpers/components/ReverseHighlight.js +5 -5
- package/cjs/helpers/components/ReverseSnippet.js +5 -5
- package/cjs/helpers/components/Snippet.js +3 -3
- package/cjs/helpers/index.js +2 -3
- package/cjs/index.js +2 -3
- package/cjs/lib/InstantSearch.js +13 -13
- package/cjs/lib/chat/chat.js +19 -19
- package/cjs/lib/createHelpers.js +2 -2
- package/cjs/lib/infiniteHitsCache/index.js +1 -1
- package/cjs/lib/infiniteHitsCache/sessionStorage.js +2 -2
- package/cjs/lib/insights/client.js +2 -2
- package/cjs/lib/insights/index.js +2 -3
- package/cjs/lib/routers/history.js +8 -8
- package/cjs/lib/routers/index.js +1 -1
- package/cjs/lib/server.js +2 -2
- package/cjs/lib/stateMappings/index.js +1 -1
- package/cjs/lib/stateMappings/simple.js +4 -4
- package/cjs/lib/stateMappings/singleIndex.js +4 -4
- package/cjs/lib/templating/prepareTemplateProps.js +7 -7
- package/cjs/lib/templating/renderTemplate.js +3 -3
- package/cjs/lib/utils/checkIndexUiState.js +14 -14
- package/cjs/lib/utils/createSendEventForFacet.js +6 -6
- package/cjs/lib/utils/createSendEventForHits.js +6 -6
- package/cjs/lib/utils/escape-highlight.js +4 -4
- package/cjs/lib/utils/geo-search.js +4 -4
- package/cjs/lib/utils/hits-absolute-position.js +2 -2
- package/cjs/lib/utils/hits-query-id.js +2 -2
- package/cjs/lib/utils/hydrateRecommendCache.js +2 -2
- package/cjs/lib/utils/hydrateSearchClient.js +6 -6
- package/cjs/lib/utils/mergeSearchParameters.js +4 -4
- package/cjs/lib/utils/range.js +5 -5
- package/cjs/lib/utils/reverseHighlightedParts.js +2 -2
- package/cjs/lib/version.js +1 -1
- package/cjs/lib/voiceSearchHelper/index.js +2 -2
- package/cjs/middlewares/createInsightsMiddleware.js +13 -13
- package/cjs/middlewares/createRouterMiddleware.js +3 -3
- package/cjs/templates/carousel/carousel.js +7 -7
- package/cjs/widgets/analytics/analytics.js +2 -2
- package/cjs/widgets/answers/answers.js +3 -3
- package/cjs/widgets/autocomplete/autocomplete.js +281 -0
- package/cjs/widgets/breadcrumb/breadcrumb.js +3 -3
- package/cjs/widgets/chat/chat.js +73 -76
- package/cjs/widgets/clear-refinements/clear-refinements.js +3 -3
- package/cjs/widgets/configure/configure.js +3 -3
- package/cjs/widgets/configure-related-items/configure-related-items.js +3 -3
- package/cjs/widgets/current-refinements/current-refinements.js +3 -3
- package/cjs/widgets/dynamic-widgets/dynamic-widgets.js +5 -5
- package/cjs/widgets/frequently-bought-together/frequently-bought-together.js +8 -6
- package/cjs/widgets/geo-search/GeoSearchRenderer.js +7 -7
- package/cjs/widgets/geo-search/createHTMLMarker.js +12 -12
- package/cjs/widgets/geo-search/geo-search.js +5 -5
- package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +3 -3
- package/cjs/widgets/hits/hits.js +7 -7
- package/cjs/widgets/hits-per-page/hits-per-page.js +3 -3
- package/cjs/widgets/index/index.js +12 -10
- package/cjs/widgets/index.js +10 -2
- package/cjs/widgets/index.umd.js +10 -2
- package/cjs/widgets/infinite-hits/infinite-hits.js +3 -3
- package/cjs/widgets/looking-similar/looking-similar.js +6 -6
- package/cjs/widgets/menu/menu.js +3 -3
- package/cjs/widgets/menu-select/menu-select.js +3 -3
- package/cjs/widgets/numeric-menu/numeric-menu.js +3 -3
- package/cjs/widgets/pagination/pagination.js +3 -3
- package/cjs/widgets/panel/panel.js +3 -3
- package/cjs/widgets/places/places.js +4 -4
- package/cjs/widgets/powered-by/powered-by.js +3 -3
- package/cjs/widgets/query-rule-context/query-rule-context.js +3 -3
- package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +3 -3
- package/cjs/widgets/range-input/range-input.js +7 -7
- package/cjs/widgets/range-slider/range-slider.js +7 -7
- package/cjs/widgets/rating-menu/rating-menu.js +3 -3
- package/cjs/widgets/refinement-list/refinement-list.js +3 -3
- package/cjs/widgets/related-products/related-products.js +6 -6
- package/cjs/widgets/relevant-sort/relevant-sort.js +3 -3
- package/cjs/widgets/search-box/search-box.js +3 -3
- package/cjs/widgets/sort-by/sort-by.js +3 -3
- package/cjs/widgets/stats/stats.js +3 -3
- package/cjs/widgets/toggle-refinement/toggle-refinement.js +3 -3
- package/cjs/widgets/trending-items/trending-items.js +6 -6
- package/cjs/widgets/voice-search/voice-search.js +3 -3
- package/dist/instantsearch.development.d.ts +90 -3
- package/dist/instantsearch.development.js +1338 -616
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +90 -3
- package/dist/instantsearch.production.min.d.ts +90 -3
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Answers/Answers.js +3 -3
- package/es/components/Breadcrumb/Breadcrumb.js +1 -1
- package/es/components/ClearRefinements/ClearRefinements.js +1 -1
- package/es/components/GeoSearchControls/GeoSearchControls.js +1 -1
- package/es/components/Highlight/Highlight.js +3 -3
- package/es/components/InfiniteHits/InfiniteHits.js +3 -3
- package/es/components/MenuSelect/MenuSelect.js +1 -1
- package/es/components/Panel/Panel.js +4 -4
- package/es/components/RangeInput/RangeInput.js +13 -13
- package/es/components/RefinementList/RefinementList.js +15 -15
- package/es/components/RefinementList/RefinementListItem.js +1 -1
- package/es/components/ReverseHighlight/ReverseHighlight.js +3 -3
- package/es/components/ReverseSnippet/ReverseSnippet.js +3 -3
- package/es/components/SearchBox/SearchBox.d.ts +4 -0
- package/es/components/SearchBox/SearchBox.js +30 -18
- package/es/components/Slider/Pit.js +2 -2
- package/es/components/Slider/Rheostat.js +13 -13
- package/es/components/Slider/Slider.js +18 -18
- package/es/components/Snippet/Snippet.js +3 -3
- package/es/components/Stats/Stats.js +5 -5
- package/es/components/Template/Template.js +18 -18
- package/es/components/ToggleRefinement/ToggleRefinement.js +1 -1
- package/es/connectors/answers/connectAnswers.js +2 -2
- package/es/connectors/autocomplete/connectAutocomplete.js +2 -2
- package/es/connectors/breadcrumb/connectBreadcrumb.js +6 -6
- package/es/connectors/chat/connectChat.d.ts +20 -0
- package/es/connectors/chat/connectChat.js +29 -8
- package/es/connectors/clear-refinements/connectClearRefinements.js +7 -7
- package/es/connectors/configure/connectConfigure.js +2 -2
- package/es/connectors/configure-related-items/connectConfigureRelatedItems.js +7 -7
- package/es/connectors/current-refinements/connectCurrentRefinements.js +7 -7
- package/es/connectors/dynamic-widgets/connectDynamicWidgets.js +2 -2
- package/es/connectors/frequently-bought-together/connectFrequentlyBoughtTogether.d.ts +4 -0
- package/es/connectors/frequently-bought-together/connectFrequentlyBoughtTogether.js +6 -3
- package/es/connectors/geo-search/connectGeoSearch.js +2 -2
- package/es/connectors/hierarchical-menu/connectHierarchicalMenu.js +28 -16
- package/es/connectors/hits/connectHits.js +2 -2
- package/es/connectors/hits-per-page/connectHitsPerPage.js +7 -7
- package/es/connectors/infinite-hits/connectInfiniteHits.js +11 -11
- package/es/connectors/looking-similar/connectLookingSimilar.js +3 -3
- package/es/connectors/menu/connectMenu.js +8 -8
- package/es/connectors/numeric-menu/connectNumericMenu.js +7 -7
- package/es/connectors/pagination/Paginator.js +5 -5
- package/es/connectors/pagination/connectPagination.js +2 -2
- package/es/connectors/powered-by/connectPoweredBy.js +2 -2
- package/es/connectors/query-rules/connectQueryRules.js +7 -7
- package/es/connectors/range/connectRange.js +22 -22
- package/es/connectors/rating-menu/connectRatingMenu.js +9 -9
- package/es/connectors/refinement-list/connectRefinementList.js +4 -4
- package/es/connectors/related-products/connectRelatedProducts.js +3 -3
- package/es/connectors/relevant-sort/connectRelevantSort.js +2 -2
- package/es/connectors/search-box/connectSearchBox.js +2 -2
- package/es/connectors/sort-by/connectSortBy.js +2 -2
- package/es/connectors/stats/connectStats.js +2 -2
- package/es/connectors/toggle-refinement/connectToggleRefinement.js +10 -10
- package/es/connectors/trending-items/connectTrendingItems.js +3 -3
- package/es/connectors/voice-search/connectVoiceSearch.js +2 -2
- package/es/helpers/components/Highlight.js +3 -3
- package/es/helpers/components/ReverseHighlight.js +5 -5
- package/es/helpers/components/ReverseSnippet.js +5 -5
- package/es/helpers/components/Snippet.js +3 -3
- package/es/lib/InstantSearch.d.ts +1 -1
- package/es/lib/InstantSearch.js +12 -12
- package/es/lib/chat/chat.js +19 -19
- package/es/lib/createHelpers.js +2 -2
- package/es/lib/infiniteHitsCache/sessionStorage.js +2 -2
- package/es/lib/insights/client.js +2 -2
- package/es/lib/routers/history.js +7 -7
- package/es/lib/server.js +2 -2
- package/es/lib/stateMappings/simple.js +4 -4
- package/es/lib/stateMappings/singleIndex.js +4 -4
- package/es/lib/templating/prepareTemplateProps.js +7 -7
- package/es/lib/templating/renderTemplate.js +2 -2
- package/es/lib/utils/checkIndexUiState.js +14 -14
- package/es/lib/utils/createSendEventForFacet.js +6 -6
- package/es/lib/utils/createSendEventForHits.js +6 -6
- package/es/lib/utils/escape-highlight.js +4 -4
- package/es/lib/utils/geo-search.js +4 -4
- package/es/lib/utils/hits-absolute-position.js +2 -2
- package/es/lib/utils/hits-query-id.js +2 -2
- package/es/lib/utils/hydrateRecommendCache.js +2 -2
- package/es/lib/utils/hydrateSearchClient.js +6 -6
- package/es/lib/utils/mergeSearchParameters.js +4 -4
- package/es/lib/utils/range.js +5 -5
- package/es/lib/utils/reverseHighlightedParts.js +2 -2
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/lib/voiceSearchHelper/index.js +2 -2
- package/es/middlewares/createInsightsMiddleware.js +13 -13
- package/es/middlewares/createRouterMiddleware.js +2 -2
- package/es/templates/carousel/carousel.js +7 -7
- package/es/types/widget.d.ts +8 -1
- package/es/widgets/analytics/analytics.js +2 -2
- package/es/widgets/answers/answers.js +2 -2
- package/es/widgets/autocomplete/autocomplete.d.ts +57 -0
- package/es/widgets/autocomplete/autocomplete.js +274 -0
- package/es/widgets/breadcrumb/breadcrumb.js +2 -2
- package/es/widgets/chat/chat.d.ts +4 -0
- package/es/widgets/chat/chat.js +72 -75
- package/es/widgets/clear-refinements/clear-refinements.js +2 -2
- package/es/widgets/configure/configure.js +2 -2
- package/es/widgets/configure-related-items/configure-related-items.js +2 -2
- package/es/widgets/current-refinements/current-refinements.js +2 -2
- package/es/widgets/dynamic-widgets/dynamic-widgets.js +4 -4
- package/es/widgets/frequently-bought-together/frequently-bought-together.js +7 -5
- package/es/widgets/geo-search/GeoSearchRenderer.js +6 -6
- package/es/widgets/geo-search/createHTMLMarker.js +12 -12
- package/es/widgets/geo-search/geo-search.js +4 -4
- package/es/widgets/hierarchical-menu/hierarchical-menu.js +2 -2
- package/es/widgets/hits/hits.js +6 -6
- package/es/widgets/hits-per-page/hits-per-page.js +2 -2
- package/es/widgets/index/index.d.ts +1 -1
- package/es/widgets/index/index.js +11 -9
- package/es/widgets/index.d.ts +1 -0
- package/es/widgets/index.js +1 -0
- package/es/widgets/index.umd.d.ts +1 -0
- package/es/widgets/index.umd.js +1 -0
- package/es/widgets/infinite-hits/infinite-hits.js +2 -2
- package/es/widgets/looking-similar/looking-similar.js +5 -5
- package/es/widgets/menu/menu.js +2 -2
- package/es/widgets/menu-select/menu-select.js +2 -2
- package/es/widgets/numeric-menu/numeric-menu.js +2 -2
- package/es/widgets/pagination/pagination.js +2 -2
- package/es/widgets/panel/panel.js +2 -2
- package/es/widgets/places/places.js +4 -4
- package/es/widgets/powered-by/powered-by.js +2 -2
- package/es/widgets/query-rule-context/query-rule-context.js +2 -2
- package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +2 -2
- package/es/widgets/range-input/range-input.js +6 -6
- package/es/widgets/range-slider/range-slider.js +6 -6
- package/es/widgets/rating-menu/rating-menu.js +2 -2
- package/es/widgets/refinement-list/refinement-list.js +2 -2
- package/es/widgets/related-products/related-products.js +5 -5
- package/es/widgets/relevant-sort/relevant-sort.js +2 -2
- package/es/widgets/search-box/search-box.js +2 -2
- package/es/widgets/sort-by/sort-by.js +2 -2
- package/es/widgets/stats/stats.js +2 -2
- package/es/widgets/toggle-refinement/toggle-refinement.js +2 -2
- package/es/widgets/trending-items/trending-items.js +5 -5
- package/es/widgets/voice-search/voice-search.js +2 -2
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! InstantSearch.js 4.
|
|
1
|
+
/*! InstantSearch.js 4.82.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -17,6 +17,140 @@
|
|
|
17
17
|
return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
function _arrayLikeToArray(r, a) {
|
|
21
|
+
(null == a || a > r.length) && (a = r.length);
|
|
22
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
23
|
+
return n;
|
|
24
|
+
}
|
|
25
|
+
function _arrayWithHoles(r) {
|
|
26
|
+
if (Array.isArray(r)) return r;
|
|
27
|
+
}
|
|
28
|
+
function _arrayWithoutHoles(r) {
|
|
29
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
30
|
+
}
|
|
31
|
+
function _assertThisInitialized(e) {
|
|
32
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
33
|
+
return e;
|
|
34
|
+
}
|
|
35
|
+
function _classCallCheck(a, n) {
|
|
36
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
37
|
+
}
|
|
38
|
+
function _defineProperties(e, r) {
|
|
39
|
+
for (var t = 0; t < r.length; t++) {
|
|
40
|
+
var o = r[t];
|
|
41
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function _createClass(e, r, t) {
|
|
45
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
46
|
+
writable: !1
|
|
47
|
+
}), e;
|
|
48
|
+
}
|
|
49
|
+
function _createForOfIteratorHelper(r, e) {
|
|
50
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
51
|
+
if (!t) {
|
|
52
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
53
|
+
t && (r = t);
|
|
54
|
+
var n = 0,
|
|
55
|
+
F = function () {};
|
|
56
|
+
return {
|
|
57
|
+
s: F,
|
|
58
|
+
n: function () {
|
|
59
|
+
return n >= r.length ? {
|
|
60
|
+
done: !0
|
|
61
|
+
} : {
|
|
62
|
+
done: !1,
|
|
63
|
+
value: r[n++]
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
e: function (r) {
|
|
67
|
+
throw r;
|
|
68
|
+
},
|
|
69
|
+
f: F
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
73
|
+
}
|
|
74
|
+
var o,
|
|
75
|
+
a = !0,
|
|
76
|
+
u = !1;
|
|
77
|
+
return {
|
|
78
|
+
s: function () {
|
|
79
|
+
t = t.call(r);
|
|
80
|
+
},
|
|
81
|
+
n: function () {
|
|
82
|
+
var r = t.next();
|
|
83
|
+
return a = r.done, r;
|
|
84
|
+
},
|
|
85
|
+
e: function (r) {
|
|
86
|
+
u = !0, o = r;
|
|
87
|
+
},
|
|
88
|
+
f: function () {
|
|
89
|
+
try {
|
|
90
|
+
a || null == t.return || t.return();
|
|
91
|
+
} finally {
|
|
92
|
+
if (u) throw o;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function _createSuper(t) {
|
|
98
|
+
var r = _isNativeReflectConstruct();
|
|
99
|
+
return function () {
|
|
100
|
+
var e,
|
|
101
|
+
o = _getPrototypeOf(t);
|
|
102
|
+
if (r) {
|
|
103
|
+
var s = _getPrototypeOf(this).constructor;
|
|
104
|
+
e = Reflect.construct(o, arguments, s);
|
|
105
|
+
} else e = o.apply(this, arguments);
|
|
106
|
+
return _possibleConstructorReturn(this, e);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function _defineProperty(e, r, t) {
|
|
110
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
111
|
+
value: t,
|
|
112
|
+
enumerable: !0,
|
|
113
|
+
configurable: !0,
|
|
114
|
+
writable: !0
|
|
115
|
+
}) : e[r] = t, e;
|
|
116
|
+
}
|
|
117
|
+
function _extends() {
|
|
118
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
119
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
120
|
+
var t = arguments[e];
|
|
121
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
122
|
+
}
|
|
123
|
+
return n;
|
|
124
|
+
}, _extends.apply(null, arguments);
|
|
125
|
+
}
|
|
126
|
+
function _getPrototypeOf(t) {
|
|
127
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
128
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
129
|
+
}, _getPrototypeOf(t);
|
|
130
|
+
}
|
|
131
|
+
function _inherits(t, e) {
|
|
132
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
133
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
134
|
+
constructor: {
|
|
135
|
+
value: t,
|
|
136
|
+
writable: !0,
|
|
137
|
+
configurable: !0
|
|
138
|
+
}
|
|
139
|
+
}), Object.defineProperty(t, "prototype", {
|
|
140
|
+
writable: !1
|
|
141
|
+
}), e && _setPrototypeOf(t, e);
|
|
142
|
+
}
|
|
143
|
+
function _isNativeReflectConstruct() {
|
|
144
|
+
try {
|
|
145
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
146
|
+
} catch (t) {}
|
|
147
|
+
return (_isNativeReflectConstruct = function () {
|
|
148
|
+
return !!t;
|
|
149
|
+
})();
|
|
150
|
+
}
|
|
151
|
+
function _iterableToArray(r) {
|
|
152
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
153
|
+
}
|
|
20
154
|
function _iterableToArrayLimit(r, l) {
|
|
21
155
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
22
156
|
if (null != t) {
|
|
@@ -44,6 +178,15 @@
|
|
|
44
178
|
return a;
|
|
45
179
|
}
|
|
46
180
|
}
|
|
181
|
+
function _nonIterableRest() {
|
|
182
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
183
|
+
}
|
|
184
|
+
function _nonIterableSpread() {
|
|
185
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
186
|
+
}
|
|
187
|
+
function _objectDestructuringEmpty(t) {
|
|
188
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
189
|
+
}
|
|
47
190
|
function ownKeys(e, r) {
|
|
48
191
|
var t = Object.keys(e);
|
|
49
192
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -65,6 +208,42 @@
|
|
|
65
208
|
}
|
|
66
209
|
return e;
|
|
67
210
|
}
|
|
211
|
+
function _objectWithoutProperties(e, t) {
|
|
212
|
+
if (null == e) return {};
|
|
213
|
+
var o,
|
|
214
|
+
r,
|
|
215
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
216
|
+
if (Object.getOwnPropertySymbols) {
|
|
217
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
218
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
219
|
+
}
|
|
220
|
+
return i;
|
|
221
|
+
}
|
|
222
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
223
|
+
if (null == r) return {};
|
|
224
|
+
var t = {};
|
|
225
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
226
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
227
|
+
t[n] = r[n];
|
|
228
|
+
}
|
|
229
|
+
return t;
|
|
230
|
+
}
|
|
231
|
+
function _possibleConstructorReturn(t, e) {
|
|
232
|
+
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
233
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
234
|
+
return _assertThisInitialized(t);
|
|
235
|
+
}
|
|
236
|
+
function _setPrototypeOf(t, e) {
|
|
237
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
238
|
+
return t.__proto__ = e, t;
|
|
239
|
+
}, _setPrototypeOf(t, e);
|
|
240
|
+
}
|
|
241
|
+
function _slicedToArray(r, e) {
|
|
242
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
243
|
+
}
|
|
244
|
+
function _toConsumableArray(r) {
|
|
245
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
246
|
+
}
|
|
68
247
|
function _toPrimitive(t, r) {
|
|
69
248
|
if ("object" != typeof t || !t) return t;
|
|
70
249
|
var e = t[Symbol.toPrimitive];
|
|
@@ -77,7 +256,7 @@
|
|
|
77
256
|
}
|
|
78
257
|
function _toPropertyKey(t) {
|
|
79
258
|
var i = _toPrimitive(t, "string");
|
|
80
|
-
return "symbol" == typeof i ? i :
|
|
259
|
+
return "symbol" == typeof i ? i : i + "";
|
|
81
260
|
}
|
|
82
261
|
function _typeof(o) {
|
|
83
262
|
"@babel/helpers - typeof";
|
|
@@ -88,238 +267,12 @@
|
|
|
88
267
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
89
268
|
}, _typeof(o);
|
|
90
269
|
}
|
|
91
|
-
function
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
function _defineProperties(target, props) {
|
|
97
|
-
for (var i = 0; i < props.length; i++) {
|
|
98
|
-
var descriptor = props[i];
|
|
99
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
100
|
-
descriptor.configurable = true;
|
|
101
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
102
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
106
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
107
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
108
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
109
|
-
writable: false
|
|
110
|
-
});
|
|
111
|
-
return Constructor;
|
|
112
|
-
}
|
|
113
|
-
function _defineProperty(obj, key, value) {
|
|
114
|
-
key = _toPropertyKey(key);
|
|
115
|
-
if (key in obj) {
|
|
116
|
-
Object.defineProperty(obj, key, {
|
|
117
|
-
value: value,
|
|
118
|
-
enumerable: true,
|
|
119
|
-
configurable: true,
|
|
120
|
-
writable: true
|
|
121
|
-
});
|
|
122
|
-
} else {
|
|
123
|
-
obj[key] = value;
|
|
124
|
-
}
|
|
125
|
-
return obj;
|
|
126
|
-
}
|
|
127
|
-
function _extends() {
|
|
128
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
129
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
130
|
-
var source = arguments[i];
|
|
131
|
-
for (var key in source) {
|
|
132
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
133
|
-
target[key] = source[key];
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return target;
|
|
138
|
-
};
|
|
139
|
-
return _extends.apply(this, arguments);
|
|
140
|
-
}
|
|
141
|
-
function _inherits(subClass, superClass) {
|
|
142
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
143
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
144
|
-
}
|
|
145
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
146
|
-
constructor: {
|
|
147
|
-
value: subClass,
|
|
148
|
-
writable: true,
|
|
149
|
-
configurable: true
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
Object.defineProperty(subClass, "prototype", {
|
|
153
|
-
writable: false
|
|
154
|
-
});
|
|
155
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
156
|
-
}
|
|
157
|
-
function _getPrototypeOf(o) {
|
|
158
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
159
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
160
|
-
};
|
|
161
|
-
return _getPrototypeOf(o);
|
|
162
|
-
}
|
|
163
|
-
function _setPrototypeOf(o, p) {
|
|
164
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
165
|
-
o.__proto__ = p;
|
|
166
|
-
return o;
|
|
167
|
-
};
|
|
168
|
-
return _setPrototypeOf(o, p);
|
|
169
|
-
}
|
|
170
|
-
function _isNativeReflectConstruct() {
|
|
171
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
172
|
-
if (Reflect.construct.sham) return false;
|
|
173
|
-
if (typeof Proxy === "function") return true;
|
|
174
|
-
try {
|
|
175
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
176
|
-
return true;
|
|
177
|
-
} catch (e) {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
function _objectDestructuringEmpty(obj) {
|
|
182
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
183
|
-
}
|
|
184
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
185
|
-
if (source == null) return {};
|
|
186
|
-
var target = {};
|
|
187
|
-
var sourceKeys = Object.keys(source);
|
|
188
|
-
var key, i;
|
|
189
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
190
|
-
key = sourceKeys[i];
|
|
191
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
192
|
-
target[key] = source[key];
|
|
193
|
-
}
|
|
194
|
-
return target;
|
|
195
|
-
}
|
|
196
|
-
function _objectWithoutProperties(source, excluded) {
|
|
197
|
-
if (source == null) return {};
|
|
198
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
199
|
-
var key, i;
|
|
200
|
-
if (Object.getOwnPropertySymbols) {
|
|
201
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
202
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
203
|
-
key = sourceSymbolKeys[i];
|
|
204
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
205
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
206
|
-
target[key] = source[key];
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
return target;
|
|
210
|
-
}
|
|
211
|
-
function _assertThisInitialized(self) {
|
|
212
|
-
if (self === void 0) {
|
|
213
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
214
|
-
}
|
|
215
|
-
return self;
|
|
216
|
-
}
|
|
217
|
-
function _possibleConstructorReturn(self, call) {
|
|
218
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
219
|
-
return call;
|
|
220
|
-
} else if (call !== void 0) {
|
|
221
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
222
|
-
}
|
|
223
|
-
return _assertThisInitialized(self);
|
|
224
|
-
}
|
|
225
|
-
function _createSuper(Derived) {
|
|
226
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
227
|
-
return function _createSuperInternal() {
|
|
228
|
-
var Super = _getPrototypeOf(Derived),
|
|
229
|
-
result;
|
|
230
|
-
if (hasNativeReflectConstruct) {
|
|
231
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
232
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
233
|
-
} else {
|
|
234
|
-
result = Super.apply(this, arguments);
|
|
235
|
-
}
|
|
236
|
-
return _possibleConstructorReturn(this, result);
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
function _slicedToArray(arr, i) {
|
|
240
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
241
|
-
}
|
|
242
|
-
function _toConsumableArray(arr) {
|
|
243
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
244
|
-
}
|
|
245
|
-
function _arrayWithoutHoles(arr) {
|
|
246
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
247
|
-
}
|
|
248
|
-
function _arrayWithHoles(arr) {
|
|
249
|
-
if (Array.isArray(arr)) return arr;
|
|
250
|
-
}
|
|
251
|
-
function _iterableToArray(iter) {
|
|
252
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
253
|
-
}
|
|
254
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
255
|
-
if (!o) return;
|
|
256
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
257
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
258
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
259
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
260
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
261
|
-
}
|
|
262
|
-
function _arrayLikeToArray(arr, len) {
|
|
263
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
264
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
265
|
-
return arr2;
|
|
266
|
-
}
|
|
267
|
-
function _nonIterableSpread() {
|
|
268
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
269
|
-
}
|
|
270
|
-
function _nonIterableRest() {
|
|
271
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
272
|
-
}
|
|
273
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
274
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
275
|
-
if (!it) {
|
|
276
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
277
|
-
if (it) o = it;
|
|
278
|
-
var i = 0;
|
|
279
|
-
var F = function () {};
|
|
280
|
-
return {
|
|
281
|
-
s: F,
|
|
282
|
-
n: function () {
|
|
283
|
-
if (i >= o.length) return {
|
|
284
|
-
done: true
|
|
285
|
-
};
|
|
286
|
-
return {
|
|
287
|
-
done: false,
|
|
288
|
-
value: o[i++]
|
|
289
|
-
};
|
|
290
|
-
},
|
|
291
|
-
e: function (e) {
|
|
292
|
-
throw e;
|
|
293
|
-
},
|
|
294
|
-
f: F
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
270
|
+
function _unsupportedIterableToArray(r, a) {
|
|
271
|
+
if (r) {
|
|
272
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
273
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
274
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
298
275
|
}
|
|
299
|
-
var normalCompletion = true,
|
|
300
|
-
didErr = false,
|
|
301
|
-
err;
|
|
302
|
-
return {
|
|
303
|
-
s: function () {
|
|
304
|
-
it = it.call(o);
|
|
305
|
-
},
|
|
306
|
-
n: function () {
|
|
307
|
-
var step = it.next();
|
|
308
|
-
normalCompletion = step.done;
|
|
309
|
-
return step;
|
|
310
|
-
},
|
|
311
|
-
e: function (e) {
|
|
312
|
-
didErr = true;
|
|
313
|
-
err = e;
|
|
314
|
-
},
|
|
315
|
-
f: function () {
|
|
316
|
-
try {
|
|
317
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
318
|
-
} finally {
|
|
319
|
-
if (didErr) throw err;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
276
|
}
|
|
324
277
|
|
|
325
278
|
function noop() {}
|
|
@@ -495,14 +448,14 @@
|
|
|
495
448
|
var connectorName = connectors[0];
|
|
496
449
|
return "const virtual".concat(capitalizedWidget, " = ").concat(connectorName, "(() => null);");
|
|
497
450
|
}).join('\n'), "\n\nsearch.addWidgets([\n ").concat(missingWidgets.filter(function (_ref9) {
|
|
498
|
-
var
|
|
499
|
-
_stateParameter =
|
|
500
|
-
connectors =
|
|
451
|
+
var _ref0 = _slicedToArray(_ref9, 2),
|
|
452
|
+
_stateParameter = _ref0[0],
|
|
453
|
+
connectors = _ref0[1].connectors;
|
|
501
454
|
return connectors.length > 0;
|
|
502
|
-
}).map(function (
|
|
503
|
-
var
|
|
504
|
-
_stateParameter =
|
|
505
|
-
widgets =
|
|
455
|
+
}).map(function (_ref1) {
|
|
456
|
+
var _ref10 = _slicedToArray(_ref1, 2),
|
|
457
|
+
_stateParameter = _ref10[0],
|
|
458
|
+
widgets = _ref10[1].widgets;
|
|
506
459
|
var capitalizedWidget = capitalize(widgets[0]);
|
|
507
460
|
return "virtual".concat(capitalizedWidget, "({ /* ... */ })");
|
|
508
461
|
}).join(',\n '), "\n]);\n```\n\nIf you're using custom widgets that do set these query parameters, we recommend using connectors instead.\n\nSee https://www.algolia.com/doc/guides/building-search-ui/widgets/customize-an-existing-widget/js/#customize-the-complete-ui-of-the-widgets")) ;
|
|
@@ -9557,6 +9510,21 @@
|
|
|
9557
9510
|
return item;
|
|
9558
9511
|
});
|
|
9559
9512
|
}
|
|
9513
|
+
function _hasMoreItems(facetValues, maxValuesPerFacet) {
|
|
9514
|
+
var currentLimit = getLimit();
|
|
9515
|
+
return (
|
|
9516
|
+
// Check if we have exhaustive items at this level
|
|
9517
|
+
// If the limit is the max number of facet retrieved it is impossible to know
|
|
9518
|
+
// if the facets are exhaustive. The only moment we are sure it is exhaustive
|
|
9519
|
+
// is when it is strictly under the number requested unless we know that another
|
|
9520
|
+
// widget has requested more values (maxValuesPerFacet > getLimit()).
|
|
9521
|
+
!(maxValuesPerFacet > currentLimit ? facetValues.length <= currentLimit : facetValues.length < currentLimit) ||
|
|
9522
|
+
// Check if any of the children are not exhaustive.
|
|
9523
|
+
facetValues.slice(0, limit).some(function (item) {
|
|
9524
|
+
return Array.isArray(item.data) && item.data.length > 0 && _hasMoreItems(item.data, maxValuesPerFacet);
|
|
9525
|
+
})
|
|
9526
|
+
);
|
|
9527
|
+
}
|
|
9560
9528
|
return {
|
|
9561
9529
|
$$type: 'ais.hierarchicalMenu',
|
|
9562
9530
|
init: function init(initOptions) {
|
|
@@ -9625,14 +9593,11 @@
|
|
|
9625
9593
|
});
|
|
9626
9594
|
var facetItems = facetValues && !Array.isArray(facetValues) && facetValues.data ? facetValues.data : [];
|
|
9627
9595
|
|
|
9628
|
-
//
|
|
9629
|
-
//
|
|
9630
|
-
//
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
// to be conservative here.
|
|
9634
|
-
var hasExhaustiveItems = (state.maxValuesPerFacet || 0) > getLimit() ? facetItems.length <= getLimit() : facetItems.length < getLimit();
|
|
9635
|
-
canToggleShowMore = showMore && (isShowingMore || !hasExhaustiveItems);
|
|
9596
|
+
// Check if there are more items to show at any level
|
|
9597
|
+
// This checks both the exhaustiveness of items retrieved from the API
|
|
9598
|
+
// and whether there are hidden items at any visible child level
|
|
9599
|
+
var hasMoreItems = _hasMoreItems(facetItems, state.maxValuesPerFacet || 0);
|
|
9600
|
+
canToggleShowMore = showMore && (isShowingMore || hasMoreItems);
|
|
9636
9601
|
items = transformItems(_prepareFacetValues(facetItems), {
|
|
9637
9602
|
results: results
|
|
9638
9603
|
});
|
|
@@ -10398,8 +10363,8 @@
|
|
|
10398
10363
|
page: page + 1
|
|
10399
10364
|
});
|
|
10400
10365
|
},
|
|
10401
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
10402
|
-
var uiState =
|
|
10366
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref0) {
|
|
10367
|
+
var uiState = _ref0.uiState;
|
|
10403
10368
|
var widgetSearchParameters = searchParameters;
|
|
10404
10369
|
if (escapeHTML) {
|
|
10405
10370
|
// @MAJOR: set this globally, not in the InfiniteHits widget to allow InfiniteHits to be conditionally used
|
|
@@ -11206,18 +11171,18 @@
|
|
|
11206
11171
|
_ref8 = _slicedToArray(_ref7, 1),
|
|
11207
11172
|
minValue = _ref8[0];
|
|
11208
11173
|
var _ref9 = helper.getNumericRefinement(attribute, '<=') || [],
|
|
11209
|
-
|
|
11210
|
-
maxValue =
|
|
11174
|
+
_ref0 = _slicedToArray(_ref9, 1),
|
|
11175
|
+
maxValue = _ref0[0];
|
|
11211
11176
|
var min = isFiniteNumber(minValue) ? minValue : -Infinity;
|
|
11212
11177
|
var max = isFiniteNumber(maxValue) ? maxValue : Infinity;
|
|
11213
11178
|
return [min, max];
|
|
11214
11179
|
}
|
|
11215
11180
|
function _refine(helper, currentRange) {
|
|
11216
11181
|
return function () {
|
|
11217
|
-
var
|
|
11218
|
-
|
|
11219
|
-
nextMin =
|
|
11220
|
-
nextMax =
|
|
11182
|
+
var _ref1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [undefined, undefined],
|
|
11183
|
+
_ref10 = _slicedToArray(_ref1, 2),
|
|
11184
|
+
nextMin = _ref10[0],
|
|
11185
|
+
nextMax = _ref10[1];
|
|
11221
11186
|
var refinedState = getRefinedState(helper, currentRange, nextMin, nextMax);
|
|
11222
11187
|
if (refinedState) {
|
|
11223
11188
|
helper.setState(refinedState).search();
|
|
@@ -11241,10 +11206,10 @@
|
|
|
11241
11206
|
range: _objectSpread2(_objectSpread2({}, renderState.range), {}, _defineProperty({}, attribute, this.getWidgetRenderState(renderOptions)))
|
|
11242
11207
|
});
|
|
11243
11208
|
},
|
|
11244
|
-
getWidgetRenderState: function getWidgetRenderState(
|
|
11245
|
-
var results =
|
|
11246
|
-
helper =
|
|
11247
|
-
instantSearchInstance =
|
|
11209
|
+
getWidgetRenderState: function getWidgetRenderState(_ref11) {
|
|
11210
|
+
var results = _ref11.results,
|
|
11211
|
+
helper = _ref11.helper,
|
|
11212
|
+
instantSearchInstance = _ref11.instantSearchInstance;
|
|
11248
11213
|
var facetsFromResults = results && results.disjunctiveFacets || [];
|
|
11249
11214
|
var facet = find(facetsFromResults, function (facetResult) {
|
|
11250
11215
|
return facetResult.name === attribute;
|
|
@@ -11279,13 +11244,13 @@
|
|
|
11279
11244
|
start: start
|
|
11280
11245
|
};
|
|
11281
11246
|
},
|
|
11282
|
-
dispose: function dispose(
|
|
11283
|
-
var state =
|
|
11247
|
+
dispose: function dispose(_ref12) {
|
|
11248
|
+
var state = _ref12.state;
|
|
11284
11249
|
unmountFn();
|
|
11285
11250
|
return state.removeDisjunctiveFacet(attribute).removeNumericRefinement(attribute);
|
|
11286
11251
|
},
|
|
11287
|
-
getWidgetUiState: function getWidgetUiState(uiState,
|
|
11288
|
-
var searchParameters =
|
|
11252
|
+
getWidgetUiState: function getWidgetUiState(uiState, _ref13) {
|
|
11253
|
+
var searchParameters = _ref13.searchParameters;
|
|
11289
11254
|
var _searchParameters$get = searchParameters.getNumericRefinements(attribute),
|
|
11290
11255
|
_searchParameters$get2 = _searchParameters$get['>='],
|
|
11291
11256
|
min = _searchParameters$get2 === void 0 ? [] : _searchParameters$get2,
|
|
@@ -11298,8 +11263,8 @@
|
|
|
11298
11263
|
range: _objectSpread2(_objectSpread2({}, uiState.range), {}, _defineProperty({}, attribute, "".concat(min, ":").concat(max)))
|
|
11299
11264
|
});
|
|
11300
11265
|
},
|
|
11301
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
11302
|
-
var uiState =
|
|
11266
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref14) {
|
|
11267
|
+
var uiState = _ref14.uiState;
|
|
11303
11268
|
var widgetSearchParameters = searchParameters.addDisjunctiveFacet(attribute).setQueryParameters({
|
|
11304
11269
|
numericRefinements: _objectSpread2(_objectSpread2({}, searchParameters.numericRefinements), {}, _defineProperty({}, attribute, {}))
|
|
11305
11270
|
});
|
|
@@ -11696,7 +11661,7 @@
|
|
|
11696
11661
|
objectID: objectID,
|
|
11697
11662
|
maxRecommendations: limit,
|
|
11698
11663
|
threshold: threshold,
|
|
11699
|
-
fallbackParameters: _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
11664
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
11700
11665
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
11701
11666
|
$$id: _this.$$id
|
|
11702
11667
|
});
|
|
@@ -12485,8 +12450,8 @@
|
|
|
12485
12450
|
widgetParams: widgetParams
|
|
12486
12451
|
};
|
|
12487
12452
|
},
|
|
12488
|
-
getWidgetUiState: function getWidgetUiState(uiState,
|
|
12489
|
-
var searchParameters =
|
|
12453
|
+
getWidgetUiState: function getWidgetUiState(uiState, _ref0) {
|
|
12454
|
+
var searchParameters = _ref0.searchParameters;
|
|
12490
12455
|
var isRefined = on && on.every(function (v) {
|
|
12491
12456
|
return searchParameters.isDisjunctiveFacetRefined(attribute, v);
|
|
12492
12457
|
});
|
|
@@ -12500,8 +12465,8 @@
|
|
|
12500
12465
|
toggle: _objectSpread2(_objectSpread2({}, uiState.toggle), {}, _defineProperty({}, attribute, isRefined))
|
|
12501
12466
|
});
|
|
12502
12467
|
},
|
|
12503
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
12504
|
-
var uiState =
|
|
12468
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref1) {
|
|
12469
|
+
var uiState = _ref1.uiState;
|
|
12505
12470
|
if (searchParameters.isHierarchicalFacet(attribute) || searchParameters.isConjunctiveFacet(attribute)) {
|
|
12506
12471
|
_warning(false, "ToggleRefinement: Attribute \"".concat(attribute, "\" is already used by another widget of a different type.\nAs this is not supported, please make sure to remove this other widget or this ToggleRefinement widget will not work at all.")) ;
|
|
12507
12472
|
return searchParameters;
|
|
@@ -12621,7 +12586,7 @@
|
|
|
12621
12586
|
facetValue: facetValue,
|
|
12622
12587
|
maxRecommendations: limit,
|
|
12623
12588
|
threshold: threshold,
|
|
12624
|
-
fallbackParameters: _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
12589
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
12625
12590
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
12626
12591
|
$$id: this.$$id
|
|
12627
12592
|
});
|
|
@@ -13649,6 +13614,7 @@
|
|
|
13649
13614
|
objectIDs = _ref.objectIDs,
|
|
13650
13615
|
limit = _ref.limit,
|
|
13651
13616
|
threshold = _ref.threshold,
|
|
13617
|
+
fallbackParameters = _ref.fallbackParameters,
|
|
13652
13618
|
queryParameters = _ref.queryParameters;
|
|
13653
13619
|
if (!objectIDs || objectIDs.length === 0) {
|
|
13654
13620
|
throw new Error(withUsage$s('The `objectIDs` option is required.'));
|
|
@@ -13713,8 +13679,10 @@
|
|
|
13713
13679
|
return objectIDs.reduce(function (acc, objectID) {
|
|
13714
13680
|
return acc.addFrequentlyBoughtTogether({
|
|
13715
13681
|
objectID: objectID,
|
|
13716
|
-
threshold: threshold,
|
|
13717
13682
|
maxRecommendations: limit,
|
|
13683
|
+
threshold: threshold,
|
|
13684
|
+
// @ts-expect-error until @algolia/recommend types are updated
|
|
13685
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
13718
13686
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
13719
13687
|
$$id: _this.$$id
|
|
13720
13688
|
});
|
|
@@ -13809,7 +13777,7 @@
|
|
|
13809
13777
|
objectID: objectID,
|
|
13810
13778
|
maxRecommendations: limit,
|
|
13811
13779
|
threshold: threshold,
|
|
13812
|
-
fallbackParameters: _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
13780
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
13813
13781
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
13814
13782
|
$$id: _this.$$id
|
|
13815
13783
|
});
|
|
@@ -14228,8 +14196,8 @@
|
|
|
14228
14196
|
if (Array.isArray(queueAtStart)) {
|
|
14229
14197
|
var _map3 = ['setUserToken', 'init'].map(function (key) {
|
|
14230
14198
|
var _ref7 = find(queueAtStart.slice().reverse(), function (_ref9) {
|
|
14231
|
-
var
|
|
14232
|
-
method =
|
|
14199
|
+
var _ref0 = _slicedToArray(_ref9, 1),
|
|
14200
|
+
method = _ref0[0];
|
|
14233
14201
|
return method === key;
|
|
14234
14202
|
}) || [],
|
|
14235
14203
|
_ref8 = _slicedToArray(_ref7, 2),
|
|
@@ -14349,8 +14317,8 @@
|
|
|
14349
14317
|
}
|
|
14350
14318
|
var viewedObjectIDs = new Set();
|
|
14351
14319
|
var lastQueryId;
|
|
14352
|
-
instantSearchInstance.mainHelper.derivedHelpers[0].on('result', function (
|
|
14353
|
-
var results =
|
|
14320
|
+
instantSearchInstance.mainHelper.derivedHelpers[0].on('result', function (_ref1) {
|
|
14321
|
+
var results = _ref1.results;
|
|
14354
14322
|
if (results && (!results.queryID || results.queryID !== lastQueryId)) {
|
|
14355
14323
|
lastQueryId = results.queryID;
|
|
14356
14324
|
viewedObjectIDs.clear();
|
|
@@ -15651,8 +15619,8 @@
|
|
|
15651
15619
|
windowTitle = _ref7.windowTitle,
|
|
15652
15620
|
_ref7$getLocation = _ref7.getLocation,
|
|
15653
15621
|
getLocation = _ref7$getLocation === void 0 ? function () {
|
|
15654
|
-
return safelyRunOnBrowser(function (
|
|
15655
|
-
var window =
|
|
15622
|
+
return safelyRunOnBrowser(function (_ref0) {
|
|
15623
|
+
var window = _ref0.window;
|
|
15656
15624
|
return window.location;
|
|
15657
15625
|
}, {
|
|
15658
15626
|
fallback: function fallback() {
|
|
@@ -15965,6 +15933,7 @@
|
|
|
15965
15933
|
throw new Error(withUsage$u('The widget definition expects a `render` and/or an `init` method.'));
|
|
15966
15934
|
}
|
|
15967
15935
|
flatWidgets.forEach(function (widget) {
|
|
15936
|
+
widget.parent = _this;
|
|
15968
15937
|
if (isIndexWidget(widget)) {
|
|
15969
15938
|
return;
|
|
15970
15939
|
}
|
|
@@ -16037,6 +16006,7 @@
|
|
|
16037
16006
|
return flatWidgets.indexOf(widget) === -1;
|
|
16038
16007
|
});
|
|
16039
16008
|
localWidgets.forEach(function (widget) {
|
|
16009
|
+
widget.parent = undefined;
|
|
16040
16010
|
if (isIndexWidget(widget)) {
|
|
16041
16011
|
return;
|
|
16042
16012
|
}
|
|
@@ -16498,7 +16468,7 @@
|
|
|
16498
16468
|
};
|
|
16499
16469
|
}
|
|
16500
16470
|
|
|
16501
|
-
var version$1 = '4.
|
|
16471
|
+
var version$1 = '4.82.0';
|
|
16502
16472
|
|
|
16503
16473
|
var withUsage$v = createDocumentationMessageGenerator({
|
|
16504
16474
|
name: 'instantsearch'
|
|
@@ -17236,6 +17206,182 @@
|
|
|
17236
17206
|
}, []).filter(Boolean).join(' ');
|
|
17237
17207
|
}
|
|
17238
17208
|
|
|
17209
|
+
var _excluded$9 = ["children", "classNames"];
|
|
17210
|
+
function createAutocompleteComponent(_ref) {
|
|
17211
|
+
var createElement = _ref.createElement;
|
|
17212
|
+
return function Autocomplete(userProps) {
|
|
17213
|
+
var children = userProps.children,
|
|
17214
|
+
_userProps$classNames = userProps.classNames,
|
|
17215
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17216
|
+
props = _objectWithoutProperties$1(userProps, _excluded$9);
|
|
17217
|
+
return createElement("div", _extends$1({
|
|
17218
|
+
className: cx('ais-Autocomplete', classNames.root)
|
|
17219
|
+
}, props), children);
|
|
17220
|
+
};
|
|
17221
|
+
}
|
|
17222
|
+
|
|
17223
|
+
var _excluded$a = ["className", "onSelect"];
|
|
17224
|
+
function createAutocompleteIndexComponent(_ref) {
|
|
17225
|
+
var createElement = _ref.createElement;
|
|
17226
|
+
return function AutocompleteIndex(userProps) {
|
|
17227
|
+
var items = userProps.items,
|
|
17228
|
+
HeaderComponent = userProps.HeaderComponent,
|
|
17229
|
+
ItemComponent = userProps.ItemComponent,
|
|
17230
|
+
getItemProps = userProps.getItemProps,
|
|
17231
|
+
_userProps$classNames = userProps.classNames,
|
|
17232
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames;
|
|
17233
|
+
return createElement("div", {
|
|
17234
|
+
className: cx('ais-AutocompleteIndex', classNames.root)
|
|
17235
|
+
}, HeaderComponent && createElement("div", {
|
|
17236
|
+
className: cx('ais-AutocompleteIndexHeader', classNames.header)
|
|
17237
|
+
}, createElement(HeaderComponent, {
|
|
17238
|
+
items: items
|
|
17239
|
+
})), createElement("ol", {
|
|
17240
|
+
className: cx('ais-AutocompleteIndexList', classNames.list)
|
|
17241
|
+
}, items.map(function (item, index) {
|
|
17242
|
+
var _getItemProps = getItemProps(item, index),
|
|
17243
|
+
className = _getItemProps.className,
|
|
17244
|
+
onSelect = _getItemProps.onSelect,
|
|
17245
|
+
itemProps = _objectWithoutProperties$1(_getItemProps, _excluded$a);
|
|
17246
|
+
return createElement("li", _extends$1({
|
|
17247
|
+
key: item.objectID
|
|
17248
|
+
}, itemProps, {
|
|
17249
|
+
className: cx('ais-AutocompleteIndexItem', classNames.item, className)
|
|
17250
|
+
}), createElement(ItemComponent, {
|
|
17251
|
+
item: item,
|
|
17252
|
+
onSelect: onSelect
|
|
17253
|
+
}));
|
|
17254
|
+
})));
|
|
17255
|
+
};
|
|
17256
|
+
}
|
|
17257
|
+
|
|
17258
|
+
var _excluded$b = ["children", "classNames"];
|
|
17259
|
+
function createAutocompletePanelComponent(_ref) {
|
|
17260
|
+
var createElement = _ref.createElement;
|
|
17261
|
+
return function AutocompletePanel(userProps) {
|
|
17262
|
+
var children = userProps.children,
|
|
17263
|
+
_userProps$classNames = userProps.classNames,
|
|
17264
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17265
|
+
props = _objectWithoutProperties$1(userProps, _excluded$b);
|
|
17266
|
+
return createElement("div", _extends$1({}, props, {
|
|
17267
|
+
className: cx('ais-AutocompletePanel', classNames.root, props.className)
|
|
17268
|
+
}), createElement("div", {
|
|
17269
|
+
className: cx('ais-AutocompletePanelLayout', classNames.layout)
|
|
17270
|
+
}, children));
|
|
17271
|
+
};
|
|
17272
|
+
}
|
|
17273
|
+
|
|
17274
|
+
function AutocompleteSubmitIcon(_ref) {
|
|
17275
|
+
var createElement = _ref.createElement;
|
|
17276
|
+
return createElement("svg", {
|
|
17277
|
+
className: "ais-AutocompleteSubmitIcon",
|
|
17278
|
+
viewBox: "0 0 24 24",
|
|
17279
|
+
width: "20",
|
|
17280
|
+
height: "20",
|
|
17281
|
+
fill: "currentColor"
|
|
17282
|
+
}, createElement("path", {
|
|
17283
|
+
d: "M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"
|
|
17284
|
+
}));
|
|
17285
|
+
}
|
|
17286
|
+
function AutocompleteLoadingIcon(_ref2) {
|
|
17287
|
+
var createElement = _ref2.createElement;
|
|
17288
|
+
return createElement("svg", {
|
|
17289
|
+
className: "ais-AutocompleteLoadingIcon",
|
|
17290
|
+
viewBox: "0 0 100 100",
|
|
17291
|
+
width: "20",
|
|
17292
|
+
height: "20"
|
|
17293
|
+
}, createElement("circle", {
|
|
17294
|
+
cx: "50",
|
|
17295
|
+
cy: "50",
|
|
17296
|
+
fill: "none",
|
|
17297
|
+
r: "35",
|
|
17298
|
+
stroke: "currentColor",
|
|
17299
|
+
strokeDasharray: "164.93361431346415 56.97787143782138",
|
|
17300
|
+
strokeWidth: "6"
|
|
17301
|
+
}, createElement("animateTransform", {
|
|
17302
|
+
attributeName: "transform",
|
|
17303
|
+
type: "rotate",
|
|
17304
|
+
repeatCount: "indefinite",
|
|
17305
|
+
dur: "1s",
|
|
17306
|
+
values: "0 50 50;90 50 50;180 50 50;360 50 50",
|
|
17307
|
+
keyTimes: "0;0.40;0.65;1"
|
|
17308
|
+
})));
|
|
17309
|
+
}
|
|
17310
|
+
function AutocompleteClearIcon(_ref3) {
|
|
17311
|
+
var createElement = _ref3.createElement;
|
|
17312
|
+
return createElement("svg", {
|
|
17313
|
+
className: "ais-AutocompleteClearIcon",
|
|
17314
|
+
viewBox: "0 0 24 24",
|
|
17315
|
+
width: "18",
|
|
17316
|
+
height: "18",
|
|
17317
|
+
fill: "currentColor"
|
|
17318
|
+
}, createElement("path", {
|
|
17319
|
+
d: "M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"
|
|
17320
|
+
}));
|
|
17321
|
+
}
|
|
17322
|
+
|
|
17323
|
+
function createAutocompleteSearchComponent(_ref) {
|
|
17324
|
+
var createElement = _ref.createElement;
|
|
17325
|
+
return function AutocompleteSearch(_ref2) {
|
|
17326
|
+
var inputProps = _ref2.inputProps,
|
|
17327
|
+
onClear = _ref2.onClear,
|
|
17328
|
+
query = _ref2.query,
|
|
17329
|
+
isSearchStalled = _ref2.isSearchStalled;
|
|
17330
|
+
return createElement("form", {
|
|
17331
|
+
className: "ais-AutocompleteForm",
|
|
17332
|
+
action: "",
|
|
17333
|
+
noValidate: true,
|
|
17334
|
+
role: "search",
|
|
17335
|
+
onSubmit: function onSubmit(e) {
|
|
17336
|
+
return e.preventDefault();
|
|
17337
|
+
}
|
|
17338
|
+
}, createElement("div", {
|
|
17339
|
+
className: "ais-AutocompleteInputWrapperPrefix"
|
|
17340
|
+
}, createElement("label", {
|
|
17341
|
+
className: "ais-AutocompleteLabel",
|
|
17342
|
+
"aria-label": "Submit",
|
|
17343
|
+
htmlFor: inputProps.id,
|
|
17344
|
+
id: "".concat(inputProps.id, "-label")
|
|
17345
|
+
}, createElement("button", {
|
|
17346
|
+
className: "ais-AutocompleteSubmitButton",
|
|
17347
|
+
type: "submit",
|
|
17348
|
+
title: "Submit"
|
|
17349
|
+
}, createElement(AutocompleteSubmitIcon, {
|
|
17350
|
+
createElement: createElement
|
|
17351
|
+
}))), createElement("div", {
|
|
17352
|
+
className: "ais-AutocompleteLoadingIndicator",
|
|
17353
|
+
hidden: !isSearchStalled
|
|
17354
|
+
}, createElement(AutocompleteLoadingIcon, {
|
|
17355
|
+
createElement: createElement
|
|
17356
|
+
}))), createElement("div", {
|
|
17357
|
+
className: "ais-AutocompleteInputWrapper"
|
|
17358
|
+
}, createElement("input", _extends$1({
|
|
17359
|
+
className: "ais-AutocompleteInput",
|
|
17360
|
+
"aria-autocomplete": "both",
|
|
17361
|
+
"aria-labelledby": "".concat(inputProps.id, "-label"),
|
|
17362
|
+
autoComplete: "off",
|
|
17363
|
+
autoCorrect: "off",
|
|
17364
|
+
autoCapitalize: "off",
|
|
17365
|
+
enterKeyHint: "search",
|
|
17366
|
+
spellCheck: "false",
|
|
17367
|
+
placeholder: "",
|
|
17368
|
+
maxLength: 512,
|
|
17369
|
+
type: "search",
|
|
17370
|
+
value: query
|
|
17371
|
+
}, inputProps))), createElement("div", {
|
|
17372
|
+
className: "ais-AutocompleteInputWrapperSuffix"
|
|
17373
|
+
}, createElement("button", {
|
|
17374
|
+
className: "ais-AutocompleteClearButton",
|
|
17375
|
+
type: "reset",
|
|
17376
|
+
title: "Clear",
|
|
17377
|
+
hidden: query.length === 0 || isSearchStalled,
|
|
17378
|
+
onClick: onClear
|
|
17379
|
+
}, createElement(AutocompleteClearIcon, {
|
|
17380
|
+
createElement: createElement
|
|
17381
|
+
}))));
|
|
17382
|
+
};
|
|
17383
|
+
}
|
|
17384
|
+
|
|
17239
17385
|
var _typeof_1 = createCommonjsModule(function (module) {
|
|
17240
17386
|
function _typeof(o) {
|
|
17241
17387
|
"@babel/helpers - typeof";
|
|
@@ -17249,7 +17395,7 @@
|
|
|
17249
17395
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17250
17396
|
});
|
|
17251
17397
|
|
|
17252
|
-
unwrapExports(_typeof_1);
|
|
17398
|
+
var _typeof$1 = unwrapExports(_typeof_1);
|
|
17253
17399
|
|
|
17254
17400
|
var toPrimitive_1 = createCommonjsModule(function (module) {
|
|
17255
17401
|
var _typeof = _typeof_1["default"];
|
|
@@ -17294,11 +17440,323 @@
|
|
|
17294
17440
|
|
|
17295
17441
|
var _defineProperty$1 = unwrapExports(defineProperty);
|
|
17296
17442
|
|
|
17297
|
-
function
|
|
17298
|
-
|
|
17299
|
-
|
|
17300
|
-
|
|
17301
|
-
|
|
17443
|
+
var arrayWithHoles = createCommonjsModule(function (module) {
|
|
17444
|
+
function _arrayWithHoles(r) {
|
|
17445
|
+
if (Array.isArray(r)) return r;
|
|
17446
|
+
}
|
|
17447
|
+
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17448
|
+
});
|
|
17449
|
+
|
|
17450
|
+
unwrapExports(arrayWithHoles);
|
|
17451
|
+
|
|
17452
|
+
var iterableToArrayLimit = createCommonjsModule(function (module) {
|
|
17453
|
+
function _iterableToArrayLimit(r, l) {
|
|
17454
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
17455
|
+
if (null != t) {
|
|
17456
|
+
var e,
|
|
17457
|
+
n,
|
|
17458
|
+
i,
|
|
17459
|
+
u,
|
|
17460
|
+
a = [],
|
|
17461
|
+
f = !0,
|
|
17462
|
+
o = !1;
|
|
17463
|
+
try {
|
|
17464
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
17465
|
+
if (Object(t) !== t) return;
|
|
17466
|
+
f = !1;
|
|
17467
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
17468
|
+
} catch (r) {
|
|
17469
|
+
o = !0, n = r;
|
|
17470
|
+
} finally {
|
|
17471
|
+
try {
|
|
17472
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
17473
|
+
} finally {
|
|
17474
|
+
if (o) throw n;
|
|
17475
|
+
}
|
|
17476
|
+
}
|
|
17477
|
+
return a;
|
|
17478
|
+
}
|
|
17479
|
+
}
|
|
17480
|
+
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17481
|
+
});
|
|
17482
|
+
|
|
17483
|
+
unwrapExports(iterableToArrayLimit);
|
|
17484
|
+
|
|
17485
|
+
var arrayLikeToArray = createCommonjsModule(function (module) {
|
|
17486
|
+
function _arrayLikeToArray(r, a) {
|
|
17487
|
+
(null == a || a > r.length) && (a = r.length);
|
|
17488
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
17489
|
+
return n;
|
|
17490
|
+
}
|
|
17491
|
+
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17492
|
+
});
|
|
17493
|
+
|
|
17494
|
+
unwrapExports(arrayLikeToArray);
|
|
17495
|
+
|
|
17496
|
+
var unsupportedIterableToArray = createCommonjsModule(function (module) {
|
|
17497
|
+
function _unsupportedIterableToArray(r, a) {
|
|
17498
|
+
if (r) {
|
|
17499
|
+
if ("string" == typeof r) return arrayLikeToArray(r, a);
|
|
17500
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
17501
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
|
|
17502
|
+
}
|
|
17503
|
+
}
|
|
17504
|
+
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17505
|
+
});
|
|
17506
|
+
|
|
17507
|
+
unwrapExports(unsupportedIterableToArray);
|
|
17508
|
+
|
|
17509
|
+
var nonIterableRest = createCommonjsModule(function (module) {
|
|
17510
|
+
function _nonIterableRest() {
|
|
17511
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17512
|
+
}
|
|
17513
|
+
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17514
|
+
});
|
|
17515
|
+
|
|
17516
|
+
unwrapExports(nonIterableRest);
|
|
17517
|
+
|
|
17518
|
+
var slicedToArray = createCommonjsModule(function (module) {
|
|
17519
|
+
function _slicedToArray(r, e) {
|
|
17520
|
+
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
|
|
17521
|
+
}
|
|
17522
|
+
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17523
|
+
});
|
|
17524
|
+
|
|
17525
|
+
var _slicedToArray$1 = unwrapExports(slicedToArray);
|
|
17526
|
+
|
|
17527
|
+
function createAutocompleteSuggestionComponent(_ref) {
|
|
17528
|
+
var createElement = _ref.createElement;
|
|
17529
|
+
return function AutocompleteSuggestion(_ref2) {
|
|
17530
|
+
var item = _ref2.item,
|
|
17531
|
+
onSelect = _ref2.onSelect,
|
|
17532
|
+
_ref2$classNames = _ref2.classNames,
|
|
17533
|
+
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames;
|
|
17534
|
+
return createElement("div", {
|
|
17535
|
+
onClick: onSelect,
|
|
17536
|
+
className: cx('ais-AutocompleteSuggestion', classNames.root)
|
|
17537
|
+
}, item.query);
|
|
17538
|
+
};
|
|
17539
|
+
}
|
|
17540
|
+
|
|
17541
|
+
function createAutocompletePropGetters(_ref) {
|
|
17542
|
+
var useEffect = _ref.useEffect,
|
|
17543
|
+
useId = _ref.useId,
|
|
17544
|
+
useMemo = _ref.useMemo,
|
|
17545
|
+
useRef = _ref.useRef,
|
|
17546
|
+
useState = _ref.useState;
|
|
17547
|
+
return function usePropGetters(_ref2) {
|
|
17548
|
+
var indices = _ref2.indices,
|
|
17549
|
+
indicesConfig = _ref2.indicesConfig,
|
|
17550
|
+
onRefine = _ref2.onRefine,
|
|
17551
|
+
globalOnSelect = _ref2.onSelect;
|
|
17552
|
+
var getElementId = createGetElementId(useId());
|
|
17553
|
+
var rootRef = useRef(null);
|
|
17554
|
+
var _useState = useState(false),
|
|
17555
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
17556
|
+
isOpen = _useState2[0],
|
|
17557
|
+
setIsOpen = _useState2[1];
|
|
17558
|
+
var _useState3 = useState(undefined),
|
|
17559
|
+
_useState4 = _slicedToArray$1(_useState3, 2),
|
|
17560
|
+
activeDescendant = _useState4[0],
|
|
17561
|
+
setActiveDescendant = _useState4[1];
|
|
17562
|
+
var _useMemo = useMemo(function () {
|
|
17563
|
+
return buildItems({
|
|
17564
|
+
indices: indices,
|
|
17565
|
+
indicesConfig: indicesConfig,
|
|
17566
|
+
getElementId: getElementId
|
|
17567
|
+
});
|
|
17568
|
+
}, [indices, indicesConfig, getElementId]),
|
|
17569
|
+
items = _useMemo.items,
|
|
17570
|
+
itemsIds = _useMemo.itemsIds;
|
|
17571
|
+
useEffect(function () {
|
|
17572
|
+
var onBodyClick = function onBodyClick(event) {
|
|
17573
|
+
var _unwrapRef;
|
|
17574
|
+
if ((_unwrapRef = unwrapRef(rootRef)) !== null && _unwrapRef !== void 0 && _unwrapRef.contains(event.target)) {
|
|
17575
|
+
return;
|
|
17576
|
+
}
|
|
17577
|
+
setIsOpen(false);
|
|
17578
|
+
};
|
|
17579
|
+
document.body.addEventListener('click', onBodyClick);
|
|
17580
|
+
return function () {
|
|
17581
|
+
document.body.removeEventListener('click', onBodyClick);
|
|
17582
|
+
};
|
|
17583
|
+
}, [rootRef]);
|
|
17584
|
+
var getNextActiveDescendent = function getNextActiveDescendent(key) {
|
|
17585
|
+
switch (key) {
|
|
17586
|
+
case 'ArrowLeft':
|
|
17587
|
+
case 'ArrowUp':
|
|
17588
|
+
{
|
|
17589
|
+
var prevIndex = itemsIds.indexOf(activeDescendant || '') - 1;
|
|
17590
|
+
return itemsIds[prevIndex] || itemsIds[itemsIds.length - 1];
|
|
17591
|
+
}
|
|
17592
|
+
case 'ArrowRight':
|
|
17593
|
+
case 'ArrowDown':
|
|
17594
|
+
{
|
|
17595
|
+
var nextIndex = itemsIds.indexOf(activeDescendant || '') + 1;
|
|
17596
|
+
return itemsIds[nextIndex] || itemsIds[0];
|
|
17597
|
+
}
|
|
17598
|
+
default:
|
|
17599
|
+
return undefined;
|
|
17600
|
+
}
|
|
17601
|
+
};
|
|
17602
|
+
var submit = function submit() {
|
|
17603
|
+
var actualActiveDescendant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : activeDescendant;
|
|
17604
|
+
setIsOpen(false);
|
|
17605
|
+
if (actualActiveDescendant && items.has(actualActiveDescendant)) {
|
|
17606
|
+
var _getQuery;
|
|
17607
|
+
var _ref3 = items.get(actualActiveDescendant),
|
|
17608
|
+
_item = _ref3.item,
|
|
17609
|
+
_ref3$config = _ref3.config,
|
|
17610
|
+
indexOnSelect = _ref3$config.onSelect,
|
|
17611
|
+
getQuery = _ref3$config.getQuery,
|
|
17612
|
+
getURL = _ref3$config.getURL;
|
|
17613
|
+
var actualOnSelect = indexOnSelect !== null && indexOnSelect !== void 0 ? indexOnSelect : globalOnSelect;
|
|
17614
|
+
actualOnSelect({
|
|
17615
|
+
item: _item,
|
|
17616
|
+
query: (_getQuery = getQuery === null || getQuery === void 0 ? void 0 : getQuery(_item)) !== null && _getQuery !== void 0 ? _getQuery : '',
|
|
17617
|
+
url: getURL === null || getURL === void 0 ? void 0 : getURL(_item),
|
|
17618
|
+
setQuery: function setQuery(query) {
|
|
17619
|
+
return onRefine(query);
|
|
17620
|
+
}
|
|
17621
|
+
});
|
|
17622
|
+
setActiveDescendant(undefined);
|
|
17623
|
+
}
|
|
17624
|
+
};
|
|
17625
|
+
return {
|
|
17626
|
+
getInputProps: function getInputProps() {
|
|
17627
|
+
return {
|
|
17628
|
+
id: getElementId('input'),
|
|
17629
|
+
role: 'combobox',
|
|
17630
|
+
'aria-autocomplete': 'list',
|
|
17631
|
+
'aria-expanded': isOpen,
|
|
17632
|
+
'aria-haspopup': 'grid',
|
|
17633
|
+
'aria-controls': getElementId('panel'),
|
|
17634
|
+
'aria-activedescendant': activeDescendant,
|
|
17635
|
+
onFocus: function onFocus() {
|
|
17636
|
+
return setIsOpen(true);
|
|
17637
|
+
},
|
|
17638
|
+
onKeyDown: function onKeyDown(event) {
|
|
17639
|
+
if (event.key === 'Escape') {
|
|
17640
|
+
setActiveDescendant(undefined);
|
|
17641
|
+
setIsOpen(false);
|
|
17642
|
+
return;
|
|
17643
|
+
}
|
|
17644
|
+
switch (event.key) {
|
|
17645
|
+
case 'ArrowLeft':
|
|
17646
|
+
case 'ArrowUp':
|
|
17647
|
+
case 'ArrowRight':
|
|
17648
|
+
case 'ArrowDown':
|
|
17649
|
+
{
|
|
17650
|
+
var _document$getElementB;
|
|
17651
|
+
var nextActiveDescendent = getNextActiveDescendent(event.key);
|
|
17652
|
+
setActiveDescendant(nextActiveDescendent);
|
|
17653
|
+
(_document$getElementB = document.getElementById(nextActiveDescendent)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.scrollIntoView(false);
|
|
17654
|
+
event.preventDefault();
|
|
17655
|
+
break;
|
|
17656
|
+
}
|
|
17657
|
+
case 'Enter':
|
|
17658
|
+
{
|
|
17659
|
+
submit();
|
|
17660
|
+
break;
|
|
17661
|
+
}
|
|
17662
|
+
case 'Tab':
|
|
17663
|
+
setIsOpen(false);
|
|
17664
|
+
break;
|
|
17665
|
+
default:
|
|
17666
|
+
return;
|
|
17667
|
+
}
|
|
17668
|
+
},
|
|
17669
|
+
onKeyUp: function onKeyUp(event) {
|
|
17670
|
+
switch (event.key) {
|
|
17671
|
+
case 'ArrowLeft':
|
|
17672
|
+
case 'ArrowUp':
|
|
17673
|
+
case 'ArrowRight':
|
|
17674
|
+
case 'ArrowDown':
|
|
17675
|
+
case 'Escape':
|
|
17676
|
+
case 'Return':
|
|
17677
|
+
event.preventDefault();
|
|
17678
|
+
return;
|
|
17679
|
+
default:
|
|
17680
|
+
setActiveDescendant(undefined);
|
|
17681
|
+
break;
|
|
17682
|
+
}
|
|
17683
|
+
}
|
|
17684
|
+
};
|
|
17685
|
+
},
|
|
17686
|
+
getItemProps: function getItemProps(item, index) {
|
|
17687
|
+
var id = getElementId('item', item.__indexName, index);
|
|
17688
|
+
return {
|
|
17689
|
+
id: id,
|
|
17690
|
+
role: 'row',
|
|
17691
|
+
'aria-selected': id === activeDescendant,
|
|
17692
|
+
onSelect: function onSelect() {
|
|
17693
|
+
return submit(id);
|
|
17694
|
+
}
|
|
17695
|
+
};
|
|
17696
|
+
},
|
|
17697
|
+
getPanelProps: function getPanelProps() {
|
|
17698
|
+
return {
|
|
17699
|
+
hidden: !isOpen,
|
|
17700
|
+
id: getElementId('panel'),
|
|
17701
|
+
role: 'grid',
|
|
17702
|
+
'aria-labelledby': getElementId('input')
|
|
17703
|
+
};
|
|
17704
|
+
},
|
|
17705
|
+
getRootProps: function getRootProps() {
|
|
17706
|
+
return {
|
|
17707
|
+
ref: rootRef
|
|
17708
|
+
};
|
|
17709
|
+
}
|
|
17710
|
+
};
|
|
17711
|
+
};
|
|
17712
|
+
}
|
|
17713
|
+
function buildItems(_ref4) {
|
|
17714
|
+
var indices = _ref4.indices,
|
|
17715
|
+
indicesConfig = _ref4.indicesConfig,
|
|
17716
|
+
getElementId = _ref4.getElementId;
|
|
17717
|
+
var itemsIds = [];
|
|
17718
|
+
var items = new Map();
|
|
17719
|
+
for (var i = 0; i < indicesConfig.length; i++) {
|
|
17720
|
+
var _indices$i;
|
|
17721
|
+
var config = indicesConfig[i];
|
|
17722
|
+
var hits = ((_indices$i = indices[i]) === null || _indices$i === void 0 ? void 0 : _indices$i.hits) || [];
|
|
17723
|
+
for (var position = 0; position < hits.length; position++) {
|
|
17724
|
+
var itemId = getElementId('item', config.indexName, position);
|
|
17725
|
+
items.set(itemId, {
|
|
17726
|
+
item: hits[position],
|
|
17727
|
+
config: config
|
|
17728
|
+
});
|
|
17729
|
+
itemsIds.push(itemId);
|
|
17730
|
+
}
|
|
17731
|
+
}
|
|
17732
|
+
return {
|
|
17733
|
+
items: items,
|
|
17734
|
+
itemsIds: itemsIds
|
|
17735
|
+
};
|
|
17736
|
+
}
|
|
17737
|
+
function createGetElementId(autocompleteId) {
|
|
17738
|
+
return function getElementId() {
|
|
17739
|
+
var prefix = 'autocomplete';
|
|
17740
|
+
for (var _len = arguments.length, suffixes = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17741
|
+
suffixes[_key] = arguments[_key];
|
|
17742
|
+
}
|
|
17743
|
+
return "".concat(prefix).concat(autocompleteId).concat(suffixes.join(':'));
|
|
17744
|
+
};
|
|
17745
|
+
}
|
|
17746
|
+
|
|
17747
|
+
/**
|
|
17748
|
+
* Returns the framework-agnostic value of a ref.
|
|
17749
|
+
*/
|
|
17750
|
+
function unwrapRef(ref) {
|
|
17751
|
+
return ref.current && _typeof$1(ref.current) === 'object' && 'base' in ref.current ? ref.current.base // Preact
|
|
17752
|
+
: ref.current; // React
|
|
17753
|
+
}
|
|
17754
|
+
|
|
17755
|
+
function createDefaultEmptyComponent(_ref) {
|
|
17756
|
+
var createElement = _ref.createElement,
|
|
17757
|
+
Fragment = _ref.Fragment;
|
|
17758
|
+
return function DefaultEmpty() {
|
|
17759
|
+
return createElement(Fragment, null, "No results");
|
|
17302
17760
|
};
|
|
17303
17761
|
}
|
|
17304
17762
|
|
|
@@ -17359,7 +17817,7 @@
|
|
|
17359
17817
|
};
|
|
17360
17818
|
}
|
|
17361
17819
|
|
|
17362
|
-
var _excluded$
|
|
17820
|
+
var _excluded$c = ["listRef", "nextButtonRef", "previousButtonRef", "carouselIdRef", "canScrollLeft", "canScrollRight", "setCanScrollLeft", "setCanScrollRight", "classNames", "itemComponent", "previousIconComponent", "nextIconComponent", "headerComponent", "showNavigation", "items", "translations", "sendEvent"];
|
|
17363
17821
|
function ownKeys$1(e, r) {
|
|
17364
17822
|
var t = Object.keys(e);
|
|
17365
17823
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17442,7 +17900,7 @@
|
|
|
17442
17900
|
items = userProps.items,
|
|
17443
17901
|
userTranslations = userProps.translations,
|
|
17444
17902
|
sendEvent = userProps.sendEvent,
|
|
17445
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
17903
|
+
props = _objectWithoutProperties$1(userProps, _excluded$c);
|
|
17446
17904
|
var translations = _objectSpread({
|
|
17447
17905
|
listLabel: 'Items',
|
|
17448
17906
|
nextButtonLabel: 'Next',
|
|
@@ -17556,7 +18014,7 @@
|
|
|
17556
18014
|
};
|
|
17557
18015
|
}
|
|
17558
18016
|
|
|
17559
|
-
var _excluded$
|
|
18017
|
+
var _excluded$d = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17560
18018
|
function ownKeys$2(e, r) {
|
|
17561
18019
|
var t = Object.keys(e);
|
|
17562
18020
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17608,7 +18066,7 @@
|
|
|
17608
18066
|
status = userProps.status,
|
|
17609
18067
|
userTranslations = userProps.translations,
|
|
17610
18068
|
sendEvent = userProps.sendEvent,
|
|
17611
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18069
|
+
props = _objectWithoutProperties$1(userProps, _excluded$d);
|
|
17612
18070
|
var translations = _objectSpread$1({
|
|
17613
18071
|
title: 'Frequently bought together',
|
|
17614
18072
|
sliderLabel: 'Frequently bought together products'
|
|
@@ -17641,7 +18099,7 @@
|
|
|
17641
18099
|
};
|
|
17642
18100
|
}
|
|
17643
18101
|
|
|
17644
|
-
var _excluded$
|
|
18102
|
+
var _excluded$e = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
|
|
17645
18103
|
function createHighlightPartComponent(_ref) {
|
|
17646
18104
|
var createElement = _ref.createElement;
|
|
17647
18105
|
return function HighlightPart(_ref2) {
|
|
@@ -17674,7 +18132,7 @@
|
|
|
17674
18132
|
className = userProps.className,
|
|
17675
18133
|
_userProps$classNames = userProps.classNames,
|
|
17676
18134
|
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17677
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18135
|
+
props = _objectWithoutProperties$1(userProps, _excluded$e);
|
|
17678
18136
|
return createElement("span", _extends$1({}, props, {
|
|
17679
18137
|
className: cx(classNames.root, className)
|
|
17680
18138
|
}), parts.map(function (part, partIndex) {
|
|
@@ -17696,7 +18154,7 @@
|
|
|
17696
18154
|
};
|
|
17697
18155
|
}
|
|
17698
18156
|
|
|
17699
|
-
var _excluded$
|
|
18157
|
+
var _excluded$f = ["classNames", "hits", "itemComponent", "sendEvent", "emptyComponent", "banner", "bannerComponent"];
|
|
17700
18158
|
|
|
17701
18159
|
// Should be imported from a shared package in the future
|
|
17702
18160
|
|
|
@@ -17741,7 +18199,7 @@
|
|
|
17741
18199
|
EmptyComponent = userProps.emptyComponent,
|
|
17742
18200
|
banner = userProps.banner,
|
|
17743
18201
|
BannerComponent = userProps.bannerComponent,
|
|
17744
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18202
|
+
props = _objectWithoutProperties$1(userProps, _excluded$f);
|
|
17745
18203
|
return createElement("div", _extends$1({}, props, {
|
|
17746
18204
|
className: cx('ais-Hits', classNames.root, hits.length === 0 && cx('ais-Hits--empty', classNames.emptyRoot), props.className)
|
|
17747
18205
|
}), banner && (BannerComponent ? createElement(BannerComponent, {
|
|
@@ -17769,7 +18227,7 @@
|
|
|
17769
18227
|
};
|
|
17770
18228
|
}
|
|
17771
18229
|
|
|
17772
|
-
var _excluded$
|
|
18230
|
+
var _excluded$g = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17773
18231
|
function ownKeys$3(e, r) {
|
|
17774
18232
|
var t = Object.keys(e);
|
|
17775
18233
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17821,7 +18279,7 @@
|
|
|
17821
18279
|
status = userProps.status,
|
|
17822
18280
|
userTranslations = userProps.translations,
|
|
17823
18281
|
sendEvent = userProps.sendEvent,
|
|
17824
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18282
|
+
props = _objectWithoutProperties$1(userProps, _excluded$g);
|
|
17825
18283
|
var translations = _objectSpread$2({
|
|
17826
18284
|
title: 'Looking similar',
|
|
17827
18285
|
sliderLabel: 'Looking similar'
|
|
@@ -17854,7 +18312,7 @@
|
|
|
17854
18312
|
};
|
|
17855
18313
|
}
|
|
17856
18314
|
|
|
17857
|
-
var _excluded$
|
|
18315
|
+
var _excluded$h = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17858
18316
|
function ownKeys$4(e, r) {
|
|
17859
18317
|
var t = Object.keys(e);
|
|
17860
18318
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17906,7 +18364,7 @@
|
|
|
17906
18364
|
status = userProps.status,
|
|
17907
18365
|
userTranslations = userProps.translations,
|
|
17908
18366
|
sendEvent = userProps.sendEvent,
|
|
17909
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18367
|
+
props = _objectWithoutProperties$1(userProps, _excluded$h);
|
|
17910
18368
|
var translations = _objectSpread$3({
|
|
17911
18369
|
title: 'Related products',
|
|
17912
18370
|
sliderLabel: 'Related products'
|
|
@@ -17939,7 +18397,7 @@
|
|
|
17939
18397
|
};
|
|
17940
18398
|
}
|
|
17941
18399
|
|
|
17942
|
-
var _excluded$
|
|
18400
|
+
var _excluded$i = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17943
18401
|
function ownKeys$5(e, r) {
|
|
17944
18402
|
var t = Object.keys(e);
|
|
17945
18403
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17991,7 +18449,7 @@
|
|
|
17991
18449
|
status = userProps.status,
|
|
17992
18450
|
userTranslations = userProps.translations,
|
|
17993
18451
|
sendEvent = userProps.sendEvent,
|
|
17994
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18452
|
+
props = _objectWithoutProperties$1(userProps, _excluded$i);
|
|
17995
18453
|
var translations = _objectSpread$4({
|
|
17996
18454
|
title: 'Trending items',
|
|
17997
18455
|
sliderLabel: 'Trending items'
|
|
@@ -18024,7 +18482,7 @@
|
|
|
18024
18482
|
};
|
|
18025
18483
|
}
|
|
18026
18484
|
|
|
18027
|
-
var r$1,u$1,i,o$1,f$1=0,c$1=[],e$2=[],a$1=l.__b,v$1=l.__r,l$1=l.diffed,m$2=l.__c,d$1=l.unmount;function p$1(t,r){l.__h&&l.__h(u$1,t,f$1||r),f$1=0;var i=u$1.__H||(u$1.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:e$2}),i.__[t]}function y$1(n){return f$1=1,h$1(C$1,n)}function h$1(n,t,i){var o=p$1(r$1++,2);if(o.t=n,!o.__c&&(o.__=[i?i(t):C$1(void 0,t),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=u$1,!u$1.u)){u$1.u=!0;var f=u$1.shouldComponentUpdate;u$1.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!!i&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function s$1(t,i){var o=p$1(r$1++,3);!l.__s&&B(o.__H,i)&&(o.__=t,o.i=i,u$1.__H.__h.push(o));}function A$1(n){return f$1=5,T$1(function(){return {current:n}},[])}function T$1(n,t){var u=p$1(r$1++,7);return B(u.__H,t)?(u.__V=n(),u.i=t,u.__h=n,u.__V):u.__}function g$1(){for(var t;t=c$1.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(w$1),t.__H.__h.forEach(z$1),t.__H.__h=[];}catch(r){t.__H.__h=[],l.__e(r,t.__v);}}l.__b=function(n){"function"!=typeof n.type||n.o||n.type===p?n.o||(n.o=n.__&&n.__.o?n.__.o:""):n.o=(n.__&&n.__.o?n.__.o:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),u$1=null,a$1&&a$1(n);},l.__r=function(n){v$1&&v$1(n),r$1=0;var t=(u$1=n.__c).__H;t&&(i===u$1?(t.__h=[],u$1.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=e$2,n.__N=n.i=void 0;})):(t.__h.forEach(w$1),t.__h.forEach(z$1),t.__h=[])),i=u$1;},l.diffed=function(t){l$1&&l$1(t);var r=t.__c;r&&r.__H&&(r.__H.__h.length&&(1!==c$1.push(r)&&o$1===l.requestAnimationFrame||((o$1=l.requestAnimationFrame)||k$1)(g$1)),r.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==e$2&&(n.__=n.__V),n.i=void 0,n.__V=e$2;})),i=u$1=null;},l.__c=function(t,r){r.some(function(t){try{t.__h.forEach(w$1),t.__h=t.__h.filter(function(n){return !n.__||z$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l.__e(u,t.__v);}}),m$2&&m$2(t,r);},l.unmount=function(t){d$1&&d$1(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{w$1(n);}catch(n){r=n;}}),u.__H=void 0,r&&l.__e(r,u.__v));};var j$1="function"==typeof requestAnimationFrame;function k$1(n){var t,r=function(){clearTimeout(u),j$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);j$1&&(t=requestAnimationFrame(r));}function w$1(n){var t=u$1,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u$1=t;}function z$1(n){var t=u$1;n.__c=n.__(),u$1=t;}function B(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function C$1(n,t){return "function"==typeof t?t(n):t}
|
|
18485
|
+
var r$1,u$1,i,o$1,f$1=0,c$1=[],e$2=[],a$1=l.__b,v$1=l.__r,l$1=l.diffed,m$2=l.__c,d$1=l.unmount;function p$1(t,r){l.__h&&l.__h(u$1,t,f$1||r),f$1=0;var i=u$1.__H||(u$1.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:e$2}),i.__[t]}function y$1(n){return f$1=1,h$1(C$1,n)}function h$1(n,t,i){var o=p$1(r$1++,2);if(o.t=n,!o.__c&&(o.__=[i?i(t):C$1(void 0,t),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=u$1,!u$1.u)){u$1.u=!0;var f=u$1.shouldComponentUpdate;u$1.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!!i&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function s$1(t,i){var o=p$1(r$1++,3);!l.__s&&B(o.__H,i)&&(o.__=t,o.i=i,u$1.__H.__h.push(o));}function A$1(n){return f$1=5,T$1(function(){return {current:n}},[])}function T$1(n,t){var u=p$1(r$1++,7);return B(u.__H,t)?(u.__V=n(),u.i=t,u.__h=n,u.__V):u.__}function b$1(){var n=p$1(r$1++,11);return n.__||(n.__="P"+function(n){for(var t=0,r=n.length;r>0;)t=(t<<5)-t+n.charCodeAt(--r)|0;return t}(u$1.__v.o)+r$1),n.__}function g$1(){for(var t;t=c$1.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(w$1),t.__H.__h.forEach(z$1),t.__H.__h=[];}catch(r){t.__H.__h=[],l.__e(r,t.__v);}}l.__b=function(n){"function"!=typeof n.type||n.o||n.type===p?n.o||(n.o=n.__&&n.__.o?n.__.o:""):n.o=(n.__&&n.__.o?n.__.o:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),u$1=null,a$1&&a$1(n);},l.__r=function(n){v$1&&v$1(n),r$1=0;var t=(u$1=n.__c).__H;t&&(i===u$1?(t.__h=[],u$1.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=e$2,n.__N=n.i=void 0;})):(t.__h.forEach(w$1),t.__h.forEach(z$1),t.__h=[])),i=u$1;},l.diffed=function(t){l$1&&l$1(t);var r=t.__c;r&&r.__H&&(r.__H.__h.length&&(1!==c$1.push(r)&&o$1===l.requestAnimationFrame||((o$1=l.requestAnimationFrame)||k$1)(g$1)),r.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==e$2&&(n.__=n.__V),n.i=void 0,n.__V=e$2;})),i=u$1=null;},l.__c=function(t,r){r.some(function(t){try{t.__h.forEach(w$1),t.__h=t.__h.filter(function(n){return !n.__||z$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l.__e(u,t.__v);}}),m$2&&m$2(t,r);},l.unmount=function(t){d$1&&d$1(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{w$1(n);}catch(n){r=n;}}),u.__H=void 0,r&&l.__e(r,u.__v));};var j$1="function"==typeof requestAnimationFrame;function k$1(n){var t,r=function(){clearTimeout(u),j$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);j$1&&(t=requestAnimationFrame(r));}function w$1(n){var t=u$1,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u$1=t;}function z$1(n){var t=u$1;n.__c=n.__(),u$1=t;}function B(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function C$1(n,t){return "function"==typeof t?t(n):t}
|
|
18028
18486
|
|
|
18029
18487
|
var Carousel = createCarouselComponent({
|
|
18030
18488
|
createElement: h,
|
|
@@ -18915,11 +19373,11 @@
|
|
|
18915
19373
|
Fragment: p
|
|
18916
19374
|
});
|
|
18917
19375
|
|
|
18918
|
-
var _excluded$
|
|
19376
|
+
var _excluded$j = ["classNames"];
|
|
18919
19377
|
function Highlight(_ref) {
|
|
18920
19378
|
var _ref$classNames = _ref.classNames,
|
|
18921
19379
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18922
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19380
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
18923
19381
|
return h(InternalHighlight, _extends({
|
|
18924
19382
|
classNames: {
|
|
18925
19383
|
root: cx('ais-Highlight', classNames.root),
|
|
@@ -18930,12 +19388,12 @@
|
|
|
18930
19388
|
}, props));
|
|
18931
19389
|
}
|
|
18932
19390
|
|
|
18933
|
-
var _excluded$
|
|
19391
|
+
var _excluded$k = ["hit", "attribute", "cssClasses"];
|
|
18934
19392
|
function Highlight$1(_ref) {
|
|
18935
19393
|
var hit = _ref.hit,
|
|
18936
19394
|
attribute = _ref.attribute,
|
|
18937
19395
|
cssClasses = _ref.cssClasses,
|
|
18938
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19396
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
18939
19397
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
18940
19398
|
var properties = toArray(property);
|
|
18941
19399
|
_warning(Boolean(properties.length), "Could not enable highlight for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is either searchable or specified in `attributesToHighlight`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
@@ -18949,11 +19407,11 @@
|
|
|
18949
19407
|
}));
|
|
18950
19408
|
}
|
|
18951
19409
|
|
|
18952
|
-
var _excluded$
|
|
19410
|
+
var _excluded$l = ["classNames"];
|
|
18953
19411
|
function ReverseHighlight(_ref) {
|
|
18954
19412
|
var _ref$classNames = _ref.classNames,
|
|
18955
19413
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18956
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19414
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
18957
19415
|
return h(InternalHighlight, _extends({
|
|
18958
19416
|
classNames: {
|
|
18959
19417
|
root: cx('ais-ReverseHighlight', classNames.root),
|
|
@@ -18964,13 +19422,13 @@
|
|
|
18964
19422
|
}, props));
|
|
18965
19423
|
}
|
|
18966
19424
|
|
|
18967
|
-
var _excluded$
|
|
19425
|
+
var _excluded$m = ["hit", "attribute", "cssClasses"],
|
|
18968
19426
|
_excluded2$3 = ["isHighlighted"];
|
|
18969
19427
|
function ReverseHighlight$1(_ref) {
|
|
18970
19428
|
var hit = _ref.hit,
|
|
18971
19429
|
attribute = _ref.attribute,
|
|
18972
19430
|
cssClasses = _ref.cssClasses,
|
|
18973
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19431
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
18974
19432
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
18975
19433
|
var properties = toArray(property);
|
|
18976
19434
|
_warning(Boolean(properties.length), "Could not enable highlight for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is either searchable or specified in `attributesToHighlight`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
@@ -18990,11 +19448,11 @@
|
|
|
18990
19448
|
}));
|
|
18991
19449
|
}
|
|
18992
19450
|
|
|
18993
|
-
var _excluded$
|
|
19451
|
+
var _excluded$n = ["classNames"];
|
|
18994
19452
|
function ReverseSnippet(_ref) {
|
|
18995
19453
|
var _ref$classNames = _ref.classNames,
|
|
18996
19454
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18997
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19455
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
18998
19456
|
return h(InternalHighlight, _extends({
|
|
18999
19457
|
classNames: {
|
|
19000
19458
|
root: cx('ais-ReverseSnippet', classNames.root),
|
|
@@ -19005,13 +19463,13 @@
|
|
|
19005
19463
|
}, props));
|
|
19006
19464
|
}
|
|
19007
19465
|
|
|
19008
|
-
var _excluded$
|
|
19466
|
+
var _excluded$o = ["hit", "attribute", "cssClasses"],
|
|
19009
19467
|
_excluded2$4 = ["isHighlighted"];
|
|
19010
19468
|
function ReverseSnippet$1(_ref) {
|
|
19011
19469
|
var hit = _ref.hit,
|
|
19012
19470
|
attribute = _ref.attribute,
|
|
19013
19471
|
cssClasses = _ref.cssClasses,
|
|
19014
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19472
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
19015
19473
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
19016
19474
|
var properties = toArray(property);
|
|
19017
19475
|
_warning(Boolean(properties.length), "Could not enable snippet for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is specified in `attributesToSnippet`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
@@ -19031,11 +19489,11 @@
|
|
|
19031
19489
|
}));
|
|
19032
19490
|
}
|
|
19033
19491
|
|
|
19034
|
-
var _excluded$
|
|
19492
|
+
var _excluded$p = ["classNames"];
|
|
19035
19493
|
function Snippet(_ref) {
|
|
19036
19494
|
var _ref$classNames = _ref.classNames,
|
|
19037
19495
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
19038
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19496
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
19039
19497
|
return h(InternalHighlight, _extends({
|
|
19040
19498
|
classNames: {
|
|
19041
19499
|
root: cx('ais-Snippet', classNames.root),
|
|
@@ -19046,12 +19504,12 @@
|
|
|
19046
19504
|
}, props));
|
|
19047
19505
|
}
|
|
19048
19506
|
|
|
19049
|
-
var _excluded$
|
|
19507
|
+
var _excluded$q = ["hit", "attribute", "cssClasses"];
|
|
19050
19508
|
function Snippet$1(_ref) {
|
|
19051
19509
|
var hit = _ref.hit,
|
|
19052
19510
|
attribute = _ref.attribute,
|
|
19053
19511
|
cssClasses = _ref.cssClasses,
|
|
19054
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19512
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
19055
19513
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
19056
19514
|
var properties = toArray(property);
|
|
19057
19515
|
_warning(Boolean(properties.length), "Could not enable snippet for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is specified in `attributesToSnippet`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
@@ -19393,7 +19851,7 @@
|
|
|
19393
19851
|
});
|
|
19394
19852
|
};
|
|
19395
19853
|
|
|
19396
|
-
var _excluded$
|
|
19854
|
+
var _excluded$r = ["container", "widgets", "fallbackWidget"];
|
|
19397
19855
|
var withUsage$x = createDocumentationMessageGenerator({
|
|
19398
19856
|
name: 'dynamic-widgets'
|
|
19399
19857
|
});
|
|
@@ -19411,7 +19869,7 @@
|
|
|
19411
19869
|
containerSelector = _ref.container,
|
|
19412
19870
|
widgets = _ref.widgets,
|
|
19413
19871
|
fallbackWidget = _ref.fallbackWidget,
|
|
19414
|
-
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$
|
|
19872
|
+
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$r);
|
|
19415
19873
|
if (!containerSelector) {
|
|
19416
19874
|
throw new Error(withUsage$x('The `container` option is required.'));
|
|
19417
19875
|
}
|
|
@@ -19617,6 +20075,272 @@
|
|
|
19617
20075
|
};
|
|
19618
20076
|
};
|
|
19619
20077
|
|
|
20078
|
+
/**
|
|
20079
|
+
* A list of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/)
|
|
20080
|
+
* to enable when the widget mounts.
|
|
20081
|
+
*/
|
|
20082
|
+
|
|
20083
|
+
var configure = function configure(widgetParams) {
|
|
20084
|
+
// This is a renderless widget that falls back to the connector's
|
|
20085
|
+
// noop render and unmount functions.
|
|
20086
|
+
var makeWidget = connectConfigure(noop);
|
|
20087
|
+
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
20088
|
+
searchParameters: widgetParams
|
|
20089
|
+
})), {}, {
|
|
20090
|
+
$$widgetType: 'ais.configure'
|
|
20091
|
+
});
|
|
20092
|
+
};
|
|
20093
|
+
|
|
20094
|
+
var _excluded$s = ["instanceId", "containerNode"];
|
|
20095
|
+
var autocompleteInstanceId = 0;
|
|
20096
|
+
var withUsage$z = createDocumentationMessageGenerator({
|
|
20097
|
+
name: 'autocomplete'
|
|
20098
|
+
});
|
|
20099
|
+
var suit$6 = component('Autocomplete');
|
|
20100
|
+
var Autocomplete = createAutocompleteComponent({
|
|
20101
|
+
createElement: h,
|
|
20102
|
+
Fragment: p
|
|
20103
|
+
});
|
|
20104
|
+
var AutocompletePanel = createAutocompletePanelComponent({
|
|
20105
|
+
createElement: h,
|
|
20106
|
+
Fragment: p
|
|
20107
|
+
});
|
|
20108
|
+
var AutocompleteIndex = createAutocompleteIndexComponent({
|
|
20109
|
+
createElement: h,
|
|
20110
|
+
Fragment: p
|
|
20111
|
+
});
|
|
20112
|
+
var AutocompleteSuggestion = createAutocompleteSuggestionComponent({
|
|
20113
|
+
createElement: h,
|
|
20114
|
+
Fragment: p
|
|
20115
|
+
});
|
|
20116
|
+
var AutocompleteSearchBox = createAutocompleteSearchComponent({
|
|
20117
|
+
createElement: h,
|
|
20118
|
+
Fragment: p
|
|
20119
|
+
});
|
|
20120
|
+
var usePropGetters = createAutocompletePropGetters({
|
|
20121
|
+
useEffect: s$1,
|
|
20122
|
+
useId: b$1,
|
|
20123
|
+
useMemo: T$1,
|
|
20124
|
+
useRef: A$1,
|
|
20125
|
+
useState: y$1
|
|
20126
|
+
});
|
|
20127
|
+
var createRenderer = function createRenderer(params) {
|
|
20128
|
+
var instanceId = params.instanceId,
|
|
20129
|
+
containerNode = params.containerNode,
|
|
20130
|
+
rendererParams = _objectWithoutProperties(params, _excluded$s);
|
|
20131
|
+
return function (connectorParams, isFirstRendering) {
|
|
20132
|
+
if (isFirstRendering) {
|
|
20133
|
+
var isolatedIndex = connectorParams.instantSearchInstance.mainIndex;
|
|
20134
|
+
var targetIndex = connectorParams.instantSearchInstance.mainIndex;
|
|
20135
|
+
walkIndex(targetIndex, function (childIndex) {
|
|
20136
|
+
if (childIndex.getIndexId() === "ais-autocomplete-".concat(instanceId)) {
|
|
20137
|
+
isolatedIndex = childIndex;
|
|
20138
|
+
targetIndex = childIndex.parent;
|
|
20139
|
+
}
|
|
20140
|
+
});
|
|
20141
|
+
rendererParams.renderState = {
|
|
20142
|
+
indexTemplateProps: [],
|
|
20143
|
+
isolatedIndex: isolatedIndex,
|
|
20144
|
+
targetIndex: targetIndex
|
|
20145
|
+
};
|
|
20146
|
+
return;
|
|
20147
|
+
}
|
|
20148
|
+
P(h(AutocompleteWrapper, _extends({}, rendererParams, connectorParams)), containerNode);
|
|
20149
|
+
};
|
|
20150
|
+
};
|
|
20151
|
+
function AutocompleteWrapper(_ref) {
|
|
20152
|
+
var _targetIndex$getWidge, _isolatedIndex$getHel;
|
|
20153
|
+
var indicesConfig = _ref.indicesConfig,
|
|
20154
|
+
indices = _ref.indices,
|
|
20155
|
+
getSearchPageURL = _ref.getSearchPageURL,
|
|
20156
|
+
userOnSelect = _ref.onSelect,
|
|
20157
|
+
refine = _ref.refine,
|
|
20158
|
+
cssClasses = _ref.cssClasses,
|
|
20159
|
+
renderState = _ref.renderState,
|
|
20160
|
+
instantSearchInstance = _ref.instantSearchInstance;
|
|
20161
|
+
var isolatedIndex = renderState.isolatedIndex,
|
|
20162
|
+
targetIndex = renderState.targetIndex;
|
|
20163
|
+
var isSearchPage = (_targetIndex$getWidge = targetIndex === null || targetIndex === void 0 ? void 0 : targetIndex.getWidgets().some(function (_ref2) {
|
|
20164
|
+
var $$type = _ref2.$$type;
|
|
20165
|
+
return ['ais.hits', 'ais.infiniteHits'].includes($$type);
|
|
20166
|
+
})) !== null && _targetIndex$getWidge !== void 0 ? _targetIndex$getWidge : false;
|
|
20167
|
+
var onRefine = function onRefine(query) {
|
|
20168
|
+
instantSearchInstance.setUiState(function (uiState) {
|
|
20169
|
+
var _objectSpread2$1;
|
|
20170
|
+
return _objectSpread2(_objectSpread2({}, uiState), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, targetIndex.getIndexId(), _objectSpread2(_objectSpread2({}, uiState[targetIndex.getIndexId()]), {}, {
|
|
20171
|
+
query: query
|
|
20172
|
+
})), _defineProperty(_objectSpread2$1, isolatedIndex.getIndexId(), {
|
|
20173
|
+
query: query
|
|
20174
|
+
}), _objectSpread2$1));
|
|
20175
|
+
});
|
|
20176
|
+
};
|
|
20177
|
+
var _usePropGetters = usePropGetters({
|
|
20178
|
+
indices: indices,
|
|
20179
|
+
indicesConfig: indicesConfig,
|
|
20180
|
+
onRefine: onRefine,
|
|
20181
|
+
onSelect: userOnSelect !== null && userOnSelect !== void 0 ? userOnSelect : function (_ref3) {
|
|
20182
|
+
var query = _ref3.query,
|
|
20183
|
+
setQuery = _ref3.setQuery,
|
|
20184
|
+
url = _ref3.url;
|
|
20185
|
+
if (url) {
|
|
20186
|
+
window.location.href = url;
|
|
20187
|
+
return;
|
|
20188
|
+
}
|
|
20189
|
+
if (!isSearchPage && typeof getSearchPageURL !== 'undefined') {
|
|
20190
|
+
var indexUiState = instantSearchInstance.getUiState()[targetIndex.getIndexId()];
|
|
20191
|
+
window.location.href = getSearchPageURL(_objectSpread2(_objectSpread2({}, indexUiState), {}, {
|
|
20192
|
+
query: query
|
|
20193
|
+
}));
|
|
20194
|
+
return;
|
|
20195
|
+
}
|
|
20196
|
+
setQuery(query);
|
|
20197
|
+
}
|
|
20198
|
+
}),
|
|
20199
|
+
getInputProps = _usePropGetters.getInputProps,
|
|
20200
|
+
getItemProps = _usePropGetters.getItemProps,
|
|
20201
|
+
getPanelProps = _usePropGetters.getPanelProps,
|
|
20202
|
+
getRootProps = _usePropGetters.getRootProps;
|
|
20203
|
+
var query = isolatedIndex === null || isolatedIndex === void 0 ? void 0 : (_isolatedIndex$getHel = isolatedIndex.getHelper()) === null || _isolatedIndex$getHel === void 0 ? void 0 : _isolatedIndex$getHel.state.query;
|
|
20204
|
+
return h(Autocomplete, _extends({}, getRootProps(), {
|
|
20205
|
+
classNames: cssClasses
|
|
20206
|
+
}), h(AutocompleteSearchBox, {
|
|
20207
|
+
query: query || '',
|
|
20208
|
+
inputProps: _objectSpread2(_objectSpread2({}, getInputProps()), {}, {
|
|
20209
|
+
// @ts-ignore - This clashes with some ambient React JSX declarations.
|
|
20210
|
+
onInput: function onInput(evt) {
|
|
20211
|
+
return refine(evt.currentTarget.value);
|
|
20212
|
+
}
|
|
20213
|
+
}),
|
|
20214
|
+
onClear: function onClear() {
|
|
20215
|
+
return onRefine('');
|
|
20216
|
+
},
|
|
20217
|
+
isSearchStalled: instantSearchInstance.status === 'stalled'
|
|
20218
|
+
}), h(AutocompletePanel, getPanelProps(), indices.map(function (_ref4, i) {
|
|
20219
|
+
var _indicesConfig$i$temp;
|
|
20220
|
+
var indexId = _ref4.indexId,
|
|
20221
|
+
hits = _ref4.hits;
|
|
20222
|
+
if (!renderState.indexTemplateProps[i]) {
|
|
20223
|
+
renderState.indexTemplateProps[i] = prepareTemplateProps({
|
|
20224
|
+
defaultTemplates: {},
|
|
20225
|
+
templatesConfig: instantSearchInstance.templatesConfig,
|
|
20226
|
+
templates: indicesConfig[i].templates
|
|
20227
|
+
});
|
|
20228
|
+
}
|
|
20229
|
+
var headerComponent = (_indicesConfig$i$temp = indicesConfig[i].templates) !== null && _indicesConfig$i$temp !== void 0 && _indicesConfig$i$temp.header ? function (_ref5) {
|
|
20230
|
+
var items = _ref5.items;
|
|
20231
|
+
return h(Template, _extends({}, renderState.indexTemplateProps[i], {
|
|
20232
|
+
templateKey: "header",
|
|
20233
|
+
rootTagName: "fragment",
|
|
20234
|
+
data: {
|
|
20235
|
+
items: items
|
|
20236
|
+
}
|
|
20237
|
+
}));
|
|
20238
|
+
} : undefined;
|
|
20239
|
+
var itemComponent = function itemComponent(_ref6) {
|
|
20240
|
+
var item = _ref6.item,
|
|
20241
|
+
onSelect = _ref6.onSelect;
|
|
20242
|
+
return h(Template, _extends({}, renderState.indexTemplateProps[i], {
|
|
20243
|
+
templateKey: "item",
|
|
20244
|
+
rootTagName: "fragment",
|
|
20245
|
+
data: {
|
|
20246
|
+
item: item,
|
|
20247
|
+
onSelect: onSelect
|
|
20248
|
+
}
|
|
20249
|
+
}));
|
|
20250
|
+
};
|
|
20251
|
+
return h(AutocompleteIndex, {
|
|
20252
|
+
key: indexId,
|
|
20253
|
+
HeaderComponent: headerComponent,
|
|
20254
|
+
ItemComponent: itemComponent,
|
|
20255
|
+
items: hits.map(function (item) {
|
|
20256
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
20257
|
+
__indexName: indexId
|
|
20258
|
+
});
|
|
20259
|
+
}),
|
|
20260
|
+
getItemProps: getItemProps,
|
|
20261
|
+
classNames: indicesConfig[i].cssClasses
|
|
20262
|
+
});
|
|
20263
|
+
})));
|
|
20264
|
+
}
|
|
20265
|
+
function EXPERIMENTAL_autocomplete(widgetParams) {
|
|
20266
|
+
var _ref7 = widgetParams || {},
|
|
20267
|
+
container = _ref7.container,
|
|
20268
|
+
escapeHTML = _ref7.escapeHTML,
|
|
20269
|
+
_ref7$indices = _ref7.indices,
|
|
20270
|
+
indices = _ref7$indices === void 0 ? [] : _ref7$indices,
|
|
20271
|
+
showSuggestions = _ref7.showSuggestions,
|
|
20272
|
+
getSearchPageURL = _ref7.getSearchPageURL,
|
|
20273
|
+
onSelect = _ref7.onSelect,
|
|
20274
|
+
_ref7$templates = _ref7.templates,
|
|
20275
|
+
templates = _ref7$templates === void 0 ? {} : _ref7$templates,
|
|
20276
|
+
_ref7$cssClasses = _ref7.cssClasses,
|
|
20277
|
+
userCssClasses = _ref7$cssClasses === void 0 ? {} : _ref7$cssClasses;
|
|
20278
|
+
if (!container) {
|
|
20279
|
+
throw new Error(withUsage$z('The `container` option is required.'));
|
|
20280
|
+
}
|
|
20281
|
+
var containerNode = getContainerNode(container);
|
|
20282
|
+
var cssClasses = {
|
|
20283
|
+
root: cx(suit$6(), userCssClasses.root)
|
|
20284
|
+
};
|
|
20285
|
+
var indicesConfig = _toConsumableArray(indices);
|
|
20286
|
+
if (showSuggestions !== null && showSuggestions !== void 0 && showSuggestions.indexName) {
|
|
20287
|
+
var _showSuggestions$cssC, _showSuggestions$cssC2, _showSuggestions$cssC3, _showSuggestions$cssC4;
|
|
20288
|
+
indicesConfig.unshift({
|
|
20289
|
+
indexName: showSuggestions.indexName,
|
|
20290
|
+
templates: _objectSpread2({
|
|
20291
|
+
// @ts-expect-error
|
|
20292
|
+
item: AutocompleteSuggestion
|
|
20293
|
+
}, showSuggestions.templates),
|
|
20294
|
+
cssClasses: {
|
|
20295
|
+
root: cx('ais-AutocompleteSuggestions', (_showSuggestions$cssC = showSuggestions.cssClasses) === null || _showSuggestions$cssC === void 0 ? void 0 : _showSuggestions$cssC.root),
|
|
20296
|
+
list: cx('ais-AutocompleteSuggestionsList', (_showSuggestions$cssC2 = showSuggestions.cssClasses) === null || _showSuggestions$cssC2 === void 0 ? void 0 : _showSuggestions$cssC2.list),
|
|
20297
|
+
header: cx('ais-AutocompleteSuggestionsHeader', (_showSuggestions$cssC3 = showSuggestions.cssClasses) === null || _showSuggestions$cssC3 === void 0 ? void 0 : _showSuggestions$cssC3.header),
|
|
20298
|
+
item: cx('ais-AutocompleteSuggestionsItem', (_showSuggestions$cssC4 = showSuggestions.cssClasses) === null || _showSuggestions$cssC4 === void 0 ? void 0 : _showSuggestions$cssC4.item)
|
|
20299
|
+
},
|
|
20300
|
+
getQuery: function getQuery(item) {
|
|
20301
|
+
return item.query;
|
|
20302
|
+
},
|
|
20303
|
+
getURL: showSuggestions.getURL
|
|
20304
|
+
});
|
|
20305
|
+
}
|
|
20306
|
+
var instanceId = ++autocompleteInstanceId;
|
|
20307
|
+
var specializedRenderer = createRenderer({
|
|
20308
|
+
instanceId: instanceId,
|
|
20309
|
+
containerNode: containerNode,
|
|
20310
|
+
indicesConfig: indicesConfig,
|
|
20311
|
+
getSearchPageURL: getSearchPageURL,
|
|
20312
|
+
onSelect: onSelect,
|
|
20313
|
+
cssClasses: cssClasses,
|
|
20314
|
+
renderState: {
|
|
20315
|
+
indexTemplateProps: [],
|
|
20316
|
+
isolatedIndex: undefined,
|
|
20317
|
+
targetIndex: undefined
|
|
20318
|
+
},
|
|
20319
|
+
templates: templates
|
|
20320
|
+
});
|
|
20321
|
+
var makeWidget = connectAutocomplete(specializedRenderer, function () {
|
|
20322
|
+
return P(null, containerNode);
|
|
20323
|
+
});
|
|
20324
|
+
return [connectSearchBox(function () {
|
|
20325
|
+
return null;
|
|
20326
|
+
})({}), index({
|
|
20327
|
+
indexId: "ais-autocomplete-".concat(instanceId),
|
|
20328
|
+
EXPERIMENTAL_isolated: true
|
|
20329
|
+
}).addWidgets([configure({
|
|
20330
|
+
hitsPerPage: 5
|
|
20331
|
+
})].concat(_toConsumableArray(indicesConfig.map(function (_ref8) {
|
|
20332
|
+
var indexName = _ref8.indexName;
|
|
20333
|
+
return index({
|
|
20334
|
+
indexName: indexName,
|
|
20335
|
+
indexId: indexName
|
|
20336
|
+
}).addWidgets([configure({})]);
|
|
20337
|
+
})), [_objectSpread2(_objectSpread2({}, makeWidget({
|
|
20338
|
+
escapeHTML: escapeHTML
|
|
20339
|
+
})), {}, {
|
|
20340
|
+
$$widgetType: 'ais.autocomplete'
|
|
20341
|
+
})]))];
|
|
20342
|
+
}
|
|
20343
|
+
|
|
19620
20344
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
19621
20345
|
var items = _ref.items,
|
|
19622
20346
|
cssClasses = _ref.cssClasses,
|
|
@@ -19678,10 +20402,10 @@
|
|
|
19678
20402
|
}
|
|
19679
20403
|
};
|
|
19680
20404
|
|
|
19681
|
-
var withUsage$
|
|
20405
|
+
var withUsage$A = createDocumentationMessageGenerator({
|
|
19682
20406
|
name: 'breadcrumb'
|
|
19683
20407
|
});
|
|
19684
|
-
var suit$
|
|
20408
|
+
var suit$7 = component('Breadcrumb');
|
|
19685
20409
|
var renderer$1 = function renderer(_ref) {
|
|
19686
20410
|
var containerNode = _ref.containerNode,
|
|
19687
20411
|
cssClasses = _ref.cssClasses,
|
|
@@ -19723,28 +20447,28 @@
|
|
|
19723
20447
|
_ref3$cssClasses = _ref3.cssClasses,
|
|
19724
20448
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses;
|
|
19725
20449
|
if (!container) {
|
|
19726
|
-
throw new Error(withUsage$
|
|
20450
|
+
throw new Error(withUsage$A('The `container` option is required.'));
|
|
19727
20451
|
}
|
|
19728
20452
|
var containerNode = getContainerNode(container);
|
|
19729
20453
|
var cssClasses = {
|
|
19730
|
-
root: cx(suit$
|
|
19731
|
-
noRefinementRoot: cx(suit$
|
|
20454
|
+
root: cx(suit$7(), userCssClasses.root),
|
|
20455
|
+
noRefinementRoot: cx(suit$7({
|
|
19732
20456
|
modifierName: 'noRefinement'
|
|
19733
20457
|
}), userCssClasses.noRefinementRoot),
|
|
19734
|
-
list: cx(suit$
|
|
20458
|
+
list: cx(suit$7({
|
|
19735
20459
|
descendantName: 'list'
|
|
19736
20460
|
}), userCssClasses.list),
|
|
19737
|
-
item: cx(suit$
|
|
20461
|
+
item: cx(suit$7({
|
|
19738
20462
|
descendantName: 'item'
|
|
19739
20463
|
}), userCssClasses.item),
|
|
19740
|
-
selectedItem: cx(suit$
|
|
20464
|
+
selectedItem: cx(suit$7({
|
|
19741
20465
|
descendantName: 'item',
|
|
19742
20466
|
modifierName: 'selected'
|
|
19743
20467
|
}), userCssClasses.selectedItem),
|
|
19744
|
-
separator: cx(suit$
|
|
20468
|
+
separator: cx(suit$7({
|
|
19745
20469
|
descendantName: 'separator'
|
|
19746
20470
|
}), userCssClasses.separator),
|
|
19747
|
-
link: cx(suit$
|
|
20471
|
+
link: cx(suit$7({
|
|
19748
20472
|
descendantName: 'link'
|
|
19749
20473
|
}), userCssClasses.link)
|
|
19750
20474
|
};
|
|
@@ -19794,10 +20518,10 @@
|
|
|
19794
20518
|
}
|
|
19795
20519
|
};
|
|
19796
20520
|
|
|
19797
|
-
var withUsage$
|
|
20521
|
+
var withUsage$B = createDocumentationMessageGenerator({
|
|
19798
20522
|
name: 'clear-refinements'
|
|
19799
20523
|
});
|
|
19800
|
-
var suit$
|
|
20524
|
+
var suit$8 = component('ClearRefinements');
|
|
19801
20525
|
var renderer$2 = function renderer(_ref) {
|
|
19802
20526
|
var containerNode = _ref.containerNode,
|
|
19803
20527
|
cssClasses = _ref.cssClasses,
|
|
@@ -19834,15 +20558,15 @@
|
|
|
19834
20558
|
_ref3$cssClasses = _ref3.cssClasses,
|
|
19835
20559
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses;
|
|
19836
20560
|
if (!container) {
|
|
19837
|
-
throw new Error(withUsage$
|
|
20561
|
+
throw new Error(withUsage$B('The `container` option is required.'));
|
|
19838
20562
|
}
|
|
19839
20563
|
var containerNode = getContainerNode(container);
|
|
19840
20564
|
var cssClasses = {
|
|
19841
|
-
root: cx(suit$
|
|
19842
|
-
button: cx(suit$
|
|
20565
|
+
root: cx(suit$8(), userCssClasses.root),
|
|
20566
|
+
button: cx(suit$8({
|
|
19843
20567
|
descendantName: 'button'
|
|
19844
20568
|
}), userCssClasses.button),
|
|
19845
|
-
disabledButton: cx(suit$
|
|
20569
|
+
disabledButton: cx(suit$8({
|
|
19846
20570
|
descendantName: 'button',
|
|
19847
20571
|
modifierName: 'disabled'
|
|
19848
20572
|
}), userCssClasses.disabledButton)
|
|
@@ -19865,22 +20589,6 @@
|
|
|
19865
20589
|
});
|
|
19866
20590
|
};
|
|
19867
20591
|
|
|
19868
|
-
/**
|
|
19869
|
-
* A list of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/)
|
|
19870
|
-
* to enable when the widget mounts.
|
|
19871
|
-
*/
|
|
19872
|
-
|
|
19873
|
-
var configure = function configure(widgetParams) {
|
|
19874
|
-
// This is a renderless widget that falls back to the connector's
|
|
19875
|
-
// noop render and unmount functions.
|
|
19876
|
-
var makeWidget = connectConfigure(noop);
|
|
19877
|
-
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
19878
|
-
searchParameters: widgetParams
|
|
19879
|
-
})), {}, {
|
|
19880
|
-
$$widgetType: 'ais.configure'
|
|
19881
|
-
});
|
|
19882
|
-
};
|
|
19883
|
-
|
|
19884
20592
|
var createItemKey = function createItemKey(_ref) {
|
|
19885
20593
|
var attribute = _ref.attribute,
|
|
19886
20594
|
value = _ref.value,
|
|
@@ -19928,10 +20636,10 @@
|
|
|
19928
20636
|
})));
|
|
19929
20637
|
};
|
|
19930
20638
|
|
|
19931
|
-
var withUsage$
|
|
20639
|
+
var withUsage$C = createDocumentationMessageGenerator({
|
|
19932
20640
|
name: 'current-refinements'
|
|
19933
20641
|
});
|
|
19934
|
-
var suit$
|
|
20642
|
+
var suit$9 = component('CurrentRefinements');
|
|
19935
20643
|
var renderer$3 = function renderer(_ref, isFirstRender) {
|
|
19936
20644
|
var items = _ref.items,
|
|
19937
20645
|
widgetParams = _ref.widgetParams,
|
|
@@ -19957,30 +20665,30 @@
|
|
|
19957
20665
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses,
|
|
19958
20666
|
transformItems = _ref3.transformItems;
|
|
19959
20667
|
if (!container) {
|
|
19960
|
-
throw new Error(withUsage$
|
|
20668
|
+
throw new Error(withUsage$C('The `container` option is required.'));
|
|
19961
20669
|
}
|
|
19962
20670
|
var containerNode = getContainerNode(container);
|
|
19963
20671
|
var cssClasses = {
|
|
19964
|
-
root: cx(suit$
|
|
19965
|
-
noRefinementRoot: cx(suit$
|
|
20672
|
+
root: cx(suit$9(), userCssClasses.root),
|
|
20673
|
+
noRefinementRoot: cx(suit$9({
|
|
19966
20674
|
modifierName: 'noRefinement'
|
|
19967
20675
|
}), userCssClasses.noRefinementRoot),
|
|
19968
|
-
list: cx(suit$
|
|
20676
|
+
list: cx(suit$9({
|
|
19969
20677
|
descendantName: 'list'
|
|
19970
20678
|
}), userCssClasses.list),
|
|
19971
|
-
item: cx(suit$
|
|
20679
|
+
item: cx(suit$9({
|
|
19972
20680
|
descendantName: 'item'
|
|
19973
20681
|
}), userCssClasses.item),
|
|
19974
|
-
label: cx(suit$
|
|
20682
|
+
label: cx(suit$9({
|
|
19975
20683
|
descendantName: 'label'
|
|
19976
20684
|
}), userCssClasses.label),
|
|
19977
|
-
category: cx(suit$
|
|
20685
|
+
category: cx(suit$9({
|
|
19978
20686
|
descendantName: 'category'
|
|
19979
20687
|
}), userCssClasses.category),
|
|
19980
|
-
categoryLabel: cx(suit$
|
|
20688
|
+
categoryLabel: cx(suit$9({
|
|
19981
20689
|
descendantName: 'categoryLabel'
|
|
19982
20690
|
}), userCssClasses.categoryLabel),
|
|
19983
|
-
delete: cx(suit$
|
|
20691
|
+
delete: cx(suit$9({
|
|
19984
20692
|
descendantName: 'delete'
|
|
19985
20693
|
}), userCssClasses.delete)
|
|
19986
20694
|
};
|
|
@@ -20387,13 +21095,13 @@
|
|
|
20387
21095
|
}), container.querySelector(".".concat(cssClasses.tree)));
|
|
20388
21096
|
};
|
|
20389
21097
|
|
|
20390
|
-
var _excluded$
|
|
21098
|
+
var _excluded$t = ["initialZoom", "initialPosition", "templates", "cssClasses", "builtInMarker", "customHTMLMarker", "enableRefine", "enableClearMapRefinement", "enableRefineControl", "container", "googleReference"],
|
|
20391
21099
|
_excluded2$5 = ["item"],
|
|
20392
21100
|
_excluded3 = ["item"];
|
|
20393
|
-
var withUsage$
|
|
21101
|
+
var withUsage$D = createDocumentationMessageGenerator({
|
|
20394
21102
|
name: 'geo-search'
|
|
20395
21103
|
});
|
|
20396
|
-
var suit$
|
|
21104
|
+
var suit$a = component('GeoSearch');
|
|
20397
21105
|
/**
|
|
20398
21106
|
* The **GeoSearch** widget displays the list of results from the search on a Google Maps. It also provides a way to search for results based on their position. The widget also provide some of the common GeoSearch patterns like search on map interaction.
|
|
20399
21107
|
*
|
|
@@ -20431,7 +21139,7 @@
|
|
|
20431
21139
|
enableRefineControl = _ref$enableRefineCont === void 0 ? true : _ref$enableRefineCont,
|
|
20432
21140
|
container = _ref.container,
|
|
20433
21141
|
googleReference = _ref.googleReference,
|
|
20434
|
-
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$
|
|
21142
|
+
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$t);
|
|
20435
21143
|
var defaultBuiltInMarker = {
|
|
20436
21144
|
createOptions: function createOptions() {
|
|
20437
21145
|
return {};
|
|
@@ -20445,42 +21153,42 @@
|
|
|
20445
21153
|
events: {}
|
|
20446
21154
|
};
|
|
20447
21155
|
if (!container) {
|
|
20448
|
-
throw new Error(withUsage$
|
|
21156
|
+
throw new Error(withUsage$D('The `container` option is required.'));
|
|
20449
21157
|
}
|
|
20450
21158
|
if (!googleReference) {
|
|
20451
|
-
throw new Error(withUsage$
|
|
21159
|
+
throw new Error(withUsage$D('The `googleReference` option is required.'));
|
|
20452
21160
|
}
|
|
20453
21161
|
var containerNode = getContainerNode(container);
|
|
20454
21162
|
var cssClasses = {
|
|
20455
|
-
root: cx(suit$
|
|
21163
|
+
root: cx(suit$a(), userCssClasses.root),
|
|
20456
21164
|
// Required only to mount / unmount the Preact tree
|
|
20457
|
-
tree: suit$
|
|
21165
|
+
tree: suit$a({
|
|
20458
21166
|
descendantName: 'tree'
|
|
20459
21167
|
}),
|
|
20460
|
-
map: cx(suit$
|
|
21168
|
+
map: cx(suit$a({
|
|
20461
21169
|
descendantName: 'map'
|
|
20462
21170
|
}), userCssClasses.map),
|
|
20463
|
-
control: cx(suit$
|
|
21171
|
+
control: cx(suit$a({
|
|
20464
21172
|
descendantName: 'control'
|
|
20465
21173
|
}), userCssClasses.control),
|
|
20466
|
-
label: cx(suit$
|
|
21174
|
+
label: cx(suit$a({
|
|
20467
21175
|
descendantName: 'label'
|
|
20468
21176
|
}), userCssClasses.label),
|
|
20469
|
-
selectedLabel: cx(suit$
|
|
21177
|
+
selectedLabel: cx(suit$a({
|
|
20470
21178
|
descendantName: 'label',
|
|
20471
21179
|
modifierName: 'selected'
|
|
20472
21180
|
}), userCssClasses.selectedLabel),
|
|
20473
|
-
input: cx(suit$
|
|
21181
|
+
input: cx(suit$a({
|
|
20474
21182
|
descendantName: 'input'
|
|
20475
21183
|
}), userCssClasses.input),
|
|
20476
|
-
redo: cx(suit$
|
|
21184
|
+
redo: cx(suit$a({
|
|
20477
21185
|
descendantName: 'redo'
|
|
20478
21186
|
}), userCssClasses.redo),
|
|
20479
|
-
disabledRedo: cx(suit$
|
|
21187
|
+
disabledRedo: cx(suit$a({
|
|
20480
21188
|
descendantName: 'redo',
|
|
20481
21189
|
modifierName: 'disabled'
|
|
20482
21190
|
}), userCssClasses.disabledRedo),
|
|
20483
|
-
reset: cx(suit$
|
|
21191
|
+
reset: cx(suit$a({
|
|
20484
21192
|
descendantName: 'reset'
|
|
20485
21193
|
}), userCssClasses.reset)
|
|
20486
21194
|
};
|
|
@@ -20504,7 +21212,7 @@
|
|
|
20504
21212
|
return new HTMLMarker(_objectSpread2(_objectSpread2(_objectSpread2({}, customHTMLMarker.createOptions(item)), rest), {}, {
|
|
20505
21213
|
__id: item.objectID,
|
|
20506
21214
|
position: item._geoloc,
|
|
20507
|
-
className: cx(suit$
|
|
21215
|
+
className: cx(suit$a({
|
|
20508
21216
|
descendantName: 'marker'
|
|
20509
21217
|
})),
|
|
20510
21218
|
template: renderTemplate({
|
|
@@ -20553,7 +21261,8 @@
|
|
|
20553
21261
|
onChange: noop,
|
|
20554
21262
|
onSubmit: noop,
|
|
20555
21263
|
onReset: noop,
|
|
20556
|
-
refine: noop
|
|
21264
|
+
refine: noop,
|
|
21265
|
+
inputProps: {}
|
|
20557
21266
|
};
|
|
20558
21267
|
var SearchBox = /*#__PURE__*/function (_Component) {
|
|
20559
21268
|
_inherits(SearchBox, _Component);
|
|
@@ -20571,6 +21280,9 @@
|
|
|
20571
21280
|
});
|
|
20572
21281
|
_defineProperty(_assertThisInitialized(_this), "input", y());
|
|
20573
21282
|
_defineProperty(_assertThisInitialized(_this), "onInput", function (event) {
|
|
21283
|
+
var _this$props$inputProp, _this$props$inputProp2;
|
|
21284
|
+
// @ts-expect-error the context incompatibility of `this` doesn't matter
|
|
21285
|
+
(_this$props$inputProp = (_this$props$inputProp2 = _this.props.inputProps).onInput) === null || _this$props$inputProp === void 0 ? void 0 : _this$props$inputProp.call(_this$props$inputProp2, event);
|
|
20574
21286
|
var _this$props = _this.props,
|
|
20575
21287
|
searchAsYouType = _this$props.searchAsYouType,
|
|
20576
21288
|
refine = _this$props.refine,
|
|
@@ -20616,12 +21328,18 @@
|
|
|
20616
21328
|
});
|
|
20617
21329
|
onReset(event);
|
|
20618
21330
|
});
|
|
20619
|
-
_defineProperty(_assertThisInitialized(_this), "onBlur", function () {
|
|
21331
|
+
_defineProperty(_assertThisInitialized(_this), "onBlur", function (event) {
|
|
21332
|
+
var _this$props$inputProp3, _this$props$inputProp4;
|
|
21333
|
+
// @ts-expect-error the context incompatibility of `this` doesn't matter
|
|
21334
|
+
(_this$props$inputProp3 = (_this$props$inputProp4 = _this.props.inputProps).onBlur) === null || _this$props$inputProp3 === void 0 ? void 0 : _this$props$inputProp3.call(_this$props$inputProp4, event);
|
|
20620
21335
|
_this.setState({
|
|
20621
21336
|
focused: false
|
|
20622
21337
|
});
|
|
20623
21338
|
});
|
|
20624
|
-
_defineProperty(_assertThisInitialized(_this), "onFocus", function () {
|
|
21339
|
+
_defineProperty(_assertThisInitialized(_this), "onFocus", function (event) {
|
|
21340
|
+
var _this$props$inputProp5, _this$props$inputProp6;
|
|
21341
|
+
// @ts-expect-error the context incompatibility of `this` doesn't matter
|
|
21342
|
+
(_this$props$inputProp5 = (_this$props$inputProp6 = _this.props.inputProps).onFocus) === null || _this$props$inputProp5 === void 0 ? void 0 : _this$props$inputProp5.call(_this$props$inputProp6, event);
|
|
20625
21343
|
_this.setState({
|
|
20626
21344
|
focused: true
|
|
20627
21345
|
});
|
|
@@ -20669,7 +21387,8 @@
|
|
|
20669
21387
|
showLoadingIndicator = _this$props4.showLoadingIndicator,
|
|
20670
21388
|
templates = _this$props4.templates,
|
|
20671
21389
|
isSearchStalled = _this$props4.isSearchStalled,
|
|
20672
|
-
ariaLabel = _this$props4.ariaLabel
|
|
21390
|
+
ariaLabel = _this$props4.ariaLabel,
|
|
21391
|
+
inputProps = _this$props4.inputProps;
|
|
20673
21392
|
return h("div", {
|
|
20674
21393
|
className: cssClasses.root
|
|
20675
21394
|
}, h("form", {
|
|
@@ -20679,7 +21398,7 @@
|
|
|
20679
21398
|
noValidate: true,
|
|
20680
21399
|
onSubmit: this.onSubmit,
|
|
20681
21400
|
onReset: this.onReset
|
|
20682
|
-
}, h("input", {
|
|
21401
|
+
}, h("input", _extends({}, inputProps, {
|
|
20683
21402
|
ref: this.input,
|
|
20684
21403
|
value: this.state.query,
|
|
20685
21404
|
disabled: this.props.disabled,
|
|
@@ -20702,7 +21421,7 @@
|
|
|
20702
21421
|
onBlur: this.onBlur,
|
|
20703
21422
|
onFocus: this.onFocus,
|
|
20704
21423
|
"aria-label": ariaLabel
|
|
20705
|
-
}), h(Template, {
|
|
21424
|
+
})), h(Template, {
|
|
20706
21425
|
templateKey: "submit",
|
|
20707
21426
|
rootTagName: "button",
|
|
20708
21427
|
rootProps: {
|
|
@@ -20770,7 +21489,7 @@
|
|
|
20770
21489
|
})), subItems);
|
|
20771
21490
|
}
|
|
20772
21491
|
|
|
20773
|
-
var _excluded$
|
|
21492
|
+
var _excluded$u = ["root"];
|
|
20774
21493
|
|
|
20775
21494
|
// CSS types
|
|
20776
21495
|
|
|
@@ -20799,7 +21518,7 @@
|
|
|
20799
21518
|
if (isHierarchicalMenuItem(facetValue) && Array.isArray(facetValue.data) && facetValue.data.length > 0) {
|
|
20800
21519
|
var _this$props$cssClasse = _this.props.cssClasses,
|
|
20801
21520
|
root = _this$props$cssClasse.root,
|
|
20802
|
-
cssClasses = _objectWithoutProperties(_this$props$cssClasse, _excluded$
|
|
21521
|
+
cssClasses = _objectWithoutProperties(_this$props$cssClasse, _excluded$u);
|
|
20803
21522
|
subItems = h(RefinementList, _extends({}, _this.props, {
|
|
20804
21523
|
// We want to keep `root` required for external usage but not for the
|
|
20805
21524
|
// sub items.
|
|
@@ -21014,10 +21733,10 @@
|
|
|
21014
21733
|
}
|
|
21015
21734
|
};
|
|
21016
21735
|
|
|
21017
|
-
var withUsage$
|
|
21736
|
+
var withUsage$E = createDocumentationMessageGenerator({
|
|
21018
21737
|
name: 'hierarchical-menu'
|
|
21019
21738
|
});
|
|
21020
|
-
var suit$
|
|
21739
|
+
var suit$b = component('HierarchicalMenu');
|
|
21021
21740
|
var renderer$5 = function renderer(_ref) {
|
|
21022
21741
|
var cssClasses = _ref.cssClasses,
|
|
21023
21742
|
containerNode = _ref.containerNode,
|
|
@@ -21124,49 +21843,49 @@
|
|
|
21124
21843
|
_ref3$cssClasses = _ref3.cssClasses,
|
|
21125
21844
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses;
|
|
21126
21845
|
if (!container) {
|
|
21127
|
-
throw new Error(withUsage$
|
|
21846
|
+
throw new Error(withUsage$E('The `container` option is required.'));
|
|
21128
21847
|
}
|
|
21129
21848
|
var containerNode = getContainerNode(container);
|
|
21130
21849
|
var cssClasses = {
|
|
21131
|
-
root: cx(suit$
|
|
21132
|
-
noRefinementRoot: cx(suit$
|
|
21850
|
+
root: cx(suit$b(), userCssClasses.root),
|
|
21851
|
+
noRefinementRoot: cx(suit$b({
|
|
21133
21852
|
modifierName: 'noRefinement'
|
|
21134
21853
|
}), userCssClasses.noRefinementRoot),
|
|
21135
|
-
list: cx(suit$
|
|
21854
|
+
list: cx(suit$b({
|
|
21136
21855
|
descendantName: 'list'
|
|
21137
21856
|
}), userCssClasses.list),
|
|
21138
|
-
childList: cx(suit$
|
|
21857
|
+
childList: cx(suit$b({
|
|
21139
21858
|
descendantName: 'list',
|
|
21140
21859
|
modifierName: 'child'
|
|
21141
21860
|
}), userCssClasses.childList),
|
|
21142
|
-
item: cx(suit$
|
|
21861
|
+
item: cx(suit$b({
|
|
21143
21862
|
descendantName: 'item'
|
|
21144
21863
|
}), userCssClasses.item),
|
|
21145
|
-
selectedItem: cx(suit$
|
|
21864
|
+
selectedItem: cx(suit$b({
|
|
21146
21865
|
descendantName: 'item',
|
|
21147
21866
|
modifierName: 'selected'
|
|
21148
21867
|
}), userCssClasses.selectedItem),
|
|
21149
|
-
parentItem: cx(suit$
|
|
21868
|
+
parentItem: cx(suit$b({
|
|
21150
21869
|
descendantName: 'item',
|
|
21151
21870
|
modifierName: 'parent'
|
|
21152
21871
|
}), userCssClasses.parentItem),
|
|
21153
|
-
link: cx(suit$
|
|
21872
|
+
link: cx(suit$b({
|
|
21154
21873
|
descendantName: 'link'
|
|
21155
21874
|
}), userCssClasses.link),
|
|
21156
|
-
selectedItemLink: cx(suit$
|
|
21875
|
+
selectedItemLink: cx(suit$b({
|
|
21157
21876
|
descendantName: 'link',
|
|
21158
21877
|
modifierName: 'selected'
|
|
21159
21878
|
}), userCssClasses.selectedItemLink),
|
|
21160
|
-
label: cx(suit$
|
|
21879
|
+
label: cx(suit$b({
|
|
21161
21880
|
descendantName: 'label'
|
|
21162
21881
|
}), userCssClasses.label),
|
|
21163
|
-
count: cx(suit$
|
|
21882
|
+
count: cx(suit$b({
|
|
21164
21883
|
descendantName: 'count'
|
|
21165
21884
|
}), userCssClasses.count),
|
|
21166
|
-
showMore: cx(suit$
|
|
21885
|
+
showMore: cx(suit$b({
|
|
21167
21886
|
descendantName: 'showMore'
|
|
21168
21887
|
}), userCssClasses.showMore),
|
|
21169
|
-
disabledShowMore: cx(suit$
|
|
21888
|
+
disabledShowMore: cx(suit$b({
|
|
21170
21889
|
descendantName: 'showMore',
|
|
21171
21890
|
modifierName: 'disabled'
|
|
21172
21891
|
}), userCssClasses.disabledShowMore)
|
|
@@ -21208,8 +21927,8 @@
|
|
|
21208
21927
|
}
|
|
21209
21928
|
};
|
|
21210
21929
|
|
|
21211
|
-
var _excluded$
|
|
21212
|
-
var withUsage$
|
|
21930
|
+
var _excluded$v = ["hit", "index"];
|
|
21931
|
+
var withUsage$F = createDocumentationMessageGenerator({
|
|
21213
21932
|
name: 'hits'
|
|
21214
21933
|
});
|
|
21215
21934
|
var Hits = createHitsComponent({
|
|
@@ -21256,7 +21975,7 @@
|
|
|
21256
21975
|
var itemComponent = function itemComponent(_ref4) {
|
|
21257
21976
|
var hit = _ref4.hit,
|
|
21258
21977
|
index = _ref4.index,
|
|
21259
|
-
rootProps = _objectWithoutProperties(_ref4, _excluded$
|
|
21978
|
+
rootProps = _objectWithoutProperties(_ref4, _excluded$v);
|
|
21260
21979
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
21261
21980
|
templateKey: "item",
|
|
21262
21981
|
rootTagName: "li",
|
|
@@ -21308,7 +22027,7 @@
|
|
|
21308
22027
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
21309
22028
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
21310
22029
|
if (!container) {
|
|
21311
|
-
throw new Error(withUsage$
|
|
22030
|
+
throw new Error(withUsage$F('The `container` option is required.'));
|
|
21312
22031
|
}
|
|
21313
22032
|
var containerNode = getContainerNode(container);
|
|
21314
22033
|
var specializedRenderer = renderer$6({
|
|
@@ -21350,10 +22069,10 @@
|
|
|
21350
22069
|
}));
|
|
21351
22070
|
}
|
|
21352
22071
|
|
|
21353
|
-
var withUsage$
|
|
22072
|
+
var withUsage$G = createDocumentationMessageGenerator({
|
|
21354
22073
|
name: 'hits-per-page'
|
|
21355
22074
|
});
|
|
21356
|
-
var suit$
|
|
22075
|
+
var suit$c = component('HitsPerPage');
|
|
21357
22076
|
var renderer$7 = function renderer(_ref) {
|
|
21358
22077
|
var containerNode = _ref.containerNode,
|
|
21359
22078
|
cssClasses = _ref.cssClasses;
|
|
@@ -21386,15 +22105,15 @@
|
|
|
21386
22105
|
userCssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses,
|
|
21387
22106
|
transformItems = _ref5.transformItems;
|
|
21388
22107
|
if (!container) {
|
|
21389
|
-
throw new Error(withUsage$
|
|
22108
|
+
throw new Error(withUsage$G('The `container` option is required.'));
|
|
21390
22109
|
}
|
|
21391
22110
|
var containerNode = getContainerNode(container);
|
|
21392
22111
|
var cssClasses = {
|
|
21393
|
-
root: cx(suit$
|
|
21394
|
-
select: cx(suit$
|
|
22112
|
+
root: cx(suit$c(), userCssClasses.root),
|
|
22113
|
+
select: cx(suit$c({
|
|
21395
22114
|
descendantName: 'select'
|
|
21396
22115
|
}), userCssClasses.select),
|
|
21397
|
-
option: cx(suit$
|
|
22116
|
+
option: cx(suit$c({
|
|
21398
22117
|
descendantName: 'option'
|
|
21399
22118
|
}), userCssClasses.option)
|
|
21400
22119
|
};
|
|
@@ -21546,10 +22265,10 @@
|
|
|
21546
22265
|
}
|
|
21547
22266
|
};
|
|
21548
22267
|
|
|
21549
|
-
var withUsage$
|
|
22268
|
+
var withUsage$H = createDocumentationMessageGenerator({
|
|
21550
22269
|
name: 'infinite-hits'
|
|
21551
22270
|
});
|
|
21552
|
-
var suit$
|
|
22271
|
+
var suit$d = component('InfiniteHits');
|
|
21553
22272
|
var renderer$8 = function renderer(_ref) {
|
|
21554
22273
|
var containerNode = _ref.containerNode,
|
|
21555
22274
|
cssClasses = _ref.cssClasses,
|
|
@@ -21605,41 +22324,41 @@
|
|
|
21605
22324
|
showPrevious = _ref3.showPrevious,
|
|
21606
22325
|
cache = _ref3.cache;
|
|
21607
22326
|
if (!container) {
|
|
21608
|
-
throw new Error(withUsage$
|
|
22327
|
+
throw new Error(withUsage$H('The `container` option is required.'));
|
|
21609
22328
|
}
|
|
21610
22329
|
var containerNode = getContainerNode(container);
|
|
21611
22330
|
var cssClasses = {
|
|
21612
|
-
root: cx(suit$
|
|
21613
|
-
emptyRoot: cx(suit$
|
|
22331
|
+
root: cx(suit$d(), userCssClasses.root),
|
|
22332
|
+
emptyRoot: cx(suit$d({
|
|
21614
22333
|
modifierName: 'empty'
|
|
21615
22334
|
}), userCssClasses.emptyRoot),
|
|
21616
|
-
item: cx(suit$
|
|
22335
|
+
item: cx(suit$d({
|
|
21617
22336
|
descendantName: 'item'
|
|
21618
22337
|
}), userCssClasses.item),
|
|
21619
|
-
list: cx(suit$
|
|
22338
|
+
list: cx(suit$d({
|
|
21620
22339
|
descendantName: 'list'
|
|
21621
22340
|
}), userCssClasses.list),
|
|
21622
|
-
loadPrevious: cx(suit$
|
|
22341
|
+
loadPrevious: cx(suit$d({
|
|
21623
22342
|
descendantName: 'loadPrevious'
|
|
21624
22343
|
}), userCssClasses.loadPrevious),
|
|
21625
|
-
disabledLoadPrevious: cx(suit$
|
|
22344
|
+
disabledLoadPrevious: cx(suit$d({
|
|
21626
22345
|
descendantName: 'loadPrevious',
|
|
21627
22346
|
modifierName: 'disabled'
|
|
21628
22347
|
}), userCssClasses.disabledLoadPrevious),
|
|
21629
|
-
loadMore: cx(suit$
|
|
22348
|
+
loadMore: cx(suit$d({
|
|
21630
22349
|
descendantName: 'loadMore'
|
|
21631
22350
|
}), userCssClasses.loadMore),
|
|
21632
|
-
disabledLoadMore: cx(suit$
|
|
22351
|
+
disabledLoadMore: cx(suit$d({
|
|
21633
22352
|
descendantName: 'loadMore',
|
|
21634
22353
|
modifierName: 'disabled'
|
|
21635
22354
|
}), userCssClasses.disabledLoadMore),
|
|
21636
|
-
bannerRoot: cx(suit$
|
|
22355
|
+
bannerRoot: cx(suit$d({
|
|
21637
22356
|
descendantName: 'banner'
|
|
21638
22357
|
}), userCssClasses.bannerRoot),
|
|
21639
|
-
bannerImage: cx(suit$
|
|
22358
|
+
bannerImage: cx(suit$d({
|
|
21640
22359
|
descendantName: 'banner-image'
|
|
21641
22360
|
}), userCssClasses.bannerImage),
|
|
21642
|
-
bannerLink: cx(suit$
|
|
22361
|
+
bannerLink: cx(suit$d({
|
|
21643
22362
|
descendantName: 'banner-link'
|
|
21644
22363
|
}), userCssClasses.bannerLink)
|
|
21645
22364
|
};
|
|
@@ -21684,10 +22403,10 @@
|
|
|
21684
22403
|
}
|
|
21685
22404
|
};
|
|
21686
22405
|
|
|
21687
|
-
var withUsage$
|
|
22406
|
+
var withUsage$I = createDocumentationMessageGenerator({
|
|
21688
22407
|
name: 'menu'
|
|
21689
22408
|
});
|
|
21690
|
-
var suit$
|
|
22409
|
+
var suit$e = component('Menu');
|
|
21691
22410
|
var renderer$9 = function renderer(_ref) {
|
|
21692
22411
|
var containerNode = _ref.containerNode,
|
|
21693
22412
|
cssClasses = _ref.cssClasses,
|
|
@@ -21742,37 +22461,37 @@
|
|
|
21742
22461
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
21743
22462
|
transformItems = _ref3.transformItems;
|
|
21744
22463
|
if (!container) {
|
|
21745
|
-
throw new Error(withUsage$
|
|
22464
|
+
throw new Error(withUsage$I('The `container` option is required.'));
|
|
21746
22465
|
}
|
|
21747
22466
|
var containerNode = getContainerNode(container);
|
|
21748
22467
|
var cssClasses = {
|
|
21749
|
-
root: cx(suit$
|
|
21750
|
-
noRefinementRoot: cx(suit$
|
|
22468
|
+
root: cx(suit$e(), userCssClasses.root),
|
|
22469
|
+
noRefinementRoot: cx(suit$e({
|
|
21751
22470
|
modifierName: 'noRefinement'
|
|
21752
22471
|
}), userCssClasses.noRefinementRoot),
|
|
21753
|
-
list: cx(suit$
|
|
22472
|
+
list: cx(suit$e({
|
|
21754
22473
|
descendantName: 'list'
|
|
21755
22474
|
}), userCssClasses.list),
|
|
21756
|
-
item: cx(suit$
|
|
22475
|
+
item: cx(suit$e({
|
|
21757
22476
|
descendantName: 'item'
|
|
21758
22477
|
}), userCssClasses.item),
|
|
21759
|
-
selectedItem: cx(suit$
|
|
22478
|
+
selectedItem: cx(suit$e({
|
|
21760
22479
|
descendantName: 'item',
|
|
21761
22480
|
modifierName: 'selected'
|
|
21762
22481
|
}), userCssClasses.selectedItem),
|
|
21763
|
-
link: cx(suit$
|
|
22482
|
+
link: cx(suit$e({
|
|
21764
22483
|
descendantName: 'link'
|
|
21765
22484
|
}), userCssClasses.link),
|
|
21766
|
-
label: cx(suit$
|
|
22485
|
+
label: cx(suit$e({
|
|
21767
22486
|
descendantName: 'label'
|
|
21768
22487
|
}), userCssClasses.label),
|
|
21769
|
-
count: cx(suit$
|
|
22488
|
+
count: cx(suit$e({
|
|
21770
22489
|
descendantName: 'count'
|
|
21771
22490
|
}), userCssClasses.count),
|
|
21772
|
-
showMore: cx(suit$
|
|
22491
|
+
showMore: cx(suit$e({
|
|
21773
22492
|
descendantName: 'showMore'
|
|
21774
22493
|
}), userCssClasses.showMore),
|
|
21775
|
-
disabledShowMore: cx(suit$
|
|
22494
|
+
disabledShowMore: cx(suit$e({
|
|
21776
22495
|
descendantName: 'showMore',
|
|
21777
22496
|
modifierName: 'disabled'
|
|
21778
22497
|
}), userCssClasses.disabledShowMore)
|
|
@@ -21850,10 +22569,10 @@
|
|
|
21850
22569
|
}
|
|
21851
22570
|
};
|
|
21852
22571
|
|
|
21853
|
-
var withUsage$
|
|
22572
|
+
var withUsage$J = createDocumentationMessageGenerator({
|
|
21854
22573
|
name: 'menu-select'
|
|
21855
22574
|
});
|
|
21856
|
-
var suit$
|
|
22575
|
+
var suit$f = component('MenuSelect');
|
|
21857
22576
|
var renderer$a = function renderer(_ref) {
|
|
21858
22577
|
var containerNode = _ref.containerNode,
|
|
21859
22578
|
cssClasses = _ref.cssClasses,
|
|
@@ -21893,18 +22612,18 @@
|
|
|
21893
22612
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
21894
22613
|
transformItems = _ref3.transformItems;
|
|
21895
22614
|
if (!container) {
|
|
21896
|
-
throw new Error(withUsage$
|
|
22615
|
+
throw new Error(withUsage$J('The `container` option is required.'));
|
|
21897
22616
|
}
|
|
21898
22617
|
var containerNode = getContainerNode(container);
|
|
21899
22618
|
var cssClasses = {
|
|
21900
|
-
root: cx(suit$
|
|
21901
|
-
noRefinementRoot: cx(suit$
|
|
22619
|
+
root: cx(suit$f(), userCssClasses.root),
|
|
22620
|
+
noRefinementRoot: cx(suit$f({
|
|
21902
22621
|
modifierName: 'noRefinement'
|
|
21903
22622
|
}), userCssClasses.noRefinementRoot),
|
|
21904
|
-
select: cx(suit$
|
|
22623
|
+
select: cx(suit$f({
|
|
21905
22624
|
descendantName: 'select'
|
|
21906
22625
|
}), userCssClasses.select),
|
|
21907
|
-
option: cx(suit$
|
|
22626
|
+
option: cx(suit$f({
|
|
21908
22627
|
descendantName: 'option'
|
|
21909
22628
|
}), userCssClasses.option)
|
|
21910
22629
|
};
|
|
@@ -21946,10 +22665,10 @@
|
|
|
21946
22665
|
}
|
|
21947
22666
|
};
|
|
21948
22667
|
|
|
21949
|
-
var withUsage$
|
|
22668
|
+
var withUsage$K = createDocumentationMessageGenerator({
|
|
21950
22669
|
name: 'numeric-menu'
|
|
21951
22670
|
});
|
|
21952
|
-
var suit$
|
|
22671
|
+
var suit$g = component('NumericMenu');
|
|
21953
22672
|
var renderer$b = function renderer(_ref) {
|
|
21954
22673
|
var containerNode = _ref.containerNode,
|
|
21955
22674
|
attribute = _ref.attribute,
|
|
@@ -21990,31 +22709,31 @@
|
|
|
21990
22709
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
21991
22710
|
transformItems = _ref3.transformItems;
|
|
21992
22711
|
if (!container) {
|
|
21993
|
-
throw new Error(withUsage$
|
|
22712
|
+
throw new Error(withUsage$K('The `container` option is required.'));
|
|
21994
22713
|
}
|
|
21995
22714
|
var containerNode = getContainerNode(container);
|
|
21996
22715
|
var cssClasses = {
|
|
21997
|
-
root: cx(suit$
|
|
21998
|
-
noRefinementRoot: cx(suit$
|
|
22716
|
+
root: cx(suit$g(), userCssClasses.root),
|
|
22717
|
+
noRefinementRoot: cx(suit$g({
|
|
21999
22718
|
modifierName: 'noRefinement'
|
|
22000
22719
|
}), userCssClasses.noRefinementRoot),
|
|
22001
|
-
list: cx(suit$
|
|
22720
|
+
list: cx(suit$g({
|
|
22002
22721
|
descendantName: 'list'
|
|
22003
22722
|
}), userCssClasses.list),
|
|
22004
|
-
item: cx(suit$
|
|
22723
|
+
item: cx(suit$g({
|
|
22005
22724
|
descendantName: 'item'
|
|
22006
22725
|
}), userCssClasses.item),
|
|
22007
|
-
selectedItem: cx(suit$
|
|
22726
|
+
selectedItem: cx(suit$g({
|
|
22008
22727
|
descendantName: 'item',
|
|
22009
22728
|
modifierName: 'selected'
|
|
22010
22729
|
}), userCssClasses.selectedItem),
|
|
22011
|
-
label: cx(suit$
|
|
22730
|
+
label: cx(suit$g({
|
|
22012
22731
|
descendantName: 'label'
|
|
22013
22732
|
}), userCssClasses.label),
|
|
22014
|
-
radio: cx(suit$
|
|
22733
|
+
radio: cx(suit$g({
|
|
22015
22734
|
descendantName: 'radio'
|
|
22016
22735
|
}), userCssClasses.radio),
|
|
22017
|
-
labelText: cx(suit$
|
|
22736
|
+
labelText: cx(suit$g({
|
|
22018
22737
|
descendantName: 'labelText'
|
|
22019
22738
|
}), userCssClasses.labelText)
|
|
22020
22739
|
};
|
|
@@ -22150,8 +22869,8 @@
|
|
|
22150
22869
|
}));
|
|
22151
22870
|
}
|
|
22152
22871
|
|
|
22153
|
-
var suit$
|
|
22154
|
-
var withUsage$
|
|
22872
|
+
var suit$h = component('Pagination');
|
|
22873
|
+
var withUsage$L = createDocumentationMessageGenerator({
|
|
22155
22874
|
name: 'pagination'
|
|
22156
22875
|
});
|
|
22157
22876
|
var defaultTemplates$a = {
|
|
@@ -22233,51 +22952,51 @@
|
|
|
22233
22952
|
_ref4$scrollTo = _ref4.scrollTo,
|
|
22234
22953
|
userScrollTo = _ref4$scrollTo === void 0 ? 'body' : _ref4$scrollTo;
|
|
22235
22954
|
if (!container) {
|
|
22236
|
-
throw new Error(withUsage$
|
|
22955
|
+
throw new Error(withUsage$L('The `container` option is required.'));
|
|
22237
22956
|
}
|
|
22238
22957
|
var containerNode = getContainerNode(container);
|
|
22239
22958
|
var scrollTo = userScrollTo === true ? 'body' : userScrollTo;
|
|
22240
22959
|
var scrollToNode = scrollTo !== false ? getContainerNode(scrollTo) : false;
|
|
22241
22960
|
var cssClasses = {
|
|
22242
|
-
root: cx(suit$
|
|
22243
|
-
noRefinementRoot: cx(suit$
|
|
22961
|
+
root: cx(suit$h(), userCssClasses.root),
|
|
22962
|
+
noRefinementRoot: cx(suit$h({
|
|
22244
22963
|
modifierName: 'noRefinement'
|
|
22245
22964
|
}), userCssClasses.noRefinementRoot),
|
|
22246
|
-
list: cx(suit$
|
|
22965
|
+
list: cx(suit$h({
|
|
22247
22966
|
descendantName: 'list'
|
|
22248
22967
|
}), userCssClasses.list),
|
|
22249
|
-
item: cx(suit$
|
|
22968
|
+
item: cx(suit$h({
|
|
22250
22969
|
descendantName: 'item'
|
|
22251
22970
|
}), userCssClasses.item),
|
|
22252
|
-
firstPageItem: cx(suit$
|
|
22971
|
+
firstPageItem: cx(suit$h({
|
|
22253
22972
|
descendantName: 'item',
|
|
22254
22973
|
modifierName: 'firstPage'
|
|
22255
22974
|
}), userCssClasses.firstPageItem),
|
|
22256
|
-
lastPageItem: cx(suit$
|
|
22975
|
+
lastPageItem: cx(suit$h({
|
|
22257
22976
|
descendantName: 'item',
|
|
22258
22977
|
modifierName: 'lastPage'
|
|
22259
22978
|
}), userCssClasses.lastPageItem),
|
|
22260
|
-
previousPageItem: cx(suit$
|
|
22979
|
+
previousPageItem: cx(suit$h({
|
|
22261
22980
|
descendantName: 'item',
|
|
22262
22981
|
modifierName: 'previousPage'
|
|
22263
22982
|
}), userCssClasses.previousPageItem),
|
|
22264
|
-
nextPageItem: cx(suit$
|
|
22983
|
+
nextPageItem: cx(suit$h({
|
|
22265
22984
|
descendantName: 'item',
|
|
22266
22985
|
modifierName: 'nextPage'
|
|
22267
22986
|
}), userCssClasses.nextPageItem),
|
|
22268
|
-
pageItem: cx(suit$
|
|
22987
|
+
pageItem: cx(suit$h({
|
|
22269
22988
|
descendantName: 'item',
|
|
22270
22989
|
modifierName: 'page'
|
|
22271
22990
|
}), userCssClasses.pageItem),
|
|
22272
|
-
selectedItem: cx(suit$
|
|
22991
|
+
selectedItem: cx(suit$h({
|
|
22273
22992
|
descendantName: 'item',
|
|
22274
22993
|
modifierName: 'selected'
|
|
22275
22994
|
}), userCssClasses.selectedItem),
|
|
22276
|
-
disabledItem: cx(suit$
|
|
22995
|
+
disabledItem: cx(suit$h({
|
|
22277
22996
|
descendantName: 'item',
|
|
22278
22997
|
modifierName: 'disabled'
|
|
22279
22998
|
}), userCssClasses.disabledItem),
|
|
22280
|
-
link: cx(suit$
|
|
22999
|
+
link: cx(suit$h({
|
|
22281
23000
|
descendantName: 'link'
|
|
22282
23001
|
}), userCssClasses.link)
|
|
22283
23002
|
};
|
|
@@ -22366,10 +23085,10 @@
|
|
|
22366
23085
|
}));
|
|
22367
23086
|
}
|
|
22368
23087
|
|
|
22369
|
-
var withUsage$
|
|
23088
|
+
var withUsage$M = createDocumentationMessageGenerator({
|
|
22370
23089
|
name: 'panel'
|
|
22371
23090
|
});
|
|
22372
|
-
var suit$
|
|
23091
|
+
var suit$i = component('Panel');
|
|
22373
23092
|
var renderer$d = function renderer(_ref) {
|
|
22374
23093
|
var containerNode = _ref.containerNode,
|
|
22375
23094
|
bodyContainerNode = _ref.bodyContainerNode,
|
|
@@ -22414,36 +23133,36 @@
|
|
|
22414
23133
|
return false;
|
|
22415
23134
|
};
|
|
22416
23135
|
var cssClasses = {
|
|
22417
|
-
root: cx(suit$
|
|
22418
|
-
noRefinementRoot: cx(suit$
|
|
23136
|
+
root: cx(suit$i(), userCssClasses.root),
|
|
23137
|
+
noRefinementRoot: cx(suit$i({
|
|
22419
23138
|
modifierName: 'noRefinement'
|
|
22420
23139
|
}), userCssClasses.noRefinementRoot),
|
|
22421
|
-
collapsibleRoot: cx(suit$
|
|
23140
|
+
collapsibleRoot: cx(suit$i({
|
|
22422
23141
|
modifierName: 'collapsible'
|
|
22423
23142
|
}), userCssClasses.collapsibleRoot),
|
|
22424
|
-
collapsedRoot: cx(suit$
|
|
23143
|
+
collapsedRoot: cx(suit$i({
|
|
22425
23144
|
modifierName: 'collapsed'
|
|
22426
23145
|
}), userCssClasses.collapsedRoot),
|
|
22427
|
-
collapseButton: cx(suit$
|
|
23146
|
+
collapseButton: cx(suit$i({
|
|
22428
23147
|
descendantName: 'collapseButton'
|
|
22429
23148
|
}), userCssClasses.collapseButton),
|
|
22430
|
-
collapseIcon: cx(suit$
|
|
23149
|
+
collapseIcon: cx(suit$i({
|
|
22431
23150
|
descendantName: 'collapseIcon'
|
|
22432
23151
|
}), userCssClasses.collapseIcon),
|
|
22433
|
-
body: cx(suit$
|
|
23152
|
+
body: cx(suit$i({
|
|
22434
23153
|
descendantName: 'body'
|
|
22435
23154
|
}), userCssClasses.body),
|
|
22436
|
-
header: cx(suit$
|
|
23155
|
+
header: cx(suit$i({
|
|
22437
23156
|
descendantName: 'header'
|
|
22438
23157
|
}), userCssClasses.header),
|
|
22439
|
-
footer: cx(suit$
|
|
23158
|
+
footer: cx(suit$i({
|
|
22440
23159
|
descendantName: 'footer'
|
|
22441
23160
|
}), userCssClasses.footer)
|
|
22442
23161
|
};
|
|
22443
23162
|
return function (widgetFactory) {
|
|
22444
23163
|
return function (widgetParams) {
|
|
22445
23164
|
if (!(widgetParams && widgetParams.container)) {
|
|
22446
|
-
throw new Error(withUsage$
|
|
23165
|
+
throw new Error(withUsage$M("The `container` option is required in the widget within the panel."));
|
|
22447
23166
|
}
|
|
22448
23167
|
var containerNode = getContainerNode(widgetParams.container);
|
|
22449
23168
|
var defaultTemplates = {
|
|
@@ -22517,7 +23236,7 @@
|
|
|
22517
23236
|
};
|
|
22518
23237
|
};
|
|
22519
23238
|
|
|
22520
|
-
var _excluded$
|
|
23239
|
+
var _excluded$w = ["placesReference", "defaultPosition"],
|
|
22521
23240
|
_excluded2$6 = ["places"];
|
|
22522
23241
|
|
|
22523
23242
|
/* Places.js is an optional dependency, no error should be reported if the package is missing */
|
|
@@ -22535,7 +23254,7 @@
|
|
|
22535
23254
|
placesReference = _ref.placesReference,
|
|
22536
23255
|
_ref$defaultPosition = _ref.defaultPosition,
|
|
22537
23256
|
defaultPosition = _ref$defaultPosition === void 0 ? [] : _ref$defaultPosition,
|
|
22538
|
-
placesOptions = _objectWithoutProperties(_ref, _excluded$
|
|
23257
|
+
placesOptions = _objectWithoutProperties(_ref, _excluded$w);
|
|
22539
23258
|
if (typeof placesReference !== 'function') {
|
|
22540
23259
|
throw new Error('The `placesReference` option requires a valid Places.js reference.');
|
|
22541
23260
|
}
|
|
@@ -22647,8 +23366,8 @@
|
|
|
22647
23366
|
}))));
|
|
22648
23367
|
};
|
|
22649
23368
|
|
|
22650
|
-
var suit$
|
|
22651
|
-
var withUsage$
|
|
23369
|
+
var suit$j = component('PoweredBy');
|
|
23370
|
+
var withUsage$N = createDocumentationMessageGenerator({
|
|
22652
23371
|
name: 'powered-by'
|
|
22653
23372
|
});
|
|
22654
23373
|
var renderer$e = function renderer(_ref) {
|
|
@@ -22677,17 +23396,17 @@
|
|
|
22677
23396
|
_ref3$theme = _ref3.theme,
|
|
22678
23397
|
theme = _ref3$theme === void 0 ? 'light' : _ref3$theme;
|
|
22679
23398
|
if (!container) {
|
|
22680
|
-
throw new Error(withUsage$
|
|
23399
|
+
throw new Error(withUsage$N('The `container` option is required.'));
|
|
22681
23400
|
}
|
|
22682
23401
|
var containerNode = getContainerNode(container);
|
|
22683
23402
|
var cssClasses = {
|
|
22684
|
-
root: cx(suit$
|
|
23403
|
+
root: cx(suit$j(), suit$j({
|
|
22685
23404
|
modifierName: theme === 'dark' ? 'dark' : 'light'
|
|
22686
23405
|
}), userCssClasses.root),
|
|
22687
|
-
link: cx(suit$
|
|
23406
|
+
link: cx(suit$j({
|
|
22688
23407
|
descendantName: 'link'
|
|
22689
23408
|
}), userCssClasses.link),
|
|
22690
|
-
logo: cx(suit$
|
|
23409
|
+
logo: cx(suit$j({
|
|
22691
23410
|
descendantName: 'logo'
|
|
22692
23411
|
}), userCssClasses.logo)
|
|
22693
23412
|
};
|
|
@@ -22705,13 +23424,13 @@
|
|
|
22705
23424
|
});
|
|
22706
23425
|
};
|
|
22707
23426
|
|
|
22708
|
-
var withUsage$
|
|
23427
|
+
var withUsage$O = createDocumentationMessageGenerator({
|
|
22709
23428
|
name: 'query-rule-context'
|
|
22710
23429
|
});
|
|
22711
23430
|
var queryRuleContext = function queryRuleContext() {
|
|
22712
23431
|
var widgetParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22713
23432
|
if (!widgetParams.trackedFilters) {
|
|
22714
|
-
throw new Error(withUsage$
|
|
23433
|
+
throw new Error(withUsage$O('The `trackedFilters` option is required.'));
|
|
22715
23434
|
}
|
|
22716
23435
|
return _objectSpread2(_objectSpread2({}, connectQueryRules(noop)(widgetParams)), {}, {
|
|
22717
23436
|
$$widgetType: 'ais.queryRuleContext'
|
|
@@ -22740,10 +23459,10 @@
|
|
|
22740
23459
|
return JSON.stringify(items, null, 2);
|
|
22741
23460
|
}
|
|
22742
23461
|
};
|
|
22743
|
-
var withUsage$
|
|
23462
|
+
var withUsage$P = createDocumentationMessageGenerator({
|
|
22744
23463
|
name: 'query-rule-custom-data'
|
|
22745
23464
|
});
|
|
22746
|
-
var suit$
|
|
23465
|
+
var suit$k = component('QueryRuleCustomData');
|
|
22747
23466
|
var renderer$f = function renderer(_ref2) {
|
|
22748
23467
|
var containerNode = _ref2.containerNode,
|
|
22749
23468
|
cssClasses = _ref2.cssClasses,
|
|
@@ -22769,10 +23488,10 @@
|
|
|
22769
23488
|
return items;
|
|
22770
23489
|
} : _ref4$transformItems;
|
|
22771
23490
|
if (!container) {
|
|
22772
|
-
throw new Error(withUsage$
|
|
23491
|
+
throw new Error(withUsage$P('The `container` option is required.'));
|
|
22773
23492
|
}
|
|
22774
23493
|
var cssClasses = {
|
|
22775
|
-
root: cx(suit$
|
|
23494
|
+
root: cx(suit$k(), userCssClasses.root)
|
|
22776
23495
|
};
|
|
22777
23496
|
var containerNode = getContainerNode(container);
|
|
22778
23497
|
var templates = _objectSpread2(_objectSpread2({}, defaultTemplates$b), userTemplates);
|
|
@@ -22792,15 +23511,15 @@
|
|
|
22792
23511
|
});
|
|
22793
23512
|
};
|
|
22794
23513
|
|
|
22795
|
-
var _excluded$
|
|
22796
|
-
var withUsage$
|
|
23514
|
+
var _excluded$x = ["item", "sendEvent"];
|
|
23515
|
+
var withUsage$Q = createDocumentationMessageGenerator({
|
|
22797
23516
|
name: 'related-products'
|
|
22798
23517
|
});
|
|
22799
23518
|
var RelatedProducts = createRelatedProductsComponent({
|
|
22800
23519
|
createElement: h,
|
|
22801
23520
|
Fragment: p
|
|
22802
23521
|
});
|
|
22803
|
-
function createRenderer(_ref) {
|
|
23522
|
+
function createRenderer$1(_ref) {
|
|
22804
23523
|
var renderState = _ref.renderState,
|
|
22805
23524
|
cssClasses = _ref.cssClasses,
|
|
22806
23525
|
containerNode = _ref.containerNode,
|
|
@@ -22831,7 +23550,7 @@
|
|
|
22831
23550
|
var itemComponent = templates.item ? function (_ref3) {
|
|
22832
23551
|
var item = _ref3.item,
|
|
22833
23552
|
_sendEvent = _ref3.sendEvent,
|
|
22834
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
23553
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$x);
|
|
22835
23554
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
22836
23555
|
templateKey: "item",
|
|
22837
23556
|
rootTagName: "fragment",
|
|
@@ -22900,10 +23619,10 @@
|
|
|
22900
23619
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
22901
23620
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
22902
23621
|
if (!container) {
|
|
22903
|
-
throw new Error(withUsage$
|
|
23622
|
+
throw new Error(withUsage$Q('The `container` option is required.'));
|
|
22904
23623
|
}
|
|
22905
23624
|
var containerNode = getContainerNode(container);
|
|
22906
|
-
var specializedRenderer = createRenderer({
|
|
23625
|
+
var specializedRenderer = createRenderer$1({
|
|
22907
23626
|
containerNode: containerNode,
|
|
22908
23627
|
cssClasses: cssClasses,
|
|
22909
23628
|
renderState: {},
|
|
@@ -23035,10 +23754,10 @@
|
|
|
23035
23754
|
return RangeInput;
|
|
23036
23755
|
}(d);
|
|
23037
23756
|
|
|
23038
|
-
var withUsage$
|
|
23757
|
+
var withUsage$R = createDocumentationMessageGenerator({
|
|
23039
23758
|
name: 'range-input'
|
|
23040
23759
|
});
|
|
23041
|
-
var suit$
|
|
23760
|
+
var suit$l = component('RangeInput');
|
|
23042
23761
|
var defaultTemplates$c = {
|
|
23043
23762
|
separatorText: function separatorText() {
|
|
23044
23763
|
return 'to';
|
|
@@ -23100,35 +23819,35 @@
|
|
|
23100
23819
|
_ref3$templates = _ref3.templates,
|
|
23101
23820
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates;
|
|
23102
23821
|
if (!container) {
|
|
23103
|
-
throw new Error(withUsage$
|
|
23822
|
+
throw new Error(withUsage$R('The `container` option is required.'));
|
|
23104
23823
|
}
|
|
23105
23824
|
var containerNode = getContainerNode(container);
|
|
23106
23825
|
var cssClasses = {
|
|
23107
|
-
root: cx(suit$
|
|
23108
|
-
noRefinement: cx(suit$
|
|
23826
|
+
root: cx(suit$l(), userCssClasses.root),
|
|
23827
|
+
noRefinement: cx(suit$l({
|
|
23109
23828
|
modifierName: 'noRefinement'
|
|
23110
23829
|
})),
|
|
23111
|
-
form: cx(suit$
|
|
23830
|
+
form: cx(suit$l({
|
|
23112
23831
|
descendantName: 'form'
|
|
23113
23832
|
}), userCssClasses.form),
|
|
23114
|
-
label: cx(suit$
|
|
23833
|
+
label: cx(suit$l({
|
|
23115
23834
|
descendantName: 'label'
|
|
23116
23835
|
}), userCssClasses.label),
|
|
23117
|
-
input: cx(suit$
|
|
23836
|
+
input: cx(suit$l({
|
|
23118
23837
|
descendantName: 'input'
|
|
23119
23838
|
}), userCssClasses.input),
|
|
23120
|
-
inputMin: cx(suit$
|
|
23839
|
+
inputMin: cx(suit$l({
|
|
23121
23840
|
descendantName: 'input',
|
|
23122
23841
|
modifierName: 'min'
|
|
23123
23842
|
}), userCssClasses.inputMin),
|
|
23124
|
-
inputMax: cx(suit$
|
|
23843
|
+
inputMax: cx(suit$l({
|
|
23125
23844
|
descendantName: 'input',
|
|
23126
23845
|
modifierName: 'max'
|
|
23127
23846
|
}), userCssClasses.inputMax),
|
|
23128
|
-
separator: cx(suit$
|
|
23847
|
+
separator: cx(suit$l({
|
|
23129
23848
|
descendantName: 'separator'
|
|
23130
23849
|
}), userCssClasses.separator),
|
|
23131
|
-
submit: cx(suit$
|
|
23850
|
+
submit: cx(suit$l({
|
|
23132
23851
|
descendantName: 'submit'
|
|
23133
23852
|
}), userCssClasses.submit)
|
|
23134
23853
|
};
|
|
@@ -23823,10 +24542,10 @@
|
|
|
23823
24542
|
return Slider;
|
|
23824
24543
|
}(d);
|
|
23825
24544
|
|
|
23826
|
-
var withUsage$
|
|
24545
|
+
var withUsage$S = createDocumentationMessageGenerator({
|
|
23827
24546
|
name: 'range-slider'
|
|
23828
24547
|
});
|
|
23829
|
-
var suit$
|
|
24548
|
+
var suit$m = component('RangeSlider');
|
|
23830
24549
|
var renderer$h = function renderer(_ref) {
|
|
23831
24550
|
var containerNode = _ref.containerNode,
|
|
23832
24551
|
cssClasses = _ref.cssClasses,
|
|
@@ -23892,12 +24611,12 @@
|
|
|
23892
24611
|
_ref3$tooltips = _ref3.tooltips,
|
|
23893
24612
|
tooltips = _ref3$tooltips === void 0 ? true : _ref3$tooltips;
|
|
23894
24613
|
if (!container) {
|
|
23895
|
-
throw new Error(withUsage$
|
|
24614
|
+
throw new Error(withUsage$S('The `container` option is required.'));
|
|
23896
24615
|
}
|
|
23897
24616
|
var containerNode = getContainerNode(container);
|
|
23898
24617
|
var cssClasses = {
|
|
23899
|
-
root: cx(suit$
|
|
23900
|
-
disabledRoot: cx(suit$
|
|
24618
|
+
root: cx(suit$m(), userCssClasses.root),
|
|
24619
|
+
disabledRoot: cx(suit$m({
|
|
23901
24620
|
modifierName: 'disabled'
|
|
23902
24621
|
}), userCssClasses.disabledRoot)
|
|
23903
24622
|
};
|
|
@@ -23972,10 +24691,10 @@
|
|
|
23972
24691
|
}
|
|
23973
24692
|
};
|
|
23974
24693
|
|
|
23975
|
-
var withUsage$
|
|
24694
|
+
var withUsage$T = createDocumentationMessageGenerator({
|
|
23976
24695
|
name: 'rating-menu'
|
|
23977
24696
|
});
|
|
23978
|
-
var suit$
|
|
24697
|
+
var suit$n = component('RatingMenu');
|
|
23979
24698
|
var _ref3 = h("path", {
|
|
23980
24699
|
d: "M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"
|
|
23981
24700
|
});
|
|
@@ -24009,12 +24728,12 @@
|
|
|
24009
24728
|
}, h("svg", {
|
|
24010
24729
|
style: "display:none;"
|
|
24011
24730
|
}, h("symbol", {
|
|
24012
|
-
id: suit$
|
|
24731
|
+
id: suit$n({
|
|
24013
24732
|
descendantName: 'starSymbol'
|
|
24014
24733
|
}),
|
|
24015
24734
|
viewBox: "0 0 24 24"
|
|
24016
24735
|
}, _ref3), h("symbol", {
|
|
24017
|
-
id: suit$
|
|
24736
|
+
id: suit$n({
|
|
24018
24737
|
descendantName: 'starEmptySymbol'
|
|
24019
24738
|
}),
|
|
24020
24739
|
viewBox: "0 0 24 24"
|
|
@@ -24060,46 +24779,46 @@
|
|
|
24060
24779
|
_ref5$templates = _ref5.templates,
|
|
24061
24780
|
templates = _ref5$templates === void 0 ? {} : _ref5$templates;
|
|
24062
24781
|
if (!container) {
|
|
24063
|
-
throw new Error(withUsage$
|
|
24782
|
+
throw new Error(withUsage$T('The `container` option is required.'));
|
|
24064
24783
|
}
|
|
24065
24784
|
var containerNode = getContainerNode(container);
|
|
24066
24785
|
var cssClasses = {
|
|
24067
|
-
root: cx(suit$
|
|
24068
|
-
noRefinementRoot: cx(suit$
|
|
24786
|
+
root: cx(suit$n(), userCssClasses.root),
|
|
24787
|
+
noRefinementRoot: cx(suit$n({
|
|
24069
24788
|
modifierName: 'noRefinement'
|
|
24070
24789
|
}), userCssClasses.noRefinementRoot),
|
|
24071
|
-
list: cx(suit$
|
|
24790
|
+
list: cx(suit$n({
|
|
24072
24791
|
descendantName: 'list'
|
|
24073
24792
|
}), userCssClasses.list),
|
|
24074
|
-
item: cx(suit$
|
|
24793
|
+
item: cx(suit$n({
|
|
24075
24794
|
descendantName: 'item'
|
|
24076
24795
|
}), userCssClasses.item),
|
|
24077
|
-
selectedItem: cx(suit$
|
|
24796
|
+
selectedItem: cx(suit$n({
|
|
24078
24797
|
descendantName: 'item',
|
|
24079
24798
|
modifierName: 'selected'
|
|
24080
24799
|
}), userCssClasses.selectedItem),
|
|
24081
|
-
disabledItem: cx(suit$
|
|
24800
|
+
disabledItem: cx(suit$n({
|
|
24082
24801
|
descendantName: 'item',
|
|
24083
24802
|
modifierName: 'disabled'
|
|
24084
24803
|
}), userCssClasses.disabledItem),
|
|
24085
|
-
link: cx(suit$
|
|
24804
|
+
link: cx(suit$n({
|
|
24086
24805
|
descendantName: 'link'
|
|
24087
24806
|
}), userCssClasses.link),
|
|
24088
|
-
starIcon: cx(suit$
|
|
24807
|
+
starIcon: cx(suit$n({
|
|
24089
24808
|
descendantName: 'starIcon'
|
|
24090
24809
|
}), userCssClasses.starIcon),
|
|
24091
|
-
fullStarIcon: cx(suit$
|
|
24810
|
+
fullStarIcon: cx(suit$n({
|
|
24092
24811
|
descendantName: 'starIcon',
|
|
24093
24812
|
modifierName: 'full'
|
|
24094
24813
|
}), userCssClasses.fullStarIcon),
|
|
24095
|
-
emptyStarIcon: cx(suit$
|
|
24814
|
+
emptyStarIcon: cx(suit$n({
|
|
24096
24815
|
descendantName: 'starIcon',
|
|
24097
24816
|
modifierName: 'empty'
|
|
24098
24817
|
}), userCssClasses.emptyStarIcon),
|
|
24099
|
-
label: cx(suit$
|
|
24818
|
+
label: cx(suit$n({
|
|
24100
24819
|
descendantName: 'label'
|
|
24101
24820
|
}), userCssClasses.label),
|
|
24102
|
-
count: cx(suit$
|
|
24821
|
+
count: cx(suit$n({
|
|
24103
24822
|
descendantName: 'count'
|
|
24104
24823
|
}), userCssClasses.count)
|
|
24105
24824
|
};
|
|
@@ -24220,10 +24939,10 @@
|
|
|
24220
24939
|
}
|
|
24221
24940
|
};
|
|
24222
24941
|
|
|
24223
|
-
var withUsage$
|
|
24942
|
+
var withUsage$U = createDocumentationMessageGenerator({
|
|
24224
24943
|
name: 'refinement-list'
|
|
24225
24944
|
});
|
|
24226
|
-
var suit$
|
|
24945
|
+
var suit$o = component('RefinementList');
|
|
24227
24946
|
var searchBoxSuit = component('SearchBox');
|
|
24228
24947
|
var renderer$j = function renderer(_ref) {
|
|
24229
24948
|
var containerNode = _ref.containerNode,
|
|
@@ -24324,47 +25043,47 @@
|
|
|
24324
25043
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
24325
25044
|
transformItems = _ref3.transformItems;
|
|
24326
25045
|
if (!container) {
|
|
24327
|
-
throw new Error(withUsage$
|
|
25046
|
+
throw new Error(withUsage$U('The `container` option is required.'));
|
|
24328
25047
|
}
|
|
24329
25048
|
var escapeFacetValues = searchable ? Boolean(searchableEscapeFacetValues) : false;
|
|
24330
25049
|
var containerNode = getContainerNode(container);
|
|
24331
25050
|
var cssClasses = {
|
|
24332
|
-
root: cx(suit$
|
|
24333
|
-
noRefinementRoot: cx(suit$
|
|
25051
|
+
root: cx(suit$o(), userCssClasses.root),
|
|
25052
|
+
noRefinementRoot: cx(suit$o({
|
|
24334
25053
|
modifierName: 'noRefinement'
|
|
24335
25054
|
}), userCssClasses.noRefinementRoot),
|
|
24336
|
-
list: cx(suit$
|
|
25055
|
+
list: cx(suit$o({
|
|
24337
25056
|
descendantName: 'list'
|
|
24338
25057
|
}), userCssClasses.list),
|
|
24339
|
-
item: cx(suit$
|
|
25058
|
+
item: cx(suit$o({
|
|
24340
25059
|
descendantName: 'item'
|
|
24341
25060
|
}), userCssClasses.item),
|
|
24342
|
-
selectedItem: cx(suit$
|
|
25061
|
+
selectedItem: cx(suit$o({
|
|
24343
25062
|
descendantName: 'item',
|
|
24344
25063
|
modifierName: 'selected'
|
|
24345
25064
|
}), userCssClasses.selectedItem),
|
|
24346
|
-
searchBox: cx(suit$
|
|
25065
|
+
searchBox: cx(suit$o({
|
|
24347
25066
|
descendantName: 'searchBox'
|
|
24348
25067
|
}), userCssClasses.searchBox),
|
|
24349
|
-
label: cx(suit$
|
|
25068
|
+
label: cx(suit$o({
|
|
24350
25069
|
descendantName: 'label'
|
|
24351
25070
|
}), userCssClasses.label),
|
|
24352
|
-
checkbox: cx(suit$
|
|
25071
|
+
checkbox: cx(suit$o({
|
|
24353
25072
|
descendantName: 'checkbox'
|
|
24354
25073
|
}), userCssClasses.checkbox),
|
|
24355
|
-
labelText: cx(suit$
|
|
25074
|
+
labelText: cx(suit$o({
|
|
24356
25075
|
descendantName: 'labelText'
|
|
24357
25076
|
}), userCssClasses.labelText),
|
|
24358
|
-
count: cx(suit$
|
|
25077
|
+
count: cx(suit$o({
|
|
24359
25078
|
descendantName: 'count'
|
|
24360
25079
|
}), userCssClasses.count),
|
|
24361
|
-
noResults: cx(suit$
|
|
25080
|
+
noResults: cx(suit$o({
|
|
24362
25081
|
descendantName: 'noResults'
|
|
24363
25082
|
}), userCssClasses.noResults),
|
|
24364
|
-
showMore: cx(suit$
|
|
25083
|
+
showMore: cx(suit$o({
|
|
24365
25084
|
descendantName: 'showMore'
|
|
24366
25085
|
}), userCssClasses.showMore),
|
|
24367
|
-
disabledShowMore: cx(suit$
|
|
25086
|
+
disabledShowMore: cx(suit$o({
|
|
24368
25087
|
descendantName: 'showMore',
|
|
24369
25088
|
modifierName: 'disabled'
|
|
24370
25089
|
}), userCssClasses.disabledShowMore),
|
|
@@ -24476,10 +25195,10 @@
|
|
|
24476
25195
|
}
|
|
24477
25196
|
};
|
|
24478
25197
|
|
|
24479
|
-
var withUsage$
|
|
25198
|
+
var withUsage$V = createDocumentationMessageGenerator({
|
|
24480
25199
|
name: 'relevant-sort'
|
|
24481
25200
|
});
|
|
24482
|
-
var suit$
|
|
25201
|
+
var suit$p = component('RelevantSort');
|
|
24483
25202
|
var renderer$k = function renderer(_ref) {
|
|
24484
25203
|
var containerNode = _ref.containerNode,
|
|
24485
25204
|
cssClasses = _ref.cssClasses,
|
|
@@ -24504,15 +25223,15 @@
|
|
|
24504
25223
|
_widgetParams$cssClas = widgetParams.cssClasses,
|
|
24505
25224
|
userCssClasses = _widgetParams$cssClas === void 0 ? {} : _widgetParams$cssClas;
|
|
24506
25225
|
if (!container) {
|
|
24507
|
-
throw new Error(withUsage$
|
|
25226
|
+
throw new Error(withUsage$V('The `container` option is required.'));
|
|
24508
25227
|
}
|
|
24509
25228
|
var containerNode = getContainerNode(container);
|
|
24510
25229
|
var cssClasses = {
|
|
24511
|
-
root: cx(suit$
|
|
24512
|
-
text: cx(suit$
|
|
25230
|
+
root: cx(suit$p(), userCssClasses.root),
|
|
25231
|
+
text: cx(suit$p({
|
|
24513
25232
|
descendantName: 'text'
|
|
24514
25233
|
}), userCssClasses.text),
|
|
24515
|
-
button: cx(suit$
|
|
25234
|
+
button: cx(suit$p({
|
|
24516
25235
|
descendantName: 'button'
|
|
24517
25236
|
}), userCssClasses.button)
|
|
24518
25237
|
};
|
|
@@ -24531,10 +25250,10 @@
|
|
|
24531
25250
|
});
|
|
24532
25251
|
};
|
|
24533
25252
|
|
|
24534
|
-
var withUsage$
|
|
25253
|
+
var withUsage$W = createDocumentationMessageGenerator({
|
|
24535
25254
|
name: 'search-box'
|
|
24536
25255
|
});
|
|
24537
|
-
var suit$
|
|
25256
|
+
var suit$q = component('SearchBox');
|
|
24538
25257
|
var renderer$l = function renderer(_ref) {
|
|
24539
25258
|
var containerNode = _ref.containerNode,
|
|
24540
25259
|
cssClasses = _ref.cssClasses,
|
|
@@ -24599,33 +25318,33 @@
|
|
|
24599
25318
|
_ref3$templates = _ref3.templates,
|
|
24600
25319
|
userTemplates = _ref3$templates === void 0 ? {} : _ref3$templates;
|
|
24601
25320
|
if (!container) {
|
|
24602
|
-
throw new Error(withUsage$
|
|
25321
|
+
throw new Error(withUsage$W('The `container` option is required.'));
|
|
24603
25322
|
}
|
|
24604
25323
|
var containerNode = getContainerNode(container);
|
|
24605
25324
|
var cssClasses = {
|
|
24606
|
-
root: cx(suit$
|
|
24607
|
-
form: cx(suit$
|
|
25325
|
+
root: cx(suit$q(), userCssClasses.root),
|
|
25326
|
+
form: cx(suit$q({
|
|
24608
25327
|
descendantName: 'form'
|
|
24609
25328
|
}), userCssClasses.form),
|
|
24610
|
-
input: cx(suit$
|
|
25329
|
+
input: cx(suit$q({
|
|
24611
25330
|
descendantName: 'input'
|
|
24612
25331
|
}), userCssClasses.input),
|
|
24613
|
-
submit: cx(suit$
|
|
25332
|
+
submit: cx(suit$q({
|
|
24614
25333
|
descendantName: 'submit'
|
|
24615
25334
|
}), userCssClasses.submit),
|
|
24616
|
-
submitIcon: cx(suit$
|
|
25335
|
+
submitIcon: cx(suit$q({
|
|
24617
25336
|
descendantName: 'submitIcon'
|
|
24618
25337
|
}), userCssClasses.submitIcon),
|
|
24619
|
-
reset: cx(suit$
|
|
25338
|
+
reset: cx(suit$q({
|
|
24620
25339
|
descendantName: 'reset'
|
|
24621
25340
|
}), userCssClasses.reset),
|
|
24622
|
-
resetIcon: cx(suit$
|
|
25341
|
+
resetIcon: cx(suit$q({
|
|
24623
25342
|
descendantName: 'resetIcon'
|
|
24624
25343
|
}), userCssClasses.resetIcon),
|
|
24625
|
-
loadingIndicator: cx(suit$
|
|
25344
|
+
loadingIndicator: cx(suit$q({
|
|
24626
25345
|
descendantName: 'loadingIndicator'
|
|
24627
25346
|
}), userCssClasses.loadingIndicator),
|
|
24628
|
-
loadingIcon: cx(suit$
|
|
25347
|
+
loadingIcon: cx(suit$q({
|
|
24629
25348
|
descendantName: 'loadingIcon'
|
|
24630
25349
|
}), userCssClasses.loadingIcon)
|
|
24631
25350
|
};
|
|
@@ -24652,10 +25371,10 @@
|
|
|
24652
25371
|
});
|
|
24653
25372
|
};
|
|
24654
25373
|
|
|
24655
|
-
var withUsage$
|
|
25374
|
+
var withUsage$X = createDocumentationMessageGenerator({
|
|
24656
25375
|
name: 'sort-by'
|
|
24657
25376
|
});
|
|
24658
|
-
var suit$
|
|
25377
|
+
var suit$r = component('SortBy');
|
|
24659
25378
|
var renderer$m = function renderer(_ref) {
|
|
24660
25379
|
var containerNode = _ref.containerNode,
|
|
24661
25380
|
cssClasses = _ref.cssClasses;
|
|
@@ -24690,15 +25409,15 @@
|
|
|
24690
25409
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses,
|
|
24691
25410
|
transformItems = _ref3.transformItems;
|
|
24692
25411
|
if (!container) {
|
|
24693
|
-
throw new Error(withUsage$
|
|
25412
|
+
throw new Error(withUsage$X('The `container` option is required.'));
|
|
24694
25413
|
}
|
|
24695
25414
|
var containerNode = getContainerNode(container);
|
|
24696
25415
|
var cssClasses = {
|
|
24697
|
-
root: cx(suit$
|
|
24698
|
-
select: cx(suit$
|
|
25416
|
+
root: cx(suit$r(), userCssClasses.root),
|
|
25417
|
+
select: cx(suit$r({
|
|
24699
25418
|
descendantName: 'select'
|
|
24700
25419
|
}), userCssClasses.select),
|
|
24701
|
-
option: cx(suit$
|
|
25420
|
+
option: cx(suit$r({
|
|
24702
25421
|
descendantName: 'option'
|
|
24703
25422
|
}), userCssClasses.option)
|
|
24704
25423
|
};
|
|
@@ -24718,13 +25437,13 @@
|
|
|
24718
25437
|
});
|
|
24719
25438
|
};
|
|
24720
25439
|
|
|
24721
|
-
var _excluded$
|
|
25440
|
+
var _excluded$y = ["nbHits", "nbSortedHits", "cssClasses", "templateProps"];
|
|
24722
25441
|
var Stats = function Stats(_ref) {
|
|
24723
25442
|
var nbHits = _ref.nbHits,
|
|
24724
25443
|
nbSortedHits = _ref.nbSortedHits,
|
|
24725
25444
|
cssClasses = _ref.cssClasses,
|
|
24726
25445
|
templateProps = _ref.templateProps,
|
|
24727
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
25446
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
24728
25447
|
return h("div", {
|
|
24729
25448
|
className: cx(cssClasses.root)
|
|
24730
25449
|
}, h(Template, _extends({}, templateProps, {
|
|
@@ -24747,10 +25466,10 @@
|
|
|
24747
25466
|
})));
|
|
24748
25467
|
};
|
|
24749
25468
|
|
|
24750
|
-
var withUsage$
|
|
25469
|
+
var withUsage$Y = createDocumentationMessageGenerator({
|
|
24751
25470
|
name: 'stats'
|
|
24752
25471
|
});
|
|
24753
|
-
var suit$
|
|
25472
|
+
var suit$s = component('Stats');
|
|
24754
25473
|
var defaultTemplates$g = {
|
|
24755
25474
|
text: function text(props) {
|
|
24756
25475
|
return "".concat(props.areHitsSorted ? getSortedResultsSentence(props) : getResultsSentence(props), " found in ").concat(props.processingTimeMS, "ms");
|
|
@@ -24842,12 +25561,12 @@
|
|
|
24842
25561
|
_ref5$templates = _ref5.templates,
|
|
24843
25562
|
templates = _ref5$templates === void 0 ? {} : _ref5$templates;
|
|
24844
25563
|
if (!container) {
|
|
24845
|
-
throw new Error(withUsage$
|
|
25564
|
+
throw new Error(withUsage$Y('The `container` option is required.'));
|
|
24846
25565
|
}
|
|
24847
25566
|
var containerNode = getContainerNode(container);
|
|
24848
25567
|
var cssClasses = {
|
|
24849
|
-
root: cx(suit$
|
|
24850
|
-
text: cx(suit$
|
|
25568
|
+
root: cx(suit$s(), userCssClasses.root),
|
|
25569
|
+
text: cx(suit$s({
|
|
24851
25570
|
descendantName: 'text'
|
|
24852
25571
|
}), userCssClasses.text)
|
|
24853
25572
|
};
|
|
@@ -24900,10 +25619,10 @@
|
|
|
24900
25619
|
}
|
|
24901
25620
|
};
|
|
24902
25621
|
|
|
24903
|
-
var withUsage$
|
|
25622
|
+
var withUsage$Z = createDocumentationMessageGenerator({
|
|
24904
25623
|
name: 'toggle-refinement'
|
|
24905
25624
|
});
|
|
24906
|
-
var suit$
|
|
25625
|
+
var suit$t = component('ToggleRefinement');
|
|
24907
25626
|
var renderer$o = function renderer(_ref) {
|
|
24908
25627
|
var containerNode = _ref.containerNode,
|
|
24909
25628
|
cssClasses = _ref.cssClasses,
|
|
@@ -24953,18 +25672,18 @@
|
|
|
24953
25672
|
on = _ref3$on === void 0 ? true : _ref3$on,
|
|
24954
25673
|
off = _ref3.off;
|
|
24955
25674
|
if (!container) {
|
|
24956
|
-
throw new Error(withUsage$
|
|
25675
|
+
throw new Error(withUsage$Z('The `container` option is required.'));
|
|
24957
25676
|
}
|
|
24958
25677
|
var containerNode = getContainerNode(container);
|
|
24959
25678
|
var cssClasses = {
|
|
24960
|
-
root: cx(suit$
|
|
24961
|
-
label: cx(suit$
|
|
25679
|
+
root: cx(suit$t(), userCssClasses.root),
|
|
25680
|
+
label: cx(suit$t({
|
|
24962
25681
|
descendantName: 'label'
|
|
24963
25682
|
}), userCssClasses.label),
|
|
24964
|
-
checkbox: cx(suit$
|
|
25683
|
+
checkbox: cx(suit$t({
|
|
24965
25684
|
descendantName: 'checkbox'
|
|
24966
25685
|
}), userCssClasses.checkbox),
|
|
24967
|
-
labelText: cx(suit$
|
|
25686
|
+
labelText: cx(suit$t({
|
|
24968
25687
|
descendantName: 'labelText'
|
|
24969
25688
|
}), userCssClasses.labelText)
|
|
24970
25689
|
};
|
|
@@ -24986,15 +25705,15 @@
|
|
|
24986
25705
|
});
|
|
24987
25706
|
};
|
|
24988
25707
|
|
|
24989
|
-
var _excluded$
|
|
24990
|
-
var withUsage$
|
|
25708
|
+
var _excluded$z = ["item", "sendEvent"];
|
|
25709
|
+
var withUsage$_ = createDocumentationMessageGenerator({
|
|
24991
25710
|
name: 'trending-items'
|
|
24992
25711
|
});
|
|
24993
25712
|
var TrendingItems = createTrendingItemsComponent({
|
|
24994
25713
|
createElement: h,
|
|
24995
25714
|
Fragment: p
|
|
24996
25715
|
});
|
|
24997
|
-
function createRenderer$
|
|
25716
|
+
function createRenderer$2(_ref) {
|
|
24998
25717
|
var renderState = _ref.renderState,
|
|
24999
25718
|
cssClasses = _ref.cssClasses,
|
|
25000
25719
|
containerNode = _ref.containerNode,
|
|
@@ -25025,7 +25744,7 @@
|
|
|
25025
25744
|
var itemComponent = templates.item ? function (_ref3) {
|
|
25026
25745
|
var item = _ref3.item,
|
|
25027
25746
|
_sendEvent = _ref3.sendEvent,
|
|
25028
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
25747
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$z);
|
|
25029
25748
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
25030
25749
|
templateKey: "item",
|
|
25031
25750
|
rootTagName: "fragment",
|
|
@@ -25095,10 +25814,10 @@
|
|
|
25095
25814
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
25096
25815
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
25097
25816
|
if (!container) {
|
|
25098
|
-
throw new Error(withUsage$
|
|
25817
|
+
throw new Error(withUsage$_('The `container` option is required.'));
|
|
25099
25818
|
}
|
|
25100
25819
|
var containerNode = getContainerNode(container);
|
|
25101
|
-
var specializedRenderer = createRenderer$
|
|
25820
|
+
var specializedRenderer = createRenderer$2({
|
|
25102
25821
|
containerNode: containerNode,
|
|
25103
25822
|
cssClasses: cssClasses,
|
|
25104
25823
|
renderState: {},
|
|
@@ -25257,10 +25976,10 @@
|
|
|
25257
25976
|
}
|
|
25258
25977
|
};
|
|
25259
25978
|
|
|
25260
|
-
var withUsage
|
|
25979
|
+
var withUsage$$ = createDocumentationMessageGenerator({
|
|
25261
25980
|
name: 'voice-search'
|
|
25262
25981
|
});
|
|
25263
|
-
var suit$
|
|
25982
|
+
var suit$u = component('VoiceSearch');
|
|
25264
25983
|
var renderer$p = function renderer(_ref) {
|
|
25265
25984
|
var containerNode = _ref.containerNode,
|
|
25266
25985
|
cssClasses = _ref.cssClasses,
|
|
@@ -25293,15 +26012,15 @@
|
|
|
25293
26012
|
additionalQueryParameters = _ref3.additionalQueryParameters,
|
|
25294
26013
|
createVoiceSearchHelper = _ref3.createVoiceSearchHelper;
|
|
25295
26014
|
if (!container) {
|
|
25296
|
-
throw new Error(withUsage
|
|
26015
|
+
throw new Error(withUsage$$('The `container` option is required.'));
|
|
25297
26016
|
}
|
|
25298
26017
|
var containerNode = getContainerNode(container);
|
|
25299
26018
|
var cssClasses = {
|
|
25300
|
-
root: cx(suit$
|
|
25301
|
-
button: cx(suit$
|
|
26019
|
+
root: cx(suit$u(), userCssClasses.root),
|
|
26020
|
+
button: cx(suit$u({
|
|
25302
26021
|
descendantName: 'button'
|
|
25303
26022
|
}), userCssClasses.button),
|
|
25304
|
-
status: cx(suit$
|
|
26023
|
+
status: cx(suit$u({
|
|
25305
26024
|
descendantName: 'status'
|
|
25306
26025
|
}), userCssClasses.status)
|
|
25307
26026
|
};
|
|
@@ -25327,8 +26046,8 @@
|
|
|
25327
26046
|
});
|
|
25328
26047
|
};
|
|
25329
26048
|
|
|
25330
|
-
var _excluded$
|
|
25331
|
-
var withUsage
|
|
26049
|
+
var _excluded$A = ["item", "sendEvent"];
|
|
26050
|
+
var withUsage$10 = createDocumentationMessageGenerator({
|
|
25332
26051
|
name: 'frequently-bought-together'
|
|
25333
26052
|
});
|
|
25334
26053
|
var FrequentlyBoughtTogether = createFrequentlyBoughtTogetherComponent({
|
|
@@ -25366,7 +26085,7 @@
|
|
|
25366
26085
|
var itemComponent = templates.item ? function (_ref3) {
|
|
25367
26086
|
var item = _ref3.item,
|
|
25368
26087
|
_sendEvent = _ref3.sendEvent,
|
|
25369
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
26088
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$A);
|
|
25370
26089
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
25371
26090
|
templateKey: "item",
|
|
25372
26091
|
rootTagName: "fragment",
|
|
@@ -25426,6 +26145,7 @@
|
|
|
25426
26145
|
objectIDs = _ref5.objectIDs,
|
|
25427
26146
|
limit = _ref5.limit,
|
|
25428
26147
|
queryParameters = _ref5.queryParameters,
|
|
26148
|
+
fallbackParameters = _ref5.fallbackParameters,
|
|
25429
26149
|
threshold = _ref5.threshold,
|
|
25430
26150
|
escapeHTML = _ref5.escapeHTML,
|
|
25431
26151
|
transformItems = _ref5.transformItems,
|
|
@@ -25434,7 +26154,7 @@
|
|
|
25434
26154
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
25435
26155
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
25436
26156
|
if (!container) {
|
|
25437
|
-
throw new Error(withUsage
|
|
26157
|
+
throw new Error(withUsage$10('The `container` option is required.'));
|
|
25438
26158
|
}
|
|
25439
26159
|
var containerNode = getContainerNode(container);
|
|
25440
26160
|
var specializedRenderer = renderer$q({
|
|
@@ -25450,6 +26170,7 @@
|
|
|
25450
26170
|
objectIDs: objectIDs,
|
|
25451
26171
|
limit: limit,
|
|
25452
26172
|
queryParameters: queryParameters,
|
|
26173
|
+
fallbackParameters: fallbackParameters,
|
|
25453
26174
|
threshold: threshold,
|
|
25454
26175
|
escapeHTML: escapeHTML,
|
|
25455
26176
|
transformItems: transformItems
|
|
@@ -25458,15 +26179,15 @@
|
|
|
25458
26179
|
});
|
|
25459
26180
|
});
|
|
25460
26181
|
|
|
25461
|
-
var _excluded$
|
|
25462
|
-
var withUsage$
|
|
26182
|
+
var _excluded$B = ["item", "sendEvent"];
|
|
26183
|
+
var withUsage$11 = createDocumentationMessageGenerator({
|
|
25463
26184
|
name: 'looking-similar'
|
|
25464
26185
|
});
|
|
25465
26186
|
var LookingSimilar = createLookingSimilarComponent({
|
|
25466
26187
|
createElement: h,
|
|
25467
26188
|
Fragment: p
|
|
25468
26189
|
});
|
|
25469
|
-
function createRenderer$
|
|
26190
|
+
function createRenderer$3(_ref) {
|
|
25470
26191
|
var renderState = _ref.renderState,
|
|
25471
26192
|
cssClasses = _ref.cssClasses,
|
|
25472
26193
|
containerNode = _ref.containerNode,
|
|
@@ -25497,7 +26218,7 @@
|
|
|
25497
26218
|
var itemComponent = templates.item ? function (_ref3) {
|
|
25498
26219
|
var item = _ref3.item,
|
|
25499
26220
|
_sendEvent = _ref3.sendEvent,
|
|
25500
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
26221
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$B);
|
|
25501
26222
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
25502
26223
|
templateKey: "item",
|
|
25503
26224
|
rootTagName: "fragment",
|
|
@@ -25566,10 +26287,10 @@
|
|
|
25566
26287
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
25567
26288
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
25568
26289
|
if (!container) {
|
|
25569
|
-
throw new Error(withUsage$
|
|
26290
|
+
throw new Error(withUsage$11('The `container` option is required.'));
|
|
25570
26291
|
}
|
|
25571
26292
|
var containerNode = getContainerNode(container);
|
|
25572
|
-
var specializedRenderer = createRenderer$
|
|
26293
|
+
var specializedRenderer = createRenderer$3({
|
|
25573
26294
|
containerNode: containerNode,
|
|
25574
26295
|
cssClasses: cssClasses,
|
|
25575
26296
|
renderState: {},
|
|
@@ -25611,6 +26332,7 @@
|
|
|
25611
26332
|
dynamicWidgets: dynamicWidgets,
|
|
25612
26333
|
chat: chat,
|
|
25613
26334
|
analytics: analytics,
|
|
26335
|
+
EXPERIMENTAL_autocomplete: EXPERIMENTAL_autocomplete,
|
|
25614
26336
|
breadcrumb: breadcrumb,
|
|
25615
26337
|
clearRefinements: clearRefinements$1,
|
|
25616
26338
|
configure: configure,
|