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