instantsearch.js 4.81.0 → 4.83.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 +39 -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 +349 -0
- package/cjs/widgets/breadcrumb/breadcrumb.js +3 -3
- package/cjs/widgets/chat/chat.js +128 -80
- 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 -16
- 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 +108 -3
- package/dist/instantsearch.development.js +1678 -638
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +108 -3
- package/dist/instantsearch.production.min.d.ts +108 -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 +21 -1
- package/es/connectors/chat/connectChat.js +39 -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 +75 -0
- package/es/widgets/autocomplete/autocomplete.js +342 -0
- package/es/widgets/breadcrumb/breadcrumb.js +2 -2
- package/es/widgets/chat/chat.d.ts +44 -1
- package/es/widgets/chat/chat.js +127 -79
- 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 -15
- 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 +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! InstantSearch.js 4.
|
|
1
|
+
/*! InstantSearch.js 4.83.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")) ;
|
|
@@ -6324,8 +6277,8 @@
|
|
|
6324
6277
|
|
|
6325
6278
|
return recSort(
|
|
6326
6279
|
function (data, facetName) {
|
|
6280
|
+
var facetOrdering = getFacetOrdering(results, facetName);
|
|
6327
6281
|
if (options.facetOrdering) {
|
|
6328
|
-
var facetOrdering = getFacetOrdering(results, facetName);
|
|
6329
6282
|
if (facetOrdering) {
|
|
6330
6283
|
return sortViaFacetOrdering(data, facetOrdering);
|
|
6331
6284
|
}
|
|
@@ -6333,7 +6286,24 @@
|
|
|
6333
6286
|
|
|
6334
6287
|
if (Array.isArray(options.sortBy)) {
|
|
6335
6288
|
var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT);
|
|
6336
|
-
|
|
6289
|
+
var items = orderBy_1(data, order[0], order[1]);
|
|
6290
|
+
|
|
6291
|
+
var hide =
|
|
6292
|
+
facetOrdering && facetOrdering.hide ? facetOrdering.hide : [];
|
|
6293
|
+
if (hide.length > 0) {
|
|
6294
|
+
var visible = [];
|
|
6295
|
+
items.forEach(function (item) {
|
|
6296
|
+
// hierarchical facets get sorted using their raw name
|
|
6297
|
+
var name = item.path || item.name;
|
|
6298
|
+
if (hide.indexOf(name) === -1) {
|
|
6299
|
+
visible.push(item);
|
|
6300
|
+
}
|
|
6301
|
+
});
|
|
6302
|
+
|
|
6303
|
+
return visible;
|
|
6304
|
+
}
|
|
6305
|
+
|
|
6306
|
+
return items;
|
|
6337
6307
|
} else if (typeof options.sortBy === 'function') {
|
|
6338
6308
|
return vanillaSortFn(options.sortBy, data);
|
|
6339
6309
|
}
|
|
@@ -6598,7 +6568,7 @@
|
|
|
6598
6568
|
|
|
6599
6569
|
var sortAndMergeRecommendations_1 = sortAndMergeRecommendations;
|
|
6600
6570
|
|
|
6601
|
-
var version = '3.26.
|
|
6571
|
+
var version = '3.26.1';
|
|
6602
6572
|
|
|
6603
6573
|
var escapeFacetValue$4 = escapeFacetValue_1.escapeFacetValue;
|
|
6604
6574
|
|
|
@@ -7051,16 +7021,19 @@
|
|
|
7051
7021
|
|
|
7052
7022
|
content = Array.isArray(content) ? content[0] : content;
|
|
7053
7023
|
|
|
7054
|
-
content.facetHits.
|
|
7024
|
+
content.facetHits = content.facetHits.reduce(function (acc, f) {
|
|
7055
7025
|
if (hide.indexOf(f.value) > -1) {
|
|
7056
|
-
|
|
7057
|
-
return;
|
|
7026
|
+
return acc;
|
|
7058
7027
|
}
|
|
7028
|
+
|
|
7059
7029
|
f.escapedValue = escapeFacetValue$4(f.value);
|
|
7060
7030
|
f.isRefined = isDisjunctive
|
|
7061
7031
|
? state.isDisjunctiveFacetRefined(facet, f.escapedValue)
|
|
7062
7032
|
: state.isFacetRefined(facet, f.escapedValue);
|
|
7063
|
-
|
|
7033
|
+
|
|
7034
|
+
acc.push(f);
|
|
7035
|
+
return acc;
|
|
7036
|
+
}, []);
|
|
7064
7037
|
|
|
7065
7038
|
return content;
|
|
7066
7039
|
},
|
|
@@ -9557,6 +9530,21 @@
|
|
|
9557
9530
|
return item;
|
|
9558
9531
|
});
|
|
9559
9532
|
}
|
|
9533
|
+
function _hasMoreItems(facetValues, maxValuesPerFacet) {
|
|
9534
|
+
var currentLimit = getLimit();
|
|
9535
|
+
return (
|
|
9536
|
+
// Check if we have exhaustive items at this level
|
|
9537
|
+
// If the limit is the max number of facet retrieved it is impossible to know
|
|
9538
|
+
// if the facets are exhaustive. The only moment we are sure it is exhaustive
|
|
9539
|
+
// is when it is strictly under the number requested unless we know that another
|
|
9540
|
+
// widget has requested more values (maxValuesPerFacet > getLimit()).
|
|
9541
|
+
!(maxValuesPerFacet > currentLimit ? facetValues.length <= currentLimit : facetValues.length < currentLimit) ||
|
|
9542
|
+
// Check if any of the children are not exhaustive.
|
|
9543
|
+
facetValues.slice(0, limit).some(function (item) {
|
|
9544
|
+
return Array.isArray(item.data) && item.data.length > 0 && _hasMoreItems(item.data, maxValuesPerFacet);
|
|
9545
|
+
})
|
|
9546
|
+
);
|
|
9547
|
+
}
|
|
9560
9548
|
return {
|
|
9561
9549
|
$$type: 'ais.hierarchicalMenu',
|
|
9562
9550
|
init: function init(initOptions) {
|
|
@@ -9625,14 +9613,11 @@
|
|
|
9625
9613
|
});
|
|
9626
9614
|
var facetItems = facetValues && !Array.isArray(facetValues) && facetValues.data ? facetValues.data : [];
|
|
9627
9615
|
|
|
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);
|
|
9616
|
+
// Check if there are more items to show at any level
|
|
9617
|
+
// This checks both the exhaustiveness of items retrieved from the API
|
|
9618
|
+
// and whether there are hidden items at any visible child level
|
|
9619
|
+
var hasMoreItems = _hasMoreItems(facetItems, state.maxValuesPerFacet || 0);
|
|
9620
|
+
canToggleShowMore = showMore && (isShowingMore || hasMoreItems);
|
|
9636
9621
|
items = transformItems(_prepareFacetValues(facetItems), {
|
|
9637
9622
|
results: results
|
|
9638
9623
|
});
|
|
@@ -10398,8 +10383,8 @@
|
|
|
10398
10383
|
page: page + 1
|
|
10399
10384
|
});
|
|
10400
10385
|
},
|
|
10401
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
10402
|
-
var uiState =
|
|
10386
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref0) {
|
|
10387
|
+
var uiState = _ref0.uiState;
|
|
10403
10388
|
var widgetSearchParameters = searchParameters;
|
|
10404
10389
|
if (escapeHTML) {
|
|
10405
10390
|
// @MAJOR: set this globally, not in the InfiniteHits widget to allow InfiniteHits to be conditionally used
|
|
@@ -11206,18 +11191,18 @@
|
|
|
11206
11191
|
_ref8 = _slicedToArray(_ref7, 1),
|
|
11207
11192
|
minValue = _ref8[0];
|
|
11208
11193
|
var _ref9 = helper.getNumericRefinement(attribute, '<=') || [],
|
|
11209
|
-
|
|
11210
|
-
maxValue =
|
|
11194
|
+
_ref0 = _slicedToArray(_ref9, 1),
|
|
11195
|
+
maxValue = _ref0[0];
|
|
11211
11196
|
var min = isFiniteNumber(minValue) ? minValue : -Infinity;
|
|
11212
11197
|
var max = isFiniteNumber(maxValue) ? maxValue : Infinity;
|
|
11213
11198
|
return [min, max];
|
|
11214
11199
|
}
|
|
11215
11200
|
function _refine(helper, currentRange) {
|
|
11216
11201
|
return function () {
|
|
11217
|
-
var
|
|
11218
|
-
|
|
11219
|
-
nextMin =
|
|
11220
|
-
nextMax =
|
|
11202
|
+
var _ref1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [undefined, undefined],
|
|
11203
|
+
_ref10 = _slicedToArray(_ref1, 2),
|
|
11204
|
+
nextMin = _ref10[0],
|
|
11205
|
+
nextMax = _ref10[1];
|
|
11221
11206
|
var refinedState = getRefinedState(helper, currentRange, nextMin, nextMax);
|
|
11222
11207
|
if (refinedState) {
|
|
11223
11208
|
helper.setState(refinedState).search();
|
|
@@ -11241,10 +11226,10 @@
|
|
|
11241
11226
|
range: _objectSpread2(_objectSpread2({}, renderState.range), {}, _defineProperty({}, attribute, this.getWidgetRenderState(renderOptions)))
|
|
11242
11227
|
});
|
|
11243
11228
|
},
|
|
11244
|
-
getWidgetRenderState: function getWidgetRenderState(
|
|
11245
|
-
var results =
|
|
11246
|
-
helper =
|
|
11247
|
-
instantSearchInstance =
|
|
11229
|
+
getWidgetRenderState: function getWidgetRenderState(_ref11) {
|
|
11230
|
+
var results = _ref11.results,
|
|
11231
|
+
helper = _ref11.helper,
|
|
11232
|
+
instantSearchInstance = _ref11.instantSearchInstance;
|
|
11248
11233
|
var facetsFromResults = results && results.disjunctiveFacets || [];
|
|
11249
11234
|
var facet = find(facetsFromResults, function (facetResult) {
|
|
11250
11235
|
return facetResult.name === attribute;
|
|
@@ -11279,13 +11264,13 @@
|
|
|
11279
11264
|
start: start
|
|
11280
11265
|
};
|
|
11281
11266
|
},
|
|
11282
|
-
dispose: function dispose(
|
|
11283
|
-
var state =
|
|
11267
|
+
dispose: function dispose(_ref12) {
|
|
11268
|
+
var state = _ref12.state;
|
|
11284
11269
|
unmountFn();
|
|
11285
11270
|
return state.removeDisjunctiveFacet(attribute).removeNumericRefinement(attribute);
|
|
11286
11271
|
},
|
|
11287
|
-
getWidgetUiState: function getWidgetUiState(uiState,
|
|
11288
|
-
var searchParameters =
|
|
11272
|
+
getWidgetUiState: function getWidgetUiState(uiState, _ref13) {
|
|
11273
|
+
var searchParameters = _ref13.searchParameters;
|
|
11289
11274
|
var _searchParameters$get = searchParameters.getNumericRefinements(attribute),
|
|
11290
11275
|
_searchParameters$get2 = _searchParameters$get['>='],
|
|
11291
11276
|
min = _searchParameters$get2 === void 0 ? [] : _searchParameters$get2,
|
|
@@ -11298,8 +11283,8 @@
|
|
|
11298
11283
|
range: _objectSpread2(_objectSpread2({}, uiState.range), {}, _defineProperty({}, attribute, "".concat(min, ":").concat(max)))
|
|
11299
11284
|
});
|
|
11300
11285
|
},
|
|
11301
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
11302
|
-
var uiState =
|
|
11286
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref14) {
|
|
11287
|
+
var uiState = _ref14.uiState;
|
|
11303
11288
|
var widgetSearchParameters = searchParameters.addDisjunctiveFacet(attribute).setQueryParameters({
|
|
11304
11289
|
numericRefinements: _objectSpread2(_objectSpread2({}, searchParameters.numericRefinements), {}, _defineProperty({}, attribute, {}))
|
|
11305
11290
|
});
|
|
@@ -11696,7 +11681,7 @@
|
|
|
11696
11681
|
objectID: objectID,
|
|
11697
11682
|
maxRecommendations: limit,
|
|
11698
11683
|
threshold: threshold,
|
|
11699
|
-
fallbackParameters: _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
11684
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
11700
11685
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
11701
11686
|
$$id: _this.$$id
|
|
11702
11687
|
});
|
|
@@ -12485,8 +12470,8 @@
|
|
|
12485
12470
|
widgetParams: widgetParams
|
|
12486
12471
|
};
|
|
12487
12472
|
},
|
|
12488
|
-
getWidgetUiState: function getWidgetUiState(uiState,
|
|
12489
|
-
var searchParameters =
|
|
12473
|
+
getWidgetUiState: function getWidgetUiState(uiState, _ref0) {
|
|
12474
|
+
var searchParameters = _ref0.searchParameters;
|
|
12490
12475
|
var isRefined = on && on.every(function (v) {
|
|
12491
12476
|
return searchParameters.isDisjunctiveFacetRefined(attribute, v);
|
|
12492
12477
|
});
|
|
@@ -12500,8 +12485,8 @@
|
|
|
12500
12485
|
toggle: _objectSpread2(_objectSpread2({}, uiState.toggle), {}, _defineProperty({}, attribute, isRefined))
|
|
12501
12486
|
});
|
|
12502
12487
|
},
|
|
12503
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
12504
|
-
var uiState =
|
|
12488
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref1) {
|
|
12489
|
+
var uiState = _ref1.uiState;
|
|
12505
12490
|
if (searchParameters.isHierarchicalFacet(attribute) || searchParameters.isConjunctiveFacet(attribute)) {
|
|
12506
12491
|
_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
12492
|
return searchParameters;
|
|
@@ -12621,7 +12606,7 @@
|
|
|
12621
12606
|
facetValue: facetValue,
|
|
12622
12607
|
maxRecommendations: limit,
|
|
12623
12608
|
threshold: threshold,
|
|
12624
|
-
fallbackParameters: _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
12609
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
12625
12610
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
12626
12611
|
$$id: this.$$id
|
|
12627
12612
|
});
|
|
@@ -13649,6 +13634,7 @@
|
|
|
13649
13634
|
objectIDs = _ref.objectIDs,
|
|
13650
13635
|
limit = _ref.limit,
|
|
13651
13636
|
threshold = _ref.threshold,
|
|
13637
|
+
fallbackParameters = _ref.fallbackParameters,
|
|
13652
13638
|
queryParameters = _ref.queryParameters;
|
|
13653
13639
|
if (!objectIDs || objectIDs.length === 0) {
|
|
13654
13640
|
throw new Error(withUsage$s('The `objectIDs` option is required.'));
|
|
@@ -13713,8 +13699,10 @@
|
|
|
13713
13699
|
return objectIDs.reduce(function (acc, objectID) {
|
|
13714
13700
|
return acc.addFrequentlyBoughtTogether({
|
|
13715
13701
|
objectID: objectID,
|
|
13716
|
-
threshold: threshold,
|
|
13717
13702
|
maxRecommendations: limit,
|
|
13703
|
+
threshold: threshold,
|
|
13704
|
+
// @ts-expect-error until @algolia/recommend types are updated
|
|
13705
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
13718
13706
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
13719
13707
|
$$id: _this.$$id
|
|
13720
13708
|
});
|
|
@@ -13809,7 +13797,7 @@
|
|
|
13809
13797
|
objectID: objectID,
|
|
13810
13798
|
maxRecommendations: limit,
|
|
13811
13799
|
threshold: threshold,
|
|
13812
|
-
fallbackParameters: _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
13800
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
13813
13801
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
13814
13802
|
$$id: _this.$$id
|
|
13815
13803
|
});
|
|
@@ -14228,8 +14216,8 @@
|
|
|
14228
14216
|
if (Array.isArray(queueAtStart)) {
|
|
14229
14217
|
var _map3 = ['setUserToken', 'init'].map(function (key) {
|
|
14230
14218
|
var _ref7 = find(queueAtStart.slice().reverse(), function (_ref9) {
|
|
14231
|
-
var
|
|
14232
|
-
method =
|
|
14219
|
+
var _ref0 = _slicedToArray(_ref9, 1),
|
|
14220
|
+
method = _ref0[0];
|
|
14233
14221
|
return method === key;
|
|
14234
14222
|
}) || [],
|
|
14235
14223
|
_ref8 = _slicedToArray(_ref7, 2),
|
|
@@ -14349,8 +14337,8 @@
|
|
|
14349
14337
|
}
|
|
14350
14338
|
var viewedObjectIDs = new Set();
|
|
14351
14339
|
var lastQueryId;
|
|
14352
|
-
instantSearchInstance.mainHelper.derivedHelpers[0].on('result', function (
|
|
14353
|
-
var results =
|
|
14340
|
+
instantSearchInstance.mainHelper.derivedHelpers[0].on('result', function (_ref1) {
|
|
14341
|
+
var results = _ref1.results;
|
|
14354
14342
|
if (results && (!results.queryID || results.queryID !== lastQueryId)) {
|
|
14355
14343
|
lastQueryId = results.queryID;
|
|
14356
14344
|
viewedObjectIDs.clear();
|
|
@@ -15651,8 +15639,8 @@
|
|
|
15651
15639
|
windowTitle = _ref7.windowTitle,
|
|
15652
15640
|
_ref7$getLocation = _ref7.getLocation,
|
|
15653
15641
|
getLocation = _ref7$getLocation === void 0 ? function () {
|
|
15654
|
-
return safelyRunOnBrowser(function (
|
|
15655
|
-
var window =
|
|
15642
|
+
return safelyRunOnBrowser(function (_ref0) {
|
|
15643
|
+
var window = _ref0.window;
|
|
15656
15644
|
return window.location;
|
|
15657
15645
|
}, {
|
|
15658
15646
|
fallback: function fallback() {
|
|
@@ -15965,6 +15953,7 @@
|
|
|
15965
15953
|
throw new Error(withUsage$u('The widget definition expects a `render` and/or an `init` method.'));
|
|
15966
15954
|
}
|
|
15967
15955
|
flatWidgets.forEach(function (widget) {
|
|
15956
|
+
widget.parent = _this;
|
|
15968
15957
|
if (isIndexWidget(widget)) {
|
|
15969
15958
|
return;
|
|
15970
15959
|
}
|
|
@@ -16037,6 +16026,7 @@
|
|
|
16037
16026
|
return flatWidgets.indexOf(widget) === -1;
|
|
16038
16027
|
});
|
|
16039
16028
|
localWidgets.forEach(function (widget) {
|
|
16029
|
+
widget.parent = undefined;
|
|
16040
16030
|
if (isIndexWidget(widget)) {
|
|
16041
16031
|
return;
|
|
16042
16032
|
}
|
|
@@ -16164,12 +16154,6 @@
|
|
|
16164
16154
|
helper.searchWithoutTriggeringOnStateChange = function () {
|
|
16165
16155
|
return mainHelper.search();
|
|
16166
16156
|
};
|
|
16167
|
-
|
|
16168
|
-
// We use the same pattern for the `searchForFacetValues`.
|
|
16169
|
-
helper.searchForFacetValues = function (facetName, facetValue, maxFacetHits, userState) {
|
|
16170
|
-
var state = helper.state.setQueryParameters(userState);
|
|
16171
|
-
return mainHelper.searchForFacetValues(facetName, facetValue, maxFacetHits, state);
|
|
16172
|
-
};
|
|
16173
16157
|
var isolatedHelper = indexName ? helper : algoliasearchHelper_1({}, '__empty_index__', {});
|
|
16174
16158
|
var derivingHelper = isolated ? isolatedHelper : nearestIsolatedHelper(parent, mainHelper);
|
|
16175
16159
|
derivedHelper = derivingHelper.derive(function () {
|
|
@@ -16498,7 +16482,7 @@
|
|
|
16498
16482
|
};
|
|
16499
16483
|
}
|
|
16500
16484
|
|
|
16501
|
-
var version$1 = '4.
|
|
16485
|
+
var version$1 = '4.83.0';
|
|
16502
16486
|
|
|
16503
16487
|
var withUsage$v = createDocumentationMessageGenerator({
|
|
16504
16488
|
name: 'instantsearch'
|
|
@@ -17236,6 +17220,71 @@
|
|
|
17236
17220
|
}, []).filter(Boolean).join(' ');
|
|
17237
17221
|
}
|
|
17238
17222
|
|
|
17223
|
+
var _excluded$9 = ["children", "classNames"];
|
|
17224
|
+
function createAutocompleteComponent(_ref) {
|
|
17225
|
+
var createElement = _ref.createElement;
|
|
17226
|
+
return function Autocomplete(userProps) {
|
|
17227
|
+
var children = userProps.children,
|
|
17228
|
+
_userProps$classNames = userProps.classNames,
|
|
17229
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17230
|
+
props = _objectWithoutProperties$1(userProps, _excluded$9);
|
|
17231
|
+
return createElement("div", _extends$1({
|
|
17232
|
+
className: cx('ais-Autocomplete', classNames.root)
|
|
17233
|
+
}, props), children);
|
|
17234
|
+
};
|
|
17235
|
+
}
|
|
17236
|
+
|
|
17237
|
+
var _excluded$a = ["className", "onSelect"];
|
|
17238
|
+
function createAutocompleteIndexComponent(_ref) {
|
|
17239
|
+
var createElement = _ref.createElement;
|
|
17240
|
+
return function AutocompleteIndex(userProps) {
|
|
17241
|
+
var items = userProps.items,
|
|
17242
|
+
HeaderComponent = userProps.HeaderComponent,
|
|
17243
|
+
ItemComponent = userProps.ItemComponent,
|
|
17244
|
+
getItemProps = userProps.getItemProps,
|
|
17245
|
+
_userProps$classNames = userProps.classNames,
|
|
17246
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames;
|
|
17247
|
+
return createElement("div", {
|
|
17248
|
+
className: cx('ais-AutocompleteIndex', classNames.root)
|
|
17249
|
+
}, HeaderComponent && createElement("div", {
|
|
17250
|
+
className: cx('ais-AutocompleteIndexHeader', classNames.header)
|
|
17251
|
+
}, createElement(HeaderComponent, {
|
|
17252
|
+
items: items
|
|
17253
|
+
})), createElement("ol", {
|
|
17254
|
+
className: cx('ais-AutocompleteIndexList', classNames.list)
|
|
17255
|
+
}, items.map(function (item, index) {
|
|
17256
|
+
var _getItemProps = getItemProps(item, index),
|
|
17257
|
+
className = _getItemProps.className,
|
|
17258
|
+
onSelect = _getItemProps.onSelect,
|
|
17259
|
+
itemProps = _objectWithoutProperties$1(_getItemProps, _excluded$a);
|
|
17260
|
+
return createElement("li", _extends$1({
|
|
17261
|
+
key: item.objectID
|
|
17262
|
+
}, itemProps, {
|
|
17263
|
+
className: cx('ais-AutocompleteIndexItem', classNames.item, className)
|
|
17264
|
+
}), createElement(ItemComponent, {
|
|
17265
|
+
item: item,
|
|
17266
|
+
onSelect: onSelect
|
|
17267
|
+
}));
|
|
17268
|
+
})));
|
|
17269
|
+
};
|
|
17270
|
+
}
|
|
17271
|
+
|
|
17272
|
+
var _excluded$b = ["children", "classNames"];
|
|
17273
|
+
function createAutocompletePanelComponent(_ref) {
|
|
17274
|
+
var createElement = _ref.createElement;
|
|
17275
|
+
return function AutocompletePanel(userProps) {
|
|
17276
|
+
var children = userProps.children,
|
|
17277
|
+
_userProps$classNames = userProps.classNames,
|
|
17278
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17279
|
+
props = _objectWithoutProperties$1(userProps, _excluded$b);
|
|
17280
|
+
return createElement("div", _extends$1({}, props, {
|
|
17281
|
+
className: cx('ais-AutocompletePanel', classNames.root, props.className)
|
|
17282
|
+
}), createElement("div", {
|
|
17283
|
+
className: cx('ais-AutocompletePanelLayout', classNames.layout)
|
|
17284
|
+
}, children));
|
|
17285
|
+
};
|
|
17286
|
+
}
|
|
17287
|
+
|
|
17239
17288
|
var _typeof_1 = createCommonjsModule(function (module) {
|
|
17240
17289
|
function _typeof(o) {
|
|
17241
17290
|
"@babel/helpers - typeof";
|
|
@@ -17249,7 +17298,7 @@
|
|
|
17249
17298
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17250
17299
|
});
|
|
17251
17300
|
|
|
17252
|
-
unwrapExports(_typeof_1);
|
|
17301
|
+
var _typeof$1 = unwrapExports(_typeof_1);
|
|
17253
17302
|
|
|
17254
17303
|
var toPrimitive_1 = createCommonjsModule(function (module) {
|
|
17255
17304
|
var _typeof = _typeof_1["default"];
|
|
@@ -17294,21 +17343,680 @@
|
|
|
17294
17343
|
|
|
17295
17344
|
var _defineProperty$1 = unwrapExports(defineProperty);
|
|
17296
17345
|
|
|
17297
|
-
function
|
|
17298
|
-
|
|
17299
|
-
|
|
17300
|
-
return function DefaultEmpty() {
|
|
17301
|
-
return createElement(Fragment, null, "No results");
|
|
17302
|
-
};
|
|
17346
|
+
var arrayWithHoles = createCommonjsModule(function (module) {
|
|
17347
|
+
function _arrayWithHoles(r) {
|
|
17348
|
+
if (Array.isArray(r)) return r;
|
|
17303
17349
|
}
|
|
17350
|
+
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17351
|
+
});
|
|
17304
17352
|
|
|
17305
|
-
|
|
17306
|
-
|
|
17307
|
-
|
|
17308
|
-
|
|
17309
|
-
|
|
17310
|
-
|
|
17311
|
-
|
|
17353
|
+
unwrapExports(arrayWithHoles);
|
|
17354
|
+
|
|
17355
|
+
var iterableToArrayLimit = createCommonjsModule(function (module) {
|
|
17356
|
+
function _iterableToArrayLimit(r, l) {
|
|
17357
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
17358
|
+
if (null != t) {
|
|
17359
|
+
var e,
|
|
17360
|
+
n,
|
|
17361
|
+
i,
|
|
17362
|
+
u,
|
|
17363
|
+
a = [],
|
|
17364
|
+
f = !0,
|
|
17365
|
+
o = !1;
|
|
17366
|
+
try {
|
|
17367
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
17368
|
+
if (Object(t) !== t) return;
|
|
17369
|
+
f = !1;
|
|
17370
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
17371
|
+
} catch (r) {
|
|
17372
|
+
o = !0, n = r;
|
|
17373
|
+
} finally {
|
|
17374
|
+
try {
|
|
17375
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
17376
|
+
} finally {
|
|
17377
|
+
if (o) throw n;
|
|
17378
|
+
}
|
|
17379
|
+
}
|
|
17380
|
+
return a;
|
|
17381
|
+
}
|
|
17382
|
+
}
|
|
17383
|
+
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17384
|
+
});
|
|
17385
|
+
|
|
17386
|
+
unwrapExports(iterableToArrayLimit);
|
|
17387
|
+
|
|
17388
|
+
var arrayLikeToArray = createCommonjsModule(function (module) {
|
|
17389
|
+
function _arrayLikeToArray(r, a) {
|
|
17390
|
+
(null == a || a > r.length) && (a = r.length);
|
|
17391
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
17392
|
+
return n;
|
|
17393
|
+
}
|
|
17394
|
+
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17395
|
+
});
|
|
17396
|
+
|
|
17397
|
+
unwrapExports(arrayLikeToArray);
|
|
17398
|
+
|
|
17399
|
+
var unsupportedIterableToArray = createCommonjsModule(function (module) {
|
|
17400
|
+
function _unsupportedIterableToArray(r, a) {
|
|
17401
|
+
if (r) {
|
|
17402
|
+
if ("string" == typeof r) return arrayLikeToArray(r, a);
|
|
17403
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
17404
|
+
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;
|
|
17405
|
+
}
|
|
17406
|
+
}
|
|
17407
|
+
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17408
|
+
});
|
|
17409
|
+
|
|
17410
|
+
unwrapExports(unsupportedIterableToArray);
|
|
17411
|
+
|
|
17412
|
+
var nonIterableRest = createCommonjsModule(function (module) {
|
|
17413
|
+
function _nonIterableRest() {
|
|
17414
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17415
|
+
}
|
|
17416
|
+
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17417
|
+
});
|
|
17418
|
+
|
|
17419
|
+
unwrapExports(nonIterableRest);
|
|
17420
|
+
|
|
17421
|
+
var slicedToArray = createCommonjsModule(function (module) {
|
|
17422
|
+
function _slicedToArray(r, e) {
|
|
17423
|
+
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
|
|
17424
|
+
}
|
|
17425
|
+
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17426
|
+
});
|
|
17427
|
+
|
|
17428
|
+
var _slicedToArray$1 = unwrapExports(slicedToArray);
|
|
17429
|
+
|
|
17430
|
+
function AutocompleteSubmitIcon(_ref) {
|
|
17431
|
+
var createElement = _ref.createElement;
|
|
17432
|
+
return createElement("svg", {
|
|
17433
|
+
className: "ais-AutocompleteSubmitIcon",
|
|
17434
|
+
viewBox: "0 0 24 24",
|
|
17435
|
+
width: "20",
|
|
17436
|
+
height: "20",
|
|
17437
|
+
fill: "currentColor"
|
|
17438
|
+
}, createElement("path", {
|
|
17439
|
+
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"
|
|
17440
|
+
}));
|
|
17441
|
+
}
|
|
17442
|
+
function AutocompleteLoadingIcon(_ref2) {
|
|
17443
|
+
var createElement = _ref2.createElement;
|
|
17444
|
+
return createElement("svg", {
|
|
17445
|
+
className: "ais-AutocompleteLoadingIcon",
|
|
17446
|
+
viewBox: "0 0 100 100",
|
|
17447
|
+
width: "20",
|
|
17448
|
+
height: "20"
|
|
17449
|
+
}, createElement("circle", {
|
|
17450
|
+
cx: "50",
|
|
17451
|
+
cy: "50",
|
|
17452
|
+
fill: "none",
|
|
17453
|
+
r: "35",
|
|
17454
|
+
stroke: "currentColor",
|
|
17455
|
+
strokeDasharray: "164.93361431346415 56.97787143782138",
|
|
17456
|
+
strokeWidth: "6"
|
|
17457
|
+
}, createElement("animateTransform", {
|
|
17458
|
+
attributeName: "transform",
|
|
17459
|
+
type: "rotate",
|
|
17460
|
+
repeatCount: "indefinite",
|
|
17461
|
+
dur: "1s",
|
|
17462
|
+
values: "0 50 50;90 50 50;180 50 50;360 50 50",
|
|
17463
|
+
keyTimes: "0;0.40;0.65;1"
|
|
17464
|
+
})));
|
|
17465
|
+
}
|
|
17466
|
+
function AutocompleteClearIcon(_ref3) {
|
|
17467
|
+
var createElement = _ref3.createElement;
|
|
17468
|
+
return createElement("svg", {
|
|
17469
|
+
className: "ais-AutocompleteClearIcon",
|
|
17470
|
+
viewBox: "0 0 24 24",
|
|
17471
|
+
width: "18",
|
|
17472
|
+
height: "18",
|
|
17473
|
+
fill: "currentColor"
|
|
17474
|
+
}, createElement("path", {
|
|
17475
|
+
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"
|
|
17476
|
+
}));
|
|
17477
|
+
}
|
|
17478
|
+
function AutocompleteClockIcon(_ref4) {
|
|
17479
|
+
var createElement = _ref4.createElement;
|
|
17480
|
+
return createElement("svg", {
|
|
17481
|
+
viewBox: "0 0 24 24",
|
|
17482
|
+
fill: "currentColor"
|
|
17483
|
+
}, createElement("path", {
|
|
17484
|
+
d: "M12.516 6.984v5.25l4.5 2.672-0.75 1.266-5.25-3.188v-6h1.5zM12 20.016q3.281 0 5.648-2.367t2.367-5.648-2.367-5.648-5.648-2.367-5.648 2.367-2.367 5.648 2.367 5.648 5.648 2.367zM12 2.016q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055-7.055 2.93-7.055-2.93-2.93-7.055 2.93-7.055 7.055-2.93z"
|
|
17485
|
+
}));
|
|
17486
|
+
}
|
|
17487
|
+
function AutocompleteTrashIcon(_ref5) {
|
|
17488
|
+
var createElement = _ref5.createElement;
|
|
17489
|
+
return createElement("svg", {
|
|
17490
|
+
viewBox: "0 0 24 24",
|
|
17491
|
+
fill: "currentColor"
|
|
17492
|
+
}, createElement("path", {
|
|
17493
|
+
d: "M18 7v13c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-10c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-13zM17 5v-1c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879h-4c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v1h-4c-0.552 0-1 0.448-1 1s0.448 1 1 1h1v13c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h10c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-13h1c0.552 0 1-0.448 1-1s-0.448-1-1-1zM9 5v-1c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293h4c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v1zM9 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1zM13 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1z"
|
|
17494
|
+
}));
|
|
17495
|
+
}
|
|
17496
|
+
|
|
17497
|
+
function createAutocompleteRecentSearchComponent(_ref) {
|
|
17498
|
+
var createElement = _ref.createElement;
|
|
17499
|
+
return function AutocompleteRecentSearch(_ref2) {
|
|
17500
|
+
var item = _ref2.item,
|
|
17501
|
+
onSelect = _ref2.onSelect,
|
|
17502
|
+
onRemoveRecentSearch = _ref2.onRemoveRecentSearch,
|
|
17503
|
+
_ref2$classNames = _ref2.classNames,
|
|
17504
|
+
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames;
|
|
17505
|
+
return createElement("div", {
|
|
17506
|
+
onClick: onSelect,
|
|
17507
|
+
className: cx('ais-AutocompleteItemWrapper ais-AutocompleteRecentSearchWrapper', classNames.root)
|
|
17508
|
+
}, createElement("div", {
|
|
17509
|
+
className: cx('ais-AutocompleteItemContent', 'ais-AutocompleteRecentSearchItemContent', classNames.content)
|
|
17510
|
+
}, createElement("div", {
|
|
17511
|
+
className: cx('ais-AutocompleteItemIcon', 'ais-AutocompleteRecentSearchItemIcon', classNames.content)
|
|
17512
|
+
}, createElement(AutocompleteClockIcon, {
|
|
17513
|
+
createElement: createElement
|
|
17514
|
+
})), createElement("div", {
|
|
17515
|
+
className: cx('ais-AutocompleteItemContentBody', 'ais-AutocompleteRecentSearchItemContentBody', classNames.content)
|
|
17516
|
+
}, item.query)), createElement("div", {
|
|
17517
|
+
className: cx('ais-AutocompleteItemActions', 'ais-AutocompleteRecentSearchItemActions', classNames.actions)
|
|
17518
|
+
}, createElement("button", {
|
|
17519
|
+
className: cx('ais-AutocompleteItemActionButton', 'ais-AutocompleteRecentSearchItemDeleteButton', classNames.deleteButton),
|
|
17520
|
+
title: "Remove ".concat(item.query, " from recent searches"),
|
|
17521
|
+
onClick: function onClick(evt) {
|
|
17522
|
+
evt.stopPropagation();
|
|
17523
|
+
onRemoveRecentSearch();
|
|
17524
|
+
}
|
|
17525
|
+
}, createElement(AutocompleteTrashIcon, {
|
|
17526
|
+
createElement: createElement
|
|
17527
|
+
}))));
|
|
17528
|
+
};
|
|
17529
|
+
}
|
|
17530
|
+
|
|
17531
|
+
function createAutocompleteSearchComponent(_ref) {
|
|
17532
|
+
var createElement = _ref.createElement;
|
|
17533
|
+
return function AutocompleteSearch(_ref2) {
|
|
17534
|
+
var inputProps = _ref2.inputProps,
|
|
17535
|
+
onClear = _ref2.onClear,
|
|
17536
|
+
query = _ref2.query,
|
|
17537
|
+
isSearchStalled = _ref2.isSearchStalled;
|
|
17538
|
+
return createElement("form", {
|
|
17539
|
+
className: "ais-AutocompleteForm",
|
|
17540
|
+
action: "",
|
|
17541
|
+
noValidate: true,
|
|
17542
|
+
role: "search",
|
|
17543
|
+
onSubmit: function onSubmit(e) {
|
|
17544
|
+
return e.preventDefault();
|
|
17545
|
+
}
|
|
17546
|
+
}, createElement("div", {
|
|
17547
|
+
className: "ais-AutocompleteInputWrapperPrefix"
|
|
17548
|
+
}, createElement("label", {
|
|
17549
|
+
className: "ais-AutocompleteLabel",
|
|
17550
|
+
"aria-label": "Submit",
|
|
17551
|
+
htmlFor: inputProps.id,
|
|
17552
|
+
id: "".concat(inputProps.id, "-label")
|
|
17553
|
+
}, createElement("button", {
|
|
17554
|
+
className: "ais-AutocompleteSubmitButton",
|
|
17555
|
+
type: "submit",
|
|
17556
|
+
title: "Submit"
|
|
17557
|
+
}, createElement(AutocompleteSubmitIcon, {
|
|
17558
|
+
createElement: createElement
|
|
17559
|
+
}))), createElement("div", {
|
|
17560
|
+
className: "ais-AutocompleteLoadingIndicator",
|
|
17561
|
+
hidden: !isSearchStalled
|
|
17562
|
+
}, createElement(AutocompleteLoadingIcon, {
|
|
17563
|
+
createElement: createElement
|
|
17564
|
+
}))), createElement("div", {
|
|
17565
|
+
className: "ais-AutocompleteInputWrapper"
|
|
17566
|
+
}, createElement("input", _extends$1({
|
|
17567
|
+
className: "ais-AutocompleteInput",
|
|
17568
|
+
"aria-autocomplete": "both",
|
|
17569
|
+
"aria-labelledby": "".concat(inputProps.id, "-label"),
|
|
17570
|
+
autoComplete: "off",
|
|
17571
|
+
autoCorrect: "off",
|
|
17572
|
+
autoCapitalize: "off",
|
|
17573
|
+
enterKeyHint: "search",
|
|
17574
|
+
spellCheck: "false",
|
|
17575
|
+
placeholder: "",
|
|
17576
|
+
maxLength: 512,
|
|
17577
|
+
type: "search",
|
|
17578
|
+
value: query
|
|
17579
|
+
}, inputProps))), createElement("div", {
|
|
17580
|
+
className: "ais-AutocompleteInputWrapperSuffix"
|
|
17581
|
+
}, createElement("button", {
|
|
17582
|
+
className: "ais-AutocompleteClearButton",
|
|
17583
|
+
type: "reset",
|
|
17584
|
+
title: "Clear",
|
|
17585
|
+
hidden: query.length === 0 || isSearchStalled,
|
|
17586
|
+
onClick: onClear
|
|
17587
|
+
}, createElement(AutocompleteClearIcon, {
|
|
17588
|
+
createElement: createElement
|
|
17589
|
+
}))));
|
|
17590
|
+
};
|
|
17591
|
+
}
|
|
17592
|
+
|
|
17593
|
+
function createAutocompleteSuggestionComponent(_ref) {
|
|
17594
|
+
var createElement = _ref.createElement;
|
|
17595
|
+
return function AutocompleteSuggestion(_ref2) {
|
|
17596
|
+
var item = _ref2.item,
|
|
17597
|
+
onSelect = _ref2.onSelect,
|
|
17598
|
+
_ref2$classNames = _ref2.classNames,
|
|
17599
|
+
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames;
|
|
17600
|
+
return createElement("div", {
|
|
17601
|
+
onClick: onSelect,
|
|
17602
|
+
className: cx('ais-AutocompleteItemWrapper', 'ais-AutocompleteSuggestionWrapper', classNames.root)
|
|
17603
|
+
}, createElement("div", {
|
|
17604
|
+
className: cx('ais-AutocompleteItemContent', 'ais-AutocompleteSuggestionItemContent', classNames.content)
|
|
17605
|
+
}, createElement("div", {
|
|
17606
|
+
className: cx('ais-AutocompleteItemIcon', 'ais-AutocompleteSuggestionItemIcon', classNames.content)
|
|
17607
|
+
}, createElement(AutocompleteSubmitIcon, {
|
|
17608
|
+
createElement: createElement
|
|
17609
|
+
})), createElement("div", {
|
|
17610
|
+
className: cx('ais-AutocompleteItemContentBody', 'ais-AutocompleteSuggestionItemContentBody', classNames.content)
|
|
17611
|
+
}, item.query)));
|
|
17612
|
+
};
|
|
17613
|
+
}
|
|
17614
|
+
|
|
17615
|
+
function createAutocompletePropGetters(_ref) {
|
|
17616
|
+
var useEffect = _ref.useEffect,
|
|
17617
|
+
useId = _ref.useId,
|
|
17618
|
+
useMemo = _ref.useMemo,
|
|
17619
|
+
useRef = _ref.useRef,
|
|
17620
|
+
useState = _ref.useState;
|
|
17621
|
+
return function usePropGetters(_ref2) {
|
|
17622
|
+
var indices = _ref2.indices,
|
|
17623
|
+
indicesConfig = _ref2.indicesConfig,
|
|
17624
|
+
onRefine = _ref2.onRefine,
|
|
17625
|
+
globalOnSelect = _ref2.onSelect;
|
|
17626
|
+
var getElementId = createGetElementId(useId());
|
|
17627
|
+
var rootRef = useRef(null);
|
|
17628
|
+
var _useState = useState(false),
|
|
17629
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
17630
|
+
isOpen = _useState2[0],
|
|
17631
|
+
setIsOpen = _useState2[1];
|
|
17632
|
+
var _useState3 = useState(undefined),
|
|
17633
|
+
_useState4 = _slicedToArray$1(_useState3, 2),
|
|
17634
|
+
activeDescendant = _useState4[0],
|
|
17635
|
+
setActiveDescendant = _useState4[1];
|
|
17636
|
+
var _useMemo = useMemo(function () {
|
|
17637
|
+
return buildItems({
|
|
17638
|
+
indices: indices,
|
|
17639
|
+
indicesConfig: indicesConfig,
|
|
17640
|
+
getElementId: getElementId
|
|
17641
|
+
});
|
|
17642
|
+
}, [indices, indicesConfig, getElementId]),
|
|
17643
|
+
items = _useMemo.items,
|
|
17644
|
+
itemsIds = _useMemo.itemsIds;
|
|
17645
|
+
useEffect(function () {
|
|
17646
|
+
var onBodyClick = function onBodyClick(event) {
|
|
17647
|
+
var _unwrapRef;
|
|
17648
|
+
if ((_unwrapRef = unwrapRef(rootRef)) !== null && _unwrapRef !== void 0 && _unwrapRef.contains(event.target)) {
|
|
17649
|
+
return;
|
|
17650
|
+
}
|
|
17651
|
+
setIsOpen(false);
|
|
17652
|
+
};
|
|
17653
|
+
document.body.addEventListener('click', onBodyClick);
|
|
17654
|
+
return function () {
|
|
17655
|
+
document.body.removeEventListener('click', onBodyClick);
|
|
17656
|
+
};
|
|
17657
|
+
}, [rootRef]);
|
|
17658
|
+
var getNextActiveDescendent = function getNextActiveDescendent(key) {
|
|
17659
|
+
switch (key) {
|
|
17660
|
+
case 'ArrowLeft':
|
|
17661
|
+
case 'ArrowUp':
|
|
17662
|
+
{
|
|
17663
|
+
var prevIndex = itemsIds.indexOf(activeDescendant || '') - 1;
|
|
17664
|
+
return itemsIds[prevIndex] || itemsIds[itemsIds.length - 1];
|
|
17665
|
+
}
|
|
17666
|
+
case 'ArrowRight':
|
|
17667
|
+
case 'ArrowDown':
|
|
17668
|
+
{
|
|
17669
|
+
var nextIndex = itemsIds.indexOf(activeDescendant || '') + 1;
|
|
17670
|
+
return itemsIds[nextIndex] || itemsIds[0];
|
|
17671
|
+
}
|
|
17672
|
+
default:
|
|
17673
|
+
return undefined;
|
|
17674
|
+
}
|
|
17675
|
+
};
|
|
17676
|
+
var submit = function submit() {
|
|
17677
|
+
var actualActiveDescendant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : activeDescendant;
|
|
17678
|
+
setIsOpen(false);
|
|
17679
|
+
if (actualActiveDescendant && items.has(actualActiveDescendant)) {
|
|
17680
|
+
var _getQuery;
|
|
17681
|
+
var _ref3 = items.get(actualActiveDescendant),
|
|
17682
|
+
_item = _ref3.item,
|
|
17683
|
+
_ref3$config = _ref3.config,
|
|
17684
|
+
indexOnSelect = _ref3$config.onSelect,
|
|
17685
|
+
getQuery = _ref3$config.getQuery,
|
|
17686
|
+
getURL = _ref3$config.getURL;
|
|
17687
|
+
var actualOnSelect = indexOnSelect !== null && indexOnSelect !== void 0 ? indexOnSelect : globalOnSelect;
|
|
17688
|
+
actualOnSelect({
|
|
17689
|
+
item: _item,
|
|
17690
|
+
query: (_getQuery = getQuery === null || getQuery === void 0 ? void 0 : getQuery(_item)) !== null && _getQuery !== void 0 ? _getQuery : '',
|
|
17691
|
+
url: getURL === null || getURL === void 0 ? void 0 : getURL(_item),
|
|
17692
|
+
setQuery: function setQuery(query) {
|
|
17693
|
+
return onRefine(query);
|
|
17694
|
+
}
|
|
17695
|
+
});
|
|
17696
|
+
setActiveDescendant(undefined);
|
|
17697
|
+
}
|
|
17698
|
+
};
|
|
17699
|
+
return {
|
|
17700
|
+
getInputProps: function getInputProps() {
|
|
17701
|
+
return {
|
|
17702
|
+
id: getElementId('input'),
|
|
17703
|
+
role: 'combobox',
|
|
17704
|
+
'aria-autocomplete': 'list',
|
|
17705
|
+
'aria-expanded': isOpen,
|
|
17706
|
+
'aria-haspopup': 'grid',
|
|
17707
|
+
'aria-controls': getElementId('panel'),
|
|
17708
|
+
'aria-activedescendant': activeDescendant,
|
|
17709
|
+
onFocus: function onFocus() {
|
|
17710
|
+
return setIsOpen(true);
|
|
17711
|
+
},
|
|
17712
|
+
onKeyDown: function onKeyDown(event) {
|
|
17713
|
+
if (event.key === 'Escape') {
|
|
17714
|
+
setActiveDescendant(undefined);
|
|
17715
|
+
setIsOpen(false);
|
|
17716
|
+
return;
|
|
17717
|
+
}
|
|
17718
|
+
switch (event.key) {
|
|
17719
|
+
case 'ArrowLeft':
|
|
17720
|
+
case 'ArrowUp':
|
|
17721
|
+
case 'ArrowRight':
|
|
17722
|
+
case 'ArrowDown':
|
|
17723
|
+
{
|
|
17724
|
+
var _document$getElementB;
|
|
17725
|
+
var nextActiveDescendent = getNextActiveDescendent(event.key);
|
|
17726
|
+
setActiveDescendant(nextActiveDescendent);
|
|
17727
|
+
(_document$getElementB = document.getElementById(nextActiveDescendent)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.scrollIntoView(false);
|
|
17728
|
+
event.preventDefault();
|
|
17729
|
+
break;
|
|
17730
|
+
}
|
|
17731
|
+
case 'Enter':
|
|
17732
|
+
{
|
|
17733
|
+
submit();
|
|
17734
|
+
break;
|
|
17735
|
+
}
|
|
17736
|
+
case 'Tab':
|
|
17737
|
+
setIsOpen(false);
|
|
17738
|
+
break;
|
|
17739
|
+
default:
|
|
17740
|
+
return;
|
|
17741
|
+
}
|
|
17742
|
+
},
|
|
17743
|
+
onKeyUp: function onKeyUp(event) {
|
|
17744
|
+
switch (event.key) {
|
|
17745
|
+
case 'ArrowLeft':
|
|
17746
|
+
case 'ArrowUp':
|
|
17747
|
+
case 'ArrowRight':
|
|
17748
|
+
case 'ArrowDown':
|
|
17749
|
+
case 'Escape':
|
|
17750
|
+
case 'Return':
|
|
17751
|
+
event.preventDefault();
|
|
17752
|
+
return;
|
|
17753
|
+
default:
|
|
17754
|
+
setActiveDescendant(undefined);
|
|
17755
|
+
break;
|
|
17756
|
+
}
|
|
17757
|
+
}
|
|
17758
|
+
};
|
|
17759
|
+
},
|
|
17760
|
+
getItemProps: function getItemProps(item, index) {
|
|
17761
|
+
var id = getElementId('item', item.__indexName, index);
|
|
17762
|
+
return {
|
|
17763
|
+
id: id,
|
|
17764
|
+
role: 'row',
|
|
17765
|
+
'aria-selected': id === activeDescendant,
|
|
17766
|
+
onSelect: function onSelect() {
|
|
17767
|
+
return submit(id);
|
|
17768
|
+
}
|
|
17769
|
+
};
|
|
17770
|
+
},
|
|
17771
|
+
getPanelProps: function getPanelProps() {
|
|
17772
|
+
return {
|
|
17773
|
+
hidden: !isOpen,
|
|
17774
|
+
id: getElementId('panel'),
|
|
17775
|
+
role: 'grid',
|
|
17776
|
+
'aria-labelledby': getElementId('input')
|
|
17777
|
+
};
|
|
17778
|
+
},
|
|
17779
|
+
getRootProps: function getRootProps() {
|
|
17780
|
+
return {
|
|
17781
|
+
ref: rootRef
|
|
17782
|
+
};
|
|
17783
|
+
}
|
|
17784
|
+
};
|
|
17785
|
+
};
|
|
17786
|
+
}
|
|
17787
|
+
function buildItems(_ref4) {
|
|
17788
|
+
var indices = _ref4.indices,
|
|
17789
|
+
indicesConfig = _ref4.indicesConfig,
|
|
17790
|
+
getElementId = _ref4.getElementId;
|
|
17791
|
+
var itemsIds = [];
|
|
17792
|
+
var items = new Map();
|
|
17793
|
+
for (var i = 0; i < indicesConfig.length; i++) {
|
|
17794
|
+
var _indices$i;
|
|
17795
|
+
var config = indicesConfig[i];
|
|
17796
|
+
var hits = ((_indices$i = indices[i]) === null || _indices$i === void 0 ? void 0 : _indices$i.hits) || [];
|
|
17797
|
+
for (var position = 0; position < hits.length; position++) {
|
|
17798
|
+
var itemId = getElementId('item', config.indexName, position);
|
|
17799
|
+
items.set(itemId, {
|
|
17800
|
+
item: hits[position],
|
|
17801
|
+
config: config
|
|
17802
|
+
});
|
|
17803
|
+
itemsIds.push(itemId);
|
|
17804
|
+
}
|
|
17805
|
+
}
|
|
17806
|
+
return {
|
|
17807
|
+
items: items,
|
|
17808
|
+
itemsIds: itemsIds
|
|
17809
|
+
};
|
|
17810
|
+
}
|
|
17811
|
+
function createGetElementId(autocompleteId) {
|
|
17812
|
+
return function getElementId() {
|
|
17813
|
+
var prefix = 'autocomplete';
|
|
17814
|
+
for (var _len = arguments.length, suffixes = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17815
|
+
suffixes[_key] = arguments[_key];
|
|
17816
|
+
}
|
|
17817
|
+
return "".concat(prefix).concat(autocompleteId).concat(suffixes.join(':'));
|
|
17818
|
+
};
|
|
17819
|
+
}
|
|
17820
|
+
|
|
17821
|
+
/**
|
|
17822
|
+
* Returns the framework-agnostic value of a ref.
|
|
17823
|
+
*/
|
|
17824
|
+
function unwrapRef(ref) {
|
|
17825
|
+
return ref.current && _typeof$1(ref.current) === 'object' && 'base' in ref.current ? ref.current.base // Preact
|
|
17826
|
+
: ref.current; // React
|
|
17827
|
+
}
|
|
17828
|
+
|
|
17829
|
+
var arrayWithoutHoles = createCommonjsModule(function (module) {
|
|
17830
|
+
function _arrayWithoutHoles(r) {
|
|
17831
|
+
if (Array.isArray(r)) return arrayLikeToArray(r);
|
|
17832
|
+
}
|
|
17833
|
+
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17834
|
+
});
|
|
17835
|
+
|
|
17836
|
+
unwrapExports(arrayWithoutHoles);
|
|
17837
|
+
|
|
17838
|
+
var iterableToArray = createCommonjsModule(function (module) {
|
|
17839
|
+
function _iterableToArray(r) {
|
|
17840
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
17841
|
+
}
|
|
17842
|
+
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17843
|
+
});
|
|
17844
|
+
|
|
17845
|
+
unwrapExports(iterableToArray);
|
|
17846
|
+
|
|
17847
|
+
var nonIterableSpread = createCommonjsModule(function (module) {
|
|
17848
|
+
function _nonIterableSpread() {
|
|
17849
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17850
|
+
}
|
|
17851
|
+
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17852
|
+
});
|
|
17853
|
+
|
|
17854
|
+
unwrapExports(nonIterableSpread);
|
|
17855
|
+
|
|
17856
|
+
var toConsumableArray = createCommonjsModule(function (module) {
|
|
17857
|
+
function _toConsumableArray(r) {
|
|
17858
|
+
return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();
|
|
17859
|
+
}
|
|
17860
|
+
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17861
|
+
});
|
|
17862
|
+
|
|
17863
|
+
var _toConsumableArray$1 = unwrapExports(toConsumableArray);
|
|
17864
|
+
|
|
17865
|
+
function createAutocompleteStorage(_ref) {
|
|
17866
|
+
var useEffect = _ref.useEffect,
|
|
17867
|
+
useMemo = _ref.useMemo,
|
|
17868
|
+
useState = _ref.useState;
|
|
17869
|
+
return function useStorage(_ref2) {
|
|
17870
|
+
var showRecent = _ref2.showRecent,
|
|
17871
|
+
query = _ref2.query,
|
|
17872
|
+
indices = _ref2.indices,
|
|
17873
|
+
indicesConfig = _ref2.indicesConfig;
|
|
17874
|
+
var storageKey = showRecent && _typeof$1(showRecent) === 'object' ? showRecent.storageKey : undefined;
|
|
17875
|
+
var storage = useMemo(function () {
|
|
17876
|
+
return createStorage({
|
|
17877
|
+
limit: 5,
|
|
17878
|
+
storageKey: storageKey
|
|
17879
|
+
});
|
|
17880
|
+
}, [storageKey]);
|
|
17881
|
+
var _useState = useState(storage.getSnapshot()),
|
|
17882
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
17883
|
+
snapshot = _useState2[0],
|
|
17884
|
+
setSnapshot = _useState2[1];
|
|
17885
|
+
useEffect(function () {
|
|
17886
|
+
storage.registerUpdateListener(function () {
|
|
17887
|
+
setSnapshot(storage.getSnapshot());
|
|
17888
|
+
});
|
|
17889
|
+
return function () {
|
|
17890
|
+
storage.unregisterUpdateListener();
|
|
17891
|
+
};
|
|
17892
|
+
}, [storage]);
|
|
17893
|
+
if (!showRecent) {
|
|
17894
|
+
return {
|
|
17895
|
+
storage: {
|
|
17896
|
+
onAdd: function onAdd() {},
|
|
17897
|
+
onRemove: function onRemove() {}
|
|
17898
|
+
},
|
|
17899
|
+
storageHits: [],
|
|
17900
|
+
indicesForPropGetters: indices,
|
|
17901
|
+
indicesConfigForPropGetters: indicesConfig
|
|
17902
|
+
};
|
|
17903
|
+
}
|
|
17904
|
+
var storageHits = snapshot.getAll(query).map(function (value) {
|
|
17905
|
+
return {
|
|
17906
|
+
objectID: value,
|
|
17907
|
+
query: value,
|
|
17908
|
+
__indexName: 'recent-searches'
|
|
17909
|
+
};
|
|
17910
|
+
});
|
|
17911
|
+
var indicesForPropGetters = _toConsumableArray$1(indices);
|
|
17912
|
+
var indicesConfigForPropGetters = _toConsumableArray$1(indicesConfig);
|
|
17913
|
+
indicesForPropGetters.unshift({
|
|
17914
|
+
indexName: 'recent-searches',
|
|
17915
|
+
indexId: 'recent-searches',
|
|
17916
|
+
hits: storageHits
|
|
17917
|
+
});
|
|
17918
|
+
indicesConfigForPropGetters.unshift({
|
|
17919
|
+
indexName: 'recent-searches',
|
|
17920
|
+
// @ts-expect-error - we know it has query as it's generated from storageHits
|
|
17921
|
+
getQuery: function getQuery(item) {
|
|
17922
|
+
return item.query;
|
|
17923
|
+
}
|
|
17924
|
+
});
|
|
17925
|
+
return {
|
|
17926
|
+
storage: storage,
|
|
17927
|
+
storageHits: storageHits,
|
|
17928
|
+
indicesForPropGetters: indicesForPropGetters,
|
|
17929
|
+
indicesConfigForPropGetters: indicesConfigForPropGetters
|
|
17930
|
+
};
|
|
17931
|
+
};
|
|
17932
|
+
}
|
|
17933
|
+
var LOCAL_STORAGE_KEY_TEST = 'test-localstorage-support';
|
|
17934
|
+
var LOCAL_STORAGE_KEY = 'autocomplete-recent-searches';
|
|
17935
|
+
function isLocalStorageSupported() {
|
|
17936
|
+
try {
|
|
17937
|
+
localStorage.setItem(LOCAL_STORAGE_KEY_TEST, '');
|
|
17938
|
+
localStorage.removeItem(LOCAL_STORAGE_KEY_TEST);
|
|
17939
|
+
return true;
|
|
17940
|
+
} catch (error) {
|
|
17941
|
+
return false;
|
|
17942
|
+
}
|
|
17943
|
+
}
|
|
17944
|
+
function getLocalStorage() {
|
|
17945
|
+
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LOCAL_STORAGE_KEY;
|
|
17946
|
+
if (!isLocalStorageSupported()) {
|
|
17947
|
+
return {
|
|
17948
|
+
setItems: function setItems() {},
|
|
17949
|
+
getItems: function getItems() {
|
|
17950
|
+
return [];
|
|
17951
|
+
}
|
|
17952
|
+
};
|
|
17953
|
+
}
|
|
17954
|
+
return {
|
|
17955
|
+
setItems: function setItems(items) {
|
|
17956
|
+
try {
|
|
17957
|
+
window.localStorage.setItem(key, JSON.stringify(items));
|
|
17958
|
+
} catch (_unused) {
|
|
17959
|
+
// do nothing, this likely means the storage is full
|
|
17960
|
+
}
|
|
17961
|
+
},
|
|
17962
|
+
getItems: function getItems() {
|
|
17963
|
+
var items = window.localStorage.getItem(key);
|
|
17964
|
+
return items ? JSON.parse(items) : [];
|
|
17965
|
+
}
|
|
17966
|
+
};
|
|
17967
|
+
}
|
|
17968
|
+
function createStorage(_ref3) {
|
|
17969
|
+
var _ref3$limit = _ref3.limit,
|
|
17970
|
+
limit = _ref3$limit === void 0 ? 5 : _ref3$limit,
|
|
17971
|
+
storageKey = _ref3.storageKey;
|
|
17972
|
+
var storage = getLocalStorage(storageKey);
|
|
17973
|
+
var updateListener = null;
|
|
17974
|
+
return {
|
|
17975
|
+
onAdd: function onAdd(query) {
|
|
17976
|
+
this.onRemove(query);
|
|
17977
|
+
storage.setItems([query].concat(_toConsumableArray$1(storage.getItems())));
|
|
17978
|
+
},
|
|
17979
|
+
onRemove: function onRemove(query) {
|
|
17980
|
+
var _updateListener;
|
|
17981
|
+
storage.setItems(storage.getItems().filter(function (q) {
|
|
17982
|
+
return q !== query;
|
|
17983
|
+
}));
|
|
17984
|
+
(_updateListener = updateListener) === null || _updateListener === void 0 ? void 0 : _updateListener();
|
|
17985
|
+
},
|
|
17986
|
+
registerUpdateListener: function registerUpdateListener(callback) {
|
|
17987
|
+
updateListener = callback;
|
|
17988
|
+
},
|
|
17989
|
+
unregisterUpdateListener: function unregisterUpdateListener() {
|
|
17990
|
+
updateListener = null;
|
|
17991
|
+
},
|
|
17992
|
+
getSnapshot: function getSnapshot() {
|
|
17993
|
+
return {
|
|
17994
|
+
getAll: function getAll() {
|
|
17995
|
+
var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
17996
|
+
return storage.getItems().filter(function (q) {
|
|
17997
|
+
return q.includes(query);
|
|
17998
|
+
}).slice(0, limit);
|
|
17999
|
+
}
|
|
18000
|
+
};
|
|
18001
|
+
}
|
|
18002
|
+
};
|
|
18003
|
+
}
|
|
18004
|
+
|
|
18005
|
+
function createDefaultEmptyComponent(_ref) {
|
|
18006
|
+
var createElement = _ref.createElement,
|
|
18007
|
+
Fragment = _ref.Fragment;
|
|
18008
|
+
return function DefaultEmpty() {
|
|
18009
|
+
return createElement(Fragment, null, "No results");
|
|
18010
|
+
};
|
|
18011
|
+
}
|
|
18012
|
+
|
|
18013
|
+
function createDefaultHeaderComponent(_ref) {
|
|
18014
|
+
var createElement = _ref.createElement;
|
|
18015
|
+
return function DefaultHeader(userProps) {
|
|
18016
|
+
var _userProps$classNames = userProps.classNames,
|
|
18017
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
18018
|
+
items = userProps.items,
|
|
18019
|
+
translations = userProps.translations;
|
|
17312
18020
|
if (!items || items.length < 1) {
|
|
17313
18021
|
return null;
|
|
17314
18022
|
}
|
|
@@ -17359,7 +18067,7 @@
|
|
|
17359
18067
|
};
|
|
17360
18068
|
}
|
|
17361
18069
|
|
|
17362
|
-
var _excluded$
|
|
18070
|
+
var _excluded$c = ["listRef", "nextButtonRef", "previousButtonRef", "carouselIdRef", "canScrollLeft", "canScrollRight", "setCanScrollLeft", "setCanScrollRight", "classNames", "itemComponent", "previousIconComponent", "nextIconComponent", "headerComponent", "showNavigation", "items", "translations", "sendEvent"];
|
|
17363
18071
|
function ownKeys$1(e, r) {
|
|
17364
18072
|
var t = Object.keys(e);
|
|
17365
18073
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17442,7 +18150,7 @@
|
|
|
17442
18150
|
items = userProps.items,
|
|
17443
18151
|
userTranslations = userProps.translations,
|
|
17444
18152
|
sendEvent = userProps.sendEvent,
|
|
17445
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18153
|
+
props = _objectWithoutProperties$1(userProps, _excluded$c);
|
|
17446
18154
|
var translations = _objectSpread({
|
|
17447
18155
|
listLabel: 'Items',
|
|
17448
18156
|
nextButtonLabel: 'Next',
|
|
@@ -17556,7 +18264,7 @@
|
|
|
17556
18264
|
};
|
|
17557
18265
|
}
|
|
17558
18266
|
|
|
17559
|
-
var _excluded$
|
|
18267
|
+
var _excluded$d = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17560
18268
|
function ownKeys$2(e, r) {
|
|
17561
18269
|
var t = Object.keys(e);
|
|
17562
18270
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17608,7 +18316,7 @@
|
|
|
17608
18316
|
status = userProps.status,
|
|
17609
18317
|
userTranslations = userProps.translations,
|
|
17610
18318
|
sendEvent = userProps.sendEvent,
|
|
17611
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18319
|
+
props = _objectWithoutProperties$1(userProps, _excluded$d);
|
|
17612
18320
|
var translations = _objectSpread$1({
|
|
17613
18321
|
title: 'Frequently bought together',
|
|
17614
18322
|
sliderLabel: 'Frequently bought together products'
|
|
@@ -17641,7 +18349,7 @@
|
|
|
17641
18349
|
};
|
|
17642
18350
|
}
|
|
17643
18351
|
|
|
17644
|
-
var _excluded$
|
|
18352
|
+
var _excluded$e = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
|
|
17645
18353
|
function createHighlightPartComponent(_ref) {
|
|
17646
18354
|
var createElement = _ref.createElement;
|
|
17647
18355
|
return function HighlightPart(_ref2) {
|
|
@@ -17674,7 +18382,7 @@
|
|
|
17674
18382
|
className = userProps.className,
|
|
17675
18383
|
_userProps$classNames = userProps.classNames,
|
|
17676
18384
|
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17677
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18385
|
+
props = _objectWithoutProperties$1(userProps, _excluded$e);
|
|
17678
18386
|
return createElement("span", _extends$1({}, props, {
|
|
17679
18387
|
className: cx(classNames.root, className)
|
|
17680
18388
|
}), parts.map(function (part, partIndex) {
|
|
@@ -17696,7 +18404,7 @@
|
|
|
17696
18404
|
};
|
|
17697
18405
|
}
|
|
17698
18406
|
|
|
17699
|
-
var _excluded$
|
|
18407
|
+
var _excluded$f = ["classNames", "hits", "itemComponent", "sendEvent", "emptyComponent", "banner", "bannerComponent"];
|
|
17700
18408
|
|
|
17701
18409
|
// Should be imported from a shared package in the future
|
|
17702
18410
|
|
|
@@ -17741,7 +18449,7 @@
|
|
|
17741
18449
|
EmptyComponent = userProps.emptyComponent,
|
|
17742
18450
|
banner = userProps.banner,
|
|
17743
18451
|
BannerComponent = userProps.bannerComponent,
|
|
17744
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18452
|
+
props = _objectWithoutProperties$1(userProps, _excluded$f);
|
|
17745
18453
|
return createElement("div", _extends$1({}, props, {
|
|
17746
18454
|
className: cx('ais-Hits', classNames.root, hits.length === 0 && cx('ais-Hits--empty', classNames.emptyRoot), props.className)
|
|
17747
18455
|
}), banner && (BannerComponent ? createElement(BannerComponent, {
|
|
@@ -17769,7 +18477,7 @@
|
|
|
17769
18477
|
};
|
|
17770
18478
|
}
|
|
17771
18479
|
|
|
17772
|
-
var _excluded$
|
|
18480
|
+
var _excluded$g = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17773
18481
|
function ownKeys$3(e, r) {
|
|
17774
18482
|
var t = Object.keys(e);
|
|
17775
18483
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17821,7 +18529,7 @@
|
|
|
17821
18529
|
status = userProps.status,
|
|
17822
18530
|
userTranslations = userProps.translations,
|
|
17823
18531
|
sendEvent = userProps.sendEvent,
|
|
17824
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18532
|
+
props = _objectWithoutProperties$1(userProps, _excluded$g);
|
|
17825
18533
|
var translations = _objectSpread$2({
|
|
17826
18534
|
title: 'Looking similar',
|
|
17827
18535
|
sliderLabel: 'Looking similar'
|
|
@@ -17854,7 +18562,7 @@
|
|
|
17854
18562
|
};
|
|
17855
18563
|
}
|
|
17856
18564
|
|
|
17857
|
-
var _excluded$
|
|
18565
|
+
var _excluded$h = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17858
18566
|
function ownKeys$4(e, r) {
|
|
17859
18567
|
var t = Object.keys(e);
|
|
17860
18568
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17906,7 +18614,7 @@
|
|
|
17906
18614
|
status = userProps.status,
|
|
17907
18615
|
userTranslations = userProps.translations,
|
|
17908
18616
|
sendEvent = userProps.sendEvent,
|
|
17909
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18617
|
+
props = _objectWithoutProperties$1(userProps, _excluded$h);
|
|
17910
18618
|
var translations = _objectSpread$3({
|
|
17911
18619
|
title: 'Related products',
|
|
17912
18620
|
sliderLabel: 'Related products'
|
|
@@ -17939,7 +18647,7 @@
|
|
|
17939
18647
|
};
|
|
17940
18648
|
}
|
|
17941
18649
|
|
|
17942
|
-
var _excluded$
|
|
18650
|
+
var _excluded$i = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17943
18651
|
function ownKeys$5(e, r) {
|
|
17944
18652
|
var t = Object.keys(e);
|
|
17945
18653
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17991,7 +18699,7 @@
|
|
|
17991
18699
|
status = userProps.status,
|
|
17992
18700
|
userTranslations = userProps.translations,
|
|
17993
18701
|
sendEvent = userProps.sendEvent,
|
|
17994
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18702
|
+
props = _objectWithoutProperties$1(userProps, _excluded$i);
|
|
17995
18703
|
var translations = _objectSpread$4({
|
|
17996
18704
|
title: 'Trending items',
|
|
17997
18705
|
sliderLabel: 'Trending items'
|
|
@@ -18024,7 +18732,7 @@
|
|
|
18024
18732
|
};
|
|
18025
18733
|
}
|
|
18026
18734
|
|
|
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}
|
|
18735
|
+
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
18736
|
|
|
18029
18737
|
var Carousel = createCarouselComponent({
|
|
18030
18738
|
createElement: h,
|
|
@@ -18915,11 +19623,11 @@
|
|
|
18915
19623
|
Fragment: p
|
|
18916
19624
|
});
|
|
18917
19625
|
|
|
18918
|
-
var _excluded$
|
|
19626
|
+
var _excluded$j = ["classNames"];
|
|
18919
19627
|
function Highlight(_ref) {
|
|
18920
19628
|
var _ref$classNames = _ref.classNames,
|
|
18921
19629
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18922
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19630
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
18923
19631
|
return h(InternalHighlight, _extends({
|
|
18924
19632
|
classNames: {
|
|
18925
19633
|
root: cx('ais-Highlight', classNames.root),
|
|
@@ -18930,12 +19638,12 @@
|
|
|
18930
19638
|
}, props));
|
|
18931
19639
|
}
|
|
18932
19640
|
|
|
18933
|
-
var _excluded$
|
|
19641
|
+
var _excluded$k = ["hit", "attribute", "cssClasses"];
|
|
18934
19642
|
function Highlight$1(_ref) {
|
|
18935
19643
|
var hit = _ref.hit,
|
|
18936
19644
|
attribute = _ref.attribute,
|
|
18937
19645
|
cssClasses = _ref.cssClasses,
|
|
18938
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19646
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
18939
19647
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
18940
19648
|
var properties = toArray(property);
|
|
18941
19649
|
_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 +19657,11 @@
|
|
|
18949
19657
|
}));
|
|
18950
19658
|
}
|
|
18951
19659
|
|
|
18952
|
-
var _excluded$
|
|
19660
|
+
var _excluded$l = ["classNames"];
|
|
18953
19661
|
function ReverseHighlight(_ref) {
|
|
18954
19662
|
var _ref$classNames = _ref.classNames,
|
|
18955
19663
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18956
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19664
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
18957
19665
|
return h(InternalHighlight, _extends({
|
|
18958
19666
|
classNames: {
|
|
18959
19667
|
root: cx('ais-ReverseHighlight', classNames.root),
|
|
@@ -18964,13 +19672,13 @@
|
|
|
18964
19672
|
}, props));
|
|
18965
19673
|
}
|
|
18966
19674
|
|
|
18967
|
-
var _excluded$
|
|
19675
|
+
var _excluded$m = ["hit", "attribute", "cssClasses"],
|
|
18968
19676
|
_excluded2$3 = ["isHighlighted"];
|
|
18969
19677
|
function ReverseHighlight$1(_ref) {
|
|
18970
19678
|
var hit = _ref.hit,
|
|
18971
19679
|
attribute = _ref.attribute,
|
|
18972
19680
|
cssClasses = _ref.cssClasses,
|
|
18973
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19681
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
18974
19682
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
18975
19683
|
var properties = toArray(property);
|
|
18976
19684
|
_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 +19698,11 @@
|
|
|
18990
19698
|
}));
|
|
18991
19699
|
}
|
|
18992
19700
|
|
|
18993
|
-
var _excluded$
|
|
19701
|
+
var _excluded$n = ["classNames"];
|
|
18994
19702
|
function ReverseSnippet(_ref) {
|
|
18995
19703
|
var _ref$classNames = _ref.classNames,
|
|
18996
19704
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18997
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19705
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
18998
19706
|
return h(InternalHighlight, _extends({
|
|
18999
19707
|
classNames: {
|
|
19000
19708
|
root: cx('ais-ReverseSnippet', classNames.root),
|
|
@@ -19005,13 +19713,13 @@
|
|
|
19005
19713
|
}, props));
|
|
19006
19714
|
}
|
|
19007
19715
|
|
|
19008
|
-
var _excluded$
|
|
19716
|
+
var _excluded$o = ["hit", "attribute", "cssClasses"],
|
|
19009
19717
|
_excluded2$4 = ["isHighlighted"];
|
|
19010
19718
|
function ReverseSnippet$1(_ref) {
|
|
19011
19719
|
var hit = _ref.hit,
|
|
19012
19720
|
attribute = _ref.attribute,
|
|
19013
19721
|
cssClasses = _ref.cssClasses,
|
|
19014
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19722
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
19015
19723
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
19016
19724
|
var properties = toArray(property);
|
|
19017
19725
|
_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 +19739,11 @@
|
|
|
19031
19739
|
}));
|
|
19032
19740
|
}
|
|
19033
19741
|
|
|
19034
|
-
var _excluded$
|
|
19742
|
+
var _excluded$p = ["classNames"];
|
|
19035
19743
|
function Snippet(_ref) {
|
|
19036
19744
|
var _ref$classNames = _ref.classNames,
|
|
19037
19745
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
19038
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19746
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
19039
19747
|
return h(InternalHighlight, _extends({
|
|
19040
19748
|
classNames: {
|
|
19041
19749
|
root: cx('ais-Snippet', classNames.root),
|
|
@@ -19046,12 +19754,12 @@
|
|
|
19046
19754
|
}, props));
|
|
19047
19755
|
}
|
|
19048
19756
|
|
|
19049
|
-
var _excluded$
|
|
19757
|
+
var _excluded$q = ["hit", "attribute", "cssClasses"];
|
|
19050
19758
|
function Snippet$1(_ref) {
|
|
19051
19759
|
var hit = _ref.hit,
|
|
19052
19760
|
attribute = _ref.attribute,
|
|
19053
19761
|
cssClasses = _ref.cssClasses,
|
|
19054
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19762
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
19055
19763
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
19056
19764
|
var properties = toArray(property);
|
|
19057
19765
|
_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 +20101,7 @@
|
|
|
19393
20101
|
});
|
|
19394
20102
|
};
|
|
19395
20103
|
|
|
19396
|
-
var _excluded$
|
|
20104
|
+
var _excluded$r = ["container", "widgets", "fallbackWidget"];
|
|
19397
20105
|
var withUsage$x = createDocumentationMessageGenerator({
|
|
19398
20106
|
name: 'dynamic-widgets'
|
|
19399
20107
|
});
|
|
@@ -19411,7 +20119,7 @@
|
|
|
19411
20119
|
containerSelector = _ref.container,
|
|
19412
20120
|
widgets = _ref.widgets,
|
|
19413
20121
|
fallbackWidget = _ref.fallbackWidget,
|
|
19414
|
-
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$
|
|
20122
|
+
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$r);
|
|
19415
20123
|
if (!containerSelector) {
|
|
19416
20124
|
throw new Error(withUsage$x('The `container` option is required.'));
|
|
19417
20125
|
}
|
|
@@ -19615,7 +20323,341 @@
|
|
|
19615
20323
|
};
|
|
19616
20324
|
}
|
|
19617
20325
|
};
|
|
19618
|
-
};
|
|
20326
|
+
};
|
|
20327
|
+
|
|
20328
|
+
/**
|
|
20329
|
+
* A list of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/)
|
|
20330
|
+
* to enable when the widget mounts.
|
|
20331
|
+
*/
|
|
20332
|
+
|
|
20333
|
+
var configure = function configure(widgetParams) {
|
|
20334
|
+
// This is a renderless widget that falls back to the connector's
|
|
20335
|
+
// noop render and unmount functions.
|
|
20336
|
+
var makeWidget = connectConfigure(noop);
|
|
20337
|
+
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
20338
|
+
searchParameters: widgetParams
|
|
20339
|
+
})), {}, {
|
|
20340
|
+
$$widgetType: 'ais.configure'
|
|
20341
|
+
});
|
|
20342
|
+
};
|
|
20343
|
+
|
|
20344
|
+
var _excluded$s = ["instanceId", "containerNode"];
|
|
20345
|
+
var autocompleteInstanceId = 0;
|
|
20346
|
+
var withUsage$z = createDocumentationMessageGenerator({
|
|
20347
|
+
name: 'autocomplete'
|
|
20348
|
+
});
|
|
20349
|
+
var suit$6 = component('Autocomplete');
|
|
20350
|
+
var Autocomplete = createAutocompleteComponent({
|
|
20351
|
+
createElement: h,
|
|
20352
|
+
Fragment: p
|
|
20353
|
+
});
|
|
20354
|
+
var AutocompletePanel = createAutocompletePanelComponent({
|
|
20355
|
+
createElement: h,
|
|
20356
|
+
Fragment: p
|
|
20357
|
+
});
|
|
20358
|
+
var AutocompleteIndex = createAutocompleteIndexComponent({
|
|
20359
|
+
createElement: h,
|
|
20360
|
+
Fragment: p
|
|
20361
|
+
});
|
|
20362
|
+
var AutocompleteSuggestion = createAutocompleteSuggestionComponent({
|
|
20363
|
+
createElement: h,
|
|
20364
|
+
Fragment: p
|
|
20365
|
+
});
|
|
20366
|
+
var AutocompleteSearchBox = createAutocompleteSearchComponent({
|
|
20367
|
+
createElement: h,
|
|
20368
|
+
Fragment: p
|
|
20369
|
+
});
|
|
20370
|
+
var AutocompleteRecentSearch = createAutocompleteRecentSearchComponent({
|
|
20371
|
+
createElement: h,
|
|
20372
|
+
Fragment: p
|
|
20373
|
+
});
|
|
20374
|
+
var usePropGetters = createAutocompletePropGetters({
|
|
20375
|
+
useEffect: s$1,
|
|
20376
|
+
useId: b$1,
|
|
20377
|
+
useMemo: T$1,
|
|
20378
|
+
useRef: A$1,
|
|
20379
|
+
useState: y$1
|
|
20380
|
+
});
|
|
20381
|
+
var useStorage = createAutocompleteStorage({
|
|
20382
|
+
useEffect: s$1,
|
|
20383
|
+
useState: y$1,
|
|
20384
|
+
useMemo: T$1
|
|
20385
|
+
});
|
|
20386
|
+
var createRenderer = function createRenderer(params) {
|
|
20387
|
+
var instanceId = params.instanceId,
|
|
20388
|
+
containerNode = params.containerNode,
|
|
20389
|
+
rendererParams = _objectWithoutProperties(params, _excluded$s);
|
|
20390
|
+
return function (connectorParams, isFirstRendering) {
|
|
20391
|
+
if (isFirstRendering) {
|
|
20392
|
+
var _targetIndex$getHelpe, _targetIndex$getHelpe2;
|
|
20393
|
+
var isolatedIndex = connectorParams.instantSearchInstance.mainIndex;
|
|
20394
|
+
var targetIndex = connectorParams.instantSearchInstance.mainIndex;
|
|
20395
|
+
walkIndex(targetIndex, function (childIndex) {
|
|
20396
|
+
if (childIndex.getIndexId() === "ais-autocomplete-".concat(instanceId)) {
|
|
20397
|
+
isolatedIndex = childIndex;
|
|
20398
|
+
targetIndex = childIndex.parent;
|
|
20399
|
+
}
|
|
20400
|
+
});
|
|
20401
|
+
rendererParams.renderState = {
|
|
20402
|
+
indexTemplateProps: [],
|
|
20403
|
+
isolatedIndex: isolatedIndex,
|
|
20404
|
+
targetIndex: targetIndex
|
|
20405
|
+
};
|
|
20406
|
+
connectorParams.refine((_targetIndex$getHelpe = (_targetIndex$getHelpe2 = targetIndex.getHelper()) === null || _targetIndex$getHelpe2 === void 0 ? void 0 : _targetIndex$getHelpe2.state.query) !== null && _targetIndex$getHelpe !== void 0 ? _targetIndex$getHelpe : '');
|
|
20407
|
+
return;
|
|
20408
|
+
}
|
|
20409
|
+
P(h(AutocompleteWrapper, _extends({}, rendererParams, connectorParams)), containerNode);
|
|
20410
|
+
};
|
|
20411
|
+
};
|
|
20412
|
+
function AutocompleteWrapper(_ref) {
|
|
20413
|
+
var _isolatedIndex$getHel, _targetIndex$getWidge, _showRecent$templates;
|
|
20414
|
+
var indicesConfig = _ref.indicesConfig,
|
|
20415
|
+
indices = _ref.indices,
|
|
20416
|
+
getSearchPageURL = _ref.getSearchPageURL,
|
|
20417
|
+
userOnSelect = _ref.onSelect,
|
|
20418
|
+
refine = _ref.refine,
|
|
20419
|
+
cssClasses = _ref.cssClasses,
|
|
20420
|
+
renderState = _ref.renderState,
|
|
20421
|
+
instantSearchInstance = _ref.instantSearchInstance,
|
|
20422
|
+
showRecent = _ref.showRecent;
|
|
20423
|
+
var isolatedIndex = renderState.isolatedIndex,
|
|
20424
|
+
targetIndex = renderState.targetIndex;
|
|
20425
|
+
var searchboxQuery = isolatedIndex === null || isolatedIndex === void 0 ? void 0 : (_isolatedIndex$getHel = isolatedIndex.getHelper()) === null || _isolatedIndex$getHel === void 0 ? void 0 : _isolatedIndex$getHel.state.query;
|
|
20426
|
+
var _useStorage = useStorage({
|
|
20427
|
+
query: searchboxQuery,
|
|
20428
|
+
showRecent: showRecent,
|
|
20429
|
+
indices: indices,
|
|
20430
|
+
indicesConfig: indicesConfig
|
|
20431
|
+
}),
|
|
20432
|
+
storage = _useStorage.storage,
|
|
20433
|
+
storageHits = _useStorage.storageHits,
|
|
20434
|
+
indicesConfigForPropGetters = _useStorage.indicesConfigForPropGetters,
|
|
20435
|
+
indicesForPropGetters = _useStorage.indicesForPropGetters;
|
|
20436
|
+
var isSearchPage = (_targetIndex$getWidge = targetIndex === null || targetIndex === void 0 ? void 0 : targetIndex.getWidgets().some(function (_ref2) {
|
|
20437
|
+
var $$type = _ref2.$$type;
|
|
20438
|
+
return ['ais.hits', 'ais.infiniteHits'].includes($$type);
|
|
20439
|
+
})) !== null && _targetIndex$getWidge !== void 0 ? _targetIndex$getWidge : false;
|
|
20440
|
+
var onRefine = function onRefine(query) {
|
|
20441
|
+
instantSearchInstance.setUiState(function (uiState) {
|
|
20442
|
+
var _objectSpread2$1;
|
|
20443
|
+
return _objectSpread2(_objectSpread2({}, uiState), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, targetIndex.getIndexId(), _objectSpread2(_objectSpread2({}, uiState[targetIndex.getIndexId()]), {}, {
|
|
20444
|
+
query: query
|
|
20445
|
+
})), _defineProperty(_objectSpread2$1, isolatedIndex.getIndexId(), {
|
|
20446
|
+
query: query
|
|
20447
|
+
}), _objectSpread2$1));
|
|
20448
|
+
});
|
|
20449
|
+
query.length > 0 && storage.onAdd(query);
|
|
20450
|
+
};
|
|
20451
|
+
var _usePropGetters = usePropGetters({
|
|
20452
|
+
indices: indicesForPropGetters,
|
|
20453
|
+
indicesConfig: indicesConfigForPropGetters,
|
|
20454
|
+
onRefine: onRefine,
|
|
20455
|
+
onSelect: userOnSelect !== null && userOnSelect !== void 0 ? userOnSelect : function (_ref3) {
|
|
20456
|
+
var query = _ref3.query,
|
|
20457
|
+
setQuery = _ref3.setQuery,
|
|
20458
|
+
url = _ref3.url;
|
|
20459
|
+
if (url) {
|
|
20460
|
+
window.location.href = url;
|
|
20461
|
+
return;
|
|
20462
|
+
}
|
|
20463
|
+
if (!isSearchPage && typeof getSearchPageURL !== 'undefined') {
|
|
20464
|
+
var indexUiState = instantSearchInstance.getUiState()[targetIndex.getIndexId()];
|
|
20465
|
+
window.location.href = getSearchPageURL(_objectSpread2(_objectSpread2({}, indexUiState), {}, {
|
|
20466
|
+
query: query
|
|
20467
|
+
}));
|
|
20468
|
+
return;
|
|
20469
|
+
}
|
|
20470
|
+
setQuery(query);
|
|
20471
|
+
}
|
|
20472
|
+
}),
|
|
20473
|
+
getInputProps = _usePropGetters.getInputProps,
|
|
20474
|
+
getItemProps = _usePropGetters.getItemProps,
|
|
20475
|
+
getPanelProps = _usePropGetters.getPanelProps,
|
|
20476
|
+
getRootProps = _usePropGetters.getRootProps;
|
|
20477
|
+
var AutocompleteRecentSearchComponent = AutocompleteRecentSearch;
|
|
20478
|
+
if (_typeof(showRecent) === 'object' && (_showRecent$templates = showRecent.templates) !== null && _showRecent$templates !== void 0 && _showRecent$templates.item) {
|
|
20479
|
+
var props = prepareTemplateProps({
|
|
20480
|
+
defaultTemplates: {},
|
|
20481
|
+
templatesConfig: instantSearchInstance.templatesConfig,
|
|
20482
|
+
templates: showRecent.templates
|
|
20483
|
+
});
|
|
20484
|
+
AutocompleteRecentSearchComponent = function AutocompleteRecentSearchComponent(_ref4) {
|
|
20485
|
+
var item = _ref4.item,
|
|
20486
|
+
onSelect = _ref4.onSelect,
|
|
20487
|
+
onRemoveRecentSearch = _ref4.onRemoveRecentSearch;
|
|
20488
|
+
return h(Template, _extends({}, props, {
|
|
20489
|
+
templateKey: "item",
|
|
20490
|
+
rootTagName: "fragment",
|
|
20491
|
+
data: {
|
|
20492
|
+
item: item,
|
|
20493
|
+
onSelect: onSelect,
|
|
20494
|
+
onRemoveRecentSearch: onRemoveRecentSearch
|
|
20495
|
+
}
|
|
20496
|
+
}));
|
|
20497
|
+
};
|
|
20498
|
+
}
|
|
20499
|
+
return h(Autocomplete, _extends({}, getRootProps(), {
|
|
20500
|
+
classNames: cssClasses
|
|
20501
|
+
}), h(AutocompleteSearchBox, {
|
|
20502
|
+
query: searchboxQuery || '',
|
|
20503
|
+
inputProps: _objectSpread2(_objectSpread2({}, getInputProps()), {}, {
|
|
20504
|
+
// @ts-ignore - This clashes with some ambient React JSX declarations.
|
|
20505
|
+
onInput: function onInput(evt) {
|
|
20506
|
+
return refine(evt.currentTarget.value);
|
|
20507
|
+
}
|
|
20508
|
+
}),
|
|
20509
|
+
onClear: function onClear() {
|
|
20510
|
+
return onRefine('');
|
|
20511
|
+
},
|
|
20512
|
+
isSearchStalled: instantSearchInstance.status === 'stalled'
|
|
20513
|
+
}), h(AutocompletePanel, getPanelProps(), showRecent && h(AutocompleteIndex
|
|
20514
|
+
// @ts-ignore - there seems to be problems with React.ComponentType and this, but it's actually correct
|
|
20515
|
+
, {
|
|
20516
|
+
ItemComponent: function ItemComponent(_ref5) {
|
|
20517
|
+
var item = _ref5.item,
|
|
20518
|
+
onSelect = _ref5.onSelect;
|
|
20519
|
+
return h(AutocompleteRecentSearchComponent, {
|
|
20520
|
+
item: item,
|
|
20521
|
+
onSelect: onSelect,
|
|
20522
|
+
onRemoveRecentSearch: function onRemoveRecentSearch() {
|
|
20523
|
+
return storage.onRemove(item.query);
|
|
20524
|
+
}
|
|
20525
|
+
});
|
|
20526
|
+
},
|
|
20527
|
+
classNames: {
|
|
20528
|
+
root: 'ais-AutocompleteRecentSearches',
|
|
20529
|
+
list: 'ais-AutocompleteRecentSearchesList',
|
|
20530
|
+
item: 'ais-AutocompleteRecentSearchesItem'
|
|
20531
|
+
},
|
|
20532
|
+
items: storageHits,
|
|
20533
|
+
getItemProps: getItemProps
|
|
20534
|
+
}), indices.map(function (_ref6, i) {
|
|
20535
|
+
var _indicesConfig$i$temp;
|
|
20536
|
+
var indexId = _ref6.indexId,
|
|
20537
|
+
hits = _ref6.hits;
|
|
20538
|
+
if (!renderState.indexTemplateProps[i]) {
|
|
20539
|
+
renderState.indexTemplateProps[i] = prepareTemplateProps({
|
|
20540
|
+
defaultTemplates: {},
|
|
20541
|
+
templatesConfig: instantSearchInstance.templatesConfig,
|
|
20542
|
+
templates: indicesConfig[i].templates
|
|
20543
|
+
});
|
|
20544
|
+
}
|
|
20545
|
+
var headerComponent = (_indicesConfig$i$temp = indicesConfig[i].templates) !== null && _indicesConfig$i$temp !== void 0 && _indicesConfig$i$temp.header ? function (_ref7) {
|
|
20546
|
+
var items = _ref7.items;
|
|
20547
|
+
return h(Template, _extends({}, renderState.indexTemplateProps[i], {
|
|
20548
|
+
templateKey: "header",
|
|
20549
|
+
rootTagName: "fragment",
|
|
20550
|
+
data: {
|
|
20551
|
+
items: items
|
|
20552
|
+
}
|
|
20553
|
+
}));
|
|
20554
|
+
} : undefined;
|
|
20555
|
+
var itemComponent = function itemComponent(_ref8) {
|
|
20556
|
+
var item = _ref8.item,
|
|
20557
|
+
onSelect = _ref8.onSelect;
|
|
20558
|
+
return h(Template, _extends({}, renderState.indexTemplateProps[i], {
|
|
20559
|
+
templateKey: "item",
|
|
20560
|
+
rootTagName: "fragment",
|
|
20561
|
+
data: {
|
|
20562
|
+
item: item,
|
|
20563
|
+
onSelect: onSelect
|
|
20564
|
+
}
|
|
20565
|
+
}));
|
|
20566
|
+
};
|
|
20567
|
+
return h(AutocompleteIndex, {
|
|
20568
|
+
key: indexId,
|
|
20569
|
+
HeaderComponent: headerComponent,
|
|
20570
|
+
ItemComponent: itemComponent,
|
|
20571
|
+
items: hits.map(function (item) {
|
|
20572
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
20573
|
+
__indexName: indexId
|
|
20574
|
+
});
|
|
20575
|
+
}),
|
|
20576
|
+
getItemProps: getItemProps,
|
|
20577
|
+
classNames: indicesConfig[i].cssClasses
|
|
20578
|
+
});
|
|
20579
|
+
})));
|
|
20580
|
+
}
|
|
20581
|
+
function EXPERIMENTAL_autocomplete(widgetParams) {
|
|
20582
|
+
var _ref9 = widgetParams || {},
|
|
20583
|
+
container = _ref9.container,
|
|
20584
|
+
escapeHTML = _ref9.escapeHTML,
|
|
20585
|
+
_ref9$indices = _ref9.indices,
|
|
20586
|
+
indices = _ref9$indices === void 0 ? [] : _ref9$indices,
|
|
20587
|
+
showSuggestions = _ref9.showSuggestions,
|
|
20588
|
+
showRecent = _ref9.showRecent,
|
|
20589
|
+
getSearchPageURL = _ref9.getSearchPageURL,
|
|
20590
|
+
onSelect = _ref9.onSelect,
|
|
20591
|
+
_ref9$templates = _ref9.templates,
|
|
20592
|
+
templates = _ref9$templates === void 0 ? {} : _ref9$templates,
|
|
20593
|
+
_ref9$cssClasses = _ref9.cssClasses,
|
|
20594
|
+
userCssClasses = _ref9$cssClasses === void 0 ? {} : _ref9$cssClasses;
|
|
20595
|
+
if (!container) {
|
|
20596
|
+
throw new Error(withUsage$z('The `container` option is required.'));
|
|
20597
|
+
}
|
|
20598
|
+
var containerNode = getContainerNode(container);
|
|
20599
|
+
var cssClasses = {
|
|
20600
|
+
root: cx(suit$6(), userCssClasses.root)
|
|
20601
|
+
};
|
|
20602
|
+
var indicesConfig = _toConsumableArray(indices);
|
|
20603
|
+
if (showSuggestions !== null && showSuggestions !== void 0 && showSuggestions.indexName) {
|
|
20604
|
+
var _showSuggestions$cssC, _showSuggestions$cssC2, _showSuggestions$cssC3, _showSuggestions$cssC4;
|
|
20605
|
+
indicesConfig.unshift({
|
|
20606
|
+
indexName: showSuggestions.indexName,
|
|
20607
|
+
templates: _objectSpread2({
|
|
20608
|
+
// @ts-expect-error
|
|
20609
|
+
item: AutocompleteSuggestion
|
|
20610
|
+
}, showSuggestions.templates),
|
|
20611
|
+
cssClasses: {
|
|
20612
|
+
root: cx('ais-AutocompleteSuggestions', (_showSuggestions$cssC = showSuggestions.cssClasses) === null || _showSuggestions$cssC === void 0 ? void 0 : _showSuggestions$cssC.root),
|
|
20613
|
+
list: cx('ais-AutocompleteSuggestionsList', (_showSuggestions$cssC2 = showSuggestions.cssClasses) === null || _showSuggestions$cssC2 === void 0 ? void 0 : _showSuggestions$cssC2.list),
|
|
20614
|
+
header: cx('ais-AutocompleteSuggestionsHeader', (_showSuggestions$cssC3 = showSuggestions.cssClasses) === null || _showSuggestions$cssC3 === void 0 ? void 0 : _showSuggestions$cssC3.header),
|
|
20615
|
+
item: cx('ais-AutocompleteSuggestionsItem', (_showSuggestions$cssC4 = showSuggestions.cssClasses) === null || _showSuggestions$cssC4 === void 0 ? void 0 : _showSuggestions$cssC4.item)
|
|
20616
|
+
},
|
|
20617
|
+
getQuery: function getQuery(item) {
|
|
20618
|
+
return item.query;
|
|
20619
|
+
},
|
|
20620
|
+
getURL: showSuggestions.getURL
|
|
20621
|
+
});
|
|
20622
|
+
}
|
|
20623
|
+
var instanceId = ++autocompleteInstanceId;
|
|
20624
|
+
var specializedRenderer = createRenderer({
|
|
20625
|
+
instanceId: instanceId,
|
|
20626
|
+
containerNode: containerNode,
|
|
20627
|
+
indicesConfig: indicesConfig,
|
|
20628
|
+
getSearchPageURL: getSearchPageURL,
|
|
20629
|
+
onSelect: onSelect,
|
|
20630
|
+
cssClasses: cssClasses,
|
|
20631
|
+
showRecent: showRecent,
|
|
20632
|
+
renderState: {
|
|
20633
|
+
indexTemplateProps: [],
|
|
20634
|
+
isolatedIndex: undefined,
|
|
20635
|
+
targetIndex: undefined
|
|
20636
|
+
},
|
|
20637
|
+
templates: templates
|
|
20638
|
+
});
|
|
20639
|
+
var makeWidget = connectAutocomplete(specializedRenderer, function () {
|
|
20640
|
+
return P(null, containerNode);
|
|
20641
|
+
});
|
|
20642
|
+
return [connectSearchBox(function () {
|
|
20643
|
+
return null;
|
|
20644
|
+
})({}), index({
|
|
20645
|
+
indexId: "ais-autocomplete-".concat(instanceId),
|
|
20646
|
+
EXPERIMENTAL_isolated: true
|
|
20647
|
+
}).addWidgets([].concat(_toConsumableArray(indicesConfig.map(function (_ref0) {
|
|
20648
|
+
var indexName = _ref0.indexName;
|
|
20649
|
+
return index({
|
|
20650
|
+
indexName: indexName,
|
|
20651
|
+
indexId: indexName
|
|
20652
|
+
}).addWidgets([configure({
|
|
20653
|
+
hitsPerPage: 5
|
|
20654
|
+
})]);
|
|
20655
|
+
})), [_objectSpread2(_objectSpread2({}, makeWidget({
|
|
20656
|
+
escapeHTML: escapeHTML
|
|
20657
|
+
})), {}, {
|
|
20658
|
+
$$widgetType: 'ais.autocomplete'
|
|
20659
|
+
})]))];
|
|
20660
|
+
}
|
|
19619
20661
|
|
|
19620
20662
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
19621
20663
|
var items = _ref.items,
|
|
@@ -19678,10 +20720,10 @@
|
|
|
19678
20720
|
}
|
|
19679
20721
|
};
|
|
19680
20722
|
|
|
19681
|
-
var withUsage$
|
|
20723
|
+
var withUsage$A = createDocumentationMessageGenerator({
|
|
19682
20724
|
name: 'breadcrumb'
|
|
19683
20725
|
});
|
|
19684
|
-
var suit$
|
|
20726
|
+
var suit$7 = component('Breadcrumb');
|
|
19685
20727
|
var renderer$1 = function renderer(_ref) {
|
|
19686
20728
|
var containerNode = _ref.containerNode,
|
|
19687
20729
|
cssClasses = _ref.cssClasses,
|
|
@@ -19723,28 +20765,28 @@
|
|
|
19723
20765
|
_ref3$cssClasses = _ref3.cssClasses,
|
|
19724
20766
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses;
|
|
19725
20767
|
if (!container) {
|
|
19726
|
-
throw new Error(withUsage$
|
|
20768
|
+
throw new Error(withUsage$A('The `container` option is required.'));
|
|
19727
20769
|
}
|
|
19728
20770
|
var containerNode = getContainerNode(container);
|
|
19729
20771
|
var cssClasses = {
|
|
19730
|
-
root: cx(suit$
|
|
19731
|
-
noRefinementRoot: cx(suit$
|
|
20772
|
+
root: cx(suit$7(), userCssClasses.root),
|
|
20773
|
+
noRefinementRoot: cx(suit$7({
|
|
19732
20774
|
modifierName: 'noRefinement'
|
|
19733
20775
|
}), userCssClasses.noRefinementRoot),
|
|
19734
|
-
list: cx(suit$
|
|
20776
|
+
list: cx(suit$7({
|
|
19735
20777
|
descendantName: 'list'
|
|
19736
20778
|
}), userCssClasses.list),
|
|
19737
|
-
item: cx(suit$
|
|
20779
|
+
item: cx(suit$7({
|
|
19738
20780
|
descendantName: 'item'
|
|
19739
20781
|
}), userCssClasses.item),
|
|
19740
|
-
selectedItem: cx(suit$
|
|
20782
|
+
selectedItem: cx(suit$7({
|
|
19741
20783
|
descendantName: 'item',
|
|
19742
20784
|
modifierName: 'selected'
|
|
19743
20785
|
}), userCssClasses.selectedItem),
|
|
19744
|
-
separator: cx(suit$
|
|
20786
|
+
separator: cx(suit$7({
|
|
19745
20787
|
descendantName: 'separator'
|
|
19746
20788
|
}), userCssClasses.separator),
|
|
19747
|
-
link: cx(suit$
|
|
20789
|
+
link: cx(suit$7({
|
|
19748
20790
|
descendantName: 'link'
|
|
19749
20791
|
}), userCssClasses.link)
|
|
19750
20792
|
};
|
|
@@ -19794,10 +20836,10 @@
|
|
|
19794
20836
|
}
|
|
19795
20837
|
};
|
|
19796
20838
|
|
|
19797
|
-
var withUsage$
|
|
20839
|
+
var withUsage$B = createDocumentationMessageGenerator({
|
|
19798
20840
|
name: 'clear-refinements'
|
|
19799
20841
|
});
|
|
19800
|
-
var suit$
|
|
20842
|
+
var suit$8 = component('ClearRefinements');
|
|
19801
20843
|
var renderer$2 = function renderer(_ref) {
|
|
19802
20844
|
var containerNode = _ref.containerNode,
|
|
19803
20845
|
cssClasses = _ref.cssClasses,
|
|
@@ -19834,15 +20876,15 @@
|
|
|
19834
20876
|
_ref3$cssClasses = _ref3.cssClasses,
|
|
19835
20877
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses;
|
|
19836
20878
|
if (!container) {
|
|
19837
|
-
throw new Error(withUsage$
|
|
20879
|
+
throw new Error(withUsage$B('The `container` option is required.'));
|
|
19838
20880
|
}
|
|
19839
20881
|
var containerNode = getContainerNode(container);
|
|
19840
20882
|
var cssClasses = {
|
|
19841
|
-
root: cx(suit$
|
|
19842
|
-
button: cx(suit$
|
|
20883
|
+
root: cx(suit$8(), userCssClasses.root),
|
|
20884
|
+
button: cx(suit$8({
|
|
19843
20885
|
descendantName: 'button'
|
|
19844
20886
|
}), userCssClasses.button),
|
|
19845
|
-
disabledButton: cx(suit$
|
|
20887
|
+
disabledButton: cx(suit$8({
|
|
19846
20888
|
descendantName: 'button',
|
|
19847
20889
|
modifierName: 'disabled'
|
|
19848
20890
|
}), userCssClasses.disabledButton)
|
|
@@ -19865,22 +20907,6 @@
|
|
|
19865
20907
|
});
|
|
19866
20908
|
};
|
|
19867
20909
|
|
|
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
20910
|
var createItemKey = function createItemKey(_ref) {
|
|
19885
20911
|
var attribute = _ref.attribute,
|
|
19886
20912
|
value = _ref.value,
|
|
@@ -19928,10 +20954,10 @@
|
|
|
19928
20954
|
})));
|
|
19929
20955
|
};
|
|
19930
20956
|
|
|
19931
|
-
var withUsage$
|
|
20957
|
+
var withUsage$C = createDocumentationMessageGenerator({
|
|
19932
20958
|
name: 'current-refinements'
|
|
19933
20959
|
});
|
|
19934
|
-
var suit$
|
|
20960
|
+
var suit$9 = component('CurrentRefinements');
|
|
19935
20961
|
var renderer$3 = function renderer(_ref, isFirstRender) {
|
|
19936
20962
|
var items = _ref.items,
|
|
19937
20963
|
widgetParams = _ref.widgetParams,
|
|
@@ -19957,30 +20983,30 @@
|
|
|
19957
20983
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses,
|
|
19958
20984
|
transformItems = _ref3.transformItems;
|
|
19959
20985
|
if (!container) {
|
|
19960
|
-
throw new Error(withUsage$
|
|
20986
|
+
throw new Error(withUsage$C('The `container` option is required.'));
|
|
19961
20987
|
}
|
|
19962
20988
|
var containerNode = getContainerNode(container);
|
|
19963
20989
|
var cssClasses = {
|
|
19964
|
-
root: cx(suit$
|
|
19965
|
-
noRefinementRoot: cx(suit$
|
|
20990
|
+
root: cx(suit$9(), userCssClasses.root),
|
|
20991
|
+
noRefinementRoot: cx(suit$9({
|
|
19966
20992
|
modifierName: 'noRefinement'
|
|
19967
20993
|
}), userCssClasses.noRefinementRoot),
|
|
19968
|
-
list: cx(suit$
|
|
20994
|
+
list: cx(suit$9({
|
|
19969
20995
|
descendantName: 'list'
|
|
19970
20996
|
}), userCssClasses.list),
|
|
19971
|
-
item: cx(suit$
|
|
20997
|
+
item: cx(suit$9({
|
|
19972
20998
|
descendantName: 'item'
|
|
19973
20999
|
}), userCssClasses.item),
|
|
19974
|
-
label: cx(suit$
|
|
21000
|
+
label: cx(suit$9({
|
|
19975
21001
|
descendantName: 'label'
|
|
19976
21002
|
}), userCssClasses.label),
|
|
19977
|
-
category: cx(suit$
|
|
21003
|
+
category: cx(suit$9({
|
|
19978
21004
|
descendantName: 'category'
|
|
19979
21005
|
}), userCssClasses.category),
|
|
19980
|
-
categoryLabel: cx(suit$
|
|
21006
|
+
categoryLabel: cx(suit$9({
|
|
19981
21007
|
descendantName: 'categoryLabel'
|
|
19982
21008
|
}), userCssClasses.categoryLabel),
|
|
19983
|
-
delete: cx(suit$
|
|
21009
|
+
delete: cx(suit$9({
|
|
19984
21010
|
descendantName: 'delete'
|
|
19985
21011
|
}), userCssClasses.delete)
|
|
19986
21012
|
};
|
|
@@ -20387,13 +21413,13 @@
|
|
|
20387
21413
|
}), container.querySelector(".".concat(cssClasses.tree)));
|
|
20388
21414
|
};
|
|
20389
21415
|
|
|
20390
|
-
var _excluded$
|
|
21416
|
+
var _excluded$t = ["initialZoom", "initialPosition", "templates", "cssClasses", "builtInMarker", "customHTMLMarker", "enableRefine", "enableClearMapRefinement", "enableRefineControl", "container", "googleReference"],
|
|
20391
21417
|
_excluded2$5 = ["item"],
|
|
20392
21418
|
_excluded3 = ["item"];
|
|
20393
|
-
var withUsage$
|
|
21419
|
+
var withUsage$D = createDocumentationMessageGenerator({
|
|
20394
21420
|
name: 'geo-search'
|
|
20395
21421
|
});
|
|
20396
|
-
var suit$
|
|
21422
|
+
var suit$a = component('GeoSearch');
|
|
20397
21423
|
/**
|
|
20398
21424
|
* 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
21425
|
*
|
|
@@ -20431,7 +21457,7 @@
|
|
|
20431
21457
|
enableRefineControl = _ref$enableRefineCont === void 0 ? true : _ref$enableRefineCont,
|
|
20432
21458
|
container = _ref.container,
|
|
20433
21459
|
googleReference = _ref.googleReference,
|
|
20434
|
-
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$
|
|
21460
|
+
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$t);
|
|
20435
21461
|
var defaultBuiltInMarker = {
|
|
20436
21462
|
createOptions: function createOptions() {
|
|
20437
21463
|
return {};
|
|
@@ -20445,42 +21471,42 @@
|
|
|
20445
21471
|
events: {}
|
|
20446
21472
|
};
|
|
20447
21473
|
if (!container) {
|
|
20448
|
-
throw new Error(withUsage$
|
|
21474
|
+
throw new Error(withUsage$D('The `container` option is required.'));
|
|
20449
21475
|
}
|
|
20450
21476
|
if (!googleReference) {
|
|
20451
|
-
throw new Error(withUsage$
|
|
21477
|
+
throw new Error(withUsage$D('The `googleReference` option is required.'));
|
|
20452
21478
|
}
|
|
20453
21479
|
var containerNode = getContainerNode(container);
|
|
20454
21480
|
var cssClasses = {
|
|
20455
|
-
root: cx(suit$
|
|
21481
|
+
root: cx(suit$a(), userCssClasses.root),
|
|
20456
21482
|
// Required only to mount / unmount the Preact tree
|
|
20457
|
-
tree: suit$
|
|
21483
|
+
tree: suit$a({
|
|
20458
21484
|
descendantName: 'tree'
|
|
20459
21485
|
}),
|
|
20460
|
-
map: cx(suit$
|
|
21486
|
+
map: cx(suit$a({
|
|
20461
21487
|
descendantName: 'map'
|
|
20462
21488
|
}), userCssClasses.map),
|
|
20463
|
-
control: cx(suit$
|
|
21489
|
+
control: cx(suit$a({
|
|
20464
21490
|
descendantName: 'control'
|
|
20465
21491
|
}), userCssClasses.control),
|
|
20466
|
-
label: cx(suit$
|
|
21492
|
+
label: cx(suit$a({
|
|
20467
21493
|
descendantName: 'label'
|
|
20468
21494
|
}), userCssClasses.label),
|
|
20469
|
-
selectedLabel: cx(suit$
|
|
21495
|
+
selectedLabel: cx(suit$a({
|
|
20470
21496
|
descendantName: 'label',
|
|
20471
21497
|
modifierName: 'selected'
|
|
20472
21498
|
}), userCssClasses.selectedLabel),
|
|
20473
|
-
input: cx(suit$
|
|
21499
|
+
input: cx(suit$a({
|
|
20474
21500
|
descendantName: 'input'
|
|
20475
21501
|
}), userCssClasses.input),
|
|
20476
|
-
redo: cx(suit$
|
|
21502
|
+
redo: cx(suit$a({
|
|
20477
21503
|
descendantName: 'redo'
|
|
20478
21504
|
}), userCssClasses.redo),
|
|
20479
|
-
disabledRedo: cx(suit$
|
|
21505
|
+
disabledRedo: cx(suit$a({
|
|
20480
21506
|
descendantName: 'redo',
|
|
20481
21507
|
modifierName: 'disabled'
|
|
20482
21508
|
}), userCssClasses.disabledRedo),
|
|
20483
|
-
reset: cx(suit$
|
|
21509
|
+
reset: cx(suit$a({
|
|
20484
21510
|
descendantName: 'reset'
|
|
20485
21511
|
}), userCssClasses.reset)
|
|
20486
21512
|
};
|
|
@@ -20504,7 +21530,7 @@
|
|
|
20504
21530
|
return new HTMLMarker(_objectSpread2(_objectSpread2(_objectSpread2({}, customHTMLMarker.createOptions(item)), rest), {}, {
|
|
20505
21531
|
__id: item.objectID,
|
|
20506
21532
|
position: item._geoloc,
|
|
20507
|
-
className: cx(suit$
|
|
21533
|
+
className: cx(suit$a({
|
|
20508
21534
|
descendantName: 'marker'
|
|
20509
21535
|
})),
|
|
20510
21536
|
template: renderTemplate({
|
|
@@ -20553,7 +21579,8 @@
|
|
|
20553
21579
|
onChange: noop,
|
|
20554
21580
|
onSubmit: noop,
|
|
20555
21581
|
onReset: noop,
|
|
20556
|
-
refine: noop
|
|
21582
|
+
refine: noop,
|
|
21583
|
+
inputProps: {}
|
|
20557
21584
|
};
|
|
20558
21585
|
var SearchBox = /*#__PURE__*/function (_Component) {
|
|
20559
21586
|
_inherits(SearchBox, _Component);
|
|
@@ -20571,6 +21598,9 @@
|
|
|
20571
21598
|
});
|
|
20572
21599
|
_defineProperty(_assertThisInitialized(_this), "input", y());
|
|
20573
21600
|
_defineProperty(_assertThisInitialized(_this), "onInput", function (event) {
|
|
21601
|
+
var _this$props$inputProp, _this$props$inputProp2;
|
|
21602
|
+
// @ts-expect-error the context incompatibility of `this` doesn't matter
|
|
21603
|
+
(_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
21604
|
var _this$props = _this.props,
|
|
20575
21605
|
searchAsYouType = _this$props.searchAsYouType,
|
|
20576
21606
|
refine = _this$props.refine,
|
|
@@ -20616,12 +21646,18 @@
|
|
|
20616
21646
|
});
|
|
20617
21647
|
onReset(event);
|
|
20618
21648
|
});
|
|
20619
|
-
_defineProperty(_assertThisInitialized(_this), "onBlur", function () {
|
|
21649
|
+
_defineProperty(_assertThisInitialized(_this), "onBlur", function (event) {
|
|
21650
|
+
var _this$props$inputProp3, _this$props$inputProp4;
|
|
21651
|
+
// @ts-expect-error the context incompatibility of `this` doesn't matter
|
|
21652
|
+
(_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
21653
|
_this.setState({
|
|
20621
21654
|
focused: false
|
|
20622
21655
|
});
|
|
20623
21656
|
});
|
|
20624
|
-
_defineProperty(_assertThisInitialized(_this), "onFocus", function () {
|
|
21657
|
+
_defineProperty(_assertThisInitialized(_this), "onFocus", function (event) {
|
|
21658
|
+
var _this$props$inputProp5, _this$props$inputProp6;
|
|
21659
|
+
// @ts-expect-error the context incompatibility of `this` doesn't matter
|
|
21660
|
+
(_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
21661
|
_this.setState({
|
|
20626
21662
|
focused: true
|
|
20627
21663
|
});
|
|
@@ -20669,7 +21705,8 @@
|
|
|
20669
21705
|
showLoadingIndicator = _this$props4.showLoadingIndicator,
|
|
20670
21706
|
templates = _this$props4.templates,
|
|
20671
21707
|
isSearchStalled = _this$props4.isSearchStalled,
|
|
20672
|
-
ariaLabel = _this$props4.ariaLabel
|
|
21708
|
+
ariaLabel = _this$props4.ariaLabel,
|
|
21709
|
+
inputProps = _this$props4.inputProps;
|
|
20673
21710
|
return h("div", {
|
|
20674
21711
|
className: cssClasses.root
|
|
20675
21712
|
}, h("form", {
|
|
@@ -20679,7 +21716,7 @@
|
|
|
20679
21716
|
noValidate: true,
|
|
20680
21717
|
onSubmit: this.onSubmit,
|
|
20681
21718
|
onReset: this.onReset
|
|
20682
|
-
}, h("input", {
|
|
21719
|
+
}, h("input", _extends({}, inputProps, {
|
|
20683
21720
|
ref: this.input,
|
|
20684
21721
|
value: this.state.query,
|
|
20685
21722
|
disabled: this.props.disabled,
|
|
@@ -20702,7 +21739,7 @@
|
|
|
20702
21739
|
onBlur: this.onBlur,
|
|
20703
21740
|
onFocus: this.onFocus,
|
|
20704
21741
|
"aria-label": ariaLabel
|
|
20705
|
-
}), h(Template, {
|
|
21742
|
+
})), h(Template, {
|
|
20706
21743
|
templateKey: "submit",
|
|
20707
21744
|
rootTagName: "button",
|
|
20708
21745
|
rootProps: {
|
|
@@ -20770,7 +21807,7 @@
|
|
|
20770
21807
|
})), subItems);
|
|
20771
21808
|
}
|
|
20772
21809
|
|
|
20773
|
-
var _excluded$
|
|
21810
|
+
var _excluded$u = ["root"];
|
|
20774
21811
|
|
|
20775
21812
|
// CSS types
|
|
20776
21813
|
|
|
@@ -20799,7 +21836,7 @@
|
|
|
20799
21836
|
if (isHierarchicalMenuItem(facetValue) && Array.isArray(facetValue.data) && facetValue.data.length > 0) {
|
|
20800
21837
|
var _this$props$cssClasse = _this.props.cssClasses,
|
|
20801
21838
|
root = _this$props$cssClasse.root,
|
|
20802
|
-
cssClasses = _objectWithoutProperties(_this$props$cssClasse, _excluded$
|
|
21839
|
+
cssClasses = _objectWithoutProperties(_this$props$cssClasse, _excluded$u);
|
|
20803
21840
|
subItems = h(RefinementList, _extends({}, _this.props, {
|
|
20804
21841
|
// We want to keep `root` required for external usage but not for the
|
|
20805
21842
|
// sub items.
|
|
@@ -21014,10 +22051,10 @@
|
|
|
21014
22051
|
}
|
|
21015
22052
|
};
|
|
21016
22053
|
|
|
21017
|
-
var withUsage$
|
|
22054
|
+
var withUsage$E = createDocumentationMessageGenerator({
|
|
21018
22055
|
name: 'hierarchical-menu'
|
|
21019
22056
|
});
|
|
21020
|
-
var suit$
|
|
22057
|
+
var suit$b = component('HierarchicalMenu');
|
|
21021
22058
|
var renderer$5 = function renderer(_ref) {
|
|
21022
22059
|
var cssClasses = _ref.cssClasses,
|
|
21023
22060
|
containerNode = _ref.containerNode,
|
|
@@ -21124,49 +22161,49 @@
|
|
|
21124
22161
|
_ref3$cssClasses = _ref3.cssClasses,
|
|
21125
22162
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses;
|
|
21126
22163
|
if (!container) {
|
|
21127
|
-
throw new Error(withUsage$
|
|
22164
|
+
throw new Error(withUsage$E('The `container` option is required.'));
|
|
21128
22165
|
}
|
|
21129
22166
|
var containerNode = getContainerNode(container);
|
|
21130
22167
|
var cssClasses = {
|
|
21131
|
-
root: cx(suit$
|
|
21132
|
-
noRefinementRoot: cx(suit$
|
|
22168
|
+
root: cx(suit$b(), userCssClasses.root),
|
|
22169
|
+
noRefinementRoot: cx(suit$b({
|
|
21133
22170
|
modifierName: 'noRefinement'
|
|
21134
22171
|
}), userCssClasses.noRefinementRoot),
|
|
21135
|
-
list: cx(suit$
|
|
22172
|
+
list: cx(suit$b({
|
|
21136
22173
|
descendantName: 'list'
|
|
21137
22174
|
}), userCssClasses.list),
|
|
21138
|
-
childList: cx(suit$
|
|
22175
|
+
childList: cx(suit$b({
|
|
21139
22176
|
descendantName: 'list',
|
|
21140
22177
|
modifierName: 'child'
|
|
21141
22178
|
}), userCssClasses.childList),
|
|
21142
|
-
item: cx(suit$
|
|
22179
|
+
item: cx(suit$b({
|
|
21143
22180
|
descendantName: 'item'
|
|
21144
22181
|
}), userCssClasses.item),
|
|
21145
|
-
selectedItem: cx(suit$
|
|
22182
|
+
selectedItem: cx(suit$b({
|
|
21146
22183
|
descendantName: 'item',
|
|
21147
22184
|
modifierName: 'selected'
|
|
21148
22185
|
}), userCssClasses.selectedItem),
|
|
21149
|
-
parentItem: cx(suit$
|
|
22186
|
+
parentItem: cx(suit$b({
|
|
21150
22187
|
descendantName: 'item',
|
|
21151
22188
|
modifierName: 'parent'
|
|
21152
22189
|
}), userCssClasses.parentItem),
|
|
21153
|
-
link: cx(suit$
|
|
22190
|
+
link: cx(suit$b({
|
|
21154
22191
|
descendantName: 'link'
|
|
21155
22192
|
}), userCssClasses.link),
|
|
21156
|
-
selectedItemLink: cx(suit$
|
|
22193
|
+
selectedItemLink: cx(suit$b({
|
|
21157
22194
|
descendantName: 'link',
|
|
21158
22195
|
modifierName: 'selected'
|
|
21159
22196
|
}), userCssClasses.selectedItemLink),
|
|
21160
|
-
label: cx(suit$
|
|
22197
|
+
label: cx(suit$b({
|
|
21161
22198
|
descendantName: 'label'
|
|
21162
22199
|
}), userCssClasses.label),
|
|
21163
|
-
count: cx(suit$
|
|
22200
|
+
count: cx(suit$b({
|
|
21164
22201
|
descendantName: 'count'
|
|
21165
22202
|
}), userCssClasses.count),
|
|
21166
|
-
showMore: cx(suit$
|
|
22203
|
+
showMore: cx(suit$b({
|
|
21167
22204
|
descendantName: 'showMore'
|
|
21168
22205
|
}), userCssClasses.showMore),
|
|
21169
|
-
disabledShowMore: cx(suit$
|
|
22206
|
+
disabledShowMore: cx(suit$b({
|
|
21170
22207
|
descendantName: 'showMore',
|
|
21171
22208
|
modifierName: 'disabled'
|
|
21172
22209
|
}), userCssClasses.disabledShowMore)
|
|
@@ -21208,8 +22245,8 @@
|
|
|
21208
22245
|
}
|
|
21209
22246
|
};
|
|
21210
22247
|
|
|
21211
|
-
var _excluded$
|
|
21212
|
-
var withUsage$
|
|
22248
|
+
var _excluded$v = ["hit", "index"];
|
|
22249
|
+
var withUsage$F = createDocumentationMessageGenerator({
|
|
21213
22250
|
name: 'hits'
|
|
21214
22251
|
});
|
|
21215
22252
|
var Hits = createHitsComponent({
|
|
@@ -21256,7 +22293,7 @@
|
|
|
21256
22293
|
var itemComponent = function itemComponent(_ref4) {
|
|
21257
22294
|
var hit = _ref4.hit,
|
|
21258
22295
|
index = _ref4.index,
|
|
21259
|
-
rootProps = _objectWithoutProperties(_ref4, _excluded$
|
|
22296
|
+
rootProps = _objectWithoutProperties(_ref4, _excluded$v);
|
|
21260
22297
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
21261
22298
|
templateKey: "item",
|
|
21262
22299
|
rootTagName: "li",
|
|
@@ -21308,7 +22345,7 @@
|
|
|
21308
22345
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
21309
22346
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
21310
22347
|
if (!container) {
|
|
21311
|
-
throw new Error(withUsage$
|
|
22348
|
+
throw new Error(withUsage$F('The `container` option is required.'));
|
|
21312
22349
|
}
|
|
21313
22350
|
var containerNode = getContainerNode(container);
|
|
21314
22351
|
var specializedRenderer = renderer$6({
|
|
@@ -21350,10 +22387,10 @@
|
|
|
21350
22387
|
}));
|
|
21351
22388
|
}
|
|
21352
22389
|
|
|
21353
|
-
var withUsage$
|
|
22390
|
+
var withUsage$G = createDocumentationMessageGenerator({
|
|
21354
22391
|
name: 'hits-per-page'
|
|
21355
22392
|
});
|
|
21356
|
-
var suit$
|
|
22393
|
+
var suit$c = component('HitsPerPage');
|
|
21357
22394
|
var renderer$7 = function renderer(_ref) {
|
|
21358
22395
|
var containerNode = _ref.containerNode,
|
|
21359
22396
|
cssClasses = _ref.cssClasses;
|
|
@@ -21386,15 +22423,15 @@
|
|
|
21386
22423
|
userCssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses,
|
|
21387
22424
|
transformItems = _ref5.transformItems;
|
|
21388
22425
|
if (!container) {
|
|
21389
|
-
throw new Error(withUsage$
|
|
22426
|
+
throw new Error(withUsage$G('The `container` option is required.'));
|
|
21390
22427
|
}
|
|
21391
22428
|
var containerNode = getContainerNode(container);
|
|
21392
22429
|
var cssClasses = {
|
|
21393
|
-
root: cx(suit$
|
|
21394
|
-
select: cx(suit$
|
|
22430
|
+
root: cx(suit$c(), userCssClasses.root),
|
|
22431
|
+
select: cx(suit$c({
|
|
21395
22432
|
descendantName: 'select'
|
|
21396
22433
|
}), userCssClasses.select),
|
|
21397
|
-
option: cx(suit$
|
|
22434
|
+
option: cx(suit$c({
|
|
21398
22435
|
descendantName: 'option'
|
|
21399
22436
|
}), userCssClasses.option)
|
|
21400
22437
|
};
|
|
@@ -21546,10 +22583,10 @@
|
|
|
21546
22583
|
}
|
|
21547
22584
|
};
|
|
21548
22585
|
|
|
21549
|
-
var withUsage$
|
|
22586
|
+
var withUsage$H = createDocumentationMessageGenerator({
|
|
21550
22587
|
name: 'infinite-hits'
|
|
21551
22588
|
});
|
|
21552
|
-
var suit$
|
|
22589
|
+
var suit$d = component('InfiniteHits');
|
|
21553
22590
|
var renderer$8 = function renderer(_ref) {
|
|
21554
22591
|
var containerNode = _ref.containerNode,
|
|
21555
22592
|
cssClasses = _ref.cssClasses,
|
|
@@ -21605,41 +22642,41 @@
|
|
|
21605
22642
|
showPrevious = _ref3.showPrevious,
|
|
21606
22643
|
cache = _ref3.cache;
|
|
21607
22644
|
if (!container) {
|
|
21608
|
-
throw new Error(withUsage$
|
|
22645
|
+
throw new Error(withUsage$H('The `container` option is required.'));
|
|
21609
22646
|
}
|
|
21610
22647
|
var containerNode = getContainerNode(container);
|
|
21611
22648
|
var cssClasses = {
|
|
21612
|
-
root: cx(suit$
|
|
21613
|
-
emptyRoot: cx(suit$
|
|
22649
|
+
root: cx(suit$d(), userCssClasses.root),
|
|
22650
|
+
emptyRoot: cx(suit$d({
|
|
21614
22651
|
modifierName: 'empty'
|
|
21615
22652
|
}), userCssClasses.emptyRoot),
|
|
21616
|
-
item: cx(suit$
|
|
22653
|
+
item: cx(suit$d({
|
|
21617
22654
|
descendantName: 'item'
|
|
21618
22655
|
}), userCssClasses.item),
|
|
21619
|
-
list: cx(suit$
|
|
22656
|
+
list: cx(suit$d({
|
|
21620
22657
|
descendantName: 'list'
|
|
21621
22658
|
}), userCssClasses.list),
|
|
21622
|
-
loadPrevious: cx(suit$
|
|
22659
|
+
loadPrevious: cx(suit$d({
|
|
21623
22660
|
descendantName: 'loadPrevious'
|
|
21624
22661
|
}), userCssClasses.loadPrevious),
|
|
21625
|
-
disabledLoadPrevious: cx(suit$
|
|
22662
|
+
disabledLoadPrevious: cx(suit$d({
|
|
21626
22663
|
descendantName: 'loadPrevious',
|
|
21627
22664
|
modifierName: 'disabled'
|
|
21628
22665
|
}), userCssClasses.disabledLoadPrevious),
|
|
21629
|
-
loadMore: cx(suit$
|
|
22666
|
+
loadMore: cx(suit$d({
|
|
21630
22667
|
descendantName: 'loadMore'
|
|
21631
22668
|
}), userCssClasses.loadMore),
|
|
21632
|
-
disabledLoadMore: cx(suit$
|
|
22669
|
+
disabledLoadMore: cx(suit$d({
|
|
21633
22670
|
descendantName: 'loadMore',
|
|
21634
22671
|
modifierName: 'disabled'
|
|
21635
22672
|
}), userCssClasses.disabledLoadMore),
|
|
21636
|
-
bannerRoot: cx(suit$
|
|
22673
|
+
bannerRoot: cx(suit$d({
|
|
21637
22674
|
descendantName: 'banner'
|
|
21638
22675
|
}), userCssClasses.bannerRoot),
|
|
21639
|
-
bannerImage: cx(suit$
|
|
22676
|
+
bannerImage: cx(suit$d({
|
|
21640
22677
|
descendantName: 'banner-image'
|
|
21641
22678
|
}), userCssClasses.bannerImage),
|
|
21642
|
-
bannerLink: cx(suit$
|
|
22679
|
+
bannerLink: cx(suit$d({
|
|
21643
22680
|
descendantName: 'banner-link'
|
|
21644
22681
|
}), userCssClasses.bannerLink)
|
|
21645
22682
|
};
|
|
@@ -21684,10 +22721,10 @@
|
|
|
21684
22721
|
}
|
|
21685
22722
|
};
|
|
21686
22723
|
|
|
21687
|
-
var withUsage$
|
|
22724
|
+
var withUsage$I = createDocumentationMessageGenerator({
|
|
21688
22725
|
name: 'menu'
|
|
21689
22726
|
});
|
|
21690
|
-
var suit$
|
|
22727
|
+
var suit$e = component('Menu');
|
|
21691
22728
|
var renderer$9 = function renderer(_ref) {
|
|
21692
22729
|
var containerNode = _ref.containerNode,
|
|
21693
22730
|
cssClasses = _ref.cssClasses,
|
|
@@ -21742,37 +22779,37 @@
|
|
|
21742
22779
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
21743
22780
|
transformItems = _ref3.transformItems;
|
|
21744
22781
|
if (!container) {
|
|
21745
|
-
throw new Error(withUsage$
|
|
22782
|
+
throw new Error(withUsage$I('The `container` option is required.'));
|
|
21746
22783
|
}
|
|
21747
22784
|
var containerNode = getContainerNode(container);
|
|
21748
22785
|
var cssClasses = {
|
|
21749
|
-
root: cx(suit$
|
|
21750
|
-
noRefinementRoot: cx(suit$
|
|
22786
|
+
root: cx(suit$e(), userCssClasses.root),
|
|
22787
|
+
noRefinementRoot: cx(suit$e({
|
|
21751
22788
|
modifierName: 'noRefinement'
|
|
21752
22789
|
}), userCssClasses.noRefinementRoot),
|
|
21753
|
-
list: cx(suit$
|
|
22790
|
+
list: cx(suit$e({
|
|
21754
22791
|
descendantName: 'list'
|
|
21755
22792
|
}), userCssClasses.list),
|
|
21756
|
-
item: cx(suit$
|
|
22793
|
+
item: cx(suit$e({
|
|
21757
22794
|
descendantName: 'item'
|
|
21758
22795
|
}), userCssClasses.item),
|
|
21759
|
-
selectedItem: cx(suit$
|
|
22796
|
+
selectedItem: cx(suit$e({
|
|
21760
22797
|
descendantName: 'item',
|
|
21761
22798
|
modifierName: 'selected'
|
|
21762
22799
|
}), userCssClasses.selectedItem),
|
|
21763
|
-
link: cx(suit$
|
|
22800
|
+
link: cx(suit$e({
|
|
21764
22801
|
descendantName: 'link'
|
|
21765
22802
|
}), userCssClasses.link),
|
|
21766
|
-
label: cx(suit$
|
|
22803
|
+
label: cx(suit$e({
|
|
21767
22804
|
descendantName: 'label'
|
|
21768
22805
|
}), userCssClasses.label),
|
|
21769
|
-
count: cx(suit$
|
|
22806
|
+
count: cx(suit$e({
|
|
21770
22807
|
descendantName: 'count'
|
|
21771
22808
|
}), userCssClasses.count),
|
|
21772
|
-
showMore: cx(suit$
|
|
22809
|
+
showMore: cx(suit$e({
|
|
21773
22810
|
descendantName: 'showMore'
|
|
21774
22811
|
}), userCssClasses.showMore),
|
|
21775
|
-
disabledShowMore: cx(suit$
|
|
22812
|
+
disabledShowMore: cx(suit$e({
|
|
21776
22813
|
descendantName: 'showMore',
|
|
21777
22814
|
modifierName: 'disabled'
|
|
21778
22815
|
}), userCssClasses.disabledShowMore)
|
|
@@ -21850,10 +22887,10 @@
|
|
|
21850
22887
|
}
|
|
21851
22888
|
};
|
|
21852
22889
|
|
|
21853
|
-
var withUsage$
|
|
22890
|
+
var withUsage$J = createDocumentationMessageGenerator({
|
|
21854
22891
|
name: 'menu-select'
|
|
21855
22892
|
});
|
|
21856
|
-
var suit$
|
|
22893
|
+
var suit$f = component('MenuSelect');
|
|
21857
22894
|
var renderer$a = function renderer(_ref) {
|
|
21858
22895
|
var containerNode = _ref.containerNode,
|
|
21859
22896
|
cssClasses = _ref.cssClasses,
|
|
@@ -21893,18 +22930,18 @@
|
|
|
21893
22930
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
21894
22931
|
transformItems = _ref3.transformItems;
|
|
21895
22932
|
if (!container) {
|
|
21896
|
-
throw new Error(withUsage$
|
|
22933
|
+
throw new Error(withUsage$J('The `container` option is required.'));
|
|
21897
22934
|
}
|
|
21898
22935
|
var containerNode = getContainerNode(container);
|
|
21899
22936
|
var cssClasses = {
|
|
21900
|
-
root: cx(suit$
|
|
21901
|
-
noRefinementRoot: cx(suit$
|
|
22937
|
+
root: cx(suit$f(), userCssClasses.root),
|
|
22938
|
+
noRefinementRoot: cx(suit$f({
|
|
21902
22939
|
modifierName: 'noRefinement'
|
|
21903
22940
|
}), userCssClasses.noRefinementRoot),
|
|
21904
|
-
select: cx(suit$
|
|
22941
|
+
select: cx(suit$f({
|
|
21905
22942
|
descendantName: 'select'
|
|
21906
22943
|
}), userCssClasses.select),
|
|
21907
|
-
option: cx(suit$
|
|
22944
|
+
option: cx(suit$f({
|
|
21908
22945
|
descendantName: 'option'
|
|
21909
22946
|
}), userCssClasses.option)
|
|
21910
22947
|
};
|
|
@@ -21946,10 +22983,10 @@
|
|
|
21946
22983
|
}
|
|
21947
22984
|
};
|
|
21948
22985
|
|
|
21949
|
-
var withUsage$
|
|
22986
|
+
var withUsage$K = createDocumentationMessageGenerator({
|
|
21950
22987
|
name: 'numeric-menu'
|
|
21951
22988
|
});
|
|
21952
|
-
var suit$
|
|
22989
|
+
var suit$g = component('NumericMenu');
|
|
21953
22990
|
var renderer$b = function renderer(_ref) {
|
|
21954
22991
|
var containerNode = _ref.containerNode,
|
|
21955
22992
|
attribute = _ref.attribute,
|
|
@@ -21990,31 +23027,31 @@
|
|
|
21990
23027
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
21991
23028
|
transformItems = _ref3.transformItems;
|
|
21992
23029
|
if (!container) {
|
|
21993
|
-
throw new Error(withUsage$
|
|
23030
|
+
throw new Error(withUsage$K('The `container` option is required.'));
|
|
21994
23031
|
}
|
|
21995
23032
|
var containerNode = getContainerNode(container);
|
|
21996
23033
|
var cssClasses = {
|
|
21997
|
-
root: cx(suit$
|
|
21998
|
-
noRefinementRoot: cx(suit$
|
|
23034
|
+
root: cx(suit$g(), userCssClasses.root),
|
|
23035
|
+
noRefinementRoot: cx(suit$g({
|
|
21999
23036
|
modifierName: 'noRefinement'
|
|
22000
23037
|
}), userCssClasses.noRefinementRoot),
|
|
22001
|
-
list: cx(suit$
|
|
23038
|
+
list: cx(suit$g({
|
|
22002
23039
|
descendantName: 'list'
|
|
22003
23040
|
}), userCssClasses.list),
|
|
22004
|
-
item: cx(suit$
|
|
23041
|
+
item: cx(suit$g({
|
|
22005
23042
|
descendantName: 'item'
|
|
22006
23043
|
}), userCssClasses.item),
|
|
22007
|
-
selectedItem: cx(suit$
|
|
23044
|
+
selectedItem: cx(suit$g({
|
|
22008
23045
|
descendantName: 'item',
|
|
22009
23046
|
modifierName: 'selected'
|
|
22010
23047
|
}), userCssClasses.selectedItem),
|
|
22011
|
-
label: cx(suit$
|
|
23048
|
+
label: cx(suit$g({
|
|
22012
23049
|
descendantName: 'label'
|
|
22013
23050
|
}), userCssClasses.label),
|
|
22014
|
-
radio: cx(suit$
|
|
23051
|
+
radio: cx(suit$g({
|
|
22015
23052
|
descendantName: 'radio'
|
|
22016
23053
|
}), userCssClasses.radio),
|
|
22017
|
-
labelText: cx(suit$
|
|
23054
|
+
labelText: cx(suit$g({
|
|
22018
23055
|
descendantName: 'labelText'
|
|
22019
23056
|
}), userCssClasses.labelText)
|
|
22020
23057
|
};
|
|
@@ -22150,8 +23187,8 @@
|
|
|
22150
23187
|
}));
|
|
22151
23188
|
}
|
|
22152
23189
|
|
|
22153
|
-
var suit$
|
|
22154
|
-
var withUsage$
|
|
23190
|
+
var suit$h = component('Pagination');
|
|
23191
|
+
var withUsage$L = createDocumentationMessageGenerator({
|
|
22155
23192
|
name: 'pagination'
|
|
22156
23193
|
});
|
|
22157
23194
|
var defaultTemplates$a = {
|
|
@@ -22233,51 +23270,51 @@
|
|
|
22233
23270
|
_ref4$scrollTo = _ref4.scrollTo,
|
|
22234
23271
|
userScrollTo = _ref4$scrollTo === void 0 ? 'body' : _ref4$scrollTo;
|
|
22235
23272
|
if (!container) {
|
|
22236
|
-
throw new Error(withUsage$
|
|
23273
|
+
throw new Error(withUsage$L('The `container` option is required.'));
|
|
22237
23274
|
}
|
|
22238
23275
|
var containerNode = getContainerNode(container);
|
|
22239
23276
|
var scrollTo = userScrollTo === true ? 'body' : userScrollTo;
|
|
22240
23277
|
var scrollToNode = scrollTo !== false ? getContainerNode(scrollTo) : false;
|
|
22241
23278
|
var cssClasses = {
|
|
22242
|
-
root: cx(suit$
|
|
22243
|
-
noRefinementRoot: cx(suit$
|
|
23279
|
+
root: cx(suit$h(), userCssClasses.root),
|
|
23280
|
+
noRefinementRoot: cx(suit$h({
|
|
22244
23281
|
modifierName: 'noRefinement'
|
|
22245
23282
|
}), userCssClasses.noRefinementRoot),
|
|
22246
|
-
list: cx(suit$
|
|
23283
|
+
list: cx(suit$h({
|
|
22247
23284
|
descendantName: 'list'
|
|
22248
23285
|
}), userCssClasses.list),
|
|
22249
|
-
item: cx(suit$
|
|
23286
|
+
item: cx(suit$h({
|
|
22250
23287
|
descendantName: 'item'
|
|
22251
23288
|
}), userCssClasses.item),
|
|
22252
|
-
firstPageItem: cx(suit$
|
|
23289
|
+
firstPageItem: cx(suit$h({
|
|
22253
23290
|
descendantName: 'item',
|
|
22254
23291
|
modifierName: 'firstPage'
|
|
22255
23292
|
}), userCssClasses.firstPageItem),
|
|
22256
|
-
lastPageItem: cx(suit$
|
|
23293
|
+
lastPageItem: cx(suit$h({
|
|
22257
23294
|
descendantName: 'item',
|
|
22258
23295
|
modifierName: 'lastPage'
|
|
22259
23296
|
}), userCssClasses.lastPageItem),
|
|
22260
|
-
previousPageItem: cx(suit$
|
|
23297
|
+
previousPageItem: cx(suit$h({
|
|
22261
23298
|
descendantName: 'item',
|
|
22262
23299
|
modifierName: 'previousPage'
|
|
22263
23300
|
}), userCssClasses.previousPageItem),
|
|
22264
|
-
nextPageItem: cx(suit$
|
|
23301
|
+
nextPageItem: cx(suit$h({
|
|
22265
23302
|
descendantName: 'item',
|
|
22266
23303
|
modifierName: 'nextPage'
|
|
22267
23304
|
}), userCssClasses.nextPageItem),
|
|
22268
|
-
pageItem: cx(suit$
|
|
23305
|
+
pageItem: cx(suit$h({
|
|
22269
23306
|
descendantName: 'item',
|
|
22270
23307
|
modifierName: 'page'
|
|
22271
23308
|
}), userCssClasses.pageItem),
|
|
22272
|
-
selectedItem: cx(suit$
|
|
23309
|
+
selectedItem: cx(suit$h({
|
|
22273
23310
|
descendantName: 'item',
|
|
22274
23311
|
modifierName: 'selected'
|
|
22275
23312
|
}), userCssClasses.selectedItem),
|
|
22276
|
-
disabledItem: cx(suit$
|
|
23313
|
+
disabledItem: cx(suit$h({
|
|
22277
23314
|
descendantName: 'item',
|
|
22278
23315
|
modifierName: 'disabled'
|
|
22279
23316
|
}), userCssClasses.disabledItem),
|
|
22280
|
-
link: cx(suit$
|
|
23317
|
+
link: cx(suit$h({
|
|
22281
23318
|
descendantName: 'link'
|
|
22282
23319
|
}), userCssClasses.link)
|
|
22283
23320
|
};
|
|
@@ -22366,10 +23403,10 @@
|
|
|
22366
23403
|
}));
|
|
22367
23404
|
}
|
|
22368
23405
|
|
|
22369
|
-
var withUsage$
|
|
23406
|
+
var withUsage$M = createDocumentationMessageGenerator({
|
|
22370
23407
|
name: 'panel'
|
|
22371
23408
|
});
|
|
22372
|
-
var suit$
|
|
23409
|
+
var suit$i = component('Panel');
|
|
22373
23410
|
var renderer$d = function renderer(_ref) {
|
|
22374
23411
|
var containerNode = _ref.containerNode,
|
|
22375
23412
|
bodyContainerNode = _ref.bodyContainerNode,
|
|
@@ -22414,36 +23451,36 @@
|
|
|
22414
23451
|
return false;
|
|
22415
23452
|
};
|
|
22416
23453
|
var cssClasses = {
|
|
22417
|
-
root: cx(suit$
|
|
22418
|
-
noRefinementRoot: cx(suit$
|
|
23454
|
+
root: cx(suit$i(), userCssClasses.root),
|
|
23455
|
+
noRefinementRoot: cx(suit$i({
|
|
22419
23456
|
modifierName: 'noRefinement'
|
|
22420
23457
|
}), userCssClasses.noRefinementRoot),
|
|
22421
|
-
collapsibleRoot: cx(suit$
|
|
23458
|
+
collapsibleRoot: cx(suit$i({
|
|
22422
23459
|
modifierName: 'collapsible'
|
|
22423
23460
|
}), userCssClasses.collapsibleRoot),
|
|
22424
|
-
collapsedRoot: cx(suit$
|
|
23461
|
+
collapsedRoot: cx(suit$i({
|
|
22425
23462
|
modifierName: 'collapsed'
|
|
22426
23463
|
}), userCssClasses.collapsedRoot),
|
|
22427
|
-
collapseButton: cx(suit$
|
|
23464
|
+
collapseButton: cx(suit$i({
|
|
22428
23465
|
descendantName: 'collapseButton'
|
|
22429
23466
|
}), userCssClasses.collapseButton),
|
|
22430
|
-
collapseIcon: cx(suit$
|
|
23467
|
+
collapseIcon: cx(suit$i({
|
|
22431
23468
|
descendantName: 'collapseIcon'
|
|
22432
23469
|
}), userCssClasses.collapseIcon),
|
|
22433
|
-
body: cx(suit$
|
|
23470
|
+
body: cx(suit$i({
|
|
22434
23471
|
descendantName: 'body'
|
|
22435
23472
|
}), userCssClasses.body),
|
|
22436
|
-
header: cx(suit$
|
|
23473
|
+
header: cx(suit$i({
|
|
22437
23474
|
descendantName: 'header'
|
|
22438
23475
|
}), userCssClasses.header),
|
|
22439
|
-
footer: cx(suit$
|
|
23476
|
+
footer: cx(suit$i({
|
|
22440
23477
|
descendantName: 'footer'
|
|
22441
23478
|
}), userCssClasses.footer)
|
|
22442
23479
|
};
|
|
22443
23480
|
return function (widgetFactory) {
|
|
22444
23481
|
return function (widgetParams) {
|
|
22445
23482
|
if (!(widgetParams && widgetParams.container)) {
|
|
22446
|
-
throw new Error(withUsage$
|
|
23483
|
+
throw new Error(withUsage$M("The `container` option is required in the widget within the panel."));
|
|
22447
23484
|
}
|
|
22448
23485
|
var containerNode = getContainerNode(widgetParams.container);
|
|
22449
23486
|
var defaultTemplates = {
|
|
@@ -22517,7 +23554,7 @@
|
|
|
22517
23554
|
};
|
|
22518
23555
|
};
|
|
22519
23556
|
|
|
22520
|
-
var _excluded$
|
|
23557
|
+
var _excluded$w = ["placesReference", "defaultPosition"],
|
|
22521
23558
|
_excluded2$6 = ["places"];
|
|
22522
23559
|
|
|
22523
23560
|
/* Places.js is an optional dependency, no error should be reported if the package is missing */
|
|
@@ -22535,7 +23572,7 @@
|
|
|
22535
23572
|
placesReference = _ref.placesReference,
|
|
22536
23573
|
_ref$defaultPosition = _ref.defaultPosition,
|
|
22537
23574
|
defaultPosition = _ref$defaultPosition === void 0 ? [] : _ref$defaultPosition,
|
|
22538
|
-
placesOptions = _objectWithoutProperties(_ref, _excluded$
|
|
23575
|
+
placesOptions = _objectWithoutProperties(_ref, _excluded$w);
|
|
22539
23576
|
if (typeof placesReference !== 'function') {
|
|
22540
23577
|
throw new Error('The `placesReference` option requires a valid Places.js reference.');
|
|
22541
23578
|
}
|
|
@@ -22647,8 +23684,8 @@
|
|
|
22647
23684
|
}))));
|
|
22648
23685
|
};
|
|
22649
23686
|
|
|
22650
|
-
var suit$
|
|
22651
|
-
var withUsage$
|
|
23687
|
+
var suit$j = component('PoweredBy');
|
|
23688
|
+
var withUsage$N = createDocumentationMessageGenerator({
|
|
22652
23689
|
name: 'powered-by'
|
|
22653
23690
|
});
|
|
22654
23691
|
var renderer$e = function renderer(_ref) {
|
|
@@ -22677,17 +23714,17 @@
|
|
|
22677
23714
|
_ref3$theme = _ref3.theme,
|
|
22678
23715
|
theme = _ref3$theme === void 0 ? 'light' : _ref3$theme;
|
|
22679
23716
|
if (!container) {
|
|
22680
|
-
throw new Error(withUsage$
|
|
23717
|
+
throw new Error(withUsage$N('The `container` option is required.'));
|
|
22681
23718
|
}
|
|
22682
23719
|
var containerNode = getContainerNode(container);
|
|
22683
23720
|
var cssClasses = {
|
|
22684
|
-
root: cx(suit$
|
|
23721
|
+
root: cx(suit$j(), suit$j({
|
|
22685
23722
|
modifierName: theme === 'dark' ? 'dark' : 'light'
|
|
22686
23723
|
}), userCssClasses.root),
|
|
22687
|
-
link: cx(suit$
|
|
23724
|
+
link: cx(suit$j({
|
|
22688
23725
|
descendantName: 'link'
|
|
22689
23726
|
}), userCssClasses.link),
|
|
22690
|
-
logo: cx(suit$
|
|
23727
|
+
logo: cx(suit$j({
|
|
22691
23728
|
descendantName: 'logo'
|
|
22692
23729
|
}), userCssClasses.logo)
|
|
22693
23730
|
};
|
|
@@ -22705,13 +23742,13 @@
|
|
|
22705
23742
|
});
|
|
22706
23743
|
};
|
|
22707
23744
|
|
|
22708
|
-
var withUsage$
|
|
23745
|
+
var withUsage$O = createDocumentationMessageGenerator({
|
|
22709
23746
|
name: 'query-rule-context'
|
|
22710
23747
|
});
|
|
22711
23748
|
var queryRuleContext = function queryRuleContext() {
|
|
22712
23749
|
var widgetParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22713
23750
|
if (!widgetParams.trackedFilters) {
|
|
22714
|
-
throw new Error(withUsage$
|
|
23751
|
+
throw new Error(withUsage$O('The `trackedFilters` option is required.'));
|
|
22715
23752
|
}
|
|
22716
23753
|
return _objectSpread2(_objectSpread2({}, connectQueryRules(noop)(widgetParams)), {}, {
|
|
22717
23754
|
$$widgetType: 'ais.queryRuleContext'
|
|
@@ -22740,10 +23777,10 @@
|
|
|
22740
23777
|
return JSON.stringify(items, null, 2);
|
|
22741
23778
|
}
|
|
22742
23779
|
};
|
|
22743
|
-
var withUsage$
|
|
23780
|
+
var withUsage$P = createDocumentationMessageGenerator({
|
|
22744
23781
|
name: 'query-rule-custom-data'
|
|
22745
23782
|
});
|
|
22746
|
-
var suit$
|
|
23783
|
+
var suit$k = component('QueryRuleCustomData');
|
|
22747
23784
|
var renderer$f = function renderer(_ref2) {
|
|
22748
23785
|
var containerNode = _ref2.containerNode,
|
|
22749
23786
|
cssClasses = _ref2.cssClasses,
|
|
@@ -22769,10 +23806,10 @@
|
|
|
22769
23806
|
return items;
|
|
22770
23807
|
} : _ref4$transformItems;
|
|
22771
23808
|
if (!container) {
|
|
22772
|
-
throw new Error(withUsage$
|
|
23809
|
+
throw new Error(withUsage$P('The `container` option is required.'));
|
|
22773
23810
|
}
|
|
22774
23811
|
var cssClasses = {
|
|
22775
|
-
root: cx(suit$
|
|
23812
|
+
root: cx(suit$k(), userCssClasses.root)
|
|
22776
23813
|
};
|
|
22777
23814
|
var containerNode = getContainerNode(container);
|
|
22778
23815
|
var templates = _objectSpread2(_objectSpread2({}, defaultTemplates$b), userTemplates);
|
|
@@ -22792,15 +23829,15 @@
|
|
|
22792
23829
|
});
|
|
22793
23830
|
};
|
|
22794
23831
|
|
|
22795
|
-
var _excluded$
|
|
22796
|
-
var withUsage$
|
|
23832
|
+
var _excluded$x = ["item", "sendEvent"];
|
|
23833
|
+
var withUsage$Q = createDocumentationMessageGenerator({
|
|
22797
23834
|
name: 'related-products'
|
|
22798
23835
|
});
|
|
22799
23836
|
var RelatedProducts = createRelatedProductsComponent({
|
|
22800
23837
|
createElement: h,
|
|
22801
23838
|
Fragment: p
|
|
22802
23839
|
});
|
|
22803
|
-
function createRenderer(_ref) {
|
|
23840
|
+
function createRenderer$1(_ref) {
|
|
22804
23841
|
var renderState = _ref.renderState,
|
|
22805
23842
|
cssClasses = _ref.cssClasses,
|
|
22806
23843
|
containerNode = _ref.containerNode,
|
|
@@ -22831,7 +23868,7 @@
|
|
|
22831
23868
|
var itemComponent = templates.item ? function (_ref3) {
|
|
22832
23869
|
var item = _ref3.item,
|
|
22833
23870
|
_sendEvent = _ref3.sendEvent,
|
|
22834
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
23871
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$x);
|
|
22835
23872
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
22836
23873
|
templateKey: "item",
|
|
22837
23874
|
rootTagName: "fragment",
|
|
@@ -22900,10 +23937,10 @@
|
|
|
22900
23937
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
22901
23938
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
22902
23939
|
if (!container) {
|
|
22903
|
-
throw new Error(withUsage$
|
|
23940
|
+
throw new Error(withUsage$Q('The `container` option is required.'));
|
|
22904
23941
|
}
|
|
22905
23942
|
var containerNode = getContainerNode(container);
|
|
22906
|
-
var specializedRenderer = createRenderer({
|
|
23943
|
+
var specializedRenderer = createRenderer$1({
|
|
22907
23944
|
containerNode: containerNode,
|
|
22908
23945
|
cssClasses: cssClasses,
|
|
22909
23946
|
renderState: {},
|
|
@@ -23035,10 +24072,10 @@
|
|
|
23035
24072
|
return RangeInput;
|
|
23036
24073
|
}(d);
|
|
23037
24074
|
|
|
23038
|
-
var withUsage$
|
|
24075
|
+
var withUsage$R = createDocumentationMessageGenerator({
|
|
23039
24076
|
name: 'range-input'
|
|
23040
24077
|
});
|
|
23041
|
-
var suit$
|
|
24078
|
+
var suit$l = component('RangeInput');
|
|
23042
24079
|
var defaultTemplates$c = {
|
|
23043
24080
|
separatorText: function separatorText() {
|
|
23044
24081
|
return 'to';
|
|
@@ -23100,35 +24137,35 @@
|
|
|
23100
24137
|
_ref3$templates = _ref3.templates,
|
|
23101
24138
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates;
|
|
23102
24139
|
if (!container) {
|
|
23103
|
-
throw new Error(withUsage$
|
|
24140
|
+
throw new Error(withUsage$R('The `container` option is required.'));
|
|
23104
24141
|
}
|
|
23105
24142
|
var containerNode = getContainerNode(container);
|
|
23106
24143
|
var cssClasses = {
|
|
23107
|
-
root: cx(suit$
|
|
23108
|
-
noRefinement: cx(suit$
|
|
24144
|
+
root: cx(suit$l(), userCssClasses.root),
|
|
24145
|
+
noRefinement: cx(suit$l({
|
|
23109
24146
|
modifierName: 'noRefinement'
|
|
23110
24147
|
})),
|
|
23111
|
-
form: cx(suit$
|
|
24148
|
+
form: cx(suit$l({
|
|
23112
24149
|
descendantName: 'form'
|
|
23113
24150
|
}), userCssClasses.form),
|
|
23114
|
-
label: cx(suit$
|
|
24151
|
+
label: cx(suit$l({
|
|
23115
24152
|
descendantName: 'label'
|
|
23116
24153
|
}), userCssClasses.label),
|
|
23117
|
-
input: cx(suit$
|
|
24154
|
+
input: cx(suit$l({
|
|
23118
24155
|
descendantName: 'input'
|
|
23119
24156
|
}), userCssClasses.input),
|
|
23120
|
-
inputMin: cx(suit$
|
|
24157
|
+
inputMin: cx(suit$l({
|
|
23121
24158
|
descendantName: 'input',
|
|
23122
24159
|
modifierName: 'min'
|
|
23123
24160
|
}), userCssClasses.inputMin),
|
|
23124
|
-
inputMax: cx(suit$
|
|
24161
|
+
inputMax: cx(suit$l({
|
|
23125
24162
|
descendantName: 'input',
|
|
23126
24163
|
modifierName: 'max'
|
|
23127
24164
|
}), userCssClasses.inputMax),
|
|
23128
|
-
separator: cx(suit$
|
|
24165
|
+
separator: cx(suit$l({
|
|
23129
24166
|
descendantName: 'separator'
|
|
23130
24167
|
}), userCssClasses.separator),
|
|
23131
|
-
submit: cx(suit$
|
|
24168
|
+
submit: cx(suit$l({
|
|
23132
24169
|
descendantName: 'submit'
|
|
23133
24170
|
}), userCssClasses.submit)
|
|
23134
24171
|
};
|
|
@@ -23823,10 +24860,10 @@
|
|
|
23823
24860
|
return Slider;
|
|
23824
24861
|
}(d);
|
|
23825
24862
|
|
|
23826
|
-
var withUsage$
|
|
24863
|
+
var withUsage$S = createDocumentationMessageGenerator({
|
|
23827
24864
|
name: 'range-slider'
|
|
23828
24865
|
});
|
|
23829
|
-
var suit$
|
|
24866
|
+
var suit$m = component('RangeSlider');
|
|
23830
24867
|
var renderer$h = function renderer(_ref) {
|
|
23831
24868
|
var containerNode = _ref.containerNode,
|
|
23832
24869
|
cssClasses = _ref.cssClasses,
|
|
@@ -23892,12 +24929,12 @@
|
|
|
23892
24929
|
_ref3$tooltips = _ref3.tooltips,
|
|
23893
24930
|
tooltips = _ref3$tooltips === void 0 ? true : _ref3$tooltips;
|
|
23894
24931
|
if (!container) {
|
|
23895
|
-
throw new Error(withUsage$
|
|
24932
|
+
throw new Error(withUsage$S('The `container` option is required.'));
|
|
23896
24933
|
}
|
|
23897
24934
|
var containerNode = getContainerNode(container);
|
|
23898
24935
|
var cssClasses = {
|
|
23899
|
-
root: cx(suit$
|
|
23900
|
-
disabledRoot: cx(suit$
|
|
24936
|
+
root: cx(suit$m(), userCssClasses.root),
|
|
24937
|
+
disabledRoot: cx(suit$m({
|
|
23901
24938
|
modifierName: 'disabled'
|
|
23902
24939
|
}), userCssClasses.disabledRoot)
|
|
23903
24940
|
};
|
|
@@ -23972,10 +25009,10 @@
|
|
|
23972
25009
|
}
|
|
23973
25010
|
};
|
|
23974
25011
|
|
|
23975
|
-
var withUsage$
|
|
25012
|
+
var withUsage$T = createDocumentationMessageGenerator({
|
|
23976
25013
|
name: 'rating-menu'
|
|
23977
25014
|
});
|
|
23978
|
-
var suit$
|
|
25015
|
+
var suit$n = component('RatingMenu');
|
|
23979
25016
|
var _ref3 = h("path", {
|
|
23980
25017
|
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
25018
|
});
|
|
@@ -24009,12 +25046,12 @@
|
|
|
24009
25046
|
}, h("svg", {
|
|
24010
25047
|
style: "display:none;"
|
|
24011
25048
|
}, h("symbol", {
|
|
24012
|
-
id: suit$
|
|
25049
|
+
id: suit$n({
|
|
24013
25050
|
descendantName: 'starSymbol'
|
|
24014
25051
|
}),
|
|
24015
25052
|
viewBox: "0 0 24 24"
|
|
24016
25053
|
}, _ref3), h("symbol", {
|
|
24017
|
-
id: suit$
|
|
25054
|
+
id: suit$n({
|
|
24018
25055
|
descendantName: 'starEmptySymbol'
|
|
24019
25056
|
}),
|
|
24020
25057
|
viewBox: "0 0 24 24"
|
|
@@ -24060,46 +25097,46 @@
|
|
|
24060
25097
|
_ref5$templates = _ref5.templates,
|
|
24061
25098
|
templates = _ref5$templates === void 0 ? {} : _ref5$templates;
|
|
24062
25099
|
if (!container) {
|
|
24063
|
-
throw new Error(withUsage$
|
|
25100
|
+
throw new Error(withUsage$T('The `container` option is required.'));
|
|
24064
25101
|
}
|
|
24065
25102
|
var containerNode = getContainerNode(container);
|
|
24066
25103
|
var cssClasses = {
|
|
24067
|
-
root: cx(suit$
|
|
24068
|
-
noRefinementRoot: cx(suit$
|
|
25104
|
+
root: cx(suit$n(), userCssClasses.root),
|
|
25105
|
+
noRefinementRoot: cx(suit$n({
|
|
24069
25106
|
modifierName: 'noRefinement'
|
|
24070
25107
|
}), userCssClasses.noRefinementRoot),
|
|
24071
|
-
list: cx(suit$
|
|
25108
|
+
list: cx(suit$n({
|
|
24072
25109
|
descendantName: 'list'
|
|
24073
25110
|
}), userCssClasses.list),
|
|
24074
|
-
item: cx(suit$
|
|
25111
|
+
item: cx(suit$n({
|
|
24075
25112
|
descendantName: 'item'
|
|
24076
25113
|
}), userCssClasses.item),
|
|
24077
|
-
selectedItem: cx(suit$
|
|
25114
|
+
selectedItem: cx(suit$n({
|
|
24078
25115
|
descendantName: 'item',
|
|
24079
25116
|
modifierName: 'selected'
|
|
24080
25117
|
}), userCssClasses.selectedItem),
|
|
24081
|
-
disabledItem: cx(suit$
|
|
25118
|
+
disabledItem: cx(suit$n({
|
|
24082
25119
|
descendantName: 'item',
|
|
24083
25120
|
modifierName: 'disabled'
|
|
24084
25121
|
}), userCssClasses.disabledItem),
|
|
24085
|
-
link: cx(suit$
|
|
25122
|
+
link: cx(suit$n({
|
|
24086
25123
|
descendantName: 'link'
|
|
24087
25124
|
}), userCssClasses.link),
|
|
24088
|
-
starIcon: cx(suit$
|
|
25125
|
+
starIcon: cx(suit$n({
|
|
24089
25126
|
descendantName: 'starIcon'
|
|
24090
25127
|
}), userCssClasses.starIcon),
|
|
24091
|
-
fullStarIcon: cx(suit$
|
|
25128
|
+
fullStarIcon: cx(suit$n({
|
|
24092
25129
|
descendantName: 'starIcon',
|
|
24093
25130
|
modifierName: 'full'
|
|
24094
25131
|
}), userCssClasses.fullStarIcon),
|
|
24095
|
-
emptyStarIcon: cx(suit$
|
|
25132
|
+
emptyStarIcon: cx(suit$n({
|
|
24096
25133
|
descendantName: 'starIcon',
|
|
24097
25134
|
modifierName: 'empty'
|
|
24098
25135
|
}), userCssClasses.emptyStarIcon),
|
|
24099
|
-
label: cx(suit$
|
|
25136
|
+
label: cx(suit$n({
|
|
24100
25137
|
descendantName: 'label'
|
|
24101
25138
|
}), userCssClasses.label),
|
|
24102
|
-
count: cx(suit$
|
|
25139
|
+
count: cx(suit$n({
|
|
24103
25140
|
descendantName: 'count'
|
|
24104
25141
|
}), userCssClasses.count)
|
|
24105
25142
|
};
|
|
@@ -24220,10 +25257,10 @@
|
|
|
24220
25257
|
}
|
|
24221
25258
|
};
|
|
24222
25259
|
|
|
24223
|
-
var withUsage$
|
|
25260
|
+
var withUsage$U = createDocumentationMessageGenerator({
|
|
24224
25261
|
name: 'refinement-list'
|
|
24225
25262
|
});
|
|
24226
|
-
var suit$
|
|
25263
|
+
var suit$o = component('RefinementList');
|
|
24227
25264
|
var searchBoxSuit = component('SearchBox');
|
|
24228
25265
|
var renderer$j = function renderer(_ref) {
|
|
24229
25266
|
var containerNode = _ref.containerNode,
|
|
@@ -24324,47 +25361,47 @@
|
|
|
24324
25361
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
24325
25362
|
transformItems = _ref3.transformItems;
|
|
24326
25363
|
if (!container) {
|
|
24327
|
-
throw new Error(withUsage$
|
|
25364
|
+
throw new Error(withUsage$U('The `container` option is required.'));
|
|
24328
25365
|
}
|
|
24329
25366
|
var escapeFacetValues = searchable ? Boolean(searchableEscapeFacetValues) : false;
|
|
24330
25367
|
var containerNode = getContainerNode(container);
|
|
24331
25368
|
var cssClasses = {
|
|
24332
|
-
root: cx(suit$
|
|
24333
|
-
noRefinementRoot: cx(suit$
|
|
25369
|
+
root: cx(suit$o(), userCssClasses.root),
|
|
25370
|
+
noRefinementRoot: cx(suit$o({
|
|
24334
25371
|
modifierName: 'noRefinement'
|
|
24335
25372
|
}), userCssClasses.noRefinementRoot),
|
|
24336
|
-
list: cx(suit$
|
|
25373
|
+
list: cx(suit$o({
|
|
24337
25374
|
descendantName: 'list'
|
|
24338
25375
|
}), userCssClasses.list),
|
|
24339
|
-
item: cx(suit$
|
|
25376
|
+
item: cx(suit$o({
|
|
24340
25377
|
descendantName: 'item'
|
|
24341
25378
|
}), userCssClasses.item),
|
|
24342
|
-
selectedItem: cx(suit$
|
|
25379
|
+
selectedItem: cx(suit$o({
|
|
24343
25380
|
descendantName: 'item',
|
|
24344
25381
|
modifierName: 'selected'
|
|
24345
25382
|
}), userCssClasses.selectedItem),
|
|
24346
|
-
searchBox: cx(suit$
|
|
25383
|
+
searchBox: cx(suit$o({
|
|
24347
25384
|
descendantName: 'searchBox'
|
|
24348
25385
|
}), userCssClasses.searchBox),
|
|
24349
|
-
label: cx(suit$
|
|
25386
|
+
label: cx(suit$o({
|
|
24350
25387
|
descendantName: 'label'
|
|
24351
25388
|
}), userCssClasses.label),
|
|
24352
|
-
checkbox: cx(suit$
|
|
25389
|
+
checkbox: cx(suit$o({
|
|
24353
25390
|
descendantName: 'checkbox'
|
|
24354
25391
|
}), userCssClasses.checkbox),
|
|
24355
|
-
labelText: cx(suit$
|
|
25392
|
+
labelText: cx(suit$o({
|
|
24356
25393
|
descendantName: 'labelText'
|
|
24357
25394
|
}), userCssClasses.labelText),
|
|
24358
|
-
count: cx(suit$
|
|
25395
|
+
count: cx(suit$o({
|
|
24359
25396
|
descendantName: 'count'
|
|
24360
25397
|
}), userCssClasses.count),
|
|
24361
|
-
noResults: cx(suit$
|
|
25398
|
+
noResults: cx(suit$o({
|
|
24362
25399
|
descendantName: 'noResults'
|
|
24363
25400
|
}), userCssClasses.noResults),
|
|
24364
|
-
showMore: cx(suit$
|
|
25401
|
+
showMore: cx(suit$o({
|
|
24365
25402
|
descendantName: 'showMore'
|
|
24366
25403
|
}), userCssClasses.showMore),
|
|
24367
|
-
disabledShowMore: cx(suit$
|
|
25404
|
+
disabledShowMore: cx(suit$o({
|
|
24368
25405
|
descendantName: 'showMore',
|
|
24369
25406
|
modifierName: 'disabled'
|
|
24370
25407
|
}), userCssClasses.disabledShowMore),
|
|
@@ -24476,10 +25513,10 @@
|
|
|
24476
25513
|
}
|
|
24477
25514
|
};
|
|
24478
25515
|
|
|
24479
|
-
var withUsage$
|
|
25516
|
+
var withUsage$V = createDocumentationMessageGenerator({
|
|
24480
25517
|
name: 'relevant-sort'
|
|
24481
25518
|
});
|
|
24482
|
-
var suit$
|
|
25519
|
+
var suit$p = component('RelevantSort');
|
|
24483
25520
|
var renderer$k = function renderer(_ref) {
|
|
24484
25521
|
var containerNode = _ref.containerNode,
|
|
24485
25522
|
cssClasses = _ref.cssClasses,
|
|
@@ -24504,15 +25541,15 @@
|
|
|
24504
25541
|
_widgetParams$cssClas = widgetParams.cssClasses,
|
|
24505
25542
|
userCssClasses = _widgetParams$cssClas === void 0 ? {} : _widgetParams$cssClas;
|
|
24506
25543
|
if (!container) {
|
|
24507
|
-
throw new Error(withUsage$
|
|
25544
|
+
throw new Error(withUsage$V('The `container` option is required.'));
|
|
24508
25545
|
}
|
|
24509
25546
|
var containerNode = getContainerNode(container);
|
|
24510
25547
|
var cssClasses = {
|
|
24511
|
-
root: cx(suit$
|
|
24512
|
-
text: cx(suit$
|
|
25548
|
+
root: cx(suit$p(), userCssClasses.root),
|
|
25549
|
+
text: cx(suit$p({
|
|
24513
25550
|
descendantName: 'text'
|
|
24514
25551
|
}), userCssClasses.text),
|
|
24515
|
-
button: cx(suit$
|
|
25552
|
+
button: cx(suit$p({
|
|
24516
25553
|
descendantName: 'button'
|
|
24517
25554
|
}), userCssClasses.button)
|
|
24518
25555
|
};
|
|
@@ -24531,10 +25568,10 @@
|
|
|
24531
25568
|
});
|
|
24532
25569
|
};
|
|
24533
25570
|
|
|
24534
|
-
var withUsage$
|
|
25571
|
+
var withUsage$W = createDocumentationMessageGenerator({
|
|
24535
25572
|
name: 'search-box'
|
|
24536
25573
|
});
|
|
24537
|
-
var suit$
|
|
25574
|
+
var suit$q = component('SearchBox');
|
|
24538
25575
|
var renderer$l = function renderer(_ref) {
|
|
24539
25576
|
var containerNode = _ref.containerNode,
|
|
24540
25577
|
cssClasses = _ref.cssClasses,
|
|
@@ -24599,33 +25636,33 @@
|
|
|
24599
25636
|
_ref3$templates = _ref3.templates,
|
|
24600
25637
|
userTemplates = _ref3$templates === void 0 ? {} : _ref3$templates;
|
|
24601
25638
|
if (!container) {
|
|
24602
|
-
throw new Error(withUsage$
|
|
25639
|
+
throw new Error(withUsage$W('The `container` option is required.'));
|
|
24603
25640
|
}
|
|
24604
25641
|
var containerNode = getContainerNode(container);
|
|
24605
25642
|
var cssClasses = {
|
|
24606
|
-
root: cx(suit$
|
|
24607
|
-
form: cx(suit$
|
|
25643
|
+
root: cx(suit$q(), userCssClasses.root),
|
|
25644
|
+
form: cx(suit$q({
|
|
24608
25645
|
descendantName: 'form'
|
|
24609
25646
|
}), userCssClasses.form),
|
|
24610
|
-
input: cx(suit$
|
|
25647
|
+
input: cx(suit$q({
|
|
24611
25648
|
descendantName: 'input'
|
|
24612
25649
|
}), userCssClasses.input),
|
|
24613
|
-
submit: cx(suit$
|
|
25650
|
+
submit: cx(suit$q({
|
|
24614
25651
|
descendantName: 'submit'
|
|
24615
25652
|
}), userCssClasses.submit),
|
|
24616
|
-
submitIcon: cx(suit$
|
|
25653
|
+
submitIcon: cx(suit$q({
|
|
24617
25654
|
descendantName: 'submitIcon'
|
|
24618
25655
|
}), userCssClasses.submitIcon),
|
|
24619
|
-
reset: cx(suit$
|
|
25656
|
+
reset: cx(suit$q({
|
|
24620
25657
|
descendantName: 'reset'
|
|
24621
25658
|
}), userCssClasses.reset),
|
|
24622
|
-
resetIcon: cx(suit$
|
|
25659
|
+
resetIcon: cx(suit$q({
|
|
24623
25660
|
descendantName: 'resetIcon'
|
|
24624
25661
|
}), userCssClasses.resetIcon),
|
|
24625
|
-
loadingIndicator: cx(suit$
|
|
25662
|
+
loadingIndicator: cx(suit$q({
|
|
24626
25663
|
descendantName: 'loadingIndicator'
|
|
24627
25664
|
}), userCssClasses.loadingIndicator),
|
|
24628
|
-
loadingIcon: cx(suit$
|
|
25665
|
+
loadingIcon: cx(suit$q({
|
|
24629
25666
|
descendantName: 'loadingIcon'
|
|
24630
25667
|
}), userCssClasses.loadingIcon)
|
|
24631
25668
|
};
|
|
@@ -24652,10 +25689,10 @@
|
|
|
24652
25689
|
});
|
|
24653
25690
|
};
|
|
24654
25691
|
|
|
24655
|
-
var withUsage$
|
|
25692
|
+
var withUsage$X = createDocumentationMessageGenerator({
|
|
24656
25693
|
name: 'sort-by'
|
|
24657
25694
|
});
|
|
24658
|
-
var suit$
|
|
25695
|
+
var suit$r = component('SortBy');
|
|
24659
25696
|
var renderer$m = function renderer(_ref) {
|
|
24660
25697
|
var containerNode = _ref.containerNode,
|
|
24661
25698
|
cssClasses = _ref.cssClasses;
|
|
@@ -24690,15 +25727,15 @@
|
|
|
24690
25727
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses,
|
|
24691
25728
|
transformItems = _ref3.transformItems;
|
|
24692
25729
|
if (!container) {
|
|
24693
|
-
throw new Error(withUsage$
|
|
25730
|
+
throw new Error(withUsage$X('The `container` option is required.'));
|
|
24694
25731
|
}
|
|
24695
25732
|
var containerNode = getContainerNode(container);
|
|
24696
25733
|
var cssClasses = {
|
|
24697
|
-
root: cx(suit$
|
|
24698
|
-
select: cx(suit$
|
|
25734
|
+
root: cx(suit$r(), userCssClasses.root),
|
|
25735
|
+
select: cx(suit$r({
|
|
24699
25736
|
descendantName: 'select'
|
|
24700
25737
|
}), userCssClasses.select),
|
|
24701
|
-
option: cx(suit$
|
|
25738
|
+
option: cx(suit$r({
|
|
24702
25739
|
descendantName: 'option'
|
|
24703
25740
|
}), userCssClasses.option)
|
|
24704
25741
|
};
|
|
@@ -24718,13 +25755,13 @@
|
|
|
24718
25755
|
});
|
|
24719
25756
|
};
|
|
24720
25757
|
|
|
24721
|
-
var _excluded$
|
|
25758
|
+
var _excluded$y = ["nbHits", "nbSortedHits", "cssClasses", "templateProps"];
|
|
24722
25759
|
var Stats = function Stats(_ref) {
|
|
24723
25760
|
var nbHits = _ref.nbHits,
|
|
24724
25761
|
nbSortedHits = _ref.nbSortedHits,
|
|
24725
25762
|
cssClasses = _ref.cssClasses,
|
|
24726
25763
|
templateProps = _ref.templateProps,
|
|
24727
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
25764
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
24728
25765
|
return h("div", {
|
|
24729
25766
|
className: cx(cssClasses.root)
|
|
24730
25767
|
}, h(Template, _extends({}, templateProps, {
|
|
@@ -24747,10 +25784,10 @@
|
|
|
24747
25784
|
})));
|
|
24748
25785
|
};
|
|
24749
25786
|
|
|
24750
|
-
var withUsage$
|
|
25787
|
+
var withUsage$Y = createDocumentationMessageGenerator({
|
|
24751
25788
|
name: 'stats'
|
|
24752
25789
|
});
|
|
24753
|
-
var suit$
|
|
25790
|
+
var suit$s = component('Stats');
|
|
24754
25791
|
var defaultTemplates$g = {
|
|
24755
25792
|
text: function text(props) {
|
|
24756
25793
|
return "".concat(props.areHitsSorted ? getSortedResultsSentence(props) : getResultsSentence(props), " found in ").concat(props.processingTimeMS, "ms");
|
|
@@ -24842,12 +25879,12 @@
|
|
|
24842
25879
|
_ref5$templates = _ref5.templates,
|
|
24843
25880
|
templates = _ref5$templates === void 0 ? {} : _ref5$templates;
|
|
24844
25881
|
if (!container) {
|
|
24845
|
-
throw new Error(withUsage$
|
|
25882
|
+
throw new Error(withUsage$Y('The `container` option is required.'));
|
|
24846
25883
|
}
|
|
24847
25884
|
var containerNode = getContainerNode(container);
|
|
24848
25885
|
var cssClasses = {
|
|
24849
|
-
root: cx(suit$
|
|
24850
|
-
text: cx(suit$
|
|
25886
|
+
root: cx(suit$s(), userCssClasses.root),
|
|
25887
|
+
text: cx(suit$s({
|
|
24851
25888
|
descendantName: 'text'
|
|
24852
25889
|
}), userCssClasses.text)
|
|
24853
25890
|
};
|
|
@@ -24900,10 +25937,10 @@
|
|
|
24900
25937
|
}
|
|
24901
25938
|
};
|
|
24902
25939
|
|
|
24903
|
-
var withUsage$
|
|
25940
|
+
var withUsage$Z = createDocumentationMessageGenerator({
|
|
24904
25941
|
name: 'toggle-refinement'
|
|
24905
25942
|
});
|
|
24906
|
-
var suit$
|
|
25943
|
+
var suit$t = component('ToggleRefinement');
|
|
24907
25944
|
var renderer$o = function renderer(_ref) {
|
|
24908
25945
|
var containerNode = _ref.containerNode,
|
|
24909
25946
|
cssClasses = _ref.cssClasses,
|
|
@@ -24953,18 +25990,18 @@
|
|
|
24953
25990
|
on = _ref3$on === void 0 ? true : _ref3$on,
|
|
24954
25991
|
off = _ref3.off;
|
|
24955
25992
|
if (!container) {
|
|
24956
|
-
throw new Error(withUsage$
|
|
25993
|
+
throw new Error(withUsage$Z('The `container` option is required.'));
|
|
24957
25994
|
}
|
|
24958
25995
|
var containerNode = getContainerNode(container);
|
|
24959
25996
|
var cssClasses = {
|
|
24960
|
-
root: cx(suit$
|
|
24961
|
-
label: cx(suit$
|
|
25997
|
+
root: cx(suit$t(), userCssClasses.root),
|
|
25998
|
+
label: cx(suit$t({
|
|
24962
25999
|
descendantName: 'label'
|
|
24963
26000
|
}), userCssClasses.label),
|
|
24964
|
-
checkbox: cx(suit$
|
|
26001
|
+
checkbox: cx(suit$t({
|
|
24965
26002
|
descendantName: 'checkbox'
|
|
24966
26003
|
}), userCssClasses.checkbox),
|
|
24967
|
-
labelText: cx(suit$
|
|
26004
|
+
labelText: cx(suit$t({
|
|
24968
26005
|
descendantName: 'labelText'
|
|
24969
26006
|
}), userCssClasses.labelText)
|
|
24970
26007
|
};
|
|
@@ -24986,15 +26023,15 @@
|
|
|
24986
26023
|
});
|
|
24987
26024
|
};
|
|
24988
26025
|
|
|
24989
|
-
var _excluded$
|
|
24990
|
-
var withUsage$
|
|
26026
|
+
var _excluded$z = ["item", "sendEvent"];
|
|
26027
|
+
var withUsage$_ = createDocumentationMessageGenerator({
|
|
24991
26028
|
name: 'trending-items'
|
|
24992
26029
|
});
|
|
24993
26030
|
var TrendingItems = createTrendingItemsComponent({
|
|
24994
26031
|
createElement: h,
|
|
24995
26032
|
Fragment: p
|
|
24996
26033
|
});
|
|
24997
|
-
function createRenderer$
|
|
26034
|
+
function createRenderer$2(_ref) {
|
|
24998
26035
|
var renderState = _ref.renderState,
|
|
24999
26036
|
cssClasses = _ref.cssClasses,
|
|
25000
26037
|
containerNode = _ref.containerNode,
|
|
@@ -25025,7 +26062,7 @@
|
|
|
25025
26062
|
var itemComponent = templates.item ? function (_ref3) {
|
|
25026
26063
|
var item = _ref3.item,
|
|
25027
26064
|
_sendEvent = _ref3.sendEvent,
|
|
25028
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
26065
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$z);
|
|
25029
26066
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
25030
26067
|
templateKey: "item",
|
|
25031
26068
|
rootTagName: "fragment",
|
|
@@ -25095,10 +26132,10 @@
|
|
|
25095
26132
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
25096
26133
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
25097
26134
|
if (!container) {
|
|
25098
|
-
throw new Error(withUsage$
|
|
26135
|
+
throw new Error(withUsage$_('The `container` option is required.'));
|
|
25099
26136
|
}
|
|
25100
26137
|
var containerNode = getContainerNode(container);
|
|
25101
|
-
var specializedRenderer = createRenderer$
|
|
26138
|
+
var specializedRenderer = createRenderer$2({
|
|
25102
26139
|
containerNode: containerNode,
|
|
25103
26140
|
cssClasses: cssClasses,
|
|
25104
26141
|
renderState: {},
|
|
@@ -25257,10 +26294,10 @@
|
|
|
25257
26294
|
}
|
|
25258
26295
|
};
|
|
25259
26296
|
|
|
25260
|
-
var withUsage
|
|
26297
|
+
var withUsage$$ = createDocumentationMessageGenerator({
|
|
25261
26298
|
name: 'voice-search'
|
|
25262
26299
|
});
|
|
25263
|
-
var suit$
|
|
26300
|
+
var suit$u = component('VoiceSearch');
|
|
25264
26301
|
var renderer$p = function renderer(_ref) {
|
|
25265
26302
|
var containerNode = _ref.containerNode,
|
|
25266
26303
|
cssClasses = _ref.cssClasses,
|
|
@@ -25293,15 +26330,15 @@
|
|
|
25293
26330
|
additionalQueryParameters = _ref3.additionalQueryParameters,
|
|
25294
26331
|
createVoiceSearchHelper = _ref3.createVoiceSearchHelper;
|
|
25295
26332
|
if (!container) {
|
|
25296
|
-
throw new Error(withUsage
|
|
26333
|
+
throw new Error(withUsage$$('The `container` option is required.'));
|
|
25297
26334
|
}
|
|
25298
26335
|
var containerNode = getContainerNode(container);
|
|
25299
26336
|
var cssClasses = {
|
|
25300
|
-
root: cx(suit$
|
|
25301
|
-
button: cx(suit$
|
|
26337
|
+
root: cx(suit$u(), userCssClasses.root),
|
|
26338
|
+
button: cx(suit$u({
|
|
25302
26339
|
descendantName: 'button'
|
|
25303
26340
|
}), userCssClasses.button),
|
|
25304
|
-
status: cx(suit$
|
|
26341
|
+
status: cx(suit$u({
|
|
25305
26342
|
descendantName: 'status'
|
|
25306
26343
|
}), userCssClasses.status)
|
|
25307
26344
|
};
|
|
@@ -25327,8 +26364,8 @@
|
|
|
25327
26364
|
});
|
|
25328
26365
|
};
|
|
25329
26366
|
|
|
25330
|
-
var _excluded$
|
|
25331
|
-
var withUsage
|
|
26367
|
+
var _excluded$A = ["item", "sendEvent"];
|
|
26368
|
+
var withUsage$10 = createDocumentationMessageGenerator({
|
|
25332
26369
|
name: 'frequently-bought-together'
|
|
25333
26370
|
});
|
|
25334
26371
|
var FrequentlyBoughtTogether = createFrequentlyBoughtTogetherComponent({
|
|
@@ -25366,7 +26403,7 @@
|
|
|
25366
26403
|
var itemComponent = templates.item ? function (_ref3) {
|
|
25367
26404
|
var item = _ref3.item,
|
|
25368
26405
|
_sendEvent = _ref3.sendEvent,
|
|
25369
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
26406
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$A);
|
|
25370
26407
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
25371
26408
|
templateKey: "item",
|
|
25372
26409
|
rootTagName: "fragment",
|
|
@@ -25426,6 +26463,7 @@
|
|
|
25426
26463
|
objectIDs = _ref5.objectIDs,
|
|
25427
26464
|
limit = _ref5.limit,
|
|
25428
26465
|
queryParameters = _ref5.queryParameters,
|
|
26466
|
+
fallbackParameters = _ref5.fallbackParameters,
|
|
25429
26467
|
threshold = _ref5.threshold,
|
|
25430
26468
|
escapeHTML = _ref5.escapeHTML,
|
|
25431
26469
|
transformItems = _ref5.transformItems,
|
|
@@ -25434,7 +26472,7 @@
|
|
|
25434
26472
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
25435
26473
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
25436
26474
|
if (!container) {
|
|
25437
|
-
throw new Error(withUsage
|
|
26475
|
+
throw new Error(withUsage$10('The `container` option is required.'));
|
|
25438
26476
|
}
|
|
25439
26477
|
var containerNode = getContainerNode(container);
|
|
25440
26478
|
var specializedRenderer = renderer$q({
|
|
@@ -25450,6 +26488,7 @@
|
|
|
25450
26488
|
objectIDs: objectIDs,
|
|
25451
26489
|
limit: limit,
|
|
25452
26490
|
queryParameters: queryParameters,
|
|
26491
|
+
fallbackParameters: fallbackParameters,
|
|
25453
26492
|
threshold: threshold,
|
|
25454
26493
|
escapeHTML: escapeHTML,
|
|
25455
26494
|
transformItems: transformItems
|
|
@@ -25458,15 +26497,15 @@
|
|
|
25458
26497
|
});
|
|
25459
26498
|
});
|
|
25460
26499
|
|
|
25461
|
-
var _excluded$
|
|
25462
|
-
var withUsage$
|
|
26500
|
+
var _excluded$B = ["item", "sendEvent"];
|
|
26501
|
+
var withUsage$11 = createDocumentationMessageGenerator({
|
|
25463
26502
|
name: 'looking-similar'
|
|
25464
26503
|
});
|
|
25465
26504
|
var LookingSimilar = createLookingSimilarComponent({
|
|
25466
26505
|
createElement: h,
|
|
25467
26506
|
Fragment: p
|
|
25468
26507
|
});
|
|
25469
|
-
function createRenderer$
|
|
26508
|
+
function createRenderer$3(_ref) {
|
|
25470
26509
|
var renderState = _ref.renderState,
|
|
25471
26510
|
cssClasses = _ref.cssClasses,
|
|
25472
26511
|
containerNode = _ref.containerNode,
|
|
@@ -25497,7 +26536,7 @@
|
|
|
25497
26536
|
var itemComponent = templates.item ? function (_ref3) {
|
|
25498
26537
|
var item = _ref3.item,
|
|
25499
26538
|
_sendEvent = _ref3.sendEvent,
|
|
25500
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
26539
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$B);
|
|
25501
26540
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
25502
26541
|
templateKey: "item",
|
|
25503
26542
|
rootTagName: "fragment",
|
|
@@ -25566,10 +26605,10 @@
|
|
|
25566
26605
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
25567
26606
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
25568
26607
|
if (!container) {
|
|
25569
|
-
throw new Error(withUsage$
|
|
26608
|
+
throw new Error(withUsage$11('The `container` option is required.'));
|
|
25570
26609
|
}
|
|
25571
26610
|
var containerNode = getContainerNode(container);
|
|
25572
|
-
var specializedRenderer = createRenderer$
|
|
26611
|
+
var specializedRenderer = createRenderer$3({
|
|
25573
26612
|
containerNode: containerNode,
|
|
25574
26613
|
cssClasses: cssClasses,
|
|
25575
26614
|
renderState: {},
|
|
@@ -25611,6 +26650,7 @@
|
|
|
25611
26650
|
dynamicWidgets: dynamicWidgets,
|
|
25612
26651
|
chat: chat,
|
|
25613
26652
|
analytics: analytics,
|
|
26653
|
+
EXPERIMENTAL_autocomplete: EXPERIMENTAL_autocomplete,
|
|
25614
26654
|
breadcrumb: breadcrumb,
|
|
25615
26655
|
clearRefinements: clearRefinements$1,
|
|
25616
26656
|
configure: configure,
|