ng-virtual-list 18.9.2 → 18.9.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.
@@ -32,7 +32,6 @@ export declare class NgVirtualListItemComponent extends BaseVirtualListItemCompo
32
32
  config: import("@angular/core").WritableSignal<IDisplayObjectConfig>;
33
33
  measures: import("@angular/core").WritableSignal<IDisplayObjectMeasures | undefined>;
34
34
  focused: import("@angular/core").WritableSignal<boolean>;
35
- reseted: import("@angular/core").WritableSignal<boolean>;
36
35
  part: import("@angular/core").WritableSignal<string>;
37
36
  maxClickDistance: import("@angular/core").WritableSignal<number>;
38
37
  data: import("@angular/core").WritableSignal<IRenderVirtualListItem<any> | undefined>;
@@ -7,4 +7,6 @@ import { IRenderVirtualListItem } from './render-item.model';
7
7
  import { IDisplayObjectConfig } from './display-object-config.model';
8
8
  import { IDisplayObjectMeasures } from './display-object-measures.model';
9
9
  import { IScrollOptions } from './scroll-options.model';
10
- export type { IDisplayObjectConfig, IDisplayObjectMeasures, IScrollEvent, IVirtualListItem, IVirtualListItemConfigMap, IVirtualListItemConfig, IVirtualListCollection, IRenderVirtualListItem, ScrollDirection, IScrollOptions, };
10
+ import { IRenderVirtualListItemConfig } from './render-item-config.model';
11
+ import { IRenderVirtualListItemMeasures } from './render-item-measures.model';
12
+ export type { IDisplayObjectConfig, IDisplayObjectMeasures, IScrollEvent, IVirtualListItem, IVirtualListItemConfigMap, IVirtualListItemConfig, IVirtualListCollection, IRenderVirtualListItem, IRenderVirtualListItemConfig, IRenderVirtualListItemMeasures, ScrollDirection, IScrollOptions, };
@@ -340,8 +340,22 @@ export declare class NgVirtualListComponent implements OnDestroy {
340
340
  * Scrolls the scroll area to the last item in the collection.
341
341
  */
342
342
  scrollToEndRegular(): void;
343
+ /**
344
+ * Force clearing the cache.
345
+ */
343
346
  cacheClean(): void;
347
+ /**
348
+ * Stops the list from snapping to the bottom edge.
349
+ */
344
350
  stopSnappingScrollToEnd(): void;
351
+ /**
352
+ * Instantly refreshes the list.
353
+ */
354
+ updateImmediately(): void;
355
+ /**
356
+ * Marks the list for an update that will trigger on the next tick.
357
+ */
358
+ markForUpdate(): void;
345
359
  ngOnDestroy(): void;
346
360
  private dispose;
347
361
  static ɵfac: i0.ɵɵFactoryDeclaration<NgVirtualListComponent, never>;
@@ -50,7 +50,7 @@ export declare class NgVirtualListService {
50
50
  setSelectedIds(ids: Array<Id> | Id | undefined): void;
51
51
  setCollapsedIds(ids: Array<Id>): void;
52
52
  itemClick(data: IRenderVirtualListItem | undefined): void;
53
- update(): void;
53
+ update(immediately?: boolean): void;
54
54
  /**
55
55
  * Selects a list item
56
56
  * @param data
@@ -24,7 +24,7 @@ export declare class CacheMap<I = string | number, B = any, E = CacheMapEvents,
24
24
  protected _snapshot: CMap<I, B>;
25
25
  protected _version: number;
26
26
  protected _previousVersion: number;
27
- protected _lifeCircleId: number | undefined;
27
+ protected _lifeCircleId: any;
28
28
  protected _delta: number;
29
29
  get delta(): number;
30
30
  protected _deltaDirection: ScrollDirection;
@@ -38,7 +38,7 @@ export declare class CacheMap<I = string | number, B = any, E = CacheMapEvents,
38
38
  constructor();
39
39
  protected changesDetected(): boolean;
40
40
  protected stopLifeCircle(): void;
41
- protected nextTick(cb: () => void): number | undefined;
41
+ protected nextTick(cb: () => void): any;
42
42
  protected lifeCircle(): void;
43
43
  protected lifeCircleDo(): void;
44
44
  clearScrollDirectionCache(async?: boolean): void;
@@ -46,7 +46,6 @@ export interface IMetrics {
46
46
  totalSize: number;
47
47
  typicalItemSize: number;
48
48
  isFromItemIdFound: boolean;
49
- reversed: boolean;
50
49
  isUpdating: boolean;
51
50
  }
52
51
  export interface IRecalculateMetricsOptions<I extends IItem, C extends Array<I>> {
@@ -66,7 +65,6 @@ export interface IRecalculateMetricsOptions<I extends IItem, C extends Array<I>>
66
65
  deletedItemsMap: {
67
66
  [index: number]: ISize;
68
67
  };
69
- reversed: boolean;
70
68
  }
71
69
  export interface IGetItemPositionOptions<I extends IItem, C extends Array<I>> extends Omit<IRecalculateMetricsOptions<I, C>, 'previousTotalSize' | 'crudDetected' | 'deletedItemsMap'> {
72
70
  }
@@ -204,7 +202,7 @@ export declare class TrackBox<C extends BaseVirtualListItemComponent = any> exte
204
202
  protected recalculateMetrics<I extends IItem, C extends Array<I>>(options: IRecalculateMetricsOptions<I, C>): IMetrics;
205
203
  clearDeltaDirection(): void;
206
204
  clearDelta(clearDirectionDetector?: boolean): void;
207
- changes(): void;
205
+ changes(immediately?: boolean): void;
208
206
  protected generateDisplayCollection<I extends IItem, C extends Array<I>>(items: C, itemConfigMap: IVirtualListItemConfigMap, metrics: IMetrics): IRenderVirtualListCollection;
209
207
  resetPositions(): void;
210
208
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-virtual-list",
3
- "version": "18.9.2",
3
+ "version": "18.9.4",
4
4
  "author": {
5
5
  "name": "Evgenii Alexandrovich Grebennikov",
6
6
  "email": "djonnyx@gmail.com"
@@ -26,7 +26,7 @@
26
26
  "expandable"
27
27
  ],
28
28
  "peerDependencies": {
29
- "@angular/cdk": "^17.2.0",
29
+ "@angular/cdk": "^18.2.0",
30
30
  "@angular/common": "^18.2.0",
31
31
  "@angular/core": "^18.2.0"
32
32
  },