@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/SingleRange.js
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
|
-
import './_rollupPluginBabelHelpers-76660dab.js';
|
|
3
|
-
import VueTypes from 'vue-types';
|
|
4
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
|
-
import '
|
|
3
|
+
import _transformOn from '@vue/babel-helper-vue-transform-on';
|
|
4
|
+
import './_rollupPluginBabelHelpers-ded08042.js';
|
|
5
|
+
import { createVNode, mergeProps, isVNode } from 'vue';
|
|
6
|
+
import VueTypes from 'vue-types';
|
|
6
7
|
import '@appbaseio/vue-emotion';
|
|
7
8
|
import 'polished';
|
|
8
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-f1923c72.js';
|
|
9
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
11
|
import 'redux';
|
|
11
|
-
import {
|
|
12
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
12
|
+
import { j as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4520a598.js';
|
|
13
|
+
import { C as ComponentWrapper } from './ComponentWrapper-5166c76a.js';
|
|
14
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-c276709c.js';
|
|
15
|
+
import { T as Title } from './Title-863dfa42.js';
|
|
16
|
+
import { C as Container } from './Container-d00219f7.js';
|
|
17
|
+
import { U as UL, R as Radio } from './FormControlList-fe6eaee4.js';
|
|
18
|
+
|
|
19
|
+
function _isSlot(s) {
|
|
20
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
21
|
+
}
|
|
17
22
|
var updateQuery = Actions.updateQuery,
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
setQueryOptions = Actions.setQueryOptions,
|
|
24
|
+
setCustomQuery = Actions.setCustomQuery;
|
|
20
25
|
var isEqual = helper.isEqual,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
checkValueChange = helper.checkValueChange,
|
|
27
|
+
getClassName = helper.getClassName,
|
|
28
|
+
getOptionsFromQuery = helper.getOptionsFromQuery;
|
|
24
29
|
var SingleRange = {
|
|
25
30
|
name: 'SingleRange',
|
|
26
31
|
data: function data() {
|
|
@@ -51,11 +56,7 @@ var SingleRange = {
|
|
|
51
56
|
endpoint: types.endpointConfig
|
|
52
57
|
},
|
|
53
58
|
created: function created() {
|
|
54
|
-
|
|
55
|
-
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
56
|
-
} // Set custom query in store
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
// Set custom query in store
|
|
59
60
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
60
61
|
},
|
|
61
62
|
beforeMount: function beforeMount() {
|
|
@@ -91,76 +92,72 @@ var SingleRange = {
|
|
|
91
92
|
}
|
|
92
93
|
},
|
|
93
94
|
render: function render() {
|
|
95
|
+
var _slot;
|
|
94
96
|
var _this = this;
|
|
95
|
-
|
|
96
|
-
var h = arguments[0];
|
|
97
|
-
return h(Container, {
|
|
97
|
+
return createVNode(Container, {
|
|
98
98
|
"class": this.$props.className
|
|
99
|
-
},
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
99
|
+
}, {
|
|
100
|
+
"default": function _default() {
|
|
101
|
+
return [_this.$props.title && createVNode(Title, {
|
|
102
|
+
"class": getClassName(_this.$props.innerClass, 'title')
|
|
103
|
+
}, {
|
|
104
|
+
"default": function _default() {
|
|
105
|
+
return [_this.$props.title];
|
|
106
|
+
}
|
|
107
|
+
}), createVNode(UL, {
|
|
108
|
+
"class": getClassName(_this.$props.innerClass, 'list')
|
|
109
|
+
}, _isSlot(_slot = _this.$props.data.map(function (item) {
|
|
110
|
+
var selected = !!_this.$data.currentValue && _this.$data.currentValue.label === item.label;
|
|
111
|
+
return createVNode("li", {
|
|
112
|
+
"key": item.label,
|
|
113
|
+
"class": "" + (selected ? 'active' : '')
|
|
114
|
+
}, [createVNode(Radio, mergeProps(_transformOn({
|
|
115
|
+
change: _this.handleChange
|
|
116
|
+
}), {
|
|
117
|
+
"class": getClassName(_this.$props.innerClass, 'radio'),
|
|
118
|
+
"id": _this.$props.componentId + "-" + item.label,
|
|
119
|
+
"name": _this.$props.componentId,
|
|
120
|
+
"value": item.label,
|
|
121
|
+
"type": "radio",
|
|
122
|
+
"checked": selected,
|
|
123
|
+
"show": _this.$props.showRadio
|
|
124
|
+
}), null), createVNode("label", {
|
|
125
|
+
"class": getClassName(_this.$props.innerClass, 'label'),
|
|
126
|
+
"for": _this.$props.componentId + "-" + item.label
|
|
127
|
+
}, [item.label])]);
|
|
128
|
+
})) ? _slot : {
|
|
129
|
+
"default": function _default() {
|
|
130
|
+
return [_slot];
|
|
131
|
+
}
|
|
132
|
+
})];
|
|
133
|
+
}
|
|
134
|
+
});
|
|
128
135
|
},
|
|
129
136
|
methods: {
|
|
130
137
|
setValue: function setValue(value, props) {
|
|
131
138
|
var _this2 = this;
|
|
132
|
-
|
|
133
139
|
if (props === void 0) {
|
|
134
140
|
props = this.$props;
|
|
135
141
|
}
|
|
136
|
-
|
|
137
142
|
var currentValue = typeof value === 'string' ? SingleRange.parseValue(value, props) : value;
|
|
138
|
-
|
|
139
143
|
var performUpdate = function performUpdate() {
|
|
140
144
|
_this2.currentValue = currentValue;
|
|
141
|
-
|
|
142
145
|
_this2.updateQueryHandler(currentValue, props);
|
|
143
|
-
|
|
144
146
|
_this2.$emit('valueChange', currentValue);
|
|
145
|
-
|
|
146
147
|
_this2.$emit('value-change', currentValue);
|
|
147
148
|
};
|
|
148
|
-
|
|
149
149
|
checkValueChange(props.componentId, currentValue, props.beforeValueChange, performUpdate);
|
|
150
150
|
},
|
|
151
151
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
152
152
|
var customQuery = props.customQuery;
|
|
153
153
|
var query = SingleRange.defaultQuery(value, props);
|
|
154
|
-
|
|
155
154
|
if (customQuery) {
|
|
156
155
|
var _ref = customQuery(value, props) || {};
|
|
157
|
-
|
|
158
156
|
query = _ref.query;
|
|
159
157
|
var customQueryOptions = getOptionsFromQuery(customQuery(value, props));
|
|
160
158
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
161
159
|
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
162
160
|
}
|
|
163
|
-
|
|
164
161
|
this.updateQuery({
|
|
165
162
|
componentId: props.componentId,
|
|
166
163
|
query: query,
|
|
@@ -173,7 +170,6 @@ var SingleRange = {
|
|
|
173
170
|
},
|
|
174
171
|
handleChange: function handleChange(e) {
|
|
175
172
|
var value = this.$props.value;
|
|
176
|
-
|
|
177
173
|
if (value === undefined) {
|
|
178
174
|
this.setValue(e.target.value);
|
|
179
175
|
} else {
|
|
@@ -182,64 +178,41 @@ var SingleRange = {
|
|
|
182
178
|
}
|
|
183
179
|
}
|
|
184
180
|
};
|
|
185
|
-
|
|
186
181
|
SingleRange.parseValue = function (value, props) {
|
|
187
182
|
return props.data.find(function (item) {
|
|
188
183
|
return item.label === value;
|
|
189
184
|
}) || null;
|
|
190
185
|
};
|
|
191
|
-
|
|
192
186
|
SingleRange.defaultQuery = function (value, props) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
lte: value.end,
|
|
202
|
-
boost: 2.0
|
|
203
|
-
}, _range)
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
if (query && props.nestedField) {
|
|
208
|
-
return {
|
|
209
|
-
query: {
|
|
210
|
-
nested: {
|
|
211
|
-
path: props.nestedField,
|
|
212
|
-
query: query
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
return query;
|
|
187
|
+
return {
|
|
188
|
+
query: {
|
|
189
|
+
queryFormat: props.queryFormat,
|
|
190
|
+
dataField: props.dataField,
|
|
191
|
+
value: value,
|
|
192
|
+
showMissing: props.showMissing
|
|
193
|
+
}
|
|
194
|
+
};
|
|
219
195
|
};
|
|
220
|
-
|
|
221
196
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
222
197
|
return {
|
|
223
198
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
224
|
-
componentProps: state.props[props.componentId]
|
|
225
|
-
enableAppbase: state.config.enableAppbase
|
|
199
|
+
componentProps: state.props[props.componentId]
|
|
226
200
|
};
|
|
227
201
|
};
|
|
228
|
-
|
|
229
202
|
var mapDispatchtoProps = {
|
|
230
203
|
updateQuery: updateQuery,
|
|
231
204
|
setQueryOptions: setQueryOptions,
|
|
232
205
|
setCustomQuery: setCustomQuery
|
|
233
206
|
};
|
|
234
|
-
var RangeConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(SingleRange), {
|
|
207
|
+
var RangeConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(SingleRange), {
|
|
235
208
|
componentType: componentTypes.singleRange
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
Vue.component(
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
SingleRange.componentType = componentTypes.singleRange;
|
|
209
|
+
}));
|
|
210
|
+
RangeConnected.name = SingleRange.name;
|
|
211
|
+
RangeConnected.install = function (Vue) {
|
|
212
|
+
Vue.component(RangeConnected.name, RangeConnected);
|
|
213
|
+
};
|
|
214
|
+
// Add componentType for SSR
|
|
215
|
+
RangeConnected.componentType = componentTypes.singleRange;
|
|
244
216
|
|
|
245
|
-
export default
|
|
217
|
+
export default RangeConnected;
|
|
218
|
+
export { RangeConnected };
|
package/dist/es/StateProvider.js
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import { helper } from '@appbaseio/reactivecore';
|
|
2
|
-
import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
|
|
3
|
-
import VueTypes from 'vue-types';
|
|
1
|
+
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
4
2
|
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
+
import { a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
+
import VueTypes from 'vue-types';
|
|
5
5
|
import { isInternalComponent } from '@appbaseio/reactivecore/lib/utils/transform';
|
|
6
6
|
import 'redux';
|
|
7
|
-
import { c as connect } from './index-
|
|
8
|
-
import { setValues } from '@appbaseio/reactivecore/lib/actions/value';
|
|
7
|
+
import { c as connect } from './index-4520a598.js';
|
|
9
8
|
|
|
9
|
+
var setSearchState = Actions.setSearchState;
|
|
10
10
|
var getSearchState = helper.getSearchState;
|
|
11
11
|
var defaultKeys = ['hits', 'value', 'aggregations', 'error'];
|
|
12
|
-
|
|
13
12
|
var filterProps = function filterProps(props) {
|
|
14
13
|
if (props === void 0) {
|
|
15
14
|
props = {};
|
|
16
15
|
}
|
|
17
|
-
|
|
18
16
|
return _extends({}, props, {
|
|
19
17
|
props: props.componentProps
|
|
20
18
|
});
|
|
21
19
|
};
|
|
22
|
-
|
|
20
|
+
var convertArrayLike = function convertArrayLike(arrayLike) {
|
|
21
|
+
var arr = [];
|
|
22
|
+
var i = 0;
|
|
23
|
+
while (arrayLike[i]) {
|
|
24
|
+
arr[i] = arrayLike[i];
|
|
25
|
+
i += 1;
|
|
26
|
+
}
|
|
27
|
+
return arr;
|
|
28
|
+
};
|
|
23
29
|
var filterByComponentIds = function filterByComponentIds(state, props) {
|
|
24
30
|
if (props === void 0) {
|
|
25
31
|
props = {};
|
|
26
32
|
}
|
|
27
|
-
|
|
28
33
|
var _props = props,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
componentIds = _props.componentIds,
|
|
35
|
+
excludeComponentIds = _props.excludeComponentIds;
|
|
32
36
|
if (componentIds) {
|
|
33
37
|
if (typeof componentIds === 'string') {
|
|
34
38
|
var _ref;
|
|
35
|
-
|
|
36
39
|
return _ref = {}, _ref[componentIds] = state[componentIds], _ref;
|
|
37
40
|
}
|
|
38
|
-
|
|
39
41
|
if (Array.isArray(componentIds) && componentIds.length) {
|
|
40
42
|
var _filteredState = {};
|
|
41
43
|
componentIds.forEach(function (componentId) {
|
|
@@ -44,22 +46,18 @@ var filterByComponentIds = function filterByComponentIds(state, props) {
|
|
|
44
46
|
return _filteredState;
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
|
-
|
|
48
49
|
var filteredState = {};
|
|
49
|
-
|
|
50
50
|
if (!props.includeInternalComponents) {
|
|
51
51
|
Object.keys(state).forEach(function (componentId) {
|
|
52
52
|
if (componentId.endsWith('internal') || componentId.endsWith('active') || componentId.endsWith('timestamp')) {
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
|
|
56
55
|
filteredState[componentId] = state[componentId];
|
|
57
56
|
});
|
|
58
57
|
} else {
|
|
59
58
|
filteredState = state;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
}
|
|
60
|
+
// Apply exclude component ids
|
|
63
61
|
if (excludeComponentIds) {
|
|
64
62
|
if (typeof excludeComponentIds === 'string') {
|
|
65
63
|
Object.keys(state).forEach(function (componentId) {
|
|
@@ -69,7 +67,6 @@ var filterByComponentIds = function filterByComponentIds(state, props) {
|
|
|
69
67
|
}
|
|
70
68
|
});
|
|
71
69
|
}
|
|
72
|
-
|
|
73
70
|
if (Array.isArray(excludeComponentIds) && excludeComponentIds.length) {
|
|
74
71
|
Object.keys(state).forEach(function (componentId) {
|
|
75
72
|
if (excludeComponentIds.includes(componentId)) {
|
|
@@ -79,14 +76,11 @@ var filterByComponentIds = function filterByComponentIds(state, props) {
|
|
|
79
76
|
});
|
|
80
77
|
}
|
|
81
78
|
}
|
|
82
|
-
|
|
83
79
|
return filteredState;
|
|
84
80
|
};
|
|
85
|
-
|
|
86
81
|
var filterByKeys = function filterByKeys(state, allowedKeys) {
|
|
87
82
|
return Object.keys(state).reduce(function (components, componentId) {
|
|
88
83
|
var _extends2;
|
|
89
|
-
|
|
90
84
|
return _extends({}, components, (_extends2 = {}, _extends2[componentId] = Object.keys(state[componentId]).filter(function (key) {
|
|
91
85
|
return allowedKeys.includes(key);
|
|
92
86
|
}).reduce(function (obj, key) {
|
|
@@ -96,7 +90,6 @@ var filterByKeys = function filterByKeys(state, allowedKeys) {
|
|
|
96
90
|
}, {}), _extends2));
|
|
97
91
|
}, {});
|
|
98
92
|
};
|
|
99
|
-
|
|
100
93
|
var StateProvider = {
|
|
101
94
|
name: 'StateProvider',
|
|
102
95
|
props: {
|
|
@@ -194,34 +187,39 @@ var StateProvider = {
|
|
|
194
187
|
}
|
|
195
188
|
},
|
|
196
189
|
setSearchState: function setSearchState(valuesMap) {
|
|
190
|
+
var _this = this;
|
|
197
191
|
if (valuesMap === void 0) {
|
|
198
192
|
valuesMap = {};
|
|
199
193
|
}
|
|
200
|
-
|
|
201
194
|
var components = this.components;
|
|
202
195
|
var computedValuesMap = {};
|
|
203
|
-
components.filter(function (component) {
|
|
196
|
+
convertArrayLike(components).filter(function (component) {
|
|
204
197
|
return !isInternalComponent(component);
|
|
205
198
|
}).forEach(function (component) {
|
|
206
199
|
if (component in valuesMap) {
|
|
207
|
-
computedValuesMap[component] =
|
|
200
|
+
computedValuesMap[component] = {
|
|
201
|
+
value: valuesMap[component],
|
|
202
|
+
componentProps: _this.componentProps[component]
|
|
203
|
+
};
|
|
208
204
|
} else {
|
|
209
|
-
computedValuesMap[component] =
|
|
205
|
+
computedValuesMap[component] = {
|
|
206
|
+
value: null,
|
|
207
|
+
componentProps: _this.componentProps[component]
|
|
208
|
+
};
|
|
210
209
|
}
|
|
211
210
|
});
|
|
212
|
-
this.
|
|
211
|
+
this.setSearchStateFn(computedValuesMap);
|
|
213
212
|
}
|
|
214
213
|
},
|
|
215
214
|
render: function render() {
|
|
216
215
|
var searchState = this.searchState;
|
|
217
|
-
var dom = this.$
|
|
216
|
+
var dom = this.$slots["default"];
|
|
218
217
|
return dom ? dom({
|
|
219
218
|
searchState: searchState,
|
|
220
219
|
setSearchState: this.setSearchState
|
|
221
220
|
}) : null;
|
|
222
221
|
}
|
|
223
222
|
};
|
|
224
|
-
|
|
225
223
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
226
224
|
return {
|
|
227
225
|
selectedValues: filterByComponentIds(state.selectedValues, props),
|
|
@@ -236,17 +234,16 @@ var mapStateToProps = function mapStateToProps(state, props) {
|
|
|
236
234
|
customData: filterByComponentIds(state.customData, props),
|
|
237
235
|
settings: filterByComponentIds(state.settings, props),
|
|
238
236
|
rawData: filterByComponentIds(state.rawData, props),
|
|
239
|
-
components:
|
|
237
|
+
components: state.components
|
|
240
238
|
};
|
|
241
239
|
};
|
|
242
|
-
|
|
243
240
|
var mapDispatchtoProps = {
|
|
244
|
-
|
|
241
|
+
setSearchStateFn: setSearchState
|
|
245
242
|
};
|
|
246
243
|
var StateProviderConnected = connect(mapStateToProps, mapDispatchtoProps)(StateProvider);
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
Vue.component(
|
|
244
|
+
StateProviderConnected.name = StateProvider.name;
|
|
245
|
+
StateProviderConnected.install = function (Vue) {
|
|
246
|
+
Vue.component(StateProviderConnected.name, StateProviderConnected);
|
|
250
247
|
};
|
|
251
248
|
|
|
252
|
-
export default
|
|
249
|
+
export default StateProviderConnected;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-
|
|
2
|
-
import styled from '@appbaseio/vue-emotion';
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
2
|
+
import { styled } from '@appbaseio/vue-emotion';
|
|
3
3
|
|
|
4
4
|
var _templateObject;
|
|
5
5
|
var Title = styled('h2')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tmargin: 0 0 8px;\n\tfont-size: 1rem;\n\tcolor: ", ";\n"])), function (_ref) {
|