@appbaseio/reactivesearch-vue 1.24.2 → 1.24.3-alpha.1

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.
@@ -14434,6 +14434,11 @@
14434
14434
  renderNoResult: function renderNoResult() {
14435
14435
  var h = this.$createElement;
14436
14436
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
14437
+
14438
+ if (this.$scopedSlots.renderNoResults) {
14439
+ return isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults;
14440
+ }
14441
+
14437
14442
  return h("p", {
14438
14443
  "class": getClassName$1(this.$props.innerClass, 'noResults') || null
14439
14444
  }, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
@@ -23676,7 +23681,7 @@
23676
23681
  this.internalComponent = null;
23677
23682
  this.$defaultQuery = null; // Set custom query in store
23678
23683
 
23679
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, undefined);
23684
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
23680
23685
  var customQuery = props.customQuery,
23681
23686
  componentId = props.componentId,
23682
23687
  filterLabel = props.filterLabel,
@@ -23699,7 +23704,7 @@
23699
23704
  }
23700
23705
 
23701
23706
  if (customQuery) {
23702
- var calcCustomQuery = customQuery(props);
23707
+ var calcCustomQuery = customQuery(this.selectedValue, props);
23703
23708
 
23704
23709
  var _ref = calcCustomQuery || {},
23705
23710
  query = _ref.query;
@@ -23718,7 +23723,7 @@
23718
23723
 
23719
23724
  this.updateQuery({
23720
23725
  componentId: componentId,
23721
- queryToSet: queryToSet,
23726
+ query: queryToSet,
23722
23727
  value: this.selectedValue || null,
23723
23728
  label: filterLabel,
23724
23729
  showFilter: showFilter,
@@ -23769,8 +23774,8 @@
23769
23774
  },
23770
23775
  beforeMount: function beforeMount() {
23771
23776
  if (this.internalComponent && this.$props.defaultQuery) {
23772
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, undefined);
23773
- this.$defaultQuery = this.$props.defaultQuery();
23777
+ updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
23778
+ this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
23774
23779
 
23775
23780
  var _ref3 = this.$defaultQuery || {},
23776
23781
  query = _ref3.query,
@@ -23834,8 +23839,8 @@
23834
23839
  }
23835
23840
  },
23836
23841
  defaultQuery: function defaultQuery(newVal, oldVal) {
23837
- if (newVal && !isQueryIdentical(newVal, oldVal, undefined, this.$props)) {
23838
- this.$defaultQuery = newVal();
23842
+ if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
23843
+ this.$defaultQuery = newVal(this.selectedValue, this.$props);
23839
23844
 
23840
23845
  var _ref4 = this.$defaultQuery || {},
23841
23846
  query = _ref4.query,
@@ -23846,7 +23851,7 @@
23846
23851
  } else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false); // Update default query for RS API
23847
23852
 
23848
23853
 
23849
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, undefined);
23854
+ updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
23850
23855
  var queryToSet = query || null;
23851
23856
 
23852
23857
  if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
@@ -23860,9 +23865,9 @@
23860
23865
  }
23861
23866
  },
23862
23867
  customQuery: function customQuery(newVal, oldVal) {
23863
- if (newVal && !isQueryIdentical(newVal, oldVal, undefined, this.$props)) {
23868
+ if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
23864
23869
  var componentId = this.$props.componentId;
23865
- this.$customQuery = newVal(this.$props);
23870
+ this.$customQuery = newVal(this.selectedValue, this.$props);
23866
23871
 
23867
23872
  var _ref5 = this.$customQuery || {},
23868
23873
  query = _ref5.query,
@@ -23873,7 +23878,7 @@
23873
23878
  } else this.setQueryOptions(componentId, this.getAggsQuery(), false); // Update custom query for RS API
23874
23879
 
23875
23880
 
23876
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, undefined);
23881
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
23877
23882
  var queryToSet = query || null;
23878
23883
 
23879
23884
  if (this.$customQuery && this.$customQuery.id) {
@@ -24965,7 +24970,7 @@
24965
24970
  * Any change may break the umd build, we're directly replacing the line no: 14
24966
24971
  * `
24967
24972
  var s = document.createElement("script");
24968
- s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.8.2/dist/index.js");
24973
+ s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/index.js");
24969
24974
  s.onload = function(){
24970
24975
  var VueSlider = global['vue-slider-component'];
24971
24976
  components['vue-slider-component'] = VueSlider;
@@ -24986,7 +24991,7 @@
24986
24991
  // eslint-disable-next-line
24987
24992
 
24988
24993
  var s = document.createElement("script");
24989
- s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.8.2/dist/index.js");
24994
+ s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/index.js");
24990
24995
  s.onload = function(){
24991
24996
  var VueSlider = global$1['vue-slider-component'];
24992
24997
  components['vue-slider-component'] = VueSlider;
@@ -25199,10 +25204,10 @@
25199
25204
  "height": 4,
25200
25205
  "enable-cross": false
25201
25206
  },
25202
- "props": _extends({}, this.$props.sliderOptions),
25203
- "on": _extends({}, {
25204
- input: this.handleSlider
25205
- })
25207
+ "on": {
25208
+ "change": this.handleSlider
25209
+ },
25210
+ "props": _extends({}, this.$props.sliderOptions)
25206
25211
  }), this.$props.rangeLabels && h("div", {
25207
25212
  "class": "label-container"
25208
25213
  }, [h("label", {
@@ -25445,14 +25450,14 @@
25445
25450
  aggs: aggs
25446
25451
  });
25447
25452
  },
25448
- handleSlider: function handleSlider(values) {
25449
- this.handleChange(values.currentValue);
25453
+ handleSlider: function handleSlider(value) {
25454
+ this.handleChange(value);
25450
25455
  },
25451
25456
  handleChange: function handleChange(currentValue) {
25452
25457
  var _this2 = this;
25453
25458
 
25454
25459
  // Always keep the values within range
25455
- var normalizedValue = [this.range ? Math.max(this.range.start, currentValue[0]) : currentValue[0], this.range ? Math.min(this.range.end, currentValue[1]) : currentValue[1]];
25460
+ var normalizedValue = [this.range ? Math.max(this.range.start, currentValue == null ? void 0 : currentValue[0]) : currentValue[0], this.range ? Math.min(this.range.end, currentValue == null ? void 0 : currentValue[1]) : currentValue[1]];
25456
25461
 
25457
25462
  var performUpdate = function performUpdate() {
25458
25463
  _this2.currentValue = normalizedValue;
@@ -25588,7 +25593,7 @@
25588
25593
  "enable-cross": false
25589
25594
  },
25590
25595
  "on": {
25591
- "drag-end": this.handleSlider
25596
+ "change": this.handleSlider
25592
25597
  },
25593
25598
  "props": _extends({}, this.$props.sliderOptions)
25594
25599
  }), this.labels ? h("div", {
@@ -25961,16 +25966,7 @@
25961
25966
  compProps[key] = component[key];
25962
25967
  }
25963
25968
  });
25964
- var isInternalComponentPresent = false; // Set custom and default queries
25965
-
25966
- if (component.customQuery && typeof component.customQuery === 'function') {
25967
- customQueries[component.componentId] = component.customQuery(component.value, compProps);
25968
- }
25969
-
25970
- if (component.defaultQuery && typeof component.defaultQuery === 'function') {
25971
- defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
25972
- }
25973
-
25969
+ var isInternalComponentPresent = false;
25974
25970
  var isResultComponent = resultComponents.includes(componentType);
25975
25971
  var internalComponent = component.componentId + "__internal";
25976
25972
  var label = component.filterLabel || component.componentId;
@@ -25994,7 +25990,25 @@
25994
25990
  reference: reference,
25995
25991
  showFilter: showFilter,
25996
25992
  URLParams: component.URLParams || false
25997
- }); // [2] set query options - main component query (valid for result components)
25993
+ }); // Set custom and default queries
25994
+
25995
+ if (component.customQuery && typeof component.customQuery === 'function') {
25996
+ customQueries[component.componentId] = component.customQuery(component.value || selectedValues[component.componentId].value, compProps);
25997
+ }
25998
+
25999
+ if (component.defaultQuery && typeof component.defaultQuery === 'function') {
26000
+ defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
26001
+ } // Set custom and default queries
26002
+
26003
+
26004
+ if (component.customQuery && typeof component.customQuery === 'function') {
26005
+ customQueries[component.componentId] = component.customQuery(value, compProps);
26006
+ }
26007
+
26008
+ if (component.defaultQuery && typeof component.defaultQuery === 'function') {
26009
+ defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
26010
+ } // [2] set query options - main component query (valid for result components)
26011
+
25998
26012
 
25999
26013
  if (componentsWithOptions.includes(componentType)) {
26000
26014
  var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
@@ -26081,7 +26095,7 @@
26081
26095
 
26082
26096
 
26083
26097
  if (isResultComponent) {
26084
- var _getQuery = getQuery(component, null, componentType),
26098
+ var _getQuery = getQuery(component, value, componentType),
26085
26099
  query = _getQuery.query;
26086
26100
 
26087
26101
  queryList = queryReducer(queryList, {
@@ -26290,6 +26304,7 @@
26290
26304
  rsAPISettings.customEvents = utils_2(config.analyticsConfig.customEvents) ? config.analyticsConfig.customEvents : undefined;
26291
26305
  }
26292
26306
 
26307
+ console.log('finalQuery', finalQuery);
26293
26308
  appbaseRef.reactiveSearchv3(finalQuery, rsAPISettings).then(function (res) {
26294
26309
  handleRSResponse(res);
26295
26310
  })["catch"](function (err) {
@@ -26308,7 +26323,7 @@
26308
26323
  });
26309
26324
  }
26310
26325
 
26311
- var version = "1.24.2";
26326
+ var version = "1.24.3-alpha.1";
26312
26327
 
26313
26328
  var _templateObject$n, _templateObject2$a;
26314
26329