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 { ListBox } from '@syncfusion/ej2-dropdowns' ; import { Template } from '@syncfusion/ej2-angular-base' ; export const inputs = [ 'actionFailureTemplate' , 'allowDragAndDrop' , 'allowFiltering' , 'cssClass' , 'dataSource' , 'enablePersistence' , 'enableRtl' , 'enabled' , 'fields' , 'filterBarPlaceholder' , 'filterType' , 'groupTemplate' , 'height' , 'ignoreAccent' , 'ignoreCase' , 'itemTemplate' , 'locale' , 'maximumSelectionLength' , 'noRecordsTemplate' , 'query' , 'scope' , 'selectionSettings' , 'sortOrder' , 'toolbarSettings' , 'value' , 'zIndex' ] ; export const outputs = [ 'focus' , 'blur' , 'actionBegin' , 'actionComplete' , 'actionFailure' , 'beforeDrop' , 'beforeItemRender' , 'change' , 'created' , 'dataBound' , 'destroyed' , 'drag' , 'dragStart' , 'drop' , 'filtering' , 'select' , 'valueChange' ] ; export const twoWays = [ 'value' ] ; /**
* The ListBox allows the user to select values from the predefined list of values.
*```html
*<ejs-listbox [dataSource]='data'></ejs-listbox>
*```
*/ @ Component ( { selector : 'ejs-listbox' , inputs : inputs , outputs : outputs , template : '' , changeDetection : ChangeDetectionStrategy . OnPush , providers : [ { provide : NG_VALUE_ACCESSOR , useExisting : forwardRef ( ( ) => ListBoxComponent ) , multi : true } ] , queries : { } } ) @ ComponentMixins ( [ ComponentBase , FormBase ] ) export class ListBoxComponent extends ListBox implements IComponentBase { public formCompContext : any ; public formContext : any ; public tagObjects : any ; actionBegin : any ; actionComplete : any ; actionFailure : any ; beforeDrop : any ; beforeItemRender : any ; change : any ; created : any ; dataBound : any ; destroyed : any ; drag : any ; dragStart : any ; drop : any ; filtering : any ; select : any ; public valueChange : any ; default deprecated @ ContentChild ( 'itemTemplate' ) @ Template ( ) public itemTemplate : any ; @ ContentChild ( 'noRecordsTemplate' ) @ Template ( 'No records found' ) public noRecordsTemplate : any ; public focus : any ; public blur : any ; constructor ( private ngEle , private srenderer , private viewContainerRef , private injector ) { super ( ) ; this . element = this . ngEle . nativeElement ; this . injectedModules = this . injectedModules || [ ] ; try { let mod = this . injector . get ( 'DropDownsCheckBoxSelection' ) ; if ( this . injectedModules . indexOf ( mod ) === - 1 ) { this . injectedModules . push ( mod ) ; } } catch { } 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 ; }