vue-instantsearch 4.17.2 → 4.17.4

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 CHANGED
@@ -16,7 +16,7 @@
16
16
  "autocomplete"
17
17
  ],
18
18
  "license": "MIT",
19
- "version": "4.17.2",
19
+ "version": "4.17.4",
20
20
  "files": [
21
21
  "vue2",
22
22
  "vue3",
@@ -36,8 +36,8 @@
36
36
  "watch:es": "yarn --silent build --watch"
37
37
  },
38
38
  "dependencies": {
39
- "instantsearch-ui-components": "0.6.0",
40
- "instantsearch.js": "4.71.0",
39
+ "instantsearch-ui-components": "0.7.0",
40
+ "instantsearch.js": "4.72.0",
41
41
  "mitt": "^2.1.0"
42
42
  },
43
43
  "peerDependencies": {
@@ -62,7 +62,7 @@
62
62
  "@vue/test-utils": "1.3.0",
63
63
  "@vue/test-utils2": "npm:@vue/test-utils@2.0.0-rc.11",
64
64
  "algoliasearch": "4.23.2",
65
- "algoliasearch-helper": "3.21.0",
65
+ "algoliasearch-helper": "3.22.0",
66
66
  "instantsearch.css": "8.2.1",
67
67
  "rollup": "1.32.1",
68
68
  "rollup-plugin-babel": "4.4.0",
@@ -89,5 +89,5 @@
89
89
  "vuex": "3.5.1",
90
90
  "vuex4": "npm:vuex@4.0.0"
91
91
  },
92
- "gitHead": "3707501a19e582e8263a3ae5a9d51ff3f5263361"
92
+ "gitHead": "0b125d8a3fb2a5905aea9b6b540e07ab91649215"
93
93
  }
@@ -26,6 +26,8 @@ import {
26
26
  AisStats,
27
27
  AisRatingMenu,
28
28
  AisNumericMenu,
29
+ AisPoweredBy,
30
+ AisMenuSelect,
29
31
  } from '../instantsearch';
30
32
  import { renderCompat } from '../util/vue-compat';
31
33
 
@@ -520,6 +522,38 @@ const testSetups = {
520
522
  createLookingSimilarWidgetTests() {
521
523
  throw new Error('LookingSimilar is not supported in Vue InstantSearch');
522
524
  },
525
+ createPoweredByWidgetTests({ instantSearchOptions, widgetParams }) {
526
+ mountApp(
527
+ {
528
+ render: renderCompat((h) =>
529
+ h(AisInstantSearch, { props: instantSearchOptions }, [
530
+ h(AisPoweredBy, { props: widgetParams }),
531
+ h(GlobalErrorSwallower),
532
+ ])
533
+ ),
534
+ },
535
+ document.body.appendChild(document.createElement('div'))
536
+ );
537
+
538
+ return {
539
+ flavor: 'vue-instantsearch',
540
+ };
541
+ },
542
+ async createMenuSelectWidgetTests({ instantSearchOptions, widgetParams }) {
543
+ mountApp(
544
+ {
545
+ render: renderCompat((h) =>
546
+ h(AisInstantSearch, { props: instantSearchOptions }, [
547
+ h(AisMenuSelect, { props: widgetParams }),
548
+ h(GlobalErrorSwallower),
549
+ ])
550
+ ),
551
+ },
552
+ document.body.appendChild(document.createElement('div'))
553
+ );
554
+
555
+ await nextTick();
556
+ },
523
557
  };
524
558
 
525
559
  const testOptions = {
@@ -556,6 +590,7 @@ const testOptions = {
556
590
  createLookingSimilarWidgetTests: {
557
591
  skippedTests: { 'LookingSimilar widget common tests': true },
558
592
  },
593
+ createPoweredByWidgetTests: undefined,
559
594
  };
560
595
 
561
596
  describe('Common widget tests (Vue InstantSearch)', () => {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="suit()">
2
+ <div :class="[suit(), suit('', theme)]">
3
3
  <a
4
4
  :class="suit('link')"
5
5
  :href="algoliaUrl"
@@ -13,7 +13,7 @@
13
13
  viewBox="0 0 572 64"
14
14
  >
15
15
  <path
16
- :fill="theme === 'dark' ? '#FFF' : '#36395a'"
16
+ :fill="theme === 'dark' ? '#FFF' : '#36395A'"
17
17
  d="M16 48.3c-3.4 0-6.3-.6-8.7-1.7A12.4 12.4 0 0 1 1.9 42C.6 40 0 38 0 35.4h6.5a6.7 6.7 0 0 0 3.9 6c1.4.7 3.3 1.1 5.6 1.1 2.2 0 4-.3 5.4-1a7 7 0 0 0 3-2.4 6 6 0 0 0 1-3.4c0-1.5-.6-2.8-1.9-3.7-1.3-1-3.3-1.6-5.9-1.8l-4-.4c-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-.6-3.8-1.8-5a6.4 6.4 0 0 0-4.8-1.8c-2 0-3.7.7-5 2a7.8 7.8 0 0 0-1.9 5.5v17h-6.4Zm63.8 1a12.2 12.2 0 0 1-10.9-6.2 19 19 0 0 1-1.8-7.3h1.4v12.5h-5.1v-40h6.4v19.8l-2 3.5c.2-3.1.8-5.7 1.9-7.7a11 11 0 0 1 4.4-4.5c1.8-1 3.9-1.5 6.1-1.5a13.4 13.4 0 0 1 12.8 9.1c.7 1.9 1 3.8 1 6v1c0 2.2-.3 4.1-1 6a13.6 13.6 0 0 1-13.2 9.4Zm-1.2-5.5a8.4 8.4 0 0 0 7.9-5c.7-1.5 1.1-3.3 1.1-5.3s-.4-3.8-1.1-5.3a8.7 8.7 0 0 0-3.2-3.6 9.6 9.6 0 0 0-9.2-.2 8.5 8.5 0 0 0-3.3 3.2c-.8 1.4-1.3 3-1.3 5v2.3a9 9 0 0 0 1.3 4.8 9 9 0 0 0 3.4 3c1.4.7 2.8 1 4.4 1Zm27.3 3.9-10-28.9h6.5l9.5 28.9h-6Zm-7.5 12.2v-5.7h4.9c1 0 2-.1 2.9-.4a4 4 0 0 0 2-1.4c.4-.7.9-1.6 1.2-2.7l8.6-30.9h6.2l-9.3 32.4a14 14 0 0 1-2.5 5 8.9 8.9 0 0 1-4 2.8c-1.5.6-3.4.9-5.6.9h-4.4Zm9-12.2v-5.2h6.4v5.2H248Z"
18
18
  />
19
19
  <path
@@ -23,92 +23,7 @@ const defaultProps = {
23
23
  attribute: 'brand',
24
24
  };
25
25
 
26
- it('accepts an attribute prop', () => {
27
- __setState({
28
- ...defaultState,
29
- });
30
-
31
- const props = {
32
- ...defaultProps,
33
- };
34
-
35
- const wrapper = mount(MenuSelect, {
36
- propsData: props,
37
- });
38
-
39
- expect(wrapper.vm.widgetParams.attribute).toBe('brand');
40
- });
41
-
42
- it('accepts a limit prop', () => {
43
- __setState({
44
- ...defaultState,
45
- });
46
-
47
- const props = {
48
- ...defaultProps,
49
- limit: 5,
50
- };
51
-
52
- const wrapper = mount(MenuSelect, {
53
- propsData: props,
54
- });
55
-
56
- expect(wrapper.vm.widgetParams.limit).toBe(5);
57
- });
58
-
59
- it('accepts a sortBy prop', () => {
60
- __setState({
61
- ...defaultState,
62
- });
63
-
64
- const props = {
65
- ...defaultProps,
66
- sortBy: ['name:desc'],
67
- };
68
-
69
- const wrapper = mount(MenuSelect, {
70
- propsData: props,
71
- });
72
-
73
- expect(wrapper.vm.widgetParams.sortBy).toEqual(['name:desc']);
74
- });
75
-
76
- it('accepts a transformItems prop', () => {
77
- __setState({
78
- ...defaultState,
79
- });
80
-
81
- const transformItems = () => {};
82
-
83
- const props = {
84
- ...defaultProps,
85
- transformItems,
86
- };
87
-
88
- const wrapper = mount(MenuSelect, {
89
- propsData: props,
90
- });
91
-
92
- expect(wrapper.vm.widgetParams.transformItems).toBe(transformItems);
93
- });
94
-
95
26
  describe('default render', () => {
96
- it('renders correctly', () => {
97
- __setState({
98
- ...defaultState,
99
- });
100
-
101
- const props = {
102
- ...defaultProps,
103
- };
104
-
105
- const wrapper = mount(MenuSelect, {
106
- propsData: props,
107
- });
108
-
109
- expect(wrapper.html()).toMatchSnapshot();
110
- });
111
-
112
27
  it('renders correctly with custom label', () => {
113
28
  __setState({
114
29
  ...defaultState,
@@ -129,81 +44,6 @@ describe('default render', () => {
129
44
  expect(wrapper.find('option').html()).toContain('None');
130
45
  expect(wrapper.html()).toMatchSnapshot();
131
46
  });
132
-
133
- it('renders correctly with a selected value', () => {
134
- __setState({
135
- ...defaultState,
136
- items: [
137
- { label: 'Apple', value: 'Apple', isRefined: false, count: 50 },
138
- { label: 'Samsung', value: 'Samsung', isRefined: true, count: 20 },
139
- { label: 'Sony', value: 'Sony', isRefined: false, count: 15 },
140
- ],
141
- });
142
-
143
- const props = {
144
- ...defaultProps,
145
- };
146
-
147
- const wrapper = mount(MenuSelect, {
148
- propsData: props,
149
- });
150
-
151
- const selected = wrapper.find('[value="Samsung"]');
152
- const options = wrapper.findAll('option:not([value="Samsung"])');
153
-
154
- expect(selected.element.selected).toBe(true);
155
-
156
- for (let i = 0; i < options.length; i++) {
157
- expect((options[i] || options.at(i)).element.selected).toBe(false);
158
- }
159
- });
160
-
161
- it('renders correctly without refinements', () => {
162
- __setState({
163
- ...defaultState,
164
- canRefine: false,
165
- items: [],
166
- });
167
-
168
- const props = {
169
- ...defaultProps,
170
- };
171
-
172
- const wrapper = mount(MenuSelect, {
173
- propsData: props,
174
- });
175
-
176
- expect(wrapper.html()).toMatchSnapshot();
177
- });
178
-
179
- it('calls refine on select change', async () => {
180
- const refine = jest.fn();
181
-
182
- __setState({
183
- ...defaultState,
184
- refine,
185
- });
186
-
187
- const props = {
188
- ...defaultProps,
189
- };
190
-
191
- const wrapper = mount(MenuSelect, {
192
- propsData: props,
193
- });
194
-
195
- expect(refine).not.toHaveBeenCalled();
196
-
197
- const select = wrapper.find('select');
198
-
199
- // Simulate the change
200
- select.element.value = 'Apple';
201
-
202
- await select.trigger('change');
203
-
204
- expect(refine).toHaveBeenCalledTimes(1);
205
- expect(refine).toHaveBeenCalledWith('Apple');
206
- });
207
47
  });
208
48
 
209
49
  it('exposes send-event method for insights middleware', async () => {
@@ -26,233 +26,6 @@ const defaultProps = {
26
26
  attribute: 'price',
27
27
  };
28
28
 
29
- it('accepts an attribute prop', () => {
30
- __setState({
31
- ...defaultState,
32
- });
33
-
34
- const wrapper = mount(RangeInput, {
35
- propsData: {
36
- ...defaultProps,
37
- },
38
- });
39
-
40
- expect(wrapper.vm.widgetParams.attribute).toBe('price');
41
- });
42
-
43
- it('accepts a min prop', () => {
44
- __setState({
45
- ...defaultState,
46
- });
47
-
48
- const wrapper = mount(RangeInput, {
49
- propsData: {
50
- ...defaultProps,
51
- min: 10,
52
- },
53
- });
54
-
55
- expect(wrapper.vm.widgetParams.min).toBe(10);
56
- });
57
-
58
- it('accepts a max prop', () => {
59
- __setState({
60
- ...defaultState,
61
- });
62
-
63
- const wrapper = mount(RangeInput, {
64
- propsData: {
65
- ...defaultProps,
66
- max: 500,
67
- },
68
- });
69
-
70
- expect(wrapper.vm.widgetParams.max).toBe(500);
71
- });
72
-
73
- it('accepts a precision prop', () => {
74
- __setState({
75
- ...defaultState,
76
- });
77
-
78
- const wrapper = mount(RangeInput, {
79
- propsData: {
80
- ...defaultProps,
81
- precision: 3,
82
- },
83
- });
84
-
85
- expect(wrapper.vm.widgetParams.precision).toBe(3);
86
- });
87
-
88
- describe('rendering', () => {
89
- it('displays correctly with default', () => {
90
- __setState({
91
- ...defaultState,
92
- });
93
-
94
- const wrapper = mount(RangeInput, {
95
- propsData: defaultProps,
96
- });
97
-
98
- expect(wrapper.html()).toMatchSnapshot();
99
- });
100
-
101
- it('displays correctly with a min', () => {
102
- __setState({
103
- ...defaultState,
104
- range: {
105
- ...defaultRange,
106
- min: 100,
107
- },
108
- });
109
-
110
- const wrapper = mount(RangeInput, {
111
- propsData: {
112
- ...defaultProps,
113
- },
114
- });
115
-
116
- expect(wrapper.html()).toMatchSnapshot();
117
- });
118
-
119
- it('displays correctly with a max', () => {
120
- __setState({
121
- ...defaultState,
122
- range: {
123
- ...defaultRange,
124
- max: 100,
125
- },
126
- });
127
-
128
- const wrapper = mount(RangeInput, {
129
- propsData: {
130
- ...defaultProps,
131
- },
132
- });
133
-
134
- expect(wrapper.html()).toMatchSnapshot();
135
- });
136
-
137
- it('displays correctly with a min and a max', () => {
138
- __setState({
139
- ...defaultState,
140
- range: {
141
- min: 10,
142
- max: 37,
143
- },
144
- });
145
-
146
- const wrapper = mount(RangeInput, {
147
- propsData: {
148
- ...defaultProps,
149
- },
150
- });
151
-
152
- expect(wrapper.html()).toMatchSnapshot();
153
- });
154
-
155
- it('displays correctly with a min refinement', () => {
156
- __setState({
157
- ...defaultState,
158
- start: [10, 500],
159
- });
160
-
161
- const wrapper = mount(RangeInput, {
162
- propsData: {
163
- ...defaultProps,
164
- },
165
- });
166
-
167
- expect(wrapper.find('.ais-RangeInput-input--min').element.value).toBe('10');
168
- });
169
-
170
- it('displays correctly with a min refinement equal -Infinity', () => {
171
- __setState({
172
- ...defaultState,
173
- start: [-Infinity, 500],
174
- });
175
-
176
- const wrapper = mount(RangeInput, {
177
- propsData: {
178
- ...defaultProps,
179
- },
180
- });
181
-
182
- expect(wrapper.find('.ais-RangeInput-input--min').element.value).toBe('');
183
- });
184
-
185
- it('displays correctly with a min refinement equal to min range', () => {
186
- __setState({
187
- ...defaultState,
188
- start: [10, 500],
189
- range: {
190
- ...defaultRange,
191
- min: 10,
192
- },
193
- });
194
-
195
- const wrapper = mount(RangeInput, {
196
- propsData: {
197
- ...defaultProps,
198
- },
199
- });
200
-
201
- expect(wrapper.find('.ais-RangeInput-input--min').element.value).toBe('');
202
- });
203
-
204
- it('displays correctly with a max refinement', () => {
205
- __setState({
206
- ...defaultState,
207
- start: [10, 500],
208
- });
209
-
210
- const wrapper = mount(RangeInput, {
211
- propsData: {
212
- ...defaultProps,
213
- },
214
- });
215
-
216
- expect(wrapper.find('.ais-RangeInput-input--max').element.value).toBe(
217
- '500'
218
- );
219
- });
220
-
221
- it('displays correctly with a max refinement equal Infinity', () => {
222
- __setState({
223
- ...defaultState,
224
- start: [10, Infinity],
225
- });
226
-
227
- const wrapper = mount(RangeInput, {
228
- propsData: {
229
- ...defaultProps,
230
- },
231
- });
232
-
233
- expect(wrapper.find('.ais-RangeInput-input--max').element.value).toBe('');
234
- });
235
-
236
- it('displays correctly with a max refinement equal to max range', () => {
237
- __setState({
238
- ...defaultState,
239
- start: [10, 500],
240
- range: {
241
- ...defaultRange,
242
- max: 500,
243
- },
244
- });
245
-
246
- const wrapper = mount(RangeInput, {
247
- propsData: {
248
- ...defaultProps,
249
- },
250
- });
251
-
252
- expect(wrapper.find('.ais-RangeInput-input--max').element.value).toBe('');
253
- });
254
- });
255
-
256
29
  it('exposes send-event method for insights middleware', async () => {
257
30
  const sendEvent = jest.fn();
258
31
  __setState({
@@ -279,93 +52,3 @@ it('exposes send-event method for insights middleware', async () => {
279
52
  await wrapper.find('button').trigger('click');
280
53
  expect(sendEvent).toHaveBeenCalledTimes(1);
281
54
  });
282
-
283
- describe('refinement', () => {
284
- it('uses the value of the inputs when the form is submited', async () => {
285
- const refine = jest.fn();
286
-
287
- __setState({
288
- ...defaultState,
289
- refine,
290
- });
291
-
292
- const wrapper = mount(RangeInput, {
293
- propsData: {
294
- attribute: 'price',
295
- },
296
- });
297
-
298
- const minInput = wrapper.find('.ais-RangeInput-input--min');
299
- minInput.element.value = 100;
300
- await minInput.trigger('change');
301
-
302
- const maxInput = wrapper.find('.ais-RangeInput-input--max');
303
- maxInput.element.value = 106;
304
- await maxInput.trigger('change');
305
-
306
- const form = wrapper.find('form');
307
- await form.trigger('submit');
308
-
309
- expect(refine).toHaveBeenLastCalledWith(['100', '106']);
310
- });
311
-
312
- it('refines correctly when `start` given and user clicks submit without changing input field', async () => {
313
- const refine = jest.fn();
314
- __setState({
315
- refine,
316
- start: [50, 100],
317
- range: {
318
- min: 1,
319
- max: 5000,
320
- },
321
- });
322
-
323
- const wrapper = mount(RangeInput, {
324
- propsData: {
325
- ...defaultProps,
326
- },
327
- });
328
-
329
- const form = wrapper.find('form');
330
- await form.trigger('submit');
331
-
332
- expect(refine).toHaveBeenCalledTimes(1);
333
- expect(refine).toHaveBeenCalledWith([50, 100]);
334
- });
335
-
336
- it('refines correctly even when state changes', async () => {
337
- const refine = jest.fn();
338
- __setState({
339
- ...defaultState,
340
- refine,
341
- });
342
-
343
- const wrapper = mount(RangeInput, {
344
- propsData: {
345
- ...defaultProps,
346
- },
347
- });
348
-
349
- // refine for the first time
350
- const minInput = wrapper.find('.ais-RangeInput-input--min');
351
- minInput.element.value = 10;
352
- await minInput.trigger('change');
353
-
354
- const maxInput = wrapper.find('.ais-RangeInput-input--max');
355
- maxInput.element.value = 100;
356
- await maxInput.trigger('change');
357
-
358
- const form = wrapper.find('form');
359
- await form.trigger('submit');
360
-
361
- expect(refine).toHaveBeenCalledTimes(1);
362
- expect(refine).toHaveBeenCalledWith(['10', '100']);
363
-
364
- // update the state
365
- await wrapper.setData({ state: { start: [50, 200] } }); // min: 10 -> 50, max: 100 -> 200
366
-
367
- await form.trigger('submit');
368
- expect(refine).toHaveBeenCalledTimes(2);
369
- expect(refine).toHaveBeenCalledWith([50, 200]);
370
- });
371
- });
@@ -62,33 +62,6 @@ exports[`custom item slot renders correctly 1`] = `
62
62
  </div>
63
63
  `;
64
64
 
65
- exports[`default render renders correctly 1`] = `
66
- <div class="ais-MenuSelect">
67
- <select class="ais-MenuSelect-select">
68
- <option class="ais-MenuSelect-option"
69
- value
70
- >
71
- See all
72
- </option>
73
- <option class="ais-MenuSelect-option"
74
- value="Apple"
75
- >
76
- Apple (50)
77
- </option>
78
- <option class="ais-MenuSelect-option"
79
- value="Samsung"
80
- >
81
- Samsung (20)
82
- </option>
83
- <option class="ais-MenuSelect-option"
84
- value="Sony"
85
- >
86
- Sony (15)
87
- </option>
88
- </select>
89
- </div>
90
- `;
91
-
92
65
  exports[`default render renders correctly with custom label 1`] = `
93
66
  <div class="ais-MenuSelect">
94
67
  <select class="ais-MenuSelect-select">
@@ -117,15 +90,3 @@ exports[`default render renders correctly with custom label 1`] = `
117
90
  </select>
118
91
  </div>
119
92
  `;
120
-
121
- exports[`default render renders correctly without refinements 1`] = `
122
- <div class="ais-MenuSelect ais-MenuSelect--noRefinement">
123
- <select class="ais-MenuSelect-select">
124
- <option class="ais-MenuSelect-option"
125
- value
126
- >
127
- See all
128
- </option>
129
- </select>
130
- </div>
131
- `;