instantsearch.js 4.77.0 → 4.77.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/components/RefinementList/RefinementList.js +2 -2
- package/cjs/lib/utils/getAppIdAndApiKey.js +3 -3
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/frequently-bought-together/frequently-bought-together.js +8 -2
- package/cjs/widgets/looking-similar/looking-similar.js +8 -2
- package/cjs/widgets/related-products/related-products.js +8 -2
- package/cjs/widgets/trending-items/trending-items.js +8 -2
- package/dist/instantsearch.development.d.ts +36 -36
- package/dist/instantsearch.development.js +75 -22
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +36 -36
- package/dist/instantsearch.production.min.d.ts +36 -36
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/RefinementList/RefinementList.js +2 -2
- package/es/connectors/frequently-bought-together/connectFrequentlyBoughtTogether.d.ts +4 -4
- package/es/connectors/looking-similar/connectLookingSimilar.d.ts +4 -4
- package/es/connectors/related-products/connectRelatedProducts.d.ts +4 -4
- package/es/connectors/trending-items/connectTrendingItems.d.ts +4 -4
- package/es/lib/utils/getAppIdAndApiKey.js +3 -3
- 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 +7 -7
- package/es/widgets/frequently-bought-together/frequently-bought-together.js +8 -2
- package/es/widgets/looking-similar/looking-similar.d.ts +7 -7
- package/es/widgets/looking-similar/looking-similar.js +8 -2
- package/es/widgets/related-products/related-products.d.ts +7 -7
- package/es/widgets/related-products/related-products.js +8 -2
- package/es/widgets/trending-items/trending-items.d.ts +7 -7
- package/es/widgets/trending-items/trending-items.js +8 -2
- package/package.json +7 -7
|
@@ -1888,7 +1888,7 @@ declare const _default_12: <THit extends NonNullable<object> = BaseHit>(widgetPa
|
|
|
1888
1888
|
} & {
|
|
1889
1889
|
results: RecommendResponse<any>;
|
|
1890
1890
|
})): {
|
|
1891
|
-
items:
|
|
1891
|
+
items: Hit<BaseHit>[] | Hit<THit>[];
|
|
1892
1892
|
widgetParams: Partial<RelatedProductsWidgetParams<BaseHit>> & RelatedProductsConnectorParams<THit>;
|
|
1893
1893
|
sendEvent: SendEventForHits;
|
|
1894
1894
|
};
|
|
@@ -2078,7 +2078,7 @@ declare const _default_13: <THit extends NonNullable<object> = BaseHit>(widgetPa
|
|
|
2078
2078
|
} & {
|
|
2079
2079
|
results: RecommendResponse<any>;
|
|
2080
2080
|
})): {
|
|
2081
|
-
items:
|
|
2081
|
+
items: Hit<THit>[];
|
|
2082
2082
|
widgetParams: Partial<TrendingItemsWidgetParams<BaseHit>> & TrendingItemsConnectorParams<THit>;
|
|
2083
2083
|
sendEvent: SendEventForHits;
|
|
2084
2084
|
};
|
|
@@ -2268,7 +2268,7 @@ declare const _default_14: <THit extends NonNullable<object> = BaseHit>(widgetPa
|
|
|
2268
2268
|
} & {
|
|
2269
2269
|
results: RecommendResponse<any>;
|
|
2270
2270
|
})): {
|
|
2271
|
-
items:
|
|
2271
|
+
items: Hit<THit>[];
|
|
2272
2272
|
widgetParams: Partial<FrequentlyBoughtTogetherWidgetParams<BaseHit>> & FrequentlyBoughtTogetherConnectorParams<THit>;
|
|
2273
2273
|
sendEvent: SendEventForHits;
|
|
2274
2274
|
};
|
|
@@ -2458,7 +2458,7 @@ declare const _default_15: <THit extends NonNullable<object> = BaseHit>(widgetPa
|
|
|
2458
2458
|
} & {
|
|
2459
2459
|
results: RecommendResponse<any>;
|
|
2460
2460
|
})): {
|
|
2461
|
-
items:
|
|
2461
|
+
items: Hit<THit>[];
|
|
2462
2462
|
widgetParams: Partial<LookingSimilarWidgetParams<BaseHit>> & LookingSimilarConnectorParams<THit>;
|
|
2463
2463
|
sendEvent: SendEventForHits;
|
|
2464
2464
|
};
|
|
@@ -2755,7 +2755,7 @@ declare const _default_3: <TWidgetParams extends UnknownWidgetParams>(renderFn:
|
|
|
2755
2755
|
} & {
|
|
2756
2756
|
results: RecommendResponse<any>;
|
|
2757
2757
|
})): {
|
|
2758
|
-
items:
|
|
2758
|
+
items: Hit<BaseHit>[] | Hit<THit>[];
|
|
2759
2759
|
widgetParams: TWidgetParams & RelatedProductsConnectorParams<THit>;
|
|
2760
2760
|
sendEvent: SendEventForHits;
|
|
2761
2761
|
};
|
|
@@ -2874,7 +2874,7 @@ declare const _default_4: <TWidgetParams extends UnknownWidgetParams>(renderFn:
|
|
|
2874
2874
|
} & {
|
|
2875
2875
|
results: RecommendResponse<any>;
|
|
2876
2876
|
})): {
|
|
2877
|
-
items:
|
|
2877
|
+
items: Hit<THit>[];
|
|
2878
2878
|
widgetParams: TWidgetParams & TrendingItemsConnectorParams<THit>;
|
|
2879
2879
|
sendEvent: SendEventForHits;
|
|
2880
2880
|
};
|
|
@@ -3213,7 +3213,7 @@ declare const _default_6: <TWidgetParams extends UnknownWidgetParams>(renderFn:
|
|
|
3213
3213
|
} & {
|
|
3214
3214
|
results: RecommendResponse<any>;
|
|
3215
3215
|
})): {
|
|
3216
|
-
items:
|
|
3216
|
+
items: Hit<THit>[];
|
|
3217
3217
|
widgetParams: TWidgetParams & FrequentlyBoughtTogetherConnectorParams<THit>;
|
|
3218
3218
|
sendEvent: SendEventForHits;
|
|
3219
3219
|
};
|
|
@@ -3332,7 +3332,7 @@ declare const _default_7: <TWidgetParams extends UnknownWidgetParams>(renderFn:
|
|
|
3332
3332
|
} & {
|
|
3333
3333
|
results: RecommendResponse<any>;
|
|
3334
3334
|
})): {
|
|
3335
|
-
items:
|
|
3335
|
+
items: Hit<THit>[];
|
|
3336
3336
|
widgetParams: TWidgetParams & LookingSimilarConnectorParams<THit>;
|
|
3337
3337
|
sendEvent: SendEventForHits;
|
|
3338
3338
|
};
|
|
@@ -3846,7 +3846,7 @@ declare type FrequentlyBoughtTogetherConnectorParams<THit extends NonNullable<ob
|
|
|
3846
3846
|
/**
|
|
3847
3847
|
* Function to transform the items passed to the templates.
|
|
3848
3848
|
*/
|
|
3849
|
-
transformItems?: TransformItems<
|
|
3849
|
+
transformItems?: TransformItems<Hit<THit>, {
|
|
3850
3850
|
results: RecommendResponse<AlgoliaHit<THit>>;
|
|
3851
3851
|
}>;
|
|
3852
3852
|
};
|
|
@@ -3857,7 +3857,7 @@ declare type FrequentlyBoughtTogetherRenderState<THit extends NonNullable<object
|
|
|
3857
3857
|
/**
|
|
3858
3858
|
* The matched recommendations from Algolia API.
|
|
3859
3859
|
*/
|
|
3860
|
-
items: Array<
|
|
3860
|
+
items: Array<Hit<THit>>;
|
|
3861
3861
|
/**
|
|
3862
3862
|
* Sends an event to the Insights middleware.
|
|
3863
3863
|
*/
|
|
@@ -3868,23 +3868,23 @@ declare type FrequentlyBoughtTogetherTemplates<THit extends NonNullable<object>
|
|
|
3868
3868
|
/**
|
|
3869
3869
|
* Template to use when there are no results.
|
|
3870
3870
|
*/
|
|
3871
|
-
empty: Template<RecommendResponse<
|
|
3871
|
+
empty: Template<RecommendResponse<Hit<THit>>>;
|
|
3872
3872
|
/**
|
|
3873
3873
|
* Template to use for the header of the widget.
|
|
3874
3874
|
*/
|
|
3875
|
-
header: Template<Pick<Parameters<NonNullable<FrequentlyBoughtTogetherProps<
|
|
3875
|
+
header: Template<Pick<Parameters<NonNullable<FrequentlyBoughtTogetherProps<Hit<THit>>['headerComponent']>>[0], 'items'> & {
|
|
3876
3876
|
cssClasses: RecommendClassNames;
|
|
3877
3877
|
}>;
|
|
3878
3878
|
/**
|
|
3879
3879
|
* Template to use for each result. This template will receive an object containing a single record.
|
|
3880
3880
|
*/
|
|
3881
|
-
item:
|
|
3881
|
+
item: TemplateWithBindEvent<Hit<THit>>;
|
|
3882
3882
|
/**
|
|
3883
3883
|
* Template to use to wrap all items.
|
|
3884
3884
|
*/
|
|
3885
|
-
layout: Template<Pick<Parameters<NonNullable<FrequentlyBoughtTogetherProps<
|
|
3885
|
+
layout: Template<Pick<Parameters<NonNullable<FrequentlyBoughtTogetherProps<Hit<THit>>['layout']>>[0], 'items'> & {
|
|
3886
3886
|
templates: {
|
|
3887
|
-
item: FrequentlyBoughtTogetherProps<
|
|
3887
|
+
item: FrequentlyBoughtTogetherProps<Hit<THit>>['itemComponent'];
|
|
3888
3888
|
};
|
|
3889
3889
|
cssClasses: Pick<FrequentlyBoughtTogetherCSSClasses, 'list' | 'item'>;
|
|
3890
3890
|
}>;
|
|
@@ -5373,7 +5373,7 @@ declare type LookingSimilarConnectorParams<THit extends NonNullable<object> = Ba
|
|
|
5373
5373
|
/**
|
|
5374
5374
|
* Function to transform the items passed to the templates.
|
|
5375
5375
|
*/
|
|
5376
|
-
transformItems?: TransformItems<
|
|
5376
|
+
transformItems?: TransformItems<Hit<THit>, {
|
|
5377
5377
|
results: RecommendResponse<AlgoliaHit<THit>>;
|
|
5378
5378
|
}>;
|
|
5379
5379
|
};
|
|
@@ -5384,7 +5384,7 @@ declare type LookingSimilarRenderState<THit extends NonNullable<object> = BaseHi
|
|
|
5384
5384
|
/**
|
|
5385
5385
|
* The matched recommendations from the Algolia API.
|
|
5386
5386
|
*/
|
|
5387
|
-
items: Array<
|
|
5387
|
+
items: Array<Hit<THit>>;
|
|
5388
5388
|
/**
|
|
5389
5389
|
* Sends an event to the Insights middleware.
|
|
5390
5390
|
*/
|
|
@@ -5395,23 +5395,23 @@ declare type LookingSimilarTemplates<THit extends NonNullable<object> = BaseHit>
|
|
|
5395
5395
|
/**
|
|
5396
5396
|
* Template to use when there are no results.
|
|
5397
5397
|
*/
|
|
5398
|
-
empty: Template<RecommendResponse<
|
|
5398
|
+
empty: Template<RecommendResponse<Hit<THit>>>;
|
|
5399
5399
|
/**
|
|
5400
5400
|
* Template to use for the header of the widget.
|
|
5401
5401
|
*/
|
|
5402
|
-
header: Template<Pick<Parameters<NonNullable<LookingSimilarProps<
|
|
5402
|
+
header: Template<Pick<Parameters<NonNullable<LookingSimilarProps<Hit<THit>>['headerComponent']>>[0], 'items'> & {
|
|
5403
5403
|
cssClasses: RecommendClassNames;
|
|
5404
5404
|
}>;
|
|
5405
5405
|
/**
|
|
5406
5406
|
* Template to use for each result. This template will receive an object containing a single record.
|
|
5407
5407
|
*/
|
|
5408
|
-
item:
|
|
5408
|
+
item: TemplateWithBindEvent<Hit<THit>>;
|
|
5409
5409
|
/**
|
|
5410
5410
|
* Template to use to wrap all items.
|
|
5411
5411
|
*/
|
|
5412
|
-
layout: Template<Pick<Parameters<NonNullable<LookingSimilarProps<
|
|
5412
|
+
layout: Template<Pick<Parameters<NonNullable<LookingSimilarProps<Hit<THit>>['layout']>>[0], 'items'> & {
|
|
5413
5413
|
templates: {
|
|
5414
|
-
item: LookingSimilarProps<
|
|
5414
|
+
item: LookingSimilarProps<Hit<THit>>['itemComponent'];
|
|
5415
5415
|
};
|
|
5416
5416
|
cssClasses: Pick<LookingSimilarCSSClasses, 'list' | 'item'>;
|
|
5417
5417
|
}>;
|
|
@@ -7188,7 +7188,7 @@ declare type RelatedProductsConnectorParams<THit extends NonNullable<object> = B
|
|
|
7188
7188
|
/**
|
|
7189
7189
|
* Function to transform the items passed to the templates.
|
|
7190
7190
|
*/
|
|
7191
|
-
transformItems?: TransformItems<
|
|
7191
|
+
transformItems?: TransformItems<Hit<THit>, {
|
|
7192
7192
|
results: RecommendResponse<AlgoliaHit<THit>>;
|
|
7193
7193
|
}>;
|
|
7194
7194
|
};
|
|
@@ -7199,7 +7199,7 @@ declare type RelatedProductsRenderState<THit extends NonNullable<object> = BaseH
|
|
|
7199
7199
|
/**
|
|
7200
7200
|
* The matched recommendations from the Algolia API.
|
|
7201
7201
|
*/
|
|
7202
|
-
items: Array<
|
|
7202
|
+
items: Array<Hit<THit>>;
|
|
7203
7203
|
/**
|
|
7204
7204
|
* Sends an event to the Insights middleware.
|
|
7205
7205
|
*/
|
|
@@ -7210,23 +7210,23 @@ declare type RelatedProductsTemplates<THit extends NonNullable<object> = BaseHit
|
|
|
7210
7210
|
/**
|
|
7211
7211
|
* Template to use when there are no results.
|
|
7212
7212
|
*/
|
|
7213
|
-
empty: Template<RecommendResponse<
|
|
7213
|
+
empty: Template<RecommendResponse<Hit<THit>>>;
|
|
7214
7214
|
/**
|
|
7215
7215
|
* Template to use for the header of the widget.
|
|
7216
7216
|
*/
|
|
7217
|
-
header: Template<Pick<Parameters<NonNullable<RelatedProductsProps<
|
|
7217
|
+
header: Template<Pick<Parameters<NonNullable<RelatedProductsProps<Hit<THit>>['headerComponent']>>[0], 'items'> & {
|
|
7218
7218
|
cssClasses: RecommendClassNames;
|
|
7219
7219
|
}>;
|
|
7220
7220
|
/**
|
|
7221
7221
|
* Template to use for each result. This template will receive an object containing a single record.
|
|
7222
7222
|
*/
|
|
7223
|
-
item:
|
|
7223
|
+
item: TemplateWithBindEvent<Hit<THit>>;
|
|
7224
7224
|
/**
|
|
7225
7225
|
* Template to use to wrap all items.
|
|
7226
7226
|
*/
|
|
7227
|
-
layout: Template<Pick<Parameters<NonNullable<RelatedProductsProps<
|
|
7227
|
+
layout: Template<Pick<Parameters<NonNullable<RelatedProductsProps<Hit<THit>>['layout']>>[0], 'items'> & {
|
|
7228
7228
|
templates: {
|
|
7229
|
-
item: RelatedProductsProps<
|
|
7229
|
+
item: RelatedProductsProps<Hit<THit>>['itemComponent'];
|
|
7230
7230
|
};
|
|
7231
7231
|
cssClasses: Pick<RelatedProductsCSSClasses, 'list' | 'item'>;
|
|
7232
7232
|
}>;
|
|
@@ -8356,7 +8356,7 @@ declare type TrendingItemsConnectorParams<THit extends NonNullable<object> = Bas
|
|
|
8356
8356
|
/**
|
|
8357
8357
|
* Function to transform the items passed to the templates.
|
|
8358
8358
|
*/
|
|
8359
|
-
transformItems?: TransformItems<
|
|
8359
|
+
transformItems?: TransformItems<Hit<THit>, {
|
|
8360
8360
|
results: RecommendResponse<AlgoliaHit<THit>>;
|
|
8361
8361
|
}>;
|
|
8362
8362
|
};
|
|
@@ -8367,7 +8367,7 @@ declare type TrendingItemsRenderState<THit extends NonNullable<object> = BaseHit
|
|
|
8367
8367
|
/**
|
|
8368
8368
|
* The matched recommendations from the Algolia API.
|
|
8369
8369
|
*/
|
|
8370
|
-
items: Array<
|
|
8370
|
+
items: Array<Hit<THit>>;
|
|
8371
8371
|
/**
|
|
8372
8372
|
* Sends an event to the Insights middleware.
|
|
8373
8373
|
*/
|
|
@@ -8378,23 +8378,23 @@ declare type TrendingItemsTemplates<THit extends NonNullable<object> = BaseHit>
|
|
|
8378
8378
|
/**
|
|
8379
8379
|
* Template to use when there are no results.
|
|
8380
8380
|
*/
|
|
8381
|
-
empty: Template<RecommendResponse<
|
|
8381
|
+
empty: Template<RecommendResponse<Hit<THit>>>;
|
|
8382
8382
|
/**
|
|
8383
8383
|
* Template to use for the header of the widget.
|
|
8384
8384
|
*/
|
|
8385
|
-
header: Template<Pick<Parameters<NonNullable<TrendingItemsProps<
|
|
8385
|
+
header: Template<Pick<Parameters<NonNullable<TrendingItemsProps<Hit<THit>>['headerComponent']>>[0], 'items'> & {
|
|
8386
8386
|
cssClasses: RecommendClassNames;
|
|
8387
8387
|
}>;
|
|
8388
8388
|
/**
|
|
8389
8389
|
* Template to use for each result. This template will receive an object containing a single record.
|
|
8390
8390
|
*/
|
|
8391
|
-
item:
|
|
8391
|
+
item: TemplateWithBindEvent<Hit<THit>>;
|
|
8392
8392
|
/**
|
|
8393
8393
|
* Template to use to wrap all items.
|
|
8394
8394
|
*/
|
|
8395
|
-
layout: Template<Pick<Parameters<NonNullable<TrendingItemsProps<
|
|
8395
|
+
layout: Template<Pick<Parameters<NonNullable<TrendingItemsProps<Hit<THit>>['layout']>>[0], 'items'> & {
|
|
8396
8396
|
templates: {
|
|
8397
|
-
item: TrendingItemsProps<
|
|
8397
|
+
item: TrendingItemsProps<Hit<THit>>['itemComponent'];
|
|
8398
8398
|
};
|
|
8399
8399
|
cssClasses: Pick<TrendingItemsCSSClasses, 'list' | 'item'>;
|
|
8400
8400
|
}>;
|
|
@@ -1888,7 +1888,7 @@ declare const _default_12: <THit extends NonNullable<object> = BaseHit>(widgetPa
|
|
|
1888
1888
|
} & {
|
|
1889
1889
|
results: RecommendResponse<any>;
|
|
1890
1890
|
})): {
|
|
1891
|
-
items:
|
|
1891
|
+
items: Hit<BaseHit>[] | Hit<THit>[];
|
|
1892
1892
|
widgetParams: Partial<RelatedProductsWidgetParams<BaseHit>> & RelatedProductsConnectorParams<THit>;
|
|
1893
1893
|
sendEvent: SendEventForHits;
|
|
1894
1894
|
};
|
|
@@ -2078,7 +2078,7 @@ declare const _default_13: <THit extends NonNullable<object> = BaseHit>(widgetPa
|
|
|
2078
2078
|
} & {
|
|
2079
2079
|
results: RecommendResponse<any>;
|
|
2080
2080
|
})): {
|
|
2081
|
-
items:
|
|
2081
|
+
items: Hit<THit>[];
|
|
2082
2082
|
widgetParams: Partial<TrendingItemsWidgetParams<BaseHit>> & TrendingItemsConnectorParams<THit>;
|
|
2083
2083
|
sendEvent: SendEventForHits;
|
|
2084
2084
|
};
|
|
@@ -2268,7 +2268,7 @@ declare const _default_14: <THit extends NonNullable<object> = BaseHit>(widgetPa
|
|
|
2268
2268
|
} & {
|
|
2269
2269
|
results: RecommendResponse<any>;
|
|
2270
2270
|
})): {
|
|
2271
|
-
items:
|
|
2271
|
+
items: Hit<THit>[];
|
|
2272
2272
|
widgetParams: Partial<FrequentlyBoughtTogetherWidgetParams<BaseHit>> & FrequentlyBoughtTogetherConnectorParams<THit>;
|
|
2273
2273
|
sendEvent: SendEventForHits;
|
|
2274
2274
|
};
|
|
@@ -2458,7 +2458,7 @@ declare const _default_15: <THit extends NonNullable<object> = BaseHit>(widgetPa
|
|
|
2458
2458
|
} & {
|
|
2459
2459
|
results: RecommendResponse<any>;
|
|
2460
2460
|
})): {
|
|
2461
|
-
items:
|
|
2461
|
+
items: Hit<THit>[];
|
|
2462
2462
|
widgetParams: Partial<LookingSimilarWidgetParams<BaseHit>> & LookingSimilarConnectorParams<THit>;
|
|
2463
2463
|
sendEvent: SendEventForHits;
|
|
2464
2464
|
};
|
|
@@ -2755,7 +2755,7 @@ declare const _default_3: <TWidgetParams extends UnknownWidgetParams>(renderFn:
|
|
|
2755
2755
|
} & {
|
|
2756
2756
|
results: RecommendResponse<any>;
|
|
2757
2757
|
})): {
|
|
2758
|
-
items:
|
|
2758
|
+
items: Hit<BaseHit>[] | Hit<THit>[];
|
|
2759
2759
|
widgetParams: TWidgetParams & RelatedProductsConnectorParams<THit>;
|
|
2760
2760
|
sendEvent: SendEventForHits;
|
|
2761
2761
|
};
|
|
@@ -2874,7 +2874,7 @@ declare const _default_4: <TWidgetParams extends UnknownWidgetParams>(renderFn:
|
|
|
2874
2874
|
} & {
|
|
2875
2875
|
results: RecommendResponse<any>;
|
|
2876
2876
|
})): {
|
|
2877
|
-
items:
|
|
2877
|
+
items: Hit<THit>[];
|
|
2878
2878
|
widgetParams: TWidgetParams & TrendingItemsConnectorParams<THit>;
|
|
2879
2879
|
sendEvent: SendEventForHits;
|
|
2880
2880
|
};
|
|
@@ -3213,7 +3213,7 @@ declare const _default_6: <TWidgetParams extends UnknownWidgetParams>(renderFn:
|
|
|
3213
3213
|
} & {
|
|
3214
3214
|
results: RecommendResponse<any>;
|
|
3215
3215
|
})): {
|
|
3216
|
-
items:
|
|
3216
|
+
items: Hit<THit>[];
|
|
3217
3217
|
widgetParams: TWidgetParams & FrequentlyBoughtTogetherConnectorParams<THit>;
|
|
3218
3218
|
sendEvent: SendEventForHits;
|
|
3219
3219
|
};
|
|
@@ -3332,7 +3332,7 @@ declare const _default_7: <TWidgetParams extends UnknownWidgetParams>(renderFn:
|
|
|
3332
3332
|
} & {
|
|
3333
3333
|
results: RecommendResponse<any>;
|
|
3334
3334
|
})): {
|
|
3335
|
-
items:
|
|
3335
|
+
items: Hit<THit>[];
|
|
3336
3336
|
widgetParams: TWidgetParams & LookingSimilarConnectorParams<THit>;
|
|
3337
3337
|
sendEvent: SendEventForHits;
|
|
3338
3338
|
};
|
|
@@ -3846,7 +3846,7 @@ declare type FrequentlyBoughtTogetherConnectorParams<THit extends NonNullable<ob
|
|
|
3846
3846
|
/**
|
|
3847
3847
|
* Function to transform the items passed to the templates.
|
|
3848
3848
|
*/
|
|
3849
|
-
transformItems?: TransformItems<
|
|
3849
|
+
transformItems?: TransformItems<Hit<THit>, {
|
|
3850
3850
|
results: RecommendResponse<AlgoliaHit<THit>>;
|
|
3851
3851
|
}>;
|
|
3852
3852
|
};
|
|
@@ -3857,7 +3857,7 @@ declare type FrequentlyBoughtTogetherRenderState<THit extends NonNullable<object
|
|
|
3857
3857
|
/**
|
|
3858
3858
|
* The matched recommendations from Algolia API.
|
|
3859
3859
|
*/
|
|
3860
|
-
items: Array<
|
|
3860
|
+
items: Array<Hit<THit>>;
|
|
3861
3861
|
/**
|
|
3862
3862
|
* Sends an event to the Insights middleware.
|
|
3863
3863
|
*/
|
|
@@ -3868,23 +3868,23 @@ declare type FrequentlyBoughtTogetherTemplates<THit extends NonNullable<object>
|
|
|
3868
3868
|
/**
|
|
3869
3869
|
* Template to use when there are no results.
|
|
3870
3870
|
*/
|
|
3871
|
-
empty: Template<RecommendResponse<
|
|
3871
|
+
empty: Template<RecommendResponse<Hit<THit>>>;
|
|
3872
3872
|
/**
|
|
3873
3873
|
* Template to use for the header of the widget.
|
|
3874
3874
|
*/
|
|
3875
|
-
header: Template<Pick<Parameters<NonNullable<FrequentlyBoughtTogetherProps<
|
|
3875
|
+
header: Template<Pick<Parameters<NonNullable<FrequentlyBoughtTogetherProps<Hit<THit>>['headerComponent']>>[0], 'items'> & {
|
|
3876
3876
|
cssClasses: RecommendClassNames;
|
|
3877
3877
|
}>;
|
|
3878
3878
|
/**
|
|
3879
3879
|
* Template to use for each result. This template will receive an object containing a single record.
|
|
3880
3880
|
*/
|
|
3881
|
-
item:
|
|
3881
|
+
item: TemplateWithBindEvent<Hit<THit>>;
|
|
3882
3882
|
/**
|
|
3883
3883
|
* Template to use to wrap all items.
|
|
3884
3884
|
*/
|
|
3885
|
-
layout: Template<Pick<Parameters<NonNullable<FrequentlyBoughtTogetherProps<
|
|
3885
|
+
layout: Template<Pick<Parameters<NonNullable<FrequentlyBoughtTogetherProps<Hit<THit>>['layout']>>[0], 'items'> & {
|
|
3886
3886
|
templates: {
|
|
3887
|
-
item: FrequentlyBoughtTogetherProps<
|
|
3887
|
+
item: FrequentlyBoughtTogetherProps<Hit<THit>>['itemComponent'];
|
|
3888
3888
|
};
|
|
3889
3889
|
cssClasses: Pick<FrequentlyBoughtTogetherCSSClasses, 'list' | 'item'>;
|
|
3890
3890
|
}>;
|
|
@@ -5373,7 +5373,7 @@ declare type LookingSimilarConnectorParams<THit extends NonNullable<object> = Ba
|
|
|
5373
5373
|
/**
|
|
5374
5374
|
* Function to transform the items passed to the templates.
|
|
5375
5375
|
*/
|
|
5376
|
-
transformItems?: TransformItems<
|
|
5376
|
+
transformItems?: TransformItems<Hit<THit>, {
|
|
5377
5377
|
results: RecommendResponse<AlgoliaHit<THit>>;
|
|
5378
5378
|
}>;
|
|
5379
5379
|
};
|
|
@@ -5384,7 +5384,7 @@ declare type LookingSimilarRenderState<THit extends NonNullable<object> = BaseHi
|
|
|
5384
5384
|
/**
|
|
5385
5385
|
* The matched recommendations from the Algolia API.
|
|
5386
5386
|
*/
|
|
5387
|
-
items: Array<
|
|
5387
|
+
items: Array<Hit<THit>>;
|
|
5388
5388
|
/**
|
|
5389
5389
|
* Sends an event to the Insights middleware.
|
|
5390
5390
|
*/
|
|
@@ -5395,23 +5395,23 @@ declare type LookingSimilarTemplates<THit extends NonNullable<object> = BaseHit>
|
|
|
5395
5395
|
/**
|
|
5396
5396
|
* Template to use when there are no results.
|
|
5397
5397
|
*/
|
|
5398
|
-
empty: Template<RecommendResponse<
|
|
5398
|
+
empty: Template<RecommendResponse<Hit<THit>>>;
|
|
5399
5399
|
/**
|
|
5400
5400
|
* Template to use for the header of the widget.
|
|
5401
5401
|
*/
|
|
5402
|
-
header: Template<Pick<Parameters<NonNullable<LookingSimilarProps<
|
|
5402
|
+
header: Template<Pick<Parameters<NonNullable<LookingSimilarProps<Hit<THit>>['headerComponent']>>[0], 'items'> & {
|
|
5403
5403
|
cssClasses: RecommendClassNames;
|
|
5404
5404
|
}>;
|
|
5405
5405
|
/**
|
|
5406
5406
|
* Template to use for each result. This template will receive an object containing a single record.
|
|
5407
5407
|
*/
|
|
5408
|
-
item:
|
|
5408
|
+
item: TemplateWithBindEvent<Hit<THit>>;
|
|
5409
5409
|
/**
|
|
5410
5410
|
* Template to use to wrap all items.
|
|
5411
5411
|
*/
|
|
5412
|
-
layout: Template<Pick<Parameters<NonNullable<LookingSimilarProps<
|
|
5412
|
+
layout: Template<Pick<Parameters<NonNullable<LookingSimilarProps<Hit<THit>>['layout']>>[0], 'items'> & {
|
|
5413
5413
|
templates: {
|
|
5414
|
-
item: LookingSimilarProps<
|
|
5414
|
+
item: LookingSimilarProps<Hit<THit>>['itemComponent'];
|
|
5415
5415
|
};
|
|
5416
5416
|
cssClasses: Pick<LookingSimilarCSSClasses, 'list' | 'item'>;
|
|
5417
5417
|
}>;
|
|
@@ -7188,7 +7188,7 @@ declare type RelatedProductsConnectorParams<THit extends NonNullable<object> = B
|
|
|
7188
7188
|
/**
|
|
7189
7189
|
* Function to transform the items passed to the templates.
|
|
7190
7190
|
*/
|
|
7191
|
-
transformItems?: TransformItems<
|
|
7191
|
+
transformItems?: TransformItems<Hit<THit>, {
|
|
7192
7192
|
results: RecommendResponse<AlgoliaHit<THit>>;
|
|
7193
7193
|
}>;
|
|
7194
7194
|
};
|
|
@@ -7199,7 +7199,7 @@ declare type RelatedProductsRenderState<THit extends NonNullable<object> = BaseH
|
|
|
7199
7199
|
/**
|
|
7200
7200
|
* The matched recommendations from the Algolia API.
|
|
7201
7201
|
*/
|
|
7202
|
-
items: Array<
|
|
7202
|
+
items: Array<Hit<THit>>;
|
|
7203
7203
|
/**
|
|
7204
7204
|
* Sends an event to the Insights middleware.
|
|
7205
7205
|
*/
|
|
@@ -7210,23 +7210,23 @@ declare type RelatedProductsTemplates<THit extends NonNullable<object> = BaseHit
|
|
|
7210
7210
|
/**
|
|
7211
7211
|
* Template to use when there are no results.
|
|
7212
7212
|
*/
|
|
7213
|
-
empty: Template<RecommendResponse<
|
|
7213
|
+
empty: Template<RecommendResponse<Hit<THit>>>;
|
|
7214
7214
|
/**
|
|
7215
7215
|
* Template to use for the header of the widget.
|
|
7216
7216
|
*/
|
|
7217
|
-
header: Template<Pick<Parameters<NonNullable<RelatedProductsProps<
|
|
7217
|
+
header: Template<Pick<Parameters<NonNullable<RelatedProductsProps<Hit<THit>>['headerComponent']>>[0], 'items'> & {
|
|
7218
7218
|
cssClasses: RecommendClassNames;
|
|
7219
7219
|
}>;
|
|
7220
7220
|
/**
|
|
7221
7221
|
* Template to use for each result. This template will receive an object containing a single record.
|
|
7222
7222
|
*/
|
|
7223
|
-
item:
|
|
7223
|
+
item: TemplateWithBindEvent<Hit<THit>>;
|
|
7224
7224
|
/**
|
|
7225
7225
|
* Template to use to wrap all items.
|
|
7226
7226
|
*/
|
|
7227
|
-
layout: Template<Pick<Parameters<NonNullable<RelatedProductsProps<
|
|
7227
|
+
layout: Template<Pick<Parameters<NonNullable<RelatedProductsProps<Hit<THit>>['layout']>>[0], 'items'> & {
|
|
7228
7228
|
templates: {
|
|
7229
|
-
item: RelatedProductsProps<
|
|
7229
|
+
item: RelatedProductsProps<Hit<THit>>['itemComponent'];
|
|
7230
7230
|
};
|
|
7231
7231
|
cssClasses: Pick<RelatedProductsCSSClasses, 'list' | 'item'>;
|
|
7232
7232
|
}>;
|
|
@@ -8356,7 +8356,7 @@ declare type TrendingItemsConnectorParams<THit extends NonNullable<object> = Bas
|
|
|
8356
8356
|
/**
|
|
8357
8357
|
* Function to transform the items passed to the templates.
|
|
8358
8358
|
*/
|
|
8359
|
-
transformItems?: TransformItems<
|
|
8359
|
+
transformItems?: TransformItems<Hit<THit>, {
|
|
8360
8360
|
results: RecommendResponse<AlgoliaHit<THit>>;
|
|
8361
8361
|
}>;
|
|
8362
8362
|
};
|
|
@@ -8367,7 +8367,7 @@ declare type TrendingItemsRenderState<THit extends NonNullable<object> = BaseHit
|
|
|
8367
8367
|
/**
|
|
8368
8368
|
* The matched recommendations from the Algolia API.
|
|
8369
8369
|
*/
|
|
8370
|
-
items: Array<
|
|
8370
|
+
items: Array<Hit<THit>>;
|
|
8371
8371
|
/**
|
|
8372
8372
|
* Sends an event to the Insights middleware.
|
|
8373
8373
|
*/
|
|
@@ -8378,23 +8378,23 @@ declare type TrendingItemsTemplates<THit extends NonNullable<object> = BaseHit>
|
|
|
8378
8378
|
/**
|
|
8379
8379
|
* Template to use when there are no results.
|
|
8380
8380
|
*/
|
|
8381
|
-
empty: Template<RecommendResponse<
|
|
8381
|
+
empty: Template<RecommendResponse<Hit<THit>>>;
|
|
8382
8382
|
/**
|
|
8383
8383
|
* Template to use for the header of the widget.
|
|
8384
8384
|
*/
|
|
8385
|
-
header: Template<Pick<Parameters<NonNullable<TrendingItemsProps<
|
|
8385
|
+
header: Template<Pick<Parameters<NonNullable<TrendingItemsProps<Hit<THit>>['headerComponent']>>[0], 'items'> & {
|
|
8386
8386
|
cssClasses: RecommendClassNames;
|
|
8387
8387
|
}>;
|
|
8388
8388
|
/**
|
|
8389
8389
|
* Template to use for each result. This template will receive an object containing a single record.
|
|
8390
8390
|
*/
|
|
8391
|
-
item:
|
|
8391
|
+
item: TemplateWithBindEvent<Hit<THit>>;
|
|
8392
8392
|
/**
|
|
8393
8393
|
* Template to use to wrap all items.
|
|
8394
8394
|
*/
|
|
8395
|
-
layout: Template<Pick<Parameters<NonNullable<TrendingItemsProps<
|
|
8395
|
+
layout: Template<Pick<Parameters<NonNullable<TrendingItemsProps<Hit<THit>>['layout']>>[0], 'items'> & {
|
|
8396
8396
|
templates: {
|
|
8397
|
-
item: TrendingItemsProps<
|
|
8397
|
+
item: TrendingItemsProps<Hit<THit>>['itemComponent'];
|
|
8398
8398
|
};
|
|
8399
8399
|
cssClasses: Pick<TrendingItemsCSSClasses, 'list' | 'item'>;
|
|
8400
8400
|
}>;
|