@syncfusion/ej2-gantt 20.4.40 → 20.4.43

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 (48) hide show
  1. package/CHANGELOG.md +18 -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 +29 -7
  7. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  8. package/dist/es6/ej2-gantt.es5.js +45 -23
  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 +19 -19
  14. package/src/gantt/actions/edit.js +9 -1
  15. package/src/gantt/actions/rowdragdrop.js +25 -16
  16. package/src/gantt/actions/toolbar.js +3 -0
  17. package/src/gantt/renderer/chart-rows.js +8 -6
  18. package/styles/bootstrap-dark.css +1 -1
  19. package/styles/bootstrap.css +1 -1
  20. package/styles/bootstrap4.css +2 -2
  21. package/styles/bootstrap5-dark.css +1 -1
  22. package/styles/bootstrap5.css +1 -1
  23. package/styles/fabric-dark.css +1 -1
  24. package/styles/fabric.css +1 -1
  25. package/styles/fluent-dark.css +1 -1
  26. package/styles/fluent.css +1 -1
  27. package/styles/gantt/_theme.scss +1 -1
  28. package/styles/gantt/bootstrap-dark.css +1 -1
  29. package/styles/gantt/bootstrap.css +1 -1
  30. package/styles/gantt/bootstrap4.css +2 -2
  31. package/styles/gantt/bootstrap5-dark.css +1 -1
  32. package/styles/gantt/bootstrap5.css +1 -1
  33. package/styles/gantt/fabric-dark.css +1 -1
  34. package/styles/gantt/fabric.css +1 -1
  35. package/styles/gantt/fluent-dark.css +1 -1
  36. package/styles/gantt/fluent.css +1 -1
  37. package/styles/gantt/highcontrast-light.css +1 -1
  38. package/styles/gantt/highcontrast.css +1 -1
  39. package/styles/gantt/material-dark.css +1 -1
  40. package/styles/gantt/material.css +1 -1
  41. package/styles/gantt/tailwind-dark.css +1 -1
  42. package/styles/gantt/tailwind.css +1 -1
  43. package/styles/highcontrast-light.css +1 -1
  44. package/styles/highcontrast.css +1 -1
  45. package/styles/material-dark.css +1 -1
  46. package/styles/material.css +1 -1
  47. package/styles/tailwind-dark.css +1 -1
  48. package/styles/tailwind.css +1 -1
@@ -8704,7 +8704,7 @@ class ChartRows extends DateProcessor {
8704
8704
  const splitStartDate = this.parent.dataOperation.checkStartDate(splitDate, ganttProp, false);
8705
8705
  if (splitStartDate.getTime() !== ganttProp.startDate.getTime()) {
8706
8706
  if (ganttProp.isAutoSchedule) {
8707
- if (!isNullOrUndefined(segments)) {
8707
+ if (!isNullOrUndefined(segments) && segments.length > 0) {
8708
8708
  segmentIndex = this.getSegmentIndex(splitStartDate, splitRecord);
8709
8709
  }
8710
8710
  //check atleast one day difference is there to split
@@ -9023,11 +9023,11 @@ class ChartRows extends DateProcessor {
9023
9023
  'width:' + data.ganttProperties.width + 'px;' +
9024
9024
  'height:' + taskbarHeight + 'px;>' + innerDiv + ((data.ganttProperties.startDate && data.ganttProperties.endDate &&
9025
9025
  data.ganttProperties.duration) || data.ganttProperties.duration ? '<div class="e-gantt-manualparenttaskbar-left" style=' +
9026
- (this.parent.enableRtl ? 'margin-right:0px;' : '') + '"height:' + taskbarHeight + 'px;border-left-width:' + taskbarHeight / 5 +
9026
+ (this.parent.enableRtl ? 'margin-right:0px;' : '') + '"height:' + ((taskbarHeight / 5) + 8) + 'px;border-left-width:' + taskbarHeight / 5 +
9027
9027
  'px; border-bottom:' + taskbarHeight / 5 + 'px solid transparent;"></div>' +
9028
9028
  '<div class="e-gantt-manualparenttaskbar-right" style=' + (this.parent.enableRtl ? 'margin-right:-8px;' : '') +
9029
- (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - taskbarHeight / 5) + 'px;height:' +
9030
- (taskbarHeight) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
9029
+ (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - Math.floor(((taskbarHeight / 5) + 8) / 5)) + 'px;height:' +
9030
+ ((taskbarHeight / 5) + 8) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
9031
9031
  taskbarHeight / 5 + 'px solid transparent;>' + '</div></div>' : '');
9032
9032
  const milestoneTemplate = '<div class="' + manualParentMilestone + '" style="position:absolute;' +
9033
9033
  (this.parent.enableRtl ? 'right:' : 'left:') +
@@ -9091,7 +9091,8 @@ class ChartRows extends DateProcessor {
9091
9091
  }
9092
9092
  if (isNaN(parseInt(labelString))) {
9093
9093
  labelDiv = '<span class="' + taskLabel + '" style="line-height:' +
9094
- (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9094
+ (data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) +
9095
+ 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9095
9096
  'display:' + 'inline-block;' +
9096
9097
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
9097
9098
  this.taskBarHeight + 'px;">' + labelString + '</span>';
@@ -9099,7 +9100,8 @@ class ChartRows extends DateProcessor {
9099
9100
  else {
9100
9101
  labelDiv = '<span class="' +
9101
9102
  taskLabel + '" style="line-height:' +
9102
- (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9103
+ (data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) + 'px;' +
9104
+ (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9103
9105
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9104
9106
  (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
9105
9107
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
@@ -23053,7 +23055,9 @@ class Edit$2 {
23053
23055
  if ((key === tasks.baselineStartDate || key === tasks.baselineEndDate) &&
23054
23056
  (ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate)) {
23055
23057
  ganttObj.setRecordValue('baselineStartDate', ganttObj.dataOperation.checkBaselineStartDate(ganttData.ganttProperties.baselineStartDate), ganttData.ganttProperties, true);
23056
- ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
23058
+ if (ganttData.ganttProperties.baselineEndDate && ganttData.ganttProperties.baselineEndDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
23059
+ ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
23060
+ }
23057
23061
  ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
23058
23062
  ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
23059
23063
  ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
@@ -25370,6 +25374,12 @@ class Edit$2 {
25370
25374
  else {
25371
25375
  this.parent.showSpinner();
25372
25376
  }
25377
+ const tasks = this.parent.taskFields;
25378
+ const ganttData = this.parent.viewType === 'ResourceView' ?
25379
+ this.parent.flatData[this.parent.getTaskIds().indexOf('T' + args.data[tasks.id])] : this.parent.getRecordByID(args.data[tasks.id]);
25380
+ if (!isNullOrUndefined(ganttData)) {
25381
+ this.validateUpdateValues(args.newTaskData, ganttData, true);
25382
+ }
25373
25383
  if (!isNullOrUndefined(args.data[tempTaskID])) {
25374
25384
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
25375
25385
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
@@ -27650,6 +27660,9 @@ class Toolbar$3 {
27650
27660
  * @private
27651
27661
  */
27652
27662
  zoomToFit() {
27663
+ if (this.parent.timelineModule.isZoomIn) {
27664
+ this.parent.timelineModule.isZoomIn = false;
27665
+ }
27653
27666
  this.parent.timelineModule.processZoomToFit();
27654
27667
  this.parent.ganttChartModule.updateScrollLeft(0);
27655
27668
  }
@@ -30063,6 +30076,15 @@ class RowDD$1 {
30063
30076
  delete droppedRecord.taskData[this.parent.taskFields.segments];
30064
30077
  }
30065
30078
  }
30079
+ if (this.treeGridData.length != 0) {
30080
+ for (let i = 0; i < this.treeGridData.length; i++) {
30081
+ this.treeGridData[parseInt(i.toString(), 10)].index = i;
30082
+ if (!isNullOrUndefined(this.treeGridData[parseInt(i.toString(), 10)].parentItem)) {
30083
+ let updatedParent = getValue('uniqueIDCollection.' + this.treeGridData[parseInt(i.toString(), 10)].parentUniqueID, this.parent.treeGrid);
30084
+ this.treeGridData[parseInt(i.toString(), 10)].parentItem.index = updatedParent.index;
30085
+ }
30086
+ }
30087
+ }
30066
30088
  // eslint-disable-next-line
30067
30089
  if (!isNullOrUndefined(draggedRecord.parentItem && this.updateParentRecords.indexOf(draggedRecord.parentItem) !== -1)) {
30068
30090
  this.updateParentRecords.push(draggedRecord.parentItem);