@syncfusion/ej2-gantt 20.4.53 → 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 (95) hide show
  1. package/CHANGELOG.md +27 -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 +1104 -450
  7. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  8. package/dist/es6/ej2-gantt.es5.js +1084 -430
  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/critical-path.js +10 -8
  20. package/src/gantt/actions/dependency.js +28 -12
  21. package/src/gantt/actions/dialog-edit.js +41 -21
  22. package/src/gantt/actions/edit.js +56 -55
  23. package/src/gantt/actions/filter.d.ts +2 -1
  24. package/src/gantt/actions/filter.js +88 -2
  25. package/src/gantt/actions/keyboard.js +0 -1
  26. package/src/gantt/actions/pdf-export.d.ts +3 -1
  27. package/src/gantt/actions/pdf-export.js +12 -6
  28. package/src/gantt/actions/rowdragdrop.js +2 -2
  29. package/src/gantt/actions/selection.js +5 -2
  30. package/src/gantt/actions/taskbar-edit.d.ts +5 -0
  31. package/src/gantt/actions/taskbar-edit.js +114 -10
  32. package/src/gantt/base/date-processor.js +78 -52
  33. package/src/gantt/base/gantt-chart.js +20 -4
  34. package/src/gantt/base/gantt-model.d.ts +43 -0
  35. package/src/gantt/base/gantt.d.ts +39 -1
  36. package/src/gantt/base/gantt.js +79 -33
  37. package/src/gantt/base/interface.d.ts +2 -0
  38. package/src/gantt/base/task-processor.js +133 -98
  39. package/src/gantt/base/tree-grid.js +31 -1
  40. package/src/gantt/base/utils.js +1 -1
  41. package/src/gantt/export/export-helper.js +6 -0
  42. package/src/gantt/renderer/chart-rows.d.ts +2 -0
  43. package/src/gantt/renderer/chart-rows.js +156 -24
  44. package/src/gantt/renderer/connector-line.js +50 -20
  45. package/src/gantt/renderer/edit-tooltip.js +0 -3
  46. package/src/gantt/renderer/event-marker.js +4 -1
  47. package/src/gantt/renderer/nonworking-day.js +4 -1
  48. package/src/gantt/renderer/timeline.js +3 -3
  49. package/src/gantt/renderer/tooltip.js +101 -33
  50. package/styles/bootstrap-dark.css +33 -10
  51. package/styles/bootstrap.css +31 -10
  52. package/styles/bootstrap4.css +28 -7
  53. package/styles/bootstrap5-dark.css +30 -9
  54. package/styles/bootstrap5.css +30 -9
  55. package/styles/fabric-dark.css +28 -7
  56. package/styles/fabric.css +28 -7
  57. package/styles/fluent-dark.css +56 -29
  58. package/styles/fluent.css +56 -29
  59. package/styles/gantt/_bootstrap-dark-definition.scss +5 -4
  60. package/styles/gantt/_bootstrap-definition.scss +5 -4
  61. package/styles/gantt/_bootstrap4-definition.scss +3 -2
  62. package/styles/gantt/_bootstrap5-definition.scss +15 -14
  63. package/styles/gantt/_fabric-dark-definition.scss +3 -2
  64. package/styles/gantt/_fabric-definition.scss +3 -2
  65. package/styles/gantt/_fluent-definition.scss +18 -17
  66. package/styles/gantt/_fusionnew-definition.scss +5 -4
  67. package/styles/gantt/_highcontrast-definition.scss +3 -2
  68. package/styles/gantt/_highcontrast-light-definition.scss +3 -2
  69. package/styles/gantt/_layout.scss +45 -13
  70. package/styles/gantt/_material-dark-definition.scss +3 -2
  71. package/styles/gantt/_material-definition.scss +3 -2
  72. package/styles/gantt/_tailwind-definition.scss +9 -8
  73. package/styles/gantt/_theme.scss +25 -6
  74. package/styles/gantt/bootstrap-dark.css +33 -10
  75. package/styles/gantt/bootstrap.css +31 -10
  76. package/styles/gantt/bootstrap4.css +28 -7
  77. package/styles/gantt/bootstrap5-dark.css +30 -9
  78. package/styles/gantt/bootstrap5.css +30 -9
  79. package/styles/gantt/fabric-dark.css +28 -7
  80. package/styles/gantt/fabric.css +28 -7
  81. package/styles/gantt/fluent-dark.css +56 -29
  82. package/styles/gantt/fluent.css +56 -29
  83. package/styles/gantt/highcontrast-light.css +28 -9
  84. package/styles/gantt/highcontrast.css +28 -7
  85. package/styles/gantt/material-dark.css +31 -14
  86. package/styles/gantt/material.css +28 -7
  87. package/styles/gantt/tailwind-dark.css +28 -7
  88. package/styles/gantt/tailwind.css +28 -7
  89. package/styles/highcontrast-light.css +28 -9
  90. package/styles/highcontrast.css +28 -7
  91. package/styles/material-dark.css +31 -14
  92. package/styles/material.css +28 -7
  93. package/styles/tailwind-dark.css +28 -7
  94. package/styles/tailwind.css +28 -7
  95. 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);
@@ -3752,7 +3799,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3752
3799
  }
3753
3800
  if (childGanttRecord.hasChildRecords) {
3754
3801
  setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
3755
- setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration, progressValues);
3802
+ setValue('totalDuration', childGanttRecord.ganttProperties.totalDuration ? childGanttRecord.ganttProperties.totalDuration : 0, progressValues);
3756
3803
  }
3757
3804
  else {
3758
3805
  setValue('totalProgress', childGanttRecord.ganttProperties.progress * durationInDay, progressValues);
@@ -3780,107 +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
- if (typeof (getValue('totalDuration', progressValues)) != 'object') {
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) {
3830
3877
  totalDuration += getValue('totalDuration', progressValues);
3831
3878
  totalDuration = Number(totalDuration.toFixed(4));
3832
3879
  }
3880
+ else {
3881
+ totalDuration += getValue('totalDuration', progressValues);
3882
+ }
3833
3883
  }
3834
3884
  else {
3835
- totalDuration += getValue('totalDuration', progressValues);
3885
+ milestoneCount++;
3836
3886
  }
3887
+ childCompletedWorks += childData.ganttProperties.work;
3837
3888
  }
3838
- else {
3839
- milestoneCount++;
3840
- }
3841
- childCompletedWorks += childData.ganttProperties.work;
3842
- }
3843
- if (!deleteUpdate) {
3844
- if (this.compareDates(previousStartDate, minStartDate) !== 0) {
3845
- this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'startDate' : 'autoStartDate', minStartDate, parentData.ganttProperties, true);
3846
- }
3847
- if (this.compareDates(previousEndDate, maxEndDate) !== 0) {
3848
- this.parent.setRecordValue(ganttProp.isAutoSchedule ? 'endDate' : 'autoEndDate', maxEndDate, parentData.ganttProperties, true);
3849
- }
3850
- var taskCount = void 0;
3851
- if (this.parent.isOnDelete && childData.isDelete) {
3852
- taskCount = childLength - milestoneCount - 1;
3853
- }
3854
- else {
3855
- taskCount = childLength - milestoneCount;
3856
- }
3857
- var parentProgress = (taskCount > 0 && totalDuration > 0) ? (totalProgress / totalDuration) : 0;
3858
- var parentProp = parentData.ganttProperties;
3859
- var milestone = (taskCount === 0) && minStartDate && maxEndDate &&
3860
- minStartDate.getTime() === maxEndDate.getTime() ? true : false;
3861
- this.parent.setRecordValue('isMilestone', milestone, parentProp, true);
3862
- if (parentProp.isAutoSchedule) {
3863
- this.calculateDuration(parentData);
3864
- }
3865
- this.updateWorkWithDuration(parentData);
3866
- var parentWork = parentProp.work;
3867
- parentWork = this.parent.isOnEdit ? parentWork : (parentWork + childCompletedWorks);
3868
- this.parent.setRecordValue('work', parentWork, parentProp, true);
3869
- this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
3870
- if (!isNullOrUndefined(this.parent.taskFields.type)) {
3871
- this.updateMappingData(parentData, 'type');
3872
- }
3873
- this.parent.setRecordValue('progress', Math.floor(parentProgress), parentProp, true);
3874
- this.parent.setRecordValue('totalProgress', totalProgress, parentProp, true);
3875
- this.parent.setRecordValue('totalDuration', totalDuration, parentProp, true);
3876
- if (!parentProp.isAutoSchedule) {
3877
- this.parent.setRecordValue('autoDuration', this.calculateAutoDuration(parentProp), parentProp, true);
3878
- 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);
3879
3937
  }
3880
- this.updateWidthLeft(parentData);
3881
- this.updateTaskData(parentData);
3882
3938
  }
3883
3939
  }
3940
+ else {
3941
+ parentData.ganttProperties.endDate = parentData.taskData[this.parent.taskFields.endDate];
3942
+ }
3884
3943
  if (deleteUpdate && parentData.childRecords.length === 1 && parentData.ganttProperties.duration === 0) {
3885
3944
  this.parent.setRecordValue('isMilestone', true, parentData.ganttProperties, true);
3886
3945
  this.updateWidthLeft(parentData);
@@ -3888,7 +3947,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3888
3947
  }
3889
3948
  var parentItem = this.parent.getParentTask(parentData.parentItem);
3890
3949
  if (parentItem) {
3891
- this.updateParentItems(parentItem);
3950
+ if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
3951
+ this.updateParentItems(parentItem);
3952
+ }
3892
3953
  }
3893
3954
  deleteUpdate = false;
3894
3955
  };
@@ -4143,9 +4204,19 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
4143
4204
  var parent = this.parent;
4144
4205
  setTimeout(function () {
4145
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
+ }
4146
4218
  }, 0);
4147
4219
  };
4148
-
4149
4220
  ChartScroll.prototype.updateShimmer = function () {
4150
4221
  var parent = this.parent;
4151
4222
  setTimeout(function () {
@@ -4185,11 +4256,11 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
4185
4256
  scrollArgs.scrollDirection = 'Horizontal';
4186
4257
  scrollArgs.action = 'HorizontalScroll';
4187
4258
  }
4188
- 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
4189
4260
  || isNullOrUndefined(this.parent.isToolBarClick))) {
4190
4261
  this.parent.isVirtualScroll = true;
4191
4262
  if (this.parent.showIndicator || isNullOrUndefined(this.parent.showIndicator)) {
4192
- 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') {
4193
4264
  this.updateSpinner();
4194
4265
  }
4195
4266
  }
@@ -4233,11 +4304,12 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
4233
4304
  * To set scroll left for chart scroll container
4234
4305
  *
4235
4306
  * @param {number} scrollLeft - To set scroll left for scroll container
4307
+ * @param {number} leftSign - specifies left sign
4236
4308
  * @returns {void} .
4237
4309
  */
4238
4310
  ChartScroll.prototype.setScrollLeft = function (scrollLeft, leftSign) {
4239
4311
  if (leftSign) {
4240
- scrollLeft = leftSign == -1 && this.parent.enableRtl ? -scrollLeft : scrollLeft;
4312
+ scrollLeft = leftSign === -1 && this.parent.enableRtl ? -scrollLeft : scrollLeft;
4241
4313
  }
4242
4314
  this.element.scrollLeft = scrollLeft;
4243
4315
  this.parent.ganttChartModule.chartTimelineContainer.scrollLeft = this.element.scrollLeft;
@@ -4395,9 +4467,11 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4395
4467
  }
4396
4468
  else {
4397
4469
  if (this.parent.viewType === 'ProjectView') {
4398
- 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
+ }
4399
4473
  }
4400
- 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]) {
4401
4475
  this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[0].setAttribute('tabindex', '-1');
4402
4476
  }
4403
4477
  }
@@ -4450,7 +4524,14 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4450
4524
  Math.floor((this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight));
4451
4525
  };
4452
4526
  GanttChart.prototype.renderRange = function (rangeCollection, currentRecord) {
4453
- 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
+ }
4454
4535
  var sameIDElement = this.rangeViewContainer.querySelector('.' + 'rangeContainer' + currentRecord.ganttProperties.rowUniqueID);
4455
4536
  if (sameIDElement) {
4456
4537
  sameIDElement.remove();
@@ -4463,7 +4544,14 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4463
4544
  return;
4464
4545
  }
4465
4546
  for (var i = 0; i < rangeCollection.length; i++) {
4466
- 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
+ }
4467
4555
  var leftDiv = createElement('div', {
4468
4556
  className: rangeChildContainer + ' ' + 'e-leftarc', styles: (this.parent.enableRtl ? 'right:' : 'left:') +
4469
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")
@@ -5780,7 +5868,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
5780
5868
  else {
5781
5869
  var value = property === 'topTier' ? 'bottomTier' : 'topTier';
5782
5870
  var assignValue = 'bottomTier';
5783
- if (newTimeline[assignValue].unit != "None") {
5871
+ if (newTimeline["" + assignValue].unit != "None") {
5784
5872
  _this.customTimelineSettings[value] = __assign({}, newTimeline[assignValue]);
5785
5873
  }
5786
5874
  }
@@ -6083,7 +6171,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
6083
6171
  else {
6084
6172
  secondValue = sortedUnitLevels[i + 1];
6085
6173
  }
6086
- if (count >= firstValue[tier].count) {
6174
+ if (count >= firstValue["" + tier].count) {
6087
6175
  currentZoomCollection = sortedUnitLevels[i];
6088
6176
  checkSameCountLevels = sortedUnitLevels.filter(function (tempLevel) {
6089
6177
  if (tier === "bottomTier") {
@@ -6101,7 +6189,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
6101
6189
  }
6102
6190
  break;
6103
6191
  }
6104
- else if (count < firstValue[tier].count && count > secondValue[tier].count) {
6192
+ else if (count < firstValue["" + tier].count && count > secondValue["" + tier].count) {
6105
6193
  currentZoomCollection = sortedUnitLevels[i + 1];
6106
6194
  checkSameCountLevels = sortedUnitLevels.filter(function (tempLevel) {
6107
6195
  if (tier === "bottomTier") {
@@ -7184,6 +7272,15 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7184
7272
  this.columnMenuOpen = function (args) {
7185
7273
  _this.parent.notify('columnMenuOpen', args);
7186
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
+ });
7187
7284
  };
7188
7285
  this.columnMenuClick = function (args) {
7189
7286
  _this.parent.trigger('columnMenuClick', args);
@@ -7215,6 +7312,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7215
7312
  this.parent.treeGrid = new TreeGrid();
7216
7313
  this.parent.treeGrid.allowSelection = false;
7217
7314
  this.parent.treeGrid.allowKeyboard = this.parent.allowKeyboard;
7315
+ this.parent.treeGrid['${enableHtmlSanitizer}'] = this.parent.enableHtmlSanitizer;
7218
7316
  this.parent.treeGrid.enableImmutableMode = this.parent.enableImmutableMode;
7219
7317
  this.treeGridColumns = [];
7220
7318
  if (!this.parent.isLocaleChanged && this.parent.isLoad) {
@@ -7405,6 +7503,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7405
7503
  if (!this.parent.ganttChartModule.isExpandCollapseFromChart && !this.parent.isExpandCollapseLevelMethod) {
7406
7504
  var collapsedArgs = this.createExpandCollapseArgs(args);
7407
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
+ }
7408
7512
  }
7409
7513
  if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
7410
7514
  this.parent.hideMaskRow();
@@ -7418,6 +7522,12 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7418
7522
  if (!args['data'].length) {
7419
7523
  var expandedArgs = this.createExpandCollapseArgs(args);
7420
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
+ }
7421
7531
  }
7422
7532
  }
7423
7533
  if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
@@ -7510,6 +7620,14 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
7510
7620
  this.parent.addDeleteRecord = false;
7511
7621
  }
7512
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
+ }
7513
7631
  if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
7514
7632
  this.parent.hideMaskRow();
7515
7633
  }
@@ -8992,8 +9110,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
8992
9110
  }
8993
9111
  }
8994
9112
  else {
8995
- labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
9113
+ var field = this.parent.labelSettings.taskLabel;
9114
+ labelString = this.getTaskLabel(field);
8996
9115
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
9116
+ if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
9117
+ labelString = SanitizeHtmlHelper.sanitize(labelString);
9118
+ }
8997
9119
  }
8998
9120
  if (labelString.indexOf('null') === -1) {
8999
9121
  if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
@@ -9005,7 +9127,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9005
9127
  (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9006
9128
  'display:' + 'inline-block;' +
9007
9129
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
9008
- this.taskBarHeight + 'px;">' + labelString + '</span>';
9130
+ this.taskBarHeight + 'px;"></span>';
9009
9131
  }
9010
9132
  else {
9011
9133
  taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
@@ -9013,7 +9135,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9013
9135
  (this.parent.enableRtl ? 'right;' : 'left;')) : '') +
9014
9136
  +(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9015
9137
  +(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
9016
- this.taskBarHeight + 'px;">' + labelString + '</span>';
9138
+ this.taskBarHeight + 'px;"></span>';
9017
9139
  }
9018
9140
  }
9019
9141
  var template = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ?
@@ -9039,6 +9161,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9039
9161
  data.ganttProperties.segments.length === 0))) {
9040
9162
  if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
9041
9163
  var templateElement = this.createDivElement(template)[0];
9164
+ templateElement.innerText = labelString;
9042
9165
  var childLabel = this.parent.labelSettings.taskLabel;
9043
9166
  if (childLabel && childLabel['elementRef'])
9044
9167
  templateElement.appendChild(tempDiv);
@@ -9521,6 +9644,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9521
9644
  if (labelString) {
9522
9645
  labelString = labelString === 'isCustomTemplate' ? field : labelString;
9523
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
+ }
9524
9652
  }
9525
9653
  }
9526
9654
  if (leftLabelTemplateNode && leftLabelTemplateNode.length > 0) {
@@ -9571,6 +9699,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9571
9699
  if (labelString) {
9572
9700
  labelString = labelString === 'isCustomTemplate' ? field : labelString;
9573
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
+ }
9574
9707
  }
9575
9708
  }
9576
9709
  if (rightLabelTemplateNode && rightLabelTemplateNode.length > 0) {
@@ -9622,7 +9755,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9622
9755
  '<div class="' + manualParentMilestoneBottom + '" style="top:' +
9623
9756
  (this.milesStoneRadius) + 'px;border-right-width:' + this.milesStoneRadius + 'px; border-left-width:' +
9624
9757
  this.milesStoneRadius + 'px; border-top-width:' + this.milesStoneRadius + 'px;"></div></div>';
9625
- return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : template);
9758
+ return this.createDivElement(data.ganttProperties.width === 0 ? milestoneTemplate : !data.ganttProperties.isMilestone ? template : null);
9626
9759
  };
9627
9760
  /**
9628
9761
  * To get parent taskbar node.
@@ -9666,6 +9799,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9666
9799
  else {
9667
9800
  labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
9668
9801
  labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
9802
+ if (this.parent.enableHtmlSanitizer && typeof (labelString) === 'string') {
9803
+ labelString = SanitizeHtmlHelper.sanitize(labelString);
9804
+ }
9669
9805
  }
9670
9806
  if (labelString.indexOf('null') === -1) {
9671
9807
  if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' &&
@@ -9678,7 +9814,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9678
9814
  'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9679
9815
  'display:' + 'inline-block;' +
9680
9816
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
9681
- this.taskBarHeight + 'px;">' + labelString + '</span>';
9817
+ this.taskBarHeight + 'px;"></span>';
9682
9818
  }
9683
9819
  else {
9684
9820
  labelDiv = '<span class="' +
@@ -9688,9 +9824,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9688
9824
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9689
9825
  (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
9690
9826
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9691
- this.taskBarHeight + 'px;">' + labelString + '</span>';
9827
+ this.taskBarHeight + 'px;"></span>';
9692
9828
  }
9693
9829
  var labelElement = this.createDivElement(labelDiv)[0];
9830
+ labelElement.innerText = labelString;
9694
9831
  var parentLabel = this.parent.labelSettings.taskLabel;
9695
9832
  if (parentLabel && parentLabel['elementRef'])
9696
9833
  labelElement.appendChild(div);
@@ -9857,7 +9994,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9857
9994
  var mileStoneLeft = -(this.connectorPointWidth + 2);
9858
9995
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
9859
9996
  var marginTop;
9860
- if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
9997
+ if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
9861
9998
  marginTop = '';
9862
9999
  }
9863
10000
  else {
@@ -9876,7 +10013,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9876
10013
  var pointerRight = this.parent.isAdaptive ? 10 : -2;
9877
10014
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
9878
10015
  var marginTop;
9879
- if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords)) {
10016
+ if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
9880
10017
  marginTop = '';
9881
10018
  }
9882
10019
  else {
@@ -10165,6 +10302,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10165
10302
  this.parent.renderTemplates();
10166
10303
  this.triggerQueryTaskbarInfo();
10167
10304
  this.parent.modifiedRecords = [];
10305
+ if (this.parent.viewType == 'ResourceView' && this.parent.showOverAllocation) {
10306
+ this.updateOverlapped();
10307
+ }
10168
10308
  if (collapsedResourceRecord.length) {
10169
10309
  for (var j = 0; j < collapsedResourceRecord.length; j++) {
10170
10310
  if (collapsedResourceRecord[j].hasChildRecords) {
@@ -10191,22 +10331,37 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10191
10331
  var taskbarContainerNode = this.taskbarContainer();
10192
10332
  taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
10193
10333
  taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
10194
- var connectorLineLeftNode = this.getLeftPointNode();
10195
- if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
10196
- 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
+ }
10197
10344
  }
10198
10345
  if (this.templateData.hasChildRecords) {
10199
10346
  var parentTaskbarTemplateNode = this.getParentTaskbarNode(i, taskbarContainerNode);
10347
+ var milestoneTemplateNode = this.getMilestoneNode(i, taskbarContainerNode);
10200
10348
  if (!this.templateData.ganttProperties.isAutoSchedule) {
10201
10349
  var manualTaskbar = this.getManualTaskbar();
10202
- manualTaskbar[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
10203
- var connectorLineRightNode = this.getRightPointNode();
10204
- manualTaskbar[0].appendChild([].slice.call(connectorLineRightNode)[0]);
10205
- 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
+ }
10206
10358
  }
10207
10359
  if (parentTaskbarTemplateNode && parentTaskbarTemplateNode.length > 0) {
10208
10360
  taskbarContainerNode[0].appendChild([].slice.call(parentTaskbarTemplateNode)[0]);
10209
10361
  }
10362
+ else if (milestoneTemplateNode && milestoneTemplateNode.length > 0) {
10363
+ taskbarContainerNode[0].appendChild([].slice.call(milestoneTemplateNode)[0]);
10364
+ }
10210
10365
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
10211
10366
  this.templateData.ganttProperties.baselineEndDate) {
10212
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()))
@@ -10276,8 +10431,13 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10276
10431
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
10277
10432
  }
10278
10433
  }
10279
- if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
10280
- 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();
10281
10441
  taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
10282
10442
  }
10283
10443
  var rightLabelNode = this.getRightLabelNode(i);
@@ -10298,6 +10458,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10298
10458
  else {
10299
10459
  var text = createElement('Text');
10300
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
+ }
10301
10465
  taskIndicatorTextNode = text.childNodes;
10302
10466
  }
10303
10467
  taskIndicatorNode[0].appendChild([].slice.call(taskIndicatorTextNode)[0]);
@@ -10391,7 +10555,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10391
10555
  getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
10392
10556
  (trElement.querySelector('.' + baselineBar) ? getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor : null);
10393
10557
  }
10394
- else {
10558
+ else if (taskbarElement) {
10395
10559
  var childTask = taskbarElement.querySelector(classCollections[0]);
10396
10560
  var progressTask = taskbarElement.querySelector(classCollections[1]);
10397
10561
  args.taskbarBgColor = isNullOrUndefined(childTask) ? null : taskbarElement.classList.contains(traceChildTaskBar) ?
@@ -10470,7 +10634,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10470
10634
  trElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
10471
10635
  }
10472
10636
  }
10473
- else {
10637
+ else if (taskbarElement) {
10474
10638
  if (taskbarElement.querySelector(classCollections[0]) &&
10475
10639
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor !== args.taskbarBgColor) {
10476
10640
  taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.taskbarBgColor;
@@ -10572,6 +10736,78 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10572
10736
  }
10573
10737
  return null;
10574
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
+ };
10575
10811
  /**
10576
10812
  * To refresh edited TR
10577
10813
  *
@@ -10585,14 +10821,22 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10585
10821
  var selectedItem = this.parent.currentViewData[index];
10586
10822
  if (index !== -1 && selectedItem) {
10587
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
+ }
10588
10827
  if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar) {
10589
10828
  tr.replaceChild(this.getResourceParent(data).childNodes[0], tr.childNodes[0]);
10590
10829
  }
10591
10830
  else {
10592
- 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
+ }
10593
10837
  }
10594
10838
  this.parent.renderTemplates();
10595
- if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation) {
10839
+ if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && this.parent.allowTaskbarOverlap) {
10596
10840
  if (isValidateRange) {
10597
10841
  this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
10598
10842
  }
@@ -10614,6 +10858,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10614
10858
  }
10615
10859
  var dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
10616
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
+ }
10617
10867
  var nextEditableElement = this.parent.ganttChartModule.tempNextElement;
10618
10868
  if (this.parent.ganttChartModule.isEditableElement && nextEditableElement) {
10619
10869
  this.parent.treeGrid.grid.focusModule.focus();
@@ -10627,7 +10877,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10627
10877
  ChartRows.prototype.getResourceParent = function (record) {
10628
10878
  var chartRows = this.parent.ganttChartModule.getChartRows();
10629
10879
  //Below code is for rendering taskbartemplate in resource view with multi taskbar
10630
- if (this.parent.initialChartRowElements) {
10880
+ if (this.parent.initialChartRowElements && (!this.parent.allowTaskbarDragAndDrop && this.parent.allowTaskbarOverlap)) {
10631
10881
  for (var j = 0; j < this.parent.initialChartRowElements.length; j++) {
10632
10882
  if (!isNullOrUndefined(chartRows[j])) {
10633
10883
  if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
@@ -10655,7 +10905,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10655
10905
  var id = chartRows[i].querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
10656
10906
  var ganttData = this.parent.getRecordByID(id);
10657
10907
  var zIndex = "";
10658
- if (ganttData && ganttData.ganttProperties.eOverlapIndex) {
10908
+ if (ganttData && !isNullOrUndefined(ganttData.ganttProperties.eOverlapIndex)) {
10659
10909
  zIndex = (ganttData.ganttProperties.eOverlapIndex).toString();
10660
10910
  }
10661
10911
  var cloneChildElement = cloneElement.cloneNode(true);
@@ -10803,7 +11053,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
10803
11053
  for (var count = length; count >= 0; count--) {
10804
11054
  var ganttData = predecessorTasks[count];
10805
11055
  var ganttProp = ganttData.ganttProperties;
10806
- this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
11056
+ if ((!ganttData.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
11057
+ this.ensurePredecessorCollectionHelper(ganttData, ganttProp);
11058
+ }
10807
11059
  }
10808
11060
  };
10809
11061
  /**
@@ -10966,18 +11218,26 @@ var Dependency = /** @__PURE__ @class */ (function () {
10966
11218
  offsetUnit: offsetUnits.durationUnit,
10967
11219
  offset: offsetUnits.duration
10968
11220
  };
10969
- var fromData = _this.parent.connectorLineModule.getRecordByID(obj.to);
10970
- var toData = _this.parent.connectorLineModule.getRecordByID(obj.from);
10971
- var isValid;
10972
- if (_this.parent.connectorLineEditModule && toData && fromData) {
10973
- isValid = _this.parent.connectorLineEditModule.validateParentPredecessor(toData, fromData);
10974
- if (isValid)
11221
+ var isOwnParent = _this.checkIsParent(match[0]);
11222
+ if (!_this.parent.allowParentDependency) {
11223
+ if (!isOwnParent) {
10975
11224
  collection.push(obj);
11225
+ }
10976
11226
  }
10977
11227
  else {
10978
- 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);
10979
11240
  }
10980
- match.splice(0);
10981
11241
  });
10982
11242
  return collection;
10983
11243
  };
@@ -11100,7 +11360,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
11100
11360
  var length = predecessorsCollection.length;
11101
11361
  for (var count = 0; count < length; count++) {
11102
11362
  ganttRecord = predecessorsCollection[count];
11103
- this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
11363
+ if ((!ganttRecord.hasChildRecords && !this.parent.allowParentDependency) || this.parent.allowParentDependency) {
11364
+ this.updatePredecessorHelper(ganttRecord, predecessorsCollection);
11365
+ }
11104
11366
  }
11105
11367
  };
11106
11368
  /**
@@ -11149,12 +11411,16 @@ var Dependency = /** @__PURE__ @class */ (function () {
11149
11411
  * @private
11150
11412
  */
11151
11413
  Dependency.prototype.updatedRecordsDateByPredecessor = function () {
11414
+ if (!this.parent.autoCalculateDateScheduling) {
11415
+ return;
11416
+ }
11152
11417
  var flatData = this.parent.flatData;
11153
11418
  var totLength = this.parent.flatData.length;
11154
11419
  for (var count = 0; count < totLength; count++) {
11155
11420
  if (flatData[count].ganttProperties.predecessorsName) {
11156
11421
  this.validatePredecessorDates(flatData[count]);
11157
- 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) {
11158
11424
  this.parent.editModule['updateChildItems'](flatData[count]);
11159
11425
  }
11160
11426
  }
@@ -11199,7 +11465,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
11199
11465
  var predecessor = predecessors[count];
11200
11466
  parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor.from);
11201
11467
  record = this.parent.connectorLineModule.getRecordByID(predecessor.to);
11202
- if (this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
11468
+ if (this.parent.allowParentDependency && this.parent.isLoad && this.parentPredecessors.indexOf(ganttRecord) == -1
11203
11469
  && (ganttRecord.hasChildRecords || record.hasChildRecords)) {
11204
11470
  this.parentPredecessors.push(ganttRecord);
11205
11471
  }
@@ -11883,9 +12149,16 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11883
12149
  * @private
11884
12150
  */
11885
12151
  ConnectorLine.prototype.getHeightValue = function (data) {
11886
- return (data.parentIndex * data.rowHeight) > (data.childIndex * data.rowHeight) ?
11887
- ((data.parentIndex * data.rowHeight) - (data.childIndex * data.rowHeight)) :
11888
- ((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
+ }
11889
12162
  };
11890
12163
  /**
11891
12164
  * To get sstype2 inner element width.
@@ -11962,7 +12235,30 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
11962
12235
  var heightValue = isVirtual ? connectorLine$$1.height : (height + isMilestoneValue);
11963
12236
  var borderTopWidth = 0;
11964
12237
  var addTop = 0;
11965
- 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) {
11966
12262
  var fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
11967
12263
  var toRecordIsParent = this.parent.currentViewData[data.childIndex].hasChildRecords;
11968
12264
  var fromRecordIsManual = this.parent.currentViewData[data.parentIndex].ganttProperties.isAutoSchedule;
@@ -12055,7 +12351,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12055
12351
  this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
12056
12352
  if (this.getParentPosition(data) === 'FSType1') {
12057
12353
  div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12058
- ((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;' +
12059
12355
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType1">';
12060
12356
  div = div + eLine;
12061
12357
  div = div + direction + (isMilestoneParent ? -1 : 0) + 'px;width:' + (isMilestoneParent ?
@@ -12075,7 +12371,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12075
12371
  'px;border-top-width:' + (5 + this.lineStroke) + 'px;width:0;height:0;position:relative;"></div></div>';
12076
12372
  }
12077
12373
  if (this.getParentPosition(data) === 'FSType2') {
12078
- 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 +
12079
12375
  this.getTaskbarMidpoint(isMilestone) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12080
12376
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType2">';
12081
12377
  div = div + eLine;
@@ -12107,7 +12403,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12107
12403
  }
12108
12404
  if (this.getParentPosition(data) === 'FSType3') {
12109
12405
  div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12110
- ((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;' +
12111
12407
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType3">';
12112
12408
  div = div + rightArrow;
12113
12409
  div = div + direction + '10px;' + this.getBorderStyles((this.parent.enableRtl ? 'right' : 'left'), 10) +
@@ -12137,7 +12433,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12137
12433
  }
12138
12434
  if (this.getParentPosition(data) === 'FSType4') {
12139
12435
  div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12140
- ((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;' +
12141
12437
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FSType4">';
12142
12438
  div = div + rightArrow;
12143
12439
  div = div + direction + (data.childLeft - (data.parentLeft + data.parentWidth + 10)) + 'px;' +
@@ -12163,7 +12459,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12163
12459
  }
12164
12460
  if (this.getParentPosition(data) === 'SSType4') {
12165
12461
  div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12166
- ((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;' +
12167
12463
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType4">';
12168
12464
  div = div + rightArrow;
12169
12465
  div = div + direction + (data.childLeft - data.parentLeft) + 'px;' + duplicateStingTwo;
@@ -12176,7 +12472,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12176
12472
  }
12177
12473
  if (this.getParentPosition(data) === 'SSType3') {
12178
12474
  div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12179
- ((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;' +
12180
12476
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType3">';
12181
12477
  div = div + rightArrow;
12182
12478
  div = div + direction + '10px;' + duplicateStingTwo;
@@ -12189,7 +12485,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12189
12485
  }
12190
12486
  if (this.getParentPosition(data) === 'SSType2') {
12191
12487
  div = div + direction + setInnerElementLeftSSType2 + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12192
- ((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;' +
12193
12489
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType2">';
12194
12490
  div = div + eLine;
12195
12491
  div = div + 'width:' + (setInnerChildWidthSSType2 + 1) + 'px;' +
@@ -12209,7 +12505,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12209
12505
  }
12210
12506
  if (this.getParentPosition(data) === 'SSType1') {
12211
12507
  div = div + direction + (data.childLeft - 20) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12212
- ((data.parentIndex * data.rowHeight) + addTop +
12508
+ ((!this.parent.allowTaskbarOverlap ? parentOverlapTopValue : (data.parentIndex * data.rowHeight)) + addTop +
12213
12509
  this.getTaskbarMidpoint(isMilestoneParent) - (this.lineStroke - 1) - isMilestoneValue)) + 'px;' +
12214
12510
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SSType1">';
12215
12511
  div = div + eLine;
@@ -12227,7 +12523,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12227
12523
  }
12228
12524
  if (this.getParentPosition(data) === 'FFType1') {
12229
12525
  div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12230
- ((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;' +
12231
12527
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType1">';
12232
12528
  div = div + eLine;
12233
12529
  div = div + direction + (isMilestoneParent ? (((data.parentLeft + data.parentWidth) -
@@ -12251,7 +12547,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12251
12547
  }
12252
12548
  if (this.getParentPosition(data) === 'FFType2') {
12253
12549
  div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12254
- ((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;' +
12255
12551
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType2">';
12256
12552
  div = div + eLine;
12257
12553
  div = div + (isMilestoneParent ? direction + '-1px;' : '') + 'width:' +
@@ -12277,7 +12573,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12277
12573
  }
12278
12574
  if (this.getParentPosition(data) === 'FFType3') {
12279
12575
  div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12280
- ((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;' +
12281
12577
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType3">';
12282
12578
  div = div + duplicateStingOne;
12283
12579
  div = div + eLine;
@@ -12300,7 +12596,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12300
12596
  }
12301
12597
  if (this.getParentPosition(data) === 'FFType4') {
12302
12598
  div = div + direction + (data.parentLeft + data.parentWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12303
- ((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;' +
12304
12600
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="FFType4">';
12305
12601
  div = div + leftArrow;
12306
12602
  div = div + (direction + ((data.childLeft + data.childWidth) -
@@ -12329,7 +12625,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12329
12625
  }
12330
12626
  if (this.getParentPosition(data) === 'SFType4') {
12331
12627
  div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12332
- ((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;' +
12333
12629
  'height:' + heightValue + 'px;position:absolute" data-connectortype="SFType4">';
12334
12630
  div = div + duplicateStingFour + 'top:' + (-5 - this.lineStroke + (this.lineStroke - 1)) + 'px;' +
12335
12631
  'border-bottom-width:' + (5 + this.lineStroke) +
@@ -12357,7 +12653,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12357
12653
  }
12358
12654
  if (this.getParentPosition(data) === 'SFType3') {
12359
12655
  div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12360
- ((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;' +
12361
12657
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType3">';
12362
12658
  div = div + duplicateStingOne;
12363
12659
  div = div + eLine;
@@ -12375,7 +12671,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12375
12671
  }
12376
12672
  if (this.getParentPosition(data) === 'SFType1') {
12377
12673
  div = div + direction + (data.parentLeft - 10) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12378
- ((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;' +
12379
12675
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType1">';
12380
12676
  div = div + eLine;
12381
12677
  div = div + 'width:11px;' + this.getBorderStyles('top', this.lineStroke) + 'position:relative;"></div>';
@@ -12400,7 +12696,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
12400
12696
  }
12401
12697
  if (this.getParentPosition(data) === 'SFType2') {
12402
12698
  div = div + direction + (data.childLeft + data.childWidth) + 'px;top:' + (isVirtual ? connectorLine$$1.top :
12403
- ((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;' +
12404
12700
  'width:1px;height:' + heightValue + 'px;position:absolute" data-connectortype="SFType2">';
12405
12701
  div = div + eLine;
12406
12702
  div = div + direction + (((data.parentLeft) - (data.childLeft + data.childWidth)) - 10) +
@@ -12796,7 +13092,7 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
12796
13092
  this.toolTipObj.position = 'BottomCenter';
12797
13093
  this.toolTipObj.openDelay = 700;
12798
13094
  this.toolTipObj.enableRtl = this.parent.enableRtl;
12799
- this.toolTipObj.enableHtmlSanitizer = false;
13095
+ this.toolTipObj.enableHtmlSanitizer = this.parent.enableHtmlSanitizer;
12800
13096
  this.toolTipObj.cssClass = ganttTooltip;
12801
13097
  this.toolTipObj.animation = { open: { effect: 'None', delay: 0 }, close: { effect: 'None', delay: 0 } };
12802
13098
  this.toolTipObj.afterOpen = this.updateTooltipPosition.bind(this);
@@ -13009,8 +13305,12 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13009
13305
  var taskName;
13010
13306
  if (ganttData) {
13011
13307
  data = ganttData.ganttProperties;
13012
- taskName = !isNullOrUndefined(data.taskName) ? '<tr class = "e-gantt-tooltip-rowcell"><td colspan="3">' +
13013
- (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>' : '';
13014
13314
  }
13015
13315
  switch (elementType) {
13016
13316
  case 'milestone':
@@ -13022,9 +13322,13 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13022
13322
  else if (!isNullOrUndefined(data.startDate)) {
13023
13323
  milestoneStartDate = data.startDate;
13024
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
+ }
13025
13329
  var sDate = !isNullOrUndefined(milestoneStartDate) ? '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
13026
13330
  '<td class = "e-gantt-tooltip-value">' +
13027
- this.parent.getFormatedDate(milestoneStartDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13331
+ sDateValue + '</td></tr>' : '';
13028
13332
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13029
13333
  taskName + sDate + '</tbody></table>';
13030
13334
  break;
@@ -13032,20 +13336,28 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13032
13336
  case 'taskbar':
13033
13337
  {
13034
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
+ }
13035
13349
  var startDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13036
13350
  this.parent.localeObj.getConstant(scheduledTask ? 'startDate' : 'subTasksStartDate') +
13037
- '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
13038
- this.parent.getFormatedDate(scheduledTask ? data.startDate : data.autoStartDate, this.parent.getDateFormat()) +
13039
- '</td></tr>' : '';
13351
+ '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' + startDateValue + '</td></tr>' : '';
13040
13352
  var endDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13041
13353
  this.parent.localeObj.getConstant(scheduledTask ? 'endDate' : 'subTasksEndDate') +
13042
- '</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>' : '';
13043
13355
  var duration = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
13044
13356
  this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
13045
- '<td class = "e-gantt-tooltip-value"> ' + this.parent.getDurationString((scheduledTask ? data.duration : data.autoDuration), data.durationUnit) +
13357
+ '<td class = "e-gantt-tooltip-value"> ' + durationValue +
13046
13358
  '</td></tr>' : '';
13047
13359
  var progress = !isNullOrUndefined(data.progress) ? '<tr><td class = "e-gantt-tooltip-label">' +
13048
- this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' + data.progress +
13360
+ this.parent.localeObj.getConstant('progress') + '</td><td>:</td><td>' + progressValue +
13049
13361
  '</td></tr>' : '';
13050
13362
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13051
13363
  taskName + startDate + endDate + duration + progress + '</tbody></table>';
@@ -13053,82 +13365,131 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13053
13365
  }
13054
13366
  case 'baseline':
13055
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
+ }
13056
13374
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13057
13375
  taskName + '<tr><td class = "e-gantt-tooltip-label">' +
13058
13376
  this.parent.localeObj.getConstant('baselineStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13059
- this.parent.getFormatedDate(data.baselineStartDate, this.parent.getDateFormat()) + '</td></tr><tr>' +
13377
+ baselineStartDateValue + '</td></tr><tr>' +
13060
13378
  '<td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('baselineEndDate') +
13061
13379
  '</td><td>:</td><td class = "e-gantt-tooltip-value">' +
13062
- this.parent.getFormatedDate(data.baselineEndDate, this.parent.getDateFormat()) + '</td></tr></tbody></table>';
13380
+ baselineEndDateValue + '</td></tr></tbody></table>';
13063
13381
  break;
13064
13382
  }
13065
13383
  case 'marker':
13066
13384
  {
13067
13385
  var markerTooltipElement = parent.tooltipModule.getMarkerTooltipData(args);
13386
+ var markerTooltipElementValue = this.parent.getFormatedDate(this.parent.dateValidationModule.getDateFromFormat(markerTooltipElement.day), this.parent.getDateFormat());
13068
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
+ }
13069
13392
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr><td>' +
13070
- this.parent.getFormatedDate(this.parent.dateValidationModule.getDateFromFormat(markerTooltipElement.day), this.parent.getDateFormat()) +
13071
- '</td></tr><tr><td>' +
13072
- 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>';
13073
13394
  break;
13074
13395
  }
13075
13396
  case 'connectorLine':
13076
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
+ }
13077
13412
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody><tr><td class = "e-gantt-tooltip-label">' +
13078
13413
  this.parent.localeObj.getConstant('from') + '</td><td>:</td>' +
13079
- '<td class = "e-gantt-tooltip-value">' + parent.tooltipModule.predecessorTooltipData.fromName + ' (' +
13080
- 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">' +
13081
13416
  this.parent.localeObj.getConstant('to') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13082
- parent.tooltipModule.predecessorTooltipData.toName +
13083
- ' (' + parent.tooltipModule.predecessorTooltipData.toId + ')' +
13084
- '</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('taskLink') +
13085
- '</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 +
13086
13419
  '</td></tr><tr><td class = "e-gantt-tooltip-label">' + this.parent.localeObj.getConstant('lag') +
13087
13420
  '</td><td>:</td><td class = "e-gantt-tooltip-value">' +
13088
- parent.tooltipModule.predecessorTooltipData.offsetString + '</td></tr></tbody></table>';
13421
+ offsetStringValue + '</td></tr></tbody></table>';
13089
13422
  break;
13090
13423
  }
13091
13424
  case 'indicator':
13092
13425
  if (args.target.title.length) {
13093
- 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>';
13094
13431
  }
13095
13432
  break;
13096
13433
  case 'timeline':
13097
- 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>';
13098
13439
  break;
13099
13440
  case 'manualtaskbar':
13100
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
+ }
13101
13454
  var autoStartDate = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13102
13455
  this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
13103
- this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13456
+ autoStartDateValue + '</td></tr>' : '';
13104
13457
  var autoEndDate = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13105
13458
  this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13106
- this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13459
+ autoEndDateValue + '</td></tr>' : '';
13107
13460
  var durationValue = !isNullOrUndefined(data.duration) ? '<tr><td class = "e-gantt-tooltip-label">' +
13108
13461
  this.parent.localeObj.getConstant('duration') + '</td><td>:</td>' +
13109
- '<td class = "e-gantt-tooltip-value"> ' + this.parent.getDurationString(data.duration, data.durationUnit) +
13462
+ '<td class = "e-gantt-tooltip-value"> ' + durationUnitValue +
13110
13463
  '</td></tr>' : '';
13111
13464
  var manualStartDate = data.startDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13112
13465
  this.parent.localeObj.getConstant('startDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
13113
- this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13466
+ manualStartDateValue + '</td></tr>' : '';
13114
13467
  var manualEndDate = data.endDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13115
13468
  this.parent.localeObj.getConstant('endDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13116
- this.parent.getFormatedDate(data.endDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13469
+ manualEndDateValue + '</td></tr>' : '';
13117
13470
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13118
13471
  taskName + manualStartDate + autoStartDate + manualEndDate + autoEndDate + durationValue + '</tbody></table>';
13119
13472
  break;
13120
13473
  }
13121
13474
  case 'manualmilestone':
13122
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
+ }
13123
13484
  var autoStart = data.autoStartDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13124
13485
  this.parent.localeObj.getConstant('subTasksStartDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value"> ' +
13125
- this.parent.getFormatedDate(data.autoStartDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13486
+ autoStartValue + '</td></tr>' : '';
13126
13487
  var autoEnd = data.autoEndDate ? '<tr><td class = "e-gantt-tooltip-label">' +
13127
13488
  this.parent.localeObj.getConstant('subTasksEndDate') + '</td><td>:</td>' + '<td class = "e-gantt-tooltip-value">' +
13128
- this.parent.getFormatedDate(data.autoEndDate, this.parent.getDateFormat()) + '</td></tr>' : '';
13489
+ autoEndValue + '</td></tr>' : '';
13129
13490
  var date = '<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td>' +
13130
13491
  '<td class = "e-gantt-tooltip-value">' +
13131
- this.parent.getFormatedDate(data.startDate, this.parent.getDateFormat()) + '</tr>';
13492
+ dateValue + '</tr>';
13132
13493
  content$$1 = '<table class = "e-gantt-tooltiptable"><tbody>' +
13133
13494
  taskName + date + autoStart + autoEnd + '</tbody></table>';
13134
13495
  break;
@@ -13157,6 +13518,9 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13157
13518
  */
13158
13519
  Tooltip$$1.prototype.getPredecessorTooltipData = function (args) {
13159
13520
  var predeceesorParent = args.target.parentElement.id;
13521
+ if (this.parent.enableHtmlSanitizer && typeof (predeceesorParent) === 'string') {
13522
+ predeceesorParent = SanitizeHtmlHelper.sanitize(predeceesorParent);
13523
+ }
13160
13524
  var taskIds = predeceesorParent.match(/ConnectorLineparent(.*)child(.*)/);
13161
13525
  taskIds.shift();
13162
13526
  var fromTask;
@@ -13436,7 +13800,6 @@ var FocusModule = /** @__PURE__ @class */ (function () {
13436
13800
  var top_1 = containerPosition.top + (containerPosition.height / 2);
13437
13801
  var left = containerPosition.left + (containerPosition.width / 2);
13438
13802
  this.setActiveElement(e.target);
13439
- // eslint-disable-next-line security/detect-non-literal-fs-filename
13440
13803
  contextMenu.open(top_1, left);
13441
13804
  e.preventDefault();
13442
13805
  break;
@@ -13815,6 +14178,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13815
14178
  this.treeGrid.isReact = true;
13816
14179
  this.treeGrid.grid.isReact = true;
13817
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
+ }
13818
14187
  createSpinner({ target: this.element }, this.createElement);
13819
14188
  this.trigger('load', {});
13820
14189
  this.element.classList.add(root);
@@ -13840,13 +14209,13 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13840
14209
  };
13841
14210
  Gantt.prototype.hideMaskRow = function () {
13842
14211
  var isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
13843
- if (!isNullOrUndefined(this.contentMaskTable) && isTablePresent != 0) {
14212
+ if (!isNullOrUndefined(this.contentMaskTable) && (isTablePresent != 0 || this.contentMaskTable)) {
13844
14213
  var maskTable = this.contentMaskTable;
13845
14214
  remove(maskTable);
13846
14215
  this.contentMaskTable = null;
13847
14216
  }
13848
14217
  isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
13849
- if (!isNullOrUndefined(this.headerMaskTable) && isTablePresent != 0) {
14218
+ if (!isNullOrUndefined(this.headerMaskTable) && (isTablePresent != 0 || this.headerMaskTable)) {
13850
14219
  var maskTable = this.headerMaskTable;
13851
14220
  remove(maskTable);
13852
14221
  this.headerMaskTable = null;
@@ -13859,8 +14228,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13859
14228
  }
13860
14229
  if (this.element.querySelectorAll('.' + timelineHeaderTableContainer).length != 0) {
13861
14230
  for (var i = 0; i < this.singleTier; i++) {
13862
- if (!isNullOrUndefined(this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i])) {
13863
- 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";
13864
14233
  }
13865
14234
  }
13866
14235
  }
@@ -13882,7 +14251,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13882
14251
  if (this.element.querySelectorAll('.' + timelineHeaderTableContainer).length != 0) {
13883
14252
  this.singleTier = this.timelineModule.isSingleTier ? 1 : 2;
13884
14253
  for (var i = 0; i < this.singleTier; i++) {
13885
- this.element.querySelectorAll('.' + timelineHeaderTableContainer)[i]['style'].visibility = "hidden";
14254
+ this.element.querySelectorAll('.' + timelineHeaderTableContainer)[parseInt(i.toString(), 10)]['style'].visibility = "hidden";
13886
14255
  }
13887
14256
  }
13888
14257
  if (this.singleTier === 0) {
@@ -14001,7 +14370,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14001
14370
  }
14002
14371
  this.topBottomHeader = 0;
14003
14372
  for (var i = 0; i < row.length; i++) {
14004
- tbody.appendChild(this.applyTimelineMaskRow(row[i]));
14373
+ tbody.appendChild(this.applyTimelineMaskRow(row[parseInt(i.toString(), 10)]));
14005
14374
  this.topBottomHeader = this.topBottomHeader + 1;
14006
14375
  }
14007
14376
  table.appendChild(tbody);
@@ -14015,11 +14384,11 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14015
14384
  maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
14016
14385
  maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
14017
14386
  for (var i = 0; i < maskRow.childNodes.length - 1; i++) {
14018
- maskRow.childNodes[i]['style']['width'] = 166 + 'px';
14387
+ maskRow.childNodes[parseInt(i.toString(), 10)]['style']['width'] = 166 + 'px';
14019
14388
  }
14020
14389
  var maskCells = [].slice.call(maskRow.childNodes);
14021
14390
  for (var i = 0; i < maskCells.length; i++) {
14022
- var maskCell = maskCells[i];
14391
+ var maskCell = maskCells[parseInt(i.toString(), 10)];
14023
14392
  switch (this.topBottomHeader) {
14024
14393
  case 0:
14025
14394
  if (this.enableRtl) {
@@ -14036,7 +14405,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14036
14405
  maskCell.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
14037
14406
  var innerMaskCells = [].slice.call(maskCell.childNodes);
14038
14407
  for (var i_1 = 0; i_1 < innerMaskCells.length; i_1++) {
14039
- var htmlInner = innerMaskCells[i_1];
14408
+ var htmlInner = innerMaskCells[parseInt(i_1.toString(), 10)];
14040
14409
  if (i_1 === 0) {
14041
14410
  if (this.enableRtl) {
14042
14411
  htmlInner.innerHTML = '<span class="e-mask e-skeleton e-skeleton-text e-shimmer-wave e-innerHTML"></span>';
@@ -14088,7 +14457,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14088
14457
  else if (this.columnLoop === 4) {
14089
14458
  this.columnLoop = 1;
14090
14459
  }
14091
- tbody.appendChild(this.applyMaskRow(row[j]));
14460
+ tbody.appendChild(this.applyMaskRow(row[parseInt(j.toString(), 10)]));
14092
14461
  }
14093
14462
  table.appendChild(tbody);
14094
14463
  table.style.width = 100 + '%';
@@ -14109,7 +14478,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14109
14478
  }
14110
14479
  var maskCells = [].slice.call(maskRow.childNodes);
14111
14480
  for (var i = 0; i < maskCells.length; i++) {
14112
- var maskCell = maskCells[i];
14481
+ var maskCell = maskCells[parseInt(i.toString(), 10)];
14113
14482
  switch (this.columnLoop) {
14114
14483
  case 1:
14115
14484
  if (i === 0) {
@@ -14207,7 +14576,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14207
14576
  this.predecessorModule['parentIds'] = [];
14208
14577
  this.predecessorModule['parentRecord'] = [];
14209
14578
  this.predecessorModule.updatePredecessors();
14210
- if (this.isInPredecessorValidation && this.enableValidation) {
14579
+ if (this.isInPredecessorValidation && this.enableValidation && this.autoCalculateDateScheduling) {
14211
14580
  this.predecessorModule.updatedRecordsDateByPredecessor();
14212
14581
  }
14213
14582
  }
@@ -14220,7 +14589,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14220
14589
  if (this.enableValidation) {
14221
14590
  this.dataOperation.updateGanttData();
14222
14591
  }
14223
- this.predecessorModule.updateParentPredecessor();
14592
+ if (this.allowParentDependency) {
14593
+ this.predecessorModule.updateParentPredecessor();
14594
+ }
14224
14595
  if (this.dataSource instanceof Object && isCountRequired(this)) {
14225
14596
  var count = getValue('count', this.dataSource);
14226
14597
  this.treeGrid.dataSource = { result: this.flatData, count: count };
@@ -14233,7 +14604,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14233
14604
  if (this.enableValidation) {
14234
14605
  this.dataOperation.updateGanttData();
14235
14606
  }
14236
- this.predecessorModule.updateParentPredecessor();
14607
+ if (this.allowParentDependency) {
14608
+ this.predecessorModule.updateParentPredecessor();
14609
+ }
14237
14610
  this.treeGridPane.classList.remove('e-temp-content');
14238
14611
  remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
14239
14612
  this.notify('dataReady', {});
@@ -14350,22 +14723,27 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14350
14723
  * @private
14351
14724
  */
14352
14725
  Gantt.prototype.updateContentHeight = function (args) {
14353
- if (this.virtualScrollModule && this.enableVirtualization && !isNullOrUndefined(args)) {
14354
- var length_1 = getValue('result.length', args);
14355
- this.contentHeight = length_1 * this.rowHeight;
14726
+ if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
14727
+ return;
14356
14728
  }
14357
14729
  else {
14358
- var expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
14359
- this.currentViewData : this.getExpandedRecords(this.currentViewData);
14360
- var height = void 0;
14361
- var chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
14362
- if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
14363
- 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;
14364
14733
  }
14365
14734
  else {
14366
- 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;
14367
14746
  }
14368
- this.contentHeight = expandedRecords.length * height;
14369
14747
  }
14370
14748
  };
14371
14749
  /**
@@ -14881,7 +15259,6 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14881
15259
  this.chartRowsModule.refreshGanttRows();
14882
15260
  break;
14883
15261
  case 'includeWeekend':
14884
- case 'dayWorkingTime':
14885
15262
  case 'allowUnscheduledTasks':
14886
15263
  case 'holidays':
14887
15264
  this.isLoad = true;
@@ -14973,6 +15350,11 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14973
15350
  case 'enableRtl':
14974
15351
  case 'readOnly':
14975
15352
  case 'viewType':
15353
+ case 'taskFields':
15354
+ case 'dayWorkingTime':
15355
+ case 'allowTaskbarDragAndDrop':
15356
+ case 'allowTaskbarOverlap':
15357
+ case 'allowParentDependency':
14976
15358
  if (prop === 'locale') {
14977
15359
  this.isLocaleChanged = true;
14978
15360
  }
@@ -14987,6 +15369,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14987
15369
  }
14988
15370
  }
14989
15371
  if (isRefresh) {
15372
+ if (this.isLoad && this.contentMaskTable) {
15373
+ this.contentMaskTable = null;
15374
+ }
14990
15375
  this.refresh();
14991
15376
  }
14992
15377
  };
@@ -15114,7 +15499,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15114
15499
  args: [this]
15115
15500
  });
15116
15501
  }
15117
- if (this.allowRowDragAndDrop) {
15502
+ if (this.allowRowDragAndDrop || this.allowTaskbarDragAndDrop) {
15118
15503
  modules.push({
15119
15504
  member: 'rowDragAndDrop',
15120
15505
  args: [this]
@@ -15649,10 +16034,11 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15649
16034
  * @param {PdfExportProperties} pdfExportProperties - Defines the export properties of the Gantt.
15650
16035
  * @param {isMultipleExport} isMultipleExport - Define to enable multiple export.
15651
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.
15652
16038
  * @returns {Promise<any>} .
15653
16039
  */
15654
- Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc) {
15655
- 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)
15656
16042
  : null;
15657
16043
  };
15658
16044
  /**
@@ -15684,7 +16070,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15684
16070
  * @private
15685
16071
  */
15686
16072
  Gantt.prototype.renderWorkingDayCell = function (args) {
15687
- var includeWeekend = this.taskMode !== 'Auto' ? true : this.includeWeekend ? true : false;
16073
+ var includeWeekend = this.taskMode !== 'Auto' ? true : (this.includeWeekend || !this.autoCalculateDateScheduling) ? true : false;
15688
16074
  var nonWorkingDays = !includeWeekend ? this.nonWorkingDayIndex : [];
15689
16075
  var holidays = this.totalHolidayDates;
15690
16076
  if (nonWorkingDays.length > 0 && nonWorkingDays.indexOf(args.date.getDay()) !== -1) {
@@ -15694,7 +16080,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15694
16080
  var tempDate = new Date(args.date.getTime());
15695
16081
  tempDate.setHours(0, 0, 0);
15696
16082
  if (holidays.indexOf(tempDate.getTime()) !== -1) {
15697
- args.isDisabled = true;
16083
+ if (!this.autoCalculateDateScheduling) {
16084
+ args.isDisabled = false;
16085
+ }
16086
+ else {
16087
+ args.isDisabled = true;
16088
+ }
15698
16089
  }
15699
16090
  }
15700
16091
  };
@@ -15811,8 +16202,8 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
15811
16202
  var id = ganttData.rowUniqueID;
15812
16203
  var task = this.getRecordByID(id);
15813
16204
  var isValid = false;
15814
- if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(ganttData[field]) && (value instanceof Date ? value.getTime() !==
15815
- 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))) {
15816
16207
  isValid = true;
15817
16208
  }
15818
16209
  if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
@@ -16759,6 +17150,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16759
17150
  __decorate([
16760
17151
  Property(false)
16761
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);
16762
17159
  __decorate([
16763
17160
  Property(true)
16764
17161
  ], Gantt.prototype, "disableHtmlEncode", void 0);
@@ -16768,6 +17165,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16768
17165
  __decorate([
16769
17166
  Property(true)
16770
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);
16771
17174
  __decorate([
16772
17175
  Property(true)
16773
17176
  ], Gantt.prototype, "autoFocusTasks", void 0);
@@ -16816,6 +17219,12 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
16816
17219
  __decorate([
16817
17220
  Property(false)
16818
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);
16819
17228
  __decorate([
16820
17229
  Property('Horizontal')
16821
17230
  ], Gantt.prototype, "gridLines", void 0);
@@ -17261,8 +17670,10 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17261
17670
  }
17262
17671
  if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
17263
17672
  data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
17264
- || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
17265
- 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
+ }
17266
17677
  }
17267
17678
  else {
17268
17679
  var callBackPromise_1 = new Deferred();
@@ -17312,7 +17723,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17312
17723
  };
17313
17724
  CellEdit.prototype.isValueChange = function (args, field) {
17314
17725
  var data = getValue('data', args);
17315
- var editedValue = data[field];
17726
+ var editedValue = data["" + field];
17316
17727
  var previousValue = getValue('previousData', args);
17317
17728
  if ((isNullOrUndefined(editedValue) && !isNullOrUndefined(previousValue)) || (!isNullOrUndefined(editedValue) && isNullOrUndefined(previousValue))) {
17318
17729
  return true;
@@ -17480,7 +17891,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17480
17891
  var ganttSegments = [];
17481
17892
  var segments = ganttProp.segments;
17482
17893
  for (var i = 0; i < segments.length; i++) {
17483
- var segment = segments[i];
17894
+ var segment = segments[parseInt(i.toString(), 10)];
17484
17895
  var endDate = segment.endDate;
17485
17896
  endDate = (!isNullOrUndefined(ganttProp.endDate)) && endDate.getTime() <
17486
17897
  ganttProp.endDate.getTime() && i !== segments.length - 1 ? endDate : ganttProp.endDate;
@@ -17679,7 +18090,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17679
18090
  }
17680
18091
  }
17681
18092
  if (!isNullOrUndefined(index) && index !== -1) {
17682
- editedResources.push(previousResource[index]);
18093
+ editedResources.push(previousResource[parseInt(index.toString(), 10)]);
17683
18094
  }
17684
18095
  else {
17685
18096
  var resource = resourceData.filter(function (resourceInfo) {
@@ -17741,7 +18152,7 @@ var CellEdit = /** @__PURE__ @class */ (function () {
17741
18152
  CellEdit.prototype.typeEdited = function (args, editedObj) {
17742
18153
  var key = 'taskType';
17743
18154
  var ganttProb = args.data.ganttProperties;
17744
- var taskType = editedObj[key];
18155
+ var taskType = editedObj["" + key];
17745
18156
  this.parent.setRecordValue('taskType', taskType, ganttProb, true);
17746
18157
  //this.parent.dataOperation.updateMappingData(args.data, 'taskType');
17747
18158
  this.updateEditedRecord(args);
@@ -17851,15 +18262,12 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
17851
18262
  this.parent.tooltipModule.toolTipObj.close();
17852
18263
  this.updateTooltip(segmentIndex);
17853
18264
  if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointLeftDrag') {
17854
- // eslint-disable-next-line security/detect-non-literal-fs-filename
17855
18265
  this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + connectorPointLeft));
17856
18266
  }
17857
18267
  else if (this.taskbarEdit.connectorSecondAction === 'ConnectorPointRightDrag') {
17858
- // eslint-disable-next-line security/detect-non-literal-fs-filename
17859
18268
  this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector('.' + connectorPointRight));
17860
18269
  }
17861
18270
  else {
17862
- // eslint-disable-next-line security/detect-non-literal-fs-filename
17863
18271
  this.toolTipObj.open(this.taskbarEdit.taskBarEditElement);
17864
18272
  }
17865
18273
  }
@@ -18050,6 +18458,10 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18050
18458
  _this.elementOffsetWidth = 0;
18051
18459
  _this.elementOffsetHeight = 0;
18052
18460
  _this.segmentIndex = -1;
18461
+ _this.currentItemTop = 0;
18462
+ _this.currentItemPrevTop = 0;
18463
+ _this.topValue = 0;
18464
+ _this.draggedRecordMarginTop = 0;
18053
18465
  _this.parent = ganttObj;
18054
18466
  _this.initPublicProp();
18055
18467
  _this.wireEvents();
@@ -18292,7 +18704,9 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18292
18704
  if (!isNullOrUndefined(parentRecord) && !parentRecord.expanded) {
18293
18705
  this.prevZIndex = (this.taskBarEditElement).style.zIndex;
18294
18706
  (this.taskBarEditElement).style.zIndex = '1000';
18295
- 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
+ }
18296
18710
  }
18297
18711
  }
18298
18712
  }
@@ -18456,9 +18870,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18456
18870
  this.parent.ganttChartModule.scrollObject.previousScroll.left;
18457
18871
  }
18458
18872
  this.tooltipPositionX = this.mouseDownX;
18459
- this.mouseDownY = e.pageY - containerPosition.top +
18873
+ this.mouseDownY = this.dragMoveY = e.pageY - containerPosition.top +
18460
18874
  this.parent.ganttChartModule.scrollObject.previousScroll.top;
18461
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
+ }
18462
18887
  if (this.taskBarEditAction === 'ConnectorPointLeftDrag' || this.taskBarEditAction === 'ConnectorPointRightDrag') {
18463
18888
  this.fromPredecessorText = this.taskBarEditAction === 'ConnectorPointLeftDrag' ? 'start' : 'finish';
18464
18889
  this.parent.connectorLineModule.tooltipTable.innerHTML = this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.taskBarEditRecord.ganttProperties.taskName, this.fromPredecessorText, '', '');
@@ -18590,6 +19015,22 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18590
19015
  this.drawFalseLine();
18591
19016
  }
18592
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
+ }
18593
19034
  this.setItemPosition();
18594
19035
  this.updateEditedItem();
18595
19036
  this.editTooltip.updateTooltip(this.segmentIndex);
@@ -18669,12 +19110,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
18669
19110
  this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.left;
18670
19111
  this.startScrollTimer('left');
18671
19112
  }
18672
- else if (isConnectorLineEdit && ((mouseY + 80) >
19113
+ else if (((mouseY + 80) >
18673
19114
  containerPosition.top + this.parent.ganttChartModule.chartBodyContainer.offsetHeight)) {
18674
19115
  this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
18675
19116
  this.startScrollTimer('bottom');
18676
19117
  }
18677
- else if (isConnectorLineEdit && ((mouseY - 20) < containerPosition.top)) {
19118
+ else if (((mouseY - 20) < containerPosition.top)) {
18678
19119
  this.timerCount = this.parent.ganttChartModule.scrollObject.previousScroll.top;
18679
19120
  this.startScrollTimer('top');
18680
19121
  }
@@ -19460,6 +19901,11 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19460
19901
  taskBarMainContainer$$1.style.width = (width) + 'px';
19461
19902
  leftLabelContainer$$1.style.width = (item.left) + 'px';
19462
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
+ }
19463
19909
  if (this.taskBarEditAction === 'LeftResizing' && this.segmentIndex === 0) {
19464
19910
  var parent_1 = this.taskBarEditElement.parentElement;
19465
19911
  var segmentedTasks = parent_1.getElementsByClassName('e-segmented-taskbar');
@@ -19572,7 +20018,8 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19572
20018
  this.previousMouseMove = null;
19573
20019
  this.editTooltip.showHideTaskbarEditTooltip(false, this.segmentIndex);
19574
20020
  if (this.taskBarEditAction && this.isMouseDragged) {
19575
- if (!this.dragMouseLeave && this.taskBarEditedAction) {
20021
+ if ((!this.dragMouseLeave && this.taskBarEditedAction) || (this.parent.viewType === 'ResourceView' &&
20022
+ this.parent.allowTaskbarDragAndDrop)) {
19576
20023
  this.taskBarEditedAction(e);
19577
20024
  this.isMouseDragged = false;
19578
20025
  }
@@ -19681,6 +20128,65 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19681
20128
  var args = extend({}, arg);
19682
20129
  var ganttRecord = args.data;
19683
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
+ }
19684
20190
  if (args.taskBarEditAction === 'ProgressResizing') {
19685
20191
  if (args.previousData.progress !== taskData.progress) {
19686
20192
  this.parent.setRecordValue('progress', this.getProgressPercent(taskData.width, taskData.progressWidth), taskData, true);
@@ -19872,14 +20378,20 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19872
20378
  }
19873
20379
  if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
19874
20380
  !this.elementOffsetLeft) || !this.parent.enableVirtualization) {
19875
- if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
19876
- this.elementOffsetLeft = this.taskBarEditElement.children[0]['offsetLeft'] + this.taskBarEditElement.offsetLeft;
19877
- this.elementOffsetTop = ((this.taskBarEditElement.offsetTop - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
19878
- }
19879
- else {
20381
+ if (!this.parent.allowParentDependency) {
19880
20382
  this.elementOffsetLeft = this.taskBarEditElement.offsetLeft;
19881
20383
  this.elementOffsetTop = this.taskBarEditElement.offsetTop + scrollTop;
19882
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
+ }
19883
20395
  this.elementOffsetWidth = this.taskBarEditElement.offsetWidth;
19884
20396
  this.elementOffsetHeight = this.taskBarEditElement.offsetHeight;
19885
20397
  }
@@ -20898,7 +21410,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20898
21410
  targetId = inputElement.querySelector('input').getAttribute('id');
20899
21411
  inputElement = inputElement.querySelector('#' + targetId);
20900
21412
  }
20901
- 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]) {
20902
21414
  inputElement = args.event.path[1];
20903
21415
  targetId = inputElement.querySelector('input').getAttribute('id');
20904
21416
  inputElement = inputElement.querySelector('#' + targetId);
@@ -20937,6 +21449,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
20937
21449
  if (!isNullOrUndefined(tasks.startDate) && tasks.startDate !== colName) {
20938
21450
  this.updateScheduleFields(dialog, ganttProp, 'startDate');
20939
21451
  }
21452
+ if (tasks.endDate === colName && !isNullOrUndefined(ganttProp.startDate) && !isNullOrUndefined(args.value) && ganttProp.startDate.getTime() > args.value) {
21453
+ this.updateScheduleFields(dialog, ganttProp, 'endDate');
21454
+ }
20940
21455
  if (!isNullOrUndefined(tasks.endDate) && tasks.endDate !== colName) {
20941
21456
  this.updateScheduleFields(dialog, ganttProp, 'endDate');
20942
21457
  }
@@ -21127,6 +21642,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
21127
21642
  if (taskSettings.endDate === columnName) {
21128
21643
  if (value !== '') {
21129
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
+ }
21130
21648
  if (endDate.getHours() === 0 && ganttObj.defaultEndTime !== 86400) {
21131
21649
  this.parent.dateValidationModule.setTime(ganttObj.defaultEndTime, endDate);
21132
21650
  }
@@ -21509,6 +22027,9 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
21509
22027
  item.content = this.renderGeneralTab(item.content);
21510
22028
  }
21511
22029
  else if (item.content === 'Dependency') {
22030
+ if (this.editedRecord.hasChildRecords && !this.parent.allowParentDependency) {
22031
+ item.disabled = true;
22032
+ }
21512
22033
  item.content = this.renderPredecessorTab(item.content);
21513
22034
  }
21514
22035
  else if (item.content === 'Resources') {
@@ -21970,27 +22491,34 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
21970
22491
  this.preTableCollection = [];
21971
22492
  for (var i = 0; i < flatData.length; i++) {
21972
22493
  var data = flatData[i];
21973
- var currentFlatData = data;
21974
- if (data.parentUniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
21975
- this.isValidData = false;
21976
- }
21977
- else {
21978
- do {
21979
- if (currentFlatData.parentItem) {
21980
- currentFlatData = this.parent.flatData[this.parent.ids.indexOf(currentFlatData.parentItem.taskId)];
21981
- if (currentFlatData.uniqueID === this.beforeOpenArgs.rowData['uniqueID']) {
21982
- this.isValidData = false;
21983
- 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
+ }
21984
22507
  }
21985
- }
21986
- } while (currentFlatData.parentItem);
21987
- }
21988
- if (data.hasChildRecords && this.isValidData) {
21989
- 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
+ }
21990
22517
  }
21991
- if (!this.isValidData) {
21992
- this.isValidData = true;
21993
- continue;
22518
+ else {
22519
+ if (data.hasChildRecords) {
22520
+ continue;
22521
+ }
21994
22522
  }
21995
22523
  var taskId = this.parent.viewType === 'ResourceView' ? data.ganttProperties.taskId.toString()
21996
22524
  : data.ganttProperties.rowUniqueID.toString();
@@ -22227,6 +22755,10 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
22227
22755
  }
22228
22756
  else {
22229
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
+ }
22230
22762
  }
22231
22763
  }
22232
22764
  }
@@ -22510,9 +23042,10 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22510
23042
  var from = 'from';
22511
23043
  var to = 'to';
22512
23044
  this.parent.connectorLineModule.removeConnectorLineById('parent' + predecessor[from] + 'child' + predecessor[to]);
22513
- parentGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[from]);
22514
- childGanttRecord = this.parent.connectorLineModule.getRecordByID(predecessor[to]);
22515
- 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))) {
22516
23049
  connectorObj =
22517
23050
  this.parent.predecessorModule.updateConnectorLineObject(parentGanttRecord, childGanttRecord, predecessor);
22518
23051
  if (!isNullOrUndefined(connectorObj)) {
@@ -22563,8 +23096,8 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22563
23096
  if (!isNullOrUndefined(values[0])) {
22564
23097
  var ids = this.parent.viewType === 'ResourceView' ? this.parent.getTaskIds() : this.parent.ids;
22565
23098
  if (ids.indexOf(values[0]) === -1) {
22566
- if (values[0].indexOf(" ") != -1) {
22567
- match = values[0].split(" ");
23099
+ if (values[0].indexOf(' ') !== -1) {
23100
+ match = values[0].split(' ');
22568
23101
  if (match.length === 1) {
22569
23102
  match = values[0].match(/(\d+|[A-z]+)/g);
22570
23103
  }
@@ -22643,7 +23176,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22643
23176
  var parentRec = rec;
22644
23177
  if (rec.parentItem) {
22645
23178
  parentRec = this.parent.flatData.filter(function (item) {
22646
- return item.uniqueID == rec.parentUniqueID;
23179
+ return item.uniqueID === rec.parentUniqueID;
22647
23180
  })[0];
22648
23181
  if (parentRec.parentItem) {
22649
23182
  parentRec = this.getRootParent(parentRec);
@@ -22724,11 +23257,20 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22724
23257
  if (!isNullOrUndefined(predecessorString) && predecessorString.length > 0) {
22725
23258
  predecessorIdArray = this.idFromPredecessor(predecessorString);
22726
23259
  var _loop_2 = function (count) {
22727
- if (parseInt(predecessorIdArray[predecessorIdArray.length - 1]) !== ganttRecord[this_2.parent.taskFields.id]) {
22728
- var num = this_2.parent.ids.indexOf(predecessorIdArray[predecessorIdArray.length - 1]);
22729
- var fromRecord = this_2.parent.currentViewData[num];
22730
- if (fromRecord && ganttRecord) {
22731
- 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
+ }
22732
23274
  }
22733
23275
  }
22734
23276
  // Check if predecessor exist more then one
@@ -22978,7 +23520,9 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
22978
23520
  this.parent.editModule.updateEditedTask(args.editEventArgs);
22979
23521
  }
22980
23522
  else if (args.validateMode.preserveLinkWithEditing) {
22981
- this.calculateOffset(ganttRecord);
23523
+ if (this.parent.UpdateOffsetOnTaskbarEdit) {
23524
+ this.calculateOffset(ganttRecord);
23525
+ }
22982
23526
  this.parent.editModule.updateEditedTask(args.editEventArgs);
22983
23527
  }
22984
23528
  };
@@ -23009,7 +23553,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23009
23553
  var prevPredecessor = extend([], record.ganttProperties.predecessor, [], true);
23010
23554
  var validPredecessor = this.parent.predecessorModule.getValidPredecessor(record);
23011
23555
  for (var i = 0; i < validPredecessor.length; i++) {
23012
- var predecessor = validPredecessor[i];
23556
+ var predecessor = validPredecessor[parseInt(i.toString(), 10)];
23013
23557
  var parentTask = this.parent.connectorLineModule.getRecordByID(predecessor.from);
23014
23558
  var offset = void 0;
23015
23559
  if (isScheduledTask(parentTask.ganttProperties) && isScheduledTask(record.ganttProperties)) {
@@ -23089,7 +23633,7 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23089
23633
  var parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
23090
23634
  var index = getIndex(predecessor[i], 'from', prevPredecessor, 'to');
23091
23635
  prevPredecessor.splice(index, 1);
23092
- var parentIndex = getIndex(predecessor[i], 'from', parentPredecessor, 'to');
23636
+ var parentIndex = getIndex(predecessor[parseInt(i.toString(), 10)], 'from', parentPredecessor, 'to');
23093
23637
  parentPredecessor.splice(parentIndex, 1);
23094
23638
  this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
23095
23639
  }
@@ -23200,41 +23744,41 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23200
23744
  var violationType = null;
23201
23745
  if (predecessor[i].type === 'FS') {
23202
23746
  if (ganttTaskData.startDate < startDate) {
23203
- this.validationPredecessor.push(predecessor[i]);
23747
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23204
23748
  violationType = 'taskBeforePredecessor_FS';
23205
23749
  }
23206
23750
  else if (ganttTaskData.startDate > startDate) {
23207
- this.validationPredecessor.push(predecessor[i]);
23751
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23208
23752
  violationType = 'taskAfterPredecessor_FS';
23209
23753
  }
23210
23754
  }
23211
23755
  else if (predecessor[i].type === 'SS') {
23212
23756
  if (ganttTaskData.startDate < startDate) {
23213
- this.validationPredecessor.push(predecessor[i]);
23757
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23214
23758
  violationType = 'taskBeforePredecessor_SS';
23215
23759
  }
23216
23760
  else if (ganttTaskData.startDate > startDate) {
23217
- this.validationPredecessor.push(predecessor[i]);
23761
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23218
23762
  violationType = 'taskAfterPredecessor_SS';
23219
23763
  }
23220
23764
  }
23221
23765
  else if (predecessor[i].type === 'FF') {
23222
23766
  if (endDate <= parentGanttRecord.ganttProperties.endDate) {
23223
- this.validationPredecessor.push(predecessor[i]);
23767
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23224
23768
  violationType = 'taskBeforePredecessor_FF';
23225
23769
  }
23226
23770
  else if (endDate > parentGanttRecord.ganttProperties.endDate) {
23227
- this.validationPredecessor.push(predecessor[i]);
23771
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23228
23772
  violationType = 'taskAfterPredecessor_FF';
23229
23773
  }
23230
23774
  }
23231
23775
  else if (predecessor[i].type === 'SF') {
23232
23776
  if (endDate < parentGanttRecord.ganttProperties.startDate) {
23233
- this.validationPredecessor.push(predecessor[i]);
23777
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23234
23778
  violationType = 'taskBeforePredecessor_SF';
23235
23779
  }
23236
23780
  else if (endDate >= parentGanttRecord.ganttProperties.startDate) {
23237
- this.validationPredecessor.push(predecessor[i]);
23781
+ this.validationPredecessor.push(predecessor[parseInt(i.toString(), 10)]);
23238
23782
  violationType = 'taskAfterPredecessor_SF';
23239
23783
  }
23240
23784
  }
@@ -23265,13 +23809,13 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23265
23809
  var prevPredecessor = prevData.ganttProperties.predecessor;
23266
23810
  if (!isNullOrUndefined(prevPredecessor)) {
23267
23811
  for (var p = 0; p < prevPredecessor.length; p++) {
23268
- var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(prevPredecessor[p].from);
23812
+ var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(prevPredecessor[parseInt(p.toString(), 10)].from);
23269
23813
  if (parentGanttRecord === data) {
23270
- data.ganttProperties.predecessor.push(prevPredecessor[p]);
23814
+ data.ganttProperties.predecessor.push(prevPredecessor[parseInt(p.toString(), 10)]);
23271
23815
  }
23272
23816
  else {
23273
23817
  var parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
23274
- var parentIndex = getIndex(prevPredecessor[p], 'from', parentPredecessor, 'to');
23818
+ var parentIndex = getIndex(prevPredecessor[parseInt(p.toString(), 10)], 'from', parentPredecessor, 'to');
23275
23819
  if (parentIndex !== -1) {
23276
23820
  parentPredecessor.splice(parentIndex, 1);
23277
23821
  this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
@@ -23281,9 +23825,9 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
23281
23825
  }
23282
23826
  if (!isNullOrUndefined(newPredecessor)) {
23283
23827
  for (var n = 0; n < newPredecessor.length; n++) {
23284
- var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(newPredecessor[n].from);
23828
+ var parentGanttRecord = this.parent.connectorLineModule.getRecordByID(newPredecessor[parseInt(n.toString(), 10)].from);
23285
23829
  var parentPredecessor = extend([], [], parentGanttRecord.ganttProperties.predecessor, true);
23286
- parentPredecessor.push(newPredecessor[n]);
23830
+ parentPredecessor.push(newPredecessor[parseInt(n.toString(), 10)]);
23287
23831
  this.parent.setRecordValue('predecessor', parentPredecessor, parentGanttRecord.ganttProperties, true);
23288
23832
  }
23289
23833
  }
@@ -23746,7 +24290,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23746
24290
  for (var _i = 0, _b = Object.keys(data); _i < _b.length; _i++) {
23747
24291
  var key = _b[_i];
23748
24292
  if ([tasks.startDate, tasks.endDate, tasks.duration].indexOf(key) !== -1) {
23749
- if (isNullOrUndefined(data[key]) && !ganttObj.allowUnscheduledTasks) {
24293
+ if (isNullOrUndefined(data["" + key]) && !ganttObj.allowUnscheduledTasks) {
23750
24294
  continue;
23751
24295
  }
23752
24296
  if (isFromDialog) {
@@ -23801,7 +24345,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23801
24345
  else if (key === tasks.name) {
23802
24346
  ganttPropKey = 'taskName';
23803
24347
  }
23804
- else if (key === tasks.segments) {
24348
+ else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
23805
24349
  ganttPropKey = 'segments';
23806
24350
  /* eslint-disable-next-line */
23807
24351
  if (data && !isNullOrUndefined(data[this.parent.taskFields.segments]) && data[this.parent.taskFields.segments].length > 0) {
@@ -24169,8 +24713,10 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24169
24713
  */
24170
24714
  Edit$$1.prototype.updateEditedTask = function (args) {
24171
24715
  var ganttRecord = args.data;
24172
- this.updateParentChildRecord(ganttRecord);
24173
- if (this.parent.isConnectorLineUpdate) {
24716
+ if (this.parent.autoCalculateDateScheduling) {
24717
+ this.updateParentChildRecord(ganttRecord);
24718
+ }
24719
+ if (this.parent.isConnectorLineUpdate && this.parent.autoCalculateDateScheduling) {
24174
24720
  /* validating predecessor for updated child items */
24175
24721
  for (var i = 0; i < this.validatedChildItems.length; i++) {
24176
24722
  var child = this.validatedChildItems[i];
@@ -24181,7 +24727,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24181
24727
  }
24182
24728
  this.parent.predecessorModule.isValidatedParentTaskID = '';
24183
24729
  /** validating predecessor for current edited records */
24184
- if (ganttRecord.ganttProperties.predecessorsName) {
24730
+ if (ganttRecord.ganttProperties.predecessor) {
24185
24731
  this.parent.isMileStoneEdited = ganttRecord.ganttProperties.isMilestone;
24186
24732
  if (this.taskbarMoved) {
24187
24733
  this.parent.editedTaskBarItem = ganttRecord;
@@ -24189,7 +24735,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24189
24735
  this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
24190
24736
  this.parent.predecessorModule.isValidatedParentTaskID = '';
24191
24737
  }
24192
- if (ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
24738
+ if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
24193
24739
  (args.action === "DrawConnectorLine")) {
24194
24740
  this.updateChildItems(ganttRecord);
24195
24741
  }
@@ -24197,7 +24743,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24197
24743
  }
24198
24744
  /** Update parent up-to zeroth level */
24199
24745
  if (ganttRecord.parentItem) {
24200
- this.parent.dataOperation.updateParentItems(ganttRecord, true);
24746
+ if (this.parent.autoCalculateDateScheduling) {
24747
+ this.parent.dataOperation.updateParentItems(ganttRecord, true);
24748
+ }
24201
24749
  var parentData = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
24202
24750
  if (!parentData.ganttProperties.predecessorsName) {
24203
24751
  this.parent.predecessorModule.validatePredecessor(parentData, [], '');
@@ -24443,7 +24991,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24443
24991
  durationDiff = this.parent.dateValidationModule.getDuration(validStartDate, validEndDate, 'minute', true, false);
24444
24992
  }
24445
24993
  for (var i = 0; i < childRecords.length; i++) {
24446
- if ((!(this.parent.isUnscheduledTask(childRecords[i].ganttProperties))) && (childRecords[i].ganttProperties.isAutoSchedule)) {
24994
+ if (childRecords[i].ganttProperties.isAutoSchedule) {
24447
24995
  if (durationDiff > 0) {
24448
24996
  var startDate = isScheduledTask(childRecords[i].ganttProperties) ?
24449
24997
  childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.startDate ?
@@ -24561,52 +25109,52 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24561
25109
  }
24562
25110
  for (var i = 0; i < eLength; i++) {
24563
25111
  if (e.changedRecords) {
24564
- rec = e.changedRecords[i];
25112
+ rec = e.changedRecords[parseInt(i.toString(), 10)];
24565
25113
  }
24566
25114
  else {
24567
- rec = e[i];
25115
+ rec = e[parseInt(i.toString(), 10)];
24568
25116
  }
24569
25117
  var _aLength = Object.keys(rec).length;
24570
25118
  for (var j = 0, _a = Object.keys(rec); j < _aLength; j++) {
24571
- var key = _a[j];
24572
- this.parent.editedRecords[i][key] = rec[key];
24573
- 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];
24574
25122
  }
24575
25123
  if (this.parent.taskFields.id !== null) {
24576
- 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];
24577
25125
  }
24578
25126
  if (this.parent.taskFields.name !== null) {
24579
- 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];
24580
25128
  }
24581
25129
  if (this.parent.taskFields.startDate !== null) {
24582
- 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];
24583
25131
  }
24584
25132
  if (this.parent.taskFields.endDate !== null) {
24585
- 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];
24586
25134
  }
24587
25135
  if (this.parent.taskFields.duration !== null) {
24588
- 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]);
24589
25137
  }
24590
25138
  if (this.parent.taskFields.durationUnit !== null) {
24591
- 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];
24592
25140
  }
24593
25141
  if (this.parent.taskFields.progress !== null) {
24594
- 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];
24595
25143
  }
24596
25144
  if (this.parent.taskFields.dependency !== null) {
24597
- 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];
24598
25146
  }
24599
25147
  if (this.parent.taskFields.parentID !== null) {
24600
- 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];
24601
25149
  }
24602
25150
  if (this.parent.taskFields.baselineEndDate !== null) {
24603
- 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];
24604
25152
  }
24605
25153
  if (this.parent.taskFields.baselineStartDate !== null) {
24606
- 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];
24607
25155
  }
24608
25156
  if (this.parent.taskFields.resourceInfo !== null) {
24609
- 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];
24610
25158
  }
24611
25159
  }
24612
25160
  this.saveSuccess(args);
@@ -24675,6 +25223,14 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
24675
25223
  }
24676
25224
  if (!this.isTreeGridRefresh) {
24677
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
+ }
24678
25234
  if (this.parent.isConnectorLineUpdate && !isNullOrUndefined(this.parent.connectorLineEditModule)) {
24679
25235
  this.parent.updatedConnectorLineCollection = [];
24680
25236
  this.parent.connectorLineIds = [];
@@ -25590,15 +26146,24 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25590
26146
  if (parentTask && parentTask.ganttProperties.taskName !==
25591
26147
  this_2.parent.localeObj.getConstant('unassignedTask') && isDuplicate.length === 0) {
25592
26148
  this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
25593
- if (parentTask) {
25594
- this_2.parent.dataOperation.updateParentItems(updateUnAssignedResources_1[i].parentItem);
25595
- }
25596
26149
  }
25597
26150
  else if (!parentTask && (!isDuplicate || isDuplicate.length === 0)) {
25598
26151
  this_2.checkWithUnassignedTask(updateUnAssignedResources_1[i]);
25599
- if (updateUnAssignedResources_1[i].parentItem && unassignedTask) {
25600
- 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;
26160
+ }
26161
+ else {
26162
+ return null;
25601
26163
  }
26164
+ });
26165
+ if (parentItem[0]) {
26166
+ this_2.parent.dataOperation.updateParentItems(parentItem[0]);
25602
26167
  }
25603
26168
  };
25604
26169
  var this_2 = this;
@@ -26208,7 +26773,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
26208
26773
  if (!isNullOrUndefined(ganttData)) {
26209
26774
  _this.validateUpdateValues(args.newTaskData, ganttData, true);
26210
26775
  }
26211
- if (!isNullOrUndefined(args.data[tempTaskID])) {
26776
+ if (!isNullOrUndefined(args.data["" + tempTaskID])) {
26212
26777
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
26213
26778
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
26214
26779
  args.newTaskData[tempTaskID] = args.data[tempTaskID];
@@ -26223,11 +26788,11 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
26223
26788
  };
26224
26789
  var prevID_1 = args.data.ganttProperties.taskId.toString();
26225
26790
  /* tslint:disable-next-line */
26226
- var query_2 = _this.parent.query instanceof Query ? _this.parent.query : new Query();
26791
+ var query = _this.parent.query instanceof Query ? _this.parent.query : new Query();
26227
26792
  var adaptor = data_2.adaptor;
26228
26793
  if (!(adaptor instanceof WebApiAdaptor && adaptor instanceof ODataAdaptor) || data_2.dataSource.batchUrl) {
26229
26794
  /* tslint:disable-next-line */
26230
- var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query_2);
26795
+ var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query);
26231
26796
  crud.then(function (e) {
26232
26797
  if (_this.parent.taskFields.id && !isNullOrUndefined(e.addedRecords[0][_this.parent.taskFields.id]) &&
26233
26798
  e.addedRecords[0][_this.parent.taskFields.id].toString() == prevID_1) {
@@ -26249,9 +26814,8 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
26249
26814
  }
26250
26815
  else {
26251
26816
  var addedRecords = 'addedRecords';
26252
- var insertCrud = data_2.insert(updatedData_2[addedRecords], null, query_2);
26817
+ var insertCrud = data_2.insert(updatedData_2[addedRecords], null, query);
26253
26818
  insertCrud.then(function (e) {
26254
- var changedRecords = 'changedRecords';
26255
26819
  var addedRecords;
26256
26820
  if (!isNullOrUndefined(e[0])) {
26257
26821
  addedRecords = e[0];
@@ -26259,26 +26823,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
26259
26823
  else {
26260
26824
  addedRecords = updatedData_2['addedRecords'][0];
26261
26825
  }
26262
- /* tslint:disable-next-line */
26263
- var updateCrud = data_2.update(_this.parent.taskFields.id, updatedData_2[changedRecords], null, query_2);
26264
- updateCrud.then(function () {
26265
- if (_this.parent.taskFields.id && !isNullOrUndefined(addedRecords[_this.parent.taskFields.id]) &&
26266
- addedRecords[_this.parent.taskFields.id].toString() !== prevID_1) {
26267
- _this.parent.setRecordValue('taskId', addedRecords[_this.parent.taskFields.id], args.data.ganttProperties, true);
26268
- _this.parent.setRecordValue('taskData.' + _this.parent.taskFields.id, addedRecords[_this.parent.taskFields.id], args.data);
26269
- _this.parent.setRecordValue(_this.parent.taskFields.id, addedRecords[_this.parent.taskFields.id], args.data);
26270
- _this.parent.setRecordValue('rowUniqueID', addedRecords[_this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
26271
- var idIndex = _this.parent.ids.indexOf(prevID_1);
26272
- if (idIndex !== -1) {
26273
- _this.parent.ids[idIndex] = addedRecords[_this.parent.taskFields.id].toString();
26274
- }
26275
- }
26276
- _this.updateNewRecord(cAddedRecord_1, args);
26277
- }).catch(function (e) {
26278
- _this.removeAddedRecord();
26279
- _this.dmFailure(e, args);
26280
- _this._resetProperties();
26281
- });
26826
+ _this.updateNewRecord(cAddedRecord_1, args);
26282
26827
  }).catch(function (e) {
26283
26828
  _this.removeAddedRecord();
26284
26829
  _this.dmFailure(e, args);
@@ -27514,9 +28059,95 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
27514
28059
  }
27515
28060
  }
27516
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
+ };
27517
28128
  Filter$$1.prototype.updateFilterMenuPosition = function (element, args) {
27518
28129
  addClass([element], 'e-gantt');
27519
- 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
+ }
27520
28151
  if (this.parent.treeGrid.filterSettings.type === 'Menu') {
27521
28152
  element.querySelector('.e-valid-input').focus();
27522
28153
  }
@@ -27934,7 +28565,10 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
27934
28565
  var rIndex = parseInt(selectedRow.getAttribute('aria-rowindex'), 10);
27935
28566
  var isToggle = this.parent.selectionSettings.enableToggle;
27936
28567
  if (this.parent.selectionSettings.type === 'Single' || (!this.isMultiCtrlRequest && !this.isMultiShiftRequest)) {
27937
- 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
+ }
27938
28572
  }
27939
28573
  else {
27940
28574
  if (this.isMultiShiftRequest) {
@@ -27978,7 +28612,7 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
27978
28612
  };
27979
28613
  Selection$$1.prototype.addRemoveClass = function (records) {
27980
28614
  if (typeof (records) == "number") {
27981
- records = Array.from(String(records), function (num) { return Number(num); });
28615
+ records = [records];
27982
28616
  }
27983
28617
  var ganttRow = [].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector('tbody').children);
27984
28618
  var _loop_1 = function (i) {
@@ -28764,6 +29398,9 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
28764
29398
  });
28765
29399
  var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
28766
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
+ }
28767
29404
  holidayDiv.appendChild(spanElement);
28768
29405
  if (this.parent.holidays[i].cssClass) {
28769
29406
  holidayDiv.classList.add(this.parent.holidays[i].cssClass);
@@ -28950,6 +29587,9 @@ var EventMarker$1 = /** @__PURE__ @class */ (function () {
28950
29587
  });
28951
29588
  var property = this.parent.disableHtmlEncode ? 'textContent' : 'innerHTML';
28952
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
+ }
28953
29593
  if (this.parent.enableRtl) {
28954
29594
  spanElement.style.right = '5px';
28955
29595
  }
@@ -29751,10 +30391,10 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
29751
30391
  var _loop_2 = function (i) {
29752
30392
  var criticalData;
29753
30393
  if (this_2.parent.viewType === 'ProjectView') {
29754
- criticalData = this_2.parent.currentViewData[this_2.parent.ids.indexOf(criticalPathIds[i].toString())];
30394
+ criticalData = this_2.parent.flatData[this_2.parent.ids.indexOf(criticalPathIds[i].toString())];
29755
30395
  }
29756
30396
  else {
29757
- var currentRecords = this_2.parent.currentViewData.filter(function (data) {
30397
+ var currentRecords = this_2.parent.flatData.filter(function (data) {
29758
30398
  return (data.ganttProperties.taskId).toString() === criticalPathIds[i].toString();
29759
30399
  });
29760
30400
  for (var i_1 = 0; i_1 < currentRecords.length; i_1++) {
@@ -29767,16 +30407,18 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
29767
30407
  var element = this_2.parent.getRowByIndex(index);
29768
30408
  var taskClass = void 0;
29769
30409
  var columnFields = this_2.parent.taskFields;
29770
- if (criticalData.parentItem) {
30410
+ if (criticalData && criticalData.parentItem) {
29771
30411
  var parentRecord = this_2.parent.currentViewData.filter(function (data) {
29772
30412
  return criticalData.parentItem.uniqueID === data.uniqueID;
29773
30413
  });
29774
- var parentIndex = this_2.parent.currentViewData.indexOf(parentRecord[0]);
30414
+ var parentIndex = this_2.parent.flatData.indexOf(parentRecord[0]);
29775
30415
  var parentElement = this_2.parent.getRowByIndex(parentIndex);
29776
- var parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
29777
- for (var i_2 = 0; i_2 < parentTaskbarElement.length; i_2++) {
29778
- if (parentTaskbarElement[i_2].getAttribute('rowuniqueid') === criticalData['rowUniqueID']) {
29779
- addClass(parentTaskbarElement[i_2].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
30416
+ if (parentElement) {
30417
+ var parentTaskbarElement = parentElement.querySelectorAll('.e-taskbar-main-container');
30418
+ for (var i_2 = 0; i_2 < parentTaskbarElement.length; i_2++) {
30419
+ if (parentTaskbarElement[i_2].getAttribute('rowuniqueid') === criticalData['rowUniqueID']) {
30420
+ addClass(parentTaskbarElement[i_2].querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
30421
+ }
29780
30422
  }
29781
30423
  }
29782
30424
  }
@@ -30195,7 +30837,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30195
30837
  this.parent.selectionModule.selectRow(rowIndex);
30196
30838
  }
30197
30839
  if (!args.parentItem) {
30198
- this.rowData = this.parent.updatedRecords[rowIndex];
30840
+ this.rowData = this.parent.updatedRecords[parseInt(rowIndex.toString(), 10)];
30199
30841
  }
30200
30842
  for (var _i = 0, _a = args.items; _i < _a.length; _i++) {
30201
30843
  var item = _a[_i];
@@ -30327,7 +30969,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30327
30969
  this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
30328
30970
  var prevRecord = this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0] - 1];
30329
30971
  if (!this.parent.editSettings.allowEditing || index === 0 || index === -1 || !isSelected ||
30330
- 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) {
30331
30973
  this.updateItemVisibility(item.text);
30332
30974
  }
30333
30975
  }
@@ -30343,7 +30985,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30343
30985
  var isSelect = this.parent.selectionModule ? this.parent.selectionModule.selectedRowIndexes.length === 1 ||
30344
30986
  this.parent.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
30345
30987
  if (!this.parent.editSettings.allowEditing || ind === -1 || ind === 0 || !isSelect ||
30346
- this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[ind].level === 0) {
30988
+ this.parent.viewType === 'ResourceView' || this.parent.updatedRecords[parseInt(ind.toString(), 10)].level === 0) {
30347
30989
  this.updateItemVisibility(item.text);
30348
30990
  }
30349
30991
  }
@@ -30353,7 +30995,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30353
30995
  {
30354
30996
  var taskSettings = this.parent.taskFields;
30355
30997
  if (this.parent.readOnly || !taskbarElement || isNullOrUndefined(taskSettings.segments) ||
30356
- this.parent.currentViewData[rowIndex].hasChildRecords) {
30998
+ this.parent.currentViewData[parseInt(rowIndex.toString(), 10)].hasChildRecords) {
30357
30999
  this.updateItemVisibility(item.text);
30358
31000
  }
30359
31001
  break;
@@ -30558,7 +31200,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
30558
31200
  };
30559
31201
  ContextMenu$$1.prototype.contextMenuOnClose = function (args) {
30560
31202
  var parent = 'parentObj';
30561
- 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) {
30562
31204
  this.revertItemStatus();
30563
31205
  }
30564
31206
  };
@@ -31051,7 +31693,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
31051
31693
  parentUniqueID = this.droppedRecord.uniqueID;
31052
31694
  }
31053
31695
  else {
31054
- parentUniqueID = this.droppedRecord.parentItem.uniqueID;
31696
+ parentUniqueID = this.droppedRecord.parentItem ? this.droppedRecord.parentItem.uniqueID : this.droppedRecord.uniqueID;
31055
31697
  }
31056
31698
  var droppedParentItem = this.parent.getTaskByUniqueID(parentUniqueID);
31057
31699
  var editedObj = {};
@@ -31078,7 +31720,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
31078
31720
  this.updateSharedResourceTask();
31079
31721
  }
31080
31722
  }
31081
- if (this.parent.taskFields.dependency) {
31723
+ if (this.parent.taskFields.dependency && this.parent.allowParentDependency) {
31082
31724
  var isValidPredecessor = true;
31083
31725
  var draggedParent = void 0;
31084
31726
  var toParent_1;
@@ -34380,6 +35022,12 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
34380
35022
  cell.style.padding.bottom = padding - style.fontSize;
34381
35023
  cell.style.padding.left = 10;
34382
35024
  cell.style.padding.right = 10;
35025
+ if (style.padding) {
35026
+ cell.style.padding = style.padding;
35027
+ }
35028
+ if (style.borders) {
35029
+ cell.style.borders = style.borders;
35030
+ }
34383
35031
  };
34384
35032
  /**
34385
35033
  * @param {PdfDocument} pdfDoc .
@@ -35837,8 +36485,9 @@ var PdfExport = /** @__PURE__ @class */ (function () {
35837
36485
  * @param {object} pdfDoc .
35838
36486
  * @returns {Promise<Object>} .
35839
36487
  */
35840
- PdfExport.prototype.export = function (pdfExportProperties, isMultipleExport, pdfDoc) {
36488
+ PdfExport.prototype.export = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
35841
36489
  var _this = this;
36490
+ this.isBlob = isBlob;
35842
36491
  var args = {
35843
36492
  requestType: 'beforePdfExport',
35844
36493
  ganttObject: this.parent,
@@ -35882,7 +36531,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
35882
36531
  this.pdfDocument = new PdfDocument();
35883
36532
  }
35884
36533
  this.processExport(data, pdfExportProperties, isMultipleExport).then(function () {
35885
- _this.parent.trigger('pdfExportComplete', {});
36534
+ _this.parent.trigger('pdfExportComplete', _this.isBlob ? { promise: _this.blobPromise } : {});
35886
36535
  if (!isNullOrUndefined(_this.parent.loadingIndicator) && _this.parent.loadingIndicator.indicatorType === "Shimmer") {
35887
36536
  _this.parent.hideMaskRow();
35888
36537
  }
@@ -35908,12 +36557,17 @@ var PdfExport = /** @__PURE__ @class */ (function () {
35908
36557
  var layouter = _this.gantt.drawGrid(pdfPage, 0, 0, format);
35909
36558
  _this.gantt.drawChart(layouter);
35910
36559
  if (!isMultipleExport) {
35911
- // save the PDF
35912
- if (!isNullOrUndefined(pdfExportProperties) && pdfExportProperties.fileName) {
35913
- _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
+ }
35914
36568
  }
35915
36569
  else {
35916
- _this.pdfDocument.save('Export.pdf');
36570
+ _this.blobPromise = _this.pdfDocument.save();
35917
36571
  }
35918
36572
  _this.pdfDocument.destroy();
35919
36573
  }