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.
- package/cjs/components/Pagination/Pagination.js +1 -1
- package/cjs/connectors/hits/connectHits.js +2 -1
- package/cjs/connectors/infinite-hits/connectInfiniteHits.js +3 -2
- package/cjs/lib/InstantSearch.js +3 -7
- package/cjs/lib/templating/prepareTemplateProps.js +1 -2
- package/cjs/lib/templating/renderTemplate.js +3 -0
- package/cjs/lib/utils/createSendEventForHits.js +6 -5
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/hits/hits.js +3 -4
- package/cjs/widgets/index/index.js +18 -1
- package/cjs/widgets/infinite-hits/infinite-hits.js +3 -4
- package/dist/instantsearch.development.d.ts +11 -3
- package/dist/instantsearch.development.js +89 -37
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +11 -3
- package/dist/instantsearch.production.min.d.ts +11 -3
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Answers/Answers.d.ts +3 -3
- package/es/components/Breadcrumb/Breadcrumb.d.ts +3 -3
- package/es/components/ClearRefinements/ClearRefinements.d.ts +3 -3
- package/es/components/CurrentRefinements/CurrentRefinements.d.ts +2 -2
- package/es/components/GeoSearchControls/GeoSearchButton.d.ts +1 -1
- package/es/components/GeoSearchControls/GeoSearchControls.d.ts +1 -1
- package/es/components/GeoSearchControls/GeoSearchToggle.d.ts +1 -1
- package/es/components/Highlight/Highlight.d.ts +2 -2
- package/es/components/Hits/Hits.d.ts +3 -3
- package/es/components/InfiniteHits/InfiniteHits.d.ts +3 -3
- package/es/components/MenuSelect/MenuSelect.d.ts +4 -4
- package/es/components/Pagination/Pagination.d.ts +3 -3
- package/es/components/Pagination/Pagination.js +1 -1
- package/es/components/Panel/Panel.d.ts +3 -3
- package/es/components/PoweredBy/PoweredBy.d.ts +2 -2
- package/es/components/QueryRuleCustomData/QueryRuleCustomData.d.ts +3 -3
- package/es/components/RangeInput/RangeInput.d.ts +3 -3
- package/es/components/RefinementList/RefinementList.d.ts +7 -7
- package/es/components/RefinementList/RefinementListItem.d.ts +1 -1
- package/es/components/RelevantSort/RelevantSort.d.ts +3 -3
- package/es/components/ReverseHighlight/ReverseHighlight.d.ts +2 -2
- package/es/components/ReverseSnippet/ReverseSnippet.d.ts +2 -2
- package/es/components/SearchBox/SearchBox.d.ts +5 -5
- package/es/components/Selector/Selector.d.ts +3 -3
- package/es/components/Slider/Rheostat.d.ts +6 -6
- package/es/components/Slider/Slider.d.ts +2 -2
- package/es/components/Snippet/Snippet.d.ts +2 -2
- package/es/components/Stats/Stats.d.ts +3 -3
- package/es/components/Template/Template.d.ts +1 -1
- package/es/components/ToggleRefinement/ToggleRefinement.d.ts +3 -3
- package/es/components/VoiceSearch/VoiceSearch.d.ts +3 -3
- package/es/connectors/answers/connectAnswers.d.ts +4 -4
- package/es/connectors/autocomplete/connectAutocomplete.d.ts +4 -4
- package/es/connectors/breadcrumb/connectBreadcrumb.d.ts +5 -5
- package/es/connectors/clear-refinements/connectClearRefinements.d.ts +4 -4
- package/es/connectors/configure/connectConfigure.d.ts +5 -5
- package/es/connectors/configure-related-items/connectConfigureRelatedItems.d.ts +5 -5
- package/es/connectors/current-refinements/connectCurrentRefinements.d.ts +6 -6
- package/es/connectors/dynamic-widgets/connectDynamicWidgets.d.ts +4 -4
- package/es/connectors/geo-search/connectGeoSearch.d.ts +6 -6
- package/es/connectors/hierarchical-menu/connectHierarchicalMenu.d.ts +5 -5
- package/es/connectors/hits/connectHits.d.ts +4 -4
- package/es/connectors/hits/connectHits.js +2 -1
- package/es/connectors/hits-per-page/connectHitsPerPage.d.ts +6 -6
- package/es/connectors/infinite-hits/connectInfiniteHits.d.ts +8 -8
- package/es/connectors/infinite-hits/connectInfiniteHits.js +3 -2
- package/es/connectors/menu/connectMenu.d.ts +5 -5
- package/es/connectors/numeric-menu/connectNumericMenu.d.ts +6 -6
- package/es/connectors/pagination/connectPagination.d.ts +4 -4
- package/es/connectors/powered-by/connectPoweredBy.d.ts +4 -4
- package/es/connectors/query-rules/connectQueryRules.d.ts +7 -7
- package/es/connectors/range/connectRange.d.ts +8 -8
- package/es/connectors/rating-menu/connectRatingMenu.d.ts +6 -6
- package/es/connectors/refinement-list/connectRefinementList.d.ts +5 -5
- package/es/connectors/relevant-sort/connectRelevantSort.d.ts +5 -5
- package/es/connectors/search-box/connectSearchBox.d.ts +4 -4
- package/es/connectors/sort-by/connectSortBy.d.ts +5 -5
- package/es/connectors/stats/connectStats.d.ts +4 -4
- package/es/connectors/toggle-refinement/connectToggleRefinement.d.ts +9 -9
- package/es/connectors/toggle-refinement/types.d.ts +5 -5
- package/es/connectors/voice-search/connectVoiceSearch.d.ts +4 -4
- package/es/helpers/components/Highlight.d.ts +1 -1
- package/es/helpers/components/ReverseHighlight.d.ts +1 -1
- package/es/helpers/components/ReverseSnippet.d.ts +1 -1
- package/es/helpers/components/Snippet.d.ts +1 -1
- package/es/helpers/highlight.d.ts +1 -1
- package/es/helpers/reverseHighlight.d.ts +1 -1
- package/es/helpers/reverseSnippet.d.ts +1 -1
- package/es/helpers/snippet.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/lib/InstantSearch.d.ts +3 -3
- package/es/lib/InstantSearch.js +3 -7
- package/es/lib/createHelpers.d.ts +1 -1
- package/es/lib/insights/listener.d.ts +1 -1
- package/es/lib/routers/history.d.ts +3 -3
- package/es/lib/suit.d.ts +2 -2
- package/es/lib/templating/prepareTemplateProps.d.ts +2 -2
- package/es/lib/templating/prepareTemplateProps.js +1 -2
- package/es/lib/templating/renderTemplate.js +3 -0
- package/es/lib/utils/checkIndexUiState.d.ts +1 -1
- package/es/lib/utils/createConcurrentSafePromise.d.ts +2 -2
- package/es/lib/utils/createSendEventForFacet.d.ts +4 -4
- package/es/lib/utils/createSendEventForHits.d.ts +8 -7
- package/es/lib/utils/createSendEventForHits.js +6 -5
- package/es/lib/utils/debounce.d.ts +2 -2
- package/es/lib/utils/defer.d.ts +2 -2
- package/es/lib/utils/documentation.d.ts +2 -2
- package/es/lib/utils/escapeFacetValue.d.ts +1 -1
- package/es/lib/utils/geo-search.d.ts +1 -1
- package/es/lib/utils/getRefinements.d.ts +6 -6
- package/es/lib/utils/logger.d.ts +2 -2
- package/es/lib/utils/range.d.ts +1 -1
- package/es/lib/utils/safelyRunOnBrowser.d.ts +2 -2
- package/es/lib/utils/toArray.d.ts +1 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/lib/voiceSearchHelper/types.d.ts +5 -5
- package/es/middlewares/createInsightsMiddleware.d.ts +3 -3
- package/es/middlewares/createRouterMiddleware.d.ts +1 -1
- package/es/types/component.d.ts +1 -1
- package/es/types/connector.d.ts +4 -4
- package/es/types/insights.d.ts +5 -5
- package/es/types/middleware.d.ts +4 -4
- package/es/types/render-state.d.ts +5 -5
- package/es/types/results.d.ts +16 -16
- package/es/types/router.d.ts +2 -2
- package/es/types/templates.d.ts +14 -6
- package/es/types/ui-state.d.ts +4 -4
- package/es/types/utils.d.ts +6 -6
- package/es/types/widget-factory.d.ts +2 -2
- package/es/types/widget.d.ts +23 -23
- package/es/widgets/analytics/analytics.d.ts +4 -4
- package/es/widgets/answers/answers.d.ts +4 -4
- package/es/widgets/breadcrumb/breadcrumb.d.ts +4 -4
- package/es/widgets/clear-refinements/clear-refinements.d.ts +4 -4
- package/es/widgets/configure/configure.d.ts +2 -2
- package/es/widgets/configure-related-items/configure-related-items.d.ts +2 -2
- package/es/widgets/current-refinements/current-refinements.d.ts +3 -3
- package/es/widgets/dynamic-widgets/dynamic-widgets.d.ts +2 -2
- package/es/widgets/geo-search/createHTMLMarker.d.ts +1 -1
- package/es/widgets/geo-search/geo-search.d.ts +7 -7
- package/es/widgets/hierarchical-menu/hierarchical-menu.d.ts +6 -6
- package/es/widgets/hits/hits.d.ts +4 -4
- package/es/widgets/hits/hits.js +3 -4
- package/es/widgets/hits-per-page/hits-per-page.d.ts +3 -3
- package/es/widgets/index/index.d.ts +5 -5
- package/es/widgets/index/index.js +18 -1
- package/es/widgets/infinite-hits/infinite-hits.d.ts +4 -4
- package/es/widgets/infinite-hits/infinite-hits.js +3 -4
- package/es/widgets/menu/menu.d.ts +6 -6
- package/es/widgets/menu-select/menu-select.d.ts +4 -4
- package/es/widgets/numeric-menu/numeric-menu.d.ts +6 -6
- package/es/widgets/pagination/pagination.d.ts +4 -4
- package/es/widgets/panel/panel.d.ts +9 -9
- package/es/widgets/places/places.d.ts +6 -6
- package/es/widgets/powered-by/powered-by.d.ts +3 -3
- package/es/widgets/query-rule-context/query-rule-context.d.ts +2 -2
- package/es/widgets/query-rule-custom-data/query-rule-custom-data.d.ts +4 -4
- package/es/widgets/range-input/range-input.d.ts +4 -4
- package/es/widgets/range-slider/range-slider.d.ts +4 -4
- package/es/widgets/rating-menu/rating-menu.d.ts +6 -6
- package/es/widgets/refinement-list/refinement-list.d.ts +10 -10
- package/es/widgets/relevant-sort/relevant-sort.d.ts +4 -4
- package/es/widgets/search-box/search-box.d.ts +4 -4
- package/es/widgets/sort-by/sort-by.d.ts +4 -4
- package/es/widgets/stats/stats.d.ts +5 -5
- package/es/widgets/toggle-refinement/toggle-refinement.d.ts +4 -4
- package/es/widgets/voice-search/voice-search.d.ts +5 -5
- 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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
6
|
+
export type VoiceSearchCSSClasses = Partial<{
|
|
7
7
|
root: string | string[];
|
|
8
8
|
button: string | string[];
|
|
9
9
|
status: string | string[];
|
|
10
10
|
}>;
|
|
11
|
-
|
|
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
|
|
19
|
+
export type VoiceSearchTemplates = Partial<{
|
|
20
20
|
buttonText: Template<VoiceSearchTemplateProps>;
|
|
21
21
|
status: Template<VoiceSearchTemplateProps>;
|
|
22
22
|
}>;
|
|
23
|
-
export
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
58
|
-
"@instantsearch/
|
|
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": "
|
|
68
|
+
"gitHead": "9c696ab3244d701c05d314bb765f086a50ff481b"
|
|
67
69
|
}
|