@appbaseio/reactivesearch-vue 2.0.0-alpha.4 → 3.0.0-alpha.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.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +17538 -25422
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +6 -15
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-ad042719.js +59 -0
- package/dist/cjs/Card-f5ab024a.js +27 -0
- package/dist/cjs/{ComponentWrapper-ad3dad02.js → ComponentWrapper-75f88599.js} +42 -56
- package/dist/cjs/Container-29f049b2.js +12 -0
- package/dist/cjs/DropDown-6cf84c47.js +698 -0
- package/dist/cjs/DynamicRangeSlider.js +103 -155
- package/dist/cjs/Flex-d5675ea6.js +48 -0
- package/dist/cjs/FormControlList-fadd792f.js +42 -0
- package/dist/cjs/Input-4b434436.js +74 -0
- package/dist/cjs/ListItem-d57d648d.js +42 -0
- package/dist/cjs/MultiDropdownList.js +124 -240
- package/dist/cjs/MultiList.js +123 -261
- package/dist/cjs/MultiRange.js +87 -133
- package/dist/cjs/{Pagination-71e85fa9.js → Pagination-b5ddc906.js} +70 -83
- package/dist/cjs/PreferencesConsumer-eb265924.js +75 -0
- package/dist/cjs/RangeInput.js +163 -171
- package/dist/cjs/RangeSlider.js +81 -109
- package/dist/cjs/ReactiveBase.js +139 -157
- package/dist/cjs/ReactiveComponent-eb8db4c1.js +2189 -0
- package/dist/cjs/ReactiveComponent.js +46 -340
- package/dist/cjs/ReactiveGoogleMap.js +445 -655
- package/dist/cjs/ReactiveList.js +179 -304
- package/dist/cjs/ResultCard.js +36 -36
- package/dist/cjs/ResultList.js +48 -56
- package/dist/cjs/SelectedFilters.js +62 -69
- package/dist/cjs/SingleDropdownList.js +117 -177
- package/dist/cjs/SingleList.js +121 -205
- package/dist/cjs/SingleRange.js +78 -105
- package/dist/cjs/StateProvider.js +35 -38
- package/dist/cjs/Title-8802a218.js +12 -0
- package/dist/cjs/ToggleButton.js +72 -119
- package/dist/cjs/{_rollupPluginBabelHelpers-c705cbe6.js → _rollupPluginBabelHelpers-f8b843f8.js} +0 -15
- package/dist/cjs/{index-6a167fe0.js → index-d8d8f291.js} +38 -108
- package/dist/cjs/index.js +44 -41
- package/dist/cjs/initReactivesearch.js +63 -150
- package/dist/cjs/install.js +47 -43
- package/dist/cjs/ssr-6907ada3.js +66 -0
- 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-1bf00978.js} +8 -19
- package/dist/es/Button-474510e3.js +53 -0
- package/dist/es/{Card-450683f1.js → Card-38cbe652.js} +3 -3
- package/dist/es/{ComponentWrapper-424e86fd.js → ComponentWrapper-5166c76a.js} +42 -56
- package/dist/es/{Container-ba826e96.js → Container-d00219f7.js} +2 -2
- package/dist/es/DropDown-8764360c.js +688 -0
- package/dist/es/DynamicRangeSlider.js +103 -155
- package/dist/es/Flex-a08e22d7.js +46 -0
- package/dist/es/FormControlList-fe6eaee4.js +38 -0
- package/dist/es/Input-4a8ef1f3.js +69 -0
- package/dist/es/{ListItem-cad14c5e.js → ListItem-16756c02.js} +7 -8
- package/dist/es/MultiDropdownList.js +124 -240
- package/dist/es/MultiList.js +123 -261
- package/dist/es/MultiRange.js +87 -133
- package/dist/es/{Pagination-784bf143.js → Pagination-72bd1d9e.js} +70 -83
- package/dist/es/PreferencesConsumer-c276709c.js +73 -0
- package/dist/es/RangeInput.js +163 -170
- package/dist/es/RangeSlider.js +81 -109
- package/dist/es/ReactiveBase.js +138 -155
- package/dist/es/ReactiveComponent-f9fa5780.js +2183 -0
- package/dist/es/ReactiveComponent.js +42 -337
- package/dist/es/ReactiveGoogleMap.js +440 -649
- package/dist/es/ReactiveList.js +177 -301
- package/dist/es/ResultCard.js +36 -36
- package/dist/es/ResultList.js +48 -56
- package/dist/es/SelectedFilters.js +62 -69
- package/dist/es/SingleDropdownList.js +117 -177
- package/dist/es/SingleList.js +121 -205
- package/dist/es/SingleRange.js +78 -105
- package/dist/es/StateProvider.js +36 -39
- package/dist/es/{Title-3342664a.js → Title-863dfa42.js} +2 -2
- package/dist/es/ToggleButton.js +72 -119
- package/dist/es/{_rollupPluginBabelHelpers-76660dab.js → _rollupPluginBabelHelpers-ded08042.js} +0 -15
- package/dist/es/{index-7788a843.js → index-4520a598.js} +39 -107
- package/dist/es/index.js +30 -32
- package/dist/es/initReactivesearch.js +63 -150
- package/dist/es/install.js +49 -41
- package/dist/es/{ssr-b2c0b401.js → ssr-af398f0c.js} +36 -7
- 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-f1923c72.js} +8 -19
- package/package.json +10 -9
- package/dist/cjs/Button-446f819e.js +0 -68
- package/dist/cjs/CancelSvg-9f258f4f.js +0 -449
- package/dist/cjs/Card-642547a8.js +0 -30
- package/dist/cjs/Container-daf30918.js +0 -15
- package/dist/cjs/DataSearch-aa04dc6e.js +0 -2352
- package/dist/cjs/DataSearch.js +0 -30
- package/dist/cjs/DropDown-c479bbb0.js +0 -328
- package/dist/cjs/Flex-aa517a13.js +0 -52
- package/dist/cjs/FormControlList-c195a592.js +0 -47
- package/dist/cjs/Input-e6603a7e.js +0 -79
- package/dist/cjs/ListItem-8c9e0d68.js +0 -46
- package/dist/cjs/Title-1de7d0f4.js +0 -15
- package/dist/cjs/install-b97dbac4.js +0 -1409
- package/dist/cjs/ssr-3027b848.js +0 -39
- package/dist/es/Button-d8bc15ea.js +0 -59
- package/dist/es/CancelSvg-4cfae5fd.js +0 -440
- package/dist/es/DataSearch-b86a6675.js +0 -2337
- package/dist/es/DataSearch.js +0 -22
- package/dist/es/DropDown-05a644a5.js +0 -322
- package/dist/es/Flex-1f0795c3.js +0 -47
- package/dist/es/FormControlList-c22d64f6.js +0 -40
- package/dist/es/Input-7a2a9fac.js +0 -71
- package/dist/es/install-ac8a1edb.js +0 -1402
package/dist/es/RangeSlider.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
|
-
import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
|
|
3
|
-
import VueTypes from 'vue-types';
|
|
4
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
+
import './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
+
import { createVNode, resolveComponent, mergeProps } from 'vue';
|
|
5
|
+
import VueTypes from 'vue-types';
|
|
5
6
|
import '@appbaseio/vue-emotion';
|
|
6
|
-
import { t as types } from './vueTypes-
|
|
7
|
+
import { t as types } from './vueTypes-f1923c72.js';
|
|
7
8
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
8
9
|
import 'redux';
|
|
9
|
-
import {
|
|
10
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import { g as getComponents, S as Slider } from './ssr-
|
|
10
|
+
import { j as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4520a598.js';
|
|
11
|
+
import { C as ComponentWrapper } from './ComponentWrapper-5166c76a.js';
|
|
12
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-c276709c.js';
|
|
13
|
+
import { T as Title } from './Title-863dfa42.js';
|
|
14
|
+
import { C as Container } from './Container-d00219f7.js';
|
|
15
|
+
import { g as getComponents, N as NoSSR, S as Slider } from './ssr-af398f0c.js';
|
|
15
16
|
|
|
16
17
|
var updateQuery = Actions.updateQuery,
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
setQueryOptions = Actions.setQueryOptions,
|
|
19
|
+
setCustomQuery = Actions.setCustomQuery;
|
|
19
20
|
var checkValueChange = helper.checkValueChange,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
getClassName = helper.getClassName,
|
|
22
|
+
getOptionsFromQuery = helper.getOptionsFromQuery,
|
|
23
|
+
isEqual = helper.isEqual;
|
|
23
24
|
var RangeSlider = {
|
|
24
25
|
name: 'RangeSlider',
|
|
25
26
|
components: getComponents(),
|
|
@@ -64,7 +65,6 @@ var RangeSlider = {
|
|
|
64
65
|
methods: {
|
|
65
66
|
handleSliderChange: function handleSliderChange(values) {
|
|
66
67
|
var value = this.$props.value;
|
|
67
|
-
|
|
68
68
|
if (value === undefined) {
|
|
69
69
|
this.handleChange(values);
|
|
70
70
|
} else {
|
|
@@ -80,27 +80,21 @@ var RangeSlider = {
|
|
|
80
80
|
},
|
|
81
81
|
handleChange: function handleChange(currentValue, props) {
|
|
82
82
|
var _this = this;
|
|
83
|
-
|
|
84
83
|
if (props === void 0) {
|
|
85
84
|
props = this.$props;
|
|
86
85
|
}
|
|
87
|
-
|
|
88
86
|
var performUpdate = function performUpdate() {
|
|
89
87
|
_this.currentValue = currentValue;
|
|
90
|
-
|
|
91
88
|
_this.updateQueryHandler([currentValue[0], currentValue[1]], props);
|
|
92
|
-
|
|
93
89
|
_this.$emit('valueChange', {
|
|
94
90
|
start: currentValue[0],
|
|
95
91
|
end: currentValue[1]
|
|
96
92
|
});
|
|
97
|
-
|
|
98
93
|
_this.$emit('value-change', {
|
|
99
94
|
start: currentValue[0],
|
|
100
95
|
end: currentValue[1]
|
|
101
96
|
});
|
|
102
97
|
};
|
|
103
|
-
|
|
104
98
|
checkValueChange(props.componentId, {
|
|
105
99
|
start: currentValue[0],
|
|
106
100
|
end: currentValue[1]
|
|
@@ -109,23 +103,20 @@ var RangeSlider = {
|
|
|
109
103
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
110
104
|
var customQuery = props.customQuery;
|
|
111
105
|
var query = RangeSlider.defaultQuery(value, props);
|
|
112
|
-
|
|
113
106
|
if (customQuery) {
|
|
114
107
|
var _ref = customQuery(value, props) || {};
|
|
115
|
-
|
|
116
108
|
query = _ref.query;
|
|
117
109
|
var customQueryOptions = getOptionsFromQuery(customQuery(value, props));
|
|
118
110
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
119
111
|
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
120
112
|
}
|
|
121
|
-
|
|
122
113
|
var showFilter = props.showFilter,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
114
|
+
_props$range = props.range,
|
|
115
|
+
start = _props$range.start,
|
|
116
|
+
end = _props$range.end;
|
|
126
117
|
var currentStart = value[0],
|
|
127
|
-
|
|
128
|
-
|
|
118
|
+
currentEnd = value[1];
|
|
119
|
+
// check if the slider is at its initial position
|
|
129
120
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
130
121
|
this.updateQuery({
|
|
131
122
|
componentId: props.componentId,
|
|
@@ -164,19 +155,14 @@ var RangeSlider = {
|
|
|
164
155
|
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;');
|
|
165
156
|
}
|
|
166
157
|
|
|
167
|
-
|
|
168
|
-
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
169
|
-
} // Set custom query in store
|
|
170
|
-
|
|
171
|
-
|
|
158
|
+
// Set custom query in store
|
|
172
159
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
173
160
|
},
|
|
174
161
|
beforeMount: function beforeMount() {
|
|
175
162
|
var _this$$props = this.$props,
|
|
176
|
-
|
|
177
|
-
|
|
163
|
+
value = _this$$props.value,
|
|
164
|
+
defaultValue = _this$$props.defaultValue;
|
|
178
165
|
var selectedValue = this.selectedValue;
|
|
179
|
-
|
|
180
166
|
if (this.$props.range) {
|
|
181
167
|
if (Array.isArray(selectedValue)) {
|
|
182
168
|
this.handleChange(selectedValue);
|
|
@@ -190,104 +176,90 @@ var RangeSlider = {
|
|
|
190
176
|
}
|
|
191
177
|
},
|
|
192
178
|
render: function render() {
|
|
193
|
-
var
|
|
194
|
-
return
|
|
179
|
+
var _this2 = this;
|
|
180
|
+
return createVNode(Container, {
|
|
195
181
|
"class": this.$props.className
|
|
196
|
-
},
|
|
197
|
-
"
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
query = {
|
|
232
|
-
range: (_range = {}, _range[props.dataField] = {
|
|
233
|
-
gte: values[0],
|
|
234
|
-
lte: values[1],
|
|
235
|
-
boost: 2.0
|
|
236
|
-
}, _range)
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
if (query && props.nestedField) {
|
|
241
|
-
return {
|
|
242
|
-
query: {
|
|
243
|
-
nested: {
|
|
244
|
-
path: props.nestedField,
|
|
245
|
-
query: query
|
|
246
|
-
}
|
|
182
|
+
}, {
|
|
183
|
+
"default": function _default() {
|
|
184
|
+
return [_this2.$props.title && createVNode(Title, {
|
|
185
|
+
"class": getClassName(_this2.$props.innerClass, 'title')
|
|
186
|
+
}, {
|
|
187
|
+
"default": function _default() {
|
|
188
|
+
return [_this2.$props.title];
|
|
189
|
+
}
|
|
190
|
+
}), _this2.$props.range ? createVNode(NoSSR, null, {
|
|
191
|
+
"default": function _default() {
|
|
192
|
+
return [createVNode(Slider, {
|
|
193
|
+
"class": getClassName(_this2.$props.innerClass, 'slider')
|
|
194
|
+
}, {
|
|
195
|
+
"default": function _default() {
|
|
196
|
+
return [createVNode(resolveComponent("vue-slider-component"), mergeProps({
|
|
197
|
+
"ref": "slider",
|
|
198
|
+
"modelValue": _this2.currentValue,
|
|
199
|
+
"min": _this2.$props.range.start,
|
|
200
|
+
"max": _this2.$props.range.end,
|
|
201
|
+
"dotSize": 20,
|
|
202
|
+
"height": 4,
|
|
203
|
+
"enable-cross": false,
|
|
204
|
+
"onDrag-end": _this2.handleSlider,
|
|
205
|
+
"tooltip": "always"
|
|
206
|
+
}, _this2.$props.sliderOptions), null), _this2.$props.rangeLabels && createVNode("div", {
|
|
207
|
+
"class": "label-container"
|
|
208
|
+
}, [createVNode("label", {
|
|
209
|
+
"class": getClassName(_this2.$props.innerClass, 'label') || 'range-label-left'
|
|
210
|
+
}, [_this2.$props.rangeLabels.start]), createVNode("label", {
|
|
211
|
+
"class": getClassName(_this2.$props.innerClass, 'label') || 'range-label-right'
|
|
212
|
+
}, [_this2.$props.rangeLabels.end])])];
|
|
213
|
+
}
|
|
214
|
+
})];
|
|
215
|
+
}
|
|
216
|
+
}) : null];
|
|
247
217
|
}
|
|
248
|
-
};
|
|
218
|
+
});
|
|
249
219
|
}
|
|
250
|
-
|
|
251
|
-
return query;
|
|
252
220
|
};
|
|
253
|
-
|
|
221
|
+
RangeSlider.defaultQuery = function (value, props) {
|
|
222
|
+
return {
|
|
223
|
+
query: {
|
|
224
|
+
queryFormat: props.queryFormat,
|
|
225
|
+
dataField: props.dataField,
|
|
226
|
+
value: value,
|
|
227
|
+
showMissing: props.showMissing
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
};
|
|
254
231
|
RangeSlider.parseValue = function (value, props) {
|
|
255
232
|
if (value) {
|
|
256
233
|
return Array.isArray(value) ? value : [value.start, value.end];
|
|
257
234
|
}
|
|
258
|
-
|
|
259
235
|
if (props.range) {
|
|
260
236
|
return [props.range.start, props.range.end];
|
|
261
237
|
}
|
|
262
|
-
|
|
263
238
|
return [];
|
|
264
239
|
};
|
|
265
|
-
|
|
266
240
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
267
241
|
return {
|
|
268
242
|
options: state.aggregations[props.componentId] ? state.aggregations[props.componentId][props.dataField] && state.aggregations[props.componentId][props.dataField].buckets // eslint-disable-line
|
|
269
243
|
: [],
|
|
270
244
|
selectedValue: state.selectedValues[props.componentId] ? state.selectedValues[props.componentId].value : null,
|
|
271
|
-
componentProps: state.props[props.componentId]
|
|
272
|
-
enableAppbase: state.config.enableAppbase
|
|
245
|
+
componentProps: state.props[props.componentId]
|
|
273
246
|
};
|
|
274
247
|
};
|
|
275
|
-
|
|
276
248
|
var mapDispatchtoProps = {
|
|
277
249
|
updateQuery: updateQuery,
|
|
278
250
|
setQueryOptions: setQueryOptions,
|
|
279
251
|
setCustomQuery: setCustomQuery
|
|
280
252
|
};
|
|
281
|
-
var RangeConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(RangeSlider), {
|
|
253
|
+
var RangeConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(RangeSlider), {
|
|
282
254
|
componentType: componentTypes.rangeSlider
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
Vue.component(
|
|
287
|
-
};
|
|
288
|
-
|
|
255
|
+
}));
|
|
256
|
+
RangeConnected.name = RangeSlider.name;
|
|
257
|
+
RangeConnected.install = function (Vue) {
|
|
258
|
+
Vue.component(RangeConnected.name, RangeConnected);
|
|
259
|
+
};
|
|
289
260
|
|
|
290
|
-
|
|
261
|
+
// Add componentType for SSR
|
|
262
|
+
RangeConnected.componentType = componentTypes.rangeSlider;
|
|
291
263
|
|
|
292
|
-
export default
|
|
264
|
+
export default RangeConnected;
|
|
293
265
|
export { RangeConnected };
|