source: trip-planner-front/node_modules/@angular/cdk/scrolling/fixed-size-virtual-scroll.d.ts.__ivy_ngcc_bak@ ceaed42

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

initial commit

  • Property mode set to 100644
File size: 4.5 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 { NumberInput } from '@angular/cdk/coercion';
9import { OnChanges } from '@angular/core';
10import { Observable } from 'rxjs';
11import { VirtualScrollStrategy } from './virtual-scroll-strategy';
12import { CdkVirtualScrollViewport } from './virtual-scroll-viewport';
13/** Virtual scrolling strategy for lists with items of known fixed size. */
14export declare class FixedSizeVirtualScrollStrategy implements VirtualScrollStrategy {
15 private readonly _scrolledIndexChange;
16 /** @docs-private Implemented as part of VirtualScrollStrategy. */
17 scrolledIndexChange: Observable<number>;
18 /** The attached viewport. */
19 private _viewport;
20 /** The size of the items in the virtually scrolling list. */
21 private _itemSize;
22 /** The minimum amount of buffer rendered beyond the viewport (in pixels). */
23 private _minBufferPx;
24 /** The number of buffer items to render beyond the edge of the viewport (in pixels). */
25 private _maxBufferPx;
26 /**
27 * @param itemSize The size of the items in the virtually scrolling list.
28 * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more
29 * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.
30 */
31 constructor(itemSize: number, minBufferPx: number, maxBufferPx: number);
32 /**
33 * Attaches this scroll strategy to a viewport.
34 * @param viewport The viewport to attach this strategy to.
35 */
36 attach(viewport: CdkVirtualScrollViewport): void;
37 /** Detaches this scroll strategy from the currently attached viewport. */
38 detach(): void;
39 /**
40 * Update the item size and buffer size.
41 * @param itemSize The size of the items in the virtually scrolling list.
42 * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more
43 * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.
44 */
45 updateItemAndBufferSize(itemSize: number, minBufferPx: number, maxBufferPx: number): void;
46 /** @docs-private Implemented as part of VirtualScrollStrategy. */
47 onContentScrolled(): void;
48 /** @docs-private Implemented as part of VirtualScrollStrategy. */
49 onDataLengthChanged(): void;
50 /** @docs-private Implemented as part of VirtualScrollStrategy. */
51 onContentRendered(): void;
52 /** @docs-private Implemented as part of VirtualScrollStrategy. */
53 onRenderedOffsetChanged(): void;
54 /**
55 * Scroll to the offset for the given index.
56 * @param index The index of the element to scroll to.
57 * @param behavior The ScrollBehavior to use when scrolling.
58 */
59 scrollToIndex(index: number, behavior: ScrollBehavior): void;
60 /** Update the viewport's total content size. */
61 private _updateTotalContentSize;
62 /** Update the viewport's rendered range. */
63 private _updateRenderedRange;
64}
65/**
66 * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created
67 * `FixedSizeVirtualScrollStrategy` from the given directive.
68 * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the
69 * `FixedSizeVirtualScrollStrategy` from.
70 */
71export declare function _fixedSizeVirtualScrollStrategyFactory(fixedSizeDir: CdkFixedSizeVirtualScroll): FixedSizeVirtualScrollStrategy;
72/** A virtual scroll strategy that supports fixed-size items. */
73export declare class CdkFixedSizeVirtualScroll implements OnChanges {
74 /** The size of the items in the list (in pixels). */
75 get itemSize(): number;
76 set itemSize(value: number);
77 _itemSize: number;
78 /**
79 * The minimum amount of buffer rendered beyond the viewport (in pixels).
80 * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.
81 */
82 get minBufferPx(): number;
83 set minBufferPx(value: number);
84 _minBufferPx: number;
85 /**
86 * The number of pixels worth of buffer to render for when rendering new items. Defaults to 200px.
87 */
88 get maxBufferPx(): number;
89 set maxBufferPx(value: number);
90 _maxBufferPx: number;
91 /** The scroll strategy used by this directive. */
92 _scrollStrategy: FixedSizeVirtualScrollStrategy;
93 ngOnChanges(): void;
94 static ngAcceptInputType_itemSize: NumberInput;
95 static ngAcceptInputType_minBufferPx: NumberInput;
96 static ngAcceptInputType_maxBufferPx: NumberInput;
97}
Note: See TracBrowser for help on using the repository browser.