vscroll 1.6.0 → 1.6.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * vscroll (https://github.com/dhilt/vscroll) FESM5
3
- * Version: 1.6.0 (2024-03-02T23:06:15.231Z)
3
+ * Version: 1.6.1 (2024-03-03T11:48:52.952Z)
4
4
  * Author: Denis Hilt
5
5
  * License: MIT
6
6
  */
@@ -377,7 +377,7 @@ var reactiveConfigStorage = new Map();
377
377
 
378
378
  var core = {
379
379
  name: 'vscroll',
380
- version: '1.6.0'
380
+ version: '1.6.1'
381
381
  };
382
382
 
383
383
  var getBox = function (id) {
@@ -4931,13 +4931,13 @@ var Adapter = /** @class */ (function () {
4931
4931
  // Adapter public context augmentation
4932
4932
  adapterProps
4933
4933
  .forEach(function (prop) {
4934
- var name = prop.name, type = prop.type, defaultValue = prop.value, permanent = prop.permanent;
4934
+ var name = prop.name, type = prop.type, permanent = prop.permanent;
4935
4935
  var value = _this[name];
4936
4936
  if (type === AdapterPropType.Function) {
4937
4937
  value = value.bind(_this);
4938
4938
  }
4939
4939
  else if (type === AdapterPropType.WorkflowRunner) {
4940
- value = _this.getWorkflowRunnerMethod(value, defaultValue);
4940
+ value = _this.getWorkflowRunnerMethod(value, name);
4941
4941
  }
4942
4942
  else if (type === AdapterPropType.Reactive && reactivePropsStore[name]) {
4943
4943
  value = context[name];
@@ -4981,15 +4981,6 @@ var Adapter = /** @class */ (function () {
4981
4981
  enumerable: false,
4982
4982
  configurable: true
4983
4983
  });
4984
- Adapter.prototype.shouldIgnorePausedMethod = function (method) {
4985
- var methodName = method.name;
4986
- return this.paused && !ALLOWED_METHODS_WHEN_PAUSED.includes(methodName);
4987
- };
4988
- Adapter.prototype.getPausedMethodResult = function (method) {
4989
- var _a, _b;
4990
- (_b = (_a = this.logger) === null || _a === void 0 ? void 0 : _a.log) === null || _b === void 0 ? void 0 : _b.call(_a, function () { return 'scroller is paused: ' + method.name + ' method is ignored'; });
4991
- return Promise.resolve(methodPausedResult);
4992
- };
4993
4984
  Adapter.prototype.getPromisifiedMethod = function (method, args) {
4994
4985
  var _this = this;
4995
4986
  return new Promise(function (resolve) {
@@ -4999,18 +4990,23 @@ var Adapter = /** @class */ (function () {
4999
4990
  method.apply(_this, args);
5000
4991
  });
5001
4992
  };
5002
- Adapter.prototype.getWorkflowRunnerMethod = function (method, defaultMethod) {
4993
+ Adapter.prototype.getWorkflowRunnerMethod = function (method, name) {
5003
4994
  var _this = this;
5004
4995
  return function () {
4996
+ var _a, _b, _c, _d;
5005
4997
  var args = [];
5006
4998
  for (var _i = 0; _i < arguments.length; _i++) {
5007
4999
  args[_i] = arguments[_i];
5008
5000
  }
5009
- return !_this.relax$
5010
- ? defaultMethod.apply(_this, args)
5011
- : _this.shouldIgnorePausedMethod(method)
5012
- ? _this.getPausedMethodResult(method)
5013
- : _this.getPromisifiedMethod(method, args);
5001
+ if (!_this.relax$) {
5002
+ (_b = (_a = _this.logger) === null || _a === void 0 ? void 0 : _a.log) === null || _b === void 0 ? void 0 : _b.call(_a, function () { return 'scroller is not initialized: ' + name + ' method is ignored'; });
5003
+ return Promise.resolve(methodPreResult);
5004
+ }
5005
+ if (_this.paused && !ALLOWED_METHODS_WHEN_PAUSED.includes(name)) {
5006
+ (_d = (_c = _this.logger) === null || _c === void 0 ? void 0 : _c.log) === null || _d === void 0 ? void 0 : _d.call(_c, function () { return 'scroller is paused: ' + name + ' method is ignored'; });
5007
+ return Promise.resolve(methodPausedResult);
5008
+ }
5009
+ return _this.getPromisifiedMethod(method, args);
5014
5010
  };
5015
5011
  };
5016
5012
  Adapter.prototype.initialize = function (_a) {