instantsearch.js 4.53.0 → 4.54.1
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/Pagination/Pagination.js +35 -17
- package/cjs/components/Template/Template.js +6 -3
- package/cjs/connectors/hierarchical-menu/connectHierarchicalMenu.js +4 -0
- package/cjs/connectors/menu/connectMenu.js +4 -0
- package/cjs/connectors/refinement-list/connectRefinementList.js +8 -0
- package/cjs/connectors/toggle-refinement/connectToggleRefinement.js +4 -0
- package/cjs/helpers/highlight.js +5 -0
- package/cjs/helpers/reverseHighlight.js +5 -0
- package/cjs/helpers/reverseSnippet.js +5 -0
- package/cjs/helpers/snippet.js +5 -0
- package/cjs/lib/server.js +60 -0
- package/cjs/lib/utils/index.js +11 -0
- package/cjs/lib/utils/walkIndex.js +18 -0
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/pagination/pagination.js +51 -39
- package/cjs/widgets/panel/panel.js +0 -2
- package/cjs/widgets/places/places.js +1 -0
- package/dist/instantsearch.development.d.ts +27 -4
- package/dist/instantsearch.development.js +133 -63
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +27 -4
- package/dist/instantsearch.production.min.d.ts +27 -4
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Pagination/Pagination.js +34 -17
- package/es/components/Panel/Panel.d.ts +1 -1
- package/es/components/Template/Template.js +6 -3
- package/es/connectors/hierarchical-menu/connectHierarchicalMenu.js +4 -0
- package/es/connectors/menu/connectMenu.js +5 -1
- package/es/connectors/refinement-list/connectRefinementList.js +9 -1
- package/es/connectors/toggle-refinement/connectToggleRefinement.js +5 -1
- package/es/helpers/highlight.d.ts +3 -0
- package/es/helpers/highlight.js +5 -0
- package/es/helpers/reverseHighlight.d.ts +3 -0
- package/es/helpers/reverseHighlight.js +5 -0
- package/es/helpers/reverseSnippet.d.ts +3 -0
- package/es/helpers/reverseSnippet.js +5 -0
- package/es/helpers/snippet.d.ts +3 -0
- package/es/helpers/snippet.js +5 -0
- package/es/lib/server.d.ts +10 -0
- package/es/lib/server.js +53 -0
- package/es/lib/utils/index.d.ts +1 -0
- package/es/lib/utils/index.js +1 -0
- package/es/lib/utils/walkIndex.d.ts +5 -0
- package/es/lib/utils/walkIndex.js +12 -0
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/widgets/pagination/pagination.d.ts +12 -5
- package/es/widgets/pagination/pagination.js +51 -39
- package/es/widgets/panel/panel.js +0 -2
- package/es/widgets/places/places.d.ts +1 -1
- package/es/widgets/places/places.js +1 -0
- package/package.json +5 -5
|
@@ -1774,6 +1774,9 @@ declare type HierarchicalMenuWidgetParams = {
|
|
|
1774
1774
|
|
|
1775
1775
|
declare function Highlight<THit extends Hit<BaseHit>>({ hit, attribute, cssClasses, ...props }: HighlightProps<THit>): h.JSX.Element;
|
|
1776
1776
|
|
|
1777
|
+
/**
|
|
1778
|
+
* @deprecated use html tagged templates and the Highlight component instead
|
|
1779
|
+
*/
|
|
1777
1780
|
declare function highlight({ attribute, highlightedTagName, hit, cssClasses, }: HighlightOptions): string;
|
|
1778
1781
|
|
|
1779
1782
|
declare type HighlightClassNames = HighlightClassNames_2;
|
|
@@ -2475,9 +2478,13 @@ declare type InstantSearchModule = {
|
|
|
2475
2478
|
routers: typeof routers;
|
|
2476
2479
|
stateMappings: typeof stateMappings;
|
|
2477
2480
|
createInfiniteHitsSessionStorageCache: typeof createInfiniteHitsSessionStorageCache;
|
|
2481
|
+
/** @deprecated use html tagged templates and the Highlight component instead */
|
|
2478
2482
|
highlight: typeof helpers.highlight;
|
|
2483
|
+
/** @deprecated use html tagged templates and the ReverseHighlight component instead */
|
|
2479
2484
|
reverseHighlight: typeof helpers.reverseHighlight;
|
|
2485
|
+
/** @deprecated use html tagged templates and the Snippet component instead */
|
|
2480
2486
|
snippet: typeof helpers.snippet;
|
|
2487
|
+
/** @deprecated use html tagged templates and the ReverseSnippet component instead */
|
|
2481
2488
|
reverseSnippet: typeof helpers.reverseSnippet;
|
|
2482
2489
|
/**
|
|
2483
2490
|
* @deprecated use createInsightsMiddleware
|
|
@@ -3140,19 +3147,26 @@ declare type PaginationTemplates = Partial<{
|
|
|
3140
3147
|
/**
|
|
3141
3148
|
* Label for the Previous link.
|
|
3142
3149
|
*/
|
|
3143
|
-
previous:
|
|
3150
|
+
previous: Template;
|
|
3144
3151
|
/**
|
|
3145
3152
|
* Label for the Next link.
|
|
3146
3153
|
*/
|
|
3147
|
-
next:
|
|
3154
|
+
next: Template;
|
|
3155
|
+
/**
|
|
3156
|
+
* Label for the link of a certain page
|
|
3157
|
+
* Page is one-based, so `page` will be `1` for the first page.
|
|
3158
|
+
*/
|
|
3159
|
+
page: Template<{
|
|
3160
|
+
page: number;
|
|
3161
|
+
}>;
|
|
3148
3162
|
/**
|
|
3149
3163
|
* Label for the First link.
|
|
3150
3164
|
*/
|
|
3151
|
-
first:
|
|
3165
|
+
first: Template;
|
|
3152
3166
|
/**
|
|
3153
3167
|
* Label for the Last link.
|
|
3154
3168
|
*/
|
|
3155
|
-
last:
|
|
3169
|
+
last: Template;
|
|
3156
3170
|
}>;
|
|
3157
3171
|
|
|
3158
3172
|
declare type PaginationWidget = WidgetFactory<PaginationWidgetDescription & {
|
|
@@ -4459,6 +4473,9 @@ declare type RequiredWidgetType<TWidgetDescription extends WidgetDescription> =
|
|
|
4459
4473
|
|
|
4460
4474
|
declare function ReverseHighlight<THit extends Hit<BaseHit>>({ hit, attribute, cssClasses, ...props }: ReverseHighlightProps<THit>): h.JSX.Element;
|
|
4461
4475
|
|
|
4476
|
+
/**
|
|
4477
|
+
* @deprecated use html tagged templates and the ReverseHighlight component instead
|
|
4478
|
+
*/
|
|
4462
4479
|
declare function reverseHighlight({ attribute, highlightedTagName, hit, cssClasses, }: ReverseHighlightOptions): string;
|
|
4463
4480
|
|
|
4464
4481
|
declare type ReverseHighlightClassNames = HighlightClassNames_2;
|
|
@@ -4484,6 +4501,9 @@ declare type ReverseHighlightProps_2 = Omit<HighlightProps_3, 'classNames'> & {
|
|
|
4484
4501
|
|
|
4485
4502
|
declare function ReverseSnippet<THit extends Hit<BaseHit>>({ hit, attribute, cssClasses, ...props }: ReverseSnippetProps<THit>): h.JSX.Element;
|
|
4486
4503
|
|
|
4504
|
+
/**
|
|
4505
|
+
* @deprecated use html tagged templates and the ReverseSnippet component instead
|
|
4506
|
+
*/
|
|
4487
4507
|
declare function reverseSnippet({ attribute, highlightedTagName, hit, cssClasses, }: ReverseSnippetOptions): string;
|
|
4488
4508
|
|
|
4489
4509
|
declare type ReverseSnippetClassNames = HighlightClassNames_2;
|
|
@@ -4770,6 +4790,9 @@ declare function singleIndexStateMapping<TUiState extends UiState = UiState>(ind
|
|
|
4770
4790
|
|
|
4771
4791
|
declare function Snippet<THit extends Hit<BaseHit>>({ hit, attribute, cssClasses, ...props }: SnippetProps<THit>): h.JSX.Element;
|
|
4772
4792
|
|
|
4793
|
+
/**
|
|
4794
|
+
* @deprecated use html tagged templates and the Snippet component instead
|
|
4795
|
+
*/
|
|
4773
4796
|
declare function snippet({ attribute, highlightedTagName, hit, cssClasses, }: SnippetOptions): string;
|
|
4774
4797
|
|
|
4775
4798
|
declare type SnippetClassNames = HighlightClassNames_2;
|
|
@@ -1774,6 +1774,9 @@ declare type HierarchicalMenuWidgetParams = {
|
|
|
1774
1774
|
|
|
1775
1775
|
declare function Highlight<THit extends Hit<BaseHit>>({ hit, attribute, cssClasses, ...props }: HighlightProps<THit>): h.JSX.Element;
|
|
1776
1776
|
|
|
1777
|
+
/**
|
|
1778
|
+
* @deprecated use html tagged templates and the Highlight component instead
|
|
1779
|
+
*/
|
|
1777
1780
|
declare function highlight({ attribute, highlightedTagName, hit, cssClasses, }: HighlightOptions): string;
|
|
1778
1781
|
|
|
1779
1782
|
declare type HighlightClassNames = HighlightClassNames_2;
|
|
@@ -2475,9 +2478,13 @@ declare type InstantSearchModule = {
|
|
|
2475
2478
|
routers: typeof routers;
|
|
2476
2479
|
stateMappings: typeof stateMappings;
|
|
2477
2480
|
createInfiniteHitsSessionStorageCache: typeof createInfiniteHitsSessionStorageCache;
|
|
2481
|
+
/** @deprecated use html tagged templates and the Highlight component instead */
|
|
2478
2482
|
highlight: typeof helpers.highlight;
|
|
2483
|
+
/** @deprecated use html tagged templates and the ReverseHighlight component instead */
|
|
2479
2484
|
reverseHighlight: typeof helpers.reverseHighlight;
|
|
2485
|
+
/** @deprecated use html tagged templates and the Snippet component instead */
|
|
2480
2486
|
snippet: typeof helpers.snippet;
|
|
2487
|
+
/** @deprecated use html tagged templates and the ReverseSnippet component instead */
|
|
2481
2488
|
reverseSnippet: typeof helpers.reverseSnippet;
|
|
2482
2489
|
/**
|
|
2483
2490
|
* @deprecated use createInsightsMiddleware
|
|
@@ -3140,19 +3147,26 @@ declare type PaginationTemplates = Partial<{
|
|
|
3140
3147
|
/**
|
|
3141
3148
|
* Label for the Previous link.
|
|
3142
3149
|
*/
|
|
3143
|
-
previous:
|
|
3150
|
+
previous: Template;
|
|
3144
3151
|
/**
|
|
3145
3152
|
* Label for the Next link.
|
|
3146
3153
|
*/
|
|
3147
|
-
next:
|
|
3154
|
+
next: Template;
|
|
3155
|
+
/**
|
|
3156
|
+
* Label for the link of a certain page
|
|
3157
|
+
* Page is one-based, so `page` will be `1` for the first page.
|
|
3158
|
+
*/
|
|
3159
|
+
page: Template<{
|
|
3160
|
+
page: number;
|
|
3161
|
+
}>;
|
|
3148
3162
|
/**
|
|
3149
3163
|
* Label for the First link.
|
|
3150
3164
|
*/
|
|
3151
|
-
first:
|
|
3165
|
+
first: Template;
|
|
3152
3166
|
/**
|
|
3153
3167
|
* Label for the Last link.
|
|
3154
3168
|
*/
|
|
3155
|
-
last:
|
|
3169
|
+
last: Template;
|
|
3156
3170
|
}>;
|
|
3157
3171
|
|
|
3158
3172
|
declare type PaginationWidget = WidgetFactory<PaginationWidgetDescription & {
|
|
@@ -4459,6 +4473,9 @@ declare type RequiredWidgetType<TWidgetDescription extends WidgetDescription> =
|
|
|
4459
4473
|
|
|
4460
4474
|
declare function ReverseHighlight<THit extends Hit<BaseHit>>({ hit, attribute, cssClasses, ...props }: ReverseHighlightProps<THit>): h.JSX.Element;
|
|
4461
4475
|
|
|
4476
|
+
/**
|
|
4477
|
+
* @deprecated use html tagged templates and the ReverseHighlight component instead
|
|
4478
|
+
*/
|
|
4462
4479
|
declare function reverseHighlight({ attribute, highlightedTagName, hit, cssClasses, }: ReverseHighlightOptions): string;
|
|
4463
4480
|
|
|
4464
4481
|
declare type ReverseHighlightClassNames = HighlightClassNames_2;
|
|
@@ -4484,6 +4501,9 @@ declare type ReverseHighlightProps_2 = Omit<HighlightProps_3, 'classNames'> & {
|
|
|
4484
4501
|
|
|
4485
4502
|
declare function ReverseSnippet<THit extends Hit<BaseHit>>({ hit, attribute, cssClasses, ...props }: ReverseSnippetProps<THit>): h.JSX.Element;
|
|
4486
4503
|
|
|
4504
|
+
/**
|
|
4505
|
+
* @deprecated use html tagged templates and the ReverseSnippet component instead
|
|
4506
|
+
*/
|
|
4487
4507
|
declare function reverseSnippet({ attribute, highlightedTagName, hit, cssClasses, }: ReverseSnippetOptions): string;
|
|
4488
4508
|
|
|
4489
4509
|
declare type ReverseSnippetClassNames = HighlightClassNames_2;
|
|
@@ -4770,6 +4790,9 @@ declare function singleIndexStateMapping<TUiState extends UiState = UiState>(ind
|
|
|
4770
4790
|
|
|
4771
4791
|
declare function Snippet<THit extends Hit<BaseHit>>({ hit, attribute, cssClasses, ...props }: SnippetProps<THit>): h.JSX.Element;
|
|
4772
4792
|
|
|
4793
|
+
/**
|
|
4794
|
+
* @deprecated use html tagged templates and the Snippet component instead
|
|
4795
|
+
*/
|
|
4773
4796
|
declare function snippet({ attribute, highlightedTagName, hit, cssClasses, }: SnippetOptions): string;
|
|
4774
4797
|
|
|
4775
4798
|
declare type SnippetClassNames = HighlightClassNames_2;
|