instantsearch.js 4.43.0 → 4.43.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/CHANGELOG.md +11 -0
- package/cjs/connectors/rating-menu/connectRatingMenu.js +1 -1
- package/cjs/lib/InstantSearch.js +11 -1
- package/cjs/lib/version.js +1 -1
- package/dist/instantsearch.development.d.ts +2 -2
- package/dist/instantsearch.development.js +14 -4
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +2 -2
- package/dist/instantsearch.production.min.d.ts +2 -2
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/connectors/geo-search/connectGeoSearch.d.ts +1 -1
- package/es/connectors/rating-menu/connectRatingMenu.js +1 -1
- package/es/lib/InstantSearch.js +11 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/types/results.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SendEventForHits } from '../../lib/utils';
|
|
2
2
|
import type { Connector, GeoLoc, Hit, TransformItems, WidgetRenderState } from '../../types';
|
|
3
|
-
export declare type GeoHit = Hit & Required<Pick<Hit, '
|
|
3
|
+
export declare type GeoHit = Hit & Required<Pick<Hit, '_geoloc'>>;
|
|
4
4
|
declare type Bounds = {
|
|
5
5
|
/**
|
|
6
6
|
* The top right corner of the map view.
|
|
@@ -215,7 +215,7 @@ var connectRatingMenu = function connectRatingMenu(renderFn) {
|
|
|
215
215
|
var maxValuesPerFacet = facetResults.length;
|
|
216
216
|
var maxDecimalPlaces = getFacetsMaxDecimalPlaces(facetResults);
|
|
217
217
|
var maxFacets = Math.pow(10, maxDecimalPlaces) * max;
|
|
218
|
-
process.env.NODE_ENV === 'development' ? warning(maxFacets <= maxValuesPerFacet, getFacetValuesWarningMessage({
|
|
218
|
+
process.env.NODE_ENV === 'development' ? warning(maxFacets <= maxValuesPerFacet || Boolean(results.__isArtificial), getFacetValuesWarningMessage({
|
|
219
219
|
maxDecimalPlaces: maxDecimalPlaces,
|
|
220
220
|
maxFacets: maxFacets,
|
|
221
221
|
maxValuesPerFacet: maxValuesPerFacet
|
package/es/lib/InstantSearch.js
CHANGED
|
@@ -424,12 +424,22 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
|
|
|
424
424
|
|
|
425
425
|
mainHelper.on('error', function (_ref4) {
|
|
426
426
|
var error = _ref4.error;
|
|
427
|
-
|
|
427
|
+
|
|
428
|
+
if (!(error instanceof Error)) {
|
|
429
|
+
// typescript lies here, error is in some cases { name: string, message: string }
|
|
430
|
+
var err = error;
|
|
431
|
+
error = Object.keys(err).reduce(function (acc, key) {
|
|
432
|
+
acc[key] = err[key];
|
|
433
|
+
return acc;
|
|
434
|
+
}, new Error(err.message));
|
|
435
|
+
} // If an error is emitted, it is re-thrown by events. In previous versions
|
|
428
436
|
// we emitted {error}, which is thrown as:
|
|
429
437
|
// "Uncaught, unspecified \"error\" event. ([object Object])"
|
|
430
438
|
// To avoid breaking changes, we make the error available in both
|
|
431
439
|
// `error` and `error.error`
|
|
432
440
|
// @MAJOR emit only error
|
|
441
|
+
|
|
442
|
+
|
|
433
443
|
error.error = error;
|
|
434
444
|
|
|
435
445
|
_this3.emit('error', error);
|
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.43.
|
|
1
|
+
declare const _default: "4.43.1";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.43.
|
|
1
|
+
export default '4.43.1';
|
package/es/types/results.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare type AlgoliaHit<THit extends BaseHit = Record<string, any>> = {
|
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
_distinctSeqID?: number;
|
|
41
|
-
|
|
41
|
+
_geoloc?: GeoLoc;
|
|
42
42
|
} & THit;
|
|
43
43
|
export declare type BaseHit = Record<string, unknown>;
|
|
44
44
|
export declare type Hit<THit extends BaseHit = Record<string, any>> = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instantsearch.js",
|
|
3
|
-
"version": "4.43.
|
|
3
|
+
"version": "4.43.1",
|
|
4
4
|
"description": "InstantSearch.js is a JavaScript library for building performant and instant search experiences with Algolia.",
|
|
5
5
|
"homepage": "https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/",
|
|
6
6
|
"types": "es/index.d.ts",
|