react-instantsearch 6.39.0 → 6.40.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.
package/dist/umd/Dom.js CHANGED
@@ -196,6 +196,9 @@
196
196
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
197
197
  }, _typeof(obj);
198
198
  }
199
+ // eslint-disable-next-line @typescript-eslint/unbound-method
200
+ var hasOwn = Object.prototype.hasOwnProperty;
201
+
199
202
  // From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
200
203
  var shallowEqual = function shallowEqual(objA, objB) {
201
204
  if (objA === objB) {
@@ -208,7 +211,6 @@
208
211
  }
209
212
 
210
213
  // Test for A's keys different from B.
211
- var hasOwn = Object.prototype.hasOwnProperty;
212
214
  for (var i = 0; i < keysA.length; i++) {
213
215
  if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
214
216
  return false;
@@ -868,7 +870,7 @@
868
870
  });
869
871
  }
870
872
 
871
- var version = '6.39.0';
873
+ var version = '6.40.0';
872
874
 
873
875
  function _typeof$2(obj) {
874
876
  "@babel/helpers - typeof";
@@ -5462,7 +5464,7 @@
5462
5464
 
5463
5465
  var requestBuilder_1 = requestBuilder;
5464
5466
 
5465
- var version$1 = '3.11.3';
5467
+ var version$1 = '3.13.0';
5466
5468
 
5467
5469
  var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
5468
5470
 
@@ -6728,7 +6730,9 @@
6728
6730
 
6729
6731
  var derivedQueries = this.derivedHelpers.map(function(derivedHelper) {
6730
6732
  var derivedState = derivedHelper.getModifiedState(state);
6731
- var derivedStateQueries = requestBuilder_1._getQueries(derivedState.index, derivedState);
6733
+ var derivedStateQueries = derivedState.index
6734
+ ? requestBuilder_1._getQueries(derivedState.index, derivedState)
6735
+ : [];
6732
6736
 
6733
6737
  states.push({
6734
6738
  state: derivedState,
@@ -6745,10 +6749,16 @@
6745
6749
  });
6746
6750
 
6747
6751
  var queries = Array.prototype.concat.apply(mainQueries, derivedQueries);
6748
- var queryId = this._queryId++;
6749
6752
 
6753
+ var queryId = this._queryId++;
6750
6754
  this._currentNbQueries++;
6751
6755
 
6756
+ if (!queries.length) {
6757
+ return Promise.resolve({results: []}).then(
6758
+ this._dispatchAlgoliaResponse.bind(this, states, queryId)
6759
+ );
6760
+ }
6761
+
6752
6762
  try {
6753
6763
  this.client.search(queries)
6754
6764
  .then(this._dispatchAlgoliaResponse.bind(this, states, queryId))
@@ -6793,6 +6803,14 @@
6793
6803
  var helper = s.helper;
6794
6804
  var specificResults = results.splice(0, queriesCount);
6795
6805
 
6806
+ if (!state.index) {
6807
+ helper.emit('result', {
6808
+ results: null,
6809
+ state: state
6810
+ });
6811
+ return;
6812
+ }
6813
+
6796
6814
  var formattedResponse = helper.lastResults = new SearchResults_1(state, specificResults);
6797
6815
 
6798
6816
  helper.emit('result', {
@@ -13264,7 +13282,8 @@
13264
13282
  viewBox: "0 0 38 38",
13265
13283
  xmlns: "http://www.w3.org/2000/svg",
13266
13284
  stroke: "#444",
13267
- className: cx$4('loadingIcon')
13285
+ className: cx$4('loadingIcon'),
13286
+ "aria-hidden": "true"
13268
13287
  }, /*#__PURE__*/React__default.createElement("g", {
13269
13288
  fill: "none",
13270
13289
  fillRule: "evenodd"
@@ -13291,7 +13310,8 @@
13291
13310
  xmlns: "http://www.w3.org/2000/svg",
13292
13311
  viewBox: "0 0 20 20",
13293
13312
  width: "10",
13294
- height: "10"
13313
+ height: "10",
13314
+ "aria-hidden": "true"
13295
13315
  }, /*#__PURE__*/React__default.createElement("path", {
13296
13316
  d: "M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"
13297
13317
  }));
@@ -13300,7 +13320,8 @@
13300
13320
  xmlns: "http://www.w3.org/2000/svg",
13301
13321
  width: "10",
13302
13322
  height: "10",
13303
- viewBox: "0 0 40 40"
13323
+ viewBox: "0 0 40 40",
13324
+ "aria-hidden": "true"
13304
13325
  }, /*#__PURE__*/React__default.createElement("path", {
13305
13326
  d: "M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"
13306
13327
  }));