instantsearch.js 4.74.2 → 4.75.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.
@@ -14,13 +14,15 @@ function getStateWithoutPage(state) {
14
14
  rest = _objectWithoutProperties(_ref, _excluded);
15
15
  return rest;
16
16
  }
17
- var KEY = 'ais.infiniteHits';
18
17
  function createInfiniteHitsSessionStorageCache() {
18
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
19
+ key = _ref2.key;
20
+ var KEY = ['ais.infiniteHits', key].filter(Boolean).join(':');
19
21
  return {
20
- read: function read(_ref2) {
21
- var state = _ref2.state;
22
- var sessionStorage = (0, _utils.safelyRunOnBrowser)(function (_ref3) {
23
- var window = _ref3.window;
22
+ read: function read(_ref3) {
23
+ var state = _ref3.state;
24
+ var sessionStorage = (0, _utils.safelyRunOnBrowser)(function (_ref4) {
25
+ var window = _ref4.window;
24
26
  return window.sessionStorage;
25
27
  });
26
28
  if (!sessionStorage) {
@@ -42,11 +44,11 @@ function createInfiniteHitsSessionStorageCache() {
42
44
  return null;
43
45
  }
44
46
  },
45
- write: function write(_ref4) {
46
- var state = _ref4.state,
47
- hits = _ref4.hits;
48
- var sessionStorage = (0, _utils.safelyRunOnBrowser)(function (_ref5) {
49
- var window = _ref5.window;
47
+ write: function write(_ref5) {
48
+ var state = _ref5.state,
49
+ hits = _ref5.hits;
50
+ var sessionStorage = (0, _utils.safelyRunOnBrowser)(function (_ref6) {
51
+ var window = _ref6.window;
50
52
  return window.sessionStorage;
51
53
  });
52
54
  if (!sessionStorage) {
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = '4.74.2';
7
+ var _default = '4.75.0';
8
8
  exports.default = _default;
@@ -1204,7 +1204,13 @@ declare type CreateCarouselTemplateProps<TObject extends Record<string, unknown>
1204
1204
  cssClasses?: Partial<CarouselProps<TObject>['classNames']>;
1205
1205
  };
1206
1206
 
1207
- declare function createInfiniteHitsSessionStorageCache(): InfiniteHitsCache;
1207
+ declare function createInfiniteHitsSessionStorageCache({ key, }?: {
1208
+ /**
1209
+ * If you display multiple instances of infiniteHits on the same page,
1210
+ * you must provide a unique key for each instance.
1211
+ */
1212
+ key?: string;
1213
+ }): InfiniteHitsCache;
1208
1214
 
1209
1215
  declare type CreateInsightsMiddleware = typeof createInsightsMiddleware;
1210
1216
 
@@ -1,4 +1,4 @@
1
- /*! InstantSearch.js 4.74.2 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
1
+ /*! InstantSearch.js 4.75.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -13675,13 +13675,15 @@
13675
13675
  rest = _objectWithoutProperties(_ref, _excluded$5);
13676
13676
  return rest;
13677
13677
  }
13678
- var KEY = 'ais.infiniteHits';
13679
13678
  function createInfiniteHitsSessionStorageCache() {
13679
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
13680
+ key = _ref2.key;
13681
+ var KEY = ['ais.infiniteHits', key].filter(Boolean).join(':');
13680
13682
  return {
13681
- read: function read(_ref2) {
13682
- var state = _ref2.state;
13683
- var sessionStorage = safelyRunOnBrowser(function (_ref3) {
13684
- var window = _ref3.window;
13683
+ read: function read(_ref3) {
13684
+ var state = _ref3.state;
13685
+ var sessionStorage = safelyRunOnBrowser(function (_ref4) {
13686
+ var window = _ref4.window;
13685
13687
  return window.sessionStorage;
13686
13688
  });
13687
13689
  if (!sessionStorage) {
@@ -13703,11 +13705,11 @@
13703
13705
  return null;
13704
13706
  }
13705
13707
  },
13706
- write: function write(_ref4) {
13707
- var state = _ref4.state,
13708
- hits = _ref4.hits;
13709
- var sessionStorage = safelyRunOnBrowser(function (_ref5) {
13710
- var window = _ref5.window;
13708
+ write: function write(_ref5) {
13709
+ var state = _ref5.state,
13710
+ hits = _ref5.hits;
13711
+ var sessionStorage = safelyRunOnBrowser(function (_ref6) {
13712
+ var window = _ref6.window;
13711
13713
  return window.sessionStorage;
13712
13714
  });
13713
13715
  if (!sessionStorage) {
@@ -16015,7 +16017,7 @@
16015
16017
  };
16016
16018
  }
16017
16019
 
16018
- var version$1 = '4.74.2';
16020
+ var version$1 = '4.75.0';
16019
16021
 
16020
16022
  var withUsage$v = createDocumentationMessageGenerator({
16021
16023
  name: 'instantsearch'