@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,8 +1,8 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-51ce1182.js';
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-76660dab.js';
2
2
  import { css } from 'emotion';
3
3
  import styled from '@appbaseio/vue-emotion';
4
4
  import { lighten } from 'polished';
5
- import './Title-35edd732.js';
5
+ import './Title-3342664a.js';
6
6
 
7
7
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
8
8
  var container = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: 0;\n\tborder-radius: 0.25rem;\n\toverflow: hidden;\n"])));
@@ -1,25 +1,25 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } 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, o as parseValueArray, 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, q as parseValueArray, 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,
@@ -82,7 +82,8 @@ var MultiDropdownList = {
82
82
  loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
83
83
  nestedField: types.string,
84
84
  index: VueTypes.string,
85
- searchPlaceholder: VueTypes.string.def('Type here to search...')
85
+ searchPlaceholder: VueTypes.string.def('Type here to search...'),
86
+ endpoint: types.endpointConfig
86
87
  },
87
88
  created: function created() {
88
89
  if (!this.enableAppbase && this.$props.index) {
@@ -1,21 +1,21 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } 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, n as isEvent, o as parseValueArray, g as getComponent, 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, o as isEvent, q as parseValueArray, g as getComponent, 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, C as Checkbox } from './FormControlList-38ffe3d3.js';
18
- import { g as getAggsQuery } from './utils-9b45e0ab.js';
17
+ import { U as UL, C as Checkbox } 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,
@@ -60,7 +60,8 @@ var MultiList = {
60
60
  showMissing: VueTypes.bool.def(false),
61
61
  missingLabel: VueTypes.string.def('N/A'),
62
62
  nestedField: types.string,
63
- index: VueTypes.string
63
+ index: VueTypes.string,
64
+ endpoint: types.endpointConfig
64
65
  },
65
66
  data: function data() {
66
67
  var props = this.$props;
@@ -1,18 +1,18 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } 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 { o as parseValueArray, 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, C as Checkbox } from './FormControlList-38ffe3d3.js';
11
+ import { q as parseValueArray, 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, C as Checkbox } from './FormControlList-c22d64f6.js';
16
16
 
17
17
  var updateQuery = Actions.updateQuery,
18
18
  setQueryOptions = Actions.setQueryOptions,
@@ -49,7 +49,8 @@ var MultiRange = {
49
49
  title: types.title,
50
50
  URLParams: VueTypes.bool.def(false),
51
51
  nestedField: types.string,
52
- index: VueTypes.string
52
+ index: VueTypes.string,
53
+ endpoint: types.endpointConfig
53
54
  },
54
55
  methods: {
55
56
  handleClick: function handleClick(e) {
@@ -0,0 +1,177 @@
1
+ import { helper } from '@appbaseio/reactivecore';
2
+ import VueTypes from 'vue-types';
3
+ import { p as pagination, B as Button } from './Button-35aa984e.js';
4
+ import { t as types } from './vueTypes-b8146772.js';
5
+
6
+ var getClassName = helper.getClassName,
7
+ handleA11yAction = helper.handleA11yAction;
8
+
9
+ function getStartPage(totalPages, currentPage, showEndPage) {
10
+ var midValue = parseInt(totalPages / 2, 10);
11
+ var start = currentPage - (showEndPage ? Math.ceil(midValue / 2) - 1 : midValue);
12
+ return start > 1 ? start : 2;
13
+ }
14
+
15
+ var Pagination = {
16
+ name: 'Pagination',
17
+ functional: true,
18
+ props: {
19
+ currentPage: types.number,
20
+ innerClass: types.style,
21
+ pages: types.number,
22
+ setPage: types.func,
23
+ totalPages: types.number,
24
+ showEndPage: VueTypes.bool,
25
+ prevLabel: types.string,
26
+ nextLabel: types.string
27
+ },
28
+ render: function render(createElement, context) {
29
+ var h = arguments[0];
30
+ var props = context.props;
31
+
32
+ var onPrevPage = function onPrevPage() {
33
+ if (props.currentPage) {
34
+ props.setPage(props.currentPage - 1);
35
+ }
36
+ };
37
+
38
+ var onNextPage = function onNextPage() {
39
+ if (props.currentPage < props.totalPages - 1) {
40
+ props.setPage(props.currentPage + 1);
41
+ }
42
+ };
43
+
44
+ if (!props.totalPages) {
45
+ return null;
46
+ }
47
+
48
+ var innerClassName = getClassName(props.innerClass, 'button');
49
+ var primary = props.currentPage === 0;
50
+ var className = innerClassName || primary ? innerClassName + " " + (primary ? 'active' : '') : '';
51
+
52
+ var buildPaginationDOM = function buildPaginationDOM(position) {
53
+ var pages = props.pages,
54
+ currentPage = props.currentPage,
55
+ totalPages = props.totalPages,
56
+ setPage = props.setPage,
57
+ showEndPage = props.showEndPage;
58
+ var start = position === 'start' ? getStartPage(pages, currentPage, showEndPage) : Math.max(2, Math.ceil(totalPages - (pages - 1) / 2 + 1));
59
+ var paginationButtons = [];
60
+ var endPage = start;
61
+
62
+ if (start <= totalPages) {
63
+ var totalPagesToShow = pages < totalPages ? start + (pages - 1) : totalPages + 1;
64
+
65
+ if (showEndPage) {
66
+ totalPagesToShow = position === 'start' ? start + (Math.ceil(pages / 2) - pages % 2) : totalPages + 1;
67
+ }
68
+
69
+ if (currentPage > totalPages - pages + 2) {
70
+ start = Math.max(2, totalPages - pages + 2);
71
+ totalPagesToShow = start + pages;
72
+ }
73
+
74
+ var _loop = function _loop(i) {
75
+ var activeButton = currentPage === i - 1;
76
+ var classNameBtn = innerClassName || activeButton ? innerClassName + " " + (activeButton ? 'active' : '') : '';
77
+ var pageBtn = h(Button, {
78
+ "class": classNameBtn,
79
+ "attrs": {
80
+ "primary": activeButton,
81
+ "tabIndex": "0",
82
+ "alt": "page-" + i
83
+ },
84
+ "on": {
85
+ "keyPress": function keyPress(event) {
86
+ return handleA11yAction(event, function () {
87
+ return setPage(i - 1);
88
+ });
89
+ },
90
+ "click": function click() {
91
+ return setPage(i - 1);
92
+ }
93
+ }
94
+ }, [i]);
95
+
96
+ if (i <= totalPages + 1) {
97
+ paginationButtons.push(pageBtn);
98
+
99
+ if (i === Math.min(totalPages + 1, totalPagesToShow) - 1) {
100
+ endPage = i;
101
+ }
102
+ }
103
+ };
104
+
105
+ for (var i = start; i < Math.min(totalPages + 1, totalPagesToShow); i += 1) {
106
+ _loop(i);
107
+ }
108
+ }
109
+
110
+ return [paginationButtons, start, endPage];
111
+ };
112
+
113
+ var buildIntermediatePaginationDom = function buildIntermediatePaginationDom() {
114
+ var showEndPage = props.showEndPage,
115
+ currentPage = props.currentPage,
116
+ totalPages = props.totalPages,
117
+ pages = props.pages;
118
+ if (!showEndPage) return buildPaginationDOM('start')[0];
119
+
120
+ if (currentPage <= totalPages - pages + 2 || totalPages < pages) {
121
+ return buildPaginationDOM('start')[0];
122
+ }
123
+
124
+ return null;
125
+ };
126
+
127
+ return h("div", {
128
+ "class": pagination + " " + getClassName(props.innerClass, 'pagination')
129
+ }, [h(Button, {
130
+ "class": getClassName(props.innerClass, 'button') || '',
131
+ "attrs": {
132
+ "disabled": props.currentPage === 0,
133
+ "tabIndex": "0"
134
+ },
135
+ "on": {
136
+ "keyPress": function keyPress(event) {
137
+ return handleA11yAction(event, onPrevPage);
138
+ },
139
+ "click": onPrevPage
140
+ }
141
+ }, [props.prevLabel || 'Prev']), h(Button, {
142
+ "class": className,
143
+ "attrs": {
144
+ "primary": primary,
145
+ "tabIndex": "0"
146
+ },
147
+ "on": {
148
+ "keyPress": function keyPress(event) {
149
+ return handleA11yAction(event, function () {
150
+ return props.setPage(0);
151
+ });
152
+ },
153
+ "click": function click() {
154
+ return props.setPage(0);
155
+ }
156
+ }
157
+ }, ["1"]), props.showEndPage && props.currentPage >= Math.floor(props.pages / 2) + !!(props.pages % 2) && buildPaginationDOM('start')[1] !== 2 ? h("span", ["..."]) : null, buildIntermediatePaginationDom(), props.showEndPage && props.pages > 2 && props.currentPage <= props.totalPages - Math.ceil(props.pages * 0.75) && buildPaginationDOM('start')[2] !== buildPaginationDOM('end')[1] - 1 ? h("span", ["..."]) : null, props.showEndPage && props.totalPages >= props.pages && buildPaginationDOM('end')[0], h(Button, {
158
+ "class": getClassName(props.innerClass, 'button') || '',
159
+ "attrs": {
160
+ "disabled": props.currentPage >= props.totalPages - 1,
161
+ "tabIndex": "0"
162
+ },
163
+ "on": {
164
+ "keyPress": function keyPress(event) {
165
+ return handleA11yAction(event, onNextPage);
166
+ },
167
+ "click": onNextPage
168
+ }
169
+ }, [props.nextLabel || 'Next'])]);
170
+ }
171
+ };
172
+
173
+ Pagination.install = function (Vue) {
174
+ Vue.component(Pagination.name, Pagination);
175
+ };
176
+
177
+ export { Pagination as P };
@@ -1,21 +1,21 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
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 { css } from 'emotion';
6
6
  import styled from '@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 { c as connect } from './index-5371a13f.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-dc92772a.js';
13
- import './Title-35edd732.js';
14
- import { F as Flex } from './Flex-09d40927.js';
15
- import { I as Input } from './Input-c9d757bc.js';
16
- import { C as Container } from './Container-421450dc.js';
11
+ import { c as connect } from './index-7788a843.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
13
+ import './Title-3342664a.js';
14
+ import { F as Flex } from './Flex-1f0795c3.js';
15
+ import { I as Input } from './Input-7a2a9fac.js';
16
+ import { C as Container } from './Container-ba826e96.js';
17
17
  import 'vue-no-ssr';
18
- import './ssr-ad57b0ad.js';
18
+ import './ssr-b2c0b401.js';
19
19
  import { RangeConnected as RangeConnected$1 } from './RangeSlider.js';
20
20
 
21
21
  var _templateObject, _templateObject2;
@@ -86,7 +86,8 @@ var RangeInput = {
86
86
  title: types.title,
87
87
  URLParams: VueTypes.bool.def(false),
88
88
  sliderOptions: VueTypes.object.def({}),
89
- nestedField: types.string
89
+ nestedField: types.string,
90
+ endpoint: types.endpointConfig
90
91
  },
91
92
  methods: {
92
93
  shouldUpdate: function shouldUpdate(value) {
@@ -1,17 +1,17 @@
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 '@appbaseio/vue-emotion';
6
- import { t as types } from './vueTypes-687b2304.js';
6
+ import { t as types } from './vueTypes-b8146772.js';
7
7
  import '@appbaseio/reactivecore/lib/utils/transform';
8
8
  import 'redux';
9
- import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-5371a13f.js';
10
- import { C as ComponentWrapper } from './ComponentWrapper-dc92772a.js';
11
- import { T as Title } from './Title-35edd732.js';
12
- import { C as Container } from './Container-421450dc.js';
9
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-7788a843.js';
10
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
11
+ import { T as Title } from './Title-3342664a.js';
12
+ import { C as Container } from './Container-ba826e96.js';
13
13
  import NoSSR from 'vue-no-ssr';
14
- import { g as getComponents, S as Slider } from './ssr-ad57b0ad.js';
14
+ import { g as getComponents, S as Slider } from './ssr-b2c0b401.js';
15
15
 
16
16
  var updateQuery = Actions.updateQuery,
17
17
  setQueryOptions = Actions.setQueryOptions,
@@ -58,7 +58,8 @@ var RangeSlider = {
58
58
  URLParams: VueTypes.bool.def(false),
59
59
  sliderOptions: VueTypes.object.def({}),
60
60
  nestedField: types.string,
61
- index: VueTypes.string
61
+ index: VueTypes.string,
62
+ endpoint: types.endpointConfig
62
63
  },
63
64
  methods: {
64
65
  handleSliderChange: function handleSliderChange(values) {
@@ -1,12 +1,12 @@
1
1
  import configureStore, { Actions, helper } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
- import { isEqual as isEqual$1 } from '@appbaseio/reactivecore/lib/utils/helper';
5
+ import { isEqual as isEqual$1, transformRequestUsingEndpoint } from '@appbaseio/reactivecore/lib/utils/helper';
6
6
  import styled from '@appbaseio/vue-emotion';
7
- import { t as types } from './vueTypes-687b2304.js';
7
+ import { t as types } from './vueTypes-b8146772.js';
8
8
  import 'redux';
9
- import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-5371a13f.js';
9
+ import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-7788a843.js';
10
10
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
11
11
  import { updateAnalyticsConfig } from '@appbaseio/reactivecore/lib/actions/analytics';
12
12
  import Appbase from 'appbase-js';
@@ -355,16 +355,16 @@ var ReactiveBase = {
355
355
  this.setStore(this.$props);
356
356
  },
357
357
  mounted: function mounted() {
358
- var analyticsConfig = this.analyticsConfig; // TODO: Remove in 2.0
358
+ var enableAppbase = this.enableAppbase,
359
+ endpoint = this.endpoint;
359
360
 
360
- if (analyticsConfig !== undefined) {
361
- console.warn('Warning(ReactiveSearch): The `analyticsConfig` prop has been marked as deprecated, please use the `appbaseConfig` prop instead.');
361
+ if (!enableAppbase && endpoint) {
362
+ console.warn('Warning(ReactiveSearch): The `endpoint` prop works only when `enableAppbase` prop is set to true.');
362
363
  }
363
364
  },
364
365
  props: {
365
366
  app: types.string,
366
367
  analytics: VueTypes.bool,
367
- analyticsConfig: types.analyticsConfig,
368
368
  appbaseConfig: types.appbaseConfig,
369
369
  enableAppbase: VueTypes.bool.def(false),
370
370
  credentials: types.string,
@@ -383,7 +383,8 @@ var ReactiveBase = {
383
383
  as: VueTypes.string.def('div'),
384
384
  getSearchParams: types.func,
385
385
  setSearchParams: types.func,
386
- mongodb: types.mongodb
386
+ mongodb: types.mongodb,
387
+ endpoint: types.endpointConfig
387
388
  },
388
389
  provide: function provide() {
389
390
  return {
@@ -410,13 +411,6 @@ var ReactiveBase = {
410
411
  headers: function headers() {
411
412
  this.updateState(this.$props);
412
413
  },
413
- analyticsConfig: function analyticsConfig(newVal, oldVal) {
414
- if (!isEqual$1(newVal, oldVal)) {
415
- if (this.store) {
416
- this.store.dispatch(updateAnalyticsConfig(newVal));
417
- }
418
- }
419
- },
420
414
  appbaseConfig: function appbaseConfig(newVal, oldVal) {
421
415
  if (!isEqual$1(newVal, oldVal)) {
422
416
  if (this.store) {
@@ -434,7 +428,8 @@ var ReactiveBase = {
434
428
  enableAppbase = _this$$props.enableAppbase,
435
429
  headers = _this$$props.headers,
436
430
  appbaseConfig = _this$$props.appbaseConfig,
437
- mongodb = _this$$props.mongodb;
431
+ mongodb = _this$$props.mongodb,
432
+ endpoint = _this$$props.endpoint;
438
433
 
439
434
  var _ref = appbaseConfig || {},
440
435
  enableTelemetry = _ref.enableTelemetry;
@@ -443,7 +438,7 @@ var ReactiveBase = {
443
438
  'X-Search-Client': X_SEARCH_CLIENT
444
439
  }, enableTelemetry === false && {
445
440
  'X-Enable-Telemetry': false
446
- }), headers);
441
+ }), headers, enableAppbase && endpoint && endpoint.headers && _extends({}, endpoint.headers));
447
442
  }
448
443
  },
449
444
  methods: {
@@ -453,11 +448,19 @@ var ReactiveBase = {
453
448
  },
454
449
  setStore: function setStore(props) {
455
450
  var credentials = props.url && props.url.trim() !== '' && !props.credentials ? null : props.credentials;
456
-
457
- var appbaseConfig = _extends({}, props.analyticsConfig, props.appbaseConfig);
451
+ var url = props.url && props.url.trim() !== '' ? props.url : '';
452
+
453
+ if (props.enableAppbase && props.endpoint) {
454
+ if (props.endpoint.url) {
455
+ // eslint-disable-next-line prefer-destructuring
456
+ url = props.endpoint.url;
457
+ } else {
458
+ throw Error('Error(ReactiveSearch): The `endpoint` prop object requires `url` property.');
459
+ }
460
+ }
458
461
 
459
462
  var config = {
460
- url: props.url && props.url.trim() !== '' ? props.url : '',
463
+ url: url,
461
464
  app: props.app,
462
465
  credentials: credentials,
463
466
  type: props.type ? props.type : '*',
@@ -465,8 +468,9 @@ var ReactiveBase = {
465
468
  transformResponse: props.transformResponse,
466
469
  enableAppbase: props.enableAppbase,
467
470
  analytics: props.appbaseConfig ? props.appbaseConfig.recordAnalytics : props.analytics,
468
- analyticsConfig: appbaseConfig,
469
- mongodb: props.mongodb
471
+ analyticsConfig: props.appbaseConfig,
472
+ mongodb: props.mongodb,
473
+ endpoint: props.endpoint
470
474
  };
471
475
  var queryParams = '';
472
476
 
@@ -499,12 +503,16 @@ var ReactiveBase = {
499
503
  } catch (e) {// Do not add to selectedValues if JSON parsing fails.
500
504
  }
501
505
  });
502
- var themePreset = props.themePreset;
506
+ var themePreset = props.themePreset,
507
+ enableAppbase = props.enableAppbase,
508
+ endpoint = props.endpoint;
503
509
  var appbaseRef = Appbase(config);
504
510
 
505
- if (this.$props.transformRequest) {
506
- appbaseRef.transformRequest = this.$props.transformRequest;
507
- }
511
+ appbaseRef.transformRequest = function (request) {
512
+ var modifiedRequest = enableAppbase ? transformRequestUsingEndpoint(request, endpoint) : request;
513
+ if (props.transformRequest) return props.transformRequest(modifiedRequest);
514
+ return modifiedRequest;
515
+ };
508
516
 
509
517
  if (this.$props.transformResponse) {
510
518
  appbaseRef.transformResponse = this.$props.transformResponse;
@@ -1,12 +1,12 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
- import { t as types } from './vueTypes-687b2304.js';
5
+ import { t as types } from './vueTypes-b8146772.js';
6
6
  import '@appbaseio/reactivecore/lib/utils/transform';
7
7
  import 'redux';
8
- import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, c as connect } from './index-5371a13f.js';
9
- import { C as ComponentWrapper } from './ComponentWrapper-dc92772a.js';
8
+ import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, c as connect } from './index-7788a843.js';
9
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
10
10
 
11
11
  var _excluded = ["options"];
12
12
  var updateQuery = Actions.updateQuery,
@@ -34,7 +34,8 @@ var ReactiveComponent = {
34
34
  URLParams: VueTypes.bool.def(false),
35
35
  distinctField: types.string,
36
36
  distinctFieldConfig: types.props,
37
- index: VueTypes.string
37
+ index: VueTypes.string,
38
+ endpoint: types.endpointConfig
38
39
  },
39
40
  created: function created() {
40
41
  var _this = this;