@appbaseio/reactivesearch-vue 1.33.0 → 1.33.2
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.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +1916 -6072
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +3 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{Button-0673191e.js → Button-841fd06d.js} +1 -7
- package/dist/cjs/{CancelSvg-9f258f4f.js → CancelSvg-220a7cc3.js} +24 -58
- package/dist/cjs/{Card-642547a8.js → Card-240f283d.js} +2 -2
- package/dist/cjs/{ComponentWrapper-981ab977.js → ComponentWrapper-9318cece.js} +21 -41
- package/dist/cjs/{Container-daf30918.js → Container-e699ea95.js} +1 -1
- package/dist/cjs/{DataSearch-708b183d.js → DataSearch-99a6a2e8.js} +121 -293
- package/dist/cjs/DataSearch.js +11 -11
- package/dist/cjs/{DropDown-c479bbb0.js → DropDown-8984b544.js} +27 -48
- package/dist/cjs/DynamicRangeSlider.js +44 -93
- package/dist/cjs/{Flex-aa517a13.js → Flex-ddd7cb6b.js} +1 -3
- package/dist/cjs/{FormControlList-c195a592.js → FormControlList-bbb5cd24.js} +1 -3
- package/dist/cjs/{Input-e6603a7e.js → Input-ead4cd84.js} +14 -16
- package/dist/cjs/{ListItem-8c9e0d68.js → ListItem-5088bd6a.js} +2 -3
- package/dist/cjs/MultiDropdownList.js +41 -102
- package/dist/cjs/MultiList.js +35 -98
- package/dist/cjs/MultiRange.js +20 -52
- package/dist/cjs/{Pagination-3d73e1b3.js → Pagination-07f4dbad.js} +10 -30
- package/dist/cjs/{PreferencesConsumer-7be03476.js → PreferencesConsumer-5d67b486.js} +13 -16
- package/dist/cjs/RangeInput.js +36 -52
- package/dist/cjs/RangeSlider.js +24 -48
- package/dist/cjs/ReactiveBase.js +34 -79
- package/dist/cjs/{ReactiveComponent-5ff98cce.js → ReactiveComponent-805201c6.js} +118 -301
- package/dist/cjs/ReactiveComponent.js +20 -20
- package/dist/cjs/ReactiveGoogleMap.js +167 -353
- package/dist/cjs/ReactiveList.js +88 -176
- package/dist/cjs/ResultCard.js +10 -18
- package/dist/cjs/ResultList.js +13 -24
- package/dist/cjs/SelectedFilters.js +16 -34
- package/dist/cjs/SingleDropdownList.js +35 -75
- package/dist/cjs/SingleList.js +29 -75
- package/dist/cjs/SingleRange.js +17 -40
- package/dist/cjs/StateProvider.js +6 -26
- package/dist/cjs/{Title-1de7d0f4.js → Title-16042ea0.js} +1 -1
- package/dist/cjs/ToggleButton.js +20 -58
- package/dist/cjs/{_rollupPluginBabelHelpers-c705cbe6.js → _rollupPluginBabelHelpers-f8b843f8.js} +0 -15
- package/dist/cjs/{index-08f8dfa3.js → index-30126fd0.js} +39 -75
- package/dist/cjs/index.js +20 -21
- package/dist/cjs/initReactivesearch.js +49 -120
- package/dist/cjs/install.js +20 -20
- package/dist/cjs/{ssr-3027b848.js → ssr-f2fc1bf6.js} +1 -4
- package/dist/cjs/{utils-d6a52588.js → utils-83fd01e9.js} +7 -16
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-727b7c63.js → vueTypes-7cfc2f98.js} +6 -11
- package/dist/es/{Button-35aa984e.js → Button-153cd885.js} +1 -7
- package/dist/es/{CancelSvg-4cfae5fd.js → CancelSvg-e40552a5.js} +24 -58
- package/dist/es/{Card-450683f1.js → Card-19ad6d90.js} +2 -2
- package/dist/es/{ComponentWrapper-d5e814a4.js → ComponentWrapper-240450cc.js} +21 -41
- package/dist/es/{Container-ba826e96.js → Container-d00219f7.js} +1 -1
- package/dist/es/{DataSearch-5376d39a.js → DataSearch-20f0d8f1.js} +121 -293
- package/dist/es/DataSearch.js +11 -11
- package/dist/es/{DropDown-05a644a5.js → DropDown-28ddce07.js} +27 -48
- package/dist/es/DynamicRangeSlider.js +44 -93
- package/dist/es/{Flex-1f0795c3.js → Flex-7c177a10.js} +1 -3
- package/dist/es/{FormControlList-c22d64f6.js → FormControlList-99797d0a.js} +1 -3
- package/dist/es/{Input-7a2a9fac.js → Input-c09c0b56.js} +14 -16
- package/dist/es/{ListItem-cad14c5e.js → ListItem-07888a65.js} +2 -3
- package/dist/es/MultiDropdownList.js +41 -102
- package/dist/es/MultiList.js +35 -98
- package/dist/es/MultiRange.js +20 -52
- package/dist/es/{Pagination-af9de08f.js → Pagination-28e56c5c.js} +10 -30
- package/dist/es/{PreferencesConsumer-c30605fe.js → PreferencesConsumer-bc097ebb.js} +13 -16
- package/dist/es/RangeInput.js +36 -52
- package/dist/es/RangeSlider.js +24 -48
- package/dist/es/ReactiveBase.js +34 -79
- package/dist/es/{ReactiveComponent-ee01562d.js → ReactiveComponent-dd85aa9c.js} +118 -301
- package/dist/es/ReactiveComponent.js +20 -20
- package/dist/es/ReactiveGoogleMap.js +167 -353
- package/dist/es/ReactiveList.js +88 -176
- package/dist/es/ResultCard.js +10 -18
- package/dist/es/ResultList.js +13 -24
- package/dist/es/SelectedFilters.js +16 -34
- package/dist/es/SingleDropdownList.js +35 -75
- package/dist/es/SingleList.js +29 -75
- package/dist/es/SingleRange.js +17 -40
- package/dist/es/StateProvider.js +6 -26
- package/dist/es/{Title-3342664a.js → Title-863dfa42.js} +1 -1
- package/dist/es/ToggleButton.js +20 -58
- package/dist/es/{_rollupPluginBabelHelpers-76660dab.js → _rollupPluginBabelHelpers-ded08042.js} +0 -15
- package/dist/es/{index-99c5f9c9.js → index-0444a498.js} +39 -75
- package/dist/es/index.js +20 -21
- package/dist/es/initReactivesearch.js +49 -120
- package/dist/es/install.js +20 -20
- package/dist/es/{ssr-b2c0b401.js → ssr-03607d84.js} +1 -4
- package/dist/es/{utils-9e68acee.js → utils-9e5a16a1.js} +7 -16
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-b8146772.js → vueTypes-8986b709.js} +6 -11
- package/package.json +1 -1
package/dist/cjs/ReactiveBase.js
CHANGED
|
@@ -7,14 +7,14 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
7
7
|
var configureStore = require('@appbaseio/reactivecore');
|
|
8
8
|
var configureStore__default = _interopDefault(configureStore);
|
|
9
9
|
require('@appbaseio/reactivecore/lib/utils/constants');
|
|
10
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
10
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
|
|
11
11
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
12
12
|
var helper = require('@appbaseio/reactivecore/lib/utils/helper');
|
|
13
13
|
var styled = require('@appbaseio/vue-emotion');
|
|
14
14
|
var styled__default = _interopDefault(styled);
|
|
15
|
-
var vueTypes = require('./vueTypes-
|
|
15
|
+
var vueTypes = require('./vueTypes-7cfc2f98.js');
|
|
16
16
|
require('redux');
|
|
17
|
-
var index = require('./index-
|
|
17
|
+
var index = require('./index-30126fd0.js');
|
|
18
18
|
var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
|
|
19
19
|
var analytics = require('@appbaseio/reactivecore/lib/actions/analytics');
|
|
20
20
|
var Appbase = _interopDefault(require('appbase-js'));
|
|
@@ -30,7 +30,6 @@ var Provider = {
|
|
|
30
30
|
if (!store.dispatch && !store.subscribe && !store.getState) {
|
|
31
31
|
throw new Error('[reactivesearch-vue] - store provided is not a valid redux store');
|
|
32
32
|
}
|
|
33
|
-
|
|
34
33
|
return true;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
@@ -44,7 +43,6 @@ var Provider = {
|
|
|
44
43
|
if (this.$slots["default"].length > 1) {
|
|
45
44
|
return h('div', this.$slots["default"]);
|
|
46
45
|
}
|
|
47
|
-
|
|
48
46
|
return this.$slots["default"][0];
|
|
49
47
|
}
|
|
50
48
|
};
|
|
@@ -54,9 +52,9 @@ var Base = {
|
|
|
54
52
|
functional: true,
|
|
55
53
|
render: function render(h, _ref) {
|
|
56
54
|
var _ref$data$attrs$as = _ref.data.attrs.as,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
T = _ref$data$attrs$as === void 0 ? 'div' : _ref$data$attrs$as,
|
|
56
|
+
props = _ref.data,
|
|
57
|
+
children = _ref.children;
|
|
60
58
|
delete props.attrs.as;
|
|
61
59
|
return h(T, _mergeJSXProps([{}, props]), [children]);
|
|
62
60
|
}
|
|
@@ -76,7 +74,7 @@ var Base$1 = styled__default(Base)(_templateObject || (_templateObject = _rollup
|
|
|
76
74
|
});
|
|
77
75
|
|
|
78
76
|
var setHeaders = configureStore.Actions.setHeaders,
|
|
79
|
-
|
|
77
|
+
setValue = configureStore.Actions.setValue;
|
|
80
78
|
var isEqual = configureStore.helper.isEqual;
|
|
81
79
|
var URLParamsProvider = {
|
|
82
80
|
name: 'URLParamsProvider',
|
|
@@ -89,32 +87,27 @@ var URLParamsProvider = {
|
|
|
89
87
|
},
|
|
90
88
|
mounted: function mounted() {
|
|
91
89
|
var _this = this;
|
|
92
|
-
|
|
93
90
|
this.init();
|
|
94
|
-
|
|
95
91
|
window.onpopstate = function () {
|
|
96
92
|
_this.init();
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
var activeComponents = Array.from(_this.params.keys());
|
|
94
|
+
// remove inactive components from selectedValues
|
|
100
95
|
Object.keys(_this.currentSelectedState).filter(function (item) {
|
|
101
96
|
return !activeComponents.includes(item);
|
|
102
97
|
}).forEach(function (component) {
|
|
103
98
|
_this.setValue(component, null, undefined, undefined, undefined, undefined, undefined, undefined, 'URL');
|
|
104
|
-
});
|
|
105
|
-
|
|
99
|
+
});
|
|
100
|
+
// update active components in selectedValues
|
|
106
101
|
Array.from(_this.params.entries()).forEach(function (item) {
|
|
107
102
|
try {
|
|
108
103
|
var component = item[0],
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
value = item[1];
|
|
111
105
|
var _ref = _this.selectedValues[component] || {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
106
|
+
label: component
|
|
107
|
+
},
|
|
108
|
+
label = _ref.label,
|
|
109
|
+
showFilter = _ref.showFilter,
|
|
110
|
+
URLParams = _ref.URLParams;
|
|
118
111
|
_this.setValue(component, JSON.parse(value), label, showFilter, URLParams, undefined, undefined, undefined, 'URL');
|
|
119
112
|
} catch (e) {
|
|
120
113
|
// Do not set value if JSON parsing fails.
|
|
@@ -132,7 +125,6 @@ var URLParamsProvider = {
|
|
|
132
125
|
},
|
|
133
126
|
selectedValues: function selectedValues(newVal, oldVal) {
|
|
134
127
|
var _this2 = this;
|
|
135
|
-
|
|
136
128
|
if (!isEqual(newVal, oldVal)) {
|
|
137
129
|
this.searchString = this.$props.getSearchParams ? this.$props.getSearchParams() : window.location.search;
|
|
138
130
|
this.params = new URLSearchParams(this.searchString);
|
|
@@ -142,8 +134,8 @@ var URLParamsProvider = {
|
|
|
142
134
|
currentComponents.filter(function (component) {
|
|
143
135
|
return newVal[component].URLParams;
|
|
144
136
|
}).forEach(function (component) {
|
|
145
|
-
var selectedValues = newVal[component];
|
|
146
|
-
|
|
137
|
+
var selectedValues = newVal[component];
|
|
138
|
+
// prevents empty history pollution on initial load
|
|
147
139
|
if (_this2.hasValidValue(newVal[component]) || _this2.hasValidValue(oldVal[component])) {
|
|
148
140
|
if (selectedValues.URLParams) {
|
|
149
141
|
if (selectedValues.category) {
|
|
@@ -151,48 +143,41 @@ var URLParamsProvider = {
|
|
|
151
143
|
category: selectedValues.category,
|
|
152
144
|
value: selectedValues.value
|
|
153
145
|
}));
|
|
154
|
-
|
|
155
146
|
if (shouldUpdateHistory) {
|
|
156
147
|
shouldPushHistory = true;
|
|
157
148
|
}
|
|
158
149
|
} else {
|
|
159
150
|
var _shouldUpdateHistory = _this2.setURL(component, _this2.getValue(selectedValues.value));
|
|
160
|
-
|
|
161
151
|
if (_shouldUpdateHistory) {
|
|
162
152
|
shouldPushHistory = true;
|
|
163
153
|
}
|
|
164
154
|
}
|
|
165
155
|
} else {
|
|
166
156
|
_this2.params["delete"](component);
|
|
167
|
-
|
|
168
157
|
shouldPushHistory = true;
|
|
169
158
|
}
|
|
170
159
|
} else if (!_this2.hasValidValue(newVal[component]) && urlComponents.includes(component)) {
|
|
171
160
|
// doesn't have a valid value, but the url has a (stale) valid value set
|
|
172
161
|
_this2.params["delete"](component);
|
|
173
|
-
|
|
174
162
|
shouldPushHistory = true;
|
|
175
163
|
}
|
|
176
|
-
});
|
|
164
|
+
});
|
|
177
165
|
|
|
166
|
+
// remove unmounted components
|
|
178
167
|
Object.keys(newVal).filter(function (component) {
|
|
179
168
|
return !currentComponents.includes(component);
|
|
180
169
|
}).forEach(function (component) {
|
|
181
170
|
_this2.params["delete"](component);
|
|
182
|
-
|
|
183
171
|
shouldPushHistory = true;
|
|
184
172
|
});
|
|
185
|
-
|
|
186
173
|
if (!currentComponents.length) {
|
|
187
174
|
Array.from(this.params.keys()).forEach(function (item) {
|
|
188
175
|
if (_this2.searchComponents && _this2.searchComponents.includes(item)) {
|
|
189
176
|
_this2.params["delete"](item);
|
|
190
|
-
|
|
191
177
|
shouldPushHistory = true;
|
|
192
178
|
}
|
|
193
179
|
});
|
|
194
180
|
}
|
|
195
|
-
|
|
196
181
|
if (shouldPushHistory) {
|
|
197
182
|
this.pushToHistory();
|
|
198
183
|
}
|
|
@@ -216,10 +201,8 @@ var URLParamsProvider = {
|
|
|
216
201
|
// search on homepage -> route changes -> search results page with same search query
|
|
217
202
|
if (window) {
|
|
218
203
|
var searchString = this.$props.getSearchParams ? this.$props.getSearchParams() : window.location.search;
|
|
219
|
-
|
|
220
204
|
if (searchString !== this.searchString) {
|
|
221
205
|
var event;
|
|
222
|
-
|
|
223
206
|
if (typeof Event === 'function') {
|
|
224
207
|
event = new Event('popstate');
|
|
225
208
|
} else {
|
|
@@ -227,7 +210,6 @@ var URLParamsProvider = {
|
|
|
227
210
|
event = document.createEvent('Event');
|
|
228
211
|
event.initEvent('popstate', true, true);
|
|
229
212
|
}
|
|
230
|
-
|
|
231
213
|
window.dispatchEvent(event);
|
|
232
214
|
}
|
|
233
215
|
}
|
|
@@ -239,20 +221,17 @@ var URLParamsProvider = {
|
|
|
239
221
|
},
|
|
240
222
|
getValue: function getValue(value) {
|
|
241
223
|
var _this3 = this;
|
|
242
|
-
|
|
243
224
|
if (Array.isArray(value) && value.length) {
|
|
244
225
|
return value.map(function (item) {
|
|
245
226
|
return _this3.getValue(item);
|
|
246
227
|
});
|
|
247
228
|
}
|
|
248
|
-
|
|
249
229
|
if (value && typeof value === 'object') {
|
|
250
230
|
// TODO: support for NestedList
|
|
251
231
|
if (value.location) return value;
|
|
252
232
|
if (value.category) return value;
|
|
253
233
|
return value.label || value.key || null;
|
|
254
234
|
}
|
|
255
|
-
|
|
256
235
|
return value;
|
|
257
236
|
},
|
|
258
237
|
setURL: function setURL(component, value) {
|
|
@@ -260,21 +239,17 @@ var URLParamsProvider = {
|
|
|
260
239
|
this.params["delete"](component);
|
|
261
240
|
return true;
|
|
262
241
|
}
|
|
263
|
-
|
|
264
242
|
var data = JSON.stringify(value);
|
|
265
|
-
|
|
266
243
|
if (data !== this.params.get(component)) {
|
|
267
244
|
this.params.set(component, data);
|
|
268
245
|
return true;
|
|
269
246
|
}
|
|
270
|
-
|
|
271
247
|
return false;
|
|
272
248
|
},
|
|
273
249
|
pushToHistory: function pushToHistory() {
|
|
274
250
|
var paramsSting = this.params.toString() ? "?" + this.params.toString() : '';
|
|
275
251
|
var base = window.location.href.split('?')[0];
|
|
276
252
|
var newURL = "" + base + paramsSting;
|
|
277
|
-
|
|
278
253
|
if (this.$props.setSearchParams) {
|
|
279
254
|
this.$props.setSearchParams(newURL);
|
|
280
255
|
} else if (window.history.pushState) {
|
|
@@ -282,7 +257,6 @@ var URLParamsProvider = {
|
|
|
282
257
|
path: newURL
|
|
283
258
|
}, '', newURL);
|
|
284
259
|
}
|
|
285
|
-
|
|
286
260
|
this.init();
|
|
287
261
|
}
|
|
288
262
|
},
|
|
@@ -297,23 +271,19 @@ var URLParamsProvider = {
|
|
|
297
271
|
}, [children]);
|
|
298
272
|
}
|
|
299
273
|
};
|
|
300
|
-
|
|
301
274
|
var mapStateToProps = function mapStateToProps(state) {
|
|
302
275
|
return {
|
|
303
276
|
selectedValues: state.selectedValues,
|
|
304
277
|
searchComponents: state.components
|
|
305
278
|
};
|
|
306
279
|
};
|
|
307
|
-
|
|
308
280
|
var mapDispatchtoProps = {
|
|
309
281
|
setHeaders: setHeaders,
|
|
310
282
|
setValue: setValue
|
|
311
283
|
};
|
|
312
|
-
|
|
313
284
|
URLParamsProvider.install = function (Vue) {
|
|
314
285
|
Vue.component(URLParamsProvider.name, URLParamsProvider);
|
|
315
286
|
};
|
|
316
|
-
|
|
317
287
|
var URLParamsProvider$1 = index.connect(mapStateToProps, mapDispatchtoProps)(URLParamsProvider);
|
|
318
288
|
|
|
319
289
|
var typography = {
|
|
@@ -347,7 +317,6 @@ function getTheme(preset) {
|
|
|
347
317
|
if (preset === 'light') {
|
|
348
318
|
return light;
|
|
349
319
|
}
|
|
350
|
-
|
|
351
320
|
return dark;
|
|
352
321
|
}
|
|
353
322
|
|
|
@@ -364,8 +333,7 @@ var ReactiveBase = {
|
|
|
364
333
|
},
|
|
365
334
|
mounted: function mounted() {
|
|
366
335
|
var enableAppbase = this.enableAppbase,
|
|
367
|
-
|
|
368
|
-
|
|
336
|
+
endpoint = this.endpoint;
|
|
369
337
|
if (!enableAppbase && endpoint) {
|
|
370
338
|
console.warn('Warning(ReactiveSearch): The `endpoint` prop works only when `enableAppbase` prop is set to true.');
|
|
371
339
|
}
|
|
@@ -435,15 +403,13 @@ var ReactiveBase = {
|
|
|
435
403
|
computed: {
|
|
436
404
|
getHeaders: function getHeaders() {
|
|
437
405
|
var _this$$props = this.$props,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
406
|
+
enableAppbase = _this$$props.enableAppbase,
|
|
407
|
+
headers = _this$$props.headers,
|
|
408
|
+
appbaseConfig = _this$$props.appbaseConfig,
|
|
409
|
+
mongodb = _this$$props.mongodb,
|
|
410
|
+
endpoint = _this$$props.endpoint;
|
|
444
411
|
var _ref = appbaseConfig || {},
|
|
445
|
-
|
|
446
|
-
|
|
412
|
+
enableTelemetry = _ref.enableTelemetry;
|
|
447
413
|
return _rollupPluginBabelHelpers._extends({}, enableAppbase && !mongodb && _rollupPluginBabelHelpers._extends({
|
|
448
414
|
'X-Search-Client': index.X_SEARCH_CLIENT
|
|
449
415
|
}, enableTelemetry === false && {
|
|
@@ -459,7 +425,6 @@ var ReactiveBase = {
|
|
|
459
425
|
setStore: function setStore(props) {
|
|
460
426
|
var credentials = props.url && props.url.trim() !== '' && !props.credentials ? null : props.credentials;
|
|
461
427
|
var url = props.url && props.url.trim() !== '' ? props.url : '';
|
|
462
|
-
|
|
463
428
|
if (props.enableAppbase && props.endpoint) {
|
|
464
429
|
if (props.endpoint.url) {
|
|
465
430
|
// eslint-disable-next-line prefer-destructuring
|
|
@@ -468,7 +433,6 @@ var ReactiveBase = {
|
|
|
468
433
|
throw Error('Error(ReactiveSearch): The `endpoint` prop object requires `url` property.');
|
|
469
434
|
}
|
|
470
435
|
}
|
|
471
|
-
|
|
472
436
|
var config = {
|
|
473
437
|
url: url,
|
|
474
438
|
app: props.app,
|
|
@@ -483,51 +447,44 @@ var ReactiveBase = {
|
|
|
483
447
|
endpoint: props.endpoint
|
|
484
448
|
};
|
|
485
449
|
var queryParams = '';
|
|
486
|
-
|
|
487
450
|
if (typeof window !== 'undefined') {
|
|
488
451
|
queryParams = window.location.search;
|
|
489
452
|
} else {
|
|
490
453
|
queryParams = props.queryParams || '';
|
|
491
454
|
}
|
|
492
|
-
|
|
493
455
|
var params = new URLSearchParams(queryParams);
|
|
494
456
|
var selectedValues = {};
|
|
495
457
|
var urlValues = {};
|
|
496
458
|
Array.from(params.keys()).forEach(function (key) {
|
|
497
459
|
try {
|
|
498
460
|
var _extends2, _extends3;
|
|
499
|
-
|
|
500
461
|
var parsedParams = JSON.parse(params.get(key));
|
|
501
462
|
var selectedValue = {};
|
|
502
|
-
|
|
503
463
|
if (parsedParams.value) {
|
|
504
464
|
selectedValue.value = parsedParams.value;
|
|
505
465
|
} else {
|
|
506
466
|
selectedValue.value = parsedParams;
|
|
507
467
|
}
|
|
508
|
-
|
|
509
468
|
if (parsedParams.category) selectedValue.category = parsedParams.category;
|
|
510
469
|
selectedValue.reference = 'URL';
|
|
511
470
|
selectedValues = _rollupPluginBabelHelpers._extends({}, selectedValues, (_extends2 = {}, _extends2[key] = selectedValue, _extends2));
|
|
512
471
|
urlValues = _rollupPluginBabelHelpers._extends({}, urlValues, (_extends3 = {}, _extends3[key] = selectedValue.value, _extends3));
|
|
513
|
-
} catch (e) {
|
|
472
|
+
} catch (e) {
|
|
473
|
+
// Do not add to selectedValues if JSON parsing fails.
|
|
514
474
|
}
|
|
515
475
|
});
|
|
516
476
|
var themePreset = props.themePreset,
|
|
517
|
-
|
|
518
|
-
|
|
477
|
+
enableAppbase = props.enableAppbase,
|
|
478
|
+
endpoint = props.endpoint;
|
|
519
479
|
var appbaseRef = Appbase(config);
|
|
520
|
-
|
|
521
480
|
appbaseRef.transformRequest = function (request) {
|
|
522
481
|
var modifiedRequest = enableAppbase ? helper.transformRequestUsingEndpoint(request, endpoint) : request;
|
|
523
482
|
if (props.transformRequest) return props.transformRequest(modifiedRequest);
|
|
524
483
|
return modifiedRequest;
|
|
525
484
|
};
|
|
526
|
-
|
|
527
485
|
if (this.$props.transformResponse) {
|
|
528
486
|
appbaseRef.transformResponse = this.$props.transformResponse;
|
|
529
487
|
}
|
|
530
|
-
|
|
531
488
|
var initialState = _rollupPluginBabelHelpers._extends({
|
|
532
489
|
config: _rollupPluginBabelHelpers._extends({}, config, {
|
|
533
490
|
initialQueriesSyncTime: props.initialQueriesSyncTime,
|
|
@@ -540,7 +497,6 @@ var ReactiveBase = {
|
|
|
540
497
|
urlValues: urlValues,
|
|
541
498
|
headers: this.getHeaders
|
|
542
499
|
}, this.$props.initialState);
|
|
543
|
-
|
|
544
500
|
this.store = configureStore__default(initialState);
|
|
545
501
|
}
|
|
546
502
|
},
|
|
@@ -548,8 +504,8 @@ var ReactiveBase = {
|
|
|
548
504
|
var h = arguments[0];
|
|
549
505
|
var children = this.$slots["default"];
|
|
550
506
|
var _this$$props2 = this.$props,
|
|
551
|
-
|
|
552
|
-
|
|
507
|
+
style = _this$$props2.style,
|
|
508
|
+
className = _this$$props2.className;
|
|
553
509
|
return h(Provider, {
|
|
554
510
|
"attrs": {
|
|
555
511
|
"store": this.store
|
|
@@ -566,7 +522,6 @@ var ReactiveBase = {
|
|
|
566
522
|
}, [children])]);
|
|
567
523
|
}
|
|
568
524
|
};
|
|
569
|
-
|
|
570
525
|
ReactiveBase.install = function (Vue) {
|
|
571
526
|
Vue.component(ReactiveBase.name, ReactiveBase);
|
|
572
527
|
};
|