@syncfusion/ej2-gantt 20.4.38 → 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.
- package/CHANGELOG.md +23 -0
- package/README.md +65 -53
- package/dist/ej2-gantt.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +127 -42
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +127 -42
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +21 -24
- package/src/gantt/actions/dependency.js +5 -2
- package/src/gantt/actions/edit.js +9 -1
- package/src/gantt/base/gantt.js +9 -3
- package/src/gantt/base/task-processor.js +17 -3
- package/src/gantt/renderer/chart-rows.js +86 -32
- package/src/gantt/renderer/timeline.js +1 -1
|
@@ -2580,7 +2580,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2580
2580
|
}
|
|
2581
2581
|
else if (endDate) {
|
|
2582
2582
|
sDate = new Date(endDate.getTime());
|
|
2583
|
-
milestone = true;
|
|
2583
|
+
milestone = isNullOrUndefined(startDate) && this.parent.allowUnscheduledTasks ? false : true;
|
|
2584
2584
|
}
|
|
2585
2585
|
else {
|
|
2586
2586
|
sDate = this.getValidStartDate(ganttProp);
|
|
@@ -2703,6 +2703,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2703
2703
|
else if (isMilestone && this.getSecondsInDecimal(date) === this.parent.defaultEndTime) {
|
|
2704
2704
|
date.setHours(24);
|
|
2705
2705
|
}
|
|
2706
|
+
else if (this.getSecondsInDecimal(date) === this.parent.defaultEndTime && this.parent.allowUnscheduledTasks) {
|
|
2707
|
+
date.setHours(22);
|
|
2708
|
+
}
|
|
2706
2709
|
}
|
|
2707
2710
|
var timelineStartDate = this.parent.timelineModule.timelineStartDate;
|
|
2708
2711
|
if (timelineStartDate) {
|
|
@@ -3682,7 +3685,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3682
3685
|
durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 60));
|
|
3683
3686
|
break;
|
|
3684
3687
|
default:
|
|
3685
|
-
|
|
3688
|
+
if (childGanttRecord.ganttProperties.duration < 1) {
|
|
3689
|
+
durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 3600));
|
|
3690
|
+
}
|
|
3691
|
+
else {
|
|
3692
|
+
durationInDay = childGanttRecord.ganttProperties.duration;
|
|
3693
|
+
}
|
|
3686
3694
|
}
|
|
3687
3695
|
if (childGanttRecord.hasChildRecords) {
|
|
3688
3696
|
setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
|
|
@@ -3759,7 +3767,13 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
3759
3767
|
if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
|
|
3760
3768
|
progressValues = this.getParentProgress(childData);
|
|
3761
3769
|
totalProgress += getValue('totalProgress', progressValues);
|
|
3762
|
-
|
|
3770
|
+
if (childData[this.parent.taskFields.duration] < 1) {
|
|
3771
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
3772
|
+
totalDuration = Number(totalDuration.toFixed(4));
|
|
3773
|
+
}
|
|
3774
|
+
else {
|
|
3775
|
+
totalDuration += getValue('totalDuration', progressValues);
|
|
3776
|
+
}
|
|
3763
3777
|
}
|
|
3764
3778
|
else {
|
|
3765
3779
|
milestoneCount++;
|
|
@@ -5573,7 +5587,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
5573
5587
|
this.totalTimelineWidth = 0;
|
|
5574
5588
|
this.customTimelineSettings = null;
|
|
5575
5589
|
this.parent.isTimelineRoundOff = this.isZoomToFit ? false : isNullOrUndefined(this.parent.projectStartDate) ? true : false;
|
|
5576
|
-
if (this.parent.enablePersistence) {
|
|
5590
|
+
if (this.parent.enablePersistence && this.parent.isLoad) {
|
|
5577
5591
|
this.parent.timelineSettings = this.parent.currentZoomingLevel;
|
|
5578
5592
|
}
|
|
5579
5593
|
};
|
|
@@ -9096,7 +9110,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9096
9110
|
var splitStartDate = this.parent.dataOperation.checkStartDate(splitDate, ganttProp, false);
|
|
9097
9111
|
if (splitStartDate.getTime() !== ganttProp.startDate.getTime()) {
|
|
9098
9112
|
if (ganttProp.isAutoSchedule) {
|
|
9099
|
-
if (!isNullOrUndefined(segments)) {
|
|
9113
|
+
if (!isNullOrUndefined(segments) && segments.length > 0) {
|
|
9100
9114
|
segmentIndex = this.getSegmentIndex(splitStartDate, splitRecord);
|
|
9101
9115
|
}
|
|
9102
9116
|
//check atleast one day difference is there to split
|
|
@@ -9415,11 +9429,11 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9415
9429
|
'width:' + data.ganttProperties.width + 'px;' +
|
|
9416
9430
|
'height:' + taskbarHeight + 'px;>' + innerDiv + ((data.ganttProperties.startDate && data.ganttProperties.endDate &&
|
|
9417
9431
|
data.ganttProperties.duration) || data.ganttProperties.duration ? '<div class="e-gantt-manualparenttaskbar-left" style=' +
|
|
9418
|
-
(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 +
|
|
9419
9433
|
'px; border-bottom:' + taskbarHeight / 5 + 'px solid transparent;"></div>' +
|
|
9420
9434
|
'<div class="e-gantt-manualparenttaskbar-right" style=' + (this.parent.enableRtl ? 'margin-right:-8px;' : '') +
|
|
9421
|
-
(this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - taskbarHeight / 5) + 'px;height:' +
|
|
9422
|
-
(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:' +
|
|
9423
9437
|
taskbarHeight / 5 + 'px solid transparent;>' + '</div></div>' : '');
|
|
9424
9438
|
var milestoneTemplate = '<div class="' + manualParentMilestone + '" style="position:absolute;' +
|
|
9425
9439
|
(this.parent.enableRtl ? 'right:' : 'left:') +
|
|
@@ -9483,7 +9497,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9483
9497
|
}
|
|
9484
9498
|
if (isNaN(parseInt(labelString))) {
|
|
9485
9499
|
labelDiv = '<span class="' + taskLabel + '" style="line-height:' +
|
|
9486
|
-
(
|
|
9500
|
+
(data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) +
|
|
9501
|
+
'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
|
|
9487
9502
|
'display:' + 'inline-block;' +
|
|
9488
9503
|
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
9489
9504
|
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
@@ -9491,7 +9506,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9491
9506
|
else {
|
|
9492
9507
|
labelDiv = '<span class="' +
|
|
9493
9508
|
taskLabel + '" style="line-height:' +
|
|
9494
|
-
(
|
|
9509
|
+
(data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) + 'px;' +
|
|
9510
|
+
(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
9495
9511
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9496
9512
|
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
|
|
9497
9513
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
@@ -9907,6 +9923,7 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9907
9923
|
}
|
|
9908
9924
|
this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
|
|
9909
9925
|
}
|
|
9926
|
+
this.parent.ganttChartModule.updateLastRowBottomWidth();
|
|
9910
9927
|
};
|
|
9911
9928
|
/**
|
|
9912
9929
|
* To render taskbars.
|
|
@@ -10015,9 +10032,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10015
10032
|
}
|
|
10016
10033
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
10017
10034
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
10018
|
-
taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
10035
|
+
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()))
|
|
10019
10036
|
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
|
|
10020
|
-
this.templateData.ganttProperties.isMilestone)
|
|
10037
|
+
this.templateData.ganttProperties.isMilestone))
|
|
10021
10038
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
10022
10039
|
}
|
|
10023
10040
|
}
|
|
@@ -10028,9 +10045,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10028
10045
|
}
|
|
10029
10046
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
10030
10047
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
10031
|
-
taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
10048
|
+
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()))
|
|
10032
10049
|
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
|
|
10033
|
-
this.templateData.ganttProperties.isMilestone)
|
|
10050
|
+
this.templateData.ganttProperties.isMilestone))
|
|
10034
10051
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
10035
10052
|
}
|
|
10036
10053
|
}
|
|
@@ -10076,9 +10093,9 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10076
10093
|
}
|
|
10077
10094
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
10078
10095
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
10079
|
-
taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
10096
|
+
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()))
|
|
10080
10097
|
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
|
|
10081
|
-
this.templateData.ganttProperties.isMilestone)
|
|
10098
|
+
this.templateData.ganttProperties.isMilestone))
|
|
10082
10099
|
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
10083
10100
|
}
|
|
10084
10101
|
}
|
|
@@ -10178,6 +10195,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10178
10195
|
var taskbarElement = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ? trElement :
|
|
10179
10196
|
trElement.querySelector('.' + taskBarMainContainer);
|
|
10180
10197
|
var rowElement;
|
|
10198
|
+
var segmentRowElement;
|
|
10199
|
+
if (data.ganttProperties.segments && data.ganttProperties.segments.length > 0) {
|
|
10200
|
+
segmentRowElement = trElement.parentElement.parentElement.parentElement;
|
|
10201
|
+
}
|
|
10181
10202
|
var triggerTaskbarElement;
|
|
10182
10203
|
var args = {
|
|
10183
10204
|
data: data,
|
|
@@ -10190,7 +10211,8 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10190
10211
|
args.milestoneColor = taskbarElement.querySelector(classCollections[0]) ?
|
|
10191
10212
|
getComputedStyle(taskbarElement.querySelector(classCollections[0])).borderBottomColor : null;
|
|
10192
10213
|
args.baselineColor = trElement.querySelector(classCollections[1]) ?
|
|
10193
|
-
getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
|
|
10214
|
+
getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
|
|
10215
|
+
(trElement.querySelector('.' + baselineBar) ? getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor : null);
|
|
10194
10216
|
}
|
|
10195
10217
|
else {
|
|
10196
10218
|
var childTask = taskbarElement.querySelector(classCollections[0]);
|
|
@@ -10207,17 +10229,33 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10207
10229
|
getComputedStyle(taskbarElement.querySelector(classCollections[1])).backgroundColor;
|
|
10208
10230
|
// args.progressBarBorderColor = taskbarElement.querySelector(progressBarClass) ?
|
|
10209
10231
|
// getComputedStyle(taskbarElement.querySelector(progressBarClass)).borderColor : null;
|
|
10210
|
-
|
|
10211
|
-
|
|
10232
|
+
if (segmentRowElement) {
|
|
10233
|
+
args.baselineColor = segmentRowElement.querySelector('.' + baselineBar) ?
|
|
10234
|
+
getComputedStyle(segmentRowElement.querySelector('.' + baselineBar)).backgroundColor : null;
|
|
10235
|
+
}
|
|
10236
|
+
else {
|
|
10237
|
+
args.baselineColor = trElement.querySelector('.' + baselineBar) ?
|
|
10238
|
+
getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor : null;
|
|
10239
|
+
}
|
|
10212
10240
|
args.taskLabelColor = taskbarElement.querySelector('.' + taskLabel) ?
|
|
10213
10241
|
getComputedStyle(taskbarElement.querySelector('.' + taskLabel)).color : null;
|
|
10214
10242
|
}
|
|
10215
|
-
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10243
|
+
if (segmentRowElement) {
|
|
10244
|
+
args.rightLabelColor = segmentRowElement.querySelector('.' + rightLabelContainer) &&
|
|
10245
|
+
(segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) ?
|
|
10246
|
+
getComputedStyle((segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color : null;
|
|
10247
|
+
args.leftLabelColor = segmentRowElement.querySelector('.' + leftLabelContainer) &&
|
|
10248
|
+
(segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) ?
|
|
10249
|
+
getComputedStyle((segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color : null;
|
|
10250
|
+
}
|
|
10251
|
+
else {
|
|
10252
|
+
args.rightLabelColor = trElement.querySelector('.' + rightLabelContainer) &&
|
|
10253
|
+
(trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) ?
|
|
10254
|
+
getComputedStyle((trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color : null;
|
|
10255
|
+
args.leftLabelColor = trElement.querySelector('.' + leftLabelContainer) &&
|
|
10256
|
+
(trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) ?
|
|
10257
|
+
getComputedStyle((trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color : null;
|
|
10258
|
+
}
|
|
10221
10259
|
this.parent.trigger('queryTaskbarInfo', args, function (taskbarArgs) {
|
|
10222
10260
|
_this.updateQueryTaskbarInfoArgs(taskbarArgs, rowElement, triggerTaskbarElement);
|
|
10223
10261
|
});
|
|
@@ -10235,6 +10273,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10235
10273
|
var trElement = args.rowElement;
|
|
10236
10274
|
var taskbarElement = args.taskbarElement;
|
|
10237
10275
|
var classCollections = this.getClassName(args);
|
|
10276
|
+
var segmentRowElement;
|
|
10277
|
+
if (args.data.ganttProperties.segments && args.data.ganttProperties.segments.length > 0) {
|
|
10278
|
+
segmentRowElement = trElement.parentElement.parentElement.parentElement;
|
|
10279
|
+
}
|
|
10238
10280
|
if (args.taskbarType === 'Milestone') {
|
|
10239
10281
|
if (taskbarElement.querySelector(classCollections[0]) &&
|
|
10240
10282
|
getComputedStyle(taskbarElement.querySelector(classCollections[0])).borderBottomColor !== args.milestoneColor) {
|
|
@@ -10246,6 +10288,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10246
10288
|
trElement.querySelector(classCollections[1]).style.borderBottomColor = args.baselineColor;
|
|
10247
10289
|
trElement.querySelector('.' + baselineMilestoneBottom).style.borderTopColor = args.baselineColor;
|
|
10248
10290
|
}
|
|
10291
|
+
if (trElement.querySelector('.' + baselineBar) &&
|
|
10292
|
+
getComputedStyle(trElement.querySelector('.' + baselineBar)).borderTopColor !== args.baselineColor) {
|
|
10293
|
+
trElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
|
|
10294
|
+
}
|
|
10249
10295
|
}
|
|
10250
10296
|
else {
|
|
10251
10297
|
if (taskbarElement.querySelector(classCollections[0]) &&
|
|
@@ -10280,20 +10326,42 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
10280
10326
|
getComputedStyle(taskbarElement.querySelector('.' + taskLabel)).color !== args.taskLabelColor) {
|
|
10281
10327
|
taskbarElement.querySelector('.' + taskLabel).style.color = args.taskLabelColor;
|
|
10282
10328
|
}
|
|
10283
|
-
if (
|
|
10284
|
-
|
|
10285
|
-
|
|
10329
|
+
if (segmentRowElement) {
|
|
10330
|
+
if (segmentRowElement.querySelector('.' + baselineBar) &&
|
|
10331
|
+
getComputedStyle(segmentRowElement.querySelector('.' + baselineBar)).backgroundColor !== args.baselineColor) {
|
|
10332
|
+
segmentRowElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
|
|
10333
|
+
}
|
|
10334
|
+
}
|
|
10335
|
+
else {
|
|
10336
|
+
if (trElement.querySelector('.' + baselineBar) &&
|
|
10337
|
+
getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor !== args.baselineColor) {
|
|
10338
|
+
trElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
|
|
10339
|
+
}
|
|
10286
10340
|
}
|
|
10287
10341
|
}
|
|
10288
|
-
if (
|
|
10289
|
-
(
|
|
10290
|
-
|
|
10291
|
-
|
|
10342
|
+
if (segmentRowElement) {
|
|
10343
|
+
if (segmentRowElement.querySelector('.' + leftLabelContainer) &&
|
|
10344
|
+
(segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) &&
|
|
10345
|
+
getComputedStyle((segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color !== args.leftLabelColor) {
|
|
10346
|
+
(segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label).style.color = args.leftLabelColor;
|
|
10347
|
+
}
|
|
10348
|
+
if (segmentRowElement.querySelector('.' + rightLabelContainer) &&
|
|
10349
|
+
(segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) &&
|
|
10350
|
+
getComputedStyle((segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color !== args.rightLabelColor) {
|
|
10351
|
+
(segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label).style.color = args.rightLabelColor;
|
|
10352
|
+
}
|
|
10292
10353
|
}
|
|
10293
|
-
|
|
10294
|
-
(trElement.querySelector('.' +
|
|
10295
|
-
|
|
10296
|
-
|
|
10354
|
+
else {
|
|
10355
|
+
if (trElement.querySelector('.' + leftLabelContainer) &&
|
|
10356
|
+
(trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) &&
|
|
10357
|
+
getComputedStyle((trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color !== args.leftLabelColor) {
|
|
10358
|
+
(trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label).style.color = args.leftLabelColor;
|
|
10359
|
+
}
|
|
10360
|
+
if (trElement.querySelector('.' + rightLabelContainer) &&
|
|
10361
|
+
(trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) &&
|
|
10362
|
+
getComputedStyle((trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color !== args.rightLabelColor) {
|
|
10363
|
+
(trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label).style.color = args.rightLabelColor;
|
|
10364
|
+
}
|
|
10297
10365
|
}
|
|
10298
10366
|
};
|
|
10299
10367
|
ChartRows.prototype.getClassName = function (args) {
|
|
@@ -10904,9 +10972,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10904
10972
|
var flatData = this.parent.flatData;
|
|
10905
10973
|
var totLength = this.parent.flatData.length;
|
|
10906
10974
|
for (var count = 0; count < totLength; count++) {
|
|
10907
|
-
if (flatData[count].ganttProperties.
|
|
10975
|
+
if (flatData[count].ganttProperties.predecessorsName) {
|
|
10908
10976
|
this.validatePredecessorDates(flatData[count]);
|
|
10909
|
-
if (flatData[count].hasChildRecords && this.parent.editModule) {
|
|
10977
|
+
if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks) {
|
|
10910
10978
|
this.parent.editModule['updateChildItems'](flatData[count]);
|
|
10911
10979
|
}
|
|
10912
10980
|
}
|
|
@@ -10918,6 +10986,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
10918
10986
|
for (var i = parentPredecessorLength - 1; i >= 0; i--) {
|
|
10919
10987
|
var item = this.parentPredecessors[i];
|
|
10920
10988
|
this.validatePredecessorDates(item);
|
|
10989
|
+
if (item.ganttProperties.startDate) {
|
|
10990
|
+
this.parent.editModule['updateChildItems'](item);
|
|
10991
|
+
}
|
|
10921
10992
|
}
|
|
10922
10993
|
}
|
|
10923
10994
|
};
|
|
@@ -15539,18 +15610,24 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
15539
15610
|
*/
|
|
15540
15611
|
/* eslint-disable-next-line */
|
|
15541
15612
|
Gantt.prototype.setRecordValue = function (field, value, record, isTaskData) {
|
|
15613
|
+
value = isUndefined(value) ? null : value;
|
|
15542
15614
|
if (this.isOnEdit || this.isOnDelete) {
|
|
15543
15615
|
this.makeCloneData(field, record, isTaskData);
|
|
15544
|
-
var
|
|
15616
|
+
var ganttData = isTaskData ? record : record.ganttProperties;
|
|
15617
|
+
var id = ganttData.rowUniqueID;
|
|
15545
15618
|
var task = this.getRecordByID(id);
|
|
15546
|
-
|
|
15619
|
+
var isValid = false;
|
|
15620
|
+
if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(ganttData[field]) && (value instanceof Date ? value.getTime() !==
|
|
15621
|
+
ganttData[field].getTime() : ganttData[field] !== value))) {
|
|
15622
|
+
isValid = true;
|
|
15623
|
+
}
|
|
15624
|
+
if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
|
|
15547
15625
|
this.editedRecords.push(task);
|
|
15548
15626
|
if (this.enableImmutableMode) {
|
|
15549
15627
|
this.modifiedRecords.push(task);
|
|
15550
15628
|
}
|
|
15551
15629
|
}
|
|
15552
15630
|
}
|
|
15553
|
-
value = isUndefined(value) ? null : value;
|
|
15554
15631
|
setValue(field, value, record);
|
|
15555
15632
|
};
|
|
15556
15633
|
Gantt.prototype.makeCloneData = function (field, record, isTaskData) {
|
|
@@ -23500,7 +23577,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
23500
23577
|
if ((key === tasks.baselineStartDate || key === tasks.baselineEndDate) &&
|
|
23501
23578
|
(ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate)) {
|
|
23502
23579
|
ganttObj.setRecordValue('baselineStartDate', ganttObj.dataOperation.checkBaselineStartDate(ganttData.ganttProperties.baselineStartDate), ganttData.ganttProperties, true);
|
|
23503
|
-
|
|
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
|
+
}
|
|
23504
23583
|
ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
|
|
23505
23584
|
ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
|
|
23506
23585
|
ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
|
|
@@ -25833,6 +25912,12 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25833
25912
|
else {
|
|
25834
25913
|
_this.parent.showSpinner();
|
|
25835
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
|
+
}
|
|
25836
25921
|
if (!isNullOrUndefined(args.data[tempTaskID])) {
|
|
25837
25922
|
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
25838
25923
|
args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
|