import { Component , ElementRef , ViewContainerRef , ChangeDetectionStrategy , QueryList , Renderer2 , Injector , ValueProvider } from '@angular/core' ; import { ComponentBase , IComponentBase , applyMixins , ComponentMixins , PropertyCollectionInfo , setValue } from '@syncfusion/ej2-angular-base' ; import { ContextMenu } from '@syncfusion/ej2-navigations' ; export const inputs = [ 'animationSettings' , 'cssClass' , 'enableHtmlSanitizer' , 'enablePersistence' , 'enableRtl' , 'enableScrolling' , 'fields' , 'filter' , 'hoverDelay' , 'items' , 'locale' , 'showItemOnClick' , 'target' , 'template' ] ; export const outputs = [ 'beforeClose' , 'beforeItemRender' , 'beforeOpen' , 'created' , 'onClose' , 'onOpen' , 'select' ] ; export const twoWays = [ '' ] ; /**
 * Represents the EJ2 Angular ContextMenu Component.
 * ```html
 * <div id='target'>Right click / Touch hold to open the ContextMenu</div>
 * <ejs-contextmenu target='#target' [items]='menuItems'></ejs-contextmenu>
 * ```
 */ @ Component ( { selector : 'ejs-contextmenu' , inputs : inputs , outputs : outputs , template : '' , changeDetection : ChangeDetectionStrategy . OnPush , queries : { } } ) @ ComponentMixins ( [ ComponentBase ] ) export class ContextMenuComponent extends ContextMenu implements IComponentBase { public context : any ; public tagObjects : any ; beforeClose : any ; beforeItemRender : any ; beforeOpen : any ; created : any ; onClose : any ; onOpen : any ; public select : any ; 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 . context = new ComponentBase ( ) ; } public ngOnInit ( ) { this . context . ngOnInit ( this ) ; } public ngAfterViewInit ( ) { this . context . ngAfterViewInit ( this ) ; } public ngOnDestroy ( ) { this . context . ngOnDestroy ( this ) ; } public ngAfterContentChecked ( ) { this . context . ngAfterContentChecked ( this ) ; } public registerEvents : ( eventList : string [ ] ) => void ; public addTwoWay : ( propList : string [ ] ) => void ; }