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/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ng_virtual_list from 'ng-virtual-list';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { WritableSignal, TemplateRef,
|
|
3
|
+
import { WritableSignal, TemplateRef, AfterViewInit, OnInit, OnDestroy } from '@angular/core';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -131,6 +131,60 @@ interface IRenderVirtualListItem {
|
|
|
131
131
|
config: IRenderVirtualListItemConfig;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Virtual List Item Interface
|
|
136
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/base-virtual-list-item-component.ts
|
|
137
|
+
* @author Evgenii Grebennikov
|
|
138
|
+
* @email djonnyx@gmail.com
|
|
139
|
+
*/
|
|
140
|
+
declare abstract class BaseVirtualListItemComponent {
|
|
141
|
+
abstract get id(): number;
|
|
142
|
+
abstract data: WritableSignal<IRenderVirtualListItem | undefined>;
|
|
143
|
+
abstract regular: boolean;
|
|
144
|
+
abstract set regularLength(v: string);
|
|
145
|
+
abstract set item(v: IRenderVirtualListItem | null | undefined);
|
|
146
|
+
abstract get item(): IRenderVirtualListItem | null | undefined;
|
|
147
|
+
abstract get itemId(): Id | undefined;
|
|
148
|
+
abstract itemRenderer: WritableSignal<TemplateRef<any> | undefined>;
|
|
149
|
+
abstract set renderer(v: TemplateRef<any> | undefined);
|
|
150
|
+
abstract get element(): HTMLElement;
|
|
151
|
+
abstract getBounds(): ISize;
|
|
152
|
+
abstract show(): void;
|
|
153
|
+
abstract hide(): void;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Virtual list item component
|
|
158
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/components/ng-virtual-list-item.component.ts
|
|
159
|
+
* @author Evgenii Grebennikov
|
|
160
|
+
* @email djonnyx@gmail.com
|
|
161
|
+
*/
|
|
162
|
+
declare class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
163
|
+
private static __nextId;
|
|
164
|
+
private _id;
|
|
165
|
+
get id(): number;
|
|
166
|
+
regular: boolean;
|
|
167
|
+
data: _angular_core.WritableSignal<IRenderVirtualListItem | undefined>;
|
|
168
|
+
private _data;
|
|
169
|
+
set item(v: IRenderVirtualListItem | undefined);
|
|
170
|
+
private _regularLength;
|
|
171
|
+
set regularLength(v: string);
|
|
172
|
+
get item(): IRenderVirtualListItem | undefined;
|
|
173
|
+
get itemId(): ng_virtual_list.Id | undefined;
|
|
174
|
+
itemRenderer: _angular_core.WritableSignal<TemplateRef<any> | undefined>;
|
|
175
|
+
set renderer(v: TemplateRef<any> | undefined);
|
|
176
|
+
private _elementRef;
|
|
177
|
+
get element(): HTMLElement;
|
|
178
|
+
private _listItemRef;
|
|
179
|
+
constructor();
|
|
180
|
+
private update;
|
|
181
|
+
getBounds(): ISize;
|
|
182
|
+
show(): void;
|
|
183
|
+
hide(): void;
|
|
184
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgVirtualListItemComponent, never>;
|
|
185
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgVirtualListItemComponent, "ng-virtual-list-item", never, {}, {}, never, never, true, never>;
|
|
186
|
+
}
|
|
187
|
+
|
|
134
188
|
/**
|
|
135
189
|
* A value of -1 indicates the direction is up or left (if the list direction is horizontal).
|
|
136
190
|
* A value of 1 indicates the direction is down or right (if the list direction is horizontal).
|
|
@@ -211,73 +265,6 @@ interface IVirtualListStickyMap {
|
|
|
211
265
|
interface IVirtualListCollection<E = Object> extends Array<IVirtualListItem<E>> {
|
|
212
266
|
}
|
|
213
267
|
|
|
214
|
-
/**
|
|
215
|
-
* Virtual List Item Interface
|
|
216
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/models/-basevirtual-list-item-component.ts
|
|
217
|
-
* @author Evgenii Grebennikov
|
|
218
|
-
* @email djonnyx@gmail.com
|
|
219
|
-
*/
|
|
220
|
-
declare abstract class BaseVirtualListItemComponent {
|
|
221
|
-
abstract get id(): number;
|
|
222
|
-
abstract data: WritableSignal<IRenderVirtualListItem | undefined>;
|
|
223
|
-
abstract regular: boolean;
|
|
224
|
-
abstract set regularLength(v: string);
|
|
225
|
-
abstract set item(v: IRenderVirtualListItem | null | undefined);
|
|
226
|
-
abstract get item(): IRenderVirtualListItem | null | undefined;
|
|
227
|
-
abstract get itemId(): Id | undefined;
|
|
228
|
-
abstract itemRenderer: WritableSignal<TemplateRef<any> | undefined>;
|
|
229
|
-
abstract set renderer(v: TemplateRef<any> | undefined);
|
|
230
|
-
abstract get element(): HTMLElement;
|
|
231
|
-
protected abstract update(): void;
|
|
232
|
-
abstract getBounds(): ISize;
|
|
233
|
-
abstract show(): void;
|
|
234
|
-
abstract hide(): void;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
interface Component$1<T> extends Function {
|
|
238
|
-
new (...args: any[]): T;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Virtual list item component
|
|
243
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/components/ng-virtual-list-item.component.ts
|
|
244
|
-
* @author Evgenii Grebennikov
|
|
245
|
-
* @email djonnyx@gmail.com
|
|
246
|
-
*/
|
|
247
|
-
declare class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
248
|
-
protected static __nextId: number;
|
|
249
|
-
protected _id: number;
|
|
250
|
-
get id(): number;
|
|
251
|
-
regular: boolean;
|
|
252
|
-
data: _angular_core.WritableSignal<IRenderVirtualListItem | undefined>;
|
|
253
|
-
protected _data: IRenderVirtualListItem | undefined;
|
|
254
|
-
set item(v: IRenderVirtualListItem | undefined);
|
|
255
|
-
protected _regularLength: string;
|
|
256
|
-
set regularLength(v: string);
|
|
257
|
-
get item(): IRenderVirtualListItem | undefined;
|
|
258
|
-
get itemId(): ng_virtual_list.Id | undefined;
|
|
259
|
-
itemRenderer: _angular_core.WritableSignal<TemplateRef<any> | undefined>;
|
|
260
|
-
set renderer(v: TemplateRef<any> | undefined);
|
|
261
|
-
protected _elementRef: ElementRef<HTMLElement>;
|
|
262
|
-
get element(): HTMLElement;
|
|
263
|
-
constructor();
|
|
264
|
-
protected update(): void;
|
|
265
|
-
getBounds(): ISize;
|
|
266
|
-
show(): void;
|
|
267
|
-
hide(): void;
|
|
268
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgVirtualListItemComponent, never>;
|
|
269
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgVirtualListItemComponent, "ng-virtual-list-item", never, {}, {}, never, never, true, never>;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* Virtual list screen elements collection interface
|
|
274
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/models/render-collection.model.ts
|
|
275
|
-
* @author Evgenii Grebennikov
|
|
276
|
-
* @email djonnyx@gmail.com
|
|
277
|
-
*/
|
|
278
|
-
interface IRenderVirtualListCollection extends Array<IRenderVirtualListItem> {
|
|
279
|
-
}
|
|
280
|
-
|
|
281
268
|
/**
|
|
282
269
|
* Axis of the arrangement of virtual list elements.
|
|
283
270
|
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/enums/directions.ts
|
|
@@ -330,341 +317,6 @@ declare enum SnappingMethods {
|
|
|
330
317
|
*/
|
|
331
318
|
type SnappingMethod = SnappingMethods | 'normal' | 'advanced';
|
|
332
319
|
|
|
333
|
-
/**
|
|
334
|
-
* Tracks display items by property
|
|
335
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/utils/tracker.ts
|
|
336
|
-
* @author Evgenii Grebennikov
|
|
337
|
-
* @email djonnyx@gmail.com
|
|
338
|
-
*/
|
|
339
|
-
declare class Tracker<C extends BaseVirtualListItemComponent = any> {
|
|
340
|
-
/**
|
|
341
|
-
* display objects dictionary of indexes by id
|
|
342
|
-
*/
|
|
343
|
-
private _displayObjectIndexMapById;
|
|
344
|
-
set displayObjectIndexMapById(v: {
|
|
345
|
-
[id: number]: number;
|
|
346
|
-
});
|
|
347
|
-
get displayObjectIndexMapById(): {
|
|
348
|
-
[id: number]: number;
|
|
349
|
-
};
|
|
350
|
-
/**
|
|
351
|
-
* Dictionary displayItems propertyNameId by items propertyNameId
|
|
352
|
-
*/
|
|
353
|
-
private _trackMap;
|
|
354
|
-
get trackMap(): {
|
|
355
|
-
[id: string]: number;
|
|
356
|
-
[id: number]: number;
|
|
357
|
-
} | null;
|
|
358
|
-
private _trackingPropertyName;
|
|
359
|
-
set trackingPropertyName(v: string);
|
|
360
|
-
constructor(trackingPropertyName: string);
|
|
361
|
-
/**
|
|
362
|
-
* tracking by propName
|
|
363
|
-
*/
|
|
364
|
-
track(items: Array<any>, components: Array<ComponentRef<C>>, snapedComponent: ComponentRef<C> | null | undefined, direction: ScrollDirection): void;
|
|
365
|
-
untrackComponentByIdProperty(component?: C): void;
|
|
366
|
-
dispose(): void;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
type TEventHandler = (...args: Array<any>) => void;
|
|
370
|
-
/**
|
|
371
|
-
* Simple event emitter
|
|
372
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/utils/eventEmitter.ts
|
|
373
|
-
* @author Evgenii Grebennikov
|
|
374
|
-
* @email djonnyx@gmail.com
|
|
375
|
-
*/
|
|
376
|
-
declare class EventEmitter<E = string, H = TEventHandler> {
|
|
377
|
-
private _listeners;
|
|
378
|
-
protected _disposed: boolean;
|
|
379
|
-
constructor();
|
|
380
|
-
/**
|
|
381
|
-
* Emits the event
|
|
382
|
-
*/
|
|
383
|
-
dispatch(event: E, ...args: Array<any>): void;
|
|
384
|
-
/**
|
|
385
|
-
* Emits the event async
|
|
386
|
-
*/
|
|
387
|
-
dispatchAsync(event: E, ...args: Array<any>): void;
|
|
388
|
-
/**
|
|
389
|
-
* Returns true if the event listener is already subscribed.
|
|
390
|
-
*/
|
|
391
|
-
hasEventListener(eventName: E, handler: H): boolean;
|
|
392
|
-
/**
|
|
393
|
-
* Add event listener
|
|
394
|
-
*/
|
|
395
|
-
addEventListener(eventName: E, handler: H): void;
|
|
396
|
-
/**
|
|
397
|
-
* Remove event listener
|
|
398
|
-
*/
|
|
399
|
-
removeEventListener(eventName: E, handler: H): void;
|
|
400
|
-
/**
|
|
401
|
-
* Remove all listeners
|
|
402
|
-
*/
|
|
403
|
-
removeAllListeners(): void;
|
|
404
|
-
/**
|
|
405
|
-
* Method of destroying handlers
|
|
406
|
-
*/
|
|
407
|
-
dispose(): void;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
declare class CMap<K = string, V = any> {
|
|
411
|
-
private _dict;
|
|
412
|
-
constructor(dict?: CMap<K, V>);
|
|
413
|
-
get(key: K): V;
|
|
414
|
-
set(key: K, value: V): this;
|
|
415
|
-
has(key: K): boolean;
|
|
416
|
-
delete(key: K): void;
|
|
417
|
-
clear(): void;
|
|
418
|
-
}
|
|
419
|
-
interface ICacheMap<I = any, B = any> {
|
|
420
|
-
set: (id: I, bounds: B) => CMap<I, B>;
|
|
421
|
-
has: (id: I) => boolean;
|
|
422
|
-
get: (id: I) => B | undefined;
|
|
423
|
-
}
|
|
424
|
-
declare const CACHE_BOX_CHANGE_EVENT_NAME = "change";
|
|
425
|
-
type CacheMapEvents$1 = typeof CACHE_BOX_CHANGE_EVENT_NAME;
|
|
426
|
-
type OnChangeEventListener$1 = (version: number) => void;
|
|
427
|
-
type CacheMapListeners$1 = OnChangeEventListener$1;
|
|
428
|
-
/**
|
|
429
|
-
* Cache map.
|
|
430
|
-
* Emits a change event on each mutation.
|
|
431
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/utils/cacheMap.ts
|
|
432
|
-
* @author Evgenii Grebennikov
|
|
433
|
-
* @email djonnyx@gmail.com
|
|
434
|
-
*/
|
|
435
|
-
declare class CacheMap<I = string | number, B = any, E = CacheMapEvents$1, L = CacheMapListeners$1> extends EventEmitter<E, L> implements ICacheMap {
|
|
436
|
-
protected _map: CMap<I, B>;
|
|
437
|
-
protected _snapshot: CMap<I, B>;
|
|
438
|
-
protected _version: number;
|
|
439
|
-
protected _previousVersion: number;
|
|
440
|
-
protected _lifeCircleTimeout: any;
|
|
441
|
-
protected _delta: number;
|
|
442
|
-
get delta(): number;
|
|
443
|
-
protected _deltaDirection: ScrollDirection;
|
|
444
|
-
set deltaDirection(v: ScrollDirection);
|
|
445
|
-
get deltaDirection(): ScrollDirection;
|
|
446
|
-
private _scrollDirectionCache;
|
|
447
|
-
private _scrollDirection;
|
|
448
|
-
get scrollDirection(): ScrollDirection;
|
|
449
|
-
get version(): number;
|
|
450
|
-
private _clearScrollDirectionDebounce;
|
|
451
|
-
constructor();
|
|
452
|
-
protected changesDetected(): boolean;
|
|
453
|
-
protected stopLifeCircle(): void;
|
|
454
|
-
protected nextTick(cb: () => void): any;
|
|
455
|
-
protected lifeCircle(): void;
|
|
456
|
-
protected lifeCircleDo(): void;
|
|
457
|
-
clearScrollDirectionCache(): void;
|
|
458
|
-
private calcScrollDirection;
|
|
459
|
-
protected bumpVersion(): void;
|
|
460
|
-
protected fireChangeIfNeed(): void;
|
|
461
|
-
set(id: I, bounds: B): CMap<I, B>;
|
|
462
|
-
has(id: I): boolean;
|
|
463
|
-
get(id: I): B | undefined;
|
|
464
|
-
snapshot(): void;
|
|
465
|
-
dispose(): void;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
declare const WIDTH_PROP_NAME = "width";
|
|
469
|
-
declare const HEIGHT_PROP_NAME = "height";
|
|
470
|
-
|
|
471
|
-
declare const TRACK_BOX_CHANGE_EVENT_NAME = "change";
|
|
472
|
-
interface IMetrics {
|
|
473
|
-
delta: number;
|
|
474
|
-
normalizedItemWidth: number;
|
|
475
|
-
normalizedItemHeight: number;
|
|
476
|
-
width: number;
|
|
477
|
-
height: number;
|
|
478
|
-
dynamicSize: boolean;
|
|
479
|
-
itemSize: number;
|
|
480
|
-
itemsFromStartToScrollEnd: number;
|
|
481
|
-
itemsFromStartToDisplayEnd: number;
|
|
482
|
-
itemsOnDisplayWeight: number;
|
|
483
|
-
itemsOnDisplayLength: number;
|
|
484
|
-
isVertical: boolean;
|
|
485
|
-
leftHiddenItemsWeight: number;
|
|
486
|
-
leftItemLength: number;
|
|
487
|
-
leftItemsWeight: number;
|
|
488
|
-
renderItems: number;
|
|
489
|
-
rightItemLength: number;
|
|
490
|
-
rightItemsWeight: number;
|
|
491
|
-
scrollSize: number;
|
|
492
|
-
leftSizeOfAddedItems: number;
|
|
493
|
-
sizeProperty: typeof HEIGHT_PROP_NAME | typeof WIDTH_PROP_NAME;
|
|
494
|
-
snap: boolean;
|
|
495
|
-
snippedPos: number;
|
|
496
|
-
startIndex: number;
|
|
497
|
-
startPosition: number;
|
|
498
|
-
totalItemsToDisplayEndWeight: number;
|
|
499
|
-
totalLength: number;
|
|
500
|
-
totalSize: number;
|
|
501
|
-
typicalItemSize: number;
|
|
502
|
-
isFromItemIdFound: boolean;
|
|
503
|
-
}
|
|
504
|
-
interface IRecalculateMetricsOptions<I extends {
|
|
505
|
-
id: Id;
|
|
506
|
-
}, C extends Array<I>> {
|
|
507
|
-
bounds: ISize;
|
|
508
|
-
collection: C;
|
|
509
|
-
isVertical: boolean;
|
|
510
|
-
itemSize: number;
|
|
511
|
-
bufferSize: number;
|
|
512
|
-
maxBufferSize: number;
|
|
513
|
-
dynamicSize: boolean;
|
|
514
|
-
scrollSize: number;
|
|
515
|
-
snap: boolean;
|
|
516
|
-
enabledBufferOptimization: boolean;
|
|
517
|
-
fromItemId?: Id;
|
|
518
|
-
previousTotalSize: number;
|
|
519
|
-
crudDetected: boolean;
|
|
520
|
-
deletedItemsMap: {
|
|
521
|
-
[index: number]: ISize;
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
interface IGetItemPositionOptions<I extends {
|
|
525
|
-
id: Id;
|
|
526
|
-
}, C extends Array<I>> extends Omit<IRecalculateMetricsOptions<I, C>, 'previousTotalSize' | 'crudDetected' | 'deletedItemsMap'> {
|
|
527
|
-
}
|
|
528
|
-
interface IUpdateCollectionOptions<I extends {
|
|
529
|
-
id: Id;
|
|
530
|
-
}, C extends Array<I>> extends Omit<IRecalculateMetricsOptions<I, C>, 'collection' | 'previousTotalSize' | 'crudDetected' | 'deletedItemsMap'> {
|
|
531
|
-
}
|
|
532
|
-
type CacheMapEvents = typeof TRACK_BOX_CHANGE_EVENT_NAME;
|
|
533
|
-
type OnChangeEventListener = (version: number) => void;
|
|
534
|
-
type CacheMapListeners = OnChangeEventListener;
|
|
535
|
-
declare enum ItemDisplayMethods {
|
|
536
|
-
CREATE = 0,
|
|
537
|
-
UPDATE = 1,
|
|
538
|
-
DELETE = 2,
|
|
539
|
-
NOT_CHANGED = 3
|
|
540
|
-
}
|
|
541
|
-
interface IUpdateCollectionReturns {
|
|
542
|
-
displayItems: IRenderVirtualListCollection;
|
|
543
|
-
totalSize: number;
|
|
544
|
-
delta: number;
|
|
545
|
-
crudDetected: boolean;
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* An object that performs tracking, calculations and caching.
|
|
549
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/utils/trackBox.ts
|
|
550
|
-
* @author Evgenii Grebennikov
|
|
551
|
-
* @email djonnyx@gmail.com
|
|
552
|
-
*/
|
|
553
|
-
declare class TrackBox<C extends BaseVirtualListItemComponent = any> extends CacheMap<Id, ISize & {
|
|
554
|
-
method?: ItemDisplayMethods;
|
|
555
|
-
}, CacheMapEvents, CacheMapListeners> {
|
|
556
|
-
protected _tracker: Tracker<C>;
|
|
557
|
-
protected _items: IRenderVirtualListCollection | null | undefined;
|
|
558
|
-
set items(v: IRenderVirtualListCollection | null | undefined);
|
|
559
|
-
protected _displayComponents: Array<ComponentRef<C>> | null | undefined;
|
|
560
|
-
set displayComponents(v: Array<ComponentRef<C>> | null | undefined);
|
|
561
|
-
protected _snapedDisplayComponent: ComponentRef<C> | null | undefined;
|
|
562
|
-
set snapedDisplayComponent(v: ComponentRef<C> | null | undefined);
|
|
563
|
-
protected _isSnappingMethodAdvanced: boolean;
|
|
564
|
-
set isSnappingMethodAdvanced(v: boolean);
|
|
565
|
-
/**
|
|
566
|
-
* Set the trackBy property
|
|
567
|
-
*/
|
|
568
|
-
set trackingPropertyName(v: string);
|
|
569
|
-
constructor(trackingPropertyName: string);
|
|
570
|
-
set(id: Id, bounds: ISize): CMap<Id, ISize>;
|
|
571
|
-
protected _previousCollection: Array<{
|
|
572
|
-
id: Id;
|
|
573
|
-
}> | null | undefined;
|
|
574
|
-
protected _deletedItemsMap: {
|
|
575
|
-
[index: number]: ISize;
|
|
576
|
-
};
|
|
577
|
-
protected _crudDetected: boolean;
|
|
578
|
-
get crudDetected(): boolean;
|
|
579
|
-
protected fireChangeIfNeed(): void;
|
|
580
|
-
protected _previousTotalSize: number;
|
|
581
|
-
protected _scrollDelta: number;
|
|
582
|
-
get scrollDelta(): number;
|
|
583
|
-
isAdaptiveBuffer: boolean;
|
|
584
|
-
protected _bufferSequenceExtraThreshold: number;
|
|
585
|
-
protected _maxBufferSequenceLength: number;
|
|
586
|
-
protected _bufferSizeSequence: Array<number>;
|
|
587
|
-
protected _bufferSize: number;
|
|
588
|
-
get bufferSize(): number;
|
|
589
|
-
protected _defaultBufferSize: number;
|
|
590
|
-
protected _maxBufferSize: number;
|
|
591
|
-
protected _resetBufferSizeTimeout: number;
|
|
592
|
-
protected _resetBufferSizeTimer: number | undefined;
|
|
593
|
-
protected lifeCircle(): void;
|
|
594
|
-
/**
|
|
595
|
-
* Scans the collection for deleted items and flushes the deleted item cache.
|
|
596
|
-
*/
|
|
597
|
-
resetCollection<I extends {
|
|
598
|
-
id: Id;
|
|
599
|
-
}, C extends Array<I>>(currentCollection: C | null | undefined, itemSize: number): void;
|
|
600
|
-
/**
|
|
601
|
-
* Update the cache of items from the list
|
|
602
|
-
*/
|
|
603
|
-
protected updateCache<I extends {
|
|
604
|
-
id: Id;
|
|
605
|
-
}, C extends Array<I>>(previousCollection: C | null | undefined, currentCollection: C | null | undefined, itemSize: number): void;
|
|
606
|
-
/**
|
|
607
|
-
* Finds the position of a collection element by the given Id
|
|
608
|
-
*/
|
|
609
|
-
getItemPosition<I extends {
|
|
610
|
-
id: Id;
|
|
611
|
-
}, C extends Array<I>>(id: Id, stickyMap: IVirtualListStickyMap, options: IGetItemPositionOptions<I, C>): number;
|
|
612
|
-
/**
|
|
613
|
-
* Updates the collection of display objects
|
|
614
|
-
*/
|
|
615
|
-
updateCollection<I extends {
|
|
616
|
-
id: Id;
|
|
617
|
-
}, C extends Array<I>>(items: C, stickyMap: IVirtualListStickyMap, options: IUpdateCollectionOptions<I, C>): IUpdateCollectionReturns;
|
|
618
|
-
/**
|
|
619
|
-
* Finds the closest element in the collection by scrollSize
|
|
620
|
-
*/
|
|
621
|
-
getNearestItem<I extends {
|
|
622
|
-
id: Id;
|
|
623
|
-
}, C extends Array<I>>(scrollSize: number, items: C, itemSize: number, isVertical: boolean): I | undefined;
|
|
624
|
-
protected _previousScrollSize: number;
|
|
625
|
-
protected updateAdaptiveBufferParams(metrics: IMetrics, totalItemsLength: number): void;
|
|
626
|
-
protected startResetBufferSizeTimer(): void;
|
|
627
|
-
protected disposeClearBufferSizeTimer(): void;
|
|
628
|
-
/**
|
|
629
|
-
* Calculates the position of an element based on the given scrollSize
|
|
630
|
-
*/
|
|
631
|
-
protected getElementFromStart<I extends {
|
|
632
|
-
id: Id;
|
|
633
|
-
}, C extends Array<I>>(scrollSize: number, collection: C, map: CMap<Id, ISize>, typicalItemSize: number, isVertical: boolean): I | undefined;
|
|
634
|
-
/**
|
|
635
|
-
* Calculates the entry into the overscroll area and returns the number of overscroll elements
|
|
636
|
-
*/
|
|
637
|
-
protected getElementNumToEnd<I extends {
|
|
638
|
-
id: Id;
|
|
639
|
-
}, C extends Array<I>>(i: number, collection: C, map: CMap<Id, ISize>, typicalItemSize: number, size: number, isVertical: boolean, indexOffset?: number): {
|
|
640
|
-
num: number;
|
|
641
|
-
offset: number;
|
|
642
|
-
};
|
|
643
|
-
/**
|
|
644
|
-
* Calculates list metrics
|
|
645
|
-
*/
|
|
646
|
-
protected recalculateMetrics<I extends {
|
|
647
|
-
id: Id;
|
|
648
|
-
}, C extends Array<I>>(options: IRecalculateMetricsOptions<I, C>): IMetrics;
|
|
649
|
-
clearDeltaDirection(): void;
|
|
650
|
-
clearDelta(clearDirectionDetector?: boolean): void;
|
|
651
|
-
changes(): void;
|
|
652
|
-
protected generateDisplayCollection<I extends {
|
|
653
|
-
id: Id;
|
|
654
|
-
}, C extends Array<I>>(items: C, stickyMap: IVirtualListStickyMap, metrics: IMetrics): IRenderVirtualListCollection;
|
|
655
|
-
/**
|
|
656
|
-
* tracking by propName
|
|
657
|
-
*/
|
|
658
|
-
track(): void;
|
|
659
|
-
setDisplayObjectIndexMapById(v: {
|
|
660
|
-
[id: number]: number;
|
|
661
|
-
}): void;
|
|
662
|
-
untrackComponentByIdProperty(component?: C | undefined): void;
|
|
663
|
-
getItemBounds(id: Id): ISize | undefined;
|
|
664
|
-
protected cacheElements(): void;
|
|
665
|
-
dispose(): void;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
320
|
/**
|
|
669
321
|
* Virtual list component.
|
|
670
322
|
* Maximum performance for extremely large lists.
|
|
@@ -674,17 +326,17 @@ declare class TrackBox<C extends BaseVirtualListItemComponent = any> extends Cac
|
|
|
674
326
|
* @email djonnyx@gmail.com
|
|
675
327
|
*/
|
|
676
328
|
declare class NgVirtualListComponent implements AfterViewInit, OnInit, OnDestroy {
|
|
677
|
-
|
|
678
|
-
|
|
329
|
+
private static __nextId;
|
|
330
|
+
private _id;
|
|
679
331
|
/**
|
|
680
332
|
* Readonly. Returns the unique identifier of the component.
|
|
681
333
|
*/
|
|
682
334
|
get id(): number;
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
335
|
+
private _listContainerRef;
|
|
336
|
+
private _snapContainerRef;
|
|
337
|
+
private _snappedContainer;
|
|
338
|
+
private _container;
|
|
339
|
+
private _list;
|
|
688
340
|
/**
|
|
689
341
|
* Fires when the list has been scrolled.
|
|
690
342
|
*/
|
|
@@ -693,7 +345,7 @@ declare class NgVirtualListComponent implements AfterViewInit, OnInit, OnDestroy
|
|
|
693
345
|
* Fires when the list has completed scrolling.
|
|
694
346
|
*/
|
|
695
347
|
onScrollEnd: _angular_core.OutputEmitterRef<IScrollEvent>;
|
|
696
|
-
|
|
348
|
+
private _itemsOptions;
|
|
697
349
|
/**
|
|
698
350
|
* Collection of list items.
|
|
699
351
|
*/
|
|
@@ -713,13 +365,13 @@ declare class NgVirtualListComponent implements AfterViewInit, OnInit, OnDestroy
|
|
|
713
365
|
* Rendering element template.
|
|
714
366
|
*/
|
|
715
367
|
itemRenderer: _angular_core.InputSignal<TemplateRef<any>>;
|
|
716
|
-
|
|
368
|
+
private _itemRenderer;
|
|
717
369
|
/**
|
|
718
370
|
* Dictionary zIndex by id of the list element. If the value is not set or equal to 0,
|
|
719
371
|
* then a simple element is displayed, if the value is greater than 0, then the sticky position mode is enabled for the element.
|
|
720
372
|
*/
|
|
721
373
|
stickyMap: _angular_core.InputSignal<IVirtualListStickyMap>;
|
|
722
|
-
|
|
374
|
+
private _itemSizeOptions;
|
|
723
375
|
/**
|
|
724
376
|
* If direction = 'vertical', then the height of a typical element. If direction = 'horizontal', then the width of a typical element.
|
|
725
377
|
* Ignored if the dynamicSize property is true.
|
|
@@ -757,21 +409,21 @@ declare class NgVirtualListComponent implements AfterViewInit, OnInit, OnDestroy
|
|
|
757
409
|
* 'advanced' - The group is rendered on a transparent background. List items below the group are not rendered.
|
|
758
410
|
*/
|
|
759
411
|
snappingMethod: _angular_core.InputSignal<SnappingMethod>;
|
|
760
|
-
|
|
412
|
+
private _isSnappingMethodAdvanced;
|
|
761
413
|
get isSnappingMethodAdvanced(): boolean;
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
414
|
+
private _isVertical;
|
|
415
|
+
private _displayComponents;
|
|
416
|
+
private _snapedDisplayComponent;
|
|
417
|
+
private _bounds;
|
|
418
|
+
private _scrollSize;
|
|
419
|
+
private _resizeObserver;
|
|
420
|
+
private _resizeSnappedComponentHandler;
|
|
421
|
+
private _resizeSnappedObserver;
|
|
422
|
+
private _componentsResizeObserver;
|
|
423
|
+
private _onResizeHandler;
|
|
424
|
+
private _onScrollHandler;
|
|
425
|
+
private _elementRef;
|
|
426
|
+
private _initialized;
|
|
775
427
|
readonly $initialized: Observable<boolean>;
|
|
776
428
|
/**
|
|
777
429
|
* The name of the property by which tracking is performed
|
|
@@ -780,31 +432,30 @@ declare class NgVirtualListComponent implements AfterViewInit, OnInit, OnDestroy
|
|
|
780
432
|
/**
|
|
781
433
|
* Base class of the element component
|
|
782
434
|
*/
|
|
783
|
-
|
|
435
|
+
private _itemComponentClass;
|
|
784
436
|
/**
|
|
785
437
|
* Base class trackBox
|
|
786
438
|
*/
|
|
787
|
-
|
|
439
|
+
private _trackBoxClass;
|
|
788
440
|
/**
|
|
789
441
|
* Dictionary of element sizes by their id
|
|
790
442
|
*/
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
443
|
+
private _trackBox;
|
|
444
|
+
private _onTrackBoxChangeHandler;
|
|
445
|
+
private _cacheVersion;
|
|
794
446
|
constructor();
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
protected resetRenderers(itemRenderer?: TemplateRef<HTMLElement>): void;
|
|
447
|
+
private onInit;
|
|
448
|
+
private listenCacheChangesIfNeed;
|
|
449
|
+
private getIsSnappingMethodAdvanced;
|
|
450
|
+
private getIsVertical;
|
|
451
|
+
private createDisplayComponentsIfNeed;
|
|
452
|
+
private updateRegularRenderer;
|
|
453
|
+
private resetRenderers;
|
|
803
454
|
/**
|
|
804
455
|
* Tracking by id
|
|
805
456
|
*/
|
|
806
|
-
|
|
807
|
-
|
|
457
|
+
private tracking;
|
|
458
|
+
private resetBoundsSize;
|
|
808
459
|
/**
|
|
809
460
|
* Returns the bounds of an element with a given id
|
|
810
461
|
*/
|
|
@@ -814,20 +465,119 @@ declare class NgVirtualListComponent implements AfterViewInit, OnInit, OnDestroy
|
|
|
814
465
|
* Behavior accepts the values "auto", "instant" and "smooth".
|
|
815
466
|
*/
|
|
816
467
|
scrollTo(id: Id, behavior?: ScrollBehavior): void;
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
468
|
+
private _scrollToRepeatExecutionTimeout;
|
|
469
|
+
private clearScrollToRepeatExecutionTimeout;
|
|
470
|
+
private scrollToExecutor;
|
|
820
471
|
/**
|
|
821
472
|
* Scrolls the scroll area to the desired element with the specified ID.
|
|
822
473
|
*/
|
|
823
474
|
scrollToEnd(behavior?: ScrollBehavior): void;
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
475
|
+
private _onContainerScrollHandler;
|
|
476
|
+
private _onContainerScrollEndHandler;
|
|
477
|
+
private afterViewInit;
|
|
478
|
+
private dispose;
|
|
828
479
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgVirtualListComponent, never>;
|
|
829
480
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgVirtualListComponent, "ng-virtual-list", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "snap": { "alias": "snap"; "required": false; "isSignal": true; }; "enabledBufferOptimization": { "alias": "enabledBufferOptimization"; "required": false; "isSignal": true; }; "itemRenderer": { "alias": "itemRenderer"; "required": true; "isSignal": true; }; "stickyMap": { "alias": "stickyMap"; "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; }; "itemsOffset": { "alias": "itemsOffset"; "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; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; }, { "onScroll": "onScroll"; "onScrollEnd": "onScrollEnd"; }, never, never, true, never>;
|
|
830
481
|
}
|
|
831
482
|
|
|
832
|
-
|
|
833
|
-
|
|
483
|
+
/**
|
|
484
|
+
* Simple debounce function.
|
|
485
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/utils/debounce.ts
|
|
486
|
+
* @author Evgenii Grebennikov
|
|
487
|
+
* @email djonnyx@gmail.com
|
|
488
|
+
*/
|
|
489
|
+
declare const debounce: (cb: (...args: Array<any>) => void, debounceTime?: number) => {
|
|
490
|
+
/**
|
|
491
|
+
* Call handling method
|
|
492
|
+
*/
|
|
493
|
+
execute: (...args: Array<any>) => void;
|
|
494
|
+
/**
|
|
495
|
+
* Method of destroying handlers
|
|
496
|
+
*/
|
|
497
|
+
dispose: () => void;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Switch css classes
|
|
502
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/utils/toggleClassName.ts
|
|
503
|
+
* @author Evgenii Grebennikov
|
|
504
|
+
* @email djonnyx@gmail.com
|
|
505
|
+
*/
|
|
506
|
+
declare const toggleClassName: (el: HTMLElement, className: string, removeClassName?: string) => void;
|
|
507
|
+
|
|
508
|
+
declare const WIDTH_PROP_NAME = "width";
|
|
509
|
+
declare const HEIGHT_PROP_NAME = "height";
|
|
510
|
+
|
|
511
|
+
interface IMetrics {
|
|
512
|
+
delta: number;
|
|
513
|
+
normalizedItemWidth: number;
|
|
514
|
+
normalizedItemHeight: number;
|
|
515
|
+
width: number;
|
|
516
|
+
height: number;
|
|
517
|
+
dynamicSize: boolean;
|
|
518
|
+
itemSize: number;
|
|
519
|
+
itemsFromStartToScrollEnd: number;
|
|
520
|
+
itemsFromStartToDisplayEnd: number;
|
|
521
|
+
itemsOnDisplayWeight: number;
|
|
522
|
+
itemsOnDisplayLength: number;
|
|
523
|
+
isVertical: boolean;
|
|
524
|
+
leftHiddenItemsWeight: number;
|
|
525
|
+
leftItemLength: number;
|
|
526
|
+
leftItemsWeight: number;
|
|
527
|
+
renderItems: number;
|
|
528
|
+
rightItemLength: number;
|
|
529
|
+
rightItemsWeight: number;
|
|
530
|
+
scrollSize: number;
|
|
531
|
+
leftSizeOfAddedItems: number;
|
|
532
|
+
sizeProperty: typeof HEIGHT_PROP_NAME | typeof WIDTH_PROP_NAME;
|
|
533
|
+
snap: boolean;
|
|
534
|
+
snippedPos: number;
|
|
535
|
+
startIndex: number;
|
|
536
|
+
startPosition: number;
|
|
537
|
+
totalItemsToDisplayEndWeight: number;
|
|
538
|
+
totalLength: number;
|
|
539
|
+
totalSize: number;
|
|
540
|
+
typicalItemSize: number;
|
|
541
|
+
isFromItemIdFound: boolean;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
interface IScrollEventParams {
|
|
545
|
+
direction: ScrollDirection;
|
|
546
|
+
container: HTMLElement;
|
|
547
|
+
list: HTMLElement;
|
|
548
|
+
delta: number;
|
|
549
|
+
scrollDelta: number;
|
|
550
|
+
isVertical: boolean;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Scroll event.
|
|
554
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/20.x/projects/ng-virtual-list/src/lib/utils/scrollEvent.ts
|
|
555
|
+
* @author Evgenii Grebennikov
|
|
556
|
+
* @email djonnyx@gmail.com
|
|
557
|
+
*/
|
|
558
|
+
declare class ScrollEvent implements IScrollEvent {
|
|
559
|
+
private _direction;
|
|
560
|
+
get direction(): ScrollDirection;
|
|
561
|
+
private _scrollSize;
|
|
562
|
+
get scrollSize(): number;
|
|
563
|
+
private _scrollWeight;
|
|
564
|
+
get scrollWeight(): number;
|
|
565
|
+
private _isVertical;
|
|
566
|
+
get isVertical(): boolean;
|
|
567
|
+
private _listSize;
|
|
568
|
+
get listSize(): number;
|
|
569
|
+
private _size;
|
|
570
|
+
get size(): number;
|
|
571
|
+
private _isStart;
|
|
572
|
+
get isStart(): boolean;
|
|
573
|
+
private _isEnd;
|
|
574
|
+
get isEnd(): boolean;
|
|
575
|
+
private _delta;
|
|
576
|
+
get delta(): number;
|
|
577
|
+
private _scrollDelta;
|
|
578
|
+
get scrollDelta(): number;
|
|
579
|
+
constructor(params: IScrollEventParams);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export { Directions, NgVirtualListComponent, NgVirtualListItemComponent, ScrollEvent, SnappingMethods, debounce, toggleClassName };
|
|
583
|
+
export type { Direction, IMetrics, IRect, IScrollEvent, ISize, IVirtualListCollection, IVirtualListItem, IVirtualListStickyMap, Id, ScrollDirection, SnappingMethod };
|