instantsearch.js 4.64.3 → 4.66.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 (132) 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/InfiniteHits/InfiniteHits.js +4 -4
  8. package/cjs/components/InternalHighlight/InternalHighlight.js +2 -2
  9. package/cjs/components/MenuSelect/MenuSelect.js +2 -2
  10. package/cjs/components/Pagination/Pagination.js +3 -3
  11. package/cjs/components/Panel/Panel.js +2 -2
  12. package/cjs/components/RangeInput/RangeInput.js +4 -4
  13. package/cjs/components/RefinementList/RefinementList.js +4 -4
  14. package/cjs/components/ReverseHighlight/ReverseHighlight.js +5 -5
  15. package/cjs/components/ReverseSnippet/ReverseSnippet.js +5 -5
  16. package/cjs/components/Selector/Selector.js +3 -3
  17. package/cjs/components/Slider/Pit.js +2 -2
  18. package/cjs/components/Slider/Slider.js +3 -3
  19. package/cjs/components/Snippet/Snippet.js +5 -5
  20. package/cjs/components/Stats/Stats.js +2 -2
  21. package/cjs/components/Template/Template.js +64 -7
  22. package/cjs/connectors/answers/connectAnswers.js +3 -0
  23. package/cjs/lib/version.js +1 -1
  24. package/cjs/widgets/answers/answers.js +11 -8
  25. package/cjs/widgets/breadcrumb/breadcrumb.js +8 -8
  26. package/cjs/widgets/clear-refinements/clear-refinements.js +4 -4
  27. package/cjs/widgets/current-refinements/current-refinements.js +9 -9
  28. package/cjs/widgets/geo-search/geo-search.js +11 -11
  29. package/cjs/widgets/hierarchical-menu/defaultTemplates.js +4 -4
  30. package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +14 -14
  31. package/cjs/widgets/hits/hits.js +67 -31
  32. package/cjs/widgets/hits-per-page/hits-per-page.js +4 -4
  33. package/cjs/widgets/infinite-hits/infinite-hits.js +9 -9
  34. package/cjs/widgets/menu/defaultTemplates.js +4 -4
  35. package/cjs/widgets/menu/menu.js +11 -11
  36. package/cjs/widgets/menu-select/menu-select.js +5 -5
  37. package/cjs/widgets/numeric-menu/numeric-menu.js +9 -9
  38. package/cjs/widgets/pagination/pagination.js +13 -13
  39. package/cjs/widgets/panel/panel.js +10 -10
  40. package/cjs/widgets/places/places.js +3 -1
  41. package/cjs/widgets/powered-by/powered-by.js +4 -4
  42. package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +2 -2
  43. package/cjs/widgets/range-input/range-input.js +10 -10
  44. package/cjs/widgets/range-slider/range-slider.js +3 -3
  45. package/cjs/widgets/rating-menu/defaultTemplates.js +6 -6
  46. package/cjs/widgets/rating-menu/rating-menu.js +13 -13
  47. package/cjs/widgets/refinement-list/defaultTemplates.js +5 -5
  48. package/cjs/widgets/refinement-list/refinement-list.js +23 -23
  49. package/cjs/widgets/relevant-sort/relevant-sort.js +4 -4
  50. package/cjs/widgets/search-box/search-box.js +10 -10
  51. package/cjs/widgets/sort-by/sort-by.js +4 -4
  52. package/cjs/widgets/stats/stats.js +3 -3
  53. package/cjs/widgets/toggle-refinement/toggle-refinement.js +5 -5
  54. package/cjs/widgets/voice-search/voice-search.js +4 -4
  55. package/dist/instantsearch.development.d.ts +11 -27
  56. package/dist/instantsearch.development.js +463 -390
  57. package/dist/instantsearch.development.js.map +1 -1
  58. package/dist/instantsearch.production.d.ts +11 -27
  59. package/dist/instantsearch.production.min.d.ts +11 -27
  60. package/dist/instantsearch.production.min.js +2 -2
  61. package/dist/instantsearch.production.min.js.map +1 -1
  62. package/es/components/Answers/Answers.js +1 -1
  63. package/es/components/Breadcrumb/Breadcrumb.js +1 -1
  64. package/es/components/ClearRefinements/ClearRefinements.js +1 -1
  65. package/es/components/CurrentRefinements/CurrentRefinements.js +1 -1
  66. package/es/components/GeoSearchControls/GeoSearchControls.js +1 -1
  67. package/es/components/Highlight/Highlight.d.ts +1 -1
  68. package/es/components/Highlight/Highlight.js +1 -1
  69. package/es/components/InfiniteHits/InfiniteHits.js +1 -1
  70. package/es/components/InternalHighlight/InternalHighlight.d.ts +1 -1
  71. package/es/components/InternalHighlight/InternalHighlight.js +1 -1
  72. package/es/components/MenuSelect/MenuSelect.js +1 -1
  73. package/es/components/Pagination/Pagination.js +1 -1
  74. package/es/components/Panel/Panel.js +1 -1
  75. package/es/components/RangeInput/RangeInput.js +1 -1
  76. package/es/components/RefinementList/RefinementList.js +1 -1
  77. package/es/components/ReverseHighlight/ReverseHighlight.d.ts +1 -1
  78. package/es/components/ReverseHighlight/ReverseHighlight.js +1 -1
  79. package/es/components/ReverseSnippet/ReverseSnippet.d.ts +1 -1
  80. package/es/components/ReverseSnippet/ReverseSnippet.js +1 -1
  81. package/es/components/Selector/Selector.js +1 -1
  82. package/es/components/Slider/Pit.js +1 -1
  83. package/es/components/Slider/Slider.js +1 -1
  84. package/es/components/Snippet/Snippet.d.ts +1 -1
  85. package/es/components/Snippet/Snippet.js +1 -1
  86. package/es/components/Stats/Stats.js +1 -1
  87. package/es/components/Template/Template.d.ts +1 -1
  88. package/es/components/Template/Template.js +65 -8
  89. package/es/connectors/answers/connectAnswers.d.ts +3 -0
  90. package/es/connectors/answers/connectAnswers.js +3 -0
  91. package/es/connectors/autocomplete/connectAutocomplete.d.ts +4 -0
  92. package/es/lib/version.d.ts +1 -1
  93. package/es/lib/version.js +1 -1
  94. package/es/widgets/answers/answers.d.ts +2 -2
  95. package/es/widgets/answers/answers.js +6 -3
  96. package/es/widgets/breadcrumb/breadcrumb.js +1 -1
  97. package/es/widgets/clear-refinements/clear-refinements.js +1 -1
  98. package/es/widgets/current-refinements/current-refinements.js +1 -1
  99. package/es/widgets/geo-search/geo-search.js +1 -1
  100. package/es/widgets/hierarchical-menu/defaultTemplates.js +1 -1
  101. package/es/widgets/hierarchical-menu/hierarchical-menu.js +1 -1
  102. package/es/widgets/hits/defaultTemplates.d.ts +2 -2
  103. package/es/widgets/hits/hits.d.ts +2 -18
  104. package/es/widgets/hits/hits.js +67 -31
  105. package/es/widgets/hits-per-page/hits-per-page.js +1 -1
  106. package/es/widgets/infinite-hits/infinite-hits.js +1 -1
  107. package/es/widgets/menu/defaultTemplates.js +1 -1
  108. package/es/widgets/menu/menu.js +1 -1
  109. package/es/widgets/menu-select/menu-select.js +1 -1
  110. package/es/widgets/numeric-menu/numeric-menu.js +1 -1
  111. package/es/widgets/pagination/pagination.js +1 -1
  112. package/es/widgets/panel/panel.js +1 -1
  113. package/es/widgets/places/places.d.ts +2 -6
  114. package/es/widgets/places/places.js +4 -1
  115. package/es/widgets/powered-by/powered-by.js +1 -1
  116. package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +1 -1
  117. package/es/widgets/range-input/range-input.js +1 -1
  118. package/es/widgets/range-slider/range-slider.js +1 -1
  119. package/es/widgets/rating-menu/defaultTemplates.js +1 -1
  120. package/es/widgets/rating-menu/rating-menu.js +1 -1
  121. package/es/widgets/refinement-list/defaultTemplates.js +1 -1
  122. package/es/widgets/refinement-list/refinement-list.js +1 -1
  123. package/es/widgets/relevant-sort/relevant-sort.js +1 -1
  124. package/es/widgets/search-box/search-box.js +1 -1
  125. package/es/widgets/sort-by/sort-by.js +1 -1
  126. package/es/widgets/stats/stats.js +1 -1
  127. package/es/widgets/toggle-refinement/toggle-refinement.js +1 -1
  128. package/es/widgets/voice-search/voice-search.js +1 -1
  129. package/package.json +12 -11
  130. package/cjs/components/Hits/Hits.js +0 -72
  131. package/es/components/Hits/Hits.d.ts +0 -19
  132. package/es/components/Hits/Hits.js +0 -65
@@ -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";
@@ -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
@@ -56,5 +56,8 @@ export type AnswersWidgetDescription = {
56
56
  };
57
57
  };
58
58
  export type AnswersConnector = Connector<AnswersWidgetDescription, AnswersConnectorParams>;
59
+ /**
60
+ * @deprecated the answers service is no longer offered, and this widget will be removed in InstantSearch.js v5
61
+ */
59
62
  declare const connectAnswers: AnswersConnector;
60
63
  export default connectAnswers;
@@ -12,6 +12,9 @@ var withUsage = createDocumentationMessageGenerator({
12
12
  name: 'answers',
13
13
  connector: true
14
14
  });
15
+ /**
16
+ * @deprecated the answers service is no longer offered, and this widget will be removed in InstantSearch.js v5
17
+ */
15
18
  var connectAnswers = function connectAnswers(renderFn) {
16
19
  var unmountFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
17
20
  checkRendering(renderFn, withUsage());
@@ -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
  */
@@ -1,2 +1,2 @@
1
- declare const _default: "4.64.3";
1
+ declare const _default: "4.66.0";
2
2
  export default _default;
package/es/lib/version.js CHANGED
@@ -1 +1 @@
1
- export default '4.64.3';
1
+ export default '4.66.0';
@@ -61,5 +61,5 @@ export type AnswersWidgetParams = {
61
61
  export type AnswersWidget = WidgetFactory<AnswersWidgetDescription & {
62
62
  $$widgetType: 'ais.answers';
63
63
  }, AnswersConnectorParams, AnswersWidgetParams>;
64
- declare const answersWidget: AnswersWidget;
65
- export default answersWidget;
64
+ declare const _default: AnswersWidget;
65
+ export default _default;
@@ -4,13 +4,13 @@ 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";
11
11
  import { component } from "../../lib/suit.js";
12
12
  import { prepareTemplateProps } from "../../lib/templating/index.js";
13
- import { createDocumentationMessageGenerator, getContainerNode } from "../../lib/utils/index.js";
13
+ import { createDocumentationMessageGenerator, deprecate, getContainerNode } from "../../lib/utils/index.js";
14
14
  import defaultTemplates from "./defaultTemplates.js";
15
15
  var withUsage = createDocumentationMessageGenerator({
16
16
  name: 'answers'
@@ -41,6 +41,9 @@ var renderer = function renderer(_ref) {
41
41
  }), containerNode);
42
42
  };
43
43
  };
44
+ /**
45
+ * @deprecated the answers service is no longer offered, and this widget will be removed in InstantSearch.js v5
46
+ */
44
47
  var answersWidget = function answersWidget(widgetParams) {
45
48
  var _ref3 = widgetParams || {},
46
49
  container = _ref3.container,
@@ -98,4 +101,4 @@ var answersWidget = function answersWidget(widgetParams) {
98
101
  $$widgetType: 'ais.answers'
99
102
  });
100
103
  };
101
- export default answersWidget;
104
+ export default deprecate(answersWidget, 'The answers widget is deprecated and will be removed in InstantSearch.js 5.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 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";
@@ -11,7 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
11
11
  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; }
12
12
  // global for TypeScript alone
13
13
  /* global google */
14
- import { cx } from '@algolia/ui-components-shared';
14
+ import { cx } from 'instantsearch-ui-components';
15
15
  import { render } from 'preact';
16
16
  import connectGeoSearch from "../../connectors/geo-search/connectGeoSearch.js";
17
17
  import { component } from "../../lib/suit.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 { formatNumber } from "../../lib/formatNumber.js";
4
4
  var defaultTemplates = {
@@ -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 RefinementList from "../../components/RefinementList/RefinementList.js";
10
10
  import connectHierarchicalMenu from "../../connectors/hierarchical-menu/connectHierarchicalMenu.js";
@@ -1,3 +1,3 @@
1
- import type { HitsComponentTemplates } from '../../components/Hits/Hits';
2
- declare const defaultTemplates: HitsComponentTemplates;
1
+ import type { HitsTemplates } from './hits';
2
+ declare const defaultTemplates: Required<HitsTemplates>;
3
3
  export default defaultTemplates;
@@ -2,24 +2,8 @@
2
2
  import type { HitsConnectorParams, HitsWidgetDescription } from '../../connectors/hits/connectHits';
3
3
  import type { Template, TemplateWithBindEvent, Hit, WidgetFactory } from '../../types';
4
4
  import type { SearchResults } from 'algoliasearch-helper';
5
- export type HitsCSSClasses = Partial<{
6
- /**
7
- * CSS class to add to the wrapping element.
8
- */
9
- root: string | string[];
10
- /**
11
- * CSS class to add to the wrapping element when no results.
12
- */
13
- emptyRoot: string | string[];
14
- /**
15
- * CSS class to add to the list of results.
16
- */
17
- list: string | string[];
18
- /**
19
- * CSS class to add to each result.
20
- */
21
- item: string | string[];
22
- }>;
5
+ import type { HitsClassNames as HitsUiComponentClassNames } from 'instantsearch-ui-components';
6
+ export type HitsCSSClasses = Partial<HitsUiComponentClassNames>;
23
7
  export type HitsTemplates = Partial<{
24
8
  /**
25
9
  * Template to use when there are no results.