UNPKG

@asi-ngtools/lib

Version:

This project is a little components library, simple to use, which will help you to simplify your project.

42 lines (41 loc) 1.52 kB
import { DefaultControlValueAccessor } from './../common/default-control-value-accessor'; import { FormControl } from '@angular/forms'; import { OnInit, EventEmitter, ElementRef, AfterViewInit, Renderer2 } from '@angular/core'; export declare class AsiInputIconComponent 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 to display */ placeholder: string; /** Icon to display */ icon: string; /** Icon position */ iconPosition: 'left' | 'right'; /** Allow you to define a regex that the input must respect */ pattern: RegExp; /** Max length of the text */ maxlength: number; /** Delay before the component change value */ delay: number; /** Must be a number (internaly set the regex to ^-*[0-9,\.]*$ */ number: boolean; /** Event emitted when the icon is clicked */ iconClicked: EventEmitter<any>; inputControl: FormControl; inputElm: ElementRef; constructor(renderer: Renderer2, elementRef: ElementRef); ngOnInit(): void; ngAfterViewInit(): void; private isValide(value); writeValue(value: string): void; handleIconClick(): void; }