@appbaseio/reactivesearch-vue 1.16.0-alpha.39 → 1.16.0-alpha.41

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.
@@ -5057,7 +5057,9 @@
5057
5057
  if (typeof comp !== 'string') {
5058
5058
  return getQuery(comp, queryList);
5059
5059
  } else if (comp in queryList) {
5060
- return queryList[comp];
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
  }
@@ -8873,8 +8875,9 @@
8873
8875
  var oldQuery = queryLog[component];
8874
8876
  console.log('OLD QUERY', component, JSON.stringify(oldQuery));
8875
8877
  console.log('NEW QUERY', component, JSON.stringify(currentQuery));
8878
+ console.log('EXECUTING', component, mustExecuteMapQuery, (0, helper.isEqual)(currentQuery, oldQuery));
8876
8879
 
8877
- if (mustExecuteMapQuery || !(0, helper.isEqual)(currentQuery, oldQuery)) {
8880
+ if (mustExecuteMapQuery || !(0, helper.isEqual)(JSON.parse(JSON.stringify(currentQuery)), JSON.parse(JSON.stringify(oldQuery)))) {
8878
8881
  orderOfQueries = [].concat(_toConsumableArray(orderOfQueries), [component]);
8879
8882
  dispatch((0, misc.logQuery)(component, queryToLog));
8880
8883
  var isMapComponent = Object.keys(mapData).includes(component);
@@ -21664,7 +21667,13 @@
21664
21667
 
21665
21668
  MultiList.defaultQuery = function (value, props) {
21666
21669
  var query = null;
21667
- var type = props.queryFormat === 'or' ? 'terms' : 'term';
21670
+ var queryFormat = props.queryFormat;
21671
+
21672
+ if (queryFormat === undefined) {
21673
+ queryFormat = 'or';
21674
+ }
21675
+
21676
+ var type = queryFormat === 'or' ? 'terms' : 'term';
21668
21677
 
21669
21678
  if (!Array.isArray(value) || value.length === 0) {
21670
21679
  return null;
@@ -21685,7 +21694,7 @@
21685
21694
  } else if (value) {
21686
21695
  var listQuery;
21687
21696
 
21688
- if (props.queryFormat === 'or') {
21697
+ if (queryFormat === 'or') {
21689
21698
  if (props.showMissing) {
21690
21699
  var _type, _ref;
21691
21700
 
@@ -22995,7 +23004,13 @@
22995
23004
 
22996
23005
  MultiDropdownList.defaultQuery = function (value, props) {
22997
23006
  var query = null;
22998
- var type = props.queryFormat === 'or' ? 'terms' : 'term';
23007
+ var queryFormat = props.queryFormat;
23008
+
23009
+ if (queryFormat === undefined) {
23010
+ queryFormat = 'or';
23011
+ }
23012
+
23013
+ var type = queryFormat === 'or' ? 'terms' : 'term';
22999
23014
 
23000
23015
  if (!Array.isArray(value) || value.length === 0) {
23001
23016
  return null;
@@ -23016,7 +23031,7 @@
23016
23031
  } else if (value) {
23017
23032
  var listQuery;
23018
23033
 
23019
- if (props.queryFormat === 'or') {
23034
+ if (queryFormat === 'or') {
23020
23035
  if (props.showMissing) {
23021
23036
  var _type, _ref;
23022
23037
 
@@ -23542,18 +23557,9 @@
23542
23557
  queryToBeSet = obj.query.query;
23543
23558
  }
23544
23559
 
23545
- var customQueryCalc = _extends({}, options); // Update customQuery field for RS API
23546
-
23560
+ var customQueryCalc = queryToBeSet; // Update customQuery field for RS API
23547
23561
 
23548
23562
  if (queryToBeSet || options) {
23549
- if (queryToBeSet.query) {
23550
- if (queryToBeSet.id) {
23551
- customQueryCalc = queryToBeSet;
23552
- } else {
23553
- customQueryCalc.query = queryToBeSet;
23554
- }
23555
- }
23556
-
23557
23563
  _this.setCustomQuery(props.componentId, customQueryCalc);
23558
23564
  }
23559
23565
 
@@ -32733,7 +32739,8 @@
32733
32739
  });
32734
32740
  }
32735
32741
 
32736
- var customQuery = getCustomQuery(component, value); // set custom query for main component
32742
+ var customQuery = getCustomQuery(component, value);
32743
+ console.log('SETTING CUSTOM QUERY', component.componentId, customQuery); // set custom query for main component
32737
32744
 
32738
32745
  queryList = queryReducer(queryList, {
32739
32746
  type: 'SET_QUERY',
@@ -32990,7 +32997,7 @@
32990
32997
  });
32991
32998
  }
32992
32999
 
32993
- var version = "1.16.0-alpha.39";
33000
+ var version = "1.16.0-alpha.41";
32994
33001
 
32995
33002
  var _templateObject$o, _templateObject2$b;
32996
33003