@appbaseio/reactivesearch-vue 1.35.5 → 1.36.1
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 +35040 -26303
- 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 +109 -76
- package/dist/cjs/{ReactiveComponentPrivate-04f3bf64.js → ReactiveComponentPrivate-3a197e2c.js} +103 -66
- 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 +109 -76
- package/dist/es/{ReactiveComponentPrivate-a774148b.js → ReactiveComponentPrivate-ebe9a60a.js} +103 -66
- 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/es/DataSearch.js
CHANGED
|
@@ -53,7 +53,8 @@ var DataSearch = {
|
|
|
53
53
|
selectedTags: [],
|
|
54
54
|
isOpen: false,
|
|
55
55
|
normalizedSuggestions: [],
|
|
56
|
-
isPending: false
|
|
56
|
+
isPending: false,
|
|
57
|
+
isSuggestionSelected: false
|
|
57
58
|
};
|
|
58
59
|
this.internalComponent = props.componentId + "__internal";
|
|
59
60
|
return this.__state;
|
|
@@ -293,12 +294,23 @@ var DataSearch = {
|
|
|
293
294
|
this.updateQueryHandler(this.componentId, this.$data.currentValue, this.$props);
|
|
294
295
|
}
|
|
295
296
|
},
|
|
297
|
+
isLoading: function isLoading(newVal) {
|
|
298
|
+
if (newVal) {
|
|
299
|
+
this.suggestions = [];
|
|
300
|
+
}
|
|
301
|
+
},
|
|
296
302
|
suggestions: function suggestions(newVal) {
|
|
303
|
+
if (this.isLoading) {
|
|
304
|
+
this.normalizedSuggestions = [];
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
297
307
|
if (Array.isArray(newVal) && this.$data.currentValue.trim().length) {
|
|
298
308
|
// shallow check allows us to set suggestions even if the next set
|
|
299
309
|
// of suggestions are same as the current one
|
|
300
310
|
this.$emit('suggestions', newVal);
|
|
301
|
-
this.normalizedSuggestions
|
|
311
|
+
if (!isEqual(this.normalizedSuggestions, newVal)) {
|
|
312
|
+
this.normalizedSuggestions = this.onSuggestions(newVal);
|
|
313
|
+
}
|
|
302
314
|
}
|
|
303
315
|
},
|
|
304
316
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
@@ -432,12 +444,11 @@ var DataSearch = {
|
|
|
432
444
|
return;
|
|
433
445
|
}
|
|
434
446
|
// Refresh recent searches when value becomes empty
|
|
435
|
-
if (!value &&
|
|
436
|
-
_this.resetStoreForComponent(props.componentId);
|
|
437
|
-
} else if (!value && _this.currentValue && _this.enableRecentSearches) {
|
|
447
|
+
if (props.enableDefaultSuggestions && !value && _this.currentValue && _this.enableRecentSearches) {
|
|
438
448
|
_this.getRecentSearches();
|
|
439
449
|
}
|
|
440
450
|
if (isTagsMode) {
|
|
451
|
+
var isTagAdded = false;
|
|
441
452
|
if (Array.isArray(_this.selectedTags) && _this.selectedTags.length) {
|
|
442
453
|
// check if value already present in selectedTags
|
|
443
454
|
if (typeof value === 'string' && _this.selectedTags.includes(value)) {
|
|
@@ -446,14 +457,36 @@ var DataSearch = {
|
|
|
446
457
|
}
|
|
447
458
|
_this.selectedTags = [].concat(_this.selectedTags);
|
|
448
459
|
if (typeof value === 'string' && !!value) {
|
|
449
|
-
|
|
460
|
+
if (props.strictSelection && cause === causes.SUGGESTION_SELECT) {
|
|
461
|
+
_this.selectedTags.push(value);
|
|
462
|
+
isTagAdded = true;
|
|
463
|
+
} else if (!props.strictSelection) {
|
|
464
|
+
_this.selectedTags.push(value);
|
|
465
|
+
isTagAdded = true;
|
|
466
|
+
}
|
|
450
467
|
} else if (Array.isArray(value) && !isEqual(_this.selectedTags, value)) {
|
|
451
|
-
|
|
468
|
+
if (props.strictSelection && cause === causes.SUGGESTION_SELECT) {
|
|
469
|
+
_this.selectedTags = value;
|
|
470
|
+
isTagAdded = true;
|
|
471
|
+
} else if (!props.strictSelection) {
|
|
472
|
+
_this.selectedTags.push(value);
|
|
473
|
+
isTagAdded = true;
|
|
474
|
+
}
|
|
452
475
|
}
|
|
453
476
|
} else if (value) {
|
|
454
|
-
|
|
477
|
+
if (props.strictSelection && cause === causes.SUGGESTION_SELECT) {
|
|
478
|
+
_this.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
479
|
+
isTagAdded = true;
|
|
480
|
+
} else if (!props.strictSelection) {
|
|
481
|
+
_this.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
482
|
+
isTagAdded = true;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
if (props.strictSelection && !isTagAdded) {
|
|
486
|
+
_this.currentValue = value;
|
|
487
|
+
} else {
|
|
488
|
+
_this.currentValue = '';
|
|
455
489
|
}
|
|
456
|
-
_this.currentValue = '';
|
|
457
490
|
} else {
|
|
458
491
|
_this.currentValue = value;
|
|
459
492
|
}
|
|
@@ -473,7 +506,7 @@ var DataSearch = {
|
|
|
473
506
|
if (props.strictSelection && props.autosuggest) {
|
|
474
507
|
if (cause === causes.SUGGESTION_SELECT || props.value !== undefined) {
|
|
475
508
|
_this.updateQueryHandler(props.componentId, queryHandlerValue, props);
|
|
476
|
-
} else if (_this.currentValue !== '') {
|
|
509
|
+
} else if (_this.currentValue !== '' && !props.strictSelection) {
|
|
477
510
|
_this.setValue('', true);
|
|
478
511
|
}
|
|
479
512
|
} else {
|
|
@@ -487,12 +520,12 @@ var DataSearch = {
|
|
|
487
520
|
_this.$emit('value-change', value);
|
|
488
521
|
// Set the already fetched suggestions if query is same as used last to fetch the hits
|
|
489
522
|
if (value === _this.lastUsedQuery) {
|
|
490
|
-
_this.
|
|
523
|
+
_this.normalizedSuggestions = _this.onSuggestions(_this.suggestions);
|
|
491
524
|
// invoke on suggestions
|
|
492
525
|
_this.$emit('suggestions', _this.suggestions);
|
|
493
526
|
} else if (!value) {
|
|
494
527
|
// reset suggestions
|
|
495
|
-
_this.
|
|
528
|
+
_this.normalizedSuggestions = [];
|
|
496
529
|
// invoke on suggestions
|
|
497
530
|
_this.$emit('suggestions', _this.suggestions);
|
|
498
531
|
}
|
|
@@ -503,11 +536,6 @@ var DataSearch = {
|
|
|
503
536
|
if (props === void 0) {
|
|
504
537
|
props = this.$props;
|
|
505
538
|
}
|
|
506
|
-
if (!value && props.enableDefaultSuggestions === false) {
|
|
507
|
-
// clear Component data from store
|
|
508
|
-
this.resetStoreForComponent(props.componentId);
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
539
|
var defaultQueryOptions;
|
|
512
540
|
var query = DataSearch.defaultQuery(value, props);
|
|
513
541
|
if (this.defaultQuery) {
|
|
@@ -602,17 +630,17 @@ var DataSearch = {
|
|
|
602
630
|
var targetValue = event.target.value;
|
|
603
631
|
var _this$$props2 = this.$props,
|
|
604
632
|
value = _this$$props2.value,
|
|
605
|
-
|
|
606
|
-
size = _this$$props2.size,
|
|
607
|
-
autosuggest = _this$$props2.autosuggest;
|
|
633
|
+
size = _this$$props2.size;
|
|
608
634
|
if (value !== undefined) {
|
|
609
635
|
this.isPending = true;
|
|
610
636
|
}
|
|
611
637
|
// if a suggestion was selected, delegate the handling to suggestion handler
|
|
612
638
|
if (event.key === 'Enter' && (highlightedIndex === null || highlightedIndex < 0 || highlightedIndex === [].concat([].concat(this.suggestionsList).slice(0, size || 10), this.defaultSearchSuggestions, this.topSuggestions).length)) {
|
|
613
639
|
this.isPending = false;
|
|
614
|
-
|
|
615
|
-
|
|
640
|
+
if (!this.isSuggestionSelected) {
|
|
641
|
+
this.setValue(targetValue, true, this.$props, undefined, false);
|
|
642
|
+
this.onValueSelectedHandler(targetValue, causes.ENTER_PRESS);
|
|
643
|
+
}
|
|
616
644
|
}
|
|
617
645
|
// Need to review
|
|
618
646
|
this.$emit('keyDown', event, this.triggerQuery);
|
|
@@ -648,11 +676,16 @@ var DataSearch = {
|
|
|
648
676
|
}
|
|
649
677
|
},
|
|
650
678
|
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
679
|
+
var _this3 = this;
|
|
651
680
|
var value = this.$props.value;
|
|
652
681
|
// Record analytics for selected suggestions
|
|
653
682
|
this.triggerClickAnalytics(suggestion._click_id);
|
|
654
683
|
if (value === undefined) {
|
|
655
684
|
this.setValue(suggestion.value, true, this.$props, causes.SUGGESTION_SELECT);
|
|
685
|
+
this.isSuggestionSelected = true;
|
|
686
|
+
setTimeout(function () {
|
|
687
|
+
_this3.isSuggestionSelected = false;
|
|
688
|
+
}, 50);
|
|
656
689
|
} else if (this.$options.isTagsMode) {
|
|
657
690
|
var emitValue = Array.isArray(this.selectedTags) ? [].concat(this.selectedTags) : [];
|
|
658
691
|
if (this.selectedTags.includes(suggestion.value)) {
|
|
@@ -758,7 +791,7 @@ var DataSearch = {
|
|
|
758
791
|
return null;
|
|
759
792
|
},
|
|
760
793
|
renderTag: function renderTag(item) {
|
|
761
|
-
var
|
|
794
|
+
var _this4 = this;
|
|
762
795
|
var h = this.$createElement;
|
|
763
796
|
var innerClass = this.$props.innerClass;
|
|
764
797
|
return h(TagItem, {
|
|
@@ -771,7 +804,7 @@ var DataSearch = {
|
|
|
771
804
|
"class": "close-icon",
|
|
772
805
|
"on": {
|
|
773
806
|
"click": function click() {
|
|
774
|
-
return
|
|
807
|
+
return _this4.clearTag(item);
|
|
775
808
|
}
|
|
776
809
|
}
|
|
777
810
|
}, [h(CancelSvg)])]);
|
|
@@ -793,7 +826,7 @@ var DataSearch = {
|
|
|
793
826
|
}
|
|
794
827
|
},
|
|
795
828
|
renderTags: function renderTags() {
|
|
796
|
-
var
|
|
829
|
+
var _this5 = this;
|
|
797
830
|
var h = this.$createElement;
|
|
798
831
|
if (!Array.isArray(this.selectedTags)) {
|
|
799
832
|
return null;
|
|
@@ -806,7 +839,7 @@ var DataSearch = {
|
|
|
806
839
|
handleClear: this.clearTag,
|
|
807
840
|
handleClearAll: this.clearAllTags
|
|
808
841
|
}) : h(TagsContainer, [tagsList.map(function (item) {
|
|
809
|
-
return
|
|
842
|
+
return _this5.renderTag(item);
|
|
810
843
|
}), shouldRenderClearAllTag && h(TagItem, {
|
|
811
844
|
"class": getClassName(this.$props.innerClass, 'selected-tag') || ''
|
|
812
845
|
}, [h("span", ["Clear All"]), h("span", {
|
|
@@ -885,7 +918,7 @@ var DataSearch = {
|
|
|
885
918
|
(_this$$refs = this.$refs) == null || (_this$$refs = _this$$refs[this.$props.innerRef]) == null ? void 0 : _this$$refs.focus(); // eslint-disable-line
|
|
886
919
|
},
|
|
887
920
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
888
|
-
var
|
|
921
|
+
var _this6 = this;
|
|
889
922
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
890
923
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
891
924
|
if (isEmpty(focusShortcuts)) {
|
|
@@ -900,7 +933,7 @@ var DataSearch = {
|
|
|
900
933
|
function (event, handler) {
|
|
901
934
|
// Prevent the default refresh event under WINDOWS system
|
|
902
935
|
event.preventDefault();
|
|
903
|
-
|
|
936
|
+
_this6.focusSearchBox(event);
|
|
904
937
|
});
|
|
905
938
|
|
|
906
939
|
// if one of modifier keys are used, they are handled below
|
|
@@ -910,7 +943,7 @@ var DataSearch = {
|
|
|
910
943
|
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
911
944
|
var element = modifierKeys[index];
|
|
912
945
|
if (hotkeys[element]) {
|
|
913
|
-
|
|
946
|
+
_this6.focusSearchBox(event);
|
|
914
947
|
break;
|
|
915
948
|
}
|
|
916
949
|
}
|
|
@@ -918,7 +951,7 @@ var DataSearch = {
|
|
|
918
951
|
}
|
|
919
952
|
},
|
|
920
953
|
render: function render() {
|
|
921
|
-
var
|
|
954
|
+
var _this7 = this;
|
|
922
955
|
var h = arguments[0];
|
|
923
956
|
var _this$$props6 = this.$props,
|
|
924
957
|
theme = _this$$props6.theme,
|
|
@@ -953,14 +986,14 @@ var DataSearch = {
|
|
|
953
986
|
highlightedIndex = _ref4.highlightedIndex,
|
|
954
987
|
setHighlightedIndex = _ref4.setHighlightedIndex;
|
|
955
988
|
var renderSuggestionsContainer = function renderSuggestionsContainer() {
|
|
956
|
-
return h("div", [
|
|
989
|
+
return h("div", [_this7.hasCustomRenderer && _this7.getComponent({
|
|
957
990
|
isOpen: isOpen,
|
|
958
991
|
getItemProps: getItemProps,
|
|
959
992
|
getItemEvents: getItemEvents,
|
|
960
993
|
highlightedIndex: highlightedIndex
|
|
961
|
-
}),
|
|
962
|
-
"class": suggestions(
|
|
963
|
-
}, [
|
|
994
|
+
}), _this7.renderErrorComponent(), !_this7.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
995
|
+
"class": suggestions(_this7.themePreset, theme) + " " + getClassName(_this7.$props.innerClass, 'list')
|
|
996
|
+
}, [_this7.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
964
997
|
return h("li", {
|
|
965
998
|
"domProps": _extends({}, getItemProps({
|
|
966
999
|
item: item
|
|
@@ -970,15 +1003,15 @@ var DataSearch = {
|
|
|
970
1003
|
})),
|
|
971
1004
|
"key": index + 1 + "-" + item.value,
|
|
972
1005
|
"style": {
|
|
973
|
-
backgroundColor:
|
|
1006
|
+
backgroundColor: _this7.getBackgroundColor(highlightedIndex, index)
|
|
974
1007
|
}
|
|
975
1008
|
}, [h(SuggestionItem, {
|
|
976
1009
|
"attrs": {
|
|
977
|
-
"currentValue":
|
|
1010
|
+
"currentValue": _this7.currentValue,
|
|
978
1011
|
"suggestion": item
|
|
979
1012
|
}
|
|
980
1013
|
})]);
|
|
981
|
-
}),
|
|
1014
|
+
}), _this7.defaultSearchSuggestions.map(function (sugg, index) {
|
|
982
1015
|
return h("li", {
|
|
983
1016
|
"domProps": _extends({}, getItemProps({
|
|
984
1017
|
item: sugg
|
|
@@ -986,9 +1019,9 @@ var DataSearch = {
|
|
|
986
1019
|
"on": _extends({}, getItemEvents({
|
|
987
1020
|
item: sugg
|
|
988
1021
|
})),
|
|
989
|
-
"key":
|
|
1022
|
+
"key": _this7.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
990
1023
|
"style": {
|
|
991
|
-
backgroundColor:
|
|
1024
|
+
backgroundColor: _this7.getBackgroundColor(highlightedIndex, _this7.suggestionsList.length + index),
|
|
992
1025
|
justifyContent: 'flex-start'
|
|
993
1026
|
}
|
|
994
1027
|
}, [h("div", {
|
|
@@ -997,28 +1030,28 @@ var DataSearch = {
|
|
|
997
1030
|
}
|
|
998
1031
|
}, [sugg.source && sugg.source._recent_search && h(CustomSvg, {
|
|
999
1032
|
"attrs": {
|
|
1000
|
-
"className": getClassName(
|
|
1033
|
+
"className": getClassName(_this7.$props.innerClass, 'recent-search-icon') || null,
|
|
1001
1034
|
"icon": recentSearchesIcon,
|
|
1002
1035
|
"type": "recent-search-icon"
|
|
1003
1036
|
}
|
|
1004
1037
|
}), sugg.source && sugg.source._popular_suggestion && h(CustomSvg, {
|
|
1005
1038
|
"attrs": {
|
|
1006
|
-
"className": getClassName(
|
|
1039
|
+
"className": getClassName(_this7.$props.innerClass, 'popular-search-icon') || null,
|
|
1007
1040
|
"icon": popularSearchesIcon,
|
|
1008
1041
|
"type": "popular-search-icon"
|
|
1009
1042
|
}
|
|
1010
1043
|
})]), h(SuggestionItem, {
|
|
1011
1044
|
"attrs": {
|
|
1012
|
-
"currentValue":
|
|
1045
|
+
"currentValue": _this7.currentValue,
|
|
1013
1046
|
"suggestion": sugg
|
|
1014
1047
|
}
|
|
1015
1048
|
})]);
|
|
1016
|
-
}), hasQuerySuggestionsRenderer(
|
|
1049
|
+
}), hasQuerySuggestionsRenderer(_this7) ? _this7.getComponent({
|
|
1017
1050
|
isOpen: isOpen,
|
|
1018
1051
|
getItemProps: getItemProps,
|
|
1019
1052
|
getItemEvents: getItemEvents,
|
|
1020
1053
|
highlightedIndex: highlightedIndex
|
|
1021
|
-
}, true) :
|
|
1054
|
+
}, true) : _this7.topSuggestions.map(function (sugg, index) {
|
|
1022
1055
|
return h("li", {
|
|
1023
1056
|
"domProps": _extends({}, getItemProps({
|
|
1024
1057
|
item: sugg
|
|
@@ -1026,9 +1059,9 @@ var DataSearch = {
|
|
|
1026
1059
|
"on": _extends({}, getItemEvents({
|
|
1027
1060
|
item: sugg
|
|
1028
1061
|
})),
|
|
1029
|
-
"key":
|
|
1062
|
+
"key": _this7.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
1030
1063
|
"style": {
|
|
1031
|
-
backgroundColor:
|
|
1064
|
+
backgroundColor: _this7.getBackgroundColor(highlightedIndex, _this7.suggestionsList.length + index),
|
|
1032
1065
|
justifyContent: 'flex-start'
|
|
1033
1066
|
}
|
|
1034
1067
|
}, [h("div", {
|
|
@@ -1037,58 +1070,58 @@ var DataSearch = {
|
|
|
1037
1070
|
}
|
|
1038
1071
|
}, [h(CustomSvg, {
|
|
1039
1072
|
"attrs": {
|
|
1040
|
-
"className": getClassName(
|
|
1073
|
+
"className": getClassName(_this7.$props.innerClass, 'popular-search-icon') || null,
|
|
1041
1074
|
"icon": popularSearchesIcon,
|
|
1042
1075
|
"type": "popular-search-icon"
|
|
1043
1076
|
}
|
|
1044
1077
|
})]), h(SuggestionItem, {
|
|
1045
1078
|
"attrs": {
|
|
1046
|
-
"currentValue":
|
|
1079
|
+
"currentValue": _this7.currentValue,
|
|
1047
1080
|
"suggestion": sugg
|
|
1048
1081
|
}
|
|
1049
1082
|
})]);
|
|
1050
|
-
})]) :
|
|
1083
|
+
})]) : _this7.renderNoSuggestions(_this7.suggestionsList)]);
|
|
1051
1084
|
};
|
|
1052
1085
|
return h("div", {
|
|
1053
1086
|
"class": suggestionsContainer
|
|
1054
|
-
}, [h(InputGroup, [
|
|
1087
|
+
}, [h(InputGroup, [_this7.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
1055
1088
|
"attrs": {
|
|
1056
|
-
"id":
|
|
1057
|
-
"showIcon":
|
|
1058
|
-
"showClear":
|
|
1059
|
-
"iconPosition":
|
|
1060
|
-
"placeholder":
|
|
1061
|
-
"autoFocus":
|
|
1062
|
-
"themePreset":
|
|
1089
|
+
"id": _this7.$props.componentId + "-input",
|
|
1090
|
+
"showIcon": _this7.$props.showIcon,
|
|
1091
|
+
"showClear": _this7.$props.showClear,
|
|
1092
|
+
"iconPosition": _this7.$props.iconPosition,
|
|
1093
|
+
"placeholder": _this7.$props.placeholder,
|
|
1094
|
+
"autoFocus": _this7.$props.autoFocus,
|
|
1095
|
+
"themePreset": _this7.themePreset,
|
|
1063
1096
|
"autocomplete": "off"
|
|
1064
1097
|
},
|
|
1065
|
-
"ref":
|
|
1066
|
-
"class": getClassName(
|
|
1098
|
+
"ref": _this7.$props.innerRef,
|
|
1099
|
+
"class": getClassName(_this7.$props.innerClass, 'input'),
|
|
1067
1100
|
"on": _extends({}, getInputEvents({
|
|
1068
|
-
onInput:
|
|
1101
|
+
onInput: _this7.onInputChange,
|
|
1069
1102
|
onBlur: function onBlur(e) {
|
|
1070
|
-
|
|
1103
|
+
_this7.$emit('blur', e, _this7.triggerQuery);
|
|
1071
1104
|
},
|
|
1072
|
-
onFocus:
|
|
1105
|
+
onFocus: _this7.handleFocus,
|
|
1073
1106
|
onKeyPress: function onKeyPress(e) {
|
|
1074
|
-
|
|
1075
|
-
|
|
1107
|
+
_this7.$emit('keyPress', e, _this7.triggerQuery);
|
|
1108
|
+
_this7.$emit('key-press', e, _this7.triggerQuery);
|
|
1076
1109
|
},
|
|
1077
1110
|
onKeyDown: function onKeyDown(e) {
|
|
1078
|
-
return
|
|
1111
|
+
return _this7.handleKeyDown(e, highlightedIndex);
|
|
1079
1112
|
},
|
|
1080
1113
|
onKeyUp: function onKeyUp(e) {
|
|
1081
|
-
|
|
1082
|
-
|
|
1114
|
+
_this7.$emit('keyUp', e, _this7.triggerQuery);
|
|
1115
|
+
_this7.$emit('key-up', e, _this7.triggerQuery);
|
|
1083
1116
|
},
|
|
1084
1117
|
onClick: function onClick() {
|
|
1085
1118
|
setHighlightedIndex(null);
|
|
1086
1119
|
}
|
|
1087
1120
|
})),
|
|
1088
1121
|
"domProps": _extends({}, getInputProps({
|
|
1089
|
-
value:
|
|
1122
|
+
value: _this7.$data.currentValue === null || typeof _this7.$data.currentValue !== 'string' ? '' : _this7.$data.currentValue
|
|
1090
1123
|
}))
|
|
1091
|
-
}),
|
|
1124
|
+
}), _this7.renderIcons(), !expandSuggestionsContainer && renderSuggestionsContainer()]), ' ', _this7.renderInputAddonAfter()]), expandSuggestionsContainer && renderSuggestionsContainer(), _this7.renderTags()]);
|
|
1092
1125
|
}
|
|
1093
1126
|
}
|
|
1094
1127
|
}) : h("div", {
|
|
@@ -1104,22 +1137,22 @@ var DataSearch = {
|
|
|
1104
1137
|
},
|
|
1105
1138
|
"on": _extends({}, {
|
|
1106
1139
|
blur: function blur(e) {
|
|
1107
|
-
|
|
1140
|
+
_this7.$emit('blur', e, _this7.triggerQuery);
|
|
1108
1141
|
},
|
|
1109
1142
|
keypress: function keypress(e) {
|
|
1110
|
-
|
|
1111
|
-
|
|
1143
|
+
_this7.$emit('keyPress', e, _this7.triggerQuery);
|
|
1144
|
+
_this7.$emit('key-press', e, _this7.triggerQuery);
|
|
1112
1145
|
},
|
|
1113
1146
|
input: this.onInputChange,
|
|
1114
1147
|
focus: function focus(e) {
|
|
1115
|
-
|
|
1148
|
+
_this7.$emit('focus', e, _this7.triggerQuery);
|
|
1116
1149
|
},
|
|
1117
1150
|
keydown: function keydown(e) {
|
|
1118
|
-
|
|
1151
|
+
_this7.handleKeyDown(e, null);
|
|
1119
1152
|
},
|
|
1120
1153
|
keyup: function keyup(e) {
|
|
1121
|
-
|
|
1122
|
-
|
|
1154
|
+
_this7.$emit('keyUp', e, _this7.triggerQuery);
|
|
1155
|
+
_this7.$emit('key-up', e, _this7.triggerQuery);
|
|
1123
1156
|
}
|
|
1124
1157
|
}),
|
|
1125
1158
|
"domProps": _extends({}, {
|