@appbaseio/reactivesearch-vue 1.23.3 → 1.23.4

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.
@@ -13993,12 +13993,9 @@
13993
13993
  return this.$listeners && this.$listeners.resultStats;
13994
13994
  },
13995
13995
  stats: function stats() {
13996
- var _this$getAllData = this.getAllData(),
13997
- filteredResults = _this$getAllData.filteredResults;
13998
-
13999
13996
  return _extends({}, getResultStats(this), {
14000
13997
  currentPage: this.currentPageState,
14001
- displayedResults: filteredResults.length
13998
+ displayedResults: this.data.length
14002
13999
  });
14003
14000
  },
14004
14001
  hasCustomRender: function hasCustomRender() {
@@ -14007,6 +14004,27 @@
14007
14004
  showInfiniteScroll: function showInfiniteScroll() {
14008
14005
  // Pagination has higher priority then infinite scroll
14009
14006
  return this.infiniteScroll && !this.shouldRenderPagination;
14007
+ },
14008
+ data: function data() {
14009
+ var results = parseHits(this.hits) || [];
14010
+ var parsedPromotedResults = parseHits(this.promotedResults) || [];
14011
+ var filteredResults = results;
14012
+
14013
+ if (parsedPromotedResults.length) {
14014
+ var ids = parsedPromotedResults.map(function (item) {
14015
+ return item._id;
14016
+ }).filter(Boolean);
14017
+
14018
+ if (ids) {
14019
+ filteredResults = filteredResults.filter(function (item) {
14020
+ return !ids.includes(item._id);
14021
+ });
14022
+ }
14023
+
14024
+ filteredResults = [].concat(parsedPromotedResults, filteredResults);
14025
+ }
14026
+
14027
+ return helper_2(filteredResults);
14010
14028
  }
14011
14029
  },
14012
14030
  watch: {
@@ -14088,7 +14106,7 @@
14088
14106
  }
14089
14107
  },
14090
14108
  hits: function hits(newVal, oldVal) {
14091
- this.$emit('data', this.getAllData());
14109
+ this.$emit('data', this.getData());
14092
14110
 
14093
14111
  if (this.shouldRenderPagination) {
14094
14112
  // called when page is changed
@@ -14273,13 +14291,10 @@
14273
14291
 
14274
14292
  var h = this.$createElement;
14275
14293
  var size = this.$props.size;
14276
- var hits = this.$data.hits;
14277
- var results = parseHits(hits) || [];
14278
- var filteredResults = results;
14279
14294
  var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
14280
14295
  var element = this.hasCustomRender ? this.getComponent() : h("div", {
14281
14296
  "class": this.$props.listClass + " " + getClassName$1(this.$props.innerClass, 'list')
14282
- }, [[].concat(filteredResults).map(function (item, index) {
14297
+ }, [this.data.map(function (item, index) {
14283
14298
  return renderItem({
14284
14299
  item: item,
14285
14300
  triggerClickAnalytics: function triggerClickAnalytics() {
@@ -14290,7 +14305,7 @@
14290
14305
 
14291
14306
  return this.analytics ? h(ImpressionTracker$1, {
14292
14307
  "attrs": {
14293
- "hits": filteredResults
14308
+ "hits": this.data
14294
14309
  }
14295
14310
  }, [element]) : element;
14296
14311
  },
@@ -14470,8 +14485,8 @@
14470
14485
  })]);
14471
14486
  },
14472
14487
  withClickIds: function withClickIds(results) {
14473
- var _this$getAllData2 = this.getAllData(),
14474
- base = _this$getAllData2.base;
14488
+ var _this$getAllData = this.getAllData(),
14489
+ base = _this$getAllData.base;
14475
14490
 
14476
14491
  return results.map(function (result, index) {
14477
14492
  return _extends({}, result, {
@@ -14489,26 +14504,9 @@
14489
14504
  hits = this.hits;
14490
14505
  var results = parseHits(hits) || [];
14491
14506
  var parsedPromotedResults = parseHits(promotedResults) || [];
14492
- var filteredResults = results;
14493
14507
  var base = currentPage * size;
14494
-
14495
- if (parsedPromotedResults.length) {
14496
- var ids = parsedPromotedResults.map(function (item) {
14497
- return item._id;
14498
- }).filter(Boolean);
14499
-
14500
- if (ids) {
14501
- filteredResults = filteredResults.filter(function (item) {
14502
- return !ids.includes(item._id);
14503
- });
14504
- }
14505
-
14506
- filteredResults = [].concat(parsedPromotedResults, filteredResults);
14507
- }
14508
-
14509
14508
  return {
14510
14509
  results: results,
14511
- filteredResults: filteredResults,
14512
14510
  customData: customData || {},
14513
14511
  promotedResults: parsedPromotedResults,
14514
14512
  aggregationData: aggregationData,
@@ -14518,14 +14516,13 @@
14518
14516
  };
14519
14517
  },
14520
14518
  getData: function getData() {
14521
- var _this$getAllData3 = this.getAllData(),
14522
- filteredResults = _this$getAllData3.filteredResults,
14523
- promotedResults = _this$getAllData3.promotedResults,
14524
- aggregationData = _this$getAllData3.aggregationData,
14525
- customData = _this$getAllData3.customData;
14519
+ var _this$getAllData2 = this.getAllData(),
14520
+ promotedResults = _this$getAllData2.promotedResults,
14521
+ aggregationData = _this$getAllData2.aggregationData,
14522
+ customData = _this$getAllData2.customData;
14526
14523
 
14527
14524
  return {
14528
- data: this.withClickIds(filteredResults),
14525
+ data: this.data,
14529
14526
  aggregationData: this.withClickIds(aggregationData || []),
14530
14527
  promotedData: this.withClickIds(promotedResults || []),
14531
14528
  rawData: this.rawData,
@@ -26098,7 +26095,7 @@
26098
26095
  });
26099
26096
  }
26100
26097
 
26101
- var version = "1.23.3";
26098
+ var version = "1.23.4";
26102
26099
 
26103
26100
  var _templateObject$n, _templateObject2$a;
26104
26101