@appbaseio/reactivesearch-vue 2.0.0-alpha.4 → 3.0.0-alpha.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 (108) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +17538 -25422
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +6 -15
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-ad042719.js +59 -0
  6. package/dist/cjs/Card-f5ab024a.js +27 -0
  7. package/dist/cjs/{ComponentWrapper-ad3dad02.js → ComponentWrapper-75f88599.js} +42 -56
  8. package/dist/cjs/Container-29f049b2.js +12 -0
  9. package/dist/cjs/DropDown-6cf84c47.js +698 -0
  10. package/dist/cjs/DynamicRangeSlider.js +103 -155
  11. package/dist/cjs/Flex-d5675ea6.js +48 -0
  12. package/dist/cjs/FormControlList-fadd792f.js +42 -0
  13. package/dist/cjs/Input-4b434436.js +74 -0
  14. package/dist/cjs/ListItem-d57d648d.js +42 -0
  15. package/dist/cjs/MultiDropdownList.js +124 -240
  16. package/dist/cjs/MultiList.js +123 -261
  17. package/dist/cjs/MultiRange.js +87 -133
  18. package/dist/cjs/{Pagination-71e85fa9.js → Pagination-b5ddc906.js} +70 -83
  19. package/dist/cjs/PreferencesConsumer-eb265924.js +75 -0
  20. package/dist/cjs/RangeInput.js +163 -171
  21. package/dist/cjs/RangeSlider.js +81 -109
  22. package/dist/cjs/ReactiveBase.js +139 -157
  23. package/dist/cjs/ReactiveComponent-eb8db4c1.js +2189 -0
  24. package/dist/cjs/ReactiveComponent.js +46 -340
  25. package/dist/cjs/ReactiveGoogleMap.js +445 -655
  26. package/dist/cjs/ReactiveList.js +179 -304
  27. package/dist/cjs/ResultCard.js +36 -36
  28. package/dist/cjs/ResultList.js +48 -56
  29. package/dist/cjs/SelectedFilters.js +62 -69
  30. package/dist/cjs/SingleDropdownList.js +117 -177
  31. package/dist/cjs/SingleList.js +121 -205
  32. package/dist/cjs/SingleRange.js +78 -105
  33. package/dist/cjs/StateProvider.js +35 -38
  34. package/dist/cjs/Title-8802a218.js +12 -0
  35. package/dist/cjs/ToggleButton.js +72 -119
  36. package/dist/cjs/{_rollupPluginBabelHelpers-c705cbe6.js → _rollupPluginBabelHelpers-f8b843f8.js} +0 -15
  37. package/dist/cjs/{index-6a167fe0.js → index-d8d8f291.js} +38 -108
  38. package/dist/cjs/index.js +44 -41
  39. package/dist/cjs/initReactivesearch.js +63 -150
  40. package/dist/cjs/install.js +47 -43
  41. package/dist/cjs/ssr-6907ada3.js +66 -0
  42. package/dist/cjs/{utils-d6a52588.js → utils-83fd01e9.js} +7 -16
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/cjs/{vueTypes-727b7c63.js → vueTypes-1bf00978.js} +8 -19
  45. package/dist/es/Button-474510e3.js +53 -0
  46. package/dist/es/{Card-450683f1.js → Card-38cbe652.js} +3 -3
  47. package/dist/es/{ComponentWrapper-424e86fd.js → ComponentWrapper-5166c76a.js} +42 -56
  48. package/dist/es/{Container-ba826e96.js → Container-d00219f7.js} +2 -2
  49. package/dist/es/DropDown-8764360c.js +688 -0
  50. package/dist/es/DynamicRangeSlider.js +103 -155
  51. package/dist/es/Flex-a08e22d7.js +46 -0
  52. package/dist/es/FormControlList-fe6eaee4.js +38 -0
  53. package/dist/es/Input-4a8ef1f3.js +69 -0
  54. package/dist/es/{ListItem-cad14c5e.js → ListItem-16756c02.js} +7 -8
  55. package/dist/es/MultiDropdownList.js +124 -240
  56. package/dist/es/MultiList.js +123 -261
  57. package/dist/es/MultiRange.js +87 -133
  58. package/dist/es/{Pagination-784bf143.js → Pagination-72bd1d9e.js} +70 -83
  59. package/dist/es/PreferencesConsumer-c276709c.js +73 -0
  60. package/dist/es/RangeInput.js +163 -170
  61. package/dist/es/RangeSlider.js +81 -109
  62. package/dist/es/ReactiveBase.js +138 -155
  63. package/dist/es/ReactiveComponent-f9fa5780.js +2183 -0
  64. package/dist/es/ReactiveComponent.js +42 -337
  65. package/dist/es/ReactiveGoogleMap.js +440 -649
  66. package/dist/es/ReactiveList.js +177 -301
  67. package/dist/es/ResultCard.js +36 -36
  68. package/dist/es/ResultList.js +48 -56
  69. package/dist/es/SelectedFilters.js +62 -69
  70. package/dist/es/SingleDropdownList.js +117 -177
  71. package/dist/es/SingleList.js +121 -205
  72. package/dist/es/SingleRange.js +78 -105
  73. package/dist/es/StateProvider.js +36 -39
  74. package/dist/es/{Title-3342664a.js → Title-863dfa42.js} +2 -2
  75. package/dist/es/ToggleButton.js +72 -119
  76. package/dist/es/{_rollupPluginBabelHelpers-76660dab.js → _rollupPluginBabelHelpers-ded08042.js} +0 -15
  77. package/dist/es/{index-7788a843.js → index-4520a598.js} +39 -107
  78. package/dist/es/index.js +30 -32
  79. package/dist/es/initReactivesearch.js +63 -150
  80. package/dist/es/install.js +49 -41
  81. package/dist/es/{ssr-b2c0b401.js → ssr-af398f0c.js} +36 -7
  82. package/dist/es/{utils-9e68acee.js → utils-9e5a16a1.js} +7 -16
  83. package/dist/es/version.js +1 -1
  84. package/dist/es/{vueTypes-b8146772.js → vueTypes-f1923c72.js} +8 -19
  85. package/package.json +10 -9
  86. package/dist/cjs/Button-446f819e.js +0 -68
  87. package/dist/cjs/CancelSvg-9f258f4f.js +0 -449
  88. package/dist/cjs/Card-642547a8.js +0 -30
  89. package/dist/cjs/Container-daf30918.js +0 -15
  90. package/dist/cjs/DataSearch-aa04dc6e.js +0 -2352
  91. package/dist/cjs/DataSearch.js +0 -30
  92. package/dist/cjs/DropDown-c479bbb0.js +0 -328
  93. package/dist/cjs/Flex-aa517a13.js +0 -52
  94. package/dist/cjs/FormControlList-c195a592.js +0 -47
  95. package/dist/cjs/Input-e6603a7e.js +0 -79
  96. package/dist/cjs/ListItem-8c9e0d68.js +0 -46
  97. package/dist/cjs/Title-1de7d0f4.js +0 -15
  98. package/dist/cjs/install-b97dbac4.js +0 -1409
  99. package/dist/cjs/ssr-3027b848.js +0 -39
  100. package/dist/es/Button-d8bc15ea.js +0 -59
  101. package/dist/es/CancelSvg-4cfae5fd.js +0 -440
  102. package/dist/es/DataSearch-b86a6675.js +0 -2337
  103. package/dist/es/DataSearch.js +0 -22
  104. package/dist/es/DropDown-05a644a5.js +0 -322
  105. package/dist/es/Flex-1f0795c3.js +0 -47
  106. package/dist/es/FormControlList-c22d64f6.js +0 -40
  107. package/dist/es/Input-7a2a9fac.js +0 -71
  108. package/dist/es/install-ac8a1edb.js +0 -1402
@@ -6,62 +6,50 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
6
6
 
7
7
  var configureStore = require('@appbaseio/reactivecore');
8
8
  var configureStore__default = _interopDefault(configureStore);
9
- var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
10
- var VueTypes = _interopDefault(require('vue-types'));
11
9
  var constants = require('@appbaseio/reactivecore/lib/utils/constants');
10
+ var _transformOn = _interopDefault(require('@vue/babel-helper-vue-transform-on'));
11
+ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
12
+ var vue = require('vue');
13
+ var VueTypes = _interopDefault(require('vue-types'));
12
14
  var helper = require('@appbaseio/reactivecore/lib/utils/helper');
15
+ var vueEmotion = require('@appbaseio/vue-emotion');
13
16
  var emotion = require('emotion');
14
- var styled = require('@appbaseio/vue-emotion');
15
- var styled__default = _interopDefault(styled);
16
17
  require('polished');
17
- require('./Button-446f819e.js');
18
- var vueTypes = require('./vueTypes-727b7c63.js');
19
- var Pagination = require('./Pagination-71e85fa9.js');
18
+ require('./Button-ad042719.js');
19
+ var vueTypes = require('./vueTypes-1bf00978.js');
20
+ var Pagination = require('./Pagination-b5ddc906.js');
20
21
  require('@appbaseio/reactivecore/lib/utils/transform');
21
22
  require('redux');
22
- var index = require('./index-6a167fe0.js');
23
- var ComponentWrapper = require('./ComponentWrapper-ad3dad02.js');
24
- var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
25
- require('./Title-1de7d0f4.js');
26
- var ListItem = require('./ListItem-8c9e0d68.js');
27
- var Card = require('./Card-642547a8.js');
28
- var Flex = require('./Flex-aa517a13.js');
23
+ var index = require('./index-d8d8f291.js');
24
+ var ComponentWrapper = require('./ComponentWrapper-75f88599.js');
25
+ var PreferencesConsumer = require('./PreferencesConsumer-eb265924.js');
26
+ require('./Title-8802a218.js');
27
+ var ListItem = require('./ListItem-d57d648d.js');
28
+ var Card = require('./Card-f5ab024a.js');
29
+ var Flex = require('./Flex-d5675ea6.js');
29
30
 
30
31
  var _templateObject;
31
- var PoweredByImage = styled__default('img')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 110px;\n"])));
32
-
33
- var PoweredBy = {
34
- functional: true,
35
- render: function render(h) {
36
- return h("a", {
37
- "attrs": {
38
- "href": "https://appbase.io/",
39
- "target": "_blank",
40
- "rel": "noopener noreferrer"
41
- }
42
- }, [h(PoweredByImage, {
43
- "attrs": {
44
- "src": "https://cdn.jsdelivr.net/gh/appbaseio/cdn@d2ec210045e59104ee5485841fa17b23fc83f097/appbase/logos/rbc-logo.svg"
45
- }
46
- })]);
47
- }
32
+ var PoweredByImage = vueEmotion.styled('img')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\twidth: 110px;\n"])));
33
+
34
+ var PoweredBy = function PoweredBy() {
35
+ return vue.createVNode("a", {
36
+ "href": "https://appbase.io/",
37
+ "target": "_blank",
38
+ "rel": "noopener noreferrer"
39
+ }, [vue.createVNode(PoweredByImage, {
40
+ "src": "https://cdn.jsdelivr.net/gh/appbaseio/cdn@d2ec210045e59104ee5485841fa17b23fc83f097/appbase/logos/rbc-logo.svg"
41
+ }, null)]);
48
42
  };
49
43
 
50
44
  var ResultListWrapper = {
51
45
  name: 'ResultListWrapper',
52
46
  functional: true,
53
- render: function render(_, _ref) {
54
- var props = _ref.props,
55
- children = _ref.children;
56
- var h = arguments[0];
57
- return h("div", _mergeJSXProps([{
58
- "attrs": {
59
- "className": ListItem.container
60
- }
61
- }, props]), [children]);
47
+ render: function render(context) {
48
+ return vue.createVNode("div", vue.mergeProps({
49
+ "className": ListItem.container
50
+ }, context.$props), [context.$slots["default"]()]);
62
51
  }
63
52
  };
64
-
65
53
  ResultListWrapper.install = function (Vue) {
66
54
  Vue.component(ResultListWrapper.name, ResultListWrapper);
67
55
  };
@@ -69,18 +57,12 @@ ResultListWrapper.install = function (Vue) {
69
57
  var ResultCardsWrapper = {
70
58
  name: 'ResultCardsWrapper',
71
59
  functional: true,
72
- render: function render(_, _ref) {
73
- var props = _ref.props,
74
- children = _ref.children;
75
- var h = arguments[0];
76
- return h("div", _mergeJSXProps([{
77
- "attrs": {
78
- "className": Card.container
79
- }
80
- }, props]), [children]);
60
+ render: function render(context) {
61
+ return vue.createVNode("div", vue.mergeProps({
62
+ "className": Card.container
63
+ }, context.$props), [context.$slots["default"]()]);
81
64
  }
82
65
  };
83
-
84
66
  ResultCardsWrapper.install = function (Vue) {
85
67
  Vue.component(ResultCardsWrapper.name, ResultCardsWrapper);
86
68
  };
@@ -91,15 +73,13 @@ var sortOptions = emotion.css(_templateObject2 || (_templateObject2 = _rollupPlu
91
73
 
92
74
  var recordImpressions = configureStore.Actions.recordImpressions;
93
75
  var isEqual = configureStore.helper.isEqual;
94
-
95
76
  var debounce = function debounce(method, delay) {
96
- clearTimeout(method._tId); // eslint-disable-next-line
97
-
77
+ clearTimeout(method._tId);
78
+ // eslint-disable-next-line
98
79
  method._tId = setTimeout(function () {
99
80
  method();
100
81
  }, delay);
101
82
  };
102
-
103
83
  var ImpressionTracker = {
104
84
  name: 'ImpressionTracker',
105
85
  inject: ['$$store'],
@@ -112,16 +92,15 @@ var ImpressionTracker = {
112
92
  // An object to track the recorded impressions
113
93
  // It can have the values in following shape
114
94
  // { "hit_id": { "index": "test" }}
115
-
116
- this.trackedIds = {}; // An object to know the the un-tracked impression i.e not recorded by BE
95
+ this.trackedIds = {};
96
+ // An object to know the the un-tracked impression i.e not recorded by BE
117
97
  // It can have the values in following shape
118
98
  // { "query_id": [{ "id": "hit_id", "index": "test"}]}
119
-
120
99
  this.waitingToBeTracked = {};
121
100
  },
122
101
  mounted: function mounted() {
123
- this.setCurrentHits(this.hits); // Add scroll events to track the impressions
124
-
102
+ this.setCurrentHits(this.hits);
103
+ // Add scroll events to track the impressions
125
104
  if (window) {
126
105
  window.addEventListener('scroll', this.tracker);
127
106
  }
@@ -140,7 +119,6 @@ var ImpressionTracker = {
140
119
  var currentHitIds = newVal.map(function (hit) {
141
120
  return hit._id;
142
121
  });
143
-
144
122
  if (!isEqual(currentHitIds, prevHitIds)) {
145
123
  this.setCurrentHits(newVal);
146
124
  }
@@ -153,28 +131,24 @@ var ImpressionTracker = {
153
131
  return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
154
132
  },
155
133
  setCurrentHits: function setCurrentHits(hits) {
156
- this.currentHits = hits; // Reset the tracked Ids for new hits
157
-
134
+ this.currentHits = hits;
135
+ // Reset the tracked Ids for new hits
158
136
  this.trackedIds = {};
159
-
160
137
  if (hits && hits.length) {
161
- this.tracker(); // Run the tracker function on an interval of 1s to track the impressions for
138
+ this.tracker();
139
+ // Run the tracker function on an interval of 1s to track the impressions for
162
140
  // non-scroll views for e.g on tab change
163
-
164
141
  this.setTrackerInterval();
165
142
  }
166
143
  },
167
144
  recordImpression: function recordImpression() {
168
145
  var _this = this;
169
-
170
146
  if (Object.keys(this.waitingToBeTracked).length) {
171
147
  var unTrackedHits = _rollupPluginBabelHelpers._extends({}, this.waitingToBeTracked);
172
-
173
148
  Object.keys(unTrackedHits).forEach(function (queryId) {
174
149
  if (unTrackedHits[queryId] && unTrackedHits[queryId].length) {
175
- _this.trackImpressions(queryId, unTrackedHits[queryId]); // Removed tracked impressions from waiting list
176
-
177
-
150
+ _this.trackImpressions(queryId, unTrackedHits[queryId]);
151
+ // Removed tracked impressions from waiting list
178
152
  delete _this.waitingToBeTracked[queryId];
179
153
  }
180
154
  });
@@ -182,13 +156,12 @@ var ImpressionTracker = {
182
156
  },
183
157
  addToWaitingList: function addToWaitingList(hitObject) {
184
158
  var queryId = this.getQueryId();
185
-
186
159
  if (hitObject && queryId) {
187
160
  var impression = {
188
161
  id: hitObject._id,
189
162
  index: hitObject._index
190
- }; // Check if query id already present in waiting list
191
-
163
+ };
164
+ // Check if query id already present in waiting list
192
165
  if (this.waitingToBeTracked[queryId]) {
193
166
  this.waitingToBeTracked[queryId].push(impression);
194
167
  } else {
@@ -198,32 +171,27 @@ var ImpressionTracker = {
198
171
  },
199
172
  tracker: function tracker() {
200
173
  var _this2 = this;
201
-
202
174
  if (!this.getHitIds().length) {
203
175
  this.clearTrackerInterval();
204
176
  return;
205
- } // only run at client-side
206
-
207
-
177
+ }
178
+ // only run at client-side
208
179
  if (window && document) {
209
180
  this.getHitIds().forEach(function (id) {
210
181
  var element = document.getElementById(id);
211
-
212
182
  if (element) {
213
183
  if (_this2.inViewPort(element)) {
214
184
  // Add the hit id in the list of tracked ids
215
185
  var hitObject = _this2.currentHits.find(function (hit) {
216
186
  return hit._id === id;
217
187
  });
218
-
219
- _this2.trackedIds[id] = true; // Add hit to waiting list to be recorded
220
-
188
+ _this2.trackedIds[id] = true;
189
+ // Add hit to waiting list to be recorded
221
190
  _this2.addToWaitingList(hitObject);
222
191
  }
223
192
  }
224
193
  });
225
194
  }
226
-
227
195
  debounce(this.recordImpression, 300);
228
196
  },
229
197
  setTrackerInterval: function setTrackerInterval() {
@@ -231,8 +199,8 @@ var ImpressionTracker = {
231
199
  },
232
200
  clearTrackerInterval: function clearTrackerInterval() {
233
201
  if (this.intervalID) {
234
- clearInterval(this.intervalID); // Reset interval ID
235
-
202
+ clearInterval(this.intervalID);
203
+ // Reset interval ID
236
204
  this.intervalID = null;
237
205
  }
238
206
  },
@@ -242,7 +210,6 @@ var ImpressionTracker = {
242
210
  },
243
211
  getHitIds: function getHitIds() {
244
212
  var _this3 = this;
245
-
246
213
  return this.currentHits.map(function (hit) {
247
214
  return hit._id;
248
215
  }).filter(function (id) {
@@ -261,21 +228,24 @@ var ImpressionTracker$1 = index.connect(function () {
261
228
  return null;
262
229
  }, mapDispatchToProps)(ImpressionTracker);
263
230
 
231
+ function _isSlot(s) {
232
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
233
+ }
264
234
  var setQueryOptions = configureStore.Actions.setQueryOptions,
265
- updateQuery = configureStore.Actions.updateQuery,
266
- loadMore = configureStore.Actions.loadMore,
267
- setValue = configureStore.Actions.setValue,
268
- updateComponentProps = configureStore.Actions.updateComponentProps,
269
- setDefaultQuery = configureStore.Actions.setDefaultQuery,
270
- recordResultClick = configureStore.Actions.recordResultClick;
235
+ updateQuery = configureStore.Actions.updateQuery,
236
+ loadMore = configureStore.Actions.loadMore,
237
+ setValue = configureStore.Actions.setValue,
238
+ updateComponentProps = configureStore.Actions.updateComponentProps,
239
+ setDefaultQuery = configureStore.Actions.setDefaultQuery,
240
+ recordResultClick = configureStore.Actions.recordResultClick;
271
241
  var isEqual$1 = configureStore.helper.isEqual,
272
- getQueryOptions = configureStore.helper.getQueryOptions,
273
- getClassName = configureStore.helper.getClassName,
274
- parseHits = configureStore.helper.parseHits,
275
- getCompositeAggsQuery = configureStore.helper.getCompositeAggsQuery,
276
- getResultStats = configureStore.helper.getResultStats,
277
- extractQueryFromCustomQuery = configureStore.helper.extractQueryFromCustomQuery,
278
- getOptionsForCustomQuery = configureStore.helper.getOptionsForCustomQuery;
242
+ getQueryOptions = configureStore.helper.getQueryOptions,
243
+ getClassName = configureStore.helper.getClassName,
244
+ parseHits = configureStore.helper.parseHits,
245
+ getCompositeAggsQuery = configureStore.helper.getCompositeAggsQuery,
246
+ getResultStats = configureStore.helper.getResultStats,
247
+ extractQueryFromCustomQuery = configureStore.helper.extractQueryFromCustomQuery,
248
+ getOptionsForCustomQuery = configureStore.helper.getOptionsForCustomQuery;
279
249
  var ReactiveList = {
280
250
  name: 'ReactiveList',
281
251
  components: {
@@ -285,13 +255,11 @@ var ReactiveList = {
285
255
  data: function data() {
286
256
  var currentPageState = 0;
287
257
  var defaultPage = this.defaultPage || -1;
288
-
289
258
  if (defaultPage >= 0) {
290
259
  currentPageState = defaultPage;
291
260
  } else if (this.currentPage) {
292
261
  currentPageState = Math.max(this.currentPage - 1, 0);
293
262
  }
294
-
295
263
  this.__state = {
296
264
  from: currentPageState * this.size,
297
265
  currentPageState: currentPageState
@@ -300,50 +268,27 @@ var ReactiveList = {
300
268
  },
301
269
  created: function created() {
302
270
  var _this = this;
303
-
304
- var _this$$props = this.$props,
305
- distinctField = _this$$props.distinctField,
306
- distinctFieldConfig = _this$$props.distinctFieldConfig,
307
- index = _this$$props.index; // no support for pagination and aggregationField together
308
-
271
+ // no support for pagination and aggregationField together
309
272
  if (this.pagination && this.aggregationField) {
310
273
  console.warn('Pagination is not supported when aggregationField is present. The list will be rendered with infinite scroll');
311
274
  }
312
-
313
- if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
314
- console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
315
- }
316
-
317
- if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
318
- console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
319
- }
320
-
321
- if (!this.enableAppbase && index) {
322
- console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
323
- }
324
-
325
275
  var defaultPage = this.defaultPage || -1;
326
-
327
276
  if (defaultPage >= 0) {
328
277
  this.currentPageState = defaultPage;
329
278
  this.from = this.currentPageState * this.$props.size;
330
279
  }
331
-
332
280
  this.internalComponent = this.$props.componentId + "__internal";
333
281
  this.sortOptionIndex = 0;
334
-
335
282
  if (this.defaultSortOption && this.sortOptions && Array.isArray(this.sortOptions)) {
336
283
  this.sortOptionIndex = this.sortOptions.findIndex(function (s) {
337
284
  return s.label === _this.defaultSortOption;
338
285
  });
339
286
  }
340
-
341
287
  if (this.urlSortOption) {
342
288
  this.sortOptionIndex = this.$props.sortOptions.findIndex(function (s) {
343
289
  return s.label === _this.urlSortOption;
344
290
  }) || 0;
345
291
  }
346
-
347
292
  this.updateComponentProps(this.componentId, {
348
293
  from: this.from
349
294
  }, constants.componentTypes.reactiveList);
@@ -398,10 +343,10 @@ var ReactiveList = {
398
343
  return Math.ceil(this.total / this.$props.size) || 0;
399
344
  },
400
345
  hasPageChangeListener: function hasPageChangeListener() {
401
- return this.$listeners && this.$listeners.pageChange;
346
+ return this.$attrs && this.$attrs.pageChange;
402
347
  },
403
348
  hasResultStatsListener: function hasResultStatsListener() {
404
- return this.$listeners && this.$listeners.resultStats;
349
+ return this.$attrs && this.$attrs.resultStats;
405
350
  },
406
351
  stats: function stats() {
407
352
  return _rollupPluginBabelHelpers._extends({}, getResultStats(this), {
@@ -420,21 +365,17 @@ var ReactiveList = {
420
365
  var results = parseHits(this.hits) || [];
421
366
  var parsedPromotedResults = parseHits(this.promotedResults) || [];
422
367
  var filteredResults = results;
423
-
424
368
  if (parsedPromotedResults.length) {
425
369
  var ids = parsedPromotedResults.map(function (item) {
426
370
  return item._id;
427
371
  }).filter(Boolean);
428
-
429
372
  if (ids) {
430
373
  filteredResults = filteredResults.filter(function (item) {
431
374
  return !ids.includes(item._id);
432
375
  });
433
376
  }
434
-
435
377
  filteredResults = [].concat(parsedPromotedResults, filteredResults);
436
378
  }
437
-
438
379
  return helper.withClickIds(filteredResults);
439
380
  }
440
381
  },
@@ -476,19 +417,16 @@ var ReactiveList = {
476
417
  this.$defaultQuery = newVal(null, this.$props);
477
418
  var query = extractQueryFromCustomQuery(this.$defaultQuery);
478
419
  var queryOptions = getOptionsForCustomQuery(this.$defaultQuery);
479
-
480
420
  if (queryOptions) {
481
421
  options = _rollupPluginBabelHelpers._extends({}, options, queryOptions);
482
- } // Update calculated default query in store
483
-
484
-
422
+ }
423
+ // Update calculated default query in store
485
424
  index.updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props);
486
425
  this.setQueryOptions(this.$props.componentId, _rollupPluginBabelHelpers._extends({}, options, this.getAggsQuery()), !query);
487
426
  this.updateQuery({
488
427
  componentId: this.internalComponent,
489
428
  query: query
490
429
  }, true); // reset page because of query change
491
-
492
430
  this.currentPageState = 0;
493
431
  this.from = 0;
494
432
  }
@@ -510,7 +448,6 @@ var ReactiveList = {
510
448
  },
511
449
  hits: function hits(newVal, oldVal) {
512
450
  this.$emit('data', this.getData());
513
-
514
451
  if (this.shouldRenderPagination) {
515
452
  // called when page is changed
516
453
  if (this.isLoading && (oldVal || newVal)) {
@@ -528,7 +465,6 @@ var ReactiveList = {
528
465
  if (this.scrollOnChange) {
529
466
  window.scrollTo(0, 0);
530
467
  }
531
-
532
468
  this.from = 0;
533
469
  }
534
470
  }
@@ -552,7 +488,6 @@ var ReactiveList = {
552
488
  window.removeEventListener('scroll', this.scrollHandler);
553
489
  }
554
490
  } // handle window url history change (on native back and forth interactions)
555
-
556
491
  },
557
492
  defaultPage: function defaultPage(newVal, oldVal) {
558
493
  if (this.currentPageState !== newVal && oldVal !== newVal) {
@@ -564,46 +499,39 @@ var ReactiveList = {
564
499
  if (this.defaultPage < 0 && this.currentPage > 0) {
565
500
  this.setPageURL(this.$props.componentId, this.currentPage, this.$props.componentId, false, this.URLParams);
566
501
  }
567
-
568
502
  var options = getQueryOptions(this.$props);
569
503
  options.from = this.$data.from;
570
-
571
504
  if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
572
505
  var _ref;
573
-
574
506
  var sortField = this.sortOptions[this.sortOptionIndex].dataField;
575
507
  var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
576
508
  options.sort = [(_ref = {}, _ref[sortField] = {
577
509
  order: sortBy
578
- }, _ref)]; // To handle sort options for RS API
579
-
510
+ }, _ref)];
511
+ // To handle sort options for RS API
580
512
  this.updateComponentProps(this.componentId, {
581
513
  dataField: sortField,
582
514
  sortBy: sortBy
583
515
  }, constants.componentTypes.reactiveList);
584
516
  } else if (this.$props.sortBy) {
585
517
  var _ref2;
586
-
587
518
  options.sort = [(_ref2 = {}, _ref2[this.$props.dataField] = {
588
519
  order: this.$props.sortBy
589
520
  }, _ref2)];
590
521
  } // Override sort query with defaultQuery's sort if defined
591
522
 
592
-
593
523
  this.$defaultQuery = null;
594
-
595
524
  if (this.$props.defaultQuery) {
596
525
  this.$defaultQuery = this.$props.defaultQuery();
597
- options = _rollupPluginBabelHelpers._extends({}, options, getOptionsForCustomQuery(this.$defaultQuery)); // Update calculated default query in store
526
+ options = _rollupPluginBabelHelpers._extends({}, options, getOptionsForCustomQuery(this.$defaultQuery));
598
527
 
528
+ // Update calculated default query in store
599
529
  index.updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props);
600
- } // execute is set to false at the time of mount
601
-
602
-
530
+ }
531
+ // execute is set to false at the time of mount
603
532
  var query = extractQueryFromCustomQuery(this.$defaultQuery);
604
533
  var execute = false;
605
534
  this.setQueryOptions(this.$props.componentId, _rollupPluginBabelHelpers._extends({}, options, this.getAggsQuery()), execute);
606
-
607
535
  if (this.$defaultQuery) {
608
536
  this.updateQuery({
609
537
  componentId: this.internalComponent,
@@ -616,131 +544,122 @@ var ReactiveList = {
616
544
  }, execute);
617
545
  } // query will be executed here
618
546
 
619
-
620
547
  if (this.showInfiniteScroll) {
621
548
  window.addEventListener('scroll', this.scrollHandler);
622
549
  }
623
550
  },
624
- beforeDestroy: function beforeDestroy() {
551
+ beforeUnmount: function beforeUnmount() {
625
552
  if (this.showInfiniteScroll) {
626
553
  window.removeEventListener('scroll', this.scrollHandler);
627
554
  }
628
555
  },
629
556
  render: function render() {
630
- var h = arguments[0];
557
+ var _this2 = this;
631
558
  var hits = this.$data.hits;
632
559
  var results = parseHits(hits) || [];
633
- return h("div", {
560
+ return vue.createVNode("div", {
634
561
  "style": this.$props.style,
635
562
  "class": this.$props.className
636
- }, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex.Flex, {
637
- "attrs": {
638
- "labelPosition": this.sortOptions ? 'right' : 'left'
639
- },
563
+ }, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$slots.loader || this.$props.loader), this.renderErrorComponent(), vue.createVNode(Flex.Flex, {
564
+ "labelPosition": this.sortOptions ? 'right' : 'left',
640
565
  "class": getClassName(this.$props.innerClass, 'resultsInfo')
641
- }, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && hits && hits.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination.Pagination, {
642
- "attrs": {
643
- "pages": this.$props.pages,
644
- "totalPages": this.totalPages,
645
- "currentPage": this.currentPageState,
646
- "setPage": this.setPage,
647
- "innerClass": this.$props.innerClass,
648
- "prevLabel": this.$props.prevLabel,
649
- "nextLabel": this.$props.nextLabel
650
- }
651
- }) : null, this.renderResults(), this.isLoading && !this.shouldRenderPagination ? this.$scopedSlots.loader || this.$props.loader || h("div", {
566
+ }, {
567
+ "default": function _default() {
568
+ return [_this2.sortOptions ? _this2.renderSortOptions() : null, _this2.$props.showResultStats && results.length ? _this2.renderStats() : null];
569
+ }
570
+ }), !this.isLoading && hits && hits.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? vue.createVNode(Pagination.Pagination, {
571
+ "pages": this.$props.pages,
572
+ "totalPages": this.totalPages,
573
+ "currentPage": this.currentPageState,
574
+ "setPage": this.setPage,
575
+ "innerClass": this.$props.innerClass,
576
+ "prevLabel": this.$props.prevLabel,
577
+ "nextLabel": this.$props.nextLabel
578
+ }, null) : null, this.renderResults(), this.isLoading && !this.shouldRenderPagination ? this.$slots.loader || this.$props.loader || vue.createVNode("div", {
652
579
  "style": {
653
580
  textAlign: 'center',
654
581
  margin: '20px 0',
655
582
  color: '#666'
656
583
  }
657
- }, ["Loading..."]) : null, this.shouldRenderPagination && (this.$props.paginationAt === 'bottom' || this.$props.paginationAt === 'both') ? h(Pagination.Pagination, {
658
- "attrs": {
659
- "pages": this.$props.pages,
660
- "totalPages": Math.ceil(this.$data.total / this.$props.size),
661
- "currentPage": this.currentPageState,
662
- "setPage": this.setPage,
663
- "showEndPage": this.$props.showEndPage,
664
- "innerClass": this.$props.innerClass,
665
- "prevLabel": this.$props.prevLabel,
666
- "nextLabel": this.$props.nextLabel
667
- }
668
- }) : null, this.url.endsWith('appbase.io') && results.length ? h(Flex.Flex, {
669
- "attrs": {
670
- "direction": "row-reverse"
671
- },
584
+ }, [vue.createTextVNode("Loading...")]) : null, this.shouldRenderPagination && (this.$props.paginationAt === 'bottom' || this.$props.paginationAt === 'both') ? vue.createVNode(Pagination.Pagination, {
585
+ "pages": this.$props.pages,
586
+ "totalPages": Math.ceil(this.$data.total / this.$props.size),
587
+ "currentPage": this.currentPageState,
588
+ "setPage": this.setPage,
589
+ "showEndPage": this.$props.showEndPage,
590
+ "innerClass": this.$props.innerClass,
591
+ "prevLabel": this.$props.prevLabel,
592
+ "nextLabel": this.$props.nextLabel
593
+ }, null) : null, this.url.endsWith('appbase.io') && results.length ? vue.createVNode(Flex.Flex, {
594
+ "direction": "row-reverse",
672
595
  "class": getClassName(this.$props.innerClass, 'poweredBy')
673
- }, [h(PoweredBy)]) : null]);
596
+ }, {
597
+ "default": function _default() {
598
+ return [vue.createVNode(PoweredBy, null, null)];
599
+ }
600
+ }) : null]);
674
601
  },
675
602
  methods: {
676
603
  renderErrorComponent: function renderErrorComponent() {
677
- var renderError = this.$scopedSlots.renderError || this.$props.renderError;
678
-
604
+ var renderError = this.$slots.renderError || this.$props.renderError;
679
605
  if (renderError && this.error && !this.isLoading) {
680
606
  return index.isFunction(renderError) ? renderError(this.error) : renderError;
681
607
  }
682
-
683
608
  return null;
684
609
  },
685
610
  renderResults: function renderResults() {
686
- var _this2 = this;
687
-
688
- var h = this.$createElement;
611
+ var _this3 = this;
689
612
  var size = this.$props.size;
690
- var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
691
- var element = this.hasCustomRender ? this.getComponent() : h("div", {
613
+ var renderItem = this.$slots.renderItem || this.$props.renderItem;
614
+ var element = this.hasCustomRender ? this.getComponent() : vue.createVNode("div", {
692
615
  "class": this.$props.listClass + " " + getClassName(this.$props.innerClass, 'list')
693
616
  }, [this.data.map(function (item, index) {
694
617
  return renderItem({
695
618
  item: item,
696
- count: _this2.currentPageState * size + index + 1,
619
+ count: _this3.currentPageState * size + index + 1,
697
620
  triggerClickAnalytics: function triggerClickAnalytics() {
698
- return _this2.triggerClickAnalytics(_this2.currentPageState * size + index);
621
+ return _this3.triggerClickAnalytics(_this3.currentPageState * size + index);
699
622
  }
700
623
  });
701
- })]); // If analytics is set to true then render with impression tracker
702
-
703
- return this.analytics ? h(ImpressionTracker$1, {
704
- "attrs": {
705
- "hits": this.data
624
+ })]);
625
+ // If analytics is set to true then render with impression tracker
626
+ return this.analytics ? vue.createVNode(ImpressionTracker$1, {
627
+ "hits": this.data
628
+ }, _isSlot(element) ? element : {
629
+ "default": function _default() {
630
+ return [element];
706
631
  }
707
- }, [element]) : element;
632
+ }) : element;
708
633
  },
709
634
  updateQueryOptions: function updateQueryOptions(props) {
710
635
  var options = getQueryOptions(props);
711
636
  options.from = this.$data.from;
712
-
713
637
  if (props.sortOptions && Array.isArray(props.sortOptions)) {
714
638
  var sortOptionIndex = props.defaultSortOption ? props.sortOptions.findIndex(function (s) {
715
639
  return s.label === props.defaultSortOption;
716
640
  }) : 0;
717
-
718
641
  if (props.sortOptions[sortOptionIndex]) {
719
642
  var _ref3;
720
-
721
643
  options.sort = [(_ref3 = {}, _ref3[props.sortOptions[sortOptionIndex].dataField] = {
722
644
  order: props.sortOptions[sortOptionIndex].sortBy
723
645
  }, _ref3)];
724
646
  }
725
647
  } else if (props.sortBy) {
726
648
  var _ref4;
727
-
728
649
  options.sort = [(_ref4 = {}, _ref4[props.dataField] = {
729
650
  order: props.sortBy
730
651
  }, _ref4)];
731
652
  }
732
-
733
653
  this.setQueryOptions(this.$props.componentId, _rollupPluginBabelHelpers._extends({}, options, this.getAggsQuery()), true);
734
654
  },
735
655
  getAggsQuery: function getAggsQuery() {
736
- var _this$$props2 = this.$props,
737
- size = _this$$props2.size,
738
- aggregationField = _this$$props2.aggregationField;
656
+ var _this$$props = this.$props,
657
+ size = _this$$props.size,
658
+ aggregationField = _this$$props.aggregationField;
739
659
  var afterKey = this.$data.afterKey;
740
660
  var queryOptions = {
741
661
  size: size
742
662
  };
743
-
744
663
  if (aggregationField) {
745
664
  queryOptions.aggs = getCompositeAggsQuery({
746
665
  props: this.$props,
@@ -748,7 +667,6 @@ var ReactiveList = {
748
667
  showTopHits: true
749
668
  }).aggs;
750
669
  }
751
-
752
670
  return queryOptions;
753
671
  },
754
672
  scrollHandler: function scrollHandler() {
@@ -758,9 +676,9 @@ var ReactiveList = {
758
676
  },
759
677
  loadMore: function loadMore() {
760
678
  if (this.aggregationField && !this.afterKey) return;
761
-
762
679
  if (this.hits && !this.shouldRenderPagination && this.total > this.hits.length) {
763
- var value = this.$data.from + this.$props.size; // If current hits length is less than the current from then it means
680
+ var value = this.$data.from + this.$props.size;
681
+ // If current hits length is less than the current from then it means
764
682
  // that there are no results present.
765
683
  // It can happen because of many reasons some of them are:
766
684
  // 1. Using the `collapse` query to remove results
@@ -771,11 +689,9 @@ var ReactiveList = {
771
689
  if (this.hits.length < value) {
772
690
  return;
773
691
  }
774
-
775
692
  var options = _rollupPluginBabelHelpers._extends({}, getQueryOptions(this.$props), this.getAggsQuery());
776
-
777
- this.from = value; // Update default query to support pagination for aggregationField
778
-
693
+ this.from = value;
694
+ // Update default query to support pagination for aggregationField
779
695
  index.updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props);
780
696
  this.loadMoreAction(this.$props.componentId, _rollupPluginBabelHelpers._extends({}, options, {
781
697
  from: value
@@ -799,39 +715,30 @@ var ReactiveList = {
799
715
  }
800
716
  },
801
717
  renderStats: function renderStats() {
802
- var h = this.$createElement;
803
- var renderResultStats = this.$scopedSlots.renderResultStats || this.$props.renderResultStats;
804
-
718
+ var renderResultStats = this.$slots.renderResultStats || this.$props.renderResultStats;
805
719
  if (renderResultStats && this.$data.total) {
806
720
  return renderResultStats(this.stats);
807
721
  }
808
-
809
722
  if (this.stats.numberOfResults) {
810
- return h("p", {
723
+ return vue.createVNode("p", {
811
724
  "class": resultStats + " " + getClassName(this.$props.innerClass, 'resultStats')
812
- }, [this.stats.numberOfResults, " results found in ", this.stats.time || 0, "ms"]);
725
+ }, [this.stats.numberOfResults, vue.createTextVNode(" results found in "), this.stats.time || 0, vue.createTextVNode("ms")]);
813
726
  }
814
-
815
727
  return null;
816
728
  },
817
729
  renderNoResult: function renderNoResult() {
818
- var h = this.$createElement;
819
- var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
820
-
821
- if (this.$scopedSlots.renderNoResults) {
730
+ var renderNoResults = this.$slots.renderNoResults || this.$props.renderNoResults;
731
+ if (this.$slots.renderNoResults) {
822
732
  return index.isFunction(renderNoResults) ? renderNoResults() : renderNoResults;
823
733
  }
824
-
825
- return h("p", {
734
+ return vue.createVNode("p", {
826
735
  "class": getClassName(this.$props.innerClass, 'noResults') || null
827
736
  }, [index.isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
828
737
  },
829
738
  handleSortChange: function handleSortChange(e) {
830
739
  var index = e.target.value;
831
-
832
740
  if (this.sortOptions && this.sortOptions[index]) {
833
741
  var _ref5;
834
-
835
742
  // This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
836
743
  var options = getQueryOptions(this.$props);
837
744
  options.from = 0;
@@ -840,8 +747,8 @@ var ReactiveList = {
840
747
  options.sort = [(_ref5 = {}, _ref5[sortField] = {
841
748
  order: sortBy
842
749
  }, _ref5)];
843
- this.sortOptionIndex = index; // To handle sort options for RS API
844
-
750
+ this.sortOptionIndex = index;
751
+ // To handle sort options for RS API
845
752
  this.updateComponentProps(this.componentId, {
846
753
  dataField: sortField,
847
754
  sortBy: sortBy
@@ -856,49 +763,36 @@ var ReactiveList = {
856
763
  },
857
764
  triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
858
765
  var docId = documentId;
859
-
860
766
  if (!docId) {
861
767
  var _this$getData = this.getData(),
862
- data = _this$getData.data;
863
-
768
+ data = _this$getData.data;
864
769
  var hitData = data.find(function (hit) {
865
770
  return hit._click_id === searchPosition;
866
771
  });
867
-
868
772
  if (hitData && hitData._id) {
869
773
  docId = hitData._id;
870
774
  }
871
775
  }
872
-
873
776
  this.recordResultClick(searchPosition, docId);
874
777
  },
875
778
  renderSortOptions: function renderSortOptions() {
876
- var h = this.$createElement;
877
- return h("select", {
779
+ return vue.createVNode("select", vue.mergeProps(_transformOn({
780
+ change: this.handleSortChange
781
+ }), {
878
782
  "class": sortOptions + " " + getClassName(this.$props.innerClass, 'sortOptions'),
879
- "attrs": {
880
- "name": "sort-options",
881
- "aria-label": "Sort options"
882
- },
883
- "on": {
884
- "change": this.handleSortChange
885
- },
886
- "domProps": {
887
- "value": this.sortOptionIndex
888
- }
889
- }, [this.sortOptions.map(function (sort, index) {
890
- return h("option", {
783
+ "name": "sort-options",
784
+ "aria-label": "Sort options",
785
+ "value": this.sortOptionIndex
786
+ }), [this.sortOptions.map(function (sort, index) {
787
+ return vue.createVNode("option", {
891
788
  "key": sort.label,
892
- "domProps": {
893
- "value": index
894
- }
789
+ "value": index
895
790
  }, [sort.label]);
896
791
  })]);
897
792
  },
898
793
  withClickIds: function withClickIds(results) {
899
794
  var _this$getAllData = this.getAllData(),
900
- base = _this$getAllData.base;
901
-
795
+ base = _this$getAllData.base;
902
796
  return results.map(function (result, index) {
903
797
  return _rollupPluginBabelHelpers._extends({}, result, {
904
798
  _click_id: base + index
@@ -908,11 +802,11 @@ var ReactiveList = {
908
802
  // Shape of the object to be returned in onData & render
909
803
  getAllData: function getAllData() {
910
804
  var size = this.size,
911
- promotedResults = this.promotedResults,
912
- aggregationData = this.aggregationData,
913
- customData = this.customData,
914
- currentPage = this.currentPage,
915
- hits = this.hits;
805
+ promotedResults = this.promotedResults,
806
+ aggregationData = this.aggregationData,
807
+ customData = this.customData,
808
+ currentPage = this.currentPage,
809
+ hits = this.hits;
916
810
  var results = parseHits(hits) || [];
917
811
  var parsedPromotedResults = parseHits(promotedResults) || [];
918
812
  var base = currentPage * size;
@@ -928,10 +822,9 @@ var ReactiveList = {
928
822
  },
929
823
  getData: function getData() {
930
824
  var _this$getAllData2 = this.getAllData(),
931
- promotedResults = _this$getAllData2.promotedResults,
932
- aggregationData = _this$getAllData2.aggregationData,
933
- customData = _this$getAllData2.customData;
934
-
825
+ promotedResults = _this$getAllData2.promotedResults,
826
+ aggregationData = _this$getAllData2.aggregationData,
827
+ customData = _this$getAllData2.customData;
935
828
  return {
936
829
  data: this.data,
937
830
  aggregationData: this.withClickIds(aggregationData || []),
@@ -943,23 +836,18 @@ var ReactiveList = {
943
836
  },
944
837
  getComponent: function getComponent() {
945
838
  var error = this.error,
946
- isLoading = this.isLoading;
947
-
839
+ isLoading = this.isLoading;
948
840
  var data = _rollupPluginBabelHelpers._extends({
949
841
  error: error,
950
842
  loading: isLoading || false,
951
843
  loadMore: this.loadMore,
952
- // TODO: Remove in v2
953
- triggerAnalytics: this.triggerClickAnalytics,
954
844
  triggerClickAnalytics: this.triggerClickAnalytics,
955
845
  setPage: this.setPage
956
846
  }, this.getData());
957
-
958
847
  return index.getComponent(data, this);
959
848
  }
960
849
  }
961
850
  };
962
-
963
851
  var mapStateToProps = function mapStateToProps(state, props) {
964
852
  return {
965
853
  defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
@@ -973,7 +861,6 @@ var mapStateToProps = function mapStateToProps(state, props) {
973
861
  total: state.hits[props.componentId] && state.hits[props.componentId].total,
974
862
  hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
975
863
  analytics: state.config && state.config.analytics,
976
- enableAppbase: state.config.enableAppbase,
977
864
  url: state.config.url,
978
865
  error: state.error[props.componentId],
979
866
  afterKey: state.aggregations[props.componentId] && state.aggregations[props.componentId][props.aggregationField] && state.aggregations[props.componentId][props.aggregationField].after_key,
@@ -981,7 +868,6 @@ var mapStateToProps = function mapStateToProps(state, props) {
981
868
  isLoading: state.isLoading[props.componentId]
982
869
  };
983
870
  };
984
-
985
871
  var mapDispatchtoProps = {
986
872
  loadMoreAction: loadMore,
987
873
  setPageURL: setValue,
@@ -990,71 +876,60 @@ var mapDispatchtoProps = {
990
876
  updateComponentProps: updateComponentProps,
991
877
  setDefaultQuery: setDefaultQuery,
992
878
  recordResultClick: recordResultClick
993
- }; // Only used for SSR
994
-
879
+ };
880
+ // Only used for SSR
995
881
  ReactiveList.generateQueryOptions = function (props) {
996
882
  var options = getQueryOptions(props);
997
883
  var size = props.size,
998
- dataField = props.dataField,
999
- defaultSortOption = props.defaultSortOption,
1000
- sortOptionsNew = props.sortOptions,
1001
- currentPage = props.currentPage,
1002
- sortBy = props.sortBy;
884
+ dataField = props.dataField,
885
+ defaultSortOption = props.defaultSortOption,
886
+ sortOptionsNew = props.sortOptions,
887
+ currentPage = props.currentPage,
888
+ sortBy = props.sortBy;
1003
889
  options.from = currentPage ? (currentPage - 1) * (size || 10) : 0;
1004
890
  options.size = size || 10;
1005
-
1006
891
  var getSortOption = function getSortOption() {
1007
892
  var _ref7;
1008
-
1009
893
  if (defaultSortOption) {
1010
894
  var sortOption = sortOptionsNew.find(function (option) {
1011
895
  return option.label === defaultSortOption;
1012
896
  });
1013
-
1014
897
  if (sortOption) {
1015
898
  var _ref6;
1016
-
1017
899
  return _ref6 = {}, _ref6[sortOption.dataField] = {
1018
900
  order: sortOption.sortBy
1019
901
  }, _ref6;
1020
902
  }
1021
903
  }
1022
-
1023
904
  return _ref7 = {}, _ref7[sortOptionsNew[0].dataField] = {
1024
905
  order: sortOptionsNew[0].sortBy
1025
906
  }, _ref7;
1026
907
  };
1027
-
1028
908
  if (sortOptionsNew) {
1029
909
  options.sort = [getSortOption()];
1030
910
  } else if (sortBy) {
1031
911
  var _ref8;
1032
-
1033
912
  options.sort = [(_ref8 = {}, _ref8[dataField] = {
1034
913
  order: sortBy
1035
914
  }, _ref8)];
1036
915
  }
1037
-
1038
916
  return options;
1039
917
  };
1040
-
1041
918
  ReactiveList.hasInternalComponent = function () {
1042
919
  return true;
1043
920
  };
1044
-
1045
- var RLConnected = ComponentWrapper.ComponentWrapper(index.connect(mapStateToProps, mapDispatchtoProps)(ReactiveList), {
921
+ var RLConnected = PreferencesConsumer.PreferencesConsumer(ComponentWrapper.ComponentWrapper(index.connect(mapStateToProps, mapDispatchtoProps)(ReactiveList), {
1046
922
  componentType: constants.componentTypes.reactiveList,
1047
923
  internalComponent: ReactiveList.hasInternalComponent()
1048
- });
1049
-
1050
- ReactiveList.install = function (Vue) {
1051
- Vue.component(ReactiveList.name, RLConnected);
924
+ }));
925
+ RLConnected.name = ReactiveList.name;
926
+ RLConnected.install = function (Vue) {
927
+ Vue.component(RLConnected.name, RLConnected);
1052
928
  Vue.component(ResultListWrapper.name, ResultListWrapper);
1053
929
  Vue.component(ResultCardsWrapper.name, ResultCardsWrapper);
1054
- }; // Add componentType for SSR
1055
-
1056
-
1057
- ReactiveList.componentType = constants.componentTypes.reactiveList;
930
+ };
931
+ // Add componentType for SSR
932
+ RLConnected.componentType = constants.componentTypes.reactiveList;
1058
933
 
1059
934
  exports.RLConnected = RLConnected;
1060
- exports.default = ReactiveList;
935
+ exports.default = RLConnected;