@syncfusion/ej2-gantt 20.4.54 → 21.1.35

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 (93) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/ej2-gantt.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js +2 -2
  5. package/dist/ej2-gantt.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es2015.js +1086 -419
  7. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  8. package/dist/es6/ej2-gantt.es5.js +1064 -397
  9. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  10. package/dist/global/ej2-gantt.min.js +2 -2
  11. package/dist/global/ej2-gantt.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +20 -20
  14. package/src/gantt/actions/cell-edit.js +8 -6
  15. package/src/gantt/actions/chart-scroll.d.ts +1 -0
  16. package/src/gantt/actions/chart-scroll.js +15 -4
  17. package/src/gantt/actions/connector-line-edit.js +39 -28
  18. package/src/gantt/actions/context-menu.js +5 -5
  19. package/src/gantt/actions/dependency.js +28 -12
  20. package/src/gantt/actions/dialog-edit.js +41 -21
  21. package/src/gantt/actions/edit.js +51 -30
  22. package/src/gantt/actions/filter.d.ts +2 -1
  23. package/src/gantt/actions/filter.js +88 -2
  24. package/src/gantt/actions/keyboard.js +0 -1
  25. package/src/gantt/actions/pdf-export.d.ts +3 -1
  26. package/src/gantt/actions/pdf-export.js +12 -6
  27. package/src/gantt/actions/rowdragdrop.js +2 -2
  28. package/src/gantt/actions/selection.js +5 -2
  29. package/src/gantt/actions/taskbar-edit.d.ts +5 -0
  30. package/src/gantt/actions/taskbar-edit.js +114 -10
  31. package/src/gantt/base/date-processor.js +78 -52
  32. package/src/gantt/base/gantt-chart.js +20 -4
  33. package/src/gantt/base/gantt-model.d.ts +43 -0
  34. package/src/gantt/base/gantt.d.ts +39 -1
  35. package/src/gantt/base/gantt.js +78 -33
  36. package/src/gantt/base/interface.d.ts +2 -0
  37. package/src/gantt/base/task-processor.js +135 -98
  38. package/src/gantt/base/tree-grid.js +31 -1
  39. package/src/gantt/base/utils.js +1 -1
  40. package/src/gantt/renderer/chart-rows.d.ts +2 -0
  41. package/src/gantt/renderer/chart-rows.js +156 -24
  42. package/src/gantt/renderer/connector-line.js +50 -20
  43. package/src/gantt/renderer/edit-tooltip.js +0 -3
  44. package/src/gantt/renderer/event-marker.js +4 -1
  45. package/src/gantt/renderer/nonworking-day.js +4 -1
  46. package/src/gantt/renderer/timeline.js +3 -3
  47. package/src/gantt/renderer/tooltip.js +101 -33
  48. package/styles/bootstrap-dark.css +33 -10
  49. package/styles/bootstrap.css +31 -10
  50. package/styles/bootstrap4.css +28 -7
  51. package/styles/bootstrap5-dark.css +30 -9
  52. package/styles/bootstrap5.css +30 -9
  53. package/styles/fabric-dark.css +28 -7
  54. package/styles/fabric.css +28 -7
  55. package/styles/fluent-dark.css +56 -29
  56. package/styles/fluent.css +56 -29
  57. package/styles/gantt/_bootstrap-dark-definition.scss +5 -4
  58. package/styles/gantt/_bootstrap-definition.scss +5 -4
  59. package/styles/gantt/_bootstrap4-definition.scss +3 -2
  60. package/styles/gantt/_bootstrap5-definition.scss +15 -14
  61. package/styles/gantt/_fabric-dark-definition.scss +3 -2
  62. package/styles/gantt/_fabric-definition.scss +3 -2
  63. package/styles/gantt/_fluent-definition.scss +18 -17
  64. package/styles/gantt/_fusionnew-definition.scss +5 -4
  65. package/styles/gantt/_highcontrast-definition.scss +3 -2
  66. package/styles/gantt/_highcontrast-light-definition.scss +3 -2
  67. package/styles/gantt/_layout.scss +45 -13
  68. package/styles/gantt/_material-dark-definition.scss +3 -2
  69. package/styles/gantt/_material-definition.scss +3 -2
  70. package/styles/gantt/_tailwind-definition.scss +9 -8
  71. package/styles/gantt/_theme.scss +25 -6
  72. package/styles/gantt/bootstrap-dark.css +33 -10
  73. package/styles/gantt/bootstrap.css +31 -10
  74. package/styles/gantt/bootstrap4.css +28 -7
  75. package/styles/gantt/bootstrap5-dark.css +30 -9
  76. package/styles/gantt/bootstrap5.css +30 -9
  77. package/styles/gantt/fabric-dark.css +28 -7
  78. package/styles/gantt/fabric.css +28 -7
  79. package/styles/gantt/fluent-dark.css +56 -29
  80. package/styles/gantt/fluent.css +56 -29
  81. package/styles/gantt/highcontrast-light.css +28 -9
  82. package/styles/gantt/highcontrast.css +28 -7
  83. package/styles/gantt/material-dark.css +31 -14
  84. package/styles/gantt/material.css +28 -7
  85. package/styles/gantt/tailwind-dark.css +28 -7
  86. package/styles/gantt/tailwind.css +28 -7
  87. package/styles/highcontrast-light.css +28 -9
  88. package/styles/highcontrast.css +28 -7
  89. package/styles/material-dark.css +31 -14
  90. package/styles/material.css +28 -7
  91. package/styles/tailwind-dark.css +28 -7
  92. package/styles/tailwind.css +28 -7
  93. package/styles/gantt/_material3-definition.scss +0 -218
@@ -1,6 +1,6 @@
1
- import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, addClass, append, classList, closest, compile, createElement, deleteObject, extend, formatUnit, getValue, isNullOrUndefined, isObject, isObjectArray, isUndefined, merge, remove, removeClass, setValue } from '@syncfusion/ej2-base';
1
+ import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, classList, closest, compile, createElement, deleteObject, extend, formatUnit, getValue, isNullOrUndefined, isObject, isObjectArray, isUndefined, merge, remove, removeClass, setValue } from '@syncfusion/ej2-base';
2
2
  import { Dialog, Tooltip, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
3
- import { Edit, ForeignKey, Grid, Page, Predicate, Toolbar, ValueFormatter, click, filterAfterOpen, getActualProperties, getCustomDateFormat, getForeignData, getObject, getUid, parentsUntil, setCssInGridPopUp } from '@syncfusion/ej2-grids';
3
+ import { Edit, ForeignKey, Grid, Page, Predicate, Toolbar, ValueFormatter, click, filterAfterOpen, getActualProperties, getCustomDateFormat, getFilterMenuPostion, getForeignData, getObject, getUid, parentsUntil, setCssInGridPopUp } from '@syncfusion/ej2-grids';
4
4
  import { CacheAdaptor, DataManager, DataUtil, Deferred, ODataAdaptor, ODataV4Adaptor, Query, RemoteSaveAdaptor, UrlAdaptor, WebApiAdaptor, WebMethodAdaptor } from '@syncfusion/ej2-data';
5
5
  import { ColumnMenu, ContextMenu, Edit as Edit$1, ExcelExport, Filter, Reorder, Resize, RowDD, Selection, Sort, TreeGrid, VirtualScroll } from '@syncfusion/ej2-treegrid';
6
6
  import { Splitter } from '@syncfusion/ej2-layouts';
@@ -150,7 +150,7 @@ function updateDates(record, parent) {
150
150
  function formatString(str, args) {
151
151
  var regx;
152
152
  for (var i = 0; i < args.length; i++) {
153
- // eslint-disable-next-line detect-non-literal-regexp
153
+ // eslint-disable-next-line security/detect-non-literal-regexp
154
154
  regx = new RegExp('\\{' + (i) + '\\}', 'gm');
155
155
  str = str.replace(regx, args[i].toString());
156
156
  }
@@ -260,32 +260,37 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
260
260
  }
261
261
  }
262
262
  var tStartDate;
263
- do {
264
- tStartDate = new Date(cloneStartDate.getTime());
265
- var holidayLength = this.parent.totalHolidayDates.length;
266
- // check holidays and weekends
267
- if (this.isValidateNonWorkDays(ganttProp)) {
268
- var startTime = (!validateAsMilestone || isLoad) ? this.parent.defaultStartTime : this.parent.defaultEndTime;
269
- if (!this.parent.includeWeekend) {
270
- var tempDate = new Date(cloneStartDate.getTime());
271
- cloneStartDate = this.getNextWorkingDay(cloneStartDate);
272
- if (tempDate.getTime() !== cloneStartDate.getTime()) {
273
- this.setTime(startTime, cloneStartDate);
263
+ if (this.parent.autoCalculateDateScheduling) {
264
+ do {
265
+ tStartDate = new Date(cloneStartDate.getTime());
266
+ var holidayLength = this.parent.totalHolidayDates.length;
267
+ // check holidays and weekends
268
+ if (this.isValidateNonWorkDays(ganttProp)) {
269
+ var startTime = (!validateAsMilestone || isLoad) ? this.parent.defaultStartTime : this.parent.defaultEndTime;
270
+ if (!this.parent.includeWeekend) {
271
+ var tempDate = new Date(cloneStartDate.getTime());
272
+ cloneStartDate = this.getNextWorkingDay(cloneStartDate);
273
+ if (tempDate.getTime() !== cloneStartDate.getTime()) {
274
+ this.setTime(startTime, cloneStartDate);
275
+ }
274
276
  }
275
- }
276
- for (var count = 0; count < holidayLength; count++) {
277
- var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
278
- var holidayTo = new Date(holidayFrom.getTime());
279
- holidayFrom.setHours(0, 0, 0, 0);
280
- holidayTo.setHours(23, 59, 59, 59);
281
- if (cloneStartDate.getTime() >= holidayFrom.getTime() && cloneStartDate.getTime() < holidayTo.getTime()) {
282
- cloneStartDate.setDate(cloneStartDate.getDate() + 1);
283
- this.setTime(startTime, cloneStartDate);
277
+ for (var count = 0; count < holidayLength; count++) {
278
+ var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
279
+ var holidayTo = new Date(holidayFrom.getTime());
280
+ holidayFrom.setHours(0, 0, 0, 0);
281
+ holidayTo.setHours(23, 59, 59, 59);
282
+ if (cloneStartDate.getTime() >= holidayFrom.getTime() && cloneStartDate.getTime() < holidayTo.getTime()) {
283
+ cloneStartDate.setDate(cloneStartDate.getDate() + 1);
284
+ this.setTime(startTime, cloneStartDate);
285
+ }
284
286
  }
285
287
  }
286
- }
287
- } while (tStartDate.getTime() !== cloneStartDate.getTime());
288
- return new Date(cloneStartDate.getTime());
288
+ } while (tStartDate.getTime() !== cloneStartDate.getTime());
289
+ return new Date(cloneStartDate.getTime());
290
+ }
291
+ else {
292
+ return new Date(cloneStartDate.getTime());
293
+ }
289
294
  };
290
295
  /**
291
296
  * To update given date value to valid end date
@@ -320,36 +325,44 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
320
325
  }
321
326
  }
322
327
  var tempCheckDate;
323
- do {
324
- tempCheckDate = new Date(cloneEndDate.getTime());
325
- var holidayLength = this.parent.totalHolidayDates.length;
326
- if (this.isValidateNonWorkDays(ganttProp)) {
327
- if (!this.parent.includeWeekend) {
328
- var tempDate = new Date(cloneEndDate.getTime());
329
- cloneEndDate = this.getPreviousWorkingDay(cloneEndDate);
330
- if (tempDate.getTime() !== cloneEndDate.getTime()) {
331
- this.setTime(this.parent.defaultEndTime, cloneEndDate);
332
- }
333
- }
334
- for (var count = 0; count < holidayLength; count++) {
335
- var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
336
- var holidayTo = new Date(holidayFrom.getTime());
337
- var tempHoliday = new Date(cloneEndDate.getTime());
338
- tempHoliday.setMinutes(cloneEndDate.getMilliseconds() - 2);
339
- holidayFrom.setHours(0, 0, 0, 0);
340
- holidayTo.setHours(23, 59, 59, 59);
341
- if (cloneEndDate.getTime() >= holidayFrom.getTime() && cloneEndDate.getTime() < holidayTo.getTime() ||
342
- tempHoliday.getTime() >= holidayFrom.getTime() && tempHoliday.getTime() < holidayTo.getTime()) {
343
- cloneEndDate.setDate(cloneEndDate.getDate() - 1);
344
- if (!(cloneEndDate.getTime() === holidayFrom.getTime() && this.parent.defaultEndTime === 86400 &&
345
- this.getSecondsInDecimal(cloneEndDate) === 0)) {
328
+ if (this.parent.autoCalculateDateScheduling) {
329
+ do {
330
+ tempCheckDate = new Date(cloneEndDate.getTime());
331
+ var holidayLength = this.parent.totalHolidayDates.length;
332
+ if (this.isValidateNonWorkDays(ganttProp)) {
333
+ if (!this.parent.includeWeekend) {
334
+ var tempDate = new Date(cloneEndDate.getTime());
335
+ cloneEndDate = this.getPreviousWorkingDay(cloneEndDate);
336
+ if (tempDate.getTime() !== cloneEndDate.getTime()) {
346
337
  this.setTime(this.parent.defaultEndTime, cloneEndDate);
347
338
  }
348
339
  }
340
+ for (var count = 0; count < holidayLength; count++) {
341
+ var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
342
+ var holidayTo = new Date(holidayFrom.getTime());
343
+ var tempHoliday = new Date(cloneEndDate.getTime());
344
+ tempHoliday.setMinutes(cloneEndDate.getMilliseconds() - 2);
345
+ holidayFrom.setHours(0, 0, 0, 0);
346
+ holidayTo.setHours(23, 59, 59, 59);
347
+ if (cloneEndDate.getTime() >= holidayFrom.getTime() && cloneEndDate.getTime() < holidayTo.getTime() ||
348
+ tempHoliday.getTime() >= holidayFrom.getTime() && tempHoliday.getTime() < holidayTo.getTime()) {
349
+ cloneEndDate.setDate(cloneEndDate.getDate() - 1);
350
+ if (!(cloneEndDate.getTime() === holidayFrom.getTime() && this.parent.defaultEndTime === 86400 &&
351
+ this.getSecondsInDecimal(cloneEndDate) === 0)) {
352
+ this.setTime(this.parent.defaultEndTime, cloneEndDate);
353
+ }
354
+ }
355
+ }
349
356
  }
357
+ } while (tempCheckDate.getTime() !== cloneEndDate.getTime());
358
+ return new Date(cloneEndDate.getTime());
359
+ }
360
+ else {
361
+ if (!isNullOrUndefined(cloneEndDate)) {
362
+ this.setTime(this.parent.defaultEndTime, cloneEndDate);
350
363
  }
351
- } while (tempCheckDate.getTime() !== cloneEndDate.getTime());
352
- return new Date(cloneEndDate.getTime());
364
+ return new Date(cloneEndDate.getTime());
365
+ }
353
366
  };
354
367
  /**
355
368
  * To validate the baseline start date
@@ -464,6 +477,13 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
464
477
  }
465
478
  this.parent.setRecordValue('endDate', tempEndDate, ganttProp, true);
466
479
  }
480
+ else {
481
+ tempEndDate = ganttData[this.parent.taskFields.endDate];
482
+ if (!isNullOrUndefined(tempEndDate)) {
483
+ this.setTime(this.parent.defaultEndTime, tempEndDate);
484
+ }
485
+ this.parent.setRecordValue('endDate', tempEndDate, ganttProp, true);
486
+ }
467
487
  if (this.parent.taskFields.endDate) {
468
488
  this.parent.dataOperation.updateMappingData(ganttData, 'endDate');
469
489
  }
@@ -530,9 +550,9 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
530
550
  */
531
551
  DateProcessor.prototype.getNonworkingTime = function (sDate, eDate, isAutoSchedule, isCheckTimeZone) {
532
552
  isCheckTimeZone = isNullOrUndefined(isCheckTimeZone) ? true : isCheckTimeZone;
533
- var weekendCount = !this.parent.includeWeekend && isAutoSchedule ? this.getWeekendCount(sDate, eDate) : 0;
553
+ var weekendCount = (!this.parent.includeWeekend && this.parent.autoCalculateDateScheduling) && isAutoSchedule ? this.getWeekendCount(sDate, eDate) : 0;
534
554
  var totalHours = this.getNumberOfSeconds(sDate, eDate, isCheckTimeZone);
535
- var holidaysCount = isAutoSchedule ? this.getHolidaysCount(sDate, eDate) : 0;
555
+ var holidaysCount = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.getHolidaysCount(sDate, eDate) : 0;
536
556
  var totWorkDays = (totalHours - (weekendCount * 86400) - (holidaysCount * 86400)) / 86400; // working days between two dates
537
557
  var nonWorkHours = this.getNonWorkingSecondsOnDate(sDate, eDate, isAutoSchedule);
538
558
  var totalNonWorkTime = (totWorkDays * (86400 - this.parent.secondsPerDay)) +
@@ -724,6 +744,9 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
724
744
  if (!isNullOrUndefined(data.ganttProperties.startDate))
725
745
  sDate = data.ganttProperties.startDate;
726
746
  }
747
+ else {
748
+ sDate = _this.getProjectStartDate(ganttProp);
749
+ }
727
750
  });
728
751
  }
729
752
  else {
@@ -1002,6 +1025,9 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
1002
1025
  /*Check given date is on holidays*/
1003
1026
  DateProcessor.prototype.isOnHolidayOrWeekEnd = function (date, checkWeekEnd) {
1004
1027
  checkWeekEnd = !isNullOrUndefined(checkWeekEnd) ? checkWeekEnd : this.parent.includeWeekend;
1028
+ if (!this.parent.autoCalculateDateScheduling) {
1029
+ checkWeekEnd = true;
1030
+ }
1005
1031
  if (!checkWeekEnd && this.parent.nonWorkingDayIndex.indexOf(date.getDay()) !== -1) {
1006
1032
  return true;
1007
1033
  }
@@ -1031,8 +1057,8 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
1031
1057
  var startRangeIndex = -1;
1032
1058
  var endRangeIndex = -1;
1033
1059
  var totNonWrkSecs = 0;
1034
- var startOnHoliday = isAutoSchedule ? this.isOnHolidayOrWeekEnd(startDate, null) : false;
1035
- var endOnHoliday = isAutoSchedule ? this.isOnHolidayOrWeekEnd(endDate, null) : false;
1060
+ var startOnHoliday = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.isOnHolidayOrWeekEnd(startDate, null) : false;
1061
+ var endOnHoliday = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.isOnHolidayOrWeekEnd(endDate, null) : false;
1036
1062
  for (var i = 0; i < this.parent.nonWorkingTimeRanges.length; i++) {
1037
1063
  var val = this.parent.nonWorkingTimeRanges[i];
1038
1064
  if (sHour >= val.from && sHour <= val.to) {
@@ -1715,7 +1741,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1715
1741
  TaskProcessor.prototype.constructResourceViewDataSource = function (resources, data, unassignedTasks) {
1716
1742
  var _loop_1 = function (i) {
1717
1743
  var tempData = data[i];
1718
- child = this_1.parent.taskFields.child != null ? this_1.parent.taskFields.child : 'Children';
1744
+ var child = this_1.parent.taskFields.child != null ? this_1.parent.taskFields.child : 'Children';
1719
1745
  var resourceData = tempData && tempData[this_1.parent.taskFields.resourceInfo];
1720
1746
  var resourceIdMapping = this_1.parent.resourceFields.id;
1721
1747
  if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
@@ -1742,7 +1768,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1742
1768
  this_1.constructResourceViewDataSource(resources, tempData[this_1.parent.taskFields.child], unassignedTasks);
1743
1769
  }
1744
1770
  };
1745
- var this_1 = this, child;
1771
+ var this_1 = this;
1746
1772
  for (var i = 0; i < data.length; i++) {
1747
1773
  _loop_1(i);
1748
1774
  }
@@ -1801,7 +1827,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1801
1827
  }
1802
1828
  }
1803
1829
  var ganttData = this_3.createRecord(tempData, level, parentItem, true);
1804
- if (!this_3.parent.enableValidation) {
1830
+ if (!this_3.parent.enableValidation || !this_3.parent.autoCalculateDateScheduling) {
1805
1831
  this_3.updateTaskLeftWidth(ganttData);
1806
1832
  }
1807
1833
  ganttData.index = this_3.recordIndex++;
@@ -1835,6 +1861,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1835
1861
  this_3.parent.setRecordValue('autoDuration', this_3.calculateAutoDuration(parentProp), parentProp, true);
1836
1862
  this_3.updateAutoWidthLeft(parentData);
1837
1863
  }
1864
+ if (!this_3.parent.allowParentDependency) {
1865
+ this_3.resetDependency(parentData);
1866
+ }
1838
1867
  this_3.updateWidthLeft(parentData);
1839
1868
  this_3.updateTaskData(parentData);
1840
1869
  }
@@ -1951,6 +1980,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1951
1980
  if (!isNullOrUndefined(data[taskSettings.child]) && data[taskSettings.child].length > 0) {
1952
1981
  this.parent.setRecordValue('hasChildRecords', true, ganttData);
1953
1982
  this.parent.setRecordValue('isMilestone', false, ganttProperties, true);
1983
+ if (!this.parent.allowParentDependency) {
1984
+ this.resetDependency(ganttData);
1985
+ }
1954
1986
  }
1955
1987
  else {
1956
1988
  this.parent.setRecordValue('hasChildRecords', false, ganttData);
@@ -2351,6 +2383,16 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
2351
2383
  }
2352
2384
  }
2353
2385
  }
2386
+ if (!this.parent.autoCalculateDateScheduling) {
2387
+ if (!isNullOrUndefined(ganttData.ganttProperties.startDate)) {
2388
+ ganttData[this.parent.taskFields.startDate] = ganttData.ganttProperties.startDate;
2389
+ ganttData.taskData[this.parent.taskFields.startDate] = ganttData.ganttProperties.startDate;
2390
+ }
2391
+ if (!isNullOrUndefined(ganttData.ganttProperties.endDate)) {
2392
+ ganttData[this.parent.taskFields.endDate] = ganttData.ganttProperties.endDate;
2393
+ ganttData.taskData[this.parent.taskFields.endDate] = ganttData.ganttProperties.endDate;
2394
+ }
2395
+ }
2354
2396
  if (!isNullOrUndefined(segments)) {
2355
2397
  this.parent.setRecordValue('segments', this.setSegmentsInfo(ganttData, true), ganttProperties, true);
2356
2398
  }
@@ -3344,7 +3386,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3344
3386
  var rangeObj_1 = {};
3345
3387
  if (this._isInStartDateRange(cStartDate, tStartDate, tEndDate) || this._isInEndDateRange(cEndDate, tStartDate, tEndDate)) {
3346
3388
  if ((tStartDate.getTime() > cStartDate.getTime() && tStartDate.getTime() < cEndDate.getTime()
3347
- && tEndDate.getTime() > cStartDate.getTime() && tEndDate.getTime() > cEndDate.getTime())
3389
+ && tEndDate.getTime() > cStartDate.getTime() && tEndDate.getTime() >= cEndDate.getTime())
3348
3390
  || (cStartDate.getTime() === tStartDate.getTime() && cEndDate.getTime() <= tEndDate.getTime())) {
3349
3391
  rangeObj_1.from = tStartDate;
3350
3392
  rangeObj_1.to = cEndDate;
@@ -3625,7 +3667,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3625
3667
  */
3626
3668
  TaskProcessor.prototype.updateTaskLeftWidth = function (data) {
3627
3669
  var task = data.ganttProperties;
3628
- if (!data.hasChildRecords) {
3670
+ if (!data.hasChildRecords || !this.parent.autoCalculateDateScheduling) {
3629
3671
  this.updateWidthLeft(data);
3630
3672
  }
3631
3673
  this.parent.setRecordValue('baselineLeft', this.calculateBaselineLeft(task), task, true);
@@ -3637,7 +3679,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3637
3679
  childData = parentItem.childRecords;
3638
3680
  }
3639
3681
  if (parentItem && childData.indexOf(data) === childData.length - 1 && !data.hasChildRecords && this.parent.enableValidation) {
3640
- this.updateParentItems(parentItem);
3682
+ if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
3683
+ this.updateParentItems(parentItem);
3684
+ }
3685
+ if (!this.parent.autoCalculateDateScheduling) {
3686
+ this.updateWidthLeft(parentItem);
3687
+ }
3641
3688
  }
3642
3689
  else if (parentItem && !this.parent.enableValidation) {
3643
3690
  this.updateWidthLeft(parentItem);
@@ -3780,105 +3827,119 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3780
3827
  var parentData = isParent ? cloneParent : this.parent.getParentTask(cloneParent);
3781
3828
  var deleteUpdate = false;
3782
3829
  var ganttProp = parentData.ganttProperties;
3783
- if (parentData.childRecords.length > 0) {
3784
- var previousStartDate = ganttProp.isAutoSchedule ? ganttProp.startDate : ganttProp.autoStartDate;
3785
- var previousEndDate = ganttProp.isAutoSchedule ? ganttProp.endDate :
3786
- ganttProp.autoEndDate;
3787
- var childRecords = parentData.childRecords;
3788
- var childLength = childRecords.length;
3789
- var totalDuration = 0;
3790
- var progressValues = {};
3791
- var minStartDate = null;
3792
- var maxEndDate = null;
3793
- var milestoneCount = 0;
3794
- var totalProgress = 0;
3795
- var childCompletedWorks = 0;
3796
- var childData = void 0;
3797
- for (var count = 0; count < childLength; count++) {
3798
- childData = childRecords[count];
3799
- if (this.parent.isOnDelete && childData.isDelete) {
3800
- if (childLength === 1 && this.parent.viewType === 'ProjectView') {
3801
- deleteUpdate = true;
3830
+ if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
3831
+ if (parentData.childRecords.length > 0) {
3832
+ var previousStartDate = ganttProp.isAutoSchedule ? ganttProp.startDate : ganttProp.autoStartDate;
3833
+ var previousEndDate = ganttProp.isAutoSchedule ? ganttProp.endDate :
3834
+ ganttProp.autoEndDate;
3835
+ var childRecords = parentData.childRecords;
3836
+ var childLength = childRecords.length;
3837
+ var totalDuration = 0;
3838
+ var progressValues = {};
3839
+ var minStartDate = null;
3840
+ var maxEndDate = null;
3841
+ var milestoneCount = 0;
3842
+ var totalProgress = 0;
3843
+ var childCompletedWorks = 0;
3844
+ var childData = void 0;
3845
+ for (var count = 0; count < childLength; count++) {
3846
+ childData = childRecords[count];
3847
+ if (this.parent.isOnDelete && childData.isDelete) {
3848
+ if (childLength === 1 && this.parent.viewType === 'ProjectView') {
3849
+ deleteUpdate = true;
3850
+ }
3851
+ continue;
3802
3852
  }
3803
- continue;
3804
- }
3805
- var startDate = this.getValidStartDate(childData.ganttProperties);
3806
- if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
3807
- startDate = childData.ganttProperties.autoStartDate;
3808
- }
3809
- var endDate = this.getValidEndDate(childData.ganttProperties);
3810
- if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
3811
- endDate = childData.ganttProperties.autoEndDate;
3812
- }
3813
- if (isNullOrUndefined(minStartDate)) {
3814
- minStartDate = this.getDateFromFormat(startDate);
3815
- }
3816
- if (isNullOrUndefined(maxEndDate)) {
3817
- maxEndDate = this.getDateFromFormat(endDate);
3818
- }
3819
- if (!isNullOrUndefined(endDate) && this.compareDates(endDate, maxEndDate) === 1) {
3820
- maxEndDate = this.getDateFromFormat(endDate);
3821
- }
3822
- if (!isNullOrUndefined(startDate) && this.compareDates(startDate, minStartDate) === -1) {
3823
- minStartDate = this.getDateFromFormat(startDate);
3824
- }
3825
- if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
3826
- progressValues = this.getParentProgress(childData);
3827
- totalProgress += getValue('totalProgress', progressValues);
3828
- if (childData[this.parent.taskFields.duration] < 1) {
3829
- totalDuration += getValue('totalDuration', progressValues);
3830
- totalDuration = Number(totalDuration.toFixed(4));
3853
+ var startDate = this.getValidStartDate(childData.ganttProperties);
3854
+ if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoStartDate)) {
3855
+ startDate = childData.ganttProperties.autoStartDate;
3856
+ }
3857
+ var endDate = this.getValidEndDate(childData.ganttProperties);
3858
+ if (parentData.hasChildRecords && !ganttProp.isAutoSchedule && !isNullOrUndefined(childData.ganttProperties.autoEndDate)) {
3859
+ endDate = childData.ganttProperties.autoEndDate;
3860
+ }
3861
+ if (isNullOrUndefined(minStartDate)) {
3862
+ minStartDate = this.getDateFromFormat(startDate);
3863
+ }
3864
+ if (isNullOrUndefined(maxEndDate)) {
3865
+ maxEndDate = this.getDateFromFormat(endDate);
3866
+ }
3867
+ if (!isNullOrUndefined(endDate) && this.compareDates(endDate, maxEndDate) === 1) {
3868
+ maxEndDate = this.getDateFromFormat(endDate);
3869
+ }
3870
+ if (!isNullOrUndefined(startDate) && this.compareDates(startDate, minStartDate) === -1) {
3871
+ minStartDate = this.getDateFromFormat(startDate);
3872
+ }
3873
+ if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
3874
+ progressValues = this.getParentProgress(childData);
3875
+ totalProgress += getValue('totalProgress', progressValues);
3876
+ if (childData[this.parent.taskFields.duration] < 1) {
3877
+ totalDuration += getValue('totalDuration', progressValues);
3878
+ totalDuration = Number(totalDuration.toFixed(4));
3879
+ }
3880
+ else {
3881
+ totalDuration += getValue('totalDuration', progressValues);
3882
+ }
3831
3883
  }
3832
3884
  else {
3833
- totalDuration += getValue('totalDuration', progressValues);
3885
+ milestoneCount++;
3834
3886
  }
3887
+ childCompletedWorks += childData.ganttProperties.work;
3835
3888
  }
3836
- else {
3837
- milestoneCount++;
3838
- }
3839
- childCompletedWorks += childData.ganttProperties.work;
3840
- }
3841
- if (!deleteUpdate) {
3842
- if (this.compareDates(previousStartDate, minStartDate) !== 0) {
3843
- this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'startDate' : 'autoStartDate', minStartDate, parentData.ganttProperties, true);
3844
- }
3845
- if (this.compareDates(previousEndDate, maxEndDate) !== 0) {
3846
- this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'endDate' : 'autoEndDate', maxEndDate, parentData.ganttProperties, true);
3847
- }
3848
- var taskCount = void 0;
3849
- if (this.parent.isOnDelete && childData.isDelete) {
3850
- taskCount = childLength - milestoneCount - 1;
3851
- }
3852
- else {
3853
- taskCount = childLength - milestoneCount;
3854
- }
3855
- var parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
3856
- var parentProp = parentData.ganttProperties;
3857
- var milestone = (taskCount === 0) && minStartDate && maxEndDate &&
3858
- minStartDate.getTime() === maxEndDate.getTime() ? true : false;
3859
- this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
3860
- if (parentProp.isAutoSchedule) {
3861
- this.calculateDuration(parentData);
3862
- }
3863
- this.updateWorkWithDuration(parentData);
3864
- var parentWork = parentProp.work;
3865
- parentWork = this.parent.isOnEdit ? parentWork : (parentWork + childCompletedWorks);
3866
- this.parent.setRecordValue('work', parentWork, parentProp, true);
3867
- this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
3868
- if (!isNullOrUndefined(this.parent.taskFields.type)) {
3869
- this.updateMappingData(parentData, 'type');
3870
- }
3871
- this.parent.setRecordValue('progress', Math.floor(parentProgress), parentProp, true);
3872
- this.parent.setRecordValue('totalProgress', totalProgress, parentProp, true);
3873
- this.parent.setRecordValue('totalDuration', totalDuration, parentProp, true);
3874
- if (!parentProp.isAutoSchedule) {
3875
- this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
3876
- this.updateAutoWidthLeft(parentData);
3889
+ if (!deleteUpdate) {
3890
+ var taskCount = void 0;
3891
+ if (this.parent.isOnDelete && childData.isDelete) {
3892
+ taskCount = childLength - milestoneCount - 1;
3893
+ }
3894
+ else {
3895
+ taskCount = childLength - milestoneCount;
3896
+ }
3897
+ var parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
3898
+ var parentProp = parentData.ganttProperties;
3899
+ var milestone = (taskCount === 0) && minStartDate && maxEndDate &&
3900
+ minStartDate.getTime() === maxEndDate.getTime() ? true : false;
3901
+ if (this.compareDates(previousStartDate, minStartDate) !== 0) {
3902
+ this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'startDate' : 'autoStartDate', minStartDate, parentData.ganttProperties, true);
3903
+ if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
3904
+ this.parent.setRecordValue('startDate', minStartDate, parentData.ganttProperties, true);
3905
+ }
3906
+ }
3907
+ if (this.compareDates(previousEndDate, maxEndDate) !== 0) {
3908
+ this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'endDate' : 'autoEndDate', maxEndDate, parentData.ganttProperties, true);
3909
+ if ((((!isNullOrUndefined(ganttProp.autoDuration)) ? ganttProp.autoDuration === 0 : ganttProp.duration === 0)) && parentData['isManual'] && milestone) {
3910
+ this.parent.setRecordValue('endDate', maxEndDate, parentData.ganttProperties, true);
3911
+ }
3912
+ }
3913
+ this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
3914
+ if (parentProp.isAutoSchedule) {
3915
+ this.calculateDuration(parentData);
3916
+ }
3917
+ this.updateWorkWithDuration(parentData);
3918
+ var parentWork = parentProp.work;
3919
+ parentWork = this.parent.isOnEdit ? parentWork : (parentWork + childCompletedWorks);
3920
+ this.parent.setRecordValue('work', parentWork, parentProp, true);
3921
+ this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
3922
+ if (!isNullOrUndefined(this.parent.taskFields.type)) {
3923
+ this.updateMappingData(parentData, 'type');
3924
+ }
3925
+ this.parent.setRecordValue('progress', Math.floor(parentProgress), parentProp, true);
3926
+ this.parent.setRecordValue('totalProgress', totalProgress, parentProp, true);
3927
+ this.parent.setRecordValue('totalDuration', totalDuration, parentProp, true);
3928
+ if (!parentProp.isAutoSchedule) {
3929
+ this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
3930
+ this.updateAutoWidthLeft(parentData);
3931
+ }
3932
+ if (!this.parent.allowParentDependency) {
3933
+ this.resetDependency(parentData);
3934
+ }
3935
+ this.updateWidthLeft(parentData);
3936
+ this.updateTaskData(parentData);
3877
3937
  }
3878
- this.updateWidthLeft(parentData);
3879
- this.updateTaskData(parentData);
3880
3938
  }
3881
3939
  }
3940
+ else {
3941
+ parentData.ganttProperties.endDate = parentData.taskData[this.parent.taskFields.endDate];
3942
+ }
3882
3943
  if (deleteUpdate && parentData.childRecords.length === 1 && parentData.ganttProperties.duration === 0) {
3883
3944
  this.parent.setRecordValue('isMilestone', true, parentData.ganttProperties, true);
3884
3945
  this.updateWidthLeft(parentData);
@@ -3886,7 +3947,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3886
3947
  }
3887
3948
  var parentItem = this.parent.getParentTask(parentData.parentItem);
3888
3949
  if (parentItem) {
3889
- this.updateParentItems(parentItem);
3950
+ if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
3951
+ this.updateParentItems(parentItem);
3952
+ }
3890
3953
  }
3891
3954
  deleteUpdate = false;
3892
3955
  };
@@ -4141,9 +4204,19 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
4141
4204
  var parent = this.parent;
4142
4205
  setTimeout(function () {
4143
4206
  parent.hideMaskRow();
4207
+ if (parent.viewType === 'ResourceView' && !parent.allowTaskbarOverlap && parent.showOverAllocation) {
4208
+ for (var i = 0; i < parent.currentViewData.length; i++) {
4209
+ var tr = parent.chartRowsModule.ganttChartTableBody.childNodes[i];
4210
+ if (tr['style'].display !== 'none' && parent.currentViewData[i].hasChildRecords && !parent.currentViewData[i].expanded) {
4211
+ parent.treeGrid.getRowByIndex(i)['style'].height = tr['style'].height;
4212
+ }
4213
+ }
4214
+ parent.contentHeight = parent.enableRtl ? parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
4215
+ parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
4216
+ document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = parent.contentHeight + 'px';
4217
+ }
4144
4218
  }, 0);
4145
4219
  };
4146
-
4147
4220
  ChartScroll.prototype.updateShimmer = function () {
4148
4221
  var parent = this.parent;
4149
4222
  setTimeout(function () {
@@ -4183,11 +4256,11 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
4183
4256
  scrollArgs.scrollDirection = 'Horizontal';
4184
4257
  scrollArgs.action = 'HorizontalScroll';
4185
4258
  }
4186
- if ((scrollArgs.scrollDirection != 'Horizontal' && !isNullOrUndefined(scrollArgs.scrollDirection)) && this.parent.enableVirtualization === true && (this.parent.isToolBarClick
4259
+ if ((scrollArgs.scrollDirection !== 'Horizontal' && !isNullOrUndefined(scrollArgs.scrollDirection)) && this.parent.enableVirtualization === true && (this.parent.isToolBarClick
4187
4260
  || isNullOrUndefined(this.parent.isToolBarClick))) {
4188
4261
  this.parent.isVirtualScroll = true;
4189
4262
  if (this.parent.showIndicator || isNullOrUndefined(this.parent.showIndicator)) {
4190
- if (!this.parent.enableVirtualMaskRow && this.parent.enableVirtualization && this.parent.loadingIndicator.indicatorType === "Spinner") {
4263
+ if (!this.parent.enableVirtualMaskRow && this.parent.enableVirtualization && this.parent.loadingIndicator.indicatorType === 'Spinner') {
4191
4264
  this.updateSpinner();
4192
4265
  }
4193
4266
  }
@@ -4231,11 +4304,12 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
4231
4304
  * To set scroll left for chart scroll container
4232
4305
  *
4233
4306
  * @param {number} scrollLeft - To set scroll left for scroll container
4307
+ * @param {number} leftSign - specifies left sign
4234
4308
  * @returns {void} .
4235
4309
  */
4236
4310
  ChartScroll.prototype.setScrollLeft = function (scrollLeft, leftSign) {
4237
4311
  if (leftSign) {
4238
- scrollLeft = leftSign == -1 && this.parent.enableRtl ? -scrollLeft : scrollLeft;
4312
+ scrollLeft = leftSign === -1 && this.parent.enableRtl ? -scrollLeft : scrollLeft;
4239
4313
  }
4240
4314
  this.element.scrollLeft = scrollLeft;
4241
4315
  this.parent.ganttChartModule.chartTimelineContainer.scrollLeft = this.element.scrollLeft;
@@ -4393,9 +4467,11 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4393
4467
  }
4394
4468
  else {
4395
4469
  if (this.parent.viewType === 'ProjectView') {
4396
- this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[1].setAttribute('tabindex', '-1');
4470
+ if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody.children[parseInt(i.toString(), 10)].children[0].children[1].children[1])) {
4471
+ this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[1].setAttribute('tabindex', '-1');
4472
+ }
4397
4473
  }
4398
- else if (this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[0]) {
4474
+ else if (this.parent.chartRowsModule.ganttChartTableBody.children[parseInt(i.toString(), 10)].children[0].children[1].children[0]) {
4399
4475
  this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[0].setAttribute('tabindex', '-1');
4400
4476
  }
4401
4477
  }
@@ -4448,7 +4524,14 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4448
4524
  Math.floor((this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight));
4449
4525
  };
4450
4526
  GanttChart.prototype.renderRange = function (rangeCollection, currentRecord) {
4451
- var topValue = this.getTopValue(currentRecord);
4527
+ var topValue = 0;
4528
+ var rowIndex = this.parent.currentViewData.indexOf(currentRecord);
4529
+ if (!this.parent.allowTaskbarOverlap && this.parent.enableMultiTaskbar) {
4530
+ topValue = !currentRecord.expanded ? this.parent.getRowByIndex(rowIndex).offsetTop : this.parent.getRowByIndex(rowIndex).offsetTop + this.parent.rowHeight;
4531
+ }
4532
+ else {
4533
+ topValue = this.getTopValue(currentRecord);
4534
+ }
4452
4535
  var sameIDElement = this.rangeViewContainer.querySelector('.' + 'rangeContainer' + currentRecord.ganttProperties.rowUniqueID);
4453
4536
  if (sameIDElement) {
4454
4537
  sameIDElement.remove();
@@ -4461,7 +4544,14 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4461
4544
  return;
4462
4545
  }
4463
4546
  for (var i = 0; i < rangeCollection.length; i++) {
4464
- var height = this.getRangeHeight(currentRecord);
4547
+ var height = void 0;
4548
+ if (!this.parent.allowTaskbarOverlap && !currentRecord.expanded && this.parent.enableMultiTaskbar) {
4549
+ height = parseInt(this.parent.chartRowsModule.ganttChartTableBody.childNodes[rowIndex].style.height) -
4550
+ (this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight);
4551
+ }
4552
+ else {
4553
+ height = this.getRangeHeight(currentRecord);
4554
+ }
4465
4555
  var leftDiv = createElement('div', {
4466
4556
  className: rangeChildContainer + ' ' + 'e-leftarc', styles: (this.parent.enableRtl ? 'right:' : 'left:') +
4467
4557
  ((this.parent.enableRtl ? rangeCollection[i].left + rangeCollection[i].width - 5 : rangeCollection[i].left) + "px;\n top: " + Math.floor((this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight) / 2) + "px;\n height: " + (height + 1) + "px; border-right: 0px")
@@ -5778,7 +5868,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
5778
5868
  else {
5779
5869
  var value = property === 'topTier' ? 'bottomTier' : 'topTier';
5780
5870
  var assignValue = 'bottomTier';
5781
- if (newTimeline[assignValue].unit != "None") {
5871
+ if (newTimeline["" + assignValue].unit != "None") {
5782
5872
  _this.customTimelineSettings[value] = __assign({}, newTimeline[assignValue]);
5783
5873
  }
5784
5874
  }
@@ -6081,7 +6171,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
6081
6171
  else {
6082
6172
  secondValue = sortedUnitLevels[i + 1];
6083
6173
  }
6084
- if (count >= firstValue[tier].count) {
6174
+ if (count >= firstValue["" + tier].count) {
6085
6175
  currentZoomCollection = sortedUnitLevels[i];
6086
6176
  checkSameCountLevels = sortedUnitLevels.filter(function (tempLevel) {
6087
6177
  if (tier === "bottomTier") {
@@ -6099,7 +6189,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
6099
6189
  }
6100
6190
  break;
6101
6191
  }
6102
- else if (count < firstValue[tier].count && count > secondValue[tier].count) {
6192
+ else if (count < firstValue["" + tier].count && count > secondValue["" + tier].count) {
6103
6193
  currentZoomCollection = sortedUnitLevels[i + 1];
6104
6194
  checkSameCountLevels = sortedUnitLevels.filter(function (tempLevel) {
6105
6195
  if (tier === "bottomTier") {
@@ -7182,6 +7272,15 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7182
7272
  this.columnMenuOpen = function (args) {
7183
7273
  _this.parent.notify('columnMenuOpen', args);
7184
7274
  _this.parent.trigger('columnMenuOpen', args);
7275
+ document.querySelector(".e-colmenu").addEventListener('mousemove', function (event) {
7276
+ var filPopOptions = document.querySelector(".e-filter-popup");
7277
+ var filOptions = document.querySelector(".e-filter-item");
7278
+ if (!isNullOrUndefined(filPopOptions)) {
7279
+ if (!filOptions.classList.contains('e-focused')) {
7280
+ remove(_this.parent.filterModule.filterMenuElement);
7281
+ }
7282
+ }
7283
+ });
7185
7284
  };
7186
7285
  this.columnMenuClick = function (args) {
7187
7286
  _this.parent.trigger('columnMenuClick', args);
@@ -7213,6 +7312,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7213
7312
  this.parent.treeGrid = new TreeGrid();
7214
7313
  this.parent.treeGrid.allowSelection = false;
7215
7314
  this.parent.treeGrid.allowKeyboard = this.parent.allowKeyboard;
7315
+ this.parent.treeGrid['${enableHtmlSanitizer}'] = this.parent.enableHtmlSanitizer;
7216
7316
  this.parent.treeGrid.enableImmutableMode = this.parent.enableImmutableMode;
7217
7317
  this.treeGridColumns = [];
7218
7318
  if (!this.parent.isLocaleChanged && this.parent.isLoad) {
@@ -7403,6 +7503,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7403
7503
  if (!this.parent.ganttChartModule.isExpandCollapseFromChart && !this.parent.isExpandCollapseLevelMethod) {
7404
7504
  var collapsedArgs = this.createExpandCollapseArgs(args);
7405
7505
  this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
7506
+ if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && collapsedArgs['gridRow']) {
7507
+ collapsedArgs['gridRow'].style.height = collapsedArgs['chartRow'].style.height;
7508
+ this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
7509
+ this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
7510
+ document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
7511
+ }
7406
7512
  }
7407
7513
  if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
7408
7514
  this.parent.hideMaskRow();
@@ -7416,6 +7522,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7416
7522
  if (!args['data'].length) {
7417
7523
  var expandedArgs = this.createExpandCollapseArgs(args);
7418
7524
  this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
7525
+ if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && args['row']) {
7526
+ args['row'].style.height = this.parent.rowHeight + 'px';
7527
+ this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
7528
+ this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
7529
+ document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
7530
+ }
7419
7531
  }
7420
7532
  }
7421
7533
  if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
@@ -7508,6 +7620,14 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7508
7620
  this.parent.addDeleteRecord = false;
7509
7621
  }
7510
7622
  this.parent.trigger('actionComplete', updatedArgs);
7623
+ if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && this.parent.showOverAllocation) {
7624
+ for (var i = 0; i < this.parent.currentViewData.length; i++) {
7625
+ if (this.parent.currentViewData[i].hasChildRecords && !this.parent.currentViewData[i].expanded) {
7626
+ this.parent.chartRowsModule.updateDragDropRecords(this.parent.currentViewData[i]);
7627
+ }
7628
+ }
7629
+ this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
7630
+ }
7511
7631
  if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
7512
7632
  this.parent.hideMaskRow();
7513
7633
  }
@@ -8990,8 +9110,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8990
9110
  }
8991
9111
  }
8992
9112
  else {
8993
- labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
9113
+ var field = this.parent.labelSettings.taskLabel;
9114
+ labelString = this.getTaskLabel(field);
8994
9115
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
9116
+ if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
9117
+ labelString = SanitizeHtmlHelper.sanitize(labelString);
9118
+ }
8995
9119
  }
8996
9120
  if (labelString.indexOf('null') === -1) {
8997
9121
  if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
@@ -9003,7 +9127,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9003
9127
  (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9004
9128
  'display:' + 'inline-block;' +
9005
9129
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
9006
- this.taskBarHeight + 'px;">' + labelString + '</span>';
9130
+ this.taskBarHeight + 'px;"></span>';
9007
9131
  }
9008
9132
  else {
9009
9133
  taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
@@ -9011,7 +9135,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9011
9135
  (this.parent.enableRtl ? 'right;' : 'left;')) : '') +
9012
9136
  +(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9013
9137
  +(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
9014
- this.taskBarHeight + 'px;">' + labelString + '</span>';
9138
+ this.taskBarHeight + 'px;"></span>';
9015
9139
  }
9016
9140
  }
9017
9141
  var template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
@@ -9037,6 +9161,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9037
9161
  data.ganttProperties.segments.length === 0))) {
9038
9162
  if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
9039
9163
  var templateElement = this.createDivElement(template)[0];
9164
+ templateElement.innerText = labelString;
9040
9165
  var childLabel = this.parent.labelSettings.taskLabel;
9041
9166
  if (childLabel && childLabel['elementRef'])
9042
9167
  templateElement.appendChild(tempDiv);
@@ -9519,6 +9644,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9519
9644
  if (labelString) {
9520
9645
  labelString = labelString === 'isCustomTemplate' ? field : labelString;
9521
9646
  leftLabelTemplateNode = this.getLableText(labelString, leftLabelInnerDiv);
9647
+ if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
9648
+ labelString = SanitizeHtmlHelper.sanitize(labelString);
9649
+ labelString = labelString === 'isCustomTemplate' ? field : labelString;
9650
+ leftLabelTemplateNode = this.getLableText(labelString, leftLabelInnerDiv);
9651
+ }
9522
9652
  }
9523
9653
  }
9524
9654
  if (leftLabelTemplateNode && leftLabelTemplateNode.length > 0) {
@@ -9569,6 +9699,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9569
9699
  if (labelString) {
9570
9700
  labelString = labelString === 'isCustomTemplate' ? field : labelString;
9571
9701
  rightLabelTemplateNode = this.getLableText(labelString, rightLabelInnerDiv);
9702
+ if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
9703
+ labelString = SanitizeHtmlHelper.sanitize(labelString);
9704
+ labelString = labelString === 'isCustomTemplate' ? field : labelString;
9705
+ rightLabelTemplateNode = this.getLableText(labelString, rightLabelInnerDiv);
9706
+ }
9572
9707
  }
9573
9708
  }
9574
9709
  if (rightLabelTemplateNode && rightLabelTemplateNode.length > 0) {
@@ -9620,7 +9755,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9620
9755
  '<div class="' + manualParentMilestoneBottom + '" style="top:' +
9621
9756
  (this.milesStoneRadius) + 'px;border-right-width:' + this.milesStoneRadius + 'px; border-left-width:' +
9622
9757
  this.milesStoneRadius + 'px; border-top-width:' + this.milesStoneRadius + 'px;"></div></div>';
9623
- return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : template);
9758
+ return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : !data.ganttProperties.isMilestone ? template : null);
9624
9759
  };
9625
9760
  /**
9626
9761
  * To get parent taskbar node.
@@ -9664,6 +9799,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9664
9799
  else {
9665
9800
  labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
9666
9801
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
9802
+ if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
9803
+ labelString = SanitizeHtmlHelper.sanitize(labelString);
9804
+ }
9667
9805
  }
9668
9806
  if (labelString.indexOf('null') === -1) {
9669
9807
  if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
@@ -9676,7 +9814,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9676
9814
  'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9677
9815
  'display:' + 'inline-block;' +
9678
9816
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
9679
- this.taskBarHeight + 'px;">' + labelString + '</span>';
9817
+ this.taskBarHeight + 'px;"></span>';
9680
9818
  }
9681
9819
  else {
9682
9820
  labelDiv = '<span class="' +
@@ -9686,9 +9824,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9686
9824
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9687
9825
  (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
9688
9826
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9689
- this.taskBarHeight + 'px;">' + labelString + '</span>';
9827
+ this.taskBarHeight + 'px;"></span>';
9690
9828
  }
9691
9829
  var labelElement = this.createDivElement(labelDiv)[0];
9830
+ labelElement.innerText = labelString;
9692
9831
  var parentLabel = this.parent.labelSettings.taskLabel;
9693
9832
  if (parentLabel && parentLabel['elementRef'])
9694
9833
  labelElement.appendChild(div);
@@ -9855,7 +9994,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9855
9994
  var mileStoneLeft = -(this.connectorPointWidth + 2);
9856
9995
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
9857
9996
  var marginTop;
9858
- if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
9997
+ if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
9859
9998
  marginTop = '';
9860
9999
  }
9861
10000
  else {
@@ -9874,7 +10013,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9874
10013
  var pointerRight = this.parent.isAdaptive ? 10 : -2;
9875
10014
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
9876
10015
  var marginTop;
9877
- if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
10016
+ if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
9878
10017
  marginTop = '';
9879
10018
  }
9880
10019
  else {
@@ -10163,6 +10302,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10163
10302
  this.parent.renderTemplates();
10164
10303
  this.triggerQueryTaskbarInfo();
10165
10304
  this.parent.modifiedRecords = [];
10305
+ if (this.parent.viewType == 'ResourceView' && this.parent.showOverAllocation) {
10306
+ this.updateOverlapped();
10307
+ }
10166
10308
  if (collapsedResourceRecord.length) {
10167
10309
  for (var j = 0; j < collapsedResourceRecord.length; j++) {
10168
10310
  if (collapsedResourceRecord[j].hasChildRecords) {
@@ -10189,22 +10331,37 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10189
10331
  var taskbarContainerNode = this.taskbarContainer();
10190
10332
  taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
10191
10333
  taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
10192
- var connectorLineLeftNode = this.getLeftPointNode();
10193
- if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
10194
- taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
10334
+ var connectorLineLeftNode;
10335
+ if (!this.templateData.hasChildRecords && !this.parent.allowParentDependency) {
10336
+ var connectorLineLeftNode_1 = this.getLeftPointNode();
10337
+ taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode_1)[0]);
10338
+ }
10339
+ else if (this.parent.allowParentDependency) {
10340
+ connectorLineLeftNode = this.getLeftPointNode();
10341
+ if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
10342
+ taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
10343
+ }
10195
10344
  }
10196
10345
  if (this.templateData.hasChildRecords) {
10197
10346
  var parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
10347
+ var milestoneTemplateNode = this.getMilestoneNode(i, taskbarContainerNode);
10198
10348
  if (!this.templateData.ganttProperties.isAutoSchedule) {
10199
10349
  var manualTaskbar = this.getManualTaskbar();
10200
- manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
10201
- var connectorLineRightNode = this.getRightPointNode();
10202
- manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode)[0]);
10203
- taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
10350
+ if (!isNullOrUndefined(manualTaskbar[0])) {
10351
+ if (this.parent.allowParentDependency) {
10352
+ manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
10353
+ var connectorLineRightNode_1 = this.getRightPointNode();
10354
+ manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode_1)[0]);
10355
+ }
10356
+ taskbarContainerNode[0].appendChild([].slice.call(manualTaskbar)[0]);
10357
+ }
10204
10358
  }
10205
10359
  if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
10206
10360
  taskbarContainerNode[0].appendChild([].slice.call(parentTaskbarTemplateNode)[0]);
10207
10361
  }
10362
+ else if (milestoneTemplateNode && milestoneTemplateNode.length > 0) {
10363
+ taskbarContainerNode[0].appendChild([].slice.call(milestoneTemplateNode)[0]);
10364
+ }
10208
10365
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
10209
10366
  this.templateData.ganttProperties.baselineEndDate) {
10210
10367
  taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
@@ -10274,8 +10431,13 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10274
10431
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
10275
10432
  }
10276
10433
  }
10277
- if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
10278
- var connectorLineRightNode = this.getRightPointNode();
10434
+ var connectorLineRightNode;
10435
+ if (this.parent.allowParentDependency && ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords)) {
10436
+ connectorLineRightNode = this.getRightPointNode();
10437
+ taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
10438
+ }
10439
+ else if (!this.parent.allowParentDependency) {
10440
+ connectorLineRightNode = this.getRightPointNode();
10279
10441
  taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
10280
10442
  }
10281
10443
  var rightLabelNode = this.getRightLabelNode(i);
@@ -10296,6 +10458,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10296
10458
  else {
10297
10459
  var text = createElement('Text');
10298
10460
  text.innerHTML = indicators[indicatorIndex].name;
10461
+ if (this.parent.enableHtmlSanitizer && typeof (indicators[indicatorIndex].name) === 'string') {
10462
+ indicators[indicatorIndex].name = SanitizeHtmlHelper.sanitize(indicators[indicatorIndex].name);
10463
+ text.innerText = indicators[indicatorIndex].name;
10464
+ }
10299
10465
  taskIndicatorTextNode = text.childNodes;
10300
10466
  }
10301
10467
  taskIndicatorNode[0].appendChild([].slice.call(taskIndicatorTextNode)[0]);
@@ -10389,7 +10555,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10389
10555
  getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
10390
10556
  (trElement.querySelector('.' + baselineBar) ? getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor : null);
10391
10557
  }
10392
- else {
10558
+ else if (taskbarElement) {
10393
10559
  var childTask = taskbarElement.querySelector(classCollections[0]);
10394
10560
  var progressTask = taskbarElement.querySelector(classCollections[1]);
10395
10561
  args.taskbarBgColor = isNullOrUndefined(childTask) ? null : taskbarElement.classList.contains(traceChildTaskBar) ?
@@ -10468,7 +10634,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10468
10634
  trElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
10469
10635
  }
10470
10636
  }
10471
- else {
10637
+ else if (taskbarElement) {
10472
10638
  if (taskbarElement.querySelector(classCollections[0]) &&
10473
10639
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor !== args.taskbarBgColor) {
10474
10640
  taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.taskbarBgColor;
@@ -10570,6 +10736,78 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10570
10736
  }
10571
10737
  return null;
10572
10738
  };
10739
+ // to update the eOverlapped property
10740
+ ChartRows.prototype.updateOverlapped = function () {
10741
+ for (var k = 0; k < this.parent.treeGrid.parentData.length; k++) {
10742
+ var childRecords = this.parent.treeGrid.parentData[k].childRecords;
10743
+ for (var i = 0; i < childRecords.length; i++) {
10744
+ if (childRecords[i + 1]) {
10745
+ childRecords[i].ganttProperties.eOverlapped = undefined;
10746
+ }
10747
+ for (var j = i + 1; j < childRecords.length; j++) {
10748
+ childRecords[j].ganttProperties.eOverlapped = undefined;
10749
+ if (childRecords[i].ganttProperties.startDate.getTime() < childRecords[j].ganttProperties.endDate.getTime() &&
10750
+ childRecords[i].ganttProperties.endDate.getTime() > childRecords[j].ganttProperties.startDate.getTime()) {
10751
+ childRecords[j].ganttProperties.eOverlapped = true;
10752
+ childRecords[i].ganttProperties.eOverlapped = true;
10753
+ }
10754
+ else {
10755
+ if (isNullOrUndefined(childRecords[j].ganttProperties.eOverlapped)) {
10756
+ childRecords[j].ganttProperties.eOverlapped = false;
10757
+ }
10758
+ if (isNullOrUndefined(childRecords[i].ganttProperties.eOverlapped)) {
10759
+ childRecords[i].ganttProperties.eOverlapped = false;
10760
+ }
10761
+ }
10762
+ }
10763
+ }
10764
+ }
10765
+ };
10766
+ // To update the row height when allow overallocation set to false
10767
+ ChartRows.prototype.updateDragDropRecords = function (data, tr) {
10768
+ var childRecords = data.childRecords;
10769
+ var rowIndex = this.parent.currentViewData.indexOf(data);
10770
+ var treeGridContentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
10771
+ this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
10772
+ if (!tr) {
10773
+ tr = this.ganttChartTableBody.childNodes[rowIndex];
10774
+ }
10775
+ tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = this.parent.rowHeight + 'px';
10776
+ this.parent.contentHeight = treeGridContentHeight;
10777
+ var rowIDs = [];
10778
+ var rowCounts = 0;
10779
+ if (data) {
10780
+ for (var i = 0; i < childRecords.length; i++) {
10781
+ for (var j = i + 1; j < childRecords.length; j++) {
10782
+ var taskbarContainer = tr.getElementsByClassName('e-taskbar-main-container');
10783
+ for (var k = 0; k < taskbarContainer.length; k++) {
10784
+ if (childRecords[i].ganttProperties.startDate.getTime() < childRecords[j].ganttProperties.endDate.getTime() &&
10785
+ childRecords[i].ganttProperties.endDate.getTime() > childRecords[j].ganttProperties.startDate.getTime()) {
10786
+ if (taskbarContainer[k].getAttribute('rowuniqueid') === childRecords[j]['rowUniqueID'] &&
10787
+ rowIDs.indexOf(childRecords[j]['rowUniqueID']) == -1) {
10788
+ rowIDs.push(childRecords[j]['rowUniqueID']);
10789
+ rowCounts++;
10790
+ tr.children[0]['style'].verticalAlign = 'baseline';
10791
+ tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop = (rowCounts * this.parent.rowHeight) + this.taskBarMarginTop + 'px';
10792
+ tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = parseInt(tr['style'].height) + this.parent.rowHeight + 'px';
10793
+ }
10794
+ }
10795
+ else {
10796
+ if (taskbarContainer[k].getAttribute('rowuniqueid') === childRecords[j]['rowUniqueID'] &&
10797
+ rowIDs.indexOf(childRecords[j]['rowUniqueID']) == -1 && this.parent.rowDragAndDropModule &&
10798
+ this.parent.rowDragAndDropModule['draggedRecord'] && taskbarContainer[k].getAttribute('rowuniqueid') ===
10799
+ this.parent.rowDragAndDropModule['draggedRecord']['rowUniqueID'] && this.parent.rowDragAndDropModule['draggedRecord']['rowUniqueID'] === childRecords[j]['rowUniqueID']) {
10800
+ tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop =
10801
+ this.parent.editModule.taskbarEditModule.draggedRecordMarginTop;
10802
+ }
10803
+ }
10804
+ }
10805
+ }
10806
+ }
10807
+ this.parent.contentHeight = treeGridContentHeight;
10808
+ document.getElementsByClassName('e-chart-rows-container')[0]['style'].height = this.parent.contentHeight + 'px';
10809
+ }
10810
+ };
10573
10811
  /**
10574
10812
  * To refresh edited TR
10575
10813
  *
@@ -10583,14 +10821,22 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10583
10821
  var selectedItem = this.parent.currentViewData[index];
10584
10822
  if (index !== -1 && selectedItem) {
10585
10823
  var data = selectedItem;
10824
+ if (!this.parent.allowTaskbarOverlap && this.parent.viewType === 'ResourceView' && data.expanded) {
10825
+ tr['style'].height = this.parent.treeGrid.getRowByIndex(index)['style'].height = this.parent.rowHeight + 'px';
10826
+ }
10586
10827
  if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar) {
10587
10828
  tr.replaceChild(this.getResourceParent(data).childNodes[0], tr.childNodes[0]);
10588
10829
  }
10589
10830
  else {
10590
- tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
10831
+ if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && !data.expanded) {
10832
+ tr.replaceWith(this.getGanttChartRow(index, data));
10833
+ }
10834
+ else {
10835
+ tr.replaceChild(this.getGanttChartRow(index, data).childNodes[0], tr.childNodes[0]);
10836
+ }
10591
10837
  }
10592
10838
  this.parent.renderTemplates();
10593
- if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
10839
+ if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && this.parent.allowTaskbarOverlap) {
10594
10840
  if (isValidateRange) {
10595
10841
  this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
10596
10842
  }
@@ -10612,6 +10858,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10612
10858
  }
10613
10859
  var dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
10614
10860
  this.parent.treeGrid.grid.setRowData(dataId, data);
10861
+ if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap) {
10862
+ this.updateDragDropRecords(selectedItem, tr);
10863
+ }
10864
+ if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
10865
+ this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
10866
+ }
10615
10867
  var nextEditableElement = this.parent.ganttChartModule.tempNextElement;
10616
10868
  if (this.parent.ganttChartModule.isEditableElement && nextEditableElement) {
10617
10869
  this.parent.treeGrid.grid.focusModule.focus();
@@ -10625,7 +10877,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10625
10877
  ChartRows.prototype.getResourceParent = function (record) {
10626
10878
  var chartRows = this.parent.ganttChartModule.getChartRows();
10627
10879
  //Below code is for rendering taskbartemplate in resource view with multi taskbar
10628
- if (this.parent.initialChartRowElements) {
10880
+ if (this.parent.initialChartRowElements && (!this.parent.allowTaskbarDragAndDrop && this.parent.allowTaskbarOverlap)) {
10629
10881
  for (var j = 0; j < this.parent.initialChartRowElements.length; j++) {
10630
10882
  if (!isNullOrUndefined(chartRows[j])) {
10631
10883
  if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
@@ -10653,7 +10905,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10653
10905
  var id = chartRows[i].querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
10654
10906
  var ganttData = this.parent.getRecordByID(id);
10655
10907
  var zIndex = "";
10656
- if (ganttData && ganttData.ganttProperties.eOverlapIndex) {
10908
+ if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
10657
10909
  zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
10658
10910
  }
10659
10911
  var cloneChildElement = cloneElement.cloneNode(true);
@@ -10801,7 +11053,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
10801
11053
  for (var count = length; count >= 0; count--) {
10802
11054
  var ganttData = predecessorTasks[count];
10803
11055
  var ganttProp = ganttData.ganttProperties;
10804
- this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
11056
+ if ((!ganttData.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
11057
+ this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
11058
+ }
10805
11059
  }
10806
11060
  };
10807
11061
  /**
@@ -10964,18 +11218,26 @@ var Dependency = /** @__PURE__ @class */ (function () {
10964
11218
  offsetUnit: offsetUnits.durationUnit,
10965
11219
  offset: offsetUnits.duration
10966
11220
  };
10967
- var fromData = _this.parent.connectorLineModule.getRecordByID(obj.to);
10968
- var toData = _this.parent.connectorLineModule.getRecordByID(obj.from);
10969
- var isValid;
10970
- if (_this.parent.connectorLineEditModule && toData && fromData) {
10971
- isValid = _this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
10972
- if (isValid)
11221
+ var isOwnParent = _this.checkIsParent(match[0]);
11222
+ if (!_this.parent.allowParentDependency) {
11223
+ if (!isOwnParent) {
10973
11224
  collection.push(obj);
11225
+ }
10974
11226
  }
10975
11227
  else {
10976
- collection.push(obj);
11228
+ var fromData = _this.parent.connectorLineModule.getRecordByID(obj.to);
11229
+ var toData = _this.parent.connectorLineModule.getRecordByID(obj.from);
11230
+ var isValid = void 0;
11231
+ if (_this.parent.connectorLineEditModule && toData && fromData) {
11232
+ isValid = _this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
11233
+ if (isValid)
11234
+ collection.push(obj);
11235
+ }
11236
+ else {
11237
+ collection.push(obj);
11238
+ }
11239
+ match.splice(0);
10977
11240
  }
10978
- match.splice(0);
10979
11241
  });
10980
11242
  return collection;
10981
11243
  };
@@ -11098,7 +11360,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
11098
11360
  var length = predecessorsCollection.length;
11099
11361
  for (var count = 0; count < length; count++) {
11100
11362
  ganttRecord = predecessorsCollection[count];
11101
- this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
11363
+ if ((!ganttRecord.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
11364
+ this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
11365
+ }
11102
11366
  }
11103
11367
  };
11104
11368
  /**
@@ -11147,12 +11411,16 @@ var Dependency = /** @__PURE__ @class */ (function () {
11147
11411
  * @private
11148
11412
  */
11149
11413
  Dependency.prototype.updatedRecordsDateByPredecessor = function () {
11414
+ if (!this.parent.autoCalculateDateScheduling) {
11415
+ return;
11416
+ }
11150
11417
  var flatData = this.parent.flatData;
11151
11418
  var totLength = this.parent.flatData.length;
11152
11419
  for (var count = 0; count < totLength; count++) {
11153
11420
  if (flatData[count].ganttProperties.predecessorsName) {
11154
11421
  this.validatePredecessorDates(flatData[count]);
11155
- if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks) {
11422
+ if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
11423
+ && this.parent.allowParentDependency) {
11156
11424
  this.parent.editModule['updateChildItems'](flatData[count]);
11157
11425
  }
11158
11426
  }
@@ -11197,7 +11465,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
11197
11465
  var predecessor = predecessors[count];
11198
11466
  parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor.from);
11199
11467
  record = this.parent.connectorLineModule.getRecordByID(predecessor.to);
11200
- if (this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
11468
+ if (this.parent.allowParentDependency && this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
11201
11469
  && (ganttRecord.hasChildRecords || record.hasChildRecords)) {
11202
11470
  this.parentPredecessors.push(ganttRecord);
11203
11471
  }
@@ -11881,9 +12149,16 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11881
12149
  * @private
11882
12150
  */
11883
12151
  ConnectorLine.prototype.getHeightValue = function (data) {
11884
- return (data.parentIndex * data.rowHeight) > (data.childIndex * data.rowHeight) ?
11885
- ((data.parentIndex * data.rowHeight) - (data.childIndex * data.rowHeight)) :
11886
- ((data.childIndex * data.rowHeight) - (data.parentIndex * data.rowHeight));
12152
+ if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
12153
+ return (data.parentIndex * this.parent.rowHeight) > (data.childIndex * this.parent.rowHeight) ?
12154
+ ((data.parentIndex * this.parent.rowHeight) - (data.childIndex * this.parent.rowHeight)) :
12155
+ ((data.childIndex * this.parent.rowHeight) - (data.parentIndex * this.parent.rowHeight));
12156
+ }
12157
+ else {
12158
+ return (data.parentIndex * data.rowHeight) > (data.childIndex * data.rowHeight) ?
12159
+ ((data.parentIndex * data.rowHeight) - (data.childIndex * data.rowHeight)) :
12160
+ ((data.childIndex * data.rowHeight) - (data.parentIndex * data.rowHeight));
12161
+ }
11887
12162
  };
11888
12163
  /**
11889
12164
  * To get sstype2 inner element width.
@@ -11960,7 +12235,30 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11960
12235
  var heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
11961
12236
  var borderTopWidth = 0;
11962
12237
  var addTop = 0;
11963
- if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex]) {
12238
+ var parentOverlapTopValue = 0;
12239
+ var childOverlapTopValue = 0;
12240
+ var count = 0;
12241
+ if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
12242
+ for (var i = 0; i < this.parent.currentViewData.length; i++) {
12243
+ if (this.parent.getRowByIndex(i).style.display != 'none') {
12244
+ if (count < data.parentIndex) {
12245
+ count++;
12246
+ parentOverlapTopValue = parentOverlapTopValue + this.parent.getRowByIndex(i).offsetHeight;
12247
+ }
12248
+ }
12249
+ }
12250
+ count = 0;
12251
+ for (var j = 0; j < this.parent.currentViewData.length; j++) {
12252
+ if (this.parent.getRowByIndex(j).style.display != 'none') {
12253
+ if (count < data.childIndex) {
12254
+ count++;
12255
+ childOverlapTopValue = childOverlapTopValue + this.parent.getRowByIndex(j).offsetHeight;
12256
+ }
12257
+ }
12258
+ }
12259
+ heightValue = Math.abs(parentOverlapTopValue - childOverlapTopValue);
12260
+ }
12261
+ if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex] && this.parent.allowParentDependency) {
11964
12262
  var fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
11965
12263
  var toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
11966
12264
  var fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
@@ -12053,7 +12351,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12053
12351
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
12054
12352
  if (this.getParentPosition(data) === 'FSType1') {
12055
12353
  div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12056
- ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12354
+ ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12057
12355
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
12058
12356
  div = div + eLine;
12059
12357
  div = div + direction + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
@@ -12073,7 +12371,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12073
12371
  'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
12074
12372
  }
12075
12373
  if (this.getParentPosition(data) === 'FSType2') {
12076
- div = div + direction + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((data.parentIndex * data.rowHeight) + addTop +
12374
+ div = div + direction + data.parentLeft + 'px;top:' + (isVirtual ? connectorLine$$1.top : ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop +
12077
12375
  this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12078
12376
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
12079
12377
  div = div + eLine;
@@ -12105,7 +12403,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12105
12403
  }
12106
12404
  if (this.getParentPosition(data) === 'FSType3') {
12107
12405
  div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12108
- ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12406
+ ((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12109
12407
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
12110
12408
  div = div + rightArrow;
12111
12409
  div = div + direction + '10px;' + this.getBorderStyles((this.parent.enableRtl ? 'right' : 'left'), 10) +
@@ -12135,7 +12433,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12135
12433
  }
12136
12434
  if (this.getParentPosition(data) === 'FSType4') {
12137
12435
  div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12138
- ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12436
+ ((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12139
12437
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
12140
12438
  div = div + rightArrow;
12141
12439
  div = div + direction + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
@@ -12161,7 +12459,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12161
12459
  }
12162
12460
  if (this.getParentPosition(data) === 'SSType4') {
12163
12461
  div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12164
- ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12462
+ ((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12165
12463
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
12166
12464
  div = div + rightArrow;
12167
12465
  div = div + direction + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
@@ -12174,7 +12472,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12174
12472
  }
12175
12473
  if (this.getParentPosition(data) === 'SSType3') {
12176
12474
  div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12177
- ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12475
+ ((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12178
12476
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
12179
12477
  div = div + rightArrow;
12180
12478
  div = div + direction + '10px;' + duplicateStingTwo;
@@ -12187,7 +12485,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12187
12485
  }
12188
12486
  if (this.getParentPosition(data) === 'SSType2') {
12189
12487
  div = div + direction + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12190
- ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12488
+ ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12191
12489
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
12192
12490
  div = div + eLine;
12193
12491
  div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
@@ -12207,7 +12505,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12207
12505
  }
12208
12506
  if (this.getParentPosition(data) === 'SSType1') {
12209
12507
  div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12210
- ((data.parentIndex * data.rowHeight) + addTop +
12508
+ ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop +
12211
12509
  this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12212
12510
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
12213
12511
  div = div + eLine;
@@ -12225,7 +12523,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12225
12523
  }
12226
12524
  if (this.getParentPosition(data) === 'FFType1') {
12227
12525
  div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12228
- ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12526
+ ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12229
12527
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
12230
12528
  div = div + eLine;
12231
12529
  div = div + direction + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
@@ -12249,7 +12547,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12249
12547
  }
12250
12548
  if (this.getParentPosition(data) === 'FFType2') {
12251
12549
  div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12252
- ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12550
+ ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12253
12551
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
12254
12552
  div = div + eLine;
12255
12553
  div = div + (isMilestoneParent ? direction + '-1px;' : '') + 'width:' +
@@ -12275,7 +12573,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12275
12573
  }
12276
12574
  if (this.getParentPosition(data) === 'FFType3') {
12277
12575
  div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12278
- ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12576
+ ((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12279
12577
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
12280
12578
  div = div + duplicateStingOne;
12281
12579
  div = div + eLine;
@@ -12298,7 +12596,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12298
12596
  }
12299
12597
  if (this.getParentPosition(data) === 'FFType4') {
12300
12598
  div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12301
- ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12599
+ ((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12302
12600
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
12303
12601
  div = div + leftArrow;
12304
12602
  div = div + (direction + ((data.childLeft + data.childWidth) -
@@ -12327,7 +12625,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12327
12625
  }
12328
12626
  if (this.getParentPosition(data) === 'SFType4') {
12329
12627
  div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12330
- ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
12628
+ ((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;width:1px;' +
12331
12629
  'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
12332
12630
  div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
12333
12631
  'border-bottom-width:' + (5 + this.lineStroke) +
@@ -12355,7 +12653,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12355
12653
  }
12356
12654
  if (this.getParentPosition(data) === 'SFType3') {
12357
12655
  div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12358
- ((data.childIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12656
+ ((!this.parent.allowTaskbarOverlap ? childOverlapTopValue : (data.childIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12359
12657
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
12360
12658
  div = div + duplicateStingOne;
12361
12659
  div = div + eLine;
@@ -12373,7 +12671,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12373
12671
  }
12374
12672
  if (this.getParentPosition(data) === 'SFType1') {
12375
12673
  div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12376
- ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12674
+ ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12377
12675
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
12378
12676
  div = div + eLine;
12379
12677
  div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
@@ -12398,7 +12696,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12398
12696
  }
12399
12697
  if (this.getParentPosition(data) === 'SFType2') {
12400
12698
  div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12401
- ((data.parentIndex * data.rowHeight) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12699
+ ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop + this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12402
12700
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
12403
12701
  div = div + eLine;
12404
12702
  div = div + direction + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
@@ -12794,7 +13092,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
12794
13092
  this.toolTipObj.position = 'BottomCenter';
12795
13093
  this.toolTipObj.openDelay = 700;
12796
13094
  this.toolTipObj.enableRtl = this.parent.enableRtl;
12797
- this.toolTipObj.enableHtmlSanitizer = false;
13095
+ this.toolTipObj.enableHtmlSanitizer = this.parent.enableHtmlSanitizer;
12798
13096
  this.toolTipObj.cssClass = ganttTooltip;
12799
13097
  this.toolTipObj.animation = { open: { effect: 'None', delay: 0 }, close: { effect: 'None', delay: 0 } };
12800
13098
  this.toolTipObj.afterOpen = this.updateTooltipPosition.bind(this);
@@ -13007,8 +13305,12 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13007
13305
  var taskName;
13008
13306
  if (ganttData) {
13009
13307
  data = ganttData.ganttProperties;
13010
- taskName = !isNullOrUndefined(data.taskName) ? '<tr class = "e-gantt-tooltip-rowcell"><td colspan="3">' +
13011
- (this.parent.disableHtmlEncode ? data.taskName.replace(/</g, "&lt;").replace(/>/g, "&gt;") : data.taskName) + '</td></tr>' : '';
13308
+ var taskNameValue = data.taskName;
13309
+ if (this.parent.enableHtmlSanitizer && typeof (taskNameValue) === 'string') {
13310
+ taskNameValue = SanitizeHtmlHelper.sanitize(taskNameValue);
13311
+ }
13312
+ taskName = !isNullOrUndefined(taskNameValue) ? '<tr class = "e-gantt-tooltip-rowcell"><td colspan="3">' +
13313
+ (this.parent.disableHtmlEncode ? taskNameValue.replace(/</g, "&lt;").replace(/>/g, "&gt;") : taskNameValue) + '</td></tr>' : '';
13012
13314
  }
13013
13315
  switch (elementType) {
13014
13316
  case 'milestone':
@@ -13020,9 +13322,13 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13020
13322
  else if (!isNullOrUndefined(data.startDate)) {
13021
13323
  milestoneStartDate = data.startDate;
13022
13324
  }
13325
+ var sDateValue = this.parent.getFormatedDate(milestoneStartDate, this.parent.getDateFormat());
13326
+ if (this.parent.enableHtmlSanitizer && typeof (sDateValue) === 'string') {
13327
+ sDateValue = SanitizeHtmlHelper.sanitize(sDateValue);
13328
+ }
13023
13329
  var sDate = !isNullOrUndefined(milestoneStartDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
13024
13330
  '<td class = "e-gantt-tooltip-value">' +
13025
- this.parent.getFormatedDate(milestoneStartDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13331
+ sDateValue + '</td></tr>' : '';
13026
13332
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13027
13333
  taskName + sDate + '</tbody></table>';
13028
13334
  break;
@@ -13030,20 +13336,28 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13030
13336
  case 'taskbar':
13031
13337
  {
13032
13338
  var scheduledTask = !ganttData.hasChildRecords || data.isAutoSchedule ? true : false;
13339
+ var startDateValue = this.parent.getFormatedDate(scheduledTask ? data.startDate : data.autoStartDate, this.parent.getDateFormat());
13340
+ var endDateValue = this.parent.getFormatedDate(scheduledTask ? data.endDate : data.autoEndDate, this.parent.getDateFormat());
13341
+ var durationValue = this.parent.getDurationString((scheduledTask ? data.duration : data.autoDuration), data.durationUnit);
13342
+ var progressValue = data.progress;
13343
+ if (this.parent.enableHtmlSanitizer) {
13344
+ startDateValue = typeof (startDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(startDateValue) : startDateValue;
13345
+ endDateValue = typeof (endDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(endDateValue) : endDateValue;
13346
+ durationValue = typeof (durationValue) === 'string' ? SanitizeHtmlHelper.sanitize(durationValue) : durationValue;
13347
+ progressValue = typeof (progressValue) === 'string' ? SanitizeHtmlHelper.sanitize(progressValue) : progressValue;
13348
+ }
13033
13349
  var startDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13034
13350
  this.parent.localeObj.getConstant(scheduledTask ? 'startDate' : 'subTasksStartDate') +
13035
- '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
13036
- this.parent.getFormatedDate(scheduledTask ? data.startDate : data.autoStartDate, this.parent.getDateFormat()) +
13037
- '</td></tr>' : '';
13351
+ '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' + startDateValue + '</td></tr>' : '';
13038
13352
  var endDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13039
13353
  this.parent.localeObj.getConstant(scheduledTask ? 'endDate' : 'subTasksEndDate') +
13040
- '</td><td>:</td><td class = "e-gantt-tooltip-value">' + this.parent.getFormatedDate(scheduledTask ? data.endDate : data.autoEndDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13354
+ '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' + endDateValue + '</td></tr>' : '';
13041
13355
  var duration = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
13042
13356
  this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
13043
- '<td class = "e-gantt-tooltip-value"> ' + this.parent.getDurationString((scheduledTask ? data.duration : data.autoDuration), data.durationUnit) +
13357
+ '<td class = "e-gantt-tooltip-value"> ' + durationValue +
13044
13358
  '</td></tr>' : '';
13045
13359
  var progress = !isNullOrUndefined(data.progress) ? '<tr><td class = "e-gantt-tooltip-label">' +
13046
- this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' + data.progress +
13360
+ this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' + progressValue +
13047
13361
  '</td></tr>' : '';
13048
13362
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13049
13363
  taskName + startDate + endDate + duration + progress + '</tbody></table>';
@@ -13051,82 +13365,131 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13051
13365
  }
13052
13366
  case 'baseline':
13053
13367
  {
13368
+ var baselineStartDateValue = this.parent.getFormatedDate(data.baselineStartDate, this.parent.getDateFormat());
13369
+ var baselineEndDateValue = this.parent.getFormatedDate(data.baselineEndDate, this.parent.getDateFormat());
13370
+ if (this.parent.enableHtmlSanitizer) {
13371
+ baselineStartDateValue = typeof (baselineStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(baselineStartDateValue) : baselineStartDateValue;
13372
+ baselineEndDateValue = typeof (baselineEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(baselineEndDateValue) : baselineEndDateValue;
13373
+ }
13054
13374
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13055
13375
  taskName + '<tr><td class = "e-gantt-tooltip-label">' +
13056
13376
  this.parent.localeObj.getConstant('baselineStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13057
- this.parent.getFormatedDate(data.baselineStartDate, this.parent.getDateFormat()) + '</td></tr><tr>' +
13377
+ baselineStartDateValue + '</td></tr><tr>' +
13058
13378
  '<td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('baselineEndDate') +
13059
13379
  '</td><td>:</td><td class = "e-gantt-tooltip-value">' +
13060
- this.parent.getFormatedDate(data.baselineEndDate, this.parent.getDateFormat()) + '</td></tr></tbody></table>';
13380
+ baselineEndDateValue + '</td></tr></tbody></table>';
13061
13381
  break;
13062
13382
  }
13063
13383
  case 'marker':
13064
13384
  {
13065
13385
  var markerTooltipElement = parent.tooltipModule.getMarkerTooltipData(args);
13386
+ var markerTooltipElementValue = this.parent.getFormatedDate(this.parent.dateValidationModule.getDateFromFormat(markerTooltipElement.day), this.parent.getDateFormat());
13066
13387
  var markerLabel = markerTooltipElement.label ? markerTooltipElement.label : '';
13388
+ if (this.parent.enableHtmlSanitizer) {
13389
+ markerLabel = typeof (markerLabel) === 'string' ? SanitizeHtmlHelper.sanitize(markerLabel) : markerLabel;
13390
+ markerTooltipElementValue = typeof (markerTooltipElementValue) === 'string' ? SanitizeHtmlHelper.sanitize(markerTooltipElementValue) : markerTooltipElementValue;
13391
+ }
13067
13392
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr><td>' +
13068
- this.parent.getFormatedDate(this.parent.dateValidationModule.getDateFromFormat(markerTooltipElement.day), this.parent.getDateFormat()) +
13069
- '</td></tr><tr><td>' +
13070
- markerLabel + '</td></tr></tbody></table>';
13393
+ markerTooltipElementValue + '</td></tr><tr><td>' + (this.parent.disableHtmlEncode ? markerLabel.replace(/</g, "&lt;").replace(/>/g, "&gt;") : markerLabel) + '</td></tr></tbody></table>';
13071
13394
  break;
13072
13395
  }
13073
13396
  case 'connectorLine':
13074
13397
  {
13398
+ var fromNameValue = parent.tooltipModule.predecessorTooltipData.fromName;
13399
+ var fromIdValue = parent.tooltipModule.predecessorTooltipData.fromId;
13400
+ var toNameValue = parent.tooltipModule.predecessorTooltipData.toName;
13401
+ var toIdValue = parent.tooltipModule.predecessorTooltipData.toId;
13402
+ var linkTextValue = parent.tooltipModule.predecessorTooltipData.linkText;
13403
+ var offsetStringValue = parent.tooltipModule.predecessorTooltipData.offsetString;
13404
+ if (this.parent.enableHtmlSanitizer) {
13405
+ fromNameValue = typeof (fromNameValue) === 'string' ? SanitizeHtmlHelper.sanitize(fromNameValue) : fromNameValue;
13406
+ fromIdValue = typeof (fromIdValue) === 'string' ? SanitizeHtmlHelper.sanitize(fromIdValue) : fromIdValue;
13407
+ toNameValue = typeof (toNameValue) === 'string' ? SanitizeHtmlHelper.sanitize(toNameValue) : toNameValue;
13408
+ toIdValue = typeof (toIdValue) === 'string' ? SanitizeHtmlHelper.sanitize(toIdValue) : toIdValue;
13409
+ linkTextValue = typeof (linkTextValue) === 'string' ? SanitizeHtmlHelper.sanitize(linkTextValue) : linkTextValue;
13410
+ offsetStringValue = typeof (offsetStringValue) === 'string' ? SanitizeHtmlHelper.sanitize(offsetStringValue) : offsetStringValue;
13411
+ }
13075
13412
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr><td class = "e-gantt-tooltip-label">' +
13076
13413
  this.parent.localeObj.getConstant('from') + '</td><td>:</td>' +
13077
- '<td class = "e-gantt-tooltip-value">' + parent.tooltipModule.predecessorTooltipData.fromName + ' (' +
13078
- parent.tooltipModule.predecessorTooltipData.fromId + ')' + '</td></tr><tr><td class = "e-gantt-tooltip-label">' +
13414
+ '<td class = "e-gantt-tooltip-value">' + (this.parent.disableHtmlEncode ? fromNameValue.replace(/</g, "&lt;").replace(/>/g, "&gt;") : fromNameValue) + ' (' +
13415
+ (this.parent.disableHtmlEncode ? (typeof (fromIdValue) === 'string' ? fromIdValue.replace(/</g, "&lt;").replace(/>/g, "&gt;") : fromIdValue) : fromIdValue) + ')' + '</td></tr><tr><td class = "e-gantt-tooltip-label">' +
13079
13416
  this.parent.localeObj.getConstant('to') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13080
- parent.tooltipModule.predecessorTooltipData.toName +
13081
- ' (' + parent.tooltipModule.predecessorTooltipData.toId + ')' +
13082
- '</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('taskLink') +
13083
- '</td><td>:</td><td class = "e-gantt-tooltip-value"> ' + parent.tooltipModule.predecessorTooltipData.linkText +
13417
+ (this.parent.disableHtmlEncode ? toNameValue.replace(/</g, "&lt;").replace(/>/g, "&gt;") : toNameValue) + ' (' + toIdValue + ')' + '</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('taskLink') +
13418
+ '</td><td>:</td><td class = "e-gantt-tooltip-value"> ' + linkTextValue +
13084
13419
  '</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('lag') +
13085
13420
  '</td><td>:</td><td class = "e-gantt-tooltip-value">' +
13086
- parent.tooltipModule.predecessorTooltipData.offsetString + '</td></tr></tbody></table>';
13421
+ offsetStringValue + '</td></tr></tbody></table>';
13087
13422
  break;
13088
13423
  }
13089
13424
  case 'indicator':
13090
13425
  if (args.target.title.length) {
13091
- content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + args.target.title + '</tr></tbody></table>';
13426
+ var titleValue = args.target.title;
13427
+ if (this.parent.enableHtmlSanitizer && typeof (titleValue) === 'string') {
13428
+ titleValue = SanitizeHtmlHelper.sanitize(titleValue);
13429
+ }
13430
+ content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + titleValue + '</tr></tbody></table>';
13092
13431
  }
13093
13432
  break;
13094
13433
  case 'timeline':
13095
- content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + args.target.title + '</tr></tbody></table>';
13434
+ var timlineTitleValue = args.target.title;
13435
+ if (this.parent.enableHtmlSanitizer && typeof (timlineTitleValue) === 'string') {
13436
+ timlineTitleValue = SanitizeHtmlHelper.sanitize(timlineTitleValue);
13437
+ }
13438
+ content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr>' + timlineTitleValue + '</tr></tbody></table>';
13096
13439
  break;
13097
13440
  case 'manualtaskbar':
13098
13441
  {
13442
+ var autoStartDateValue = this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat());
13443
+ var autoEndDateValue = this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat());
13444
+ var durationUnitValue = this.parent.getDurationString(data.duration, data.durationUnit);
13445
+ var manualStartDateValue = this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat());
13446
+ var manualEndDateValue = this.parent.getFormatedDate(data.endDate, this.parent.getDateFormat());
13447
+ if (this.parent.enableHtmlSanitizer) {
13448
+ autoStartDateValue = typeof (autoStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoStartDateValue) : autoStartDateValue;
13449
+ autoEndDateValue = typeof (autoEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoEndDateValue) : autoEndDateValue;
13450
+ durationUnitValue = typeof (durationUnitValue) === 'string' ? SanitizeHtmlHelper.sanitize(durationUnitValue) : durationUnitValue;
13451
+ manualStartDateValue = typeof (manualStartDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(manualStartDateValue) : manualStartDateValue;
13452
+ manualEndDateValue = typeof (manualEndDateValue) === 'string' ? SanitizeHtmlHelper.sanitize(manualEndDateValue) : manualEndDateValue;
13453
+ }
13099
13454
  var autoStartDate = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13100
13455
  this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
13101
- this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13456
+ autoStartDateValue + '</td></tr>' : '';
13102
13457
  var autoEndDate = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13103
13458
  this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13104
- this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13459
+ autoEndDateValue + '</td></tr>' : '';
13105
13460
  var durationValue = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
13106
13461
  this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
13107
- '<td class = "e-gantt-tooltip-value"> ' + this.parent.getDurationString(data.duration, data.durationUnit) +
13462
+ '<td class = "e-gantt-tooltip-value"> ' + durationUnitValue +
13108
13463
  '</td></tr>' : '';
13109
13464
  var manualStartDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13110
13465
  this.parent.localeObj.getConstant('startDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
13111
- this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13466
+ manualStartDateValue + '</td></tr>' : '';
13112
13467
  var manualEndDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13113
13468
  this.parent.localeObj.getConstant('endDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13114
- this.parent.getFormatedDate(data.endDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13469
+ manualEndDateValue + '</td></tr>' : '';
13115
13470
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13116
13471
  taskName + manualStartDate + autoStartDate + manualEndDate + autoEndDate + durationValue + '</tbody></table>';
13117
13472
  break;
13118
13473
  }
13119
13474
  case 'manualmilestone':
13120
13475
  {
13476
+ var autoStartValue = this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat());
13477
+ var autoEndValue = this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat());
13478
+ var dateValue = this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat());
13479
+ if (this.parent.enableHtmlSanitizer) {
13480
+ autoStartValue = typeof (autoStartValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoStartValue) : autoStartValue;
13481
+ autoEndValue = typeof (autoEndValue) === 'string' ? SanitizeHtmlHelper.sanitize(autoEndValue) : autoEndValue;
13482
+ dateValue = typeof (dateValue) === 'string' ? SanitizeHtmlHelper.sanitize(dateValue) : dateValue;
13483
+ }
13121
13484
  var autoStart = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13122
13485
  this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
13123
- this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13486
+ autoStartValue + '</td></tr>' : '';
13124
13487
  var autoEnd = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13125
13488
  this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13126
- this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13489
+ autoEndValue + '</td></tr>' : '';
13127
13490
  var date = '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
13128
13491
  '<td class = "e-gantt-tooltip-value">' +
13129
- this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat()) + '</tr>';
13492
+ dateValue + '</tr>';
13130
13493
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13131
13494
  taskName + date + autoStart + autoEnd + '</tbody></table>';
13132
13495
  break;
@@ -13155,6 +13518,9 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13155
13518
  */
13156
13519
  Tooltip$$1.prototype.getPredecessorTooltipData = function (args) {
13157
13520
  var predeceesorParent = args.target.parentElement.id;
13521
+ if (this.parent.enableHtmlSanitizer && typeof (predeceesorParent) === 'string') {
13522
+ predeceesorParent = SanitizeHtmlHelper.sanitize(predeceesorParent);
13523
+ }
13158
13524
  var taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
13159
13525
  taskIds.shift();
13160
13526
  var fromTask;
@@ -13434,7 +13800,6 @@ var FocusModule = /** @__PURE__ @class */ (function () {
13434
13800
  var top_1 = containerPosition.top + (containerPosition.height / 2);
13435
13801
  var left = containerPosition.left + (containerPosition.width / 2);
13436
13802
  this.setActiveElement(e.target);
13437
- // eslint-disable-next-line security/detect-non-literal-fs-filename
13438
13803
  contextMenu.open(top_1, left);
13439
13804
  e.preventDefault();
13440
13805
  break;
@@ -13813,6 +14178,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13813
14178
  this.treeGrid.isReact = true;
13814
14179
  this.treeGrid.grid.isReact = true;
13815
14180
  }
14181
+ if (this.isVue) {
14182
+ this.treeGrid.isVue = true;
14183
+ this.treeGrid.grid.isVue = true;
14184
+ this.treeGrid.vueInstance = this.vueInstance;
14185
+ this.treeGrid.grid.vueInstance = this.vueInstance;
14186
+ }
13816
14187
  createSpinner({ target: this.element }, this.createElement);
13817
14188
  this.trigger('load', {});
13818
14189
  this.element.classList.add(root);
@@ -13838,13 +14209,13 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13838
14209
  };
13839
14210
  Gantt.prototype.hideMaskRow = function () {
13840
14211
  var isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
13841
- if (!isNullOrUndefined(this.contentMaskTable) && isTablePresent != 0) {
14212
+ if (!isNullOrUndefined(this.contentMaskTable) && (isTablePresent != 0 || this.contentMaskTable)) {
13842
14213
  var maskTable = this.contentMaskTable;
13843
14214
  remove(maskTable);
13844
14215
  this.contentMaskTable = null;
13845
14216
  }
13846
14217
  isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
13847
- if (!isNullOrUndefined(this.headerMaskTable) && isTablePresent != 0) {
14218
+ if (!isNullOrUndefined(this.headerMaskTable) && (isTablePresent != 0 || this.headerMaskTable)) {
13848
14219
  var maskTable = this.headerMaskTable;
13849
14220
  remove(maskTable);
13850
14221
  this.headerMaskTable = null;
@@ -13857,8 +14228,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13857
14228
  }
13858
14229
  if (this.element.querySelectorAll('.' + timelineHeaderTableContainer).length != 0) {
13859
14230
  for (var i = 0; i < this.singleTier; i++) {
13860
- if (!isNullOrUndefined(this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i])) {
13861
- this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i]['style'].visibility = "visible";
14231
+ if (!isNullOrUndefined(this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)])) {
14232
+ this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)]['style'].visibility = "visible";
13862
14233
  }
13863
14234
  }
13864
14235
  }
@@ -13880,7 +14251,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13880
14251
  if (this.element.querySelectorAll('.' + timelineHeaderTableContainer).length != 0) {
13881
14252
  this.singleTier = this.timelineModule.isSingleTier ? 1 : 2;
13882
14253
  for (var i = 0; i < this.singleTier; i++) {
13883
- this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i]['style'].visibility = "hidden";
14254
+ this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)]['style'].visibility = "hidden";
13884
14255
  }
13885
14256
  }
13886
14257
  if (this.singleTier === 0) {
@@ -13999,7 +14370,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13999
14370
  }
14000
14371
  this.topBottomHeader = 0;
14001
14372
  for (var i = 0; i < row.length; i++) {
14002
- tbody.appendChild(this.applyTimelineMaskRow(row[i]));
14373
+ tbody.appendChild(this.applyTimelineMaskRow(row[parseInt(i.toString(), 10)]));
14003
14374
  this.topBottomHeader = this.topBottomHeader + 1;
14004
14375
  }
14005
14376
  table.appendChild(tbody);
@@ -14013,11 +14384,11 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14013
14384
  maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
14014
14385
  maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
14015
14386
  for (var i = 0; i < maskRow.childNodes.length - 1; i++) {
14016
- maskRow.childNodes[i]['style']['width'] = 166 + 'px';
14387
+ maskRow.childNodes[parseInt(i.toString(), 10)]['style']['width'] = 166 + 'px';
14017
14388
  }
14018
14389
  var maskCells = [].slice.call(maskRow.childNodes);
14019
14390
  for (var i = 0; i < maskCells.length; i++) {
14020
- var maskCell = maskCells[i];
14391
+ var maskCell = maskCells[parseInt(i.toString(), 10)];
14021
14392
  switch (this.topBottomHeader) {
14022
14393
  case 0:
14023
14394
  if (this.enableRtl) {
@@ -14034,7 +14405,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14034
14405
  maskCell.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
14035
14406
  var innerMaskCells = [].slice.call(maskCell.childNodes);
14036
14407
  for (var i_1 = 0; i_1 < innerMaskCells.length; i_1++) {
14037
- var htmlInner = innerMaskCells[i_1];
14408
+ var htmlInner = innerMaskCells[parseInt(i_1.toString(), 10)];
14038
14409
  if (i_1 === 0) {
14039
14410
  if (this.enableRtl) {
14040
14411
  htmlInner.innerHTML = '<span class="e-mask e-skeleton e-skeleton-text e-shimmer-wave e-innerHTML"></span>';
@@ -14086,7 +14457,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14086
14457
  else if (this.columnLoop === 4) {
14087
14458
  this.columnLoop = 1;
14088
14459
  }
14089
- tbody.appendChild(this.applyMaskRow(row[j]));
14460
+ tbody.appendChild(this.applyMaskRow(row[parseInt(j.toString(), 10)]));
14090
14461
  }
14091
14462
  table.appendChild(tbody);
14092
14463
  table.style.width = 100 + '%';
@@ -14107,7 +14478,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14107
14478
  }
14108
14479
  var maskCells = [].slice.call(maskRow.childNodes);
14109
14480
  for (var i = 0; i < maskCells.length; i++) {
14110
- var maskCell = maskCells[i];
14481
+ var maskCell = maskCells[parseInt(i.toString(), 10)];
14111
14482
  switch (this.columnLoop) {
14112
14483
  case 1:
14113
14484
  if (i === 0) {
@@ -14205,7 +14576,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14205
14576
  this.predecessorModule['parentIds'] = [];
14206
14577
  this.predecessorModule['parentRecord'] = [];
14207
14578
  this.predecessorModule.updatePredecessors();
14208
- if (this.isInPredecessorValidation && this.enableValidation) {
14579
+ if (this.isInPredecessorValidation && this.enableValidation && this.autoCalculateDateScheduling) {
14209
14580
  this.predecessorModule.updatedRecordsDateByPredecessor();
14210
14581
  }
14211
14582
  }
@@ -14218,7 +14589,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14218
14589
  if (this.enableValidation) {
14219
14590
  this.dataOperation.updateGanttData();
14220
14591
  }
14221
- this.predecessorModule.updateParentPredecessor();
14592
+ if (this.allowParentDependency) {
14593
+ this.predecessorModule.updateParentPredecessor();
14594
+ }
14222
14595
  if (this.dataSource instanceof Object && isCountRequired(this)) {
14223
14596
  var count = getValue('count', this.dataSource);
14224
14597
  this.treeGrid.dataSource = { result: this.flatData, count: count };
@@ -14231,7 +14604,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14231
14604
  if (this.enableValidation) {
14232
14605
  this.dataOperation.updateGanttData();
14233
14606
  }
14234
- this.predecessorModule.updateParentPredecessor();
14607
+ if (this.allowParentDependency) {
14608
+ this.predecessorModule.updateParentPredecessor();
14609
+ }
14235
14610
  this.treeGridPane.classList.remove('e-temp-content');
14236
14611
  remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
14237
14612
  this.notify('dataReady', {});
@@ -14348,22 +14723,27 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14348
14723
  * @private
14349
14724
  */
14350
14725
  Gantt.prototype.updateContentHeight = function (args) {
14351
- if (this.virtualScrollModule && this.enableVirtualization && !isNullOrUndefined(args)) {
14352
- var length_1 = getValue('result.length', args);
14353
- this.contentHeight = length_1 * this.rowHeight;
14726
+ if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
14727
+ return;
14354
14728
  }
14355
14729
  else {
14356
- var expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
14357
- this.currentViewData : this.getExpandedRecords(this.currentViewData);
14358
- var height = void 0;
14359
- var chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
14360
- if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
14361
- height = chartRow$$1.getBoundingClientRect().height;
14730
+ if (this.virtualScrollModule && this.enableVirtualization && !isNullOrUndefined(args)) {
14731
+ var length_1 = getValue('result.length', args);
14732
+ this.contentHeight = length_1 * this.rowHeight;
14362
14733
  }
14363
14734
  else {
14364
- height = this.rowHeight;
14735
+ var expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
14736
+ this.currentViewData : this.getExpandedRecords(this.currentViewData);
14737
+ var height = void 0;
14738
+ var chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
14739
+ if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
14740
+ height = chartRow$$1.getBoundingClientRect().height;
14741
+ }
14742
+ else {
14743
+ height = this.rowHeight;
14744
+ }
14745
+ this.contentHeight = expandedRecords.length * height;
14365
14746
  }
14366
- this.contentHeight = expandedRecords.length * height;
14367
14747
  }
14368
14748
  };
14369
14749
  /**
@@ -14879,7 +15259,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14879
15259
  this.chartRowsModule.refreshGanttRows();
14880
15260
  break;
14881
15261
  case 'includeWeekend':
14882
- case 'dayWorkingTime':
14883
15262
  case 'allowUnscheduledTasks':
14884
15263
  case 'holidays':
14885
15264
  this.isLoad = true;
@@ -14972,6 +15351,10 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14972
15351
  case 'readOnly':
14973
15352
  case 'viewType':
14974
15353
  case 'taskFields':
15354
+ case 'dayWorkingTime':
15355
+ case 'allowTaskbarDragAndDrop':
15356
+ case 'allowTaskbarOverlap':
15357
+ case 'allowParentDependency':
14975
15358
  if (prop === 'locale') {
14976
15359
  this.isLocaleChanged = true;
14977
15360
  }
@@ -14986,6 +15369,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14986
15369
  }
14987
15370
  }
14988
15371
  if (isRefresh) {
15372
+ if (this.isLoad && this.contentMaskTable) {
15373
+ this.contentMaskTable = null;
15374
+ }
14989
15375
  this.refresh();
14990
15376
  }
14991
15377
  };
@@ -15113,7 +15499,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15113
15499
  args: [this]
15114
15500
  });
15115
15501
  }
15116
- if (this.allowRowDragAndDrop) {
15502
+ if (this.allowRowDragAndDrop || this.allowTaskbarDragAndDrop) {
15117
15503
  modules.push({
15118
15504
  member: 'rowDragAndDrop',
15119
15505
  args: [this]
@@ -15648,10 +16034,11 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15648
16034
  * @param {PdfExportProperties} pdfExportProperties - Defines the export properties of the Gantt.
15649
16035
  * @param {isMultipleExport} isMultipleExport - Define to enable multiple export.
15650
16036
  * @param {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.
16037
+ * @param {boolean} isBlob - If the 'isBlob' parameter is set to true, the method returns PDF data as a blob instead of exporting it as a down-loadable PDF file. The default value is false.
15651
16038
  * @returns {Promise<any>} .
15652
16039
  */
15653
- Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc) {
15654
- return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc)
16040
+ Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
16041
+ return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob)
15655
16042
  : null;
15656
16043
  };
15657
16044
  /**
@@ -15683,7 +16070,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15683
16070
  * @private
15684
16071
  */
15685
16072
  Gantt.prototype.renderWorkingDayCell = function (args) {
15686
- var includeWeekend = this.taskMode !== 'Auto' ? true : this.includeWeekend ? true : false;
16073
+ var includeWeekend = this.taskMode !== 'Auto' ? true : (this.includeWeekend || !this.autoCalculateDateScheduling) ? true : false;
15687
16074
  var nonWorkingDays = !includeWeekend ? this.nonWorkingDayIndex : [];
15688
16075
  var holidays = this.totalHolidayDates;
15689
16076
  if (nonWorkingDays.length > 0 && nonWorkingDays.indexOf(args.date.getDay()) !== -1) {
@@ -15693,7 +16080,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15693
16080
  var tempDate = new Date(args.date.getTime());
15694
16081
  tempDate.setHours(0, 0, 0);
15695
16082
  if (holidays.indexOf(tempDate.getTime()) !== -1) {
15696
- args.isDisabled = true;
16083
+ if (!this.autoCalculateDateScheduling) {
16084
+ args.isDisabled = false;
16085
+ }
16086
+ else {
16087
+ args.isDisabled = true;
16088
+ }
15697
16089
  }
15698
16090
  }
15699
16091
  };
@@ -15810,8 +16202,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15810
16202
  var id = ganttData.rowUniqueID;
15811
16203
  var task = this.getRecordByID(id);
15812
16204
  var isValid = false;
15813
- if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(ganttData[field]) && (value instanceof Date ? value.getTime() !==
15814
- ganttData[field].getTime() : ganttData[field] !== value))) {
16205
+ if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(ganttData["" + field]) && (value instanceof Date ? value.getTime() !==
16206
+ ganttData["" + field].getTime() : ganttData["" + field] !== value))) {
15815
16207
  isValid = true;
15816
16208
  }
15817
16209
  if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
@@ -16758,6 +17150,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16758
17150
  __decorate([
16759
17151
  Property(false)
16760
17152
  ], Gantt.prototype, "enableImmutableMode", void 0);
17153
+ __decorate([
17154
+ Property(true)
17155
+ ], Gantt.prototype, "allowParentDependency", void 0);
17156
+ __decorate([
17157
+ Property(false)
17158
+ ], Gantt.prototype, "enableHtmlSanitizer", void 0);
16761
17159
  __decorate([
16762
17160
  Property(true)
16763
17161
  ], Gantt.prototype, "disableHtmlEncode", void 0);
@@ -16767,6 +17165,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16767
17165
  __decorate([
16768
17166
  Property(true)
16769
17167
  ], Gantt.prototype, "enableVirtualMaskRow", void 0);
17168
+ __decorate([
17169
+ Property(true)
17170
+ ], Gantt.prototype, "UpdateOffsetOnTaskbarEdit", void 0);
17171
+ __decorate([
17172
+ Property(true)
17173
+ ], Gantt.prototype, "autoCalculateDateScheduling", void 0);
16770
17174
  __decorate([
16771
17175
  Property(true)
16772
17176
  ], Gantt.prototype, "autoFocusTasks", void 0);
@@ -16815,6 +17219,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16815
17219
  __decorate([
16816
17220
  Property(false)
16817
17221
  ], Gantt.prototype, "renderBaseline", void 0);
17222
+ __decorate([
17223
+ Property(false)
17224
+ ], Gantt.prototype, "allowTaskbarDragAndDrop", void 0);
17225
+ __decorate([
17226
+ Property(true)
17227
+ ], Gantt.prototype, "allowTaskbarOverlap", void 0);
16818
17228
  __decorate([
16819
17229
  Property('Horizontal')
16820
17230
  ], Gantt.prototype, "gridLines", void 0);
@@ -17260,8 +17670,10 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17260
17670
  }
17261
17671
  if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
17262
17672
  data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
17263
- || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
17264
- args.cancel = true;
17673
+ || field === taskSettings.dependency || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
17674
+ if ((field === taskSettings.dependency && !this.parent.allowParentDependency) || field !== taskSettings.dependency) {
17675
+ args.cancel = true;
17676
+ }
17265
17677
  }
17266
17678
  else {
17267
17679
  var callBackPromise_1 = new Deferred();
@@ -17311,7 +17723,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17311
17723
  };
17312
17724
  CellEdit.prototype.isValueChange = function (args, field) {
17313
17725
  var data = getValue('data', args);
17314
- var editedValue = data[field];
17726
+ var editedValue = data["" + field];
17315
17727
  var previousValue = getValue('previousData', args);
17316
17728
  if ((isNullOrUndefined(editedValue) && !isNullOrUndefined(previousValue)) || (!isNullOrUndefined(editedValue) && isNullOrUndefined(previousValue))) {
17317
17729
  return true;
@@ -17479,7 +17891,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17479
17891
  var ganttSegments = [];
17480
17892
  var segments = ganttProp.segments;
17481
17893
  for (var i = 0; i < segments.length; i++) {
17482
- var segment = segments[i];
17894
+ var segment = segments[parseInt(i.toString(), 10)];
17483
17895
  var endDate = segment.endDate;
17484
17896
  endDate = (!isNullOrUndefined(ganttProp.endDate)) && endDate.getTime() <
17485
17897
  ganttProp.endDate.getTime() && i !== segments.length - 1 ? endDate : ganttProp.endDate;
@@ -17678,7 +18090,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17678
18090
  }
17679
18091
  }
17680
18092
  if (!isNullOrUndefined(index) && index !== -1) {
17681
- editedResources.push(previousResource[index]);
18093
+ editedResources.push(previousResource[parseInt(index.toString(), 10)]);
17682
18094
  }
17683
18095
  else {
17684
18096
  var resource = resourceData.filter(function (resourceInfo) {
@@ -17740,7 +18152,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17740
18152
  CellEdit.prototype.typeEdited = function (args, editedObj) {
17741
18153
  var key = 'taskType';
17742
18154
  var ganttProb = args.data.ganttProperties;
17743
- var taskType = editedObj[key];
18155
+ var taskType = editedObj["" + key];
17744
18156
  this.parent.setRecordValue('taskType', taskType, ganttProb, true);
17745
18157
  //this.parent.dataOperation.updateMappingData(args.data, 'taskType');
17746
18158
  this.updateEditedRecord(args);
@@ -17850,15 +18262,12 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
17850
18262
  this.parent.tooltipModule.toolTipObj.close();
17851
18263
  this.updateTooltip(segmentIndex);
17852
18264
  if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointLeftDrag') {
17853
- // eslint-disable-next-line security/detect-non-literal-fs-filename
17854
18265
  this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + connectorPointLeft));
17855
18266
  }
17856
18267
  else if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointRightDrag') {
17857
- // eslint-disable-next-line security/detect-non-literal-fs-filename
17858
18268
  this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + connectorPointRight));
17859
18269
  }
17860
18270
  else {
17861
- // eslint-disable-next-line security/detect-non-literal-fs-filename
17862
18271
  this.toolTipObj.open(this.taskbarEdit.taskBarEditElement);
17863
18272
  }
17864
18273
  }
@@ -18049,6 +18458,10 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18049
18458
  _this.elementOffsetWidth = 0;
18050
18459
  _this.elementOffsetHeight = 0;
18051
18460
  _this.segmentIndex = -1;
18461
+ _this.currentItemTop = 0;
18462
+ _this.currentItemPrevTop = 0;
18463
+ _this.topValue = 0;
18464
+ _this.draggedRecordMarginTop = 0;
18052
18465
  _this.parent = ganttObj;
18053
18466
  _this.initPublicProp();
18054
18467
  _this.wireEvents();
@@ -18291,7 +18704,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18291
18704
  if (!isNullOrUndefined(parentRecord) && !parentRecord.expanded) {
18292
18705
  this.prevZIndex = (this.taskBarEditElement).style.zIndex;
18293
18706
  (this.taskBarEditElement).style.zIndex = '1000';
18294
- addClass([this.taskBarEditElement.querySelector('.e-gantt-child-taskbar')], 'e-collapsed-taskbar-drag');
18707
+ if (this.taskBarEditElement.querySelector('.e-gantt-child-taskbar')) {
18708
+ addClass([this.taskBarEditElement.querySelector('.e-gantt-child-taskbar')], 'e-collapsed-taskbar-drag');
18709
+ }
18295
18710
  }
18296
18711
  }
18297
18712
  }
@@ -18455,9 +18870,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18455
18870
  this.parent.ganttChartModule.scrollObject.previousScroll.left;
18456
18871
  }
18457
18872
  this.tooltipPositionX = this.mouseDownX;
18458
- this.mouseDownY = e.pageY - containerPosition.top +
18873
+ this.mouseDownY = this.dragMoveY = e.pageY - containerPosition.top +
18459
18874
  this.parent.ganttChartModule.scrollObject.previousScroll.top;
18460
18875
  }
18876
+ if (this.parent.viewType == "ResourceView" && this.parent.allowTaskbarDragAndDrop) {
18877
+ var toolbarHeight = 0;
18878
+ if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
18879
+ toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
18880
+ }
18881
+ this.topValue = this.parent.getOffsetRect(event.target).top - this.parent.getOffsetRect(this.parent.element).top -
18882
+ parseInt((closest(event.target, '.e-taskbar-main-container'))['style'].marginTop) -
18883
+ this.parent.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'] -
18884
+ toolbarHeight + document.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollTop;
18885
+ this.currentItemPrevTop = this.currentItemTop = this.topValue;
18886
+ }
18461
18887
  if (this.taskBarEditAction === 'ConnectorPointLeftDrag' || this.taskBarEditAction === 'ConnectorPointRightDrag') {
18462
18888
  this.fromPredecessorText = this.taskBarEditAction === 'ConnectorPointLeftDrag' ? 'start' : 'finish';
18463
18889
  this.parent.connectorLineModule.tooltipTable.innerHTML = this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.taskBarEditRecord.ganttProperties.taskName, this.fromPredecessorText, '', '');
@@ -18589,6 +19015,22 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18589
19015
  this.drawFalseLine();
18590
19016
  }
18591
19017
  }
19018
+ if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
19019
+ if (this.dragMoveY > this.mouseMoveY) {
19020
+ this.mouseMoveY = this.dragMoveY - this.mouseMoveY;
19021
+ this.currentItemTop = this.currentItemTop - this.mouseMoveY;
19022
+ }
19023
+ else {
19024
+ this.mouseMoveY -= this.dragMoveY;
19025
+ this.currentItemTop = this.currentItemTop + this.mouseMoveY;
19026
+ }
19027
+ var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
19028
+ this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
19029
+ this.topValue = this.currentItemTop;
19030
+ this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
19031
+ this.topValue == this.currentItemTop) ? this.topValue :
19032
+ this.currentItemPrevTop;
19033
+ }
18592
19034
  this.setItemPosition();
18593
19035
  this.updateEditedItem();
18594
19036
  this.editTooltip.updateTooltip(this.segmentIndex);
@@ -18668,12 +19110,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18668
19110
  this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.left;
18669
19111
  this.startScrollTimer('left');
18670
19112
  }
18671
- else if (isConnectorLineEdit && ((mouseY + 80) >
19113
+ else if (((mouseY + 80) >
18672
19114
  containerPosition.top + this.parent.ganttChartModule.chartBodyContainer.offsetHeight)) {
18673
19115
  this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
18674
19116
  this.startScrollTimer('bottom');
18675
19117
  }
18676
- else if (isConnectorLineEdit && ((mouseY - 20) < containerPosition.top)) {
19118
+ else if (((mouseY - 20) < containerPosition.top)) {
18677
19119
  this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
18678
19120
  this.startScrollTimer('top');
18679
19121
  }
@@ -19459,6 +19901,11 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19459
19901
  taskBarMainContainer$$1.style.width = (width) + 'px';
19460
19902
  leftLabelContainer$$1.style.width = (item.left) + 'px';
19461
19903
  taskBarMainContainer$$1.style.setProperty(position, (item.left) + 'px');
19904
+ if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule &&
19905
+ (this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'MilestoneDrag')) {
19906
+ taskBarMainContainer$$1.style.setProperty('top', (this.topValue) + 'px');
19907
+ taskBarMainContainer$$1.style.zIndex = '4';
19908
+ }
19462
19909
  if (this.taskBarEditAction === 'LeftResizing' && this.segmentIndex === 0) {
19463
19910
  var parent_1 = this.taskBarEditElement.parentElement;
19464
19911
  var segmentedTasks = parent_1.getElementsByClassName('e-segmented-taskbar');
@@ -19571,7 +20018,8 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19571
20018
  this.previousMouseMove = null;
19572
20019
  this.editTooltip.showHideTaskbarEditTooltip(false, this.segmentIndex);
19573
20020
  if (this.taskBarEditAction && this.isMouseDragged) {
19574
- if (!this.dragMouseLeave && this.taskBarEditedAction) {
20021
+ if ((!this.dragMouseLeave && this.taskBarEditedAction) || (this.parent.viewType === 'ResourceView' &&
20022
+ this.parent.allowTaskbarDragAndDrop)) {
19575
20023
  this.taskBarEditedAction(e);
19576
20024
  this.isMouseDragged = false;
19577
20025
  }
@@ -19680,6 +20128,65 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19680
20128
  var args = extend({}, arg);
19681
20129
  var ganttRecord = args.data;
19682
20130
  var taskData = ganttRecord.ganttProperties;
20131
+ var draggedRecIndex = this.parent.currentViewData.indexOf(ganttRecord);
20132
+ if ((args.taskBarEditAction === 'MilestoneDrag' || args.taskBarEditAction === 'ChildDrag') && this.parent.viewType === "ResourceView"
20133
+ && this.parent.allowTaskbarDragAndDrop && this.dragMoveY > 0) {
20134
+ if (this.parent.rowDragAndDropModule) {
20135
+ var flatRecordCol = this.parent.currentViewData;
20136
+ if (flatRecordCol[this.taskBarEditRecord.parentItem.index] && ((this.parent.editedRecords.indexOf(flatRecordCol[this.taskBarEditRecord.parentItem.index]) === -1))) {
20137
+ this.parent.editedRecords.push(flatRecordCol[this.taskBarEditRecord.parentItem.index]);
20138
+ }
20139
+ var ganttrec = void 0;
20140
+ var resHeight = 0;
20141
+ var rowCount = 0;
20142
+ var childIndex_1;
20143
+ var droppedRecord = void 0;
20144
+ var treeGridrows = this.parent.treeGrid.getRows().length;
20145
+ for (var i = 0; i < treeGridrows; i++) {
20146
+ if (resHeight < this.dragMoveY && this.parent.getRowByIndex(i).style.display !== 'none') {
20147
+ rowCount = i;
20148
+ resHeight = resHeight + parseInt(this.parent.getRowByIndex(i).style.height);
20149
+ if (!flatRecordCol[i].parentItem) {
20150
+ ganttrec = flatRecordCol[i];
20151
+ }
20152
+ else {
20153
+ ganttrec = this.parent.getRecordByID(flatRecordCol[i].parentItem.taskId);
20154
+ }
20155
+ }
20156
+ }
20157
+ var draggedRecordtaskbar = this.parent.getRowByIndex(draggedRecIndex).getElementsByClassName('e-taskbar-main-container');
20158
+ var taskbarContainer = this.parent.getRowByIndex(rowCount).getElementsByClassName('e-taskbar-main-container');
20159
+ for (var j = 0; j < taskbarContainer.length; j++) {
20160
+ if (taskbarContainer[j]['offsetTop'] < this.dragMoveY && draggedRecordtaskbar[0].getAttribute('rowuniqueid') !==
20161
+ taskbarContainer[j].getAttribute('rowuniqueid')) {
20162
+ this.draggedRecordMarginTop = taskbarContainer[j]['style'].marginTop;
20163
+ childIndex_1 = taskbarContainer[j].getAttribute('rowuniqueid');
20164
+ }
20165
+ }
20166
+ if (childIndex_1) {
20167
+ droppedRecord = this.parent.currentViewData.filter(function (data) {
20168
+ if (data['rowUniqueID'] === childIndex_1) {
20169
+ return data;
20170
+ }
20171
+ else {
20172
+ return null;
20173
+ }
20174
+ });
20175
+ }
20176
+ if (droppedRecord) {
20177
+ var droppedRecordIndex = this.parent.currentViewData.indexOf(droppedRecord[0]);
20178
+ var position = (droppedRecord[0].hasChildRecords || (!droppedRecord[0].parentItem &&
20179
+ droppedRecord[0].childRecords.length == 0)) ? 'child' : 'below';
20180
+ if (this.parent.rowDragAndDropModule) {
20181
+ this.parent.rowDragAndDropModule.reorderRows([draggedRecIndex], droppedRecordIndex, position);
20182
+ }
20183
+ this.dragMoveY = 0;
20184
+ }
20185
+ }
20186
+ if (this.parent.viewType === 'ResourceView' && this.parent.showOverAllocation) {
20187
+ this.parent.ganttChartModule.renderOverAllocationContainer();
20188
+ }
20189
+ }
19683
20190
  if (args.taskBarEditAction === 'ProgressResizing') {
19684
20191
  if (args.previousData.progress !== taskData.progress) {
19685
20192
  this.parent.setRecordValue('progress', this.getProgressPercent(taskData.width, taskData.progressWidth), taskData, true);
@@ -19871,14 +20378,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19871
20378
  }
19872
20379
  if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
19873
20380
  !this.elementOffsetLeft) || !this.parent.enableVirtualization) {
19874
- if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
19875
- this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
19876
- this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
19877
- }
19878
- else {
20381
+ if (!this.parent.allowParentDependency) {
19879
20382
  this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
19880
20383
  this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
19881
20384
  }
20385
+ else {
20386
+ if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
20387
+ this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
20388
+ this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
20389
+ }
20390
+ else {
20391
+ this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
20392
+ this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
20393
+ }
20394
+ }
19882
20395
  this.elementOffsetWidth = this.taskBarEditElement.offsetWidth;
19883
20396
  this.elementOffsetHeight = this.taskBarEditElement.offsetHeight;
19884
20397
  }
@@ -20897,7 +21410,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20897
21410
  targetId = inputElement.querySelector('input').getAttribute('id');
20898
21411
  inputElement = inputElement.querySelector('#' + targetId);
20899
21412
  }
20900
- else if (!isNullOrUndefined(args.event) && !isNullOrUndefined(args.event.path[1])) {
21413
+ else if (!isNullOrUndefined(args.event) && !isNullOrUndefined(args.event.path) && !isNullOrUndefined(args.event.path)[1]) {
20901
21414
  inputElement = args.event.path[1];
20902
21415
  targetId = inputElement.querySelector('input').getAttribute('id');
20903
21416
  inputElement = inputElement.querySelector('#' + targetId);
@@ -20936,6 +21449,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20936
21449
  if (!isNullOrUndefined(tasks.startDate) && tasks.startDate !== colName) {
20937
21450
  this.updateScheduleFields(dialog, ganttProp, 'startDate');
20938
21451
  }
21452
+ if (tasks.endDate === colName && !isNullOrUndefined(ganttProp.startDate) && !isNullOrUndefined(args.value) && ganttProp.startDate.getTime() > args.value) {
21453
+ this.updateScheduleFields(dialog, ganttProp, 'endDate');
21454
+ }
20939
21455
  if (!isNullOrUndefined(tasks.endDate) && tasks.endDate !== colName) {
20940
21456
  this.updateScheduleFields(dialog, ganttProp, 'endDate');
20941
21457
  }
@@ -21126,6 +21642,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
21126
21642
  if (taskSettings.endDate === columnName) {
21127
21643
  if (value !== '') {
21128
21644
  var endDate = this.parent.dateValidationModule.getDateFromFormat(value);
21645
+ if (isNullOrUndefined(ganttProp.startDate) && isNullOrUndefined(endDate) && ganttProp.startDate.getTime() > endDate.getTime()) {
21646
+ endDate = ganttProp.endDate;
21647
+ }
21129
21648
  if (endDate.getHours() === 0 && ganttObj.defaultEndTime !== 86400) {
21130
21649
  this.parent.dateValidationModule.setTime(ganttObj.defaultEndTime, endDate);
21131
21650
  }
@@ -21508,6 +22027,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
21508
22027
  item.content = this.renderGeneralTab(item.content);
21509
22028
  }
21510
22029
  else if (item.content === 'Dependency') {
22030
+ if (this.editedRecord.hasChildRecords && !this.parent.allowParentDependency) {
22031
+ item.disabled = true;
22032
+ }
21511
22033
  item.content = this.renderPredecessorTab(item.content);
21512
22034
  }
21513
22035
  else if (item.content === 'Resources') {
@@ -21969,27 +22491,34 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
21969
22491
  this.preTableCollection = [];
21970
22492
  for (var i = 0; i < flatData.length; i++) {
21971
22493
  var data = flatData[i];
21972
- var currentFlatData = data;
21973
- if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
21974
- this.isValidData = false;
21975
- }
21976
- else {
21977
- do {
21978
- if (currentFlatData.parentItem) {
21979
- currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
21980
- if (currentFlatData.uniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
21981
- this.isValidData = false;
21982
- break;
22494
+ if (this.parent.allowParentDependency) {
22495
+ var currentFlatData = data;
22496
+ if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
22497
+ this.isValidData = false;
22498
+ }
22499
+ else {
22500
+ do {
22501
+ if (currentFlatData.parentItem) {
22502
+ currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
22503
+ if (currentFlatData.uniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
22504
+ this.isValidData = false;
22505
+ break;
22506
+ }
21983
22507
  }
21984
- }
21985
- } while (currentFlatData.parentItem);
21986
- }
21987
- if (data.hasChildRecords && this.isValidData) {
21988
- this.isValidData = this.isParentValid(data.childRecords);
22508
+ } while (currentFlatData.parentItem);
22509
+ }
22510
+ if (data.hasChildRecords && this.isValidData) {
22511
+ this.isValidData = this.isParentValid(data.childRecords);
22512
+ }
22513
+ if (!this.isValidData) {
22514
+ this.isValidData = true;
22515
+ continue;
22516
+ }
21989
22517
  }
21990
- if (!this.isValidData) {
21991
- this.isValidData = true;
21992
- continue;
22518
+ else {
22519
+ if (data.hasChildRecords) {
22520
+ continue;
22521
+ }
21993
22522
  }
21994
22523
  var taskId = this.parent.viewType === 'ResourceView' ? data.ganttProperties.taskId.toString()
21995
22524
  : data.ganttProperties.rowUniqueID.toString();
@@ -22226,6 +22755,10 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22226
22755
  }
22227
22756
  else {
22228
22757
  tasksData[fieldName] = controlObj.value;
22758
+ if (this.parent.enableHtmlSanitizer && typeof (controlObj.value) === 'string') {
22759
+ controlObj.value = SanitizeHtmlHelper.sanitize(controlObj.value);
22760
+ tasksData[fieldName] = controlObj.value;
22761
+ }
22229
22762
  }
22230
22763
  }
22231
22764
  }
@@ -22509,9 +23042,10 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22509
23042
  var from = 'from';
22510
23043
  var to = 'to';
22511
23044
  this.parent.connectorLineModule.removeConnectorLineById('parent' + predecessor[from] + 'child' + predecessor[to]);
22512
- parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[from]);
22513
- childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[to]);
22514
- if (parentGanttRecord || childGanttRecord) {
23045
+ parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor["" + from]);
23046
+ childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor["" + to]);
23047
+ if ((!this.parent.allowParentDependency && (parentGanttRecord && parentGanttRecord.expanded === true) ||
23048
+ (childGanttRecord && childGanttRecord.expanded === true)) || (this.parent.allowParentDependency && (parentGanttRecord || childGanttRecord))) {
22515
23049
  connectorObj =
22516
23050
  this.parent.predecessorModule.updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
22517
23051
  if (!isNullOrUndefined(connectorObj)) {
@@ -22562,8 +23096,8 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22562
23096
  if (!isNullOrUndefined(values[0])) {
22563
23097
  var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
22564
23098
  if (ids.indexOf(values[0]) === -1) {
22565
- if (values[0].indexOf(" ") != -1) {
22566
- match = values[0].split(" ");
23099
+ if (values[0].indexOf(' ') !== -1) {
23100
+ match = values[0].split(' ');
22567
23101
  if (match.length === 1) {
22568
23102
  match = values[0].match(/(\d+|[A-z]+)/g);
22569
23103
  }
@@ -22642,7 +23176,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22642
23176
  var parentRec = rec;
22643
23177
  if (rec.parentItem) {
22644
23178
  parentRec = this.parent.flatData.filter(function (item) {
22645
- return item.uniqueID == rec.parentUniqueID;
23179
+ return item.uniqueID === rec.parentUniqueID;
22646
23180
  })[0];
22647
23181
  if (parentRec.parentItem) {
22648
23182
  parentRec = this.getRootParent(parentRec);
@@ -22723,11 +23257,20 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22723
23257
  if (!isNullOrUndefined(predecessorString) && predecessorString.length > 0) {
22724
23258
  predecessorIdArray = this.idFromPredecessor(predecessorString);
22725
23259
  var _loop_2 = function (count) {
22726
- if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this_2.parent.taskFields.id]) {
22727
- var num = this_2.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
22728
- var fromRecord = this_2.parent.currentViewData[num];
22729
- if (fromRecord && ganttRecord) {
22730
- flag = this_2.validateParentPredecessor(fromRecord, ganttRecord);
23260
+ //Check edited item has parent item in predecessor collection
23261
+ if (!this_2.parent.allowParentDependency) {
23262
+ var checkParent = this_2.checkParentRelation(ganttRecord, predecessorIdArray);
23263
+ if (!checkParent) {
23264
+ return { value: false };
23265
+ }
23266
+ }
23267
+ else {
23268
+ if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this_2.parent.taskFields.id]) {
23269
+ var num = this_2.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
23270
+ var fromRecord = this_2.parent.currentViewData[num];
23271
+ if (fromRecord && ganttRecord) {
23272
+ flag = this_2.validateParentPredecessor(fromRecord, ganttRecord);
23273
+ }
22731
23274
  }
22732
23275
  }
22733
23276
  // Check if predecessor exist more then one
@@ -22977,7 +23520,9 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22977
23520
  this.parent.editModule.updateEditedTask(args.editEventArgs);
22978
23521
  }
22979
23522
  else if (args.validateMode.preserveLinkWithEditing) {
22980
- this.calculateOffset(ganttRecord);
23523
+ if (this.parent.UpdateOffsetOnTaskbarEdit) {
23524
+ this.calculateOffset(ganttRecord);
23525
+ }
22981
23526
  this.parent.editModule.updateEditedTask(args.editEventArgs);
22982
23527
  }
22983
23528
  };
@@ -23008,7 +23553,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23008
23553
  var prevPredecessor = extend([], record.ganttProperties.predecessor, [], true);
23009
23554
  var validPredecessor = this.parent.predecessorModule.getValidPredecessor(record);
23010
23555
  for (var i = 0; i < validPredecessor.length; i++) {
23011
- var predecessor = validPredecessor[i];
23556
+ var predecessor = validPredecessor[parseInt(i.toString(), 10)];
23012
23557
  var parentTask = this.parent.connectorLineModule.getRecordByID(predecessor.from);
23013
23558
  var offset = void 0;
23014
23559
  if (isScheduledTask(parentTask.ganttProperties) && isScheduledTask(record.ganttProperties)) {
@@ -23088,7 +23633,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23088
23633
  var parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
23089
23634
  var index = getIndex(predecessor[i], 'from', prevPredecessor, 'to');
23090
23635
  prevPredecessor.splice(index, 1);
23091
- var parentIndex = getIndex(predecessor[i], 'from', parentPredecessor, 'to');
23636
+ var parentIndex = getIndex(predecessor[parseInt(i.toString(), 10)], 'from', parentPredecessor, 'to');
23092
23637
  parentPredecessor.splice(parentIndex, 1);
23093
23638
  this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
23094
23639
  }
@@ -23199,41 +23744,41 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23199
23744
  var violationType = null;
23200
23745
  if (predecessor[i].type === 'FS') {
23201
23746
  if (ganttTaskData.startDate < startDate) {
23202
- this.validationPredecessor.push(predecessor[i]);
23747
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23203
23748
  violationType = 'taskBeforePredecessor_FS';
23204
23749
  }
23205
23750
  else if (ganttTaskData.startDate > startDate) {
23206
- this.validationPredecessor.push(predecessor[i]);
23751
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23207
23752
  violationType = 'taskAfterPredecessor_FS';
23208
23753
  }
23209
23754
  }
23210
23755
  else if (predecessor[i].type === 'SS') {
23211
23756
  if (ganttTaskData.startDate < startDate) {
23212
- this.validationPredecessor.push(predecessor[i]);
23757
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23213
23758
  violationType = 'taskBeforePredecessor_SS';
23214
23759
  }
23215
23760
  else if (ganttTaskData.startDate > startDate) {
23216
- this.validationPredecessor.push(predecessor[i]);
23761
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23217
23762
  violationType = 'taskAfterPredecessor_SS';
23218
23763
  }
23219
23764
  }
23220
23765
  else if (predecessor[i].type === 'FF') {
23221
23766
  if (endDate <= parentGanttRecord.ganttProperties.endDate) {
23222
- this.validationPredecessor.push(predecessor[i]);
23767
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23223
23768
  violationType = 'taskBeforePredecessor_FF';
23224
23769
  }
23225
23770
  else if (endDate > parentGanttRecord.ganttProperties.endDate) {
23226
- this.validationPredecessor.push(predecessor[i]);
23771
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23227
23772
  violationType = 'taskAfterPredecessor_FF';
23228
23773
  }
23229
23774
  }
23230
23775
  else if (predecessor[i].type === 'SF') {
23231
23776
  if (endDate < parentGanttRecord.ganttProperties.startDate) {
23232
- this.validationPredecessor.push(predecessor[i]);
23777
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23233
23778
  violationType = 'taskBeforePredecessor_SF';
23234
23779
  }
23235
23780
  else if (endDate >= parentGanttRecord.ganttProperties.startDate) {
23236
- this.validationPredecessor.push(predecessor[i]);
23781
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23237
23782
  violationType = 'taskAfterPredecessor_SF';
23238
23783
  }
23239
23784
  }
@@ -23264,13 +23809,13 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23264
23809
  var prevPredecessor = prevData.ganttProperties.predecessor;
23265
23810
  if (!isNullOrUndefined(prevPredecessor)) {
23266
23811
  for (var p = 0; p < prevPredecessor.length; p++) {
23267
- var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(prevPredecessor[p].from);
23812
+ var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(prevPredecessor[parseInt(p.toString(), 10)].from);
23268
23813
  if (parentGanttRecord === data) {
23269
- data.ganttProperties.predecessor.push(prevPredecessor[p]);
23814
+ data.ganttProperties.predecessor.push(prevPredecessor[parseInt(p.toString(), 10)]);
23270
23815
  }
23271
23816
  else {
23272
23817
  var parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
23273
- var parentIndex = getIndex(prevPredecessor[p], 'from', parentPredecessor, 'to');
23818
+ var parentIndex = getIndex(prevPredecessor[parseInt(p.toString(), 10)], 'from', parentPredecessor, 'to');
23274
23819
  if (parentIndex !== -1) {
23275
23820
  parentPredecessor.splice(parentIndex, 1);
23276
23821
  this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
@@ -23280,9 +23825,9 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23280
23825
  }
23281
23826
  if (!isNullOrUndefined(newPredecessor)) {
23282
23827
  for (var n = 0; n < newPredecessor.length; n++) {
23283
- var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(newPredecessor[n].from);
23828
+ var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(newPredecessor[parseInt(n.toString(), 10)].from);
23284
23829
  var parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
23285
- parentPredecessor.push(newPredecessor[n]);
23830
+ parentPredecessor.push(newPredecessor[parseInt(n.toString(), 10)]);
23286
23831
  this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
23287
23832
  }
23288
23833
  }
@@ -23745,7 +24290,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23745
24290
  for (var _i = 0, _b = Object.keys(data); _i < _b.length; _i++) {
23746
24291
  var key = _b[_i];
23747
24292
  if ([tasks.startDate, tasks.endDate, tasks.duration].indexOf(key) !== -1) {
23748
- if (isNullOrUndefined(data[key]) && !ganttObj.allowUnscheduledTasks) {
24293
+ if (isNullOrUndefined(data["" + key]) && !ganttObj.allowUnscheduledTasks) {
23749
24294
  continue;
23750
24295
  }
23751
24296
  if (isFromDialog) {
@@ -23800,7 +24345,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23800
24345
  else if (key === tasks.name) {
23801
24346
  ganttPropKey = 'taskName';
23802
24347
  }
23803
- else if (key === tasks.segments) {
24348
+ else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
23804
24349
  ganttPropKey = 'segments';
23805
24350
  /* eslint-disable-next-line */
23806
24351
  if (data && !isNullOrUndefined(data[this.parent.taskFields.segments]) && data[this.parent.taskFields.segments].length > 0) {
@@ -24168,8 +24713,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24168
24713
  */
24169
24714
  Edit$$1.prototype.updateEditedTask = function (args) {
24170
24715
  var ganttRecord = args.data;
24171
- this.updateParentChildRecord(ganttRecord);
24172
- if (this.parent.isConnectorLineUpdate) {
24716
+ if (this.parent.autoCalculateDateScheduling) {
24717
+ this.updateParentChildRecord(ganttRecord);
24718
+ }
24719
+ if (this.parent.isConnectorLineUpdate && this.parent.autoCalculateDateScheduling) {
24173
24720
  /* validating predecessor for updated child items */
24174
24721
  for (var i = 0; i < this.validatedChildItems.length; i++) {
24175
24722
  var child = this.validatedChildItems[i];
@@ -24188,7 +24735,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24188
24735
  this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
24189
24736
  this.parent.predecessorModule.isValidatedParentTaskID = '';
24190
24737
  }
24191
- if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
24738
+ if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
24192
24739
  (args.action === "DrawConnectorLine")) {
24193
24740
  this.updateChildItems(ganttRecord);
24194
24741
  }
@@ -24196,7 +24743,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24196
24743
  }
24197
24744
  /** Update parent up-to zeroth level */
24198
24745
  if (ganttRecord.parentItem) {
24199
- this.parent.dataOperation.updateParentItems(ganttRecord, true);
24746
+ if (this.parent.autoCalculateDateScheduling) {
24747
+ this.parent.dataOperation.updateParentItems(ganttRecord, true);
24748
+ }
24200
24749
  var parentData = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
24201
24750
  if (!parentData.ganttProperties.predecessorsName) {
24202
24751
  this.parent.predecessorModule.validatePredecessor(parentData, [], '');
@@ -24442,7 +24991,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24442
24991
  durationDiff = this.parent.dateValidationModule.getDuration(validStartDate, validEndDate, 'minute', true, false);
24443
24992
  }
24444
24993
  for (var i = 0; i < childRecords.length; i++) {
24445
- if ((!(this.parent.isUnscheduledTask(childRecords[i].ganttProperties))) && (childRecords[i].ganttProperties.isAutoSchedule)) {
24994
+ if (childRecords[i].ganttProperties.isAutoSchedule) {
24446
24995
  if (durationDiff > 0) {
24447
24996
  var startDate = isScheduledTask(childRecords[i].ganttProperties) ?
24448
24997
  childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.startDate ?
@@ -24560,52 +25109,52 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24560
25109
  }
24561
25110
  for (var i = 0; i < eLength; i++) {
24562
25111
  if (e.changedRecords) {
24563
- rec = e.changedRecords[i];
25112
+ rec = e.changedRecords[parseInt(i.toString(), 10)];
24564
25113
  }
24565
25114
  else {
24566
- rec = e[i];
25115
+ rec = e[parseInt(i.toString(), 10)];
24567
25116
  }
24568
25117
  var _aLength = Object.keys(rec).length;
24569
25118
  for (var j = 0, _a = Object.keys(rec); j < _aLength; j++) {
24570
- var key = _a[j];
24571
- this.parent.editedRecords[i][key] = rec[key];
24572
- this.parent.editedRecords[i].taskData[key] = rec[key];
25119
+ var key = _a[parseInt(j.toString(), 10)];
25120
+ this.parent.editedRecords[parseInt(i.toString(), 10)]["" + key] = rec["" + key];
25121
+ this.parent.editedRecords[parseInt(i.toString(), 10)].taskData["" + key] = rec["" + key];
24573
25122
  }
24574
25123
  if (this.parent.taskFields.id !== null) {
24575
- this.parent.editedRecords[i].ganttProperties["taskId"] = rec[this.parent.taskFields.id];
25124
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['taskId'] = rec[this.parent.taskFields.id];
24576
25125
  }
24577
25126
  if (this.parent.taskFields.name !== null) {
24578
- this.parent.editedRecords[i].ganttProperties["taskName"] = rec[this.parent.taskFields.name];
25127
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['taskName'] = rec[this.parent.taskFields.name];
24579
25128
  }
24580
25129
  if (this.parent.taskFields.startDate !== null) {
24581
- this.parent.editedRecords[i].ganttProperties["startDate"] = rec[this.parent.taskFields.startDate];
25130
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['startDate'] = rec[this.parent.taskFields.startDate];
24582
25131
  }
24583
25132
  if (this.parent.taskFields.endDate !== null) {
24584
- this.parent.editedRecords[i].ganttProperties["endDate"] = rec[this.parent.taskFields.endDate];
25133
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['endDate'] = rec[this.parent.taskFields.endDate];
24585
25134
  }
24586
25135
  if (this.parent.taskFields.duration !== null) {
24587
- this.parent.editedRecords[i].ganttProperties["duration"] = parseInt(rec[this.parent.taskFields.duration]);
25136
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['duration'] = parseInt(rec[this.parent.taskFields.duration]);
24588
25137
  }
24589
25138
  if (this.parent.taskFields.durationUnit !== null) {
24590
- this.parent.editedRecords[i].ganttProperties["durationUnit"] = rec[this.parent.taskFields.durationUnit];
25139
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['durationUnit'] = rec[this.parent.taskFields.durationUnit];
24591
25140
  }
24592
25141
  if (this.parent.taskFields.progress !== null) {
24593
- this.parent.editedRecords[i].ganttProperties["progress"] = rec[this.parent.taskFields.progress];
25142
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['progress'] = rec[this.parent.taskFields.progress];
24594
25143
  }
24595
25144
  if (this.parent.taskFields.dependency !== null) {
24596
- this.parent.editedRecords[i].ganttProperties["dependency"] = rec[this.parent.taskFields.dependency];
25145
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['dependency'] = rec[this.parent.taskFields.dependency];
24597
25146
  }
24598
25147
  if (this.parent.taskFields.parentID !== null) {
24599
- this.parent.editedRecords[i].ganttProperties["parentID"] = rec[this.parent.taskFields.parentID];
25148
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['parentID'] = rec[this.parent.taskFields.parentID];
24600
25149
  }
24601
25150
  if (this.parent.taskFields.baselineEndDate !== null) {
24602
- this.parent.editedRecords[i].ganttProperties["baselineEndDate"] = rec[this.parent.taskFields.baselineEndDate];
25151
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['baselineEndDate'] = rec[this.parent.taskFields.baselineEndDate];
24603
25152
  }
24604
25153
  if (this.parent.taskFields.baselineStartDate !== null) {
24605
- this.parent.editedRecords[i].ganttProperties["baselineStartDate"] = rec[this.parent.taskFields.baselineStartDate];
25154
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['baselineStartDate'] = rec[this.parent.taskFields.baselineStartDate];
24606
25155
  }
24607
25156
  if (this.parent.taskFields.resourceInfo !== null) {
24608
- this.parent.editedRecords[i].ganttProperties["resources"] = rec[this.parent.taskFields.resourceInfo];
25157
+ this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['resources'] = rec[this.parent.taskFields.resourceInfo];
24609
25158
  }
24610
25159
  }
24611
25160
  this.saveSuccess(args);
@@ -24674,6 +25223,14 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24674
25223
  }
24675
25224
  if (!this.isTreeGridRefresh) {
24676
25225
  this.parent.chartRowsModule.refreshRecords(this.parent.editedRecords);
25226
+ if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && this.parent.showOverAllocation) {
25227
+ this.parent.contentHeight = this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
25228
+ this.parent.ganttChartModule.chartBodyContent.style.height = this.parent.contentHeight + 'px';
25229
+ this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
25230
+ if (this.parent.taskFields.dependency) {
25231
+ this.parent.ganttChartModule.reRenderConnectorLines();
25232
+ }
25233
+ }
24677
25234
  if (this.parent.isConnectorLineUpdate && !isNullOrUndefined(this.parent.connectorLineEditModule)) {
24678
25235
  this.parent.updatedConnectorLineCollection = [];
24679
25236
  this.parent.connectorLineIds = [];
@@ -25589,15 +26146,24 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25589
26146
  if (parentTask && parentTask.ganttProperties.taskName !==
25590
26147
  this_2.parent.localeObj.getConstant('unassignedTask') && isDuplicate.length === 0) {
25591
26148
  this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
25592
- if (parentTask) {
25593
- this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
25594
- }
25595
26149
  }
25596
26150
  else if (!parentTask && (!isDuplicate || isDuplicate.length === 0)) {
25597
26151
  this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
25598
- if (updateUnAssignedResources_1[i].parentItem && unassignedTask) {
25599
- this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
26152
+ }
26153
+ unassignedTask = this_2.parent.flatData.filter(function (data) {
26154
+ return data.ganttProperties.taskName === _this.parent.localeObj.getConstant('unassignedTask');
26155
+ })[0];
26156
+ var parentItem = this_2.parent.currentViewData.filter(function (data) {
26157
+ if (data.ganttProperties.taskId == updateUnAssignedResources_1[i].ganttProperties.taskId && (!data.hasChildRecords && data.parentItem)
26158
+ && unassignedTask.uniqueID === data.parentItem.uniqueID) {
26159
+ return data;
25600
26160
  }
26161
+ else {
26162
+ return null;
26163
+ }
26164
+ });
26165
+ if (parentItem[0]) {
26166
+ this_2.parent.dataOperation.updateParentItems(parentItem[0]);
25601
26167
  }
25602
26168
  };
25603
26169
  var this_2 = this;
@@ -26207,7 +26773,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
26207
26773
  if (!isNullOrUndefined(ganttData)) {
26208
26774
  _this.validateUpdateValues(args.newTaskData, ganttData, true);
26209
26775
  }
26210
- if (!isNullOrUndefined(args.data[tempTaskID])) {
26776
+ if (!isNullOrUndefined(args.data["" + tempTaskID])) {
26211
26777
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
26212
26778
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
26213
26779
  args.newTaskData[tempTaskID] = args.data[tempTaskID];
@@ -27493,9 +28059,95 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
27493
28059
  }
27494
28060
  }
27495
28061
  };
28062
+ Filter$$1.prototype.setPosition = function (li, ul) {
28063
+ var gridPos = this.parent.element.getBoundingClientRect();
28064
+ var gridPosTop = gridPos.top;
28065
+ var gridPosLeft = gridPos.left;
28066
+ var parentNode;
28067
+ var parentNodeTop;
28068
+ var parentNodeLeft;
28069
+ var paddingTop;
28070
+ var paddingLeft;
28071
+ var marginTop;
28072
+ var marginLeft;
28073
+ if (!isNullOrUndefined(this.parent.element.parentNode) && this.parent.element.parentNode['tagName'] != 'BODY') {
28074
+ parentNode = this.parent.element.parentNode;
28075
+ parentNodeTop = parentNode.getBoundingClientRect().top;
28076
+ marginTop = parentNode.style.marginTop;
28077
+ while (true) {
28078
+ if (Math.abs(gridPosTop) > Math.abs(parentNodeTop)) {
28079
+ paddingTop = gridPosTop - parentNodeTop;
28080
+ break;
28081
+ }
28082
+ if (!isNullOrUndefined(this.parent.element.parentNode)) {
28083
+ parentNode = parentNode.parentNode;
28084
+ marginTop = parentNode.parentNode.style.marginTop;
28085
+ }
28086
+ parentNodeTop = parentNode.getBoundingClientRect().top;
28087
+ }
28088
+ parentNodeLeft = parentNode.getBoundingClientRect().left;
28089
+ marginLeft = parentNode.style.marginLeft;
28090
+ while (true) {
28091
+ if (Math.abs(gridPosLeft) > Math.abs(parentNodeLeft)) {
28092
+ paddingLeft = gridPosLeft - parentNodeLeft;
28093
+ break;
28094
+ }
28095
+ if (!isNullOrUndefined(this.parent.element.parentNode)) {
28096
+ parentNode = parentNode.parentNode;
28097
+ marginLeft = parentNode.style.marginLeft;
28098
+ }
28099
+ parentNodeLeft = parentNode.getBoundingClientRect().left;
28100
+ }
28101
+ }
28102
+ var liPos = li.getBoundingClientRect();
28103
+ var left = liPos.right + window.scrollX;
28104
+ var top = liPos.top + window.scrollY;
28105
+ if (gridPos.right < (left + ul.offsetWidth)) {
28106
+ if ((liPos.left - ul.offsetWidth) > gridPos.left) {
28107
+ left = (liPos.left - ul.offsetWidth);
28108
+ }
28109
+ else {
28110
+ left -= (left + ul.offsetWidth) - gridPos.right;
28111
+ }
28112
+ }
28113
+ else {
28114
+ if (!isNullOrUndefined(paddingTop) && !isNullOrUndefined(paddingLeft)) {
28115
+ left = Math.abs(liPos.right - gridPos.left);
28116
+ top = Math.abs(liPos.top - gridPos.top);
28117
+ }
28118
+ }
28119
+ if (!isNullOrUndefined(paddingTop) && !isNullOrUndefined(paddingLeft)) {
28120
+ ul.style.top = typeof (parseInt(marginTop)) === "string" ? (top + paddingTop + parseInt(marginTop)) + 'px' : (top + paddingTop) + 'px';
28121
+ ul.style.left = typeof (parseInt(marginLeft)) === "string" ? (left + paddingLeft + parseInt(marginLeft) + 8) + 'px' : (left + paddingLeft) + 'px';
28122
+ }
28123
+ else {
28124
+ ul.style.top = top + 'px';
28125
+ ul.style.left = left + 'px';
28126
+ }
28127
+ };
27496
28128
  Filter$$1.prototype.updateFilterMenuPosition = function (element, args) {
27497
28129
  addClass([element], 'e-gantt');
27498
- document.querySelector('#' + this.parent.treeGrid.grid.element.id).appendChild(element);
28130
+ document.querySelector('#' + this.parent.controlId).appendChild(element);
28131
+ var targetElement;
28132
+ if (this.parent.showColumnMenu) {
28133
+ targetElement = document.querySelector('#treeGrid' + this.parent.controlId + '_gridcontrol_colmenu_Filter');
28134
+ element.style.zIndex = targetElement.parentElement.style.zIndex;
28135
+ if (this.parent.treeGrid.filterSettings.type === 'Menu') {
28136
+ this.setPosition(targetElement, getValue('filterModel.dlgObj.element', args));
28137
+ }
28138
+ else {
28139
+ this.setPosition(targetElement, getValue('filterModel.dialogObj.element', args));
28140
+ }
28141
+ }
28142
+ else {
28143
+ targetElement = this.parent.treeGrid.grid.getColumnHeaderByField(args.columnName).querySelector('.e-filtermenudiv');
28144
+ if (this.parent.treeGrid.filterSettings.type === 'Menu') {
28145
+ getFilterMenuPostion(targetElement, getValue('filterModel.dlgObj', args));
28146
+ }
28147
+ else {
28148
+ getFilterMenuPostion(targetElement, getValue('filterModel.dialogObj', args));
28149
+ }
28150
+ }
27499
28151
  if (this.parent.treeGrid.filterSettings.type === 'Menu') {
27500
28152
  element.querySelector('.e-valid-input').focus();
27501
28153
  }
@@ -27913,7 +28565,10 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
27913
28565
  var rIndex = parseInt(selectedRow.getAttribute('aria-rowindex'), 10);
27914
28566
  var isToggle = this.parent.selectionSettings.enableToggle;
27915
28567
  if (this.parent.selectionSettings.type === 'Single' || (!this.isMultiCtrlRequest && !this.isMultiShiftRequest)) {
27916
- this.selectRow(rIndex, isToggle);
28568
+ if (!this.parent.allowTaskbarDragAndDrop || (this.parent.allowTaskbarDragAndDrop && (this.parent.rowDragAndDropModule &&
28569
+ !this.parent.rowDragAndDropModule['draggedRecord']))) {
28570
+ this.selectRow(rIndex, isToggle);
28571
+ }
27917
28572
  }
27918
28573
  else {
27919
28574
  if (this.isMultiShiftRequest) {
@@ -27957,7 +28612,7 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
27957
28612
  };
27958
28613
  Selection$$1.prototype.addRemoveClass = function (records) {
27959
28614
  if (typeof (records) == "number") {
27960
- records = Array.from(String(records), function (num) { return Number(num); });
28615
+ records = [records];
27961
28616
  }
27962
28617
  var ganttRow = [].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector('tbody').children);
27963
28618
  var _loop_1 = function (i) {
@@ -28743,6 +29398,9 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
28743
29398
  });
28744
29399
  var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
28745
29400
  spanElement[property] = this.parent.holidays[i].label ? this.parent.holidays[i].label : '';
29401
+ if (this.parent.enableHtmlSanitizer && typeof (spanElement[property]) === 'string') {
29402
+ spanElement[property] = SanitizeHtmlHelper.sanitize(spanElement[property]);
29403
+ }
28746
29404
  holidayDiv.appendChild(spanElement);
28747
29405
  if (this.parent.holidays[i].cssClass) {
28748
29406
  holidayDiv.classList.add(this.parent.holidays[i].cssClass);
@@ -28929,6 +29587,9 @@ var EventMarker$1 = /** @__PURE__ @class */ (function () {
28929
29587
  });
28930
29588
  var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
28931
29589
  spanElement[property] = this.parent.eventMarkers[i].label;
29590
+ if (this.parent.enableHtmlSanitizer && typeof (spanElement[property]) === 'string') {
29591
+ spanElement[property] = SanitizeHtmlHelper.sanitize(spanElement[property]);
29592
+ }
28932
29593
  if (this.parent.enableRtl) {
28933
29594
  spanElement.style.right = '5px';
28934
29595
  }
@@ -30176,7 +30837,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30176
30837
  this.parent.selectionModule.selectRow(rowIndex);
30177
30838
  }
30178
30839
  if (!args.parentItem) {
30179
- this.rowData = this.parent.updatedRecords[rowIndex];
30840
+ this.rowData = this.parent.updatedRecords[parseInt(rowIndex.toString(), 10)];
30180
30841
  }
30181
30842
  for (var _i = 0, _a = args.items; _i < _a.length; _i++) {
30182
30843
  var item = _a[_i];
@@ -30308,7 +30969,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30308
30969
  this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
30309
30970
  var prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
30310
30971
  if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
30311
- this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[index].level - prevRecord.level === 1) {
30972
+ this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[parseInt(index.toString(), 10)].level - prevRecord.level === 1) {
30312
30973
  this.updateItemVisibility(item.text);
30313
30974
  }
30314
30975
  }
@@ -30324,7 +30985,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30324
30985
  var isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
30325
30986
  this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
30326
30987
  if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
30327
- this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
30988
+ this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[parseInt(ind.toString(), 10)].level === 0) {
30328
30989
  this.updateItemVisibility(item.text);
30329
30990
  }
30330
30991
  }
@@ -30334,7 +30995,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30334
30995
  {
30335
30996
  var taskSettings = this.parent.taskFields;
30336
30997
  if (this.parent.readOnly || !taskbarElement || isNullOrUndefined(taskSettings.segments) ||
30337
- this.parent.currentViewData[rowIndex].hasChildRecords) {
30998
+ this.parent.currentViewData[parseInt(rowIndex.toString(), 10)].hasChildRecords) {
30338
30999
  this.updateItemVisibility(item.text);
30339
31000
  }
30340
31001
  break;
@@ -30539,7 +31200,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30539
31200
  };
30540
31201
  ContextMenu$$1.prototype.contextMenuOnClose = function (args) {
30541
31202
  var parent = 'parentObj';
30542
- if (args.items.length > 0 && args.items[0][parent] instanceof ContextMenu$1) {
31203
+ if (args.items.length > 0 && args.items[0]["" + parent] instanceof ContextMenu$1) {
30543
31204
  this.revertItemStatus();
30544
31205
  }
30545
31206
  };
@@ -31032,7 +31693,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
31032
31693
  parentUniqueID = this.droppedRecord.uniqueID;
31033
31694
  }
31034
31695
  else {
31035
- parentUniqueID = this.droppedRecord.parentItem.uniqueID;
31696
+ parentUniqueID = this.droppedRecord.parentItem ? this.droppedRecord.parentItem.uniqueID : this.droppedRecord.uniqueID;
31036
31697
  }
31037
31698
  var droppedParentItem = this.parent.getTaskByUniqueID(parentUniqueID);
31038
31699
  var editedObj = {};
@@ -31059,7 +31720,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
31059
31720
  this.updateSharedResourceTask();
31060
31721
  }
31061
31722
  }
31062
- if (this.parent.taskFields.dependency) {
31723
+ if (this.parent.taskFields.dependency && this.parent.allowParentDependency) {
31063
31724
  var isValidPredecessor = true;
31064
31725
  var draggedParent = void 0;
31065
31726
  var toParent_1;
@@ -35824,8 +36485,9 @@ var PdfExport = /** @__PURE__ @class */ (function () {
35824
36485
  * @param {object} pdfDoc .
35825
36486
  * @returns {Promise<Object>} .
35826
36487
  */
35827
- PdfExport.prototype.export = function (pdfExportProperties, isMultipleExport, pdfDoc) {
36488
+ PdfExport.prototype.export = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
35828
36489
  var _this = this;
36490
+ this.isBlob = isBlob;
35829
36491
  var args = {
35830
36492
  requestType: 'beforePdfExport',
35831
36493
  ganttObject: this.parent,
@@ -35869,7 +36531,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
35869
36531
  this.pdfDocument = new PdfDocument();
35870
36532
  }
35871
36533
  this.processExport(data, pdfExportProperties, isMultipleExport).then(function () {
35872
- _this.parent.trigger('pdfExportComplete', {});
36534
+ _this.parent.trigger('pdfExportComplete', _this.isBlob ? { promise: _this.blobPromise } : {});
35873
36535
  if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
35874
36536
  _this.parent.hideMaskRow();
35875
36537
  }
@@ -35895,12 +36557,17 @@ var PdfExport = /** @__PURE__ @class */ (function () {
35895
36557
  var layouter = _this.gantt.drawGrid(pdfPage, 0, 0, format);
35896
36558
  _this.gantt.drawChart(layouter);
35897
36559
  if (!isMultipleExport) {
35898
- // save the PDF
35899
- if (!isNullOrUndefined(pdfExportProperties) && pdfExportProperties.fileName) {
35900
- _this.pdfDocument.save(pdfExportProperties.fileName);
36560
+ if (!_this.isBlob) {
36561
+ // save the PDF
36562
+ if (!isNullOrUndefined(pdfExportProperties) && pdfExportProperties.fileName) {
36563
+ _this.pdfDocument.save(pdfExportProperties.fileName);
36564
+ }
36565
+ else {
36566
+ _this.pdfDocument.save('Export.pdf');
36567
+ }
35901
36568
  }
35902
36569
  else {
35903
- _this.pdfDocument.save('Export.pdf');
36570
+ _this.blobPromise = _this.pdfDocument.save();
35904
36571
  }
35905
36572
  _this.pdfDocument.destroy();
35906
36573
  }