@appbaseio/reactivesearch-vue 3.0.0-alpha.2 → 3.0.0-alpha.3
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 +2315 -605
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{ComponentWrapper-611cf7f9.js → ComponentWrapper-2dc930e1.js} +20 -19
- package/dist/cjs/{DropDown-dc184468.js → DropDown-7bd56543.js} +3 -4
- package/dist/cjs/DynamicRangeSlider.js +50 -49
- package/dist/cjs/MultiDropdownList.js +33 -33
- package/dist/cjs/MultiList.js +29 -30
- package/dist/cjs/MultiRange.js +17 -17
- package/dist/cjs/{Pagination-b5ddc906.js → Pagination-4ffc67cd.js} +3 -4
- package/dist/cjs/{PreferencesConsumer-22d1b49f.js → PreferencesConsumer-2c69ac61.js} +1 -1
- package/dist/cjs/RangeInput.js +6 -7
- package/dist/cjs/RangeSlider.js +14 -14
- package/dist/cjs/ReactiveBase.js +32 -13
- package/dist/cjs/{ReactiveComponent-0a6b819b.js → ReactiveComponent-4435adfa.js} +84 -81
- package/dist/cjs/ReactiveComponent.js +7 -7
- package/dist/cjs/ReactiveGoogleMap.js +33 -34
- package/dist/cjs/ReactiveList.js +37 -27
- package/dist/cjs/SelectedFilters.js +7 -8
- package/dist/cjs/SingleDropdownList.js +23 -24
- package/dist/cjs/SingleList.js +20 -21
- package/dist/cjs/SingleRange.js +14 -14
- package/dist/cjs/StateProvider.js +4 -5
- package/dist/cjs/ToggleButton.js +17 -18
- package/dist/cjs/{index-d8d8f291.js → index-1481798c.js} +4 -7
- package/dist/cjs/index.js +11 -16
- package/dist/cjs/initReactivesearch.js +10 -464
- package/dist/cjs/install.js +8 -7
- package/dist/cjs/{utils-83fd01e9.js → utils-36b1b880.js} +2 -5
- package/dist/cjs/version.js +1 -1
- package/dist/es/{ComponentWrapper-3dfe6931.js → ComponentWrapper-3a215eed.js} +9 -7
- package/dist/es/DynamicRangeSlider.js +32 -30
- package/dist/es/MultiDropdownList.js +16 -15
- package/dist/es/MultiList.js +15 -15
- package/dist/es/MultiRange.js +7 -6
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/RangeSlider.js +4 -3
- package/dist/es/ReactiveBase.js +27 -8
- package/dist/es/{ReactiveComponent-8fb219ec.js → ReactiveComponent-04d94e01.js} +38 -34
- package/dist/es/ReactiveComponent.js +2 -2
- package/dist/es/ReactiveGoogleMap.js +11 -11
- package/dist/es/ReactiveList.js +16 -5
- package/dist/es/SingleDropdownList.js +6 -6
- package/dist/es/SingleList.js +6 -6
- package/dist/es/SingleRange.js +4 -3
- package/dist/es/ToggleButton.js +6 -6
- package/dist/es/index.js +6 -11
- package/dist/es/initReactivesearch.js +9 -463
- package/dist/es/install.js +3 -2
- package/dist/es/version.js +1 -1
- package/package.json +2 -2
|
@@ -63,25 +63,6 @@ var DynamicRangeSlider = {
|
|
|
63
63
|
created: function created() {
|
|
64
64
|
var _this = this;
|
|
65
65
|
this.$timestamp = new Date().getTime();
|
|
66
|
-
var onQueryChange = function onQueryChange() {
|
|
67
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
68
|
-
args[_key] = arguments[_key];
|
|
69
|
-
}
|
|
70
|
-
_this.$emit.apply(_this, ['queryChange'].concat(args));
|
|
71
|
-
_this.$emit.apply(_this, ['query-change'].concat(args));
|
|
72
|
-
};
|
|
73
|
-
this.setQueryListener(this.$props.componentId, onQueryChange, null);
|
|
74
|
-
// Update props in store
|
|
75
|
-
this.setComponentProps(this.componentId, this.$props, componentTypes.dynamicRangeSlider);
|
|
76
|
-
this.setComponentProps(this.internalRangeComponent, this.$props, componentTypes.dynamicRangeSlider);
|
|
77
|
-
|
|
78
|
-
// Set custom query in store
|
|
79
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
80
|
-
},
|
|
81
|
-
mounted: function mounted() {
|
|
82
|
-
this.setReact();
|
|
83
|
-
},
|
|
84
|
-
beforeMount: function beforeMount() {
|
|
85
66
|
var components = [];
|
|
86
67
|
if (this.$$store) {
|
|
87
68
|
var _this$$$store$getStat = this.$$store.getState();
|
|
@@ -102,6 +83,24 @@ var DynamicRangeSlider = {
|
|
|
102
83
|
// get range before executing other queries
|
|
103
84
|
this.updateRangeQueryOptions();
|
|
104
85
|
}
|
|
86
|
+
var onQueryChange = function onQueryChange() {
|
|
87
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
88
|
+
args[_key] = arguments[_key];
|
|
89
|
+
}
|
|
90
|
+
_this.$emit.apply(_this, ['queryChange'].concat(args));
|
|
91
|
+
_this.$emit.apply(_this, ['query-change'].concat(args));
|
|
92
|
+
};
|
|
93
|
+
this.setQueryListener(this.$props.componentId, onQueryChange, null);
|
|
94
|
+
// Update props in store
|
|
95
|
+
this.setComponentProps(this.componentId, this.$props, componentTypes.dynamicRangeSlider);
|
|
96
|
+
this.setComponentProps(this.internalRangeComponent, this.$props, componentTypes.dynamicRangeSlider);
|
|
97
|
+
|
|
98
|
+
// Set custom query in store
|
|
99
|
+
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
100
|
+
this.setReact(false);
|
|
101
|
+
},
|
|
102
|
+
mounted: function mounted() {
|
|
103
|
+
this.setReact(true);
|
|
105
104
|
},
|
|
106
105
|
beforeUpdate: function beforeUpdate() {
|
|
107
106
|
if (!this.currentValue) {
|
|
@@ -125,9 +124,9 @@ var DynamicRangeSlider = {
|
|
|
125
124
|
var start = _ref.start,
|
|
126
125
|
end = _ref.end;
|
|
127
126
|
if (this.$props.defaultValue) {
|
|
128
|
-
var _this$$props$
|
|
129
|
-
defaultStart = _this$$props$
|
|
130
|
-
defaultEnd = _this$$props$
|
|
127
|
+
var _this$$props$defaultV2 = this.$props.defaultValue(start, end),
|
|
128
|
+
defaultStart = _this$$props$defaultV2.start,
|
|
129
|
+
defaultEnd = _this$$props$defaultV2.end;
|
|
131
130
|
this.handleChange([defaultStart, defaultEnd]);
|
|
132
131
|
} else if (this.isControlled()) {
|
|
133
132
|
this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
|
|
@@ -135,13 +134,13 @@ var DynamicRangeSlider = {
|
|
|
135
134
|
this.currentValue = [start, end];
|
|
136
135
|
}
|
|
137
136
|
},
|
|
138
|
-
setReact: function setReact() {
|
|
137
|
+
setReact: function setReact(shouldExecute) {
|
|
139
138
|
if (this.$props.react) {
|
|
140
|
-
this.watchComponent(this.internalRangeComponent, this.$props.react);
|
|
141
|
-
this.watchComponent(this.$props.componentId, this.$props.react);
|
|
139
|
+
this.watchComponent(this.internalRangeComponent, this.$props.react, shouldExecute);
|
|
140
|
+
this.watchComponent(this.$props.componentId, this.$props.react, shouldExecute);
|
|
142
141
|
} else {
|
|
143
|
-
this.watchComponent(this.internalRangeComponent, {});
|
|
144
|
-
this.watchComponent(this.$props.componentId, {});
|
|
142
|
+
this.watchComponent(this.internalRangeComponent, {}, shouldExecute);
|
|
143
|
+
this.watchComponent(this.$props.componentId, {}, shouldExecute);
|
|
145
144
|
}
|
|
146
145
|
},
|
|
147
146
|
rangeQuery: function rangeQuery() {
|
|
@@ -399,13 +398,16 @@ var mapDispatchtoProps = {
|
|
|
399
398
|
updateComponentProps: updateComponentProps
|
|
400
399
|
};
|
|
401
400
|
var RangeConnected = PreferencesConsumer(connect(mapStateToProps, mapDispatchtoProps)(DynamicRangeSlider));
|
|
401
|
+
RangeConnected.defaultQuery = DynamicRangeSlider.defaultQuery;
|
|
402
|
+
RangeConnected.parseValue = DynamicRangeSlider.parseValue;
|
|
403
|
+
RangeConnected.hasInternalComponent = DynamicRangeSlider.hasInternalComponent;
|
|
402
404
|
RangeConnected.name = DynamicRangeSlider.name;
|
|
403
|
-
RangeConnected.install = function (Vue) {
|
|
404
|
-
Vue.component(RangeConnected.name, RangeConnected);
|
|
405
|
-
};
|
|
406
405
|
|
|
407
406
|
// Add componentType for SSR
|
|
408
407
|
RangeConnected.componentType = componentTypes.dynamicRangeSlider;
|
|
408
|
+
RangeConnected.install = function (Vue) {
|
|
409
|
+
Vue.component(RangeConnected.name, RangeConnected);
|
|
410
|
+
};
|
|
409
411
|
|
|
410
412
|
export default RangeConnected;
|
|
411
413
|
export { RangeConnected };
|
|
@@ -12,7 +12,7 @@ import { t as types } from './vueTypes-f1923c72.js';
|
|
|
12
12
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
13
13
|
import 'redux';
|
|
14
14
|
import { j as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, n as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-4520a598.js';
|
|
15
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
15
|
+
import { C as ComponentWrapper } from './ComponentWrapper-3a215eed.js';
|
|
16
16
|
import { P as PreferencesConsumer } from './PreferencesConsumer-24e88f3b.js';
|
|
17
17
|
import { T as Title } from './Title-863dfa42.js';
|
|
18
18
|
import { c as Dropdown } from './DropDown-029ffd42.js';
|
|
@@ -95,8 +95,6 @@ var MultiDropdownList = {
|
|
|
95
95
|
// Set custom and default queries in store
|
|
96
96
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
97
97
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
|
|
98
|
-
},
|
|
99
|
-
beforeMount: function beforeMount() {
|
|
100
98
|
this.updateQueryOptions(this.$props);
|
|
101
99
|
if (this.selectedValue) {
|
|
102
100
|
this.setValue(this.selectedValue, true);
|
|
@@ -302,24 +300,24 @@ var MultiDropdownList = {
|
|
|
302
300
|
});
|
|
303
301
|
}
|
|
304
302
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
305
|
-
var
|
|
306
|
-
del =
|
|
307
|
-
obj = _objectWithoutPropertiesLoose(
|
|
303
|
+
var _currentValue2 = currentValue,
|
|
304
|
+
del = _currentValue2[selectAllLabel],
|
|
305
|
+
obj = _objectWithoutPropertiesLoose(_currentValue2, [selectAllLabel].map(_toPropertyKey));
|
|
308
306
|
currentValue = _extends({}, obj);
|
|
309
307
|
}
|
|
310
308
|
} else {
|
|
311
309
|
if (currentValue[value]) {
|
|
312
|
-
var
|
|
313
|
-
_del =
|
|
314
|
-
rest = _objectWithoutPropertiesLoose(
|
|
310
|
+
var _currentValue4 = currentValue,
|
|
311
|
+
_del = _currentValue4[value],
|
|
312
|
+
rest = _objectWithoutPropertiesLoose(_currentValue4, [value].map(_toPropertyKey));
|
|
315
313
|
currentValue = _extends({}, rest);
|
|
316
314
|
} else {
|
|
317
315
|
currentValue[value] = true;
|
|
318
316
|
}
|
|
319
317
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
320
|
-
var
|
|
321
|
-
_del2 =
|
|
322
|
-
_obj = _objectWithoutPropertiesLoose(
|
|
318
|
+
var _currentValue6 = currentValue,
|
|
319
|
+
_del2 = _currentValue6[selectAllLabel],
|
|
320
|
+
_obj = _objectWithoutPropertiesLoose(_currentValue6, [selectAllLabel].map(_toPropertyKey));
|
|
323
321
|
currentValue = _extends({}, _obj);
|
|
324
322
|
}
|
|
325
323
|
finalValues = Object.keys(currentValue);
|
|
@@ -470,12 +468,15 @@ var ListConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps
|
|
|
470
468
|
internalComponent: MultiDropdownList.hasInternalComponent()
|
|
471
469
|
}));
|
|
472
470
|
ListConnected.name = MultiDropdownList.name;
|
|
473
|
-
ListConnected.install = function (Vue) {
|
|
474
|
-
Vue.component(ListConnected.name, ListConnected);
|
|
475
|
-
};
|
|
476
471
|
|
|
477
472
|
// Add componentType for SSR
|
|
478
473
|
ListConnected.componentType = componentTypes.multiDropdownList;
|
|
474
|
+
ListConnected.defaultQuery = MultiDropdownList.defaultQuery;
|
|
475
|
+
ListConnected.generateQueryOptions = MultiDropdownList.generateQueryOptions;
|
|
476
|
+
ListConnected.hasInternalComponent = MultiDropdownList.hasInternalComponent;
|
|
477
|
+
ListConnected.install = function (Vue) {
|
|
478
|
+
Vue.component(ListConnected.name, ListConnected);
|
|
479
|
+
};
|
|
479
480
|
|
|
480
481
|
export default ListConnected;
|
|
481
482
|
export { ListConnected };
|
package/dist/es/MultiList.js
CHANGED
|
@@ -10,7 +10,7 @@ import { t as types } from './vueTypes-f1923c72.js';
|
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
12
|
import { j as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, m as isEvent, n as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-4520a598.js';
|
|
13
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
13
|
+
import { C as ComponentWrapper } from './ComponentWrapper-3a215eed.js';
|
|
14
14
|
import { P as PreferencesConsumer } from './PreferencesConsumer-24e88f3b.js';
|
|
15
15
|
import { T as Title } from './Title-863dfa42.js';
|
|
16
16
|
import { I as Input } from './Input-ad474a55.js';
|
|
@@ -81,8 +81,6 @@ var MultiList = {
|
|
|
81
81
|
// Set custom and default queries in store
|
|
82
82
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
83
83
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
|
|
84
|
-
},
|
|
85
|
-
beforeMount: function beforeMount() {
|
|
86
84
|
this.updateQueryHandlerOptions(this.$props);
|
|
87
85
|
var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
|
|
88
86
|
this.setValue(value, !this.selectedValue);
|
|
@@ -270,16 +268,16 @@ var MultiList = {
|
|
|
270
268
|
});
|
|
271
269
|
}
|
|
272
270
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
273
|
-
var
|
|
274
|
-
del =
|
|
275
|
-
obj = _objectWithoutPropertiesLoose(
|
|
271
|
+
var _currentValue2 = currentValue,
|
|
272
|
+
del = _currentValue2[selectAllLabel],
|
|
273
|
+
obj = _objectWithoutPropertiesLoose(_currentValue2, [selectAllLabel].map(_toPropertyKey));
|
|
276
274
|
currentValue = _extends({}, obj);
|
|
277
275
|
}
|
|
278
276
|
} else {
|
|
279
277
|
if (currentValue[value]) {
|
|
280
|
-
var
|
|
281
|
-
_del =
|
|
282
|
-
rest = _objectWithoutPropertiesLoose(
|
|
278
|
+
var _currentValue4 = currentValue,
|
|
279
|
+
_del = _currentValue4[value],
|
|
280
|
+
rest = _objectWithoutPropertiesLoose(_currentValue4, [value].map(_toPropertyKey));
|
|
283
281
|
currentValue = _extends({}, rest);
|
|
284
282
|
} else if (Array.isArray(value)) {
|
|
285
283
|
value.forEach(function (val) {
|
|
@@ -289,9 +287,9 @@ var MultiList = {
|
|
|
289
287
|
currentValue[value] = true;
|
|
290
288
|
}
|
|
291
289
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
292
|
-
var
|
|
293
|
-
_del2 =
|
|
294
|
-
_obj = _objectWithoutPropertiesLoose(
|
|
290
|
+
var _currentValue6 = currentValue,
|
|
291
|
+
_del2 = _currentValue6[selectAllLabel],
|
|
292
|
+
_obj = _objectWithoutPropertiesLoose(_currentValue6, [selectAllLabel].map(_toPropertyKey));
|
|
295
293
|
currentValue = _extends({}, _obj);
|
|
296
294
|
}
|
|
297
295
|
finalValues = Object.keys(currentValue);
|
|
@@ -465,12 +463,14 @@ var ListConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps
|
|
|
465
463
|
internalComponent: MultiList.hasInternalComponent()
|
|
466
464
|
}));
|
|
467
465
|
ListConnected.name = MultiList.name;
|
|
466
|
+
ListConnected.defaultQuery = MultiList.defaultQuery;
|
|
467
|
+
ListConnected.generateQueryOptions = MultiList.generateQueryOptions;
|
|
468
|
+
ListConnected.hasInternalComponent = MultiList.hasInternalComponent;
|
|
469
|
+
// Add componentType for SSR
|
|
470
|
+
ListConnected.componentType = componentTypes.multiList;
|
|
468
471
|
ListConnected.install = function (Vue) {
|
|
469
472
|
Vue.component(ListConnected.name, ListConnected);
|
|
470
473
|
};
|
|
471
474
|
|
|
472
|
-
// Add componentType for SSR
|
|
473
|
-
ListConnected.componentType = componentTypes.multiList;
|
|
474
|
-
|
|
475
475
|
export default ListConnected;
|
|
476
476
|
export { ListConnected };
|
package/dist/es/MultiRange.js
CHANGED
|
@@ -10,7 +10,7 @@ import { t as types } from './vueTypes-f1923c72.js';
|
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
12
|
import { n as parseValueArray, j as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4520a598.js';
|
|
13
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
13
|
+
import { C as ComponentWrapper } from './ComponentWrapper-3a215eed.js';
|
|
14
14
|
import { P as PreferencesConsumer } from './PreferencesConsumer-24e88f3b.js';
|
|
15
15
|
import { T as Title } from './Title-863dfa42.js';
|
|
16
16
|
import { C as Container } from './Container-d00219f7.js';
|
|
@@ -98,9 +98,9 @@ var MultiRange = {
|
|
|
98
98
|
currentValue = currentValue.filter(function (value) {
|
|
99
99
|
return value.label !== item;
|
|
100
100
|
});
|
|
101
|
-
var
|
|
102
|
-
del =
|
|
103
|
-
selected = _objectWithoutPropertiesLoose(
|
|
101
|
+
var _selectedValues2 = selectedValues,
|
|
102
|
+
del = _selectedValues2[item],
|
|
103
|
+
selected = _objectWithoutPropertiesLoose(_selectedValues2, [item].map(_toPropertyKey));
|
|
104
104
|
selectedValues = selected;
|
|
105
105
|
} else {
|
|
106
106
|
var _extends2;
|
|
@@ -172,8 +172,6 @@ var MultiRange = {
|
|
|
172
172
|
created: function created() {
|
|
173
173
|
// Set custom query in store
|
|
174
174
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
175
|
-
},
|
|
176
|
-
beforeMount: function beforeMount() {
|
|
177
175
|
if (this.selectedValue) {
|
|
178
176
|
this.selectItem(this.selectedValue, true);
|
|
179
177
|
} else if (this.$props.value) {
|
|
@@ -255,6 +253,9 @@ var RangeConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProp
|
|
|
255
253
|
componentType: componentTypes.multiRange
|
|
256
254
|
}));
|
|
257
255
|
RangeConnected.name = MultiRange.name;
|
|
256
|
+
RangeConnected.defaultQuery = MultiRange.defaultQuery;
|
|
257
|
+
RangeConnected.parseValue = MultiRange.parseValue;
|
|
258
|
+
RangeConnected.hasInternalComponent = MultiRange.hasInternalComponent;
|
|
258
259
|
RangeConnected.install = function (Vue) {
|
|
259
260
|
Vue.component(RangeConnected.name, RangeConnected);
|
|
260
261
|
};
|
package/dist/es/RangeInput.js
CHANGED
|
@@ -11,7 +11,7 @@ import { t as types } from './vueTypes-f1923c72.js';
|
|
|
11
11
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
12
12
|
import 'redux';
|
|
13
13
|
import { c as connect } from './index-4520a598.js';
|
|
14
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
14
|
+
import { C as ComponentWrapper } from './ComponentWrapper-3a215eed.js';
|
|
15
15
|
import { P as PreferencesConsumer } from './PreferencesConsumer-24e88f3b.js';
|
|
16
16
|
import './Title-863dfa42.js';
|
|
17
17
|
import { F as Flex } from './Flex-a08e22d7.js';
|
package/dist/es/RangeSlider.js
CHANGED
|
@@ -8,7 +8,7 @@ import { t as types } from './vueTypes-f1923c72.js';
|
|
|
8
8
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
9
9
|
import 'redux';
|
|
10
10
|
import { j as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4520a598.js';
|
|
11
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
11
|
+
import { C as ComponentWrapper } from './ComponentWrapper-3a215eed.js';
|
|
12
12
|
import { P as PreferencesConsumer } from './PreferencesConsumer-24e88f3b.js';
|
|
13
13
|
import { T as Title } from './Title-863dfa42.js';
|
|
14
14
|
import { C as Container } from './Container-d00219f7.js';
|
|
@@ -157,8 +157,6 @@ var RangeSlider = {
|
|
|
157
157
|
|
|
158
158
|
// Set custom query in store
|
|
159
159
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
160
|
-
},
|
|
161
|
-
beforeMount: function beforeMount() {
|
|
162
160
|
var _this$$props = this.$props,
|
|
163
161
|
value = _this$$props.value,
|
|
164
162
|
defaultValue = _this$$props.defaultValue;
|
|
@@ -254,6 +252,9 @@ var RangeConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProp
|
|
|
254
252
|
componentType: componentTypes.rangeSlider
|
|
255
253
|
}));
|
|
256
254
|
RangeConnected.name = RangeSlider.name;
|
|
255
|
+
RangeConnected.defaultQuery = RangeSlider.defaultQuery;
|
|
256
|
+
RangeConnected.parseValue = RangeSlider.parseValue;
|
|
257
|
+
RangeConnected.hasInternalComponent = RangeSlider.hasInternalComponent;
|
|
257
258
|
RangeConnected.install = function (Vue) {
|
|
258
259
|
Vue.component(RangeConnected.name, RangeConnected);
|
|
259
260
|
};
|
package/dist/es/ReactiveBase.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
3
|
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
4
|
import { h, createVNode, isVNode } from 'vue';
|
|
@@ -8,6 +8,7 @@ import { styled, createCache } from '@appbaseio/vue-emotion';
|
|
|
8
8
|
import { t as types } from './vueTypes-f1923c72.js';
|
|
9
9
|
import 'redux';
|
|
10
10
|
import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-4520a598.js';
|
|
11
|
+
import configureStore, { Actions as Actions$1 } from '@appbaseio/reactivecore/lib';
|
|
11
12
|
import { updateAnalyticsConfig } from '@appbaseio/reactivecore/lib/actions/analytics';
|
|
12
13
|
import Appbase from 'appbase-js';
|
|
13
14
|
import AppbaseAnalytics from '@appbaseio/analytics';
|
|
@@ -108,12 +109,12 @@ var URLParamsProvider = {
|
|
|
108
109
|
try {
|
|
109
110
|
var component = item[0],
|
|
110
111
|
value = item[1];
|
|
111
|
-
var
|
|
112
|
+
var _ref2 = _this.selectedValues[component] || {
|
|
112
113
|
label: component
|
|
113
114
|
},
|
|
114
|
-
label =
|
|
115
|
-
showFilter =
|
|
116
|
-
URLParams =
|
|
115
|
+
label = _ref2.label,
|
|
116
|
+
showFilter = _ref2.showFilter,
|
|
117
|
+
URLParams = _ref2.URLParams;
|
|
117
118
|
_this.setValue(component, JSON.parse(value), label, showFilter, URLParams, undefined, undefined, undefined, 'URL');
|
|
118
119
|
} catch (e) {
|
|
119
120
|
// Do not set value if JSON parsing fails.
|
|
@@ -330,6 +331,7 @@ function getTheme(preset) {
|
|
|
330
331
|
function _isSlot$2(s) {
|
|
331
332
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
332
333
|
}
|
|
334
|
+
var setValues = Actions$1.setValues;
|
|
333
335
|
var ReactiveBase = {
|
|
334
336
|
name: 'ReactiveBase',
|
|
335
337
|
data: function data() {
|
|
@@ -356,6 +358,7 @@ var ReactiveBase = {
|
|
|
356
358
|
initialQueriesSyncTime: types.number,
|
|
357
359
|
className: types.string,
|
|
358
360
|
initialState: VueTypes.object.def({}),
|
|
361
|
+
contextCollector: VueTypes.func,
|
|
359
362
|
transformRequest: types.func,
|
|
360
363
|
transformResponse: types.func,
|
|
361
364
|
as: VueTypes.string.def('div'),
|
|
@@ -366,11 +369,15 @@ var ReactiveBase = {
|
|
|
366
369
|
preferences: VueTypes.object
|
|
367
370
|
},
|
|
368
371
|
provide: function provide() {
|
|
372
|
+
var createCacheFn = createCache;
|
|
373
|
+
if (createCache["default"]) {
|
|
374
|
+
createCacheFn = createCache["default"];
|
|
375
|
+
}
|
|
369
376
|
return {
|
|
370
377
|
theme_reactivesearch: composeThemeObject(getTheme(this.$props.themePreset), this.$props.theme),
|
|
371
378
|
store: this.store,
|
|
372
379
|
$searchPreferences: this.preferences,
|
|
373
|
-
$emotionCache: this.$parent && this.$parent.$emotionCache ||
|
|
380
|
+
$emotionCache: this.$parent && this.$parent.$emotionCache || createCacheFn({
|
|
374
381
|
key: 'css'
|
|
375
382
|
})
|
|
376
383
|
};
|
|
@@ -524,8 +531,20 @@ var ReactiveBase = {
|
|
|
524
531
|
selectedValues: selectedValues,
|
|
525
532
|
urlValues: urlValues,
|
|
526
533
|
headers: this.getHeaders
|
|
527
|
-
}, this
|
|
528
|
-
|
|
534
|
+
}, this.initialState);
|
|
535
|
+
var storeFn = configureStore;
|
|
536
|
+
if (configureStore["default"]) {
|
|
537
|
+
storeFn = configureStore["default"];
|
|
538
|
+
}
|
|
539
|
+
this.store = storeFn(initialState);
|
|
540
|
+
// server side rendered app to collect context
|
|
541
|
+
if (typeof window === 'undefined' && props.contextCollector) {
|
|
542
|
+
var res = props.contextCollector({
|
|
543
|
+
ctx: this.store
|
|
544
|
+
});
|
|
545
|
+
// necessary for supporting SSR of queryParams
|
|
546
|
+
this.store.dispatch(setValues(res.selectedValues));
|
|
547
|
+
}
|
|
529
548
|
this.analyticsRef = analyticsRef;
|
|
530
549
|
}
|
|
531
550
|
},
|
|
@@ -11,7 +11,7 @@ import { B as Button } from './Button-474510e3.js';
|
|
|
11
11
|
import { t as types } from './vueTypes-f1923c72.js';
|
|
12
12
|
import { RLConnected } from './ReactiveList.js';
|
|
13
13
|
import { g as getComponent, h as hasCustomRenderer, f as decodeHtml, i as isQueryIdentical, u as updateDefaultQuery, j as updateCustomQuery, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, c as connect } from './index-4520a598.js';
|
|
14
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
14
|
+
import { C as ComponentWrapper } from './ComponentWrapper-3a215eed.js';
|
|
15
15
|
import { P as PreferencesConsumer } from './PreferencesConsumer-24e88f3b.js';
|
|
16
16
|
import { T as Title } from './Title-863dfa42.js';
|
|
17
17
|
import { F as Flex } from './Flex-a08e22d7.js';
|
|
@@ -512,14 +512,14 @@ var Mic = {
|
|
|
512
512
|
if (status === STATUS.active) {
|
|
513
513
|
this.status = STATUS.inactive;
|
|
514
514
|
}
|
|
515
|
-
var _this$$
|
|
516
|
-
handleResult = _this$$
|
|
517
|
-
onNoMatch = _this$$
|
|
518
|
-
onError = _this$$
|
|
519
|
-
lang = _this$$
|
|
520
|
-
getInstance = _this$$
|
|
521
|
-
var
|
|
522
|
-
SpeechRecognition =
|
|
515
|
+
var _this$$props2 = this.$props,
|
|
516
|
+
handleResult = _this$$props2.handleResult,
|
|
517
|
+
onNoMatch = _this$$props2.onNoMatch,
|
|
518
|
+
onError = _this$$props2.onError,
|
|
519
|
+
lang = _this$$props2.lang,
|
|
520
|
+
getInstance = _this$$props2.getInstance;
|
|
521
|
+
var _window2 = window,
|
|
522
|
+
SpeechRecognition = _window2.SpeechRecognition;
|
|
523
523
|
if (this.instance && this.status !== STATUS.denied) {
|
|
524
524
|
this.status = STATUS.inactive;
|
|
525
525
|
this.instance.stop();
|
|
@@ -790,6 +790,13 @@ var SearchBox = defineComponent({
|
|
|
790
790
|
// Set custom and default queries in store
|
|
791
791
|
this.triggerCustomQuery(this.currentValue, this.selectedCategory);
|
|
792
792
|
this.triggerDefaultQuery(this.currentValue);
|
|
793
|
+
if (this.selectedValue) {
|
|
794
|
+
this.setValue(this.selectedValue, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined);
|
|
795
|
+
} else if (this.$props.value) {
|
|
796
|
+
this.setValue(this.$props.value, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined);
|
|
797
|
+
} else if (this.$props.defaultValue) {
|
|
798
|
+
this.setValue(this.$props.defaultValue, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined);
|
|
799
|
+
}
|
|
793
800
|
},
|
|
794
801
|
computed: {
|
|
795
802
|
hasCustomRenderer: function hasCustomRenderer$1() {
|
|
@@ -880,15 +887,6 @@ var SearchBox = defineComponent({
|
|
|
880
887
|
searchboxId: VueTypes.string,
|
|
881
888
|
endpoint: types.endpointConfig
|
|
882
889
|
},
|
|
883
|
-
beforeMount: function beforeMount() {
|
|
884
|
-
if (this.selectedValue) {
|
|
885
|
-
this.setValue(this.selectedValue, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined);
|
|
886
|
-
} else if (this.$props.value) {
|
|
887
|
-
this.setValue(this.$props.value, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined);
|
|
888
|
-
} else if (this.$props.defaultValue) {
|
|
889
|
-
this.setValue(this.$props.defaultValue, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined);
|
|
890
|
-
}
|
|
891
|
-
},
|
|
892
890
|
mounted: function mounted() {
|
|
893
891
|
this.listenForFocusShortcuts();
|
|
894
892
|
},
|
|
@@ -1366,12 +1364,12 @@ var SearchBox = defineComponent({
|
|
|
1366
1364
|
renderInputAddonBefore: function renderInputAddonBefore() {
|
|
1367
1365
|
var addonBefore = this.$slots.addonBefore;
|
|
1368
1366
|
if (addonBefore) {
|
|
1369
|
-
var
|
|
1367
|
+
var _slot2;
|
|
1370
1368
|
return createVNode(InputAddon, {
|
|
1371
1369
|
"class": "addon-before"
|
|
1372
|
-
}, _isSlot(
|
|
1370
|
+
}, _isSlot(_slot2 = addonBefore()) ? _slot2 : {
|
|
1373
1371
|
"default": function _default() {
|
|
1374
|
-
return [
|
|
1372
|
+
return [_slot2];
|
|
1375
1373
|
}
|
|
1376
1374
|
});
|
|
1377
1375
|
}
|
|
@@ -1380,12 +1378,12 @@ var SearchBox = defineComponent({
|
|
|
1380
1378
|
renderInputAddonAfter: function renderInputAddonAfter() {
|
|
1381
1379
|
var addonAfter = this.$slots.addonAfter;
|
|
1382
1380
|
if (addonAfter) {
|
|
1383
|
-
var
|
|
1381
|
+
var _slot4;
|
|
1384
1382
|
return createVNode(InputAddon, {
|
|
1385
1383
|
"class": "addon-after"
|
|
1386
|
-
}, _isSlot(
|
|
1384
|
+
}, _isSlot(_slot4 = addonAfter()) ? _slot4 : {
|
|
1387
1385
|
"default": function _default() {
|
|
1388
|
-
return [
|
|
1386
|
+
return [_slot4];
|
|
1389
1387
|
}
|
|
1390
1388
|
});
|
|
1391
1389
|
}
|
|
@@ -1427,7 +1425,7 @@ var SearchBox = defineComponent({
|
|
|
1427
1425
|
},
|
|
1428
1426
|
renderIcons: function renderIcons() {
|
|
1429
1427
|
var _this6 = this;
|
|
1430
|
-
var
|
|
1428
|
+
var _slot5, _slot6, _slot7;
|
|
1431
1429
|
var _this$$props3 = this.$props,
|
|
1432
1430
|
iconPosition = _this$$props3.iconPosition,
|
|
1433
1431
|
showClear = _this$$props3.showClear,
|
|
@@ -1446,9 +1444,9 @@ var SearchBox = defineComponent({
|
|
|
1446
1444
|
"onClick": _this6.clearValue,
|
|
1447
1445
|
"showIcon": showIcon,
|
|
1448
1446
|
"isClearIcon": true
|
|
1449
|
-
}, _isSlot(
|
|
1447
|
+
}, _isSlot(_slot5 = _this6.renderCancelIcon()) ? _slot5 : {
|
|
1450
1448
|
"default": function _default() {
|
|
1451
|
-
return [
|
|
1449
|
+
return [_slot5];
|
|
1452
1450
|
}
|
|
1453
1451
|
}), showVoiceSearch && createVNode(Mic, {
|
|
1454
1452
|
"getInstance": getMicInstance,
|
|
@@ -1457,9 +1455,9 @@ var SearchBox = defineComponent({
|
|
|
1457
1455
|
"className": getClassName$1(innerClass, 'mic') || null
|
|
1458
1456
|
}, null), iconPosition === 'right' && showIcon && createVNode(IconWrapper, {
|
|
1459
1457
|
"onClick": _this6.handleSearchIconClick
|
|
1460
|
-
}, _isSlot(
|
|
1458
|
+
}, _isSlot(_slot6 = _this6.renderIcon()) ? _slot6 : {
|
|
1461
1459
|
"default": function _default() {
|
|
1462
|
-
return [
|
|
1460
|
+
return [_slot6];
|
|
1463
1461
|
}
|
|
1464
1462
|
})];
|
|
1465
1463
|
}
|
|
@@ -1470,9 +1468,9 @@ var SearchBox = defineComponent({
|
|
|
1470
1468
|
"default": function _default() {
|
|
1471
1469
|
return [iconPosition === 'left' && showIcon && createVNode(IconWrapper, {
|
|
1472
1470
|
"onClick": _this6.handleSearchIconClick
|
|
1473
|
-
}, _isSlot(
|
|
1471
|
+
}, _isSlot(_slot7 = _this6.renderIcon()) ? _slot7 : {
|
|
1474
1472
|
"default": function _default() {
|
|
1475
|
-
return [
|
|
1473
|
+
return [_slot7];
|
|
1476
1474
|
}
|
|
1477
1475
|
})];
|
|
1478
1476
|
}
|
|
@@ -1782,6 +1780,9 @@ var SearchBox = defineComponent({
|
|
|
1782
1780
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
1783
1781
|
}
|
|
1784
1782
|
});
|
|
1783
|
+
SearchBox.hasInternalComponent = function () {
|
|
1784
|
+
return true;
|
|
1785
|
+
};
|
|
1785
1786
|
SearchBox.defaultQuery = function (value, props) {
|
|
1786
1787
|
var finalQuery = null;
|
|
1787
1788
|
finalQuery = {
|
|
@@ -1840,6 +1841,9 @@ var SBConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps,
|
|
|
1840
1841
|
internalComponent: true
|
|
1841
1842
|
}));
|
|
1842
1843
|
SBConnected.name = SearchBox.name;
|
|
1844
|
+
SBConnected.defaultQuery = SearchBox.defaultQuery;
|
|
1845
|
+
SBConnected.shouldQuery = SearchBox.shouldQuery;
|
|
1846
|
+
SBConnected.hasInternalComponent = SearchBox.hasInternalComponent;
|
|
1843
1847
|
SBConnected.install = function (Vue) {
|
|
1844
1848
|
Vue.component(SBConnected.name, SBConnected);
|
|
1845
1849
|
};
|
|
@@ -2168,11 +2172,11 @@ var RcConnected = PreferencesConsumer({
|
|
|
2168
2172
|
}
|
|
2169
2173
|
});
|
|
2170
2174
|
RcConnected.name = ReactiveComponent.name;
|
|
2175
|
+
RcConnected.hasInternalComponent = ReactiveComponent.hasInternalComponent;
|
|
2176
|
+
// Add componentType for SSR
|
|
2177
|
+
RcConnected.componentType = componentTypes.reactiveComponent;
|
|
2171
2178
|
RcConnected.install = function (Vue) {
|
|
2172
2179
|
Vue.component(RcConnected.name, RcConnected);
|
|
2173
2180
|
};
|
|
2174
2181
|
|
|
2175
|
-
// Add componentType for SSR
|
|
2176
|
-
RcConnected.componentType = componentTypes.reactiveComponent;
|
|
2177
|
-
|
|
2178
2182
|
export { RcConnected as R, SBConnected as S };
|
|
@@ -15,14 +15,14 @@ import './ReactiveList.js';
|
|
|
15
15
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
16
16
|
import 'redux';
|
|
17
17
|
import './index-4520a598.js';
|
|
18
|
-
import './ComponentWrapper-
|
|
18
|
+
import './ComponentWrapper-3a215eed.js';
|
|
19
19
|
import './PreferencesConsumer-24e88f3b.js';
|
|
20
20
|
import './Title-863dfa42.js';
|
|
21
21
|
import './ListItem-16756c02.js';
|
|
22
22
|
import './Card-38cbe652.js';
|
|
23
23
|
import './Flex-a08e22d7.js';
|
|
24
24
|
import 'hotkeys-js';
|
|
25
|
-
export { R as default } from './ReactiveComponent-
|
|
25
|
+
export { R as default } from './ReactiveComponent-04d94e01.js';
|
|
26
26
|
import './DropDown-029ffd42.js';
|
|
27
27
|
import './Input-ad474a55.js';
|
|
28
28
|
import 'compute-scroll-into-view';
|
|
@@ -13,7 +13,7 @@ import { P as Pagination } from './Pagination-72bd1d9e.js';
|
|
|
13
13
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
14
14
|
import 'redux';
|
|
15
15
|
import { h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, a as isFunction, c as connect } from './index-4520a598.js';
|
|
16
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
16
|
+
import { C as ComponentWrapper } from './ComponentWrapper-3a215eed.js';
|
|
17
17
|
import { P as PreferencesConsumer } from './PreferencesConsumer-24e88f3b.js';
|
|
18
18
|
import { C as Checkbox } from './FormControlList-fe6eaee4.js';
|
|
19
19
|
import VueGoogleMaps, { InfoWindow, MapElementMixin, Marker, GMapCluster, Map } from 'vue-google-maps-community-fork';
|
|
@@ -179,9 +179,9 @@ var ReactiveMap = {
|
|
|
179
179
|
var options = getQueryOptions(this.$props);
|
|
180
180
|
options.from = 0;
|
|
181
181
|
this.$defaultQuery = newVal(null, this.$props);
|
|
182
|
-
var
|
|
183
|
-
sort =
|
|
184
|
-
query =
|
|
182
|
+
var _ref2 = this.$defaultQuery || {},
|
|
183
|
+
sort = _ref2.sort,
|
|
184
|
+
query = _ref2.query;
|
|
185
185
|
if (sort) {
|
|
186
186
|
options.sort = this.$defaultQuery.sort;
|
|
187
187
|
}
|
|
@@ -564,8 +564,8 @@ var ReactiveMap = {
|
|
|
564
564
|
geo_bounding_box: (_geo_bounding_box = {}, _geo_bounding_box[this.dataField] = boundingBoxCoordinates, _geo_bounding_box)
|
|
565
565
|
};
|
|
566
566
|
if (this.$defaultQuery) {
|
|
567
|
-
var
|
|
568
|
-
query =
|
|
567
|
+
var _ref4 = this.$defaultQuery || {},
|
|
568
|
+
query = _ref4.query;
|
|
569
569
|
if (query) {
|
|
570
570
|
// adds defaultQuery's query to geo-query
|
|
571
571
|
// to generate a map query
|
|
@@ -608,8 +608,8 @@ var ReactiveMap = {
|
|
|
608
608
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
609
609
|
var docId = documentId;
|
|
610
610
|
if (!docId) {
|
|
611
|
-
var _this$
|
|
612
|
-
data = _this$
|
|
611
|
+
var _this$getData3 = this.getData(),
|
|
612
|
+
data = _this$getData3.data;
|
|
613
613
|
var hitData = data.find(function (hit) {
|
|
614
614
|
return hit._click_id === searchPosition;
|
|
615
615
|
});
|
|
@@ -700,10 +700,10 @@ var ReactiveMap = {
|
|
|
700
700
|
var options = getQueryOptions(this.$props);
|
|
701
701
|
options.from = this.$data.from;
|
|
702
702
|
if (this.$props.sortBy) {
|
|
703
|
-
var
|
|
704
|
-
options.sort = [(
|
|
703
|
+
var _ref5;
|
|
704
|
+
options.sort = [(_ref5 = {}, _ref5[this.$props.dataField] = {
|
|
705
705
|
order: this.$props.sortBy
|
|
706
|
-
},
|
|
706
|
+
}, _ref5)];
|
|
707
707
|
}
|
|
708
708
|
this.$defaultQuery = null;
|
|
709
709
|
if (this.$props.defaultQuery) {
|