@syncfusion/ej2-gantt 20.1.56 → 20.1.60

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 (76) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/ej2-gantt.umd.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-gantt.es2015.js +31 -18
  5. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  6. package/dist/es6/ej2-gantt.es5.js +31 -18
  7. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  8. package/dist/global/ej2-gantt.min.js +2 -2
  9. package/dist/global/ej2-gantt.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +15 -15
  12. package/src/gantt/actions/dialog-edit.js +1 -1
  13. package/src/gantt/actions/edit.js +5 -1
  14. package/src/gantt/actions/taskbar-edit.js +1 -3
  15. package/src/gantt/actions/toolbar.js +2 -0
  16. package/src/gantt/base/gantt-chart.js +6 -1
  17. package/src/gantt/base/gantt.js +2 -5
  18. package/src/gantt/base/task-processor.js +7 -3
  19. package/src/gantt/export/export-helper.js +3 -3
  20. package/src/gantt/renderer/connector-line.js +1 -1
  21. package/src/gantt/renderer/timeline.js +3 -0
  22. package/styles/bootstrap-dark.css +217 -11
  23. package/styles/bootstrap.css +218 -13
  24. package/styles/bootstrap4.css +220 -11
  25. package/styles/bootstrap5-dark.css +218 -13
  26. package/styles/bootstrap5.css +218 -13
  27. package/styles/fabric-dark.css +216 -10
  28. package/styles/fabric.css +217 -11
  29. package/styles/fluent-dark.css +217 -11
  30. package/styles/fluent.css +217 -11
  31. package/styles/gantt/_bootstrap-dark-definition.scss +41 -4
  32. package/styles/gantt/_bootstrap-definition.scss +41 -4
  33. package/styles/gantt/_bootstrap4-definition.scss +42 -4
  34. package/styles/gantt/_bootstrap5-definition.scss +41 -4
  35. package/styles/gantt/_fabric-dark-definition.scss +40 -3
  36. package/styles/gantt/_fabric-definition.scss +41 -4
  37. package/styles/gantt/_fluent-definition.scss +41 -4
  38. package/styles/gantt/_highcontrast-definition.scss +41 -4
  39. package/styles/gantt/_highcontrast-light-definition.scss +41 -4
  40. package/styles/gantt/_layout.scss +298 -7
  41. package/styles/gantt/_material-dark-definition.scss +42 -4
  42. package/styles/gantt/_material-definition.scss +42 -4
  43. package/styles/gantt/_tailwind-definition.scss +42 -4
  44. package/styles/gantt/bootstrap-dark.css +217 -11
  45. package/styles/gantt/bootstrap.css +218 -13
  46. package/styles/gantt/bootstrap4.css +220 -11
  47. package/styles/gantt/bootstrap5-dark.css +218 -13
  48. package/styles/gantt/bootstrap5.css +218 -13
  49. package/styles/gantt/fabric-dark.css +216 -10
  50. package/styles/gantt/fabric.css +217 -11
  51. package/styles/gantt/fluent-dark.css +217 -11
  52. package/styles/gantt/fluent.css +217 -11
  53. package/styles/gantt/highcontrast-light.css +209 -11
  54. package/styles/gantt/highcontrast.css +217 -11
  55. package/styles/gantt/icons/_bootstrap-dark.scss +8 -0
  56. package/styles/gantt/icons/_bootstrap.scss +8 -0
  57. package/styles/gantt/icons/_bootstrap4.scss +8 -0
  58. package/styles/gantt/icons/_bootstrap5.scss +8 -0
  59. package/styles/gantt/icons/_fabric-dark.scss +8 -0
  60. package/styles/gantt/icons/_fabric.scss +8 -0
  61. package/styles/gantt/icons/_fluent.scss +8 -0
  62. package/styles/gantt/icons/_highcontrast.scss +8 -0
  63. package/styles/gantt/icons/_material-dark.scss +8 -0
  64. package/styles/gantt/icons/_material.scss +8 -0
  65. package/styles/gantt/icons/_tailwind-dark.scss +8 -0
  66. package/styles/gantt/icons/_tailwind.scss +8 -0
  67. package/styles/gantt/material-dark.css +224 -11
  68. package/styles/gantt/material.css +224 -11
  69. package/styles/gantt/tailwind-dark.css +223 -11
  70. package/styles/gantt/tailwind.css +223 -11
  71. package/styles/highcontrast-light.css +209 -11
  72. package/styles/highcontrast.css +217 -11
  73. package/styles/material-dark.css +224 -11
  74. package/styles/material.css +224 -11
  75. package/styles/tailwind-dark.css +223 -11
  76. package/styles/tailwind.css +223 -11
@@ -2108,6 +2108,13 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
2108
2108
  work = parseFloat(work.toFixed(2));
2109
2109
  }
2110
2110
  }
2111
+ if (ganttData.childRecords.length > 0) {
2112
+ var childCompletedWorks = 0;
2113
+ for (var i = 0; i < ganttData.childRecords.length; i++) {
2114
+ childCompletedWorks += ganttData.childRecords[i][this.parent.taskFields.work];
2115
+ }
2116
+ work += childCompletedWorks;
2117
+ }
2111
2118
  this.parent.setRecordValue('work', work, ganttData.ganttProperties, true);
2112
2119
  if (!isNullOrUndefined(this.parent.taskFields.work)) {
2113
2120
  this.parent.dataOperation.updateMappingData(ganttData, 'work');
@@ -3668,7 +3675,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3668
3675
  var maxEndDate = null;
3669
3676
  var milestoneCount = 0;
3670
3677
  var totalProgress = 0;
3671
- var childCompletedWorks = 0;
3672
3678
  var childData = void 0;
3673
3679
  for (var count = 0; count < childLength; count++) {
3674
3680
  childData = childRecords[count];
@@ -3706,7 +3712,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3706
3712
  else {
3707
3713
  milestoneCount++;
3708
3714
  }
3709
- childCompletedWorks += childData.ganttProperties.work;
3710
3715
  }
3711
3716
  if (!deleteUpdate) {
3712
3717
  if (this.compareDates(previousStartDate, minStartDate) !== 0) {
@@ -3732,7 +3737,6 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
3732
3737
  }
3733
3738
  this.updateWorkWithDuration(parentData);
3734
3739
  var parentWork = parentProp.work;
3735
- parentWork += childCompletedWorks;
3736
3740
  this.parent.setRecordValue('work', parentWork, parentProp, true);
3737
3741
  this.parent.setRecordValue('taskType', 'FixedDuration', parentProp, true);
3738
3742
  if (!isNullOrUndefined(this.parent.taskFields.type)) {
@@ -4706,7 +4710,12 @@ var GanttChart = /** @__PURE__ @class */ (function () {
4706
4710
  * @private
4707
4711
  */
4708
4712
  GanttChart.prototype.getChartRows = function () {
4709
- return document.getElementById(this.parent.element.id + 'GanttTaskTableBody').querySelectorAll('.e-chart-row');
4713
+ if (document.getElementById(this.parent.element.id + 'GanttTaskTableBody') != null) {
4714
+ return document.getElementById(this.parent.element.id + 'GanttTaskTableBody').querySelectorAll('.e-chart-row');
4715
+ }
4716
+ else {
4717
+ return null;
4718
+ }
4710
4719
  };
4711
4720
  /**
4712
4721
  * Expand Collapse operations from gantt chart side
@@ -5526,6 +5535,9 @@ var Timeline = /** @__PURE__ @class */ (function () {
5526
5535
  this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
5527
5536
  }
5528
5537
  this.parent.dataOperation.calculateProjectDates();
5538
+ if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
5539
+ this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
5540
+ }
5529
5541
  var timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
5530
5542
  var totalDays = (timeDifference / (1000 * 3600 * 24));
5531
5543
  var chartWidth = this.parent.ganttChartModule.chartElement.offsetWidth;
@@ -10862,7 +10874,7 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
10862
10874
  (Math.floor(this.parent.chartRowsModule.milestoneHeight)) : childGanttRecord.width;
10863
10875
  connectorObj.parentIndex = parentIndex;
10864
10876
  connectorObj.childIndex = childIndex;
10865
- var rowHeight = this.parent.ganttChartModule.getChartRows()[0] &&
10877
+ var rowHeight = !isNullOrUndefined(this.parent.ganttChartModule.getChartRows()) && this.parent.ganttChartModule.getChartRows()[0] &&
10866
10878
  this.parent.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;
10867
10879
  connectorObj.rowHeight = rowHeight && !isNaN(rowHeight) ? rowHeight : this.parent.rowHeight;
10868
10880
  connectorObj.type = predecessor.type;
@@ -12983,10 +12995,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
12983
12995
  this.treeGrid.dataSource = { result: this.flatData, count: count };
12984
12996
  }
12985
12997
  else {
12986
- this.treeGrid.dataSource = this.flatData;
12987
- if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
12988
- this.treeGrid.dataBind();
12989
- }
12998
+ this.treeGrid.setProperties({ dataSource: this.flatData }, false);
12990
12999
  }
12991
13000
  }
12992
13001
  else {
@@ -13103,7 +13112,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
13103
13112
  var expandedRecords = this.virtualScrollModule && this.enableVirtualization ?
13104
13113
  this.currentViewData : this.getExpandedRecords(this.currentViewData);
13105
13114
  var height = void 0;
13106
- var chartRow$$1 = this.ganttChartModule.getChartRows()[0];
13115
+ var chartRow$$1 = !isNullOrUndefined(this.ganttChartModule.getChartRows()) ? this.ganttChartModule.getChartRows()[0] : null;
13107
13116
  if (!isNullOrUndefined(chartRow$$1) && chartRow$$1.getBoundingClientRect().height > 0) {
13108
13117
  height = chartRow$$1.getBoundingClientRect().height;
13109
13118
  }
@@ -16894,9 +16903,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
16894
16903
  addClass([element], [activeParentTask]);
16895
16904
  }
16896
16905
  }
16897
- if (isShowProgressResizer) {
16898
- addClass(this.parent.ganttChartModule.scrollElement.querySelectorAll('.' + connectorLineContainer), [connectorLineZIndex]);
16899
- }
16906
+ addClass(this.parent.ganttChartModule.scrollElement.querySelectorAll('.' + connectorLineContainer), [connectorLineZIndex]);
16900
16907
  if (!isNullOrUndefined(this.parent.taskFields.dependency)
16901
16908
  && (element.querySelector('.' + connectorPointLeft)
16902
16909
  || element.parentElement.querySelector('.' + connectorPointLeft))
@@ -19351,7 +19358,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
19351
19358
  }
19352
19359
  else if (isScheduledTask(ganttProp) || !isNullOrUndefined(ganttProp.startDate)) {
19353
19360
  if (ganttData.ganttProperties.isMilestone && ganttData.ganttProperties.duration !== 0) {
19354
- this.parent.dateValidationModule.calculateStartDate(ganttData);
19361
+ this.parent.dateValidationModule.checkStartDate(ganttProp.startDate);
19355
19362
  }
19356
19363
  this.parent.dateValidationModule.calculateEndDate(ganttData);
19357
19364
  }
@@ -21819,8 +21826,12 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
21819
21826
  if (!isNullOrUndefined(this.parent.editModule) && ganttData) {
21820
21827
  this.parent.isOnEdit = true;
21821
21828
  this.validateUpdateValues(data, ganttData, true);
21822
- if (data[this.parent.taskFields.resourceInfo] && data[this.parent.taskFields.duration] != 0) {
21829
+ if (data[this.parent.taskFields.resourceInfo]) {
21830
+ if (ganttData.ganttProperties.duration === 0) {
21831
+ this.parent.dataOperation.updateWorkWithDuration(ganttData);
21832
+ }
21823
21833
  this.updateResourceRelatedFields(ganttData, 'resource');
21834
+ this.parent.dateValidationModule.calculateEndDate(ganttData);
21824
21835
  }
21825
21836
  var keys = Object.keys(data);
21826
21837
  if (keys.indexOf(tasks.startDate) !== -1 || keys.indexOf(tasks.endDate) !== -1 ||
@@ -26357,6 +26368,8 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
26357
26368
  disableItems.push(gID + '_edit');
26358
26369
  disableItems.push(gID + '_update');
26359
26370
  disableItems.push(gID + '_cancel');
26371
+ disableItems.push(gID + '_indent');
26372
+ disableItems.push(gID + '_outdent');
26360
26373
  }
26361
26374
  for (var e = 0; e < enableItems.length; e++) {
26362
26375
  var index = void 0;
@@ -31205,13 +31218,13 @@ var ExportValueFormatter = /** @__PURE__ @class */ (function () {
31205
31218
  if (typeof args.column.format === 'string') {
31206
31219
  var format = void 0;
31207
31220
  if (args.column.type === 'date') {
31208
- format = { type: 'date', skeleton: args.column.format };
31221
+ format = { type: 'date', format: args.column.format };
31209
31222
  }
31210
31223
  else if (args.column.type === 'time') {
31211
- format = { type: 'time', skeleton: args.column.format };
31224
+ format = { type: 'time', format: args.column.format };
31212
31225
  }
31213
31226
  else {
31214
- format = { type: 'dateTime', skeleton: args.column.format };
31227
+ format = { type: 'dateTime', format: args.column.format };
31215
31228
  }
31216
31229
  return this.returnFormattedValue(args, format);
31217
31230
  }