ng-virtual-list 20.4.1 → 20.4.2
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/fesm2022/ng-virtual-list.mjs +202 -193
- package/fesm2022/ng-virtual-list.mjs.map +1 -1
- package/index.d.ts +201 -451
- package/package.json +1 -1
- package/esm2020/lib/components/ng-virtual-list-item.component.mjs +0 -131
- package/esm2020/lib/const/index.mjs +0 -44
- package/esm2020/lib/enums/direction.mjs +0 -2
- package/esm2020/lib/enums/directions.mjs +0 -18
- package/esm2020/lib/enums/index.mjs +0 -4
- package/esm2020/lib/enums/snapping-method.mjs +0 -2
- package/esm2020/lib/enums/snapping-methods.mjs +0 -18
- package/esm2020/lib/models/base-virtual-list-item-component.mjs +0 -9
- package/esm2020/lib/models/collection.model.mjs +0 -3
- package/esm2020/lib/models/component.model.mjs +0 -2
- package/esm2020/lib/models/index.mjs +0 -3
- package/esm2020/lib/models/item.model.mjs +0 -2
- package/esm2020/lib/models/render-collection.model.mjs +0 -3
- package/esm2020/lib/models/render-item-config.model.mjs +0 -2
- package/esm2020/lib/models/render-item.model.mjs +0 -3
- package/esm2020/lib/models/scroll-direction.model.mjs +0 -2
- package/esm2020/lib/models/scroll-event.model.mjs +0 -2
- package/esm2020/lib/models/sticky-map.model.mjs +0 -2
- package/esm2020/lib/ng-virtual-list.component.mjs +0 -677
- package/esm2020/lib/ng-virtual-list.module.mjs +0 -20
- package/esm2020/lib/types/id.mjs +0 -2
- package/esm2020/lib/types/index.mjs +0 -2
- package/esm2020/lib/types/rect.mjs +0 -2
- package/esm2020/lib/types/size.mjs +0 -2
- package/esm2020/lib/utils/browser.mjs +0 -3
- package/esm2020/lib/utils/buffer-interpolation.mjs +0 -27
- package/esm2020/lib/utils/cacheMap.mjs +0 -167
- package/esm2020/lib/utils/debounce.mjs +0 -31
- package/esm2020/lib/utils/disposableComponent.mjs +0 -29
- package/esm2020/lib/utils/eventEmitter.mjs +0 -106
- package/esm2020/lib/utils/index.mjs +0 -9
- package/esm2020/lib/utils/isDirection.mjs +0 -15
- package/esm2020/lib/utils/scrollEvent.mjs +0 -42
- package/esm2020/lib/utils/snapping-method.mjs +0 -9
- package/esm2020/lib/utils/toggleClassName.mjs +0 -15
- package/esm2020/lib/utils/trackBox.mjs +0 -745
- package/esm2020/lib/utils/tracker.mjs +0 -134
- package/esm2020/ng-virtual-list.mjs +0 -5
- package/esm2020/public-api.mjs +0 -10
- package/esm2022/lib/components/ng-virtual-list-item.component.mjs +0 -136
- package/esm2022/lib/const/index.mjs +0 -44
- package/esm2022/lib/enums/direction.mjs +0 -2
- package/esm2022/lib/enums/directions.mjs +0 -18
- package/esm2022/lib/enums/index.mjs +0 -4
- package/esm2022/lib/enums/snapping-method.mjs +0 -2
- package/esm2022/lib/enums/snapping-methods.mjs +0 -18
- package/esm2022/lib/models/base-virtual-list-item-component.mjs +0 -9
- package/esm2022/lib/models/collection.model.mjs +0 -3
- package/esm2022/lib/models/component.model.mjs +0 -2
- package/esm2022/lib/models/index.mjs +0 -3
- package/esm2022/lib/models/item.model.mjs +0 -2
- package/esm2022/lib/models/render-collection.model.mjs +0 -3
- package/esm2022/lib/models/render-item-config.model.mjs +0 -2
- package/esm2022/lib/models/render-item.model.mjs +0 -3
- package/esm2022/lib/models/scroll-direction.model.mjs +0 -2
- package/esm2022/lib/models/scroll-event.model.mjs +0 -2
- package/esm2022/lib/models/sticky-map.model.mjs +0 -2
- package/esm2022/lib/ng-virtual-list.component.mjs +0 -685
- package/esm2022/lib/ng-virtual-list.module.mjs +0 -20
- package/esm2022/lib/types/id.mjs +0 -2
- package/esm2022/lib/types/index.mjs +0 -2
- package/esm2022/lib/types/rect.mjs +0 -2
- package/esm2022/lib/types/size.mjs +0 -2
- package/esm2022/lib/utils/browser.mjs +0 -3
- package/esm2022/lib/utils/buffer-interpolation.mjs +0 -27
- package/esm2022/lib/utils/cacheMap.mjs +0 -168
- package/esm2022/lib/utils/debounce.mjs +0 -31
- package/esm2022/lib/utils/eventEmitter.mjs +0 -105
- package/esm2022/lib/utils/index.mjs +0 -9
- package/esm2022/lib/utils/isDirection.mjs +0 -15
- package/esm2022/lib/utils/scrollEvent.mjs +0 -42
- package/esm2022/lib/utils/snapping-method.mjs +0 -9
- package/esm2022/lib/utils/toggleClassName.mjs +0 -15
- package/esm2022/lib/utils/trackBox.mjs +0 -751
- package/esm2022/lib/utils/tracker.mjs +0 -135
- package/esm2022/ng-virtual-list.mjs +0 -5
- package/esm2022/public-api.mjs +0 -10
- package/fesm2015/ng-virtual-list.mjs +0 -2216
- package/fesm2015/ng-virtual-list.mjs.map +0 -1
- package/fesm2020/ng-virtual-list.mjs +0 -2221
- package/fesm2020/ng-virtual-list.mjs.map +0 -1
- package/lib/components/ng-virtual-list-item.component.d.ts +0 -35
- package/lib/const/index.d.ts +0 -42
- package/lib/enums/direction.d.ts +0 -8
- package/lib/enums/directions.d.ts +0 -16
- package/lib/enums/index.d.ts +0 -7
- package/lib/enums/snapping-method.d.ts +0 -10
- package/lib/enums/snapping-methods.d.ts +0 -16
- package/lib/models/base-virtual-list-item-component.d.ts +0 -25
- package/lib/models/collection.model.d.ts +0 -9
- package/lib/models/component.model.d.ts +0 -3
- package/lib/models/index.d.ts +0 -9
- package/lib/models/item.model.d.ts +0 -14
- package/lib/models/render-collection.model.d.ts +0 -9
- package/lib/models/render-item-config.model.d.ts +0 -41
- package/lib/models/render-item.model.d.ts +0 -33
- package/lib/models/scroll-direction.model.d.ts +0 -5
- package/lib/models/scroll-event.model.d.ts +0 -50
- package/lib/models/sticky-map.model.d.ts +0 -14
- package/lib/ng-virtual-list.component.d.ts +0 -208
- package/lib/ng-virtual-list.module.d.ts +0 -9
- package/lib/types/id.d.ts +0 -7
- package/lib/types/index.d.ts +0 -4
- package/lib/types/rect.d.ts +0 -17
- package/lib/types/size.d.ts +0 -16
- package/lib/utils/browser.d.ts +0 -2
- package/lib/utils/buffer-interpolation.d.ts +0 -5
- package/lib/utils/cacheMap.d.ts +0 -60
- package/lib/utils/debounce.d.ts +0 -16
- package/lib/utils/disposableComponent.d.ts +0 -15
- package/lib/utils/eventEmitter.d.ts +0 -40
- package/lib/utils/index.d.ts +0 -9
- package/lib/utils/isDirection.d.ts +0 -8
- package/lib/utils/scrollEvent.d.ts +0 -39
- package/lib/utils/snapping-method.d.ts +0 -3
- package/lib/utils/toggleClassName.d.ts +0 -7
- package/lib/utils/trackBox.d.ts +0 -204
- package/lib/utils/tracker.d.ts +0 -46
- package/public-api.d.ts +0 -6
package/lib/utils/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { isDirection } from "./isDirection";
|
|
2
|
-
import { debounce } from "./debounce";
|
|
3
|
-
import { toggleClassName } from './toggleClassName';
|
|
4
|
-
import { Tracker } from "./tracker";
|
|
5
|
-
import { TrackBox, IUpdateCollectionReturns, TRACK_BOX_CHANGE_EVENT_NAME, IMetrics, IRecalculateMetricsOptions, IGetItemPositionOptions, IUpdateCollectionOptions, CacheMapEvents, OnChangeEventListener, CacheMapListeners, ItemDisplayMethods } from "./trackBox";
|
|
6
|
-
import { CMap, ICacheMap, CACHE_BOX_CHANGE_EVENT_NAME } from './cacheMap';
|
|
7
|
-
import { ScrollEvent } from "./scrollEvent";
|
|
8
|
-
export { isDirection, debounce, toggleClassName, ScrollEvent, TrackBox, Tracker, TRACK_BOX_CHANGE_EVENT_NAME, CMap, CACHE_BOX_CHANGE_EVENT_NAME, };
|
|
9
|
-
export type { ICacheMap, IUpdateCollectionReturns, IMetrics, IRecalculateMetricsOptions, IGetItemPositionOptions, IUpdateCollectionOptions, CacheMapEvents, OnChangeEventListener, CacheMapListeners, ItemDisplayMethods, };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Direction } from "../enums";
|
|
2
|
-
/**
|
|
3
|
-
* Determines the axis membership of a virtual list
|
|
4
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/15.x/projects/ng-virtual-list/src/lib/utils/isDirection.ts
|
|
5
|
-
* @author Evgenii Grebennikov
|
|
6
|
-
* @email djonnyx@gmail.com
|
|
7
|
-
*/
|
|
8
|
-
export declare const isDirection: (src: Direction, expected: Direction) => boolean;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { IScrollEvent, ScrollDirection } from "../models";
|
|
2
|
-
interface IScrollEventParams {
|
|
3
|
-
direction: ScrollDirection;
|
|
4
|
-
container: HTMLElement;
|
|
5
|
-
list: HTMLElement;
|
|
6
|
-
delta: number;
|
|
7
|
-
scrollDelta: number;
|
|
8
|
-
isVertical: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Scroll event.
|
|
12
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/15.x/projects/ng-virtual-list/src/lib/utils/scrollEvent.ts
|
|
13
|
-
* @author Evgenii Grebennikov
|
|
14
|
-
* @email djonnyx@gmail.com
|
|
15
|
-
*/
|
|
16
|
-
export declare class ScrollEvent implements IScrollEvent {
|
|
17
|
-
private _direction;
|
|
18
|
-
get direction(): ScrollDirection;
|
|
19
|
-
private _scrollSize;
|
|
20
|
-
get scrollSize(): number;
|
|
21
|
-
private _scrollWeight;
|
|
22
|
-
get scrollWeight(): number;
|
|
23
|
-
private _isVertical;
|
|
24
|
-
get isVertical(): boolean;
|
|
25
|
-
private _listSize;
|
|
26
|
-
get listSize(): number;
|
|
27
|
-
private _size;
|
|
28
|
-
get size(): number;
|
|
29
|
-
private _isStart;
|
|
30
|
-
get isStart(): boolean;
|
|
31
|
-
private _isEnd;
|
|
32
|
-
get isEnd(): boolean;
|
|
33
|
-
private _delta;
|
|
34
|
-
get delta(): number;
|
|
35
|
-
private _scrollDelta;
|
|
36
|
-
get scrollDelta(): number;
|
|
37
|
-
constructor(params: IScrollEventParams);
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Switch css classes
|
|
3
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/15.x/projects/ng-virtual-list/src/lib/utils/toggleClassName.ts
|
|
4
|
-
* @author Evgenii Grebennikov
|
|
5
|
-
* @email djonnyx@gmail.com
|
|
6
|
-
*/
|
|
7
|
-
export declare const toggleClassName: (el: HTMLElement, className: string, removeClassName?: string) => void;
|
package/lib/utils/trackBox.d.ts
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { ComponentRef } from "@angular/core";
|
|
2
|
-
import { IRenderVirtualListCollection } from "../models/render-collection.model";
|
|
3
|
-
import { Id } from "../types/id";
|
|
4
|
-
import { CacheMap, CMap } from "./cacheMap";
|
|
5
|
-
import { Tracker } from "./tracker";
|
|
6
|
-
import { ISize } from "../types";
|
|
7
|
-
import { HEIGHT_PROP_NAME, WIDTH_PROP_NAME } from "../const";
|
|
8
|
-
import { BaseVirtualListItemComponent, IVirtualListStickyMap } from "../models";
|
|
9
|
-
export declare const TRACK_BOX_CHANGE_EVENT_NAME = "change";
|
|
10
|
-
export interface IMetrics {
|
|
11
|
-
delta: number;
|
|
12
|
-
normalizedItemWidth: number;
|
|
13
|
-
normalizedItemHeight: number;
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
dynamicSize: boolean;
|
|
17
|
-
itemSize: number;
|
|
18
|
-
itemsFromStartToScrollEnd: number;
|
|
19
|
-
itemsFromStartToDisplayEnd: number;
|
|
20
|
-
itemsOnDisplayWeight: number;
|
|
21
|
-
itemsOnDisplayLength: number;
|
|
22
|
-
isVertical: boolean;
|
|
23
|
-
leftHiddenItemsWeight: number;
|
|
24
|
-
leftItemLength: number;
|
|
25
|
-
leftItemsWeight: number;
|
|
26
|
-
renderItems: number;
|
|
27
|
-
rightItemLength: number;
|
|
28
|
-
rightItemsWeight: number;
|
|
29
|
-
scrollSize: number;
|
|
30
|
-
leftSizeOfAddedItems: number;
|
|
31
|
-
sizeProperty: typeof HEIGHT_PROP_NAME | typeof WIDTH_PROP_NAME;
|
|
32
|
-
snap: boolean;
|
|
33
|
-
snippedPos: number;
|
|
34
|
-
startIndex: number;
|
|
35
|
-
startPosition: number;
|
|
36
|
-
totalItemsToDisplayEndWeight: number;
|
|
37
|
-
totalLength: number;
|
|
38
|
-
totalSize: number;
|
|
39
|
-
typicalItemSize: number;
|
|
40
|
-
isFromItemIdFound: boolean;
|
|
41
|
-
}
|
|
42
|
-
export interface IRecalculateMetricsOptions<I extends {
|
|
43
|
-
id: Id;
|
|
44
|
-
}, C extends Array<I>> {
|
|
45
|
-
bounds: ISize;
|
|
46
|
-
collection: C;
|
|
47
|
-
isVertical: boolean;
|
|
48
|
-
itemSize: number;
|
|
49
|
-
bufferSize: number;
|
|
50
|
-
maxBufferSize: number;
|
|
51
|
-
dynamicSize: boolean;
|
|
52
|
-
scrollSize: number;
|
|
53
|
-
snap: boolean;
|
|
54
|
-
enabledBufferOptimization: boolean;
|
|
55
|
-
fromItemId?: Id;
|
|
56
|
-
previousTotalSize: number;
|
|
57
|
-
crudDetected: boolean;
|
|
58
|
-
deletedItemsMap: {
|
|
59
|
-
[index: number]: ISize;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
export interface IGetItemPositionOptions<I extends {
|
|
63
|
-
id: Id;
|
|
64
|
-
}, C extends Array<I>> extends Omit<IRecalculateMetricsOptions<I, C>, 'previousTotalSize' | 'crudDetected' | 'deletedItemsMap'> {
|
|
65
|
-
}
|
|
66
|
-
export interface IUpdateCollectionOptions<I extends {
|
|
67
|
-
id: Id;
|
|
68
|
-
}, C extends Array<I>> extends Omit<IRecalculateMetricsOptions<I, C>, 'collection' | 'previousTotalSize' | 'crudDetected' | 'deletedItemsMap'> {
|
|
69
|
-
}
|
|
70
|
-
export type CacheMapEvents = typeof TRACK_BOX_CHANGE_EVENT_NAME;
|
|
71
|
-
export type OnChangeEventListener = (version: number) => void;
|
|
72
|
-
export type CacheMapListeners = OnChangeEventListener;
|
|
73
|
-
export declare enum ItemDisplayMethods {
|
|
74
|
-
CREATE = 0,
|
|
75
|
-
UPDATE = 1,
|
|
76
|
-
DELETE = 2,
|
|
77
|
-
NOT_CHANGED = 3
|
|
78
|
-
}
|
|
79
|
-
export interface IUpdateCollectionReturns {
|
|
80
|
-
displayItems: IRenderVirtualListCollection;
|
|
81
|
-
totalSize: number;
|
|
82
|
-
delta: number;
|
|
83
|
-
crudDetected: boolean;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* An object that performs tracking, calculations and caching.
|
|
87
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/15.x/projects/ng-virtual-list/src/lib/utils/trackBox.ts
|
|
88
|
-
* @author Evgenii Grebennikov
|
|
89
|
-
* @email djonnyx@gmail.com
|
|
90
|
-
*/
|
|
91
|
-
export declare class TrackBox<C extends BaseVirtualListItemComponent = any> extends CacheMap<Id, ISize & {
|
|
92
|
-
method?: ItemDisplayMethods;
|
|
93
|
-
}, CacheMapEvents, CacheMapListeners> {
|
|
94
|
-
protected _tracker: Tracker<C>;
|
|
95
|
-
protected _items: IRenderVirtualListCollection | null | undefined;
|
|
96
|
-
set items(v: IRenderVirtualListCollection | null | undefined);
|
|
97
|
-
protected _displayComponents: Array<ComponentRef<C>> | null | undefined;
|
|
98
|
-
set displayComponents(v: Array<ComponentRef<C>> | null | undefined);
|
|
99
|
-
protected _snapedDisplayComponent: ComponentRef<C> | null | undefined;
|
|
100
|
-
set snapedDisplayComponent(v: ComponentRef<C> | null | undefined);
|
|
101
|
-
protected _isSnappingMethodAdvanced: boolean;
|
|
102
|
-
set isSnappingMethodAdvanced(v: boolean);
|
|
103
|
-
/**
|
|
104
|
-
* Set the trackBy property
|
|
105
|
-
*/
|
|
106
|
-
set trackingPropertyName(v: string);
|
|
107
|
-
constructor(trackingPropertyName: string);
|
|
108
|
-
set(id: Id, bounds: ISize): CMap<Id, ISize>;
|
|
109
|
-
protected _previousCollection: Array<{
|
|
110
|
-
id: Id;
|
|
111
|
-
}> | null | undefined;
|
|
112
|
-
protected _deletedItemsMap: {
|
|
113
|
-
[index: number]: ISize;
|
|
114
|
-
};
|
|
115
|
-
protected _crudDetected: boolean;
|
|
116
|
-
get crudDetected(): boolean;
|
|
117
|
-
protected fireChangeIfNeed(): void;
|
|
118
|
-
protected _previousTotalSize: number;
|
|
119
|
-
protected _scrollDelta: number;
|
|
120
|
-
get scrollDelta(): number;
|
|
121
|
-
isAdaptiveBuffer: boolean;
|
|
122
|
-
protected _bufferSequenceExtraThreshold: number;
|
|
123
|
-
protected _maxBufferSequenceLength: number;
|
|
124
|
-
protected _bufferSizeSequence: Array<number>;
|
|
125
|
-
protected _bufferSize: number;
|
|
126
|
-
get bufferSize(): number;
|
|
127
|
-
protected _defaultBufferSize: number;
|
|
128
|
-
protected _maxBufferSize: number;
|
|
129
|
-
protected _resetBufferSizeTimeout: number;
|
|
130
|
-
protected _resetBufferSizeTimer: number | undefined;
|
|
131
|
-
protected lifeCircle(): void;
|
|
132
|
-
/**
|
|
133
|
-
* Scans the collection for deleted items and flushes the deleted item cache.
|
|
134
|
-
*/
|
|
135
|
-
resetCollection<I extends {
|
|
136
|
-
id: Id;
|
|
137
|
-
}, C extends Array<I>>(currentCollection: C | null | undefined, itemSize: number): void;
|
|
138
|
-
/**
|
|
139
|
-
* Update the cache of items from the list
|
|
140
|
-
*/
|
|
141
|
-
protected updateCache<I extends {
|
|
142
|
-
id: Id;
|
|
143
|
-
}, C extends Array<I>>(previousCollection: C | null | undefined, currentCollection: C | null | undefined, itemSize: number): void;
|
|
144
|
-
/**
|
|
145
|
-
* Finds the position of a collection element by the given Id
|
|
146
|
-
*/
|
|
147
|
-
getItemPosition<I extends {
|
|
148
|
-
id: Id;
|
|
149
|
-
}, C extends Array<I>>(id: Id, stickyMap: IVirtualListStickyMap, options: IGetItemPositionOptions<I, C>): number;
|
|
150
|
-
/**
|
|
151
|
-
* Updates the collection of display objects
|
|
152
|
-
*/
|
|
153
|
-
updateCollection<I extends {
|
|
154
|
-
id: Id;
|
|
155
|
-
}, C extends Array<I>>(items: C, stickyMap: IVirtualListStickyMap, options: IUpdateCollectionOptions<I, C>): IUpdateCollectionReturns;
|
|
156
|
-
/**
|
|
157
|
-
* Finds the closest element in the collection by scrollSize
|
|
158
|
-
*/
|
|
159
|
-
getNearestItem<I extends {
|
|
160
|
-
id: Id;
|
|
161
|
-
}, C extends Array<I>>(scrollSize: number, items: C, itemSize: number, isVertical: boolean): I | undefined;
|
|
162
|
-
protected _previousScrollSize: number;
|
|
163
|
-
protected updateAdaptiveBufferParams(metrics: IMetrics, totalItemsLength: number): void;
|
|
164
|
-
protected startResetBufferSizeTimer(): void;
|
|
165
|
-
protected disposeClearBufferSizeTimer(): void;
|
|
166
|
-
/**
|
|
167
|
-
* Calculates the position of an element based on the given scrollSize
|
|
168
|
-
*/
|
|
169
|
-
protected getElementFromStart<I extends {
|
|
170
|
-
id: Id;
|
|
171
|
-
}, C extends Array<I>>(scrollSize: number, collection: C, map: CMap<Id, ISize>, typicalItemSize: number, isVertical: boolean): I | undefined;
|
|
172
|
-
/**
|
|
173
|
-
* Calculates the entry into the overscroll area and returns the number of overscroll elements
|
|
174
|
-
*/
|
|
175
|
-
protected getElementNumToEnd<I extends {
|
|
176
|
-
id: Id;
|
|
177
|
-
}, C extends Array<I>>(i: number, collection: C, map: CMap<Id, ISize>, typicalItemSize: number, size: number, isVertical: boolean, indexOffset?: number): {
|
|
178
|
-
num: number;
|
|
179
|
-
offset: number;
|
|
180
|
-
};
|
|
181
|
-
/**
|
|
182
|
-
* Calculates list metrics
|
|
183
|
-
*/
|
|
184
|
-
protected recalculateMetrics<I extends {
|
|
185
|
-
id: Id;
|
|
186
|
-
}, C extends Array<I>>(options: IRecalculateMetricsOptions<I, C>): IMetrics;
|
|
187
|
-
clearDeltaDirection(): void;
|
|
188
|
-
clearDelta(clearDirectionDetector?: boolean): void;
|
|
189
|
-
changes(): void;
|
|
190
|
-
protected generateDisplayCollection<I extends {
|
|
191
|
-
id: Id;
|
|
192
|
-
}, C extends Array<I>>(items: C, stickyMap: IVirtualListStickyMap, metrics: IMetrics): IRenderVirtualListCollection;
|
|
193
|
-
/**
|
|
194
|
-
* tracking by propName
|
|
195
|
-
*/
|
|
196
|
-
track(): void;
|
|
197
|
-
setDisplayObjectIndexMapById(v: {
|
|
198
|
-
[id: number]: number;
|
|
199
|
-
}): void;
|
|
200
|
-
untrackComponentByIdProperty(component?: C | undefined): void;
|
|
201
|
-
getItemBounds(id: Id): ISize | undefined;
|
|
202
|
-
protected cacheElements(): void;
|
|
203
|
-
dispose(): void;
|
|
204
|
-
}
|
package/lib/utils/tracker.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ComponentRef } from "@angular/core";
|
|
2
|
-
import { BaseVirtualListItemComponent, ScrollDirection } from "../models";
|
|
3
|
-
import { Id, ISize } from "../types";
|
|
4
|
-
export interface IVirtualListItemComponent<I = any> {
|
|
5
|
-
getBounds(): ISize;
|
|
6
|
-
itemId: Id;
|
|
7
|
-
id: number;
|
|
8
|
-
item: I | null;
|
|
9
|
-
show: () => void;
|
|
10
|
-
hide: () => void;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Tracks display items by property
|
|
14
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/15.x/projects/ng-virtual-list/src/lib/utils/tracker.ts
|
|
15
|
-
* @author Evgenii Grebennikov
|
|
16
|
-
* @email djonnyx@gmail.com
|
|
17
|
-
*/
|
|
18
|
-
export declare class Tracker<C extends BaseVirtualListItemComponent = any> {
|
|
19
|
-
/**
|
|
20
|
-
* display objects dictionary of indexes by id
|
|
21
|
-
*/
|
|
22
|
-
private _displayObjectIndexMapById;
|
|
23
|
-
set displayObjectIndexMapById(v: {
|
|
24
|
-
[id: number]: number;
|
|
25
|
-
});
|
|
26
|
-
get displayObjectIndexMapById(): {
|
|
27
|
-
[id: number]: number;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Dictionary displayItems propertyNameId by items propertyNameId
|
|
31
|
-
*/
|
|
32
|
-
private _trackMap;
|
|
33
|
-
get trackMap(): {
|
|
34
|
-
[id: string]: number;
|
|
35
|
-
[id: number]: number;
|
|
36
|
-
} | null;
|
|
37
|
-
private _trackingPropertyName;
|
|
38
|
-
set trackingPropertyName(v: string);
|
|
39
|
-
constructor(trackingPropertyName: string);
|
|
40
|
-
/**
|
|
41
|
-
* tracking by propName
|
|
42
|
-
*/
|
|
43
|
-
track(items: Array<any>, components: Array<ComponentRef<C>>, snapedComponent: ComponentRef<C> | null | undefined, direction: ScrollDirection): void;
|
|
44
|
-
untrackComponentByIdProperty(component?: C): void;
|
|
45
|
-
dispose(): void;
|
|
46
|
-
}
|
package/public-api.d.ts
DELETED