@syncfusion/ej2-gantt 19.4.54 → 20.1.47

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 (81) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/ej2-gantt.umd.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-gantt.es2015.js +257 -140
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +279 -148
  7. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  8. package/dist/global/ej2-gantt.min.js +2 -2
  9. package/dist/global/ej2-gantt.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +18 -18
  12. package/src/gantt/actions/cell-edit.js +2 -1
  13. package/src/gantt/actions/dialog-edit.js +2 -1
  14. package/src/gantt/actions/edit.js +36 -9
  15. package/src/gantt/actions/rowdragdrop.js +37 -15
  16. package/src/gantt/actions/selection.js +3 -0
  17. package/src/gantt/base/date-processor.js +0 -1
  18. package/src/gantt/base/gantt-chart.js +36 -5
  19. package/src/gantt/base/gantt.js +15 -56
  20. package/src/gantt/base/splitter.js +1 -0
  21. package/src/gantt/base/tree-grid.js +3 -1
  22. package/src/gantt/renderer/chart-rows.js +59 -32
  23. package/src/gantt/renderer/connector-line.js +22 -18
  24. package/src/gantt/renderer/event-marker.js +1 -0
  25. package/src/gantt/renderer/nonworking-day.js +13 -6
  26. package/src/gantt/renderer/timeline.d.ts +1 -0
  27. package/src/gantt/renderer/timeline.js +40 -1
  28. package/src/gantt/renderer/tooltip.js +10 -3
  29. package/styles/bootstrap-dark.css +37 -10
  30. package/styles/bootstrap.css +37 -10
  31. package/styles/bootstrap4.css +37 -10
  32. package/styles/bootstrap5-dark.css +53 -19
  33. package/styles/bootstrap5.css +53 -19
  34. package/styles/fabric-dark.css +34 -7
  35. package/styles/fabric.css +37 -10
  36. package/styles/fluent-dark.css +1942 -0
  37. package/styles/fluent-dark.scss +1 -0
  38. package/styles/fluent.css +1942 -0
  39. package/styles/fluent.scss +1 -0
  40. package/styles/gantt/_bootstrap-dark-definition.scss +10 -2
  41. package/styles/gantt/_bootstrap-definition.scss +11 -3
  42. package/styles/gantt/_bootstrap4-definition.scss +10 -2
  43. package/styles/gantt/_bootstrap5-definition.scss +17 -9
  44. package/styles/gantt/_fabric-dark-definition.scss +8 -0
  45. package/styles/gantt/_fabric-definition.scss +10 -2
  46. package/styles/gantt/_fluent-dark-definition.scss +1 -0
  47. package/styles/gantt/_fluent-definition.scss +21 -13
  48. package/styles/gantt/_highcontrast-definition.scss +9 -1
  49. package/styles/gantt/_highcontrast-light-definition.scss +9 -1
  50. package/styles/gantt/_layout.scss +53 -2
  51. package/styles/gantt/_material-dark-definition.scss +9 -1
  52. package/styles/gantt/_material-definition.scss +10 -2
  53. package/styles/gantt/_tailwind-definition.scss +13 -5
  54. package/styles/gantt/_theme.scss +2 -5
  55. package/styles/gantt/bootstrap-dark.css +37 -10
  56. package/styles/gantt/bootstrap.css +37 -10
  57. package/styles/gantt/bootstrap4.css +37 -10
  58. package/styles/gantt/bootstrap5-dark.css +53 -19
  59. package/styles/gantt/bootstrap5.css +53 -19
  60. package/styles/gantt/fabric-dark.css +34 -7
  61. package/styles/gantt/fabric.css +37 -10
  62. package/styles/gantt/fluent-dark.css +1942 -0
  63. package/styles/gantt/fluent-dark.scss +22 -0
  64. package/styles/gantt/fluent.css +1942 -0
  65. package/styles/gantt/fluent.scss +22 -0
  66. package/styles/gantt/highcontrast-light.css +34 -7
  67. package/styles/gantt/highcontrast.css +34 -7
  68. package/styles/gantt/icons/_fluent-dark.scss +1 -0
  69. package/styles/gantt/icons/_fluent.scss +1 -1
  70. package/styles/gantt/icons/_tailwind-dark.scss +28 -29
  71. package/styles/gantt/icons/_tailwind.scss +26 -27
  72. package/styles/gantt/material-dark.css +37 -10
  73. package/styles/gantt/material.css +37 -10
  74. package/styles/gantt/tailwind-dark.css +70 -99
  75. package/styles/gantt/tailwind.css +70 -99
  76. package/styles/highcontrast-light.css +34 -7
  77. package/styles/highcontrast.css +34 -7
  78. package/styles/material-dark.css +37 -10
  79. package/styles/material.css +37 -10
  80. package/styles/tailwind-dark.css +70 -99
  81. package/styles/tailwind.css +70 -99
@@ -484,7 +484,6 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
484
484
  tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
485
485
  }
486
486
  else {
487
- // eslint-disable-next-line
488
487
  if (!isNullOrUndefined(ganttProperties.startDate) && !isNullOrUndefined(ganttProperties.endDate) &&
489
488
  (ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && !isNullOrUndefined(ganttData.taskData[this.parent.taskFields.milestone])) {
490
489
  tDuration = 1;
@@ -4130,6 +4129,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4130
4129
  this.chartTimelineContainer = null;
4131
4130
  this.rangeViewContainer =
4132
4131
  createElement('div', { className: rangeContainer });
4132
+ this.rangeViewContainer.setAttribute("role", "RangeContainer");
4133
4133
  this.virtualRender = new VirtualContentRenderer(this.parent);
4134
4134
  this.addEventListener();
4135
4135
  }
@@ -4284,6 +4284,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4284
4284
  GanttChart.prototype.renderTimelineContainer = function () {
4285
4285
  this.chartTimelineContainer =
4286
4286
  createElement('div', { className: timelineHeaderContainer });
4287
+ this.chartTimelineContainer.setAttribute("role", "TimelineHeader");
4287
4288
  this.chartElement.appendChild(this.chartTimelineContainer);
4288
4289
  };
4289
4290
  /**
@@ -4323,8 +4324,19 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4323
4324
  //empty row height
4324
4325
  var emptydivHeight = 36;
4325
4326
  var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
4326
- this.chartBodyContent.style.height = formatUnit(emptyHeight);
4327
- //let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
4327
+ var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
4328
+ if (emptyHeight >= contentElement['offsetHeight']) {
4329
+ this.chartBodyContent.style.height = formatUnit(emptyHeight);
4330
+ }
4331
+ else {
4332
+ var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
4333
+ if (contentElement['offsetHeight'] >= scrollHeight) {
4334
+ this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
4335
+ }
4336
+ else {
4337
+ this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
4338
+ }
4339
+ } //let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
4328
4340
  this.chartBodyContent.style.width = formatUnit(this.parent.timelineModule.totalTimelineWidth);
4329
4341
  this.setVirtualHeight();
4330
4342
  this.parent.notify('updateHeight', {});
@@ -4356,7 +4368,21 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4356
4368
  if (this.chartBodyContent.clientHeight < this.chartBodyContainer.clientHeight) {
4357
4369
  if (lastRow) {
4358
4370
  addClass(lastRow.querySelectorAll('td'), 'e-lastrow');
4359
- this.chartBodyContent.style.height = formatUnit(this.parent.contentHeight + 1);
4371
+ var emptydivHeight = 36;
4372
+ var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
4373
+ var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
4374
+ if (emptyHeight >= contentElement['offsetHeight']) {
4375
+ this.chartBodyContent.style.height = formatUnit(emptyHeight);
4376
+ }
4377
+ else {
4378
+ var scrollHeight = this.parent.element.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
4379
+ if (contentElement['offsetHeight'] >= scrollHeight) {
4380
+ this.chartBodyContent.style.height = contentElement['offsetHeight'] - 17 + 'px';
4381
+ }
4382
+ else {
4383
+ this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
4384
+ }
4385
+ }
4360
4386
  }
4361
4387
  }
4362
4388
  }
@@ -4488,7 +4514,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4488
4514
  var target = e.target;
4489
4515
  var isOnTaskbarElement = e.target.classList.contains(taskBarMainContainer)
4490
4516
  || closest(e.target, '.' + taskBarMainContainer);
4491
- if (closest(target, '.e-gantt-parent-taskbar')) {
4517
+ if (closest(target, '.e-gantt-parent-taskbar') && !this.parent.editSettings.allowEditing) {
4492
4518
  this.chartExpandCollapseRequest(e);
4493
4519
  }
4494
4520
  else if (!isOnTaskbarElement && this.parent.autoFocusTasks) {
@@ -5012,6 +5038,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5012
5038
  $target.classList.contains('e-headercell') || $target.closest('.e-segmented-taskbar')) {
5013
5039
  e.preventDefault();
5014
5040
  }
5041
+ if (isTab && $target.classList.contains('e-rowdragdrop')) {
5042
+ this.parent.treeGrid.grid.notify('key-pressed', e);
5043
+ return;
5044
+ }
5015
5045
  if ($target.classList.contains('e-rowcell') && (nextElement && nextElement.classList.contains('e-rowcell')) ||
5016
5046
  $target.classList.contains('e-headercell')) { // eslint-disable-line
5017
5047
  if (isTab) {
@@ -5054,7 +5084,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5054
5084
  else {
5055
5085
  this.manageFocus($target, 'remove', true);
5056
5086
  }
5057
- if (nextElement.classList.contains('e-rowcell')) {
5087
+ if (nextElement.classList.contains('e-rowcell') && $target.nextElementSibling) {
5058
5088
  if (!$target.classList.contains('e-rowcell')) {
5059
5089
  this.parent.treeGrid.grid.notify('key-pressed', e);
5060
5090
  var fmodule = getValue('focusModule', this.parent.treeGrid.grid);
@@ -5433,6 +5463,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
5433
5463
  }
5434
5464
  }
5435
5465
  }
5466
+ currentLevel = this.parent.zoomingLevels.findIndex(function (tempLevel) {
5467
+ return tempLevel.level === currentLevel;
5468
+ });
5436
5469
  var newTimeline = this.parent.zoomingLevels[currentLevel];
5437
5470
  var args = {
5438
5471
  requestType: isZoomIn ? 'beforeZoomIn' : 'beforeZoomOut',
@@ -6150,6 +6183,40 @@ var Timeline = /** @__PURE__ @class */ (function () {
6150
6183
  } while ((startDate < endDate));
6151
6184
  return parentTh;
6152
6185
  };
6186
+ Timeline.prototype.updateTimelineAfterZooming = function (endDate, resized) {
6187
+ var timeDiff;
6188
+ var perDayWidth;
6189
+ var totWidth;
6190
+ var contentElement = document.getElementsByClassName('e-chart-scroll-container e-content')[0];
6191
+ if (!isNullOrUndefined(contentElement)) {
6192
+ var contentWidth = contentElement['offsetWidth'];
6193
+ var contentHeight = contentElement['offsetHeight'];
6194
+ var scrollHeight = document.getElementsByClassName('e-chart-rows-container')[0]['offsetHeight'];
6195
+ timeDiff = Math.abs(this.timelineStartDate.getTime() - endDate.getTime());
6196
+ timeDiff = timeDiff / (1000 * 3600 * 24);
6197
+ if (this.bottomTier === 'None') {
6198
+ perDayWidth = this.getPerDayWidth(this.customTimelineSettings.timelineUnitSize, this.customTimelineSettings.topTier.count, this.topTier);
6199
+ }
6200
+ else {
6201
+ perDayWidth = this.getPerDayWidth(this.customTimelineSettings.timelineUnitSize, this.customTimelineSettings.bottomTier.count, this.bottomTier);
6202
+ }
6203
+ if (contentHeight < scrollHeight) {
6204
+ totWidth = (perDayWidth * timeDiff) + 17;
6205
+ }
6206
+ else {
6207
+ totWidth = (perDayWidth * timeDiff);
6208
+ }
6209
+ if (contentWidth >= totWidth) {
6210
+ var widthDiff = contentWidth - totWidth;
6211
+ widthDiff = Math.round(widthDiff / perDayWidth);
6212
+ endDate.setDate(endDate.getDate() + widthDiff);
6213
+ this.parent.timelineModule.timelineEndDate = endDate;
6214
+ if (resized) {
6215
+ this.parent.updateProjectDates(this.timelineStartDate, this.timelineEndDate, this.parent.isTimelineRoundOff);
6216
+ }
6217
+ }
6218
+ }
6219
+ };
6153
6220
  Timeline.prototype.getTimelineRoundOffEndDate = function (date) {
6154
6221
  var tierMode = this.topTier === 'None' ? this.bottomTier : this.topTier;
6155
6222
  var endDate = new Date(date.toString());
@@ -6164,6 +6231,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
6164
6231
  endDate.setHours(24, 0, 0, 0);
6165
6232
  }
6166
6233
  }
6234
+ if (this.isZooming || this.parent.isLoad) {
6235
+ this.updateTimelineAfterZooming(endDate, false);
6236
+ }
6167
6237
  return endDate;
6168
6238
  };
6169
6239
  /**
@@ -6233,7 +6303,6 @@ var Timeline = /** @__PURE__ @class */ (function () {
6233
6303
  }
6234
6304
  return increment;
6235
6305
  };
6236
-
6237
6306
  /**
6238
6307
  * Method to find header cell was weekend or not
6239
6308
  *
@@ -6815,6 +6884,8 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
6815
6884
  GanttTreeGrid.prototype.renderTreeGrid = function () {
6816
6885
  this.composeProperties();
6817
6886
  this.bindEvents();
6887
+ var root = 'root';
6888
+ this.parent.treeGrid[root] = this.parent[root] ? this.parent[root] : this.parent;
6818
6889
  this.parent.treeGrid.appendTo(this.treeGridElement);
6819
6890
  this.wireEvents();
6820
6891
  };
@@ -6878,7 +6949,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
6878
6949
  var scrollWidth = this.getScrollbarWidth();
6879
6950
  var isMobile = /Android|Mac|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
6880
6951
  if (scrollWidth !== 0) {
6881
- content.style.cssText += 'width: calc(100% + ' + scrollWidth + 'px);';
6952
+ content.style.cssText += 'width: calc(100% + ' + (scrollWidth + 1) + 'px);';
6882
6953
  }
6883
6954
  else {
6884
6955
  content.classList.add('e-gantt-scroll-padding');
@@ -8222,7 +8293,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8222
8293
  _this.milestoneHeight = 0;
8223
8294
  _this.milesStoneRadius = 0;
8224
8295
  _this.baselineTop = 0;
8225
- _this.baselineHeight = 3;
8296
+ _this.baselineHeight = 8;
8226
8297
  _this.touchLeftConnectorpoint = '';
8227
8298
  _this.touchRightConnectorpoint = '';
8228
8299
  _this.dropSplit = false;
@@ -8305,7 +8376,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8305
8376
  * @private
8306
8377
  */
8307
8378
  ChartRows.prototype.getIndicatorNode = function (indicator) {
8308
- var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '" style="line-height:'
8379
+ var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '" role="LabelIndicator" style="line-height:'
8309
8380
  + (this.parent.rowHeight) + 'px;' +
8310
8381
  'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
8311
8382
  return this.createDivElement(templateString);
@@ -8334,7 +8405,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8334
8405
  var childTaskbarNode = null;
8335
8406
  var data = this.templateData;
8336
8407
  if (this.childTaskbarTemplateFunction) {
8337
- childTaskbarNode = this.childTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'TaskbarTemplate', this.getTemplateID('TaskbarTemplate'), false, undefined, rootElement[0]);
8408
+ childTaskbarNode = this.childTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'TaskbarTemplate', this.getTemplateID('TaskbarTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
8338
8409
  }
8339
8410
  else {
8340
8411
  var labelString = '';
@@ -8378,9 +8449,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8378
8449
  }
8379
8450
  else {
8380
8451
  taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
8381
- (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : ';') +
8382
- 'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') +
8383
- 'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
8452
+ (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'text-align: left;' : '') +
8453
+ +(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
8454
+ +(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
8384
8455
  this.taskBarHeight + 'px;">' + labelString + '</span>';
8385
8456
  }
8386
8457
  }
@@ -8773,7 +8844,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8773
8844
  var milestoneNode = null;
8774
8845
  var data = this.templateData;
8775
8846
  if (this.milestoneTemplateFunction) {
8776
- milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0]);
8847
+ milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
8777
8848
  }
8778
8849
  else {
8779
8850
  var template = '<div class="' + traceMilestone + '" style="position:absolute;">' +
@@ -8797,7 +8868,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8797
8868
  */
8798
8869
  ChartRows.prototype.getTaskBaselineNode = function () {
8799
8870
  var data = this.templateData;
8800
- var template = '<div class="' + baselineBar + ' ' + '" style="margin-top:' + this.baselineTop +
8871
+ var template = '<div class="' + baselineBar + ' ' + '" role="BaselineBar" style="margin-top:' + this.baselineTop +
8801
8872
  'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
8802
8873
  'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
8803
8874
  this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
@@ -8811,9 +8882,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8811
8882
  */
8812
8883
  ChartRows.prototype.getMilestoneBaselineNode = function () {
8813
8884
  var data = this.templateData;
8885
+ var baselineMilestoneHeight = this.parent.renderBaseline ? 5 : 2;
8814
8886
  var template = '<div class="' + baselineMilestoneContainer + ' ' + '" style="' +
8815
8887
  'left:' + (data.ganttProperties.baselineLeft - this.milesStoneRadius) + 'px;' +
8816
- 'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + 2) +
8888
+ 'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) +
8817
8889
  'px">' + '<div class="' + baselineMilestoneDiv + '">' + '<div class="' + baselineMilestoneDiv +
8818
8890
  ' ' + baselineMilestoneTop + '" ' +
8819
8891
  'style="top:' + (-this.milestoneHeight) + 'px;border-right:' + this.milesStoneRadius +
@@ -8841,10 +8913,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8841
8913
  */
8842
8914
  ChartRows.prototype.getLeftLabelNode = function (i) {
8843
8915
  var leftLabelNode = this.leftLabelContainer();
8844
- leftLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('left'));
8916
+ if (this.generateTaskLabelAriaLabel('left') !== "") {
8917
+ leftLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('left'));
8918
+ }
8845
8919
  var leftLabelTemplateNode = null;
8846
8920
  if (this.leftTaskLabelTemplateFunction) {
8847
- leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0]);
8921
+ leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0], this.parent.treeGrid['root']);
8848
8922
  }
8849
8923
  else {
8850
8924
  var field = this.parent.labelSettings.leftLabel;
@@ -8855,14 +8929,18 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8855
8929
  }
8856
8930
  }
8857
8931
  if (leftLabelTemplateNode && leftLabelTemplateNode.length > 0) {
8932
+ if (leftLabelTemplateNode[0]['data'] === 'null') {
8933
+ leftLabelTemplateNode[0]['data'] = '';
8934
+ }
8858
8935
  leftLabelNode[0].appendChild([].slice.call(leftLabelTemplateNode)[0]);
8859
8936
  }
8860
8937
  return leftLabelNode;
8861
8938
  };
8862
8939
  ChartRows.prototype.getLableText = function (labelString, labelDiv) {
8940
+ var leftLabelHeight = this.parent.renderBaseline ? ((this.parent.rowHeight - this.taskBarHeight) / 2) : this.taskBarMarginTop;
8863
8941
  var templateString = createElement('div', {
8864
8942
  className: labelDiv, styles: 'height:' + (this.taskBarHeight) + 'px;' +
8865
- 'margin-top:' + this.taskBarMarginTop + 'px;'
8943
+ 'margin-top:' + leftLabelHeight + 'px;'
8866
8944
  });
8867
8945
  var spanElem = createElement('span', { className: label });
8868
8946
  var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
@@ -8881,10 +8959,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8881
8959
  */
8882
8960
  ChartRows.prototype.getRightLabelNode = function (i) {
8883
8961
  var rightLabelNode = this.rightLabelContainer();
8884
- rightLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('right'));
8962
+ if (this.generateTaskLabelAriaLabel('right') !== "") {
8963
+ rightLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('right'));
8964
+ }
8885
8965
  var rightLabelTemplateNode = null;
8886
8966
  if (this.rightTaskLabelTemplateFunction) {
8887
- rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0]);
8967
+ rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0], this.parent.treeGrid['root']);
8888
8968
  }
8889
8969
  else {
8890
8970
  var field = this.parent.labelSettings.rightLabel;
@@ -8895,6 +8975,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8895
8975
  }
8896
8976
  }
8897
8977
  if (rightLabelTemplateNode && rightLabelTemplateNode.length > 0) {
8978
+ if (rightLabelTemplateNode[0]['data'] === 'null') {
8979
+ rightLabelTemplateNode[0]['data'] = '';
8980
+ }
8898
8981
  rightLabelNode[0].appendChild([].slice.call(rightLabelTemplateNode)[0]);
8899
8982
  }
8900
8983
  return rightLabelNode;
@@ -8949,7 +9032,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8949
9032
  var parentTaskbarNode = null;
8950
9033
  var data = this.templateData;
8951
9034
  if (this.parentTaskbarTemplateFunction) {
8952
- parentTaskbarNode = this.parentTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'ParentTaskbarTemplate', this.getTemplateID('ParentTaskbarTemplate'), false, undefined, rootElement[0]);
9035
+ parentTaskbarNode = this.parentTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'ParentTaskbarTemplate', this.getTemplateID('ParentTaskbarTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
8953
9036
  }
8954
9037
  else {
8955
9038
  var labelString = '';
@@ -8991,8 +9074,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8991
9074
  else {
8992
9075
  labelDiv = this.createDivElement('<span class="' +
8993
9076
  taskLabel + '" style="line-height:' +
8994
- (this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') + 'width:' +
8995
- (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : ';') + 'px; height:' +
9077
+ (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9078
+ (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9079
+ (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
9080
+ (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
8996
9081
  this.taskBarHeight + 'px;">' + labelString + '</span>');
8997
9082
  }
8998
9083
  progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
@@ -9021,10 +9106,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9021
9106
  var className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
9022
9107
  'e-chart-row-border' : '';
9023
9108
  table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + '"' +
9024
- 'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
9109
+ 'role="ChartRow" style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
9025
9110
  this.parent.rowHeight + 'px;">' +
9026
9111
  '<td class="' + chartRowCell + ' ' + className
9027
- + '" style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
9112
+ + '" role="ChartCell" style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
9028
9113
  return table.childNodes;
9029
9114
  };
9030
9115
  /**
@@ -9063,10 +9148,19 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9063
9148
  };
9064
9149
  ChartRows.prototype.isTemplate = function (template) {
9065
9150
  var result = false;
9151
+ for (var i = 0; i < this.parent.ganttColumns.length; i++) {
9152
+ if (template === this.parent.ganttColumns[i].field) {
9153
+ result = true;
9154
+ break;
9155
+ }
9156
+ }
9066
9157
  if (typeof template !== 'string' || template.indexOf('#') === 0 || template.indexOf('<') > -1
9067
- || template.indexOf('$') > -1) {
9158
+ || template.indexOf('$') > -1 || !result) {
9068
9159
  result = true;
9069
9160
  }
9161
+ else {
9162
+ result = false;
9163
+ }
9070
9164
  return result;
9071
9165
  };
9072
9166
  /**
@@ -9080,8 +9174,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9080
9174
  };
9081
9175
  ChartRows.prototype.leftLabelContainer = function () {
9082
9176
  var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
9083
- leftLabelContainer) + ' ' + '" tabindex="-1" style="height:' +
9084
- (this.parent.rowHeight - 1) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
9177
+ leftLabelContainer) + ' ' + '" tabindex="-1" role="LeftLabel" style="height:' +
9178
+ (this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
9085
9179
  return this.createDivElement(template);
9086
9180
  };
9087
9181
  ChartRows.prototype.taskbarContainer = function () {
@@ -9092,7 +9186,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9092
9186
  var template = '<div class="' + taskBarMainContainer + ' ' +
9093
9187
  this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
9094
9188
  ((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
9095
- ' tabindex="-1" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
9189
+ ' tabindex="-1" role="TaskBar" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
9096
9190
  ('width:' + this.milestoneHeight + 'px;height:' +
9097
9191
  this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
9098
9192
  (this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
@@ -9103,26 +9197,26 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9103
9197
  };
9104
9198
  ChartRows.prototype.rightLabelContainer = function () {
9105
9199
  var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
9106
- rightLabelContainer) + '" ' + ' tabindex="-1" style="left:' + this.getRightLabelLeft(this.templateData) + 'px;height:'
9107
- + (this.parent.rowHeight - 1) + 'px;"></div>';
9200
+ rightLabelContainer) + '" ' + ' tabindex="-1" role="RightLabel" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
9201
+ + (this.parent.rowHeight - 2) + 'px;"></div>';
9108
9202
  return this.createDivElement(template);
9109
9203
  };
9110
9204
  ChartRows.prototype.childTaskbarLeftResizer = function () {
9111
9205
  var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
9112
9206
  var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
9113
- ' style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
9207
+ ' role="LeftResizer" style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
9114
9208
  return this.createDivElement(template);
9115
9209
  };
9116
9210
  ChartRows.prototype.childTaskbarRightResizer = function () {
9117
9211
  var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
9118
9212
  var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
9119
- ' style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
9213
+ ' role="RightResizer" style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
9120
9214
  'height:' + (this.taskBarHeight) + 'px;"></div>';
9121
9215
  return this.createDivElement(template);
9122
9216
  };
9123
9217
  ChartRows.prototype.childTaskbarProgressResizer = function () {
9124
9218
  var template = '<div class="' + childProgressResizer + '"' +
9125
- ' style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
9219
+ ' role="ProgressResizer" style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
9126
9220
  (this.taskBarHeight - 4) + 'px;"><div class="' + progressBarHandler + '"' +
9127
9221
  '><div class="' + progressHandlerElement + '"></div>' +
9128
9222
  '<div class="' + progressBarHandlerAfter + '"></div></div>';
@@ -9320,10 +9414,13 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9320
9414
  * @private
9321
9415
  */
9322
9416
  ChartRows.prototype.initChartHelperPrivateVariable = function () {
9417
+ var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : 0.62;
9418
+ var taskBarMarginTopValue = this.parent.renderBaseline ? 4 : 2;
9419
+ var milestoneHeightValue = this.parent.renderBaseline ? 1.13 : 0.82;
9323
9420
  this.baselineColor = !isNullOrUndefined(this.parent.baselineColor) &&
9324
9421
  this.parent.baselineColor !== '' ? this.parent.baselineColor : null;
9325
9422
  this.taskBarHeight = isNullOrUndefined(this.parent.taskbarHeight) || this.parent.taskbarHeight >= this.parent.rowHeight ?
9326
- Math.floor(this.parent.rowHeight * 0.62) : this.parent.taskbarHeight; // 0.62 -- Standard Ratio.
9423
+ Math.floor(this.parent.rowHeight * taskbarHeightValue) : this.parent.taskbarHeight; // 0.62 -- Standard Ratio.
9327
9424
  if (this.parent.renderBaseline) {
9328
9425
  var height = void 0;
9329
9426
  if ((this.taskBarHeight + this.baselineHeight) <= this.parent.rowHeight) {
@@ -9334,11 +9431,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9334
9431
  }
9335
9432
  this.taskBarHeight = height;
9336
9433
  }
9337
- this.milestoneHeight = Math.floor(this.taskBarHeight * 0.82); // 0.82 -- Standard Ratio.
9338
- this.taskBarMarginTop = Math.floor((this.parent.rowHeight - this.taskBarHeight) / 2);
9434
+ this.milestoneHeight = Math.floor(this.taskBarHeight * milestoneHeightValue); // 0.82 -- Standard Ratio.
9435
+ this.taskBarMarginTop = Math.floor((this.parent.rowHeight - this.taskBarHeight) / taskBarMarginTopValue);
9339
9436
  this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
9340
9437
  this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
9341
- this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 1);
9438
+ this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 4);
9342
9439
  this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 8;
9343
9440
  this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
9344
9441
  };
@@ -9532,6 +9629,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9532
9629
  var indicators = this.templateData.ganttProperties.indicators;
9533
9630
  for (var indicatorIndex = 0; indicatorIndex < indicators.length; indicatorIndex++) {
9534
9631
  taskIndicatorNode = this.getIndicatorNode(indicators[indicatorIndex]);
9632
+ taskIndicatorNode[0].setAttribute('aria-label', indicators[indicatorIndex].name);
9535
9633
  if (indicators[indicatorIndex].name.indexOf('$') > -1 || indicators[indicatorIndex].name.indexOf('#') > -1) {
9536
9634
  taskIndicatorTextFunction = this.templateCompiler(indicators[indicatorIndex].name);
9537
9635
  taskIndicatorTextNode = taskIndicatorTextFunction(extend({ index: i }, this.templateData), this.parent, 'indicatorLabelText');
@@ -10756,7 +10854,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
10756
10854
  for (var i = 0; i < childNodes.length; i++) {
10757
10855
  var innerChild = childNodes[i].childNodes;
10758
10856
  for (var j = 0; j < innerChild.length; j++) {
10759
- var ariaString = this.parent.connectorLineModule.generateAriaLabel(ariaConnector[i]);
10857
+ var ariaString = 'Connector Line ' + this.parent.connectorLineModule.generateAriaLabel(ariaConnector[i]);
10760
10858
  innerChild[j].setAttribute('aria-label', ariaString);
10761
10859
  }
10762
10860
  }
@@ -11013,7 +11111,11 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11013
11111
  var connectorContainer = '';
11014
11112
  var isVirtual = this.parent.virtualScrollModule && this.parent.enableVirtualization;
11015
11113
  var connectorLine$$1 = this.getPosition(data, this.getParentPosition(data), height);
11016
- var heightValue = isVirtual ? connectorLine$$1.height : height;
11114
+ var isMilestoneValue = 0;
11115
+ if (this.parent.renderBaseline) {
11116
+ isMilestoneValue = (data.milestoneParent && data.milestoneChild) ? 0 : data.milestoneParent ? -5 : data.milestoneChild ? 5 : 0;
11117
+ }
11118
+ var heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
11017
11119
  if (this.getParentPosition(data)) {
11018
11120
  connectorContainer = '<div id="ConnectorLine' + data.connectorLineId + '" style="background-color:black">';
11019
11121
  var div = '<div class="' + connectorLineContainer +
@@ -11041,7 +11143,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11041
11143
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
11042
11144
  if (this.getParentPosition(data) === 'FSType1') {
11043
11145
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11044
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11146
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11045
11147
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
11046
11148
  div = div + eLine;
11047
11149
  div = div + 'left:' + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
@@ -11062,7 +11164,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11062
11164
  }
11063
11165
  if (this.getParentPosition(data) === 'FSType2') {
11064
11166
  div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) +
11065
- this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11167
+ this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11066
11168
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
11067
11169
  div = div + eLine;
11068
11170
  div = div + 'left:' + (isMilestoneParent ? data.parentWidth - 1 : data.parentWidth) + 'px;width:' +
@@ -11093,7 +11195,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11093
11195
  }
11094
11196
  if (this.getParentPosition(data) === 'FSType3') {
11095
11197
  div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11096
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11198
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11097
11199
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
11098
11200
  div = div + rightArrow;
11099
11201
  div = div + 'left:10px;' + this.getBorderStyles('left', 10) +
@@ -11123,7 +11225,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11123
11225
  }
11124
11226
  if (this.getParentPosition(data) === 'FSType4') {
11125
11227
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11126
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11228
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11127
11229
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
11128
11230
  div = div + rightArrow;
11129
11231
  div = div + 'left:' + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
@@ -11149,7 +11251,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11149
11251
  }
11150
11252
  if (this.getParentPosition(data) === 'SSType4') {
11151
11253
  div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11152
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11254
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11153
11255
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
11154
11256
  div = div + rightArrow;
11155
11257
  div = div + 'left:' + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
@@ -11162,7 +11264,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11162
11264
  }
11163
11265
  if (this.getParentPosition(data) === 'SSType3') {
11164
11266
  div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11165
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11267
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11166
11268
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
11167
11269
  div = div + rightArrow;
11168
11270
  div = div + 'left:10px;' + duplicateStingTwo;
@@ -11175,7 +11277,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11175
11277
  }
11176
11278
  if (this.getParentPosition(data) === 'SSType2') {
11177
11279
  div = div + 'left:' + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11178
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11280
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11179
11281
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
11180
11282
  div = div + eLine;
11181
11283
  div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
@@ -11196,7 +11298,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11196
11298
  if (this.getParentPosition(data) === 'SSType1') {
11197
11299
  div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11198
11300
  ((data.parentIndex * data.rowHeight) +
11199
- this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11301
+ this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11200
11302
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
11201
11303
  div = div + eLine;
11202
11304
  div = div + 'width:' + (data.parentLeft - data.childLeft + 21) + 'px;' +
@@ -11213,7 +11315,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11213
11315
  }
11214
11316
  if (this.getParentPosition(data) === 'FFType1') {
11215
11317
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11216
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11318
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11217
11319
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
11218
11320
  div = div + eLine;
11219
11321
  div = div + 'left:' + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
@@ -11237,7 +11339,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11237
11339
  }
11238
11340
  if (this.getParentPosition(data) === 'FFType2') {
11239
11341
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11240
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11342
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11241
11343
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
11242
11344
  div = div + eLine;
11243
11345
  div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'width:' +
@@ -11263,7 +11365,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11263
11365
  }
11264
11366
  if (this.getParentPosition(data) === 'FFType3') {
11265
11367
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11266
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11368
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11267
11369
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
11268
11370
  div = div + duplicateStingOne;
11269
11371
  div = div + eLine;
@@ -11286,7 +11388,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11286
11388
  }
11287
11389
  if (this.getParentPosition(data) === 'FFType4') {
11288
11390
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11289
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11391
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11290
11392
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
11291
11393
  div = div + leftArrow;
11292
11394
  div = div + ('left:' + ((data.childLeft + data.childWidth) -
@@ -11315,7 +11417,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11315
11417
  }
11316
11418
  if (this.getParentPosition(data) === 'SFType4') {
11317
11419
  div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11318
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;width:1px;' +
11420
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
11319
11421
  'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
11320
11422
  div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
11321
11423
  'border-bottom-width:' + (5 + this.lineStroke) +
@@ -11343,7 +11445,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11343
11445
  }
11344
11446
  if (this.getParentPosition(data) === 'SFType3') {
11345
11447
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11346
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11448
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11347
11449
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
11348
11450
  div = div + duplicateStingOne;
11349
11451
  div = div + eLine;
@@ -11361,7 +11463,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11361
11463
  }
11362
11464
  if (this.getParentPosition(data) === 'SFType1') {
11363
11465
  div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11364
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11466
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11365
11467
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
11366
11468
  div = div + eLine;
11367
11469
  div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
@@ -11386,7 +11488,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11386
11488
  }
11387
11489
  if (this.getParentPosition(data) === 'SFType2') {
11388
11490
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11389
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11491
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11390
11492
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
11391
11493
  div = div + eLine;
11392
11494
  div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
@@ -11630,6 +11732,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
11630
11732
  _this.splitterObject.paneSettings[1].size = null;
11631
11733
  _this.splitterObject.paneSettings[1].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionChart);
11632
11734
  }
11735
+ _this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
11633
11736
  callBackPromise.resolve(splitterResizedArgs);
11634
11737
  });
11635
11738
  return callBackPromise;
@@ -11912,6 +12015,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
11912
12015
  * @returns {void} .
11913
12016
  */
11914
12017
  Tooltip$$1.prototype.updateTooltipPosition = function (args) {
12018
+ args.element.style.visibility = 'visible';
11915
12019
  if (isNullOrUndefined(this.tooltipMouseEvent) || args.target.classList.contains('e-notes-info')) {
11916
12020
  return;
11917
12021
  }
@@ -11941,7 +12045,6 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
11941
12045
  tooltipPositionY = tooltipPositionY + 10;
11942
12046
  }
11943
12047
  args.element.style.top = tooltipPositionY + 'px';
11944
- args.element.style.visibility = 'visible';
11945
12048
  };
11946
12049
  /**
11947
12050
  * Method to get mouse pointor position
@@ -11983,9 +12086,16 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
11983
12086
  switch (elementType) {
11984
12087
  case 'milestone':
11985
12088
  {
11986
- var sDate = !isNullOrUndefined(data.startDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
12089
+ var milestoneStartDate = void 0;
12090
+ if (args.target.className.includes('e-baseline-gantt-milestone') && !isNullOrUndefined(data.baselineStartDate)) {
12091
+ milestoneStartDate = data.baselineStartDate;
12092
+ }
12093
+ else if (!isNullOrUndefined(data.startDate)) {
12094
+ milestoneStartDate = data.startDate;
12095
+ }
12096
+ var sDate = !isNullOrUndefined(milestoneStartDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
11987
12097
  '<td class = "e-gantt-tooltip-value">' +
11988
- this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat()) + '</td></tr>' : '';
12098
+ this.parent.getFormatedDate(milestoneStartDate, this.parent.getDateFormat()) + '</td></tr>' : '';
11989
12099
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
11990
12100
  taskName + sDate + '</tbody></table>';
11991
12101
  break;
@@ -12727,25 +12837,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12727
12837
  * @returns {void} .
12728
12838
  */
12729
12839
  Gantt.prototype.calculateDimensions = function () {
12730
- var settingsHeight;
12731
- if (typeof (this.height) !== 'number' && this.height.indexOf('%') !== -1 && (this.element.parentElement &&
12732
- !this.element.parentElement.style.height || this.element.parentElement.style.height.indexOf('%') !== -1)) {
12733
- var ganttHeight = void 0;
12734
- if (this.element.parentElement.style.height.indexOf('%') == -1) {
12735
- ganttHeight = Number(this.height.split("%")[0]);
12736
- }
12737
- else {
12738
- ganttHeight = Number(this.element.parentElement.style.height.split("%")[0]);
12739
- }
12740
- ganttHeight = (ganttHeight * window.innerHeight) / 100;
12741
- if (this.height === '100%') {
12742
- ganttHeight = ganttHeight - 16;
12743
- }
12744
- settingsHeight = this.validateDimentionValue(ganttHeight);
12745
- }
12746
- else {
12747
- settingsHeight = this.validateDimentionValue(this.height);
12748
- }
12840
+ var settingsHeight = this.validateDimentionValue(this.height);
12749
12841
  var settingsWidth = this.validateDimentionValue(this.width);
12750
12842
  if (!isNullOrUndefined(this.width) && typeof (this.width) === 'string' && this.width.indexOf('%') !== -1) {
12751
12843
  settingsWidth = this.width;
@@ -12888,40 +12980,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12888
12980
  */
12889
12981
  Gantt.prototype.windowResize = function () {
12890
12982
  if (!isNullOrUndefined(this.element)) {
12891
- var settingsHeight = void 0;
12892
- if (this.height.indexOf('%') !== -1) {
12893
- var ganttHeight = Number(this.height.split("%")[0]);
12894
- if (this.element.parentElement && (this.element.parentElement.style.height)) {
12895
- var containerHeight = void 0;
12896
- if (this.element.parentElement.style.height.indexOf('%') == -1) {
12897
- containerHeight = Number(this.element.parentElement.style.height.split("px")[0]);
12898
- ganttHeight = (ganttHeight * containerHeight) / 100;
12899
- }
12900
- else {
12901
- containerHeight = Number(this.element.parentElement.style.height.split("%")[0]);
12902
- ganttHeight = (window.innerHeight * containerHeight) / 100;
12903
- }
12904
- }
12905
- else {
12906
- ganttHeight = Number(this.height.split("%")[0]);
12907
- ganttHeight = (ganttHeight * window.innerHeight) / 100;
12908
- }
12909
- if (this.height === '100%') {
12910
- ganttHeight = ganttHeight - 16;
12911
- }
12912
- var toolbarHeight = 0;
12913
- if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
12914
- toolbarHeight = this.toolbarModule.element.offsetHeight;
12915
- }
12916
- var contentHeight = ganttHeight - this.ganttChartModule.chartTimelineContainer.offsetHeight - toolbarHeight;
12917
- settingsHeight = this.validateDimentionValue(ganttHeight);
12918
- this.element.style.height = settingsHeight;
12919
- this.element.querySelectorAll('.e-content')[0]['style'].height = contentHeight + 'px';
12920
- this.element.querySelectorAll('.e-content')[2]['style'].height = contentHeight + 'px';
12921
- }
12922
- else {
12923
- settingsHeight = this.validateDimentionValue(this.height);
12924
- }
12925
12983
  this.updateContentHeight();
12926
12984
  this.ganttChartModule.updateWidthAndHeight(); // Updating chart scroll conatiner height for row mismatch
12927
12985
  this.treeGridModule.ensureScrollBar();
@@ -13267,6 +13325,18 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13267
13325
  * @private
13268
13326
  */
13269
13327
  Gantt.prototype.treeDataBound = function (args) {
13328
+ this.element.getElementsByClassName('e-chart-root-container')[0]['style'].height = '100%';
13329
+ var gridHeight = this.element.getElementsByClassName('e-gridcontent')[0]['style'].height;
13330
+ var timelineContainer = this.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'];
13331
+ gridHeight = 'calc(100% - ' + timelineContainer + 'px)';
13332
+ // eslint-disable-next-line
13333
+ this.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
13334
+ if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
13335
+ this.splitterElement.style.height = 'calc(100% - ' + this.toolbarModule.element.offsetHeight + 'px)';
13336
+ }
13337
+ else {
13338
+ this.splitterElement.style.height = '100%';
13339
+ }
13270
13340
  if (this.isLoad) {
13271
13341
  this.updateCurrentViewData();
13272
13342
  if (!this.enableVirtualization) {
@@ -13286,8 +13356,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13286
13356
  removeClass(this.treeGrid.element.querySelectorAll('.e-headercell'), timelineSingleHeaderOuterDiv);
13287
13357
  removeClass(this.treeGrid.element.querySelectorAll('.e-columnheader'), timelineSingleHeaderOuterDiv);
13288
13358
  }
13289
- this.treeGrid.height = this.ganttHeight - toolbarHeight -
13290
- this.treeGrid.grid.getHeaderContent().offsetHeight;
13359
+ this.treeGrid.height = '100%';
13291
13360
  this.notify('tree-grid-created', {});
13292
13361
  this.createGanttPopUpElement();
13293
13362
  this.hideSpinner();
@@ -13798,7 +13867,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13798
13867
  */
13799
13868
  Gantt.prototype.updateGridLineContainerHeight = function () {
13800
13869
  if (this.chartVerticalLineContainer) {
13801
- this.chartVerticalLineContainer.style.height = formatUnit(this.getContentHeight());
13870
+ this.chartVerticalLineContainer.style.height = formatUnit(this.contentHeight);
13802
13871
  }
13803
13872
  };
13804
13873
  /**
@@ -15709,7 +15778,8 @@ var CellEdit = /** @__PURE__ @class */ (function () {
15709
15778
  args.cancel = true;
15710
15779
  return;
15711
15780
  }
15712
- if (data.hasChildRecords && (field === taskSettings.endDate || field === taskSettings.duration
15781
+ if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
15782
+ data['isManual'] == false) || this.parent.taskMode == 'Auto')) || field === taskSettings.duration
15713
15783
  || field === taskSettings.dependency || field === taskSettings.progress
15714
15784
  || field === taskSettings.work || field === 'taskType')) {
15715
15785
  args.cancel = true;
@@ -19851,7 +19921,8 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19851
19921
  disabled = true;
19852
19922
  }
19853
19923
  if (this.editedRecord.hasChildRecords) {
19854
- if (column.field === this.parent.taskFields.endDate || column.field === this.parent.taskFields.duration ||
19924
+ if ((column.field === this.parent.taskFields.endDate && ((!isNullOrUndefined(this.editedRecord['isManual']) &&
19925
+ this.editedRecord['isManual'] == false) || this.parent.taskMode == 'Auto')) || column.field === this.parent.taskFields.duration ||
19855
19926
  column.field === this.parent.taskFields.progress || column.field === this.parent.taskFields.work ||
19856
19927
  column.field === 'taskType') {
19857
19928
  disabled = true;
@@ -23686,7 +23757,15 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23686
23757
  }
23687
23758
  /* data Source update */
23688
23759
  if (!isNullOrUndefined(parentItem)) {
23689
- childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem);
23760
+ if (rowPosition == 'Above') {
23761
+ childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem);
23762
+ }
23763
+ else if (rowPosition == 'Below') {
23764
+ childIndex = parentItem.childRecords.indexOf(this.addRowSelectedItem) + 1;
23765
+ }
23766
+ else {
23767
+ childIndex = parentItem.childRecords.length;
23768
+ }
23690
23769
  /*Child collection update*/
23691
23770
  parentItem.childRecords.splice(childIndex, 0, record);
23692
23771
  if ((this.parent.dataSource instanceof DataManager &&
@@ -23694,12 +23773,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23694
23773
  !isNullOrUndefined(this.parent.dataSource)) {
23695
23774
  var child = this.parent.taskFields.child;
23696
23775
  if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
23697
- if (rowPosition === 'Above') {
23776
+ if (rowPosition === 'Above' || rowPosition === 'Below') {
23698
23777
  parentItem.taskData[child].splice(childIndex, 0, record.taskData);
23699
23778
  }
23700
- else if (rowPosition === 'Below') {
23701
- parentItem.taskData[child].splice(childIndex + 1, 0, record.taskData);
23702
- }
23703
23779
  else {
23704
23780
  parentItem.taskData[child].push(record.taskData);
23705
23781
  }
@@ -23765,11 +23841,27 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23765
23841
  }
23766
23842
  };
23767
23843
  Edit$$1.prototype.refreshRecordInImmutableMode = function () {
23844
+ var _loop_1 = function (i) {
23845
+ var originalData = this_1.parent.modifiedRecords[i];
23846
+ var treeIndex = this_1.parent.allowRowDragAndDrop ? 1 : 0;
23847
+ var uniqueTaskID = this_1.parent.taskFields.id;
23848
+ originalIndex = this_1.parent.currentViewData.findIndex(function (data) {
23849
+ return (data[uniqueTaskID] == originalData[uniqueTaskID]);
23850
+ });
23851
+ if (this_1.parent.treeGrid.getRows()[originalIndex]) {
23852
+ this_1.parent.treeGrid.renderModule.cellRender({
23853
+ data: originalData, cell: this_1.parent.treeGrid.getRows()[originalIndex].cells[this_1.parent.treeColumnIndex + treeIndex],
23854
+ column: this_1.parent.treeGrid.grid.getColumns()[this_1.parent.treeColumnIndex],
23855
+ requestType: 'rowDragAndDrop'
23856
+ });
23857
+ this_1.parent.treeGrid.renderModule.RowModifier({
23858
+ data: originalData, row: this_1.parent.treeGrid.getRows()[originalIndex], rowHeight: this_1.parent.rowHeight
23859
+ });
23860
+ }
23861
+ };
23862
+ var this_1 = this, originalIndex;
23768
23863
  for (var i = 0; i < this.parent.modifiedRecords.length; i++) {
23769
- var originalData = this.parent.modifiedRecords[i];
23770
- var dataId = this.parent.viewType === 'ProjectView' ?
23771
- originalData.ganttProperties.taskId : originalData.ganttProperties.rowUniqueID;
23772
- this.parent.treeGrid.grid.setRowData(dataId, originalData);
23864
+ _loop_1(i);
23773
23865
  }
23774
23866
  };
23775
23867
  /**
@@ -24147,6 +24239,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24147
24239
  }
24148
24240
  this.addSuccess(args);
24149
24241
  args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
24242
+ if (this.dialogModule.isAddNewResource && !this.parent.isEdit && this.parent.taskFields.work) {
24243
+ this.parent.dataOperation.updateWorkWithDuration(cAddedRecord[0]);
24244
+ }
24150
24245
  this.parent.trigger('actionComplete', args);
24151
24246
  if (this.dialogModule.dialog && !this.dialogModule.dialogObj.isDestroyed) {
24152
24247
  this.dialogModule.dialogObj.hide();
@@ -24523,15 +24618,18 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24523
24618
  if (this.dropPosition === 'topSegment' || this.dropPosition === 'bottomSegment') {
24524
24619
  draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
24525
24620
  draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.parentID];
24621
+ draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.parentID];
24526
24622
  }
24527
24623
  else {
24528
24624
  draggedRec[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
24529
24625
  draggedRec.taskData[this.parent.taskFields.parentID] = droppedRec[this.parent.taskFields.id];
24626
+ draggedRec.ganttProperties['parentId'] = droppedRec[this.parent.taskFields.id];
24530
24627
  }
24531
24628
  }
24532
24629
  else {
24533
24630
  draggedRec[this.parent.taskFields.parentID] = null;
24534
24631
  draggedRec.taskData[this.parent.taskFields.parentID] = null;
24632
+ draggedRec.ganttProperties['parentId'] = null;
24535
24633
  }
24536
24634
  }
24537
24635
  };
@@ -25394,6 +25492,9 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
25394
25492
  this.addRemoveClass(index);
25395
25493
  this.selectedRowIndexes = extend([], this.getSelectedRowIndexes(), [], true);
25396
25494
  this.parent.setProperties({ selectedRowIndex: -1 }, true);
25495
+ if (this.selectedRowIndexes.length === 1) {
25496
+ this.parent.setProperties({ selectedRowIndex: this.selectedRowIndexes[0] }, true);
25497
+ }
25397
25498
  if (!isNullOrUndefined(this.parent.toolbarModule)) {
25398
25499
  this.parent.toolbarModule.refreshToolbarItems();
25399
25500
  }
@@ -26274,6 +26375,7 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
26274
26375
  this.nonworkingContainer = createElement('div', {
26275
26376
  className: nonworkingContainer
26276
26377
  });
26378
+ this.nonworkingContainer.setAttribute("role", "NonWorkingDays");
26277
26379
  this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer);
26278
26380
  }
26279
26381
  };
@@ -26311,8 +26413,11 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
26311
26413
  var toDate;
26312
26414
  var container = createElement('div');
26313
26415
  var height = this.parent.contentHeight;
26314
- var scrollElement = this.parent.ganttChartModule.scrollElement;
26315
- var viewportHeight = parseInt(scrollElement.style.height, 10);
26416
+ var toolbarHeight = 0;
26417
+ if (!isNullOrUndefined(this.parent.toolbarModule)) {
26418
+ toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
26419
+ }
26420
+ var viewportHeight = this.parent.ganttHeight - toolbarHeight - this.parent.ganttChartModule.chartTimelineContainer.offsetHeight;
26316
26421
  for (var i = 0; i < this.parent.holidays.length; i++) {
26317
26422
  if (this.parent.holidays[i].from && this.parent.holidays[i].to) {
26318
26423
  fromDate = this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[i].from);
@@ -26405,9 +26510,12 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
26405
26510
  return container;
26406
26511
  };
26407
26512
  NonWorkingDay.prototype.updateHolidayLabelHeight = function () {
26408
- var height = this.parent.contentHeight;
26409
- var scrollElement = this.parent.ganttChartModule.scrollElement;
26410
- var viewportHeight = parseInt(scrollElement.style.height, 10);
26513
+ var height = this.parent.getContentHeight();
26514
+ var toolbarHeight = 0;
26515
+ if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
26516
+ toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
26517
+ }
26518
+ var viewportHeight = this.parent.ganttHeight - toolbarHeight - this.parent.ganttChartModule.chartTimelineContainer.offsetHeight;
26411
26519
  var top = (viewportHeight < height) ? viewportHeight / 2 : height / 2;
26412
26520
  var labels = this.holidayContainer.querySelectorAll('.' + holidayLabel);
26413
26521
  for (var i = 0; i < labels.length; i++) {
@@ -26464,6 +26572,7 @@ var EventMarker$1 = /** @__PURE__ @class */ (function () {
26464
26572
  this.eventMarkersContainer = createElement('div', {
26465
26573
  className: eventMarkersContainer
26466
26574
  });
26575
+ this.eventMarkersContainer.setAttribute("role", "EventMarker");
26467
26576
  this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer);
26468
26577
  }
26469
26578
  this.eventMarkersContainer.innerHTML = '';
@@ -27647,33 +27756,55 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
27647
27756
  var data_1 = gObj.flatData;
27648
27757
  var startIndex = void 0;
27649
27758
  var endIndex = void 0;
27759
+ var ganttData_1 = this_1.parent.dataSource;
27760
+ var uniqueTaskID_1 = this_1.parent.taskFields.id;
27650
27761
  if (draggedRecord.index < droppedRecord.index) {
27651
27762
  startIndex = draggedRecord.index;
27652
- endIndex = droppedRecord.index;
27763
+ var _loop_2 = function (i_1) {
27764
+ var currentData = this_1.parent.currentViewData.filter(function (e) {
27765
+ return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
27766
+ })[0];
27767
+ if (currentData.index > droppedRecord.index) {
27768
+ endIndex = currentData.index;
27769
+ return "break";
27770
+ }
27771
+ };
27772
+ for (var i_1 = 0; i_1 < ganttData_1.length; i_1++) {
27773
+ var state_2 = _loop_2(i_1);
27774
+ if (state_2 === "break")
27775
+ break;
27776
+ }
27653
27777
  }
27654
27778
  else {
27655
27779
  startIndex = droppedRecord.index;
27656
- var rootChildRecord = draggedRecord;
27657
- if (rootChildRecord.childRecords.length > 0) {
27658
- do {
27659
- rootChildRecord = rootChildRecord.childRecords[rootChildRecord.childRecords.length - 1];
27660
- } while (rootChildRecord.childRecords.length > 0);
27780
+ var _loop_3 = function (i_2) {
27781
+ var currentData = this_1.parent.currentViewData.filter(function (e) {
27782
+ return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
27783
+ })[0];
27784
+ if (currentData.index > draggedRecord.index) {
27785
+ endIndex = currentData.index;
27786
+ return "break";
27787
+ }
27788
+ };
27789
+ for (var i_2 = 0; i_2 < ganttData_1.length; i_2++) {
27790
+ var state_3 = _loop_3(i_2);
27791
+ if (state_3 === "break")
27792
+ break;
27661
27793
  }
27662
- endIndex = rootChildRecord.index;
27663
27794
  }
27664
- var _loop_2 = function (i_1) {
27665
- if (!isNullOrUndefined(data_1[i_1])) {
27666
- data_1[i_1].index = i_1;
27667
- if (!isNullOrUndefined(data_1[i_1].parentItem)) {
27795
+ var _loop_4 = function (i_3) {
27796
+ if (!isNullOrUndefined(data_1[i_3])) {
27797
+ data_1[i_3].index = i_3;
27798
+ if (!isNullOrUndefined(data_1[i_3].parentItem)) {
27668
27799
  var updatedParent = data_1.filter(function (e) {
27669
- return e.uniqueID === data_1[i_1].parentUniqueID;
27800
+ return e.uniqueID === data_1[i_3].parentUniqueID;
27670
27801
  })[0];
27671
- data_1[i_1].parentItem.index = updatedParent.index;
27802
+ data_1[i_3].parentItem.index = updatedParent.index;
27672
27803
  }
27673
27804
  }
27674
27805
  };
27675
- for (var i_1 = startIndex; i_1 <= endIndex; i_1++) {
27676
- _loop_2(i_1);
27806
+ for (var i_3 = startIndex; i_3 <= endIndex; i_3++) {
27807
+ _loop_4(i_3);
27677
27808
  }
27678
27809
  }
27679
27810
  gObj.rowDragAndDropModule.refreshDataSource();