@appbaseio/reactivesearch-vue 1.16.0-alpha.27 → 1.16.0-alpha.28
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 +47 -25
- 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/DataSearch.js +8 -8
- package/dist/cjs/MultiList.js +1 -1
- package/dist/cjs/ReactiveBase.js +4 -2
- package/dist/cjs/ReactiveList.js +4 -8
- package/dist/cjs/SingleDropdownList.js +3 -1
- package/dist/cjs/SingleList.js +2 -2
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/initReactivesearch.js +19 -0
- package/dist/cjs/version.js +1 -1
- package/dist/es/DataSearch.js +8 -8
- package/dist/es/MultiList.js +1 -1
- package/dist/es/ReactiveBase.js +4 -2
- package/dist/es/ReactiveList.js +4 -8
- package/dist/es/SingleDropdownList.js +3 -1
- package/dist/es/SingleList.js +2 -2
- package/dist/es/index.js +2 -0
- package/dist/es/initReactivesearch.js +19 -0
- package/dist/es/version.js +1 -1
- package/package.json +2 -2
|
@@ -2756,7 +2756,12 @@
|
|
|
2756
2756
|
var aggsResponse = Object.values(action.aggregations) && Object.values(action.aggregations)[0];
|
|
2757
2757
|
var fieldName = Object.keys(action.aggregations)[0];
|
|
2758
2758
|
if (!aggsResponse) return state;
|
|
2759
|
-
var buckets =
|
|
2759
|
+
var buckets = [];
|
|
2760
|
+
|
|
2761
|
+
if (aggsResponse.buckets && Array.isArray(aggsResponse.buckets)) {
|
|
2762
|
+
buckets = aggsResponse.buckets;
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2760
2765
|
var parsedAggs = buckets.map(function (bucket) {
|
|
2761
2766
|
var doc_count = bucket.doc_count,
|
|
2762
2767
|
key = bucket.key,
|
|
@@ -2782,7 +2787,7 @@
|
|
|
2782
2787
|
return state;
|
|
2783
2788
|
}
|
|
2784
2789
|
});
|
|
2785
|
-
unwrapExports(compositeAggsReducer_1);
|
|
2790
|
+
var compositeAggsReducer = unwrapExports(compositeAggsReducer_1);
|
|
2786
2791
|
|
|
2787
2792
|
var appliedSettingsReducer_1 = createCommonjsModule(function (module, exports) {
|
|
2788
2793
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -14062,7 +14067,7 @@
|
|
|
14062
14067
|
},
|
|
14063
14068
|
props: {
|
|
14064
14069
|
currentPage: VueTypes.number.def(0),
|
|
14065
|
-
includeFields: types.includeFields
|
|
14070
|
+
includeFields: types.includeFields,
|
|
14066
14071
|
// component props
|
|
14067
14072
|
className: types.string,
|
|
14068
14073
|
componentId: types.stringRequired,
|
|
@@ -14071,7 +14076,7 @@
|
|
|
14071
14076
|
aggregationSize: VueTypes.number,
|
|
14072
14077
|
defaultQuery: types.func,
|
|
14073
14078
|
defaultSortOption: types.string,
|
|
14074
|
-
excludeFields: types.excludeFields
|
|
14079
|
+
excludeFields: types.excludeFields,
|
|
14075
14080
|
innerClass: types.style,
|
|
14076
14081
|
listClass: VueTypes.string.def(''),
|
|
14077
14082
|
loader: types.title,
|
|
@@ -14083,7 +14088,7 @@
|
|
|
14083
14088
|
pages: VueTypes.number.def(5),
|
|
14084
14089
|
pagination: VueTypes.bool.def(false),
|
|
14085
14090
|
infiniteScroll: VueTypes.bool.def(true),
|
|
14086
|
-
paginationAt:
|
|
14091
|
+
paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
|
|
14087
14092
|
react: types.react,
|
|
14088
14093
|
scrollOnChange: VueTypes.bool.def(true),
|
|
14089
14094
|
showResultStats: VueTypes.bool.def(true),
|
|
@@ -14711,11 +14716,7 @@
|
|
|
14711
14716
|
}; // Only used for SSR
|
|
14712
14717
|
|
|
14713
14718
|
ReactiveList.generateQueryOptions = function (props) {
|
|
14714
|
-
|
|
14715
|
-
var options = getQueryOptions(_extends({
|
|
14716
|
-
includeFields: ['*'],
|
|
14717
|
-
excludeFields: []
|
|
14718
|
-
}, props));
|
|
14719
|
+
var options = getQueryOptions(props);
|
|
14719
14720
|
var size = props.size,
|
|
14720
14721
|
dataField = props.dataField,
|
|
14721
14722
|
defaultSortOption = props.defaultSortOption,
|
|
@@ -16797,7 +16798,7 @@
|
|
|
16797
16798
|
headers: types.headers,
|
|
16798
16799
|
getSearchParams: types.func,
|
|
16799
16800
|
setSearchParams: types.func,
|
|
16800
|
-
as:
|
|
16801
|
+
as: VueTypes.string.def('div')
|
|
16801
16802
|
},
|
|
16802
16803
|
mounted: function mounted() {
|
|
16803
16804
|
var _this = this;
|
|
@@ -16945,7 +16946,9 @@
|
|
|
16945
16946
|
return value.map(function (item) {
|
|
16946
16947
|
return _this3.getValue(item);
|
|
16947
16948
|
});
|
|
16948
|
-
}
|
|
16949
|
+
}
|
|
16950
|
+
|
|
16951
|
+
if (value && typeof value === 'object') {
|
|
16949
16952
|
// TODO: support for NestedList
|
|
16950
16953
|
if (value.location) return value;
|
|
16951
16954
|
if (value.category) return value;
|
|
@@ -19509,8 +19512,8 @@
|
|
|
19509
19512
|
name: 'Mic',
|
|
19510
19513
|
props: {
|
|
19511
19514
|
children: types.title,
|
|
19512
|
-
lang:
|
|
19513
|
-
iconPosition:
|
|
19515
|
+
lang: VueTypes.string.def('en-US'),
|
|
19516
|
+
iconPosition: VueTypes.string.def('left'),
|
|
19514
19517
|
handleResult: types.func,
|
|
19515
19518
|
onNoMatch: types.func,
|
|
19516
19519
|
onError: types.func,
|
|
@@ -19922,10 +19925,10 @@
|
|
|
19922
19925
|
})]),
|
|
19923
19926
|
aggregationField: types.string,
|
|
19924
19927
|
aggregationSize: VueTypes.number,
|
|
19925
|
-
size: VueTypes.number
|
|
19928
|
+
size: VueTypes.number,
|
|
19926
19929
|
debounce: VueTypes.number.def(0),
|
|
19927
19930
|
defaultValue: types.string,
|
|
19928
|
-
excludeFields: types.excludeFields
|
|
19931
|
+
excludeFields: types.excludeFields,
|
|
19929
19932
|
value: types.value,
|
|
19930
19933
|
defaultSuggestions: types.suggestions,
|
|
19931
19934
|
enableSynonyms: VueTypes.bool.def(true),
|
|
@@ -19939,9 +19942,9 @@
|
|
|
19939
19942
|
highlightField: types.stringOrArray,
|
|
19940
19943
|
icon: types.children,
|
|
19941
19944
|
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
19942
|
-
includeFields: types.includeFields
|
|
19945
|
+
includeFields: types.includeFields,
|
|
19943
19946
|
innerClass: types.style,
|
|
19944
|
-
innerRef:
|
|
19947
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
19945
19948
|
render: types.func,
|
|
19946
19949
|
renderQuerySuggestions: types.func,
|
|
19947
19950
|
renderPopularSuggestions: types.func,
|
|
@@ -19973,7 +19976,7 @@
|
|
|
19973
19976
|
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
19974
19977
|
addonBefore: VueTypes.any,
|
|
19975
19978
|
addonAfter: VueTypes.any,
|
|
19976
|
-
expandSuggestionsContainer:
|
|
19979
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
19977
19980
|
index: VueTypes.string
|
|
19978
19981
|
},
|
|
19979
19982
|
beforeMount: function beforeMount() {
|
|
@@ -20634,7 +20637,7 @@
|
|
|
20634
20637
|
highlightedIndex: highlightedIndex
|
|
20635
20638
|
}), _this3.renderErrorComponent(), !_this3.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
20636
20639
|
"class": suggestions$1(_this3.themePreset, theme) + " " + getClassName$3(_this3.$props.innerClass, 'list')
|
|
20637
|
-
}, [_this3.suggestionsList.slice(0, size).map(function (item, index) {
|
|
20640
|
+
}, [_this3.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
20638
20641
|
return h("li", {
|
|
20639
20642
|
"domProps": _extends({}, getItemProps({
|
|
20640
20643
|
item: item
|
|
@@ -21113,7 +21116,7 @@
|
|
|
21113
21116
|
name: 'SingleList',
|
|
21114
21117
|
props: {
|
|
21115
21118
|
beforeValueChange: types.func,
|
|
21116
|
-
className:
|
|
21119
|
+
className: VueTypes.string.def(''),
|
|
21117
21120
|
componentId: types.stringRequired,
|
|
21118
21121
|
customQuery: types.func,
|
|
21119
21122
|
dataField: types.stringRequired,
|
|
@@ -21133,7 +21136,7 @@
|
|
|
21133
21136
|
showFilter: VueTypes.bool.def(true),
|
|
21134
21137
|
showRadio: VueTypes.bool.def(true),
|
|
21135
21138
|
showSearch: VueTypes.bool.def(true),
|
|
21136
|
-
size: VueTypes.number
|
|
21139
|
+
size: VueTypes.number,
|
|
21137
21140
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
21138
21141
|
title: types.title,
|
|
21139
21142
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -21594,7 +21597,7 @@
|
|
|
21594
21597
|
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
21595
21598
|
showCheckbox: VueTypes.bool.def(true),
|
|
21596
21599
|
beforeValueChange: types.func,
|
|
21597
|
-
className:
|
|
21600
|
+
className: VueTypes.string.def(''),
|
|
21598
21601
|
componentId: types.stringRequired,
|
|
21599
21602
|
customQuery: types.func,
|
|
21600
21603
|
dataField: types.stringRequired,
|
|
@@ -22596,7 +22599,9 @@
|
|
|
22596
22599
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
22597
22600
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
22598
22601
|
return h("div", [renderNoResults()]);
|
|
22599
|
-
}
|
|
22602
|
+
}
|
|
22603
|
+
|
|
22604
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
22600
22605
|
return renderNoResults;
|
|
22601
22606
|
}
|
|
22602
22607
|
|
|
@@ -32852,6 +32857,7 @@
|
|
|
32852
32857
|
var orderOfQueries = [];
|
|
32853
32858
|
var hits = {};
|
|
32854
32859
|
var aggregations = {};
|
|
32860
|
+
var compositeAggregations = {};
|
|
32855
32861
|
var state = {};
|
|
32856
32862
|
var customQueries = {};
|
|
32857
32863
|
var defaultQueries = {};
|
|
@@ -33086,6 +33092,11 @@
|
|
|
33086
33092
|
var _extends4;
|
|
33087
33093
|
|
|
33088
33094
|
aggregations = _extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
|
|
33095
|
+
compositeAggregations = compositeAggsReducer(compositeAggregations, {
|
|
33096
|
+
type: constants_9,
|
|
33097
|
+
aggregations: response.aggregations,
|
|
33098
|
+
append: false
|
|
33099
|
+
});
|
|
33089
33100
|
}
|
|
33090
33101
|
|
|
33091
33102
|
hits = _extends({}, hits, (_extends5 = {}, _extends5[component] = {
|
|
@@ -33112,6 +33123,8 @@
|
|
|
33112
33123
|
var promotedResults = {};
|
|
33113
33124
|
var rawData = {};
|
|
33114
33125
|
var customData = {};
|
|
33126
|
+
var settingsResponse = {};
|
|
33127
|
+
var timestamp = {};
|
|
33115
33128
|
var allPromises = orderOfQueries.map(function (component) {
|
|
33116
33129
|
return new Promise(function (responseResolve, responseReject) {
|
|
33117
33130
|
handleTransformResponse(res[component], component).then(function (response) {
|
|
@@ -33130,6 +33143,11 @@
|
|
|
33130
33143
|
|
|
33131
33144
|
if (response.customData) {
|
|
33132
33145
|
customData[component] = response.customData;
|
|
33146
|
+
} // Update settings
|
|
33147
|
+
|
|
33148
|
+
|
|
33149
|
+
if (response.settings) {
|
|
33150
|
+
settingsResponse[component] = response.settings;
|
|
33133
33151
|
}
|
|
33134
33152
|
|
|
33135
33153
|
if (response.aggregations) {
|
|
@@ -33138,6 +33156,7 @@
|
|
|
33138
33156
|
aggregations = _extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
|
|
33139
33157
|
}
|
|
33140
33158
|
|
|
33159
|
+
timestamp[component] = res._timestamp;
|
|
33141
33160
|
hits = _extends({}, hits, (_extends7 = {}, _extends7[component] = {
|
|
33142
33161
|
hits: response.hits.hits,
|
|
33143
33162
|
total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
|
|
@@ -33153,8 +33172,11 @@
|
|
|
33153
33172
|
Promise.all(allPromises).then(function () {
|
|
33154
33173
|
state = _extends({}, state, {
|
|
33155
33174
|
hits: hits,
|
|
33175
|
+
timestamp: timestamp,
|
|
33156
33176
|
aggregations: aggregations,
|
|
33177
|
+
compositeAggregations: compositeAggregations,
|
|
33157
33178
|
promotedResults: promotedResults,
|
|
33179
|
+
settings: settingsResponse,
|
|
33158
33180
|
customData: customData,
|
|
33159
33181
|
rawData: rawData
|
|
33160
33182
|
});
|
|
@@ -33213,7 +33235,7 @@
|
|
|
33213
33235
|
});
|
|
33214
33236
|
}
|
|
33215
33237
|
|
|
33216
|
-
var version = "1.16.0-alpha.
|
|
33238
|
+
var version = "1.16.0-alpha.28";
|
|
33217
33239
|
|
|
33218
33240
|
var _templateObject$o, _templateObject2$b;
|
|
33219
33241
|
|