@appbaseio/reactivesearch-vue 1.16.0-alpha.4 → 1.16.0-alpha.42

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 (101) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +8110 -7499
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-d2f1aeda.js +68 -0
  6. package/dist/cjs/{DownShift-b09da079.js → CancelSvg-82021d23.js} +60 -16
  7. package/dist/cjs/Card-4b915733.js +30 -0
  8. package/dist/cjs/{ComponentWrapper-5a0a8849.js → ComponentWrapper-7302fe1a.js} +40 -21
  9. package/dist/cjs/{Container-f84e72fc.js → Container-8a08d663.js} +3 -11
  10. package/dist/cjs/DataSearch.js +354 -398
  11. package/dist/cjs/{DropDown-c66be1a8.js → DropDown-c46d8b0c.js} +80 -95
  12. package/dist/cjs/DynamicRangeSlider.js +107 -42
  13. package/dist/cjs/Flex-699639d2.js +52 -0
  14. package/dist/cjs/FormControlList-73497794.js +47 -0
  15. package/dist/cjs/Input-c6f181d5.js +79 -0
  16. package/dist/cjs/ListItem-933c27e4.js +46 -0
  17. package/dist/cjs/MultiDropdownList.js +101 -65
  18. package/dist/cjs/MultiList.js +79 -47
  19. package/dist/cjs/MultiRange.js +20 -14
  20. package/dist/cjs/{Pagination-91df3b77.js → Pagination-1b2320a7.js} +4 -3
  21. package/dist/cjs/RangeInput.js +29 -45
  22. package/dist/cjs/RangeSlider.js +31 -28
  23. package/dist/cjs/ReactiveBase.js +55 -34
  24. package/dist/cjs/ReactiveComponent.js +69 -62
  25. package/dist/cjs/ReactiveGoogleMap.js +326 -235
  26. package/dist/cjs/ReactiveList.js +188 -241
  27. package/dist/cjs/ResultCard.js +8 -6
  28. package/dist/cjs/ResultList.js +8 -6
  29. package/dist/cjs/SelectedFilters.js +25 -12
  30. package/dist/cjs/SingleDropdownList.js +87 -57
  31. package/dist/cjs/SingleList.js +60 -37
  32. package/dist/cjs/SingleRange.js +17 -11
  33. package/dist/cjs/StateProvider.js +11 -7
  34. package/dist/cjs/{Title-e9beb554.js → Title-39765ee6.js} +3 -11
  35. package/dist/cjs/ToggleButton.js +35 -16
  36. package/dist/cjs/{_rollupPluginBabelHelpers-280a574c.js → _rollupPluginBabelHelpers-4abdbfff.js} +11 -1
  37. package/dist/cjs/{index-e0583d76.js → index-d44a0a21.js} +87 -13
  38. package/dist/cjs/index.js +23 -19
  39. package/dist/cjs/initReactivesearch.js +190 -103
  40. package/dist/cjs/install.js +20 -18
  41. package/dist/cjs/ssr-c333c82c.js +39 -0
  42. package/dist/cjs/{utils-d1ea9f95.js → utils-23afb20b.js} +2 -2
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-6de9d2a9.js} +9 -4
  45. package/dist/es/Button-799185e2.js +59 -0
  46. package/dist/es/{DownShift-d8f2500f.js → CancelSvg-4d9e0857.js} +56 -17
  47. package/dist/es/Card-04b3c33e.js +23 -0
  48. package/dist/es/{ComponentWrapper-d0b21b95.js → ComponentWrapper-bbb717bc.js} +40 -21
  49. package/dist/es/Container-4383c6f0.js +10 -0
  50. package/dist/es/DataSearch.js +352 -396
  51. package/dist/es/{DropDown-5dbd69c2.js → DropDown-4edaa621.js} +79 -94
  52. package/dist/es/DynamicRangeSlider.js +107 -42
  53. package/dist/es/Flex-aac91505.js +47 -0
  54. package/dist/es/FormControlList-fe389a2e.js +40 -0
  55. package/dist/es/Input-d8519224.js +71 -0
  56. package/dist/es/ListItem-bdb6d53d.js +39 -0
  57. package/dist/es/MultiDropdownList.js +101 -65
  58. package/dist/es/MultiList.js +79 -47
  59. package/dist/es/MultiRange.js +20 -14
  60. package/dist/es/{Pagination-800af44f.js → Pagination-b3e4054a.js} +4 -3
  61. package/dist/es/RangeInput.js +29 -45
  62. package/dist/es/RangeSlider.js +31 -28
  63. package/dist/es/ReactiveBase.js +55 -34
  64. package/dist/es/ReactiveComponent.js +69 -62
  65. package/dist/es/ReactiveGoogleMap.js +326 -235
  66. package/dist/es/ReactiveList.js +188 -241
  67. package/dist/es/ResultCard.js +8 -6
  68. package/dist/es/ResultList.js +8 -6
  69. package/dist/es/SelectedFilters.js +25 -12
  70. package/dist/es/SingleDropdownList.js +87 -57
  71. package/dist/es/SingleList.js +60 -37
  72. package/dist/es/SingleRange.js +17 -11
  73. package/dist/es/StateProvider.js +11 -7
  74. package/dist/es/Title-579f8d6c.js +10 -0
  75. package/dist/es/ToggleButton.js +35 -16
  76. package/dist/es/{_rollupPluginBabelHelpers-c9fbe19f.js → _rollupPluginBabelHelpers-ecf6c03c.js} +11 -1
  77. package/dist/es/{index-1fe91a0a.js → index-5daa8276.js} +84 -14
  78. package/dist/es/index.js +23 -19
  79. package/dist/es/initReactivesearch.js +191 -104
  80. package/dist/es/install.js +20 -18
  81. package/dist/es/ssr-e3196de1.js +33 -0
  82. package/dist/es/{utils-ce3d86fd.js → utils-3a32e13f.js} +2 -2
  83. package/dist/es/version.js +1 -1
  84. package/dist/es/{vueTypes-98d938a9.js → vueTypes-9326e0be.js} +9 -4
  85. package/package.json +7 -5
  86. package/dist/cjs/Button-78d8bc26.js +0 -146
  87. package/dist/cjs/Card-b4af314f.js +0 -58
  88. package/dist/cjs/Flex-737c55be.js +0 -160
  89. package/dist/cjs/FormControlList-08dfb28e.js +0 -105
  90. package/dist/cjs/Input-643d02a7.js +0 -178
  91. package/dist/cjs/ListItem-0c58c5d2.js +0 -84
  92. package/dist/cjs/ssr-b7a729f9.js +0 -47
  93. package/dist/es/Button-6c71c66e.js +0 -137
  94. package/dist/es/Card-ecf70ba1.js +0 -51
  95. package/dist/es/Container-f5efec9e.js +0 -18
  96. package/dist/es/Flex-40a74d8a.js +0 -155
  97. package/dist/es/FormControlList-b96aebef.js +0 -98
  98. package/dist/es/Input-dfd9dd40.js +0 -170
  99. package/dist/es/ListItem-da73bc7d.js +0 -77
  100. package/dist/es/Title-22c2f3bf.js +0 -18
  101. package/dist/es/ssr-2f57791d.js +0 -41
@@ -1,92 +1,36 @@
1
1
  import { helper, Actions, causes } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-c9fbe19f.js';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
+ import { getQueryOptions } from '@appbaseio/reactivecore/lib/utils/helper';
5
6
  import 'emotion';
6
7
  import styled, { css, cx, injectGlobal } from '@appbaseio/vue-emotion';
7
8
  import 'polished';
8
- import { t as types } from './vueTypes-98d938a9.js';
9
+ import { t as types } from './vueTypes-9326e0be.js';
9
10
  import '@appbaseio/reactivecore/lib/utils/transform';
10
11
  import 'redux';
11
- import { g as getComponent, h as hasCustomRenderer, f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, j as getQuerySuggestionsComponent, a as isFunction, k as hasQuerySuggestionsRenderer, c as connect } from './index-1fe91a0a.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-d0b21b95.js';
13
- import { T as Title } from './Title-22c2f3bf.js';
14
- import { F as Flex } from './Flex-40a74d8a.js';
15
- import { getQueryOptions } from '@appbaseio/reactivecore/lib/utils/helper';
16
- import { n as noSuggestions, s as suggestionsContainer, I as Input, a as suggestions } from './Input-dfd9dd40.js';
12
+ import { g as getComponent, h as hasCustomRenderer, f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, j as getQuerySuggestionsComponent, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, m as hasQuerySuggestionsRenderer, c as connect } from './index-5daa8276.js';
13
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
14
+ import { T as Title } from './Title-579f8d6c.js';
15
+ import { F as Flex } from './Flex-aac91505.js';
16
+ import hotkeys from 'hotkeys-js';
17
+ import { I as IconWrapper, C as CancelSvg, a as IconGroup, D as Downshift, b as InputWrapper } from './CancelSvg-4d9e0857.js';
18
+ import { n as noSuggestions, s as suggestionsContainer, I as Input, a as suggestions } from './Input-d8519224.js';
17
19
  import 'compute-scroll-into-view';
18
- import { D as Downshift } from './DownShift-d8f2500f.js';
19
- import { C as Container } from './Container-f5efec9e.js';
20
+ import { C as Container } from './Container-4383c6f0.js';
20
21
  import Highlight from 'vue-highlight-words';
21
22
 
22
- function _templateObject4() {
23
- var data = _taggedTemplateLiteralLoose(["\n\tposition: absolute;\n\ttop: ", ";\n\tcursor: pointer;\n\t", ";\n\t", ";\n\t", ";\n\tsvg.search-icon {\n\t\tfill: ", ";\n\t}\n\tsvg.cancel-icon {\n\t\tfill: ", ";\n\t}\n"]);
24
-
25
- _templateObject4 = function _templateObject4() {
26
- return data;
27
- };
28
-
29
- return data;
30
- }
31
-
32
- function _templateObject3() {
33
- var data = _taggedTemplateLiteralLoose(["\n\tpadding-right: 29px;\n\tright: 0;\n"]);
34
-
35
- _templateObject3 = function _templateObject3() {
36
- return data;
37
- };
38
-
39
- return data;
40
- }
41
-
42
- function _templateObject2() {
43
- var data = _taggedTemplateLiteralLoose(["\n\tpadding-right: 12px;\n\tright: 0;\n"]);
44
-
45
- _templateObject2 = function _templateObject2() {
46
- return data;
47
- };
48
-
49
- return data;
50
- }
51
-
52
- function _templateObject() {
53
- var data = _taggedTemplateLiteralLoose(["\n\tpadding-left: 12px;\n\tleft: 0;\n"]);
54
-
55
- _templateObject = function _templateObject() {
56
- return data;
57
- };
58
-
59
- return data;
60
- }
61
- var left = css(_templateObject());
62
- var right = css(_templateObject2());
63
- var clear = css(_templateObject3());
64
- var InputIcon = styled('div')(_templateObject4(), function (_ref) {
65
- var isClearIcon = _ref.isClearIcon;
66
- return isClearIcon ? '12px' : '13px';
67
- }, function (_ref2) {
68
- var iconPosition = _ref2.iconPosition;
69
-
70
- if (iconPosition === 'left') {
71
- return left;
72
- } else if (iconPosition === 'right') {
73
- return right;
74
- }
23
+ var _templateObject;
24
+ var InputGroup = styled('div')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: stretch;\n width: 100%;\n"])));
25
+ InputGroup.defaultProps = {
26
+ className: 'input-group'
27
+ };
75
28
 
76
- return null;
77
- }, function (_ref3) {
78
- var clearIcon = _ref3.clearIcon;
79
- return clearIcon && clear;
80
- }, function (_ref4) {
81
- var showIcon = _ref4.showIcon;
82
- return !showIcon && 'padding-right:10px';
83
- }, function (_ref5) {
84
- var theme = _ref5.theme;
85
- return theme.colors.primaryColor;
86
- }, function (_ref6) {
87
- var theme = _ref6.theme;
88
- return theme.colors.borderColor;
89
- });
29
+ var _templateObject$1;
30
+ var InputAddon = styled('span')(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #fafafa;\n border: 1px solid #ccc;\n border-radius: 2px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 14px;\n font-weight: 400;\n padding: 0 11px;\n position: relative;\n transition: all 0.3s;\n box-sizing: border-box;\n overflow: hidden;\n\n &:first-of-type {\n border-right: none;\n }\n &:last-of-type {\n border-left: none;\n }\n"])));
31
+ InputAddon.defaultProps = {
32
+ className: 'input-addon'
33
+ };
90
34
 
91
35
  var getClassName = helper.getClassName;
92
36
  var SuggestionWrapper = {
@@ -108,22 +52,14 @@ var SuggestionWrapper = {
108
52
  }
109
53
  };
110
54
 
111
- function _templateObject$1() {
112
- var data = _taggedTemplateLiteralLoose(["\n\t.highlight {\n\t\tbackground: transparent;\n\t\tcolor: inherit;\n\t\tfont-weight: 600;\n\t\tpadding: 0;\n\t}\n"]);
113
-
114
- _templateObject$1 = function _templateObject() {
115
- return data;
116
- };
117
-
118
- return data;
119
- }
55
+ var _templateObject$2;
120
56
  var highlightStyle = {
121
57
  fontWeight: 600,
122
58
  padding: 0,
123
59
  backgroundColor: 'transparent',
124
60
  color: 'inherit'
125
61
  };
126
- var PredictiveSuggestion = styled('span')(_templateObject$1());
62
+ var PredictiveSuggestion = styled('span')(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["\n\t.highlight {\n\t\tbackground: transparent;\n\t\tcolor: inherit;\n\t\tfont-weight: 600;\n\t\tpadding: 0;\n\t}\n"])));
127
63
  var SuggestionItem = {
128
64
  name: 'SuggestionItem',
129
65
  props: {
@@ -238,75 +174,9 @@ var SearchSvg = {
238
174
  }
239
175
  };
240
176
 
241
- var CancelSvg = {
242
- functional: true,
243
- render: function render(h) {
244
- return h("svg", {
245
- "attrs": {
246
- "alt": "Clear",
247
- "height": "10",
248
- "width": "8",
249
- "xmlns": "http://www.w3.org/2000/svg",
250
- "viewBox": "0 0 212.982 212.982"
251
- },
252
- "class": "cancel-icon"
253
- }, [h("title", ["Clear"]), h("path", {
254
- "attrs": {
255
- "d": 'M131.804,106.491l75.936-75.936c6.99-6.99,6.99-18.323,0-25.312c-6.99-6.99-18.322-6.99-25.312,0l-75.937,75.937L30.554,5.242c-6.99-6.99-18.322-6.99-25.312,0c-6.989,6.99-6.989,18.323,0,25.312l75.937,75.936L5.242,182.427c-6.989,6.99-6.989,18.323,0,25.312c6.99,6.99,18.322,6.99,25.312,0l75.937-75.937l75.937,75.937c6.989,6.99,18.322,6.99,25.312,0c6.99-6.99,6.99-18.322,0-25.312L131.804,106.491z'
256
- }
257
- })]);
258
- }
259
- };
260
-
261
- function _templateObject2$1() {
262
- var data = _taggedTemplateLiteralLoose(["\n\theight: 40px;\n\tposition: absolute;\n\ttop: 8px;\n\tcursor: pointer;\n\tright: 15px;\n\t", "\n\t", "\n width: 11px;\n"]);
177
+ var _templateObject$3;
263
178
 
264
- _templateObject2$1 = function _templateObject2() {
265
- return data;
266
- };
267
-
268
- return data;
269
- }
270
-
271
- function _templateObject$2() {
272
- var data = _taggedTemplateLiteralLoose(["\n\tright: 35px;\n"]);
273
-
274
- _templateObject$2 = function _templateObject() {
275
- return data;
276
- };
277
-
278
- return data;
279
- }
280
- var right$1 = css(_templateObject$2());
281
- var MicIcon = styled('div')(_templateObject2$1(), function (_ref) {
282
- var iconPosition = _ref.iconPosition,
283
- showClear = _ref.showClear;
284
- if (showClear && iconPosition !== 'left') return 'right: 51px;';
285
-
286
- if (iconPosition === 'right' || showClear) {
287
- return right$1;
288
- }
289
-
290
- return null;
291
- }, function (_ref2) {
292
- var showIcon = _ref2.showIcon,
293
- showClear = _ref2.showClear;
294
- if (!showIcon && showClear) return 'right: 32px;';
295
- if (!showIcon && !showClear) return 'right: 15px;';
296
- return null;
297
- });
298
-
299
- function _templateObject$3() {
300
- var data = _taggedTemplateLiteralLoose(["\n\t#el_TvxDfTAtKp {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_D93PK3GbmJ {\n\t\t-webkit-transform: translate(163px, 131px);\n\t\ttransform: translate(163px, 131px);\n\t\tfill: #d8d8d8;\n\t}\n"]);
301
-
302
- _templateObject$3 = function _templateObject() {
303
- return data;
304
- };
305
-
306
- return data;
307
- }
308
-
309
- injectGlobal(_templateObject$3());
179
+ injectGlobal(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n\t#el_TvxDfTAtKp {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_D93PK3GbmJ {\n\t\t-webkit-transform: translate(163px, 131px);\n\t\ttransform: translate(163px, 131px);\n\t\tfill: #d8d8d8;\n\t}\n"])));
310
180
  var MicSvg = {
311
181
  name: 'MicSvg',
312
182
  props: ['className'],
@@ -320,6 +190,9 @@ var MicSvg = {
320
190
  "width": 28,
321
191
  "height": 28,
322
192
  "className": this.$props.className
193
+ },
194
+ "style": {
195
+ transform: 'scale(1.5)'
323
196
  }
324
197
  }, [h("g", {
325
198
  "attrs": {
@@ -348,23 +221,18 @@ var MicSvg = {
348
221
  }
349
222
  };
350
223
 
351
- function _templateObject$4() {
352
- var data = _taggedTemplateLiteralLoose(["\n\t#el_X81iT9kZYo {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_gMpyalCphp {\n\t\t-webkit-transform: translate(163px, 131px);\n\t\ttransform: translate(163px, 131px);\n\t}\n\t#el_c7H-3u-D4l {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_qhFcdAAFwo {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_M8X8g37WOI {\n\t\tstroke: #e83137;\n\t\tstroke-width: 21;\n\t}\n"]);
353
-
354
- _templateObject$4 = function _templateObject() {
355
- return data;
356
- };
357
-
358
- return data;
359
- }
224
+ var _templateObject$4;
360
225
 
361
- injectGlobal(_templateObject$4());
226
+ injectGlobal(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n\t#el_X81iT9kZYo {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_gMpyalCphp {\n\t\t-webkit-transform: translate(163px, 131px);\n\t\ttransform: translate(163px, 131px);\n\t}\n\t#el_c7H-3u-D4l {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_qhFcdAAFwo {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_M8X8g37WOI {\n\t\tstroke: #e83137;\n\t\tstroke-width: 21;\n\t}\n"])));
362
227
  var MuteSvg = {
363
228
  name: 'MuteSvg',
364
229
  props: ['className'],
365
230
  render: function render() {
366
231
  var h = arguments[0];
367
232
  return h("svg", {
233
+ "style": {
234
+ transform: 'scale(1.5)'
235
+ },
368
236
  "attrs": {
369
237
  "viewBox": "0 0 480 480",
370
238
  "xmlns": "http://www.w3.org/2000/svg",
@@ -411,17 +279,9 @@ var MuteSvg = {
411
279
  }
412
280
  };
413
281
 
414
- function _templateObject$5() {
415
- var data = _taggedTemplateLiteralLoose(["\n\t@-webkit-keyframes kf_el_6WKby7wXqV_an_qqO-rxbNc {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t13.89% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_6WKby7wXqV_an_qqO-rxbNc {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t13.89% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_Wi-my975tM_an_XhXP1epXB {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t27.78% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_Wi-my975tM_an_XhXP1epXB {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t27.78% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_DkfFFTaFxy8_an_T2XxzvIaA {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t41.67% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_DkfFFTaFxy8_an_T2XxzvIaA {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t41.67% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_34IgwiMB5rf_an_TPom3H2LI {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t55.56% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_34IgwiMB5rf_an_TPom3H2LI {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t55.56% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_DeebuCsPTGA_an_aYTRBE7Na {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t69.44% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_DeebuCsPTGA_an_aYTRBE7Na {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t69.44% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_ZOjjrPTvyrv_an_l_BjBNzXw {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t83.33% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_ZOjjrPTvyrv_an_l_BjBNzXw {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t83.33% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_2FATegVmf0K_an_wLg4ofuFx {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t97.22% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_2FATegVmf0K_an_wLg4ofuFx {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t97.22% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t#el_hiibMG0x- * {\n\t\t-webkit-animation-duration: 1.2s;\n\t\tanimation-duration: 1.2s;\n\t\t-webkit-animation-iteration-count: infinite;\n\t\tanimation-iteration-count: infinite;\n\t\t-webkit-animation-timing-function: cubic-bezier(0, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0, 0, 1, 1);\n\t}\n\t#el_QJeJ_2CDw5 {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_UYYCfubTRf {\n\t\t-webkit-transform: translate(163px, 123px);\n\t\ttransform: translate(163px, 123px);\n\t}\n\t#el_uzZNtK32Zi {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_EYKQ2N9Kgy {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_6SDP2LAgKC {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t}\n\t#el_-Vm65Ltfy7 {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_q04iZcSim4 {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_6WKby7wXqV {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_6WKby7wXqV_an_qqO-rxbNc;\n\t\tanimation-name: kf_el_6WKby7wXqV_an_qqO-rxbNc;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_9bggsfQOtU {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_NKxqi9eIym {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_Wi-my975tM {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_Wi-my975tM_an_XhXP1epXB;\n\t\tanimation-name: kf_el_Wi-my975tM_an_XhXP1epXB;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_zclQ34fvf7 {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_1OsvRT8HkeZ {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_DkfFFTaFxy8 {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_DkfFFTaFxy8_an_T2XxzvIaA;\n\t\tanimation-name: kf_el_DkfFFTaFxy8_an_T2XxzvIaA;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_aa9sjx4H0vA {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_tea114vWg0J {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_34IgwiMB5rf {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_34IgwiMB5rf_an_TPom3H2LI;\n\t\tanimation-name: kf_el_34IgwiMB5rf_an_TPom3H2LI;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_z5u6RAFhx7d {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_7nfuWmA5Uhy {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_DeebuCsPTGA {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_DeebuCsPTGA_an_aYTRBE7Na;\n\t\tanimation-name: kf_el_DeebuCsPTGA_an_aYTRBE7Na;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el__ZcqlS20zcw {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_8DnEQnD7VWV {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_ZOjjrPTvyrv {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_ZOjjrPTvyrv_an_l_BjBNzXw;\n\t\tanimation-name: kf_el_ZOjjrPTvyrv_an_l_BjBNzXw;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_FYYKCI_u24e {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_XZty4MnTp5Y {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_2FATegVmf0K {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_2FATegVmf0K_an_wLg4ofuFx;\n\t\tanimation-name: kf_el_2FATegVmf0K_an_wLg4ofuFx;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_RMT1KUfbdF8 {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_RgLcovvFiO1 {\n\t\tfill: #d8d8d8;\n\t}\n"]);
282
+ var _templateObject$5;
416
283
 
417
- _templateObject$5 = function _templateObject() {
418
- return data;
419
- };
420
-
421
- return data;
422
- }
423
-
424
- injectGlobal(_templateObject$5());
284
+ injectGlobal(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["\n\t@-webkit-keyframes kf_el_6WKby7wXqV_an_qqO-rxbNc {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t13.89% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_6WKby7wXqV_an_qqO-rxbNc {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t13.89% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_Wi-my975tM_an_XhXP1epXB {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t27.78% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_Wi-my975tM_an_XhXP1epXB {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t27.78% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_DkfFFTaFxy8_an_T2XxzvIaA {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t41.67% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_DkfFFTaFxy8_an_T2XxzvIaA {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t41.67% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_34IgwiMB5rf_an_TPom3H2LI {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t55.56% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_34IgwiMB5rf_an_TPom3H2LI {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t55.56% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_DeebuCsPTGA_an_aYTRBE7Na {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t69.44% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_DeebuCsPTGA_an_aYTRBE7Na {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t69.44% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_ZOjjrPTvyrv_an_l_BjBNzXw {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t83.33% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_ZOjjrPTvyrv_an_l_BjBNzXw {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t83.33% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@-webkit-keyframes kf_el_2FATegVmf0K_an_wLg4ofuFx {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t97.22% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t@keyframes kf_el_2FATegVmf0K_an_wLg4ofuFx {\n\t\t0% {\n\t\t\topacity: 0;\n\t\t}\n\t\t97.22% {\n\t\t\topacity: 1;\n\t\t}\n\t\t100% {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\t#el_hiibMG0x- * {\n\t\t-webkit-animation-duration: 1.2s;\n\t\tanimation-duration: 1.2s;\n\t\t-webkit-animation-iteration-count: infinite;\n\t\tanimation-iteration-count: infinite;\n\t\t-webkit-animation-timing-function: cubic-bezier(0, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0, 0, 1, 1);\n\t}\n\t#el_QJeJ_2CDw5 {\n\t\tstroke: none;\n\t\tstroke-width: 1;\n\t\tfill: none;\n\t}\n\t#el_UYYCfubTRf {\n\t\t-webkit-transform: translate(163px, 123px);\n\t\ttransform: translate(163px, 123px);\n\t}\n\t#el_uzZNtK32Zi {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_EYKQ2N9Kgy {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_6SDP2LAgKC {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t}\n\t#el_-Vm65Ltfy7 {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_q04iZcSim4 {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_6WKby7wXqV {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_6WKby7wXqV_an_qqO-rxbNc;\n\t\tanimation-name: kf_el_6WKby7wXqV_an_qqO-rxbNc;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_9bggsfQOtU {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_NKxqi9eIym {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_Wi-my975tM {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_Wi-my975tM_an_XhXP1epXB;\n\t\tanimation-name: kf_el_Wi-my975tM_an_XhXP1epXB;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_zclQ34fvf7 {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_1OsvRT8HkeZ {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_DkfFFTaFxy8 {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_DkfFFTaFxy8_an_T2XxzvIaA;\n\t\tanimation-name: kf_el_DkfFFTaFxy8_an_T2XxzvIaA;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_aa9sjx4H0vA {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_tea114vWg0J {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_34IgwiMB5rf {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_34IgwiMB5rf_an_TPom3H2LI;\n\t\tanimation-name: kf_el_34IgwiMB5rf_an_TPom3H2LI;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_z5u6RAFhx7d {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_7nfuWmA5Uhy {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_DeebuCsPTGA {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_DeebuCsPTGA_an_aYTRBE7Na;\n\t\tanimation-name: kf_el_DeebuCsPTGA_an_aYTRBE7Na;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el__ZcqlS20zcw {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_8DnEQnD7VWV {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_ZOjjrPTvyrv {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_ZOjjrPTvyrv_an_l_BjBNzXw;\n\t\tanimation-name: kf_el_ZOjjrPTvyrv_an_l_BjBNzXw;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_FYYKCI_u24e {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_XZty4MnTp5Y {\n\t\tfill: #d8d8d8;\n\t}\n\t#el_2FATegVmf0K {\n\t\t-webkit-transform: translate(37.846924px, 0px);\n\t\ttransform: translate(37.846924px, 0px);\n\t\t-webkit-animation-fill-mode: backwards;\n\t\tanimation-fill-mode: backwards;\n\t\topacity: 0;\n\t\t-webkit-animation-name: kf_el_2FATegVmf0K_an_wLg4ofuFx;\n\t\tanimation-name: kf_el_2FATegVmf0K_an_wLg4ofuFx;\n\t\t-webkit-animation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t\tanimation-timing-function: cubic-bezier(0.42, 0, 1, 1);\n\t}\n\t#el_RMT1KUfbdF8 {\n\t\tfill: #0B6AFF;\n\t}\n\t#el_RgLcovvFiO1 {\n\t\tfill: #d8d8d8;\n\t}\n"])));
425
285
  var ListenSvg = {
426
286
  name: 'ListenSvg',
427
287
  props: ['className'],
@@ -436,6 +296,9 @@ var ListenSvg = {
436
296
  "width": 28,
437
297
  "height": 29,
438
298
  "className": this.$props.className
299
+ },
300
+ "style": {
301
+ transform: 'scale(1.5)'
439
302
  }
440
303
  }, [h("defs", [h("path", {
441
304
  "attrs": {
@@ -739,16 +602,16 @@ var Mic = {
739
602
  name: 'Mic',
740
603
  props: {
741
604
  children: types.title,
742
- lang: types.string.def('en-US'),
743
- iconPosition: types.string.def('left'),
605
+ lang: VueTypes.string.def('en-US'),
606
+ iconPosition: VueTypes.string.def('left'),
744
607
  handleResult: types.func,
745
608
  onNoMatch: types.func,
746
609
  onError: types.func,
747
610
  getInstance: types.func,
748
611
  render: types.func,
749
612
  className: types.string,
750
- applyClearStyle: types.bool,
751
- showIcon: types.bool
613
+ applyClearStyle: VueTypes.bool,
614
+ showIcon: VueTypes.bool
752
615
  },
753
616
  methods: {
754
617
  getComponent: function getComponent$1() {
@@ -919,22 +782,12 @@ var Mic = {
919
782
  },
920
783
  render: function render() {
921
784
  var h = arguments[0];
922
- var _this$$props2 = this.$props,
923
- iconPosition = _this$$props2.iconPosition,
924
- applyClearStyle = _this$$props2.applyClearStyle,
925
- showIcon = _this$$props2.showIcon;
926
785
 
927
786
  if (this.hasCustomRenderer) {
928
787
  return this.getComponent();
929
788
  }
930
789
 
931
- return h(MicIcon, {
932
- "attrs": {
933
- "showIcon": showIcon,
934
- "showClear": applyClearStyle,
935
- "iconPosition": iconPosition
936
- }
937
- }, [this.Icon]);
790
+ return h(IconWrapper, [this.Icon]);
938
791
  }
939
792
  };
940
793
 
@@ -1020,13 +873,15 @@ var updateQuery = Actions.updateQuery,
1020
873
  var debounce = helper.debounce,
1021
874
  checkValueChange = helper.checkValueChange,
1022
875
  getClassName$1 = helper.getClassName,
1023
- getOptionsFromQuery = helper.getOptionsFromQuery,
876
+ extractQueryFromCustomQuery = helper.extractQueryFromCustomQuery,
877
+ getOptionsForCustomQuery = helper.getOptionsForCustomQuery,
1024
878
  isEqual = helper.isEqual,
1025
879
  getCompositeAggsQuery = helper.getCompositeAggsQuery,
1026
880
  withClickIds = helper.withClickIds,
1027
881
  getResultStats = helper.getResultStats,
1028
882
  handleOnSuggestions = helper.handleOnSuggestions,
1029
- getTopSuggestions = helper.getTopSuggestions;
883
+ getTopSuggestions = helper.getTopSuggestions,
884
+ normalizeDataField = helper.normalizeDataField;
1030
885
  var DataSearch = {
1031
886
  name: 'DataSearch',
1032
887
  data: function data() {
@@ -1046,14 +901,13 @@ var DataSearch = {
1046
901
  }
1047
902
  },
1048
903
  created: function created() {
1049
- var _this = this;
1050
-
1051
904
  var _this$$props = this.$props,
1052
905
  enableQuerySuggestions = _this$$props.enableQuerySuggestions,
1053
906
  renderQuerySuggestions = _this$$props.renderQuerySuggestions,
1054
907
  enableRecentSearches = _this$$props.enableRecentSearches,
1055
908
  distinctField = _this$$props.distinctField,
1056
- distinctFieldConfig = _this$$props.distinctFieldConfig; // TODO: Remove in 2.0
909
+ distinctFieldConfig = _this$$props.distinctFieldConfig,
910
+ index = _this$$props.index; // TODO: Remove in 2.0
1057
911
 
1058
912
  if (enableQuerySuggestions) {
1059
913
  console.warn('Warning(ReactiveSearch): The `enableQuerySuggestions` prop has been marked as deprecated, please use the `enablePopularSuggestions` prop instead.');
@@ -1064,14 +918,18 @@ var DataSearch = {
1064
918
  console.warn('Warning(ReactiveSearch): The `renderQuerySuggestions` prop has been marked as deprecated, please use the `renderPopularSuggestions` prop instead.');
1065
919
  }
1066
920
 
1067
- if (this.config.enableAppbase && this.aggregationField && this.aggregationField !== '') {
921
+ if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
1068
922
  console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
1069
923
  }
1070
924
 
1071
- if (!this.config.enableAppbase && (distinctField || distinctFieldConfig)) {
925
+ if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
1072
926
  console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
1073
927
  }
1074
928
 
929
+ if (!this.enableAppbase && index) {
930
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
931
+ }
932
+
1075
933
  this.loadPopularSuggestions(this.$props.componentId);
1076
934
  this.currentValue = this.selectedValue || '';
1077
935
 
@@ -1079,13 +937,7 @@ var DataSearch = {
1079
937
  this.getRecentSearches();
1080
938
  }
1081
939
 
1082
- this.handleTextChange = debounce(function (value) {
1083
- if (_this.$props.autosuggest) {
1084
- _this.updateDefaultQueryHandler(value, _this.$props);
1085
- } else {
1086
- _this.updateQueryHandler(_this.$props.componentId, value, _this.$props);
1087
- }
1088
- }, this.$props.debounce); // Set custom and default queries in store
940
+ this.handleTextChange = debounce(this.handleText, this.$props.debounce); // Set custom and default queries in store
1089
941
 
1090
942
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
1091
943
  updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
@@ -1124,12 +976,12 @@ var DataSearch = {
1124
976
  }
1125
977
 
1126
978
  var customDefaultPopularSuggestions = (this.defaultPopularSuggestions || []).map(function (suggestion) {
1127
- return _extends(_extends({}, suggestion), {}, {
979
+ return _extends({}, suggestion, {
1128
980
  _popular_suggestion: true
1129
981
  });
1130
982
  });
1131
983
  var customNormalizedRecentSearches = (this.normalizedRecentSearches || []).map(function (search) {
1132
- return _extends(_extends({}, search), {}, {
984
+ return _extends({}, search, {
1133
985
  _recent_search: true
1134
986
  });
1135
987
  });
@@ -1146,7 +998,7 @@ var DataSearch = {
1146
998
  },
1147
999
  props: {
1148
1000
  options: types.options,
1149
- autoFocus: types.bool,
1001
+ autoFocus: VueTypes.bool,
1150
1002
  autosuggest: VueTypes.bool.def(true),
1151
1003
  beforeValueChange: types.func,
1152
1004
  className: VueTypes.string.def(''),
@@ -1155,29 +1007,35 @@ var DataSearch = {
1155
1007
  customHighlight: types.func,
1156
1008
  customQuery: types.func,
1157
1009
  defaultQuery: types.func,
1158
- dataField: VueTypes.oneOfType([VueTypes.string, VueTypes.arrayOf(VueTypes.string)]),
1010
+ dataField: VueTypes.oneOfType([VueTypes.string, VueTypes.shape({
1011
+ field: VueTypes.string,
1012
+ weight: VueTypes.number
1013
+ }), VueTypes.arrayOf(VueTypes.string), VueTypes.arrayOf({
1014
+ field: VueTypes.string,
1015
+ weight: VueTypes.number
1016
+ })]),
1159
1017
  aggregationField: types.string,
1160
1018
  aggregationSize: VueTypes.number,
1161
- size: VueTypes.number.def(10),
1019
+ size: VueTypes.number,
1162
1020
  debounce: VueTypes.number.def(0),
1163
1021
  defaultValue: types.string,
1164
- excludeFields: types.excludeFields.def([]),
1022
+ excludeFields: types.excludeFields,
1165
1023
  value: types.value,
1166
1024
  defaultSuggestions: types.suggestions,
1167
- enableSynonyms: types.bool.def(true),
1025
+ enableSynonyms: VueTypes.bool.def(true),
1168
1026
  enableQuerySuggestions: VueTypes.bool.def(false),
1169
1027
  enablePopularSuggestions: VueTypes.bool.def(false),
1170
1028
  enableRecentSearches: VueTypes.bool.def(false),
1171
1029
  fieldWeights: types.fieldWeights,
1172
1030
  filterLabel: types.string,
1173
1031
  fuzziness: types.fuzziness,
1174
- highlight: types.bool,
1032
+ highlight: VueTypes.bool,
1175
1033
  highlightField: types.stringOrArray,
1176
1034
  icon: types.children,
1177
1035
  iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
1178
- includeFields: types.includeFields.def(['*']),
1036
+ includeFields: types.includeFields,
1179
1037
  innerClass: types.style,
1180
- innerRef: types.string,
1038
+ innerRef: VueTypes.string.def('searchInputField'),
1181
1039
  render: types.func,
1182
1040
  renderQuerySuggestions: types.func,
1183
1041
  renderPopularSuggestions: types.func,
@@ -1200,11 +1058,17 @@ var DataSearch = {
1200
1058
  recentSearchesIcon: VueTypes.any,
1201
1059
  popularSearchesIcon: VueTypes.any,
1202
1060
  // mic props
1203
- showVoiceSearch: types.bool.def(false),
1061
+ showVoiceSearch: VueTypes.bool.def(false),
1204
1062
  getMicInstance: types.func,
1205
1063
  renderMic: types.func,
1206
1064
  distinctField: types.string,
1207
- distinctFieldConfig: types.props
1065
+ distinctFieldConfig: types.props,
1066
+ //
1067
+ focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
1068
+ addonBefore: VueTypes.any,
1069
+ addonAfter: VueTypes.any,
1070
+ expandSuggestionsContainer: VueTypes.bool.def(true),
1071
+ index: VueTypes.string
1208
1072
  },
1209
1073
  beforeMount: function beforeMount() {
1210
1074
  if (this.$props.highlight) {
@@ -1213,7 +1077,7 @@ var DataSearch = {
1213
1077
  }
1214
1078
 
1215
1079
  var queryOptions = DataSearch.highlightQuery(this.$props) || {};
1216
- this.queryOptions = _extends(_extends({}, queryOptions), this.getBasicQueryOptions());
1080
+ this.queryOptions = _extends({}, queryOptions, this.getBasicQueryOptions());
1217
1081
  this.setQueryOptions(this.$props.componentId, this.queryOptions);
1218
1082
  } else {
1219
1083
  this.queryOptions = this.getBasicQueryOptions();
@@ -1228,6 +1092,9 @@ var DataSearch = {
1228
1092
  this.setValue(this.$props.defaultValue, true);
1229
1093
  }
1230
1094
  },
1095
+ mounted: function mounted() {
1096
+ this.listenForFocusShortcuts();
1097
+ },
1231
1098
  watch: {
1232
1099
  highlight: function highlight() {
1233
1100
  this.updateQueryOptions();
@@ -1278,14 +1145,24 @@ var DataSearch = {
1278
1145
  if (oldVal !== newVal && this.$data.currentValue !== newVal) {
1279
1146
  if (!newVal && this.$data.currentValue) {
1280
1147
  // selected value is cleared, call onValueSelected
1281
- this.onValueSelectedHandler("", causes.CLEAR_VALUE);
1148
+ this.onValueSelectedHandler('', causes.CLEAR_VALUE);
1282
1149
  }
1283
1150
 
1284
1151
  this.setValue(newVal || '', true, this.$props);
1285
1152
  }
1153
+ },
1154
+ focusShortcuts: function focusShortcuts() {
1155
+ this.listenForFocusShortcuts();
1286
1156
  }
1287
1157
  },
1288
1158
  methods: {
1159
+ handleText: function handleText(value) {
1160
+ if (this.$props.autosuggest) {
1161
+ this.updateDefaultQueryHandler(value, this.$props);
1162
+ } else {
1163
+ this.updateQueryHandler(this.$props.componentId, value, this.$props);
1164
+ }
1165
+ },
1289
1166
  validateDataField: function validateDataField() {
1290
1167
  var propName = 'dataField';
1291
1168
  var componentName = DataSearch.name;
@@ -1293,13 +1170,13 @@ var DataSearch = {
1293
1170
  var requiredError = propName + " supplied to " + componentName + " is required. Validation failed.";
1294
1171
  var propValue = props[propName];
1295
1172
 
1296
- if (this.config && !this.config.enableAppbase) {
1173
+ if (!this.enableAppbase) {
1297
1174
  if (!propValue) {
1298
1175
  console.error(requiredError);
1299
1176
  return;
1300
1177
  }
1301
1178
 
1302
- if (typeof propValue !== 'string' && !Array.isArray(propValue)) {
1179
+ if (typeof propValue !== 'string' && typeof propValue !== 'object' && !Array.isArray(propValue)) {
1303
1180
  console.error("Invalid " + propName + " supplied to " + componentName + ". Validation failed.");
1304
1181
  return;
1305
1182
  }
@@ -1315,7 +1192,7 @@ var DataSearch = {
1315
1192
  }
1316
1193
 
1317
1194
  var queryOptions = DataSearch.highlightQuery(this.$props) || {};
1318
- this.queryOptions = _extends(_extends({}, queryOptions), this.getBasicQueryOptions());
1195
+ this.queryOptions = _extends({}, queryOptions, this.getBasicQueryOptions());
1319
1196
  this.setQueryOptions(this.$props.componentId, this.queryOptions);
1320
1197
  },
1321
1198
  getComponent: function getComponent$1(downshiftProps, isQuerySuggestionsRender) {
@@ -1383,7 +1260,7 @@ var DataSearch = {
1383
1260
  }
1384
1261
  },
1385
1262
  setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen) {
1386
- var _this2 = this;
1263
+ var _this = this;
1387
1264
 
1388
1265
  if (isDefaultValue === void 0) {
1389
1266
  isDefaultValue = false;
@@ -1399,51 +1276,51 @@ var DataSearch = {
1399
1276
 
1400
1277
  var performUpdate = function performUpdate() {
1401
1278
  // Refresh recent searches when value becomes empty
1402
- if (!value && _this2.currentValue && _this2.enableRecentSearches) {
1403
- _this2.getRecentSearches();
1279
+ if (!value && _this.currentValue && _this.enableRecentSearches) {
1280
+ _this.getRecentSearches();
1404
1281
  }
1405
1282
 
1406
- _this2.currentValue = value;
1283
+ _this.currentValue = value;
1407
1284
 
1408
1285
  if (isDefaultValue) {
1409
- if (_this2.$props.autosuggest) {
1286
+ if (_this.$props.autosuggest) {
1410
1287
  if (toggleIsOpen) {
1411
- _this2.isOpen = false;
1288
+ _this.isOpen = false;
1412
1289
  }
1413
1290
 
1414
- _this2.updateDefaultQueryHandler(value, _this2.$props);
1291
+ _this.updateDefaultQueryHandler(value, _this.$props);
1415
1292
  } // in case of strict selection only SUGGESTION_SELECT should be able
1416
1293
  // to set the query otherwise the value should reset
1417
1294
 
1418
1295
 
1419
1296
  if (props.strictSelection) {
1420
1297
  if (cause === causes.SUGGESTION_SELECT || value === '') {
1421
- _this2.updateQueryHandler(props.componentId, value, props);
1298
+ _this.updateQueryHandler(props.componentId, value, props);
1422
1299
  } else {
1423
- _this2.setValue('', true);
1300
+ _this.setValue('', true);
1424
1301
  }
1425
1302
  } else {
1426
- _this2.updateQueryHandler(props.componentId, value, props);
1303
+ _this.updateQueryHandler(props.componentId, value, props);
1427
1304
  }
1428
1305
  } else {
1429
1306
  // debounce for handling text while typing
1430
- _this2.handleTextChange(value);
1307
+ _this.handleTextChange(value);
1431
1308
  }
1432
1309
 
1433
- _this2.$emit('valueChange', value);
1310
+ _this.$emit('valueChange', value);
1434
1311
 
1435
- _this2.$emit('value-change', value); // Set the already fetched suggestions if query is same as used last to fetch the hits
1312
+ _this.$emit('value-change', value); // Set the already fetched suggestions if query is same as used last to fetch the hits
1436
1313
 
1437
1314
 
1438
- if (value === _this2.lastUsedQuery) {
1439
- _this2.suggestions = _this2.onSuggestions(_this2.suggestions); // invoke on suggestions
1315
+ if (value === _this.lastUsedQuery) {
1316
+ _this.suggestions = _this.onSuggestions(_this.suggestions); // invoke on suggestions
1440
1317
 
1441
- _this2.$emit('suggestions', _this2.suggestions);
1318
+ _this.$emit('suggestions', _this.suggestions);
1442
1319
  } else if (!value) {
1443
1320
  // reset suggestions
1444
- _this2.suggestions = []; // invoke on suggestions
1321
+ _this.suggestions = []; // invoke on suggestions
1445
1322
 
1446
- _this2.$emit('suggestions', _this2.suggestions);
1323
+ _this.$emit('suggestions', _this.suggestions);
1447
1324
  }
1448
1325
  };
1449
1326
 
@@ -1455,17 +1332,18 @@ var DataSearch = {
1455
1332
 
1456
1333
  if (this.defaultQuery) {
1457
1334
  var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
1335
+ var defaultQueryObj = extractQueryFromCustomQuery(defaultQueryToBeSet);
1458
1336
 
1459
- if (defaultQueryToBeSet.query) {
1460
- query = defaultQueryToBeSet.query;
1337
+ if (defaultQueryObj) {
1338
+ query = defaultQueryObj;
1461
1339
  }
1462
1340
 
1463
- defaultQueryOptions = getOptionsFromQuery(defaultQueryToBeSet); // Update calculated default query in store
1341
+ defaultQueryOptions = getOptionsForCustomQuery(defaultQueryToBeSet); // Update calculated default query in store
1464
1342
 
1465
1343
  updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
1466
1344
  }
1467
1345
 
1468
- this.setQueryOptions(this.internalComponent, _extends(_extends({}, this.queryOptions), defaultQueryOptions));
1346
+ this.setQueryOptions(this.internalComponent, _extends({}, this.queryOptions, defaultQueryOptions), false);
1469
1347
  this.updateQuery({
1470
1348
  componentId: this.internalComponent,
1471
1349
  query: query,
@@ -1484,15 +1362,15 @@ var DataSearch = {
1484
1362
 
1485
1363
  if (customQuery) {
1486
1364
  var customQueryTobeSet = customQuery(value, props);
1487
- var queryTobeSet = customQueryTobeSet.query;
1365
+ var queryTobeSet = extractQueryFromCustomQuery(customQueryTobeSet);
1488
1366
 
1489
1367
  if (queryTobeSet) {
1490
1368
  query = queryTobeSet;
1491
1369
  }
1492
1370
 
1493
- customQueryOptions = getOptionsFromQuery(customQueryTobeSet);
1371
+ customQueryOptions = getOptionsForCustomQuery(customQueryTobeSet);
1494
1372
  updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
1495
- this.setQueryOptions(componentId, _extends(_extends({}, this.queryOptions), customQueryOptions));
1373
+ this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions), false);
1496
1374
  }
1497
1375
 
1498
1376
  if (!this.isPending) {
@@ -1510,10 +1388,7 @@ var DataSearch = {
1510
1388
  // need to review
1511
1389
  handleFocus: function handleFocus(event) {
1512
1390
  this.isOpen = true;
1513
-
1514
- if (this.$props.onFocus) {
1515
- this.$emit('focus', event);
1516
- }
1391
+ this.$emit('focus', event);
1517
1392
  },
1518
1393
  handleVoiceResults: function handleVoiceResults(_ref) {
1519
1394
  var results = _ref.results;
@@ -1521,18 +1396,18 @@ var DataSearch = {
1521
1396
  if (results && results[0] && results[0].isFinal && results[0][0] && results[0][0].transcript && results[0][0].transcript.trim()) {
1522
1397
  this.isPending = false;
1523
1398
  this.setValue(results[0][0].transcript.trim(), true);
1524
-
1525
- if (this.$props.autosuggest) {
1526
- this.isOpen = true;
1527
- }
1528
1399
  }
1529
1400
  },
1530
- triggerQuery: function triggerQuery() {
1401
+ triggerQuery: function triggerQuery(_temp) {
1402
+ var _ref2 = _temp === void 0 ? false : _temp,
1403
+ _ref2$isOpen = _ref2.isOpen,
1404
+ isOpen = _ref2$isOpen === void 0 ? false : _ref2$isOpen;
1405
+
1531
1406
  var value = this.$props.value;
1532
1407
 
1533
1408
  if (value !== undefined) {
1534
1409
  this.isPending = false;
1535
- this.setValue(this.$props.value, true);
1410
+ this.setValue(this.$props.value, !isOpen);
1536
1411
  }
1537
1412
  },
1538
1413
  triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
@@ -1554,7 +1429,7 @@ var DataSearch = {
1554
1429
  clearValue: function clearValue() {
1555
1430
  this.isPending = false;
1556
1431
  this.setValue('', true);
1557
- this.onValueSelectedHandler("", causes.CLEAR_VALUE);
1432
+ this.onValueSelectedHandler('', causes.CLEAR_VALUE);
1558
1433
  },
1559
1434
  handleKeyDown: function handleKeyDown(event, highlightedIndex) {
1560
1435
  var value = this.$props.value;
@@ -1570,11 +1445,8 @@ var DataSearch = {
1570
1445
  } // Need to review
1571
1446
 
1572
1447
 
1573
- if (this.$props.onKeyDown) {
1574
- // TODO: Remove camelCase events in 2.0
1575
- this.$emit('keyDown', event, this.triggerQuery);
1576
- this.$emit('key-down', event, this.triggerQuery);
1577
- }
1448
+ this.$emit('keyDown', event, this.triggerQuery);
1449
+ this.$emit('key-down', event, this.triggerQuery);
1578
1450
  },
1579
1451
  onInputChange: function onInputChange(e) {
1580
1452
  var inputValue = e.target.value;
@@ -1600,6 +1472,7 @@ var DataSearch = {
1600
1472
  if (value === undefined) {
1601
1473
  this.setValue(suggestion.value, true, this.$props, causes.SUGGESTION_SELECT);
1602
1474
  } else {
1475
+ this.isPending = false;
1603
1476
  this.$emit('change', suggestion.value, this.triggerQuery);
1604
1477
  }
1605
1478
 
@@ -1698,6 +1571,26 @@ var DataSearch = {
1698
1571
 
1699
1572
  return null;
1700
1573
  },
1574
+ renderInputAddonBefore: function renderInputAddonBefore() {
1575
+ var h = this.$createElement;
1576
+ var addonBefore = this.$scopedSlots.addonBefore;
1577
+
1578
+ if (addonBefore) {
1579
+ return h(InputAddon, [addonBefore()]);
1580
+ }
1581
+
1582
+ return null;
1583
+ },
1584
+ renderInputAddonAfter: function renderInputAddonAfter() {
1585
+ var h = this.$createElement;
1586
+ var addonAfter = this.$scopedSlots.addonAfter;
1587
+
1588
+ if (addonAfter) {
1589
+ return h(InputAddon, [addonAfter()]);
1590
+ }
1591
+
1592
+ return null;
1593
+ },
1701
1594
  renderIcons: function renderIcons() {
1702
1595
  var h = this.$createElement;
1703
1596
  var _this$$props3 = this.$props,
@@ -1709,13 +1602,16 @@ var DataSearch = {
1709
1602
  showIcon = _this$$props3.showIcon;
1710
1603
  var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
1711
1604
  var currentValue = this.$data.currentValue;
1712
- return h("div", [currentValue && showClear && h(InputIcon, {
1605
+ return h("div", [h(IconGroup, {
1606
+ "attrs": {
1607
+ "groupPosition": "right",
1608
+ "positionType": "absolute"
1609
+ }
1610
+ }, [currentValue && showClear && h(IconWrapper, {
1713
1611
  "on": {
1714
1612
  "click": this.clearValue
1715
1613
  },
1716
1614
  "attrs": {
1717
- "iconPosition": "right",
1718
- "clearIcon": iconPosition === 'right',
1719
1615
  "showIcon": showIcon,
1720
1616
  "isClearIcon": true
1721
1617
  }
@@ -1723,21 +1619,73 @@ var DataSearch = {
1723
1619
  "attrs": {
1724
1620
  "getInstance": getMicInstance,
1725
1621
  "render": renderMic,
1726
- "iconPosition": iconPosition,
1727
1622
  "handleResult": this.handleVoiceResults,
1728
- "className": getClassName$1(innerClass, 'mic') || null,
1729
- "applyClearStyle": !!currentValue && showClear,
1730
- "showIcon": showIcon
1623
+ "className": getClassName$1(innerClass, 'mic') || null
1731
1624
  }
1732
- }), h(InputIcon, {
1625
+ }), iconPosition === 'right' && showIcon && h(IconWrapper, {
1733
1626
  "on": {
1734
1627
  "click": this.handleSearchIconClick
1735
- },
1628
+ }
1629
+ }, [this.renderIcon()])]), h(IconGroup, {
1736
1630
  "attrs": {
1737
- "showIcon": showIcon,
1738
- "iconPosition": iconPosition
1631
+ "groupPosition": "left",
1632
+ "positionType": "absolute"
1633
+ }
1634
+ }, [iconPosition === 'left' && showIcon && h(IconWrapper, {
1635
+ "on": {
1636
+ "click": this.handleSearchIconClick
1739
1637
  }
1740
- }, [this.renderIcon()])]);
1638
+ }, [this.renderIcon()])])]);
1639
+ },
1640
+ focusSearchBox: function focusSearchBox(event) {
1641
+ var _this$$refs, _this$$refs$this$$pro;
1642
+
1643
+ var elt = event.target || event.srcElement;
1644
+ var tagName = elt.tagName;
1645
+
1646
+ if (elt.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') {
1647
+ // already in an input
1648
+ return;
1649
+ }
1650
+
1651
+ (_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
1652
+ },
1653
+ listenForFocusShortcuts: function listenForFocusShortcuts() {
1654
+ var _this2 = this;
1655
+
1656
+ var _this$$props$focusSho = this.$props.focusShortcuts,
1657
+ focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
1658
+
1659
+ if (isEmpty(focusShortcuts)) {
1660
+ return;
1661
+ }
1662
+
1663
+ var shortcutsString = parseFocusShortcuts(focusShortcuts).join(','); // handler for alphabets and other key combinations
1664
+
1665
+ hotkeys(shortcutsString, // eslint-disable-next-line no-unused-vars
1666
+
1667
+ /* eslint-disable no-shadow */
1668
+ function (event, handler) {
1669
+ // Prevent the default refresh event under WINDOWS system
1670
+ event.preventDefault();
1671
+
1672
+ _this2.focusSearchBox(event);
1673
+ }); // if one of modifier keys are used, they are handled below
1674
+
1675
+ hotkeys('*', function (event) {
1676
+ var modifierKeys = extractModifierKeysFromFocusShortcuts(focusShortcuts);
1677
+ if (modifierKeys.length === 0) return;
1678
+
1679
+ for (var index = 0; index < modifierKeys.length; index += 1) {
1680
+ var element = modifierKeys[index];
1681
+
1682
+ if (hotkeys[element]) {
1683
+ _this2.focusSearchBox(event);
1684
+
1685
+ break;
1686
+ }
1687
+ }
1688
+ });
1741
1689
  }
1742
1690
  },
1743
1691
  render: function render() {
@@ -1746,7 +1694,8 @@ var DataSearch = {
1746
1694
  var h = arguments[0];
1747
1695
  var _this$$props4 = this.$props,
1748
1696
  theme = _this$$props4.theme,
1749
- size = _this$$props4.size;
1697
+ size = _this$$props4.size,
1698
+ expandSuggestionsContainer = _this$$props4.expandSuggestionsContainer;
1750
1699
  var _this$$scopedSlots = this.$scopedSlots,
1751
1700
  recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
1752
1701
  popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
@@ -1763,25 +1712,125 @@ var DataSearch = {
1763
1712
  "isOpen": this.$data.isOpen
1764
1713
  },
1765
1714
  "scopedSlots": {
1766
- "default": function _default(_ref2) {
1767
- var getInputEvents = _ref2.getInputEvents,
1768
- getInputProps = _ref2.getInputProps,
1769
- getItemProps = _ref2.getItemProps,
1770
- getItemEvents = _ref2.getItemEvents,
1771
- isOpen = _ref2.isOpen,
1772
- highlightedIndex = _ref2.highlightedIndex,
1773
- setHighlightedIndex = _ref2.setHighlightedIndex;
1715
+ "default": function _default(_ref3) {
1716
+ var getInputEvents = _ref3.getInputEvents,
1717
+ getInputProps = _ref3.getInputProps,
1718
+ getItemProps = _ref3.getItemProps,
1719
+ getItemEvents = _ref3.getItemEvents,
1720
+ isOpen = _ref3.isOpen,
1721
+ highlightedIndex = _ref3.highlightedIndex,
1722
+ setHighlightedIndex = _ref3.setHighlightedIndex;
1723
+
1724
+ var renderSuggestionsContainer = function renderSuggestionsContainer() {
1725
+ return h("div", [_this3.hasCustomRenderer && _this3.getComponent({
1726
+ isOpen: isOpen,
1727
+ getItemProps: getItemProps,
1728
+ getItemEvents: getItemEvents,
1729
+ highlightedIndex: highlightedIndex
1730
+ }), _this3.renderErrorComponent(), !_this3.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
1731
+ "class": suggestions(_this3.themePreset, theme) + " " + getClassName$1(_this3.$props.innerClass, 'list')
1732
+ }, [_this3.suggestionsList.slice(0, size || 10).map(function (item, index) {
1733
+ return h("li", {
1734
+ "domProps": _extends({}, getItemProps({
1735
+ item: item
1736
+ })),
1737
+ "on": _extends({}, getItemEvents({
1738
+ item: item
1739
+ })),
1740
+ "key": index + 1 + "-" + item.value,
1741
+ "style": {
1742
+ backgroundColor: _this3.getBackgroundColor(highlightedIndex, index)
1743
+ }
1744
+ }, [h(SuggestionItem, {
1745
+ "attrs": {
1746
+ "currentValue": _this3.currentValue,
1747
+ "suggestion": item
1748
+ }
1749
+ })]);
1750
+ }), _this3.defaultSearchSuggestions.map(function (sugg, index) {
1751
+ return h("li", {
1752
+ "domProps": _extends({}, getItemProps({
1753
+ item: sugg
1754
+ })),
1755
+ "on": _extends({}, getItemEvents({
1756
+ item: sugg
1757
+ })),
1758
+ "key": _this3.suggestionsList.length + index + 1 + "-" + sugg.value,
1759
+ "style": {
1760
+ backgroundColor: _this3.getBackgroundColor(highlightedIndex, _this3.suggestionsList.length + index),
1761
+ justifyContent: 'flex-start'
1762
+ }
1763
+ }, [h("div", {
1764
+ "style": {
1765
+ padding: '0 10px 0 0'
1766
+ }
1767
+ }, [sugg.source && sugg.source._recent_search && h(CustomSvg, {
1768
+ "attrs": {
1769
+ "className": getClassName$1(_this3.$props.innerClass, 'recent-search-icon') || null,
1770
+ "icon": recentSearchesIcon,
1771
+ "type": "recent-search-icon"
1772
+ }
1773
+ }), sugg.source && sugg.source._popular_suggestion && h(CustomSvg, {
1774
+ "attrs": {
1775
+ "className": getClassName$1(_this3.$props.innerClass, 'popular-search-icon') || null,
1776
+ "icon": popularSearchesIcon,
1777
+ "type": "popular-search-icon"
1778
+ }
1779
+ })]), h(SuggestionItem, {
1780
+ "attrs": {
1781
+ "currentValue": _this3.currentValue,
1782
+ "suggestion": sugg
1783
+ }
1784
+ })]);
1785
+ }), hasQuerySuggestionsRenderer(_this3) ? _this3.getComponent({
1786
+ isOpen: isOpen,
1787
+ getItemProps: getItemProps,
1788
+ getItemEvents: getItemEvents,
1789
+ highlightedIndex: highlightedIndex
1790
+ }, true) : _this3.topSuggestions.map(function (sugg, index) {
1791
+ return h("li", {
1792
+ "domProps": _extends({}, getItemProps({
1793
+ item: sugg
1794
+ })),
1795
+ "on": _extends({}, getItemEvents({
1796
+ item: sugg
1797
+ })),
1798
+ "key": _this3.suggestionsList.length + index + 1 + "-" + sugg.value,
1799
+ "style": {
1800
+ backgroundColor: _this3.getBackgroundColor(highlightedIndex, _this3.suggestionsList.length + index),
1801
+ justifyContent: 'flex-start'
1802
+ }
1803
+ }, [h("div", {
1804
+ "style": {
1805
+ padding: '0 10px 0 0'
1806
+ }
1807
+ }, [h(CustomSvg, {
1808
+ "attrs": {
1809
+ "className": getClassName$1(_this3.$props.innerClass, 'popular-search-icon') || null,
1810
+ "icon": popularSearchesIcon,
1811
+ "type": "popular-search-icon"
1812
+ }
1813
+ })]), h(SuggestionItem, {
1814
+ "attrs": {
1815
+ "currentValue": _this3.currentValue,
1816
+ "suggestion": sugg
1817
+ }
1818
+ })]);
1819
+ })]) : _this3.renderNoSuggestions(_this3.suggestionsList)]);
1820
+ };
1821
+
1774
1822
  return h("div", {
1775
1823
  "class": suggestionsContainer
1776
- }, [h(Input, {
1824
+ }, [h(InputGroup, [_this3.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
1777
1825
  "attrs": {
1778
1826
  "id": _this3.$props.componentId + "-input",
1779
1827
  "showIcon": _this3.$props.showIcon,
1780
1828
  "showClear": _this3.$props.showClear,
1781
1829
  "iconPosition": _this3.$props.iconPosition,
1782
1830
  "placeholder": _this3.$props.placeholder,
1831
+ "autoFocus": _this3.$props.autoFocus,
1783
1832
  "themePreset": _this3.themePreset,
1784
- "autocomplete": 'off'
1833
+ "autocomplete": "off"
1785
1834
  },
1786
1835
  "ref": _this3.$props.innerRef,
1787
1836
  "class": getClassName$1(_this3.$props.innerClass, 'input'),
@@ -1811,113 +1860,18 @@ var DataSearch = {
1811
1860
  "domProps": _extends({}, getInputProps({
1812
1861
  value: _this3.$data.currentValue === null ? '' : _this3.$data.currentValue
1813
1862
  }))
1814
- }), _this3.renderIcons(), _this3.hasCustomRenderer && _this3.getComponent({
1815
- isOpen: isOpen,
1816
- getItemProps: getItemProps,
1817
- getItemEvents: getItemEvents,
1818
- highlightedIndex: highlightedIndex
1819
- }), _this3.renderErrorComponent(), !_this3.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
1820
- "class": suggestions(_this3.themePreset, theme) + " " + getClassName$1(_this3.$props.innerClass, 'list')
1821
- }, [_this3.suggestionsList.slice(0, size).map(function (item, index) {
1822
- return h("li", {
1823
- "domProps": _extends({}, getItemProps({
1824
- item: item
1825
- })),
1826
- "on": _extends({}, getItemEvents({
1827
- item: item
1828
- })),
1829
- "key": index + 1 + "-" + item.value,
1830
- "style": {
1831
- backgroundColor: _this3.getBackgroundColor(highlightedIndex, index)
1832
- }
1833
- }, [h(SuggestionItem, {
1834
- "attrs": {
1835
- "currentValue": _this3.currentValue,
1836
- "suggestion": item
1837
- }
1838
- })]);
1839
- }), _this3.defaultSearchSuggestions.map(function (sugg, index) {
1840
- return h("li", {
1841
- "domProps": _extends({}, getItemProps({
1842
- item: sugg
1843
- })),
1844
- "on": _extends({}, getItemEvents({
1845
- item: sugg
1846
- })),
1847
- "key": _this3.suggestionsList.length + index + 1 + "-" + sugg.value,
1848
- "style": {
1849
- backgroundColor: _this3.getBackgroundColor(highlightedIndex, _this3.suggestionsList.length + index),
1850
- justifyContent: 'flex-start'
1851
- }
1852
- }, [h("div", {
1853
- "style": {
1854
- padding: '0 10px 0 0'
1855
- }
1856
- }, [sugg.source && sugg.source._recent_search && h(CustomSvg, {
1857
- "attrs": {
1858
- "className": getClassName$1(_this3.$props.innerClass, 'recent-search-icon') || null,
1859
- "icon": recentSearchesIcon,
1860
- "type": "recent-search-icon"
1861
- }
1862
- }), sugg.source && sugg.source._popular_suggestion && h(CustomSvg, {
1863
- "attrs": {
1864
- "className": getClassName$1(_this3.$props.innerClass, 'popular-search-icon') || null,
1865
- "icon": popularSearchesIcon,
1866
- "type": "popular-search-icon"
1867
- }
1868
- })]), h(SuggestionItem, {
1869
- "attrs": {
1870
- "currentValue": _this3.currentValue,
1871
- "suggestion": sugg
1872
- }
1873
- })]);
1874
- }), hasQuerySuggestionsRenderer(_this3) ? _this3.getComponent({
1875
- isOpen: isOpen,
1876
- getItemProps: getItemProps,
1877
- getItemEvents: getItemEvents,
1878
- highlightedIndex: highlightedIndex
1879
- }, true) : _this3.topSuggestions.map(function (sugg, index) {
1880
- return h("li", {
1881
- "domProps": _extends({}, getItemProps({
1882
- item: sugg
1883
- })),
1884
- "on": _extends({}, getItemEvents({
1885
- item: sugg
1886
- })),
1887
- "key": _this3.suggestionsList.length + index + 1 + "-" + sugg.value,
1888
- "style": {
1889
- backgroundColor: _this3.getBackgroundColor(highlightedIndex, _this3.suggestionsList.length + index),
1890
- justifyContent: 'flex-start'
1891
- }
1892
- }, [h("div", {
1893
- "style": {
1894
- padding: '0 10px 0 0'
1895
- }
1896
- }, [h(CustomSvg, {
1897
- "attrs": {
1898
- "className": getClassName$1(_this3.$props.innerClass, 'popular-search-icon') || null,
1899
- "icon": popularSearchesIcon,
1900
- "type": "popular-search-icon"
1901
- }
1902
- })]), h(SuggestionItem, {
1903
- "attrs": {
1904
- "currentValue": _this3.currentValue,
1905
- "suggestion": sugg
1906
- }
1907
- })]);
1908
- })]) : _this3.renderNoSuggestions(_this3.suggestionsList), ' ']);
1863
+ }), _this3.renderIcons(), !expandSuggestionsContainer && renderSuggestionsContainer()]), ' ', _this3.renderInputAddonAfter()]), expandSuggestionsContainer && renderSuggestionsContainer()]);
1909
1864
  }
1910
1865
  }
1911
1866
  }) : h("div", {
1912
1867
  "class": suggestionsContainer
1913
- }, [h(Input, {
1868
+ }, [h(InputGroup, [this.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
1914
1869
  "class": getClassName$1(this.$props.innerClass, 'input') || '',
1915
1870
  "attrs": {
1916
1871
  "placeholder": this.$props.placeholder,
1917
1872
  "iconPosition": this.$props.iconPosition,
1918
1873
  "showIcon": this.$props.showIcon,
1919
1874
  "showClear": this.$props.showClear,
1920
- "innerRef": this.$props.innerRef,
1921
1875
  "themePreset": this.themePreset
1922
1876
  },
1923
1877
  "on": _extends({}, {
@@ -1947,22 +1901,20 @@ var DataSearch = {
1947
1901
  "domProps": _extends({}, {
1948
1902
  autofocus: this.$props.autoFocus,
1949
1903
  value: this.$data.currentValue ? this.$data.currentValue : ''
1950
- })
1951
- }), this.renderIcons()])]);
1904
+ }),
1905
+ "ref": this.$props.innerRef
1906
+ }), this.renderIcons()]), this.renderInputAddonAfter()])])]);
1907
+ },
1908
+ destroyed: function destroyed() {
1909
+ document.removeEventListener('keydown', this.onKeyDown);
1952
1910
  }
1953
1911
  };
1954
1912
 
1955
1913
  DataSearch.defaultQuery = function (value, props) {
1956
1914
  var finalQuery = null;
1957
- var fields = [];
1958
1915
 
1959
1916
  if (value) {
1960
- if (Array.isArray(props.dataField)) {
1961
- fields = props.dataField;
1962
- } else if (props.dataField) {
1963
- fields = [props.dataField];
1964
- }
1965
-
1917
+ var fields = normalizeDataField(props.dataField, props.fieldWeights);
1966
1918
  finalQuery = {
1967
1919
  bool: {
1968
1920
  should: DataSearch.shouldQuery(value, fields, props),
@@ -1992,10 +1944,10 @@ DataSearch.defaultQuery = function (value, props) {
1992
1944
  DataSearch.shouldQuery = function (value, dataFields, props) {
1993
1945
  var finalQuery = [];
1994
1946
  var phrasePrefixFields = [];
1995
- var fields = (dataFields || []).map(function (field, index) {
1996
- var queryField = "" + field + (Array.isArray(props.fieldWeights) && props.fieldWeights[index] ? "^" + props.fieldWeights[index] : '');
1947
+ var fields = dataFields.map(function (dataField) {
1948
+ var queryField = "" + dataField.field + (dataField.weight ? "^" + dataField.weight : '');
1997
1949
 
1998
- if (!(field.endsWith('.keyword') || field.endsWith('.autosuggest') || field.endsWith('.search'))) {
1950
+ if (!(dataField.field.endsWith('.keyword') || dataField.field.endsWith('.autosuggest') || dataField.field.endsWith('.search'))) {
1999
1951
  phrasePrefixFields.push(queryField);
2000
1952
  }
2001
1953
 
@@ -2105,6 +2057,10 @@ DataSearch.highlightQuery = function (props) {
2105
2057
  };
2106
2058
  };
2107
2059
 
2060
+ DataSearch.hasInternalComponent = function () {
2061
+ return true;
2062
+ };
2063
+
2108
2064
  var mapStateToProps = function mapStateToProps(state, props) {
2109
2065
  return {
2110
2066
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
@@ -2115,7 +2071,7 @@ var mapStateToProps = function mapStateToProps(state, props) {
2115
2071
  themePreset: state.config.themePreset,
2116
2072
  error: state.error[props.componentId],
2117
2073
  analytics: state.analytics,
2118
- config: state.config,
2074
+ enableAppbase: state.config.enableAppbase,
2119
2075
  headers: state.appbaseRef.headers,
2120
2076
  promotedResults: state.promotedResults[props.componentId] || [],
2121
2077
  customData: state.customData[props.componentId],
@@ -2142,7 +2098,7 @@ var mapDispatchToProps = {
2142
2098
  };
2143
2099
  var DSConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchToProps)(DataSearch), {
2144
2100
  componentType: componentTypes.dataSearch,
2145
- internalComponent: true
2101
+ internalComponent: DataSearch.hasInternalComponent()
2146
2102
  });
2147
2103
 
2148
2104
  DataSearch.install = function (Vue) {