instantsearch.js 4.48.0 → 4.49.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 (114) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/cjs/components/Answers/Answers.js +4 -4
  3. package/cjs/components/Breadcrumb/Breadcrumb.js +4 -6
  4. package/cjs/components/ClearRefinements/ClearRefinements.js +2 -4
  5. package/cjs/components/CurrentRefinements/CurrentRefinements.js +2 -6
  6. package/cjs/components/GeoSearchControls/GeoSearchControls.js +3 -5
  7. package/cjs/components/Hits/Hits.js +2 -2
  8. package/cjs/components/InfiniteHits/InfiniteHits.js +4 -4
  9. package/cjs/components/MenuSelect/MenuSelect.js +2 -4
  10. package/cjs/components/Pagination/Pagination.js +3 -7
  11. package/cjs/components/Panel/Panel.js +2 -6
  12. package/cjs/components/PoweredBy/PoweredBy.js +6 -16
  13. package/cjs/components/RangeInput/RangeInput.js +4 -4
  14. package/cjs/components/RefinementList/RefinementList.js +4 -6
  15. package/cjs/components/Selector/Selector.js +3 -5
  16. package/cjs/components/Slider/Pit.js +2 -6
  17. package/cjs/components/Slider/Slider.js +3 -6
  18. package/cjs/components/Stats/Stats.js +2 -2
  19. package/cjs/connectors/current-refinements/connectCurrentRefinements.js +2 -0
  20. package/cjs/lib/InstantSearch.js +3 -1
  21. package/cjs/lib/utils/index.js +0 -13
  22. package/cjs/lib/version.js +1 -1
  23. package/cjs/widgets/answers/answers.js +7 -7
  24. package/cjs/widgets/breadcrumb/breadcrumb.js +8 -8
  25. package/cjs/widgets/clear-refinements/clear-refinements.js +4 -4
  26. package/cjs/widgets/current-refinements/current-refinements.js +9 -9
  27. package/cjs/widgets/geo-search/geo-search.js +11 -11
  28. package/cjs/widgets/hierarchical-menu/defaultTemplates.js +4 -4
  29. package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +14 -14
  30. package/cjs/widgets/hits/hits.js +5 -5
  31. package/cjs/widgets/hits-per-page/hits-per-page.js +4 -4
  32. package/cjs/widgets/infinite-hits/infinite-hits.js +9 -9
  33. package/cjs/widgets/menu/defaultTemplates.js +4 -4
  34. package/cjs/widgets/menu/menu.js +11 -11
  35. package/cjs/widgets/menu-select/menu-select.js +5 -5
  36. package/cjs/widgets/numeric-menu/numeric-menu.js +9 -9
  37. package/cjs/widgets/pagination/pagination.js +13 -13
  38. package/cjs/widgets/panel/panel.js +10 -10
  39. package/cjs/widgets/powered-by/powered-by.js +4 -4
  40. package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +2 -2
  41. package/cjs/widgets/range-input/range-input.js +10 -10
  42. package/cjs/widgets/range-slider/range-slider.js +3 -3
  43. package/cjs/widgets/rating-menu/defaultTemplates.js +6 -6
  44. package/cjs/widgets/rating-menu/rating-menu.js +13 -13
  45. package/cjs/widgets/refinement-list/defaultTemplates.js +5 -5
  46. package/cjs/widgets/refinement-list/refinement-list.js +23 -23
  47. package/cjs/widgets/relevant-sort/relevant-sort.js +4 -4
  48. package/cjs/widgets/search-box/search-box.js +10 -10
  49. package/cjs/widgets/sort-by/sort-by.js +4 -4
  50. package/cjs/widgets/stats/stats.js +3 -3
  51. package/cjs/widgets/toggle-refinement/toggle-refinement.js +5 -5
  52. package/cjs/widgets/voice-search/voice-search.js +4 -4
  53. package/dist/instantsearch.development.js +263 -324
  54. package/dist/instantsearch.development.js.map +1 -1
  55. package/dist/instantsearch.production.min.js +2 -2
  56. package/dist/instantsearch.production.min.js.map +1 -1
  57. package/es/components/Answers/Answers.js +4 -4
  58. package/es/components/Breadcrumb/Breadcrumb.js +4 -6
  59. package/es/components/ClearRefinements/ClearRefinements.js +2 -4
  60. package/es/components/CurrentRefinements/CurrentRefinements.js +2 -4
  61. package/es/components/GeoSearchControls/GeoSearchControls.js +3 -5
  62. package/es/components/Hits/Hits.js +1 -1
  63. package/es/components/InfiniteHits/InfiniteHits.js +3 -3
  64. package/es/components/InternalHighlight/InternalHighlight.d.ts +0 -1
  65. package/es/components/MenuSelect/MenuSelect.js +2 -4
  66. package/es/components/Pagination/Pagination.js +2 -4
  67. package/es/components/Panel/Panel.js +2 -6
  68. package/es/components/PoweredBy/PoweredBy.js +6 -16
  69. package/es/components/RangeInput/RangeInput.js +2 -2
  70. package/es/components/RefinementList/RefinementList.js +4 -6
  71. package/es/components/Selector/Selector.js +1 -1
  72. package/es/components/Slider/Pit.js +2 -4
  73. package/es/components/Slider/Slider.js +3 -6
  74. package/es/components/Stats/Stats.js +1 -1
  75. package/es/connectors/current-refinements/connectCurrentRefinements.js +2 -0
  76. package/es/lib/InstantSearch.js +3 -1
  77. package/es/lib/utils/index.d.ts +0 -1
  78. package/es/lib/utils/index.js +0 -1
  79. package/es/lib/version.d.ts +1 -1
  80. package/es/lib/version.js +1 -1
  81. package/es/widgets/answers/answers.js +1 -1
  82. package/es/widgets/breadcrumb/breadcrumb.js +1 -1
  83. package/es/widgets/clear-refinements/clear-refinements.js +1 -1
  84. package/es/widgets/current-refinements/current-refinements.js +1 -1
  85. package/es/widgets/geo-search/geo-search.js +1 -1
  86. package/es/widgets/hierarchical-menu/defaultTemplates.js +2 -2
  87. package/es/widgets/hierarchical-menu/hierarchical-menu.js +1 -1
  88. package/es/widgets/hits/hits.js +1 -1
  89. package/es/widgets/hits-per-page/hits-per-page.js +1 -1
  90. package/es/widgets/infinite-hits/infinite-hits.js +1 -1
  91. package/es/widgets/menu/defaultTemplates.js +1 -1
  92. package/es/widgets/menu/menu.js +1 -1
  93. package/es/widgets/menu-select/menu-select.js +1 -1
  94. package/es/widgets/numeric-menu/numeric-menu.js +1 -1
  95. package/es/widgets/pagination/pagination.js +1 -1
  96. package/es/widgets/panel/panel.js +1 -1
  97. package/es/widgets/powered-by/powered-by.js +1 -1
  98. package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +1 -1
  99. package/es/widgets/range-input/range-input.js +1 -1
  100. package/es/widgets/range-slider/range-slider.js +1 -1
  101. package/es/widgets/rating-menu/defaultTemplates.js +2 -2
  102. package/es/widgets/rating-menu/rating-menu.js +1 -1
  103. package/es/widgets/refinement-list/defaultTemplates.js +1 -1
  104. package/es/widgets/refinement-list/refinement-list.js +1 -1
  105. package/es/widgets/relevant-sort/relevant-sort.js +1 -1
  106. package/es/widgets/search-box/search-box.js +1 -1
  107. package/es/widgets/sort-by/sort-by.js +1 -1
  108. package/es/widgets/stats/stats.js +1 -1
  109. package/es/widgets/toggle-refinement/toggle-refinement.js +1 -1
  110. package/es/widgets/voice-search/voice-search.js +1 -1
  111. package/package.json +3 -5
  112. package/cjs/lib/utils/cx.js +0 -10
  113. package/es/lib/utils/cx.d.ts +0 -1
  114. package/es/lib/utils/cx.js +0 -3
@@ -2,12 +2,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
2
2
 
3
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4
4
 
5
- function _extends() { _extends = Object.assign || 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); }
6
-
7
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
6
 
7
+ function _extends() { _extends = Object.assign || 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
+
9
9
  import { h } from 'preact';
10
- import cx from 'classnames';
10
+ import { cx } from '@algolia/ui-components-shared';
11
11
  import Template from "../Template/Template.js";
12
12
 
13
13
  var Answers = function Answers(_ref) {
@@ -16,7 +16,7 @@ var Answers = function Answers(_ref) {
16
16
  cssClasses = _ref.cssClasses,
17
17
  templateProps = _ref.templateProps;
18
18
  return h("div", {
19
- className: cx(cssClasses.root, _defineProperty({}, cssClasses.emptyRoot, hits.length === 0))
19
+ className: cx(cssClasses.root, hits.length === 0 && cssClasses.emptyRoot)
20
20
  }, h(Template, _extends({}, templateProps, {
21
21
  templateKey: "header",
22
22
  rootProps: {
@@ -1,9 +1,7 @@
1
1
  function _extends() { _extends = Object.assign || 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
 
3
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
-
5
3
  import { h } from 'preact';
6
- import cx from 'classnames';
4
+ import { cx } from '@algolia/ui-components-shared';
7
5
  import Template from "../Template/Template.js";
8
6
 
9
7
  var Breadcrumb = function Breadcrumb(_ref) {
@@ -13,11 +11,11 @@ var Breadcrumb = function Breadcrumb(_ref) {
13
11
  createURL = _ref.createURL,
14
12
  refine = _ref.refine;
15
13
  return h("div", {
16
- className: cx(cssClasses.root, _defineProperty({}, cssClasses.noRefinementRoot, items.length === 0))
14
+ className: cx(cssClasses.root, items.length === 0 && cssClasses.noRefinementRoot)
17
15
  }, h("ul", {
18
16
  className: cssClasses.list
19
17
  }, h("li", {
20
- className: cx(cssClasses.item, _defineProperty({}, cssClasses.selectedItem, items.length === 0))
18
+ className: cx(cssClasses.item, items.length === 0 && cssClasses.selectedItem)
21
19
  }, h(Template, _extends({}, templateProps, {
22
20
  templateKey: "home",
23
21
  rootTagName: "a",
@@ -33,7 +31,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
33
31
  var isLast = idx === items.length - 1;
34
32
  return h("li", {
35
33
  key: item.label + idx,
36
- className: cx(cssClasses.item, _defineProperty({}, cssClasses.selectedItem, isLast))
34
+ className: cx(cssClasses.item, isLast && cssClasses.selectedItem)
37
35
  }, h(Template, _extends({}, templateProps, {
38
36
  templateKey: "separator",
39
37
  rootTagName: "span",
@@ -1,9 +1,7 @@
1
1
  function _extends() { _extends = Object.assign || 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
 
3
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
-
5
3
  import { h } from 'preact';
6
- import cx from 'classnames';
4
+ import { cx } from '@algolia/ui-components-shared';
7
5
  import Template from "../Template/Template.js";
8
6
 
9
7
  var ClearRefinements = function ClearRefinements(_ref) {
@@ -17,7 +15,7 @@ var ClearRefinements = function ClearRefinements(_ref) {
17
15
  templateKey: "resetLabel",
18
16
  rootTagName: "button",
19
17
  rootProps: {
20
- className: cx(cssClasses.button, _defineProperty({}, cssClasses.disabledButton, !hasRefinements)),
18
+ className: cx(cssClasses.button, !hasRefinements && cssClasses.disabledButton),
21
19
  onClick: refine,
22
20
  disabled: !hasRefinements
23
21
  },
@@ -1,7 +1,5 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
1
  import { h } from 'preact';
4
- import cx from 'classnames';
2
+ import { cx } from '@algolia/ui-components-shared';
5
3
  import { isSpecialClick, capitalize } from "../../lib/utils/index.js";
6
4
 
7
5
  var createItemKey = function createItemKey(_ref) {
@@ -30,7 +28,7 @@ var CurrentRefinements = function CurrentRefinements(_ref2) {
30
28
  cssClasses = _ref2.cssClasses,
31
29
  canRefine = _ref2.canRefine;
32
30
  return h("div", {
33
- className: cx(cssClasses.root, _defineProperty({}, cssClasses.noRefinementRoot, !canRefine))
31
+ className: cx(cssClasses.root, !canRefine && cssClasses.noRefinementRoot)
34
32
  }, h("ul", {
35
33
  className: cssClasses.list
36
34
  }, items.map(function (item, index) {
@@ -1,9 +1,7 @@
1
1
  function _extends() { _extends = Object.assign || 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
 
3
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
-
5
3
  import { h, Fragment } from 'preact';
6
- import cx from 'classnames';
4
+ import { cx } from '@algolia/ui-components-shared';
7
5
  import Template from "../Template/Template.js";
8
6
  import GeoSearchButton from "./GeoSearchButton.js";
9
7
  import GeoSearchToggle from "./GeoSearchToggle.js";
@@ -23,7 +21,7 @@ var GeoSearchControls = function GeoSearchControls(_ref) {
23
21
  return h(Fragment, null, enableRefine && h("div", null, enableRefineControl && h("div", {
24
22
  className: cssClasses.control
25
23
  }, isRefineOnMapMove || !hasMapMoveSinceLastRefine ? h(GeoSearchToggle, {
26
- classNameLabel: cx(cssClasses.label, _defineProperty({}, cssClasses.selectedLabel, isRefineOnMapMove)),
24
+ classNameLabel: cx(cssClasses.label, isRefineOnMapMove && cssClasses.selectedLabel),
27
25
  classNameInput: cssClasses.input,
28
26
  checked: isRefineOnMapMove,
29
27
  onToggle: onRefineToggle
@@ -40,7 +38,7 @@ var GeoSearchControls = function GeoSearchControls(_ref) {
40
38
  })))), !enableRefineControl && !isRefineOnMapMove && h("div", {
41
39
  className: cssClasses.control
42
40
  }, h(GeoSearchButton, {
43
- className: cx(cssClasses.redo, _defineProperty({}, cssClasses.disabledRedo, !hasMapMoveSinceLastRefine)),
41
+ className: cx(cssClasses.redo, !hasMapMoveSinceLastRefine && cssClasses.disabledRedo),
44
42
  disabled: !hasMapMoveSinceLastRefine,
45
43
  onClick: onRefineClick
46
44
  }, h(Template, _extends({}, templateProps, {
@@ -7,7 +7,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
7
7
  function _extends() { _extends = Object.assign || 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
8
 
9
9
  import { h } from 'preact';
10
- import cx from 'classnames';
10
+ import { cx } from '@algolia/ui-components-shared';
11
11
  import Template from "../Template/Template.js";
12
12
 
13
13
  var Hits = function Hits(_ref) {
@@ -7,7 +7,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
7
7
  function _extends() { _extends = Object.assign || 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
8
 
9
9
  import { h } from 'preact';
10
- import cx from 'classnames';
10
+ import { cx } from '@algolia/ui-components-shared';
11
11
  import Template from "../Template/Template.js";
12
12
 
13
13
  var InfiniteHits = function InfiniteHits(_ref) {
@@ -39,7 +39,7 @@ var InfiniteHits = function InfiniteHits(_ref) {
39
39
  templateKey: "showPreviousText",
40
40
  rootTagName: "button",
41
41
  rootProps: {
42
- className: cx(cssClasses.loadPrevious, _defineProperty({}, cssClasses.disabledLoadPrevious, isFirstPage)),
42
+ className: cx(cssClasses.loadPrevious, isFirstPage && cssClasses.disabledLoadPrevious),
43
43
  disabled: isFirstPage,
44
44
  onClick: showPrevious
45
45
  }
@@ -63,7 +63,7 @@ var InfiniteHits = function InfiniteHits(_ref) {
63
63
  templateKey: "showMoreText",
64
64
  rootTagName: "button",
65
65
  rootProps: {
66
- className: cx(cssClasses.loadMore, _defineProperty({}, cssClasses.disabledLoadMore, isLastPage)),
66
+ className: cx(cssClasses.loadMore, isLastPage && cssClasses.disabledLoadMore),
67
67
  disabled: isLastPage,
68
68
  onClick: showMore
69
69
  }
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const InternalHighlight: ({ parts, highlightedTagName, nonHighlightedTagName, separator, className, classNames, ...props }: import("@algolia/ui-components-highlight-vdom").HighlightProps) => JSX.Element;
@@ -1,9 +1,7 @@
1
1
  function _extends() { _extends = Object.assign || 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
 
3
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
-
5
3
  import { h } from 'preact';
6
- import cx from 'classnames';
4
+ import { cx } from '@algolia/ui-components-shared';
7
5
  import { find } from "../../lib/utils/index.js";
8
6
  import Template from "../Template/Template.js";
9
7
 
@@ -21,7 +19,7 @@ function MenuSelect(_ref) {
21
19
  selectedValue = _ref2.value;
22
20
 
23
21
  return h("div", {
24
- className: cx(cssClasses.root, _defineProperty({}, cssClasses.noRefinementRoot, items.length === 0))
22
+ className: cx(cssClasses.root, items.length === 0 && cssClasses.noRefinementRoot)
25
23
  }, h("select", {
26
24
  className: cssClasses.select,
27
25
  value: selectedValue,
@@ -1,7 +1,5 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
1
  import { h } from 'preact';
4
- import cx from 'classnames';
2
+ import { cx } from '@algolia/ui-components-shared';
5
3
  import { isSpecialClick } from "../../lib/utils/index.js";
6
4
 
7
5
  function Pagination(props) {
@@ -19,7 +17,7 @@ function Pagination(props) {
19
17
  }
20
18
 
21
19
  return h("div", {
22
- className: cx(props.cssClasses.root, _defineProperty({}, props.cssClasses.noRefinementRoot, props.nbPages <= 1))
20
+ className: cx(props.cssClasses.root, props.nbPages <= 1 && props.cssClasses.noRefinementRoot)
23
21
  }, h("ul", {
24
22
  className: props.cssClasses.list
25
23
  }, props.showFirst && h(PaginationLink, {
@@ -1,5 +1,3 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
2
 
5
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -14,12 +12,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
12
 
15
13
  import { h } from 'preact';
16
14
  import { useState, useEffect, useRef } from 'preact/hooks';
17
- import cx from 'classnames';
15
+ import { cx } from '@algolia/ui-components-shared';
18
16
  import Template from "../Template/Template.js";
19
17
 
20
18
  function Panel(props) {
21
- var _cx;
22
-
23
19
  var _useState = useState(props.isCollapsed),
24
20
  _useState2 = _slicedToArray(_useState, 2),
25
21
  isCollapsed = _useState2[0],
@@ -49,7 +45,7 @@ function Panel(props) {
49
45
  }
50
46
 
51
47
  return h("div", {
52
- className: cx(props.cssClasses.root, (_cx = {}, _defineProperty(_cx, props.cssClasses.noRefinementRoot, props.hidden), _defineProperty(_cx, props.cssClasses.collapsibleRoot, props.collapsible), _defineProperty(_cx, props.cssClasses.collapsedRoot, isCollapsed), _cx)),
48
+ className: cx(props.cssClasses.root, props.hidden && props.cssClasses.noRefinementRoot, props.collapsible && props.cssClasses.collapsibleRoot, isCollapsed && props.cssClasses.collapsedRoot),
53
49
  hidden: props.hidden
54
50
  }, props.templates.header && h("div", {
55
51
  className: props.cssClasses.header
@@ -1,15 +1,5 @@
1
1
  import { h } from 'preact';
2
2
 
3
- var _ref2 = h("path", {
4
- fill: "#5468FF",
5
- d: "M78.99.94h16.6a2.97 2.97 0 012.96 2.96v16.6a2.97 2.97 0 01-2.97 2.96h-16.6a2.97 2.97 0 01-2.96-2.96V3.9A2.96 2.96 0 0179 .94"
6
- });
7
-
8
- var _ref3 = h("path", {
9
- fill: "#FFF",
10
- d: "M89.63 5.97v-.78a.98.98 0 00-.98-.97h-2.28a.98.98 0 00-.97.97V6c0 .09.08.15.17.13a7.13 7.13 0 013.9-.02c.08.02.16-.04.16-.13m-6.25 1L83 6.6a.98.98 0 00-1.38 0l-.46.46a.97.97 0 000 1.38l.38.39c.06.06.15.04.2-.02a7.49 7.49 0 011.63-1.62c.07-.04.08-.14.02-.2m4.16 2.45v3.34c0 .1.1.17.2.12l2.97-1.54c.06-.03.08-.12.05-.18a3.7 3.7 0 00-3.08-1.87c-.07 0-.14.06-.14.13m0 8.05a4.49 4.49 0 110-8.98 4.49 4.49 0 010 8.98m0-10.85a6.37 6.37 0 100 12.74 6.37 6.37 0 000-12.74"
11
- });
12
-
13
3
  var PoweredBy = function PoweredBy(_ref) {
14
4
  var url = _ref.url,
15
5
  theme = _ref.theme,
@@ -25,18 +15,18 @@ var PoweredBy = function PoweredBy(_ref) {
25
15
  }, h("svg", {
26
16
  height: "1.2em",
27
17
  className: cssClasses.logo,
28
- viewBox: "0 0 168 24" // This style is necessary as long as it's not included in InstantSearch.css.
18
+ viewBox: "0 0 572 64" // This style is necessary as long as it's not included in InstantSearch.css.
29
19
  // For now, InstantSearch.css sets a maximum width of 70px.
30
20
  ,
31
21
  style: {
32
22
  width: 'auto'
33
23
  }
34
24
  }, h("path", {
35
- fill: theme === 'dark' ? '#FFF' : '#5D6494',
36
- d: "M6.97 6.68V8.3a4.47 4.47 0 00-2.42-.67 2.2 2.2 0 00-1.38.4c-.34.26-.5.6-.5 1.02 0 .43.16.77.49 1.03.33.25.83.53 1.51.83a7.04 7.04 0 011.9 1.08c.34.24.58.54.73.89.15.34.23.74.23 1.18 0 .95-.33 1.7-1 2.24a4 4 0 01-2.6.81 5.71 5.71 0 01-2.94-.68v-1.71c.84.63 1.81.94 2.92.94.58 0 1.05-.14 1.39-.4.34-.28.5-.65.5-1.13 0-.29-.1-.55-.3-.8a2.2 2.2 0 00-.65-.53 23.03 23.03 0 00-1.64-.78 13.67 13.67 0 01-1.11-.64c-.12-.1-.28-.22-.46-.4a1.72 1.72 0 01-.39-.5 4.46 4.46 0 01-.22-.6c-.07-.23-.1-.48-.1-.75 0-.91.33-1.63 1-2.17a4 4 0 012.57-.8c.97 0 1.8.18 2.47.52zm7.47 5.7v-.3a2.26 2.26 0 00-.5-1.44c-.3-.35-.74-.53-1.32-.53-.53 0-.99.2-1.37.58a2.9 2.9 0 00-.72 1.68h3.91zm1 2.79v1.4c-.6.34-1.38.51-2.36.51a4.02 4.02 0 01-3-1.13 4.04 4.04 0 01-1.11-2.97c0-1.3.34-2.32 1.02-3.06a3.38 3.38 0 012.6-1.1c1.03 0 1.85.32 2.46.96.6.64.9 1.57.9 2.78 0 .33-.03.68-.09 1.04h-5.31c.1.7.4 1.24.89 1.61.49.38 1.1.56 1.85.56.86 0 1.58-.2 2.15-.6zm6.61-1.78h-1.21c-.6 0-1.05.12-1.35.36-.3.23-.46.53-.46.89 0 .37.12.66.36.88.23.2.57.32 1.02.32.5 0 .9-.15 1.2-.43.3-.28.44-.65.44-1.1v-.92zm-4.07-2.55V9.33a4.96 4.96 0 012.5-.55c2.1 0 3.17 1.03 3.17 3.08V17H22.1v-.96c-.42.68-1.15 1.02-2.19 1.02-.76 0-1.38-.22-1.84-.66-.46-.44-.7-1-.7-1.68 0-.78.3-1.38.88-1.81.59-.43 1.4-.65 2.46-.65h1.34v-.46c0-.55-.13-.97-.4-1.25-.26-.29-.7-.43-1.32-.43-.86 0-1.65.24-2.35.72zm9.34-1.93v1.42c.39-1 1.1-1.5 2.12-1.5.15 0 .31.02.5.05v1.53c-.23-.1-.48-.14-.76-.14-.54 0-.99.24-1.34.71a2.8 2.8 0 00-.52 1.71V17h-1.57V8.91h1.57zm5 4.09a3 3 0 00.76 2.01c.47.53 1.14.8 2 .8.64 0 1.24-.18 1.8-.53v1.4c-.53.32-1.2.48-2 .48a3.98 3.98 0 01-4.17-4.18c0-1.16.38-2.15 1.14-2.98a4 4 0 013.1-1.23c.7 0 1.34.15 1.92.44v1.44a3.24 3.24 0 00-1.77-.5A2.65 2.65 0 0032.33 13zm7.92-7.28v4.58c.46-1 1.3-1.5 2.5-1.5.8 0 1.42.24 1.9.73.48.5.72 1.17.72 2.05V17H43.8v-5.1c0-.56-.14-.99-.43-1.29-.28-.3-.65-.45-1.1-.45-.54 0-1 .2-1.42.6-.4.4-.61 1.02-.61 1.85V17h-1.56V5.72h1.56zM55.2 15.74c.6 0 1.1-.25 1.5-.76.4-.5.6-1.16.6-1.95 0-.92-.2-1.62-.6-2.12-.4-.5-.92-.74-1.55-.74-.56 0-1.05.22-1.5.67-.44.45-.66 1.13-.66 2.06 0 .96.22 1.67.64 2.14.43.47.95.7 1.57.7zM53 5.72v4.42a2.74 2.74 0 012.43-1.34c1.03 0 1.86.38 2.51 1.15.65.76.97 1.78.97 3.05 0 1.13-.3 2.1-.92 2.9-.62.81-1.47 1.21-2.54 1.21s-1.9-.45-2.46-1.34V17h-1.58V5.72H53zm9.9 11.1l-3.22-7.9h1.74l1 2.62 1.26 3.42c.1-.32.48-1.46 1.15-3.42l.91-2.63h1.66l-2.92 7.87c-.78 2.07-1.96 3.1-3.56 3.1-.28 0-.53-.02-.73-.07v-1.34c.17.04.35.06.54.06 1.03 0 1.76-.57 2.17-1.7z"
37
- }), _ref2, _ref3, h("path", {
38
- fill: theme === 'dark' ? '#FFF' : '#5468FF',
39
- d: "M120.92 18.8c-4.38.02-4.38-3.54-4.38-4.1V1.36l2.67-.42v13.25c0 .32 0 2.36 1.71 2.37v2.24zm-10.84-2.18c.82 0 1.43-.04 1.85-.12v-2.72a5.48 5.48 0 00-1.57-.2c-.3 0-.6.02-.9.07-.3.04-.57.12-.81.24-.24.11-.44.28-.58.49a.93.93 0 00-.22.65c0 .63.22 1 .61 1.23.4.24.94.36 1.62.36zm-.23-9.7c.88 0 1.62.11 2.23.33.6.22 1.09.53 1.44.92.36.4.61.92.76 1.48.16.56.23 1.17.23 1.85v6.87a21.69 21.69 0 01-4.68.5c-.69 0-1.32-.07-1.9-.2a4 4 0 01-1.46-.63 3.3 3.3 0 01-.96-1.13 4.3 4.3 0 01-.34-1.8 3.13 3.13 0 011.43-2.63c.45-.3.95-.5 1.54-.62a8.8 8.8 0 013.79.05v-.44c0-.3-.04-.6-.11-.87a1.78 1.78 0 00-1.1-1.22 3.2 3.2 0 00-1.15-.2 9.75 9.75 0 00-2.95.46l-.33-2.19a11.43 11.43 0 013.56-.53zm52.84 9.63c.82 0 1.43-.05 1.85-.13V13.7a5.42 5.42 0 00-1.57-.2c-.3 0-.6.02-.9.07-.3.04-.57.12-.81.24-.24.12-.44.28-.58.5a.93.93 0 00-.22.65c0 .63.22.99.61 1.23.4.24.94.36 1.62.36zm-.23-9.7c.88 0 1.63.11 2.23.33.6.22 1.1.53 1.45.92.35.39.6.92.76 1.48.15.56.23 1.18.23 1.85v6.88c-.41.08-1.03.19-1.87.31-.83.12-1.77.18-2.81.18-.7 0-1.33-.06-1.9-.2a4 4 0 01-1.47-.63c-.4-.3-.72-.67-.95-1.13a4.3 4.3 0 01-.34-1.8c0-.66.13-1.08.38-1.53.26-.45.61-.82 1.05-1.1.44-.3.95-.5 1.53-.62a8.8 8.8 0 013.8.05v-.43c0-.31-.04-.6-.12-.88-.07-.28-.2-.52-.38-.73a1.78 1.78 0 00-.73-.5c-.3-.1-.68-.2-1.14-.2a9.85 9.85 0 00-2.95.47l-.32-2.19a11.63 11.63 0 013.55-.53zm-8.03-1.27a1.62 1.62 0 000-3.24 1.62 1.62 0 100 3.24zm1.35 13.22h-2.7V7.27l2.7-.42V18.8zm-4.72 0c-4.38.02-4.38-3.54-4.38-4.1l-.01-13.34 2.67-.42v13.25c0 .32 0 2.36 1.72 2.37v2.24zm-8.7-5.9a4.7 4.7 0 00-.74-2.79 2.4 2.4 0 00-2.07-1 2.4 2.4 0 00-2.06 1 4.7 4.7 0 00-.74 2.8c0 1.16.25 1.94.74 2.62a2.4 2.4 0 002.07 1.02c.88 0 1.57-.34 2.07-1.02a4.2 4.2 0 00.73-2.63zm2.74 0a6.46 6.46 0 01-1.52 4.23c-.49.53-1.07.94-1.76 1.22-.68.29-1.73.45-2.26.45a6.6 6.6 0 01-2.25-.45 5.1 5.1 0 01-2.88-3.13 7.3 7.3 0 01-.01-4.84 5.13 5.13 0 012.9-3.1 5.67 5.67 0 012.22-.42c.81 0 1.56.14 2.24.42.69.29 1.28.69 1.75 1.22.49.52.87 1.15 1.14 1.89a7 7 0 01.43 2.5zm-20.14 0c0 1.11.25 2.36.74 2.88.5.52 1.13.78 1.91.78a4.07 4.07 0 002.12-.6V9.33c-.19-.04-.99-.2-1.76-.23a2.67 2.67 0 00-2.23 1 4.73 4.73 0 00-.78 2.8zm7.44 5.27c0 1.82-.46 3.16-1.4 4-.94.85-2.37 1.27-4.3 1.27-.7 0-2.17-.13-3.34-.4l.43-2.11c.98.2 2.27.26 2.95.26 1.08 0 1.84-.22 2.3-.66.46-.43.68-1.08.68-1.94v-.44a5.2 5.2 0 01-2.54.6 5.6 5.6 0 01-2.01-.36 4.2 4.2 0 01-2.58-2.71 9.88 9.88 0 01.02-5.35 4.92 4.92 0 012.93-2.96 6.6 6.6 0 012.43-.46 19.64 19.64 0 014.43.66v10.6z"
25
+ fill: theme === 'dark' ? '#FFF' : '#36395A',
26
+ d: "M16 48.3c-3.4 0-6.3-.6-8.7-1.7A12.4 12.4 0 0 1 1.9 42C.6 40 0 38 0 35.4h6.5a6.7 6.7 0 0 0 3.9 6c1.4.7 3.3 1.1 5.6 1.1 2.2 0 4-.3 5.4-1a7 7 0 0 0 3-2.4 6 6 0 0 0 1-3.4c0-1.5-.6-2.8-1.9-3.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.6 28.4c2.2-.1 4.2-.6 5.7-2V21.7h-6.3a9.8 9.8 0 0 0-9 6.4 10.2 10.2 0 0 0 9.1 13.9h.5zM452.8 13.4c-6.2 0-11.7 3.3-14.8 8.2a18.5 18.5 0 0 0 3.6 24.3 10.4 10.4 0 0 0 13 .6c2.2-1.5 3.8-3.7 4.5-6.1v7.8c0 2.8-.8 5-2.2 6.3-1.5 1.5-4 2.2-7.5 2.2l-6-.3c-.3 0-.7.2-.8.5l-1.6 5.5c-.1.4.1.8.5 1h.1c2.8.4 5.5.6 7 .6 6.3 0 11-1.4 14-4.1 2.7-2.5 4.2-6.3 4.5-11.4V14.2c0-.5-.4-.8-.8-.8h-13.5zm6.3 8.2v18.3a9.6 9.6 0 0 1-5.6 2h-1a10.3 10.3 0 0 1-8.8-14c1.4-3.7 5-6.3 9-6.3h6.4zM291 31.5A32 32 0 0 1 322.8 0h30.8c.6 0 1.2.5 1.2 1.2v61.5c0 1.1-1.3 1.7-2.2 1l-19.2-17a18 18 0 0 1-11 3.4 18.1 18.1 0 1 1 18.2-14.8c-.1.4-.5.7-.9.6-.1 0-.3 0-.4-.2l-3.8-3.4c-.4-.3-.6-.8-.7-1.4a12 12 0 1 0-2.4 8.3c.4-.4 1-.5 1.6-.2l14.7 13.1v-46H323a26 26 0 1 0 10 49.7c.8-.4 1.6-.2 2.3.3l3 2.7c.3.2.3.7 0 1l-.2.2a32 32 0 0 1-47.2-28.6z"
40
30
  }))));
41
31
  };
42
32
 
@@ -25,7 +25,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
25
25
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
26
 
27
27
  import { h, Component } from 'preact';
28
- import cx from 'classnames';
28
+ import { cx } from '@algolia/ui-components-shared';
29
29
  import Template from "../Template/Template.js";
30
30
 
31
31
  var RangeInput = /*#__PURE__*/function (_Component) {
@@ -89,7 +89,7 @@ var RangeInput = /*#__PURE__*/function (_Component) {
89
89
  templateProps = _this$props.templateProps;
90
90
  var isDisabled = min && max ? min >= max : false;
91
91
  var hasRefinements = Boolean(minValue || maxValue);
92
- var rootClassNames = cx(cssClasses.root, _defineProperty({}, cssClasses.noRefinement, !hasRefinements));
92
+ var rootClassNames = cx(cssClasses.root, !hasRefinements && cssClasses.noRefinement);
93
93
  return h("div", {
94
94
  className: rootClassNames
95
95
  }, h("form", {
@@ -33,7 +33,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
33
33
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
34
34
 
35
35
  import { h, createRef, Component } from 'preact';
36
- import cx from 'classnames';
36
+ import { cx } from '@algolia/ui-components-shared';
37
37
  import { isSpecialClick, isEqual } from "../../lib/utils/index.js";
38
38
  import Template from "../Template/Template.js";
39
39
  import RefinementListItem from "./RefinementListItem.js";
@@ -79,8 +79,6 @@ var RefinementList = /*#__PURE__*/function (_Component) {
79
79
  }, {
80
80
  key: "_generateFacetItem",
81
81
  value: function _generateFacetItem(facetValue) {
82
- var _cx;
83
-
84
82
  var subItems;
85
83
 
86
84
  if (isHierarchicalMenuItem(facetValue) && Array.isArray(facetValue.data) && facetValue.data.length > 0) {
@@ -118,7 +116,7 @@ var RefinementList = /*#__PURE__*/function (_Component) {
118
116
  key += "/".concat(facetValue.count);
119
117
  }
120
118
 
121
- var refinementListItemClassName = cx(this.props.cssClasses.item, (_cx = {}, _defineProperty(_cx, this.props.cssClasses.selectedItem, facetValue.isRefined), _defineProperty(_cx, this.props.cssClasses.disabledItem, !facetValue.count), _defineProperty(_cx, this.props.cssClasses.parentItem, isHierarchicalMenuItem(facetValue) && Array.isArray(facetValue.data) && facetValue.data.length > 0), _cx));
119
+ var refinementListItemClassName = cx(this.props.cssClasses.item, facetValue.isRefined && this.props.cssClasses.selectedItem, !facetValue.count && this.props.cssClasses.disabledItem, Boolean(isHierarchicalMenuItem(facetValue) && Array.isArray(facetValue.data) && facetValue.data.length > 0) && this.props.cssClasses.parentItem);
122
120
  return h(RefinementListItem, {
123
121
  templateKey: "item",
124
122
  key: key,
@@ -212,7 +210,7 @@ var RefinementList = /*#__PURE__*/function (_Component) {
212
210
  value: function render() {
213
211
  var _this2 = this;
214
212
 
215
- var showMoreButtonClassName = cx(this.props.cssClasses.showMore, _defineProperty({}, this.props.cssClasses.disabledShowMore, !(this.props.showMore === true && this.props.canToggleShowMore)));
213
+ var showMoreButtonClassName = cx(this.props.cssClasses.showMore, !(this.props.showMore === true && this.props.canToggleShowMore) && this.props.cssClasses.disabledShowMore);
216
214
  var showMoreButton = this.props.showMore === true && h(Template, _extends({}, this.props.templateProps, {
217
215
  templateKey: "showMoreText",
218
216
  rootTagName: "button",
@@ -256,7 +254,7 @@ var RefinementList = /*#__PURE__*/function (_Component) {
256
254
  className: this.props.cssClasses.noResults
257
255
  }
258
256
  }));
259
- var rootClassName = cx(this.props.cssClasses.root, _defineProperty({}, this.props.cssClasses.noRefinementRoot, !this.props.facetValues || this.props.facetValues.length === 0), this.props.className);
257
+ var rootClassName = cx(this.props.cssClasses.root, (!this.props.facetValues || this.props.facetValues.length === 0) && this.props.cssClasses.noRefinementRoot, this.props.className);
260
258
  return h("div", {
261
259
  className: rootClassName
262
260
  }, this.props.children, searchBox, facetValues, noResults, showMoreButton);
@@ -1,5 +1,5 @@
1
1
  import { h } from 'preact';
2
- import cx from 'classnames';
2
+ import { cx } from '@algolia/ui-components-shared';
3
3
 
4
4
  function Selector(_ref) {
5
5
  var currentValue = _ref.currentValue,
@@ -5,7 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
7
  import { h } from 'preact';
8
- import cx from 'classnames';
8
+ import { cx } from '@algolia/ui-components-shared';
9
9
 
10
10
  var Pit = function Pit(_ref) {
11
11
  var style = _ref.style,
@@ -19,9 +19,7 @@ var Pit = function Pit(_ref) {
19
19
  style: _objectSpread(_objectSpread({}, style), {}, {
20
20
  marginLeft: positionValue === 100 ? '-2px' : 0
21
21
  }),
22
- className: cx('rheostat-marker', 'rheostat-marker-horizontal', {
23
- 'rheostat-marker-large': shouldDisplayValue
24
- })
22
+ className: cx('rheostat-marker', 'rheostat-marker-horizontal', shouldDisplayValue && 'rheostat-marker-large')
25
23
  }, shouldDisplayValue && h("div", {
26
24
  className: 'rheostat-value'
27
25
  }, pitValue));
@@ -38,7 +38,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
38
38
 
39
39
  import { h, Component } from 'preact';
40
40
  import Rheostat from "./Rheostat.js";
41
- import cx from 'classnames';
41
+ import { cx } from '@algolia/ui-components-shared';
42
42
  import { range } from "../../lib/utils/index.js";
43
43
  import Pit from "./Pit.js";
44
44
 
@@ -73,10 +73,7 @@ var Slider = /*#__PURE__*/function (_Component) {
73
73
  var roundedValue = Math.round( // have to cast as a string, as the value given to the prop is a number, but becomes a string when read
74
74
  parseFloat(props['aria-valuenow']) * 100) / 100;
75
75
  var value = _typeof(tooltips) === 'object' && tooltips.format ? tooltips.format(roundedValue) : roundedValue;
76
- var className = cx(props.className, {
77
- 'rheostat-handle-lower': props['data-handle-key'] === 0,
78
- 'rheostat-handle-upper': props['data-handle-key'] === 1
79
- });
76
+ var className = cx(props.className, props['data-handle-key'] === 0 && 'rheostat-handle-lower', props['data-handle-key'] === 1 && 'rheostat-handle-upper');
80
77
  return h("div", _extends({}, props, {
81
78
  className: className
82
79
  }), tooltips && h("div", {
@@ -150,7 +147,7 @@ var Slider = /*#__PURE__*/function (_Component) {
150
147
  max: max
151
148
  });
152
149
  return h("div", {
153
- className: cx(cssClasses.root, _defineProperty({}, cssClasses.disabledRoot, this.isDisabled))
150
+ className: cx(cssClasses.root, this.isDisabled && cssClasses.disabledRoot)
154
151
  }, h(Rheostat, {
155
152
  handle: this.createHandleComponent(tooltips),
156
153
  onChange: this.handleChange,
@@ -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
 
13
13
  import { h } from 'preact';
14
- import cx from 'classnames';
14
+ import { cx } from '@algolia/ui-components-shared';
15
15
  import Template from "../Template/Template.js";
16
16
 
17
17
  var Stats = function Stats(_ref) {
@@ -141,6 +141,8 @@ function getRefinementsItems(_ref3) {
141
141
  }
142
142
 
143
143
  function clearRefinementFromState(state, refinement) {
144
+ state = state.resetPage();
145
+
144
146
  switch (refinement.type) {
145
147
  case 'facet':
146
148
  return state.removeFacetRefinement(refinement.attribute, String(refinement.value));
@@ -60,7 +60,7 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
60
60
 
61
61
  _classCallCheck(this, InstantSearch);
62
62
 
63
- _this = _super.call(this);
63
+ _this = _super.call(this); // prevent `render` event listening from causing a warning
64
64
 
65
65
  _defineProperty(_assertThisInitialized(_this), "client", void 0);
66
66
 
@@ -141,6 +141,8 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
141
141
  });
142
142
  }));
143
143
 
144
+ _this.setMaxListeners(100);
145
+
144
146
  var _options$indexName = options.indexName,
145
147
  indexName = _options$indexName === void 0 ? null : _options$indexName,
146
148
  numberLocale = options.numberLocale,
@@ -8,7 +8,6 @@ export * from './createSendEventForFacet';
8
8
  export * from './createSendEventForHits';
9
9
  export * from './setIndexHelperState';
10
10
  export * from './isIndexWidget';
11
- export * from './cx';
12
11
  export * from './debounce';
13
12
  export * from './defer';
14
13
  export * from './documentation';
@@ -8,7 +8,6 @@ export * from "./createSendEventForFacet.js";
8
8
  export * from "./createSendEventForHits.js";
9
9
  export * from "./setIndexHelperState.js";
10
10
  export * from "./isIndexWidget.js";
11
- export * from "./cx.js";
12
11
  export * from "./debounce.js";
13
12
  export * from "./defer.js";
14
13
  export * from "./documentation.js";
@@ -1,2 +1,2 @@
1
- declare const _default: "4.48.0";
1
+ declare const _default: "4.49.0";
2
2
  export default _default;
package/es/lib/version.js CHANGED
@@ -1 +1 @@
1
- export default '4.48.0';
1
+ export default '4.49.0';
@@ -5,7 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
7
  import { h, render } from 'preact';
8
- import cx from 'classnames';
8
+ import { cx } from '@algolia/ui-components-shared';
9
9
  import defaultTemplates from "./defaultTemplates.js";
10
10
  import { createDocumentationMessageGenerator, getContainerNode } from "../../lib/utils/index.js";
11
11
  import { prepareTemplateProps } from "../../lib/templating/index.js";
@@ -5,7 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
7
  import { h, render } from 'preact';
8
- import cx from 'classnames';
8
+ import { cx } from '@algolia/ui-components-shared';
9
9
  import Breadcrumb from "../../components/Breadcrumb/Breadcrumb.js";
10
10
  import connectBreadcrumb from "../../connectors/breadcrumb/connectBreadcrumb.js";
11
11
  import defaultTemplates from "./defaultTemplates.js";
@@ -6,7 +6,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
6
6
 
7
7
  import { h, render } from 'preact';
8
8
  import ClearRefinements from "../../components/ClearRefinements/ClearRefinements.js";
9
- import cx from 'classnames';
9
+ import { cx } from '@algolia/ui-components-shared';
10
10
  import connectClearRefinements from "../../connectors/clear-refinements/connectClearRefinements.js";
11
11
  import defaultTemplates from "./defaultTemplates.js";
12
12
  import { getContainerNode, createDocumentationMessageGenerator } from "../../lib/utils/index.js";
@@ -5,7 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
7
  import { h, render } from 'preact';
8
- import cx from 'classnames';
8
+ import { cx } from '@algolia/ui-components-shared';
9
9
  import CurrentRefinements from "../../components/CurrentRefinements/CurrentRefinements.js";
10
10
  import connectCurrentRefinements from "../../connectors/current-refinements/connectCurrentRefinements.js";
11
11
  import { getContainerNode, createDocumentationMessageGenerator } from "../../lib/utils/index.js";
@@ -11,7 +11,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
11
11
  // global for TypeScript alone
12
12
 
13
13
  /* global google */
14
- import cx from 'classnames';
14
+ import { cx } from '@algolia/ui-components-shared';
15
15
  import { render } from 'preact';
16
16
  import { getContainerNode, createDocumentationMessageGenerator } from "../../lib/utils/index.js";
17
17
  import { renderTemplate } from "../../lib/templating/index.js";
@@ -1,6 +1,6 @@
1
1
  import { h } from 'preact';
2
2
  import { formatNumber } from "../../lib/formatNumber.js";
3
- import { cx } from "../../lib/utils/index.js";
3
+ import { cx } from '@algolia/ui-components-shared';
4
4
  var defaultTemplates = {
5
5
  item: function item(_ref) {
6
6
  var url = _ref.url,
@@ -9,7 +9,7 @@ var defaultTemplates = {
9
9
  cssClasses = _ref.cssClasses,
10
10
  isRefined = _ref.isRefined;
11
11
  return h("a", {
12
- className: cx([cx(cssClasses.link), cx(isRefined ? cssClasses.selectedItemLink : undefined)]),
12
+ className: cx(cx(cssClasses.link), cx(isRefined ? cssClasses.selectedItemLink : undefined)),
13
13
  href: url
14
14
  }, h("span", {
15
15
  className: cx(cssClasses.label)