gantt-task-react-powern 0.6.16 → 0.6.19
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/components/task-list/task-list.d.ts +2 -0
- package/dist/index.css +11 -3
- package/dist/index.js +337 -116
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +337 -116
- package/dist/index.modern.js.map +1 -1
- package/dist/types/public-types.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -315,7 +315,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
|
|
|
315
315
|
minWidth: parseInt(rowWidth) * 0.8,
|
|
316
316
|
maxWidth: parseInt(rowWidth) * 0.8
|
|
317
317
|
}
|
|
318
|
-
}, "
|
|
318
|
+
}, "ID"), React.createElement("div", {
|
|
319
319
|
className: styles.ganttTable_HeaderSeparator,
|
|
320
320
|
style: {
|
|
321
321
|
height: headerHeight * 0.5,
|
|
@@ -327,7 +327,7 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
|
|
|
327
327
|
minWidth: parseInt(rowWidth) * 0.8,
|
|
328
328
|
maxWidth: parseInt(rowWidth) * 0.8
|
|
329
329
|
}
|
|
330
|
-
}, "ID"), React.createElement("div", {
|
|
330
|
+
}, "WBS Code / Activity ID"), React.createElement("div", {
|
|
331
331
|
className: styles.ganttTable_HeaderSeparator,
|
|
332
332
|
style: {
|
|
333
333
|
height: headerHeight * 0.5,
|
|
@@ -381,7 +381,72 @@ var TaskListHeaderDefault = function TaskListHeaderDefault(_ref) {
|
|
|
381
381
|
minWidth: parseInt(rowWidth) * 0.6
|
|
382
382
|
},
|
|
383
383
|
title: "Planned End"
|
|
384
|
-
}, "Actual End")
|
|
384
|
+
}, "Actual End"), scheduleType === "main" && React.createElement(React.Fragment, null, React.createElement("div", {
|
|
385
|
+
className: styles.ganttTable_HeaderSeparator,
|
|
386
|
+
style: {
|
|
387
|
+
height: headerHeight * 0.5,
|
|
388
|
+
marginTop: headerHeight * 0.25
|
|
389
|
+
}
|
|
390
|
+
}), React.createElement("div", {
|
|
391
|
+
className: styles.ganttTable_HeaderItem,
|
|
392
|
+
style: {
|
|
393
|
+
minWidth: parseInt(rowWidth) * 0.6,
|
|
394
|
+
maxWidth: parseInt(rowWidth) * 0.6
|
|
395
|
+
},
|
|
396
|
+
title: "% Complete"
|
|
397
|
+
}, "% Complete"), React.createElement("div", {
|
|
398
|
+
className: styles.ganttTable_HeaderSeparator,
|
|
399
|
+
style: {
|
|
400
|
+
height: headerHeight * 0.5,
|
|
401
|
+
marginTop: headerHeight * 0.25
|
|
402
|
+
}
|
|
403
|
+
}), React.createElement("div", {
|
|
404
|
+
className: styles.ganttTable_HeaderItem,
|
|
405
|
+
style: {
|
|
406
|
+
minWidth: parseInt(rowWidth) * 0.6,
|
|
407
|
+
maxWidth: parseInt(rowWidth) * 0.6
|
|
408
|
+
},
|
|
409
|
+
title: "Planned Duration"
|
|
410
|
+
}, "Planned Duration"), React.createElement("div", {
|
|
411
|
+
className: styles.ganttTable_HeaderSeparator,
|
|
412
|
+
style: {
|
|
413
|
+
height: headerHeight * 0.5,
|
|
414
|
+
marginTop: headerHeight * 0.25
|
|
415
|
+
}
|
|
416
|
+
}), React.createElement("div", {
|
|
417
|
+
className: styles.ganttTable_HeaderItem,
|
|
418
|
+
style: {
|
|
419
|
+
minWidth: parseInt(rowWidth) * 0.7,
|
|
420
|
+
maxWidth: parseInt(rowWidth) * 0.7
|
|
421
|
+
},
|
|
422
|
+
title: "Remaining Duration"
|
|
423
|
+
}, "Remaining Duration"), React.createElement("div", {
|
|
424
|
+
className: styles.ganttTable_HeaderSeparator,
|
|
425
|
+
style: {
|
|
426
|
+
height: headerHeight * 0.5,
|
|
427
|
+
marginTop: headerHeight * 0.25
|
|
428
|
+
}
|
|
429
|
+
}), React.createElement("div", {
|
|
430
|
+
className: styles.ganttTable_HeaderItem,
|
|
431
|
+
style: {
|
|
432
|
+
minWidth: parseInt(rowWidth) * 0.6,
|
|
433
|
+
maxWidth: parseInt(rowWidth) * 0.6
|
|
434
|
+
},
|
|
435
|
+
title: "Actual Duration"
|
|
436
|
+
}, "Actual Duration"), React.createElement("div", {
|
|
437
|
+
className: styles.ganttTable_HeaderSeparator,
|
|
438
|
+
style: {
|
|
439
|
+
height: headerHeight * 0.5,
|
|
440
|
+
marginTop: headerHeight * 0.25
|
|
441
|
+
}
|
|
442
|
+
}), React.createElement("div", {
|
|
443
|
+
className: styles.ganttTable_HeaderItem,
|
|
444
|
+
style: {
|
|
445
|
+
minWidth: parseInt(rowWidth) * 0.8,
|
|
446
|
+
maxWidth: parseInt(rowWidth) * 0.8
|
|
447
|
+
},
|
|
448
|
+
title: "Duration Type"
|
|
449
|
+
}, "Duration Type"))));
|
|
385
450
|
};
|
|
386
451
|
|
|
387
452
|
var styles$1 = {"taskListWrapper":"_3ZbQT","taskListTableRow":"_34SS0","taskListLookAheadRow":"_GzvG4","taskListMilestoneRow":"_3Ykml","taskListCell":"_3lLk3","taskListNameWrapper":"_nI1Xw","taskListExpander":"_2QjE6","taskListExpanderPlaceholder":"_1fnLB","taskListEmptyExpander":"_2TfEi","taskListText":"_2ZvXU"};
|
|
@@ -592,7 +657,61 @@ var TaskListTableDefault = function TaskListTableDefault(_ref) {
|
|
|
592
657
|
}
|
|
593
658
|
}, React.createElement("div", {
|
|
594
659
|
className: styles$1.taskListText
|
|
595
|
-
}, "\xA0", toLocaleDateString(t.actualEnd, dateTimeOptions))))
|
|
660
|
+
}, "\xA0", toLocaleDateString(t.actualEnd, dateTimeOptions))), scheduleType === "main" && function () {
|
|
661
|
+
var _t$progress, _t$durationType;
|
|
662
|
+
|
|
663
|
+
var percentComplete = t.percentComplete != null ? t.percentComplete : (_t$progress = t.progress) != null ? _t$progress : 0;
|
|
664
|
+
var plannedDuration = t.plannedDuration != null ? t.plannedDuration : null;
|
|
665
|
+
var remainingDuration = plannedDuration != null ? Math.round(plannedDuration - plannedDuration * (percentComplete / 100)) : null;
|
|
666
|
+
|
|
667
|
+
var actualDuration = function () {
|
|
668
|
+
if (!t.actualStart || t.actualStart.getTime() === 0) return null;
|
|
669
|
+
var endRef = t.actualEnd && t.actualEnd.getTime() > 0 ? t.actualEnd : new Date();
|
|
670
|
+
return Math.ceil((endRef.getTime() - t.actualStart.getTime()) / (1000 * 60 * 60 * 24));
|
|
671
|
+
}();
|
|
672
|
+
|
|
673
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
674
|
+
className: styles$1.taskListCell,
|
|
675
|
+
style: {
|
|
676
|
+
minWidth: parseInt(rowWidth) * 0.5,
|
|
677
|
+
maxWidth: parseInt(rowWidth) * 0.5
|
|
678
|
+
}
|
|
679
|
+
}, React.createElement("div", {
|
|
680
|
+
className: styles$1.taskListText
|
|
681
|
+
}, "\xA0", percentComplete != null ? percentComplete + "%" : "")), React.createElement("div", {
|
|
682
|
+
className: styles$1.taskListCell,
|
|
683
|
+
style: {
|
|
684
|
+
minWidth: parseInt(rowWidth) * 0.6,
|
|
685
|
+
maxWidth: parseInt(rowWidth) * 0.6
|
|
686
|
+
}
|
|
687
|
+
}, React.createElement("div", {
|
|
688
|
+
className: styles$1.taskListText
|
|
689
|
+
}, "\xA0", plannedDuration != null ? plannedDuration : "")), React.createElement("div", {
|
|
690
|
+
className: styles$1.taskListCell,
|
|
691
|
+
style: {
|
|
692
|
+
minWidth: parseInt(rowWidth) * 0.7,
|
|
693
|
+
maxWidth: parseInt(rowWidth) * 0.7
|
|
694
|
+
}
|
|
695
|
+
}, React.createElement("div", {
|
|
696
|
+
className: styles$1.taskListText
|
|
697
|
+
}, "\xA0", remainingDuration != null ? remainingDuration : "")), React.createElement("div", {
|
|
698
|
+
className: styles$1.taskListCell,
|
|
699
|
+
style: {
|
|
700
|
+
minWidth: parseInt(rowWidth) * 0.6,
|
|
701
|
+
maxWidth: parseInt(rowWidth) * 0.6
|
|
702
|
+
}
|
|
703
|
+
}, React.createElement("div", {
|
|
704
|
+
className: styles$1.taskListText
|
|
705
|
+
}, "\xA0", actualDuration != null ? actualDuration : "")), React.createElement("div", {
|
|
706
|
+
className: styles$1.taskListCell,
|
|
707
|
+
style: {
|
|
708
|
+
minWidth: parseInt(rowWidth) * 0.8,
|
|
709
|
+
maxWidth: parseInt(rowWidth) * 0.8
|
|
710
|
+
}
|
|
711
|
+
}, React.createElement("div", {
|
|
712
|
+
className: styles$1.taskListText
|
|
713
|
+
}, "\xA0", (_t$durationType = t.durationType) != null ? _t$durationType : "Activity Calendar")));
|
|
714
|
+
}()));
|
|
596
715
|
}));
|
|
597
716
|
};
|
|
598
717
|
|
|
@@ -751,6 +870,8 @@ var VerticalScroll = function VerticalScroll(_ref) {
|
|
|
751
870
|
}));
|
|
752
871
|
};
|
|
753
872
|
|
|
873
|
+
var styles$4 = {"hideScrollbar":"_38emS"};
|
|
874
|
+
|
|
754
875
|
var TaskList = function TaskList(_ref) {
|
|
755
876
|
var headerHeight = _ref.headerHeight,
|
|
756
877
|
fontFamily = _ref.fontFamily,
|
|
@@ -771,7 +892,9 @@ var TaskList = function TaskList(_ref) {
|
|
|
771
892
|
TaskListHeader = _ref.TaskListHeader,
|
|
772
893
|
TaskListTable = _ref.TaskListTable,
|
|
773
894
|
taskLabelRenderer = _ref.taskLabelRenderer,
|
|
774
|
-
onMultiSelect = _ref.onMultiSelect
|
|
895
|
+
onMultiSelect = _ref.onMultiSelect,
|
|
896
|
+
containerWidth = _ref.containerWidth,
|
|
897
|
+
innerScrollRef = _ref.innerScrollRef;
|
|
775
898
|
var horizontalContainerRef = useRef(null);
|
|
776
899
|
|
|
777
900
|
var _useState = useState([]),
|
|
@@ -949,7 +1072,18 @@ var TaskList = function TaskList(_ref) {
|
|
|
949
1072
|
virtualItems: virtualizer.getVirtualItems()
|
|
950
1073
|
};
|
|
951
1074
|
return React.createElement("div", {
|
|
952
|
-
ref: taskListRef
|
|
1075
|
+
ref: taskListRef,
|
|
1076
|
+
style: containerWidth != null ? {
|
|
1077
|
+
width: containerWidth,
|
|
1078
|
+
overflow: "hidden",
|
|
1079
|
+
flexShrink: 0
|
|
1080
|
+
} : {}
|
|
1081
|
+
}, React.createElement("div", {
|
|
1082
|
+
ref: innerScrollRef,
|
|
1083
|
+
className: styles$4.hideScrollbar,
|
|
1084
|
+
style: {
|
|
1085
|
+
overflowX: "auto"
|
|
1086
|
+
}
|
|
953
1087
|
}, React.createElement(TaskListHeader, Object.assign({}, headerProps)), React.createElement("div", {
|
|
954
1088
|
ref: horizontalContainerRef,
|
|
955
1089
|
className: horizontalContainerClass,
|
|
@@ -962,10 +1096,10 @@ var TaskList = function TaskList(_ref) {
|
|
|
962
1096
|
width: "100%",
|
|
963
1097
|
position: "relative"
|
|
964
1098
|
}
|
|
965
|
-
}, React.createElement(TaskListTable, Object.assign({}, tableProps)))));
|
|
1099
|
+
}, React.createElement(TaskListTable, Object.assign({}, tableProps))))));
|
|
966
1100
|
};
|
|
967
1101
|
|
|
968
|
-
var styles$
|
|
1102
|
+
var styles$5 = {"gridRow":"_2dZTy","gridRowLookAhead":"_2RRca","gridRowLine":"_3rUKi","gridTick":"_RuwuK","darkerGridRow":"_2M-tt"};
|
|
969
1103
|
|
|
970
1104
|
var GridBody = function GridBody(_ref) {
|
|
971
1105
|
var tasks = _ref.tasks,
|
|
@@ -1046,7 +1180,7 @@ var GridBody = function GridBody(_ref) {
|
|
|
1046
1180
|
y1: visibleStartY,
|
|
1047
1181
|
x2: i * columnWidth,
|
|
1048
1182
|
y2: visibleEndY,
|
|
1049
|
-
className: styles$
|
|
1183
|
+
className: styles$5.gridTick
|
|
1050
1184
|
});
|
|
1051
1185
|
});
|
|
1052
1186
|
var rowBackgrounds = [];
|
|
@@ -1057,7 +1191,7 @@ var GridBody = function GridBody(_ref) {
|
|
|
1057
1191
|
y1: visibleStartY,
|
|
1058
1192
|
x2: svgWidth,
|
|
1059
1193
|
y2: visibleStartY,
|
|
1060
|
-
className: styles$
|
|
1194
|
+
className: styles$5.gridRowLine
|
|
1061
1195
|
}));
|
|
1062
1196
|
|
|
1063
1197
|
for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) {
|
|
@@ -1066,7 +1200,7 @@ var GridBody = function GridBody(_ref) {
|
|
|
1066
1200
|
if (!task) break;
|
|
1067
1201
|
var y = vi.start;
|
|
1068
1202
|
var isMilestone = task.type === "milestone";
|
|
1069
|
-
var rowClass = isMilestone ? styles$
|
|
1203
|
+
var rowClass = isMilestone ? styles$5.darkerGridRow : scheduleType === "lookAhead" ? styles$5.gridRowLookAhead : styles$5.gridRow;
|
|
1070
1204
|
rowBackgrounds.push(React.createElement("rect", {
|
|
1071
1205
|
key: "bg-" + vi.key,
|
|
1072
1206
|
x: 0,
|
|
@@ -1081,7 +1215,7 @@ var GridBody = function GridBody(_ref) {
|
|
|
1081
1215
|
y1: y + rowHeight,
|
|
1082
1216
|
x2: svgWidth,
|
|
1083
1217
|
y2: y + rowHeight,
|
|
1084
|
-
className: styles$
|
|
1218
|
+
className: styles$5.gridRowLine
|
|
1085
1219
|
}));
|
|
1086
1220
|
}
|
|
1087
1221
|
|
|
@@ -1106,7 +1240,7 @@ var Grid = function Grid(props) {
|
|
|
1106
1240
|
}, React.createElement(GridBody, Object.assign({}, props)));
|
|
1107
1241
|
};
|
|
1108
1242
|
|
|
1109
|
-
var styles$
|
|
1243
|
+
var styles$6 = {"calendarBottomText":"_9w8d5","calendarTopTick":"_1rLuZ","calendarTopText":"_2q1Kt","calendarHeader":"_35nLX","textAnchorStart":"_2Shd-","textAnchorMiddle":"_2XXW4","textAnchorEnd":"_3GdnC"};
|
|
1110
1244
|
|
|
1111
1245
|
var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
|
|
1112
1246
|
var value = _ref.value,
|
|
@@ -1117,7 +1251,7 @@ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
|
|
|
1117
1251
|
yText = _ref.yText,
|
|
1118
1252
|
_ref$textAnchor = _ref.textAnchor,
|
|
1119
1253
|
textAnchor = _ref$textAnchor === void 0 ? "middle" : _ref$textAnchor;
|
|
1120
|
-
var textAnchorClass = textAnchor === "start" ? styles$
|
|
1254
|
+
var textAnchorClass = textAnchor === "start" ? styles$6.textAnchorStart : textAnchor === "middle" ? styles$6.textAnchorMiddle : styles$6.textAnchorEnd;
|
|
1121
1255
|
return React.createElement("g", {
|
|
1122
1256
|
className: "calendarTop"
|
|
1123
1257
|
}, React.createElement("line", {
|
|
@@ -1125,13 +1259,13 @@ var TopPartOfCalendar = function TopPartOfCalendar(_ref) {
|
|
|
1125
1259
|
y1: y1Line,
|
|
1126
1260
|
x2: x1Line,
|
|
1127
1261
|
y2: y2Line,
|
|
1128
|
-
className: styles$
|
|
1262
|
+
className: styles$6.calendarTopTick,
|
|
1129
1263
|
key: value + "line"
|
|
1130
1264
|
}), React.createElement("text", {
|
|
1131
1265
|
key: value + "text",
|
|
1132
1266
|
y: yText,
|
|
1133
1267
|
x: xText,
|
|
1134
|
-
className: styles$
|
|
1268
|
+
className: styles$6.calendarTopText + " " + textAnchorClass
|
|
1135
1269
|
}, value));
|
|
1136
1270
|
};
|
|
1137
1271
|
|
|
@@ -1157,7 +1291,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
1157
1291
|
key: date.getFullYear(),
|
|
1158
1292
|
y: headerHeight * 0.8,
|
|
1159
1293
|
x: columnWidth * i + columnWidth * 0.5,
|
|
1160
|
-
className: styles$
|
|
1294
|
+
className: styles$6.calendarBottomText
|
|
1161
1295
|
}, bottomValue));
|
|
1162
1296
|
|
|
1163
1297
|
if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
|
|
@@ -1198,7 +1332,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
1198
1332
|
key: bottomValue + "-" + date.getFullYear(),
|
|
1199
1333
|
y: headerHeight * 0.8,
|
|
1200
1334
|
x: columnWidth * i + columnWidth * 0.5,
|
|
1201
|
-
className: styles$
|
|
1335
|
+
className: styles$6.calendarBottomText
|
|
1202
1336
|
}, bottomValue));
|
|
1203
1337
|
|
|
1204
1338
|
if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
|
|
@@ -1240,7 +1374,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
1240
1374
|
key: bottomValue + date.getFullYear(),
|
|
1241
1375
|
y: headerHeight * 0.8,
|
|
1242
1376
|
x: columnWidth * i + columnWidth * 0.5,
|
|
1243
|
-
className: styles$
|
|
1377
|
+
className: styles$6.calendarTopText + " " + styles$6.textAnchorEnd
|
|
1244
1378
|
}, bottomValue));
|
|
1245
1379
|
|
|
1246
1380
|
if (i === 0 || date.getFullYear() !== dateSetup.dates[i - 1].getFullYear()) {
|
|
@@ -1290,7 +1424,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
1290
1424
|
key: date.getTime(),
|
|
1291
1425
|
y: headerHeight * 0.8,
|
|
1292
1426
|
x: columnWidth * (i + +rtl),
|
|
1293
|
-
className: styles$
|
|
1427
|
+
className: styles$6.calendarTopText + " " + styles$6.textAnchorStart
|
|
1294
1428
|
}, bottomValue));
|
|
1295
1429
|
|
|
1296
1430
|
if (topValue) {
|
|
@@ -1329,7 +1463,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
1329
1463
|
key: date.getTime(),
|
|
1330
1464
|
y: headerHeight * 0.8,
|
|
1331
1465
|
x: columnWidth * i + columnWidth * 0.5,
|
|
1332
|
-
className: styles$
|
|
1466
|
+
className: styles$6.calendarTopText + " " + styles$6.textAnchorMiddle
|
|
1333
1467
|
}, bottomValue));
|
|
1334
1468
|
|
|
1335
1469
|
if (i + 1 !== dates.length && date.getMonth() !== dates[i + 1].getMonth()) {
|
|
@@ -1379,7 +1513,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
1379
1513
|
key: date.getTime(),
|
|
1380
1514
|
y: headerHeight * 0.8,
|
|
1381
1515
|
x: columnWidth * (i + +rtl),
|
|
1382
|
-
className: styles$
|
|
1516
|
+
className: styles$6.calendarTopText + " " + styles$6.textAnchorMiddle,
|
|
1383
1517
|
fontFamily: fontFamily
|
|
1384
1518
|
}, bottomValue));
|
|
1385
1519
|
|
|
@@ -1415,7 +1549,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
1415
1549
|
key: date.getTime(),
|
|
1416
1550
|
y: headerHeight * 0.8,
|
|
1417
1551
|
x: columnWidth * (i + +rtl),
|
|
1418
|
-
className: styles$
|
|
1552
|
+
className: styles$6.calendarBottomText,
|
|
1419
1553
|
fontFamily: fontFamily
|
|
1420
1554
|
}, bottomValue));
|
|
1421
1555
|
|
|
@@ -1502,7 +1636,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
1502
1636
|
y: 0,
|
|
1503
1637
|
width: columnWidth * dateSetup.dates.length,
|
|
1504
1638
|
height: headerHeight,
|
|
1505
|
-
className: styles$
|
|
1639
|
+
className: styles$6.calendarHeader
|
|
1506
1640
|
}), bottomValues, " ", topValues);
|
|
1507
1641
|
};
|
|
1508
1642
|
|
|
@@ -2154,7 +2288,7 @@ var BarDisplay = function BarDisplay(_ref) {
|
|
|
2154
2288
|
}));
|
|
2155
2289
|
};
|
|
2156
2290
|
|
|
2157
|
-
var styles$
|
|
2291
|
+
var styles$7 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
|
|
2158
2292
|
|
|
2159
2293
|
var BarDateHandle = function BarDateHandle(_ref) {
|
|
2160
2294
|
var x = _ref.x,
|
|
@@ -2168,7 +2302,7 @@ var BarDateHandle = function BarDateHandle(_ref) {
|
|
|
2168
2302
|
y: y,
|
|
2169
2303
|
width: width,
|
|
2170
2304
|
height: height,
|
|
2171
|
-
className: styles$
|
|
2305
|
+
className: styles$7.barHandle,
|
|
2172
2306
|
ry: barCornerRadius,
|
|
2173
2307
|
rx: barCornerRadius,
|
|
2174
2308
|
onMouseDown: onMouseDown
|
|
@@ -2194,7 +2328,7 @@ var Bar = function Bar(_ref) {
|
|
|
2194
2328
|
|
|
2195
2329
|
if (type == "planned") {
|
|
2196
2330
|
if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2) >= 0 && task.x2 - task.x1 >= 0) return React.createElement("g", {
|
|
2197
|
-
className: styles$
|
|
2331
|
+
className: styles$7.barWrapper,
|
|
2198
2332
|
tabIndex: 0
|
|
2199
2333
|
}, React.createElement(BarDisplay, {
|
|
2200
2334
|
x: task.x1,
|
|
@@ -2238,12 +2372,12 @@ var Bar = function Bar(_ref) {
|
|
|
2238
2372
|
onEventStart("progress", task, e, "planned");
|
|
2239
2373
|
}
|
|
2240
2374
|
})));else return React.createElement("g", {
|
|
2241
|
-
className: styles$
|
|
2375
|
+
className: styles$7.barWrapper,
|
|
2242
2376
|
tabIndex: 0
|
|
2243
2377
|
});
|
|
2244
2378
|
} else if ((task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2) >= 0 && task.actualx2 - task.actualx1 >= 0) {
|
|
2245
2379
|
return React.createElement("g", {
|
|
2246
|
-
className: styles$
|
|
2380
|
+
className: styles$7.barWrapper,
|
|
2247
2381
|
tabIndex: 0
|
|
2248
2382
|
}, React.createElement(BarDisplay, {
|
|
2249
2383
|
x: task.actualx1,
|
|
@@ -2289,7 +2423,7 @@ var Bar = function Bar(_ref) {
|
|
|
2289
2423
|
})));
|
|
2290
2424
|
} else {
|
|
2291
2425
|
return React.createElement("g", {
|
|
2292
|
-
className: styles$
|
|
2426
|
+
className: styles$7.barWrapper,
|
|
2293
2427
|
tabIndex: 0
|
|
2294
2428
|
});
|
|
2295
2429
|
}
|
|
@@ -2304,7 +2438,7 @@ var BarSmall = function BarSmall(_ref) {
|
|
|
2304
2438
|
isSelected = _ref.isSelected;
|
|
2305
2439
|
var progressPoint = getProgressPoint(task.progressWidth + task.x1, task.y, task.height);
|
|
2306
2440
|
return React.createElement("g", {
|
|
2307
|
-
className: styles$
|
|
2441
|
+
className: styles$7.barWrapper,
|
|
2308
2442
|
tabIndex: 0
|
|
2309
2443
|
}, React.createElement(BarDisplay, {
|
|
2310
2444
|
x: task.x1,
|
|
@@ -2332,7 +2466,7 @@ var BarSmall = function BarSmall(_ref) {
|
|
|
2332
2466
|
})));
|
|
2333
2467
|
};
|
|
2334
2468
|
|
|
2335
|
-
var styles$
|
|
2469
|
+
var styles$8 = {"milestoneWrapper":"_RRr13","milestoneBackground":"_2P2B1"};
|
|
2336
2470
|
|
|
2337
2471
|
var Milestone = function Milestone(_ref) {
|
|
2338
2472
|
var task = _ref.task,
|
|
@@ -2347,7 +2481,7 @@ var Milestone = function Milestone(_ref) {
|
|
|
2347
2481
|
|
|
2348
2482
|
return React.createElement("g", {
|
|
2349
2483
|
tabIndex: 0,
|
|
2350
|
-
className: styles$
|
|
2484
|
+
className: styles$8.milestoneWrapper
|
|
2351
2485
|
}, React.createElement("rect", {
|
|
2352
2486
|
fill: getBarColor(),
|
|
2353
2487
|
x: task.x1,
|
|
@@ -2357,7 +2491,7 @@ var Milestone = function Milestone(_ref) {
|
|
|
2357
2491
|
rx: task.barCornerRadius,
|
|
2358
2492
|
ry: task.barCornerRadius,
|
|
2359
2493
|
transform: transform,
|
|
2360
|
-
className: styles$
|
|
2494
|
+
className: styles$8.milestoneBackground,
|
|
2361
2495
|
onMouseDown: function onMouseDown(e) {
|
|
2362
2496
|
isDateChangeable && onEventStart("move", task, e, "planned");
|
|
2363
2497
|
},
|
|
@@ -2367,7 +2501,7 @@ var Milestone = function Milestone(_ref) {
|
|
|
2367
2501
|
}));
|
|
2368
2502
|
};
|
|
2369
2503
|
|
|
2370
|
-
var styles$
|
|
2504
|
+
var styles$9 = {"projectWrapper":"_1KJ6x","projectBackground":"_2RbVy","projectTop":"_2pZMF"};
|
|
2371
2505
|
|
|
2372
2506
|
var Project = function Project(_ref) {
|
|
2373
2507
|
var task = _ref.task,
|
|
@@ -2379,7 +2513,7 @@ var Project = function Project(_ref) {
|
|
|
2379
2513
|
var projectRightTriangle = [task.x2, task.y + task.height / 2 - 1, task.x2, task.y + task.height, task.x2 - 15, task.y + task.height / 2 - 1].join(",");
|
|
2380
2514
|
return React.createElement("g", {
|
|
2381
2515
|
tabIndex: 0,
|
|
2382
|
-
className: styles$
|
|
2516
|
+
className: styles$9.projectWrapper
|
|
2383
2517
|
}, React.createElement("rect", {
|
|
2384
2518
|
fill: barColor,
|
|
2385
2519
|
x: task.x1,
|
|
@@ -2388,7 +2522,7 @@ var Project = function Project(_ref) {
|
|
|
2388
2522
|
height: task.height,
|
|
2389
2523
|
rx: task.barCornerRadius,
|
|
2390
2524
|
ry: task.barCornerRadius,
|
|
2391
|
-
className: styles$
|
|
2525
|
+
className: styles$9.projectBackground
|
|
2392
2526
|
}), React.createElement("rect", {
|
|
2393
2527
|
x: task.progressX,
|
|
2394
2528
|
width: task.progressWidth,
|
|
@@ -2405,13 +2539,13 @@ var Project = function Project(_ref) {
|
|
|
2405
2539
|
height: task.height / 2,
|
|
2406
2540
|
rx: task.barCornerRadius,
|
|
2407
2541
|
ry: task.barCornerRadius,
|
|
2408
|
-
className: styles$
|
|
2542
|
+
className: styles$9.projectTop
|
|
2409
2543
|
}), React.createElement("polygon", {
|
|
2410
|
-
className: styles$
|
|
2544
|
+
className: styles$9.projectTop,
|
|
2411
2545
|
points: projectLeftTriangle,
|
|
2412
2546
|
fill: barColor
|
|
2413
2547
|
}), React.createElement("polygon", {
|
|
2414
|
-
className: styles$
|
|
2548
|
+
className: styles$9.projectTop,
|
|
2415
2549
|
points: projectRightTriangle,
|
|
2416
2550
|
fill: barColor
|
|
2417
2551
|
}));
|
|
@@ -2851,7 +2985,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2851
2985
|
})));
|
|
2852
2986
|
};
|
|
2853
2987
|
|
|
2854
|
-
var styles$
|
|
2988
|
+
var styles$a = {"ganttVerticalContainer":"_CZjuD","horizontalContainer":"_2B2zv","wrapper":"_3eULf","alertContainer":"_2AxB2","success":"_1a-EU","warning":"_1TP0x","error":"_2TeAI","alertDismissCheckbox":"_3cBUj","alertCloseButton":"_5jQM6","spinner":"_3HJjy","spin":"_1W2rn"};
|
|
2855
2989
|
|
|
2856
2990
|
var TaskGantt = function TaskGantt(_ref) {
|
|
2857
2991
|
var gridProps = _ref.gridProps,
|
|
@@ -2894,7 +3028,7 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
2894
3028
|
}
|
|
2895
3029
|
}, [scrollX]);
|
|
2896
3030
|
return React.createElement("div", {
|
|
2897
|
-
className: styles$
|
|
3031
|
+
className: styles$a.ganttVerticalContainer,
|
|
2898
3032
|
ref: verticalGanttContainerRef,
|
|
2899
3033
|
dir: "ltr"
|
|
2900
3034
|
}, React.createElement("svg", {
|
|
@@ -2904,7 +3038,7 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
2904
3038
|
fontFamily: barProps.fontFamily
|
|
2905
3039
|
}, React.createElement(Calendar, Object.assign({}, calendarProps))), React.createElement("div", {
|
|
2906
3040
|
ref: horizontalContainerRef,
|
|
2907
|
-
className: styles$
|
|
3041
|
+
className: styles$a.horizontalContainer,
|
|
2908
3042
|
style: ganttHeight ? {
|
|
2909
3043
|
height: ganttHeight,
|
|
2910
3044
|
width: gridProps.svgWidth
|
|
@@ -2928,7 +3062,7 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
2928
3062
|
})))));
|
|
2929
3063
|
};
|
|
2930
3064
|
|
|
2931
|
-
var
|
|
3065
|
+
var hScrollStyles = {"scrollWrapper":"_2k9Ys","scroll":"_19jgW"};
|
|
2932
3066
|
|
|
2933
3067
|
var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
2934
3068
|
var scroll = _ref.scroll,
|
|
@@ -2947,14 +3081,14 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
|
2947
3081
|
style: {
|
|
2948
3082
|
margin: rtl ? "0px " + taskListWidth + "px 0px 0px" : "0px 0px 0px " + taskListWidth + "px"
|
|
2949
3083
|
},
|
|
2950
|
-
className:
|
|
3084
|
+
className: hScrollStyles.scrollWrapper,
|
|
2951
3085
|
onScroll: onScroll,
|
|
2952
3086
|
ref: scrollRef
|
|
2953
3087
|
}, React.createElement("div", {
|
|
2954
3088
|
style: {
|
|
2955
3089
|
width: svgWidth
|
|
2956
3090
|
},
|
|
2957
|
-
className:
|
|
3091
|
+
className: hScrollStyles.scroll
|
|
2958
3092
|
}));
|
|
2959
3093
|
};
|
|
2960
3094
|
|
|
@@ -3048,8 +3182,23 @@ var Gantt = function Gantt(_ref) {
|
|
|
3048
3182
|
shouldNotShowLoadingOverlay = _ref$shouldNotShowLoa === void 0 ? true : _ref$shouldNotShowLoa;
|
|
3049
3183
|
var wrapperRef = useRef(null);
|
|
3050
3184
|
var taskListRef = useRef(null);
|
|
3185
|
+
var isDraggingTable = useRef(false);
|
|
3186
|
+
var dragStartX = useRef(0);
|
|
3187
|
+
var dragStartWidth = useRef(0);
|
|
3188
|
+
var dragMaxWidth = useRef(Infinity);
|
|
3051
3189
|
|
|
3052
|
-
var _useState = useState(
|
|
3190
|
+
var _useState = useState(null),
|
|
3191
|
+
tableContainerWidth = _useState[0],
|
|
3192
|
+
setTableContainerWidth = _useState[1];
|
|
3193
|
+
|
|
3194
|
+
var tableInnerScrollRef = useRef(null);
|
|
3195
|
+
var tableHScrollRef = useRef(null);
|
|
3196
|
+
|
|
3197
|
+
var _useState2 = useState(0),
|
|
3198
|
+
tableScrollableWidth = _useState2[0],
|
|
3199
|
+
setTableScrollableWidth = _useState2[1];
|
|
3200
|
+
|
|
3201
|
+
var _useState3 = useState(function () {
|
|
3053
3202
|
var _ganttDateRange = ganttDateRange(tasks, viewMode, preStepsCount),
|
|
3054
3203
|
startDateRange = _ganttDateRange[0],
|
|
3055
3204
|
endDateRange = _ganttDateRange[1];
|
|
@@ -3066,77 +3215,113 @@ var Gantt = function Gantt(_ref) {
|
|
|
3066
3215
|
dates: seedDates(startDateRange, endDateRange, viewMode)
|
|
3067
3216
|
};
|
|
3068
3217
|
}),
|
|
3069
|
-
dateSetup =
|
|
3070
|
-
setDateSetup =
|
|
3218
|
+
dateSetup = _useState3[0],
|
|
3219
|
+
setDateSetup = _useState3[1];
|
|
3220
|
+
|
|
3221
|
+
var _useState4 = useState(undefined),
|
|
3222
|
+
currentViewDate = _useState4[0],
|
|
3223
|
+
setCurrentViewDate = _useState4[1];
|
|
3224
|
+
|
|
3225
|
+
var _useState5 = useState(0),
|
|
3226
|
+
taskListWidth = _useState5[0],
|
|
3227
|
+
setTaskListWidth = _useState5[1];
|
|
3228
|
+
|
|
3229
|
+
useEffect(function () {
|
|
3230
|
+
if (tableInnerScrollRef.current) {
|
|
3231
|
+
setTableScrollableWidth(tableInnerScrollRef.current.scrollWidth);
|
|
3232
|
+
}
|
|
3233
|
+
}, [taskListWidth, listCellWidth]);
|
|
3234
|
+
|
|
3235
|
+
var handleTableResizeMouseDown = function handleTableResizeMouseDown(e) {
|
|
3236
|
+
var _taskListRef$current$, _taskListRef$current, _tableInnerScrollRef$, _tableInnerScrollRef$2, _wrapperRef$current$o, _wrapperRef$current;
|
|
3237
|
+
|
|
3238
|
+
isDraggingTable.current = true;
|
|
3239
|
+
dragStartX.current = e.clientX;
|
|
3240
|
+
dragStartWidth.current = tableContainerWidth != null ? tableContainerWidth : (_taskListRef$current$ = (_taskListRef$current = taskListRef.current) === null || _taskListRef$current === void 0 ? void 0 : _taskListRef$current.offsetWidth) != null ? _taskListRef$current$ : 0;
|
|
3241
|
+
dragMaxWidth.current = (_tableInnerScrollRef$ = (_tableInnerScrollRef$2 = tableInnerScrollRef.current) === null || _tableInnerScrollRef$2 === void 0 ? void 0 : _tableInnerScrollRef$2.scrollWidth) != null ? _tableInnerScrollRef$ : Math.max(100, ((_wrapperRef$current$o = (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 ? void 0 : _wrapperRef$current.offsetWidth) != null ? _wrapperRef$current$o : Infinity) - 200);
|
|
3242
|
+
e.preventDefault();
|
|
3243
|
+
};
|
|
3244
|
+
|
|
3245
|
+
useEffect(function () {
|
|
3246
|
+
var onMouseMove = function onMouseMove(e) {
|
|
3247
|
+
if (!isDraggingTable.current) return;
|
|
3248
|
+
var newWidth = Math.min(dragMaxWidth.current, Math.max(100, dragStartWidth.current + (e.clientX - dragStartX.current)));
|
|
3249
|
+
setTableContainerWidth(newWidth);
|
|
3250
|
+
setTaskListWidth(newWidth);
|
|
3251
|
+
};
|
|
3071
3252
|
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3253
|
+
var onMouseUp = function onMouseUp() {
|
|
3254
|
+
isDraggingTable.current = false;
|
|
3255
|
+
};
|
|
3075
3256
|
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3257
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
3258
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
3259
|
+
return function () {
|
|
3260
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
3261
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
3262
|
+
};
|
|
3263
|
+
}, []);
|
|
3079
3264
|
|
|
3080
|
-
var
|
|
3081
|
-
svgContainerWidth =
|
|
3082
|
-
setSvgContainerWidth =
|
|
3265
|
+
var _useState6 = useState(0),
|
|
3266
|
+
svgContainerWidth = _useState6[0],
|
|
3267
|
+
setSvgContainerWidth = _useState6[1];
|
|
3083
3268
|
|
|
3084
|
-
var
|
|
3085
|
-
svgContainerHeight =
|
|
3086
|
-
setSvgContainerHeight =
|
|
3269
|
+
var _useState7 = useState(ganttHeight),
|
|
3270
|
+
svgContainerHeight = _useState7[0],
|
|
3271
|
+
setSvgContainerHeight = _useState7[1];
|
|
3087
3272
|
|
|
3088
|
-
var
|
|
3089
|
-
barTasks =
|
|
3090
|
-
setBarTasks =
|
|
3273
|
+
var _useState8 = useState([]),
|
|
3274
|
+
barTasks = _useState8[0],
|
|
3275
|
+
setBarTasks = _useState8[1];
|
|
3091
3276
|
|
|
3092
3277
|
var debounceRef = useRef(null);
|
|
3093
3278
|
|
|
3094
|
-
var
|
|
3279
|
+
var _useState9 = useState({
|
|
3095
3280
|
action: ""
|
|
3096
3281
|
}),
|
|
3097
|
-
ganttEvent =
|
|
3098
|
-
setGanttEvent =
|
|
3282
|
+
ganttEvent = _useState9[0],
|
|
3283
|
+
setGanttEvent = _useState9[1];
|
|
3099
3284
|
|
|
3100
3285
|
var taskHeight = useMemo(function () {
|
|
3101
3286
|
return rowHeight * barFill / 100;
|
|
3102
3287
|
}, [rowHeight, barFill]);
|
|
3103
3288
|
|
|
3104
|
-
var
|
|
3105
|
-
selectedTask =
|
|
3106
|
-
setSelectedTask =
|
|
3289
|
+
var _useState10 = useState(),
|
|
3290
|
+
selectedTask = _useState10[0],
|
|
3291
|
+
setSelectedTask = _useState10[1];
|
|
3107
3292
|
|
|
3108
|
-
var
|
|
3109
|
-
failedTask =
|
|
3110
|
-
setFailedTask =
|
|
3293
|
+
var _useState11 = useState(null),
|
|
3294
|
+
failedTask = _useState11[0],
|
|
3295
|
+
setFailedTask = _useState11[1];
|
|
3111
3296
|
|
|
3112
3297
|
var svgWidth = columnWidth < 55 ? (dateSetup.dates.length + 0.5) * columnWidth : dateSetup.dates.length * columnWidth;
|
|
3113
3298
|
var ganttFullHeight = useMemo(function () {
|
|
3114
3299
|
return barTasks.length * rowHeight;
|
|
3115
3300
|
}, [barTasks.length, rowHeight]);
|
|
3116
3301
|
|
|
3117
|
-
var
|
|
3118
|
-
scrollY =
|
|
3119
|
-
setScrollY =
|
|
3302
|
+
var _useState12 = useState(0),
|
|
3303
|
+
scrollY = _useState12[0],
|
|
3304
|
+
setScrollY = _useState12[1];
|
|
3120
3305
|
|
|
3121
|
-
var
|
|
3122
|
-
scrollX =
|
|
3123
|
-
setScrollX =
|
|
3306
|
+
var _useState13 = useState(-1),
|
|
3307
|
+
scrollX = _useState13[0],
|
|
3308
|
+
setScrollX = _useState13[1];
|
|
3124
3309
|
|
|
3125
|
-
var
|
|
3126
|
-
ignoreScrollEvent =
|
|
3127
|
-
setIgnoreScrollEvent =
|
|
3310
|
+
var _useState14 = useState(false),
|
|
3311
|
+
ignoreScrollEvent = _useState14[0],
|
|
3312
|
+
setIgnoreScrollEvent = _useState14[1];
|
|
3128
3313
|
|
|
3129
|
-
var
|
|
3130
|
-
lastTouchX =
|
|
3131
|
-
setLastTouchX =
|
|
3314
|
+
var _useState15 = useState(0),
|
|
3315
|
+
lastTouchX = _useState15[0],
|
|
3316
|
+
setLastTouchX = _useState15[1];
|
|
3132
3317
|
|
|
3133
|
-
var
|
|
3134
|
-
lastTouchY =
|
|
3135
|
-
setLastTouchY =
|
|
3318
|
+
var _useState16 = useState(0),
|
|
3319
|
+
lastTouchY = _useState16[0],
|
|
3320
|
+
setLastTouchY = _useState16[1];
|
|
3136
3321
|
|
|
3137
|
-
var
|
|
3138
|
-
isProcessing =
|
|
3139
|
-
setIsProcessing =
|
|
3322
|
+
var _useState17 = useState(false),
|
|
3323
|
+
isProcessing = _useState17[0],
|
|
3324
|
+
setIsProcessing = _useState17[1];
|
|
3140
3325
|
|
|
3141
3326
|
var buffer = rowHeight * 10;
|
|
3142
3327
|
var visibleStartY = scrollY - buffer;
|
|
@@ -3279,7 +3464,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3279
3464
|
}
|
|
3280
3465
|
}, [ganttHeight, tasks, headerHeight, rowHeight]);
|
|
3281
3466
|
useEffect(function () {
|
|
3282
|
-
var _wrapperRef$
|
|
3467
|
+
var _wrapperRef$current2, _wrapperRef$current3, _wrapperRef$current4, _wrapperRef$current5;
|
|
3283
3468
|
|
|
3284
3469
|
var handleWheel = function handleWheel(event) {
|
|
3285
3470
|
if (event.shiftKey || event.deltaX) {
|
|
@@ -3353,25 +3538,25 @@ var Gantt = function Gantt(_ref) {
|
|
|
3353
3538
|
setIgnoreScrollEvent(true);
|
|
3354
3539
|
};
|
|
3355
3540
|
|
|
3356
|
-
(_wrapperRef$
|
|
3541
|
+
(_wrapperRef$current2 = wrapperRef.current) === null || _wrapperRef$current2 === void 0 ? void 0 : _wrapperRef$current2.addEventListener("wheel", handleWheel, {
|
|
3357
3542
|
passive: false
|
|
3358
3543
|
});
|
|
3359
|
-
(_wrapperRef$
|
|
3544
|
+
(_wrapperRef$current3 = wrapperRef.current) === null || _wrapperRef$current3 === void 0 ? void 0 : _wrapperRef$current3.addEventListener("touchmove", handleTouch, {
|
|
3360
3545
|
passive: false
|
|
3361
3546
|
});
|
|
3362
|
-
(_wrapperRef$
|
|
3547
|
+
(_wrapperRef$current4 = wrapperRef.current) === null || _wrapperRef$current4 === void 0 ? void 0 : _wrapperRef$current4.addEventListener("touchstart", handleLogTouch, {
|
|
3363
3548
|
passive: false
|
|
3364
3549
|
});
|
|
3365
|
-
(_wrapperRef$
|
|
3550
|
+
(_wrapperRef$current5 = wrapperRef.current) === null || _wrapperRef$current5 === void 0 ? void 0 : _wrapperRef$current5.addEventListener("touchend", handleLogTouch, {
|
|
3366
3551
|
passive: false
|
|
3367
3552
|
});
|
|
3368
3553
|
return function () {
|
|
3369
|
-
var _wrapperRef$
|
|
3554
|
+
var _wrapperRef$current6, _wrapperRef$current7, _wrapperRef$current8, _wrapperRef$current9;
|
|
3370
3555
|
|
|
3371
|
-
(_wrapperRef$
|
|
3372
|
-
(_wrapperRef$
|
|
3373
|
-
(_wrapperRef$current7 = wrapperRef.current) === null || _wrapperRef$current7 === void 0 ? void 0 : _wrapperRef$current7.removeEventListener("touchend", handleLogTouch);
|
|
3556
|
+
(_wrapperRef$current6 = wrapperRef.current) === null || _wrapperRef$current6 === void 0 ? void 0 : _wrapperRef$current6.removeEventListener("wheel", handleWheel);
|
|
3557
|
+
(_wrapperRef$current7 = wrapperRef.current) === null || _wrapperRef$current7 === void 0 ? void 0 : _wrapperRef$current7.removeEventListener("touchmove", handleTouch);
|
|
3374
3558
|
(_wrapperRef$current8 = wrapperRef.current) === null || _wrapperRef$current8 === void 0 ? void 0 : _wrapperRef$current8.removeEventListener("touchend", handleLogTouch);
|
|
3559
|
+
(_wrapperRef$current9 = wrapperRef.current) === null || _wrapperRef$current9 === void 0 ? void 0 : _wrapperRef$current9.removeEventListener("touchend", handleLogTouch);
|
|
3375
3560
|
};
|
|
3376
3561
|
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight]);
|
|
3377
3562
|
|
|
@@ -3534,7 +3719,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3534
3719
|
headerHeight: headerHeight,
|
|
3535
3720
|
scrollY: scrollY,
|
|
3536
3721
|
ganttHeight: ganttHeight,
|
|
3537
|
-
horizontalContainerClass: styles$
|
|
3722
|
+
horizontalContainerClass: styles$a.horizontalContainer,
|
|
3538
3723
|
selectedTask: selectedTask,
|
|
3539
3724
|
taskListRef: taskListRef,
|
|
3540
3725
|
setSelectedTask: handleSelectedTask,
|
|
@@ -3543,18 +3728,37 @@ var Gantt = function Gantt(_ref) {
|
|
|
3543
3728
|
TaskListHeader: TaskListHeader,
|
|
3544
3729
|
TaskListTable: TaskListTable,
|
|
3545
3730
|
taskLabelRenderer: taskLabelRenderer,
|
|
3546
|
-
onMultiSelect: onMultiSelect
|
|
3731
|
+
onMultiSelect: onMultiSelect,
|
|
3732
|
+
containerWidth: tableContainerWidth != null ? tableContainerWidth : undefined,
|
|
3733
|
+
innerScrollRef: tableInnerScrollRef
|
|
3547
3734
|
};
|
|
3548
3735
|
return React.createElement("div", {
|
|
3549
3736
|
style: {
|
|
3550
3737
|
position: "relative"
|
|
3551
3738
|
}
|
|
3552
3739
|
}, React.createElement("div", {
|
|
3553
|
-
className: styles$
|
|
3740
|
+
className: styles$a.wrapper,
|
|
3554
3741
|
onKeyDown: handleKeyDown,
|
|
3555
3742
|
tabIndex: 0,
|
|
3556
3743
|
ref: wrapperRef
|
|
3557
|
-
}, listCellWidth && React.createElement(TaskList, Object.assign({}, tableProps)), React.createElement(
|
|
3744
|
+
}, listCellWidth && React.createElement(TaskList, Object.assign({}, tableProps)), listCellWidth && scheduleType === "main" && React.createElement("div", {
|
|
3745
|
+
style: {
|
|
3746
|
+
width: "20px",
|
|
3747
|
+
cursor: "col-resize",
|
|
3748
|
+
backgroundColor: "#e0e0e0",
|
|
3749
|
+
flexShrink: 0,
|
|
3750
|
+
zIndex: 1,
|
|
3751
|
+
alignSelf: "stretch",
|
|
3752
|
+
display: "flex",
|
|
3753
|
+
alignItems: "center",
|
|
3754
|
+
justifyContent: "center",
|
|
3755
|
+
userSelect: "none",
|
|
3756
|
+
fontSize: "10px",
|
|
3757
|
+
color: "#666",
|
|
3758
|
+
letterSpacing: "-1px"
|
|
3759
|
+
},
|
|
3760
|
+
onMouseDown: handleTableResizeMouseDown
|
|
3761
|
+
}, "\u25C4|\u25BA"), React.createElement(TaskGantt, {
|
|
3558
3762
|
gridProps: gridProps,
|
|
3559
3763
|
calendarProps: calendarProps,
|
|
3560
3764
|
barProps: barProps,
|
|
@@ -3608,14 +3812,39 @@ var Gantt = function Gantt(_ref) {
|
|
|
3608
3812
|
fontFamily: "Arial, sans-serif"
|
|
3609
3813
|
}
|
|
3610
3814
|
}, "Loading..."), React.createElement("div", {
|
|
3611
|
-
className: styles$
|
|
3612
|
-
})), React.createElement(
|
|
3815
|
+
className: styles$a.spinner
|
|
3816
|
+
})), React.createElement("div", {
|
|
3817
|
+
style: {
|
|
3818
|
+
display: "flex"
|
|
3819
|
+
}
|
|
3820
|
+
}, listCellWidth && React.createElement("div", {
|
|
3821
|
+
ref: tableHScrollRef,
|
|
3822
|
+
className: hScrollStyles.scrollWrapper,
|
|
3823
|
+
style: {
|
|
3824
|
+
width: taskListWidth + 4,
|
|
3825
|
+
flexShrink: 0
|
|
3826
|
+
},
|
|
3827
|
+
onScroll: function onScroll(e) {
|
|
3828
|
+
if (tableInnerScrollRef.current) {
|
|
3829
|
+
tableInnerScrollRef.current.scrollLeft = e.currentTarget.scrollLeft;
|
|
3830
|
+
}
|
|
3831
|
+
}
|
|
3832
|
+
}, React.createElement("div", {
|
|
3833
|
+
style: {
|
|
3834
|
+
width: tableScrollableWidth
|
|
3835
|
+
}
|
|
3836
|
+
})), React.createElement("div", {
|
|
3837
|
+
style: {
|
|
3838
|
+
flex: 1,
|
|
3839
|
+
minWidth: 0
|
|
3840
|
+
}
|
|
3841
|
+
}, React.createElement(HorizontalScroll, {
|
|
3613
3842
|
svgWidth: svgWidth,
|
|
3614
|
-
taskListWidth:
|
|
3843
|
+
taskListWidth: 0,
|
|
3615
3844
|
scroll: scrollX,
|
|
3616
3845
|
rtl: rtl,
|
|
3617
3846
|
onScroll: handleScrollX
|
|
3618
|
-
}));
|
|
3847
|
+
}))));
|
|
3619
3848
|
};
|
|
3620
3849
|
function topologicalOrderingHelper(taskID, taskMap, sortedTaskList) {
|
|
3621
3850
|
if (!taskMap[taskID]) return true;
|
|
@@ -3677,14 +3906,6 @@ function getCriticalPaths(leafTasks) {
|
|
|
3677
3906
|
}
|
|
3678
3907
|
}
|
|
3679
3908
|
|
|
3680
|
-
var printedList = taskChainList.map(function (elem) {
|
|
3681
|
-
var newElem = _extends({}, elem);
|
|
3682
|
-
|
|
3683
|
-
newElem.duration = Math.round(elem.duration / 86400000);
|
|
3684
|
-
return newElem;
|
|
3685
|
-
});
|
|
3686
|
-
console.debug(printedList);
|
|
3687
|
-
|
|
3688
3909
|
if (taskChainList.length > 0) {
|
|
3689
3910
|
taskChainList.sort(function (a, b) {
|
|
3690
3911
|
return b.duration - a.duration;
|