@appbaseio/reactivesearch-vue 1.34.0-alpha.2 → 1.34.1
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 +11024 -8760
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +12 -11
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/Button-841fd06d.js +62 -0
- package/dist/cjs/{CancelSvg-062a42f0.js → CancelSvg-220a7cc3.js} +40 -32
- package/dist/cjs/Card-240f283d.js +30 -0
- package/dist/cjs/{ComponentWrapper-db45cc6d.js → ComponentWrapper-94c50228.js} +7 -7
- package/dist/cjs/Container-e699ea95.js +15 -0
- package/dist/cjs/DataSearch.js +1312 -20
- package/dist/cjs/{DropDown-3b899b20.js → DropDown-7a52c661.js} +79 -78
- package/dist/cjs/DynamicRangeSlider.js +46 -56
- package/dist/cjs/Flex-ddd7cb6b.js +50 -0
- package/dist/cjs/FormControlList-bbb5cd24.js +45 -0
- package/dist/cjs/Input-ead4cd84.js +77 -0
- package/dist/cjs/ListItem-5088bd6a.js +45 -0
- package/dist/cjs/MultiDropdownList.js +68 -74
- package/dist/cjs/MultiList.js +94 -89
- package/dist/cjs/MultiRange.js +44 -54
- package/dist/cjs/{Pagination-a468f960.js → Pagination-e56a5b79.js} +53 -56
- package/dist/cjs/{PreferencesConsumer-034c55e3.js → PreferencesConsumer-5e6e84a2.js} +5 -6
- package/dist/cjs/RangeInput.js +107 -115
- package/dist/cjs/RangeSlider.js +39 -50
- package/dist/cjs/ReactiveBase.js +55 -69
- package/dist/cjs/ReactiveComponent.js +316 -46
- package/dist/cjs/{ReactiveComponent-f0f486ca.js → ReactiveComponentPrivate-244c6055.js} +321 -618
- package/dist/cjs/ReactiveComponentPrivate.js +55 -0
- package/dist/cjs/ReactiveGoogleMap.js +439 -384
- package/dist/cjs/ReactiveList.js +128 -100
- package/dist/cjs/ResultCard.js +19 -26
- package/dist/cjs/ResultList.js +27 -31
- package/dist/cjs/SelectedFilters.js +34 -49
- package/dist/cjs/SingleDropdownList.js +66 -73
- package/dist/cjs/SingleList.js +96 -90
- package/dist/cjs/SingleRange.js +42 -48
- package/dist/cjs/StateProvider.js +2 -2
- package/dist/cjs/Tags-4ec43831.js +883 -0
- package/dist/cjs/Title-16042ea0.js +15 -0
- package/dist/cjs/ToggleButton.js +34 -39
- package/dist/cjs/{index-dc25b706.js → index-de136c17.js} +8 -6
- package/dist/cjs/index.js +27 -25
- package/dist/cjs/initReactivesearch.js +0 -3
- package/dist/cjs/install.js +23 -22
- package/dist/cjs/ssr-f2fc1bf6.js +36 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-621a8143.js → vueTypes-b7007f5f.js} +3 -2
- package/dist/es/Button-153cd885.js +53 -0
- package/dist/es/{CancelSvg-14ebc9a1.js → CancelSvg-e40552a5.js} +37 -30
- package/dist/es/{Card-1951569e.js → Card-19ad6d90.js} +6 -5
- package/dist/es/{ComponentWrapper-bf443c0b.js → ComponentWrapper-edaeaceb.js} +6 -6
- package/dist/es/Container-d00219f7.js +1 -1
- package/dist/es/DataSearch.js +1312 -18
- package/dist/es/{DropDown-35e232b7.js → DropDown-2c0dd714.js} +78 -78
- package/dist/es/DynamicRangeSlider.js +43 -53
- package/dist/es/Flex-7c177a10.js +45 -0
- package/dist/es/FormControlList-99797d0a.js +38 -0
- package/dist/es/Input-c09c0b56.js +69 -0
- package/dist/es/{ListItem-47a6345a.js → ListItem-07888a65.js} +7 -6
- package/dist/es/MultiDropdownList.js +66 -72
- package/dist/es/MultiList.js +93 -88
- package/dist/es/MultiRange.js +42 -52
- package/dist/es/{Pagination-145b4ff2.js → Pagination-edeb7dbe.js} +53 -56
- package/dist/es/{PreferencesConsumer-7ea7313a.js → PreferencesConsumer-86a676c8.js} +4 -5
- package/dist/es/RangeInput.js +103 -112
- package/dist/es/RangeSlider.js +36 -47
- package/dist/es/ReactiveBase.js +53 -68
- package/dist/es/ReactiveComponent.js +316 -45
- package/dist/es/{ReactiveComponent-e2fb9eb4.js → ReactiveComponentPrivate-6f16e1b7.js} +316 -614
- package/dist/es/ReactiveComponentPrivate.js +47 -0
- package/dist/es/ReactiveGoogleMap.js +434 -380
- package/dist/es/ReactiveList.js +125 -98
- package/dist/es/ResultCard.js +18 -25
- package/dist/es/ResultList.js +26 -30
- package/dist/es/SelectedFilters.js +32 -47
- package/dist/es/SingleDropdownList.js +64 -71
- package/dist/es/SingleList.js +94 -88
- package/dist/es/SingleRange.js +40 -46
- package/dist/es/StateProvider.js +2 -2
- package/dist/es/Tags-1c2d6c4d.js +869 -0
- package/dist/es/Title-863dfa42.js +1 -1
- package/dist/es/ToggleButton.js +32 -37
- package/dist/es/{index-285a43a6.js → index-5509c0bc.js} +8 -6
- package/dist/es/index.js +20 -19
- package/dist/es/initReactivesearch.js +0 -3
- package/dist/es/install.js +20 -19
- package/dist/es/ssr-03607d84.js +1 -1
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-e4af6fe2.js → vueTypes-66ebc93e.js} +3 -2
- package/package.json +87 -87
- package/dist/cjs/Button-626c5e8e.js +0 -58
- package/dist/cjs/Card-c381ded3.js +0 -26
- package/dist/cjs/Container-29f049b2.js +0 -12
- package/dist/cjs/DataSearch-7c71ec9f.js +0 -2043
- package/dist/cjs/Flex-d5675ea6.js +0 -48
- package/dist/cjs/FormControlList-cf1ff2ca.js +0 -42
- package/dist/cjs/Input-4d278ca0.js +0 -74
- package/dist/cjs/ListItem-c067bc07.js +0 -41
- package/dist/cjs/Title-8802a218.js +0 -12
- package/dist/cjs/ssr-eb901d09.js +0 -35
- package/dist/es/Button-ebafa3d6.js +0 -52
- package/dist/es/DataSearch-4f9a4e46.js +0 -2028
- package/dist/es/Flex-a08e22d7.js +0 -46
- package/dist/es/FormControlList-fa5cf78b.js +0 -38
- package/dist/es/Input-3b8408a6.js +0 -69
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
3
|
import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
-
import { createVNode, isVNode } from 'vue';
|
|
5
4
|
import VueTypes from 'vue-types';
|
|
6
|
-
import '@appbaseio/vue-emotion';
|
|
7
5
|
import 'emotion';
|
|
6
|
+
import '@appbaseio/vue-emotion';
|
|
8
7
|
import 'polished';
|
|
9
|
-
import { l as loadMoreContainer, B as Button } from './Button-
|
|
10
|
-
import { t as types } from './vueTypes-
|
|
8
|
+
import { l as loadMoreContainer, B as Button } from './Button-153cd885.js';
|
|
9
|
+
import { t as types } from './vueTypes-66ebc93e.js';
|
|
11
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
12
11
|
import 'redux';
|
|
13
|
-
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, q as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-
|
|
14
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
15
|
-
import { P as PreferencesConsumer } from './PreferencesConsumer-
|
|
12
|
+
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, q as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-5509c0bc.js';
|
|
13
|
+
import { C as ComponentWrapper } from './ComponentWrapper-edaeaceb.js';
|
|
14
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-86a676c8.js';
|
|
15
|
+
import '@vue/babel-helper-vue-jsx-merge-props';
|
|
16
16
|
import { T as Title } from './Title-863dfa42.js';
|
|
17
|
-
import './CancelSvg-
|
|
18
|
-
import './Input-
|
|
17
|
+
import './CancelSvg-e40552a5.js';
|
|
18
|
+
import './Input-c09c0b56.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-2c0dd714.js';
|
|
24
24
|
|
|
25
|
-
function _isSlot(s) {
|
|
26
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
27
|
-
}
|
|
28
25
|
var updateQuery = Actions.updateQuery,
|
|
29
26
|
setQueryOptions = Actions.setQueryOptions,
|
|
30
27
|
setCustomQuery = Actions.setCustomQuery,
|
|
@@ -83,7 +80,7 @@ var MultiDropdownList = {
|
|
|
83
80
|
showSearch: VueTypes.bool.def(false),
|
|
84
81
|
showClear: VueTypes.bool.def(false),
|
|
85
82
|
showLoadMore: VueTypes.bool.def(false),
|
|
86
|
-
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.
|
|
83
|
+
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
87
84
|
nestedField: types.string,
|
|
88
85
|
index: VueTypes.string,
|
|
89
86
|
searchPlaceholder: VueTypes.string.def('Type here to search...'),
|
|
@@ -185,25 +182,25 @@ var MultiDropdownList = {
|
|
|
185
182
|
}
|
|
186
183
|
},
|
|
187
184
|
render: function render() {
|
|
188
|
-
var
|
|
185
|
+
var h = arguments[0];
|
|
189
186
|
var _this$$props = this.$props,
|
|
190
187
|
showLoadMore = _this$$props.showLoadMore,
|
|
191
188
|
loadMoreLabel = _this$$props.loadMoreLabel,
|
|
192
189
|
renderItem = _this$$props.renderItem,
|
|
193
190
|
renderError = _this$$props.renderError,
|
|
194
191
|
renderLabel = _this$$props.renderLabel;
|
|
195
|
-
var renderItemCalc = this.$
|
|
196
|
-
var renderErrorCalc = this.$
|
|
197
|
-
var renderLabelCalc = this.$
|
|
192
|
+
var renderItemCalc = this.$scopedSlots.renderItem || renderItem;
|
|
193
|
+
var renderErrorCalc = this.$scopedSlots.renderError || renderError;
|
|
194
|
+
var renderLabelCalc = this.$scopedSlots.renderLabel || renderLabel;
|
|
198
195
|
var isLastBucket = this.$data.isLastBucket;
|
|
199
|
-
var renderNoResults = this.$
|
|
196
|
+
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
200
197
|
var selectAll = [];
|
|
201
198
|
if (renderErrorCalc && this.error) {
|
|
202
199
|
return isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
|
|
203
200
|
}
|
|
204
201
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
205
202
|
if (renderNoResults && isFunction(renderNoResults)) {
|
|
206
|
-
return
|
|
203
|
+
return h("div", [renderNoResults()]);
|
|
207
204
|
}
|
|
208
205
|
if (renderNoResults && !isFunction(renderNoResults)) {
|
|
209
206
|
return renderNoResults;
|
|
@@ -216,53 +213,47 @@ var MultiDropdownList = {
|
|
|
216
213
|
doc_count: this.totalDocumentCount
|
|
217
214
|
}];
|
|
218
215
|
}
|
|
219
|
-
return
|
|
216
|
+
return h(Container, {
|
|
220
217
|
"class": this.$props.className
|
|
221
|
-
}, {
|
|
222
|
-
"
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
"
|
|
250
|
-
"showClear": _this3.$props.showClear,
|
|
251
|
-
"searchPlaceholder": _this3.$props.searchPlaceholder,
|
|
252
|
-
"transformData": _this3.$props.transformData,
|
|
253
|
-
"footer": showLoadMore && !isLastBucket && createVNode("div", {
|
|
218
|
+
}, [this.$props.title && h(Title, {
|
|
219
|
+
"class": getClassName(this.$props.innerClass, 'title') || ''
|
|
220
|
+
}, [this.$props.title]), h(Dropdown, {
|
|
221
|
+
"attrs": {
|
|
222
|
+
"innerClass": this.$props.innerClass,
|
|
223
|
+
"items": [].concat(selectAll, this.$data.modifiedOptions.filter(function (item) {
|
|
224
|
+
return String(item.key).trim().length;
|
|
225
|
+
}).map(function (item) {
|
|
226
|
+
return _extends({}, item, {
|
|
227
|
+
key: String(item.key)
|
|
228
|
+
});
|
|
229
|
+
})),
|
|
230
|
+
"hasCustomRenderer": this.hasCustomRenderer,
|
|
231
|
+
"customRenderer": this.getComponent,
|
|
232
|
+
"handleChange": this.handleChange,
|
|
233
|
+
"selectedItem": this.$data.currentValue,
|
|
234
|
+
"placeholder": this.$props.placeholder,
|
|
235
|
+
"labelField": "key",
|
|
236
|
+
"multi": true,
|
|
237
|
+
"showCount": this.$props.showCount,
|
|
238
|
+
"themePreset": this.themePreset,
|
|
239
|
+
"renderItem": renderItemCalc,
|
|
240
|
+
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
241
|
+
"showSearch": this.$props.showSearch,
|
|
242
|
+
"showClear": this.$props.showClear,
|
|
243
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
244
|
+
"transformData": this.$props.transformData,
|
|
245
|
+
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
246
|
+
"attrs": {
|
|
254
247
|
"css": loadMoreContainer
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
"
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
"customLabelRenderer": renderLabelCalc
|
|
263
|
-
}, null)];
|
|
248
|
+
}
|
|
249
|
+
}, [h(Button, {
|
|
250
|
+
"on": {
|
|
251
|
+
"click": this.handleLoadMore
|
|
252
|
+
}
|
|
253
|
+
}, [loadMoreLabel])]),
|
|
254
|
+
"customLabelRenderer": renderLabelCalc
|
|
264
255
|
}
|
|
265
|
-
});
|
|
256
|
+
})]);
|
|
266
257
|
},
|
|
267
258
|
methods: {
|
|
268
259
|
handleChange: function handleChange(item) {
|
|
@@ -275,7 +266,7 @@ var MultiDropdownList = {
|
|
|
275
266
|
}
|
|
276
267
|
},
|
|
277
268
|
setValue: function setValue(value, isDefaultValue, props) {
|
|
278
|
-
var
|
|
269
|
+
var _this3 = this;
|
|
279
270
|
if (isDefaultValue === void 0) {
|
|
280
271
|
isDefaultValue = false;
|
|
281
272
|
}
|
|
@@ -328,10 +319,10 @@ var MultiDropdownList = {
|
|
|
328
319
|
finalValues = Object.keys(currentValue);
|
|
329
320
|
}
|
|
330
321
|
var performUpdate = function performUpdate() {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
322
|
+
_this3.currentValue = _extends({}, currentValue);
|
|
323
|
+
_this3.updateQueryHandler(finalValues, props);
|
|
324
|
+
_this3.$emit('valueChange', finalValues);
|
|
325
|
+
_this3.$emit('value-change', finalValues);
|
|
335
326
|
};
|
|
336
327
|
checkValueChange(props.componentId, finalValues, props.beforeValueChange, performUpdate);
|
|
337
328
|
},
|
|
@@ -539,12 +530,15 @@ var ListConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps
|
|
|
539
530
|
internalComponent: MultiDropdownList.hasInternalComponent()
|
|
540
531
|
}));
|
|
541
532
|
ListConnected.name = MultiDropdownList.name;
|
|
542
|
-
ListConnected.install = function (Vue) {
|
|
543
|
-
Vue.component(ListConnected.name, ListConnected);
|
|
544
|
-
};
|
|
545
533
|
|
|
546
534
|
// Add componentType for SSR
|
|
547
535
|
ListConnected.componentType = componentTypes.multiDropdownList;
|
|
536
|
+
ListConnected.defaultQuery = MultiDropdownList.defaultQuery;
|
|
537
|
+
ListConnected.generateQueryOptions = MultiDropdownList.generateQueryOptions;
|
|
538
|
+
ListConnected.hasInternalComponent = MultiDropdownList.hasInternalComponent;
|
|
539
|
+
ListConnected.install = function (Vue) {
|
|
540
|
+
Vue.component(ListConnected.name, ListConnected);
|
|
541
|
+
};
|
|
548
542
|
|
|
549
543
|
export default ListConnected;
|
|
550
544
|
export { ListConnected };
|
package/dist/es/MultiList.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
|
-
import {
|
|
4
|
-
import { createVNode, mergeProps, createTextVNode } from 'vue';
|
|
3
|
+
import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
5
4
|
import VueTypes from 'vue-types';
|
|
6
|
-
import '@appbaseio/vue-emotion';
|
|
7
5
|
import 'emotion';
|
|
6
|
+
import '@appbaseio/vue-emotion';
|
|
8
7
|
import 'polished';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
8
|
+
import { t as types } from './vueTypes-66ebc93e.js';
|
|
10
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
10
|
import 'redux';
|
|
12
|
-
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, o as isEvent, q as parseValueArray, 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-
|
|
11
|
+
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, o as isEvent, q as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-5509c0bc.js';
|
|
12
|
+
import { C as ComponentWrapper } from './ComponentWrapper-edaeaceb.js';
|
|
13
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-86a676c8.js';
|
|
15
14
|
import { T as Title } from './Title-863dfa42.js';
|
|
16
|
-
import { I as Input } from './Input-
|
|
15
|
+
import { I as Input } from './Input-c09c0b56.js';
|
|
17
16
|
import { C as Container } from './Container-d00219f7.js';
|
|
18
17
|
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
19
|
-
import { U as UL, C as Checkbox } from './FormControlList-
|
|
18
|
+
import { U as UL, C as Checkbox } from './FormControlList-99797d0a.js';
|
|
20
19
|
import { g as getAggsQuery } from './utils-9e5a16a1.js';
|
|
21
20
|
|
|
22
21
|
var updateQuery = Actions.updateQuery,
|
|
@@ -154,17 +153,18 @@ var MultiList = {
|
|
|
154
153
|
},
|
|
155
154
|
render: function render() {
|
|
156
155
|
var _this2 = this;
|
|
156
|
+
var h = arguments[0];
|
|
157
157
|
var _this$$props = this.$props,
|
|
158
158
|
selectAllLabel = _this$$props.selectAllLabel,
|
|
159
159
|
renderItem = _this$$props.renderItem,
|
|
160
160
|
renderError = _this$$props.renderError;
|
|
161
|
-
var renderItemCalc = this.$
|
|
162
|
-
var renderErrorCalc = this.$
|
|
161
|
+
var renderItemCalc = this.$scopedSlots.renderItem || renderItem;
|
|
162
|
+
var renderErrorCalc = this.$scopedSlots.renderError || renderError;
|
|
163
163
|
if (renderErrorCalc && this.error) {
|
|
164
164
|
return isFunction(renderErrorCalc) ? renderErrorCalc(this.error) : renderErrorCalc;
|
|
165
165
|
}
|
|
166
166
|
if (!this.hasCustomRenderer && this.modifiedOptions.length === 0 && !this.isLoading) {
|
|
167
|
-
if (this.
|
|
167
|
+
if (this.renderNoResults) {
|
|
168
168
|
this.renderNoResult();
|
|
169
169
|
} else {
|
|
170
170
|
return null;
|
|
@@ -183,72 +183,69 @@ var MultiList = {
|
|
|
183
183
|
}
|
|
184
184
|
return false;
|
|
185
185
|
});
|
|
186
|
-
return
|
|
186
|
+
return h(Container, {
|
|
187
187
|
"class": this.$props.className
|
|
188
|
-
}, {
|
|
189
|
-
"
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}, {
|
|
215
|
-
"show": _this2.$props.showCheckbox
|
|
216
|
-
}), null), createVNode("label", {
|
|
217
|
-
"class": getClassName(_this2.$props.innerClass, 'label'),
|
|
218
|
-
"for": _this2.$props.componentId + "-" + selectAllLabel
|
|
219
|
-
}, [createVNode("span", null, [selectAllLabel, _this2.$props.showCount && createVNode("span", {
|
|
220
|
-
"class": getClassName(_this2.$props.innerClass, 'count')
|
|
221
|
-
}, [createTextVNode("\xA0("), _this2.totalDocumentCount, createTextVNode(")")])])])]) : null, !_this2.hasCustomRenderer && filteredItemsToRender.length === 0 && !_this2.isLoading ? _this2.renderNoResult() : filteredItemsToRender.map(function (item) {
|
|
222
|
-
return createVNode("li", {
|
|
223
|
-
"key": item.key,
|
|
224
|
-
"class": "" + (_this2.$data.currentValue[item.key] ? 'active' : '')
|
|
225
|
-
}, [createVNode(Checkbox, mergeProps({
|
|
226
|
-
"type": "checkbox",
|
|
227
|
-
"class": getClassName(_this2.$props.innerClass, 'checkbox'),
|
|
228
|
-
"id": _this2.$props.componentId + "-" + item.key,
|
|
229
|
-
"name": _this2.$props.componentId,
|
|
230
|
-
"value": item.key,
|
|
231
|
-
"onClick": _this2.handleClick,
|
|
232
|
-
"show": _this2.$props.showCheckbox
|
|
233
|
-
}, {
|
|
234
|
-
domProps: {
|
|
235
|
-
checked: !!_this2.$data.currentValue[item.key]
|
|
236
|
-
}
|
|
237
|
-
}), null), createVNode("label", {
|
|
238
|
-
"class": getClassName(_this2.$props.innerClass, 'label'),
|
|
239
|
-
"for": _this2.$props.componentId + "-" + item.key
|
|
240
|
-
}, [renderItemCalc ? renderItemCalc({
|
|
241
|
-
label: item.key,
|
|
242
|
-
count: item.doc_count,
|
|
243
|
-
isChecked: !!_this2.$data.currentValue[item.key]
|
|
244
|
-
}) : createVNode("span", null, [item.key, _this2.$props.showCount && createVNode("span", {
|
|
245
|
-
"class": getClassName(_this2.$props.innerClass, 'count')
|
|
246
|
-
}, [createTextVNode("\xA0("), item.doc_count, createTextVNode(")")])])])]);
|
|
247
|
-
})];
|
|
248
|
-
}
|
|
249
|
-
})];
|
|
188
|
+
}, [this.$props.title && h(Title, {
|
|
189
|
+
"class": getClassName(this.$props.innerClass, 'title')
|
|
190
|
+
}, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
|
|
191
|
+
"class": getClassName(this.$props.innerClass, 'list')
|
|
192
|
+
}, [selectAllLabel ? h("li", {
|
|
193
|
+
"key": selectAllLabel,
|
|
194
|
+
"class": "" + (this.currentValue[selectAllLabel] ? 'active' : '')
|
|
195
|
+
}, [h(Checkbox, {
|
|
196
|
+
"attrs": {
|
|
197
|
+
"type": "checkbox",
|
|
198
|
+
"id": this.$props.componentId + "-" + selectAllLabel,
|
|
199
|
+
"name": selectAllLabel,
|
|
200
|
+
"value": selectAllLabel,
|
|
201
|
+
"show": this.$props.showCheckbox
|
|
202
|
+
},
|
|
203
|
+
"class": getClassName(this.$props.innerClass, 'checkbox'),
|
|
204
|
+
"on": {
|
|
205
|
+
"click": this.handleClick
|
|
206
|
+
},
|
|
207
|
+
"domProps": _extends({}, {
|
|
208
|
+
checked: !!this.currentValue[selectAllLabel]
|
|
209
|
+
})
|
|
210
|
+
}), h("label", {
|
|
211
|
+
"class": getClassName(this.$props.innerClass, 'label'),
|
|
212
|
+
"attrs": {
|
|
213
|
+
"for": this.$props.componentId + "-" + selectAllLabel
|
|
250
214
|
}
|
|
251
|
-
}
|
|
215
|
+
}, [h("span", [selectAllLabel, this.$props.showCount && h("span", {
|
|
216
|
+
"class": getClassName(this.$props.innerClass, 'count')
|
|
217
|
+
}, ["\xA0(", this.totalDocumentCount, ")"])])])]) : null, !this.hasCustomRenderer && filteredItemsToRender.length === 0 && !this.isLoading ? this.renderNoResult() : filteredItemsToRender.map(function (item) {
|
|
218
|
+
return h("li", {
|
|
219
|
+
"key": item.key,
|
|
220
|
+
"class": "" + (_this2.$data.currentValue[item.key] ? 'active' : '')
|
|
221
|
+
}, [h(Checkbox, {
|
|
222
|
+
"attrs": {
|
|
223
|
+
"type": "checkbox",
|
|
224
|
+
"id": _this2.$props.componentId + "-" + item.key,
|
|
225
|
+
"name": _this2.$props.componentId,
|
|
226
|
+
"value": item.key,
|
|
227
|
+
"show": _this2.$props.showCheckbox
|
|
228
|
+
},
|
|
229
|
+
"class": getClassName(_this2.$props.innerClass, 'checkbox'),
|
|
230
|
+
"on": {
|
|
231
|
+
"click": _this2.handleClick
|
|
232
|
+
},
|
|
233
|
+
"domProps": _extends({}, {
|
|
234
|
+
checked: !!_this2.$data.currentValue[item.key]
|
|
235
|
+
})
|
|
236
|
+
}), h("label", {
|
|
237
|
+
"class": getClassName(_this2.$props.innerClass, 'label'),
|
|
238
|
+
"attrs": {
|
|
239
|
+
"for": _this2.$props.componentId + "-" + item.key
|
|
240
|
+
}
|
|
241
|
+
}, [renderItemCalc ? renderItemCalc({
|
|
242
|
+
label: item.key,
|
|
243
|
+
count: item.doc_count,
|
|
244
|
+
isChecked: !!_this2.$data.currentValue[item.key]
|
|
245
|
+
}) : h("span", [item.key, _this2.$props.showCount && h("span", {
|
|
246
|
+
"class": getClassName(_this2.$props.innerClass, 'count')
|
|
247
|
+
}, ["\xA0(", item.doc_count, ")"])])])]);
|
|
248
|
+
})])]);
|
|
252
249
|
},
|
|
253
250
|
methods: {
|
|
254
251
|
setValue: function setValue(value, isDefaultValue, props) {
|
|
@@ -376,17 +373,22 @@ var MultiList = {
|
|
|
376
373
|
this.searchTerm = value;
|
|
377
374
|
},
|
|
378
375
|
renderSearch: function renderSearch() {
|
|
376
|
+
var h = this.$createElement;
|
|
379
377
|
if (this.$props.showSearch) {
|
|
380
|
-
return
|
|
378
|
+
return h(Input, {
|
|
381
379
|
"class": getClassName(this.$props.innerClass, 'input') || '',
|
|
382
|
-
"
|
|
383
|
-
|
|
384
|
-
|
|
380
|
+
"on": {
|
|
381
|
+
"input": this.handleInputChange
|
|
382
|
+
},
|
|
383
|
+
"attrs": {
|
|
384
|
+
"value": this.$data.searchTerm,
|
|
385
|
+
"placeholder": this.$props.placeholder,
|
|
386
|
+
"themePreset": this.$props.themePreset
|
|
387
|
+
},
|
|
385
388
|
"style": {
|
|
386
389
|
margin: '0 0 8px'
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
}, null);
|
|
390
|
+
}
|
|
391
|
+
});
|
|
390
392
|
}
|
|
391
393
|
return null;
|
|
392
394
|
},
|
|
@@ -423,8 +425,9 @@ var MultiList = {
|
|
|
423
425
|
return getComponent(data, this);
|
|
424
426
|
},
|
|
425
427
|
renderNoResult: function renderNoResult() {
|
|
426
|
-
var
|
|
427
|
-
|
|
428
|
+
var h = this.$createElement;
|
|
429
|
+
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
430
|
+
return h("p", {
|
|
428
431
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
429
432
|
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
430
433
|
}
|
|
@@ -543,12 +546,14 @@ var ListConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProps
|
|
|
543
546
|
internalComponent: MultiList.hasInternalComponent()
|
|
544
547
|
}));
|
|
545
548
|
ListConnected.name = MultiList.name;
|
|
549
|
+
ListConnected.defaultQuery = MultiList.defaultQuery;
|
|
550
|
+
ListConnected.generateQueryOptions = MultiList.generateQueryOptions;
|
|
551
|
+
ListConnected.hasInternalComponent = MultiList.hasInternalComponent;
|
|
552
|
+
// Add componentType for SSR
|
|
553
|
+
ListConnected.componentType = componentTypes.multiList;
|
|
546
554
|
ListConnected.install = function (Vue) {
|
|
547
555
|
Vue.component(ListConnected.name, ListConnected);
|
|
548
556
|
};
|
|
549
557
|
|
|
550
|
-
// Add componentType for SSR
|
|
551
|
-
ListConnected.componentType = componentTypes.multiList;
|
|
552
|
-
|
|
553
558
|
export default ListConnected;
|
|
554
559
|
export { ListConnected };
|
package/dist/es/MultiRange.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
3
3
|
import { a as _extends, b as _objectWithoutPropertiesLoose, c as _toPropertyKey } from './_rollupPluginBabelHelpers-ded08042.js';
|
|
4
|
-
import { createVNode, mergeProps, isVNode } from 'vue';
|
|
5
4
|
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-66ebc93e.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
11
|
-
import { q as parseValueArray, 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 { q as parseValueArray, f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-5509c0bc.js';
|
|
12
|
+
import { C as ComponentWrapper } from './ComponentWrapper-edaeaceb.js';
|
|
13
|
+
import { P as PreferencesConsumer } from './PreferencesConsumer-86a676c8.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, C as Checkbox } from './FormControlList-
|
|
16
|
+
import { U as UL, C as Checkbox } from './FormControlList-99797d0a.js';
|
|
17
17
|
|
|
18
|
-
function _isSlot(s) {
|
|
19
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
20
|
-
}
|
|
21
18
|
var updateQuery = Actions.updateQuery,
|
|
22
19
|
setQueryOptions = Actions.setQueryOptions,
|
|
23
20
|
setCustomQuery = Actions.setCustomQuery;
|
|
@@ -185,51 +182,41 @@ var MultiRange = {
|
|
|
185
182
|
}
|
|
186
183
|
},
|
|
187
184
|
render: function render() {
|
|
188
|
-
var _slot;
|
|
189
185
|
var _this2 = this;
|
|
190
|
-
|
|
186
|
+
var h = arguments[0];
|
|
187
|
+
return h(Container, {
|
|
191
188
|
"class": this.$props.className
|
|
192
|
-
}, {
|
|
193
|
-
"
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
"class": getClassName(_this2.$props.innerClass, 'label'),
|
|
224
|
-
"for": _this2.$props.componentId + "-" + item.label
|
|
225
|
-
}, [item.label])]);
|
|
226
|
-
})) ? _slot : {
|
|
227
|
-
"default": function _default() {
|
|
228
|
-
return [_slot];
|
|
229
|
-
}
|
|
230
|
-
})];
|
|
231
|
-
}
|
|
232
|
-
});
|
|
189
|
+
}, [this.$props.title && h(Title, {
|
|
190
|
+
"class": getClassName(this.$props.innerClass, 'title')
|
|
191
|
+
}, [this.$props.title]), h(UL, {
|
|
192
|
+
"class": getClassName(this.$props.innerClass, 'list')
|
|
193
|
+
}, [this.$props.data.map(function (item) {
|
|
194
|
+
var selected = !!_this2.$data.currentValue && _this2.$data.currentValue.label === item.label;
|
|
195
|
+
return h("li", {
|
|
196
|
+
"key": item.label,
|
|
197
|
+
"class": "" + (selected ? 'active' : '')
|
|
198
|
+
}, [h(Checkbox, {
|
|
199
|
+
"class": getClassName(_this2.$props.innerClass, 'checkbox'),
|
|
200
|
+
"attrs": {
|
|
201
|
+
"id": _this2.$props.componentId + "-" + item.label,
|
|
202
|
+
"name": _this2.$props.componentId,
|
|
203
|
+
"value": item.label,
|
|
204
|
+
"type": "Checkbox",
|
|
205
|
+
"show": _this2.$props.showCheckbox
|
|
206
|
+
},
|
|
207
|
+
"domProps": _extends({}, {
|
|
208
|
+
checked: _this2.selectedValues[item.label]
|
|
209
|
+
}),
|
|
210
|
+
"on": _extends({}, {
|
|
211
|
+
click: _this2.handleClick
|
|
212
|
+
})
|
|
213
|
+
}), h("label", {
|
|
214
|
+
"class": getClassName(_this2.$props.innerClass, 'label'),
|
|
215
|
+
"attrs": {
|
|
216
|
+
"for": _this2.$props.componentId + "-" + item.label
|
|
217
|
+
}
|
|
218
|
+
}, [item.label])]);
|
|
219
|
+
})])]);
|
|
233
220
|
}
|
|
234
221
|
};
|
|
235
222
|
MultiRange.parseValue = function (value, props) {
|
|
@@ -291,6 +278,9 @@ var RangeConnected = PreferencesConsumer(ComponentWrapper(connect(mapStateToProp
|
|
|
291
278
|
componentType: componentTypes.multiRange
|
|
292
279
|
}));
|
|
293
280
|
RangeConnected.name = MultiRange.name;
|
|
281
|
+
RangeConnected.defaultQuery = MultiRange.defaultQuery;
|
|
282
|
+
RangeConnected.parseValue = MultiRange.parseValue;
|
|
283
|
+
RangeConnected.hasInternalComponent = MultiRange.hasInternalComponent;
|
|
294
284
|
RangeConnected.install = function (Vue) {
|
|
295
285
|
Vue.component(RangeConnected.name, RangeConnected);
|
|
296
286
|
};
|