@syncfusion/ej2-gantt 19.4.56 → 20.1.50

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 (82) hide show
  1. package/CHANGELOG.md +31 -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 +230 -83
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +248 -91
  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 +11 -1
  14. package/src/gantt/actions/edit.js +11 -2
  15. package/src/gantt/actions/filter.js +4 -2
  16. package/src/gantt/actions/rowdragdrop.js +41 -17
  17. package/src/gantt/base/date-processor.js +0 -1
  18. package/src/gantt/base/gantt-chart.js +10 -5
  19. package/src/gantt/base/gantt.d.ts +2 -0
  20. package/src/gantt/base/gantt.js +3 -2
  21. package/src/gantt/base/splitter.js +1 -0
  22. package/src/gantt/base/tree-grid.js +3 -1
  23. package/src/gantt/renderer/chart-rows.js +80 -32
  24. package/src/gantt/renderer/connector-line.js +22 -18
  25. package/src/gantt/renderer/event-marker.js +1 -0
  26. package/src/gantt/renderer/nonworking-day.js +13 -6
  27. package/src/gantt/renderer/timeline.d.ts +1 -0
  28. package/src/gantt/renderer/timeline.js +37 -1
  29. package/src/gantt/renderer/tooltip.js +10 -3
  30. package/styles/bootstrap-dark.css +37 -10
  31. package/styles/bootstrap.css +37 -10
  32. package/styles/bootstrap4.css +37 -10
  33. package/styles/bootstrap5-dark.css +53 -19
  34. package/styles/bootstrap5.css +53 -19
  35. package/styles/fabric-dark.css +34 -7
  36. package/styles/fabric.css +37 -10
  37. package/styles/fluent-dark.css +1942 -0
  38. package/styles/fluent-dark.scss +1 -0
  39. package/styles/fluent.css +1942 -0
  40. package/styles/fluent.scss +1 -0
  41. package/styles/gantt/_bootstrap-dark-definition.scss +10 -2
  42. package/styles/gantt/_bootstrap-definition.scss +11 -3
  43. package/styles/gantt/_bootstrap4-definition.scss +10 -2
  44. package/styles/gantt/_bootstrap5-definition.scss +17 -9
  45. package/styles/gantt/_fabric-dark-definition.scss +8 -0
  46. package/styles/gantt/_fabric-definition.scss +10 -2
  47. package/styles/gantt/_fluent-dark-definition.scss +1 -0
  48. package/styles/gantt/_fluent-definition.scss +21 -13
  49. package/styles/gantt/_highcontrast-definition.scss +9 -1
  50. package/styles/gantt/_highcontrast-light-definition.scss +9 -1
  51. package/styles/gantt/_layout.scss +53 -2
  52. package/styles/gantt/_material-dark-definition.scss +9 -1
  53. package/styles/gantt/_material-definition.scss +10 -2
  54. package/styles/gantt/_tailwind-definition.scss +13 -5
  55. package/styles/gantt/_theme.scss +2 -5
  56. package/styles/gantt/bootstrap-dark.css +37 -10
  57. package/styles/gantt/bootstrap.css +37 -10
  58. package/styles/gantt/bootstrap4.css +37 -10
  59. package/styles/gantt/bootstrap5-dark.css +53 -19
  60. package/styles/gantt/bootstrap5.css +53 -19
  61. package/styles/gantt/fabric-dark.css +34 -7
  62. package/styles/gantt/fabric.css +37 -10
  63. package/styles/gantt/fluent-dark.css +1942 -0
  64. package/styles/gantt/fluent-dark.scss +22 -0
  65. package/styles/gantt/fluent.css +1942 -0
  66. package/styles/gantt/fluent.scss +22 -0
  67. package/styles/gantt/highcontrast-light.css +34 -7
  68. package/styles/gantt/highcontrast.css +34 -7
  69. package/styles/gantt/icons/_fluent-dark.scss +1 -0
  70. package/styles/gantt/icons/_fluent.scss +1 -1
  71. package/styles/gantt/icons/_tailwind-dark.scss +28 -29
  72. package/styles/gantt/icons/_tailwind.scss +26 -27
  73. package/styles/gantt/material-dark.css +37 -10
  74. package/styles/gantt/material.css +37 -10
  75. package/styles/gantt/tailwind-dark.css +70 -99
  76. package/styles/gantt/tailwind.css +70 -99
  77. package/styles/highcontrast-light.css +34 -7
  78. package/styles/highcontrast.css +34 -7
  79. package/styles/material-dark.css +37 -10
  80. package/styles/material.css +37 -10
  81. package/styles/tailwind-dark.css +70 -99
  82. 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
  /**
@@ -4324,7 +4325,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4324
4325
  var emptydivHeight = 36;
4325
4326
  var emptyHeight = this.parent.contentHeight === 0 ? this.parent.flatData.length > 1 ? emptydivHeight : 0 : this.parent.contentHeight;
4326
4327
  var contentElement = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0];
4327
- if (emptyHeight >= contentElement['offsetHeight']) {
4328
+ if (emptyHeight >= contentElement['offsetHeight'] || this.parent.height === 'auto') {
4328
4329
  this.chartBodyContent.style.height = formatUnit(emptyHeight);
4329
4330
  }
4330
4331
  else {
@@ -4335,8 +4336,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4335
4336
  else {
4336
4337
  this.chartBodyContent.style.height = contentElement['offsetHeight'] + 'px';
4337
4338
  }
4338
- }
4339
- //let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
4339
+ } //let element: HTMLElement = this.chartTimelineContainer.querySelector('.' + cls.timelineHeaderTableContainer);
4340
4340
  this.chartBodyContent.style.width = formatUnit(this.parent.timelineModule.totalTimelineWidth);
4341
4341
  this.setVirtualHeight();
4342
4342
  this.parent.notify('updateHeight', {});
@@ -4514,7 +4514,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4514
4514
  var target = e.target;
4515
4515
  var isOnTaskbarElement = e.target.classList.contains(taskBarMainContainer)
4516
4516
  || closest(e.target, '.' + taskBarMainContainer);
4517
- if (closest(target, '.e-gantt-parent-taskbar')) {
4517
+ if (closest(target, '.e-gantt-parent-taskbar') && !this.parent.editSettings.allowEditing) {
4518
4518
  this.chartExpandCollapseRequest(e);
4519
4519
  }
4520
4520
  else if (!isOnTaskbarElement && this.parent.autoFocusTasks) {
@@ -5038,6 +5038,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5038
5038
  $target.classList.contains('e-headercell') || $target.closest('.e-segmented-taskbar')) {
5039
5039
  e.preventDefault();
5040
5040
  }
5041
+ if (isTab && $target.classList.contains('e-rowdragdrop')) {
5042
+ this.parent.treeGrid.grid.notify('key-pressed', e);
5043
+ return;
5044
+ }
5041
5045
  if ($target.classList.contains('e-rowcell') && (nextElement && nextElement.classList.contains('e-rowcell')) ||
5042
5046
  $target.classList.contains('e-headercell')) { // eslint-disable-line
5043
5047
  if (isTab) {
@@ -5080,7 +5084,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
5080
5084
  else {
5081
5085
  this.manageFocus($target, 'remove', true);
5082
5086
  }
5083
- if (nextElement.classList.contains('e-rowcell')) {
5087
+ if (nextElement.classList.contains('e-rowcell') && $target.nextElementSibling) {
5084
5088
  if (!$target.classList.contains('e-rowcell')) {
5085
5089
  this.parent.treeGrid.grid.notify('key-pressed', e);
5086
5090
  var fmodule = getValue('focusModule', this.parent.treeGrid.grid);
@@ -6179,6 +6183,40 @@ var Timeline = /** @__PURE__ @class */ (function () {
6179
6183
  } while ((startDate < endDate));
6180
6184
  return parentTh;
6181
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
+ };
6182
6220
  Timeline.prototype.getTimelineRoundOffEndDate = function (date) {
6183
6221
  var tierMode = this.topTier === 'None' ? this.bottomTier : this.topTier;
6184
6222
  var endDate = new Date(date.toString());
@@ -6193,6 +6231,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
6193
6231
  endDate.setHours(24, 0, 0, 0);
6194
6232
  }
6195
6233
  }
6234
+ if (this.isZooming || this.parent.isLoad) {
6235
+ this.updateTimelineAfterZooming(endDate, false);
6236
+ }
6196
6237
  return endDate;
6197
6238
  };
6198
6239
  /**
@@ -6262,7 +6303,6 @@ var Timeline = /** @__PURE__ @class */ (function () {
6262
6303
  }
6263
6304
  return increment;
6264
6305
  };
6265
-
6266
6306
  /**
6267
6307
  * Method to find header cell was weekend or not
6268
6308
  *
@@ -6844,6 +6884,8 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
6844
6884
  GanttTreeGrid.prototype.renderTreeGrid = function () {
6845
6885
  this.composeProperties();
6846
6886
  this.bindEvents();
6887
+ var root = 'root';
6888
+ this.parent.treeGrid[root] = this.parent[root] ? this.parent[root] : this.parent;
6847
6889
  this.parent.treeGrid.appendTo(this.treeGridElement);
6848
6890
  this.wireEvents();
6849
6891
  };
@@ -6907,7 +6949,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
6907
6949
  var scrollWidth = this.getScrollbarWidth();
6908
6950
  var isMobile = /Android|Mac|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
6909
6951
  if (scrollWidth !== 0) {
6910
- content.style.cssText += 'width: calc(100% + ' + scrollWidth + 'px);';
6952
+ content.style.cssText += 'width: calc(100% + ' + (scrollWidth + 1) + 'px);';
6911
6953
  }
6912
6954
  else {
6913
6955
  content.classList.add('e-gantt-scroll-padding');
@@ -8251,7 +8293,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8251
8293
  _this.milestoneHeight = 0;
8252
8294
  _this.milesStoneRadius = 0;
8253
8295
  _this.baselineTop = 0;
8254
- _this.baselineHeight = 3;
8296
+ _this.baselineHeight = 8;
8255
8297
  _this.touchLeftConnectorpoint = '';
8256
8298
  _this.touchRightConnectorpoint = '';
8257
8299
  _this.dropSplit = false;
@@ -8334,7 +8376,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8334
8376
  * @private
8335
8377
  */
8336
8378
  ChartRows.prototype.getIndicatorNode = function (indicator) {
8337
- var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '" style="line-height:'
8379
+ var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '" role="LabelIndicator" style="line-height:'
8338
8380
  + (this.parent.rowHeight) + 'px;' +
8339
8381
  'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
8340
8382
  return this.createDivElement(templateString);
@@ -8385,10 +8427,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8385
8427
  'border-bottom-right-radius:' + this.getBorderRadius(data.ganttProperties) + 'px;">' +
8386
8428
  '</div>');
8387
8429
  }
8430
+ var tempDiv = createElement('div');
8388
8431
  if (this.taskLabelTemplateFunction && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
8389
8432
  var taskLabelTemplateNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressDiv[0]);
8390
8433
  if (taskLabelTemplateNode && taskLabelTemplateNode.length > 0) {
8391
- var tempDiv = createElement('div');
8392
8434
  tempDiv.appendChild(taskLabelTemplateNode[0]);
8393
8435
  labelString = tempDiv.innerHTML;
8394
8436
  }
@@ -8398,6 +8440,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8398
8440
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
8399
8441
  }
8400
8442
  if (labelString !== 'null') {
8443
+ if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate') {
8444
+ labelString = '';
8445
+ }
8401
8446
  if (isNaN(parseInt(labelString))) {
8402
8447
  taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
8403
8448
  (this.taskBarHeight - 1) + 'px; text-align: left;' +
@@ -8407,9 +8452,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8407
8452
  }
8408
8453
  else {
8409
8454
  taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
8410
- (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.viewType === 'ResourceView' ? 'left;' : ';') +
8411
- 'display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') +
8412
- 'width:' + (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
8455
+ (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'text-align: left;' : '') +
8456
+ +(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
8457
+ +(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
8413
8458
  this.taskBarHeight + 'px;">' + labelString + '</span>';
8414
8459
  }
8415
8460
  }
@@ -8435,7 +8480,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8435
8480
  (isNullOrUndefined(data.ganttProperties.segments) || (!isNullOrUndefined(data.ganttProperties.segments) &&
8436
8481
  data.ganttProperties.segments.length === 0))) {
8437
8482
  if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
8438
- progressDiv[0].appendChild([].slice.call(this.createDivElement(template))[0]);
8483
+ var templateElement = this.createDivElement(template)[0];
8484
+ templateElement.appendChild(tempDiv);
8485
+ progressDiv[0].appendChild(templateElement);
8486
+ var childLabel = this.parent.labelSettings.taskLabel;
8487
+ if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
8488
+ !this.isTemplate(childLabel))
8489
+ progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
8490
+ if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
8491
+ childLabel && !childLabel['elementRef'])
8492
+ progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
8439
8493
  }
8440
8494
  if (!isNullOrUndefined(taskbarInnerDiv) && taskbarInnerDiv.length > 0) {
8441
8495
  taskbarInnerDiv[0].appendChild([].slice.call(progressDiv)[0]);
@@ -8826,7 +8880,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8826
8880
  */
8827
8881
  ChartRows.prototype.getTaskBaselineNode = function () {
8828
8882
  var data = this.templateData;
8829
- var template = '<div class="' + baselineBar + ' ' + '" style="margin-top:' + this.baselineTop +
8883
+ var template = '<div class="' + baselineBar + ' ' + '" role="BaselineBar" style="margin-top:' + this.baselineTop +
8830
8884
  'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
8831
8885
  'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
8832
8886
  this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
@@ -8840,9 +8894,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8840
8894
  */
8841
8895
  ChartRows.prototype.getMilestoneBaselineNode = function () {
8842
8896
  var data = this.templateData;
8897
+ var baselineMilestoneHeight = this.parent.renderBaseline ? 5 : 2;
8843
8898
  var template = '<div class="' + baselineMilestoneContainer + ' ' + '" style="' +
8844
8899
  'left:' + (data.ganttProperties.baselineLeft - this.milesStoneRadius) + 'px;' +
8845
- 'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + 2) +
8900
+ 'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) +
8846
8901
  'px">' + '<div class="' + baselineMilestoneDiv + '">' + '<div class="' + baselineMilestoneDiv +
8847
8902
  ' ' + baselineMilestoneTop + '" ' +
8848
8903
  'style="top:' + (-this.milestoneHeight) + 'px;border-right:' + this.milesStoneRadius +
@@ -8870,7 +8925,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8870
8925
  */
8871
8926
  ChartRows.prototype.getLeftLabelNode = function (i) {
8872
8927
  var leftLabelNode = this.leftLabelContainer();
8873
- leftLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('left'));
8928
+ if (this.generateTaskLabelAriaLabel('left') !== "") {
8929
+ leftLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('left'));
8930
+ }
8874
8931
  var leftLabelTemplateNode = null;
8875
8932
  if (this.leftTaskLabelTemplateFunction) {
8876
8933
  leftLabelTemplateNode = this.leftTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'LeftLabelTemplate', this.getTemplateID('LeftLabelTemplate'), false, undefined, leftLabelNode[0], this.parent.treeGrid['root']);
@@ -8892,9 +8949,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8892
8949
  return leftLabelNode;
8893
8950
  };
8894
8951
  ChartRows.prototype.getLableText = function (labelString, labelDiv) {
8952
+ var leftLabelHeight = this.parent.renderBaseline ? ((this.parent.rowHeight - this.taskBarHeight) / 2) : this.taskBarMarginTop;
8895
8953
  var templateString = createElement('div', {
8896
8954
  className: labelDiv, styles: 'height:' + (this.taskBarHeight) + 'px;' +
8897
- 'margin-top:' + this.taskBarMarginTop + 'px;'
8955
+ 'margin-top:' + leftLabelHeight + 'px;'
8898
8956
  });
8899
8957
  var spanElem = createElement('span', { className: label });
8900
8958
  var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
@@ -8913,7 +8971,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8913
8971
  */
8914
8972
  ChartRows.prototype.getRightLabelNode = function (i) {
8915
8973
  var rightLabelNode = this.rightLabelContainer();
8916
- rightLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('right'));
8974
+ if (this.generateTaskLabelAriaLabel('right') !== "") {
8975
+ rightLabelNode[0].setAttribute('aria-label', this.generateTaskLabelAriaLabel('right'));
8976
+ }
8917
8977
  var rightLabelTemplateNode = null;
8918
8978
  if (this.rightTaskLabelTemplateFunction) {
8919
8979
  rightLabelTemplateNode = this.rightTaskLabelTemplateFunction(extend({ index: i }, this.templateData), this.parent, 'RightLabelTemplate', this.getTemplateID('RightLabelTemplate'), false, undefined, rightLabelNode[0], this.parent.treeGrid['root']);
@@ -9003,10 +9063,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9003
9063
  'width:' + data.ganttProperties.progressWidth + 'px;' +
9004
9064
  'border-top-right-radius:' + this.getBorderRadius(data) + 'px;' +
9005
9065
  'border-bottom-right-radius:' + this.getBorderRadius(data) + 'px;height:100%;"></div>');
9066
+ var div = createElement('div');
9006
9067
  if (this.taskLabelTemplateFunction) {
9007
9068
  var parentTaskLabelNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressBarInnerDiv[0]);
9008
9069
  if (parentTaskLabelNode && parentTaskLabelNode.length > 0) {
9009
- var div = createElement('div');
9010
9070
  div.appendChild(parentTaskLabelNode[0]);
9011
9071
  labelString = div.innerHTML;
9012
9072
  }
@@ -9016,21 +9076,35 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9016
9076
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
9017
9077
  }
9018
9078
  if (labelString !== 'null') {
9079
+ if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate') {
9080
+ labelString = '';
9081
+ }
9019
9082
  if (isNaN(parseInt(labelString))) {
9020
- labelDiv = this.createDivElement('<span class="' + taskLabel + '" style="line-height:' +
9083
+ labelDiv = '<span class="' + taskLabel + '" style="line-height:' +
9021
9084
  (this.taskBarHeight - 1) + 'px; text-align: left;' +
9022
9085
  'display:' + 'inline-block;' +
9023
9086
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
9024
- this.taskBarHeight + 'px;">' + labelString + '</span>');
9087
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
9025
9088
  }
9026
9089
  else {
9027
- labelDiv = this.createDivElement('<span class="' +
9090
+ labelDiv = '<span class="' +
9028
9091
  taskLabel + '" style="line-height:' +
9029
- (this.taskBarHeight - 1) + 'px; display:' + (this.parent.viewType === 'ResourceView' ? 'inline-flex;' : ';') + 'width:' +
9030
- (this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : ';') + 'px; height:' +
9031
- this.taskBarHeight + 'px;">' + labelString + '</span>');
9092
+ (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9093
+ (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9094
+ (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
9095
+ (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9096
+ this.taskBarHeight + 'px;">' + labelString + '</span>';
9032
9097
  }
9033
- progressBarInnerDiv[0].appendChild([].slice.call(labelDiv)[0]);
9098
+ var labelElement = this.createDivElement(labelDiv)[0];
9099
+ labelElement.appendChild(div);
9100
+ progressBarInnerDiv[0].appendChild(labelElement);
9101
+ var parentLabel = this.parent.labelSettings.taskLabel;
9102
+ if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
9103
+ !this.isTemplate(parentLabel))
9104
+ progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
9105
+ if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
9106
+ parentLabel && !parentLabel['elementRef'])
9107
+ progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
9034
9108
  }
9035
9109
  var milestoneTemplate = '<div class="' + parentMilestone + '" style="position:absolute;">' +
9036
9110
  '<div class="' + parentMilestoneTop + '" style="border-right-width:' +
@@ -9056,10 +9130,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9056
9130
  var className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
9057
9131
  'e-chart-row-border' : '';
9058
9132
  table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + '"' +
9059
- 'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
9133
+ 'role="ChartRow" style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
9060
9134
  this.parent.rowHeight + 'px;">' +
9061
9135
  '<td class="' + chartRowCell + ' ' + className
9062
- + '" style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
9136
+ + '" role="ChartCell" style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
9063
9137
  return table.childNodes;
9064
9138
  };
9065
9139
  /**
@@ -9124,7 +9198,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9124
9198
  };
9125
9199
  ChartRows.prototype.leftLabelContainer = function () {
9126
9200
  var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
9127
- leftLabelContainer) + ' ' + '" tabindex="-1" style="height:' +
9201
+ leftLabelContainer) + ' ' + '" tabindex="-1" role="LeftLabel" style="height:' +
9128
9202
  (this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
9129
9203
  return this.createDivElement(template);
9130
9204
  };
@@ -9136,7 +9210,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9136
9210
  var template = '<div class="' + taskBarMainContainer + ' ' +
9137
9211
  this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
9138
9212
  ((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
9139
- ' tabindex="-1" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
9213
+ ' tabindex="-1" role="TaskBar" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
9140
9214
  ('width:' + this.milestoneHeight + 'px;height:' +
9141
9215
  this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
9142
9216
  (this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
@@ -9147,26 +9221,26 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9147
9221
  };
9148
9222
  ChartRows.prototype.rightLabelContainer = function () {
9149
9223
  var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
9150
- rightLabelContainer) + '" ' + ' tabindex="-1" style="left:' + this.getRightLabelLeft(this.templateData) + 'px;height:'
9224
+ rightLabelContainer) + '" ' + ' tabindex="-1" role="RightLabel" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
9151
9225
  + (this.parent.rowHeight - 2) + 'px;"></div>';
9152
9226
  return this.createDivElement(template);
9153
9227
  };
9154
9228
  ChartRows.prototype.childTaskbarLeftResizer = function () {
9155
9229
  var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
9156
9230
  var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
9157
- ' style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
9231
+ ' role="LeftResizer" style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
9158
9232
  return this.createDivElement(template);
9159
9233
  };
9160
9234
  ChartRows.prototype.childTaskbarRightResizer = function () {
9161
9235
  var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
9162
9236
  var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
9163
- ' style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
9237
+ ' role="RightResizer" style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
9164
9238
  'height:' + (this.taskBarHeight) + 'px;"></div>';
9165
9239
  return this.createDivElement(template);
9166
9240
  };
9167
9241
  ChartRows.prototype.childTaskbarProgressResizer = function () {
9168
9242
  var template = '<div class="' + childProgressResizer + '"' +
9169
- ' style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
9243
+ ' role="ProgressResizer" style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
9170
9244
  (this.taskBarHeight - 4) + 'px;"><div class="' + progressBarHandler + '"' +
9171
9245
  '><div class="' + progressHandlerElement + '"></div>' +
9172
9246
  '<div class="' + progressBarHandlerAfter + '"></div></div>';
@@ -9364,10 +9438,13 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9364
9438
  * @private
9365
9439
  */
9366
9440
  ChartRows.prototype.initChartHelperPrivateVariable = function () {
9441
+ var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : 0.62;
9442
+ var taskBarMarginTopValue = this.parent.renderBaseline ? 4 : 2;
9443
+ var milestoneHeightValue = this.parent.renderBaseline ? 1.13 : 0.82;
9367
9444
  this.baselineColor = !isNullOrUndefined(this.parent.baselineColor) &&
9368
9445
  this.parent.baselineColor !== '' ? this.parent.baselineColor : null;
9369
9446
  this.taskBarHeight = isNullOrUndefined(this.parent.taskbarHeight) || this.parent.taskbarHeight >= this.parent.rowHeight ?
9370
- Math.floor(this.parent.rowHeight * 0.62) : this.parent.taskbarHeight; // 0.62 -- Standard Ratio.
9447
+ Math.floor(this.parent.rowHeight * taskbarHeightValue) : this.parent.taskbarHeight; // 0.62 -- Standard Ratio.
9371
9448
  if (this.parent.renderBaseline) {
9372
9449
  var height = void 0;
9373
9450
  if ((this.taskBarHeight + this.baselineHeight) <= this.parent.rowHeight) {
@@ -9378,11 +9455,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9378
9455
  }
9379
9456
  this.taskBarHeight = height;
9380
9457
  }
9381
- this.milestoneHeight = Math.floor(this.taskBarHeight * 0.82); // 0.82 -- Standard Ratio.
9382
- this.taskBarMarginTop = Math.floor((this.parent.rowHeight - this.taskBarHeight) / 2);
9458
+ this.milestoneHeight = Math.floor(this.taskBarHeight * milestoneHeightValue); // 0.82 -- Standard Ratio.
9459
+ this.taskBarMarginTop = Math.floor((this.parent.rowHeight - this.taskBarHeight) / taskBarMarginTopValue);
9383
9460
  this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
9384
9461
  this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
9385
- this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 1);
9462
+ this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 4);
9386
9463
  this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 8;
9387
9464
  this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
9388
9465
  };
@@ -9576,6 +9653,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9576
9653
  var indicators = this.templateData.ganttProperties.indicators;
9577
9654
  for (var indicatorIndex = 0; indicatorIndex < indicators.length; indicatorIndex++) {
9578
9655
  taskIndicatorNode = this.getIndicatorNode(indicators[indicatorIndex]);
9656
+ taskIndicatorNode[0].setAttribute('aria-label', indicators[indicatorIndex].name);
9579
9657
  if (indicators[indicatorIndex].name.indexOf('$') > -1 || indicators[indicatorIndex].name.indexOf('#') > -1) {
9580
9658
  taskIndicatorTextFunction = this.templateCompiler(indicators[indicatorIndex].name);
9581
9659
  taskIndicatorTextNode = taskIndicatorTextFunction(extend({ index: i }, this.templateData), this.parent, 'indicatorLabelText');
@@ -9854,6 +9932,18 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9854
9932
  };
9855
9933
  ChartRows.prototype.getResourceParent = function (record) {
9856
9934
  var chartRows = this.parent.ganttChartModule.getChartRows();
9935
+ //Below code is for rendering taskbartemplate in resource view with multi taskbar
9936
+ if (this.parent.initialChartRowElements) {
9937
+ for (var j = 0; j <= this.parent.initialChartRowElements.length; j++) {
9938
+ if (!isNullOrUndefined(chartRows[j])) {
9939
+ if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
9940
+ !isNullOrUndefined(this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2])) {
9941
+ // eslint-disable-next-line
9942
+ chartRows[j].childNodes[0].childNodes[1].childNodes[2]['innerHTML'] = this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2]['innerHTML'];
9943
+ }
9944
+ }
9945
+ }
9946
+ }
9857
9947
  this.templateData = record;
9858
9948
  var parentTrNode = this.getTableTrNode();
9859
9949
  var leftLabelNode = this.leftLabelContainer();
@@ -10800,7 +10890,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
10800
10890
  for (var i = 0; i < childNodes.length; i++) {
10801
10891
  var innerChild = childNodes[i].childNodes;
10802
10892
  for (var j = 0; j < innerChild.length; j++) {
10803
- var ariaString = this.parent.connectorLineModule.generateAriaLabel(ariaConnector[i]);
10893
+ var ariaString = 'Connector Line ' + this.parent.connectorLineModule.generateAriaLabel(ariaConnector[i]);
10804
10894
  innerChild[j].setAttribute('aria-label', ariaString);
10805
10895
  }
10806
10896
  }
@@ -11057,7 +11147,11 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11057
11147
  var connectorContainer = '';
11058
11148
  var isVirtual = this.parent.virtualScrollModule && this.parent.enableVirtualization;
11059
11149
  var connectorLine$$1 = this.getPosition(data, this.getParentPosition(data), height);
11060
- var heightValue = isVirtual ? connectorLine$$1.height : height;
11150
+ var isMilestoneValue = 0;
11151
+ if (this.parent.renderBaseline) {
11152
+ isMilestoneValue = (data.milestoneParent && data.milestoneChild) ? 0 : data.milestoneParent ? -5 : data.milestoneChild ? 5 : 0;
11153
+ }
11154
+ var heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
11061
11155
  if (this.getParentPosition(data)) {
11062
11156
  connectorContainer = '<div id="ConnectorLine' + data.connectorLineId + '" style="background-color:black">';
11063
11157
  var div = '<div class="' + connectorLineContainer +
@@ -11085,7 +11179,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11085
11179
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
11086
11180
  if (this.getParentPosition(data) === 'FSType1') {
11087
11181
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11088
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11182
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11089
11183
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
11090
11184
  div = div + eLine;
11091
11185
  div = div + 'left:' + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
@@ -11106,7 +11200,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11106
11200
  }
11107
11201
  if (this.getParentPosition(data) === 'FSType2') {
11108
11202
  div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) +
11109
- this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11203
+ this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11110
11204
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
11111
11205
  div = div + eLine;
11112
11206
  div = div + 'left:' + (isMilestoneParent ? data.parentWidth - 1 : data.parentWidth) + 'px;width:' +
@@ -11137,7 +11231,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11137
11231
  }
11138
11232
  if (this.getParentPosition(data) === 'FSType3') {
11139
11233
  div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11140
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11234
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11141
11235
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
11142
11236
  div = div + rightArrow;
11143
11237
  div = div + 'left:10px;' + this.getBorderStyles('left', 10) +
@@ -11167,7 +11261,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11167
11261
  }
11168
11262
  if (this.getParentPosition(data) === 'FSType4') {
11169
11263
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11170
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11264
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11171
11265
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
11172
11266
  div = div + rightArrow;
11173
11267
  div = div + 'left:' + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
@@ -11193,7 +11287,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11193
11287
  }
11194
11288
  if (this.getParentPosition(data) === 'SSType4') {
11195
11289
  div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11196
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11290
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11197
11291
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
11198
11292
  div = div + rightArrow;
11199
11293
  div = div + 'left:' + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
@@ -11206,7 +11300,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11206
11300
  }
11207
11301
  if (this.getParentPosition(data) === 'SSType3') {
11208
11302
  div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11209
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11303
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11210
11304
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
11211
11305
  div = div + rightArrow;
11212
11306
  div = div + 'left:10px;' + duplicateStingTwo;
@@ -11219,7 +11313,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11219
11313
  }
11220
11314
  if (this.getParentPosition(data) === 'SSType2') {
11221
11315
  div = div + 'left:' + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11222
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11316
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11223
11317
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
11224
11318
  div = div + eLine;
11225
11319
  div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
@@ -11240,7 +11334,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11240
11334
  if (this.getParentPosition(data) === 'SSType1') {
11241
11335
  div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11242
11336
  ((data.parentIndex * data.rowHeight) +
11243
- this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11337
+ this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11244
11338
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
11245
11339
  div = div + eLine;
11246
11340
  div = div + 'width:' + (data.parentLeft - data.childLeft + 21) + 'px;' +
@@ -11257,7 +11351,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11257
11351
  }
11258
11352
  if (this.getParentPosition(data) === 'FFType1') {
11259
11353
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11260
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11354
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11261
11355
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
11262
11356
  div = div + eLine;
11263
11357
  div = div + 'left:' + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
@@ -11281,7 +11375,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11281
11375
  }
11282
11376
  if (this.getParentPosition(data) === 'FFType2') {
11283
11377
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11284
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11378
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11285
11379
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
11286
11380
  div = div + eLine;
11287
11381
  div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'width:' +
@@ -11307,7 +11401,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11307
11401
  }
11308
11402
  if (this.getParentPosition(data) === 'FFType3') {
11309
11403
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11310
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11404
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11311
11405
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
11312
11406
  div = div + duplicateStingOne;
11313
11407
  div = div + eLine;
@@ -11330,7 +11424,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11330
11424
  }
11331
11425
  if (this.getParentPosition(data) === 'FFType4') {
11332
11426
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11333
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11427
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11334
11428
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
11335
11429
  div = div + leftArrow;
11336
11430
  div = div + ('left:' + ((data.childLeft + data.childWidth) -
@@ -11359,7 +11453,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11359
11453
  }
11360
11454
  if (this.getParentPosition(data) === 'SFType4') {
11361
11455
  div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11362
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;width:1px;' +
11456
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
11363
11457
  'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
11364
11458
  div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
11365
11459
  'border-bottom-width:' + (5 + this.lineStroke) +
@@ -11387,7 +11481,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11387
11481
  }
11388
11482
  if (this.getParentPosition(data) === 'SFType3') {
11389
11483
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11390
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11484
+ ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11391
11485
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
11392
11486
  div = div + duplicateStingOne;
11393
11487
  div = div + eLine;
@@ -11405,7 +11499,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11405
11499
  }
11406
11500
  if (this.getParentPosition(data) === 'SFType1') {
11407
11501
  div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11408
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1))) + 'px;' +
11502
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11409
11503
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
11410
11504
  div = div + eLine;
11411
11505
  div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
@@ -11430,7 +11524,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11430
11524
  }
11431
11525
  if (this.getParentPosition(data) === 'SFType2') {
11432
11526
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11433
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1))) + 'px;' +
11527
+ ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11434
11528
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
11435
11529
  div = div + eLine;
11436
11530
  div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
@@ -11674,6 +11768,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
11674
11768
  _this.splitterObject.paneSettings[1].size = null;
11675
11769
  _this.splitterObject.paneSettings[1].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionChart);
11676
11770
  }
11771
+ _this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
11677
11772
  callBackPromise.resolve(splitterResizedArgs);
11678
11773
  });
11679
11774
  return callBackPromise;
@@ -11956,6 +12051,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
11956
12051
  * @returns {void} .
11957
12052
  */
11958
12053
  Tooltip$$1.prototype.updateTooltipPosition = function (args) {
12054
+ args.element.style.visibility = 'visible';
11959
12055
  if (isNullOrUndefined(this.tooltipMouseEvent) || args.target.classList.contains('e-notes-info')) {
11960
12056
  return;
11961
12057
  }
@@ -11985,7 +12081,6 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
11985
12081
  tooltipPositionY = tooltipPositionY + 10;
11986
12082
  }
11987
12083
  args.element.style.top = tooltipPositionY + 'px';
11988
- args.element.style.visibility = 'visible';
11989
12084
  };
11990
12085
  /**
11991
12086
  * Method to get mouse pointor position
@@ -12027,9 +12122,16 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
12027
12122
  switch (elementType) {
12028
12123
  case 'milestone':
12029
12124
  {
12030
- var sDate = !isNullOrUndefined(data.startDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
12125
+ var milestoneStartDate = void 0;
12126
+ if (args.target.className.includes('e-baseline-gantt-milestone') && !isNullOrUndefined(data.baselineStartDate)) {
12127
+ milestoneStartDate = data.baselineStartDate;
12128
+ }
12129
+ else if (!isNullOrUndefined(data.startDate)) {
12130
+ milestoneStartDate = data.startDate;
12131
+ }
12132
+ var sDate = !isNullOrUndefined(milestoneStartDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
12031
12133
  '<td class = "e-gantt-tooltip-value">' +
12032
- this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat()) + '</td></tr>' : '';
12134
+ this.parent.getFormatedDate(milestoneStartDate, this.parent.getDateFormat()) + '</td></tr>' : '';
12033
12135
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
12034
12136
  taskName + sDate + '</tbody></table>';
12035
12137
  break;
@@ -13265,7 +13367,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13265
13367
  gridHeight = 'calc(100% - ' + timelineContainer + 'px)';
13266
13368
  // eslint-disable-next-line
13267
13369
  this.element.getElementsByClassName('e-chart-scroll-container e-content')[0]['style'].height = 'calc(100% - ' + timelineContainer + 'px)';
13268
- if (!isNullOrUndefined(this.toolbarModule)) {
13370
+ if (!isNullOrUndefined(this.toolbarModule) && !isNullOrUndefined(this.toolbarModule.element)) {
13269
13371
  this.splitterElement.style.height = 'calc(100% - ' + this.toolbarModule.element.offsetHeight + 'px)';
13270
13372
  }
13271
13373
  else {
@@ -13302,6 +13404,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13302
13404
  this.getCurrentRecords(args);
13303
13405
  }
13304
13406
  this.notify('recordsUpdated', {});
13407
+ this.initialChartRowElements = this.ganttChartModule.getChartRows();
13305
13408
  this.isLoad = false;
13306
13409
  this.trigger('dataBound', args);
13307
13410
  };
@@ -13801,7 +13904,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13801
13904
  */
13802
13905
  Gantt.prototype.updateGridLineContainerHeight = function () {
13803
13906
  if (this.chartVerticalLineContainer) {
13804
- this.chartVerticalLineContainer.style.height = formatUnit(this.getContentHeight());
13907
+ this.chartVerticalLineContainer.style.height = formatUnit(this.contentHeight);
13805
13908
  }
13806
13909
  };
13807
13910
  /**
@@ -15712,7 +15815,8 @@ var CellEdit = /** @__PURE__ @class */ (function () {
15712
15815
  args.cancel = true;
15713
15816
  return;
15714
15817
  }
15715
- if (data.hasChildRecords && (field === taskSettings.endDate || field === taskSettings.duration
15818
+ if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
15819
+ data['isManual'] == false) || this.parent.taskMode == 'Auto')) || field === taskSettings.duration
15716
15820
  || field === taskSettings.dependency || field === taskSettings.progress
15717
15821
  || field === taskSettings.work || field === 'taskType')) {
15718
15822
  args.cancel = true;
@@ -18682,6 +18786,13 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
18682
18786
  dialogModel.target = document.body;
18683
18787
  dialogModel.close = this.dialogClose.bind(this);
18684
18788
  dialogModel.closeOnEscape = true;
18789
+ dialogModel.beforeClose = function (args) {
18790
+ if (args.closedBy == "escape") {
18791
+ if (args.event.name == "key-pressed" && args.event.target.nodeName == 'INPUT') {
18792
+ args.cancel = true;
18793
+ }
18794
+ }
18795
+ };
18685
18796
  dialogModel.open = function (args) {
18686
18797
  var dialogElement = getValue('element', args);
18687
18798
  var generalTabElement = dialogElement.querySelector('#' + _this.parent.element.id + 'GeneralTabContainer');
@@ -18967,6 +19078,8 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
18967
19078
  }
18968
19079
  else if (id === ganttObj.element.id + 'NotesTabContainer') {
18969
19080
  document.getElementById(id).ej2_instances[0].refresh();
19081
+ var notesTabElement = document.querySelector('#' + this.parent.element.id + 'NotesTabContainer');
19082
+ notesTabElement.style.overflow = 'scroll';
18970
19083
  }
18971
19084
  else if (id === ganttObj.element.id + 'SegmentsTabContainer') {
18972
19085
  if (isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate)) {
@@ -19854,7 +19967,8 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19854
19967
  disabled = true;
19855
19968
  }
19856
19969
  if (this.editedRecord.hasChildRecords) {
19857
- if (column.field === this.parent.taskFields.endDate || column.field === this.parent.taskFields.duration ||
19970
+ if ((column.field === this.parent.taskFields.endDate && ((!isNullOrUndefined(this.editedRecord['isManual']) &&
19971
+ this.editedRecord['isManual'] == false) || this.parent.taskMode == 'Auto')) || column.field === this.parent.taskFields.duration ||
19858
19972
  column.field === this.parent.taskFields.progress || column.field === this.parent.taskFields.work ||
19859
19973
  column.field === 'taskType') {
19860
19974
  disabled = true;
@@ -23697,14 +23811,20 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23697
23811
  }
23698
23812
  else {
23699
23813
  childIndex = parentItem.childRecords.length;
23700
- } /*Child collection update*/
23814
+ }
23815
+ /*Child collection update*/
23701
23816
  parentItem.childRecords.splice(childIndex, 0, record);
23702
23817
  if ((this.parent.dataSource instanceof DataManager &&
23703
23818
  isNullOrUndefined(parentItem.taskData[this.parent.taskFields.parentID])) ||
23704
23819
  !isNullOrUndefined(this.parent.dataSource)) {
23705
23820
  var child = this.parent.taskFields.child;
23706
23821
  if (parentItem.taskData[child] && parentItem.taskData[child].length > 0) {
23707
- parentItem.taskData[child].splice(childIndex, 0, record.taskData);
23822
+ if (rowPosition === 'Above' || rowPosition === 'Below') {
23823
+ parentItem.taskData[child].splice(childIndex, 0, record.taskData);
23824
+ }
23825
+ else {
23826
+ parentItem.taskData[child].push(record.taskData);
23827
+ }
23708
23828
  }
23709
23829
  else {
23710
23830
  parentItem.taskData[child] = [];
@@ -24165,6 +24285,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24165
24285
  }
24166
24286
  this.addSuccess(args);
24167
24287
  args = this.constructTaskAddedEventArgs(cAddedRecord, args.modifiedRecords, 'add');
24288
+ if (this.dialogModule.isAddNewResource && !this.parent.isEdit && this.parent.taskFields.work) {
24289
+ this.parent.dataOperation.updateWorkWithDuration(cAddedRecord[0]);
24290
+ }
24168
24291
  this.parent.trigger('actionComplete', args);
24169
24292
  if (this.dialogModule.dialog && !this.dialogModule.dialogObj.isDestroyed) {
24170
24293
  this.dialogModule.dialogObj.hide();
@@ -25091,11 +25214,13 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
25091
25214
  // ...
25092
25215
  };
25093
25216
  Filter$$1.prototype.closeFilterOnContextClick = function (element) {
25217
+ var datePickerElement = document.querySelector('body > div.e-datepicker');
25218
+ var dateTimePickerElement = document.querySelector('body > div.e-datetimepicker');
25094
25219
  if (this.filterMenuElement && document.body.contains(this.filterMenuElement)) {
25095
25220
  var ganttElement = closest(element, '#' + this.parent.element.id)
25096
25221
  || element.querySelector('#' + this.parent.element.id);
25097
- if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || element.nodeName === 'HTML'
25098
- || ((element.nodeName === 'DIV') && (!element.classList.contains('e-day')))) {
25222
+ if ((!(this.filterMenuElement.contains(element)) && !isNullOrUndefined(ganttElement)) || (!(this.filterMenuElement.contains(element)) && (isNullOrUndefined(datePickerElement))
25223
+ && (isNullOrUndefined(dateTimePickerElement)) && ((element.nodeName === 'DIV') || (element.nodeName === 'HTML')))) {
25099
25224
  remove(this.filterMenuElement);
25100
25225
  this.parent.treeGrid.grid.notify('filter-menu-close', { isOpen: false });
25101
25226
  this.filterMenuElement = null;
@@ -26298,6 +26423,7 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
26298
26423
  this.nonworkingContainer = createElement('div', {
26299
26424
  className: nonworkingContainer
26300
26425
  });
26426
+ this.nonworkingContainer.setAttribute("role", "NonWorkingDays");
26301
26427
  this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer);
26302
26428
  }
26303
26429
  };
@@ -26335,8 +26461,11 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
26335
26461
  var toDate;
26336
26462
  var container = createElement('div');
26337
26463
  var height = this.parent.contentHeight;
26338
- var scrollElement = this.parent.ganttChartModule.scrollElement;
26339
- var viewportHeight = parseInt(scrollElement.style.height, 10);
26464
+ var toolbarHeight = 0;
26465
+ if (!isNullOrUndefined(this.parent.toolbarModule)) {
26466
+ toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
26467
+ }
26468
+ var viewportHeight = this.parent.ganttHeight - toolbarHeight - this.parent.ganttChartModule.chartTimelineContainer.offsetHeight;
26340
26469
  for (var i = 0; i < this.parent.holidays.length; i++) {
26341
26470
  if (this.parent.holidays[i].from && this.parent.holidays[i].to) {
26342
26471
  fromDate = this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[i].from);
@@ -26429,9 +26558,12 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
26429
26558
  return container;
26430
26559
  };
26431
26560
  NonWorkingDay.prototype.updateHolidayLabelHeight = function () {
26432
- var height = this.parent.contentHeight;
26433
- var scrollElement = this.parent.ganttChartModule.scrollElement;
26434
- var viewportHeight = parseInt(scrollElement.style.height, 10);
26561
+ var height = this.parent.getContentHeight();
26562
+ var toolbarHeight = 0;
26563
+ if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
26564
+ toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
26565
+ }
26566
+ var viewportHeight = this.parent.ganttHeight - toolbarHeight - this.parent.ganttChartModule.chartTimelineContainer.offsetHeight;
26435
26567
  var top = (viewportHeight < height) ? viewportHeight / 2 : height / 2;
26436
26568
  var labels = this.holidayContainer.querySelectorAll('.' + holidayLabel);
26437
26569
  for (var i = 0; i < labels.length; i++) {
@@ -26488,6 +26620,7 @@ var EventMarker$1 = /** @__PURE__ @class */ (function () {
26488
26620
  this.eventMarkersContainer = createElement('div', {
26489
26621
  className: eventMarkersContainer
26490
26622
  });
26623
+ this.eventMarkersContainer.setAttribute("role", "EventMarker");
26491
26624
  this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer);
26492
26625
  }
26493
26626
  this.eventMarkersContainer.innerHTML = '';
@@ -27571,10 +27704,12 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
27571
27704
  }
27572
27705
  }
27573
27706
  if (!args.cancel) {
27574
- args.cancel = true;
27575
27707
  args.requestType = 'beforeDrop';
27576
27708
  this.parent.trigger('actionBegin', args);
27577
- this.dropRows(args, true); // method to update the data collections based on drop action
27709
+ if (!args.cancel) {
27710
+ this.dropRows(args, true); // method to update the data collections based on drop action
27711
+ args.cancel = true;
27712
+ }
27578
27713
  }
27579
27714
  };
27580
27715
  RowDD$$1.prototype.dropRows = function (args, isByMethod) {
@@ -27671,33 +27806,55 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
27671
27806
  var data_1 = gObj.flatData;
27672
27807
  var startIndex = void 0;
27673
27808
  var endIndex = void 0;
27809
+ var ganttData_1 = this_1.parent.dataSource;
27810
+ var uniqueTaskID_1 = this_1.parent.taskFields.id;
27674
27811
  if (draggedRecord.index < droppedRecord.index) {
27675
27812
  startIndex = draggedRecord.index;
27676
- endIndex = droppedRecord.index;
27813
+ var _loop_2 = function (i_1) {
27814
+ var currentData = this_1.parent.currentViewData.filter(function (e) {
27815
+ return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
27816
+ })[0];
27817
+ if (currentData.index > droppedRecord.index) {
27818
+ endIndex = currentData.index;
27819
+ return "break";
27820
+ }
27821
+ };
27822
+ for (var i_1 = 0; i_1 < ganttData_1.length; i_1++) {
27823
+ var state_2 = _loop_2(i_1);
27824
+ if (state_2 === "break")
27825
+ break;
27826
+ }
27677
27827
  }
27678
27828
  else {
27679
27829
  startIndex = droppedRecord.index;
27680
- var rootChildRecord = draggedRecord;
27681
- if (rootChildRecord.childRecords.length > 0) {
27682
- do {
27683
- rootChildRecord = rootChildRecord.childRecords[rootChildRecord.childRecords.length - 1];
27684
- } while (rootChildRecord.childRecords.length > 0);
27830
+ var _loop_3 = function (i_2) {
27831
+ var currentData = this_1.parent.currentViewData.filter(function (e) {
27832
+ return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
27833
+ })[0];
27834
+ if (currentData.index > draggedRecord.index) {
27835
+ endIndex = currentData.index;
27836
+ return "break";
27837
+ }
27838
+ };
27839
+ for (var i_2 = 0; i_2 < ganttData_1.length; i_2++) {
27840
+ var state_3 = _loop_3(i_2);
27841
+ if (state_3 === "break")
27842
+ break;
27685
27843
  }
27686
- endIndex = rootChildRecord.index;
27687
27844
  }
27688
- var _loop_2 = function (i_1) {
27689
- if (!isNullOrUndefined(data_1[i_1])) {
27690
- data_1[i_1].index = i_1;
27691
- if (!isNullOrUndefined(data_1[i_1].parentItem)) {
27845
+ var _loop_4 = function (i_3) {
27846
+ if (!isNullOrUndefined(data_1[i_3])) {
27847
+ data_1[i_3].index = i_3;
27848
+ if (!isNullOrUndefined(data_1[i_3].parentItem)) {
27692
27849
  var updatedParent = data_1.filter(function (e) {
27693
- return e.uniqueID === data_1[i_1].parentUniqueID;
27850
+ return e.uniqueID === data_1[i_3].parentUniqueID;
27694
27851
  })[0];
27695
- data_1[i_1].parentItem.index = updatedParent.index;
27852
+ data_1[i_3].parentItem.index = updatedParent.index;
27696
27853
  }
27697
27854
  }
27698
27855
  };
27699
- for (var i_1 = startIndex; i_1 <= endIndex; i_1++) {
27700
- _loop_2(i_1);
27856
+ for (var i_3 = startIndex; i_3 <= endIndex; i_3++) {
27857
+ _loop_4(i_3);
27701
27858
  }
27702
27859
  }
27703
27860
  gObj.rowDragAndDropModule.refreshDataSource();