UNPKG

@c10t/nice-component-library

Version:

nice-component-library

58 lines (57 loc) 3.15 kB
import { EventEmitter, Injector, OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, FormControl, NgControl } from '@angular/forms'; import { ValidatorService } from '../services/validator.service'; import { Observable } from 'rxjs'; import * as i0 from "@angular/core"; export declare class CvaLiveSearchingComponent implements ControlValueAccessor, OnInit { private injector; label: string; placeholder: string; hint: string; required: boolean; disabled: boolean; readonly: boolean; errorMessages: Map<string, (e?: any) => string>; isLabelOutside: boolean; isFloatLabel: boolean; percentOfLabelOutside: number; suffixFontAwesomeClass: string; displayKey: string; mappingConfig: Record<string, string>; searchFn: (term: string) => Observable<any[]>; onChange: EventEmitter<any>; isFormControl: boolean; row?: any; columnDef?: string; control: AbstractControl | undefined; textControl: FormControl<string>; filteredOptions: any[]; selected: any; loading: boolean; private searchSub?; constructor(injector: Injector, ngControl: NgControl); get NsValidator(): typeof ValidatorService; ngOnInit(): void; callValidator(): void; propagateChange: (_: any) => void; /** * Set the function to be called * when the formControl receives a change event. */ registerOnChange(fn: any): void; /** * Set the function to be called * when the formControl receives a touch event. */ registerOnTouched(): void; /** * Write a new value to the element. */ writeValue(obj: any): void; onOptionSelect(displayValue: any): void; textValueChangeSubscribe(): void; updateRowOrFormGroup(): void; onClear(): void; static ɵfac: i0.ɵɵFactoryDeclaration<CvaLiveSearchingComponent, [null, { optional: true; self: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration<CvaLiveSearchingComponent, "cva-live-searching", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "isLabelOutside": { "alias": "isLabelOutside"; "required": false; }; "isFloatLabel": { "alias": "isFloatLabel"; "required": false; }; "percentOfLabelOutside": { "alias": "percentOfLabelOutside"; "required": false; }; "suffixFontAwesomeClass": { "alias": "suffixFontAwesomeClass"; "required": false; }; "displayKey": { "alias": "displayKey"; "required": false; }; "mappingConfig": { "alias": "mappingConfig"; "required": false; }; "searchFn": { "alias": "searchFn"; "required": false; }; "isFormControl": { "alias": "isFormControl"; "required": false; }; "row": { "alias": "row"; "required": false; }; "columnDef": { "alias": "columnDef"; "required": false; }; }, { "onChange": "onChange"; }, never, never, false, never>; }