UNPKG

ngx-otp-input

Version:

One Time Password input library for Angular (14+)

35 lines (34 loc) 1.79 kB
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core'; import { FormArray } from '@angular/forms'; import { OtpValueChangeEvent } from './directives/inputNavigations.directive'; import { NgxOtpInputComponentOptions } from './default.config'; import * as i0 from "@angular/core"; export declare enum NgxOtpStatus { SUCCESS = "success", FAILED = "failed" } export declare class NgxOtpInputComponent implements OnInit, OnChanges { protected ngxOtpInputArray: FormArray; protected ngxOtpOptions: NgxOtpInputComponentOptions; set options(customOptions: NgxOtpInputComponentOptions); status: NgxOtpStatus | null | undefined; disabled: boolean; otp: string | null | undefined; otpChange: EventEmitter<string[]>; otpComplete: EventEmitter<string>; get ngxOtpOptionsInUse(): NgxOtpInputComponentOptions; get inputType(): string; get isOTPSuccess(): boolean; get isOTPFailed(): boolean; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; private initOtpInputArray; private setInitialOtp; protected handleInputChanges($event: OtpValueChangeEvent): void; protected handlePasteChange($event: string[]): void; private emitOtpValueChange; protected isInputFilled(index: number): boolean; reset(): void; static ɵfac: i0.ɵɵFactoryDeclaration<NgxOtpInputComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NgxOtpInputComponent, "ngx-otp-input", never, { "options": { "alias": "options"; "required": false; }; "status": { "alias": "status"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "otp": { "alias": "otp"; "required": false; }; }, { "otpChange": "otpChange"; "otpComplete": "otpComplete"; }, never, never, true, never>; }