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

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 +6388 -5403
  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 +341 -391
  11. package/dist/cjs/{DropDown-c66be1a8.js → DropDown-c46d8b0c.js} +80 -95
  12. package/dist/cjs/DynamicRangeSlider.js +81 -25
  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 +71 -46
  18. package/dist/cjs/MultiList.js +49 -29
  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 +80 -36
  25. package/dist/cjs/ReactiveGoogleMap.js +326 -235
  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 +70 -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-d44a0a21.js} +87 -13
  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-bbb717bc.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-4edaa621.js} +79 -94
  52. package/dist/es/DynamicRangeSlider.js +81 -25
  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 +71 -46
  58. package/dist/es/MultiList.js +49 -29
  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 +80 -36
  65. package/dist/es/ReactiveGoogleMap.js +326 -235
  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 +70 -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-5daa8276.js} +84 -14
  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,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,
@@ -73,12 +75,21 @@ var SingleDropdownList = {
73
75
  showMissing: VueTypes.bool.def(false),
74
76
  missingLabel: VueTypes.string.def('N/A'),
75
77
  showSearch: VueTypes.bool.def(false),
78
+ showClear: VueTypes.bool.def(false),
76
79
  showLoadMore: VueTypes.bool.def(false),
77
80
  loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
78
- nestedField: types.string
81
+ nestedField: types.string,
82
+ index: VueTypes.string,
83
+ searchPlaceholder: VueTypes.string.def('Type here to search...')
79
84
  },
80
85
  created: function created() {
81
- // Set custom and default queries in store
86
+ if (!this.enableAppbase && this.$props.index) {
87
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
88
+ }
89
+
90
+ var props = this.$props;
91
+ this.modifiedOptions = this.options && this.options[props.dataField] ? this.options[props.dataField].buckets : []; // Set custom and default queries in store
92
+
82
93
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
83
94
  updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
84
95
  },
@@ -97,33 +108,35 @@ var SingleDropdownList = {
97
108
  options: function options(newVal, oldVal) {
98
109
  var _this = this;
99
110
 
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
111
+ if (newVal) {
112
+ checkPropChange(oldVal, newVal, function () {
113
+ var _this$$props = _this.$props,
114
+ showLoadMore = _this$$props.showLoadMore,
115
+ dataField = _this$$props.dataField;
116
+ var modifiedOptions = _this.$data.modifiedOptions;
117
+
118
+ if (showLoadMore) {
119
+ // append options with showLoadMore
120
+ var buckets = newVal[dataField].buckets;
121
+ var nextOptions = [].concat(modifiedOptions, buckets.map(function (bucket) {
122
+ return {
123
+ key: bucket.key[dataField],
124
+ doc_count: bucket.doc_count
125
+ };
126
+ }));
127
+ var after = newVal[dataField].after_key; // detect the last bucket by checking if the next set of buckets were empty
128
+
129
+ var isLastBucket = !buckets.length;
130
+ _this.after = {
131
+ after: after
113
132
  };
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
- });
133
+ _this.isLastBucket = isLastBucket;
134
+ _this.modifiedOptions = nextOptions;
135
+ } else {
136
+ _this.modifiedOptions = newVal[_this.$props.dataField] ? newVal[_this.$props.dataField].buckets : [];
137
+ }
138
+ });
139
+ }
127
140
  },
128
141
  size: function size() {
129
142
  this.updateQueryOptions(this.$props);
@@ -172,12 +185,21 @@ var SingleDropdownList = {
172
185
  var renderItemCalc = this.$scopedSlots.renderItem || renderItem;
173
186
  var renderErrorCalc = this.$scopedSlots.renderError || renderError;
174
187
  var renderLabelCalc = this.$scopedSlots.renderLabel || renderLabel;
188
+ var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
175
189
 
176
190
  if (renderErrorCalc && this.error) {
177
191
  return isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
178
192
  }
179
193
 
180
- if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0) {
194
+ if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
195
+ if (renderNoResults && isFunction(renderNoResults)) {
196
+ return h("div", [renderNoResults()]);
197
+ }
198
+
199
+ if (renderNoResults && !isFunction(renderNoResults)) {
200
+ return renderNoResults;
201
+ }
202
+
181
203
  return null;
182
204
  }
183
205
 
@@ -197,7 +219,7 @@ var SingleDropdownList = {
197
219
  "items": [].concat(selectAll, this.$data.modifiedOptions.filter(function (item) {
198
220
  return String(item.key).trim().length;
199
221
  }).map(function (item) {
200
- return _extends(_extends({}, item), {}, {
222
+ return _extends({}, item, {
201
223
  key: String(item.key)
202
224
  });
203
225
  })),
@@ -212,6 +234,8 @@ var SingleDropdownList = {
212
234
  "renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
213
235
  "themePreset": this.themePreset,
214
236
  "showSearch": this.$props.showSearch,
237
+ "showClear": this.$props.showClear,
238
+ "searchPlaceholder": this.$props.searchPlaceholder,
215
239
  "transformData": this.$props.transformData,
216
240
  "footer": showLoadMore && !isLastBucket && h("div", {
217
241
  "attrs": {
@@ -271,7 +295,7 @@ var SingleDropdownList = {
271
295
  updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
272
296
  }
273
297
 
274
- this.setQueryOptions(this.internalComponent, defaultQueryOptions);
298
+ this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
275
299
  this.updateQuery({
276
300
  componentId: this.internalComponent,
277
301
  query: query,
@@ -292,7 +316,7 @@ var SingleDropdownList = {
292
316
  updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
293
317
  }
294
318
 
295
- this.setQueryOptions(props.componentId, customQueryOptions);
319
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
296
320
  this.updateQuery({
297
321
  componentId: props.componentId,
298
322
  query: query,
@@ -327,7 +351,7 @@ var SingleDropdownList = {
327
351
  if (props.defaultQuery) {
328
352
  var value = this.$data.currentValue;
329
353
  var defaultQueryOptions = getOptionsFromQuery(props.defaultQuery(value, props));
330
- this.setQueryOptions(this.internalComponent, _extends(_extends({}, queryOptions), defaultQueryOptions));
354
+ this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
331
355
  } else {
332
356
  this.setQueryOptions(this.internalComponent, queryOptions);
333
357
  }
@@ -426,7 +450,8 @@ var mapStateToProps = function mapStateToProps(state, props) {
426
450
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || '',
427
451
  themePreset: state.config.themePreset,
428
452
  error: state.error[props.componentId],
429
- componentProps: state.props[props.componentId]
453
+ componentProps: state.props[props.componentId],
454
+ enableAppbase: state.config.enableAppbase
430
455
  };
431
456
  };
432
457
 
@@ -1,20 +1,21 @@
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 { t as types } from './vueTypes-98d938a9.js';
8
+ import { t as types } from './vueTypes-9326e0be.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, g as getComponent, l as isEvent, h as hasCustomRenderer, c as connect } from './index-1fe91a0a.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-d0b21b95.js';
13
- import { T as Title } from './Title-22c2f3bf.js';
14
- import { I as Input } from './Input-dfd9dd40.js';
15
- import { C as Container } from './Container-f5efec9e.js';
16
- import { U as UL, R as Radio } from './FormControlList-b96aebef.js';
17
- import { g as getAggsQuery } from './utils-ce3d86fd.js';
11
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, n as isEvent, h as hasCustomRenderer, c as connect } from './index-5daa8276.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
13
+ import { T as Title } from './Title-579f8d6c.js';
14
+ import { I as Input } from './Input-d8519224.js';
15
+ import { C as Container } from './Container-4383c6f0.js';
16
+ import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
17
+ import { U as UL, R as Radio } from './FormControlList-fe389a2e.js';
18
+ import { g as getAggsQuery } from './utils-3a32e13f.js';
18
19
 
19
20
  var updateQuery = Actions.updateQuery,
20
21
  setQueryOptions = Actions.setQueryOptions,
@@ -29,7 +30,7 @@ var SingleList = {
29
30
  name: 'SingleList',
30
31
  props: {
31
32
  beforeValueChange: types.func,
32
- className: types.string.def(''),
33
+ className: VueTypes.string.def(''),
33
34
  componentId: types.stringRequired,
34
35
  customQuery: types.func,
35
36
  dataField: types.stringRequired,
@@ -49,27 +50,34 @@ var SingleList = {
49
50
  showFilter: VueTypes.bool.def(true),
50
51
  showRadio: VueTypes.bool.def(true),
51
52
  showSearch: VueTypes.bool.def(true),
52
- size: VueTypes.number.def(100),
53
+ size: VueTypes.number,
53
54
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
54
55
  title: types.title,
55
56
  URLParams: VueTypes.bool.def(false),
56
57
  showMissing: VueTypes.bool.def(false),
57
58
  missingLabel: VueTypes.string.def('N/A'),
58
59
  nestedField: types.string,
60
+ index: VueTypes.string,
59
61
  enableStrictSelection: VueTypes.bool.def(false)
60
62
  },
61
63
  data: function data() {
62
64
  var props = this.$props;
63
65
  this.__state = {
64
66
  currentValue: '',
65
- modifiedOptions: props.options && props.options[props.dataField] ? props.options[props.dataField].buckets : [],
67
+ modifiedOptions: [],
66
68
  searchTerm: ''
67
69
  };
68
70
  this.internalComponent = props.componentId + "__internal";
69
71
  return this.__state;
70
72
  },
71
73
  created: function created() {
72
- // Set custom and default queries in store
74
+ if (!this.enableAppbase && this.$props.index) {
75
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
76
+ }
77
+
78
+ var props = this.$props;
79
+ this.modifiedOptions = this.options && this.options[props.dataField] ? this.options[props.dataField].buckets : []; // Set custom and default queries in store
80
+
73
81
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
74
82
  updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
75
83
  },
@@ -86,7 +94,9 @@ var SingleList = {
86
94
  },
87
95
  watch: {
88
96
  options: function options(newVal) {
89
- this.modifiedOptions = newVal[this.$props.dataField] ? newVal[this.$props.dataField].buckets : [];
97
+ if (newVal) {
98
+ this.modifiedOptions = newVal[this.$props.dataField] ? newVal[this.$props.dataField].buckets : [];
99
+ }
90
100
  },
91
101
  size: function size() {
92
102
  this.updateQueryHandlerOptions(this.$props);
@@ -129,8 +139,7 @@ var SingleList = {
129
139
  var _this$$props = this.$props,
130
140
  selectAllLabel = _this$$props.selectAllLabel,
131
141
  renderItem = _this$$props.renderItem,
132
- renderError = _this$$props.renderError,
133
- enableStrictSelection = _this$$props.enableStrictSelection;
142
+ renderError = _this$$props.renderError;
134
143
  var renderItemCalc = this.$scopedSlots.renderItem || renderItem;
135
144
  var renderErrorCalc = this.$scopedSlots.renderError || renderError;
136
145
 
@@ -138,8 +147,12 @@ var SingleList = {
138
147
  return isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
139
148
  }
140
149
 
141
- if (!this.hasCustomRenderer && this.modifiedOptions.length === 0) {
142
- return null;
150
+ if (!this.hasCustomRenderer && this.modifiedOptions.length === 0 && !this.isLoading) {
151
+ if (this.renderNoResult) {
152
+ this.renderNoResult();
153
+ } else {
154
+ return null;
155
+ }
143
156
  }
144
157
 
145
158
  var itemsToRender = this.$data.modifiedOptions;
@@ -151,7 +164,7 @@ var SingleList = {
151
164
  var filteredItemsToRender = itemsToRender.filter(function (item) {
152
165
  if (String(item.key).length) {
153
166
  if (_this.$props.showSearch && _this.$data.searchTerm) {
154
- return String(item.key).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
167
+ return replaceDiacritics(String(item.key)).toLowerCase().includes(replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
155
168
  }
156
169
 
157
170
  return true;
@@ -203,9 +216,7 @@ var SingleList = {
203
216
  "show": _this.$props.showRadio
204
217
  },
205
218
  "on": {
206
- "click": _this.$data.currentValue === String(item.key) && enableStrictSelection ? function () {
207
- return false;
208
- } : _this.handleClick
219
+ "click": _this.handleClick
209
220
  },
210
221
  "domProps": _extends({}, {
211
222
  checked: _this.currentValue === String(item.key)
@@ -266,7 +277,7 @@ var SingleList = {
266
277
  updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
267
278
  }
268
279
 
269
- this.setQueryOptions(this.internalComponent, defaultQueryOptions);
280
+ this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
270
281
  this.updateQuery({
271
282
  componentId: this.internalComponent,
272
283
  query: query,
@@ -287,7 +298,7 @@ var SingleList = {
287
298
  updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
288
299
  }
289
300
 
290
- this.setQueryOptions(props.componentId, customQueryOptions);
301
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
291
302
  this.updateQuery({
292
303
  componentId: props.componentId,
293
304
  query: query,
@@ -308,7 +319,7 @@ var SingleList = {
308
319
  if (props.defaultQuery) {
309
320
  var value = this.$data.currentValue;
310
321
  var defaultQueryOptions = getOptionsFromQuery(props.defaultQuery(value, props));
311
- this.setQueryOptions(this.internalComponent, _extends(_extends({}, queryOptions), defaultQueryOptions));
322
+ this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
312
323
  } else {
313
324
  this.setQueryOptions(this.internalComponent, queryOptions);
314
325
  }
@@ -367,6 +378,10 @@ var SingleList = {
367
378
  currentValue = e.target.value;
368
379
  }
369
380
 
381
+ if (this.enableStrictSelection && currentValue === this.currentValue) {
382
+ return false;
383
+ }
384
+
370
385
  var value = this.$props.value;
371
386
 
372
387
  if (value === undefined) {
@@ -374,6 +389,8 @@ var SingleList = {
374
389
  } else {
375
390
  this.$emit('change', currentValue);
376
391
  }
392
+
393
+ return true;
377
394
  },
378
395
  renderNoResult: function renderNoResult() {
379
396
  var h = this.$createElement;
@@ -454,7 +471,8 @@ var mapStateToProps = function mapStateToProps(state, props) {
454
471
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || '',
455
472
  themePreset: state.config.themePreset,
456
473
  error: state.error[props.componentId],
457
- componentProps: state.props[props.componentId]
474
+ componentProps: state.props[props.componentId],
475
+ enableAppbase: state.config.enableAppbase
458
476
  };
459
477
  };
460
478
 
@@ -1,18 +1,18 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-c9fbe19f.js';
2
+ import './_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 { t as types } from './vueTypes-98d938a9.js';
8
+ import { t as types } from './vueTypes-9326e0be.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-1fe91a0a.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-d0b21b95.js';
13
- import { T as Title } from './Title-22c2f3bf.js';
14
- import { C as Container } from './Container-f5efec9e.js';
15
- import { U as UL, R as Radio } from './FormControlList-b96aebef.js';
11
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-5daa8276.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
13
+ import { T as Title } from './Title-579f8d6c.js';
14
+ import { C as Container } from './Container-4383c6f0.js';
15
+ import { U as UL, R as Radio } from './FormControlList-fe389a2e.js';
16
16
 
17
17
  var updateQuery = Actions.updateQuery,
18
18
  setQueryOptions = Actions.setQueryOptions,
@@ -46,10 +46,15 @@ var SingleRange = {
46
46
  showRadio: VueTypes.bool.def(true),
47
47
  title: types.title,
48
48
  URLParams: VueTypes.bool.def(false),
49
- nestedField: types.string
49
+ nestedField: types.string,
50
+ index: VueTypes.string
50
51
  },
51
52
  created: function created() {
52
- // Set custom query in store
53
+ if (!this.enableAppbase && this.$props.index) {
54
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
55
+ } // Set custom query in store
56
+
57
+
53
58
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
54
59
  },
55
60
  beforeMount: function beforeMount() {
@@ -155,7 +160,7 @@ var SingleRange = {
155
160
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
156
161
  }
157
162
 
158
- this.setQueryOptions(props.componentId, customQueryOptions);
163
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
159
164
  this.updateQuery({
160
165
  componentId: props.componentId,
161
166
  query: query,
@@ -216,7 +221,8 @@ SingleRange.defaultQuery = function (value, props) {
216
221
  var mapStateToProps = function mapStateToProps(state, props) {
217
222
  return {
218
223
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
219
- componentProps: state.props[props.componentId]
224
+ componentProps: state.props[props.componentId],
225
+ enableAppbase: state.config.enableAppbase
220
226
  };
221
227
  };
222
228