@appbaseio/reactivesearch-vue 1.16.0-alpha.5 → 1.16.0-alpha.50

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 (105) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +11245 -9254
  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-10e5cf51.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-deda2e96.js +2171 -0
  11. package/dist/cjs/DataSearch.js +18 -2151
  12. package/dist/cjs/{DropDown-c66be1a8.js → DropDown-16a2a728.js} +80 -95
  13. package/dist/cjs/DynamicRangeSlider.js +107 -43
  14. package/dist/cjs/Flex-699639d2.js +52 -0
  15. package/dist/cjs/FormControlList-73497794.js +47 -0
  16. package/dist/cjs/Input-64087a69.js +79 -0
  17. package/dist/cjs/ListItem-933c27e4.js +46 -0
  18. package/dist/cjs/MultiDropdownList.js +102 -68
  19. package/dist/cjs/MultiList.js +80 -50
  20. package/dist/cjs/MultiRange.js +21 -16
  21. package/dist/cjs/{Pagination-91df3b77.js → Pagination-e0654529.js} +4 -3
  22. package/dist/cjs/RangeInput.js +29 -45
  23. package/dist/cjs/RangeSlider.js +32 -30
  24. package/dist/cjs/ReactiveBase.js +55 -34
  25. package/dist/cjs/ReactiveComponent.js +75 -62
  26. package/dist/cjs/ReactiveGoogleMap.js +326 -235
  27. package/dist/cjs/ReactiveList.js +188 -241
  28. package/dist/cjs/ResultCard.js +8 -6
  29. package/dist/cjs/ResultList.js +8 -6
  30. package/dist/cjs/SelectedFilters.js +27 -12
  31. package/dist/cjs/SingleDropdownList.js +88 -60
  32. package/dist/cjs/SingleList.js +53 -35
  33. package/dist/cjs/SingleRange.js +18 -13
  34. package/dist/cjs/StateProvider.js +11 -7
  35. package/dist/cjs/{Title-e9beb554.js → Title-39765ee6.js} +3 -11
  36. package/dist/cjs/ToggleButton.js +35 -16
  37. package/dist/cjs/{_rollupPluginBabelHelpers-280a574c.js → _rollupPluginBabelHelpers-4abdbfff.js} +11 -1
  38. package/dist/cjs/{index-e0583d76.js → index-d44a0a21.js} +87 -13
  39. package/dist/cjs/index.js +30 -25
  40. package/dist/cjs/initReactivesearch.js +177 -103
  41. package/dist/cjs/install-d0645b5f.js +1244 -0
  42. package/dist/cjs/install.js +41 -44
  43. package/dist/cjs/ssr-c333c82c.js +39 -0
  44. package/dist/cjs/{utils-d1ea9f95.js → utils-23afb20b.js} +2 -2
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-6de9d2a9.js} +9 -4
  47. package/dist/es/Button-8b211174.js +59 -0
  48. package/dist/es/{DownShift-d8f2500f.js → CancelSvg-4d9e0857.js} +56 -17
  49. package/dist/es/Card-04b3c33e.js +23 -0
  50. package/dist/es/{ComponentWrapper-d0b21b95.js → ComponentWrapper-bbb717bc.js} +40 -21
  51. package/dist/es/Container-4383c6f0.js +10 -0
  52. package/dist/es/DataSearch-7a8a9368.js +2158 -0
  53. package/dist/es/DataSearch.js +17 -2150
  54. package/dist/es/{DropDown-5dbd69c2.js → DropDown-7639f223.js} +79 -94
  55. package/dist/es/DynamicRangeSlider.js +107 -43
  56. package/dist/es/Flex-aac91505.js +47 -0
  57. package/dist/es/FormControlList-fe389a2e.js +40 -0
  58. package/dist/es/Input-d1bb4868.js +71 -0
  59. package/dist/es/ListItem-bdb6d53d.js +39 -0
  60. package/dist/es/MultiDropdownList.js +102 -68
  61. package/dist/es/MultiList.js +80 -50
  62. package/dist/es/MultiRange.js +21 -16
  63. package/dist/es/{Pagination-800af44f.js → Pagination-3c50d4ba.js} +4 -3
  64. package/dist/es/RangeInput.js +29 -45
  65. package/dist/es/RangeSlider.js +32 -30
  66. package/dist/es/ReactiveBase.js +55 -34
  67. package/dist/es/ReactiveComponent.js +75 -62
  68. package/dist/es/ReactiveGoogleMap.js +326 -235
  69. package/dist/es/ReactiveList.js +188 -241
  70. package/dist/es/ResultCard.js +8 -6
  71. package/dist/es/ResultList.js +8 -6
  72. package/dist/es/SelectedFilters.js +27 -12
  73. package/dist/es/SingleDropdownList.js +88 -60
  74. package/dist/es/SingleList.js +53 -35
  75. package/dist/es/SingleRange.js +18 -13
  76. package/dist/es/StateProvider.js +11 -7
  77. package/dist/es/Title-579f8d6c.js +10 -0
  78. package/dist/es/ToggleButton.js +35 -16
  79. package/dist/es/{_rollupPluginBabelHelpers-c9fbe19f.js → _rollupPluginBabelHelpers-ecf6c03c.js} +11 -1
  80. package/dist/es/{index-1fe91a0a.js → index-5daa8276.js} +84 -14
  81. package/dist/es/index.js +26 -22
  82. package/dist/es/initReactivesearch.js +178 -104
  83. package/dist/es/install-183f5d19.js +1237 -0
  84. package/dist/es/install.js +39 -46
  85. package/dist/es/ssr-e3196de1.js +33 -0
  86. package/dist/es/{utils-ce3d86fd.js → utils-3a32e13f.js} +2 -2
  87. package/dist/es/version.js +1 -1
  88. package/dist/es/{vueTypes-98d938a9.js → vueTypes-9326e0be.js} +9 -4
  89. package/package.json +6 -4
  90. package/dist/cjs/Button-78d8bc26.js +0 -146
  91. package/dist/cjs/Card-b4af314f.js +0 -58
  92. package/dist/cjs/Flex-737c55be.js +0 -160
  93. package/dist/cjs/FormControlList-08dfb28e.js +0 -105
  94. package/dist/cjs/Input-643d02a7.js +0 -178
  95. package/dist/cjs/ListItem-0c58c5d2.js +0 -84
  96. package/dist/cjs/ssr-b7a729f9.js +0 -47
  97. package/dist/es/Button-6c71c66e.js +0 -137
  98. package/dist/es/Card-ecf70ba1.js +0 -51
  99. package/dist/es/Container-f5efec9e.js +0 -18
  100. package/dist/es/Flex-40a74d8a.js +0 -155
  101. package/dist/es/FormControlList-b96aebef.js +0 -98
  102. package/dist/es/Input-dfd9dd40.js +0 -170
  103. package/dist/es/ListItem-da73bc7d.js +0 -77
  104. package/dist/es/Title-22c2f3bf.js +0 -18
  105. package/dist/es/ssr-2f57791d.js +0 -41
@@ -1,33 +1,26 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-c9fbe19f.js';
2
+ import { _ as _taggedTemplateLiteralLoose, 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
+ import { withClickIds } from '@appbaseio/reactivecore/lib/utils/helper';
5
6
  import { css } from 'emotion';
6
7
  import styled from '@appbaseio/vue-emotion';
7
8
  import 'polished';
8
- import './Button-6c71c66e.js';
9
- import { t as types } from './vueTypes-98d938a9.js';
10
- import { P as Pagination } from './Pagination-800af44f.js';
9
+ import './Button-8b211174.js';
10
+ import { t as types } from './vueTypes-9326e0be.js';
11
+ import { P as Pagination } from './Pagination-3c50d4ba.js';
11
12
  import '@appbaseio/reactivecore/lib/utils/transform';
12
13
  import 'redux';
13
- import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-1fe91a0a.js';
14
- import { C as ComponentWrapper } from './ComponentWrapper-d0b21b95.js';
14
+ import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-5daa8276.js';
15
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
15
16
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
16
- import './Title-22c2f3bf.js';
17
- import { c as container } from './ListItem-da73bc7d.js';
18
- import { c as container$1 } from './Card-ecf70ba1.js';
19
- import { F as Flex } from './Flex-40a74d8a.js';
17
+ import './Title-579f8d6c.js';
18
+ import { c as container } from './ListItem-bdb6d53d.js';
19
+ import { c as container$1 } from './Card-04b3c33e.js';
20
+ import { F as Flex } from './Flex-aac91505.js';
20
21
 
21
- function _templateObject() {
22
- var data = _taggedTemplateLiteralLoose(["\n\twidth: 110px;\n"]);
23
-
24
- _templateObject = function _templateObject() {
25
- return data;
26
- };
27
-
28
- return data;
29
- }
30
- var PoweredByImage = styled('img')(_templateObject());
22
+ var _templateObject;
23
+ var PoweredByImage = styled('img')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\twidth: 110px;\n"])));
31
24
 
32
25
  var PoweredBy = {
33
26
  functional: true,
@@ -84,27 +77,9 @@ ResultCardsWrapper.install = function (Vue) {
84
77
  Vue.component(ResultCardsWrapper.name, ResultCardsWrapper);
85
78
  };
86
79
 
87
- function _templateObject2() {
88
- var data = _taggedTemplateLiteralLoose(["\n\tcolor: #424242;\n\theight: 32px;\n\tfont-size: 0.82rem;\n\tpadding: 0 25px 0 10px;\n\tbackground: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHJlY3QgY2xhc3M9ImNscy0xIiB3aWR0aD0iNC45NSIgaGVpZ2h0PSIxMCIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxLjQxIDQuNjcgMi40OCAzLjE4IDMuNTQgNC42NyAxLjQxIDQuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iMy41NCA1LjMzIDIuNDggNi44MiAxLjQxIDUuMzMgMy41NCA1LjMzIi8+PC9zdmc+)\n\t\tno-repeat 95% 50%;\n\tbackground-color: #fff;\n\t-moz-appearance: none;\n\t-webkit-appearance: none;\n\tappearance: none;\n\t-webkit-border-radius: 0;\n\tborder-radius: 0;\n\tborder: 0;\n\toutline: 1px solid #ddd;\n\toutline-offset: -1px;\n"]);
89
-
90
- _templateObject2 = function _templateObject2() {
91
- return data;
92
- };
93
-
94
- return data;
95
- }
96
-
97
- function _templateObject$1() {
98
- var data = _taggedTemplateLiteralLoose(["\n\tflex-grow: 1;\n\tfont-size: 0.82rem;\n"]);
99
-
100
- _templateObject$1 = function _templateObject() {
101
- return data;
102
- };
103
-
104
- return data;
105
- }
106
- var resultStats = css(_templateObject$1());
107
- var sortOptions = css(_templateObject2());
80
+ var _templateObject$1, _templateObject2;
81
+ var resultStats = css(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n\tflex-grow: 1;\n\tfont-size: 0.82rem;\n"])));
82
+ var sortOptions = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n\tcolor: #424242;\n\theight: 32px;\n\tfont-size: 0.82rem;\n\tpadding: 0 25px 0 10px;\n\tbackground: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHJlY3QgY2xhc3M9ImNscy0xIiB3aWR0aD0iNC45NSIgaGVpZ2h0PSIxMCIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxLjQxIDQuNjcgMi40OCAzLjE4IDMuNTQgNC42NyAxLjQxIDQuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iMy41NCA1LjMzIDIuNDggNi44MiAxLjQxIDUuMzMgMy41NCA1LjMzIi8+PC9zdmc+)\n\t\tno-repeat 95% 50%;\n\tbackground-color: #fff;\n\t-moz-appearance: none;\n\t-webkit-appearance: none;\n\tappearance: none;\n\t-webkit-border-radius: 0;\n\tborder-radius: 0;\n\tborder: 0;\n\toutline: 1px solid #ddd;\n\toutline-offset: -1px;\n"])));
108
83
 
109
84
  var recordImpressions = Actions.recordImpressions;
110
85
  var isEqual = helper.isEqual;
@@ -278,8 +253,7 @@ var ImpressionTracker$1 = connect(function () {
278
253
  return null;
279
254
  }, mapDispatchToProps)(ImpressionTracker);
280
255
 
281
- var setStreaming = Actions.setStreaming,
282
- setQueryOptions = Actions.setQueryOptions,
256
+ var setQueryOptions = Actions.setQueryOptions,
283
257
  updateQuery = Actions.updateQuery,
284
258
  loadMore = Actions.loadMore,
285
259
  setValue = Actions.setValue,
@@ -290,9 +264,10 @@ var isEqual$1 = helper.isEqual,
290
264
  getQueryOptions = helper.getQueryOptions,
291
265
  getClassName = helper.getClassName,
292
266
  parseHits = helper.parseHits,
293
- getOptionsFromQuery = helper.getOptionsFromQuery,
294
267
  getCompositeAggsQuery = helper.getCompositeAggsQuery,
295
- getResultStats = helper.getResultStats;
268
+ getResultStats = helper.getResultStats,
269
+ extractQueryFromCustomQuery = helper.extractQueryFromCustomQuery,
270
+ getOptionsForCustomQuery = helper.getOptionsForCustomQuery;
296
271
  var ReactiveList = {
297
272
  name: 'ReactiveList',
298
273
  components: {
@@ -300,16 +275,17 @@ var ReactiveList = {
300
275
  ResultCardsWrapper: ResultCardsWrapper
301
276
  },
302
277
  data: function data() {
303
- var props = this.$props;
304
278
  var currentPageState = 0;
279
+ var defaultPage = this.defaultPage || -1;
305
280
 
306
- if (props.currentPage) {
307
- currentPageState = Math.max(props.currentPage - 1, 0);
281
+ if (defaultPage >= 0) {
282
+ currentPageState = defaultPage;
283
+ } else if (this.currentPage) {
284
+ currentPageState = Math.max(this.currentPage - 1, 0);
308
285
  }
309
286
 
310
287
  this.__state = {
311
- from: currentPageState * props.size,
312
- isLoading: true,
288
+ from: currentPageState * this.size,
313
289
  currentPageState: currentPageState
314
290
  };
315
291
  return this.__state;
@@ -319,29 +295,47 @@ var ReactiveList = {
319
295
 
320
296
  var _this$$props = this.$props,
321
297
  distinctField = _this$$props.distinctField,
322
- distinctFieldConfig = _this$$props.distinctFieldConfig; // no support for pagination and aggregationField together
298
+ distinctFieldConfig = _this$$props.distinctFieldConfig,
299
+ index = _this$$props.index; // no support for pagination and aggregationField together
323
300
 
324
301
  if (this.pagination && this.aggregationField) {
325
302
  console.warn('Pagination is not supported when aggregationField is present. The list will be rendered with infinite scroll');
326
303
  }
327
304
 
328
- if (this.config.enableAppbase && this.aggregationField && this.aggregationField !== '') {
305
+ if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
329
306
  console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
330
307
  }
331
308
 
332
- if (!this.config.enableAppbase && (distinctField || distinctFieldConfig)) {
309
+ if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
333
310
  console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
334
311
  }
335
312
 
336
- if (this.defaultPage >= 0) {
337
- this.currentPageState = this.defaultPage;
313
+ if (!this.enableAppbase && index) {
314
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
315
+ }
316
+
317
+ var defaultPage = this.defaultPage || -1;
318
+
319
+ if (defaultPage >= 0) {
320
+ this.currentPageState = defaultPage;
338
321
  this.from = this.currentPageState * this.$props.size;
339
322
  }
340
323
 
341
324
  this.internalComponent = this.$props.componentId + "__internal";
342
- this.sortOptionIndex = this.defaultSortOption ? this.sortOptions.findIndex(function (s) {
343
- return s.label === _this.defaultSortOption;
344
- }) : 0;
325
+ this.sortOptionIndex = 0;
326
+
327
+ if (this.defaultSortOption && this.sortOptions && Array.isArray(this.sortOptions)) {
328
+ this.sortOptionIndex = this.sortOptions.findIndex(function (s) {
329
+ return s.label === _this.defaultSortOption;
330
+ });
331
+ }
332
+
333
+ if (this.urlSortOption) {
334
+ this.sortOptionIndex = this.$props.sortOptions.findIndex(function (s) {
335
+ return s.label === _this.urlSortOption;
336
+ }) || 0;
337
+ }
338
+
345
339
  this.updateComponentProps(this.componentId, {
346
340
  from: this.from
347
341
  }, componentTypes.reactiveList);
@@ -351,7 +345,7 @@ var ReactiveList = {
351
345
  },
352
346
  props: {
353
347
  currentPage: VueTypes.number.def(0),
354
- includeFields: types.includeFields.def(['*']),
348
+ includeFields: types.includeFields,
355
349
  // component props
356
350
  className: types.string,
357
351
  componentId: types.stringRequired,
@@ -360,7 +354,7 @@ var ReactiveList = {
360
354
  aggregationSize: VueTypes.number,
361
355
  defaultQuery: types.func,
362
356
  defaultSortOption: types.string,
363
- excludeFields: types.excludeFields.def([]),
357
+ excludeFields: types.excludeFields,
364
358
  innerClass: types.style,
365
359
  listClass: VueTypes.string.def(''),
366
360
  loader: types.title,
@@ -372,7 +366,7 @@ var ReactiveList = {
372
366
  pages: VueTypes.number.def(5),
373
367
  pagination: VueTypes.bool.def(false),
374
368
  infiniteScroll: VueTypes.bool.def(true),
375
- paginationAt: types.paginationAt.def('bottom'),
369
+ paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
376
370
  react: types.react,
377
371
  scrollOnChange: VueTypes.bool.def(true),
378
372
  showResultStats: VueTypes.bool.def(true),
@@ -380,12 +374,12 @@ var ReactiveList = {
380
374
  size: VueTypes.number.def(10),
381
375
  sortBy: types.sortBy,
382
376
  sortOptions: types.sortOptions,
383
- stream: types.bool,
384
377
  URLParams: VueTypes.bool.def(false),
385
378
  prevLabel: types.string,
386
379
  nextLabel: types.string,
387
380
  distinctField: types.string,
388
- distinctFieldConfig: types.props
381
+ distinctFieldConfig: types.props,
382
+ index: VueTypes.string
389
383
  },
390
384
  computed: {
391
385
  shouldRenderPagination: function shouldRenderPagination() {
@@ -401,12 +395,9 @@ var ReactiveList = {
401
395
  return this.$listeners && this.$listeners.resultStats;
402
396
  },
403
397
  stats: function stats() {
404
- var _this$getAllData = this.getAllData(),
405
- filteredResults = _this$getAllData.filteredResults;
406
-
407
- return _extends(_extends({}, getResultStats(this)), {}, {
398
+ return _extends({}, getResultStats(this), {
408
399
  currentPage: this.currentPageState,
409
- displayedResults: filteredResults.length
400
+ displayedResults: this.data.length
410
401
  });
411
402
  },
412
403
  hasCustomRender: function hasCustomRender() {
@@ -415,6 +406,27 @@ var ReactiveList = {
415
406
  showInfiniteScroll: function showInfiniteScroll() {
416
407
  // Pagination has higher priority then infinite scroll
417
408
  return this.infiniteScroll && !this.shouldRenderPagination;
409
+ },
410
+ data: function data() {
411
+ var results = parseHits(this.hits) || [];
412
+ var parsedPromotedResults = parseHits(this.promotedResults) || [];
413
+ var filteredResults = results;
414
+
415
+ if (parsedPromotedResults.length) {
416
+ var ids = parsedPromotedResults.map(function (item) {
417
+ return item._id;
418
+ }).filter(Boolean);
419
+
420
+ if (ids) {
421
+ filteredResults = filteredResults.filter(function (item) {
422
+ return !ids.includes(item._id);
423
+ });
424
+ }
425
+
426
+ filteredResults = [].concat(parsedPromotedResults, filteredResults);
427
+ }
428
+
429
+ return withClickIds(filteredResults);
418
430
  }
419
431
  },
420
432
  watch: {
@@ -453,24 +465,16 @@ var ReactiveList = {
453
465
  var options = getQueryOptions(this.$props);
454
466
  options.from = 0;
455
467
  this.$defaultQuery = newVal(null, this.$props);
456
-
457
- var _ref = this.$defaultQuery || {},
458
- sort = _ref.sort,
459
- query = _ref.query;
460
-
461
- if (sort) {
462
- options.sort = this.$defaultQuery.sort;
463
- }
464
-
465
- var queryOptions = getOptionsFromQuery(this.$defaultQuery);
468
+ var query = extractQueryFromCustomQuery(this.$defaultQuery);
469
+ var queryOptions = getOptionsForCustomQuery(this.$defaultQuery);
466
470
 
467
471
  if (queryOptions) {
468
- options = _extends(_extends({}, options), getOptionsFromQuery(this.$defaultQuery));
472
+ options = _extends({}, options, queryOptions);
469
473
  } // Update calculated default query in store
470
474
 
471
475
 
472
476
  updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props);
473
- this.setQueryOptions(this.$props.componentId, _extends(_extends({}, options), this.getAggsQuery()), !query);
477
+ this.setQueryOptions(this.$props.componentId, _extends({}, options, this.getAggsQuery()), !query);
474
478
  this.updateQuery({
475
479
  componentId: this.internalComponent,
476
480
  query: query
@@ -480,14 +484,6 @@ var ReactiveList = {
480
484
  this.from = 0;
481
485
  }
482
486
  },
483
- stream: function stream(newVal, oldVal) {
484
- if (oldVal !== newVal) {
485
- this.setStreaming(this.$props.componentId, newVal);
486
- }
487
- },
488
- streamHits: function streamHits() {
489
- this.$emit('data', this.getData());
490
- },
491
487
  promotedResults: function promotedResults(newVal, oldVal) {
492
488
  if (!isEqual$1(newVal, oldVal)) {
493
489
  this.$emit('data', this.getData());
@@ -504,7 +500,7 @@ var ReactiveList = {
504
500
  }
505
501
  },
506
502
  hits: function hits(newVal, oldVal) {
507
- this.$emit('data', this.getAllData());
503
+ this.$emit('data', this.getData());
508
504
 
509
505
  if (this.shouldRenderPagination) {
510
506
  // called when page is changed
@@ -549,45 +545,39 @@ var ReactiveList = {
549
545
  } // handle window url history change (on native back and forth interactions)
550
546
 
551
547
  },
552
- defaultPage: function defaultPage(newVal) {
553
- if (this.currentPageState !== newVal && this.defaultPage !== newVal) {
548
+ defaultPage: function defaultPage(newVal, oldVal) {
549
+ if (this.currentPageState !== newVal && oldVal !== newVal) {
554
550
  this.setPage(newVal >= 0 ? newVal : 0);
555
551
  }
556
552
  }
557
553
  },
558
554
  mounted: function mounted() {
559
- if (this.$props.stream) {
560
- this.setStreaming(this.$props.componentId, true);
561
- }
562
-
563
555
  if (this.defaultPage < 0 && this.currentPage > 0) {
564
- if (this.$props.URLParams) {
565
- this.setPageURL(this.$props.componentId, this.currentPage, this.$props.componentId, false, true);
566
- }
556
+ this.setPageURL(this.$props.componentId, this.currentPage, this.$props.componentId, false, this.URLParams);
567
557
  }
568
558
 
569
559
  var options = getQueryOptions(this.$props);
570
560
  options.from = this.$data.from;
571
561
 
572
- if (this.$props.sortOptions) {
573
- var _ref2;
562
+ if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
563
+ var _ref;
574
564
 
575
- var sortField = this.$props.sortOptions[this.sortOptionIndex].dataField;
576
- var sortBy = this.$props.sortOptions[this.sortOptionIndex].sortBy;
577
- options.sort = [(_ref2 = {}, _ref2[sortField] = {
565
+ var sortField = this.sortOptions[this.sortOptionIndex].dataField;
566
+ var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
567
+ options.sort = [(_ref = {}, _ref[sortField] = {
578
568
  order: sortBy
579
- }, _ref2)]; // To handle sort options for RS API
569
+ }, _ref)]; // To handle sort options for RS API
580
570
 
581
571
  this.updateComponentProps(this.componentId, {
582
572
  dataField: sortField,
583
573
  sortBy: sortBy
584
574
  }, componentTypes.reactiveList);
585
575
  } else if (this.$props.sortBy) {
586
- var _ref3;
576
+ var _ref2;
587
577
 
588
- options.sort = [(_ref3 = {}, _ref3[this.$props.dataField] = {
578
+ options.sort = [(_ref2 = {}, _ref2[this.$props.dataField] = {
589
579
  order: this.$props.sortBy
590
- }, _ref3)];
580
+ }, _ref2)];
591
581
  } // Override sort query with defaultQuery's sort if defined
592
582
 
593
583
 
@@ -595,22 +585,15 @@ var ReactiveList = {
595
585
 
596
586
  if (this.$props.defaultQuery) {
597
587
  this.$defaultQuery = this.$props.defaultQuery();
598
- options = _extends(_extends({}, options), getOptionsFromQuery(this.$defaultQuery));
599
-
600
- if (this.$defaultQuery.sort) {
601
- options.sort = this.$defaultQuery.sort;
602
- } // Update calculated default query in store
603
-
588
+ options = _extends({}, options, getOptionsForCustomQuery(this.$defaultQuery)); // Update calculated default query in store
604
589
 
605
590
  updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props);
606
591
  } // execute is set to false at the time of mount
607
592
 
608
593
 
609
- var _ref4 = this.$defaultQuery || {},
610
- query = _ref4.query;
611
-
594
+ var query = extractQueryFromCustomQuery(this.$defaultQuery);
612
595
  var execute = false;
613
- this.setQueryOptions(this.$props.componentId, _extends(_extends({}, options), this.getAggsQuery()), execute);
596
+ this.setQueryOptions(this.$props.componentId, _extends({}, options, this.getAggsQuery()), execute);
614
597
 
615
598
  if (this.$defaultQuery) {
616
599
  this.updateQuery({
@@ -638,16 +621,15 @@ var ReactiveList = {
638
621
  var h = arguments[0];
639
622
  var hits = this.$data.hits;
640
623
  var results = parseHits(hits) || [];
641
- var streamResults = parseHits(this.$data.streamHits) || [];
642
624
  return h("div", {
643
625
  "style": this.$props.style,
644
626
  "class": this.$props.className
645
627
  }, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex, {
646
628
  "attrs": {
647
- "labelPosition": this.$props.sortOptions ? 'right' : 'left'
629
+ "labelPosition": this.sortOptions ? 'right' : 'left'
648
630
  },
649
631
  "class": getClassName(this.$props.innerClass, 'resultsInfo')
650
- }, [this.$props.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats ? this.renderStats() : null]), !this.isLoading && results.length === 0 && streamResults.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
632
+ }, [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, {
651
633
  "attrs": {
652
634
  "pages": this.$props.pages,
653
635
  "totalPages": this.totalPages,
@@ -657,7 +639,7 @@ var ReactiveList = {
657
639
  "prevLabel": this.$props.prevLabel,
658
640
  "nextLabel": this.$props.nextLabel
659
641
  }
660
- }) : null, this.renderResults(), this.isLoading && !this.shouldRenderPagination ? this.$props.loader || h("div", {
642
+ }) : null, this.renderResults(), this.isLoading && !this.shouldRenderPagination ? this.$scopedSlots.loader || this.$props.loader || h("div", {
661
643
  "style": {
662
644
  textAlign: 'center',
663
645
  margin: '20px 0',
@@ -674,7 +656,7 @@ var ReactiveList = {
674
656
  "prevLabel": this.$props.prevLabel,
675
657
  "nextLabel": this.$props.nextLabel
676
658
  }
677
- }) : null, this.config.url.endsWith('appbase.io') && results.length ? h(Flex, {
659
+ }) : null, this.url.endsWith('appbase.io') && results.length ? h(Flex, {
678
660
  "attrs": {
679
661
  "direction": "row-reverse"
680
662
  },
@@ -696,24 +678,10 @@ var ReactiveList = {
696
678
 
697
679
  var h = this.$createElement;
698
680
  var size = this.$props.size;
699
- var hits = this.$data.hits;
700
- var results = parseHits(hits) || [];
701
- var streamResults = parseHits(this.$data.streamHits) || [];
702
- var filteredResults = results;
703
681
  var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
704
-
705
- if (streamResults.length) {
706
- var ids = streamResults.map(function (item) {
707
- return item._id;
708
- });
709
- filteredResults = filteredResults.filter(function (item) {
710
- return !ids.includes(item._id);
711
- });
712
- }
713
-
714
682
  var element = this.hasCustomRender ? this.getComponent() : h("div", {
715
683
  "class": this.$props.listClass + " " + getClassName(this.$props.innerClass, 'list')
716
- }, [[].concat(streamResults, filteredResults).map(function (item, index) {
684
+ }, [this.data.map(function (item, index) {
717
685
  return renderItem({
718
686
  item: item,
719
687
  triggerClickAnalytics: function triggerClickAnalytics() {
@@ -724,7 +692,7 @@ var ReactiveList = {
724
692
 
725
693
  return this.analytics ? h(ImpressionTracker$1, {
726
694
  "attrs": {
727
- "hits": filteredResults
695
+ "hits": this.data
728
696
  }
729
697
  }, [element]) : element;
730
698
  },
@@ -732,24 +700,27 @@ var ReactiveList = {
732
700
  var options = getQueryOptions(props);
733
701
  options.from = this.$data.from;
734
702
 
735
- if (props.sortOptions) {
736
- var _ref5;
737
-
703
+ if (props.sortOptions && Array.isArray(props.sortOptions)) {
738
704
  var sortOptionIndex = props.defaultSortOption ? props.sortOptions.findIndex(function (s) {
739
705
  return s.label === props.defaultSortOption;
740
706
  }) : 0;
741
- options.sort = [(_ref5 = {}, _ref5[props.sortOptions[sortOptionIndex].dataField] = {
742
- order: props.sortOptions[sortOptionIndex].sortBy
743
- }, _ref5)];
707
+
708
+ if (props.sortOptions[sortOptionIndex]) {
709
+ var _ref3;
710
+
711
+ options.sort = [(_ref3 = {}, _ref3[props.sortOptions[sortOptionIndex].dataField] = {
712
+ order: props.sortOptions[sortOptionIndex].sortBy
713
+ }, _ref3)];
714
+ }
744
715
  } else if (props.sortBy) {
745
- var _ref6;
716
+ var _ref4;
746
717
 
747
- options.sort = [(_ref6 = {}, _ref6[props.dataField] = {
718
+ options.sort = [(_ref4 = {}, _ref4[props.dataField] = {
748
719
  order: props.sortBy
749
- }, _ref6)];
720
+ }, _ref4)];
750
721
  }
751
722
 
752
- this.setQueryOptions(this.$props.componentId, _extends(_extends({}, options), this.getAggsQuery()), true);
723
+ this.setQueryOptions(this.$props.componentId, _extends({}, options, this.getAggsQuery()), true);
753
724
  },
754
725
  getAggsQuery: function getAggsQuery() {
755
726
  var _this$$props2 = this.$props,
@@ -791,12 +762,12 @@ var ReactiveList = {
791
762
  return;
792
763
  }
793
764
 
794
- var options = _extends(_extends({}, getQueryOptions(this.$props)), this.getAggsQuery());
765
+ var options = _extends({}, getQueryOptions(this.$props), this.getAggsQuery());
795
766
 
796
767
  this.from = value; // Update default query to support pagination for aggregationField
797
768
 
798
769
  updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props);
799
- this.loadMoreAction(this.$props.componentId, _extends(_extends({}, options), {}, {
770
+ this.loadMoreAction(this.$props.componentId, _extends({}, options, {
800
771
  from: value
801
772
  }), true, !!this.aggregationField);
802
773
  }
@@ -811,13 +782,10 @@ var ReactiveList = {
811
782
  options.from = this.$data.from;
812
783
  this.from = value;
813
784
  this.currentPageState = page;
814
- this.loadMoreAction(this.$props.componentId, _extends(_extends({}, options), {}, {
785
+ this.loadMoreAction(this.$props.componentId, _extends({}, options, {
815
786
  from: value
816
787
  }), false);
817
-
818
- if (this.$props.URLParams) {
819
- this.setPageURL(this.$props.componentId, page + 1, this.$props.componentId, false, true);
820
- }
788
+ this.setPageURL(this.$props.componentId, page + 1, this.$props.componentId, false, this.URLParams);
821
789
  }
822
790
  },
823
791
  renderStats: function renderStats() {
@@ -831,7 +799,7 @@ var ReactiveList = {
831
799
  if (this.stats.numberOfResults) {
832
800
  return h("p", {
833
801
  "class": resultStats + " " + getClassName(this.$props.innerClass, 'resultStats')
834
- }, [this.stats.numberOfResults, " results found in ", this.stats.time, "ms"]);
802
+ }, [this.stats.numberOfResults, " results found in ", this.stats.time || 0, "ms"]);
835
803
  }
836
804
 
837
805
  return null;
@@ -839,31 +807,42 @@ var ReactiveList = {
839
807
  renderNoResult: function renderNoResult() {
840
808
  var h = this.$createElement;
841
809
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
810
+
811
+ if (this.$scopedSlots.renderNoResults) {
812
+ return isFunction(renderNoResults) ? renderNoResults() : renderNoResults;
813
+ }
814
+
842
815
  return h("p", {
843
816
  "class": getClassName(this.$props.innerClass, 'noResults') || null
844
817
  }, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
845
818
  },
846
819
  handleSortChange: function handleSortChange(e) {
847
- var _ref7;
820
+ var index = e.target.value;
848
821
 
849
- var index = e.target.value; // This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
850
-
851
- var options = getQueryOptions(this.$props);
852
- options.from = 0;
853
- var sortField = this.$props.sortOptions[index].dataField;
854
- var sortBy = this.$props.sortOptions[index].sortBy;
855
- options.sort = [(_ref7 = {}, _ref7[sortField] = {
856
- order: sortBy
857
- }, _ref7)];
858
- this.sortOptionIndex = index; // To handle sort options for RS API
822
+ if (this.sortOptions && this.sortOptions[index]) {
823
+ var _ref5;
859
824
 
860
- this.updateComponentProps(this.componentId, {
861
- dataField: sortField,
862
- sortBy: sortBy
863
- }, componentTypes.reactiveList);
864
- this.setQueryOptions(this.$props.componentId, options, true);
865
- this.currentPageState = 0;
866
- this.from = 0;
825
+ // This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
826
+ var options = getQueryOptions(this.$props);
827
+ options.from = 0;
828
+ var sortField = this.sortOptions[index].dataField;
829
+ var sortBy = this.sortOptions[index].sortBy;
830
+ options.sort = [(_ref5 = {}, _ref5[sortField] = {
831
+ order: sortBy
832
+ }, _ref5)];
833
+ this.sortOptionIndex = index; // To handle sort options for RS API
834
+
835
+ this.updateComponentProps(this.componentId, {
836
+ dataField: sortField,
837
+ sortBy: sortBy
838
+ }, componentTypes.reactiveList);
839
+ this.setQueryOptions(this.$props.componentId, options, true);
840
+ this.setPage(0);
841
+ this.currentPageState = 0;
842
+ this.from = 0;
843
+ var sortOption = this.$props.sortOptions[this.sortOptionIndex] ? this.$props.sortOptions[this.sortOptionIndex].label : null;
844
+ this.setPageURL(this.$props.componentId + "sortOption", sortOption, this.$props.componentId + "sortOption", false, this.$props.URLParams);
845
+ }
867
846
  },
868
847
  triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
869
848
  var docId = documentId;
@@ -897,7 +876,7 @@ var ReactiveList = {
897
876
  "domProps": {
898
877
  "value": this.sortOptionIndex
899
878
  }
900
- }, [this.$props.sortOptions.map(function (sort, index) {
879
+ }, [this.sortOptions.map(function (sort, index) {
901
880
  return h("option", {
902
881
  "key": sort.label,
903
882
  "domProps": {
@@ -907,11 +886,11 @@ var ReactiveList = {
907
886
  })]);
908
887
  },
909
888
  withClickIds: function withClickIds(results) {
910
- var _this$getAllData2 = this.getAllData(),
911
- base = _this$getAllData2.base;
889
+ var _this$getAllData = this.getAllData(),
890
+ base = _this$getAllData.base;
912
891
 
913
892
  return results.map(function (result, index) {
914
- return _extends(_extends({}, result), {}, {
893
+ return _extends({}, result, {
915
894
  _click_id: base + index
916
895
  });
917
896
  });
@@ -923,41 +902,12 @@ var ReactiveList = {
923
902
  aggregationData = this.aggregationData,
924
903
  customData = this.customData,
925
904
  currentPage = this.currentPage,
926
- hits = this.hits,
927
- streamHits = this.streamHits;
905
+ hits = this.hits;
928
906
  var results = parseHits(hits) || [];
929
- var streamResults = parseHits(streamHits) || [];
930
907
  var parsedPromotedResults = parseHits(promotedResults) || [];
931
- var filteredResults = results;
932
908
  var base = currentPage * size;
933
-
934
- if (streamResults.length) {
935
- var ids = streamResults.map(function (item) {
936
- return item._id;
937
- });
938
- filteredResults = filteredResults.filter(function (item) {
939
- return !ids.includes(item._id);
940
- });
941
- }
942
-
943
- if (parsedPromotedResults.length) {
944
- var _ids = parsedPromotedResults.map(function (item) {
945
- return item._id;
946
- }).filter(Boolean);
947
-
948
- if (_ids) {
949
- filteredResults = filteredResults.filter(function (item) {
950
- return !_ids.includes(item._id);
951
- });
952
- }
953
-
954
- filteredResults = [].concat(streamResults, parsedPromotedResults, filteredResults);
955
- }
956
-
957
909
  return {
958
910
  results: results,
959
- streamResults: streamResults,
960
- filteredResults: filteredResults,
961
911
  customData: customData || {},
962
912
  promotedResults: parsedPromotedResults,
963
913
  aggregationData: aggregationData,
@@ -967,18 +917,15 @@ var ReactiveList = {
967
917
  };
968
918
  },
969
919
  getData: function getData() {
970
- var _this$getAllData3 = this.getAllData(),
971
- streamResults = _this$getAllData3.streamResults,
972
- filteredResults = _this$getAllData3.filteredResults,
973
- promotedResults = _this$getAllData3.promotedResults,
974
- aggregationData = _this$getAllData3.aggregationData,
975
- customData = _this$getAllData3.customData;
920
+ var _this$getAllData2 = this.getAllData(),
921
+ promotedResults = _this$getAllData2.promotedResults,
922
+ aggregationData = _this$getAllData2.aggregationData,
923
+ customData = _this$getAllData2.customData;
976
924
 
977
925
  return {
978
- data: this.withClickIds(filteredResults),
926
+ data: this.data,
979
927
  aggregationData: this.withClickIds(aggregationData || []),
980
- streamData: this.withClickIds(streamResults),
981
- promotedData: this.withClickIds(promotedResults),
928
+ promotedData: this.withClickIds(promotedResults || []),
982
929
  rawData: this.rawData,
983
930
  resultStats: this.stats,
984
931
  customData: customData
@@ -990,7 +937,7 @@ var ReactiveList = {
990
937
 
991
938
  var data = _extends({
992
939
  error: error,
993
- loading: isLoading,
940
+ loading: isLoading || false,
994
941
  loadMore: this.loadMore,
995
942
  // TODO: Remove in v2
996
943
  triggerAnalytics: this.triggerClickAnalytics,
@@ -1005,22 +952,23 @@ var ReactiveList = {
1005
952
 
1006
953
  var mapStateToProps = function mapStateToProps(state, props) {
1007
954
  return {
1008
- defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1 || -1,
955
+ defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
956
+ urlSortOption: state.selectedValues[props.componentId + "sortOption"] && state.selectedValues[props.componentId + "sortOption"].value,
1009
957
  hits: state.hits[props.componentId] && state.hits[props.componentId].hits,
1010
958
  rawData: state.rawData[props.componentId],
1011
- aggregationData: state.compositeAggregations[props.componentId] || [],
1012
- promotedResults: state.promotedResults[props.componentId] || [],
959
+ aggregationData: state.compositeAggregations[props.componentId],
960
+ promotedResults: state.promotedResults[props.componentId],
1013
961
  customData: state.customData[props.componentId],
1014
- streamHits: state.streamHits[props.componentId],
1015
- time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
962
+ time: state.hits[props.componentId] && state.hits[props.componentId].time,
1016
963
  total: state.hits[props.componentId] && state.hits[props.componentId].total,
1017
964
  hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
1018
965
  analytics: state.config && state.config.analytics,
1019
- config: state.config,
966
+ enableAppbase: state.config.enableAppbase,
967
+ url: state.config.url,
1020
968
  error: state.error[props.componentId],
1021
969
  afterKey: state.aggregations[props.componentId] && state.aggregations[props.componentId][props.aggregationField] && state.aggregations[props.componentId][props.aggregationField].after_key,
1022
970
  componentProps: state.props[props.componentId],
1023
- isLoading: state.isLoading[props.componentId] || false
971
+ isLoading: state.isLoading[props.componentId]
1024
972
  };
1025
973
  };
1026
974
 
@@ -1028,7 +976,6 @@ var mapDispatchtoProps = {
1028
976
  loadMoreAction: loadMore,
1029
977
  setPageURL: setValue,
1030
978
  setQueryOptions: setQueryOptions,
1031
- setStreaming: setStreaming,
1032
979
  updateQuery: updateQuery,
1033
980
  updateComponentProps: updateComponentProps,
1034
981
  setDefaultQuery: setDefaultQuery,
@@ -1036,11 +983,7 @@ var mapDispatchtoProps = {
1036
983
  }; // Only used for SSR
1037
984
 
1038
985
  ReactiveList.generateQueryOptions = function (props) {
1039
- // simulate default (includeFields and excludeFields) props to generate consistent query
1040
- var options = getQueryOptions(_extends({
1041
- includeFields: ['*'],
1042
- excludeFields: []
1043
- }, props));
986
+ var options = getQueryOptions(props);
1044
987
  var size = props.size,
1045
988
  dataField = props.dataField,
1046
989
  defaultSortOption = props.defaultSortOption,
@@ -1051,7 +994,7 @@ ReactiveList.generateQueryOptions = function (props) {
1051
994
  options.size = size || 10;
1052
995
 
1053
996
  var getSortOption = function getSortOption() {
1054
- var _ref9;
997
+ var _ref7;
1055
998
 
1056
999
  if (defaultSortOption) {
1057
1000
  var sortOption = sortOptionsNew.find(function (option) {
@@ -1059,35 +1002,39 @@ ReactiveList.generateQueryOptions = function (props) {
1059
1002
  });
1060
1003
 
1061
1004
  if (sortOption) {
1062
- var _ref8;
1005
+ var _ref6;
1063
1006
 
1064
- return _ref8 = {}, _ref8[sortOption.dataField] = {
1007
+ return _ref6 = {}, _ref6[sortOption.dataField] = {
1065
1008
  order: sortOption.sortBy
1066
- }, _ref8;
1009
+ }, _ref6;
1067
1010
  }
1068
1011
  }
1069
1012
 
1070
- return _ref9 = {}, _ref9[sortOptionsNew[0].dataField] = {
1013
+ return _ref7 = {}, _ref7[sortOptionsNew[0].dataField] = {
1071
1014
  order: sortOptionsNew[0].sortBy
1072
- }, _ref9;
1015
+ }, _ref7;
1073
1016
  };
1074
1017
 
1075
1018
  if (sortOptionsNew) {
1076
1019
  options.sort = [getSortOption()];
1077
1020
  } else if (sortBy) {
1078
- var _ref10;
1021
+ var _ref8;
1079
1022
 
1080
- options.sort = [(_ref10 = {}, _ref10[dataField] = {
1023
+ options.sort = [(_ref8 = {}, _ref8[dataField] = {
1081
1024
  order: sortBy
1082
- }, _ref10)];
1025
+ }, _ref8)];
1083
1026
  }
1084
1027
 
1085
1028
  return options;
1086
1029
  };
1087
1030
 
1031
+ ReactiveList.hasInternalComponent = function () {
1032
+ return true;
1033
+ };
1034
+
1088
1035
  var RLConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(ReactiveList), {
1089
1036
  componentType: componentTypes.reactiveList,
1090
- internalComponent: true
1037
+ internalComponent: ReactiveList.hasInternalComponent()
1091
1038
  });
1092
1039
 
1093
1040
  ReactiveList.install = function (Vue) {