ng-virtual-list 18.12.2 → 18.12.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 +2 -2
- package/esm2022/lib/components/ng-list-item/base/base-virtual-list-item-component.mjs +9 -5
- package/esm2022/lib/components/ng-list-item/const/index.mjs +2 -1
- package/esm2022/lib/components/ng-list-item/ng-virtual-list-item.component.mjs +14 -8
- package/esm2022/lib/components/ng-prerender-container/components/ng-prerender-list-item/ng-prerender-list-item.component.mjs +3 -3
- package/esm2022/lib/components/ng-scroll-view/ng-scroll-view.component.mjs +20 -14
- package/esm2022/lib/components/ng-scroller/ng-scroller.component.mjs +6 -2
- package/esm2022/lib/const/index.mjs +6 -3
- package/esm2022/lib/core/track-box.mjs +31 -9
- package/esm2022/lib/directives/virtual-click/virtual-click.directive.mjs +35 -16
- package/esm2022/lib/models/display-object-config.model.mjs +1 -1
- package/esm2022/lib/ng-virtual-list.component.mjs +43 -11
- package/esm2022/lib/ng-virtual-list.service.mjs +31 -2
- package/esm2022/lib/utils/animator/animator.mjs +39 -14
- package/fesm2022/ng-virtual-list.mjs +222 -73
- package/fesm2022/ng-virtual-list.mjs.map +1 -1
- package/lib/components/ng-list-item/base/base-virtual-list-item-component.d.ts +1 -1
- package/lib/components/ng-list-item/ng-virtual-list-item.component.d.ts +3 -1
- package/lib/components/ng-scroll-view/ng-scroll-view.component.d.ts +5 -2
- package/lib/components/ng-scroller/ng-scroller.component.d.ts +1 -1
- package/lib/const/index.d.ts +3 -1
- package/lib/directives/virtual-click/virtual-click.directive.d.ts +11 -6
- package/lib/models/display-object-config.model.d.ts +4 -0
- package/lib/ng-virtual-list.component.d.ts +2 -1
- package/lib/ng-virtual-list.service.d.ts +13 -0
- package/lib/utils/animator/animator.d.ts +11 -2
- package/package.json +1 -1
|
@@ -71,7 +71,7 @@ export declare class BaseVirtualListItemComponent extends DisposableComponent im
|
|
|
71
71
|
get element(): HTMLElement;
|
|
72
72
|
constructor();
|
|
73
73
|
protected updateMeasures(v: IRenderVirtualListItem<any> | null): void;
|
|
74
|
-
protected updateConfig(v: IRenderVirtualListItem<any> | null): void;
|
|
74
|
+
protected updateConfig(v: IRenderVirtualListItem<any> | null, grabbing: boolean): void;
|
|
75
75
|
protected update(): void;
|
|
76
76
|
protected updatePartStr(v: IRenderVirtualListItem | null, isSelected: boolean, isCollapsed: boolean): void;
|
|
77
77
|
protected hasFocus(): boolean;
|
|
@@ -23,8 +23,10 @@ export declare class NgVirtualListItemComponent extends BaseVirtualListItemCompo
|
|
|
23
23
|
private toPrevItem;
|
|
24
24
|
private focusNext;
|
|
25
25
|
private focusPrev;
|
|
26
|
-
protected updateConfig(v: IRenderVirtualListItem<any> | null): void;
|
|
26
|
+
protected updateConfig(v: IRenderVirtualListItem<any> | null, grabbing: boolean): void;
|
|
27
27
|
onClickHandler(): void;
|
|
28
|
+
onClickPressHandler(): void;
|
|
29
|
+
onClickCancelHandler(): void;
|
|
28
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgVirtualListItemComponent, never>;
|
|
29
31
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgVirtualListItemComponent, "ng-virtual-list-item", never, {}, {}, never, never, false, never>;
|
|
30
32
|
}
|
|
@@ -87,8 +87,10 @@ export declare class NgScrollView extends BaseScrollView {
|
|
|
87
87
|
get startLayoutOffset(): number;
|
|
88
88
|
protected _intersectionComponentId: Id | null;
|
|
89
89
|
protected _isAlignmentAnimation: boolean;
|
|
90
|
+
get animated(): boolean;
|
|
90
91
|
constructor();
|
|
91
92
|
ngAfterViewInit(): void;
|
|
93
|
+
hasAnimation(id?: number): boolean;
|
|
92
94
|
protected updateDirection(position: number, prePosition: number): void;
|
|
93
95
|
protected overrideCoordinates(x: number, y: number): void;
|
|
94
96
|
protected measureVelocity(): void;
|
|
@@ -105,19 +107,20 @@ export declare class NgScrollView extends BaseScrollView {
|
|
|
105
107
|
protected move(isVertical: boolean, position: number, blending?: boolean, userAction?: boolean, fireUpdate?: boolean): void;
|
|
106
108
|
protected moveWithAcceleration(isVertical: boolean, position: number, v0: number, v: number, a0: number, timestamp: number): void;
|
|
107
109
|
protected normalizeValue(value: number): number;
|
|
108
|
-
protected animate(startValue: number, endValue: number, duration?: number, easingFunction?: Easing, userAction?: boolean, alignmentAtComplete?: boolean, skipOverridedCoordinates?: boolean):
|
|
110
|
+
protected animate(startValue: number, endValue: number, duration?: number, easingFunction?: Easing, blending?: boolean, userAction?: boolean, alignmentAtComplete?: boolean, skipOverridedCoordinates?: boolean): number;
|
|
109
111
|
protected getSnappedComponentSize(): number | null;
|
|
110
112
|
protected alignPosition(animated?: boolean, force?: boolean): boolean;
|
|
111
113
|
protected checkIntersectionComponent(): void;
|
|
112
114
|
protected onAnimationComplete(position: number): void;
|
|
113
115
|
fireScroll(userAction?: boolean): void;
|
|
114
116
|
scrollLimits(value?: number | undefined, silent?: boolean): boolean;
|
|
115
|
-
scroll(params: IScrollToParams):
|
|
117
|
+
scroll(params: IScrollToParams): number;
|
|
116
118
|
protected emitScrollableEvent(): void;
|
|
117
119
|
refreshCoordinate(x: number, y: number): void;
|
|
118
120
|
protected fireScrollEvent(userAction: boolean): void;
|
|
119
121
|
protected onDragStart(): void;
|
|
120
122
|
reset(offset?: number): void;
|
|
123
|
+
stopAnimation(id: number): void;
|
|
121
124
|
ngOnDestroy(): void;
|
|
122
125
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgScrollView, never>;
|
|
123
126
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgScrollView, "ng-scroll-view", never, { "scrollBehavior": { "alias": "scrollBehavior"; "required": false; }; "overscrollEnabled": { "alias": "overscrollEnabled"; "required": false; }; "scrollingSettings": { "alias": "scrollingSettings"; "required": false; }; "snapToItem": { "alias": "snapToItem"; "required": false; }; "scrollingOneByOne": { "alias": "scrollingOneByOne"; "required": false; }; "snapToItemAlign": { "alias": "snapToItemAlign"; "required": false; }; "snappingDistance": { "alias": "snappingDistance"; "required": false; }; "animationParams": { "alias": "animationParams"; "required": false; }; }, {}, never, never, false, never>;
|
|
@@ -151,7 +151,7 @@ export declare class NgScrollerComponent extends NgScrollView {
|
|
|
151
151
|
snapIfNeed(animated?: boolean): void;
|
|
152
152
|
startScrollTo(): void;
|
|
153
153
|
finishedScrollTo(): void;
|
|
154
|
-
scrollTo(params: IScrollToParams):
|
|
154
|
+
scrollTo(params: IScrollToParams): number;
|
|
155
155
|
stopScrollbar(): void;
|
|
156
156
|
private dropVelocity;
|
|
157
157
|
protected stopMoving(): void;
|
package/lib/const/index.d.ts
CHANGED
|
@@ -75,13 +75,15 @@ export declare const POSITION = "position";
|
|
|
75
75
|
export declare const POSITION_RELATIVE = "relative";
|
|
76
76
|
export declare const POSITION_ABSOLUTE = "absolute";
|
|
77
77
|
export declare const TRANSLATE_3D = "translate3d";
|
|
78
|
-
export declare const
|
|
78
|
+
export declare const INVISIBLE_TRANSLATE_3D = "translate3d(-10000,-10000,0)";
|
|
79
79
|
export declare const HIDDEN_ZINDEX = "-1";
|
|
80
80
|
export declare const DEFAULT_ZINDEX = "0";
|
|
81
81
|
export declare const TOP_PROP_NAME = "top";
|
|
82
82
|
export declare const LEFT_PROP_NAME = "left";
|
|
83
83
|
export declare const X_PROP_NAME = "x";
|
|
84
84
|
export declare const Y_PROP_NAME = "y";
|
|
85
|
+
export declare const TRANSFORMED_X_PROP_NAME = "transformedX";
|
|
86
|
+
export declare const TRANSFORMED_Y_PROP_NAME = "transformedY";
|
|
85
87
|
export declare const WIDTH_PROP_NAME = "width";
|
|
86
88
|
export declare const HEIGHT_PROP_NAME = "height";
|
|
87
89
|
export declare const MARGIN_TOP = "marginTop";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy, EventEmitter } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* VirtualClickDirective
|
|
6
6
|
* Maximum performance for extremely large lists.
|
|
7
7
|
* It is based on algorithms for virtualization of screen objects.
|
|
8
8
|
* @link https://github.com/DjonnyX/ng-virtual-list/blob/18.x/projects/ng-virtual-list/src/lib/directives/item-click/item-click.directive.ts
|
|
@@ -10,13 +10,18 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
* @email djonnyx@gmail.com
|
|
11
11
|
*/
|
|
12
12
|
export declare class VirtualClickDirective implements OnDestroy {
|
|
13
|
-
private _elementRef;
|
|
14
13
|
protected _$unsubscribe: Subject<void>;
|
|
14
|
+
private _$maxDistance;
|
|
15
|
+
protected $maxDistance: import("rxjs").Observable<number | null>;
|
|
15
16
|
private _maxDistance;
|
|
16
|
-
set maxDistance(v: number |
|
|
17
|
+
set maxDistance(v: number | string);
|
|
17
18
|
onVirtualClick: EventEmitter<PointerEvent | TouchEvent>;
|
|
18
|
-
|
|
19
|
+
onVirtualClickPress: EventEmitter<PointerEvent | TouchEvent>;
|
|
20
|
+
onVirtualClickCancel: EventEmitter<void>;
|
|
21
|
+
private _service;
|
|
22
|
+
private _elementRef;
|
|
23
|
+
constructor();
|
|
19
24
|
ngOnDestroy(): void;
|
|
20
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<VirtualClickDirective, never>;
|
|
21
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<VirtualClickDirective, "[virtualClick]", never, { "maxDistance": { "alias": "maxClickDistance"; "required": false; }; }, { "onVirtualClick": "onVirtualClick"; }, never, never, false, never>;
|
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<VirtualClickDirective, "[virtualClick]", never, { "maxDistance": { "alias": "maxClickDistance"; "required": false; }; }, { "onVirtualClick": "onVirtualClick"; "onVirtualClickPress": "onVirtualClickPress"; "onVirtualClickCancel": "onVirtualClickCancel"; }, never, never, false, never>;
|
|
22
27
|
}
|
|
@@ -406,7 +406,7 @@ export declare class NgVirtualListComponent extends DisposableComponent implemen
|
|
|
406
406
|
protected readonly $animationParams: Observable<IAnimationParams>;
|
|
407
407
|
private _animationParamsTransform;
|
|
408
408
|
/**
|
|
409
|
-
* Animation parameters. The default value is "{ scrollToItem:
|
|
409
|
+
* Animation parameters. The default value is "{ scrollToItem: 150, snapToItem: 150, navigateToItem: 150, navigateByKeyboard: 50 }".
|
|
410
410
|
*/
|
|
411
411
|
set animationParams(v: IAnimationParams);
|
|
412
412
|
get animationParams(): IAnimationParams;
|
|
@@ -695,6 +695,7 @@ export declare class NgVirtualListComponent extends DisposableComponent implemen
|
|
|
695
695
|
private _readyForShow;
|
|
696
696
|
private _cached;
|
|
697
697
|
private _isLoading;
|
|
698
|
+
private _animationId;
|
|
698
699
|
protected get cachable(): boolean;
|
|
699
700
|
protected get prerenderable(): boolean;
|
|
700
701
|
private _$viewInit;
|
|
@@ -81,6 +81,19 @@ export declare class NgVirtualListService {
|
|
|
81
81
|
get langTextDir(): TextDirection;
|
|
82
82
|
private _langTextDir;
|
|
83
83
|
set langTextDir(v: TextDirection);
|
|
84
|
+
private _$grabbing;
|
|
85
|
+
readonly $grabbing: import("rxjs").Observable<boolean>;
|
|
86
|
+
get grabbing(): boolean;
|
|
87
|
+
private _grabbing;
|
|
88
|
+
set grabbing(v: boolean);
|
|
89
|
+
private _$clickPressed;
|
|
90
|
+
readonly $clickPressed: import("rxjs").Observable<boolean>;
|
|
91
|
+
get clickPressed(): boolean;
|
|
92
|
+
private _clickPressed;
|
|
93
|
+
set clickPressed(v: boolean);
|
|
94
|
+
private _$isGrabbing;
|
|
95
|
+
readonly $isGrabbing: import("rxjs").Observable<boolean>;
|
|
96
|
+
get isGrabbing(): boolean;
|
|
84
97
|
get scrollBarSize(): number;
|
|
85
98
|
private _scrollBarSize;
|
|
86
99
|
set scrollBarSize(v: number);
|
|
@@ -8,9 +8,18 @@ import { IAnimatorParams } from './interfaces';
|
|
|
8
8
|
export declare class Animator {
|
|
9
9
|
private static _nextId;
|
|
10
10
|
private _animationId;
|
|
11
|
+
get animated(): boolean;
|
|
12
|
+
get isAnimated(): boolean;
|
|
11
13
|
private _currentId;
|
|
14
|
+
get id(): number;
|
|
12
15
|
private generateId;
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
private _diff;
|
|
17
|
+
private _startValue;
|
|
18
|
+
private _endValue;
|
|
19
|
+
private _prevPos;
|
|
20
|
+
updateTo(end: number): boolean;
|
|
21
|
+
animate(params: IAnimatorParams): number;
|
|
22
|
+
hasAnimation(id?: number): boolean;
|
|
23
|
+
stop(id?: number): void;
|
|
15
24
|
dispose(): void;
|
|
16
25
|
}
|