instantsearch.js 4.64.3 → 4.66.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.
- package/cjs/components/Answers/Answers.js +2 -2
- package/cjs/components/Breadcrumb/Breadcrumb.js +4 -4
- package/cjs/components/ClearRefinements/ClearRefinements.js +2 -2
- package/cjs/components/CurrentRefinements/CurrentRefinements.js +2 -2
- package/cjs/components/GeoSearchControls/GeoSearchControls.js +3 -3
- package/cjs/components/Highlight/Highlight.js +5 -5
- package/cjs/components/InfiniteHits/InfiniteHits.js +4 -4
- package/cjs/components/InternalHighlight/InternalHighlight.js +2 -2
- package/cjs/components/MenuSelect/MenuSelect.js +2 -2
- package/cjs/components/Pagination/Pagination.js +3 -3
- package/cjs/components/Panel/Panel.js +2 -2
- package/cjs/components/RangeInput/RangeInput.js +4 -4
- package/cjs/components/RefinementList/RefinementList.js +4 -4
- package/cjs/components/ReverseHighlight/ReverseHighlight.js +5 -5
- package/cjs/components/ReverseSnippet/ReverseSnippet.js +5 -5
- package/cjs/components/Selector/Selector.js +3 -3
- package/cjs/components/Slider/Pit.js +2 -2
- package/cjs/components/Slider/Slider.js +3 -3
- package/cjs/components/Snippet/Snippet.js +5 -5
- package/cjs/components/Stats/Stats.js +2 -2
- package/cjs/components/Template/Template.js +64 -7
- package/cjs/connectors/answers/connectAnswers.js +3 -0
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/answers/answers.js +11 -8
- package/cjs/widgets/breadcrumb/breadcrumb.js +8 -8
- package/cjs/widgets/clear-refinements/clear-refinements.js +4 -4
- package/cjs/widgets/current-refinements/current-refinements.js +9 -9
- package/cjs/widgets/geo-search/geo-search.js +11 -11
- package/cjs/widgets/hierarchical-menu/defaultTemplates.js +4 -4
- package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +14 -14
- package/cjs/widgets/hits/hits.js +67 -31
- package/cjs/widgets/hits-per-page/hits-per-page.js +4 -4
- package/cjs/widgets/infinite-hits/infinite-hits.js +9 -9
- package/cjs/widgets/menu/defaultTemplates.js +4 -4
- package/cjs/widgets/menu/menu.js +11 -11
- package/cjs/widgets/menu-select/menu-select.js +5 -5
- package/cjs/widgets/numeric-menu/numeric-menu.js +9 -9
- package/cjs/widgets/pagination/pagination.js +13 -13
- package/cjs/widgets/panel/panel.js +10 -10
- package/cjs/widgets/places/places.js +3 -1
- package/cjs/widgets/powered-by/powered-by.js +4 -4
- package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +2 -2
- package/cjs/widgets/range-input/range-input.js +10 -10
- package/cjs/widgets/range-slider/range-slider.js +3 -3
- package/cjs/widgets/rating-menu/defaultTemplates.js +6 -6
- package/cjs/widgets/rating-menu/rating-menu.js +13 -13
- package/cjs/widgets/refinement-list/defaultTemplates.js +5 -5
- package/cjs/widgets/refinement-list/refinement-list.js +23 -23
- package/cjs/widgets/relevant-sort/relevant-sort.js +4 -4
- package/cjs/widgets/search-box/search-box.js +10 -10
- package/cjs/widgets/sort-by/sort-by.js +4 -4
- package/cjs/widgets/stats/stats.js +3 -3
- package/cjs/widgets/toggle-refinement/toggle-refinement.js +5 -5
- package/cjs/widgets/voice-search/voice-search.js +4 -4
- package/dist/instantsearch.development.d.ts +11 -27
- package/dist/instantsearch.development.js +463 -390
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +11 -27
- package/dist/instantsearch.production.min.d.ts +11 -27
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Answers/Answers.js +1 -1
- package/es/components/Breadcrumb/Breadcrumb.js +1 -1
- package/es/components/ClearRefinements/ClearRefinements.js +1 -1
- package/es/components/CurrentRefinements/CurrentRefinements.js +1 -1
- package/es/components/GeoSearchControls/GeoSearchControls.js +1 -1
- package/es/components/Highlight/Highlight.d.ts +1 -1
- package/es/components/Highlight/Highlight.js +1 -1
- package/es/components/InfiniteHits/InfiniteHits.js +1 -1
- package/es/components/InternalHighlight/InternalHighlight.d.ts +1 -1
- package/es/components/InternalHighlight/InternalHighlight.js +1 -1
- package/es/components/MenuSelect/MenuSelect.js +1 -1
- package/es/components/Pagination/Pagination.js +1 -1
- package/es/components/Panel/Panel.js +1 -1
- package/es/components/RangeInput/RangeInput.js +1 -1
- package/es/components/RefinementList/RefinementList.js +1 -1
- package/es/components/ReverseHighlight/ReverseHighlight.d.ts +1 -1
- package/es/components/ReverseHighlight/ReverseHighlight.js +1 -1
- package/es/components/ReverseSnippet/ReverseSnippet.d.ts +1 -1
- package/es/components/ReverseSnippet/ReverseSnippet.js +1 -1
- package/es/components/Selector/Selector.js +1 -1
- package/es/components/Slider/Pit.js +1 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/Snippet/Snippet.d.ts +1 -1
- package/es/components/Snippet/Snippet.js +1 -1
- package/es/components/Stats/Stats.js +1 -1
- package/es/components/Template/Template.d.ts +1 -1
- package/es/components/Template/Template.js +65 -8
- package/es/connectors/answers/connectAnswers.d.ts +3 -0
- package/es/connectors/answers/connectAnswers.js +3 -0
- package/es/connectors/autocomplete/connectAutocomplete.d.ts +4 -0
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/widgets/answers/answers.d.ts +2 -2
- package/es/widgets/answers/answers.js +6 -3
- package/es/widgets/breadcrumb/breadcrumb.js +1 -1
- package/es/widgets/clear-refinements/clear-refinements.js +1 -1
- package/es/widgets/current-refinements/current-refinements.js +1 -1
- package/es/widgets/geo-search/geo-search.js +1 -1
- package/es/widgets/hierarchical-menu/defaultTemplates.js +1 -1
- package/es/widgets/hierarchical-menu/hierarchical-menu.js +1 -1
- package/es/widgets/hits/defaultTemplates.d.ts +2 -2
- package/es/widgets/hits/hits.d.ts +2 -18
- package/es/widgets/hits/hits.js +67 -31
- package/es/widgets/hits-per-page/hits-per-page.js +1 -1
- package/es/widgets/infinite-hits/infinite-hits.js +1 -1
- package/es/widgets/menu/defaultTemplates.js +1 -1
- package/es/widgets/menu/menu.js +1 -1
- package/es/widgets/menu-select/menu-select.js +1 -1
- package/es/widgets/numeric-menu/numeric-menu.js +1 -1
- package/es/widgets/pagination/pagination.js +1 -1
- package/es/widgets/panel/panel.js +1 -1
- package/es/widgets/places/places.d.ts +2 -6
- package/es/widgets/places/places.js +4 -1
- package/es/widgets/powered-by/powered-by.js +1 -1
- package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +1 -1
- package/es/widgets/range-input/range-input.js +1 -1
- package/es/widgets/range-slider/range-slider.js +1 -1
- package/es/widgets/rating-menu/defaultTemplates.js +1 -1
- package/es/widgets/rating-menu/rating-menu.js +1 -1
- package/es/widgets/refinement-list/defaultTemplates.js +1 -1
- package/es/widgets/refinement-list/refinement-list.js +1 -1
- package/es/widgets/relevant-sort/relevant-sort.js +1 -1
- package/es/widgets/search-box/search-box.js +1 -1
- package/es/widgets/sort-by/sort-by.js +1 -1
- package/es/widgets/stats/stats.js +1 -1
- package/es/widgets/toggle-refinement/toggle-refinement.js +1 -1
- package/es/widgets/voice-search/voice-search.js +1 -1
- package/package.json +12 -11
- package/cjs/components/Hits/Hits.js +0 -72
- package/es/components/Hits/Hits.d.ts +0 -19
- package/es/components/Hits/Hits.js +0 -65
|
@@ -5,8 +5,9 @@ import type { AlgoliaSearchHelper } from 'algoliasearch-helper';
|
|
|
5
5
|
import EventEmitter from '@algolia/events';
|
|
6
6
|
import { FindAnswersOptions } from 'algoliasearch-helper/types/algoliasearch.js';
|
|
7
7
|
import { h } from 'preact';
|
|
8
|
-
import type { HighlightClassNames as HighlightClassNames_2 } from '
|
|
9
|
-
import type { HighlightProps as HighlightProps_3 } from '
|
|
8
|
+
import type { HighlightClassNames as HighlightClassNames_2 } from 'instantsearch-ui-components';
|
|
9
|
+
import type { HighlightProps as HighlightProps_3 } from 'instantsearch-ui-components';
|
|
10
|
+
import type { HitsClassNames } from 'instantsearch-ui-components';
|
|
10
11
|
import type { HoganOptions } from 'hogan.js';
|
|
11
12
|
import type { html } from 'htm/preact';
|
|
12
13
|
import type { InsightsClient as InsightsClient_2 } from 'search-insights';
|
|
@@ -267,6 +268,10 @@ declare type AutocompleteRenderState = {
|
|
|
267
268
|
* The name of the index
|
|
268
269
|
*/
|
|
269
270
|
indexName: string;
|
|
271
|
+
/**
|
|
272
|
+
* The id of the index
|
|
273
|
+
*/
|
|
274
|
+
indexId: string;
|
|
270
275
|
/**
|
|
271
276
|
* The resolved hits from the index matching the query.
|
|
272
277
|
*/
|
|
@@ -1107,6 +1112,8 @@ declare type CustomSendEventForHits = (customPayload: any) => void;
|
|
|
1107
1112
|
|
|
1108
1113
|
declare type CustomSendEventForToggle = (customPayload: any) => void;
|
|
1109
1114
|
|
|
1115
|
+
declare const _default: PlacesWidget;
|
|
1116
|
+
|
|
1110
1117
|
declare type DisposeOptions = {
|
|
1111
1118
|
helper: AlgoliaSearchHelper;
|
|
1112
1119
|
state: SearchParameters;
|
|
@@ -1859,24 +1866,7 @@ declare type HitsConnectorParams<THit extends BaseHit = BaseHit> = {
|
|
|
1859
1866
|
transformItems?: TransformItems<Hit<THit>>;
|
|
1860
1867
|
};
|
|
1861
1868
|
|
|
1862
|
-
declare type HitsCSSClasses = Partial<
|
|
1863
|
-
/**
|
|
1864
|
-
* CSS class to add to the wrapping element.
|
|
1865
|
-
*/
|
|
1866
|
-
root: string | string[];
|
|
1867
|
-
/**
|
|
1868
|
-
* CSS class to add to the wrapping element when no results.
|
|
1869
|
-
*/
|
|
1870
|
-
emptyRoot: string | string[];
|
|
1871
|
-
/**
|
|
1872
|
-
* CSS class to add to the list of results.
|
|
1873
|
-
*/
|
|
1874
|
-
list: string | string[];
|
|
1875
|
-
/**
|
|
1876
|
-
* CSS class to add to each result.
|
|
1877
|
-
*/
|
|
1878
|
-
item: string | string[];
|
|
1879
|
-
}>;
|
|
1869
|
+
declare type HitsCSSClasses = Partial<HitsClassNames>;
|
|
1880
1870
|
|
|
1881
1871
|
declare type HitSnippetResult = {
|
|
1882
1872
|
[attribute: string]: HitAttributeSnippetResult[] | HitSnippetResult[] | HitAttributeSnippetResult | HitSnippetResult;
|
|
@@ -3427,12 +3417,6 @@ declare type PlacesInstance = Places.PlacesInstance;
|
|
|
3427
3417
|
|
|
3428
3418
|
declare type PlacesWidget = WidgetFactory<PlacesWidgetDescription, PlacesWidgetParams, PlacesWidgetParams>;
|
|
3429
3419
|
|
|
3430
|
-
/**
|
|
3431
|
-
* This widget sets the geolocation value for the search based on the selected
|
|
3432
|
-
* result in the Algolia Places autocomplete.
|
|
3433
|
-
*/
|
|
3434
|
-
declare const placesWidget: PlacesWidget;
|
|
3435
|
-
|
|
3436
3420
|
declare type PlacesWidgetDescription = {
|
|
3437
3421
|
$$type: 'ais.places';
|
|
3438
3422
|
$$widgetType: 'ais.places';
|
|
@@ -5559,7 +5543,7 @@ declare namespace widgets {
|
|
|
5559
5543
|
numericMenu,
|
|
5560
5544
|
pagination,
|
|
5561
5545
|
panel,
|
|
5562
|
-
|
|
5546
|
+
_default as places,
|
|
5563
5547
|
poweredBy,
|
|
5564
5548
|
queryRuleContext,
|
|
5565
5549
|
queryRuleCustomData,
|
|
@@ -5,8 +5,9 @@ import type { AlgoliaSearchHelper } from 'algoliasearch-helper';
|
|
|
5
5
|
import EventEmitter from '@algolia/events';
|
|
6
6
|
import { FindAnswersOptions } from 'algoliasearch-helper/types/algoliasearch.js';
|
|
7
7
|
import { h } from 'preact';
|
|
8
|
-
import type { HighlightClassNames as HighlightClassNames_2 } from '
|
|
9
|
-
import type { HighlightProps as HighlightProps_3 } from '
|
|
8
|
+
import type { HighlightClassNames as HighlightClassNames_2 } from 'instantsearch-ui-components';
|
|
9
|
+
import type { HighlightProps as HighlightProps_3 } from 'instantsearch-ui-components';
|
|
10
|
+
import type { HitsClassNames } from 'instantsearch-ui-components';
|
|
10
11
|
import type { HoganOptions } from 'hogan.js';
|
|
11
12
|
import type { html } from 'htm/preact';
|
|
12
13
|
import type { InsightsClient as InsightsClient_2 } from 'search-insights';
|
|
@@ -267,6 +268,10 @@ declare type AutocompleteRenderState = {
|
|
|
267
268
|
* The name of the index
|
|
268
269
|
*/
|
|
269
270
|
indexName: string;
|
|
271
|
+
/**
|
|
272
|
+
* The id of the index
|
|
273
|
+
*/
|
|
274
|
+
indexId: string;
|
|
270
275
|
/**
|
|
271
276
|
* The resolved hits from the index matching the query.
|
|
272
277
|
*/
|
|
@@ -1107,6 +1112,8 @@ declare type CustomSendEventForHits = (customPayload: any) => void;
|
|
|
1107
1112
|
|
|
1108
1113
|
declare type CustomSendEventForToggle = (customPayload: any) => void;
|
|
1109
1114
|
|
|
1115
|
+
declare const _default: PlacesWidget;
|
|
1116
|
+
|
|
1110
1117
|
declare type DisposeOptions = {
|
|
1111
1118
|
helper: AlgoliaSearchHelper;
|
|
1112
1119
|
state: SearchParameters;
|
|
@@ -1859,24 +1866,7 @@ declare type HitsConnectorParams<THit extends BaseHit = BaseHit> = {
|
|
|
1859
1866
|
transformItems?: TransformItems<Hit<THit>>;
|
|
1860
1867
|
};
|
|
1861
1868
|
|
|
1862
|
-
declare type HitsCSSClasses = Partial<
|
|
1863
|
-
/**
|
|
1864
|
-
* CSS class to add to the wrapping element.
|
|
1865
|
-
*/
|
|
1866
|
-
root: string | string[];
|
|
1867
|
-
/**
|
|
1868
|
-
* CSS class to add to the wrapping element when no results.
|
|
1869
|
-
*/
|
|
1870
|
-
emptyRoot: string | string[];
|
|
1871
|
-
/**
|
|
1872
|
-
* CSS class to add to the list of results.
|
|
1873
|
-
*/
|
|
1874
|
-
list: string | string[];
|
|
1875
|
-
/**
|
|
1876
|
-
* CSS class to add to each result.
|
|
1877
|
-
*/
|
|
1878
|
-
item: string | string[];
|
|
1879
|
-
}>;
|
|
1869
|
+
declare type HitsCSSClasses = Partial<HitsClassNames>;
|
|
1880
1870
|
|
|
1881
1871
|
declare type HitSnippetResult = {
|
|
1882
1872
|
[attribute: string]: HitAttributeSnippetResult[] | HitSnippetResult[] | HitAttributeSnippetResult | HitSnippetResult;
|
|
@@ -3427,12 +3417,6 @@ declare type PlacesInstance = Places.PlacesInstance;
|
|
|
3427
3417
|
|
|
3428
3418
|
declare type PlacesWidget = WidgetFactory<PlacesWidgetDescription, PlacesWidgetParams, PlacesWidgetParams>;
|
|
3429
3419
|
|
|
3430
|
-
/**
|
|
3431
|
-
* This widget sets the geolocation value for the search based on the selected
|
|
3432
|
-
* result in the Algolia Places autocomplete.
|
|
3433
|
-
*/
|
|
3434
|
-
declare const placesWidget: PlacesWidget;
|
|
3435
|
-
|
|
3436
3420
|
declare type PlacesWidgetDescription = {
|
|
3437
3421
|
$$type: 'ais.places';
|
|
3438
3422
|
$$widgetType: 'ais.places';
|
|
@@ -5559,7 +5543,7 @@ declare namespace widgets {
|
|
|
5559
5543
|
numericMenu,
|
|
5560
5544
|
pagination,
|
|
5561
5545
|
panel,
|
|
5562
|
-
|
|
5546
|
+
_default as places,
|
|
5563
5547
|
poweredBy,
|
|
5564
5548
|
queryRuleContext,
|
|
5565
5549
|
queryRuleCustomData,
|