gantt-task-react-powern 0.4.21 → 0.4.23
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/README.md +1 -1
- package/dist/index.js +13 -20
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +13 -20
- package/dist/index.modern.js.map +1 -1
- package/dist/types/public-types.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2348,8 +2348,8 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
|
2348
2348
|
|
|
2349
2349
|
var Gantt = function Gantt(_ref) {
|
|
2350
2350
|
var tasks = _ref.tasks,
|
|
2351
|
-
_ref$
|
|
2352
|
-
|
|
2351
|
+
_ref$leafTasks = _ref.leafTasks,
|
|
2352
|
+
leafTasks = _ref$leafTasks === void 0 ? [] : _ref$leafTasks,
|
|
2353
2353
|
_ref$headerHeight = _ref.headerHeight,
|
|
2354
2354
|
headerHeight = _ref$headerHeight === void 0 ? 50 : _ref$headerHeight,
|
|
2355
2355
|
_ref$columnWidth = _ref.columnWidth,
|
|
@@ -2520,7 +2520,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
2520
2520
|
viewMode: viewMode
|
|
2521
2521
|
});
|
|
2522
2522
|
|
|
2523
|
-
var _getCriticalPaths = getCriticalPaths(
|
|
2523
|
+
var _getCriticalPaths = getCriticalPaths(leafTasks),
|
|
2524
2524
|
primaryPath = _getCriticalPaths[0],
|
|
2525
2525
|
secondaryPath = _getCriticalPaths[1];
|
|
2526
2526
|
|
|
@@ -2795,27 +2795,20 @@ var Gantt = function Gantt(_ref) {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
|
|
2797
2797
|
function colorPath(path, color, tasks) {
|
|
2798
|
-
var
|
|
2799
|
-
var
|
|
2800
|
-
|
|
2801
|
-
|
|
2798
|
+
for (var i = 0; i < path.length; i++) {
|
|
2799
|
+
for (var j = 0; j < tasks.length; j++) {
|
|
2800
|
+
if (path[i].id.startsWith(tasks[j].id + ".")) {
|
|
2801
|
+
var _tasks$j$styles;
|
|
2802
2802
|
|
|
2803
|
-
|
|
2804
|
-
if (!task.styles) task.styles = {};
|
|
2805
|
-
task.styles.criticalPathColor = color;
|
|
2806
|
-
task = tasks.find(function (otherTask) {
|
|
2807
|
-
var _task;
|
|
2803
|
+
var _styles = (_tasks$j$styles = tasks[j].styles) != null ? _tasks$j$styles : {};
|
|
2808
2804
|
|
|
2809
|
-
|
|
2810
|
-
|
|
2805
|
+
_styles.criticalPathColor = color;
|
|
2806
|
+
tasks[j].styles = _styles;
|
|
2807
|
+
}
|
|
2811
2808
|
}
|
|
2812
|
-
};
|
|
2813
|
-
|
|
2814
|
-
for (var i = 0; i < path.length; i++) {
|
|
2815
|
-
_loop(i);
|
|
2816
2809
|
}
|
|
2817
2810
|
|
|
2818
|
-
var
|
|
2811
|
+
var _loop = function _loop(_i) {
|
|
2819
2812
|
var arrows = path[_i].criticalPathArrows;
|
|
2820
2813
|
if (!arrows) arrows = [];
|
|
2821
2814
|
var arrow = arrows.find(function (arrow) {
|
|
@@ -2829,7 +2822,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
2829
2822
|
};
|
|
2830
2823
|
|
|
2831
2824
|
for (var _i = 0; _i + 1 < path.length; _i++) {
|
|
2832
|
-
|
|
2825
|
+
_loop(_i);
|
|
2833
2826
|
}
|
|
2834
2827
|
}
|
|
2835
2828
|
|