instantsearch.js 4.56.10 → 4.57.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 +9 -10
- package/cjs/components/CurrentRefinements/CurrentRefinements.js +2 -1
- package/cjs/components/Pagination/Pagination.js +3 -2
- package/cjs/components/SearchBox/SearchBox.js +1 -1
- package/cjs/lib/InstantSearch.js +1 -1
- package/cjs/lib/routers/history.js +1 -1
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/index/index.js +1 -1
- package/dist/instantsearch.development.d.ts +4 -10
- package/dist/instantsearch.development.js +12 -10
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +4 -10
- package/dist/instantsearch.production.min.d.ts +4 -10
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/CurrentRefinements/CurrentRefinements.js +2 -1
- package/es/components/Pagination/Pagination.js +3 -2
- package/es/components/SearchBox/SearchBox.js +1 -1
- package/es/lib/InstantSearch.d.ts +1 -1
- package/es/lib/InstantSearch.js +1 -1
- package/es/lib/routers/history.d.ts +2 -2
- package/es/lib/routers/history.js +1 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/middlewares/createInsightsMiddleware.d.ts +2 -8
- package/es/widgets/index/index.js +1 -1
- package/package.json +7 -7
|
@@ -33,7 +33,7 @@ var CurrentRefinements = function CurrentRefinements(_ref2) {
|
|
|
33
33
|
className: cssClasses.item
|
|
34
34
|
}, h("span", {
|
|
35
35
|
className: cssClasses.label
|
|
36
|
-
}, capitalize(item.label), ":"), item.refinements.map(function (refinement) {
|
|
36
|
+
}, capitalize(item.label), ": "), item.refinements.map(function (refinement) {
|
|
37
37
|
return h("span", {
|
|
38
38
|
key: createItemKey(refinement),
|
|
39
39
|
className: cssClasses.category
|
|
@@ -41,6 +41,7 @@ var CurrentRefinements = function CurrentRefinements(_ref2) {
|
|
|
41
41
|
className: cssClasses.categoryLabel
|
|
42
42
|
}, refinement.attribute === 'query' ? h("q", null, refinement.label) : refinement.label), h("button", {
|
|
43
43
|
className: cssClasses.delete,
|
|
44
|
+
type: "button",
|
|
44
45
|
onClick: handleClick(item.refine.bind(null, refinement))
|
|
45
46
|
}, "\u2715"));
|
|
46
47
|
}));
|
|
@@ -87,11 +87,12 @@ function PaginationLink(_ref) {
|
|
|
87
87
|
createURL = _ref.createURL,
|
|
88
88
|
createClickHandler = _ref.createClickHandler;
|
|
89
89
|
return h("li", {
|
|
90
|
-
className: cx(cssClasses.item,
|
|
90
|
+
className: cx(cssClasses.item, isDisabled && cssClasses.disabledItem, className, isSelected && cssClasses.selectedItem)
|
|
91
91
|
}, isDisabled ? h(Template, {
|
|
92
92
|
rootTagName: "span",
|
|
93
93
|
rootProps: {
|
|
94
|
-
className: cssClasses.link
|
|
94
|
+
className: cssClasses.link,
|
|
95
|
+
'aria-label': ariaLabel
|
|
95
96
|
},
|
|
96
97
|
templateKey: templateKey,
|
|
97
98
|
templates: templates,
|
|
@@ -121,7 +121,7 @@ var SearchBox = /*#__PURE__*/function (_Component) {
|
|
|
121
121
|
/**
|
|
122
122
|
* when the user is typing, we don't want to replace the query typed
|
|
123
123
|
* by the user (state.query) with the query exposed by the connector (props.query)
|
|
124
|
-
* see: https://github.com/algolia/instantsearch
|
|
124
|
+
* see: https://github.com/algolia/instantsearch/issues/4141
|
|
125
125
|
*/
|
|
126
126
|
if (!this.state.focused && nextProps.query !== this.state.query) {
|
|
127
127
|
this.setState({
|
|
@@ -188,7 +188,7 @@ declare class InstantSearch<TUiState extends UiState = UiState, TRouteState = TU
|
|
|
188
188
|
/**
|
|
189
189
|
* Removes all widgets without triggering a search afterwards. This is an **EXPERIMENTAL** feature,
|
|
190
190
|
* if you find an issue with it, please
|
|
191
|
-
* [open an issue](https://github.com/algolia/instantsearch
|
|
191
|
+
* [open an issue](https://github.com/algolia/instantsearch/issues/new?title=Problem%20with%20dispose).
|
|
192
192
|
* @return {undefined} This method does not return anything
|
|
193
193
|
*/
|
|
194
194
|
dispose(): void;
|
package/es/lib/InstantSearch.js
CHANGED
|
@@ -473,7 +473,7 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
|
|
|
473
473
|
/**
|
|
474
474
|
* Removes all widgets without triggering a search afterwards. This is an **EXPERIMENTAL** feature,
|
|
475
475
|
* if you find an issue with it, please
|
|
476
|
-
* [open an issue](https://github.com/algolia/instantsearch
|
|
476
|
+
* [open an issue](https://github.com/algolia/instantsearch/issues/new?title=Problem%20with%20dispose).
|
|
477
477
|
* @return {undefined} This method does not return anything
|
|
478
478
|
*/
|
|
479
479
|
}, {
|
|
@@ -57,7 +57,7 @@ declare class BrowserHistory<TRouteState> implements Router<TRouteState> {
|
|
|
57
57
|
/**
|
|
58
58
|
* Indicates whether the history router is disposed or not.
|
|
59
59
|
*/
|
|
60
|
-
|
|
60
|
+
protected isDisposed: boolean;
|
|
61
61
|
/**
|
|
62
62
|
* Indicates the window.history.length before the last call to
|
|
63
63
|
* window.history.pushState (called in `write`).
|
|
@@ -91,7 +91,7 @@ declare class BrowserHistory<TRouteState> implements Router<TRouteState> {
|
|
|
91
91
|
*
|
|
92
92
|
* It always generates the full URL, not a relative one.
|
|
93
93
|
* This allows to handle cases like using a <base href>.
|
|
94
|
-
* See: https://github.com/algolia/instantsearch
|
|
94
|
+
* See: https://github.com/algolia/instantsearch/issues/790
|
|
95
95
|
*/
|
|
96
96
|
createURL(routeState: TRouteState): string;
|
|
97
97
|
/**
|
|
@@ -173,7 +173,7 @@ var BrowserHistory = /*#__PURE__*/function () {
|
|
|
173
173
|
*
|
|
174
174
|
* It always generates the full URL, not a relative one.
|
|
175
175
|
* This allows to handle cases like using a <base href>.
|
|
176
|
-
* See: https://github.com/algolia/instantsearch
|
|
176
|
+
* See: https://github.com/algolia/instantsearch/issues/790
|
|
177
177
|
*/
|
|
178
178
|
}, {
|
|
179
179
|
key: "createURL",
|
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.
|
|
1
|
+
declare const _default: "4.57.0";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.
|
|
1
|
+
export default '4.57.0';
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import type { InsightsClient, InsightsEvent as _InsightsEvent, InsightsMethod, InternalMiddleware } from '../types';
|
|
1
|
+
import type { InsightsClient, InsightsEvent as _InsightsEvent, InsightsMethod, InsightsMethodMap, InternalMiddleware } from '../types';
|
|
2
2
|
type ProvidedInsightsClient = InsightsClient | null | undefined;
|
|
3
3
|
export type InsightsEvent<TMethod extends InsightsMethod = InsightsMethod> = _InsightsEvent<TMethod>;
|
|
4
4
|
export type InsightsProps<TInsightsClient extends ProvidedInsightsClient = ProvidedInsightsClient> = {
|
|
5
5
|
insightsClient?: TInsightsClient;
|
|
6
|
-
insightsInitParams?:
|
|
7
|
-
userHasOptedOut?: boolean;
|
|
8
|
-
useCookie?: boolean;
|
|
9
|
-
anonymousUserToken?: boolean;
|
|
10
|
-
cookieDuration?: number;
|
|
11
|
-
region?: 'de' | 'us';
|
|
12
|
-
};
|
|
6
|
+
insightsInitParams?: Partial<InsightsMethodMap['init'][0]>;
|
|
13
7
|
onEvent?: (event: InsightsEvent, insightsClient: TInsightsClient) => void;
|
|
14
8
|
};
|
|
15
9
|
export type InsightsClientWithGlobals = InsightsClient & {
|
|
@@ -366,7 +366,7 @@ var index = function index(widgetParams) {
|
|
|
366
366
|
// configuration step. This is mainly for backward compatibility with custom
|
|
367
367
|
// widgets. When the subscription happens before the `init` step, the (static)
|
|
368
368
|
// configuration of the widget is pushed in the URL. That's what we want to avoid.
|
|
369
|
-
// https://github.com/algolia/instantsearch
|
|
369
|
+
// https://github.com/algolia/instantsearch/pull/994/commits/4a672ae3fd78809e213de0368549ef12e9dc9454
|
|
370
370
|
helper.on('change', function (event) {
|
|
371
371
|
var state = event.state;
|
|
372
372
|
var _uiState = event._uiState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instantsearch.js",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.57.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",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"author": "Algolia <support@algolia.com>",
|
|
15
15
|
"license": "MIT",
|
|
16
|
-
"repository": "algolia/instantsearch
|
|
16
|
+
"repository": "algolia/instantsearch",
|
|
17
17
|
"main": "cjs/index.js",
|
|
18
18
|
"module": "es/index.js",
|
|
19
19
|
"jsdelivr": "dist/instantsearch.production.min.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
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.14.
|
|
36
|
+
"algoliasearch-helper": "3.14.2",
|
|
37
37
|
"hogan.js": "^3.0.2",
|
|
38
38
|
"htm": "^3.0.0",
|
|
39
39
|
"preact": "^10.10.0",
|
|
@@ -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.
|
|
58
|
+
"@instantsearch/mocks": "1.26.0",
|
|
59
|
+
"@instantsearch/tests": "1.26.0",
|
|
60
|
+
"@instantsearch/testutils": "1.15.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": "b2196f01f03c6bea37a3aa048e4e5b45a9bbf33d"
|
|
69
69
|
}
|