instantsearch.js 4.33.0 → 4.35.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/CHANGELOG.md +41 -0
- package/README.md +24 -1
- package/cjs/connectors/autocomplete/connectAutocomplete.js +2 -1
- package/cjs/connectors/infinite-hits/connectInfiniteHits.js +1 -1
- package/cjs/connectors/numeric-menu/connectNumericMenu.js +6 -4
- package/cjs/connectors/pagination/connectPagination.js +3 -3
- package/cjs/connectors/search-box/connectSearchBox.js +4 -3
- package/cjs/connectors/sort-by/connectSortBy.js +2 -1
- package/cjs/connectors/stats/connectStats.js +4 -4
- package/cjs/connectors/toggle-refinement/connectToggleRefinement.js +1 -1
- package/cjs/lib/InstantSearch.js +23 -2
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/index/index.js +21 -3
- package/dist/instantsearch.development.d.ts +9 -2
- package/dist/instantsearch.development.js +72 -28
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.development.min.d.ts +9 -2
- package/dist/instantsearch.production.d.ts +9 -2
- package/dist/instantsearch.production.min.d.ts +9 -2
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/connectors/autocomplete/connectAutocomplete.js +2 -1
- package/es/connectors/infinite-hits/connectInfiniteHits.js +1 -1
- package/es/connectors/numeric-menu/connectNumericMenu.js +6 -4
- package/es/connectors/pagination/connectPagination.js +3 -3
- package/es/connectors/search-box/connectSearchBox.js +4 -3
- package/es/connectors/sort-by/connectSortBy.js +2 -1
- package/es/connectors/stats/connectStats.js +4 -4
- package/es/connectors/toggle-refinement/connectToggleRefinement.js +1 -1
- package/es/lib/InstantSearch.d.ts +3 -3
- package/es/lib/InstantSearch.js +23 -2
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/types/results.d.ts +7 -0
- package/es/widgets/index/index.js +21 -3
- package/package.json +10 -7
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
2
|
|
|
4
3
|
import type algoliasearch from 'algoliasearch/lite';
|
|
5
4
|
import type { AlgoliaSearchHelper } from 'algoliasearch-helper';
|
|
6
5
|
import type * as ClientSearch from '@algolia/client-search';
|
|
7
|
-
import EventEmitter from 'events';
|
|
6
|
+
import EventEmitter from '@algolia/events';
|
|
8
7
|
import type { InsightsClient as InsightsClient_2 } from 'search-insights';
|
|
9
8
|
import type { InsightsMethodMap } from 'search-insights';
|
|
10
9
|
import type * as Places from 'places.js';
|
|
@@ -2194,6 +2193,13 @@ declare type InfiniteHitsWidgetParams = {
|
|
|
2194
2193
|
cache?: InfiniteHitsCache;
|
|
2195
2194
|
};
|
|
2196
2195
|
|
|
2196
|
+
declare type InitialResult = {
|
|
2197
|
+
state: PlainSearchParameters;
|
|
2198
|
+
results: SearchResults['_rawResults'];
|
|
2199
|
+
};
|
|
2200
|
+
|
|
2201
|
+
declare type InitialResults = Record<string, InitialResult>;
|
|
2202
|
+
|
|
2197
2203
|
declare type InitOptions = SharedRenderOptions & {
|
|
2198
2204
|
uiState: UiState;
|
|
2199
2205
|
results?: undefined;
|
|
@@ -2258,6 +2264,7 @@ declare class InstantSearch<TUiState extends UiState = UiState, TRouteState = TU
|
|
|
2258
2264
|
_searchStalledTimer: any;
|
|
2259
2265
|
_isSearchStalled: boolean;
|
|
2260
2266
|
_initialUiState: UiState;
|
|
2267
|
+
_initialResults: InitialResults | null;
|
|
2261
2268
|
_createURL: CreateURL<UiState>;
|
|
2262
2269
|
_searchFunction?: InstantSearchOptions['searchFunction'];
|
|
2263
2270
|
_mainHelperSearch?: AlgoliaSearchHelper['search'];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
2
|
|
|
4
3
|
import type algoliasearch from 'algoliasearch/lite';
|
|
5
4
|
import type { AlgoliaSearchHelper } from 'algoliasearch-helper';
|
|
6
5
|
import type * as ClientSearch from '@algolia/client-search';
|
|
7
|
-
import EventEmitter from 'events';
|
|
6
|
+
import EventEmitter from '@algolia/events';
|
|
8
7
|
import type { InsightsClient as InsightsClient_2 } from 'search-insights';
|
|
9
8
|
import type { InsightsMethodMap } from 'search-insights';
|
|
10
9
|
import type * as Places from 'places.js';
|
|
@@ -2194,6 +2193,13 @@ declare type InfiniteHitsWidgetParams = {
|
|
|
2194
2193
|
cache?: InfiniteHitsCache;
|
|
2195
2194
|
};
|
|
2196
2195
|
|
|
2196
|
+
declare type InitialResult = {
|
|
2197
|
+
state: PlainSearchParameters;
|
|
2198
|
+
results: SearchResults['_rawResults'];
|
|
2199
|
+
};
|
|
2200
|
+
|
|
2201
|
+
declare type InitialResults = Record<string, InitialResult>;
|
|
2202
|
+
|
|
2197
2203
|
declare type InitOptions = SharedRenderOptions & {
|
|
2198
2204
|
uiState: UiState;
|
|
2199
2205
|
results?: undefined;
|
|
@@ -2258,6 +2264,7 @@ declare class InstantSearch<TUiState extends UiState = UiState, TRouteState = TU
|
|
|
2258
2264
|
_searchStalledTimer: any;
|
|
2259
2265
|
_isSearchStalled: boolean;
|
|
2260
2266
|
_initialUiState: UiState;
|
|
2267
|
+
_initialResults: InitialResults | null;
|
|
2261
2268
|
_createURL: CreateURL<UiState>;
|
|
2262
2269
|
_searchFunction?: InstantSearchOptions['searchFunction'];
|
|
2263
2270
|
_mainHelperSearch?: AlgoliaSearchHelper['search'];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
2
|
|
|
4
3
|
import type algoliasearch from 'algoliasearch/lite';
|
|
5
4
|
import type { AlgoliaSearchHelper } from 'algoliasearch-helper';
|
|
6
5
|
import type * as ClientSearch from '@algolia/client-search';
|
|
7
|
-
import EventEmitter from 'events';
|
|
6
|
+
import EventEmitter from '@algolia/events';
|
|
8
7
|
import type { InsightsClient as InsightsClient_2 } from 'search-insights';
|
|
9
8
|
import type { InsightsMethodMap } from 'search-insights';
|
|
10
9
|
import type * as Places from 'places.js';
|
|
@@ -2194,6 +2193,13 @@ declare type InfiniteHitsWidgetParams = {
|
|
|
2194
2193
|
cache?: InfiniteHitsCache;
|
|
2195
2194
|
};
|
|
2196
2195
|
|
|
2196
|
+
declare type InitialResult = {
|
|
2197
|
+
state: PlainSearchParameters;
|
|
2198
|
+
results: SearchResults['_rawResults'];
|
|
2199
|
+
};
|
|
2200
|
+
|
|
2201
|
+
declare type InitialResults = Record<string, InitialResult>;
|
|
2202
|
+
|
|
2197
2203
|
declare type InitOptions = SharedRenderOptions & {
|
|
2198
2204
|
uiState: UiState;
|
|
2199
2205
|
results?: undefined;
|
|
@@ -2258,6 +2264,7 @@ declare class InstantSearch<TUiState extends UiState = UiState, TRouteState = TU
|
|
|
2258
2264
|
_searchStalledTimer: any;
|
|
2259
2265
|
_isSearchStalled: boolean;
|
|
2260
2266
|
_initialUiState: UiState;
|
|
2267
|
+
_initialResults: InitialResults | null;
|
|
2261
2268
|
_createURL: CreateURL<UiState>;
|
|
2262
2269
|
_searchFunction?: InstantSearchOptions['searchFunction'];
|
|
2263
2270
|
_mainHelperSearch?: AlgoliaSearchHelper['search'];
|