@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.
Files changed (98) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +6840 -9315
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +7 -13
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-626c5e8e.js +58 -0
  6. package/dist/cjs/{CancelSvg-220a7cc3.js → CancelSvg-062a42f0.js} +32 -40
  7. package/dist/cjs/Card-c381ded3.js +26 -0
  8. package/dist/cjs/{ComponentWrapper-b6d4660c.js → ComponentWrapper-db45cc6d.js} +5 -5
  9. package/dist/cjs/Container-29f049b2.js +12 -0
  10. package/dist/cjs/{DataSearch-1c5c2202.js → DataSearch-7c71ec9f.js} +712 -850
  11. package/dist/cjs/DataSearch.js +12 -11
  12. package/dist/cjs/{DropDown-8984b544.js → DropDown-3b899b20.js} +78 -79
  13. package/dist/cjs/DynamicRangeSlider.js +51 -37
  14. package/dist/cjs/Flex-d5675ea6.js +48 -0
  15. package/dist/cjs/FormControlList-cf1ff2ca.js +42 -0
  16. package/dist/cjs/Input-4d278ca0.js +74 -0
  17. package/dist/cjs/ListItem-c067bc07.js +41 -0
  18. package/dist/cjs/MultiDropdownList.js +71 -62
  19. package/dist/cjs/MultiList.js +85 -88
  20. package/dist/cjs/MultiRange.js +54 -41
  21. package/dist/cjs/{Pagination-07f4dbad.js → Pagination-a468f960.js} +56 -53
  22. package/dist/cjs/{PreferencesConsumer-5d67b486.js → PreferencesConsumer-034c55e3.js} +6 -5
  23. package/dist/cjs/RangeInput.js +115 -107
  24. package/dist/cjs/RangeSlider.js +50 -36
  25. package/dist/cjs/ReactiveBase.js +66 -48
  26. package/dist/cjs/{ReactiveComponent-4e75c939.js → ReactiveComponent-f0f486ca.js} +325 -311
  27. package/dist/cjs/ReactiveComponent.js +21 -20
  28. package/dist/cjs/ReactiveGoogleMap.js +283 -307
  29. package/dist/cjs/ReactiveList.js +99 -116
  30. package/dist/cjs/ResultCard.js +26 -19
  31. package/dist/cjs/ResultList.js +31 -27
  32. package/dist/cjs/SelectedFilters.js +49 -34
  33. package/dist/cjs/SingleDropdownList.js +70 -61
  34. package/dist/cjs/SingleList.js +86 -90
  35. package/dist/cjs/SingleRange.js +48 -39
  36. package/dist/cjs/StateProvider.js +2 -2
  37. package/dist/cjs/Title-8802a218.js +12 -0
  38. package/dist/cjs/ToggleButton.js +39 -32
  39. package/dist/cjs/{index-30126fd0.js → index-dc25b706.js} +6 -6
  40. package/dist/cjs/index.js +22 -21
  41. package/dist/cjs/install.js +21 -20
  42. package/dist/cjs/ssr-eb901d09.js +35 -0
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/cjs/{vueTypes-7cfc2f98.js → vueTypes-621a8143.js} +1 -1
  45. package/dist/es/Button-ebafa3d6.js +52 -0
  46. package/dist/es/{CancelSvg-e40552a5.js → CancelSvg-14ebc9a1.js} +30 -37
  47. package/dist/es/{Card-19ad6d90.js → Card-1951569e.js} +5 -6
  48. package/dist/es/{ComponentWrapper-8042aa35.js → ComponentWrapper-bf443c0b.js} +4 -4
  49. package/dist/es/Container-d00219f7.js +1 -1
  50. package/dist/es/{DataSearch-5bb904c5.js → DataSearch-4f9a4e46.js} +705 -842
  51. package/dist/es/DataSearch.js +10 -9
  52. package/dist/es/{DropDown-28ddce07.js → DropDown-35e232b7.js} +78 -78
  53. package/dist/es/DynamicRangeSlider.js +48 -34
  54. package/dist/es/Flex-a08e22d7.js +46 -0
  55. package/dist/es/FormControlList-fa5cf78b.js +38 -0
  56. package/dist/es/Input-3b8408a6.js +69 -0
  57. package/dist/es/{ListItem-07888a65.js → ListItem-47a6345a.js} +6 -7
  58. package/dist/es/MultiDropdownList.js +69 -60
  59. package/dist/es/MultiList.js +84 -87
  60. package/dist/es/MultiRange.js +52 -39
  61. package/dist/es/{Pagination-28e56c5c.js → Pagination-145b4ff2.js} +56 -53
  62. package/dist/es/{PreferencesConsumer-bc097ebb.js → PreferencesConsumer-7ea7313a.js} +5 -4
  63. package/dist/es/RangeInput.js +112 -103
  64. package/dist/es/RangeSlider.js +47 -33
  65. package/dist/es/ReactiveBase.js +65 -46
  66. package/dist/es/{ReactiveComponent-09c183c8.js → ReactiveComponent-e2fb9eb4.js} +321 -306
  67. package/dist/es/ReactiveComponent.js +18 -17
  68. package/dist/es/ReactiveGoogleMap.js +279 -302
  69. package/dist/es/ReactiveList.js +97 -113
  70. package/dist/es/ResultCard.js +25 -18
  71. package/dist/es/ResultList.js +30 -26
  72. package/dist/es/SelectedFilters.js +47 -32
  73. package/dist/es/SingleDropdownList.js +68 -59
  74. package/dist/es/SingleList.js +84 -88
  75. package/dist/es/SingleRange.js +46 -37
  76. package/dist/es/StateProvider.js +2 -2
  77. package/dist/es/Title-863dfa42.js +1 -1
  78. package/dist/es/ToggleButton.js +37 -30
  79. package/dist/es/{index-0444a498.js → index-285a43a6.js} +6 -6
  80. package/dist/es/index.js +19 -18
  81. package/dist/es/install.js +18 -17
  82. package/dist/es/ssr-03607d84.js +1 -1
  83. package/dist/es/version.js +1 -1
  84. package/dist/es/{vueTypes-8986b709.js → vueTypes-e4af6fe2.js} +1 -1
  85. package/package.json +8 -8
  86. package/dist/cjs/Button-841fd06d.js +0 -62
  87. package/dist/cjs/Card-240f283d.js +0 -30
  88. package/dist/cjs/Container-e699ea95.js +0 -15
  89. package/dist/cjs/Flex-ddd7cb6b.js +0 -50
  90. package/dist/cjs/FormControlList-bbb5cd24.js +0 -45
  91. package/dist/cjs/Input-ead4cd84.js +0 -77
  92. package/dist/cjs/ListItem-5088bd6a.js +0 -45
  93. package/dist/cjs/Title-16042ea0.js +0 -15
  94. package/dist/cjs/ssr-f2fc1bf6.js +0 -36
  95. package/dist/es/Button-153cd885.js +0 -53
  96. package/dist/es/Flex-7c177a10.js +0 -45
  97. package/dist/es/FormControlList-99797d0a.js +0 -38
  98. 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-153cd885.js';
8
- import { t as types } from './vueTypes-8986b709.js';
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-0444a498.js';
11
- import { C as ComponentWrapper } from './ComponentWrapper-8042aa35.js';
12
- import { P as PreferencesConsumer } from './PreferencesConsumer-bc097ebb.js';
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-5bb904c5.js';
16
- import { C as CancelSvg, a as IconGroup, I as IconWrapper, D as Downshift, b as InputWrapper } from './CancelSvg-e40552a5.js';
17
- import { s as suggestionsContainer, I as Input, a as suggestions } from './Input-c09c0b56.js';
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
- var h = arguments[0];
36
- return h(AutofillSvgIcon, {
37
- "on": {
38
- "click": this.$listeners.click
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
- }, [h("svg", {
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 || h(SearchSvg);
664
+ return this.$props.icon || createVNode(SearchSvg, null, null);
664
665
  }
665
666
  return null;
666
667
  },
667
668
  renderErrorComponent: function renderErrorComponent() {
668
- var h = this.$createElement;
669
- var renderError = this.$scopedSlots.renderError || this.$props.renderError;
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 h(SuggestionWrapper, {
672
- "attrs": {
673
- "innerClass": this.$props.innerClass,
674
- "innerClassName": "error",
675
- "theme": this.theme,
676
- "themePreset": this.themePreset
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
- }, [isFunction(renderError) ? renderError(this.error) : renderError]);
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 || h(CancelSvg);
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.$scopedSlots.renderNoSuggestion || this.$props.renderNoSuggestion;
698
- var renderError = this.$scopedSlots.renderError || this.$props.renderError;
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 h(SuggestionWrapper, {
704
- "attrs": {
705
- "innerClass": innerClass,
706
- "themePreset": this.themePreset,
707
- "theme": theme,
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 h = this.$createElement;
721
- var addonBefore = this.$scopedSlots.addonBefore;
719
+ var addonBefore = this.$slots.addonBefore;
722
720
  if (addonBefore) {
723
- return h(InputAddon, {
721
+ var _slot;
722
+ return createVNode(InputAddon, {
724
723
  "class": "addon-before"
725
- }, [addonBefore()]);
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 h = this.$createElement;
731
- var addonAfter = this.$scopedSlots.addonAfter;
733
+ var addonAfter = this.$slots.addonAfter;
732
734
  if (addonAfter) {
733
- return h(InputAddon, {
735
+ var _slot2;
736
+ return createVNode(InputAddon, {
734
737
  "class": "addon-after"
735
- }, [addonAfter()]);
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 _this4 = this;
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.$scopedSlots.renderEnterButton;
758
+ var renderEnterButton = this.$slots.renderEnterButton;
753
759
  if (enterButton) {
754
760
  var getEnterButtonMarkup = function getEnterButtonMarkup() {
755
761
  if (renderEnterButton) {
756
- return renderEnterButton(_this4.enterButtonOnClick);
762
+ return renderEnterButton(_this5.enterButtonOnClick);
757
763
  }
758
- return h(Button, {
764
+ return createVNode(Button, {
759
765
  "class": "enter-btn " + getClassName(innerClass, 'enter-button'),
760
- "attrs": {
761
- "primary": true
762
- },
763
- "on": {
764
- "click": _this4.enterButtonOnClick
766
+ "primary": true,
767
+ "onClick": _this5.enterButtonOnClick
768
+ }, {
769
+ "default": function _default() {
770
+ return [createTextVNode("Search")];
765
771
  }
766
- }, ["Search"]);
772
+ });
767
773
  };
768
- return h("div", {
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 h = this.$createElement;
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.$scopedSlots.renderMic || this.$props.renderMic;
790
+ var renderMic = this.$slots.renderMic || this.$props.renderMic;
784
791
  var currentValue = this.$data.currentValue;
785
- return h("div", [h(IconGroup, {
786
- "attrs": {
787
- "groupPosition": "right",
788
- "positionType": "absolute"
789
- }
790
- }, [currentValue && showClear && h(IconWrapper, {
791
- "on": {
792
- "click": this.clearValue
793
- },
794
- "attrs": {
795
- "showIcon": showIcon,
796
- "isClearIcon": true
797
- }
798
- }, [this.renderCancelIcon()]), showVoiceSearch && h(Mic, {
799
- "attrs": {
800
- "getInstance": getMicInstance,
801
- "render": renderMic,
802
- "handleResult": this.handleVoiceResults,
803
- "className": getClassName(innerClass, 'mic') || null
804
- }
805
- }), iconPosition === 'right' && showIcon && h(IconWrapper, {
806
- "on": {
807
- "click": this.handleSearchIconClick
808
- }
809
- }, [this.renderIcon()])]), h(IconGroup, {
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
- }, [iconPosition === 'left' && showIcon && h(IconWrapper, {
815
- "on": {
816
- "click": this.handleSearchIconClick
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
- }, [this.renderIcon()])])]);
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 _this5 = this;
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
- _this5.focusSearchBox(event);
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
- _this5.focusSearchBox(event);
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 _this6 = this;
870
- var h = this.$createElement;
882
+ var _this8 = this;
871
883
  var handleAutoFillClick = function handleAutoFillClick(e) {
872
884
  e.stopPropagation();
873
- _this6.onAutofillClick(suggestion);
885
+ _this8.onAutofillClick(suggestion);
874
886
  };
875
887
  /* 👇 avoid showing autofill for category suggestions👇 */
876
- return suggestion._category ? null : h(AutoFillSvg, {
877
- "on": {
878
- "click": handleAutoFillClick
879
- }
880
- });
888
+ return suggestion._category ? null : createVNode(AutoFillSvg, {
889
+ "onClick": handleAutoFillClick
890
+ }, null);
881
891
  },
882
892
  renderTag: function renderTag(item) {
883
- var _this7 = this;
884
- var h = this.$createElement;
893
+ var _this9 = this;
885
894
  var innerClass = this.$props.innerClass;
886
- return h(TagItem, {
895
+ return createVNode(TagItem, {
887
896
  "class": getClassName(innerClass, 'selected-tag') || ''
888
- }, [h("span", [item]), h("span", {
889
- "attrs": {
890
- "role": "img",
891
- "aria-label": "delete-tag"
892
- },
893
- "class": "close-icon",
894
- "on": {
895
- "click": function click() {
896
- return _this7.clearTag(item);
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
- }, [h(CancelSvg)])]);
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 _this8 = this;
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.$scopedSlots.renderSelectedTags || this.$props.renderSelectedTags;
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
- }) : h(TagsContainer, [tagsList.map(function (item) {
931
- return _this8.renderTag(item);
932
- }), shouldRenderClearAllTag && h(TagItem, {
933
- "class": getClassName(this.$props.innerClass, 'selected-tag') || ''
934
- }, [h("span", ["Clear All"]), h("span", {
935
- "attrs": {
936
- "role": "img",
937
- "aria-label": "delete-tag"
938
- },
939
- "class": "close-icon",
940
- "on": {
941
- "click": this.clearAllTags
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
- }, [h(CancelSvg)])])]);
955
+ });
944
956
  }
945
957
  },
946
958
  render: function render() {
947
- var _this9 = this;
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$$scopedSlots = this.$scopedSlots,
953
- recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
954
- popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
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.$scopedSlots.renderItem || this.$props.renderItem;
957
- return h(Container, {
967
+ var renderItem = this.$slots.renderItem || this.$props.renderItem;
968
+ return createVNode(Container, {
958
969
  "class": this.$props.className
959
- }, [this.$props.title && h(Title, {
960
- "class": getClassName(this.$props.innerClass, 'title') || ''
961
- }, [this.$props.title]), this.$props.autosuggest ? h(Downshift, {
962
- "attrs": {
963
- "id": this.$props.componentId + "-downshift",
964
- "handleChange": this.onSuggestionSelected,
965
- "handleMouseup": this.handleStateChange,
966
- "isOpen": this.$data.isOpen
967
- },
968
- "scopedSlots": {
969
- "default": function _default(_ref5) {
970
- var getInputEvents = _ref5.getInputEvents,
971
- getInputProps = _ref5.getInputProps,
972
- getItemProps = _ref5.getItemProps,
973
- getItemEvents = _ref5.getItemEvents,
974
- isOpen = _ref5.isOpen,
975
- highlightedIndex = _ref5.highlightedIndex,
976
- setHighlightedIndex = _ref5.setHighlightedIndex;
977
- var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
978
- var getIcon = function getIcon(iconType) {
979
- switch (iconType) {
980
- case suggestionTypes.Recent:
981
- return recentSearchesIcon;
982
- case suggestionTypes.Popular:
983
- return popularSearchesIcon;
984
- default:
985
- return null;
986
- }
987
- };
988
- return h("div", [_this9.hasCustomRenderer && _this9.getComponent({
989
- isOpen: isOpen,
990
- getItemProps: getItemProps,
991
- getItemEvents: getItemEvents,
992
- highlightedIndex: highlightedIndex
993
- }), _this9.renderErrorComponent(), !_this9.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
994
- "class": suggestions(_this9.themePreset, theme) + " " + getClassName(_this9.$props.innerClass, 'list')
995
- }, [_this9.normalizedSuggestions.map(function (item, index) {
996
- return renderItem ? h("li", {
997
- "domProps": _extends({}, getItemProps({
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
- "key": index + 1 + "-" + item.value,
1004
- "style": {
1005
- backgroundColor: _this9.getBackgroundColor(highlightedIndex, index),
1006
- justifyContent: 'flex-start',
1007
- alignItems: 'center'
1008
- }
1009
- }, [renderItem(item)]) : h("li", {
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
- "key": index + 1 + "-" + item.value,
1017
- "style": {
1018
- backgroundColor: _this9.getBackgroundColor(highlightedIndex, index),
1019
- justifyContent: 'flex-start',
1020
- alignItems: 'center'
1021
- }
1022
- }, [h("div", {
1023
- "style": {
1024
- padding: '0 10px 0 0',
1025
- display: 'flex'
1026
- }
1027
- }, [h(CustomSvg, {
1028
- "attrs": {
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
- })]), h(SuggestionItem, {
1034
- "attrs": {
1035
- "currentValue": _this9.currentValue,
1042
+ }, null)]), createVNode(SuggestionItem, {
1043
+ "currentValue": _this11.currentValue,
1036
1044
  "suggestion": item
1037
- }
1038
- }), _this9.renderAutoFill(item)]);
1039
- })]) : _this9.renderNoSuggestions(_this9.normalizedSuggestions)]);
1040
- };
1041
- return h("div", {
1042
- "class": suggestionsContainer
1043
- }, [h(InputGroup, [_this9.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
1044
- "attrs": {
1045
- "id": _this9.$props.componentId + "-input",
1046
- "showIcon": _this9.$props.showIcon,
1047
- "showClear": _this9.$props.showClear,
1048
- "iconPosition": _this9.$props.iconPosition,
1049
- "placeholder": _this9.$props.placeholder,
1050
- "autoFocus": _this9.$props.autoFocus,
1051
- "themePreset": _this9.themePreset,
1052
- "autocomplete": "off"
1053
- },
1054
- "ref": _this9.$props.innerRef,
1055
- "class": getClassName(_this9.$props.innerClass, 'input'),
1056
- "on": _extends({}, getInputEvents({
1057
- onInput: _this9.onInputChange,
1058
- onBlur: function onBlur(e) {
1059
- _this9.$emit('blur', e, _this9.triggerQuery);
1060
- },
1061
- onFocus: _this9.handleFocus,
1062
- onKeyPress: function onKeyPress(e) {
1063
- _this9.$emit('keyPress', e, _this9.triggerQuery);
1064
- _this9.$emit('key-press', e, _this9.triggerQuery);
1065
- },
1066
- onKeyDown: function onKeyDown(e) {
1067
- return _this9.handleKeyDown(e, highlightedIndex);
1068
- },
1069
- onKeyUp: function onKeyUp(e) {
1070
- _this9.$emit('keyUp', e, _this9.triggerQuery);
1071
- _this9.$emit('key-up', e, _this9.triggerQuery);
1072
- },
1073
- onClick: function onClick() {
1074
- setHighlightedIndex(null);
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
- "domProps": _extends({}, getInputProps({
1078
- value: _this9.$data.currentValue === null ? '' : _this9.$data.currentValue
1079
- }))
1080
- }), _this9.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()]), _this9.renderInputAddonAfter(), _this9.renderEnterButtonElement()]), expandSuggestionsContainer && renderSuggestionsDropdown(), _this9.renderTags()]);
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
- }) : h("div", {
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.$scopedSlots["default"];
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 h("div", [dom(propsToBePassed)]);
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(h) {
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.$listeners,
1590
- scopedSlots: this.$scopedSlots,
1604
+ on: this.$attrs,
1605
+ scopedSlots: this.$slots,
1591
1606
  slots: this.$slots
1592
1607
  });
1593
1608
  }