instantsearch.js 4.50.0 → 4.50.2
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/connectors/infinite-hits/connectInfiniteHits.js +8 -1
- package/cjs/lib/templating/prepareTemplateProps.js +1 -2
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/hits/hits.js +3 -4
- package/cjs/widgets/index/index.js +3 -0
- package/cjs/widgets/infinite-hits/infinite-hits.js +3 -4
- package/dist/instantsearch.development.d.ts +2 -1
- package/dist/instantsearch.development.js +36 -19
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +2 -1
- package/dist/instantsearch.production.min.d.ts +2 -1
- 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/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-per-page/connectHitsPerPage.d.ts +6 -6
- package/es/connectors/infinite-hits/connectInfiniteHits.d.ts +8 -8
- package/es/connectors/infinite-hits/connectInfiniteHits.js +8 -1
- 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/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/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 +6 -6
- 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 +5 -5
- 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 +6 -5
- package/es/widgets/index/index.js +3 -0
- 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 +6 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
import type * as Places from 'places.js';
|
|
3
3
|
import type { WidgetFactory, WidgetRenderState } from '../../types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
4
|
+
type StaticOptions = Places.StaticOptions;
|
|
5
|
+
type PlacesInstance = Places.PlacesInstance;
|
|
6
|
+
type ReconfigurableOptions = Places.ReconfigurableOptions;
|
|
7
|
+
export type PlacesWidgetParams = {
|
|
8
8
|
/**
|
|
9
9
|
* The Algolia Places reference to use.
|
|
10
10
|
*
|
|
@@ -16,7 +16,7 @@ export declare type PlacesWidgetParams = {
|
|
|
16
16
|
*/
|
|
17
17
|
defaultPosition?: string[];
|
|
18
18
|
} & StaticOptions;
|
|
19
|
-
export
|
|
19
|
+
export type PlacesWidgetDescription = {
|
|
20
20
|
$$type: 'ais.places';
|
|
21
21
|
$$widgetType: 'ais.places';
|
|
22
22
|
renderState: Record<string, unknown>;
|
|
@@ -30,7 +30,7 @@ export declare type PlacesWidgetDescription = {
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type PlacesWidget = WidgetFactory<PlacesWidgetDescription, PlacesWidgetParams, PlacesWidgetParams>;
|
|
34
34
|
/**
|
|
35
35
|
* This widget sets the geolocation value for the search based on the selected
|
|
36
36
|
* result in the Algolia Places autocomplete.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import type { PoweredByConnectorParams, PoweredByWidgetDescription } from '../../connectors/powered-by/connectPoweredBy';
|
|
3
3
|
import type { WidgetFactory } from '../../types';
|
|
4
|
-
export
|
|
4
|
+
export type PoweredByCSSClasses = Partial<{
|
|
5
5
|
/**
|
|
6
6
|
* CSS class to add to the wrapping element.
|
|
7
7
|
*/
|
|
@@ -15,7 +15,7 @@ export declare type PoweredByCSSClasses = Partial<{
|
|
|
15
15
|
*/
|
|
16
16
|
logo: string | string[];
|
|
17
17
|
}>;
|
|
18
|
-
export
|
|
18
|
+
export type PoweredByWidgetParams = {
|
|
19
19
|
/**
|
|
20
20
|
* CSS Selector or HTMLElement to insert the widget.
|
|
21
21
|
*/
|
|
@@ -30,7 +30,7 @@ export declare type PoweredByWidgetParams = {
|
|
|
30
30
|
*/
|
|
31
31
|
cssClasses?: PoweredByCSSClasses;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type PoweredByWidget = WidgetFactory<PoweredByWidgetDescription & {
|
|
34
34
|
$$widgetType: 'ais.poweredBy';
|
|
35
35
|
}, PoweredByConnectorParams, PoweredByWidgetParams>;
|
|
36
36
|
declare const poweredBy: PoweredByWidget;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { WidgetFactory } from '../../types';
|
|
2
2
|
import type { ParamTrackedFilters, ParamTransformRuleContexts, QueryRulesConnectorParams, QueryRulesWidgetDescription } from '../../connectors/query-rules/connectQueryRules';
|
|
3
|
-
export
|
|
3
|
+
export type QueryRuleContextWidgetParams = {
|
|
4
4
|
trackedFilters: ParamTrackedFilters;
|
|
5
5
|
transformRuleContexts?: ParamTransformRuleContexts;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type QueryRuleContextWidget = WidgetFactory<QueryRulesWidgetDescription & {
|
|
8
8
|
$$widgetType: 'ais.queryRuleContext';
|
|
9
9
|
}, QueryRulesConnectorParams, QueryRuleContextWidgetParams>;
|
|
10
10
|
declare const queryRuleContext: QueryRuleContextWidget;
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
import type { WidgetFactory, Template } from '../../types';
|
|
3
3
|
import type { QueryRulesConnectorParams, QueryRulesWidgetDescription } from '../../connectors/query-rules/connectQueryRules';
|
|
4
4
|
import type { QueryRuleCustomDataComponentTemplates } from '../../components/QueryRuleCustomData/QueryRuleCustomData';
|
|
5
|
-
export
|
|
5
|
+
export type QueryRuleCustomDataCSSClasses = Partial<{
|
|
6
6
|
root: string | string[];
|
|
7
7
|
}>;
|
|
8
|
-
export
|
|
8
|
+
export type QueryRuleCustomDataTemplates = Partial<{
|
|
9
9
|
default: Template<{
|
|
10
10
|
items: any[];
|
|
11
11
|
}>;
|
|
12
12
|
}>;
|
|
13
|
-
export
|
|
13
|
+
export type QueryRuleCustomDataWidgetParams = {
|
|
14
14
|
container: string | HTMLElement;
|
|
15
15
|
cssClasses?: QueryRuleCustomDataCSSClasses;
|
|
16
16
|
templates?: QueryRuleCustomDataTemplates;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type QueryRuleCustomDataWidget = WidgetFactory<QueryRulesWidgetDescription & {
|
|
19
19
|
$$widgetType: 'ais.queryRuleCustomData';
|
|
20
20
|
}, QueryRulesConnectorParams, QueryRuleCustomDataWidgetParams>;
|
|
21
21
|
export declare const defaultTemplates: QueryRuleCustomDataComponentTemplates;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import type { RangeConnectorParams, RangeWidgetDescription } from '../../connectors/range/connectRange';
|
|
3
3
|
import type { Template, WidgetFactory } from '../../types';
|
|
4
|
-
export
|
|
4
|
+
export type RangeInputTemplates = Partial<{
|
|
5
5
|
/**
|
|
6
6
|
* The label of the separator, between min and max.
|
|
7
7
|
* @default "to"
|
|
@@ -13,7 +13,7 @@ export declare type RangeInputTemplates = Partial<{
|
|
|
13
13
|
*/
|
|
14
14
|
submitText: Template;
|
|
15
15
|
}>;
|
|
16
|
-
export
|
|
16
|
+
export type RangeInputCSSClasses = Partial<{
|
|
17
17
|
/**
|
|
18
18
|
* CSS class to add to the root element.
|
|
19
19
|
*/
|
|
@@ -51,7 +51,7 @@ export declare type RangeInputCSSClasses = Partial<{
|
|
|
51
51
|
*/
|
|
52
52
|
submit: string | string[];
|
|
53
53
|
}>;
|
|
54
|
-
export
|
|
54
|
+
export type RangeInputWidgetParams = {
|
|
55
55
|
/**
|
|
56
56
|
* Valid CSS Selector as a string or DOMElement.
|
|
57
57
|
*/
|
|
@@ -82,7 +82,7 @@ export declare type RangeInputWidgetParams = {
|
|
|
82
82
|
*/
|
|
83
83
|
cssClasses?: RangeInputCSSClasses;
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type RangeInputWidget = WidgetFactory<Omit<RangeWidgetDescription, '$$type'> & {
|
|
86
86
|
$$widgetType: 'ais.rangeInput';
|
|
87
87
|
$$type: 'ais.rangeInput';
|
|
88
88
|
}, RangeConnectorParams, RangeInputWidgetParams>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import type { RangeConnectorParams, RangeWidgetDescription } from '../../connectors/range/connectRange';
|
|
3
3
|
import type { WidgetFactory } from '../../types';
|
|
4
|
-
export
|
|
4
|
+
export type RangeSliderCssClasses = Partial<{
|
|
5
5
|
/**
|
|
6
6
|
* CSS class to add to the root element.
|
|
7
7
|
*/
|
|
@@ -11,7 +11,7 @@ export declare type RangeSliderCssClasses = Partial<{
|
|
|
11
11
|
*/
|
|
12
12
|
disabledRoot: string | string[];
|
|
13
13
|
}>;
|
|
14
|
-
|
|
14
|
+
type RangeSliderTooltipOptions = {
|
|
15
15
|
/**
|
|
16
16
|
* The function takes the raw value as input, and should return
|
|
17
17
|
* a string for the label that should be used for this value.
|
|
@@ -20,7 +20,7 @@ declare type RangeSliderTooltipOptions = {
|
|
|
20
20
|
*/
|
|
21
21
|
format(value: number): string;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type RangeSliderWidgetParams = {
|
|
24
24
|
/**
|
|
25
25
|
* CSS Selector or DOMElement to insert the widget.
|
|
26
26
|
*/
|
|
@@ -64,7 +64,7 @@ export declare type RangeSliderWidgetParams = {
|
|
|
64
64
|
*/
|
|
65
65
|
max?: number;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type RangeSliderWidget = WidgetFactory<Omit<RangeWidgetDescription, '$$type'> & {
|
|
68
68
|
$$widgetType: 'ais.rangeSlider';
|
|
69
69
|
$$type: 'ais.rangeSlider';
|
|
70
70
|
}, RangeConnectorParams, RangeSliderWidgetParams>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import type { RatingMenuWidgetDescription, RatingMenuConnectorParams } from '../../connectors/rating-menu/connectRatingMenu';
|
|
3
3
|
import type { ComponentCSSClasses, Template, WidgetFactory } from '../../types';
|
|
4
|
-
export
|
|
4
|
+
export type RatingMenuTemplates = Partial<{
|
|
5
5
|
/**
|
|
6
6
|
* Item template, provided with `name`, `count`, `isRefined`, `url` data properties.
|
|
7
7
|
*/
|
|
@@ -18,7 +18,7 @@ export declare type RatingMenuTemplates = Partial<{
|
|
|
18
18
|
isFromSearch?: boolean;
|
|
19
19
|
}>;
|
|
20
20
|
}>;
|
|
21
|
-
export
|
|
21
|
+
export type RatingMenuCSSClasses = Partial<{
|
|
22
22
|
/**
|
|
23
23
|
* CSS class to add to the root element.
|
|
24
24
|
*/
|
|
@@ -68,9 +68,9 @@ export declare type RatingMenuCSSClasses = Partial<{
|
|
|
68
68
|
*/
|
|
69
69
|
count: string | string[];
|
|
70
70
|
}>;
|
|
71
|
-
export
|
|
72
|
-
export
|
|
73
|
-
export
|
|
71
|
+
export type RatingMenuComponentCSSClasses = ComponentCSSClasses<RatingMenuCSSClasses>;
|
|
72
|
+
export type RatingMenuComponentTemplates = Required<RatingMenuTemplates>;
|
|
73
|
+
export type RatingMenuWidgetParams = {
|
|
74
74
|
/**
|
|
75
75
|
* Place where to insert the widget in your webpage.
|
|
76
76
|
*/
|
|
@@ -118,7 +118,7 @@ export declare type RatingMenuWidgetParams = {
|
|
|
118
118
|
* })
|
|
119
119
|
* ]);
|
|
120
120
|
*/
|
|
121
|
-
export
|
|
121
|
+
export type RatingMenuWidget = WidgetFactory<RatingMenuWidgetDescription & {
|
|
122
122
|
$$widgetType: 'ais.ratingMenu';
|
|
123
123
|
}, RatingMenuConnectorParams, RatingMenuWidgetParams>;
|
|
124
124
|
declare const ratingMenu: RatingMenuWidget;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { RefinementListConnectorParams, RefinementListWidgetDescription } from '../../connectors/refinement-list/connectRefinementList';
|
|
3
3
|
import type { Template, WidgetFactory } from '../../types';
|
|
4
4
|
import type { SearchBoxTemplates } from '../search-box/search-box';
|
|
5
|
-
export
|
|
5
|
+
export type RefinementListOwnCSSClasses = Partial<{
|
|
6
6
|
/**
|
|
7
7
|
* CSS class to add to the root element.
|
|
8
8
|
*/
|
|
@@ -56,7 +56,7 @@ export declare type RefinementListOwnCSSClasses = Partial<{
|
|
|
56
56
|
*/
|
|
57
57
|
searchBox: string | string[];
|
|
58
58
|
}>;
|
|
59
|
-
|
|
59
|
+
type RefinementListSearchableCSSClasses = Partial<{
|
|
60
60
|
searchableRoot: string | string[];
|
|
61
61
|
searchableForm: string | string[];
|
|
62
62
|
searchableInput: string | string[];
|
|
@@ -67,8 +67,8 @@ declare type RefinementListSearchableCSSClasses = Partial<{
|
|
|
67
67
|
searchableLoadingIndicator: string | string[];
|
|
68
68
|
searchableLoadingIcon: string | string[];
|
|
69
69
|
}>;
|
|
70
|
-
export
|
|
71
|
-
export
|
|
70
|
+
export type RefinementListCSSClasses = RefinementListOwnCSSClasses & RefinementListSearchableCSSClasses;
|
|
71
|
+
export type RefinementListItemData = {
|
|
72
72
|
/**
|
|
73
73
|
* The number of occurrences of the facet in the result set.
|
|
74
74
|
*/
|
|
@@ -102,7 +102,7 @@ export declare type RefinementListItemData = {
|
|
|
102
102
|
*/
|
|
103
103
|
isFromSearch: boolean;
|
|
104
104
|
};
|
|
105
|
-
export
|
|
105
|
+
export type RefinementListOwnTemplates = Partial<{
|
|
106
106
|
/**
|
|
107
107
|
* Item template, provided with `label`, `highlighted`, `value`, `count`, `isRefined`, `url` data properties.
|
|
108
108
|
*/
|
|
@@ -118,7 +118,7 @@ export declare type RefinementListOwnTemplates = Partial<{
|
|
|
118
118
|
*/
|
|
119
119
|
searchableNoResults: Template;
|
|
120
120
|
}>;
|
|
121
|
-
|
|
121
|
+
type RefinementListSearchableTemplates = Partial<{
|
|
122
122
|
/**
|
|
123
123
|
* Templates to use for search for facet values submit button.
|
|
124
124
|
*/
|
|
@@ -132,9 +132,9 @@ declare type RefinementListSearchableTemplates = Partial<{
|
|
|
132
132
|
*/
|
|
133
133
|
searchableLoadingIndicator: SearchBoxTemplates['loadingIndicator'];
|
|
134
134
|
}>;
|
|
135
|
-
export
|
|
136
|
-
export
|
|
137
|
-
export
|
|
135
|
+
export type RefinementListTemplates = RefinementListOwnTemplates & RefinementListSearchableTemplates;
|
|
136
|
+
export type RefinementListComponentTemplates = Required<RefinementListOwnTemplates>;
|
|
137
|
+
export type RefinementListWidgetParams = {
|
|
138
138
|
/**
|
|
139
139
|
* CSS Selector or HTMLElement to insert the widget.
|
|
140
140
|
*/
|
|
@@ -169,7 +169,7 @@ export declare type RefinementListWidgetParams = {
|
|
|
169
169
|
*/
|
|
170
170
|
cssClasses?: RefinementListCSSClasses;
|
|
171
171
|
};
|
|
172
|
-
export
|
|
172
|
+
export type RefinementListWidget = WidgetFactory<RefinementListWidgetDescription & {
|
|
173
173
|
$$widgetType: 'ais.refinementList';
|
|
174
174
|
}, RefinementListConnectorParams, RefinementListWidgetParams>;
|
|
175
175
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import type { WidgetFactory, Template } from '../../types';
|
|
3
3
|
import type { RelevantSortConnectorParams, RelevantSortWidgetDescription } from '../../connectors/relevant-sort/connectRelevantSort';
|
|
4
|
-
export
|
|
4
|
+
export type RelevantSortCSSClasses = Partial<{
|
|
5
5
|
root: string;
|
|
6
6
|
text: string;
|
|
7
7
|
button: string;
|
|
8
8
|
}>;
|
|
9
|
-
export
|
|
9
|
+
export type RelevantSortTemplates = Partial<{
|
|
10
10
|
text: Template<{
|
|
11
11
|
isRelevantSorted: boolean;
|
|
12
12
|
}>;
|
|
@@ -14,12 +14,12 @@ export declare type RelevantSortTemplates = Partial<{
|
|
|
14
14
|
isRelevantSorted: boolean;
|
|
15
15
|
}>;
|
|
16
16
|
}>;
|
|
17
|
-
export
|
|
17
|
+
export type RelevantSortWidgetParams = {
|
|
18
18
|
container: string | HTMLElement;
|
|
19
19
|
cssClasses?: RelevantSortCSSClasses;
|
|
20
20
|
templates?: RelevantSortTemplates;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type RelevantSortWidget = WidgetFactory<RelevantSortWidgetDescription & {
|
|
23
23
|
$$widgetType: 'ais.relevantSort';
|
|
24
24
|
}, RelevantSortConnectorParams, RelevantSortWidgetParams>;
|
|
25
25
|
declare const relevantSort: RelevantSortWidget;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { WidgetFactory, Template } from '../../types';
|
|
3
3
|
import type { SearchBoxConnectorParams, SearchBoxWidgetDescription } from '../../connectors/search-box/connectSearchBox';
|
|
4
4
|
import type { SearchBoxComponentCSSClasses } from '../../components/SearchBox/SearchBox';
|
|
5
|
-
export
|
|
5
|
+
export type SearchBoxTemplates = Partial<{
|
|
6
6
|
/**
|
|
7
7
|
* Template used for displaying the submit button. Can accept a function or a Hogan string.
|
|
8
8
|
*/
|
|
@@ -22,7 +22,7 @@ export declare type SearchBoxTemplates = Partial<{
|
|
|
22
22
|
cssClasses: SearchBoxComponentCSSClasses;
|
|
23
23
|
}>;
|
|
24
24
|
}>;
|
|
25
|
-
export
|
|
25
|
+
export type SearchBoxCSSClasses = Partial<{
|
|
26
26
|
/**
|
|
27
27
|
* CSS class to add to the wrapping `<div>`
|
|
28
28
|
*/
|
|
@@ -60,7 +60,7 @@ export declare type SearchBoxCSSClasses = Partial<{
|
|
|
60
60
|
*/
|
|
61
61
|
loadingIcon: string | string[];
|
|
62
62
|
}>;
|
|
63
|
-
export
|
|
63
|
+
export type SearchBoxWidgetParams = {
|
|
64
64
|
/**
|
|
65
65
|
* CSS Selector or HTMLElement to insert the widget
|
|
66
66
|
*/
|
|
@@ -114,7 +114,7 @@ export declare type SearchBoxWidgetParams = {
|
|
|
114
114
|
* away.
|
|
115
115
|
*
|
|
116
116
|
*/
|
|
117
|
-
export
|
|
117
|
+
export type SearchBoxWidget = WidgetFactory<SearchBoxWidgetDescription & {
|
|
118
118
|
$$widgetType: 'ais.searchBox';
|
|
119
119
|
}, SearchBoxConnectorParams, SearchBoxWidgetParams>;
|
|
120
120
|
declare const searchBox: SearchBoxWidget;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import type { SortByConnectorParams, SortByItem, SortByWidgetDescription } from '../../connectors/sort-by/connectSortBy';
|
|
3
3
|
import type { TransformItems, WidgetFactory } from '../../types';
|
|
4
|
-
export
|
|
4
|
+
export type SortByWidgetCssClasses = Partial<{
|
|
5
5
|
/**
|
|
6
6
|
* CSS classes added to the outer `<div>`.
|
|
7
7
|
*/
|
|
@@ -15,7 +15,7 @@ export declare type SortByWidgetCssClasses = Partial<{
|
|
|
15
15
|
*/
|
|
16
16
|
option: string | string[];
|
|
17
17
|
}>;
|
|
18
|
-
export
|
|
18
|
+
export type SortByIndexDefinition = {
|
|
19
19
|
/**
|
|
20
20
|
* The name of the index to target.
|
|
21
21
|
*/
|
|
@@ -25,7 +25,7 @@ export declare type SortByIndexDefinition = {
|
|
|
25
25
|
*/
|
|
26
26
|
label: string;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type SortByWidgetParams = {
|
|
29
29
|
/**
|
|
30
30
|
* CSS Selector or HTMLElement to insert the widget.
|
|
31
31
|
*/
|
|
@@ -43,7 +43,7 @@ export declare type SortByWidgetParams = {
|
|
|
43
43
|
*/
|
|
44
44
|
transformItems?: TransformItems<SortByItem>;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type SortByWidget = WidgetFactory<SortByWidgetDescription & {
|
|
47
47
|
$$widgetType: 'ais.sortBy';
|
|
48
48
|
}, SortByConnectorParams, SortByWidgetParams>;
|
|
49
49
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { StatsComponentTemplates } from '../../components/Stats/Stats';
|
|
3
3
|
import type { StatsConnectorParams, StatsRenderState, StatsWidgetDescription } from '../../connectors/stats/connectStats';
|
|
4
4
|
import type { Template, WidgetFactory } from '../../types';
|
|
5
|
-
|
|
5
|
+
type TextTemplateProps = {
|
|
6
6
|
hasManyResults: boolean;
|
|
7
7
|
hasNoResults: boolean;
|
|
8
8
|
hasOneResult: boolean;
|
|
@@ -10,7 +10,7 @@ declare type TextTemplateProps = {
|
|
|
10
10
|
hasOneSortedResults: boolean;
|
|
11
11
|
hasManySortedResults: boolean;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type StatsCSSClasses = Partial<{
|
|
14
14
|
/**
|
|
15
15
|
* CSS class to add to the root element.
|
|
16
16
|
*/
|
|
@@ -20,13 +20,13 @@ export declare type StatsCSSClasses = Partial<{
|
|
|
20
20
|
*/
|
|
21
21
|
text: string | string[];
|
|
22
22
|
}>;
|
|
23
|
-
export
|
|
23
|
+
export type StatsTemplates = Partial<{
|
|
24
24
|
/**
|
|
25
25
|
* Text template, provided with `hasManyResults`, `hasNoResults`, `hasOneResult`, `hasNoSortedResults`, `hasOneSortedResults`, `hasManySortedResults`, `hitsPerPage`, `nbHits`, `nbSortedHits`, `nbPages`, `areHitsSorted`, `page`, `processingTimeMS`, `query`.
|
|
26
26
|
*/
|
|
27
27
|
text: Template<TextTemplateProps & StatsRenderState>;
|
|
28
28
|
}>;
|
|
29
|
-
export
|
|
29
|
+
export type StatsWidgetParams = {
|
|
30
30
|
/**
|
|
31
31
|
* CSS Selector or HTMLElement to insert the widget.
|
|
32
32
|
*/
|
|
@@ -40,7 +40,7 @@ export declare type StatsWidgetParams = {
|
|
|
40
40
|
*/
|
|
41
41
|
cssClasses?: StatsCSSClasses;
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type StatsWidget = WidgetFactory<StatsWidgetDescription & {
|
|
44
44
|
$$widgetType: 'ais.stats';
|
|
45
45
|
}, StatsConnectorParams, StatsWidgetParams>;
|
|
46
46
|
export declare const defaultTemplates: StatsComponentTemplates;
|
|
@@ -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.50.
|
|
3
|
+
"version": "4.50.2",
|
|
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,6 +29,7 @@
|
|
|
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",
|
|
@@ -54,9 +55,9 @@
|
|
|
54
55
|
"version": "./scripts/version/update-version.js"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
|
-
"@instantsearch/mocks": "1.
|
|
58
|
-
"@instantsearch/tests": "1.
|
|
59
|
-
"@instantsearch/testutils": "1.0.
|
|
58
|
+
"@instantsearch/mocks": "1.3.0",
|
|
59
|
+
"@instantsearch/tests": "1.3.0",
|
|
60
|
+
"@instantsearch/testutils": "1.0.6",
|
|
60
61
|
"@storybook/html": "5.3.9",
|
|
61
62
|
"@types/scriptjs": "0.0.2",
|
|
62
63
|
"algoliasearch": "4.14.3",
|
|
@@ -64,5 +65,5 @@
|
|
|
64
65
|
"scriptjs": "2.5.9",
|
|
65
66
|
"webpack": "4.41.5"
|
|
66
67
|
},
|
|
67
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "929c1d782d17a0d743f8a16d8d7e2231534658e7"
|
|
68
69
|
}
|