instantsearch.js 4.54.1 → 4.56.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/cjs/components/Breadcrumb/Breadcrumb.js +2 -2
- package/cjs/components/Hits/Hits.js +16 -7
- package/cjs/components/InfiniteHits/InfiniteHits.js +13 -2
- package/cjs/components/RangeInput/RangeInput.js +22 -11
- package/cjs/components/RefinementList/RefinementList.js +34 -52
- package/cjs/components/Slider/Rheostat.js +163 -249
- package/cjs/connectors/autocomplete/connectAutocomplete.js +1 -1
- package/cjs/connectors/geo-search/connectGeoSearch.js +1 -1
- package/cjs/connectors/hierarchical-menu/connectHierarchicalMenu.js +1 -1
- package/cjs/connectors/hits/connectHits.js +1 -1
- package/cjs/connectors/infinite-hits/connectInfiniteHits.js +55 -32
- package/cjs/connectors/menu/connectMenu.js +1 -1
- package/cjs/connectors/numeric-menu/connectNumericMenu.js +1 -1
- package/cjs/connectors/rating-menu/connectRatingMenu.js +7 -3
- package/cjs/connectors/refinement-list/connectRefinementList.js +1 -1
- package/cjs/connectors/toggle-refinement/connectToggleRefinement.js +14 -4
- package/cjs/helpers/insights.js +3 -4
- package/cjs/lib/InstantSearch.js +20 -6
- package/cjs/lib/insights/listener.js +43 -36
- package/cjs/lib/routers/history.js +55 -1
- package/cjs/lib/stateMappings/simple.js +1 -0
- package/cjs/lib/stateMappings/singleIndex.js +1 -0
- package/cjs/lib/utils/createSendEventForFacet.js +12 -2
- package/cjs/lib/utils/createSendEventForHits.js +34 -11
- package/cjs/lib/utils/render-args.js +3 -2
- package/cjs/lib/version.js +1 -1
- package/cjs/middlewares/createInsightsMiddleware.js +135 -33
- package/cjs/middlewares/createMetadataMiddleware.js +17 -5
- package/cjs/middlewares/createRouterMiddleware.js +5 -1
- package/cjs/widgets/hits/hits.js +1 -2
- package/cjs/widgets/hits-per-page/hits-per-page.js +3 -1
- package/cjs/widgets/index/index.js +8 -8
- package/cjs/widgets/infinite-hits/infinite-hits.js +1 -2
- package/dist/instantsearch.development.d.ts +143 -84
- package/dist/instantsearch.development.js +770 -584
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +143 -84
- package/dist/instantsearch.production.min.d.ts +143 -84
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/es/components/Breadcrumb/Breadcrumb.js +2 -2
- package/es/components/GeoSearchControls/GeoSearchButton.d.ts +1 -1
- package/es/components/GeoSearchControls/GeoSearchControls.d.ts +3 -3
- package/es/components/GeoSearchControls/GeoSearchToggle.d.ts +1 -1
- package/es/components/Hits/Hits.d.ts +5 -5
- package/es/components/Hits/Hits.js +15 -5
- package/es/components/InfiniteHits/InfiniteHits.d.ts +3 -2
- package/es/components/InfiniteHits/InfiniteHits.js +13 -2
- package/es/components/Pagination/Pagination.d.ts +2 -2
- package/es/components/RangeInput/RangeInput.d.ts +7 -4
- package/es/components/RangeInput/RangeInput.js +22 -11
- package/es/components/RefinementList/RefinementList.d.ts +0 -1
- package/es/components/RefinementList/RefinementList.js +34 -52
- package/es/components/RelevantSort/RelevantSort.d.ts +1 -1
- package/es/components/Selector/Selector.d.ts +2 -2
- package/es/components/Slider/Rheostat.d.ts +23 -17
- package/es/components/Slider/Rheostat.js +163 -249
- package/es/components/Slider/Slider.d.ts +1 -1
- package/es/connectors/autocomplete/connectAutocomplete.js +1 -1
- package/es/connectors/current-refinements/connectCurrentRefinements.d.ts +2 -2
- package/es/connectors/dynamic-widgets/connectDynamicWidgets.d.ts +2 -2
- package/es/connectors/geo-search/connectGeoSearch.d.ts +7 -7
- package/es/connectors/geo-search/connectGeoSearch.js +1 -1
- package/es/connectors/hierarchical-menu/connectHierarchicalMenu.js +1 -1
- package/es/connectors/hits/connectHits.js +1 -1
- package/es/connectors/infinite-hits/connectInfiniteHits.js +56 -33
- package/es/connectors/menu/connectMenu.d.ts +2 -2
- package/es/connectors/menu/connectMenu.js +1 -1
- package/es/connectors/numeric-menu/connectNumericMenu.js +1 -1
- package/es/connectors/pagination/connectPagination.d.ts +1 -1
- package/es/connectors/range/connectRange.d.ts +3 -3
- package/es/connectors/rating-menu/connectRatingMenu.js +7 -3
- package/es/connectors/refinement-list/connectRefinementList.d.ts +3 -3
- package/es/connectors/refinement-list/connectRefinementList.js +1 -1
- package/es/connectors/relevant-sort/connectRelevantSort.d.ts +1 -1
- package/es/connectors/toggle-refinement/connectToggleRefinement.js +13 -3
- package/es/helpers/insights.d.ts +2 -1
- package/es/helpers/insights.js +3 -3
- package/es/lib/InstantSearch.d.ts +24 -14
- package/es/lib/InstantSearch.js +21 -7
- package/es/lib/insights/listener.d.ts +10 -6
- package/es/lib/insights/listener.js +42 -36
- package/es/lib/routers/history.d.ts +3 -2
- package/es/lib/routers/history.js +56 -2
- package/es/lib/stateMappings/simple.js +1 -0
- package/es/lib/stateMappings/singleIndex.js +1 -0
- package/es/lib/utils/createSendEventForFacet.js +12 -2
- package/es/lib/utils/createSendEventForHits.d.ts +8 -0
- package/es/lib/utils/createSendEventForHits.js +33 -11
- package/es/lib/utils/defer.d.ts +2 -2
- package/es/lib/utils/render-args.js +3 -2
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/middlewares/createInsightsMiddleware.d.ts +12 -12
- package/es/middlewares/createInsightsMiddleware.js +136 -34
- package/es/middlewares/createMetadataMiddleware.d.ts +3 -1
- package/es/middlewares/createMetadataMiddleware.js +17 -5
- package/es/middlewares/createRouterMiddleware.js +5 -1
- package/es/types/insights.d.ts +19 -1
- package/es/types/middleware.d.ts +22 -6
- package/es/types/router.d.ts +15 -7
- package/es/types/widget.d.ts +1 -1
- package/es/widgets/dynamic-widgets/dynamic-widgets.d.ts +2 -2
- package/es/widgets/geo-search/createHTMLMarker.d.ts +1 -1
- package/es/widgets/geo-search/geo-search.d.ts +1 -1
- package/es/widgets/hits/hits.js +2 -3
- package/es/widgets/hits-per-page/hits-per-page.js +3 -1
- package/es/widgets/index/index.d.ts +20 -20
- package/es/widgets/index/index.js +8 -8
- package/es/widgets/infinite-hits/infinite-hits.js +2 -3
- package/es/widgets/panel/panel.d.ts +2 -2
- package/es/widgets/range-slider/range-slider.d.ts +1 -1
- package/package.json +7 -7
|
@@ -8,7 +8,7 @@ import { cx } from '@algolia/ui-components-shared';
|
|
|
8
8
|
import { h, render } from 'preact';
|
|
9
9
|
import InfiniteHits from "../../components/InfiniteHits/InfiniteHits.js";
|
|
10
10
|
import connectInfiniteHits from "../../connectors/infinite-hits/connectInfiniteHits.js";
|
|
11
|
-
import { withInsights
|
|
11
|
+
import { withInsights } from "../../lib/insights/index.js";
|
|
12
12
|
import { component } from "../../lib/suit.js";
|
|
13
13
|
import { prepareTemplateProps } from "../../lib/templating/index.js";
|
|
14
14
|
import { getContainerNode, createDocumentationMessageGenerator } from "../../lib/utils/index.js";
|
|
@@ -17,7 +17,6 @@ var withUsage = createDocumentationMessageGenerator({
|
|
|
17
17
|
name: 'infinite-hits'
|
|
18
18
|
});
|
|
19
19
|
var suit = component('InfiniteHits');
|
|
20
|
-
var InfiniteHitsWithInsightsListener = withInsightsListener(InfiniteHits);
|
|
21
20
|
var renderer = function renderer(_ref) {
|
|
22
21
|
var containerNode = _ref.containerNode,
|
|
23
22
|
cssClasses = _ref.cssClasses,
|
|
@@ -43,7 +42,7 @@ var renderer = function renderer(_ref) {
|
|
|
43
42
|
});
|
|
44
43
|
return;
|
|
45
44
|
}
|
|
46
|
-
render(h(
|
|
45
|
+
render(h(InfiniteHits, {
|
|
47
46
|
cssClasses: cssClasses,
|
|
48
47
|
hits: hits,
|
|
49
48
|
results: results,
|
|
@@ -65,12 +65,12 @@ export type PanelWidgetParams<TWidgetFactory extends AnyWidgetFactory> = {
|
|
|
65
65
|
* A function that is called on each render to determine if the
|
|
66
66
|
* panel should be hidden based on the render options.
|
|
67
67
|
*/
|
|
68
|
-
hidden
|
|
68
|
+
hidden?: (options: PanelRenderOptions<TWidgetFactory>) => boolean;
|
|
69
69
|
/**
|
|
70
70
|
* A function that is called on each render to determine if the
|
|
71
71
|
* panel should be collapsed based on the render options.
|
|
72
72
|
*/
|
|
73
|
-
collapsed
|
|
73
|
+
collapsed?: (options: PanelRenderOptions<TWidgetFactory>) => boolean;
|
|
74
74
|
/**
|
|
75
75
|
* The templates to use for the widget.
|
|
76
76
|
*/
|
|
@@ -18,7 +18,7 @@ type RangeSliderTooltipOptions = {
|
|
|
18
18
|
* @example
|
|
19
19
|
* { format(rawValue) {return '$' + Math.round(rawValue).toLocaleString() } }
|
|
20
20
|
*/
|
|
21
|
-
format(value: number)
|
|
21
|
+
format: (value: number) => string;
|
|
22
22
|
};
|
|
23
23
|
export type RangeSliderWidgetParams = {
|
|
24
24
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instantsearch.js",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.56.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",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"@types/google.maps": "^3.45.3",
|
|
34
34
|
"@types/hogan.js": "^3.0.0",
|
|
35
35
|
"@types/qs": "^6.5.3",
|
|
36
|
-
"algoliasearch-helper": "^3.
|
|
36
|
+
"algoliasearch-helper": "^3.13.0",
|
|
37
37
|
"hogan.js": "^3.0.2",
|
|
38
38
|
"htm": "^3.0.0",
|
|
39
39
|
"preact": "^10.10.0",
|
|
40
40
|
"qs": "^6.5.1 < 6.10",
|
|
41
|
-
"search-insights": "^2.
|
|
41
|
+
"search-insights": "^2.6.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"algoliasearch": ">= 3.1 < 6"
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"version": "./scripts/version/update-version.js"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@instantsearch/mocks": "1.
|
|
59
|
-
"@instantsearch/tests": "1.
|
|
60
|
-
"@instantsearch/testutils": "1.0
|
|
58
|
+
"@instantsearch/mocks": "1.13.0",
|
|
59
|
+
"@instantsearch/tests": "1.13.0",
|
|
60
|
+
"@instantsearch/testutils": "1.2.0",
|
|
61
61
|
"@storybook/html": "5.3.9",
|
|
62
62
|
"@types/scriptjs": "0.0.2",
|
|
63
63
|
"algoliasearch": "4.14.3",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"scriptjs": "2.5.9",
|
|
66
66
|
"webpack": "4.41.5"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "ea054eab1484a3d167db83bc768f6ea134add5f9"
|
|
69
69
|
}
|