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
|
@@ -6,16 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("../../lib/utils");
|
|
8
8
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
|
-
function _toConsumableArray(
|
|
9
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
10
10
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
-
function _unsupportedIterableToArray(
|
|
12
|
-
function _iterableToArray(
|
|
13
|
-
function _arrayWithoutHoles(
|
|
14
|
-
function _arrayLikeToArray(
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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; } }
|
|
12
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
13
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
-
function _defineProperty(
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
17
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
20
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
21
21
|
name: 'current-refinements',
|
|
@@ -7,8 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
var _utils = require("../../lib/utils");
|
|
8
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
-
function _defineProperty(
|
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
14
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
@@ -8,8 +8,8 @@ var _utils = require("../../lib/utils");
|
|
|
8
8
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
function _defineProperty(
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
11
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
15
15
|
name: 'frequently-bought-together',
|
|
@@ -29,6 +29,7 @@ var connectFrequentlyBoughtTogether = exports.default = function connectFrequent
|
|
|
29
29
|
objectIDs = _ref.objectIDs,
|
|
30
30
|
limit = _ref.limit,
|
|
31
31
|
threshold = _ref.threshold,
|
|
32
|
+
fallbackParameters = _ref.fallbackParameters,
|
|
32
33
|
queryParameters = _ref.queryParameters;
|
|
33
34
|
if (!objectIDs || objectIDs.length === 0) {
|
|
34
35
|
throw new Error(withUsage('The `objectIDs` option is required.'));
|
|
@@ -93,8 +94,10 @@ var connectFrequentlyBoughtTogether = exports.default = function connectFrequent
|
|
|
93
94
|
return objectIDs.reduce(function (acc, objectID) {
|
|
94
95
|
return acc.addFrequentlyBoughtTogether({
|
|
95
96
|
objectID: objectID,
|
|
96
|
-
threshold: threshold,
|
|
97
97
|
maxRecommendations: limit,
|
|
98
|
+
threshold: threshold,
|
|
99
|
+
// @ts-expect-error until @algolia/recommend types are updated
|
|
100
|
+
fallbackParameters: fallbackParameters ? _objectSpread(_objectSpread({}, fallbackParameters), escapeHTML ? _utils.TAG_PLACEHOLDER : {}) : undefined,
|
|
98
101
|
queryParameters: _objectSpread(_objectSpread({}, queryParameters), escapeHTML ? _utils.TAG_PLACEHOLDER : {}),
|
|
99
102
|
$$id: _this.$$id
|
|
100
103
|
});
|
|
@@ -8,8 +8,8 @@ var _utils = require("../../lib/utils");
|
|
|
8
8
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
function _defineProperty(
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
11
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
15
15
|
name: 'geo-search',
|
|
@@ -9,17 +9,17 @@ var _utils = require("../../lib/utils");
|
|
|
9
9
|
var _excluded = ["name", "escapedValue", "data", "path"];
|
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
-
function _defineProperty(
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
-
function _objectWithoutProperties(
|
|
16
|
-
function _objectWithoutPropertiesLoose(
|
|
17
|
-
function _slicedToArray(
|
|
15
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
17
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
18
18
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
-
function _unsupportedIterableToArray(
|
|
20
|
-
function _arrayLikeToArray(
|
|
19
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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; } }
|
|
20
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
21
21
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
|
-
function _arrayWithHoles(
|
|
22
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
23
23
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
24
24
|
name: 'hierarchical-menu',
|
|
25
25
|
connector: true
|
|
@@ -110,6 +110,21 @@ var connectHierarchicalMenu = function connectHierarchicalMenu(renderFn) {
|
|
|
110
110
|
return item;
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
+
function _hasMoreItems(facetValues, maxValuesPerFacet) {
|
|
114
|
+
var currentLimit = getLimit();
|
|
115
|
+
return (
|
|
116
|
+
// Check if we have exhaustive items at this level
|
|
117
|
+
// If the limit is the max number of facet retrieved it is impossible to know
|
|
118
|
+
// if the facets are exhaustive. The only moment we are sure it is exhaustive
|
|
119
|
+
// is when it is strictly under the number requested unless we know that another
|
|
120
|
+
// widget has requested more values (maxValuesPerFacet > getLimit()).
|
|
121
|
+
!(maxValuesPerFacet > currentLimit ? facetValues.length <= currentLimit : facetValues.length < currentLimit) ||
|
|
122
|
+
// Check if any of the children are not exhaustive.
|
|
123
|
+
facetValues.slice(0, limit).some(function (item) {
|
|
124
|
+
return Array.isArray(item.data) && item.data.length > 0 && _hasMoreItems(item.data, maxValuesPerFacet);
|
|
125
|
+
})
|
|
126
|
+
);
|
|
127
|
+
}
|
|
113
128
|
return {
|
|
114
129
|
$$type: 'ais.hierarchicalMenu',
|
|
115
130
|
init: function init(initOptions) {
|
|
@@ -178,14 +193,11 @@ var connectHierarchicalMenu = function connectHierarchicalMenu(renderFn) {
|
|
|
178
193
|
});
|
|
179
194
|
var facetItems = facetValues && !Array.isArray(facetValues) && facetValues.data ? facetValues.data : [];
|
|
180
195
|
|
|
181
|
-
//
|
|
182
|
-
//
|
|
183
|
-
//
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
// to be conservative here.
|
|
187
|
-
var hasExhaustiveItems = (state.maxValuesPerFacet || 0) > getLimit() ? facetItems.length <= getLimit() : facetItems.length < getLimit();
|
|
188
|
-
canToggleShowMore = showMore && (isShowingMore || !hasExhaustiveItems);
|
|
196
|
+
// Check if there are more items to show at any level
|
|
197
|
+
// This checks both the exhaustiveness of items retrieved from the API
|
|
198
|
+
// and whether there are hidden items at any visible child level
|
|
199
|
+
var hasMoreItems = _hasMoreItems(facetItems, state.maxValuesPerFacet || 0);
|
|
200
|
+
canToggleShowMore = showMore && (isShowingMore || hasMoreItems);
|
|
189
201
|
items = transformItems(_prepareFacetValues(facetItems), {
|
|
190
202
|
results: results
|
|
191
203
|
});
|
|
@@ -8,8 +8,8 @@ var _utils = require("../../lib/utils");
|
|
|
8
8
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
function _defineProperty(
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
11
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
15
15
|
name: 'hits',
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _insights = require("../../lib/insights");
|
|
8
8
|
var _connectHits = _interopRequireDefault(require("./connectHits"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
/**
|
|
11
11
|
* Due to https://github.com/microsoft/web-build-tools/issues/1050, we need
|
|
12
12
|
* Connector<...> imported in this file, even though it is only used implicitly.
|
|
@@ -6,16 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("../../lib/utils");
|
|
8
8
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
|
-
function _toConsumableArray(
|
|
9
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
10
10
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
-
function _unsupportedIterableToArray(
|
|
12
|
-
function _iterableToArray(
|
|
13
|
-
function _arrayWithoutHoles(
|
|
14
|
-
function _arrayLikeToArray(
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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; } }
|
|
12
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
13
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
-
function _defineProperty(
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
17
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
20
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
21
21
|
name: 'hits-per-page',
|
package/cjs/connectors/index.js
CHANGED
|
@@ -16,6 +16,12 @@ Object.defineProperty(exports, "connectBreadcrumb", {
|
|
|
16
16
|
return _connectBreadcrumb.default;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
+
Object.defineProperty(exports, "connectChat", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _connectChat.default;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
19
25
|
Object.defineProperty(exports, "connectClearRefinements", {
|
|
20
26
|
enumerable: true,
|
|
21
27
|
get: function get() {
|
|
@@ -224,7 +230,8 @@ var _connectVoiceSearch = _interopRequireDefault(require("./voice-search/connect
|
|
|
224
230
|
var _connectRelevantSort = _interopRequireDefault(require("./relevant-sort/connectRelevantSort"));
|
|
225
231
|
var _connectFrequentlyBoughtTogether = _interopRequireDefault(require("./frequently-bought-together/connectFrequentlyBoughtTogether"));
|
|
226
232
|
var _connectLookingSimilar = _interopRequireDefault(require("./looking-similar/connectLookingSimilar"));
|
|
227
|
-
|
|
233
|
+
var _connectChat = _interopRequireDefault(require("./chat/connectChat"));
|
|
234
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
228
235
|
/** @deprecated answers is no longer supported */
|
|
229
236
|
var EXPERIMENTAL_connectAnswers = exports.EXPERIMENTAL_connectAnswers = (0, _utils.deprecate)(_connectAnswers.default, 'answers is no longer supported');
|
|
230
237
|
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EXPERIMENTAL_connectDynamicWidgets = exports.EXPERIMENTAL_connectConfigureRelatedItems = exports.EXPERIMENTAL_connectAnswers = void 0;
|
|
7
|
+
Object.defineProperty(exports, "connectAutocomplete", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _connectAutocomplete.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "connectBreadcrumb", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _connectBreadcrumb.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
exports.connectChat = void 0;
|
|
20
|
+
Object.defineProperty(exports, "connectClearRefinements", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _connectClearRefinements.default;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "connectConfigure", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _connectConfigure.default;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "connectCurrentRefinements", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _connectCurrentRefinements.default;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "connectDynamicWidgets", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _connectDynamicWidgets.default;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "connectFrequentlyBoughtTogether", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function get() {
|
|
47
|
+
return _connectFrequentlyBoughtTogether.default;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "connectGeoSearch", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _connectGeoSearch.default;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "connectHierarchicalMenu", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function get() {
|
|
59
|
+
return _connectHierarchicalMenu.default;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "connectHits", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function get() {
|
|
65
|
+
return _connectHits.default;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "connectHitsPerPage", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function get() {
|
|
71
|
+
return _connectHitsPerPage.default;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "connectHitsWithInsights", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function get() {
|
|
77
|
+
return _connectHitsWithInsights.default;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "connectInfiniteHits", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function get() {
|
|
83
|
+
return _connectInfiniteHits.default;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "connectInfiniteHitsWithInsights", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function get() {
|
|
89
|
+
return _connectInfiniteHitsWithInsights.default;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "connectLookingSimilar", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function get() {
|
|
95
|
+
return _connectLookingSimilar.default;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "connectMenu", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function get() {
|
|
101
|
+
return _connectMenu.default;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, "connectNumericMenu", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function get() {
|
|
107
|
+
return _connectNumericMenu.default;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "connectPagination", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function get() {
|
|
113
|
+
return _connectPagination.default;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "connectPoweredBy", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function get() {
|
|
119
|
+
return _connectPoweredBy.default;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
Object.defineProperty(exports, "connectQueryRules", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function get() {
|
|
125
|
+
return _connectQueryRules.default;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "connectRange", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function get() {
|
|
131
|
+
return _connectRange.default;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
Object.defineProperty(exports, "connectRatingMenu", {
|
|
135
|
+
enumerable: true,
|
|
136
|
+
get: function get() {
|
|
137
|
+
return _connectRatingMenu.default;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "connectRefinementList", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function get() {
|
|
143
|
+
return _connectRefinementList.default;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
Object.defineProperty(exports, "connectRelatedProducts", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function get() {
|
|
149
|
+
return _connectRelatedProducts.default;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
Object.defineProperty(exports, "connectRelevantSort", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function get() {
|
|
155
|
+
return _connectRelevantSort.default;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
Object.defineProperty(exports, "connectSearchBox", {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
get: function get() {
|
|
161
|
+
return _connectSearchBox.default;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(exports, "connectSortBy", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function get() {
|
|
167
|
+
return _connectSortBy.default;
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
Object.defineProperty(exports, "connectStats", {
|
|
171
|
+
enumerable: true,
|
|
172
|
+
get: function get() {
|
|
173
|
+
return _connectStats.default;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(exports, "connectToggleRefinement", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: function get() {
|
|
179
|
+
return _connectToggleRefinement.default;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
Object.defineProperty(exports, "connectTrendingItems", {
|
|
183
|
+
enumerable: true,
|
|
184
|
+
get: function get() {
|
|
185
|
+
return _connectTrendingItems.default;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
Object.defineProperty(exports, "connectVoiceSearch", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function get() {
|
|
191
|
+
return _connectVoiceSearch.default;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
var _utils = require("../lib/utils");
|
|
195
|
+
var _connectAnswers = _interopRequireDefault(require("./answers/connectAnswers"));
|
|
196
|
+
var _connectConfigureRelatedItems = _interopRequireDefault(require("./configure-related-items/connectConfigureRelatedItems"));
|
|
197
|
+
var _connectDynamicWidgets = _interopRequireDefault(require("./dynamic-widgets/connectDynamicWidgets"));
|
|
198
|
+
var _connectClearRefinements = _interopRequireDefault(require("./clear-refinements/connectClearRefinements"));
|
|
199
|
+
var _connectCurrentRefinements = _interopRequireDefault(require("./current-refinements/connectCurrentRefinements"));
|
|
200
|
+
var _connectHierarchicalMenu = _interopRequireDefault(require("./hierarchical-menu/connectHierarchicalMenu"));
|
|
201
|
+
var _connectHits = _interopRequireDefault(require("./hits/connectHits"));
|
|
202
|
+
var _connectHitsWithInsights = _interopRequireDefault(require("./hits/connectHitsWithInsights"));
|
|
203
|
+
var _connectHitsPerPage = _interopRequireDefault(require("./hits-per-page/connectHitsPerPage"));
|
|
204
|
+
var _connectInfiniteHits = _interopRequireDefault(require("./infinite-hits/connectInfiniteHits"));
|
|
205
|
+
var _connectInfiniteHitsWithInsights = _interopRequireDefault(require("./infinite-hits/connectInfiniteHitsWithInsights"));
|
|
206
|
+
var _connectMenu = _interopRequireDefault(require("./menu/connectMenu"));
|
|
207
|
+
var _connectNumericMenu = _interopRequireDefault(require("./numeric-menu/connectNumericMenu"));
|
|
208
|
+
var _connectPagination = _interopRequireDefault(require("./pagination/connectPagination"));
|
|
209
|
+
var _connectRange = _interopRequireDefault(require("./range/connectRange"));
|
|
210
|
+
var _connectRefinementList = _interopRequireDefault(require("./refinement-list/connectRefinementList"));
|
|
211
|
+
var _connectRelatedProducts = _interopRequireDefault(require("./related-products/connectRelatedProducts"));
|
|
212
|
+
var _connectSearchBox = _interopRequireDefault(require("./search-box/connectSearchBox"));
|
|
213
|
+
var _connectSortBy = _interopRequireDefault(require("./sort-by/connectSortBy"));
|
|
214
|
+
var _connectRatingMenu = _interopRequireDefault(require("./rating-menu/connectRatingMenu"));
|
|
215
|
+
var _connectStats = _interopRequireDefault(require("./stats/connectStats"));
|
|
216
|
+
var _connectToggleRefinement = _interopRequireDefault(require("./toggle-refinement/connectToggleRefinement"));
|
|
217
|
+
var _connectTrendingItems = _interopRequireDefault(require("./trending-items/connectTrendingItems"));
|
|
218
|
+
var _connectBreadcrumb = _interopRequireDefault(require("./breadcrumb/connectBreadcrumb"));
|
|
219
|
+
var _connectGeoSearch = _interopRequireDefault(require("./geo-search/connectGeoSearch"));
|
|
220
|
+
var _connectPoweredBy = _interopRequireDefault(require("./powered-by/connectPoweredBy"));
|
|
221
|
+
var _connectConfigure = _interopRequireDefault(require("./configure/connectConfigure"));
|
|
222
|
+
var _connectAutocomplete = _interopRequireDefault(require("./autocomplete/connectAutocomplete"));
|
|
223
|
+
var _connectQueryRules = _interopRequireDefault(require("./query-rules/connectQueryRules"));
|
|
224
|
+
var _connectVoiceSearch = _interopRequireDefault(require("./voice-search/connectVoiceSearch"));
|
|
225
|
+
var _connectRelevantSort = _interopRequireDefault(require("./relevant-sort/connectRelevantSort"));
|
|
226
|
+
var _connectFrequentlyBoughtTogether = _interopRequireDefault(require("./frequently-bought-together/connectFrequentlyBoughtTogether"));
|
|
227
|
+
var _connectLookingSimilar = _interopRequireDefault(require("./looking-similar/connectLookingSimilar"));
|
|
228
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
229
|
+
/** @deprecated answers is no longer supported */
|
|
230
|
+
var EXPERIMENTAL_connectAnswers = exports.EXPERIMENTAL_connectAnswers = (0, _utils.deprecate)(_connectAnswers.default, 'answers is no longer supported');
|
|
231
|
+
|
|
232
|
+
/** @deprecated use connectRelatedItems instead */
|
|
233
|
+
var EXPERIMENTAL_connectConfigureRelatedItems = exports.EXPERIMENTAL_connectConfigureRelatedItems = (0, _utils.deprecate)(_connectConfigureRelatedItems.default, 'EXPERIMENTAL_connectConfigureRelatedItems is deprecated and will be removed in a next minor version of InstantSearch. Please use connectRelatedItems instead.');
|
|
234
|
+
|
|
235
|
+
/** @deprecated use connectDynamicWidgets */
|
|
236
|
+
var EXPERIMENTAL_connectDynamicWidgets = exports.EXPERIMENTAL_connectDynamicWidgets = (0, _utils.deprecate)(_connectDynamicWidgets.default, 'use connectDynamicWidgets');
|
|
237
|
+
var connectChat = exports.connectChat = function connectChat() {
|
|
238
|
+
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");
|
|
239
|
+
};
|
|
@@ -10,17 +10,17 @@ var _excluded = ["page"],
|
|
|
10
10
|
_excluded2 = ["clickAnalytics", "userToken"];
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
-
function _defineProperty(
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
-
function _toConsumableArray(
|
|
16
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
17
17
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
-
function _unsupportedIterableToArray(
|
|
19
|
-
function _iterableToArray(
|
|
20
|
-
function _arrayWithoutHoles(
|
|
21
|
-
function _arrayLikeToArray(
|
|
22
|
-
function _objectWithoutProperties(
|
|
23
|
-
function _objectWithoutPropertiesLoose(
|
|
18
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); 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; } }
|
|
19
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
20
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
21
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
22
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
23
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
24
24
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
25
25
|
name: 'infinite-hits',
|
|
26
26
|
connector: true
|
|
@@ -261,8 +261,8 @@ var connectInfiniteHits = exports.default = function connectInfiniteHits(renderF
|
|
|
261
261
|
page: page + 1
|
|
262
262
|
});
|
|
263
263
|
},
|
|
264
|
-
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters,
|
|
265
|
-
var uiState =
|
|
264
|
+
getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref0) {
|
|
265
|
+
var uiState = _ref0.uiState;
|
|
266
266
|
var widgetSearchParameters = searchParameters;
|
|
267
267
|
if (escapeHTML) {
|
|
268
268
|
// @MAJOR: set this globally, not in the InfiniteHits widget to allow InfiniteHits to be conditionally used
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _insights = require("../../lib/insights");
|
|
8
8
|
var _connectInfiniteHits = _interopRequireDefault(require("./connectInfiniteHits"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
/**
|
|
11
11
|
* Due to https://github.com/microsoft/web-build-tools/issues/1050, we need
|
|
12
12
|
* Connector<...> imported in this file, even though it is only used implicitly.
|
|
@@ -8,8 +8,8 @@ var _utils = require("../../lib/utils");
|
|
|
8
8
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
function _defineProperty(
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
11
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
15
15
|
name: 'looking-similar',
|
|
@@ -96,7 +96,7 @@ var connectLookingSimilar = exports.default = function connectLookingSimilar(ren
|
|
|
96
96
|
objectID: objectID,
|
|
97
97
|
maxRecommendations: limit,
|
|
98
98
|
threshold: threshold,
|
|
99
|
-
fallbackParameters: _objectSpread(_objectSpread({}, fallbackParameters), escapeHTML ? _utils.TAG_PLACEHOLDER : {}),
|
|
99
|
+
fallbackParameters: fallbackParameters ? _objectSpread(_objectSpread({}, fallbackParameters), escapeHTML ? _utils.TAG_PLACEHOLDER : {}) : undefined,
|
|
100
100
|
queryParameters: _objectSpread(_objectSpread({}, queryParameters), escapeHTML ? _utils.TAG_PLACEHOLDER : {}),
|
|
101
101
|
$$id: _this.$$id
|
|
102
102
|
});
|