@appbaseio/reactivesearch-vue 1.16.0-alpha.25 → 1.16.0-alpha.29
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 +562 -194
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{DownShift-d41f2442.js → CancelSvg-b14dd012.js} +57 -0
- package/dist/cjs/DataSearch.js +29 -80
- package/dist/cjs/{DropDown-d3c78c41.js → DropDown-dc042720.js} +60 -23
- package/dist/cjs/DynamicRangeSlider.js +1 -1
- package/dist/cjs/MultiDropdownList.js +12 -5
- package/dist/cjs/MultiList.js +4 -3
- package/dist/cjs/MultiRange.js +1 -1
- package/dist/cjs/{Pagination-d4dbfd5a.js → Pagination-0b9ec0fc.js} +1 -1
- package/dist/cjs/RangeInput.js +1 -1
- package/dist/cjs/RangeSlider.js +1 -1
- package/dist/cjs/ReactiveBase.js +17 -9
- package/dist/cjs/ReactiveComponent.js +12 -12
- package/dist/cjs/ReactiveGoogleMap.js +2 -2
- package/dist/cjs/ReactiveList.js +55 -43
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/SelectedFilters.js +1 -1
- package/dist/cjs/SingleDropdownList.js +12 -5
- package/dist/cjs/SingleList.js +5 -4
- package/dist/cjs/SingleRange.js +1 -1
- package/dist/cjs/StateProvider.js +6 -2
- package/dist/cjs/ToggleButton.js +2 -2
- package/dist/cjs/index.js +7 -4
- package/dist/cjs/initReactivesearch.js +31 -12
- package/dist/cjs/install.js +5 -4
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-409348b0.js → vueTypes-829a5f2c.js} +5 -1
- package/dist/es/{DownShift-e7ccf2a7.js → CancelSvg-282ae799.js} +54 -2
- package/dist/es/DataSearch.js +19 -70
- package/dist/es/{DropDown-8894cc22.js → DropDown-d9686568.js} +59 -22
- package/dist/es/DynamicRangeSlider.js +1 -1
- package/dist/es/MultiDropdownList.js +12 -5
- package/dist/es/MultiList.js +4 -3
- package/dist/es/MultiRange.js +1 -1
- package/dist/es/{Pagination-a2ab7fcb.js → Pagination-e8216949.js} +1 -1
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/RangeSlider.js +1 -1
- package/dist/es/ReactiveBase.js +17 -9
- package/dist/es/ReactiveComponent.js +12 -12
- package/dist/es/ReactiveGoogleMap.js +2 -2
- package/dist/es/ReactiveList.js +55 -43
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/SelectedFilters.js +1 -1
- package/dist/es/SingleDropdownList.js +12 -5
- package/dist/es/SingleList.js +5 -4
- package/dist/es/SingleRange.js +1 -1
- package/dist/es/StateProvider.js +6 -2
- package/dist/es/ToggleButton.js +2 -2
- package/dist/es/index.js +7 -4
- package/dist/es/initReactivesearch.js +31 -12
- package/dist/es/install.js +5 -4
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-a9b9d5c9.js → vueTypes-98819a12.js} +5 -1
- package/package.json +3 -3
package/dist/es/MultiList.js
CHANGED
|
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
|
5
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-98819a12.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
11
11
|
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, n as isEvent, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-4755c9a0.js';
|
|
@@ -13,6 +13,7 @@ import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
|
|
|
13
13
|
import { T as Title } from './Title-579f8d6c.js';
|
|
14
14
|
import { I as Input } from './Input-d8519224.js';
|
|
15
15
|
import { C as Container } from './Container-4383c6f0.js';
|
|
16
|
+
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
16
17
|
import { U as UL, C as Checkbox } from './FormControlList-fe389a2e.js';
|
|
17
18
|
import { g as getAggsQuery } from './utils-3a32e13f.js';
|
|
18
19
|
|
|
@@ -33,7 +34,7 @@ var MultiList = {
|
|
|
33
34
|
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
34
35
|
showCheckbox: VueTypes.bool.def(true),
|
|
35
36
|
beforeValueChange: types.func,
|
|
36
|
-
className:
|
|
37
|
+
className: VueTypes.string.def(''),
|
|
37
38
|
componentId: types.stringRequired,
|
|
38
39
|
customQuery: types.func,
|
|
39
40
|
dataField: types.stringRequired,
|
|
@@ -180,7 +181,7 @@ var MultiList = {
|
|
|
180
181
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
181
182
|
if (String(item.key).length) {
|
|
182
183
|
if (_this2.$props.showSearch && _this2.$data.searchTerm) {
|
|
183
|
-
return String(item.key).toLowerCase().includes(_this2.$data.searchTerm.toLowerCase());
|
|
184
|
+
return replaceDiacritics(String(item.key)).toLowerCase().includes(replaceDiacritics(_this2.$data.searchTerm).toLowerCase());
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
return true;
|
package/dist/es/MultiRange.js
CHANGED
|
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
|
5
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-98819a12.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
11
11
|
import { o as parseValueArray, f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { helper } from '@appbaseio/reactivecore';
|
|
2
2
|
import VueTypes from 'vue-types';
|
|
3
3
|
import { p as pagination, B as Button } from './Button-799185e2.js';
|
|
4
|
-
import { t as types } from './vueTypes-
|
|
4
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
5
5
|
|
|
6
6
|
var getClassName = helper.getClassName,
|
|
7
7
|
handleA11yAction = helper.handleA11yAction;
|
package/dist/es/RangeInput.js
CHANGED
|
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
|
5
5
|
import { css } from 'emotion';
|
|
6
6
|
import styled from '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
|
-
import { t as types } from './vueTypes-
|
|
8
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
11
11
|
import { c as connect } from './index-4755c9a0.js';
|
package/dist/es/RangeSlider.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
|
3
3
|
import VueTypes from 'vue-types';
|
|
4
4
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
5
|
import '@appbaseio/vue-emotion';
|
|
6
|
-
import { t as types } from './vueTypes-
|
|
6
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
7
7
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
8
8
|
import 'redux';
|
|
9
9
|
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
|
package/dist/es/ReactiveBase.js
CHANGED
|
@@ -4,7 +4,7 @@ import VueTypes from 'vue-types';
|
|
|
4
4
|
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
5
|
import { isEqual as isEqual$1 } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
6
6
|
import styled from '@appbaseio/vue-emotion';
|
|
7
|
-
import { t as types } from './vueTypes-
|
|
7
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
8
8
|
import 'redux';
|
|
9
9
|
import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-4755c9a0.js';
|
|
10
10
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
@@ -77,7 +77,7 @@ var URLParamsProvider = {
|
|
|
77
77
|
headers: types.headers,
|
|
78
78
|
getSearchParams: types.func,
|
|
79
79
|
setSearchParams: types.func,
|
|
80
|
-
as:
|
|
80
|
+
as: VueTypes.string.def('div')
|
|
81
81
|
},
|
|
82
82
|
mounted: function mounted() {
|
|
83
83
|
var _this = this;
|
|
@@ -225,7 +225,9 @@ var URLParamsProvider = {
|
|
|
225
225
|
return value.map(function (item) {
|
|
226
226
|
return _this3.getValue(item);
|
|
227
227
|
});
|
|
228
|
-
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (value && typeof value === 'object') {
|
|
229
231
|
// TODO: support for NestedList
|
|
230
232
|
if (value.location) return value;
|
|
231
233
|
if (value.category) return value;
|
|
@@ -350,7 +352,7 @@ var ReactiveBase = {
|
|
|
350
352
|
}
|
|
351
353
|
},
|
|
352
354
|
props: {
|
|
353
|
-
app: types.
|
|
355
|
+
app: types.string,
|
|
354
356
|
analytics: VueTypes.bool,
|
|
355
357
|
analyticsConfig: types.analyticsConfig,
|
|
356
358
|
appbaseConfig: types.appbaseConfig,
|
|
@@ -370,7 +372,8 @@ var ReactiveBase = {
|
|
|
370
372
|
transformResponse: types.func,
|
|
371
373
|
as: VueTypes.string.def('div'),
|
|
372
374
|
getSearchParams: types.func,
|
|
373
|
-
setSearchParams: types.func
|
|
375
|
+
setSearchParams: types.func,
|
|
376
|
+
mongodb: types.mongodb
|
|
374
377
|
},
|
|
375
378
|
provide: function provide() {
|
|
376
379
|
return {
|
|
@@ -410,6 +413,9 @@ var ReactiveBase = {
|
|
|
410
413
|
this.store.dispatch(updateAnalyticsConfig(newVal));
|
|
411
414
|
}
|
|
412
415
|
}
|
|
416
|
+
},
|
|
417
|
+
mongodb: function mongodb() {
|
|
418
|
+
this.updateState(this.$props);
|
|
413
419
|
}
|
|
414
420
|
},
|
|
415
421
|
computed: {
|
|
@@ -417,12 +423,13 @@ var ReactiveBase = {
|
|
|
417
423
|
var _this$$props = this.$props,
|
|
418
424
|
enableAppbase = _this$$props.enableAppbase,
|
|
419
425
|
headers = _this$$props.headers,
|
|
420
|
-
appbaseConfig = _this$$props.appbaseConfig
|
|
426
|
+
appbaseConfig = _this$$props.appbaseConfig,
|
|
427
|
+
mongodb = _this$$props.mongodb;
|
|
421
428
|
|
|
422
429
|
var _ref = appbaseConfig || {},
|
|
423
430
|
enableTelemetry = _ref.enableTelemetry;
|
|
424
431
|
|
|
425
|
-
return _extends({}, enableAppbase && _extends({
|
|
432
|
+
return _extends({}, enableAppbase && !mongodb && _extends({
|
|
426
433
|
'X-Search-Client': X_SEARCH_CLIENT
|
|
427
434
|
}, enableTelemetry === false && {
|
|
428
435
|
'X-Enable-Telemetry': false
|
|
@@ -440,7 +447,7 @@ var ReactiveBase = {
|
|
|
440
447
|
var appbaseConfig = _extends({}, props.analyticsConfig, props.appbaseConfig);
|
|
441
448
|
|
|
442
449
|
var config = {
|
|
443
|
-
url: props.url && props.url.trim() !== '' ? props.url : '
|
|
450
|
+
url: props.url && props.url.trim() !== '' ? props.url : '',
|
|
444
451
|
app: props.app,
|
|
445
452
|
credentials: credentials,
|
|
446
453
|
type: props.type ? props.type : '*',
|
|
@@ -448,7 +455,8 @@ var ReactiveBase = {
|
|
|
448
455
|
transformResponse: props.transformResponse,
|
|
449
456
|
enableAppbase: props.enableAppbase,
|
|
450
457
|
analytics: props.appbaseConfig ? props.appbaseConfig.recordAnalytics : props.analytics,
|
|
451
|
-
analyticsConfig: appbaseConfig
|
|
458
|
+
analyticsConfig: appbaseConfig,
|
|
459
|
+
mongodb: props.mongodb
|
|
452
460
|
};
|
|
453
461
|
var queryParams = '';
|
|
454
462
|
|
|
@@ -2,7 +2,7 @@ import { Actions, helper } from '@appbaseio/reactivecore';
|
|
|
2
2
|
import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
|
|
3
3
|
import VueTypes from 'vue-types';
|
|
4
4
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
|
-
import { t as types } from './vueTypes-
|
|
5
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
6
6
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
7
7
|
import 'redux';
|
|
8
8
|
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
|
|
@@ -45,7 +45,7 @@ var ReactiveComponent = {
|
|
|
45
45
|
this.internalComponent = null;
|
|
46
46
|
this.$defaultQuery = null; // Set custom query in store
|
|
47
47
|
|
|
48
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props,
|
|
48
|
+
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
49
49
|
var customQuery = props.customQuery,
|
|
50
50
|
componentId = props.componentId,
|
|
51
51
|
filterLabel = props.filterLabel,
|
|
@@ -68,7 +68,7 @@ var ReactiveComponent = {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
if (customQuery) {
|
|
71
|
-
var calcCustomQuery = customQuery(props);
|
|
71
|
+
var calcCustomQuery = customQuery(this.selectedValue, props);
|
|
72
72
|
|
|
73
73
|
var _ref = calcCustomQuery || {},
|
|
74
74
|
query = _ref.query;
|
|
@@ -87,7 +87,7 @@ var ReactiveComponent = {
|
|
|
87
87
|
|
|
88
88
|
this.updateQuery({
|
|
89
89
|
componentId: componentId,
|
|
90
|
-
|
|
90
|
+
query: queryToSet,
|
|
91
91
|
value: this.selectedValue || null,
|
|
92
92
|
label: filterLabel,
|
|
93
93
|
showFilter: showFilter,
|
|
@@ -138,8 +138,8 @@ var ReactiveComponent = {
|
|
|
138
138
|
},
|
|
139
139
|
beforeMount: function beforeMount() {
|
|
140
140
|
if (this.internalComponent && this.$props.defaultQuery) {
|
|
141
|
-
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props,
|
|
142
|
-
this.$defaultQuery = this.$props.defaultQuery();
|
|
141
|
+
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
142
|
+
this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
|
|
143
143
|
|
|
144
144
|
var _ref3 = this.$defaultQuery || {},
|
|
145
145
|
query = _ref3.query,
|
|
@@ -203,8 +203,8 @@ var ReactiveComponent = {
|
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
206
|
-
if (newVal && !isQueryIdentical(newVal, oldVal,
|
|
207
|
-
this.$defaultQuery = newVal();
|
|
206
|
+
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
207
|
+
this.$defaultQuery = newVal(this.selectedValue, this.$props);
|
|
208
208
|
|
|
209
209
|
var _ref4 = this.$defaultQuery || {},
|
|
210
210
|
query = _ref4.query,
|
|
@@ -215,7 +215,7 @@ var ReactiveComponent = {
|
|
|
215
215
|
} else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false); // Update default query for RS API
|
|
216
216
|
|
|
217
217
|
|
|
218
|
-
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props,
|
|
218
|
+
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
219
219
|
var queryToSet = query || null;
|
|
220
220
|
|
|
221
221
|
if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
|
|
@@ -229,9 +229,9 @@ var ReactiveComponent = {
|
|
|
229
229
|
}
|
|
230
230
|
},
|
|
231
231
|
customQuery: function customQuery(newVal, oldVal) {
|
|
232
|
-
if (newVal && !isQueryIdentical(newVal, oldVal,
|
|
232
|
+
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
233
233
|
var componentId = this.$props.componentId;
|
|
234
|
-
this.$customQuery = newVal(this.$props);
|
|
234
|
+
this.$customQuery = newVal(this.selectedValue, this.$props);
|
|
235
235
|
|
|
236
236
|
var _ref5 = this.$customQuery || {},
|
|
237
237
|
query = _ref5.query,
|
|
@@ -242,7 +242,7 @@ var ReactiveComponent = {
|
|
|
242
242
|
} else this.setQueryOptions(componentId, this.getAggsQuery(), false); // Update custom query for RS API
|
|
243
243
|
|
|
244
244
|
|
|
245
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props,
|
|
245
|
+
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
246
246
|
var queryToSet = query || null;
|
|
247
247
|
|
|
248
248
|
if (this.$customQuery && this.$customQuery.id) {
|
|
@@ -6,8 +6,8 @@ import 'emotion';
|
|
|
6
6
|
import styled, { css } from '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import './Button-799185e2.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
10
|
-
import { P as Pagination } from './Pagination-
|
|
9
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
10
|
+
import { P as Pagination } from './Pagination-e8216949.js';
|
|
11
11
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
12
12
|
import 'redux';
|
|
13
13
|
import { h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, a as isFunction, c as connect } from './index-4755c9a0.js';
|
package/dist/es/ReactiveList.js
CHANGED
|
@@ -7,8 +7,8 @@ import { css } from 'emotion';
|
|
|
7
7
|
import styled from '@appbaseio/vue-emotion';
|
|
8
8
|
import 'polished';
|
|
9
9
|
import './Button-799185e2.js';
|
|
10
|
-
import { t as types } from './vueTypes-
|
|
11
|
-
import { P as Pagination } from './Pagination-
|
|
10
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
11
|
+
import { P as Pagination } from './Pagination-e8216949.js';
|
|
12
12
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
13
13
|
import 'redux';
|
|
14
14
|
import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-4755c9a0.js';
|
|
@@ -321,9 +321,14 @@ var ReactiveList = {
|
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
this.internalComponent = this.$props.componentId + "__internal";
|
|
324
|
-
this.sortOptionIndex =
|
|
325
|
-
|
|
326
|
-
|
|
324
|
+
this.sortOptionIndex = 0;
|
|
325
|
+
|
|
326
|
+
if (this.defaultSortOption && this.sortOptions && Array.isArray(this.sortOptions)) {
|
|
327
|
+
this.sortOptionIndex = this.sortOptions.findIndex(function (s) {
|
|
328
|
+
return s.label === _this.defaultSortOption;
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
|
|
327
332
|
this.updateComponentProps(this.componentId, {
|
|
328
333
|
from: this.from
|
|
329
334
|
}, componentTypes.reactiveList);
|
|
@@ -333,7 +338,7 @@ var ReactiveList = {
|
|
|
333
338
|
},
|
|
334
339
|
props: {
|
|
335
340
|
currentPage: VueTypes.number.def(0),
|
|
336
|
-
includeFields: types.includeFields
|
|
341
|
+
includeFields: types.includeFields,
|
|
337
342
|
// component props
|
|
338
343
|
className: types.string,
|
|
339
344
|
componentId: types.stringRequired,
|
|
@@ -342,7 +347,7 @@ var ReactiveList = {
|
|
|
342
347
|
aggregationSize: VueTypes.number,
|
|
343
348
|
defaultQuery: types.func,
|
|
344
349
|
defaultSortOption: types.string,
|
|
345
|
-
excludeFields: types.excludeFields
|
|
350
|
+
excludeFields: types.excludeFields,
|
|
346
351
|
innerClass: types.style,
|
|
347
352
|
listClass: VueTypes.string.def(''),
|
|
348
353
|
loader: types.title,
|
|
@@ -354,7 +359,7 @@ var ReactiveList = {
|
|
|
354
359
|
pages: VueTypes.number.def(5),
|
|
355
360
|
pagination: VueTypes.bool.def(false),
|
|
356
361
|
infiniteScroll: VueTypes.bool.def(true),
|
|
357
|
-
paginationAt:
|
|
362
|
+
paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
|
|
358
363
|
react: types.react,
|
|
359
364
|
scrollOnChange: VueTypes.bool.def(true),
|
|
360
365
|
showResultStats: VueTypes.bool.def(true),
|
|
@@ -555,11 +560,11 @@ var ReactiveList = {
|
|
|
555
560
|
var options = getQueryOptions(this.$props);
|
|
556
561
|
options.from = this.$data.from;
|
|
557
562
|
|
|
558
|
-
if (this
|
|
563
|
+
if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
|
|
559
564
|
var _ref2;
|
|
560
565
|
|
|
561
|
-
var sortField = this
|
|
562
|
-
var sortBy = this
|
|
566
|
+
var sortField = this.sortOptions[this.sortOptionIndex].dataField;
|
|
567
|
+
var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
|
|
563
568
|
options.sort = [(_ref2 = {}, _ref2[sortField] = {
|
|
564
569
|
order: sortBy
|
|
565
570
|
}, _ref2)]; // To handle sort options for RS API
|
|
@@ -629,10 +634,10 @@ var ReactiveList = {
|
|
|
629
634
|
"class": this.$props.className
|
|
630
635
|
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex, {
|
|
631
636
|
"attrs": {
|
|
632
|
-
"labelPosition": this
|
|
637
|
+
"labelPosition": this.sortOptions ? 'right' : 'left'
|
|
633
638
|
},
|
|
634
639
|
"class": getClassName(this.$props.innerClass, 'resultsInfo')
|
|
635
|
-
}, [this
|
|
640
|
+
}, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && results.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
|
|
636
641
|
"attrs": {
|
|
637
642
|
"pages": this.$props.pages,
|
|
638
643
|
"totalPages": this.totalPages,
|
|
@@ -703,15 +708,18 @@ var ReactiveList = {
|
|
|
703
708
|
var options = getQueryOptions(props);
|
|
704
709
|
options.from = this.$data.from;
|
|
705
710
|
|
|
706
|
-
if (props.sortOptions) {
|
|
707
|
-
var _ref5;
|
|
708
|
-
|
|
711
|
+
if (props.sortOptions && Array.isArray(props.sortOptions)) {
|
|
709
712
|
var sortOptionIndex = props.defaultSortOption ? props.sortOptions.findIndex(function (s) {
|
|
710
713
|
return s.label === props.defaultSortOption;
|
|
711
714
|
}) : 0;
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
+
|
|
716
|
+
if (props.sortOptions[sortOptionIndex]) {
|
|
717
|
+
var _ref5;
|
|
718
|
+
|
|
719
|
+
options.sort = [(_ref5 = {}, _ref5[props.sortOptions[sortOptionIndex].dataField] = {
|
|
720
|
+
order: props.sortOptions[sortOptionIndex].sortBy
|
|
721
|
+
}, _ref5)];
|
|
722
|
+
}
|
|
715
723
|
} else if (props.sortBy) {
|
|
716
724
|
var _ref6;
|
|
717
725
|
|
|
@@ -807,31 +815,39 @@ var ReactiveList = {
|
|
|
807
815
|
renderNoResult: function renderNoResult() {
|
|
808
816
|
var h = this.$createElement;
|
|
809
817
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
818
|
+
|
|
819
|
+
if (this.$scopedSlots.renderNoResults) {
|
|
820
|
+
return isFunction(renderNoResults) ? renderNoResults() : renderNoResults;
|
|
821
|
+
}
|
|
822
|
+
|
|
810
823
|
return h("p", {
|
|
811
824
|
"class": getClassName(this.$props.innerClass, 'noResults') || null
|
|
812
825
|
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
813
826
|
},
|
|
814
827
|
handleSortChange: function handleSortChange(e) {
|
|
815
|
-
var
|
|
828
|
+
var index = e.target.value;
|
|
816
829
|
|
|
817
|
-
|
|
830
|
+
if (this.sortOptions && this.sortOptions[index]) {
|
|
831
|
+
var _ref7;
|
|
818
832
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
833
|
+
// This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
834
|
+
var options = getQueryOptions(this.$props);
|
|
835
|
+
options.from = 0;
|
|
836
|
+
var sortField = this.sortOptions[index].dataField;
|
|
837
|
+
var sortBy = this.sortOptions[index].sortBy;
|
|
838
|
+
options.sort = [(_ref7 = {}, _ref7[sortField] = {
|
|
839
|
+
order: sortBy
|
|
840
|
+
}, _ref7)];
|
|
841
|
+
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
842
|
+
|
|
843
|
+
this.updateComponentProps(this.componentId, {
|
|
844
|
+
dataField: sortField,
|
|
845
|
+
sortBy: sortBy
|
|
846
|
+
}, componentTypes.reactiveList);
|
|
847
|
+
this.setQueryOptions(this.$props.componentId, options, true);
|
|
848
|
+
this.currentPageState = 0;
|
|
849
|
+
this.from = 0;
|
|
850
|
+
}
|
|
835
851
|
},
|
|
836
852
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
837
853
|
var docId = documentId;
|
|
@@ -865,7 +881,7 @@ var ReactiveList = {
|
|
|
865
881
|
"domProps": {
|
|
866
882
|
"value": this.sortOptionIndex
|
|
867
883
|
}
|
|
868
|
-
}, [this
|
|
884
|
+
}, [this.sortOptions.map(function (sort, index) {
|
|
869
885
|
return h("option", {
|
|
870
886
|
"key": sort.label,
|
|
871
887
|
"domProps": {
|
|
@@ -971,11 +987,7 @@ var mapDispatchtoProps = {
|
|
|
971
987
|
}; // Only used for SSR
|
|
972
988
|
|
|
973
989
|
ReactiveList.generateQueryOptions = function (props) {
|
|
974
|
-
|
|
975
|
-
var options = getQueryOptions(_extends({
|
|
976
|
-
includeFields: ['*'],
|
|
977
|
-
excludeFields: []
|
|
978
|
-
}, props));
|
|
990
|
+
var options = getQueryOptions(props);
|
|
979
991
|
var size = props.size,
|
|
980
992
|
dataField = props.dataField,
|
|
981
993
|
defaultSortOption = props.defaultSortOption,
|
package/dist/es/ResultCard.js
CHANGED
|
@@ -3,7 +3,7 @@ import VueTypes from 'vue-types';
|
|
|
3
3
|
import 'emotion';
|
|
4
4
|
import '@appbaseio/vue-emotion';
|
|
5
5
|
import 'polished';
|
|
6
|
-
import { t as types } from './vueTypes-
|
|
6
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
7
7
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
8
8
|
import { T as Title } from './Title-579f8d6c.js';
|
|
9
9
|
import { I as Image, C as Card } from './Card-04b3c33e.js';
|
package/dist/es/ResultList.js
CHANGED
|
@@ -3,7 +3,7 @@ import VueTypes from 'vue-types';
|
|
|
3
3
|
import 'emotion';
|
|
4
4
|
import '@appbaseio/vue-emotion';
|
|
5
5
|
import 'polished';
|
|
6
|
-
import { t as types } from './vueTypes-
|
|
6
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
7
7
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
8
8
|
import { T as Title } from './Title-579f8d6c.js';
|
|
9
9
|
import { I as Image, L as ListItem } from './ListItem-bdb6d53d.js';
|
|
@@ -6,7 +6,7 @@ import 'emotion';
|
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import { f as filters, B as Button } from './Button-799185e2.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
10
10
|
import 'redux';
|
|
11
11
|
import { c as connect } from './index-4755c9a0.js';
|
|
12
12
|
import { T as Title } from './Title-579f8d6c.js';
|
|
@@ -6,18 +6,19 @@ import 'emotion';
|
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import { l as loadMoreContainer, B as Button } from './Button-799185e2.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
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-4755c9a0.js';
|
|
13
13
|
import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
|
|
14
14
|
import { T as Title } from './Title-579f8d6c.js';
|
|
15
|
+
import './CancelSvg-282ae799.js';
|
|
15
16
|
import './Input-d8519224.js';
|
|
16
17
|
import 'compute-scroll-into-view';
|
|
17
|
-
import './DownShift-e7ccf2a7.js';
|
|
18
18
|
import { C as Container } from './Container-4383c6f0.js';
|
|
19
|
+
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
19
20
|
import { g as getAggsQuery } from './utils-3a32e13f.js';
|
|
20
|
-
import { D as Dropdown } from './DropDown-
|
|
21
|
+
import { D as Dropdown } from './DropDown-d9686568.js';
|
|
21
22
|
|
|
22
23
|
var updateQuery = Actions.updateQuery,
|
|
23
24
|
setQueryOptions = Actions.setQueryOptions,
|
|
@@ -73,10 +74,12 @@ var SingleDropdownList = {
|
|
|
73
74
|
showMissing: VueTypes.bool.def(false),
|
|
74
75
|
missingLabel: VueTypes.string.def('N/A'),
|
|
75
76
|
showSearch: VueTypes.bool.def(false),
|
|
77
|
+
showClear: VueTypes.bool.def(false),
|
|
76
78
|
showLoadMore: VueTypes.bool.def(false),
|
|
77
79
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
78
80
|
nestedField: types.string,
|
|
79
|
-
index: VueTypes.string
|
|
81
|
+
index: VueTypes.string,
|
|
82
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
80
83
|
},
|
|
81
84
|
created: function created() {
|
|
82
85
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -190,7 +193,9 @@ var SingleDropdownList = {
|
|
|
190
193
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
191
194
|
if (renderNoResults && isFunction(renderNoResults)) {
|
|
192
195
|
return h("div", [renderNoResults()]);
|
|
193
|
-
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (renderNoResults && !isFunction(renderNoResults)) {
|
|
194
199
|
return renderNoResults;
|
|
195
200
|
}
|
|
196
201
|
|
|
@@ -228,6 +233,8 @@ var SingleDropdownList = {
|
|
|
228
233
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
229
234
|
"themePreset": this.themePreset,
|
|
230
235
|
"showSearch": this.$props.showSearch,
|
|
236
|
+
"showClear": this.$props.showClear,
|
|
237
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
231
238
|
"transformData": this.$props.transformData,
|
|
232
239
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
233
240
|
"attrs": {
|
package/dist/es/SingleList.js
CHANGED
|
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
|
5
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-98819a12.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
11
11
|
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, g as getComponent, n as isEvent, h as hasCustomRenderer, c as connect } from './index-4755c9a0.js';
|
|
@@ -13,6 +13,7 @@ import { C as ComponentWrapper } from './ComponentWrapper-459505fd.js';
|
|
|
13
13
|
import { T as Title } from './Title-579f8d6c.js';
|
|
14
14
|
import { I as Input } from './Input-d8519224.js';
|
|
15
15
|
import { C as Container } from './Container-4383c6f0.js';
|
|
16
|
+
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
16
17
|
import { U as UL, R as Radio } from './FormControlList-fe389a2e.js';
|
|
17
18
|
import { g as getAggsQuery } from './utils-3a32e13f.js';
|
|
18
19
|
|
|
@@ -29,7 +30,7 @@ var SingleList = {
|
|
|
29
30
|
name: 'SingleList',
|
|
30
31
|
props: {
|
|
31
32
|
beforeValueChange: types.func,
|
|
32
|
-
className:
|
|
33
|
+
className: VueTypes.string.def(''),
|
|
33
34
|
componentId: types.stringRequired,
|
|
34
35
|
customQuery: types.func,
|
|
35
36
|
dataField: types.stringRequired,
|
|
@@ -49,7 +50,7 @@ var SingleList = {
|
|
|
49
50
|
showFilter: VueTypes.bool.def(true),
|
|
50
51
|
showRadio: VueTypes.bool.def(true),
|
|
51
52
|
showSearch: VueTypes.bool.def(true),
|
|
52
|
-
size: VueTypes.number
|
|
53
|
+
size: VueTypes.number,
|
|
53
54
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
54
55
|
title: types.title,
|
|
55
56
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -163,7 +164,7 @@ var SingleList = {
|
|
|
163
164
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
164
165
|
if (String(item.key).length) {
|
|
165
166
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
166
|
-
return String(item.key).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
|
|
167
|
+
return replaceDiacritics(String(item.key)).toLowerCase().includes(replaceDiacritics(_this.$data.searchTerm.toLowerCase()));
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
return true;
|
package/dist/es/SingleRange.js
CHANGED
|
@@ -5,7 +5,7 @@ import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
|
5
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-98819a12.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
11
11
|
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
|
package/dist/es/StateProvider.js
CHANGED
|
@@ -9,6 +9,10 @@ var getSearchState = helper.getSearchState;
|
|
|
9
9
|
var defaultKeys = ['hits', 'value', 'aggregations', 'error'];
|
|
10
10
|
|
|
11
11
|
var filterProps = function filterProps(props) {
|
|
12
|
+
if (props === void 0) {
|
|
13
|
+
props = {};
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
return _extends({}, props, {
|
|
13
17
|
props: props.componentProps
|
|
14
18
|
});
|
|
@@ -28,7 +32,7 @@ var filterByComponentIds = function filterByComponentIds(state, props) {
|
|
|
28
32
|
return _ref = {}, _ref[componentIds] = state[componentIds], _ref;
|
|
29
33
|
}
|
|
30
34
|
|
|
31
|
-
if (componentIds
|
|
35
|
+
if (Array.isArray(componentIds)) {
|
|
32
36
|
var filteredState = {};
|
|
33
37
|
componentIds.forEach(function (componentId) {
|
|
34
38
|
filteredState[componentId] = state[componentId];
|
|
@@ -67,7 +71,7 @@ var StateProvider = {
|
|
|
67
71
|
};
|
|
68
72
|
return this.__state;
|
|
69
73
|
},
|
|
70
|
-
|
|
74
|
+
created: function created() {
|
|
71
75
|
this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
|
|
72
76
|
},
|
|
73
77
|
computed: {
|
package/dist/es/ToggleButton.js
CHANGED
|
@@ -6,7 +6,7 @@ import 'emotion';
|
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import { B as Button, t as toggleButtons } from './Button-799185e2.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-98819a12.js';
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
12
|
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-4755c9a0.js';
|
|
@@ -28,7 +28,7 @@ var ToggleButton = {
|
|
|
28
28
|
componentId: types.stringRequired,
|
|
29
29
|
data: types.data,
|
|
30
30
|
dataField: types.stringRequired,
|
|
31
|
-
defaultValue: types.
|
|
31
|
+
defaultValue: types.any,
|
|
32
32
|
value: types.stringOrArray,
|
|
33
33
|
filterLabel: types.string,
|
|
34
34
|
nestedField: types.string,
|