@ts-core/angular 15.0.55 → 15.0.57

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.
@@ -1453,9 +1453,10 @@ class ScrollDirective extends Destroyable {
1453
1453
  }
1454
1454
  this.isInitialized = true;
1455
1455
  }
1456
- scrollTo(value) {
1456
+ scrollTo(value, behavior) {
1457
1457
  this._scrollValue = value;
1458
- this.element.scrollTop = value;
1458
+ this.element.scroll({ top: value, behavior });
1459
+ // this.element.scrollTop = value;
1459
1460
  }
1460
1461
  // --------------------------------------------------------------------------
1461
1462
  //
@@ -1614,6 +1615,7 @@ class AutoScrollBottomDirective extends InfiniteScrollDirective {
1614
1615
  // Properties
1615
1616
  //
1616
1617
  // --------------------------------------------------------------------------
1618
+ this.behavior = 'auto';
1617
1619
  this.triggerChanged = new EventEmitter();
1618
1620
  this.triggerDelta = 0;
1619
1621
  this.isScrollLocked = false;
@@ -1628,14 +1630,14 @@ class AutoScrollBottomDirective extends InfiniteScrollDirective {
1628
1630
  this.scrollRemain();
1629
1631
  }
1630
1632
  else if (this.triggerDelta > 0) {
1633
+ this.triggerChanged.emit(this.triggerDelta);
1631
1634
  this.triggerDelta = 0;
1632
- this.triggerChanged.emit();
1633
1635
  }
1634
1636
  };
1635
1637
  }
1636
1638
  // --------------------------------------------------------------------------
1637
1639
  //
1638
- // Private Methods
1640
+ // Protected Methods
1639
1641
  //
1640
1642
  // --------------------------------------------------------------------------
1641
1643
  initialize() {
@@ -1648,9 +1650,6 @@ class AutoScrollBottomDirective extends InfiniteScrollDirective {
1648
1650
  this.isNeedRemainScroll = false;
1649
1651
  this.scrollTo(this.scrollHeight - this.lastScrollHeight);
1650
1652
  }
1651
- scrollBottom() {
1652
- this.scrollTo(this.scrollHeight);
1653
- }
1654
1653
  // --------------------------------------------------------------------------
1655
1654
  //
1656
1655
  // Event Handlers
@@ -1674,6 +1673,13 @@ class AutoScrollBottomDirective extends InfiniteScrollDirective {
1674
1673
  // Public Methods
1675
1674
  //
1676
1675
  // --------------------------------------------------------------------------
1676
+ scrollCheck() {
1677
+ clearTimeout(this.triggerTimer);
1678
+ this.triggerTimer = setTimeout(this.checkTrigger, InfiniteScrollDirective.INITIALIZATION_DELAY);
1679
+ }
1680
+ scrollBottom() {
1681
+ this.scrollTo(this.scrollHeight, this.behavior);
1682
+ }
1677
1683
  destroy() {
1678
1684
  if (this.isDestroyed) {
1679
1685
  return;
@@ -1700,18 +1706,19 @@ class AutoScrollBottomDirective extends InfiniteScrollDirective {
1700
1706
  return;
1701
1707
  }
1702
1708
  this.isScrollLocked = true;
1703
- clearTimeout(this.triggerTimer);
1704
- this.triggerTimer = setTimeout(this.checkTrigger, InfiniteScrollDirective.INITIALIZATION_DELAY);
1709
+ this.scrollCheck();
1705
1710
  }
1706
1711
  }
1707
1712
  AutoScrollBottomDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AutoScrollBottomDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1708
- AutoScrollBottomDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AutoScrollBottomDirective, selector: "[vi-auto-scroll-bottom]", inputs: { trigger: ["vi-auto-scroll-bottom", "trigger"] }, outputs: { triggerChanged: "triggerChanged" }, usesInheritance: true, ngImport: i0 });
1713
+ AutoScrollBottomDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AutoScrollBottomDirective, selector: "[vi-auto-scroll-bottom]", inputs: { behavior: "behavior", trigger: ["vi-auto-scroll-bottom", "trigger"] }, outputs: { triggerChanged: "triggerChanged" }, usesInheritance: true, ngImport: i0 });
1709
1714
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AutoScrollBottomDirective, decorators: [{
1710
1715
  type: Directive,
1711
1716
  args: [{
1712
1717
  selector: '[vi-auto-scroll-bottom]'
1713
1718
  }]
1714
- }], propDecorators: { triggerChanged: [{
1719
+ }], propDecorators: { behavior: [{
1720
+ type: Input
1721
+ }], triggerChanged: [{
1715
1722
  type: Output
1716
1723
  }], trigger: [{
1717
1724
  type: Input,