@appbaseio/reactivesearch-vue 1.33.7 → 1.33.8

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.
@@ -6257,6 +6257,8 @@
6257
6257
  if (componentProps.componentType === constants$1.componentTypes.reactiveList) {
6258
6258
  if (value > 0) {
6259
6259
  from = (value - 1) * (componentProps.size || 10);
6260
+ } else {
6261
+ from = 0;
6260
6262
  }
6261
6263
  value = undefined;
6262
6264
  }
@@ -7254,7 +7256,7 @@
7254
7256
  var componentProps = props[comp];
7255
7257
  if (reference !== 'URL' && componentProps && [constants$1.componentTypes.reactiveList, constants$1.componentTypes.reactiveMap].includes(componentProps.componentType)) {
7256
7258
  if (selectedValues[comp] !== null) {
7257
- componentsToReset[comp] = null;
7259
+ componentsToReset[comp] = 0;
7258
7260
  }
7259
7261
  }
7260
7262
  });
@@ -8223,7 +8225,8 @@
8223
8225
  queryListener = _getState4.queryListener,
8224
8226
  props = _getState4.props,
8225
8227
  internalValues = _getState4.internalValues,
8226
- lock = _getState4.lock;
8228
+ lock = _getState4.lock,
8229
+ selectedValues = _getState4.selectedValues;
8227
8230
  var lockTime = config.initialQueriesSyncTime || 50;
8228
8231
  var initialTimestamp = config.initialTimestamp;
8229
8232
  var queryId = requestId || new Date().getTime();
@@ -8254,12 +8257,29 @@
8254
8257
  if (!queryObj || queryObj && !Object.keys(queryObj).length) {
8255
8258
  queryObj = _extends({}, matchAllQuery);
8256
8259
  }
8260
+ var from = void 0;
8261
+ var depComponentType = props[component] ? props[component].componentType : null;
8262
+ if (depComponentType === constants$1.componentTypes.reactiveList) {
8263
+ var componentValue = selectedValues[component] ? selectedValues[component].value : undefined;
8264
+ var componentProps = props[component];
8265
+ if (componentValue !== undefined && componentProps) {
8266
+ if (componentValue > 0) {
8267
+ from = (componentValue - 1) * (componentProps.size || 10);
8268
+ } else {
8269
+ from = 0;
8270
+ }
8271
+ }
8272
+ }
8257
8273
  var currentQuery = _extends({
8258
8274
  query: _extends({}, queryObj)
8259
- }, options, queryOptions[component]);
8275
+ }, options, queryOptions[component], {
8276
+ from: from
8277
+ });
8260
8278
  var queryToLog = _extends({
8261
8279
  query: _extends({}, queryObj)
8262
- }, options, queryOptions[component]);
8280
+ }, options, queryOptions[component], {
8281
+ from: from
8282
+ });
8263
8283
  var oldQuery = queryLog[component];
8264
8284
  if (mustExecuteMapQuery || !(0, helper.compareQueries)(currentQuery, oldQuery, false)) {
8265
8285
  orderOfQueries = [].concat(_toConsumableArray(orderOfQueries), [component]);
@@ -9303,9 +9323,14 @@
9303
9323
  };
9304
9324
  }
9305
9325
  function maybeInvokeDelegate(delegate, context) {
9306
- var methodName = context.method,
9307
- method = delegate.iterator[methodName];
9308
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
9326
+ var method = delegate.iterator[context.method];
9327
+ if (undefined === method) {
9328
+ if (context.delegate = null, "throw" === context.method) {
9329
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
9330
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
9331
+ }
9332
+ return ContinueSentinel;
9333
+ }
9309
9334
  var record = tryCatch(method, delegate.iterator, context.arg);
9310
9335
  if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
9311
9336
  var info = record.arg;
@@ -9505,7 +9530,7 @@
9505
9530
  descriptor.enumerable = descriptor.enumerable || false;
9506
9531
  descriptor.configurable = true;
9507
9532
  if ("value" in descriptor) descriptor.writable = true;
9508
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
9533
+ Object.defineProperty(target, descriptor.key, descriptor);
9509
9534
  }
9510
9535
  }
9511
9536
  function _createClass(Constructor, protoProps, staticProps) {
@@ -13677,7 +13702,16 @@
13677
13702
  },
13678
13703
  infiniteScroll: function infiniteScroll(newVal, oldVal) {
13679
13704
  if (newVal !== oldVal) {
13680
- if (!newVal) {
13705
+ if (newVal && !this.pagination) {
13706
+ window.addEventListener('scroll', this.scrollHandler);
13707
+ } else {
13708
+ window.removeEventListener('scroll', this.scrollHandler);
13709
+ }
13710
+ }
13711
+ },
13712
+ pagination: function pagination(newVal, oldVal) {
13713
+ if (newVal !== oldVal) {
13714
+ if (!newVal && this.infiniteScroll) {
13681
13715
  window.addEventListener('scroll', this.scrollHandler);
13682
13716
  } else {
13683
13717
  window.removeEventListener('scroll', this.scrollHandler);
@@ -34762,7 +34796,7 @@
34762
34796
  });
34763
34797
  }
34764
34798
 
34765
- var version = "1.33.7";
34799
+ var version = "1.33.8";
34766
34800
 
34767
34801
  var components$1 = [RLConnected, ResultCard, ResultList, ReactiveBase, DSConnected, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4];
34768
34802
  function install (Vue) {