ng-virtual-list 19.11.2 → 19.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/fesm2022/ng-virtual-list.mjs +109 -46
- package/fesm2022/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 +3 -1
- package/lib/const/index.d.ts +2 -1
- package/lib/directives/item-click/item-click.directive.d.ts +1 -1
- package/lib/directives/locale-sensitive/locale-sensitive.directive.d.ts +1 -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 +13 -2
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { IRenderVirtualListItem } from '../../../models/render-item.model';
|
|
|
4
4
|
import { IDisplayObjectConfig, IDisplayObjectMeasures } from '../../../models';
|
|
5
5
|
import { ITemplateContext } from '../interfaces';
|
|
6
6
|
import { TextDirection } from '../../../enums';
|
|
7
|
+
import { NgVirtualListService } from '../../../ng-virtual-list.service';
|
|
7
8
|
/**
|
|
8
9
|
* BaseVirtualListItemComponent
|
|
9
10
|
* @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/components/list-item/base/base-virtual-list-item-component.ts
|
|
@@ -12,6 +13,7 @@ import { TextDirection } from '../../../enums';
|
|
|
12
13
|
*/
|
|
13
14
|
export declare class BaseVirtualListItemComponent {
|
|
14
15
|
private _apiService;
|
|
16
|
+
protected readonly _service: NgVirtualListService;
|
|
15
17
|
protected _id: number;
|
|
16
18
|
get id(): number;
|
|
17
19
|
protected _listId: number;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { IRenderVirtualListItem } from '../../models/render-item.model';
|
|
3
3
|
import { BaseVirtualListItemComponent } from './base';
|
|
4
|
-
import { NgVirtualListService } from '../../ng-virtual-list.service';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
/**
|
|
7
6
|
* Virtual list component.
|
|
@@ -12,7 +11,6 @@ import * as i0 from "@angular/core";
|
|
|
12
11
|
* @email djonnyx@gmail.com
|
|
13
12
|
*/
|
|
14
13
|
export declare class NgVirtualListItemComponent extends BaseVirtualListItemComponent implements OnInit {
|
|
15
|
-
protected readonly _service: NgVirtualListService;
|
|
16
14
|
protected readonly maxClickDistance: import("@angular/core").WritableSignal<number>;
|
|
17
15
|
protected _injector: Injector;
|
|
18
16
|
constructor();
|
|
@@ -3,6 +3,7 @@ import { Subject } from 'rxjs';
|
|
|
3
3
|
import { Animator, Easing } from '../../utils/animator';
|
|
4
4
|
import { IScrollToParams } from './interfaces';
|
|
5
5
|
import { BaseScrollView } from './base/base-scroll-view.component';
|
|
6
|
+
import { IScrollingSettings } from '../../interfaces';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* NgScrollView
|
|
@@ -16,6 +17,7 @@ export declare class NgScrollView extends BaseScrollView {
|
|
|
16
17
|
readonly cdkScrollable: CdkScrollable | undefined;
|
|
17
18
|
readonly scrollBehavior: import("@angular/core").InputSignal<ScrollBehavior>;
|
|
18
19
|
readonly overscrollEnabled: import("@angular/core").InputSignal<boolean>;
|
|
20
|
+
readonly scrollingSettings: import("@angular/core").InputSignal<IScrollingSettings>;
|
|
19
21
|
protected _normalizeValueFromZero: boolean;
|
|
20
22
|
protected _$scroll: Subject<boolean>;
|
|
21
23
|
readonly $scroll: import("rxjs").Observable<boolean>;
|
|
@@ -50,5 +52,5 @@ export declare class NgScrollView extends BaseScrollView {
|
|
|
50
52
|
reset(offset?: number): void;
|
|
51
53
|
ngOnDestroy(): void;
|
|
52
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgScrollView, never>;
|
|
53
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgScrollView, "ng-scroll-view", never, { "scrollBehavior": { "alias": "scrollBehavior"; "required": false; "isSignal": true; }; "overscrollEnabled": { "alias": "overscrollEnabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgScrollView, "ng-scroll-view", never, { "scrollBehavior": { "alias": "scrollBehavior"; "required": false; "isSignal": true; }; "overscrollEnabled": { "alias": "overscrollEnabled"; "required": false; "isSignal": true; }; "scrollingSettings": { "alias": "scrollingSettings"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
54
56
|
}
|
package/lib/const/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CollectionModes, MethodsForSelecting, SnappingMethods, TextDirections } from "../enums";
|
|
2
2
|
import { Directions } from "../enums/directions";
|
|
3
|
-
import { IAnimationParams } from '../interfaces';
|
|
3
|
+
import { IAnimationParams, IScrollingSettings } from '../interfaces';
|
|
4
4
|
export declare const MAX_REGULAR_SNAPED_COMPONENTS = 2;
|
|
5
5
|
export declare const DEFAULT_ITEM_SIZE = 24;
|
|
6
6
|
export declare const DEFAULT_BUFFER_SIZE = 2;
|
|
@@ -13,6 +13,7 @@ export declare const DEFAULT_SCROLLBAR_INTERACTIVE = true;
|
|
|
13
13
|
export declare const DEFAULT_SCROLL_BEHAVIOR: ScrollBehavior;
|
|
14
14
|
export declare const NAVIGATION_BY_KEYBOARD_TIMER = 50;
|
|
15
15
|
export declare const DEFAULT_ANIMATION_PARAMS: IAnimationParams;
|
|
16
|
+
export declare const DEFAULT_SCROLLING_SETTINGS: IScrollingSettings;
|
|
16
17
|
export declare const DEFAULT_OVERSCROLL_ENABLED = true;
|
|
17
18
|
export declare const DEFAULT_SNAP = false;
|
|
18
19
|
export declare const DEFAULT_SELECT_BY_CLICK = true;
|
|
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
* ItemClickDirective
|
|
4
4
|
* Maximum performance for extremely large lists.
|
|
5
5
|
* It is based on algorithms for virtualization of screen objects.
|
|
6
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
6
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/directives/item-click/item-click.directive.ts
|
|
7
7
|
* @author Evgenii Alexandrovich Grebennikov
|
|
8
8
|
* @email djonnyx@gmail.com
|
|
9
9
|
*/
|
|
@@ -5,7 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
* LocaleSensitiveDirective
|
|
6
6
|
* Maximum performance for extremely large lists.
|
|
7
7
|
* It is based on algorithms for virtualization of screen objects.
|
|
8
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
8
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/directives/locale-sensitive/locale-sensitive.directive.ts
|
|
9
9
|
* @author Evgenii Alexandrovich Grebennikov
|
|
10
10
|
* @email djonnyx@gmail.com
|
|
11
11
|
*/
|
|
@@ -6,4 +6,5 @@ import { IScrollEvent } from './scroll-event';
|
|
|
6
6
|
import { IScrollOptions } from './scroll-options';
|
|
7
7
|
import { IScrollParams } from './scroll-params';
|
|
8
8
|
import { ISize } from './size';
|
|
9
|
-
|
|
9
|
+
import { IScrollingSettings } from './scrolling-settings';
|
|
10
|
+
export type { IAnimationParams, BaseVirtualListItemComponent, IRect, IRenderStabilizerOptions, IScrollEvent, IScrollOptions, IScrollParams, ISize, IScrollingSettings, };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface IScrollingSettings.
|
|
3
|
+
* - frictionalForce - Frictional force. Default value is `0.035`.
|
|
4
|
+
* - mass - Mass. Default value is `0.005`.
|
|
5
|
+
* - maxDistance - Maximum scrolling distance. Default value is `12500`.
|
|
6
|
+
* - maxDuration - Maximum animation duration. Default value is `4000`.
|
|
7
|
+
* - speedScale - Speed scale. Default value is `15`.
|
|
8
|
+
* - optimization - Enables scrolling performance optimization. Default value is `true`.
|
|
9
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/scrolling-settings.ts
|
|
10
|
+
* @author Evgenii Alexandrovich Grebennikov
|
|
11
|
+
* @email djonnyx@gmail.com
|
|
12
|
+
*/
|
|
13
|
+
export interface IScrollingSettings {
|
|
14
|
+
/**
|
|
15
|
+
* Frictional force. Default value is `0.035`.
|
|
16
|
+
*/
|
|
17
|
+
frictionalForce?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Maximum animation duration. Default value is `4000`.
|
|
20
|
+
*/
|
|
21
|
+
maxDuration?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Mass. Default value is `0.005`.
|
|
24
|
+
*/
|
|
25
|
+
mass?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Maximum scrolling distance. Default value is `12500`.
|
|
28
|
+
*/
|
|
29
|
+
maxDistance?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Speed scale. Default value is `15`.
|
|
32
|
+
*/
|
|
33
|
+
speedScale?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Enables scrolling performance optimization. Default value is `true`.
|
|
36
|
+
*/
|
|
37
|
+
optimization?: boolean;
|
|
38
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnDestroy, TemplateRef } from '@angular/core';
|
|
2
2
|
import { IRenderVirtualListItem, IVirtualListCollection, IVirtualListItem, IVirtualListItemConfigMap } from './models';
|
|
3
|
-
import { IScrollEvent, IScrollOptions, IAnimationParams, ISize } from './interfaces';
|
|
3
|
+
import { IScrollEvent, IScrollOptions, IAnimationParams, ISize, IScrollingSettings } from './interfaces';
|
|
4
4
|
import { FocusAlignment, Id } from './types';
|
|
5
5
|
import { CollectionMode, Direction, MethodForSelecting, SnappingMethod, TextDirection } from './enums';
|
|
6
6
|
import { BaseVirtualListItemComponent } from './components/ng-list-item/base';
|
|
@@ -190,6 +190,17 @@ export declare class NgVirtualListComponent implements OnDestroy {
|
|
|
190
190
|
* Defines the scrolling behavior for any element on the page. The default value is "smooth".
|
|
191
191
|
*/
|
|
192
192
|
scrollBehavior: import("@angular/core").InputSignal<ScrollBehavior>;
|
|
193
|
+
private _scrollingSettingsOptions;
|
|
194
|
+
/**
|
|
195
|
+
* Scrolling settings.
|
|
196
|
+
* - frictionalForce - Frictional force. Default value is 0.035.
|
|
197
|
+
* - mass - Mass. Default value is 0.005.
|
|
198
|
+
* - maxDistance - Maximum scrolling distance. Default value is 12500.
|
|
199
|
+
* - maxDuration - Maximum animation duration. Default value is 4000.
|
|
200
|
+
* - speedScale - Speed scale. Default value is 15.
|
|
201
|
+
* - optimization - Enables scrolling performance optimization. Default value is `true`.
|
|
202
|
+
*/
|
|
203
|
+
scrollingSettings: import("@angular/core").InputSignal<IScrollingSettings>;
|
|
193
204
|
private _animationParamsOptions;
|
|
194
205
|
/**
|
|
195
206
|
* Animation parameters. The default value is "{ scrollToItem: 50, navigateToItem: 150 }".
|
|
@@ -428,5 +439,5 @@ export declare class NgVirtualListComponent implements OnDestroy {
|
|
|
428
439
|
ngOnDestroy(): void;
|
|
429
440
|
private dispose;
|
|
430
441
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgVirtualListComponent, never>;
|
|
431
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgVirtualListComponent, "ng-virtual-list", never, { "scrollbarThickness": { "alias": "scrollbarThickness"; "required": false; "isSignal": true; }; "scrollbarMinSize": { "alias": "scrollbarMinSize"; "required": false; "isSignal": true; }; "scrollbarThumbRenderer": { "alias": "scrollbarThumbRenderer"; "required": false; "isSignal": true; }; "scrollbarThumbParams": { "alias": "scrollbarThumbParams"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "waitForPreparation": { "alias": "waitForPreparation"; "required": false; "isSignal": true; }; "clickDistance": { "alias": "clickDistance"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": true; "isSignal": true; }; "defaultItemValue": { "alias": "defaultItemValue"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; "collapsedIds": { "alias": "collapsedIds"; "required": false; "isSignal": true; }; "selectByClick": { "alias": "selectByClick"; "required": false; "isSignal": true; }; "collapseByClick": { "alias": "collapseByClick"; "required": false; "isSignal": true; }; "snap": { "alias": "snap"; "required": false; "isSignal": true; }; "snapToEndTransitionInstantOffset": { "alias": "snapToEndTransitionInstantOffset"; "required": false; "isSignal": true; }; "scrollStartOffset": { "alias": "scrollStartOffset"; "required": false; "isSignal": true; }; "scrollEndOffset": { "alias": "scrollEndOffset"; "required": false; "isSignal": true; }; "snapScrollToStart": { "alias": "snapScrollToStart"; "required": false; "isSignal": true; }; "snapScrollToEnd": { "alias": "snapScrollToEnd"; "required": false; "isSignal": true; }; "snapScrollToBottom": { "alias": "snapScrollToBottom"; "required": false; "isSignal": true; }; "scrollbarEnabled": { "alias": "scrollbarEnabled"; "required": false; "isSignal": true; }; "scrollbarInteractive": { "alias": "scrollbarInteractive"; "required": false; "isSignal": true; }; "scrollBehavior": { "alias": "scrollBehavior"; "required": false; "isSignal": true; }; "animationParams": { "alias": "animationParams"; "required": false; "isSignal": true; }; "overscrollEnabled": { "alias": "overscrollEnabled"; "required": false; "isSignal": true; }; "enabledBufferOptimization": { "alias": "enabledBufferOptimization"; "required": false; "isSignal": true; }; "itemRenderer": { "alias": "itemRenderer"; "required": true; "isSignal": true; }; "itemConfigMap": { "alias": "itemConfigMap"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "dynamicSize": { "alias": "dynamicSize"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "collectionMode": { "alias": "collectionMode"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "maxBufferSize": { "alias": "maxBufferSize"; "required": false; "isSignal": true; }; "snappingMethod": { "alias": "snappingMethod"; "required": false; "isSignal": true; }; "methodForSelecting": { "alias": "methodForSelecting"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; "screenReaderMessage": { "alias": "screenReaderMessage"; "required": false; "isSignal": true; }; "langTextDir": { "alias": "langTextDir"; "required": false; "isSignal": true; }; }, { "onScroll": "onScroll"; "onScrollEnd": "onScrollEnd"; "onViewportChange": "onViewportChange"; "onItemClick": "onItemClick"; "onSelect": "onSelect"; "onCollapse": "onCollapse"; "onScrollReachStart": "onScrollReachStart"; "onScrollReachEnd": "onScrollReachEnd"; }, never, never, false, never>;
|
|
442
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgVirtualListComponent, "ng-virtual-list", never, { "scrollbarThickness": { "alias": "scrollbarThickness"; "required": false; "isSignal": true; }; "scrollbarMinSize": { "alias": "scrollbarMinSize"; "required": false; "isSignal": true; }; "scrollbarThumbRenderer": { "alias": "scrollbarThumbRenderer"; "required": false; "isSignal": true; }; "scrollbarThumbParams": { "alias": "scrollbarThumbParams"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "waitForPreparation": { "alias": "waitForPreparation"; "required": false; "isSignal": true; }; "clickDistance": { "alias": "clickDistance"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": true; "isSignal": true; }; "defaultItemValue": { "alias": "defaultItemValue"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; "collapsedIds": { "alias": "collapsedIds"; "required": false; "isSignal": true; }; "selectByClick": { "alias": "selectByClick"; "required": false; "isSignal": true; }; "collapseByClick": { "alias": "collapseByClick"; "required": false; "isSignal": true; }; "snap": { "alias": "snap"; "required": false; "isSignal": true; }; "snapToEndTransitionInstantOffset": { "alias": "snapToEndTransitionInstantOffset"; "required": false; "isSignal": true; }; "scrollStartOffset": { "alias": "scrollStartOffset"; "required": false; "isSignal": true; }; "scrollEndOffset": { "alias": "scrollEndOffset"; "required": false; "isSignal": true; }; "snapScrollToStart": { "alias": "snapScrollToStart"; "required": false; "isSignal": true; }; "snapScrollToEnd": { "alias": "snapScrollToEnd"; "required": false; "isSignal": true; }; "snapScrollToBottom": { "alias": "snapScrollToBottom"; "required": false; "isSignal": true; }; "scrollbarEnabled": { "alias": "scrollbarEnabled"; "required": false; "isSignal": true; }; "scrollbarInteractive": { "alias": "scrollbarInteractive"; "required": false; "isSignal": true; }; "scrollBehavior": { "alias": "scrollBehavior"; "required": false; "isSignal": true; }; "scrollingSettings": { "alias": "scrollingSettings"; "required": false; "isSignal": true; }; "animationParams": { "alias": "animationParams"; "required": false; "isSignal": true; }; "overscrollEnabled": { "alias": "overscrollEnabled"; "required": false; "isSignal": true; }; "enabledBufferOptimization": { "alias": "enabledBufferOptimization"; "required": false; "isSignal": true; }; "itemRenderer": { "alias": "itemRenderer"; "required": true; "isSignal": true; }; "itemConfigMap": { "alias": "itemConfigMap"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "dynamicSize": { "alias": "dynamicSize"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "collectionMode": { "alias": "collectionMode"; "required": false; "isSignal": true; }; "bufferSize": { "alias": "bufferSize"; "required": false; "isSignal": true; }; "maxBufferSize": { "alias": "maxBufferSize"; "required": false; "isSignal": true; }; "snappingMethod": { "alias": "snappingMethod"; "required": false; "isSignal": true; }; "methodForSelecting": { "alias": "methodForSelecting"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; "screenReaderMessage": { "alias": "screenReaderMessage"; "required": false; "isSignal": true; }; "langTextDir": { "alias": "langTextDir"; "required": false; "isSignal": true; }; }, { "onScroll": "onScroll"; "onScrollEnd": "onScrollEnd"; "onViewportChange": "onViewportChange"; "onItemClick": "onItemClick"; "onSelect": "onSelect"; "onCollapse": "onCollapse"; "onScrollReachStart": "onScrollReachStart"; "onScrollReachEnd": "onScrollReachEnd"; }, never, never, false, never>;
|
|
432
443
|
}
|