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
|
@@ -9,27 +9,27 @@ var _preact = require("preact");
|
|
|
9
9
|
var _utils = require("../../lib/utils");
|
|
10
10
|
var _Pit = _interopRequireDefault(require("./Pit"));
|
|
11
11
|
var _Rheostat = _interopRequireDefault(require("./Rheostat"));
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function _toConsumableArray(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
14
14
|
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."); }
|
|
15
|
-
function _unsupportedIterableToArray(
|
|
16
|
-
function _iterableToArray(
|
|
17
|
-
function _arrayWithoutHoles(
|
|
18
|
-
function _arrayLikeToArray(
|
|
19
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
15
|
+
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; } }
|
|
16
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
17
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
18
|
+
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; }
|
|
19
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
20
20
|
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); }
|
|
21
|
-
function _classCallCheck(
|
|
22
|
-
function _defineProperties(
|
|
23
|
-
function _createClass(
|
|
24
|
-
function _inherits(
|
|
25
|
-
function _setPrototypeOf(
|
|
26
|
-
function _createSuper(
|
|
27
|
-
function _possibleConstructorReturn(
|
|
28
|
-
function _assertThisInitialized(
|
|
29
|
-
function _isNativeReflectConstruct() {
|
|
30
|
-
function _getPrototypeOf(
|
|
31
|
-
function _defineProperty(
|
|
32
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
21
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
22
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
23
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
24
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
25
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
26
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
27
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
28
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
29
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
31
|
+
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; }
|
|
32
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
33
33
|
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); }
|
|
34
34
|
var Slider = /*#__PURE__*/function (_Component) {
|
|
35
35
|
_inherits(Slider, _Component);
|
|
@@ -8,9 +8,9 @@ var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _InternalHighlight = require("../InternalHighlight/InternalHighlight");
|
|
10
10
|
var _excluded = ["classNames"];
|
|
11
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
12
|
-
function _objectWithoutProperties(
|
|
13
|
-
function _objectWithoutPropertiesLoose(
|
|
11
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
14
|
function Snippet(_ref) {
|
|
15
15
|
var _ref$classNames = _ref.classNames,
|
|
16
16
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
@@ -9,15 +9,15 @@ var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
|
9
9
|
var _preact = require("preact");
|
|
10
10
|
var _Template = _interopRequireDefault(require("../Template/Template"));
|
|
11
11
|
var _excluded = ["nbHits", "nbSortedHits", "cssClasses", "templateProps"];
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
14
|
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; }
|
|
15
15
|
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; }
|
|
16
|
-
function _defineProperty(
|
|
17
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
16
|
+
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; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
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); }
|
|
19
|
-
function _objectWithoutProperties(
|
|
20
|
-
function _objectWithoutPropertiesLoose(
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
21
|
var Stats = function Stats(_ref) {
|
|
22
22
|
var nbHits = _ref.nbHits,
|
|
23
23
|
nbSortedHits = _ref.nbSortedHits,
|
|
@@ -7,26 +7,26 @@ exports.default = void 0;
|
|
|
7
7
|
var _preact = require("preact");
|
|
8
8
|
var _templating = require("../../lib/templating");
|
|
9
9
|
var _utils = require("../../lib/utils");
|
|
10
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
10
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
11
11
|
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); }
|
|
12
|
-
function _toConsumableArray(
|
|
12
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
13
13
|
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."); }
|
|
14
|
-
function _unsupportedIterableToArray(
|
|
15
|
-
function _iterableToArray(
|
|
16
|
-
function _arrayWithoutHoles(
|
|
17
|
-
function _arrayLikeToArray(
|
|
18
|
-
function _classCallCheck(
|
|
19
|
-
function _defineProperties(
|
|
20
|
-
function _createClass(
|
|
21
|
-
function _inherits(
|
|
22
|
-
function _setPrototypeOf(
|
|
23
|
-
function _createSuper(
|
|
24
|
-
function _possibleConstructorReturn(
|
|
25
|
-
function _assertThisInitialized(
|
|
26
|
-
function _isNativeReflectConstruct() {
|
|
27
|
-
function _getPrototypeOf(
|
|
28
|
-
function _defineProperty(
|
|
29
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
14
|
+
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; } }
|
|
15
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
16
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
17
|
+
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; }
|
|
18
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
19
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
20
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
21
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
22
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
23
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
24
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
25
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
26
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
28
|
+
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; }
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
30
30
|
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); }
|
|
31
31
|
var RawHtml = /*#__PURE__*/function (_Component) {
|
|
32
32
|
_inherits(RawHtml, _Component);
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _preact = require("preact");
|
|
8
8
|
var _Template = _interopRequireDefault(require("../Template/Template"));
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
11
11
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
12
12
|
var currentRefinement = _ref.currentRefinement,
|
|
13
13
|
refine = _ref.refine,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _preact = require("preact");
|
|
8
8
|
var _Template = _interopRequireDefault(require("../Template/Template"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
var VoiceSearch = function VoiceSearch(_ref) {
|
|
11
11
|
var cssClasses = _ref.cssClasses,
|
|
12
12
|
isBrowserSupported = _ref.isBrowserSupported,
|
|
@@ -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
|
function hasFindAnswersMethod(answersIndex) {
|
|
15
15
|
return typeof answersIndex.findAnswers === 'function';
|
|
@@ -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: 'autocomplete',
|
|
@@ -8,15 +8,15 @@ exports.default = void 0;
|
|
|
8
8
|
var _utils = require("../../lib/utils");
|
|
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
|
-
function _slicedToArray(
|
|
14
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
15
15
|
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."); }
|
|
16
|
-
function _unsupportedIterableToArray(
|
|
17
|
-
function _arrayLikeToArray(
|
|
16
|
+
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; } }
|
|
17
|
+
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; }
|
|
18
18
|
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; } }
|
|
19
|
-
function _arrayWithHoles(
|
|
19
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
20
20
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
21
21
|
name: 'breadcrumb',
|
|
22
22
|
connector: true
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _ai = require("ai");
|
|
9
|
+
var _chat = require("../../lib/chat");
|
|
10
|
+
var _utils = require("../../lib/utils");
|
|
11
|
+
var _excluded = ["resume", "tools"];
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); }
|
|
17
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
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(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
|
+
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(r) { if (Array.isArray(r)) return r; }
|
|
23
|
+
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; }
|
|
24
|
+
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; }
|
|
25
|
+
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
26
|
+
name: 'chat',
|
|
27
|
+
connector: true
|
|
28
|
+
});
|
|
29
|
+
var connectChat = exports.default = function connectChat(renderFn) {
|
|
30
|
+
var unmountFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _utils.noop;
|
|
31
|
+
(0, _utils.checkRendering)(renderFn, withUsage());
|
|
32
|
+
return function (widgetParams) {
|
|
33
|
+
process.env.NODE_ENV === 'development' ? (0, _utils.warning)(false, 'Chat is not yet stable and will change in the future.') : void 0;
|
|
34
|
+
var _ref = widgetParams || {},
|
|
35
|
+
_ref$resume = _ref.resume,
|
|
36
|
+
resume = _ref$resume === void 0 ? false : _ref$resume,
|
|
37
|
+
_ref$tools = _ref.tools,
|
|
38
|
+
tools = _ref$tools === void 0 ? {} : _ref$tools,
|
|
39
|
+
options = _objectWithoutProperties(_ref, _excluded);
|
|
40
|
+
var _chatInstance;
|
|
41
|
+
var input = '';
|
|
42
|
+
var open = false;
|
|
43
|
+
var isClearing = false;
|
|
44
|
+
var sendEvent;
|
|
45
|
+
var setInput;
|
|
46
|
+
var setOpen;
|
|
47
|
+
var setIsClearing;
|
|
48
|
+
var setMessages = function setMessages(messagesParam) {
|
|
49
|
+
if (typeof messagesParam === 'function') {
|
|
50
|
+
messagesParam = messagesParam(_chatInstance.messages);
|
|
51
|
+
}
|
|
52
|
+
_chatInstance.messages = messagesParam;
|
|
53
|
+
};
|
|
54
|
+
var clearMessages = function clearMessages() {
|
|
55
|
+
if (!_chatInstance.messages || _chatInstance.messages.length === 0) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
setIsClearing(true);
|
|
59
|
+
};
|
|
60
|
+
var onClearTransitionEnd = function onClearTransitionEnd() {
|
|
61
|
+
setMessages([]);
|
|
62
|
+
_chatInstance.clearError();
|
|
63
|
+
setIsClearing(false);
|
|
64
|
+
};
|
|
65
|
+
var makeChatInstance = function makeChatInstance(instantSearchInstance) {
|
|
66
|
+
var transport;
|
|
67
|
+
var _getAppIdAndApiKey = (0, _utils.getAppIdAndApiKey)(instantSearchInstance.client),
|
|
68
|
+
_getAppIdAndApiKey2 = _slicedToArray(_getAppIdAndApiKey, 2),
|
|
69
|
+
appId = _getAppIdAndApiKey2[0],
|
|
70
|
+
apiKey = _getAppIdAndApiKey2[1];
|
|
71
|
+
if ('transport' in options && options.transport) {
|
|
72
|
+
transport = new _ai.DefaultChatTransport(options.transport);
|
|
73
|
+
}
|
|
74
|
+
if ('agentId' in options && options.agentId) {
|
|
75
|
+
var agentId = options.agentId;
|
|
76
|
+
if (!appId || !apiKey) {
|
|
77
|
+
throw new Error(withUsage('Could not extract Algolia credentials from the search client.'));
|
|
78
|
+
}
|
|
79
|
+
transport = new _ai.DefaultChatTransport({
|
|
80
|
+
api: "https://".concat(appId, ".algolia.net/agent-studio/1/agents/").concat(agentId, "/completions?compatibilityMode=ai-sdk-5"),
|
|
81
|
+
headers: {
|
|
82
|
+
'x-algolia-application-id': appId,
|
|
83
|
+
'x-algolia-api-Key': apiKey
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
if (!transport) {
|
|
88
|
+
throw new Error(withUsage('You need to provide either an `agentId` or a `transport`.'));
|
|
89
|
+
}
|
|
90
|
+
if ('chat' in options) {
|
|
91
|
+
return options.chat;
|
|
92
|
+
}
|
|
93
|
+
return new _chat.Chat(_objectSpread(_objectSpread({}, options), {}, {
|
|
94
|
+
transport: transport,
|
|
95
|
+
sendAutomaticallyWhen: _ai.lastAssistantMessageIsCompleteWithToolCalls,
|
|
96
|
+
onToolCall: function onToolCall(_ref2) {
|
|
97
|
+
var toolCall = _ref2.toolCall;
|
|
98
|
+
var tool = tools[toolCall.toolName];
|
|
99
|
+
if (!tool) {
|
|
100
|
+
if (process.env.NODE_ENV === 'development') {
|
|
101
|
+
throw new Error("No tool implementation found for \"".concat(toolCall.toolName, "\". Please provide a tool implementation in the `tools` prop."));
|
|
102
|
+
}
|
|
103
|
+
return _chatInstance.addToolResult({
|
|
104
|
+
output: "No tool implemented for \"".concat(toolCall.toolName, "\"."),
|
|
105
|
+
tool: toolCall.toolName,
|
|
106
|
+
toolCallId: toolCall.toolCallId
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (tool.onToolCall) {
|
|
110
|
+
var addToolResult = function addToolResult(_ref3) {
|
|
111
|
+
var output = _ref3.output;
|
|
112
|
+
return _chatInstance.addToolResult({
|
|
113
|
+
output: output,
|
|
114
|
+
tool: toolCall.toolName,
|
|
115
|
+
toolCallId: toolCall.toolCallId
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
return tool.onToolCall(_objectSpread(_objectSpread({}, toolCall), {}, {
|
|
119
|
+
addToolResult: addToolResult
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
return Promise.resolve();
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
125
|
+
};
|
|
126
|
+
return {
|
|
127
|
+
$$type: 'ais.chat',
|
|
128
|
+
init: function init(initOptions) {
|
|
129
|
+
var _this = this;
|
|
130
|
+
var instantSearchInstance = initOptions.instantSearchInstance;
|
|
131
|
+
_chatInstance = makeChatInstance(instantSearchInstance);
|
|
132
|
+
var render = function render() {
|
|
133
|
+
renderFn(_objectSpread(_objectSpread({}, _this.getWidgetRenderState(initOptions)), {}, {
|
|
134
|
+
instantSearchInstance: initOptions.instantSearchInstance
|
|
135
|
+
}), false);
|
|
136
|
+
};
|
|
137
|
+
setOpen = function setOpen(o) {
|
|
138
|
+
open = o;
|
|
139
|
+
render();
|
|
140
|
+
};
|
|
141
|
+
setInput = function setInput(i) {
|
|
142
|
+
input = i;
|
|
143
|
+
render();
|
|
144
|
+
};
|
|
145
|
+
setIsClearing = function setIsClearing(value) {
|
|
146
|
+
isClearing = value;
|
|
147
|
+
render();
|
|
148
|
+
};
|
|
149
|
+
_chatInstance['~registerErrorCallback'](render);
|
|
150
|
+
_chatInstance['~registerMessagesCallback'](render);
|
|
151
|
+
_chatInstance['~registerStatusCallback'](render);
|
|
152
|
+
if (resume) {
|
|
153
|
+
_chatInstance.resumeStream();
|
|
154
|
+
}
|
|
155
|
+
renderFn(_objectSpread(_objectSpread({}, this.getWidgetRenderState(initOptions)), {}, {
|
|
156
|
+
instantSearchInstance: instantSearchInstance
|
|
157
|
+
}), true);
|
|
158
|
+
},
|
|
159
|
+
render: function render(renderOptions) {
|
|
160
|
+
renderFn(_objectSpread(_objectSpread({}, this.getWidgetRenderState(renderOptions)), {}, {
|
|
161
|
+
instantSearchInstance: renderOptions.instantSearchInstance
|
|
162
|
+
}), false);
|
|
163
|
+
},
|
|
164
|
+
getRenderState: function getRenderState(renderState) {
|
|
165
|
+
return renderState;
|
|
166
|
+
},
|
|
167
|
+
getWidgetRenderState: function getWidgetRenderState(renderState) {
|
|
168
|
+
var instantSearchInstance = renderState.instantSearchInstance,
|
|
169
|
+
parent = renderState.parent;
|
|
170
|
+
if (!_chatInstance) {
|
|
171
|
+
this.init(_objectSpread(_objectSpread({}, renderState), {}, {
|
|
172
|
+
uiState: {},
|
|
173
|
+
results: undefined
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
if (!sendEvent) {
|
|
177
|
+
sendEvent = (0, _utils.createSendEventForHits)({
|
|
178
|
+
instantSearchInstance: renderState.instantSearchInstance,
|
|
179
|
+
helper: renderState.helper,
|
|
180
|
+
widgetType: this.$$type
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
indexUiState: instantSearchInstance.getUiState()[parent.getIndexId()],
|
|
185
|
+
input: input,
|
|
186
|
+
open: open,
|
|
187
|
+
sendEvent: sendEvent,
|
|
188
|
+
setIndexUiState: parent.setIndexUiState.bind(parent),
|
|
189
|
+
setInput: setInput,
|
|
190
|
+
setOpen: setOpen,
|
|
191
|
+
setMessages: setMessages,
|
|
192
|
+
isClearing: isClearing,
|
|
193
|
+
clearMessages: clearMessages,
|
|
194
|
+
onClearTransitionEnd: onClearTransitionEnd,
|
|
195
|
+
tools: tools,
|
|
196
|
+
widgetParams: widgetParams,
|
|
197
|
+
// Chat instance render state
|
|
198
|
+
addToolResult: _chatInstance.addToolResult,
|
|
199
|
+
clearError: _chatInstance.clearError,
|
|
200
|
+
error: _chatInstance.error,
|
|
201
|
+
id: _chatInstance.id,
|
|
202
|
+
messages: _chatInstance.messages,
|
|
203
|
+
regenerate: _chatInstance.regenerate,
|
|
204
|
+
resumeStream: _chatInstance.resumeStream,
|
|
205
|
+
sendMessage: _chatInstance.sendMessage,
|
|
206
|
+
status: _chatInstance.status,
|
|
207
|
+
stop: _chatInstance.stop
|
|
208
|
+
};
|
|
209
|
+
},
|
|
210
|
+
dispose: function dispose() {
|
|
211
|
+
unmountFn();
|
|
212
|
+
},
|
|
213
|
+
shouldRender: function shouldRender() {
|
|
214
|
+
return true;
|
|
215
|
+
},
|
|
216
|
+
get chatInstance() {
|
|
217
|
+
return _chatInstance;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
@@ -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: 'clear-refinements',
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _algoliasearchHelper = _interopRequireDefault(require("algoliasearch-helper"));
|
|
8
8
|
var _utils = require("../../lib/utils");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
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); }
|
|
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
16
|
/**
|
|
17
17
|
* Refine the given search parameters.
|
|
@@ -8,18 +8,18 @@ exports.default = void 0;
|
|
|
8
8
|
var _algoliasearchHelper = _interopRequireDefault(require("algoliasearch-helper"));
|
|
9
9
|
var _utils = require("../../lib/utils");
|
|
10
10
|
var _connectConfigure = _interopRequireDefault(require("../configure/connectConfigure"));
|
|
11
|
-
function _interopRequireDefault(
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
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; }
|
|
13
13
|
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; }
|
|
14
|
-
function _defineProperty(
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
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); }
|
|
17
|
-
function _toConsumableArray(
|
|
17
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
18
18
|
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."); }
|
|
19
|
-
function _unsupportedIterableToArray(
|
|
20
|
-
function _iterableToArray(
|
|
21
|
-
function _arrayWithoutHoles(
|
|
22
|
-
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 _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
21
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
22
|
+
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; }
|
|
23
23
|
var withUsage = (0, _utils.createDocumentationMessageGenerator)({
|
|
24
24
|
name: 'configure-related-items',
|
|
25
25
|
connector: true
|