ng-virtual-list 14.7.1 → 14.7.2

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.
@@ -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';
@@ -154,6 +155,7 @@ class NgVirtualListService {
154
155
  this.$selectedIds = this._$selectedIds.asObservable();
155
156
  this._$methodOfSelecting = new BehaviorSubject(0);
156
157
  this.$methodOfSelecting = this._$methodOfSelecting.asObservable();
158
+ this.selectByClick = DEFAULT_SELECT_BY_CLICK;
157
159
  this._$methodOfSelecting.pipe(takeUntil(this._$unsubscribe), tap(v => {
158
160
  switch (v) {
159
161
  case MethodsForSelectingTypes.SELECT: {
@@ -181,25 +183,60 @@ class NgVirtualListService {
181
183
  this._$methodOfSelecting.next(v);
182
184
  }
183
185
  setSelectedIds(ids) {
184
- this._$selectedIds.next(ids);
186
+ if (JSON.stringify(this._$selectedIds.getValue()) !== JSON.stringify(ids)) {
187
+ this._$selectedIds.next(ids);
188
+ }
185
189
  }
186
190
  itemClick(data) {
187
- this._$itemClick.next(data);
191
+ if (this.selectByClick) {
192
+ this.select(data);
193
+ }
194
+ }
195
+ /**
196
+ * Selects a list item
197
+ * @param data
198
+ * @param selected - If the value is undefined, then the toggle method is executed, if false or true, then the selection/deselection is performed.
199
+ */
200
+ select(data, selected = undefined) {
188
201
  if (data && data.config.selectable) {
189
202
  switch (this._$methodOfSelecting.getValue()) {
190
203
  case MethodsForSelectingTypes.SELECT: {
191
204
  const curr = this._$selectedIds.getValue();
192
- this._$selectedIds.next(curr !== data?.id ? data?.id : undefined);
205
+ if (selected === undefined) {
206
+ this._$selectedIds.next(curr !== data?.id ? data?.id : undefined);
207
+ }
208
+ else {
209
+ this._$selectedIds.next(selected ? data?.id : undefined);
210
+ }
193
211
  break;
194
212
  }
195
213
  case MethodsForSelectingTypes.MULTI_SELECT: {
196
214
  const curr = [...(this._$selectedIds.getValue() || [])], index = curr.indexOf(data.id);
197
- if (index > -1) {
198
- curr.splice(index, 1);
199
- this._$selectedIds.next(curr);
215
+ if (selected === undefined) {
216
+ if (index > -1) {
217
+ curr.splice(index, 1);
218
+ this._$selectedIds.next(curr);
219
+ }
220
+ else {
221
+ this._$selectedIds.next([...curr, data.id]);
222
+ }
223
+ }
224
+ else if (selected) {
225
+ if (index > -1) {
226
+ this._$selectedIds.next(curr);
227
+ }
228
+ else {
229
+ this._$selectedIds.next([...curr, data.id]);
230
+ }
200
231
  }
201
232
  else {
202
- this._$selectedIds.next([...curr, data.id]);
233
+ if (index > -1) {
234
+ curr.splice(index, 1);
235
+ this._$selectedIds.next(curr);
236
+ }
237
+ else {
238
+ this._$selectedIds.next(curr);
239
+ }
203
240
  }
204
241
  break;
205
242
  }
@@ -250,10 +287,19 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
250
287
  this._part = PART_DEFAULT_ITEM;
251
288
  this._isSelected = false;
252
289
  this.config = new BehaviorSubject$1({});
290
+ this.measures = new BehaviorSubject$1(undefined);
253
291
  this.regular = false;
254
292
  this._$data = new BehaviorSubject$1(this.data);
255
293
  this.$data = this._$data.asObservable();
256
294
  this._regularLength = SIZE_100_PERSENT;
295
+ this._selectHandler = (data) =>
296
+ /**
297
+ * Selects a list item
298
+ * @param selected - If the value is undefined, then the toggle method is executed, if false or true, then the selection/deselection is performed.
299
+ */
300
+ (selected = undefined) => {
301
+ this._service.select(data, selected);
302
+ };
257
303
  this._id = this._service.generateComponentId();
258
304
  const $data = this.$data;
259
305
  combineLatest([$data, this._service.$methodOfSelecting, this._service.$selectedIds]).pipe(takeUntil$1(this._$unsubscribe), map(([, m, ids]) => ({ method: m, ids })), tap$1(({ method, ids }) => {
@@ -279,6 +325,7 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
279
325
  }
280
326
  this.updatePartStr(this.data, this._isSelected);
281
327
  this.updateConfig(this.data);
328
+ this.updateMeasures(this.data);
282
329
  })).subscribe();
283
330
  }
284
331
  get id() {
@@ -292,6 +339,7 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
292
339
  this.data = v;
293
340
  this.updatePartStr(v, this._isSelected);
294
341
  this.updateConfig(v);
342
+ this.updateMeasures(v);
295
343
  this.update();
296
344
  this._$data.next(v);
297
345
  this._cdr.detectChanges();
@@ -320,8 +368,11 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
320
368
  get element() {
321
369
  return this._elementRef.nativeElement;
322
370
  }
371
+ updateMeasures(v) {
372
+ this.measures.next(v?.measures ? { ...v.measures } : undefined);
373
+ }
323
374
  updateConfig(v) {
324
- this.config.next({ ...v?.config || {}, selected: this._isSelected });
375
+ this.config.next({ ...v?.config || {}, selected: this._isSelected, select: this._selectHandler(v) });
325
376
  }
326
377
  update() {
327
378
  const data = this.data, regular = this.regular, length = this._regularLength;
@@ -413,13 +464,13 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
413
464
  }
414
465
  }
415
466
  NgVirtualListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgVirtualListItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: NgVirtualListService }], target: i0.ɵɵFactoryTarget.Component });
416
- NgVirtualListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgVirtualListItemComponent, selector: "ng-virtual-list-item", host: { attributes: { "role": "listitem" }, classAttribute: "ngvl__item" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data\">\r\n <div #listItem [part]=\"part\" class=\"ngvl-item__container\" [ngClass]=\"{'snapped': data.config.snapped,\r\n 'snapped-out': data.config.snappedOut}\" (click)=\"onClickHandler()\">\r\n <ng-container *ngIf=\"itemRenderer\">\r\n <ng-container [ngTemplateOutlet]=\"itemRenderer\"\r\n [ngTemplateOutletContext]=\"{data: data.data || {}, config: config | async}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-container>", 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: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
467
+ NgVirtualListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgVirtualListItemComponent, selector: "ng-virtual-list-item", host: { attributes: { "role": "listitem" }, classAttribute: "ngvl__item" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data\">\r\n <div #listItem [part]=\"part\" class=\"ngvl-item__container\" [ngClass]=\"{'snapped': data.config.snapped,\r\n 'snapped-out': data.config.snappedOut}\" (click)=\"onClickHandler()\">\r\n <ng-container *ngIf=\"itemRenderer\">\r\n <ng-container [ngTemplateOutlet]=\"itemRenderer\"\r\n [ngTemplateOutletContext]=\"{data: data.data || {}, measures: measures | async, config: config | async}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-container>", 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: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
417
468
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgVirtualListItemComponent, decorators: [{
418
469
  type: Component,
419
470
  args: [{ selector: 'ng-virtual-list-item', host: {
420
471
  'class': 'ngvl__item',
421
472
  'role': 'listitem',
422
- }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"data\">\r\n <div #listItem [part]=\"part\" class=\"ngvl-item__container\" [ngClass]=\"{'snapped': data.config.snapped,\r\n 'snapped-out': data.config.snappedOut}\" (click)=\"onClickHandler()\">\r\n <ng-container *ngIf=\"itemRenderer\">\r\n <ng-container [ngTemplateOutlet]=\"itemRenderer\"\r\n [ngTemplateOutletContext]=\"{data: data.data || {}, config: config | async}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-container>", 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"] }]
473
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"data\">\r\n <div #listItem [part]=\"part\" class=\"ngvl-item__container\" [ngClass]=\"{'snapped': data.config.snapped,\r\n 'snapped-out': data.config.snappedOut}\" (click)=\"onClickHandler()\">\r\n <ng-container *ngIf=\"itemRenderer\">\r\n <ng-container [ngTemplateOutlet]=\"itemRenderer\"\r\n [ngTemplateOutletContext]=\"{data: data.data || {}, measures: measures | async, config: config | async}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-container>", 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"] }]
423
474
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: NgVirtualListService }]; } });
424
475
 
425
476
  /**
@@ -1823,6 +1874,8 @@ class NgVirtualListComponent extends DisposableComponent {
1823
1874
  };
1824
1875
  this._$selectedIds = new BehaviorSubject$1(undefined);
1825
1876
  this.$selectedIds = this._$selectedIds.asObservable();
1877
+ this._$selectByClick = new BehaviorSubject$1(DEFAULT_SELECT_BY_CLICK);
1878
+ this.$selectByClick = this._$selectByClick.asObservable();
1826
1879
  this._$snap = new BehaviorSubject$1(DEFAULT_SNAP);
1827
1880
  this.$snap = this._$snap.asObservable();
1828
1881
  this._$enabledBufferOptimization = new BehaviorSubject$1(DEFAULT_ENABLED_BUFFER_OPTIMIZATION);
@@ -1977,7 +2030,10 @@ class NgVirtualListComponent extends DisposableComponent {
1977
2030
  this._$initialized = new BehaviorSubject$1(false);
1978
2031
  this.$initialized = this._$initialized.asObservable();
1979
2032
  this._trackBox.displayComponents = this._displayComponents;
1980
- const $trackBy = this.$trackBy;
2033
+ const $trackBy = this.$trackBy, $selectByClick = this.$selectByClick;
2034
+ $selectByClick.pipe(takeUntil(this._$unsubscribe), tap(v => {
2035
+ this._service.selectByClick = v;
2036
+ })).subscribe();
1981
2037
  $trackBy.pipe(takeUntil(this._$unsubscribe), tap(v => {
1982
2038
  this._trackBox.trackingPropertyName = v;
1983
2039
  })).subscribe();
@@ -1996,7 +2052,6 @@ class NgVirtualListComponent extends DisposableComponent {
1996
2052
  this._isMultiSelecting = true;
1997
2053
  this._isNotSelecting = this._isSingleSelecting = false;
1998
2054
  if (el) {
1999
- console.log('set role', ROLE_LIST_BOX);
2000
2055
  el.setAttribute('role', ROLE_LIST_BOX);
2001
2056
  }
2002
2057
  this._service.methodOfSelecting = MethodsForSelectingTypes.MULTI_SELECT;
@@ -2005,7 +2060,6 @@ class NgVirtualListComponent extends DisposableComponent {
2005
2060
  this._isSingleSelecting = true;
2006
2061
  this._isNotSelecting = this._isMultiSelecting = false;
2007
2062
  if (el) {
2008
- console.log('set role', ROLE_LIST_BOX);
2009
2063
  el.setAttribute('role', ROLE_LIST_BOX);
2010
2064
  }
2011
2065
  this._service.methodOfSelecting = MethodsForSelectingTypes.SELECT;
@@ -2014,7 +2068,6 @@ class NgVirtualListComponent extends DisposableComponent {
2014
2068
  this._isNotSelecting = true;
2015
2069
  this._isSingleSelecting = this._isMultiSelecting = false;
2016
2070
  if (el) {
2017
- console.log('set role', ROLE_LIST);
2018
2071
  el.setAttribute('role', ROLE_LIST);
2019
2072
  }
2020
2073
  this._service.methodOfSelecting = MethodsForSelectingTypes.NONE;
@@ -2062,10 +2115,19 @@ class NgVirtualListComponent extends DisposableComponent {
2062
2115
  this._service.$itemClick.pipe(takeUntil(this._$unsubscribe), tap(v => {
2063
2116
  this.onItemClick.emit(v ?? undefined);
2064
2117
  })).subscribe();
2065
- this._service.$selectedIds.pipe(takeUntil(this._$unsubscribe), tap(v => {
2066
- this.onSelect.emit(v);
2118
+ let isSelectedIdsFirstEmit = 0;
2119
+ this._service.$selectedIds.pipe(takeUntil(this._$unsubscribe), distinctUntilChanged(), tap(v => {
2120
+ if (this.isSingleSelecting || (this.isMultiSelecting && isSelectedIdsFirstEmit >= 2)) {
2121
+ const curr = this._$selectedIds.getValue();
2122
+ if ((this.isSingleSelecting && JSON.stringify(v) !== JSON.stringify(curr)) || (isSelectedIdsFirstEmit === 2 && JSON.stringify(v) !== JSON.stringify(curr)) || isSelectedIdsFirstEmit > 2) {
2123
+ this.onSelect.emit(v);
2124
+ }
2125
+ }
2126
+ if (isSelectedIdsFirstEmit < 3) {
2127
+ isSelectedIdsFirstEmit++;
2128
+ }
2067
2129
  })).subscribe();
2068
- $selectedIds.pipe(takeUntil(this._$unsubscribe), tap(v => {
2130
+ $selectedIds.pipe(takeUntil(this._$unsubscribe), distinctUntilChanged(), tap(v => {
2069
2131
  this._service.setSelectedIds(v);
2070
2132
  })).subscribe();
2071
2133
  }
@@ -2098,6 +2160,19 @@ class NgVirtualListComponent extends DisposableComponent {
2098
2160
  }
2099
2161
  ;
2100
2162
  get selectedIds() { return this._$selectedIds.getValue(); }
2163
+ /**
2164
+ * If false, the element is selected using the config.select method passed to the template;
2165
+ * if true, the element is selected by clicking on it. The default value is true.
2166
+ */
2167
+ set selectByClick(v) {
2168
+ if (this._$selectByClick.getValue() === v) {
2169
+ return;
2170
+ }
2171
+ this._$selectByClick.next(v);
2172
+ this._cdr.markForCheck();
2173
+ }
2174
+ ;
2175
+ get selectByClick() { return this._$selectByClick.getValue(); }
2101
2176
  /**
2102
2177
  * Determines whether elements will snap. Default value is "true".
2103
2178
  */
@@ -2505,7 +2580,7 @@ class NgVirtualListComponent extends DisposableComponent {
2505
2580
  }
2506
2581
  NgVirtualListComponent.__nextId = 0;
2507
2582
  NgVirtualListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgVirtualListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: NgVirtualListService }], target: i0.ɵɵFactoryTarget.Component });
2508
- NgVirtualListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgVirtualListComponent, selector: "ng-virtual-list", inputs: { items: "items", selectedIds: "selectedIds", snap: "snap", enabledBufferOptimization: "enabledBufferOptimization", itemRenderer: "itemRenderer", stickyMap: "stickyMap", itemConfigMap: "itemConfigMap", itemSize: "itemSize", dynamicSize: "dynamicSize", direction: "direction", itemsOffset: "itemsOffset", bufferSize: "bufferSize", maxBufferSize: "maxBufferSize", trackBy: "trackBy", snappingMethod: "snappingMethod", methodForSelecting: "methodForSelecting" }, outputs: { onScroll: "onScroll", onScrollEnd: "onScrollEnd", onViewportChange: "onViewportChange", onItemClick: "onItemClick", onSelect: "onSelect" }, providers: [NgVirtualListService], viewQueries: [{ propertyName: "_listContainerRef", first: true, predicate: ["renderersContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_container", first: true, predicate: ["container"], descendants: true, read: (ElementRef) }, { propertyName: "_list", first: true, predicate: ["list"], descendants: true, read: (ElementRef) }, { propertyName: "_snapContainerRef", first: true, predicate: ["snapRendererContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_snappedContainer", first: true, predicate: ["snapped"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"snap\" #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n</div>\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: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
2583
+ NgVirtualListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgVirtualListComponent, selector: "ng-virtual-list", inputs: { items: "items", selectedIds: "selectedIds", selectByClick: "selectByClick", snap: "snap", enabledBufferOptimization: "enabledBufferOptimization", itemRenderer: "itemRenderer", stickyMap: "stickyMap", itemConfigMap: "itemConfigMap", itemSize: "itemSize", dynamicSize: "dynamicSize", direction: "direction", itemsOffset: "itemsOffset", bufferSize: "bufferSize", maxBufferSize: "maxBufferSize", trackBy: "trackBy", snappingMethod: "snappingMethod", methodForSelecting: "methodForSelecting" }, outputs: { onScroll: "onScroll", onScrollEnd: "onScrollEnd", onViewportChange: "onViewportChange", onItemClick: "onItemClick", onSelect: "onSelect" }, providers: [NgVirtualListService], viewQueries: [{ propertyName: "_listContainerRef", first: true, predicate: ["renderersContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_container", first: true, predicate: ["container"], descendants: true, read: (ElementRef) }, { propertyName: "_list", first: true, predicate: ["list"], descendants: true, read: (ElementRef) }, { propertyName: "_snapContainerRef", first: true, predicate: ["snapRendererContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "_snappedContainer", first: true, predicate: ["snapped"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"snap\" #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n</div>\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: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
2509
2584
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgVirtualListComponent, decorators: [{
2510
2585
  type: Component,
2511
2586
  args: [{ selector: 'ng-virtual-list', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.ShadowDom, providers: [NgVirtualListService], template: "<div *ngIf=\"snap\" #snapped part=\"snapped-item\" class=\"ngvl__list-snapper\">\r\n <ng-container #snapRendererContainer></ng-container>\r\n</div>\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"] }]
@@ -2538,6 +2613,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2538
2613
  type: Input
2539
2614
  }], selectedIds: [{
2540
2615
  type: Input
2616
+ }], selectByClick: [{
2617
+ type: Input
2541
2618
  }], snap: [{
2542
2619
  type: Input
2543
2620
  }], enabledBufferOptimization: [{