ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
161 lines • 4.92 kB
TypeScript
import * as i0 from "@angular/core";
import { OnChanges, SimpleChanges, TemplateRef } from "@angular/core";
import { NzConfigKey } from "ng-zorro-antd/core/config";
import { NgStyleInterface } from "ng-zorro-antd/core/types";
export type NzProgressGapPositionType = 'top' | 'bottom' | 'left' | 'right';
export type NzProgressStatusType = 'success' | 'exception' | 'active' | 'normal';
export type NzProgressTypeType = 'line' | 'circle' | 'dashboard';
export type NzProgressStrokeLinecapType = 'round' | 'square';
export interface NzProgressGradientProgress {
[percent: string]: string;
}
export interface NzProgressGradientFromTo {
from: string;
to: string;
}
export type NzProgressColorGradient = {
direction?: string;
} & (NzProgressGradientProgress | NzProgressGradientFromTo);
export type NzProgressStrokeColorType = string | NzProgressColorGradient;
export type NzProgressFormatter = ((percent: number) => string | null) | TemplateRef<{
$implicit: number;
}>;
export interface NzProgressCirclePath {
stroke: string | null;
strokePathStyle: NgStyleInterface;
}
export interface NzProgressStepItem {
backgroundColor: string;
width: string;
height: string;
}
declare namespace progress_component_d_exports {
export { NzProgressComponent };
}
export declare class NzProgressComponent implements OnChanges {
readonly _nzModuleName: NzConfigKey;
private readonly cdr;
protected readonly dir: import("@angular/core").WritableSignal<import("@angular/cdk/bidi").Direction>;
nzShowInfo: boolean;
nzWidth: number;
nzStrokeColor?: NzProgressStrokeColorType;
nzSize: 'default' | 'small';
nzFormat?: NzProgressFormatter;
nzSuccessPercent?: number;
nzPercent: number;
nzStrokeWidth?: number;
nzGapDegree?: number;
nzStatus?: NzProgressStatusType;
nzType: NzProgressTypeType;
nzGapPosition: NzProgressGapPositionType;
nzStrokeLinecap: NzProgressStrokeLinecapType;
nzSteps: number;
steps: NzProgressStepItem[];
/** Gradient style when `nzType` is `line`. */
lineGradient: string | null;
/** If user uses gradient color. */
isGradient: boolean;
/** If the linear progress is a step progress. */
isSteps: boolean;
/**
* Each progress whose `nzType` is circle or dashboard should have unique id to
* define `<linearGradient>`.
*/
gradientId: number;
/** Paths to rendered in the template. */
progressCirclePath: NzProgressCirclePath[];
circleGradient?: Array<{
offset: string;
color: string;
}>;
trailPathStyle: NgStyleInterface | null;
pathString?: string;
icon: string;
get formatter(): NzProgressFormatter;
get status(): NzProgressStatusType;
get strokeWidth(): number;
get isCircleStyle(): boolean;
private cachedStatus;
private inferredStatus;
constructor();
ngOnChanges(changes: SimpleChanges): void;
private updateIcon;
/**
* Calculate step render configs.
*/
private getSteps;
/**
* Calculate paths when the type is circle or dashboard.
*/
private getCirclePaths;
private setStrokeColor;
static ɵfac: i0.ɵɵFactoryDeclaration<NzProgressComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzProgressComponent, "nz-progress", ["nzProgress"], {
"nzShowInfo": {
"alias": "nzShowInfo";
"required": false;
};
"nzWidth": {
"alias": "nzWidth";
"required": false;
};
"nzStrokeColor": {
"alias": "nzStrokeColor";
"required": false;
};
"nzSize": {
"alias": "nzSize";
"required": false;
};
"nzFormat": {
"alias": "nzFormat";
"required": false;
};
"nzSuccessPercent": {
"alias": "nzSuccessPercent";
"required": false;
};
"nzPercent": {
"alias": "nzPercent";
"required": false;
};
"nzStrokeWidth": {
"alias": "nzStrokeWidth";
"required": false;
};
"nzGapDegree": {
"alias": "nzGapDegree";
"required": false;
};
"nzStatus": {
"alias": "nzStatus";
"required": false;
};
"nzType": {
"alias": "nzType";
"required": false;
};
"nzGapPosition": {
"alias": "nzGapPosition";
"required": false;
};
"nzStrokeLinecap": {
"alias": "nzStrokeLinecap";
"required": false;
};
"nzSteps": {
"alias": "nzSteps";
"required": false;
};
}, {}, never, never, true, never>;
static ngAcceptInputType_nzSuccessPercent: unknown;
static ngAcceptInputType_nzPercent: unknown;
static ngAcceptInputType_nzStrokeWidth: unknown;
static ngAcceptInputType_nzGapDegree: unknown;
static ngAcceptInputType_nzSteps: unknown;
}
export declare class NzProgressModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzProgressModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzProgressModule, never, [typeof NzProgressComponent], [typeof NzProgressComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzProgressModule>;
}