ng-virtual-list 21.11.0 → 21.11.1
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 +11 -8
- package/fesm2022/ng-virtual-list.mjs +107 -88
- package/fesm2022/ng-virtual-list.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ng-virtual-list.d.ts +35 -34
package/README.md
CHANGED
|
@@ -16,9 +16,12 @@ Works correctly in all browsers and platforms.
|
|
|
16
16
|

|
|
17
17
|

|
|
18
18
|
|
|
19
|
-
[
|
|
19
|
+
[Chat Demo](https://chat-demo.eugene-grebennikov.pro/)
|
|
20
20
|
[(Code)](https://github.com/DjonnyX/ng-virtual-list-chat-demo)
|
|
21
21
|
|
|
22
|
+
[News Feed Demo](https://news-feed-demo.eugene-grebennikov.pro/)
|
|
23
|
+
[(Code)](https://github.com/DjonnyX/ng-virtual-list-news-feed-demo)
|
|
24
|
+
|
|
22
25
|
[Live Examples (Storybook)](https://ng-virtual-list-examples.eugene-grebennikov.pro/)
|
|
23
26
|
|
|
24
27
|
[Examples](https://ng-virtual-list.eugene-grebennikov.pro/)
|
|
@@ -690,13 +693,13 @@ Properties
|
|
|
690
693
|
|
|
691
694
|
| Angular version | ng-virtual-list version | git | npm |
|
|
692
695
|
|--|--|--|--|
|
|
693
|
-
| 20.x | 20.11.
|
|
694
|
-
| 19.x | 19.11.
|
|
695
|
-
| 18.x | 18.11.
|
|
696
|
-
| 17.x | 17.11.
|
|
697
|
-
| 16.x | 16.11.
|
|
698
|
-
| 15.x | 15.11.
|
|
699
|
-
| 14.x | 14.11.
|
|
696
|
+
| 20.x | 20.11.7 | [20.x](https://github.com/DjonnyX/ng-virtual-list/tree/21.x) | [20.11.7](https://www.npmjs.com/package/ng-virtual-list/v/20.11.7) |
|
|
697
|
+
| 19.x | 19.11.2 | [19.x](https://github.com/DjonnyX/ng-virtual-list/tree/19.x) | [19.11.2](https://www.npmjs.com/package/ng-virtual-list/v/19.11.2) |
|
|
698
|
+
| 18.x | 18.11.1 | [18.x](https://github.com/DjonnyX/ng-virtual-list/tree/18.x) | [18.11.1](https://www.npmjs.com/package/ng-virtual-list/v/18.11.1) |
|
|
699
|
+
| 17.x | 17.11.1 | [17.x](https://github.com/DjonnyX/ng-virtual-list/tree/17.x) | [17.11.1](https://www.npmjs.com/package/ng-virtual-list/v/17.11.1) |
|
|
700
|
+
| 16.x | 16.11.1 | [16.x](https://github.com/DjonnyX/ng-virtual-list/tree/16.x) | [16.11.1](https://www.npmjs.com/package/ng-virtual-list/v/16.11.1) |
|
|
701
|
+
| 15.x | 15.11.2 | [15.x](https://github.com/DjonnyX/ng-virtual-list/tree/15.x) | [15.11.2](https://www.npmjs.com/package/ng-virtual-list/v/15.11.2) |
|
|
702
|
+
| 14.x | 14.11.2 | [14.x](https://github.com/DjonnyX/ng-virtual-list/tree/14.x) | [14.11.2](https://www.npmjs.com/package/ng-virtual-list/v/14.11.2) |
|
|
700
703
|
<br/>
|
|
701
704
|
|
|
702
705
|
## 🤝 Contributing
|
|
@@ -1079,6 +1079,7 @@ class TrackBox extends CacheMap {
|
|
|
1079
1079
|
_resetBufferSizeTimer;
|
|
1080
1080
|
_isReseted = true;
|
|
1081
1081
|
_prerenderedCache = null;
|
|
1082
|
+
_newItems = [];
|
|
1082
1083
|
lifeCircle() {
|
|
1083
1084
|
this.fireChangeIfNeed();
|
|
1084
1085
|
this.fireTick();
|
|
@@ -1105,6 +1106,7 @@ class TrackBox extends CacheMap {
|
|
|
1105
1106
|
updateCache(previousCollection, currentCollection, itemSize) {
|
|
1106
1107
|
const trackBy = this._trackingPropertyName;
|
|
1107
1108
|
let crudDetected = false;
|
|
1109
|
+
this._newItems = [];
|
|
1108
1110
|
if (!currentCollection || currentCollection.length === 0) {
|
|
1109
1111
|
if (previousCollection) {
|
|
1110
1112
|
// deleted
|
|
@@ -1172,6 +1174,7 @@ class TrackBox extends CacheMap {
|
|
|
1172
1174
|
const item = currentCollection[i], id = item[trackBy];
|
|
1173
1175
|
if (item && !deletedMap.hasOwnProperty(id) && !updatedMap.hasOwnProperty(id) &&
|
|
1174
1176
|
!notChangedMap.hasOwnProperty(id)) {
|
|
1177
|
+
this._newItems.push(id);
|
|
1175
1178
|
// added
|
|
1176
1179
|
crudDetected = true;
|
|
1177
1180
|
this._map.set(id, { width: itemSize, height: itemSize, method: ItemDisplayMethods.CREATE });
|
|
@@ -1339,7 +1342,7 @@ class TrackBox extends CacheMap {
|
|
|
1339
1342
|
}
|
|
1340
1343
|
}
|
|
1341
1344
|
}
|
|
1342
|
-
let y = this._scrollStartOffset,
|
|
1345
|
+
let y = this._scrollStartOffset, stickyComponentSize = 0;
|
|
1343
1346
|
for (let i = 0, l = collection.length; i < l; i++) {
|
|
1344
1347
|
const ii = i + 1, collectionItem = collection[i], id = collectionItem[trackBy];
|
|
1345
1348
|
let componentSize = 0, componentSizeDelta = 0, itemDisplayMethod = ItemDisplayMethods.NOT_CHANGED;
|
|
@@ -1347,7 +1350,7 @@ class TrackBox extends CacheMap {
|
|
|
1347
1350
|
const cache = map.get(id);
|
|
1348
1351
|
componentSize = cache[sizeProperty] > 0 ? cache[sizeProperty] : typicalItemSize;
|
|
1349
1352
|
itemDisplayMethod = cache?.method ?? ItemDisplayMethods.UPDATE;
|
|
1350
|
-
const isItemNew =
|
|
1353
|
+
const isItemNew = this._newItems.indexOf(id) > -1 || (this._isLazy && isStart && !this._isReseted);
|
|
1351
1354
|
isNew = isItemNew;
|
|
1352
1355
|
if (isNew) {
|
|
1353
1356
|
isUpdating = true;
|
|
@@ -1385,7 +1388,6 @@ class TrackBox extends CacheMap {
|
|
|
1385
1388
|
if (itemById === undefined) {
|
|
1386
1389
|
if (id !== fromItemId && id === stickyItemId && itemConfigMap?.[id]?.sticky === 1) {
|
|
1387
1390
|
stickyComponentSize = componentSize;
|
|
1388
|
-
stickyCollectionItem = collectionItem;
|
|
1389
1391
|
y -= stickyComponentSize;
|
|
1390
1392
|
}
|
|
1391
1393
|
if (id === fromItemId) {
|
|
@@ -1529,9 +1531,6 @@ class TrackBox extends CacheMap {
|
|
|
1529
1531
|
refreshCache(cache) {
|
|
1530
1532
|
this._prerenderedCache = cache;
|
|
1531
1533
|
}
|
|
1532
|
-
clearDeltaDirection() {
|
|
1533
|
-
this.clearScrollDirectionCache();
|
|
1534
|
-
}
|
|
1535
1534
|
clearDelta(clearDirectionDetector = false) {
|
|
1536
1535
|
this._delta = this._deltaOfNewItems = 0;
|
|
1537
1536
|
if (clearDirectionDetector) {
|
|
@@ -1854,6 +1853,9 @@ class TrackBox extends CacheMap {
|
|
|
1854
1853
|
this._prerenderedCache = null;
|
|
1855
1854
|
}
|
|
1856
1855
|
}
|
|
1856
|
+
resetCacheChunkInfo() {
|
|
1857
|
+
this._newItems = [];
|
|
1858
|
+
}
|
|
1857
1859
|
cacheClean() {
|
|
1858
1860
|
this._map.clear();
|
|
1859
1861
|
this._snapshot.clear();
|
|
@@ -2658,7 +2660,7 @@ const DEFAULT_MAX_DISTANCE = 40;
|
|
|
2658
2660
|
* ItemClickDirective
|
|
2659
2661
|
* Maximum performance for extremely large lists.
|
|
2660
2662
|
* It is based on algorithms for virtualization of screen objects.
|
|
2661
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
2663
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/21.x/projects/ng-virtual-list/src/lib/directives/item-click/item-click.directive.ts
|
|
2662
2664
|
* @author Evgenii Alexandrovich Grebennikov
|
|
2663
2665
|
* @email djonnyx@gmail.com
|
|
2664
2666
|
*/
|
|
@@ -3851,7 +3853,7 @@ const RIGHT = 'right', DIR = 'dir';
|
|
|
3851
3853
|
* LocaleSensitiveDirective
|
|
3852
3854
|
* Maximum performance for extremely large lists.
|
|
3853
3855
|
* It is based on algorithms for virtualization of screen objects.
|
|
3854
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
3856
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/21.x/projects/ng-virtual-list/src/lib/directives/locale-sensitive/locale-sensitive.directive.ts
|
|
3855
3857
|
* @author Evgenii Alexandrovich Grebennikov
|
|
3856
3858
|
* @email djonnyx@gmail.com
|
|
3857
3859
|
*/
|
|
@@ -4387,11 +4389,11 @@ class PrerenderTrackBox extends EventEmitter {
|
|
|
4387
4389
|
* Virtual list component.
|
|
4388
4390
|
* Maximum performance for extremely large lists.
|
|
4389
4391
|
* It is based on algorithms for virtualization of screen objects.
|
|
4390
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/21.x/projects/ng-virtual-list/src/lib/components/
|
|
4392
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/21.x/projects/ng-virtual-list/src/lib/components/ng-prerender-container/components/ng-prerender-list-item.component.ts
|
|
4391
4393
|
* @author Evgenii Alexandrovich Grebennikov
|
|
4392
4394
|
* @email djonnyx@gmail.com
|
|
4393
4395
|
*/
|
|
4394
|
-
class
|
|
4396
|
+
class NgPrerenderVirtualListItemComponent extends NgVirtualListItemComponent {
|
|
4395
4397
|
update() {
|
|
4396
4398
|
const data = this._data, regular = this.regular, length = this._regularLength;
|
|
4397
4399
|
if (data) {
|
|
@@ -4443,12 +4445,12 @@ class PrerenderVirtualListItemComponent extends NgVirtualListItemComponent {
|
|
|
4443
4445
|
styles.visibility = VISIBILITY_HIDDEN;
|
|
4444
4446
|
}
|
|
4445
4447
|
}
|
|
4446
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
4447
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type:
|
|
4448
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderVirtualListItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4449
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: NgPrerenderVirtualListItemComponent, isStandalone: false, selector: "ng-prerender-virtual-list-item", host: { attributes: { "role": "listitem" }, classAttribute: "ngvl__item" }, usesInheritance: true, ngImport: i0, template: "@let renderer = itemRenderer();\r\n<div itemClick [maxClickDistance]=\"maxClickDistance()\" [part]=\"part()\" [attr.ngvl-index]=\"index()\" tabindex=\"-1\"\r\n class=\"ngvl-item__container\" [ngClass]=\"classes()\" (onClick)=\"onClickHandler()\">\r\n @if (renderer) {\r\n <ng-container [ngTemplateOutlet]=\"renderer\" [ngTemplateOutletContext]=\"templateContext()\" />\r\n }\r\n</div>", styles: [":host{display:block;position:absolute;left:0;top:0;box-sizing:border-box;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-drag:none;-moz-user-drag:none;text-rendering:optimizeSpeed;image-rendering:auto}.ngvl-item__container{margin:0;padding:0;overflow:hidden;background-color:#fff;width:inherit;height:inherit;box-sizing:border-box}\n", ":host{display:block;position:absolute!important;left:0;top:0;box-sizing:border-box;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-drag:none;-moz-user-drag:none;pointer-events:none;-webkit-user-select:none;user-select:none;text-rendering:optimizeSpeed;image-rendering:pixelated}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ItemClickDirective, selector: "[itemClick]", inputs: ["maxClickDistance"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4448
4450
|
}
|
|
4449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
4451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderVirtualListItemComponent, decorators: [{
|
|
4450
4452
|
type: Component,
|
|
4451
|
-
args: [{ selector: 'prerender-virtual-list-item', host: {
|
|
4453
|
+
args: [{ selector: 'ng-prerender-virtual-list-item', host: {
|
|
4452
4454
|
'class': 'ngvl__item',
|
|
4453
4455
|
'role': 'listitem',
|
|
4454
4456
|
}, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let renderer = itemRenderer();\r\n<div itemClick [maxClickDistance]=\"maxClickDistance()\" [part]=\"part()\" [attr.ngvl-index]=\"index()\" tabindex=\"-1\"\r\n class=\"ngvl-item__container\" [ngClass]=\"classes()\" (onClick)=\"onClickHandler()\">\r\n @if (renderer) {\r\n <ng-container [ngTemplateOutlet]=\"renderer\" [ngTemplateOutletContext]=\"templateContext()\" />\r\n }\r\n</div>", styles: [":host{display:block;position:absolute;left:0;top:0;box-sizing:border-box;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-drag:none;-moz-user-drag:none;text-rendering:optimizeSpeed;image-rendering:auto}.ngvl-item__container{margin:0;padding:0;overflow:hidden;background-color:#fff;width:inherit;height:inherit;box-sizing:border-box}\n", ":host{display:block;position:absolute!important;left:0;top:0;box-sizing:border-box;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-drag:none;-moz-user-drag:none;pointer-events:none;-webkit-user-select:none;user-select:none;text-rendering:optimizeSpeed;image-rendering:pixelated}\n"] }]
|
|
@@ -4462,7 +4464,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4462
4464
|
* @author Evgenii Alexandrovich Grebennikov
|
|
4463
4465
|
* @email djonnyx@gmail.com
|
|
4464
4466
|
*/
|
|
4465
|
-
class
|
|
4467
|
+
class NgPrerenderScrollerComponent extends BaseScrollView {
|
|
4466
4468
|
scrollBar;
|
|
4467
4469
|
langTextDir = signal(TextDirections.LTR, ...(ngDevMode ? [{ debugName: "langTextDir" }] : []));
|
|
4468
4470
|
scrollbarEnabled = input(DEFAULT_SCROLLBAR_ENABLED, ...(ngDevMode ? [{ debugName: "scrollbarEnabled" }] : []));
|
|
@@ -4542,15 +4544,15 @@ class PrerenderScrollerComponent extends BaseScrollView {
|
|
|
4542
4544
|
updateScrollBar() {
|
|
4543
4545
|
this._$updateScrollBar.next();
|
|
4544
4546
|
}
|
|
4545
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
4546
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type:
|
|
4547
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderScrollerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4548
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: NgPrerenderScrollerComponent, isStandalone: false, selector: "ng-prerender-scroller", inputs: { scrollbarEnabled: { classPropertyName: "scrollbarEnabled", publicName: "scrollbarEnabled", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
4547
4549
|
{ provide: SCROLL_VIEW_INVERSION, useValue: false },
|
|
4548
4550
|
{ provide: SCROLL_VIEW_NORMALIZE_VALUE_FROM_ZERO, useValue: true },
|
|
4549
4551
|
], viewQueries: [{ propertyName: "scrollBar", first: true, predicate: ["scrollBar"], descendants: true, read: NgScrollBarComponent }], usesInheritance: true, ngImport: i0, template: "<div localeSensitive [langTextDir]=\"langTextDir()\" [listDir]=\"direction()\" class=\"ngvl__container\"\r\n [ngClass]=\"containerClasses()\">\r\n <div #scrollViewport part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent part=\"list\" class=\"ngvl__list\" [ngClass]=\"actualClasses()\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr 0;transition:grid-template-rows .1s ease-out}.ngvl__container.horizontal.scrollable.enabled{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr 0;transition:grid-template-columns .1s ease-out}.ngvl__container.vertical.scrollable.enabled{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100%;opacity:0}.ngvl__list.prepared{opacity:1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: LocaleSensitiveDirective, selector: "[localeSensitive]", inputs: ["langTextDir", "listDir"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4550
4552
|
}
|
|
4551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
4553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderScrollerComponent, decorators: [{
|
|
4552
4554
|
type: Component,
|
|
4553
|
-
args: [{ selector: 'prerender-scroller', providers: [
|
|
4555
|
+
args: [{ selector: 'ng-prerender-scroller', providers: [
|
|
4554
4556
|
{ provide: SCROLL_VIEW_INVERSION, useValue: false },
|
|
4555
4557
|
{ provide: SCROLL_VIEW_NORMALIZE_VALUE_FROM_ZERO, useValue: true },
|
|
4556
4558
|
], standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div localeSensitive [langTextDir]=\"langTextDir()\" [listDir]=\"direction()\" class=\"ngvl__container\"\r\n [ngClass]=\"containerClasses()\">\r\n <div #scrollViewport part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent part=\"list\" class=\"ngvl__list\" [ngClass]=\"actualClasses()\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr 0;transition:grid-template-rows .1s ease-out}.ngvl__container.horizontal.scrollable.enabled{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr 0;transition:grid-template-columns .1s ease-out}.ngvl__container.vertical.scrollable.enabled{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100%;opacity:0}.ngvl__list.prepared{opacity:1}\n"] }]
|
|
@@ -4567,7 +4569,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4567
4569
|
* @author Evgenii Alexandrovich Grebennikov
|
|
4568
4570
|
* @email djonnyx@gmail.com
|
|
4569
4571
|
*/
|
|
4570
|
-
class
|
|
4572
|
+
class NgPrerenderList {
|
|
4571
4573
|
_listContainerRef;
|
|
4572
4574
|
enabled = input(false, ...(ngDevMode ? [{ debugName: "enabled" }] : []));
|
|
4573
4575
|
direction = input(DEFAULT_DIRECTION, ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
@@ -4580,7 +4582,7 @@ class PrerenderList {
|
|
|
4580
4582
|
itemSize = input(DEFAULT_ITEM_SIZE, ...(ngDevMode ? [{ debugName: "itemSize" }] : []));
|
|
4581
4583
|
trackBy = input(TRACK_BY_PROPERTY_NAME, ...(ngDevMode ? [{ debugName: "trackBy" }] : []));
|
|
4582
4584
|
itemRenderer = input(...(ngDevMode ? [undefined, { debugName: "itemRenderer" }] : []));
|
|
4583
|
-
itemComponentClass = input(
|
|
4585
|
+
itemComponentClass = input(NgPrerenderVirtualListItemComponent, ...(ngDevMode ? [{ debugName: "itemComponentClass" }] : []));
|
|
4584
4586
|
_items = signal(null, ...(ngDevMode ? [{ debugName: "_items" }] : []));
|
|
4585
4587
|
classes = signal({ prepared: true }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
|
|
4586
4588
|
_$render = new Subject();
|
|
@@ -4690,14 +4692,14 @@ class PrerenderList {
|
|
|
4690
4692
|
this._trackBox = null;
|
|
4691
4693
|
}
|
|
4692
4694
|
}
|
|
4693
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
4694
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type:
|
|
4695
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4696
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: NgPrerenderList, isStandalone: false, selector: "ng-prerender-list", inputs: { enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, isVertical: { classPropertyName: "isVertical", publicName: "isVertical", isSignal: true, isRequired: false, transformFunction: null }, scrollbarEnabled: { classPropertyName: "scrollbarEnabled", publicName: "scrollbarEnabled", isSignal: true, isRequired: false, transformFunction: null }, startOffset: { classPropertyName: "startOffset", publicName: "startOffset", isSignal: true, isRequired: false, transformFunction: null }, endOffset: { classPropertyName: "endOffset", publicName: "endOffset", isSignal: true, isRequired: false, transformFunction: null }, bounds: { classPropertyName: "bounds", publicName: "bounds", isSignal: true, isRequired: true, transformFunction: null }, dynamic: { classPropertyName: "dynamic", publicName: "dynamic", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, itemRenderer: { classPropertyName: "itemRenderer", publicName: "itemRenderer", isSignal: true, isRequired: false, transformFunction: null }, itemComponentClass: { classPropertyName: "itemComponentClass", publicName: "itemComponentClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "position: relative;" }, viewQueries: [{ propertyName: "_listContainerRef", first: true, predicate: ["renderersContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<ng-prerender-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [direction]=\"direction()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [startOffset]=\"startOffset()\" [endOffset]=\"endOffset()\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-prerender-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n", ":host{width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: NgPrerenderScrollerComponent, selector: "ng-prerender-scroller", inputs: ["scrollbarEnabled", "classes"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
|
|
4695
4697
|
}
|
|
4696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
4698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderList, decorators: [{
|
|
4697
4699
|
type: Component,
|
|
4698
|
-
args: [{ selector: 'prerender-list', host: {
|
|
4700
|
+
args: [{ selector: 'ng-prerender-list', host: {
|
|
4699
4701
|
'style': 'position: relative;'
|
|
4700
|
-
}, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, template: "<prerender-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [direction]=\"direction()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [startOffset]=\"startOffset()\" [endOffset]=\"endOffset()\">\r\n <ng-container #renderersContainer></ng-container>\r\n</prerender-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n", ":host{width:100%;height:100%}\n"] }]
|
|
4702
|
+
}, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, template: "<ng-prerender-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [direction]=\"direction()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [startOffset]=\"startOffset()\" [endOffset]=\"endOffset()\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-prerender-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n", ":host{width:100%;height:100%}\n"] }]
|
|
4701
4703
|
}], ctorParameters: () => [], propDecorators: { _listContainerRef: [{
|
|
4702
4704
|
type: ViewChild,
|
|
4703
4705
|
args: ['renderersContainer', { read: ViewContainerRef }]
|
|
@@ -4707,11 +4709,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4707
4709
|
* Prerender container.
|
|
4708
4710
|
* Maximum performance for extremely large lists.
|
|
4709
4711
|
* It is based on algorithms for virtualization of screen objects.
|
|
4710
|
-
* @link https://github.com/DjonnyX/ng-virtual-list/blob/21.x/projects/ng-virtual-list/src/lib/prerender-container/prerender-container.component.ts
|
|
4712
|
+
* @link https://github.com/DjonnyX/ng-virtual-list/blob/21.x/projects/ng-virtual-list/src/lib/ng-prerender-container/ng-prerender-container.component.ts
|
|
4711
4713
|
* @author Evgenii Alexandrovich Grebennikov
|
|
4712
4714
|
* @email djonnyx@gmail.com
|
|
4713
4715
|
*/
|
|
4714
|
-
class
|
|
4716
|
+
class NgPrerenderContainer {
|
|
4715
4717
|
_list = viewChild('list', ...(ngDevMode ? [{ debugName: "_list" }] : []));
|
|
4716
4718
|
enabled = input(false, ...(ngDevMode ? [{ debugName: "enabled" }] : []));
|
|
4717
4719
|
direction = input(DEFAULT_DIRECTION, ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
@@ -4750,14 +4752,14 @@ class PrerenderContainer {
|
|
|
4750
4752
|
list.off();
|
|
4751
4753
|
}
|
|
4752
4754
|
}
|
|
4753
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
4754
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type:
|
|
4755
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4756
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: NgPrerenderContainer, isStandalone: false, selector: "ng-prerender-container", inputs: { enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, isVertical: { classPropertyName: "isVertical", publicName: "isVertical", isSignal: true, isRequired: false, transformFunction: null }, scrollbarEnabled: { classPropertyName: "scrollbarEnabled", publicName: "scrollbarEnabled", isSignal: true, isRequired: false, transformFunction: null }, startOffset: { classPropertyName: "startOffset", publicName: "startOffset", isSignal: true, isRequired: false, transformFunction: null }, endOffset: { classPropertyName: "endOffset", publicName: "endOffset", isSignal: true, isRequired: false, transformFunction: null }, bounds: { classPropertyName: "bounds", publicName: "bounds", isSignal: true, isRequired: true, transformFunction: null }, dynamic: { classPropertyName: "dynamic", publicName: "dynamic", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, itemRenderer: { classPropertyName: "itemRenderer", publicName: "itemRenderer", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "position: relative;" }, viewQueries: [{ propertyName: "_list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-prerender-list #list [bounds]=\"bounds()!\" [direction]=\"direction()\" [dynamic]=\"dynamic()\"\r\n [isVertical]=\"isVertical()\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\" [itemRenderer]=\"itemRenderer()\"\r\n [startOffset]=\"startOffset()\" [endOffset]=\"endOffset()\" [scrollbarEnabled]=\"scrollbarEnabled()\"\r\n [enabled]=\"enabled()\" />", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n", ":host{visibility:hidden;height:0!important;width:0!important;overflow:hidden}\n"], dependencies: [{ kind: "component", type: NgPrerenderList, selector: "ng-prerender-list", inputs: ["enabled", "direction", "isVertical", "scrollbarEnabled", "startOffset", "endOffset", "bounds", "dynamic", "itemSize", "trackBy", "itemRenderer", "itemComponentClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
|
|
4755
4757
|
}
|
|
4756
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
4758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderContainer, decorators: [{
|
|
4757
4759
|
type: Component,
|
|
4758
|
-
args: [{ selector: 'prerender-container', host: {
|
|
4760
|
+
args: [{ selector: 'ng-prerender-container', host: {
|
|
4759
4761
|
'style': 'position: relative;'
|
|
4760
|
-
}, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, template: "<prerender-list #list [bounds]=\"bounds()!\" [direction]=\"direction()\" [dynamic]=\"dynamic()\"\r\n [isVertical]=\"isVertical()\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\" [itemRenderer]=\"itemRenderer()\"\r\n [startOffset]=\"startOffset()\" [endOffset]=\"endOffset()\" [scrollbarEnabled]=\"scrollbarEnabled()\"\r\n [enabled]=\"enabled()\" />", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n", ":host{visibility:hidden;height:0!important;width:0!important;overflow:hidden}\n"] }]
|
|
4762
|
+
}, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, template: "<ng-prerender-list #list [bounds]=\"bounds()!\" [direction]=\"direction()\" [dynamic]=\"dynamic()\"\r\n [isVertical]=\"isVertical()\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\" [itemRenderer]=\"itemRenderer()\"\r\n [startOffset]=\"startOffset()\" [endOffset]=\"endOffset()\" [scrollbarEnabled]=\"scrollbarEnabled()\"\r\n [enabled]=\"enabled()\" />", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n", ":host{visibility:hidden;height:0!important;width:0!important;overflow:hidden}\n"] }]
|
|
4761
4763
|
}], ctorParameters: () => [], propDecorators: { _list: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }], enabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "enabled", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], isVertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "isVertical", required: false }] }], scrollbarEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollbarEnabled", required: false }] }], startOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "startOffset", required: false }] }], endOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "endOffset", required: false }] }], bounds: [{ type: i0.Input, args: [{ isSignal: true, alias: "bounds", required: true }] }], dynamic: [{ type: i0.Input, args: [{ isSignal: true, alias: "dynamic", required: false }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], itemRenderer: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemRenderer", required: false }] }] } });
|
|
4762
4764
|
|
|
4763
4765
|
/**
|
|
@@ -5734,8 +5736,8 @@ class NgVirtualListComponent {
|
|
|
5734
5736
|
$fireUpdate.pipe(takeUntilDestroyed(), tap(userAction => {
|
|
5735
5737
|
hasUserAction = userAction;
|
|
5736
5738
|
})).subscribe();
|
|
5737
|
-
let renderStabilizerPrevScrollStateVersion = EMPTY_SCROLL_STATE_VERSION, renderStabilizerUpdateIterations = 0;
|
|
5738
5739
|
const $update = this.$update, renderStabilizer = (options) => {
|
|
5740
|
+
let renderStabilizerPrevScrollStateVersion = EMPTY_SCROLL_STATE_VERSION, renderStabilizerUpdateIterations = 0;
|
|
5739
5741
|
const prepareIterations = options?.prepareIterations ?? PREPARE_ITERATIONS, prepareReupdateLength = options?.prepareReupdateLength ?? PREPARATION_REUPDATE_LENGTH;
|
|
5740
5742
|
return of(null).pipe(takeUntilDestroyed(this._destroyRef), switchMap$1(() => {
|
|
5741
5743
|
renderStabilizerPrevScrollStateVersion = EMPTY_SCROLL_STATE_VERSION;
|
|
@@ -5768,6 +5770,9 @@ class NgVirtualListComponent {
|
|
|
5768
5770
|
}), $updateItemsRenderStabilizer = renderStabilizer({
|
|
5769
5771
|
prepareIterations: PREPARE_ITERATIONS_FOR_UPDATE_ITEMS,
|
|
5770
5772
|
prepareReupdateLength: PREPARATION_REUPDATE_LENGTH_FOR_UPDATE_ITEMS,
|
|
5773
|
+
}), $chunkLoadingRenderStabilizer = renderStabilizer({
|
|
5774
|
+
prepareIterations: PREPARE_ITERATIONS_FOR_UPDATE_ITEMS,
|
|
5775
|
+
prepareReupdateLength: PREPARATION_REUPDATE_LENGTH_FOR_UPDATE_ITEMS,
|
|
5771
5776
|
}), $collapseItemsRenderStabilizer = renderStabilizer({
|
|
5772
5777
|
prepareIterations: PREPARE_ITERATIONS_FOR_COLLAPSE_ITEMS,
|
|
5773
5778
|
prepareReupdateLength: PREPARATION_REUPDATE_LENGTH_FOR_COLLAPSE_ITEMS,
|
|
@@ -6041,11 +6046,26 @@ class NgVirtualListComponent {
|
|
|
6041
6046
|
this._$fireUpdate.next(true);
|
|
6042
6047
|
}));
|
|
6043
6048
|
})).subscribe();
|
|
6049
|
+
let isChunkLoading = false;
|
|
6044
6050
|
const $loading = toObservable(this.loading);
|
|
6045
6051
|
$loading.pipe(takeUntilDestroyed(), distinctUntilChanged(), skip(1), filter$1(v => !v), switchMap$1(() => {
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6052
|
+
isChunkLoading = true;
|
|
6053
|
+
const scrollbar = this._scrollerComponent();
|
|
6054
|
+
if (!!scrollbar) {
|
|
6055
|
+
scrollbar.stopScrollbar();
|
|
6056
|
+
scrollbar.refreshScrollbar();
|
|
6057
|
+
}
|
|
6058
|
+
return $actualItems.pipe(takeUntilDestroyed(this._destroyRef), take(1), tap(() => {
|
|
6059
|
+
this._$fireUpdateNextFrame.next(true);
|
|
6060
|
+
}), switchMap$1(() => $chunkLoadingRenderStabilizer.pipe(takeUntilDestroyed(this._destroyRef), take(1), tap(() => {
|
|
6061
|
+
isChunkLoading = false;
|
|
6062
|
+
this._trackBox.resetCacheChunkInfo();
|
|
6063
|
+
const scrollbar = this._scrollerComponent();
|
|
6064
|
+
if (!!scrollbar) {
|
|
6065
|
+
scrollbar.stopScrollbar();
|
|
6066
|
+
scrollbar.refreshScrollbar();
|
|
6067
|
+
}
|
|
6068
|
+
}))));
|
|
6049
6069
|
})).subscribe();
|
|
6050
6070
|
$loading.pipe(takeUntilDestroyed(), skip(1), distinctUntilChanged(), tap(v => {
|
|
6051
6071
|
if (v) {
|
|
@@ -6063,7 +6083,7 @@ class NgVirtualListComponent {
|
|
|
6063
6083
|
const scroller = this._scrollerComponent();
|
|
6064
6084
|
let totalSize = 0;
|
|
6065
6085
|
if (scroller) {
|
|
6066
|
-
const collapsable = collapsedIds.length > 0, cachable = this.cachable, cached = this._cached, waitingCache = cachable && !cached, emitUpdate = !this._readyForShow || waitingCache || collapsable;
|
|
6086
|
+
const collapsable = collapsedIds.length > 0, cachable = this.cachable, cached = this._cached, waitingCache = cachable && !cached, emitUpdate = !this._readyForShow || waitingCache || collapsable || isChunkLoading;
|
|
6067
6087
|
if (this._readyForShow || (cachable && cached)) {
|
|
6068
6088
|
const currentScrollSize = (isVertical ? scroller.scrollTop ?? 0 : scroller.scrollLeft ?? 0), fireUpdate = emitUpdate || reupdate || (!optimization && !userAction) || this._$scrollingTo.getValue();
|
|
6069
6089
|
let actualScrollSize = !this._readyForShow && snapScrollToEnd ? (isVertical ? scroller.scrollHeight ?? 0 : scroller.scrollWidth ?? 0) :
|
|
@@ -6137,23 +6157,22 @@ class NgVirtualListComponent {
|
|
|
6137
6157
|
this._trackBox.isScrollEnd;
|
|
6138
6158
|
return;
|
|
6139
6159
|
}
|
|
6140
|
-
if (scrollPositionAfterUpdate >= 0 && scrollPositionAfterUpdate < roundedMaxPositionAfterUpdate)
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
}
|
|
6160
|
+
if ((scrollPositionAfterUpdate >= 0 && scrollPositionAfterUpdate < roundedMaxPositionAfterUpdate) ||
|
|
6161
|
+
(scrollSize !== roundedMaxPositionAfterUpdate || currentScrollSize !== scrollPositionAfterUpdate)) {
|
|
6162
|
+
this._trackBox.clearDelta();
|
|
6163
|
+
if (this._readyForShow) {
|
|
6164
|
+
this.emitScrollEvent(true, false, userAction);
|
|
6165
|
+
}
|
|
6166
|
+
const params = {
|
|
6167
|
+
[isVertical ? TOP_PROP_NAME : LEFT_PROP_NAME]: scrollPositionAfterUpdate, blending: true, userAction,
|
|
6168
|
+
fireUpdate, behavior: BEHAVIOR_INSTANT, duration: this.animationParams().scrollToItem,
|
|
6169
|
+
};
|
|
6170
|
+
scroller.scrollTo(params);
|
|
6171
|
+
if (emitUpdate) {
|
|
6172
|
+
this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
|
|
6154
6173
|
}
|
|
6155
|
-
return;
|
|
6156
6174
|
}
|
|
6175
|
+
return;
|
|
6157
6176
|
}
|
|
6158
6177
|
if (emitUpdate) {
|
|
6159
6178
|
this._$update.next(this.getScrollStateVersion(totalSize, this._isVertical ? scroller.scrollTop : scroller.scrollLeft, cacheVersion));
|
|
@@ -6763,13 +6782,13 @@ class NgVirtualListComponent {
|
|
|
6763
6782
|
}
|
|
6764
6783
|
}
|
|
6765
6784
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgVirtualListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6766
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: NgVirtualListComponent, isStandalone: false, selector: "ng-virtual-list", inputs: { scrollbarThickness: { classPropertyName: "scrollbarThickness", publicName: "scrollbarThickness", isSignal: true, isRequired: false, transformFunction: null }, scrollbarMinSize: { classPropertyName: "scrollbarMinSize", publicName: "scrollbarMinSize", isSignal: true, isRequired: false, transformFunction: null }, scrollbarThumbRenderer: { classPropertyName: "scrollbarThumbRenderer", publicName: "scrollbarThumbRenderer", isSignal: true, isRequired: false, transformFunction: null }, scrollbarThumbParams: { classPropertyName: "scrollbarThumbParams", publicName: "scrollbarThumbParams", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, waitForPreparation: { classPropertyName: "waitForPreparation", publicName: "waitForPreparation", isSignal: true, isRequired: false, transformFunction: null }, clickDistance: { classPropertyName: "clickDistance", publicName: "clickDistance", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, defaultItemValue: { classPropertyName: "defaultItemValue", publicName: "defaultItemValue", isSignal: true, isRequired: false, 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 }, snapToEndTransitionInstantOffset: { classPropertyName: "snapToEndTransitionInstantOffset", publicName: "snapToEndTransitionInstantOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollStartOffset: { classPropertyName: "scrollStartOffset", publicName: "scrollStartOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollEndOffset: { classPropertyName: "scrollEndOffset", publicName: "scrollEndOffset", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToStart: { classPropertyName: "snapScrollToStart", publicName: "snapScrollToStart", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToEnd: { classPropertyName: "snapScrollToEnd", publicName: "snapScrollToEnd", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToBottom: { classPropertyName: "snapScrollToBottom", publicName: "snapScrollToBottom", isSignal: true, isRequired: false, transformFunction: null }, scrollbarEnabled: { classPropertyName: "scrollbarEnabled", publicName: "scrollbarEnabled", isSignal: true, isRequired: false, transformFunction: null }, scrollbarInteractive: { classPropertyName: "scrollbarInteractive", publicName: "scrollbarInteractive", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, animationParams: { classPropertyName: "animationParams", publicName: "animationParams", isSignal: true, isRequired: false, transformFunction: null }, overscrollEnabled: { classPropertyName: "overscrollEnabled", publicName: "overscrollEnabled", 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 }, screenReaderMessage: { classPropertyName: "screenReaderMessage", publicName: "screenReaderMessage", isSignal: true, isRequired: false, transformFunction: null }, langTextDir: { classPropertyName: "langTextDir", publicName: "langTextDir", 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, NgVirtualListPublicService], viewQueries: [{ propertyName: "_prerender", first: true, predicate: ["prerender"], descendants: true, isSignal: true }, { propertyName: "_scrollerComponent", first: true, predicate: ["scroller"], 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: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ screenReaderFormattedMessage() }}\r\n</div>\r\n\r\n<prerender-container #prerender [bounds]=\"bounds()!\" [direction]=\"direction()\"\r\n [dynamic]=\"dynamicSize()\" [isVertical]=\"isVertical\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\"\r\n [itemRenderer]=\"itemRenderer()\" [startOffset]=\"scrollStartOffset()\" [endOffset]=\"scrollEndOffset()\"\r\n [scrollbarEnabled]=\"scroller.scrollbarShow()\" [enabled]=\"dynamicSize() && snapScrollToEnd()\" />\r\n\r\n@if (snap()) {\r\n <div localeSensitive [langTextDir]=\"langTextDir()\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"classes()\">\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n </div>\r\n}\r\n<ng-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [startOffset]=\"scrollStartOffset()\"\r\n [direction]=\"direction()\" [endOffset]=\"scrollEndOffset()\" [scrollbarThumbRenderer]=\"scrollbarThumbRenderer()\"\r\n [scrollbarThickness]=\"scrollbarThickness()\" [scrollbarThumbParams]=\"scrollbarThumbParams()\"\r\n [focusedElement]=\"focusedElement()\" [loading]=\"loading()\" [overscrollEnabled]=\"overscrollEnabled()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [scrollbarInteractive]=\"scrollbarInteractive()\"\r\n [scrollbarMinSize]=\"scrollbarMinSize()\" [scrollBehavior]=\"scrollBehavior()\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgScrollerComponent, selector: "ng-scroller", inputs: ["scrollbarEnabled", "scrollbarInteractive", "focusedElement", "content", "loading", "classes", "scrollbarMinSize", "scrollbarThickness", "scrollbarThumbRenderer", "scrollbarThumbParams"], outputs: ["onScrollbarVisible"] }, { kind: "component", type:
|
|
6785
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: NgVirtualListComponent, isStandalone: false, selector: "ng-virtual-list", inputs: { scrollbarThickness: { classPropertyName: "scrollbarThickness", publicName: "scrollbarThickness", isSignal: true, isRequired: false, transformFunction: null }, scrollbarMinSize: { classPropertyName: "scrollbarMinSize", publicName: "scrollbarMinSize", isSignal: true, isRequired: false, transformFunction: null }, scrollbarThumbRenderer: { classPropertyName: "scrollbarThumbRenderer", publicName: "scrollbarThumbRenderer", isSignal: true, isRequired: false, transformFunction: null }, scrollbarThumbParams: { classPropertyName: "scrollbarThumbParams", publicName: "scrollbarThumbParams", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, waitForPreparation: { classPropertyName: "waitForPreparation", publicName: "waitForPreparation", isSignal: true, isRequired: false, transformFunction: null }, clickDistance: { classPropertyName: "clickDistance", publicName: "clickDistance", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, defaultItemValue: { classPropertyName: "defaultItemValue", publicName: "defaultItemValue", isSignal: true, isRequired: false, 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 }, snapToEndTransitionInstantOffset: { classPropertyName: "snapToEndTransitionInstantOffset", publicName: "snapToEndTransitionInstantOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollStartOffset: { classPropertyName: "scrollStartOffset", publicName: "scrollStartOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollEndOffset: { classPropertyName: "scrollEndOffset", publicName: "scrollEndOffset", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToStart: { classPropertyName: "snapScrollToStart", publicName: "snapScrollToStart", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToEnd: { classPropertyName: "snapScrollToEnd", publicName: "snapScrollToEnd", isSignal: true, isRequired: false, transformFunction: null }, snapScrollToBottom: { classPropertyName: "snapScrollToBottom", publicName: "snapScrollToBottom", isSignal: true, isRequired: false, transformFunction: null }, scrollbarEnabled: { classPropertyName: "scrollbarEnabled", publicName: "scrollbarEnabled", isSignal: true, isRequired: false, transformFunction: null }, scrollbarInteractive: { classPropertyName: "scrollbarInteractive", publicName: "scrollbarInteractive", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, animationParams: { classPropertyName: "animationParams", publicName: "animationParams", isSignal: true, isRequired: false, transformFunction: null }, overscrollEnabled: { classPropertyName: "overscrollEnabled", publicName: "overscrollEnabled", 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 }, screenReaderMessage: { classPropertyName: "screenReaderMessage", publicName: "screenReaderMessage", isSignal: true, isRequired: false, transformFunction: null }, langTextDir: { classPropertyName: "langTextDir", publicName: "langTextDir", 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, NgVirtualListPublicService], viewQueries: [{ propertyName: "_prerender", first: true, predicate: ["prerender"], descendants: true, isSignal: true }, { propertyName: "_scrollerComponent", first: true, predicate: ["scroller"], 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: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ screenReaderFormattedMessage() }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"bounds()!\" [direction]=\"direction()\"\r\n [dynamic]=\"dynamicSize()\" [isVertical]=\"isVertical\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\"\r\n [itemRenderer]=\"itemRenderer()\" [startOffset]=\"scrollStartOffset()\" [endOffset]=\"scrollEndOffset()\"\r\n [scrollbarEnabled]=\"scroller.scrollbarShow()\" [enabled]=\"dynamicSize() && snapScrollToEnd()\" />\r\n\r\n@if (snap()) {\r\n <div localeSensitive [langTextDir]=\"langTextDir()\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"classes()\">\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n </div>\r\n}\r\n<ng-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [startOffset]=\"scrollStartOffset()\"\r\n [direction]=\"direction()\" [endOffset]=\"scrollEndOffset()\" [scrollbarThumbRenderer]=\"scrollbarThumbRenderer()\"\r\n [scrollbarThickness]=\"scrollbarThickness()\" [scrollbarThumbParams]=\"scrollbarThumbParams()\"\r\n [focusedElement]=\"focusedElement()\" [loading]=\"loading()\" [overscrollEnabled]=\"overscrollEnabled()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [scrollbarInteractive]=\"scrollbarInteractive()\"\r\n [scrollbarMinSize]=\"scrollbarMinSize()\" [scrollBehavior]=\"scrollBehavior()\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgScrollerComponent, selector: "ng-scroller", inputs: ["scrollbarEnabled", "scrollbarInteractive", "focusedElement", "content", "loading", "classes", "scrollbarMinSize", "scrollbarThickness", "scrollbarThumbRenderer", "scrollbarThumbParams"], outputs: ["onScrollbarVisible"] }, { kind: "component", type: NgPrerenderContainer, selector: "ng-prerender-container", inputs: ["enabled", "direction", "isVertical", "scrollbarEnabled", "startOffset", "endOffset", "bounds", "dynamic", "itemSize", "trackBy", "itemRenderer"] }, { kind: "directive", type: LocaleSensitiveDirective, selector: "[localeSensitive]", inputs: ["langTextDir", "listDir"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
|
|
6767
6786
|
}
|
|
6768
6787
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgVirtualListComponent, decorators: [{
|
|
6769
6788
|
type: Component,
|
|
6770
6789
|
args: [{ selector: 'ng-virtual-list', host: {
|
|
6771
6790
|
'style': 'position: relative;'
|
|
6772
|
-
}, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, providers: [NgVirtualListService, NgVirtualListPublicService], template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ screenReaderFormattedMessage() }}\r\n</div>\r\n\r\n<prerender-container #prerender [bounds]=\"bounds()!\" [direction]=\"direction()\"\r\n [dynamic]=\"dynamicSize()\" [isVertical]=\"isVertical\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\"\r\n [itemRenderer]=\"itemRenderer()\" [startOffset]=\"scrollStartOffset()\" [endOffset]=\"scrollEndOffset()\"\r\n [scrollbarEnabled]=\"scroller.scrollbarShow()\" [enabled]=\"dynamicSize() && snapScrollToEnd()\" />\r\n\r\n@if (snap()) {\r\n <div localeSensitive [langTextDir]=\"langTextDir()\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"classes()\">\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n </div>\r\n}\r\n<ng-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [startOffset]=\"scrollStartOffset()\"\r\n [direction]=\"direction()\" [endOffset]=\"scrollEndOffset()\" [scrollbarThumbRenderer]=\"scrollbarThumbRenderer()\"\r\n [scrollbarThickness]=\"scrollbarThickness()\" [scrollbarThumbParams]=\"scrollbarThumbParams()\"\r\n [focusedElement]=\"focusedElement()\" [loading]=\"loading()\" [overscrollEnabled]=\"overscrollEnabled()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [scrollbarInteractive]=\"scrollbarInteractive()\"\r\n [scrollbarMinSize]=\"scrollbarMinSize()\" [scrollBehavior]=\"scrollBehavior()\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
|
|
6791
|
+
}, standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, providers: [NgVirtualListService, NgVirtualListPublicService], template: "<div aria-live=\"polite\" aria-atomic=\"true\" class=\"ngvl__screen-reader\">\r\n {{ screenReaderFormattedMessage() }}\r\n</div>\r\n\r\n<ng-prerender-container #prerender [bounds]=\"bounds()!\" [direction]=\"direction()\"\r\n [dynamic]=\"dynamicSize()\" [isVertical]=\"isVertical\" [itemSize]=\"itemSize()\" [trackBy]=\"trackBy()\"\r\n [itemRenderer]=\"itemRenderer()\" [startOffset]=\"scrollStartOffset()\" [endOffset]=\"scrollEndOffset()\"\r\n [scrollbarEnabled]=\"scroller.scrollbarShow()\" [enabled]=\"dynamicSize() && snapScrollToEnd()\" />\r\n\r\n@if (snap()) {\r\n <div localeSensitive [langTextDir]=\"langTextDir()\" #snappedContainer class=\"ngvl__snapped-container\"\r\n [ngClass]=\"classes()\">\r\n <div #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n </div>\r\n </div>\r\n}\r\n<ng-scroller #scroller class=\"ngvl__list-scroller\" [classes]=\"classes()\" [startOffset]=\"scrollStartOffset()\"\r\n [direction]=\"direction()\" [endOffset]=\"scrollEndOffset()\" [scrollbarThumbRenderer]=\"scrollbarThumbRenderer()\"\r\n [scrollbarThickness]=\"scrollbarThickness()\" [scrollbarThumbParams]=\"scrollbarThumbParams()\"\r\n [focusedElement]=\"focusedElement()\" [loading]=\"loading()\" [overscrollEnabled]=\"overscrollEnabled()\"\r\n [scrollbarEnabled]=\"scrollbarEnabled()\" [scrollbarInteractive]=\"scrollbarInteractive()\"\r\n [scrollbarMinSize]=\"scrollbarMinSize()\" [scrollBehavior]=\"scrollBehavior()\">\r\n <ng-container #renderersContainer></ng-container>\r\n</ng-scroller>", styles: [":host{position:relative;display:block;width:400px;overflow:hidden}:host(.horizontal){height:48px}:host(.vertical){height:320px}.ngvl__snapped-container{position:relative;width:100%;opacity:0}.ngvl__snapped-container.prepared{opacity:1}.ngvl__list-snapper{-webkit-tap-highlight-color:transparent;pointer-events:none;position:absolute;list-style:none;left:0;top:0;z-index:1}.ngvl__list-scroller{-webkit-tap-highlight-color:transparent;position:absolute;left:0;top:0;width:100%;height:100%;z-index:0}.ngvl__screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
|
|
6773
6792
|
}], ctorParameters: () => [], propDecorators: { _prerender: [{ type: i0.ViewChild, args: ['prerender', { isSignal: true }] }], _listContainerRef: [{
|
|
6774
6793
|
type: ViewChild,
|
|
6775
6794
|
args: ['renderersContainer', { read: ViewContainerRef }]
|
|
@@ -6853,77 +6872,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6853
6872
|
}]
|
|
6854
6873
|
}] });
|
|
6855
6874
|
|
|
6856
|
-
class
|
|
6857
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6858
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6859
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6875
|
+
class NgPrerenderVirtualListItemModule {
|
|
6876
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderVirtualListItemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6877
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderVirtualListItemModule, declarations: [NgPrerenderVirtualListItemComponent], imports: [CommonModule, ItemClickModule], exports: [NgPrerenderVirtualListItemComponent] });
|
|
6878
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderVirtualListItemModule, imports: [CommonModule, ItemClickModule] });
|
|
6860
6879
|
}
|
|
6861
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderVirtualListItemModule, decorators: [{
|
|
6862
6881
|
type: NgModule,
|
|
6863
6882
|
args: [{
|
|
6864
|
-
declarations: [
|
|
6865
|
-
exports: [
|
|
6883
|
+
declarations: [NgPrerenderVirtualListItemComponent],
|
|
6884
|
+
exports: [NgPrerenderVirtualListItemComponent],
|
|
6866
6885
|
imports: [CommonModule, ItemClickModule],
|
|
6867
6886
|
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
|
|
6868
6887
|
}]
|
|
6869
6888
|
}] });
|
|
6870
6889
|
|
|
6871
|
-
class
|
|
6872
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6873
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6874
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6890
|
+
class NgPrerenderScrollerModule {
|
|
6891
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderScrollerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6892
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderScrollerModule, declarations: [NgPrerenderScrollerComponent], imports: [CommonModule, LocaleSensitiveModule], exports: [NgPrerenderScrollerComponent] });
|
|
6893
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderScrollerModule, imports: [CommonModule, LocaleSensitiveModule] });
|
|
6875
6894
|
}
|
|
6876
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderScrollerModule, decorators: [{
|
|
6877
6896
|
type: NgModule,
|
|
6878
6897
|
args: [{
|
|
6879
|
-
declarations: [
|
|
6880
|
-
exports: [
|
|
6898
|
+
declarations: [NgPrerenderScrollerComponent],
|
|
6899
|
+
exports: [NgPrerenderScrollerComponent],
|
|
6881
6900
|
imports: [CommonModule, LocaleSensitiveModule],
|
|
6882
6901
|
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
|
|
6883
6902
|
}]
|
|
6884
6903
|
}] });
|
|
6885
6904
|
|
|
6886
|
-
class
|
|
6887
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6888
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6889
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6905
|
+
class NgPrerenderListModule {
|
|
6906
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6907
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderListModule, declarations: [NgPrerenderList], imports: [CommonModule, NgPrerenderVirtualListItemModule, NgPrerenderScrollerModule], exports: [NgPrerenderList] });
|
|
6908
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderListModule, imports: [CommonModule, NgPrerenderVirtualListItemModule, NgPrerenderScrollerModule] });
|
|
6890
6909
|
}
|
|
6891
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6910
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderListModule, decorators: [{
|
|
6892
6911
|
type: NgModule,
|
|
6893
6912
|
args: [{
|
|
6894
|
-
declarations: [
|
|
6895
|
-
exports: [
|
|
6896
|
-
imports: [CommonModule,
|
|
6913
|
+
declarations: [NgPrerenderList],
|
|
6914
|
+
exports: [NgPrerenderList],
|
|
6915
|
+
imports: [CommonModule, NgPrerenderVirtualListItemModule, NgPrerenderScrollerModule],
|
|
6897
6916
|
schemas: [NO_ERRORS_SCHEMA],
|
|
6898
6917
|
}]
|
|
6899
6918
|
}] });
|
|
6900
6919
|
|
|
6901
|
-
class
|
|
6902
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6903
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6904
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6920
|
+
class NgPrerenderContainerModule {
|
|
6921
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderContainerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6922
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderContainerModule, declarations: [NgPrerenderContainer], imports: [CommonModule, NgPrerenderListModule], exports: [NgPrerenderContainer] });
|
|
6923
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderContainerModule, imports: [CommonModule, NgPrerenderListModule] });
|
|
6905
6924
|
}
|
|
6906
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type:
|
|
6925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgPrerenderContainerModule, decorators: [{
|
|
6907
6926
|
type: NgModule,
|
|
6908
6927
|
args: [{
|
|
6909
|
-
declarations: [
|
|
6910
|
-
exports: [
|
|
6911
|
-
imports: [CommonModule,
|
|
6928
|
+
declarations: [NgPrerenderContainer],
|
|
6929
|
+
exports: [NgPrerenderContainer],
|
|
6930
|
+
imports: [CommonModule, NgPrerenderListModule],
|
|
6912
6931
|
schemas: [NO_ERRORS_SCHEMA],
|
|
6913
6932
|
}]
|
|
6914
6933
|
}] });
|
|
6915
6934
|
|
|
6916
6935
|
class NgVirtualListModule {
|
|
6917
6936
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgVirtualListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6918
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: NgVirtualListModule, declarations: [NgVirtualListComponent], imports: [CommonModule, NgVirtualListItemModule, NgScrollerModule,
|
|
6919
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgVirtualListModule, imports: [CommonModule, NgVirtualListItemModule, NgScrollerModule,
|
|
6937
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: NgVirtualListModule, declarations: [NgVirtualListComponent], imports: [CommonModule, NgVirtualListItemModule, NgScrollerModule, NgPrerenderContainerModule, LocaleSensitiveModule], exports: [NgVirtualListComponent] });
|
|
6938
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgVirtualListModule, imports: [CommonModule, NgVirtualListItemModule, NgScrollerModule, NgPrerenderContainerModule, LocaleSensitiveModule] });
|
|
6920
6939
|
}
|
|
6921
6940
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NgVirtualListModule, decorators: [{
|
|
6922
6941
|
type: NgModule,
|
|
6923
6942
|
args: [{
|
|
6924
6943
|
declarations: [NgVirtualListComponent],
|
|
6925
6944
|
exports: [NgVirtualListComponent],
|
|
6926
|
-
imports: [CommonModule, NgVirtualListItemModule, NgScrollerModule,
|
|
6945
|
+
imports: [CommonModule, NgVirtualListItemModule, NgScrollerModule, NgPrerenderContainerModule, LocaleSensitiveModule],
|
|
6927
6946
|
schemas: [NO_ERRORS_SCHEMA],
|
|
6928
6947
|
}]
|
|
6929
6948
|
}] });
|