source: trip-planner-front/node_modules/@angular/cdk/scrolling/scrollable.d.ts@ 6a3a178

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

initial commit

  • Property mode set to 100644
File size: 3.9 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 { Directionality } from '@angular/cdk/bidi';
9import { ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
10import { Observable } from 'rxjs';
11import { ScrollDispatcher } from './scroll-dispatcher';
12import * as ɵngcc0 from '@angular/core';
13export declare type _Without<T> = {
14 [P in keyof T]?: never;
15};
16export declare type _XOR<T, U> = (_Without<T> & U) | (_Without<U> & T);
17export declare type _Top = {
18 top?: number;
19};
20export declare type _Bottom = {
21 bottom?: number;
22};
23export declare type _Left = {
24 left?: number;
25};
26export declare type _Right = {
27 right?: number;
28};
29export declare type _Start = {
30 start?: number;
31};
32export declare type _End = {
33 end?: number;
34};
35export declare type _XAxis = _XOR<_XOR<_Left, _Right>, _XOR<_Start, _End>>;
36export declare type _YAxis = _XOR<_Top, _Bottom>;
37/**
38 * An extended version of ScrollToOptions that allows expressing scroll offsets relative to the
39 * top, bottom, left, right, start, or end of the viewport rather than just the top and left.
40 * Please note: the top and bottom properties are mutually exclusive, as are the left, right,
41 * start, and end properties.
42 */
43export declare type ExtendedScrollToOptions = _XAxis & _YAxis & ScrollOptions;
44/**
45 * Sends an event when the directive's element is scrolled. Registers itself with the
46 * ScrollDispatcher service to include itself as part of its collection of scrolling events that it
47 * can be listened to through the service.
48 */
49export declare class CdkScrollable implements OnInit, OnDestroy {
50 protected elementRef: ElementRef<HTMLElement>;
51 protected scrollDispatcher: ScrollDispatcher;
52 protected ngZone: NgZone;
53 protected dir?: Directionality | undefined;
54 private readonly _destroyed;
55 private _elementScrolled;
56 constructor(elementRef: ElementRef<HTMLElement>, scrollDispatcher: ScrollDispatcher, ngZone: NgZone, dir?: Directionality | undefined);
57 ngOnInit(): void;
58 ngOnDestroy(): void;
59 /** Returns observable that emits when a scroll event is fired on the host element. */
60 elementScrolled(): Observable<Event>;
61 /** Gets the ElementRef for the viewport. */
62 getElementRef(): ElementRef<HTMLElement>;
63 /**
64 * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo
65 * method, since browsers are not consistent about what scrollLeft means in RTL. For this method
66 * left and right always refer to the left and right side of the scrolling container irrespective
67 * of the layout direction. start and end refer to left and right in an LTR context and vice-versa
68 * in an RTL context.
69 * @param options specified the offsets to scroll to.
70 */
71 scrollTo(options: ExtendedScrollToOptions): void;
72 private _applyScrollToOptions;
73 /**
74 * Measures the scroll offset relative to the specified edge of the viewport. This method can be
75 * used instead of directly checking scrollLeft or scrollTop, since browsers are not consistent
76 * about what scrollLeft means in RTL. The values returned by this method are normalized such that
77 * left and right always refer to the left and right side of the scrolling container irrespective
78 * of the layout direction. start and end refer to left and right in an LTR context and vice-versa
79 * in an RTL context.
80 * @param from The edge to measure from.
81 */
82 measureScrollOffset(from: 'top' | 'left' | 'right' | 'bottom' | 'start' | 'end'): number;
83 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkScrollable, [null, null, null, { optional: true; }]>;
84 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkScrollable, "[cdk-scrollable], [cdkScrollable]", never, {}, {}, never>;
85}
86
87//# sourceMappingURL=scrollable.d.ts.map
Note: See TracBrowser for help on using the repository browser.