UNPKG

3.38 kBTypeScriptView Raw
1import { Renderer2, ElementRef, AfterViewInit, ViewContainerRef, TemplateRef, ChangeDetectorRef } from '@angular/core';
2import * as i0 from "@angular/core";
3export declare class TdMessageContainerDirective {
4 viewContainer: ViewContainerRef;
5 constructor(viewContainer: ViewContainerRef);
6 static ɵfac: i0.ɵɵFactoryDeclaration<TdMessageContainerDirective, never>;
7 static ɵdir: i0.ɵɵDirectiveDeclaration<TdMessageContainerDirective, "[tdMessageContainer]", never, {}, {}, never, never, false, never>;
8}
9export declare class TdMessageComponent implements AfterViewInit {
10 private _renderer;
11 private _changeDetectorRef;
12 private _elementRef;
13 private _color;
14 private _opened;
15 private _hidden;
16 private _animating;
17 private _initialized;
18 _childElement?: TdMessageContainerDirective;
19 _template: TemplateRef<any>;
20 /**
21 * Binding host to tdCollapse animation
22 */
23 get collapsedAnimation(): any;
24 /**
25 * Binding host to display style when hidden
26 */
27 get hidden(): string;
28 /**
29 * label: string
30 *
31 * Sets the label of the message.
32 */
33 label?: string;
34 /**
35 * sublabel?: string
36 *
37 * Sets the sublabel of the message.
38 */
39 sublabel?: string;
40 /**
41 * icon?: string
42 *
43 * The icon to be displayed before the title.
44 * Defaults to `info_outline` icon
45 */
46 icon?: string;
47 /**
48 * color?: primary | accent | warn
49 *
50 * Sets the color of the message.
51 * Can also use any material color: purple | light-blue, etc.
52 */
53 set color(color: string);
54 get color(): string;
55 /**
56 * opened?: boolean
57 *
58 * Shows or hiddes the message depending on its value.
59 * Defaults to 'true'.
60 */
61 set opened(opened: boolean);
62 get opened(): boolean;
63 constructor(_renderer: Renderer2, _changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef);
64 /**
65 * Detach element when close animation is finished to set animating state to false
66 * hidden state to true and detach element from DOM
67 */
68 animationDoneListener(): void;
69 /**
70 * Initializes the component and attaches the content.
71 */
72 ngAfterViewInit(): void;
73 /**
74 * Renders the message on screen
75 * Validates if there is an animation currently and if its already opened
76 */
77 open(): void;
78 /**
79 * Removes the message content from screen.
80 * Validates if there is an animation currently and if its already closed
81 */
82 close(): void;
83 /**
84 * Toggles between open and close depending on state.
85 */
86 toggle(): void;
87 /**
88 * Method to set the state before starting an animation
89 */
90 private _startAnimationState;
91 /**
92 * Method to attach template to DOM
93 */
94 private _attach;
95 /**
96 * Method to detach template from DOM
97 */
98 private _detach;
99 static ɵfac: i0.ɵɵFactoryDeclaration<TdMessageComponent, never>;
100 static ɵcmp: i0.ɵɵComponentDeclaration<TdMessageComponent, "td-message", never, { "label": { "alias": "label"; "required": false; }; "sublabel": { "alias": "sublabel"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "color": { "alias": "color"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; }, {}, never, ["[td-message-actions]"], false, never>;
101}