@appbaseio/reactivesearch-vue 1.23.4-alpha → 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.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +66 -38
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +3 -3
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/DynamicRangeSlider.js +4 -4
- package/dist/cjs/RangeSlider.js +4 -4
- package/dist/cjs/ReactiveComponent.js +11 -11
- package/dist/cjs/ReactiveList.js +5 -0
- package/dist/cjs/initReactivesearch.js +22 -12
- package/dist/cjs/version.js +1 -1
- package/dist/es/DynamicRangeSlider.js +4 -4
- package/dist/es/RangeSlider.js +4 -4
- package/dist/es/ReactiveComponent.js +11 -11
- package/dist/es/ReactiveList.js +5 -0
- package/dist/es/initReactivesearch.js +22 -12
- package/dist/es/version.js +1 -1
- package/package.json +5 -5
|
@@ -8398,6 +8398,11 @@
|
|
|
8398
8398
|
var value = internalValue && internalValue.value || '';
|
|
8399
8399
|
|
|
8400
8400
|
if (isAppbaseEnabled && (componentProps.enablePopularSuggestions || componentProps.enableQuerySuggestions)) {
|
|
8401
|
+
if (config.mongodb) {
|
|
8402
|
+
dispatch((0, misc.setDefaultPopularSuggestions)([], componentId.split('__internal')[0]));
|
|
8403
|
+
return;
|
|
8404
|
+
}
|
|
8405
|
+
|
|
8401
8406
|
var suggQuery = (0, utils.getSuggestionQuery)(getState, componentId);
|
|
8402
8407
|
appbaseRef.getQuerySuggestions(suggQuery).then(function (suggestions) {
|
|
8403
8408
|
var querySuggestion = suggestions[(0, utils.getQuerySuggestionsId)(componentId)];
|
|
@@ -9128,7 +9133,8 @@
|
|
|
9128
9133
|
protocol = _getState$appbaseRef.protocol,
|
|
9129
9134
|
credentials = _getState$appbaseRef.credentials;
|
|
9130
9135
|
|
|
9131
|
-
var app = config.app
|
|
9136
|
+
var app = config.app,
|
|
9137
|
+
mongodb = config.mongodb;
|
|
9132
9138
|
var esURL = protocol + '://' + url;
|
|
9133
9139
|
var parsedURL = (esURL || '').replace(/\/+$/, '');
|
|
9134
9140
|
var requestOptions = {
|
|
@@ -9175,7 +9181,14 @@
|
|
|
9175
9181
|
}
|
|
9176
9182
|
}
|
|
9177
9183
|
|
|
9178
|
-
|
|
9184
|
+
if (mongodb) {
|
|
9185
|
+
return dispatch({
|
|
9186
|
+
type: constants.RECENT_SEARCHES_SUCCESS,
|
|
9187
|
+
data: []
|
|
9188
|
+
});
|
|
9189
|
+
}
|
|
9190
|
+
|
|
9191
|
+
return fetch(parsedURL + '/_analytics/' + app + '/recent-searches?' + queryString, requestOptions).then(function (res) {
|
|
9179
9192
|
if (res.status >= 500 || res.status >= 400) {
|
|
9180
9193
|
return dispatch({
|
|
9181
9194
|
type: constants.RECENT_SEARCHES_ERROR,
|
|
@@ -14421,6 +14434,11 @@
|
|
|
14421
14434
|
renderNoResult: function renderNoResult() {
|
|
14422
14435
|
var h = this.$createElement;
|
|
14423
14436
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
14437
|
+
|
|
14438
|
+
if (this.$scopedSlots.renderNoResults) {
|
|
14439
|
+
return isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults;
|
|
14440
|
+
}
|
|
14441
|
+
|
|
14424
14442
|
return h("p", {
|
|
14425
14443
|
"class": getClassName$1(this.$props.innerClass, 'noResults') || null
|
|
14426
14444
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
@@ -15769,14 +15787,14 @@
|
|
|
15769
15787
|
|
|
15770
15788
|
if (data) {
|
|
15771
15789
|
Object.keys(data).forEach(function (key) {
|
|
15772
|
-
if (data[key] && Object.prototype.hasOwnProperty.call(data[key], 'error')) {
|
|
15790
|
+
if (data[key] && Object.prototype.hasOwnProperty.call(data[key], 'error') && !!data[key].error) {
|
|
15773
15791
|
errorResponses += 1;
|
|
15774
15792
|
}
|
|
15775
15793
|
});
|
|
15776
15794
|
} // reject only when all responses has error
|
|
15777
15795
|
|
|
15778
15796
|
|
|
15779
|
-
if (errorResponses > 0 && allResponses === errorResponses
|
|
15797
|
+
if (errorResponses > 0 && allResponses === errorResponses) {
|
|
15780
15798
|
return reject(data);
|
|
15781
15799
|
}
|
|
15782
15800
|
}
|
|
@@ -23663,7 +23681,7 @@
|
|
|
23663
23681
|
this.internalComponent = null;
|
|
23664
23682
|
this.$defaultQuery = null; // Set custom query in store
|
|
23665
23683
|
|
|
23666
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props,
|
|
23684
|
+
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
23667
23685
|
var customQuery = props.customQuery,
|
|
23668
23686
|
componentId = props.componentId,
|
|
23669
23687
|
filterLabel = props.filterLabel,
|
|
@@ -23686,7 +23704,7 @@
|
|
|
23686
23704
|
}
|
|
23687
23705
|
|
|
23688
23706
|
if (customQuery) {
|
|
23689
|
-
var calcCustomQuery = customQuery(props);
|
|
23707
|
+
var calcCustomQuery = customQuery(this.selectedValue, props);
|
|
23690
23708
|
|
|
23691
23709
|
var _ref = calcCustomQuery || {},
|
|
23692
23710
|
query = _ref.query;
|
|
@@ -23705,7 +23723,7 @@
|
|
|
23705
23723
|
|
|
23706
23724
|
this.updateQuery({
|
|
23707
23725
|
componentId: componentId,
|
|
23708
|
-
|
|
23726
|
+
query: queryToSet,
|
|
23709
23727
|
value: this.selectedValue || null,
|
|
23710
23728
|
label: filterLabel,
|
|
23711
23729
|
showFilter: showFilter,
|
|
@@ -23756,8 +23774,8 @@
|
|
|
23756
23774
|
},
|
|
23757
23775
|
beforeMount: function beforeMount() {
|
|
23758
23776
|
if (this.internalComponent && this.$props.defaultQuery) {
|
|
23759
|
-
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props,
|
|
23760
|
-
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);
|
|
23761
23779
|
|
|
23762
23780
|
var _ref3 = this.$defaultQuery || {},
|
|
23763
23781
|
query = _ref3.query,
|
|
@@ -23821,8 +23839,8 @@
|
|
|
23821
23839
|
}
|
|
23822
23840
|
},
|
|
23823
23841
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
23824
|
-
if (newVal && !isQueryIdentical(newVal, oldVal,
|
|
23825
|
-
this.$defaultQuery = newVal();
|
|
23842
|
+
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
23843
|
+
this.$defaultQuery = newVal(this.selectedValue, this.$props);
|
|
23826
23844
|
|
|
23827
23845
|
var _ref4 = this.$defaultQuery || {},
|
|
23828
23846
|
query = _ref4.query,
|
|
@@ -23833,7 +23851,7 @@
|
|
|
23833
23851
|
} else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false); // Update default query for RS API
|
|
23834
23852
|
|
|
23835
23853
|
|
|
23836
|
-
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props,
|
|
23854
|
+
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
23837
23855
|
var queryToSet = query || null;
|
|
23838
23856
|
|
|
23839
23857
|
if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
|
|
@@ -23847,9 +23865,9 @@
|
|
|
23847
23865
|
}
|
|
23848
23866
|
},
|
|
23849
23867
|
customQuery: function customQuery(newVal, oldVal) {
|
|
23850
|
-
if (newVal && !isQueryIdentical(newVal, oldVal,
|
|
23868
|
+
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
23851
23869
|
var componentId = this.$props.componentId;
|
|
23852
|
-
this.$customQuery = newVal(this.$props);
|
|
23870
|
+
this.$customQuery = newVal(this.selectedValue, this.$props);
|
|
23853
23871
|
|
|
23854
23872
|
var _ref5 = this.$customQuery || {},
|
|
23855
23873
|
query = _ref5.query,
|
|
@@ -23860,7 +23878,7 @@
|
|
|
23860
23878
|
} else this.setQueryOptions(componentId, this.getAggsQuery(), false); // Update custom query for RS API
|
|
23861
23879
|
|
|
23862
23880
|
|
|
23863
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props,
|
|
23881
|
+
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
23864
23882
|
var queryToSet = query || null;
|
|
23865
23883
|
|
|
23866
23884
|
if (this.$customQuery && this.$customQuery.id) {
|
|
@@ -24952,7 +24970,7 @@
|
|
|
24952
24970
|
* Any change may break the umd build, we're directly replacing the line no: 14
|
|
24953
24971
|
* `
|
|
24954
24972
|
var s = document.createElement("script");
|
|
24955
|
-
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.
|
|
24973
|
+
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/index.js");
|
|
24956
24974
|
s.onload = function(){
|
|
24957
24975
|
var VueSlider = global['vue-slider-component'];
|
|
24958
24976
|
components['vue-slider-component'] = VueSlider;
|
|
@@ -24973,7 +24991,7 @@
|
|
|
24973
24991
|
// eslint-disable-next-line
|
|
24974
24992
|
|
|
24975
24993
|
var s = document.createElement("script");
|
|
24976
|
-
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.
|
|
24994
|
+
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/index.js");
|
|
24977
24995
|
s.onload = function(){
|
|
24978
24996
|
var VueSlider = global$1['vue-slider-component'];
|
|
24979
24997
|
components['vue-slider-component'] = VueSlider;
|
|
@@ -25186,10 +25204,10 @@
|
|
|
25186
25204
|
"height": 4,
|
|
25187
25205
|
"enable-cross": false
|
|
25188
25206
|
},
|
|
25189
|
-
"
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
})
|
|
25207
|
+
"on": {
|
|
25208
|
+
"change": this.handleSlider
|
|
25209
|
+
},
|
|
25210
|
+
"props": _extends({}, this.$props.sliderOptions)
|
|
25193
25211
|
}), this.$props.rangeLabels && h("div", {
|
|
25194
25212
|
"class": "label-container"
|
|
25195
25213
|
}, [h("label", {
|
|
@@ -25432,14 +25450,14 @@
|
|
|
25432
25450
|
aggs: aggs
|
|
25433
25451
|
});
|
|
25434
25452
|
},
|
|
25435
|
-
handleSlider: function handleSlider(
|
|
25436
|
-
this.handleChange(
|
|
25453
|
+
handleSlider: function handleSlider(value) {
|
|
25454
|
+
this.handleChange(value);
|
|
25437
25455
|
},
|
|
25438
25456
|
handleChange: function handleChange(currentValue) {
|
|
25439
25457
|
var _this2 = this;
|
|
25440
25458
|
|
|
25441
25459
|
// Always keep the values within range
|
|
25442
|
-
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]];
|
|
25443
25461
|
|
|
25444
25462
|
var performUpdate = function performUpdate() {
|
|
25445
25463
|
_this2.currentValue = normalizedValue;
|
|
@@ -25575,7 +25593,7 @@
|
|
|
25575
25593
|
"enable-cross": false
|
|
25576
25594
|
},
|
|
25577
25595
|
"on": {
|
|
25578
|
-
"
|
|
25596
|
+
"change": this.handleSlider
|
|
25579
25597
|
},
|
|
25580
25598
|
"props": _extends({}, this.$props.sliderOptions)
|
|
25581
25599
|
}), this.labels ? h("div", {
|
|
@@ -25948,16 +25966,7 @@
|
|
|
25948
25966
|
compProps[key] = component[key];
|
|
25949
25967
|
}
|
|
25950
25968
|
});
|
|
25951
|
-
var isInternalComponentPresent = false;
|
|
25952
|
-
|
|
25953
|
-
if (component.customQuery && typeof component.customQuery === 'function') {
|
|
25954
|
-
customQueries[component.componentId] = component.customQuery(component.value, compProps);
|
|
25955
|
-
}
|
|
25956
|
-
|
|
25957
|
-
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
25958
|
-
defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
|
|
25959
|
-
}
|
|
25960
|
-
|
|
25969
|
+
var isInternalComponentPresent = false;
|
|
25961
25970
|
var isResultComponent = resultComponents.includes(componentType);
|
|
25962
25971
|
var internalComponent = component.componentId + "__internal";
|
|
25963
25972
|
var label = component.filterLabel || component.componentId;
|
|
@@ -25981,7 +25990,25 @@
|
|
|
25981
25990
|
reference: reference,
|
|
25982
25991
|
showFilter: showFilter,
|
|
25983
25992
|
URLParams: component.URLParams || false
|
|
25984
|
-
}); //
|
|
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
|
+
|
|
25985
26012
|
|
|
25986
26013
|
if (componentsWithOptions.includes(componentType)) {
|
|
25987
26014
|
var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
|
|
@@ -26068,7 +26095,7 @@
|
|
|
26068
26095
|
|
|
26069
26096
|
|
|
26070
26097
|
if (isResultComponent) {
|
|
26071
|
-
var _getQuery = getQuery(component,
|
|
26098
|
+
var _getQuery = getQuery(component, value, componentType),
|
|
26072
26099
|
query = _getQuery.query;
|
|
26073
26100
|
|
|
26074
26101
|
queryList = queryReducer(queryList, {
|
|
@@ -26277,6 +26304,7 @@
|
|
|
26277
26304
|
rsAPISettings.customEvents = utils_2(config.analyticsConfig.customEvents) ? config.analyticsConfig.customEvents : undefined;
|
|
26278
26305
|
}
|
|
26279
26306
|
|
|
26307
|
+
console.log('finalQuery', finalQuery);
|
|
26280
26308
|
appbaseRef.reactiveSearchv3(finalQuery, rsAPISettings).then(function (res) {
|
|
26281
26309
|
handleRSResponse(res);
|
|
26282
26310
|
})["catch"](function (err) {
|
|
@@ -26295,7 +26323,7 @@
|
|
|
26295
26323
|
});
|
|
26296
26324
|
}
|
|
26297
26325
|
|
|
26298
|
-
var version = "1.
|
|
26326
|
+
var version = "1.24.3-alpha.1";
|
|
26299
26327
|
|
|
26300
26328
|
var _templateObject$n, _templateObject2$a;
|
|
26301
26329
|
|