@appbaseio/reactivesearch-vue 1.16.0-alpha.3 → 1.16.0-alpha.30

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 +7438 -6512
  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-ab813390.js} +40 -21
  9. package/dist/cjs/{Container-f84e72fc.js → Container-8a08d663.js} +3 -11
  10. package/dist/cjs/DataSearch.js +341 -391
  11. package/dist/cjs/{DropDown-c66be1a8.js → DropDown-0359da33.js} +76 -96
  12. package/dist/cjs/DynamicRangeSlider.js +47 -24
  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 +69 -45
  18. package/dist/cjs/MultiList.js +36 -21
  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 +25 -45
  22. package/dist/cjs/RangeSlider.js +31 -28
  23. package/dist/cjs/ReactiveBase.js +55 -34
  24. package/dist/cjs/ReactiveComponent.js +80 -36
  25. package/dist/cjs/ReactiveGoogleMap.js +320 -234
  26. package/dist/cjs/ReactiveList.js +149 -202
  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 +69 -45
  31. package/dist/cjs/SingleList.js +44 -26
  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-2a8358cd.js} +77 -9
  38. package/dist/cjs/index.js +23 -19
  39. package/dist/cjs/initReactivesearch.js +80 -38
  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-459505fd.js} +40 -21
  49. package/dist/es/Container-4383c6f0.js +10 -0
  50. package/dist/es/DataSearch.js +339 -389
  51. package/dist/es/{DropDown-5dbd69c2.js → DropDown-168b60f6.js} +75 -95
  52. package/dist/es/DynamicRangeSlider.js +47 -24
  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 +69 -45
  58. package/dist/es/MultiList.js +36 -21
  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 +25 -45
  62. package/dist/es/RangeSlider.js +31 -28
  63. package/dist/es/ReactiveBase.js +55 -34
  64. package/dist/es/ReactiveComponent.js +80 -36
  65. package/dist/es/ReactiveGoogleMap.js +320 -234
  66. package/dist/es/ReactiveList.js +149 -202
  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 +69 -45
  71. package/dist/es/SingleList.js +44 -26
  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-4755c9a0.js} +74 -10
  78. package/dist/es/index.js +23 -19
  79. package/dist/es/initReactivesearch.js +80 -38
  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 +86 -78
  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,91 +1,36 @@
1
1
  import { helper } 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 { css } from 'emotion';
5
5
  import styled from '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-98d938a9.js';
7
- import { a as isFunction } from './index-1fe91a0a.js';
8
- import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-dfd9dd40.js';
9
- import { D as Downshift } from './DownShift-d8f2500f.js';
6
+ import { t as types } from './vueTypes-9326e0be.js';
7
+ import { a as isFunction } from './index-4755c9a0.js';
8
+ import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-4d9e0857.js';
9
+ import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-d8519224.js';
10
+ import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
10
11
 
11
- function _templateObject4() {
12
- var data = _taggedTemplateLiteralLoose(["\n\twidth: 16px;\n\theight: 16px;\n\tdisplay: inline-block;\n\tposition: relative;\n\tuser-select: none;\n\talign-items: center;\n\n\t&::after {\n\t\tbox-sizing: content-box;\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tbackground-color: transparent;\n\t\ttop: 50%;\n\t\tleft: 0;\n\t\twidth: 8px;\n\t\theight: 4px;\n\t\tmargin-top: -4px;\n\t\tborder-style: solid;\n\t\tborder-color: ", ";\n\t\tborder-width: 0 0 2px 2px;\n\t\tborder-radius: 0;\n\t\tborder-image: none;\n\t\ttransform: rotate(-45deg) scale(1);\n\t\ttransition: all 200ms ease-out;\n\t}\n"]);
13
-
14
- _templateObject4 = function _templateObject4() {
15
- return data;
16
- };
17
-
18
- return data;
19
- }
20
-
21
- function _templateObject3() {
22
- var data = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tmin-height: 42px;\n\tborder-radius: 0;\n\toutline: none;\n\tpadding: 5px 12px;\n\tfont-size: 0.9rem;\n\tline-height: 1.2rem;\n\tbackground-color: #fff;\n\tborder: 1px solid #ccc;\n\tcolor: #424242;\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t", ";\n\n\t& > div {\n\t\twidth: calc(100% - 24px);\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\ttext-align: left;\n\t}\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: #fcfcfc;\n\t}\n\n\t", ";\n"]);
23
-
24
- _templateObject3 = function _templateObject3() {
25
- return data;
26
- };
27
-
28
- return data;
29
- }
30
-
31
- function _templateObject2() {
32
- var data = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tborder-color: ", ";\n\tcolor: ", ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"]);
33
-
34
- _templateObject2 = function _templateObject2() {
35
- return data;
36
- };
37
-
38
- return data;
39
- }
40
-
41
- function _templateObject() {
42
- var data = _taggedTemplateLiteralLoose(["\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n"]);
43
-
44
- _templateObject = function _templateObject() {
45
- return data;
46
- };
47
-
48
- return data;
49
- }
50
- var small = css(_templateObject());
12
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
13
+ var small = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n"])));
51
14
 
52
15
  var dark = function dark(_ref) {
53
16
  var theme = _ref.theme;
54
- return css(_templateObject2(), theme.colors.backgroundColor, theme.colors.borderColor, theme.colors.textColor, theme.colors.backgroundColor);
17
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tborder-color: ", ";\n\tcolor: ", ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor, theme.colors.borderColor, theme.colors.textColor, theme.colors.backgroundColor);
55
18
  };
56
19
 
57
- var Select = styled('button')(_templateObject3(), function (props) {
20
+ var Select = styled('button')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tmin-height: 42px;\n\tborder-radius: 0;\n\toutline: none;\n\tpadding: 5px 12px;\n\tfont-size: 0.9rem;\n\tline-height: 1.2rem;\n\tbackground-color: #fff;\n\tborder: 1px solid #ccc;\n\tcolor: #424242;\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t", ";\n\n\t& > div {\n\t\twidth: calc(100% - 24px);\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\ttext-align: left;\n\t}\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: #fcfcfc;\n\t}\n\n\t", ";\n"])), function (props) {
58
21
  return props.small ? small : null;
59
22
  }, function (_ref2) {
60
23
  var themePreset = _ref2.themePreset;
61
24
  return themePreset === 'dark' && dark;
62
25
  });
63
- var Tick = styled('span')(_templateObject4(), function (_ref3) {
26
+ var Tick = styled('span')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\twidth: 16px;\n\theight: 16px;\n\tdisplay: inline-block;\n\tposition: relative;\n\tuser-select: none;\n\talign-items: center;\n\n\t&::after {\n\t\tbox-sizing: content-box;\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tbackground-color: transparent;\n\t\ttop: 50%;\n\t\tleft: 0;\n\t\twidth: 8px;\n\t\theight: 4px;\n\t\tmargin-top: -4px;\n\t\tborder-style: solid;\n\t\tborder-color: ", ";\n\t\tborder-width: 0 0 2px 2px;\n\t\tborder-radius: 0;\n\t\tborder-image: none;\n\t\ttransform: rotate(-45deg) scale(1);\n\t\ttransition: all 200ms ease-out;\n\t}\n"])), function (_ref3) {
64
27
  var theme = _ref3.theme;
65
28
  return theme.colors.primaryColor;
66
29
  });
67
30
 
68
- function _templateObject2$1() {
69
- var data = _taggedTemplateLiteralLoose(["\n\t&::before {\n\t\tcontent: '';\n\t\tborder-style: solid;\n\t\tborder-width: 0.15em 0.15em 0 0;\n\t\tdisplay: inline-block;\n\t\theight: 0.45em;\n\t\tposition: relative;\n\t\ttop: 0.35em;\n\t\tleft: 0;\n\t\ttransform: rotate(135deg);\n\t\tvertical-align: top;\n\t\twidth: 0.45em;\n\n\t\t", ";\n\t}\n"]);
70
-
71
- _templateObject2$1 = function _templateObject2() {
72
- return data;
73
- };
74
-
75
- return data;
76
- }
77
-
78
- function _templateObject$1() {
79
- var data = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"]);
80
-
81
- _templateObject$1 = function _templateObject() {
82
- return data;
83
- };
84
-
85
- return data;
86
- }
87
- var open = css(_templateObject$1());
88
- var Chevron = styled('span')(_templateObject2$1(), function (props) {
31
+ var _templateObject$1, _templateObject2$1;
32
+ var open = css(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
33
+ var Chevron = styled('span')(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["\n\t&::before {\n\t\tcontent: '';\n\t\tborder-style: solid;\n\t\tborder-width: 0.15em 0.15em 0 0;\n\t\tdisplay: inline-block;\n\t\theight: 0.45em;\n\t\tposition: relative;\n\t\ttop: 0.35em;\n\t\tleft: 0;\n\t\ttransform: rotate(135deg);\n\t\tvertical-align: top;\n\t\twidth: 0.45em;\n\n\t\t", ";\n\t}\n"])), function (props) {
89
34
  return props.open ? open : null;
90
35
  });
91
36
 
@@ -108,23 +53,25 @@ var Dropdown = {
108
53
  items: types.data,
109
54
  keyField: VueTypes.string.def('key'),
110
55
  labelField: VueTypes.string.def('label'),
111
- multi: types.bool,
56
+ multi: VueTypes.bool,
112
57
  // change event
113
58
  placeholder: types.string,
114
- returnsObject: types.bool,
59
+ returnsObject: VueTypes.bool,
115
60
  customLabelRenderer: types.func,
116
- hasCustomRenderer: types.bool,
61
+ hasCustomRenderer: VueTypes.bool,
117
62
  customRenderer: types.func,
118
63
  renderItem: types.func,
119
64
  renderNoResults: VueTypes.any,
120
65
  handleChange: types.func,
121
66
  transformData: types.func,
122
67
  selectedItem: types.selectedValue,
123
- showCount: types.bool,
124
- single: types.bool,
68
+ showCount: VueTypes.bool,
69
+ single: VueTypes.bool,
125
70
  small: VueTypes.bool.def(false),
126
71
  themePreset: types.themePreset,
127
- showSearch: types.bool
72
+ showSearch: VueTypes.bool,
73
+ showClear: VueTypes.bool,
74
+ searchPlaceholder: VueTypes.string.def('Type here to search...')
128
75
  },
129
76
  render: function render() {
130
77
  var _this = this;
@@ -152,7 +99,7 @@ var Dropdown = {
152
99
  var filteredItemsToRender = itemsToRender.filter(function (item) {
153
100
  if (String(item[labelField]).length) {
154
101
  if (_this.$props.showSearch && _this.$data.searchTerm) {
155
- return String(item[labelField]).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
102
+ return replaceDiacritics(String(item[labelField])).toLowerCase().includes(replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
156
103
  }
157
104
 
158
105
  return true;
@@ -198,26 +145,10 @@ var Dropdown = {
198
145
  getItemEvents: getItemEvents
199
146
  }) : isOpen && itemsToRender.length ? h("ul", {
200
147
  "class": suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
201
- }, [_this.$props.showSearch ? h(Input, {
202
- "attrs": {
203
- "id": _this.$props.componentId + "-input",
204
- "showIcon": false,
205
- "placeholder": "Type here to search...",
206
- "value": _this.$data.searchTerm,
207
- "themePreset": themePreset
208
- },
209
- "style": {
210
- border: 0,
211
- borderBottom: '1px solid #ddd'
212
- },
213
- "class": getClassName(_this.$props.innerClass, 'input'),
214
- "on": {
215
- "change": _this.handleInputChange
216
- }
217
- }) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
148
+ }, [_this.$props.showSearch ? _this.renderSearchbox() : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
218
149
  var selected = _this.$props.multi // MultiDropdownList
219
- && (selectedItem && !!selectedItem[item[keyField]] || // MultiDropdownRange
220
- Array.isArray(selectedItem) && selectedItem.find(function (value) {
150
+ && (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
151
+ || Array.isArray(selectedItem) && selectedItem.find(function (value) {
221
152
  return value[labelField] === item[labelField];
222
153
  }));
223
154
  if (!_this.$props.multi) selected = item.key === selectedItem;
@@ -267,6 +198,7 @@ var Dropdown = {
267
198
 
268
199
  if (!this.$props.multi) {
269
200
  this.isOpen = false;
201
+ this.searchTerm = '';
270
202
  }
271
203
  },
272
204
  handleStateChange: function handleStateChange(_ref2) {
@@ -290,6 +222,9 @@ var Dropdown = {
290
222
  var value = e.target.value;
291
223
  this.searchTerm = value;
292
224
  },
225
+ clearSearchTerm: function clearSearchTerm() {
226
+ this.searchTerm = '';
227
+ },
293
228
  renderToString: function renderToString(value) {
294
229
  var _this2 = this;
295
230
 
@@ -330,6 +265,51 @@ var Dropdown = {
330
265
  return h("p", {
331
266
  "class": getClassName(this.$props.innerClass, 'noResults') || null
332
267
  }, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
268
+ },
269
+ renderSearchbox: function renderSearchbox() {
270
+ var h = this.$createElement;
271
+ var _this$$props2 = this.$props,
272
+ componentId = _this$$props2.componentId,
273
+ searchPlaceholder = _this$$props2.searchPlaceholder,
274
+ showClear = _this$$props2.showClear,
275
+ themePreset = _this$$props2.themePreset,
276
+ innerClass = _this$$props2.innerClass;
277
+ var InputComponent = h(Input, {
278
+ "attrs": {
279
+ "id": componentId + "-input",
280
+ "showIcon": false,
281
+ "showClear": showClear,
282
+ "placeholder": searchPlaceholder,
283
+ "value": this.$data.searchTerm,
284
+ "themePreset": themePreset
285
+ },
286
+ "style": {
287
+ border: 0,
288
+ borderBottom: '1px solid #ddd'
289
+ },
290
+ "class": getClassName(innerClass, 'input'),
291
+ "on": {
292
+ "change": this.handleInputChange
293
+ }
294
+ });
295
+
296
+ if (showClear) {
297
+ return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
298
+ "attrs": {
299
+ "groupPosition": "right",
300
+ "positionType": "absolute"
301
+ }
302
+ }, [h(IconWrapper, {
303
+ "on": {
304
+ "click": this.clearSearchTerm
305
+ },
306
+ "attrs": {
307
+ "isClearIcon": true
308
+ }
309
+ }, [h(CancelSvg)])])]);
310
+ }
311
+
312
+ return InputComponent;
333
313
  }
334
314
  }
335
315
  };
@@ -1,15 +1,15 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-c9fbe19f.js';
2
+ import { 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
5
  import '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-98d938a9.js';
6
+ import { t as types } from './vueTypes-9326e0be.js';
7
7
  import 'redux';
8
- import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-1fe91a0a.js';
9
- import { T as Title } from './Title-22c2f3bf.js';
10
- import { C as Container } from './Container-f5efec9e.js';
8
+ import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
9
+ import { T as Title } from './Title-579f8d6c.js';
10
+ import { C as Container } from './Container-4383c6f0.js';
11
11
  import NoSSR from 'vue-no-ssr';
12
- import { g as getComponents, S as Slider } from './ssr-2f57791d.js';
12
+ import { g as getComponents, S as Slider } from './ssr-e3196de1.js';
13
13
 
14
14
  var addComponent = Actions.addComponent,
15
15
  removeComponent = Actions.removeComponent,
@@ -41,11 +41,13 @@ var DynamicRangeSlider = {
41
41
  innerClass: types.style,
42
42
  react: types.react,
43
43
  showFilter: VueTypes.bool.def(true),
44
+ destroyOnUnmount: VueTypes.bool,
44
45
  showCheckbox: VueTypes.bool.def(true),
45
46
  title: types.title,
46
47
  URLParams: VueTypes.bool.def(false),
47
48
  sliderOptions: VueTypes.object.def({}),
48
- nestedField: types.string
49
+ nestedField: types.string,
50
+ index: VueTypes.string
49
51
  },
50
52
  data: function data() {
51
53
  this.internalRangeComponent = this.$props.componentId + "__range__internal";
@@ -70,7 +72,12 @@ var DynamicRangeSlider = {
70
72
  this.setQueryListener(this.$props.componentId, onQueryChange, null); // Update props in store
71
73
 
72
74
  this.setComponentProps(this.componentId, this.$props, componentTypes.dynamicRangeSlider);
73
- this.setComponentProps(this.internalRangeComponent, this.$props, componentTypes.dynamicRangeSlider); // Set custom query in store
75
+ this.setComponentProps(this.internalRangeComponent, this.$props, componentTypes.dynamicRangeSlider);
76
+
77
+ if (!this.enableAppbase && this.$props.index) {
78
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
79
+ } // Set custom query in store
80
+
74
81
 
75
82
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
76
83
  },
@@ -78,17 +85,27 @@ var DynamicRangeSlider = {
78
85
  this.setReact();
79
86
  },
80
87
  beforeMount: function beforeMount() {
81
- this.addComponent(this.$props.componentId);
82
- this.addComponent(this.internalRangeComponent);
88
+ var components = [];
89
+
90
+ if (this.$$store) {
91
+ var _this$$$store$getStat = this.$$store.getState();
92
+
93
+ components = _this$$$store$getStat.components;
94
+ }
95
+
96
+ if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
97
+ this.addComponent(this.componentId);
98
+ this.addComponent(this.internalRangeComponent);
83
99
 
84
- if (Array.isArray(this.selectedValue)) {
85
- this.handleChange(this.selectedValue);
86
- } else if (this.selectedValue) {
87
- this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
88
- } // get range before executing other queries
100
+ if (Array.isArray(this.selectedValue)) {
101
+ this.handleChange(this.selectedValue);
102
+ } else if (this.selectedValue) {
103
+ this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
104
+ } // get range before executing other queries
89
105
 
90
106
 
91
- this.updateRangeQueryOptions();
107
+ this.updateRangeQueryOptions();
108
+ }
92
109
  },
93
110
  beforeUpdate: function beforeUpdate() {
94
111
  if (!this.currentValue) {
@@ -96,8 +113,10 @@ var DynamicRangeSlider = {
96
113
  }
97
114
  },
98
115
  beforeDestroy: function beforeDestroy() {
99
- this.removeComponent(this.$props.componentId);
100
- this.removeComponent(this.internalRangeComponent);
116
+ if (this.destroyOnUnmount) {
117
+ this.removeComponent(this.$props.componentId);
118
+ this.removeComponent(this.internalRangeComponent);
119
+ }
101
120
  },
102
121
  methods: {
103
122
  setDefaultValue: function setDefaultValue(_ref) {
@@ -157,8 +176,9 @@ var DynamicRangeSlider = {
157
176
  aggs: aggs
158
177
  });
159
178
  },
160
- handleSlider: function handleSlider(values) {
161
- this.handleChange(values.currentValue);
179
+ handleSlider: function handleSlider() {
180
+ var sliderValues = this.$refs.slider.getValue();
181
+ this.handleChange(sliderValues);
162
182
  },
163
183
  handleChange: function handleChange(currentValue) {
164
184
  var _this2 = this;
@@ -210,7 +230,7 @@ var DynamicRangeSlider = {
210
230
  currentEnd = value[1]; // check if the slider is at its initial position
211
231
 
212
232
  var isInitialValue = currentStart === start && currentEnd === end;
213
- this.setQueryOptions(this.$props.componentId, customQueryOptions);
233
+ this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
214
234
  this.updateQuery({
215
235
  componentId: this.$props.componentId,
216
236
  query: query,
@@ -277,7 +297,7 @@ var DynamicRangeSlider = {
277
297
  render: function render() {
278
298
  var h = arguments[0];
279
299
 
280
- if (!this.range) {
300
+ if (!this.range || !this.currentValue) {
281
301
  return null;
282
302
  }
283
303
 
@@ -291,13 +311,15 @@ var DynamicRangeSlider = {
291
311
  }, [this.$props.title]), h(NoSSR, [h(Slider, {
292
312
  "class": getClassName(this.$props.innerClass, 'slider')
293
313
  }, [h("vue-slider-component", {
314
+ "ref": "slider",
294
315
  "attrs": {
295
316
  "value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
296
317
  "min": Math.min(start, this.currentValue[0]),
297
318
  "max": Math.max(end, this.currentValue[1]),
298
319
  "dotSize": 20,
299
320
  "height": 4,
300
- "enable-cross": false
321
+ "enable-cross": false,
322
+ "tooltip": "always"
301
323
  },
302
324
  "on": {
303
325
  "drag-end": this.handleSlider
@@ -370,7 +392,8 @@ var mapStateToProps = function mapStateToProps(state, props) {
370
392
  options: options,
371
393
  range: range,
372
394
  selectedValue: state.selectedValues[props.componentId] ? state.selectedValues[props.componentId].value : null,
373
- componentProps: state.props[props.componentId]
395
+ componentProps: state.props[props.componentId],
396
+ enableAppbase: state.config.enableAppbase
374
397
  };
375
398
  };
376
399
 
@@ -0,0 +1,47 @@
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
+ import { css } from 'emotion';
3
+ import styled from '@appbaseio/vue-emotion';
4
+ import { lighten } from 'polished';
5
+
6
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
7
+ var leftLabel = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tflex-direction: row;\n\talign-items: center;\n"])));
8
+ var rightLabel = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\tflex-direction: row-reverse;\n\talign-items: center;\n"])));
9
+ var topLabel = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\tflex-direction: column;\n"])));
10
+ var bottomLabel = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\tflex-direction: column-reverse;\n"])));
11
+
12
+ var border = function border(_ref) {
13
+ var colors = _ref.theme.colors;
14
+ return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n\tborder: 1px solid ", ";\n"])), colors.borderColor || '#ccc');
15
+ };
16
+
17
+ var Flex = styled('div')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\tdisplay: ", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\n\tsvg.cancel-icon {\n\t\tcursor: pointer;\n\t\tfill: ", ";\n\t\tflex-basis: 30px;\n\n\t\t&:hover {\n\t\t\tfill: ", ";\n\t\t}\n\t}\n"])), function (props) {
18
+ return props.inline ? 'inline-flex' : 'flex';
19
+ }, function (props) {
20
+ return (props.labelPosition === 'left' || props.iconPosition === 'right') && leftLabel;
21
+ }, function (props) {
22
+ return (props.labelPosition === 'right' || props.iconPosition === 'left') && rightLabel;
23
+ }, function (props) {
24
+ return props.labelPosition === 'top' && topLabel;
25
+ }, function (props) {
26
+ return props.labelPosition === 'bottom' && bottomLabel;
27
+ }, function (props) {
28
+ return props.showBorder && border;
29
+ }, function (props) {
30
+ return props.justifyContent && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\t\t\tjustify-content: ", ";\n\t\t"])), props.justifyContent);
31
+ }, function (props) {
32
+ return props.alignItems && css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\t\t\talign-items: ", ";\n\t\t"])), props.alignItems);
33
+ }, function (props) {
34
+ return props.flex && css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n\t\t\tflex: ", ";\n\t\t"])), props.flex);
35
+ }, function (props) {
36
+ return props.direction && css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\t\t\tflex-direction: ", ";\n\t\t"])), props.direction);
37
+ }, function (props) {
38
+ return props.basis && css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n\t\t\tflex-basis: ", ";\n\t\t"])), props.basis);
39
+ }, function (_ref2) {
40
+ var colors = _ref2.theme.colors;
41
+ return colors.borderColor || lighten(0.3, colors.textColor);
42
+ }, function (_ref3) {
43
+ var theme = _ref3.theme;
44
+ return theme.colors.textColor;
45
+ });
46
+
47
+ export { Flex as F };
@@ -0,0 +1,40 @@
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
+ import { css } from 'emotion';
3
+ import styled from '@appbaseio/vue-emotion';
4
+ import { lighten } from 'polished';
5
+
6
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
7
+ var item = {
8
+ width: '15px',
9
+ height: '15px',
10
+ scale: '4px'
11
+ };
12
+ var vh = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tborder: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tposition: absolute;\n\twidth: 1px;\n\twhite-space: nowrap;\n"])));
13
+ var hideInputControl = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\t+ label {\n\t\tpadding-left: 0;\n\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder: 0;\n\t\t\tmargin: 0;\n\t\t\tvisibility: hidden;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n"])));
14
+
15
+ var formItem = function formItem(_ref) {
16
+ var theme = _ref.theme;
17
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\t", ";\n\n\t&:focus {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tbox-shadow: 0 0 0 2px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:hover {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:active {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\ttransition-duration: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t+ label {\n\t\tposition: relative;\n\t\tuser-select: none;\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t&::before {\n\t\t\tbackground-color: #fff;\n\t\t\tborder: 1px solid ", ";\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tcolor: ", ";\n\t\t\tmargin-right: calc(", " * 0.5);\n\t\t\ttop: 50%;\n\t\t\tleft: 0;\n\t\t\twidth: ", ";\n\t\t\theight: ", ";\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&::after {\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tbackground-color: ", ";\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 2);\n\t\t\twidth: calc(", " - ", ");\n\t\t\theight: calc(", " - ", ");\n\t\t\tmargin-top: calc(", " / -2 - ", " / -2);\n\t\t\ttransform: scale(0);\n\t\t\ttransform-origin: 50%;\n\t\t\ttransition: transform 200ms ease-out;\n\t\t}\n\t}\n"])), vh, lighten(0.4, theme.colors.primaryColor), theme.colors.primaryColor, theme.colors.borderColor || lighten(0.1, theme.colors.textColor), theme.colors.primaryColor, item.width, item.width, item.height, theme.colors.primaryColor, item.scale, item.width, item.scale, item.height, item.scale, item.height, item.scale);
18
+ };
19
+
20
+ var Radio = styled('input')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t+ label {\n\t\t\t\tcolor: ", ";\n\n\t\t\t\t&::before {\n\t\t\t\t\tanimation: none;\n\t\t\t\t\tfilter: none;\n\t\t\t\t\ttransition: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tanimation: none;\n\t\t\t\tbackground-color: #fff;\n\t\t\t\tborder-color: ", ";\n\t\t}\n\n\t\t&::after {\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n"])), formItem, function (props) {
21
+ return props.show ? null : hideInputControl;
22
+ }, function (_ref2) {
23
+ var theme = _ref2.theme;
24
+ return theme.colors.primaryColor;
25
+ }, function (_ref3) {
26
+ var theme = _ref3.theme;
27
+ return theme.colors.primaryColor;
28
+ });
29
+ var Checkbox = styled('input')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 0;\n\t\t}\n\n\t\t&::after {\n\t\t\tbackground-color: transparent;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 5);\n\t\t\twidth: calc(", " / 2);\n\t\t\theight: calc(", " / 5);\n\t\t\tmargin-top: calc(", " / -2 / 2 * 0.8);\n\t\t\tborder-style: solid;\n\t\t\tborder-color: ", ";\n\t\t\tborder-width: 0 0 2px 2px;\n\t\t\tborder-radius: 0;\n\t\t\tborder-image: none;\n\t\t\ttransform: rotate(-45deg) scale(0);\n\t\t\ttransition: none;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\ttransform: rotate(-45deg) scale(1);\n\t\t\t\ttransition: transform 200ms ease-out;\n\t\t\t}\n\t\t}\n\t}\n"])), formItem, function (props) {
30
+ return props.show ? null : hideInputControl;
31
+ }, item.width, item.width, item.width, item.height, function (_ref4) {
32
+ var theme = _ref4.theme;
33
+ return theme.colors.primaryColor;
34
+ }, function (_ref5) {
35
+ var theme = _ref5.theme;
36
+ return theme.colors.primaryColor;
37
+ });
38
+ var UL = styled('ul')(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n\tmax-height: 240px;\n\tposition: relative;\n\toverflow-y: auto;\n\tpadding-bottom: 12px;\n\n\tli {\n\t\theight 30px;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tpadding-left: 2px;\n\t}\n"])));
39
+
40
+ export { Checkbox as C, Radio as R, UL as U };
@@ -0,0 +1,71 @@
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
+ import { css } from 'emotion';
3
+ import styled from '@appbaseio/vue-emotion';
4
+
5
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
6
+
7
+ var alertBorder = function alertBorder(_ref) {
8
+ var theme = _ref.theme;
9
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tborder: 1px solid ", ";\n"])), theme.colors.alertColor);
10
+ };
11
+
12
+ var input = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tline-height: 1.5;\n\tmin-height: 42px;\n\tpadding: 8px 12px;\n\tborder: 1px solid #ccc;\n\tbackground-color: #fafafa;\n\tfont-size: 0.9rem;\n\toutline: none;\n\theight: 100%;\n\n\t&:focus {\n\t\tbackground-color: #fff;\n\t}\n"])));
13
+
14
+ var dark = function dark(theme) {
15
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\tborder-color: ", ";\n"])), theme.colors.borderColor);
16
+ };
17
+
18
+ var darkInput = function darkInput(_ref2) {
19
+ var theme = _ref2.theme;
20
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: ", ";\n\t", ";\n\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor, theme.colors.textColor, dark(theme), theme.colors.backgroundColor);
21
+ };
22
+
23
+ var Input = styled('input')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n"])), input, function (_ref3) {
24
+ var themePreset = _ref3.themePreset,
25
+ theme = _ref3.theme;
26
+ return themePreset === 'dark' && darkInput({
27
+ theme: theme
28
+ });
29
+ }, function (props) {
30
+ return props.showIcon && props.iconPosition === 'left' && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-left: 36px;\n\t\t"])));
31
+ }, function (props) {
32
+ return props.showIcon && props.iconPosition === 'right' && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 36px;\n\t\t"])));
33
+ }, function (props) {
34
+ return (// for clear icon
35
+ props.showClear && css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 36px;\n\t\t"])))
36
+ );
37
+ }, function (props) {
38
+ return (// for voice search icon
39
+ props.showVoiceSearch && css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 36px;\n\t\t"])))
40
+ );
41
+ }, function (props) {
42
+ return (// for clear icon with search icon
43
+ props.showClear && props.showIcon && props.iconPosition === 'right' && css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 66px;\n\t\t"])))
44
+ );
45
+ }, function (props) {
46
+ return (// for voice search icon with search icon
47
+ props.showVoiceSearch && props.showIcon && props.iconPosition === 'right' && css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 66px;\n\t\t"])))
48
+ );
49
+ }, function (props) {
50
+ return (// for voice search icon with clear icon
51
+ props.showVoiceSearch && props.showIcon && css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 66px;\n\t\t"])))
52
+ );
53
+ }, function (props) {
54
+ return (// for clear icon with search icon and voice search
55
+ props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n\t\t\tpadding-right: 90px;\n\t\t"])))
56
+ );
57
+ }, function (props) {
58
+ return props.alert && alertBorder;
59
+ });
60
+
61
+ var suggestions = function suggestions(themePreset, theme) {
62
+ return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 395px;\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark(theme));
63
+ };
64
+
65
+ var suggestionsContainer = css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
66
+
67
+ var noSuggestions = function noSuggestions(themePreset, theme) {
68
+ return css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 260px;\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t", "\n"])), themePreset === 'dark' && theme && dark(theme));
69
+ };
70
+
71
+ export { Input as I, suggestions as a, noSuggestions as n, suggestionsContainer as s };
@@ -0,0 +1,39 @@
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
+ import { css } from 'emotion';
3
+ import styled from '@appbaseio/vue-emotion';
4
+ import { lighten } from 'polished';
5
+ import './Title-579f8d6c.js';
6
+
7
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
8
+ var container = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: 0;\n\tborder-radius: 0.25rem;\n\toverflow: hidden;\n"])));
9
+ var smallImage = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\twidth: 100px;\n\theight: 100px;\n"])));
10
+ var Image = styled('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n\twidth: 160px;\n\theight: 160px;\n\t", ";\n\tmargin: 0;\n\tbackground-size: contain;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tbackground-image: ", ";\n"])), function (props) {
11
+ return props.small ? smallImage : null;
12
+ }, function (props) {
13
+ return "url(" + props.src + ")";
14
+ });
15
+ var ListItem = styled('a')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\theight: auto;\n\toutline: none;\n\ttext-decoration: none;\n\tborder-radius: 0;\n\tbackground-color: ", ";\n\tdisplay: flex;\n\tflex-direction: row;\n\tmargin: 0;\n\tpadding: 10px;\n\tborder-bottom: 1px solid ", ";\n\tcolor: ", ";\n\t", "; all 0.3s ease;\n\n\t&:hover, &:focus {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:last-child {\n\t\tborder: 0;\n\t}\n\n\th2 {\n\t\twidth: 100%;\n\t\tline-height: 1.2rem;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tmargin: 0;\n\t\tpadding: 0 0 8px;\n\t}\n\n\tp {\n\t\tmargin: 0;\n\t}\n\n\tarticle {\n\t\twidth: ", ";\n\t\tpadding-left: ", ";\n\t\tfont-size: 0.9rem;\n\t}\n\n\t&:hover, &:focus {\n\t\tbox-shadow: 0 0 0 0 rgba(0,0,0,0.10);\n\t}\n\n\t@media (max-width: 420px) {\n\t\tmin-width: 0;\n\t\tmargin: 0;\n\t\tborder-radius: 0;\n\t\tbox-shadow: none;\n\t\tborder: 1px solid #eee;\n\n\t\t&:hover, &:focus {\n\t\t\tbox-shadow: 0;\n\t\t}\n\t}\n"])), function (_ref) {
16
+ var theme = _ref.theme;
17
+ return theme.colors.backgroundColor ? lighten(0.1, theme.colors.backgroundColor) : '#fff';
18
+ }, function (_ref2) {
19
+ var theme = _ref2.theme;
20
+ return theme.colors.backgroundColor ? lighten(0.3, theme.colors.backgroundColor) : lighten(0.68, theme.colors.textColor);
21
+ }, function (_ref3) {
22
+ var theme = _ref3.theme;
23
+ return theme.colors.textColor;
24
+ }, function (props) {
25
+ return props.href ? 'cursor: pointer' : null;
26
+ }, function (_ref4) {
27
+ var theme = _ref4.theme;
28
+ return theme.colors.backgroundColor ? lighten(0.2, theme.colors.backgroundColor) : '#fdfefd';
29
+ }, function (props) {
30
+ if (props.image) {
31
+ return props.small ? 'calc(100% - 100px)' : 'calc(100% - 160px)';
32
+ }
33
+
34
+ return '100%';
35
+ }, function (props) {
36
+ return props.image ? '10px' : 0;
37
+ });
38
+
39
+ export { Image as I, ListItem as L, container as c };