instantsearch.js 4.75.4 → 4.75.6

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.
Files changed (45) hide show
  1. package/cjs/components/Slider/Rheostat.js +4 -4
  2. package/cjs/connectors/autocomplete/connectAutocomplete.js +9 -5
  3. package/cjs/connectors/current-refinements/connectCurrentRefinements.js +1 -1
  4. package/cjs/connectors/hits/connectHitsWithInsights.js +3 -1
  5. package/cjs/connectors/infinite-hits/connectInfiniteHits.js +1 -1
  6. package/cjs/connectors/infinite-hits/connectInfiniteHitsWithInsights.js +3 -1
  7. package/cjs/lib/InstantSearch.js +2 -0
  8. package/cjs/lib/server.js +5 -2
  9. package/cjs/lib/utils/getRefinements.js +2 -1
  10. package/cjs/lib/version.js +1 -1
  11. package/cjs/middlewares/createInsightsMiddleware.js +38 -79
  12. package/cjs/widgets/analytics/analytics.js +3 -0
  13. package/cjs/widgets/hits/defaultTemplates.js +1 -0
  14. package/cjs/widgets/index/index.js +0 -1
  15. package/cjs/widgets/places/places.js +2 -0
  16. package/dist/instantsearch.development.d.ts +7 -7
  17. package/dist/instantsearch.development.js +84 -110
  18. package/dist/instantsearch.development.js.map +1 -1
  19. package/dist/instantsearch.production.d.ts +7 -7
  20. package/dist/instantsearch.production.min.d.ts +7 -7
  21. package/dist/instantsearch.production.min.js +2 -2
  22. package/dist/instantsearch.production.min.js.map +1 -1
  23. package/es/connectors/autocomplete/connectAutocomplete.js +9 -5
  24. package/es/connectors/current-refinements/connectCurrentRefinements.js +1 -1
  25. package/es/connectors/hits/connectHitsWithInsights.js +3 -1
  26. package/es/connectors/infinite-hits/connectInfiniteHits.d.ts +1 -1
  27. package/es/connectors/infinite-hits/connectInfiniteHits.js +1 -1
  28. package/es/connectors/infinite-hits/connectInfiniteHitsWithInsights.js +3 -1
  29. package/es/lib/InstantSearch.js +2 -0
  30. package/es/lib/server.js +5 -2
  31. package/es/lib/utils/getRefinements.d.ts +1 -1
  32. package/es/lib/utils/getRefinements.js +2 -1
  33. package/es/lib/utils/render-args.d.ts +1 -1
  34. package/es/lib/version.d.ts +1 -1
  35. package/es/lib/version.js +1 -1
  36. package/es/middlewares/createInsightsMiddleware.d.ts +1 -1
  37. package/es/middlewares/createInsightsMiddleware.js +38 -79
  38. package/es/types/insights.d.ts +2 -2
  39. package/es/types/widget.d.ts +3 -3
  40. package/es/widgets/analytics/analytics.js +3 -0
  41. package/es/widgets/hits/defaultTemplates.js +1 -0
  42. package/es/widgets/index/index.js +0 -1
  43. package/es/widgets/places/places.js +2 -0
  44. package/es/widgets/search-box/defaultTemplates.js +0 -1
  45. package/package.json +7 -7
@@ -4902,7 +4902,7 @@ declare type InfiniteHitsRenderState<THit extends NonNullable<object> = BaseHit>
4902
4902
  /**
4903
4903
  * The response from the Algolia API.
4904
4904
  */
4905
- results?: SearchResults<Hit<THit>>;
4905
+ results?: SearchResults<Hit<THit>> | null;
4906
4906
  /**
4907
4907
  * The banner to display above the hits.
4908
4908
  */
@@ -5018,7 +5018,7 @@ declare type InsightsEvent<TMethod extends InsightsMethod = InsightsMethod> = In
5018
5018
  */
5019
5019
  declare type InsightsEvent_2<TMethod extends InsightsMethod = InsightsMethod> = {
5020
5020
  insightsMethod?: TMethod;
5021
- payload: InsightsMethodMap[TMethod][0];
5021
+ payload: InsightsMethodMap[TMethod][0][0];
5022
5022
  widgetType: string;
5023
5023
  eventType: string;
5024
5024
  eventModifier?: string;
@@ -5035,7 +5035,7 @@ declare type InsightsMethodMap = InsightsMethodMap_2;
5035
5035
 
5036
5036
  declare type InsightsProps<TInsightsClient extends ProvidedInsightsClient = ProvidedInsightsClient> = {
5037
5037
  insightsClient?: TInsightsClient;
5038
- insightsInitParams?: Partial<InsightsMethodMap['init'][0]>;
5038
+ insightsInitParams?: Partial<InsightsMethodMap['init'][0][0]>;
5039
5039
  onEvent?: (event: InsightsEvent, insightsClient: TInsightsClient) => void;
5040
5040
  };
5041
5041
 
@@ -6334,7 +6334,7 @@ declare type QueueItem = QueueItemMap[keyof QueueItemMap];
6334
6334
  declare type QueueItemMap = {
6335
6335
  [MethodName in keyof InsightsMethodMap]: [
6336
6336
  methodName: MethodName,
6337
- ...args: InsightsMethodMap[MethodName]
6337
+ ...args: InsightsMethodMap[MethodName][0][0]
6338
6338
  ];
6339
6339
  };
6340
6340
 
@@ -7321,7 +7321,7 @@ declare type RendererOptions<TWidgetParams> = {
7321
7321
  };
7322
7322
 
7323
7323
  declare type RenderOptions = SharedRenderOptions & {
7324
- results: SearchResults;
7324
+ results: SearchResults | null;
7325
7325
  };
7326
7326
 
7327
7327
  declare type RenderState = {
@@ -7531,7 +7531,7 @@ declare namespace routers {
7531
7531
 
7532
7532
  declare type ScopedResult = {
7533
7533
  indexId: string;
7534
- results: SearchResults;
7534
+ results: SearchResults | null;
7535
7535
  helper: AlgoliaSearchHelper;
7536
7536
  };
7537
7537
 
@@ -8283,7 +8283,7 @@ declare type TrackedFilterRefinement = string | number | boolean;
8283
8283
  declare type TransformItems<TItem, TMetadata = TransformItemsMetadata> = (items: TItem[], metadata: TMetadata) => TItem[];
8284
8284
 
8285
8285
  declare type TransformItemsMetadata = {
8286
- results?: SearchResults;
8286
+ results: SearchResults | undefined | null;
8287
8287
  };
8288
8288
 
8289
8289
  declare type TransformSearchParameters = (searchParameters: SearchParameters) => PlainSearchParameters;
@@ -4902,7 +4902,7 @@ declare type InfiniteHitsRenderState<THit extends NonNullable<object> = BaseHit>
4902
4902
  /**
4903
4903
  * The response from the Algolia API.
4904
4904
  */
4905
- results?: SearchResults<Hit<THit>>;
4905
+ results?: SearchResults<Hit<THit>> | null;
4906
4906
  /**
4907
4907
  * The banner to display above the hits.
4908
4908
  */
@@ -5018,7 +5018,7 @@ declare type InsightsEvent<TMethod extends InsightsMethod = InsightsMethod> = In
5018
5018
  */
5019
5019
  declare type InsightsEvent_2<TMethod extends InsightsMethod = InsightsMethod> = {
5020
5020
  insightsMethod?: TMethod;
5021
- payload: InsightsMethodMap[TMethod][0];
5021
+ payload: InsightsMethodMap[TMethod][0][0];
5022
5022
  widgetType: string;
5023
5023
  eventType: string;
5024
5024
  eventModifier?: string;
@@ -5035,7 +5035,7 @@ declare type InsightsMethodMap = InsightsMethodMap_2;
5035
5035
 
5036
5036
  declare type InsightsProps<TInsightsClient extends ProvidedInsightsClient = ProvidedInsightsClient> = {
5037
5037
  insightsClient?: TInsightsClient;
5038
- insightsInitParams?: Partial<InsightsMethodMap['init'][0]>;
5038
+ insightsInitParams?: Partial<InsightsMethodMap['init'][0][0]>;
5039
5039
  onEvent?: (event: InsightsEvent, insightsClient: TInsightsClient) => void;
5040
5040
  };
5041
5041
 
@@ -6334,7 +6334,7 @@ declare type QueueItem = QueueItemMap[keyof QueueItemMap];
6334
6334
  declare type QueueItemMap = {
6335
6335
  [MethodName in keyof InsightsMethodMap]: [
6336
6336
  methodName: MethodName,
6337
- ...args: InsightsMethodMap[MethodName]
6337
+ ...args: InsightsMethodMap[MethodName][0][0]
6338
6338
  ];
6339
6339
  };
6340
6340
 
@@ -7321,7 +7321,7 @@ declare type RendererOptions<TWidgetParams> = {
7321
7321
  };
7322
7322
 
7323
7323
  declare type RenderOptions = SharedRenderOptions & {
7324
- results: SearchResults;
7324
+ results: SearchResults | null;
7325
7325
  };
7326
7326
 
7327
7327
  declare type RenderState = {
@@ -7531,7 +7531,7 @@ declare namespace routers {
7531
7531
 
7532
7532
  declare type ScopedResult = {
7533
7533
  indexId: string;
7534
- results: SearchResults;
7534
+ results: SearchResults | null;
7535
7535
  helper: AlgoliaSearchHelper;
7536
7536
  };
7537
7537
 
@@ -8283,7 +8283,7 @@ declare type TrackedFilterRefinement = string | number | boolean;
8283
8283
  declare type TransformItems<TItem, TMetadata = TransformItemsMetadata> = (items: TItem[], metadata: TMetadata) => TItem[];
8284
8284
 
8285
8285
  declare type TransformItemsMetadata = {
8286
- results?: SearchResults;
8286
+ results: SearchResults | undefined | null;
8287
8287
  };
8288
8288
 
8289
8289
  declare type TransformSearchParameters = (searchParameters: SearchParameters) => PlainSearchParameters;