instantsearch.js 4.78.1 → 4.78.3
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/README.md +1 -1
- package/cjs/lib/version.js +1 -1
- package/cjs/middlewares/createInsightsMiddleware.js +6 -2
- package/dist/instantsearch.development.js +13 -6
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/middlewares/createInsightsMiddleware.js +6 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ The documentation is available on the [Algolia website](https://www.algolia.com/
|
|
|
131
131
|
|
|
132
132
|
| E-commerce | Media | Travel |
|
|
133
133
|
| --- | --- | --- |
|
|
134
|
-
| <a href="https://instantsearchjs.netlify.
|
|
134
|
+
| <a href="https://instantsearchjs.netlify.app/examples/e-commerce/"><img src="https://www.algolia.com/doc/assets/images/build-search-ui/demos/e-commerce-2c7ed6b6.png" width="250" alt="E-commerce demo preview"></a> | <a href="https://instantsearchjs.netlify.app/examples/media/"><img src="https://www.algolia.com/doc/assets/images/build-search-ui/demos/media-articles-abc153ab.png" width="250" alt="Media demo preview"></a> | <a href="https://instantsearchjs.netlify.app/examples/tourism/"><img src="https://instantsearchjs.netlify.app/examples/tourism/capture.png" width="250" alt="Tourism demo preview"></a> |
|
|
135
135
|
|
|
136
136
|
See more demos [on the website](https://www.algolia.com/doc/guides/building-search-ui/resources/demos/js/).
|
|
137
137
|
|
package/cjs/lib/version.js
CHANGED
|
@@ -262,10 +262,14 @@ function createInsightsMiddleware() {
|
|
|
262
262
|
var insightsClientWithLocalCredentials = insightsClient;
|
|
263
263
|
if (isModernInsightsClient(insightsClient)) {
|
|
264
264
|
insightsClientWithLocalCredentials = function insightsClientWithLocalCredentials(method, payload) {
|
|
265
|
+
var _getAppIdAndApiKey3 = (0, _utils.getAppIdAndApiKey)(instantSearchInstance.client),
|
|
266
|
+
_getAppIdAndApiKey4 = _slicedToArray(_getAppIdAndApiKey3, 2),
|
|
267
|
+
latestAppId = _getAppIdAndApiKey4[0],
|
|
268
|
+
latestApiKey = _getAppIdAndApiKey4[1];
|
|
265
269
|
var extraParams = {
|
|
266
270
|
headers: {
|
|
267
|
-
'X-Algolia-Application-Id':
|
|
268
|
-
'X-Algolia-API-Key':
|
|
271
|
+
'X-Algolia-Application-Id': latestAppId,
|
|
272
|
+
'X-Algolia-API-Key': latestApiKey
|
|
269
273
|
}
|
|
270
274
|
};
|
|
271
275
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! InstantSearch.js 4.78.
|
|
1
|
+
/*! InstantSearch.js 4.78.3 | © 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) :
|
|
@@ -6562,11 +6562,13 @@
|
|
|
6562
6562
|
});
|
|
6563
6563
|
}
|
|
6564
6564
|
|
|
6565
|
-
function sortAndMergeRecommendations(results) {
|
|
6565
|
+
function sortAndMergeRecommendations(objectIDs, results) {
|
|
6566
6566
|
var indexTracker = {};
|
|
6567
6567
|
|
|
6568
6568
|
results.forEach(function (hits) {
|
|
6569
6569
|
hits.forEach(function (hit, index) {
|
|
6570
|
+
if (objectIDs.includes(hit.objectID)) return;
|
|
6571
|
+
|
|
6570
6572
|
if (!indexTracker[hit.objectID]) {
|
|
6571
6573
|
indexTracker[hit.objectID] = { indexSum: index, count: 1 };
|
|
6572
6574
|
} else {
|
|
@@ -6596,7 +6598,7 @@
|
|
|
6596
6598
|
|
|
6597
6599
|
var sortAndMergeRecommendations_1 = sortAndMergeRecommendations;
|
|
6598
6600
|
|
|
6599
|
-
var version = '3.
|
|
6601
|
+
var version = '3.25.0';
|
|
6600
6602
|
|
|
6601
6603
|
var escapeFacetValue$4 = escapeFacetValue_1.escapeFacetValue;
|
|
6602
6604
|
|
|
@@ -8517,6 +8519,7 @@
|
|
|
8517
8519
|
}
|
|
8518
8520
|
cache[id] = Object.assign({}, firstResult, {
|
|
8519
8521
|
hits: sortAndMergeRecommendations_1(
|
|
8522
|
+
ids,
|
|
8520
8523
|
indices.map(function (idx) {
|
|
8521
8524
|
return content.results[idx].hits;
|
|
8522
8525
|
})
|
|
@@ -14303,10 +14306,14 @@
|
|
|
14303
14306
|
var insightsClientWithLocalCredentials = insightsClient;
|
|
14304
14307
|
if (isModernInsightsClient(insightsClient)) {
|
|
14305
14308
|
insightsClientWithLocalCredentials = function insightsClientWithLocalCredentials(method, payload) {
|
|
14309
|
+
var _getAppIdAndApiKey3 = getAppIdAndApiKey(instantSearchInstance.client),
|
|
14310
|
+
_getAppIdAndApiKey4 = _slicedToArray(_getAppIdAndApiKey3, 2),
|
|
14311
|
+
latestAppId = _getAppIdAndApiKey4[0],
|
|
14312
|
+
latestApiKey = _getAppIdAndApiKey4[1];
|
|
14306
14313
|
var extraParams = {
|
|
14307
14314
|
headers: {
|
|
14308
|
-
'X-Algolia-Application-Id':
|
|
14309
|
-
'X-Algolia-API-Key':
|
|
14315
|
+
'X-Algolia-Application-Id': latestAppId,
|
|
14316
|
+
'X-Algolia-API-Key': latestApiKey
|
|
14310
14317
|
}
|
|
14311
14318
|
};
|
|
14312
14319
|
|
|
@@ -16411,7 +16418,7 @@
|
|
|
16411
16418
|
};
|
|
16412
16419
|
}
|
|
16413
16420
|
|
|
16414
|
-
var version$1 = '4.78.
|
|
16421
|
+
var version$1 = '4.78.3';
|
|
16415
16422
|
|
|
16416
16423
|
var withUsage$v = createDocumentationMessageGenerator({
|
|
16417
16424
|
name: 'instantsearch'
|