ng-virtual-list 19.7.17 → 19.7.19
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/README.md +1 -0
- package/fesm2022/ng-virtual-list.mjs +69 -7
- package/fesm2022/ng-virtual-list.mjs.map +1 -1
- package/lib/const/index.d.ts +2 -1
- package/lib/enums/collection-mode.d.ts +8 -0
- package/lib/enums/collection-modes.d.ts +16 -0
- package/lib/enums/index.d.ts +4 -2
- package/lib/ng-virtual-list.component.d.ts +9 -2
- package/lib/utils/isCollectionMode.d.ts +8 -0
- package/lib/utils/trackBox.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -604,6 +604,7 @@ Inputs
|
|
|
604
604
|
| 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. |
|
|
605
605
|
| 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`. |
|
|
606
606
|
| 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`. |
|
|
607
|
+
| 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`. |
|
|
607
608
|
| 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`. |
|
|
608
609
|
| snap | boolean? = false | Determines whether elements will snap. Default value is "false". |
|
|
609
610
|
| 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. List items below the group are not rendered. |
|
|
@@ -6,6 +6,24 @@ import { Subject, tap, fromEvent, combineLatest, map, filter, distinctUntilChang
|
|
|
6
6
|
import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
|
|
7
7
|
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Action modes for collection elements.
|
|
11
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/collection-modes.ts
|
|
12
|
+
* @author Evgenii Grebennikov
|
|
13
|
+
* @email djonnyx@gmail.com
|
|
14
|
+
*/
|
|
15
|
+
var CollectionModes;
|
|
16
|
+
(function (CollectionModes) {
|
|
17
|
+
/**
|
|
18
|
+
* When adding elements to the beginning of the collection, the scroll remains at the current position.
|
|
19
|
+
*/
|
|
20
|
+
CollectionModes["NORMAL"] = "normal";
|
|
21
|
+
/**
|
|
22
|
+
* When adding elements to the beginning of the collection, the scroll is shifted by the sum of the sizes of the new elements.
|
|
23
|
+
*/
|
|
24
|
+
CollectionModes["LAZY"] = "lazy";
|
|
25
|
+
})(CollectionModes || (CollectionModes = {}));
|
|
26
|
+
|
|
9
27
|
/**
|
|
10
28
|
* Axis of the arrangement of virtual list elements.
|
|
11
29
|
* @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/directions.ts
|
|
@@ -75,6 +93,7 @@ const DEFAULT_ENABLED_BUFFER_OPTIMIZATION = false;
|
|
|
75
93
|
const DEFAULT_DYNAMIC_SIZE = false;
|
|
76
94
|
const TRACK_BY_PROPERTY_NAME = 'id';
|
|
77
95
|
const DEFAULT_DIRECTION = Directions.VERTICAL;
|
|
96
|
+
const DEFAULT_COLLECTION_MODE = CollectionModes.NORMAL;
|
|
78
97
|
const DISPLAY_OBJECTS_LENGTH_MESUREMENT_ERROR = 1;
|
|
79
98
|
const MAX_SCROLL_TO_ITERATIONS = 5;
|
|
80
99
|
const DEFAULT_SNAPPING_METHOD = SnappingMethods.NORMAL;
|
|
@@ -1285,6 +1304,13 @@ class TrackBox extends CacheMap {
|
|
|
1285
1304
|
}
|
|
1286
1305
|
this._isSnappingMethodAdvanced = v;
|
|
1287
1306
|
}
|
|
1307
|
+
_isLazy = false;
|
|
1308
|
+
set isLazy(v) {
|
|
1309
|
+
if (this._isLazy === v) {
|
|
1310
|
+
return;
|
|
1311
|
+
}
|
|
1312
|
+
this._isLazy = v;
|
|
1313
|
+
}
|
|
1288
1314
|
/**
|
|
1289
1315
|
* Set the trackBy property
|
|
1290
1316
|
*/
|
|
@@ -1583,17 +1609,17 @@ class TrackBox extends CacheMap {
|
|
|
1583
1609
|
const bounds = map.get(id) || { width: typicalItemSize, height: typicalItemSize };
|
|
1584
1610
|
componentSize = bounds[sizeProperty];
|
|
1585
1611
|
itemDisplayMethod = bounds?.method ?? ItemDisplayMethods.UPDATE;
|
|
1586
|
-
|
|
1612
|
+
const isItemNew = bounds.isNew ?? this._isLazy;
|
|
1613
|
+
if (!isItemNew && (!this._isLazy || !itemConfigMap[collection[0].id]?.sticky)) {
|
|
1587
1614
|
isNew = false;
|
|
1588
1615
|
}
|
|
1589
1616
|
switch (itemDisplayMethod) {
|
|
1590
1617
|
case ItemDisplayMethods.UPDATE: {
|
|
1591
|
-
const isUpdatedNew = bounds.isNew;
|
|
1592
1618
|
const snapshotBounds = snapshot.get(id);
|
|
1593
1619
|
const componentSnapshotSize = componentSize - (snapshotBounds ? snapshotBounds[sizeProperty] : typicalItemSize);
|
|
1594
|
-
componentSizeDelta =
|
|
1620
|
+
componentSizeDelta = isItemNew ? 0 : componentSnapshotSize;
|
|
1595
1621
|
map.set(id, { ...bounds, method: ItemDisplayMethods.NOT_CHANGED, isNew: false });
|
|
1596
|
-
if (
|
|
1622
|
+
if (isItemNew) {
|
|
1597
1623
|
deltaFromStartCreation += componentSize;
|
|
1598
1624
|
}
|
|
1599
1625
|
break;
|
|
@@ -2099,6 +2125,20 @@ const copyValueAsReadonly = (source) => {
|
|
|
2099
2125
|
return source;
|
|
2100
2126
|
};
|
|
2101
2127
|
|
|
2128
|
+
const NORMAL_ALIASES = [CollectionModes.NORMAL, 'normal'], LAZY_ALIASES = [CollectionModes.LAZY, 'lazy'];
|
|
2129
|
+
/**
|
|
2130
|
+
* Determines the axis membership of a virtual list
|
|
2131
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/utils/isCollectionMode.ts
|
|
2132
|
+
* @author Evgenii Grebennikov
|
|
2133
|
+
* @email djonnyx@gmail.com
|
|
2134
|
+
*/
|
|
2135
|
+
const isCollectionMode = (src, expected) => {
|
|
2136
|
+
if (LAZY_ALIASES.includes(expected)) {
|
|
2137
|
+
return LAZY_ALIASES.includes(src);
|
|
2138
|
+
}
|
|
2139
|
+
return NORMAL_ALIASES.includes(src);
|
|
2140
|
+
};
|
|
2141
|
+
|
|
2102
2142
|
const ROLE_LIST = 'list', ROLE_LIST_BOX = 'listbox';
|
|
2103
2143
|
const validateScrollIteration = (value) => {
|
|
2104
2144
|
return Number.isNaN(value) || (value < 0) ? 0 : value > MAX_SCROLL_TO_ITERATIONS ? MAX_SCROLL_TO_ITERATIONS : value;
|
|
@@ -2407,6 +2447,20 @@ class NgVirtualListComponent {
|
|
|
2407
2447
|
* Determines the direction in which elements are placed. Default value is "vertical".
|
|
2408
2448
|
*/
|
|
2409
2449
|
direction = input(DEFAULT_DIRECTION, { ...this._directionOptions });
|
|
2450
|
+
_collectionModeOptions = {
|
|
2451
|
+
transform: (v) => {
|
|
2452
|
+
const valid = validateString(v) && (v === 'normal' || v === 'lazy');
|
|
2453
|
+
if (!valid) {
|
|
2454
|
+
console.error('The "direction" parameter must have the value `normal` or `lazy`.');
|
|
2455
|
+
return DEFAULT_COLLECTION_MODE;
|
|
2456
|
+
}
|
|
2457
|
+
return v;
|
|
2458
|
+
},
|
|
2459
|
+
};
|
|
2460
|
+
/**
|
|
2461
|
+
* Determines the action modes for collection elements. Default value is "normal".
|
|
2462
|
+
*/
|
|
2463
|
+
collectionMode = input(DEFAULT_COLLECTION_MODE, { ...this._collectionModeOptions });
|
|
2410
2464
|
_bufferSizeOptions = {
|
|
2411
2465
|
transform: (v) => {
|
|
2412
2466
|
const valid = validateInt(v);
|
|
@@ -2497,6 +2551,7 @@ class NgVirtualListComponent {
|
|
|
2497
2551
|
get isMultiSelecting() { return this._isMultiSelecting; }
|
|
2498
2552
|
_isSnappingMethodAdvanced = this.getIsSnappingMethodAdvanced();
|
|
2499
2553
|
get isSnappingMethodAdvanced() { return this._isSnappingMethodAdvanced; }
|
|
2554
|
+
_isLazy = this.getIsLazy();
|
|
2500
2555
|
_isVertical = this.getIsVertical();
|
|
2501
2556
|
get orientation() {
|
|
2502
2557
|
return this._isVertical ? Directions.VERTICAL : Directions.HORIZONTAL;
|
|
@@ -2628,7 +2683,10 @@ class NgVirtualListComponent {
|
|
|
2628
2683
|
$trackBy.pipe(takeUntilDestroyed(), tap(v => {
|
|
2629
2684
|
this._trackBox.trackingPropertyName = v;
|
|
2630
2685
|
})).subscribe();
|
|
2631
|
-
const $bounds = toObservable(this._bounds).pipe(filter(b => !!b)), $items = toObservable(this.items).pipe(map(i => !i ? [] : i)), $scrollSize = toObservable(this._scrollSize), $itemSize = toObservable(this.itemSize).pipe(map(v => v <= 0 ? DEFAULT_ITEM_SIZE : v)), $bufferSize = toObservable(this.bufferSize).pipe(map(v => v < 0 ? DEFAULT_BUFFER_SIZE : v)), $maxBufferSize = toObservable(this.maxBufferSize).pipe(map(v => v < 0 ? DEFAULT_BUFFER_SIZE : v)), $itemConfigMap = toObservable(this.itemConfigMap).pipe(map(v => !v ? {} : v)), $snap = toObservable(this.snap), $isVertical = toObservable(this.direction).pipe(map(v => this.getIsVertical(v || DEFAULT_DIRECTION))), $dynamicSize = toObservable(this.dynamicSize), $enabledBufferOptimization = toObservable(this.enabledBufferOptimization), $snappingMethod = toObservable(this.snappingMethod).pipe(map(v => this.getIsSnappingMethodAdvanced(v || DEFAULT_SNAPPING_METHOD))), $methodForSelecting = toObservable(this.methodForSelecting), $selectedIds = toObservable(this.selectedIds), $collapsedIds = toObservable(this.collapsedIds).pipe(map(v => Array.isArray(v) ? v : [])), $collapsedItemIds = toObservable(this._collapsedItemIds).pipe(map(v => Array.isArray(v) ? v : [])), $actualItems = toObservable(this._actualItems), $cacheVersion = toObservable(this._cacheVersion);
|
|
2686
|
+
const $bounds = toObservable(this._bounds).pipe(filter(b => !!b)), $items = toObservable(this.items).pipe(map(i => !i ? [] : i)), $scrollSize = toObservable(this._scrollSize), $itemSize = toObservable(this.itemSize).pipe(map(v => v <= 0 ? DEFAULT_ITEM_SIZE : v)), $bufferSize = toObservable(this.bufferSize).pipe(map(v => v < 0 ? DEFAULT_BUFFER_SIZE : v)), $maxBufferSize = toObservable(this.maxBufferSize).pipe(map(v => v < 0 ? DEFAULT_BUFFER_SIZE : v)), $itemConfigMap = toObservable(this.itemConfigMap).pipe(map(v => !v ? {} : v)), $snap = toObservable(this.snap), $isVertical = toObservable(this.direction).pipe(map(v => this.getIsVertical(v || DEFAULT_DIRECTION))), $isLazy = toObservable(this.collectionMode).pipe(map(v => this.getIsLazy(v || DEFAULT_COLLECTION_MODE))), $dynamicSize = toObservable(this.dynamicSize), $enabledBufferOptimization = toObservable(this.enabledBufferOptimization), $snappingMethod = toObservable(this.snappingMethod).pipe(map(v => this.getIsSnappingMethodAdvanced(v || DEFAULT_SNAPPING_METHOD))), $methodForSelecting = toObservable(this.methodForSelecting), $selectedIds = toObservable(this.selectedIds), $collapsedIds = toObservable(this.collapsedIds).pipe(map(v => Array.isArray(v) ? v : [])), $collapsedItemIds = toObservable(this._collapsedItemIds).pipe(map(v => Array.isArray(v) ? v : [])), $actualItems = toObservable(this._actualItems), $cacheVersion = toObservable(this._cacheVersion);
|
|
2687
|
+
$isLazy.pipe(takeUntilDestroyed(), tap(v => {
|
|
2688
|
+
this._trackBox.isLazy = v;
|
|
2689
|
+
})).subscribe();
|
|
2632
2690
|
combineLatest([$items, $itemSize]).pipe(takeUntilDestroyed(), map(([items, itemSize]) => ({ items, itemSize })), tap(({ items, itemSize }) => {
|
|
2633
2691
|
this._trackBox.resetCollection(items, itemSize);
|
|
2634
2692
|
})).subscribe();
|
|
@@ -2807,6 +2865,10 @@ class NgVirtualListComponent {
|
|
|
2807
2865
|
const dir = d || this.direction();
|
|
2808
2866
|
return isDirection(dir, Directions.VERTICAL);
|
|
2809
2867
|
}
|
|
2868
|
+
getIsLazy(m) {
|
|
2869
|
+
const mode = m || this.collectionMode();
|
|
2870
|
+
return isCollectionMode(mode, CollectionModes.LAZY);
|
|
2871
|
+
}
|
|
2810
2872
|
createDisplayComponentsIfNeed(displayItems) {
|
|
2811
2873
|
if (!displayItems || !this._listContainerRef) {
|
|
2812
2874
|
this._trackBox.setDisplayObjectIndexMapById({});
|
|
@@ -3033,7 +3095,7 @@ class NgVirtualListComponent {
|
|
|
3033
3095
|
}
|
|
3034
3096
|
}
|
|
3035
3097
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgVirtualListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3036
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: NgVirtualListComponent, isStandalone: true, selector: "ng-virtual-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, collapsedIds: { classPropertyName: "collapsedIds", publicName: "collapsedIds", isSignal: true, isRequired: false, transformFunction: null }, selectByClick: { classPropertyName: "selectByClick", publicName: "selectByClick", isSignal: true, isRequired: false, transformFunction: null }, collapseByClick: { classPropertyName: "collapseByClick", publicName: "collapseByClick", isSignal: true, isRequired: false, transformFunction: null }, snap: { classPropertyName: "snap", publicName: "snap", isSignal: true, isRequired: false, transformFunction: null }, enabledBufferOptimization: { classPropertyName: "enabledBufferOptimization", publicName: "enabledBufferOptimization", isSignal: true, isRequired: false, transformFunction: null }, itemRenderer: { classPropertyName: "itemRenderer", publicName: "itemRenderer", isSignal: true, isRequired: true, transformFunction: null }, itemConfigMap: { classPropertyName: "itemConfigMap", publicName: "itemConfigMap", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, dynamicSize: { classPropertyName: "dynamicSize", publicName: "dynamicSize", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, bufferSize: { classPropertyName: "bufferSize", publicName: "bufferSize", isSignal: true, isRequired: false, transformFunction: null }, maxBufferSize: { classPropertyName: "maxBufferSize", publicName: "maxBufferSize", isSignal: true, isRequired: false, transformFunction: null }, snappingMethod: { classPropertyName: "snappingMethod", publicName: "snappingMethod", isSignal: true, isRequired: false, transformFunction: null }, methodForSelecting: { classPropertyName: "methodForSelecting", publicName: "methodForSelecting", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onScroll: "onScroll", onScrollEnd: "onScrollEnd", onViewportChange: "onViewportChange", onItemClick: "onItemClick", onSelect: "onSelect", onCollapse: "onCollapse", onScrollReachStart: "onScrollReachStart", onScrollReachEnd: "onScrollReachEnd" }, host: { styleAttribute: "position: relative;" }, providers: [NgVirtualListService], viewQueries: [{ propertyName: "_snappedContainer", first: true, predicate: ["snapped"], descendants: true, isSignal: true }, { propertyName: "_container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "_list", first: true, predicate: ["list"], descendants: true, isSignal: true }, { propertyName: "_listContainerRef", first: true, predicate: ["renderersContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_snapContainerRef", first: true, predicate: ["snapRendererContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "@if (snap()) {\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n}\r\n<div #container part=\"scroller\" class=\"ngvl__scroller\">\r\n <div [attr.aria-orientation]=\"orientation\" [attr.aria-activedescendant]=\"focusedElement()\" tabindex=\"0\" #list\r\n part=\"list\" class=\"ngvl__list\">\r\n <ng-container #renderersContainer></ng-container>\r\n </div>\r\n</div>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.horizontal) .ngvl__list{display:inline-flex}:host(.horizontal) .ngvl__scroller{overflow:auto hidden}:host(.vertical) .ngvl__scroller{overflow:hidden auto}:host(.vertical){height:320px}.ngvl__scroller{overflow:auto;width:100%;height:100%}.ngvl__list-snapper{pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list{position:relative;list-style:none;padding:0;margin:0;width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
|
|
3098
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: NgVirtualListComponent, isStandalone: true, selector: "ng-virtual-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, collapsedIds: { classPropertyName: "collapsedIds", publicName: "collapsedIds", isSignal: true, isRequired: false, transformFunction: null }, selectByClick: { classPropertyName: "selectByClick", publicName: "selectByClick", isSignal: true, isRequired: false, transformFunction: null }, collapseByClick: { classPropertyName: "collapseByClick", publicName: "collapseByClick", isSignal: true, isRequired: false, transformFunction: null }, snap: { classPropertyName: "snap", publicName: "snap", isSignal: true, isRequired: false, transformFunction: null }, enabledBufferOptimization: { classPropertyName: "enabledBufferOptimization", publicName: "enabledBufferOptimization", isSignal: true, isRequired: false, transformFunction: null }, itemRenderer: { classPropertyName: "itemRenderer", publicName: "itemRenderer", isSignal: true, isRequired: true, transformFunction: null }, itemConfigMap: { classPropertyName: "itemConfigMap", publicName: "itemConfigMap", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, dynamicSize: { classPropertyName: "dynamicSize", publicName: "dynamicSize", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, collectionMode: { classPropertyName: "collectionMode", publicName: "collectionMode", isSignal: true, isRequired: false, transformFunction: null }, bufferSize: { classPropertyName: "bufferSize", publicName: "bufferSize", isSignal: true, isRequired: false, transformFunction: null }, maxBufferSize: { classPropertyName: "maxBufferSize", publicName: "maxBufferSize", isSignal: true, isRequired: false, transformFunction: null }, snappingMethod: { classPropertyName: "snappingMethod", publicName: "snappingMethod", isSignal: true, isRequired: false, transformFunction: null }, methodForSelecting: { classPropertyName: "methodForSelecting", publicName: "methodForSelecting", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onScroll: "onScroll", onScrollEnd: "onScrollEnd", onViewportChange: "onViewportChange", onItemClick: "onItemClick", onSelect: "onSelect", onCollapse: "onCollapse", onScrollReachStart: "onScrollReachStart", onScrollReachEnd: "onScrollReachEnd" }, host: { styleAttribute: "position: relative;" }, providers: [NgVirtualListService], viewQueries: [{ propertyName: "_snappedContainer", first: true, predicate: ["snapped"], descendants: true, isSignal: true }, { propertyName: "_container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "_list", first: true, predicate: ["list"], descendants: true, isSignal: true }, { propertyName: "_listContainerRef", first: true, predicate: ["renderersContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_snapContainerRef", first: true, predicate: ["snapRendererContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "@if (snap()) {\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n}\r\n<div #container part=\"scroller\" class=\"ngvl__scroller\">\r\n <div [attr.aria-orientation]=\"orientation\" [attr.aria-activedescendant]=\"focusedElement()\" tabindex=\"0\" #list\r\n part=\"list\" class=\"ngvl__list\">\r\n <ng-container #renderersContainer></ng-container>\r\n </div>\r\n</div>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.horizontal) .ngvl__list{display:inline-flex}:host(.horizontal) .ngvl__scroller{overflow:auto hidden}:host(.vertical) .ngvl__scroller{overflow:hidden auto}:host(.vertical){height:320px}.ngvl__scroller{overflow:auto;width:100%;height:100%}.ngvl__list-snapper{pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list{position:relative;list-style:none;padding:0;margin:0;width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
|
|
3037
3099
|
}
|
|
3038
3100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgVirtualListComponent, decorators: [{
|
|
3039
3101
|
type: Component,
|
|
@@ -3056,5 +3118,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3056
3118
|
* Generated bundle index. Do not edit.
|
|
3057
3119
|
*/
|
|
3058
3120
|
|
|
3059
|
-
export { Directions, MethodsForSelecting, NgVirtualListComponent, NgVirtualListItemComponent, ScrollEvent, SnappingMethods, debounce, toggleClassName };
|
|
3121
|
+
export { CollectionModes, Directions, MethodsForSelecting, NgVirtualListComponent, NgVirtualListItemComponent, ScrollEvent, SnappingMethods, debounce, toggleClassName };
|
|
3060
3122
|
//# sourceMappingURL=ng-virtual-list.mjs.map
|