ng-virtual-list 19.10.6 → 19.11.0

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.
Files changed (94) hide show
  1. package/README.md +52 -98
  2. package/fesm2022/ng-virtual-list.mjs +4962 -3926
  3. package/fesm2022/ng-virtual-list.mjs.map +1 -1
  4. package/lib/components/list-item/base/base-virtual-list-item-component.d.ts +56 -0
  5. package/lib/components/list-item/base/index.d.ts +2 -0
  6. package/lib/components/list-item/const/index.d.ts +1 -0
  7. package/lib/components/list-item/interfaces/index.d.ts +2 -0
  8. package/lib/components/list-item/interfaces/template-context.d.ts +42 -0
  9. package/lib/components/list-item/ng-virtual-list-item.component.d.ts +9 -54
  10. package/lib/components/list-item/utils/create-display-id.d.ts +1 -0
  11. package/lib/components/list-item/utils/index.d.ts +2 -1
  12. package/lib/components/ng-scroll-bar/const/index.d.ts +1 -0
  13. package/lib/components/ng-scroll-bar/enums/index.d.ts +2 -0
  14. package/lib/components/ng-scroll-bar/enums/scrollbar-states.d.ts +5 -0
  15. package/lib/components/ng-scroll-bar/interfaces/index.d.ts +2 -1
  16. package/lib/components/ng-scroll-bar/interfaces/scroll-bar-template-context.d.ts +26 -0
  17. package/lib/components/ng-scroll-bar/ng-scroll-bar-public.service.d.ts +16 -0
  18. package/lib/components/ng-scroll-bar/ng-scroll-bar.component.d.ts +31 -38
  19. package/lib/components/ng-scroll-bar/ng-scroll-bar.module.d.ts +1 -2
  20. package/lib/components/ng-scroll-bar/ng-scroll-bar.service.d.ts +22 -0
  21. package/lib/components/ng-scroll-bar/types/index.d.ts +2 -0
  22. package/lib/components/ng-scroll-bar/types/scrollbar-state.d.ts +2 -0
  23. package/lib/components/ng-scroll-view/base/base-scroll-view.component.d.ts +56 -0
  24. package/lib/components/ng-scroll-view/const/index.d.ts +3 -0
  25. package/lib/components/ng-scroll-view/ng-scroll-view.component.d.ts +10 -48
  26. package/lib/components/ng-scroll-view/utils/calculate-direction.d.ts +1 -0
  27. package/lib/components/ng-scroll-view/utils/index.d.ts +3 -0
  28. package/lib/components/ng-scroll-view/utils/scroll-box.d.ts +39 -0
  29. package/lib/components/prerender-container/components/prerender-list/prerender-list.component.d.ts +61 -0
  30. package/lib/components/prerender-container/components/prerender-list/prerender-list.module.d.ts +10 -0
  31. package/lib/components/prerender-container/components/prerender-list-item/prerender-list-item.component.d.ts +17 -0
  32. package/lib/components/prerender-container/components/prerender-list-item/prerender-list-item.module.d.ts +9 -0
  33. package/lib/components/prerender-container/components/prerender-scroller/prerender-scroller.component.d.ts +41 -0
  34. package/lib/components/prerender-container/components/prerender-scroller/prerender-scroller.module.d.ts +9 -0
  35. package/lib/components/prerender-container/core/index.d.ts +2 -0
  36. package/lib/components/prerender-container/core/prerender-track-box.d.ts +35 -0
  37. package/lib/components/prerender-container/events/index.d.ts +6 -0
  38. package/lib/components/prerender-container/interfaces/index.d.ts +2 -0
  39. package/lib/components/prerender-container/interfaces/refresh-params.d.ts +16 -0
  40. package/lib/components/prerender-container/prerender-container.component.d.ts +37 -0
  41. package/lib/components/prerender-container/prerender-container.module.d.ts +9 -0
  42. package/lib/components/{substrate/types/substrate-style.d.ts → prerender-container/types/cache.d.ts} +7 -4
  43. package/lib/components/prerender-container/types/index.d.ts +2 -0
  44. package/lib/components/scroller/const/index.d.ts +1 -0
  45. package/lib/components/scroller/ng-scroller.component.d.ts +55 -24
  46. package/lib/components/scroller/ng-scroller.module.d.ts +1 -1
  47. package/lib/const/index.d.ts +25 -6
  48. package/lib/{utils → core}/cache-map.d.ts +4 -4
  49. package/lib/{utils → core}/track-box.d.ts +28 -21
  50. package/lib/{utils → core}/tracker.d.ts +8 -6
  51. package/lib/enums/snapping-method.d.ts +3 -3
  52. package/lib/enums/snapping-methods.d.ts +4 -8
  53. package/lib/{components/substrate/enums/substrate-styles.d.ts → interfaces/animation-params.d.ts} +6 -5
  54. package/lib/{models → interfaces}/base-virtual-list-item-component.d.ts +4 -3
  55. package/lib/interfaces/index.d.ts +9 -0
  56. package/lib/{types → interfaces}/rect.d.ts +1 -1
  57. package/lib/{components/substrate/enums/substrate-modes.d.ts → interfaces/render-stabilizer-options.d.ts} +5 -6
  58. package/lib/{models/scroll-event.model.d.ts → interfaces/scroll-event.d.ts} +8 -4
  59. package/lib/{models/scroll-options.model.d.ts → interfaces/scroll-options.d.ts} +5 -1
  60. package/lib/interfaces/scroll-params.d.ts +16 -0
  61. package/lib/interfaces/scroll-to-params.d.ts +7 -0
  62. package/lib/{types → interfaces}/size.d.ts +1 -1
  63. package/lib/models/display-object-config.model.d.ts +1 -15
  64. package/lib/models/display-object-measures.model.d.ts +1 -5
  65. package/lib/models/index.d.ts +1 -4
  66. package/lib/models/render-item-config.model.d.ts +4 -0
  67. package/lib/models/render-item-measures.model.d.ts +1 -5
  68. package/lib/ng-virtual-list-public.service.d.ts +93 -0
  69. package/lib/ng-virtual-list.component.d.ts +96 -60
  70. package/lib/ng-virtual-list.module.d.ts +3 -2
  71. package/lib/ng-virtual-list.service.d.ts +59 -16
  72. package/lib/types/focus-item-params.d.ts +7 -0
  73. package/lib/types/index.d.ts +4 -7
  74. package/lib/{models/scroll-direction.model.d.ts → types/scroll-direction.d.ts} +1 -0
  75. package/lib/utils/debounce.d.ts +17 -8
  76. package/lib/utils/get-selector-by-item-id.d.ts +2 -0
  77. package/lib/utils/index.d.ts +2 -2
  78. package/lib/utils/list-validators.d.ts +2 -0
  79. package/lib/utils/screen-reader-formatter.d.ts +4 -0
  80. package/lib/utils/scroll-event.d.ts +8 -4
  81. package/package.json +1 -1
  82. package/public-api.d.ts +6 -0
  83. package/lib/components/substrate/enums/index.d.ts +0 -3
  84. package/lib/components/substrate/index.d.ts +0 -7
  85. package/lib/components/substrate/substrate.component.d.ts +0 -54
  86. package/lib/components/substrate/substrate.module.d.ts +0 -8
  87. package/lib/components/substrate/types/index.d.ts +0 -3
  88. package/lib/components/substrate/types/substrate-mode.d.ts +0 -10
  89. package/lib/types/animation-params.d.ts +0 -4
  90. package/lib/types/color.d.ts +0 -7
  91. package/lib/types/gradient-color.d.ts +0 -8
  92. package/lib/types/rounded-corner.d.ts +0 -7
  93. package/lib/types/scrollbar-theme.d.ts +0 -20
  94. package/lib/utils/get-shape-min-size.d.ts +0 -8
package/README.md CHANGED
@@ -155,13 +155,13 @@ const HORIZONTAL_ITEMS: IVirtualListCollection<ICollectionItem> = Array.from({ l
155
155
  export class AppComponent {
156
156
  horizontalItems = HORIZONTAL_ITEMS;
157
157
 
158
- onItemClick(item: IRenderVirtualListItem<ICollectionItem> | undefined) {
158
+ onItemClick(item: IRenderVirtualListItem<ICollectionItem> | null) {
159
159
  if (item) {
160
160
  console.info(`Click: (ID: ${item.id}) Item ${item.data.name}`);
161
161
  }
162
162
  }
163
163
 
164
- onSelect(data: Array<Id> | Id | undefined) {
164
+ onSelect(data: Array<Id> | Id | null) {
165
165
  console.info(`Select: ${JSON.stringify(data)}`);
166
166
  }
167
167
  }
@@ -229,13 +229,13 @@ export class AppComponent {
229
229
  horizontalGroupItems = HORIZONTAL_GROUP_ITEMS;
230
230
  horizontalGroupItemConfigMap = HORIZONTAL_GROUP_ITEM_CONFIG_MAP;
231
231
 
232
- onItemClick(item: IRenderVirtualListItem<ICollectionItem> | undefined) {
232
+ onItemClick(item: IRenderVirtualListItem<ICollectionItem> | null) {
233
233
  if (item) {
234
234
  console.info(`Click: (ID: ${item.id}) Item ${item.data.name}`);
235
235
  }
236
236
  }
237
237
 
238
- onSelect(data: Array<Id> | Id | undefined) {
238
+ onSelect(data: Array<Id> | Id | null) {
239
239
  console.info(`Select: ${JSON.stringify(data)}`);
240
240
  }
241
241
  }
@@ -511,81 +511,32 @@ export class AppComponent {
511
511
 
512
512
  ## 🖼️ Stylization
513
513
 
514
- - Scrollbar theme
515
- ```ts
516
- import { NgVirtualListComponent, GradientColor, RoundedCorner, ScrollBarTheme } from 'ng-virtual-list';
517
-
518
- const X_LITE_BLUE_PLASMA_GRADIENT: GradientColor = ["rgba(133, 142, 255, 0)", "rgb(0, 133, 160)"],
519
- ROUND_CORNER: RoundedCorner = [3, 3, 3, 3],
520
- SCROLLBAR_GRADIENT: ScrollBarTheme = {
521
- fill: ["rgba(51, 0, 97, 1)", "rgba(73, 0, 97, 1)"],
522
- hoverFill: ["rgba(73, 6, 133, 1)", "rgba(73, 6, 133, 1)"],
523
- pressedFill: ["rgba(73, 6, 150, 1)", "rgba(95, 0, 150, 1)"],
524
- strokeGradientColor: X_LITE_BLUE_PLASMA_GRADIENT,
525
- strokeAnimationDuration: 1000,
526
- thickness: 6,
527
- roundCorner: ROUND_CORNER,
528
- rippleColor: 'rgba(255,255,255,0.5)',
529
- rippleEnabled: true,
530
- };
531
-
532
- @Component({
533
- selector: 'app-root',
534
- imports: [FormsModule, NgVirtualListComponent],
535
- templateUrl: './app.component.html',
536
- styleUrl: './app.component.scss'
537
- })
538
- export class AppComponent {
539
- scrollbarTheme = SCROLLBAR_GRADIENT;
514
+ ### Scrollbar stylization
540
515
 
541
- items = Array.from({ length: 100000 }, (_, i) => ({ id: i, name: `Item #${i}` }));
516
+ ```scss
517
+ .list::part(scrollbar-thumb__shape) {
518
+ background-color: rgba(51, 0, 97, 1);
519
+ border-radius: 3px;
542
520
  }
543
-
544
521
  ```
545
522
 
546
523
  ```html
547
- <ng-virtual-list [scrollbarTheme]="scrollbarTheme" [items]="items" [itemRenderer]="itemRenderer"></ng-virtual-list>
524
+ <ng-virtual-list class="list" [scrollbarThickness]="12" [items]="items" [itemRenderer]="itemRenderer"></ng-virtual-list>
548
525
 
549
- <ng-template #horizontalItemRenderer let-data="data" let-config="config">
550
- @if (data) {
551
- <div [ngClass]="{'list__h-container': true, 'selected': config.selected}">
552
- <span>{{data.name}}</span>
553
- </div>
554
- }
526
+ <ng-template #itemRenderer let-data="data" let-config="config">
527
+ <span>{{data.name}}</span>
555
528
  </ng-template>
556
529
  ```
557
530
 
531
+ ### Scrollbar castomization
532
+
533
+ [Examples](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/src/app/app.component.html)
534
+ [CustomScrollbarComponent](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/src/app/components/custom-scrollbar/custom-scrollbar.component.ts)
535
+
558
536
  List items are encapsulated in shadowDOM, so to override default styles you need to use ::part access
559
537
 
560
538
  - Customize a scroll area of list
561
539
  ```css
562
- .list::part(scroller) {
563
- scroll-behavior: auto;
564
-
565
- /* custom scrollbar */
566
- &::-webkit-scrollbar {
567
- width: 16px;
568
- height: 16px;
569
- }
570
-
571
- &::-webkit-scrollbar-track {
572
- background-color: #ffffff;
573
- }
574
-
575
- &::-webkit-scrollbar-thumb {
576
- background-color: #d6dee1;
577
- border-radius: 20px;
578
- border: 6px solid transparent;
579
- background-clip: content-box;
580
- min-width: 60px;
581
- min-height: 60px;
582
- }
583
-
584
- &::-webkit-scrollbar-thumb:hover {
585
- background-color: #a8bbbf;
586
- }
587
- }
588
-
589
540
  .list {
590
541
  border-radius: 3px;
591
542
  box-shadow: 1px 2px 8px 4px rgba(0, 0, 0, 0.075);
@@ -647,41 +598,44 @@ Inputs
647
598
 
648
599
  | Property | Type | Description |
649
600
  |---|---|---|
650
- | id | number | Readonly. Returns the unique identifier of the component. |
651
- | items | [IVirtualListCollection](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/collection.model.ts) | Collection of list items. The collection of elements must be immutable. |
652
- | itemSize | number? = 24 | If direction = 'vertical', then the height of a typical element. If direction = 'horizontal', then the width of a typical element. If the dynamicSize property is true, the items in the list can have different sizes, and you must specify the itemSize property to adjust the sizes of the items in the unallocated area. |
601
+ | animationParams | [IAnimationParams](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/animation-params.ts)? = { scrollToItem: 50, navigateToItem: 150, navigateByKeyboard: 50 } | Animation parameters. The default value is "{ scrollToItem: 50, navigateToItem: 150, , navigateByKeyboard: 50 }". |
653
602
  | bufferSize | number? = 2 | Number of elements outside the scope of visibility. Default value is 2. |
654
603
  | maxBufferSize | number? = 10 | Maximum number of elements outside the scope of visibility. Default value is 10. If maxBufferSize is set to be greater than bufferSize, then adaptive buffer mode is enabled. The greater the scroll size, the more elements are allocated for rendering. |
655
- | itemRenderer | TemplateRef | Rendering element template. |
656
- | methodForSelecting | [MethodForSelecting](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/method-for-selecting.ts) | Method for selecting list items. Default value is 'none'. 'select' - List items are selected one by one. 'multi-select' - Multiple selection of list items. 'none' - List items are not selectable. |
657
- | itemConfigMap | [IVirtualListItemConfigMap?](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/item-config-map.model.ts) | Sets `sticky` position and `selectable` for the list item element. If `sticky` position is greater than `0`, then `sticky` position is applied. If the `sticky` value is greater than `0`, then the `sticky` position mode is enabled for the element. `1` - position start, `2` - position end. Default value is `0`. `selectable` determines whether an element can be selected or not. Default value is `true`. |
604
+ | collapsedIds | Array<[Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts)> | Sets the collapsed items. |
658
605
  | collapseByClick | boolean? = true | If `false`, the element is collapsed using the config.collapse method passed to the template; if `true`, the element is collapsed by clicking on it. The default value is `true`. |
659
606
  | collectionMode | [CollectionMode? = 'normal'](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/collection-mode.ts) | Determines the action modes for collection elements. Default value is `normal`. |
660
- | selectByClick | boolean? = true | If `false`, the element is selected using the config.select method passed to the template; if `true`, the element is selected by clicking on it. The default value is `true`. |
661
- | snap | boolean? = false | Determines whether elements will snap. Default value is "false". |
662
- | snappingMethod | [SnappingMethod? = 'normal'](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/snapping-method.ts) | Snapping method. 'normal' - Normal group rendering. 'advanced' - The group is rendered on a transparent background. 'chat' - The group is rendered on a background. List items below the group are not rendered. |
663
607
  | direction | [Direction? = 'vertical'](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/direction.ts) | Determines the direction in which elements are placed. Default value is "vertical". |
664
608
  | dynamicSize | boolean? = true | If true, items in the list may have different sizes, and the itemSize property must be specified to adjust the sizes of items in the unallocated area. If false then the items in the list have a fixed size specified by the itemSize property. The default value is true. |
665
609
  | enabledBufferOptimization | boolean? = true | Experimental! Enables buffer optimization. Can only be used if items in the collection are not added or updated. |
666
- | trackBy | string? = 'id' | The name of the property by which tracking is performed. |
667
- | selectedIds | Array<[Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts)> \| [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts) \| undefined | Sets the selected items. |
668
- | collapsedIds | Array<[Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts)> | Sets the collapsed items. |
669
- | screenReaderMessage | string? = "Showing items $1 to $2" | Message for screen reader. The message format is: "some text `$1` some text `$2`", where `$1` is the number of the first element of the screen collection, `$2` is the number of the last element of the screen collection. |
610
+ | id | number | Readonly. Returns the unique identifier of the component. |
611
+ | items | [IVirtualListCollection](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/collection.model.ts) | Collection of list items. The collection of elements must be immutable. |
612
+ | itemSize | number? = 24 | If direction = 'vertical', then the height of a typical element. If direction = 'horizontal', then the width of a typical element. If the dynamicSize property is true, the items in the list can have different sizes, and you must specify the itemSize property to adjust the sizes of the items in the unallocated area. |
613
+ | itemRenderer | TemplateRef | Rendering element template. |
614
+ | itemConfigMap | [IVirtualListItemConfigMap?](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/item-config-map.model.ts) | Sets `sticky` position and `selectable` for the list item element. If `sticky` position is greater than `0`, then `sticky` position is applied. If the `sticky` value is greater than `0`, then the `sticky` position mode is enabled for the element. `1` - position start, `2` - position end. Default value is `0`. `selectable` determines whether an element can be selected or not. Default value is `true`. |
615
+ | methodForSelecting | [MethodForSelecting](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/method-for-selecting.ts) | Method for selecting list items. Default value is 'none'. 'select' - List items are selected one by one. 'multi-select' - Multiple selection of list items. 'none' - List items are not selectable. |
670
616
  | langTextDir | [TextDirection? = 'ltr'](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/text-direction.ts) | A string indicating the direction of text for the locale. Can be either "ltr" (left-to-right) or "rtl" (right-to-left). |
671
617
  | loading | boolean? = false | If `true`, the scrollBar goes into loading state. The default value is `false`. |
672
- | scrollbarTheme | [ScrollBarTheme?](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/scrollbar-theme.ts) | Scrollbar theme. |
618
+ | overscrollEnabled | boolean? = true | Determines whether the overscroll (re-scroll) feature will work. The default value is "true". |
619
+ | selectByClick | boolean? = true | If `false`, the element is selected using the config.select method passed to the template; if `true`, the element is selected by clicking on it. The default value is `true`. |
620
+ | snap | boolean? = false | Determines whether elements will snap. Default value is "false". |
621
+ | selectedIds | Array<[Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts)> \| [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts) \| null | Sets the selected items. |
622
+ | screenReaderMessage | string? = "Showing items $1 to $2" | Message for screen reader. The message format is: "some text `$1` some text `$2`", where `$1` is the number of the first element of the screen collection, `$2` is the number of the last element of the screen collection. |
673
623
  | clickDistance | number? = 40 | The maximum scroll distance at which a click event is triggered. |
674
624
  | waitForPreparation | boolean? = true | If true, it will wait until the list items are fully prepared before displaying them.. The default value is `true`. |
675
625
  | scrollStartOffset | number? = 0 | Sets the scroll start offset value; Default value is "0". |
676
626
  | scrollEndOffset | number? = 0 | Sets the scroll end offset value; Default value is "0". |
677
- | snapScrollToBottom | boolean? = false | Determines whether the scroll will be anchored to the end of the list at startup.. Default value is "false". |
627
+ | snappingMethod | [SnappingMethod](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/snapping-method.ts) | Snapping method. Default value is [SnappingMethods.STANDART](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/snapping-method.ts). [SnappingMethods.STANDART](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/snapping-method.ts) - Classic group visualization. [SnappingMethods.ADVANCED](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/snapping-method.ts) - A mask is applied to the viewport area so that the background is displayed underneath the attached group. |
628
+ | snapScrollToStart | boolean? = true | Determines whether the scroll will be anchored to the start of the list. Default value is "true". This property takes precedence over the snapScrollToEnd property. That is, if snapScrollToStart and snapScrollToEnd are enabled, the list will initially snap to the beginning; if you move the scroll bar to the end, the list will snap to the end. If snapScrollToStart is disabled and snapScrollToEnd is enabled, the list will snap to the end; if you move the scroll bar to the beginning, the list will snap to the beginning. If both snapScrollToStart and snapScrollToEnd are disabled, the list will never snap to the beginning or end. |
629
+ | snapScrollToEnd | boolean? = true | Determines whether the scroll will be anchored to the утв of the list. Default value is "true". That is, if snapScrollToStart and snapScrollToEnd are enabled, the list will initially snap to the beginning; if you move the scroll bar to the end, the list will snap to the end. If snapScrollToStart is disabled and snapScrollToEnd is enabled, the list will snap to the end; if you move the scroll bar to the beginning, the list will snap to the beginning. If both snapScrollToStart and snapScrollToEnd are disabled, the list will never snap to the beginning or end. |
678
630
  | snapToEndTransitionInstantOffset | number? = 0 | Sets the offset value; if the scroll area value is exceeded, the scroll animation will be disabled. Default value is "0". |
679
- | scrollbarMinSize | number? = 80 | Minimum scrollbar size. |
680
631
  | scrollbarEnabled | boolean? = true | Determines whether the scrollbar is shown or not. The default value is "true". |
681
632
  | scrollbarInteractive | boolean? = true | Determines whether scrolling using the scrollbar will be possible. The default value is "true". |
682
- | overscrollEnabled | boolean? = true | Determines whether the overscroll (re-scroll) feature will work. The default value is "true". |
683
- | animationParams | [IAnimationParams](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/animation-params.ts)? = { scrollToItem: 50, navigateToItem: 150 } | Animation parameters. The default value is "{ scrollToItem: 50, navigateToItem: 150 }". |
633
+ | scrollbarMinSize | number? = 80 | Minimum scrollbar size. |
634
+ | scrollbarThickness | number? = 6 | Scrollbar thickness. |
635
+ | scrollbarThumbRenderer | TemplateRef<any> \| null = null | Scrollbar customization template. |
636
+ | scrollbarThumbParams | {[propName: string]: any;} \| null | Additional options for the scrollbar. |
684
637
  | scrollBehavior | ScrollBehavior? = 'smooth' | Defines the scrolling behavior for any element on the page. The default value is "smooth". |
638
+ | trackBy | string? = 'id' | The name of the property by which tracking is performed. |
685
639
 
686
640
  <br/>
687
641
 
@@ -689,12 +643,12 @@ Outputs
689
643
 
690
644
  | Event | Type | Description |
691
645
  |---|---|---|
692
- | onItemClick | [IRenderVirtualListItem](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/render-item.model.ts) \| undefined | Fires when an element is clicked. |
693
- | onScroll | ([IScrollEvent](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/scroll-event.model.ts)) => void | Fires when the list has been scrolled. |
694
- | onScrollEnd | ([IScrollEvent](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/scroll-event.model.ts)) => void | Fires when the list has completed scrolling. |
695
- | onSelect | Array<[Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts)> \| [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts) \| undefined | Fires when an elements are selected. |
696
- | onCollapse | Array<[Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts)> \| [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts) \| undefined | Fires when elements are collapsed. |
697
- | onViewportChange | [ISize](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/size.ts) | Fires when the viewport size is changed. |
646
+ | onItemClick | [IRenderVirtualListItem](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/render-item.model.ts) \| null | Fires when an element is clicked. |
647
+ | onScroll | ([IScrollEvent](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/scroll-event.ts)) => void | Fires when the list has been scrolled. |
648
+ | onScrollEnd | ([IScrollEvent](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/scroll-event.ts)) => void | Fires when the list has completed scrolling. |
649
+ | onSelect | Array<[Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts)> \| [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts) \| null | Fires when an elements are selected. |
650
+ | onCollapse | Array<[Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts)> \| [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts) \| null | Fires when elements are collapsed. |
651
+ | onViewportChange | [ISize](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/size.ts) | Fires when the viewport size is changed. |
698
652
  | onScrollReachStart | void | Fires when the scroll reaches the start. |
699
653
  | onScrollReachEnd | void | Fires when the scroll reaches the end. |
700
654
 
@@ -704,20 +658,19 @@ Methods
704
658
 
705
659
  | Method | Type | Description |
706
660
  |--|--|--|
707
- | scrollTo | (id: [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts), cb?: () => void, options?: [IScrollOptions](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/scroll-options.model.ts)) | The method scrolls the list to the element with the given `id` and returns the value of the scrolled area. |
708
- | scrollToStart | (cb?: () => void, options?: [IScrollOptions](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/scroll-options.model.ts)) | Scrolls the scroll area to the first item in the collection. |
709
- | scrollToEndItem | (cb?: () => void, options?: [IScrollOptions](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/scroll-options.model.ts)) | Scrolls the scroll area to the last item in the collection. |
710
- | scrollToEnd | | Scrolls the list to the end of the content height. |
711
- | getItemBounds | (id: [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts), behavior?: ScrollBehavior) => void | Returns the bounds of an element with a given id |
661
+ | scrollTo | (id: [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts), (cb: () => void) \| null = null, options: [IScrollOptions](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/scroll-options.ts) \| null = null) | The method scrolls the list to the element with the given `id` and returns the value of the scrolled area. |
662
+ | scrollToStart | (cb: (() => void) \| null = null, options: [IScrollOptions](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/scroll-options.ts) \| null = null) | Scrolls the scroll area to the first item in the collection. |
663
+ | scrollToEnd | (cb: (() => void) \| null = null, options: [IScrollOptions](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/scroll-options.ts) \| null = null) | Scrolls the list to the end of the content height. |
664
+ | getItemBounds | (id: [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts)) => [ISize \| null](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/interfaces/size.ts) | Returns the bounds of an element with a given id |
712
665
  | focus | [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts), align: [FocusAlignment](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/focus-alignment.ts) = [FocusAlignments.NONE](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/focus-alignments.ts) | Focus an list item by a given id. |
713
- | stopSnappingScrollToEnd | | Stops the list from snapping to the bottom edge. |
666
+ | preventSnapping | | Prevents the list from snapping to its start or end edge. |
714
667
 
715
668
  <br/>
716
669
 
717
670
  ### Template API
718
671
 
719
672
  ```html
720
- <ng-template #itemRenderer let-data="data" let-config="config" let-measures="measures">
673
+ <ng-template #itemRenderer let-data="data" let-config="config" let-measures="measures" let-api="api">
721
674
  <!-- content -->
722
675
  </ng-template>
723
676
  ```
@@ -726,9 +679,10 @@ Properties
726
679
 
727
680
  | Property | Type | Description |
728
681
  |--|--|--|
682
+ | api | [NgVirtualListPublicService](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/ng-virtual-list-public.service.ts) | List API Provider. |
729
683
  | data | {\[id: [Id](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/types/id.ts) \], [otherProps: string]: any;} | Collection item data. |
730
684
  | config | [IDisplayObjectConfig](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/display-object-config.model.ts) | Display object configuration. A set of `select`, `collapse`, and `focus` methods are also provided. |
731
- | measures | [IDisplayObjectMeasures](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/display-object-measures.model.ts) \| undefined | Display object metrics. |
685
+ | measures | [IDisplayObjectMeasures](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/models/display-object-measures.model.ts) \| null | Display object metrics. |
732
686
 
733
687
  <br/>
734
688