UNPKG

@obliczeniowo/elementary

Version:
103 lines (94 loc) 4.78 kB
import * as i0 from '@angular/core'; import { TemplateRef, EventEmitter } from '@angular/core'; import * as i6 from '@obliczeniowo/elementary/pie-progress'; import { ProgressStatus } from '@obliczeniowo/elementary/pie-progress'; import { ControlValueAccessor } from '@angular/forms'; import * as i5 from '@angular/common'; import * as i7 from '@obliczeniowo/elementary/loading'; import * as i8 from '@obliczeniowo/elementary/icons'; interface ProgressStep<T = any> { name: string; progress: number; status: ProgressStatus; data?: T; } declare class ProgressStepperComponent { /** * Steps state objects to display */ steps: ProgressStep[]; /** * Control displaying list of steps. * * active-only - display active and failure one only on list */ display: 'full-list' | 'active-only' | 'no-list'; static ɵfac: i0.ɵɵFactoryDeclaration<ProgressStepperComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ProgressStepperComponent, "obl-progress-stepper", never, { "steps": { "alias": "steps"; "required": false; }; "display": { "alias": "display"; "required": false; }; }, {}, never, never, false, never>; } declare class ProgressVerticalStepperComponent { /** * Steps state objects to display */ steps: ProgressStep[]; /** * Control displaying list of steps. * * active-only - display active and failure one only on list */ display: 'full-list' | 'active-only' | 'no-list'; static ɵfac: i0.ɵɵFactoryDeclaration<ProgressVerticalStepperComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ProgressVerticalStepperComponent, "obl-progress-vertical-stepper", never, { "steps": { "alias": "steps"; "required": false; }; "display": { "alias": "display"; "required": false; }; }, {}, never, never, false, never>; } type StepperStepState = 'active' | 'inactive' | 'disabled'; interface Step<T = any> { name: string; description: string; icon: string; state: StepperStepState; data?: T; } declare class StepperComponent implements ControlValueAccessor { /** steps to display */ steps: Step[]; /** template for description part */ stepTemplate?: TemplateRef<any>; /** template for icon part */ iconTemplate?: TemplateRef<any>; /** emit value when clicked (only in inactive, active state) */ clicked: EventEmitter<Step<any>>; protected getState(state: StepperStepState): { [x: string]: boolean; }; touched: boolean; onChange: (steps: Step[]) => void; onTouched: () => void; writeValue(steps: Step[]): void; registerOnChange(onChange: any): void; registerOnTouched(onTouched: any): void; registerOnValidatorChange(fn: () => void): void; markAsTouched(): void; setValue(): void; onClick(step: Step): void; static ɵfac: i0.ɵɵFactoryDeclaration<StepperComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<StepperComponent, "obl-stepper", never, { "steps": { "alias": "steps"; "required": false; }; "stepTemplate": { "alias": "stepTemplate"; "required": false; }; "iconTemplate": { "alias": "iconTemplate"; "required": false; }; }, { "clicked": "clicked"; }, never, never, false, never>; } declare class VerticalStepperComponent extends StepperComponent { /** steps to display */ steps: Step[]; /** template for step description */ stepRef?: TemplateRef<any>; /** template for icon */ iconRef?: TemplateRef<any>; /** emit value when clicked (only in inactive, active state) */ clicked: EventEmitter<Step<any>>; static ɵfac: i0.ɵɵFactoryDeclaration<VerticalStepperComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<VerticalStepperComponent, "obl-vertical-stepper", never, { "steps": { "alias": "steps"; "required": false; }; "stepRef": { "alias": "stepRef"; "required": false; }; "iconRef": { "alias": "iconRef"; "required": false; }; }, { "clicked": "clicked"; }, never, never, false, never>; } declare class StepperModule { static ɵfac: i0.ɵɵFactoryDeclaration<StepperModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<StepperModule, [typeof ProgressStepperComponent, typeof ProgressVerticalStepperComponent, typeof StepperComponent, typeof VerticalStepperComponent], [typeof i5.CommonModule, typeof i6.PieProgressModule, typeof i7.LoadingModule, typeof i8.IconsModule], [typeof ProgressStepperComponent, typeof ProgressVerticalStepperComponent, typeof StepperComponent, typeof VerticalStepperComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<StepperModule>; } export { ProgressStepperComponent, ProgressVerticalStepperComponent, StepperComponent, StepperModule, VerticalStepperComponent }; export type { ProgressStep, Step, StepperStepState };