@appbaseio/reactivesearch-vue 1.32.4 → 1.33.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 (59) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +2571 -2409
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +14 -9
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/{ComponentWrapper-ad3dad02.js → ComponentWrapper-981ab977.js} +7 -6
  6. package/dist/cjs/{DataSearch-b51a5d0f.js → DataSearch-708b183d.js} +11 -8
  7. package/dist/cjs/DataSearch.js +6 -4
  8. package/dist/cjs/DropDown-c479bbb0.js +1 -1
  9. package/dist/cjs/DynamicRangeSlider.js +5 -3
  10. package/dist/cjs/MultiDropdownList.js +10 -6
  11. package/dist/cjs/MultiList.js +11 -6
  12. package/dist/cjs/MultiRange.js +7 -5
  13. package/dist/cjs/PreferencesConsumer-7be03476.js +80 -0
  14. package/dist/cjs/RangeInput.js +7 -5
  15. package/dist/cjs/RangeSlider.js +6 -5
  16. package/dist/cjs/ReactiveBase.js +6 -4
  17. package/dist/cjs/{install-add725fe.js → ReactiveComponent-5ff98cce.js} +407 -22
  18. package/dist/cjs/ReactiveComponent.js +48 -340
  19. package/dist/cjs/ReactiveGoogleMap.js +6 -5
  20. package/dist/cjs/ReactiveList.js +6 -5
  21. package/dist/cjs/SelectedFilters.js +2 -2
  22. package/dist/cjs/SingleDropdownList.js +10 -6
  23. package/dist/cjs/SingleList.js +12 -6
  24. package/dist/cjs/SingleRange.js +7 -5
  25. package/dist/cjs/StateProvider.js +2 -2
  26. package/dist/cjs/ToggleButton.js +8 -6
  27. package/dist/cjs/{index-6a167fe0.js → index-08f8dfa3.js} +1 -1
  28. package/dist/cjs/index.js +28 -21
  29. package/dist/cjs/initReactivesearch.js +1 -1
  30. package/dist/cjs/install.js +30 -24
  31. package/dist/cjs/version.js +1 -1
  32. package/dist/es/{ComponentWrapper-424e86fd.js → ComponentWrapper-d5e814a4.js} +7 -6
  33. package/dist/es/{DataSearch-c40e26c7.js → DataSearch-5376d39a.js} +11 -9
  34. package/dist/es/DataSearch.js +5 -4
  35. package/dist/es/DropDown-05a644a5.js +1 -1
  36. package/dist/es/DynamicRangeSlider.js +5 -3
  37. package/dist/es/MultiDropdownList.js +10 -6
  38. package/dist/es/MultiList.js +11 -6
  39. package/dist/es/MultiRange.js +7 -5
  40. package/dist/es/PreferencesConsumer-c30605fe.js +78 -0
  41. package/dist/es/RangeInput.js +7 -5
  42. package/dist/es/RangeSlider.js +6 -5
  43. package/dist/es/ReactiveBase.js +6 -4
  44. package/dist/es/{install-5b8c657a.js → ReactiveComponent-ee01562d.js} +418 -33
  45. package/dist/es/ReactiveComponent.js +44 -337
  46. package/dist/es/ReactiveGoogleMap.js +6 -5
  47. package/dist/es/ReactiveList.js +6 -5
  48. package/dist/es/SelectedFilters.js +2 -2
  49. package/dist/es/SingleDropdownList.js +10 -6
  50. package/dist/es/SingleList.js +12 -6
  51. package/dist/es/SingleRange.js +7 -5
  52. package/dist/es/StateProvider.js +2 -2
  53. package/dist/es/ToggleButton.js +8 -6
  54. package/dist/es/{index-7788a843.js → index-99c5f9c9.js} +1 -1
  55. package/dist/es/index.js +14 -13
  56. package/dist/es/initReactivesearch.js +1 -1
  57. package/dist/es/install.js +32 -22
  58. package/dist/es/version.js +1 -1
  59. package/package.json +2 -2
@@ -1,339 +1,46 @@
1
- import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-76660dab.js';
3
- import VueTypes from 'vue-types';
4
- import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
- import { t as types } from './vueTypes-b8146772.js';
1
+ import '@appbaseio/reactivecore';
2
+ import '@appbaseio/reactivecore/lib/utils/constants';
3
+ import './_rollupPluginBabelHelpers-76660dab.js';
4
+ import 'vue-types';
5
+ import '@appbaseio/reactivecore/lib/utils/helper';
6
+ import 'emotion';
7
+ import '@appbaseio/vue-emotion';
8
+ import 'polished';
9
+ import './Button-35aa984e.js';
10
+ import './vueTypes-b8146772.js';
11
+ import './Pagination-af9de08f.js';
12
+ import './ReactiveList.js';
6
13
  import '@appbaseio/reactivecore/lib/utils/transform';
7
14
  import 'redux';
8
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, c as connect } from './index-7788a843.js';
9
- import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
10
-
11
- var _excluded = ["options"];
12
- var updateQuery = Actions.updateQuery,
13
- setQueryOptions = Actions.setQueryOptions,
14
- setCustomQuery = Actions.setCustomQuery,
15
- setDefaultQuery = Actions.setDefaultQuery;
16
- var parseHits = helper.parseHits,
17
- isEqual = helper.isEqual,
18
- getCompositeAggsQuery = helper.getCompositeAggsQuery,
19
- getResultStats = helper.getResultStats,
20
- extractQueryFromCustomQuery = helper.extractQueryFromCustomQuery,
21
- getOptionsForCustomQuery = helper.getOptionsForCustomQuery;
22
- var ReactiveComponent = {
23
- name: 'ReactiveComponent',
24
- props: {
25
- componentId: types.stringRequired,
26
- aggregationField: types.string,
27
- aggregationSize: VueTypes.number,
28
- size: VueTypes.number,
29
- defaultQuery: types.func,
30
- customQuery: types.func,
31
- filterLabel: types.string,
32
- react: types.react,
33
- showFilter: VueTypes.bool.def(true),
34
- URLParams: VueTypes.bool.def(false),
35
- distinctField: types.string,
36
- distinctFieldConfig: types.props,
37
- index: VueTypes.string,
38
- endpoint: types.endpointConfig
39
- },
40
- created: function created() {
41
- var _this = this;
42
-
43
- var props = this.$props;
44
- this.internalComponent = null;
45
- this.$defaultQuery = null; // Set custom query in store
46
-
47
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
48
- var customQuery = props.customQuery,
49
- componentId = props.componentId,
50
- filterLabel = props.filterLabel,
51
- showFilter = props.showFilter,
52
- URLParams = props.URLParams,
53
- distinctField = props.distinctField,
54
- distinctFieldConfig = props.distinctFieldConfig,
55
- index = props.index;
56
-
57
- if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
58
- console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
59
- }
60
-
61
- if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
62
- console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
63
- }
64
-
65
- if (!this.enableAppbase && index) {
66
- console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
67
- }
68
-
69
- if (customQuery) {
70
- var calcCustomQuery = customQuery(this.selectedValue, props);
71
- var query = extractQueryFromCustomQuery(calcCustomQuery);
72
- var customQueryOptions = calcCustomQuery ? getOptionsForCustomQuery(calcCustomQuery) : null;
73
-
74
- if (customQueryOptions) {
75
- this.setQueryOptions(componentId, _extends({}, customQueryOptions, this.getAggsQuery()), false);
76
- } else this.setQueryOptions(componentId, this.getAggsQuery(), false);
77
-
78
- this.updateQuery({
79
- componentId: componentId,
80
- query: query,
81
- value: this.selectedValue || null,
82
- label: filterLabel,
83
- showFilter: showFilter,
84
- URLParams: URLParams
85
- });
86
- }
87
-
88
- this.setQuery = function (_ref) {
89
- var options = _ref.options,
90
- obj = _objectWithoutPropertiesLoose(_ref, _excluded);
91
-
92
- var queryToBeSet = obj.query; // when enableAppbase is true, Backend throws error because of repeated query in request body
93
-
94
- if (queryToBeSet && queryToBeSet.query) {
95
- queryToBeSet = queryToBeSet.query;
96
- }
97
-
98
- var customQueryCalc = _extends({}, options, {
99
- query: queryToBeSet
100
- });
101
-
102
- var rsAPIQuery = customQueryCalc; // handle stored queries
103
-
104
- if (queryToBeSet && queryToBeSet.id) {
105
- rsAPIQuery = queryToBeSet;
106
- } // Update customQuery field for RS API
107
-
108
-
109
- _this.setCustomQuery(props.componentId, rsAPIQuery);
110
-
111
- if (options) {
112
- _this.setQueryOptions(props.componentId, _extends({}, _this.getAggsQuery(), options), false);
113
- }
114
-
115
- _this.updateQuery(_extends({}, obj, {
116
- query: customQueryCalc.query,
117
- componentId: props.componentId,
118
- label: props.filterLabel,
119
- showFilter: props.showFilter,
120
- URLParams: props.URLParams
121
- }));
122
- };
123
-
124
- if (props.defaultQuery) {
125
- this.internalComponent = props.componentId + "__internal";
126
- }
127
-
128
- if (this.internalComponent && this.$props.defaultQuery) {
129
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
130
- this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
131
-
132
- var _query = extractQueryFromCustomQuery(this.$defaultQuery);
133
-
134
- var queryOptions = getOptionsForCustomQuery(this.$defaultQuery);
135
-
136
- if (queryOptions) {
137
- this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
138
- } else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
139
-
140
- this.updateQuery({
141
- componentId: this.internalComponent,
142
- query: _query
143
- });
144
- }
145
- },
146
- watch: {
147
- hits: function hits(newVal, oldVal) {
148
- if (!isEqual(newVal, oldVal)) {
149
- this.$emit('data', this.getData());
150
- }
151
- },
152
- rawData: function rawData(newVal, oldVal) {
153
- if (!isEqual(newVal, oldVal)) {
154
- this.$emit('data', this.getData());
155
- }
156
- },
157
- aggregations: function aggregations(newVal, oldVal) {
158
- if (!isEqual(newVal, oldVal)) {
159
- this.$emit('data', this.getData());
160
- }
161
- },
162
- aggregationData: function aggregationData(newVal, oldVal) {
163
- if (!isEqual(newVal, oldVal)) {
164
- this.$emit('data', this.getData());
165
- }
166
- },
167
- promotedResults: function promotedResults(newVal, oldVal) {
168
- if (!isEqual(newVal, oldVal)) {
169
- this.$emit('data', this.getData());
170
- }
171
- },
172
- hidden: function hidden(newVal, oldVal) {
173
- if (!isEqual(newVal, oldVal)) {
174
- this.$emit('data', this.getData());
175
- }
176
- },
177
- total: function total(newVal, oldVal) {
178
- if (!isEqual(newVal, oldVal)) {
179
- this.$emit('data', this.getData());
180
- }
181
- },
182
- time: function time(newVal, oldVal) {
183
- if (!isEqual(newVal, oldVal)) {
184
- this.$emit('data', this.getData());
185
- }
186
- },
187
- defaultQuery: function defaultQuery(newVal, oldVal) {
188
- if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
189
- this.$defaultQuery = newVal(this.selectedValue, this.$props);
190
- var query = extractQueryFromCustomQuery(this.$defaultQuery);
191
- var queryOptions = getOptionsForCustomQuery(this.$defaultQuery);
192
-
193
- if (queryOptions) {
194
- this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
195
- } else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false); // Update default query for RS API
196
-
197
-
198
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
199
- this.updateQuery({
200
- componentId: this.internalComponent,
201
- query: query
202
- });
203
- }
204
- },
205
- customQuery: function customQuery(newVal, oldVal) {
206
- if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
207
- var componentId = this.$props.componentId;
208
- this.$customQuery = newVal(this.selectedValue, this.$props);
209
- var query = extractQueryFromCustomQuery(this.$customQuery);
210
- var queryOptions = getOptionsForCustomQuery(this.$customQuery);
211
-
212
- if (queryOptions) {
213
- this.setQueryOptions(componentId, _extends({}, queryOptions, this.getAggsQuery()), false);
214
- } else this.setQueryOptions(componentId, this.getAggsQuery(), false); // Update custom query for RS API
215
-
216
-
217
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
218
- this.updateQuery({
219
- componentId: componentId,
220
- query: query
221
- });
222
- }
223
- }
224
- },
225
- render: function render() {
226
- var h = arguments[0];
227
-
228
- try {
229
- var dom = this.$scopedSlots["default"];
230
- var error = this.error,
231
- isLoading = this.isLoading,
232
- selectedValue = this.selectedValue;
233
-
234
- var propsToBePassed = _extends({
235
- error: error,
236
- loading: isLoading
237
- }, this.getData(), {
238
- value: selectedValue,
239
- setQuery: this.setQuery
240
- });
241
-
242
- return h("div", [dom(propsToBePassed)]);
243
- } catch (e) {
244
- return null;
245
- }
246
- },
247
- methods: {
248
- getAggsQuery: function getAggsQuery() {
249
- if (this.aggregationField) {
250
- return {
251
- aggs: getCompositeAggsQuery({
252
- props: this.$props,
253
- showTopHits: true,
254
- value: this.selectedValue
255
- }).aggs
256
- };
257
- }
258
-
259
- return {};
260
- },
261
- getData: function getData() {
262
- var hits = this.hits,
263
- aggregations = this.aggregations,
264
- aggregationData = this.aggregationData,
265
- promotedResults = this.promotedResults,
266
- rawData = this.rawData;
267
- var filteredResults = parseHits(hits);
268
-
269
- if (promotedResults.length) {
270
- var ids = promotedResults.map(function (item) {
271
- return item._id;
272
- }).filter(Boolean);
273
-
274
- if (ids) {
275
- filteredResults = filteredResults.filter(function (item) {
276
- return !ids.includes(item._id);
277
- });
278
- }
279
-
280
- filteredResults = [].concat(promotedResults, filteredResults);
281
- }
282
-
283
- return {
284
- data: filteredResults,
285
- aggregationData: aggregationData,
286
- rawData: rawData,
287
- aggregations: aggregations,
288
- promotedData: promotedResults,
289
- resultStats: this.stats
290
- };
291
- }
292
- },
293
- computed: {
294
- stats: function stats() {
295
- return getResultStats(this);
296
- }
297
- }
298
- };
299
-
300
- ReactiveComponent.hasInternalComponent = function (props) {
301
- return !!props.defaultQuery;
302
- };
303
-
304
- var mapStateToProps = function mapStateToProps(state, props) {
305
- return {
306
- aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
307
- aggregationData: state.compositeAggregations[props.componentId] || [],
308
- hits: state.hits[props.componentId] && state.hits[props.componentId].hits || [],
309
- rawData: state.rawData[props.componentId],
310
- error: state.error[props.componentId],
311
- isLoading: state.isLoading[props.componentId],
312
- selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
313
- promotedResults: state.promotedResults[props.componentId] || [],
314
- time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
315
- total: state.hits[props.componentId] && state.hits[props.componentId].total,
316
- hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
317
- componentProps: state.props[props.componentId],
318
- enableAppbase: state.config.enableAppbase
319
- };
320
- };
321
-
322
- var mapDispatchtoProps = {
323
- setQueryOptions: setQueryOptions,
324
- updateQuery: updateQuery,
325
- setCustomQuery: setCustomQuery,
326
- setDefaultQuery: setDefaultQuery
327
- };
328
- var RcConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(ReactiveComponent), {
329
- componentType: componentTypes.reactiveComponent
330
- });
331
-
332
- ReactiveComponent.install = function (Vue) {
333
- Vue.component(ReactiveComponent.name, RcConnected);
334
- }; // Add componentType for SSR
335
-
336
-
337
- ReactiveComponent.componentType = componentTypes.reactiveComponent;
338
-
339
- export default ReactiveComponent;
15
+ import './index-99c5f9c9.js';
16
+ import './ComponentWrapper-d5e814a4.js';
17
+ import './PreferencesConsumer-c30605fe.js';
18
+ import '@vue/babel-helper-vue-jsx-merge-props';
19
+ import './Title-3342664a.js';
20
+ import './ListItem-cad14c5e.js';
21
+ import './Card-450683f1.js';
22
+ import './Flex-1f0795c3.js';
23
+ import 'hotkeys-js';
24
+ import './DataSearch-5376d39a.js';
25
+ import './CancelSvg-4cfae5fd.js';
26
+ import './Input-7a2a9fac.js';
27
+ import 'compute-scroll-into-view';
28
+ import './Container-ba826e96.js';
29
+ import 'vue-highlight-words';
30
+ export { R as default } from './ReactiveComponent-ee01562d.js';
31
+ import '@appbaseio/reactivecore/lib/utils/suggestions';
32
+ import './FormControlList-c22d64f6.js';
33
+ import './utils-9e68acee.js';
34
+ import './SingleList.js';
35
+ import './MultiList.js';
36
+ import './DropDown-05a644a5.js';
37
+ import './SingleDropdownList.js';
38
+ import './MultiDropdownList.js';
39
+ import './ToggleButton.js';
40
+ import 'vue-no-ssr';
41
+ import './ssr-b2c0b401.js';
42
+ import './DynamicRangeSlider.js';
43
+ import './SingleRange.js';
44
+ import './MultiRange.js';
45
+ import './RangeSlider.js';
46
+ import './RangeInput.js';
@@ -1,7 +1,7 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
+ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
2
3
  import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey, d as _inheritsLoose, _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-76660dab.js';
3
4
  import VueTypes from 'vue-types';
4
- import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import styled, { css } from '@appbaseio/vue-emotion';
7
7
  import 'polished';
@@ -10,8 +10,9 @@ import { t as types } from './vueTypes-b8146772.js';
10
10
  import { P as Pagination } from './Pagination-af9de08f.js';
11
11
  import '@appbaseio/reactivecore/lib/utils/transform';
12
12
  import 'redux';
13
- import { h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, a as isFunction, c as connect } from './index-7788a843.js';
14
- import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
13
+ import { h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, a as isFunction, c as connect } from './index-99c5f9c9.js';
14
+ import { C as ComponentWrapper } from './ComponentWrapper-d5e814a4.js';
15
+ import { P as PreferencesConsumer } from './PreferencesConsumer-c30605fe.js';
15
16
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
16
17
  import { C as Checkbox } from './FormControlList-c22d64f6.js';
17
18
  import GmapVue, { components } from 'gmap-vue';
@@ -879,10 +880,10 @@ var mapDispatchToProps = {
879
880
  recordResultClick: recordResultClick,
880
881
  setMapData: setMapData
881
882
  };
882
- var RMConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchToProps)(ReactiveMap), {
883
+ var RMConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps, mapDispatchToProps)(ReactiveMap), {
883
884
  componentType: componentTypes.reactiveMap,
884
885
  internalComponent: true
885
- });
886
+ }));
886
887
 
887
888
  ReactiveMap.install = function (Vue) {
888
889
  Vue.component(ReactiveMap.name, RMConnected);
@@ -1,7 +1,7 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
+ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
2
3
  import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
4
  import VueTypes from 'vue-types';
4
- import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { withClickIds } from '@appbaseio/reactivecore/lib/utils/helper';
6
6
  import { css } from 'emotion';
7
7
  import styled from '@appbaseio/vue-emotion';
@@ -11,8 +11,9 @@ import { t as types } from './vueTypes-b8146772.js';
11
11
  import { P as Pagination } from './Pagination-af9de08f.js';
12
12
  import '@appbaseio/reactivecore/lib/utils/transform';
13
13
  import 'redux';
14
- import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-7788a843.js';
15
- import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
14
+ import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-99c5f9c9.js';
15
+ import { C as ComponentWrapper } from './ComponentWrapper-d5e814a4.js';
16
+ import { P as PreferencesConsumer } from './PreferencesConsumer-c30605fe.js';
16
17
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
17
18
  import './Title-3342664a.js';
18
19
  import { c as container } from './ListItem-cad14c5e.js';
@@ -1032,10 +1033,10 @@ ReactiveList.hasInternalComponent = function () {
1032
1033
  return true;
1033
1034
  };
1034
1035
 
1035
- var RLConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(ReactiveList), {
1036
+ var RLConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(ReactiveList), {
1036
1037
  componentType: componentTypes.reactiveList,
1037
1038
  internalComponent: ReactiveList.hasInternalComponent()
1038
- });
1039
+ }));
1039
1040
 
1040
1041
  ReactiveList.install = function (Vue) {
1041
1042
  Vue.component(ReactiveList.name, RLConnected);
@@ -1,14 +1,14 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
+ import '@appbaseio/reactivecore/lib/utils/constants';
2
3
  import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
4
  import VueTypes from 'vue-types';
4
- import '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
8
  import { f as filters, B as Button } from './Button-35aa984e.js';
9
9
  import { t as types } from './vueTypes-b8146772.js';
10
10
  import 'redux';
11
- import { n as decodeHtml, c as connect } from './index-7788a843.js';
11
+ import { n as decodeHtml, c as connect } from './index-99c5f9c9.js';
12
12
  import { T as Title } from './Title-3342664a.js';
13
13
  import { C as Container } from './Container-ba826e96.js';
14
14
 
@@ -1,7 +1,7 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
+ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
2
3
  import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
4
  import VueTypes from 'vue-types';
4
- import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
@@ -9,8 +9,9 @@ import { l as loadMoreContainer, B as Button } from './Button-35aa984e.js';
9
9
  import { t as types } from './vueTypes-b8146772.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-7788a843.js';
13
- import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.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-99c5f9c9.js';
13
+ import { C as ComponentWrapper } from './ComponentWrapper-d5e814a4.js';
14
+ import { P as PreferencesConsumer } from './PreferencesConsumer-c30605fe.js';
14
15
  import '@vue/babel-helper-vue-jsx-merge-props';
15
16
  import { T as Title } from './Title-3342664a.js';
16
17
  import './CancelSvg-4cfae5fd.js';
@@ -207,7 +208,8 @@ var SingleDropdownList = {
207
208
 
208
209
  if (this.$props.selectAllLabel) {
209
210
  selectAll = [{
210
- key: this.$props.selectAllLabel
211
+ key: this.$props.selectAllLabel,
212
+ doc_count: this.totalDocumentCount
211
213
  }];
212
214
  }
213
215
 
@@ -452,6 +454,7 @@ var mapStateToProps = function mapStateToProps(state, props) {
452
454
  rawData: state.rawData[props.componentId],
453
455
  isLoading: state.isLoading[props.componentId],
454
456
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || '',
457
+ totalDocumentCount: state.hits[props.componentId] && state.hits[props.componentId].total,
455
458
  themePreset: state.config.themePreset,
456
459
  error: state.error[props.componentId],
457
460
  componentProps: state.props[props.componentId],
@@ -465,10 +468,10 @@ var mapDispatchtoProps = {
465
468
  setCustomQuery: setCustomQuery,
466
469
  setDefaultQuery: setDefaultQuery
467
470
  };
468
- var ListConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(SingleDropdownList), {
471
+ var ListConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(SingleDropdownList), {
469
472
  componentType: componentTypes.singleDropdownList,
470
473
  internalComponent: SingleDropdownList.hasInternalComponent()
471
- });
474
+ }));
472
475
 
473
476
  SingleDropdownList.install = function (Vue) {
474
477
  Vue.component(SingleDropdownList.name, ListConnected);
@@ -478,3 +481,4 @@ SingleDropdownList.install = function (Vue) {
478
481
  SingleDropdownList.componentType = componentTypes.singleDropdownList;
479
482
 
480
483
  export default SingleDropdownList;
484
+ export { ListConnected };
@@ -1,15 +1,16 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
+ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
2
3
  import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
4
  import VueTypes from 'vue-types';
4
- import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
8
  import { t as types } from './vueTypes-b8146772.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, o as isEvent, h as hasCustomRenderer, c as connect } from './index-7788a843.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.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-99c5f9c9.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-d5e814a4.js';
13
+ import { P as PreferencesConsumer } from './PreferencesConsumer-c30605fe.js';
13
14
  import { T as Title } from './Title-3342664a.js';
14
15
  import { I as Input } from './Input-7a2a9fac.js';
15
16
  import { C as Container } from './Container-ba826e96.js';
@@ -190,6 +191,7 @@ var SingleList = {
190
191
  "name": this.$props.componentId,
191
192
  "value": selectAllLabel,
192
193
  "readOnly": true,
194
+ "type": "radio",
193
195
  "show": this.$props.showRadio
194
196
  },
195
197
  "on": {
@@ -203,7 +205,9 @@ var SingleList = {
203
205
  "attrs": {
204
206
  "for": this.$props.componentId + "-" + selectAllLabel
205
207
  }
206
- }, [selectAllLabel])]) : null, !this.hasCustomRenderer && filteredItemsToRender.length === 0 && !this.isLoading ? this.renderNoResult() : filteredItemsToRender.map(function (item) {
208
+ }, [h("span", [selectAllLabel, this.$props.showCount && h("span", {
209
+ "class": getClassName(this.$props.innerClass, 'count') || null
210
+ }, ["\xA0(", this.totalDocumentCount, ")"])])])]) : null, !this.hasCustomRenderer && filteredItemsToRender.length === 0 && !this.isLoading ? this.renderNoResult() : filteredItemsToRender.map(function (item) {
207
211
  return h("li", {
208
212
  "key": item.key,
209
213
  "class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
@@ -473,6 +477,7 @@ var mapStateToProps = function mapStateToProps(state, props) {
473
477
  rawData: state.rawData[props.componentId],
474
478
  isLoading: state.isLoading[props.componentId],
475
479
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || '',
480
+ totalDocumentCount: state.hits[props.componentId] && state.hits[props.componentId].total,
476
481
  themePreset: state.config.themePreset,
477
482
  error: state.error[props.componentId],
478
483
  componentProps: state.props[props.componentId],
@@ -486,10 +491,10 @@ var mapDispatchtoProps = {
486
491
  setCustomQuery: setCustomQuery,
487
492
  setDefaultQuery: setDefaultQuery
488
493
  };
489
- var ListConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(SingleList), {
494
+ var ListConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(SingleList), {
490
495
  componentType: componentTypes.singleList,
491
496
  internalComponent: SingleList.hasInternalComponent()
492
- });
497
+ }));
493
498
 
494
499
  SingleList.install = function (Vue) {
495
500
  Vue.component(SingleList.name, ListConnected);
@@ -499,3 +504,4 @@ SingleList.install = function (Vue) {
499
504
  SingleList.componentType = componentTypes.singleList;
500
505
 
501
506
  export default SingleList;
507
+ export { ListConnected };
@@ -1,15 +1,16 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
+ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
2
3
  import './_rollupPluginBabelHelpers-76660dab.js';
3
4
  import VueTypes from 'vue-types';
4
- import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
8
  import { t as types } from './vueTypes-b8146772.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-7788a843.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
11
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-99c5f9c9.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-d5e814a4.js';
13
+ import { P as PreferencesConsumer } from './PreferencesConsumer-c30605fe.js';
13
14
  import { T as Title } from './Title-3342664a.js';
14
15
  import { C as Container } from './Container-ba826e96.js';
15
16
  import { U as UL, R as Radio } from './FormControlList-c22d64f6.js';
@@ -231,9 +232,9 @@ var mapDispatchtoProps = {
231
232
  setQueryOptions: setQueryOptions,
232
233
  setCustomQuery: setCustomQuery
233
234
  };
234
- var RangeConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(SingleRange), {
235
+ var RangeConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(SingleRange), {
235
236
  componentType: componentTypes.singleRange
236
- });
237
+ }));
237
238
 
238
239
  SingleRange.install = function (Vue) {
239
240
  Vue.component(SingleRange.name, RangeConnected);
@@ -243,3 +244,4 @@ SingleRange.install = function (Vue) {
243
244
  SingleRange.componentType = componentTypes.singleRange;
244
245
 
245
246
  export default SingleRange;
247
+ export { RangeConnected };
@@ -1,10 +1,10 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
+ import '@appbaseio/reactivecore/lib/utils/constants';
2
3
  import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
4
  import VueTypes from 'vue-types';
4
- import '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { isInternalComponent } from '@appbaseio/reactivecore/lib/utils/transform';
6
6
  import 'redux';
7
- import { c as connect } from './index-7788a843.js';
7
+ import { c as connect } from './index-99c5f9c9.js';
8
8
  import { setValues } from '@appbaseio/reactivecore/lib/actions/value';
9
9
 
10
10
  var getSearchState = helper.getSearchState;