gantt-lib 0.53.0 → 0.53.1
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 +17 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3375,6 +3375,20 @@ var DatePicker = ({
|
|
|
3375
3375
|
},
|
|
3376
3376
|
[selectedDate, updateFromDate, businessDays, isWeekend3]
|
|
3377
3377
|
);
|
|
3378
|
+
const handleTriggerKeyDown = (0, import_react9.useCallback)((e) => {
|
|
3379
|
+
if (disabled) return;
|
|
3380
|
+
if (e.key === "ArrowUp") {
|
|
3381
|
+
e.preventDefault();
|
|
3382
|
+
e.stopPropagation();
|
|
3383
|
+
handleDayShift(1);
|
|
3384
|
+
return;
|
|
3385
|
+
}
|
|
3386
|
+
if (e.key === "ArrowDown") {
|
|
3387
|
+
e.preventDefault();
|
|
3388
|
+
e.stopPropagation();
|
|
3389
|
+
handleDayShift(-1);
|
|
3390
|
+
}
|
|
3391
|
+
}, [disabled, handleDayShift]);
|
|
3378
3392
|
const handleKeyDown = (0, import_react9.useCallback)((e) => {
|
|
3379
3393
|
if (!dateInputRef.current) return;
|
|
3380
3394
|
const { value: inputVal } = dateInputRef.current;
|
|
@@ -3482,6 +3496,7 @@ var DatePicker = ({
|
|
|
3482
3496
|
type: "button",
|
|
3483
3497
|
className: `gantt-datepicker-trigger${className ? ` ${className}` : ""}`,
|
|
3484
3498
|
disabled,
|
|
3499
|
+
onKeyDown: handleTriggerKeyDown,
|
|
3485
3500
|
onClick: (e) => {
|
|
3486
3501
|
e.stopPropagation();
|
|
3487
3502
|
},
|
|
@@ -6683,20 +6698,8 @@ function GanttChartInner(props, ref) {
|
|
|
6683
6698
|
}
|
|
6684
6699
|
return;
|
|
6685
6700
|
}
|
|
6686
|
-
const
|
|
6687
|
-
|
|
6688
|
-
const { startDate: parentStart, endDate: parentEnd } = computeParentDates(updatedTask.id, tasks);
|
|
6689
|
-
const parentWithRecalcDates = {
|
|
6690
|
-
...updatedTask,
|
|
6691
|
-
startDate: parentStart.toISOString().split("T")[0],
|
|
6692
|
-
endDate: parentEnd.toISOString().split("T")[0]
|
|
6693
|
-
};
|
|
6694
|
-
const cascadedTasks = disableConstraints ? [parentWithRecalcDates] : universalCascade(parentWithRecalcDates, parentStart, parentEnd, tasks, businessDays, isCustomWeekend);
|
|
6695
|
-
onTasksChange?.(cascadedTasks);
|
|
6696
|
-
} else {
|
|
6697
|
-
const cascadedTasks = disableConstraints ? [updatedTask] : universalCascade(updatedTask, newStart, newEnd, tasks, businessDays, isCustomWeekend);
|
|
6698
|
-
onTasksChange?.(cascadedTasks);
|
|
6699
|
-
}
|
|
6701
|
+
const cascadedTasks = disableConstraints ? [updatedTask] : universalCascade(updatedTask, newStart, newEnd, tasks, businessDays, isCustomWeekend);
|
|
6702
|
+
onTasksChange?.(cascadedTasks);
|
|
6700
6703
|
}, [tasks, onTasksChange, disableConstraints, editingTaskId, businessDays, isCustomWeekend]);
|
|
6701
6704
|
const handleDelete = (0, import_react13.useCallback)((taskId) => {
|
|
6702
6705
|
const toDelete = /* @__PURE__ */ new Set([taskId]);
|