devexpress-gantt 2.0.36 → 2.0.40
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/dist/dx-gantt.css +2 -2
- package/dist/dx-gantt.js +80 -21
- package/dist/dx-gantt.min.css +2 -2
- package/dist/dx-gantt.min.js +5 -5
- package/package.json +1 -1
package/dist/dx-gantt.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt)
|
|
3
|
-
* Version: 2.0.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 2.0.40
|
|
4
|
+
* Build date: Wed Jul 07 2021
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|
package/dist/dx-gantt.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt)
|
|
3
|
-
* Version: 2.0.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 2.0.40
|
|
4
|
+
* Build date: Wed Jul 07 2021
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|
|
@@ -1881,6 +1881,12 @@ var DateRange = (function () {
|
|
|
1881
1881
|
this.start = start;
|
|
1882
1882
|
this.end = end;
|
|
1883
1883
|
}
|
|
1884
|
+
DateRange.prototype.equal = function (date) {
|
|
1885
|
+
var result = true;
|
|
1886
|
+
result = result && this.start.getTime() === date.start.getTime();
|
|
1887
|
+
result = result && this.end.getTime() === date.end.getTime();
|
|
1888
|
+
return result;
|
|
1889
|
+
};
|
|
1884
1890
|
return DateRange;
|
|
1885
1891
|
}());
|
|
1886
1892
|
exports.DateRange = DateRange;
|
|
@@ -2631,10 +2637,12 @@ var GridLayoutCalculator = (function () {
|
|
|
2631
2637
|
var autoCalculatedParent = this.viewModel.parentAutoCalc && this.viewModel.taskHasChildrenByIndex(index);
|
|
2632
2638
|
if (task.isMilestone())
|
|
2633
2639
|
result += " dx-gantt-milestone";
|
|
2634
|
-
else
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2640
|
+
else {
|
|
2641
|
+
if (taskWidth <= this.elementSizeValues.smallTaskWidth)
|
|
2642
|
+
result += " dx-gantt-smallTask";
|
|
2643
|
+
if (autoCalculatedParent)
|
|
2644
|
+
result += this.getAutoCalcParentTaskClassName(task);
|
|
2645
|
+
}
|
|
2638
2646
|
return result;
|
|
2639
2647
|
};
|
|
2640
2648
|
GridLayoutCalculator.prototype.getAutoCalcParentTaskClassName = function (task) {
|
|
@@ -5448,6 +5456,7 @@ var ValidationSettings = (function () {
|
|
|
5448
5456
|
function ValidationSettings() {
|
|
5449
5457
|
this.validateDependencies = false;
|
|
5450
5458
|
this.autoUpdateParentTasks = false;
|
|
5459
|
+
this.enablePredecessorGap = false;
|
|
5451
5460
|
}
|
|
5452
5461
|
ValidationSettings.parse = function (settings) {
|
|
5453
5462
|
var result = new ValidationSettings();
|
|
@@ -5456,13 +5465,16 @@ var ValidationSettings = (function () {
|
|
|
5456
5465
|
result.validateDependencies = settings.validateDependencies;
|
|
5457
5466
|
if (common_1.isDefined(settings.autoUpdateParentTasks))
|
|
5458
5467
|
result.autoUpdateParentTasks = settings.autoUpdateParentTasks;
|
|
5468
|
+
if (common_1.isDefined(settings.enablePredecessorGap))
|
|
5469
|
+
result.enablePredecessorGap = settings.enablePredecessorGap;
|
|
5459
5470
|
}
|
|
5460
5471
|
return result;
|
|
5461
5472
|
};
|
|
5462
5473
|
ValidationSettings.prototype.equal = function (settings) {
|
|
5463
5474
|
var result = true;
|
|
5464
|
-
result = result && this.validateDependencies
|
|
5465
|
-
result = result && this.autoUpdateParentTasks
|
|
5475
|
+
result = result && this.validateDependencies === settings.validateDependencies;
|
|
5476
|
+
result = result && this.autoUpdateParentTasks === settings.autoUpdateParentTasks;
|
|
5477
|
+
result = result && this.enablePredecessorGap === settings.enablePredecessorGap;
|
|
5466
5478
|
return result;
|
|
5467
5479
|
};
|
|
5468
5480
|
return ValidationSettings;
|
|
@@ -7340,6 +7352,8 @@ var GanttView = (function () {
|
|
|
7340
7352
|
GanttView.prototype.getVisibleDependencyKeys = function () { return this.viewModel.getVisibleDependencies().map(function (d) { return d.id; }); };
|
|
7341
7353
|
GanttView.prototype.getVisibleResourceKeys = function () { return this.viewModel.getVisibleResources().map(function (r) { return r.id; }); };
|
|
7342
7354
|
GanttView.prototype.getVisibleResourceAssignmentKeys = function () { return this.viewModel.getVisibleResourceAssignments().map(function (a) { return a.id; }); };
|
|
7355
|
+
GanttView.prototype.getTasksExpandedState = function () { return this.viewModel.getTasksExpandedState(); };
|
|
7356
|
+
GanttView.prototype.applyTasksExpandedState = function (state) { this.viewModel.applyTasksExpandedState(state); };
|
|
7343
7357
|
GanttView.prototype.setTaskValue = function (id, fieldName, newValue) {
|
|
7344
7358
|
var manager = this.commandManager;
|
|
7345
7359
|
var task = this.getTaskByPublicId(id);
|
|
@@ -7730,6 +7744,21 @@ var ViewVisualModel = (function () {
|
|
|
7730
7744
|
task.internalId = hash[id];
|
|
7731
7745
|
}
|
|
7732
7746
|
};
|
|
7747
|
+
ViewVisualModel.prototype.getTasksExpandedState = function () {
|
|
7748
|
+
var items = this.tasks.items;
|
|
7749
|
+
var state = {};
|
|
7750
|
+
items.forEach(function (t) { return state[t.id] = t.expanded; });
|
|
7751
|
+
return state;
|
|
7752
|
+
};
|
|
7753
|
+
ViewVisualModel.prototype.applyTasksExpandedState = function (state) {
|
|
7754
|
+
if (!state)
|
|
7755
|
+
return;
|
|
7756
|
+
this.beginUpdate();
|
|
7757
|
+
for (var key in state)
|
|
7758
|
+
if (Object.prototype.hasOwnProperty.call(state, key))
|
|
7759
|
+
this.changeTaskExpanded(key, state[key]);
|
|
7760
|
+
this.endUpdate();
|
|
7761
|
+
};
|
|
7733
7762
|
ViewVisualModel.prototype.changed = function () {
|
|
7734
7763
|
if (this._fLockCount !== 0)
|
|
7735
7764
|
return;
|
|
@@ -7777,6 +7806,14 @@ var ViewVisualModel = (function () {
|
|
|
7777
7806
|
enumerable: false,
|
|
7778
7807
|
configurable: true
|
|
7779
7808
|
});
|
|
7809
|
+
Object.defineProperty(ViewVisualModel.prototype, "enablePredecessorGap", {
|
|
7810
|
+
get: function () {
|
|
7811
|
+
var settings = this.owner && this.owner.settings;
|
|
7812
|
+
return settings && settings.validation && settings.validation.enablePredecessorGap;
|
|
7813
|
+
},
|
|
7814
|
+
enumerable: false,
|
|
7815
|
+
configurable: true
|
|
7816
|
+
});
|
|
7780
7817
|
Object.defineProperty(ViewVisualModel.prototype, "requireFirstLoadParentAutoCalc", {
|
|
7781
7818
|
get: function () { return this.parentAutoCalc && this.owner.requireFirstLoadParentAutoCalc(); },
|
|
7782
7819
|
enumerable: false,
|
|
@@ -12886,6 +12923,7 @@ var ValidationError = (function () {
|
|
|
12886
12923
|
exports.ValidationError = ValidationError;
|
|
12887
12924
|
var ValidationController = (function () {
|
|
12888
12925
|
function ValidationController(gantt) {
|
|
12926
|
+
this.lockPredecessorToSuccessor = true;
|
|
12889
12927
|
this.gantt = gantt;
|
|
12890
12928
|
}
|
|
12891
12929
|
Object.defineProperty(ValidationController.prototype, "viewModel", {
|
|
@@ -12902,6 +12940,13 @@ var ValidationController = (function () {
|
|
|
12902
12940
|
enumerable: false,
|
|
12903
12941
|
configurable: true
|
|
12904
12942
|
});
|
|
12943
|
+
Object.defineProperty(ValidationController.prototype, "enablePredecessorGap", {
|
|
12944
|
+
get: function () {
|
|
12945
|
+
return this.viewModel.enablePredecessorGap;
|
|
12946
|
+
},
|
|
12947
|
+
enumerable: false,
|
|
12948
|
+
configurable: true
|
|
12949
|
+
});
|
|
12905
12950
|
ValidationController.prototype.checkStartDependencies = function (taskId, date) {
|
|
12906
12951
|
var _this = this;
|
|
12907
12952
|
var result = [];
|
|
@@ -12945,24 +12990,31 @@ var ValidationController = (function () {
|
|
|
12945
12990
|
if (isMoveNotRequired)
|
|
12946
12991
|
return;
|
|
12947
12992
|
var successorRangeBeforeMove = new DateRange_1.DateRange(new Date(successorTask.start.getTime()), new Date(successorTask.end.getTime()));
|
|
12948
|
-
var validTaskRange = new DateRange_1.DateRange(new Date(), new Date());
|
|
12993
|
+
var validTaskRange = new DateRange_1.DateRange(new Date(successorTask.start.getTime()), new Date(successorTask.end.getTime()));
|
|
12949
12994
|
var delta = predecessorTask.end.getTime() - predecessorPreviousEndDate.getTime();
|
|
12950
|
-
|
|
12995
|
+
var predecessorEnd = _this.enablePredecessorGap ? predecessorTask.end : predecessorPreviousEndDate;
|
|
12996
|
+
if (dependency.type === Dependency_1.DependencyType.FS
|
|
12997
|
+
&& (successorTask.start < predecessorEnd
|
|
12998
|
+
|| (_this.lockPredecessorToSuccessor && successorTask.start.getTime() === predecessorPreviousEndDate.getTime()))) {
|
|
12951
12999
|
validTaskRange.start.setTime(predecessorTask.end.getTime());
|
|
12952
13000
|
validTaskRange.end.setTime(validTaskRange.start.getTime() + (successorTask.end.getTime() - successorTask.start.getTime()));
|
|
12953
13001
|
_this.correctMoving(successorTask.internalId, validTaskRange);
|
|
12954
13002
|
}
|
|
12955
|
-
else if (dependency.type === Dependency_1.DependencyType.FF
|
|
13003
|
+
else if (dependency.type === Dependency_1.DependencyType.FF
|
|
13004
|
+
&& (successorTask.end < predecessorEnd
|
|
13005
|
+
|| (_this.lockPredecessorToSuccessor && successorTask.end.getTime() === predecessorPreviousEndDate.getTime()))) {
|
|
12956
13006
|
validTaskRange.start.setTime(predecessorTask.end.getTime() - (successorTask.end.getTime() - successorTask.start.getTime()));
|
|
12957
13007
|
validTaskRange.end.setTime(predecessorTask.end.getTime());
|
|
12958
13008
|
_this.correctMoving(successorTask.internalId, validTaskRange);
|
|
12959
13009
|
}
|
|
12960
|
-
else {
|
|
13010
|
+
else if (!_this.enablePredecessorGap) {
|
|
12961
13011
|
validTaskRange.start.setTime(successorTask.start.getTime() + delta);
|
|
12962
13012
|
validTaskRange.end.setTime(successorTask.end.getTime() + delta);
|
|
12963
13013
|
}
|
|
12964
|
-
|
|
12965
|
-
|
|
13014
|
+
if (!successorRangeBeforeMove.equal(validTaskRange)) {
|
|
13015
|
+
_this.history.addAndRedo(new TaskPropertiesHistoryItem_1.TaskMoveHistoryItem(_this.gantt.modelManipulator, dependency.successorId, validTaskRange));
|
|
13016
|
+
_this.moveRelatedTasks(dependency, successorRangeBeforeMove, successorTask, validTaskRange);
|
|
13017
|
+
}
|
|
12966
13018
|
});
|
|
12967
13019
|
};
|
|
12968
13020
|
ValidationController.prototype.moveStartDependTasks = function (predecessorTaskId, predecessorPreviousStartDate, isAfterCorrectParents) {
|
|
@@ -12976,24 +13028,31 @@ var ValidationController = (function () {
|
|
|
12976
13028
|
if (isMoveNotRequired)
|
|
12977
13029
|
return;
|
|
12978
13030
|
var successorRangeBeforeMove = new DateRange_1.DateRange(new Date(successorTask.start.getTime()), new Date(successorTask.end.getTime()));
|
|
12979
|
-
var validTaskRange = new DateRange_1.DateRange(new Date(), new Date());
|
|
13031
|
+
var validTaskRange = new DateRange_1.DateRange(new Date(successorTask.start.getTime()), new Date(successorTask.end.getTime()));
|
|
12980
13032
|
var delta = predecessorTask.start.getTime() - predecessorPreviousStartDate.getTime();
|
|
12981
|
-
|
|
13033
|
+
var predecessorStart = _this.enablePredecessorGap ? predecessorTask.start : predecessorPreviousStartDate;
|
|
13034
|
+
if (dependency.type === Dependency_1.DependencyType.SF
|
|
13035
|
+
&& (successorTask.end < predecessorStart
|
|
13036
|
+
|| (_this.lockPredecessorToSuccessor && successorTask.end.getTime() === predecessorPreviousStartDate.getTime()))) {
|
|
12982
13037
|
validTaskRange.start.setTime(predecessorTask.start.getTime() - (successorTask.end.getTime() - successorTask.start.getTime()));
|
|
12983
13038
|
validTaskRange.end.setTime(predecessorTask.start.getTime());
|
|
12984
13039
|
_this.correctMoving(successorTask.internalId, validTaskRange);
|
|
12985
13040
|
}
|
|
12986
|
-
else if (dependency.type === Dependency_1.DependencyType.SS
|
|
13041
|
+
else if (dependency.type === Dependency_1.DependencyType.SS
|
|
13042
|
+
&& (successorTask.start < predecessorStart
|
|
13043
|
+
|| (_this.lockPredecessorToSuccessor && successorTask.start.getTime() === predecessorPreviousStartDate.getTime()))) {
|
|
12987
13044
|
validTaskRange.start.setTime(predecessorTask.start.getTime());
|
|
12988
13045
|
validTaskRange.end.setTime(predecessorTask.start.getTime() + (successorTask.end.getTime() - successorTask.start.getTime()));
|
|
12989
13046
|
_this.correctMoving(successorTask.internalId, validTaskRange);
|
|
12990
13047
|
}
|
|
12991
|
-
else {
|
|
13048
|
+
else if (!_this.enablePredecessorGap) {
|
|
12992
13049
|
validTaskRange.start.setTime(successorTask.start.getTime() + delta);
|
|
12993
13050
|
validTaskRange.end.setTime(successorTask.end.getTime() + delta);
|
|
12994
13051
|
}
|
|
12995
|
-
|
|
12996
|
-
|
|
13052
|
+
if (!successorRangeBeforeMove.equal(validTaskRange)) {
|
|
13053
|
+
_this.history.addAndRedo(new TaskPropertiesHistoryItem_1.TaskMoveHistoryItem(_this.gantt.modelManipulator, dependency.successorId, validTaskRange));
|
|
13054
|
+
_this.moveRelatedTasks(dependency, successorRangeBeforeMove, successorTask, validTaskRange);
|
|
13055
|
+
}
|
|
12997
13056
|
});
|
|
12998
13057
|
};
|
|
12999
13058
|
ValidationController.prototype.moveRelatedTasks = function (dependency, successorRangeBeforeMove, successorTask, validTaskRange) {
|
|
@@ -13058,7 +13117,7 @@ var ValidationController = (function () {
|
|
|
13058
13117
|
data["end"] = end;
|
|
13059
13118
|
data["oldStart"] = parent.task.start;
|
|
13060
13119
|
data["oldEnd"] = parent.task.end;
|
|
13061
|
-
progress = Math.
|
|
13120
|
+
progress = totalDuration > 0 ? Math.round(progress / totalDuration) : 0;
|
|
13062
13121
|
if (progress !== parent.task.progress)
|
|
13063
13122
|
data["progress"] = progress;
|
|
13064
13123
|
calcStepCallback(data);
|
package/dist/dx-gantt.min.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt.min)
|
|
3
|
-
* Version: 2.0.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 2.0.40
|
|
4
|
+
* Build date: Wed Jul 07 2021
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|