instantsearch.js 4.49.4 → 4.50.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.
Files changed (167) hide show
  1. package/cjs/components/Pagination/Pagination.js +1 -1
  2. package/cjs/connectors/hits/connectHits.js +2 -1
  3. package/cjs/connectors/infinite-hits/connectInfiniteHits.js +3 -2
  4. package/cjs/lib/InstantSearch.js +3 -7
  5. package/cjs/lib/templating/prepareTemplateProps.js +1 -2
  6. package/cjs/lib/templating/renderTemplate.js +3 -0
  7. package/cjs/lib/utils/createSendEventForHits.js +6 -5
  8. package/cjs/lib/version.js +1 -1
  9. package/cjs/widgets/hits/hits.js +3 -4
  10. package/cjs/widgets/index/index.js +18 -1
  11. package/cjs/widgets/infinite-hits/infinite-hits.js +3 -4
  12. package/dist/instantsearch.development.d.ts +11 -3
  13. package/dist/instantsearch.development.js +89 -37
  14. package/dist/instantsearch.development.js.map +1 -1
  15. package/dist/instantsearch.production.d.ts +11 -3
  16. package/dist/instantsearch.production.min.d.ts +11 -3
  17. package/dist/instantsearch.production.min.js +2 -2
  18. package/dist/instantsearch.production.min.js.map +1 -1
  19. package/es/components/Answers/Answers.d.ts +3 -3
  20. package/es/components/Breadcrumb/Breadcrumb.d.ts +3 -3
  21. package/es/components/ClearRefinements/ClearRefinements.d.ts +3 -3
  22. package/es/components/CurrentRefinements/CurrentRefinements.d.ts +2 -2
  23. package/es/components/GeoSearchControls/GeoSearchButton.d.ts +1 -1
  24. package/es/components/GeoSearchControls/GeoSearchControls.d.ts +1 -1
  25. package/es/components/GeoSearchControls/GeoSearchToggle.d.ts +1 -1
  26. package/es/components/Highlight/Highlight.d.ts +2 -2
  27. package/es/components/Hits/Hits.d.ts +3 -3
  28. package/es/components/InfiniteHits/InfiniteHits.d.ts +3 -3
  29. package/es/components/MenuSelect/MenuSelect.d.ts +4 -4
  30. package/es/components/Pagination/Pagination.d.ts +3 -3
  31. package/es/components/Pagination/Pagination.js +1 -1
  32. package/es/components/Panel/Panel.d.ts +3 -3
  33. package/es/components/PoweredBy/PoweredBy.d.ts +2 -2
  34. package/es/components/QueryRuleCustomData/QueryRuleCustomData.d.ts +3 -3
  35. package/es/components/RangeInput/RangeInput.d.ts +3 -3
  36. package/es/components/RefinementList/RefinementList.d.ts +7 -7
  37. package/es/components/RefinementList/RefinementListItem.d.ts +1 -1
  38. package/es/components/RelevantSort/RelevantSort.d.ts +3 -3
  39. package/es/components/ReverseHighlight/ReverseHighlight.d.ts +2 -2
  40. package/es/components/ReverseSnippet/ReverseSnippet.d.ts +2 -2
  41. package/es/components/SearchBox/SearchBox.d.ts +5 -5
  42. package/es/components/Selector/Selector.d.ts +3 -3
  43. package/es/components/Slider/Rheostat.d.ts +6 -6
  44. package/es/components/Slider/Slider.d.ts +2 -2
  45. package/es/components/Snippet/Snippet.d.ts +2 -2
  46. package/es/components/Stats/Stats.d.ts +3 -3
  47. package/es/components/Template/Template.d.ts +1 -1
  48. package/es/components/ToggleRefinement/ToggleRefinement.d.ts +3 -3
  49. package/es/components/VoiceSearch/VoiceSearch.d.ts +3 -3
  50. package/es/connectors/answers/connectAnswers.d.ts +4 -4
  51. package/es/connectors/autocomplete/connectAutocomplete.d.ts +4 -4
  52. package/es/connectors/breadcrumb/connectBreadcrumb.d.ts +5 -5
  53. package/es/connectors/clear-refinements/connectClearRefinements.d.ts +4 -4
  54. package/es/connectors/configure/connectConfigure.d.ts +5 -5
  55. package/es/connectors/configure-related-items/connectConfigureRelatedItems.d.ts +5 -5
  56. package/es/connectors/current-refinements/connectCurrentRefinements.d.ts +6 -6
  57. package/es/connectors/dynamic-widgets/connectDynamicWidgets.d.ts +4 -4
  58. package/es/connectors/geo-search/connectGeoSearch.d.ts +6 -6
  59. package/es/connectors/hierarchical-menu/connectHierarchicalMenu.d.ts +5 -5
  60. package/es/connectors/hits/connectHits.d.ts +4 -4
  61. package/es/connectors/hits/connectHits.js +2 -1
  62. package/es/connectors/hits-per-page/connectHitsPerPage.d.ts +6 -6
  63. package/es/connectors/infinite-hits/connectInfiniteHits.d.ts +8 -8
  64. package/es/connectors/infinite-hits/connectInfiniteHits.js +3 -2
  65. package/es/connectors/menu/connectMenu.d.ts +5 -5
  66. package/es/connectors/numeric-menu/connectNumericMenu.d.ts +6 -6
  67. package/es/connectors/pagination/connectPagination.d.ts +4 -4
  68. package/es/connectors/powered-by/connectPoweredBy.d.ts +4 -4
  69. package/es/connectors/query-rules/connectQueryRules.d.ts +7 -7
  70. package/es/connectors/range/connectRange.d.ts +8 -8
  71. package/es/connectors/rating-menu/connectRatingMenu.d.ts +6 -6
  72. package/es/connectors/refinement-list/connectRefinementList.d.ts +5 -5
  73. package/es/connectors/relevant-sort/connectRelevantSort.d.ts +5 -5
  74. package/es/connectors/search-box/connectSearchBox.d.ts +4 -4
  75. package/es/connectors/sort-by/connectSortBy.d.ts +5 -5
  76. package/es/connectors/stats/connectStats.d.ts +4 -4
  77. package/es/connectors/toggle-refinement/connectToggleRefinement.d.ts +9 -9
  78. package/es/connectors/toggle-refinement/types.d.ts +5 -5
  79. package/es/connectors/voice-search/connectVoiceSearch.d.ts +4 -4
  80. package/es/helpers/components/Highlight.d.ts +1 -1
  81. package/es/helpers/components/ReverseHighlight.d.ts +1 -1
  82. package/es/helpers/components/ReverseSnippet.d.ts +1 -1
  83. package/es/helpers/components/Snippet.d.ts +1 -1
  84. package/es/helpers/highlight.d.ts +1 -1
  85. package/es/helpers/reverseHighlight.d.ts +1 -1
  86. package/es/helpers/reverseSnippet.d.ts +1 -1
  87. package/es/helpers/snippet.d.ts +1 -1
  88. package/es/index.d.ts +1 -1
  89. package/es/lib/InstantSearch.d.ts +3 -3
  90. package/es/lib/InstantSearch.js +3 -7
  91. package/es/lib/createHelpers.d.ts +1 -1
  92. package/es/lib/insights/listener.d.ts +1 -1
  93. package/es/lib/routers/history.d.ts +3 -3
  94. package/es/lib/suit.d.ts +2 -2
  95. package/es/lib/templating/prepareTemplateProps.d.ts +2 -2
  96. package/es/lib/templating/prepareTemplateProps.js +1 -2
  97. package/es/lib/templating/renderTemplate.js +3 -0
  98. package/es/lib/utils/checkIndexUiState.d.ts +1 -1
  99. package/es/lib/utils/createConcurrentSafePromise.d.ts +2 -2
  100. package/es/lib/utils/createSendEventForFacet.d.ts +4 -4
  101. package/es/lib/utils/createSendEventForHits.d.ts +8 -7
  102. package/es/lib/utils/createSendEventForHits.js +6 -5
  103. package/es/lib/utils/debounce.d.ts +2 -2
  104. package/es/lib/utils/defer.d.ts +2 -2
  105. package/es/lib/utils/documentation.d.ts +2 -2
  106. package/es/lib/utils/escapeFacetValue.d.ts +1 -1
  107. package/es/lib/utils/geo-search.d.ts +1 -1
  108. package/es/lib/utils/getRefinements.d.ts +6 -6
  109. package/es/lib/utils/logger.d.ts +2 -2
  110. package/es/lib/utils/range.d.ts +1 -1
  111. package/es/lib/utils/safelyRunOnBrowser.d.ts +2 -2
  112. package/es/lib/utils/toArray.d.ts +1 -1
  113. package/es/lib/version.d.ts +1 -1
  114. package/es/lib/version.js +1 -1
  115. package/es/lib/voiceSearchHelper/types.d.ts +5 -5
  116. package/es/middlewares/createInsightsMiddleware.d.ts +3 -3
  117. package/es/middlewares/createRouterMiddleware.d.ts +1 -1
  118. package/es/types/component.d.ts +1 -1
  119. package/es/types/connector.d.ts +4 -4
  120. package/es/types/insights.d.ts +5 -5
  121. package/es/types/middleware.d.ts +4 -4
  122. package/es/types/render-state.d.ts +5 -5
  123. package/es/types/results.d.ts +16 -16
  124. package/es/types/router.d.ts +2 -2
  125. package/es/types/templates.d.ts +14 -6
  126. package/es/types/ui-state.d.ts +4 -4
  127. package/es/types/utils.d.ts +6 -6
  128. package/es/types/widget-factory.d.ts +2 -2
  129. package/es/types/widget.d.ts +23 -23
  130. package/es/widgets/analytics/analytics.d.ts +4 -4
  131. package/es/widgets/answers/answers.d.ts +4 -4
  132. package/es/widgets/breadcrumb/breadcrumb.d.ts +4 -4
  133. package/es/widgets/clear-refinements/clear-refinements.d.ts +4 -4
  134. package/es/widgets/configure/configure.d.ts +2 -2
  135. package/es/widgets/configure-related-items/configure-related-items.d.ts +2 -2
  136. package/es/widgets/current-refinements/current-refinements.d.ts +3 -3
  137. package/es/widgets/dynamic-widgets/dynamic-widgets.d.ts +2 -2
  138. package/es/widgets/geo-search/createHTMLMarker.d.ts +1 -1
  139. package/es/widgets/geo-search/geo-search.d.ts +7 -7
  140. package/es/widgets/hierarchical-menu/hierarchical-menu.d.ts +6 -6
  141. package/es/widgets/hits/hits.d.ts +4 -4
  142. package/es/widgets/hits/hits.js +3 -4
  143. package/es/widgets/hits-per-page/hits-per-page.d.ts +3 -3
  144. package/es/widgets/index/index.d.ts +5 -5
  145. package/es/widgets/index/index.js +18 -1
  146. package/es/widgets/infinite-hits/infinite-hits.d.ts +4 -4
  147. package/es/widgets/infinite-hits/infinite-hits.js +3 -4
  148. package/es/widgets/menu/menu.d.ts +6 -6
  149. package/es/widgets/menu-select/menu-select.d.ts +4 -4
  150. package/es/widgets/numeric-menu/numeric-menu.d.ts +6 -6
  151. package/es/widgets/pagination/pagination.d.ts +4 -4
  152. package/es/widgets/panel/panel.d.ts +9 -9
  153. package/es/widgets/places/places.d.ts +6 -6
  154. package/es/widgets/powered-by/powered-by.d.ts +3 -3
  155. package/es/widgets/query-rule-context/query-rule-context.d.ts +2 -2
  156. package/es/widgets/query-rule-custom-data/query-rule-custom-data.d.ts +4 -4
  157. package/es/widgets/range-input/range-input.d.ts +4 -4
  158. package/es/widgets/range-slider/range-slider.d.ts +4 -4
  159. package/es/widgets/rating-menu/rating-menu.d.ts +6 -6
  160. package/es/widgets/refinement-list/refinement-list.d.ts +10 -10
  161. package/es/widgets/relevant-sort/relevant-sort.d.ts +4 -4
  162. package/es/widgets/search-box/search-box.d.ts +4 -4
  163. package/es/widgets/sort-by/sort-by.d.ts +4 -4
  164. package/es/widgets/stats/stats.d.ts +5 -5
  165. package/es/widgets/toggle-refinement/toggle-refinement.d.ts +4 -4
  166. package/es/widgets/voice-search/voice-search.d.ts +5 -5
  167. package/package.json +7 -5
@@ -1,7 +1,7 @@
1
1
 
2
2
  import type { ToggleRefinementConnectorParams, ToggleRefinementWidgetDescription, ToggleRefinementValue } from '../../connectors/toggle-refinement/connectToggleRefinement';
3
3
  import type { Template, WidgetFactory } from '../../types';
4
- export declare type ToggleRefinementCSSClasses = Partial<{
4
+ export type ToggleRefinementCSSClasses = Partial<{
5
5
  /**
6
6
  * CSS class to add to the root element.
7
7
  */
@@ -19,7 +19,7 @@ export declare type ToggleRefinementCSSClasses = Partial<{
19
19
  */
20
20
  labelText: string | string[];
21
21
  }>;
22
- export declare type ToggleRefinementTemplates = Partial<{
22
+ export type ToggleRefinementTemplates = Partial<{
23
23
  /**
24
24
  * the text that describes the toggle action
25
25
  */
@@ -27,7 +27,7 @@ export declare type ToggleRefinementTemplates = Partial<{
27
27
  name: string;
28
28
  }>;
29
29
  }>;
30
- export declare type ToggleRefinementWidgetParams = {
30
+ export type ToggleRefinementWidgetParams = {
31
31
  /**
32
32
  * CSS Selector or HTMLElement to insert the widget.
33
33
  */
@@ -41,7 +41,7 @@ export declare type ToggleRefinementWidgetParams = {
41
41
  */
42
42
  cssClasses?: ToggleRefinementCSSClasses;
43
43
  };
44
- export declare type ToggleRefinementWidget = WidgetFactory<ToggleRefinementWidgetDescription & {
44
+ export type ToggleRefinementWidget = WidgetFactory<ToggleRefinementWidgetDescription & {
45
45
  $$widgetType: 'ais.toggleRefinement';
46
46
  }, ToggleRefinementConnectorParams, ToggleRefinementWidgetParams>;
47
47
  /**
@@ -3,12 +3,12 @@ import type { PlainSearchParameters } from 'algoliasearch-helper';
3
3
  import type { VoiceSearchConnectorParams, VoiceSearchWidgetDescription } from '../../connectors/voice-search/connectVoiceSearch';
4
4
  import type { WidgetFactory, Template } from '../../types';
5
5
  import type { CreateVoiceSearchHelper } from '../../lib/voiceSearchHelper/types';
6
- export declare type VoiceSearchCSSClasses = Partial<{
6
+ export type VoiceSearchCSSClasses = Partial<{
7
7
  root: string | string[];
8
8
  button: string | string[];
9
9
  status: string | string[];
10
10
  }>;
11
- declare type VoiceSearchTemplateProps = {
11
+ type VoiceSearchTemplateProps = {
12
12
  status: string;
13
13
  errorCode: string;
14
14
  isListening: boolean;
@@ -16,11 +16,11 @@ declare type VoiceSearchTemplateProps = {
16
16
  isSpeechFinal: boolean;
17
17
  isBrowserSupported: boolean;
18
18
  };
19
- export declare type VoiceSearchTemplates = Partial<{
19
+ export type VoiceSearchTemplates = Partial<{
20
20
  buttonText: Template<VoiceSearchTemplateProps>;
21
21
  status: Template<VoiceSearchTemplateProps>;
22
22
  }>;
23
- export declare type VoiceSearchWidgetParams = {
23
+ export type VoiceSearchWidgetParams = {
24
24
  container: string | HTMLElement;
25
25
  cssClasses?: VoiceSearchCSSClasses;
26
26
  templates?: VoiceSearchTemplates;
@@ -31,7 +31,7 @@ export declare type VoiceSearchWidgetParams = {
31
31
  }) => PlainSearchParameters | void;
32
32
  createVoiceSearchHelper?: CreateVoiceSearchHelper;
33
33
  };
34
- export declare type VoiceSearchWidget = WidgetFactory<VoiceSearchWidgetDescription & {
34
+ export type VoiceSearchWidget = WidgetFactory<VoiceSearchWidgetDescription & {
35
35
  $$type: 'ais.voiceSearch';
36
36
  }, VoiceSearchConnectorParams, VoiceSearchWidgetParams>;
37
37
  declare const voiceSearch: VoiceSearchWidget;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instantsearch.js",
3
- "version": "4.49.4",
3
+ "version": "4.50.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",
@@ -29,10 +29,11 @@
29
29
  "@algolia/events": "^4.0.1",
30
30
  "@algolia/ui-components-highlight-vdom": "^1.2.1",
31
31
  "@algolia/ui-components-shared": "^1.2.1",
32
+ "@types/dom-speech-recognition": "^0.0.1",
32
33
  "@types/google.maps": "^3.45.3",
33
34
  "@types/hogan.js": "^3.0.0",
34
35
  "@types/qs": "^6.5.3",
35
- "algoliasearch-helper": "^3.11.2",
36
+ "algoliasearch-helper": "^3.11.3",
36
37
  "hogan.js": "^3.0.2",
37
38
  "htm": "^3.0.0",
38
39
  "preact": "^10.10.0",
@@ -54,8 +55,9 @@
54
55
  "version": "./scripts/version/update-version.js"
55
56
  },
56
57
  "devDependencies": {
57
- "@instantsearch/mocks": "1.0.3",
58
- "@instantsearch/testutils": "1.0.3",
58
+ "@instantsearch/mocks": "1.2.0",
59
+ "@instantsearch/tests": "1.2.0",
60
+ "@instantsearch/testutils": "1.0.5",
59
61
  "@storybook/html": "5.3.9",
60
62
  "@types/scriptjs": "0.0.2",
61
63
  "algoliasearch": "4.14.3",
@@ -63,5 +65,5 @@
63
65
  "scriptjs": "2.5.9",
64
66
  "webpack": "4.41.5"
65
67
  },
66
- "gitHead": "4c473604508a865a2488e064fdd3a415f416d14a"
68
+ "gitHead": "9c696ab3244d701c05d314bb765f086a50ff481b"
67
69
  }