UNPKG

smart-webcomponents

Version:

Web Components & Custom Elements for Professional Web Applications

911 lines (808 loc) 115 kB
import { GanttChart } from './../index'; import { GanttChartDataExportItemType, GanttDayFormat, Duration, HorizontalScrollBarVisibility, HourFormat, MonthFormat, MonthScale, QuarterFormat, GanttChartResourceTimelineMode, GanttChartResourceTimelineView, GanttChartSelectionMode, GanttChartSortMode, GanttChartTaskType, VerticalScrollBarVisibility, GanttChartView, YearFormat, WeekFormat, GanttChartDataExport, GanttChartDateMarker, GanttChartResource, GanttChartResourceColumn, GanttChartTask, GanttChartTaskIndicator, GanttChartTaskPlanned, GanttChartTaskSegment, GanttChartTaskColumn, GanttChartTooltip, ElementRenderMode} from './../index'; import { Component, Directive, AfterViewInit, ElementRef, Input, OnInit, OnChanges, OnDestroy, SimpleChanges, Output, EventEmitter } from '@angular/core'; import { BaseElement, Smart } from './smart.element'; export { GanttChartDataExportItemType, GanttDayFormat, Duration, HorizontalScrollBarVisibility, HourFormat, MonthFormat, MonthScale, QuarterFormat, GanttChartResourceTimelineMode, GanttChartResourceTimelineView, GanttChartSelectionMode, GanttChartSortMode, GanttChartTaskType, VerticalScrollBarVisibility, GanttChartView, YearFormat, WeekFormat, GanttChartDataExport, GanttChartDateMarker, GanttChartResource, GanttChartResourceColumn, GanttChartTask, GanttChartTaskIndicator, GanttChartTaskPlanned, GanttChartTaskSegment, GanttChartTaskColumn, GanttChartTooltip, ElementRenderMode} from './../index'; export { Smart } from './smart.element'; export { GanttChart } from './../index'; @Directive({ exportAs: 'smart-gantt-chart', selector: 'smart-gantt-chart, [smart-gantt-chart]' }) export class GanttChartComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges { constructor(ref: ElementRef<GanttChart>) { super(ref); this.nativeElement = ref.nativeElement as GanttChart; } private eventHandlers: any[] = []; public declare nativeElement: GanttChart; /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ public createComponent(properties = {}): any { this.nativeElement = <GanttChart>document.createElement('smart-gantt-chart'); for (let propertyName in properties) { this.nativeElement[propertyName] = properties[propertyName]; } return this.nativeElement; } /** @description Determines whether nonworkingDays/nonworkingHours are taken into considuration when determining the dateEnd of the tasks. When this property is enabled the dateEnd of the tasks is calculated to include only the actual working time. By default it's disabled and only calendar time is used. */ @Input() get adjustToNonworkingTime(): boolean { return this.nativeElement ? this.nativeElement.adjustToNonworkingTime : undefined; } set adjustToNonworkingTime(value: boolean) { this.nativeElement ? this.nativeElement.adjustToNonworkingTime = value : undefined; } /** @description Recalculates the tasks that are connected and re-schedules them according to their connections. If no connections are present, autoScheduling has no effect until a connection is created. Connection types determines the start/end date limits of the tasks. */ @Input() get autoSchedule(): boolean { return this.nativeElement ? this.nativeElement.autoSchedule : undefined; } set autoSchedule(value: boolean) { this.nativeElement ? this.nativeElement.autoSchedule = value : undefined; } /** @description Affects the tasks only when autoSchedule is enabled. When set to true, the tasks are strictly scheduled ( according to their connections ) and dragging is not allowed. Users can set lag to specific connections to determine a delay of overlap of between the two tasks ( interval of time in miliseconds ). Lag one of the attributes of a task connection and should be set in the dataSource where the task connections are defined. */ @Input() get autoScheduleStrictMode(): boolean { return this.nativeElement ? this.nativeElement.autoScheduleStrictMode : undefined; } set autoScheduleStrictMode(value: boolean) { this.nativeElement ? this.nativeElement.autoScheduleStrictMode = value : undefined; } /** @description Determines the scroll speed when dragging when autoScroll property is set. */ @Input() get autoScrollStep(): number { return this.nativeElement ? this.nativeElement.autoScrollStep : undefined; } set autoScrollStep(value: number) { this.nativeElement ? this.nativeElement.autoScrollStep = value : undefined; } /** @description Enabled/Disables the colummn header menu. When enabled and the user hovers a column header, a drop down button will appear that triggers a column menu for quick actions like sorting, filtering, etc. The actions depend on the enabled Gantt features, for example the filtering action will be available only if filtering is enabled for the element. */ @Input() get columnMenu(): boolean { return this.nativeElement ? this.nativeElement.columnMenu : undefined; } set columnMenu(value: boolean) { this.nativeElement ? this.nativeElement.columnMenu = value : undefined; } /** @description Determines whether the Table columns are resizable or not. When enabled it is possible to resize the columns from the header cells of the Table in both Task and Resource timelines. */ @Input() get columnResize(): boolean { return this.nativeElement ? this.nativeElement.columnResize : undefined; } set columnResize(value: boolean) { this.nativeElement ? this.nativeElement.columnResize = value : undefined; } /** @description Determines resize feedback is used during column resizing. This property is applicable only when columnResize is enabled. */ @Input() get columnResizeFeedback(): boolean { return this.nativeElement ? this.nativeElement.columnResizeFeedback : undefined; } set columnResizeFeedback(value: boolean) { this.nativeElement ? this.nativeElement.columnResizeFeedback = value : undefined; } /** @description Gantt's current time. By default it is the today's date. */ @Input() get currentTime(): string | Date { return this.nativeElement ? this.nativeElement.currentTime : undefined; } set currentTime(value: string | Date) { this.nativeElement ? this.nativeElement.currentTime = value : undefined; } /** @description Enables/Disables the current time indicator. Current time indicator shows the current time in the appropriate view cells. */ @Input() get currentTimeIndicator(): boolean { return this.nativeElement ? this.nativeElement.currentTimeIndicator : undefined; } set currentTimeIndicator(value: boolean) { this.nativeElement ? this.nativeElement.currentTimeIndicator = value : undefined; } /** @description Determines the refresh interval in seconds for the currentTimeIndicator. */ @Input() get currentTimeIndicatorInterval(): number { return this.nativeElement ? this.nativeElement.currentTimeIndicatorInterval : undefined; } set currentTimeIndicatorInterval(value: number) { this.nativeElement ? this.nativeElement.currentTimeIndicatorInterval = value : undefined; } /** @description Sets the GanttChart's Data Export options. */ @Input() get dataExport(): GanttChartDataExport { return this.nativeElement ? this.nativeElement.dataExport : undefined; } set dataExport(value: GanttChartDataExport) { this.nativeElement ? this.nativeElement.dataExport = value : undefined; } /** @description Determines the tasks that will be loaded inside the Timeline. Each item represents an object that should contain the following properties: label - the label of the TaskdateStart - the starting date of the Task. Should be a string representing a valid date.dateEnd - the ending date of the Task. Should be a string representing a valid date.type - determines the type of the task. Whether it's a simple task, a project or a milestone. Each type of task has specific behavior and additional attributes.. Additional properties: connections - an array of objects representing the connection between two tasks. Each connection (object) should have the following properties : target - a number representing the index of the target tasktype - a number representing the type of the connection. Four types of connections are available: 0 - is a connection of type Start-to-Start 1 - is a connection of type End-to-Start 2 - is a connection of type End-to-End3 - is a connection of type Start-to-End lag - a number that determines the delay between two connected auto scheduled tasks. Lag property can be a positive or a negative number. When negative it determines the overlap between two connected tasks. This property is used in conjuction with autoSchedule.duration - determines the duration of a Task in days, hours, minutes, seconds or miliseconds. Very usefull when the the dateEnd of a Task is unknown. The duration always shows the calendar time whether it is in days/hours or other.minDuration - sets the minimum duration of a task. maxDuration - sets the maximum duration of a task.minDateStart - determines the mininum date that a task can start from. Must be if type string and should represent a valid date.maxDateStart - determines the maximum date that a task can start from. Must be if type string and should represent a valid date.minDateEnd - determines the mininum date that a task can end. Must be if type string and should represent a valid date.maxDateEnd - determines the maximum date that a task can end. Must be if type string and should represent a valid date.progress - a number that determines the progress of a task ( from 0 to 100 ).overdue - a boolean that indicates whether the task's dateEnd has surpassed it's deadline date.disableDrag - a boolean property that disables the dragging of a task when set to true.disableResize - a boolean property that disables the resizing of a task when set to true.dragProject - a boolean that determines whether or not the whole project (along with the tasks) can be dragged while dragging the project task. Applicalbe only to Projects.segments - an array of objects that allows to devide a task into multiple segements. Each segment (except the first) can have a different starting date, duration and label.synchronized - a boolean that if set the project task's start/end dates are automatically calculated based on the tasks. By default a synchronized project task can't be dragged alone. Applicable only to Project tasks.expanded - a boolean that determines if a project is expanded or not. If not all of it's sub-tasks are not visible. Only the project task itself is visible. By default no projects are expanded. Applicable only to project tasks..GanttChart also accepts a DataAdapter instance as dataSource. You can read more about the dataAdapter here - https://www.htmlelements.com/docs/data-adapter/. */ @Input() get dataSource(): any { return this.nativeElement ? this.nativeElement.dataSource : undefined; } set dataSource(value: any) { this.nativeElement ? this.nativeElement.dataSource = value : undefined; } /** @description Determines the format of the dates in the timeline header when they represent days. */ @Input() get dayFormat(): GanttDayFormat | string { return this.nativeElement ? this.nativeElement.dayFormat : undefined; } set dayFormat(value: GanttDayFormat | string) { this.nativeElement ? this.nativeElement.dayFormat = value : undefined; } /** @description Determines a specific end date for the Timeline. Usefull when the user wants custom ending date for the Timeline. If no date is set the end date of the timeline is automatically determined from the tasks. */ @Input() get dateEnd(): string | Date { return this.nativeElement ? this.nativeElement.dateEnd : undefined; } set dateEnd(value: string | Date) { this.nativeElement ? this.nativeElement.dateEnd = value : undefined; } /** @description Determines a specific starting date for the Timeline. Usefull when the user wants custom starting date for the Timeline. If no date is set the start date of the timeline is automatically determined from the tasks. */ @Input() get dateStart(): string | Date { return this.nativeElement ? this.nativeElement.dateStart : undefined; } set dateStart(value: string | Date) { this.nativeElement ? this.nativeElement.dateStart = value : undefined; } /** @description Determines the date markers that will be displayed inside the timeline. Date markers allow to mark and even label specific dates (including time) inside the GanttChart timeline. */ @Input() get dateMarkers(): GanttChartDateMarker[] { return this.nativeElement ? this.nativeElement.dateMarkers : undefined; } set dateMarkers(value: GanttChartDateMarker[]) { this.nativeElement ? this.nativeElement.dateMarkers = value : undefined; } /** @description Enables or disables the element. */ @Input() get disabled(): boolean { return this.nativeElement ? this.nativeElement.disabled : undefined; } set disabled(value: boolean) { this.nativeElement ? this.nativeElement.disabled = value : undefined; } /** @description Disables auto scrolling while dragging/resizing a task bar inside the Timeline. */ @Input() get disableAutoScroll(): boolean { return this.nativeElement ? this.nativeElement.disableAutoScroll : undefined; } set disableAutoScroll(value: boolean) { this.nativeElement ? this.nativeElement.disableAutoScroll = value : undefined; } /** @description Disables dragging of tasks in the Timeline. */ @Input() get disableTaskDrag(): boolean { return this.nativeElement ? this.nativeElement.disableTaskDrag : undefined; } set disableTaskDrag(value: boolean) { this.nativeElement ? this.nativeElement.disableTaskDrag = value : undefined; } /** @description Disables task progress changing in the Timeline. */ @Input() get disableTaskProgressChange(): boolean { return this.nativeElement ? this.nativeElement.disableTaskProgressChange : undefined; } set disableTaskProgressChange(value: boolean) { this.nativeElement ? this.nativeElement.disableTaskProgressChange = value : undefined; } /** @description Disables resizing of tasks in the Timeline. */ @Input() get disableTaskResize(): boolean { return this.nativeElement ? this.nativeElement.disableTaskResize : undefined; } set disableTaskResize(value: boolean) { this.nativeElement ? this.nativeElement.disableTaskResize = value : undefined; } /** @description Disables the selection inside the GanttChart. */ @Input() get disableSelection(): boolean { return this.nativeElement ? this.nativeElement.disableSelection : undefined; } set disableSelection(value: boolean) { this.nativeElement ? this.nativeElement.disableSelection = value : undefined; } /** @description Disables the task segment dragging. */ @Input() get disableSegmentDrag(): boolean { return this.nativeElement ? this.nativeElement.disableSegmentDrag : undefined; } set disableSegmentDrag(value: boolean) { this.nativeElement ? this.nativeElement.disableSegmentDrag = value : undefined; } /** @description Disables the task segment resizing. */ @Input() get disableSegmentResize(): boolean { return this.nativeElement ? this.nativeElement.disableSegmentResize : undefined; } set disableSegmentResize(value: boolean) { this.nativeElement ? this.nativeElement.disableSegmentResize = value : undefined; } /** @description Disables the window editor for the GanttChart. */ @Input() get disableWindowEditor(): boolean { return this.nativeElement ? this.nativeElement.disableWindowEditor : undefined; } set disableWindowEditor(value: boolean) { this.nativeElement ? this.nativeElement.disableWindowEditor = value : undefined; } /** @description Determines in what unit is task duration property measured. */ @Input() get durationUnit(): Duration | string { return this.nativeElement ? this.nativeElement.durationUnit : undefined; } set durationUnit(value: Duration | string) { this.nativeElement ? this.nativeElement.durationUnit = value : undefined; } /** @description Determines whether a dedicated filter row is used for Table filtering instead of the default filter input. This property has no effect if filtering is not enabled. */ @Input() get filterRow(): boolean { return this.nativeElement ? this.nativeElement.filterRow : undefined; } set filterRow(value: boolean) { this.nativeElement ? this.nativeElement.filterRow = value : undefined; } /** @description Determines the view start day. Sunday is 0, Monday is 1, Saturday is 6. By default it's Sunday. */ @Input() get firstDayOfWeek(): number { return this.nativeElement ? this.nativeElement.firstDayOfWeek : undefined; } set firstDayOfWeek(value: number) { this.nativeElement ? this.nativeElement.firstDayOfWeek = value : undefined; } /** @description Groups the tasks inside the Task timeline according to the resources they are assigned to. Unassigned tasks are placed in a default group labeled 'Unassigned'. */ @Input() get groupByResources(): boolean { return this.nativeElement ? this.nativeElement.groupByResources : undefined; } set groupByResources(value: boolean) { this.nativeElement ? this.nativeElement.groupByResources = value : undefined; } /** @description Allows to create a custom header content for the Task Panel. The attribute accepts an HTMLTemplate element, it's id or a function. */ @Input() get headerTemplate(): any { return this.nativeElement ? this.nativeElement.headerTemplate : undefined; } set headerTemplate(value: any) { this.nativeElement ? this.nativeElement.headerTemplate = value : undefined; } /** @description Determines whether the dateMarkers are visible or not. */ @Input() get hideDateMarkers(): boolean { return this.nativeElement ? this.nativeElement.hideDateMarkers : undefined; } set hideDateMarkers(value: boolean) { this.nativeElement ? this.nativeElement.hideDateMarkers = value : undefined; } /** @description By default the Timeline has a three level header - timeline details, timeline second details and timeline header. This property hides the header container( the bottom container ). */ @Input() get hideTimelineHeader(): boolean { return this.nativeElement ? this.nativeElement.hideTimelineHeader : undefined; } set hideTimelineHeader(value: boolean) { this.nativeElement ? this.nativeElement.hideTimelineHeader = value : undefined; } /** @description By default the Timeline has a three level header - timeline details, timeline second details and timeline header. This property hides the header details container( the top container ). */ @Input() get hideTimelineHeaderDetails(): boolean { return this.nativeElement ? this.nativeElement.hideTimelineHeaderDetails : undefined; } set hideTimelineHeaderDetails(value: boolean) { this.nativeElement ? this.nativeElement.hideTimelineHeaderDetails = value : undefined; } /** @description By default the Timeline has a three level header - timeline details and timeline header. This property hides the second header details container( the middle container ). */ @Input() get hideTimelineSecondHeaderDetails(): boolean { return this.nativeElement ? this.nativeElement.hideTimelineSecondHeaderDetails : undefined; } set hideTimelineSecondHeaderDetails(value: boolean) { this.nativeElement ? this.nativeElement.hideTimelineSecondHeaderDetails = value : undefined; } /** @description Hides the Resource panel regardless of the resources availability By default the Resource panel is visible if resources are added to the GanttChart. This property allows to hide the Resource panel permanently. */ @Input() get hideResourcePanel(): boolean { return this.nativeElement ? this.nativeElement.hideResourcePanel : undefined; } set hideResourcePanel(value: boolean) { this.nativeElement ? this.nativeElement.hideResourcePanel = value : undefined; } /** @description Determines weather or not horizontal scrollbar is shown. */ @Input() get horizontalScrollBarVisibility(): HorizontalScrollBarVisibility | string { return this.nativeElement ? this.nativeElement.horizontalScrollBarVisibility : undefined; } set horizontalScrollBarVisibility(value: HorizontalScrollBarVisibility | string) { this.nativeElement ? this.nativeElement.horizontalScrollBarVisibility = value : undefined; } /** @description Determines the format of the dates inside the timeline header when they represent hours. */ @Input() get hourFormat(): HourFormat | string { return this.nativeElement ? this.nativeElement.hourFormat : undefined; } set hourFormat(value: HourFormat | string) { this.nativeElement ? this.nativeElement.hourFormat = value : undefined; } /** @description When enabled, scrolling to the end of the horizotal timeline, triggers the creation of additional to extend the time range. The number of cells to be added when the scrollbar reaches the end position is determined by the infiniteTimelineStep. */ @Input() get infiniteTimeline(): boolean { return this.nativeElement ? this.nativeElement.infiniteTimeline : undefined; } set infiniteTimeline(value: boolean) { this.nativeElement ? this.nativeElement.infiniteTimeline = value : undefined; } /** @description Determines the number of cells to be added when the horizontal scroll bar of the Timeline reaches it's end position when infiniteTimeline is enabled. */ @Input() get infiniteTimelineStep(): number { return this.nativeElement ? this.nativeElement.infiniteTimelineStep : undefined; } set infiniteTimelineStep(value: number) { this.nativeElement ? this.nativeElement.infiniteTimelineStep = value : undefined; } /** @description When set the Timeline is positioned on the left side while the Task Tree is positioned on the right. By default it's vice versa. */ @Input() get inverted(): boolean { return this.nativeElement ? this.nativeElement.inverted : undefined; } set inverted(value: boolean) { this.nativeElement ? this.nativeElement.inverted = value : undefined; } /** @description Determines whether keyboard navigation inside the Table is enabled or not. Keyboard navigation affects both Task and Resource Tables. It allows to navigate between items. the following keyboard shortcut keys are available for focused tasks inside the Task Table: Enter - opens the Window editor to edit the currently focused task.Delete - opens a confirmation window regarding the deletion of the currently focused task. */ @Input() get keyboardNavigation(): boolean { return this.nativeElement ? this.nativeElement.keyboardNavigation : undefined; } set keyboardNavigation(value: boolean) { this.nativeElement ? this.nativeElement.keyboardNavigation = value : undefined; } /** @description Sets or gets the unlockKey which unlocks the product. */ @Input() get unlockKey(): string { return this.nativeElement ? this.nativeElement.unlockKey : undefined; } set unlockKey(value: string) { this.nativeElement ? this.nativeElement.unlockKey = value : undefined; } /** @description Determines the language of the GanttChart. */ @Input() get locale(): string { return this.nativeElement ? this.nativeElement.locale : undefined; } set locale(value: string) { this.nativeElement ? this.nativeElement.locale = value : undefined; } /** @description Detetmines the maximum possible date of the Timeline. */ @Input() get max(): string | Date { return this.nativeElement ? this.nativeElement.max : undefined; } set max(value: string | Date) { this.nativeElement ? this.nativeElement.max = value : undefined; } /** @description Detetmines the minimum possible date of the Timeline. */ @Input() get min(): string | Date { return this.nativeElement ? this.nativeElement.min : undefined; } set min(value: string | Date) { this.nativeElement ? this.nativeElement.min = value : undefined; } /** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */ @Input() get messages(): any { return this.nativeElement ? this.nativeElement.messages : undefined; } set messages(value: any) { this.nativeElement ? this.nativeElement.messages = value : undefined; } /** @description Determines the format of the dates the timeline header when they represent months. */ @Input() get monthFormat(): MonthFormat | string { return this.nativeElement ? this.nativeElement.monthFormat : undefined; } set monthFormat(value: MonthFormat | string) { this.nativeElement ? this.nativeElement.monthFormat = value : undefined; } /** @description Determines the scale in Month view. */ @Input() get monthScale(): MonthScale | string { return this.nativeElement ? this.nativeElement.monthScale : undefined; } set monthScale(value: MonthScale | string) { this.nativeElement ? this.nativeElement.monthScale = value : undefined; } /** @description Determines the nonworking days of the week from 0 to 6, where 0 is the first day of the week and 6 is the last day. Nonworking days will be displayed with colored cells inside the timeline and will not affect the dateEnd of the tasks unless the adjustToNonworkingTime property is enabled. */ @Input() get nonworkingDays(): number[] { return this.nativeElement ? this.nativeElement.nonworkingDays : undefined; } set nonworkingDays(value: number[]) { this.nativeElement ? this.nativeElement.nonworkingDays = value : undefined; } /** @description Determines the nonworking hours of a day. Hours are represented as numbers inside an array (e.g. [1,2,3] - means 1,2 and 3 AM) or number ranges represented as nested arrays(e.g. [[0,6]] - means from 0 to 6 AM). In the timline the cells that represent nonworking days are colored differently from the rest and will not affect the dateEnd of the tasks unless the adjustToNonworkingTime property is enabled. */ @Input() get nonworkingHours(): number[] | number[][] { return this.nativeElement ? this.nativeElement.nonworkingHours : undefined; } set nonworkingHours(value: number[] | number[][]) { this.nativeElement ? this.nativeElement.nonworkingHours = value : undefined; } /** @description A function that can be used to completly customize the task element. The function has five arguments: task - the task object.segment - the task current segment object. If the task has only one segment, the task object is passed again.taskElement - the task's html element.segmentElement - the task's segment html element.labelElement - the task's segment label html element. */ @Input() get onTaskRender(): any { return this.nativeElement ? this.nativeElement.onTaskRender : undefined; } set onTaskRender(value: any) { this.nativeElement ? this.nativeElement.onTaskRender = value : undefined; } /** @description A function that can be used to completly customize the task element. The function has two arguments: task - the task object.taskElement - the task's html element. */ @Input() get taskFormatFunction(): any { return this.nativeElement ? this.nativeElement.taskFormatFunction : undefined; } set taskFormatFunction(value: any) { this.nativeElement ? this.nativeElement.taskFormatFunction = value : undefined; } /** @description A function that can be used to completly customize the tooltip. The function has three arguments: tooltipObject - the tooltip object.event - the event that triggered the tooltip.content - the tooltip's label element. */ @Input() get tooltipFormatFunction(): any { return this.nativeElement ? this.nativeElement.tooltipFormatFunction : undefined; } set tooltipFormatFunction(value: any) { this.nativeElement ? this.nativeElement.tooltipFormatFunction = value : undefined; } /** @description A function that can be used to completly customize the popup Window that is used to interact width tasks by changing their properties. The function as three arguments: target - the target popup Window that is about to be opened.type - the type of the window. The type determines the purpose of the window. Three possible values: 'task' (task editing), 'confirm' ( confirmation window), 'connection' (used when deleting a connection between tasks). item - the connection/task object that is the target of the window. */ @Input() get popupWindowCustomizationFunction(): any { return this.nativeElement ? this.nativeElement.popupWindowCustomizationFunction : undefined; } set popupWindowCustomizationFunction(value: any) { this.nativeElement ? this.nativeElement.popupWindowCustomizationFunction = value : undefined; } /** @description Determines which Tab items are visible inside the popup window. Three possible values are allowed: general - the general tab with task properties determines by the taskColumns property.dependency - the dependency tab which shows the connections to the task and allows to create/delete connections.segments - the segments tab which shows the segments of the task and allows to created/delete segments.. */ @Input() get popupWindowTabs(): string[] { return this.nativeElement ? this.nativeElement.popupWindowTabs : undefined; } set popupWindowTabs(value: string[]) { this.nativeElement ? this.nativeElement.popupWindowTabs = value : undefined; } /** @description A format function for the Timeline task progress label. The expected result from the function is a string. The label is hidden by default can be shown with the showProgressLabel property. */ @Input() get progressLabelFormatFunction(): any { return this.nativeElement ? this.nativeElement.progressLabelFormatFunction : undefined; } set progressLabelFormatFunction(value: any) { this.nativeElement ? this.nativeElement.progressLabelFormatFunction = value : undefined; } /** @description Determines the format of the dates the timeline header when they represent quarters. */ @Input() get quarterFormat(): QuarterFormat | string { return this.nativeElement ? this.nativeElement.quarterFormat : undefined; } set quarterFormat(value: QuarterFormat | string) { this.nativeElement ? this.nativeElement.quarterFormat = value : undefined; } /** @description A getter that returns a flat structure as an array of all resources inside the element. */ @Input() get resources(): GanttChartResource[] { return this.nativeElement ? this.nativeElement.resources : undefined; } set resources(value: GanttChartResource[]) { this.nativeElement ? this.nativeElement.resources = value : undefined; } /** @description Deteremines the columns that will be visible in the Resource Tree. Each entry in the value of this property must be of type Object. It should contain the label and value keys. The value of label determines the column header label inside the Task Tree. The value of value determines the content of the cells in the column. By default, one column with all resource labels is visible. Additional properties: formatFunction - a function that allows to customize the content of each record in the column. The function accepts two arguments - the actual label as string that is going to be inserted and the index of the resource. The function must return a string as the new content. min - controls the min size of the column max - controls the max size of the columnsize - controls the actual size of the column */ @Input() get resourceColumns(): GanttChartResourceColumn[] { return this.nativeElement ? this.nativeElement.resourceColumns : undefined; } set resourceColumns(value: GanttChartResourceColumn[]) { this.nativeElement ? this.nativeElement.resourceColumns = value : undefined; } /** @description Determines whether the Resource Table is filterable or not. */ @Input() get resourceFiltering(): boolean { return this.nativeElement ? this.nativeElement.resourceFiltering : undefined; } set resourceFiltering(value: boolean) { this.nativeElement ? this.nativeElement.resourceFiltering = value : undefined; } /** @description A format function that allows to re-format the group row labels when groupByResources is enabled. */ @Input() get resourceGroupFormatFunction(): any { return this.nativeElement ? this.nativeElement.resourceGroupFormatFunction : undefined; } set resourceGroupFormatFunction(value: any) { this.nativeElement ? this.nativeElement.resourceGroupFormatFunction = value : undefined; } /** @description Allows to create a custom header content for the Resource Panel. The attribute accepts an HTMLTemplate element, it's id or a function. */ @Input() get resourcePanelHeaderTemplate(): any { return this.nativeElement ? this.nativeElement.resourcePanelHeaderTemplate : undefined; } set resourcePanelHeaderTemplate(value: any) { this.nativeElement ? this.nativeElement.resourcePanelHeaderTemplate = value : undefined; } /** @description Determines the min size of the Resource Panel. */ @Input() get resourcePanelMin(): number | string { return this.nativeElement ? this.nativeElement.resourcePanelMin : undefined; } set resourcePanelMin(value: number | string) { this.nativeElement ? this.nativeElement.resourcePanelMin = value : undefined; } /** @description Determines the size of the Resource Panel. */ @Input() get resourcePanelSize(): number | string { return this.nativeElement ? this.nativeElement.resourcePanelSize : undefined; } set resourcePanelSize(value: number | string) { this.nativeElement ? this.nativeElement.resourcePanelSize = value : undefined; } /** @description Determines the refresh rate of the Resource Panel when dragging/resizing/progress changing a Task from the Timeline. This property allows to customize the interval between resource Tree/Timeline refreshes. By default they refresh immediately after a change. */ @Input() get resourcePanelRefreshRate(): number { return this.nativeElement ? this.nativeElement.resourcePanelRefreshRate : undefined; } set resourcePanelRefreshRate(value: number) { this.nativeElement ? this.nativeElement.resourcePanelRefreshRate = value : undefined; } /** @description A callback that can be used to customize the content of the resource Timeline cells. The callback accepts three arguments: taskIndexes - an array of task indexes that are assigned to the resource for the current cell.resourceIndex - the index of the resource.cellDate - the date of the current cell. This property is used when resourceTimelineView is set to custom. Depending on the resourceTimelineMode, it should return: string - when the resourceTimelineMode is set to 'diagram'.object - when the resourceTimelineMode is set to 'histogram'. The object should have two attributes: capacity and maxCapacity, in order to be visualized as a histogram.. Another usage of this callback is to customize the timeline resource representation completely if resourceTimelineMode is set to custom. */ @Input() get resourceTimelineFormatFunction(): any { return this.nativeElement ? this.nativeElement.resourceTimelineFormatFunction : undefined; } set resourceTimelineFormatFunction(value: any) { this.nativeElement ? this.nativeElement.resourceTimelineFormatFunction = value : undefined; } /** @description Determines how the capacity of the resources will be visualized inside the resource timeline. By default, the capacity is measured in hours depending on the view property of the element. */ @Input() get resourceTimelineMode(): GanttChartResourceTimelineMode | string { return this.nativeElement ? this.nativeElement.resourceTimelineMode : undefined; } set resourceTimelineMode(value: GanttChartResourceTimelineMode | string) { this.nativeElement ? this.nativeElement.resourceTimelineMode = value : undefined; } /** @description Determines how the resources will be displayed inside the resource Timeline. */ @Input() get resourceTimelineView(): GanttChartResourceTimelineView | string { return this.nativeElement ? this.nativeElement.resourceTimelineView : undefined; } set resourceTimelineView(value: GanttChartResourceTimelineView | string) { this.nativeElement ? this.nativeElement.resourceTimelineView = value : undefined; } /** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */ @Input() get rightToLeft(): boolean { return this.nativeElement ? this.nativeElement.rightToLeft : undefined; } set rightToLeft(value: boolean) { this.nativeElement ? this.nativeElement.rightToLeft = value : undefined; } /** @description Sets which tasks to select by their id or gets the currently selected task ids. If no id is provided for the task, an internal id is generated for each task according to it's index(tree path). */ @Input() get selectedTaskIds(): number[] | string[] { return this.nativeElement ? this.nativeElement.selectedTaskIds : undefined; } set selectedTaskIds(value: number[] | string[]) { this.nativeElement ? this.nativeElement.selectedTaskIds = value : undefined; } /** @description Sets which resources to select by their id or gets the currently selected resource ids. If no id is provided for the resource, an internal id is generated for each resource according to it's index(tree path). */ @Input() get selectedResourceIds(): number[] | string[] { return this.nativeElement ? this.nativeElement.selectedResourceIds : undefined; } set selectedResourceIds(value: number[] | string[]) { this.nativeElement ? this.nativeElement.selectedResourceIds = value : undefined; } /** @description Sets or gets the selection mode. Only applicable when selection is enabled. */ @Input() get selectionMode(): GanttChartSelectionMode | string { return this.nativeElement ? this.nativeElement.selectionMode : undefined; } set selectionMode(value: GanttChartSelectionMode | string) { this.nativeElement ? this.nativeElement.selectionMode = value : undefined; } /** @description Enables/Disables the current time shader. If enabled all cells that represent past time will be shaded. */ @Input() get shadeUntilCurrentTime(): boolean { return this.nativeElement ? this.nativeElement.shadeUntilCurrentTime : undefined; } set shadeUntilCurrentTime(value: boolean) { this.nativeElement ? this.nativeElement.shadeUntilCurrentTime = value : undefined; } /** @description Shows the selection column of the Task/Resource Table. When applied a checkbox column is displayed that allows to select tasks/resources. */ @Input() get showSelectionColumn(): boolean { return this.nativeElement ? this.nativeElement.showSelectionColumn : undefined; } set showSelectionColumn(value: boolean) { this.nativeElement ? this.nativeElement.showSelectionColumn = value : undefined; } /** @description Determines whether the baselnes of the tasks are visible or not. Baselines are defined via the 'planned' attribute on the task objects of the dataSource property. */ @Input() get showBaseline(): boolean { return this.nativeElement ? this.nativeElement.showBaseline : undefined; } set showBaseline(value: boolean) { this.nativeElement ? this.nativeElement.showBaseline = value : undefined; } /** @description Shows the progress label inside the progress bars of the Timeline tasks. */ @Input() get showProgressLabel(): boolean { return this.nativeElement ? this.nativeElement.showProgressLabel : undefined; } set showProgressLabel(value: boolean) { this.nativeElement ? this.nativeElement.showProgressLabel = value : undefined; } /** @description If set the dateStart/dateEnd of the tasks will be coerced to the nearest timeline cell date ( according to the view ). Affects the dragging operation as well. */ @Input() get snapToNearest(): boolean { return this.nativeElement ? this.nativeElement.snapToNearest : undefined; } set snapToNearest(value: boolean) { this.nativeElement ? this.nativeElement.snapToNearest = value : undefined; } /** @description Determines whether the GanttChart can be sorted by one, more then one or no columns. */ @Input() get sortFunction(): { (dataSource: any, sortColumns: string[], directions: string[], defaultCompareFunctions: { (firstRecord: any, secondRecord: any): number }[]): void } { return this.nativeElement ? this.nativeElement.sortFunction : undefined; } set sortFunction(value: { (dataSource: any, sortColumns: string[], directions: string[], defaultCompareFunctions: { (firstRecord: any, secondRecord: any): number }[]): void }) { this.nativeElement ? this.nativeElement.sortFunction = value : undefined; } /** @description A getter that returns a flat structure as an array of all tasks inside the element. */ @Input() get sortMode(): GanttChartSortMode | string { return this.nativeElement ? this.nativeElement.sortMode : undefined; } set sortMode(value: GanttChartSortMode | string) { this.nativeElement ? this.nativeElement.sortMode = value : undefined; } /** @description Deteremines the columns that will be visible in the Task Tree. Each entry in the value of this property must be of type Object. It should contain the label and value keys. The value of label determines the column header label inside the Task Tree. The value of value determines the content of the cells in the column. It should reference a task attribute from the dataSource. By default, one column with all task labels is visible. Additional properties: formatFunction - a function that allows to customize the content of each record in the column. The function accepts one argument - the actual label as string that is going to be inserted and must return some content. min - controls the min size of the column max - controls the max size of the column size - controls the actual size of the columncustomEditor - a callback that can be used to set a custom editor for the column when editing via the window. It accepts two arguments label - the label of the columnvalue - the value of the column. The callback must return the editor.setCustomEditorValue - a callback that is used to set the value of the custom editor.getCustomEditorValue - a callback that is used to get the value of the custom editor. */ @Input() get tasks(): GanttChartTask[] { return this.nativeElement ? this.nativeElement.tasks : undefined; } set tasks(value: GanttChartTask[]) { this.nativeElement ? this.nativeElement.tasks = value : undefined; } /** @description Determines whether the Task Table is filterable or not. */ @Input() get taskColumns(): GanttChartTaskColumn[] { return this.nativeElement ? this.nativeElement.taskColumns : undefined; } set taskColumns(value: GanttChartTaskColumn[]) { this.nativeElement ? this.nativeElement.taskColumns = value : undefined; } /** @description Determines the min size of the Task Panel. Used when Resource Panel is visible. */ @Input() get taskFiltering(): boolean { return this.nativeElement ? this.nativeElement.taskFiltering : undefined; } set taskFiltering(value: boolean) { this.nativeElement ? this.nativeElement.taskFiltering = value : undefined; } /** @description Determines the size of the Task Panel. Used when Resource Panel is visible. */ @Input() get taskPanelMin(): string | number { return this.nativeElement ? this.nativeElement.taskPanelMin : undefined; } set taskPanelMin(value: string | number) { this.nativeElement ? this.nativeElement.taskPanelMin = value : undefined; } /** @description Determines the min width of the timeline. */ @Input() get taskPanelSize(): string | number { return this.nativeElement ? this.nativeElement.taskPanelSize : undefined; } set taskPanelSize(value: string | number) { this.nativeElement ? this.nativeElement.taskPanelSize = value : undefined; } /** @description Determines the min width of the task table. */ @Input() get timelineMin(): string | number { return this.nativeElement ? this.nativeElement.timelineMin : undefined; } set timelineMin(value: string | number) { this.nativeElement ? this.nativeElement.timelineMin = value : undefined; } /** @description Determines the size(width) of the task table. */ @Input() get treeMin(): string | number { return this.nativeElement ? this.nativeElement.treeMin : undefined; } set treeMin(value: string | number) { this.nativeElement ? this.nativeElement.treeMin = value : undefined; } /** @description A format function for the Header of the Timeline. The function provides the following arguments: date - a Date object that represets the date for the current cell.type - a string that represents the type of date that the cell is showing, e.g. 'month', 'week', 'day', etc.isHeaderDetails - a boolean that indicates whether the current cell is part of the Header Details Container or not.value - a string that represents the default value for the cell provided by the element. */ @Input() get treeSize(): string | number { return this.nativeElement ? this.nativeElement.treeSize : undefined; } set treeSize(value: string | number) { this.nativeElement ? this.nativeElement.treeSize = value : undefined; } /** @description Determines whether the tooltips are enabled or not. Tooltips are available for timeline tasks, resources, connections, indicators and segments. */ @Input() get timelineHeaderFormatFunction(): any { return this.nativeElement ? this.nativeElement.timelineHeaderFormatFunction : undefined; } set timelineHeaderFormatFunction(value: any) { this.nativeElement ? this.nativeElement.timelineHeaderFormatFunction = value : undefined; } /** @description Determines weather or not vertical scrollbar is shown. */ @Input() get tooltip(): GanttChartTooltip { return this.nativeElement ? this.nativeElement.tooltip : undefined; } set tooltip(value: GanttChartTooltip) { this.nativeElement ? this.nativeElement.tooltip = value : undefined; } /** @description Determines the viewing date range of the timeline. Possible values: day - The timeline show the hours of the day.week - the timeline shows the days of the week.month - the timeline shows the days of the month.year - the timeline shows the months of the year.resource - displays the current tasks by grouping them according to the resources they have assigned. The unassigned tasks will be placed in a separate group called 'Unassigned'. The timeline has a header section that contains the labels of each cell according to the date inside them. The header is splitted in two sections in order to give a more detailed information of the dates. */ @Input() get verticalScrollBarVisibility(): VerticalScrollBarVisibility | string { return this.nativeElement ? this.nativeElement.verticalScrollBarVisibility : undefined; } set verticalScrollBarVisibility(value: VerticalScrollBarVisibility | string) { this.nativeElement ? this.nativeElement.verticalScrollBarVisibility = value : undefined; } /** @description Determines the format of the dates inside the timeline header when they represent years. */ @Input() get view(): GanttChartView | string { return this.nativeElement ? this.nativeElement.view : undefined; } set view(value: GanttChartView | string) { this.nativeElement ? this.nativeElement.view = value : undefined; } /** @description Determines the format of the dates inside the timeline header when they represent weeks. */ @Input() get yearFormat(): YearFormat | string { return this.nativeElement ? this.nativeElement.yearFormat : undefined; } set yearFormat(value: YearFormat | string) { this.nativeElement ? this.nativeElement.yearFormat = value : undefined; } /** @description Sets or gets the element's visual theme. */ @Input() get weekFormat(): WeekFormat | string { return this.nativeElement ? this.nativeElement.weekFormat : undefined; } set weekFormat(value: WeekFormat | string) { this.nativeElement ? this.nativeElement.weekFormat = value : undefined; } /** @description Sets or gets if the element can be focused. */ @Input() get theme(): string { return this.nativeElement ? this.nativeElement.theme : undefined; } set theme(value: string) { this.nativeElement ? this.nativeElement.theme = value : undefined; } /** @description undefined */ @Input() get unfocusable(): boolean { return this.nativeElement ? this.nativeElement.unfocusable : undefined; } set unfocusable(value: boolean) { this.nativeElement ? this.nativeElement.unfocusable = value : undefined; } /** @description This event is triggered when a batch update was started after executing the beginUpdate method. * @param event. The custom event. */ @Output() onBeginUpdate: EventEmitter<CustomEvent> = new EventEmitter(); /** @description This event is triggered when a batch update was ended from after executing the endUpdate method. * @param event. The custom event. */ @Output() onEndUpdate: EventEmitter<CustomEvent> = new EventEmitter(); /** @description This event is triggered when the user starts connecting one task to another. This event allows to cancel the operation by calling event.preventDefault() in the event handler function. * @param event. The custom event. Custom event was created with: event.detail( startIndex) * startIndex - The index of the task that a connection is started from. */ @Output() onConnectionStart: EventEmitter<CustomEvent> = new EventEmitter(); /** @description This event is triggered when the user completes a connection between two tasks. * @param event. The custom event. Custom event was created with: event.detail( id, startTaskId, startIndex, endIndex, endTaskId, type) * id - The id of the connection that was created. * startTaskId - The id of the task that a connection is started from. * startIndex - The index of the task that a connection is started from. * endIndex - The index of the task that a connection ended to. * endTaskId - The id of the task that a connection ended to. * type - The type of connection. Fours types are available: <ul><li><b>0</b> - start-to-start</li><li><b>1</b> - end-to-start</li><li><b>2</b> - end-to-end</li><li><b>3</b> - start-to-end</li></ul> */ @Output() onConnectionEnd: EventEmitter<CustomEvent>