vue-instantsearch 4.13.4 → 4.13.6
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/package.json +4 -4
- package/src/components/SearchBox.vue +5 -0
- package/src/components/SearchInput.vue +5 -1
- package/src/util/__tests__/createServerRootMixin.test.js +12 -0
- package/src/util/createServerRootMixin.js +5 -2
- package/src/util/vue-compat/index-vue3.js +9 -1
- package/vue2/cjs/index.js +1 -1
- package/vue2/cjs/index.js.map +1 -1
- package/vue2/es/package.json.js +1 -1
- package/vue2/es/src/components/SearchBox.vue.js +1 -1
- package/vue2/es/src/components/SearchBox.vue_rollup-plugin-vue=script.js +1 -1
- package/vue2/es/src/components/SearchInput.vue_rollup-plugin-vue=script.js +1 -1
- package/vue2/es/src/util/createServerRootMixin.js +1 -1
- package/vue2/es/src/util/createServerRootMixin.js.map +1 -1
- package/vue2/umd/index.js +1 -1
- package/vue2/umd/index.js.map +1 -1
- package/vue3/cjs/index.js +1 -1
- package/vue3/cjs/index.js.map +1 -1
- package/vue3/es/package.json.js +1 -1
- package/vue3/es/src/components/SearchBox.vue.js +1 -1
- package/vue3/es/src/components/SearchBox.vue_vue&type=script&lang.js +1 -1
- package/vue3/es/src/components/SearchBox.vue_vue&type=script&lang.js.map +1 -1
- package/vue3/es/src/components/SearchBox.vue_vue&type=template&id=b43316e4&lang.js +2 -0
- package/vue3/es/src/components/SearchBox.vue_vue&type=template&id=b43316e4&lang.js.map +1 -0
- package/vue3/es/src/components/SearchInput.vue.js +1 -1
- package/vue3/es/src/components/SearchInput.vue_vue&type=script&lang.js +1 -1
- package/vue3/es/src/components/SearchInput.vue_vue&type=script&lang.js.map +1 -1
- package/vue3/es/src/components/{SearchInput.vue_vue&type=template&id=3a66396c&lang.js → SearchInput.vue_vue&type=template&id=02fb82e2&lang.js} +1 -1
- package/vue3/es/src/components/{SearchInput.vue_vue&type=template&id=3a66396c&lang.js.map → SearchInput.vue_vue&type=template&id=02fb82e2&lang.js.map} +1 -1
- package/vue3/es/src/util/createServerRootMixin.js +1 -1
- package/vue3/es/src/util/createServerRootMixin.js.map +1 -1
- package/vue3/es/src/util/vue-compat/index-vue3.js +1 -1
- package/vue3/es/src/util/vue-compat/index-vue3.js.map +1 -1
- package/vue3/umd/index.js +1 -1
- package/vue3/umd/index.js.map +1 -1
- package/vue3/es/src/components/SearchBox.vue_vue&type=template&id=47fdc6ba&lang.js +0 -2
- package/vue3/es/src/components/SearchBox.vue_vue&type=template&id=47fdc6ba&lang.js.map +0 -1
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"autocomplete"
|
|
17
17
|
],
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"version": "4.13.
|
|
19
|
+
"version": "4.13.6",
|
|
20
20
|
"files": [
|
|
21
21
|
"vue2",
|
|
22
22
|
"vue3",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"test:exports:vue3": "node ./test/module/vue3/is-es-module.mjs && node ./test/module/vue3/is-cjs-module.cjs"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"instantsearch.js": "4.64.
|
|
38
|
+
"instantsearch.js": "4.64.2",
|
|
39
39
|
"mitt": "^2.1.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@vue/test-utils": "1.3.0",
|
|
61
61
|
"@vue/test-utils2": "npm:@vue/test-utils@2.0.0-rc.11",
|
|
62
62
|
"algoliasearch": "4.14.3",
|
|
63
|
-
"algoliasearch-helper": "3.16.
|
|
63
|
+
"algoliasearch-helper": "3.16.2",
|
|
64
64
|
"instantsearch.css": "8.1.0",
|
|
65
65
|
"rollup": "1.32.1",
|
|
66
66
|
"rollup-plugin-babel": "4.4.0",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"vuex": "3.5.1",
|
|
88
88
|
"vuex4": "npm:vuex@4.0.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "c8411331353d700fab508849c7e93f782f37e4e6"
|
|
91
91
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:autofocus="autofocus"
|
|
14
14
|
:show-loading-indicator="showLoadingIndicator"
|
|
15
15
|
:should-show-loading-indicator="state.isSearchStalled"
|
|
16
|
+
:ignore-composition-events="ignoreCompositionEvents"
|
|
16
17
|
:submit-title="submitTitle"
|
|
17
18
|
:reset-title="resetTitle"
|
|
18
19
|
:class-names="classNames"
|
|
@@ -76,6 +77,10 @@ export default {
|
|
|
76
77
|
type: Boolean,
|
|
77
78
|
default: true,
|
|
78
79
|
},
|
|
80
|
+
ignoreCompositionEvents: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: false,
|
|
83
|
+
},
|
|
79
84
|
submitTitle: {
|
|
80
85
|
type: String,
|
|
81
86
|
default: 'Submit the search query',
|
|
@@ -131,6 +131,10 @@ export default {
|
|
|
131
131
|
type: Boolean,
|
|
132
132
|
default: false,
|
|
133
133
|
},
|
|
134
|
+
ignoreCompositionEvents: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
default: false,
|
|
137
|
+
},
|
|
134
138
|
submitTitle: {
|
|
135
139
|
type: String,
|
|
136
140
|
default: 'Search',
|
|
@@ -161,7 +165,7 @@ export default {
|
|
|
161
165
|
return document.activeElement === this.$refs.input;
|
|
162
166
|
},
|
|
163
167
|
onInput(event) {
|
|
164
|
-
if (
|
|
168
|
+
if (!(this.ignoreCompositionEvents && event.isComposing)) {
|
|
165
169
|
this.$emit('input', event.target.value);
|
|
166
170
|
this.$emit('update:modelValue', event.target.value);
|
|
167
171
|
}
|
|
@@ -317,6 +317,12 @@ See documentation: https://www.algolia.com/doc/api-reference/widgets/instantsear
|
|
|
317
317
|
});
|
|
318
318
|
|
|
319
319
|
expect(state.hello).toEqual({
|
|
320
|
+
requestParams: {
|
|
321
|
+
facets: [],
|
|
322
|
+
hitsPerPage: 100,
|
|
323
|
+
query: '',
|
|
324
|
+
tagFilters: '',
|
|
325
|
+
},
|
|
320
326
|
results: [
|
|
321
327
|
{
|
|
322
328
|
query: '',
|
|
@@ -340,6 +346,12 @@ See documentation: https://www.algolia.com/doc/api-reference/widgets/instantsear
|
|
|
340
346
|
|
|
341
347
|
// Parent's widgets state should not be merged into nested index state
|
|
342
348
|
expect(state.nestedIndex).toEqual({
|
|
349
|
+
requestParams: {
|
|
350
|
+
facets: [],
|
|
351
|
+
hitsPerPage: 100,
|
|
352
|
+
query: '',
|
|
353
|
+
tagFilters: '',
|
|
354
|
+
},
|
|
343
355
|
results: [
|
|
344
356
|
{
|
|
345
357
|
query: '',
|
|
@@ -116,8 +116,11 @@ function augmentInstantSearch(instantSearchOptions, cloneComponent) {
|
|
|
116
116
|
})
|
|
117
117
|
.then(() => renderToString(app))
|
|
118
118
|
.then(() => waitForResults(instance))
|
|
119
|
-
.then(() => {
|
|
120
|
-
initialResults = getInitialResults(
|
|
119
|
+
.then((requestParamsList) => {
|
|
120
|
+
initialResults = getInitialResults(
|
|
121
|
+
instance.mainIndex,
|
|
122
|
+
requestParamsList
|
|
123
|
+
);
|
|
121
124
|
search.hydrate(initialResults);
|
|
122
125
|
return search.getState();
|
|
123
126
|
});
|
|
@@ -49,5 +49,13 @@ export function renderCompat(fn) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export function getDefaultSlot(component) {
|
|
52
|
-
|
|
52
|
+
const $slots = component.$slots || component.slots;
|
|
53
|
+
|
|
54
|
+
if (typeof $slots.default === 'function') {
|
|
55
|
+
// Vue 3
|
|
56
|
+
return $slots.default();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Vue 3 with @vue/compat
|
|
60
|
+
return $slots.default;
|
|
53
61
|
}
|