instantsearch.js 4.72.1 → 4.73.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/README.md +0 -1
- package/cjs/components/InfiniteHits/InfiniteHits.js +62 -19
- package/cjs/components/Template/Template.js +1 -1
- package/cjs/connectors/pagination/Paginator.js +2 -2
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/infinite-hits/infinite-hits.js +14 -3
- package/dist/instantsearch.development.d.ts +117 -1659
- package/dist/instantsearch.development.js +87 -29
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +117 -1659
- package/dist/instantsearch.production.min.d.ts +117 -1659
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/InfiniteHits/InfiniteHits.d.ts +4 -3
- package/es/components/InfiniteHits/InfiniteHits.js +62 -19
- package/es/components/Template/Template.js +1 -1
- package/es/connectors/frequently-bought-together/connectFrequentlyBoughtTogether.d.ts +7 -195
- package/es/connectors/geo-search/connectGeoSearch.d.ts +3 -3
- package/es/connectors/hits/connectHits.d.ts +2 -2
- package/es/connectors/hits/connectHitsWithInsights.d.ts +3 -75
- package/es/connectors/infinite-hits/connectInfiniteHits.d.ts +3 -3
- package/es/connectors/infinite-hits/connectInfiniteHitsWithInsights.d.ts +3 -75
- package/es/connectors/looking-similar/connectLookingSimilar.d.ts +7 -187
- package/es/connectors/pagination/Paginator.js +2 -2
- package/es/connectors/related-products/connectRelatedProducts.d.ts +7 -187
- package/es/connectors/trending-items/connectTrendingItems.d.ts +7 -192
- package/es/lib/insights/client.d.ts +1 -1
- package/es/lib/utils/createConcurrentSafePromise.d.ts +1 -1
- package/es/lib/utils/render-args.d.ts +2 -222
- package/es/lib/utils/typedObject.d.ts +1 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/widgets/frequently-bought-together/frequently-bought-together.d.ts +5 -115
- package/es/widgets/geo-search/createHTMLMarker.d.ts +0 -2
- package/es/widgets/geo-search/geo-search.d.ts +12 -96
- package/es/widgets/hits/defaultTemplates.d.ts +9 -9
- package/es/widgets/hits/hits.d.ts +2 -77
- package/es/widgets/infinite-hits/infinite-hits.d.ts +21 -79
- package/es/widgets/infinite-hits/infinite-hits.js +14 -3
- package/es/widgets/looking-similar/looking-similar.d.ts +5 -118
- package/es/widgets/related-products/related-products.d.ts +5 -115
- package/es/widgets/trending-items/trending-items.d.ts +7 -121
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Connector, TransformItems, Hit, BaseHit, Renderer, Unmounter } from '../../types';
|
|
1
|
+
import type { Connector, TransformItems, Hit, BaseHit, Renderer, Unmounter, UnknownWidgetParams } from '../../types';
|
|
2
2
|
import type { PlainSearchParameters, RecommendResultItem } from 'algoliasearch-helper';
|
|
3
3
|
export type TrendingItemsRenderState<THit extends NonNullable<object> = BaseHit> = {
|
|
4
4
|
/**
|
|
@@ -53,7 +53,7 @@ export type TrendingItemsWidgetDescription<THit extends NonNullable<object> = Ba
|
|
|
53
53
|
renderState: TrendingItemsRenderState<THit>;
|
|
54
54
|
};
|
|
55
55
|
export type TrendingItemsConnector<THit extends NonNullable<object> = BaseHit> = Connector<TrendingItemsWidgetDescription<THit>, TrendingItemsConnectorParams<THit>>;
|
|
56
|
-
declare const _default: <TWidgetParams extends
|
|
56
|
+
declare const _default: <TWidgetParams extends UnknownWidgetParams>(renderFn: Renderer<TrendingItemsRenderState, TWidgetParams & TrendingItemsConnectorParams>, unmountFn?: Unmounter) => <THit extends NonNullable<object> = BaseHit>(widgetParams: TWidgetParams & TrendingItemsConnectorParams<THit>) => {
|
|
57
57
|
dependsOn: "recommend";
|
|
58
58
|
$$type: "ais.trendingItems";
|
|
59
59
|
init(initOptions: import("../../types").InitOptions): void;
|
|
@@ -148,204 +148,19 @@ declare const _default: <TWidgetParams extends object>(renderFn: Renderer<Trendi
|
|
|
148
148
|
places?: import("../../types").WidgetRenderState<Record<string, unknown>, import("../../widgets/places/places").PlacesWidgetParams> | undefined;
|
|
149
149
|
};
|
|
150
150
|
getWidgetRenderState({ results }: import("../../types").InitOptions | import("../../types").RenderOptions | ({
|
|
151
|
-
|
|
152
|
-
* The matched recommendations from the Algolia API.
|
|
153
|
-
*/
|
|
154
|
-
instantSearchInstance: import("../../lib/InstantSearch").default<import("../../types").UiState, import("../../types").UiState>;
|
|
151
|
+
instantSearchInstance: import("../../types").InstantSearch;
|
|
155
152
|
parent: import("../../types").IndexWidget;
|
|
156
153
|
templatesConfig: Record<string, unknown>;
|
|
157
154
|
scopedResults: import("../../types").ScopedResult[];
|
|
158
155
|
state: import("algoliasearch-helper").SearchParameters;
|
|
159
|
-
renderState:
|
|
160
|
-
answers: import("../../types").WidgetRenderState<import("../answers/connectAnswers").AnswersRenderState, import("../answers/connectAnswers").AnswersConnectorParams>;
|
|
161
|
-
} & {
|
|
162
|
-
autocomplete: import("../../types").WidgetRenderState<import("../autocomplete/connectAutocomplete").AutocompleteRenderState, import("../autocomplete/connectAutocomplete").AutocompleteConnectorParams>;
|
|
163
|
-
} & {
|
|
164
|
-
breadcrumb: {
|
|
165
|
-
[rootAttribute: string]: import("../../types").WidgetRenderState<import("../breadcrumb/connectBreadcrumb").BreadcrumbRenderState, import("../breadcrumb/connectBreadcrumb").BreadcrumbConnectorParams>;
|
|
166
|
-
};
|
|
167
|
-
} & {
|
|
168
|
-
clearRefinements: import("../../types").WidgetRenderState<import("../clear-refinements/connectClearRefinements").ClearRefinementsRenderState, import("../clear-refinements/connectClearRefinements").ClearRefinementsConnectorParams>;
|
|
169
|
-
} & {
|
|
170
|
-
configure: import("../../types").WidgetRenderState<import("../configure/connectConfigure").ConfigureRenderState, import("../configure/connectConfigure").ConfigureConnectorParams>;
|
|
171
|
-
} & {
|
|
172
|
-
currentRefinements: import("../../types").WidgetRenderState<import("../current-refinements/connectCurrentRefinements").CurrentRefinementsRenderState, import("../current-refinements/connectCurrentRefinements").CurrentRefinementsConnectorParams>;
|
|
173
|
-
} & {
|
|
174
|
-
geoSearch: import("../../types").WidgetRenderState<import("../geo-search/connectGeoSearch").GeoSearchRenderState<import("../../types").GeoHit>, import("../geo-search/connectGeoSearch").GeoSearchConnectorParams<import("../../types").GeoHit>>;
|
|
175
|
-
} & {
|
|
176
|
-
hierarchicalMenu: {
|
|
177
|
-
[rootAttribute: string]: import("../../types").WidgetRenderState<import("../hierarchical-menu/connectHierarchicalMenu").HierarchicalMenuRenderState, import("../hierarchical-menu/connectHierarchicalMenu").HierarchicalMenuConnectorParams>;
|
|
178
|
-
};
|
|
179
|
-
} & {
|
|
180
|
-
hits: import("../../types").WidgetRenderState<import("../hits/connectHits").HitsRenderState<BaseHit>, import("../hits/connectHits").HitsConnectorParams<BaseHit>>;
|
|
181
|
-
} & {
|
|
182
|
-
hitsPerPage: import("../../types").WidgetRenderState<import("../hits-per-page/connectHitsPerPage").HitsPerPageRenderState, import("../hits-per-page/connectHitsPerPage").HitsPerPageConnectorParams>;
|
|
183
|
-
} & {
|
|
184
|
-
infiniteHits: import("../../types").WidgetRenderState<import("../infinite-hits/connectInfiniteHits").InfiniteHitsRenderState<BaseHit>, import("../infinite-hits/connectInfiniteHits").InfiniteHitsConnectorParams<BaseHit>>;
|
|
185
|
-
} & {
|
|
186
|
-
menu: {
|
|
187
|
-
[attribute: string]: import("../../types").WidgetRenderState<import("../menu/connectMenu").MenuRenderState, import("../menu/connectMenu").MenuConnectorParams>;
|
|
188
|
-
};
|
|
189
|
-
} & {
|
|
190
|
-
numericMenu: {
|
|
191
|
-
[attribute: string]: import("../../types").WidgetRenderState<import("../numeric-menu/connectNumericMenu").NumericMenuRenderState, import("../numeric-menu/connectNumericMenu").NumericMenuConnectorParams>;
|
|
192
|
-
};
|
|
193
|
-
} & {
|
|
194
|
-
pagination: import("../../types").WidgetRenderState<import("../pagination/connectPagination").PaginationRenderState, import("../pagination/connectPagination").PaginationConnectorParams>;
|
|
195
|
-
} & {
|
|
196
|
-
poweredBy: import("../../types").WidgetRenderState<import("../powered-by/connectPoweredBy").PoweredByRenderState, import("../powered-by/connectPoweredBy").PoweredByConnectorParams>;
|
|
197
|
-
} & {
|
|
198
|
-
queryRules: import("../../types").WidgetRenderState<import("../query-rules/connectQueryRules").QueryRulesRenderState, import("../query-rules/connectQueryRules").QueryRulesConnectorParams>;
|
|
199
|
-
} & {
|
|
200
|
-
range: {
|
|
201
|
-
[attribute: string]: import("../../types").WidgetRenderState<import("../range/connectRange").RangeRenderState, import("../range/connectRange").RangeConnectorParams>;
|
|
202
|
-
};
|
|
203
|
-
} & {
|
|
204
|
-
ratingMenu: {
|
|
205
|
-
[attribute: string]: import("../../types").WidgetRenderState<import("../rating-menu/connectRatingMenu").RatingMenuRenderState, import("../rating-menu/connectRatingMenu").RatingMenuConnectorParams>;
|
|
206
|
-
};
|
|
207
|
-
} & {
|
|
208
|
-
refinementList: {
|
|
209
|
-
[attribute: string]: import("../../types").WidgetRenderState<import("../refinement-list/connectRefinementList").RefinementListRenderState, import("../refinement-list/connectRefinementList").RefinementListConnectorParams>;
|
|
210
|
-
};
|
|
211
|
-
} & {
|
|
212
|
-
relevantSort: import("../../types").WidgetRenderState<import("../relevant-sort/connectRelevantSort").RelevantSortRenderState, import("../relevant-sort/connectRelevantSort").RelevantSortConnectorParams>;
|
|
213
|
-
} & {
|
|
214
|
-
searchBox: import("../../types").WidgetRenderState<import("../search-box/connectSearchBox").SearchBoxRenderState, import("../search-box/connectSearchBox").SearchBoxConnectorParams>;
|
|
215
|
-
} & {
|
|
216
|
-
sortBy: import("../../types").WidgetRenderState<import("../sort-by/connectSortBy").SortByRenderState, import("../sort-by/connectSortBy").SortByConnectorParams>;
|
|
217
|
-
} & {
|
|
218
|
-
stats: import("../../types").WidgetRenderState<import("../stats/connectStats").StatsRenderState, import("../stats/connectStats").StatsConnectorParams>;
|
|
219
|
-
} & {
|
|
220
|
-
toggleRefinement: {
|
|
221
|
-
[attribute: string]: import("../../types").WidgetRenderState<import("../toggle-refinement/connectToggleRefinement").ToggleRefinementRenderState, import("../toggle-refinement/connectToggleRefinement").ToggleRefinementConnectorParams>;
|
|
222
|
-
};
|
|
223
|
-
} & {
|
|
224
|
-
voiceSearch: import("../../types").WidgetRenderState<import("../voice-search/connectVoiceSearch").VoiceSearchRenderState, import("../voice-search/connectVoiceSearch").VoiceSearchConnectorParams>;
|
|
225
|
-
} & {
|
|
226
|
-
analytics: import("../../types").WidgetRenderState<Record<string, unknown>, import("../../widgets/analytics/analytics").AnalyticsWidgetParams>;
|
|
227
|
-
} & {
|
|
228
|
-
places: import("../../types").WidgetRenderState<Record<string, unknown>, import("../../widgets/places/places").PlacesWidgetParams>;
|
|
229
|
-
}>; /**
|
|
230
|
-
* The facet attribute to get recommendations for.
|
|
231
|
-
*/
|
|
156
|
+
renderState: import("../../types").IndexRenderState;
|
|
232
157
|
helper: import("algoliasearch-helper").AlgoliaSearchHelper;
|
|
233
158
|
searchMetadata: {
|
|
234
159
|
isSearchStalled: boolean;
|
|
235
160
|
};
|
|
236
|
-
status: import("../../types").
|
|
237
|
-
error:
|
|
238
|
-
createURL: (nextState: import("algoliasearch-helper").SearchParameters | ((state:
|
|
239
|
-
query: string;
|
|
240
|
-
} & {
|
|
241
|
-
configure: PlainSearchParameters;
|
|
242
|
-
} & {
|
|
243
|
-
geoSearch: {
|
|
244
|
-
boundingBox: string;
|
|
245
|
-
};
|
|
246
|
-
} & {
|
|
247
|
-
hierarchicalMenu: {
|
|
248
|
-
[rootAttribute: string]: string[];
|
|
249
|
-
};
|
|
250
|
-
} & {
|
|
251
|
-
hitsPerPage: number;
|
|
252
|
-
} & {
|
|
253
|
-
page: number;
|
|
254
|
-
} & {
|
|
255
|
-
menu: {
|
|
256
|
-
[attribute: string]: string;
|
|
257
|
-
};
|
|
258
|
-
} & {
|
|
259
|
-
numericMenu: {
|
|
260
|
-
[attribute: string]: string;
|
|
261
|
-
};
|
|
262
|
-
} & {
|
|
263
|
-
page: number;
|
|
264
|
-
} & {
|
|
265
|
-
range: {
|
|
266
|
-
[attribute: string]: string;
|
|
267
|
-
};
|
|
268
|
-
} & {
|
|
269
|
-
ratingMenu: {
|
|
270
|
-
[attribute: string]: number | undefined;
|
|
271
|
-
};
|
|
272
|
-
} & {
|
|
273
|
-
refinementList: {
|
|
274
|
-
[attribute: string]: string[];
|
|
275
|
-
};
|
|
276
|
-
} & {
|
|
277
|
-
relevantSort: number;
|
|
278
|
-
} & {
|
|
279
|
-
query: string;
|
|
280
|
-
} & {
|
|
281
|
-
sortBy: string;
|
|
282
|
-
} & {
|
|
283
|
-
toggle: {
|
|
284
|
-
[attribute: string]: boolean;
|
|
285
|
-
};
|
|
286
|
-
} & {
|
|
287
|
-
query: string;
|
|
288
|
-
} & {
|
|
289
|
-
places: {
|
|
290
|
-
query: string;
|
|
291
|
-
position: string;
|
|
292
|
-
};
|
|
293
|
-
}>) => Partial<{
|
|
294
|
-
query: string;
|
|
295
|
-
} & {
|
|
296
|
-
configure: PlainSearchParameters;
|
|
297
|
-
} & {
|
|
298
|
-
geoSearch: {
|
|
299
|
-
boundingBox: string;
|
|
300
|
-
};
|
|
301
|
-
} & {
|
|
302
|
-
hierarchicalMenu: {
|
|
303
|
-
[rootAttribute: string]: string[];
|
|
304
|
-
};
|
|
305
|
-
} & {
|
|
306
|
-
hitsPerPage: number;
|
|
307
|
-
} & {
|
|
308
|
-
page: number;
|
|
309
|
-
} & {
|
|
310
|
-
menu: {
|
|
311
|
-
[attribute: string]: string;
|
|
312
|
-
};
|
|
313
|
-
} & {
|
|
314
|
-
numericMenu: {
|
|
315
|
-
[attribute: string]: string;
|
|
316
|
-
};
|
|
317
|
-
} & {
|
|
318
|
-
page: number;
|
|
319
|
-
} & {
|
|
320
|
-
range: {
|
|
321
|
-
[attribute: string]: string;
|
|
322
|
-
};
|
|
323
|
-
} & {
|
|
324
|
-
ratingMenu: {
|
|
325
|
-
[attribute: string]: number | undefined;
|
|
326
|
-
};
|
|
327
|
-
} & {
|
|
328
|
-
refinementList: {
|
|
329
|
-
[attribute: string]: string[];
|
|
330
|
-
};
|
|
331
|
-
} & {
|
|
332
|
-
relevantSort: number;
|
|
333
|
-
} & {
|
|
334
|
-
query: string;
|
|
335
|
-
} & {
|
|
336
|
-
sortBy: string;
|
|
337
|
-
} & {
|
|
338
|
-
toggle: {
|
|
339
|
-
[attribute: string]: boolean;
|
|
340
|
-
};
|
|
341
|
-
} & {
|
|
342
|
-
query: string;
|
|
343
|
-
} & {
|
|
344
|
-
places: {
|
|
345
|
-
query: string;
|
|
346
|
-
position: string;
|
|
347
|
-
};
|
|
348
|
-
}>)) => string;
|
|
161
|
+
status: import("../../types").InstantSearch["status"];
|
|
162
|
+
error: import("../../types").InstantSearch["error"];
|
|
163
|
+
createURL: (nextState: import("algoliasearch-helper").SearchParameters | ((state: import("../../types").IndexUiState) => import("../../types").IndexUiState)) => string;
|
|
349
164
|
} & {
|
|
350
165
|
results: RecommendResultItem;
|
|
351
166
|
})): {
|
|
@@ -5,7 +5,7 @@ export declare const inferPayload: ({ method, results, hits, objectIDs, }: {
|
|
|
5
5
|
results: SearchResults;
|
|
6
6
|
hits: Hit[];
|
|
7
7
|
objectIDs: string[];
|
|
8
|
-
}) => Omit<InsightsClientPayload,
|
|
8
|
+
}) => Omit<InsightsClientPayload, "eventName">;
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated This function will be still supported in 4.x releases, but not further. It is replaced by the `insights` middleware. For more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/
|
|
11
11
|
* It passes `insights` to `HitsWithInsightsListener` and `InfiniteHitsWithInsightsListener`.
|
|
@@ -5,4 +5,4 @@ export type MaybePromise<TResolution> = Readonly<Promise<TResolution>> | Promise
|
|
|
5
5
|
* This is useful to prevent older promises to resolve after a newer promise,
|
|
6
6
|
* otherwise resulting in stale resolved values.
|
|
7
7
|
*/
|
|
8
|
-
export declare function createConcurrentSafePromise<TValue>(): (promise: MaybePromise<TValue>) => Promise<
|
|
8
|
+
export declare function createConcurrentSafePromise<TValue>(): (promise: MaybePromise<TValue>) => Promise<Awaited<TValue> | NonNullable<TValue>>;
|
|
@@ -7,117 +7,7 @@ export declare function createInitArgs(instantSearchInstance: InstantSearch, par
|
|
|
7
7
|
state: import("algoliasearch-helper").SearchParameters;
|
|
8
8
|
renderState: import("../../types").RenderState;
|
|
9
9
|
templatesConfig: Record<string, unknown>;
|
|
10
|
-
createURL: (nextState: import("algoliasearch-helper").SearchParameters | ((state:
|
|
11
|
-
query: string;
|
|
12
|
-
} & {
|
|
13
|
-
configure: import("algoliasearch-helper").PlainSearchParameters;
|
|
14
|
-
} & {
|
|
15
|
-
geoSearch: {
|
|
16
|
-
boundingBox: string;
|
|
17
|
-
};
|
|
18
|
-
} & {
|
|
19
|
-
hierarchicalMenu: {
|
|
20
|
-
[rootAttribute: string]: string[];
|
|
21
|
-
};
|
|
22
|
-
} & {
|
|
23
|
-
hitsPerPage: number;
|
|
24
|
-
} & {
|
|
25
|
-
page: number;
|
|
26
|
-
} & {
|
|
27
|
-
menu: {
|
|
28
|
-
[attribute: string]: string;
|
|
29
|
-
};
|
|
30
|
-
} & {
|
|
31
|
-
numericMenu: {
|
|
32
|
-
[attribute: string]: string;
|
|
33
|
-
};
|
|
34
|
-
} & {
|
|
35
|
-
page: number;
|
|
36
|
-
} & {
|
|
37
|
-
range: {
|
|
38
|
-
[attribute: string]: string;
|
|
39
|
-
};
|
|
40
|
-
} & {
|
|
41
|
-
ratingMenu: {
|
|
42
|
-
[attribute: string]: number | undefined;
|
|
43
|
-
};
|
|
44
|
-
} & {
|
|
45
|
-
refinementList: {
|
|
46
|
-
[attribute: string]: string[];
|
|
47
|
-
};
|
|
48
|
-
} & {
|
|
49
|
-
relevantSort: number;
|
|
50
|
-
} & {
|
|
51
|
-
query: string;
|
|
52
|
-
} & {
|
|
53
|
-
sortBy: string;
|
|
54
|
-
} & {
|
|
55
|
-
toggle: {
|
|
56
|
-
[attribute: string]: boolean;
|
|
57
|
-
};
|
|
58
|
-
} & {
|
|
59
|
-
query: string;
|
|
60
|
-
} & {
|
|
61
|
-
places: {
|
|
62
|
-
query: string;
|
|
63
|
-
position: string;
|
|
64
|
-
};
|
|
65
|
-
}>) => Partial<{
|
|
66
|
-
query: string;
|
|
67
|
-
} & {
|
|
68
|
-
configure: import("algoliasearch-helper").PlainSearchParameters;
|
|
69
|
-
} & {
|
|
70
|
-
geoSearch: {
|
|
71
|
-
boundingBox: string;
|
|
72
|
-
};
|
|
73
|
-
} & {
|
|
74
|
-
hierarchicalMenu: {
|
|
75
|
-
[rootAttribute: string]: string[];
|
|
76
|
-
};
|
|
77
|
-
} & {
|
|
78
|
-
hitsPerPage: number;
|
|
79
|
-
} & {
|
|
80
|
-
page: number;
|
|
81
|
-
} & {
|
|
82
|
-
menu: {
|
|
83
|
-
[attribute: string]: string;
|
|
84
|
-
};
|
|
85
|
-
} & {
|
|
86
|
-
numericMenu: {
|
|
87
|
-
[attribute: string]: string;
|
|
88
|
-
};
|
|
89
|
-
} & {
|
|
90
|
-
page: number;
|
|
91
|
-
} & {
|
|
92
|
-
range: {
|
|
93
|
-
[attribute: string]: string;
|
|
94
|
-
};
|
|
95
|
-
} & {
|
|
96
|
-
ratingMenu: {
|
|
97
|
-
[attribute: string]: number | undefined;
|
|
98
|
-
};
|
|
99
|
-
} & {
|
|
100
|
-
refinementList: {
|
|
101
|
-
[attribute: string]: string[];
|
|
102
|
-
};
|
|
103
|
-
} & {
|
|
104
|
-
relevantSort: number;
|
|
105
|
-
} & {
|
|
106
|
-
query: string;
|
|
107
|
-
} & {
|
|
108
|
-
sortBy: string;
|
|
109
|
-
} & {
|
|
110
|
-
toggle: {
|
|
111
|
-
[attribute: string]: boolean;
|
|
112
|
-
};
|
|
113
|
-
} & {
|
|
114
|
-
query: string;
|
|
115
|
-
} & {
|
|
116
|
-
places: {
|
|
117
|
-
query: string;
|
|
118
|
-
position: string;
|
|
119
|
-
};
|
|
120
|
-
}>)) => string;
|
|
10
|
+
createURL: (nextState: import("algoliasearch-helper").SearchParameters | ((state: import("../../types").IndexUiState) => import("../../types").IndexUiState)) => string;
|
|
121
11
|
scopedResults: never[];
|
|
122
12
|
searchMetadata: {
|
|
123
13
|
isSearchStalled: boolean;
|
|
@@ -134,117 +24,7 @@ export declare function createRenderArgs(instantSearchInstance: InstantSearch, p
|
|
|
134
24
|
state: import("algoliasearch-helper").SearchParameters;
|
|
135
25
|
renderState: import("../../types").RenderState;
|
|
136
26
|
templatesConfig: Record<string, unknown>;
|
|
137
|
-
createURL: (nextState: import("algoliasearch-helper").SearchParameters | ((state:
|
|
138
|
-
query: string;
|
|
139
|
-
} & {
|
|
140
|
-
configure: import("algoliasearch-helper").PlainSearchParameters;
|
|
141
|
-
} & {
|
|
142
|
-
geoSearch: {
|
|
143
|
-
boundingBox: string;
|
|
144
|
-
};
|
|
145
|
-
} & {
|
|
146
|
-
hierarchicalMenu: {
|
|
147
|
-
[rootAttribute: string]: string[];
|
|
148
|
-
};
|
|
149
|
-
} & {
|
|
150
|
-
hitsPerPage: number;
|
|
151
|
-
} & {
|
|
152
|
-
page: number;
|
|
153
|
-
} & {
|
|
154
|
-
menu: {
|
|
155
|
-
[attribute: string]: string;
|
|
156
|
-
};
|
|
157
|
-
} & {
|
|
158
|
-
numericMenu: {
|
|
159
|
-
[attribute: string]: string;
|
|
160
|
-
};
|
|
161
|
-
} & {
|
|
162
|
-
page: number;
|
|
163
|
-
} & {
|
|
164
|
-
range: {
|
|
165
|
-
[attribute: string]: string;
|
|
166
|
-
};
|
|
167
|
-
} & {
|
|
168
|
-
ratingMenu: {
|
|
169
|
-
[attribute: string]: number | undefined;
|
|
170
|
-
};
|
|
171
|
-
} & {
|
|
172
|
-
refinementList: {
|
|
173
|
-
[attribute: string]: string[];
|
|
174
|
-
};
|
|
175
|
-
} & {
|
|
176
|
-
relevantSort: number;
|
|
177
|
-
} & {
|
|
178
|
-
query: string;
|
|
179
|
-
} & {
|
|
180
|
-
sortBy: string;
|
|
181
|
-
} & {
|
|
182
|
-
toggle: {
|
|
183
|
-
[attribute: string]: boolean;
|
|
184
|
-
};
|
|
185
|
-
} & {
|
|
186
|
-
query: string;
|
|
187
|
-
} & {
|
|
188
|
-
places: {
|
|
189
|
-
query: string;
|
|
190
|
-
position: string;
|
|
191
|
-
};
|
|
192
|
-
}>) => Partial<{
|
|
193
|
-
query: string;
|
|
194
|
-
} & {
|
|
195
|
-
configure: import("algoliasearch-helper").PlainSearchParameters;
|
|
196
|
-
} & {
|
|
197
|
-
geoSearch: {
|
|
198
|
-
boundingBox: string;
|
|
199
|
-
};
|
|
200
|
-
} & {
|
|
201
|
-
hierarchicalMenu: {
|
|
202
|
-
[rootAttribute: string]: string[];
|
|
203
|
-
};
|
|
204
|
-
} & {
|
|
205
|
-
hitsPerPage: number;
|
|
206
|
-
} & {
|
|
207
|
-
page: number;
|
|
208
|
-
} & {
|
|
209
|
-
menu: {
|
|
210
|
-
[attribute: string]: string;
|
|
211
|
-
};
|
|
212
|
-
} & {
|
|
213
|
-
numericMenu: {
|
|
214
|
-
[attribute: string]: string;
|
|
215
|
-
};
|
|
216
|
-
} & {
|
|
217
|
-
page: number;
|
|
218
|
-
} & {
|
|
219
|
-
range: {
|
|
220
|
-
[attribute: string]: string;
|
|
221
|
-
};
|
|
222
|
-
} & {
|
|
223
|
-
ratingMenu: {
|
|
224
|
-
[attribute: string]: number | undefined;
|
|
225
|
-
};
|
|
226
|
-
} & {
|
|
227
|
-
refinementList: {
|
|
228
|
-
[attribute: string]: string[];
|
|
229
|
-
};
|
|
230
|
-
} & {
|
|
231
|
-
relevantSort: number;
|
|
232
|
-
} & {
|
|
233
|
-
query: string;
|
|
234
|
-
} & {
|
|
235
|
-
sortBy: string;
|
|
236
|
-
} & {
|
|
237
|
-
toggle: {
|
|
238
|
-
[attribute: string]: boolean;
|
|
239
|
-
};
|
|
240
|
-
} & {
|
|
241
|
-
query: string;
|
|
242
|
-
} & {
|
|
243
|
-
places: {
|
|
244
|
-
query: string;
|
|
245
|
-
position: string;
|
|
246
|
-
};
|
|
247
|
-
}>)) => string;
|
|
27
|
+
createURL: (nextState: import("algoliasearch-helper").SearchParameters | ((state: import("../../types").IndexUiState) => import("../../types").IndexUiState)) => string;
|
|
248
28
|
searchMetadata: {
|
|
249
29
|
isSearchStalled: boolean;
|
|
250
30
|
};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* A typed version of Object.keys, to use when looping over a static object
|
|
3
3
|
* inspired from https://stackoverflow.com/a/65117465/3185307
|
|
4
4
|
*/
|
|
5
|
-
export declare const keys: <TObject extends Record<string, unknown>>(yourObject: TObject) =>
|
|
5
|
+
export declare const keys: <TObject extends Record<string, unknown>>(yourObject: TObject) => Array<keyof TObject>;
|
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.
|
|
1
|
+
declare const _default: "4.73.0";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.
|
|
1
|
+
export default '4.73.0';
|
|
@@ -37,7 +37,7 @@ type FrequentlyBoughtTogetherWidgetParams<THit extends NonNullable<object> = Bas
|
|
|
37
37
|
export type FrequentlyBoughtTogetherWidget = WidgetFactory<FrequentlyBoughtTogetherWidgetDescription & {
|
|
38
38
|
$$widgetType: 'ais.frequentlyBoughtTogether';
|
|
39
39
|
}, FrequentlyBoughtTogetherConnectorParams, FrequentlyBoughtTogetherWidgetParams>;
|
|
40
|
-
declare const _default: <THit extends object = BaseHit>(widgetParams: FrequentlyBoughtTogetherWidgetParams<THit> & FrequentlyBoughtTogetherConnectorParams<THit>) => {
|
|
40
|
+
declare const _default: <THit extends NonNullable<object> = BaseHit>(widgetParams: FrequentlyBoughtTogetherWidgetParams<THit> & FrequentlyBoughtTogetherConnectorParams<THit>) => {
|
|
41
41
|
$$widgetType: "ais.frequentlyBoughtTogether";
|
|
42
42
|
dependsOn: "recommend";
|
|
43
43
|
$$type: "ais.frequentlyBoughtTogether";
|
|
@@ -133,7 +133,7 @@ declare const _default: <THit extends object = BaseHit>(widgetParams: Frequently
|
|
|
133
133
|
places?: import("../../types").WidgetRenderState<Record<string, unknown>, import("../places/places").PlacesWidgetParams> | undefined;
|
|
134
134
|
};
|
|
135
135
|
getWidgetRenderState({ results }: import("../../types").InitOptions | import("../../types").RenderOptions | ({
|
|
136
|
-
instantSearchInstance: import("../../
|
|
136
|
+
instantSearchInstance: import("../../types").InstantSearch;
|
|
137
137
|
parent: import("../index").IndexWidget;
|
|
138
138
|
templatesConfig: Record<string, unknown>;
|
|
139
139
|
scopedResults: import("../../types").ScopedResult[];
|
|
@@ -213,119 +213,9 @@ declare const _default: <THit extends object = BaseHit>(widgetParams: Frequently
|
|
|
213
213
|
searchMetadata: {
|
|
214
214
|
isSearchStalled: boolean;
|
|
215
215
|
};
|
|
216
|
-
status: import("../../types").
|
|
217
|
-
error:
|
|
218
|
-
createURL: (nextState: import("algoliasearch-helper").SearchParameters | ((state:
|
|
219
|
-
query: string;
|
|
220
|
-
} & {
|
|
221
|
-
configure: import("algoliasearch-helper").PlainSearchParameters;
|
|
222
|
-
} & {
|
|
223
|
-
geoSearch: {
|
|
224
|
-
boundingBox: string;
|
|
225
|
-
};
|
|
226
|
-
} & {
|
|
227
|
-
hierarchicalMenu: {
|
|
228
|
-
[rootAttribute: string]: string[];
|
|
229
|
-
};
|
|
230
|
-
} & {
|
|
231
|
-
hitsPerPage: number;
|
|
232
|
-
} & {
|
|
233
|
-
page: number;
|
|
234
|
-
} & {
|
|
235
|
-
menu: {
|
|
236
|
-
[attribute: string]: string;
|
|
237
|
-
};
|
|
238
|
-
} & {
|
|
239
|
-
numericMenu: {
|
|
240
|
-
[attribute: string]: string;
|
|
241
|
-
};
|
|
242
|
-
} & {
|
|
243
|
-
page: number;
|
|
244
|
-
} & {
|
|
245
|
-
range: {
|
|
246
|
-
[attribute: string]: string;
|
|
247
|
-
};
|
|
248
|
-
} & {
|
|
249
|
-
ratingMenu: {
|
|
250
|
-
[attribute: string]: number | undefined;
|
|
251
|
-
};
|
|
252
|
-
} & {
|
|
253
|
-
refinementList: {
|
|
254
|
-
[attribute: string]: string[];
|
|
255
|
-
};
|
|
256
|
-
} & {
|
|
257
|
-
relevantSort: number;
|
|
258
|
-
} & {
|
|
259
|
-
query: string;
|
|
260
|
-
} & {
|
|
261
|
-
sortBy: string;
|
|
262
|
-
} & {
|
|
263
|
-
toggle: {
|
|
264
|
-
[attribute: string]: boolean;
|
|
265
|
-
};
|
|
266
|
-
} & {
|
|
267
|
-
query: string;
|
|
268
|
-
} & {
|
|
269
|
-
places: {
|
|
270
|
-
query: string;
|
|
271
|
-
position: string;
|
|
272
|
-
};
|
|
273
|
-
}>) => Partial<{
|
|
274
|
-
query: string;
|
|
275
|
-
} & {
|
|
276
|
-
configure: import("algoliasearch-helper").PlainSearchParameters;
|
|
277
|
-
} & {
|
|
278
|
-
geoSearch: {
|
|
279
|
-
boundingBox: string;
|
|
280
|
-
};
|
|
281
|
-
} & {
|
|
282
|
-
hierarchicalMenu: {
|
|
283
|
-
[rootAttribute: string]: string[];
|
|
284
|
-
};
|
|
285
|
-
} & {
|
|
286
|
-
hitsPerPage: number;
|
|
287
|
-
} & {
|
|
288
|
-
page: number;
|
|
289
|
-
} & {
|
|
290
|
-
menu: {
|
|
291
|
-
[attribute: string]: string;
|
|
292
|
-
};
|
|
293
|
-
} & {
|
|
294
|
-
numericMenu: {
|
|
295
|
-
[attribute: string]: string;
|
|
296
|
-
};
|
|
297
|
-
} & {
|
|
298
|
-
page: number;
|
|
299
|
-
} & {
|
|
300
|
-
range: {
|
|
301
|
-
[attribute: string]: string;
|
|
302
|
-
};
|
|
303
|
-
} & {
|
|
304
|
-
ratingMenu: {
|
|
305
|
-
[attribute: string]: number | undefined;
|
|
306
|
-
};
|
|
307
|
-
} & {
|
|
308
|
-
refinementList: {
|
|
309
|
-
[attribute: string]: string[];
|
|
310
|
-
};
|
|
311
|
-
} & {
|
|
312
|
-
relevantSort: number;
|
|
313
|
-
} & {
|
|
314
|
-
query: string;
|
|
315
|
-
} & {
|
|
316
|
-
sortBy: string;
|
|
317
|
-
} & {
|
|
318
|
-
toggle: {
|
|
319
|
-
[attribute: string]: boolean;
|
|
320
|
-
};
|
|
321
|
-
} & {
|
|
322
|
-
query: string;
|
|
323
|
-
} & {
|
|
324
|
-
places: {
|
|
325
|
-
query: string;
|
|
326
|
-
position: string;
|
|
327
|
-
};
|
|
328
|
-
}>)) => string;
|
|
216
|
+
status: import("../../types").InstantSearch["status"];
|
|
217
|
+
error: import("../../types").InstantSearch["error"];
|
|
218
|
+
createURL: (nextState: import("algoliasearch-helper").SearchParameters | ((state: import("../../types").IndexUiState) => import("../../types").IndexUiState)) => string;
|
|
329
219
|
} & {
|
|
330
220
|
results: RecommendResultItem;
|
|
331
221
|
})): {
|