@syncfusion/ej2-gantt 20.4.40 → 20.4.42

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.
@@ -9110,7 +9110,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9110
9110
  var splitStartDate = this.parent.dataOperation.checkStartDate(splitDate, ganttProp, false);
9111
9111
  if (splitStartDate.getTime() !== ganttProp.startDate.getTime()) {
9112
9112
  if (ganttProp.isAutoSchedule) {
9113
- if (!isNullOrUndefined(segments)) {
9113
+ if (!isNullOrUndefined(segments) && segments.length > 0) {
9114
9114
  segmentIndex = this.getSegmentIndex(splitStartDate, splitRecord);
9115
9115
  }
9116
9116
  //check atleast one day difference is there to split
@@ -9429,11 +9429,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9429
9429
  'width:' + data.ganttProperties.width + 'px;' +
9430
9430
  'height:' + taskbarHeight + 'px;>' + innerDiv + ((data.ganttProperties.startDate && data.ganttProperties.endDate &&
9431
9431
  data.ganttProperties.duration) || data.ganttProperties.duration ? '<div class="e-gantt-manualparenttaskbar-left" style=' +
9432
- (this.parent.enableRtl ? 'margin-right:0px;' : '') + '"height:' + taskbarHeight + 'px;border-left-width:' + taskbarHeight / 5 +
9432
+ (this.parent.enableRtl ? 'margin-right:0px;' : '') + '"height:' + ((taskbarHeight / 5) + 8) + 'px;border-left-width:' + taskbarHeight / 5 +
9433
9433
  'px; border-bottom:' + taskbarHeight / 5 + 'px solid transparent;"></div>' +
9434
9434
  '<div class="e-gantt-manualparenttaskbar-right" style=' + (this.parent.enableRtl ? 'margin-right:-8px;' : '') +
9435
- (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - taskbarHeight / 5) + 'px;height:' +
9436
- (taskbarHeight) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
9435
+ (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - Math.floor(((taskbarHeight / 5) + 8) / 5)) + 'px;height:' +
9436
+ ((taskbarHeight / 5) + 8) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
9437
9437
  taskbarHeight / 5 + 'px solid transparent;>' + '</div></div>' : '');
9438
9438
  var milestoneTemplate = '<div class="' + manualParentMilestone + '" style="position:absolute;' +
9439
9439
  (this.parent.enableRtl ? 'right:' : 'left:') +
@@ -9497,7 +9497,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9497
9497
  }
9498
9498
  if (isNaN(parseInt(labelString))) {
9499
9499
  labelDiv = '<span class="' + taskLabel + '" style="line-height:' +
9500
- (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9500
+ (data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) +
9501
+ 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9501
9502
  'display:' + 'inline-block;' +
9502
9503
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
9503
9504
  this.taskBarHeight + 'px;">' + labelString + '</span>';
@@ -9505,7 +9506,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9505
9506
  else {
9506
9507
  labelDiv = '<span class="' +
9507
9508
  taskLabel + '" style="line-height:' +
9508
- (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9509
+ (data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) + 'px;' +
9510
+ (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9509
9511
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9510
9512
  (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
9511
9513
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
@@ -23575,7 +23577,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
23575
23577
  if ((key === tasks.baselineStartDate || key === tasks.baselineEndDate) &&
23576
23578
  (ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate)) {
23577
23579
  ganttObj.setRecordValue('baselineStartDate', ganttObj.dataOperation.checkBaselineStartDate(ganttData.ganttProperties.baselineStartDate), ganttData.ganttProperties, true);
23578
- ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
23580
+ if (ganttData.ganttProperties.baselineEndDate && ganttData.ganttProperties.baselineEndDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
23581
+ ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
23582
+ }
23579
23583
  ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
23580
23584
  ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
23581
23585
  ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
@@ -25908,6 +25912,12 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25908
25912
  else {
25909
25913
  _this.parent.showSpinner();
25910
25914
  }
25915
+ var tasks = _this.parent.taskFields;
25916
+ var ganttData = _this.parent.viewType === 'ResourceView' ?
25917
+ _this.parent.flatData[_this.parent.getTaskIds().indexOf('T' + args.data[tasks.id])] : _this.parent.getRecordByID(args.data[tasks.id]);
25918
+ if (!isNullOrUndefined(ganttData)) {
25919
+ _this.validateUpdateValues(args.newTaskData, ganttData, true);
25920
+ }
25911
25921
  if (!isNullOrUndefined(args.data[tempTaskID])) {
25912
25922
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
25913
25923
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];