ng-virtual-list 19.11.1 → 19.11.3

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.
package/README.md CHANGED
@@ -638,6 +638,7 @@ Inputs
638
638
  | scrollbarThumbRenderer | TemplateRef<any> \| null = null | Scrollbar customization template. |
639
639
  | scrollbarThumbParams | {[propName: string]: any;} \| null | Additional options for the scrollbar. |
640
640
  | scrollBehavior | ScrollBehavior? = 'smooth' | Defines the scrolling behavior for any element on the page. The default value is "smooth". |
641
+ | scrollingSettings | [IScrollingSettings](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/scrolling-settings.ts) = {frictionalForce: 0.035, mass: 0.005, maxDistance: 12500, maxDuration: 4000, speedScale: 15, optimization: true} | Scrolling settings. |
641
642
  | trackBy | string? = 'id' | The name of the property by which tracking is performed. |
642
643
 
643
644
  <br/>
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, signal, ElementRef, DestroyRef, computed, output, Input, Directive, Injector, ChangeDetectionStrategy, Component, InjectionToken, viewChild, input, ViewChild, effect, ViewContainerRef, ViewEncapsulation, NO_ERRORS_SCHEMA, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import { Injectable, inject, signal, ElementRef, DestroyRef, computed, output, Input, Directive, Injector, ChangeDetectionStrategy, Component, InjectionToken, viewChild, input, ViewChild, effect, ViewContainerRef, ViewEncapsulation, NO_ERRORS_SCHEMA, NgModule } from '@angular/core';
3
3
  import { Subject, BehaviorSubject, tap, fromEvent, race, of, debounceTime, switchMap as switchMap$1, combineLatest, map, filter as filter$1, takeUntil as takeUntil$1, startWith, from, take, delay, distinctUntilChanged, skip } from 'rxjs';
4
4
  import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
5
5
  import { BehaviorSubject as BehaviorSubject$1 } from 'rxjs/internal/BehaviorSubject';
@@ -190,6 +190,14 @@ const DEFAULT_ANIMATION_PARAMS = {
190
190
  navigateToItem: 150,
191
191
  navigateByKeyboard: NAVIGATION_BY_KEYBOARD_TIMER,
192
192
  };
193
+ const DEFAULT_SCROLLING_SETTINGS = {
194
+ frictionalForce: 0.035,
195
+ maxDuration: 4000,
196
+ mass: 0.005,
197
+ maxDistance: 12500,
198
+ speedScale: 15,
199
+ optimization: true,
200
+ };
193
201
  const DEFAULT_OVERSCROLL_ENABLED = true;
194
202
  const DEFAULT_SNAP = false;
195
203
  const DEFAULT_SELECT_BY_CLICK = true;
@@ -275,6 +283,7 @@ const PART_ITEM_FOCUSED = ' item-focused';
275
283
  const MIN_PIXELS_FOR_PREVENT_SNAPPING = 10;
276
284
  const MAX_VELOCITY_FOR_SCROLL_QUALITY_OPTIMIZATION_LVL1 = 74;
277
285
  const MAX_VELOCITY_FOR_SCROLL_QUALITY_OPTIMIZATION_LVL2 = 500;
286
+ const MAX_NUMBERS_OF_SKIPS_FOR_QUALITY_OPTIMIZATION_LVL1 = 4;
278
287
  const RANGE_DISPLAY_ITEMS_END_OFFSET = 20;
279
288
  const PREPARE_ITERATIONS = 1;
280
289
  const PREPARATION_REUPDATE_LENGTH = 0;
@@ -1078,6 +1087,7 @@ class TrackBox extends CacheMap {
1078
1087
  _resetBufferSizeTimer;
1079
1088
  _isReseted = true;
1080
1089
  _prerenderedCache = null;
1090
+ _newItems = [];
1081
1091
  lifeCircle() {
1082
1092
  this.fireChangeIfNeed();
1083
1093
  this.fireTick();
@@ -1104,6 +1114,7 @@ class TrackBox extends CacheMap {
1104
1114
  updateCache(previousCollection, currentCollection, itemSize) {
1105
1115
  const trackBy = this._trackingPropertyName;
1106
1116
  let crudDetected = false;
1117
+ this._newItems = [];
1107
1118
  if (!currentCollection || currentCollection.length === 0) {
1108
1119
  if (previousCollection) {
1109
1120
  // deleted
@@ -1171,6 +1182,7 @@ class TrackBox extends CacheMap {
1171
1182
  const item = currentCollection[i], id = item[trackBy];
1172
1183
  if (item && !deletedMap.hasOwnProperty(id) && !updatedMap.hasOwnProperty(id) &&
1173
1184
  !notChangedMap.hasOwnProperty(id)) {
1185
+ this._newItems.push(id);
1174
1186
  // added
1175
1187
  crudDetected = true;
1176
1188
  this._map.set(id, { width: itemSize, height: itemSize, method: ItemDisplayMethods.CREATE });
@@ -1338,7 +1350,7 @@ class TrackBox extends CacheMap {
1338
1350
  }
1339
1351
  }
1340
1352
  }
1341
- let y = this._scrollStartOffset, stickyCollectionItem = undefined, stickyComponentSize = 0;
1353
+ let y = this._scrollStartOffset, stickyComponentSize = 0;
1342
1354
  for (let i = 0, l = collection.length; i < l; i++) {
1343
1355
  const ii = i + 1, collectionItem = collection[i], id = collectionItem[trackBy];
1344
1356
  let componentSize = 0, componentSizeDelta = 0, itemDisplayMethod = ItemDisplayMethods.NOT_CHANGED;
@@ -1346,7 +1358,7 @@ class TrackBox extends CacheMap {
1346
1358
  const cache = map.get(id);
1347
1359
  componentSize = cache[sizeProperty] > 0 ? cache[sizeProperty] : typicalItemSize;
1348
1360
  itemDisplayMethod = cache?.method ?? ItemDisplayMethods.UPDATE;
1349
- const isItemNew = cache?.[IS_NEW] ?? (this._isLazy && isStart && !this._isReseted);
1361
+ const isItemNew = this._newItems.indexOf(id) > -1 || (this._isLazy && isStart && !this._isReseted);
1350
1362
  isNew = isItemNew;
1351
1363
  if (isNew) {
1352
1364
  isUpdating = true;
@@ -1384,7 +1396,6 @@ class TrackBox extends CacheMap {
1384
1396
  if (itemById === undefined) {
1385
1397
  if (id !== fromItemId && id === stickyItemId && itemConfigMap?.[id]?.sticky === 1) {
1386
1398
  stickyComponentSize = componentSize;
1387
- stickyCollectionItem = collectionItem;
1388
1399
  y -= stickyComponentSize;
1389
1400
  }
1390
1401
  if (id === fromItemId) {
@@ -1528,9 +1539,6 @@ class TrackBox extends CacheMap {
1528
1539
  refreshCache(cache) {
1529
1540
  this._prerenderedCache = cache;
1530
1541
  }
1531
- clearDeltaDirection() {
1532
- this.clearScrollDirectionCache();
1533
- }
1534
1542
  clearDelta(clearDirectionDetector = false) {
1535
1543
  this._delta = this._deltaOfNewItems = 0;
1536
1544
  if (clearDirectionDetector) {
@@ -1853,6 +1861,9 @@ class TrackBox extends CacheMap {
1853
1861
  this._prerenderedCache = null;
1854
1862
  }
1855
1863
  }
1864
+ resetCacheChunkInfo() {
1865
+ this._newItems = [];
1866
+ }
1856
1867
  cacheClean() {
1857
1868
  this._map.clear();
1858
1869
  this._snapshot.clear();
@@ -2469,6 +2480,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
2469
2480
  */
2470
2481
  class BaseVirtualListItemComponent {
2471
2482
  _apiService = inject(NgVirtualListPublicService);
2483
+ _service = inject(NgVirtualListService);
2472
2484
  _id;
2473
2485
  get id() {
2474
2486
  return this._id;
@@ -2534,6 +2546,9 @@ class BaseVirtualListItemComponent {
2534
2546
  }
2535
2547
  _destroyRef = inject(DestroyRef);
2536
2548
  constructor() {
2549
+ this._id = this._service.generateComponentId();
2550
+ this._listId = this._service.id;
2551
+ this._displayId = createDisplayId(this._listId, this._id);
2537
2552
  this.classes = computed(() => {
2538
2553
  const data = this.data(), focused = this.focused();
2539
2554
  return {
@@ -2657,7 +2672,7 @@ const DEFAULT_MAX_DISTANCE = 40;
2657
2672
  * ItemClickDirective
2658
2673
  * Maximum performance for extremely large lists.
2659
2674
  * It is based on algorithms for virtualization of screen objects.
2660
- * @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/directives/item-click/item-click.directive.ts
2675
+ * @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/directives/item-click/item-click.directive.ts
2661
2676
  * @author Evgenii Alexandrovich Grebennikov
2662
2677
  * @email djonnyx@gmail.com
2663
2678
  */
@@ -2715,14 +2730,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
2715
2730
  * @email djonnyx@gmail.com
2716
2731
  */
2717
2732
  class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
2718
- _service = inject(NgVirtualListService);
2719
2733
  maxClickDistance = signal(DEFAULT_CLICK_DISTANCE);
2720
2734
  _injector = inject(Injector);
2721
2735
  constructor() {
2722
2736
  super();
2723
- this._id = this._service.generateComponentId();
2724
- this._listId = this._service.id;
2725
- this._displayId = createDisplayId(this._listId, this._id);
2726
2737
  }
2727
2738
  ngOnInit() {
2728
2739
  this._service.$clickDistance.pipe(takeUntilDestroyed(this._destroyRef), tap(v => {
@@ -3354,6 +3365,7 @@ class NgScrollView extends BaseScrollView {
3354
3365
  cdkScrollable;
3355
3366
  scrollBehavior = input(DEFAULT_SCROLL_BEHAVIOR);
3356
3367
  overscrollEnabled = input(DEFAULT_OVERSCROLL_ENABLED);
3368
+ scrollingSettings = input(DEFAULT_SCROLLING_SETTINGS);
3357
3369
  _normalizeValueFromZero = inject(SCROLL_VIEW_NORMALIZE_VALUE_FROM_ZERO);
3358
3370
  _$scroll = new Subject();
3359
3371
  $scroll = this._$scroll.asObservable();
@@ -3503,14 +3515,14 @@ class NgScrollView extends BaseScrollView {
3503
3515
  }
3504
3516
  calculateVelocity(offsets, delta, timestamp, indexOffset = 10) {
3505
3517
  offsets.push([delta, timestamp < ANIMATOR_MIN_TIMESTAMP ? ANIMATOR_MIN_TIMESTAMP : timestamp]);
3506
- const len = offsets.length, startIndex = len > indexOffset ? len - indexOffset : 0, lastVSign = calculateDirection(offsets);
3518
+ const len = offsets.length, startIndex = len > indexOffset ? len - indexOffset : 0, lastVSign = calculateDirection(offsets), speedScale = this.scrollingSettings()?.speedScale ?? SPEED_SCALE;
3507
3519
  let vSum = 0;
3508
3520
  for (let i = startIndex, l = offsets.length; i < l; i++) {
3509
3521
  const p0 = offsets[i];
3510
3522
  if (lastVSign !== Math.sign(p0[0])) {
3511
3523
  continue;
3512
3524
  }
3513
- const v0 = (p0[1] !== 0 ? lastVSign * Math.abs(p0[0] / p0[1]) * SPEED_SCALE : 0);
3525
+ const v0 = (p0[1] !== 0 ? lastVSign * Math.abs(p0[0] / p0[1]) * speedScale : 0);
3514
3526
  vSum += Math.sign(v0) * Math.pow(v0, 4) * .003;
3515
3527
  }
3516
3528
  const l = Math.min(offsets.length, indexOffset), v0 = l > 0 ? (vSum / l) : 0;
@@ -3520,6 +3532,7 @@ class NgScrollView extends BaseScrollView {
3520
3532
  velocities.push([delta, timestamp < ANIMATOR_MIN_TIMESTAMP ? ANIMATOR_MIN_TIMESTAMP : timestamp]);
3521
3533
  const len = velocities.length, startIndex = len > indexOffset ? len - indexOffset : 0;
3522
3534
  let aSum = 0, prevV0, iteration = 0, lastVSign = calculateDirection(velocities);
3535
+ const mass = this.scrollingSettings()?.mass ?? MASS;
3523
3536
  for (let i = startIndex, l = velocities.length; i < l; i++) {
3524
3537
  const v00 = prevV0, v01 = velocities[i];
3525
3538
  if (lastVSign !== Math.sign(v01[0])) {
@@ -3527,13 +3540,13 @@ class NgScrollView extends BaseScrollView {
3527
3540
  }
3528
3541
  if (v00) {
3529
3542
  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;
3530
- aSum = (aSum * MASS) + a0;
3543
+ aSum = (aSum * mass) + a0;
3531
3544
  prevV0 = v01;
3532
3545
  }
3533
3546
  prevV0 = v01;
3534
3547
  iteration++;
3535
3548
  }
3536
- const a0 = aSum * FRICTION_FORCE;
3549
+ const a0 = aSum * (this.scrollingSettings()?.frictionalForce ?? FRICTION_FORCE);
3537
3550
  return { a0 };
3538
3551
  }
3539
3552
  stopScrolling() {
@@ -3544,7 +3557,7 @@ class NgScrollView extends BaseScrollView {
3544
3557
  }
3545
3558
  moveWithAcceleration(isVertical, position, v0, v, a0, timestamp) {
3546
3559
  if (a0 !== 0 && timestamp < MAX_VELOCITY_TIMESTAMP) {
3547
- 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;
3560
+ const dvSign = Math.sign(v), mass = this.scrollingSettings()?.mass ?? MASS, duration = DURATION, maxDuration = this.scrollingSettings()?.maxDuration ?? MAX_DURATION, maxDist = this.scrollingSettings()?.maxDistance ?? 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;
3548
3561
  this.animate(startPosition, Math.round(positionWithVelocity), aDuration, easeOutQuad, true);
3549
3562
  }
3550
3563
  }
@@ -3664,7 +3677,7 @@ class NgScrollView extends BaseScrollView {
3664
3677
  }
3665
3678
  }
3666
3679
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NgScrollView, deps: [], target: i0.ɵɵFactoryTarget.Component });
3667
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.19", type: NgScrollView, isStandalone: true, selector: "ng-scroll-view", inputs: { scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, overscrollEnabled: { classPropertyName: "overscrollEnabled", publicName: "overscrollEnabled", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "cdkScrollable", first: true, predicate: ["scrollViewport"], descendants: true, read: CdkScrollable }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
3680
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.19", type: NgScrollView, isStandalone: true, selector: "ng-scroll-view", inputs: { scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, overscrollEnabled: { classPropertyName: "overscrollEnabled", publicName: "overscrollEnabled", isSignal: true, isRequired: false, transformFunction: null }, scrollingSettings: { classPropertyName: "scrollingSettings", publicName: "scrollingSettings", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "cdkScrollable", first: true, predicate: ["scrollViewport"], descendants: true, read: CdkScrollable }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
3668
3681
  }
3669
3682
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NgScrollView, decorators: [{
3670
3683
  type: Component,
@@ -3850,7 +3863,7 @@ const RIGHT = 'right', DIR = 'dir';
3850
3863
  * LocaleSensitiveDirective
3851
3864
  * Maximum performance for extremely large lists.
3852
3865
  * It is based on algorithms for virtualization of screen objects.
3853
- * @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/directives/locale-sensitive/locale-sensitive.directive.ts
3866
+ * @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/directives/locale-sensitive/locale-sensitive.directive.ts
3854
3867
  * @author Evgenii Alexandrovich Grebennikov
3855
3868
  * @email djonnyx@gmail.com
3856
3869
  */
@@ -5172,6 +5185,66 @@ class NgVirtualListComponent {
5172
5185
  * Defines the scrolling behavior for any element on the page. The default value is "smooth".
5173
5186
  */
5174
5187
  scrollBehavior = input(DEFAULT_SCROLL_BEHAVIOR, { ...this._scrollBehaviorOptions });
5188
+ _scrollingSettingsOptions = {
5189
+ transform: (v) => {
5190
+ let valid = validateObject(v, true, true);
5191
+ if (valid && !!v) {
5192
+ const { frictionalForce, mass, maxDistance, maxDuration, speedScale, optimization } = v;
5193
+ valid = validateFloat(frictionalForce, true);
5194
+ if (!valid) {
5195
+ console.error('The "frictionalForce" parameter must be of type `number` or `undefined`.');
5196
+ return DEFAULT_SCROLLING_SETTINGS;
5197
+ }
5198
+ valid = validateFloat(mass, true);
5199
+ if (!valid) {
5200
+ console.error('The "mass" parameter must be of type `number` or `undefined`.');
5201
+ return DEFAULT_SCROLLING_SETTINGS;
5202
+ }
5203
+ valid = validateFloat(maxDistance, true);
5204
+ if (!valid) {
5205
+ console.error('The "maxDistance" parameter must be of type `number` or `undefined`.');
5206
+ return DEFAULT_SCROLLING_SETTINGS;
5207
+ }
5208
+ valid = validateFloat(maxDuration, true);
5209
+ if (!valid) {
5210
+ console.error('The "maxDuration" parameter must be of type `number` or `undefined`.');
5211
+ return DEFAULT_SCROLLING_SETTINGS;
5212
+ }
5213
+ valid = validateFloat(speedScale, true);
5214
+ if (!valid) {
5215
+ console.error('The "speedScale" parameter must be of type `number` or `undefined`.');
5216
+ return DEFAULT_SCROLLING_SETTINGS;
5217
+ }
5218
+ valid = validateBoolean(optimization, true);
5219
+ if (!valid) {
5220
+ console.error('The "optimization" parameter must be of type `boolean` or `undefined`.');
5221
+ return DEFAULT_SCROLLING_SETTINGS;
5222
+ }
5223
+ }
5224
+ if (!valid) {
5225
+ console.error('The "scrollingSettings" parameter must be of type `object` or null.');
5226
+ return DEFAULT_SCROLLING_SETTINGS;
5227
+ }
5228
+ return {
5229
+ frictionalForce: v.frictionalForce !== undefined && v.frictionalForce > 0 ? v.frictionalForce : DEFAULT_SCROLLING_SETTINGS.frictionalForce,
5230
+ mass: v.mass !== undefined && v.mass > 0 ? v.mass : DEFAULT_SCROLLING_SETTINGS.mass,
5231
+ maxDistance: v.maxDistance !== undefined && v.maxDistance > 0 ? v.maxDistance : DEFAULT_SCROLLING_SETTINGS.maxDistance,
5232
+ maxDuration: v.maxDuration !== undefined && v.maxDuration > 0 ? v.maxDuration : DEFAULT_SCROLLING_SETTINGS.maxDuration,
5233
+ speedScale: v.speedScale !== undefined && v.speedScale > 0 ? v.speedScale : DEFAULT_SCROLLING_SETTINGS.speedScale,
5234
+ optimization: v.optimization ?? DEFAULT_SCROLLING_SETTINGS.optimization,
5235
+ };
5236
+ },
5237
+ };
5238
+ /**
5239
+ * Scrolling settings.
5240
+ * - frictionalForce - Frictional force. Default value is 0.035.
5241
+ * - mass - Mass. Default value is 0.005.
5242
+ * - maxDistance - Maximum scrolling distance. Default value is 12500.
5243
+ * - maxDuration - Maximum animation duration. Default value is 4000.
5244
+ * - speedScale - Speed scale. Default value is 15.
5245
+ * - optimization - Enables scrolling performance optimization. Default value is `true`.
5246
+ */
5247
+ scrollingSettings = input(DEFAULT_SCROLLING_SETTINGS, { ...this._scrollingSettingsOptions });
5175
5248
  _animationParamsOptions = {
5176
5249
  transform: (v) => {
5177
5250
  const valid = validateObject(v, true, true);
@@ -5735,8 +5808,8 @@ class NgVirtualListComponent {
5735
5808
  $fireUpdate.pipe(takeUntilDestroyed(), tap(userAction => {
5736
5809
  hasUserAction = userAction;
5737
5810
  })).subscribe();
5738
- let renderStabilizerPrevScrollStateVersion = EMPTY_SCROLL_STATE_VERSION, renderStabilizerUpdateIterations = 0;
5739
5811
  const $update = this.$update, renderStabilizer = (options) => {
5812
+ let renderStabilizerPrevScrollStateVersion = EMPTY_SCROLL_STATE_VERSION, renderStabilizerUpdateIterations = 0;
5740
5813
  const prepareIterations = options?.prepareIterations ?? PREPARE_ITERATIONS, prepareReupdateLength = options?.prepareReupdateLength ?? PREPARATION_REUPDATE_LENGTH;
5741
5814
  return of(null).pipe(takeUntilDestroyed(this._destroyRef), switchMap$1(() => {
5742
5815
  renderStabilizerPrevScrollStateVersion = EMPTY_SCROLL_STATE_VERSION;
@@ -5769,6 +5842,9 @@ class NgVirtualListComponent {
5769
5842
  }), $updateItemsRenderStabilizer = renderStabilizer({
5770
5843
  prepareIterations: PREPARE_ITERATIONS_FOR_UPDATE_ITEMS,
5771
5844
  prepareReupdateLength: PREPARATION_REUPDATE_LENGTH_FOR_UPDATE_ITEMS,
5845
+ }), $chunkLoadingRenderStabilizer = renderStabilizer({
5846
+ prepareIterations: PREPARE_ITERATIONS_FOR_UPDATE_ITEMS,
5847
+ prepareReupdateLength: PREPARATION_REUPDATE_LENGTH_FOR_UPDATE_ITEMS,
5772
5848
  }), $collapseItemsRenderStabilizer = renderStabilizer({
5773
5849
  prepareIterations: PREPARE_ITERATIONS_FOR_COLLAPSE_ITEMS,
5774
5850
  prepareReupdateLength: PREPARATION_REUPDATE_LENGTH_FOR_COLLAPSE_ITEMS,
@@ -6021,7 +6097,7 @@ class NgVirtualListComponent {
6021
6097
  }
6022
6098
  })).subscribe();
6023
6099
  const $preventScrollSnapping = this.$preventScrollSnapping;
6024
- $preventScrollSnapping.pipe(takeUntilDestroyed(), filter$1(v => !!v), debounceTime(0), tap(() => {
6100
+ $preventScrollSnapping.pipe(takeUntilDestroyed(), filter$1(v => !!v), tap(() => {
6025
6101
  if (this._readyForShow) {
6026
6102
  this._trackBox.isScrollEnd;
6027
6103
  this._trackBox.isScrollStart = this._trackBox.isScrollEnd = false;
@@ -6042,11 +6118,26 @@ class NgVirtualListComponent {
6042
6118
  this._$fireUpdate.next(true);
6043
6119
  }));
6044
6120
  })).subscribe();
6121
+ let isChunkLoading = false;
6045
6122
  const $loading = toObservable(this.loading);
6046
6123
  $loading.pipe(takeUntilDestroyed(), distinctUntilChanged(), skip(1), filter$1(v => !v), switchMap$1(() => {
6047
- return $actualItems.pipe(takeUntilDestroyed(this._destroyRef), debounceTime(100), take(1), tap(() => {
6048
- this._scrollerComponent()?.refreshScrollbar();
6049
- }));
6124
+ isChunkLoading = true;
6125
+ const scrollbar = this._scrollerComponent();
6126
+ if (!!scrollbar) {
6127
+ scrollbar.stopScrollbar();
6128
+ scrollbar.refreshScrollbar();
6129
+ }
6130
+ return $actualItems.pipe(takeUntilDestroyed(this._destroyRef), take(1), tap(() => {
6131
+ this._$fireUpdateNextFrame.next(true);
6132
+ }), switchMap$1(() => $chunkLoadingRenderStabilizer.pipe(takeUntilDestroyed(this._destroyRef), take(1), tap(() => {
6133
+ isChunkLoading = false;
6134
+ this._trackBox.resetCacheChunkInfo();
6135
+ const scrollbar = this._scrollerComponent();
6136
+ if (!!scrollbar) {
6137
+ scrollbar.stopScrollbar();
6138
+ scrollbar.refreshScrollbar();
6139
+ }
6140
+ }))));
6050
6141
  })).subscribe();
6051
6142
  $loading.pipe(takeUntilDestroyed(), skip(1), distinctUntilChanged(), tap(v => {
6052
6143
  if (v) {
@@ -6064,7 +6155,7 @@ class NgVirtualListComponent {
6064
6155
  const scroller = this._scrollerComponent();
6065
6156
  let totalSize = 0;
6066
6157
  if (scroller) {
6067
- const collapsable = collapsedIds.length > 0, cachable = this.cachable, cached = this._cached, waitingCache = cachable && !cached, emitUpdate = !this._readyForShow || waitingCache || collapsable;
6158
+ const collapsable = collapsedIds.length > 0, cachable = this.cachable, cached = this._cached, waitingCache = cachable && !cached, emitUpdate = !this._readyForShow || waitingCache || collapsable || isChunkLoading;
6068
6159
  if (this._readyForShow || (cachable && cached)) {
6069
6160
  const currentScrollSize = (isVertical ? scroller.scrollTop ?? 0 : scroller.scrollLeft ?? 0), fireUpdate = emitUpdate || reupdate || (!optimization && !userAction) || this._$scrollingTo.getValue();
6070
6161
  let actualScrollSize = !this._readyForShow && snapScrollToEnd ? (isVertical ? scroller.scrollHeight ?? 0 : scroller.scrollWidth ?? 0) :
@@ -6089,12 +6180,12 @@ class NgVirtualListComponent {
6089
6180
  this.resetBoundsSize(isVertical, totalSize);
6090
6181
  this.createDisplayComponentsIfNeed(displayItems);
6091
6182
  this.tracking();
6183
+ this.snappingHandler();
6092
6184
  const delta = this._trackBox.delta, scrollPositionAfterUpdate = Math.round(actualScrollSize + delta), roundedScrollPositionAfterUpdate = Math.round(scrollPositionAfterUpdate), roundedMaxPositionAfterUpdate = Math.round(totalSize - viewportSize);
6093
6185
  if (this._isSnappingMethodAdvanced) {
6094
6186
  this.updateRegularRenderer();
6095
6187
  }
6096
6188
  scroller.delta = delta;
6097
- this.snappingHandler();
6098
6189
  if ((snapScrollToStart && this._trackBox.isSnappedToStart) ||
6099
6190
  (snapScrollToStart && currentScrollSize <= MIN_PIXELS_FOR_PREVENT_SNAPPING)) {
6100
6191
  if (currentScrollSize !== roundedScrollPositionAfterUpdate) {
@@ -6135,23 +6226,22 @@ class NgVirtualListComponent {
6135
6226
  if (emitUpdate) {
6136
6227
  this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
6137
6228
  }
6138
- this._trackBox.isScrollEnd;
6139
6229
  return;
6140
6230
  }
6141
- if (scrollPositionAfterUpdate >= 0 && scrollPositionAfterUpdate < roundedMaxPositionAfterUpdate) {
6142
- if (scrollSize !== roundedMaxPositionAfterUpdate || currentScrollSize !== scrollPositionAfterUpdate) {
6143
- this._trackBox.clearDelta();
6144
- if (this._readyForShow) {
6145
- this.emitScrollEvent(true, false, userAction);
6146
- }
6147
- const params = {
6148
- [isVertical ? TOP_PROP_NAME : LEFT_PROP_NAME]: scrollPositionAfterUpdate, blending: true, userAction,
6149
- fireUpdate, behavior: BEHAVIOR_INSTANT, duration: this.animationParams().scrollToItem,
6150
- };
6151
- scroller.scrollTo(params);
6152
- if (emitUpdate) {
6153
- this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
6154
- }
6231
+ if (scrollSize !== scrollPositionAfterUpdate &&
6232
+ ((scrollPositionAfterUpdate >= 0 && scrollPositionAfterUpdate < roundedMaxPositionAfterUpdate) ||
6233
+ (scrollSize !== roundedMaxPositionAfterUpdate || currentScrollSize !== scrollPositionAfterUpdate))) {
6234
+ this._trackBox.clearDelta();
6235
+ if (this._readyForShow) {
6236
+ this.emitScrollEvent(true, false, userAction);
6237
+ }
6238
+ const params = {
6239
+ [isVertical ? TOP_PROP_NAME : LEFT_PROP_NAME]: scrollPositionAfterUpdate, blending: true, userAction,
6240
+ fireUpdate, behavior: BEHAVIOR_INSTANT, duration: this.animationParams().scrollToItem,
6241
+ };
6242
+ scroller.scrollTo(params);
6243
+ if (emitUpdate) {
6244
+ this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
6155
6245
  }
6156
6246
  return;
6157
6247
  }
@@ -6162,7 +6252,7 @@ class NgVirtualListComponent {
6162
6252
  }
6163
6253
  };
6164
6254
  let prevItems = [];
6165
- const debouncedUpdate = debounce(update, 0);
6255
+ const debouncedUpdate = debounce(update, 0, MAX_NUMBERS_OF_SKIPS_FOR_QUALITY_OPTIMIZATION_LVL1);
6166
6256
  $viewInit.pipe(takeUntilDestroyed(), filter$1(v => !!v), switchMap$1(() => {
6167
6257
  return combineLatest([$snapScrollToStart, $snapScrollToEnd, $bounds, $listBounds, $scrollEndOffset, $actualItems, $itemConfigMap, $scrollSize, $itemSize,
6168
6258
  $collapsedItemIds, $bufferSize, $maxBufferSize, $snap, $isVertical, $dynamicSize, $enabledBufferOptimization, $cacheVersion, this.$fireUpdate,
@@ -6172,16 +6262,18 @@ class NgVirtualListComponent {
6172
6262
  itemsChanged = true;
6173
6263
  prevItems = items;
6174
6264
  }
6175
- const scroller = this._scrollerComponent(), velocity = this._scrollerComponent()?.averageVelocity ?? 0, maxScrollSize = isVertical ? (scroller?.scrollHeight || 0) : (scroller?.scrollWidth ?? 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 &&
6265
+ const enabledOptimization = this.scrollingSettings()?.optimization ?? DEFAULT_SCROLLING_SETTINGS.optimization, scroller = this._scrollerComponent(), velocity = this._scrollerComponent()?.averageVelocity ?? 0, maxScrollSize = isVertical ? (scroller?.scrollHeight || 0) : (scroller?.scrollWidth ?? 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 &&
6176
6266
  (velocity > MAX_VELOCITY_FOR_SCROLL_QUALITY_OPTIMIZATION_LVL2 || hasUserAction);
6177
- if (useDebouncedUpdate) {
6178
- debouncedUpdate.execute({
6179
- snapScrollToStart, snapScrollToEnd, bounds, listBounds, scrollEndOffset, items, itemConfigMap, scrollSize, itemSize, collapsedIds,
6180
- bufferSize, maxBufferSize, snap, isVertical, dynamicSize, enabledBufferOptimization, cacheVersion, userAction: hasUserAction,
6181
- }, rerenderOptimization, itemsChanged);
6182
- return;
6267
+ if (enabledOptimization) {
6268
+ if (useDebouncedUpdate) {
6269
+ debouncedUpdate.execute({
6270
+ snapScrollToStart, snapScrollToEnd, bounds, listBounds, scrollEndOffset, items, itemConfigMap, scrollSize, itemSize, collapsedIds,
6271
+ bufferSize, maxBufferSize, snap, isVertical, dynamicSize, enabledBufferOptimization, cacheVersion, userAction: hasUserAction,
6272
+ }, rerenderOptimization, itemsChanged);
6273
+ return;
6274
+ }
6275
+ debouncedUpdate.dispose();
6183
6276
  }
6184
- debouncedUpdate.dispose();
6185
6277
  if (!isScrolling) {
6186
6278
  update({
6187
6279
  snapScrollToStart, snapScrollToEnd, bounds, listBounds, scrollEndOffset, items, itemConfigMap, scrollSize, itemSize, collapsedIds,
@@ -6194,19 +6286,10 @@ class NgVirtualListComponent {
6194
6286
  const scrollHandler = (userAction = false) => {
6195
6287
  const scroller = this._scrollerComponent();
6196
6288
  if (!!scroller) {
6197
- const isVertical = this._isVertical, bounds = this._bounds(), listBounds = this._listBounds(), scrollSize = (isVertical ? scroller.scrollTop : scroller.scrollLeft), maxScrollSize = isVertical ? (listBounds?.height ?? 0) - (bounds?.height ?? 0) : (listBounds?.width ?? 0) - (bounds?.width ?? 0), actualScrollSize = scrollSize;
6289
+ const isVertical = this._isVertical, scrollSize = (isVertical ? scroller.scrollTop : scroller.scrollLeft), actualScrollSize = scrollSize;
6198
6290
  if (this._readyForShow) {
6199
6291
  if (userAction) {
6200
- if (this._trackBox.isSnappedToStart) {
6201
- if (scrollSize > MIN_PIXELS_FOR_PREVENT_SNAPPING) {
6202
- this._$preventScrollSnapping.next(true);
6203
- }
6204
- }
6205
- if (this._trackBox.isSnappedToEnd) {
6206
- if (scrollSize < (maxScrollSize - MIN_PIXELS_FOR_PREVENT_SNAPPING)) {
6207
- this._$preventScrollSnapping.next(true);
6208
- }
6209
- }
6292
+ this._$preventScrollSnapping.next(true);
6210
6293
  }
6211
6294
  }
6212
6295
  this._scrollSize.set(actualScrollSize);
@@ -6764,13 +6847,13 @@ class NgVirtualListComponent {
6764
6847
  }
6765
6848
  }
6766
6849
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NgVirtualListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6767
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: NgVirtualListComponent, isStandalone: false, selector: "ng-virtual-list", inputs: { scrollbarThickness: { classPropertyName: "scrollbarThickness", publicName: "scrollbarThickness", isSignal: true, isRequired: false, transformFunction: null }, scrollbarMinSize: { classPropertyName: "scrollbarMinSize", publicName: "scrollbarMinSize", isSignal: true, isRequired: false, transformFunction: null }, scrollbarThumbRenderer: { classPropertyName: "scrollbarThumbRenderer", publicName: "scrollbarThumbRenderer", isSignal: true, isRequired: false, transformFunction: null }, scrollbarThumbParams: { classPropertyName: "scrollbarThumbParams", publicName: "scrollbarThumbParams", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, waitForPreparation: { classPropertyName: "waitForPreparation", publicName: "waitForPreparation", isSignal: true, isRequired: false, transformFunction: null }, clickDistance: { classPropertyName: "clickDistance", publicName: "clickDistance", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, defaultItemValue: { classPropertyName: "defaultItemValue", publicName: "defaultItemValue", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, collapsedIds: { classPropertyName: "collapsedIds", publicName: "collapsedIds", isSignal: true, isRequired: false, transformFunction: null }, selectByClick: { classPropertyName: "selectByClick", publicName: "selectByClick", isSignal: true, isRequired: false, transformFunction: null }, collapseByClick: { classPropertyName: "collapseByClick", publicName: "collapseByClick", isSignal: true, isRequired: false, transformFunction: null }, snap: { classPropertyName: "snap", publicName: "snap", isSignal: true, isRequired: false, transformFunction: null }, snapToEndTransitionInstantOffset: { classPropertyName: "snapToEndTransitionInstantOffset", publicName: "snapToEndTransitionInstantOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollStartOffset: { classPropertyName: "scrollStartOffset", publicName: "scrollStartOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollEndOffset: { classPropertyName: "scrollEndOffset", publicName: "scrollEndOffset", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToStart: { classPropertyName: "snapScrollToStart", publicName: "snapScrollToStart", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToEnd: { classPropertyName: "snapScrollToEnd", publicName: "snapScrollToEnd", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToBottom: { classPropertyName: "snapScrollToBottom", publicName: "snapScrollToBottom", isSignal: true, isRequired: false, transformFunction: null }, scrollbarEnabled: { classPropertyName: "scrollbarEnabled", publicName: "scrollbarEnabled", isSignal: true, isRequired: false, transformFunction: null }, scrollbarInteractive: { classPropertyName: "scrollbarInteractive", publicName: "scrollbarInteractive", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, animationParams: { classPropertyName: "animationParams", publicName: "animationParams", isSignal: true, isRequired: false, transformFunction: null }, overscrollEnabled: { classPropertyName: "overscrollEnabled", publicName: "overscrollEnabled", isSignal: true, isRequired: false, transformFunction: null }, enabledBufferOptimization: { classPropertyName: "enabledBufferOptimization", publicName: "enabledBufferOptimization", isSignal: true, isRequired: false, transformFunction: null }, itemRenderer: { classPropertyName: "itemRenderer", publicName: "itemRenderer", isSignal: true, isRequired: true, transformFunction: null }, itemConfigMap: { classPropertyName: "itemConfigMap", publicName: "itemConfigMap", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, dynamicSize: { classPropertyName: "dynamicSize", publicName: "dynamicSize", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, collectionMode: { classPropertyName: "collectionMode", publicName: "collectionMode", isSignal: true, isRequired: false, transformFunction: null }, bufferSize: { classPropertyName: "bufferSize", publicName: "bufferSize", isSignal: true, isRequired: false, transformFunction: null }, maxBufferSize: { classPropertyName: "maxBufferSize", publicName: "maxBufferSize", isSignal: true, isRequired: false, transformFunction: null }, snappingMethod: { classPropertyName: "snappingMethod", publicName: "snappingMethod", isSignal: true, isRequired: false, transformFunction: null }, methodForSelecting: { classPropertyName: "methodForSelecting", publicName: "methodForSelecting", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, screenReaderMessage: { classPropertyName: "screenReaderMessage", publicName: "screenReaderMessage", isSignal: true, isRequired: false, transformFunction: null }, langTextDir: { classPropertyName: "langTextDir", publicName: "langTextDir", isSignal: true, isRequired: false, transformFunction: null } }, 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, isSignal: true }, { propertyName: "_scrollerComponent", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "_listContainerRef", first: true, predicate: ["renderersContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_snapContainerRef", first: true, predicate: ["snapRendererContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ screenReaderFormattedMessage() }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"bounds()!\" [direction]=\"direction()\"\r\n [dynamic]=\"dynamicSize()\" [isVertical]=\"isVertical\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\"\r\n [itemRenderer]=\"itemRenderer()\" [startOffset]=\"scrollStartOffset()\" [endOffset]=\"scrollEndOffset()\"\r\n [scrollbarEnabled]=\"scroller.scrollbarShow()\" [enabled]=\"dynamicSize() && snapScrollToEnd()\" />\r\n\r\n@if (snap()) {\r\n <div localeSensitive [langTextDir]=\"langTextDir()\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"classes()\">\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}\r\n<ng-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [startOffset]=\"scrollStartOffset()\"\r\n [direction]=\"direction()\" [endOffset]=\"scrollEndOffset()\" [scrollbarThumbRenderer]=\"scrollbarThumbRenderer()\"\r\n [scrollbarThickness]=\"scrollbarThickness()\" [scrollbarThumbParams]=\"scrollbarThumbParams()\"\r\n [focusedElement]=\"focusedElement()\" [loading]=\"loading()\" [overscrollEnabled]=\"overscrollEnabled()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [scrollbarInteractive]=\"scrollbarInteractive()\"\r\n [scrollbarMinSize]=\"scrollbarMinSize()\" [scrollBehavior]=\"scrollBehavior()\">\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: "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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
6850
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: NgVirtualListComponent, isStandalone: false, selector: "ng-virtual-list", inputs: { scrollbarThickness: { classPropertyName: "scrollbarThickness", publicName: "scrollbarThickness", isSignal: true, isRequired: false, transformFunction: null }, scrollbarMinSize: { classPropertyName: "scrollbarMinSize", publicName: "scrollbarMinSize", isSignal: true, isRequired: false, transformFunction: null }, scrollbarThumbRenderer: { classPropertyName: "scrollbarThumbRenderer", publicName: "scrollbarThumbRenderer", isSignal: true, isRequired: false, transformFunction: null }, scrollbarThumbParams: { classPropertyName: "scrollbarThumbParams", publicName: "scrollbarThumbParams", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, waitForPreparation: { classPropertyName: "waitForPreparation", publicName: "waitForPreparation", isSignal: true, isRequired: false, transformFunction: null }, clickDistance: { classPropertyName: "clickDistance", publicName: "clickDistance", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, defaultItemValue: { classPropertyName: "defaultItemValue", publicName: "defaultItemValue", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, collapsedIds: { classPropertyName: "collapsedIds", publicName: "collapsedIds", isSignal: true, isRequired: false, transformFunction: null }, selectByClick: { classPropertyName: "selectByClick", publicName: "selectByClick", isSignal: true, isRequired: false, transformFunction: null }, collapseByClick: { classPropertyName: "collapseByClick", publicName: "collapseByClick", isSignal: true, isRequired: false, transformFunction: null }, snap: { classPropertyName: "snap", publicName: "snap", isSignal: true, isRequired: false, transformFunction: null }, snapToEndTransitionInstantOffset: { classPropertyName: "snapToEndTransitionInstantOffset", publicName: "snapToEndTransitionInstantOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollStartOffset: { classPropertyName: "scrollStartOffset", publicName: "scrollStartOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollEndOffset: { classPropertyName: "scrollEndOffset", publicName: "scrollEndOffset", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToStart: { classPropertyName: "snapScrollToStart", publicName: "snapScrollToStart", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToEnd: { classPropertyName: "snapScrollToEnd", publicName: "snapScrollToEnd", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToBottom: { classPropertyName: "snapScrollToBottom", publicName: "snapScrollToBottom", isSignal: true, isRequired: false, transformFunction: null }, scrollbarEnabled: { classPropertyName: "scrollbarEnabled", publicName: "scrollbarEnabled", isSignal: true, isRequired: false, transformFunction: null }, scrollbarInteractive: { classPropertyName: "scrollbarInteractive", publicName: "scrollbarInteractive", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, scrollingSettings: { classPropertyName: "scrollingSettings", publicName: "scrollingSettings", isSignal: true, isRequired: false, transformFunction: null }, animationParams: { classPropertyName: "animationParams", publicName: "animationParams", isSignal: true, isRequired: false, transformFunction: null }, overscrollEnabled: { classPropertyName: "overscrollEnabled", publicName: "overscrollEnabled", isSignal: true, isRequired: false, transformFunction: null }, enabledBufferOptimization: { classPropertyName: "enabledBufferOptimization", publicName: "enabledBufferOptimization", isSignal: true, isRequired: false, transformFunction: null }, itemRenderer: { classPropertyName: "itemRenderer", publicName: "itemRenderer", isSignal: true, isRequired: true, transformFunction: null }, itemConfigMap: { classPropertyName: "itemConfigMap", publicName: "itemConfigMap", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, dynamicSize: { classPropertyName: "dynamicSize", publicName: "dynamicSize", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, collectionMode: { classPropertyName: "collectionMode", publicName: "collectionMode", isSignal: true, isRequired: false, transformFunction: null }, bufferSize: { classPropertyName: "bufferSize", publicName: "bufferSize", isSignal: true, isRequired: false, transformFunction: null }, maxBufferSize: { classPropertyName: "maxBufferSize", publicName: "maxBufferSize", isSignal: true, isRequired: false, transformFunction: null }, snappingMethod: { classPropertyName: "snappingMethod", publicName: "snappingMethod", isSignal: true, isRequired: false, transformFunction: null }, methodForSelecting: { classPropertyName: "methodForSelecting", publicName: "methodForSelecting", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, screenReaderMessage: { classPropertyName: "screenReaderMessage", publicName: "screenReaderMessage", isSignal: true, isRequired: false, transformFunction: null }, langTextDir: { classPropertyName: "langTextDir", publicName: "langTextDir", isSignal: true, isRequired: false, transformFunction: null } }, 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, isSignal: true }, { propertyName: "_scrollerComponent", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "_listContainerRef", first: true, predicate: ["renderersContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_snapContainerRef", first: true, predicate: ["snapRendererContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ screenReaderFormattedMessage() }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"bounds()!\" [direction]=\"direction()\"\r\n [dynamic]=\"dynamicSize()\" [isVertical]=\"isVertical\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\"\r\n [itemRenderer]=\"itemRenderer()\" [startOffset]=\"scrollStartOffset()\" [endOffset]=\"scrollEndOffset()\"\r\n [scrollbarEnabled]=\"scroller.scrollbarShow()\" [enabled]=\"dynamicSize() && snapScrollToEnd()\" />\r\n\r\n@if (snap()) {\r\n <div localeSensitive [langTextDir]=\"langTextDir()\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"classes()\">\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}\r\n<ng-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [startOffset]=\"scrollStartOffset()\"\r\n [direction]=\"direction()\" [endOffset]=\"scrollEndOffset()\" [scrollbarThumbRenderer]=\"scrollbarThumbRenderer()\"\r\n [scrollbarThickness]=\"scrollbarThickness()\" [scrollbarThumbParams]=\"scrollbarThumbParams()\"\r\n [focusedElement]=\"focusedElement()\" [loading]=\"loading()\" [overscrollEnabled]=\"overscrollEnabled()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [scrollbarInteractive]=\"scrollbarInteractive()\"\r\n [scrollbarMinSize]=\"scrollbarMinSize()\" [scrollBehavior]=\"scrollBehavior()\" [scrollingSettings]=\"scrollingSettings()\">\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: "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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
6768
6851
  }
6769
6852
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NgVirtualListComponent, decorators: [{
6770
6853
  type: Component,
6771
6854
  args: [{ selector: 'ng-virtual-list', host: {
6772
6855
  'style': 'position: relative;'
6773
- }, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, providers: [NgVirtualListService, NgVirtualListPublicService], template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ screenReaderFormattedMessage() }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"bounds()!\" [direction]=\"direction()\"\r\n [dynamic]=\"dynamicSize()\" [isVertical]=\"isVertical\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\"\r\n [itemRenderer]=\"itemRenderer()\" [startOffset]=\"scrollStartOffset()\" [endOffset]=\"scrollEndOffset()\"\r\n [scrollbarEnabled]=\"scroller.scrollbarShow()\" [enabled]=\"dynamicSize() && snapScrollToEnd()\" />\r\n\r\n@if (snap()) {\r\n <div localeSensitive [langTextDir]=\"langTextDir()\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"classes()\">\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}\r\n<ng-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [startOffset]=\"scrollStartOffset()\"\r\n [direction]=\"direction()\" [endOffset]=\"scrollEndOffset()\" [scrollbarThumbRenderer]=\"scrollbarThumbRenderer()\"\r\n [scrollbarThickness]=\"scrollbarThickness()\" [scrollbarThumbParams]=\"scrollbarThumbParams()\"\r\n [focusedElement]=\"focusedElement()\" [loading]=\"loading()\" [overscrollEnabled]=\"overscrollEnabled()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [scrollbarInteractive]=\"scrollbarInteractive()\"\r\n [scrollbarMinSize]=\"scrollbarMinSize()\" [scrollBehavior]=\"scrollBehavior()\">\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"] }]
6856
+ }, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, providers: [NgVirtualListService, NgVirtualListPublicService], template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ screenReaderFormattedMessage() }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"bounds()!\" [direction]=\"direction()\"\r\n [dynamic]=\"dynamicSize()\" [isVertical]=\"isVertical\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\"\r\n [itemRenderer]=\"itemRenderer()\" [startOffset]=\"scrollStartOffset()\" [endOffset]=\"scrollEndOffset()\"\r\n [scrollbarEnabled]=\"scroller.scrollbarShow()\" [enabled]=\"dynamicSize() && snapScrollToEnd()\" />\r\n\r\n@if (snap()) {\r\n <div localeSensitive [langTextDir]=\"langTextDir()\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"classes()\">\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}\r\n<ng-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [startOffset]=\"scrollStartOffset()\"\r\n [direction]=\"direction()\" [endOffset]=\"scrollEndOffset()\" [scrollbarThumbRenderer]=\"scrollbarThumbRenderer()\"\r\n [scrollbarThickness]=\"scrollbarThickness()\" [scrollbarThumbParams]=\"scrollbarThumbParams()\"\r\n [focusedElement]=\"focusedElement()\" [loading]=\"loading()\" [overscrollEnabled]=\"overscrollEnabled()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [scrollbarInteractive]=\"scrollbarInteractive()\"\r\n [scrollbarMinSize]=\"scrollbarMinSize()\" [scrollBehavior]=\"scrollBehavior()\" [scrollingSettings]=\"scrollingSettings()\">\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"] }]
6774
6857
  }], ctorParameters: () => [], propDecorators: { _listContainerRef: [{
6775
6858
  type: ViewChild,
6776
6859
  args: ['renderersContainer', { read: ViewContainerRef }]
@@ -6820,7 +6903,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
6820
6903
  declarations: [NgVirtualListItemComponent],
6821
6904
  exports: [NgVirtualListItemComponent],
6822
6905
  imports: [CommonModule, ItemClickModule],
6823
- schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
6906
+ schemas: [NO_ERRORS_SCHEMA],
6824
6907
  }]
6825
6908
  }] });
6826
6909
 
@@ -6835,7 +6918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
6835
6918
  declarations: [NgScrollBarComponent],
6836
6919
  exports: [NgScrollBarComponent],
6837
6920
  imports: [CommonModule],
6838
- schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
6921
+ schemas: [NO_ERRORS_SCHEMA],
6839
6922
  }]
6840
6923
  }] });
6841
6924
 
@@ -6850,7 +6933,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
6850
6933
  declarations: [NgScrollerComponent],
6851
6934
  exports: [NgScrollerComponent],
6852
6935
  imports: [CommonModule, NgScrollBarModule, LocaleSensitiveModule, CdkScrollableModule],
6853
- schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
6936
+ schemas: [NO_ERRORS_SCHEMA],
6854
6937
  }]
6855
6938
  }] });
6856
6939
 
@@ -6865,7 +6948,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
6865
6948
  declarations: [NgPrerenderVirtualListItemComponent],
6866
6949
  exports: [NgPrerenderVirtualListItemComponent],
6867
6950
  imports: [CommonModule, ItemClickModule],
6868
- schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
6951
+ schemas: [NO_ERRORS_SCHEMA],
6869
6952
  }]
6870
6953
  }] });
6871
6954
 
@@ -6880,7 +6963,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
6880
6963
  declarations: [NgPrerenderScrollerComponent],
6881
6964
  exports: [NgPrerenderScrollerComponent],
6882
6965
  imports: [CommonModule, LocaleSensitiveModule],
6883
- schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
6966
+ schemas: [NO_ERRORS_SCHEMA],
6884
6967
  }]
6885
6968
  }] });
6886
6969