import { AfterViewInit, EventEmitter, ElementRef } from "@angular/core"; import { ControlValueAccessor } from "@angular/forms"; import { IEntityDataService, IFieldFilter } from "./../interfaces/index"; export declare const ACJ_VALUE_ACCESSOR: any; export declare class AutocompleteJqueryControl implements ControlValueAccessor, AfterViewInit { private elRef; private dataSource; /** id of current item on lookup*/ id: string; /** type of data has inputed into lookup (it can be a table or view in database)*/ private entityType; /** disable textbox, default is false*/ disabled: boolean; /** The filter for data display */ additionalFilters: IFieldFilter[]; /** css style for textbox */ styleClass: string; /** Value column will be display on textbox, default it is "Name" */ displayProperty: string; /** Sort array for data display on textbox, default sort is "Name" */ sortArray: string[]; private sort; /** when search with empty value, 30 items will be display */ top: number; /***/ private isHighlight; /** output change event when data on textbox has been changed, output : id */ change: EventEmitter; /** output selected event when data on textbox has been changed, output item with id and value parameter */ selected: EventEmitter; onTouched: Function; /** The control id number*/ private controlID; /** The global control id number (will be increased 1 when it has the constructor)*/ private static staticID; /** The value of elements selected */ private idString; getValue(): string; /** * Represents a Auto complete jquery component. * @constructor * @param cd NgControl * @param elRef ElementRef * @param dataSource IEntityDataService */ constructor(elRef: ElementRef, dataSource: IEntityDataService); /** * Implements method(registerOnChange) of interface ControlValueAccessor * @param fn */ registerOnChange(fn: (_: string) => void): void; /** * Implements method(registerOnTouched) of interface ControlValueAccessor * @param fn */ registerOnTouched(fn: () => void): void; /** * Implements method(writeValue) of interface ControlValueAccessor * @param value The write value */ writeValue(valueID: string): void; /** * Set value for textbox autocomplete * @param value */ setValue(valueID: string): void; /** * Implements method(ngAfterViewInit) of interface AfterViewInit * @param fn */ ngAfterViewInit(): void; }