react-instantsearch-core 6.39.1 → 6.40.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.
- package/dist/cjs/core/utils.js +3 -1
- package/dist/cjs/core/version.js +1 -1
- package/dist/es/core/utils.js +3 -1
- package/dist/es/core/version.js +1 -1
- package/dist/umd/ReactInstantSearchCore.js +27 -6
- package/dist/umd/ReactInstantSearchCore.js.map +1 -1
- package/dist/umd/ReactInstantSearchCore.min.js +1 -1
- package/dist/umd/ReactInstantSearchCore.min.js.map +1 -1
- package/package.json +3 -3
package/dist/cjs/core/utils.js
CHANGED
|
@@ -20,6 +20,9 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
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
22
|
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); }
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
24
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
25
|
+
|
|
23
26
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
24
27
|
var shallowEqual = function shallowEqual(objA, objB) {
|
|
25
28
|
if (objA === objB) {
|
|
@@ -32,7 +35,6 @@ var shallowEqual = function shallowEqual(objA, objB) {
|
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
// Test for A's keys different from B.
|
|
35
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
36
38
|
for (var i = 0; i < keysA.length; i++) {
|
|
37
39
|
if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
|
|
38
40
|
return false;
|
package/dist/cjs/core/version.js
CHANGED
package/dist/es/core/utils.js
CHANGED
|
@@ -4,6 +4,9 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
4
4
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
5
|
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); }
|
|
6
6
|
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); }
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
8
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
9
|
+
|
|
7
10
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
8
11
|
export var shallowEqual = function shallowEqual(objA, objB) {
|
|
9
12
|
if (objA === objB) {
|
|
@@ -16,7 +19,6 @@ export var shallowEqual = function shallowEqual(objA, objB) {
|
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
// Test for A's keys different from B.
|
|
19
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
20
22
|
for (var i = 0; i < keysA.length; i++) {
|
|
21
23
|
if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
|
|
22
24
|
return false;
|
package/dist/es/core/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '6.
|
|
1
|
+
export default '6.40.1';
|
|
@@ -389,6 +389,9 @@
|
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
391
|
|
|
392
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
393
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
394
|
+
|
|
392
395
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
393
396
|
var shallowEqual = function shallowEqual(objA, objB) {
|
|
394
397
|
if (objA === objB) {
|
|
@@ -401,7 +404,6 @@
|
|
|
401
404
|
}
|
|
402
405
|
|
|
403
406
|
// Test for A's keys different from B.
|
|
404
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
405
407
|
for (var i = 0; i < keysA.length; i++) {
|
|
406
408
|
if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
|
|
407
409
|
return false;
|
|
@@ -871,7 +873,7 @@
|
|
|
871
873
|
});
|
|
872
874
|
}
|
|
873
875
|
|
|
874
|
-
var version = '6.
|
|
876
|
+
var version = '6.40.1';
|
|
875
877
|
|
|
876
878
|
function translatable(defaultTranslations) {
|
|
877
879
|
return function (Composed) {
|
|
@@ -3763,7 +3765,10 @@
|
|
|
3763
3765
|
|
|
3764
3766
|
/**
|
|
3765
3767
|
* sum of the processing time of all the queries
|
|
3768
|
+
* @name processingTimeMS
|
|
3766
3769
|
* @member {number}
|
|
3770
|
+
* @memberof SearchResults
|
|
3771
|
+
* @instance
|
|
3767
3772
|
*/
|
|
3768
3773
|
this.processingTimeMS = results.reduce(function(sum, result) {
|
|
3769
3774
|
return result.processingTimeMS === undefined
|
|
@@ -3969,7 +3974,7 @@
|
|
|
3969
3974
|
|
|
3970
3975
|
self.facets[position] = {
|
|
3971
3976
|
name: facetName,
|
|
3972
|
-
data:
|
|
3977
|
+
data: mainFacets[facetName],
|
|
3973
3978
|
exhaustive: mainSubResponse.exhaustiveFacetsCount
|
|
3974
3979
|
};
|
|
3975
3980
|
excludes.forEach(function(facetValue) {
|
|
@@ -5167,7 +5172,7 @@
|
|
|
5167
5172
|
|
|
5168
5173
|
var requestBuilder_1 = requestBuilder;
|
|
5169
5174
|
|
|
5170
|
-
var version$1 = '3.
|
|
5175
|
+
var version$1 = '3.13.2';
|
|
5171
5176
|
|
|
5172
5177
|
var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
|
|
5173
5178
|
|
|
@@ -6433,7 +6438,9 @@
|
|
|
6433
6438
|
|
|
6434
6439
|
var derivedQueries = this.derivedHelpers.map(function(derivedHelper) {
|
|
6435
6440
|
var derivedState = derivedHelper.getModifiedState(state);
|
|
6436
|
-
var derivedStateQueries =
|
|
6441
|
+
var derivedStateQueries = derivedState.index
|
|
6442
|
+
? requestBuilder_1._getQueries(derivedState.index, derivedState)
|
|
6443
|
+
: [];
|
|
6437
6444
|
|
|
6438
6445
|
states.push({
|
|
6439
6446
|
state: derivedState,
|
|
@@ -6450,10 +6457,16 @@
|
|
|
6450
6457
|
});
|
|
6451
6458
|
|
|
6452
6459
|
var queries = Array.prototype.concat.apply(mainQueries, derivedQueries);
|
|
6453
|
-
var queryId = this._queryId++;
|
|
6454
6460
|
|
|
6461
|
+
var queryId = this._queryId++;
|
|
6455
6462
|
this._currentNbQueries++;
|
|
6456
6463
|
|
|
6464
|
+
if (!queries.length) {
|
|
6465
|
+
return Promise.resolve({results: []}).then(
|
|
6466
|
+
this._dispatchAlgoliaResponse.bind(this, states, queryId)
|
|
6467
|
+
);
|
|
6468
|
+
}
|
|
6469
|
+
|
|
6457
6470
|
try {
|
|
6458
6471
|
this.client.search(queries)
|
|
6459
6472
|
.then(this._dispatchAlgoliaResponse.bind(this, states, queryId))
|
|
@@ -6498,6 +6511,14 @@
|
|
|
6498
6511
|
var helper = s.helper;
|
|
6499
6512
|
var specificResults = results.splice(0, queriesCount);
|
|
6500
6513
|
|
|
6514
|
+
if (!state.index) {
|
|
6515
|
+
helper.emit('result', {
|
|
6516
|
+
results: null,
|
|
6517
|
+
state: state
|
|
6518
|
+
});
|
|
6519
|
+
return;
|
|
6520
|
+
}
|
|
6521
|
+
|
|
6501
6522
|
var formattedResponse = helper.lastResults = new SearchResults_1(state, specificResults);
|
|
6502
6523
|
|
|
6503
6524
|
helper.emit('result', {
|