@syncfusion/ej2-gantt 20.2.50 → 20.3.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/ej2-gantt.min.js +10 -0
  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 +940 -338
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +970 -357
  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 +19 -19
  13. package/src/gantt/actions/cell-edit.js +1 -2
  14. package/src/gantt/actions/connector-line-edit.d.ts +2 -0
  15. package/src/gantt/actions/connector-line-edit.js +104 -10
  16. package/src/gantt/actions/context-menu.js +6 -1
  17. package/src/gantt/actions/critical-path.d.ts +1 -1
  18. package/src/gantt/actions/critical-path.js +105 -30
  19. package/src/gantt/actions/dependency.d.ts +2 -0
  20. package/src/gantt/actions/dependency.js +68 -12
  21. package/src/gantt/actions/dialog-edit.d.ts +3 -0
  22. package/src/gantt/actions/dialog-edit.js +116 -14
  23. package/src/gantt/actions/edit.js +69 -10
  24. package/src/gantt/actions/filter.d.ts +3 -0
  25. package/src/gantt/actions/filter.js +30 -6
  26. package/src/gantt/actions/keyboard.js +1 -1
  27. package/src/gantt/actions/rowdragdrop.js +68 -8
  28. package/src/gantt/actions/taskbar-edit.js +15 -3
  29. package/src/gantt/base/enum.d.ts +3 -1
  30. package/src/gantt/base/gantt-chart.js +8 -6
  31. package/src/gantt/base/gantt.d.ts +6 -6
  32. package/src/gantt/base/gantt.js +10 -3
  33. package/src/gantt/base/interface.d.ts +4 -0
  34. package/src/gantt/base/splitter.d.ts +2 -2
  35. package/src/gantt/base/splitter.js +6 -7
  36. package/src/gantt/base/task-processor.js +13 -7
  37. package/src/gantt/base/tree-grid.js +21 -2
  38. package/src/gantt/export/pdf-connector-line.js +187 -185
  39. package/src/gantt/models/edit-settings-model.d.ts +2 -2
  40. package/src/gantt/models/edit-settings.d.ts +2 -2
  41. package/src/gantt/models/filter-settings-model.d.ts +1 -1
  42. package/src/gantt/models/filter-settings.d.ts +1 -1
  43. package/src/gantt/renderer/chart-rows.d.ts +1 -0
  44. package/src/gantt/renderer/chart-rows.js +47 -16
  45. package/src/gantt/renderer/connector-line.js +101 -33
  46. package/src/gantt/renderer/event-marker.js +1 -1
  47. package/src/gantt/renderer/nonworking-day.js +0 -1
  48. package/src/gantt/renderer/tooltip.js +2 -1
  49. package/styles/bootstrap-dark.css +115 -62
  50. package/styles/bootstrap.css +115 -62
  51. package/styles/bootstrap4.css +115 -62
  52. package/styles/bootstrap5-dark.css +119 -63
  53. package/styles/bootstrap5.css +119 -63
  54. package/styles/fabric-dark.css +115 -62
  55. package/styles/fabric.css +115 -62
  56. package/styles/fluent-dark.css +126 -66
  57. package/styles/fluent.css +124 -64
  58. package/styles/gantt/_all.scss +1 -1
  59. package/styles/gantt/_bootstrap-dark-definition.scss +4 -1
  60. package/styles/gantt/_bootstrap-definition.scss +4 -1
  61. package/styles/gantt/_bootstrap4-definition.scss +4 -1
  62. package/styles/gantt/_bootstrap5-definition.scss +4 -2
  63. package/styles/gantt/_fabric-dark-definition.scss +4 -1
  64. package/styles/gantt/_fabric-definition.scss +4 -1
  65. package/styles/gantt/_fluent-definition.scss +6 -4
  66. package/styles/gantt/_fusionnew-definition.scss +12 -10
  67. package/styles/gantt/_highcontrast-definition.scss +4 -1
  68. package/styles/gantt/_highcontrast-light-definition.scss +4 -1
  69. package/styles/gantt/_layout.scss +143 -51
  70. package/styles/gantt/_material-dark-definition.scss +4 -1
  71. package/styles/gantt/_material-definition.scss +4 -1
  72. package/styles/gantt/_material3-definition.scss +13 -11
  73. package/styles/gantt/_tailwind-definition.scss +4 -2
  74. package/styles/gantt/_theme.scss +29 -29
  75. package/styles/gantt/bootstrap-dark.css +115 -62
  76. package/styles/gantt/bootstrap.css +115 -62
  77. package/styles/gantt/bootstrap4.css +115 -62
  78. package/styles/gantt/bootstrap5-dark.css +119 -63
  79. package/styles/gantt/bootstrap5.css +119 -63
  80. package/styles/gantt/fabric-dark.css +115 -62
  81. package/styles/gantt/fabric.css +115 -62
  82. package/styles/gantt/fluent-dark.css +126 -66
  83. package/styles/gantt/fluent.css +124 -64
  84. package/styles/gantt/highcontrast-light.css +120 -62
  85. package/styles/gantt/highcontrast.css +120 -62
  86. package/styles/gantt/material-dark.css +120 -65
  87. package/styles/gantt/material.css +118 -65
  88. package/styles/gantt/tailwind-dark.css +117 -64
  89. package/styles/gantt/tailwind.css +117 -64
  90. package/styles/highcontrast-light.css +120 -62
  91. package/styles/highcontrast.css +120 -62
  92. package/styles/material-dark.css +120 -65
  93. package/styles/material.css +118 -65
  94. package/styles/tailwind-dark.css +117 -64
  95. package/styles/tailwind.css +117 -64
@@ -6,7 +6,7 @@ import { ColumnMenu, ContextMenu, Edit as Edit$1, ExcelExport, Filter, Reorder,
6
6
  import { Splitter } from '@syncfusion/ej2-layouts';
7
7
  import { ContextMenu as ContextMenu$1, Tab, Toolbar as Toolbar$1 } from '@syncfusion/ej2-navigations';
8
8
  import { Count, HtmlEditor, Link, QuickToolbar, RichTextEditor, Toolbar as Toolbar$2 } from '@syncfusion/ej2-richtexteditor';
9
- import { MaskedTextBox, NumericTextBox, TextBox } from '@syncfusion/ej2-inputs';
9
+ import { FormValidator, MaskedTextBox, NumericTextBox, TextBox } from '@syncfusion/ej2-inputs';
10
10
  import { CheckBox } from '@syncfusion/ej2-buttons';
11
11
  import { DatePicker, DateTimePicker } from '@syncfusion/ej2-calendars';
12
12
  import { CheckBoxSelection, ComboBox, DropDownList, MultiSelect } from '@syncfusion/ej2-dropdowns';
@@ -1740,7 +1740,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1740
1740
  };
1741
1741
  TaskProcessor.prototype.calculateSharedTaskUniqueIds = function () {
1742
1742
  var _loop_2 = function (i) {
1743
- var value = this_2.parent.getTaskIds()[i].match(/(\d+|[A-z]+)/g);
1743
+ var value = [];
1744
+ value[0] = this_2.parent.getTaskIds()[i][0];
1745
+ value[1] = this_2.parent.getTaskIds()[i].slice(1);
1744
1746
  if (value[0] !== 'R') {
1745
1747
  var sharedRecords_1 = [];
1746
1748
  var ids_1 = [];
@@ -1807,7 +1809,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1807
1809
  this_3.parent.setRecordValue('autoDuration', this_3.calculateAutoDuration(parentProp), parentProp, true);
1808
1810
  this_3.updateAutoWidthLeft(parentData);
1809
1811
  }
1810
- this_3.resetDependency(parentData);
1811
1812
  this_3.updateWidthLeft(parentData);
1812
1813
  this_3.updateTaskData(parentData);
1813
1814
  }
@@ -1832,7 +1833,8 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1832
1833
  var length = columns.length;
1833
1834
  if (length) {
1834
1835
  for (var i = 0; i < length; i++) {
1835
- if (ganttRecord[columns[i].field] === undefined) {
1836
+ var fieldName = ganttRecord[columns[i].field];
1837
+ if (fieldName === undefined) {
1836
1838
  this.parent.setRecordValue(columns[i].field, data[columns[i].field], ganttRecord);
1837
1839
  }
1838
1840
  }
@@ -1881,6 +1883,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1881
1883
  this.parent.setRecordValue('parentId', data[taskSettings.parentID], ganttProperties, true);
1882
1884
  }
1883
1885
  this.addCustomFieldValue(data, ganttData);
1886
+ ganttData.checkboxState = 'uncheck';
1884
1887
  this.parent.setRecordValue('isAutoSchedule', autoSchedule, ganttProperties, true);
1885
1888
  this.parent.setRecordValue('resourceInfo', this.setResourceInfo(data), ganttProperties, true);
1886
1889
  this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
@@ -1923,7 +1926,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1923
1926
  if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
1924
1927
  this.parent.setRecordValue('hasChildRecords', true, ganttData);
1925
1928
  this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
1926
- this.resetDependency(ganttData);
1927
1929
  }
1928
1930
  else {
1929
1931
  this.parent.setRecordValue('hasChildRecords', false, ganttData);
@@ -1966,6 +1968,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1966
1968
  }
1967
1969
  else {
1968
1970
  var uniqueId = ganttData.uniqueID.replace(this.parent.element.id + '_data_', '');
1971
+ if (this.parent.viewType === 'ResourceView' && typeof (ganttData.ganttProperties.taskId) === "string") {
1972
+ uniqueId = ganttProperties.taskId.toString();
1973
+ }
1969
1974
  this.parent.setRecordValue('rowUniqueID', uniqueId, ganttData);
1970
1975
  this.parent.setRecordValue('rowUniqueID', uniqueId, ganttProperties, true);
1971
1976
  this.parent.setRecordValue('sharedTaskUniqueIds', [], ganttProperties, true);
@@ -3085,10 +3090,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3085
3090
  TaskProcessor.prototype.updateResourceName = function (data) {
3086
3091
  var resourceInfo = data.ganttProperties.resourceInfo;
3087
3092
  var resourceName = [];
3093
+ var taskMapping = this.parent.taskFields;
3088
3094
  if (resourceInfo) {
3095
+ var resourceLength = resourceInfo.length;
3089
3096
  var taskResources = extend([], [], data.taskData[this.parent.taskFields.resourceInfo], true);
3090
3097
  this.parent.setRecordValue('taskData.' + this.parent.taskFields.resourceInfo, [], data);
3091
- for (var i = 0; i < resourceInfo.length; i++) {
3098
+ for (var i = 0; i < resourceLength; i++) {
3092
3099
  var resource = resourceInfo[i];
3093
3100
  var resName = resource[this.parent.resourceFields.name];
3094
3101
  var resourceUnit = resource[this.parent.resourceFields.unit];
@@ -3097,7 +3104,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3097
3104
  }
3098
3105
  resourceName.push(resName);
3099
3106
  if (data.taskData) {
3100
- var mapping = this.parent.taskFields.resourceInfo;
3107
+ var mapping = taskMapping.resourceInfo;
3101
3108
  // eslint-disable-next-line
3102
3109
  if (typeof (taskResources[i] === 'object')) {
3103
3110
  data.taskData[mapping].push(taskResources[i]);
@@ -3776,7 +3783,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3776
3783
  this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
3777
3784
  this.updateAutoWidthLeft(parentData);
3778
3785
  }
3779
- this.resetDependency(parentData);
3780
3786
  this.updateWidthLeft(parentData);
3781
3787
  this.updateTaskData(parentData);
3782
3788
  }
@@ -4331,7 +4337,7 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4331
4337
  GanttChart.prototype.renderTimelineContainer = function () {
4332
4338
  this.chartTimelineContainer =
4333
4339
  createElement('div', { className: timelineHeaderContainer });
4334
- this.chartTimelineContainer.setAttribute("role", "TimelineHeader");
4340
+ this.chartTimelineContainer.setAttribute("role", "presentation");
4335
4341
  this.chartElement.appendChild(this.chartTimelineContainer);
4336
4342
  };
4337
4343
  /**
@@ -4457,12 +4463,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4457
4463
  }
4458
4464
  };
4459
4465
  GanttChart.prototype.ganttChartMouseClick = function (e) {
4460
- if (this.parent.editSettings.allowTaskbarEditing) {
4461
- if (this.parent.autoFocusTasks) {
4462
- this.scrollToTarget(e); /** Scroll to task */
4463
- }
4464
- this.parent.notify('chartMouseClick', e);
4466
+ if (this.parent.autoFocusTasks) {
4467
+ this.scrollToTarget(e); /** Scroll to task */
4465
4468
  }
4469
+ this.parent.notify('chartMouseClick', e);
4466
4470
  };
4467
4471
  GanttChart.prototype.ganttChartMouseUp = function (e) {
4468
4472
  if (this.parent.editSettings.allowTaskbarEditing) {
@@ -4796,6 +4800,10 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4796
4800
  this.parent.updatedConnectorLineCollection = [];
4797
4801
  this.parent.predecessorModule.createConnectorLinesCollection();
4798
4802
  this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection);
4803
+ if (this.parent.enableCriticalPath && this.parent.criticalPathModule) {
4804
+ var criticalModule = this.parent.criticalPathModule;
4805
+ criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
4806
+ }
4799
4807
  };
4800
4808
  /**
4801
4809
  * To collapse gantt rows
@@ -7510,11 +7518,30 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7510
7518
  */
7511
7519
  GanttTreeGrid.prototype.composeIDColumn = function (column) {
7512
7520
  var isProjectView = this.parent.viewType === 'ProjectView';
7521
+ var lengthDataSource = this.parent.dataSource['length'];
7522
+ var taskIDName;
7513
7523
  column.isPrimaryKey = isProjectView ? true : false;
7514
7524
  column.headerText = column.headerText ? column.headerText : this.parent.localeObj.getConstant('id');
7515
7525
  column.width = column.width ? column.width : 100;
7516
- column.allowEditing = column.allowEditing ? column.allowEditing : false;
7517
- column.editType = column.editType ? column.editType : 'numericedit';
7526
+ for (var i = 0; i < lengthDataSource; i++) {
7527
+ if (!isNullOrUndefined(this.parent.dataSource[i][this.parent.taskFields.id])) {
7528
+ taskIDName = this.parent.dataSource[i][this.parent.taskFields.id];
7529
+ break;
7530
+ }
7531
+ }
7532
+ if (typeof (taskIDName) === "string") {
7533
+ if (this.parent.viewType === 'ResourceView') {
7534
+ column.allowEditing = column.allowEditing ? column.allowEditing : false;
7535
+ }
7536
+ else {
7537
+ column.allowEditing = column.allowEditing ? column.allowEditing : true;
7538
+ }
7539
+ column.editType = column.editType ? column.editType : 'stringedit';
7540
+ }
7541
+ else {
7542
+ column.allowEditing = column.allowEditing ? column.allowEditing : false;
7543
+ column.editType = column.editType ? column.editType : 'numericedit';
7544
+ }
7518
7545
  column.valueAccessor = isProjectView ? null : this.idValueAccessor.bind(this);
7519
7546
  };
7520
7547
  GanttTreeGrid.prototype.composeUniqueIDColumn = function (column) {
@@ -8508,7 +8535,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8508
8535
  * @private
8509
8536
  */
8510
8537
  ChartRows.prototype.getIndicatorNode = function (indicator) {
8511
- var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '" role="LabelIndicator" style="line-height:'
8538
+ var templateString = '<label class="' + label + ' ' + taskIndicatorDiv + '"style="line-height:'
8512
8539
  + (this.parent.rowHeight) + 'px;' +
8513
8540
  'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
8514
8541
  return this.createDivElement(templateString);
@@ -9024,7 +9051,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9024
9051
  */
9025
9052
  ChartRows.prototype.getTaskBaselineNode = function () {
9026
9053
  var data = this.templateData;
9027
- var template = '<div class="' + baselineBar + ' ' + '" role="BaselineBar" style="margin-top:' + this.baselineTop +
9054
+ var template = '<div class="' + baselineBar + ' ' + '" role="term" style="margin-top:' + this.baselineTop +
9028
9055
  'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
9029
9056
  'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
9030
9057
  this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
@@ -9277,10 +9304,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9277
9304
  var className = (this.parent.gridLines === 'Horizontal' || this.parent.gridLines === 'Both') ?
9278
9305
  'e-chart-row-border' : '';
9279
9306
  table.innerHTML = '<tr class="' + this.getRowClassName(this.templateData) + ' ' + chartRow + '"' +
9280
- 'role="ChartRow" style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
9307
+ 'style="display:' + this.getExpandDisplayProp(this.templateData) + ';height:' +
9281
9308
  this.parent.rowHeight + 'px;">' +
9282
9309
  '<td class="' + chartRowCell + ' ' + className
9283
- + '" role="ChartCell" style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
9310
+ + '"style="width:' + this.parent.timelineModule.totalTimelineWidth + 'px;"></td></tr>';
9284
9311
  return table.childNodes;
9285
9312
  };
9286
9313
  /**
@@ -9345,7 +9372,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9345
9372
  };
9346
9373
  ChartRows.prototype.leftLabelContainer = function () {
9347
9374
  var template = '<div class="' + ((this.leftTaskLabelTemplateFunction) ? leftLabelTempContainer :
9348
- leftLabelContainer) + ' ' + '" tabindex="-1" role="LeftLabel" style="height:' +
9375
+ leftLabelContainer) + ' ' + '" tabindex="-1" role="term" style="height:' +
9349
9376
  (this.parent.rowHeight - 2) + 'px;width:' + this.taskNameWidth(this.templateData) + '"></div>';
9350
9377
  return this.createDivElement(template);
9351
9378
  };
@@ -9357,7 +9384,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9357
9384
  var template = '<div class="' + taskBarMainContainer + ' ' +
9358
9385
  this.parent.getUnscheduledTaskClass(data.ganttProperties) + ' ' +
9359
9386
  ((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
9360
- ' tabindex="-1" role="TaskBar" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
9387
+ ' tabindex="-1" role="term" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
9361
9388
  ('width:' + this.milestoneHeight + 'px;height:' +
9362
9389
  this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
9363
9390
  (this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
@@ -9368,26 +9395,26 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9368
9395
  };
9369
9396
  ChartRows.prototype.rightLabelContainer = function () {
9370
9397
  var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? rightLabelTempContainer :
9371
- rightLabelContainer) + '" ' + ' tabindex="-1" role="RightLabel" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
9398
+ rightLabelContainer) + '" ' + ' tabindex="-1" role="term" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
9372
9399
  + (this.parent.rowHeight - 2) + 'px;"></div>';
9373
9400
  return this.createDivElement(template);
9374
9401
  };
9375
9402
  ChartRows.prototype.childTaskbarLeftResizer = function () {
9376
9403
  var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
9377
9404
  var template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
9378
- ' role="LeftResizer" style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
9405
+ 'style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
9379
9406
  return this.createDivElement(template);
9380
9407
  };
9381
9408
  ChartRows.prototype.childTaskbarRightResizer = function () {
9382
9409
  var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
9383
9410
  var template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
9384
- ' role="RightResizer" style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
9411
+ 'style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
9385
9412
  'height:' + (this.taskBarHeight) + 'px;"></div>';
9386
9413
  return this.createDivElement(template);
9387
9414
  };
9388
9415
  ChartRows.prototype.childTaskbarProgressResizer = function () {
9389
9416
  var template = '<div class="' + childProgressResizer + '"' +
9390
- ' role="ProgressResizer" style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
9417
+ 'style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
9391
9418
  (this.taskBarHeight - 4) + 'px;"><div class="' + progressBarHandler + '"' +
9392
9419
  '><div class="' + progressHandlerElement + '"></div>' +
9393
9420
  '<div class="' + progressBarHandlerAfter + '"></div></div>';
@@ -9398,9 +9425,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9398
9425
  var pointerLeft = -((this.parent.isAdaptive ? 14 : 2) + this.connectorPointWidth);
9399
9426
  var mileStoneLeft = -(this.connectorPointWidth + 2);
9400
9427
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
9428
+ var marginTop;
9429
+ if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
9430
+ marginTop = '';
9431
+ }
9432
+ else {
9433
+ marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
9434
+ }
9401
9435
  var template = '<div class="' + leftConnectorPointOuterDiv + '" style="' +
9402
9436
  ((data.ganttProperties.isMilestone) ? ('margin-top:' + pointerTop + 'px;left:' + mileStoneLeft +
9403
- 'px;') : ('margin-top:' + this.connectorPointMargin + 'px;left:' + pointerLeft + 'px;')) + '">' +
9437
+ 'px;') : (marginTop + ';left:' + pointerLeft + 'px;')) + '">' +
9404
9438
  '<div class="' + connectorPointLeft + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
9405
9439
  '" style="width: ' + this.connectorPointWidth + 'px;' +
9406
9440
  'height: ' + this.connectorPointWidth + 'px;">' + this.touchLeftConnectorpoint + '</div></div>';
@@ -9410,10 +9444,16 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9410
9444
  var data = this.templateData;
9411
9445
  var pointerRight = this.parent.isAdaptive ? 10 : -2;
9412
9446
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
9447
+ var marginTop;
9448
+ if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
9449
+ marginTop = '';
9450
+ }
9451
+ else {
9452
+ marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
9453
+ }
9413
9454
  var template = '<div class="' + rightConnectorPointOuterDiv + '" style="' +
9414
9455
  ((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
9415
- pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;margin-top:' +
9416
- this.connectorPointMargin + 'px;')) + '">' +
9456
+ pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
9417
9457
  '<div class="' + connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
9418
9458
  '" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
9419
9459
  this.touchRightConnectorpoint + '</div></div>';
@@ -9713,14 +9753,17 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9713
9753
  var taskbarContainerNode = this.taskbarContainer();
9714
9754
  taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
9715
9755
  taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
9716
- if (!this.templateData.hasChildRecords) {
9717
- var connectorLineLeftNode = this.getLeftPointNode();
9756
+ var connectorLineLeftNode = this.getLeftPointNode();
9757
+ if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
9718
9758
  taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
9719
9759
  }
9720
9760
  if (this.templateData.hasChildRecords) {
9721
9761
  var parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
9722
9762
  if (!this.templateData.ganttProperties.isAutoSchedule) {
9723
9763
  var manualTaskbar = this.getManualTaskbar();
9764
+ manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
9765
+ var connectorLineRightNode = this.getRightPointNode();
9766
+ manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode)[0]);
9724
9767
  taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
9725
9768
  }
9726
9769
  if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
@@ -9795,7 +9838,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9795
9838
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9796
9839
  }
9797
9840
  }
9798
- if (!this.templateData.hasChildRecords) {
9841
+ if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
9799
9842
  var connectorLineRightNode = this.getRightPointNode();
9800
9843
  taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
9801
9844
  }
@@ -10198,6 +10241,21 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10198
10241
  }
10199
10242
  return defaultValue;
10200
10243
  };
10244
+ ChartRows.prototype.generateBaselineAriaLabel = function (data) {
10245
+ data = this.templateData;
10246
+ var defaultValue = '';
10247
+ var nameConstant = this.parent.localeObj.getConstant('name');
10248
+ var startDateConstant = this.parent.localeObj.getConstant('startDate');
10249
+ var endDateConstant = this.parent.localeObj.getConstant('endDate');
10250
+ var taskNameVal = data.ganttProperties.taskName;
10251
+ var startDateVal = data.ganttProperties.baselineStartDate;
10252
+ var endDateVal = data.ganttProperties.baselineEndDate;
10253
+ defaultValue += 'Baseline' + ' ';
10254
+ defaultValue += nameConstant + ' ' + taskNameVal + ' ';
10255
+ defaultValue += startDateConstant + ' ' + this.parent.getFormatedDate(startDateVal) + ' ';
10256
+ defaultValue += endDateConstant + ' ' + this.parent.getFormatedDate(endDateVal) + ' ';
10257
+ return defaultValue;
10258
+ };
10201
10259
  ChartRows.prototype.generateSpiltTaskAriaLabel = function (data, ganttProp) {
10202
10260
  var defaultValue = '';
10203
10261
  var startDateConstant = this.parent.localeObj.getConstant('startDate');
@@ -10237,6 +10295,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
10237
10295
  function Dependency(gantt) {
10238
10296
  this.parentRecord = [];
10239
10297
  this.parentIds = [];
10298
+ this.parentPredecessors = [];
10240
10299
  this.parent = gantt;
10241
10300
  this.dateValidateModule = this.parent.dateValidationModule;
10242
10301
  }
@@ -10252,9 +10311,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
10252
10311
  for (var count = length; count >= 0; count--) {
10253
10312
  var ganttData = predecessorTasks[count];
10254
10313
  var ganttProp = ganttData.ganttProperties;
10255
- if (!ganttData.hasChildRecords) {
10256
- this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
10257
- }
10314
+ this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
10258
10315
  }
10259
10316
  };
10260
10317
  /**
@@ -10364,8 +10421,29 @@ var Dependency = /** @__PURE__ @class */ (function () {
10364
10421
  values = el.split('-');
10365
10422
  offsetValue = '-';
10366
10423
  }
10367
- match = values[0].match(/(\d+|[A-z]+)/g);
10424
+ match = [];
10368
10425
  var ids = _this.parent.viewType === 'ResourceView' ? _this.parent.getTaskIds() : _this.parent.ids;
10426
+ var isExist1 = _this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + values[0]) : ids.indexOf(values[0]);
10427
+ if (isExist1 !== -1) {
10428
+ match[0] = values[0];
10429
+ }
10430
+ else {
10431
+ if (ids.indexOf(values[0]) === -1) {
10432
+ match = values[0].split(" ");
10433
+ if (match.length === 1) {
10434
+ if (match[0].indexOf(" ") != -1) {
10435
+ match = values[0].match(/(\d+|[A-z]+)/g);
10436
+ }
10437
+ else {
10438
+ match[0] = values[0].slice(0, -2);
10439
+ match[1] = values[0].slice(-2);
10440
+ }
10441
+ }
10442
+ }
10443
+ else {
10444
+ match[0] = values[0];
10445
+ }
10446
+ }
10369
10447
  var isExist = _this.parent.viewType === 'ResourceView' ? ids.indexOf('T' + match[0]) : ids.indexOf(match[0]);
10370
10448
  /*Validate for appropriate predecessor*/
10371
10449
  if (match[0] && isExist !== -1) {
@@ -10396,10 +10474,18 @@ var Dependency = /** @__PURE__ @class */ (function () {
10396
10474
  offsetUnit: offsetUnits.durationUnit,
10397
10475
  offset: offsetUnits.duration
10398
10476
  };
10399
- var isOwnParent = _this.checkIsParent(match[0]);
10400
- if (!isOwnParent) {
10477
+ var fromData = _this.parent.connectorLineModule.getRecordByID(obj.to);
10478
+ var toData = _this.parent.connectorLineModule.getRecordByID(obj.from);
10479
+ var isValid;
10480
+ if (_this.parent.connectorLineEditModule && toData && fromData) {
10481
+ isValid = _this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
10482
+ if (isValid)
10483
+ collection.push(obj);
10484
+ }
10485
+ else {
10401
10486
  collection.push(obj);
10402
10487
  }
10488
+ match.splice(0);
10403
10489
  });
10404
10490
  return collection;
10405
10491
  };
@@ -10414,6 +10500,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
10414
10500
  var predecessors = data.ganttProperties.predecessor;
10415
10501
  var durationUnitTexts = this.parent.durationUnitTexts;
10416
10502
  var resultString = '';
10503
+ var temp1;
10504
+ var match;
10505
+ match = [];
10417
10506
  if (predecessors) {
10418
10507
  var length_1 = predecessors.length;
10419
10508
  for (var i = 0; i < length_1; i++) {
@@ -10423,6 +10512,15 @@ var Dependency = /** @__PURE__ @class */ (function () {
10423
10512
  : data.ganttProperties.rowUniqueID;
10424
10513
  if (currentValue.from !== id.toString()) {
10425
10514
  temp = currentValue.from + currentValue.type;
10515
+ if (typeof (data.ganttProperties.taskId) === "string") {
10516
+ match[0] = temp.slice(0, -2);
10517
+ match[1] = temp.slice(-2);
10518
+ temp1 = match[0] + " " + match[1];
10519
+ }
10520
+ else {
10521
+ temp1 = temp;
10522
+ }
10523
+ temp = temp1;
10426
10524
  if (currentValue.offset !== 0) {
10427
10525
  temp += currentValue.offset > 0 ? ('+' + currentValue.offset + ' ') : (currentValue.offset + ' ');
10428
10526
  var multiple = currentValue.offset !== 1;
@@ -10510,9 +10608,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
10510
10608
  var length = predecessorsCollection.length;
10511
10609
  for (var count = 0; count < length; count++) {
10512
10610
  ganttRecord = predecessorsCollection[count];
10513
- if (!ganttRecord.hasChildRecords) {
10514
- this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
10515
- }
10611
+ this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
10516
10612
  }
10517
10613
  };
10518
10614
  /**
@@ -10562,9 +10658,22 @@ var Dependency = /** @__PURE__ @class */ (function () {
10562
10658
  */
10563
10659
  Dependency.prototype.updatedRecordsDateByPredecessor = function () {
10564
10660
  var flatData = this.parent.flatData;
10565
- for (var count = 0; count < flatData.length; count++) {
10661
+ var totLength = this.parent.flatData.length;
10662
+ for (var count = 0; count < totLength; count++) {
10566
10663
  if (flatData[count].ganttProperties.predecessor) {
10567
10664
  this.validatePredecessorDates(flatData[count]);
10665
+ if (flatData[count].hasChildRecords && this.parent.editModule) {
10666
+ this.parent.editModule['updateChildItems'](flatData[count]);
10667
+ }
10668
+ }
10669
+ }
10670
+ };
10671
+ Dependency.prototype.updateParentPredecessor = function () {
10672
+ if (this.parent.enablePredecessorValidation) {
10673
+ var parentPredecessorLength = this.parentPredecessors.length;
10674
+ for (var i = parentPredecessorLength - 1; i >= 0; i--) {
10675
+ var item = this.parentPredecessors[i];
10676
+ this.validatePredecessorDates(item);
10568
10677
  }
10569
10678
  }
10570
10679
  };
@@ -10595,6 +10704,10 @@ var Dependency = /** @__PURE__ @class */ (function () {
10595
10704
  var predecessor = predecessors[count];
10596
10705
  parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor.from);
10597
10706
  record = this.parent.connectorLineModule.getRecordByID(predecessor.to);
10707
+ if (this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
10708
+ && (ganttRecord.hasChildRecords || record.hasChildRecords)) {
10709
+ this.parentPredecessors.push(ganttRecord);
10710
+ }
10598
10711
  if (record.ganttProperties.isAutoSchedule || this.parent.validateManualTasksOnLinking) {
10599
10712
  this.validateChildGanttRecord(parentGanttRecord, record);
10600
10713
  }
@@ -10635,8 +10748,8 @@ var Dependency = /** @__PURE__ @class */ (function () {
10635
10748
  this.dateValidateModule.calculateEndDate(childGanttRecord);
10636
10749
  }
10637
10750
  this.parent.dataOperation.updateWidthLeft(childGanttRecord);
10638
- if (childGanttRecord.parentItem && this.parent.getParentTask(childGanttRecord.parentItem).ganttProperties.isAutoSchedule
10639
- && this.parent.isInPredecessorValidation && !this.parent.isLoad) {
10751
+ if (!this.parent.isLoad && childGanttRecord.parentItem && this.parent.isInPredecessorValidation &&
10752
+ this.parent.getParentTask(childGanttRecord.parentItem).ganttProperties.isAutoSchedule) {
10640
10753
  if (this.parentIds.indexOf(childGanttRecord.parentItem.uniqueID) === -1) {
10641
10754
  this.parentIds.push(childGanttRecord.parentItem.uniqueID);
10642
10755
  this.parentRecord.push(childGanttRecord.parentItem);
@@ -10993,8 +11106,19 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
10993
11106
  */
10994
11107
  ConnectorLine.prototype.createConnectorLineObject = function (parentGanttData, childGanttData, predecessor) {
10995
11108
  var connectorObj = {};
10996
- var updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
10997
- this.parent.flatData : this.expandedRecords;
11109
+ var updatedRecords;
11110
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport) {
11111
+ if (this.parent.pdfExportModule['helper']['exportProps'].exportType &&
11112
+ this.parent.pdfExportModule['helper']['exportProps'].exportType === 'CurrentViewData') {
11113
+ updatedRecords = this.expandedRecords;
11114
+ }
11115
+ else {
11116
+ updatedRecords = this.parent.flatData;
11117
+ }
11118
+ }
11119
+ else {
11120
+ updatedRecords = this.expandedRecords;
11121
+ }
10998
11122
  var parentIndex = updatedRecords.indexOf(parentGanttData);
10999
11123
  var childIndex = updatedRecords.indexOf(childGanttData);
11000
11124
  var parentGanttRecord = parentGanttData.ganttProperties;
@@ -11317,6 +11441,63 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11317
11441
  isMilestoneValue = (data.milestoneParent && data.milestoneChild) ? 0 : data.milestoneParent ? -5 : data.milestoneChild ? 5 : 0;
11318
11442
  }
11319
11443
  var heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
11444
+ var borderTopWidth = 0;
11445
+ var addTop = 0;
11446
+ if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex]) {
11447
+ var fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
11448
+ var toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
11449
+ var fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
11450
+ var toRecordIsManual = this.parent.currentViewData[data.childIndex].ganttProperties.isAutoSchedule;
11451
+ var isValid = true;
11452
+ if (((fromRecordIsParent && fromRecordIsManual) && !toRecordIsParent) || ((toRecordIsParent && toRecordIsManual) &&
11453
+ !fromRecordIsParent) || (fromRecordIsParent && fromRecordIsManual && toRecordIsManual && toRecordIsParent)
11454
+ || (!fromRecordIsParent && !toRecordIsParent)) {
11455
+ isValid = false;
11456
+ }
11457
+ if (isValid) {
11458
+ if (((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
11459
+ addTop = -11;
11460
+ }
11461
+ else if (!((fromRecordIsParent && !fromRecordIsManual) && (toRecordIsParent && !toRecordIsManual))) {
11462
+ if (data.childIndex > data.parentIndex) {
11463
+ if (!fromRecordIsParent && toRecordIsParent) {
11464
+ borderTopWidth = -11;
11465
+ }
11466
+ else {
11467
+ borderTopWidth = 11;
11468
+ addTop = -11;
11469
+ }
11470
+ }
11471
+ else {
11472
+ if ((fromRecordIsParent && !toRecordIsParent)) {
11473
+ borderTopWidth = -11;
11474
+ }
11475
+ else {
11476
+ borderTopWidth = 11;
11477
+ addTop = -11;
11478
+ }
11479
+ }
11480
+ }
11481
+ if (this.parent.currentViewData[data.parentIndex].ganttProperties.isMilestone) {
11482
+ if (data.parentIndex > data.childIndex) {
11483
+ addTop = -5;
11484
+ borderTopWidth = 10;
11485
+ }
11486
+ else if (data.type === 'SS' || data.type === 'FF') {
11487
+ addTop = -5;
11488
+ }
11489
+ }
11490
+ else if (this.parent.currentViewData[data.childIndex].ganttProperties.isMilestone) {
11491
+ if (data.parentIndex > data.childIndex) {
11492
+ addTop = 5;
11493
+ borderTopWidth = -10;
11494
+ }
11495
+ else if (data.type === 'SS' || data.type === 'FF') {
11496
+ addTop = 5;
11497
+ }
11498
+ }
11499
+ }
11500
+ }
11320
11501
  if (this.getParentPosition(data)) {
11321
11502
  connectorContainer = '<div id="ConnectorLine' + data.connectorLineId + '" style="background-color:black">';
11322
11503
  var div = '<div class="' + connectorLineContainer +
@@ -11336,7 +11517,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11336
11517
  'border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div>';
11337
11518
  var duplicateStingThree = this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>' + eLine +
11338
11519
  'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11339
- this.getBorderStyles('top', (heightValue - (this.lineStroke - 1))) + 'position:relative;"></div>';
11520
+ this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
11340
11521
  var duplicateStingFour = leftArrow + 'left:' +
11341
11522
  (((data.childLeft + data.childWidth) - (data.parentLeft)) + 10) + 'px;' +
11342
11523
  this.getBorderStyles('right', 10);
@@ -11344,7 +11525,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11344
11525
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
11345
11526
  if (this.getParentPosition(data) === 'FSType1') {
11346
11527
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11347
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11528
+ ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11348
11529
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
11349
11530
  div = div + eLine;
11350
11531
  div = div + 'left:' + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
@@ -11354,7 +11535,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11354
11535
  div = div + eLine;
11355
11536
  div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;' +
11356
11537
  'width:0px;' + this.getBorderStyles('right', this.lineStroke) +
11357
- this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
11538
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
11358
11539
  div = div + eLine;
11359
11540
  div = div + 'left:' + ((data.childLeft - (data.parentLeft + data.parentWidth + 10)) - 10) + 'px;width:10px;' +
11360
11541
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
@@ -11364,7 +11545,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11364
11545
  'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
11365
11546
  }
11366
11547
  if (this.getParentPosition(data) === 'FSType2') {
11367
- div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) +
11548
+ div = div + 'left:' + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) + addTop +
11368
11549
  this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11369
11550
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
11370
11551
  div = div + eLine;
@@ -11374,7 +11555,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11374
11555
  div = div + eLine;
11375
11556
  div = div + 'left:' + (data.parentWidth + 10 - this.lineStroke) + 'px;' +
11376
11557
  this.getBorderStyles('left', this.lineStroke) + 'width:0px;' +
11377
- this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
11558
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
11378
11559
  div = div + eLine;
11379
11560
  div = div + 'left:' + (data.parentWidth - (((data.parentLeft + data.parentWidth) - data.childLeft) + 20)) + 'px;' +
11380
11561
  'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
@@ -11396,7 +11577,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11396
11577
  }
11397
11578
  if (this.getParentPosition(data) === 'FSType3') {
11398
11579
  div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11399
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11580
+ ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11400
11581
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
11401
11582
  div = div + rightArrow;
11402
11583
  div = div + 'left:10px;' + this.getBorderStyles('left', 10) +
@@ -11406,7 +11587,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11406
11587
  div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) +
11407
11588
  'position:relative;top:' + (-(6 + (5 + this.lineStroke) + Math.round(this.lineStroke / 2))) + 'px;"></div>';
11408
11589
  div = div + eLine;
11409
- div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
11590
+ div = div + 'width:' + this.lineStroke + 'px;' + this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke + 1)) +
11410
11591
  'position:relative;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;"></div>';
11411
11592
  div = div + eLine;
11412
11593
  div = div + 'width:' + (((data.parentLeft + data.parentWidth) - data.childLeft) + 30) + 'px;' +
@@ -11426,7 +11607,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11426
11607
  }
11427
11608
  if (this.getParentPosition(data) === 'FSType4') {
11428
11609
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11429
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11610
+ ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11430
11611
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
11431
11612
  div = div + rightArrow;
11432
11613
  div = div + 'left:' + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
@@ -11442,7 +11623,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11442
11623
  div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;left:' +
11443
11624
  (data.childLeft - (data.parentLeft + data.parentWidth) - 20) + 'px;width:0px;' +
11444
11625
  this.getBorderStyles('left', this.lineStroke) +
11445
- this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
11626
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
11446
11627
  div = div + eLine;
11447
11628
  div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'top:' +
11448
11629
  (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
@@ -11452,7 +11633,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11452
11633
  }
11453
11634
  if (this.getParentPosition(data) === 'SSType4') {
11454
11635
  div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11455
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11636
+ ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11456
11637
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
11457
11638
  div = div + rightArrow;
11458
11639
  div = div + 'left:' + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
@@ -11465,7 +11646,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11465
11646
  }
11466
11647
  if (this.getParentPosition(data) === 'SSType3') {
11467
11648
  div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11468
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11649
+ ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11469
11650
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
11470
11651
  div = div + rightArrow;
11471
11652
  div = div + 'left:10px;' + duplicateStingTwo;
@@ -11478,14 +11659,14 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11478
11659
  }
11479
11660
  if (this.getParentPosition(data) === 'SSType2') {
11480
11661
  div = div + 'left:' + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11481
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11662
+ ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11482
11663
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
11483
11664
  div = div + eLine;
11484
11665
  div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
11485
11666
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
11486
11667
  div = div + eLine;
11487
11668
  div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11488
- this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
11669
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
11489
11670
  div = div + eLine;
11490
11671
  div = div + 'width:' + setInnerElementWidthSSType2 + 'px;' +
11491
11672
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
@@ -11498,7 +11679,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11498
11679
  }
11499
11680
  if (this.getParentPosition(data) === 'SSType1') {
11500
11681
  div = div + 'left:' + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11501
- ((data.parentIndex * data.rowHeight) +
11682
+ ((data.parentIndex * data.rowHeight) + addTop +
11502
11683
  this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11503
11684
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
11504
11685
  div = div + eLine;
@@ -11506,7 +11687,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11506
11687
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
11507
11688
  div = div + eLine;
11508
11689
  div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11509
- this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
11690
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
11510
11691
  div = div + eLine;
11511
11692
  div = div + 'width:10px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
11512
11693
  div = div + rightArrow;
@@ -11516,7 +11697,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11516
11697
  }
11517
11698
  if (this.getParentPosition(data) === 'FFType1') {
11518
11699
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11519
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11700
+ ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11520
11701
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
11521
11702
  div = div + eLine;
11522
11703
  div = div + 'left:' + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
@@ -11527,7 +11708,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11527
11708
  div = div + eLine;
11528
11709
  div = div + 'left:' + (((data.parentLeft + data.parentWidth) -
11529
11710
  (data.childLeft + data.childWidth)) + 20) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11530
- this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
11711
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
11531
11712
  div = div + eLine;
11532
11713
  div = div + 'left:' + (isMilestone ? 4 : 10) + 'px;width:' + (isMilestone ?
11533
11714
  (((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + (16 + this.lineStroke)) :
@@ -11540,7 +11721,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11540
11721
  }
11541
11722
  if (this.getParentPosition(data) === 'FFType2') {
11542
11723
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11543
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11724
+ ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11544
11725
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
11545
11726
  div = div + eLine;
11546
11727
  div = div + (isMilestoneParent ? 'left:-1px;' : '') + 'width:' +
@@ -11551,7 +11732,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11551
11732
  div = div + eLine;
11552
11733
  div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 20) +
11553
11734
  'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11554
- this.getBorderStyles('top', (heightValue - this.lineStroke)) +
11735
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) +
11555
11736
  'position:relative;"></div>';
11556
11737
  div = div + eLine;
11557
11738
  div = div + 'left:' + (isMilestone ? (((data.childLeft + data.childWidth) - (data.parentLeft + data.parentWidth)) + 4) :
@@ -11566,7 +11747,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11566
11747
  }
11567
11748
  if (this.getParentPosition(data) === 'FFType3') {
11568
11749
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11569
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11750
+ ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11570
11751
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
11571
11752
  div = div + duplicateStingOne;
11572
11753
  div = div + eLine;
@@ -11579,7 +11760,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11579
11760
  div = div + 'left:' + (((data.parentLeft + data.parentWidth) - (data.childLeft + data.childWidth)) + 20) +
11580
11761
  'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;' +
11581
11762
  'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11582
- this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
11763
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
11583
11764
  div = div + eLine;
11584
11765
  div = div + (isMilestoneParent ? ('left:' + (((data.parentLeft + data.parentWidth) -
11585
11766
  (data.childLeft + data.childWidth)) - 1) + 'px;width:21') : ('left:' + ((data.parentLeft + data.parentWidth) -
@@ -11589,7 +11770,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11589
11770
  }
11590
11771
  if (this.getParentPosition(data) === 'FFType4') {
11591
11772
  div = div + 'left:' + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11592
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11773
+ ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11593
11774
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
11594
11775
  div = div + leftArrow;
11595
11776
  div = div + ('left:' + ((data.childLeft + data.childWidth) -
@@ -11608,7 +11789,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11608
11789
  div = div + 'left:' + (((data.childLeft + data.childWidth) -
11609
11790
  (data.parentLeft + data.parentWidth)) + 20) + 'px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) +
11610
11791
  'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11611
- this.getBorderStyles('top', (heightValue - this.lineStroke + 1)) + 'position:relative;"></div>';
11792
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke + 1)) + 'position:relative;"></div>';
11612
11793
  div = div + eLine;
11613
11794
  div = div + (isMilestoneParent ? ('left:-1px;width:' + (((data.childLeft + data.childWidth) -
11614
11795
  (data.parentLeft + data.parentWidth)) + (21 + this.lineStroke))) : ('width:' + (((data.childLeft + data.childWidth) -
@@ -11618,7 +11799,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11618
11799
  }
11619
11800
  if (this.getParentPosition(data) === 'SFType4') {
11620
11801
  div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11621
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
11802
+ ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
11622
11803
  'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
11623
11804
  div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
11624
11805
  'border-bottom-width:' + (5 + this.lineStroke) +
@@ -11631,7 +11812,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11631
11812
  div = div + eLine;
11632
11813
  div = div + 'left:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + 30) + 'px;top:' +
11633
11814
  (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11634
- this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - (this.lineStroke - 1))) + 'position:relative;"></div>';
11815
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - (this.lineStroke - 1))) + 'position:relative;"></div>';
11635
11816
  div = div + eLine;
11636
11817
  div = div + 'top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
11637
11818
  (((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
@@ -11646,7 +11827,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11646
11827
  }
11647
11828
  if (this.getParentPosition(data) === 'SFType3') {
11648
11829
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11649
- ((data.childIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11830
+ ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11650
11831
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
11651
11832
  div = div + duplicateStingOne;
11652
11833
  div = div + eLine;
@@ -11656,7 +11837,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11656
11837
  div = div + eLine;
11657
11838
  div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:0px;' +
11658
11839
  this.getBorderStyles('left', this.lineStroke) +
11659
- this.getBorderStyles('top', (heightValue - (this.lineStroke - 1))) + 'position:relative;"></div>';
11840
+ this.getBorderStyles('top', (heightValue + borderTopWidth - (this.lineStroke - 1))) + 'position:relative;"></div>';
11660
11841
  div = div + eLine;
11661
11842
  div = div + 'left:20px;top:' + (-(13 + ((this.lineStroke - 1) * 2))) + 'px;width:' +
11662
11843
  ((data.parentLeft - (data.childLeft + data.childWidth + 20)) + this.lineStroke) + 'px;' +
@@ -11664,13 +11845,13 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11664
11845
  }
11665
11846
  if (this.getParentPosition(data) === 'SFType1') {
11666
11847
  div = div + 'left:' + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11667
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11848
+ ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11668
11849
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
11669
11850
  div = div + eLine;
11670
11851
  div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
11671
11852
  div = div + eLine;
11672
11853
  div = div + 'width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11673
- this.getBorderStyles('top', (heightValue - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
11854
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.getconnectorLineGap(data) - this.lineStroke)) + 'position:relative;"></div>';
11674
11855
  div = div + eLine;
11675
11856
  div = div + 'width:' + (((data.childLeft + data.childWidth) - (data.parentLeft)) + (30 + this.lineStroke)) + 'px;' +
11676
11857
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
@@ -11689,7 +11870,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11689
11870
  }
11690
11871
  if (this.getParentPosition(data) === 'SFType2') {
11691
11872
  div = div + 'left:' + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
11692
- ((data.parentIndex * data.rowHeight) + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11873
+ ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
11693
11874
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
11694
11875
  div = div + eLine;
11695
11876
  div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
@@ -11697,7 +11878,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11697
11878
  div = div + eLine;
11698
11879
  div = div + 'left:' + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
11699
11880
  'px;width:0px;' + this.getBorderStyles('left', this.lineStroke) +
11700
- this.getBorderStyles('top', (heightValue - this.lineStroke)) + 'position:relative;"></div>';
11881
+ this.getBorderStyles('top', (heightValue + borderTopWidth - this.lineStroke)) + 'position:relative;"></div>';
11701
11882
  div = div + eLine;
11702
11883
  div = div + (isMilestone ? ('left:4px;width:' + (((data.parentLeft) - (data.childLeft + data.childWidth))
11703
11884
  - (14 - this.lineStroke))) : ('left:10px;width:' + (((data.parentLeft) -
@@ -11947,11 +12128,11 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
11947
12128
  };
11948
12129
  /**
11949
12130
  * @param {SplitterSettingsModel} splitter .
11950
- * @param {boolean} isDynamic .
12131
+
11951
12132
  * @returns {string} .
11952
12133
  * @private
11953
12134
  */
11954
- Splitter$$1.prototype.calculateSplitterPosition = function (splitter$$1, isDynamic) {
12135
+ Splitter$$1.prototype.calculateSplitterPosition = function (splitter$$1) {
11955
12136
  if (!isNullOrUndefined(this.splitterObject) && this.parent.enablePersistence) {
11956
12137
  return this.splitterObject.paneSettings[0].size;
11957
12138
  }
@@ -11967,8 +12148,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
11967
12148
  }
11968
12149
  else if (!isNullOrUndefined(splitter$$1.columnIndex) && splitter$$1.columnIndex >= 0) {
11969
12150
  if ((splitter$$1.columnIndex * 150) < this.parent.ganttWidth || !this.parent.element.classList.contains('e-device')) {
11970
- return isDynamic ? this.getSpliterPositionInPercentage(this.getTotalColumnWidthByIndex(splitter$$1.columnIndex).toString() + 'px') :
11971
- this.getSpliterPositionInPercentage((splitter$$1.columnIndex * 150) + 'px');
12151
+ return this.getSpliterPositionInPercentage(this.getTotalColumnWidthByIndex(splitter$$1.columnIndex).toString() + 'px');
11972
12152
  }
11973
12153
  else {
11974
12154
  return this.getSpliterPositionInPercentage((splitter$$1.columnIndex * 130) + 'px');
@@ -12004,10 +12184,10 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
12004
12184
  */
12005
12185
  Splitter$$1.prototype.getTotalColumnWidthByIndex = function (index) {
12006
12186
  var width = 0;
12007
- var tr = this.parent.treeGrid.element.querySelectorAll('.e-headercell');
12187
+ var tr = this.parent.ganttColumns;
12008
12188
  index = tr.length > index ? index : tr.length;
12009
12189
  for (var column = 0; column < index; column++) {
12010
- width = width + tr[column].offsetWidth;
12190
+ width = width + parseInt(tr[column].width);
12011
12191
  }
12012
12192
  return width;
12013
12193
  };
@@ -12018,7 +12198,7 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
12018
12198
  Splitter$$1.prototype.updateSplitterPosition = function () {
12019
12199
  this.splitterObject.separatorSize = this.parent.splitterSettings.separatorSize >= 4 ?
12020
12200
  this.parent.splitterSettings.separatorSize : 4;
12021
- var splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings, true);
12201
+ var splitterPosition = this.calculateSplitterPosition(this.parent.splitterSettings);
12022
12202
  this.splitterObject.paneSettings[0].min = this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum);
12023
12203
  this.splitterObject.dataBind();
12024
12204
  this.splitterObject.paneSettings[0].size = splitterPosition;
@@ -12435,7 +12615,8 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
12435
12615
  */
12436
12616
  Tooltip$$1.prototype.getPredecessorTooltipData = function (args) {
12437
12617
  var predeceesorParent = args.target.parentElement.id;
12438
- var taskIds = predeceesorParent.match(/\d+/g);
12618
+ var taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
12619
+ taskIds.shift();
12439
12620
  var fromTask;
12440
12621
  var toTask;
12441
12622
  if (this.parent.viewType === 'ResourceView') {
@@ -12731,7 +12912,7 @@ var FocusModule = /** @__PURE__ @class */ (function () {
12731
12912
  if (ganttObj.selectionSettings.mode !== 'Cell' && ganttObj.selectedRowIndex !== -1) {
12732
12913
  var selectedItem = ganttObj.currentViewData[ganttObj.selectedRowIndex];
12733
12914
  var focusedRowIndex = this.parent.ganttChartModule.focusedRowIndex;
12734
- var selectingRowIndex = focusedRowIndex > -1 ? focusedRowIndex : expandedRecords.indexOf(selectedItem);
12915
+ var selectingRowIndex = expandedRecords.indexOf(selectedItem);
12735
12916
  var currentSelectingRecord = e.action === 'downArrow' ? expandedRecords[selectingRowIndex + 1] :
12736
12917
  expandedRecords[selectingRowIndex - 1];
12737
12918
  ganttObj.selectionModule.selectRow(ganttObj.currentViewData.indexOf(currentSelectingRecord), false, true);
@@ -13144,6 +13325,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13144
13325
  if (this.enableValidation) {
13145
13326
  this.dataOperation.updateGanttData();
13146
13327
  }
13328
+ this.predecessorModule.updateParentPredecessor();
13147
13329
  if (this.dataSource instanceof Object && isCountRequired(this)) {
13148
13330
  var count = getValue('count', this.dataSource);
13149
13331
  this.treeGrid.dataSource = { result: this.flatData, count: count };
@@ -13156,6 +13338,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13156
13338
  if (this.enableValidation) {
13157
13339
  this.dataOperation.updateGanttData();
13158
13340
  }
13341
+ this.predecessorModule.updateParentPredecessor();
13159
13342
  this.treeGridPane.classList.remove('e-temp-content');
13160
13343
  remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
13161
13344
  this.notify('dataReady', {});
@@ -13467,7 +13650,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13467
13650
  {
13468
13651
  topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
13469
13652
  bottomTier: { unit: 'Minutes', format: 'mm', count: 30 }, timelineUnitSize: 66, level: 22,
13470
- timelineViewMode: 'Hour', weekStartDay: _WeekStartDay, updateTimescaleView: true, weekendBackground: null, showTooltip: true
13653
+ timelineViewMode: 'Hour', weekStartDay: 0, updateTimescaleView: true, weekendBackground: null, showTooltip: true
13471
13654
  },
13472
13655
  {
13473
13656
  topTier: { unit: 'Hour', format: 'ddd MMM, h a', count: 1 },
@@ -14808,7 +14991,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14808
14991
  Gantt.prototype.setSplitterPosition = function (value, type) {
14809
14992
  var tempSplitterSettings = {};
14810
14993
  tempSplitterSettings[type] = value;
14811
- var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings, true);
14994
+ var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings);
14812
14995
  var pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
14813
14996
  var pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
14814
14997
  this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
@@ -14890,7 +15073,10 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14890
15073
  if (this.viewType === 'ResourceView') {
14891
15074
  this.editModule.addRowPosition = rowPosition;
14892
15075
  this.editModule.addRowIndex = rowIndex;
14893
- var resources = data[this.taskFields.resourceInfo];
15076
+ var resources = void 0;
15077
+ if (!isNullOrUndefined(data)) {
15078
+ resources = data[this.taskFields.resourceInfo];
15079
+ }
14894
15080
  var id = void 0;
14895
15081
  var parentTask = void 0;
14896
15082
  if (!isNullOrUndefined(resources) && resources.length) {
@@ -15388,6 +15574,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15388
15574
  */
15389
15575
  Gantt.prototype.showColumn = function (keys, showBy) {
15390
15576
  this.treeGrid.showColumns(keys, showBy);
15577
+ this.updateTreeColumns();
15391
15578
  };
15392
15579
  /**
15393
15580
  * Hides a column by column name.
@@ -15399,6 +15586,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15399
15586
  */
15400
15587
  Gantt.prototype.hideColumn = function (keys, hideBy) {
15401
15588
  this.treeGrid.hideColumns(keys, hideBy);
15589
+ this.updateTreeColumns();
15402
15590
  };
15403
15591
  /**
15404
15592
  * To set scroll top for chart scroll container.
@@ -16135,8 +16323,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
16135
16323
  }
16136
16324
  if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
16137
16325
  data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
16138
- || field === taskSettings.dependency || field === taskSettings.progress
16139
- || field === taskSettings.work || field === 'taskType')) {
16326
+ || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
16140
16327
  args.cancel = true;
16141
16328
  }
16142
16329
  else {
@@ -16966,6 +17153,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
16966
17153
  }
16967
17154
  };
16968
17155
  TaskbarEdit.prototype.mouseClickHandler = function (e) {
17156
+ if (!this.parent.editSettings.allowTaskbarEditing) {
17157
+ return;
17158
+ }
16969
17159
  var targetElement = this.getElementByPosition(e);
16970
17160
  var element = parentsUntil$1(targetElement, taskBarMainContainer);
16971
17161
  if (this.parent.selectionModule && this.parent.selectionModule.enableSelectMultiTouch) {
@@ -17498,10 +17688,13 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
17498
17688
  var _this = this;
17499
17689
  this.stopScrollTimer();
17500
17690
  this.scrollTimer = window.setInterval(function () {
17501
- if (direction === 'right' || direction === 'bottom') {
17691
+ if (direction === 'right') {
17502
17692
  _this.timerCount = (_this.timerCount + 1) >= _this.parent.timelineModule.totalTimelineWidth ?
17503
17693
  _this.parent.timelineModule.totalTimelineWidth : (_this.timerCount + 1);
17504
17694
  }
17695
+ else if (direction === 'bottom') {
17696
+ _this.timerCount = _this.timerCount + 1;
17697
+ }
17505
17698
  else {
17506
17699
  _this.timerCount = (_this.timerCount - 1) < 0 ? 0 : (_this.timerCount - 1);
17507
17700
  }
@@ -18609,8 +18802,14 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18609
18802
  }
18610
18803
  if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
18611
18804
  !this.elementOffsetLeft) || !this.parent.enableVirtualization) {
18612
- this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
18613
- this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
18805
+ if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
18806
+ this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
18807
+ this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
18808
+ }
18809
+ else {
18810
+ this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
18811
+ this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
18812
+ }
18614
18813
  this.elementOffsetWidth = this.taskBarEditElement.offsetWidth;
18615
18814
  this.elementOffsetHeight = this.taskBarEditElement.offsetHeight;
18616
18815
  }
@@ -18779,6 +18978,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
18779
18978
  this.addedRecord = null;
18780
18979
  this.dialogEditValidationFlag = false;
18781
18980
  this.ganttResources = [];
18981
+ this.isValidData = true;
18782
18982
  /**
18783
18983
  * @private
18784
18984
  */
@@ -19020,7 +19220,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19020
19220
  tempData[field] = 0;
19021
19221
  tempData.ganttProperties.work = tempData[field];
19022
19222
  }
19023
- else if (columns[i].field === 'taskType') {
19223
+ else if (columns[i].field === taskSettings.type) {
19024
19224
  tempData[field] = this.parent.taskType;
19025
19225
  tempData.ganttProperties.taskType = tempData[field];
19026
19226
  }
@@ -19063,6 +19263,24 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19063
19263
  */
19064
19264
  DialogEdit.prototype.openEditDialog = function (taskId) {
19065
19265
  var ganttObj = this.parent;
19266
+ if (!isNullOrUndefined(taskId)) {
19267
+ if (!isNullOrUndefined(taskId['ganttProperties'])) {
19268
+ if (typeof taskId['ganttProperties']['taskId'] === 'string') {
19269
+ this.numericOrString = "stringedit";
19270
+ }
19271
+ else {
19272
+ this.numericOrString = "numericedit";
19273
+ }
19274
+ }
19275
+ if (isNullOrUndefined(taskId['ganttProperties']) && !isNullOrUndefined(taskId)) {
19276
+ if (isNaN(Number(taskId)) || this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
19277
+ this.numericOrString = "stringedit";
19278
+ }
19279
+ else {
19280
+ this.numericOrString = "numericedit";
19281
+ }
19282
+ }
19283
+ }
19066
19284
  if (typeof taskId === 'object' && !isNullOrUndefined(taskId)) {
19067
19285
  this.rowIndex = this.parent.currentViewData.indexOf(taskId);
19068
19286
  if (this.rowIndex > -1) {
@@ -19097,11 +19315,11 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19097
19315
  this.beforeOpenArgs.rowIndex = this.rowIndex;
19098
19316
  var dialogMaxWidth = this.parent.isAdaptive ? '' : '600px';
19099
19317
  var dialog = this.parent.createElement('div', { id: ganttObj.element.id + '_dialog', styles: 'max-width:' + dialogMaxWidth });
19318
+ dialog.classList.add('e-gantt-dialog');
19100
19319
  ganttObj.element.appendChild(dialog);
19101
19320
  dialogModel.animationSettings = { effect: 'None' };
19102
19321
  dialogModel.header = this.localeObj.getConstant(this.isEdit ? 'editDialogTitle' : 'addDialogTitle');
19103
19322
  dialogModel.isModal = true;
19104
- dialogModel.cssClass = 'e-gantt-dialog';
19105
19323
  dialogModel.allowDragging = this.parent.isAdaptive ? false : true;
19106
19324
  dialogModel.showCloseIcon = true;
19107
19325
  var position = this.parent.isAdaptive ? { X: 'top', Y: 'left' } : { X: 'center', Y: 'center' };
@@ -19456,6 +19674,13 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19456
19674
  placeholder: column.headerText,
19457
19675
  floatLabelType: 'Auto'
19458
19676
  };
19677
+ if (!isNullOrUndefined(this.parent.taskFields.id) && !isNullOrUndefined(this.parent.columnMapping.id)
19678
+ && !isNullOrUndefined(this.numericOrString)) {
19679
+ if (taskSettings.id === column.field) {
19680
+ column.editType = this.numericOrString;
19681
+ }
19682
+ }
19683
+
19459
19684
  switch (column.editType) {
19460
19685
  case 'booleanedit':
19461
19686
  {
@@ -19470,7 +19695,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19470
19695
  case 'stringedit':
19471
19696
  {
19472
19697
  var textBox = common;
19473
- if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.startDate ||
19698
+ if (column.field === ganttObj.columnMapping.duration || column.field === ganttObj.columnMapping.id || column.field === ganttObj.columnMapping.startDate ||
19474
19699
  column.field === ganttObj.columnMapping.endDate) {
19475
19700
  textBox.change = function (args) {
19476
19701
  _this.validateScheduleFields(args, column, ganttObj);
@@ -19527,7 +19752,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19527
19752
  break;
19528
19753
  }
19529
19754
  case 'dropdownedit':
19530
- if (column.field === 'taskType' || column.field === ganttObj.columnMapping.manual) {
19755
+ if (column.field === ganttObj.columnMapping.type || column.field === ganttObj.columnMapping.manual) {
19531
19756
  var dataKey = 'dataSource';
19532
19757
  var fieldsKey = 'fields';
19533
19758
  var types = [
@@ -19555,12 +19780,19 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19555
19780
  return fieldsModel;
19556
19781
  };
19557
19782
  DialogEdit.prototype.validateScheduleFields = function (args, column, ganttObj) {
19558
- var dialog = ganttObj.editModule.dialogModule.dialog;
19783
+ var _a;
19784
+ var dialog;
19785
+ if (!isNullOrUndefined(ganttObj.editModule.dialogModule.dialog)) {
19786
+ dialog = ganttObj.editModule.dialogModule.dialog;
19787
+ }
19559
19788
  var targetId = null;
19560
19789
  var inputElement;
19561
19790
  var currentData = ganttObj.editModule.dialogModule.editedRecord;
19562
19791
  var cellValue = null;
19563
19792
  var colName = null;
19793
+ var formObject;
19794
+ var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
19795
+ var strViewType = this.parent.viewType;
19564
19796
  if (!isNullOrUndefined(args.element)) {
19565
19797
  inputElement = args.element;
19566
19798
  targetId = inputElement.getAttribute('id');
@@ -19582,6 +19814,20 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19582
19814
  else {
19583
19815
  cellValue = inputElement.value;
19584
19816
  colName = targetId.replace(ganttObj.element.id, '');
19817
+ if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
19818
+ var customFn = function (args) {
19819
+ if (strViewType === 'ResourceView') {
19820
+ return ids.indexOf('T' + args['value']) === -1 && ids.indexOf('R' + args['value']) === -1;
19821
+ }
19822
+ else {
19823
+ return ids.indexOf(args['value']) === -1;
19824
+ }
19825
+ };
19826
+ var options = {
19827
+ rules: (_a = {}, _a[this.parent.taskFields.id] = { required: true, minLength: [customFn, 'ID is already present, please enter new value'] }, _a)
19828
+ };
19829
+ formObject = new FormValidator('#' + this.parent.element.id + 'GeneralTabContainer', options);
19830
+ }
19585
19831
  }
19586
19832
  if (colName.search('Segments') === 0) {
19587
19833
  colName = colName.replace('SegmentsTabContainer', '');
@@ -19805,7 +20051,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19805
20051
  this.validateDuration(currentData);
19806
20052
  }
19807
20053
  }
19808
- if (columnName === 'taskType') {
20054
+ if (columnName === taskSettings.type) {
19809
20055
  this.parent.setRecordValue('taskType', value, ganttProp, true);
19810
20056
  }
19811
20057
  if (taskSettings.manual === columnName) {
@@ -20165,9 +20411,6 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20165
20411
  item.content = this.renderGeneralTab(item.content);
20166
20412
  }
20167
20413
  else if (item.content === 'Dependency') {
20168
- if (this.editedRecord.hasChildRecords) {
20169
- item.disabled = true;
20170
- }
20171
20414
  item.content = this.renderPredecessorTab(item.content);
20172
20415
  }
20173
20416
  else if (item.content === 'Resources') {
@@ -20273,6 +20516,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20273
20516
  };
20274
20517
  DialogEdit.prototype.isCheckIsDisabled = function (column) {
20275
20518
  var disabled = false;
20519
+ var stringOrNumber;
20276
20520
  if (column.allowEditing === false || column.isPrimaryKey || this.parent.readOnly) {
20277
20521
  if (this.parent.customColumns.indexOf(column.field) !== -1) {
20278
20522
  disabled = true;
@@ -20282,8 +20526,19 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20282
20526
  column.field === this.parent.taskFields.duration || column.field === this.parent.taskFields.progress ||
20283
20527
  column.field === this.parent.taskFields.startDate || column.field === this.parent.taskFields.endDate ||
20284
20528
  column.field === this.parent.taskFields.baselineStartDate || column.field === this.parent.taskFields.baselineEndDate ||
20285
- column.field === this.parent.taskFields.work || column.field === 'taskType') {
20286
- disabled = true;
20529
+ column.field === this.parent.taskFields.work || column.field === this.parent.taskFields.type) {
20530
+ for (var i = 0; i < this.parent.currentViewData['length']; i++) {
20531
+ if (!isNullOrUndefined(this.parent.currentViewData[i].ganttProperties.taskId)) {
20532
+ stringOrNumber = this.parent.currentViewData[i].ganttProperties.taskId;
20533
+ break;
20534
+ }
20535
+ }
20536
+ if (typeof (stringOrNumber) === "string") {
20537
+ disabled = false;
20538
+ }
20539
+ else {
20540
+ disabled = true;
20541
+ }
20287
20542
  }
20288
20543
  }
20289
20544
  }
@@ -20295,13 +20550,30 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20295
20550
  if ((column.field === this.parent.taskFields.endDate && ((!isNullOrUndefined(this.editedRecord['isManual']) &&
20296
20551
  this.editedRecord['isManual'] == false) || this.parent.taskMode == 'Auto')) || column.field === this.parent.taskFields.duration ||
20297
20552
  column.field === this.parent.taskFields.progress || column.field === this.parent.taskFields.work ||
20298
- column.field === 'taskType') {
20553
+ column.field === this.parent.taskFields.type) {
20299
20554
  disabled = true;
20300
20555
  }
20301
20556
  }
20302
20557
  }
20303
20558
  return disabled;
20304
20559
  };
20560
+ DialogEdit.prototype.isParentValid = function (data) {
20561
+ if (data.length > 0) {
20562
+ for (var i = 0; i < data.length; i++) {
20563
+ if (data[i].uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
20564
+ this.isValidData = false;
20565
+ break;
20566
+ }
20567
+ if (data[i].hasChildRecords) {
20568
+ this.isParentValid(data[i].childRecords);
20569
+ }
20570
+ if (!this.isValidData) {
20571
+ break;
20572
+ }
20573
+ }
20574
+ }
20575
+ return this.isValidData;
20576
+ };
20305
20577
  DialogEdit.prototype.renderPredecessorTab = function (itemName) {
20306
20578
  var _this = this;
20307
20579
  var ganttObj = this.parent;
@@ -20599,7 +20871,26 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20599
20871
  this.preTableCollection = [];
20600
20872
  for (var i = 0; i < flatData.length; i++) {
20601
20873
  var data = flatData[i];
20602
- if (data.hasChildRecords) {
20874
+ var currentFlatData = data;
20875
+ if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
20876
+ this.isValidData = false;
20877
+ }
20878
+ else {
20879
+ do {
20880
+ if (currentFlatData.parentItem) {
20881
+ currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
20882
+ if (currentFlatData.uniqueID == this.beforeOpenArgs.rowData['uniqueID']) {
20883
+ this.isValidData = false;
20884
+ break;
20885
+ }
20886
+ }
20887
+ } while (currentFlatData.parentItem);
20888
+ }
20889
+ if (data.hasChildRecords && this.isValidData) {
20890
+ this.isValidData = this.isParentValid(data.childRecords);
20891
+ }
20892
+ if (!this.isValidData) {
20893
+ this.isValidData = true;
20603
20894
  continue;
20604
20895
  }
20605
20896
  var taskId = this.parent.viewType === 'ResourceView' ? data.ganttProperties.taskId.toString()
@@ -20805,6 +21096,10 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20805
21096
  if (inputElement) {
20806
21097
  var fieldName = inputElement.id.replace(ganttObj.element.id, '');
20807
21098
  var controlObj = div.querySelector('#' + ganttObj.element.id + fieldName).ej2_instances[0];
21099
+ if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit" && fieldName === this.parent.taskFields.id) {
21100
+ var valueString = controlObj.value.toString();
21101
+ controlObj.value = valueString;
21102
+ }
20808
21103
  var column = ganttObj.columnByField[fieldName];
20809
21104
  if (!isNullOrUndefined(column.edit) && isNullOrUndefined(column.edit.params)) {
20810
21105
  var read = column.edit.read;
@@ -20840,6 +21135,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20840
21135
  this.parent.setRecordValue('duration', fromRecord.ganttProperties.duration, toRecord.ganttProperties, true);
20841
21136
  this.parent.setRecordValue('durationUnit', fromRecord.ganttProperties.durationUnit, toRecord.ganttProperties, true);
20842
21137
  this.parent.setRecordValue('work', fromRecord.ganttProperties.work, toRecord.ganttProperties, true);
21138
+ this.parent.setRecordValue('type', fromRecord.ganttProperties.taskType, toRecord.ganttProperties, true);
20843
21139
  if (!isNullOrUndefined(this.parent.taskFields.startDate)) {
20844
21140
  this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.startDate);
20845
21141
  }
@@ -20862,6 +21158,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20862
21158
  if (!isNullOrUndefined(this.parent.taskFields.manual)) {
20863
21159
  this.parent.dataOperation.updateMappingData(this.rowData, this.parent.taskFields.manual);
20864
21160
  }
21161
+ if (!isNullOrUndefined(this.parent.taskFields.type)) {
21162
+ this.parent.dataOperation.updateMappingData(this.rowData, "type");
21163
+ }
20865
21164
  };
20866
21165
  DialogEdit.prototype.updatePredecessorTab = function (preElement) {
20867
21166
  var gridObj = preElement.ej2_instances[0];
@@ -21103,8 +21402,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
21103
21402
  this.parent.connectorLineModule.removeConnectorLineById('parent' + predecessor[from] + 'child' + predecessor[to]);
21104
21403
  parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[from]);
21105
21404
  childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[to]);
21106
- if ((parentGanttRecord && parentGanttRecord.expanded === true) ||
21107
- (childGanttRecord && childGanttRecord.expanded === true)) {
21405
+ if (parentGanttRecord || childGanttRecord) {
21108
21406
  connectorObj =
21109
21407
  this.parent.predecessorModule.updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
21110
21408
  if (!isNullOrUndefined(connectorObj)) {
@@ -21143,14 +21441,36 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
21143
21441
  ConnectorLineEdit.prototype.idFromPredecessor = function (pre) {
21144
21442
  var preArray = pre.split(',');
21145
21443
  var preIdArray = [];
21444
+ var values;
21445
+ var match = [];
21146
21446
  for (var j = 0; j < preArray.length; j++) {
21147
21447
  var strArray = [];
21148
- for (var i = 0; i < preArray[j].length; i++) {
21149
- if (!isNullOrUndefined(preArray[j].charAt(i)) && parseInt(preArray[j].charAt(i), 10).toString() !== 'NaN') {
21150
- strArray.push(preArray[j].charAt(i));
21448
+ values = preArray[j].split('+');
21449
+ if (preArray[j].indexOf('-') >= 0) {
21450
+ values = preArray[j].split('-');
21451
+
21452
+ }
21453
+ if (!isNullOrUndefined(values[0])) {
21454
+ var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
21455
+ if (ids.indexOf(values[0]) === -1) {
21456
+ if (values[0].indexOf(" ") != -1) {
21457
+ match = values[0].split(" ");
21458
+ if (match.length === 1) {
21459
+ match = values[0].match(/(\d+|[A-z]+)/g);
21460
+ }
21461
+ strArray.push(match[0]);
21462
+ }
21463
+ else {
21464
+ if (values[0].length === 1 || values[0].length === 2) {
21465
+ strArray.push(values[0]);
21466
+ }
21467
+ else {
21468
+ strArray.push(values[0].slice(0, -2));
21469
+ }
21470
+ }
21151
21471
  }
21152
21472
  else {
21153
- break;
21473
+ strArray.push(values[0]);
21154
21474
  }
21155
21475
  }
21156
21476
  preIdArray.push((strArray.join('')));
@@ -21208,6 +21528,75 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
21208
21528
  }
21209
21529
  return true;
21210
21530
  };
21531
+ // Get the root parent of the record
21532
+ ConnectorLineEdit.prototype.getRootParent = function (rec) {
21533
+ var parentRec = rec;
21534
+ if (rec.parentItem) {
21535
+ parentRec = this.parent.flatData.filter(function (item) {
21536
+ return item.uniqueID == rec.parentUniqueID;
21537
+ })[0];
21538
+ if (parentRec.parentItem) {
21539
+ parentRec = this.getRootParent(parentRec);
21540
+ }
21541
+ return parentRec;
21542
+ }
21543
+ return parentRec;
21544
+ };
21545
+ // To check whether the predecessor drawn is valid for parent task
21546
+ ConnectorLineEdit.prototype.validateParentPredecessor = function (fromRecord, toRecord) {
21547
+ if (toRecord.hasChildRecords && !fromRecord.hasChildRecords) {
21548
+ if (fromRecord.parentUniqueID === toRecord.uniqueID) {
21549
+ return false;
21550
+ }
21551
+ else {
21552
+ do {
21553
+ if (fromRecord.parentItem) {
21554
+ fromRecord = this.parent.flatData[this.parent.ids.indexOf(fromRecord.parentItem.taskId)];
21555
+ if (fromRecord.uniqueID === toRecord.uniqueID) {
21556
+ return false;
21557
+ }
21558
+ }
21559
+ } while (fromRecord.parentItem);
21560
+ }
21561
+ }
21562
+ else if (!toRecord.hasChildRecords && fromRecord.hasChildRecords) {
21563
+ if (toRecord.parentUniqueID === fromRecord.uniqueID) {
21564
+ return false;
21565
+ }
21566
+ else {
21567
+ do {
21568
+ if (toRecord.parentItem) {
21569
+ toRecord = this.parent.flatData[this.parent.ids.indexOf(toRecord.parentItem.taskId)];
21570
+ if (toRecord.uniqueID === fromRecord.uniqueID) {
21571
+ return false;
21572
+ }
21573
+ }
21574
+ } while (toRecord.parentItem);
21575
+ }
21576
+ }
21577
+ else if (toRecord.hasChildRecords && fromRecord.hasChildRecords) {
21578
+ if (toRecord.parentItem && fromRecord.parentItem) {
21579
+ if (fromRecord.parentUniqueID === toRecord.uniqueID || fromRecord.uniqueID === toRecord.parentUniqueID) {
21580
+ return false;
21581
+ }
21582
+ }
21583
+ else {
21584
+ if (!toRecord.parentItem && fromRecord.parentItem) {
21585
+ var fromRootParent = this.parent.connectorLineEditModule.getRootParent(fromRecord);
21586
+ if (fromRootParent.uniqueID === toRecord.uniqueID) {
21587
+ return false;
21588
+ }
21589
+ }
21590
+ else if (toRecord.parentItem && !fromRecord.parentItem) {
21591
+ var toRootParent = this.parent.connectorLineEditModule.getRootParent(toRecord);
21592
+ if (toRootParent.uniqueID === fromRecord.uniqueID) {
21593
+ return false;
21594
+ }
21595
+ }
21596
+ }
21597
+ }
21598
+ return true;
21599
+ };
21211
21600
  /**
21212
21601
  * To validate predecessor relations
21213
21602
  *
@@ -21225,10 +21614,12 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
21225
21614
  if (!isNullOrUndefined(predecessorString) && predecessorString.length > 0) {
21226
21615
  predecessorIdArray = this.idFromPredecessor(predecessorString);
21227
21616
  var _loop_2 = function (count) {
21228
- //Check edited item has parent item in predecessor collection
21229
- var checkParent = this_2.checkParentRelation(ganttRecord, predecessorIdArray);
21230
- if (!checkParent) {
21231
- return { value: false };
21617
+ if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this_2.parent.taskFields.id]) {
21618
+ var num = this_2.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
21619
+ var fromRecord = this_2.parent.currentViewData[num];
21620
+ if (fromRecord && ganttRecord) {
21621
+ flag = this_2.validateParentPredecessor(fromRecord, ganttRecord);
21622
+ }
21232
21623
  }
21233
21624
  // Check if predecessor exist more then one
21234
21625
  var tempIdArray = predecessorIdArray.slice(0);
@@ -22613,6 +23004,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
22613
23004
  }
22614
23005
  this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
22615
23006
  }
23007
+ if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
23008
+ (args.action === "DrawConnectorLine" || args.action === "DialogEditing")) {
23009
+ this.updateChildItems(ganttRecord);
23010
+ }
22616
23011
  this.updateParentItemOnEditing();
22617
23012
  }
22618
23013
  /** Update parent up-to zeroth level */
@@ -23070,9 +23465,16 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23070
23465
  }
23071
23466
  for (var index = 0; index < currentLength; index++) {
23072
23467
  var recordIndex = [];
23073
- var resourceID = parseInt(currentResource[index][this.parent.resourceFields.id], 10);
23468
+ var resourceID = parseInt(currentResource[index][this.parent.resourceFields.id], 10).toString();
23469
+ if (resourceID === "NaN") {
23470
+ resourceID = currentResource[index][this.parent.resourceFields.id];
23471
+ }
23074
23472
  for (var i = 0; i < prevResource.length; i++) {
23075
- if (parseInt(prevResource[i][this.parent.resourceFields.id], 10) === resourceID) {
23473
+ var prevResourceID = parseInt(prevResource[i][this.parent.resourceFields.id], 10).toString();
23474
+ if (prevResourceID === "NaN") {
23475
+ prevResourceID = prevResource[i][this.parent.resourceFields.id];
23476
+ }
23477
+ if (prevResourceID === resourceID) {
23076
23478
  recordIndex.push(i);
23077
23479
  break;
23078
23480
  }
@@ -23084,7 +23486,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23084
23486
  }
23085
23487
  }
23086
23488
  else {
23087
- prevResource.splice(parseInt(recordIndex[0].toString(), 10), 1);
23489
+ var record1 = parseInt(recordIndex[0].toString(), 10);
23490
+ if (record1.toString() === "NaN") {
23491
+ record1 = recordIndex[0].toString();
23492
+ }
23493
+ prevResource.splice(record1, 1);
23088
23494
  }
23089
23495
  }
23090
23496
  var prevLength = prevResource ? prevResource.length : 0;
@@ -23399,6 +23805,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23399
23805
  var _loop_1 = function (i) {
23400
23806
  if (selectedRecords[i].parentItem) {
23401
23807
  var data = selectedRecords[i];
23808
+ var ids = data.ganttProperties.sharedTaskUniqueIds;
23809
+ for (var j = 0; j < ids.length; j++) {
23810
+ deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(ids[j].toString())]);
23811
+ }
23402
23812
  deleteRecords.push(this_1.parent.flatData[this_1.parent.ids.indexOf(data.ganttProperties.rowUniqueID)]);
23403
23813
  }
23404
23814
  else {
@@ -23877,12 +24287,34 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23877
24287
  * @private
23878
24288
  */
23879
24289
  Edit$$1.prototype.getNewTaskId = function () {
23880
- var maxId = DataUtil.aggregates.max(this.parent.flatData, this.parent.taskFields.id);
23881
- if (!isNullOrUndefined(maxId)) {
23882
- return parseInt(maxId.toString(), 10) + 1;
24290
+ var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
24291
+ var maxId = ids.length;
24292
+ var newTaskId = maxId + 1;
24293
+ if (this.parent.viewType === 'ResourceView') {
24294
+ if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
24295
+ newTaskId = newTaskId + 1;
24296
+ if (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1) {
24297
+ do {
24298
+ newTaskId = newTaskId + 1;
24299
+ } while (ids.indexOf('T' + newTaskId) !== -1 || ids.indexOf('R' + newTaskId) !== -1);
24300
+ }
24301
+ }
23883
24302
  }
23884
24303
  else {
23885
- return 1;
24304
+ if (ids.indexOf(newTaskId.toString()) != -1) {
24305
+ newTaskId = newTaskId + 1;
24306
+ if (ids.indexOf(newTaskId.toString()) != -1) {
24307
+ do {
24308
+ newTaskId = newTaskId + 1;
24309
+ } while (ids.indexOf(newTaskId.toString()) != -1);
24310
+ }
24311
+ }
24312
+ }
24313
+ if (this.parent.columnByField[this.parent.taskFields.id].editType === "stringedit") {
24314
+ return newTaskId = newTaskId.toString();
24315
+ }
24316
+ else {
24317
+ return newTaskId;
23886
24318
  }
23887
24319
  };
23888
24320
  /**
@@ -23895,6 +24327,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23895
24327
  Edit$$1.prototype.prepareNewlyAddedData = function (obj, rowPosition) {
23896
24328
  var taskModel = this.parent.taskFields;
23897
24329
  var id;
24330
+ var newTaskIDmd;
23898
24331
  var ids = this.parent.ids;
23899
24332
  /*Validate Task Id of data*/
23900
24333
  if (obj[taskModel.id]) {
@@ -23902,7 +24335,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23902
24335
  obj[taskModel.id] = null;
23903
24336
  }
23904
24337
  else {
23905
- obj[taskModel.id] = isNullOrUndefined(obj[taskModel.id]) ? null : parseInt(obj[taskModel.id], 10);
24338
+ if (typeof (obj[taskModel.id]) === "string") {
24339
+ newTaskIDmd = obj[taskModel.id];
24340
+ }
24341
+ else {
24342
+ newTaskIDmd = parseInt(obj[taskModel.id], 10);
24343
+ }
24344
+ obj[taskModel.id] = isNullOrUndefined(newTaskIDmd) ? null : newTaskIDmd;
23906
24345
  }
23907
24346
  }
23908
24347
  if (!obj[taskModel.id]) {
@@ -24142,7 +24581,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24142
24581
  recordIndex = currentItemIndex + dataChildCount + 1;
24143
24582
  //Expand Add record's parent item for project view
24144
24583
  if (!this.addRowSelectedItem.expanded && !this.parent.enableMultiTaskbar) {
24145
- this.parent.expandByID(Number(this.addRowSelectedItem.ganttProperties.rowUniqueID));
24584
+ this.parent.expandByID(this.addRowSelectedItem.ganttProperties.rowUniqueID);
24146
24585
  }
24147
24586
  updatedCollectionIndex = currentViewData.indexOf(this.addRowSelectedItem) +
24148
24587
  this.getVisibleChildRecordCount(this.addRowSelectedItem, 0, currentViewData) + 1;
@@ -24182,6 +24621,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24182
24621
  /* Record collection update */
24183
24622
  flatRecords.splice(recordIndex, 0, record);
24184
24623
  currentViewData.splice(updatedCollectionIndex, 0, record);
24624
+ if (this.parent.viewType === 'ResourceView' && typeof (record.ganttProperties.taskId) === "number") {
24625
+ var taskString = record.ganttProperties.taskId;
24626
+ ids.push(taskString.toString());
24627
+ }
24185
24628
  ids.splice(recordIndex, 0, record.ganttProperties.rowUniqueID.toString());
24186
24629
  if (this.parent.viewType === 'ResourceView') {
24187
24630
  var taskId = record.level === 0 ? 'R' + record.ganttProperties.taskId : 'T' + record.ganttProperties.taskId;
@@ -24390,6 +24833,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24390
24833
  */
24391
24834
  Edit$$1.prototype.addRecord = function (data, rowPosition, rowIndex) {
24392
24835
  var _this = this;
24836
+ var tempTaskID = this.parent.taskFields.id;
24393
24837
  if (this.parent.editModule && this.parent.editSettings.allowAdding) {
24394
24838
  this.parent.isDynamicData = true;
24395
24839
  var cAddedRecord_1 = [];
@@ -24411,6 +24855,12 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24411
24855
  args = this.constructTaskAddedEventArgs(cAddedRecord_1, this.parent.editedRecords, 'beforeAdd');
24412
24856
  this.parent.showSpinner();
24413
24857
  this.parent.trigger('actionBegin', args, function (args) {
24858
+ if (!isNullOrUndefined(args.data[tempTaskID])) {
24859
+ if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
24860
+ args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
24861
+ args.newTaskData[tempTaskID] = args.data[tempTaskID];
24862
+ }
24863
+ }
24414
24864
  if (!args.cancel) {
24415
24865
  if (isRemoteData(_this.parent.dataSource)) {
24416
24866
  var data_2 = _this.parent.dataSource;
@@ -25476,10 +25926,13 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
25476
25926
  this.parent.on('actionComplete', this.actionComplete, this);
25477
25927
  this.parent.on('columnMenuOpen', this.columnMenuOpen, this);
25478
25928
  };
25929
+ Filter$$1.prototype.wireEvents = function (a) {
25930
+ EventHandler.add(document.getElementById(a), 'click', this.mouseClickHandler, this);
25931
+ };
25479
25932
  Filter$$1.prototype.initiateFiltering = function (column) {
25480
25933
  var treeColumn = this.parent.getColumnByField(column.field, this.parent.treeGridModule.treeGridColumns);
25481
25934
  column.allowFiltering = column.allowFiltering === false ? false : true;
25482
- if (column.allowFiltering && this.parent.filterSettings.type === 'Menu' && !column.filter) {
25935
+ if (column.allowFiltering && (this.parent.filterSettings.type === 'Menu' || this.parent.filterSettings.type === 'Excel') && !column.filter) {
25483
25936
  column.filter = { ui: this.getCustomFilterUi(column) };
25484
25937
  }
25485
25938
  if (treeColumn) {
@@ -25509,6 +25962,14 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
25509
25962
  }
25510
25963
  return filterUI;
25511
25964
  };
25965
+ Filter$$1.prototype.mouseClickHandler = function (e) {
25966
+ if (closest(e.target, ".e-excelfilter")) {
25967
+ this.parent.treeGrid.grid.notify("click", e);
25968
+ }
25969
+ };
25970
+ Filter$$1.prototype.unWireEvents = function () {
25971
+ EventHandler.remove(this.parent.element, 'click', this.mouseClickHandler);
25972
+ };
25512
25973
  Filter$$1.prototype.getDatePickerFilter = function (columnName) {
25513
25974
  var _this = this;
25514
25975
  var parent = this.parent;
@@ -25630,6 +26091,15 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
25630
26091
  }
25631
26092
  };
25632
26093
  Filter$$1.prototype.actionComplete = function (args) {
26094
+ if (!isNullOrUndefined(args['filterModel'])) {
26095
+ if (!isNullOrUndefined(args['filterModel']['dialogObj'])) {
26096
+ if (!isNullOrUndefined(args['filterModel']['dialogObj']['element'])) {
26097
+ if (this.parent.filterSettings.type === 'Excel') {
26098
+ this.wireEvents(args['filterModel']['dialogObj']['element'].id);
26099
+ }
26100
+ }
26101
+ }
26102
+ }
25633
26103
  if (args.requestType === filterAfterOpen) {
25634
26104
  if (this.parent.treeGrid.filterSettings.type === 'Menu') {
25635
26105
  this.filterMenuElement = getValue('filterModel.dlgObj.element', args);
@@ -25647,12 +26117,15 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
25647
26117
  if ((args.columnName === predecessor && isNullOrUndefined(getValue(predecessor, filterValues)))
25648
26118
  || (args.columnName === resource && isNullOrUndefined(getValue(resource, filterValues)))) {
25649
26119
  var element = this.filterMenuElement.querySelector('.e-dropdownlist');
25650
- var instanceObj = getValue('ej2_instances[0]', element);
25651
- instanceObj.index = 2;
25652
- instanceObj.dataBind();
26120
+ var instanceObj = void 0;
26121
+ if (!isNullOrUndefined(element)) {
26122
+ instanceObj = getValue('ej2_instances[0]', element);
26123
+ instanceObj.index = 2;
26124
+ instanceObj.dataBind();
26125
+ }
25653
26126
  }
25654
26127
  else if (args.columnName === taskID && isNullOrUndefined(getValue(taskID, filterValues)) && this.parent.treeGrid.filterSettings.type === 'Menu') {
25655
- var element = this.filterMenuElement.querySelector('.e-numerictextbox');
26128
+ var element = this.filterMenuElement.querySelector('.e-flmenu-input');
25656
26129
  var instanceObj = getValue('ej2_instances[0]', element);
25657
26130
  if (!isNullOrUndefined(instanceObj) && isNullOrUndefined(this.parent.columnByField[args.columnName].format)) {
25658
26131
  instanceObj.format = 'n';
@@ -25683,6 +26156,7 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
25683
26156
  */
25684
26157
  Filter$$1.prototype.destroy = function () {
25685
26158
  this.removeEventListener();
26159
+ this.unWireEvents();
25686
26160
  };
25687
26161
  return Filter$$1;
25688
26162
  }());
@@ -26811,7 +27285,6 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
26811
27285
  this.nonworkingContainer = createElement('div', {
26812
27286
  className: nonworkingContainer
26813
27287
  });
26814
- this.nonworkingContainer.setAttribute("role", "NonWorkingDays");
26815
27288
  this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer);
26816
27289
  }
26817
27290
  };
@@ -27018,7 +27491,7 @@ var EventMarker$1 = /** @__PURE__ @class */ (function () {
27018
27491
  this.eventMarkersContainer = createElement('div', {
27019
27492
  className: eventMarkersContainer
27020
27493
  });
27021
- this.eventMarkersContainer.setAttribute("role", "EventMarker");
27494
+ this.eventMarkersContainer.setAttribute("role", "term");
27022
27495
  this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer);
27023
27496
  }
27024
27497
  this.eventMarkersContainer.innerHTML = '';
@@ -27173,13 +27646,13 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27173
27646
  CriticalPath.prototype.showCriticalPath = function (isCritical) {
27174
27647
  var modelIds = this.parent.ids;
27175
27648
  var totalRecords = this.parent.flatData;
27176
- if (isCritical && this.parent.flatData.length > 0 && !this.parent.enableMultiTaskbar) {
27649
+ if (isCritical && this.parent.flatData.length > 0) {
27177
27650
  this.parent.enableCriticalPath = true;
27178
27651
  var parentRecords = this.parent.treeGrid.parentData;
27179
27652
  var checkEndDateTaskid = void 0;
27180
27653
  var checkEndDate = parentRecords[0].ganttProperties.endDate;
27181
27654
  var dateDifference = 0;
27182
- var checkBeyondEnddate = [];
27655
+ var checkBeyondEnddate_1 = [];
27183
27656
  var totalPredecessorsCollection = [];
27184
27657
  var totalPredecessorsCollectionId = [];
27185
27658
  var predecessorIndex = 0;
@@ -27218,12 +27691,12 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27218
27691
  totalRecords[j].slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
27219
27692
  totalRecords[j].ganttProperties.slack = dateDifference + ' ' + totalRecords[j].ganttProperties.durationUnit;
27220
27693
  if (totalRecords[j].ganttProperties.endDate >= checkEndDate) {
27221
- checkBeyondEnddate.push(parseInt(totalRecords[j].ganttProperties.taskId, 10));
27694
+ checkBeyondEnddate_1.push(totalRecords[j].ganttProperties.taskId);
27222
27695
  }
27223
27696
  if (totalRecords[j].ganttProperties.predecessor) {
27224
27697
  if (totalRecords[j].ganttProperties.predecessor.length !== 0) {
27225
27698
  totalPredecessorsCollection.push(totalRecords[j]);
27226
- totalPredecessorsCollectionId.push(parseInt(totalRecords[j].ganttProperties.taskId, 10));
27699
+ totalPredecessorsCollectionId.push((totalRecords[j].ganttProperties.taskId));
27227
27700
  }
27228
27701
  }
27229
27702
  }
@@ -27232,25 +27705,36 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27232
27705
  this.resourceCollectionIds[i] = this.parent.taskIds[i].slice(1);
27233
27706
  }
27234
27707
  }
27235
- // seperate the predecessor connected taskes from the individual taskes that ends on total project end date
27236
- for (var k = 0; k < checkBeyondEnddate.length; k++) {
27237
- if (totalPredecessorsCollectionId.indexOf(checkBeyondEnddate[k]) === -1) {
27238
- if (this.parent.viewType === 'ProjectView') {
27239
- predecessorIndex = modelIds.indexOf(checkBeyondEnddate[k].toString());
27708
+ var _loop_1 = function (k) {
27709
+ if (totalPredecessorsCollectionId.indexOf(checkBeyondEnddate_1[k]) === -1) {
27710
+ if (this_1.parent.viewType === 'ProjectView') {
27711
+ predecessorIndex = modelIds.indexOf(checkBeyondEnddate_1[k].toString());
27240
27712
  }
27241
27713
  else {
27242
- predecessorIndex = this.resourceCollectionIds.indexOf(checkBeyondEnddate[k].toString());
27714
+ var currentRecords = this_1.parent.currentViewData.filter(function (data) {
27715
+ return parseInt(data.ganttProperties.taskId) == checkBeyondEnddate_1[k];
27716
+ });
27717
+ for (var i = 0; i < currentRecords.length; i++) {
27718
+ if (!currentRecords[i].hasChildRecords && currentRecords[i].ganttProperties.endDate >= this_1.maxEndDate) {
27719
+ predecessorIndex = currentRecords[i].index;
27720
+ }
27721
+ }
27243
27722
  }
27244
27723
  if (totalRecords[predecessorIndex].ganttProperties.progress < 100) {
27245
27724
  totalRecords[predecessorIndex].isCritical = true;
27246
27725
  totalRecords[predecessorIndex].ganttProperties.isCritical = true;
27247
27726
  }
27248
27727
  totalRecords[predecessorIndex]['slack'] = 0 + ' ' + totalRecords[predecessorIndex].ganttProperties.durationUnit;
27249
- taskBeyondEnddate.push(checkBeyondEnddate[k]);
27728
+ taskBeyondEnddate.push(checkBeyondEnddate_1[k]);
27250
27729
  }
27251
27730
  else {
27252
- predecessorTaskBeyondEnddate.push(checkBeyondEnddate[k]);
27731
+ predecessorTaskBeyondEnddate.push(checkBeyondEnddate_1[k]);
27253
27732
  }
27733
+ };
27734
+ var this_1 = this;
27735
+ // seperate the predecessor connected taskes from the individual taskes that ends on total project end date
27736
+ for (var k = 0; k < checkBeyondEnddate_1.length; k++) {
27737
+ _loop_1(k);
27254
27738
  }
27255
27739
  var predecessorLength = totalPredecessorsCollection.length;
27256
27740
  var endTask = [];
@@ -27260,12 +27744,22 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27260
27744
  var from = -1;
27261
27745
  var toPredecessor = -1;
27262
27746
  var fromPredecessor = -1;
27747
+ var tempTaskId = void 0;
27263
27748
  var currentIndex = x;
27264
27749
  var predecessor = totalPredecessorsCollection[x].ganttProperties.predecessor;
27265
27750
  var individualPredecessorLength = totalPredecessorsCollection[x].ganttProperties.predecessor.length;
27266
- var taskid = (parseInt(totalPredecessorsCollection[x].ganttProperties.taskId, 10));
27751
+ var taskid = ((totalPredecessorsCollection[x].ganttProperties.taskId));
27267
27752
  for (var y = 0; y < individualPredecessorLength; y++) {
27268
- if (parseInt(predecessor[y].from, 10) === taskid) {
27753
+ if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) != "string") {
27754
+ tempTaskId = parseInt((predecessor[y].from), 10);
27755
+ }
27756
+ else if (!isNaN(Number(predecessor[y].from)) && typeof (taskid) === "string") {
27757
+ tempTaskId = predecessor[y].from;
27758
+ }
27759
+ else {
27760
+ tempTaskId = predecessor[y].from;
27761
+ }
27762
+ if (tempTaskId === taskid) {
27269
27763
  if (to === -1) {
27270
27764
  if (!predecessor[y].offset) {
27271
27765
  to = predecessor[y].to;
@@ -27287,7 +27781,16 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27287
27781
  }
27288
27782
  }
27289
27783
  }
27290
- if (parseInt(predecessor[y].to, 10) === taskid) {
27784
+ if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) != "string") {
27785
+ tempTaskId = parseInt((predecessor[y].to), 10);
27786
+ }
27787
+ else if (!isNaN(Number(predecessor[y].to)) && typeof (taskid) === "string") {
27788
+ tempTaskId = predecessor[y].to;
27789
+ }
27790
+ else {
27791
+ tempTaskId = predecessor[y].to;
27792
+ }
27793
+ if (tempTaskId === taskid) {
27291
27794
  if (from === -1) {
27292
27795
  if (!predecessor[y].offset) {
27293
27796
  from = predecessor[y].from;
@@ -27356,7 +27859,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27356
27859
  this.detailPredecessorCollection = collection;
27357
27860
  this.predecessorCollectionTaskIds = collectionTaskId;
27358
27861
  }
27359
- if (isCritical === false && this.parent.flatData.length > 0 && !this.parent.enableMultiTaskbar) {
27862
+ if (isCritical === false && this.parent.flatData.length > 0) {
27360
27863
  var pathIndex = void 0;
27361
27864
  this.parent.enableCriticalPath = false;
27362
27865
  for (var z = 0; z < this.criticalPathCollection.length; z++) {
@@ -27372,6 +27875,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27372
27875
  CriticalPath.prototype.slackCalculation = function (fromDataObject, collection, collectionTaskId, checkEndDate, flatRecords, modelRecordIds) {
27373
27876
  var fromDateArray = fromDataObject[0]['fromdata'].split(',');
27374
27877
  var fromDataPredecessor = fromDataObject[0]['fromDataPredecessor'].split(',');
27878
+ collectionTaskId = collectionTaskId.toString();
27879
+ collectionTaskId = collectionTaskId.split(',');
27375
27880
  var fromDateArray1 = [];
27376
27881
  var fromTaskIdIndex;
27377
27882
  var indexFromTaskId;
@@ -27383,8 +27888,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27383
27888
  var ffslack;
27384
27889
  for (var i = 0; i < fromDateArray.length; i++) {
27385
27890
  fromDateArray1 = fromDateArray[i].split(':');
27386
- fromTaskIdIndex = collectionTaskId.indexOf(parseInt(fromDateArray1[0], 10));
27387
- totaskId = collectionTaskId.indexOf(parseInt(fromDataObject[0]['todateID'], 10));
27891
+ fromTaskIdIndex = collectionTaskId.indexOf((fromDateArray1[0].toString()));
27892
+ totaskId = collectionTaskId.indexOf((fromDataObject[0]['todateID'].toString()));
27388
27893
  if (this.parent.viewType === 'ProjectView') {
27389
27894
  indexFromTaskId = modelRecordIds.indexOf(fromDateArray1[0].toString());
27390
27895
  indexToTaskId = modelRecordIds.indexOf(fromDataObject[0]['todateID'].toString());
@@ -27729,6 +28234,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27729
28234
  CriticalPath.prototype.finalCriticalPath = function (collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
27730
28235
  var criticalPathIds = [];
27731
28236
  var index;
28237
+ var predecessorFrom;
27732
28238
  for (var x = collection.length - 1; x >= 0; x--) {
27733
28239
  if (this.parent.viewType === 'ProjectView') {
27734
28240
  index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
@@ -27772,7 +28278,13 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27772
28278
  /* eslint-disable-next-line */
27773
28279
  dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.endDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
27774
28280
  }
27775
- if (parseInt(predecessorLength[i].from, 10) === flatRecords[index][this.parent.taskFields.id] &&
28281
+ if (typeof (flatRecords[index][this.parent.taskFields.id]) === 'number') {
28282
+ predecessorFrom = parseInt(predecessorLength[i].from, 10);
28283
+ }
28284
+ else {
28285
+ predecessorFrom = predecessorLength[i].from;
28286
+ }
28287
+ if (predecessorFrom === flatRecords[index][this.parent.taskFields.id] &&
27776
28288
  flatRecords[toID].slack === noSlackValue && dateDifference <= 0) {
27777
28289
  flatRecords[index].slack = noSlackValue;
27778
28290
  flatRecords[index].ganttProperties.slack = noSlackValue;
@@ -27807,26 +28319,47 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27807
28319
  CriticalPath.prototype.criticalConnectorLine = function (criticalPathIds, collection, condition, collectionTaskId) {
27808
28320
  var ganttChartElement = this.parent.ganttChartModule.chartElement;
27809
28321
  this.parent.removeCriticalPathStyles();
27810
- for (var i = 0; i < criticalPathIds.length; i++) {
27811
- var criticalData = void 0;
27812
- if (this.parent.viewType === 'ProjectView') {
27813
- criticalData = this.parent.flatData[this.parent.ids.indexOf(criticalPathIds[i].toString())];
28322
+ var _loop_2 = function (i) {
28323
+ var criticalData;
28324
+ if (this_2.parent.viewType === 'ProjectView') {
28325
+ criticalData = this_2.parent.currentViewData[this_2.parent.ids.indexOf(criticalPathIds[i].toString())];
27814
28326
  }
27815
28327
  else {
27816
- criticalData = this.parent.flatData[this.resourceCollectionIds.indexOf(criticalPathIds[i].toString())];
28328
+ var currentRecords = this_2.parent.currentViewData.filter(function (data) {
28329
+ return (data.ganttProperties.taskId).toString() == criticalPathIds[i].toString();
28330
+ });
28331
+ for (var i_1 = 0; i_1 < currentRecords.length; i_1++) {
28332
+ if (currentRecords[i_1].ganttProperties.isCritical || currentRecords[i_1].ganttProperties.endDate >= this_2.maxEndDate) {
28333
+ criticalData = currentRecords[i_1];
28334
+ }
28335
+ }
27817
28336
  }
27818
- var index = this.parent.currentViewData.indexOf(criticalData);
27819
- var element = this.parent.getRowByIndex(index);
28337
+ var index = this_2.parent.currentViewData.indexOf(criticalData);
28338
+ var element = this_2.parent.getRowByIndex(index);
27820
28339
  var taskClass = void 0;
27821
- var columnFields = this.parent.taskFields;
28340
+ var columnFields = this_2.parent.taskFields;
28341
+ if (criticalData.parentItem) {
28342
+ var parentRecord = this_2.parent.currentViewData.filter(function (data) {
28343
+ return criticalData.parentItem.uniqueID == data.uniqueID;
28344
+ });
28345
+ var parentIndex = this_2.parent.currentViewData.indexOf(parentRecord[0]);
28346
+ var parentElement = this_2.parent.getRowByIndex(parentIndex);
28347
+ var parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
28348
+ for (var i_2 = 0; i_2 < parentTaskbarElement.length; i_2++) {
28349
+ if (parentTaskbarElement[i_2].getAttribute('rowuniqueid') == criticalData['rowUniqueID']) {
28350
+ addClass(parentTaskbarElement[i_2].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
28351
+ }
28352
+ }
28353
+ }
27822
28354
  /* eslint-disable-next-line */
27823
- if (this.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
28355
+ if (this_2.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
27824
28356
  taskClass = criticalUnscheduledTask;
27825
28357
  }
27826
28358
  else {
27827
28359
  taskClass = criticalChildProgressBarInnerDiv;
27828
28360
  }
27829
- if (element) {
28361
+ if (element && (this_2.parent.viewType === 'ProjectView' || (this_2.parent.viewType === 'ResourceView' &&
28362
+ !criticalData.hasChildRecords))) {
27830
28363
  if (element.getElementsByClassName('e-milestone-top')[0]) {
27831
28364
  addClass(element.querySelectorAll('.e-milestone-top'), criticalMilestoneTop);
27832
28365
  }
@@ -27840,19 +28373,32 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
27840
28373
  addClass(element.querySelectorAll('.e-gantt-child-progressbar-inner-div'), taskClass);
27841
28374
  }
27842
28375
  }
28376
+ };
28377
+ var this_2 = this;
28378
+ for (var i = 0; i < criticalPathIds.length; i++) {
28379
+ _loop_2(i);
27843
28380
  }
27844
28381
  if (collection.length !== 0) {
27845
28382
  var index = 0;
27846
28383
  var currentdata = void 0;
27847
28384
  var checking = [];
27848
28385
  var checkint = void 0;
28386
+ var values = void 0;
27849
28387
  for (var i = 0; i < this.criticalPathCollection.length; i++) {
27850
28388
  index = collectionTaskId.indexOf(this.criticalPathCollection[i]);
27851
28389
  currentdata = collection[index];
27852
28390
  if (index !== -1 && currentdata['to']) {
27853
28391
  checking = currentdata['to'].split(',');
27854
28392
  for (var j = 0; j < checking.length; j++) {
27855
- checkint = parseInt(checking[j], 10);
28393
+ values = checking[j].split('+');
28394
+ if (checking[j].indexOf('-') >= 0) {
28395
+ values = checking[j].split('-');
28396
+
28397
+ }
28398
+ checkint = (values[0].replace(":", ""));
28399
+ if (typeof (criticalPathIds[j]) === "number") {
28400
+ checkint = parseInt(values[0], 10);
28401
+ }
27856
28402
  if (criticalPathIds.indexOf(checkint) !== -1) {
27857
28403
  var lineElement = this.parent.element.querySelectorAll('#ConnectorLineparent' +
27858
28404
  currentdata['taskid'] + 'child' + checkint);
@@ -27984,7 +28530,12 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
27984
28530
  }
27985
28531
  switch (this.item) {
27986
28532
  case 'TaskInformation':
27987
- this.parent.openEditDialog(Number(this.rowData.ganttProperties.rowUniqueID));
28533
+ if (isNaN(Number(this.rowData.ganttProperties.rowUniqueID))) {
28534
+ this.parent.openEditDialog(this.rowData.ganttProperties.rowUniqueID);
28535
+ }
28536
+ else {
28537
+ this.parent.openEditDialog(Number(this.rowData.ganttProperties.rowUniqueID));
28538
+ }
27988
28539
  break;
27989
28540
  case 'Above':
27990
28541
  case 'Below':
@@ -28797,7 +29348,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
28797
29348
  };
28798
29349
  RowDD$$1.prototype.rowDragStartHelper = function (args) {
28799
29350
  this.parent.trigger('rowDragStartHelper', args);
28800
- if (this.parent.readOnly || this.parent.filterSettings.columns.length > 0) {
29351
+ if (this.parent.readOnly) {
28801
29352
  args.cancel = true;
28802
29353
  }
28803
29354
  if (this.parent.viewType === 'ResourceView' && getValue('level', args.data[0]) === 0) {
@@ -28933,7 +29484,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
28933
29484
  var uniqueTaskID_1 = this_1.parent.taskFields.id;
28934
29485
  if (draggedRecord.index < droppedRecord.index) {
28935
29486
  startIndex = draggedRecord.index;
28936
- var _loop_2 = function (i_1) {
29487
+ var _loop_3 = function (i_1) {
28937
29488
  var currentData = this_1.parent.currentViewData.filter(function (e) {
28938
29489
  return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
28939
29490
  })[0];
@@ -28943,14 +29494,14 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
28943
29494
  }
28944
29495
  };
28945
29496
  for (var i_1 = 0; i_1 < ganttData_1.length; i_1++) {
28946
- var state_2 = _loop_2(i_1);
29497
+ var state_2 = _loop_3(i_1);
28947
29498
  if (state_2 === "break")
28948
29499
  break;
28949
29500
  }
28950
29501
  }
28951
29502
  else {
28952
29503
  startIndex = droppedRecord.index;
28953
- var _loop_3 = function (i_2) {
29504
+ var _loop_4 = function (i_2) {
28954
29505
  var currentData = this_1.parent.currentViewData.filter(function (e) {
28955
29506
  return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
28956
29507
  })[0];
@@ -28960,12 +29511,12 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
28960
29511
  }
28961
29512
  };
28962
29513
  for (var i_2 = 0; i_2 < ganttData_1.length; i_2++) {
28963
- var state_3 = _loop_3(i_2);
29514
+ var state_3 = _loop_4(i_2);
28964
29515
  if (state_3 === "break")
28965
29516
  break;
28966
29517
  }
28967
29518
  }
28968
- var _loop_4 = function (i_3) {
29519
+ var _loop_5 = function (i_3) {
28969
29520
  if (!isNullOrUndefined(data_1[i_3])) {
28970
29521
  data_1[i_3].index = i_3;
28971
29522
  if (!isNullOrUndefined(data_1[i_3].parentItem)) {
@@ -28977,7 +29528,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
28977
29528
  }
28978
29529
  };
28979
29530
  for (var i_3 = startIndex; i_3 <= endIndex; i_3++) {
28980
- _loop_4(i_3);
29531
+ _loop_5(i_3);
28981
29532
  }
28982
29533
  }
28983
29534
  gObj.rowDragAndDropModule.refreshDataSource();
@@ -29038,6 +29589,66 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
29038
29589
  this.updateSharedResourceTask();
29039
29590
  }
29040
29591
  }
29592
+ if (this.parent.taskFields.dependency) {
29593
+ var isValidPredecessor = true;
29594
+ var draggedParent = void 0;
29595
+ var toParent_1;
29596
+ if (draggedRecord.parentItem) {
29597
+ draggedParent = this.parent.currentViewData[this.parent.ids.indexOf(draggedRecord.parentItem.taskId)];
29598
+ }
29599
+ else {
29600
+ draggedParent = draggedRecord;
29601
+ }
29602
+ if (droppedRecord.parentItem) {
29603
+ toParent_1 = this.parent.currentViewData[this.parent.ids.indexOf(droppedRecord.parentItem.taskId)];
29604
+ }
29605
+ else {
29606
+ toParent_1 = droppedRecord;
29607
+ }
29608
+ var validateRecords = void 0;
29609
+ if (toParent_1.uniqueID === draggedParent.uniqueID || (draggedParent.parentItem &&
29610
+ toParent_1.uniqueID == this.parent.currentViewData[this.parent.ids.indexOf(draggedParent.parentItem.taskId)].uniqueID)) {
29611
+ validateRecords = this.parent.currentViewData.filter(function (data) {
29612
+ if ((data.ganttProperties.predecessor && data.ganttProperties.predecessor.length > 0)) {
29613
+ for (var i = 0; i < data.ganttProperties.predecessor.length; i++) {
29614
+ return (parseInt(data.ganttProperties.predecessor[i].to) === parseInt(toParent_1.ganttProperties.taskId) ||
29615
+ parseInt(data.ganttProperties.predecessor[i].from) === parseInt(toParent_1.ganttProperties.taskId));
29616
+ }
29617
+ }
29618
+ return null;
29619
+ });
29620
+ var predName = [];
29621
+ for (var i = 0; i < validateRecords.length; i++) {
29622
+ predName = [];
29623
+ if (validateRecords[i].ganttProperties.predecessor) {
29624
+ for (var k = 0; k < validateRecords[i].ganttProperties.predecessor.length; k++) {
29625
+ if (parseInt(validateRecords[i].ganttProperties.taskId) !==
29626
+ parseInt(validateRecords[i].ganttProperties.predecessor[k].from)) {
29627
+ predName.push(validateRecords[i].ganttProperties.predecessor[k].from);
29628
+ }
29629
+ else {
29630
+ predName.push(validateRecords[i].ganttProperties.predecessor[k].to);
29631
+ }
29632
+ }
29633
+ }
29634
+ var _loop_2 = function (j) {
29635
+ var name_1 = predName[j].replace(/\D/g, '');
29636
+ var toRec = this_2.parent.currentViewData.filter(function (data) {
29637
+ return parseInt(data.ganttProperties.taskId) == parseInt(name_1);
29638
+ });
29639
+ isValidPredecessor = this_2.parent.connectorLineEditModule.validateParentPredecessor(validateRecords[i], toRec[0]);
29640
+ if (!isValidPredecessor) {
29641
+ this_2.parent.dataOperation['resetDependency'](validateRecords[i]);
29642
+ this_2.parent.dataOperation['resetDependency'](toRec[0]);
29643
+ }
29644
+ };
29645
+ var this_2 = this;
29646
+ for (var j = 0; j < predName.length; j++) {
29647
+ _loop_2(j);
29648
+ }
29649
+ }
29650
+ }
29651
+ }
29041
29652
  // method to update the edited parent records
29042
29653
  for (var j = 0; j < this.updateParentRecords.length; j++) {
29043
29654
  this.parent.dataOperation.updateParentItems(this.updateParentRecords[j]);
@@ -29418,7 +30029,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
29418
30029
  }
29419
30030
  var idx = void 0;
29420
30031
  var ganttData = dataSource.length > 0 && this.parent.viewType !== 'ResourceView' ?
29421
- dataSource : this.parent.updatedRecords;
30032
+ dataSource : this.parent.flatData;
29422
30033
  for (var i = 0; i < ganttData.length; i++) {
29423
30034
  if (this.parent.viewType === 'ResourceView') {
29424
30035
  if (ganttData[i].ganttProperties.rowUniqueID === deletedRow.ganttProperties.rowUniqueID) {
@@ -32977,215 +33588,217 @@ var PdfGanttPredecessor = /** @__PURE__ @class */ (function () {
32977
33588
  var childPageData;
32978
33589
  var parentY = 0;
32979
33590
  var childY = 0;
32980
- switch (this.type) {
32981
- case 'FS':
32982
- if (childTask.startPage > -1 && parentTask.endPage > -1) {
32983
- startPage = pages[parentTask.endPage];
32984
- endPage = pages[childTask.startPage];
32985
- parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
32986
- childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
32987
- if (this.parentIndex < this.childIndex) {
32988
- if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
32989
- predecessorType = 'FSType1';
33591
+ if (childTask && parentTask) {
33592
+ switch (this.type) {
33593
+ case 'FS':
33594
+ if (childTask.startPage > -1 && parentTask.endPage > -1) {
33595
+ startPage = pages[parentTask.endPage];
33596
+ endPage = pages[childTask.startPage];
33597
+ parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
33598
+ childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
33599
+ if (this.parentIndex < this.childIndex) {
33600
+ if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
33601
+ predecessorType = 'FSType1';
33602
+ }
33603
+ else {
33604
+ predecessorType = 'FSType2';
33605
+ }
32990
33606
  }
32991
33607
  else {
32992
- predecessorType = 'FSType2';
33608
+ if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
33609
+ predecessorType = 'FSType3';
33610
+ }
33611
+ else {
33612
+ predecessorType = 'FSType4';
33613
+ }
32993
33614
  }
32994
33615
  }
32995
33616
  else {
32996
- if (this.parentLeft < this.childLeft && this.childLeft > (this.parentLeft + this.parentWidth + 25)) {
32997
- predecessorType = 'FSType3';
32998
- }
32999
- else {
33000
- predecessorType = 'FSType4';
33001
- }
33617
+ return;
33002
33618
  }
33003
- }
33004
- else {
33005
- return;
33006
- }
33007
- break;
33008
- case 'SF':
33009
- if (childTask.endPage > -1 && parentTask.startPage > -1) {
33010
- startPage = pages[parentTask.startPage];
33011
- endPage = pages[childTask.endPage];
33012
- parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
33013
- childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
33014
- if (this.parentIndex < this.childIndex) {
33015
- if (this.parentLeft > this.childLeft + this.childWidth) {
33016
- predecessorType = 'SFType1';
33619
+ break;
33620
+ case 'SF':
33621
+ if (childTask.endPage > -1 && parentTask.startPage > -1) {
33622
+ startPage = pages[parentTask.startPage];
33623
+ endPage = pages[childTask.endPage];
33624
+ parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
33625
+ childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
33626
+ if (this.parentIndex < this.childIndex) {
33627
+ if (this.parentLeft > this.childLeft + this.childWidth) {
33628
+ predecessorType = 'SFType1';
33629
+ }
33630
+ else {
33631
+ predecessorType = 'SFType2';
33632
+ }
33017
33633
  }
33018
33634
  else {
33019
- predecessorType = 'SFType2';
33635
+ if (this.parentLeft > this.childLeft + this.childWidth) {
33636
+ predecessorType = 'SFType3';
33637
+ }
33638
+ else {
33639
+ predecessorType = 'SFType4';
33640
+ }
33020
33641
  }
33021
33642
  }
33022
33643
  else {
33023
- if (this.parentLeft > this.childLeft + this.childWidth) {
33024
- predecessorType = 'SFType3';
33025
- }
33026
- else {
33027
- predecessorType = 'SFType4';
33028
- }
33644
+ return;
33029
33645
  }
33030
- }
33031
- else {
33032
- return;
33033
- }
33034
- break;
33035
- case 'FF':
33036
- if (childTask.endPage > -1 && parentTask.endPage > -1) {
33037
- startPage = pages[parentTask.endPage];
33038
- endPage = pages[childTask.endPage];
33039
- parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
33040
- childPageData = pdfGantt.pdfPageDetail[childTask.endPage - pdfGantt.chartPageIndex];
33041
- if (this.parentIndex < this.childIndex) {
33042
- if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
33043
- predecessorType = 'FFType1';
33646
+ break;
33647
+ case 'FF':
33648
+ if (childTask.endPage > -1 && parentTask.endPage > -1) {
33649
+ startPage = pages[parentTask.endPage];
33650
+ endPage = pages[childTask.endPage];
33651
+ parentPageData = pdfGantt.pdfPageDetail[parentTask.endPage - pdfGantt.chartPageIndex];
33652
+ childPageData = pdfGantt.pdfPageDetail[childTask.endPage - pdfGantt.chartPageIndex];
33653
+ if (this.parentIndex < this.childIndex) {
33654
+ if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
33655
+ predecessorType = 'FFType1';
33656
+ }
33657
+ else {
33658
+ predecessorType = 'FFType2';
33659
+ }
33044
33660
  }
33045
33661
  else {
33046
- predecessorType = 'FFType2';
33662
+ if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
33663
+ predecessorType = 'FFType3';
33664
+ }
33665
+ else {
33666
+ predecessorType = 'FFType4';
33667
+ }
33047
33668
  }
33048
33669
  }
33049
33670
  else {
33050
- if ((this.childLeft + this.childWidth) >= (this.parentLeft + this.parentWidth)) {
33051
- predecessorType = 'FFType3';
33052
- }
33053
- else {
33054
- predecessorType = 'FFType4';
33055
- }
33671
+ return;
33056
33672
  }
33057
- }
33058
- else {
33059
- return;
33060
- }
33061
- break;
33062
- case 'SS':
33063
- if (childTask.startPage > -1 && parentTask.startPage > -1) {
33064
- startPage = pages[parentTask.startPage];
33065
- endPage = pages[childTask.startPage];
33066
- parentPageData = pdfGantt.pdfPageDetail[parentTask.startPage - pdfGantt.chartPageIndex];
33067
- childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
33068
- if (this.parentIndex < this.childIndex) {
33069
- if (this.parentLeft >= this.childLeft) {
33070
- predecessorType = 'SSType1';
33673
+ break;
33674
+ case 'SS':
33675
+ if (childTask.startPage > -1 && parentTask.startPage > -1) {
33676
+ startPage = pages[parentTask.startPage];
33677
+ endPage = pages[childTask.startPage];
33678
+ parentPageData = pdfGantt.pdfPageDetail[parentTask.startPage - pdfGantt.chartPageIndex];
33679
+ childPageData = pdfGantt.pdfPageDetail[childTask.startPage - pdfGantt.chartPageIndex];
33680
+ if (this.parentIndex < this.childIndex) {
33681
+ if (this.parentLeft >= this.childLeft) {
33682
+ predecessorType = 'SSType1';
33683
+ }
33684
+ else {
33685
+ predecessorType = 'SSType2';
33686
+ }
33071
33687
  }
33072
33688
  else {
33073
- predecessorType = 'SSType2';
33689
+ if (this.parentLeft >= this.childLeft) {
33690
+ predecessorType = 'SSType3';
33691
+ }
33692
+ else {
33693
+ predecessorType = 'SSType4';
33694
+ }
33074
33695
  }
33075
33696
  }
33076
33697
  else {
33077
- if (this.parentLeft >= this.childLeft) {
33078
- predecessorType = 'SSType3';
33079
- }
33080
- else {
33081
- predecessorType = 'SSType4';
33082
- }
33698
+ return;
33083
33699
  }
33084
- }
33085
- else {
33086
- return;
33087
- }
33088
- break;
33089
- }
33090
- var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
33091
- midPoint = pixelToPoint(midPoint);
33092
- /* eslint-disable-next-line */
33093
- var point1, point2, point3, point4, point5, point6;
33094
- point1 = point2 = point3 = point4 = point5 = point6 = new PointF();
33095
- var parentTaskpoint = __assign$4({}, parentTask.taskStartPoint);
33096
- var childTaskpoint = __assign$4({}, childTask.taskStartPoint);
33097
- parentY = parentTaskpoint.y + parentPageData.startPoint.y;
33098
- childY = childTaskpoint.y + childPageData.startPoint.y;
33099
- var ffpoint1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth), parentY + midPoint);
33100
- var sspoint1 = new PointF(pixelToPoint(this.parentLeft) - 1, parentY + midPoint);
33101
- var ffpoint3 = new PointF(pixelToPoint(this.childLeft - 20), childY + midPoint);
33102
- var ffpoint4 = new PointF(pixelToPoint(this.childLeft - 6 - this.lineWidth) - 1, childY + midPoint);
33103
- var sspoint4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 6 + this.lineWidth) + 1, childY + midPoint);
33104
- switch (predecessorType) {
33105
- case 'FSType1':
33106
- case 'FSType3':
33107
- point1 = ffpoint1;
33108
- point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
33109
- point3 = ffpoint3;
33110
- point4 = ffpoint4;
33111
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33112
- break;
33113
- case 'FSType2':
33114
- point1 = ffpoint1;
33115
- point2 = new PointF(point1.x + 10, parentY + midPoint);
33116
- point3 = new PointF(point1.x + 10, childY + 2);
33117
- point4 = new PointF(pixelToPoint(this.childLeft - 20), childY + 2);
33118
- point5 = ffpoint3;
33119
- point6 = ffpoint4;
33120
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
33121
- break;
33122
- case 'FSType4':
33123
- point1 = ffpoint1;
33124
- point2 = new PointF(point1.x + 10, parentY + midPoint);
33125
- point3 = new PointF(point1.x + 10, parentY + 2);
33126
- point4 = new PointF(pixelToPoint(this.childLeft - 20), parentY + 2);
33127
- point5 = ffpoint3;
33128
- point6 = ffpoint4;
33129
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
33130
- break;
33131
- case 'FFType1':
33132
- case 'FFType3':
33133
- point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
33134
- point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
33135
- point3 = new PointF(point2.x, childY + midPoint);
33136
- point4 = sspoint4;
33137
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33138
- break;
33139
- case 'FFType2':
33140
- case 'FFType4':
33141
- point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
33142
- point2 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth + 20), parentY + midPoint);
33143
- point3 = new PointF(point2.x, childY + midPoint);
33144
- point4 = sspoint4;
33145
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33146
- break;
33147
- case 'SSType1':
33148
- case 'SSType3':
33149
- point1 = sspoint1;
33150
- point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
33151
- point3 = new PointF(point2.x, childY + midPoint);
33152
- point4 = ffpoint4;
33153
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33154
- break;
33155
- case 'SSType2':
33156
- case 'SSType4':
33157
- point1 = sspoint1;
33158
- point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
33159
- point3 = new PointF(point2.x, childY + midPoint);
33160
- point4 = ffpoint4;
33161
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33162
- break;
33163
- case 'SFType1':
33164
- case 'SFType3':
33165
- point1 = sspoint1;
33166
- point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
33167
- point3 = new PointF(point2.x, childY + midPoint);
33168
- point4 = sspoint4;
33169
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33170
- break;
33171
- case 'SFType2':
33172
- point1 = sspoint1;
33173
- point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
33174
- point3 = new PointF(point2.x, childY + 2);
33175
- point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), childY + 2);
33176
- point5 = new PointF(point4.x, childY + midPoint);
33177
- point6 = sspoint4;
33178
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
33179
- break;
33180
- case 'SFType4':
33181
- point1 = sspoint1;
33182
- point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
33183
- point3 = new PointF(point2.x, parentY + 2);
33184
- point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + 2);
33185
- point5 = new PointF(point4.x, childY + midPoint);
33186
- point6 = sspoint4;
33187
- this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
33188
- break;
33700
+ break;
33701
+ }
33702
+ var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
33703
+ midPoint = pixelToPoint(midPoint);
33704
+ /* eslint-disable-next-line */
33705
+ var point1 = void 0, point2 = void 0, point3 = void 0, point4 = void 0, point5 = void 0, point6 = void 0;
33706
+ point1 = point2 = point3 = point4 = point5 = point6 = new PointF();
33707
+ var parentTaskpoint = __assign$4({}, parentTask.taskStartPoint);
33708
+ var childTaskpoint = __assign$4({}, childTask.taskStartPoint);
33709
+ parentY = parentTaskpoint.y + parentPageData.startPoint.y;
33710
+ childY = childTaskpoint.y + childPageData.startPoint.y;
33711
+ var ffpoint1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth), parentY + midPoint);
33712
+ var sspoint1 = new PointF(pixelToPoint(this.parentLeft) - 1, parentY + midPoint);
33713
+ var ffpoint3 = new PointF(pixelToPoint(this.childLeft - 20), childY + midPoint);
33714
+ var ffpoint4 = new PointF(pixelToPoint(this.childLeft - 6 - this.lineWidth) - 1, childY + midPoint);
33715
+ var sspoint4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 6 + this.lineWidth) + 1, childY + midPoint);
33716
+ switch (predecessorType) {
33717
+ case 'FSType1':
33718
+ case 'FSType3':
33719
+ point1 = ffpoint1;
33720
+ point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
33721
+ point3 = ffpoint3;
33722
+ point4 = ffpoint4;
33723
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33724
+ break;
33725
+ case 'FSType2':
33726
+ point1 = ffpoint1;
33727
+ point2 = new PointF(point1.x + 10, parentY + midPoint);
33728
+ point3 = new PointF(point1.x + 10, childY + 2);
33729
+ point4 = new PointF(pixelToPoint(this.childLeft - 20), childY + 2);
33730
+ point5 = ffpoint3;
33731
+ point6 = ffpoint4;
33732
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
33733
+ break;
33734
+ case 'FSType4':
33735
+ point1 = ffpoint1;
33736
+ point2 = new PointF(point1.x + 10, parentY + midPoint);
33737
+ point3 = new PointF(point1.x + 10, parentY + 2);
33738
+ point4 = new PointF(pixelToPoint(this.childLeft - 20), parentY + 2);
33739
+ point5 = ffpoint3;
33740
+ point6 = ffpoint4;
33741
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
33742
+ break;
33743
+ case 'FFType1':
33744
+ case 'FFType3':
33745
+ point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
33746
+ point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
33747
+ point3 = new PointF(point2.x, childY + midPoint);
33748
+ point4 = sspoint4;
33749
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33750
+ break;
33751
+ case 'FFType2':
33752
+ case 'FFType4':
33753
+ point1 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth) + 1, parentY + midPoint);
33754
+ point2 = new PointF(pixelToPoint(this.parentLeft + this.parentWidth + 20), parentY + midPoint);
33755
+ point3 = new PointF(point2.x, childY + midPoint);
33756
+ point4 = sspoint4;
33757
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33758
+ break;
33759
+ case 'SSType1':
33760
+ case 'SSType3':
33761
+ point1 = sspoint1;
33762
+ point2 = new PointF(pixelToPoint(this.childLeft - 20), parentY + midPoint);
33763
+ point3 = new PointF(point2.x, childY + midPoint);
33764
+ point4 = ffpoint4;
33765
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33766
+ break;
33767
+ case 'SSType2':
33768
+ case 'SSType4':
33769
+ point1 = sspoint1;
33770
+ point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
33771
+ point3 = new PointF(point2.x, childY + midPoint);
33772
+ point4 = ffpoint4;
33773
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33774
+ break;
33775
+ case 'SFType1':
33776
+ case 'SFType3':
33777
+ point1 = sspoint1;
33778
+ point2 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + midPoint);
33779
+ point3 = new PointF(point2.x, childY + midPoint);
33780
+ point4 = sspoint4;
33781
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint);
33782
+ break;
33783
+ case 'SFType2':
33784
+ point1 = sspoint1;
33785
+ point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
33786
+ point3 = new PointF(point2.x, childY + 2);
33787
+ point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), childY + 2);
33788
+ point5 = new PointF(point4.x, childY + midPoint);
33789
+ point6 = sspoint4;
33790
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
33791
+ break;
33792
+ case 'SFType4':
33793
+ point1 = sspoint1;
33794
+ point2 = new PointF(pixelToPoint(this.parentLeft - 20), parentY + midPoint);
33795
+ point3 = new PointF(point2.x, parentY + 2);
33796
+ point4 = new PointF(pixelToPoint(this.childLeft + this.childWidth + 20), parentY + 2);
33797
+ point5 = new PointF(point4.x, childY + midPoint);
33798
+ point6 = sspoint4;
33799
+ this.connectLines(startPage, endPage, point1, point2, point3, point4, childTask, midPoint, point5, point6);
33800
+ break;
33801
+ }
33189
33802
  }
33190
33803
  };
33191
33804
  /**