react-instantsearch-core 7.19.0 → 7.20.1

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.
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = '7.19.0';
7
+ var _default = exports.default = '7.20.1';
@@ -1,2 +1,2 @@
1
- declare const _default: "7.19.0";
1
+ declare const _default: "7.20.1";
2
2
  export default _default;
@@ -1 +1 @@
1
- export default '7.19.0';
1
+ export default '7.20.1';
@@ -7,7 +7,7 @@
7
7
 
8
8
  var React__default = 'default' in React ? React['default'] : React;
9
9
 
10
- var version = '7.19.0';
10
+ var version = '7.20.1';
11
11
 
12
12
  function _arrayLikeToArray(r, a) {
13
13
  (null == a || a > r.length) && (a = r.length);
@@ -7977,6 +7977,11 @@
7977
7977
  return insideBoundingBoxStringToBoundingBox(value);
7978
7978
  }
7979
7979
 
7980
+ function getAlgoliaAgent(client) {
7981
+ var clientTyped = client;
7982
+ return clientTyped.transporter && clientTyped.transporter.userAgent ? clientTyped.transporter.userAgent.value : clientTyped._ua;
7983
+ }
7984
+
7980
7985
  // typed as any, since it accepts the _real_ js clients, not the interface we otherwise expect
7981
7986
  function getAppIdAndApiKey(searchClient) {
7982
7987
  if (searchClient.appId && searchClient.apiKey) {
@@ -10063,6 +10068,12 @@
10063
10068
  helper: helper
10064
10069
  })));
10065
10070
  },
10071
+ scheduleLocalSearch: defer(function () {
10072
+ if (isolated) {
10073
+ var _helper2;
10074
+ (_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.search();
10075
+ }
10076
+ }),
10066
10077
  getWidgets: function getWidgets() {
10067
10078
  return localWidgets;
10068
10079
  },
@@ -10128,8 +10139,7 @@
10128
10139
  }
10129
10140
  });
10130
10141
  if (isolated) {
10131
- var _helper2;
10132
- (_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.search();
10142
+ this.scheduleLocalSearch();
10133
10143
  } else {
10134
10144
  localInstantSearchInstance.scheduleSearch();
10135
10145
  }
@@ -10208,8 +10218,7 @@
10208
10218
  helper.recommendState = cleanedRecommendState;
10209
10219
  if (localWidgets.length) {
10210
10220
  if (isolated) {
10211
- var _helper3;
10212
- (_helper3 = helper) === null || _helper3 === void 0 ? void 0 : _helper3.search();
10221
+ this.scheduleLocalSearch();
10213
10222
  } else {
10214
10223
  localInstantSearchInstance.scheduleSearch();
10215
10224
  }
@@ -10453,7 +10462,7 @@
10453
10462
  },
10454
10463
  dispose: function dispose() {
10455
10464
  var _this5 = this,
10456
- _helper4,
10465
+ _helper3,
10457
10466
  _derivedHelper3;
10458
10467
  localWidgets.forEach(function (widget) {
10459
10468
  if (widget.dispose && helper) {
@@ -10473,7 +10482,7 @@
10473
10482
  });
10474
10483
  localInstantSearchInstance = null;
10475
10484
  localParent = null;
10476
- (_helper4 = helper) === null || _helper4 === void 0 ? void 0 : _helper4.removeAllListeners();
10485
+ (_helper3 = helper) === null || _helper3 === void 0 ? void 0 : _helper3.removeAllListeners();
10477
10486
  helper = null;
10478
10487
  (_derivedHelper3 = derivedHelper) === null || _derivedHelper3 === void 0 ? void 0 : _derivedHelper3.detach();
10479
10488
  derivedHelper = null;
@@ -11301,8 +11310,7 @@
11301
11310
  subscribe: function subscribe() {
11302
11311
  // using setTimeout here to delay extraction until widgets have been added in a tick (e.g. Vue)
11303
11312
  setTimeout(function () {
11304
- var client = instantSearchInstance.client;
11305
- payload.ua = client.transporter && client.transporter.userAgent ? client.transporter.userAgent.value : client._ua;
11313
+ payload.ua = getAlgoliaAgent(instantSearchInstance.client);
11306
11314
  extractWidgetPayload(instantSearchInstance.mainIndex.getWidgets(), instantSearchInstance, payload);
11307
11315
  instantSearchInstance.middleware.forEach(function (middleware) {
11308
11316
  return payload.widgets.push({
@@ -12825,7 +12833,7 @@
12825
12833
  };
12826
12834
  }
12827
12835
 
12828
- var version$2 = '4.83.0';
12836
+ var version$2 = '4.85.0';
12829
12837
 
12830
12838
  function _typeof$l(o) {
12831
12839
  "@babel/helpers - typeof";