instantsearch.js 4.80.0 → 4.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Answers/Answers.js +4 -4
- package/cjs/components/Breadcrumb/Breadcrumb.js +2 -2
- package/cjs/components/ClearRefinements/ClearRefinements.js +2 -2
- package/cjs/components/GeoSearchControls/GeoSearchControls.js +2 -2
- package/cjs/components/Highlight/Highlight.js +3 -3
- package/cjs/components/InfiniteHits/InfiniteHits.js +4 -4
- package/cjs/components/MenuSelect/MenuSelect.js +2 -2
- package/cjs/components/Pagination/Pagination.js +1 -1
- package/cjs/components/Panel/Panel.js +5 -5
- package/cjs/components/QueryRuleCustomData/QueryRuleCustomData.js +1 -1
- package/cjs/components/RangeInput/RangeInput.js +14 -14
- package/cjs/components/RefinementList/RefinementList.js +16 -16
- package/cjs/components/RefinementList/RefinementListItem.js +2 -2
- package/cjs/components/RelevantSort/RelevantSort.js +1 -1
- package/cjs/components/ReverseHighlight/ReverseHighlight.js +3 -3
- package/cjs/components/ReverseSnippet/ReverseSnippet.js +3 -3
- package/cjs/components/SearchBox/SearchBox.js +31 -19
- package/cjs/components/Slider/Pit.js +2 -2
- package/cjs/components/Slider/Rheostat.js +13 -13
- package/cjs/components/Slider/Slider.js +19 -19
- package/cjs/components/Snippet/Snippet.js +3 -3
- package/cjs/components/Stats/Stats.js +6 -6
- package/cjs/components/Template/Template.js +18 -18
- package/cjs/components/ToggleRefinement/ToggleRefinement.js +2 -2
- package/cjs/components/VoiceSearch/VoiceSearch.js +1 -1
- package/cjs/connectors/answers/connectAnswers.js +2 -2
- package/cjs/connectors/autocomplete/connectAutocomplete.js +2 -2
- package/cjs/connectors/breadcrumb/connectBreadcrumb.js +6 -6
- package/cjs/connectors/chat/connectChat.js +221 -0
- 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 +8 -1
- package/cjs/connectors/index.umd.js +239 -0
- 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 +4 -5
- package/cjs/lib/InstantSearch.js +13 -13
- package/cjs/lib/chat/chat.js +177 -0
- package/cjs/lib/chat/index.js +27 -0
- 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/useStickToBottom.js +20 -0
- 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 +34 -7
- package/cjs/widgets/analytics/analytics.js +2 -2
- package/cjs/widgets/answers/answers.js +3 -3
- package/cjs/widgets/autocomplete/autocomplete.js +281 -0
- package/cjs/widgets/breadcrumb/breadcrumb.js +3 -3
- package/cjs/widgets/chat/chat.js +612 -0
- 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 +18 -11
- package/cjs/widgets/index.js +17 -2
- package/cjs/widgets/index.umd.js +275 -0
- 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 +165 -14
- package/dist/instantsearch.development.js +1456 -680
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +165 -14
- package/dist/instantsearch.production.min.d.ts +165 -14
- 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 +433 -0
- package/es/connectors/chat/connectChat.js +215 -0
- 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 +6 -0
- package/es/connectors/frequently-bought-together/connectFrequentlyBoughtTogether.js +6 -3
- package/es/connectors/geo-search/connectGeoSearch.d.ts +1 -0
- package/es/connectors/geo-search/connectGeoSearch.js +2 -2
- package/es/connectors/hierarchical-menu/connectHierarchicalMenu.js +28 -16
- package/es/connectors/hits/connectHits.d.ts +1 -0
- package/es/connectors/hits/connectHits.js +2 -2
- package/es/connectors/hits/connectHitsWithInsights.d.ts +1 -0
- package/es/connectors/hits-per-page/connectHitsPerPage.js +7 -7
- package/es/connectors/index.d.ts +1 -0
- package/es/connectors/index.js +2 -1
- package/es/connectors/index.umd.d.ts +39 -0
- package/es/connectors/index.umd.js +47 -0
- package/es/connectors/infinite-hits/connectInfiniteHits.d.ts +1 -0
- package/es/connectors/infinite-hits/connectInfiniteHits.js +11 -11
- package/es/connectors/infinite-hits/connectInfiniteHitsWithInsights.d.ts +1 -0
- package/es/connectors/looking-similar/connectLookingSimilar.d.ts +2 -0
- 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.d.ts +2 -0
- 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.d.ts +2 -0
- 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.d.ts +40 -0
- package/es/lib/chat/chat.js +166 -0
- package/es/lib/chat/index.d.ts +7 -0
- package/es/lib/chat/index.js +5 -0
- 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/useStickToBottom.d.ts +1 -0
- package/es/lib/useStickToBottom.js +14 -0
- 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.d.ts +10 -3
- package/es/templates/carousel/carousel.js +35 -8
- package/es/types/render-state.d.ts +2 -1
- package/es/types/templates.d.ts +1 -1
- package/es/types/widget.d.ts +10 -3
- package/es/widgets/analytics/analytics.js +2 -2
- package/es/widgets/answers/answers.js +2 -2
- package/es/widgets/autocomplete/autocomplete.d.ts +57 -0
- package/es/widgets/autocomplete/autocomplete.js +274 -0
- package/es/widgets/breadcrumb/breadcrumb.js +2 -2
- package/es/widgets/chat/chat.d.ts +559 -0
- package/es/widgets/chat/chat.js +594 -0
- 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.d.ts +3 -1
- 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.d.ts +1 -0
- 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.d.ts +1 -0
- 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 +17 -10
- package/es/widgets/index.d.ts +2 -0
- package/es/widgets/index.js +3 -1
- package/es/widgets/index.umd.d.ts +45 -0
- package/es/widgets/index.umd.js +52 -0
- package/es/widgets/infinite-hits/infinite-hits.d.ts +1 -0
- package/es/widgets/infinite-hits/infinite-hits.js +2 -2
- package/es/widgets/looking-similar/looking-similar.d.ts +3 -1
- 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.d.ts +3 -1
- 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.d.ts +3 -1
- package/es/widgets/trending-items/trending-items.js +5 -5
- package/es/widgets/voice-search/voice-search.js +2 -2
- package/package.json +11 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! InstantSearch.js 4.
|
|
1
|
+
/*! InstantSearch.js 4.82.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -17,6 +17,140 @@
|
|
|
17
17
|
return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
function _arrayLikeToArray(r, a) {
|
|
21
|
+
(null == a || a > r.length) && (a = r.length);
|
|
22
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
23
|
+
return n;
|
|
24
|
+
}
|
|
25
|
+
function _arrayWithHoles(r) {
|
|
26
|
+
if (Array.isArray(r)) return r;
|
|
27
|
+
}
|
|
28
|
+
function _arrayWithoutHoles(r) {
|
|
29
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
30
|
+
}
|
|
31
|
+
function _assertThisInitialized(e) {
|
|
32
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
33
|
+
return e;
|
|
34
|
+
}
|
|
35
|
+
function _classCallCheck(a, n) {
|
|
36
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
37
|
+
}
|
|
38
|
+
function _defineProperties(e, r) {
|
|
39
|
+
for (var t = 0; t < r.length; t++) {
|
|
40
|
+
var o = r[t];
|
|
41
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function _createClass(e, r, t) {
|
|
45
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
46
|
+
writable: !1
|
|
47
|
+
}), e;
|
|
48
|
+
}
|
|
49
|
+
function _createForOfIteratorHelper(r, e) {
|
|
50
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
51
|
+
if (!t) {
|
|
52
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
53
|
+
t && (r = t);
|
|
54
|
+
var n = 0,
|
|
55
|
+
F = function () {};
|
|
56
|
+
return {
|
|
57
|
+
s: F,
|
|
58
|
+
n: function () {
|
|
59
|
+
return n >= r.length ? {
|
|
60
|
+
done: !0
|
|
61
|
+
} : {
|
|
62
|
+
done: !1,
|
|
63
|
+
value: r[n++]
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
e: function (r) {
|
|
67
|
+
throw r;
|
|
68
|
+
},
|
|
69
|
+
f: F
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
73
|
+
}
|
|
74
|
+
var o,
|
|
75
|
+
a = !0,
|
|
76
|
+
u = !1;
|
|
77
|
+
return {
|
|
78
|
+
s: function () {
|
|
79
|
+
t = t.call(r);
|
|
80
|
+
},
|
|
81
|
+
n: function () {
|
|
82
|
+
var r = t.next();
|
|
83
|
+
return a = r.done, r;
|
|
84
|
+
},
|
|
85
|
+
e: function (r) {
|
|
86
|
+
u = !0, o = r;
|
|
87
|
+
},
|
|
88
|
+
f: function () {
|
|
89
|
+
try {
|
|
90
|
+
a || null == t.return || t.return();
|
|
91
|
+
} finally {
|
|
92
|
+
if (u) throw o;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function _createSuper(t) {
|
|
98
|
+
var r = _isNativeReflectConstruct();
|
|
99
|
+
return function () {
|
|
100
|
+
var e,
|
|
101
|
+
o = _getPrototypeOf(t);
|
|
102
|
+
if (r) {
|
|
103
|
+
var s = _getPrototypeOf(this).constructor;
|
|
104
|
+
e = Reflect.construct(o, arguments, s);
|
|
105
|
+
} else e = o.apply(this, arguments);
|
|
106
|
+
return _possibleConstructorReturn(this, e);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function _defineProperty(e, r, t) {
|
|
110
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
111
|
+
value: t,
|
|
112
|
+
enumerable: !0,
|
|
113
|
+
configurable: !0,
|
|
114
|
+
writable: !0
|
|
115
|
+
}) : e[r] = t, e;
|
|
116
|
+
}
|
|
117
|
+
function _extends() {
|
|
118
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
119
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
120
|
+
var t = arguments[e];
|
|
121
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
122
|
+
}
|
|
123
|
+
return n;
|
|
124
|
+
}, _extends.apply(null, arguments);
|
|
125
|
+
}
|
|
126
|
+
function _getPrototypeOf(t) {
|
|
127
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
128
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
129
|
+
}, _getPrototypeOf(t);
|
|
130
|
+
}
|
|
131
|
+
function _inherits(t, e) {
|
|
132
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
133
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
134
|
+
constructor: {
|
|
135
|
+
value: t,
|
|
136
|
+
writable: !0,
|
|
137
|
+
configurable: !0
|
|
138
|
+
}
|
|
139
|
+
}), Object.defineProperty(t, "prototype", {
|
|
140
|
+
writable: !1
|
|
141
|
+
}), e && _setPrototypeOf(t, e);
|
|
142
|
+
}
|
|
143
|
+
function _isNativeReflectConstruct() {
|
|
144
|
+
try {
|
|
145
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
146
|
+
} catch (t) {}
|
|
147
|
+
return (_isNativeReflectConstruct = function () {
|
|
148
|
+
return !!t;
|
|
149
|
+
})();
|
|
150
|
+
}
|
|
151
|
+
function _iterableToArray(r) {
|
|
152
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
153
|
+
}
|
|
20
154
|
function _iterableToArrayLimit(r, l) {
|
|
21
155
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
22
156
|
if (null != t) {
|
|
@@ -44,6 +178,15 @@
|
|
|
44
178
|
return a;
|
|
45
179
|
}
|
|
46
180
|
}
|
|
181
|
+
function _nonIterableRest() {
|
|
182
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
183
|
+
}
|
|
184
|
+
function _nonIterableSpread() {
|
|
185
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
186
|
+
}
|
|
187
|
+
function _objectDestructuringEmpty(t) {
|
|
188
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
189
|
+
}
|
|
47
190
|
function ownKeys(e, r) {
|
|
48
191
|
var t = Object.keys(e);
|
|
49
192
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -65,6 +208,42 @@
|
|
|
65
208
|
}
|
|
66
209
|
return e;
|
|
67
210
|
}
|
|
211
|
+
function _objectWithoutProperties(e, t) {
|
|
212
|
+
if (null == e) return {};
|
|
213
|
+
var o,
|
|
214
|
+
r,
|
|
215
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
216
|
+
if (Object.getOwnPropertySymbols) {
|
|
217
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
218
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
219
|
+
}
|
|
220
|
+
return i;
|
|
221
|
+
}
|
|
222
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
223
|
+
if (null == r) return {};
|
|
224
|
+
var t = {};
|
|
225
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
226
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
227
|
+
t[n] = r[n];
|
|
228
|
+
}
|
|
229
|
+
return t;
|
|
230
|
+
}
|
|
231
|
+
function _possibleConstructorReturn(t, e) {
|
|
232
|
+
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
233
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
234
|
+
return _assertThisInitialized(t);
|
|
235
|
+
}
|
|
236
|
+
function _setPrototypeOf(t, e) {
|
|
237
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
238
|
+
return t.__proto__ = e, t;
|
|
239
|
+
}, _setPrototypeOf(t, e);
|
|
240
|
+
}
|
|
241
|
+
function _slicedToArray(r, e) {
|
|
242
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
243
|
+
}
|
|
244
|
+
function _toConsumableArray(r) {
|
|
245
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
246
|
+
}
|
|
68
247
|
function _toPrimitive(t, r) {
|
|
69
248
|
if ("object" != typeof t || !t) return t;
|
|
70
249
|
var e = t[Symbol.toPrimitive];
|
|
@@ -77,7 +256,7 @@
|
|
|
77
256
|
}
|
|
78
257
|
function _toPropertyKey(t) {
|
|
79
258
|
var i = _toPrimitive(t, "string");
|
|
80
|
-
return "symbol" == typeof i ? i :
|
|
259
|
+
return "symbol" == typeof i ? i : i + "";
|
|
81
260
|
}
|
|
82
261
|
function _typeof(o) {
|
|
83
262
|
"@babel/helpers - typeof";
|
|
@@ -88,238 +267,12 @@
|
|
|
88
267
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
89
268
|
}, _typeof(o);
|
|
90
269
|
}
|
|
91
|
-
function
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
function _defineProperties(target, props) {
|
|
97
|
-
for (var i = 0; i < props.length; i++) {
|
|
98
|
-
var descriptor = props[i];
|
|
99
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
100
|
-
descriptor.configurable = true;
|
|
101
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
102
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
106
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
107
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
108
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
109
|
-
writable: false
|
|
110
|
-
});
|
|
111
|
-
return Constructor;
|
|
112
|
-
}
|
|
113
|
-
function _defineProperty(obj, key, value) {
|
|
114
|
-
key = _toPropertyKey(key);
|
|
115
|
-
if (key in obj) {
|
|
116
|
-
Object.defineProperty(obj, key, {
|
|
117
|
-
value: value,
|
|
118
|
-
enumerable: true,
|
|
119
|
-
configurable: true,
|
|
120
|
-
writable: true
|
|
121
|
-
});
|
|
122
|
-
} else {
|
|
123
|
-
obj[key] = value;
|
|
124
|
-
}
|
|
125
|
-
return obj;
|
|
126
|
-
}
|
|
127
|
-
function _extends() {
|
|
128
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
129
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
130
|
-
var source = arguments[i];
|
|
131
|
-
for (var key in source) {
|
|
132
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
133
|
-
target[key] = source[key];
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return target;
|
|
138
|
-
};
|
|
139
|
-
return _extends.apply(this, arguments);
|
|
140
|
-
}
|
|
141
|
-
function _inherits(subClass, superClass) {
|
|
142
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
143
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
144
|
-
}
|
|
145
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
146
|
-
constructor: {
|
|
147
|
-
value: subClass,
|
|
148
|
-
writable: true,
|
|
149
|
-
configurable: true
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
Object.defineProperty(subClass, "prototype", {
|
|
153
|
-
writable: false
|
|
154
|
-
});
|
|
155
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
156
|
-
}
|
|
157
|
-
function _getPrototypeOf(o) {
|
|
158
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
159
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
160
|
-
};
|
|
161
|
-
return _getPrototypeOf(o);
|
|
162
|
-
}
|
|
163
|
-
function _setPrototypeOf(o, p) {
|
|
164
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
165
|
-
o.__proto__ = p;
|
|
166
|
-
return o;
|
|
167
|
-
};
|
|
168
|
-
return _setPrototypeOf(o, p);
|
|
169
|
-
}
|
|
170
|
-
function _isNativeReflectConstruct() {
|
|
171
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
172
|
-
if (Reflect.construct.sham) return false;
|
|
173
|
-
if (typeof Proxy === "function") return true;
|
|
174
|
-
try {
|
|
175
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
176
|
-
return true;
|
|
177
|
-
} catch (e) {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
function _objectDestructuringEmpty(obj) {
|
|
182
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
183
|
-
}
|
|
184
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
185
|
-
if (source == null) return {};
|
|
186
|
-
var target = {};
|
|
187
|
-
var sourceKeys = Object.keys(source);
|
|
188
|
-
var key, i;
|
|
189
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
190
|
-
key = sourceKeys[i];
|
|
191
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
192
|
-
target[key] = source[key];
|
|
193
|
-
}
|
|
194
|
-
return target;
|
|
195
|
-
}
|
|
196
|
-
function _objectWithoutProperties(source, excluded) {
|
|
197
|
-
if (source == null) return {};
|
|
198
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
199
|
-
var key, i;
|
|
200
|
-
if (Object.getOwnPropertySymbols) {
|
|
201
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
202
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
203
|
-
key = sourceSymbolKeys[i];
|
|
204
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
205
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
206
|
-
target[key] = source[key];
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
return target;
|
|
210
|
-
}
|
|
211
|
-
function _assertThisInitialized(self) {
|
|
212
|
-
if (self === void 0) {
|
|
213
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
214
|
-
}
|
|
215
|
-
return self;
|
|
216
|
-
}
|
|
217
|
-
function _possibleConstructorReturn(self, call) {
|
|
218
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
219
|
-
return call;
|
|
220
|
-
} else if (call !== void 0) {
|
|
221
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
222
|
-
}
|
|
223
|
-
return _assertThisInitialized(self);
|
|
224
|
-
}
|
|
225
|
-
function _createSuper(Derived) {
|
|
226
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
227
|
-
return function _createSuperInternal() {
|
|
228
|
-
var Super = _getPrototypeOf(Derived),
|
|
229
|
-
result;
|
|
230
|
-
if (hasNativeReflectConstruct) {
|
|
231
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
232
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
233
|
-
} else {
|
|
234
|
-
result = Super.apply(this, arguments);
|
|
235
|
-
}
|
|
236
|
-
return _possibleConstructorReturn(this, result);
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
function _slicedToArray(arr, i) {
|
|
240
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
241
|
-
}
|
|
242
|
-
function _toConsumableArray(arr) {
|
|
243
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
244
|
-
}
|
|
245
|
-
function _arrayWithoutHoles(arr) {
|
|
246
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
247
|
-
}
|
|
248
|
-
function _arrayWithHoles(arr) {
|
|
249
|
-
if (Array.isArray(arr)) return arr;
|
|
250
|
-
}
|
|
251
|
-
function _iterableToArray(iter) {
|
|
252
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
253
|
-
}
|
|
254
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
255
|
-
if (!o) return;
|
|
256
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
257
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
258
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
259
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
260
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
261
|
-
}
|
|
262
|
-
function _arrayLikeToArray(arr, len) {
|
|
263
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
264
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
265
|
-
return arr2;
|
|
266
|
-
}
|
|
267
|
-
function _nonIterableSpread() {
|
|
268
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
269
|
-
}
|
|
270
|
-
function _nonIterableRest() {
|
|
271
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
272
|
-
}
|
|
273
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
274
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
275
|
-
if (!it) {
|
|
276
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
277
|
-
if (it) o = it;
|
|
278
|
-
var i = 0;
|
|
279
|
-
var F = function () {};
|
|
280
|
-
return {
|
|
281
|
-
s: F,
|
|
282
|
-
n: function () {
|
|
283
|
-
if (i >= o.length) return {
|
|
284
|
-
done: true
|
|
285
|
-
};
|
|
286
|
-
return {
|
|
287
|
-
done: false,
|
|
288
|
-
value: o[i++]
|
|
289
|
-
};
|
|
290
|
-
},
|
|
291
|
-
e: function (e) {
|
|
292
|
-
throw e;
|
|
293
|
-
},
|
|
294
|
-
f: F
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
270
|
+
function _unsupportedIterableToArray(r, a) {
|
|
271
|
+
if (r) {
|
|
272
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
273
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
274
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
298
275
|
}
|
|
299
|
-
var normalCompletion = true,
|
|
300
|
-
didErr = false,
|
|
301
|
-
err;
|
|
302
|
-
return {
|
|
303
|
-
s: function () {
|
|
304
|
-
it = it.call(o);
|
|
305
|
-
},
|
|
306
|
-
n: function () {
|
|
307
|
-
var step = it.next();
|
|
308
|
-
normalCompletion = step.done;
|
|
309
|
-
return step;
|
|
310
|
-
},
|
|
311
|
-
e: function (e) {
|
|
312
|
-
didErr = true;
|
|
313
|
-
err = e;
|
|
314
|
-
},
|
|
315
|
-
f: function () {
|
|
316
|
-
try {
|
|
317
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
318
|
-
} finally {
|
|
319
|
-
if (didErr) throw err;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
276
|
}
|
|
324
277
|
|
|
325
278
|
function noop() {}
|
|
@@ -495,14 +448,14 @@
|
|
|
495
448
|
var connectorName = connectors[0];
|
|
496
449
|
return "const virtual".concat(capitalizedWidget, " = ").concat(connectorName, "(() => null);");
|
|
497
450
|
}).join('\n'), "\n\nsearch.addWidgets([\n ").concat(missingWidgets.filter(function (_ref9) {
|
|
498
|
-
var
|
|
499
|
-
_stateParameter =
|
|
500
|
-
connectors =
|
|
451
|
+
var _ref0 = _slicedToArray(_ref9, 2),
|
|
452
|
+
_stateParameter = _ref0[0],
|
|
453
|
+
connectors = _ref0[1].connectors;
|
|
501
454
|
return connectors.length > 0;
|
|
502
|
-
}).map(function (
|
|
503
|
-
var
|
|
504
|
-
_stateParameter =
|
|
505
|
-
widgets =
|
|
455
|
+
}).map(function (_ref1) {
|
|
456
|
+
var _ref10 = _slicedToArray(_ref1, 2),
|
|
457
|
+
_stateParameter = _ref10[0],
|
|
458
|
+
widgets = _ref10[1].widgets;
|
|
506
459
|
var capitalizedWidget = capitalize(widgets[0]);
|
|
507
460
|
return "virtual".concat(capitalizedWidget, "({ /* ... */ })");
|
|
508
461
|
}).join(',\n '), "\n]);\n```\n\nIf you're using custom widgets that do set these query parameters, we recommend using connectors instead.\n\nSee https://www.algolia.com/doc/guides/building-search-ui/widgets/customize-an-existing-widget/js/#customize-the-complete-ui-of-the-widgets")) ;
|
|
@@ -9557,6 +9510,21 @@
|
|
|
9557
9510
|
return item;
|
|
9558
9511
|
});
|
|
9559
9512
|
}
|
|
9513
|
+
function _hasMoreItems(facetValues, maxValuesPerFacet) {
|
|
9514
|
+
var currentLimit = getLimit();
|
|
9515
|
+
return (
|
|
9516
|
+
// Check if we have exhaustive items at this level
|
|
9517
|
+
// If the limit is the max number of facet retrieved it is impossible to know
|
|
9518
|
+
// if the facets are exhaustive. The only moment we are sure it is exhaustive
|
|
9519
|
+
// is when it is strictly under the number requested unless we know that another
|
|
9520
|
+
// widget has requested more values (maxValuesPerFacet > getLimit()).
|
|
9521
|
+
!(maxValuesPerFacet > currentLimit ? facetValues.length <= currentLimit : facetValues.length < currentLimit) ||
|
|
9522
|
+
// Check if any of the children are not exhaustive.
|
|
9523
|
+
facetValues.slice(0, limit).some(function (item) {
|
|
9524
|
+
return Array.isArray(item.data) && item.data.length > 0 && _hasMoreItems(item.data, maxValuesPerFacet);
|
|
9525
|
+
})
|
|
9526
|
+
);
|
|
9527
|
+
}
|
|
9560
9528
|
return {
|
|
9561
9529
|
$$type: 'ais.hierarchicalMenu',
|
|
9562
9530
|
init: function init(initOptions) {
|
|
@@ -9625,14 +9593,11 @@
|
|
|
9625
9593
|
});
|
|
9626
9594
|
var facetItems = facetValues && !Array.isArray(facetValues) && facetValues.data ? facetValues.data : [];
|
|
9627
9595
|
|
|
9628
|
-
//
|
|
9629
|
-
//
|
|
9630
|
-
//
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
// to be conservative here.
|
|
9634
|
-
var hasExhaustiveItems = (state.maxValuesPerFacet || 0) > getLimit() ? facetItems.length <= getLimit() : facetItems.length < getLimit();
|
|
9635
|
-
canToggleShowMore = showMore && (isShowingMore || !hasExhaustiveItems);
|
|
9596
|
+
// Check if there are more items to show at any level
|
|
9597
|
+
// This checks both the exhaustiveness of items retrieved from the API
|
|
9598
|
+
// and whether there are hidden items at any visible child level
|
|
9599
|
+
var hasMoreItems = _hasMoreItems(facetItems, state.maxValuesPerFacet || 0);
|
|
9600
|
+
canToggleShowMore = showMore && (isShowingMore || hasMoreItems);
|
|
9636
9601
|
items = transformItems(_prepareFacetValues(facetItems), {
|
|
9637
9602
|
results: results
|
|
9638
9603
|
});
|
|
@@ -10398,8 +10363,8 @@
|
|
|
10398
10363
|
page: page + 1
|
|
10399
10364
|
});
|
|
10400
10365
|
},
|
|
10401
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
10402
|
-
var uiState =
|
|
10366
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref0) {
|
|
10367
|
+
var uiState = _ref0.uiState;
|
|
10403
10368
|
var widgetSearchParameters = searchParameters;
|
|
10404
10369
|
if (escapeHTML) {
|
|
10405
10370
|
// @MAJOR: set this globally, not in the InfiniteHits widget to allow InfiniteHits to be conditionally used
|
|
@@ -11206,18 +11171,18 @@
|
|
|
11206
11171
|
_ref8 = _slicedToArray(_ref7, 1),
|
|
11207
11172
|
minValue = _ref8[0];
|
|
11208
11173
|
var _ref9 = helper.getNumericRefinement(attribute, '<=') || [],
|
|
11209
|
-
|
|
11210
|
-
maxValue =
|
|
11174
|
+
_ref0 = _slicedToArray(_ref9, 1),
|
|
11175
|
+
maxValue = _ref0[0];
|
|
11211
11176
|
var min = isFiniteNumber(minValue) ? minValue : -Infinity;
|
|
11212
11177
|
var max = isFiniteNumber(maxValue) ? maxValue : Infinity;
|
|
11213
11178
|
return [min, max];
|
|
11214
11179
|
}
|
|
11215
11180
|
function _refine(helper, currentRange) {
|
|
11216
11181
|
return function () {
|
|
11217
|
-
var
|
|
11218
|
-
|
|
11219
|
-
nextMin =
|
|
11220
|
-
nextMax =
|
|
11182
|
+
var _ref1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [undefined, undefined],
|
|
11183
|
+
_ref10 = _slicedToArray(_ref1, 2),
|
|
11184
|
+
nextMin = _ref10[0],
|
|
11185
|
+
nextMax = _ref10[1];
|
|
11221
11186
|
var refinedState = getRefinedState(helper, currentRange, nextMin, nextMax);
|
|
11222
11187
|
if (refinedState) {
|
|
11223
11188
|
helper.setState(refinedState).search();
|
|
@@ -11241,10 +11206,10 @@
|
|
|
11241
11206
|
range: _objectSpread2(_objectSpread2({}, renderState.range), {}, _defineProperty({}, attribute, this.getWidgetRenderState(renderOptions)))
|
|
11242
11207
|
});
|
|
11243
11208
|
},
|
|
11244
|
-
getWidgetRenderState: function getWidgetRenderState(
|
|
11245
|
-
var results =
|
|
11246
|
-
helper =
|
|
11247
|
-
instantSearchInstance =
|
|
11209
|
+
getWidgetRenderState: function getWidgetRenderState(_ref11) {
|
|
11210
|
+
var results = _ref11.results,
|
|
11211
|
+
helper = _ref11.helper,
|
|
11212
|
+
instantSearchInstance = _ref11.instantSearchInstance;
|
|
11248
11213
|
var facetsFromResults = results && results.disjunctiveFacets || [];
|
|
11249
11214
|
var facet = find(facetsFromResults, function (facetResult) {
|
|
11250
11215
|
return facetResult.name === attribute;
|
|
@@ -11279,13 +11244,13 @@
|
|
|
11279
11244
|
start: start
|
|
11280
11245
|
};
|
|
11281
11246
|
},
|
|
11282
|
-
dispose: function dispose(
|
|
11283
|
-
var state =
|
|
11247
|
+
dispose: function dispose(_ref12) {
|
|
11248
|
+
var state = _ref12.state;
|
|
11284
11249
|
unmountFn();
|
|
11285
11250
|
return state.removeDisjunctiveFacet(attribute).removeNumericRefinement(attribute);
|
|
11286
11251
|
},
|
|
11287
|
-
getWidgetUiState: function getWidgetUiState(uiState,
|
|
11288
|
-
var searchParameters =
|
|
11252
|
+
getWidgetUiState: function getWidgetUiState(uiState, _ref13) {
|
|
11253
|
+
var searchParameters = _ref13.searchParameters;
|
|
11289
11254
|
var _searchParameters$get = searchParameters.getNumericRefinements(attribute),
|
|
11290
11255
|
_searchParameters$get2 = _searchParameters$get['>='],
|
|
11291
11256
|
min = _searchParameters$get2 === void 0 ? [] : _searchParameters$get2,
|
|
@@ -11298,8 +11263,8 @@
|
|
|
11298
11263
|
range: _objectSpread2(_objectSpread2({}, uiState.range), {}, _defineProperty({}, attribute, "".concat(min, ":").concat(max)))
|
|
11299
11264
|
});
|
|
11300
11265
|
},
|
|
11301
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
11302
|
-
var uiState =
|
|
11266
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref14) {
|
|
11267
|
+
var uiState = _ref14.uiState;
|
|
11303
11268
|
var widgetSearchParameters = searchParameters.addDisjunctiveFacet(attribute).setQueryParameters({
|
|
11304
11269
|
numericRefinements: _objectSpread2(_objectSpread2({}, searchParameters.numericRefinements), {}, _defineProperty({}, attribute, {}))
|
|
11305
11270
|
});
|
|
@@ -11696,7 +11661,7 @@
|
|
|
11696
11661
|
objectID: objectID,
|
|
11697
11662
|
maxRecommendations: limit,
|
|
11698
11663
|
threshold: threshold,
|
|
11699
|
-
fallbackParameters: _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
11664
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
11700
11665
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
11701
11666
|
$$id: _this.$$id
|
|
11702
11667
|
});
|
|
@@ -12485,8 +12450,8 @@
|
|
|
12485
12450
|
widgetParams: widgetParams
|
|
12486
12451
|
};
|
|
12487
12452
|
},
|
|
12488
|
-
getWidgetUiState: function getWidgetUiState(uiState,
|
|
12489
|
-
var searchParameters =
|
|
12453
|
+
getWidgetUiState: function getWidgetUiState(uiState, _ref0) {
|
|
12454
|
+
var searchParameters = _ref0.searchParameters;
|
|
12490
12455
|
var isRefined = on && on.every(function (v) {
|
|
12491
12456
|
return searchParameters.isDisjunctiveFacetRefined(attribute, v);
|
|
12492
12457
|
});
|
|
@@ -12500,8 +12465,8 @@
|
|
|
12500
12465
|
toggle: _objectSpread2(_objectSpread2({}, uiState.toggle), {}, _defineProperty({}, attribute, isRefined))
|
|
12501
12466
|
});
|
|
12502
12467
|
},
|
|
12503
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
12504
|
-
var uiState =
|
|
12468
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref1) {
|
|
12469
|
+
var uiState = _ref1.uiState;
|
|
12505
12470
|
if (searchParameters.isHierarchicalFacet(attribute) || searchParameters.isConjunctiveFacet(attribute)) {
|
|
12506
12471
|
_warning(false, "ToggleRefinement: Attribute \"".concat(attribute, "\" is already used by another widget of a different type.\nAs this is not supported, please make sure to remove this other widget or this ToggleRefinement widget will not work at all.")) ;
|
|
12507
12472
|
return searchParameters;
|
|
@@ -12621,7 +12586,7 @@
|
|
|
12621
12586
|
facetValue: facetValue,
|
|
12622
12587
|
maxRecommendations: limit,
|
|
12623
12588
|
threshold: threshold,
|
|
12624
|
-
fallbackParameters: _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
12589
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
12625
12590
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
12626
12591
|
$$id: this.$$id
|
|
12627
12592
|
});
|
|
@@ -13649,6 +13614,7 @@
|
|
|
13649
13614
|
objectIDs = _ref.objectIDs,
|
|
13650
13615
|
limit = _ref.limit,
|
|
13651
13616
|
threshold = _ref.threshold,
|
|
13617
|
+
fallbackParameters = _ref.fallbackParameters,
|
|
13652
13618
|
queryParameters = _ref.queryParameters;
|
|
13653
13619
|
if (!objectIDs || objectIDs.length === 0) {
|
|
13654
13620
|
throw new Error(withUsage$s('The `objectIDs` option is required.'));
|
|
@@ -13713,8 +13679,10 @@
|
|
|
13713
13679
|
return objectIDs.reduce(function (acc, objectID) {
|
|
13714
13680
|
return acc.addFrequentlyBoughtTogether({
|
|
13715
13681
|
objectID: objectID,
|
|
13716
|
-
threshold: threshold,
|
|
13717
13682
|
maxRecommendations: limit,
|
|
13683
|
+
threshold: threshold,
|
|
13684
|
+
// @ts-expect-error until @algolia/recommend types are updated
|
|
13685
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
13718
13686
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
13719
13687
|
$$id: _this.$$id
|
|
13720
13688
|
});
|
|
@@ -13809,7 +13777,7 @@
|
|
|
13809
13777
|
objectID: objectID,
|
|
13810
13778
|
maxRecommendations: limit,
|
|
13811
13779
|
threshold: threshold,
|
|
13812
|
-
fallbackParameters: _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
13780
|
+
fallbackParameters: fallbackParameters ? _objectSpread2(_objectSpread2({}, fallbackParameters), escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
|
|
13813
13781
|
queryParameters: _objectSpread2(_objectSpread2({}, queryParameters), escapeHTML ? TAG_PLACEHOLDER : {}),
|
|
13814
13782
|
$$id: _this.$$id
|
|
13815
13783
|
});
|
|
@@ -13827,6 +13795,9 @@
|
|
|
13827
13795
|
|
|
13828
13796
|
/** @deprecated use connectDynamicWidgets */
|
|
13829
13797
|
var EXPERIMENTAL_connectDynamicWidgets = deprecate(connectDynamicWidgets, 'use connectDynamicWidgets');
|
|
13798
|
+
var connectChat = function connectChat() {
|
|
13799
|
+
throw new Error("\"connectChat\" is not available from the UMD build.\n\nPlease use InstantSearch.js with a packaging system:\nhttps://www.algolia.com/doc/guides/building-search-ui/installation/js/#with-a-packaging-system");
|
|
13800
|
+
};
|
|
13830
13801
|
|
|
13831
13802
|
var connectors = /*#__PURE__*/Object.freeze({
|
|
13832
13803
|
__proto__: null,
|
|
@@ -13834,6 +13805,7 @@
|
|
|
13834
13805
|
EXPERIMENTAL_connectConfigureRelatedItems: EXPERIMENTAL_connectConfigureRelatedItems,
|
|
13835
13806
|
EXPERIMENTAL_connectDynamicWidgets: EXPERIMENTAL_connectDynamicWidgets,
|
|
13836
13807
|
connectDynamicWidgets: connectDynamicWidgets,
|
|
13808
|
+
connectChat: connectChat,
|
|
13837
13809
|
connectClearRefinements: connectClearRefinements,
|
|
13838
13810
|
connectCurrentRefinements: connectCurrentRefinements,
|
|
13839
13811
|
connectHierarchicalMenu: connectHierarchicalMenu,
|
|
@@ -14224,8 +14196,8 @@
|
|
|
14224
14196
|
if (Array.isArray(queueAtStart)) {
|
|
14225
14197
|
var _map3 = ['setUserToken', 'init'].map(function (key) {
|
|
14226
14198
|
var _ref7 = find(queueAtStart.slice().reverse(), function (_ref9) {
|
|
14227
|
-
var
|
|
14228
|
-
method =
|
|
14199
|
+
var _ref0 = _slicedToArray(_ref9, 1),
|
|
14200
|
+
method = _ref0[0];
|
|
14229
14201
|
return method === key;
|
|
14230
14202
|
}) || [],
|
|
14231
14203
|
_ref8 = _slicedToArray(_ref7, 2),
|
|
@@ -14345,8 +14317,8 @@
|
|
|
14345
14317
|
}
|
|
14346
14318
|
var viewedObjectIDs = new Set();
|
|
14347
14319
|
var lastQueryId;
|
|
14348
|
-
instantSearchInstance.mainHelper.derivedHelpers[0].on('result', function (
|
|
14349
|
-
var results =
|
|
14320
|
+
instantSearchInstance.mainHelper.derivedHelpers[0].on('result', function (_ref1) {
|
|
14321
|
+
var results = _ref1.results;
|
|
14350
14322
|
if (results && (!results.queryID || results.queryID !== lastQueryId)) {
|
|
14351
14323
|
lastQueryId = results.queryID;
|
|
14352
14324
|
viewedObjectIDs.clear();
|
|
@@ -15647,8 +15619,8 @@
|
|
|
15647
15619
|
windowTitle = _ref7.windowTitle,
|
|
15648
15620
|
_ref7$getLocation = _ref7.getLocation,
|
|
15649
15621
|
getLocation = _ref7$getLocation === void 0 ? function () {
|
|
15650
|
-
return safelyRunOnBrowser(function (
|
|
15651
|
-
var window =
|
|
15622
|
+
return safelyRunOnBrowser(function (_ref0) {
|
|
15623
|
+
var window = _ref0.window;
|
|
15652
15624
|
return window.location;
|
|
15653
15625
|
}, {
|
|
15654
15626
|
fallback: function fallback() {
|
|
@@ -15961,6 +15933,7 @@
|
|
|
15961
15933
|
throw new Error(withUsage$u('The widget definition expects a `render` and/or an `init` method.'));
|
|
15962
15934
|
}
|
|
15963
15935
|
flatWidgets.forEach(function (widget) {
|
|
15936
|
+
widget.parent = _this;
|
|
15964
15937
|
if (isIndexWidget(widget)) {
|
|
15965
15938
|
return;
|
|
15966
15939
|
}
|
|
@@ -16033,6 +16006,7 @@
|
|
|
16033
16006
|
return flatWidgets.indexOf(widget) === -1;
|
|
16034
16007
|
});
|
|
16035
16008
|
localWidgets.forEach(function (widget) {
|
|
16009
|
+
widget.parent = undefined;
|
|
16036
16010
|
if (isIndexWidget(widget)) {
|
|
16037
16011
|
return;
|
|
16038
16012
|
}
|
|
@@ -16312,7 +16286,9 @@
|
|
|
16312
16286
|
// This makes sure `render` is never called with `results` being `null`.
|
|
16313
16287
|
// If it's an isolated index without an index name, we render all widgets,
|
|
16314
16288
|
// as there are no results to display for the isolated index itself.
|
|
16315
|
-
var widgetsToRender = this.getResults() || (_derivedHelper2 = derivedHelper) !== null && _derivedHelper2 !== void 0 && _derivedHelper2.lastRecommendResults || isolated && !indexName ? localWidgets : localWidgets.filter(
|
|
16289
|
+
var widgetsToRender = this.getResults() || (_derivedHelper2 = derivedHelper) !== null && _derivedHelper2 !== void 0 && _derivedHelper2.lastRecommendResults || isolated && !indexName ? localWidgets : localWidgets.filter(function (widget) {
|
|
16290
|
+
return widget.shouldRender;
|
|
16291
|
+
});
|
|
16316
16292
|
widgetsToRender = widgetsToRender.filter(function (widget) {
|
|
16317
16293
|
if (!widget.shouldRender) {
|
|
16318
16294
|
return true;
|
|
@@ -16389,6 +16365,9 @@
|
|
|
16389
16365
|
initialSearchParameters: searchParameters
|
|
16390
16366
|
});
|
|
16391
16367
|
},
|
|
16368
|
+
shouldRender: function shouldRender() {
|
|
16369
|
+
return true;
|
|
16370
|
+
},
|
|
16392
16371
|
refreshUiState: function refreshUiState() {
|
|
16393
16372
|
localUiState = getLocalWidgetsUiState(localWidgets, {
|
|
16394
16373
|
searchParameters: this.getHelper().state,
|
|
@@ -16489,7 +16468,7 @@
|
|
|
16489
16468
|
};
|
|
16490
16469
|
}
|
|
16491
16470
|
|
|
16492
|
-
var version$1 = '4.
|
|
16471
|
+
var version$1 = '4.82.0';
|
|
16493
16472
|
|
|
16494
16473
|
var withUsage$v = createDocumentationMessageGenerator({
|
|
16495
16474
|
name: 'instantsearch'
|
|
@@ -17183,44 +17162,264 @@
|
|
|
17183
17162
|
|
|
17184
17163
|
var _extends$1 = unwrapExports(_extends_1);
|
|
17185
17164
|
|
|
17186
|
-
var
|
|
17187
|
-
function
|
|
17188
|
-
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17192
|
-
|
|
17193
|
-
|
|
17194
|
-
|
|
17165
|
+
var objectWithoutPropertiesLoose = createCommonjsModule(function (module) {
|
|
17166
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
17167
|
+
if (null == r) return {};
|
|
17168
|
+
var t = {};
|
|
17169
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
17170
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
17171
|
+
t[n] = r[n];
|
|
17172
|
+
}
|
|
17173
|
+
return t;
|
|
17195
17174
|
}
|
|
17196
|
-
module.exports =
|
|
17175
|
+
module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17197
17176
|
});
|
|
17198
17177
|
|
|
17199
|
-
unwrapExports(
|
|
17178
|
+
unwrapExports(objectWithoutPropertiesLoose);
|
|
17200
17179
|
|
|
17201
|
-
var
|
|
17202
|
-
|
|
17203
|
-
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
|
|
17180
|
+
var objectWithoutProperties = createCommonjsModule(function (module) {
|
|
17181
|
+
function _objectWithoutProperties(e, t) {
|
|
17182
|
+
if (null == e) return {};
|
|
17183
|
+
var o,
|
|
17184
|
+
r,
|
|
17185
|
+
i = objectWithoutPropertiesLoose(e, t);
|
|
17186
|
+
if (Object.getOwnPropertySymbols) {
|
|
17187
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
17188
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
17210
17189
|
}
|
|
17211
|
-
return
|
|
17190
|
+
return i;
|
|
17212
17191
|
}
|
|
17213
|
-
module.exports =
|
|
17192
|
+
module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17214
17193
|
});
|
|
17215
17194
|
|
|
17216
|
-
unwrapExports(
|
|
17217
|
-
|
|
17218
|
-
var toPropertyKey_1 = createCommonjsModule(function (module) {
|
|
17219
|
-
var _typeof = _typeof_1["default"];
|
|
17195
|
+
var _objectWithoutProperties$1 = unwrapExports(objectWithoutProperties);
|
|
17220
17196
|
|
|
17221
|
-
function
|
|
17222
|
-
var
|
|
17223
|
-
|
|
17197
|
+
function cx() {
|
|
17198
|
+
for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17199
|
+
classNames[_key] = arguments[_key];
|
|
17200
|
+
}
|
|
17201
|
+
return classNames.reduce(function (acc, className) {
|
|
17202
|
+
if (Array.isArray(className)) {
|
|
17203
|
+
return acc.concat(className);
|
|
17204
|
+
}
|
|
17205
|
+
return acc.concat([className]);
|
|
17206
|
+
}, []).filter(Boolean).join(' ');
|
|
17207
|
+
}
|
|
17208
|
+
|
|
17209
|
+
var _excluded$9 = ["children", "classNames"];
|
|
17210
|
+
function createAutocompleteComponent(_ref) {
|
|
17211
|
+
var createElement = _ref.createElement;
|
|
17212
|
+
return function Autocomplete(userProps) {
|
|
17213
|
+
var children = userProps.children,
|
|
17214
|
+
_userProps$classNames = userProps.classNames,
|
|
17215
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17216
|
+
props = _objectWithoutProperties$1(userProps, _excluded$9);
|
|
17217
|
+
return createElement("div", _extends$1({
|
|
17218
|
+
className: cx('ais-Autocomplete', classNames.root)
|
|
17219
|
+
}, props), children);
|
|
17220
|
+
};
|
|
17221
|
+
}
|
|
17222
|
+
|
|
17223
|
+
var _excluded$a = ["className", "onSelect"];
|
|
17224
|
+
function createAutocompleteIndexComponent(_ref) {
|
|
17225
|
+
var createElement = _ref.createElement;
|
|
17226
|
+
return function AutocompleteIndex(userProps) {
|
|
17227
|
+
var items = userProps.items,
|
|
17228
|
+
HeaderComponent = userProps.HeaderComponent,
|
|
17229
|
+
ItemComponent = userProps.ItemComponent,
|
|
17230
|
+
getItemProps = userProps.getItemProps,
|
|
17231
|
+
_userProps$classNames = userProps.classNames,
|
|
17232
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames;
|
|
17233
|
+
return createElement("div", {
|
|
17234
|
+
className: cx('ais-AutocompleteIndex', classNames.root)
|
|
17235
|
+
}, HeaderComponent && createElement("div", {
|
|
17236
|
+
className: cx('ais-AutocompleteIndexHeader', classNames.header)
|
|
17237
|
+
}, createElement(HeaderComponent, {
|
|
17238
|
+
items: items
|
|
17239
|
+
})), createElement("ol", {
|
|
17240
|
+
className: cx('ais-AutocompleteIndexList', classNames.list)
|
|
17241
|
+
}, items.map(function (item, index) {
|
|
17242
|
+
var _getItemProps = getItemProps(item, index),
|
|
17243
|
+
className = _getItemProps.className,
|
|
17244
|
+
onSelect = _getItemProps.onSelect,
|
|
17245
|
+
itemProps = _objectWithoutProperties$1(_getItemProps, _excluded$a);
|
|
17246
|
+
return createElement("li", _extends$1({
|
|
17247
|
+
key: item.objectID
|
|
17248
|
+
}, itemProps, {
|
|
17249
|
+
className: cx('ais-AutocompleteIndexItem', classNames.item, className)
|
|
17250
|
+
}), createElement(ItemComponent, {
|
|
17251
|
+
item: item,
|
|
17252
|
+
onSelect: onSelect
|
|
17253
|
+
}));
|
|
17254
|
+
})));
|
|
17255
|
+
};
|
|
17256
|
+
}
|
|
17257
|
+
|
|
17258
|
+
var _excluded$b = ["children", "classNames"];
|
|
17259
|
+
function createAutocompletePanelComponent(_ref) {
|
|
17260
|
+
var createElement = _ref.createElement;
|
|
17261
|
+
return function AutocompletePanel(userProps) {
|
|
17262
|
+
var children = userProps.children,
|
|
17263
|
+
_userProps$classNames = userProps.classNames,
|
|
17264
|
+
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17265
|
+
props = _objectWithoutProperties$1(userProps, _excluded$b);
|
|
17266
|
+
return createElement("div", _extends$1({}, props, {
|
|
17267
|
+
className: cx('ais-AutocompletePanel', classNames.root, props.className)
|
|
17268
|
+
}), createElement("div", {
|
|
17269
|
+
className: cx('ais-AutocompletePanelLayout', classNames.layout)
|
|
17270
|
+
}, children));
|
|
17271
|
+
};
|
|
17272
|
+
}
|
|
17273
|
+
|
|
17274
|
+
function AutocompleteSubmitIcon(_ref) {
|
|
17275
|
+
var createElement = _ref.createElement;
|
|
17276
|
+
return createElement("svg", {
|
|
17277
|
+
className: "ais-AutocompleteSubmitIcon",
|
|
17278
|
+
viewBox: "0 0 24 24",
|
|
17279
|
+
width: "20",
|
|
17280
|
+
height: "20",
|
|
17281
|
+
fill: "currentColor"
|
|
17282
|
+
}, createElement("path", {
|
|
17283
|
+
d: "M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"
|
|
17284
|
+
}));
|
|
17285
|
+
}
|
|
17286
|
+
function AutocompleteLoadingIcon(_ref2) {
|
|
17287
|
+
var createElement = _ref2.createElement;
|
|
17288
|
+
return createElement("svg", {
|
|
17289
|
+
className: "ais-AutocompleteLoadingIcon",
|
|
17290
|
+
viewBox: "0 0 100 100",
|
|
17291
|
+
width: "20",
|
|
17292
|
+
height: "20"
|
|
17293
|
+
}, createElement("circle", {
|
|
17294
|
+
cx: "50",
|
|
17295
|
+
cy: "50",
|
|
17296
|
+
fill: "none",
|
|
17297
|
+
r: "35",
|
|
17298
|
+
stroke: "currentColor",
|
|
17299
|
+
strokeDasharray: "164.93361431346415 56.97787143782138",
|
|
17300
|
+
strokeWidth: "6"
|
|
17301
|
+
}, createElement("animateTransform", {
|
|
17302
|
+
attributeName: "transform",
|
|
17303
|
+
type: "rotate",
|
|
17304
|
+
repeatCount: "indefinite",
|
|
17305
|
+
dur: "1s",
|
|
17306
|
+
values: "0 50 50;90 50 50;180 50 50;360 50 50",
|
|
17307
|
+
keyTimes: "0;0.40;0.65;1"
|
|
17308
|
+
})));
|
|
17309
|
+
}
|
|
17310
|
+
function AutocompleteClearIcon(_ref3) {
|
|
17311
|
+
var createElement = _ref3.createElement;
|
|
17312
|
+
return createElement("svg", {
|
|
17313
|
+
className: "ais-AutocompleteClearIcon",
|
|
17314
|
+
viewBox: "0 0 24 24",
|
|
17315
|
+
width: "18",
|
|
17316
|
+
height: "18",
|
|
17317
|
+
fill: "currentColor"
|
|
17318
|
+
}, createElement("path", {
|
|
17319
|
+
d: "M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"
|
|
17320
|
+
}));
|
|
17321
|
+
}
|
|
17322
|
+
|
|
17323
|
+
function createAutocompleteSearchComponent(_ref) {
|
|
17324
|
+
var createElement = _ref.createElement;
|
|
17325
|
+
return function AutocompleteSearch(_ref2) {
|
|
17326
|
+
var inputProps = _ref2.inputProps,
|
|
17327
|
+
onClear = _ref2.onClear,
|
|
17328
|
+
query = _ref2.query,
|
|
17329
|
+
isSearchStalled = _ref2.isSearchStalled;
|
|
17330
|
+
return createElement("form", {
|
|
17331
|
+
className: "ais-AutocompleteForm",
|
|
17332
|
+
action: "",
|
|
17333
|
+
noValidate: true,
|
|
17334
|
+
role: "search",
|
|
17335
|
+
onSubmit: function onSubmit(e) {
|
|
17336
|
+
return e.preventDefault();
|
|
17337
|
+
}
|
|
17338
|
+
}, createElement("div", {
|
|
17339
|
+
className: "ais-AutocompleteInputWrapperPrefix"
|
|
17340
|
+
}, createElement("label", {
|
|
17341
|
+
className: "ais-AutocompleteLabel",
|
|
17342
|
+
"aria-label": "Submit",
|
|
17343
|
+
htmlFor: inputProps.id,
|
|
17344
|
+
id: "".concat(inputProps.id, "-label")
|
|
17345
|
+
}, createElement("button", {
|
|
17346
|
+
className: "ais-AutocompleteSubmitButton",
|
|
17347
|
+
type: "submit",
|
|
17348
|
+
title: "Submit"
|
|
17349
|
+
}, createElement(AutocompleteSubmitIcon, {
|
|
17350
|
+
createElement: createElement
|
|
17351
|
+
}))), createElement("div", {
|
|
17352
|
+
className: "ais-AutocompleteLoadingIndicator",
|
|
17353
|
+
hidden: !isSearchStalled
|
|
17354
|
+
}, createElement(AutocompleteLoadingIcon, {
|
|
17355
|
+
createElement: createElement
|
|
17356
|
+
}))), createElement("div", {
|
|
17357
|
+
className: "ais-AutocompleteInputWrapper"
|
|
17358
|
+
}, createElement("input", _extends$1({
|
|
17359
|
+
className: "ais-AutocompleteInput",
|
|
17360
|
+
"aria-autocomplete": "both",
|
|
17361
|
+
"aria-labelledby": "".concat(inputProps.id, "-label"),
|
|
17362
|
+
autoComplete: "off",
|
|
17363
|
+
autoCorrect: "off",
|
|
17364
|
+
autoCapitalize: "off",
|
|
17365
|
+
enterKeyHint: "search",
|
|
17366
|
+
spellCheck: "false",
|
|
17367
|
+
placeholder: "",
|
|
17368
|
+
maxLength: 512,
|
|
17369
|
+
type: "search",
|
|
17370
|
+
value: query
|
|
17371
|
+
}, inputProps))), createElement("div", {
|
|
17372
|
+
className: "ais-AutocompleteInputWrapperSuffix"
|
|
17373
|
+
}, createElement("button", {
|
|
17374
|
+
className: "ais-AutocompleteClearButton",
|
|
17375
|
+
type: "reset",
|
|
17376
|
+
title: "Clear",
|
|
17377
|
+
hidden: query.length === 0 || isSearchStalled,
|
|
17378
|
+
onClick: onClear
|
|
17379
|
+
}, createElement(AutocompleteClearIcon, {
|
|
17380
|
+
createElement: createElement
|
|
17381
|
+
}))));
|
|
17382
|
+
};
|
|
17383
|
+
}
|
|
17384
|
+
|
|
17385
|
+
var _typeof_1 = createCommonjsModule(function (module) {
|
|
17386
|
+
function _typeof(o) {
|
|
17387
|
+
"@babel/helpers - typeof";
|
|
17388
|
+
|
|
17389
|
+
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
17390
|
+
return typeof o;
|
|
17391
|
+
} : function (o) {
|
|
17392
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
17393
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
|
|
17394
|
+
}
|
|
17395
|
+
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17396
|
+
});
|
|
17397
|
+
|
|
17398
|
+
var _typeof$1 = unwrapExports(_typeof_1);
|
|
17399
|
+
|
|
17400
|
+
var toPrimitive_1 = createCommonjsModule(function (module) {
|
|
17401
|
+
var _typeof = _typeof_1["default"];
|
|
17402
|
+
function toPrimitive(t, r) {
|
|
17403
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
17404
|
+
var e = t[Symbol.toPrimitive];
|
|
17405
|
+
if (void 0 !== e) {
|
|
17406
|
+
var i = e.call(t, r || "default");
|
|
17407
|
+
if ("object" != _typeof(i)) return i;
|
|
17408
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
17409
|
+
}
|
|
17410
|
+
return ("string" === r ? String : Number)(t);
|
|
17411
|
+
}
|
|
17412
|
+
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17413
|
+
});
|
|
17414
|
+
|
|
17415
|
+
unwrapExports(toPrimitive_1);
|
|
17416
|
+
|
|
17417
|
+
var toPropertyKey_1 = createCommonjsModule(function (module) {
|
|
17418
|
+
var _typeof = _typeof_1["default"];
|
|
17419
|
+
|
|
17420
|
+
function toPropertyKey(t) {
|
|
17421
|
+
var i = toPrimitive_1(t, "string");
|
|
17422
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
17224
17423
|
}
|
|
17225
17424
|
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17226
17425
|
});
|
|
@@ -17241,48 +17440,316 @@
|
|
|
17241
17440
|
|
|
17242
17441
|
var _defineProperty$1 = unwrapExports(defineProperty);
|
|
17243
17442
|
|
|
17244
|
-
var
|
|
17245
|
-
function
|
|
17246
|
-
if (
|
|
17247
|
-
|
|
17248
|
-
|
|
17249
|
-
|
|
17250
|
-
|
|
17443
|
+
var arrayWithHoles = createCommonjsModule(function (module) {
|
|
17444
|
+
function _arrayWithHoles(r) {
|
|
17445
|
+
if (Array.isArray(r)) return r;
|
|
17446
|
+
}
|
|
17447
|
+
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17448
|
+
});
|
|
17449
|
+
|
|
17450
|
+
unwrapExports(arrayWithHoles);
|
|
17451
|
+
|
|
17452
|
+
var iterableToArrayLimit = createCommonjsModule(function (module) {
|
|
17453
|
+
function _iterableToArrayLimit(r, l) {
|
|
17454
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
17455
|
+
if (null != t) {
|
|
17456
|
+
var e,
|
|
17457
|
+
n,
|
|
17458
|
+
i,
|
|
17459
|
+
u,
|
|
17460
|
+
a = [],
|
|
17461
|
+
f = !0,
|
|
17462
|
+
o = !1;
|
|
17463
|
+
try {
|
|
17464
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
17465
|
+
if (Object(t) !== t) return;
|
|
17466
|
+
f = !1;
|
|
17467
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
17468
|
+
} catch (r) {
|
|
17469
|
+
o = !0, n = r;
|
|
17470
|
+
} finally {
|
|
17471
|
+
try {
|
|
17472
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
17473
|
+
} finally {
|
|
17474
|
+
if (o) throw n;
|
|
17475
|
+
}
|
|
17476
|
+
}
|
|
17477
|
+
return a;
|
|
17251
17478
|
}
|
|
17252
|
-
return t;
|
|
17253
17479
|
}
|
|
17254
|
-
module.exports =
|
|
17480
|
+
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17255
17481
|
});
|
|
17256
17482
|
|
|
17257
|
-
unwrapExports(
|
|
17483
|
+
unwrapExports(iterableToArrayLimit);
|
|
17258
17484
|
|
|
17259
|
-
var
|
|
17260
|
-
function
|
|
17261
|
-
|
|
17262
|
-
var
|
|
17263
|
-
|
|
17264
|
-
|
|
17265
|
-
|
|
17266
|
-
|
|
17267
|
-
|
|
17485
|
+
var arrayLikeToArray = createCommonjsModule(function (module) {
|
|
17486
|
+
function _arrayLikeToArray(r, a) {
|
|
17487
|
+
(null == a || a > r.length) && (a = r.length);
|
|
17488
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
17489
|
+
return n;
|
|
17490
|
+
}
|
|
17491
|
+
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17492
|
+
});
|
|
17493
|
+
|
|
17494
|
+
unwrapExports(arrayLikeToArray);
|
|
17495
|
+
|
|
17496
|
+
var unsupportedIterableToArray = createCommonjsModule(function (module) {
|
|
17497
|
+
function _unsupportedIterableToArray(r, a) {
|
|
17498
|
+
if (r) {
|
|
17499
|
+
if ("string" == typeof r) return arrayLikeToArray(r, a);
|
|
17500
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
17501
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
|
|
17268
17502
|
}
|
|
17269
|
-
return i;
|
|
17270
17503
|
}
|
|
17271
|
-
module.exports =
|
|
17504
|
+
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17272
17505
|
});
|
|
17273
17506
|
|
|
17274
|
-
|
|
17507
|
+
unwrapExports(unsupportedIterableToArray);
|
|
17275
17508
|
|
|
17276
|
-
function
|
|
17277
|
-
|
|
17278
|
-
|
|
17509
|
+
var nonIterableRest = createCommonjsModule(function (module) {
|
|
17510
|
+
function _nonIterableRest() {
|
|
17511
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17512
|
+
}
|
|
17513
|
+
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17514
|
+
});
|
|
17515
|
+
|
|
17516
|
+
unwrapExports(nonIterableRest);
|
|
17517
|
+
|
|
17518
|
+
var slicedToArray = createCommonjsModule(function (module) {
|
|
17519
|
+
function _slicedToArray(r, e) {
|
|
17520
|
+
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
|
|
17521
|
+
}
|
|
17522
|
+
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
17523
|
+
});
|
|
17524
|
+
|
|
17525
|
+
var _slicedToArray$1 = unwrapExports(slicedToArray);
|
|
17526
|
+
|
|
17527
|
+
function createAutocompleteSuggestionComponent(_ref) {
|
|
17528
|
+
var createElement = _ref.createElement;
|
|
17529
|
+
return function AutocompleteSuggestion(_ref2) {
|
|
17530
|
+
var item = _ref2.item,
|
|
17531
|
+
onSelect = _ref2.onSelect,
|
|
17532
|
+
_ref2$classNames = _ref2.classNames,
|
|
17533
|
+
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames;
|
|
17534
|
+
return createElement("div", {
|
|
17535
|
+
onClick: onSelect,
|
|
17536
|
+
className: cx('ais-AutocompleteSuggestion', classNames.root)
|
|
17537
|
+
}, item.query);
|
|
17538
|
+
};
|
|
17539
|
+
}
|
|
17540
|
+
|
|
17541
|
+
function createAutocompletePropGetters(_ref) {
|
|
17542
|
+
var useEffect = _ref.useEffect,
|
|
17543
|
+
useId = _ref.useId,
|
|
17544
|
+
useMemo = _ref.useMemo,
|
|
17545
|
+
useRef = _ref.useRef,
|
|
17546
|
+
useState = _ref.useState;
|
|
17547
|
+
return function usePropGetters(_ref2) {
|
|
17548
|
+
var indices = _ref2.indices,
|
|
17549
|
+
indicesConfig = _ref2.indicesConfig,
|
|
17550
|
+
onRefine = _ref2.onRefine,
|
|
17551
|
+
globalOnSelect = _ref2.onSelect;
|
|
17552
|
+
var getElementId = createGetElementId(useId());
|
|
17553
|
+
var rootRef = useRef(null);
|
|
17554
|
+
var _useState = useState(false),
|
|
17555
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
17556
|
+
isOpen = _useState2[0],
|
|
17557
|
+
setIsOpen = _useState2[1];
|
|
17558
|
+
var _useState3 = useState(undefined),
|
|
17559
|
+
_useState4 = _slicedToArray$1(_useState3, 2),
|
|
17560
|
+
activeDescendant = _useState4[0],
|
|
17561
|
+
setActiveDescendant = _useState4[1];
|
|
17562
|
+
var _useMemo = useMemo(function () {
|
|
17563
|
+
return buildItems({
|
|
17564
|
+
indices: indices,
|
|
17565
|
+
indicesConfig: indicesConfig,
|
|
17566
|
+
getElementId: getElementId
|
|
17567
|
+
});
|
|
17568
|
+
}, [indices, indicesConfig, getElementId]),
|
|
17569
|
+
items = _useMemo.items,
|
|
17570
|
+
itemsIds = _useMemo.itemsIds;
|
|
17571
|
+
useEffect(function () {
|
|
17572
|
+
var onBodyClick = function onBodyClick(event) {
|
|
17573
|
+
var _unwrapRef;
|
|
17574
|
+
if ((_unwrapRef = unwrapRef(rootRef)) !== null && _unwrapRef !== void 0 && _unwrapRef.contains(event.target)) {
|
|
17575
|
+
return;
|
|
17576
|
+
}
|
|
17577
|
+
setIsOpen(false);
|
|
17578
|
+
};
|
|
17579
|
+
document.body.addEventListener('click', onBodyClick);
|
|
17580
|
+
return function () {
|
|
17581
|
+
document.body.removeEventListener('click', onBodyClick);
|
|
17582
|
+
};
|
|
17583
|
+
}, [rootRef]);
|
|
17584
|
+
var getNextActiveDescendent = function getNextActiveDescendent(key) {
|
|
17585
|
+
switch (key) {
|
|
17586
|
+
case 'ArrowLeft':
|
|
17587
|
+
case 'ArrowUp':
|
|
17588
|
+
{
|
|
17589
|
+
var prevIndex = itemsIds.indexOf(activeDescendant || '') - 1;
|
|
17590
|
+
return itemsIds[prevIndex] || itemsIds[itemsIds.length - 1];
|
|
17591
|
+
}
|
|
17592
|
+
case 'ArrowRight':
|
|
17593
|
+
case 'ArrowDown':
|
|
17594
|
+
{
|
|
17595
|
+
var nextIndex = itemsIds.indexOf(activeDescendant || '') + 1;
|
|
17596
|
+
return itemsIds[nextIndex] || itemsIds[0];
|
|
17597
|
+
}
|
|
17598
|
+
default:
|
|
17599
|
+
return undefined;
|
|
17600
|
+
}
|
|
17601
|
+
};
|
|
17602
|
+
var submit = function submit() {
|
|
17603
|
+
var actualActiveDescendant = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : activeDescendant;
|
|
17604
|
+
setIsOpen(false);
|
|
17605
|
+
if (actualActiveDescendant && items.has(actualActiveDescendant)) {
|
|
17606
|
+
var _getQuery;
|
|
17607
|
+
var _ref3 = items.get(actualActiveDescendant),
|
|
17608
|
+
_item = _ref3.item,
|
|
17609
|
+
_ref3$config = _ref3.config,
|
|
17610
|
+
indexOnSelect = _ref3$config.onSelect,
|
|
17611
|
+
getQuery = _ref3$config.getQuery,
|
|
17612
|
+
getURL = _ref3$config.getURL;
|
|
17613
|
+
var actualOnSelect = indexOnSelect !== null && indexOnSelect !== void 0 ? indexOnSelect : globalOnSelect;
|
|
17614
|
+
actualOnSelect({
|
|
17615
|
+
item: _item,
|
|
17616
|
+
query: (_getQuery = getQuery === null || getQuery === void 0 ? void 0 : getQuery(_item)) !== null && _getQuery !== void 0 ? _getQuery : '',
|
|
17617
|
+
url: getURL === null || getURL === void 0 ? void 0 : getURL(_item),
|
|
17618
|
+
setQuery: function setQuery(query) {
|
|
17619
|
+
return onRefine(query);
|
|
17620
|
+
}
|
|
17621
|
+
});
|
|
17622
|
+
setActiveDescendant(undefined);
|
|
17623
|
+
}
|
|
17624
|
+
};
|
|
17625
|
+
return {
|
|
17626
|
+
getInputProps: function getInputProps() {
|
|
17627
|
+
return {
|
|
17628
|
+
id: getElementId('input'),
|
|
17629
|
+
role: 'combobox',
|
|
17630
|
+
'aria-autocomplete': 'list',
|
|
17631
|
+
'aria-expanded': isOpen,
|
|
17632
|
+
'aria-haspopup': 'grid',
|
|
17633
|
+
'aria-controls': getElementId('panel'),
|
|
17634
|
+
'aria-activedescendant': activeDescendant,
|
|
17635
|
+
onFocus: function onFocus() {
|
|
17636
|
+
return setIsOpen(true);
|
|
17637
|
+
},
|
|
17638
|
+
onKeyDown: function onKeyDown(event) {
|
|
17639
|
+
if (event.key === 'Escape') {
|
|
17640
|
+
setActiveDescendant(undefined);
|
|
17641
|
+
setIsOpen(false);
|
|
17642
|
+
return;
|
|
17643
|
+
}
|
|
17644
|
+
switch (event.key) {
|
|
17645
|
+
case 'ArrowLeft':
|
|
17646
|
+
case 'ArrowUp':
|
|
17647
|
+
case 'ArrowRight':
|
|
17648
|
+
case 'ArrowDown':
|
|
17649
|
+
{
|
|
17650
|
+
var _document$getElementB;
|
|
17651
|
+
var nextActiveDescendent = getNextActiveDescendent(event.key);
|
|
17652
|
+
setActiveDescendant(nextActiveDescendent);
|
|
17653
|
+
(_document$getElementB = document.getElementById(nextActiveDescendent)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.scrollIntoView(false);
|
|
17654
|
+
event.preventDefault();
|
|
17655
|
+
break;
|
|
17656
|
+
}
|
|
17657
|
+
case 'Enter':
|
|
17658
|
+
{
|
|
17659
|
+
submit();
|
|
17660
|
+
break;
|
|
17661
|
+
}
|
|
17662
|
+
case 'Tab':
|
|
17663
|
+
setIsOpen(false);
|
|
17664
|
+
break;
|
|
17665
|
+
default:
|
|
17666
|
+
return;
|
|
17667
|
+
}
|
|
17668
|
+
},
|
|
17669
|
+
onKeyUp: function onKeyUp(event) {
|
|
17670
|
+
switch (event.key) {
|
|
17671
|
+
case 'ArrowLeft':
|
|
17672
|
+
case 'ArrowUp':
|
|
17673
|
+
case 'ArrowRight':
|
|
17674
|
+
case 'ArrowDown':
|
|
17675
|
+
case 'Escape':
|
|
17676
|
+
case 'Return':
|
|
17677
|
+
event.preventDefault();
|
|
17678
|
+
return;
|
|
17679
|
+
default:
|
|
17680
|
+
setActiveDescendant(undefined);
|
|
17681
|
+
break;
|
|
17682
|
+
}
|
|
17683
|
+
}
|
|
17684
|
+
};
|
|
17685
|
+
},
|
|
17686
|
+
getItemProps: function getItemProps(item, index) {
|
|
17687
|
+
var id = getElementId('item', item.__indexName, index);
|
|
17688
|
+
return {
|
|
17689
|
+
id: id,
|
|
17690
|
+
role: 'row',
|
|
17691
|
+
'aria-selected': id === activeDescendant,
|
|
17692
|
+
onSelect: function onSelect() {
|
|
17693
|
+
return submit(id);
|
|
17694
|
+
}
|
|
17695
|
+
};
|
|
17696
|
+
},
|
|
17697
|
+
getPanelProps: function getPanelProps() {
|
|
17698
|
+
return {
|
|
17699
|
+
hidden: !isOpen,
|
|
17700
|
+
id: getElementId('panel'),
|
|
17701
|
+
role: 'grid',
|
|
17702
|
+
'aria-labelledby': getElementId('input')
|
|
17703
|
+
};
|
|
17704
|
+
},
|
|
17705
|
+
getRootProps: function getRootProps() {
|
|
17706
|
+
return {
|
|
17707
|
+
ref: rootRef
|
|
17708
|
+
};
|
|
17709
|
+
}
|
|
17710
|
+
};
|
|
17711
|
+
};
|
|
17712
|
+
}
|
|
17713
|
+
function buildItems(_ref4) {
|
|
17714
|
+
var indices = _ref4.indices,
|
|
17715
|
+
indicesConfig = _ref4.indicesConfig,
|
|
17716
|
+
getElementId = _ref4.getElementId;
|
|
17717
|
+
var itemsIds = [];
|
|
17718
|
+
var items = new Map();
|
|
17719
|
+
for (var i = 0; i < indicesConfig.length; i++) {
|
|
17720
|
+
var _indices$i;
|
|
17721
|
+
var config = indicesConfig[i];
|
|
17722
|
+
var hits = ((_indices$i = indices[i]) === null || _indices$i === void 0 ? void 0 : _indices$i.hits) || [];
|
|
17723
|
+
for (var position = 0; position < hits.length; position++) {
|
|
17724
|
+
var itemId = getElementId('item', config.indexName, position);
|
|
17725
|
+
items.set(itemId, {
|
|
17726
|
+
item: hits[position],
|
|
17727
|
+
config: config
|
|
17728
|
+
});
|
|
17729
|
+
itemsIds.push(itemId);
|
|
17730
|
+
}
|
|
17279
17731
|
}
|
|
17280
|
-
return
|
|
17281
|
-
|
|
17282
|
-
|
|
17732
|
+
return {
|
|
17733
|
+
items: items,
|
|
17734
|
+
itemsIds: itemsIds
|
|
17735
|
+
};
|
|
17736
|
+
}
|
|
17737
|
+
function createGetElementId(autocompleteId) {
|
|
17738
|
+
return function getElementId() {
|
|
17739
|
+
var prefix = 'autocomplete';
|
|
17740
|
+
for (var _len = arguments.length, suffixes = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17741
|
+
suffixes[_key] = arguments[_key];
|
|
17283
17742
|
}
|
|
17284
|
-
return
|
|
17285
|
-
}
|
|
17743
|
+
return "".concat(prefix).concat(autocompleteId).concat(suffixes.join(':'));
|
|
17744
|
+
};
|
|
17745
|
+
}
|
|
17746
|
+
|
|
17747
|
+
/**
|
|
17748
|
+
* Returns the framework-agnostic value of a ref.
|
|
17749
|
+
*/
|
|
17750
|
+
function unwrapRef(ref) {
|
|
17751
|
+
return ref.current && _typeof$1(ref.current) === 'object' && 'base' in ref.current ? ref.current.base // Preact
|
|
17752
|
+
: ref.current; // React
|
|
17286
17753
|
}
|
|
17287
17754
|
|
|
17288
17755
|
function createDefaultEmptyComponent(_ref) {
|
|
@@ -17350,7 +17817,7 @@
|
|
|
17350
17817
|
};
|
|
17351
17818
|
}
|
|
17352
17819
|
|
|
17353
|
-
var _excluded$
|
|
17820
|
+
var _excluded$c = ["listRef", "nextButtonRef", "previousButtonRef", "carouselIdRef", "canScrollLeft", "canScrollRight", "setCanScrollLeft", "setCanScrollRight", "classNames", "itemComponent", "previousIconComponent", "nextIconComponent", "headerComponent", "showNavigation", "items", "translations", "sendEvent"];
|
|
17354
17821
|
function ownKeys$1(e, r) {
|
|
17355
17822
|
var t = Object.keys(e);
|
|
17356
17823
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17412,6 +17879,10 @@
|
|
|
17412
17879
|
nextButtonRef = userProps.nextButtonRef,
|
|
17413
17880
|
previousButtonRef = userProps.previousButtonRef,
|
|
17414
17881
|
carouselIdRef = userProps.carouselIdRef,
|
|
17882
|
+
canScrollLeft = userProps.canScrollLeft,
|
|
17883
|
+
canScrollRight = userProps.canScrollRight,
|
|
17884
|
+
setCanScrollLeft = userProps.setCanScrollLeft,
|
|
17885
|
+
setCanScrollRight = userProps.setCanScrollRight,
|
|
17415
17886
|
_userProps$classNames = userProps.classNames,
|
|
17416
17887
|
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17417
17888
|
_userProps$itemCompon = userProps.itemComponent,
|
|
@@ -17423,10 +17894,13 @@
|
|
|
17423
17894
|
PreviousIconComponent = _userProps$previousIc === void 0 ? PreviousIconDefaultComponent : _userProps$previousIc,
|
|
17424
17895
|
_userProps$nextIconCo = userProps.nextIconComponent,
|
|
17425
17896
|
NextIconComponent = _userProps$nextIconCo === void 0 ? NextIconDefaultComponent : _userProps$nextIconCo,
|
|
17897
|
+
HeaderComponent = userProps.headerComponent,
|
|
17898
|
+
_userProps$showNaviga = userProps.showNavigation,
|
|
17899
|
+
showNavigation = _userProps$showNaviga === void 0 ? true : _userProps$showNaviga,
|
|
17426
17900
|
items = userProps.items,
|
|
17427
17901
|
userTranslations = userProps.translations,
|
|
17428
17902
|
sendEvent = userProps.sendEvent,
|
|
17429
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
17903
|
+
props = _objectWithoutProperties$1(userProps, _excluded$c);
|
|
17430
17904
|
var translations = _objectSpread({
|
|
17431
17905
|
listLabel: 'Items',
|
|
17432
17906
|
nextButtonLabel: 'Next',
|
|
@@ -17453,18 +17927,31 @@
|
|
|
17453
17927
|
}
|
|
17454
17928
|
}
|
|
17455
17929
|
function updateNavigationButtonsProps() {
|
|
17456
|
-
if (!listRef.current
|
|
17930
|
+
if (!listRef.current) {
|
|
17457
17931
|
return;
|
|
17458
17932
|
}
|
|
17459
|
-
|
|
17460
|
-
|
|
17933
|
+
var isLeftHidden = listRef.current.scrollLeft <= 0;
|
|
17934
|
+
var isRightHidden = listRef.current.scrollLeft + listRef.current.clientWidth >= listRef.current.scrollWidth;
|
|
17935
|
+
setCanScrollLeft(!isLeftHidden);
|
|
17936
|
+
setCanScrollRight(!isRightHidden);
|
|
17937
|
+
if (previousButtonRef.current) {
|
|
17938
|
+
previousButtonRef.current.hidden = isLeftHidden;
|
|
17939
|
+
}
|
|
17940
|
+
if (nextButtonRef.current) {
|
|
17941
|
+
nextButtonRef.current.hidden = isRightHidden;
|
|
17942
|
+
}
|
|
17461
17943
|
}
|
|
17462
17944
|
if (items.length === 0) {
|
|
17463
17945
|
return null;
|
|
17464
17946
|
}
|
|
17465
17947
|
return createElement("div", _extends$1({}, props, {
|
|
17466
17948
|
className: cx(cssClasses.root)
|
|
17467
|
-
}), createElement(
|
|
17949
|
+
}), HeaderComponent && createElement(HeaderComponent, {
|
|
17950
|
+
canScrollLeft: canScrollLeft,
|
|
17951
|
+
canScrollRight: canScrollRight,
|
|
17952
|
+
scrollLeft: scrollLeft,
|
|
17953
|
+
scrollRight: scrollRight
|
|
17954
|
+
}), showNavigation && createElement("button", {
|
|
17468
17955
|
ref: previousButtonRef,
|
|
17469
17956
|
title: translations.previousButtonTitle,
|
|
17470
17957
|
"aria-label": translations.previousButtonLabel,
|
|
@@ -17511,7 +17998,7 @@
|
|
|
17511
17998
|
item: item,
|
|
17512
17999
|
sendEvent: sendEvent
|
|
17513
18000
|
}));
|
|
17514
|
-
})), createElement("button", {
|
|
18001
|
+
})), showNavigation && createElement("button", {
|
|
17515
18002
|
ref: nextButtonRef,
|
|
17516
18003
|
title: translations.nextButtonTitle,
|
|
17517
18004
|
"aria-label": translations.nextButtonLabel,
|
|
@@ -17527,7 +18014,7 @@
|
|
|
17527
18014
|
};
|
|
17528
18015
|
}
|
|
17529
18016
|
|
|
17530
|
-
var _excluded$
|
|
18017
|
+
var _excluded$d = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17531
18018
|
function ownKeys$2(e, r) {
|
|
17532
18019
|
var t = Object.keys(e);
|
|
17533
18020
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17579,7 +18066,7 @@
|
|
|
17579
18066
|
status = userProps.status,
|
|
17580
18067
|
userTranslations = userProps.translations,
|
|
17581
18068
|
sendEvent = userProps.sendEvent,
|
|
17582
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18069
|
+
props = _objectWithoutProperties$1(userProps, _excluded$d);
|
|
17583
18070
|
var translations = _objectSpread$1({
|
|
17584
18071
|
title: 'Frequently bought together',
|
|
17585
18072
|
sliderLabel: 'Frequently bought together products'
|
|
@@ -17612,7 +18099,7 @@
|
|
|
17612
18099
|
};
|
|
17613
18100
|
}
|
|
17614
18101
|
|
|
17615
|
-
var _excluded$
|
|
18102
|
+
var _excluded$e = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
|
|
17616
18103
|
function createHighlightPartComponent(_ref) {
|
|
17617
18104
|
var createElement = _ref.createElement;
|
|
17618
18105
|
return function HighlightPart(_ref2) {
|
|
@@ -17645,7 +18132,7 @@
|
|
|
17645
18132
|
className = userProps.className,
|
|
17646
18133
|
_userProps$classNames = userProps.classNames,
|
|
17647
18134
|
classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
|
|
17648
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18135
|
+
props = _objectWithoutProperties$1(userProps, _excluded$e);
|
|
17649
18136
|
return createElement("span", _extends$1({}, props, {
|
|
17650
18137
|
className: cx(classNames.root, className)
|
|
17651
18138
|
}), parts.map(function (part, partIndex) {
|
|
@@ -17667,7 +18154,7 @@
|
|
|
17667
18154
|
};
|
|
17668
18155
|
}
|
|
17669
18156
|
|
|
17670
|
-
var _excluded$
|
|
18157
|
+
var _excluded$f = ["classNames", "hits", "itemComponent", "sendEvent", "emptyComponent", "banner", "bannerComponent"];
|
|
17671
18158
|
|
|
17672
18159
|
// Should be imported from a shared package in the future
|
|
17673
18160
|
|
|
@@ -17712,7 +18199,7 @@
|
|
|
17712
18199
|
EmptyComponent = userProps.emptyComponent,
|
|
17713
18200
|
banner = userProps.banner,
|
|
17714
18201
|
BannerComponent = userProps.bannerComponent,
|
|
17715
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18202
|
+
props = _objectWithoutProperties$1(userProps, _excluded$f);
|
|
17716
18203
|
return createElement("div", _extends$1({}, props, {
|
|
17717
18204
|
className: cx('ais-Hits', classNames.root, hits.length === 0 && cx('ais-Hits--empty', classNames.emptyRoot), props.className)
|
|
17718
18205
|
}), banner && (BannerComponent ? createElement(BannerComponent, {
|
|
@@ -17740,7 +18227,7 @@
|
|
|
17740
18227
|
};
|
|
17741
18228
|
}
|
|
17742
18229
|
|
|
17743
|
-
var _excluded$
|
|
18230
|
+
var _excluded$g = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17744
18231
|
function ownKeys$3(e, r) {
|
|
17745
18232
|
var t = Object.keys(e);
|
|
17746
18233
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17792,7 +18279,7 @@
|
|
|
17792
18279
|
status = userProps.status,
|
|
17793
18280
|
userTranslations = userProps.translations,
|
|
17794
18281
|
sendEvent = userProps.sendEvent,
|
|
17795
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18282
|
+
props = _objectWithoutProperties$1(userProps, _excluded$g);
|
|
17796
18283
|
var translations = _objectSpread$2({
|
|
17797
18284
|
title: 'Looking similar',
|
|
17798
18285
|
sliderLabel: 'Looking similar'
|
|
@@ -17825,7 +18312,7 @@
|
|
|
17825
18312
|
};
|
|
17826
18313
|
}
|
|
17827
18314
|
|
|
17828
|
-
var _excluded$
|
|
18315
|
+
var _excluded$h = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17829
18316
|
function ownKeys$4(e, r) {
|
|
17830
18317
|
var t = Object.keys(e);
|
|
17831
18318
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17877,7 +18364,7 @@
|
|
|
17877
18364
|
status = userProps.status,
|
|
17878
18365
|
userTranslations = userProps.translations,
|
|
17879
18366
|
sendEvent = userProps.sendEvent,
|
|
17880
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18367
|
+
props = _objectWithoutProperties$1(userProps, _excluded$h);
|
|
17881
18368
|
var translations = _objectSpread$3({
|
|
17882
18369
|
title: 'Related products',
|
|
17883
18370
|
sliderLabel: 'Related products'
|
|
@@ -17910,7 +18397,7 @@
|
|
|
17910
18397
|
};
|
|
17911
18398
|
}
|
|
17912
18399
|
|
|
17913
|
-
var _excluded$
|
|
18400
|
+
var _excluded$i = ["classNames", "emptyComponent", "headerComponent", "itemComponent", "layout", "items", "status", "translations", "sendEvent"];
|
|
17914
18401
|
function ownKeys$5(e, r) {
|
|
17915
18402
|
var t = Object.keys(e);
|
|
17916
18403
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -17962,7 +18449,7 @@
|
|
|
17962
18449
|
status = userProps.status,
|
|
17963
18450
|
userTranslations = userProps.translations,
|
|
17964
18451
|
sendEvent = userProps.sendEvent,
|
|
17965
|
-
props = _objectWithoutProperties$1(userProps, _excluded$
|
|
18452
|
+
props = _objectWithoutProperties$1(userProps, _excluded$i);
|
|
17966
18453
|
var translations = _objectSpread$4({
|
|
17967
18454
|
title: 'Trending items',
|
|
17968
18455
|
sliderLabel: 'Trending items'
|
|
@@ -17995,18 +18482,30 @@
|
|
|
17995
18482
|
};
|
|
17996
18483
|
}
|
|
17997
18484
|
|
|
17998
|
-
var r$1,u$1,i,o$1,f$1=0,c$1=[],e$2=[],a$1=l.__b,v$1=l.__r,l$1=l.diffed,m$2=l.__c,d$1=l.unmount;function p$1(t,r){l.__h&&l.__h(u$1,t,f$1||r),f$1=0;var i=u$1.__H||(u$1.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:e$2}),i.__[t]}function y$1(n){return f$1=1,h$1(C$1,n)}function h$1(n,t,i){var o=p$1(r$1++,2);if(o.t=n,!o.__c&&(o.__=[i?i(t):C$1(void 0,t),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=u$1,!u$1.u)){u$1.u=!0;var f=u$1.shouldComponentUpdate;u$1.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!!i&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function s$1(t,i){var o=p$1(r$1++,3);!l.__s&&B(o.__H,i)&&(o.__=t,o.i=i,u$1.__H.__h.push(o));}function A$1(n){return f$1=5,T$1(function(){return {current:n}},[])}function T$1(n,t){var u=p$1(r$1++,7);return B(u.__H,t)?(u.__V=n(),u.i=t,u.__h=n,u.__V):u.__}function g$1(){for(var t;t=c$1.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(w$1),t.__H.__h.forEach(z$1),t.__H.__h=[];}catch(r){t.__H.__h=[],l.__e(r,t.__v);}}l.__b=function(n){"function"!=typeof n.type||n.o||n.type===p?n.o||(n.o=n.__&&n.__.o?n.__.o:""):n.o=(n.__&&n.__.o?n.__.o:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),u$1=null,a$1&&a$1(n);},l.__r=function(n){v$1&&v$1(n),r$1=0;var t=(u$1=n.__c).__H;t&&(i===u$1?(t.__h=[],u$1.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=e$2,n.__N=n.i=void 0;})):(t.__h.forEach(w$1),t.__h.forEach(z$1),t.__h=[])),i=u$1;},l.diffed=function(t){l$1&&l$1(t);var r=t.__c;r&&r.__H&&(r.__H.__h.length&&(1!==c$1.push(r)&&o$1===l.requestAnimationFrame||((o$1=l.requestAnimationFrame)||k$1)(g$1)),r.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==e$2&&(n.__=n.__V),n.i=void 0,n.__V=e$2;})),i=u$1=null;},l.__c=function(t,r){r.some(function(t){try{t.__h.forEach(w$1),t.__h=t.__h.filter(function(n){return !n.__||z$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l.__e(u,t.__v);}}),m$2&&m$2(t,r);},l.unmount=function(t){d$1&&d$1(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{w$1(n);}catch(n){r=n;}}),u.__H=void 0,r&&l.__e(r,u.__v));};var j$1="function"==typeof requestAnimationFrame;function k$1(n){var t,r=function(){clearTimeout(u),j$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);j$1&&(t=requestAnimationFrame(r));}function w$1(n){var t=u$1,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u$1=t;}function z$1(n){var t=u$1;n.__c=n.__(),u$1=t;}function B(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function C$1(n,t){return "function"==typeof t?t(n):t}
|
|
18485
|
+
var r$1,u$1,i,o$1,f$1=0,c$1=[],e$2=[],a$1=l.__b,v$1=l.__r,l$1=l.diffed,m$2=l.__c,d$1=l.unmount;function p$1(t,r){l.__h&&l.__h(u$1,t,f$1||r),f$1=0;var i=u$1.__H||(u$1.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:e$2}),i.__[t]}function y$1(n){return f$1=1,h$1(C$1,n)}function h$1(n,t,i){var o=p$1(r$1++,2);if(o.t=n,!o.__c&&(o.__=[i?i(t):C$1(void 0,t),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=u$1,!u$1.u)){u$1.u=!0;var f=u$1.shouldComponentUpdate;u$1.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!!i&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function s$1(t,i){var o=p$1(r$1++,3);!l.__s&&B(o.__H,i)&&(o.__=t,o.i=i,u$1.__H.__h.push(o));}function A$1(n){return f$1=5,T$1(function(){return {current:n}},[])}function T$1(n,t){var u=p$1(r$1++,7);return B(u.__H,t)?(u.__V=n(),u.i=t,u.__h=n,u.__V):u.__}function b$1(){var n=p$1(r$1++,11);return n.__||(n.__="P"+function(n){for(var t=0,r=n.length;r>0;)t=(t<<5)-t+n.charCodeAt(--r)|0;return t}(u$1.__v.o)+r$1),n.__}function g$1(){for(var t;t=c$1.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(w$1),t.__H.__h.forEach(z$1),t.__H.__h=[];}catch(r){t.__H.__h=[],l.__e(r,t.__v);}}l.__b=function(n){"function"!=typeof n.type||n.o||n.type===p?n.o||(n.o=n.__&&n.__.o?n.__.o:""):n.o=(n.__&&n.__.o?n.__.o:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),u$1=null,a$1&&a$1(n);},l.__r=function(n){v$1&&v$1(n),r$1=0;var t=(u$1=n.__c).__H;t&&(i===u$1?(t.__h=[],u$1.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=e$2,n.__N=n.i=void 0;})):(t.__h.forEach(w$1),t.__h.forEach(z$1),t.__h=[])),i=u$1;},l.diffed=function(t){l$1&&l$1(t);var r=t.__c;r&&r.__H&&(r.__H.__h.length&&(1!==c$1.push(r)&&o$1===l.requestAnimationFrame||((o$1=l.requestAnimationFrame)||k$1)(g$1)),r.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==e$2&&(n.__=n.__V),n.i=void 0,n.__V=e$2;})),i=u$1=null;},l.__c=function(t,r){r.some(function(t){try{t.__h.forEach(w$1),t.__h=t.__h.filter(function(n){return !n.__||z$1(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l.__e(u,t.__v);}}),m$2&&m$2(t,r);},l.unmount=function(t){d$1&&d$1(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{w$1(n);}catch(n){r=n;}}),u.__H=void 0,r&&l.__e(r,u.__v));};var j$1="function"==typeof requestAnimationFrame;function k$1(n){var t,r=function(){clearTimeout(u),j$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);j$1&&(t=requestAnimationFrame(r));}function w$1(n){var t=u$1,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u$1=t;}function z$1(n){var t=u$1;n.__c=n.__(),u$1=t;}function B(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function C$1(n,t){return "function"==typeof t?t(n):t}
|
|
17999
18486
|
|
|
18000
18487
|
var Carousel = createCarouselComponent({
|
|
18001
18488
|
createElement: h,
|
|
18002
18489
|
Fragment: p
|
|
18003
18490
|
});
|
|
18004
18491
|
function CarouselWithRefs(props) {
|
|
18492
|
+
var _useState = y$1(false),
|
|
18493
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18494
|
+
canScrollLeft = _useState2[0],
|
|
18495
|
+
setCanScrollLeft = _useState2[1];
|
|
18496
|
+
var _useState3 = y$1(true),
|
|
18497
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
18498
|
+
canScrollRight = _useState4[0],
|
|
18499
|
+
setCanScrollRight = _useState4[1];
|
|
18005
18500
|
var carouselRefs = {
|
|
18006
18501
|
listRef: A$1(null),
|
|
18007
18502
|
nextButtonRef: A$1(null),
|
|
18008
18503
|
previousButtonRef: A$1(null),
|
|
18009
|
-
carouselIdRef: A$1(generateCarouselId())
|
|
18504
|
+
carouselIdRef: A$1(generateCarouselId()),
|
|
18505
|
+
canScrollLeft: canScrollLeft,
|
|
18506
|
+
canScrollRight: canScrollRight,
|
|
18507
|
+
setCanScrollLeft: setCanScrollLeft,
|
|
18508
|
+
setCanScrollRight: setCanScrollRight
|
|
18010
18509
|
};
|
|
18011
18510
|
return h(Carousel, _extends({}, carouselRefs, props));
|
|
18012
18511
|
}
|
|
@@ -18014,7 +18513,9 @@
|
|
|
18014
18513
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
18015
18514
|
cssClasses = _ref.cssClasses,
|
|
18016
18515
|
_ref$templates = _ref.templates,
|
|
18017
|
-
templates = _ref$templates === void 0 ? {} : _ref$templates
|
|
18516
|
+
templates = _ref$templates === void 0 ? {} : _ref$templates,
|
|
18517
|
+
_ref$showNavigation = _ref.showNavigation,
|
|
18518
|
+
showNavigation = _ref$showNavigation === void 0 ? true : _ref$showNavigation;
|
|
18018
18519
|
return function CarouselTemplate(_ref2) {
|
|
18019
18520
|
var items = _ref2.items,
|
|
18020
18521
|
widgetTemplates = _ref2.templates,
|
|
@@ -18023,11 +18524,17 @@
|
|
|
18023
18524
|
_ref2$sendEvent = _ref2.sendEvent,
|
|
18024
18525
|
sendEvent = _ref2$sendEvent === void 0 ? function () {} : _ref2$sendEvent;
|
|
18025
18526
|
var previous = templates.previous,
|
|
18026
|
-
next = templates.next
|
|
18527
|
+
next = templates.next,
|
|
18528
|
+
header = templates.header;
|
|
18027
18529
|
return h(CarouselWithRefs, {
|
|
18028
18530
|
items: items,
|
|
18029
18531
|
sendEvent: sendEvent,
|
|
18030
18532
|
itemComponent: widgetTemplates.item,
|
|
18533
|
+
headerComponent: header ? function (props) {
|
|
18534
|
+
return header(_objectSpread2({
|
|
18535
|
+
html: m$1
|
|
18536
|
+
}, props));
|
|
18537
|
+
} : undefined,
|
|
18031
18538
|
previousIconComponent: previous ? function () {
|
|
18032
18539
|
return previous({
|
|
18033
18540
|
html: m$1
|
|
@@ -18041,7 +18548,8 @@
|
|
|
18041
18548
|
classNames: _objectSpread2(_objectSpread2({}, cssClasses), {
|
|
18042
18549
|
list: cx(cssClasses === null || cssClasses === void 0 ? void 0 : cssClasses.list, widgetCssClasses === null || widgetCssClasses === void 0 ? void 0 : widgetCssClasses.list),
|
|
18043
18550
|
item: cx(cssClasses === null || cssClasses === void 0 ? void 0 : cssClasses.item, widgetCssClasses === null || widgetCssClasses === void 0 ? void 0 : widgetCssClasses.item)
|
|
18044
|
-
})
|
|
18551
|
+
}),
|
|
18552
|
+
showNavigation: showNavigation
|
|
18045
18553
|
});
|
|
18046
18554
|
};
|
|
18047
18555
|
}
|
|
@@ -18865,11 +19373,11 @@
|
|
|
18865
19373
|
Fragment: p
|
|
18866
19374
|
});
|
|
18867
19375
|
|
|
18868
|
-
var _excluded$
|
|
19376
|
+
var _excluded$j = ["classNames"];
|
|
18869
19377
|
function Highlight(_ref) {
|
|
18870
19378
|
var _ref$classNames = _ref.classNames,
|
|
18871
19379
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18872
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19380
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
18873
19381
|
return h(InternalHighlight, _extends({
|
|
18874
19382
|
classNames: {
|
|
18875
19383
|
root: cx('ais-Highlight', classNames.root),
|
|
@@ -18880,12 +19388,12 @@
|
|
|
18880
19388
|
}, props));
|
|
18881
19389
|
}
|
|
18882
19390
|
|
|
18883
|
-
var _excluded$
|
|
19391
|
+
var _excluded$k = ["hit", "attribute", "cssClasses"];
|
|
18884
19392
|
function Highlight$1(_ref) {
|
|
18885
19393
|
var hit = _ref.hit,
|
|
18886
19394
|
attribute = _ref.attribute,
|
|
18887
19395
|
cssClasses = _ref.cssClasses,
|
|
18888
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19396
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
18889
19397
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
18890
19398
|
var properties = toArray(property);
|
|
18891
19399
|
_warning(Boolean(properties.length), "Could not enable highlight for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is either searchable or specified in `attributesToHighlight`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
@@ -18899,11 +19407,11 @@
|
|
|
18899
19407
|
}));
|
|
18900
19408
|
}
|
|
18901
19409
|
|
|
18902
|
-
var _excluded$
|
|
19410
|
+
var _excluded$l = ["classNames"];
|
|
18903
19411
|
function ReverseHighlight(_ref) {
|
|
18904
19412
|
var _ref$classNames = _ref.classNames,
|
|
18905
19413
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18906
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19414
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
18907
19415
|
return h(InternalHighlight, _extends({
|
|
18908
19416
|
classNames: {
|
|
18909
19417
|
root: cx('ais-ReverseHighlight', classNames.root),
|
|
@@ -18914,13 +19422,13 @@
|
|
|
18914
19422
|
}, props));
|
|
18915
19423
|
}
|
|
18916
19424
|
|
|
18917
|
-
var _excluded$
|
|
19425
|
+
var _excluded$m = ["hit", "attribute", "cssClasses"],
|
|
18918
19426
|
_excluded2$3 = ["isHighlighted"];
|
|
18919
19427
|
function ReverseHighlight$1(_ref) {
|
|
18920
19428
|
var hit = _ref.hit,
|
|
18921
19429
|
attribute = _ref.attribute,
|
|
18922
19430
|
cssClasses = _ref.cssClasses,
|
|
18923
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19431
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
18924
19432
|
var property = getPropertyByPath(hit._highlightResult, attribute) || [];
|
|
18925
19433
|
var properties = toArray(property);
|
|
18926
19434
|
_warning(Boolean(properties.length), "Could not enable highlight for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is either searchable or specified in `attributesToHighlight`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
@@ -18940,11 +19448,11 @@
|
|
|
18940
19448
|
}));
|
|
18941
19449
|
}
|
|
18942
19450
|
|
|
18943
|
-
var _excluded$
|
|
19451
|
+
var _excluded$n = ["classNames"];
|
|
18944
19452
|
function ReverseSnippet(_ref) {
|
|
18945
19453
|
var _ref$classNames = _ref.classNames,
|
|
18946
19454
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18947
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19455
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
18948
19456
|
return h(InternalHighlight, _extends({
|
|
18949
19457
|
classNames: {
|
|
18950
19458
|
root: cx('ais-ReverseSnippet', classNames.root),
|
|
@@ -18955,13 +19463,13 @@
|
|
|
18955
19463
|
}, props));
|
|
18956
19464
|
}
|
|
18957
19465
|
|
|
18958
|
-
var _excluded$
|
|
19466
|
+
var _excluded$o = ["hit", "attribute", "cssClasses"],
|
|
18959
19467
|
_excluded2$4 = ["isHighlighted"];
|
|
18960
19468
|
function ReverseSnippet$1(_ref) {
|
|
18961
19469
|
var hit = _ref.hit,
|
|
18962
19470
|
attribute = _ref.attribute,
|
|
18963
19471
|
cssClasses = _ref.cssClasses,
|
|
18964
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19472
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
18965
19473
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
18966
19474
|
var properties = toArray(property);
|
|
18967
19475
|
_warning(Boolean(properties.length), "Could not enable snippet for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is specified in `attributesToSnippet`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
@@ -18981,11 +19489,11 @@
|
|
|
18981
19489
|
}));
|
|
18982
19490
|
}
|
|
18983
19491
|
|
|
18984
|
-
var _excluded$
|
|
19492
|
+
var _excluded$p = ["classNames"];
|
|
18985
19493
|
function Snippet(_ref) {
|
|
18986
19494
|
var _ref$classNames = _ref.classNames,
|
|
18987
19495
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
18988
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19496
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
18989
19497
|
return h(InternalHighlight, _extends({
|
|
18990
19498
|
classNames: {
|
|
18991
19499
|
root: cx('ais-Snippet', classNames.root),
|
|
@@ -18996,12 +19504,12 @@
|
|
|
18996
19504
|
}, props));
|
|
18997
19505
|
}
|
|
18998
19506
|
|
|
18999
|
-
var _excluded$
|
|
19507
|
+
var _excluded$q = ["hit", "attribute", "cssClasses"];
|
|
19000
19508
|
function Snippet$1(_ref) {
|
|
19001
19509
|
var hit = _ref.hit,
|
|
19002
19510
|
attribute = _ref.attribute,
|
|
19003
19511
|
cssClasses = _ref.cssClasses,
|
|
19004
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
19512
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
19005
19513
|
var property = getPropertyByPath(hit._snippetResult, attribute) || [];
|
|
19006
19514
|
var properties = toArray(property);
|
|
19007
19515
|
_warning(Boolean(properties.length), "Could not enable snippet for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is specified in `attributesToSnippet`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
@@ -19343,7 +19851,7 @@
|
|
|
19343
19851
|
});
|
|
19344
19852
|
};
|
|
19345
19853
|
|
|
19346
|
-
var _excluded$
|
|
19854
|
+
var _excluded$r = ["container", "widgets", "fallbackWidget"];
|
|
19347
19855
|
var withUsage$x = createDocumentationMessageGenerator({
|
|
19348
19856
|
name: 'dynamic-widgets'
|
|
19349
19857
|
});
|
|
@@ -19361,7 +19869,7 @@
|
|
|
19361
19869
|
containerSelector = _ref.container,
|
|
19362
19870
|
widgets = _ref.widgets,
|
|
19363
19871
|
fallbackWidget = _ref.fallbackWidget,
|
|
19364
|
-
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$
|
|
19872
|
+
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$r);
|
|
19365
19873
|
if (!containerSelector) {
|
|
19366
19874
|
throw new Error(withUsage$x('The `container` option is required.'));
|
|
19367
19875
|
}
|
|
@@ -19565,7 +20073,273 @@
|
|
|
19565
20073
|
};
|
|
19566
20074
|
}
|
|
19567
20075
|
};
|
|
19568
|
-
};
|
|
20076
|
+
};
|
|
20077
|
+
|
|
20078
|
+
/**
|
|
20079
|
+
* A list of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/)
|
|
20080
|
+
* to enable when the widget mounts.
|
|
20081
|
+
*/
|
|
20082
|
+
|
|
20083
|
+
var configure = function configure(widgetParams) {
|
|
20084
|
+
// This is a renderless widget that falls back to the connector's
|
|
20085
|
+
// noop render and unmount functions.
|
|
20086
|
+
var makeWidget = connectConfigure(noop);
|
|
20087
|
+
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
20088
|
+
searchParameters: widgetParams
|
|
20089
|
+
})), {}, {
|
|
20090
|
+
$$widgetType: 'ais.configure'
|
|
20091
|
+
});
|
|
20092
|
+
};
|
|
20093
|
+
|
|
20094
|
+
var _excluded$s = ["instanceId", "containerNode"];
|
|
20095
|
+
var autocompleteInstanceId = 0;
|
|
20096
|
+
var withUsage$z = createDocumentationMessageGenerator({
|
|
20097
|
+
name: 'autocomplete'
|
|
20098
|
+
});
|
|
20099
|
+
var suit$6 = component('Autocomplete');
|
|
20100
|
+
var Autocomplete = createAutocompleteComponent({
|
|
20101
|
+
createElement: h,
|
|
20102
|
+
Fragment: p
|
|
20103
|
+
});
|
|
20104
|
+
var AutocompletePanel = createAutocompletePanelComponent({
|
|
20105
|
+
createElement: h,
|
|
20106
|
+
Fragment: p
|
|
20107
|
+
});
|
|
20108
|
+
var AutocompleteIndex = createAutocompleteIndexComponent({
|
|
20109
|
+
createElement: h,
|
|
20110
|
+
Fragment: p
|
|
20111
|
+
});
|
|
20112
|
+
var AutocompleteSuggestion = createAutocompleteSuggestionComponent({
|
|
20113
|
+
createElement: h,
|
|
20114
|
+
Fragment: p
|
|
20115
|
+
});
|
|
20116
|
+
var AutocompleteSearchBox = createAutocompleteSearchComponent({
|
|
20117
|
+
createElement: h,
|
|
20118
|
+
Fragment: p
|
|
20119
|
+
});
|
|
20120
|
+
var usePropGetters = createAutocompletePropGetters({
|
|
20121
|
+
useEffect: s$1,
|
|
20122
|
+
useId: b$1,
|
|
20123
|
+
useMemo: T$1,
|
|
20124
|
+
useRef: A$1,
|
|
20125
|
+
useState: y$1
|
|
20126
|
+
});
|
|
20127
|
+
var createRenderer = function createRenderer(params) {
|
|
20128
|
+
var instanceId = params.instanceId,
|
|
20129
|
+
containerNode = params.containerNode,
|
|
20130
|
+
rendererParams = _objectWithoutProperties(params, _excluded$s);
|
|
20131
|
+
return function (connectorParams, isFirstRendering) {
|
|
20132
|
+
if (isFirstRendering) {
|
|
20133
|
+
var isolatedIndex = connectorParams.instantSearchInstance.mainIndex;
|
|
20134
|
+
var targetIndex = connectorParams.instantSearchInstance.mainIndex;
|
|
20135
|
+
walkIndex(targetIndex, function (childIndex) {
|
|
20136
|
+
if (childIndex.getIndexId() === "ais-autocomplete-".concat(instanceId)) {
|
|
20137
|
+
isolatedIndex = childIndex;
|
|
20138
|
+
targetIndex = childIndex.parent;
|
|
20139
|
+
}
|
|
20140
|
+
});
|
|
20141
|
+
rendererParams.renderState = {
|
|
20142
|
+
indexTemplateProps: [],
|
|
20143
|
+
isolatedIndex: isolatedIndex,
|
|
20144
|
+
targetIndex: targetIndex
|
|
20145
|
+
};
|
|
20146
|
+
return;
|
|
20147
|
+
}
|
|
20148
|
+
P(h(AutocompleteWrapper, _extends({}, rendererParams, connectorParams)), containerNode);
|
|
20149
|
+
};
|
|
20150
|
+
};
|
|
20151
|
+
function AutocompleteWrapper(_ref) {
|
|
20152
|
+
var _targetIndex$getWidge, _isolatedIndex$getHel;
|
|
20153
|
+
var indicesConfig = _ref.indicesConfig,
|
|
20154
|
+
indices = _ref.indices,
|
|
20155
|
+
getSearchPageURL = _ref.getSearchPageURL,
|
|
20156
|
+
userOnSelect = _ref.onSelect,
|
|
20157
|
+
refine = _ref.refine,
|
|
20158
|
+
cssClasses = _ref.cssClasses,
|
|
20159
|
+
renderState = _ref.renderState,
|
|
20160
|
+
instantSearchInstance = _ref.instantSearchInstance;
|
|
20161
|
+
var isolatedIndex = renderState.isolatedIndex,
|
|
20162
|
+
targetIndex = renderState.targetIndex;
|
|
20163
|
+
var isSearchPage = (_targetIndex$getWidge = targetIndex === null || targetIndex === void 0 ? void 0 : targetIndex.getWidgets().some(function (_ref2) {
|
|
20164
|
+
var $$type = _ref2.$$type;
|
|
20165
|
+
return ['ais.hits', 'ais.infiniteHits'].includes($$type);
|
|
20166
|
+
})) !== null && _targetIndex$getWidge !== void 0 ? _targetIndex$getWidge : false;
|
|
20167
|
+
var onRefine = function onRefine(query) {
|
|
20168
|
+
instantSearchInstance.setUiState(function (uiState) {
|
|
20169
|
+
var _objectSpread2$1;
|
|
20170
|
+
return _objectSpread2(_objectSpread2({}, uiState), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, targetIndex.getIndexId(), _objectSpread2(_objectSpread2({}, uiState[targetIndex.getIndexId()]), {}, {
|
|
20171
|
+
query: query
|
|
20172
|
+
})), _defineProperty(_objectSpread2$1, isolatedIndex.getIndexId(), {
|
|
20173
|
+
query: query
|
|
20174
|
+
}), _objectSpread2$1));
|
|
20175
|
+
});
|
|
20176
|
+
};
|
|
20177
|
+
var _usePropGetters = usePropGetters({
|
|
20178
|
+
indices: indices,
|
|
20179
|
+
indicesConfig: indicesConfig,
|
|
20180
|
+
onRefine: onRefine,
|
|
20181
|
+
onSelect: userOnSelect !== null && userOnSelect !== void 0 ? userOnSelect : function (_ref3) {
|
|
20182
|
+
var query = _ref3.query,
|
|
20183
|
+
setQuery = _ref3.setQuery,
|
|
20184
|
+
url = _ref3.url;
|
|
20185
|
+
if (url) {
|
|
20186
|
+
window.location.href = url;
|
|
20187
|
+
return;
|
|
20188
|
+
}
|
|
20189
|
+
if (!isSearchPage && typeof getSearchPageURL !== 'undefined') {
|
|
20190
|
+
var indexUiState = instantSearchInstance.getUiState()[targetIndex.getIndexId()];
|
|
20191
|
+
window.location.href = getSearchPageURL(_objectSpread2(_objectSpread2({}, indexUiState), {}, {
|
|
20192
|
+
query: query
|
|
20193
|
+
}));
|
|
20194
|
+
return;
|
|
20195
|
+
}
|
|
20196
|
+
setQuery(query);
|
|
20197
|
+
}
|
|
20198
|
+
}),
|
|
20199
|
+
getInputProps = _usePropGetters.getInputProps,
|
|
20200
|
+
getItemProps = _usePropGetters.getItemProps,
|
|
20201
|
+
getPanelProps = _usePropGetters.getPanelProps,
|
|
20202
|
+
getRootProps = _usePropGetters.getRootProps;
|
|
20203
|
+
var query = isolatedIndex === null || isolatedIndex === void 0 ? void 0 : (_isolatedIndex$getHel = isolatedIndex.getHelper()) === null || _isolatedIndex$getHel === void 0 ? void 0 : _isolatedIndex$getHel.state.query;
|
|
20204
|
+
return h(Autocomplete, _extends({}, getRootProps(), {
|
|
20205
|
+
classNames: cssClasses
|
|
20206
|
+
}), h(AutocompleteSearchBox, {
|
|
20207
|
+
query: query || '',
|
|
20208
|
+
inputProps: _objectSpread2(_objectSpread2({}, getInputProps()), {}, {
|
|
20209
|
+
// @ts-ignore - This clashes with some ambient React JSX declarations.
|
|
20210
|
+
onInput: function onInput(evt) {
|
|
20211
|
+
return refine(evt.currentTarget.value);
|
|
20212
|
+
}
|
|
20213
|
+
}),
|
|
20214
|
+
onClear: function onClear() {
|
|
20215
|
+
return onRefine('');
|
|
20216
|
+
},
|
|
20217
|
+
isSearchStalled: instantSearchInstance.status === 'stalled'
|
|
20218
|
+
}), h(AutocompletePanel, getPanelProps(), indices.map(function (_ref4, i) {
|
|
20219
|
+
var _indicesConfig$i$temp;
|
|
20220
|
+
var indexId = _ref4.indexId,
|
|
20221
|
+
hits = _ref4.hits;
|
|
20222
|
+
if (!renderState.indexTemplateProps[i]) {
|
|
20223
|
+
renderState.indexTemplateProps[i] = prepareTemplateProps({
|
|
20224
|
+
defaultTemplates: {},
|
|
20225
|
+
templatesConfig: instantSearchInstance.templatesConfig,
|
|
20226
|
+
templates: indicesConfig[i].templates
|
|
20227
|
+
});
|
|
20228
|
+
}
|
|
20229
|
+
var headerComponent = (_indicesConfig$i$temp = indicesConfig[i].templates) !== null && _indicesConfig$i$temp !== void 0 && _indicesConfig$i$temp.header ? function (_ref5) {
|
|
20230
|
+
var items = _ref5.items;
|
|
20231
|
+
return h(Template, _extends({}, renderState.indexTemplateProps[i], {
|
|
20232
|
+
templateKey: "header",
|
|
20233
|
+
rootTagName: "fragment",
|
|
20234
|
+
data: {
|
|
20235
|
+
items: items
|
|
20236
|
+
}
|
|
20237
|
+
}));
|
|
20238
|
+
} : undefined;
|
|
20239
|
+
var itemComponent = function itemComponent(_ref6) {
|
|
20240
|
+
var item = _ref6.item,
|
|
20241
|
+
onSelect = _ref6.onSelect;
|
|
20242
|
+
return h(Template, _extends({}, renderState.indexTemplateProps[i], {
|
|
20243
|
+
templateKey: "item",
|
|
20244
|
+
rootTagName: "fragment",
|
|
20245
|
+
data: {
|
|
20246
|
+
item: item,
|
|
20247
|
+
onSelect: onSelect
|
|
20248
|
+
}
|
|
20249
|
+
}));
|
|
20250
|
+
};
|
|
20251
|
+
return h(AutocompleteIndex, {
|
|
20252
|
+
key: indexId,
|
|
20253
|
+
HeaderComponent: headerComponent,
|
|
20254
|
+
ItemComponent: itemComponent,
|
|
20255
|
+
items: hits.map(function (item) {
|
|
20256
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
20257
|
+
__indexName: indexId
|
|
20258
|
+
});
|
|
20259
|
+
}),
|
|
20260
|
+
getItemProps: getItemProps,
|
|
20261
|
+
classNames: indicesConfig[i].cssClasses
|
|
20262
|
+
});
|
|
20263
|
+
})));
|
|
20264
|
+
}
|
|
20265
|
+
function EXPERIMENTAL_autocomplete(widgetParams) {
|
|
20266
|
+
var _ref7 = widgetParams || {},
|
|
20267
|
+
container = _ref7.container,
|
|
20268
|
+
escapeHTML = _ref7.escapeHTML,
|
|
20269
|
+
_ref7$indices = _ref7.indices,
|
|
20270
|
+
indices = _ref7$indices === void 0 ? [] : _ref7$indices,
|
|
20271
|
+
showSuggestions = _ref7.showSuggestions,
|
|
20272
|
+
getSearchPageURL = _ref7.getSearchPageURL,
|
|
20273
|
+
onSelect = _ref7.onSelect,
|
|
20274
|
+
_ref7$templates = _ref7.templates,
|
|
20275
|
+
templates = _ref7$templates === void 0 ? {} : _ref7$templates,
|
|
20276
|
+
_ref7$cssClasses = _ref7.cssClasses,
|
|
20277
|
+
userCssClasses = _ref7$cssClasses === void 0 ? {} : _ref7$cssClasses;
|
|
20278
|
+
if (!container) {
|
|
20279
|
+
throw new Error(withUsage$z('The `container` option is required.'));
|
|
20280
|
+
}
|
|
20281
|
+
var containerNode = getContainerNode(container);
|
|
20282
|
+
var cssClasses = {
|
|
20283
|
+
root: cx(suit$6(), userCssClasses.root)
|
|
20284
|
+
};
|
|
20285
|
+
var indicesConfig = _toConsumableArray(indices);
|
|
20286
|
+
if (showSuggestions !== null && showSuggestions !== void 0 && showSuggestions.indexName) {
|
|
20287
|
+
var _showSuggestions$cssC, _showSuggestions$cssC2, _showSuggestions$cssC3, _showSuggestions$cssC4;
|
|
20288
|
+
indicesConfig.unshift({
|
|
20289
|
+
indexName: showSuggestions.indexName,
|
|
20290
|
+
templates: _objectSpread2({
|
|
20291
|
+
// @ts-expect-error
|
|
20292
|
+
item: AutocompleteSuggestion
|
|
20293
|
+
}, showSuggestions.templates),
|
|
20294
|
+
cssClasses: {
|
|
20295
|
+
root: cx('ais-AutocompleteSuggestions', (_showSuggestions$cssC = showSuggestions.cssClasses) === null || _showSuggestions$cssC === void 0 ? void 0 : _showSuggestions$cssC.root),
|
|
20296
|
+
list: cx('ais-AutocompleteSuggestionsList', (_showSuggestions$cssC2 = showSuggestions.cssClasses) === null || _showSuggestions$cssC2 === void 0 ? void 0 : _showSuggestions$cssC2.list),
|
|
20297
|
+
header: cx('ais-AutocompleteSuggestionsHeader', (_showSuggestions$cssC3 = showSuggestions.cssClasses) === null || _showSuggestions$cssC3 === void 0 ? void 0 : _showSuggestions$cssC3.header),
|
|
20298
|
+
item: cx('ais-AutocompleteSuggestionsItem', (_showSuggestions$cssC4 = showSuggestions.cssClasses) === null || _showSuggestions$cssC4 === void 0 ? void 0 : _showSuggestions$cssC4.item)
|
|
20299
|
+
},
|
|
20300
|
+
getQuery: function getQuery(item) {
|
|
20301
|
+
return item.query;
|
|
20302
|
+
},
|
|
20303
|
+
getURL: showSuggestions.getURL
|
|
20304
|
+
});
|
|
20305
|
+
}
|
|
20306
|
+
var instanceId = ++autocompleteInstanceId;
|
|
20307
|
+
var specializedRenderer = createRenderer({
|
|
20308
|
+
instanceId: instanceId,
|
|
20309
|
+
containerNode: containerNode,
|
|
20310
|
+
indicesConfig: indicesConfig,
|
|
20311
|
+
getSearchPageURL: getSearchPageURL,
|
|
20312
|
+
onSelect: onSelect,
|
|
20313
|
+
cssClasses: cssClasses,
|
|
20314
|
+
renderState: {
|
|
20315
|
+
indexTemplateProps: [],
|
|
20316
|
+
isolatedIndex: undefined,
|
|
20317
|
+
targetIndex: undefined
|
|
20318
|
+
},
|
|
20319
|
+
templates: templates
|
|
20320
|
+
});
|
|
20321
|
+
var makeWidget = connectAutocomplete(specializedRenderer, function () {
|
|
20322
|
+
return P(null, containerNode);
|
|
20323
|
+
});
|
|
20324
|
+
return [connectSearchBox(function () {
|
|
20325
|
+
return null;
|
|
20326
|
+
})({}), index({
|
|
20327
|
+
indexId: "ais-autocomplete-".concat(instanceId),
|
|
20328
|
+
EXPERIMENTAL_isolated: true
|
|
20329
|
+
}).addWidgets([configure({
|
|
20330
|
+
hitsPerPage: 5
|
|
20331
|
+
})].concat(_toConsumableArray(indicesConfig.map(function (_ref8) {
|
|
20332
|
+
var indexName = _ref8.indexName;
|
|
20333
|
+
return index({
|
|
20334
|
+
indexName: indexName,
|
|
20335
|
+
indexId: indexName
|
|
20336
|
+
}).addWidgets([configure({})]);
|
|
20337
|
+
})), [_objectSpread2(_objectSpread2({}, makeWidget({
|
|
20338
|
+
escapeHTML: escapeHTML
|
|
20339
|
+
})), {}, {
|
|
20340
|
+
$$widgetType: 'ais.autocomplete'
|
|
20341
|
+
})]))];
|
|
20342
|
+
}
|
|
19569
20343
|
|
|
19570
20344
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
19571
20345
|
var items = _ref.items,
|
|
@@ -19628,10 +20402,10 @@
|
|
|
19628
20402
|
}
|
|
19629
20403
|
};
|
|
19630
20404
|
|
|
19631
|
-
var withUsage$
|
|
20405
|
+
var withUsage$A = createDocumentationMessageGenerator({
|
|
19632
20406
|
name: 'breadcrumb'
|
|
19633
20407
|
});
|
|
19634
|
-
var suit$
|
|
20408
|
+
var suit$7 = component('Breadcrumb');
|
|
19635
20409
|
var renderer$1 = function renderer(_ref) {
|
|
19636
20410
|
var containerNode = _ref.containerNode,
|
|
19637
20411
|
cssClasses = _ref.cssClasses,
|
|
@@ -19673,28 +20447,28 @@
|
|
|
19673
20447
|
_ref3$cssClasses = _ref3.cssClasses,
|
|
19674
20448
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses;
|
|
19675
20449
|
if (!container) {
|
|
19676
|
-
throw new Error(withUsage$
|
|
20450
|
+
throw new Error(withUsage$A('The `container` option is required.'));
|
|
19677
20451
|
}
|
|
19678
20452
|
var containerNode = getContainerNode(container);
|
|
19679
20453
|
var cssClasses = {
|
|
19680
|
-
root: cx(suit$
|
|
19681
|
-
noRefinementRoot: cx(suit$
|
|
20454
|
+
root: cx(suit$7(), userCssClasses.root),
|
|
20455
|
+
noRefinementRoot: cx(suit$7({
|
|
19682
20456
|
modifierName: 'noRefinement'
|
|
19683
20457
|
}), userCssClasses.noRefinementRoot),
|
|
19684
|
-
list: cx(suit$
|
|
20458
|
+
list: cx(suit$7({
|
|
19685
20459
|
descendantName: 'list'
|
|
19686
20460
|
}), userCssClasses.list),
|
|
19687
|
-
item: cx(suit$
|
|
20461
|
+
item: cx(suit$7({
|
|
19688
20462
|
descendantName: 'item'
|
|
19689
20463
|
}), userCssClasses.item),
|
|
19690
|
-
selectedItem: cx(suit$
|
|
20464
|
+
selectedItem: cx(suit$7({
|
|
19691
20465
|
descendantName: 'item',
|
|
19692
20466
|
modifierName: 'selected'
|
|
19693
20467
|
}), userCssClasses.selectedItem),
|
|
19694
|
-
separator: cx(suit$
|
|
20468
|
+
separator: cx(suit$7({
|
|
19695
20469
|
descendantName: 'separator'
|
|
19696
20470
|
}), userCssClasses.separator),
|
|
19697
|
-
link: cx(suit$
|
|
20471
|
+
link: cx(suit$7({
|
|
19698
20472
|
descendantName: 'link'
|
|
19699
20473
|
}), userCssClasses.link)
|
|
19700
20474
|
};
|
|
@@ -19744,10 +20518,10 @@
|
|
|
19744
20518
|
}
|
|
19745
20519
|
};
|
|
19746
20520
|
|
|
19747
|
-
var withUsage$
|
|
20521
|
+
var withUsage$B = createDocumentationMessageGenerator({
|
|
19748
20522
|
name: 'clear-refinements'
|
|
19749
20523
|
});
|
|
19750
|
-
var suit$
|
|
20524
|
+
var suit$8 = component('ClearRefinements');
|
|
19751
20525
|
var renderer$2 = function renderer(_ref) {
|
|
19752
20526
|
var containerNode = _ref.containerNode,
|
|
19753
20527
|
cssClasses = _ref.cssClasses,
|
|
@@ -19784,15 +20558,15 @@
|
|
|
19784
20558
|
_ref3$cssClasses = _ref3.cssClasses,
|
|
19785
20559
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses;
|
|
19786
20560
|
if (!container) {
|
|
19787
|
-
throw new Error(withUsage$
|
|
20561
|
+
throw new Error(withUsage$B('The `container` option is required.'));
|
|
19788
20562
|
}
|
|
19789
20563
|
var containerNode = getContainerNode(container);
|
|
19790
20564
|
var cssClasses = {
|
|
19791
|
-
root: cx(suit$
|
|
19792
|
-
button: cx(suit$
|
|
20565
|
+
root: cx(suit$8(), userCssClasses.root),
|
|
20566
|
+
button: cx(suit$8({
|
|
19793
20567
|
descendantName: 'button'
|
|
19794
20568
|
}), userCssClasses.button),
|
|
19795
|
-
disabledButton: cx(suit$
|
|
20569
|
+
disabledButton: cx(suit$8({
|
|
19796
20570
|
descendantName: 'button',
|
|
19797
20571
|
modifierName: 'disabled'
|
|
19798
20572
|
}), userCssClasses.disabledButton)
|
|
@@ -19815,22 +20589,6 @@
|
|
|
19815
20589
|
});
|
|
19816
20590
|
};
|
|
19817
20591
|
|
|
19818
|
-
/**
|
|
19819
|
-
* A list of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/)
|
|
19820
|
-
* to enable when the widget mounts.
|
|
19821
|
-
*/
|
|
19822
|
-
|
|
19823
|
-
var configure = function configure(widgetParams) {
|
|
19824
|
-
// This is a renderless widget that falls back to the connector's
|
|
19825
|
-
// noop render and unmount functions.
|
|
19826
|
-
var makeWidget = connectConfigure(noop);
|
|
19827
|
-
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
19828
|
-
searchParameters: widgetParams
|
|
19829
|
-
})), {}, {
|
|
19830
|
-
$$widgetType: 'ais.configure'
|
|
19831
|
-
});
|
|
19832
|
-
};
|
|
19833
|
-
|
|
19834
20592
|
var createItemKey = function createItemKey(_ref) {
|
|
19835
20593
|
var attribute = _ref.attribute,
|
|
19836
20594
|
value = _ref.value,
|
|
@@ -19878,10 +20636,10 @@
|
|
|
19878
20636
|
})));
|
|
19879
20637
|
};
|
|
19880
20638
|
|
|
19881
|
-
var withUsage$
|
|
20639
|
+
var withUsage$C = createDocumentationMessageGenerator({
|
|
19882
20640
|
name: 'current-refinements'
|
|
19883
20641
|
});
|
|
19884
|
-
var suit$
|
|
20642
|
+
var suit$9 = component('CurrentRefinements');
|
|
19885
20643
|
var renderer$3 = function renderer(_ref, isFirstRender) {
|
|
19886
20644
|
var items = _ref.items,
|
|
19887
20645
|
widgetParams = _ref.widgetParams,
|
|
@@ -19907,30 +20665,30 @@
|
|
|
19907
20665
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses,
|
|
19908
20666
|
transformItems = _ref3.transformItems;
|
|
19909
20667
|
if (!container) {
|
|
19910
|
-
throw new Error(withUsage$
|
|
20668
|
+
throw new Error(withUsage$C('The `container` option is required.'));
|
|
19911
20669
|
}
|
|
19912
20670
|
var containerNode = getContainerNode(container);
|
|
19913
20671
|
var cssClasses = {
|
|
19914
|
-
root: cx(suit$
|
|
19915
|
-
noRefinementRoot: cx(suit$
|
|
20672
|
+
root: cx(suit$9(), userCssClasses.root),
|
|
20673
|
+
noRefinementRoot: cx(suit$9({
|
|
19916
20674
|
modifierName: 'noRefinement'
|
|
19917
20675
|
}), userCssClasses.noRefinementRoot),
|
|
19918
|
-
list: cx(suit$
|
|
20676
|
+
list: cx(suit$9({
|
|
19919
20677
|
descendantName: 'list'
|
|
19920
20678
|
}), userCssClasses.list),
|
|
19921
|
-
item: cx(suit$
|
|
20679
|
+
item: cx(suit$9({
|
|
19922
20680
|
descendantName: 'item'
|
|
19923
20681
|
}), userCssClasses.item),
|
|
19924
|
-
label: cx(suit$
|
|
20682
|
+
label: cx(suit$9({
|
|
19925
20683
|
descendantName: 'label'
|
|
19926
20684
|
}), userCssClasses.label),
|
|
19927
|
-
category: cx(suit$
|
|
20685
|
+
category: cx(suit$9({
|
|
19928
20686
|
descendantName: 'category'
|
|
19929
20687
|
}), userCssClasses.category),
|
|
19930
|
-
categoryLabel: cx(suit$
|
|
20688
|
+
categoryLabel: cx(suit$9({
|
|
19931
20689
|
descendantName: 'categoryLabel'
|
|
19932
20690
|
}), userCssClasses.categoryLabel),
|
|
19933
|
-
delete: cx(suit$
|
|
20691
|
+
delete: cx(suit$9({
|
|
19934
20692
|
descendantName: 'delete'
|
|
19935
20693
|
}), userCssClasses.delete)
|
|
19936
20694
|
};
|
|
@@ -20337,13 +21095,13 @@
|
|
|
20337
21095
|
}), container.querySelector(".".concat(cssClasses.tree)));
|
|
20338
21096
|
};
|
|
20339
21097
|
|
|
20340
|
-
var _excluded$
|
|
21098
|
+
var _excluded$t = ["initialZoom", "initialPosition", "templates", "cssClasses", "builtInMarker", "customHTMLMarker", "enableRefine", "enableClearMapRefinement", "enableRefineControl", "container", "googleReference"],
|
|
20341
21099
|
_excluded2$5 = ["item"],
|
|
20342
21100
|
_excluded3 = ["item"];
|
|
20343
|
-
var withUsage$
|
|
21101
|
+
var withUsage$D = createDocumentationMessageGenerator({
|
|
20344
21102
|
name: 'geo-search'
|
|
20345
21103
|
});
|
|
20346
|
-
var suit$
|
|
21104
|
+
var suit$a = component('GeoSearch');
|
|
20347
21105
|
/**
|
|
20348
21106
|
* The **GeoSearch** widget displays the list of results from the search on a Google Maps. It also provides a way to search for results based on their position. The widget also provide some of the common GeoSearch patterns like search on map interaction.
|
|
20349
21107
|
*
|
|
@@ -20381,7 +21139,7 @@
|
|
|
20381
21139
|
enableRefineControl = _ref$enableRefineCont === void 0 ? true : _ref$enableRefineCont,
|
|
20382
21140
|
container = _ref.container,
|
|
20383
21141
|
googleReference = _ref.googleReference,
|
|
20384
|
-
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$
|
|
21142
|
+
otherWidgetParams = _objectWithoutProperties(_ref, _excluded$t);
|
|
20385
21143
|
var defaultBuiltInMarker = {
|
|
20386
21144
|
createOptions: function createOptions() {
|
|
20387
21145
|
return {};
|
|
@@ -20395,42 +21153,42 @@
|
|
|
20395
21153
|
events: {}
|
|
20396
21154
|
};
|
|
20397
21155
|
if (!container) {
|
|
20398
|
-
throw new Error(withUsage$
|
|
21156
|
+
throw new Error(withUsage$D('The `container` option is required.'));
|
|
20399
21157
|
}
|
|
20400
21158
|
if (!googleReference) {
|
|
20401
|
-
throw new Error(withUsage$
|
|
21159
|
+
throw new Error(withUsage$D('The `googleReference` option is required.'));
|
|
20402
21160
|
}
|
|
20403
21161
|
var containerNode = getContainerNode(container);
|
|
20404
21162
|
var cssClasses = {
|
|
20405
|
-
root: cx(suit$
|
|
21163
|
+
root: cx(suit$a(), userCssClasses.root),
|
|
20406
21164
|
// Required only to mount / unmount the Preact tree
|
|
20407
|
-
tree: suit$
|
|
21165
|
+
tree: suit$a({
|
|
20408
21166
|
descendantName: 'tree'
|
|
20409
21167
|
}),
|
|
20410
|
-
map: cx(suit$
|
|
21168
|
+
map: cx(suit$a({
|
|
20411
21169
|
descendantName: 'map'
|
|
20412
21170
|
}), userCssClasses.map),
|
|
20413
|
-
control: cx(suit$
|
|
21171
|
+
control: cx(suit$a({
|
|
20414
21172
|
descendantName: 'control'
|
|
20415
21173
|
}), userCssClasses.control),
|
|
20416
|
-
label: cx(suit$
|
|
21174
|
+
label: cx(suit$a({
|
|
20417
21175
|
descendantName: 'label'
|
|
20418
21176
|
}), userCssClasses.label),
|
|
20419
|
-
selectedLabel: cx(suit$
|
|
21177
|
+
selectedLabel: cx(suit$a({
|
|
20420
21178
|
descendantName: 'label',
|
|
20421
21179
|
modifierName: 'selected'
|
|
20422
21180
|
}), userCssClasses.selectedLabel),
|
|
20423
|
-
input: cx(suit$
|
|
21181
|
+
input: cx(suit$a({
|
|
20424
21182
|
descendantName: 'input'
|
|
20425
21183
|
}), userCssClasses.input),
|
|
20426
|
-
redo: cx(suit$
|
|
21184
|
+
redo: cx(suit$a({
|
|
20427
21185
|
descendantName: 'redo'
|
|
20428
21186
|
}), userCssClasses.redo),
|
|
20429
|
-
disabledRedo: cx(suit$
|
|
21187
|
+
disabledRedo: cx(suit$a({
|
|
20430
21188
|
descendantName: 'redo',
|
|
20431
21189
|
modifierName: 'disabled'
|
|
20432
21190
|
}), userCssClasses.disabledRedo),
|
|
20433
|
-
reset: cx(suit$
|
|
21191
|
+
reset: cx(suit$a({
|
|
20434
21192
|
descendantName: 'reset'
|
|
20435
21193
|
}), userCssClasses.reset)
|
|
20436
21194
|
};
|
|
@@ -20454,7 +21212,7 @@
|
|
|
20454
21212
|
return new HTMLMarker(_objectSpread2(_objectSpread2(_objectSpread2({}, customHTMLMarker.createOptions(item)), rest), {}, {
|
|
20455
21213
|
__id: item.objectID,
|
|
20456
21214
|
position: item._geoloc,
|
|
20457
|
-
className: cx(suit$
|
|
21215
|
+
className: cx(suit$a({
|
|
20458
21216
|
descendantName: 'marker'
|
|
20459
21217
|
})),
|
|
20460
21218
|
template: renderTemplate({
|
|
@@ -20503,7 +21261,8 @@
|
|
|
20503
21261
|
onChange: noop,
|
|
20504
21262
|
onSubmit: noop,
|
|
20505
21263
|
onReset: noop,
|
|
20506
|
-
refine: noop
|
|
21264
|
+
refine: noop,
|
|
21265
|
+
inputProps: {}
|
|
20507
21266
|
};
|
|
20508
21267
|
var SearchBox = /*#__PURE__*/function (_Component) {
|
|
20509
21268
|
_inherits(SearchBox, _Component);
|
|
@@ -20521,6 +21280,9 @@
|
|
|
20521
21280
|
});
|
|
20522
21281
|
_defineProperty(_assertThisInitialized(_this), "input", y());
|
|
20523
21282
|
_defineProperty(_assertThisInitialized(_this), "onInput", function (event) {
|
|
21283
|
+
var _this$props$inputProp, _this$props$inputProp2;
|
|
21284
|
+
// @ts-expect-error the context incompatibility of `this` doesn't matter
|
|
21285
|
+
(_this$props$inputProp = (_this$props$inputProp2 = _this.props.inputProps).onInput) === null || _this$props$inputProp === void 0 ? void 0 : _this$props$inputProp.call(_this$props$inputProp2, event);
|
|
20524
21286
|
var _this$props = _this.props,
|
|
20525
21287
|
searchAsYouType = _this$props.searchAsYouType,
|
|
20526
21288
|
refine = _this$props.refine,
|
|
@@ -20566,12 +21328,18 @@
|
|
|
20566
21328
|
});
|
|
20567
21329
|
onReset(event);
|
|
20568
21330
|
});
|
|
20569
|
-
_defineProperty(_assertThisInitialized(_this), "onBlur", function () {
|
|
21331
|
+
_defineProperty(_assertThisInitialized(_this), "onBlur", function (event) {
|
|
21332
|
+
var _this$props$inputProp3, _this$props$inputProp4;
|
|
21333
|
+
// @ts-expect-error the context incompatibility of `this` doesn't matter
|
|
21334
|
+
(_this$props$inputProp3 = (_this$props$inputProp4 = _this.props.inputProps).onBlur) === null || _this$props$inputProp3 === void 0 ? void 0 : _this$props$inputProp3.call(_this$props$inputProp4, event);
|
|
20570
21335
|
_this.setState({
|
|
20571
21336
|
focused: false
|
|
20572
21337
|
});
|
|
20573
21338
|
});
|
|
20574
|
-
_defineProperty(_assertThisInitialized(_this), "onFocus", function () {
|
|
21339
|
+
_defineProperty(_assertThisInitialized(_this), "onFocus", function (event) {
|
|
21340
|
+
var _this$props$inputProp5, _this$props$inputProp6;
|
|
21341
|
+
// @ts-expect-error the context incompatibility of `this` doesn't matter
|
|
21342
|
+
(_this$props$inputProp5 = (_this$props$inputProp6 = _this.props.inputProps).onFocus) === null || _this$props$inputProp5 === void 0 ? void 0 : _this$props$inputProp5.call(_this$props$inputProp6, event);
|
|
20575
21343
|
_this.setState({
|
|
20576
21344
|
focused: true
|
|
20577
21345
|
});
|
|
@@ -20619,7 +21387,8 @@
|
|
|
20619
21387
|
showLoadingIndicator = _this$props4.showLoadingIndicator,
|
|
20620
21388
|
templates = _this$props4.templates,
|
|
20621
21389
|
isSearchStalled = _this$props4.isSearchStalled,
|
|
20622
|
-
ariaLabel = _this$props4.ariaLabel
|
|
21390
|
+
ariaLabel = _this$props4.ariaLabel,
|
|
21391
|
+
inputProps = _this$props4.inputProps;
|
|
20623
21392
|
return h("div", {
|
|
20624
21393
|
className: cssClasses.root
|
|
20625
21394
|
}, h("form", {
|
|
@@ -20629,7 +21398,7 @@
|
|
|
20629
21398
|
noValidate: true,
|
|
20630
21399
|
onSubmit: this.onSubmit,
|
|
20631
21400
|
onReset: this.onReset
|
|
20632
|
-
}, h("input", {
|
|
21401
|
+
}, h("input", _extends({}, inputProps, {
|
|
20633
21402
|
ref: this.input,
|
|
20634
21403
|
value: this.state.query,
|
|
20635
21404
|
disabled: this.props.disabled,
|
|
@@ -20652,7 +21421,7 @@
|
|
|
20652
21421
|
onBlur: this.onBlur,
|
|
20653
21422
|
onFocus: this.onFocus,
|
|
20654
21423
|
"aria-label": ariaLabel
|
|
20655
|
-
}), h(Template, {
|
|
21424
|
+
})), h(Template, {
|
|
20656
21425
|
templateKey: "submit",
|
|
20657
21426
|
rootTagName: "button",
|
|
20658
21427
|
rootProps: {
|
|
@@ -20720,7 +21489,7 @@
|
|
|
20720
21489
|
})), subItems);
|
|
20721
21490
|
}
|
|
20722
21491
|
|
|
20723
|
-
var _excluded$
|
|
21492
|
+
var _excluded$u = ["root"];
|
|
20724
21493
|
|
|
20725
21494
|
// CSS types
|
|
20726
21495
|
|
|
@@ -20749,7 +21518,7 @@
|
|
|
20749
21518
|
if (isHierarchicalMenuItem(facetValue) && Array.isArray(facetValue.data) && facetValue.data.length > 0) {
|
|
20750
21519
|
var _this$props$cssClasse = _this.props.cssClasses,
|
|
20751
21520
|
root = _this$props$cssClasse.root,
|
|
20752
|
-
cssClasses = _objectWithoutProperties(_this$props$cssClasse, _excluded$
|
|
21521
|
+
cssClasses = _objectWithoutProperties(_this$props$cssClasse, _excluded$u);
|
|
20753
21522
|
subItems = h(RefinementList, _extends({}, _this.props, {
|
|
20754
21523
|
// We want to keep `root` required for external usage but not for the
|
|
20755
21524
|
// sub items.
|
|
@@ -20964,10 +21733,10 @@
|
|
|
20964
21733
|
}
|
|
20965
21734
|
};
|
|
20966
21735
|
|
|
20967
|
-
var withUsage$
|
|
21736
|
+
var withUsage$E = createDocumentationMessageGenerator({
|
|
20968
21737
|
name: 'hierarchical-menu'
|
|
20969
21738
|
});
|
|
20970
|
-
var suit$
|
|
21739
|
+
var suit$b = component('HierarchicalMenu');
|
|
20971
21740
|
var renderer$5 = function renderer(_ref) {
|
|
20972
21741
|
var cssClasses = _ref.cssClasses,
|
|
20973
21742
|
containerNode = _ref.containerNode,
|
|
@@ -21074,49 +21843,49 @@
|
|
|
21074
21843
|
_ref3$cssClasses = _ref3.cssClasses,
|
|
21075
21844
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses;
|
|
21076
21845
|
if (!container) {
|
|
21077
|
-
throw new Error(withUsage$
|
|
21846
|
+
throw new Error(withUsage$E('The `container` option is required.'));
|
|
21078
21847
|
}
|
|
21079
21848
|
var containerNode = getContainerNode(container);
|
|
21080
21849
|
var cssClasses = {
|
|
21081
|
-
root: cx(suit$
|
|
21082
|
-
noRefinementRoot: cx(suit$
|
|
21850
|
+
root: cx(suit$b(), userCssClasses.root),
|
|
21851
|
+
noRefinementRoot: cx(suit$b({
|
|
21083
21852
|
modifierName: 'noRefinement'
|
|
21084
21853
|
}), userCssClasses.noRefinementRoot),
|
|
21085
|
-
list: cx(suit$
|
|
21854
|
+
list: cx(suit$b({
|
|
21086
21855
|
descendantName: 'list'
|
|
21087
21856
|
}), userCssClasses.list),
|
|
21088
|
-
childList: cx(suit$
|
|
21857
|
+
childList: cx(suit$b({
|
|
21089
21858
|
descendantName: 'list',
|
|
21090
21859
|
modifierName: 'child'
|
|
21091
21860
|
}), userCssClasses.childList),
|
|
21092
|
-
item: cx(suit$
|
|
21861
|
+
item: cx(suit$b({
|
|
21093
21862
|
descendantName: 'item'
|
|
21094
21863
|
}), userCssClasses.item),
|
|
21095
|
-
selectedItem: cx(suit$
|
|
21864
|
+
selectedItem: cx(suit$b({
|
|
21096
21865
|
descendantName: 'item',
|
|
21097
21866
|
modifierName: 'selected'
|
|
21098
21867
|
}), userCssClasses.selectedItem),
|
|
21099
|
-
parentItem: cx(suit$
|
|
21868
|
+
parentItem: cx(suit$b({
|
|
21100
21869
|
descendantName: 'item',
|
|
21101
21870
|
modifierName: 'parent'
|
|
21102
21871
|
}), userCssClasses.parentItem),
|
|
21103
|
-
link: cx(suit$
|
|
21872
|
+
link: cx(suit$b({
|
|
21104
21873
|
descendantName: 'link'
|
|
21105
21874
|
}), userCssClasses.link),
|
|
21106
|
-
selectedItemLink: cx(suit$
|
|
21875
|
+
selectedItemLink: cx(suit$b({
|
|
21107
21876
|
descendantName: 'link',
|
|
21108
21877
|
modifierName: 'selected'
|
|
21109
21878
|
}), userCssClasses.selectedItemLink),
|
|
21110
|
-
label: cx(suit$
|
|
21879
|
+
label: cx(suit$b({
|
|
21111
21880
|
descendantName: 'label'
|
|
21112
21881
|
}), userCssClasses.label),
|
|
21113
|
-
count: cx(suit$
|
|
21882
|
+
count: cx(suit$b({
|
|
21114
21883
|
descendantName: 'count'
|
|
21115
21884
|
}), userCssClasses.count),
|
|
21116
|
-
showMore: cx(suit$
|
|
21885
|
+
showMore: cx(suit$b({
|
|
21117
21886
|
descendantName: 'showMore'
|
|
21118
21887
|
}), userCssClasses.showMore),
|
|
21119
|
-
disabledShowMore: cx(suit$
|
|
21888
|
+
disabledShowMore: cx(suit$b({
|
|
21120
21889
|
descendantName: 'showMore',
|
|
21121
21890
|
modifierName: 'disabled'
|
|
21122
21891
|
}), userCssClasses.disabledShowMore)
|
|
@@ -21158,8 +21927,8 @@
|
|
|
21158
21927
|
}
|
|
21159
21928
|
};
|
|
21160
21929
|
|
|
21161
|
-
var _excluded$
|
|
21162
|
-
var withUsage$
|
|
21930
|
+
var _excluded$v = ["hit", "index"];
|
|
21931
|
+
var withUsage$F = createDocumentationMessageGenerator({
|
|
21163
21932
|
name: 'hits'
|
|
21164
21933
|
});
|
|
21165
21934
|
var Hits = createHitsComponent({
|
|
@@ -21206,7 +21975,7 @@
|
|
|
21206
21975
|
var itemComponent = function itemComponent(_ref4) {
|
|
21207
21976
|
var hit = _ref4.hit,
|
|
21208
21977
|
index = _ref4.index,
|
|
21209
|
-
rootProps = _objectWithoutProperties(_ref4, _excluded$
|
|
21978
|
+
rootProps = _objectWithoutProperties(_ref4, _excluded$v);
|
|
21210
21979
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
21211
21980
|
templateKey: "item",
|
|
21212
21981
|
rootTagName: "li",
|
|
@@ -21258,7 +22027,7 @@
|
|
|
21258
22027
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
21259
22028
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
21260
22029
|
if (!container) {
|
|
21261
|
-
throw new Error(withUsage$
|
|
22030
|
+
throw new Error(withUsage$F('The `container` option is required.'));
|
|
21262
22031
|
}
|
|
21263
22032
|
var containerNode = getContainerNode(container);
|
|
21264
22033
|
var specializedRenderer = renderer$6({
|
|
@@ -21300,10 +22069,10 @@
|
|
|
21300
22069
|
}));
|
|
21301
22070
|
}
|
|
21302
22071
|
|
|
21303
|
-
var withUsage$
|
|
22072
|
+
var withUsage$G = createDocumentationMessageGenerator({
|
|
21304
22073
|
name: 'hits-per-page'
|
|
21305
22074
|
});
|
|
21306
|
-
var suit$
|
|
22075
|
+
var suit$c = component('HitsPerPage');
|
|
21307
22076
|
var renderer$7 = function renderer(_ref) {
|
|
21308
22077
|
var containerNode = _ref.containerNode,
|
|
21309
22078
|
cssClasses = _ref.cssClasses;
|
|
@@ -21336,15 +22105,15 @@
|
|
|
21336
22105
|
userCssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses,
|
|
21337
22106
|
transformItems = _ref5.transformItems;
|
|
21338
22107
|
if (!container) {
|
|
21339
|
-
throw new Error(withUsage$
|
|
22108
|
+
throw new Error(withUsage$G('The `container` option is required.'));
|
|
21340
22109
|
}
|
|
21341
22110
|
var containerNode = getContainerNode(container);
|
|
21342
22111
|
var cssClasses = {
|
|
21343
|
-
root: cx(suit$
|
|
21344
|
-
select: cx(suit$
|
|
22112
|
+
root: cx(suit$c(), userCssClasses.root),
|
|
22113
|
+
select: cx(suit$c({
|
|
21345
22114
|
descendantName: 'select'
|
|
21346
22115
|
}), userCssClasses.select),
|
|
21347
|
-
option: cx(suit$
|
|
22116
|
+
option: cx(suit$c({
|
|
21348
22117
|
descendantName: 'option'
|
|
21349
22118
|
}), userCssClasses.option)
|
|
21350
22119
|
};
|
|
@@ -21496,10 +22265,10 @@
|
|
|
21496
22265
|
}
|
|
21497
22266
|
};
|
|
21498
22267
|
|
|
21499
|
-
var withUsage$
|
|
22268
|
+
var withUsage$H = createDocumentationMessageGenerator({
|
|
21500
22269
|
name: 'infinite-hits'
|
|
21501
22270
|
});
|
|
21502
|
-
var suit$
|
|
22271
|
+
var suit$d = component('InfiniteHits');
|
|
21503
22272
|
var renderer$8 = function renderer(_ref) {
|
|
21504
22273
|
var containerNode = _ref.containerNode,
|
|
21505
22274
|
cssClasses = _ref.cssClasses,
|
|
@@ -21555,41 +22324,41 @@
|
|
|
21555
22324
|
showPrevious = _ref3.showPrevious,
|
|
21556
22325
|
cache = _ref3.cache;
|
|
21557
22326
|
if (!container) {
|
|
21558
|
-
throw new Error(withUsage$
|
|
22327
|
+
throw new Error(withUsage$H('The `container` option is required.'));
|
|
21559
22328
|
}
|
|
21560
22329
|
var containerNode = getContainerNode(container);
|
|
21561
22330
|
var cssClasses = {
|
|
21562
|
-
root: cx(suit$
|
|
21563
|
-
emptyRoot: cx(suit$
|
|
22331
|
+
root: cx(suit$d(), userCssClasses.root),
|
|
22332
|
+
emptyRoot: cx(suit$d({
|
|
21564
22333
|
modifierName: 'empty'
|
|
21565
22334
|
}), userCssClasses.emptyRoot),
|
|
21566
|
-
item: cx(suit$
|
|
22335
|
+
item: cx(suit$d({
|
|
21567
22336
|
descendantName: 'item'
|
|
21568
22337
|
}), userCssClasses.item),
|
|
21569
|
-
list: cx(suit$
|
|
22338
|
+
list: cx(suit$d({
|
|
21570
22339
|
descendantName: 'list'
|
|
21571
22340
|
}), userCssClasses.list),
|
|
21572
|
-
loadPrevious: cx(suit$
|
|
22341
|
+
loadPrevious: cx(suit$d({
|
|
21573
22342
|
descendantName: 'loadPrevious'
|
|
21574
22343
|
}), userCssClasses.loadPrevious),
|
|
21575
|
-
disabledLoadPrevious: cx(suit$
|
|
22344
|
+
disabledLoadPrevious: cx(suit$d({
|
|
21576
22345
|
descendantName: 'loadPrevious',
|
|
21577
22346
|
modifierName: 'disabled'
|
|
21578
22347
|
}), userCssClasses.disabledLoadPrevious),
|
|
21579
|
-
loadMore: cx(suit$
|
|
22348
|
+
loadMore: cx(suit$d({
|
|
21580
22349
|
descendantName: 'loadMore'
|
|
21581
22350
|
}), userCssClasses.loadMore),
|
|
21582
|
-
disabledLoadMore: cx(suit$
|
|
22351
|
+
disabledLoadMore: cx(suit$d({
|
|
21583
22352
|
descendantName: 'loadMore',
|
|
21584
22353
|
modifierName: 'disabled'
|
|
21585
22354
|
}), userCssClasses.disabledLoadMore),
|
|
21586
|
-
bannerRoot: cx(suit$
|
|
22355
|
+
bannerRoot: cx(suit$d({
|
|
21587
22356
|
descendantName: 'banner'
|
|
21588
22357
|
}), userCssClasses.bannerRoot),
|
|
21589
|
-
bannerImage: cx(suit$
|
|
22358
|
+
bannerImage: cx(suit$d({
|
|
21590
22359
|
descendantName: 'banner-image'
|
|
21591
22360
|
}), userCssClasses.bannerImage),
|
|
21592
|
-
bannerLink: cx(suit$
|
|
22361
|
+
bannerLink: cx(suit$d({
|
|
21593
22362
|
descendantName: 'banner-link'
|
|
21594
22363
|
}), userCssClasses.bannerLink)
|
|
21595
22364
|
};
|
|
@@ -21634,10 +22403,10 @@
|
|
|
21634
22403
|
}
|
|
21635
22404
|
};
|
|
21636
22405
|
|
|
21637
|
-
var withUsage$
|
|
22406
|
+
var withUsage$I = createDocumentationMessageGenerator({
|
|
21638
22407
|
name: 'menu'
|
|
21639
22408
|
});
|
|
21640
|
-
var suit$
|
|
22409
|
+
var suit$e = component('Menu');
|
|
21641
22410
|
var renderer$9 = function renderer(_ref) {
|
|
21642
22411
|
var containerNode = _ref.containerNode,
|
|
21643
22412
|
cssClasses = _ref.cssClasses,
|
|
@@ -21692,37 +22461,37 @@
|
|
|
21692
22461
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
21693
22462
|
transformItems = _ref3.transformItems;
|
|
21694
22463
|
if (!container) {
|
|
21695
|
-
throw new Error(withUsage$
|
|
22464
|
+
throw new Error(withUsage$I('The `container` option is required.'));
|
|
21696
22465
|
}
|
|
21697
22466
|
var containerNode = getContainerNode(container);
|
|
21698
22467
|
var cssClasses = {
|
|
21699
|
-
root: cx(suit$
|
|
21700
|
-
noRefinementRoot: cx(suit$
|
|
22468
|
+
root: cx(suit$e(), userCssClasses.root),
|
|
22469
|
+
noRefinementRoot: cx(suit$e({
|
|
21701
22470
|
modifierName: 'noRefinement'
|
|
21702
22471
|
}), userCssClasses.noRefinementRoot),
|
|
21703
|
-
list: cx(suit$
|
|
22472
|
+
list: cx(suit$e({
|
|
21704
22473
|
descendantName: 'list'
|
|
21705
22474
|
}), userCssClasses.list),
|
|
21706
|
-
item: cx(suit$
|
|
22475
|
+
item: cx(suit$e({
|
|
21707
22476
|
descendantName: 'item'
|
|
21708
22477
|
}), userCssClasses.item),
|
|
21709
|
-
selectedItem: cx(suit$
|
|
22478
|
+
selectedItem: cx(suit$e({
|
|
21710
22479
|
descendantName: 'item',
|
|
21711
22480
|
modifierName: 'selected'
|
|
21712
22481
|
}), userCssClasses.selectedItem),
|
|
21713
|
-
link: cx(suit$
|
|
22482
|
+
link: cx(suit$e({
|
|
21714
22483
|
descendantName: 'link'
|
|
21715
22484
|
}), userCssClasses.link),
|
|
21716
|
-
label: cx(suit$
|
|
22485
|
+
label: cx(suit$e({
|
|
21717
22486
|
descendantName: 'label'
|
|
21718
22487
|
}), userCssClasses.label),
|
|
21719
|
-
count: cx(suit$
|
|
22488
|
+
count: cx(suit$e({
|
|
21720
22489
|
descendantName: 'count'
|
|
21721
22490
|
}), userCssClasses.count),
|
|
21722
|
-
showMore: cx(suit$
|
|
22491
|
+
showMore: cx(suit$e({
|
|
21723
22492
|
descendantName: 'showMore'
|
|
21724
22493
|
}), userCssClasses.showMore),
|
|
21725
|
-
disabledShowMore: cx(suit$
|
|
22494
|
+
disabledShowMore: cx(suit$e({
|
|
21726
22495
|
descendantName: 'showMore',
|
|
21727
22496
|
modifierName: 'disabled'
|
|
21728
22497
|
}), userCssClasses.disabledShowMore)
|
|
@@ -21800,10 +22569,10 @@
|
|
|
21800
22569
|
}
|
|
21801
22570
|
};
|
|
21802
22571
|
|
|
21803
|
-
var withUsage$
|
|
22572
|
+
var withUsage$J = createDocumentationMessageGenerator({
|
|
21804
22573
|
name: 'menu-select'
|
|
21805
22574
|
});
|
|
21806
|
-
var suit$
|
|
22575
|
+
var suit$f = component('MenuSelect');
|
|
21807
22576
|
var renderer$a = function renderer(_ref) {
|
|
21808
22577
|
var containerNode = _ref.containerNode,
|
|
21809
22578
|
cssClasses = _ref.cssClasses,
|
|
@@ -21843,18 +22612,18 @@
|
|
|
21843
22612
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
21844
22613
|
transformItems = _ref3.transformItems;
|
|
21845
22614
|
if (!container) {
|
|
21846
|
-
throw new Error(withUsage$
|
|
22615
|
+
throw new Error(withUsage$J('The `container` option is required.'));
|
|
21847
22616
|
}
|
|
21848
22617
|
var containerNode = getContainerNode(container);
|
|
21849
22618
|
var cssClasses = {
|
|
21850
|
-
root: cx(suit$
|
|
21851
|
-
noRefinementRoot: cx(suit$
|
|
22619
|
+
root: cx(suit$f(), userCssClasses.root),
|
|
22620
|
+
noRefinementRoot: cx(suit$f({
|
|
21852
22621
|
modifierName: 'noRefinement'
|
|
21853
22622
|
}), userCssClasses.noRefinementRoot),
|
|
21854
|
-
select: cx(suit$
|
|
22623
|
+
select: cx(suit$f({
|
|
21855
22624
|
descendantName: 'select'
|
|
21856
22625
|
}), userCssClasses.select),
|
|
21857
|
-
option: cx(suit$
|
|
22626
|
+
option: cx(suit$f({
|
|
21858
22627
|
descendantName: 'option'
|
|
21859
22628
|
}), userCssClasses.option)
|
|
21860
22629
|
};
|
|
@@ -21896,10 +22665,10 @@
|
|
|
21896
22665
|
}
|
|
21897
22666
|
};
|
|
21898
22667
|
|
|
21899
|
-
var withUsage$
|
|
22668
|
+
var withUsage$K = createDocumentationMessageGenerator({
|
|
21900
22669
|
name: 'numeric-menu'
|
|
21901
22670
|
});
|
|
21902
|
-
var suit$
|
|
22671
|
+
var suit$g = component('NumericMenu');
|
|
21903
22672
|
var renderer$b = function renderer(_ref) {
|
|
21904
22673
|
var containerNode = _ref.containerNode,
|
|
21905
22674
|
attribute = _ref.attribute,
|
|
@@ -21940,31 +22709,31 @@
|
|
|
21940
22709
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
21941
22710
|
transformItems = _ref3.transformItems;
|
|
21942
22711
|
if (!container) {
|
|
21943
|
-
throw new Error(withUsage$
|
|
22712
|
+
throw new Error(withUsage$K('The `container` option is required.'));
|
|
21944
22713
|
}
|
|
21945
22714
|
var containerNode = getContainerNode(container);
|
|
21946
22715
|
var cssClasses = {
|
|
21947
|
-
root: cx(suit$
|
|
21948
|
-
noRefinementRoot: cx(suit$
|
|
22716
|
+
root: cx(suit$g(), userCssClasses.root),
|
|
22717
|
+
noRefinementRoot: cx(suit$g({
|
|
21949
22718
|
modifierName: 'noRefinement'
|
|
21950
22719
|
}), userCssClasses.noRefinementRoot),
|
|
21951
|
-
list: cx(suit$
|
|
22720
|
+
list: cx(suit$g({
|
|
21952
22721
|
descendantName: 'list'
|
|
21953
22722
|
}), userCssClasses.list),
|
|
21954
|
-
item: cx(suit$
|
|
22723
|
+
item: cx(suit$g({
|
|
21955
22724
|
descendantName: 'item'
|
|
21956
22725
|
}), userCssClasses.item),
|
|
21957
|
-
selectedItem: cx(suit$
|
|
22726
|
+
selectedItem: cx(suit$g({
|
|
21958
22727
|
descendantName: 'item',
|
|
21959
22728
|
modifierName: 'selected'
|
|
21960
22729
|
}), userCssClasses.selectedItem),
|
|
21961
|
-
label: cx(suit$
|
|
22730
|
+
label: cx(suit$g({
|
|
21962
22731
|
descendantName: 'label'
|
|
21963
22732
|
}), userCssClasses.label),
|
|
21964
|
-
radio: cx(suit$
|
|
22733
|
+
radio: cx(suit$g({
|
|
21965
22734
|
descendantName: 'radio'
|
|
21966
22735
|
}), userCssClasses.radio),
|
|
21967
|
-
labelText: cx(suit$
|
|
22736
|
+
labelText: cx(suit$g({
|
|
21968
22737
|
descendantName: 'labelText'
|
|
21969
22738
|
}), userCssClasses.labelText)
|
|
21970
22739
|
};
|
|
@@ -22100,8 +22869,8 @@
|
|
|
22100
22869
|
}));
|
|
22101
22870
|
}
|
|
22102
22871
|
|
|
22103
|
-
var suit$
|
|
22104
|
-
var withUsage$
|
|
22872
|
+
var suit$h = component('Pagination');
|
|
22873
|
+
var withUsage$L = createDocumentationMessageGenerator({
|
|
22105
22874
|
name: 'pagination'
|
|
22106
22875
|
});
|
|
22107
22876
|
var defaultTemplates$a = {
|
|
@@ -22183,51 +22952,51 @@
|
|
|
22183
22952
|
_ref4$scrollTo = _ref4.scrollTo,
|
|
22184
22953
|
userScrollTo = _ref4$scrollTo === void 0 ? 'body' : _ref4$scrollTo;
|
|
22185
22954
|
if (!container) {
|
|
22186
|
-
throw new Error(withUsage$
|
|
22955
|
+
throw new Error(withUsage$L('The `container` option is required.'));
|
|
22187
22956
|
}
|
|
22188
22957
|
var containerNode = getContainerNode(container);
|
|
22189
22958
|
var scrollTo = userScrollTo === true ? 'body' : userScrollTo;
|
|
22190
22959
|
var scrollToNode = scrollTo !== false ? getContainerNode(scrollTo) : false;
|
|
22191
22960
|
var cssClasses = {
|
|
22192
|
-
root: cx(suit$
|
|
22193
|
-
noRefinementRoot: cx(suit$
|
|
22961
|
+
root: cx(suit$h(), userCssClasses.root),
|
|
22962
|
+
noRefinementRoot: cx(suit$h({
|
|
22194
22963
|
modifierName: 'noRefinement'
|
|
22195
22964
|
}), userCssClasses.noRefinementRoot),
|
|
22196
|
-
list: cx(suit$
|
|
22965
|
+
list: cx(suit$h({
|
|
22197
22966
|
descendantName: 'list'
|
|
22198
22967
|
}), userCssClasses.list),
|
|
22199
|
-
item: cx(suit$
|
|
22968
|
+
item: cx(suit$h({
|
|
22200
22969
|
descendantName: 'item'
|
|
22201
22970
|
}), userCssClasses.item),
|
|
22202
|
-
firstPageItem: cx(suit$
|
|
22971
|
+
firstPageItem: cx(suit$h({
|
|
22203
22972
|
descendantName: 'item',
|
|
22204
22973
|
modifierName: 'firstPage'
|
|
22205
22974
|
}), userCssClasses.firstPageItem),
|
|
22206
|
-
lastPageItem: cx(suit$
|
|
22975
|
+
lastPageItem: cx(suit$h({
|
|
22207
22976
|
descendantName: 'item',
|
|
22208
22977
|
modifierName: 'lastPage'
|
|
22209
22978
|
}), userCssClasses.lastPageItem),
|
|
22210
|
-
previousPageItem: cx(suit$
|
|
22979
|
+
previousPageItem: cx(suit$h({
|
|
22211
22980
|
descendantName: 'item',
|
|
22212
22981
|
modifierName: 'previousPage'
|
|
22213
22982
|
}), userCssClasses.previousPageItem),
|
|
22214
|
-
nextPageItem: cx(suit$
|
|
22983
|
+
nextPageItem: cx(suit$h({
|
|
22215
22984
|
descendantName: 'item',
|
|
22216
22985
|
modifierName: 'nextPage'
|
|
22217
22986
|
}), userCssClasses.nextPageItem),
|
|
22218
|
-
pageItem: cx(suit$
|
|
22987
|
+
pageItem: cx(suit$h({
|
|
22219
22988
|
descendantName: 'item',
|
|
22220
22989
|
modifierName: 'page'
|
|
22221
22990
|
}), userCssClasses.pageItem),
|
|
22222
|
-
selectedItem: cx(suit$
|
|
22991
|
+
selectedItem: cx(suit$h({
|
|
22223
22992
|
descendantName: 'item',
|
|
22224
22993
|
modifierName: 'selected'
|
|
22225
22994
|
}), userCssClasses.selectedItem),
|
|
22226
|
-
disabledItem: cx(suit$
|
|
22995
|
+
disabledItem: cx(suit$h({
|
|
22227
22996
|
descendantName: 'item',
|
|
22228
22997
|
modifierName: 'disabled'
|
|
22229
22998
|
}), userCssClasses.disabledItem),
|
|
22230
|
-
link: cx(suit$
|
|
22999
|
+
link: cx(suit$h({
|
|
22231
23000
|
descendantName: 'link'
|
|
22232
23001
|
}), userCssClasses.link)
|
|
22233
23002
|
};
|
|
@@ -22316,10 +23085,10 @@
|
|
|
22316
23085
|
}));
|
|
22317
23086
|
}
|
|
22318
23087
|
|
|
22319
|
-
var withUsage$
|
|
23088
|
+
var withUsage$M = createDocumentationMessageGenerator({
|
|
22320
23089
|
name: 'panel'
|
|
22321
23090
|
});
|
|
22322
|
-
var suit$
|
|
23091
|
+
var suit$i = component('Panel');
|
|
22323
23092
|
var renderer$d = function renderer(_ref) {
|
|
22324
23093
|
var containerNode = _ref.containerNode,
|
|
22325
23094
|
bodyContainerNode = _ref.bodyContainerNode,
|
|
@@ -22364,36 +23133,36 @@
|
|
|
22364
23133
|
return false;
|
|
22365
23134
|
};
|
|
22366
23135
|
var cssClasses = {
|
|
22367
|
-
root: cx(suit$
|
|
22368
|
-
noRefinementRoot: cx(suit$
|
|
23136
|
+
root: cx(suit$i(), userCssClasses.root),
|
|
23137
|
+
noRefinementRoot: cx(suit$i({
|
|
22369
23138
|
modifierName: 'noRefinement'
|
|
22370
23139
|
}), userCssClasses.noRefinementRoot),
|
|
22371
|
-
collapsibleRoot: cx(suit$
|
|
23140
|
+
collapsibleRoot: cx(suit$i({
|
|
22372
23141
|
modifierName: 'collapsible'
|
|
22373
23142
|
}), userCssClasses.collapsibleRoot),
|
|
22374
|
-
collapsedRoot: cx(suit$
|
|
23143
|
+
collapsedRoot: cx(suit$i({
|
|
22375
23144
|
modifierName: 'collapsed'
|
|
22376
23145
|
}), userCssClasses.collapsedRoot),
|
|
22377
|
-
collapseButton: cx(suit$
|
|
23146
|
+
collapseButton: cx(suit$i({
|
|
22378
23147
|
descendantName: 'collapseButton'
|
|
22379
23148
|
}), userCssClasses.collapseButton),
|
|
22380
|
-
collapseIcon: cx(suit$
|
|
23149
|
+
collapseIcon: cx(suit$i({
|
|
22381
23150
|
descendantName: 'collapseIcon'
|
|
22382
23151
|
}), userCssClasses.collapseIcon),
|
|
22383
|
-
body: cx(suit$
|
|
23152
|
+
body: cx(suit$i({
|
|
22384
23153
|
descendantName: 'body'
|
|
22385
23154
|
}), userCssClasses.body),
|
|
22386
|
-
header: cx(suit$
|
|
23155
|
+
header: cx(suit$i({
|
|
22387
23156
|
descendantName: 'header'
|
|
22388
23157
|
}), userCssClasses.header),
|
|
22389
|
-
footer: cx(suit$
|
|
23158
|
+
footer: cx(suit$i({
|
|
22390
23159
|
descendantName: 'footer'
|
|
22391
23160
|
}), userCssClasses.footer)
|
|
22392
23161
|
};
|
|
22393
23162
|
return function (widgetFactory) {
|
|
22394
23163
|
return function (widgetParams) {
|
|
22395
23164
|
if (!(widgetParams && widgetParams.container)) {
|
|
22396
|
-
throw new Error(withUsage$
|
|
23165
|
+
throw new Error(withUsage$M("The `container` option is required in the widget within the panel."));
|
|
22397
23166
|
}
|
|
22398
23167
|
var containerNode = getContainerNode(widgetParams.container);
|
|
22399
23168
|
var defaultTemplates = {
|
|
@@ -22467,7 +23236,7 @@
|
|
|
22467
23236
|
};
|
|
22468
23237
|
};
|
|
22469
23238
|
|
|
22470
|
-
var _excluded$
|
|
23239
|
+
var _excluded$w = ["placesReference", "defaultPosition"],
|
|
22471
23240
|
_excluded2$6 = ["places"];
|
|
22472
23241
|
|
|
22473
23242
|
/* Places.js is an optional dependency, no error should be reported if the package is missing */
|
|
@@ -22485,7 +23254,7 @@
|
|
|
22485
23254
|
placesReference = _ref.placesReference,
|
|
22486
23255
|
_ref$defaultPosition = _ref.defaultPosition,
|
|
22487
23256
|
defaultPosition = _ref$defaultPosition === void 0 ? [] : _ref$defaultPosition,
|
|
22488
|
-
placesOptions = _objectWithoutProperties(_ref, _excluded$
|
|
23257
|
+
placesOptions = _objectWithoutProperties(_ref, _excluded$w);
|
|
22489
23258
|
if (typeof placesReference !== 'function') {
|
|
22490
23259
|
throw new Error('The `placesReference` option requires a valid Places.js reference.');
|
|
22491
23260
|
}
|
|
@@ -22597,8 +23366,8 @@
|
|
|
22597
23366
|
}))));
|
|
22598
23367
|
};
|
|
22599
23368
|
|
|
22600
|
-
var suit$
|
|
22601
|
-
var withUsage$
|
|
23369
|
+
var suit$j = component('PoweredBy');
|
|
23370
|
+
var withUsage$N = createDocumentationMessageGenerator({
|
|
22602
23371
|
name: 'powered-by'
|
|
22603
23372
|
});
|
|
22604
23373
|
var renderer$e = function renderer(_ref) {
|
|
@@ -22627,17 +23396,17 @@
|
|
|
22627
23396
|
_ref3$theme = _ref3.theme,
|
|
22628
23397
|
theme = _ref3$theme === void 0 ? 'light' : _ref3$theme;
|
|
22629
23398
|
if (!container) {
|
|
22630
|
-
throw new Error(withUsage$
|
|
23399
|
+
throw new Error(withUsage$N('The `container` option is required.'));
|
|
22631
23400
|
}
|
|
22632
23401
|
var containerNode = getContainerNode(container);
|
|
22633
23402
|
var cssClasses = {
|
|
22634
|
-
root: cx(suit$
|
|
23403
|
+
root: cx(suit$j(), suit$j({
|
|
22635
23404
|
modifierName: theme === 'dark' ? 'dark' : 'light'
|
|
22636
23405
|
}), userCssClasses.root),
|
|
22637
|
-
link: cx(suit$
|
|
23406
|
+
link: cx(suit$j({
|
|
22638
23407
|
descendantName: 'link'
|
|
22639
23408
|
}), userCssClasses.link),
|
|
22640
|
-
logo: cx(suit$
|
|
23409
|
+
logo: cx(suit$j({
|
|
22641
23410
|
descendantName: 'logo'
|
|
22642
23411
|
}), userCssClasses.logo)
|
|
22643
23412
|
};
|
|
@@ -22655,13 +23424,13 @@
|
|
|
22655
23424
|
});
|
|
22656
23425
|
};
|
|
22657
23426
|
|
|
22658
|
-
var withUsage$
|
|
23427
|
+
var withUsage$O = createDocumentationMessageGenerator({
|
|
22659
23428
|
name: 'query-rule-context'
|
|
22660
23429
|
});
|
|
22661
23430
|
var queryRuleContext = function queryRuleContext() {
|
|
22662
23431
|
var widgetParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22663
23432
|
if (!widgetParams.trackedFilters) {
|
|
22664
|
-
throw new Error(withUsage$
|
|
23433
|
+
throw new Error(withUsage$O('The `trackedFilters` option is required.'));
|
|
22665
23434
|
}
|
|
22666
23435
|
return _objectSpread2(_objectSpread2({}, connectQueryRules(noop)(widgetParams)), {}, {
|
|
22667
23436
|
$$widgetType: 'ais.queryRuleContext'
|
|
@@ -22690,10 +23459,10 @@
|
|
|
22690
23459
|
return JSON.stringify(items, null, 2);
|
|
22691
23460
|
}
|
|
22692
23461
|
};
|
|
22693
|
-
var withUsage$
|
|
23462
|
+
var withUsage$P = createDocumentationMessageGenerator({
|
|
22694
23463
|
name: 'query-rule-custom-data'
|
|
22695
23464
|
});
|
|
22696
|
-
var suit$
|
|
23465
|
+
var suit$k = component('QueryRuleCustomData');
|
|
22697
23466
|
var renderer$f = function renderer(_ref2) {
|
|
22698
23467
|
var containerNode = _ref2.containerNode,
|
|
22699
23468
|
cssClasses = _ref2.cssClasses,
|
|
@@ -22719,10 +23488,10 @@
|
|
|
22719
23488
|
return items;
|
|
22720
23489
|
} : _ref4$transformItems;
|
|
22721
23490
|
if (!container) {
|
|
22722
|
-
throw new Error(withUsage$
|
|
23491
|
+
throw new Error(withUsage$P('The `container` option is required.'));
|
|
22723
23492
|
}
|
|
22724
23493
|
var cssClasses = {
|
|
22725
|
-
root: cx(suit$
|
|
23494
|
+
root: cx(suit$k(), userCssClasses.root)
|
|
22726
23495
|
};
|
|
22727
23496
|
var containerNode = getContainerNode(container);
|
|
22728
23497
|
var templates = _objectSpread2(_objectSpread2({}, defaultTemplates$b), userTemplates);
|
|
@@ -22742,15 +23511,15 @@
|
|
|
22742
23511
|
});
|
|
22743
23512
|
};
|
|
22744
23513
|
|
|
22745
|
-
var _excluded$
|
|
22746
|
-
var withUsage$
|
|
23514
|
+
var _excluded$x = ["item", "sendEvent"];
|
|
23515
|
+
var withUsage$Q = createDocumentationMessageGenerator({
|
|
22747
23516
|
name: 'related-products'
|
|
22748
23517
|
});
|
|
22749
23518
|
var RelatedProducts = createRelatedProductsComponent({
|
|
22750
23519
|
createElement: h,
|
|
22751
23520
|
Fragment: p
|
|
22752
23521
|
});
|
|
22753
|
-
function createRenderer(_ref) {
|
|
23522
|
+
function createRenderer$1(_ref) {
|
|
22754
23523
|
var renderState = _ref.renderState,
|
|
22755
23524
|
cssClasses = _ref.cssClasses,
|
|
22756
23525
|
containerNode = _ref.containerNode,
|
|
@@ -22781,7 +23550,7 @@
|
|
|
22781
23550
|
var itemComponent = templates.item ? function (_ref3) {
|
|
22782
23551
|
var item = _ref3.item,
|
|
22783
23552
|
_sendEvent = _ref3.sendEvent,
|
|
22784
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
23553
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$x);
|
|
22785
23554
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
22786
23555
|
templateKey: "item",
|
|
22787
23556
|
rootTagName: "fragment",
|
|
@@ -22850,10 +23619,10 @@
|
|
|
22850
23619
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
22851
23620
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
22852
23621
|
if (!container) {
|
|
22853
|
-
throw new Error(withUsage$
|
|
23622
|
+
throw new Error(withUsage$Q('The `container` option is required.'));
|
|
22854
23623
|
}
|
|
22855
23624
|
var containerNode = getContainerNode(container);
|
|
22856
|
-
var specializedRenderer = createRenderer({
|
|
23625
|
+
var specializedRenderer = createRenderer$1({
|
|
22857
23626
|
containerNode: containerNode,
|
|
22858
23627
|
cssClasses: cssClasses,
|
|
22859
23628
|
renderState: {},
|
|
@@ -22985,10 +23754,10 @@
|
|
|
22985
23754
|
return RangeInput;
|
|
22986
23755
|
}(d);
|
|
22987
23756
|
|
|
22988
|
-
var withUsage$
|
|
23757
|
+
var withUsage$R = createDocumentationMessageGenerator({
|
|
22989
23758
|
name: 'range-input'
|
|
22990
23759
|
});
|
|
22991
|
-
var suit$
|
|
23760
|
+
var suit$l = component('RangeInput');
|
|
22992
23761
|
var defaultTemplates$c = {
|
|
22993
23762
|
separatorText: function separatorText() {
|
|
22994
23763
|
return 'to';
|
|
@@ -23050,35 +23819,35 @@
|
|
|
23050
23819
|
_ref3$templates = _ref3.templates,
|
|
23051
23820
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates;
|
|
23052
23821
|
if (!container) {
|
|
23053
|
-
throw new Error(withUsage$
|
|
23822
|
+
throw new Error(withUsage$R('The `container` option is required.'));
|
|
23054
23823
|
}
|
|
23055
23824
|
var containerNode = getContainerNode(container);
|
|
23056
23825
|
var cssClasses = {
|
|
23057
|
-
root: cx(suit$
|
|
23058
|
-
noRefinement: cx(suit$
|
|
23826
|
+
root: cx(suit$l(), userCssClasses.root),
|
|
23827
|
+
noRefinement: cx(suit$l({
|
|
23059
23828
|
modifierName: 'noRefinement'
|
|
23060
23829
|
})),
|
|
23061
|
-
form: cx(suit$
|
|
23830
|
+
form: cx(suit$l({
|
|
23062
23831
|
descendantName: 'form'
|
|
23063
23832
|
}), userCssClasses.form),
|
|
23064
|
-
label: cx(suit$
|
|
23833
|
+
label: cx(suit$l({
|
|
23065
23834
|
descendantName: 'label'
|
|
23066
23835
|
}), userCssClasses.label),
|
|
23067
|
-
input: cx(suit$
|
|
23836
|
+
input: cx(suit$l({
|
|
23068
23837
|
descendantName: 'input'
|
|
23069
23838
|
}), userCssClasses.input),
|
|
23070
|
-
inputMin: cx(suit$
|
|
23839
|
+
inputMin: cx(suit$l({
|
|
23071
23840
|
descendantName: 'input',
|
|
23072
23841
|
modifierName: 'min'
|
|
23073
23842
|
}), userCssClasses.inputMin),
|
|
23074
|
-
inputMax: cx(suit$
|
|
23843
|
+
inputMax: cx(suit$l({
|
|
23075
23844
|
descendantName: 'input',
|
|
23076
23845
|
modifierName: 'max'
|
|
23077
23846
|
}), userCssClasses.inputMax),
|
|
23078
|
-
separator: cx(suit$
|
|
23847
|
+
separator: cx(suit$l({
|
|
23079
23848
|
descendantName: 'separator'
|
|
23080
23849
|
}), userCssClasses.separator),
|
|
23081
|
-
submit: cx(suit$
|
|
23850
|
+
submit: cx(suit$l({
|
|
23082
23851
|
descendantName: 'submit'
|
|
23083
23852
|
}), userCssClasses.submit)
|
|
23084
23853
|
};
|
|
@@ -23773,10 +24542,10 @@
|
|
|
23773
24542
|
return Slider;
|
|
23774
24543
|
}(d);
|
|
23775
24544
|
|
|
23776
|
-
var withUsage$
|
|
24545
|
+
var withUsage$S = createDocumentationMessageGenerator({
|
|
23777
24546
|
name: 'range-slider'
|
|
23778
24547
|
});
|
|
23779
|
-
var suit$
|
|
24548
|
+
var suit$m = component('RangeSlider');
|
|
23780
24549
|
var renderer$h = function renderer(_ref) {
|
|
23781
24550
|
var containerNode = _ref.containerNode,
|
|
23782
24551
|
cssClasses = _ref.cssClasses,
|
|
@@ -23842,12 +24611,12 @@
|
|
|
23842
24611
|
_ref3$tooltips = _ref3.tooltips,
|
|
23843
24612
|
tooltips = _ref3$tooltips === void 0 ? true : _ref3$tooltips;
|
|
23844
24613
|
if (!container) {
|
|
23845
|
-
throw new Error(withUsage$
|
|
24614
|
+
throw new Error(withUsage$S('The `container` option is required.'));
|
|
23846
24615
|
}
|
|
23847
24616
|
var containerNode = getContainerNode(container);
|
|
23848
24617
|
var cssClasses = {
|
|
23849
|
-
root: cx(suit$
|
|
23850
|
-
disabledRoot: cx(suit$
|
|
24618
|
+
root: cx(suit$m(), userCssClasses.root),
|
|
24619
|
+
disabledRoot: cx(suit$m({
|
|
23851
24620
|
modifierName: 'disabled'
|
|
23852
24621
|
}), userCssClasses.disabledRoot)
|
|
23853
24622
|
};
|
|
@@ -23922,10 +24691,10 @@
|
|
|
23922
24691
|
}
|
|
23923
24692
|
};
|
|
23924
24693
|
|
|
23925
|
-
var withUsage$
|
|
24694
|
+
var withUsage$T = createDocumentationMessageGenerator({
|
|
23926
24695
|
name: 'rating-menu'
|
|
23927
24696
|
});
|
|
23928
|
-
var suit$
|
|
24697
|
+
var suit$n = component('RatingMenu');
|
|
23929
24698
|
var _ref3 = h("path", {
|
|
23930
24699
|
d: "M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"
|
|
23931
24700
|
});
|
|
@@ -23959,12 +24728,12 @@
|
|
|
23959
24728
|
}, h("svg", {
|
|
23960
24729
|
style: "display:none;"
|
|
23961
24730
|
}, h("symbol", {
|
|
23962
|
-
id: suit$
|
|
24731
|
+
id: suit$n({
|
|
23963
24732
|
descendantName: 'starSymbol'
|
|
23964
24733
|
}),
|
|
23965
24734
|
viewBox: "0 0 24 24"
|
|
23966
24735
|
}, _ref3), h("symbol", {
|
|
23967
|
-
id: suit$
|
|
24736
|
+
id: suit$n({
|
|
23968
24737
|
descendantName: 'starEmptySymbol'
|
|
23969
24738
|
}),
|
|
23970
24739
|
viewBox: "0 0 24 24"
|
|
@@ -24010,46 +24779,46 @@
|
|
|
24010
24779
|
_ref5$templates = _ref5.templates,
|
|
24011
24780
|
templates = _ref5$templates === void 0 ? {} : _ref5$templates;
|
|
24012
24781
|
if (!container) {
|
|
24013
|
-
throw new Error(withUsage$
|
|
24782
|
+
throw new Error(withUsage$T('The `container` option is required.'));
|
|
24014
24783
|
}
|
|
24015
24784
|
var containerNode = getContainerNode(container);
|
|
24016
24785
|
var cssClasses = {
|
|
24017
|
-
root: cx(suit$
|
|
24018
|
-
noRefinementRoot: cx(suit$
|
|
24786
|
+
root: cx(suit$n(), userCssClasses.root),
|
|
24787
|
+
noRefinementRoot: cx(suit$n({
|
|
24019
24788
|
modifierName: 'noRefinement'
|
|
24020
24789
|
}), userCssClasses.noRefinementRoot),
|
|
24021
|
-
list: cx(suit$
|
|
24790
|
+
list: cx(suit$n({
|
|
24022
24791
|
descendantName: 'list'
|
|
24023
24792
|
}), userCssClasses.list),
|
|
24024
|
-
item: cx(suit$
|
|
24793
|
+
item: cx(suit$n({
|
|
24025
24794
|
descendantName: 'item'
|
|
24026
24795
|
}), userCssClasses.item),
|
|
24027
|
-
selectedItem: cx(suit$
|
|
24796
|
+
selectedItem: cx(suit$n({
|
|
24028
24797
|
descendantName: 'item',
|
|
24029
24798
|
modifierName: 'selected'
|
|
24030
24799
|
}), userCssClasses.selectedItem),
|
|
24031
|
-
disabledItem: cx(suit$
|
|
24800
|
+
disabledItem: cx(suit$n({
|
|
24032
24801
|
descendantName: 'item',
|
|
24033
24802
|
modifierName: 'disabled'
|
|
24034
24803
|
}), userCssClasses.disabledItem),
|
|
24035
|
-
link: cx(suit$
|
|
24804
|
+
link: cx(suit$n({
|
|
24036
24805
|
descendantName: 'link'
|
|
24037
24806
|
}), userCssClasses.link),
|
|
24038
|
-
starIcon: cx(suit$
|
|
24807
|
+
starIcon: cx(suit$n({
|
|
24039
24808
|
descendantName: 'starIcon'
|
|
24040
24809
|
}), userCssClasses.starIcon),
|
|
24041
|
-
fullStarIcon: cx(suit$
|
|
24810
|
+
fullStarIcon: cx(suit$n({
|
|
24042
24811
|
descendantName: 'starIcon',
|
|
24043
24812
|
modifierName: 'full'
|
|
24044
24813
|
}), userCssClasses.fullStarIcon),
|
|
24045
|
-
emptyStarIcon: cx(suit$
|
|
24814
|
+
emptyStarIcon: cx(suit$n({
|
|
24046
24815
|
descendantName: 'starIcon',
|
|
24047
24816
|
modifierName: 'empty'
|
|
24048
24817
|
}), userCssClasses.emptyStarIcon),
|
|
24049
|
-
label: cx(suit$
|
|
24818
|
+
label: cx(suit$n({
|
|
24050
24819
|
descendantName: 'label'
|
|
24051
24820
|
}), userCssClasses.label),
|
|
24052
|
-
count: cx(suit$
|
|
24821
|
+
count: cx(suit$n({
|
|
24053
24822
|
descendantName: 'count'
|
|
24054
24823
|
}), userCssClasses.count)
|
|
24055
24824
|
};
|
|
@@ -24170,10 +24939,10 @@
|
|
|
24170
24939
|
}
|
|
24171
24940
|
};
|
|
24172
24941
|
|
|
24173
|
-
var withUsage$
|
|
24942
|
+
var withUsage$U = createDocumentationMessageGenerator({
|
|
24174
24943
|
name: 'refinement-list'
|
|
24175
24944
|
});
|
|
24176
|
-
var suit$
|
|
24945
|
+
var suit$o = component('RefinementList');
|
|
24177
24946
|
var searchBoxSuit = component('SearchBox');
|
|
24178
24947
|
var renderer$j = function renderer(_ref) {
|
|
24179
24948
|
var containerNode = _ref.containerNode,
|
|
@@ -24274,47 +25043,47 @@
|
|
|
24274
25043
|
templates = _ref3$templates === void 0 ? {} : _ref3$templates,
|
|
24275
25044
|
transformItems = _ref3.transformItems;
|
|
24276
25045
|
if (!container) {
|
|
24277
|
-
throw new Error(withUsage$
|
|
25046
|
+
throw new Error(withUsage$U('The `container` option is required.'));
|
|
24278
25047
|
}
|
|
24279
25048
|
var escapeFacetValues = searchable ? Boolean(searchableEscapeFacetValues) : false;
|
|
24280
25049
|
var containerNode = getContainerNode(container);
|
|
24281
25050
|
var cssClasses = {
|
|
24282
|
-
root: cx(suit$
|
|
24283
|
-
noRefinementRoot: cx(suit$
|
|
25051
|
+
root: cx(suit$o(), userCssClasses.root),
|
|
25052
|
+
noRefinementRoot: cx(suit$o({
|
|
24284
25053
|
modifierName: 'noRefinement'
|
|
24285
25054
|
}), userCssClasses.noRefinementRoot),
|
|
24286
|
-
list: cx(suit$
|
|
25055
|
+
list: cx(suit$o({
|
|
24287
25056
|
descendantName: 'list'
|
|
24288
25057
|
}), userCssClasses.list),
|
|
24289
|
-
item: cx(suit$
|
|
25058
|
+
item: cx(suit$o({
|
|
24290
25059
|
descendantName: 'item'
|
|
24291
25060
|
}), userCssClasses.item),
|
|
24292
|
-
selectedItem: cx(suit$
|
|
25061
|
+
selectedItem: cx(suit$o({
|
|
24293
25062
|
descendantName: 'item',
|
|
24294
25063
|
modifierName: 'selected'
|
|
24295
25064
|
}), userCssClasses.selectedItem),
|
|
24296
|
-
searchBox: cx(suit$
|
|
25065
|
+
searchBox: cx(suit$o({
|
|
24297
25066
|
descendantName: 'searchBox'
|
|
24298
25067
|
}), userCssClasses.searchBox),
|
|
24299
|
-
label: cx(suit$
|
|
25068
|
+
label: cx(suit$o({
|
|
24300
25069
|
descendantName: 'label'
|
|
24301
25070
|
}), userCssClasses.label),
|
|
24302
|
-
checkbox: cx(suit$
|
|
25071
|
+
checkbox: cx(suit$o({
|
|
24303
25072
|
descendantName: 'checkbox'
|
|
24304
25073
|
}), userCssClasses.checkbox),
|
|
24305
|
-
labelText: cx(suit$
|
|
25074
|
+
labelText: cx(suit$o({
|
|
24306
25075
|
descendantName: 'labelText'
|
|
24307
25076
|
}), userCssClasses.labelText),
|
|
24308
|
-
count: cx(suit$
|
|
25077
|
+
count: cx(suit$o({
|
|
24309
25078
|
descendantName: 'count'
|
|
24310
25079
|
}), userCssClasses.count),
|
|
24311
|
-
noResults: cx(suit$
|
|
25080
|
+
noResults: cx(suit$o({
|
|
24312
25081
|
descendantName: 'noResults'
|
|
24313
25082
|
}), userCssClasses.noResults),
|
|
24314
|
-
showMore: cx(suit$
|
|
25083
|
+
showMore: cx(suit$o({
|
|
24315
25084
|
descendantName: 'showMore'
|
|
24316
25085
|
}), userCssClasses.showMore),
|
|
24317
|
-
disabledShowMore: cx(suit$
|
|
25086
|
+
disabledShowMore: cx(suit$o({
|
|
24318
25087
|
descendantName: 'showMore',
|
|
24319
25088
|
modifierName: 'disabled'
|
|
24320
25089
|
}), userCssClasses.disabledShowMore),
|
|
@@ -24426,10 +25195,10 @@
|
|
|
24426
25195
|
}
|
|
24427
25196
|
};
|
|
24428
25197
|
|
|
24429
|
-
var withUsage$
|
|
25198
|
+
var withUsage$V = createDocumentationMessageGenerator({
|
|
24430
25199
|
name: 'relevant-sort'
|
|
24431
25200
|
});
|
|
24432
|
-
var suit$
|
|
25201
|
+
var suit$p = component('RelevantSort');
|
|
24433
25202
|
var renderer$k = function renderer(_ref) {
|
|
24434
25203
|
var containerNode = _ref.containerNode,
|
|
24435
25204
|
cssClasses = _ref.cssClasses,
|
|
@@ -24454,15 +25223,15 @@
|
|
|
24454
25223
|
_widgetParams$cssClas = widgetParams.cssClasses,
|
|
24455
25224
|
userCssClasses = _widgetParams$cssClas === void 0 ? {} : _widgetParams$cssClas;
|
|
24456
25225
|
if (!container) {
|
|
24457
|
-
throw new Error(withUsage$
|
|
25226
|
+
throw new Error(withUsage$V('The `container` option is required.'));
|
|
24458
25227
|
}
|
|
24459
25228
|
var containerNode = getContainerNode(container);
|
|
24460
25229
|
var cssClasses = {
|
|
24461
|
-
root: cx(suit$
|
|
24462
|
-
text: cx(suit$
|
|
25230
|
+
root: cx(suit$p(), userCssClasses.root),
|
|
25231
|
+
text: cx(suit$p({
|
|
24463
25232
|
descendantName: 'text'
|
|
24464
25233
|
}), userCssClasses.text),
|
|
24465
|
-
button: cx(suit$
|
|
25234
|
+
button: cx(suit$p({
|
|
24466
25235
|
descendantName: 'button'
|
|
24467
25236
|
}), userCssClasses.button)
|
|
24468
25237
|
};
|
|
@@ -24481,10 +25250,10 @@
|
|
|
24481
25250
|
});
|
|
24482
25251
|
};
|
|
24483
25252
|
|
|
24484
|
-
var withUsage$
|
|
25253
|
+
var withUsage$W = createDocumentationMessageGenerator({
|
|
24485
25254
|
name: 'search-box'
|
|
24486
25255
|
});
|
|
24487
|
-
var suit$
|
|
25256
|
+
var suit$q = component('SearchBox');
|
|
24488
25257
|
var renderer$l = function renderer(_ref) {
|
|
24489
25258
|
var containerNode = _ref.containerNode,
|
|
24490
25259
|
cssClasses = _ref.cssClasses,
|
|
@@ -24549,33 +25318,33 @@
|
|
|
24549
25318
|
_ref3$templates = _ref3.templates,
|
|
24550
25319
|
userTemplates = _ref3$templates === void 0 ? {} : _ref3$templates;
|
|
24551
25320
|
if (!container) {
|
|
24552
|
-
throw new Error(withUsage$
|
|
25321
|
+
throw new Error(withUsage$W('The `container` option is required.'));
|
|
24553
25322
|
}
|
|
24554
25323
|
var containerNode = getContainerNode(container);
|
|
24555
25324
|
var cssClasses = {
|
|
24556
|
-
root: cx(suit$
|
|
24557
|
-
form: cx(suit$
|
|
25325
|
+
root: cx(suit$q(), userCssClasses.root),
|
|
25326
|
+
form: cx(suit$q({
|
|
24558
25327
|
descendantName: 'form'
|
|
24559
25328
|
}), userCssClasses.form),
|
|
24560
|
-
input: cx(suit$
|
|
25329
|
+
input: cx(suit$q({
|
|
24561
25330
|
descendantName: 'input'
|
|
24562
25331
|
}), userCssClasses.input),
|
|
24563
|
-
submit: cx(suit$
|
|
25332
|
+
submit: cx(suit$q({
|
|
24564
25333
|
descendantName: 'submit'
|
|
24565
25334
|
}), userCssClasses.submit),
|
|
24566
|
-
submitIcon: cx(suit$
|
|
25335
|
+
submitIcon: cx(suit$q({
|
|
24567
25336
|
descendantName: 'submitIcon'
|
|
24568
25337
|
}), userCssClasses.submitIcon),
|
|
24569
|
-
reset: cx(suit$
|
|
25338
|
+
reset: cx(suit$q({
|
|
24570
25339
|
descendantName: 'reset'
|
|
24571
25340
|
}), userCssClasses.reset),
|
|
24572
|
-
resetIcon: cx(suit$
|
|
25341
|
+
resetIcon: cx(suit$q({
|
|
24573
25342
|
descendantName: 'resetIcon'
|
|
24574
25343
|
}), userCssClasses.resetIcon),
|
|
24575
|
-
loadingIndicator: cx(suit$
|
|
25344
|
+
loadingIndicator: cx(suit$q({
|
|
24576
25345
|
descendantName: 'loadingIndicator'
|
|
24577
25346
|
}), userCssClasses.loadingIndicator),
|
|
24578
|
-
loadingIcon: cx(suit$
|
|
25347
|
+
loadingIcon: cx(suit$q({
|
|
24579
25348
|
descendantName: 'loadingIcon'
|
|
24580
25349
|
}), userCssClasses.loadingIcon)
|
|
24581
25350
|
};
|
|
@@ -24602,10 +25371,10 @@
|
|
|
24602
25371
|
});
|
|
24603
25372
|
};
|
|
24604
25373
|
|
|
24605
|
-
var withUsage$
|
|
25374
|
+
var withUsage$X = createDocumentationMessageGenerator({
|
|
24606
25375
|
name: 'sort-by'
|
|
24607
25376
|
});
|
|
24608
|
-
var suit$
|
|
25377
|
+
var suit$r = component('SortBy');
|
|
24609
25378
|
var renderer$m = function renderer(_ref) {
|
|
24610
25379
|
var containerNode = _ref.containerNode,
|
|
24611
25380
|
cssClasses = _ref.cssClasses;
|
|
@@ -24640,15 +25409,15 @@
|
|
|
24640
25409
|
userCssClasses = _ref3$cssClasses === void 0 ? {} : _ref3$cssClasses,
|
|
24641
25410
|
transformItems = _ref3.transformItems;
|
|
24642
25411
|
if (!container) {
|
|
24643
|
-
throw new Error(withUsage$
|
|
25412
|
+
throw new Error(withUsage$X('The `container` option is required.'));
|
|
24644
25413
|
}
|
|
24645
25414
|
var containerNode = getContainerNode(container);
|
|
24646
25415
|
var cssClasses = {
|
|
24647
|
-
root: cx(suit$
|
|
24648
|
-
select: cx(suit$
|
|
25416
|
+
root: cx(suit$r(), userCssClasses.root),
|
|
25417
|
+
select: cx(suit$r({
|
|
24649
25418
|
descendantName: 'select'
|
|
24650
25419
|
}), userCssClasses.select),
|
|
24651
|
-
option: cx(suit$
|
|
25420
|
+
option: cx(suit$r({
|
|
24652
25421
|
descendantName: 'option'
|
|
24653
25422
|
}), userCssClasses.option)
|
|
24654
25423
|
};
|
|
@@ -24668,13 +25437,13 @@
|
|
|
24668
25437
|
});
|
|
24669
25438
|
};
|
|
24670
25439
|
|
|
24671
|
-
var _excluded$
|
|
25440
|
+
var _excluded$y = ["nbHits", "nbSortedHits", "cssClasses", "templateProps"];
|
|
24672
25441
|
var Stats = function Stats(_ref) {
|
|
24673
25442
|
var nbHits = _ref.nbHits,
|
|
24674
25443
|
nbSortedHits = _ref.nbSortedHits,
|
|
24675
25444
|
cssClasses = _ref.cssClasses,
|
|
24676
25445
|
templateProps = _ref.templateProps,
|
|
24677
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
25446
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
24678
25447
|
return h("div", {
|
|
24679
25448
|
className: cx(cssClasses.root)
|
|
24680
25449
|
}, h(Template, _extends({}, templateProps, {
|
|
@@ -24697,10 +25466,10 @@
|
|
|
24697
25466
|
})));
|
|
24698
25467
|
};
|
|
24699
25468
|
|
|
24700
|
-
var withUsage$
|
|
25469
|
+
var withUsage$Y = createDocumentationMessageGenerator({
|
|
24701
25470
|
name: 'stats'
|
|
24702
25471
|
});
|
|
24703
|
-
var suit$
|
|
25472
|
+
var suit$s = component('Stats');
|
|
24704
25473
|
var defaultTemplates$g = {
|
|
24705
25474
|
text: function text(props) {
|
|
24706
25475
|
return "".concat(props.areHitsSorted ? getSortedResultsSentence(props) : getResultsSentence(props), " found in ").concat(props.processingTimeMS, "ms");
|
|
@@ -24792,12 +25561,12 @@
|
|
|
24792
25561
|
_ref5$templates = _ref5.templates,
|
|
24793
25562
|
templates = _ref5$templates === void 0 ? {} : _ref5$templates;
|
|
24794
25563
|
if (!container) {
|
|
24795
|
-
throw new Error(withUsage$
|
|
25564
|
+
throw new Error(withUsage$Y('The `container` option is required.'));
|
|
24796
25565
|
}
|
|
24797
25566
|
var containerNode = getContainerNode(container);
|
|
24798
25567
|
var cssClasses = {
|
|
24799
|
-
root: cx(suit$
|
|
24800
|
-
text: cx(suit$
|
|
25568
|
+
root: cx(suit$s(), userCssClasses.root),
|
|
25569
|
+
text: cx(suit$s({
|
|
24801
25570
|
descendantName: 'text'
|
|
24802
25571
|
}), userCssClasses.text)
|
|
24803
25572
|
};
|
|
@@ -24850,10 +25619,10 @@
|
|
|
24850
25619
|
}
|
|
24851
25620
|
};
|
|
24852
25621
|
|
|
24853
|
-
var withUsage$
|
|
25622
|
+
var withUsage$Z = createDocumentationMessageGenerator({
|
|
24854
25623
|
name: 'toggle-refinement'
|
|
24855
25624
|
});
|
|
24856
|
-
var suit$
|
|
25625
|
+
var suit$t = component('ToggleRefinement');
|
|
24857
25626
|
var renderer$o = function renderer(_ref) {
|
|
24858
25627
|
var containerNode = _ref.containerNode,
|
|
24859
25628
|
cssClasses = _ref.cssClasses,
|
|
@@ -24903,18 +25672,18 @@
|
|
|
24903
25672
|
on = _ref3$on === void 0 ? true : _ref3$on,
|
|
24904
25673
|
off = _ref3.off;
|
|
24905
25674
|
if (!container) {
|
|
24906
|
-
throw new Error(withUsage$
|
|
25675
|
+
throw new Error(withUsage$Z('The `container` option is required.'));
|
|
24907
25676
|
}
|
|
24908
25677
|
var containerNode = getContainerNode(container);
|
|
24909
25678
|
var cssClasses = {
|
|
24910
|
-
root: cx(suit$
|
|
24911
|
-
label: cx(suit$
|
|
25679
|
+
root: cx(suit$t(), userCssClasses.root),
|
|
25680
|
+
label: cx(suit$t({
|
|
24912
25681
|
descendantName: 'label'
|
|
24913
25682
|
}), userCssClasses.label),
|
|
24914
|
-
checkbox: cx(suit$
|
|
25683
|
+
checkbox: cx(suit$t({
|
|
24915
25684
|
descendantName: 'checkbox'
|
|
24916
25685
|
}), userCssClasses.checkbox),
|
|
24917
|
-
labelText: cx(suit$
|
|
25686
|
+
labelText: cx(suit$t({
|
|
24918
25687
|
descendantName: 'labelText'
|
|
24919
25688
|
}), userCssClasses.labelText)
|
|
24920
25689
|
};
|
|
@@ -24936,15 +25705,15 @@
|
|
|
24936
25705
|
});
|
|
24937
25706
|
};
|
|
24938
25707
|
|
|
24939
|
-
var _excluded$
|
|
24940
|
-
var withUsage$
|
|
25708
|
+
var _excluded$z = ["item", "sendEvent"];
|
|
25709
|
+
var withUsage$_ = createDocumentationMessageGenerator({
|
|
24941
25710
|
name: 'trending-items'
|
|
24942
25711
|
});
|
|
24943
25712
|
var TrendingItems = createTrendingItemsComponent({
|
|
24944
25713
|
createElement: h,
|
|
24945
25714
|
Fragment: p
|
|
24946
25715
|
});
|
|
24947
|
-
function createRenderer$
|
|
25716
|
+
function createRenderer$2(_ref) {
|
|
24948
25717
|
var renderState = _ref.renderState,
|
|
24949
25718
|
cssClasses = _ref.cssClasses,
|
|
24950
25719
|
containerNode = _ref.containerNode,
|
|
@@ -24975,7 +25744,7 @@
|
|
|
24975
25744
|
var itemComponent = templates.item ? function (_ref3) {
|
|
24976
25745
|
var item = _ref3.item,
|
|
24977
25746
|
_sendEvent = _ref3.sendEvent,
|
|
24978
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
25747
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$z);
|
|
24979
25748
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
24980
25749
|
templateKey: "item",
|
|
24981
25750
|
rootTagName: "fragment",
|
|
@@ -25045,10 +25814,10 @@
|
|
|
25045
25814
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
25046
25815
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
25047
25816
|
if (!container) {
|
|
25048
|
-
throw new Error(withUsage$
|
|
25817
|
+
throw new Error(withUsage$_('The `container` option is required.'));
|
|
25049
25818
|
}
|
|
25050
25819
|
var containerNode = getContainerNode(container);
|
|
25051
|
-
var specializedRenderer = createRenderer$
|
|
25820
|
+
var specializedRenderer = createRenderer$2({
|
|
25052
25821
|
containerNode: containerNode,
|
|
25053
25822
|
cssClasses: cssClasses,
|
|
25054
25823
|
renderState: {},
|
|
@@ -25207,10 +25976,10 @@
|
|
|
25207
25976
|
}
|
|
25208
25977
|
};
|
|
25209
25978
|
|
|
25210
|
-
var withUsage
|
|
25979
|
+
var withUsage$$ = createDocumentationMessageGenerator({
|
|
25211
25980
|
name: 'voice-search'
|
|
25212
25981
|
});
|
|
25213
|
-
var suit$
|
|
25982
|
+
var suit$u = component('VoiceSearch');
|
|
25214
25983
|
var renderer$p = function renderer(_ref) {
|
|
25215
25984
|
var containerNode = _ref.containerNode,
|
|
25216
25985
|
cssClasses = _ref.cssClasses,
|
|
@@ -25243,15 +26012,15 @@
|
|
|
25243
26012
|
additionalQueryParameters = _ref3.additionalQueryParameters,
|
|
25244
26013
|
createVoiceSearchHelper = _ref3.createVoiceSearchHelper;
|
|
25245
26014
|
if (!container) {
|
|
25246
|
-
throw new Error(withUsage
|
|
26015
|
+
throw new Error(withUsage$$('The `container` option is required.'));
|
|
25247
26016
|
}
|
|
25248
26017
|
var containerNode = getContainerNode(container);
|
|
25249
26018
|
var cssClasses = {
|
|
25250
|
-
root: cx(suit$
|
|
25251
|
-
button: cx(suit$
|
|
26019
|
+
root: cx(suit$u(), userCssClasses.root),
|
|
26020
|
+
button: cx(suit$u({
|
|
25252
26021
|
descendantName: 'button'
|
|
25253
26022
|
}), userCssClasses.button),
|
|
25254
|
-
status: cx(suit$
|
|
26023
|
+
status: cx(suit$u({
|
|
25255
26024
|
descendantName: 'status'
|
|
25256
26025
|
}), userCssClasses.status)
|
|
25257
26026
|
};
|
|
@@ -25277,8 +26046,8 @@
|
|
|
25277
26046
|
});
|
|
25278
26047
|
};
|
|
25279
26048
|
|
|
25280
|
-
var _excluded$
|
|
25281
|
-
var withUsage
|
|
26049
|
+
var _excluded$A = ["item", "sendEvent"];
|
|
26050
|
+
var withUsage$10 = createDocumentationMessageGenerator({
|
|
25282
26051
|
name: 'frequently-bought-together'
|
|
25283
26052
|
});
|
|
25284
26053
|
var FrequentlyBoughtTogether = createFrequentlyBoughtTogetherComponent({
|
|
@@ -25316,7 +26085,7 @@
|
|
|
25316
26085
|
var itemComponent = templates.item ? function (_ref3) {
|
|
25317
26086
|
var item = _ref3.item,
|
|
25318
26087
|
_sendEvent = _ref3.sendEvent,
|
|
25319
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
26088
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$A);
|
|
25320
26089
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
25321
26090
|
templateKey: "item",
|
|
25322
26091
|
rootTagName: "fragment",
|
|
@@ -25376,6 +26145,7 @@
|
|
|
25376
26145
|
objectIDs = _ref5.objectIDs,
|
|
25377
26146
|
limit = _ref5.limit,
|
|
25378
26147
|
queryParameters = _ref5.queryParameters,
|
|
26148
|
+
fallbackParameters = _ref5.fallbackParameters,
|
|
25379
26149
|
threshold = _ref5.threshold,
|
|
25380
26150
|
escapeHTML = _ref5.escapeHTML,
|
|
25381
26151
|
transformItems = _ref5.transformItems,
|
|
@@ -25384,7 +26154,7 @@
|
|
|
25384
26154
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
25385
26155
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
25386
26156
|
if (!container) {
|
|
25387
|
-
throw new Error(withUsage
|
|
26157
|
+
throw new Error(withUsage$10('The `container` option is required.'));
|
|
25388
26158
|
}
|
|
25389
26159
|
var containerNode = getContainerNode(container);
|
|
25390
26160
|
var specializedRenderer = renderer$q({
|
|
@@ -25400,6 +26170,7 @@
|
|
|
25400
26170
|
objectIDs: objectIDs,
|
|
25401
26171
|
limit: limit,
|
|
25402
26172
|
queryParameters: queryParameters,
|
|
26173
|
+
fallbackParameters: fallbackParameters,
|
|
25403
26174
|
threshold: threshold,
|
|
25404
26175
|
escapeHTML: escapeHTML,
|
|
25405
26176
|
transformItems: transformItems
|
|
@@ -25408,15 +26179,15 @@
|
|
|
25408
26179
|
});
|
|
25409
26180
|
});
|
|
25410
26181
|
|
|
25411
|
-
var _excluded$
|
|
25412
|
-
var withUsage$
|
|
26182
|
+
var _excluded$B = ["item", "sendEvent"];
|
|
26183
|
+
var withUsage$11 = createDocumentationMessageGenerator({
|
|
25413
26184
|
name: 'looking-similar'
|
|
25414
26185
|
});
|
|
25415
26186
|
var LookingSimilar = createLookingSimilarComponent({
|
|
25416
26187
|
createElement: h,
|
|
25417
26188
|
Fragment: p
|
|
25418
26189
|
});
|
|
25419
|
-
function createRenderer$
|
|
26190
|
+
function createRenderer$3(_ref) {
|
|
25420
26191
|
var renderState = _ref.renderState,
|
|
25421
26192
|
cssClasses = _ref.cssClasses,
|
|
25422
26193
|
containerNode = _ref.containerNode,
|
|
@@ -25447,7 +26218,7 @@
|
|
|
25447
26218
|
var itemComponent = templates.item ? function (_ref3) {
|
|
25448
26219
|
var item = _ref3.item,
|
|
25449
26220
|
_sendEvent = _ref3.sendEvent,
|
|
25450
|
-
rootProps = _objectWithoutProperties(_ref3, _excluded$
|
|
26221
|
+
rootProps = _objectWithoutProperties(_ref3, _excluded$B);
|
|
25451
26222
|
return h(Template, _extends({}, renderState.templateProps, {
|
|
25452
26223
|
templateKey: "item",
|
|
25453
26224
|
rootTagName: "fragment",
|
|
@@ -25516,10 +26287,10 @@
|
|
|
25516
26287
|
_ref5$cssClasses = _ref5.cssClasses,
|
|
25517
26288
|
cssClasses = _ref5$cssClasses === void 0 ? {} : _ref5$cssClasses;
|
|
25518
26289
|
if (!container) {
|
|
25519
|
-
throw new Error(withUsage$
|
|
26290
|
+
throw new Error(withUsage$11('The `container` option is required.'));
|
|
25520
26291
|
}
|
|
25521
26292
|
var containerNode = getContainerNode(container);
|
|
25522
|
-
var specializedRenderer = createRenderer$
|
|
26293
|
+
var specializedRenderer = createRenderer$3({
|
|
25523
26294
|
containerNode: containerNode,
|
|
25524
26295
|
cssClasses: cssClasses,
|
|
25525
26296
|
renderState: {},
|
|
@@ -25549,6 +26320,9 @@
|
|
|
25549
26320
|
|
|
25550
26321
|
/** @deprecated use dynamicWidgets */
|
|
25551
26322
|
var EXPERIMENTAL_dynamicWidgets = deprecate(dynamicWidgets, 'use dynamicWidgets');
|
|
26323
|
+
var chat = function chat() {
|
|
26324
|
+
throw new Error("\"chat\" is not available from the UMD build.\n\nPlease use InstantSearch.js with a packaging system:\nhttps://www.algolia.com/doc/guides/building-search-ui/installation/js/#with-a-packaging-system");
|
|
26325
|
+
};
|
|
25552
26326
|
|
|
25553
26327
|
var widgets = /*#__PURE__*/Object.freeze({
|
|
25554
26328
|
__proto__: null,
|
|
@@ -25556,7 +26330,9 @@
|
|
|
25556
26330
|
EXPERIMENTAL_configureRelatedItems: EXPERIMENTAL_configureRelatedItems,
|
|
25557
26331
|
EXPERIMENTAL_dynamicWidgets: EXPERIMENTAL_dynamicWidgets,
|
|
25558
26332
|
dynamicWidgets: dynamicWidgets,
|
|
26333
|
+
chat: chat,
|
|
25559
26334
|
analytics: analytics,
|
|
26335
|
+
EXPERIMENTAL_autocomplete: EXPERIMENTAL_autocomplete,
|
|
25560
26336
|
breadcrumb: breadcrumb,
|
|
25561
26337
|
clearRefinements: clearRefinements$1,
|
|
25562
26338
|
configure: configure,
|