@appbaseio/reactivesearch-vue 1.16.0-alpha.24 → 1.16.0-alpha.28

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 (55) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +581 -262
  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/DataSearch.js +10 -10
  6. package/dist/cjs/{DropDown-d3c78c41.js → DropDown-3c343026.js} +5 -3
  7. package/dist/cjs/DynamicRangeSlider.js +1 -1
  8. package/dist/cjs/MultiDropdownList.js +3 -2
  9. package/dist/cjs/MultiList.js +4 -3
  10. package/dist/cjs/MultiRange.js +1 -1
  11. package/dist/cjs/{Pagination-d4dbfd5a.js → Pagination-0b9ec0fc.js} +1 -1
  12. package/dist/cjs/RangeInput.js +1 -1
  13. package/dist/cjs/RangeSlider.js +1 -1
  14. package/dist/cjs/ReactiveBase.js +18 -10
  15. package/dist/cjs/ReactiveComponent.js +12 -12
  16. package/dist/cjs/ReactiveGoogleMap.js +2 -2
  17. package/dist/cjs/ReactiveList.js +88 -78
  18. package/dist/cjs/ResultCard.js +1 -1
  19. package/dist/cjs/ResultList.js +1 -1
  20. package/dist/cjs/SelectedFilters.js +1 -1
  21. package/dist/cjs/SingleDropdownList.js +6 -3
  22. package/dist/cjs/SingleList.js +5 -4
  23. package/dist/cjs/SingleRange.js +1 -1
  24. package/dist/cjs/ToggleButton.js +2 -2
  25. package/dist/cjs/index.js +7 -4
  26. package/dist/cjs/initReactivesearch.js +32 -13
  27. package/dist/cjs/install.js +5 -4
  28. package/dist/cjs/version.js +1 -1
  29. package/dist/cjs/{vueTypes-409348b0.js → vueTypes-829a5f2c.js} +5 -1
  30. package/dist/es/DataSearch.js +10 -10
  31. package/dist/es/{DropDown-8894cc22.js → DropDown-c5ab660f.js} +5 -3
  32. package/dist/es/DynamicRangeSlider.js +1 -1
  33. package/dist/es/MultiDropdownList.js +3 -2
  34. package/dist/es/MultiList.js +4 -3
  35. package/dist/es/MultiRange.js +1 -1
  36. package/dist/es/{Pagination-a2ab7fcb.js → Pagination-e8216949.js} +1 -1
  37. package/dist/es/RangeInput.js +1 -1
  38. package/dist/es/RangeSlider.js +1 -1
  39. package/dist/es/ReactiveBase.js +18 -10
  40. package/dist/es/ReactiveComponent.js +12 -12
  41. package/dist/es/ReactiveGoogleMap.js +2 -2
  42. package/dist/es/ReactiveList.js +88 -78
  43. package/dist/es/ResultCard.js +1 -1
  44. package/dist/es/ResultList.js +1 -1
  45. package/dist/es/SelectedFilters.js +1 -1
  46. package/dist/es/SingleDropdownList.js +6 -3
  47. package/dist/es/SingleList.js +5 -4
  48. package/dist/es/SingleRange.js +1 -1
  49. package/dist/es/ToggleButton.js +2 -2
  50. package/dist/es/index.js +7 -4
  51. package/dist/es/initReactivesearch.js +32 -13
  52. package/dist/es/install.js +5 -4
  53. package/dist/es/version.js +1 -1
  54. package/dist/es/{vueTypes-a9b9d5c9.js → vueTypes-98819a12.js} +5 -1
  55. package/package.json +3 -3
@@ -2,12 +2,13 @@ import { Actions, helper } from '@appbaseio/reactivecore';
2
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
9
  import './Button-799185e2.js';
9
- import { t as types } from './vueTypes-a9b9d5c9.js';
10
- import { P as Pagination } from './Pagination-a2ab7fcb.js';
10
+ import { t as types } from './vueTypes-98819a12.js';
11
+ import { P as Pagination } from './Pagination-e8216949.js';
11
12
  import '@appbaseio/reactivecore/lib/utils/transform';
12
13
  import 'redux';
13
14
  import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-4755c9a0.js';
@@ -320,9 +321,14 @@ var ReactiveList = {
320
321
  }
321
322
 
322
323
  this.internalComponent = this.$props.componentId + "__internal";
323
- this.sortOptionIndex = this.defaultSortOption ? this.sortOptions.findIndex(function (s) {
324
- return s.label === _this.defaultSortOption;
325
- }) : 0;
324
+ this.sortOptionIndex = 0;
325
+
326
+ if (this.defaultSortOption && this.sortOptions && Array.isArray(this.sortOptions)) {
327
+ this.sortOptionIndex = this.sortOptions.findIndex(function (s) {
328
+ return s.label === _this.defaultSortOption;
329
+ });
330
+ }
331
+
326
332
  this.updateComponentProps(this.componentId, {
327
333
  from: this.from
328
334
  }, componentTypes.reactiveList);
@@ -332,7 +338,7 @@ var ReactiveList = {
332
338
  },
333
339
  props: {
334
340
  currentPage: VueTypes.number.def(0),
335
- includeFields: types.includeFields.def(['*']),
341
+ includeFields: types.includeFields,
336
342
  // component props
337
343
  className: types.string,
338
344
  componentId: types.stringRequired,
@@ -341,7 +347,7 @@ var ReactiveList = {
341
347
  aggregationSize: VueTypes.number,
342
348
  defaultQuery: types.func,
343
349
  defaultSortOption: types.string,
344
- excludeFields: types.excludeFields.def([]),
350
+ excludeFields: types.excludeFields,
345
351
  innerClass: types.style,
346
352
  listClass: VueTypes.string.def(''),
347
353
  loader: types.title,
@@ -353,7 +359,7 @@ var ReactiveList = {
353
359
  pages: VueTypes.number.def(5),
354
360
  pagination: VueTypes.bool.def(false),
355
361
  infiniteScroll: VueTypes.bool.def(true),
356
- paginationAt: types.paginationAt.def('bottom'),
362
+ paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
357
363
  react: types.react,
358
364
  scrollOnChange: VueTypes.bool.def(true),
359
365
  showResultStats: VueTypes.bool.def(true),
@@ -382,12 +388,9 @@ var ReactiveList = {
382
388
  return this.$listeners && this.$listeners.resultStats;
383
389
  },
384
390
  stats: function stats() {
385
- var _this$getAllData = this.getAllData(),
386
- filteredResults = _this$getAllData.filteredResults;
387
-
388
391
  return _extends({}, getResultStats(this), {
389
392
  currentPage: this.currentPageState,
390
- displayedResults: filteredResults.length
393
+ displayedResults: this.data.length
391
394
  });
392
395
  },
393
396
  hasCustomRender: function hasCustomRender() {
@@ -396,6 +399,27 @@ var ReactiveList = {
396
399
  showInfiniteScroll: function showInfiniteScroll() {
397
400
  // Pagination has higher priority then infinite scroll
398
401
  return this.infiniteScroll && !this.shouldRenderPagination;
402
+ },
403
+ data: function data() {
404
+ var results = parseHits(this.hits) || [];
405
+ var parsedPromotedResults = parseHits(this.promotedResults) || [];
406
+ var filteredResults = results;
407
+
408
+ if (parsedPromotedResults.length) {
409
+ var ids = parsedPromotedResults.map(function (item) {
410
+ return item._id;
411
+ }).filter(Boolean);
412
+
413
+ if (ids) {
414
+ filteredResults = filteredResults.filter(function (item) {
415
+ return !ids.includes(item._id);
416
+ });
417
+ }
418
+
419
+ filteredResults = [].concat(parsedPromotedResults, filteredResults);
420
+ }
421
+
422
+ return withClickIds(filteredResults);
399
423
  }
400
424
  },
401
425
  watch: {
@@ -477,7 +501,7 @@ var ReactiveList = {
477
501
  }
478
502
  },
479
503
  hits: function hits(newVal, oldVal) {
480
- this.$emit('data', this.getAllData());
504
+ this.$emit('data', this.getData());
481
505
 
482
506
  if (this.shouldRenderPagination) {
483
507
  // called when page is changed
@@ -536,11 +560,11 @@ var ReactiveList = {
536
560
  var options = getQueryOptions(this.$props);
537
561
  options.from = this.$data.from;
538
562
 
539
- if (this.$props.sortOptions) {
563
+ if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
540
564
  var _ref2;
541
565
 
542
- var sortField = this.$props.sortOptions[this.sortOptionIndex].dataField;
543
- var sortBy = this.$props.sortOptions[this.sortOptionIndex].sortBy;
566
+ var sortField = this.sortOptions[this.sortOptionIndex].dataField;
567
+ var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
544
568
  options.sort = [(_ref2 = {}, _ref2[sortField] = {
545
569
  order: sortBy
546
570
  }, _ref2)]; // To handle sort options for RS API
@@ -610,10 +634,10 @@ var ReactiveList = {
610
634
  "class": this.$props.className
611
635
  }, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex, {
612
636
  "attrs": {
613
- "labelPosition": this.$props.sortOptions ? 'right' : 'left'
637
+ "labelPosition": this.sortOptions ? 'right' : 'left'
614
638
  },
615
639
  "class": getClassName(this.$props.innerClass, 'resultsInfo')
616
- }, [this.$props.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && results.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
640
+ }, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && results.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
617
641
  "attrs": {
618
642
  "pages": this.$props.pages,
619
643
  "totalPages": this.totalPages,
@@ -662,13 +686,10 @@ var ReactiveList = {
662
686
 
663
687
  var h = this.$createElement;
664
688
  var size = this.$props.size;
665
- var hits = this.$data.hits;
666
- var results = parseHits(hits) || [];
667
- var filteredResults = results;
668
689
  var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
669
690
  var element = this.hasCustomRender ? this.getComponent() : h("div", {
670
691
  "class": this.$props.listClass + " " + getClassName(this.$props.innerClass, 'list')
671
- }, [[].concat(filteredResults).map(function (item, index) {
692
+ }, [this.data.map(function (item, index) {
672
693
  return renderItem({
673
694
  item: item,
674
695
  triggerClickAnalytics: function triggerClickAnalytics() {
@@ -679,7 +700,7 @@ var ReactiveList = {
679
700
 
680
701
  return this.analytics ? h(ImpressionTracker$1, {
681
702
  "attrs": {
682
- "hits": filteredResults
703
+ "hits": this.data
683
704
  }
684
705
  }, [element]) : element;
685
706
  },
@@ -687,15 +708,18 @@ var ReactiveList = {
687
708
  var options = getQueryOptions(props);
688
709
  options.from = this.$data.from;
689
710
 
690
- if (props.sortOptions) {
691
- var _ref5;
692
-
711
+ if (props.sortOptions && Array.isArray(props.sortOptions)) {
693
712
  var sortOptionIndex = props.defaultSortOption ? props.sortOptions.findIndex(function (s) {
694
713
  return s.label === props.defaultSortOption;
695
714
  }) : 0;
696
- options.sort = [(_ref5 = {}, _ref5[props.sortOptions[sortOptionIndex].dataField] = {
697
- order: props.sortOptions[sortOptionIndex].sortBy
698
- }, _ref5)];
715
+
716
+ if (props.sortOptions[sortOptionIndex]) {
717
+ var _ref5;
718
+
719
+ options.sort = [(_ref5 = {}, _ref5[props.sortOptions[sortOptionIndex].dataField] = {
720
+ order: props.sortOptions[sortOptionIndex].sortBy
721
+ }, _ref5)];
722
+ }
699
723
  } else if (props.sortBy) {
700
724
  var _ref6;
701
725
 
@@ -791,31 +815,39 @@ var ReactiveList = {
791
815
  renderNoResult: function renderNoResult() {
792
816
  var h = this.$createElement;
793
817
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
818
+
819
+ if (this.$scopedSlots.renderNoResults) {
820
+ return isFunction(renderNoResults) ? renderNoResults() : renderNoResults;
821
+ }
822
+
794
823
  return h("p", {
795
824
  "class": getClassName(this.$props.innerClass, 'noResults') || null
796
825
  }, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
797
826
  },
798
827
  handleSortChange: function handleSortChange(e) {
799
- var _ref7;
800
-
801
- var index = e.target.value; // This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
828
+ var index = e.target.value;
802
829
 
803
- var options = getQueryOptions(this.$props);
804
- options.from = 0;
805
- var sortField = this.$props.sortOptions[index].dataField;
806
- var sortBy = this.$props.sortOptions[index].sortBy;
807
- options.sort = [(_ref7 = {}, _ref7[sortField] = {
808
- order: sortBy
809
- }, _ref7)];
810
- this.sortOptionIndex = index; // To handle sort options for RS API
830
+ if (this.sortOptions && this.sortOptions[index]) {
831
+ var _ref7;
811
832
 
812
- this.updateComponentProps(this.componentId, {
813
- dataField: sortField,
814
- sortBy: sortBy
815
- }, componentTypes.reactiveList);
816
- this.setQueryOptions(this.$props.componentId, options, true);
817
- this.currentPageState = 0;
818
- this.from = 0;
833
+ // This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
834
+ var options = getQueryOptions(this.$props);
835
+ options.from = 0;
836
+ var sortField = this.sortOptions[index].dataField;
837
+ var sortBy = this.sortOptions[index].sortBy;
838
+ options.sort = [(_ref7 = {}, _ref7[sortField] = {
839
+ order: sortBy
840
+ }, _ref7)];
841
+ this.sortOptionIndex = index; // To handle sort options for RS API
842
+
843
+ this.updateComponentProps(this.componentId, {
844
+ dataField: sortField,
845
+ sortBy: sortBy
846
+ }, componentTypes.reactiveList);
847
+ this.setQueryOptions(this.$props.componentId, options, true);
848
+ this.currentPageState = 0;
849
+ this.from = 0;
850
+ }
819
851
  },
820
852
  triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
821
853
  var docId = documentId;
@@ -849,7 +881,7 @@ var ReactiveList = {
849
881
  "domProps": {
850
882
  "value": this.sortOptionIndex
851
883
  }
852
- }, [this.$props.sortOptions.map(function (sort, index) {
884
+ }, [this.sortOptions.map(function (sort, index) {
853
885
  return h("option", {
854
886
  "key": sort.label,
855
887
  "domProps": {
@@ -859,8 +891,8 @@ var ReactiveList = {
859
891
  })]);
860
892
  },
861
893
  withClickIds: function withClickIds(results) {
862
- var _this$getAllData2 = this.getAllData(),
863
- base = _this$getAllData2.base;
894
+ var _this$getAllData = this.getAllData(),
895
+ base = _this$getAllData.base;
864
896
 
865
897
  return results.map(function (result, index) {
866
898
  return _extends({}, result, {
@@ -878,26 +910,9 @@ var ReactiveList = {
878
910
  hits = this.hits;
879
911
  var results = parseHits(hits) || [];
880
912
  var parsedPromotedResults = parseHits(promotedResults) || [];
881
- var filteredResults = results;
882
913
  var base = currentPage * size;
883
-
884
- if (parsedPromotedResults.length) {
885
- var ids = parsedPromotedResults.map(function (item) {
886
- return item._id;
887
- }).filter(Boolean);
888
-
889
- if (ids) {
890
- filteredResults = filteredResults.filter(function (item) {
891
- return !ids.includes(item._id);
892
- });
893
- }
894
-
895
- filteredResults = [].concat(parsedPromotedResults, filteredResults);
896
- }
897
-
898
914
  return {
899
915
  results: results,
900
- filteredResults: filteredResults,
901
916
  customData: customData || {},
902
917
  promotedResults: parsedPromotedResults,
903
918
  aggregationData: aggregationData,
@@ -907,14 +922,13 @@ var ReactiveList = {
907
922
  };
908
923
  },
909
924
  getData: function getData() {
910
- var _this$getAllData3 = this.getAllData(),
911
- filteredResults = _this$getAllData3.filteredResults,
912
- promotedResults = _this$getAllData3.promotedResults,
913
- aggregationData = _this$getAllData3.aggregationData,
914
- customData = _this$getAllData3.customData;
925
+ var _this$getAllData2 = this.getAllData(),
926
+ promotedResults = _this$getAllData2.promotedResults,
927
+ aggregationData = _this$getAllData2.aggregationData,
928
+ customData = _this$getAllData2.customData;
915
929
 
916
930
  return {
917
- data: this.withClickIds(filteredResults),
931
+ data: this.data,
918
932
  aggregationData: this.withClickIds(aggregationData || []),
919
933
  promotedData: this.withClickIds(promotedResults || []),
920
934
  rawData: this.rawData,
@@ -973,11 +987,7 @@ var mapDispatchtoProps = {
973
987
  }; // Only used for SSR
974
988
 
975
989
  ReactiveList.generateQueryOptions = function (props) {
976
- // simulate default (includeFields and excludeFields) props to generate consistent query
977
- var options = getQueryOptions(_extends({
978
- includeFields: ['*'],
979
- excludeFields: []
980
- }, props));
990
+ var options = getQueryOptions(props);
981
991
  var size = props.size,
982
992
  dataField = props.dataField,
983
993
  defaultSortOption = props.defaultSortOption,
@@ -3,7 +3,7 @@ import VueTypes from 'vue-types';
3
3
  import 'emotion';
4
4
  import '@appbaseio/vue-emotion';
5
5
  import 'polished';
6
- import { t as types } from './vueTypes-a9b9d5c9.js';
6
+ import { t as types } from './vueTypes-98819a12.js';
7
7
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
8
8
  import { T as Title } from './Title-579f8d6c.js';
9
9
  import { I as Image, C as Card } from './Card-04b3c33e.js';
@@ -3,7 +3,7 @@ import VueTypes from 'vue-types';
3
3
  import 'emotion';
4
4
  import '@appbaseio/vue-emotion';
5
5
  import 'polished';
6
- import { t as types } from './vueTypes-a9b9d5c9.js';
6
+ import { t as types } from './vueTypes-98819a12.js';
7
7
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
8
8
  import { T as Title } from './Title-579f8d6c.js';
9
9
  import { I as Image, L as ListItem } from './ListItem-bdb6d53d.js';
@@ -6,7 +6,7 @@ import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
8
  import { f as filters, B as Button } from './Button-799185e2.js';
9
- import { t as types } from './vueTypes-a9b9d5c9.js';
9
+ import { t as types } from './vueTypes-98819a12.js';
10
10
  import 'redux';
11
11
  import { c as connect } from './index-4755c9a0.js';
12
12
  import { T as Title } from './Title-579f8d6c.js';
@@ -6,7 +6,7 @@ import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
8
  import { l as loadMoreContainer, B as Button } from './Button-799185e2.js';
9
- import { t as types } from './vueTypes-a9b9d5c9.js';
9
+ import { t as types } from './vueTypes-98819a12.js';
10
10
  import '@appbaseio/reactivecore/lib/utils/transform';
11
11
  import 'redux';
12
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-4755c9a0.js';
@@ -16,8 +16,9 @@ import './Input-d8519224.js';
16
16
  import 'compute-scroll-into-view';
17
17
  import './DownShift-e7ccf2a7.js';
18
18
  import { C as Container } from './Container-4383c6f0.js';
19
+ import '@appbaseio/reactivecore/lib/utils/suggestions';
19
20
  import { g as getAggsQuery } from './utils-3a32e13f.js';
20
- import { D as Dropdown } from './DropDown-8894cc22.js';
21
+ import { D as Dropdown } from './DropDown-c5ab660f.js';
21
22
 
22
23
  var updateQuery = Actions.updateQuery,
23
24
  setQueryOptions = Actions.setQueryOptions,
@@ -190,7 +191,9 @@ var SingleDropdownList = {
190
191
  if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
191
192
  if (renderNoResults && isFunction(renderNoResults)) {
192
193
  return h("div", [renderNoResults()]);
193
- } else if (renderNoResults && !isFunction(renderNoResults)) {
194
+ }
195
+
196
+ if (renderNoResults && !isFunction(renderNoResults)) {
194
197
  return renderNoResults;
195
198
  }
196
199
 
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-a9b9d5c9.js';
8
+ import { t as types } from './vueTypes-98819a12.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
11
  import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, n as isEvent, h as hasCustomRenderer, c as connect } from './index-4755c9a0.js';
@@ -13,6 +13,7 @@ import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
13
13
  import { T as Title } from './Title-579f8d6c.js';
14
14
  import { I as Input } from './Input-d8519224.js';
15
15
  import { C as Container } from './Container-4383c6f0.js';
16
+ import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
16
17
  import { U as UL, R as Radio } from './FormControlList-fe389a2e.js';
17
18
  import { g as getAggsQuery } from './utils-3a32e13f.js';
18
19
 
@@ -29,7 +30,7 @@ var SingleList = {
29
30
  name: 'SingleList',
30
31
  props: {
31
32
  beforeValueChange: types.func,
32
- className: types.string.def(''),
33
+ className: VueTypes.string.def(''),
33
34
  componentId: types.stringRequired,
34
35
  customQuery: types.func,
35
36
  dataField: types.stringRequired,
@@ -49,7 +50,7 @@ var SingleList = {
49
50
  showFilter: VueTypes.bool.def(true),
50
51
  showRadio: VueTypes.bool.def(true),
51
52
  showSearch: VueTypes.bool.def(true),
52
- size: VueTypes.number.def(100),
53
+ size: VueTypes.number,
53
54
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
54
55
  title: types.title,
55
56
  URLParams: VueTypes.bool.def(false),
@@ -163,7 +164,7 @@ var SingleList = {
163
164
  var filteredItemsToRender = itemsToRender.filter(function (item) {
164
165
  if (String(item.key).length) {
165
166
  if (_this.$props.showSearch && _this.$data.searchTerm) {
166
- return String(item.key).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
167
+ return replaceDiacritics(String(item.key)).toLowerCase().includes(replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
167
168
  }
168
169
 
169
170
  return true;
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-a9b9d5c9.js';
8
+ import { t as types } from './vueTypes-98819a12.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
11
  import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
@@ -6,7 +6,7 @@ import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
8
  import { B as Button, t as toggleButtons } from './Button-799185e2.js';
9
- import { t as types } from './vueTypes-a9b9d5c9.js';
9
+ import { t as types } from './vueTypes-98819a12.js';
10
10
  import '@appbaseio/reactivecore/lib/utils/transform';
11
11
  import 'redux';
12
12
  import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
@@ -28,7 +28,7 @@ var ToggleButton = {
28
28
  componentId: types.stringRequired,
29
29
  data: types.data,
30
30
  dataField: types.stringRequired,
31
- defaultValue: types.stringOrArray,
31
+ defaultValue: types.any,
32
32
  value: types.stringOrArray,
33
33
  filterLabel: types.string,
34
34
  nestedField: types.string,
package/dist/es/index.js CHANGED
@@ -2,12 +2,13 @@ import '@appbaseio/reactivecore';
2
2
  import './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
+ import '@appbaseio/reactivecore/lib/utils/helper';
5
6
  import 'emotion';
6
7
  import '@appbaseio/vue-emotion';
7
8
  import 'polished';
8
9
  import './Button-799185e2.js';
9
- import './vueTypes-a9b9d5c9.js';
10
- import './Pagination-a2ab7fcb.js';
10
+ import './vueTypes-98819a12.js';
11
+ import './Pagination-e8216949.js';
11
12
  export { default as ReactiveList } from './ReactiveList.js';
12
13
  import '@appbaseio/reactivecore/lib/utils/transform';
13
14
  import 'redux';
@@ -18,7 +19,6 @@ import './Title-579f8d6c.js';
18
19
  import './ListItem-bdb6d53d.js';
19
20
  import './Card-04b3c33e.js';
20
21
  import './Flex-aac91505.js';
21
- import '@appbaseio/reactivecore/lib/utils/helper';
22
22
  import '@appbaseio/reactivecore/lib/actions/analytics';
23
23
  import 'appbase-js';
24
24
  import 'url-search-params-polyfill';
@@ -30,11 +30,12 @@ import 'compute-scroll-into-view';
30
30
  import './DownShift-e7ccf2a7.js';
31
31
  import './Container-4383c6f0.js';
32
32
  import 'vue-highlight-words';
33
+ import '@appbaseio/reactivecore/lib/utils/suggestions';
33
34
  import './FormControlList-fe389a2e.js';
34
35
  import './utils-3a32e13f.js';
35
36
  export { default as SingleList } from './SingleList.js';
36
37
  export { default as MultiList } from './MultiList.js';
37
- import './DropDown-8894cc22.js';
38
+ import './DropDown-c5ab660f.js';
38
39
  export { default as SingleDropdownList } from './SingleDropdownList.js';
39
40
  export { default as MultiDropdownList } from './MultiDropdownList.js';
40
41
  export { default as ToggleButton } from './ToggleButton.js';
@@ -60,6 +61,8 @@ import 'gmap-vue/dist/mixins/map-element';
60
61
  import '@appbaseio/reactivecore/lib/reducers/valueReducer';
61
62
  import '@appbaseio/reactivecore/lib/reducers/queryReducer';
62
63
  import '@appbaseio/reactivecore/lib/reducers/queryOptionsReducer';
64
+ import '@appbaseio/reactivecore/lib/reducers/compositeAggsReducer';
65
+ import '@appbaseio/reactivecore/lib/constants';
63
66
  import '@appbaseio/reactivecore/lib/reducers/dependencyTreeReducer';
64
67
  import '@appbaseio/reactivecore/lib/utils/graphQL';
65
68
  import '@appbaseio/reactivecore/lib/actions/utils';
@@ -1,11 +1,13 @@
1
1
  import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
2
  import { validProps, componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
3
- import { getRSQuery, extractPropsFromState, getDependentQueries } from '@appbaseio/reactivecore/lib/utils/transform';
4
3
  import { pushToAndClause, buildQuery } from '@appbaseio/reactivecore/lib/utils/helper';
4
+ import { getRSQuery, extractPropsFromState, getDependentQueries } from '@appbaseio/reactivecore/lib/utils/transform';
5
5
  import Appbase from 'appbase-js';
6
6
  import valueReducer from '@appbaseio/reactivecore/lib/reducers/valueReducer';
7
7
  import queryReducer from '@appbaseio/reactivecore/lib/reducers/queryReducer';
8
8
  import queryOptionsReducer from '@appbaseio/reactivecore/lib/reducers/queryOptionsReducer';
9
+ import compositeAggsReducer from '@appbaseio/reactivecore/lib/reducers/compositeAggsReducer';
10
+ import { UPDATE_COMPOSITE_AGGS } from '@appbaseio/reactivecore/lib/constants';
9
11
  import dependencyTreeReducer from '@appbaseio/reactivecore/lib/reducers/dependencyTreeReducer';
10
12
  import fetchGraphQL from '@appbaseio/reactivecore/lib/utils/graphQL';
11
13
  import { isPropertyDefined } from '@appbaseio/reactivecore/lib/actions/utils';
@@ -102,6 +104,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
102
104
  var orderOfQueries = [];
103
105
  var hits = {};
104
106
  var aggregations = {};
107
+ var compositeAggregations = {};
105
108
  var state = {};
106
109
  var customQueries = {};
107
110
  var defaultQueries = {};
@@ -116,16 +119,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
116
119
  compProps[key] = component[key];
117
120
  }
118
121
  });
119
- var isInternalComponentPresent = false; // Set custom and default queries
120
-
121
- if (component.customQuery && typeof component.customQuery === 'function') {
122
- customQueries[component.componentId] = component.customQuery(component.value, compProps);
123
- }
124
-
125
- if (component.defaultQuery && typeof component.defaultQuery === 'function') {
126
- defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
127
- }
128
-
122
+ var isInternalComponentPresent = false;
129
123
  var isResultComponent = resultComponents.includes(componentType);
130
124
  var internalComponent = component.componentId + "__internal";
131
125
  var label = component.filterLabel || component.componentId;
@@ -149,7 +143,16 @@ function initReactivesearch(componentCollection, searchState, settings) {
149
143
  reference: reference,
150
144
  showFilter: showFilter,
151
145
  URLParams: component.URLParams || false
152
- }); // [2] set query options - main component query (valid for result components)
146
+ }); // Set custom and default queries
147
+
148
+ if (component.customQuery && typeof component.customQuery === 'function') {
149
+ customQueries[component.componentId] = component.customQuery(value, compProps);
150
+ }
151
+
152
+ if (component.defaultQuery && typeof component.defaultQuery === 'function') {
153
+ defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
154
+ } // [2] set query options - main component query (valid for result components)
155
+
153
156
 
154
157
  if (componentsWithOptions.includes(componentType)) {
155
158
  var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
@@ -236,7 +239,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
236
239
 
237
240
 
238
241
  if (isResultComponent) {
239
- var _getQuery = getQuery(component, null, componentType),
242
+ var _getQuery = getQuery(component, value, componentType),
240
243
  query = _getQuery.query;
241
244
 
242
245
  queryList = queryReducer(queryList, {
@@ -336,6 +339,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
336
339
  var _extends4;
337
340
 
338
341
  aggregations = _extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
342
+ compositeAggregations = compositeAggsReducer(compositeAggregations, {
343
+ type: UPDATE_COMPOSITE_AGGS,
344
+ aggregations: response.aggregations,
345
+ append: false
346
+ });
339
347
  }
340
348
 
341
349
  hits = _extends({}, hits, (_extends5 = {}, _extends5[component] = {
@@ -362,6 +370,8 @@ function initReactivesearch(componentCollection, searchState, settings) {
362
370
  var promotedResults = {};
363
371
  var rawData = {};
364
372
  var customData = {};
373
+ var settingsResponse = {};
374
+ var timestamp = {};
365
375
  var allPromises = orderOfQueries.map(function (component) {
366
376
  return new Promise(function (responseResolve, responseReject) {
367
377
  handleTransformResponse(res[component], component).then(function (response) {
@@ -380,6 +390,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
380
390
 
381
391
  if (response.customData) {
382
392
  customData[component] = response.customData;
393
+ } // Update settings
394
+
395
+
396
+ if (response.settings) {
397
+ settingsResponse[component] = response.settings;
383
398
  }
384
399
 
385
400
  if (response.aggregations) {
@@ -388,6 +403,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
388
403
  aggregations = _extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
389
404
  }
390
405
 
406
+ timestamp[component] = res._timestamp;
391
407
  hits = _extends({}, hits, (_extends7 = {}, _extends7[component] = {
392
408
  hits: response.hits.hits,
393
409
  total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
@@ -403,8 +419,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
403
419
  Promise.all(allPromises).then(function () {
404
420
  state = _extends({}, state, {
405
421
  hits: hits,
422
+ timestamp: timestamp,
406
423
  aggregations: aggregations,
424
+ compositeAggregations: compositeAggregations,
407
425
  promotedResults: promotedResults,
426
+ settings: settingsResponse,
408
427
  customData: customData,
409
428
  rawData: rawData
410
429
  });
@@ -2,12 +2,13 @@ import '@appbaseio/reactivecore';
2
2
  import './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
+ import '@appbaseio/reactivecore/lib/utils/helper';
5
6
  import 'emotion';
6
7
  import '@appbaseio/vue-emotion';
7
8
  import 'polished';
8
9
  import './Button-799185e2.js';
9
- import './vueTypes-a9b9d5c9.js';
10
- import './Pagination-a2ab7fcb.js';
10
+ import './vueTypes-98819a12.js';
11
+ import './Pagination-e8216949.js';
11
12
  import ReactiveList from './ReactiveList.js';
12
13
  import '@appbaseio/reactivecore/lib/utils/transform';
13
14
  import 'redux';
@@ -18,7 +19,6 @@ import './Title-579f8d6c.js';
18
19
  import './ListItem-bdb6d53d.js';
19
20
  import './Card-04b3c33e.js';
20
21
  import './Flex-aac91505.js';
21
- import '@appbaseio/reactivecore/lib/utils/helper';
22
22
  import '@appbaseio/reactivecore/lib/actions/analytics';
23
23
  import 'appbase-js';
24
24
  import 'url-search-params-polyfill';
@@ -30,11 +30,12 @@ import 'compute-scroll-into-view';
30
30
  import './DownShift-e7ccf2a7.js';
31
31
  import './Container-4383c6f0.js';
32
32
  import 'vue-highlight-words';
33
+ import '@appbaseio/reactivecore/lib/utils/suggestions';
33
34
  import './FormControlList-fe389a2e.js';
34
35
  import './utils-3a32e13f.js';
35
36
  import SingleList from './SingleList.js';
36
37
  import MultiList from './MultiList.js';
37
- import './DropDown-8894cc22.js';
38
+ import './DropDown-c5ab660f.js';
38
39
  import SingleDropdownList from './SingleDropdownList.js';
39
40
  import MultiDropdownList from './MultiDropdownList.js';
40
41
  import ToggleButton from './ToggleButton.js';
@@ -1,3 +1,3 @@
1
- var version = "1.16.0-alpha.24";
1
+ var version = "1.16.0-alpha.28";
2
2
 
3
3
  export default version;