gantt-task-react-powern 0.4.81 → 0.4.83
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/index.css +30 -0
- package/dist/index.js +33 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +33 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -310,6 +310,36 @@
|
|
|
310
310
|
position: relative;
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
+
._2AxB2 {
|
|
314
|
+
padding: 10px;
|
|
315
|
+
margin: 5px 0px 5px 0px;
|
|
316
|
+
border-radius: 15px;
|
|
317
|
+
max-width: 50vw;
|
|
318
|
+
z-index: 1000;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
._2AxB2._1a-EU {
|
|
322
|
+
background-color: rgba(0, 255, 0, 0.2);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
._2AxB2._1TP0x {
|
|
326
|
+
background-color: rgba(255, 255, 0, 0.2);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
._2AxB2._2TeAI {
|
|
330
|
+
background-color: rgba(255, 0, 0, 0.2);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
._3cBUj {
|
|
334
|
+
display: none; /* Hide the actual checkbox */
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
._5jQM6 {
|
|
338
|
+
float: right;
|
|
339
|
+
font-size: 20px;
|
|
340
|
+
font-weight: bold;
|
|
341
|
+
cursor: pointer;
|
|
342
|
+
}
|
|
313
343
|
._2k9Ys {
|
|
314
344
|
overflow: auto;
|
|
315
345
|
max-width: 100%;
|
package/dist/index.js
CHANGED
|
@@ -2594,7 +2594,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2594
2594
|
})));
|
|
2595
2595
|
};
|
|
2596
2596
|
|
|
2597
|
-
var styles$9 = {"ganttVerticalContainer":"_CZjuD","horizontalContainer":"_2B2zv","wrapper":"_3eULf"};
|
|
2597
|
+
var styles$9 = {"ganttVerticalContainer":"_CZjuD","horizontalContainer":"_2B2zv","wrapper":"_3eULf","alertContainer":"_2AxB2","success":"_1a-EU","warning":"_1TP0x","error":"_2TeAI","alertDismissCheckbox":"_3cBUj","alertCloseButton":"_5jQM6"};
|
|
2598
2598
|
|
|
2599
2599
|
var TaskGantt = function TaskGantt(_ref) {
|
|
2600
2600
|
var gridProps = _ref.gridProps,
|
|
@@ -2838,6 +2838,10 @@ var Gantt = function Gantt(_ref) {
|
|
|
2838
2838
|
ignoreScrollEvent = _useState12[0],
|
|
2839
2839
|
setIgnoreScrollEvent = _useState12[1];
|
|
2840
2840
|
|
|
2841
|
+
var _useState13 = React.useState(false),
|
|
2842
|
+
hasCircularDeps = _useState13[0],
|
|
2843
|
+
setHasCircularDeps = _useState13[1];
|
|
2844
|
+
|
|
2841
2845
|
React.useEffect(function () {
|
|
2842
2846
|
if (scheduleType === "lookAhead" && startDate && endDate) {
|
|
2843
2847
|
setDateSetup({
|
|
@@ -2886,6 +2890,10 @@ var Gantt = function Gantt(_ref) {
|
|
|
2886
2890
|
primaryPath = _getCriticalPaths[0],
|
|
2887
2891
|
secondaryPath = _getCriticalPaths[1];
|
|
2888
2892
|
|
|
2893
|
+
if (leafTasks.length > 0 && primaryPath.length === 0 && secondaryPath.length === 0) {
|
|
2894
|
+
setHasCircularDeps(true);
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2889
2897
|
uncolorAll(tasks);
|
|
2890
2898
|
|
|
2891
2899
|
if (scheduleType !== "lookAhead") {
|
|
@@ -3027,6 +3035,16 @@ var Gantt = function Gantt(_ref) {
|
|
|
3027
3035
|
}
|
|
3028
3036
|
};
|
|
3029
3037
|
|
|
3038
|
+
var hideAlert = function hideAlert() {
|
|
3039
|
+
var checkbox = document.getElementById("alert-dismiss");
|
|
3040
|
+
var alert = document.getElementById("alert-container");
|
|
3041
|
+
|
|
3042
|
+
if (checkbox.checked) {
|
|
3043
|
+
localStorage.setItem('hideCircularDepsAlert', 'true');
|
|
3044
|
+
alert.style.display = "None";
|
|
3045
|
+
}
|
|
3046
|
+
};
|
|
3047
|
+
|
|
3030
3048
|
var handleKeyDown = function handleKeyDown(event) {
|
|
3031
3049
|
event.preventDefault();
|
|
3032
3050
|
var newScrollY = scrollY;
|
|
@@ -3175,7 +3193,20 @@ var Gantt = function Gantt(_ref) {
|
|
|
3175
3193
|
taskLabelRenderer: taskLabelRenderer,
|
|
3176
3194
|
onMultiSelect: onMultiSelect
|
|
3177
3195
|
};
|
|
3178
|
-
return React__default.createElement("div", null, React__default.createElement("div", {
|
|
3196
|
+
return React__default.createElement("div", null, hasCircularDeps && localStorage.getItem('hideCircularDepsAlert') !== 'true' && React__default.createElement("div", {
|
|
3197
|
+
id: "alert-container",
|
|
3198
|
+
className: styles$9.alertContainer + " " + styles$9.warning
|
|
3199
|
+
}, React__default.createElement("input", {
|
|
3200
|
+
type: "checkbox",
|
|
3201
|
+
id: "alert-dismiss",
|
|
3202
|
+
className: styles$9.alertDismissCheckbox,
|
|
3203
|
+
onChange: hideAlert
|
|
3204
|
+
}), React__default.createElement("label", {
|
|
3205
|
+
htmlFor: "alert-dismiss",
|
|
3206
|
+
className: styles$9.alertCloseButton
|
|
3207
|
+
}, "\xD7"), React__default.createElement("div", {
|
|
3208
|
+
className: styles$9.alertContent
|
|
3209
|
+
}, React__default.createElement("p", null, "Critical path could not be displayed due to circular dependencies"))), React__default.createElement("div", {
|
|
3179
3210
|
className: styles$9.wrapper,
|
|
3180
3211
|
onKeyDown: handleKeyDown,
|
|
3181
3212
|
tabIndex: 0,
|