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