@appbaseio/reactivesearch-vue 1.24.2 → 1.24.3

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) {
@@ -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,16 @@
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(value, compProps);
25997
+ }
25998
+
25999
+ if (component.defaultQuery && typeof component.defaultQuery === 'function') {
26000
+ defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
26001
+ } // [2] set query options - main component query (valid for result components)
26002
+
25998
26003
 
25999
26004
  if (componentsWithOptions.includes(componentType)) {
26000
26005
  var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
@@ -26081,7 +26086,7 @@
26081
26086
 
26082
26087
 
26083
26088
  if (isResultComponent) {
26084
- var _getQuery = getQuery(component, null, componentType),
26089
+ var _getQuery = getQuery(component, value, componentType),
26085
26090
  query = _getQuery.query;
26086
26091
 
26087
26092
  queryList = queryReducer(queryList, {
@@ -26308,7 +26313,7 @@
26308
26313
  });
26309
26314
  }
26310
26315
 
26311
- var version = "1.24.2";
26316
+ var version = "1.24.3";
26312
26317
 
26313
26318
  var _templateObject$n, _templateObject2$a;
26314
26319