ng-otp-input
Version:
A fully customizable, one-time password input component for the web built with Angular.
32 lines (31 loc) • 1.15 kB
TypeScript
import { OnInit, EventEmitter, AfterViewInit } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { KeysPipe } from '../../pipes/keys.pipe';
import { Config } from '../../models/config';
export declare class NgOtpInputComponent implements OnInit, AfterViewInit {
private keysPipe;
config: Config;
onInputChange: EventEmitter<string>;
otpForm: FormGroup;
inputControls: FormControl[];
componentKey: string;
inputType: string;
constructor(keysPipe: KeysPipe);
ngOnInit(): void;
ngAfterViewInit(): void;
private getControlName;
ifLeftArrow(event: any): boolean;
ifRightArrow(event: any): boolean;
ifBackspaceOrDelete(event: any): boolean;
ifKeyCode(event: any, targetCode: any): boolean;
onKeyDown($event: any): boolean;
onKeyUp($event: any, inputIdx: any): void;
appendKey(id: any): string;
setSelected(eleId: any): void;
ifValidEntry(event: any): boolean;
focusTo(eleId: any): void;
setValue(value: any): void;
rebuildValue(): void;
getInputType(): string;
handlePaste(e: any): void;
}