import { Component , OnInit , HostBinding , Inject , Input , TemplateRef , Output , EventEmitter } from '@angular/core' ; import { GanttGroupInternal , GanttItemInternal , GanttBarClickEvent , GanttLineClickEvent } from '../../class' ; import { GANTT_UPPER_TOKEN , GanttUpper } from '../../gantt-upper' ; @ Component ( { selector : 'gantt-main' , templateUrl : './gantt-main.component.html' } ) export class GanttMainComponent implements OnInit { @ Input ( ) groups : GanttGroupInternal [ ] ; @ Input ( ) items : GanttItemInternal [ ] ; @ Input ( ) groupHeaderTemplate : TemplateRef < any > ; @ Input ( ) itemTemplate : TemplateRef < any > ; @ Input ( ) barTemplate : TemplateRef < any > ; @ Input ( ) rangeTemplate : TemplateRef < any > ; @ Output ( ) barClick = new EventEmitter < GanttBarClickEvent > ( ) ; @ Output ( ) lineClick = new EventEmitter < GanttLineClickEvent > ( ) ; @ HostBinding ( 'class.gantt-main-container' ) ganttMainClass = true ; constructor ( @ Inject ( GANTT_UPPER_TOKEN ) public ganttUpper ) { } ngOnInit ( ) { } trackBy ( item , index ) { return item . id || index ; } }