instantsearch.js 4.64.1 → 4.64.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/SearchBox/SearchBox.js +2 -1
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/search-box/search-box.js +5 -0
- package/dist/instantsearch.development.d.ts +6 -0
- package/dist/instantsearch.development.js +9 -3
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +6 -0
- package/dist/instantsearch.production.min.d.ts +6 -0
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/SearchBox/SearchBox.d.ts +3 -0
- package/es/components/SearchBox/SearchBox.js +2 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/widgets/search-box/search-box.d.ts +6 -0
- package/es/widgets/search-box/search-box.js +5 -0
- package/package.json +5 -5
|
@@ -16,6 +16,7 @@ type SearchBoxProps = {
|
|
|
16
16
|
refine?: (value: string) => void;
|
|
17
17
|
autofocus?: boolean;
|
|
18
18
|
searchAsYouType?: boolean;
|
|
19
|
+
ignoreCompositionEvents?: boolean;
|
|
19
20
|
isSearchStalled?: boolean;
|
|
20
21
|
disabled?: boolean;
|
|
21
22
|
ariaLabel?: string;
|
|
@@ -30,6 +31,7 @@ declare const defaultProps: {
|
|
|
30
31
|
showLoadingIndicator: boolean;
|
|
31
32
|
autofocus: boolean;
|
|
32
33
|
searchAsYouType: boolean;
|
|
34
|
+
ignoreCompositionEvents: boolean;
|
|
33
35
|
isSearchStalled: boolean;
|
|
34
36
|
disabled: boolean;
|
|
35
37
|
ariaLabel: string;
|
|
@@ -51,6 +53,7 @@ declare class SearchBox extends Component<SearchBoxPropsWithDefaultProps, Search
|
|
|
51
53
|
showLoadingIndicator: boolean;
|
|
52
54
|
autofocus: boolean;
|
|
53
55
|
searchAsYouType: boolean;
|
|
56
|
+
ignoreCompositionEvents: boolean;
|
|
54
57
|
isSearchStalled: boolean;
|
|
55
58
|
disabled: boolean;
|
|
56
59
|
ariaLabel: string;
|
|
@@ -22,6 +22,7 @@ var defaultProps = {
|
|
|
22
22
|
showLoadingIndicator: true,
|
|
23
23
|
autofocus: false,
|
|
24
24
|
searchAsYouType: true,
|
|
25
|
+
ignoreCompositionEvents: false,
|
|
25
26
|
isSearchStalled: false,
|
|
26
27
|
disabled: false,
|
|
27
28
|
ariaLabel: 'Search',
|
|
@@ -51,7 +52,7 @@ var SearchBox = /*#__PURE__*/function (_Component) {
|
|
|
51
52
|
refine = _this$props.refine,
|
|
52
53
|
onChange = _this$props.onChange;
|
|
53
54
|
var query = event.target.value;
|
|
54
|
-
if (
|
|
55
|
+
if (!(_this.props.ignoreCompositionEvents && event.isComposing)) {
|
|
55
56
|
if (searchAsYouType) {
|
|
56
57
|
refine(query);
|
|
57
58
|
}
|
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.64.
|
|
1
|
+
declare const _default: "4.64.2";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.64.
|
|
1
|
+
export default '4.64.2';
|
|
@@ -78,6 +78,12 @@ export type SearchBoxWidgetParams = {
|
|
|
78
78
|
* once `<Enter>` is pressed only.
|
|
79
79
|
*/
|
|
80
80
|
searchAsYouType?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Whether to update the search state in the middle of a
|
|
83
|
+
* composition session.
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
ignoreCompositionEvents?: boolean;
|
|
81
87
|
/**
|
|
82
88
|
* Whether to show the reset button
|
|
83
89
|
*/
|
|
@@ -22,6 +22,7 @@ var renderer = function renderer(_ref) {
|
|
|
22
22
|
templates = _ref.templates,
|
|
23
23
|
autofocus = _ref.autofocus,
|
|
24
24
|
searchAsYouType = _ref.searchAsYouType,
|
|
25
|
+
ignoreCompositionEvents = _ref.ignoreCompositionEvents,
|
|
25
26
|
showReset = _ref.showReset,
|
|
26
27
|
showSubmit = _ref.showSubmit,
|
|
27
28
|
showLoadingIndicator = _ref.showLoadingIndicator;
|
|
@@ -35,6 +36,7 @@ var renderer = function renderer(_ref) {
|
|
|
35
36
|
autofocus: autofocus,
|
|
36
37
|
refine: refine,
|
|
37
38
|
searchAsYouType: searchAsYouType,
|
|
39
|
+
ignoreCompositionEvents: ignoreCompositionEvents,
|
|
38
40
|
templates: templates,
|
|
39
41
|
showSubmit: showSubmit,
|
|
40
42
|
showReset: showReset,
|
|
@@ -65,6 +67,8 @@ var searchBox = function searchBox(widgetParams) {
|
|
|
65
67
|
autofocus = _ref3$autofocus === void 0 ? false : _ref3$autofocus,
|
|
66
68
|
_ref3$searchAsYouType = _ref3.searchAsYouType,
|
|
67
69
|
searchAsYouType = _ref3$searchAsYouType === void 0 ? true : _ref3$searchAsYouType,
|
|
70
|
+
_ref3$ignoreCompositi = _ref3.ignoreCompositionEvents,
|
|
71
|
+
ignoreCompositionEvents = _ref3$ignoreCompositi === void 0 ? false : _ref3$ignoreCompositi,
|
|
68
72
|
_ref3$showReset = _ref3.showReset,
|
|
69
73
|
showReset = _ref3$showReset === void 0 ? true : _ref3$showReset,
|
|
70
74
|
_ref3$showSubmit = _ref3.showSubmit,
|
|
@@ -113,6 +117,7 @@ var searchBox = function searchBox(widgetParams) {
|
|
|
113
117
|
templates: templates,
|
|
114
118
|
autofocus: autofocus,
|
|
115
119
|
searchAsYouType: searchAsYouType,
|
|
120
|
+
ignoreCompositionEvents: ignoreCompositionEvents,
|
|
116
121
|
showReset: showReset,
|
|
117
122
|
showSubmit: showSubmit,
|
|
118
123
|
showLoadingIndicator: showLoadingIndicator
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instantsearch.js",
|
|
3
|
-
"version": "4.64.
|
|
3
|
+
"version": "4.64.2",
|
|
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",
|
|
@@ -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.36.0",
|
|
59
|
+
"@instantsearch/tests": "1.36.0",
|
|
60
|
+
"@instantsearch/testutils": "1.25.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.47.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "c8411331353d700fab508849c7e93f782f37e4e6"
|
|
69
69
|
}
|