source: trip-planner-front/node_modules/@angular/cdk/scrolling/virtual-for-of.d.ts.__ivy_ngcc_bak@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 5.4 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { CollectionViewer, DataSource, ListRange, _RecycleViewRepeaterStrategy } from '@angular/cdk/collections';
9import { DoCheck, IterableDiffers, NgIterable, NgZone, OnDestroy, TemplateRef, TrackByFunction, ViewContainerRef } from '@angular/core';
10import { NumberInput } from '@angular/cdk/coercion';
11import { Observable, Subject } from 'rxjs';
12import { CdkVirtualScrollRepeater } from './virtual-scroll-repeater';
13import { CdkVirtualScrollViewport } from './virtual-scroll-viewport';
14/** The context for an item rendered by `CdkVirtualForOf` */
15export declare type CdkVirtualForOfContext<T> = {
16 /** The item value. */
17 $implicit: T;
18 /** The DataSource, Observable, or NgIterable that was passed to *cdkVirtualFor. */
19 cdkVirtualForOf: DataSource<T> | Observable<T[]> | NgIterable<T>;
20 /** The index of the item in the DataSource. */
21 index: number;
22 /** The number of items in the DataSource. */
23 count: number;
24 /** Whether this is the first item in the DataSource. */
25 first: boolean;
26 /** Whether this is the last item in the DataSource. */
27 last: boolean;
28 /** Whether the index is even. */
29 even: boolean;
30 /** Whether the index is odd. */
31 odd: boolean;
32};
33/**
34 * A directive similar to `ngForOf` to be used for rendering data inside a virtual scrolling
35 * container.
36 */
37export declare class CdkVirtualForOf<T> implements CdkVirtualScrollRepeater<T>, CollectionViewer, DoCheck, OnDestroy {
38 /** The view container to add items to. */
39 private _viewContainerRef;
40 /** The template to use when stamping out new items. */
41 private _template;
42 /** The set of available differs. */
43 private _differs;
44 /** The strategy used to render items in the virtual scroll viewport. */
45 private _viewRepeater;
46 /** The virtual scrolling viewport that these items are being rendered in. */
47 private _viewport;
48 /** Emits when the rendered view of the data changes. */
49 readonly viewChange: Subject<ListRange>;
50 /** Subject that emits when a new DataSource instance is given. */
51 private readonly _dataSourceChanges;
52 /** The DataSource to display. */
53 get cdkVirtualForOf(): DataSource<T> | Observable<T[]> | NgIterable<T> | null | undefined;
54 set cdkVirtualForOf(value: DataSource<T> | Observable<T[]> | NgIterable<T> | null | undefined);
55 _cdkVirtualForOf: DataSource<T> | Observable<T[]> | NgIterable<T> | null | undefined;
56 /**
57 * The `TrackByFunction` to use for tracking changes. The `TrackByFunction` takes the index and
58 * the item and produces a value to be used as the item's identity when tracking changes.
59 */
60 get cdkVirtualForTrackBy(): TrackByFunction<T> | undefined;
61 set cdkVirtualForTrackBy(fn: TrackByFunction<T> | undefined);
62 private _cdkVirtualForTrackBy;
63 /** The template used to stamp out new elements. */
64 set cdkVirtualForTemplate(value: TemplateRef<CdkVirtualForOfContext<T>>);
65 /**
66 * The size of the cache used to store templates that are not being used for re-use later.
67 * Setting the cache size to `0` will disable caching. Defaults to 20 templates.
68 */
69 get cdkVirtualForTemplateCacheSize(): number;
70 set cdkVirtualForTemplateCacheSize(size: number);
71 /** Emits whenever the data in the current DataSource changes. */
72 readonly dataStream: Observable<readonly T[]>;
73 /** The differ used to calculate changes to the data. */
74 private _differ;
75 /** The most recent data emitted from the DataSource. */
76 private _data;
77 /** The currently rendered items. */
78 private _renderedItems;
79 /** The currently rendered range of indices. */
80 private _renderedRange;
81 /** Whether the rendered data should be updated during the next ngDoCheck cycle. */
82 private _needsUpdate;
83 private readonly _destroyed;
84 constructor(
85 /** The view container to add items to. */
86 _viewContainerRef: ViewContainerRef,
87 /** The template to use when stamping out new items. */
88 _template: TemplateRef<CdkVirtualForOfContext<T>>,
89 /** The set of available differs. */
90 _differs: IterableDiffers,
91 /** The strategy used to render items in the virtual scroll viewport. */
92 _viewRepeater: _RecycleViewRepeaterStrategy<T, T, CdkVirtualForOfContext<T>>,
93 /** The virtual scrolling viewport that these items are being rendered in. */
94 _viewport: CdkVirtualScrollViewport, ngZone: NgZone);
95 /**
96 * Measures the combined size (width for horizontal orientation, height for vertical) of all items
97 * in the specified range. Throws an error if the range includes items that are not currently
98 * rendered.
99 */
100 measureRangeSize(range: ListRange, orientation: 'horizontal' | 'vertical'): number;
101 ngDoCheck(): void;
102 ngOnDestroy(): void;
103 /** React to scroll state changes in the viewport. */
104 private _onRenderedDataChange;
105 /** Swap out one `DataSource` for another. */
106 private _changeDataSource;
107 /** Update the `CdkVirtualForOfContext` for all views. */
108 private _updateContext;
109 /** Apply changes to the DOM. */
110 private _applyChanges;
111 /** Update the computed properties on the `CdkVirtualForOfContext`. */
112 private _updateComputedContextProperties;
113 private _getEmbeddedViewArgs;
114 static ngAcceptInputType_cdkVirtualForTemplateCacheSize: NumberInput;
115}
Note: See TracBrowser for help on using the repository browser.