@appbaseio/reactivesearch-vue 1.34.0-alpha.1 → 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 +6957 -9320
- 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-9318cece.js → ComponentWrapper-db45cc6d.js} +18 -9
- package/dist/cjs/Container-29f049b2.js +12 -0
- package/dist/cjs/{DataSearch-8ea2651a.js → DataSearch-7c71ec9f.js} +749 -881
- 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 +67 -49
- package/dist/cjs/{ReactiveComponent-0a354ed7.js → ReactiveComponent-f0f486ca.js} +326 -315
- 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-240450cc.js → ComponentWrapper-bf443c0b.js} +17 -8
- package/dist/es/Container-d00219f7.js +1 -1
- package/dist/es/{DataSearch-dcaa106b.js → DataSearch-4f9a4e46.js} +742 -873
- 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 +66 -47
- package/dist/es/{ReactiveComponent-9352370c.js → ReactiveComponent-e2fb9eb4.js} +322 -310
- 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 +87 -87
- 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() {
|
|
@@ -267,7 +269,6 @@ var SearchBox = {
|
|
|
267
269
|
// selected value is cleared, call onValueSelected
|
|
268
270
|
this.onValueSelectedHandler('', causes.CLEAR_VALUE);
|
|
269
271
|
}
|
|
270
|
-
// if (this.$props.value === undefined) {
|
|
271
272
|
if (this.$options.isTagsMode) {
|
|
272
273
|
// handling reset of tags through SelectedFilters or URL
|
|
273
274
|
this.selectedTags = [];
|
|
@@ -277,7 +278,6 @@ var SearchBox = {
|
|
|
277
278
|
cause = causes.SUGGESTION_SELECT;
|
|
278
279
|
}
|
|
279
280
|
this.setValue(newVal || '', true, this.$props, cause);
|
|
280
|
-
// }
|
|
281
281
|
}
|
|
282
282
|
},
|
|
283
283
|
focusShortcuts: function focusShortcuts() {
|
|
@@ -420,8 +420,7 @@ var SearchBox = {
|
|
|
420
420
|
if (typeof value === 'string' && !!value) {
|
|
421
421
|
_this.selectedTags.push(value);
|
|
422
422
|
} else if (Array.isArray(value) && !isEqual(_this.selectedTags, value)) {
|
|
423
|
-
|
|
424
|
-
_this.selectedTags = mergedArray;
|
|
423
|
+
_this.selectedTags = value;
|
|
425
424
|
}
|
|
426
425
|
} else if (value) {
|
|
427
426
|
_this.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
@@ -661,31 +660,31 @@ var SearchBox = {
|
|
|
661
660
|
return highlightedIndex === index ? '#eee' : '#fff';
|
|
662
661
|
},
|
|
663
662
|
renderIcon: function renderIcon() {
|
|
664
|
-
var h = this.$createElement;
|
|
665
663
|
if (this.$props.showIcon) {
|
|
666
|
-
return this.$props.icon ||
|
|
664
|
+
return this.$props.icon || createVNode(SearchSvg, null, null);
|
|
667
665
|
}
|
|
668
666
|
return null;
|
|
669
667
|
},
|
|
670
668
|
renderErrorComponent: function renderErrorComponent() {
|
|
671
|
-
var
|
|
672
|
-
var renderError = this.$
|
|
669
|
+
var _this4 = this;
|
|
670
|
+
var renderError = this.$slots.renderError || this.$props.renderError;
|
|
673
671
|
if (this.error && renderError && this.$data.currentValue && !this.isLoading) {
|
|
674
|
-
return
|
|
675
|
-
"
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
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];
|
|
680
680
|
}
|
|
681
|
-
}
|
|
681
|
+
});
|
|
682
682
|
}
|
|
683
683
|
return null;
|
|
684
684
|
},
|
|
685
685
|
renderCancelIcon: function renderCancelIcon() {
|
|
686
|
-
var h = this.$createElement;
|
|
687
686
|
if (this.$props.showClear) {
|
|
688
|
-
return this.$props.clearIcon ||
|
|
687
|
+
return this.$props.clearIcon || createVNode(CancelSvg, null, null);
|
|
689
688
|
}
|
|
690
689
|
return null;
|
|
691
690
|
},
|
|
@@ -693,49 +692,54 @@ var SearchBox = {
|
|
|
693
692
|
if (finalSuggestionsList === void 0) {
|
|
694
693
|
finalSuggestionsList = [];
|
|
695
694
|
}
|
|
696
|
-
var h = this.$createElement;
|
|
697
695
|
var _this$$props3 = this.$props,
|
|
698
696
|
theme = _this$$props3.theme,
|
|
699
697
|
innerClass = _this$$props3.innerClass;
|
|
700
|
-
var renderNoSuggestion = this.$
|
|
701
|
-
var renderError = this.$
|
|
698
|
+
var renderNoSuggestion = this.$slots.renderNoSuggestion || this.$props.renderNoSuggestion;
|
|
699
|
+
var renderError = this.$slots.renderError || this.$props.renderError;
|
|
702
700
|
var _this$$data = this.$data,
|
|
703
701
|
isOpen = _this$$data.isOpen,
|
|
704
702
|
currentValue = _this$$data.currentValue;
|
|
705
703
|
if (renderNoSuggestion && isOpen && !finalSuggestionsList.length && !this.isLoading && currentValue && !(renderError && this.error)) {
|
|
706
|
-
return
|
|
707
|
-
"
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
"innerClassName": "noSuggestion"
|
|
712
|
-
},
|
|
704
|
+
return createVNode(SuggestionWrapper, {
|
|
705
|
+
"innerClass": innerClass,
|
|
706
|
+
"themePreset": this.themePreset,
|
|
707
|
+
"theme": theme,
|
|
708
|
+
"innerClassName": "noSuggestion",
|
|
713
709
|
"scopedSlots": {
|
|
714
710
|
"default": function _default() {
|
|
715
711
|
return typeof renderNoSuggestion === 'function' ? renderNoSuggestion(currentValue) : renderNoSuggestion;
|
|
716
712
|
}
|
|
717
713
|
}
|
|
718
|
-
});
|
|
714
|
+
}, null);
|
|
719
715
|
}
|
|
720
716
|
return null;
|
|
721
717
|
},
|
|
722
718
|
renderInputAddonBefore: function renderInputAddonBefore() {
|
|
723
|
-
var
|
|
724
|
-
var addonBefore = this.$scopedSlots.addonBefore;
|
|
719
|
+
var addonBefore = this.$slots.addonBefore;
|
|
725
720
|
if (addonBefore) {
|
|
726
|
-
|
|
721
|
+
var _slot;
|
|
722
|
+
return createVNode(InputAddon, {
|
|
727
723
|
"class": "addon-before"
|
|
728
|
-
},
|
|
724
|
+
}, _isSlot(_slot = addonBefore()) ? _slot : {
|
|
725
|
+
"default": function _default() {
|
|
726
|
+
return [_slot];
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
729
|
}
|
|
730
730
|
return null;
|
|
731
731
|
},
|
|
732
732
|
renderInputAddonAfter: function renderInputAddonAfter() {
|
|
733
|
-
var
|
|
734
|
-
var addonAfter = this.$scopedSlots.addonAfter;
|
|
733
|
+
var addonAfter = this.$slots.addonAfter;
|
|
735
734
|
if (addonAfter) {
|
|
736
|
-
|
|
735
|
+
var _slot2;
|
|
736
|
+
return createVNode(InputAddon, {
|
|
737
737
|
"class": "addon-after"
|
|
738
|
-
},
|
|
738
|
+
}, _isSlot(_slot2 = addonAfter()) ? _slot2 : {
|
|
739
|
+
"default": function _default() {
|
|
740
|
+
return [_slot2];
|
|
741
|
+
}
|
|
742
|
+
});
|
|
739
743
|
}
|
|
740
744
|
return null;
|
|
741
745
|
},
|
|
@@ -747,35 +751,35 @@ var SearchBox = {
|
|
|
747
751
|
});
|
|
748
752
|
},
|
|
749
753
|
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
750
|
-
var
|
|
751
|
-
var h = this.$createElement;
|
|
754
|
+
var _this5 = this;
|
|
752
755
|
var _this$$props4 = this.$props,
|
|
753
756
|
enterButton = _this$$props4.enterButton,
|
|
754
757
|
innerClass = _this$$props4.innerClass;
|
|
755
|
-
var renderEnterButton = this.$
|
|
758
|
+
var renderEnterButton = this.$slots.renderEnterButton;
|
|
756
759
|
if (enterButton) {
|
|
757
760
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
758
761
|
if (renderEnterButton) {
|
|
759
|
-
return renderEnterButton(
|
|
762
|
+
return renderEnterButton(_this5.enterButtonOnClick);
|
|
760
763
|
}
|
|
761
|
-
return
|
|
764
|
+
return createVNode(Button, {
|
|
762
765
|
"class": "enter-btn " + getClassName(innerClass, 'enter-button'),
|
|
763
|
-
"
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
"
|
|
767
|
-
"
|
|
766
|
+
"primary": true,
|
|
767
|
+
"onClick": _this5.enterButtonOnClick
|
|
768
|
+
}, {
|
|
769
|
+
"default": function _default() {
|
|
770
|
+
return [createTextVNode("Search")];
|
|
768
771
|
}
|
|
769
|
-
}
|
|
772
|
+
});
|
|
770
773
|
};
|
|
771
|
-
return
|
|
774
|
+
return createVNode("div", {
|
|
772
775
|
"class": "enter-button-wrapper"
|
|
773
776
|
}, [getEnterButtonMarkup()]);
|
|
774
777
|
}
|
|
775
778
|
return null;
|
|
776
779
|
},
|
|
777
780
|
renderIcons: function renderIcons() {
|
|
778
|
-
var
|
|
781
|
+
var _this6 = this;
|
|
782
|
+
var _slot3, _slot4, _slot5;
|
|
779
783
|
var _this$$props5 = this.$props,
|
|
780
784
|
iconPosition = _this$$props5.iconPosition,
|
|
781
785
|
showClear = _this$$props5.showClear,
|
|
@@ -783,42 +787,48 @@ var SearchBox = {
|
|
|
783
787
|
getMicInstance = _this$$props5.getMicInstance,
|
|
784
788
|
showVoiceSearch = _this$$props5.showVoiceSearch,
|
|
785
789
|
showIcon = _this$$props5.showIcon;
|
|
786
|
-
var renderMic = this.$
|
|
790
|
+
var renderMic = this.$slots.renderMic || this.$props.renderMic;
|
|
787
791
|
var currentValue = this.$data.currentValue;
|
|
788
|
-
return
|
|
789
|
-
"
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
"attrs": {
|
|
814
|
-
"groupPosition": "left",
|
|
815
|
-
"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
|
+
})];
|
|
816
817
|
}
|
|
817
|
-
},
|
|
818
|
-
"
|
|
819
|
-
|
|
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
|
+
})];
|
|
820
830
|
}
|
|
821
|
-
}
|
|
831
|
+
})]);
|
|
822
832
|
},
|
|
823
833
|
focusSearchBox: function focusSearchBox(event) {
|
|
824
834
|
var _this$$refs, _this$$refs$this$$pro;
|
|
@@ -831,7 +841,7 @@ var SearchBox = {
|
|
|
831
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
|
|
832
842
|
},
|
|
833
843
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
834
|
-
var
|
|
844
|
+
var _this7 = this;
|
|
835
845
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
836
846
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
837
847
|
if (isEmpty(focusShortcuts)) {
|
|
@@ -846,7 +856,7 @@ var SearchBox = {
|
|
|
846
856
|
function (event, handler) {
|
|
847
857
|
// Prevent the default refresh event under WINDOWS system
|
|
848
858
|
event.preventDefault();
|
|
849
|
-
|
|
859
|
+
_this7.focusSearchBox(event);
|
|
850
860
|
});
|
|
851
861
|
|
|
852
862
|
// if one of modifier keys are used, they are handled below
|
|
@@ -856,7 +866,7 @@ var SearchBox = {
|
|
|
856
866
|
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
857
867
|
var element = modifierKeys[index];
|
|
858
868
|
if (hotkeys[element]) {
|
|
859
|
-
|
|
869
|
+
_this7.focusSearchBox(event);
|
|
860
870
|
break;
|
|
861
871
|
}
|
|
862
872
|
}
|
|
@@ -869,37 +879,33 @@ var SearchBox = {
|
|
|
869
879
|
this.triggerDefaultQuery(value);
|
|
870
880
|
},
|
|
871
881
|
renderAutoFill: function renderAutoFill(suggestion) {
|
|
872
|
-
var
|
|
873
|
-
var h = this.$createElement;
|
|
882
|
+
var _this8 = this;
|
|
874
883
|
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
875
884
|
e.stopPropagation();
|
|
876
|
-
|
|
885
|
+
_this8.onAutofillClick(suggestion);
|
|
877
886
|
};
|
|
878
887
|
/* 👇 avoid showing autofill for category suggestions👇 */
|
|
879
|
-
return suggestion._category ? null :
|
|
880
|
-
"
|
|
881
|
-
|
|
882
|
-
}
|
|
883
|
-
});
|
|
888
|
+
return suggestion._category ? null : createVNode(AutoFillSvg, {
|
|
889
|
+
"onClick": handleAutoFillClick
|
|
890
|
+
}, null);
|
|
884
891
|
},
|
|
885
892
|
renderTag: function renderTag(item) {
|
|
886
|
-
var
|
|
887
|
-
var h = this.$createElement;
|
|
893
|
+
var _this9 = this;
|
|
888
894
|
var innerClass = this.$props.innerClass;
|
|
889
|
-
return
|
|
895
|
+
return createVNode(TagItem, {
|
|
890
896
|
"class": getClassName(innerClass, 'selected-tag') || ''
|
|
891
|
-
},
|
|
892
|
-
"
|
|
893
|
-
"
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
}
|
|
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)])];
|
|
901
907
|
}
|
|
902
|
-
}
|
|
908
|
+
});
|
|
903
909
|
},
|
|
904
910
|
clearAllTags: function clearAllTags() {
|
|
905
911
|
this.selectedTags = [];
|
|
@@ -918,211 +924,218 @@ var SearchBox = {
|
|
|
918
924
|
}
|
|
919
925
|
},
|
|
920
926
|
renderTags: function renderTags() {
|
|
921
|
-
var
|
|
922
|
-
var h = this.$createElement;
|
|
927
|
+
var _this10 = this;
|
|
923
928
|
if (!Array.isArray(this.selectedTags)) {
|
|
924
929
|
return null;
|
|
925
930
|
}
|
|
926
931
|
var tagsList = [].concat(this.selectedTags);
|
|
927
932
|
var shouldRenderClearAllTag = tagsList.length > 1;
|
|
928
|
-
var renderSelectedTags = this.$
|
|
933
|
+
var renderSelectedTags = this.$slots.renderSelectedTags || this.$props.renderSelectedTags;
|
|
929
934
|
return renderSelectedTags ? renderSelectedTags({
|
|
930
935
|
values: this.selectedTags,
|
|
931
936
|
handleClear: this.clearTag,
|
|
932
937
|
handleClearAll: this.clearAllTags
|
|
933
|
-
}) :
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
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
|
+
})];
|
|
945
954
|
}
|
|
946
|
-
}
|
|
955
|
+
});
|
|
947
956
|
}
|
|
948
957
|
},
|
|
949
958
|
render: function render() {
|
|
950
|
-
var
|
|
951
|
-
var h = arguments[0];
|
|
959
|
+
var _this11 = this;
|
|
952
960
|
var _this$$props6 = this.$props,
|
|
953
961
|
theme = _this$$props6.theme,
|
|
954
962
|
expandSuggestionsContainer = _this$$props6.expandSuggestionsContainer;
|
|
955
|
-
var _this$$
|
|
956
|
-
recentSearchesIcon = _this$$
|
|
957
|
-
popularSearchesIcon = _this$$
|
|
963
|
+
var _this$$slots = this.$slots,
|
|
964
|
+
recentSearchesIcon = _this$$slots.recentSearchesIcon,
|
|
965
|
+
popularSearchesIcon = _this$$slots.popularSearchesIcon;
|
|
958
966
|
var hasSuggestions = Array.isArray(this.normalizedSuggestions) && this.normalizedSuggestions.length;
|
|
959
|
-
var renderItem = this.$
|
|
960
|
-
return
|
|
967
|
+
var renderItem = this.$slots.renderItem || this.$props.renderItem;
|
|
968
|
+
return createVNode(Container, {
|
|
961
969
|
"class": this.$props.className
|
|
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
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
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({
|
|
1001
1012
|
item: item
|
|
1002
|
-
})
|
|
1003
|
-
"on": _extends({}, getItemEvents({
|
|
1013
|
+
}), getItemEvents({
|
|
1004
1014
|
item: item
|
|
1005
|
-
})
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
"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({
|
|
1014
1023
|
item: item
|
|
1015
|
-
})
|
|
1016
|
-
"on": _extends({}, getItemEvents({
|
|
1024
|
+
}), _transformOn(getItemEvents({
|
|
1017
1025
|
item: item
|
|
1018
|
-
})),
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
"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,
|
|
1033
1040
|
"icon": getIcon(item._suggestion_type),
|
|
1034
1041
|
"type": item._suggestion_type + "-search-icon"
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
"attrs": {
|
|
1038
|
-
"currentValue": _this9.currentValue,
|
|
1042
|
+
}, null)]), createVNode(SuggestionItem, {
|
|
1043
|
+
"currentValue": _this11.currentValue,
|
|
1039
1044
|
"suggestion": item
|
|
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
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
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()];
|
|
1078
1091
|
}
|
|
1079
|
-
})),
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
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
|
+
})])];
|
|
1085
1132
|
}
|
|
1086
|
-
})
|
|
1087
|
-
"class": suggestionsContainer
|
|
1088
|
-
}, [h(InputGroup, [this.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
1089
|
-
"class": getClassName(this.$props.innerClass, 'input') || '',
|
|
1090
|
-
"attrs": {
|
|
1091
|
-
"placeholder": this.$props.placeholder,
|
|
1092
|
-
"iconPosition": this.$props.iconPosition,
|
|
1093
|
-
"showIcon": this.$props.showIcon,
|
|
1094
|
-
"showClear": this.$props.showClear,
|
|
1095
|
-
"themePreset": this.themePreset
|
|
1096
|
-
},
|
|
1097
|
-
"on": _extends({}, {
|
|
1098
|
-
blur: function blur(e) {
|
|
1099
|
-
_this9.$emit('blur', e, _this9.triggerQuery);
|
|
1100
|
-
},
|
|
1101
|
-
keypress: function keypress(e) {
|
|
1102
|
-
_this9.$emit('keyPress', e, _this9.triggerQuery);
|
|
1103
|
-
_this9.$emit('key-press', e, _this9.triggerQuery);
|
|
1104
|
-
},
|
|
1105
|
-
input: this.onInputChange,
|
|
1106
|
-
focus: function focus(e) {
|
|
1107
|
-
_this9.$emit('focus', e, _this9.triggerQuery);
|
|
1108
|
-
},
|
|
1109
|
-
keydown: this.handleKeyDown,
|
|
1110
|
-
keyup: function keyup(e) {
|
|
1111
|
-
_this9.$emit('keyUp', e, _this9.triggerQuery);
|
|
1112
|
-
_this9.$emit('key-up', e, _this9.triggerQuery);
|
|
1113
|
-
}
|
|
1114
|
-
}),
|
|
1115
|
-
"domProps": _extends({}, {
|
|
1116
|
-
autofocus: this.$props.autoFocus,
|
|
1117
|
-
value: this.$data.currentValue ? this.$data.currentValue : ''
|
|
1118
|
-
}),
|
|
1119
|
-
"ref": this.$props.innerRef
|
|
1120
|
-
}), this.renderIcons()]), this.renderInputAddonAfter(), this.renderEnterButtonElement()])])]);
|
|
1133
|
+
});
|
|
1121
1134
|
},
|
|
1122
1135
|
destroyed: function destroyed() {
|
|
1123
1136
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
1124
1137
|
}
|
|
1125
|
-
};
|
|
1138
|
+
});
|
|
1126
1139
|
SearchBox.defaultQuery = function (value, props) {
|
|
1127
1140
|
var finalQuery = null;
|
|
1128
1141
|
var fields = normalizeDataField(props.dataField, props.fieldWeights);
|
|
@@ -1445,9 +1458,8 @@ var ReactiveComponent = {
|
|
|
1445
1458
|
}
|
|
1446
1459
|
},
|
|
1447
1460
|
render: function render() {
|
|
1448
|
-
var h = arguments[0];
|
|
1449
1461
|
try {
|
|
1450
|
-
var dom = this.$
|
|
1462
|
+
var dom = this.$slots["default"];
|
|
1451
1463
|
var error = this.error,
|
|
1452
1464
|
isLoading = this.isLoading,
|
|
1453
1465
|
selectedValue = this.selectedValue;
|
|
@@ -1458,7 +1470,7 @@ var ReactiveComponent = {
|
|
|
1458
1470
|
value: selectedValue,
|
|
1459
1471
|
setQuery: this.setQuery
|
|
1460
1472
|
});
|
|
1461
|
-
return
|
|
1473
|
+
return createVNode("div", null, [dom(propsToBePassed)]);
|
|
1462
1474
|
} catch (e) {
|
|
1463
1475
|
return null;
|
|
1464
1476
|
}
|
|
@@ -1541,7 +1553,7 @@ var ConnectedComponent = ComponentWrapper(connect(mapStateToProps$1, mapDispatch
|
|
|
1541
1553
|
});
|
|
1542
1554
|
var RcConnected = PreferencesConsumer({
|
|
1543
1555
|
name: 'RcConnected',
|
|
1544
|
-
render: function render(
|
|
1556
|
+
render: function render() {
|
|
1545
1557
|
var component = ConnectedComponent;
|
|
1546
1558
|
switch (this.$attrs.componentType) {
|
|
1547
1559
|
case componentTypes.reactiveList:
|
|
@@ -1589,8 +1601,8 @@ var RcConnected = PreferencesConsumer({
|
|
|
1589
1601
|
}
|
|
1590
1602
|
return h(component, {
|
|
1591
1603
|
attrs: this.$attrs,
|
|
1592
|
-
on: this.$
|
|
1593
|
-
scopedSlots: this.$
|
|
1604
|
+
on: this.$attrs,
|
|
1605
|
+
scopedSlots: this.$slots,
|
|
1594
1606
|
slots: this.$slots
|
|
1595
1607
|
});
|
|
1596
1608
|
}
|