@syncfusion/ej2-gantt 23.1.41 → 23.1.42

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 (57) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/ej2-gantt.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +160 -123
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +160 -123
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +2 -2
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +10 -10
  13. package/src/gantt/actions/chart-scroll.js +6 -1
  14. package/src/gantt/actions/critical-path.js +1 -0
  15. package/src/gantt/actions/edit.js +5 -2
  16. package/src/gantt/actions/rowdragdrop.js +6 -6
  17. package/src/gantt/actions/taskbar-edit.d.ts +4 -1
  18. package/src/gantt/actions/taskbar-edit.js +65 -80
  19. package/src/gantt/base/gantt-chart.js +35 -18
  20. package/src/gantt/export/export-helper.js +11 -11
  21. package/src/gantt/renderer/chart-rows.js +26 -5
  22. package/src/gantt/renderer/connector-line.js +6 -1
  23. package/styles/bootstrap-dark.css +1 -1
  24. package/styles/bootstrap.css +1 -1
  25. package/styles/bootstrap4.css +1 -1
  26. package/styles/bootstrap5-dark.css +1 -1
  27. package/styles/bootstrap5.css +1 -1
  28. package/styles/fabric-dark.css +1 -1
  29. package/styles/fabric.css +1 -1
  30. package/styles/fluent-dark.css +1 -1
  31. package/styles/fluent.css +1 -1
  32. package/styles/gantt/_layout.scss +1 -1
  33. package/styles/gantt/bootstrap-dark.css +1 -1
  34. package/styles/gantt/bootstrap.css +1 -1
  35. package/styles/gantt/bootstrap4.css +1 -1
  36. package/styles/gantt/bootstrap5-dark.css +1 -1
  37. package/styles/gantt/bootstrap5.css +1 -1
  38. package/styles/gantt/fabric-dark.css +1 -1
  39. package/styles/gantt/fabric.css +1 -1
  40. package/styles/gantt/fluent-dark.css +1 -1
  41. package/styles/gantt/fluent.css +1 -1
  42. package/styles/gantt/highcontrast-light.css +1 -1
  43. package/styles/gantt/highcontrast.css +1 -1
  44. package/styles/gantt/material-dark.css +1 -1
  45. package/styles/gantt/material.css +1 -1
  46. package/styles/gantt/material3-dark.css +1 -1
  47. package/styles/gantt/material3.css +1 -1
  48. package/styles/gantt/tailwind-dark.css +1 -1
  49. package/styles/gantt/tailwind.css +1 -1
  50. package/styles/highcontrast-light.css +1 -1
  51. package/styles/highcontrast.css +1 -1
  52. package/styles/material-dark.css +1 -1
  53. package/styles/material.css +1 -1
  54. package/styles/material3-dark.css +1 -1
  55. package/styles/material3.css +1 -1
  56. package/styles/tailwind-dark.css +1 -1
  57. package/styles/tailwind.css +1 -1
@@ -4277,7 +4277,12 @@ class ChartScroll {
4277
4277
  for (let i = 0; i < parent.currentViewData.length; i++) {
4278
4278
  const tr = parent.chartRowsModule.ganttChartTableBody.childNodes[i];
4279
4279
  if (tr['style'].display !== 'none' && parent.currentViewData[i].hasChildRecords && !parent.currentViewData[i].expanded) {
4280
- parent.treeGrid.getRowByIndex(i)['style'].height = tr['style'].height;
4280
+ if (parent.ganttChartModule.isExpandAll || parent.ganttChartModule.isCollapseAll) {
4281
+ parent.treeGrid.getRowByIndex(i)['style'].height = tr['style'].height;
4282
+ }
4283
+ else {
4284
+ parent.treeGrid.getRows()[i]['style'].height = tr['style'].height;
4285
+ }
4281
4286
  }
4282
4287
  }
4283
4288
  parent.contentHeight = parent.enableRtl ? parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
@@ -4780,8 +4785,14 @@ class GanttChart {
4780
4785
  this.parent.notify('chartMouseDown', e);
4781
4786
  this.parent.element.tabIndex = 0;
4782
4787
  }
4783
- if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
4784
- this.parent.treeGrid.endEdit();
4788
+ let isTaskbarEdited = false;
4789
+ if (this.parent.editSettings.allowTaskbarEditing && this.parent.element.querySelector('.e-left-resize-gripper')) {
4790
+ isTaskbarEdited = true;
4791
+ }
4792
+ if (!isTaskbarEdited) {
4793
+ if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
4794
+ this.parent.treeGrid.endEdit();
4795
+ }
4785
4796
  }
4786
4797
  }
4787
4798
  ganttChartMouseClick(e) {
@@ -4791,6 +4802,22 @@ class GanttChart {
4791
4802
  this.parent.notify('chartMouseClick', e);
4792
4803
  }
4793
4804
  ganttChartMouseUp(e) {
4805
+ if (e.type === "touchend") {
4806
+ var resizeCheck = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-taskbar-resize-div');
4807
+ if (!isNullOrUndefined(resizeCheck)) {
4808
+ resizeCheck.remove();
4809
+ }
4810
+ var Check = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-clone-taskbar') || this.parent.chartPane.querySelector('.e-clone-taskbar');
4811
+ if (!isNullOrUndefined(Check)) {
4812
+ var clonetbody = Check.parentElement;
4813
+ var cloneTable = clonetbody.parentElement;
4814
+ cloneTable.remove();
4815
+ }
4816
+ var falseline = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-gantt-false-line');
4817
+ if (!isNullOrUndefined(falseline)) {
4818
+ this.parent.editModule.taskbarEditModule.removeFalseLine(true);
4819
+ }
4820
+ }
4794
4821
  if (this.parent.editSettings.allowTaskbarEditing) {
4795
4822
  this.parent.notify('chartMouseUp', e);
4796
4823
  }
@@ -4814,22 +4841,6 @@ class GanttChart {
4814
4841
  }
4815
4842
  }
4816
4843
  }
4817
- if (e.type === "touchend") {
4818
- var resizeCheck = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-taskbar-resize-div');
4819
- if (!isNullOrUndefined(resizeCheck)) {
4820
- resizeCheck.remove();
4821
- }
4822
- var Check = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-clone-taskbar');
4823
- if (!isNullOrUndefined(Check)) {
4824
- var clonetbody = Check.parentElement;
4825
- var cloneTable = clonetbody.parentElement;
4826
- cloneTable.remove();
4827
- }
4828
- var falseline = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-gantt-false-line');
4829
- if (!isNullOrUndefined(falseline)) {
4830
- this.parent.editModule.taskbarEditModule.removeFalseLine(true);
4831
- }
4832
- }
4833
4844
  }
4834
4845
  /**
4835
4846
  *
@@ -4883,6 +4894,9 @@ class GanttChart {
4883
4894
  if (!isNullOrUndefined(resizeCheck)) {
4884
4895
  resizeCheck.remove();
4885
4896
  }
4897
+ if (this.parent.allowTaskbarDragAndDrop && this.parent.editModule && this.parent.editModule.taskbarEditModule) {
4898
+ this.parent.editModule.taskbarEditModule['previousLeftValue'] = 0;
4899
+ }
4886
4900
  if (this.parent.allowRowDragAndDrop) {
4887
4901
  const ganttDragElemet = this.parent.element.querySelector('.e-ganttdrag');
4888
4902
  if (ganttDragElemet) {
@@ -5029,6 +5043,14 @@ class GanttChart {
5029
5043
  if (this.parent.allowFiltering && this.parent.filterModule) {
5030
5044
  this.parent.filterModule.closeFilterOnContextClick(e.srcElement);
5031
5045
  }
5046
+ if (this.parent.allowTaskbarDragAndDrop) {
5047
+ let Check = this.parent.chartPane.querySelector('.e-clone-taskbar');
5048
+ if (!isNullOrUndefined(Check)) {
5049
+ let clonetbody = Check.parentElement;
5050
+ let cloneTable = clonetbody.parentElement;
5051
+ cloneTable.remove();
5052
+ }
5053
+ }
5032
5054
  }
5033
5055
  /**
5034
5056
  * Method to trigger while perform mouse move on Gantt.
@@ -10828,7 +10850,12 @@ class ChartRows extends DateProcessor {
10828
10850
  if (!tr) {
10829
10851
  tr = this.ganttChartTableBody.childNodes[rowIndex];
10830
10852
  }
10831
- tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = this.parent.rowHeight + 'px';
10853
+ if (this.parent.ganttChartModule.isExpandAll || this.parent.ganttChartModule.isCollapseAll) {
10854
+ tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = this.parent.rowHeight + 'px';
10855
+ }
10856
+ else {
10857
+ tr['style'].height = this.parent.treeGrid.getRows()[rowIndex]['style'].height = this.parent.rowHeight + 'px';
10858
+ }
10832
10859
  this.parent.contentHeight = treeGridContentHeight;
10833
10860
  let rowIDs = [];
10834
10861
  let rowCounts = 0;
@@ -10845,7 +10872,12 @@ class ChartRows extends DateProcessor {
10845
10872
  rowCounts++;
10846
10873
  tr.children[0]['style'].verticalAlign = 'baseline';
10847
10874
  tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop = (rowCounts * this.parent.rowHeight) + this.taskBarMarginTop + 'px';
10848
- tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = parseInt(tr['style'].height) + this.parent.rowHeight + 'px';
10875
+ if (this.parent.ganttChartModule.isExpandAll || this.parent.ganttChartModule.isCollapseAll) {
10876
+ tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = parseInt(tr['style'].height) + this.parent.rowHeight + 'px';
10877
+ }
10878
+ else {
10879
+ tr['style'].height = this.parent.treeGrid.getRows()[rowIndex]['style'].height = parseInt(tr['style'].height) + this.parent.rowHeight + 'px';
10880
+ }
10849
10881
  }
10850
10882
  }
10851
10883
  else {
@@ -10878,7 +10910,12 @@ class ChartRows extends DateProcessor {
10878
10910
  if (index !== -1 && selectedItem) {
10879
10911
  const data = selectedItem;
10880
10912
  if (!this.parent.allowTaskbarOverlap && this.parent.viewType === 'ResourceView' && data.expanded) {
10881
- tr['style'].height = this.parent.treeGrid.getRowByIndex(index)['style'].height = this.parent.rowHeight + 'px';
10913
+ if (this.parent.ganttChartModule.isExpandAll || this.parent.ganttChartModule.isCollapseAll) {
10914
+ tr['style'].height = this.parent.treeGrid.getRowByIndex(index)['style'].height = this.parent.rowHeight + 'px';
10915
+ }
10916
+ else {
10917
+ tr['style'].height = this.parent.treeGrid.getRows()[index]['style'].height = this.parent.rowHeight + 'px';
10918
+ }
10882
10919
  }
10883
10920
  if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar) {
10884
10921
  tr.replaceChild(this.getResourceParent(data).childNodes[0], tr.childNodes[0]);
@@ -10939,8 +10976,14 @@ class ChartRows extends DateProcessor {
10939
10976
  addClass([cloneElement], 'collpse-parent-border');
10940
10977
  const id = tRow.querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
10941
10978
  const ganttData = this.parent.getRecordByID(id);
10942
- const mainTaskbar = (cloneElement.querySelector('.e-gantt-child-taskbar'));
10943
- if (this.parent.queryTaskbarInfo) {
10979
+ if (!(isNullOrUndefined(ganttData)) && ganttData.ganttProperties.segments && ganttData.ganttProperties.segments.length > 0) {
10980
+ const segmentedTasks = cloneElement.getElementsByClassName('e-segmented-taskbar');
10981
+ for (var i = 0; i < segmentedTasks.length; i++) {
10982
+ this.triggerQueryTaskbarInfoByIndex(segmentedTasks[i], ganttData);
10983
+ }
10984
+ }
10985
+ else if (this.parent.queryTaskbarInfo) {
10986
+ const mainTaskbar = (cloneElement.querySelector('.e-gantt-child-taskbar'));
10944
10987
  this.triggerQueryTaskbarInfoByIndex(mainTaskbar, ganttData);
10945
10988
  }
10946
10989
  let zIndex = "";
@@ -12459,7 +12502,9 @@ class ConnectorLine {
12459
12502
  }
12460
12503
  }
12461
12504
  }
12462
- heightValue = Math.abs(parentOverlapTopValue - childOverlapTopValue);
12505
+ if (!this.parent.enableVirtualization) {
12506
+ heightValue = Math.abs(parentOverlapTopValue - childOverlapTopValue);
12507
+ }
12463
12508
  }
12464
12509
  if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex] && this.parent.allowParentDependency) {
12465
12510
  let fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
@@ -12550,6 +12595,9 @@ class ConnectorLine {
12550
12595
  d: this.arrowPath,
12551
12596
  class: connectorLineArrow
12552
12597
  });
12598
+ let outlineColor = (this.lineColor) && !(this.parent.enableCriticalPath) ? this.lineColor : '';
12599
+ this.connectorPath.setAttribute('style', `stroke: ${outlineColor}`);
12600
+ this.arrowlinePath.setAttribute('style', `fill: ${outlineColor}`);
12553
12601
  // Append the path element to the group element
12554
12602
  this.groupObject.appendChild(this.connectorPath);
12555
12603
  this.groupObject.appendChild(this.arrowlinePath);
@@ -18628,6 +18676,8 @@ class EditTooltip {
18628
18676
  class TaskbarEdit extends DateProcessor {
18629
18677
  constructor(ganttObj) {
18630
18678
  super(ganttObj);
18679
+ this.leftValue = 0;
18680
+ this.previousLeftValue = 0;
18631
18681
  this.isMouseDragged = false;
18632
18682
  this.dependencyCancel = false;
18633
18683
  this.editElement = null;
@@ -18639,7 +18689,7 @@ class TaskbarEdit extends DateProcessor {
18639
18689
  this.currentItemTop = 0;
18640
18690
  this.currentItemPrevTop = 0;
18641
18691
  this.topValue = 0;
18642
- this.draggedRecordMarginTop = 0;
18692
+ this.draggedRecordMarginTop = '0px';
18643
18693
  this.parent = ganttObj;
18644
18694
  this.initPublicProp();
18645
18695
  this.wireEvents();
@@ -19109,17 +19159,6 @@ class TaskbarEdit extends DateProcessor {
19109
19159
  this.mouseDownY = this.dragMoveY = e.pageY - containerPosition.top +
19110
19160
  this.parent.ganttChartModule.scrollObject.previousScroll.top;
19111
19161
  }
19112
- if (this.parent.viewType == "ResourceView" && this.parent.allowTaskbarDragAndDrop) {
19113
- let toolbarHeight = 0;
19114
- if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
19115
- toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
19116
- }
19117
- this.topValue = this.parent.getOffsetRect(event.target).top - this.parent.getOffsetRect(this.parent.element).top -
19118
- parseInt((closest(event.target, '.e-taskbar-main-container'))['style'].marginTop) -
19119
- this.parent.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'] -
19120
- toolbarHeight + document.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollTop;
19121
- this.currentItemPrevTop = this.currentItemTop = this.topValue;
19122
- }
19123
19162
  if (this.taskBarEditAction === 'ConnectorPointLeftDrag' || this.taskBarEditAction === 'ConnectorPointRightDrag') {
19124
19163
  this.fromPredecessorText = this.taskBarEditAction === 'ConnectorPointLeftDrag' ? 'start' : 'finish';
19125
19164
  this.parent.connectorLineModule.tooltipTable.innerHTML = this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.taskBarEditRecord.ganttProperties.taskName, this.fromPredecessorText, '', '');
@@ -19182,7 +19221,12 @@ class TaskbarEdit extends DateProcessor {
19182
19221
  currentElement.parentElement.appendChild(this.taskbarElement);
19183
19222
  }
19184
19223
  else {
19185
- currentElement.appendChild(this.taskbarElement);
19224
+ if (this.parent.allowTaskbarDragAndDrop && this.taskBarEditAction !== 'LeftResizing' && this.taskBarEditAction !== 'RightResizing' && this.taskBarEditAction !== 'ProgressResizing') {
19225
+ this.parent.chartPane.getElementsByClassName('e-gantt-chart')[0].appendChild(this.taskbarElement);
19226
+ }
19227
+ else {
19228
+ currentElement.appendChild(this.taskbarElement);
19229
+ }
19186
19230
  }
19187
19231
  if (this.taskBarEditAction !== 'ProgressResizing') {
19188
19232
  const rootElement = this.parent.ganttChartModule.chartBodyContainer.querySelectorAll(".e-chart-rows-container");
@@ -19264,26 +19308,40 @@ class TaskbarEdit extends DateProcessor {
19264
19308
  this.triggerDependencyEvent(e);
19265
19309
  this.drawFalseLine();
19266
19310
  }
19267
- if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
19268
- if (this.dragMoveY > this.mouseMoveY) {
19269
- this.mouseMoveY = this.dragMoveY - this.mouseMoveY;
19270
- this.currentItemTop = this.currentItemTop - this.mouseMoveY;
19271
- }
19272
- else {
19273
- this.mouseMoveY -= this.dragMoveY;
19274
- this.currentItemTop = this.currentItemTop + this.mouseMoveY;
19275
- }
19276
- const containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
19277
- if (this.parent.isAdaptive || e.touches) {
19278
- this.dragMoveY = e.touches[0].pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
19311
+ if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.taskBarEditAction !== 'LeftResizing' && this.taskBarEditAction !== 'RightResizing' && this.taskBarEditAction !== 'ProgressResizing') {
19312
+ let parentClientRect = this.parent.getOffsetRect(this.parent.chartPane);
19313
+ let coordinates = this.getCoordinate(e);
19314
+ let position = { top: coordinates.pageY, left: coordinates.pageX };
19315
+ let pos = { left: Math.abs(position.left - parentClientRect.left), top: position.top - parentClientRect.top };
19316
+ let parentRecord = this.parent.getRecordByID(this.taskBarEditRecord.parentItem.taskId);
19317
+ if (!this.parent.allowTaskbarOverlap && this.taskBarEditRecord.parentItem && !parentRecord.expanded) {
19318
+ let reduceHeight = 0;
19319
+ if (parseInt(this.editElement['style'].marginTop) > this.parent.rowHeight) {
19320
+ for (let i = 0; i < parentRecord.childRecords.length; i++) {
19321
+ if (parentRecord.childRecords[i].ganttProperties.taskId !== this.taskBarEditRecord.ganttProperties.taskId) {
19322
+ reduceHeight = reduceHeight + this.parent.rowHeight;
19323
+ }
19324
+ else {
19325
+ break;
19326
+ }
19327
+ }
19328
+ pos.top = pos.top - reduceHeight;
19329
+ }
19279
19330
  }
19280
- else {
19281
- this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
19331
+ this.topValue = pos.top;
19332
+ this.leftValue = pos.left - (e.pageX - this.parent.getOffsetRect(this.taskBarEditElement).left) + (this.previousLeftValue !== 0 ? e.pageX - this.previousLeftValue : 0);
19333
+ if (this.previousLeftValue == 0) {
19334
+ if (!this.parent.enableRtl) {
19335
+ this.leftValue = this.leftValue - this.parent.ganttChartModule.scrollObject.previousScroll.left + 4;
19336
+ }
19337
+ else {
19338
+ this.leftValue = this.leftValue + Math.abs(this.parent.ganttChartModule.scrollObject.previousScroll.left) + 4;
19339
+ }
19282
19340
  }
19283
- this.topValue = this.currentItemTop;
19284
- this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
19285
- this.topValue == this.currentItemTop) ? this.topValue :
19286
- this.currentItemPrevTop;
19341
+ this.previousLeftValue = e.pageX;
19342
+ }
19343
+ else {
19344
+ this.leftValue = this.taskBarEditRecord.ganttProperties.left;
19287
19345
  }
19288
19346
  this.setItemPosition();
19289
19347
  this.updateEditedItem();
@@ -20171,7 +20229,7 @@ class TaskbarEdit extends DateProcessor {
20171
20229
  }
20172
20230
  }
20173
20231
  }
20174
- taskBarMainContainer$$1.style.setProperty(position, (item.left) + 'px');
20232
+ taskBarMainContainer$$1.style.setProperty(position, (this.parent.allowTaskbarDragAndDrop ? this.leftValue : (item.left)) + 'px');
20175
20233
  taskBarMainContainer$$1.style.width = (width) + 'px';
20176
20234
  if (segmentedTaskBarContainer && segmentConnectorPointRight) {
20177
20235
  segmentConnectorPointRight.style.left = (this.parent.isAdaptive ? (width + 10) : (width + 2)) + 'px';
@@ -20191,7 +20249,7 @@ class TaskbarEdit extends DateProcessor {
20191
20249
  segmentElement.style.width = (segment.width) + 'px';
20192
20250
  if (i === 0) {
20193
20251
  resizeLine.style.width = (segment.width) + "px";
20194
- resizeLine.style.left = (segment.left + item.left) + "px";
20252
+ resizeLine.style.setProperty(position, (segment.left + item.left) + 'px');
20195
20253
  }
20196
20254
  if (this.parent.enableRtl) {
20197
20255
  segmentElement.style.right = (segment.left) + 'px';
@@ -20203,7 +20261,7 @@ class TaskbarEdit extends DateProcessor {
20203
20261
  }
20204
20262
  if (this.taskBarEditAction === 'ChildDrag' && this.segmentIndex === 0) {
20205
20263
  resizeLine.style.width = (width) + "px";
20206
- resizeLine.style.left = (item.left) + "px";
20264
+ resizeLine.style.setProperty(position, item.left + 'px');
20207
20265
  taskBarMainContainer$$1.style.setProperty("opacity", '.75');
20208
20266
  }
20209
20267
  }
@@ -20217,7 +20275,7 @@ class TaskbarEdit extends DateProcessor {
20217
20275
  }
20218
20276
  if (this.taskBarEditAction === 'MilestoneDrag' || item.isMilestone) {
20219
20277
  taskBarMainContainer$$1.style.setProperty(position, (item.left - (width / 2)) + 'px');
20220
- resizeLine.style.left = (item.left - (width / 2)) + 'px';
20278
+ resizeLine.style.setProperty(position, (item.left - (width / 2)) + 'px');
20221
20279
  resizeLine.style.width = (width) + "px";
20222
20280
  }
20223
20281
  else if (this.taskBarEditAction === 'ProgressResizing') {
@@ -20252,7 +20310,7 @@ class TaskbarEdit extends DateProcessor {
20252
20310
  }
20253
20311
  }
20254
20312
  else if (this.taskBarEditAction === 'ParentDrag') {
20255
- resizeLine.style.left = (item.left) + 'px';
20313
+ resizeLine.style.setProperty(position, item.left + 'px');
20256
20314
  resizeLine.style.width = (width) + "px";
20257
20315
  resizeLine.style.width = (item.width) + 'px';
20258
20316
  if (!isNullOrUndefined(traceParentTaskBar$$1)) {
@@ -20265,13 +20323,13 @@ class TaskbarEdit extends DateProcessor {
20265
20323
  }
20266
20324
  else if (this.taskBarEditAction === 'ParentResizing') {
20267
20325
  resizeLine.style.width = (item.width) + 'px';
20268
- resizeLine.style.left = item.left + 'px';
20326
+ resizeLine.style.setProperty(position, item.left + 'px');
20269
20327
  manualParentTaskbar.style.width = manualTaskbar.style.width = (item.width) + 'px';
20270
20328
  manualParentRight.style.setProperty(position, item.width - manualParentLeft.offsetLeft + 'px');
20271
20329
  }
20272
20330
  else if (this.taskBarEditAction === 'ManualParentDrag') {
20273
20331
  resizeLine.style.width = (item.width) + 'px';
20274
- resizeLine.style.left = item.left + 'px';
20332
+ resizeLine.style.setProperty(position, item.left + 'px');
20275
20333
  manualParentTaskbar.style.setProperty(position, item.left - item.autoLeft + 'px');
20276
20334
  }
20277
20335
  else {
@@ -20279,8 +20337,8 @@ class TaskbarEdit extends DateProcessor {
20279
20337
  traceChildTaskBar$$1.style.width = (item.width) + 'px';
20280
20338
  traceChildTaskBar$$1.style.left = (item.left) + 'px';
20281
20339
  this.taskBarEditElement.style.width = (item.width) + 'px';
20282
- this.taskBarEditElement.style.left = (item.left) + "px";
20283
- resizeLine.style.left = (item.left) + 'px';
20340
+ this.taskBarEditElement.style.left = ((this.parent.allowTaskbarDragAndDrop ? this.leftValue : (item.left))) + "px";
20341
+ resizeLine.style.setProperty(position, item.left + 'px');
20284
20342
  resizeLine.style.width = (item.width) + "px";
20285
20343
  }
20286
20344
  if (!isNullOrUndefined(traceChildProgressBar$$1)) {
@@ -20314,6 +20372,13 @@ class TaskbarEdit extends DateProcessor {
20314
20372
  if (this.taskBarEditAction && this.isMouseDragged) {
20315
20373
  if ((!this.dragMouseLeave && this.taskBarEditedAction) || (this.parent.viewType === 'ResourceView' &&
20316
20374
  this.parent.allowTaskbarDragAndDrop)) {
20375
+ if (e.type === 'touchmove' || e.type === 'touchstart' || e.type === 'touchend') {
20376
+ let coordinates = this.getCoordinate(e);
20377
+ this['droppedTarget'] = document.elementFromPoint(coordinates.pageX, coordinates.pageY);
20378
+ }
20379
+ else {
20380
+ this['droppedTarget'] = document.elementFromPoint(e.x, e.y);
20381
+ }
20317
20382
  this.taskBarEditedAction(e);
20318
20383
  this.isMouseDragged = false;
20319
20384
  }
@@ -20424,7 +20489,7 @@ class TaskbarEdit extends DateProcessor {
20424
20489
  const args = extend({}, arg);
20425
20490
  const ganttRecord = args.data;
20426
20491
  const taskData = ganttRecord.ganttProperties;
20427
- const draggedRecIndex = this.parent.currentViewData.indexOf(ganttRecord);
20492
+ const draggedRecIndex = this.parent.flatData.indexOf(ganttRecord);
20428
20493
  if ((args.taskBarEditAction === 'MilestoneDrag' || args.taskBarEditAction === 'ChildDrag') && this.parent.viewType === "ResourceView"
20429
20494
  && this.parent.allowTaskbarDragAndDrop && this.dragMoveY > 0) {
20430
20495
  if (this.parent.rowDragAndDropModule) {
@@ -20432,45 +20497,13 @@ class TaskbarEdit extends DateProcessor {
20432
20497
  if (flatRecordCol[this.taskBarEditRecord.parentItem.index] && ((this.parent.editedRecords.indexOf(flatRecordCol[this.taskBarEditRecord.parentItem.index]) === -1))) {
20433
20498
  this.parent.editedRecords.push(flatRecordCol[this.taskBarEditRecord.parentItem.index]);
20434
20499
  }
20435
- let ganttrec;
20436
- let resHeight = 0;
20437
- let rowCount = 0;
20438
- let childIndex;
20439
- let droppedRecord;
20440
- let treeGridrows = this.parent.treeGrid.getRows().length;
20441
- for (let i = 0; i < treeGridrows; i++) {
20442
- if (resHeight < this.dragMoveY && this.parent.getRowByIndex(i).style.display !== 'none') {
20443
- rowCount = i;
20444
- resHeight = resHeight + parseInt(this.parent.getRowByIndex(i).style.height);
20445
- if (!flatRecordCol[i].parentItem) {
20446
- ganttrec = flatRecordCol[i];
20447
- }
20448
- else {
20449
- ganttrec = this.parent.getRecordByID(flatRecordCol[i].parentItem.taskId);
20450
- }
20451
- }
20452
- }
20453
- let draggedRecordtaskbar = this.parent.getRowByIndex(draggedRecIndex).getElementsByClassName('e-taskbar-main-container');
20454
- let taskbarContainer = this.parent.getRowByIndex(rowCount).getElementsByClassName('e-taskbar-main-container');
20455
- for (let j = 0; j < taskbarContainer.length; j++) {
20456
- if (taskbarContainer[j]['offsetTop'] < this.dragMoveY && draggedRecordtaskbar[0].getAttribute('rowuniqueid') !==
20457
- taskbarContainer[j].getAttribute('rowuniqueid')) {
20458
- this.draggedRecordMarginTop = taskbarContainer[j]['style'].marginTop;
20459
- childIndex = taskbarContainer[j].getAttribute('rowuniqueid');
20460
- }
20461
- }
20462
- if (childIndex) {
20463
- droppedRecord = this.parent.currentViewData.filter((data) => {
20464
- if (data['rowUniqueID'] === childIndex) {
20465
- return data;
20466
- }
20467
- else {
20468
- return null;
20469
- }
20470
- });
20471
- }
20472
- if (droppedRecord) {
20473
- const droppedRecordIndex = this.parent.currentViewData.indexOf(droppedRecord[0]);
20500
+ let droppedRecord = [];
20501
+ this.draggedRecordMarginTop = this.taskBarEditElement.style.marginTop;
20502
+ let row = closest(this.droppedTarget, 'tr.' + chartRow);
20503
+ let recordIndex = parseInt(row.getAttribute('aria-rowindex'));
20504
+ droppedRecord.push(this.parent.flatData[recordIndex]);
20505
+ if (droppedRecord.length > 0) {
20506
+ const droppedRecordIndex = this.parent.flatData.indexOf(droppedRecord[0]);
20474
20507
  let position = (droppedRecord[0].hasChildRecords || (!droppedRecord[0].parentItem &&
20475
20508
  droppedRecord[0].childRecords.length == 0)) ? 'child' : 'below';
20476
20509
  if (this.parent.rowDragAndDropModule) {
@@ -25497,7 +25530,7 @@ class Edit$2 {
25497
25530
  this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['endDate'] = rec[this.parent.taskFields.endDate];
25498
25531
  }
25499
25532
  if (this.parent.taskFields.duration !== null) {
25500
- this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['duration'] = parseInt(rec[this.parent.taskFields.duration]);
25533
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['duration'] = parseFloat(rec[this.parent.taskFields.duration]);
25501
25534
  }
25502
25535
  if (this.parent.taskFields.durationUnit !== null) {
25503
25536
  this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['durationUnit'] = rec[this.parent.taskFields.durationUnit];
@@ -25586,6 +25619,9 @@ class Edit$2 {
25586
25619
  this.parent.editModule.dialogModule.previousResource = [];
25587
25620
  }
25588
25621
  if (!this.isTreeGridRefresh) {
25622
+ if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
25623
+ this.parent.treeGrid.endEdit();
25624
+ }
25589
25625
  this.parent.chartRowsModule.refreshRecords(this.parent.editedRecords);
25590
25626
  if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && this.parent.showOverAllocation) {
25591
25627
  this.parent.contentHeight = this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
@@ -27109,7 +27145,7 @@ class Edit$2 {
27109
27145
  args.data.ganttProperties['endDate'] = serverReturnedValue[this.parent.taskFields.endDate];
27110
27146
  }
27111
27147
  if (this.parent.taskFields.duration !== null) {
27112
- args.data.ganttProperties['duration'] = parseInt(serverReturnedValue[this.parent.taskFields.duration]);
27148
+ args.data.ganttProperties['duration'] = parseFloat(serverReturnedValue[this.parent.taskFields.duration]);
27113
27149
  }
27114
27150
  if (this.parent.taskFields.durationUnit !== null) {
27115
27151
  args.data.ganttProperties['durationUnit'] = serverReturnedValue[this.parent.taskFields.durationUnit];
@@ -30771,6 +30807,7 @@ class CriticalPath {
30771
30807
  fromRecord.isCritical = record.ganttProperties.isCritical;
30772
30808
  fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
30773
30809
  if (criticalPathIds.indexOf(fromRecord.ganttProperties.taskId) === -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
30810
+ criticalPathIds.push(fromRecord.ganttProperties.taskId);
30774
30811
  this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
30775
30812
  if (this.criticalTasks.indexOf(fromRecord) === -1) {
30776
30813
  this.criticalTasks.push(fromRecord);
@@ -32306,12 +32343,12 @@ class RowDD$1 {
32306
32343
  deleteSharedResourceTask() {
32307
32344
  for (let i = 0; i < this.parent.getTaskIds().length; i++) {
32308
32345
  if (this.parent.getTaskIds()[i] === 'T' + this.draggedRecord.ganttProperties.taskId) {
32309
- if (this.parent.getTaskByUniqueID(this.parent.currentViewData[i].parentItem.uniqueID).ganttProperties.taskName !== 'Unassigned Task') {
32310
- this.removeRecords(this.parent.currentViewData[i]);
32346
+ if (this.parent.getTaskByUniqueID(this.parent.flatData[i].parentItem.uniqueID).ganttProperties.taskName !== 'Unassigned Task') {
32347
+ this.removeRecords(this.parent.flatData[i]);
32311
32348
  }
32312
32349
  /* eslint-disable-next-line */
32313
- if (!isNullOrUndefined(this.parent.currentViewData[i].parentItem && this.updateParentRecords.indexOf(this.parent.currentViewData[i].parentItem) !== -1)) {
32314
- this.updateParentRecords.push(this.parent.currentViewData[i].parentItem);
32350
+ if (!isNullOrUndefined(this.parent.flatData[i].parentItem && this.updateParentRecords.indexOf(this.parent.flatData[i].parentItem) !== -1)) {
32351
+ this.updateParentRecords.push(this.parent.flatData[i].parentItem);
32315
32352
  }
32316
32353
  }
32317
32354
  }
@@ -32335,7 +32372,7 @@ class RowDD$1 {
32335
32372
  this.parent.editModule.updateGanttProperties(this.draggedRecord, this.parent.flatData[i]);
32336
32373
  this.parent.dataOperation.updateTaskData(this.parent.flatData[i]);
32337
32374
  /* eslint-disable-next-line */
32338
- if (!isNullOrUndefined(this.parent.flatData[i].parentItem && this.updateParentRecords.indexOf(this.parent.currentViewData[i].parentItem) !== -1)) {
32375
+ if (!isNullOrUndefined(this.parent.flatData[i].parentItem && this.updateParentRecords.indexOf(this.parent.flatData[i].parentItem) !== -1)) {
32339
32376
  this.updateParentRecords.push(this.parent.flatData[i].parentItem);
32340
32377
  }
32341
32378
  }
@@ -32766,7 +32803,7 @@ class RowDD$1 {
32766
32803
  }
32767
32804
  const data = [];
32768
32805
  for (let i = 0; i < fromIndexes.length; i++) {
32769
- data[i] = this.parent.updatedRecords[fromIndexes[i]];
32806
+ data[i] = this.parent.flatData[fromIndexes[i]];
32770
32807
  }
32771
32808
  const isByMethod = true;
32772
32809
  const args = {
@@ -35124,10 +35161,10 @@ class ExportHelper {
35124
35161
  this.parent.predecessorModule.createConnectorLinesCollection();
35125
35162
  this.parent.updatedConnectorLineCollection.forEach((data) => {
35126
35163
  const predecessor = this.gantt.predecessor.add();
35127
- predecessor.parentLeft = data.parentLeft;
35128
- predecessor.childLeft = data.childLeft;
35129
- predecessor.parentWidth = data.parentWidth;
35130
- predecessor.childWidth = data.childWidth;
35164
+ predecessor.parentLeft = pointToPixel(data.parentLeft);
35165
+ predecessor.childLeft = pointToPixel(data.childLeft);
35166
+ predecessor.parentWidth = pointToPixel(data.parentWidth);
35167
+ predecessor.childWidth = pointToPixel(data.childWidth);
35131
35168
  predecessor.parentIndex = data.parentIndex;
35132
35169
  predecessor.childIndex = data.childIndex;
35133
35170
  predecessor.rowHeight = data.rowHeight;
@@ -35210,8 +35247,8 @@ class ExportHelper {
35210
35247
  flatData.forEach((data) => {
35211
35248
  const taskbar = this.gantt.taskbar.add();
35212
35249
  const ganttProp = data.ganttProperties;
35213
- taskbar.left = ganttProp.left;
35214
- taskbar.width = ganttProp.width;
35250
+ taskbar.left = pointToPixel(ganttProp.left);
35251
+ taskbar.width = pointToPixel(ganttProp.width);
35215
35252
  if (taskbar.left < 0) {
35216
35253
  taskbar.width = taskbar.width + taskbar.left;
35217
35254
  taskbar.left = 0;
@@ -35252,8 +35289,8 @@ class ExportHelper {
35252
35289
  taskbar.isMilestone = ganttProp.isMilestone;
35253
35290
  taskbar.baselineStartDate = ganttProp.baselineStartDate;
35254
35291
  taskbar.baselineEndDate = ganttProp.baselineEndDate;
35255
- taskbar.baselineLeft = ganttProp.baselineLeft;
35256
- taskbar.baselineWidth = ganttProp.baselineWidth;
35292
+ taskbar.baselineLeft = pointToPixel(ganttProp.baselineLeft);
35293
+ taskbar.baselineWidth = pointToPixel(ganttProp.baselineWidth);
35257
35294
  taskbar.milestoneColor = new PdfColor(this.ganttStyle.taskbar.milestoneColor);
35258
35295
  taskbar.isParentTask = data.hasChildRecords;
35259
35296
  if (ganttProp.isMilestone) {
@@ -35269,9 +35306,9 @@ class ExportHelper {
35269
35306
  taskbar.taskLabel = data[this.parent.labelSettings.taskLabel].toString();
35270
35307
  }
35271
35308
  const reduceLeft = ganttProp.isMilestone ? Math.floor(this.parent.chartRowsModule.taskBarHeight / 2) + 33 : 33; // 33 indicates default timeline cell width
35272
- taskbar.rightTaskLabel.left = ganttProp.left + ganttProp.width + reduceLeft; // right label left value
35309
+ taskbar.rightTaskLabel.left = pointToPixel(ganttProp.left) + pointToPixel(ganttProp.width) + reduceLeft; // right label left value
35273
35310
  taskbar.fontFamily = this.ganttStyle.fontFamily;
35274
- taskbar.progressWidth = ganttProp.progressWidth;
35311
+ taskbar.progressWidth = pointToPixel(ganttProp.progressWidth);
35275
35312
  taskbar.labelColor = new PdfColor(this.ganttStyle.label.fontColor);
35276
35313
  taskbar.progressFontColor = new PdfColor(this.ganttStyle.taskbar.progressFontColor);
35277
35314
  if (taskbar.isParentTask) {