@asi-ngtools/lib
Version:
This project is a little components library, simple to use, which will help you to simplify your project.
35 lines (34 loc) • 1.29 kB
TypeScript
import { DefaultControlValueAccessor } from './../common/default-control-value-accessor';
import { FormControl } from '@angular/forms';
import { OnInit, AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
export declare class AsiInputComponent extends DefaultControlValueAccessor implements OnInit, AfterViewInit {
private renderer;
private elementRef;
/** html id */
id: string;
/** html name */
name: string;
/** html input type */
type: 'password' | 'text';
/** Label to display (is translated)*/
label: string;
/** Label position */
labelPosition: 'top' | 'left' | 'right' | 'bottom' | 'bottom-center' | 'top-center';
/** placeholder (is translated) */
placeholder: string;
/** Allow you to define a regex that the input must respect */
pattern: RegExp;
/** Max length of the text */
maxlength: number;
/** Must be a number (internaly set the regex to ^-*[0-9,\.]*$ */
number: boolean;
/** Delay before the component change value */
delay: number;
inputControl: FormControl;
inputElm: ElementRef;
constructor(renderer: Renderer2, elementRef: ElementRef);
ngOnInit(): void;
ngAfterViewInit(): void;
private isValide(value);
writeValue(value: string): void;
}