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

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 +8107 -7501
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-d2f1aeda.js +68 -0
  6. package/dist/cjs/{DownShift-b09da079.js → CancelSvg-82021d23.js} +60 -16
  7. package/dist/cjs/Card-4b915733.js +30 -0
  8. package/dist/cjs/{ComponentWrapper-5a0a8849.js → ComponentWrapper-7302fe1a.js} +40 -21
  9. package/dist/cjs/{Container-f84e72fc.js → Container-8a08d663.js} +3 -11
  10. package/dist/cjs/DataSearch.js +354 -398
  11. package/dist/cjs/{DropDown-c66be1a8.js → DropDown-c46d8b0c.js} +80 -95
  12. package/dist/cjs/DynamicRangeSlider.js +107 -42
  13. package/dist/cjs/Flex-699639d2.js +52 -0
  14. package/dist/cjs/FormControlList-73497794.js +47 -0
  15. package/dist/cjs/Input-c6f181d5.js +79 -0
  16. package/dist/cjs/ListItem-933c27e4.js +46 -0
  17. package/dist/cjs/MultiDropdownList.js +101 -65
  18. package/dist/cjs/MultiList.js +79 -47
  19. package/dist/cjs/MultiRange.js +20 -14
  20. package/dist/cjs/{Pagination-91df3b77.js → Pagination-1b2320a7.js} +4 -3
  21. package/dist/cjs/RangeInput.js +29 -45
  22. package/dist/cjs/RangeSlider.js +31 -28
  23. package/dist/cjs/ReactiveBase.js +55 -34
  24. package/dist/cjs/ReactiveComponent.js +72 -58
  25. package/dist/cjs/ReactiveGoogleMap.js +326 -235
  26. package/dist/cjs/ReactiveList.js +188 -241
  27. package/dist/cjs/ResultCard.js +8 -6
  28. package/dist/cjs/ResultList.js +8 -6
  29. package/dist/cjs/SelectedFilters.js +25 -12
  30. package/dist/cjs/SingleDropdownList.js +87 -57
  31. package/dist/cjs/SingleList.js +60 -37
  32. package/dist/cjs/SingleRange.js +17 -11
  33. package/dist/cjs/StateProvider.js +11 -7
  34. package/dist/cjs/{Title-e9beb554.js → Title-39765ee6.js} +3 -11
  35. package/dist/cjs/ToggleButton.js +35 -16
  36. package/dist/cjs/{_rollupPluginBabelHelpers-280a574c.js → _rollupPluginBabelHelpers-4abdbfff.js} +11 -1
  37. package/dist/cjs/{index-e0583d76.js → index-d44a0a21.js} +87 -13
  38. package/dist/cjs/index.js +23 -19
  39. package/dist/cjs/initReactivesearch.js +187 -104
  40. package/dist/cjs/install.js +20 -18
  41. package/dist/cjs/ssr-c333c82c.js +39 -0
  42. package/dist/cjs/{utils-d1ea9f95.js → utils-23afb20b.js} +2 -2
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-6de9d2a9.js} +9 -4
  45. package/dist/es/Button-799185e2.js +59 -0
  46. package/dist/es/{DownShift-d8f2500f.js → CancelSvg-4d9e0857.js} +56 -17
  47. package/dist/es/Card-04b3c33e.js +23 -0
  48. package/dist/es/{ComponentWrapper-d0b21b95.js → ComponentWrapper-bbb717bc.js} +40 -21
  49. package/dist/es/Container-4383c6f0.js +10 -0
  50. package/dist/es/DataSearch.js +352 -396
  51. package/dist/es/{DropDown-5dbd69c2.js → DropDown-4edaa621.js} +79 -94
  52. package/dist/es/DynamicRangeSlider.js +107 -42
  53. package/dist/es/Flex-aac91505.js +47 -0
  54. package/dist/es/FormControlList-fe389a2e.js +40 -0
  55. package/dist/es/Input-d8519224.js +71 -0
  56. package/dist/es/ListItem-bdb6d53d.js +39 -0
  57. package/dist/es/MultiDropdownList.js +101 -65
  58. package/dist/es/MultiList.js +79 -47
  59. package/dist/es/MultiRange.js +20 -14
  60. package/dist/es/{Pagination-800af44f.js → Pagination-b3e4054a.js} +4 -3
  61. package/dist/es/RangeInput.js +29 -45
  62. package/dist/es/RangeSlider.js +31 -28
  63. package/dist/es/ReactiveBase.js +55 -34
  64. package/dist/es/ReactiveComponent.js +72 -58
  65. package/dist/es/ReactiveGoogleMap.js +326 -235
  66. package/dist/es/ReactiveList.js +188 -241
  67. package/dist/es/ResultCard.js +8 -6
  68. package/dist/es/ResultList.js +8 -6
  69. package/dist/es/SelectedFilters.js +25 -12
  70. package/dist/es/SingleDropdownList.js +87 -57
  71. package/dist/es/SingleList.js +60 -37
  72. package/dist/es/SingleRange.js +17 -11
  73. package/dist/es/StateProvider.js +11 -7
  74. package/dist/es/Title-579f8d6c.js +10 -0
  75. package/dist/es/ToggleButton.js +35 -16
  76. package/dist/es/{_rollupPluginBabelHelpers-c9fbe19f.js → _rollupPluginBabelHelpers-ecf6c03c.js} +11 -1
  77. package/dist/es/{index-1fe91a0a.js → index-5daa8276.js} +84 -14
  78. package/dist/es/index.js +23 -19
  79. package/dist/es/initReactivesearch.js +188 -105
  80. package/dist/es/install.js +20 -18
  81. package/dist/es/ssr-e3196de1.js +33 -0
  82. package/dist/es/{utils-ce3d86fd.js → utils-3a32e13f.js} +2 -2
  83. package/dist/es/version.js +1 -1
  84. package/dist/es/{vueTypes-98d938a9.js → vueTypes-9326e0be.js} +9 -4
  85. package/package.json +7 -5
  86. package/dist/cjs/Button-78d8bc26.js +0 -146
  87. package/dist/cjs/Card-b4af314f.js +0 -58
  88. package/dist/cjs/Flex-737c55be.js +0 -160
  89. package/dist/cjs/FormControlList-08dfb28e.js +0 -105
  90. package/dist/cjs/Input-643d02a7.js +0 -178
  91. package/dist/cjs/ListItem-0c58c5d2.js +0 -84
  92. package/dist/cjs/ssr-b7a729f9.js +0 -47
  93. package/dist/es/Button-6c71c66e.js +0 -137
  94. package/dist/es/Card-ecf70ba1.js +0 -51
  95. package/dist/es/Container-f5efec9e.js +0 -18
  96. package/dist/es/Flex-40a74d8a.js +0 -155
  97. package/dist/es/FormControlList-b96aebef.js +0 -98
  98. package/dist/es/Input-dfd9dd40.js +0 -170
  99. package/dist/es/ListItem-da73bc7d.js +0 -77
  100. package/dist/es/Title-22c2f3bf.js +0 -18
  101. package/dist/es/ssr-2f57791d.js +0 -41
@@ -1,12 +1,12 @@
1
- import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-c9fbe19f.js';
1
+ import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
2
  import VueTypes from 'vue-types';
3
3
  import 'emotion';
4
4
  import '@appbaseio/vue-emotion';
5
5
  import 'polished';
6
- import { t as types } from './vueTypes-98d938a9.js';
6
+ import { t as types } from './vueTypes-9326e0be.js';
7
7
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
8
- import { T as Title } from './Title-22c2f3bf.js';
9
- import { I as Image, C as Card } from './Card-ecf70ba1.js';
8
+ import { T as Title } from './Title-579f8d6c.js';
9
+ import { I as Image, C as Card } from './Card-04b3c33e.js';
10
10
 
11
11
  var ResultCardTitle = {
12
12
  name: 'ResultCardTitle',
@@ -21,6 +21,7 @@ ResultCardTitle.install = function (Vue) {
21
21
  Vue.component(ResultCardTitle.name, ResultCardTitle);
22
22
  };
23
23
 
24
+ var _excluded = ["src"];
24
25
  var ResultCardImage = {
25
26
  name: 'ResultCardImage',
26
27
  props: {
@@ -31,7 +32,7 @@ var ResultCardImage = {
31
32
 
32
33
  var _this$$props = this.$props,
33
34
  src = _this$$props.src,
34
- props = _objectWithoutPropertiesLoose(_this$$props, ["src"]);
35
+ props = _objectWithoutPropertiesLoose(_this$$props, _excluded);
35
36
 
36
37
  return h(Image, _mergeJSXProps([{
37
38
  "style": {
@@ -60,6 +61,7 @@ ResultCardDescription.install = function (Vue) {
60
61
  Vue.component(ResultCardDescription.name, ResultCardDescription);
61
62
  };
62
63
 
64
+ var _excluded$1 = ["href", "target"];
63
65
  var ResultCard = {
64
66
  name: 'ResultCard',
65
67
  components: {
@@ -78,7 +80,7 @@ var ResultCard = {
78
80
  var _this$$props = this.$props,
79
81
  href = _this$$props.href,
80
82
  target = _this$$props.target,
81
- rest = _objectWithoutPropertiesLoose(_this$$props, ["href", "target"]);
83
+ rest = _objectWithoutPropertiesLoose(_this$$props, _excluded$1);
82
84
 
83
85
  return h(Card, _mergeJSXProps([{
84
86
  "attrs": {
@@ -1,12 +1,12 @@
1
- import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-c9fbe19f.js';
1
+ import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
2
  import VueTypes from 'vue-types';
3
3
  import 'emotion';
4
4
  import '@appbaseio/vue-emotion';
5
5
  import 'polished';
6
- import { t as types } from './vueTypes-98d938a9.js';
6
+ import { t as types } from './vueTypes-9326e0be.js';
7
7
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
8
- import { T as Title } from './Title-22c2f3bf.js';
9
- import { I as Image, L as ListItem } from './ListItem-da73bc7d.js';
8
+ import { T as Title } from './Title-579f8d6c.js';
9
+ import { I as Image, L as ListItem } from './ListItem-bdb6d53d.js';
10
10
 
11
11
  var ResultListContent = {
12
12
  name: 'ResultListContent',
@@ -38,6 +38,7 @@ ResultListDescription.install = function (Vue) {
38
38
  Vue.component(ResultListDescription.name, ResultListDescription);
39
39
  };
40
40
 
41
+ var _excluded = ["src", "small"];
41
42
  var ResultListImage = {
42
43
  name: 'ResultListImage',
43
44
  props: {
@@ -50,7 +51,7 @@ var ResultListImage = {
50
51
  var _this$$props = this.$props,
51
52
  src = _this$$props.src,
52
53
  small = _this$$props.small,
53
- props = _objectWithoutPropertiesLoose(_this$$props, ["src", "small"]);
54
+ props = _objectWithoutPropertiesLoose(_this$$props, _excluded);
54
55
 
55
56
  return h(Image, _mergeJSXProps([{
56
57
  "attrs": {
@@ -78,6 +79,7 @@ ResultListTitle.install = function (Vue) {
78
79
  Vue.component(ResultListTitle.name, ResultListTitle);
79
80
  };
80
81
 
82
+ var _excluded$1 = ["href", "target"];
81
83
  var ResultList = {
82
84
  name: 'ResultList',
83
85
  props: {
@@ -117,7 +119,7 @@ var ResultList = {
117
119
  var _this$$props = this.$props,
118
120
  href = _this$$props.href,
119
121
  target = _this$$props.target,
120
- props = _objectWithoutPropertiesLoose(_this$$props, ["href", "target"]);
122
+ props = _objectWithoutPropertiesLoose(_this$$props, _excluded$1);
121
123
 
122
124
  var hasImage = this.hasImage,
123
125
  isSmall = this.isSmall;
@@ -1,19 +1,20 @@
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 '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { f as filters, B as Button } from './Button-6c71c66e.js';
9
- import { t as types } from './vueTypes-98d938a9.js';
8
+ import { f as filters, B as Button } from './Button-799185e2.js';
9
+ import { t as types } from './vueTypes-9326e0be.js';
10
10
  import 'redux';
11
- import { c as connect } from './index-1fe91a0a.js';
12
- import { T as Title } from './Title-22c2f3bf.js';
13
- import { C as Container } from './Container-f5efec9e.js';
11
+ import { c as connect } from './index-5daa8276.js';
12
+ import { T as Title } from './Title-579f8d6c.js';
13
+ import { C as Container } from './Container-4383c6f0.js';
14
14
 
15
15
  var setValue = Actions.setValue,
16
- clearValues = Actions.clearValues;
16
+ clearValues = Actions.clearValues,
17
+ resetValuesToDefault = Actions.resetValuesToDefault;
17
18
  var getClassName = helper.getClassName,
18
19
  handleA11yAction = helper.handleA11yAction;
19
20
  var SelectedFilters = {
@@ -23,7 +24,9 @@ var SelectedFilters = {
23
24
  clearAllLabel: VueTypes.string.def('Clear All'),
24
25
  innerClass: types.style,
25
26
  showClearAll: VueTypes.bool.def(true),
26
- title: types.title
27
+ title: types.title,
28
+ resetToDefault: VueTypes.bool.def(false),
29
+ resetToValues: VueTypes.object
27
30
  },
28
31
  inject: {
29
32
  theme: {
@@ -40,7 +43,8 @@ var SelectedFilters = {
40
43
  components: this.components,
41
44
  selectedValues: this.selectedValues,
42
45
  clearValues: this.clearValues,
43
- setValue: this.setValue
46
+ setValue: this.setValue,
47
+ resetValuesToDefault: this.resetValuesToDefault
44
48
  });
45
49
  }
46
50
 
@@ -75,8 +79,16 @@ var SelectedFilters = {
75
79
  this.$emit('clear', component, value);
76
80
  },
77
81
  clearValues: function clearValues() {
78
- this.clearValuesAction();
79
- this.$emit('clear', null);
82
+ var resetToDefault = this.resetToDefault,
83
+ resetToValues = this.resetToValues;
84
+
85
+ if (resetToDefault) {
86
+ this.resetValuesToDefault();
87
+ } else {
88
+ this.clearValuesAction(resetToValues);
89
+ }
90
+
91
+ this.$emit('clear', resetToValues);
80
92
  },
81
93
  renderValue: function renderValue(value, isArray) {
82
94
  var _this2 = this;
@@ -156,7 +168,8 @@ var mapStateToProps = function mapStateToProps(state) {
156
168
 
157
169
  var mapDispatchtoProps = {
158
170
  clearValuesAction: clearValues,
159
- setValue: setValue
171
+ setValue: setValue,
172
+ resetValuesToDefault: resetValuesToDefault
160
173
  };
161
174
  var RcConnected = connect(mapStateToProps, mapDispatchtoProps)(SelectedFilters);
162
175
 
@@ -1,23 +1,25 @@
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 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { l as loadMoreContainer, B as Button } from './Button-6c71c66e.js';
9
- import { t as types } from './vueTypes-98d938a9.js';
8
+ import { l as loadMoreContainer, B as Button } from './Button-799185e2.js';
9
+ import { t as types } from './vueTypes-9326e0be.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, g as getComponent, h as hasCustomRenderer, c as connect } from './index-1fe91a0a.js';
13
- import { C as ComponentWrapper } from './ComponentWrapper-d0b21b95.js';
14
- import { T as Title } from './Title-22c2f3bf.js';
15
- import './Input-dfd9dd40.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-5daa8276.js';
13
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
14
+ import '@vue/babel-helper-vue-jsx-merge-props';
15
+ import { T as Title } from './Title-579f8d6c.js';
16
+ import './CancelSvg-4d9e0857.js';
17
+ import './Input-d8519224.js';
16
18
  import 'compute-scroll-into-view';
17
- import './DownShift-d8f2500f.js';
18
- import { C as Container } from './Container-f5efec9e.js';
19
- import { g as getAggsQuery } from './utils-ce3d86fd.js';
20
- import { D as Dropdown } from './DropDown-5dbd69c2.js';
19
+ import { C as Container } from './Container-4383c6f0.js';
20
+ import '@appbaseio/reactivecore/lib/utils/suggestions';
21
+ import { g as getAggsQuery } from './utils-3a32e13f.js';
22
+ import { D as Dropdown } from './DropDown-4edaa621.js';
21
23
 
22
24
  var updateQuery = Actions.updateQuery,
23
25
  setQueryOptions = Actions.setQueryOptions,
@@ -27,9 +29,10 @@ var getQueryOptions = helper.getQueryOptions,
27
29
  checkValueChange = helper.checkValueChange,
28
30
  checkPropChange = helper.checkPropChange,
29
31
  getClassName = helper.getClassName,
30
- getOptionsFromQuery = helper.getOptionsFromQuery,
31
32
  isEqual = helper.isEqual,
32
- getCompositeAggsQuery = helper.getCompositeAggsQuery;
33
+ getCompositeAggsQuery = helper.getCompositeAggsQuery,
34
+ extractQueryFromCustomQuery = helper.extractQueryFromCustomQuery,
35
+ getOptionsForCustomQuery = helper.getOptionsForCustomQuery;
33
36
  var SingleDropdownList = {
34
37
  name: 'SingleDropdownList',
35
38
  data: function data() {
@@ -66,19 +69,28 @@ var SingleDropdownList = {
66
69
  selectAllLabel: types.string,
67
70
  showCount: VueTypes.bool.def(true),
68
71
  showFilter: VueTypes.bool.def(true),
69
- size: VueTypes.number.def(100),
72
+ size: VueTypes.number,
70
73
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
71
74
  title: types.title,
72
75
  URLParams: VueTypes.bool.def(false),
73
76
  showMissing: VueTypes.bool.def(false),
74
77
  missingLabel: VueTypes.string.def('N/A'),
75
78
  showSearch: VueTypes.bool.def(false),
79
+ showClear: VueTypes.bool.def(false),
76
80
  showLoadMore: VueTypes.bool.def(false),
77
81
  loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
78
- nestedField: types.string
82
+ nestedField: types.string,
83
+ index: VueTypes.string,
84
+ searchPlaceholder: VueTypes.string.def('Type here to search...')
79
85
  },
80
86
  created: function created() {
81
- // Set custom and default queries in store
87
+ if (!this.enableAppbase && this.$props.index) {
88
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
89
+ }
90
+
91
+ var props = this.$props;
92
+ this.modifiedOptions = this.options && this.options[props.dataField] ? this.options[props.dataField].buckets : []; // Set custom and default queries in store
93
+
82
94
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
83
95
  updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
84
96
  },
@@ -97,33 +109,35 @@ var SingleDropdownList = {
97
109
  options: function options(newVal, oldVal) {
98
110
  var _this = this;
99
111
 
100
- checkPropChange(oldVal, newVal, function () {
101
- var _this$$props = _this.$props,
102
- showLoadMore = _this$$props.showLoadMore,
103
- dataField = _this$$props.dataField;
104
- var modifiedOptions = _this.$data.modifiedOptions;
105
-
106
- if (showLoadMore) {
107
- // append options with showLoadMore
108
- var buckets = newVal[dataField].buckets;
109
- var nextOptions = [].concat(modifiedOptions, buckets.map(function (bucket) {
110
- return {
111
- key: bucket.key[dataField],
112
- doc_count: bucket.doc_count
112
+ if (newVal) {
113
+ checkPropChange(oldVal, newVal, function () {
114
+ var _this$$props = _this.$props,
115
+ showLoadMore = _this$$props.showLoadMore,
116
+ dataField = _this$$props.dataField;
117
+ var modifiedOptions = _this.$data.modifiedOptions;
118
+
119
+ if (showLoadMore) {
120
+ // append options with showLoadMore
121
+ var buckets = newVal[dataField].buckets;
122
+ var nextOptions = [].concat(modifiedOptions, buckets.map(function (bucket) {
123
+ return {
124
+ key: bucket.key[dataField],
125
+ doc_count: bucket.doc_count
126
+ };
127
+ }));
128
+ var after = newVal[dataField].after_key; // detect the last bucket by checking if the next set of buckets were empty
129
+
130
+ var isLastBucket = !buckets.length;
131
+ _this.after = {
132
+ after: after
113
133
  };
114
- }));
115
- var after = newVal[dataField].after_key; // detect the last bucket by checking if the next set of buckets were empty
116
-
117
- var isLastBucket = !buckets.length;
118
- _this.after = {
119
- after: after
120
- };
121
- _this.isLastBucket = isLastBucket;
122
- _this.modifiedOptions = nextOptions;
123
- } else {
124
- _this.modifiedOptions = newVal[_this.$props.dataField] ? newVal[_this.$props.dataField].buckets : [];
125
- }
126
- });
134
+ _this.isLastBucket = isLastBucket;
135
+ _this.modifiedOptions = nextOptions;
136
+ } else {
137
+ _this.modifiedOptions = newVal[_this.$props.dataField] ? newVal[_this.$props.dataField].buckets : [];
138
+ }
139
+ });
140
+ }
127
141
  },
128
142
  size: function size() {
129
143
  this.updateQueryOptions(this.$props);
@@ -172,12 +186,21 @@ var SingleDropdownList = {
172
186
  var renderItemCalc = this.$scopedSlots.renderItem || renderItem;
173
187
  var renderErrorCalc = this.$scopedSlots.renderError || renderError;
174
188
  var renderLabelCalc = this.$scopedSlots.renderLabel || renderLabel;
189
+ var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
175
190
 
176
191
  if (renderErrorCalc && this.error) {
177
192
  return isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
178
193
  }
179
194
 
180
- if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0) {
195
+ if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
196
+ if (renderNoResults && isFunction(renderNoResults)) {
197
+ return h("div", [renderNoResults()]);
198
+ }
199
+
200
+ if (renderNoResults && !isFunction(renderNoResults)) {
201
+ return renderNoResults;
202
+ }
203
+
181
204
  return null;
182
205
  }
183
206
 
@@ -197,7 +220,7 @@ var SingleDropdownList = {
197
220
  "items": [].concat(selectAll, this.$data.modifiedOptions.filter(function (item) {
198
221
  return String(item.key).trim().length;
199
222
  }).map(function (item) {
200
- return _extends(_extends({}, item), {}, {
223
+ return _extends({}, item, {
201
224
  key: String(item.key)
202
225
  });
203
226
  })),
@@ -212,6 +235,8 @@ var SingleDropdownList = {
212
235
  "renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
213
236
  "themePreset": this.themePreset,
214
237
  "showSearch": this.$props.showSearch,
238
+ "showClear": this.$props.showClear,
239
+ "searchPlaceholder": this.$props.searchPlaceholder,
215
240
  "transformData": this.$props.transformData,
216
241
  "footer": showLoadMore && !isLastBucket && h("div", {
217
242
  "attrs": {
@@ -261,17 +286,18 @@ var SingleDropdownList = {
261
286
 
262
287
  if (this.defaultQuery) {
263
288
  var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
289
+ var defaultQueryObj = extractQueryFromCustomQuery(defaultQueryToBeSet);
264
290
 
265
- if (defaultQueryToBeSet.query) {
266
- query = defaultQueryToBeSet.query;
291
+ if (defaultQueryObj) {
292
+ query = defaultQueryObj;
267
293
  }
268
294
 
269
- defaultQueryOptions = getOptionsFromQuery(defaultQueryToBeSet); // Update calculated default query in store
295
+ defaultQueryOptions = getOptionsForCustomQuery(defaultQueryToBeSet); // Update calculated default query in store
270
296
 
271
297
  updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
272
298
  }
273
299
 
274
- this.setQueryOptions(this.internalComponent, defaultQueryOptions);
300
+ this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
275
301
  this.updateQuery({
276
302
  componentId: this.internalComponent,
277
303
  query: query,
@@ -285,14 +311,13 @@ var SingleDropdownList = {
285
311
  var customQueryOptions;
286
312
 
287
313
  if (customQuery) {
288
- var _ref = customQuery(value, props) || {};
289
-
290
- query = _ref.query;
291
- customQueryOptions = getOptionsFromQuery(customQuery(value, props));
314
+ var customQueryCalc = customQuery(value, props);
315
+ query = extractQueryFromCustomQuery(customQueryCalc);
316
+ customQueryOptions = getOptionsForCustomQuery(customQueryCalc);
292
317
  updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
293
318
  }
294
319
 
295
- this.setQueryOptions(props.componentId, customQueryOptions);
320
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
296
321
  this.updateQuery({
297
322
  componentId: props.componentId,
298
323
  query: query,
@@ -326,8 +351,8 @@ var SingleDropdownList = {
326
351
 
327
352
  if (props.defaultQuery) {
328
353
  var value = this.$data.currentValue;
329
- var defaultQueryOptions = getOptionsFromQuery(props.defaultQuery(value, props));
330
- this.setQueryOptions(this.internalComponent, _extends(_extends({}, queryOptions), defaultQueryOptions));
354
+ var defaultQueryOptions = getOptionsForCustomQuery(props.defaultQuery(value, props));
355
+ this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
331
356
  } else {
332
357
  this.setQueryOptions(this.internalComponent, queryOptions);
333
358
  }
@@ -418,6 +443,10 @@ SingleDropdownList.generateQueryOptions = function (props, after) {
418
443
  }) : getAggsQuery(queryOptions, props);
419
444
  };
420
445
 
446
+ SingleDropdownList.hasInternalComponent = function () {
447
+ return true;
448
+ };
449
+
421
450
  var mapStateToProps = function mapStateToProps(state, props) {
422
451
  return {
423
452
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
@@ -426,7 +455,8 @@ var mapStateToProps = function mapStateToProps(state, props) {
426
455
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || '',
427
456
  themePreset: state.config.themePreset,
428
457
  error: state.error[props.componentId],
429
- componentProps: state.props[props.componentId]
458
+ componentProps: state.props[props.componentId],
459
+ enableAppbase: state.config.enableAppbase
430
460
  };
431
461
  };
432
462
 
@@ -438,7 +468,7 @@ var mapDispatchtoProps = {
438
468
  };
439
469
  var ListConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(SingleDropdownList), {
440
470
  componentType: componentTypes.singleDropdownList,
441
- internalComponent: true
471
+ internalComponent: SingleDropdownList.hasInternalComponent()
442
472
  });
443
473
 
444
474
  SingleDropdownList.install = function (Vue) {