@appbaseio/reactivesearch-vue 1.34.0-alpha.2 → 1.35.0

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 (104) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +10892 -8633
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +12 -11
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-841fd06d.js +62 -0
  6. package/dist/cjs/{CancelSvg-062a42f0.js → CancelSvg-220a7cc3.js} +40 -32
  7. package/dist/cjs/Card-240f283d.js +30 -0
  8. package/dist/cjs/{ComponentWrapper-db45cc6d.js → ComponentWrapper-94c50228.js} +7 -7
  9. package/dist/cjs/Container-e699ea95.js +15 -0
  10. package/dist/cjs/DataSearch.js +1313 -20
  11. package/dist/cjs/{DropDown-3b899b20.js → DropDown-c6b79b05.js} +79 -78
  12. package/dist/cjs/DynamicRangeSlider.js +47 -56
  13. package/dist/cjs/Flex-ddd7cb6b.js +50 -0
  14. package/dist/cjs/FormControlList-bbb5cd24.js +45 -0
  15. package/dist/cjs/Input-ead4cd84.js +77 -0
  16. package/dist/cjs/ListItem-5088bd6a.js +45 -0
  17. package/dist/cjs/MultiDropdownList.js +69 -74
  18. package/dist/cjs/MultiList.js +95 -89
  19. package/dist/cjs/MultiRange.js +45 -54
  20. package/dist/cjs/{Pagination-a468f960.js → Pagination-6d184d4a.js} +53 -56
  21. package/dist/cjs/{PreferencesConsumer-034c55e3.js → PreferencesConsumer-5e6e84a2.js} +5 -6
  22. package/dist/cjs/RangeInput.js +108 -115
  23. package/dist/cjs/RangeSlider.js +40 -50
  24. package/dist/cjs/ReactiveBase.js +55 -69
  25. package/dist/cjs/ReactiveComponent.js +317 -46
  26. package/dist/cjs/{ReactiveComponent-f0f486ca.js → ReactiveComponentPrivate-6f03f300.js} +322 -618
  27. package/dist/cjs/ReactiveComponentPrivate.js +55 -0
  28. package/dist/cjs/ReactiveGoogleMap.js +442 -384
  29. package/dist/cjs/ReactiveList.js +129 -100
  30. package/dist/cjs/ResultCard.js +19 -26
  31. package/dist/cjs/ResultList.js +27 -31
  32. package/dist/cjs/SelectedFilters.js +34 -49
  33. package/dist/cjs/SingleDropdownList.js +67 -73
  34. package/dist/cjs/SingleList.js +97 -90
  35. package/dist/cjs/SingleRange.js +43 -48
  36. package/dist/cjs/StateProvider.js +2 -2
  37. package/dist/cjs/Tags-d464c22e.js +883 -0
  38. package/dist/cjs/Title-16042ea0.js +15 -0
  39. package/dist/cjs/ToggleButton.js +35 -39
  40. package/dist/cjs/{index-dc25b706.js → index-de136c17.js} +8 -6
  41. package/dist/cjs/index.js +27 -25
  42. package/dist/cjs/initReactivesearch.js +0 -3
  43. package/dist/cjs/install.js +23 -22
  44. package/dist/cjs/ssr-f2fc1bf6.js +36 -0
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/cjs/{vueTypes-621a8143.js → vueTypes-568ce5e6.js} +4 -2
  47. package/dist/es/Button-153cd885.js +53 -0
  48. package/dist/es/{CancelSvg-14ebc9a1.js → CancelSvg-e40552a5.js} +37 -30
  49. package/dist/es/{Card-1951569e.js → Card-19ad6d90.js} +6 -5
  50. package/dist/es/{ComponentWrapper-bf443c0b.js → ComponentWrapper-edaeaceb.js} +6 -6
  51. package/dist/es/Container-d00219f7.js +1 -1
  52. package/dist/es/DataSearch.js +1313 -18
  53. package/dist/es/{DropDown-35e232b7.js → DropDown-c685912c.js} +78 -78
  54. package/dist/es/DynamicRangeSlider.js +44 -53
  55. package/dist/es/Flex-7c177a10.js +45 -0
  56. package/dist/es/FormControlList-99797d0a.js +38 -0
  57. package/dist/es/Input-c09c0b56.js +69 -0
  58. package/dist/es/{ListItem-47a6345a.js → ListItem-07888a65.js} +7 -6
  59. package/dist/es/MultiDropdownList.js +67 -72
  60. package/dist/es/MultiList.js +94 -88
  61. package/dist/es/MultiRange.js +43 -52
  62. package/dist/es/{Pagination-145b4ff2.js → Pagination-f477f92f.js} +53 -56
  63. package/dist/es/{PreferencesConsumer-7ea7313a.js → PreferencesConsumer-86a676c8.js} +4 -5
  64. package/dist/es/RangeInput.js +104 -112
  65. package/dist/es/RangeSlider.js +37 -47
  66. package/dist/es/ReactiveBase.js +53 -68
  67. package/dist/es/ReactiveComponent.js +317 -45
  68. package/dist/es/{ReactiveComponent-e2fb9eb4.js → ReactiveComponentPrivate-4467524a.js} +317 -614
  69. package/dist/es/ReactiveComponentPrivate.js +47 -0
  70. package/dist/es/ReactiveGoogleMap.js +437 -380
  71. package/dist/es/ReactiveList.js +126 -98
  72. package/dist/es/ResultCard.js +18 -25
  73. package/dist/es/ResultList.js +26 -30
  74. package/dist/es/SelectedFilters.js +32 -47
  75. package/dist/es/SingleDropdownList.js +65 -71
  76. package/dist/es/SingleList.js +95 -88
  77. package/dist/es/SingleRange.js +41 -46
  78. package/dist/es/StateProvider.js +2 -2
  79. package/dist/es/Tags-ebf363ec.js +869 -0
  80. package/dist/es/Title-863dfa42.js +1 -1
  81. package/dist/es/ToggleButton.js +33 -37
  82. package/dist/es/{index-285a43a6.js → index-5509c0bc.js} +8 -6
  83. package/dist/es/index.js +20 -19
  84. package/dist/es/initReactivesearch.js +0 -3
  85. package/dist/es/install.js +20 -19
  86. package/dist/es/ssr-03607d84.js +1 -1
  87. package/dist/es/version.js +1 -1
  88. package/dist/es/{vueTypes-e4af6fe2.js → vueTypes-7f572665.js} +4 -2
  89. package/package.json +87 -87
  90. package/dist/cjs/Button-626c5e8e.js +0 -58
  91. package/dist/cjs/Card-c381ded3.js +0 -26
  92. package/dist/cjs/Container-29f049b2.js +0 -12
  93. package/dist/cjs/DataSearch-7c71ec9f.js +0 -2043
  94. package/dist/cjs/Flex-d5675ea6.js +0 -48
  95. package/dist/cjs/FormControlList-cf1ff2ca.js +0 -42
  96. package/dist/cjs/Input-4d278ca0.js +0 -74
  97. package/dist/cjs/ListItem-c067bc07.js +0 -41
  98. package/dist/cjs/Title-8802a218.js +0 -12
  99. package/dist/cjs/ssr-eb901d09.js +0 -35
  100. package/dist/es/Button-ebafa3d6.js +0 -52
  101. package/dist/es/DataSearch-4f9a4e46.js +0 -2028
  102. package/dist/es/Flex-a08e22d7.js +0 -46
  103. package/dist/es/FormControlList-fa5cf78b.js +0 -38
  104. package/dist/es/Input-3b8408a6.js +0 -69
@@ -1,15 +1,14 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
2
  import '@appbaseio/reactivecore/lib/utils/constants';
3
- import './_rollupPluginBabelHelpers-ded08042.js';
4
- import { createVNode, mergeProps, createTextVNode } from 'vue';
3
+ import { a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
5
4
  import VueTypes from 'vue-types';
6
- import '@appbaseio/vue-emotion';
7
5
  import 'emotion';
6
+ import '@appbaseio/vue-emotion';
8
7
  import 'polished';
9
- import { f as filters, B as Button } from './Button-ebafa3d6.js';
10
- import { t as types } from './vueTypes-e4af6fe2.js';
8
+ import { f as filters, B as Button } from './Button-153cd885.js';
9
+ import { t as types } from './vueTypes-7f572665.js';
11
10
  import 'redux';
12
- import { n as decodeHtml, c as connect } from './index-285a43a6.js';
11
+ import { n as decodeHtml, c as connect } from './index-5509c0bc.js';
13
12
  import { T as Title } from './Title-863dfa42.js';
14
13
  import { C as Container } from './Container-d00219f7.js';
15
14
 
@@ -37,8 +36,9 @@ var SelectedFilters = {
37
36
  },
38
37
  render: function render() {
39
38
  var _this = this;
40
- if (this.$slots["default"]) {
41
- return this.$slots["default"]({
39
+ var h = arguments[0];
40
+ if (this.$scopedSlots["default"]) {
41
+ return this.$scopedSlots["default"]({
42
42
  components: this.components,
43
43
  selectedValues: this.selectedValues,
44
44
  clearValues: this.clearValues,
@@ -49,36 +49,24 @@ var SelectedFilters = {
49
49
  }
50
50
  var filtersToRender = this.renderFilters();
51
51
  var hasValues = !!filtersToRender.length;
52
- return createVNode(Container, {
52
+ return h(Container, {
53
53
  "class": filters(this.theme) + " " + (this.$props.className || '')
54
- }, {
55
- "default": function _default() {
56
- return [_this.$props.title && hasValues && createVNode(Title, {
57
- "class": getClassName(_this.$props.innerClass, 'title') || ''
58
- }, {
59
- "default": function _default() {
60
- return [_this.$props.title];
61
- }
62
- }), filtersToRender, _this.$props.showClearAll && hasValues && filtersToRender.length > 1 ? createVNode(Button, mergeProps({
63
- "class": getClassName(_this.$props.innerClass, 'button') || ''
64
- }, {
65
- on: {
66
- click: _this.clearValues,
67
- keypress: function keypress(event) {
68
- return handleA11yAction(event, function () {
69
- return _this.clearValues();
70
- });
71
- }
72
- }
73
- }, {
74
- "tabIndex": "0"
75
- }), {
76
- "default": function _default() {
77
- return [_this.$props.clearAllLabel];
78
- }
79
- }) : null];
54
+ }, [this.$props.title && hasValues && h(Title, {
55
+ "class": getClassName(this.$props.innerClass, 'title') || ''
56
+ }, [this.$props.title]), filtersToRender, this.$props.showClearAll && hasValues && filtersToRender.length > 1 ? h(Button, {
57
+ "class": getClassName(this.$props.innerClass, 'button') || '',
58
+ "on": _extends({}, {
59
+ click: this.clearValues,
60
+ keypress: function keypress(event) {
61
+ return handleA11yAction(event, function () {
62
+ return _this.clearValues();
63
+ });
64
+ }
65
+ }),
66
+ "attrs": {
67
+ "tabIndex": "0"
80
68
  }
81
- });
69
+ }, [this.$props.clearAllLabel]) : null]);
82
70
  },
83
71
  methods: {
84
72
  remove: function remove(component, value) {
@@ -130,23 +118,20 @@ var SelectedFilters = {
130
118
  return value;
131
119
  },
132
120
  renderFilterButton: function renderFilterButton(component, keyProp, handleRemove, label) {
133
- return createVNode(Button, mergeProps({
121
+ var h = this.$createElement;
122
+ return h(Button, {
134
123
  "class": getClassName(this.$props.innerClass, 'button') || '',
135
- "key": keyProp
136
- }, {
137
- on: {
124
+ "key": keyProp,
125
+ "on": _extends({}, {
138
126
  click: handleRemove,
139
127
  keypress: function keypress(event) {
140
128
  return handleA11yAction(event, handleRemove);
141
129
  }
130
+ }),
131
+ "attrs": {
132
+ "tabIndex": "0"
142
133
  }
143
- }, {
144
- "tabIndex": "0"
145
- }), {
146
- "default": function _default() {
147
- return [createVNode("span", null, [label]), createVNode("span", null, [createTextVNode("\u2715")])];
148
- }
149
- });
134
+ }, [h("span", [label]), h("span", ["\u2715"])]);
150
135
  },
151
136
  renderFilters: function renderFilters() {
152
137
  var _this3 = this;
@@ -1,30 +1,27 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
2
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
3
3
  import { a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
4
- import { createVNode, isVNode } from 'vue';
5
4
  import VueTypes from 'vue-types';
6
- import '@appbaseio/vue-emotion';
7
5
  import 'emotion';
6
+ import '@appbaseio/vue-emotion';
8
7
  import 'polished';
9
- import { l as loadMoreContainer, B as Button } from './Button-ebafa3d6.js';
10
- import { t as types } from './vueTypes-e4af6fe2.js';
8
+ import { l as loadMoreContainer, B as Button } from './Button-153cd885.js';
9
+ import { t as types } from './vueTypes-7f572665.js';
11
10
  import '@appbaseio/reactivecore/lib/utils/transform';
12
11
  import 'redux';
13
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, h as hasCustomRenderer, c as connect } from './index-285a43a6.js';
14
- import { C as ComponentWrapper } from './ComponentWrapper-bf443c0b.js';
15
- import { P as PreferencesConsumer } from './PreferencesConsumer-7ea7313a.js';
12
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, h as hasCustomRenderer, c as connect } from './index-5509c0bc.js';
13
+ import { C as ComponentWrapper } from './ComponentWrapper-edaeaceb.js';
14
+ import { P as PreferencesConsumer } from './PreferencesConsumer-86a676c8.js';
15
+ import '@vue/babel-helper-vue-jsx-merge-props';
16
16
  import { T as Title } from './Title-863dfa42.js';
17
- import './CancelSvg-14ebc9a1.js';
18
- import './Input-3b8408a6.js';
17
+ import './CancelSvg-e40552a5.js';
18
+ import './Input-c09c0b56.js';
19
19
  import 'compute-scroll-into-view';
20
20
  import { C as Container } from './Container-d00219f7.js';
21
21
  import '@appbaseio/reactivecore/lib/utils/suggestions';
22
22
  import { g as getAggsQuery } from './utils-9e5a16a1.js';
23
- import { D as Dropdown } from './DropDown-35e232b7.js';
23
+ import { D as Dropdown } from './DropDown-c685912c.js';
24
24
 
25
- function _isSlot(s) {
26
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
27
- }
28
25
  var updateQuery = Actions.updateQuery,
29
26
  setQueryOptions = Actions.setQueryOptions,
30
27
  setCustomQuery = Actions.setCustomQuery,
@@ -55,6 +52,7 @@ var SingleDropdownList = {
55
52
  beforeValueChange: types.func,
56
53
  className: VueTypes.string.def(''),
57
54
  componentId: types.stringRequired,
55
+ compoundClause: types.compoundClause,
58
56
  customQuery: types.func,
59
57
  dataField: types.stringRequired,
60
58
  defaultQuery: types.func,
@@ -82,7 +80,7 @@ var SingleDropdownList = {
82
80
  showSearch: VueTypes.bool.def(false),
83
81
  showClear: VueTypes.bool.def(false),
84
82
  showLoadMore: VueTypes.bool.def(false),
85
- loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.nullable]).def('Load More'),
83
+ loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
86
84
  nestedField: types.string,
87
85
  index: VueTypes.string,
88
86
  searchPlaceholder: VueTypes.string.def('Type here to search...'),
@@ -174,7 +172,7 @@ var SingleDropdownList = {
174
172
  }
175
173
  },
176
174
  render: function render() {
177
- var _this2 = this;
175
+ var h = arguments[0];
178
176
  var _this$$props2 = this.$props,
179
177
  showLoadMore = _this$$props2.showLoadMore,
180
178
  loadMoreLabel = _this$$props2.loadMoreLabel,
@@ -183,16 +181,16 @@ var SingleDropdownList = {
183
181
  renderLabel = _this$$props2.renderLabel;
184
182
  var isLastBucket = this.$data.isLastBucket;
185
183
  var selectAll = [];
186
- var renderItemCalc = this.$slots.renderItem || renderItem;
187
- var renderErrorCalc = this.$slots.renderError || renderError;
188
- var renderLabelCalc = this.$slots.renderLabel || renderLabel;
189
- var renderNoResults = this.$slots.renderNoResults || this.$props.renderNoResults;
184
+ var renderItemCalc = this.$scopedSlots.renderItem || renderItem;
185
+ var renderErrorCalc = this.$scopedSlots.renderError || renderError;
186
+ var renderLabelCalc = this.$scopedSlots.renderLabel || renderLabel;
187
+ var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
190
188
  if (renderErrorCalc && this.error) {
191
189
  return isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
192
190
  }
193
191
  if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
194
192
  if (renderNoResults && isFunction(renderNoResults)) {
195
- return createVNode("div", null, [renderNoResults()]);
193
+ return h("div", [renderNoResults()]);
196
194
  }
197
195
  if (renderNoResults && !isFunction(renderNoResults)) {
198
196
  return renderNoResults;
@@ -205,64 +203,58 @@ var SingleDropdownList = {
205
203
  doc_count: this.totalDocumentCount
206
204
  }];
207
205
  }
208
- return createVNode(Container, {
206
+ return h(Container, {
209
207
  "class": this.$props.className
210
- }, {
211
- "default": function _default() {
212
- return [_this2.$props.title && createVNode(Title, {
213
- "class": getClassName(_this2.$props.innerClass, 'title') || ''
214
- }, {
215
- "default": function _default() {
216
- return [_this2.$props.title];
217
- }
218
- }), createVNode(Dropdown, {
219
- "innerClass": _this2.$props.innerClass,
220
- "items": [].concat(selectAll, _this2.$data.modifiedOptions.filter(function (item) {
221
- return String(item.key).trim().length;
222
- }).map(function (item) {
223
- return _extends({}, item, {
224
- key: String(item.key)
225
- });
226
- })),
227
- "handleChange": _this2.handleChange,
228
- "selectedItem": _this2.$data.currentValue,
229
- "placeholder": _this2.$props.placeholder,
230
- "labelField": "key",
231
- "showCount": _this2.$props.showCount,
232
- "hasCustomRenderer": _this2.hasCustomRenderer,
233
- "customRenderer": _this2.getComponent,
234
- "renderItem": renderItemCalc,
235
- "renderNoResults": _this2.$slots.renderNoResults || _this2.$props.renderNoResults,
236
- "themePreset": _this2.themePreset,
237
- "showSearch": _this2.$props.showSearch,
238
- "showClear": _this2.$props.showClear,
239
- "searchPlaceholder": _this2.$props.searchPlaceholder,
240
- "transformData": _this2.$props.transformData,
241
- "footer": showLoadMore && !isLastBucket && createVNode("div", {
208
+ }, [this.$props.title && h(Title, {
209
+ "class": getClassName(this.$props.innerClass, 'title') || ''
210
+ }, [this.$props.title]), h(Dropdown, {
211
+ "attrs": {
212
+ "innerClass": this.$props.innerClass,
213
+ "items": [].concat(selectAll, this.$data.modifiedOptions.filter(function (item) {
214
+ return String(item.key).trim().length;
215
+ }).map(function (item) {
216
+ return _extends({}, item, {
217
+ key: String(item.key)
218
+ });
219
+ })),
220
+ "handleChange": this.handleChange,
221
+ "selectedItem": this.$data.currentValue,
222
+ "placeholder": this.$props.placeholder,
223
+ "labelField": "key",
224
+ "showCount": this.$props.showCount,
225
+ "hasCustomRenderer": this.hasCustomRenderer,
226
+ "customRenderer": this.getComponent,
227
+ "renderItem": renderItemCalc,
228
+ "renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
229
+ "themePreset": this.themePreset,
230
+ "showSearch": this.$props.showSearch,
231
+ "showClear": this.$props.showClear,
232
+ "searchPlaceholder": this.$props.searchPlaceholder,
233
+ "transformData": this.$props.transformData,
234
+ "footer": showLoadMore && !isLastBucket && h("div", {
235
+ "attrs": {
242
236
  "css": loadMoreContainer
243
- }, [createVNode(Button, {
244
- "onClick": _this2.handleLoadMore
245
- }, _isSlot(loadMoreLabel) ? loadMoreLabel : {
246
- "default": function _default() {
247
- return [loadMoreLabel];
248
- }
249
- })]),
250
- "customLabelRenderer": renderLabelCalc
251
- }, null)];
237
+ }
238
+ }, [h(Button, {
239
+ "on": {
240
+ "click": this.handleLoadMore
241
+ }
242
+ }, [loadMoreLabel])]),
243
+ "customLabelRenderer": renderLabelCalc
252
244
  }
253
- });
245
+ })]);
254
246
  },
255
247
  methods: {
256
248
  setValue: function setValue(value, props) {
257
- var _this3 = this;
249
+ var _this2 = this;
258
250
  if (props === void 0) {
259
251
  props = this.$props;
260
252
  }
261
253
  var performUpdate = function performUpdate() {
262
- _this3.currentValue = value;
263
- _this3.updateQueryHandler(value, props);
264
- _this3.$emit('valueChange', value);
265
- _this3.$emit('value-change', value);
254
+ _this2.currentValue = value;
255
+ _this2.updateQueryHandler(value, props);
256
+ _this2.$emit('valueChange', value);
257
+ _this2.$emit('value-change', value);
266
258
  };
267
259
  checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
268
260
  },
@@ -442,13 +434,15 @@ var ListConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps
442
434
  componentType: componentTypes.singleDropdownList,
443
435
  internalComponent: SingleDropdownList.hasInternalComponent()
444
436
  }));
437
+ ListConnected.defaultQuery = SingleDropdownList.defaultQuery;
438
+ ListConnected.generateQueryOptions = SingleDropdownList.generateQueryOptions;
439
+ ListConnected.hasInternalComponent = SingleDropdownList.hasInternalComponent;
445
440
  ListConnected.name = SingleDropdownList.name;
441
+ // Add componentType for SSR
442
+ ListConnected.componentType = componentTypes.singleDropdownList;
446
443
  ListConnected.install = function (Vue) {
447
444
  Vue.component(ListConnected.name, ListConnected);
448
445
  };
449
446
 
450
- // Add componentType for SSR
451
- ListConnected.componentType = componentTypes.singleDropdownList;
452
-
453
447
  export default ListConnected;
454
448
  export { ListConnected };
@@ -1,22 +1,21 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
2
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
3
3
  import { a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
4
- import { createVNode, mergeProps, createTextVNode } from 'vue';
5
4
  import VueTypes from 'vue-types';
6
- import '@appbaseio/vue-emotion';
7
5
  import 'emotion';
6
+ import '@appbaseio/vue-emotion';
8
7
  import 'polished';
9
- import { t as types } from './vueTypes-e4af6fe2.js';
8
+ import { t as types } from './vueTypes-7f572665.js';
10
9
  import '@appbaseio/reactivecore/lib/utils/transform';
11
10
  import 'redux';
12
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, o as isEvent, h as hasCustomRenderer, c as connect } from './index-285a43a6.js';
13
- import { C as ComponentWrapper } from './ComponentWrapper-bf443c0b.js';
14
- import { P as PreferencesConsumer } from './PreferencesConsumer-7ea7313a.js';
11
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, o as isEvent, h as hasCustomRenderer, c as connect } from './index-5509c0bc.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-edaeaceb.js';
13
+ import { P as PreferencesConsumer } from './PreferencesConsumer-86a676c8.js';
15
14
  import { T as Title } from './Title-863dfa42.js';
16
- import { I as Input } from './Input-3b8408a6.js';
15
+ import { I as Input } from './Input-c09c0b56.js';
17
16
  import { C as Container } from './Container-d00219f7.js';
18
17
  import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
19
- import { U as UL, R as Radio } from './FormControlList-fa5cf78b.js';
18
+ import { U as UL, R as Radio } from './FormControlList-99797d0a.js';
20
19
  import { g as getAggsQuery } from './utils-9e5a16a1.js';
21
20
 
22
21
  var updateQuery = Actions.updateQuery,
@@ -35,6 +34,7 @@ var SingleList = {
35
34
  beforeValueChange: types.func,
36
35
  className: VueTypes.string.def(''),
37
36
  componentId: types.stringRequired,
37
+ compoundClause: types.compoundClause,
38
38
  customQuery: types.func,
39
39
  dataField: types.stringRequired,
40
40
  defaultValue: types.string,
@@ -136,17 +136,18 @@ var SingleList = {
136
136
  },
137
137
  render: function render() {
138
138
  var _this = this;
139
+ var h = arguments[0];
139
140
  var _this$$props = this.$props,
140
141
  selectAllLabel = _this$$props.selectAllLabel,
141
142
  renderItem = _this$$props.renderItem,
142
143
  renderError = _this$$props.renderError;
143
- var renderItemCalc = this.$slots.renderItem || renderItem;
144
- var renderErrorCalc = this.$slots.renderError || renderError;
144
+ var renderItemCalc = this.$scopedSlots.renderItem || renderItem;
145
+ var renderErrorCalc = this.$scopedSlots.renderError || renderError;
145
146
  if (renderErrorCalc && this.error) {
146
147
  return isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
147
148
  }
148
149
  if (!this.hasCustomRenderer && this.modifiedOptions.length === 0 && !this.isLoading) {
149
- if (this.renderNoResult) {
150
+ if (this.renderNoResults) {
150
151
  this.renderNoResult();
151
152
  } else {
152
153
  return null;
@@ -165,73 +166,71 @@ var SingleList = {
165
166
  }
166
167
  return false;
167
168
  });
168
- return createVNode(Container, {
169
+ return h(Container, {
169
170
  "class": this.$props.className
170
- }, {
171
- "default": function _default() {
172
- return [_this.$props.title && createVNode(Title, {
173
- "class": getClassName(_this.$props.innerClass, 'title') || ''
174
- }, {
175
- "default": function _default() {
176
- return [_this.$props.title];
177
- }
178
- }), _this.renderSearch(), _this.hasCustomRenderer ? _this.getComponent() : createVNode(UL, {
179
- "class": getClassName(_this.$props.innerClass, 'list') || ''
180
- }, {
181
- "default": function _default() {
182
- return [selectAllLabel ? createVNode("li", {
183
- "key": selectAllLabel,
184
- "class": "" + (_this.$data.currentValue === selectAllLabel ? 'active' : '')
185
- }, [createVNode(Radio, mergeProps({
186
- "class": getClassName(_this.$props.innerClass, 'radio'),
187
- "id": _this.$props.componentId + "-" + selectAllLabel,
188
- "name": _this.$props.componentId,
189
- "value": selectAllLabel,
190
- "onClick": _this.handleClick,
191
- "readOnly": true,
192
- "type": "radio",
193
- "show": _this.$props.showRadio
194
- }, {
195
- domProps: {
196
- checked: _this.$data.currentValue === selectAllLabel
197
- }
198
- }), null), createVNode("label", {
199
- "class": getClassName(_this.$props.innerClass, 'label') || null,
200
- "for": _this.$props.componentId + "-" + selectAllLabel
201
- }, [createVNode("span", null, [selectAllLabel, _this.$props.showCount && createVNode("span", {
202
- "class": getClassName(_this.$props.innerClass, 'count') || null
203
- }, [createTextVNode("\xA0("), _this.totalDocumentCount, createTextVNode(")")])])])]) : null, !_this.hasCustomRenderer && filteredItemsToRender.length === 0 && !_this.isLoading ? _this.renderNoResult() : filteredItemsToRender.map(function (item) {
204
- return createVNode("li", {
205
- "key": item.key,
206
- "class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
207
- }, [createVNode(Radio, mergeProps({
208
- "class": getClassName(_this.$props.innerClass, 'radio'),
209
- "id": _this.$props.componentId + "-" + item.key,
210
- "name": _this.$props.componentId,
211
- "value": item.key,
212
- "readOnly": true,
213
- "onClick": _this.handleClick,
214
- "type": "radio",
215
- "show": _this.$props.showRadio
216
- }, {
217
- domProps: {
218
- checked: _this.currentValue === String(item.key)
219
- }
220
- }), null), createVNode("label", {
221
- "class": getClassName(_this.$props.innerClass, 'label') || null,
222
- "for": _this.$props.componentId + "-" + item.key
223
- }, [renderItemCalc ? renderItemCalc({
224
- label: item.key,
225
- count: item.doc_count,
226
- isChecked: _this.currentValue === String(item.key)
227
- }) : createVNode("span", null, [item.key, _this.$props.showCount && createVNode("span", {
228
- "class": getClassName(_this.$props.innerClass, 'count') || null
229
- }, [createTextVNode("\xA0("), item.doc_count, createTextVNode(")")])])])]);
230
- })];
231
- }
232
- })];
171
+ }, [this.$props.title && h(Title, {
172
+ "class": getClassName(this.$props.innerClass, 'title') || ''
173
+ }, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
174
+ "class": getClassName(this.$props.innerClass, 'list') || ''
175
+ }, [selectAllLabel ? h("li", {
176
+ "key": selectAllLabel,
177
+ "class": "" + (this.$data.currentValue === selectAllLabel ? 'active' : '')
178
+ }, [h(Radio, {
179
+ "class": getClassName(this.$props.innerClass, 'radio'),
180
+ "attrs": {
181
+ "id": this.$props.componentId + "-" + selectAllLabel,
182
+ "name": this.$props.componentId,
183
+ "value": selectAllLabel,
184
+ "readOnly": true,
185
+ "type": "radio",
186
+ "show": this.$props.showRadio
187
+ },
188
+ "on": {
189
+ "click": this.handleClick
190
+ },
191
+ "domProps": _extends({}, {
192
+ checked: this.$data.currentValue === selectAllLabel
193
+ })
194
+ }), h("label", {
195
+ "class": getClassName(this.$props.innerClass, 'label') || null,
196
+ "attrs": {
197
+ "for": this.$props.componentId + "-" + selectAllLabel
233
198
  }
234
- });
199
+ }, [h("span", [selectAllLabel, this.$props.showCount && h("span", {
200
+ "class": getClassName(this.$props.innerClass, 'count') || null
201
+ }, ["\xA0(", this.totalDocumentCount, ")"])])])]) : null, !this.hasCustomRenderer && filteredItemsToRender.length === 0 && !this.isLoading ? this.renderNoResult() : filteredItemsToRender.map(function (item) {
202
+ return h("li", {
203
+ "key": item.key,
204
+ "class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
205
+ }, [h(Radio, {
206
+ "class": getClassName(_this.$props.innerClass, 'radio'),
207
+ "attrs": {
208
+ "id": _this.$props.componentId + "-" + item.key,
209
+ "name": _this.$props.componentId,
210
+ "value": item.key,
211
+ "readOnly": true,
212
+ "type": "radio",
213
+ "show": _this.$props.showRadio
214
+ },
215
+ "on": {
216
+ "click": _this.handleClick
217
+ },
218
+ "domProps": _extends({}, {
219
+ checked: _this.currentValue === String(item.key)
220
+ })
221
+ }), h("label", {
222
+ "class": getClassName(_this.$props.innerClass, 'label') || null,
223
+ "attrs": {
224
+ "for": _this.$props.componentId + "-" + item.key
225
+ }
226
+ }, [renderItemCalc ? renderItemCalc({
227
+ label: item.key,
228
+ count: item.doc_count,
229
+ isChecked: _this.currentValue === String(item.key)
230
+ }) : h("span", [item.key, _this.$props.showCount && h("span", {
231
+ "class": getClassName(_this.$props.innerClass, 'count') || null
232
+ }, ["\xA0(", item.doc_count, ")"])])])]);
233
+ })])]);
235
234
  },
236
235
  methods: {
237
236
  setValue: function setValue(nextValue, props) {
@@ -311,17 +310,22 @@ var SingleList = {
311
310
  this.searchTerm = value;
312
311
  },
313
312
  renderSearch: function renderSearch() {
313
+ var h = this.$createElement;
314
314
  if (this.$props.showSearch) {
315
- return createVNode(Input, {
315
+ return h(Input, {
316
316
  "class": getClassName(this.$props.innerClass, 'input') || '',
317
- "onInput": this.handleInputChange,
318
- "value": this.$data.searchTerm,
319
- "placeholder": this.$props.placeholder,
317
+ "on": {
318
+ "input": this.handleInputChange
319
+ },
320
+ "attrs": {
321
+ "value": this.$data.searchTerm,
322
+ "placeholder": this.$props.placeholder,
323
+ "themePreset": this.$props.themePreset
324
+ },
320
325
  "style": {
321
326
  margin: '0 0 8px'
322
- },
323
- "themePreset": this.$props.themePreset
324
- }, null);
327
+ }
328
+ });
325
329
  }
326
330
  return null;
327
331
  },
@@ -361,8 +365,9 @@ var SingleList = {
361
365
  return true;
362
366
  },
363
367
  renderNoResult: function renderNoResult() {
364
- var renderNoResults = this.$slots.renderNoResults || this.$props.renderNoResults;
365
- return createVNode("p", {
368
+ var h = this.$createElement;
369
+ var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
370
+ return h("p", {
366
371
  "class": getClassName(this.$props.innerClass, 'noResults') || null
367
372
  }, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
368
373
  }
@@ -447,12 +452,14 @@ var ListConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps
447
452
  internalComponent: SingleList.hasInternalComponent()
448
453
  }));
449
454
  ListConnected.name = SingleList.name;
455
+ ListConnected.defaultQuery = SingleList.defaultQuery;
456
+ ListConnected.generateQueryOptions = SingleList.generateQueryOptions;
457
+ ListConnected.hasInternalComponent = SingleList.hasInternalComponent;
458
+ // Add componentType for SSR
459
+ ListConnected.componentType = componentTypes.singleList;
450
460
  ListConnected.install = function (Vue) {
451
461
  Vue.component(ListConnected.name, ListConnected);
452
462
  };
453
463
 
454
- // Add componentType for SSR
455
- ListConnected.componentType = componentTypes.singleList;
456
-
457
464
  export default ListConnected;
458
465
  export { ListConnected };