ngx-bootstrap
Version:
Angular Bootstrap
73 lines (66 loc) • 3.51 kB
TypeScript
import * as i0 from '@angular/core';
import { OnChanges, ElementRef, Renderer2, SimpleChanges, ModuleWithProviders } from '@angular/core';
type ProgressbarType = 'success' | 'info' | 'warning' | 'danger';
interface BarValue {
type: ProgressbarType;
label: string;
value: number;
max: number;
}
declare class BarComponent implements OnChanges {
private el;
private renderer;
/** maximum total value of progress element */
max: number;
/** current value of progress bar */
value?: number | undefined;
/** if `true` changing value of progress bar will be animated */
animate?: boolean | undefined;
/** If `true`, striped classes are applied */
striped?: boolean | undefined;
/** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */
type?: ProgressbarType;
percent: number;
private _prevType?;
constructor(el: ElementRef, renderer: Renderer2);
ngOnChanges(changes: SimpleChanges): void;
private applyTypeClasses;
static ɵfac: i0.ɵɵFactoryDeclaration<BarComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<BarComponent, "bar", never, { "max": { "alias": "max"; "required": false; }; "value": { "alias": "value"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "striped": { "alias": "striped"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, {}, never, ["*"], true, never>;
}
declare class ProgressbarConfig {
/** if `true` changing value of progress bar will be animated */
animate: boolean;
/** maximum total value of progress element */
max: number;
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressbarConfig, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ProgressbarConfig>;
}
declare class ProgressbarComponent {
/** maximum total value of progress element */
max: number;
/** if `true` changing value of progress bar will be animated */
animate: boolean;
/** If `true`, striped classes are applied */
striped: boolean;
/** provide one of the four supported contextual classes: `success`, `info`, `warning`, `danger` */
type?: ProgressbarType;
/** current value of progress bar. Could be a number or array of objects
* like {"value":15,"type":"info","label":"15 %"}
*/
set value(value: number | BarValue[]);
isStacked: boolean;
_value?: number | undefined;
_values?: BarValue[];
constructor(config: ProgressbarConfig);
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressbarComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ProgressbarComponent, "progressbar", never, { "max": { "alias": "max"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "striped": { "alias": "striped"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, ["*"], true, never>;
}
declare class ProgressbarModule {
static forRoot(): ModuleWithProviders<ProgressbarModule>;
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressbarModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<ProgressbarModule, never, [typeof BarComponent, typeof ProgressbarComponent], [typeof BarComponent, typeof ProgressbarComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<ProgressbarModule>;
}
export { BarComponent, ProgressbarComponent, ProgressbarConfig, ProgressbarModule };
export type { ProgressbarType };