import { Component , Input , forwardRef } from '@angular/core' ; import { ControlValueAccessor , NG_VALUE_ACCESSOR } from '@angular/forms' ; import { ObMockMultiselectTexts } from './mock-multiselect.texts' ; @ Component ( { selector : 'ob-multiselect' , exportAs : 'obMultiselect' , providers : [ { provide : NG_VALUE_ACCESSOR , useExisting : forwardRef ( ( ) => ObMockMultiselectComponent ) , multi : true } ] , template : '' } ) export class ObMockMultiselectComponent implements ControlValueAccessor { @ Input ( ) options : any [ ] = [ ] ; @ Input ( ) texts : ObMockMultiselectTexts ; @ Input ( ) dropup = false ; @ Input ( ) labelProperty : string ; @ Input ( ) labelFormatter : ( option : any ) => string ; @ Input ( ) titleProperty : string ; @ Input ( ) titleFormatter : ( option : any ) => string ; @ Input ( ) idPrefix = 'multiselect' ; @ Input ( ) enableAllSelectedText ; @ Input ( ) dynamicTitleMaxItems ; @ Input ( ) enableSearch ; @ Input ( ) maxHeight ; @ Input ( ) selectionLimit ; @ Input ( ) showCheckAll ; @ Input ( ) showUncheckAll ; idContainer = 'multiselect-container' ; model : any [ ] = [ ] ; title : string ; titleTranslateParams : any = { } ; differ : any ; isVisible = false ; searchFilterText = '' ; disabled = false ; onClick ( target ) { } onKeyup ( $event ) { } onModelChange : ( _ : any ) => void = ( _ ) => { } ; onModelTouched : ( ) => void = ( ) => { } ; writeValue ( value ) { } registerOnChange ( fn ) { } registerOnTouched ( fn ) { } setDisabledState ( isDisabled ) { } toggleDropdown ( ) { } isSelected ( option ) { return true ; } toggleSelection ( option ) { } updateTitle ( ) { } checkAll ( ) { } uncheckAll ( ) { } preventCheckboxCheck ( event ) { } formatOptionForLabel ( item ) { return item ; } formatOptionForTitle ( item ) { return '' ; } }