@appbaseio/reactivesearch-vue 1.16.0-alpha.6 → 1.16.0-alpha.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +16030 -13113
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-446f819e.js +68 -0
  6. package/dist/cjs/{DownShift-966a58cb.js → CancelSvg-9f258f4f.js} +60 -16
  7. package/dist/cjs/Card-642547a8.js +30 -0
  8. package/dist/cjs/{ComponentWrapper-603848ed.js → ComponentWrapper-ad3dad02.js} +40 -21
  9. package/dist/cjs/{Container-6cdd3864.js → Container-daf30918.js} +3 -11
  10. package/dist/cjs/DataSearch-86914b10.js +2322 -0
  11. package/dist/cjs/DataSearch.js +18 -2151
  12. package/dist/cjs/{DropDown-f6224ac8.js → DropDown-5513ea77.js} +80 -95
  13. package/dist/cjs/DynamicRangeSlider.js +107 -43
  14. package/dist/cjs/Flex-aa517a13.js +52 -0
  15. package/dist/cjs/FormControlList-c195a592.js +47 -0
  16. package/dist/cjs/Input-e6603a7e.js +79 -0
  17. package/dist/cjs/ListItem-8c9e0d68.js +46 -0
  18. package/dist/cjs/MultiDropdownList.js +102 -68
  19. package/dist/cjs/MultiList.js +80 -50
  20. package/dist/cjs/MultiRange.js +21 -16
  21. package/dist/cjs/{Pagination-af399262.js → Pagination-fe5452fc.js} +14 -8
  22. package/dist/cjs/RangeInput.js +29 -45
  23. package/dist/cjs/RangeSlider.js +32 -30
  24. package/dist/cjs/ReactiveBase.js +87 -56
  25. package/dist/cjs/ReactiveComponent.js +75 -62
  26. package/dist/cjs/ReactiveGoogleMap.js +262 -191
  27. package/dist/cjs/ReactiveList.js +189 -241
  28. package/dist/cjs/ResultCard.js +8 -6
  29. package/dist/cjs/ResultList.js +8 -6
  30. package/dist/cjs/SelectedFilters.js +66 -34
  31. package/dist/cjs/SingleDropdownList.js +88 -60
  32. package/dist/cjs/SingleList.js +53 -35
  33. package/dist/cjs/SingleRange.js +19 -14
  34. package/dist/cjs/StateProvider.js +39 -10
  35. package/dist/cjs/{Title-65d39104.js → Title-1de7d0f4.js} +3 -11
  36. package/dist/cjs/ToggleButton.js +36 -16
  37. package/dist/cjs/{_rollupPluginBabelHelpers-4abdbfff.js → _rollupPluginBabelHelpers-c705cbe6.js} +2 -4
  38. package/dist/cjs/{index-baca18c4.js → index-6a167fe0.js} +99 -13
  39. package/dist/cjs/index.js +31 -25
  40. package/dist/cjs/initReactivesearch.js +178 -104
  41. package/dist/cjs/install-004c6aa4.js +1408 -0
  42. package/dist/cjs/install.js +42 -44
  43. package/dist/cjs/ssr-3027b848.js +39 -0
  44. package/dist/cjs/{utils-ea846a20.js → utils-d6a52588.js} +2 -2
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-6de9d2a9.js} +9 -4
  47. package/dist/es/Button-d8bc15ea.js +59 -0
  48. package/dist/es/{DownShift-92347b5e.js → CancelSvg-4cfae5fd.js} +56 -17
  49. package/dist/es/Card-450683f1.js +23 -0
  50. package/dist/es/{ComponentWrapper-c4c91949.js → ComponentWrapper-424e86fd.js} +40 -21
  51. package/dist/es/Container-ba826e96.js +10 -0
  52. package/dist/es/DataSearch-e71a1014.js +2307 -0
  53. package/dist/es/DataSearch.js +17 -2150
  54. package/dist/es/{DropDown-3d4291f1.js → DropDown-7d9a15c1.js} +79 -94
  55. package/dist/es/DynamicRangeSlider.js +107 -43
  56. package/dist/es/Flex-1f0795c3.js +47 -0
  57. package/dist/es/FormControlList-c22d64f6.js +40 -0
  58. package/dist/es/Input-7a2a9fac.js +71 -0
  59. package/dist/es/ListItem-cad14c5e.js +39 -0
  60. package/dist/es/MultiDropdownList.js +102 -68
  61. package/dist/es/MultiList.js +80 -50
  62. package/dist/es/MultiRange.js +21 -16
  63. package/dist/es/{Pagination-c2a00175.js → Pagination-3f350098.js} +14 -8
  64. package/dist/es/RangeInput.js +29 -45
  65. package/dist/es/RangeSlider.js +32 -30
  66. package/dist/es/ReactiveBase.js +87 -56
  67. package/dist/es/ReactiveComponent.js +75 -62
  68. package/dist/es/ReactiveGoogleMap.js +262 -191
  69. package/dist/es/ReactiveList.js +189 -241
  70. package/dist/es/ResultCard.js +8 -6
  71. package/dist/es/ResultList.js +8 -6
  72. package/dist/es/SelectedFilters.js +66 -34
  73. package/dist/es/SingleDropdownList.js +88 -60
  74. package/dist/es/SingleList.js +53 -35
  75. package/dist/es/SingleRange.js +19 -14
  76. package/dist/es/StateProvider.js +39 -10
  77. package/dist/es/Title-3342664a.js +10 -0
  78. package/dist/es/ToggleButton.js +36 -16
  79. package/dist/es/{_rollupPluginBabelHelpers-ecf6c03c.js → _rollupPluginBabelHelpers-76660dab.js} +2 -4
  80. package/dist/es/{index-185b6266.js → index-7788a843.js} +95 -14
  81. package/dist/es/index.js +27 -22
  82. package/dist/es/initReactivesearch.js +179 -105
  83. package/dist/es/install-b7b604cc.js +1401 -0
  84. package/dist/es/install.js +40 -46
  85. package/dist/es/ssr-b2c0b401.js +33 -0
  86. package/dist/es/{utils-57cc8789.js → utils-9e68acee.js} +2 -2
  87. package/dist/es/version.js +1 -1
  88. package/dist/es/{vueTypes-98d938a9.js → vueTypes-9326e0be.js} +9 -4
  89. package/package.json +6 -4
  90. package/dist/cjs/Button-d48d4365.js +0 -146
  91. package/dist/cjs/Card-9748fbb2.js +0 -58
  92. package/dist/cjs/Flex-befd65fc.js +0 -160
  93. package/dist/cjs/FormControlList-f3857d4b.js +0 -105
  94. package/dist/cjs/Input-95cb19f8.js +0 -178
  95. package/dist/cjs/ListItem-84d185cf.js +0 -84
  96. package/dist/cjs/ssr-3ca8a14f.js +0 -47
  97. package/dist/es/Button-27cc8574.js +0 -137
  98. package/dist/es/Card-1f93780d.js +0 -51
  99. package/dist/es/Container-88c805ef.js +0 -18
  100. package/dist/es/Flex-16d1103a.js +0 -155
  101. package/dist/es/FormControlList-96d44e7b.js +0 -98
  102. package/dist/es/Input-1159c4b5.js +0 -170
  103. package/dist/es/ListItem-d22510c9.js +0 -77
  104. package/dist/es/Title-f0217338.js +0 -18
  105. package/dist/es/ssr-a710392b.js +0 -41
@@ -6,19 +6,19 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
6
6
 
7
7
  var configureStore = require('@appbaseio/reactivecore');
8
8
  var configureStore__default = _interopDefault(configureStore);
9
- var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
9
+ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
10
10
  var VueTypes = _interopDefault(require('vue-types'));
11
11
  var constants = require('@appbaseio/reactivecore/lib/utils/constants');
12
12
  require('@appbaseio/vue-emotion');
13
- var vueTypes = require('./vueTypes-c21f265b.js');
13
+ var vueTypes = require('./vueTypes-6de9d2a9.js');
14
14
  require('@appbaseio/reactivecore/lib/utils/transform');
15
15
  require('redux');
16
- var index = require('./index-baca18c4.js');
17
- var ComponentWrapper = require('./ComponentWrapper-603848ed.js');
18
- var Title = require('./Title-65d39104.js');
19
- var Container = require('./Container-6cdd3864.js');
16
+ var index = require('./index-6a167fe0.js');
17
+ var ComponentWrapper = require('./ComponentWrapper-ad3dad02.js');
18
+ var Title = require('./Title-1de7d0f4.js');
19
+ var Container = require('./Container-daf30918.js');
20
20
  var NoSSR = _interopDefault(require('vue-no-ssr'));
21
- var ssr = require('./ssr-3ca8a14f.js');
21
+ var ssr = require('./ssr-3027b848.js');
22
22
 
23
23
  var updateQuery = configureStore.Actions.updateQuery,
24
24
  setQueryOptions = configureStore.Actions.setQueryOptions,
@@ -64,7 +64,8 @@ var RangeSlider = {
64
64
  title: vueTypes.types.title,
65
65
  URLParams: VueTypes.bool.def(false),
66
66
  sliderOptions: VueTypes.object.def({}),
67
- nestedField: vueTypes.types.string
67
+ nestedField: vueTypes.types.string,
68
+ index: VueTypes.string
68
69
  },
69
70
  methods: {
70
71
  handleSliderChange: function handleSliderChange(values) {
@@ -79,32 +80,28 @@ var RangeSlider = {
79
80
  });
80
81
  }
81
82
  },
82
- handleSlider: function handleSlider(values) {
83
- var _this = this;
84
-
85
- clearTimeout(this.handleSliderChange._tId);
86
- this.handleSliderChange._tId = setTimeout(function () {
87
- _this.handleSliderChange(values);
88
- }, 100);
83
+ handleSlider: function handleSlider() {
84
+ var sliderValues = this.$refs.slider.getValue();
85
+ this.handleSliderChange(sliderValues);
89
86
  },
90
87
  handleChange: function handleChange(currentValue, props) {
91
- var _this2 = this;
88
+ var _this = this;
92
89
 
93
90
  if (props === void 0) {
94
91
  props = this.$props;
95
92
  }
96
93
 
97
94
  var performUpdate = function performUpdate() {
98
- _this2.currentValue = currentValue;
95
+ _this.currentValue = currentValue;
99
96
 
100
- _this2.updateQueryHandler([currentValue[0], currentValue[1]], props);
97
+ _this.updateQueryHandler([currentValue[0], currentValue[1]], props);
101
98
 
102
- _this2.$emit('valueChange', {
99
+ _this.$emit('valueChange', {
103
100
  start: currentValue[0],
104
101
  end: currentValue[1]
105
102
  });
106
103
 
107
- _this2.$emit('value-change', {
104
+ _this.$emit('value-change', {
108
105
  start: currentValue[0],
109
106
  end: currentValue[1]
110
107
  });
@@ -118,14 +115,14 @@ var RangeSlider = {
118
115
  updateQueryHandler: function updateQueryHandler(value, props) {
119
116
  var customQuery = props.customQuery;
120
117
  var query = RangeSlider.defaultQuery(value, props);
121
- var customQueryOptions;
122
118
 
123
119
  if (customQuery) {
124
120
  var _ref = customQuery(value, props) || {};
125
121
 
126
122
  query = _ref.query;
127
- customQueryOptions = getOptionsFromQuery(customQuery(value, props));
123
+ var customQueryOptions = getOptionsFromQuery(customQuery(value, props));
128
124
  index.updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
125
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
129
126
  }
130
127
 
131
128
  var showFilter = props.showFilter,
@@ -136,7 +133,6 @@ var RangeSlider = {
136
133
  currentEnd = value[1]; // check if the slider is at its initial position
137
134
 
138
135
  var isInitialValue = currentStart === start && currentEnd === end;
139
- this.setQueryOptions(props.componentId, customQueryOptions);
140
136
  this.updateQuery({
141
137
  componentId: props.componentId,
142
138
  query: query,
@@ -172,6 +168,10 @@ var RangeSlider = {
172
168
  created: function created() {
173
169
  if (!this.$props.range) {
174
170
  console.error('%crange is not defined. Read more about this at https://opensource.appbase.io/reactive-manual/vue/range-components/rangeslider.html#props', 'font-size: 12.5px;');
171
+ }
172
+
173
+ if (!this.enableAppbase && this.$props.index) {
174
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
175
175
  } // Set custom query in store
176
176
 
177
177
 
@@ -211,12 +211,13 @@ var RangeSlider = {
211
211
  "max": this.$props.range.end,
212
212
  "dotSize": 20,
213
213
  "height": 4,
214
- "enable-cross": false
214
+ "enable-cross": false,
215
+ "tooltip": "always"
216
+ },
217
+ "on": {
218
+ "drag-end": this.handleSlider
215
219
  },
216
- "props": _rollupPluginBabelHelpers._extends({}, this.$props.sliderOptions),
217
- "on": _rollupPluginBabelHelpers._extends({}, {
218
- input: this.handleSlider
219
- })
220
+ "props": _rollupPluginBabelHelpers._extends({}, this.$props.sliderOptions)
220
221
  }), this.$props.rangeLabels && h("div", {
221
222
  "class": "label-container"
222
223
  }, [h("label", {
@@ -258,7 +259,7 @@ RangeSlider.defaultQuery = function (values, props) {
258
259
 
259
260
  RangeSlider.parseValue = function (value, props) {
260
261
  if (value) {
261
- return [value.start, value.end];
262
+ return Array.isArray(value) ? value : [value.start, value.end];
262
263
  }
263
264
 
264
265
  if (props.range) {
@@ -273,7 +274,8 @@ var mapStateToProps = function mapStateToProps(state, props) {
273
274
  options: state.aggregations[props.componentId] ? state.aggregations[props.componentId][props.dataField] && state.aggregations[props.componentId][props.dataField].buckets // eslint-disable-line
274
275
  : [],
275
276
  selectedValue: state.selectedValues[props.componentId] ? state.selectedValues[props.componentId].value : null,
276
- componentProps: state.props[props.componentId]
277
+ componentProps: state.props[props.componentId],
278
+ enableAppbase: state.config.enableAppbase
277
279
  };
278
280
  };
279
281
 
@@ -6,16 +6,16 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
6
6
 
7
7
  var configureStore = require('@appbaseio/reactivecore');
8
8
  var configureStore__default = _interopDefault(configureStore);
9
- var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-4abdbfff.js');
9
+ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
10
10
  var VueTypes = _interopDefault(require('vue-types'));
11
11
  require('@appbaseio/reactivecore/lib/utils/constants');
12
+ var helper = require('@appbaseio/reactivecore/lib/utils/helper');
12
13
  var styled = require('@appbaseio/vue-emotion');
13
14
  var styled__default = _interopDefault(styled);
14
- var vueTypes = require('./vueTypes-c21f265b.js');
15
+ var vueTypes = require('./vueTypes-6de9d2a9.js');
15
16
  require('redux');
16
- var index = require('./index-baca18c4.js');
17
+ var index = require('./index-6a167fe0.js');
17
18
  var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
18
- var helper = require('@appbaseio/reactivecore/lib/utils/helper');
19
19
  var analytics = require('@appbaseio/reactivecore/lib/actions/analytics');
20
20
  var Appbase = _interopDefault(require('appbase-js'));
21
21
  require('url-search-params-polyfill');
@@ -49,15 +49,7 @@ var Provider = {
49
49
  }
50
50
  };
51
51
 
52
- function _templateObject() {
53
- var data = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tfont-family: ", ";\n\tfont-size: ", ";\n\tcolor: ", ";\n\twidth: 100%;\n\n\tinput,\n\tbutton,\n\ttextarea,\n\tselect {\n\t\tfont-family: ", ";\n\t}\n\n\t*,\n\t*:before,\n\t*:after {\n\t\tbox-sizing: border-box;\n\t}\n"]);
54
-
55
- _templateObject = function _templateObject() {
56
- return data;
57
- };
58
-
59
- return data;
60
- }
52
+ var _templateObject;
61
53
  var Base = {
62
54
  functional: true,
63
55
  render: function render(h, _ref) {
@@ -69,7 +61,7 @@ var Base = {
69
61
  return h(T, _mergeJSXProps([{}, props]), [children]);
70
62
  }
71
63
  };
72
- var Base$1 = styled__default(Base)(_templateObject(), function (_ref2) {
64
+ var Base$1 = styled__default(Base)(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tfont-family: ", ";\n\tfont-size: ", ";\n\tcolor: ", ";\n\twidth: 100%;\n\n\tinput,\n\tbutton,\n\ttextarea,\n\tselect {\n\t\tfont-family: ", ";\n\t}\n\n\t*,\n\t*:before,\n\t*:after {\n\t\tbox-sizing: border-box;\n\t}\n"])), function (_ref2) {
73
65
  var theme = _ref2.theme;
74
66
  return theme.typography.fontFamily;
75
67
  }, function (_ref3) {
@@ -93,7 +85,7 @@ var URLParamsProvider = {
93
85
  headers: vueTypes.types.headers,
94
86
  getSearchParams: vueTypes.types.func,
95
87
  setSearchParams: vueTypes.types.func,
96
- as: vueTypes.types.string.def('div')
88
+ as: VueTypes.string.def('div')
97
89
  },
98
90
  mounted: function mounted() {
99
91
  var _this = this;
@@ -108,7 +100,7 @@ var URLParamsProvider = {
108
100
  Object.keys(_this.currentSelectedState).filter(function (item) {
109
101
  return !activeComponents.includes(item);
110
102
  }).forEach(function (component) {
111
- _this.setValue(component, null);
103
+ _this.setValue(component, null, undefined, undefined, undefined, undefined, undefined, undefined, 'URL');
112
104
  }); // update active components in selectedValues
113
105
 
114
106
  Array.from(_this.params.entries()).forEach(function (item) {
@@ -123,7 +115,7 @@ var URLParamsProvider = {
123
115
  showFilter = _ref.showFilter,
124
116
  URLParams = _ref.URLParams;
125
117
 
126
- _this.setValue(component, JSON.parse(value), label, showFilter, URLParams);
118
+ _this.setValue(component, JSON.parse(value), label, showFilter, URLParams, undefined, undefined, undefined, 'URL');
127
119
  } catch (e) {
128
120
  // Do not set value if JSON parsing fails.
129
121
  console.error(e);
@@ -141,39 +133,45 @@ var URLParamsProvider = {
141
133
  selectedValues: function selectedValues(newVal, oldVal) {
142
134
  var _this2 = this;
143
135
 
144
- this.currentSelectedState = newVal;
145
-
146
136
  if (!isEqual(newVal, oldVal)) {
147
137
  this.searchString = this.$props.getSearchParams ? this.$props.getSearchParams() : window.location.search;
148
138
  this.params = new URLSearchParams(this.searchString);
149
139
  var currentComponents = Object.keys(newVal);
150
140
  var urlComponents = Array.from(this.params.keys());
141
+ var shouldPushHistory = false;
151
142
  currentComponents.filter(function (component) {
152
143
  return newVal[component].URLParams;
153
144
  }).forEach(function (component) {
154
- // prevents empty history pollution on initial load
155
- if (_this2.hasValidValue(newVal[component]) || _this2.hasValidValue(oldVal[component])) {
156
- var selectedValues = newVal[component];
145
+ var selectedValues = newVal[component]; // prevents empty history pollution on initial load
157
146
 
147
+ if (_this2.hasValidValue(newVal[component]) || _this2.hasValidValue(oldVal[component])) {
158
148
  if (selectedValues.URLParams) {
159
149
  if (selectedValues.category) {
160
- _this2.setURL(component, _this2.getValue({
150
+ var shouldUpdateHistory = _this2.setURL(component, _this2.getValue({
161
151
  category: selectedValues.category,
162
152
  value: selectedValues.value
163
153
  }));
154
+
155
+ if (shouldUpdateHistory) {
156
+ shouldPushHistory = true;
157
+ }
164
158
  } else {
165
- _this2.setURL(component, _this2.getValue(selectedValues.value));
159
+ var _shouldUpdateHistory = _this2.setURL(component, _this2.getValue(selectedValues.value));
160
+
161
+ if (_shouldUpdateHistory) {
162
+ shouldPushHistory = true;
163
+ }
166
164
  }
167
165
  } else {
168
166
  _this2.params["delete"](component);
169
167
 
170
- _this2.pushToHistory();
168
+ shouldPushHistory = true;
171
169
  }
172
170
  } else if (!_this2.hasValidValue(newVal[component]) && urlComponents.includes(component)) {
173
171
  // doesn't have a valid value, but the url has a (stale) valid value set
174
172
  _this2.params["delete"](component);
175
173
 
176
- _this2.pushToHistory();
174
+ shouldPushHistory = true;
177
175
  }
178
176
  }); // remove unmounted components
179
177
 
@@ -182,15 +180,20 @@ var URLParamsProvider = {
182
180
  }).forEach(function (component) {
183
181
  _this2.params["delete"](component);
184
182
 
185
- _this2.pushToHistory();
183
+ shouldPushHistory = true;
186
184
  });
187
185
 
188
186
  if (!currentComponents.length) {
189
187
  Array.from(this.params.keys()).forEach(function (item) {
190
188
  if (_this2.searchComponents && _this2.searchComponents.includes(item)) {
191
189
  _this2.params["delete"](item);
190
+
191
+ shouldPushHistory = true;
192
192
  }
193
193
  });
194
+ }
195
+
196
+ if (shouldPushHistory) {
194
197
  this.pushToHistory();
195
198
  }
196
199
  }
@@ -241,7 +244,9 @@ var URLParamsProvider = {
241
244
  return value.map(function (item) {
242
245
  return _this3.getValue(item);
243
246
  });
244
- } else if (value && typeof value === 'object') {
247
+ }
248
+
249
+ if (value && typeof value === 'object') {
245
250
  // TODO: support for NestedList
246
251
  if (value.location) return value;
247
252
  if (value.category) return value;
@@ -251,20 +256,19 @@ var URLParamsProvider = {
251
256
  return value;
252
257
  },
253
258
  setURL: function setURL(component, value) {
254
- this.searchString = this.$props.getSearchParams ? this.$props.getSearchParams() : window.location.search;
255
- this.params = new URLSearchParams(this.searchString);
256
-
257
259
  if (!value || typeof value === 'string' && value.trim() === '' || Array.isArray(value) && value.length === 0) {
258
260
  this.params["delete"](component);
259
- this.pushToHistory();
260
- } else {
261
- var data = JSON.stringify(this.getValue(value));
261
+ return true;
262
+ }
262
263
 
263
- if (data !== this.params.get(component)) {
264
- this.params.set(component, data);
265
- this.pushToHistory();
266
- }
264
+ var data = JSON.stringify(value);
265
+
266
+ if (data !== this.params.get(component)) {
267
+ this.params.set(component, data);
268
+ return true;
267
269
  }
270
+
271
+ return false;
268
272
  },
269
273
  pushToHistory: function pushToHistory() {
270
274
  var paramsSting = this.params.toString() ? "?" + this.params.toString() : '';
@@ -366,11 +370,11 @@ var ReactiveBase = {
366
370
  }
367
371
  },
368
372
  props: {
369
- app: vueTypes.types.stringRequired,
373
+ app: vueTypes.types.string,
370
374
  analytics: VueTypes.bool,
371
375
  analyticsConfig: vueTypes.types.analyticsConfig,
372
376
  appbaseConfig: vueTypes.types.appbaseConfig,
373
- enableAppbase: vueTypes.types.bool.def(false),
377
+ enableAppbase: VueTypes.bool.def(false),
374
378
  credentials: vueTypes.types.string,
375
379
  headers: vueTypes.types.headers,
376
380
  queryParams: vueTypes.types.string,
@@ -379,13 +383,15 @@ var ReactiveBase = {
379
383
  type: vueTypes.types.string,
380
384
  url: vueTypes.types.string,
381
385
  mapKey: vueTypes.types.string,
386
+ initialQueriesSyncTime: vueTypes.types.number,
382
387
  className: vueTypes.types.string,
383
388
  initialState: VueTypes.object.def({}),
384
389
  transformRequest: vueTypes.types.func,
385
390
  transformResponse: vueTypes.types.func,
386
391
  as: VueTypes.string.def('div'),
387
392
  getSearchParams: vueTypes.types.func,
388
- setSearchParams: vueTypes.types.func
393
+ setSearchParams: vueTypes.types.func,
394
+ mongodb: vueTypes.types.mongodb
389
395
  },
390
396
  provide: function provide() {
391
397
  return {
@@ -425,6 +431,27 @@ var ReactiveBase = {
425
431
  this.store.dispatch(analytics.updateAnalyticsConfig(newVal));
426
432
  }
427
433
  }
434
+ },
435
+ mongodb: function mongodb() {
436
+ this.updateState(this.$props);
437
+ }
438
+ },
439
+ computed: {
440
+ getHeaders: function getHeaders() {
441
+ var _this$$props = this.$props,
442
+ enableAppbase = _this$$props.enableAppbase,
443
+ headers = _this$$props.headers,
444
+ appbaseConfig = _this$$props.appbaseConfig,
445
+ mongodb = _this$$props.mongodb;
446
+
447
+ var _ref = appbaseConfig || {},
448
+ enableTelemetry = _ref.enableTelemetry;
449
+
450
+ return _rollupPluginBabelHelpers._extends({}, enableAppbase && !mongodb && _rollupPluginBabelHelpers._extends({
451
+ 'X-Search-Client': index.X_SEARCH_CLIENT
452
+ }, enableTelemetry === false && {
453
+ 'X-Enable-Telemetry': false
454
+ }), headers);
428
455
  }
429
456
  },
430
457
  methods: {
@@ -435,10 +462,10 @@ var ReactiveBase = {
435
462
  setStore: function setStore(props) {
436
463
  var credentials = props.url && props.url.trim() !== '' && !props.credentials ? null : props.credentials;
437
464
 
438
- var appbaseConfig = _rollupPluginBabelHelpers._extends(_rollupPluginBabelHelpers._extends({}, props.analyticsConfig), props.appbaseConfig);
465
+ var appbaseConfig = _rollupPluginBabelHelpers._extends({}, props.analyticsConfig, props.appbaseConfig);
439
466
 
440
467
  var config = {
441
- url: props.url && props.url.trim() !== '' ? props.url : 'https://scalr.api.appbase.io',
468
+ url: props.url && props.url.trim() !== '' ? props.url : '',
442
469
  app: props.app,
443
470
  credentials: credentials,
444
471
  type: props.type ? props.type : '*',
@@ -446,7 +473,8 @@ var ReactiveBase = {
446
473
  transformResponse: props.transformResponse,
447
474
  enableAppbase: props.enableAppbase,
448
475
  analytics: props.appbaseConfig ? props.appbaseConfig.recordAnalytics : props.analytics,
449
- analyticsConfig: appbaseConfig
476
+ analyticsConfig: appbaseConfig,
477
+ mongodb: props.mongodb
450
478
  };
451
479
  var queryParams = '';
452
480
 
@@ -458,9 +486,10 @@ var ReactiveBase = {
458
486
 
459
487
  var params = new URLSearchParams(queryParams);
460
488
  var selectedValues = {};
489
+ var urlValues = {};
461
490
  Array.from(params.keys()).forEach(function (key) {
462
491
  try {
463
- var _extends2;
492
+ var _extends2, _extends3;
464
493
 
465
494
  var parsedParams = JSON.parse(params.get(key));
466
495
  var selectedValue = {};
@@ -472,13 +501,13 @@ var ReactiveBase = {
472
501
  }
473
502
 
474
503
  if (parsedParams.category) selectedValue.category = parsedParams.category;
475
- selectedValues = _rollupPluginBabelHelpers._extends(_rollupPluginBabelHelpers._extends({}, selectedValues), {}, (_extends2 = {}, _extends2[key] = selectedValue, _extends2));
504
+ selectedValue.reference = 'URL';
505
+ selectedValues = _rollupPluginBabelHelpers._extends({}, selectedValues, (_extends2 = {}, _extends2[key] = selectedValue, _extends2));
506
+ urlValues = _rollupPluginBabelHelpers._extends({}, urlValues, (_extends3 = {}, _extends3[key] = selectedValue.value, _extends3));
476
507
  } catch (e) {// Do not add to selectedValues if JSON parsing fails.
477
508
  }
478
509
  });
479
- var _props$headers = props.headers,
480
- headers = _props$headers === void 0 ? {} : _props$headers,
481
- themePreset = props.themePreset;
510
+ var themePreset = props.themePreset;
482
511
  var appbaseRef = Appbase(config);
483
512
 
484
513
  if (this.$props.transformRequest) {
@@ -490,13 +519,16 @@ var ReactiveBase = {
490
519
  }
491
520
 
492
521
  var initialState = _rollupPluginBabelHelpers._extends({
493
- config: _rollupPluginBabelHelpers._extends(_rollupPluginBabelHelpers._extends({}, config), {}, {
522
+ config: _rollupPluginBabelHelpers._extends({}, config, {
523
+ initialQueriesSyncTime: props.initialQueriesSyncTime,
524
+ initialTimestamp: new Date().getTime(),
494
525
  mapKey: props.mapKey,
495
526
  themePreset: themePreset
496
527
  }),
497
528
  appbaseRef: appbaseRef,
498
529
  selectedValues: selectedValues,
499
- headers: headers
530
+ urlValues: urlValues,
531
+ headers: this.getHeaders
500
532
  }, this.$props.initialState);
501
533
 
502
534
  this.store = configureStore__default(initialState);
@@ -505,10 +537,9 @@ var ReactiveBase = {
505
537
  render: function render() {
506
538
  var h = arguments[0];
507
539
  var children = this.$slots["default"];
508
- var _this$$props = this.$props,
509
- headers = _this$$props.headers,
510
- style = _this$$props.style,
511
- className = _this$$props.className;
540
+ var _this$$props2 = this.$props,
541
+ style = _this$$props2.style,
542
+ className = _this$$props2.className;
512
543
  return h(Provider, {
513
544
  "attrs": {
514
545
  "store": this.store
@@ -516,7 +547,7 @@ var ReactiveBase = {
516
547
  }, [h(URLParamsProvider$1, {
517
548
  "attrs": {
518
549
  "as": this.$props.as,
519
- "headers": headers,
550
+ "headers": this.getHeaders,
520
551
  "className": className,
521
552
  "getSearchParams": this.getSearchParams,
522
553
  "setSearchParams": this.setSearchParams