@appbaseio/reactivesearch-vue 1.27.0-gamma.2 → 1.28.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.
Files changed (47) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +4551 -6116
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/DataSearch.js +2107 -18
  6. package/dist/cjs/{DropDown-0076babc.js → DropDown-7aa3d0d2.js} +1 -1
  7. package/dist/cjs/DynamicRangeSlider.js +24 -16
  8. package/dist/cjs/{Input-a9ee53ed.js → Input-3cc3fa59.js} +1 -1
  9. package/dist/cjs/MultiDropdownList.js +35 -26
  10. package/dist/cjs/MultiList.js +34 -24
  11. package/dist/cjs/MultiRange.js +2 -3
  12. package/dist/cjs/RangeInput.js +1 -1
  13. package/dist/cjs/RangeSlider.js +2 -3
  14. package/dist/cjs/ReactiveComponent.js +41 -72
  15. package/dist/cjs/ReactiveList.js +37 -47
  16. package/dist/cjs/SelectedFilters.js +5 -3
  17. package/dist/cjs/SingleDropdownList.js +22 -19
  18. package/dist/cjs/SingleList.js +20 -17
  19. package/dist/cjs/SingleRange.js +2 -3
  20. package/dist/cjs/index.js +8 -9
  21. package/dist/cjs/initReactivesearch.js +109 -77
  22. package/dist/cjs/install.js +28 -23
  23. package/dist/cjs/version.js +1 -1
  24. package/dist/es/DataSearch.js +2106 -17
  25. package/dist/es/{DropDown-0dd8f2a3.js → DropDown-60a426a2.js} +1 -1
  26. package/dist/es/DynamicRangeSlider.js +24 -16
  27. package/dist/es/{Input-10b1d62d.js → Input-08bb1bcf.js} +1 -1
  28. package/dist/es/MultiDropdownList.js +35 -26
  29. package/dist/es/MultiList.js +34 -24
  30. package/dist/es/MultiRange.js +2 -3
  31. package/dist/es/RangeInput.js +1 -1
  32. package/dist/es/RangeSlider.js +2 -3
  33. package/dist/es/ReactiveComponent.js +41 -72
  34. package/dist/es/ReactiveList.js +37 -47
  35. package/dist/es/SelectedFilters.js +5 -3
  36. package/dist/es/SingleDropdownList.js +22 -19
  37. package/dist/es/SingleList.js +20 -17
  38. package/dist/es/SingleRange.js +2 -3
  39. package/dist/es/index.js +5 -5
  40. package/dist/es/initReactivesearch.js +111 -79
  41. package/dist/es/install.js +30 -21
  42. package/dist/es/version.js +1 -1
  43. package/package.json +3 -3
  44. package/dist/cjs/DataSearch-37dfdf39.js +0 -2154
  45. package/dist/cjs/install-d95c7185.js +0 -1204
  46. package/dist/es/DataSearch-77325036.js +0 -2141
  47. package/dist/es/install-432674ef.js +0 -1197
@@ -7,7 +7,7 @@ import { t as types } from './vueTypes-687b2304.js';
7
7
  import { a as isFunction } from './index-78920565.js';
8
8
  import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
9
9
  import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-c2c03a35.js';
10
- import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-10b1d62d.js';
10
+ import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-08bb1bcf.js';
11
11
  import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
12
12
 
13
13
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
@@ -22,9 +22,10 @@ var addComponent = Actions.addComponent,
22
22
  updateComponentProps = Actions.updateComponentProps;
23
23
  var checkValueChange = helper.checkValueChange,
24
24
  getClassName = helper.getClassName,
25
- getOptionsFromQuery = helper.getOptionsFromQuery,
26
25
  isEqual = helper.isEqual,
27
- checkSomePropChange = helper.checkSomePropChange;
26
+ checkSomePropChange = helper.checkSomePropChange,
27
+ extractQueryFromCustomQuery = helper.extractQueryFromCustomQuery,
28
+ getOptionsForCustomQuery = helper.getOptionsForCustomQuery;
28
29
  var DynamicRangeSlider = {
29
30
  name: 'DynamicRangeSlider',
30
31
  components: getComponents(),
@@ -232,28 +233,31 @@ var DynamicRangeSlider = {
232
233
  },
233
234
  updateQueryHandler: function updateQueryHandler(value) {
234
235
  var query = DynamicRangeSlider.defaultQuery(value, this.$props);
235
- var customQueryOptions;
236
236
 
237
237
  if (this.$props.customQuery) {
238
- var _ref2 = this.$props.customQuery(value, this.$props) || {};
238
+ var customQueryTobeSet = this.$props.customQuery(value, this.$props);
239
+ var queryTobeSet = extractQueryFromCustomQuery(customQueryTobeSet);
239
240
 
240
- query = _ref2.query;
241
- customQueryOptions = getOptionsFromQuery(this.$props.customQuery(value, this.$props));
241
+ if (queryTobeSet) {
242
+ query = queryTobeSet;
243
+ }
244
+
245
+ var customQueryOptions = getOptionsForCustomQuery(customQueryTobeSet);
242
246
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, value);
247
+ this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
243
248
  }
244
249
 
245
- var _ref3 = this.range || {
250
+ var _ref2 = this.range || {
246
251
  start: value[0],
247
252
  end: value[1]
248
253
  },
249
- start = _ref3.start,
250
- end = _ref3.end;
254
+ start = _ref2.start,
255
+ end = _ref2.end;
251
256
 
252
257
  var currentStart = value[0],
253
258
  currentEnd = value[1]; // check if the slider is at its initial position
254
259
 
255
260
  var isInitialValue = currentStart === start && currentEnd === end;
256
- this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
257
261
  this.updateQuery({
258
262
  componentId: this.$props.componentId,
259
263
  query: query,
@@ -300,13 +304,13 @@ var DynamicRangeSlider = {
300
304
  range: function range(newValue, oldValue) {
301
305
  if (isEqual(newValue, oldValue) || !this.currentValue) return;
302
306
 
303
- var _ref4 = this.currentValue || [],
304
- currentStart = _ref4[0],
305
- currentEnd = _ref4[1];
307
+ var _ref3 = this.currentValue || [],
308
+ currentStart = _ref3[0],
309
+ currentEnd = _ref3[1];
306
310
 
307
- var _ref5 = oldValue || {},
308
- oldStart = _ref5.start,
309
- oldEnd = _ref5.end;
311
+ var _ref4 = oldValue || {},
312
+ oldStart = _ref4.start,
313
+ oldEnd = _ref4.end;
310
314
 
311
315
  var newStart = currentStart === oldStart ? newValue.start : currentStart;
312
316
  var newEnd = currentEnd === oldEnd ? newValue.end : currentEnd;
@@ -401,6 +405,10 @@ DynamicRangeSlider.parseValue = function (value) {
401
405
  return [];
402
406
  };
403
407
 
408
+ DynamicRangeSlider.hasInternalComponent = function () {
409
+ return true;
410
+ };
411
+
404
412
  var mapStateToProps = function mapStateToProps(state, props) {
405
413
  var componentId = state.aggregations[props.componentId];
406
414
  var internalRange = state.aggregations[props.componentId + "__range__internal"];
@@ -59,7 +59,7 @@ var Input = styled('input')(_templateObject5 || (_templateObject5 = _taggedTempl
59
59
  });
60
60
 
61
61
  var suggestions = function suggestions(themePreset, theme) {
62
- return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: min(100vh, 395px);\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark(theme));
62
+ return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 395px;\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark(theme));
63
63
  };
64
64
 
65
65
  var suggestionsContainer = css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
@@ -14,12 +14,12 @@ import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
14
14
  import '@vue/babel-helper-vue-jsx-merge-props';
15
15
  import { T as Title } from './Title-3522ff56.js';
16
16
  import './CancelSvg-c2c03a35.js';
17
- import './Input-10b1d62d.js';
17
+ import './Input-08bb1bcf.js';
18
18
  import 'compute-scroll-into-view';
19
19
  import { C as Container } from './Container-18b03fde.js';
20
20
  import '@appbaseio/reactivecore/lib/utils/suggestions';
21
21
  import { g as getAggsQuery } from './utils-64a2e5f0.js';
22
- import { D as Dropdown } from './DropDown-0dd8f2a3.js';
22
+ import { D as Dropdown } from './DropDown-60a426a2.js';
23
23
 
24
24
  var updateQuery = Actions.updateQuery,
25
25
  setQueryOptions = Actions.setQueryOptions,
@@ -30,8 +30,9 @@ var isEqual = helper.isEqual,
30
30
  checkValueChange = helper.checkValueChange,
31
31
  checkPropChange = helper.checkPropChange,
32
32
  getClassName = helper.getClassName,
33
- getOptionsFromQuery = helper.getOptionsFromQuery,
34
- getCompositeAggsQuery = helper.getCompositeAggsQuery;
33
+ getCompositeAggsQuery = helper.getCompositeAggsQuery,
34
+ extractQueryFromCustomQuery = helper.extractQueryFromCustomQuery,
35
+ getOptionsForCustomQuery = helper.getOptionsForCustomQuery;
35
36
  var MultiDropdownList = {
36
37
  name: 'MultiDropdownList',
37
38
  data: function data() {
@@ -69,7 +70,7 @@ var MultiDropdownList = {
69
70
  selectAllLabel: types.string,
70
71
  showCount: VueTypes.bool.def(true),
71
72
  showFilter: VueTypes.bool.def(true),
72
- size: VueTypes.number.def(100),
73
+ size: VueTypes.number,
73
74
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
74
75
  title: types.title,
75
76
  URLParams: VueTypes.bool.def(false),
@@ -355,22 +356,22 @@ var MultiDropdownList = {
355
356
  checkValueChange(props.componentId, finalValues, props.beforeValueChange, performUpdate);
356
357
  },
357
358
  updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
358
- var defaultQueryOptions;
359
359
  var query = MultiDropdownList.defaultQuery(value, props);
360
360
 
361
361
  if (this.defaultQuery) {
362
362
  var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
363
+ var defaultQueryObj = extractQueryFromCustomQuery(defaultQueryToBeSet);
363
364
 
364
- if (defaultQueryToBeSet.query) {
365
- query = defaultQueryToBeSet.query;
366
- }
365
+ if (defaultQueryObj) {
366
+ query = defaultQueryObj;
367
+ } // Update calculated default query in store
367
368
 
368
- defaultQueryOptions = getOptionsFromQuery(defaultQueryToBeSet); // Update calculated default query in store
369
369
 
370
370
  updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
371
+ var defaultQueryOptions = getOptionsForCustomQuery(defaultQueryToBeSet);
372
+ this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
371
373
  }
372
374
 
373
- this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
374
375
  this.updateQuery({
375
376
  componentId: this.internalComponent,
376
377
  query: query,
@@ -381,17 +382,15 @@ var MultiDropdownList = {
381
382
  updateQueryHandler: function updateQueryHandler(value, props) {
382
383
  var customQuery = props.customQuery;
383
384
  var query = MultiDropdownList.defaultQuery(value, props);
384
- var customQueryOptions;
385
385
 
386
386
  if (customQuery) {
387
- var _ref = customQuery(value, props) || {};
388
-
389
- query = _ref.query;
390
- customQueryOptions = getOptionsFromQuery(customQuery(value, props));
387
+ var customQueryCalc = customQuery(value, props);
388
+ query = extractQueryFromCustomQuery(customQueryCalc);
391
389
  updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
390
+ var customQueryOptions = getOptionsForCustomQuery(customQueryCalc);
391
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
392
392
  }
393
393
 
394
- this.setQueryOptions(props.componentId, customQueryOptions, false);
395
394
  this.updateQuery({
396
395
  componentId: props.componentId,
397
396
  query: query,
@@ -425,7 +424,7 @@ var MultiDropdownList = {
425
424
 
426
425
  if (props.defaultQuery) {
427
426
  var value = Object.keys(this.$data.currentValue);
428
- var defaultQueryOptions = getOptionsFromQuery(props.defaultQuery(value, props));
427
+ var defaultQueryOptions = getOptionsForCustomQuery(props.defaultQuery(value, props));
429
428
  this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
430
429
  } else {
431
430
  this.setQueryOptions(this.internalComponent, queryOptions);
@@ -461,7 +460,13 @@ var MultiDropdownList = {
461
460
 
462
461
  MultiDropdownList.defaultQuery = function (value, props) {
463
462
  var query = null;
464
- var type = props.queryFormat === 'or' ? 'terms' : 'term';
463
+ var queryFormat = props.queryFormat;
464
+
465
+ if (queryFormat === undefined) {
466
+ queryFormat = 'or';
467
+ }
468
+
469
+ var type = queryFormat === 'or' ? 'terms' : 'term';
465
470
 
466
471
  if (!Array.isArray(value) || value.length === 0) {
467
472
  return null;
@@ -482,14 +487,14 @@ MultiDropdownList.defaultQuery = function (value, props) {
482
487
  } else if (value) {
483
488
  var listQuery;
484
489
 
485
- if (props.queryFormat === 'or') {
490
+ if (queryFormat === 'or') {
486
491
  if (props.showMissing) {
487
- var _type, _ref2;
492
+ var _type, _ref;
488
493
 
489
494
  var hasMissingTerm = value.includes(props.missingLabel);
490
- var should = [(_ref2 = {}, _ref2[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
495
+ var should = [(_ref = {}, _ref[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
491
496
  return item !== props.missingLabel;
492
- }), _type), _ref2)];
497
+ }), _type), _ref)];
493
498
 
494
499
  if (hasMissingTerm) {
495
500
  should = should.concat({
@@ -516,9 +521,9 @@ MultiDropdownList.defaultQuery = function (value, props) {
516
521
  } else {
517
522
  // adds a sub-query with must as an array of objects for each term/value
518
523
  var queryArray = value.map(function (item) {
519
- var _type3, _ref3;
524
+ var _type3, _ref2;
520
525
 
521
- return _ref3 = {}, _ref3[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref3;
526
+ return _ref2 = {}, _ref2[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref2;
522
527
  });
523
528
  listQuery = {
524
529
  bool: {
@@ -553,6 +558,10 @@ MultiDropdownList.generateQueryOptions = function (props, after) {
553
558
  }) : getAggsQuery(queryOptions, props);
554
559
  };
555
560
 
561
+ MultiDropdownList.hasInternalComponent = function () {
562
+ return true;
563
+ };
564
+
556
565
  var mapStateToProps = function mapStateToProps(state, props) {
557
566
  return {
558
567
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
@@ -574,7 +583,7 @@ var mapDispatchtoProps = {
574
583
  };
575
584
  var ListConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(MultiDropdownList), {
576
585
  componentType: componentTypes.multiDropdownList,
577
- internalComponent: true
586
+ internalComponent: MultiDropdownList.hasInternalComponent()
578
587
  });
579
588
 
580
589
  MultiDropdownList.install = function (Vue) {
@@ -11,7 +11,7 @@ import 'redux';
11
11
  import { f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, a as isFunction, n as isEvent, o as parseValueArray, g as getComponent, h as hasCustomRenderer, c as connect } from './index-78920565.js';
12
12
  import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
13
13
  import { T as Title } from './Title-3522ff56.js';
14
- import { I as Input } from './Input-10b1d62d.js';
14
+ import { I as Input } from './Input-08bb1bcf.js';
15
15
  import { C as Container } from './Container-18b03fde.js';
16
16
  import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
17
17
  import { U as UL, C as Checkbox } from './FormControlList-704f8dee.js';
@@ -25,7 +25,8 @@ var isEqual = helper.isEqual,
25
25
  getQueryOptions = helper.getQueryOptions,
26
26
  checkValueChange = helper.checkValueChange,
27
27
  getClassName = helper.getClassName,
28
- getOptionsFromQuery = helper.getOptionsFromQuery;
28
+ extractQueryFromCustomQuery = helper.extractQueryFromCustomQuery,
29
+ getOptionsForCustomQuery = helper.getOptionsForCustomQuery;
29
30
  var MultiList = {
30
31
  name: 'MultiList',
31
32
  props: {
@@ -52,7 +53,7 @@ var MultiList = {
52
53
  showCount: VueTypes.bool.def(true),
53
54
  showFilter: VueTypes.bool.def(true),
54
55
  showSearch: VueTypes.bool.def(true),
55
- size: VueTypes.number.def(100),
56
+ size: VueTypes.number,
56
57
  sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
57
58
  title: types.title,
58
59
  URLParams: VueTypes.bool.def(false),
@@ -339,22 +340,22 @@ var MultiList = {
339
340
  checkValueChange(props.componentId, finalValues, props.beforeValueChange, performUpdate);
340
341
  },
341
342
  updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
342
- var defaultQueryOptions;
343
343
  var query = MultiList.defaultQuery(value, props);
344
344
 
345
345
  if (this.defaultQuery) {
346
346
  var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
347
+ var defaultQueryObj = extractQueryFromCustomQuery(defaultQueryToBeSet);
347
348
 
348
- if (defaultQueryToBeSet.query) {
349
- query = defaultQueryToBeSet.query;
350
- }
349
+ if (defaultQueryObj) {
350
+ query = defaultQueryObj;
351
+ } // Update calculated default query in store
351
352
 
352
- defaultQueryOptions = getOptionsFromQuery(defaultQueryToBeSet); // Update calculated default query in store
353
353
 
354
354
  updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
355
+ var defaultQueryOptions = getOptionsForCustomQuery(defaultQueryToBeSet);
356
+ this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
355
357
  }
356
358
 
357
- this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
358
359
  this.updateQuery({
359
360
  componentId: this.internalComponent,
360
361
  query: query,
@@ -365,17 +366,15 @@ var MultiList = {
365
366
  updateQueryHandler: function updateQueryHandler(value, props) {
366
367
  var customQuery = props.customQuery;
367
368
  var query = MultiList.defaultQuery(value, props);
368
- var customQueryOptions;
369
369
 
370
370
  if (customQuery) {
371
- var _ref = customQuery(value, props) || {};
372
-
373
- query = _ref.query;
374
- customQueryOptions = getOptionsFromQuery(customQuery(value, props));
371
+ var customQueryCalc = customQuery(value, props);
372
+ query = extractQueryFromCustomQuery(customQueryCalc);
375
373
  updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
374
+ var customQueryOptions = getOptionsForCustomQuery(customQueryCalc);
375
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
376
376
  }
377
377
 
378
- this.setQueryOptions(props.componentId, customQueryOptions, false);
379
378
  this.updateQuery({
380
379
  componentId: props.componentId,
381
380
  query: query,
@@ -395,7 +394,7 @@ var MultiList = {
395
394
 
396
395
  if (props.defaultQuery) {
397
396
  var value = Object.keys(this.$data.currentValue);
398
- var defaultQueryOptions = getOptionsFromQuery(props.defaultQuery(value, props));
397
+ var defaultQueryOptions = getOptionsForCustomQuery(props.defaultQuery(value, props));
399
398
  this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
400
399
  } else {
401
400
  this.setQueryOptions(this.internalComponent, queryOptions);
@@ -481,7 +480,13 @@ var MultiList = {
481
480
 
482
481
  MultiList.defaultQuery = function (value, props) {
483
482
  var query = null;
484
- var type = props.queryFormat === 'or' ? 'terms' : 'term';
483
+ var queryFormat = props.queryFormat;
484
+
485
+ if (queryFormat === undefined) {
486
+ queryFormat = 'or';
487
+ }
488
+
489
+ var type = queryFormat === 'or' ? 'terms' : 'term';
485
490
 
486
491
  if (!Array.isArray(value) || value.length === 0) {
487
492
  return null;
@@ -502,14 +507,14 @@ MultiList.defaultQuery = function (value, props) {
502
507
  } else if (value) {
503
508
  var listQuery;
504
509
 
505
- if (props.queryFormat === 'or') {
510
+ if (queryFormat === 'or') {
506
511
  if (props.showMissing) {
507
- var _type, _ref2;
512
+ var _type, _ref;
508
513
 
509
514
  var hasMissingTerm = value.includes(props.missingLabel);
510
- var should = [(_ref2 = {}, _ref2[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
515
+ var should = [(_ref = {}, _ref[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
511
516
  return item !== props.missingLabel;
512
- }), _type), _ref2)];
517
+ }), _type), _ref)];
513
518
 
514
519
  if (hasMissingTerm) {
515
520
  should = should.concat({
@@ -536,9 +541,9 @@ MultiList.defaultQuery = function (value, props) {
536
541
  } else {
537
542
  // adds a sub-query with must as an array of objects for each term/value
538
543
  var queryArray = value.map(function (item) {
539
- var _type3, _ref3;
544
+ var _type3, _ref2;
540
545
 
541
- return _ref3 = {}, _ref3[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref3;
546
+ return _ref2 = {}, _ref2[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref2;
542
547
  });
543
548
  listQuery = {
544
549
  bool: {
@@ -588,9 +593,14 @@ var mapDispatchtoProps = {
588
593
  setCustomQuery: setCustomQuery,
589
594
  setDefaultQuery: setDefaultQuery
590
595
  };
596
+
597
+ MultiList.hasInternalComponent = function () {
598
+ return true;
599
+ };
600
+
591
601
  var ListConnected = ComponentWrapper(connect(mapStateToProps, mapDispatchtoProps)(MultiList), {
592
602
  componentType: componentTypes.multiList,
593
- internalComponent: true
603
+ internalComponent: MultiList.hasInternalComponent()
594
604
  });
595
605
 
596
606
  MultiList.install = function (Vue) {
@@ -131,17 +131,16 @@ var MultiRange = {
131
131
  updateQueryHandler: function updateQueryHandler(value, props) {
132
132
  var customQuery = props.customQuery;
133
133
  var query = MultiRange.defaultQuery(value, props);
134
- var customQueryOptions;
135
134
 
136
135
  if (customQuery) {
137
136
  var _ref = customQuery(value, props) || {};
138
137
 
139
138
  query = _ref.query;
140
- customQueryOptions = getOptionsFromQuery(customQuery(value, props));
139
+ var customQueryOptions = getOptionsFromQuery(customQuery(value, props));
141
140
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
141
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
142
142
  }
143
143
 
144
- this.setQueryOptions(props.componentId, customQueryOptions, false);
145
144
  this.updateQuery({
146
145
  componentId: props.componentId,
147
146
  query: query,
@@ -12,7 +12,7 @@ import { c as connect } from './index-78920565.js';
12
12
  import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
13
13
  import './Title-3522ff56.js';
14
14
  import { F as Flex } from './Flex-8770345d.js';
15
- import { I as Input } from './Input-10b1d62d.js';
15
+ import { I as Input } from './Input-08bb1bcf.js';
16
16
  import { C as Container } from './Container-18b03fde.js';
17
17
  import 'vue-no-ssr';
18
18
  import './ssr-a41dfea9.js';
@@ -108,14 +108,14 @@ var RangeSlider = {
108
108
  updateQueryHandler: function updateQueryHandler(value, props) {
109
109
  var customQuery = props.customQuery;
110
110
  var query = RangeSlider.defaultQuery(value, props);
111
- var customQueryOptions;
112
111
 
113
112
  if (customQuery) {
114
113
  var _ref = customQuery(value, props) || {};
115
114
 
116
115
  query = _ref.query;
117
- customQueryOptions = getOptionsFromQuery(customQuery(value, props));
116
+ var customQueryOptions = getOptionsFromQuery(customQuery(value, props));
118
117
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
118
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
119
119
  }
120
120
 
121
121
  var showFilter = props.showFilter,
@@ -126,7 +126,6 @@ var RangeSlider = {
126
126
  currentEnd = value[1]; // check if the slider is at its initial position
127
127
 
128
128
  var isInitialValue = currentStart === start && currentEnd === end;
129
- this.setQueryOptions(props.componentId, customQueryOptions, false);
130
129
  this.updateQuery({
131
130
  componentId: props.componentId,
132
131
  query: query,