@appbaseio/reactivesearch-vue 1.35.4 → 1.35.5
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/dist/@appbaseio/reactivesearch-vue.umd.js +26303 -34973
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +42 -42
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/DataSearch.js +10 -14
- package/dist/cjs/ReactiveComponent.js +2 -1
- package/dist/cjs/ReactiveComponentPrivate.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/install.js +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/DataSearch.js +10 -14
- package/dist/es/ReactiveComponent.js +2 -1
- package/dist/es/ReactiveComponentPrivate.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/install.js +1 -1
- package/dist/es/version.js +1 -1
- package/package.json +1 -1
- /package/dist/cjs/{ReactiveComponentPrivate-1f2d132b.js → ReactiveComponentPrivate-04f3bf64.js} +0 -0
- /package/dist/es/{ReactiveComponentPrivate-7867affa.js → ReactiveComponentPrivate-a774148b.js} +0 -0
package/dist/cjs/DataSearch.js
CHANGED
|
@@ -300,23 +300,12 @@ var DataSearch = {
|
|
|
300
300
|
this.updateQueryHandler(this.componentId, this.$data.currentValue, this.$props);
|
|
301
301
|
}
|
|
302
302
|
},
|
|
303
|
-
isLoading: function isLoading(newVal) {
|
|
304
|
-
if (newVal) {
|
|
305
|
-
this.suggestions = [];
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
303
|
suggestions: function suggestions(newVal) {
|
|
309
|
-
if (this.isLoading) {
|
|
310
|
-
this.normalizedSuggestions = [];
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
304
|
if (Array.isArray(newVal) && this.$data.currentValue.trim().length) {
|
|
314
305
|
// shallow check allows us to set suggestions even if the next set
|
|
315
306
|
// of suggestions are same as the current one
|
|
316
307
|
this.$emit('suggestions', newVal);
|
|
317
|
-
|
|
318
|
-
this.normalizedSuggestions = this.onSuggestions(newVal);
|
|
319
|
-
}
|
|
308
|
+
this.normalizedSuggestions = this.onSuggestions(newVal);
|
|
320
309
|
}
|
|
321
310
|
},
|
|
322
311
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
@@ -450,7 +439,9 @@ var DataSearch = {
|
|
|
450
439
|
return;
|
|
451
440
|
}
|
|
452
441
|
// Refresh recent searches when value becomes empty
|
|
453
|
-
if (
|
|
442
|
+
if (!value && props.enableDefaultSuggestions === false) {
|
|
443
|
+
_this.resetStoreForComponent(props.componentId);
|
|
444
|
+
} else if (!value && _this.currentValue && _this.enableRecentSearches) {
|
|
454
445
|
_this.getRecentSearches();
|
|
455
446
|
}
|
|
456
447
|
if (isTagsMode) {
|
|
@@ -508,7 +499,7 @@ var DataSearch = {
|
|
|
508
499
|
_this.$emit('suggestions', _this.suggestions);
|
|
509
500
|
} else if (!value) {
|
|
510
501
|
// reset suggestions
|
|
511
|
-
|
|
502
|
+
_this.suggestions = [];
|
|
512
503
|
// invoke on suggestions
|
|
513
504
|
_this.$emit('suggestions', _this.suggestions);
|
|
514
505
|
}
|
|
@@ -519,6 +510,11 @@ var DataSearch = {
|
|
|
519
510
|
if (props === void 0) {
|
|
520
511
|
props = this.$props;
|
|
521
512
|
}
|
|
513
|
+
if (!value && props.enableDefaultSuggestions === false) {
|
|
514
|
+
// clear Component data from store
|
|
515
|
+
this.resetStoreForComponent(props.componentId);
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
522
518
|
var defaultQueryOptions;
|
|
523
519
|
var query = DataSearch.defaultQuery(value, props);
|
|
524
520
|
if (this.defaultQuery) {
|
|
@@ -56,6 +56,7 @@ var ReactiveComponent = {
|
|
|
56
56
|
var props = this.$props;
|
|
57
57
|
this.internalComponent = null;
|
|
58
58
|
this.$defaultQuery = null;
|
|
59
|
+
this.currentValue = this.selectedValue;
|
|
59
60
|
// Set custom query in store
|
|
60
61
|
index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
61
62
|
var customQuery = props.customQuery,
|
|
@@ -140,7 +141,7 @@ var ReactiveComponent = {
|
|
|
140
141
|
},
|
|
141
142
|
watch: {
|
|
142
143
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
143
|
-
if (!isEqual(newVal, oldVal)) {
|
|
144
|
+
if (!isEqual(newVal, oldVal) || !isEqual(newVal, this.currentValue)) {
|
|
144
145
|
this.$emit('data', this.getData());
|
|
145
146
|
this.currentValue = newVal;
|
|
146
147
|
}
|
|
@@ -31,7 +31,7 @@ require('./Input-ead4cd84.js');
|
|
|
31
31
|
require('compute-scroll-into-view');
|
|
32
32
|
require('./Container-e699ea95.js');
|
|
33
33
|
require('vue-highlight-words');
|
|
34
|
-
var ReactiveComponentPrivate = require('./ReactiveComponentPrivate-
|
|
34
|
+
var ReactiveComponentPrivate = require('./ReactiveComponentPrivate-04f3bf64.js');
|
|
35
35
|
require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
36
36
|
require('./FormControlList-bbb5cd24.js');
|
|
37
37
|
require('./utils-83fd01e9.js');
|
package/dist/cjs/index.js
CHANGED
|
@@ -37,7 +37,7 @@ require('compute-scroll-into-view');
|
|
|
37
37
|
require('./Container-e699ea95.js');
|
|
38
38
|
require('vue-highlight-words');
|
|
39
39
|
var DataSearch = require('./DataSearch.js');
|
|
40
|
-
var ReactiveComponentPrivate = require('./ReactiveComponentPrivate-
|
|
40
|
+
var ReactiveComponentPrivate = require('./ReactiveComponentPrivate-04f3bf64.js');
|
|
41
41
|
require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
42
42
|
require('./FormControlList-bbb5cd24.js');
|
|
43
43
|
require('./utils-83fd01e9.js');
|
package/dist/cjs/install.js
CHANGED
|
@@ -37,7 +37,7 @@ require('compute-scroll-into-view');
|
|
|
37
37
|
require('./Container-e699ea95.js');
|
|
38
38
|
require('vue-highlight-words');
|
|
39
39
|
var DataSearch = require('./DataSearch.js');
|
|
40
|
-
var ReactiveComponentPrivate = require('./ReactiveComponentPrivate-
|
|
40
|
+
var ReactiveComponentPrivate = require('./ReactiveComponentPrivate-04f3bf64.js');
|
|
41
41
|
require('@appbaseio/reactivecore/lib/utils/suggestions');
|
|
42
42
|
require('./FormControlList-bbb5cd24.js');
|
|
43
43
|
require('./utils-83fd01e9.js');
|
package/dist/cjs/version.js
CHANGED
package/dist/es/DataSearch.js
CHANGED
|
@@ -293,23 +293,12 @@ var DataSearch = {
|
|
|
293
293
|
this.updateQueryHandler(this.componentId, this.$data.currentValue, this.$props);
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
|
-
isLoading: function isLoading(newVal) {
|
|
297
|
-
if (newVal) {
|
|
298
|
-
this.suggestions = [];
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
296
|
suggestions: function suggestions(newVal) {
|
|
302
|
-
if (this.isLoading) {
|
|
303
|
-
this.normalizedSuggestions = [];
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
297
|
if (Array.isArray(newVal) && this.$data.currentValue.trim().length) {
|
|
307
298
|
// shallow check allows us to set suggestions even if the next set
|
|
308
299
|
// of suggestions are same as the current one
|
|
309
300
|
this.$emit('suggestions', newVal);
|
|
310
|
-
|
|
311
|
-
this.normalizedSuggestions = this.onSuggestions(newVal);
|
|
312
|
-
}
|
|
301
|
+
this.normalizedSuggestions = this.onSuggestions(newVal);
|
|
313
302
|
}
|
|
314
303
|
},
|
|
315
304
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
@@ -443,7 +432,9 @@ var DataSearch = {
|
|
|
443
432
|
return;
|
|
444
433
|
}
|
|
445
434
|
// Refresh recent searches when value becomes empty
|
|
446
|
-
if (
|
|
435
|
+
if (!value && props.enableDefaultSuggestions === false) {
|
|
436
|
+
_this.resetStoreForComponent(props.componentId);
|
|
437
|
+
} else if (!value && _this.currentValue && _this.enableRecentSearches) {
|
|
447
438
|
_this.getRecentSearches();
|
|
448
439
|
}
|
|
449
440
|
if (isTagsMode) {
|
|
@@ -501,7 +492,7 @@ var DataSearch = {
|
|
|
501
492
|
_this.$emit('suggestions', _this.suggestions);
|
|
502
493
|
} else if (!value) {
|
|
503
494
|
// reset suggestions
|
|
504
|
-
|
|
495
|
+
_this.suggestions = [];
|
|
505
496
|
// invoke on suggestions
|
|
506
497
|
_this.$emit('suggestions', _this.suggestions);
|
|
507
498
|
}
|
|
@@ -512,6 +503,11 @@ var DataSearch = {
|
|
|
512
503
|
if (props === void 0) {
|
|
513
504
|
props = this.$props;
|
|
514
505
|
}
|
|
506
|
+
if (!value && props.enableDefaultSuggestions === false) {
|
|
507
|
+
// clear Component data from store
|
|
508
|
+
this.resetStoreForComponent(props.componentId);
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
515
511
|
var defaultQueryOptions;
|
|
516
512
|
var query = DataSearch.defaultQuery(value, props);
|
|
517
513
|
if (this.defaultQuery) {
|
|
@@ -49,6 +49,7 @@ var ReactiveComponent = {
|
|
|
49
49
|
var props = this.$props;
|
|
50
50
|
this.internalComponent = null;
|
|
51
51
|
this.$defaultQuery = null;
|
|
52
|
+
this.currentValue = this.selectedValue;
|
|
52
53
|
// Set custom query in store
|
|
53
54
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
54
55
|
var customQuery = props.customQuery,
|
|
@@ -133,7 +134,7 @@ var ReactiveComponent = {
|
|
|
133
134
|
},
|
|
134
135
|
watch: {
|
|
135
136
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
136
|
-
if (!isEqual(newVal, oldVal)) {
|
|
137
|
+
if (!isEqual(newVal, oldVal) || !isEqual(newVal, this.currentValue)) {
|
|
137
138
|
this.$emit('data', this.getData());
|
|
138
139
|
this.currentValue = newVal;
|
|
139
140
|
}
|
|
@@ -27,7 +27,7 @@ import './Input-c09c0b56.js';
|
|
|
27
27
|
import 'compute-scroll-into-view';
|
|
28
28
|
import './Container-d00219f7.js';
|
|
29
29
|
import 'vue-highlight-words';
|
|
30
|
-
export { R as default } from './ReactiveComponentPrivate-
|
|
30
|
+
export { R as default } from './ReactiveComponentPrivate-a774148b.js';
|
|
31
31
|
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
32
32
|
import './FormControlList-99797d0a.js';
|
|
33
33
|
import './utils-9e5a16a1.js';
|
package/dist/es/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import 'compute-scroll-into-view';
|
|
|
33
33
|
import './Container-d00219f7.js';
|
|
34
34
|
import 'vue-highlight-words';
|
|
35
35
|
export { default as DataSearch } from './DataSearch.js';
|
|
36
|
-
export { R as ReactiveComponentPrivate, S as SearchBox } from './ReactiveComponentPrivate-
|
|
36
|
+
export { R as ReactiveComponentPrivate, S as SearchBox } from './ReactiveComponentPrivate-a774148b.js';
|
|
37
37
|
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
38
38
|
import './FormControlList-99797d0a.js';
|
|
39
39
|
import './utils-9e5a16a1.js';
|
package/dist/es/install.js
CHANGED
|
@@ -33,7 +33,7 @@ import 'compute-scroll-into-view';
|
|
|
33
33
|
import './Container-d00219f7.js';
|
|
34
34
|
import 'vue-highlight-words';
|
|
35
35
|
import DataSearch from './DataSearch.js';
|
|
36
|
-
import { S as SearchBox, R as ReactiveComponentPrivate } from './ReactiveComponentPrivate-
|
|
36
|
+
import { S as SearchBox, R as ReactiveComponentPrivate } from './ReactiveComponentPrivate-a774148b.js';
|
|
37
37
|
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
38
38
|
import './FormControlList-99797d0a.js';
|
|
39
39
|
import './utils-9e5a16a1.js';
|
package/dist/es/version.js
CHANGED
package/package.json
CHANGED
/package/dist/cjs/{ReactiveComponentPrivate-1f2d132b.js → ReactiveComponentPrivate-04f3bf64.js}
RENAMED
|
File without changes
|
/package/dist/es/{ReactiveComponentPrivate-7867affa.js → ReactiveComponentPrivate-a774148b.js}
RENAMED
|
File without changes
|