@syncfusion/ej2-gantt 20.4.54 → 21.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/ej2-gantt.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js +2 -2
  5. package/dist/ej2-gantt.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es2015.js +1086 -419
  7. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  8. package/dist/es6/ej2-gantt.es5.js +1064 -397
  9. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  10. package/dist/global/ej2-gantt.min.js +2 -2
  11. package/dist/global/ej2-gantt.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +20 -20
  14. package/src/gantt/actions/cell-edit.js +8 -6
  15. package/src/gantt/actions/chart-scroll.d.ts +1 -0
  16. package/src/gantt/actions/chart-scroll.js +15 -4
  17. package/src/gantt/actions/connector-line-edit.js +39 -28
  18. package/src/gantt/actions/context-menu.js +5 -5
  19. package/src/gantt/actions/dependency.js +28 -12
  20. package/src/gantt/actions/dialog-edit.js +41 -21
  21. package/src/gantt/actions/edit.js +51 -30
  22. package/src/gantt/actions/filter.d.ts +2 -1
  23. package/src/gantt/actions/filter.js +88 -2
  24. package/src/gantt/actions/keyboard.js +0 -1
  25. package/src/gantt/actions/pdf-export.d.ts +3 -1
  26. package/src/gantt/actions/pdf-export.js +12 -6
  27. package/src/gantt/actions/rowdragdrop.js +2 -2
  28. package/src/gantt/actions/selection.js +5 -2
  29. package/src/gantt/actions/taskbar-edit.d.ts +5 -0
  30. package/src/gantt/actions/taskbar-edit.js +114 -10
  31. package/src/gantt/base/date-processor.js +78 -52
  32. package/src/gantt/base/gantt-chart.js +20 -4
  33. package/src/gantt/base/gantt-model.d.ts +43 -0
  34. package/src/gantt/base/gantt.d.ts +39 -1
  35. package/src/gantt/base/gantt.js +78 -33
  36. package/src/gantt/base/interface.d.ts +2 -0
  37. package/src/gantt/base/task-processor.js +135 -98
  38. package/src/gantt/base/tree-grid.js +31 -1
  39. package/src/gantt/base/utils.js +1 -1
  40. package/src/gantt/renderer/chart-rows.d.ts +2 -0
  41. package/src/gantt/renderer/chart-rows.js +156 -24
  42. package/src/gantt/renderer/connector-line.js +50 -20
  43. package/src/gantt/renderer/edit-tooltip.js +0 -3
  44. package/src/gantt/renderer/event-marker.js +4 -1
  45. package/src/gantt/renderer/nonworking-day.js +4 -1
  46. package/src/gantt/renderer/timeline.js +3 -3
  47. package/src/gantt/renderer/tooltip.js +101 -33
  48. package/styles/bootstrap-dark.css +33 -10
  49. package/styles/bootstrap.css +31 -10
  50. package/styles/bootstrap4.css +28 -7
  51. package/styles/bootstrap5-dark.css +30 -9
  52. package/styles/bootstrap5.css +30 -9
  53. package/styles/fabric-dark.css +28 -7
  54. package/styles/fabric.css +28 -7
  55. package/styles/fluent-dark.css +56 -29
  56. package/styles/fluent.css +56 -29
  57. package/styles/gantt/_bootstrap-dark-definition.scss +5 -4
  58. package/styles/gantt/_bootstrap-definition.scss +5 -4
  59. package/styles/gantt/_bootstrap4-definition.scss +3 -2
  60. package/styles/gantt/_bootstrap5-definition.scss +15 -14
  61. package/styles/gantt/_fabric-dark-definition.scss +3 -2
  62. package/styles/gantt/_fabric-definition.scss +3 -2
  63. package/styles/gantt/_fluent-definition.scss +18 -17
  64. package/styles/gantt/_fusionnew-definition.scss +5 -4
  65. package/styles/gantt/_highcontrast-definition.scss +3 -2
  66. package/styles/gantt/_highcontrast-light-definition.scss +3 -2
  67. package/styles/gantt/_layout.scss +45 -13
  68. package/styles/gantt/_material-dark-definition.scss +3 -2
  69. package/styles/gantt/_material-definition.scss +3 -2
  70. package/styles/gantt/_tailwind-definition.scss +9 -8
  71. package/styles/gantt/_theme.scss +25 -6
  72. package/styles/gantt/bootstrap-dark.css +33 -10
  73. package/styles/gantt/bootstrap.css +31 -10
  74. package/styles/gantt/bootstrap4.css +28 -7
  75. package/styles/gantt/bootstrap5-dark.css +30 -9
  76. package/styles/gantt/bootstrap5.css +30 -9
  77. package/styles/gantt/fabric-dark.css +28 -7
  78. package/styles/gantt/fabric.css +28 -7
  79. package/styles/gantt/fluent-dark.css +56 -29
  80. package/styles/gantt/fluent.css +56 -29
  81. package/styles/gantt/highcontrast-light.css +28 -9
  82. package/styles/gantt/highcontrast.css +28 -7
  83. package/styles/gantt/material-dark.css +31 -14
  84. package/styles/gantt/material.css +28 -7
  85. package/styles/gantt/tailwind-dark.css +28 -7
  86. package/styles/gantt/tailwind.css +28 -7
  87. package/styles/highcontrast-light.css +28 -9
  88. package/styles/highcontrast.css +28 -7
  89. package/styles/material-dark.css +31 -14
  90. package/styles/material.css +28 -7
  91. package/styles/tailwind-dark.css +28 -7
  92. package/styles/tailwind.css +28 -7
  93. package/styles/gantt/_material3-definition.scss +0 -218
@@ -57,32 +57,37 @@ var DateProcessor = /** @class */ (function () {
57
57
  }
58
58
  }
59
59
  var tStartDate;
60
- do {
61
- tStartDate = new Date(cloneStartDate.getTime());
62
- var holidayLength = this.parent.totalHolidayDates.length;
63
- // check holidays and weekends
64
- if (this.isValidateNonWorkDays(ganttProp)) {
65
- var startTime = (!validateAsMilestone || isLoad) ? this.parent.defaultStartTime : this.parent.defaultEndTime;
66
- if (!this.parent.includeWeekend) {
67
- var tempDate = new Date(cloneStartDate.getTime());
68
- cloneStartDate = this.getNextWorkingDay(cloneStartDate);
69
- if (tempDate.getTime() !== cloneStartDate.getTime()) {
70
- this.setTime(startTime, cloneStartDate);
60
+ if (this.parent.autoCalculateDateScheduling) {
61
+ do {
62
+ tStartDate = new Date(cloneStartDate.getTime());
63
+ var holidayLength = this.parent.totalHolidayDates.length;
64
+ // check holidays and weekends
65
+ if (this.isValidateNonWorkDays(ganttProp)) {
66
+ var startTime = (!validateAsMilestone || isLoad) ? this.parent.defaultStartTime : this.parent.defaultEndTime;
67
+ if (!this.parent.includeWeekend) {
68
+ var tempDate = new Date(cloneStartDate.getTime());
69
+ cloneStartDate = this.getNextWorkingDay(cloneStartDate);
70
+ if (tempDate.getTime() !== cloneStartDate.getTime()) {
71
+ this.setTime(startTime, cloneStartDate);
72
+ }
71
73
  }
72
- }
73
- for (var count = 0; count < holidayLength; count++) {
74
- var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
75
- var holidayTo = new Date(holidayFrom.getTime());
76
- holidayFrom.setHours(0, 0, 0, 0);
77
- holidayTo.setHours(23, 59, 59, 59);
78
- if (cloneStartDate.getTime() >= holidayFrom.getTime() && cloneStartDate.getTime() < holidayTo.getTime()) {
79
- cloneStartDate.setDate(cloneStartDate.getDate() + 1);
80
- this.setTime(startTime, cloneStartDate);
74
+ for (var count = 0; count < holidayLength; count++) {
75
+ var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
76
+ var holidayTo = new Date(holidayFrom.getTime());
77
+ holidayFrom.setHours(0, 0, 0, 0);
78
+ holidayTo.setHours(23, 59, 59, 59);
79
+ if (cloneStartDate.getTime() >= holidayFrom.getTime() && cloneStartDate.getTime() < holidayTo.getTime()) {
80
+ cloneStartDate.setDate(cloneStartDate.getDate() + 1);
81
+ this.setTime(startTime, cloneStartDate);
82
+ }
81
83
  }
82
84
  }
83
- }
84
- } while (tStartDate.getTime() !== cloneStartDate.getTime());
85
- return new Date(cloneStartDate.getTime());
85
+ } while (tStartDate.getTime() !== cloneStartDate.getTime());
86
+ return new Date(cloneStartDate.getTime());
87
+ }
88
+ else {
89
+ return new Date(cloneStartDate.getTime());
90
+ }
86
91
  };
87
92
  /**
88
93
  * To update given date value to valid end date
@@ -117,36 +122,44 @@ var DateProcessor = /** @class */ (function () {
117
122
  }
118
123
  }
119
124
  var tempCheckDate;
120
- do {
121
- tempCheckDate = new Date(cloneEndDate.getTime());
122
- var holidayLength = this.parent.totalHolidayDates.length;
123
- if (this.isValidateNonWorkDays(ganttProp)) {
124
- if (!this.parent.includeWeekend) {
125
- var tempDate = new Date(cloneEndDate.getTime());
126
- cloneEndDate = this.getPreviousWorkingDay(cloneEndDate);
127
- if (tempDate.getTime() !== cloneEndDate.getTime()) {
128
- this.setTime(this.parent.defaultEndTime, cloneEndDate);
129
- }
130
- }
131
- for (var count = 0; count < holidayLength; count++) {
132
- var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
133
- var holidayTo = new Date(holidayFrom.getTime());
134
- var tempHoliday = new Date(cloneEndDate.getTime());
135
- tempHoliday.setMinutes(cloneEndDate.getMilliseconds() - 2);
136
- holidayFrom.setHours(0, 0, 0, 0);
137
- holidayTo.setHours(23, 59, 59, 59);
138
- if (cloneEndDate.getTime() >= holidayFrom.getTime() && cloneEndDate.getTime() < holidayTo.getTime() ||
139
- tempHoliday.getTime() >= holidayFrom.getTime() && tempHoliday.getTime() < holidayTo.getTime()) {
140
- cloneEndDate.setDate(cloneEndDate.getDate() - 1);
141
- if (!(cloneEndDate.getTime() === holidayFrom.getTime() && this.parent.defaultEndTime === 86400 &&
142
- this.getSecondsInDecimal(cloneEndDate) === 0)) {
125
+ if (this.parent.autoCalculateDateScheduling) {
126
+ do {
127
+ tempCheckDate = new Date(cloneEndDate.getTime());
128
+ var holidayLength = this.parent.totalHolidayDates.length;
129
+ if (this.isValidateNonWorkDays(ganttProp)) {
130
+ if (!this.parent.includeWeekend) {
131
+ var tempDate = new Date(cloneEndDate.getTime());
132
+ cloneEndDate = this.getPreviousWorkingDay(cloneEndDate);
133
+ if (tempDate.getTime() !== cloneEndDate.getTime()) {
143
134
  this.setTime(this.parent.defaultEndTime, cloneEndDate);
144
135
  }
145
136
  }
137
+ for (var count = 0; count < holidayLength; count++) {
138
+ var holidayFrom = this.getDateFromFormat(new Date(this.parent.totalHolidayDates[count]));
139
+ var holidayTo = new Date(holidayFrom.getTime());
140
+ var tempHoliday = new Date(cloneEndDate.getTime());
141
+ tempHoliday.setMinutes(cloneEndDate.getMilliseconds() - 2);
142
+ holidayFrom.setHours(0, 0, 0, 0);
143
+ holidayTo.setHours(23, 59, 59, 59);
144
+ if (cloneEndDate.getTime() >= holidayFrom.getTime() && cloneEndDate.getTime() < holidayTo.getTime() ||
145
+ tempHoliday.getTime() >= holidayFrom.getTime() && tempHoliday.getTime() < holidayTo.getTime()) {
146
+ cloneEndDate.setDate(cloneEndDate.getDate() - 1);
147
+ if (!(cloneEndDate.getTime() === holidayFrom.getTime() && this.parent.defaultEndTime === 86400 &&
148
+ this.getSecondsInDecimal(cloneEndDate) === 0)) {
149
+ this.setTime(this.parent.defaultEndTime, cloneEndDate);
150
+ }
151
+ }
152
+ }
146
153
  }
154
+ } while (tempCheckDate.getTime() !== cloneEndDate.getTime());
155
+ return new Date(cloneEndDate.getTime());
156
+ }
157
+ else {
158
+ if (!isNullOrUndefined(cloneEndDate)) {
159
+ this.setTime(this.parent.defaultEndTime, cloneEndDate);
147
160
  }
148
- } while (tempCheckDate.getTime() !== cloneEndDate.getTime());
149
- return new Date(cloneEndDate.getTime());
161
+ return new Date(cloneEndDate.getTime());
162
+ }
150
163
  };
151
164
  /**
152
165
  * To validate the baseline start date
@@ -261,6 +274,13 @@ var DateProcessor = /** @class */ (function () {
261
274
  }
262
275
  this.parent.setRecordValue('endDate', tempEndDate, ganttProp, true);
263
276
  }
277
+ else {
278
+ tempEndDate = ganttData[this.parent.taskFields.endDate];
279
+ if (!isNullOrUndefined(tempEndDate)) {
280
+ this.setTime(this.parent.defaultEndTime, tempEndDate);
281
+ }
282
+ this.parent.setRecordValue('endDate', tempEndDate, ganttProp, true);
283
+ }
264
284
  if (this.parent.taskFields.endDate) {
265
285
  this.parent.dataOperation.updateMappingData(ganttData, 'endDate');
266
286
  }
@@ -327,9 +347,9 @@ var DateProcessor = /** @class */ (function () {
327
347
  */
328
348
  DateProcessor.prototype.getNonworkingTime = function (sDate, eDate, isAutoSchedule, isCheckTimeZone) {
329
349
  isCheckTimeZone = isNullOrUndefined(isCheckTimeZone) ? true : isCheckTimeZone;
330
- var weekendCount = !this.parent.includeWeekend && isAutoSchedule ? this.getWeekendCount(sDate, eDate) : 0;
350
+ var weekendCount = (!this.parent.includeWeekend && this.parent.autoCalculateDateScheduling) && isAutoSchedule ? this.getWeekendCount(sDate, eDate) : 0;
331
351
  var totalHours = this.getNumberOfSeconds(sDate, eDate, isCheckTimeZone);
332
- var holidaysCount = isAutoSchedule ? this.getHolidaysCount(sDate, eDate) : 0;
352
+ var holidaysCount = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.getHolidaysCount(sDate, eDate) : 0;
333
353
  var totWorkDays = (totalHours - (weekendCount * 86400) - (holidaysCount * 86400)) / 86400; // working days between two dates
334
354
  var nonWorkHours = this.getNonWorkingSecondsOnDate(sDate, eDate, isAutoSchedule);
335
355
  var totalNonWorkTime = (totWorkDays * (86400 - this.parent.secondsPerDay)) +
@@ -521,6 +541,9 @@ var DateProcessor = /** @class */ (function () {
521
541
  if (!isNullOrUndefined(data.ganttProperties.startDate))
522
542
  sDate = data.ganttProperties.startDate;
523
543
  }
544
+ else {
545
+ sDate = _this.getProjectStartDate(ganttProp);
546
+ }
524
547
  });
525
548
  }
526
549
  else {
@@ -799,6 +822,9 @@ var DateProcessor = /** @class */ (function () {
799
822
  /*Check given date is on holidays*/
800
823
  DateProcessor.prototype.isOnHolidayOrWeekEnd = function (date, checkWeekEnd) {
801
824
  checkWeekEnd = !isNullOrUndefined(checkWeekEnd) ? checkWeekEnd : this.parent.includeWeekend;
825
+ if (!this.parent.autoCalculateDateScheduling) {
826
+ checkWeekEnd = true;
827
+ }
802
828
  if (!checkWeekEnd && this.parent.nonWorkingDayIndex.indexOf(date.getDay()) !== -1) {
803
829
  return true;
804
830
  }
@@ -828,8 +854,8 @@ var DateProcessor = /** @class */ (function () {
828
854
  var startRangeIndex = -1;
829
855
  var endRangeIndex = -1;
830
856
  var totNonWrkSecs = 0;
831
- var startOnHoliday = isAutoSchedule ? this.isOnHolidayOrWeekEnd(startDate, null) : false;
832
- var endOnHoliday = isAutoSchedule ? this.isOnHolidayOrWeekEnd(endDate, null) : false;
857
+ var startOnHoliday = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.isOnHolidayOrWeekEnd(startDate, null) : false;
858
+ var endOnHoliday = isAutoSchedule && this.parent.autoCalculateDateScheduling ? this.isOnHolidayOrWeekEnd(endDate, null) : false;
833
859
  for (var i = 0; i < this.parent.nonWorkingTimeRanges.length; i++) {
834
860
  var val = this.parent.nonWorkingTimeRanges[i];
835
861
  if (sHour >= val.from && sHour <= val.to) {
@@ -101,9 +101,11 @@ var GanttChart = /** @class */ (function () {
101
101
  }
102
102
  else {
103
103
  if (this.parent.viewType === 'ProjectView') {
104
- this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[1].setAttribute('tabindex', '-1');
104
+ if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody.children[parseInt(i.toString(), 10)].children[0].children[1].children[1])) {
105
+ this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[1].setAttribute('tabindex', '-1');
106
+ }
105
107
  }
106
- else if (this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[0]) {
108
+ else if (this.parent.chartRowsModule.ganttChartTableBody.children[parseInt(i.toString(), 10)].children[0].children[1].children[0]) {
107
109
  this.parent.chartRowsModule.ganttChartTableBody.children[i].children[0].children[1].children[0].setAttribute('tabindex', '-1');
108
110
  }
109
111
  }
@@ -156,7 +158,14 @@ var GanttChart = /** @class */ (function () {
156
158
  Math.floor((this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight));
157
159
  };
158
160
  GanttChart.prototype.renderRange = function (rangeCollection, currentRecord) {
159
- var topValue = this.getTopValue(currentRecord);
161
+ var topValue = 0;
162
+ var rowIndex = this.parent.currentViewData.indexOf(currentRecord);
163
+ if (!this.parent.allowTaskbarOverlap && this.parent.enableMultiTaskbar) {
164
+ topValue = !currentRecord.expanded ? this.parent.getRowByIndex(rowIndex).offsetTop : this.parent.getRowByIndex(rowIndex).offsetTop + this.parent.rowHeight;
165
+ }
166
+ else {
167
+ topValue = this.getTopValue(currentRecord);
168
+ }
160
169
  var sameIDElement = this.rangeViewContainer.querySelector('.' + 'rangeContainer' + currentRecord.ganttProperties.rowUniqueID);
161
170
  if (sameIDElement) {
162
171
  sameIDElement.remove();
@@ -169,7 +178,14 @@ var GanttChart = /** @class */ (function () {
169
178
  return;
170
179
  }
171
180
  for (var i = 0; i < rangeCollection.length; i++) {
172
- var height = this.getRangeHeight(currentRecord);
181
+ var height = void 0;
182
+ if (!this.parent.allowTaskbarOverlap && !currentRecord.expanded && this.parent.enableMultiTaskbar) {
183
+ height = parseInt(this.parent.chartRowsModule.ganttChartTableBody.childNodes[rowIndex].style.height) -
184
+ (this.parent.rowHeight - this.parent.chartRowsModule.taskBarHeight);
185
+ }
186
+ else {
187
+ height = this.getRangeHeight(currentRecord);
188
+ }
173
189
  var leftDiv = createElement('div', {
174
190
  className: cls.rangeChildContainer + ' ' + 'e-leftarc', styles: (this.parent.enableRtl ? 'right:' : 'left:') +
175
191
  ((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")
@@ -21,6 +21,21 @@ export interface GanttModel extends ComponentModel{
21
21
  */
22
22
  enableImmutableMode?: boolean;
23
23
 
24
+ /**
25
+ * Specifies whether to allow dependency connection support for parent records.
26
+ *
27
+ * @default true
28
+ */
29
+ allowParentDependency?: boolean;
30
+
31
+ /**
32
+ * Specifies whether to display or remove the untrusted HTML values in the TreeGrid component.
33
+      * If `enableHtmlSanitizer` set to true, then it will sanitize any suspected untrusted strings and scripts before rendering them.
34
+ *
35
+ * @default false
36
+ */
37
+ enableHtmlSanitizer?: boolean;
38
+
24
39
  /**
25
40
  * If `disableHtmlEncode` is set to true, it encodes the HTML of the header and content cells.
26
41
  *
@@ -42,6 +57,20 @@ export interface GanttModel extends ComponentModel{
42
57
  */
43
58
  enableVirtualMaskRow?: boolean;
44
59
 
60
+ /**
61
+ * Specifies whether to update offset value on a task for all the predecessor edit actions.
62
+ *
63
+ * @default true
64
+ */
65
+ UpdateOffsetOnTaskbarEdit?: boolean;
66
+
67
+ /**
68
+ * Specifies whether to auto calculate start and end-date based on various factors such as working time, holidays, weekends, and predecessors.
69
+ *
70
+ * @default true
71
+ */
72
+ autoCalculateDateScheduling?: boolean;
73
+
45
74
  /**
46
75
  * Enables or disables the focusing the task bar on click action.
47
76
  *
@@ -168,6 +197,20 @@ export interface GanttModel extends ComponentModel{
168
197
  */
169
198
  renderBaseline?: boolean;
170
199
 
200
+ /**
201
+ * Defines whether to enable or disable taskbar drag and drop.
202
+ *
203
+ * @default false
204
+ */
205
+ allowTaskbarDragAndDrop?: boolean;
206
+
207
+ /**
208
+ * Defines whether taskbar to get overlapped or not.
209
+ *
210
+ * @default true
211
+ */
212
+ allowTaskbarOverlap?: boolean;
213
+
171
214
  /**
172
215
  * Configures the grid lines in tree grid and gantt chart.
173
216
  *
@@ -316,6 +316,19 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
316
316
  * @default false
317
317
  */
318
318
  enableImmutableMode: boolean;
319
+ /**
320
+ * Specifies whether to allow dependency connection support for parent records.
321
+ *
322
+ * @default true
323
+ */
324
+ allowParentDependency: boolean;
325
+ /**
326
+ * Specifies whether to display or remove the untrusted HTML values in the TreeGrid component.
327
+ * If `enableHtmlSanitizer` set to true, then it will sanitize any suspected untrusted strings and scripts before rendering them.
328
+ *
329
+ * @default false
330
+ */
331
+ enableHtmlSanitizer: boolean;
319
332
  /**
320
333
  * If `disableHtmlEncode` is set to true, it encodes the HTML of the header and content cells.
321
334
  *
@@ -334,6 +347,18 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
334
347
  * @default true
335
348
  */
336
349
  enableVirtualMaskRow: boolean;
350
+ /**
351
+ * Specifies whether to update offset value on a task for all the predecessor edit actions.
352
+ *
353
+ * @default true
354
+ */
355
+ UpdateOffsetOnTaskbarEdit: boolean;
356
+ /**
357
+ * Specifies whether to auto calculate start and end-date based on various factors such as working time, holidays, weekends, and predecessors.
358
+ *
359
+ * @default true
360
+ */
361
+ autoCalculateDateScheduling: boolean;
337
362
  /**
338
363
  * Enables or disables the focusing the task bar on click action.
339
364
  *
@@ -444,6 +469,18 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
444
469
  * @default false
445
470
  */
446
471
  renderBaseline: boolean;
472
+ /**
473
+ * Defines whether to enable or disable taskbar drag and drop.
474
+ *
475
+ * @default false
476
+ */
477
+ allowTaskbarDragAndDrop: boolean;
478
+ /**
479
+ * Defines whether taskbar to get overlapped or not.
480
+ *
481
+ * @default true
482
+ */
483
+ allowTaskbarOverlap: boolean;
447
484
  /**
448
485
  * Configures the grid lines in tree grid and gantt chart.
449
486
  *
@@ -1639,9 +1676,10 @@ export declare class Gantt extends Component<HTMLElement> implements INotifyProp
1639
1676
  * @param {PdfExportProperties} pdfExportProperties - Defines the export properties of the Gantt.
1640
1677
  * @param {isMultipleExport} isMultipleExport - Define to enable multiple export.
1641
1678
  * @param {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.
1679
+ * @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.
1642
1680
  * @returns {Promise<any>} .
1643
1681
  */
1644
- pdfExport(pdfExportProperties?: PdfExportProperties, isMultipleExport?: boolean, pdfDoc?: Object): Promise<Object>;
1682
+ pdfExport(pdfExportProperties?: PdfExportProperties, isMultipleExport?: boolean, pdfDoc?: Object, isBlob?: boolean): Promise<Object>;
1645
1683
  /**
1646
1684
  * Clears the filtered columns in Gantt.
1647
1685
  *
@@ -333,6 +333,12 @@ var Gantt = /** @class */ (function (_super) {
333
333
  this.treeGrid.isReact = true;
334
334
  this.treeGrid.grid.isReact = true;
335
335
  }
336
+ if (this.isVue) {
337
+ this.treeGrid.isVue = true;
338
+ this.treeGrid.grid.isVue = true;
339
+ this.treeGrid.vueInstance = this.vueInstance;
340
+ this.treeGrid.grid.vueInstance = this.vueInstance;
341
+ }
336
342
  createSpinner({ target: this.element }, this.createElement);
337
343
  this.trigger('load', {});
338
344
  this.element.classList.add(cls.root);
@@ -358,13 +364,13 @@ var Gantt = /** @class */ (function (_super) {
358
364
  };
359
365
  Gantt.prototype.hideMaskRow = function () {
360
366
  var isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
361
- if (!isNullOrUndefined(this.contentMaskTable) && isTablePresent != 0) {
367
+ if (!isNullOrUndefined(this.contentMaskTable) && (isTablePresent != 0 || this.contentMaskTable)) {
362
368
  var maskTable = this.contentMaskTable;
363
369
  remove(maskTable);
364
370
  this.contentMaskTable = null;
365
371
  }
366
372
  isTablePresent = this.element.querySelectorAll('.e-masked-table').length;
367
- if (!isNullOrUndefined(this.headerMaskTable) && isTablePresent != 0) {
373
+ if (!isNullOrUndefined(this.headerMaskTable) && (isTablePresent != 0 || this.headerMaskTable)) {
368
374
  var maskTable = this.headerMaskTable;
369
375
  remove(maskTable);
370
376
  this.headerMaskTable = null;
@@ -377,8 +383,8 @@ var Gantt = /** @class */ (function (_super) {
377
383
  }
378
384
  if (this.element.querySelectorAll('.' + cls.timelineHeaderTableContainer).length != 0) {
379
385
  for (var i = 0; i < this.singleTier; i++) {
380
- if (!isNullOrUndefined(this.element.querySelectorAll('.' + cls.timelineHeaderTableContainer)[i])) {
381
- this.element.querySelectorAll('.' + cls.timelineHeaderTableContainer)[i]['style'].visibility = "visible";
386
+ if (!isNullOrUndefined(this.element.querySelectorAll('.' + cls.timelineHeaderTableContainer)[parseInt(i.toString(), 10)])) {
387
+ this.element.querySelectorAll('.' + cls.timelineHeaderTableContainer)[parseInt(i.toString(), 10)]['style'].visibility = "visible";
382
388
  }
383
389
  }
384
390
  }
@@ -400,7 +406,7 @@ var Gantt = /** @class */ (function (_super) {
400
406
  if (this.element.querySelectorAll('.' + cls.timelineHeaderTableContainer).length != 0) {
401
407
  this.singleTier = this.timelineModule.isSingleTier ? 1 : 2;
402
408
  for (var i = 0; i < this.singleTier; i++) {
403
- this.element.querySelectorAll('.' + cls.timelineHeaderTableContainer)[i]['style'].visibility = "hidden";
409
+ this.element.querySelectorAll('.' + cls.timelineHeaderTableContainer)[parseInt(i.toString(), 10)]['style'].visibility = "hidden";
404
410
  }
405
411
  }
406
412
  if (this.singleTier === 0) {
@@ -519,7 +525,7 @@ var Gantt = /** @class */ (function (_super) {
519
525
  }
520
526
  this.topBottomHeader = 0;
521
527
  for (var i = 0; i < row.length; i++) {
522
- tbody.appendChild(this.applyTimelineMaskRow(row[i]));
528
+ tbody.appendChild(this.applyTimelineMaskRow(row[parseInt(i.toString(), 10)]));
523
529
  this.topBottomHeader = this.topBottomHeader + 1;
524
530
  }
525
531
  table.appendChild(tbody);
@@ -533,11 +539,11 @@ var Gantt = /** @class */ (function (_super) {
533
539
  maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
534
540
  maskRow.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
535
541
  for (var i = 0; i < maskRow.childNodes.length - 1; i++) {
536
- maskRow.childNodes[i]['style']['width'] = 166 + 'px';
542
+ maskRow.childNodes[parseInt(i.toString(), 10)]['style']['width'] = 166 + 'px';
537
543
  }
538
544
  var maskCells = [].slice.call(maskRow.childNodes);
539
545
  for (var i = 0; i < maskCells.length; i++) {
540
- var maskCell = maskCells[i];
546
+ var maskCell = maskCells[parseInt(i.toString(), 10)];
541
547
  switch (this.topBottomHeader) {
542
548
  case 0:
543
549
  if (this.enableRtl) {
@@ -554,7 +560,7 @@ var Gantt = /** @class */ (function (_super) {
554
560
  maskCell.appendChild(this.createElement('td', { className: 'e-timeline-masked-top-header-cell' }));
555
561
  var innerMaskCells = [].slice.call(maskCell.childNodes);
556
562
  for (var i_1 = 0; i_1 < innerMaskCells.length; i_1++) {
557
- var htmlInner = innerMaskCells[i_1];
563
+ var htmlInner = innerMaskCells[parseInt(i_1.toString(), 10)];
558
564
  if (i_1 === 0) {
559
565
  if (this.enableRtl) {
560
566
  htmlInner.innerHTML = '<span class="e-mask e-skeleton e-skeleton-text e-shimmer-wave e-innerHTML"></span>';
@@ -606,7 +612,7 @@ var Gantt = /** @class */ (function (_super) {
606
612
  else if (this.columnLoop === 4) {
607
613
  this.columnLoop = 1;
608
614
  }
609
- tbody.appendChild(this.applyMaskRow(row[j]));
615
+ tbody.appendChild(this.applyMaskRow(row[parseInt(j.toString(), 10)]));
610
616
  }
611
617
  table.appendChild(tbody);
612
618
  table.style.width = 100 + '%';
@@ -627,7 +633,7 @@ var Gantt = /** @class */ (function (_super) {
627
633
  }
628
634
  var maskCells = [].slice.call(maskRow.childNodes);
629
635
  for (var i = 0; i < maskCells.length; i++) {
630
- var maskCell = maskCells[i];
636
+ var maskCell = maskCells[parseInt(i.toString(), 10)];
631
637
  switch (this.columnLoop) {
632
638
  case 1:
633
639
  if (i === 0) {
@@ -725,7 +731,7 @@ var Gantt = /** @class */ (function (_super) {
725
731
  this.predecessorModule['parentIds'] = [];
726
732
  this.predecessorModule['parentRecord'] = [];
727
733
  this.predecessorModule.updatePredecessors();
728
- if (this.isInPredecessorValidation && this.enableValidation) {
734
+ if (this.isInPredecessorValidation && this.enableValidation && this.autoCalculateDateScheduling) {
729
735
  this.predecessorModule.updatedRecordsDateByPredecessor();
730
736
  }
731
737
  }
@@ -738,7 +744,9 @@ var Gantt = /** @class */ (function (_super) {
738
744
  if (this.enableValidation) {
739
745
  this.dataOperation.updateGanttData();
740
746
  }
741
- this.predecessorModule.updateParentPredecessor();
747
+ if (this.allowParentDependency) {
748
+ this.predecessorModule.updateParentPredecessor();
749
+ }
742
750
  if (this.dataSource instanceof Object && isCountRequired(this)) {
743
751
  var count = getValue('count', this.dataSource);
744
752
  this.treeGrid.dataSource = { result: this.flatData, count: count };
@@ -751,7 +759,9 @@ var Gantt = /** @class */ (function (_super) {
751
759
  if (this.enableValidation) {
752
760
  this.dataOperation.updateGanttData();
753
761
  }
754
- this.predecessorModule.updateParentPredecessor();
762
+ if (this.allowParentDependency) {
763
+ this.predecessorModule.updateParentPredecessor();
764
+ }
755
765
  this.treeGridPane.classList.remove('e-temp-content');
756
766
  remove(this.treeGridPane.querySelector('.e-gantt-temp-header'));
757
767
  this.notify('dataReady', {});
@@ -868,22 +878,27 @@ var Gantt = /** @class */ (function (_super) {
868
878
  * @private
869
879
  */
870
880
  Gantt.prototype.updateContentHeight = function (args) {
871
- if (this.virtualScrollModule && this.enableVirtualization && !isNullOrUndefined(args)) {
872
- var length_1 = getValue('result.length', args);
873
- this.contentHeight = length_1 * this.rowHeight;
881
+ if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
882
+ return;
874
883
  }
875
884
  else {
876
- var expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
877
- this.currentViewData : this.getExpandedRecords(this.currentViewData);
878
- var height = void 0;
879
- var chartRow = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
880
- if (!isNullOrUndefined(chartRow) && chartRow.getBoundingClientRect().height > 0) {
881
- height = chartRow.getBoundingClientRect().height;
885
+ if (this.virtualScrollModule && this.enableVirtualization && !isNullOrUndefined(args)) {
886
+ var length_1 = getValue('result.length', args);
887
+ this.contentHeight = length_1 * this.rowHeight;
882
888
  }
883
889
  else {
884
- height = this.rowHeight;
890
+ var expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
891
+ this.currentViewData : this.getExpandedRecords(this.currentViewData);
892
+ var height = void 0;
893
+ var chartRow = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
894
+ if (!isNullOrUndefined(chartRow) && chartRow.getBoundingClientRect().height > 0) {
895
+ height = chartRow.getBoundingClientRect().height;
896
+ }
897
+ else {
898
+ height = this.rowHeight;
899
+ }
900
+ this.contentHeight = expandedRecords.length * height;
885
901
  }
886
- this.contentHeight = expandedRecords.length * height;
887
902
  }
888
903
  };
889
904
  /**
@@ -1399,7 +1414,6 @@ var Gantt = /** @class */ (function (_super) {
1399
1414
  this.chartRowsModule.refreshGanttRows();
1400
1415
  break;
1401
1416
  case 'includeWeekend':
1402
- case 'dayWorkingTime':
1403
1417
  case 'allowUnscheduledTasks':
1404
1418
  case 'holidays':
1405
1419
  this.isLoad = true;
@@ -1492,6 +1506,10 @@ var Gantt = /** @class */ (function (_super) {
1492
1506
  case 'readOnly':
1493
1507
  case 'viewType':
1494
1508
  case 'taskFields':
1509
+ case 'dayWorkingTime':
1510
+ case 'allowTaskbarDragAndDrop':
1511
+ case 'allowTaskbarOverlap':
1512
+ case 'allowParentDependency':
1495
1513
  if (prop === 'locale') {
1496
1514
  this.isLocaleChanged = true;
1497
1515
  }
@@ -1506,6 +1524,9 @@ var Gantt = /** @class */ (function (_super) {
1506
1524
  }
1507
1525
  }
1508
1526
  if (isRefresh) {
1527
+ if (this.isLoad && this.contentMaskTable) {
1528
+ this.contentMaskTable = null;
1529
+ }
1509
1530
  this.refresh();
1510
1531
  }
1511
1532
  };
@@ -1633,7 +1654,7 @@ var Gantt = /** @class */ (function (_super) {
1633
1654
  args: [this]
1634
1655
  });
1635
1656
  }
1636
- if (this.allowRowDragAndDrop) {
1657
+ if (this.allowRowDragAndDrop || this.allowTaskbarDragAndDrop) {
1637
1658
  modules.push({
1638
1659
  member: 'rowDragAndDrop',
1639
1660
  args: [this]
@@ -2168,10 +2189,11 @@ var Gantt = /** @class */ (function (_super) {
2168
2189
  * @param {PdfExportProperties} pdfExportProperties - Defines the export properties of the Gantt.
2169
2190
  * @param {isMultipleExport} isMultipleExport - Define to enable multiple export.
2170
2191
  * @param {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.
2192
+ * @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.
2171
2193
  * @returns {Promise<any>} .
2172
2194
  */
2173
- Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc) {
2174
- return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc)
2195
+ Gantt.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
2196
+ return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob)
2175
2197
  : null;
2176
2198
  };
2177
2199
  /**
@@ -2203,7 +2225,7 @@ var Gantt = /** @class */ (function (_super) {
2203
2225
  * @private
2204
2226
  */
2205
2227
  Gantt.prototype.renderWorkingDayCell = function (args) {
2206
- var includeWeekend = this.taskMode !== 'Auto' ? true : this.includeWeekend ? true : false;
2228
+ var includeWeekend = this.taskMode !== 'Auto' ? true : (this.includeWeekend || !this.autoCalculateDateScheduling) ? true : false;
2207
2229
  var nonWorkingDays = !includeWeekend ? this.nonWorkingDayIndex : [];
2208
2230
  var holidays = this.totalHolidayDates;
2209
2231
  if (nonWorkingDays.length > 0 && nonWorkingDays.indexOf(args.date.getDay()) !== -1) {
@@ -2213,7 +2235,12 @@ var Gantt = /** @class */ (function (_super) {
2213
2235
  var tempDate = new Date(args.date.getTime());
2214
2236
  tempDate.setHours(0, 0, 0);
2215
2237
  if (holidays.indexOf(tempDate.getTime()) !== -1) {
2216
- args.isDisabled = true;
2238
+ if (!this.autoCalculateDateScheduling) {
2239
+ args.isDisabled = false;
2240
+ }
2241
+ else {
2242
+ args.isDisabled = true;
2243
+ }
2217
2244
  }
2218
2245
  }
2219
2246
  };
@@ -2330,8 +2357,8 @@ var Gantt = /** @class */ (function (_super) {
2330
2357
  var id = ganttData.rowUniqueID;
2331
2358
  var task = this.getRecordByID(id);
2332
2359
  var isValid = false;
2333
- if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(ganttData[field]) && (value instanceof Date ? value.getTime() !==
2334
- ganttData[field].getTime() : ganttData[field] !== value))) {
2360
+ if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(ganttData["" + field]) && (value instanceof Date ? value.getTime() !==
2361
+ ganttData["" + field].getTime() : ganttData["" + field] !== value))) {
2335
2362
  isValid = true;
2336
2363
  }
2337
2364
  if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
@@ -3278,6 +3305,12 @@ var Gantt = /** @class */ (function (_super) {
3278
3305
  __decorate([
3279
3306
  Property(false)
3280
3307
  ], Gantt.prototype, "enableImmutableMode", void 0);
3308
+ __decorate([
3309
+ Property(true)
3310
+ ], Gantt.prototype, "allowParentDependency", void 0);
3311
+ __decorate([
3312
+ Property(false)
3313
+ ], Gantt.prototype, "enableHtmlSanitizer", void 0);
3281
3314
  __decorate([
3282
3315
  Property(true)
3283
3316
  ], Gantt.prototype, "disableHtmlEncode", void 0);
@@ -3287,6 +3320,12 @@ var Gantt = /** @class */ (function (_super) {
3287
3320
  __decorate([
3288
3321
  Property(true)
3289
3322
  ], Gantt.prototype, "enableVirtualMaskRow", void 0);
3323
+ __decorate([
3324
+ Property(true)
3325
+ ], Gantt.prototype, "UpdateOffsetOnTaskbarEdit", void 0);
3326
+ __decorate([
3327
+ Property(true)
3328
+ ], Gantt.prototype, "autoCalculateDateScheduling", void 0);
3290
3329
  __decorate([
3291
3330
  Property(true)
3292
3331
  ], Gantt.prototype, "autoFocusTasks", void 0);
@@ -3335,6 +3374,12 @@ var Gantt = /** @class */ (function (_super) {
3335
3374
  __decorate([
3336
3375
  Property(false)
3337
3376
  ], Gantt.prototype, "renderBaseline", void 0);
3377
+ __decorate([
3378
+ Property(false)
3379
+ ], Gantt.prototype, "allowTaskbarDragAndDrop", void 0);
3380
+ __decorate([
3381
+ Property(true)
3382
+ ], Gantt.prototype, "allowTaskbarOverlap", void 0);
3338
3383
  __decorate([
3339
3384
  Property('Horizontal')
3340
3385
  ], Gantt.prototype, "gridLines", void 0);