@metadev/lux
Version:
Lux: Library with User Interface components for Angular.
39 lines (38 loc) • 2 kB
TypeScript
import { EventEmitter } from '@angular/core';
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
import * as i0 from "@angular/core";
export declare class SelectComponent implements ControlValueAccessor, Validator {
id: string;
disabled: boolean;
required: boolean;
/** Allow multiple elements */
multiple: boolean;
value: string[];
valueChange: EventEmitter<string[]>;
placeholder: string;
/** If set, check there is no duplicates in the data. */
unique: boolean;
/** Validation function for new items. Returns error or null if valid */
validateItem: (item: string) => string;
newEntry: string;
error: any;
isValidNewEntry: boolean;
private touched;
constructor();
onChange: (value: any) => void;
onTouched: () => void;
writeValue(value: any): void;
registerOnChange(onChange: any): void;
registerOnTouched(onTouched: any): void;
markAsTouched(): void;
setDisabledState(disabled: boolean): void;
registerOnValidatorChange(): void;
validate(control: AbstractControl): ValidationErrors | null;
get canAdd(): boolean;
add(val: string): void;
remove(index: number): void;
onKeyPress(event: KeyboardEvent): void;
onChangeNewEntry(newValue: string): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "lux-select", never, { "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "unique": { "alias": "unique"; "required": false; }; "validateItem": { "alias": "validateItem"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
}