@appbaseio/reactivesearch-vue 1.16.0-alpha.38 → 1.16.0-alpha.40
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 +53 -17
- 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/MultiDropdownList.js +9 -3
- package/dist/cjs/MultiList.js +9 -3
- package/dist/cjs/ReactiveComponent.js +1 -1
- package/dist/cjs/SingleDropdownList.js +1 -1
- package/dist/cjs/initReactivesearch.js +24 -4
- package/dist/cjs/version.js +1 -1
- package/dist/es/MultiDropdownList.js +9 -3
- package/dist/es/MultiList.js +9 -3
- package/dist/es/ReactiveComponent.js +1 -1
- package/dist/es/SingleDropdownList.js +1 -1
- package/dist/es/initReactivesearch.js +24 -4
- package/dist/es/version.js +1 -1
- package/package.json +1 -1
|
@@ -5057,7 +5057,9 @@
|
|
|
5057
5057
|
if (typeof comp !== 'string') {
|
|
5058
5058
|
return getQuery(comp, queryList);
|
|
5059
5059
|
} else if (comp in queryList) {
|
|
5060
|
-
|
|
5060
|
+
if (queryList[comp] && Object.keys(queryList[comp]).length) {
|
|
5061
|
+
return queryList[comp];
|
|
5062
|
+
}
|
|
5061
5063
|
}
|
|
5062
5064
|
|
|
5063
5065
|
return null;
|
|
@@ -5066,7 +5068,7 @@
|
|
|
5066
5068
|
});
|
|
5067
5069
|
var boolQuery = createBoolQuery(operation, queryArr);
|
|
5068
5070
|
|
|
5069
|
-
if (boolQuery) {
|
|
5071
|
+
if (boolQuery && Object.keys(boolQuery).length) {
|
|
5070
5072
|
query = [].concat(_toConsumableArray(query), [boolQuery]);
|
|
5071
5073
|
}
|
|
5072
5074
|
} else if (typeof react[conjunction] === 'string') {
|
|
@@ -5074,13 +5076,13 @@
|
|
|
5074
5076
|
|
|
5075
5077
|
var _boolQuery = createBoolQuery(_operation, queryList[react[conjunction]]);
|
|
5076
5078
|
|
|
5077
|
-
if (_boolQuery) {
|
|
5079
|
+
if (_boolQuery && Object.keys(_boolQuery).length) {
|
|
5078
5080
|
query = [].concat(_toConsumableArray(query), [_boolQuery]);
|
|
5079
5081
|
}
|
|
5080
5082
|
} else if (typeof react[conjunction] === 'object' && react[conjunction] !== null) {
|
|
5081
5083
|
var _boolQuery2 = getQuery(react[conjunction], queryList);
|
|
5082
5084
|
|
|
5083
|
-
if (_boolQuery2) {
|
|
5085
|
+
if (_boolQuery2 && Object.keys(_boolQuery2).length) {
|
|
5084
5086
|
query = [].concat(_toConsumableArray(query), [_boolQuery2]);
|
|
5085
5087
|
}
|
|
5086
5088
|
}
|
|
@@ -8871,6 +8873,8 @@
|
|
|
8871
8873
|
}, options, queryOptions[component]);
|
|
8872
8874
|
|
|
8873
8875
|
var oldQuery = queryLog[component];
|
|
8876
|
+
console.log('OLD QUERY', component, JSON.stringify(oldQuery));
|
|
8877
|
+
console.log('NEW QUERY', component, JSON.stringify(currentQuery));
|
|
8874
8878
|
|
|
8875
8879
|
if (mustExecuteMapQuery || !(0, helper.isEqual)(currentQuery, oldQuery)) {
|
|
8876
8880
|
orderOfQueries = [].concat(_toConsumableArray(orderOfQueries), [component]);
|
|
@@ -21233,7 +21237,7 @@
|
|
|
21233
21237
|
showCount: VueTypes.bool.def(true),
|
|
21234
21238
|
showFilter: VueTypes.bool.def(true),
|
|
21235
21239
|
showSearch: VueTypes.bool.def(true),
|
|
21236
|
-
size: VueTypes.number
|
|
21240
|
+
size: VueTypes.number,
|
|
21237
21241
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
21238
21242
|
title: types.title,
|
|
21239
21243
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -21662,7 +21666,13 @@
|
|
|
21662
21666
|
|
|
21663
21667
|
MultiList.defaultQuery = function (value, props) {
|
|
21664
21668
|
var query = null;
|
|
21665
|
-
var
|
|
21669
|
+
var queryFormat = props.queryFormat;
|
|
21670
|
+
|
|
21671
|
+
if (queryFormat === undefined) {
|
|
21672
|
+
queryFormat = 'or';
|
|
21673
|
+
}
|
|
21674
|
+
|
|
21675
|
+
var type = queryFormat === 'or' ? 'terms' : 'term';
|
|
21666
21676
|
|
|
21667
21677
|
if (!Array.isArray(value) || value.length === 0) {
|
|
21668
21678
|
return null;
|
|
@@ -21683,7 +21693,7 @@
|
|
|
21683
21693
|
} else if (value) {
|
|
21684
21694
|
var listQuery;
|
|
21685
21695
|
|
|
21686
|
-
if (
|
|
21696
|
+
if (queryFormat === 'or') {
|
|
21687
21697
|
if (props.showMissing) {
|
|
21688
21698
|
var _type, _ref;
|
|
21689
21699
|
|
|
@@ -22143,7 +22153,7 @@
|
|
|
22143
22153
|
selectAllLabel: types.string,
|
|
22144
22154
|
showCount: VueTypes.bool.def(true),
|
|
22145
22155
|
showFilter: VueTypes.bool.def(true),
|
|
22146
|
-
size: VueTypes.number
|
|
22156
|
+
size: VueTypes.number,
|
|
22147
22157
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
22148
22158
|
title: types.title,
|
|
22149
22159
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -22601,7 +22611,7 @@
|
|
|
22601
22611
|
selectAllLabel: types.string,
|
|
22602
22612
|
showCount: VueTypes.bool.def(true),
|
|
22603
22613
|
showFilter: VueTypes.bool.def(true),
|
|
22604
|
-
size: VueTypes.number
|
|
22614
|
+
size: VueTypes.number,
|
|
22605
22615
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
22606
22616
|
title: types.title,
|
|
22607
22617
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -22993,7 +23003,13 @@
|
|
|
22993
23003
|
|
|
22994
23004
|
MultiDropdownList.defaultQuery = function (value, props) {
|
|
22995
23005
|
var query = null;
|
|
22996
|
-
var
|
|
23006
|
+
var queryFormat = props.queryFormat;
|
|
23007
|
+
|
|
23008
|
+
if (queryFormat === undefined) {
|
|
23009
|
+
queryFormat = 'or';
|
|
23010
|
+
}
|
|
23011
|
+
|
|
23012
|
+
var type = queryFormat === 'or' ? 'terms' : 'term';
|
|
22997
23013
|
|
|
22998
23014
|
if (!Array.isArray(value) || value.length === 0) {
|
|
22999
23015
|
return null;
|
|
@@ -23014,7 +23030,7 @@
|
|
|
23014
23030
|
} else if (value) {
|
|
23015
23031
|
var listQuery;
|
|
23016
23032
|
|
|
23017
|
-
if (
|
|
23033
|
+
if (queryFormat === 'or') {
|
|
23018
23034
|
if (props.showMissing) {
|
|
23019
23035
|
var _type, _ref;
|
|
23020
23036
|
|
|
@@ -23467,7 +23483,7 @@
|
|
|
23467
23483
|
componentId: types.stringRequired,
|
|
23468
23484
|
aggregationField: types.string,
|
|
23469
23485
|
aggregationSize: VueTypes.number,
|
|
23470
|
-
size: VueTypes.number
|
|
23486
|
+
size: VueTypes.number,
|
|
23471
23487
|
defaultQuery: types.func,
|
|
23472
23488
|
customQuery: types.func,
|
|
23473
23489
|
filterLabel: types.string,
|
|
@@ -32478,7 +32494,8 @@
|
|
|
32478
32494
|
ReactiveGoogleMap.componentType = constants_1$1.reactiveMap;
|
|
32479
32495
|
|
|
32480
32496
|
var _excluded$5 = ["aggs", "size"],
|
|
32481
|
-
_excluded2 = ["query"]
|
|
32497
|
+
_excluded2 = ["query"],
|
|
32498
|
+
_excluded3 = ["aggs", "size"];
|
|
32482
32499
|
var X_SEARCH_CLIENT$1 = 'ReactiveSearch Vue';
|
|
32483
32500
|
var componentsWithoutFilters = [constants_1$1.numberBox, constants_1$1.ratingsFilter];
|
|
32484
32501
|
var resultComponents = [constants_1$1.reactiveList, constants_1$1.reactiveMap];
|
|
@@ -32640,6 +32657,7 @@
|
|
|
32640
32657
|
componentQueryOptions = _extends({}, componentQueryOptions, component.source.generateQueryOptions(component));
|
|
32641
32658
|
}
|
|
32642
32659
|
|
|
32660
|
+
console.log('QUERY LOG componentQueryOptions', component.componentId, componentQueryOptions);
|
|
32643
32661
|
var highlightQuery = {};
|
|
32644
32662
|
|
|
32645
32663
|
if (component.source.highlightQuery) {
|
|
@@ -32763,9 +32781,23 @@
|
|
|
32763
32781
|
queryObj = _buildQuery.queryObj,
|
|
32764
32782
|
options = _buildQuery.options;
|
|
32765
32783
|
|
|
32766
|
-
var
|
|
32784
|
+
var componentQueryOptions = options;
|
|
32785
|
+
var componentType = component.source.componentType;
|
|
32786
|
+
console.log('COMPONENT TYPE', componentType);
|
|
32787
|
+
|
|
32788
|
+
if (componentType !== constants_1$1.reactiveComponent) {
|
|
32789
|
+
// don't merge aggs, size
|
|
32790
|
+
var _ref3 = options || {},
|
|
32791
|
+
aggs = _ref3.aggs,
|
|
32792
|
+
size = _ref3.size,
|
|
32793
|
+
rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
32794
|
+
|
|
32795
|
+
componentQueryOptions = rest;
|
|
32796
|
+
}
|
|
32797
|
+
|
|
32798
|
+
var validOptions = ['aggs', 'from', 'sort']; // check if query or componentQueryOptions are valid - non-empty
|
|
32767
32799
|
|
|
32768
|
-
if (queryObj && !!Object.keys(queryObj).length ||
|
|
32800
|
+
if (queryObj && !!Object.keys(queryObj).length || componentQueryOptions && Object.keys(componentQueryOptions).some(function (item) {
|
|
32769
32801
|
return validOptions.includes(item);
|
|
32770
32802
|
})) {
|
|
32771
32803
|
var _extends2;
|
|
@@ -32780,8 +32812,12 @@
|
|
|
32780
32812
|
|
|
32781
32813
|
var currentQuery = _extends({
|
|
32782
32814
|
query: _extends({}, queryObj)
|
|
32783
|
-
},
|
|
32815
|
+
}, componentQueryOptions, queryOptions[component.componentId]);
|
|
32784
32816
|
|
|
32817
|
+
console.log('QUERY LOG build QUERY', component.componentId, queryObj);
|
|
32818
|
+
console.log('QUERY LOG build OPTIONS', component.componentId, componentQueryOptions);
|
|
32819
|
+
console.log('QUERY LOG OPTIONS (component)', component.componentId, queryOptions[component.componentId]);
|
|
32820
|
+
console.log('QUERY LOG', component.componentId, currentQuery);
|
|
32785
32821
|
queryLog = _extends({}, queryLog, (_extends2 = {}, _extends2[component.componentId] = currentQuery, _extends2));
|
|
32786
32822
|
|
|
32787
32823
|
if (settings.enableAppbase) {
|
|
@@ -32968,7 +33004,7 @@
|
|
|
32968
33004
|
});
|
|
32969
33005
|
}
|
|
32970
33006
|
|
|
32971
|
-
var version = "1.16.0-alpha.
|
|
33007
|
+
var version = "1.16.0-alpha.40";
|
|
32972
33008
|
|
|
32973
33009
|
var _templateObject$o, _templateObject2$b;
|
|
32974
33010
|
|