@appbaseio/reactivesearch-vue 1.33.5 → 1.34.0-alpha.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/dist/@appbaseio/reactivesearch-vue.umd.js +6840 -9315
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +7 -13
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-626c5e8e.js +58 -0
- package/dist/cjs/{CancelSvg-220a7cc3.js → CancelSvg-062a42f0.js} +32 -40
- package/dist/cjs/Card-c381ded3.js +26 -0
- package/dist/cjs/{ComponentWrapper-b6d4660c.js → ComponentWrapper-db45cc6d.js} +5 -5
- package/dist/cjs/Container-29f049b2.js +12 -0
- package/dist/cjs/{DataSearch-1c5c2202.js → DataSearch-7c71ec9f.js} +712 -850
- package/dist/cjs/DataSearch.js +12 -11
- package/dist/cjs/{DropDown-8984b544.js → DropDown-3b899b20.js} +78 -79
- package/dist/cjs/DynamicRangeSlider.js +51 -37
- package/dist/cjs/Flex-d5675ea6.js +48 -0
- package/dist/cjs/FormControlList-cf1ff2ca.js +42 -0
- package/dist/cjs/Input-4d278ca0.js +74 -0
- package/dist/cjs/ListItem-c067bc07.js +41 -0
- package/dist/cjs/MultiDropdownList.js +71 -62
- package/dist/cjs/MultiList.js +85 -88
- package/dist/cjs/MultiRange.js +54 -41
- package/dist/cjs/{Pagination-07f4dbad.js → Pagination-a468f960.js} +56 -53
- package/dist/cjs/{PreferencesConsumer-5d67b486.js → PreferencesConsumer-034c55e3.js} +6 -5
- package/dist/cjs/RangeInput.js +115 -107
- package/dist/cjs/RangeSlider.js +50 -36
- package/dist/cjs/ReactiveBase.js +66 -48
- package/dist/cjs/{ReactiveComponent-4e75c939.js → ReactiveComponent-f0f486ca.js} +325 -311
- package/dist/cjs/ReactiveComponent.js +21 -20
- package/dist/cjs/ReactiveGoogleMap.js +283 -307
- package/dist/cjs/ReactiveList.js +99 -116
- package/dist/cjs/ResultCard.js +26 -19
- package/dist/cjs/ResultList.js +31 -27
- package/dist/cjs/SelectedFilters.js +49 -34
- package/dist/cjs/SingleDropdownList.js +70 -61
- package/dist/cjs/SingleList.js +86 -90
- package/dist/cjs/SingleRange.js +48 -39
- package/dist/cjs/StateProvider.js +2 -2
- package/dist/cjs/Title-8802a218.js +12 -0
- package/dist/cjs/ToggleButton.js +39 -32
- package/dist/cjs/{index-30126fd0.js → index-dc25b706.js} +6 -6
- package/dist/cjs/index.js +22 -21
- package/dist/cjs/install.js +21 -20
- package/dist/cjs/ssr-eb901d09.js +35 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-7cfc2f98.js → vueTypes-621a8143.js} +1 -1
- package/dist/es/Button-ebafa3d6.js +52 -0
- package/dist/es/{CancelSvg-e40552a5.js → CancelSvg-14ebc9a1.js} +30 -37
- package/dist/es/{Card-19ad6d90.js → Card-1951569e.js} +5 -6
- package/dist/es/{ComponentWrapper-8042aa35.js → ComponentWrapper-bf443c0b.js} +4 -4
- package/dist/es/Container-d00219f7.js +1 -1
- package/dist/es/{DataSearch-5bb904c5.js → DataSearch-4f9a4e46.js} +705 -842
- package/dist/es/DataSearch.js +10 -9
- package/dist/es/{DropDown-28ddce07.js → DropDown-35e232b7.js} +78 -78
- package/dist/es/DynamicRangeSlider.js +48 -34
- package/dist/es/Flex-a08e22d7.js +46 -0
- package/dist/es/FormControlList-fa5cf78b.js +38 -0
- package/dist/es/Input-3b8408a6.js +69 -0
- package/dist/es/{ListItem-07888a65.js → ListItem-47a6345a.js} +6 -7
- package/dist/es/MultiDropdownList.js +69 -60
- package/dist/es/MultiList.js +84 -87
- package/dist/es/MultiRange.js +52 -39
- package/dist/es/{Pagination-28e56c5c.js → Pagination-145b4ff2.js} +56 -53
- package/dist/es/{PreferencesConsumer-bc097ebb.js → PreferencesConsumer-7ea7313a.js} +5 -4
- package/dist/es/RangeInput.js +112 -103
- package/dist/es/RangeSlider.js +47 -33
- package/dist/es/ReactiveBase.js +65 -46
- package/dist/es/{ReactiveComponent-09c183c8.js → ReactiveComponent-e2fb9eb4.js} +321 -306
- package/dist/es/ReactiveComponent.js +18 -17
- package/dist/es/ReactiveGoogleMap.js +279 -302
- package/dist/es/ReactiveList.js +97 -113
- package/dist/es/ResultCard.js +25 -18
- package/dist/es/ResultList.js +30 -26
- package/dist/es/SelectedFilters.js +47 -32
- package/dist/es/SingleDropdownList.js +68 -59
- package/dist/es/SingleList.js +84 -88
- package/dist/es/SingleRange.js +46 -37
- package/dist/es/StateProvider.js +2 -2
- package/dist/es/Title-863dfa42.js +1 -1
- package/dist/es/ToggleButton.js +37 -30
- package/dist/es/{index-0444a498.js → index-285a43a6.js} +6 -6
- package/dist/es/index.js +19 -18
- package/dist/es/install.js +18 -17
- package/dist/es/ssr-03607d84.js +1 -1
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-8986b709.js → vueTypes-e4af6fe2.js} +1 -1
- package/package.json +8 -8
- package/dist/cjs/Button-841fd06d.js +0 -62
- package/dist/cjs/Card-240f283d.js +0 -30
- package/dist/cjs/Container-e699ea95.js +0 -15
- package/dist/cjs/Flex-ddd7cb6b.js +0 -50
- package/dist/cjs/FormControlList-bbb5cd24.js +0 -45
- package/dist/cjs/Input-ead4cd84.js +0 -77
- package/dist/cjs/ListItem-5088bd6a.js +0 -45
- package/dist/cjs/Title-16042ea0.js +0 -15
- package/dist/cjs/ssr-f2fc1bf6.js +0 -36
- package/dist/es/Button-153cd885.js +0 -53
- package/dist/es/Flex-7c177a10.js +0 -45
- package/dist/es/FormControlList-99797d0a.js +0 -38
- package/dist/es/Input-c09c0b56.js +0 -69
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { Actions, helper, causes } from '@appbaseio/reactivecore';
|
|
2
2
|
import { SEARCH_COMPONENTS_MODES, componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
3
|
import { _ as _taggedTemplateLiteralLoose, a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
+
import { createVNode, defineComponent, isVNode, createTextVNode, mergeProps, h } from 'vue';
|
|
4
5
|
import VueTypes from 'vue-types';
|
|
5
6
|
import { getQueryOptions, suggestionTypes } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
6
|
-
import styled from '@appbaseio/vue-emotion';
|
|
7
|
-
import { B as Button } from './Button-
|
|
8
|
-
import { t as types } from './vueTypes-
|
|
7
|
+
import { styled } from '@appbaseio/vue-emotion';
|
|
8
|
+
import { B as Button } from './Button-ebafa3d6.js';
|
|
9
|
+
import { t as types } from './vueTypes-e4af6fe2.js';
|
|
9
10
|
import { RLConnected } from './ReactiveList.js';
|
|
10
|
-
import { n as decodeHtml, h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, u as updateDefaultQuery, f as updateCustomQuery, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, c as connect } from './index-
|
|
11
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
12
|
-
import { P as PreferencesConsumer } from './PreferencesConsumer-
|
|
11
|
+
import { n as decodeHtml, h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, u as updateDefaultQuery, f as updateCustomQuery, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, c as connect } from './index-285a43a6.js';
|
|
12
|
+
import { C as ComponentWrapper } from './ComponentWrapper-bf443c0b.js';
|
|
13
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-7ea7313a.js';
|
|
13
14
|
import { T as Title } from './Title-863dfa42.js';
|
|
14
15
|
import hotkeys from 'hotkeys-js';
|
|
15
|
-
import { S as SearchSvg, b as SuggestionWrapper, I as InputAddon, M as Mic, T as TagItem, c as TagsContainer, d as InputGroup, C as CustomSvg, e as SuggestionItem, D as DSConnected } from './DataSearch-
|
|
16
|
-
import { C as CancelSvg, a as IconGroup, I as IconWrapper, D as Downshift, b as InputWrapper } from './CancelSvg-
|
|
17
|
-
import { s as suggestionsContainer, I as Input, a as suggestions } from './Input-
|
|
16
|
+
import { S as SearchSvg, b as SuggestionWrapper, I as InputAddon, M as Mic, T as TagItem, c as TagsContainer, d as InputGroup, C as CustomSvg, e as SuggestionItem, D as DSConnected } from './DataSearch-4f9a4e46.js';
|
|
17
|
+
import { C as CancelSvg, a as IconGroup, I as IconWrapper, D as Downshift, b as InputWrapper } from './CancelSvg-14ebc9a1.js';
|
|
18
|
+
import { s as suggestionsContainer, I as Input, a as suggestions } from './Input-3b8408a6.js';
|
|
18
19
|
import { C as Container } from './Container-d00219f7.js';
|
|
20
|
+
import _transformOn from '@vue/babel-helper-vue-transform-on';
|
|
19
21
|
import { ListConnected as ListConnected$3 } from './SingleList.js';
|
|
20
22
|
import { ListConnected as ListConnected$2 } from './MultiList.js';
|
|
21
23
|
import { ListConnected as ListConnected$1 } from './SingleDropdownList.js';
|
|
@@ -32,20 +34,17 @@ var AutofillSvgIcon = styled('button')(_templateObject || (_templateObject = _ta
|
|
|
32
34
|
var AutoFillSvg = {
|
|
33
35
|
name: 'AutoFillSvg',
|
|
34
36
|
render: function render() {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
return createVNode(AutofillSvgIcon, {
|
|
38
|
+
"onClick": this.$attrs.click
|
|
39
|
+
}, {
|
|
40
|
+
"default": function _default() {
|
|
41
|
+
return [createVNode("svg", {
|
|
42
|
+
"viewBox": "0 0 24 24"
|
|
43
|
+
}, [createVNode("path", {
|
|
44
|
+
"d": "M8 17v-7.586l8.293 8.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-8.293-8.293h7.586c0.552 0 1-0.448 1-1s-0.448-1-1-1h-10c-0.552 0-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1z"
|
|
45
|
+
}, null)])];
|
|
39
46
|
}
|
|
40
|
-
}
|
|
41
|
-
"attrs": {
|
|
42
|
-
"viewBox": "0 0 24 24"
|
|
43
|
-
}
|
|
44
|
-
}, [h("path", {
|
|
45
|
-
"attrs": {
|
|
46
|
-
"d": "M8 17v-7.586l8.293 8.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-8.293-8.293h7.586c0.552 0 1-0.448 1-1s-0.448-1-1-1h-10c-0.552 0-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1z"
|
|
47
|
-
}
|
|
48
|
-
})])]);
|
|
47
|
+
});
|
|
49
48
|
},
|
|
50
49
|
methods: {
|
|
51
50
|
clicked: function clicked(e) {
|
|
@@ -55,6 +54,9 @@ var AutoFillSvg = {
|
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
56
|
|
|
57
|
+
function _isSlot(s) {
|
|
58
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
59
|
+
}
|
|
58
60
|
var updateQuery = Actions.updateQuery,
|
|
59
61
|
setCustomQuery = Actions.setCustomQuery,
|
|
60
62
|
setDefaultQuery = Actions.setDefaultQuery,
|
|
@@ -67,7 +69,7 @@ var _debounce = helper.debounce,
|
|
|
67
69
|
withClickIds = helper.withClickIds,
|
|
68
70
|
getResultStats = helper.getResultStats,
|
|
69
71
|
normalizeDataField = helper.normalizeDataField;
|
|
70
|
-
var SearchBox = {
|
|
72
|
+
var SearchBox = defineComponent({
|
|
71
73
|
name: 'SearchBox',
|
|
72
74
|
isTagsMode: false,
|
|
73
75
|
data: function data() {
|
|
@@ -658,31 +660,31 @@ var SearchBox = {
|
|
|
658
660
|
return highlightedIndex === index ? '#eee' : '#fff';
|
|
659
661
|
},
|
|
660
662
|
renderIcon: function renderIcon() {
|
|
661
|
-
var h = this.$createElement;
|
|
662
663
|
if (this.$props.showIcon) {
|
|
663
|
-
return this.$props.icon ||
|
|
664
|
+
return this.$props.icon || createVNode(SearchSvg, null, null);
|
|
664
665
|
}
|
|
665
666
|
return null;
|
|
666
667
|
},
|
|
667
668
|
renderErrorComponent: function renderErrorComponent() {
|
|
668
|
-
var
|
|
669
|
-
var renderError = this.$
|
|
669
|
+
var _this4 = this;
|
|
670
|
+
var renderError = this.$slots.renderError || this.$props.renderError;
|
|
670
671
|
if (this.error && renderError && this.$data.currentValue && !this.isLoading) {
|
|
671
|
-
return
|
|
672
|
-
"
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
672
|
+
return createVNode(SuggestionWrapper, {
|
|
673
|
+
"innerClass": this.$props.innerClass,
|
|
674
|
+
"innerClassName": "error",
|
|
675
|
+
"theme": this.theme,
|
|
676
|
+
"themePreset": this.themePreset
|
|
677
|
+
}, {
|
|
678
|
+
"default": function _default() {
|
|
679
|
+
return [isFunction(renderError) ? renderError(_this4.error) : renderError];
|
|
677
680
|
}
|
|
678
|
-
}
|
|
681
|
+
});
|
|
679
682
|
}
|
|
680
683
|
return null;
|
|
681
684
|
},
|
|
682
685
|
renderCancelIcon: function renderCancelIcon() {
|
|
683
|
-
var h = this.$createElement;
|
|
684
686
|
if (this.$props.showClear) {
|
|
685
|
-
return this.$props.clearIcon ||
|
|
687
|
+
return this.$props.clearIcon || createVNode(CancelSvg, null, null);
|
|
686
688
|
}
|
|
687
689
|
return null;
|
|
688
690
|
},
|
|
@@ -690,49 +692,54 @@ var SearchBox = {
|
|
|
690
692
|
if (finalSuggestionsList === void 0) {
|
|
691
693
|
finalSuggestionsList = [];
|
|
692
694
|
}
|
|
693
|
-
var h = this.$createElement;
|
|
694
695
|
var _this$$props3 = this.$props,
|
|
695
696
|
theme = _this$$props3.theme,
|
|
696
697
|
innerClass = _this$$props3.innerClass;
|
|
697
|
-
var renderNoSuggestion = this.$
|
|
698
|
-
var renderError = this.$
|
|
698
|
+
var renderNoSuggestion = this.$slots.renderNoSuggestion || this.$props.renderNoSuggestion;
|
|
699
|
+
var renderError = this.$slots.renderError || this.$props.renderError;
|
|
699
700
|
var _this$$data = this.$data,
|
|
700
701
|
isOpen = _this$$data.isOpen,
|
|
701
702
|
currentValue = _this$$data.currentValue;
|
|
702
703
|
if (renderNoSuggestion && isOpen && !finalSuggestionsList.length && !this.isLoading && currentValue && !(renderError && this.error)) {
|
|
703
|
-
return
|
|
704
|
-
"
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
"innerClassName": "noSuggestion"
|
|
709
|
-
},
|
|
704
|
+
return createVNode(SuggestionWrapper, {
|
|
705
|
+
"innerClass": innerClass,
|
|
706
|
+
"themePreset": this.themePreset,
|
|
707
|
+
"theme": theme,
|
|
708
|
+
"innerClassName": "noSuggestion",
|
|
710
709
|
"scopedSlots": {
|
|
711
710
|
"default": function _default() {
|
|
712
711
|
return typeof renderNoSuggestion === 'function' ? renderNoSuggestion(currentValue) : renderNoSuggestion;
|
|
713
712
|
}
|
|
714
713
|
}
|
|
715
|
-
});
|
|
714
|
+
}, null);
|
|
716
715
|
}
|
|
717
716
|
return null;
|
|
718
717
|
},
|
|
719
718
|
renderInputAddonBefore: function renderInputAddonBefore() {
|
|
720
|
-
var
|
|
721
|
-
var addonBefore = this.$scopedSlots.addonBefore;
|
|
719
|
+
var addonBefore = this.$slots.addonBefore;
|
|
722
720
|
if (addonBefore) {
|
|
723
|
-
|
|
721
|
+
var _slot;
|
|
722
|
+
return createVNode(InputAddon, {
|
|
724
723
|
"class": "addon-before"
|
|
725
|
-
},
|
|
724
|
+
}, _isSlot(_slot = addonBefore()) ? _slot : {
|
|
725
|
+
"default": function _default() {
|
|
726
|
+
return [_slot];
|
|
727
|
+
}
|
|
728
|
+
});
|
|
726
729
|
}
|
|
727
730
|
return null;
|
|
728
731
|
},
|
|
729
732
|
renderInputAddonAfter: function renderInputAddonAfter() {
|
|
730
|
-
var
|
|
731
|
-
var addonAfter = this.$scopedSlots.addonAfter;
|
|
733
|
+
var addonAfter = this.$slots.addonAfter;
|
|
732
734
|
if (addonAfter) {
|
|
733
|
-
|
|
735
|
+
var _slot2;
|
|
736
|
+
return createVNode(InputAddon, {
|
|
734
737
|
"class": "addon-after"
|
|
735
|
-
},
|
|
738
|
+
}, _isSlot(_slot2 = addonAfter()) ? _slot2 : {
|
|
739
|
+
"default": function _default() {
|
|
740
|
+
return [_slot2];
|
|
741
|
+
}
|
|
742
|
+
});
|
|
736
743
|
}
|
|
737
744
|
return null;
|
|
738
745
|
},
|
|
@@ -744,35 +751,35 @@ var SearchBox = {
|
|
|
744
751
|
});
|
|
745
752
|
},
|
|
746
753
|
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
747
|
-
var
|
|
748
|
-
var h = this.$createElement;
|
|
754
|
+
var _this5 = this;
|
|
749
755
|
var _this$$props4 = this.$props,
|
|
750
756
|
enterButton = _this$$props4.enterButton,
|
|
751
757
|
innerClass = _this$$props4.innerClass;
|
|
752
|
-
var renderEnterButton = this.$
|
|
758
|
+
var renderEnterButton = this.$slots.renderEnterButton;
|
|
753
759
|
if (enterButton) {
|
|
754
760
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
755
761
|
if (renderEnterButton) {
|
|
756
|
-
return renderEnterButton(
|
|
762
|
+
return renderEnterButton(_this5.enterButtonOnClick);
|
|
757
763
|
}
|
|
758
|
-
return
|
|
764
|
+
return createVNode(Button, {
|
|
759
765
|
"class": "enter-btn " + getClassName(innerClass, 'enter-button'),
|
|
760
|
-
"
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
"
|
|
764
|
-
"
|
|
766
|
+
"primary": true,
|
|
767
|
+
"onClick": _this5.enterButtonOnClick
|
|
768
|
+
}, {
|
|
769
|
+
"default": function _default() {
|
|
770
|
+
return [createTextVNode("Search")];
|
|
765
771
|
}
|
|
766
|
-
}
|
|
772
|
+
});
|
|
767
773
|
};
|
|
768
|
-
return
|
|
774
|
+
return createVNode("div", {
|
|
769
775
|
"class": "enter-button-wrapper"
|
|
770
776
|
}, [getEnterButtonMarkup()]);
|
|
771
777
|
}
|
|
772
778
|
return null;
|
|
773
779
|
},
|
|
774
780
|
renderIcons: function renderIcons() {
|
|
775
|
-
var
|
|
781
|
+
var _this6 = this;
|
|
782
|
+
var _slot3, _slot4, _slot5;
|
|
776
783
|
var _this$$props5 = this.$props,
|
|
777
784
|
iconPosition = _this$$props5.iconPosition,
|
|
778
785
|
showClear = _this$$props5.showClear,
|
|
@@ -780,42 +787,48 @@ var SearchBox = {
|
|
|
780
787
|
getMicInstance = _this$$props5.getMicInstance,
|
|
781
788
|
showVoiceSearch = _this$$props5.showVoiceSearch,
|
|
782
789
|
showIcon = _this$$props5.showIcon;
|
|
783
|
-
var renderMic = this.$
|
|
790
|
+
var renderMic = this.$slots.renderMic || this.$props.renderMic;
|
|
784
791
|
var currentValue = this.$data.currentValue;
|
|
785
|
-
return
|
|
786
|
-
"
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
"attrs": {
|
|
811
|
-
"groupPosition": "left",
|
|
812
|
-
"positionType": "absolute"
|
|
792
|
+
return createVNode("div", null, [createVNode(IconGroup, {
|
|
793
|
+
"groupPosition": "right",
|
|
794
|
+
"positionType": "absolute"
|
|
795
|
+
}, {
|
|
796
|
+
"default": function _default() {
|
|
797
|
+
return [currentValue && showClear && createVNode(IconWrapper, {
|
|
798
|
+
"onClick": _this6.clearValue,
|
|
799
|
+
"showIcon": showIcon,
|
|
800
|
+
"isClearIcon": true
|
|
801
|
+
}, _isSlot(_slot3 = _this6.renderCancelIcon()) ? _slot3 : {
|
|
802
|
+
"default": function _default() {
|
|
803
|
+
return [_slot3];
|
|
804
|
+
}
|
|
805
|
+
}), showVoiceSearch && createVNode(Mic, {
|
|
806
|
+
"getInstance": getMicInstance,
|
|
807
|
+
"render": renderMic,
|
|
808
|
+
"handleResult": _this6.handleVoiceResults,
|
|
809
|
+
"className": getClassName(innerClass, 'mic') || null
|
|
810
|
+
}, null), iconPosition === 'right' && showIcon && createVNode(IconWrapper, {
|
|
811
|
+
"onClick": _this6.handleSearchIconClick
|
|
812
|
+
}, _isSlot(_slot4 = _this6.renderIcon()) ? _slot4 : {
|
|
813
|
+
"default": function _default() {
|
|
814
|
+
return [_slot4];
|
|
815
|
+
}
|
|
816
|
+
})];
|
|
813
817
|
}
|
|
814
|
-
},
|
|
815
|
-
"
|
|
816
|
-
|
|
818
|
+
}), createVNode(IconGroup, {
|
|
819
|
+
"groupPosition": "left",
|
|
820
|
+
"positionType": "absolute"
|
|
821
|
+
}, {
|
|
822
|
+
"default": function _default() {
|
|
823
|
+
return [iconPosition === 'left' && showIcon && createVNode(IconWrapper, {
|
|
824
|
+
"onClick": _this6.handleSearchIconClick
|
|
825
|
+
}, _isSlot(_slot5 = _this6.renderIcon()) ? _slot5 : {
|
|
826
|
+
"default": function _default() {
|
|
827
|
+
return [_slot5];
|
|
828
|
+
}
|
|
829
|
+
})];
|
|
817
830
|
}
|
|
818
|
-
}
|
|
831
|
+
})]);
|
|
819
832
|
},
|
|
820
833
|
focusSearchBox: function focusSearchBox(event) {
|
|
821
834
|
var _this$$refs, _this$$refs$this$$pro;
|
|
@@ -828,7 +841,7 @@ var SearchBox = {
|
|
|
828
841
|
(_this$$refs = this.$refs) == null ? void 0 : (_this$$refs$this$$pro = _this$$refs[this.$props.innerRef]) == null ? void 0 : _this$$refs$this$$pro.focus(); // eslint-disable-line
|
|
829
842
|
},
|
|
830
843
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
831
|
-
var
|
|
844
|
+
var _this7 = this;
|
|
832
845
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
833
846
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
834
847
|
if (isEmpty(focusShortcuts)) {
|
|
@@ -843,7 +856,7 @@ var SearchBox = {
|
|
|
843
856
|
function (event, handler) {
|
|
844
857
|
// Prevent the default refresh event under WINDOWS system
|
|
845
858
|
event.preventDefault();
|
|
846
|
-
|
|
859
|
+
_this7.focusSearchBox(event);
|
|
847
860
|
});
|
|
848
861
|
|
|
849
862
|
// if one of modifier keys are used, they are handled below
|
|
@@ -853,7 +866,7 @@ var SearchBox = {
|
|
|
853
866
|
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
854
867
|
var element = modifierKeys[index];
|
|
855
868
|
if (hotkeys[element]) {
|
|
856
|
-
|
|
869
|
+
_this7.focusSearchBox(event);
|
|
857
870
|
break;
|
|
858
871
|
}
|
|
859
872
|
}
|
|
@@ -866,37 +879,33 @@ var SearchBox = {
|
|
|
866
879
|
this.triggerDefaultQuery(value);
|
|
867
880
|
},
|
|
868
881
|
renderAutoFill: function renderAutoFill(suggestion) {
|
|
869
|
-
var
|
|
870
|
-
var h = this.$createElement;
|
|
882
|
+
var _this8 = this;
|
|
871
883
|
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
872
884
|
e.stopPropagation();
|
|
873
|
-
|
|
885
|
+
_this8.onAutofillClick(suggestion);
|
|
874
886
|
};
|
|
875
887
|
/* 👇 avoid showing autofill for category suggestions👇 */
|
|
876
|
-
return suggestion._category ? null :
|
|
877
|
-
"
|
|
878
|
-
|
|
879
|
-
}
|
|
880
|
-
});
|
|
888
|
+
return suggestion._category ? null : createVNode(AutoFillSvg, {
|
|
889
|
+
"onClick": handleAutoFillClick
|
|
890
|
+
}, null);
|
|
881
891
|
},
|
|
882
892
|
renderTag: function renderTag(item) {
|
|
883
|
-
var
|
|
884
|
-
var h = this.$createElement;
|
|
893
|
+
var _this9 = this;
|
|
885
894
|
var innerClass = this.$props.innerClass;
|
|
886
|
-
return
|
|
895
|
+
return createVNode(TagItem, {
|
|
887
896
|
"class": getClassName(innerClass, 'selected-tag') || ''
|
|
888
|
-
},
|
|
889
|
-
"
|
|
890
|
-
"
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
}
|
|
897
|
+
}, {
|
|
898
|
+
"default": function _default() {
|
|
899
|
+
return [createVNode("span", null, [item]), createVNode("span", {
|
|
900
|
+
"role": "img",
|
|
901
|
+
"aria-label": "delete-tag",
|
|
902
|
+
"class": "close-icon",
|
|
903
|
+
"onClick": function onClick() {
|
|
904
|
+
return _this9.clearTag(item);
|
|
905
|
+
}
|
|
906
|
+
}, [createVNode(CancelSvg, null, null)])];
|
|
898
907
|
}
|
|
899
|
-
}
|
|
908
|
+
});
|
|
900
909
|
},
|
|
901
910
|
clearAllTags: function clearAllTags() {
|
|
902
911
|
this.selectedTags = [];
|
|
@@ -915,211 +924,218 @@ var SearchBox = {
|
|
|
915
924
|
}
|
|
916
925
|
},
|
|
917
926
|
renderTags: function renderTags() {
|
|
918
|
-
var
|
|
919
|
-
var h = this.$createElement;
|
|
927
|
+
var _this10 = this;
|
|
920
928
|
if (!Array.isArray(this.selectedTags)) {
|
|
921
929
|
return null;
|
|
922
930
|
}
|
|
923
931
|
var tagsList = [].concat(this.selectedTags);
|
|
924
932
|
var shouldRenderClearAllTag = tagsList.length > 1;
|
|
925
|
-
var renderSelectedTags = this.$
|
|
933
|
+
var renderSelectedTags = this.$slots.renderSelectedTags || this.$props.renderSelectedTags;
|
|
926
934
|
return renderSelectedTags ? renderSelectedTags({
|
|
927
935
|
values: this.selectedTags,
|
|
928
936
|
handleClear: this.clearTag,
|
|
929
937
|
handleClearAll: this.clearAllTags
|
|
930
|
-
}) :
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
938
|
+
}) : createVNode(TagsContainer, null, {
|
|
939
|
+
"default": function _default() {
|
|
940
|
+
return [tagsList.map(function (item) {
|
|
941
|
+
return _this10.renderTag(item);
|
|
942
|
+
}), shouldRenderClearAllTag && createVNode(TagItem, {
|
|
943
|
+
"class": getClassName(_this10.$props.innerClass, 'selected-tag') || ''
|
|
944
|
+
}, {
|
|
945
|
+
"default": function _default() {
|
|
946
|
+
return [createVNode("span", null, [createTextVNode("Clear All")]), createVNode("span", {
|
|
947
|
+
"role": "img",
|
|
948
|
+
"aria-label": "delete-tag",
|
|
949
|
+
"class": "close-icon",
|
|
950
|
+
"onClick": _this10.clearAllTags
|
|
951
|
+
}, [createVNode(CancelSvg, null, null)])];
|
|
952
|
+
}
|
|
953
|
+
})];
|
|
942
954
|
}
|
|
943
|
-
}
|
|
955
|
+
});
|
|
944
956
|
}
|
|
945
957
|
},
|
|
946
958
|
render: function render() {
|
|
947
|
-
var
|
|
948
|
-
var h = arguments[0];
|
|
959
|
+
var _this11 = this;
|
|
949
960
|
var _this$$props6 = this.$props,
|
|
950
961
|
theme = _this$$props6.theme,
|
|
951
962
|
expandSuggestionsContainer = _this$$props6.expandSuggestionsContainer;
|
|
952
|
-
var _this$$
|
|
953
|
-
recentSearchesIcon = _this$$
|
|
954
|
-
popularSearchesIcon = _this$$
|
|
963
|
+
var _this$$slots = this.$slots,
|
|
964
|
+
recentSearchesIcon = _this$$slots.recentSearchesIcon,
|
|
965
|
+
popularSearchesIcon = _this$$slots.popularSearchesIcon;
|
|
955
966
|
var hasSuggestions = Array.isArray(this.normalizedSuggestions) && this.normalizedSuggestions.length;
|
|
956
|
-
var renderItem = this.$
|
|
957
|
-
return
|
|
967
|
+
var renderItem = this.$slots.renderItem || this.$props.renderItem;
|
|
968
|
+
return createVNode(Container, {
|
|
958
969
|
"class": this.$props.className
|
|
959
|
-
},
|
|
960
|
-
"
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
970
|
+
}, {
|
|
971
|
+
"default": function _default() {
|
|
972
|
+
return [_this11.$props.title && createVNode(Title, {
|
|
973
|
+
"class": getClassName(_this11.$props.innerClass, 'title') || ''
|
|
974
|
+
}, {
|
|
975
|
+
"default": function _default() {
|
|
976
|
+
return [_this11.$props.title];
|
|
977
|
+
}
|
|
978
|
+
}), _this11.$props.autosuggest ? createVNode(Downshift, {
|
|
979
|
+
"id": _this11.$props.componentId + "-downshift",
|
|
980
|
+
"handleChange": _this11.onSuggestionSelected,
|
|
981
|
+
"handleMouseup": _this11.handleStateChange,
|
|
982
|
+
"isOpen": _this11.$data.isOpen
|
|
983
|
+
}, {
|
|
984
|
+
"default": function _default(_ref5) {
|
|
985
|
+
var getInputEvents = _ref5.getInputEvents,
|
|
986
|
+
getInputProps = _ref5.getInputProps,
|
|
987
|
+
getItemProps = _ref5.getItemProps,
|
|
988
|
+
getItemEvents = _ref5.getItemEvents,
|
|
989
|
+
isOpen = _ref5.isOpen,
|
|
990
|
+
highlightedIndex = _ref5.highlightedIndex,
|
|
991
|
+
setHighlightedIndex = _ref5.setHighlightedIndex;
|
|
992
|
+
var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
|
|
993
|
+
var getIcon = function getIcon(iconType) {
|
|
994
|
+
switch (iconType) {
|
|
995
|
+
case suggestionTypes.Recent:
|
|
996
|
+
return recentSearchesIcon;
|
|
997
|
+
case suggestionTypes.Popular:
|
|
998
|
+
return popularSearchesIcon;
|
|
999
|
+
default:
|
|
1000
|
+
return null;
|
|
1001
|
+
}
|
|
1002
|
+
};
|
|
1003
|
+
return createVNode("div", null, [_this11.hasCustomRenderer && _this11.getComponent({
|
|
1004
|
+
isOpen: isOpen,
|
|
1005
|
+
getItemProps: getItemProps,
|
|
1006
|
+
getItemEvents: getItemEvents,
|
|
1007
|
+
highlightedIndex: highlightedIndex
|
|
1008
|
+
}), _this11.renderErrorComponent(), !_this11.hasCustomRenderer && isOpen && hasSuggestions ? createVNode("ul", {
|
|
1009
|
+
"class": suggestions(_this11.themePreset, theme) + " " + getClassName(_this11.$props.innerClass, 'list')
|
|
1010
|
+
}, [_this11.normalizedSuggestions.map(function (item, index) {
|
|
1011
|
+
return renderItem ? createVNode("li", mergeProps(getItemProps({
|
|
998
1012
|
item: item
|
|
999
|
-
})
|
|
1000
|
-
"on": _extends({}, getItemEvents({
|
|
1013
|
+
}), getItemEvents({
|
|
1001
1014
|
item: item
|
|
1002
|
-
})
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
"domProps": _extends({}, getItemProps({
|
|
1015
|
+
}), {
|
|
1016
|
+
"key": index + 1 + "-" + item.value,
|
|
1017
|
+
"style": {
|
|
1018
|
+
backgroundColor: _this11.getBackgroundColor(highlightedIndex, index),
|
|
1019
|
+
justifyContent: 'flex-start',
|
|
1020
|
+
alignItems: 'center'
|
|
1021
|
+
}
|
|
1022
|
+
}), [renderItem(item)]) : createVNode("li", mergeProps(getItemProps({
|
|
1011
1023
|
item: item
|
|
1012
|
-
})
|
|
1013
|
-
"on": _extends({}, getItemEvents({
|
|
1024
|
+
}), _transformOn(getItemEvents({
|
|
1014
1025
|
item: item
|
|
1015
|
-
})),
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
"className": getClassName(_this9.$props.innerClass, item._suggestion_type + "-search-icon") || null,
|
|
1026
|
+
})), {
|
|
1027
|
+
"key": index + 1 + "-" + item.value,
|
|
1028
|
+
"style": {
|
|
1029
|
+
backgroundColor: _this11.getBackgroundColor(highlightedIndex, index),
|
|
1030
|
+
justifyContent: 'flex-start',
|
|
1031
|
+
alignItems: 'center'
|
|
1032
|
+
}
|
|
1033
|
+
}), [createVNode("div", {
|
|
1034
|
+
"style": {
|
|
1035
|
+
padding: '0 10px 0 0',
|
|
1036
|
+
display: 'flex'
|
|
1037
|
+
}
|
|
1038
|
+
}, [createVNode(CustomSvg, {
|
|
1039
|
+
"className": getClassName(_this11.$props.innerClass, item._suggestion_type + "-search-icon") || null,
|
|
1030
1040
|
"icon": getIcon(item._suggestion_type),
|
|
1031
1041
|
"type": item._suggestion_type + "-search-icon"
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
"attrs": {
|
|
1035
|
-
"currentValue": _this9.currentValue,
|
|
1042
|
+
}, null)]), createVNode(SuggestionItem, {
|
|
1043
|
+
"currentValue": _this11.currentValue,
|
|
1036
1044
|
"suggestion": item
|
|
1037
|
-
}
|
|
1038
|
-
})
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1045
|
+
}, null), _this11.renderAutoFill(item)]);
|
|
1046
|
+
})]) : _this11.renderNoSuggestions(_this11.normalizedSuggestions)]);
|
|
1047
|
+
};
|
|
1048
|
+
return createVNode("div", {
|
|
1049
|
+
"class": suggestionsContainer
|
|
1050
|
+
}, [createVNode(InputGroup, null, {
|
|
1051
|
+
"default": function _default() {
|
|
1052
|
+
return [_this11.renderInputAddonBefore(), createVNode(InputWrapper, null, {
|
|
1053
|
+
"default": function _default() {
|
|
1054
|
+
return [createVNode(Input, mergeProps(_transformOn(getInputEvents({
|
|
1055
|
+
onInput: _this11.onInputChange,
|
|
1056
|
+
onBlur: function onBlur(e) {
|
|
1057
|
+
_this11.$emit('blur', e, _this11.triggerQuery);
|
|
1058
|
+
},
|
|
1059
|
+
onFocus: _this11.handleFocus,
|
|
1060
|
+
onKeyPress: function onKeyPress(e) {
|
|
1061
|
+
_this11.$emit('keyPress', e, _this11.triggerQuery);
|
|
1062
|
+
_this11.$emit('key-press', e, _this11.triggerQuery);
|
|
1063
|
+
},
|
|
1064
|
+
onKeyDown: function onKeyDown(e) {
|
|
1065
|
+
return _this11.handleKeyDown(e, highlightedIndex);
|
|
1066
|
+
},
|
|
1067
|
+
onKeyUp: function onKeyUp(e) {
|
|
1068
|
+
_this11.$emit('keyUp', e, _this11.triggerQuery);
|
|
1069
|
+
_this11.$emit('key-up', e, _this11.triggerQuery);
|
|
1070
|
+
},
|
|
1071
|
+
onClick: function onClick() {
|
|
1072
|
+
setHighlightedIndex(null);
|
|
1073
|
+
}
|
|
1074
|
+
})), {
|
|
1075
|
+
"id": _this11.$props.componentId + "-input",
|
|
1076
|
+
"showIcon": _this11.$props.showIcon,
|
|
1077
|
+
"showClear": _this11.$props.showClear,
|
|
1078
|
+
"iconPosition": _this11.$props.iconPosition,
|
|
1079
|
+
"ref": _this11.$props.innerRef,
|
|
1080
|
+
"class": getClassName(_this11.$props.innerClass, 'input'),
|
|
1081
|
+
"placeholder": _this11.$props.placeholder,
|
|
1082
|
+
"autoFocus": _this11.$props.autoFocus
|
|
1083
|
+
}, getInputProps({
|
|
1084
|
+
value: _this11.$data.currentValue === null ? '' : _this11.$data.currentValue
|
|
1085
|
+
}), {
|
|
1086
|
+
"themePreset": _this11.themePreset,
|
|
1087
|
+
"autocomplete": "off"
|
|
1088
|
+
}), null), _this11.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()];
|
|
1089
|
+
}
|
|
1090
|
+
}), _this11.renderInputAddonAfter(), _this11.renderEnterButtonElement()];
|
|
1075
1091
|
}
|
|
1076
|
-
})),
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1092
|
+
}), expandSuggestionsContainer && renderSuggestionsDropdown(), _this11.renderTags()]);
|
|
1093
|
+
}
|
|
1094
|
+
}) : createVNode("div", {
|
|
1095
|
+
"class": suggestionsContainer
|
|
1096
|
+
}, [createVNode(InputGroup, null, {
|
|
1097
|
+
"default": function _default() {
|
|
1098
|
+
return [_this11.renderInputAddonBefore(), createVNode(InputWrapper, null, {
|
|
1099
|
+
"default": function _default() {
|
|
1100
|
+
return [createVNode(Input, mergeProps(_transformOn({
|
|
1101
|
+
blur: function blur(e) {
|
|
1102
|
+
_this11.$emit('blur', e, _this11.triggerQuery);
|
|
1103
|
+
},
|
|
1104
|
+
keypress: function keypress(e) {
|
|
1105
|
+
_this11.$emit('keyPress', e, _this11.triggerQuery);
|
|
1106
|
+
_this11.$emit('key-press', e, _this11.triggerQuery);
|
|
1107
|
+
},
|
|
1108
|
+
input: _this11.onInputChange,
|
|
1109
|
+
focus: function focus(e) {
|
|
1110
|
+
_this11.$emit('focus', e, _this11.triggerQuery);
|
|
1111
|
+
},
|
|
1112
|
+
keydown: _this11.handleKeyDown,
|
|
1113
|
+
keyup: function keyup(e) {
|
|
1114
|
+
_this11.$emit('keyUp', e, _this11.triggerQuery);
|
|
1115
|
+
_this11.$emit('key-up', e, _this11.triggerQuery);
|
|
1116
|
+
}
|
|
1117
|
+
}), {
|
|
1118
|
+
"class": getClassName(_this11.$props.innerClass, 'input') || '',
|
|
1119
|
+
"placeholder": _this11.$props.placeholder,
|
|
1120
|
+
"autofocus": _this11.$props.autoFocus,
|
|
1121
|
+
"value": _this11.$data.currentValue ? _this11.$data.currentValue : '',
|
|
1122
|
+
"iconPosition": _this11.$props.iconPosition,
|
|
1123
|
+
"showIcon": _this11.$props.showIcon,
|
|
1124
|
+
"showClear": _this11.$props.showClear,
|
|
1125
|
+
"ref": _this11.$props.innerRef,
|
|
1126
|
+
"themePreset": _this11.themePreset
|
|
1127
|
+
}), null), _this11.renderIcons()];
|
|
1128
|
+
}
|
|
1129
|
+
}), _this11.renderInputAddonAfter(), _this11.renderEnterButtonElement()];
|
|
1130
|
+
}
|
|
1131
|
+
})])];
|
|
1082
1132
|
}
|
|
1083
|
-
})
|
|
1084
|
-
"class": suggestionsContainer
|
|
1085
|
-
}, [h(InputGroup, [this.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
1086
|
-
"class": getClassName(this.$props.innerClass, 'input') || '',
|
|
1087
|
-
"attrs": {
|
|
1088
|
-
"placeholder": this.$props.placeholder,
|
|
1089
|
-
"iconPosition": this.$props.iconPosition,
|
|
1090
|
-
"showIcon": this.$props.showIcon,
|
|
1091
|
-
"showClear": this.$props.showClear,
|
|
1092
|
-
"themePreset": this.themePreset
|
|
1093
|
-
},
|
|
1094
|
-
"on": _extends({}, {
|
|
1095
|
-
blur: function blur(e) {
|
|
1096
|
-
_this9.$emit('blur', e, _this9.triggerQuery);
|
|
1097
|
-
},
|
|
1098
|
-
keypress: function keypress(e) {
|
|
1099
|
-
_this9.$emit('keyPress', e, _this9.triggerQuery);
|
|
1100
|
-
_this9.$emit('key-press', e, _this9.triggerQuery);
|
|
1101
|
-
},
|
|
1102
|
-
input: this.onInputChange,
|
|
1103
|
-
focus: function focus(e) {
|
|
1104
|
-
_this9.$emit('focus', e, _this9.triggerQuery);
|
|
1105
|
-
},
|
|
1106
|
-
keydown: this.handleKeyDown,
|
|
1107
|
-
keyup: function keyup(e) {
|
|
1108
|
-
_this9.$emit('keyUp', e, _this9.triggerQuery);
|
|
1109
|
-
_this9.$emit('key-up', e, _this9.triggerQuery);
|
|
1110
|
-
}
|
|
1111
|
-
}),
|
|
1112
|
-
"domProps": _extends({}, {
|
|
1113
|
-
autofocus: this.$props.autoFocus,
|
|
1114
|
-
value: this.$data.currentValue ? this.$data.currentValue : ''
|
|
1115
|
-
}),
|
|
1116
|
-
"ref": this.$props.innerRef
|
|
1117
|
-
}), this.renderIcons()]), this.renderInputAddonAfter(), this.renderEnterButtonElement()])])]);
|
|
1133
|
+
});
|
|
1118
1134
|
},
|
|
1119
1135
|
destroyed: function destroyed() {
|
|
1120
1136
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
1121
1137
|
}
|
|
1122
|
-
};
|
|
1138
|
+
});
|
|
1123
1139
|
SearchBox.defaultQuery = function (value, props) {
|
|
1124
1140
|
var finalQuery = null;
|
|
1125
1141
|
var fields = normalizeDataField(props.dataField, props.fieldWeights);
|
|
@@ -1442,9 +1458,8 @@ var ReactiveComponent = {
|
|
|
1442
1458
|
}
|
|
1443
1459
|
},
|
|
1444
1460
|
render: function render() {
|
|
1445
|
-
var h = arguments[0];
|
|
1446
1461
|
try {
|
|
1447
|
-
var dom = this.$
|
|
1462
|
+
var dom = this.$slots["default"];
|
|
1448
1463
|
var error = this.error,
|
|
1449
1464
|
isLoading = this.isLoading,
|
|
1450
1465
|
selectedValue = this.selectedValue;
|
|
@@ -1455,7 +1470,7 @@ var ReactiveComponent = {
|
|
|
1455
1470
|
value: selectedValue,
|
|
1456
1471
|
setQuery: this.setQuery
|
|
1457
1472
|
});
|
|
1458
|
-
return
|
|
1473
|
+
return createVNode("div", null, [dom(propsToBePassed)]);
|
|
1459
1474
|
} catch (e) {
|
|
1460
1475
|
return null;
|
|
1461
1476
|
}
|
|
@@ -1538,7 +1553,7 @@ var ConnectedComponent = ComponentWrapper(connect(mapStateToProps$1, mapDispatch
|
|
|
1538
1553
|
});
|
|
1539
1554
|
var RcConnected = PreferencesConsumer({
|
|
1540
1555
|
name: 'RcConnected',
|
|
1541
|
-
render: function render(
|
|
1556
|
+
render: function render() {
|
|
1542
1557
|
var component = ConnectedComponent;
|
|
1543
1558
|
switch (this.$attrs.componentType) {
|
|
1544
1559
|
case componentTypes.reactiveList:
|
|
@@ -1586,8 +1601,8 @@ var RcConnected = PreferencesConsumer({
|
|
|
1586
1601
|
}
|
|
1587
1602
|
return h(component, {
|
|
1588
1603
|
attrs: this.$attrs,
|
|
1589
|
-
on: this.$
|
|
1590
|
-
scopedSlots: this.$
|
|
1604
|
+
on: this.$attrs,
|
|
1605
|
+
scopedSlots: this.$slots,
|
|
1591
1606
|
slots: this.$slots
|
|
1592
1607
|
});
|
|
1593
1608
|
}
|