vscroll 1.5.4 → 1.5.5

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.5.4 (2023-05-08T20:10:11.740Z)
3
+ * Version: 1.5.5 (2023-06-16T14:40:38.695Z)
4
4
  * Author: Denis Hilt
5
5
  * License: MIT
6
6
  */
@@ -345,7 +345,7 @@ var reactiveConfigStorage = new Map();
345
345
 
346
346
  var core = {
347
347
  name: 'vscroll',
348
- version: '1.5.4'
348
+ version: '1.5.5'
349
349
  };
350
350
 
351
351
  var getBox = function (id) {
@@ -2442,7 +2442,8 @@ var Fetch = /** @class */ (function (_super) {
2442
2442
  return getResult;
2443
2443
  }
2444
2444
  else if (typeof getResult.subscribe === 'function') {
2445
- var sub_1 = getResult.subscribe(done, fail, function () {
2445
+ var sub_1 = void 0;
2446
+ sub_1 = getResult.subscribe(done, fail, function () {
2446
2447
  if (sub_1 && typeof sub_1 === 'object' && typeof sub_1.unsubscribe === 'function') {
2447
2448
  sub_1.unsubscribe();
2448
2449
  }
@@ -5267,6 +5268,7 @@ var Scroller = /** @class */ (function () {
5267
5268
  });
5268
5269
  };
5269
5270
  Scroller.prototype.dispose = function (forever) {
5271
+ this.logger.log(function () { return 'disposing scroller' + (forever ? ' (forever)' : ''); });
5270
5272
  if (forever) { // Adapter is not re-instantiated on reset
5271
5273
  this.adapter.dispose();
5272
5274
  }
@@ -5494,6 +5496,7 @@ var Workflow = /** @class */ (function () {
5494
5496
  var _this = this;
5495
5497
  var element = _a.element, datasource = _a.datasource, consumer = _a.consumer, run = _a.run, Routines = _a.Routines;
5496
5498
  this.isInitialized = false;
5499
+ this.disposed = false;
5497
5500
  this.initTimer = null;
5498
5501
  this.adapterRun$ = new Reactive();
5499
5502
  this.cyclesDone = 0;
@@ -5527,12 +5530,6 @@ var Workflow = /** @class */ (function () {
5527
5530
  Workflow.prototype.init = function () {
5528
5531
  var _this = this;
5529
5532
  this.scroller.init(this.adapterRun$);
5530
- this.isInitialized = true;
5531
- // run the Workflow
5532
- this.callWorkflow({
5533
- process: CommonProcess.init,
5534
- status: ProcessStatus.start
5535
- });
5536
5533
  // set up scroll event listener
5537
5534
  var routines = this.scroller.routines;
5538
5535
  var onScrollHandler = function (event) { return _this.callWorkflow({
@@ -5541,6 +5538,12 @@ var Workflow = /** @class */ (function () {
5541
5538
  payload: { event: event }
5542
5539
  }); };
5543
5540
  this.offScroll = routines.onScroll(onScrollHandler);
5541
+ // run the Workflow
5542
+ this.isInitialized = true;
5543
+ this.callWorkflow({
5544
+ process: CommonProcess.init,
5545
+ status: ProcessStatus.start
5546
+ });
5544
5547
  };
5545
5548
  Workflow.prototype.changeItems = function (items) {
5546
5549
  this.propagateChanges(items);
@@ -5652,6 +5655,7 @@ var Workflow = /** @class */ (function () {
5652
5655
  };
5653
5656
  Workflow.prototype.dispose = function () {
5654
5657
  var _this = this;
5658
+ this.scroller.logger.log(function () { return 'disposing workflow'; });
5655
5659
  if (this.initTimer) {
5656
5660
  clearTimeout(this.initTimer);
5657
5661
  }
@@ -5661,6 +5665,7 @@ var Workflow = /** @class */ (function () {
5661
5665
  Object.getOwnPropertyNames(this).forEach(function (prop) {
5662
5666
  delete _this[prop];
5663
5667
  });
5668
+ this.disposed = true;
5664
5669
  };
5665
5670
  Workflow.prototype.finalize = function () {
5666
5671
  };