@appbaseio/reactivesearch-vue 1.33.5 → 1.34.0-alpha.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 +6840 -9315
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +7 -13
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-626c5e8e.js +58 -0
- package/dist/cjs/{CancelSvg-220a7cc3.js → CancelSvg-062a42f0.js} +32 -40
- package/dist/cjs/Card-c381ded3.js +26 -0
- package/dist/cjs/{ComponentWrapper-b6d4660c.js → ComponentWrapper-db45cc6d.js} +5 -5
- package/dist/cjs/Container-29f049b2.js +12 -0
- package/dist/cjs/{DataSearch-1c5c2202.js → DataSearch-7c71ec9f.js} +712 -850
- package/dist/cjs/DataSearch.js +12 -11
- package/dist/cjs/{DropDown-8984b544.js → DropDown-3b899b20.js} +78 -79
- package/dist/cjs/DynamicRangeSlider.js +51 -37
- package/dist/cjs/Flex-d5675ea6.js +48 -0
- package/dist/cjs/FormControlList-cf1ff2ca.js +42 -0
- package/dist/cjs/Input-4d278ca0.js +74 -0
- package/dist/cjs/ListItem-c067bc07.js +41 -0
- package/dist/cjs/MultiDropdownList.js +71 -62
- package/dist/cjs/MultiList.js +85 -88
- package/dist/cjs/MultiRange.js +54 -41
- package/dist/cjs/{Pagination-07f4dbad.js → Pagination-a468f960.js} +56 -53
- package/dist/cjs/{PreferencesConsumer-5d67b486.js → PreferencesConsumer-034c55e3.js} +6 -5
- package/dist/cjs/RangeInput.js +115 -107
- package/dist/cjs/RangeSlider.js +50 -36
- package/dist/cjs/ReactiveBase.js +66 -48
- package/dist/cjs/{ReactiveComponent-4e75c939.js → ReactiveComponent-f0f486ca.js} +325 -311
- package/dist/cjs/ReactiveComponent.js +21 -20
- package/dist/cjs/ReactiveGoogleMap.js +283 -307
- package/dist/cjs/ReactiveList.js +99 -116
- package/dist/cjs/ResultCard.js +26 -19
- package/dist/cjs/ResultList.js +31 -27
- package/dist/cjs/SelectedFilters.js +49 -34
- package/dist/cjs/SingleDropdownList.js +70 -61
- package/dist/cjs/SingleList.js +86 -90
- package/dist/cjs/SingleRange.js +48 -39
- package/dist/cjs/StateProvider.js +2 -2
- package/dist/cjs/Title-8802a218.js +12 -0
- package/dist/cjs/ToggleButton.js +39 -32
- package/dist/cjs/{index-30126fd0.js → index-dc25b706.js} +6 -6
- package/dist/cjs/index.js +22 -21
- package/dist/cjs/install.js +21 -20
- package/dist/cjs/ssr-eb901d09.js +35 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-7cfc2f98.js → vueTypes-621a8143.js} +1 -1
- package/dist/es/Button-ebafa3d6.js +52 -0
- package/dist/es/{CancelSvg-e40552a5.js → CancelSvg-14ebc9a1.js} +30 -37
- package/dist/es/{Card-19ad6d90.js → Card-1951569e.js} +5 -6
- package/dist/es/{ComponentWrapper-8042aa35.js → ComponentWrapper-bf443c0b.js} +4 -4
- package/dist/es/Container-d00219f7.js +1 -1
- package/dist/es/{DataSearch-5bb904c5.js → DataSearch-4f9a4e46.js} +705 -842
- package/dist/es/DataSearch.js +10 -9
- package/dist/es/{DropDown-28ddce07.js → DropDown-35e232b7.js} +78 -78
- package/dist/es/DynamicRangeSlider.js +48 -34
- package/dist/es/Flex-a08e22d7.js +46 -0
- package/dist/es/FormControlList-fa5cf78b.js +38 -0
- package/dist/es/Input-3b8408a6.js +69 -0
- package/dist/es/{ListItem-07888a65.js → ListItem-47a6345a.js} +6 -7
- package/dist/es/MultiDropdownList.js +69 -60
- package/dist/es/MultiList.js +84 -87
- package/dist/es/MultiRange.js +52 -39
- package/dist/es/{Pagination-28e56c5c.js → Pagination-145b4ff2.js} +56 -53
- package/dist/es/{PreferencesConsumer-bc097ebb.js → PreferencesConsumer-7ea7313a.js} +5 -4
- package/dist/es/RangeInput.js +112 -103
- package/dist/es/RangeSlider.js +47 -33
- package/dist/es/ReactiveBase.js +65 -46
- package/dist/es/{ReactiveComponent-09c183c8.js → ReactiveComponent-e2fb9eb4.js} +321 -306
- package/dist/es/ReactiveComponent.js +18 -17
- package/dist/es/ReactiveGoogleMap.js +279 -302
- package/dist/es/ReactiveList.js +97 -113
- package/dist/es/ResultCard.js +25 -18
- package/dist/es/ResultList.js +30 -26
- package/dist/es/SelectedFilters.js +47 -32
- package/dist/es/SingleDropdownList.js +68 -59
- package/dist/es/SingleList.js +84 -88
- package/dist/es/SingleRange.js +46 -37
- package/dist/es/StateProvider.js +2 -2
- package/dist/es/Title-863dfa42.js +1 -1
- package/dist/es/ToggleButton.js +37 -30
- package/dist/es/{index-0444a498.js → index-285a43a6.js} +6 -6
- package/dist/es/index.js +19 -18
- package/dist/es/install.js +18 -17
- package/dist/es/ssr-03607d84.js +1 -1
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-8986b709.js → vueTypes-e4af6fe2.js} +1 -1
- package/package.json +8 -8
- package/dist/cjs/Button-841fd06d.js +0 -62
- package/dist/cjs/Card-240f283d.js +0 -30
- package/dist/cjs/Container-e699ea95.js +0 -15
- package/dist/cjs/Flex-ddd7cb6b.js +0 -50
- package/dist/cjs/FormControlList-bbb5cd24.js +0 -45
- package/dist/cjs/Input-ead4cd84.js +0 -77
- package/dist/cjs/ListItem-5088bd6a.js +0 -45
- package/dist/cjs/Title-16042ea0.js +0 -15
- package/dist/cjs/ssr-f2fc1bf6.js +0 -36
- package/dist/es/Button-153cd885.js +0 -53
- package/dist/es/Flex-7c177a10.js +0 -45
- package/dist/es/FormControlList-99797d0a.js +0 -38
- package/dist/es/Input-c09c0b56.js +0 -69
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
-
import
|
|
3
|
+
import './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
+
import { createVNode, mergeProps, createTextVNode } from 'vue';
|
|
4
5
|
import VueTypes from 'vue-types';
|
|
5
|
-
import 'emotion';
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
|
+
import 'emotion';
|
|
7
8
|
import 'polished';
|
|
8
|
-
import { f as filters, B as Button } from './Button-
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { f as filters, B as Button } from './Button-ebafa3d6.js';
|
|
10
|
+
import { t as types } from './vueTypes-e4af6fe2.js';
|
|
10
11
|
import 'redux';
|
|
11
|
-
import { n as decodeHtml, c as connect } from './index-
|
|
12
|
+
import { n as decodeHtml, c as connect } from './index-285a43a6.js';
|
|
12
13
|
import { T as Title } from './Title-863dfa42.js';
|
|
13
14
|
import { C as Container } from './Container-d00219f7.js';
|
|
14
15
|
|
|
@@ -36,9 +37,8 @@ var SelectedFilters = {
|
|
|
36
37
|
},
|
|
37
38
|
render: function render() {
|
|
38
39
|
var _this = this;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return this.$scopedSlots["default"]({
|
|
40
|
+
if (this.$slots["default"]) {
|
|
41
|
+
return this.$slots["default"]({
|
|
42
42
|
components: this.components,
|
|
43
43
|
selectedValues: this.selectedValues,
|
|
44
44
|
clearValues: this.clearValues,
|
|
@@ -49,24 +49,36 @@ var SelectedFilters = {
|
|
|
49
49
|
}
|
|
50
50
|
var filtersToRender = this.renderFilters();
|
|
51
51
|
var hasValues = !!filtersToRender.length;
|
|
52
|
-
return
|
|
52
|
+
return createVNode(Container, {
|
|
53
53
|
"class": filters(this.theme) + " " + (this.$props.className || '')
|
|
54
|
-
},
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
54
|
+
}, {
|
|
55
|
+
"default": function _default() {
|
|
56
|
+
return [_this.$props.title && hasValues && createVNode(Title, {
|
|
57
|
+
"class": getClassName(_this.$props.innerClass, 'title') || ''
|
|
58
|
+
}, {
|
|
59
|
+
"default": function _default() {
|
|
60
|
+
return [_this.$props.title];
|
|
61
|
+
}
|
|
62
|
+
}), filtersToRender, _this.$props.showClearAll && hasValues && filtersToRender.length > 1 ? createVNode(Button, mergeProps({
|
|
63
|
+
"class": getClassName(_this.$props.innerClass, 'button') || ''
|
|
64
|
+
}, {
|
|
65
|
+
on: {
|
|
66
|
+
click: _this.clearValues,
|
|
67
|
+
keypress: function keypress(event) {
|
|
68
|
+
return handleA11yAction(event, function () {
|
|
69
|
+
return _this.clearValues();
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
"tabIndex": "0"
|
|
75
|
+
}), {
|
|
76
|
+
"default": function _default() {
|
|
77
|
+
return [_this.$props.clearAllLabel];
|
|
78
|
+
}
|
|
79
|
+
}) : null];
|
|
68
80
|
}
|
|
69
|
-
}
|
|
81
|
+
});
|
|
70
82
|
},
|
|
71
83
|
methods: {
|
|
72
84
|
remove: function remove(component, value) {
|
|
@@ -118,20 +130,23 @@ var SelectedFilters = {
|
|
|
118
130
|
return value;
|
|
119
131
|
},
|
|
120
132
|
renderFilterButton: function renderFilterButton(component, keyProp, handleRemove, label) {
|
|
121
|
-
|
|
122
|
-
return h(Button, {
|
|
133
|
+
return createVNode(Button, mergeProps({
|
|
123
134
|
"class": getClassName(this.$props.innerClass, 'button') || '',
|
|
124
|
-
"key": keyProp
|
|
125
|
-
|
|
135
|
+
"key": keyProp
|
|
136
|
+
}, {
|
|
137
|
+
on: {
|
|
126
138
|
click: handleRemove,
|
|
127
139
|
keypress: function keypress(event) {
|
|
128
140
|
return handleA11yAction(event, handleRemove);
|
|
129
141
|
}
|
|
130
|
-
}),
|
|
131
|
-
"attrs": {
|
|
132
|
-
"tabIndex": "0"
|
|
133
142
|
}
|
|
134
|
-
},
|
|
143
|
+
}, {
|
|
144
|
+
"tabIndex": "0"
|
|
145
|
+
}), {
|
|
146
|
+
"default": function _default() {
|
|
147
|
+
return [createVNode("span", null, [label]), createVNode("span", null, [createTextVNode("\u2715")])];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
135
150
|
},
|
|
136
151
|
renderFilters: function renderFilters() {
|
|
137
152
|
var _this3 = this;
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
3
|
import { a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
+
import { createVNode, isVNode } from 'vue';
|
|
4
5
|
import VueTypes from 'vue-types';
|
|
5
|
-
import 'emotion';
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
|
+
import 'emotion';
|
|
7
8
|
import 'polished';
|
|
8
|
-
import { l as loadMoreContainer, B as Button } from './Button-
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { l as loadMoreContainer, B as Button } from './Button-ebafa3d6.js';
|
|
10
|
+
import { t as types } from './vueTypes-e4af6fe2.js';
|
|
10
11
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
12
|
import 'redux';
|
|
12
|
-
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, h as hasCustomRenderer, c as connect } from './index-
|
|
13
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
14
|
-
import { P as PreferencesConsumer } from './PreferencesConsumer-
|
|
15
|
-
import '@vue/babel-helper-vue-jsx-merge-props';
|
|
13
|
+
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, h as hasCustomRenderer, c as connect } from './index-285a43a6.js';
|
|
14
|
+
import { C as ComponentWrapper } from './ComponentWrapper-bf443c0b.js';
|
|
15
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-7ea7313a.js';
|
|
16
16
|
import { T as Title } from './Title-863dfa42.js';
|
|
17
|
-
import './CancelSvg-
|
|
18
|
-
import './Input-
|
|
17
|
+
import './CancelSvg-14ebc9a1.js';
|
|
18
|
+
import './Input-3b8408a6.js';
|
|
19
19
|
import 'compute-scroll-into-view';
|
|
20
20
|
import { C as Container } from './Container-d00219f7.js';
|
|
21
21
|
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
22
22
|
import { g as getAggsQuery } from './utils-9e5a16a1.js';
|
|
23
|
-
import { D as Dropdown } from './DropDown-
|
|
23
|
+
import { D as Dropdown } from './DropDown-35e232b7.js';
|
|
24
24
|
|
|
25
|
+
function _isSlot(s) {
|
|
26
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
27
|
+
}
|
|
25
28
|
var updateQuery = Actions.updateQuery,
|
|
26
29
|
setQueryOptions = Actions.setQueryOptions,
|
|
27
30
|
setCustomQuery = Actions.setCustomQuery,
|
|
@@ -79,7 +82,7 @@ var SingleDropdownList = {
|
|
|
79
82
|
showSearch: VueTypes.bool.def(false),
|
|
80
83
|
showClear: VueTypes.bool.def(false),
|
|
81
84
|
showLoadMore: VueTypes.bool.def(false),
|
|
82
|
-
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.
|
|
85
|
+
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.nullable]).def('Load More'),
|
|
83
86
|
nestedField: types.string,
|
|
84
87
|
index: VueTypes.string,
|
|
85
88
|
searchPlaceholder: VueTypes.string.def('Type here to search...'),
|
|
@@ -171,7 +174,7 @@ var SingleDropdownList = {
|
|
|
171
174
|
}
|
|
172
175
|
},
|
|
173
176
|
render: function render() {
|
|
174
|
-
var
|
|
177
|
+
var _this2 = this;
|
|
175
178
|
var _this$$props2 = this.$props,
|
|
176
179
|
showLoadMore = _this$$props2.showLoadMore,
|
|
177
180
|
loadMoreLabel = _this$$props2.loadMoreLabel,
|
|
@@ -180,16 +183,16 @@ var SingleDropdownList = {
|
|
|
180
183
|
renderLabel = _this$$props2.renderLabel;
|
|
181
184
|
var isLastBucket = this.$data.isLastBucket;
|
|
182
185
|
var selectAll = [];
|
|
183
|
-
var renderItemCalc = this.$
|
|
184
|
-
var renderErrorCalc = this.$
|
|
185
|
-
var renderLabelCalc = this.$
|
|
186
|
-
var renderNoResults = this.$
|
|
186
|
+
var renderItemCalc = this.$slots.renderItem || renderItem;
|
|
187
|
+
var renderErrorCalc = this.$slots.renderError || renderError;
|
|
188
|
+
var renderLabelCalc = this.$slots.renderLabel || renderLabel;
|
|
189
|
+
var renderNoResults = this.$slots.renderNoResults || this.$props.renderNoResults;
|
|
187
190
|
if (renderErrorCalc && this.error) {
|
|
188
191
|
return isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
|
|
189
192
|
}
|
|
190
193
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
191
194
|
if (renderNoResults && isFunction(renderNoResults)) {
|
|
192
|
-
return
|
|
195
|
+
return createVNode("div", null, [renderNoResults()]);
|
|
193
196
|
}
|
|
194
197
|
if (renderNoResults && !isFunction(renderNoResults)) {
|
|
195
198
|
return renderNoResults;
|
|
@@ -202,58 +205,64 @@ var SingleDropdownList = {
|
|
|
202
205
|
doc_count: this.totalDocumentCount
|
|
203
206
|
}];
|
|
204
207
|
}
|
|
205
|
-
return
|
|
208
|
+
return createVNode(Container, {
|
|
206
209
|
"class": this.$props.className
|
|
207
|
-
},
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}).map(function (item) {
|
|
215
|
-
return _extends({}, item, {
|
|
216
|
-
key: String(item.key)
|
|
217
|
-
});
|
|
218
|
-
})),
|
|
219
|
-
"handleChange": this.handleChange,
|
|
220
|
-
"selectedItem": this.$data.currentValue,
|
|
221
|
-
"placeholder": this.$props.placeholder,
|
|
222
|
-
"labelField": "key",
|
|
223
|
-
"showCount": this.$props.showCount,
|
|
224
|
-
"hasCustomRenderer": this.hasCustomRenderer,
|
|
225
|
-
"customRenderer": this.getComponent,
|
|
226
|
-
"renderItem": renderItemCalc,
|
|
227
|
-
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
228
|
-
"themePreset": this.themePreset,
|
|
229
|
-
"showSearch": this.$props.showSearch,
|
|
230
|
-
"showClear": this.$props.showClear,
|
|
231
|
-
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
232
|
-
"transformData": this.$props.transformData,
|
|
233
|
-
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
234
|
-
"attrs": {
|
|
235
|
-
"css": loadMoreContainer
|
|
210
|
+
}, {
|
|
211
|
+
"default": function _default() {
|
|
212
|
+
return [_this2.$props.title && createVNode(Title, {
|
|
213
|
+
"class": getClassName(_this2.$props.innerClass, 'title') || ''
|
|
214
|
+
}, {
|
|
215
|
+
"default": function _default() {
|
|
216
|
+
return [_this2.$props.title];
|
|
236
217
|
}
|
|
237
|
-
},
|
|
238
|
-
"
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
218
|
+
}), createVNode(Dropdown, {
|
|
219
|
+
"innerClass": _this2.$props.innerClass,
|
|
220
|
+
"items": [].concat(selectAll, _this2.$data.modifiedOptions.filter(function (item) {
|
|
221
|
+
return String(item.key).trim().length;
|
|
222
|
+
}).map(function (item) {
|
|
223
|
+
return _extends({}, item, {
|
|
224
|
+
key: String(item.key)
|
|
225
|
+
});
|
|
226
|
+
})),
|
|
227
|
+
"handleChange": _this2.handleChange,
|
|
228
|
+
"selectedItem": _this2.$data.currentValue,
|
|
229
|
+
"placeholder": _this2.$props.placeholder,
|
|
230
|
+
"labelField": "key",
|
|
231
|
+
"showCount": _this2.$props.showCount,
|
|
232
|
+
"hasCustomRenderer": _this2.hasCustomRenderer,
|
|
233
|
+
"customRenderer": _this2.getComponent,
|
|
234
|
+
"renderItem": renderItemCalc,
|
|
235
|
+
"renderNoResults": _this2.$slots.renderNoResults || _this2.$props.renderNoResults,
|
|
236
|
+
"themePreset": _this2.themePreset,
|
|
237
|
+
"showSearch": _this2.$props.showSearch,
|
|
238
|
+
"showClear": _this2.$props.showClear,
|
|
239
|
+
"searchPlaceholder": _this2.$props.searchPlaceholder,
|
|
240
|
+
"transformData": _this2.$props.transformData,
|
|
241
|
+
"footer": showLoadMore && !isLastBucket && createVNode("div", {
|
|
242
|
+
"css": loadMoreContainer
|
|
243
|
+
}, [createVNode(Button, {
|
|
244
|
+
"onClick": _this2.handleLoadMore
|
|
245
|
+
}, _isSlot(loadMoreLabel) ? loadMoreLabel : {
|
|
246
|
+
"default": function _default() {
|
|
247
|
+
return [loadMoreLabel];
|
|
248
|
+
}
|
|
249
|
+
})]),
|
|
250
|
+
"customLabelRenderer": renderLabelCalc
|
|
251
|
+
}, null)];
|
|
243
252
|
}
|
|
244
|
-
})
|
|
253
|
+
});
|
|
245
254
|
},
|
|
246
255
|
methods: {
|
|
247
256
|
setValue: function setValue(value, props) {
|
|
248
|
-
var
|
|
257
|
+
var _this3 = this;
|
|
249
258
|
if (props === void 0) {
|
|
250
259
|
props = this.$props;
|
|
251
260
|
}
|
|
252
261
|
var performUpdate = function performUpdate() {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
262
|
+
_this3.currentValue = value;
|
|
263
|
+
_this3.updateQueryHandler(value, props);
|
|
264
|
+
_this3.$emit('valueChange', value);
|
|
265
|
+
_this3.$emit('value-change', value);
|
|
257
266
|
};
|
|
258
267
|
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
259
268
|
},
|
package/dist/es/SingleList.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
3
|
import { a as _extends } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
+
import { createVNode, mergeProps, createTextVNode } from 'vue';
|
|
4
5
|
import VueTypes from 'vue-types';
|
|
5
|
-
import 'emotion';
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
|
+
import 'emotion';
|
|
7
8
|
import 'polished';
|
|
8
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-e4af6fe2.js';
|
|
9
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
11
|
import 'redux';
|
|
11
|
-
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, o as isEvent, h as hasCustomRenderer, c as connect } from './index-
|
|
12
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
13
|
-
import { P as PreferencesConsumer } from './PreferencesConsumer-
|
|
12
|
+
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, o as isEvent, h as hasCustomRenderer, c as connect } from './index-285a43a6.js';
|
|
13
|
+
import { C as ComponentWrapper } from './ComponentWrapper-bf443c0b.js';
|
|
14
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-7ea7313a.js';
|
|
14
15
|
import { T as Title } from './Title-863dfa42.js';
|
|
15
|
-
import { I as Input } from './Input-
|
|
16
|
+
import { I as Input } from './Input-3b8408a6.js';
|
|
16
17
|
import { C as Container } from './Container-d00219f7.js';
|
|
17
18
|
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
18
|
-
import { U as UL, R as Radio } from './FormControlList-
|
|
19
|
+
import { U as UL, R as Radio } from './FormControlList-fa5cf78b.js';
|
|
19
20
|
import { g as getAggsQuery } from './utils-9e5a16a1.js';
|
|
20
21
|
|
|
21
22
|
var updateQuery = Actions.updateQuery,
|
|
@@ -135,13 +136,12 @@ var SingleList = {
|
|
|
135
136
|
},
|
|
136
137
|
render: function render() {
|
|
137
138
|
var _this = this;
|
|
138
|
-
var h = arguments[0];
|
|
139
139
|
var _this$$props = this.$props,
|
|
140
140
|
selectAllLabel = _this$$props.selectAllLabel,
|
|
141
141
|
renderItem = _this$$props.renderItem,
|
|
142
142
|
renderError = _this$$props.renderError;
|
|
143
|
-
var renderItemCalc = this.$
|
|
144
|
-
var renderErrorCalc = this.$
|
|
143
|
+
var renderItemCalc = this.$slots.renderItem || renderItem;
|
|
144
|
+
var renderErrorCalc = this.$slots.renderError || renderError;
|
|
145
145
|
if (renderErrorCalc && this.error) {
|
|
146
146
|
return isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
|
|
147
147
|
}
|
|
@@ -165,71 +165,73 @@ var SingleList = {
|
|
|
165
165
|
}
|
|
166
166
|
return false;
|
|
167
167
|
});
|
|
168
|
-
return
|
|
168
|
+
return createVNode(Container, {
|
|
169
169
|
"class": this.$props.className
|
|
170
|
-
},
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
170
|
+
}, {
|
|
171
|
+
"default": function _default() {
|
|
172
|
+
return [_this.$props.title && createVNode(Title, {
|
|
173
|
+
"class": getClassName(_this.$props.innerClass, 'title') || ''
|
|
174
|
+
}, {
|
|
175
|
+
"default": function _default() {
|
|
176
|
+
return [_this.$props.title];
|
|
177
|
+
}
|
|
178
|
+
}), _this.renderSearch(), _this.hasCustomRenderer ? _this.getComponent() : createVNode(UL, {
|
|
179
|
+
"class": getClassName(_this.$props.innerClass, 'list') || ''
|
|
180
|
+
}, {
|
|
181
|
+
"default": function _default() {
|
|
182
|
+
return [selectAllLabel ? createVNode("li", {
|
|
183
|
+
"key": selectAllLabel,
|
|
184
|
+
"class": "" + (_this.$data.currentValue === selectAllLabel ? 'active' : '')
|
|
185
|
+
}, [createVNode(Radio, mergeProps({
|
|
186
|
+
"class": getClassName(_this.$props.innerClass, 'radio'),
|
|
187
|
+
"id": _this.$props.componentId + "-" + selectAllLabel,
|
|
188
|
+
"name": _this.$props.componentId,
|
|
189
|
+
"value": selectAllLabel,
|
|
190
|
+
"onClick": _this.handleClick,
|
|
191
|
+
"readOnly": true,
|
|
192
|
+
"type": "radio",
|
|
193
|
+
"show": _this.$props.showRadio
|
|
194
|
+
}, {
|
|
195
|
+
domProps: {
|
|
196
|
+
checked: _this.$data.currentValue === selectAllLabel
|
|
197
|
+
}
|
|
198
|
+
}), null), createVNode("label", {
|
|
199
|
+
"class": getClassName(_this.$props.innerClass, 'label') || null,
|
|
200
|
+
"for": _this.$props.componentId + "-" + selectAllLabel
|
|
201
|
+
}, [createVNode("span", null, [selectAllLabel, _this.$props.showCount && createVNode("span", {
|
|
202
|
+
"class": getClassName(_this.$props.innerClass, 'count') || null
|
|
203
|
+
}, [createTextVNode("\xA0("), _this.totalDocumentCount, createTextVNode(")")])])])]) : null, !_this.hasCustomRenderer && filteredItemsToRender.length === 0 && !_this.isLoading ? _this.renderNoResult() : filteredItemsToRender.map(function (item) {
|
|
204
|
+
return createVNode("li", {
|
|
205
|
+
"key": item.key,
|
|
206
|
+
"class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
|
|
207
|
+
}, [createVNode(Radio, mergeProps({
|
|
208
|
+
"class": getClassName(_this.$props.innerClass, 'radio'),
|
|
209
|
+
"id": _this.$props.componentId + "-" + item.key,
|
|
210
|
+
"name": _this.$props.componentId,
|
|
211
|
+
"value": item.key,
|
|
212
|
+
"readOnly": true,
|
|
213
|
+
"onClick": _this.handleClick,
|
|
214
|
+
"type": "radio",
|
|
215
|
+
"show": _this.$props.showRadio
|
|
216
|
+
}, {
|
|
217
|
+
domProps: {
|
|
218
|
+
checked: _this.currentValue === String(item.key)
|
|
219
|
+
}
|
|
220
|
+
}), null), createVNode("label", {
|
|
221
|
+
"class": getClassName(_this.$props.innerClass, 'label') || null,
|
|
222
|
+
"for": _this.$props.componentId + "-" + item.key
|
|
223
|
+
}, [renderItemCalc ? renderItemCalc({
|
|
224
|
+
label: item.key,
|
|
225
|
+
count: item.doc_count,
|
|
226
|
+
isChecked: _this.currentValue === String(item.key)
|
|
227
|
+
}) : createVNode("span", null, [item.key, _this.$props.showCount && createVNode("span", {
|
|
228
|
+
"class": getClassName(_this.$props.innerClass, 'count') || null
|
|
229
|
+
}, [createTextVNode("\xA0("), item.doc_count, createTextVNode(")")])])])]);
|
|
230
|
+
})];
|
|
231
|
+
}
|
|
232
|
+
})];
|
|
197
233
|
}
|
|
198
|
-
}
|
|
199
|
-
"class": getClassName(this.$props.innerClass, 'count') || null
|
|
200
|
-
}, ["\xA0(", this.totalDocumentCount, ")"])])])]) : null, !this.hasCustomRenderer && filteredItemsToRender.length === 0 && !this.isLoading ? this.renderNoResult() : filteredItemsToRender.map(function (item) {
|
|
201
|
-
return h("li", {
|
|
202
|
-
"key": item.key,
|
|
203
|
-
"class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
|
|
204
|
-
}, [h(Radio, {
|
|
205
|
-
"class": getClassName(_this.$props.innerClass, 'radio'),
|
|
206
|
-
"attrs": {
|
|
207
|
-
"id": _this.$props.componentId + "-" + item.key,
|
|
208
|
-
"name": _this.$props.componentId,
|
|
209
|
-
"value": item.key,
|
|
210
|
-
"readOnly": true,
|
|
211
|
-
"type": "radio",
|
|
212
|
-
"show": _this.$props.showRadio
|
|
213
|
-
},
|
|
214
|
-
"on": {
|
|
215
|
-
"click": _this.handleClick
|
|
216
|
-
},
|
|
217
|
-
"domProps": _extends({}, {
|
|
218
|
-
checked: _this.currentValue === String(item.key)
|
|
219
|
-
})
|
|
220
|
-
}), h("label", {
|
|
221
|
-
"class": getClassName(_this.$props.innerClass, 'label') || null,
|
|
222
|
-
"attrs": {
|
|
223
|
-
"for": _this.$props.componentId + "-" + item.key
|
|
224
|
-
}
|
|
225
|
-
}, [renderItemCalc ? renderItemCalc({
|
|
226
|
-
label: item.key,
|
|
227
|
-
count: item.doc_count,
|
|
228
|
-
isChecked: _this.currentValue === String(item.key)
|
|
229
|
-
}) : h("span", [item.key, _this.$props.showCount && h("span", {
|
|
230
|
-
"class": getClassName(_this.$props.innerClass, 'count') || null
|
|
231
|
-
}, ["\xA0(", item.doc_count, ")"])])])]);
|
|
232
|
-
})])]);
|
|
234
|
+
});
|
|
233
235
|
},
|
|
234
236
|
methods: {
|
|
235
237
|
setValue: function setValue(nextValue, props) {
|
|
@@ -309,22 +311,17 @@ var SingleList = {
|
|
|
309
311
|
this.searchTerm = value;
|
|
310
312
|
},
|
|
311
313
|
renderSearch: function renderSearch() {
|
|
312
|
-
var h = this.$createElement;
|
|
313
314
|
if (this.$props.showSearch) {
|
|
314
|
-
return
|
|
315
|
+
return createVNode(Input, {
|
|
315
316
|
"class": getClassName(this.$props.innerClass, 'input') || '',
|
|
316
|
-
"
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
"attrs": {
|
|
320
|
-
"value": this.$data.searchTerm,
|
|
321
|
-
"placeholder": this.$props.placeholder,
|
|
322
|
-
"themePreset": this.$props.themePreset
|
|
323
|
-
},
|
|
317
|
+
"onInput": this.handleInputChange,
|
|
318
|
+
"value": this.$data.searchTerm,
|
|
319
|
+
"placeholder": this.$props.placeholder,
|
|
324
320
|
"style": {
|
|
325
321
|
margin: '0 0 8px'
|
|
326
|
-
}
|
|
327
|
-
|
|
322
|
+
},
|
|
323
|
+
"themePreset": this.$props.themePreset
|
|
324
|
+
}, null);
|
|
328
325
|
}
|
|
329
326
|
return null;
|
|
330
327
|
},
|
|
@@ -364,9 +361,8 @@ var SingleList = {
|
|
|
364
361
|
return true;
|
|
365
362
|
},
|
|
366
363
|
renderNoResult: function renderNoResult() {
|
|
367
|
-
var
|
|
368
|
-
|
|
369
|
-
return h("p", {
|
|
364
|
+
var renderNoResults = this.$slots.renderNoResults || this.$props.renderNoResults;
|
|
365
|
+
return createVNode("p", {
|
|
370
366
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
371
367
|
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
372
368
|
}
|
package/dist/es/SingleRange.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
3
|
import './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
+
import { createVNode, isVNode } from 'vue';
|
|
4
5
|
import VueTypes from 'vue-types';
|
|
5
|
-
import 'emotion';
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
|
-
import { t as types } from './vueTypes-
|
|
8
|
+
import { t as types } from './vueTypes-e4af6fe2.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
11
|
-
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-
|
|
12
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
13
|
-
import { P as PreferencesConsumer } from './PreferencesConsumer-
|
|
11
|
+
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-285a43a6.js';
|
|
12
|
+
import { C as ComponentWrapper } from './ComponentWrapper-bf443c0b.js';
|
|
13
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-7ea7313a.js';
|
|
14
14
|
import { T as Title } from './Title-863dfa42.js';
|
|
15
15
|
import { C as Container } from './Container-d00219f7.js';
|
|
16
|
-
import { U as UL, R as Radio } from './FormControlList-
|
|
16
|
+
import { U as UL, R as Radio } from './FormControlList-fa5cf78b.js';
|
|
17
17
|
|
|
18
|
+
function _isSlot(s) {
|
|
19
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
20
|
+
}
|
|
18
21
|
var updateQuery = Actions.updateQuery,
|
|
19
22
|
setQueryOptions = Actions.setQueryOptions,
|
|
20
23
|
setCustomQuery = Actions.setCustomQuery;
|
|
@@ -91,39 +94,45 @@ var SingleRange = {
|
|
|
91
94
|
}
|
|
92
95
|
},
|
|
93
96
|
render: function render() {
|
|
97
|
+
var _slot;
|
|
94
98
|
var _this = this;
|
|
95
|
-
|
|
96
|
-
return h(Container, {
|
|
99
|
+
return createVNode(Container, {
|
|
97
100
|
"class": this.$props.className
|
|
98
|
-
},
|
|
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
|
-
|
|
101
|
+
}, {
|
|
102
|
+
"default": function _default() {
|
|
103
|
+
return [_this.$props.title && createVNode(Title, {
|
|
104
|
+
"class": getClassName(_this.$props.innerClass, 'title')
|
|
105
|
+
}, {
|
|
106
|
+
"default": function _default() {
|
|
107
|
+
return [_this.$props.title];
|
|
108
|
+
}
|
|
109
|
+
}), createVNode(UL, {
|
|
110
|
+
"class": getClassName(_this.$props.innerClass, 'list')
|
|
111
|
+
}, _isSlot(_slot = _this.$props.data.map(function (item) {
|
|
112
|
+
var selected = !!_this.$data.currentValue && _this.$data.currentValue.label === item.label;
|
|
113
|
+
return createVNode("li", {
|
|
114
|
+
"key": item.label,
|
|
115
|
+
"class": "" + (selected ? 'active' : '')
|
|
116
|
+
}, [createVNode(Radio, {
|
|
117
|
+
"class": getClassName(_this.$props.innerClass, 'radio'),
|
|
118
|
+
"id": _this.$props.componentId + "-" + item.label,
|
|
119
|
+
"name": _this.$props.componentId,
|
|
120
|
+
"value": item.label,
|
|
121
|
+
"onChange": _this.handleChange,
|
|
122
|
+
"type": "radio",
|
|
123
|
+
"checked": selected,
|
|
124
|
+
"show": _this.$props.showRadio
|
|
125
|
+
}, null), createVNode("label", {
|
|
126
|
+
"class": getClassName(_this.$props.innerClass, 'label'),
|
|
127
|
+
"for": _this.$props.componentId + "-" + item.label
|
|
128
|
+
}, [item.label])]);
|
|
129
|
+
})) ? _slot : {
|
|
130
|
+
"default": function _default() {
|
|
131
|
+
return [_slot];
|
|
132
|
+
}
|
|
133
|
+
})];
|
|
134
|
+
}
|
|
135
|
+
});
|
|
127
136
|
},
|
|
128
137
|
methods: {
|
|
129
138
|
setValue: function setValue(value, props) {
|