ng-virtual-list 14.0.2 → 14.0.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/LICENSE +21 -0
- package/README.md +26 -0
- package/esm2020/lib/models/scroll-event.model.mjs +1 -1
- package/esm2020/lib/ng-virtual-list.component.mjs +23 -9
- package/esm2020/lib/utils/index.mjs +3 -3
- package/esm2020/lib/utils/scrollEvent.mjs +32 -0
- package/esm2020/lib/utils/trackBox.mjs +20 -14
- package/fesm2015/ng-virtual-list.mjs +70 -19
- package/fesm2015/ng-virtual-list.mjs.map +1 -1
- package/fesm2020/ng-virtual-list.mjs +70 -19
- package/fesm2020/ng-virtual-list.mjs.map +1 -1
- package/lib/models/scroll-event.model.d.ts +4 -0
- package/lib/ng-virtual-list.component.d.ts +2 -2
- package/lib/utils/index.d.ts +2 -2
- package/lib/utils/scrollEvent.d.ts +22 -0
- package/package.json +1 -1
|
@@ -15,4 +15,8 @@ export interface IScrollEvent {
|
|
|
15
15
|
* A value of 1 indicates the direction is down or right (if the list direction is horizontal).
|
|
16
16
|
*/
|
|
17
17
|
direction: ScrollDirection;
|
|
18
|
+
/**
|
|
19
|
+
* If true then indicates that the list has been scrolled to the end.
|
|
20
|
+
*/
|
|
21
|
+
isEnd: boolean;
|
|
18
22
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, ComponentRef, ElementRef,
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ComponentRef, ElementRef, OnDestroy, EventEmitter, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
3
|
import { NgVirtualListItemComponent } from './components/ng-virtual-list-item.component';
|
|
4
4
|
import { IScrollEvent, IVirtualListCollection, IVirtualListStickyMap } from './models';
|
|
5
5
|
import { Id } from './types';
|
|
6
6
|
import { Direction } from './enums';
|
|
7
|
-
import { DisposableComponent } from './utils';
|
|
7
|
+
import { DisposableComponent } from './utils/disposableComponent';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
/**
|
|
10
10
|
* Virtual list component.
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import { debounce } from "./debounce";
|
|
|
3
3
|
import { toggleClassName } from './toggleClassName';
|
|
4
4
|
import { Tracker } from "./tracker";
|
|
5
5
|
import { TrackBox } from "./trackBox";
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
6
|
+
import { ScrollEvent } from "./scrollEvent";
|
|
7
|
+
export { isDirection, debounce, toggleClassName, ScrollEvent, TrackBox, Tracker, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IScrollEvent, ScrollDirection } from "../models";
|
|
2
|
+
export declare class ScrollEvent implements IScrollEvent {
|
|
3
|
+
private _direction;
|
|
4
|
+
get direction(): ScrollDirection;
|
|
5
|
+
private _scrollSize;
|
|
6
|
+
get scrollSize(): number;
|
|
7
|
+
private _scrollWeight;
|
|
8
|
+
get scrollWeight(): number;
|
|
9
|
+
private _isVertical;
|
|
10
|
+
get isVertical(): boolean;
|
|
11
|
+
private _listSize;
|
|
12
|
+
get listSize(): number;
|
|
13
|
+
private _size;
|
|
14
|
+
get size(): number;
|
|
15
|
+
private _isStart;
|
|
16
|
+
get isStart(): boolean;
|
|
17
|
+
private _isEnd;
|
|
18
|
+
get isEnd(): boolean;
|
|
19
|
+
private _delta;
|
|
20
|
+
get delta(): number;
|
|
21
|
+
constructor(direction: ScrollDirection, container: HTMLElement, list: HTMLElement, delta: number, isVertical: boolean);
|
|
22
|
+
}
|