UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

89 lines 2.19 kB
import { StepState } from '@angular/cdk/stepper'; import { Injector, Type } from '@angular/core'; export interface StepperButtonsVisibility { cancel?: boolean; back?: boolean; next?: boolean; custom?: boolean; } /** * Steps of a stepper component. * * ```ts * providers: [{ * provide: HOOK_STEPPER, * useValue: { * id: Steppers.SETUP, * label: 'Register devices', * component: YourRegisterDeviceForm, * priority: -1000 * }, * multi: true * }] */ export interface Step { /** * The id of the stepper outlet where the step should be attached to. */ stepperId: string; /** * The label to display. */ label?: string; /** * The component to render. You can inject the C8yStepper to manage steps or use the * existing NgForm to validate the content of the form before the user can go on. * * ```js * viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] * ``` */ component: Type<any>; /** * The injector to use. If not set, default injector will be used. */ injector?: Injector; /** * High priority will show the step sooner, low priority will show the step later. All * hooked step are ordered first by priority then by name. */ priority?: number; /** * Marks the step as required to complete the stepper. */ required?: boolean; [key: string]: any; } /** * Can be used to mark a step as completed and adds the current index to the step. */ export type IndexedStep = Step & { index: number; completed: boolean; state?: StepState; }; /** * Default steppers used in the platform. Use this too hook into * certain steps. * * ```ts * providers: [{ * provide: HOOK_STEPPER, * useValue: { * id: Steppers.SETUP, * label: 'Register devices', * component: YourRegisterDeviceForm, * priority: -1000 * }, * multi: true * }] * ``` */ export declare enum Steppers { /** * Use this stepperId to hook a component into the application * setup step. */ SETUP = "setup" } //# sourceMappingURL=stepper.model.d.ts.map