UNPKG

2.65 kBTypeScriptView Raw
1import { ChangeDetectorRef, ElementRef, DoCheck } from '@angular/core';
2import { TemplatePortal } from '@angular/cdk/portal';
3import * as i0 from "@angular/core";
4export declare enum LoadingType {
5 Circular = "circular",
6 Linear = "linear"
7}
8export declare enum LoadingMode {
9 Determinate = "determinate",
10 Indeterminate = "indeterminate"
11}
12export declare enum LoadingStrategy {
13 Overlay = "overlay",
14 Replace = "replace"
15}
16export declare enum LoadingStyle {
17 FullScreen = "fullscreen",
18 Overlay = "overlay",
19 None = "none"
20}
21export declare const TD_CIRCLE_DIAMETER = 40;
22export declare class TdLoadingComponent implements DoCheck {
23 private _elementRef;
24 private _changeDetectorRef;
25 private _mode;
26 private _defaultMode;
27 private _value;
28 private _circleDiameter;
29 /**
30 * Flag for animation
31 */
32 animation: boolean;
33 /**
34 * Content injected into loading component.
35 */
36 content: TemplatePortal<any>;
37 /**
38 * Sets mode of [TdLoadingComponent] to LoadingMode.Determinate or LoadingMode.Indeterminate
39 */
40 set mode(mode: LoadingMode);
41 get mode(): LoadingMode;
42 /**
43 * Sets value of [TdLoadingComponent] if mode is 'LoadingMode.Determinate'
44 */
45 set value(value: number);
46 get value(): number;
47 style: LoadingStyle;
48 /**
49 * height: number
50 * Sets height of [TdLoadingComponent].
51 */
52 height: number;
53 /**
54 * type: LoadingType
55 * Sets type of [TdLoadingComponent] rendered.
56 */
57 type: LoadingType;
58 /**
59 * color: primary' | 'accent' | 'warn'
60 * Sets theme color of [TdLoadingComponent] rendered.
61 */
62 color: 'primary' | 'accent' | 'warn';
63 constructor(_elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef);
64 ngDoCheck(): void;
65 getHeight(): string | undefined;
66 getCircleDiameter(): number;
67 getCircleStrokeWidth(): number;
68 isCircular(): boolean;
69 isLinear(): boolean;
70 isFullScreen(): boolean;
71 isOverlay(): boolean;
72 /**
73 * Starts in animation and returns an observable for completition event.
74 */
75 show(): void;
76 /**
77 * Starts out animation and returns an observable for completition event.
78 */
79 hide(): void;
80 /**
81 * Calculate the proper diameter for the circle and set it
82 */
83 private _setCircleDiameter;
84 /**
85 * Returns the host height of the loading component
86 */
87 private _hostHeight;
88 static ɵfac: i0.ɵɵFactoryDeclaration<TdLoadingComponent, never>;
89 static ɵcmp: i0.ɵɵComponentDeclaration<TdLoadingComponent, "td-loading", never, {}, {}, never, never, false, never>;
90}