@appbaseio/reactivesearch-vue 1.16.0-alpha.23 → 1.16.0-alpha.24
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 +26 -22
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/ReactiveList.js +18 -17
- package/dist/cjs/initReactivesearch.js +2 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/ReactiveList.js +18 -17
- package/dist/es/initReactivesearch.js +2 -1
- package/dist/es/version.js +1 -1
- package/package.json +2 -2
|
@@ -5521,7 +5521,7 @@
|
|
|
5521
5521
|
}, size > 0 ? {
|
|
5522
5522
|
numberOfPages: Math.ceil(total / size)
|
|
5523
5523
|
} : null, {
|
|
5524
|
-
time: time,
|
|
5524
|
+
time: time || 0,
|
|
5525
5525
|
hidden: hidden,
|
|
5526
5526
|
promoted: promotedResults && promotedResults.length
|
|
5527
5527
|
});
|
|
@@ -8725,8 +8725,9 @@
|
|
|
8725
8725
|
}
|
|
8726
8726
|
}
|
|
8727
8727
|
} else {
|
|
8728
|
+
var preference = config && config.analyticsConfig && config.analyticsConfig.userId ? config.analyticsConfig.userId + '_' + component : component;
|
|
8728
8729
|
finalQuery = [].concat(_toConsumableArray(finalQuery), [{
|
|
8729
|
-
preference:
|
|
8730
|
+
preference: preference
|
|
8730
8731
|
}, currentQuery]);
|
|
8731
8732
|
}
|
|
8732
8733
|
}
|
|
@@ -8931,8 +8932,9 @@
|
|
|
8931
8932
|
appendToAggs: appendToAggs
|
|
8932
8933
|
}));
|
|
8933
8934
|
} else {
|
|
8935
|
+
var preference = store.config && store.config.analyticsConfig && store.config.analyticsConfig.userId ? store.config.analyticsConfig.userId + '_' + component : component;
|
|
8934
8936
|
var _finalQuery = [{
|
|
8935
|
-
preference:
|
|
8937
|
+
preference: preference
|
|
8936
8938
|
}, currentQuery];
|
|
8937
8939
|
dispatch(msearch(_finalQuery, [component], appendToHits, false, appendToAggs));
|
|
8938
8940
|
}
|
|
@@ -13913,18 +13915,17 @@
|
|
|
13913
13915
|
ResultCardsWrapper: ResultCardsWrapper
|
|
13914
13916
|
},
|
|
13915
13917
|
data: function data() {
|
|
13916
|
-
var props = this.$props;
|
|
13917
13918
|
var currentPageState = 0;
|
|
13919
|
+
var defaultPage = this.defaultPage || -1;
|
|
13918
13920
|
|
|
13919
|
-
if (
|
|
13920
|
-
currentPageState =
|
|
13921
|
-
} else if (
|
|
13922
|
-
currentPageState = Math.max(
|
|
13921
|
+
if (defaultPage >= 0) {
|
|
13922
|
+
currentPageState = defaultPage;
|
|
13923
|
+
} else if (this.currentPage) {
|
|
13924
|
+
currentPageState = Math.max(this.currentPage - 1, 0);
|
|
13923
13925
|
}
|
|
13924
13926
|
|
|
13925
13927
|
this.__state = {
|
|
13926
|
-
from: currentPageState *
|
|
13927
|
-
isLoading: true,
|
|
13928
|
+
from: currentPageState * this.size,
|
|
13928
13929
|
currentPageState: currentPageState
|
|
13929
13930
|
};
|
|
13930
13931
|
return this.__state;
|
|
@@ -13953,8 +13954,10 @@
|
|
|
13953
13954
|
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
13954
13955
|
}
|
|
13955
13956
|
|
|
13956
|
-
|
|
13957
|
-
|
|
13957
|
+
var defaultPage = this.defaultPage || -1;
|
|
13958
|
+
|
|
13959
|
+
if (defaultPage >= 0) {
|
|
13960
|
+
this.currentPageState = defaultPage;
|
|
13958
13961
|
this.from = this.currentPageState * this.$props.size;
|
|
13959
13962
|
}
|
|
13960
13963
|
|
|
@@ -14422,7 +14425,7 @@
|
|
|
14422
14425
|
if (this.stats.numberOfResults) {
|
|
14423
14426
|
return h("p", {
|
|
14424
14427
|
"class": resultStats + " " + getClassName$1(this.$props.innerClass, 'resultStats')
|
|
14425
|
-
}, [this.stats.numberOfResults, " results found in ", this.stats.time, "ms"]);
|
|
14428
|
+
}, [this.stats.numberOfResults, " results found in ", this.stats.time || 0, "ms"]);
|
|
14426
14429
|
}
|
|
14427
14430
|
|
|
14428
14431
|
return null;
|
|
@@ -14555,7 +14558,7 @@
|
|
|
14555
14558
|
return {
|
|
14556
14559
|
data: this.withClickIds(filteredResults),
|
|
14557
14560
|
aggregationData: this.withClickIds(aggregationData || []),
|
|
14558
|
-
promotedData: this.withClickIds(promotedResults),
|
|
14561
|
+
promotedData: this.withClickIds(promotedResults || []),
|
|
14559
14562
|
rawData: this.rawData,
|
|
14560
14563
|
resultStats: this.stats,
|
|
14561
14564
|
customData: customData
|
|
@@ -14567,7 +14570,7 @@
|
|
|
14567
14570
|
|
|
14568
14571
|
var data = _extends({
|
|
14569
14572
|
error: error,
|
|
14570
|
-
loading: isLoading,
|
|
14573
|
+
loading: isLoading || false,
|
|
14571
14574
|
loadMore: this.loadMore,
|
|
14572
14575
|
// TODO: Remove in v2
|
|
14573
14576
|
triggerAnalytics: this.triggerClickAnalytics,
|
|
@@ -14582,13 +14585,13 @@
|
|
|
14582
14585
|
|
|
14583
14586
|
var mapStateToProps$1 = function mapStateToProps(state, props) {
|
|
14584
14587
|
return {
|
|
14585
|
-
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1
|
|
14588
|
+
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
|
|
14586
14589
|
hits: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
14587
14590
|
rawData: state.rawData[props.componentId],
|
|
14588
|
-
aggregationData: state.compositeAggregations[props.componentId]
|
|
14589
|
-
promotedResults: state.promotedResults[props.componentId]
|
|
14591
|
+
aggregationData: state.compositeAggregations[props.componentId],
|
|
14592
|
+
promotedResults: state.promotedResults[props.componentId],
|
|
14590
14593
|
customData: state.customData[props.componentId],
|
|
14591
|
-
time: state.hits[props.componentId] && state.hits[props.componentId].time
|
|
14594
|
+
time: state.hits[props.componentId] && state.hits[props.componentId].time,
|
|
14592
14595
|
total: state.hits[props.componentId] && state.hits[props.componentId].total,
|
|
14593
14596
|
hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
|
|
14594
14597
|
analytics: state.config && state.config.analytics,
|
|
@@ -14597,7 +14600,7 @@
|
|
|
14597
14600
|
error: state.error[props.componentId],
|
|
14598
14601
|
afterKey: state.aggregations[props.componentId] && state.aggregations[props.componentId][props.aggregationField] && state.aggregations[props.componentId][props.aggregationField].after_key,
|
|
14599
14602
|
componentProps: state.props[props.componentId],
|
|
14600
|
-
isLoading: state.isLoading[props.componentId]
|
|
14603
|
+
isLoading: state.isLoading[props.componentId]
|
|
14601
14604
|
};
|
|
14602
14605
|
};
|
|
14603
14606
|
|
|
@@ -32757,8 +32760,9 @@
|
|
|
32757
32760
|
appbaseQuery = _extends({}, appbaseQuery, (_extends3 = {}, _extends3[component.componentId] = query, _extends3), transform_1(state, component.componentId, orderOfQueries));
|
|
32758
32761
|
}
|
|
32759
32762
|
} else {
|
|
32763
|
+
var preference = config && config.analyticsConfig && config.analyticsConfig.userId ? config.analyticsConfig.userId + "_" + component : component;
|
|
32760
32764
|
finalQuery = [].concat(finalQuery, [{
|
|
32761
|
-
preference:
|
|
32765
|
+
preference: preference
|
|
32762
32766
|
}, currentQuery]);
|
|
32763
32767
|
}
|
|
32764
32768
|
}
|
|
@@ -32912,7 +32916,7 @@
|
|
|
32912
32916
|
});
|
|
32913
32917
|
}
|
|
32914
32918
|
|
|
32915
|
-
var version = "1.16.0-alpha.
|
|
32919
|
+
var version = "1.16.0-alpha.24";
|
|
32916
32920
|
|
|
32917
32921
|
var _templateObject$o, _templateObject2$b;
|
|
32918
32922
|
|