import { EventEmitter, Renderer2, AfterViewInit } from '@angular/core'; import { IgxProcessBarTextTemplateDirective, IgxProgressBarGradientDirective } from './progressbar.common'; import { IBaseEventArgs } from '../core/utils'; export declare enum IgxTextAlign { START = "start", CENTER = "center", END = "end" } export declare enum IgxProgressType { DANGER = "danger", INFO = "info", WARNING = "warning", SUCCESS = "success" } export interface IChangeProgressEventArgs extends IBaseEventArgs { previousValue: number; currentValue: number; } export declare abstract class BaseProgress { /** * @hidden */ private requestAnimationId; /** * @hidden */ protected _valueInPercent: number; /** * @hidden */ protected _max: number; /** * @hidden */ protected _value: number; /** * @hidden */ protected _animate: boolean; /** * @hidden */ protected _step: any; /** *Returns the `IgxLinearProgressBarComponent`/`IgxCircularProgressBarComponent` value in percentage. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxLinearProgressBarComponent; // IgxCircularProgressBarComponent *public valuePercent(event){ * let percentValue = this.progressBar.valueInPercent; * alert(percentValue); *} *``` */ /** *Sets the `IgxLinearProgressBarComponent`/`IgxCircularProgressBarComponent` value in percentage. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxLinearProgressBarComponent; // IgxCircularProgressBarComponent * public setValue(event){ * this.progressBar.valueInPercent = 56; *} * //... *``` *```html * *``` */ valueInPercent: number; /** * @hidden */ protected runAnimation(val: number, step: number): void; /** * @hidden */ protected updateProgressSmoothly(val: number, step: number): void; /** * @hidden */ protected updateProgressDirectly(val: number): void; /** * @hidden */ protected directionFlow(currentValue: number, prevValue: number, step: number): number; /** * @hidden */ private isInLimitRange; /** * @hidden * * * @param val * @param comparator * @param step */ private isExceedingUpperLimit; /** * @hidden * * @param val * @param comparator * @param step */ private isExceedingLowerLimit; /** * @hidden * @param step */ private updateProgress; } export declare class IgxLinearProgressBarComponent extends BaseProgress { /** *Animation on progress `IgxLinearProgressBarComponent`. By default it is set to true. *```html * *``` */ /** *Returns whether the `IgxLinearProgressBarComponent` has animation true/false. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxLinearProgressBarComponent; *public animationStatus(event) { * let animationStatus = this.progressBar.animate; * alert(animationStatus); *} *``` */ animate: boolean; /** *Set maximum value that can be passed. By default it is set to 100. *```html * *``` */ /** *Returns the the maximum progress value of the `IgxLinearProgressBarComponent`. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxLinearProgressBarComponent; *public maxValue(event) { * let max = this.progressBar.max; * alert(max); *} *``` */ max: number; /** *Returns the value which update the progress indicator of the `IgxLinearProgressBarComponent`. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxLinearProgressBarComponent; *public stepValue(event) { * let step = this.progressBar.step; * alert(step); *} *``` */ /** *Sets the value by which progress indicator is updated. By default it is 1% of the maximum value. *```html * *``` */ step: number; constructor(); valueMin: number; cssClass: string; /** *Set `IgxLinearProgressBarComponent` to have striped style. By default it is set to false. *```html * *``` */ striped: boolean; /** *Set `IgxLinearProgressBarComponent` to have indeterminate. By default it is set to false. *```html * *``` */ indeterminate: boolean; /**An @Input property that sets the value of the `role` attribute. If not provided it will be automatically set to `progressbar`. * ```html * * ``` */ role: string; /**An @Input property that sets the value of `id` attribute. If not provided it will be automatically generated. * ```html * * ``` */ id: string; /** *Set the position that defines where the text is aligned. Possible options - `IgxTextAlign.START` (default), `IgxTextAlign.CENTER`, `IgxTextAlign.END`. *```typescript *public positionCenter: IgxTextAlign; *public ngOnInit() { * this.positionCenter = IgxTextAlign.CENTER; *} * //... *``` * ```html * *``` */ textAlign: IgxTextAlign; /** *Set the text to be visible. By default it is set to true. * ```html * *``` */ textVisibility: boolean; /** *Set the position that defines if the text should be aligned above the progress line. By default is set to false. *```html * *``` */ textTop: boolean; /** *Set a custom text that is displayed according to the defined position. * ```html * *``` */ text: string; /** *Set type of the `IgxLinearProgressBarComponent`. Possible options - `default`, `success`, `info`, `warning`, and `danger`. *```html * *``` */ type: string; /** *Returns value that indicates the current `IgxLinearProgressBarComponent` position. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxLinearProgressBarComponent; *public getValue(event) { * let value = this.progressBar.value; * alert(value); *} *``` */ /** *Set value that indicates the current `IgxLinearProgressBarComponent` position. *```html * *``` */ value: number; /** *An event, which is triggered after a progress is changed. *```typescript *public progressChange(event) { * alert("Progress made!"); *} * //... *``` *```html * *``` */ onProgressChanged: EventEmitter; /** * @hidden */ readonly danger: boolean; /** * @hidden */ readonly info: boolean; /** * @hidden */ readonly warning: boolean; /** * @hidden */ readonly success: boolean; } export declare class IgxCircularProgressBarComponent extends BaseProgress implements AfterViewInit { private renderer; private readonly STROKE_OPACITY_DVIDER; private readonly STROKE_OPACITY_ADDITION; /** @hidden */ cssClass: string; /** *An event, which is triggered after a progress is changed. *```typescript *public progressChange(event) { * alert("Progress made!"); *} * //... *``` *```html * *``` */ onProgressChanged: EventEmitter; /** *An @Input property that sets the value of `id` attribute. If not provided it will be automatically generated. *```html * *``` */ id: string; /** * @hidden */ gradientId: string; /** *An @Input property that sets the value of the `indeterminate` attribute. If not provided it will be automatically set to false. *```html * *``` */ indeterminate: boolean; /** *Sets the text visibility. By default it is set to true. *```html * *``` */ textVisibility: boolean; /** * Sets/gets the text to be displayed inside the `igxCircularBar`. *```html * *``` *```typescript *let text = this.circularBar.text; *``` */ text: string; textTemplate: IgxProcessBarTextTemplateDirective; gradientTemplate: IgxProgressBarGradientDirective; /** * @hidden */ readonly context: any; /** *Animation on progress `IgxCircularProgressBarComponent`. By default it is set to true. *```html * *``` */ /** *Returns whether the `IgxCircularProgressBarComponent` has animation true/false. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxCircularProgressBarComponent; *public animationStatus(event) { * let animationStatus = this.progressBar.animate; * alert(animationStatus); *} *``` */ animate: boolean; /** *Set maximum value that can be passed. By default it is set to 100. *```html * *``` */ /** *Returns the the maximum progress value of the `IgxCircularProgressBarComponent`. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxCircularProgressBarComponent; *public maxValue(event) { * let max = this.progressBar.max; * alert(max); *} *``` *```html * *``` */ max: number; /** *Returns the value which update the progress indicator of the `IgxCircularProgressBarComponent`. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxCircularProgressBarComponent; *public stepValue(event) { * let step = this.progressBar.step; * alert(step); *} *``` */ /** *Sets the value by which progress indicator is updated. By default it is 1% of the maximum value. *```html * *``` */ step: number; /** *Returns value that indicates the current `IgxCircularProgressBarComponent` position. *```typescript *@ViewChild("MyProgressBar") *public progressBar: IgxCircularProgressBarComponent; *public getValue(event) { * let value = this.progressBar.value; * alert(value); *} *``` *```html * *``` */ /** *Set value that indicates the current `IgxCircularProgressBarComponent` position. *```html * *``` */ value: number; private _circleRadius; private _circumference; private _svgCircle; constructor(renderer: Renderer2); ngAfterViewInit(): void; /** * @hidden */ updateProgressSmoothly(val: number, step: number): void; /** * @hidden */ readonly textContent: string; /** * @hidden */ updateProgressDirectly(val: number): void; private getProgress; } export declare function getValueInProperRange(value: number, max: number, min?: number): number; export declare function convertInPercentage(value: number, max: number): number; /** * @hidden */ export declare class IgxProgressBarModule { }