@syncfusion/ej2-gantt 23.2.7 → 24.1.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/CHANGELOG.md +2 -5
  2. package/dist/ej2-gantt.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +2993 -332
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +3047 -366
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +2 -2
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +21 -21
  13. package/src/gantt/actions/cell-edit.js +7 -3
  14. package/src/gantt/actions/chart-scroll.d.ts +9 -1
  15. package/src/gantt/actions/chart-scroll.js +111 -3
  16. package/src/gantt/actions/connector-line-edit.js +8 -1
  17. package/src/gantt/actions/context-menu.js +2 -2
  18. package/src/gantt/actions/day-markers.d.ts +2 -1
  19. package/src/gantt/actions/dependency.js +2 -2
  20. package/src/gantt/actions/dialog-edit.d.ts +24 -0
  21. package/src/gantt/actions/dialog-edit.js +393 -2
  22. package/src/gantt/actions/edit.js +68 -21
  23. package/src/gantt/actions/keyboard.js +5 -1
  24. package/src/gantt/actions/pdf-export.js +12 -4
  25. package/src/gantt/actions/rowdragdrop.js +20 -9
  26. package/src/gantt/actions/selection.js +6 -3
  27. package/src/gantt/actions/taskbar-edit.d.ts +14 -0
  28. package/src/gantt/actions/taskbar-edit.js +517 -82
  29. package/src/gantt/actions/toolbar.js +4 -1
  30. package/src/gantt/base/css-constants.d.ts +2 -0
  31. package/src/gantt/base/css-constants.js +2 -0
  32. package/src/gantt/base/enum.d.ts +22 -0
  33. package/src/gantt/base/gantt-chart.js +63 -21
  34. package/src/gantt/base/gantt-model.d.ts +9 -1
  35. package/src/gantt/base/gantt.d.ts +11 -1
  36. package/src/gantt/base/gantt.js +46 -18
  37. package/src/gantt/base/interface.d.ts +135 -3
  38. package/src/gantt/base/splitter.js +6 -0
  39. package/src/gantt/base/task-processor.d.ts +1 -1
  40. package/src/gantt/base/task-processor.js +38 -10
  41. package/src/gantt/export/export-helper.d.ts +12 -0
  42. package/src/gantt/export/export-helper.js +316 -9
  43. package/src/gantt/export/pdf-base/pdf-grid-table.js +14 -1
  44. package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +36 -0
  45. package/src/gantt/export/pdf-connector-line.js +137 -32
  46. package/src/gantt/export/pdf-event-marker.d.ts +10 -0
  47. package/src/gantt/export/pdf-event-marker.js +57 -0
  48. package/src/gantt/export/pdf-gantt.d.ts +2 -0
  49. package/src/gantt/export/pdf-gantt.js +30 -10
  50. package/src/gantt/export/pdf-taskbar.d.ts +23 -2
  51. package/src/gantt/export/pdf-taskbar.js +771 -43
  52. package/src/gantt/export/pdf-timeline.d.ts +9 -0
  53. package/src/gantt/export/pdf-timeline.js +98 -20
  54. package/src/gantt/models/column.d.ts +12 -0
  55. package/src/gantt/renderer/chart-rows.d.ts +1 -1
  56. package/src/gantt/renderer/chart-rows.js +29 -16
  57. package/src/gantt/renderer/connector-line.js +8 -5
  58. package/src/gantt/renderer/edit-tooltip.js +3 -0
  59. package/src/gantt/renderer/event-marker.js +4 -1
  60. package/src/gantt/renderer/nonworking-day.js +18 -5
  61. package/src/gantt/renderer/timeline.d.ts +9 -0
  62. package/src/gantt/renderer/timeline.js +207 -27
  63. package/styles/bootstrap-dark.css +77 -16
  64. package/styles/bootstrap.css +78 -17
  65. package/styles/bootstrap4.css +78 -17
  66. package/styles/bootstrap5-dark.css +78 -17
  67. package/styles/bootstrap5.css +78 -17
  68. package/styles/fabric-dark.css +78 -17
  69. package/styles/fabric.css +78 -17
  70. package/styles/fluent-dark.css +78 -17
  71. package/styles/fluent.css +78 -17
  72. package/styles/gantt/_bootstrap-dark-definition.scss +7 -2
  73. package/styles/gantt/_bootstrap-definition.scss +7 -2
  74. package/styles/gantt/_bootstrap4-definition.scss +7 -2
  75. package/styles/gantt/_bootstrap5-definition.scss +7 -2
  76. package/styles/gantt/_fabric-dark-definition.scss +7 -2
  77. package/styles/gantt/_fabric-definition.scss +7 -2
  78. package/styles/gantt/_fluent-definition.scss +7 -2
  79. package/styles/gantt/_fusionnew-definition.scss +6 -2
  80. package/styles/gantt/_highcontrast-definition.scss +7 -2
  81. package/styles/gantt/_highcontrast-light-definition.scss +7 -2
  82. package/styles/gantt/_layout.scss +92 -20
  83. package/styles/gantt/_material-dark-definition.scss +7 -2
  84. package/styles/gantt/_material-definition.scss +7 -2
  85. package/styles/gantt/_material3-definition.scss +7 -2
  86. package/styles/gantt/_tailwind-definition.scss +6 -1
  87. package/styles/gantt/_theme.scss +11 -0
  88. package/styles/gantt/bootstrap-dark.css +77 -16
  89. package/styles/gantt/bootstrap.css +78 -17
  90. package/styles/gantt/bootstrap4.css +78 -17
  91. package/styles/gantt/bootstrap5-dark.css +78 -17
  92. package/styles/gantt/bootstrap5.css +78 -17
  93. package/styles/gantt/fabric-dark.css +78 -17
  94. package/styles/gantt/fabric.css +78 -17
  95. package/styles/gantt/fluent-dark.css +78 -17
  96. package/styles/gantt/fluent.css +78 -17
  97. package/styles/gantt/highcontrast-light.css +78 -17
  98. package/styles/gantt/highcontrast.css +78 -17
  99. package/styles/gantt/material-dark.css +78 -17
  100. package/styles/gantt/material.css +78 -17
  101. package/styles/gantt/material3-dark.css +77 -16
  102. package/styles/gantt/material3.css +77 -16
  103. package/styles/gantt/tailwind-dark.css +78 -17
  104. package/styles/gantt/tailwind.css +78 -17
  105. package/styles/highcontrast-light.css +78 -17
  106. package/styles/highcontrast.css +78 -17
  107. package/styles/material-dark.css +78 -17
  108. package/styles/material.css +78 -17
  109. package/styles/material3-dark.css +77 -16
  110. package/styles/material3.css +77 -16
  111. package/styles/tailwind-dark.css +78 -17
  112. package/styles/tailwind.css +78 -17
@@ -80,7 +80,7 @@ var Toolbar = /** @class */ (function () {
80
80
  // eslint-disable-next-line
81
81
  'placeholder= \"' + searchLocalText + '\"/>' +
82
82
  '<span id="' + this.id + '_searchbutton" class="e-input-group-icon e-search-icon e-icons"' +
83
- 'tabindex="-1" title="' + searchLocalText + '" aria-label= "search"></span>' +
83
+ 'tabindex="-1" title="' + searchLocalText + '" aria-label= "search" role="button"></span>' +
84
84
  '</div>',
85
85
  tooltipText: searchLocalText,
86
86
  align: 'Right', cssClass: 'e-search-wrapper'
@@ -363,6 +363,7 @@ var Toolbar = /** @class */ (function () {
363
363
  */
364
364
  Toolbar.prototype.zoomIn = function () {
365
365
  this.parent.timelineModule.processZooming(true);
366
+ this.parent.timelineModule.isZooming = false;
366
367
  };
367
368
  /**
368
369
  *
@@ -375,6 +376,7 @@ var Toolbar = /** @class */ (function () {
375
376
  }
376
377
  this.parent.timelineModule.processZoomToFit();
377
378
  this.parent.ganttChartModule.updateScrollLeft(0);
379
+ this.parent.timelineModule.isZoomToFit = false;
378
380
  };
379
381
  /**
380
382
  *
@@ -383,6 +385,7 @@ var Toolbar = /** @class */ (function () {
383
385
  */
384
386
  Toolbar.prototype.zoomOut = function () {
385
387
  this.parent.timelineModule.processZooming(false);
388
+ this.parent.timelineModule.isZooming = false;
386
389
  };
387
390
  /**
388
391
  * To refresh toolbar items bases current state of tasks
@@ -24,6 +24,8 @@ export declare const timelineHeaderCellLabel: string;
24
24
  export declare const weekendHeaderCell: string;
25
25
  export declare const timelineSingleHeaderCell: string;
26
26
  export declare const timelineSingleHeaderOuterDiv: string;
27
+ export declare const virtualTable: string;
28
+ export declare const virtualTrack: string;
27
29
  export declare const leftLabelContainer: string;
28
30
  export declare const leftLabelTempContainer: string;
29
31
  export declare const leftLabelInnerDiv: string;
@@ -25,6 +25,8 @@ export var timelineHeaderCellLabel = 'e-header-cell-label';
25
25
  export var weekendHeaderCell = 'e-weekend-header-cell';
26
26
  export var timelineSingleHeaderCell = 'e-timeline-single-header-cell';
27
27
  export var timelineSingleHeaderOuterDiv = 'e-timeline-single-header-outer-div';
28
+ export var virtualTable = 'e-virtualtable';
29
+ export var virtualTrack = 'e-virtualtrack';
28
30
  // Chart Rows-Class
29
31
  export var leftLabelContainer = 'e-left-label-container';
30
32
  export var leftLabelTempContainer = 'e-left-label-container e-left-label-temp-container';
@@ -294,3 +294,25 @@ export declare type CObject = {
294
294
  */
295
295
  export declare type ScheduleMode = 'Auto' | 'Manual' | 'Custom';
296
296
  export declare type ViewType = 'ProjectView' | 'ResourceView';
297
+ /**
298
+ * Defines PDF ContentType.
299
+ * ```props
300
+ * * Image :- PDF content is Image type
301
+ * * Line :- PDF content is Line type
302
+ * * PageNumber :- PDF content is PageNumber type
303
+ * * Text :- PDF content is Text type
304
+ * ```
305
+ */
306
+ export declare type ContentType = 'Image' | 'Line' | 'PageNumber' | 'Text';
307
+ /**
308
+ * Defines PDF PageNumber Type.
309
+ * ```props
310
+ * * LowerLatin :- LowerCase Latin pageNumber
311
+ * * LowerRoman :- LowerCase Roman pageNumber
312
+ * * UpperLatin :- UpperCase Latin pageNumber
313
+ * * UpperRoman :- UpperCase Roman pageNumber
314
+ * * Numeric :- Numeric pageNumber
315
+ * * Arabic :- Arabic pageNumber
316
+ * ```
317
+ */
318
+ export declare type PdfPageNumberType = 'LowerLatin' | 'LowerRoman' | 'UpperLatin' | 'UpperRoman' | 'Numeric' | 'Arabic';
@@ -17,7 +17,8 @@ var GanttChart = /** @class */ (function () {
17
17
  this.chartTimelineContainer = null;
18
18
  this.rangeViewContainer =
19
19
  createElement('div', { className: cls.rangeContainer });
20
- this.rangeViewContainer.setAttribute("role", "RangeContainer");
20
+ this.rangeViewContainer.setAttribute("role", "button");
21
+ this.rangeViewContainer.setAttribute("aria-label", "RangeContainer");
21
22
  this.virtualRender = new VirtualContentRenderer(this.parent);
22
23
  this.addEventListener();
23
24
  }
@@ -232,7 +233,7 @@ var GanttChart = /** @class */ (function () {
232
233
  });
233
234
  this.chartBodyContainer.appendChild(this.scrollElement);
234
235
  this.chartBodyContent = createElement('div', { className: cls.chartBodyContent, styles: 'position:relative; overflow:hidden ' });
235
- if (this.parent.virtualScrollModule && this.parent.enableVirtualization) {
236
+ if (this.parent.virtualScrollModule && this.parent.enableVirtualization || this.parent.enableTimelineVirtualization) {
236
237
  this.parent.ganttChartModule.virtualRender.renderWrapper();
237
238
  }
238
239
  else {
@@ -257,7 +258,7 @@ var GanttChart = /** @class */ (function () {
257
258
  var emptydivHeight = 36;
258
259
  var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
259
260
  var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
260
- if (emptyHeight >= contentElement['offsetHeight'] || this.parent.height === 'auto') {
261
+ if (emptyHeight >= contentElement['offsetHeight'] || this.parent.height === 'auto' || (contentElement['offsetHeight'] - emptyHeight) < emptydivHeight) {
261
262
  this.chartBodyContent.style.height = formatUnit(emptyHeight);
262
263
  }
263
264
  else {
@@ -269,7 +270,8 @@ var GanttChart = /** @class */ (function () {
269
270
  this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
270
271
  }
271
272
  } //let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
272
- this.chartBodyContent.style.width = formatUnit(this.parent.timelineModule.totalTimelineWidth);
273
+ this.chartBodyContent.style.width = (this.parent.enableTimelineVirtualization && (this.parent.timelineModule.totalTimelineWidth > this.parent.element.offsetWidth * 3)) ? formatUnit(this.parent.element.offsetWidth * 3)
274
+ : formatUnit(this.parent.timelineModule.totalTimelineWidth);
273
275
  this.setVirtualHeight();
274
276
  this.parent.notify('updateHeight', {});
275
277
  this.parent.updateGridLineContainerHeight();
@@ -281,7 +283,15 @@ var GanttChart = /** @class */ (function () {
281
283
  wrapper.style.height = this.parent.treeGrid.element.getElementsByClassName('e-virtualtrack')[0].style.height;
282
284
  var wrapper1 = getValue('wrapper', this.parent.ganttChartModule.virtualRender);
283
285
  var treegridVirtualHeight = this.parent.treeGrid.element.getElementsByClassName('e-virtualtable')[0].style.transform;
284
- wrapper1.style.transform = treegridVirtualHeight;
286
+ var virtualTable = document.getElementsByClassName('e-virtualtable')[1].style.transform;
287
+ if (this.parent.enableTimelineVirtualization && virtualTable !== "") {
288
+ var translateXValue = virtualTable.match(/translate.*\((.+)\)/)[1].split(', ')[0];
289
+ var translateYValue = treegridVirtualHeight.match(/translate.*\((.+)\)/)[1].split(', ')[1];
290
+ wrapper1.style.transform = "translate(" + translateXValue + ", " + translateYValue + ")";
291
+ }
292
+ else {
293
+ wrapper1.style.transform = treegridVirtualHeight;
294
+ }
285
295
  }
286
296
  };
287
297
  /**
@@ -306,7 +316,7 @@ var GanttChart = /** @class */ (function () {
306
316
  var emptydivHeight = 36;
307
317
  var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
308
318
  var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
309
- if (emptyHeight >= contentElement['offsetHeight']) {
319
+ if (emptyHeight >= contentElement['offsetHeight'] || (contentElement['offsetHeight'] - emptyHeight) < emptydivHeight) {
310
320
  this.chartBodyContent.style.height = formatUnit(emptyHeight);
311
321
  }
312
322
  else {
@@ -339,17 +349,33 @@ var GanttChart = /** @class */ (function () {
339
349
  * @returns {void} .
340
350
  */
341
351
  GanttChart.prototype.ganttChartMouseDown = function (e) {
342
- if (e.which !== 3 && this.parent.editSettings.allowTaskbarEditing) {
343
- this.parent.notify('chartMouseDown', e);
344
- this.parent.element.tabIndex = 0;
345
- }
346
- var isTaskbarEdited = false;
347
- if (this.parent.editSettings.allowTaskbarEditing && this.parent.element.querySelector('.e-left-resize-gripper')) {
348
- isTaskbarEdited = true;
349
- }
350
- if (!isTaskbarEdited || e.button == 2) {
351
- if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
352
- this.parent.treeGrid.endEdit();
352
+ var cancel = false;
353
+ if (this.parent.allowTaskbarDragAndDrop && this.parent.editModule && this.parent.editSettings.allowTaskbarEditing) {
354
+ var editAction = this.parent.editModule.taskbarEditModule['getTaskBarAction'](e);
355
+ if (editAction === 'ChildDrag' || editAction === 'ParentDrag' || editAction === 'MilestoneDrag' || editAction === 'ManualParentDrag') {
356
+ var args = {
357
+ cancel: cancel,
358
+ data: this.getRecordByTaskBar(e.target),
359
+ target: e.target,
360
+ chartRow: closest(e.target, 'tr')
361
+ };
362
+ this.parent.trigger('rowDragStartHelper', args);
363
+ cancel = args['cancel'];
364
+ }
365
+ }
366
+ if (!cancel) {
367
+ if (e.which !== 3 && this.parent.editSettings.allowTaskbarEditing) {
368
+ this.parent.notify('chartMouseDown', e);
369
+ this.parent.element.tabIndex = 0;
370
+ }
371
+ var isTaskbarEdited = false;
372
+ if (this.parent.editSettings.allowTaskbarEditing && (this.parent.element.querySelector('.e-left-resize-gripper') || this.parent.element.querySelector('.e-left-connectorpoint-outer-div'))) {
373
+ isTaskbarEdited = true;
374
+ }
375
+ if (!isTaskbarEdited || e.button == 2) {
376
+ if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
377
+ this.parent.treeGrid.endEdit();
378
+ }
353
379
  }
354
380
  }
355
381
  };
@@ -413,10 +439,11 @@ var GanttChart = /** @class */ (function () {
413
439
  this.parent.currentViewData.length > 0) {
414
440
  var rowIndex = getValue('rowIndex', closest(e.target, 'tr'));
415
441
  var dateObject = this.parent.currentViewData[rowIndex].ganttProperties.startDate;
442
+ var dateObjLeft = this.parent.currentViewData[rowIndex].ganttProperties.left;
416
443
  if (!isNullOrUndefined(dateObject)) {
417
- var left = this.parent.dataOperation.getTaskLeft(dateObject, false);
444
+ var left = !this.parent.enableTimelineVirtualization ? this.parent.dataOperation.getTaskLeft(dateObject, false) : {};
418
445
  if (this.parent.autoFocusTasks) {
419
- this.updateScrollLeft(left);
446
+ this.parent.enableTimelineVirtualization ? this.updateScrollLeft(dateObjLeft) : this.updateScrollLeft(left);
420
447
  }
421
448
  }
422
449
  }
@@ -494,7 +521,7 @@ var GanttChart = /** @class */ (function () {
494
521
  if (!isNullOrUndefined(resizeCheck)) {
495
522
  resizeCheck.remove();
496
523
  }
497
- var Check = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-clone-taskbar');
524
+ var Check = this.parent.element.getElementsByClassName('e-clone-taskbar')[0];
498
525
  if (!isNullOrUndefined(Check)) {
499
526
  var clonetbody = Check.parentElement;
500
527
  var cloneTable = clonetbody.parentElement;
@@ -584,6 +611,18 @@ var GanttChart = /** @class */ (function () {
584
611
  */
585
612
  GanttChart.prototype.ganttChartMove = function (e) {
586
613
  if (this.parent.editSettings.allowTaskbarEditing) {
614
+ if (this.parent.element.getElementsByClassName('e-clone-taskbar').length > 0) {
615
+ var xValue = void 0;
616
+ if (e.type === 'touchmove' || e.type === 'touchstart' || e.type === 'touchend') {
617
+ xValue = e['changedTouches'][0].pageX;
618
+ }
619
+ else {
620
+ xValue = e.pageX;
621
+ }
622
+ if (xValue <= this.parent.getOffsetRect(this.parent.ganttChartModule.chartElement).left) {
623
+ return;
624
+ }
625
+ }
587
626
  this.parent.notify('chartMouseMove', e);
588
627
  if (!isNullOrUndefined(this.parent.taskFields.dependency) && this.parent.connectorLineEditModule) {
589
628
  this.parent.connectorLineEditModule.updateConnectorLineEditElement(e);
@@ -674,11 +713,14 @@ var GanttChart = /** @class */ (function () {
674
713
  * @returns {void} .
675
714
  */
676
715
  GanttChart.prototype.doubleClickHandler = function (e) {
677
- this.parent.notify('chartDblClick', e);
678
716
  var target = e.target;
679
717
  var row = closest(target, 'tr');
680
718
  var rowIndex = getValue('rowIndex', row);
681
719
  var rowData = this.parent.ganttChartModule.getRecordByTarget(e);
720
+ if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
721
+ this.parent.treeGrid.endEdit();
722
+ }
723
+ this.parent.notify('chartDblClick', e);
682
724
  var args = {
683
725
  row: row,
684
726
  rowData: rowData,
@@ -1,4 +1,4 @@
1
- import { Component, createElement, Complex, addClass, removeClass, Event, EmitType, formatUnit, Browser, closest } from '@syncfusion/ej2-base';import { Internationalization, extend, getValue, isObjectArray, isObject, setValue, isUndefined } from '@syncfusion/ej2-base';import { Property, NotifyPropertyChanges, INotifyPropertyChanged, L10n, ModuleDeclaration, EventHandler } from '@syncfusion/ej2-base';import { isNullOrUndefined, KeyboardEvents, KeyboardEventArgs, Collection, append, remove } from '@syncfusion/ej2-base';import { createSpinner, showSpinner, hideSpinner, Dialog } from '@syncfusion/ej2-popups';import { RowDragEventArgs, GridColumn} from '@syncfusion/ej2-grids';import { TaskProcessor } from './task-processor';import { GanttChart } from './gantt-chart';import { Timeline } from '../renderer/timeline';import { GanttTreeGrid } from './tree-grid';import { Toolbar } from '../actions/toolbar';import { CriticalPath } from '../actions/critical-path';import { IGanttData, IWorkingTimeRange, IQueryTaskbarInfoEventArgs, BeforeTooltipRenderEventArgs, IDependencyEventArgs } from './interface';import { DataStateChangeEventArgs } from '@syncfusion/ej2-treegrid';import { ITaskbarEditedEventArgs, IParent, ITaskData, PdfColumnHeaderQueryCellInfoEventArgs } from './interface';import { ICollapsingEventArgs, CellEditArgs, PdfQueryTimelineCellInfoEventArgs } from './interface';import { IConnectorLineObject, IValidateArgs, IValidateMode, ITaskAddedEventArgs, IKeyPressedEventArgs } from './interface';import { PdfExportProperties, ISplitterResizedEventArgs } from './interface';import { ZoomEventArgs, IActionBeginEventArgs, CellSelectingEventArgs, RowDeselectEventArgs, PdfQueryCellInfoEventArgs } from './interface';import { ITimeSpanEventArgs, ZoomTimelineSettings, QueryCellInfoEventArgs, RowDataBoundEventArgs, RowSelectEventArgs } from './interface';import { TaskFieldsModel, TimelineSettingsModel, SplitterSettingsModel, SortSettings, SortSettingsModel } from '../models/models';import { EventMarkerModel, AddDialogFieldSettingsModel, EditDialogFieldSettingsModel, EditSettingsModel } from '../models/models';import { HolidayModel, DayWorkingTimeModel, FilterSettingsModel, SelectionSettingsModel,LoadingIndicatorModel, LoadingIndicator } from '../models/models';import { TaskFields, TimelineSettings, Holiday, EventMarker, DayWorkingTime, EditSettings, SelectionSettings } from '../models/models';import { FilterSettings, SplitterSettings, TooltipSettings, LabelSettings, LabelSettingsModel } from '../models/models';import { SearchSettingsModel, SearchSettings, ResourceFields, ResourceFieldsModel } from '../models/models';import { ItemModel, ClickEventArgs } from '@syncfusion/ej2-navigations';import { DateProcessor } from './date-processor';import { ChartRows } from '../renderer/chart-rows';import { Dependency } from '../actions/dependency';import * as cls from './css-constants';import { Query, DataManager } from '@syncfusion/ej2-data';import { Column, ColumnModel } from '../models/column';import { TreeGrid, FilterSettingsModel as TreeGridFilterSettingModel } from '@syncfusion/ej2-treegrid';import { Sort } from '../actions/sort';import { CellSelectEventArgs, ISelectedCell, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { CellDeselectEventArgs, IIndex, FailureEventArgs } from '@syncfusion/ej2-grids';import { HeaderCellInfoEventArgs, ColumnMenuClickEventArgs, ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuItemModel, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { RowDD } from '../actions/rowdragdrop';import { Filter } from '../actions/filter';import { PageEventArgs, FilterEventArgs, SortEventArgs, ResizeArgs, ColumnDragEventArgs, getActualProperties } from '@syncfusion/ej2-grids';import { RenderDayCellEventArgs } from '@syncfusion/ej2-calendars';import { ConnectorLine } from '../renderer/connector-line';import { ConnectorLineEdit } from '../actions/connector-line-edit';import { Edit } from '../actions/edit';import { Splitter } from './splitter';import { ResizeEventArgs, ResizingEventArgs } from '@syncfusion/ej2-layouts';import { TooltipSettingsModel } from '../models/tooltip-settings-model';import { Tooltip } from '../renderer/tooltip';import { ToolbarItem, ColumnMenuItem, RowPosition, DurationUnit, SortDirection } from './enum';import { GridLine, ContextMenuItem, ScheduleMode, ViewType } from './enum';import { Selection } from '../actions/selection';import { ExcelExport } from '../actions/excel-export';import { DayMarkers } from '../actions/day-markers';import { ContextMenu } from './../actions/context-menu';import { RowSelectingEventArgs } from './interface';import { ContextMenuOpenEventArgs as CMenuOpenEventArgs, ContextMenuClickEventArgs as CMenuClickEventArgs } from './interface';import { ColumnMenu } from '../actions/column-menu';import { ITaskbarClickEventArgs, RecordDoubleClickEventArgs, IMouseMoveEventArgs } from './interface';import { PdfExport } from '../actions/pdf-export';import { WorkUnit, TaskType } from './enum';import { FocusModule } from '../actions/keyboard';import { VirtualScroll } from '../actions/virtual-scroll';import { isCountRequired } from './utils';import { TaskbarEdit } from '../actions/taskbar-edit';
1
+ import { Component, createElement, Complex, addClass, removeClass, Event, EmitType, formatUnit, Browser, closest } from '@syncfusion/ej2-base';import { Internationalization, extend, getValue, isObjectArray, isObject, setValue, isUndefined } from '@syncfusion/ej2-base';import { Property, NotifyPropertyChanges, INotifyPropertyChanged, L10n, ModuleDeclaration, EventHandler } from '@syncfusion/ej2-base';import { isNullOrUndefined, KeyboardEvents, KeyboardEventArgs, Collection, append, remove } from '@syncfusion/ej2-base';import { createSpinner, showSpinner, hideSpinner, Dialog } from '@syncfusion/ej2-popups';import { RowDragEventArgs, GridColumn} from '@syncfusion/ej2-grids';import { TaskProcessor } from './task-processor';import { GanttChart } from './gantt-chart';import { Timeline } from '../renderer/timeline';import { GanttTreeGrid } from './tree-grid';import { Toolbar } from '../actions/toolbar';import { CriticalPath } from '../actions/critical-path';import { IGanttData, IWorkingTimeRange, IQueryTaskbarInfoEventArgs, BeforeTooltipRenderEventArgs, IDependencyEventArgs } from './interface';import { DataStateChangeEventArgs } from '@syncfusion/ej2-treegrid';import { ITaskbarEditedEventArgs, IParent, ITaskData, PdfColumnHeaderQueryCellInfoEventArgs } from './interface';import { ICollapsingEventArgs, CellEditArgs, PdfQueryTimelineCellInfoEventArgs } from './interface';import { IConnectorLineObject, IValidateArgs, IValidateMode, ITaskAddedEventArgs, IKeyPressedEventArgs, IEventMarkerInfo } from './interface';import { PdfExportProperties, ISplitterResizedEventArgs } from './interface';import { ZoomEventArgs, IActionBeginEventArgs, CellSelectingEventArgs, RowDeselectEventArgs, PdfQueryCellInfoEventArgs } from './interface';import { ITimeSpanEventArgs, ZoomTimelineSettings, QueryCellInfoEventArgs, RowDataBoundEventArgs, RowSelectEventArgs } from './interface';import { TaskFieldsModel, TimelineSettingsModel, SplitterSettingsModel, SortSettings, SortSettingsModel } from '../models/models';import { EventMarkerModel, AddDialogFieldSettingsModel, EditDialogFieldSettingsModel, EditSettingsModel } from '../models/models';import { HolidayModel, DayWorkingTimeModel, FilterSettingsModel, SelectionSettingsModel,LoadingIndicatorModel, LoadingIndicator } from '../models/models';import { TaskFields, TimelineSettings, Holiday, EventMarker, DayWorkingTime, EditSettings, SelectionSettings } from '../models/models';import { FilterSettings, SplitterSettings, TooltipSettings, LabelSettings, LabelSettingsModel } from '../models/models';import { SearchSettingsModel, SearchSettings, ResourceFields, ResourceFieldsModel } from '../models/models';import { ItemModel, ClickEventArgs } from '@syncfusion/ej2-navigations';import { DateProcessor } from './date-processor';import { ChartRows } from '../renderer/chart-rows';import { Dependency } from '../actions/dependency';import * as cls from './css-constants';import { Query, DataManager } from '@syncfusion/ej2-data';import { Column, ColumnModel } from '../models/column';import { TreeGrid, FilterSettingsModel as TreeGridFilterSettingModel } from '@syncfusion/ej2-treegrid';import { Sort } from '../actions/sort';import { CellSelectEventArgs, ISelectedCell, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { CellDeselectEventArgs, IIndex, FailureEventArgs } from '@syncfusion/ej2-grids';import { HeaderCellInfoEventArgs, ColumnMenuClickEventArgs, ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuItemModel, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { RowDD } from '../actions/rowdragdrop';import { Filter } from '../actions/filter';import { PageEventArgs, FilterEventArgs, SortEventArgs, ResizeArgs, ColumnDragEventArgs, getActualProperties } from '@syncfusion/ej2-grids';import { RenderDayCellEventArgs } from '@syncfusion/ej2-calendars';import { ConnectorLine } from '../renderer/connector-line';import { ConnectorLineEdit } from '../actions/connector-line-edit';import { Edit } from '../actions/edit';import { Splitter } from './splitter';import { ResizeEventArgs, ResizingEventArgs } from '@syncfusion/ej2-layouts';import { TooltipSettingsModel } from '../models/tooltip-settings-model';import { Tooltip } from '../renderer/tooltip';import { ToolbarItem, ColumnMenuItem, RowPosition, DurationUnit, SortDirection } from './enum';import { GridLine, ContextMenuItem, ScheduleMode, ViewType } from './enum';import { Selection } from '../actions/selection';import { ExcelExport } from '../actions/excel-export';import { DayMarkers } from '../actions/day-markers';import { ContextMenu } from './../actions/context-menu';import { RowSelectingEventArgs } from './interface';import { ContextMenuOpenEventArgs as CMenuOpenEventArgs, ContextMenuClickEventArgs as CMenuClickEventArgs } from './interface';import { ColumnMenu } from '../actions/column-menu';import { ITaskbarClickEventArgs, RecordDoubleClickEventArgs, IMouseMoveEventArgs } from './interface';import { PdfExport } from '../actions/pdf-export';import { WorkUnit, TaskType } from './enum';import { FocusModule } from '../actions/keyboard';import { VirtualScroll } from '../actions/virtual-scroll';import { isCountRequired } from './utils';import { TaskbarEdit } from '../actions/taskbar-edit';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -277,6 +277,14 @@ export interface GanttModel extends ComponentModel{
277
277
  */
278
278
  enableVirtualization?: boolean;
279
279
 
280
+ /**
281
+ * Loads project with large time span with better performance by initially rendering the timeline cells that are
282
+ * visible only within the current view and load subsequent timeline cells on horizontal scrolling.
283
+ *
284
+ * @default false
285
+ */
286
+ enableTimelineVirtualization?: boolean;
287
+
280
288
  /**
281
289
  * `toolbar` defines the toolbar items of the Gantt.
282
290
  * It contains built-in and custom toolbar items
@@ -15,7 +15,7 @@ import { IGanttData, IWorkingTimeRange, IQueryTaskbarInfoEventArgs, BeforeToolti
15
15
  import { DataStateChangeEventArgs } from '@syncfusion/ej2-treegrid';
16
16
  import { ITaskbarEditedEventArgs, IParent, ITaskData, PdfColumnHeaderQueryCellInfoEventArgs } from './interface';
17
17
  import { ICollapsingEventArgs, CellEditArgs, PdfQueryTimelineCellInfoEventArgs } from './interface';
18
- import { IConnectorLineObject, IValidateArgs, IValidateMode, ITaskAddedEventArgs, IKeyPressedEventArgs } from './interface';
18
+ import { IConnectorLineObject, IValidateArgs, IValidateMode, ITaskAddedEventArgs, IKeyPressedEventArgs, IEventMarkerInfo } from './interface';
19
19
  import { PdfExportProperties, ISplitterResizedEventArgs } from './interface';
20
20
  import { ZoomEventArgs, IActionBeginEventArgs, CellSelectingEventArgs, RowDeselectEventArgs, PdfQueryCellInfoEventArgs } from './interface';
21
21
  import { ITimeSpanEventArgs, ZoomTimelineSettings, QueryCellInfoEventArgs, RowDataBoundEventArgs, RowSelectEventArgs } from './interface';
@@ -89,6 +89,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
89
89
  private isProjectDateUpdated;
90
90
  currentSelection: any;
91
91
  columnLoop: any;
92
+ private isRowSelected;
92
93
  showIndicator: boolean;
93
94
  singleTier: number;
94
95
  isVirtualScroll: boolean;
@@ -541,6 +542,13 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
541
542
  * @default false
542
543
  */
543
544
  enableVirtualization: boolean;
545
+ /**
546
+ * Loads project with large time span with better performance by initially rendering the timeline cells that are
547
+ * visible only within the current view and load subsequent timeline cells on horizontal scrolling.
548
+ *
549
+ * @default false
550
+ */
551
+ enableTimelineVirtualization: boolean;
544
552
  /**
545
553
  * `toolbar` defines the toolbar items of the Gantt.
546
554
  * It contains built-in and custom toolbar items
@@ -1311,6 +1319,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
1311
1319
  * @returns {string} .
1312
1320
  * @private
1313
1321
  */
1322
+ eventMarkerColloction: IEventMarkerInfo[];
1314
1323
  getModuleName(): string;
1315
1324
  /**
1316
1325
  * For internal use only - Initialize the event handler
@@ -1867,6 +1876,7 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
1867
1876
  * @param {Object} data - Defines the data to modify.
1868
1877
  * @returns {void} .
1869
1878
  * @public
1879
+ * > In order to update the custom columns using `updateRecordByID`, it is necessary to define the respective fieldName in the column settings.
1870
1880
  */
1871
1881
  updateRecordByID(data: Object): void;
1872
1882
  /**
@@ -59,6 +59,7 @@ var Gantt = /** @class */ (function (_super) {
59
59
  __extends(Gantt, _super);
60
60
  function Gantt(options, element) {
61
61
  var _this = _super.call(this, options, element) || this;
62
+ _this.isRowSelected = false;
62
63
  _this.showIndicator = true;
63
64
  _this.singleTier = 0;
64
65
  _this.isLocaleChanged = false;
@@ -111,15 +112,16 @@ var Gantt = /** @class */ (function (_super) {
111
112
  * @private
112
113
  */
113
114
  _this.isEdit = false;
115
+ /**
116
+ * To get the module name
117
+ *
118
+ * @returns {string} .
119
+ * @private
120
+ */
121
+ _this.eventMarkerColloction = [];
114
122
  setValue('mergePersistData', _this.mergePersistGanttData, _this);
115
123
  return _this;
116
124
  }
117
- /**
118
- * To get the module name
119
- *
120
- * @returns {string} .
121
- * @private
122
- */
123
125
  Gantt.prototype.getModuleName = function () {
124
126
  return 'gantt';
125
127
  };
@@ -341,6 +343,7 @@ var Gantt = /** @class */ (function (_super) {
341
343
  this.treeGrid.vueInstance = this.vueInstance;
342
344
  this.treeGrid.grid.vueInstance = this.vueInstance;
343
345
  }
346
+ this.element.setAttribute('role', 'application');
344
347
  createSpinner({ target: this.element }, this.createElement);
345
348
  this.trigger('load', {});
346
349
  this.element.classList.add(cls.root);
@@ -506,7 +509,7 @@ var Gantt = /** @class */ (function (_super) {
506
509
  else {
507
510
  maskTable.style.height = element.getBoundingClientRect().height + 'px';
508
511
  var div = this.createElement('div', { className: 'e-temp-timeline' });
509
- div.style.width = 614 + 'px';
512
+ div.style.width = this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetWidth'] + 'px';
510
513
  div.style.position = 'sticky';
511
514
  if (this.enableRtl) {
512
515
  div.style['margin-right'] = Math.abs(this.scrollLeftValue) + 'px';
@@ -540,10 +543,13 @@ var Gantt = /** @class */ (function (_super) {
540
543
  };
541
544
  Gantt.prototype.applyTimelineMaskRow = function (row) {
542
545
  var maskRow = row;
543
- maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
544
- maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
545
- maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
546
- maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
546
+ var num = 4;
547
+ if (this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetWidth'] / 166 > 4) {
548
+ num = this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetWidth'] / 166;
549
+ }
550
+ for (var i = 0; i < num; i++) {
551
+ maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
552
+ }
547
553
  for (var i = 0; i < maskRow.childNodes.length - 1; i++) {
548
554
  maskRow.childNodes[parseInt(i.toString(), 10)]['style']['width'] = 166 + 'px';
549
555
  }
@@ -631,8 +637,13 @@ var Gantt = /** @class */ (function (_super) {
631
637
  Gantt.prototype.applyMaskRow = function (row) {
632
638
  var maskRow = row;
633
639
  if (this.columnLoop < 4) {
634
- maskRow.appendChild(this.createElement('td', { className: 'e-masked-cell e-rowcell' }));
635
- maskRow.appendChild(this.createElement('td', { className: 'e-masked-cell e-rowcell' }));
640
+ var num = 2;
641
+ if (this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetWidth'] / 300 > 2) {
642
+ num = this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetWidth'] / 300;
643
+ }
644
+ for (var i = 0; i < num; i++) {
645
+ maskRow.appendChild(this.createElement('td', { className: 'e-masked-cell e-rowcell' }));
646
+ }
636
647
  }
637
648
  else {
638
649
  maskRow.appendChild(this.createElement('td', { className: 'e-masked-cell e-rowcell' }));
@@ -783,9 +794,9 @@ var Gantt = /** @class */ (function (_super) {
783
794
  if (!this.isFromOnPropertyChange) {
784
795
  this.splitterModule.updateSplitterPosition();
785
796
  }
786
- // if (this.gridLines === 'Vertical' || this.gridLines === 'Both') {
787
- // this.renderChartVerticalLines();
788
- // }
797
+ if ((this.gridLines === 'Vertical' || this.gridLines === 'Both') && (!this.dayMarkersModule)) {
798
+ this.renderChartVerticalLines();
799
+ }
789
800
  };
790
801
  Gantt.prototype.removeCriticalPathStyles = function () {
791
802
  var ganttChartElement = this.ganttChartModule.chartElement;
@@ -849,7 +860,12 @@ var Gantt = /** @class */ (function (_super) {
849
860
  }
850
861
  };
851
862
  Gantt.prototype.keyActionHandler = function (e) {
852
- this.focusModule.onKeyPress(e);
863
+ if (e.target && (e.action === 'downArrow' || e.action === 'upArrow') && e.target === this.element.querySelector('.e-rowcell')) {
864
+ this.treeGrid.grid.notify('key-pressed', e);
865
+ }
866
+ else {
867
+ this.focusModule.onKeyPress(e);
868
+ }
853
869
  };
854
870
  /**
855
871
  * Method for updating row height value in connector line collections
@@ -1257,10 +1273,17 @@ var Gantt = /** @class */ (function (_super) {
1257
1273
  Gantt.prototype.treeDataBound = function (args) {
1258
1274
  this.element.getElementsByClassName('e-chart-root-container')[0]['style'].height = '100%';
1259
1275
  var gridHeight = this.element.getElementsByClassName('e-gridcontent')[0]['style'].height;
1276
+ var gridContent = this.element.getElementsByClassName('e-gridcontent')[0].childNodes[0];
1277
+ gridContent.setAttribute('tabindex', '0');
1278
+ var treeGridrole = this.element.getElementsByClassName('e-gridcontent')[0].childNodes[0].childNodes[0];
1279
+ treeGridrole.setAttribute('role', 'treegrid');
1260
1280
  var timelineContainer = this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'];
1261
1281
  gridHeight = 'calc(100% - ' + timelineContainer + 'px)';
1262
1282
  // eslint-disable-next-line
1263
- this.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
1283
+ // this.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
1284
+ var scrollContainer = this.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
1285
+ scrollContainer['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
1286
+ scrollContainer.setAttribute('tabindex', '0');
1264
1287
  if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
1265
1288
  this.splitterElement.style.height = 'calc(100% - ' + this.toolbarModule.element.offsetHeight + 'px)';
1266
1289
  }
@@ -2566,6 +2589,7 @@ var Gantt = /** @class */ (function (_super) {
2566
2589
  this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
2567
2590
  this.splitterModule.splitterPreviousPositionChart = pane2.scrollWidth + 1 + 'px';
2568
2591
  this.splitterModule.splitterObject.paneSettings[0].size = splitterPosition;
2592
+ this.splitterModule.splitterObject.paneSettings[1].size = (parseFloat('99.75%') - parseFloat(splitterPosition)) + '%';
2569
2593
  this.splitterModule.triggerCustomResizedEvent();
2570
2594
  };
2571
2595
  /**
@@ -2700,6 +2724,7 @@ var Gantt = /** @class */ (function (_super) {
2700
2724
  * @param {Object} data - Defines the data to modify.
2701
2725
  * @returns {void} .
2702
2726
  * @public
2727
+ * > In order to update the custom columns using `updateRecordByID`, it is necessary to define the respective fieldName in the column settings.
2703
2728
  */
2704
2729
  Gantt.prototype.updateRecordByID = function (data) {
2705
2730
  if (this.editModule && this.editSettings.allowEditing) {
@@ -3513,6 +3538,9 @@ var Gantt = /** @class */ (function (_super) {
3513
3538
  __decorate([
3514
3539
  Property(false)
3515
3540
  ], Gantt.prototype, "enableVirtualization", void 0);
3541
+ __decorate([
3542
+ Property(false)
3543
+ ], Gantt.prototype, "enableTimelineVirtualization", void 0);
3516
3544
  __decorate([
3517
3545
  Property()
3518
3546
  ], Gantt.prototype, "toolbar", void 0);