source: trip-planner-front/node_modules/@angular/material/tabs/tab-body.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 { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, ElementRef, ComponentFactoryResolver, ViewContainerRef } from '@angular/core';
9import { AnimationEvent } from '@angular/animations';
10import { TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';
11import { Directionality, Direction } from '@angular/cdk/bidi';
12import { Subject } from 'rxjs';
13/**
14 * These position states are used internally as animation states for the tab body. Setting the
15 * position state to left, right, or center will transition the tab body from its current
16 * position to its respective state. If there is not current position (void, in the case of a new
17 * tab body), then there will be no transition animation to its state.
18 *
19 * In the case of a new tab body that should immediately be centered with an animating transition,
20 * then left-origin-center or right-origin-center can be used, which will use left or right as its
21 * psuedo-prior state.
22 */
23export declare type MatTabBodyPositionState = 'left' | 'center' | 'right' | 'left-origin-center' | 'right-origin-center';
24/**
25 * The origin state is an internally used state that is set on a new tab body indicating if it
26 * began to the left or right of the prior selected index. For example, if the selected index was
27 * set to 1, and a new tab is created and selected at index 2, then the tab body would have an
28 * origin of right because its index was greater than the prior selected index.
29 */
30export declare type MatTabBodyOriginState = 'left' | 'right';
31/**
32 * The portal host directive for the contents of the tab.
33 * @docs-private
34 */
35export declare class MatTabBodyPortal extends CdkPortalOutlet implements OnInit, OnDestroy {
36 private _host;
37 /** Subscription to events for when the tab body begins centering. */
38 private _centeringSub;
39 /** Subscription to events for when the tab body finishes leaving from center position. */
40 private _leavingSub;
41 constructor(componentFactoryResolver: ComponentFactoryResolver, viewContainerRef: ViewContainerRef, _host: MatTabBody, _document: any);
42 /** Set initial visibility or set up subscription for changing visibility. */
43 ngOnInit(): void;
44 /** Clean up centering subscription. */
45 ngOnDestroy(): void;
46}
47/**
48 * Base class with all of the `MatTabBody` functionality.
49 * @docs-private
50 */
51export declare abstract class _MatTabBodyBase implements OnInit, OnDestroy {
52 private _elementRef;
53 private _dir;
54 /** Current position of the tab-body in the tab-group. Zero means that the tab is visible. */
55 private _positionIndex;
56 /** Subscription to the directionality change observable. */
57 private _dirChangeSubscription;
58 /** Tab body position state. Used by the animation trigger for the current state. */
59 _position: MatTabBodyPositionState;
60 /** Emits when an animation on the tab is complete. */
61 readonly _translateTabComplete: Subject<AnimationEvent>;
62 /** Event emitted when the tab begins to animate towards the center as the active tab. */
63 readonly _onCentering: EventEmitter<number>;
64 /** Event emitted before the centering of the tab begins. */
65 readonly _beforeCentering: EventEmitter<boolean>;
66 /** Event emitted before the centering of the tab begins. */
67 readonly _afterLeavingCenter: EventEmitter<void>;
68 /** Event emitted when the tab completes its animation towards the center. */
69 readonly _onCentered: EventEmitter<void>;
70 /** The portal host inside of this container into which the tab body content will be loaded. */
71 abstract _portalHost: CdkPortalOutlet;
72 /** The tab body content to display. */
73 _content: TemplatePortal;
74 /** Position that will be used when the tab is immediately becoming visible after creation. */
75 origin: number | null;
76 /** Duration for the tab's animation. */
77 animationDuration: string;
78 /** The shifted index position of the tab body, where zero represents the active center tab. */
79 set position(position: number);
80 constructor(_elementRef: ElementRef<HTMLElement>, _dir: Directionality, changeDetectorRef: ChangeDetectorRef);
81 /**
82 * After initialized, check if the content is centered and has an origin. If so, set the
83 * special position states that transition the tab from the left or right before centering.
84 */
85 ngOnInit(): void;
86 ngOnDestroy(): void;
87 _onTranslateTabStarted(event: AnimationEvent): void;
88 /** The text direction of the containing app. */
89 _getLayoutDirection(): Direction;
90 /** Whether the provided position state is considered center, regardless of origin. */
91 _isCenterPosition(position: MatTabBodyPositionState | string): boolean;
92 /** Computes the position state that will be used for the tab-body animation trigger. */
93 private _computePositionAnimationState;
94 /**
95 * Computes the position state based on the specified origin position. This is used if the
96 * tab is becoming visible immediately after creation.
97 */
98 private _computePositionFromOrigin;
99}
100/**
101 * Wrapper for the contents of a tab.
102 * @docs-private
103 */
104export declare class MatTabBody extends _MatTabBodyBase {
105 _portalHost: CdkPortalOutlet;
106 constructor(elementRef: ElementRef<HTMLElement>, dir: Directionality, changeDetectorRef: ChangeDetectorRef);
107}
Note: See TracBrowser for help on using the repository browser.