@appbaseio/reactivesearch-vue 1.24.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +310 -159
- 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-62d42af4.js} +57 -0
- package/dist/cjs/DataSearch.js +28 -79
- package/dist/cjs/{DropDown-6815b9b6.js → DropDown-5847d6e4.js} +59 -22
- package/dist/cjs/MultiDropdownList.js +11 -4
- package/dist/cjs/MultiList.js +3 -2
- package/dist/cjs/ReactiveBase.js +4 -2
- package/dist/cjs/ReactiveComponent.js +11 -11
- package/dist/cjs/ReactiveList.js +53 -41
- package/dist/cjs/SingleDropdownList.js +11 -4
- package/dist/cjs/SingleList.js +4 -3
- package/dist/cjs/ToggleButton.js +1 -1
- package/dist/cjs/index.js +5 -2
- package/dist/cjs/initReactivesearch.js +31 -12
- package/dist/cjs/install.js +3 -2
- package/dist/cjs/version.js +1 -1
- package/dist/es/{DownShift-3558d402.js → CancelSvg-e0cace2d.js} +54 -2
- package/dist/es/DataSearch.js +18 -69
- package/dist/es/{DropDown-035c804f.js → DropDown-1ee01031.js} +58 -21
- package/dist/es/MultiDropdownList.js +11 -4
- package/dist/es/MultiList.js +3 -2
- package/dist/es/ReactiveBase.js +4 -2
- package/dist/es/ReactiveComponent.js +11 -11
- package/dist/es/ReactiveList.js +53 -41
- package/dist/es/SingleDropdownList.js +11 -4
- package/dist/es/SingleList.js +4 -3
- package/dist/es/ToggleButton.js +1 -1
- package/dist/es/index.js +5 -2
- package/dist/es/initReactivesearch.js +31 -12
- package/dist/es/install.js +3 -2
- package/dist/es/version.js +1 -1
- package/package.json +3 -3
package/dist/es/ReactiveList.js
CHANGED
|
@@ -486,9 +486,14 @@ 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
|
+
|
|
492
497
|
this.updateComponentProps(this.componentId, {
|
|
493
498
|
from: this.from
|
|
494
499
|
}, componentTypes.reactiveList);
|
|
@@ -498,7 +503,7 @@ var ReactiveList = {
|
|
|
498
503
|
},
|
|
499
504
|
props: {
|
|
500
505
|
currentPage: VueTypes.number.def(0),
|
|
501
|
-
includeFields: types.includeFields
|
|
506
|
+
includeFields: types.includeFields,
|
|
502
507
|
// component props
|
|
503
508
|
className: types.string,
|
|
504
509
|
componentId: types.stringRequired,
|
|
@@ -507,7 +512,7 @@ var ReactiveList = {
|
|
|
507
512
|
aggregationSize: VueTypes.number,
|
|
508
513
|
defaultQuery: types.func,
|
|
509
514
|
defaultSortOption: types.string,
|
|
510
|
-
excludeFields: types.excludeFields
|
|
515
|
+
excludeFields: types.excludeFields,
|
|
511
516
|
innerClass: types.style,
|
|
512
517
|
listClass: VueTypes.string.def(''),
|
|
513
518
|
loader: types.title,
|
|
@@ -519,7 +524,7 @@ var ReactiveList = {
|
|
|
519
524
|
pages: VueTypes.number.def(5),
|
|
520
525
|
pagination: VueTypes.bool.def(false),
|
|
521
526
|
infiniteScroll: VueTypes.bool.def(true),
|
|
522
|
-
paginationAt:
|
|
527
|
+
paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
|
|
523
528
|
react: types.react,
|
|
524
529
|
scrollOnChange: VueTypes.bool.def(true),
|
|
525
530
|
showResultStats: VueTypes.bool.def(true),
|
|
@@ -720,11 +725,11 @@ var ReactiveList = {
|
|
|
720
725
|
var options = getQueryOptions(this.$props);
|
|
721
726
|
options.from = this.$data.from;
|
|
722
727
|
|
|
723
|
-
if (this
|
|
728
|
+
if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
|
|
724
729
|
var _ref2;
|
|
725
730
|
|
|
726
|
-
var sortField = this
|
|
727
|
-
var sortBy = this
|
|
731
|
+
var sortField = this.sortOptions[this.sortOptionIndex].dataField;
|
|
732
|
+
var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
|
|
728
733
|
options.sort = [(_ref2 = {}, _ref2[sortField] = {
|
|
729
734
|
order: sortBy
|
|
730
735
|
}, _ref2)]; // To handle sort options for RS API
|
|
@@ -794,10 +799,10 @@ var ReactiveList = {
|
|
|
794
799
|
"class": this.$props.className
|
|
795
800
|
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex, {
|
|
796
801
|
"attrs": {
|
|
797
|
-
"labelPosition": this
|
|
802
|
+
"labelPosition": this.sortOptions ? 'right' : 'left'
|
|
798
803
|
},
|
|
799
804
|
"class": getClassName$1(this.$props.innerClass, 'resultsInfo')
|
|
800
|
-
}, [this
|
|
805
|
+
}, [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, {
|
|
801
806
|
"attrs": {
|
|
802
807
|
"pages": this.$props.pages,
|
|
803
808
|
"totalPages": this.totalPages,
|
|
@@ -868,15 +873,18 @@ var ReactiveList = {
|
|
|
868
873
|
var options = getQueryOptions(props);
|
|
869
874
|
options.from = this.$data.from;
|
|
870
875
|
|
|
871
|
-
if (props.sortOptions) {
|
|
872
|
-
var _ref5;
|
|
873
|
-
|
|
876
|
+
if (props.sortOptions && Array.isArray(props.sortOptions)) {
|
|
874
877
|
var sortOptionIndex = props.defaultSortOption ? props.sortOptions.findIndex(function (s) {
|
|
875
878
|
return s.label === props.defaultSortOption;
|
|
876
879
|
}) : 0;
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
+
|
|
881
|
+
if (props.sortOptions[sortOptionIndex]) {
|
|
882
|
+
var _ref5;
|
|
883
|
+
|
|
884
|
+
options.sort = [(_ref5 = {}, _ref5[props.sortOptions[sortOptionIndex].dataField] = {
|
|
885
|
+
order: props.sortOptions[sortOptionIndex].sortBy
|
|
886
|
+
}, _ref5)];
|
|
887
|
+
}
|
|
880
888
|
} else if (props.sortBy) {
|
|
881
889
|
var _ref6;
|
|
882
890
|
|
|
@@ -972,31 +980,39 @@ var ReactiveList = {
|
|
|
972
980
|
renderNoResult: function renderNoResult() {
|
|
973
981
|
var h = this.$createElement;
|
|
974
982
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
983
|
+
|
|
984
|
+
if (this.$scopedSlots.renderNoResults) {
|
|
985
|
+
return isFunction(renderNoResults) ? renderNoResults() : renderNoResults;
|
|
986
|
+
}
|
|
987
|
+
|
|
975
988
|
return h("p", {
|
|
976
989
|
"class": getClassName$1(this.$props.innerClass, 'noResults') || null
|
|
977
990
|
}, [isFunction(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
978
991
|
},
|
|
979
992
|
handleSortChange: function handleSortChange(e) {
|
|
980
|
-
var
|
|
993
|
+
var index = e.target.value;
|
|
981
994
|
|
|
982
|
-
|
|
995
|
+
if (this.sortOptions && this.sortOptions[index]) {
|
|
996
|
+
var _ref7;
|
|
983
997
|
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
998
|
+
// This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
999
|
+
var options = getQueryOptions(this.$props);
|
|
1000
|
+
options.from = 0;
|
|
1001
|
+
var sortField = this.sortOptions[index].dataField;
|
|
1002
|
+
var sortBy = this.sortOptions[index].sortBy;
|
|
1003
|
+
options.sort = [(_ref7 = {}, _ref7[sortField] = {
|
|
1004
|
+
order: sortBy
|
|
1005
|
+
}, _ref7)];
|
|
1006
|
+
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
1007
|
+
|
|
1008
|
+
this.updateComponentProps(this.componentId, {
|
|
1009
|
+
dataField: sortField,
|
|
1010
|
+
sortBy: sortBy
|
|
1011
|
+
}, componentTypes.reactiveList);
|
|
1012
|
+
this.setQueryOptions(this.$props.componentId, options, true);
|
|
1013
|
+
this.currentPageState = 0;
|
|
1014
|
+
this.from = 0;
|
|
1015
|
+
}
|
|
1000
1016
|
},
|
|
1001
1017
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
1002
1018
|
var docId = documentId;
|
|
@@ -1030,7 +1046,7 @@ var ReactiveList = {
|
|
|
1030
1046
|
"domProps": {
|
|
1031
1047
|
"value": this.sortOptionIndex
|
|
1032
1048
|
}
|
|
1033
|
-
}, [this
|
|
1049
|
+
}, [this.sortOptions.map(function (sort, index) {
|
|
1034
1050
|
return h("option", {
|
|
1035
1051
|
"key": sort.label,
|
|
1036
1052
|
"domProps": {
|
|
@@ -1136,11 +1152,7 @@ var mapDispatchtoProps = {
|
|
|
1136
1152
|
}; // Only used for SSR
|
|
1137
1153
|
|
|
1138
1154
|
ReactiveList.generateQueryOptions = function (props) {
|
|
1139
|
-
|
|
1140
|
-
var options = getQueryOptions(_extends({
|
|
1141
|
-
includeFields: ['*'],
|
|
1142
|
-
excludeFields: []
|
|
1143
|
-
}, props));
|
|
1155
|
+
var options = getQueryOptions(props);
|
|
1144
1156
|
var size = props.size,
|
|
1145
1157
|
dataField = props.dataField,
|
|
1146
1158
|
defaultSortOption = props.defaultSortOption,
|
|
@@ -12,12 +12,13 @@ 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-cb1950b6.js';
|
|
13
13
|
import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
|
|
14
14
|
import { T as Title } from './Title-3522ff56.js';
|
|
15
|
+
import './CancelSvg-e0cace2d.js';
|
|
15
16
|
import './Input-08bb1bcf.js';
|
|
16
17
|
import 'compute-scroll-into-view';
|
|
17
|
-
import './DownShift-3558d402.js';
|
|
18
18
|
import { C as Container } from './Container-18b03fde.js';
|
|
19
|
+
import '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
19
20
|
import { g as getAggsQuery } from './utils-64a2e5f0.js';
|
|
20
|
-
import { D as Dropdown } from './DropDown-
|
|
21
|
+
import { D as Dropdown } from './DropDown-1ee01031.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
|
@@ -13,6 +13,7 @@ import { C as ComponentWrapper } from './ComponentWrapper-4f85a67e.js';
|
|
|
13
13
|
import { T as Title } from './Title-3522ff56.js';
|
|
14
14
|
import { I as Input } from './Input-08bb1bcf.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;
|
package/dist/es/ToggleButton.js
CHANGED
|
@@ -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,
|
package/dist/es/index.js
CHANGED
|
@@ -24,16 +24,17 @@ import 'url-search-params-polyfill';
|
|
|
24
24
|
export { default as ReactiveBase } from './ReactiveBase.js';
|
|
25
25
|
import 'hotkeys-js';
|
|
26
26
|
export { default as DataSearch } from './DataSearch.js';
|
|
27
|
+
import './CancelSvg-e0cace2d.js';
|
|
27
28
|
import './Input-08bb1bcf.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 '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
32
33
|
import './FormControlList-704f8dee.js';
|
|
33
34
|
import './utils-64a2e5f0.js';
|
|
34
35
|
export { default as SingleList } from './SingleList.js';
|
|
35
36
|
export { default as MultiList } from './MultiList.js';
|
|
36
|
-
import './DropDown-
|
|
37
|
+
import './DropDown-1ee01031.js';
|
|
37
38
|
export { default as SingleDropdownList } from './SingleDropdownList.js';
|
|
38
39
|
export { default as MultiDropdownList } from './MultiDropdownList.js';
|
|
39
40
|
export { default as ToggleButton } from './ToggleButton.js';
|
|
@@ -51,6 +52,8 @@ export { default as StateProvider } from './StateProvider.js';
|
|
|
51
52
|
import '@appbaseio/reactivecore/lib/reducers/valueReducer';
|
|
52
53
|
import '@appbaseio/reactivecore/lib/reducers/queryReducer';
|
|
53
54
|
import '@appbaseio/reactivecore/lib/reducers/queryOptionsReducer';
|
|
55
|
+
import '@appbaseio/reactivecore/lib/reducers/compositeAggsReducer';
|
|
56
|
+
import '@appbaseio/reactivecore/lib/constants';
|
|
54
57
|
import '@appbaseio/reactivecore/lib/reducers/dependencyTreeReducer';
|
|
55
58
|
import '@appbaseio/reactivecore/lib/utils/graphQL';
|
|
56
59
|
import '@appbaseio/reactivecore/lib/actions/utils';
|
|
@@ -6,6 +6,8 @@ import Appbase from 'appbase-js';
|
|
|
6
6
|
import valueReducer from '@appbaseio/reactivecore/lib/reducers/valueReducer';
|
|
7
7
|
import queryReducer from '@appbaseio/reactivecore/lib/reducers/queryReducer';
|
|
8
8
|
import queryOptionsReducer from '@appbaseio/reactivecore/lib/reducers/queryOptionsReducer';
|
|
9
|
+
import compositeAggsReducer from '@appbaseio/reactivecore/lib/reducers/compositeAggsReducer';
|
|
10
|
+
import { UPDATE_COMPOSITE_AGGS } from '@appbaseio/reactivecore/lib/constants';
|
|
9
11
|
import dependencyTreeReducer from '@appbaseio/reactivecore/lib/reducers/dependencyTreeReducer';
|
|
10
12
|
import fetchGraphQL from '@appbaseio/reactivecore/lib/utils/graphQL';
|
|
11
13
|
import { isPropertyDefined } from '@appbaseio/reactivecore/lib/actions/utils';
|
|
@@ -102,6 +104,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
102
104
|
var orderOfQueries = [];
|
|
103
105
|
var hits = {};
|
|
104
106
|
var aggregations = {};
|
|
107
|
+
var compositeAggregations = {};
|
|
105
108
|
var state = {};
|
|
106
109
|
var customQueries = {};
|
|
107
110
|
var defaultQueries = {};
|
|
@@ -116,16 +119,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
116
119
|
compProps[key] = component[key];
|
|
117
120
|
}
|
|
118
121
|
});
|
|
119
|
-
var isInternalComponentPresent = false;
|
|
120
|
-
|
|
121
|
-
if (component.customQuery && typeof component.customQuery === 'function') {
|
|
122
|
-
customQueries[component.componentId] = component.customQuery(component.value, compProps);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
126
|
-
defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
|
|
127
|
-
}
|
|
128
|
-
|
|
122
|
+
var isInternalComponentPresent = false;
|
|
129
123
|
var isResultComponent = resultComponents.includes(componentType);
|
|
130
124
|
var internalComponent = component.componentId + "__internal";
|
|
131
125
|
var label = component.filterLabel || component.componentId;
|
|
@@ -149,7 +143,16 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
149
143
|
reference: reference,
|
|
150
144
|
showFilter: showFilter,
|
|
151
145
|
URLParams: component.URLParams || false
|
|
152
|
-
}); //
|
|
146
|
+
}); // Set custom and default queries
|
|
147
|
+
|
|
148
|
+
if (component.customQuery && typeof component.customQuery === 'function') {
|
|
149
|
+
customQueries[component.componentId] = component.customQuery(value, compProps);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
153
|
+
defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
|
|
154
|
+
} // [2] set query options - main component query (valid for result components)
|
|
155
|
+
|
|
153
156
|
|
|
154
157
|
if (componentsWithOptions.includes(componentType)) {
|
|
155
158
|
var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
|
|
@@ -236,7 +239,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
236
239
|
|
|
237
240
|
|
|
238
241
|
if (isResultComponent) {
|
|
239
|
-
var _getQuery = getQuery(component,
|
|
242
|
+
var _getQuery = getQuery(component, value, componentType),
|
|
240
243
|
query = _getQuery.query;
|
|
241
244
|
|
|
242
245
|
queryList = queryReducer(queryList, {
|
|
@@ -336,6 +339,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
336
339
|
var _extends4;
|
|
337
340
|
|
|
338
341
|
aggregations = _extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
|
|
342
|
+
compositeAggregations = compositeAggsReducer(compositeAggregations, {
|
|
343
|
+
type: UPDATE_COMPOSITE_AGGS,
|
|
344
|
+
aggregations: response.aggregations,
|
|
345
|
+
append: false
|
|
346
|
+
});
|
|
339
347
|
}
|
|
340
348
|
|
|
341
349
|
hits = _extends({}, hits, (_extends5 = {}, _extends5[component] = {
|
|
@@ -362,6 +370,8 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
362
370
|
var promotedResults = {};
|
|
363
371
|
var rawData = {};
|
|
364
372
|
var customData = {};
|
|
373
|
+
var settingsResponse = {};
|
|
374
|
+
var timestamp = {};
|
|
365
375
|
var allPromises = orderOfQueries.map(function (component) {
|
|
366
376
|
return new Promise(function (responseResolve, responseReject) {
|
|
367
377
|
handleTransformResponse(res[component], component).then(function (response) {
|
|
@@ -380,6 +390,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
380
390
|
|
|
381
391
|
if (response.customData) {
|
|
382
392
|
customData[component] = response.customData;
|
|
393
|
+
} // Update settings
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
if (response.settings) {
|
|
397
|
+
settingsResponse[component] = response.settings;
|
|
383
398
|
}
|
|
384
399
|
|
|
385
400
|
if (response.aggregations) {
|
|
@@ -388,6 +403,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
388
403
|
aggregations = _extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
|
|
389
404
|
}
|
|
390
405
|
|
|
406
|
+
timestamp[component] = res._timestamp;
|
|
391
407
|
hits = _extends({}, hits, (_extends7 = {}, _extends7[component] = {
|
|
392
408
|
hits: response.hits.hits,
|
|
393
409
|
total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
|
|
@@ -403,8 +419,11 @@ function initReactivesearch(componentCollection, searchState, settings) {
|
|
|
403
419
|
Promise.all(allPromises).then(function () {
|
|
404
420
|
state = _extends({}, state, {
|
|
405
421
|
hits: hits,
|
|
422
|
+
timestamp: timestamp,
|
|
406
423
|
aggregations: aggregations,
|
|
424
|
+
compositeAggregations: compositeAggregations,
|
|
407
425
|
promotedResults: promotedResults,
|
|
426
|
+
settings: settingsResponse,
|
|
408
427
|
customData: customData,
|
|
409
428
|
rawData: rawData
|
|
410
429
|
});
|
package/dist/es/install.js
CHANGED
|
@@ -24,16 +24,17 @@ import 'url-search-params-polyfill';
|
|
|
24
24
|
import ReactiveBase from './ReactiveBase.js';
|
|
25
25
|
import 'hotkeys-js';
|
|
26
26
|
import DataSearch from './DataSearch.js';
|
|
27
|
+
import './CancelSvg-e0cace2d.js';
|
|
27
28
|
import './Input-08bb1bcf.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 '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
32
33
|
import './FormControlList-704f8dee.js';
|
|
33
34
|
import './utils-64a2e5f0.js';
|
|
34
35
|
import SingleList from './SingleList.js';
|
|
35
36
|
import MultiList from './MultiList.js';
|
|
36
|
-
import './DropDown-
|
|
37
|
+
import './DropDown-1ee01031.js';
|
|
37
38
|
import SingleDropdownList from './SingleDropdownList.js';
|
|
38
39
|
import MultiDropdownList from './MultiDropdownList.js';
|
|
39
40
|
import ToggleButton from './ToggleButton.js';
|
package/dist/es/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appbaseio/reactivesearch-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"jsnext:main": "dist/es/index.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
],
|
|
35
35
|
"sideEffects": false,
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@appbaseio/reactivecore": "9.13.
|
|
37
|
+
"@appbaseio/reactivecore": "9.13.3",
|
|
38
38
|
"@appbaseio/vue-emotion": "0.4.4",
|
|
39
39
|
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
|
|
40
|
-
"appbase-js": "^4.5.
|
|
40
|
+
"appbase-js": "^4.5.1",
|
|
41
41
|
"compute-scroll-into-view": "^1.0.11",
|
|
42
42
|
"emotion": "9.2.12",
|
|
43
43
|
"hotkeys-js": "^3.8.7",
|