@appbaseio/reactivesearch-vue 1.24.3 → 1.27.0-gamma.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 +2015 -567
- 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-62e82255.js → CancelSvg-4aa35935.js} +58 -14
- package/dist/cjs/{ComponentWrapper-32481890.js → ComponentWrapper-10bad289.js} +1 -1
- package/dist/cjs/DataSearch-37dfdf39.js +2154 -0
- package/dist/cjs/DataSearch.js +18 -2152
- package/dist/cjs/{DropDown-6815b9b6.js → DropDown-0076babc.js} +66 -24
- package/dist/cjs/DynamicRangeSlider.js +48 -12
- package/dist/cjs/{Input-3cc3fa59.js → Input-a9ee53ed.js} +1 -1
- package/dist/cjs/MultiDropdownList.js +19 -11
- package/dist/cjs/MultiList.js +22 -16
- package/dist/cjs/MultiRange.js +4 -4
- package/dist/cjs/RangeInput.js +10 -6
- package/dist/cjs/RangeSlider.js +19 -22
- package/dist/cjs/ReactiveBase.js +6 -4
- package/dist/cjs/ReactiveComponent.js +3 -3
- package/dist/cjs/ReactiveList.js +61 -44
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/SelectedFilters.js +8 -6
- package/dist/cjs/SingleDropdownList.js +18 -10
- package/dist/cjs/SingleList.js +10 -9
- package/dist/cjs/SingleRange.js +4 -4
- package/dist/cjs/StateProvider.js +7 -3
- package/dist/cjs/ToggleButton.js +5 -5
- package/dist/cjs/{index-89c39a9e.js → index-4509aa45.js} +10 -4
- package/dist/cjs/index.js +17 -13
- package/dist/cjs/initReactivesearch.js +19 -0
- package/dist/cjs/install-b7a80fc1.js +1196 -0
- package/dist/cjs/install.js +29 -33
- package/dist/cjs/ssr-0ee35a09.js +39 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-4c19b4c8.js → vueTypes-57d01f18.js} +3 -3
- package/dist/es/{DownShift-3558d402.js → CancelSvg-c2c03a35.js} +55 -16
- package/dist/es/{ComponentWrapper-4f85a67e.js → ComponentWrapper-0f3431d1.js} +1 -1
- package/dist/es/DataSearch-77325036.js +2141 -0
- package/dist/es/DataSearch.js +17 -2151
- package/dist/es/{DropDown-035c804f.js → DropDown-0dd8f2a3.js} +65 -23
- package/dist/es/DynamicRangeSlider.js +48 -12
- package/dist/es/{Input-08bb1bcf.js → Input-10b1d62d.js} +1 -1
- package/dist/es/MultiDropdownList.js +19 -11
- package/dist/es/MultiList.js +22 -16
- package/dist/es/MultiRange.js +4 -4
- package/dist/es/RangeInput.js +10 -6
- package/dist/es/RangeSlider.js +19 -22
- package/dist/es/ReactiveBase.js +6 -4
- package/dist/es/ReactiveComponent.js +3 -3
- package/dist/es/ReactiveList.js +61 -44
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/SelectedFilters.js +8 -6
- package/dist/es/SingleDropdownList.js +18 -10
- package/dist/es/SingleList.js +10 -9
- package/dist/es/SingleRange.js +4 -4
- package/dist/es/StateProvider.js +7 -3
- package/dist/es/ToggleButton.js +5 -5
- package/dist/es/{index-cb1950b6.js → index-78920565.js} +10 -4
- package/dist/es/index.js +13 -10
- package/dist/es/initReactivesearch.js +19 -0
- package/dist/es/install-86388b0e.js +1189 -0
- package/dist/es/install.js +27 -35
- package/dist/es/ssr-a41dfea9.js +33 -0
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-fb61bb7b.js → vueTypes-687b2304.js} +3 -3
- package/package.json +4 -4
- package/dist/cjs/ssr-08e95ede.js +0 -39
- package/dist/es/ssr-5d255b08.js +0 -33
package/dist/es/ReactiveBase.js
CHANGED
|
@@ -4,9 +4,9 @@ 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-687b2304.js';
|
|
8
8
|
import 'redux';
|
|
9
|
-
import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-
|
|
9
|
+
import { c as connect, e as composeThemeObject, X as X_SEARCH_CLIENT } from './index-78920565.js';
|
|
10
10
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
11
11
|
import { updateAnalyticsConfig } from '@appbaseio/reactivecore/lib/actions/analytics';
|
|
12
12
|
import Appbase from 'appbase-js';
|
|
@@ -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;
|
|
@@ -2,11 +2,11 @@ import { Actions, helper } from '@appbaseio/reactivecore';
|
|
|
2
2
|
import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-0f24d612.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-687b2304.js';
|
|
6
6
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
7
7
|
import 'redux';
|
|
8
|
-
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, c as connect } from './index-
|
|
9
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
8
|
+
import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, c as connect } from './index-78920565.js';
|
|
9
|
+
import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
|
|
10
10
|
|
|
11
11
|
var _excluded = ["options"],
|
|
12
12
|
_excluded2 = ["query"],
|
package/dist/es/ReactiveList.js
CHANGED
|
@@ -7,11 +7,11 @@ import { css } from 'emotion';
|
|
|
7
7
|
import styled from '@appbaseio/vue-emotion';
|
|
8
8
|
import 'polished';
|
|
9
9
|
import { p as pagination, B as Button } from './Button-91561391.js';
|
|
10
|
-
import { t as types } from './vueTypes-
|
|
10
|
+
import { t as types } from './vueTypes-687b2304.js';
|
|
11
11
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
12
12
|
import 'redux';
|
|
13
|
-
import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-
|
|
14
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
13
|
+
import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-78920565.js';
|
|
14
|
+
import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
|
|
15
15
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
16
16
|
import './Title-3522ff56.js';
|
|
17
17
|
import { c as container } from './ListItem-8e8fb535.js';
|
|
@@ -486,9 +486,20 @@ var ReactiveList = {
|
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
this.internalComponent = this.$props.componentId + "__internal";
|
|
489
|
-
this.sortOptionIndex =
|
|
490
|
-
|
|
491
|
-
|
|
489
|
+
this.sortOptionIndex = 0;
|
|
490
|
+
|
|
491
|
+
if (this.defaultSortOption && this.sortOptions && Array.isArray(this.sortOptions)) {
|
|
492
|
+
this.sortOptionIndex = this.sortOptions.findIndex(function (s) {
|
|
493
|
+
return s.label === _this.defaultSortOption;
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
if (this.urlSortOption) {
|
|
498
|
+
this.sortOptionIndex = this.$props.sortOptions.findIndex(function (s) {
|
|
499
|
+
return s.label === _this.urlSortOption;
|
|
500
|
+
}) || 0;
|
|
501
|
+
}
|
|
502
|
+
|
|
492
503
|
this.updateComponentProps(this.componentId, {
|
|
493
504
|
from: this.from
|
|
494
505
|
}, componentTypes.reactiveList);
|
|
@@ -498,7 +509,7 @@ var ReactiveList = {
|
|
|
498
509
|
},
|
|
499
510
|
props: {
|
|
500
511
|
currentPage: VueTypes.number.def(0),
|
|
501
|
-
includeFields: types.includeFields
|
|
512
|
+
includeFields: types.includeFields,
|
|
502
513
|
// component props
|
|
503
514
|
className: types.string,
|
|
504
515
|
componentId: types.stringRequired,
|
|
@@ -507,7 +518,7 @@ var ReactiveList = {
|
|
|
507
518
|
aggregationSize: VueTypes.number,
|
|
508
519
|
defaultQuery: types.func,
|
|
509
520
|
defaultSortOption: types.string,
|
|
510
|
-
excludeFields: types.excludeFields
|
|
521
|
+
excludeFields: types.excludeFields,
|
|
511
522
|
innerClass: types.style,
|
|
512
523
|
listClass: VueTypes.string.def(''),
|
|
513
524
|
loader: types.title,
|
|
@@ -519,7 +530,7 @@ var ReactiveList = {
|
|
|
519
530
|
pages: VueTypes.number.def(5),
|
|
520
531
|
pagination: VueTypes.bool.def(false),
|
|
521
532
|
infiniteScroll: VueTypes.bool.def(true),
|
|
522
|
-
paginationAt:
|
|
533
|
+
paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
|
|
523
534
|
react: types.react,
|
|
524
535
|
scrollOnChange: VueTypes.bool.def(true),
|
|
525
536
|
showResultStats: VueTypes.bool.def(true),
|
|
@@ -720,11 +731,11 @@ var ReactiveList = {
|
|
|
720
731
|
var options = getQueryOptions(this.$props);
|
|
721
732
|
options.from = this.$data.from;
|
|
722
733
|
|
|
723
|
-
if (this
|
|
734
|
+
if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
|
|
724
735
|
var _ref2;
|
|
725
736
|
|
|
726
|
-
var sortField = this
|
|
727
|
-
var sortBy = this
|
|
737
|
+
var sortField = this.sortOptions[this.sortOptionIndex].dataField;
|
|
738
|
+
var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
|
|
728
739
|
options.sort = [(_ref2 = {}, _ref2[sortField] = {
|
|
729
740
|
order: sortBy
|
|
730
741
|
}, _ref2)]; // To handle sort options for RS API
|
|
@@ -794,10 +805,10 @@ var ReactiveList = {
|
|
|
794
805
|
"class": this.$props.className
|
|
795
806
|
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex, {
|
|
796
807
|
"attrs": {
|
|
797
|
-
"labelPosition": this
|
|
808
|
+
"labelPosition": this.sortOptions ? 'right' : 'left'
|
|
798
809
|
},
|
|
799
810
|
"class": getClassName$1(this.$props.innerClass, 'resultsInfo')
|
|
800
|
-
}, [this
|
|
811
|
+
}, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && hits && hits.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
|
|
801
812
|
"attrs": {
|
|
802
813
|
"pages": this.$props.pages,
|
|
803
814
|
"totalPages": this.totalPages,
|
|
@@ -868,15 +879,18 @@ var ReactiveList = {
|
|
|
868
879
|
var options = getQueryOptions(props);
|
|
869
880
|
options.from = this.$data.from;
|
|
870
881
|
|
|
871
|
-
if (props.sortOptions) {
|
|
872
|
-
var _ref5;
|
|
873
|
-
|
|
882
|
+
if (props.sortOptions && Array.isArray(props.sortOptions)) {
|
|
874
883
|
var sortOptionIndex = props.defaultSortOption ? props.sortOptions.findIndex(function (s) {
|
|
875
884
|
return s.label === props.defaultSortOption;
|
|
876
885
|
}) : 0;
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
886
|
+
|
|
887
|
+
if (props.sortOptions[sortOptionIndex]) {
|
|
888
|
+
var _ref5;
|
|
889
|
+
|
|
890
|
+
options.sort = [(_ref5 = {}, _ref5[props.sortOptions[sortOptionIndex].dataField] = {
|
|
891
|
+
order: props.sortOptions[sortOptionIndex].sortBy
|
|
892
|
+
}, _ref5)];
|
|
893
|
+
}
|
|
880
894
|
} else if (props.sortBy) {
|
|
881
895
|
var _ref6;
|
|
882
896
|
|
|
@@ -982,26 +996,32 @@ var ReactiveList = {
|
|
|
982
996
|
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
983
997
|
},
|
|
984
998
|
handleSortChange: function handleSortChange(e) {
|
|
985
|
-
var
|
|
999
|
+
var index = e.target.value;
|
|
986
1000
|
|
|
987
|
-
|
|
1001
|
+
if (this.sortOptions && this.sortOptions[index]) {
|
|
1002
|
+
var _ref7;
|
|
988
1003
|
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1004
|
+
// This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
1005
|
+
var options = getQueryOptions(this.$props);
|
|
1006
|
+
options.from = 0;
|
|
1007
|
+
var sortField = this.sortOptions[index].dataField;
|
|
1008
|
+
var sortBy = this.sortOptions[index].sortBy;
|
|
1009
|
+
options.sort = [(_ref7 = {}, _ref7[sortField] = {
|
|
1010
|
+
order: sortBy
|
|
1011
|
+
}, _ref7)];
|
|
1012
|
+
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
1013
|
+
|
|
1014
|
+
this.updateComponentProps(this.componentId, {
|
|
1015
|
+
dataField: sortField,
|
|
1016
|
+
sortBy: sortBy
|
|
1017
|
+
}, componentTypes.reactiveList);
|
|
1018
|
+
this.setQueryOptions(this.$props.componentId, options, true);
|
|
1019
|
+
this.setPage(0);
|
|
1020
|
+
this.currentPageState = 0;
|
|
1021
|
+
this.from = 0;
|
|
1022
|
+
var sortOption = this.$props.sortOptions[this.sortOptionIndex] ? this.$props.sortOptions[this.sortOptionIndex].label : null;
|
|
1023
|
+
this.setPageURL(this.$props.componentId + "sortOption", sortOption, this.$props.componentId + "sortOption", false, this.$props.URLParams);
|
|
1024
|
+
}
|
|
1005
1025
|
},
|
|
1006
1026
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
1007
1027
|
var docId = documentId;
|
|
@@ -1035,7 +1055,7 @@ var ReactiveList = {
|
|
|
1035
1055
|
"domProps": {
|
|
1036
1056
|
"value": this.sortOptionIndex
|
|
1037
1057
|
}
|
|
1038
|
-
}, [this
|
|
1058
|
+
}, [this.sortOptions.map(function (sort, index) {
|
|
1039
1059
|
return h("option", {
|
|
1040
1060
|
"key": sort.label,
|
|
1041
1061
|
"domProps": {
|
|
@@ -1112,6 +1132,7 @@ var ReactiveList = {
|
|
|
1112
1132
|
var mapStateToProps = function mapStateToProps(state, props) {
|
|
1113
1133
|
return {
|
|
1114
1134
|
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
|
|
1135
|
+
urlSortOption: state.selectedValues[props.componentId + "sortOption"] && state.selectedValues[props.componentId + "sortOption"].value,
|
|
1115
1136
|
hits: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
1116
1137
|
rawData: state.rawData[props.componentId],
|
|
1117
1138
|
aggregationData: state.compositeAggregations[props.componentId],
|
|
@@ -1141,11 +1162,7 @@ var mapDispatchtoProps = {
|
|
|
1141
1162
|
}; // Only used for SSR
|
|
1142
1163
|
|
|
1143
1164
|
ReactiveList.generateQueryOptions = function (props) {
|
|
1144
|
-
|
|
1145
|
-
var options = getQueryOptions(_extends({
|
|
1146
|
-
includeFields: ['*'],
|
|
1147
|
-
excludeFields: []
|
|
1148
|
-
}, props));
|
|
1165
|
+
var options = getQueryOptions(props);
|
|
1149
1166
|
var size = props.size,
|
|
1150
1167
|
dataField = props.dataField,
|
|
1151
1168
|
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-687b2304.js';
|
|
7
7
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
8
8
|
import { T as Title } from './Title-3522ff56.js';
|
|
9
9
|
import { I as Image, C as Card } from './Card-6446f1b7.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-687b2304.js';
|
|
7
7
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
8
8
|
import { T as Title } from './Title-3522ff56.js';
|
|
9
9
|
import { I as Image, L as ListItem } from './ListItem-8e8fb535.js';
|
|
@@ -6,9 +6,9 @@ import 'emotion';
|
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import { f as filters, B as Button } from './Button-91561391.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-687b2304.js';
|
|
10
10
|
import 'redux';
|
|
11
|
-
import { c as connect } from './index-
|
|
11
|
+
import { c as connect } from './index-78920565.js';
|
|
12
12
|
import { T as Title } from './Title-3522ff56.js';
|
|
13
13
|
import { C as Container } from './Container-18b03fde.js';
|
|
14
14
|
|
|
@@ -25,7 +25,8 @@ var SelectedFilters = {
|
|
|
25
25
|
innerClass: types.style,
|
|
26
26
|
showClearAll: VueTypes.bool.def(true),
|
|
27
27
|
title: types.title,
|
|
28
|
-
resetToDefault: VueTypes.bool.def(false)
|
|
28
|
+
resetToDefault: VueTypes.bool.def(false),
|
|
29
|
+
resetToValues: VueTypes.object
|
|
29
30
|
},
|
|
30
31
|
inject: {
|
|
31
32
|
theme: {
|
|
@@ -78,15 +79,16 @@ var SelectedFilters = {
|
|
|
78
79
|
this.$emit('clear', component, value);
|
|
79
80
|
},
|
|
80
81
|
clearValues: function clearValues() {
|
|
81
|
-
var resetToDefault = this.resetToDefault
|
|
82
|
+
var resetToDefault = this.resetToDefault,
|
|
83
|
+
resetToValues = this.resetToValues;
|
|
82
84
|
|
|
83
85
|
if (resetToDefault) {
|
|
84
86
|
this.resetValuesToDefault();
|
|
85
87
|
} else {
|
|
86
|
-
this.clearValuesAction();
|
|
88
|
+
this.clearValuesAction(resetToValues);
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
this.$emit('clear',
|
|
91
|
+
this.$emit('clear', resetToValues);
|
|
90
92
|
},
|
|
91
93
|
renderValue: function renderValue(value, isArray) {
|
|
92
94
|
var _this2 = this;
|
|
@@ -6,18 +6,20 @@ import 'emotion';
|
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import { l as loadMoreContainer, B as Button } from './Button-91561391.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-687b2304.js';
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
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-
|
|
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-78920565.js';
|
|
13
|
+
import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
|
|
14
|
+
import '@vue/babel-helper-vue-jsx-merge-props';
|
|
14
15
|
import { T as Title } from './Title-3522ff56.js';
|
|
15
|
-
import './
|
|
16
|
+
import './CancelSvg-c2c03a35.js';
|
|
17
|
+
import './Input-10b1d62d.js';
|
|
16
18
|
import 'compute-scroll-into-view';
|
|
17
|
-
import './DownShift-3558d402.js';
|
|
18
19
|
import { C as Container } from './Container-18b03fde.js';
|
|
20
|
+
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
19
21
|
import { g as getAggsQuery } from './utils-64a2e5f0.js';
|
|
20
|
-
import { D as Dropdown } from './DropDown-
|
|
22
|
+
import { D as Dropdown } from './DropDown-0dd8f2a3.js';
|
|
21
23
|
|
|
22
24
|
var updateQuery = Actions.updateQuery,
|
|
23
25
|
setQueryOptions = Actions.setQueryOptions,
|
|
@@ -73,10 +75,12 @@ var SingleDropdownList = {
|
|
|
73
75
|
showMissing: VueTypes.bool.def(false),
|
|
74
76
|
missingLabel: VueTypes.string.def('N/A'),
|
|
75
77
|
showSearch: VueTypes.bool.def(false),
|
|
78
|
+
showClear: VueTypes.bool.def(false),
|
|
76
79
|
showLoadMore: VueTypes.bool.def(false),
|
|
77
80
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
78
81
|
nestedField: types.string,
|
|
79
|
-
index: VueTypes.string
|
|
82
|
+
index: VueTypes.string,
|
|
83
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
80
84
|
},
|
|
81
85
|
created: function created() {
|
|
82
86
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -190,7 +194,9 @@ var SingleDropdownList = {
|
|
|
190
194
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
191
195
|
if (renderNoResults && isFunction(renderNoResults)) {
|
|
192
196
|
return h("div", [renderNoResults()]);
|
|
193
|
-
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (renderNoResults && !isFunction(renderNoResults)) {
|
|
194
200
|
return renderNoResults;
|
|
195
201
|
}
|
|
196
202
|
|
|
@@ -228,6 +234,8 @@ var SingleDropdownList = {
|
|
|
228
234
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
229
235
|
"themePreset": this.themePreset,
|
|
230
236
|
"showSearch": this.$props.showSearch,
|
|
237
|
+
"showClear": this.$props.showClear,
|
|
238
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
231
239
|
"transformData": this.$props.transformData,
|
|
232
240
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
233
241
|
"attrs": {
|
|
@@ -287,7 +295,7 @@ var SingleDropdownList = {
|
|
|
287
295
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
288
296
|
}
|
|
289
297
|
|
|
290
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
298
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
291
299
|
this.updateQuery({
|
|
292
300
|
componentId: this.internalComponent,
|
|
293
301
|
query: query,
|
|
@@ -308,7 +316,7 @@ var SingleDropdownList = {
|
|
|
308
316
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
309
317
|
}
|
|
310
318
|
|
|
311
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
319
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
312
320
|
this.updateQuery({
|
|
313
321
|
componentId: props.componentId,
|
|
314
322
|
query: query,
|
package/dist/es/SingleList.js
CHANGED
|
@@ -5,14 +5,15 @@ 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-687b2304.js';
|
|
9
9
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
10
10
|
import 'redux';
|
|
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-
|
|
12
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
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-78920565.js';
|
|
12
|
+
import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
|
|
13
13
|
import { T as Title } from './Title-3522ff56.js';
|
|
14
|
-
import { I as Input } from './Input-
|
|
14
|
+
import { I as Input } from './Input-10b1d62d.js';
|
|
15
15
|
import { C as Container } from './Container-18b03fde.js';
|
|
16
|
+
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
16
17
|
import { U as UL, R as Radio } from './FormControlList-704f8dee.js';
|
|
17
18
|
import { g as getAggsQuery } from './utils-64a2e5f0.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;
|
|
@@ -276,7 +277,7 @@ var SingleList = {
|
|
|
276
277
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
277
278
|
}
|
|
278
279
|
|
|
279
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
280
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
280
281
|
this.updateQuery({
|
|
281
282
|
componentId: this.internalComponent,
|
|
282
283
|
query: query,
|
|
@@ -297,7 +298,7 @@ var SingleList = {
|
|
|
297
298
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
298
299
|
}
|
|
299
300
|
|
|
300
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
301
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
301
302
|
this.updateQuery({
|
|
302
303
|
componentId: props.componentId,
|
|
303
304
|
query: query,
|
package/dist/es/SingleRange.js
CHANGED
|
@@ -5,11 +5,11 @@ 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-687b2304.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-
|
|
11
|
+
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-78920565.js';
|
|
12
|
+
import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
|
|
13
13
|
import { T as Title } from './Title-3522ff56.js';
|
|
14
14
|
import { C as Container } from './Container-18b03fde.js';
|
|
15
15
|
import { U as UL, R as Radio } from './FormControlList-704f8dee.js';
|
|
@@ -160,7 +160,7 @@ var SingleRange = {
|
|
|
160
160
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
163
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
164
164
|
this.updateQuery({
|
|
165
165
|
componentId: props.componentId,
|
|
166
166
|
query: query,
|
package/dist/es/StateProvider.js
CHANGED
|
@@ -3,12 +3,16 @@ import { a as _extends } from './_rollupPluginBabelHelpers-0f24d612.js';
|
|
|
3
3
|
import VueTypes from 'vue-types';
|
|
4
4
|
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
5
|
import 'redux';
|
|
6
|
-
import { c as connect } from './index-
|
|
6
|
+
import { c as connect } from './index-78920565.js';
|
|
7
7
|
|
|
8
8
|
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,11 +6,11 @@ import 'emotion';
|
|
|
6
6
|
import '@appbaseio/vue-emotion';
|
|
7
7
|
import 'polished';
|
|
8
8
|
import { B as Button, t as toggleButtons } from './Button-91561391.js';
|
|
9
|
-
import { t as types } from './vueTypes-
|
|
9
|
+
import { t as types } from './vueTypes-687b2304.js';
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
|
-
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-
|
|
13
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
12
|
+
import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-78920565.js';
|
|
13
|
+
import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
|
|
14
14
|
import { T as Title } from './Title-3522ff56.js';
|
|
15
15
|
import { C as Container } from './Container-18b03fde.js';
|
|
16
16
|
|
|
@@ -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,
|
|
@@ -186,7 +186,7 @@ var ToggleButton = {
|
|
|
186
186
|
var _ref = customQuery(value, props) || {};
|
|
187
187
|
|
|
188
188
|
query = _ref.query;
|
|
189
|
-
this.setQueryOptions(props.componentId, getOptionsFromQuery(customQuery(value, props)));
|
|
189
|
+
this.setQueryOptions(props.componentId, getOptionsFromQuery(customQuery(value, props)), false);
|
|
190
190
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -155,10 +155,16 @@ var isFunction = function isFunction(element) {
|
|
|
155
155
|
}; // parses current array (i.e. this.$props.value) for `onChange` callback for multi-* components
|
|
156
156
|
|
|
157
157
|
function parseValueArray(objectValues, currentValue) {
|
|
158
|
-
var
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
var selectedValues;
|
|
159
|
+
|
|
160
|
+
if (Array.isArray(objectValues)) {
|
|
161
|
+
selectedValues = [].concat(objectValues);
|
|
162
|
+
} else {
|
|
163
|
+
var keys = Object.keys(objectValues);
|
|
164
|
+
selectedValues = keys.map(function (key) {
|
|
165
|
+
return objectValues[key] ? key : null;
|
|
166
|
+
});
|
|
167
|
+
}
|
|
162
168
|
|
|
163
169
|
if (selectedValues.includes(currentValue)) {
|
|
164
170
|
return selectedValues.filter(function (item) {
|
package/dist/es/index.js
CHANGED
|
@@ -7,12 +7,12 @@ import 'emotion';
|
|
|
7
7
|
import '@appbaseio/vue-emotion';
|
|
8
8
|
import 'polished';
|
|
9
9
|
import './Button-91561391.js';
|
|
10
|
-
import './vueTypes-
|
|
10
|
+
import './vueTypes-687b2304.js';
|
|
11
11
|
export { default as ReactiveList } from './ReactiveList.js';
|
|
12
12
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
13
13
|
import 'redux';
|
|
14
|
-
import './index-
|
|
15
|
-
import './ComponentWrapper-
|
|
14
|
+
import './index-78920565.js';
|
|
15
|
+
import './ComponentWrapper-0f3431d1.js';
|
|
16
16
|
import '@vue/babel-helper-vue-jsx-merge-props';
|
|
17
17
|
import './Title-3522ff56.js';
|
|
18
18
|
import './ListItem-8e8fb535.js';
|
|
@@ -23,17 +23,20 @@ import 'appbase-js';
|
|
|
23
23
|
import 'url-search-params-polyfill';
|
|
24
24
|
export { default as ReactiveBase } from './ReactiveBase.js';
|
|
25
25
|
import 'hotkeys-js';
|
|
26
|
-
export {
|
|
27
|
-
import './
|
|
26
|
+
export { D as DataSearch } from './DataSearch-77325036.js';
|
|
27
|
+
import './CancelSvg-c2c03a35.js';
|
|
28
|
+
import './Input-10b1d62d.js';
|
|
28
29
|
import 'compute-scroll-into-view';
|
|
29
|
-
import './DownShift-3558d402.js';
|
|
30
30
|
import './Container-18b03fde.js';
|
|
31
31
|
import 'vue-highlight-words';
|
|
32
|
+
import { i as install } from './install-86388b0e.js';
|
|
33
|
+
export { S as SearchBox, i as install } from './install-86388b0e.js';
|
|
34
|
+
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
32
35
|
import './FormControlList-704f8dee.js';
|
|
33
36
|
import './utils-64a2e5f0.js';
|
|
34
37
|
export { default as SingleList } from './SingleList.js';
|
|
35
38
|
export { default as MultiList } from './MultiList.js';
|
|
36
|
-
import './DropDown-
|
|
39
|
+
import './DropDown-0dd8f2a3.js';
|
|
37
40
|
export { default as SingleDropdownList } from './SingleDropdownList.js';
|
|
38
41
|
export { default as MultiDropdownList } from './MultiDropdownList.js';
|
|
39
42
|
export { default as ToggleButton } from './ToggleButton.js';
|
|
@@ -44,13 +47,15 @@ export { default as MultiRange } from './MultiRange.js';
|
|
|
44
47
|
export { default as ResultCard } from './ResultCard.js';
|
|
45
48
|
export { default as ResultList } from './ResultList.js';
|
|
46
49
|
import 'vue-no-ssr';
|
|
47
|
-
import './ssr-
|
|
50
|
+
import './ssr-a41dfea9.js';
|
|
48
51
|
export { default as RangeSlider } from './RangeSlider.js';
|
|
49
52
|
export { default as DynamicRangeSlider } from './DynamicRangeSlider.js';
|
|
50
53
|
export { default as StateProvider } from './StateProvider.js';
|
|
51
54
|
import '@appbaseio/reactivecore/lib/reducers/valueReducer';
|
|
52
55
|
import '@appbaseio/reactivecore/lib/reducers/queryReducer';
|
|
53
56
|
import '@appbaseio/reactivecore/lib/reducers/queryOptionsReducer';
|
|
57
|
+
import '@appbaseio/reactivecore/lib/reducers/compositeAggsReducer';
|
|
58
|
+
import '@appbaseio/reactivecore/lib/constants';
|
|
54
59
|
import '@appbaseio/reactivecore/lib/reducers/dependencyTreeReducer';
|
|
55
60
|
import '@appbaseio/reactivecore/lib/utils/graphQL';
|
|
56
61
|
import '@appbaseio/reactivecore/lib/actions/utils';
|
|
@@ -58,8 +63,6 @@ export { default as initReactivesearch } from './initReactivesearch.js';
|
|
|
58
63
|
import version from './version.js';
|
|
59
64
|
export { default as version } from './version.js';
|
|
60
65
|
export { default as RangeInput } from './RangeInput.js';
|
|
61
|
-
import install from './install.js';
|
|
62
|
-
export { default as install } from './install.js';
|
|
63
66
|
|
|
64
67
|
// Add polyfills to support in IE
|
|
65
68
|
|