ng-virtual-list 19.7.2 → 19.7.3
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 +2 -1
- package/fesm2022/ng-virtual-list.mjs +83 -14
- package/fesm2022/ng-virtual-list.mjs.map +1 -1
- package/lib/components/ng-virtual-list-item.component.d.ts +17 -1
- package/lib/const/index.d.ts +1 -0
- package/lib/ng-virtual-list.component.d.ts +6 -1
- package/lib/ng-virtual-list.service.d.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -536,7 +536,8 @@ Inputs
|
|
|
536
536
|
| maxBufferSize | number? = 100 | Maximum number of elements outside the scope of visibility. Default value is 100. If maxBufferSize is set to be greater than bufferSize, then adaptive buffer mode is enabled. The greater the scroll size, the more elements are allocated for rendering. |
|
|
537
537
|
| itemRenderer | TemplateRef | Rendering element template. |
|
|
538
538
|
| 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. |
|
|
539
|
-
| itemConfigMap | [IVirtualListItemConfigMap?](https://github.com/DjonnyX/ng-virtual-list/blob/
|
|
539
|
+
| 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`. |
|
|
540
|
+
| 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`. |
|
|
540
541
|
| snap | boolean? = false | Determines whether elements will snap. Default value is "false". |
|
|
541
542
|
| 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. |
|
|
542
543
|
| direction | [Direction? = 'vertical'](https://github.com/DjonnyX/ng-virtual-list/blob/19.x/projects/ng-virtual-list/src/lib/enums/direction.ts) | Determines the direction in which elements are placed. Default value is "vertical". |
|
|
@@ -69,6 +69,7 @@ const DEFAULT_BUFFER_SIZE = 2;
|
|
|
69
69
|
const DEFAULT_MAX_BUFFER_SIZE = 100;
|
|
70
70
|
const DEFAULT_LIST_SIZE = 400;
|
|
71
71
|
const DEFAULT_SNAP = false;
|
|
72
|
+
const DEFAULT_SELECT_BY_CLICK = true;
|
|
72
73
|
const DEFAULT_ENABLED_BUFFER_OPTIMIZATION = false;
|
|
73
74
|
const DEFAULT_DYNAMIC_SIZE = false;
|
|
74
75
|
const TRACK_BY_PROPERTY_NAME = 'id';
|
|
@@ -155,6 +156,7 @@ class NgVirtualListService {
|
|
|
155
156
|
set methodOfSelecting(v) {
|
|
156
157
|
this._$methodOfSelecting.next(v);
|
|
157
158
|
}
|
|
159
|
+
selectByClick = DEFAULT_SELECT_BY_CLICK;
|
|
158
160
|
_trackBox;
|
|
159
161
|
constructor() {
|
|
160
162
|
this._$methodOfSelecting.pipe(takeUntilDestroyed(), tap(v => {
|
|
@@ -181,25 +183,61 @@ class NgVirtualListService {
|
|
|
181
183
|
})).subscribe();
|
|
182
184
|
}
|
|
183
185
|
setSelectedIds(ids) {
|
|
184
|
-
this._$selectedIds.
|
|
186
|
+
if (JSON.stringify(this._$selectedIds.getValue()) !== JSON.stringify(ids)) {
|
|
187
|
+
this._$selectedIds.next(ids);
|
|
188
|
+
}
|
|
185
189
|
}
|
|
186
190
|
itemClick(data) {
|
|
187
191
|
this._$itemClick.next(data);
|
|
192
|
+
if (this.selectByClick) {
|
|
193
|
+
this.select(data);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Selects a list item
|
|
198
|
+
* @param data
|
|
199
|
+
* @param selected - If the value is undefined, then the toggle method is executed, if false or true, then the selection/deselection is performed.
|
|
200
|
+
*/
|
|
201
|
+
select(data, selected = undefined) {
|
|
188
202
|
if (data && data.config.selectable) {
|
|
189
203
|
switch (this._$methodOfSelecting.getValue()) {
|
|
190
204
|
case MethodsForSelectingTypes.SELECT: {
|
|
191
205
|
const curr = this._$selectedIds.getValue();
|
|
192
|
-
|
|
206
|
+
if (selected === undefined) {
|
|
207
|
+
this._$selectedIds.next(curr !== data?.id ? data?.id : undefined);
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
this._$selectedIds.next(selected ? data?.id : undefined);
|
|
211
|
+
}
|
|
193
212
|
break;
|
|
194
213
|
}
|
|
195
214
|
case MethodsForSelectingTypes.MULTI_SELECT: {
|
|
196
215
|
const curr = [...(this._$selectedIds.getValue() || [])], index = curr.indexOf(data.id);
|
|
197
|
-
if (
|
|
198
|
-
|
|
199
|
-
|
|
216
|
+
if (selected === undefined) {
|
|
217
|
+
if (index > -1) {
|
|
218
|
+
curr.splice(index, 1);
|
|
219
|
+
this._$selectedIds.next(curr);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
this._$selectedIds.next([...curr, data.id]);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
else if (selected) {
|
|
226
|
+
if (index > -1) {
|
|
227
|
+
this._$selectedIds.next(curr);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
this._$selectedIds.next([...curr, data.id]);
|
|
231
|
+
}
|
|
200
232
|
}
|
|
201
233
|
else {
|
|
202
|
-
|
|
234
|
+
if (index > -1) {
|
|
235
|
+
curr.splice(index, 1);
|
|
236
|
+
this._$selectedIds.next(curr);
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
this._$selectedIds.next(curr);
|
|
240
|
+
}
|
|
203
241
|
}
|
|
204
242
|
break;
|
|
205
243
|
}
|
|
@@ -242,6 +280,7 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
242
280
|
_service = inject(NgVirtualListService);
|
|
243
281
|
_isSelected = false;
|
|
244
282
|
config = signal({});
|
|
283
|
+
measures = signal(undefined);
|
|
245
284
|
_part = PART_DEFAULT_ITEM;
|
|
246
285
|
get part() { return this._part; }
|
|
247
286
|
regular = false;
|
|
@@ -254,6 +293,7 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
254
293
|
this._data = v;
|
|
255
294
|
this.updatePartStr(v, this._isSelected);
|
|
256
295
|
this.updateConfig(v);
|
|
296
|
+
this.updateMeasures(v);
|
|
257
297
|
this.update();
|
|
258
298
|
this.data.set(v);
|
|
259
299
|
}
|
|
@@ -279,6 +319,14 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
279
319
|
get element() {
|
|
280
320
|
return this._elementRef.nativeElement;
|
|
281
321
|
}
|
|
322
|
+
_selectHandler = (data) =>
|
|
323
|
+
/**
|
|
324
|
+
* Selects a list item
|
|
325
|
+
* @param selected - If the value is undefined, then the toggle method is executed, if false or true, then the selection/deselection is performed.
|
|
326
|
+
*/
|
|
327
|
+
(selected = undefined) => {
|
|
328
|
+
this._service.select(data, selected);
|
|
329
|
+
};
|
|
282
330
|
constructor() {
|
|
283
331
|
super();
|
|
284
332
|
this._id = this._service.generateComponentId();
|
|
@@ -306,10 +354,14 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
306
354
|
}
|
|
307
355
|
this.updatePartStr(this._data, this._isSelected);
|
|
308
356
|
this.updateConfig(this._data);
|
|
357
|
+
this.updateMeasures(this._data);
|
|
309
358
|
})).subscribe();
|
|
310
359
|
}
|
|
360
|
+
updateMeasures(v) {
|
|
361
|
+
this.measures.set(v?.measures ? { ...v.measures } : undefined);
|
|
362
|
+
}
|
|
311
363
|
updateConfig(v) {
|
|
312
|
-
this.config.set({ ...v?.config || {}, selected: this._isSelected });
|
|
364
|
+
this.config.set({ ...v?.config || {}, selected: this._isSelected, select: this._selectHandler(v) });
|
|
313
365
|
}
|
|
314
366
|
update() {
|
|
315
367
|
const data = this._data, regular = this.regular, length = this._regularLength;
|
|
@@ -393,14 +445,14 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
393
445
|
this._service.itemClick(this._data);
|
|
394
446
|
}
|
|
395
447
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgVirtualListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
396
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: NgVirtualListItemComponent, isStandalone: true, selector: "ng-virtual-list-item", host: { attributes: { "role": "listitem" }, classAttribute: "ngvl__item" }, usesInheritance: true, ngImport: i0, template: "@let item = data();\r\n@let
|
|
448
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: NgVirtualListItemComponent, isStandalone: true, selector: "ng-virtual-list-item", host: { attributes: { "role": "listitem" }, classAttribute: "ngvl__item" }, usesInheritance: true, ngImport: i0, template: "@let item = data();\r\n@let _config = config();\r\n@let _measures = measures();\r\n@let renderer = itemRenderer();\r\n\r\n@if (item) {\r\n <div #listItem [part]=\"part\" class=\"ngvl-item__container\"\r\n [ngClass]=\"{'snapped': item.config.snapped, 'snapped-out': item.config.snappedOut}\" (click)=\"onClickHandler()\">\r\n @if (renderer) {\r\n <ng-container [ngTemplateOutlet]=\"renderer\"\r\n [ngTemplateOutletContext]=\"{data: item.data, measures: _measures, config: _config}\" />\r\n }\r\n </div>\r\n}", styles: [":host{display:block;position:absolute;left:0;top:0;box-sizing:border-box;overflow:hidden}.ngvl-item__container{margin:0;padding:0;overflow:hidden;background-color:#fff;width:inherit;height:inherit}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
397
449
|
}
|
|
398
450
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgVirtualListItemComponent, decorators: [{
|
|
399
451
|
type: Component,
|
|
400
452
|
args: [{ selector: 'ng-virtual-list-item', imports: [CommonModule], host: {
|
|
401
453
|
'class': 'ngvl__item',
|
|
402
454
|
'role': 'listitem',
|
|
403
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let item = data();\r\n@let
|
|
455
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "@let item = data();\r\n@let _config = config();\r\n@let _measures = measures();\r\n@let renderer = itemRenderer();\r\n\r\n@if (item) {\r\n <div #listItem [part]=\"part\" class=\"ngvl-item__container\"\r\n [ngClass]=\"{'snapped': item.config.snapped, 'snapped-out': item.config.snappedOut}\" (click)=\"onClickHandler()\">\r\n @if (renderer) {\r\n <ng-container [ngTemplateOutlet]=\"renderer\"\r\n [ngTemplateOutletContext]=\"{data: item.data, measures: _measures, config: _config}\" />\r\n }\r\n </div>\r\n}", styles: [":host{display:block;position:absolute;left:0;top:0;box-sizing:border-box;overflow:hidden}.ngvl-item__container{margin:0;padding:0;overflow:hidden;background-color:#fff;width:inherit;height:inherit}\n"] }]
|
|
404
456
|
}], ctorParameters: () => [] });
|
|
405
457
|
|
|
406
458
|
/**
|
|
@@ -1799,6 +1851,11 @@ class NgVirtualListComponent {
|
|
|
1799
1851
|
* Sets the selected items.
|
|
1800
1852
|
*/
|
|
1801
1853
|
selectedIds = input(undefined);
|
|
1854
|
+
/**
|
|
1855
|
+
* If false, the element is selected using the config.select method passed to the template;
|
|
1856
|
+
* if true, the element is selected by clicking on it. The default value is true.
|
|
1857
|
+
*/
|
|
1858
|
+
selectByClick = input(DEFAULT_SELECT_BY_CLICK);
|
|
1802
1859
|
/**
|
|
1803
1860
|
* Determines whether elements will snap. Default value is "true".
|
|
1804
1861
|
*/
|
|
@@ -1997,7 +2054,10 @@ class NgVirtualListComponent {
|
|
|
1997
2054
|
this._initialized = signal(false);
|
|
1998
2055
|
this.$initialized = toObservable(this._initialized);
|
|
1999
2056
|
this._trackBox.displayComponents = this._displayComponents;
|
|
2000
|
-
const $trackBy = toObservable(this.trackBy);
|
|
2057
|
+
const $trackBy = toObservable(this.trackBy), $selectByClick = toObservable(this.selectByClick);
|
|
2058
|
+
$selectByClick.pipe(takeUntilDestroyed(), tap(v => {
|
|
2059
|
+
this._service.selectByClick = v;
|
|
2060
|
+
})).subscribe();
|
|
2001
2061
|
$trackBy.pipe(takeUntilDestroyed(), tap(v => {
|
|
2002
2062
|
this._trackBox.trackingPropertyName = v;
|
|
2003
2063
|
})).subscribe();
|
|
@@ -2079,10 +2139,19 @@ class NgVirtualListComponent {
|
|
|
2079
2139
|
this._service.$itemClick.pipe(takeUntilDestroyed(), tap(v => {
|
|
2080
2140
|
this.onItemClick.emit(v);
|
|
2081
2141
|
})).subscribe();
|
|
2082
|
-
|
|
2083
|
-
|
|
2142
|
+
let isSelectedIdsFirstEmit = 0;
|
|
2143
|
+
this._service.$selectedIds.pipe(takeUntilDestroyed(), distinctUntilChanged(), tap(v => {
|
|
2144
|
+
if (this.isSingleSelecting || (this.isMultiSelecting && isSelectedIdsFirstEmit >= 2)) {
|
|
2145
|
+
const curr = this.selectedIds();
|
|
2146
|
+
if ((this.isSingleSelecting && JSON.stringify(v) !== JSON.stringify(curr)) || (isSelectedIdsFirstEmit === 2 && JSON.stringify(v) !== JSON.stringify(curr)) || isSelectedIdsFirstEmit > 2) {
|
|
2147
|
+
this.onSelect.emit(v);
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
if (isSelectedIdsFirstEmit < 3) {
|
|
2151
|
+
isSelectedIdsFirstEmit++;
|
|
2152
|
+
}
|
|
2084
2153
|
})).subscribe();
|
|
2085
|
-
$selectedIds.pipe(takeUntilDestroyed(), tap(v => {
|
|
2154
|
+
$selectedIds.pipe(takeUntilDestroyed(), distinctUntilChanged(), tap(v => {
|
|
2086
2155
|
this._service.setSelectedIds(v);
|
|
2087
2156
|
})).subscribe();
|
|
2088
2157
|
}
|
|
@@ -2346,7 +2415,7 @@ class NgVirtualListComponent {
|
|
|
2346
2415
|
}
|
|
2347
2416
|
}
|
|
2348
2417
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgVirtualListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2349
|
-
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 }, 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 }, stickyMap: { classPropertyName: "stickyMap", publicName: "stickyMap", isSignal: true, isRequired: false, 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 }, itemsOffset: { classPropertyName: "itemsOffset", publicName: "itemsOffset", 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" }, 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\" #list 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 });
|
|
2418
|
+
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 }, selectByClick: { classPropertyName: "selectByClick", publicName: "selectByClick", 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 }, stickyMap: { classPropertyName: "stickyMap", publicName: "stickyMap", isSignal: true, isRequired: false, 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 }, itemsOffset: { classPropertyName: "itemsOffset", publicName: "itemsOffset", 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" }, 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\" #list 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 });
|
|
2350
2419
|
}
|
|
2351
2420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgVirtualListComponent, decorators: [{
|
|
2352
2421
|
type: Component,
|