import { Component , ElementRef , ViewContainerRef , ValueProvider , Renderer2 , Injector , ChangeDetectionStrategy , forwardRef , ContentChild } from '@angular/core' ; import { NG_VALUE_ACCESSOR } from '@angular/forms' ; import { ComponentBase , IComponentBase , applyMixins , ComponentMixins , PropertyCollectionInfo , FormBase , setValue } from '@syncfusion/ej2-angular-base' ; import { AutoComplete } from '@syncfusion/ej2-dropdowns' ; import { Template } from '@syncfusion/ej2-angular-base' ; export const inputs = [ 'actionFailureTemplate' , 'allowCustom' , 'allowFiltering' , 'autofill' , 'cssClass' , 'dataSource' , 'enablePersistence' , 'enableRtl' , 'enabled' , 'fields' , 'filterBarPlaceholder' , 'filterType' , 'floatLabelType' , 'footerTemplate' , 'groupTemplate' , 'headerTemplate' , 'highlight' , 'htmlAttributes' , 'ignoreAccent' , 'ignoreCase' , 'index' , 'itemTemplate' , 'locale' , 'minLength' , 'noRecordsTemplate' , 'placeholder' , 'popupHeight' , 'popupWidth' , 'query' , 'readonly' , 'showClearButton' , 'showPopupButton' , 'sortOrder' , 'suggestionCount' , 'text' , 'value' , 'valueTemplate' , 'width' , 'zIndex' ] ; export const outputs = [ 'actionBegin' , 'actionComplete' , 'actionFailure' , 'beforeOpen' , 'blur' , 'change' , 'close' , 'created' , 'customValueSpecifier' , 'dataBound' , 'destroyed' , 'filtering' , 'focus' , 'open' , 'select' , 'valueChange' ] ; export const twoWays = [ 'value' ] ; /**
 *The AutoComplete component provides the matched suggestion list when type into the input, from which the user can select one.
*```html
*<ejs-autocomplete></ejs-autocomplete>
*```
*/ @ Component ( { selector : 'ejs-autocomplete' , inputs : inputs , outputs : outputs , template : '' , changeDetection : ChangeDetectionStrategy . OnPush , providers : [ { provide : NG_VALUE_ACCESSOR , useExisting : forwardRef ( ( ) => AutoCompleteComponent ) , multi : true } ] , queries : { } } ) @ ComponentMixins ( [ ComponentBase , FormBase ] ) export class AutoCompleteComponent extends AutoComplete implements IComponentBase { public formCompContext : any ; public formContext : any ; public tagObjects : any ; actionBegin : any ; actionComplete : any ; actionFailure : any ; beforeOpen : any ; blur : any ; change : any ; close : any ; created : any ; customValueSpecifier : any ; dataBound : any ; destroyed : any ; filtering : any ; focus : any ; open : any ; select : any ; public valueChange : any ; default deprecated @ ContentChild ( 'footerTemplate' ) @ Template ( ) public footerTemplate : any ; default deprecated @ ContentChild ( 'headerTemplate' ) @ Template ( ) public headerTemplate : any ; default deprecated @ ContentChild ( 'groupTemplate' ) @ Template ( ) public groupTemplate : any ; default deprecated @ ContentChild ( 'itemTemplate' ) @ Template ( ) public itemTemplate : any ; @ ContentChild ( 'noRecordsTemplate' ) @ Template ( 'No records found' ) public noRecordsTemplate : any ; @ ContentChild ( 'actionFailureTemplate' ) @ Template ( 'Request failed' ) public actionFailureTemplate : any ; private skipFromEvent : boolean = true ; constructor ( private ngEle , private srenderer , private viewContainerRef , private injector ) { super ( ) ; this . element = this . ngEle . nativeElement ; this . injectedModules = this . injectedModules || [ ] ; this . registerEvents ( outputs ) ; this . addTwoWay . call ( this , twoWays ) ; setValue ( 'currentInstance' , this , this . viewContainerRef ) ; this . formContext = new FormBase ( ) ; this . formCompContext = new ComponentBase ( ) ; } public registerOnChange ( registerFunction ) { } public registerOnTouched ( registerFunction ) { } public writeValue ( value ) { } public setDisabledState ( disabled ) { } public ngOnInit ( ) { this . formCompContext . ngOnInit ( this ) ; } public ngAfterViewInit ( ) { this . formContext . ngAfterViewInit ( this ) ; } public ngOnDestroy ( ) { this . formCompContext . ngOnDestroy ( this ) ; } public ngAfterContentChecked ( ) { this . formCompContext . ngAfterContentChecked ( this ) ; } public registerEvents : ( eventList : string [ ] ) => void ; public addTwoWay : ( propList : string [ ] ) => void ; }