gantt-task-react-powern 0.6.8 → 0.6.10
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 +19 -0
- package/dist/index.js +41 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +41 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -340,6 +340,25 @@
|
|
|
340
340
|
font-weight: bold;
|
|
341
341
|
cursor: pointer;
|
|
342
342
|
}
|
|
343
|
+
._3HJjy {
|
|
344
|
+
width: 24px;
|
|
345
|
+
height: 24px;
|
|
346
|
+
border: 4px solid rgba(0, 0, 0, 0.15);
|
|
347
|
+
border-top: 4px solid #cc0404;
|
|
348
|
+
border-radius: 50%;
|
|
349
|
+
animation: _1W2rn 1s linear infinite;
|
|
350
|
+
display: inline-block;
|
|
351
|
+
box-sizing: border-box;
|
|
352
|
+
}
|
|
353
|
+
@keyframes _1W2rn {
|
|
354
|
+
from {
|
|
355
|
+
transform: rotate(0deg);
|
|
356
|
+
}
|
|
357
|
+
to {
|
|
358
|
+
transform: rotate(360deg);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
343
362
|
._2k9Ys {
|
|
344
363
|
overflow: auto;
|
|
345
364
|
max-width: 100%;
|
package/dist/index.js
CHANGED
|
@@ -2852,7 +2852,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2852
2852
|
})));
|
|
2853
2853
|
};
|
|
2854
2854
|
|
|
2855
|
-
var styles$9 = {"ganttVerticalContainer":"_CZjuD","horizontalContainer":"_2B2zv","wrapper":"_3eULf","alertContainer":"_2AxB2","success":"_1a-EU","warning":"_1TP0x","error":"_2TeAI","alertDismissCheckbox":"_3cBUj","alertCloseButton":"_5jQM6"};
|
|
2855
|
+
var styles$9 = {"ganttVerticalContainer":"_CZjuD","horizontalContainer":"_2B2zv","wrapper":"_3eULf","alertContainer":"_2AxB2","success":"_1a-EU","warning":"_1TP0x","error":"_2TeAI","alertDismissCheckbox":"_3cBUj","alertCloseButton":"_5jQM6","spinner":"_3HJjy","spin":"_1W2rn"};
|
|
2856
2856
|
|
|
2857
2857
|
var TaskGantt = function TaskGantt(_ref) {
|
|
2858
2858
|
var gridProps = _ref.gridProps,
|
|
@@ -3131,6 +3131,10 @@ var Gantt = function Gantt(_ref) {
|
|
|
3131
3131
|
lastTouchY = _useState14[0],
|
|
3132
3132
|
setLastTouchY = _useState14[1];
|
|
3133
3133
|
|
|
3134
|
+
var _useState15 = React.useState(false),
|
|
3135
|
+
isProcessing = _useState15[0],
|
|
3136
|
+
setIsProcessing = _useState15[1];
|
|
3137
|
+
|
|
3134
3138
|
var buffer = rowHeight * 10;
|
|
3135
3139
|
var visibleStartY = scrollY - buffer;
|
|
3136
3140
|
var visibleEndY = scrollY + ganttHeight + buffer;
|
|
@@ -3147,6 +3151,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3147
3151
|
clearTimeout(debounceRef.current);
|
|
3148
3152
|
}
|
|
3149
3153
|
|
|
3154
|
+
setIsProcessing(true);
|
|
3150
3155
|
debounceRef.current = setTimeout(function () {
|
|
3151
3156
|
var filteredTasks;
|
|
3152
3157
|
|
|
@@ -3195,8 +3200,9 @@ var Gantt = function Gantt(_ref) {
|
|
|
3195
3200
|
}
|
|
3196
3201
|
|
|
3197
3202
|
setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
|
|
3203
|
+
setIsProcessing(false);
|
|
3198
3204
|
}, delayToRender);
|
|
3199
|
-
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl,
|
|
3205
|
+
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl, onExpanderClick]);
|
|
3200
3206
|
React.useEffect(function () {
|
|
3201
3207
|
return function () {
|
|
3202
3208
|
clearTimeout(debounceRef.current);
|
|
@@ -3275,6 +3281,8 @@ var Gantt = function Gantt(_ref) {
|
|
|
3275
3281
|
React.useEffect(function () {
|
|
3276
3282
|
var _wrapperRef$current, _wrapperRef$current2, _wrapperRef$current3, _wrapperRef$current4;
|
|
3277
3283
|
|
|
3284
|
+
if (isProcessing) return;
|
|
3285
|
+
|
|
3278
3286
|
var handleWheel = function handleWheel(event) {
|
|
3279
3287
|
if (event.shiftKey || event.deltaX) {
|
|
3280
3288
|
var scrollMove = event.deltaX ? event.deltaX : event.deltaY;
|
|
@@ -3367,7 +3375,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3367
3375
|
(_wrapperRef$current7 = wrapperRef.current) === null || _wrapperRef$current7 === void 0 ? void 0 : _wrapperRef$current7.removeEventListener("touchend", handleLogTouch);
|
|
3368
3376
|
(_wrapperRef$current8 = wrapperRef.current) === null || _wrapperRef$current8 === void 0 ? void 0 : _wrapperRef$current8.removeEventListener("touchend", handleLogTouch);
|
|
3369
3377
|
};
|
|
3370
|
-
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight]);
|
|
3378
|
+
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight, isProcessing]);
|
|
3371
3379
|
|
|
3372
3380
|
var handleScrollY = function handleScrollY(event) {
|
|
3373
3381
|
if (scrollY !== event.currentTarget.scrollTop && !ignoreScrollEvent) {
|
|
@@ -3539,6 +3547,36 @@ var Gantt = function Gantt(_ref) {
|
|
|
3539
3547
|
taskLabelRenderer: taskLabelRenderer,
|
|
3540
3548
|
onMultiSelect: onMultiSelect
|
|
3541
3549
|
};
|
|
3550
|
+
|
|
3551
|
+
if (isProcessing) {
|
|
3552
|
+
return React__default.createElement("div", {
|
|
3553
|
+
className: styles$9.wrapper,
|
|
3554
|
+
style: {
|
|
3555
|
+
position: "relative",
|
|
3556
|
+
minHeight: ganttHeight || 200
|
|
3557
|
+
}
|
|
3558
|
+
}, React__default.createElement("div", {
|
|
3559
|
+
style: {
|
|
3560
|
+
position: "absolute",
|
|
3561
|
+
inset: 0,
|
|
3562
|
+
height: "100%",
|
|
3563
|
+
width: "100%",
|
|
3564
|
+
display: "flex",
|
|
3565
|
+
justifyContent: "center",
|
|
3566
|
+
alignItems: "center",
|
|
3567
|
+
gap: "16px"
|
|
3568
|
+
}
|
|
3569
|
+
}, React__default.createElement("span", {
|
|
3570
|
+
style: {
|
|
3571
|
+
fontSize: "24px",
|
|
3572
|
+
color: "#cc0404",
|
|
3573
|
+
fontFamily: "Arial, sans-serif"
|
|
3574
|
+
}
|
|
3575
|
+
}, "Loading..."), React__default.createElement("div", {
|
|
3576
|
+
className: styles$9.spinner
|
|
3577
|
+
})));
|
|
3578
|
+
}
|
|
3579
|
+
|
|
3542
3580
|
return React__default.createElement("div", null, React__default.createElement("div", {
|
|
3543
3581
|
className: styles$9.wrapper,
|
|
3544
3582
|
onKeyDown: handleKeyDown,
|