@appbaseio/reactivesearch-vue 1.30.0 → 1.32.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 (89) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +10358 -553
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +21 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/{Button-0e2e2c02.js → Button-0673191e.js} +6 -6
  6. package/dist/cjs/{CancelSvg-c48c1085.js → CancelSvg-9f258f4f.js} +1 -1
  7. package/dist/cjs/{Card-4fa0f769.js → Card-642547a8.js} +2 -2
  8. package/dist/cjs/{ComponentWrapper-5cb08414.js → ComponentWrapper-ad3dad02.js} +2 -2
  9. package/dist/cjs/{Container-cfd69a34.js → Container-daf30918.js} +1 -1
  10. package/dist/cjs/{DataSearch-e550096e.js → DataSearch-d389fbe7.js} +128 -112
  11. package/dist/cjs/DataSearch.js +10 -10
  12. package/dist/cjs/{DropDown-fc59f1ee.js → DropDown-c479bbb0.js} +5 -5
  13. package/dist/cjs/DynamicRangeSlider.js +8 -7
  14. package/dist/cjs/{Flex-63774e4d.js → Flex-aa517a13.js} +1 -1
  15. package/dist/cjs/{FormControlList-a9c64bb8.js → FormControlList-c195a592.js} +1 -1
  16. package/dist/cjs/{Input-43868594.js → Input-e6603a7e.js} +1 -1
  17. package/dist/cjs/{ListItem-38962297.js → ListItem-8c9e0d68.js} +2 -2
  18. package/dist/cjs/MultiDropdownList.js +13 -12
  19. package/dist/cjs/MultiList.js +11 -10
  20. package/dist/cjs/MultiRange.js +9 -8
  21. package/dist/cjs/Pagination-3d73e1b3.js +182 -0
  22. package/dist/cjs/RangeInput.js +11 -10
  23. package/dist/cjs/RangeSlider.js +9 -8
  24. package/dist/cjs/ReactiveBase.js +34 -26
  25. package/dist/cjs/ReactiveComponent.js +6 -5
  26. package/dist/cjs/ReactiveGoogleMap.js +2363 -0
  27. package/dist/cjs/ReactiveList.js +21 -187
  28. package/dist/cjs/ResultCard.js +4 -4
  29. package/dist/cjs/ResultList.js +4 -4
  30. package/dist/cjs/SelectedFilters.js +9 -9
  31. package/dist/cjs/SingleDropdownList.js +13 -12
  32. package/dist/cjs/SingleList.js +11 -10
  33. package/dist/cjs/SingleRange.js +9 -8
  34. package/dist/cjs/StateProvider.js +65 -22
  35. package/dist/cjs/{Title-26661936.js → Title-1de7d0f4.js} +1 -1
  36. package/dist/cjs/ToggleButton.js +9 -8
  37. package/dist/cjs/{_rollupPluginBabelHelpers-91d4b5a6.js → _rollupPluginBabelHelpers-c705cbe6.js} +16 -0
  38. package/dist/cjs/{index-2cd3650b.js → index-6a167fe0.js} +13 -1
  39. package/dist/cjs/index.js +23 -18
  40. package/dist/cjs/initReactivesearch.js +46 -10
  41. package/dist/cjs/{install-250a14f1.js → install-3b864d8f.js} +18 -16
  42. package/dist/cjs/install.js +19 -18
  43. package/dist/cjs/{ssr-949cafb5.js → ssr-3027b848.js} +1 -1
  44. package/dist/cjs/{utils-0df3cb93.js → utils-d6a52588.js} +1 -1
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/cjs/{vueTypes-57d01f18.js → vueTypes-727b7c63.js} +30 -13
  47. package/dist/es/{Button-e18ad90f.js → Button-35aa984e.js} +6 -6
  48. package/dist/es/{CancelSvg-e3b33cdd.js → CancelSvg-4cfae5fd.js} +1 -1
  49. package/dist/es/{Card-ad6ba09f.js → Card-450683f1.js} +2 -2
  50. package/dist/es/{ComponentWrapper-dc92772a.js → ComponentWrapper-424e86fd.js} +2 -2
  51. package/dist/es/{Container-421450dc.js → Container-ba826e96.js} +1 -1
  52. package/dist/es/{DataSearch-8e5d0972.js → DataSearch-b88ef6ee.js} +128 -112
  53. package/dist/es/DataSearch.js +10 -10
  54. package/dist/es/{DropDown-565fad6f.js → DropDown-05a644a5.js} +5 -5
  55. package/dist/es/DynamicRangeSlider.js +8 -7
  56. package/dist/es/{Flex-09d40927.js → Flex-1f0795c3.js} +1 -1
  57. package/dist/es/{FormControlList-38ffe3d3.js → FormControlList-c22d64f6.js} +1 -1
  58. package/dist/es/{Input-c9d757bc.js → Input-7a2a9fac.js} +1 -1
  59. package/dist/es/{ListItem-41d6ddd7.js → ListItem-cad14c5e.js} +2 -2
  60. package/dist/es/MultiDropdownList.js +13 -12
  61. package/dist/es/MultiList.js +11 -10
  62. package/dist/es/MultiRange.js +9 -8
  63. package/dist/es/Pagination-af9de08f.js +177 -0
  64. package/dist/es/RangeInput.js +11 -10
  65. package/dist/es/RangeSlider.js +9 -8
  66. package/dist/es/ReactiveBase.js +35 -27
  67. package/dist/es/ReactiveComponent.js +6 -5
  68. package/dist/es/ReactiveGoogleMap.js +2354 -0
  69. package/dist/es/ReactiveList.js +20 -186
  70. package/dist/es/ResultCard.js +4 -4
  71. package/dist/es/ResultList.js +4 -4
  72. package/dist/es/SelectedFilters.js +7 -7
  73. package/dist/es/SingleDropdownList.js +13 -12
  74. package/dist/es/SingleList.js +11 -10
  75. package/dist/es/SingleRange.js +9 -8
  76. package/dist/es/StateProvider.js +65 -22
  77. package/dist/es/{Title-35edd732.js → Title-3342664a.js} +1 -1
  78. package/dist/es/ToggleButton.js +9 -8
  79. package/dist/es/{_rollupPluginBabelHelpers-51ce1182.js → _rollupPluginBabelHelpers-76660dab.js} +16 -1
  80. package/dist/es/{index-5371a13f.js → index-7788a843.js} +13 -2
  81. package/dist/es/index.js +23 -19
  82. package/dist/es/initReactivesearch.js +47 -11
  83. package/dist/es/{install-9faa87f1.js → install-a1fd08ae.js} +16 -14
  84. package/dist/es/install.js +19 -18
  85. package/dist/es/{ssr-ad57b0ad.js → ssr-b2c0b401.js} +1 -1
  86. package/dist/es/{utils-9b45e0ab.js → utils-9e68acee.js} +1 -1
  87. package/dist/es/version.js +1 -1
  88. package/dist/es/{vueTypes-687b2304.js → vueTypes-b8146772.js} +30 -13
  89. package/package.json +10 -4
@@ -1,188 +1,23 @@
1
- import { helper, Actions } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
1
+ import { Actions, helper } from '@appbaseio/reactivecore';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { withClickIds } from '@appbaseio/reactivecore/lib/utils/helper';
6
6
  import { css } from 'emotion';
7
7
  import styled from '@appbaseio/vue-emotion';
8
8
  import 'polished';
9
- import { p as pagination, B as Button } from './Button-e18ad90f.js';
10
- import { t as types } from './vueTypes-687b2304.js';
9
+ import './Button-35aa984e.js';
10
+ import { t as types } from './vueTypes-b8146772.js';
11
+ import { P as Pagination } from './Pagination-af9de08f.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-5371a13f.js';
14
- import { C as ComponentWrapper } from './ComponentWrapper-dc92772a.js';
14
+ import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-7788a843.js';
15
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
15
16
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
16
- import './Title-35edd732.js';
17
- import { c as container } from './ListItem-41d6ddd7.js';
18
- import { c as container$1 } from './Card-ad6ba09f.js';
19
- import { F as Flex } from './Flex-09d40927.js';
20
-
21
- var getClassName = helper.getClassName,
22
- handleA11yAction = helper.handleA11yAction;
23
-
24
- function getStartPage(totalPages, currentPage, showEndPage) {
25
- var midValue = parseInt(totalPages / 2, 10);
26
- var start = currentPage - (showEndPage ? Math.ceil(midValue / 2) - 1 : midValue);
27
- return start > 1 ? start : 2;
28
- }
29
-
30
- var Pagination = {
31
- name: 'Pagination',
32
- functional: true,
33
- props: {
34
- currentPage: types.number,
35
- innerClass: types.style,
36
- pages: types.number,
37
- setPage: types.func,
38
- totalPages: types.number,
39
- showEndPage: VueTypes.bool,
40
- prevLabel: types.string,
41
- nextLabel: types.string
42
- },
43
- render: function render(createElement, context) {
44
- var h = arguments[0];
45
- var props = context.props;
46
-
47
- var onPrevPage = function onPrevPage() {
48
- if (props.currentPage) {
49
- props.setPage(props.currentPage - 1);
50
- }
51
- };
52
-
53
- var onNextPage = function onNextPage() {
54
- if (props.currentPage < props.totalPages - 1) {
55
- props.setPage(props.currentPage + 1);
56
- }
57
- };
58
-
59
- if (!props.totalPages) {
60
- return null;
61
- }
62
-
63
- var innerClassName = getClassName(props.innerClass, 'button');
64
- var primary = props.currentPage === 0;
65
- var className = innerClassName || primary ? innerClassName + " " + (primary ? 'active' : '') : '';
66
-
67
- var buildPaginationDOM = function buildPaginationDOM(position) {
68
- var pages = props.pages,
69
- currentPage = props.currentPage,
70
- totalPages = props.totalPages,
71
- setPage = props.setPage,
72
- showEndPage = props.showEndPage;
73
- var start = position === 'start' ? getStartPage(pages, currentPage, showEndPage) : Math.max(2, Math.ceil(totalPages - (pages - 1) / 2 + 1));
74
- var paginationButtons = [];
75
-
76
- if (start <= totalPages) {
77
- var totalPagesToShow = pages < totalPages ? start + (pages - 1) : totalPages + 1;
78
-
79
- if (showEndPage) {
80
- totalPagesToShow = position === 'start' ? start + (Math.ceil(pages / 2) - pages % 2) : totalPages + 1;
81
- }
82
-
83
- if (currentPage > totalPages - pages + 2) {
84
- start = Math.max(2, totalPages - pages + 2);
85
- totalPagesToShow = start + pages;
86
- }
87
-
88
- var _loop = function _loop(i) {
89
- var activeButton = currentPage === i - 1;
90
- var classNameBtn = innerClassName || activeButton ? innerClassName + " " + (activeButton ? 'active' : '') : '';
91
- var pageBtn = h(Button, {
92
- "class": classNameBtn,
93
- "attrs": {
94
- "primary": activeButton,
95
- "tabIndex": "0",
96
- "alt": "page-" + i
97
- },
98
- "on": {
99
- "keyPress": function keyPress(event) {
100
- return handleA11yAction(event, function () {
101
- return setPage(i - 1);
102
- });
103
- },
104
- "click": function click() {
105
- return setPage(i - 1);
106
- }
107
- }
108
- }, [i]);
109
-
110
- if (i <= totalPages + 1) {
111
- paginationButtons.push(pageBtn);
112
- }
113
- };
114
-
115
- for (var i = start; i < Math.min(totalPages + 1, totalPagesToShow); i += 1) {
116
- _loop(i);
117
- }
118
- }
119
-
120
- return paginationButtons;
121
- };
122
-
123
- var buildIntermediatePaginationDom = function buildIntermediatePaginationDom() {
124
- var showEndPage = props.showEndPage,
125
- currentPage = props.currentPage,
126
- totalPages = props.totalPages,
127
- pages = props.pages;
128
- if (!showEndPage) return buildPaginationDOM('start');
129
-
130
- if (currentPage <= totalPages - pages + 2 || totalPages <= pages) {
131
- return buildPaginationDOM('start');
132
- }
133
-
134
- return null;
135
- };
136
-
137
- return h("div", {
138
- "class": pagination + " " + getClassName(props.innerClass, 'pagination')
139
- }, [h(Button, {
140
- "class": getClassName(props.innerClass, 'button') || '',
141
- "attrs": {
142
- "disabled": props.currentPage === 0,
143
- "tabIndex": "0"
144
- },
145
- "on": {
146
- "keyPress": function keyPress(event) {
147
- return handleA11yAction(event, onPrevPage);
148
- },
149
- "click": onPrevPage
150
- }
151
- }, [props.prevLabel || 'Prev']), h(Button, {
152
- "class": className,
153
- "attrs": {
154
- "primary": primary,
155
- "tabIndex": "0"
156
- },
157
- "on": {
158
- "keyPress": function keyPress(event) {
159
- return handleA11yAction(event, function () {
160
- return props.setPage(0);
161
- });
162
- },
163
- "click": function click() {
164
- return props.setPage(0);
165
- }
166
- }
167
- }, ["1"]), props.showEndPage && props.currentPage >= Math.floor(props.pages / 2) + !!(props.pages % 2) ? h("span", ["..."]) : null, buildIntermediatePaginationDom(), props.showEndPage && props.pages > 2 && props.currentPage <= props.totalPages - Math.ceil(props.pages * 0.75) ? h("span", ["..."]) : null, props.showEndPage && props.totalPages >= props.pages && buildPaginationDOM('end'), h(Button, {
168
- "class": getClassName(props.innerClass, 'button') || '',
169
- "attrs": {
170
- "disabled": props.currentPage >= props.totalPages - 1,
171
- "tabIndex": "0"
172
- },
173
- "on": {
174
- "keyPress": function keyPress(event) {
175
- return handleA11yAction(event, onNextPage);
176
- },
177
- "click": onNextPage
178
- }
179
- }, [props.nextLabel || 'Next'])]);
180
- }
181
- };
182
-
183
- Pagination.install = function (Vue) {
184
- Vue.component(Pagination.name, Pagination);
185
- };
17
+ import './Title-3342664a.js';
18
+ import { c as container } from './ListItem-cad14c5e.js';
19
+ import { c as container$1 } from './Card-450683f1.js';
20
+ import { F as Flex } from './Flex-1f0795c3.js';
186
21
 
187
22
  var _templateObject;
188
23
  var PoweredByImage = styled('img')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\twidth: 110px;\n"])));
@@ -427,7 +262,7 @@ var setQueryOptions = Actions.setQueryOptions,
427
262
  recordResultClick = Actions.recordResultClick;
428
263
  var isEqual$1 = helper.isEqual,
429
264
  getQueryOptions = helper.getQueryOptions,
430
- getClassName$1 = helper.getClassName,
265
+ getClassName = helper.getClassName,
431
266
  parseHits = helper.parseHits,
432
267
  getCompositeAggsQuery = helper.getCompositeAggsQuery,
433
268
  getResultStats = helper.getResultStats,
@@ -544,7 +379,8 @@ var ReactiveList = {
544
379
  nextLabel: types.string,
545
380
  distinctField: types.string,
546
381
  distinctFieldConfig: types.props,
547
- index: VueTypes.string
382
+ index: VueTypes.string,
383
+ endpoint: types.endpointConfig
548
384
  },
549
385
  computed: {
550
386
  shouldRenderPagination: function shouldRenderPagination() {
@@ -793,7 +629,7 @@ var ReactiveList = {
793
629
  "attrs": {
794
630
  "labelPosition": this.sortOptions ? 'right' : 'left'
795
631
  },
796
- "class": getClassName$1(this.$props.innerClass, 'resultsInfo')
632
+ "class": getClassName(this.$props.innerClass, 'resultsInfo')
797
633
  }, [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, {
798
634
  "attrs": {
799
635
  "pages": this.$props.pages,
@@ -825,7 +661,7 @@ var ReactiveList = {
825
661
  "attrs": {
826
662
  "direction": "row-reverse"
827
663
  },
828
- "class": getClassName$1(this.$props.innerClass, 'poweredBy')
664
+ "class": getClassName(this.$props.innerClass, 'poweredBy')
829
665
  }, [h(PoweredBy)]) : null]);
830
666
  },
831
667
  methods: {
@@ -845,7 +681,7 @@ var ReactiveList = {
845
681
  var size = this.$props.size;
846
682
  var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
847
683
  var element = this.hasCustomRender ? this.getComponent() : h("div", {
848
- "class": this.$props.listClass + " " + getClassName$1(this.$props.innerClass, 'list')
684
+ "class": this.$props.listClass + " " + getClassName(this.$props.innerClass, 'list')
849
685
  }, [this.data.map(function (item, index) {
850
686
  return renderItem({
851
687
  item: item,
@@ -964,7 +800,7 @@ var ReactiveList = {
964
800
 
965
801
  if (this.stats.numberOfResults) {
966
802
  return h("p", {
967
- "class": resultStats + " " + getClassName$1(this.$props.innerClass, 'resultStats')
803
+ "class": resultStats + " " + getClassName(this.$props.innerClass, 'resultStats')
968
804
  }, [this.stats.numberOfResults, " results found in ", this.stats.time || 0, "ms"]);
969
805
  }
970
806
 
@@ -979,7 +815,7 @@ var ReactiveList = {
979
815
  }
980
816
 
981
817
  return h("p", {
982
- "class": getClassName$1(this.$props.innerClass, 'noResults') || null
818
+ "class": getClassName(this.$props.innerClass, 'noResults') || null
983
819
  }, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
984
820
  },
985
821
  handleSortChange: function handleSortChange(e) {
@@ -1031,7 +867,7 @@ var ReactiveList = {
1031
867
  renderSortOptions: function renderSortOptions() {
1032
868
  var h = this.$createElement;
1033
869
  return h("select", {
1034
- "class": sortOptions + " " + getClassName$1(this.$props.innerClass, 'sortOptions'),
870
+ "class": sortOptions + " " + getClassName(this.$props.innerClass, 'sortOptions'),
1035
871
  "attrs": {
1036
872
  "name": "sort-options",
1037
873
  "aria-label": "Sort options"
@@ -1105,8 +941,6 @@ var ReactiveList = {
1105
941
  error: error,
1106
942
  loading: isLoading || false,
1107
943
  loadMore: this.loadMore,
1108
- // TODO: Remove in v2
1109
- triggerAnalytics: this.triggerClickAnalytics,
1110
944
  triggerClickAnalytics: this.triggerClickAnalytics,
1111
945
  setPage: this.setPage
1112
946
  }, this.getData());
@@ -1,12 +1,12 @@
1
- import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-51ce1182.js';
1
+ import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-76660dab.js';
2
2
  import VueTypes from 'vue-types';
3
3
  import 'emotion';
4
4
  import '@appbaseio/vue-emotion';
5
5
  import 'polished';
6
- import { t as types } from './vueTypes-687b2304.js';
6
+ import { t as types } from './vueTypes-b8146772.js';
7
7
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
8
- import { T as Title } from './Title-35edd732.js';
9
- import { I as Image, C as Card } from './Card-ad6ba09f.js';
8
+ import { T as Title } from './Title-3342664a.js';
9
+ import { I as Image, C as Card } from './Card-450683f1.js';
10
10
 
11
11
  var ResultCardTitle = {
12
12
  name: 'ResultCardTitle',
@@ -1,12 +1,12 @@
1
- import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-51ce1182.js';
1
+ import { b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-76660dab.js';
2
2
  import VueTypes from 'vue-types';
3
3
  import 'emotion';
4
4
  import '@appbaseio/vue-emotion';
5
5
  import 'polished';
6
- import { t as types } from './vueTypes-687b2304.js';
6
+ import { t as types } from './vueTypes-b8146772.js';
7
7
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
8
- import { T as Title } from './Title-35edd732.js';
9
- import { I as Image, L as ListItem } from './ListItem-41d6ddd7.js';
8
+ import { T as Title } from './Title-3342664a.js';
9
+ import { I as Image, L as ListItem } from './ListItem-cad14c5e.js';
10
10
 
11
11
  var ResultListContent = {
12
12
  name: 'ResultListContent',
@@ -1,16 +1,16 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { f as filters, B as Button } from './Button-e18ad90f.js';
9
- import { t as types } from './vueTypes-687b2304.js';
8
+ import { f as filters, B as Button } from './Button-35aa984e.js';
9
+ import { t as types } from './vueTypes-b8146772.js';
10
10
  import 'redux';
11
- import { c as connect } from './index-5371a13f.js';
12
- import { T as Title } from './Title-35edd732.js';
13
- import { C as Container } from './Container-421450dc.js';
11
+ import { n as decodeHtml, c as connect } from './index-7788a843.js';
12
+ import { T as Title } from './Title-3342664a.js';
13
+ import { C as Container } from './Container-ba826e96.js';
14
14
 
15
15
  var setValue = Actions.setValue,
16
16
  clearValues = Actions.clearValues,
@@ -164,7 +164,7 @@ var SelectedFilters = {
164
164
 
165
165
  return _this3.renderFilterButton(component, component + "-" + (index + 1), function () {
166
166
  return _this3.remove(component, value);
167
- }, selectedValues[component].label + ": " + valueToRender);
167
+ }, selectedValues[component].label + ": " + decodeHtml(valueToRender));
168
168
  }
169
169
 
170
170
  return null;
@@ -1,25 +1,25 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { l as loadMoreContainer, B as Button } from './Button-e18ad90f.js';
9
- import { t as types } from './vueTypes-687b2304.js';
8
+ import { l as loadMoreContainer, B as Button } from './Button-35aa984e.js';
9
+ import { t as types } from './vueTypes-b8146772.js';
10
10
  import '@appbaseio/reactivecore/lib/utils/transform';
11
11
  import 'redux';
12
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, h as hasCustomRenderer, c as connect } from './index-5371a13f.js';
13
- import { C as ComponentWrapper } from './ComponentWrapper-dc92772a.js';
12
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, h as hasCustomRenderer, c as connect } from './index-7788a843.js';
13
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
14
14
  import '@vue/babel-helper-vue-jsx-merge-props';
15
- import { T as Title } from './Title-35edd732.js';
16
- import './CancelSvg-e3b33cdd.js';
17
- import './Input-c9d757bc.js';
15
+ import { T as Title } from './Title-3342664a.js';
16
+ import './CancelSvg-4cfae5fd.js';
17
+ import './Input-7a2a9fac.js';
18
18
  import 'compute-scroll-into-view';
19
- import { C as Container } from './Container-421450dc.js';
19
+ import { C as Container } from './Container-ba826e96.js';
20
20
  import '@appbaseio/reactivecore/lib/utils/suggestions';
21
- import { g as getAggsQuery } from './utils-9b45e0ab.js';
22
- import { D as Dropdown } from './DropDown-565fad6f.js';
21
+ import { g as getAggsQuery } from './utils-9e68acee.js';
22
+ import { D as Dropdown } from './DropDown-05a644a5.js';
23
23
 
24
24
  var updateQuery = Actions.updateQuery,
25
25
  setQueryOptions = Actions.setQueryOptions,
@@ -81,7 +81,8 @@ var SingleDropdownList = {
81
81
  loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
82
82
  nestedField: types.string,
83
83
  index: VueTypes.string,
84
- searchPlaceholder: VueTypes.string.def('Type here to search...')
84
+ searchPlaceholder: VueTypes.string.def('Type here to search...'),
85
+ endpoint: types.endpointConfig
85
86
  },
86
87
  created: function created() {
87
88
  if (!this.enableAppbase && this.$props.index) {
@@ -1,21 +1,21 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-687b2304.js';
8
+ import { t as types } from './vueTypes-b8146772.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, n as isEvent, h as hasCustomRenderer, c as connect } from './index-5371a13f.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-dc92772a.js';
13
- import { T as Title } from './Title-35edd732.js';
14
- import { I as Input } from './Input-c9d757bc.js';
15
- import { C as Container } from './Container-421450dc.js';
11
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, o as isEvent, h as hasCustomRenderer, c as connect } from './index-7788a843.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
13
+ import { T as Title } from './Title-3342664a.js';
14
+ import { I as Input } from './Input-7a2a9fac.js';
15
+ import { C as Container } from './Container-ba826e96.js';
16
16
  import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
17
- import { U as UL, R as Radio } from './FormControlList-38ffe3d3.js';
18
- import { g as getAggsQuery } from './utils-9b45e0ab.js';
17
+ import { U as UL, R as Radio } from './FormControlList-c22d64f6.js';
18
+ import { g as getAggsQuery } from './utils-9e68acee.js';
19
19
 
20
20
  var updateQuery = Actions.updateQuery,
21
21
  setQueryOptions = Actions.setQueryOptions,
@@ -59,7 +59,8 @@ var SingleList = {
59
59
  missingLabel: VueTypes.string.def('N/A'),
60
60
  nestedField: types.string,
61
61
  index: VueTypes.string,
62
- enableStrictSelection: VueTypes.bool.def(false)
62
+ enableStrictSelection: VueTypes.bool.def(false),
63
+ endpoint: types.endpointConfig
63
64
  },
64
65
  data: function data() {
65
66
  var props = this.$props;
@@ -1,18 +1,18 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-687b2304.js';
8
+ import { t as types } from './vueTypes-b8146772.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-5371a13f.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-dc92772a.js';
13
- import { T as Title } from './Title-35edd732.js';
14
- import { C as Container } from './Container-421450dc.js';
15
- import { U as UL, R as Radio } from './FormControlList-38ffe3d3.js';
11
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-7788a843.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
13
+ import { T as Title } from './Title-3342664a.js';
14
+ import { C as Container } from './Container-ba826e96.js';
15
+ import { U as UL, R as Radio } from './FormControlList-c22d64f6.js';
16
16
 
17
17
  var updateQuery = Actions.updateQuery,
18
18
  setQueryOptions = Actions.setQueryOptions,
@@ -47,7 +47,8 @@ var SingleRange = {
47
47
  title: types.title,
48
48
  URLParams: VueTypes.bool.def(false),
49
49
  nestedField: types.string,
50
- index: VueTypes.string
50
+ index: VueTypes.string,
51
+ endpoint: types.endpointConfig
51
52
  },
52
53
  created: function created() {
53
54
  if (!this.enableAppbase && this.$props.index) {
@@ -1,10 +1,10 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { isInternalComponent } from '@appbaseio/reactivecore/lib/utils/transform';
6
6
  import 'redux';
7
- import { c as connect } from './index-5371a13f.js';
7
+ import { c as connect } from './index-7788a843.js';
8
8
  import { setValues } from '@appbaseio/reactivecore/lib/actions/value';
9
9
 
10
10
  var getSearchState = helper.getSearchState;
@@ -26,23 +26,61 @@ var filterByComponentIds = function filterByComponentIds(state, props) {
26
26
  }
27
27
 
28
28
  var _props = props,
29
- componentIds = _props.componentIds;
29
+ componentIds = _props.componentIds,
30
+ excludeComponentIds = _props.excludeComponentIds;
30
31
 
31
- if (typeof componentIds === 'string') {
32
- var _ref;
32
+ if (componentIds) {
33
+ if (typeof componentIds === 'string') {
34
+ var _ref;
33
35
 
34
- return _ref = {}, _ref[componentIds] = state[componentIds], _ref;
36
+ return _ref = {}, _ref[componentIds] = state[componentIds], _ref;
37
+ }
38
+
39
+ if (Array.isArray(componentIds) && componentIds.length) {
40
+ var _filteredState = {};
41
+ componentIds.forEach(function (componentId) {
42
+ _filteredState[componentId] = state[componentId];
43
+ });
44
+ return _filteredState;
45
+ }
35
46
  }
36
47
 
37
- if (Array.isArray(componentIds)) {
38
- var filteredState = {};
39
- componentIds.forEach(function (componentId) {
48
+ var filteredState = {};
49
+
50
+ if (!props.includeInternalComponents) {
51
+ Object.keys(state).forEach(function (componentId) {
52
+ if (componentId.endsWith('internal') || componentId.endsWith('active') || componentId.endsWith('timestamp')) {
53
+ return;
54
+ }
55
+
40
56
  filteredState[componentId] = state[componentId];
41
57
  });
42
- return filteredState;
58
+ } else {
59
+ filteredState = state;
60
+ } // Apply exclude component ids
61
+
62
+
63
+ if (excludeComponentIds) {
64
+ if (typeof excludeComponentIds === 'string') {
65
+ Object.keys(state).forEach(function (componentId) {
66
+ if (componentId === excludeComponentIds) {
67
+ // Delete state
68
+ delete filteredState[componentId];
69
+ }
70
+ });
71
+ }
72
+
73
+ if (Array.isArray(excludeComponentIds) && excludeComponentIds.length) {
74
+ Object.keys(state).forEach(function (componentId) {
75
+ if (excludeComponentIds.includes(componentId)) {
76
+ // Delete state
77
+ delete filteredState[componentId];
78
+ }
79
+ });
80
+ }
43
81
  }
44
82
 
45
- return state;
83
+ return filteredState;
46
84
  };
47
85
 
48
86
  var filterByKeys = function filterByKeys(state, allowedKeys) {
@@ -65,7 +103,9 @@ var StateProvider = {
65
103
  onChange: VueTypes.func,
66
104
  componentIds: VueTypes.oneOfType([VueTypes.string, VueTypes.arrayOf(VueTypes.string)]),
67
105
  includeKeys: VueTypes.arrayOf(VueTypes.string).def(defaultKeys),
68
- strict: VueTypes.bool.def(true)
106
+ strict: VueTypes.bool.def(true),
107
+ includeInternalComponents: VueTypes.bool.def(false),
108
+ excludeComponentIds: VueTypes.oneOfType([VueTypes.string, VueTypes.arrayOf(VueTypes.string)])
69
109
  },
70
110
  data: function data() {
71
111
  this.__state = {
@@ -80,21 +120,21 @@ var StateProvider = {
80
120
  searchStateProps: function searchStateProps() {
81
121
  return {
82
122
  selectedValues: this.selectedValues || {},
83
- queryLog: this.queryLog,
84
- dependencyTree: this.dependencyTree,
85
- componentProps: this.componentProps,
86
- hits: this.hits,
87
- aggregations: this.aggregations,
88
- isLoading: this.isLoading,
89
- error: this.error,
90
- promotedResults: this.promotedResults,
91
- rawData: this.rawData
123
+ queryLog: this.queryLog || {},
124
+ dependencyTree: this.dependencyTree || {},
125
+ componentProps: this.componentProps || {},
126
+ hits: this.hits || {},
127
+ aggregations: this.aggregations || {},
128
+ isLoading: this.isLoading || {},
129
+ error: this.error || {},
130
+ promotedResults: this.promotedResults || {},
131
+ rawData: this.rawData || {}
92
132
  };
93
133
  }
94
134
  },
95
135
  watch: {
96
136
  searchState: function searchState(newVal, oldVal) {
97
- if (this.isStateChanged(newVal, oldVal)) {
137
+ if (oldVal != null && this.isStateChanged(newVal, oldVal)) {
98
138
  this.$emit('change', oldVal, newVal);
99
139
  }
100
140
  },
@@ -125,6 +165,9 @@ var StateProvider = {
125
165
  componentIds: function componentIds(newVal, oldVal) {
126
166
  this.calculateSearchState(newVal, oldVal);
127
167
  },
168
+ excludeComponentIds: function excludeComponentIds(newVal, oldVal) {
169
+ this.calculateSearchState(newVal, oldVal);
170
+ },
128
171
  includeKeys: function includeKeys(newVal, oldVal) {
129
172
  this.calculateSearchState(newVal, oldVal);
130
173
  },
@@ -1,4 +1,4 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-51ce1182.js';
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-76660dab.js';
2
2
  import styled from '@appbaseio/vue-emotion';
3
3
 
4
4
  var _templateObject;
@@ -1,18 +1,18 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { B as Button, t as toggleButtons } from './Button-e18ad90f.js';
9
- import { t as types } from './vueTypes-687b2304.js';
8
+ import { B as Button, t as toggleButtons } from './Button-35aa984e.js';
9
+ import { t as types } from './vueTypes-b8146772.js';
10
10
  import '@appbaseio/reactivecore/lib/utils/transform';
11
11
  import 'redux';
12
- import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-5371a13f.js';
13
- import { C as ComponentWrapper } from './ComponentWrapper-dc92772a.js';
14
- import { T as Title } from './Title-35edd732.js';
15
- import { C as Container } from './Container-421450dc.js';
12
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-7788a843.js';
13
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
14
+ import { T as Title } from './Title-3342664a.js';
15
+ import { C as Container } from './Container-ba826e96.js';
16
16
 
17
17
  var updateQuery = Actions.updateQuery,
18
18
  setQueryOptions = Actions.setQueryOptions,
@@ -41,7 +41,8 @@ var ToggleButton = {
41
41
  URLParams: VueTypes.bool,
42
42
  renderItem: types.func,
43
43
  index: VueTypes.string,
44
- enableStrictSelection: VueTypes.bool
44
+ enableStrictSelection: VueTypes.bool,
45
+ endpoint: types.endpointConfig
45
46
  },
46
47
  data: function data() {
47
48
  this.__state = {