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.
- package/README.md +1 -0
- package/esm2020/lib/components/ng-list-item/base/base-virtual-list-item-component.mjs +7 -1
- package/esm2020/lib/components/ng-list-item/ng-virtual-list-item.component.mjs +2 -7
- package/esm2020/lib/components/ng-list-item/ng-virtual-list-item.module.mjs +3 -3
- package/esm2020/lib/components/ng-prerender-container/components/ng-prerender-list-item/ng-prerender-list-item.module.mjs +3 -3
- package/esm2020/lib/components/ng-scroll-bar/ng-scroll-bar.module.mjs +3 -3
- package/esm2020/lib/components/ng-scroll-view/ng-scroll-view.component.mjs +19 -8
- package/esm2020/lib/components/ng-scroller/ng-scroller.module.mjs +3 -3
- package/esm2020/lib/const/index.mjs +9 -1
- package/esm2020/lib/interfaces/index.mjs +1 -1
- package/esm2020/lib/interfaces/scrolling-settings.mjs +2 -0
- package/esm2020/lib/ng-virtual-list.component.mjs +92 -29
- package/fesm2015/ng-virtual-list.mjs +128 -43
- package/fesm2015/ng-virtual-list.mjs.map +1 -1
- package/fesm2020/ng-virtual-list.mjs +123 -41
- package/fesm2020/ng-virtual-list.mjs.map +1 -1
- package/lib/components/ng-list-item/base/base-virtual-list-item-component.d.ts +2 -0
- package/lib/components/ng-list-item/ng-virtual-list-item.component.d.ts +0 -2
- package/lib/components/ng-scroll-view/ng-scroll-view.component.d.ts +6 -1
- package/lib/const/index.d.ts +2 -1
- package/lib/interfaces/index.d.ts +2 -1
- package/lib/interfaces/scrolling-settings.d.ts +38 -0
- package/lib/ng-virtual-list.component.d.ts +16 -2
- 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;
|
|
@@ -2530,6 +2538,7 @@ class BaseVirtualListItemComponent$1 extends DisposableComponent {
|
|
|
2530
2538
|
constructor() {
|
|
2531
2539
|
super();
|
|
2532
2540
|
this._apiService = inject(NgVirtualListPublicService);
|
|
2541
|
+
this._service = inject(NgVirtualListService);
|
|
2533
2542
|
this._cdr = inject(ChangeDetectorRef);
|
|
2534
2543
|
this._isSelected = false;
|
|
2535
2544
|
this._isCollapsed = false;
|
|
@@ -2555,6 +2564,9 @@ class BaseVirtualListItemComponent$1 extends DisposableComponent {
|
|
|
2555
2564
|
this._langTextDir = TextDirections.LTR;
|
|
2556
2565
|
this._regularLength = SIZE_100_PERSENT;
|
|
2557
2566
|
this._elementRef = inject(ElementRef);
|
|
2567
|
+
this._id = this._service.generateComponentId();
|
|
2568
|
+
this._listId = this._service.id;
|
|
2569
|
+
this._displayId = createDisplayId(this._listId, this._id);
|
|
2558
2570
|
const $data = this.$data, $config = this.$config, $measures = this.$measures, $focused = this.$focused;
|
|
2559
2571
|
combineLatest([$data, $focused]).pipe(takeUntil(this._$unsubscribe), tap(([data, focused]) => {
|
|
2560
2572
|
this._$classes.next({
|
|
@@ -2788,13 +2800,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2788
2800
|
class NgVirtualListItemComponent extends BaseVirtualListItemComponent$1 {
|
|
2789
2801
|
constructor() {
|
|
2790
2802
|
super();
|
|
2791
|
-
this._service = inject(NgVirtualListService);
|
|
2792
2803
|
this._$maxClickDistance = new BehaviorSubject(DEFAULT_CLICK_DISTANCE);
|
|
2793
2804
|
this.$maxClickDistance = this._$maxClickDistance.asObservable();
|
|
2794
2805
|
this._injector = inject(Injector);
|
|
2795
|
-
this._id = this._service.generateComponentId();
|
|
2796
|
-
this._listId = this._service.id;
|
|
2797
|
-
this._displayId = createDisplayId(this._listId, this._id);
|
|
2798
2806
|
}
|
|
2799
2807
|
ngOnInit() {
|
|
2800
2808
|
this._service.$clickDistance.pipe(takeUntil(this._$unsubscribe), tap(v => {
|
|
@@ -3447,6 +3455,8 @@ class NgScrollView extends BaseScrollView {
|
|
|
3447
3455
|
this.$scrollBehavior = this._$scrollBehavior.asObservable();
|
|
3448
3456
|
this._$overscrollEnabled = new BehaviorSubject(DEFAULT_OVERSCROLL_ENABLED);
|
|
3449
3457
|
this.$overscrollEnabled = this._$overscrollEnabled.asObservable();
|
|
3458
|
+
this._$scrollingSettings = new BehaviorSubject(DEFAULT_SCROLLING_SETTINGS);
|
|
3459
|
+
this.$scrollingSettings = this._$scrollingSettings.asObservable();
|
|
3450
3460
|
this._normalizeValueFromZero = inject(SCROLL_VIEW_NORMALIZE_VALUE_FROM_ZERO);
|
|
3451
3461
|
this._$scroll = new Subject();
|
|
3452
3462
|
this.$scroll = this._$scroll.asObservable();
|
|
@@ -3469,6 +3479,12 @@ class NgScrollView extends BaseScrollView {
|
|
|
3469
3479
|
}
|
|
3470
3480
|
}
|
|
3471
3481
|
get overscrollEnabled() { return this._$overscrollEnabled.getValue(); }
|
|
3482
|
+
set scrollingSettings(v) {
|
|
3483
|
+
if (this._$scrollingSettings.getValue() !== v) {
|
|
3484
|
+
this._$scrollingSettings.next(v);
|
|
3485
|
+
}
|
|
3486
|
+
}
|
|
3487
|
+
get scrollingSettings() { return this._$scrollingSettings.getValue(); }
|
|
3472
3488
|
set delta(v) {
|
|
3473
3489
|
this._startPosition += v;
|
|
3474
3490
|
}
|
|
@@ -3608,14 +3624,14 @@ class NgScrollView extends BaseScrollView {
|
|
|
3608
3624
|
}
|
|
3609
3625
|
calculateVelocity(offsets, delta, timestamp, indexOffset = 10) {
|
|
3610
3626
|
offsets.push([delta, timestamp < ANIMATOR_MIN_TIMESTAMP ? ANIMATOR_MIN_TIMESTAMP : timestamp]);
|
|
3611
|
-
const len = offsets.length, startIndex = len > indexOffset ? len - indexOffset : 0, lastVSign = calculateDirection(offsets);
|
|
3627
|
+
const len = offsets.length, startIndex = len > indexOffset ? len - indexOffset : 0, lastVSign = calculateDirection(offsets), speedScale = this.scrollingSettings?.speedScale ?? SPEED_SCALE;
|
|
3612
3628
|
let vSum = 0;
|
|
3613
3629
|
for (let i = startIndex, l = offsets.length; i < l; i++) {
|
|
3614
3630
|
const p0 = offsets[i];
|
|
3615
3631
|
if (lastVSign !== Math.sign(p0[0])) {
|
|
3616
3632
|
continue;
|
|
3617
3633
|
}
|
|
3618
|
-
const v0 = (p0[1] !== 0 ? lastVSign * Math.abs(p0[0] / p0[1]) *
|
|
3634
|
+
const v0 = (p0[1] !== 0 ? lastVSign * Math.abs(p0[0] / p0[1]) * speedScale : 0);
|
|
3619
3635
|
vSum += Math.sign(v0) * Math.pow(v0, 4) * .003;
|
|
3620
3636
|
}
|
|
3621
3637
|
const l = Math.min(offsets.length, indexOffset), v0 = l > 0 ? (vSum / l) : 0;
|
|
@@ -3625,6 +3641,7 @@ class NgScrollView extends BaseScrollView {
|
|
|
3625
3641
|
velocities.push([delta, timestamp < ANIMATOR_MIN_TIMESTAMP ? ANIMATOR_MIN_TIMESTAMP : timestamp]);
|
|
3626
3642
|
const len = velocities.length, startIndex = len > indexOffset ? len - indexOffset : 0;
|
|
3627
3643
|
let aSum = 0, prevV0, iteration = 0, lastVSign = calculateDirection(velocities);
|
|
3644
|
+
const mass = this.scrollingSettings?.mass ?? MASS;
|
|
3628
3645
|
for (let i = startIndex, l = velocities.length; i < l; i++) {
|
|
3629
3646
|
const v00 = prevV0, v01 = velocities[i];
|
|
3630
3647
|
if (lastVSign !== Math.sign(v01[0])) {
|
|
@@ -3632,13 +3649,13 @@ class NgScrollView extends BaseScrollView {
|
|
|
3632
3649
|
}
|
|
3633
3650
|
if (v00) {
|
|
3634
3651
|
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;
|
|
3635
|
-
aSum = (aSum *
|
|
3652
|
+
aSum = (aSum * mass) + a0;
|
|
3636
3653
|
prevV0 = v01;
|
|
3637
3654
|
}
|
|
3638
3655
|
prevV0 = v01;
|
|
3639
3656
|
iteration++;
|
|
3640
3657
|
}
|
|
3641
|
-
const a0 = aSum * FRICTION_FORCE;
|
|
3658
|
+
const a0 = aSum * (this.scrollingSettings?.frictionalForce ?? FRICTION_FORCE);
|
|
3642
3659
|
return { a0 };
|
|
3643
3660
|
}
|
|
3644
3661
|
stopScrolling() {
|
|
@@ -3649,7 +3666,7 @@ class NgScrollView extends BaseScrollView {
|
|
|
3649
3666
|
}
|
|
3650
3667
|
moveWithAcceleration(isVertical, position, v0, v, a0, timestamp) {
|
|
3651
3668
|
if (a0 !== 0 && timestamp < MAX_VELOCITY_TIMESTAMP) {
|
|
3652
|
-
const dvSign = Math.sign(v), duration = DURATION, maxDuration = MAX_DURATION, maxDistance = dvSign *
|
|
3669
|
+
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;
|
|
3653
3670
|
this.animate(startPosition, Math.round(positionWithVelocity), aDuration, easeOutQuad, true);
|
|
3654
3671
|
}
|
|
3655
3672
|
}
|
|
@@ -3771,7 +3788,7 @@ class NgScrollView extends BaseScrollView {
|
|
|
3771
3788
|
}
|
|
3772
3789
|
}
|
|
3773
3790
|
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 });
|
|
3791
|
+
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
3792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgScrollView, decorators: [{
|
|
3776
3793
|
type: Component,
|
|
3777
3794
|
args: [{
|
|
@@ -3785,6 +3802,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3785
3802
|
type: Input
|
|
3786
3803
|
}], overscrollEnabled: [{
|
|
3787
3804
|
type: Input
|
|
3805
|
+
}], scrollingSettings: [{
|
|
3806
|
+
type: Input
|
|
3788
3807
|
}] } });
|
|
3789
3808
|
|
|
3790
3809
|
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`;
|
|
@@ -5617,6 +5636,56 @@ class NgVirtualListComponent extends DisposableComponent {
|
|
|
5617
5636
|
}
|
|
5618
5637
|
return v;
|
|
5619
5638
|
};
|
|
5639
|
+
this._$scrollingSettings = new BehaviorSubject(DEFAULT_SCROLLING_SETTINGS);
|
|
5640
|
+
this.$scrollingSettings = this._$scrollingSettings.asObservable();
|
|
5641
|
+
this._scrollingSettingsTransform = (v) => {
|
|
5642
|
+
let valid = validateObject(v, true, true);
|
|
5643
|
+
if (valid && !!v) {
|
|
5644
|
+
const { frictionalForce, mass, maxDistance, maxDuration, speedScale, optimization } = v;
|
|
5645
|
+
valid = validateFloat(frictionalForce, true);
|
|
5646
|
+
if (!valid) {
|
|
5647
|
+
console.error('The "frictionalForce" parameter must be of type `number` or `undefined`.');
|
|
5648
|
+
return DEFAULT_SCROLLING_SETTINGS;
|
|
5649
|
+
}
|
|
5650
|
+
valid = validateFloat(mass, true);
|
|
5651
|
+
if (!valid) {
|
|
5652
|
+
console.error('The "mass" parameter must be of type `number` or `undefined`.');
|
|
5653
|
+
return DEFAULT_SCROLLING_SETTINGS;
|
|
5654
|
+
}
|
|
5655
|
+
valid = validateFloat(maxDistance, true);
|
|
5656
|
+
if (!valid) {
|
|
5657
|
+
console.error('The "maxDistance" parameter must be of type `number` or `undefined`.');
|
|
5658
|
+
return DEFAULT_SCROLLING_SETTINGS;
|
|
5659
|
+
}
|
|
5660
|
+
valid = validateFloat(maxDuration, true);
|
|
5661
|
+
if (!valid) {
|
|
5662
|
+
console.error('The "maxDuration" parameter must be of type `number` or `undefined`.');
|
|
5663
|
+
return DEFAULT_SCROLLING_SETTINGS;
|
|
5664
|
+
}
|
|
5665
|
+
valid = validateFloat(speedScale, true);
|
|
5666
|
+
if (!valid) {
|
|
5667
|
+
console.error('The "speedScale" parameter must be of type `number` or `undefined`.');
|
|
5668
|
+
return DEFAULT_SCROLLING_SETTINGS;
|
|
5669
|
+
}
|
|
5670
|
+
valid = validateBoolean(optimization, true);
|
|
5671
|
+
if (!valid) {
|
|
5672
|
+
console.error('The "optimization" parameter must be of type `boolean` or `undefined`.');
|
|
5673
|
+
return DEFAULT_SCROLLING_SETTINGS;
|
|
5674
|
+
}
|
|
5675
|
+
}
|
|
5676
|
+
if (!valid) {
|
|
5677
|
+
console.error('The "scrollingSettings" parameter must be of type `object` or null.');
|
|
5678
|
+
return DEFAULT_SCROLLING_SETTINGS;
|
|
5679
|
+
}
|
|
5680
|
+
return {
|
|
5681
|
+
frictionalForce: v.frictionalForce !== undefined && v.frictionalForce > 0 ? v.frictionalForce : DEFAULT_SCROLLING_SETTINGS.frictionalForce,
|
|
5682
|
+
mass: v.mass !== undefined && v.mass > 0 ? v.mass : DEFAULT_SCROLLING_SETTINGS.mass,
|
|
5683
|
+
maxDistance: v.maxDistance !== undefined && v.maxDistance > 0 ? v.maxDistance : DEFAULT_SCROLLING_SETTINGS.maxDistance,
|
|
5684
|
+
maxDuration: v.maxDuration !== undefined && v.maxDuration > 0 ? v.maxDuration : DEFAULT_SCROLLING_SETTINGS.maxDuration,
|
|
5685
|
+
speedScale: v.speedScale !== undefined && v.speedScale > 0 ? v.speedScale : DEFAULT_SCROLLING_SETTINGS.speedScale,
|
|
5686
|
+
optimization: v.optimization ?? DEFAULT_SCROLLING_SETTINGS.optimization,
|
|
5687
|
+
};
|
|
5688
|
+
};
|
|
5620
5689
|
this._$animationParams = new BehaviorSubject(DEFAULT_ANIMATION_PARAMS);
|
|
5621
5690
|
this.$animationParams = this._$animationParams.asObservable();
|
|
5622
5691
|
this._animationParamsTransform = (v) => {
|
|
@@ -6261,6 +6330,24 @@ class NgVirtualListComponent extends DisposableComponent {
|
|
|
6261
6330
|
}
|
|
6262
6331
|
;
|
|
6263
6332
|
get scrollBehavior() { return this._$scrollBehavior.getValue(); }
|
|
6333
|
+
/**
|
|
6334
|
+
* Scrolling settings.
|
|
6335
|
+
* - frictionalForce - Frictional force. Default value is 0.035.
|
|
6336
|
+
* - mass - Mass. Default value is 0.005.
|
|
6337
|
+
* - maxDistance - Maximum scrolling distance. Default value is 12500.
|
|
6338
|
+
* - maxDuration - Maximum animation duration. Default value is 4000.
|
|
6339
|
+
* - speedScale - Speed scale. Default value is 15.
|
|
6340
|
+
* - optimization - Enables scrolling performance optimization. Default value is `true`.
|
|
6341
|
+
*/
|
|
6342
|
+
set scrollingSettings(v) {
|
|
6343
|
+
if (this._$scrollingSettings.getValue() === v) {
|
|
6344
|
+
return;
|
|
6345
|
+
}
|
|
6346
|
+
const transformedValue = this._scrollingSettingsTransform(v);
|
|
6347
|
+
this._$scrollingSettings.next(transformedValue);
|
|
6348
|
+
}
|
|
6349
|
+
;
|
|
6350
|
+
get scrollingSettings() { return this._$scrollingSettings.getValue(); }
|
|
6264
6351
|
/**
|
|
6265
6352
|
* Animation parameters. The default value is "{ scrollToItem: 50, navigateToItem: 150, navigateByKeyboard: 50 }".
|
|
6266
6353
|
*/
|
|
@@ -6887,7 +6974,7 @@ class NgVirtualListComponent extends DisposableComponent {
|
|
|
6887
6974
|
}
|
|
6888
6975
|
})).subscribe();
|
|
6889
6976
|
const $preventScrollSnapping = this.$preventScrollSnapping;
|
|
6890
|
-
$preventScrollSnapping.pipe(takeUntil(this._$unsubscribe), filter$1(v => !!v),
|
|
6977
|
+
$preventScrollSnapping.pipe(takeUntil(this._$unsubscribe), filter$1(v => !!v), tap(() => {
|
|
6891
6978
|
if (this._readyForShow) {
|
|
6892
6979
|
this._trackBox.isScrollEnd;
|
|
6893
6980
|
this._trackBox.isScrollStart = this._trackBox.isScrollEnd = false;
|
|
@@ -6970,12 +7057,12 @@ class NgVirtualListComponent extends DisposableComponent {
|
|
|
6970
7057
|
this.resetBoundsSize(isVertical, totalSize);
|
|
6971
7058
|
this.createDisplayComponentsIfNeed(displayItems);
|
|
6972
7059
|
this.tracking();
|
|
7060
|
+
this.snappingHandler();
|
|
6973
7061
|
const delta = this._trackBox.delta, scrollPositionAfterUpdate = Math.round(actualScrollSize + delta), roundedScrollPositionAfterUpdate = Math.round(scrollPositionAfterUpdate), roundedMaxPositionAfterUpdate = Math.round(totalSize - viewportSize);
|
|
6974
7062
|
if (this._isSnappingMethodAdvanced) {
|
|
6975
7063
|
this.updateRegularRenderer();
|
|
6976
7064
|
}
|
|
6977
7065
|
scroller.delta = delta;
|
|
6978
|
-
this.snappingHandler();
|
|
6979
7066
|
if ((snapScrollToStart && this._trackBox.isSnappedToStart) ||
|
|
6980
7067
|
(snapScrollToStart && currentScrollSize <= MIN_PIXELS_FOR_PREVENT_SNAPPING)) {
|
|
6981
7068
|
if (currentScrollSize !== roundedScrollPositionAfterUpdate) {
|
|
@@ -7016,11 +7103,11 @@ class NgVirtualListComponent extends DisposableComponent {
|
|
|
7016
7103
|
if (emitUpdate) {
|
|
7017
7104
|
this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
|
|
7018
7105
|
}
|
|
7019
|
-
this._trackBox.isScrollEnd;
|
|
7020
7106
|
return;
|
|
7021
7107
|
}
|
|
7022
|
-
if (
|
|
7023
|
-
(
|
|
7108
|
+
if (scrollSize !== scrollPositionAfterUpdate &&
|
|
7109
|
+
((scrollPositionAfterUpdate >= 0 && scrollPositionAfterUpdate < roundedMaxPositionAfterUpdate) ||
|
|
7110
|
+
(scrollSize !== roundedMaxPositionAfterUpdate || currentScrollSize !== scrollPositionAfterUpdate))) {
|
|
7024
7111
|
this._trackBox.clearDelta();
|
|
7025
7112
|
if (this._readyForShow) {
|
|
7026
7113
|
this.emitScrollEvent(true, false, userAction);
|
|
@@ -7033,8 +7120,8 @@ class NgVirtualListComponent extends DisposableComponent {
|
|
|
7033
7120
|
if (emitUpdate) {
|
|
7034
7121
|
this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
|
|
7035
7122
|
}
|
|
7123
|
+
return;
|
|
7036
7124
|
}
|
|
7037
|
-
return;
|
|
7038
7125
|
}
|
|
7039
7126
|
if (emitUpdate) {
|
|
7040
7127
|
this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
|
|
@@ -7051,16 +7138,18 @@ class NgVirtualListComponent extends DisposableComponent {
|
|
|
7051
7138
|
itemsChanged = true;
|
|
7052
7139
|
prevItems = items;
|
|
7053
7140
|
}
|
|
7054
|
-
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 &&
|
|
7141
|
+
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 &&
|
|
7055
7142
|
(velocity > MAX_VELOCITY_FOR_SCROLL_QUALITY_OPTIMIZATION_LVL2 || hasUserAction);
|
|
7056
|
-
if (
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7143
|
+
if (enabledOptimization) {
|
|
7144
|
+
if (useDebouncedUpdate) {
|
|
7145
|
+
debouncedUpdate.execute({
|
|
7146
|
+
snapScrollToStart, snapScrollToEnd, bounds, listBounds, scrollEndOffset, items, itemConfigMap, scrollSize, itemSize, collapsedIds,
|
|
7147
|
+
bufferSize, maxBufferSize, snap, isVertical, dynamicSize, enabledBufferOptimization, cacheVersion, userAction: hasUserAction,
|
|
7148
|
+
}, rerenderOptimization, itemsChanged);
|
|
7149
|
+
return;
|
|
7150
|
+
}
|
|
7151
|
+
debouncedUpdate.dispose();
|
|
7062
7152
|
}
|
|
7063
|
-
debouncedUpdate.dispose();
|
|
7064
7153
|
if (!isScrolling) {
|
|
7065
7154
|
update({
|
|
7066
7155
|
snapScrollToStart, snapScrollToEnd, bounds: bounds, listBounds: listBounds, scrollEndOffset, items, itemConfigMap, scrollSize, itemSize, collapsedIds,
|
|
@@ -7072,19 +7161,10 @@ class NgVirtualListComponent extends DisposableComponent {
|
|
|
7072
7161
|
const scrollHandler = (userAction = false) => {
|
|
7073
7162
|
const scroller = this._scrollerComponent;
|
|
7074
7163
|
if (!!scroller) {
|
|
7075
|
-
const isVertical = this._isVertical,
|
|
7164
|
+
const isVertical = this._isVertical, scrollSize = (isVertical ? scroller.scrollTop : scroller.scrollLeft), actualScrollSize = scrollSize;
|
|
7076
7165
|
if (this._readyForShow) {
|
|
7077
7166
|
if (userAction) {
|
|
7078
|
-
|
|
7079
|
-
if (scrollSize > MIN_PIXELS_FOR_PREVENT_SNAPPING) {
|
|
7080
|
-
this._$preventScrollSnapping.next(true);
|
|
7081
|
-
}
|
|
7082
|
-
}
|
|
7083
|
-
if (this._trackBox.isSnappedToEnd) {
|
|
7084
|
-
if (scrollSize < (maxScrollSize - MIN_PIXELS_FOR_PREVENT_SNAPPING)) {
|
|
7085
|
-
this._$preventScrollSnapping.next(true);
|
|
7086
|
-
}
|
|
7087
|
-
}
|
|
7167
|
+
this._$preventScrollSnapping.next(true);
|
|
7088
7168
|
}
|
|
7089
7169
|
}
|
|
7090
7170
|
this._$scrollSize.next(actualScrollSize);
|
|
@@ -7644,12 +7724,12 @@ class NgVirtualListComponent extends DisposableComponent {
|
|
|
7644
7724
|
}
|
|
7645
7725
|
NgVirtualListComponent.__nextId = 0;
|
|
7646
7726
|
NgVirtualListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgVirtualListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7647
|
-
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 });
|
|
7727
|
+
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 });
|
|
7648
7728
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgVirtualListComponent, decorators: [{
|
|
7649
7729
|
type: Component,
|
|
7650
7730
|
args: [{ selector: 'ng-virtual-list', host: {
|
|
7651
7731
|
'style': 'position: relative;'
|
|
7652
|
-
}, 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"] }]
|
|
7732
|
+
}, 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"] }]
|
|
7653
7733
|
}], ctorParameters: function () { return []; }, propDecorators: { _prerender: [{
|
|
7654
7734
|
type: ViewChild,
|
|
7655
7735
|
args: ['prerender', { read: NgPrerenderContainer }]
|
|
@@ -7724,6 +7804,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
7724
7804
|
type: Input
|
|
7725
7805
|
}], scrollBehavior: [{
|
|
7726
7806
|
type: Input
|
|
7807
|
+
}], scrollingSettings: [{
|
|
7808
|
+
type: Input
|
|
7727
7809
|
}], animationParams: [{
|
|
7728
7810
|
type: Input
|
|
7729
7811
|
}], overscrollEnabled: [{
|
|
@@ -7799,7 +7881,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
7799
7881
|
declarations: [NgVirtualListItemComponent],
|
|
7800
7882
|
exports: [NgVirtualListItemComponent],
|
|
7801
7883
|
imports: [CommonModule, ItemClickModule],
|
|
7802
|
-
schemas: [
|
|
7884
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
7803
7885
|
}]
|
|
7804
7886
|
}] });
|
|
7805
7887
|
|
|
@@ -7814,7 +7896,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
7814
7896
|
declarations: [NgScrollBarComponent],
|
|
7815
7897
|
exports: [NgScrollBarComponent],
|
|
7816
7898
|
imports: [CommonModule],
|
|
7817
|
-
schemas: [
|
|
7899
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
7818
7900
|
}]
|
|
7819
7901
|
}] });
|
|
7820
7902
|
|
|
@@ -7829,7 +7911,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
7829
7911
|
declarations: [NgScrollerComponent],
|
|
7830
7912
|
exports: [NgScrollerComponent],
|
|
7831
7913
|
imports: [CommonModule, NgScrollBarModule, LocaleSensitiveModule, CdkScrollableModule],
|
|
7832
|
-
schemas: [
|
|
7914
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
7833
7915
|
}]
|
|
7834
7916
|
}] });
|
|
7835
7917
|
|
|
@@ -7844,7 +7926,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
7844
7926
|
declarations: [NgPrerenderVirtualListItemComponent],
|
|
7845
7927
|
exports: [NgPrerenderVirtualListItemComponent],
|
|
7846
7928
|
imports: [CommonModule, ItemClickModule],
|
|
7847
|
-
schemas: [
|
|
7929
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
7848
7930
|
}]
|
|
7849
7931
|
}] });
|
|
7850
7932
|
|