@appbaseio/reactivesearch-vue 1.24.3 → 1.27.0-gamma.1

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 (69) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +2015 -567
  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/{DownShift-62e82255.js → CancelSvg-4aa35935.js} +58 -14
  6. package/dist/cjs/{ComponentWrapper-32481890.js → ComponentWrapper-10bad289.js} +1 -1
  7. package/dist/cjs/DataSearch-37dfdf39.js +2154 -0
  8. package/dist/cjs/DataSearch.js +18 -2152
  9. package/dist/cjs/{DropDown-6815b9b6.js → DropDown-0076babc.js} +66 -24
  10. package/dist/cjs/DynamicRangeSlider.js +48 -12
  11. package/dist/cjs/{Input-3cc3fa59.js → Input-a9ee53ed.js} +1 -1
  12. package/dist/cjs/MultiDropdownList.js +19 -11
  13. package/dist/cjs/MultiList.js +22 -16
  14. package/dist/cjs/MultiRange.js +4 -4
  15. package/dist/cjs/RangeInput.js +10 -6
  16. package/dist/cjs/RangeSlider.js +19 -22
  17. package/dist/cjs/ReactiveBase.js +6 -4
  18. package/dist/cjs/ReactiveComponent.js +3 -3
  19. package/dist/cjs/ReactiveList.js +61 -44
  20. package/dist/cjs/ResultCard.js +1 -1
  21. package/dist/cjs/ResultList.js +1 -1
  22. package/dist/cjs/SelectedFilters.js +8 -6
  23. package/dist/cjs/SingleDropdownList.js +18 -10
  24. package/dist/cjs/SingleList.js +10 -9
  25. package/dist/cjs/SingleRange.js +4 -4
  26. package/dist/cjs/StateProvider.js +7 -3
  27. package/dist/cjs/ToggleButton.js +5 -5
  28. package/dist/cjs/{index-89c39a9e.js → index-4509aa45.js} +10 -4
  29. package/dist/cjs/index.js +17 -13
  30. package/dist/cjs/initReactivesearch.js +19 -0
  31. package/dist/cjs/install-b7a80fc1.js +1196 -0
  32. package/dist/cjs/install.js +29 -33
  33. package/dist/cjs/ssr-0ee35a09.js +39 -0
  34. package/dist/cjs/version.js +1 -1
  35. package/dist/cjs/{vueTypes-4c19b4c8.js → vueTypes-57d01f18.js} +3 -3
  36. package/dist/es/{DownShift-3558d402.js → CancelSvg-c2c03a35.js} +55 -16
  37. package/dist/es/{ComponentWrapper-4f85a67e.js → ComponentWrapper-0f3431d1.js} +1 -1
  38. package/dist/es/DataSearch-77325036.js +2141 -0
  39. package/dist/es/DataSearch.js +17 -2151
  40. package/dist/es/{DropDown-035c804f.js → DropDown-0dd8f2a3.js} +65 -23
  41. package/dist/es/DynamicRangeSlider.js +48 -12
  42. package/dist/es/{Input-08bb1bcf.js → Input-10b1d62d.js} +1 -1
  43. package/dist/es/MultiDropdownList.js +19 -11
  44. package/dist/es/MultiList.js +22 -16
  45. package/dist/es/MultiRange.js +4 -4
  46. package/dist/es/RangeInput.js +10 -6
  47. package/dist/es/RangeSlider.js +19 -22
  48. package/dist/es/ReactiveBase.js +6 -4
  49. package/dist/es/ReactiveComponent.js +3 -3
  50. package/dist/es/ReactiveList.js +61 -44
  51. package/dist/es/ResultCard.js +1 -1
  52. package/dist/es/ResultList.js +1 -1
  53. package/dist/es/SelectedFilters.js +8 -6
  54. package/dist/es/SingleDropdownList.js +18 -10
  55. package/dist/es/SingleList.js +10 -9
  56. package/dist/es/SingleRange.js +4 -4
  57. package/dist/es/StateProvider.js +7 -3
  58. package/dist/es/ToggleButton.js +5 -5
  59. package/dist/es/{index-cb1950b6.js → index-78920565.js} +10 -4
  60. package/dist/es/index.js +13 -10
  61. package/dist/es/initReactivesearch.js +19 -0
  62. package/dist/es/install-86388b0e.js +1189 -0
  63. package/dist/es/install.js +27 -35
  64. package/dist/es/ssr-a41dfea9.js +33 -0
  65. package/dist/es/version.js +1 -1
  66. package/dist/es/{vueTypes-fb61bb7b.js → vueTypes-687b2304.js} +3 -3
  67. package/package.json +4 -4
  68. package/dist/cjs/ssr-08e95ede.js +0 -39
  69. package/dist/es/ssr-5d255b08.js +0 -33
@@ -3,10 +3,12 @@ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPlugin
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-fb61bb7b.js';
7
- import { a as isFunction } from './index-cb1950b6.js';
8
- import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-08bb1bcf.js';
9
- import { D as Downshift } from './DownShift-3558d402.js';
6
+ import { t as types } from './vueTypes-687b2304.js';
7
+ import { a as isFunction } from './index-78920565.js';
8
+ import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
9
+ import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-c2c03a35.js';
10
+ import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-10b1d62d.js';
11
+ import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
10
12
 
11
13
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
12
14
  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"])));
@@ -68,7 +70,9 @@ var Dropdown = {
68
70
  single: VueTypes.bool,
69
71
  small: VueTypes.bool.def(false),
70
72
  themePreset: types.themePreset,
71
- showSearch: VueTypes.bool
73
+ showSearch: VueTypes.bool,
74
+ showClear: VueTypes.bool,
75
+ searchPlaceholder: VueTypes.string.def('Type here to search...')
72
76
  },
73
77
  render: function render() {
74
78
  var _this = this;
@@ -96,7 +100,7 @@ var Dropdown = {
96
100
  var filteredItemsToRender = itemsToRender.filter(function (item) {
97
101
  if (String(item[labelField]).length) {
98
102
  if (_this.$props.showSearch && _this.$data.searchTerm) {
99
- return String(item[labelField]).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
103
+ return replaceDiacritics(String(item[labelField])).toLowerCase().includes(replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
100
104
  }
101
105
 
102
106
  return true;
@@ -117,7 +121,8 @@ var Dropdown = {
117
121
  isOpen = _ref.isOpen,
118
122
  highlightedIndex = _ref.highlightedIndex,
119
123
  getButtonProps = _ref.getButtonProps,
120
- getItemEvents = _ref.getItemEvents;
124
+ getItemEvents = _ref.getItemEvents,
125
+ getInputEvents = _ref.getInputEvents;
121
126
  return h("div", {
122
127
  "class": suggestionsContainer
123
128
  }, [h(Select, {
@@ -142,25 +147,16 @@ var Dropdown = {
142
147
  getItemEvents: getItemEvents
143
148
  }) : isOpen && itemsToRender.length ? h("ul", {
144
149
  "class": suggestions(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName(_this.$props.innerClass, 'list')
145
- }, [_this.$props.showSearch ? h(Input, {
146
- "attrs": {
147
- "id": _this.$props.componentId + "-input",
148
- "showIcon": false,
149
- "placeholder": "Type here to search...",
150
- "value": _this.$data.searchTerm,
151
- "themePreset": themePreset
152
- },
153
- "style": {
154
- border: 0,
155
- borderBottom: '1px solid #ddd'
156
- },
157
- "class": getClassName(_this.$props.innerClass, 'input'),
158
- "on": {
159
- "change": _this.handleInputChange
150
+ }, [_this.$props.showSearch ? _this.renderSearchbox({
151
+ on: {
152
+ input: getInputEvents({
153
+ onInput: _this.handleInputChange
154
+ }).input
160
155
  }
161
156
  }) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
162
157
  var selected = _this.$props.multi // MultiDropdownList
163
- && (selectedItem && !!selectedItem[item[keyField]] || Array.isArray(selectedItem) && selectedItem.find(function (value) {
158
+ && (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
159
+ || Array.isArray(selectedItem) && selectedItem.find(function (value) {
164
160
  return value[labelField] === item[labelField];
165
161
  }));
166
162
  if (!_this.$props.multi) selected = item.key === selectedItem;
@@ -210,6 +206,7 @@ var Dropdown = {
210
206
 
211
207
  if (!this.$props.multi) {
212
208
  this.isOpen = false;
209
+ this.searchTerm = '';
213
210
  }
214
211
  },
215
212
  handleStateChange: function handleStateChange(_ref2) {
@@ -233,6 +230,9 @@ var Dropdown = {
233
230
  var value = e.target.value;
234
231
  this.searchTerm = value;
235
232
  },
233
+ clearSearchTerm: function clearSearchTerm() {
234
+ this.searchTerm = '';
235
+ },
236
236
  renderToString: function renderToString(value) {
237
237
  var _this2 = this;
238
238
 
@@ -273,6 +273,48 @@ var Dropdown = {
273
273
  return h("p", {
274
274
  "class": getClassName(this.$props.innerClass, 'noResults') || null
275
275
  }, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
276
+ },
277
+ renderSearchbox: function renderSearchbox(eventObject) {
278
+ var h = this.$createElement;
279
+ var _this$$props2 = this.$props,
280
+ componentId = _this$$props2.componentId,
281
+ searchPlaceholder = _this$$props2.searchPlaceholder,
282
+ showClear = _this$$props2.showClear,
283
+ themePreset = _this$$props2.themePreset,
284
+ innerClass = _this$$props2.innerClass;
285
+ var InputComponent = h(Input, _mergeJSXProps([{
286
+ "attrs": {
287
+ "id": componentId + "-input",
288
+ "showIcon": false,
289
+ "showClear": showClear,
290
+ "placeholder": searchPlaceholder,
291
+ "value": this.$data.searchTerm,
292
+ "themePreset": themePreset
293
+ },
294
+ "style": {
295
+ border: 0,
296
+ borderBottom: '1px solid #ddd'
297
+ },
298
+ "class": getClassName(innerClass, 'input')
299
+ }, eventObject]));
300
+
301
+ if (showClear) {
302
+ return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
303
+ "attrs": {
304
+ "groupPosition": "right",
305
+ "positionType": "absolute"
306
+ }
307
+ }, [h(IconWrapper, {
308
+ "on": {
309
+ "click": this.clearSearchTerm
310
+ },
311
+ "attrs": {
312
+ "isClearIcon": true
313
+ }
314
+ }, [h(CancelSvg)])])]);
315
+ }
316
+
317
+ return InputComponent;
276
318
  }
277
319
  }
278
320
  };
@@ -3,13 +3,13 @@ import { a as _extends } from './_rollupPluginBabelHelpers-0f24d612.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-fb61bb7b.js';
6
+ import { t as types } from './vueTypes-687b2304.js';
7
7
  import 'redux';
8
- import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-cb1950b6.js';
8
+ import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-78920565.js';
9
9
  import { T as Title } from './Title-3522ff56.js';
10
10
  import { C as Container } from './Container-18b03fde.js';
11
11
  import NoSSR from 'vue-no-ssr';
12
- import { g as getComponents, S as Slider } from './ssr-5d255b08.js';
12
+ import { g as getComponents, S as Slider } from './ssr-a41dfea9.js';
13
13
 
14
14
  var addComponent = Actions.addComponent,
15
15
  removeComponent = Actions.removeComponent,
@@ -47,7 +47,8 @@ var DynamicRangeSlider = {
47
47
  URLParams: VueTypes.bool.def(false),
48
48
  sliderOptions: VueTypes.object.def({}),
49
49
  nestedField: types.string,
50
- index: VueTypes.string
50
+ index: VueTypes.string,
51
+ value: types.range
51
52
  },
52
53
  data: function data() {
53
54
  this.internalRangeComponent = this.$props.componentId + "__range__internal";
@@ -93,6 +94,8 @@ var DynamicRangeSlider = {
93
94
  components = _this$$$store$getStat.components;
94
95
  }
95
96
 
97
+ var value = this.$props.value;
98
+
96
99
  if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
97
100
  this.addComponent(this.componentId);
98
101
  this.addComponent(this.internalRangeComponent);
@@ -101,6 +104,8 @@ var DynamicRangeSlider = {
101
104
  this.handleChange(this.selectedValue);
102
105
  } else if (this.selectedValue) {
103
106
  this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
107
+ } else if (value) {
108
+ this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
104
109
  } // get range before executing other queries
105
110
 
106
111
 
@@ -119,6 +124,13 @@ var DynamicRangeSlider = {
119
124
  }
120
125
  },
121
126
  methods: {
127
+ isControlled: function isControlled() {
128
+ if (this.$props.value && this.$listeners) {
129
+ return true;
130
+ }
131
+
132
+ return false;
133
+ },
122
134
  setDefaultValue: function setDefaultValue(_ref) {
123
135
  var start = _ref.start,
124
136
  end = _ref.end;
@@ -129,6 +141,8 @@ var DynamicRangeSlider = {
129
141
  defaultEnd = _this$$props$defaultV.end;
130
142
 
131
143
  this.handleChange([defaultStart, defaultEnd]);
144
+ } else if (this.isControlled()) {
145
+ this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
132
146
  } else {
133
147
  this.currentValue = [start, end];
134
148
  }
@@ -176,8 +190,18 @@ var DynamicRangeSlider = {
176
190
  aggs: aggs
177
191
  });
178
192
  },
179
- handleSlider: function handleSlider(values) {
180
- this.handleChange(values.currentValue);
193
+ handleSlider: function handleSlider() {
194
+ var sliderValues = this.$refs.slider.getValue();
195
+ var value = this.$props.value;
196
+
197
+ if (value === undefined) {
198
+ this.handleChange(sliderValues);
199
+ } else {
200
+ this.$emit('change', {
201
+ start: sliderValues[0],
202
+ end: sliderValues[1]
203
+ });
204
+ }
181
205
  },
182
206
  handleChange: function handleChange(currentValue) {
183
207
  var _this2 = this;
@@ -229,7 +253,7 @@ var DynamicRangeSlider = {
229
253
  currentEnd = value[1]; // check if the slider is at its initial position
230
254
 
231
255
  var isInitialValue = currentStart === start && currentEnd === end;
232
- this.setQueryOptions(this.$props.componentId, customQueryOptions);
256
+ this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
233
257
  this.updateQuery({
234
258
  componentId: this.$props.componentId,
235
259
  query: query,
@@ -270,6 +294,7 @@ var DynamicRangeSlider = {
270
294
  start: this.range.start,
271
295
  end: this.range.end
272
296
  };
297
+ this.$emit('change', value);
273
298
  this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
274
299
  },
275
300
  range: function range(newValue, oldValue) {
@@ -291,6 +316,11 @@ var DynamicRangeSlider = {
291
316
  if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
292
317
  this.updateQueryHandler(this.$data.currentValue);
293
318
  }
319
+ },
320
+ value: function value(newVal, oldVal) {
321
+ if (!isEqual(newVal, oldVal)) {
322
+ this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
323
+ }
294
324
  }
295
325
  },
296
326
  render: function render() {
@@ -310,13 +340,15 @@ var DynamicRangeSlider = {
310
340
  }, [this.$props.title]), h(NoSSR, [h(Slider, {
311
341
  "class": getClassName(this.$props.innerClass, 'slider')
312
342
  }, [h("vue-slider-component", {
343
+ "ref": "slider",
313
344
  "attrs": {
314
- "value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
315
- "min": Math.min(start, this.currentValue[0]),
316
- "max": Math.max(end, this.currentValue[1]),
345
+ "value": [Math.floor(Math.max(start, this.currentValue[0])), Math.ceil(Math.min(end, this.currentValue[1]))],
346
+ "min": Math.floor(Math.min(start, this.currentValue[0])),
347
+ "max": Math.ceil(Math.max(end, this.currentValue[1])),
317
348
  "dotSize": 20,
318
349
  "height": 4,
319
- "enable-cross": false
350
+ "enable-cross": false,
351
+ "tooltip": "always"
320
352
  },
321
353
  "on": {
322
354
  "drag-end": this.handleSlider
@@ -362,7 +394,11 @@ DynamicRangeSlider.defaultQuery = function (values, props) {
362
394
  };
363
395
 
364
396
  DynamicRangeSlider.parseValue = function (value) {
365
- return [value.start, value.end];
397
+ if (value) {
398
+ return Array.isArray(value) ? value : [value.start, value.end];
399
+ }
400
+
401
+ return [];
366
402
  };
367
403
 
368
404
  var mapStateToProps = function mapStateToProps(state, props) {
@@ -59,7 +59,7 @@ var Input = styled('input')(_templateObject5 || (_templateObject5 = _taggedTempl
59
59
  });
60
60
 
61
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));
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: min(100vh, 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
63
  };
64
64
 
65
65
  var suggestionsContainer = css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
@@ -6,18 +6,20 @@ import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
8
  import { l as loadMoreContainer, B as Button } from './Button-91561391.js';
9
- import { t as types } from './vueTypes-fb61bb7b.js';
9
+ import { t as types } from './vueTypes-687b2304.js';
10
10
  import '@appbaseio/reactivecore/lib/utils/transform';
11
11
  import 'redux';
12
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-cb1950b6.js';
13
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
12
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-78920565.js';
13
+ import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
14
+ import '@vue/babel-helper-vue-jsx-merge-props';
14
15
  import { T as Title } from './Title-3522ff56.js';
15
- import './Input-08bb1bcf.js';
16
+ import './CancelSvg-c2c03a35.js';
17
+ import './Input-10b1d62d.js';
16
18
  import 'compute-scroll-into-view';
17
- import './DownShift-3558d402.js';
18
19
  import { C as Container } from './Container-18b03fde.js';
20
+ import '@appbaseio/reactivecore/lib/utils/suggestions';
19
21
  import { g as getAggsQuery } from './utils-64a2e5f0.js';
20
- import { D as Dropdown } from './DropDown-035c804f.js';
22
+ import { D as Dropdown } from './DropDown-0dd8f2a3.js';
21
23
 
22
24
  var updateQuery = Actions.updateQuery,
23
25
  setQueryOptions = Actions.setQueryOptions,
@@ -74,10 +76,12 @@ var MultiDropdownList = {
74
76
  showMissing: VueTypes.bool.def(false),
75
77
  missingLabel: VueTypes.string.def('N/A'),
76
78
  showSearch: VueTypes.bool.def(false),
79
+ showClear: VueTypes.bool.def(false),
77
80
  showLoadMore: VueTypes.bool.def(false),
78
81
  loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
79
82
  nestedField: types.string,
80
- index: VueTypes.string
83
+ index: VueTypes.string,
84
+ searchPlaceholder: VueTypes.string.def('Type here to search...')
81
85
  },
82
86
  created: function created() {
83
87
  if (!this.enableAppbase && this.$props.index) {
@@ -205,7 +209,9 @@ var MultiDropdownList = {
205
209
  if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
206
210
  if (renderNoResults && isFunction(renderNoResults)) {
207
211
  return h("div", [renderNoResults()]);
208
- } else if (renderNoResults && !isFunction(renderNoResults)) {
212
+ }
213
+
214
+ if (renderNoResults && !isFunction(renderNoResults)) {
209
215
  return renderNoResults;
210
216
  }
211
217
 
@@ -244,6 +250,8 @@ var MultiDropdownList = {
244
250
  "renderItem": renderItemCalc,
245
251
  "renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
246
252
  "showSearch": this.$props.showSearch,
253
+ "showClear": this.$props.showClear,
254
+ "searchPlaceholder": this.$props.searchPlaceholder,
247
255
  "transformData": this.$props.transformData,
248
256
  "footer": showLoadMore && !isLastBucket && h("div", {
249
257
  "attrs": {
@@ -335,7 +343,7 @@ var MultiDropdownList = {
335
343
  }
336
344
 
337
345
  var performUpdate = function performUpdate() {
338
- _this3.currentValue = currentValue;
346
+ _this3.currentValue = _extends({}, currentValue);
339
347
 
340
348
  _this3.updateQueryHandler(finalValues, props);
341
349
 
@@ -362,7 +370,7 @@ var MultiDropdownList = {
362
370
  updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
363
371
  }
364
372
 
365
- this.setQueryOptions(this.internalComponent, defaultQueryOptions);
373
+ this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
366
374
  this.updateQuery({
367
375
  componentId: this.internalComponent,
368
376
  query: query,
@@ -383,7 +391,7 @@ var MultiDropdownList = {
383
391
  updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
384
392
  }
385
393
 
386
- this.setQueryOptions(props.componentId, customQueryOptions);
394
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
387
395
  this.updateQuery({
388
396
  componentId: props.componentId,
389
397
  query: query,
@@ -5,14 +5,15 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-fb61bb7b.js';
8
+ import { t as types } from './vueTypes-687b2304.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, n as isEvent, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-cb1950b6.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
11
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, n as isEvent, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-78920565.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
13
13
  import { T as Title } from './Title-3522ff56.js';
14
- import { I as Input } from './Input-08bb1bcf.js';
14
+ import { I as Input } from './Input-10b1d62d.js';
15
15
  import { C as Container } from './Container-18b03fde.js';
16
+ import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
16
17
  import { U as UL, C as Checkbox } from './FormControlList-704f8dee.js';
17
18
  import { g as getAggsQuery } from './utils-64a2e5f0.js';
18
19
 
@@ -33,7 +34,7 @@ var MultiList = {
33
34
  queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
34
35
  showCheckbox: VueTypes.bool.def(true),
35
36
  beforeValueChange: types.func,
36
- className: types.string.def(''),
37
+ className: VueTypes.string.def(''),
37
38
  componentId: types.stringRequired,
38
39
  customQuery: types.func,
39
40
  dataField: types.stringRequired,
@@ -83,13 +84,14 @@ var MultiList = {
83
84
  },
84
85
  beforeMount: function beforeMount() {
85
86
  this.updateQueryHandlerOptions(this.$props);
87
+ var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
88
+ this.setValue(value, !this.selectedValue);
89
+ },
90
+ mounted: function mounted() {
91
+ var currentValue = Object.keys(this.$data.currentValue);
86
92
 
87
- if (this.selectedValue) {
88
- this.setValue(this.selectedValue);
89
- } else if (this.$props.value) {
90
- this.setValue(this.$props.value, true);
91
- } else if (this.$props.defaultValue) {
92
- this.setValue(this.$props.defaultValue, true);
93
+ if (this.$props.value !== undefined && !isEqual(this.$props.value, currentValue)) {
94
+ this.$emit('change', currentValue);
93
95
  }
94
96
  },
95
97
  watch: {
@@ -134,7 +136,11 @@ var MultiList = {
134
136
  }
135
137
 
136
138
  if (!isEqual(selectedValue, newVal)) {
137
- this.setValue(newVal || [], true);
139
+ if (this.value === undefined) {
140
+ this.setValue(newVal, true);
141
+ } else {
142
+ this.$emit('change', newVal);
143
+ }
138
144
  }
139
145
  },
140
146
  defaultQuery: function defaultQuery(newVal, oldVal) {
@@ -180,7 +186,7 @@ var MultiList = {
180
186
  var filteredItemsToRender = itemsToRender.filter(function (item) {
181
187
  if (String(item.key).length) {
182
188
  if (_this2.$props.showSearch && _this2.$data.searchTerm) {
183
- return String(item.key).toLowerCase().includes(_this2.$data.searchTerm.toLowerCase());
189
+ return replaceDiacritics(String(item.key)).toLowerCase().includes(replaceDiacritics(_this2.$data.searchTerm).toLowerCase());
184
190
  }
185
191
 
186
192
  return true;
@@ -348,7 +354,7 @@ var MultiList = {
348
354
  updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
349
355
  }
350
356
 
351
- this.setQueryOptions(this.internalComponent, defaultQueryOptions);
357
+ this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
352
358
  this.updateQuery({
353
359
  componentId: this.internalComponent,
354
360
  query: query,
@@ -369,7 +375,7 @@ var MultiList = {
369
375
  updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
370
376
  }
371
377
 
372
- this.setQueryOptions(props.componentId, customQueryOptions);
378
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
373
379
  this.updateQuery({
374
380
  componentId: props.componentId,
375
381
  query: query,
@@ -433,7 +439,7 @@ var MultiList = {
433
439
  if (value === undefined) {
434
440
  this.setValue(currentValue);
435
441
  } else {
436
- var values = parseValueArray(value, currentValue);
442
+ var values = parseValueArray(value || [], currentValue);
437
443
  this.$emit('change', values);
438
444
  }
439
445
  },
@@ -5,11 +5,11 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-fb61bb7b.js';
8
+ import { t as types } from './vueTypes-687b2304.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { o as parseValueArray, f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-cb1950b6.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
11
+ import { o as parseValueArray, f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-78920565.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
13
13
  import { T as Title } from './Title-3522ff56.js';
14
14
  import { C as Container } from './Container-18b03fde.js';
15
15
  import { U as UL, C as Checkbox } from './FormControlList-704f8dee.js';
@@ -141,7 +141,7 @@ var MultiRange = {
141
141
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
142
142
  }
143
143
 
144
- this.setQueryOptions(props.componentId, customQueryOptions);
144
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
145
145
  this.updateQuery({
146
146
  componentId: props.componentId,
147
147
  query: query,
@@ -5,17 +5,17 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { css } from 'emotion';
6
6
  import styled from '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-fb61bb7b.js';
8
+ import { t as types } from './vueTypes-687b2304.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { c as connect } from './index-cb1950b6.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
11
+ import { c as connect } from './index-78920565.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
13
13
  import './Title-3522ff56.js';
14
14
  import { F as Flex } from './Flex-8770345d.js';
15
- import { I as Input } from './Input-08bb1bcf.js';
15
+ import { I as Input } from './Input-10b1d62d.js';
16
16
  import { C as Container } from './Container-18b03fde.js';
17
17
  import 'vue-no-ssr';
18
- import './ssr-5d255b08.js';
18
+ import './ssr-a41dfea9.js';
19
19
  import { RangeConnected as RangeConnected$1 } from './RangeSlider.js';
20
20
 
21
21
  var _templateObject, _templateObject2;
@@ -138,7 +138,7 @@ var RangeInput = {
138
138
  }
139
139
  },
140
140
  handleOnChange: function handleOnChange(value) {
141
- this.handleChange(value, 'change');
141
+ this.handleChange(value || this.$props.range, 'change');
142
142
  },
143
143
  handleValueChange: function handleValueChange(value) {
144
144
  this.handleChange(value, 'value-change');
@@ -193,6 +193,10 @@ var RangeInput = {
193
193
  if (this.$props.defaultValue && this.$props.defaultValue.start && this.$props.defaultValue.end) {
194
194
  this.handleChange(this.$props.defaultValue);
195
195
  }
196
+
197
+ if (this.isControlled()) {
198
+ this.handleChange(this.$props.value, 'change');
199
+ }
196
200
  },
197
201
  render: function render() {
198
202
  var h = arguments[0];
@@ -3,15 +3,15 @@ import { a as _extends } from './_rollupPluginBabelHelpers-0f24d612.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-fb61bb7b.js';
6
+ import { t as types } from './vueTypes-687b2304.js';
7
7
  import '@appbaseio/reactivecore/lib/utils/transform';
8
8
  import 'redux';
9
- import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-cb1950b6.js';
10
- import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
9
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-78920565.js';
10
+ import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
11
11
  import { T as Title } from './Title-3522ff56.js';
12
12
  import { C as Container } from './Container-18b03fde.js';
13
13
  import NoSSR from 'vue-no-ssr';
14
- import { g as getComponents, S as Slider } from './ssr-5d255b08.js';
14
+ import { g as getComponents, S as Slider } from './ssr-a41dfea9.js';
15
15
 
16
16
  var updateQuery = Actions.updateQuery,
17
17
  setQueryOptions = Actions.setQueryOptions,
@@ -73,32 +73,28 @@ var RangeSlider = {
73
73
  });
74
74
  }
75
75
  },
76
- handleSlider: function handleSlider(values) {
77
- var _this = this;
78
-
79
- clearTimeout(this.handleSliderChange._tId);
80
- this.handleSliderChange._tId = setTimeout(function () {
81
- _this.handleSliderChange(values);
82
- }, 100);
76
+ handleSlider: function handleSlider() {
77
+ var sliderValues = this.$refs.slider.getValue();
78
+ this.handleSliderChange(sliderValues);
83
79
  },
84
80
  handleChange: function handleChange(currentValue, props) {
85
- var _this2 = this;
81
+ var _this = this;
86
82
 
87
83
  if (props === void 0) {
88
84
  props = this.$props;
89
85
  }
90
86
 
91
87
  var performUpdate = function performUpdate() {
92
- _this2.currentValue = currentValue;
88
+ _this.currentValue = currentValue;
93
89
 
94
- _this2.updateQueryHandler([currentValue[0], currentValue[1]], props);
90
+ _this.updateQueryHandler([currentValue[0], currentValue[1]], props);
95
91
 
96
- _this2.$emit('valueChange', {
92
+ _this.$emit('valueChange', {
97
93
  start: currentValue[0],
98
94
  end: currentValue[1]
99
95
  });
100
96
 
101
- _this2.$emit('value-change', {
97
+ _this.$emit('value-change', {
102
98
  start: currentValue[0],
103
99
  end: currentValue[1]
104
100
  });
@@ -130,7 +126,7 @@ var RangeSlider = {
130
126
  currentEnd = value[1]; // check if the slider is at its initial position
131
127
 
132
128
  var isInitialValue = currentStart === start && currentEnd === end;
133
- this.setQueryOptions(props.componentId, customQueryOptions);
129
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
134
130
  this.updateQuery({
135
131
  componentId: props.componentId,
136
132
  query: query,
@@ -209,12 +205,13 @@ var RangeSlider = {
209
205
  "max": this.$props.range.end,
210
206
  "dotSize": 20,
211
207
  "height": 4,
212
- "enable-cross": false
208
+ "enable-cross": false,
209
+ "tooltip": "always"
210
+ },
211
+ "on": {
212
+ "drag-end": this.handleSlider
213
213
  },
214
- "props": _extends({}, this.$props.sliderOptions),
215
- "on": _extends({}, {
216
- input: this.handleSlider
217
- })
214
+ "props": _extends({}, this.$props.sliderOptions)
218
215
  }), this.$props.rangeLabels && h("div", {
219
216
  "class": "label-container"
220
217
  }, [h("label", {