gantt-task-react-powern 0.6.4 → 0.6.5
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.js +39 -34
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +39 -34
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -3138,53 +3138,58 @@ var Gantt = function Gantt(_ref) {
|
|
|
3138
3138
|
}
|
|
3139
3139
|
}, [startDate, endDate]);
|
|
3140
3140
|
useEffect(function () {
|
|
3141
|
-
var
|
|
3141
|
+
var timer = setTimeout(function () {
|
|
3142
|
+
var filteredTasks;
|
|
3142
3143
|
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3144
|
+
if (onExpanderClick) {
|
|
3145
|
+
filteredTasks = removeHiddenTasks(tasks);
|
|
3146
|
+
} else {
|
|
3147
|
+
filteredTasks = tasks;
|
|
3148
|
+
}
|
|
3148
3149
|
|
|
3149
|
-
|
|
3150
|
+
filteredTasks = filteredTasks.sort(sortTasks);
|
|
3150
3151
|
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3152
|
+
var _ganttDateRange2 = ganttDateRange(filteredTasks, viewMode, preStepsCount),
|
|
3153
|
+
startDateRange = _ganttDateRange2[0],
|
|
3154
|
+
endDateRange = _ganttDateRange2[1];
|
|
3154
3155
|
|
|
3155
|
-
|
|
3156
|
+
var newDates = seedDates(startDateRange, endDateRange, viewMode);
|
|
3156
3157
|
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3158
|
+
if (scheduleType === "lookAhead") {
|
|
3159
|
+
newDates = seedDates(startDate, endDate, viewMode);
|
|
3160
|
+
}
|
|
3160
3161
|
|
|
3161
|
-
|
|
3162
|
-
|
|
3162
|
+
if (rtl) {
|
|
3163
|
+
newDates = newDates.reverse();
|
|
3163
3164
|
|
|
3164
|
-
|
|
3165
|
-
|
|
3165
|
+
if (scrollX === -1) {
|
|
3166
|
+
setScrollX(newDates.length * columnWidth);
|
|
3167
|
+
}
|
|
3166
3168
|
}
|
|
3167
|
-
}
|
|
3168
3169
|
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3170
|
+
if (scheduleType !== "lookAhead") {
|
|
3171
|
+
setDateSetup({
|
|
3172
|
+
dates: seedDates(startDateRange, endDateRange, viewMode),
|
|
3173
|
+
viewMode: viewMode
|
|
3174
|
+
});
|
|
3175
|
+
}
|
|
3175
3176
|
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3177
|
+
var _getCriticalPaths = getCriticalPaths(leafTasks),
|
|
3178
|
+
primaryPath = _getCriticalPaths[0],
|
|
3179
|
+
secondaryPath = _getCriticalPaths[1];
|
|
3179
3180
|
|
|
3180
|
-
|
|
3181
|
+
uncolorAll(tasks);
|
|
3181
3182
|
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3183
|
+
if (scheduleType !== "lookAhead") {
|
|
3184
|
+
colorPath(secondaryPath, "#00ff00", tasks, "secondary");
|
|
3185
|
+
colorPath(primaryPath, "#ff0000", tasks, "primary");
|
|
3186
|
+
}
|
|
3186
3187
|
|
|
3187
|
-
|
|
3188
|
+
setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
|
|
3189
|
+
}, 500);
|
|
3190
|
+
return function () {
|
|
3191
|
+
return clearTimeout(timer);
|
|
3192
|
+
};
|
|
3188
3193
|
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl, onExpanderClick]);
|
|
3189
3194
|
useEffect(function () {
|
|
3190
3195
|
if (viewMode === dateSetup.viewMode && (viewDate && !currentViewDate || viewDate && (currentViewDate === null || currentViewDate === void 0 ? void 0 : currentViewDate.valueOf()) !== viewDate.valueOf())) {
|