@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.
@@ -469,7 +469,13 @@ var MultiDropdownList = {
469
469
 
470
470
  MultiDropdownList.defaultQuery = function (value, props) {
471
471
  var query = null;
472
- var type = props.queryFormat === 'or' ? 'terms' : 'term';
472
+ var queryFormat = props.queryFormat;
473
+
474
+ if (queryFormat === undefined) {
475
+ queryFormat = 'or';
476
+ }
477
+
478
+ var type = queryFormat === 'or' ? 'terms' : 'term';
473
479
 
474
480
  if (!Array.isArray(value) || value.length === 0) {
475
481
  return null;
@@ -490,7 +496,7 @@ MultiDropdownList.defaultQuery = function (value, props) {
490
496
  } else if (value) {
491
497
  var listQuery;
492
498
 
493
- if (props.queryFormat === 'or') {
499
+ if (queryFormat === 'or') {
494
500
  if (props.showMissing) {
495
501
  var _type, _ref;
496
502
 
@@ -489,7 +489,13 @@ var MultiList = {
489
489
 
490
490
  MultiList.defaultQuery = function (value, props) {
491
491
  var query = null;
492
- var type = props.queryFormat === 'or' ? 'terms' : 'term';
492
+ var queryFormat = props.queryFormat;
493
+
494
+ if (queryFormat === undefined) {
495
+ queryFormat = 'or';
496
+ }
497
+
498
+ var type = queryFormat === 'or' ? 'terms' : 'term';
493
499
 
494
500
  if (!Array.isArray(value) || value.length === 0) {
495
501
  return null;
@@ -510,7 +516,7 @@ MultiList.defaultQuery = function (value, props) {
510
516
  } else if (value) {
511
517
  var listQuery;
512
518
 
513
- if (props.queryFormat === 'or') {
519
+ if (queryFormat === 'or') {
514
520
  if (props.showMissing) {
515
521
  var _type, _ref;
516
522
 
@@ -105,18 +105,9 @@ var ReactiveComponent = {
105
105
  queryToBeSet = obj.query.query;
106
106
  }
107
107
 
108
- var customQueryCalc = _rollupPluginBabelHelpers._extends({}, options); // Update customQuery field for RS API
109
-
108
+ var customQueryCalc = queryToBeSet; // Update customQuery field for RS API
110
109
 
111
110
  if (queryToBeSet || options) {
112
- if (queryToBeSet.query) {
113
- if (queryToBeSet.id) {
114
- customQueryCalc = queryToBeSet;
115
- } else {
116
- customQueryCalc.query = queryToBeSet;
117
- }
118
- }
119
-
120
111
  _this.setCustomQuery(props.componentId, customQueryCalc);
121
112
  }
122
113
 
@@ -272,7 +272,8 @@ function initReactivesearch(componentCollection, searchState, settings) {
272
272
  });
273
273
  }
274
274
 
275
- var customQuery = getCustomQuery(component, value); // set custom query for main component
275
+ var customQuery = getCustomQuery(component, value);
276
+ console.log('SETTING CUSTOM QUERY', component.componentId, customQuery); // set custom query for main component
276
277
 
277
278
  queryList = queryReducer(queryList, {
278
279
  type: 'SET_QUERY',
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "1.16.0-alpha.39";
5
+ var version = "1.16.0-alpha.41";
6
6
 
7
7
  exports.default = version;
@@ -462,7 +462,13 @@ var MultiDropdownList = {
462
462
 
463
463
  MultiDropdownList.defaultQuery = function (value, props) {
464
464
  var query = null;
465
- var type = props.queryFormat === 'or' ? 'terms' : 'term';
465
+ var queryFormat = props.queryFormat;
466
+
467
+ if (queryFormat === undefined) {
468
+ queryFormat = 'or';
469
+ }
470
+
471
+ var type = queryFormat === 'or' ? 'terms' : 'term';
466
472
 
467
473
  if (!Array.isArray(value) || value.length === 0) {
468
474
  return null;
@@ -483,7 +489,7 @@ MultiDropdownList.defaultQuery = function (value, props) {
483
489
  } else if (value) {
484
490
  var listQuery;
485
491
 
486
- if (props.queryFormat === 'or') {
492
+ if (queryFormat === 'or') {
487
493
  if (props.showMissing) {
488
494
  var _type, _ref;
489
495
 
@@ -482,7 +482,13 @@ var MultiList = {
482
482
 
483
483
  MultiList.defaultQuery = function (value, props) {
484
484
  var query = null;
485
- var type = props.queryFormat === 'or' ? 'terms' : 'term';
485
+ var queryFormat = props.queryFormat;
486
+
487
+ if (queryFormat === undefined) {
488
+ queryFormat = 'or';
489
+ }
490
+
491
+ var type = queryFormat === 'or' ? 'terms' : 'term';
486
492
 
487
493
  if (!Array.isArray(value) || value.length === 0) {
488
494
  return null;
@@ -503,7 +509,7 @@ MultiList.defaultQuery = function (value, props) {
503
509
  } else if (value) {
504
510
  var listQuery;
505
511
 
506
- if (props.queryFormat === 'or') {
512
+ if (queryFormat === 'or') {
507
513
  if (props.showMissing) {
508
514
  var _type, _ref;
509
515
 
@@ -98,18 +98,9 @@ var ReactiveComponent = {
98
98
  queryToBeSet = obj.query.query;
99
99
  }
100
100
 
101
- var customQueryCalc = _extends({}, options); // Update customQuery field for RS API
102
-
101
+ var customQueryCalc = queryToBeSet; // Update customQuery field for RS API
103
102
 
104
103
  if (queryToBeSet || options) {
105
- if (queryToBeSet.query) {
106
- if (queryToBeSet.id) {
107
- customQueryCalc = queryToBeSet;
108
- } else {
109
- customQueryCalc.query = queryToBeSet;
110
- }
111
- }
112
-
113
104
  _this.setCustomQuery(props.componentId, customQueryCalc);
114
105
  }
115
106
 
@@ -266,7 +266,8 @@ function initReactivesearch(componentCollection, searchState, settings) {
266
266
  });
267
267
  }
268
268
 
269
- var customQuery = getCustomQuery(component, value); // set custom query for main component
269
+ var customQuery = getCustomQuery(component, value);
270
+ console.log('SETTING CUSTOM QUERY', component.componentId, customQuery); // set custom query for main component
270
271
 
271
272
  queryList = queryReducer(queryList, {
272
273
  type: 'SET_QUERY',
@@ -1,3 +1,3 @@
1
- var version = "1.16.0-alpha.39";
1
+ var version = "1.16.0-alpha.41";
2
2
 
3
3
  export default version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appbaseio/reactivesearch-vue",
3
- "version": "1.16.0-alpha.39",
3
+ "version": "1.16.0-alpha.41",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "jsnext:main": "dist/es/index.js",