instantsearch.js 4.64.2 → 4.65.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.
Files changed (133) hide show
  1. package/cjs/components/Answers/Answers.js +2 -2
  2. package/cjs/components/Breadcrumb/Breadcrumb.js +4 -4
  3. package/cjs/components/ClearRefinements/ClearRefinements.js +2 -2
  4. package/cjs/components/CurrentRefinements/CurrentRefinements.js +2 -2
  5. package/cjs/components/GeoSearchControls/GeoSearchControls.js +3 -3
  6. package/cjs/components/Highlight/Highlight.js +5 -5
  7. package/cjs/components/Hits/Hits.js +2 -2
  8. package/cjs/components/InfiniteHits/InfiniteHits.js +4 -4
  9. package/cjs/components/InternalHighlight/InternalHighlight.js +2 -2
  10. package/cjs/components/MenuSelect/MenuSelect.js +2 -2
  11. package/cjs/components/Pagination/Pagination.js +3 -3
  12. package/cjs/components/Panel/Panel.js +2 -2
  13. package/cjs/components/RangeInput/RangeInput.js +4 -4
  14. package/cjs/components/RefinementList/RefinementList.js +4 -4
  15. package/cjs/components/ReverseHighlight/ReverseHighlight.js +5 -5
  16. package/cjs/components/ReverseSnippet/ReverseSnippet.js +5 -5
  17. package/cjs/components/Selector/Selector.js +3 -3
  18. package/cjs/components/Slider/Pit.js +2 -2
  19. package/cjs/components/Slider/Slider.js +3 -3
  20. package/cjs/components/Snippet/Snippet.js +5 -5
  21. package/cjs/components/Stats/Stats.js +2 -2
  22. package/cjs/components/Template/Template.js +64 -7
  23. package/cjs/connectors/autocomplete/connectAutocomplete.js +3 -1
  24. package/cjs/connectors/geo-search/connectGeoSearch.js +3 -1
  25. package/cjs/connectors/hits/connectHits.js +6 -2
  26. package/cjs/connectors/infinite-hits/connectInfiniteHits.js +6 -2
  27. package/cjs/lib/utils/createSendEventForHits.js +8 -8
  28. package/cjs/lib/version.js +1 -1
  29. package/cjs/widgets/answers/answers.js +7 -7
  30. package/cjs/widgets/breadcrumb/breadcrumb.js +8 -8
  31. package/cjs/widgets/clear-refinements/clear-refinements.js +4 -4
  32. package/cjs/widgets/current-refinements/current-refinements.js +9 -9
  33. package/cjs/widgets/geo-search/geo-search.js +11 -11
  34. package/cjs/widgets/hierarchical-menu/defaultTemplates.js +4 -4
  35. package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +14 -14
  36. package/cjs/widgets/hits/hits.js +5 -5
  37. package/cjs/widgets/hits-per-page/hits-per-page.js +4 -4
  38. package/cjs/widgets/infinite-hits/infinite-hits.js +9 -9
  39. package/cjs/widgets/menu/defaultTemplates.js +4 -4
  40. package/cjs/widgets/menu/menu.js +11 -11
  41. package/cjs/widgets/menu-select/menu-select.js +5 -5
  42. package/cjs/widgets/numeric-menu/numeric-menu.js +9 -9
  43. package/cjs/widgets/pagination/pagination.js +13 -13
  44. package/cjs/widgets/panel/panel.js +10 -10
  45. package/cjs/widgets/powered-by/powered-by.js +4 -4
  46. package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +2 -2
  47. package/cjs/widgets/range-input/range-input.js +10 -10
  48. package/cjs/widgets/range-slider/range-slider.js +3 -3
  49. package/cjs/widgets/rating-menu/defaultTemplates.js +6 -6
  50. package/cjs/widgets/rating-menu/rating-menu.js +13 -13
  51. package/cjs/widgets/refinement-list/defaultTemplates.js +5 -5
  52. package/cjs/widgets/refinement-list/refinement-list.js +23 -23
  53. package/cjs/widgets/relevant-sort/relevant-sort.js +4 -4
  54. package/cjs/widgets/search-box/search-box.js +10 -10
  55. package/cjs/widgets/sort-by/sort-by.js +4 -4
  56. package/cjs/widgets/stats/stats.js +3 -3
  57. package/cjs/widgets/toggle-refinement/toggle-refinement.js +5 -5
  58. package/cjs/widgets/voice-search/voice-search.js +4 -4
  59. package/dist/instantsearch.development.d.ts +6 -2
  60. package/dist/instantsearch.development.js +213 -155
  61. package/dist/instantsearch.development.js.map +1 -1
  62. package/dist/instantsearch.production.d.ts +6 -2
  63. package/dist/instantsearch.production.min.d.ts +6 -2
  64. package/dist/instantsearch.production.min.js +2 -2
  65. package/dist/instantsearch.production.min.js.map +1 -1
  66. package/es/components/Answers/Answers.js +1 -1
  67. package/es/components/Breadcrumb/Breadcrumb.js +1 -1
  68. package/es/components/ClearRefinements/ClearRefinements.js +1 -1
  69. package/es/components/CurrentRefinements/CurrentRefinements.js +1 -1
  70. package/es/components/GeoSearchControls/GeoSearchControls.js +1 -1
  71. package/es/components/Highlight/Highlight.d.ts +1 -1
  72. package/es/components/Highlight/Highlight.js +1 -1
  73. package/es/components/Hits/Hits.js +1 -1
  74. package/es/components/InfiniteHits/InfiniteHits.js +1 -1
  75. package/es/components/InternalHighlight/InternalHighlight.d.ts +1 -1
  76. package/es/components/InternalHighlight/InternalHighlight.js +1 -1
  77. package/es/components/MenuSelect/MenuSelect.js +1 -1
  78. package/es/components/Pagination/Pagination.js +1 -1
  79. package/es/components/Panel/Panel.js +1 -1
  80. package/es/components/RangeInput/RangeInput.js +1 -1
  81. package/es/components/RefinementList/RefinementList.js +1 -1
  82. package/es/components/ReverseHighlight/ReverseHighlight.d.ts +1 -1
  83. package/es/components/ReverseHighlight/ReverseHighlight.js +1 -1
  84. package/es/components/ReverseSnippet/ReverseSnippet.d.ts +1 -1
  85. package/es/components/ReverseSnippet/ReverseSnippet.js +1 -1
  86. package/es/components/Selector/Selector.js +1 -1
  87. package/es/components/Slider/Pit.js +1 -1
  88. package/es/components/Slider/Slider.js +1 -1
  89. package/es/components/Snippet/Snippet.d.ts +1 -1
  90. package/es/components/Snippet/Snippet.js +1 -1
  91. package/es/components/Stats/Stats.js +1 -1
  92. package/es/components/Template/Template.d.ts +1 -1
  93. package/es/components/Template/Template.js +65 -8
  94. package/es/connectors/autocomplete/connectAutocomplete.d.ts +4 -0
  95. package/es/connectors/autocomplete/connectAutocomplete.js +3 -1
  96. package/es/connectors/geo-search/connectGeoSearch.js +3 -1
  97. package/es/connectors/hits/connectHits.js +6 -2
  98. package/es/connectors/infinite-hits/connectInfiniteHits.js +6 -2
  99. package/es/lib/utils/createSendEventForHits.d.ts +6 -6
  100. package/es/lib/utils/createSendEventForHits.js +8 -8
  101. package/es/lib/version.d.ts +1 -1
  102. package/es/lib/version.js +1 -1
  103. package/es/widgets/answers/answers.js +1 -1
  104. package/es/widgets/breadcrumb/breadcrumb.js +1 -1
  105. package/es/widgets/clear-refinements/clear-refinements.js +1 -1
  106. package/es/widgets/current-refinements/current-refinements.js +1 -1
  107. package/es/widgets/geo-search/geo-search.js +1 -1
  108. package/es/widgets/hierarchical-menu/defaultTemplates.js +1 -1
  109. package/es/widgets/hierarchical-menu/hierarchical-menu.js +1 -1
  110. package/es/widgets/hits/hits.js +1 -1
  111. package/es/widgets/hits-per-page/hits-per-page.js +1 -1
  112. package/es/widgets/infinite-hits/infinite-hits.js +1 -1
  113. package/es/widgets/menu/defaultTemplates.js +1 -1
  114. package/es/widgets/menu/menu.js +1 -1
  115. package/es/widgets/menu-select/menu-select.js +1 -1
  116. package/es/widgets/numeric-menu/numeric-menu.js +1 -1
  117. package/es/widgets/pagination/pagination.js +1 -1
  118. package/es/widgets/panel/panel.js +1 -1
  119. package/es/widgets/powered-by/powered-by.js +1 -1
  120. package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +1 -1
  121. package/es/widgets/range-input/range-input.js +1 -1
  122. package/es/widgets/range-slider/range-slider.js +1 -1
  123. package/es/widgets/rating-menu/defaultTemplates.js +1 -1
  124. package/es/widgets/rating-menu/rating-menu.js +1 -1
  125. package/es/widgets/refinement-list/defaultTemplates.js +1 -1
  126. package/es/widgets/refinement-list/refinement-list.js +1 -1
  127. package/es/widgets/relevant-sort/relevant-sort.js +1 -1
  128. package/es/widgets/search-box/search-box.js +1 -1
  129. package/es/widgets/sort-by/sort-by.js +1 -1
  130. package/es/widgets/stats/stats.js +1 -1
  131. package/es/widgets/toggle-refinement/toggle-refinement.js +1 -1
  132. package/es/widgets/voice-search/voice-search.js +1 -1
  133. package/package.json +6 -7
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
7
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
8
- import { cx } from '@algolia/ui-components-shared';
8
+ import { cx } from 'instantsearch-ui-components';
9
9
  import { h } from 'preact';
10
10
  import { warning } from "../../lib/utils/index.js";
11
11
  import Template from "../Template/Template.js";
@@ -1,5 +1,5 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import { cx } from '@algolia/ui-components-shared';
2
+ import { cx } from 'instantsearch-ui-components';
3
3
  import { h } from 'preact';
4
4
  import Template from "../Template/Template.js";
5
5
  var Breadcrumb = function Breadcrumb(_ref) {
@@ -1,5 +1,5 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import { cx } from '@algolia/ui-components-shared';
2
+ import { cx } from 'instantsearch-ui-components';
3
3
  import { h } from 'preact';
4
4
  import Template from "../Template/Template.js";
5
5
  var ClearRefinements = function ClearRefinements(_ref) {
@@ -1,4 +1,4 @@
1
- import { cx } from '@algolia/ui-components-shared';
1
+ import { cx } from 'instantsearch-ui-components';
2
2
  import { h } from 'preact';
3
3
  import { isSpecialClick, capitalize } from "../../lib/utils/index.js";
4
4
  var createItemKey = function createItemKey(_ref) {
@@ -1,5 +1,5 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import { cx } from '@algolia/ui-components-shared';
2
+ import { cx } from 'instantsearch-ui-components';
3
3
  import { h, Fragment } from 'preact';
4
4
  import Template from "../Template/Template.js";
5
5
  import GeoSearchButton from "./GeoSearchButton.js";
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- import type { HighlightProps as InternalHighlightProps, HighlightClassNames as InternalHighlightClassNames } from '@algolia/ui-components-highlight-vdom';
2
+ import type { HighlightProps as InternalHighlightProps, HighlightClassNames as InternalHighlightClassNames } from 'instantsearch-ui-components';
3
3
  export type HighlightClassNames = InternalHighlightClassNames;
4
4
  export type HighlightProps = Omit<InternalHighlightProps, 'classNames'> & {
5
5
  classNames?: Partial<HighlightClassNames>;
@@ -2,7 +2,7 @@ var _excluded = ["classNames"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- import { cx } from '@algolia/ui-components-shared';
5
+ import { cx } from 'instantsearch-ui-components';
6
6
  import { h } from 'preact';
7
7
  import { InternalHighlight } from "../InternalHighlight/InternalHighlight.js";
8
8
  export function Highlight(_ref) {
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
7
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
8
- import { cx } from '@algolia/ui-components-shared';
8
+ import { cx } from 'instantsearch-ui-components';
9
9
  import { h } from 'preact';
10
10
  import { createInsightsEventHandler } from "../../lib/insights/listener.js";
11
11
  import { warning } from "../../lib/utils/index.js";
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
7
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
8
- import { cx } from '@algolia/ui-components-shared';
8
+ import { cx } from 'instantsearch-ui-components';
9
9
  import { h } from 'preact';
10
10
  import { createInsightsEventHandler } from "../../lib/insights/listener.js";
11
11
  import { warning } from "../../lib/utils/index.js";
@@ -1 +1 @@
1
- export declare const InternalHighlight: (userProps: import("@algolia/ui-components-highlight-vdom").HighlightProps) => JSX.Element;
1
+ export declare const InternalHighlight: (userProps: import("instantsearch-ui-components").HighlightProps) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import { createHighlightComponent } from '@algolia/ui-components-highlight-vdom';
1
+ import { createHighlightComponent } from 'instantsearch-ui-components';
2
2
  import { createElement, Fragment } from 'preact';
3
3
  export var InternalHighlight = createHighlightComponent({
4
4
  createElement: createElement,
@@ -1,5 +1,5 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import { cx } from '@algolia/ui-components-shared';
2
+ import { cx } from 'instantsearch-ui-components';
3
3
  import { h } from 'preact';
4
4
  import { find } from "../../lib/utils/index.js";
5
5
  import Template from "../Template/Template.js";
@@ -1,4 +1,4 @@
1
- import { cx } from '@algolia/ui-components-shared';
1
+ import { cx } from 'instantsearch-ui-components';
2
2
  import { h } from 'preact';
3
3
  import { isSpecialClick } from "../../lib/utils/index.js";
4
4
  import Template from "../Template/Template.js";
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { cx } from '@algolia/ui-components-shared';
7
+ import { cx } from 'instantsearch-ui-components';
8
8
  import { h } from 'preact';
9
9
  import { useState, useEffect, useRef } from 'preact/hooks';
10
10
  import Template from "../Template/Template.js";
@@ -13,7 +13,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
13
13
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
14
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
15
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
- import { cx } from '@algolia/ui-components-shared';
16
+ import { cx } from 'instantsearch-ui-components';
17
17
  import { h, Component } from 'preact';
18
18
  import Template from "../Template/Template.js";
19
19
  // Strips leading `0` from a positive number value
@@ -18,7 +18,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
18
18
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
19
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
20
20
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
21
- import { cx } from '@algolia/ui-components-shared';
21
+ import { cx } from 'instantsearch-ui-components';
22
22
  import { h, createRef, Component } from 'preact';
23
23
  import { isSpecialClick, isEqual } from "../../lib/utils/index.js";
24
24
  import SearchBox from "../SearchBox/SearchBox.js";
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- import type { HighlightProps as InternalHighlightProps, HighlightClassNames as InternalHighlightClassNames } from '@algolia/ui-components-highlight-vdom';
2
+ import type { HighlightProps as InternalHighlightProps, HighlightClassNames as InternalHighlightClassNames } from 'instantsearch-ui-components';
3
3
  export type ReverseHighlightClassNames = InternalHighlightClassNames;
4
4
  export type ReverseHighlightProps = Omit<InternalHighlightProps, 'classNames'> & {
5
5
  classNames?: Partial<ReverseHighlightClassNames>;
@@ -2,7 +2,7 @@ var _excluded = ["classNames"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- import { cx } from '@algolia/ui-components-shared';
5
+ import { cx } from 'instantsearch-ui-components';
6
6
  import { h } from 'preact';
7
7
  import { InternalHighlight } from "../InternalHighlight/InternalHighlight.js";
8
8
  export function ReverseHighlight(_ref) {
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- import type { HighlightProps as InternalHighlightProps, HighlightClassNames as InternalHighlightClassNames } from '@algolia/ui-components-highlight-vdom';
2
+ import type { HighlightProps as InternalHighlightProps, HighlightClassNames as InternalHighlightClassNames } from 'instantsearch-ui-components';
3
3
  export type ReverseSnippetClassNames = InternalHighlightClassNames;
4
4
  export type ReverseSnippetProps = Omit<InternalHighlightProps, 'classNames'> & {
5
5
  classNames?: Partial<ReverseSnippetClassNames>;
@@ -2,7 +2,7 @@ var _excluded = ["classNames"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- import { cx } from '@algolia/ui-components-shared';
5
+ import { cx } from 'instantsearch-ui-components';
6
6
  import { h } from 'preact';
7
7
  import { InternalHighlight } from "../InternalHighlight/InternalHighlight.js";
8
8
  export function ReverseSnippet(_ref) {
@@ -1,4 +1,4 @@
1
- import { cx } from '@algolia/ui-components-shared';
1
+ import { cx } from 'instantsearch-ui-components';
2
2
  import { h } from 'preact';
3
3
  function Selector(_ref) {
4
4
  var currentValue = _ref.currentValue,
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import { cx } from '@algolia/ui-components-shared';
7
+ import { cx } from 'instantsearch-ui-components';
8
8
  import { h } from 'preact';
9
9
  var Pit = function Pit(_ref) {
10
10
  var style = _ref.style,
@@ -19,7 +19,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
19
19
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
20
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
21
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
22
- import { cx } from '@algolia/ui-components-shared';
22
+ import { cx } from 'instantsearch-ui-components';
23
23
  import { h, Component } from 'preact';
24
24
  import { range } from "../../lib/utils/index.js";
25
25
  import Pit from "./Pit.js";
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- import type { HighlightProps as InternalHighlightProps, HighlightClassNames as InternalHighlightClassNames } from '@algolia/ui-components-highlight-vdom';
2
+ import type { HighlightProps as InternalHighlightProps, HighlightClassNames as InternalHighlightClassNames } from 'instantsearch-ui-components';
3
3
  export type SnippetClassNames = InternalHighlightClassNames;
4
4
  export type SnippetProps = Omit<InternalHighlightProps, 'classNames'> & {
5
5
  classNames?: Partial<SnippetClassNames>;
@@ -2,7 +2,7 @@ var _excluded = ["classNames"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- import { cx } from '@algolia/ui-components-shared';
5
+ import { cx } from 'instantsearch-ui-components';
6
6
  import { h } from 'preact';
7
7
  import { InternalHighlight } from "../InternalHighlight/InternalHighlight.js";
8
8
  export function Snippet(_ref) {
@@ -8,7 +8,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import { cx } from '@algolia/ui-components-shared';
11
+ import { cx } from 'instantsearch-ui-components';
12
12
  import { h } from 'preact';
13
13
  import Template from "../Template/Template.js";
14
14
  var Stats = function Stats(_ref) {
@@ -14,7 +14,7 @@ declare const defaultProps: {
14
14
  export type TemplateProps = {
15
15
  data?: Record<string, any>;
16
16
  rootProps?: Record<string, any>;
17
- rootTagName?: keyof JSX.IntrinsicElements;
17
+ rootTagName: keyof JSX.IntrinsicElements | 'fragment';
18
18
  templateKey: string;
19
19
  bindEvent?: BindEventForHits;
20
20
  sendEvent?: SendEventForHits;
@@ -1,5 +1,11 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+ 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."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
3
9
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
10
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
5
11
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -13,9 +19,52 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
13
19
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
20
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
21
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
- import { h, Component } from 'preact';
22
+ import { h, Component, Fragment, createRef } from 'preact';
17
23
  import { renderTemplate } from "../../lib/templating/index.js";
18
24
  import { warning, isEqual } from "../../lib/utils/index.js";
25
+ var RawHtml = /*#__PURE__*/function (_Component) {
26
+ _inherits(RawHtml, _Component);
27
+ var _super = _createSuper(RawHtml);
28
+ function RawHtml() {
29
+ var _this;
30
+ _classCallCheck(this, RawHtml);
31
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
32
+ args[_key] = arguments[_key];
33
+ }
34
+ _this = _super.call.apply(_super, [this].concat(args));
35
+ _defineProperty(_assertThisInitialized(_this), "ref", createRef());
36
+ _defineProperty(_assertThisInitialized(_this), "nodes", []);
37
+ return _this;
38
+ }
39
+ _createClass(RawHtml, [{
40
+ key: "componentDidMount",
41
+ value: function componentDidMount() {
42
+ var fragment = new DocumentFragment();
43
+ var root = document.createElement('div');
44
+ root.innerHTML = this.props.content;
45
+ this.nodes = _toConsumableArray(root.children);
46
+ this.nodes.forEach(function (node) {
47
+ return fragment.appendChild(node);
48
+ });
49
+ this.ref.current.replaceWith(fragment);
50
+ }
51
+ }, {
52
+ key: "componentWillUnmount",
53
+ value: function componentWillUnmount() {
54
+ this.nodes.forEach(function (node) {
55
+ return node.outerHTML = '';
56
+ });
57
+ }
58
+ }, {
59
+ key: "render",
60
+ value: function render() {
61
+ return h("div", {
62
+ ref: this.ref
63
+ });
64
+ }
65
+ }]);
66
+ return RawHtml;
67
+ }(Component);
19
68
  var defaultProps = {
20
69
  data: {},
21
70
  rootTagName: 'div',
@@ -24,12 +73,12 @@ var defaultProps = {
24
73
  templatesConfig: {}
25
74
  };
26
75
  // @TODO: Template should be a generic and receive TData to pass to Templates (to avoid TTemplateData to be set as `any`)
27
- var Template = /*#__PURE__*/function (_Component) {
28
- _inherits(Template, _Component);
29
- var _super = _createSuper(Template);
76
+ var Template = /*#__PURE__*/function (_Component2) {
77
+ _inherits(Template, _Component2);
78
+ var _super2 = _createSuper(Template);
30
79
  function Template() {
31
80
  _classCallCheck(this, Template);
32
- return _super.apply(this, arguments);
81
+ return _super2.apply(this, arguments);
33
82
  }
34
83
  _createClass(Template, [{
35
84
  key: "shouldComponentUpdate",
@@ -39,14 +88,14 @@ var Template = /*#__PURE__*/function (_Component) {
39
88
  }, {
40
89
  key: "render",
41
90
  value: function render() {
42
- var _this = this;
91
+ var _this2 = this;
43
92
  if (process.env.NODE_ENV === 'development') {
44
93
  var nonFunctionTemplates = Object.keys(this.props.templates).filter(function (key) {
45
- return typeof _this.props.templates[key] !== 'function';
94
+ return typeof _this2.props.templates[key] !== 'function';
46
95
  });
47
96
  process.env.NODE_ENV === 'development' ? warning(nonFunctionTemplates.length === 0, "Hogan.js and string-based templates are deprecated and will not be supported in InstantSearch.js 5.x.\n\nYou can replace them with function-form templates and use either the provided `html` function or JSX templates.\n\nString-based templates: ".concat(nonFunctionTemplates.join(', '), ".\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/js/#upgrade-templates")) : void 0;
48
97
  }
49
- var RootTagName = this.props.rootTagName;
98
+ var RootTagName = this.props.rootTagName === 'fragment' ? Fragment : this.props.rootTagName;
50
99
  var useCustomCompileOptions = this.props.useCustomCompileOptions[this.props.templateKey];
51
100
  var compileOptions = useCustomCompileOptions ? this.props.templatesConfig.compileOptions : {};
52
101
  var content = renderTemplate({
@@ -66,6 +115,14 @@ var Template = /*#__PURE__*/function (_Component) {
66
115
  if (_typeof(content) === 'object') {
67
116
  return h(RootTagName, this.props.rootProps, content);
68
117
  }
118
+
119
+ // This is to handle Hogan templates with Fragment as rootTagName
120
+ if (RootTagName === Fragment) {
121
+ return h(RawHtml, {
122
+ content: content,
123
+ key: content
124
+ });
125
+ }
69
126
  return h(RootTagName, _extends({}, this.props.rootProps, {
70
127
  dangerouslySetInnerHTML: {
71
128
  __html: content
@@ -22,6 +22,10 @@ export type AutocompleteRenderState = {
22
22
  * The name of the index
23
23
  */
24
24
  indexName: string;
25
+ /**
26
+ * The id of the index
27
+ */
28
+ indexId: string;
25
29
  /**
26
30
  * The resolved hits from the index matching the query.
27
31
  */
@@ -63,7 +63,9 @@ var connectAutocomplete = function connectAutocomplete(renderFn) {
63
63
  scopedResult.results.hits = escapeHTML ? escapeHits(scopedResult.results.hits) : scopedResult.results.hits;
64
64
  var sendEvent = createSendEventForHits({
65
65
  instantSearchInstance: instantSearchInstance,
66
- index: scopedResult.results.index,
66
+ getIndex: function getIndex() {
67
+ return scopedResult.results.index;
68
+ },
67
69
  widgetType: _this.$$type
68
70
  });
69
71
  return {
@@ -149,7 +149,9 @@ var connectGeoSearch = function connectGeoSearch(renderFn) {
149
149
  if (!sendEvent) {
150
150
  sendEvent = createSendEventForHits({
151
151
  instantSearchInstance: instantSearchInstance,
152
- index: helper.getIndex(),
152
+ getIndex: function getIndex() {
153
+ return helper.getIndex();
154
+ },
153
155
  widgetType: $$type
154
156
  });
155
157
  }
@@ -48,13 +48,17 @@ var connectHits = function connectHits(renderFn) {
48
48
  if (!sendEvent) {
49
49
  sendEvent = createSendEventForHits({
50
50
  instantSearchInstance: instantSearchInstance,
51
- index: helper.getIndex(),
51
+ getIndex: function getIndex() {
52
+ return helper.getIndex();
53
+ },
52
54
  widgetType: this.$$type
53
55
  });
54
56
  }
55
57
  if (!bindEvent) {
56
58
  bindEvent = createBindEventForHits({
57
- index: helper.getIndex(),
59
+ getIndex: function getIndex() {
60
+ return helper.getIndex();
61
+ },
58
62
  widgetType: this.$$type,
59
63
  instantSearchInstance: instantSearchInstance
60
64
  });
@@ -155,11 +155,15 @@ var connectInfiniteHits = function connectInfiniteHits(renderFn) {
155
155
  showMore = getShowMore(helper);
156
156
  sendEvent = createSendEventForHits({
157
157
  instantSearchInstance: instantSearchInstance,
158
- index: helper.getIndex(),
158
+ getIndex: function getIndex() {
159
+ return helper.getIndex();
160
+ },
159
161
  widgetType: this.$$type
160
162
  });
161
163
  bindEvent = createBindEventForHits({
162
- index: helper.getIndex(),
164
+ getIndex: function getIndex() {
165
+ return helper.getIndex();
166
+ },
163
167
  widgetType: this.$$type,
164
168
  instantSearchInstance: instantSearchInstance
165
169
  });
@@ -6,20 +6,20 @@ export type SendEventForHits = BuiltInSendEventForHits & CustomSendEventForHits;
6
6
  export type BuiltInBindEventForHits = (eventType: string, hits: Hit | Hit[], eventName?: string, additionalData?: Record<string, any>) => string;
7
7
  export type CustomBindEventForHits = (customPayload: any) => string;
8
8
  export type BindEventForHits = BuiltInBindEventForHits & CustomBindEventForHits;
9
- export declare function _buildEventPayloadsForHits({ index, widgetType, methodName, args, instantSearchInstance, }: {
9
+ export declare function _buildEventPayloadsForHits({ getIndex, widgetType, methodName, args, instantSearchInstance, }: {
10
10
  widgetType: string;
11
- index: string;
11
+ getIndex: () => string;
12
12
  methodName: 'sendEvent' | 'bindEvent';
13
13
  args: any[];
14
14
  instantSearchInstance: InstantSearch;
15
15
  }): InsightsEvent[];
16
- export declare function createSendEventForHits({ instantSearchInstance, index, widgetType, }: {
16
+ export declare function createSendEventForHits({ instantSearchInstance, getIndex, widgetType, }: {
17
17
  instantSearchInstance: InstantSearch;
18
- index: string;
18
+ getIndex: () => string;
19
19
  widgetType: string;
20
20
  }): SendEventForHits;
21
- export declare function createBindEventForHits({ index, widgetType, instantSearchInstance, }: {
22
- index: string;
21
+ export declare function createBindEventForHits({ getIndex, widgetType, instantSearchInstance, }: {
22
+ getIndex: () => string;
23
23
  widgetType: string;
24
24
  instantSearchInstance: InstantSearch;
25
25
  }): BindEventForHits;
@@ -20,7 +20,7 @@ function chunk(arr) {
20
20
  return chunks;
21
21
  }
22
22
  export function _buildEventPayloadsForHits(_ref) {
23
- var index = _ref.index,
23
+ var getIndex = _ref.getIndex,
24
24
  widgetType = _ref.widgetType,
25
25
  methodName = _ref.methodName,
26
26
  args = _ref.args,
@@ -77,7 +77,7 @@ export function _buildEventPayloadsForHits(_ref) {
77
77
  eventType: eventType,
78
78
  payload: _objectSpread({
79
79
  eventName: eventName || 'Hits Viewed',
80
- index: index,
80
+ index: getIndex(),
81
81
  objectIDs: objectIDsByChunk[i]
82
82
  }, additionalData),
83
83
  hits: batch,
@@ -92,7 +92,7 @@ export function _buildEventPayloadsForHits(_ref) {
92
92
  eventType: eventType,
93
93
  payload: _objectSpread({
94
94
  eventName: eventName || 'Hit Clicked',
95
- index: index,
95
+ index: getIndex(),
96
96
  queryID: queryID,
97
97
  objectIDs: objectIDsByChunk[i],
98
98
  positions: positionsByChunk[i]
@@ -109,7 +109,7 @@ export function _buildEventPayloadsForHits(_ref) {
109
109
  eventType: eventType,
110
110
  payload: _objectSpread({
111
111
  eventName: eventName || 'Hit Converted',
112
- index: index,
112
+ index: getIndex(),
113
113
  queryID: queryID,
114
114
  objectIDs: objectIDsByChunk[i]
115
115
  }, additionalData),
@@ -125,7 +125,7 @@ export function _buildEventPayloadsForHits(_ref) {
125
125
  }
126
126
  export function createSendEventForHits(_ref2) {
127
127
  var instantSearchInstance = _ref2.instantSearchInstance,
128
- index = _ref2.index,
128
+ getIndex = _ref2.getIndex,
129
129
  widgetType = _ref2.widgetType;
130
130
  var sentEvents = {};
131
131
  var timer = undefined;
@@ -135,7 +135,7 @@ export function createSendEventForHits(_ref2) {
135
135
  }
136
136
  var payloads = _buildEventPayloadsForHits({
137
137
  widgetType: widgetType,
138
- index: index,
138
+ getIndex: getIndex,
139
139
  methodName: 'sendEvent',
140
140
  args: args,
141
141
  instantSearchInstance: instantSearchInstance
@@ -155,7 +155,7 @@ export function createSendEventForHits(_ref2) {
155
155
  return sendEventForHits;
156
156
  }
157
157
  export function createBindEventForHits(_ref3) {
158
- var index = _ref3.index,
158
+ var getIndex = _ref3.getIndex,
159
159
  widgetType = _ref3.widgetType,
160
160
  instantSearchInstance = _ref3.instantSearchInstance;
161
161
  var bindEventForHits = function bindEventForHits() {
@@ -164,7 +164,7 @@ export function createBindEventForHits(_ref3) {
164
164
  }
165
165
  var payloads = _buildEventPayloadsForHits({
166
166
  widgetType: widgetType,
167
- index: index,
167
+ getIndex: getIndex,
168
168
  methodName: 'bindEvent',
169
169
  args: args,
170
170
  instantSearchInstance: instantSearchInstance
@@ -1,2 +1,2 @@
1
- declare const _default: "4.64.2";
1
+ declare const _default: "4.65.0";
2
2
  export default _default;
package/es/lib/version.js CHANGED
@@ -1 +1 @@
1
- export default '4.64.2';
1
+ export default '4.65.0';
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import { cx } from '@algolia/ui-components-shared';
7
+ import { cx } from 'instantsearch-ui-components';
8
8
  import { h, render } from 'preact';
9
9
  import Answers from "../../components/Answers/Answers.js";
10
10
  import connectAnswers from "../../connectors/answers/connectAnswers.js";
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import { cx } from '@algolia/ui-components-shared';
7
+ import { cx } from 'instantsearch-ui-components';
8
8
  import { h, render } from 'preact';
9
9
  import Breadcrumb from "../../components/Breadcrumb/Breadcrumb.js";
10
10
  import connectBreadcrumb from "../../connectors/breadcrumb/connectBreadcrumb.js";
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import { cx } from '@algolia/ui-components-shared';
7
+ import { cx } from 'instantsearch-ui-components';
8
8
  import { h, render } from 'preact';
9
9
  import ClearRefinements from "../../components/ClearRefinements/ClearRefinements.js";
10
10
  import connectClearRefinements from "../../connectors/clear-refinements/connectClearRefinements.js";
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
- import { cx } from '@algolia/ui-components-shared';
7
+ import { cx } from 'instantsearch-ui-components';
8
8
  import { h, render } from 'preact';
9
9
  import CurrentRefinements from "../../components/CurrentRefinements/CurrentRefinements.js";
10
10
  import connectCurrentRefinements from "../../connectors/current-refinements/connectCurrentRefinements.js";