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
|
@@ -37,7 +37,7 @@ type RelatedProductsWidgetParams<THit extends NonNullable<object> = BaseHit> = {
|
|
|
37
37
|
export type RelatedProductsWidget = WidgetFactory<RelatedProductsWidgetDescription & {
|
|
38
38
|
$$widgetType: 'ais.relatedProducts';
|
|
39
39
|
}, RelatedProductsConnectorParams, RelatedProductsWidgetParams>;
|
|
40
|
-
declare const _default: <THit extends object = BaseHit>(widgetParams: RelatedProductsWidgetParams<THit> & RelatedProductsConnectorParams<THit>) => {
|
|
40
|
+
declare const _default: <THit extends NonNullable<object> = BaseHit>(widgetParams: RelatedProductsWidgetParams<THit> & RelatedProductsConnectorParams<THit>) => {
|
|
41
41
|
$$widgetType: "ais.relatedProducts";
|
|
42
42
|
dependsOn: "recommend";
|
|
43
43
|
$$type: "ais.relatedProducts";
|
|
@@ -133,7 +133,7 @@ declare const _default: <THit extends object = BaseHit>(widgetParams: RelatedPro
|
|
|
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: RelatedPro
|
|
|
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
|
})): {
|
|
@@ -37,7 +37,7 @@ type TrendingItemsWidgetParams<THit extends NonNullable<object> = BaseHit> = {
|
|
|
37
37
|
export type TrendingItemsWidget = WidgetFactory<TrendingItemsWidgetDescription & {
|
|
38
38
|
$$widgetType: 'ais.trendingItems';
|
|
39
39
|
}, TrendingItemsConnectorParams, TrendingItemsWidgetParams>;
|
|
40
|
-
declare const _default: <THit extends object = BaseHit>(widgetParams: TrendingItemsWidgetParams<THit> & TrendingItemsConnectorParams<THit>) => {
|
|
40
|
+
declare const _default: <THit extends NonNullable<object> = BaseHit>(widgetParams: TrendingItemsWidgetParams<THit> & TrendingItemsConnectorParams<THit>) => {
|
|
41
41
|
$$widgetType: "ais.trendingItems";
|
|
42
42
|
dependsOn: "recommend";
|
|
43
43
|
$$type: "ais.trendingItems";
|
|
@@ -133,7 +133,7 @@ declare const _default: <THit extends object = BaseHit>(widgetParams: TrendingIt
|
|
|
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[];
|
|
@@ -201,9 +201,7 @@ declare const _default: <THit extends object = BaseHit>(widgetParams: TrendingIt
|
|
|
201
201
|
} & {
|
|
202
202
|
toggleRefinement: {
|
|
203
203
|
[attribute: string]: import("../../types").WidgetRenderState<import("../../connectors/toggle-refinement/connectToggleRefinement").ToggleRefinementRenderState, import("../../connectors/toggle-refinement/connectToggleRefinement").ToggleRefinementConnectorParams>;
|
|
204
|
-
};
|
|
205
|
-
* Template to use when there are no results.
|
|
206
|
-
*/
|
|
204
|
+
};
|
|
207
205
|
} & {
|
|
208
206
|
voiceSearch: import("../../types").WidgetRenderState<import("../../connectors/voice-search/connectVoiceSearch").VoiceSearchRenderState, import("../../connectors/voice-search/connectVoiceSearch").VoiceSearchConnectorParams>;
|
|
209
207
|
} & {
|
|
@@ -215,126 +213,14 @@ declare const _default: <THit extends object = BaseHit>(widgetParams: TrendingIt
|
|
|
215
213
|
searchMetadata: {
|
|
216
214
|
isSearchStalled: boolean;
|
|
217
215
|
};
|
|
218
|
-
status: import("../../types").
|
|
219
|
-
error:
|
|
220
|
-
createURL: (nextState: import("algoliasearch-helper").SearchParameters | ((state:
|
|
221
|
-
query: string;
|
|
222
|
-
} & {
|
|
223
|
-
configure: import("algoliasearch-helper").PlainSearchParameters;
|
|
224
|
-
} & {
|
|
225
|
-
geoSearch: {
|
|
226
|
-
boundingBox: string;
|
|
227
|
-
};
|
|
228
|
-
} & {
|
|
229
|
-
hierarchicalMenu: {
|
|
230
|
-
[rootAttribute: string]: string[];
|
|
231
|
-
};
|
|
232
|
-
} & {
|
|
233
|
-
hitsPerPage: number;
|
|
234
|
-
} & {
|
|
235
|
-
page: number;
|
|
236
|
-
} & {
|
|
237
|
-
menu: {
|
|
238
|
-
[attribute: string]: string;
|
|
239
|
-
};
|
|
240
|
-
} & {
|
|
241
|
-
numericMenu: {
|
|
242
|
-
[attribute: string]: string;
|
|
243
|
-
};
|
|
244
|
-
} & {
|
|
245
|
-
page: number;
|
|
246
|
-
} & {
|
|
247
|
-
range: {
|
|
248
|
-
[attribute: string]: string;
|
|
249
|
-
};
|
|
250
|
-
} & {
|
|
251
|
-
ratingMenu: {
|
|
252
|
-
[attribute: string]: number | undefined;
|
|
253
|
-
};
|
|
254
|
-
} & {
|
|
255
|
-
refinementList: {
|
|
256
|
-
[attribute: string]: string[];
|
|
257
|
-
};
|
|
258
|
-
} & {
|
|
259
|
-
relevantSort: number;
|
|
260
|
-
} & {
|
|
261
|
-
query: string;
|
|
262
|
-
} & {
|
|
263
|
-
sortBy: string;
|
|
264
|
-
} & {
|
|
265
|
-
toggle: {
|
|
266
|
-
[attribute: string]: boolean;
|
|
267
|
-
};
|
|
268
|
-
} & {
|
|
269
|
-
query: string;
|
|
270
|
-
} & {
|
|
271
|
-
places: {
|
|
272
|
-
query: string;
|
|
273
|
-
position: string;
|
|
274
|
-
};
|
|
275
|
-
}>) => Partial<{
|
|
276
|
-
query: string;
|
|
277
|
-
} & {
|
|
278
|
-
configure: import("algoliasearch-helper").PlainSearchParameters;
|
|
279
|
-
} & {
|
|
280
|
-
geoSearch: {
|
|
281
|
-
boundingBox: string;
|
|
282
|
-
};
|
|
283
|
-
} & {
|
|
284
|
-
hierarchicalMenu: {
|
|
285
|
-
[rootAttribute: string]: string[];
|
|
286
|
-
};
|
|
287
|
-
} & {
|
|
288
|
-
hitsPerPage: number;
|
|
289
|
-
} & {
|
|
290
|
-
page: number;
|
|
291
|
-
} & {
|
|
292
|
-
menu: {
|
|
293
|
-
[attribute: string]: string;
|
|
294
|
-
};
|
|
295
|
-
} & {
|
|
296
|
-
numericMenu: {
|
|
297
|
-
[attribute: string]: string;
|
|
298
|
-
};
|
|
299
|
-
} & {
|
|
300
|
-
page: number;
|
|
301
|
-
} & {
|
|
302
|
-
range: {
|
|
303
|
-
[attribute: string]: string;
|
|
304
|
-
};
|
|
305
|
-
} & {
|
|
306
|
-
ratingMenu: {
|
|
307
|
-
[attribute: string]: number | undefined;
|
|
308
|
-
};
|
|
309
|
-
} & {
|
|
310
|
-
refinementList: {
|
|
311
|
-
[attribute: string]: string[];
|
|
312
|
-
};
|
|
313
|
-
} & {
|
|
314
|
-
relevantSort: number;
|
|
315
|
-
} & {
|
|
316
|
-
query: string;
|
|
317
|
-
} & {
|
|
318
|
-
sortBy: string;
|
|
319
|
-
} & {
|
|
320
|
-
toggle: {
|
|
321
|
-
[attribute: string]: boolean;
|
|
322
|
-
};
|
|
323
|
-
} & {
|
|
324
|
-
query: string;
|
|
325
|
-
} & {
|
|
326
|
-
places: {
|
|
327
|
-
query: string;
|
|
328
|
-
position: string;
|
|
329
|
-
};
|
|
330
|
-
}>)) => 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;
|
|
331
219
|
} & {
|
|
332
220
|
results: RecommendResultItem;
|
|
333
221
|
})): {
|
|
334
222
|
items: Hit<THit>[];
|
|
335
|
-
widgetParams: Partial<TrendingItemsWidgetParams<BaseHit>> & TrendingItemsConnectorParams<THit>;
|
|
336
|
-
* CSS selector or `HTMLElement` to insert the widget into.
|
|
337
|
-
*/
|
|
223
|
+
widgetParams: Partial<TrendingItemsWidgetParams<BaseHit>> & TrendingItemsConnectorParams<THit>;
|
|
338
224
|
};
|
|
339
225
|
dispose({ recommendState }: import("../../types").DisposeOptions): import("algoliasearch-helper").RecommendParameters;
|
|
340
226
|
getWidgetParameters(state: import("algoliasearch-helper").RecommendParameters): import("algoliasearch-helper").RecommendParameters;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instantsearch.js",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.73.0",
|
|
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",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/google.maps": "^3.45.3",
|
|
32
32
|
"@types/hogan.js": "^3.0.0",
|
|
33
33
|
"@types/qs": "^6.5.3",
|
|
34
|
-
"algoliasearch-helper": "3.22.
|
|
34
|
+
"algoliasearch-helper": "3.22.2",
|
|
35
35
|
"hogan.js": "^3.0.2",
|
|
36
36
|
"htm": "^3.0.0",
|
|
37
37
|
"instantsearch-ui-components": "0.7.0",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"watch:es": "yarn --silent build:es:base --watch"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@instantsearch/mocks": "1.
|
|
60
|
-
"@instantsearch/tests": "1.
|
|
61
|
-
"@instantsearch/testutils": "1.
|
|
59
|
+
"@instantsearch/mocks": "1.50.0",
|
|
60
|
+
"@instantsearch/tests": "1.50.0",
|
|
61
|
+
"@instantsearch/testutils": "1.39.0",
|
|
62
62
|
"@storybook/html": "5.3.9",
|
|
63
63
|
"@types/scriptjs": "0.0.2",
|
|
64
64
|
"algoliasearch": "4.23.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"scriptjs": "2.5.9",
|
|
67
67
|
"webpack": "4.47.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "e7cf000edf9869be9d2e3df9b3e1c8fdb25a0040"
|
|
70
70
|
}
|