instantsearch.js 4.60.0 → 4.61.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.
Files changed (35) hide show
  1. package/cjs/components/SearchBox/SearchBox.js +2 -2
  2. package/cjs/connectors/breadcrumb/connectBreadcrumb.js +18 -5
  3. package/cjs/connectors/dynamic-widgets/connectDynamicWidgets.js +2 -3
  4. package/cjs/connectors/hierarchical-menu/connectHierarchicalMenu.js +17 -6
  5. package/cjs/connectors/menu/connectMenu.js +18 -6
  6. package/cjs/connectors/numeric-menu/connectNumericMenu.js +18 -5
  7. package/cjs/connectors/rating-menu/connectRatingMenu.js +19 -6
  8. package/cjs/connectors/refinement-list/connectRefinementList.js +17 -6
  9. package/cjs/lib/utils/hydrateSearchClient.js +39 -29
  10. package/cjs/lib/version.js +1 -1
  11. package/cjs/widgets/search-box/defaultTemplates.js +9 -3
  12. package/dist/instantsearch.development.d.ts +13 -3
  13. package/dist/instantsearch.development.js +200 -124
  14. package/dist/instantsearch.development.js.map +1 -1
  15. package/dist/instantsearch.production.d.ts +13 -3
  16. package/dist/instantsearch.production.min.d.ts +13 -3
  17. package/dist/instantsearch.production.min.js +2 -2
  18. package/dist/instantsearch.production.min.js.map +1 -1
  19. package/es/components/SearchBox/SearchBox.js +2 -2
  20. package/es/connectors/breadcrumb/connectBreadcrumb.js +18 -5
  21. package/es/connectors/dynamic-widgets/connectDynamicWidgets.d.ts +12 -2
  22. package/es/connectors/dynamic-widgets/connectDynamicWidgets.js +2 -3
  23. package/es/connectors/hierarchical-menu/connectHierarchicalMenu.js +17 -6
  24. package/es/connectors/menu/connectMenu.js +18 -6
  25. package/es/connectors/numeric-menu/connectNumericMenu.js +18 -5
  26. package/es/connectors/rating-menu/connectRatingMenu.d.ts +1 -1
  27. package/es/connectors/rating-menu/connectRatingMenu.js +19 -6
  28. package/es/connectors/refinement-list/connectRefinementList.js +17 -6
  29. package/es/lib/utils/hydrateSearchClient.d.ts +5 -2
  30. package/es/lib/utils/hydrateSearchClient.js +39 -29
  31. package/es/lib/utils/render-args.d.ts +4 -4
  32. package/es/lib/version.d.ts +1 -1
  33. package/es/lib/version.js +1 -1
  34. package/es/widgets/search-box/defaultTemplates.js +10 -3
  35. package/package.json +5 -5
@@ -1130,11 +1130,21 @@ declare type DynamicWidgetsConnectorParams = {
1130
1130
  }>;
1131
1131
  /**
1132
1132
  * To prevent unneeded extra network requests when widgets mount or unmount,
1133
- * we request all facet values.
1133
+ * we request all facet values by default. If you want to only request the
1134
+ * facet values that are needed, you can set this option to the list of
1135
+ * attributes you want to display.
1136
+ *
1137
+ * If `facets` is set to `['*']`, we request all facet values.
1138
+ *
1139
+ * Any facets that are requested due to the `facetOrdering` result are always
1140
+ * requested by the widget that mounted itself.
1141
+ *
1142
+ * Setting `facets` to a value other than `['*']` will only prevent extra
1143
+ * requests if all potential facets are listed.
1134
1144
  *
1135
1145
  * @default ['*']
1136
1146
  */
1137
- facets?: ['*'] | never[];
1147
+ facets?: ['*'] | string[];
1138
1148
  /**
1139
1149
  * If you have more than 20 facet values pinned, you need to increase the
1140
1150
  * maxValuesPerFacet to at least that value.
@@ -3965,7 +3975,7 @@ declare type RatingMenuWidgetDescription = {
3965
3975
  };
3966
3976
  indexUiState: {
3967
3977
  ratingMenu: {
3968
- [attribute: string]: number;
3978
+ [attribute: string]: number | undefined;
3969
3979
  };
3970
3980
  };
3971
3981
  };
@@ -1130,11 +1130,21 @@ declare type DynamicWidgetsConnectorParams = {
1130
1130
  }>;
1131
1131
  /**
1132
1132
  * To prevent unneeded extra network requests when widgets mount or unmount,
1133
- * we request all facet values.
1133
+ * we request all facet values by default. If you want to only request the
1134
+ * facet values that are needed, you can set this option to the list of
1135
+ * attributes you want to display.
1136
+ *
1137
+ * If `facets` is set to `['*']`, we request all facet values.
1138
+ *
1139
+ * Any facets that are requested due to the `facetOrdering` result are always
1140
+ * requested by the widget that mounted itself.
1141
+ *
1142
+ * Setting `facets` to a value other than `['*']` will only prevent extra
1143
+ * requests if all potential facets are listed.
1134
1144
  *
1135
1145
  * @default ['*']
1136
1146
  */
1137
- facets?: ['*'] | never[];
1147
+ facets?: ['*'] | string[];
1138
1148
  /**
1139
1149
  * If you have more than 20 facet values pinned, you need to increase the
1140
1150
  * maxValuesPerFacet to at least that value.
@@ -3965,7 +3975,7 @@ declare type RatingMenuWidgetDescription = {
3965
3975
  };
3966
3976
  indexUiState: {
3967
3977
  ratingMenu: {
3968
- [attribute: string]: number;
3978
+ [attribute: string]: number | undefined;
3969
3979
  };
3970
3980
  };
3971
3981
  };