UNPKG

2.86 kBTypeScriptView Raw
1import { ModuleWithProviders, ChangeDetectorRef, OnDestroy } from '@angular/core';
2export declare type ProgressCircleMode = 'determinate' | 'indeterminate';
3/**
4 * <md-progress-circle> component.
5 */
6export declare class MdProgressCircle implements OnDestroy {
7 private _changeDetectorRef;
8 /** The id of the last requested animation. */
9 private _lastAnimationId;
10 /** The id of the indeterminate interval. */
11 private _interdeterminateInterval;
12 /**
13 * Values for aria max and min are only defined as numbers when in a determinate mode. We do this
14 * because voiceover does not report the progress indicator as indeterminate if the aria min
15 * and/or max value are number values.
16 */
17 readonly _ariaValueMin: number;
18 readonly _ariaValueMax: number;
19 /** TODO: internal */
20 /** TODO: internal */
21 interdeterminateInterval: number;
22 /** The current path value, representing the progress circle. */
23 private _currentPath;
24 /** TODO: internal */
25 currentPath: string;
26 /** Clean up any animations that were running. */
27 ngOnDestroy(): void;
28 /**
29 * Value of the progress circle.
30 *
31 * Input:number
32 * _value is bound to the host as the attribute aria-valuenow.
33 */
34 private _value;
35 value: number;
36 /**
37 * Mode of the progress circle
38 *
39 * Input must be one of the values from ProgressMode, defaults to 'determinate'.
40 * mode is bound to the host as the attribute host.
41 */
42 mode: ProgressCircleMode;
43 private _mode;
44 constructor(_changeDetectorRef: ChangeDetectorRef);
45 /**
46 * Animates the circle from one percentage value to another.
47 *
48 * @param animateFrom The percentage of the circle filled starting the animation.
49 * @param animateTo The percentage of the circle filled ending the animation.
50 * @param ease The easing function to manage the pace of change in the animation.
51 * @param duration The length of time to show the animation, in milliseconds.
52 * @param rotation The starting angle of the circle fill, with 0° represented at the top center
53 * of the circle.
54 */
55 private _animateCircle(animateFrom, animateTo, ease, duration, rotation);
56 /**
57 * Starts the indeterminate animation interval, if it is not already running.
58 */
59 private _startIndeterminateAnimation();
60 /**
61 * Removes interval, ending the animation.
62 */
63 private _cleanupIndeterminateAnimation();
64}
65/**
66 * <md-spinner> component.
67 *
68 * This is a component definition to be used as a convenience reference to create an
69 * indeterminate <md-progress-circle> instance.
70 */
71export declare class MdSpinner extends MdProgressCircle {
72 constructor(changeDetectorRef: ChangeDetectorRef);
73}
74export declare class MdProgressCircleModule {
75 static forRoot(): ModuleWithProviders;
76}