ng-virtual-list 14.11.2 → 14.11.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.
Files changed (24) hide show
  1. package/README.md +1 -0
  2. package/esm2020/lib/components/ng-list-item/base/base-virtual-list-item-component.mjs +7 -1
  3. package/esm2020/lib/components/ng-list-item/ng-virtual-list-item.component.mjs +2 -7
  4. package/esm2020/lib/components/ng-list-item/ng-virtual-list-item.module.mjs +3 -3
  5. package/esm2020/lib/components/ng-prerender-container/components/ng-prerender-list-item/ng-prerender-list-item.module.mjs +3 -3
  6. package/esm2020/lib/components/ng-scroll-bar/ng-scroll-bar.module.mjs +3 -3
  7. package/esm2020/lib/components/ng-scroll-view/ng-scroll-view.component.mjs +19 -8
  8. package/esm2020/lib/components/ng-scroller/ng-scroller.module.mjs +3 -3
  9. package/esm2020/lib/const/index.mjs +9 -1
  10. package/esm2020/lib/interfaces/index.mjs +1 -1
  11. package/esm2020/lib/interfaces/scrolling-settings.mjs +2 -0
  12. package/esm2020/lib/ng-virtual-list.component.mjs +92 -29
  13. package/fesm2015/ng-virtual-list.mjs +128 -43
  14. package/fesm2015/ng-virtual-list.mjs.map +1 -1
  15. package/fesm2020/ng-virtual-list.mjs +123 -41
  16. package/fesm2020/ng-virtual-list.mjs.map +1 -1
  17. package/lib/components/ng-list-item/base/base-virtual-list-item-component.d.ts +2 -0
  18. package/lib/components/ng-list-item/ng-virtual-list-item.component.d.ts +0 -2
  19. package/lib/components/ng-scroll-view/ng-scroll-view.component.d.ts +6 -1
  20. package/lib/const/index.d.ts +2 -1
  21. package/lib/interfaces/index.d.ts +2 -1
  22. package/lib/interfaces/scrolling-settings.d.ts +38 -0
  23. package/lib/ng-virtual-list.component.d.ts +16 -2
  24. package/package.json +1 -1
@@ -193,6 +193,14 @@ const DEFAULT_ANIMATION_PARAMS = {
193
193
  navigateToItem: 150,
194
194
  navigateByKeyboard: NAVIGATION_BY_KEYBOARD_TIMER,
195
195
  };
196
+ const DEFAULT_SCROLLING_SETTINGS = {
197
+ frictionalForce: 0.035,
198
+ maxDuration: 4000,
199
+ mass: 0.005,
200
+ maxDistance: 12500,
201
+ speedScale: 15,
202
+ optimization: true,
203
+ };
196
204
  const DEFAULT_OVERSCROLL_ENABLED = true;
197
205
  const DEFAULT_SNAP = false;
198
206
  const DEFAULT_SELECT_BY_CLICK = true;
@@ -2515,6 +2523,7 @@ class BaseVirtualListItemComponent extends DisposableComponent {
2515
2523
  constructor() {
2516
2524
  super();
2517
2525
  this._apiService = inject(NgVirtualListPublicService);
2526
+ this._service = inject(NgVirtualListService);
2518
2527
  this._cdr = inject(ChangeDetectorRef);
2519
2528
  this._isSelected = false;
2520
2529
  this._isCollapsed = false;
@@ -2540,6 +2549,9 @@ class BaseVirtualListItemComponent extends DisposableComponent {
2540
2549
  this._langTextDir = TextDirections.LTR;
2541
2550
  this._regularLength = SIZE_100_PERSENT;
2542
2551
  this._elementRef = inject(ElementRef);
2552
+ this._id = this._service.generateComponentId();
2553
+ this._listId = this._service.id;
2554
+ this._displayId = createDisplayId(this._listId, this._id);
2543
2555
  const $data = this.$data, $config = this.$config, $measures = this.$measures, $focused = this.$focused;
2544
2556
  combineLatest([$data, $focused]).pipe(takeUntil(this._$unsubscribe), tap(([data, focused]) => {
2545
2557
  var _a, _b, _c, _d;
@@ -2777,13 +2789,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2777
2789
  class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
2778
2790
  constructor() {
2779
2791
  super();
2780
- this._service = inject(NgVirtualListService);
2781
2792
  this._$maxClickDistance = new BehaviorSubject(DEFAULT_CLICK_DISTANCE);
2782
2793
  this.$maxClickDistance = this._$maxClickDistance.asObservable();
2783
2794
  this._injector = inject(Injector);
2784
- this._id = this._service.generateComponentId();
2785
- this._listId = this._service.id;
2786
- this._displayId = createDisplayId(this._listId, this._id);
2787
2795
  }
2788
2796
  ngOnInit() {
2789
2797
  var _a;
@@ -3442,6 +3450,8 @@ class NgScrollView extends BaseScrollView {
3442
3450
  this.$scrollBehavior = this._$scrollBehavior.asObservable();
3443
3451
  this._$overscrollEnabled = new BehaviorSubject(DEFAULT_OVERSCROLL_ENABLED);
3444
3452
  this.$overscrollEnabled = this._$overscrollEnabled.asObservable();
3453
+ this._$scrollingSettings = new BehaviorSubject(DEFAULT_SCROLLING_SETTINGS);
3454
+ this.$scrollingSettings = this._$scrollingSettings.asObservable();
3445
3455
  this._normalizeValueFromZero = inject(SCROLL_VIEW_NORMALIZE_VALUE_FROM_ZERO);
3446
3456
  this._$scroll = new Subject();
3447
3457
  this.$scroll = this._$scroll.asObservable();
@@ -3464,6 +3474,12 @@ class NgScrollView extends BaseScrollView {
3464
3474
  }
3465
3475
  }
3466
3476
  get overscrollEnabled() { return this._$overscrollEnabled.getValue(); }
3477
+ set scrollingSettings(v) {
3478
+ if (this._$scrollingSettings.getValue() !== v) {
3479
+ this._$scrollingSettings.next(v);
3480
+ }
3481
+ }
3482
+ get scrollingSettings() { return this._$scrollingSettings.getValue(); }
3467
3483
  set delta(v) {
3468
3484
  this._startPosition += v;
3469
3485
  }
@@ -3603,24 +3619,27 @@ class NgScrollView extends BaseScrollView {
3603
3619
  }
3604
3620
  }
3605
3621
  calculateVelocity(offsets, delta, timestamp, indexOffset = 10) {
3622
+ var _a, _b;
3606
3623
  offsets.push([delta, timestamp < ANIMATOR_MIN_TIMESTAMP ? ANIMATOR_MIN_TIMESTAMP : timestamp]);
3607
- const len = offsets.length, startIndex = len > indexOffset ? len - indexOffset : 0, lastVSign = calculateDirection(offsets);
3624
+ const len = offsets.length, startIndex = len > indexOffset ? len - indexOffset : 0, lastVSign = calculateDirection(offsets), speedScale = (_b = (_a = this.scrollingSettings) === null || _a === void 0 ? void 0 : _a.speedScale) !== null && _b !== void 0 ? _b : SPEED_SCALE;
3608
3625
  let vSum = 0;
3609
3626
  for (let i = startIndex, l = offsets.length; i < l; i++) {
3610
3627
  const p0 = offsets[i];
3611
3628
  if (lastVSign !== Math.sign(p0[0])) {
3612
3629
  continue;
3613
3630
  }
3614
- const v0 = (p0[1] !== 0 ? lastVSign * Math.abs(p0[0] / p0[1]) * SPEED_SCALE : 0);
3631
+ const v0 = (p0[1] !== 0 ? lastVSign * Math.abs(p0[0] / p0[1]) * speedScale : 0);
3615
3632
  vSum += Math.sign(v0) * Math.pow(v0, 4) * .003;
3616
3633
  }
3617
3634
  const l = Math.min(offsets.length, indexOffset), v0 = l > 0 ? (vSum / l) : 0;
3618
3635
  return { v0 };
3619
3636
  }
3620
3637
  calculateAcceleration(velocities, delta, timestamp, indexOffset = 10) {
3638
+ var _a, _b, _c, _d;
3621
3639
  velocities.push([delta, timestamp < ANIMATOR_MIN_TIMESTAMP ? ANIMATOR_MIN_TIMESTAMP : timestamp]);
3622
3640
  const len = velocities.length, startIndex = len > indexOffset ? len - indexOffset : 0;
3623
3641
  let aSum = 0, prevV0, iteration = 0, lastVSign = calculateDirection(velocities);
3642
+ const mass = (_b = (_a = this.scrollingSettings) === null || _a === void 0 ? void 0 : _a.mass) !== null && _b !== void 0 ? _b : MASS;
3624
3643
  for (let i = startIndex, l = velocities.length; i < l; i++) {
3625
3644
  const v00 = prevV0, v01 = velocities[i];
3626
3645
  if (lastVSign !== Math.sign(v01[0])) {
@@ -3628,13 +3647,13 @@ class NgScrollView extends BaseScrollView {
3628
3647
  }
3629
3648
  if (v00) {
3630
3649
  const a0 = timestamp < MAX_VELOCITY_TIMESTAMP ? (v00[1] !== 0 ? (lastVSign * Math.abs(Math.abs(v01[0]) - Math.abs(v00[0]))) / Math.abs(v00[1]) : 0) : 0.1;
3631
- aSum = (aSum * MASS) + a0;
3650
+ aSum = (aSum * mass) + a0;
3632
3651
  prevV0 = v01;
3633
3652
  }
3634
3653
  prevV0 = v01;
3635
3654
  iteration++;
3636
3655
  }
3637
- const a0 = aSum * FRICTION_FORCE;
3656
+ const a0 = aSum * ((_d = (_c = this.scrollingSettings) === null || _c === void 0 ? void 0 : _c.frictionalForce) !== null && _d !== void 0 ? _d : FRICTION_FORCE);
3638
3657
  return { a0 };
3639
3658
  }
3640
3659
  stopScrolling() {
@@ -3644,8 +3663,9 @@ class NgScrollView extends BaseScrollView {
3644
3663
  this.scroll({ [isVertical ? TOP$1 : LEFT$1]: position, behavior: INSTANT$1, blending, userAction, fireUpdate });
3645
3664
  }
3646
3665
  moveWithAcceleration(isVertical, position, v0, v, a0, timestamp) {
3666
+ var _a, _b, _c, _d, _e, _f;
3647
3667
  if (a0 !== 0 && timestamp < MAX_VELOCITY_TIMESTAMP) {
3648
- const dvSign = Math.sign(v), duration = DURATION, maxDuration = MAX_DURATION, maxDistance = dvSign * MAX_DIST, s = (dvSign * Math.abs((a0 * Math.pow(duration, 2)) * .5) / 1000) / MASS, distance = Math.abs(s) < MAX_DIST ? s : maxDistance, positionWithVelocity = position + (this._inversion ? -1 : 1) * distance, vmax = Math.max(Math.abs(v0), Math.abs(v)), ad = Math.abs(vmax !== 0 ? Math.sqrt(vmax) : 0) * 10 / MASS, aDuration = ad < maxDuration ? ad : maxDuration, startPosition = isVertical ? this.y : this.x;
3668
+ const dvSign = Math.sign(v), mass = (_b = (_a = this.scrollingSettings) === null || _a === void 0 ? void 0 : _a.mass) !== null && _b !== void 0 ? _b : MASS, duration = DURATION, maxDuration = (_d = (_c = this.scrollingSettings) === null || _c === void 0 ? void 0 : _c.maxDuration) !== null && _d !== void 0 ? _d : MAX_DURATION, maxDist = (_f = (_e = this.scrollingSettings) === null || _e === void 0 ? void 0 : _e.maxDistance) !== null && _f !== void 0 ? _f : MAX_DIST, maxDistance = dvSign * maxDist, s = (dvSign * Math.abs((a0 * Math.pow(duration, 2)) * .5) / 1000) / mass, distance = Math.abs(s) < maxDist ? s : maxDistance, positionWithVelocity = position + (this._inversion ? -1 : 1) * distance, vmax = Math.max(Math.abs(v0), Math.abs(v)), ad = Math.abs(vmax !== 0 ? Math.sqrt(vmax) : 0) * 10 / mass, aDuration = ad < maxDuration ? ad : maxDuration, startPosition = isVertical ? this.y : this.x;
3649
3669
  this.animate(startPosition, Math.round(positionWithVelocity), aDuration, easeOutQuad, true);
3650
3670
  }
3651
3671
  }
@@ -3771,7 +3791,7 @@ class NgScrollView extends BaseScrollView {
3771
3791
  }
3772
3792
  }
3773
3793
  NgScrollView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgScrollView, deps: [], target: i0.ɵɵFactoryTarget.Component });
3774
- NgScrollView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgScrollView, selector: "ng-scroll-view", inputs: { scrollBehavior: "scrollBehavior", overscrollEnabled: "overscrollEnabled" }, viewQueries: [{ propertyName: "cdkScrollable", first: true, predicate: ["scrollViewport"], descendants: true, read: CdkScrollable }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
3794
+ NgScrollView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgScrollView, selector: "ng-scroll-view", inputs: { scrollBehavior: "scrollBehavior", overscrollEnabled: "overscrollEnabled", scrollingSettings: "scrollingSettings" }, viewQueries: [{ propertyName: "cdkScrollable", first: true, predicate: ["scrollViewport"], descendants: true, read: CdkScrollable }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
3775
3795
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgScrollView, decorators: [{
3776
3796
  type: Component,
3777
3797
  args: [{
@@ -3785,6 +3805,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3785
3805
  type: Input
3786
3806
  }], overscrollEnabled: [{
3787
3807
  type: Input
3808
+ }], scrollingSettings: [{
3809
+ type: Input
3788
3810
  }] } });
3789
3811
 
3790
3812
  const DEFAULT_THICKNESS = 6, DEFAULT_SIZE = 6, PX = 'px', WIDTH = 'width', HEIGHT = 'height', OPACITY = 'opacity', OPACITY_0 = '0', OPACITY_1 = '1', TRANSITION = 'transition', NONE = 'none', TRANSITION_FADE_IN = `${OPACITY} 500ms ease-out`;
@@ -5634,6 +5656,57 @@ class NgVirtualListComponent extends DisposableComponent {
5634
5656
  }
5635
5657
  return v;
5636
5658
  };
5659
+ this._$scrollingSettings = new BehaviorSubject(DEFAULT_SCROLLING_SETTINGS);
5660
+ this.$scrollingSettings = this._$scrollingSettings.asObservable();
5661
+ this._scrollingSettingsTransform = (v) => {
5662
+ var _a;
5663
+ let valid = validateObject(v, true, true);
5664
+ if (valid && !!v) {
5665
+ const { frictionalForce, mass, maxDistance, maxDuration, speedScale, optimization } = v;
5666
+ valid = validateFloat(frictionalForce, true);
5667
+ if (!valid) {
5668
+ console.error('The "frictionalForce" parameter must be of type `number` or `undefined`.');
5669
+ return DEFAULT_SCROLLING_SETTINGS;
5670
+ }
5671
+ valid = validateFloat(mass, true);
5672
+ if (!valid) {
5673
+ console.error('The "mass" parameter must be of type `number` or `undefined`.');
5674
+ return DEFAULT_SCROLLING_SETTINGS;
5675
+ }
5676
+ valid = validateFloat(maxDistance, true);
5677
+ if (!valid) {
5678
+ console.error('The "maxDistance" parameter must be of type `number` or `undefined`.');
5679
+ return DEFAULT_SCROLLING_SETTINGS;
5680
+ }
5681
+ valid = validateFloat(maxDuration, true);
5682
+ if (!valid) {
5683
+ console.error('The "maxDuration" parameter must be of type `number` or `undefined`.');
5684
+ return DEFAULT_SCROLLING_SETTINGS;
5685
+ }
5686
+ valid = validateFloat(speedScale, true);
5687
+ if (!valid) {
5688
+ console.error('The "speedScale" parameter must be of type `number` or `undefined`.');
5689
+ return DEFAULT_SCROLLING_SETTINGS;
5690
+ }
5691
+ valid = validateBoolean(optimization, true);
5692
+ if (!valid) {
5693
+ console.error('The "optimization" parameter must be of type `boolean` or `undefined`.');
5694
+ return DEFAULT_SCROLLING_SETTINGS;
5695
+ }
5696
+ }
5697
+ if (!valid) {
5698
+ console.error('The "scrollingSettings" parameter must be of type `object` or null.');
5699
+ return DEFAULT_SCROLLING_SETTINGS;
5700
+ }
5701
+ return {
5702
+ frictionalForce: v.frictionalForce !== undefined && v.frictionalForce > 0 ? v.frictionalForce : DEFAULT_SCROLLING_SETTINGS.frictionalForce,
5703
+ mass: v.mass !== undefined && v.mass > 0 ? v.mass : DEFAULT_SCROLLING_SETTINGS.mass,
5704
+ maxDistance: v.maxDistance !== undefined && v.maxDistance > 0 ? v.maxDistance : DEFAULT_SCROLLING_SETTINGS.maxDistance,
5705
+ maxDuration: v.maxDuration !== undefined && v.maxDuration > 0 ? v.maxDuration : DEFAULT_SCROLLING_SETTINGS.maxDuration,
5706
+ speedScale: v.speedScale !== undefined && v.speedScale > 0 ? v.speedScale : DEFAULT_SCROLLING_SETTINGS.speedScale,
5707
+ optimization: (_a = v.optimization) !== null && _a !== void 0 ? _a : DEFAULT_SCROLLING_SETTINGS.optimization,
5708
+ };
5709
+ };
5637
5710
  this._$animationParams = new BehaviorSubject(DEFAULT_ANIMATION_PARAMS);
5638
5711
  this.$animationParams = this._$animationParams.asObservable();
5639
5712
  this._animationParamsTransform = (v) => {
@@ -6282,6 +6355,24 @@ class NgVirtualListComponent extends DisposableComponent {
6282
6355
  }
6283
6356
  ;
6284
6357
  get scrollBehavior() { return this._$scrollBehavior.getValue(); }
6358
+ /**
6359
+ * Scrolling settings.
6360
+ * - frictionalForce - Frictional force. Default value is 0.035.
6361
+ * - mass - Mass. Default value is 0.005.
6362
+ * - maxDistance - Maximum scrolling distance. Default value is 12500.
6363
+ * - maxDuration - Maximum animation duration. Default value is 4000.
6364
+ * - speedScale - Speed scale. Default value is 15.
6365
+ * - optimization - Enables scrolling performance optimization. Default value is `true`.
6366
+ */
6367
+ set scrollingSettings(v) {
6368
+ if (this._$scrollingSettings.getValue() === v) {
6369
+ return;
6370
+ }
6371
+ const transformedValue = this._scrollingSettingsTransform(v);
6372
+ this._$scrollingSettings.next(transformedValue);
6373
+ }
6374
+ ;
6375
+ get scrollingSettings() { return this._$scrollingSettings.getValue(); }
6285
6376
  /**
6286
6377
  * Animation parameters. The default value is "{ scrollToItem: 50, navigateToItem: 150, navigateByKeyboard: 50 }".
6287
6378
  */
@@ -6918,7 +7009,7 @@ class NgVirtualListComponent extends DisposableComponent {
6918
7009
  }
6919
7010
  })).subscribe();
6920
7011
  const $preventScrollSnapping = this.$preventScrollSnapping;
6921
- $preventScrollSnapping.pipe(takeUntil(this._$unsubscribe), filter$1(v => !!v), debounceTime(0), tap(() => {
7012
+ $preventScrollSnapping.pipe(takeUntil(this._$unsubscribe), filter$1(v => !!v), tap(() => {
6922
7013
  if (this._readyForShow) {
6923
7014
  this._trackBox.isScrollEnd;
6924
7015
  this._trackBox.isScrollStart = this._trackBox.isScrollEnd = false;
@@ -7002,12 +7093,12 @@ class NgVirtualListComponent extends DisposableComponent {
7002
7093
  this.resetBoundsSize(isVertical, totalSize);
7003
7094
  this.createDisplayComponentsIfNeed(displayItems);
7004
7095
  this.tracking();
7096
+ this.snappingHandler();
7005
7097
  const delta = this._trackBox.delta, scrollPositionAfterUpdate = Math.round(actualScrollSize + delta), roundedScrollPositionAfterUpdate = Math.round(scrollPositionAfterUpdate), roundedMaxPositionAfterUpdate = Math.round(totalSize - viewportSize);
7006
7098
  if (this._isSnappingMethodAdvanced) {
7007
7099
  this.updateRegularRenderer();
7008
7100
  }
7009
7101
  scroller.delta = delta;
7010
- this.snappingHandler();
7011
7102
  if ((snapScrollToStart && this._trackBox.isSnappedToStart) ||
7012
7103
  (snapScrollToStart && currentScrollSize <= MIN_PIXELS_FOR_PREVENT_SNAPPING)) {
7013
7104
  if (currentScrollSize !== roundedScrollPositionAfterUpdate) {
@@ -7048,11 +7139,11 @@ class NgVirtualListComponent extends DisposableComponent {
7048
7139
  if (emitUpdate) {
7049
7140
  this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
7050
7141
  }
7051
- this._trackBox.isScrollEnd;
7052
7142
  return;
7053
7143
  }
7054
- if ((scrollPositionAfterUpdate >= 0 && scrollPositionAfterUpdate < roundedMaxPositionAfterUpdate) ||
7055
- (scrollSize !== roundedMaxPositionAfterUpdate || currentScrollSize !== scrollPositionAfterUpdate)) {
7144
+ if (scrollSize !== scrollPositionAfterUpdate &&
7145
+ ((scrollPositionAfterUpdate >= 0 && scrollPositionAfterUpdate < roundedMaxPositionAfterUpdate) ||
7146
+ (scrollSize !== roundedMaxPositionAfterUpdate || currentScrollSize !== scrollPositionAfterUpdate))) {
7056
7147
  this._trackBox.clearDelta();
7057
7148
  if (this._readyForShow) {
7058
7149
  this.emitScrollEvent(true, false, userAction);
@@ -7065,8 +7156,8 @@ class NgVirtualListComponent extends DisposableComponent {
7065
7156
  if (emitUpdate) {
7066
7157
  this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
7067
7158
  }
7159
+ return;
7068
7160
  }
7069
- return;
7070
7161
  }
7071
7162
  if (emitUpdate) {
7072
7163
  this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
@@ -7078,22 +7169,24 @@ class NgVirtualListComponent extends DisposableComponent {
7078
7169
  combineLatest([$snapScrollToStart, $snapScrollToEnd, $bounds, $listBounds, $scrollEndOffset, $actualItems, $itemConfigMap, $scrollSize, $itemSize,
7079
7170
  $collapsedItemIds, $bufferSize, $maxBufferSize, $snap, $isVertical, $dynamicSize, $enabledBufferOptimization, $cacheVersion, this.$fireUpdate,
7080
7171
  ]).pipe(takeUntil(this._$unsubscribe), tap(([snapScrollToStart, snapScrollToEnd, bounds, listBounds, scrollEndOffset, items, itemConfigMap, scrollSize, itemSize, collapsedIds, bufferSize, maxBufferSize, snap, isVertical, dynamicSize, enabledBufferOptimization, cacheVersion,]) => {
7081
- var _a, _b, _c;
7172
+ var _a, _b, _c, _d, _e;
7082
7173
  let itemsChanged = false;
7083
7174
  if (prevItems !== items) {
7084
7175
  itemsChanged = true;
7085
7176
  prevItems = items;
7086
7177
  }
7087
- const scroller = this._scrollerComponent, velocity = (_b = (_a = this._scrollerComponent) === null || _a === void 0 ? void 0 : _a.averageVelocity) !== null && _b !== void 0 ? _b : 0, maxScrollSize = isVertical ? ((scroller === null || scroller === void 0 ? void 0 : scroller.scrollHeight) || 0) : ((_c = scroller === null || scroller === void 0 ? void 0 : scroller.scrollWidth) !== null && _c !== void 0 ? _c : 0), isEdges = scrollSize === 0 || scrollSize === maxScrollSize, isScrolling = this._$scrollingTo.getValue(), useDebouncedUpdate = dynamicSize && !itemsChanged && hasUserAction && !isScrolling && (velocity > 0 && velocity < MAX_VELOCITY_FOR_SCROLL_QUALITY_OPTIMIZATION_LVL1), rerenderOptimization = dynamicSize && !itemsChanged && (hasUserAction || hasScrollbarUserAction) && !isEdges && velocity > 0 &&
7178
+ const enabledOptimization = (_b = (_a = this.scrollingSettings) === null || _a === void 0 ? void 0 : _a.optimization) !== null && _b !== void 0 ? _b : DEFAULT_SCROLLING_SETTINGS.optimization, scroller = this._scrollerComponent, velocity = (_d = (_c = this._scrollerComponent) === null || _c === void 0 ? void 0 : _c.averageVelocity) !== null && _d !== void 0 ? _d : 0, maxScrollSize = isVertical ? ((scroller === null || scroller === void 0 ? void 0 : scroller.scrollHeight) || 0) : ((_e = scroller === null || scroller === void 0 ? void 0 : scroller.scrollWidth) !== null && _e !== void 0 ? _e : 0), isEdges = scrollSize === 0 || scrollSize === maxScrollSize, isScrolling = this._$scrollingTo.getValue(), useDebouncedUpdate = dynamicSize && !itemsChanged && hasUserAction && !isScrolling && (velocity > 0 && velocity < MAX_VELOCITY_FOR_SCROLL_QUALITY_OPTIMIZATION_LVL1), rerenderOptimization = enabledOptimization && dynamicSize && !itemsChanged && (hasUserAction || hasScrollbarUserAction) && !isEdges && velocity > 0 &&
7088
7179
  (velocity > MAX_VELOCITY_FOR_SCROLL_QUALITY_OPTIMIZATION_LVL2 || hasUserAction);
7089
- if (useDebouncedUpdate) {
7090
- debouncedUpdate.execute({
7091
- snapScrollToStart, snapScrollToEnd, bounds: bounds, listBounds: listBounds, scrollEndOffset, items, itemConfigMap, scrollSize, itemSize, collapsedIds,
7092
- bufferSize, maxBufferSize, snap, isVertical, dynamicSize, enabledBufferOptimization, cacheVersion, userAction: hasUserAction,
7093
- }, rerenderOptimization, itemsChanged);
7094
- return;
7180
+ if (enabledOptimization) {
7181
+ if (useDebouncedUpdate) {
7182
+ debouncedUpdate.execute({
7183
+ snapScrollToStart, snapScrollToEnd, bounds, listBounds, scrollEndOffset, items, itemConfigMap, scrollSize, itemSize, collapsedIds,
7184
+ bufferSize, maxBufferSize, snap, isVertical, dynamicSize, enabledBufferOptimization, cacheVersion, userAction: hasUserAction,
7185
+ }, rerenderOptimization, itemsChanged);
7186
+ return;
7187
+ }
7188
+ debouncedUpdate.dispose();
7095
7189
  }
7096
- debouncedUpdate.dispose();
7097
7190
  if (!isScrolling) {
7098
7191
  update({
7099
7192
  snapScrollToStart, snapScrollToEnd, bounds: bounds, listBounds: listBounds, scrollEndOffset, items, itemConfigMap, scrollSize, itemSize, collapsedIds,
@@ -7103,22 +7196,12 @@ class NgVirtualListComponent extends DisposableComponent {
7103
7196
  })).subscribe();
7104
7197
  const $scroller = this.$scroller.pipe(takeUntil(this._$unsubscribe), filter$1(v => !!v), map(v => v.nativeElement), take(1)), $scrollerScroll = this._scrollerComponent.$scroll, $scrollerScrollEnd = this._scrollerComponent.$scrollEnd, $scrollbarScroll = this._scrollerComponent.$scrollbarScroll;
7105
7198
  const scrollHandler = (userAction = false) => {
7106
- var _a, _b, _c, _d;
7107
7199
  const scroller = this._scrollerComponent;
7108
7200
  if (!!scroller) {
7109
- const isVertical = this._isVertical, bounds = this._$bounds.getValue(), listBounds = this._$listBounds.getValue(), scrollSize = (isVertical ? scroller.scrollTop : scroller.scrollLeft), maxScrollSize = isVertical ? ((_a = listBounds === null || listBounds === void 0 ? void 0 : listBounds.height) !== null && _a !== void 0 ? _a : 0) - ((_b = bounds === null || bounds === void 0 ? void 0 : bounds.height) !== null && _b !== void 0 ? _b : 0) : ((_c = listBounds === null || listBounds === void 0 ? void 0 : listBounds.width) !== null && _c !== void 0 ? _c : 0) - ((_d = bounds === null || bounds === void 0 ? void 0 : bounds.width) !== null && _d !== void 0 ? _d : 0), actualScrollSize = scrollSize;
7201
+ const isVertical = this._isVertical, scrollSize = (isVertical ? scroller.scrollTop : scroller.scrollLeft), actualScrollSize = scrollSize;
7110
7202
  if (this._readyForShow) {
7111
7203
  if (userAction) {
7112
- if (this._trackBox.isSnappedToStart) {
7113
- if (scrollSize > MIN_PIXELS_FOR_PREVENT_SNAPPING) {
7114
- this._$preventScrollSnapping.next(true);
7115
- }
7116
- }
7117
- if (this._trackBox.isSnappedToEnd) {
7118
- if (scrollSize < (maxScrollSize - MIN_PIXELS_FOR_PREVENT_SNAPPING)) {
7119
- this._$preventScrollSnapping.next(true);
7120
- }
7121
- }
7204
+ this._$preventScrollSnapping.next(true);
7122
7205
  }
7123
7206
  }
7124
7207
  this._$scrollSize.next(actualScrollSize);
@@ -7687,12 +7770,12 @@ class NgVirtualListComponent extends DisposableComponent {
7687
7770
  }
7688
7771
  NgVirtualListComponent.__nextId = 0;
7689
7772
  NgVirtualListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgVirtualListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7690
- NgVirtualListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgVirtualListComponent, selector: "ng-virtual-list", inputs: { scrollbarThickness: "scrollbarThickness", scrollbarMinSize: "scrollbarMinSize", scrollbarThumbRenderer: "scrollbarThumbRenderer", scrollbarThumbParams: "scrollbarThumbParams", loading: "loading", waitForPreparation: "waitForPreparation", clickDistance: "clickDistance", snapToEndTransitionInstantOffset: "snapToEndTransitionInstantOffset", items: "items", defaultItemValue: "defaultItemValue", selectedIds: "selectedIds", collapsedIds: "collapsedIds", selectByClick: "selectByClick", collapseByClick: "collapseByClick", snap: "snap", scrollStartOffset: "scrollStartOffset", scrollEndOffset: "scrollEndOffset", snapScrollToStart: "snapScrollToStart", snapScrollToEnd: "snapScrollToEnd", snapScrollToBottom: "snapScrollToBottom", scrollbarEnabled: "scrollbarEnabled", scrollbarInteractive: "scrollbarInteractive", scrollBehavior: "scrollBehavior", animationParams: "animationParams", overscrollEnabled: "overscrollEnabled", enabledBufferOptimization: "enabledBufferOptimization", itemRenderer: "itemRenderer", itemConfigMap: "itemConfigMap", itemSize: "itemSize", dynamicSize: "dynamicSize", direction: "direction", collectionMode: "collectionMode", bufferSize: "bufferSize", maxBufferSize: "maxBufferSize", snappingMethod: "snappingMethod", methodForSelecting: "methodForSelecting", trackBy: "trackBy", screenReaderMessage: "screenReaderMessage", langTextDir: "langTextDir" }, outputs: { onScroll: "onScroll", onScrollEnd: "onScrollEnd", onViewportChange: "onViewportChange", onItemClick: "onItemClick", onSelect: "onSelect", onCollapse: "onCollapse", onScrollReachStart: "onScrollReachStart", onScrollReachEnd: "onScrollReachEnd" }, host: { styleAttribute: "position: relative;" }, providers: [NgVirtualListService, NgVirtualListPublicService], viewQueries: [{ propertyName: "_prerender", first: true, predicate: ["prerender"], descendants: true, read: NgPrerenderContainer }, { propertyName: "_listContainerRef", first: true, predicate: ["renderersContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_snapContainerRef", first: true, predicate: ["snapRendererContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_scrollerComponent", first: true, predicate: ["scroller"], descendants: true, read: NgScrollerComponent }], usesInheritance: true, ngImport: i0, template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ $screenReaderFormattedMessage | async }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"($bounds | async)!\" [direction]=\"($direction | async)!\"\r\n [dynamic]=\"($dynamicSize | async)!\" [isVertical]=\"($isVertical | async)!\"\r\n [itemSize]=\"($itemSize | async)!\" [trackBy]=\"($trackBy | async)!\" [itemRenderer]=\"($itemRenderer | async)!\"\r\n [startOffset]=\"($scrollStartOffset | async)!\" [endOffset]=\"($scrollEndOffset | async)!\"\r\n [scrollbarEnabled]=\"(scroller.$scrollbarShow | async)!\"\r\n [enabled]=\"($prerenderEnabled | async)!\"></ng-prerender-container>\r\n\r\n<ng-container *ngIf=\"$snap | async\">\r\n <div localeSensitive [langTextDir]=\"($langTextDir | async)!\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"($classes | async)!\">\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n </div>\r\n</ng-container>\r\n<ng-scroller class=\"ngvl__list-scroller\" #scroller [classes]=\"($classes | async)!\"\r\n [startOffset]=\"($scrollStartOffset | async)!\" [direction]=\"($direction | async)!\"\r\n [endOffset]=\"($scrollEndOffset | async)!\" [scrollbarThumbRenderer]=\"($scrollbarThumbRenderer | async)!\"\r\n [scrollbarThickness]=\"($scrollbarThickness | async)!\" [scrollbarThumbParams]=\"($scrollbarThumbParams | async)\"\r\n [focusedElement]=\"($focusedElement | async)!\" [loading]=\"($loading | async)!\"\r\n [overscrollEnabled]=\"($overscrollEnabled | async)!\" [scrollbarEnabled]=\"($scrollbarEnabled | async)!\"\r\n [scrollbarInteractive]=\"($scrollbarInteractive | async)!\" [scrollbarMinSize]=\"($scrollbarMinSize | async)!\"\r\n [scrollBehavior]=\"($scrollBehavior | async)!\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgScrollerComponent, selector: "ng-scroller", inputs: ["scrollbarEnabled", "scrollbarInteractive", "focusedElement", "content", "loading", "classes", "scrollbarMinSize", "scrollbarThickness", "scrollbarThumbRenderer", "scrollbarThumbParams"], outputs: ["onScrollbarVisible"] }, { kind: "component", type: NgPrerenderContainer, selector: "ng-prerender-container", inputs: ["enabled", "direction", "isVertical", "scrollbarEnabled", "startOffset", "endOffset", "bounds", "dynamic", "itemSize", "trackBy", "itemRenderer"] }, { kind: "directive", type: LocaleSensitiveDirective, selector: "[localeSensitive]", inputs: ["langTextDir", "listDir"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
7773
+ NgVirtualListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgVirtualListComponent, selector: "ng-virtual-list", inputs: { scrollbarThickness: "scrollbarThickness", scrollbarMinSize: "scrollbarMinSize", scrollbarThumbRenderer: "scrollbarThumbRenderer", scrollbarThumbParams: "scrollbarThumbParams", loading: "loading", waitForPreparation: "waitForPreparation", clickDistance: "clickDistance", snapToEndTransitionInstantOffset: "snapToEndTransitionInstantOffset", items: "items", defaultItemValue: "defaultItemValue", selectedIds: "selectedIds", collapsedIds: "collapsedIds", selectByClick: "selectByClick", collapseByClick: "collapseByClick", snap: "snap", scrollStartOffset: "scrollStartOffset", scrollEndOffset: "scrollEndOffset", snapScrollToStart: "snapScrollToStart", snapScrollToEnd: "snapScrollToEnd", snapScrollToBottom: "snapScrollToBottom", scrollbarEnabled: "scrollbarEnabled", scrollbarInteractive: "scrollbarInteractive", scrollBehavior: "scrollBehavior", scrollingSettings: "scrollingSettings", animationParams: "animationParams", overscrollEnabled: "overscrollEnabled", enabledBufferOptimization: "enabledBufferOptimization", itemRenderer: "itemRenderer", itemConfigMap: "itemConfigMap", itemSize: "itemSize", dynamicSize: "dynamicSize", direction: "direction", collectionMode: "collectionMode", bufferSize: "bufferSize", maxBufferSize: "maxBufferSize", snappingMethod: "snappingMethod", methodForSelecting: "methodForSelecting", trackBy: "trackBy", screenReaderMessage: "screenReaderMessage", langTextDir: "langTextDir" }, outputs: { onScroll: "onScroll", onScrollEnd: "onScrollEnd", onViewportChange: "onViewportChange", onItemClick: "onItemClick", onSelect: "onSelect", onCollapse: "onCollapse", onScrollReachStart: "onScrollReachStart", onScrollReachEnd: "onScrollReachEnd" }, host: { styleAttribute: "position: relative;" }, providers: [NgVirtualListService, NgVirtualListPublicService], viewQueries: [{ propertyName: "_prerender", first: true, predicate: ["prerender"], descendants: true, read: NgPrerenderContainer }, { propertyName: "_listContainerRef", first: true, predicate: ["renderersContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_snapContainerRef", first: true, predicate: ["snapRendererContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_scrollerComponent", first: true, predicate: ["scroller"], descendants: true, read: NgScrollerComponent }], usesInheritance: true, ngImport: i0, template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ $screenReaderFormattedMessage | async }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"($bounds | async)!\" [direction]=\"($direction | async)!\"\r\n [dynamic]=\"($dynamicSize | async)!\" [isVertical]=\"($isVertical | async)!\"\r\n [itemSize]=\"($itemSize | async)!\" [trackBy]=\"($trackBy | async)!\" [itemRenderer]=\"($itemRenderer | async)!\"\r\n [startOffset]=\"($scrollStartOffset | async)!\" [endOffset]=\"($scrollEndOffset | async)!\"\r\n [scrollbarEnabled]=\"(scroller.$scrollbarShow | async)!\"\r\n [enabled]=\"($prerenderEnabled | async)!\"></ng-prerender-container>\r\n\r\n<ng-container *ngIf=\"$snap | async\">\r\n <div localeSensitive [langTextDir]=\"($langTextDir | async)!\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"($classes | async)!\">\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n </div>\r\n</ng-container>\r\n<ng-scroller class=\"ngvl__list-scroller\" #scroller [classes]=\"($classes | async)!\"\r\n [startOffset]=\"($scrollStartOffset | async)!\" [direction]=\"($direction | async)!\"\r\n [endOffset]=\"($scrollEndOffset | async)!\" [scrollbarThumbRenderer]=\"($scrollbarThumbRenderer | async)!\"\r\n [scrollbarThickness]=\"($scrollbarThickness | async)!\" [scrollbarThumbParams]=\"($scrollbarThumbParams | async)\"\r\n [focusedElement]=\"($focusedElement | async)!\" [loading]=\"($loading | async)!\"\r\n [overscrollEnabled]=\"($overscrollEnabled | async)!\" [scrollbarEnabled]=\"($scrollbarEnabled | async)!\"\r\n [scrollbarInteractive]=\"($scrollbarInteractive | async)!\" [scrollbarMinSize]=\"($scrollbarMinSize | async)!\"\r\n [scrollBehavior]=\"($scrollBehavior | async)!\" [scrollingSettings]=\"($scrollingSettings | async)!\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgScrollerComponent, selector: "ng-scroller", inputs: ["scrollbarEnabled", "scrollbarInteractive", "focusedElement", "content", "loading", "classes", "scrollbarMinSize", "scrollbarThickness", "scrollbarThumbRenderer", "scrollbarThumbParams"], outputs: ["onScrollbarVisible"] }, { kind: "component", type: NgPrerenderContainer, selector: "ng-prerender-container", inputs: ["enabled", "direction", "isVertical", "scrollbarEnabled", "startOffset", "endOffset", "bounds", "dynamic", "itemSize", "trackBy", "itemRenderer"] }, { kind: "directive", type: LocaleSensitiveDirective, selector: "[localeSensitive]", inputs: ["langTextDir", "listDir"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
7691
7774
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgVirtualListComponent, decorators: [{
7692
7775
  type: Component,
7693
7776
  args: [{ selector: 'ng-virtual-list', host: {
7694
7777
  'style': 'position: relative;'
7695
- }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, providers: [NgVirtualListService, NgVirtualListPublicService], template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ $screenReaderFormattedMessage | async }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"($bounds | async)!\" [direction]=\"($direction | async)!\"\r\n [dynamic]=\"($dynamicSize | async)!\" [isVertical]=\"($isVertical | async)!\"\r\n [itemSize]=\"($itemSize | async)!\" [trackBy]=\"($trackBy | async)!\" [itemRenderer]=\"($itemRenderer | async)!\"\r\n [startOffset]=\"($scrollStartOffset | async)!\" [endOffset]=\"($scrollEndOffset | async)!\"\r\n [scrollbarEnabled]=\"(scroller.$scrollbarShow | async)!\"\r\n [enabled]=\"($prerenderEnabled | async)!\"></ng-prerender-container>\r\n\r\n<ng-container *ngIf=\"$snap | async\">\r\n <div localeSensitive [langTextDir]=\"($langTextDir | async)!\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"($classes | async)!\">\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n </div>\r\n</ng-container>\r\n<ng-scroller class=\"ngvl__list-scroller\" #scroller [classes]=\"($classes | async)!\"\r\n [startOffset]=\"($scrollStartOffset | async)!\" [direction]=\"($direction | async)!\"\r\n [endOffset]=\"($scrollEndOffset | async)!\" [scrollbarThumbRenderer]=\"($scrollbarThumbRenderer | async)!\"\r\n [scrollbarThickness]=\"($scrollbarThickness | async)!\" [scrollbarThumbParams]=\"($scrollbarThumbParams | async)\"\r\n [focusedElement]=\"($focusedElement | async)!\" [loading]=\"($loading | async)!\"\r\n [overscrollEnabled]=\"($overscrollEnabled | async)!\" [scrollbarEnabled]=\"($scrollbarEnabled | async)!\"\r\n [scrollbarInteractive]=\"($scrollbarInteractive | async)!\" [scrollbarMinSize]=\"($scrollbarMinSize | async)!\"\r\n [scrollBehavior]=\"($scrollBehavior | async)!\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
7778
+ }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, providers: [NgVirtualListService, NgVirtualListPublicService], template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ $screenReaderFormattedMessage | async }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"($bounds | async)!\" [direction]=\"($direction | async)!\"\r\n [dynamic]=\"($dynamicSize | async)!\" [isVertical]=\"($isVertical | async)!\"\r\n [itemSize]=\"($itemSize | async)!\" [trackBy]=\"($trackBy | async)!\" [itemRenderer]=\"($itemRenderer | async)!\"\r\n [startOffset]=\"($scrollStartOffset | async)!\" [endOffset]=\"($scrollEndOffset | async)!\"\r\n [scrollbarEnabled]=\"(scroller.$scrollbarShow | async)!\"\r\n [enabled]=\"($prerenderEnabled | async)!\"></ng-prerender-container>\r\n\r\n<ng-container *ngIf=\"$snap | async\">\r\n <div localeSensitive [langTextDir]=\"($langTextDir | async)!\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"($classes | async)!\">\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n </div>\r\n</ng-container>\r\n<ng-scroller class=\"ngvl__list-scroller\" #scroller [classes]=\"($classes | async)!\"\r\n [startOffset]=\"($scrollStartOffset | async)!\" [direction]=\"($direction | async)!\"\r\n [endOffset]=\"($scrollEndOffset | async)!\" [scrollbarThumbRenderer]=\"($scrollbarThumbRenderer | async)!\"\r\n [scrollbarThickness]=\"($scrollbarThickness | async)!\" [scrollbarThumbParams]=\"($scrollbarThumbParams | async)\"\r\n [focusedElement]=\"($focusedElement | async)!\" [loading]=\"($loading | async)!\"\r\n [overscrollEnabled]=\"($overscrollEnabled | async)!\" [scrollbarEnabled]=\"($scrollbarEnabled | async)!\"\r\n [scrollbarInteractive]=\"($scrollbarInteractive | async)!\" [scrollbarMinSize]=\"($scrollbarMinSize | async)!\"\r\n [scrollBehavior]=\"($scrollBehavior | async)!\" [scrollingSettings]=\"($scrollingSettings | async)!\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
7696
7779
  }], ctorParameters: function () { return []; }, propDecorators: { _prerender: [{
7697
7780
  type: ViewChild,
7698
7781
  args: ['prerender', { read: NgPrerenderContainer }]
@@ -7767,6 +7850,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
7767
7850
  type: Input
7768
7851
  }], scrollBehavior: [{
7769
7852
  type: Input
7853
+ }], scrollingSettings: [{
7854
+ type: Input
7770
7855
  }], animationParams: [{
7771
7856
  type: Input
7772
7857
  }], overscrollEnabled: [{
@@ -7842,7 +7927,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
7842
7927
  declarations: [NgVirtualListItemComponent],
7843
7928
  exports: [NgVirtualListItemComponent],
7844
7929
  imports: [CommonModule, ItemClickModule],
7845
- schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
7930
+ schemas: [NO_ERRORS_SCHEMA],
7846
7931
  }]
7847
7932
  }] });
7848
7933
 
@@ -7857,7 +7942,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
7857
7942
  declarations: [NgScrollBarComponent],
7858
7943
  exports: [NgScrollBarComponent],
7859
7944
  imports: [CommonModule],
7860
- schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
7945
+ schemas: [NO_ERRORS_SCHEMA],
7861
7946
  }]
7862
7947
  }] });
7863
7948
 
@@ -7872,7 +7957,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
7872
7957
  declarations: [NgScrollerComponent],
7873
7958
  exports: [NgScrollerComponent],
7874
7959
  imports: [CommonModule, NgScrollBarModule, LocaleSensitiveModule, CdkScrollableModule],
7875
- schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
7960
+ schemas: [NO_ERRORS_SCHEMA],
7876
7961
  }]
7877
7962
  }] });
7878
7963
 
@@ -7887,7 +7972,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
7887
7972
  declarations: [NgPrerenderVirtualListItemComponent],
7888
7973
  exports: [NgPrerenderVirtualListItemComponent],
7889
7974
  imports: [CommonModule, ItemClickModule],
7890
- schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
7975
+ schemas: [NO_ERRORS_SCHEMA],
7891
7976
  }]
7892
7977
  }] });
7893
7978