@metadev/lux
Version:
Lux: Library with User Interface components for Angular.
109 lines (108 loc) • 4.37 kB
TypeScript
import { EventEmitter, OnInit, ElementRef } from '@angular/core';
import { ControlValueAccessor, AbstractControl, ValidationErrors, Validator } from '@angular/forms';
import { RegexpService } from './regexp.service';
import * as i0 from "@angular/core";
export declare class InputComponent implements OnInit, ControlValueAccessor, Validator {
regexpService: RegexpService;
static idCounter: number;
input: ElementRef;
textarea: ElementRef;
colorpicker: ElementRef;
touched: boolean;
dirty: boolean;
lastErrors: ValidationErrors | null;
private _disabled;
private _value;
private _type;
private _placeholder;
private _pattern?;
private _regexp?;
private _currency;
private _required;
userErrors: {
en: {
required: string;
min: string;
max: string;
email: string;
url: string;
color: string;
};
es: {
required: string;
min: string;
max: string;
email: string;
url: string;
color: string;
};
};
domain: string;
rows?: number | string;
cols?: number | string;
step?: number;
min?: number | string;
max?: number | string;
get className(): string;
get color(): string;
lang: string;
inlineErrors: boolean;
inputId: string;
ariaLabel: string;
readonly: boolean | null;
set disabled(v: string | boolean);
get disabled(): string | boolean;
set pattern(p: string | undefined);
get pattern(): string | undefined;
set currency(v: string);
get currency(): string;
set placeholder(v: string);
get placeholder(): string;
set required(v: boolean);
get required(): boolean;
set type(v: string);
get type(): string;
set value(v: any);
get value(): any;
valueChange: EventEmitter<any>;
keyPress: EventEmitter<KeyboardEvent>;
onChange: (value: any) => void;
onTouched: () => void;
constructor(regexpService: RegexpService);
writeValue(value: any): void;
registerOnChange(onChange: any): void;
registerOnTouched(onTouched: any): void;
markAsTouched(): void;
setDisabledState(disabled: boolean): void;
private setValueInControl;
registerOnValidatorChange(): void;
validate(control: AbstractControl): ValidationErrors | null;
ngOnInit(): void;
onLostFocus(): void;
onKeyUp(newValue: string): void;
onChangeValue(newValue: string): void;
onKeyPress(event: KeyboardEvent): void;
onColorPicked(newValue: string): void;
isUrl(): boolean;
isColor(): boolean;
isNumber(): boolean;
isPercentage(): boolean;
isPermillage(): boolean;
hasPrefix(): boolean;
hasPostfix(): boolean;
checkClassName(): string;
checkColor(): string;
checkType(type: string): void;
setEmailPatterns(): void;
setUrlPatterns(): void;
setColorPatterns(): void;
setDatePatterns(): void;
setTimePatterns(): void;
setPasswordPatterns(): void;
setNumberPatterns(): void;
setCurrencyPatterns(): void;
setPercentagePatterns(): void;
setPermillagePatterns(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "lux-input", never, { "rows": { "alias": "rows"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "step": { "alias": "step"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "lang": { "alias": "lang"; "required": false; }; "inlineErrors": { "alias": "inlineErrors"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "type": { "alias": "type"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; "keyPress": "keyPress"; }, never, never, false, never>;
}