gantt-lib 0.138.0 → 0.140.0
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/README.md +28 -0
- package/dist/core/scheduling/index.d.mts +1 -1
- package/dist/core/scheduling/index.d.ts +1 -1
- package/dist/{index-C3mZqSTf.d.mts → index-uVwdodEf.d.mts} +18 -1
- package/dist/{index-C3mZqSTf.d.ts → index-uVwdodEf.d.ts} +18 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +991 -927
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +585 -521
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
|
|
5
5
|
// src/components/GanttChart/GanttChart.tsx
|
|
6
|
-
import { useMemo as
|
|
6
|
+
import { useMemo as useMemo14, useCallback as useCallback10, useRef as useRef13, useState as useState13, useEffect as useEffect12, useImperativeHandle, forwardRef } from "react";
|
|
7
7
|
|
|
8
8
|
// src/core/scheduling/dateMath.ts
|
|
9
9
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -6069,6 +6069,8 @@ var DependencyLines = React6.memo(({
|
|
|
6069
6069
|
dragOverrides,
|
|
6070
6070
|
selectedDep,
|
|
6071
6071
|
criticalTaskIds,
|
|
6072
|
+
showLag = true,
|
|
6073
|
+
activityEndpoints = false,
|
|
6072
6074
|
businessDays = true,
|
|
6073
6075
|
weekendPredicate,
|
|
6074
6076
|
onDependencyClick,
|
|
@@ -6186,14 +6188,17 @@ var DependencyLines = React6.memo(({
|
|
|
6186
6188
|
}
|
|
6187
6189
|
const isVirtual = predecessor.isVirtual || successor.isVirtual;
|
|
6188
6190
|
let reverseOrder = false;
|
|
6189
|
-
if (predecessorIndex !== void 0 && successorIndex !== void 0) {
|
|
6191
|
+
if (!activityEndpoints && predecessorIndex !== void 0 && successorIndex !== void 0) {
|
|
6190
6192
|
reverseOrder = predecessorIndex > successorIndex;
|
|
6191
6193
|
} else {
|
|
6192
6194
|
reverseOrder = predecessor.rowTop > successor.rowTop;
|
|
6193
6195
|
}
|
|
6194
6196
|
let fromY;
|
|
6195
6197
|
let toY;
|
|
6196
|
-
if (
|
|
6198
|
+
if (activityEndpoints && predecessor.rowTop === successor.rowTop) {
|
|
6199
|
+
fromY = predecessor.rowTop + predecessor.rowHeight / 2;
|
|
6200
|
+
toY = successor.rowTop + successor.rowHeight / 2;
|
|
6201
|
+
} else if (reverseOrder) {
|
|
6197
6202
|
fromY = predecessor.rowTop + 10;
|
|
6198
6203
|
toY = successor.rowTop + successor.rowHeight - 6;
|
|
6199
6204
|
} else {
|
|
@@ -6235,7 +6240,7 @@ var DependencyLines = React6.memo(({
|
|
|
6235
6240
|
}
|
|
6236
6241
|
}
|
|
6237
6242
|
return lines2;
|
|
6238
|
-
}, [tasks, allTasks, taskPositions, taskIndices, cycleInfo, collapsedParentIds, criticalTaskIds]);
|
|
6243
|
+
}, [tasks, allTasks, taskPositions, taskIndices, cycleInfo, collapsedParentIds, criticalTaskIds, activityEndpoints]);
|
|
6239
6244
|
const visibleLines = useMemo6(() => {
|
|
6240
6245
|
if (!horizontalWindow) return lines;
|
|
6241
6246
|
return lines.filter((line) => Math.max(line.fromX, line.toX) >= horizontalWindow.startPx && Math.min(line.fromX, line.toX) <= horizontalWindow.endPx);
|
|
@@ -6399,7 +6404,7 @@ var DependencyLines = React6.memo(({
|
|
|
6399
6404
|
]
|
|
6400
6405
|
}
|
|
6401
6406
|
),
|
|
6402
|
-
lag !== 0 && /* @__PURE__ */ jsx7(
|
|
6407
|
+
showLag && lag !== 0 && /* @__PURE__ */ jsx7(
|
|
6403
6408
|
"text",
|
|
6404
6409
|
{
|
|
6405
6410
|
className: "gantt-dependency-lag-label",
|
|
@@ -6420,8 +6425,64 @@ var DependencyLines = React6.memo(({
|
|
|
6420
6425
|
DependencyLines.displayName = "DependencyLines";
|
|
6421
6426
|
var DependencyLines_default = DependencyLines;
|
|
6422
6427
|
|
|
6428
|
+
// src/components/DependencyLines/ActivityDependencyLines.tsx
|
|
6429
|
+
import { useEffect as useEffect3, useMemo as useMemo7, useReducer } from "react";
|
|
6430
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
6431
|
+
var activityKey = (taskId, activityId) => JSON.stringify([taskId, activityId]);
|
|
6432
|
+
function ActivityDependencyLines(props) {
|
|
6433
|
+
const { tasks, dependencies, monthStart, dayWidth, previewStore } = props;
|
|
6434
|
+
const [previewVersion, refresh] = useReducer((value) => value + 1, 0);
|
|
6435
|
+
useEffect3(() => {
|
|
6436
|
+
const cleanups = tasks.filter((task) => task.activities?.length).map((task) => previewStore?.subscribeTask(task.id, refresh));
|
|
6437
|
+
return () => cleanups.forEach((cleanup) => cleanup?.());
|
|
6438
|
+
}, [tasks, previewStore]);
|
|
6439
|
+
const layout = useMemo7(() => {
|
|
6440
|
+
const flattened = [], rendered = [], tops = [], heights = [];
|
|
6441
|
+
const indices = /* @__PURE__ */ new Map();
|
|
6442
|
+
const incoming = /* @__PURE__ */ new Map();
|
|
6443
|
+
const selected = props.highlight ? new Set(props.highlight.activities.map((activity) => activityKey(activity.taskId, activity.activityId))) : void 0;
|
|
6444
|
+
const highlightMode = props.highlight?.mode ?? "chain";
|
|
6445
|
+
for (const edge of dependencies) {
|
|
6446
|
+
if (selected) {
|
|
6447
|
+
const fromSelected = selected.has(activityKey(edge.predecessorTaskId, edge.predecessorActivityId));
|
|
6448
|
+
const toSelected = selected.has(activityKey(edge.successorTaskId, edge.successorActivityId));
|
|
6449
|
+
const internal = fromSelected && toSelected;
|
|
6450
|
+
const incoming2 = !fromSelected && toSelected && (highlightMode === "chain-incoming" || highlightMode === "chain-all");
|
|
6451
|
+
const outgoing = fromSelected && !toSelected && (highlightMode === "chain-outgoing" || highlightMode === "chain-all");
|
|
6452
|
+
if (!internal && !incoming2 && !outgoing) continue;
|
|
6453
|
+
}
|
|
6454
|
+
const id = activityKey(edge.successorTaskId, edge.successorActivityId);
|
|
6455
|
+
const values = incoming.get(id) ?? [];
|
|
6456
|
+
values.push({ taskId: activityKey(edge.predecessorTaskId, edge.predecessorActivityId), type: edge.type, lag: edge.lag });
|
|
6457
|
+
incoming.set(id, values);
|
|
6458
|
+
}
|
|
6459
|
+
for (const task of tasks) {
|
|
6460
|
+
const row = props.rowIndexByTaskId.get(task.id);
|
|
6461
|
+
if (row === void 0 || !task.activities?.length) continue;
|
|
6462
|
+
const height = props.rowHeights[row] ?? props.rowHeight;
|
|
6463
|
+
if (height < props.rowHeight) continue;
|
|
6464
|
+
const packed = computeActivityLanes(task.activities, monthStart, dayWidth);
|
|
6465
|
+
const offset = Math.max(0, (height - packed.laneCount * ACTIVITY_LANE_STEP) / 2);
|
|
6466
|
+
const segments2 = new Map(packed.segments.map((segment) => [segment.id, segment]));
|
|
6467
|
+
for (const activity of task.activities) {
|
|
6468
|
+
const segment = segments2.get(activity.id);
|
|
6469
|
+
const id = activityKey(task.id, activity.id), index = flattened.length;
|
|
6470
|
+
const delta = previewStore?.getTaskOverrides(task.id)?.get(activity.id) ?? 0;
|
|
6471
|
+
const node = { id, name: activity.name, startDate: shiftActivityDate(activity.startDate, delta), endDate: shiftActivityDate(activity.endDate, delta), dependencies: incoming.get(id) };
|
|
6472
|
+
flattened.push(node);
|
|
6473
|
+
if (props.renderedTaskIds.has(task.id)) rendered.push(node);
|
|
6474
|
+
indices.set(id, index);
|
|
6475
|
+
tops.push((props.rowTops[row] ?? row * props.rowHeight) + offset + segment.lane * ACTIVITY_LANE_STEP + (ACTIVITY_LANE_STEP - ACTIVITY_LANE_BAR_HEIGHT) / 2);
|
|
6476
|
+
heights.push(ACTIVITY_LANE_BAR_HEIGHT);
|
|
6477
|
+
}
|
|
6478
|
+
}
|
|
6479
|
+
return { flattened, rendered, indices, tops, heights };
|
|
6480
|
+
}, [tasks, dependencies, props.highlight, monthStart, dayWidth, props.rowIndexByTaskId, props.rowTops, props.rowHeights, props.rowHeight, props.renderedTaskIds, previewStore, previewVersion]);
|
|
6481
|
+
return /* @__PURE__ */ jsx8(DependencyLines, { tasks: layout.rendered, allTasks: layout.flattened, monthStart, dayWidth, rowHeight: ACTIVITY_LANE_BAR_HEIGHT, gridWidth: props.gridWidth, totalHeight: props.totalHeight, rowIndexByTaskId: layout.indices, rowTops: layout.tops, rowHeights: layout.heights, horizontalWindow: props.horizontalWindow, showLag: props.showLag, activityEndpoints: true });
|
|
6482
|
+
}
|
|
6483
|
+
|
|
6423
6484
|
// src/components/DependencyCreationOverlay/DependencyCreationOverlay.tsx
|
|
6424
|
-
import { jsx as
|
|
6485
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
6425
6486
|
var LINK_TYPE_LABELS_RU = {
|
|
6426
6487
|
FS: "\u041E\u041D",
|
|
6427
6488
|
SS: "\u041D\u041D",
|
|
@@ -6453,15 +6514,15 @@ var DependencyCreationOverlay = ({ drag, width, height }) => {
|
|
|
6453
6514
|
height,
|
|
6454
6515
|
"aria-hidden": "true",
|
|
6455
6516
|
children: [
|
|
6456
|
-
/* @__PURE__ */
|
|
6517
|
+
/* @__PURE__ */ jsx9(
|
|
6457
6518
|
"path",
|
|
6458
6519
|
{
|
|
6459
6520
|
className: `gantt-dependencyCreation-path ${drag.target ? "gantt-dependencyCreation-pathTargeted" : ""}`,
|
|
6460
6521
|
d: getPath(drag)
|
|
6461
6522
|
}
|
|
6462
6523
|
),
|
|
6463
|
-
/* @__PURE__ */
|
|
6464
|
-
/* @__PURE__ */
|
|
6524
|
+
/* @__PURE__ */ jsx9("circle", { className: "gantt-dependencyCreation-source", cx: drag.source.x, cy: drag.source.y, r: "4" }),
|
|
6525
|
+
/* @__PURE__ */ jsx9(
|
|
6465
6526
|
"circle",
|
|
6466
6527
|
{
|
|
6467
6528
|
className: `gantt-dependencyCreation-target ${drag.target ? "gantt-dependencyCreation-targetValid" : ""}`,
|
|
@@ -6470,14 +6531,14 @@ var DependencyCreationOverlay = ({ drag, width, height }) => {
|
|
|
6470
6531
|
r: "5"
|
|
6471
6532
|
}
|
|
6472
6533
|
),
|
|
6473
|
-
drag.linkType && /* @__PURE__ */
|
|
6534
|
+
drag.linkType && /* @__PURE__ */ jsx9("text", { className: "gantt-dependencyCreation-label", x: drag.current.x + 10, y: drag.current.y - 10, children: LINK_TYPE_LABELS_RU[drag.linkType] ?? drag.linkType })
|
|
6474
6535
|
]
|
|
6475
6536
|
}
|
|
6476
6537
|
);
|
|
6477
6538
|
};
|
|
6478
6539
|
|
|
6479
6540
|
// src/components/TaskList/TaskList.tsx
|
|
6480
|
-
import
|
|
6541
|
+
import React14, { useMemo as useMemo10, useCallback as useCallback6, useState as useState8, useEffect as useEffect8, useRef as useRef8 } from "react";
|
|
6481
6542
|
|
|
6482
6543
|
// src/utils/taskListReorder.ts
|
|
6483
6544
|
function getDescendantIds(taskId, tasks) {
|
|
@@ -6648,9 +6709,9 @@ function getVisibleReorderPlan(orderedTasks, visibleTasks, movedTaskId, target)
|
|
|
6648
6709
|
|
|
6649
6710
|
// src/components/ui/Popover.tsx
|
|
6650
6711
|
import * as RadixPopover from "@radix-ui/react-popover";
|
|
6651
|
-
import { jsx as
|
|
6712
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
6652
6713
|
var Popover = ({ open, onOpenChange, children }) => {
|
|
6653
|
-
return /* @__PURE__ */
|
|
6714
|
+
return /* @__PURE__ */ jsx10(RadixPopover.Root, { open, onOpenChange, children });
|
|
6654
6715
|
};
|
|
6655
6716
|
var PopoverTrigger = RadixPopover.Trigger;
|
|
6656
6717
|
var PopoverContent = ({
|
|
@@ -6662,7 +6723,7 @@ var PopoverContent = ({
|
|
|
6662
6723
|
collisionPadding = 8,
|
|
6663
6724
|
onInteractOutside
|
|
6664
6725
|
}) => {
|
|
6665
|
-
const content = /* @__PURE__ */
|
|
6726
|
+
const content = /* @__PURE__ */ jsx10(
|
|
6666
6727
|
RadixPopover.Content,
|
|
6667
6728
|
{
|
|
6668
6729
|
className: `gantt-popover${className ? ` ${className}` : ""}`,
|
|
@@ -6675,26 +6736,26 @@ var PopoverContent = ({
|
|
|
6675
6736
|
}
|
|
6676
6737
|
);
|
|
6677
6738
|
if (portal) {
|
|
6678
|
-
return /* @__PURE__ */
|
|
6739
|
+
return /* @__PURE__ */ jsx10(RadixPopover.Portal, { children: content });
|
|
6679
6740
|
}
|
|
6680
6741
|
return content;
|
|
6681
6742
|
};
|
|
6682
6743
|
|
|
6683
6744
|
// src/components/TaskList/TaskListRow.tsx
|
|
6684
|
-
import
|
|
6745
|
+
import React11, {
|
|
6685
6746
|
useState as useState6,
|
|
6686
6747
|
useRef as useRef5,
|
|
6687
|
-
useEffect as
|
|
6748
|
+
useEffect as useEffect6,
|
|
6688
6749
|
useCallback as useCallback5,
|
|
6689
|
-
useMemo as
|
|
6750
|
+
useMemo as useMemo9
|
|
6690
6751
|
} from "react";
|
|
6691
6752
|
|
|
6692
6753
|
// src/components/ui/Input.tsx
|
|
6693
|
-
import
|
|
6694
|
-
import { jsx as
|
|
6695
|
-
var Input =
|
|
6754
|
+
import React8 from "react";
|
|
6755
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
6756
|
+
var Input = React8.forwardRef(
|
|
6696
6757
|
({ className, ...props }, ref) => {
|
|
6697
|
-
return /* @__PURE__ */
|
|
6758
|
+
return /* @__PURE__ */ jsx11(
|
|
6698
6759
|
"input",
|
|
6699
6760
|
{
|
|
6700
6761
|
ref,
|
|
@@ -6707,16 +6768,16 @@ var Input = React7.forwardRef(
|
|
|
6707
6768
|
Input.displayName = "Input";
|
|
6708
6769
|
|
|
6709
6770
|
// src/components/ui/DatePicker.tsx
|
|
6710
|
-
import { useState as useState5, useCallback as useCallback4, useEffect as
|
|
6771
|
+
import { useState as useState5, useCallback as useCallback4, useEffect as useEffect5, useRef as useRef4 } from "react";
|
|
6711
6772
|
import { format as format3, isValid, parse, addDays, addMonths as addMonths2, addYears, subMonths as subMonths2, subYears, subDays } from "date-fns";
|
|
6712
6773
|
|
|
6713
6774
|
// src/components/ui/Calendar.tsx
|
|
6714
6775
|
import {
|
|
6715
6776
|
useState as useState4,
|
|
6716
6777
|
useRef as useRef3,
|
|
6717
|
-
useEffect as
|
|
6778
|
+
useEffect as useEffect4,
|
|
6718
6779
|
useCallback as useCallback3,
|
|
6719
|
-
useMemo as
|
|
6780
|
+
useMemo as useMemo8
|
|
6720
6781
|
} from "react";
|
|
6721
6782
|
import {
|
|
6722
6783
|
startOfMonth,
|
|
@@ -6732,7 +6793,7 @@ import {
|
|
|
6732
6793
|
startOfDay
|
|
6733
6794
|
} from "date-fns";
|
|
6734
6795
|
import { ru as ru2 } from "date-fns/locale";
|
|
6735
|
-
import { jsx as
|
|
6796
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
6736
6797
|
function getDayClassName(day, selected, isWeekendProp) {
|
|
6737
6798
|
const classes = ["gantt-day-btn"];
|
|
6738
6799
|
if (selected && isSameDay(day, selected)) classes.push("selected");
|
|
@@ -6750,7 +6811,7 @@ var Calendar = ({
|
|
|
6750
6811
|
isWeekend: isWeekendProp
|
|
6751
6812
|
}) => {
|
|
6752
6813
|
const scrollRef = useRef3(null);
|
|
6753
|
-
const initialMonth =
|
|
6814
|
+
const initialMonth = useMemo8(
|
|
6754
6815
|
() => startOfMonth(initialDate ?? selected ?? /* @__PURE__ */ new Date()),
|
|
6755
6816
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6756
6817
|
[]
|
|
@@ -6769,7 +6830,7 @@ var Calendar = ({
|
|
|
6769
6830
|
}
|
|
6770
6831
|
});
|
|
6771
6832
|
}, []);
|
|
6772
|
-
|
|
6833
|
+
useEffect4(() => {
|
|
6773
6834
|
const container = scrollRef.current;
|
|
6774
6835
|
if (!container) return;
|
|
6775
6836
|
const handleScroll = () => {
|
|
@@ -6787,7 +6848,7 @@ var Calendar = ({
|
|
|
6787
6848
|
container.addEventListener("scroll", handleScroll);
|
|
6788
6849
|
return () => container.removeEventListener("scroll", handleScroll);
|
|
6789
6850
|
}, [loadMoreMonths]);
|
|
6790
|
-
|
|
6851
|
+
useEffect4(() => {
|
|
6791
6852
|
if (!scrollRef.current) return;
|
|
6792
6853
|
const target = selected ?? initialDate ?? /* @__PURE__ */ new Date();
|
|
6793
6854
|
const monthKey = format2(startOfMonth(target), "yyyy-MM");
|
|
@@ -6804,13 +6865,13 @@ var Calendar = ({
|
|
|
6804
6865
|
const monthKey = format2(month, "yyyy-MM");
|
|
6805
6866
|
const monthLabel = format2(month, "LLLL yyyy", { locale: ru2 });
|
|
6806
6867
|
const weekdayLabels = ["\u041F\u043D", "\u0412\u0442", "\u0421\u0440", "\u0427\u0442", "\u041F\u0442", "\u0421\u0431", "\u0412\u0441"];
|
|
6807
|
-
const weekdayHeaders = weekdayLabels.map((label, i) => /* @__PURE__ */
|
|
6808
|
-
const emptyCells = Array.from({ length: emptyDays }, (_, i) => /* @__PURE__ */
|
|
6868
|
+
const weekdayHeaders = weekdayLabels.map((label, i) => /* @__PURE__ */ jsx12("div", { className: "gantt-cal-weekday", children: label }, `wd-${i}`));
|
|
6869
|
+
const emptyCells = Array.from({ length: emptyDays }, (_, i) => /* @__PURE__ */ jsx12("div", { className: "gantt-cal-empty-day" }, `e-${i}`));
|
|
6809
6870
|
const dayCells = Array.from({ length: totalDays }, (_, i) => {
|
|
6810
6871
|
const dayNum = i + 1;
|
|
6811
6872
|
const day = new Date(Date.UTC(month.getFullYear(), month.getMonth(), dayNum));
|
|
6812
6873
|
const className = getDayClassName(day, selected, isWeekendProp);
|
|
6813
|
-
return /* @__PURE__ */
|
|
6874
|
+
return /* @__PURE__ */ jsx12(
|
|
6814
6875
|
"button",
|
|
6815
6876
|
{
|
|
6816
6877
|
type: "button",
|
|
@@ -6827,7 +6888,7 @@ var Calendar = ({
|
|
|
6827
6888
|
);
|
|
6828
6889
|
});
|
|
6829
6890
|
return /* @__PURE__ */ jsxs7("div", { className: "gantt-cal-month", "data-month": monthKey, children: [
|
|
6830
|
-
/* @__PURE__ */
|
|
6891
|
+
/* @__PURE__ */ jsx12("div", { className: "gantt-cal-month-header", children: monthLabel }),
|
|
6831
6892
|
/* @__PURE__ */ jsxs7("div", { className: "gantt-cal-month-days", children: [
|
|
6832
6893
|
weekdayHeaders,
|
|
6833
6894
|
emptyCells,
|
|
@@ -6837,16 +6898,16 @@ var Calendar = ({
|
|
|
6837
6898
|
},
|
|
6838
6899
|
[selected, onSelect, disabled, isWeekendProp]
|
|
6839
6900
|
);
|
|
6840
|
-
const renderedMonths =
|
|
6901
|
+
const renderedMonths = useMemo8(
|
|
6841
6902
|
() => months.map(renderMonth),
|
|
6842
6903
|
[months, renderMonth]
|
|
6843
6904
|
);
|
|
6844
|
-
return /* @__PURE__ */
|
|
6905
|
+
return /* @__PURE__ */ jsx12("div", { ref: scrollRef, className: "gantt-cal-container", children: renderedMonths });
|
|
6845
6906
|
};
|
|
6846
6907
|
Calendar.displayName = "Calendar";
|
|
6847
6908
|
|
|
6848
6909
|
// src/components/ui/DatePicker.tsx
|
|
6849
|
-
import { jsx as
|
|
6910
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
6850
6911
|
var segments = [
|
|
6851
6912
|
{ start: 0, end: 2, label: "day", max: 31 },
|
|
6852
6913
|
{ start: 3, end: 5, label: "month", max: 12 },
|
|
@@ -6905,7 +6966,7 @@ var DatePicker = ({
|
|
|
6905
6966
|
})();
|
|
6906
6967
|
const activeDate = draftDate ?? selectedDate;
|
|
6907
6968
|
const displayValue = selectedDate ? formatUTCDate(selectedDate, displayFormat) : placeholder;
|
|
6908
|
-
|
|
6969
|
+
useEffect5(() => {
|
|
6909
6970
|
if (value) {
|
|
6910
6971
|
const d = /* @__PURE__ */ new Date(value + "T00:00:00Z");
|
|
6911
6972
|
if (isValid(d)) {
|
|
@@ -6922,7 +6983,7 @@ var DatePicker = ({
|
|
|
6922
6983
|
const seg = segments[idx] ?? segments[0];
|
|
6923
6984
|
dateInputRef.current.setSelectionRange(seg.start, seg.end);
|
|
6924
6985
|
}, []);
|
|
6925
|
-
|
|
6986
|
+
useEffect5(() => {
|
|
6926
6987
|
if (open) {
|
|
6927
6988
|
setTimeout(() => {
|
|
6928
6989
|
if (dateInputRef.current) {
|
|
@@ -7114,7 +7175,7 @@ var DatePicker = ({
|
|
|
7114
7175
|
setOpen(nextOpen);
|
|
7115
7176
|
}, [commitDate, open]);
|
|
7116
7177
|
return /* @__PURE__ */ jsxs8(Popover, { open, onOpenChange: disabled ? void 0 : handleOpenChange, children: [
|
|
7117
|
-
/* @__PURE__ */
|
|
7178
|
+
/* @__PURE__ */ jsx13(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx13(
|
|
7118
7179
|
"button",
|
|
7119
7180
|
{
|
|
7120
7181
|
type: "button",
|
|
@@ -7135,9 +7196,9 @@ var DatePicker = ({
|
|
|
7135
7196
|
side: "bottom",
|
|
7136
7197
|
children: [
|
|
7137
7198
|
/* @__PURE__ */ jsxs8("div", { className: "gantt-datepicker-input-row", children: [
|
|
7138
|
-
/* @__PURE__ */
|
|
7139
|
-
/* @__PURE__ */
|
|
7140
|
-
/* @__PURE__ */
|
|
7199
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(-7), tabIndex: -1, children: "-7" }),
|
|
7200
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(-1), tabIndex: -1, children: "-1" }),
|
|
7201
|
+
/* @__PURE__ */ jsx13(
|
|
7141
7202
|
"input",
|
|
7142
7203
|
{
|
|
7143
7204
|
ref: dateInputRef,
|
|
@@ -7156,10 +7217,10 @@ var DatePicker = ({
|
|
|
7156
7217
|
autoComplete: "off"
|
|
7157
7218
|
}
|
|
7158
7219
|
),
|
|
7159
|
-
/* @__PURE__ */
|
|
7160
|
-
/* @__PURE__ */
|
|
7220
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(1), tabIndex: -1, children: "+1" }),
|
|
7221
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: "gantt-datepicker-shift-btn", onMouseDown: handleShiftButtonMouseDown, onClick: () => handleDayShift(7), tabIndex: -1, children: "+7" })
|
|
7161
7222
|
] }),
|
|
7162
|
-
/* @__PURE__ */
|
|
7223
|
+
/* @__PURE__ */ jsx13(
|
|
7163
7224
|
Calendar,
|
|
7164
7225
|
{
|
|
7165
7226
|
mode: "single",
|
|
@@ -7169,7 +7230,7 @@ var DatePicker = ({
|
|
|
7169
7230
|
isWeekend: isWeekend3
|
|
7170
7231
|
}
|
|
7171
7232
|
),
|
|
7172
|
-
footer ? /* @__PURE__ */
|
|
7233
|
+
footer ? /* @__PURE__ */ jsx13("div", { className: "gantt-datepicker-footer", children: footer }) : null
|
|
7173
7234
|
]
|
|
7174
7235
|
}
|
|
7175
7236
|
)
|
|
@@ -7178,24 +7239,24 @@ var DatePicker = ({
|
|
|
7178
7239
|
DatePicker.displayName = "DatePicker";
|
|
7179
7240
|
|
|
7180
7241
|
// src/components/TaskList/DepIcons.tsx
|
|
7181
|
-
import { jsx as
|
|
7242
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
7182
7243
|
var DepIconFS = () => /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
7183
|
-
/* @__PURE__ */
|
|
7184
|
-
/* @__PURE__ */
|
|
7244
|
+
/* @__PURE__ */ jsx14("path", { d: "m10 15 5 5 5-5" }),
|
|
7245
|
+
/* @__PURE__ */ jsx14("path", { d: "M4 4h7a4 4 0 0 1 4 4v12" })
|
|
7185
7246
|
] });
|
|
7186
7247
|
var DepIconSS = () => /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
7187
|
-
/* @__PURE__ */
|
|
7188
|
-
/* @__PURE__ */
|
|
7189
|
-
/* @__PURE__ */
|
|
7248
|
+
/* @__PURE__ */ jsx14("path", { d: "M3 5v14" }),
|
|
7249
|
+
/* @__PURE__ */ jsx14("path", { d: "M21 12H7" }),
|
|
7250
|
+
/* @__PURE__ */ jsx14("path", { d: "m15 18 6-6-6-6" })
|
|
7190
7251
|
] });
|
|
7191
7252
|
var DepIconFF = () => /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
7192
|
-
/* @__PURE__ */
|
|
7193
|
-
/* @__PURE__ */
|
|
7194
|
-
/* @__PURE__ */
|
|
7253
|
+
/* @__PURE__ */ jsx14("path", { d: "M17 12H3" }),
|
|
7254
|
+
/* @__PURE__ */ jsx14("path", { d: "m11 18 6-6-6-6" }),
|
|
7255
|
+
/* @__PURE__ */ jsx14("path", { d: "M21 5v14" })
|
|
7195
7256
|
] });
|
|
7196
7257
|
var DepIconSF = () => /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
7197
|
-
/* @__PURE__ */
|
|
7198
|
-
/* @__PURE__ */
|
|
7258
|
+
/* @__PURE__ */ jsx14("path", { d: "m14 15-5 5-5-5" }),
|
|
7259
|
+
/* @__PURE__ */ jsx14("path", { d: "M20 4h-7a4 4 0 0 0-4 4v12" })
|
|
7199
7260
|
] });
|
|
7200
7261
|
var LINK_TYPE_ICONS = {
|
|
7201
7262
|
FS: DepIconFS,
|
|
@@ -7245,7 +7306,7 @@ function buildDefaultTaskDateRange(startDate, {
|
|
|
7245
7306
|
}
|
|
7246
7307
|
|
|
7247
7308
|
// src/components/TaskList/TaskListRow.tsx
|
|
7248
|
-
import { Fragment as Fragment3, jsx as
|
|
7309
|
+
import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
7249
7310
|
var DAY_MS4 = 24 * 60 * 60 * 1e3;
|
|
7250
7311
|
var LINK_TYPE_ORDER = ["FS", "SS", "FF", "SF"];
|
|
7251
7312
|
var getInclusiveDurationDays = (startDate, endDate) => {
|
|
@@ -7273,13 +7334,13 @@ var TrashIcon = () => /* @__PURE__ */ jsxs10(
|
|
|
7273
7334
|
strokeLinecap: "round",
|
|
7274
7335
|
strokeLinejoin: "round",
|
|
7275
7336
|
children: [
|
|
7276
|
-
/* @__PURE__ */
|
|
7277
|
-
/* @__PURE__ */
|
|
7278
|
-
/* @__PURE__ */
|
|
7337
|
+
/* @__PURE__ */ jsx15("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
7338
|
+
/* @__PURE__ */ jsx15("path", { d: "M3 6h18" }),
|
|
7339
|
+
/* @__PURE__ */ jsx15("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
7279
7340
|
]
|
|
7280
7341
|
}
|
|
7281
7342
|
);
|
|
7282
|
-
var PlusIcon = () => /* @__PURE__ */
|
|
7343
|
+
var PlusIcon = () => /* @__PURE__ */ jsx15(
|
|
7283
7344
|
"svg",
|
|
7284
7345
|
{
|
|
7285
7346
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7291,7 +7352,7 @@ var PlusIcon = () => /* @__PURE__ */ jsx14(
|
|
|
7291
7352
|
strokeWidth: "2",
|
|
7292
7353
|
strokeLinecap: "round",
|
|
7293
7354
|
strokeLinejoin: "round",
|
|
7294
|
-
children: /* @__PURE__ */
|
|
7355
|
+
children: /* @__PURE__ */ jsx15("path", { d: "M12 5v14M5 12h14" })
|
|
7295
7356
|
}
|
|
7296
7357
|
);
|
|
7297
7358
|
var DepEditIcon = () => /* @__PURE__ */ jsxs10(
|
|
@@ -7308,18 +7369,18 @@ var DepEditIcon = () => /* @__PURE__ */ jsxs10(
|
|
|
7308
7369
|
strokeLinejoin: "round",
|
|
7309
7370
|
"aria-hidden": "true",
|
|
7310
7371
|
children: [
|
|
7311
|
-
/* @__PURE__ */
|
|
7312
|
-
/* @__PURE__ */
|
|
7372
|
+
/* @__PURE__ */ jsx15("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }),
|
|
7373
|
+
/* @__PURE__ */ jsx15("path", { d: "m15 5 4 4" })
|
|
7313
7374
|
]
|
|
7314
7375
|
}
|
|
7315
7376
|
);
|
|
7316
7377
|
var DragHandleIcon = () => /* @__PURE__ */ jsxs10("svg", { width: "10", height: "14", viewBox: "0 0 10 14", fill: "currentColor", children: [
|
|
7317
|
-
/* @__PURE__ */
|
|
7318
|
-
/* @__PURE__ */
|
|
7319
|
-
/* @__PURE__ */
|
|
7320
|
-
/* @__PURE__ */
|
|
7321
|
-
/* @__PURE__ */
|
|
7322
|
-
/* @__PURE__ */
|
|
7378
|
+
/* @__PURE__ */ jsx15("circle", { cx: "2", cy: "2", r: "1.5" }),
|
|
7379
|
+
/* @__PURE__ */ jsx15("circle", { cx: "8", cy: "2", r: "1.5" }),
|
|
7380
|
+
/* @__PURE__ */ jsx15("circle", { cx: "2", cy: "7", r: "1.5" }),
|
|
7381
|
+
/* @__PURE__ */ jsx15("circle", { cx: "8", cy: "7", r: "1.5" }),
|
|
7382
|
+
/* @__PURE__ */ jsx15("circle", { cx: "2", cy: "12", r: "1.5" }),
|
|
7383
|
+
/* @__PURE__ */ jsx15("circle", { cx: "8", cy: "12", r: "1.5" })
|
|
7323
7384
|
] });
|
|
7324
7385
|
var VerticalDotsIcon = () => /* @__PURE__ */ jsxs10(
|
|
7325
7386
|
"svg",
|
|
@@ -7330,9 +7391,9 @@ var VerticalDotsIcon = () => /* @__PURE__ */ jsxs10(
|
|
|
7330
7391
|
viewBox: "0 0 24 24",
|
|
7331
7392
|
fill: "currentColor",
|
|
7332
7393
|
children: [
|
|
7333
|
-
/* @__PURE__ */
|
|
7334
|
-
/* @__PURE__ */
|
|
7335
|
-
/* @__PURE__ */
|
|
7394
|
+
/* @__PURE__ */ jsx15("circle", { cx: "12", cy: "5", r: "2" }),
|
|
7395
|
+
/* @__PURE__ */ jsx15("circle", { cx: "12", cy: "12", r: "2" }),
|
|
7396
|
+
/* @__PURE__ */ jsx15("circle", { cx: "12", cy: "19", r: "2" })
|
|
7336
7397
|
]
|
|
7337
7398
|
}
|
|
7338
7399
|
);
|
|
@@ -7349,8 +7410,8 @@ var CopyIcon = () => /* @__PURE__ */ jsxs10(
|
|
|
7349
7410
|
strokeLinecap: "round",
|
|
7350
7411
|
strokeLinejoin: "round",
|
|
7351
7412
|
children: [
|
|
7352
|
-
/* @__PURE__ */
|
|
7353
|
-
/* @__PURE__ */
|
|
7413
|
+
/* @__PURE__ */ jsx15("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
7414
|
+
/* @__PURE__ */ jsx15("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
7354
7415
|
]
|
|
7355
7416
|
}
|
|
7356
7417
|
);
|
|
@@ -7367,10 +7428,10 @@ var UngroupIcon = () => /* @__PURE__ */ jsxs10(
|
|
|
7367
7428
|
strokeLinecap: "round",
|
|
7368
7429
|
strokeLinejoin: "round",
|
|
7369
7430
|
children: [
|
|
7370
|
-
/* @__PURE__ */
|
|
7371
|
-
/* @__PURE__ */
|
|
7372
|
-
/* @__PURE__ */
|
|
7373
|
-
/* @__PURE__ */
|
|
7431
|
+
/* @__PURE__ */ jsx15("path", { d: "M3 12h10" }),
|
|
7432
|
+
/* @__PURE__ */ jsx15("path", { d: "m6 9-3 3 3 3" }),
|
|
7433
|
+
/* @__PURE__ */ jsx15("path", { d: "M13 6h8" }),
|
|
7434
|
+
/* @__PURE__ */ jsx15("path", { d: "M13 18h8" })
|
|
7374
7435
|
]
|
|
7375
7436
|
}
|
|
7376
7437
|
);
|
|
@@ -7397,7 +7458,7 @@ var TASK_COLOR_PALETTE = [
|
|
|
7397
7458
|
// { label: "Океан2", value: "#0626ba" },
|
|
7398
7459
|
// { label: "Виноград", value: "#AE3EC9" },
|
|
7399
7460
|
];
|
|
7400
|
-
var ChevronRightIcon = () => /* @__PURE__ */
|
|
7461
|
+
var ChevronRightIcon = () => /* @__PURE__ */ jsx15(
|
|
7401
7462
|
"svg",
|
|
7402
7463
|
{
|
|
7403
7464
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7409,7 +7470,7 @@ var ChevronRightIcon = () => /* @__PURE__ */ jsx14(
|
|
|
7409
7470
|
strokeWidth: "2",
|
|
7410
7471
|
strokeLinecap: "round",
|
|
7411
7472
|
strokeLinejoin: "round",
|
|
7412
|
-
children: /* @__PURE__ */
|
|
7473
|
+
children: /* @__PURE__ */ jsx15("path", { d: "m9 18 6-6-6-6" })
|
|
7413
7474
|
}
|
|
7414
7475
|
);
|
|
7415
7476
|
var LINK_TYPE_LABELS_RU2 = {
|
|
@@ -7439,8 +7500,8 @@ var ArrowLeft = () => /* @__PURE__ */ jsxs10(
|
|
|
7439
7500
|
strokeLinecap: "round",
|
|
7440
7501
|
strokeLinejoin: "round",
|
|
7441
7502
|
children: [
|
|
7442
|
-
/* @__PURE__ */
|
|
7443
|
-
/* @__PURE__ */
|
|
7503
|
+
/* @__PURE__ */ jsx15("path", { d: "m12 19-7-7 7-7" }),
|
|
7504
|
+
/* @__PURE__ */ jsx15("path", { d: "M19 12H5" })
|
|
7444
7505
|
]
|
|
7445
7506
|
}
|
|
7446
7507
|
);
|
|
@@ -7457,8 +7518,8 @@ var ArrowRight = () => /* @__PURE__ */ jsxs10(
|
|
|
7457
7518
|
strokeLinecap: "round",
|
|
7458
7519
|
strokeLinejoin: "round",
|
|
7459
7520
|
children: [
|
|
7460
|
-
/* @__PURE__ */
|
|
7461
|
-
/* @__PURE__ */
|
|
7521
|
+
/* @__PURE__ */ jsx15("path", { d: "M5 12h14" }),
|
|
7522
|
+
/* @__PURE__ */ jsx15("path", { d: "m12 5 7 7-7 7" })
|
|
7462
7523
|
]
|
|
7463
7524
|
}
|
|
7464
7525
|
);
|
|
@@ -7473,7 +7534,7 @@ var HierarchyButton = ({
|
|
|
7473
7534
|
const showDemote = canDemote && !!onDemote;
|
|
7474
7535
|
if (!canPromote && !showDemote) return null;
|
|
7475
7536
|
return /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
7476
|
-
canPromote && /* @__PURE__ */
|
|
7537
|
+
canPromote && /* @__PURE__ */ jsx15(
|
|
7477
7538
|
"button",
|
|
7478
7539
|
{
|
|
7479
7540
|
type: "button",
|
|
@@ -7483,10 +7544,10 @@ var HierarchyButton = ({
|
|
|
7483
7544
|
onPromote(e);
|
|
7484
7545
|
},
|
|
7485
7546
|
title: "\u041F\u043E\u0432\u044B\u0441\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C",
|
|
7486
|
-
children: /* @__PURE__ */
|
|
7547
|
+
children: /* @__PURE__ */ jsx15(ArrowLeft, {})
|
|
7487
7548
|
}
|
|
7488
7549
|
),
|
|
7489
|
-
showDemote && /* @__PURE__ */
|
|
7550
|
+
showDemote && /* @__PURE__ */ jsx15(
|
|
7490
7551
|
"button",
|
|
7491
7552
|
{
|
|
7492
7553
|
type: "button",
|
|
@@ -7496,7 +7557,7 @@ var HierarchyButton = ({
|
|
|
7496
7557
|
onDemote(e);
|
|
7497
7558
|
},
|
|
7498
7559
|
title: "\u041F\u043E\u043D\u0438\u0437\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C",
|
|
7499
|
-
children: /* @__PURE__ */
|
|
7560
|
+
children: /* @__PURE__ */ jsx15(ArrowRight, {})
|
|
7500
7561
|
}
|
|
7501
7562
|
)
|
|
7502
7563
|
] });
|
|
@@ -7524,7 +7585,7 @@ var DepChip = ({
|
|
|
7524
7585
|
const [popoverOpen, setPopoverOpen] = useState6(false);
|
|
7525
7586
|
const lagAbs = Math.abs(lag ?? 0);
|
|
7526
7587
|
const [inputAbs, setInputAbs] = useState6(lagAbs === 0 ? "" : String(lagAbs));
|
|
7527
|
-
|
|
7588
|
+
useEffect6(() => {
|
|
7528
7589
|
const abs = Math.abs(lag ?? 0);
|
|
7529
7590
|
setInputAbs(abs === 0 ? "" : String(abs));
|
|
7530
7591
|
}, [lag]);
|
|
@@ -7687,9 +7748,9 @@ var DepChip = ({
|
|
|
7687
7748
|
},
|
|
7688
7749
|
"aria-label": `[${LINK_TYPE_LABELS_RU2[dep.type]}] ${formatTaskNumberLabel(predecessorTaskNumber)}${depName}`,
|
|
7689
7750
|
children: [
|
|
7690
|
-
predecessorTaskNumber && /* @__PURE__ */
|
|
7691
|
-
/* @__PURE__ */
|
|
7692
|
-
effectiveLag !== 0 && /* @__PURE__ */
|
|
7751
|
+
predecessorTaskNumber && /* @__PURE__ */ jsx15("span", { className: "gantt-tl-dep-chip-task-number", children: predecessorTaskNumber }),
|
|
7752
|
+
/* @__PURE__ */ jsx15("span", { className: "gantt-tl-dep-chip", children: /* @__PURE__ */ jsx15(Icon, {}) }),
|
|
7753
|
+
effectiveLag !== 0 && /* @__PURE__ */ jsx15("span", { className: "gantt-tl-dep-chip-lag", children: effectiveLag > 0 ? `+${effectiveLag}` : `${effectiveLag}` }),
|
|
7693
7754
|
/* @__PURE__ */ jsxs10("span", { className: "gantt-tl-dep-chip-tooltip", role: "tooltip", children: [
|
|
7694
7755
|
"[",
|
|
7695
7756
|
LINK_TYPE_LABELS_RU2[dep.type],
|
|
@@ -7700,7 +7761,7 @@ var DepChip = ({
|
|
|
7700
7761
|
]
|
|
7701
7762
|
}
|
|
7702
7763
|
),
|
|
7703
|
-
isSelected && !disableDependencyEditing && /* @__PURE__ */
|
|
7764
|
+
isSelected && !disableDependencyEditing && /* @__PURE__ */ jsx15(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
7704
7765
|
"button",
|
|
7705
7766
|
{
|
|
7706
7767
|
type: "button",
|
|
@@ -7708,13 +7769,13 @@ var DepChip = ({
|
|
|
7708
7769
|
"aria-label": "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
7709
7770
|
title: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u044F\u0437\u044C",
|
|
7710
7771
|
onClick: (e) => e.stopPropagation(),
|
|
7711
|
-
children: /* @__PURE__ */
|
|
7772
|
+
children: /* @__PURE__ */ jsx15(DepEditIcon, {})
|
|
7712
7773
|
}
|
|
7713
7774
|
) })
|
|
7714
7775
|
]
|
|
7715
7776
|
}
|
|
7716
7777
|
),
|
|
7717
|
-
/* @__PURE__ */
|
|
7778
|
+
/* @__PURE__ */ jsx15(
|
|
7718
7779
|
PopoverContent,
|
|
7719
7780
|
{
|
|
7720
7781
|
className: "gantt-tl-dep-edit-popover",
|
|
@@ -7730,7 +7791,7 @@ var DepChip = ({
|
|
|
7730
7791
|
actionVerb,
|
|
7731
7792
|
preWord ? ` ${preWord}` : ""
|
|
7732
7793
|
] }),
|
|
7733
|
-
/* @__PURE__ */
|
|
7794
|
+
/* @__PURE__ */ jsx15(
|
|
7734
7795
|
"button",
|
|
7735
7796
|
{
|
|
7736
7797
|
type: "button",
|
|
@@ -7739,7 +7800,7 @@ var DepChip = ({
|
|
|
7739
7800
|
children: "\u2212"
|
|
7740
7801
|
}
|
|
7741
7802
|
),
|
|
7742
|
-
/* @__PURE__ */
|
|
7803
|
+
/* @__PURE__ */ jsx15(
|
|
7743
7804
|
"input",
|
|
7744
7805
|
{
|
|
7745
7806
|
type: "number",
|
|
@@ -7755,7 +7816,7 @@ var DepChip = ({
|
|
|
7755
7816
|
}
|
|
7756
7817
|
}
|
|
7757
7818
|
),
|
|
7758
|
-
!(dep.type === "SF" && effectiveLag === 0) && /* @__PURE__ */
|
|
7819
|
+
!(dep.type === "SF" && effectiveLag === 0) && /* @__PURE__ */ jsx15(
|
|
7759
7820
|
"button",
|
|
7760
7821
|
{
|
|
7761
7822
|
type: "button",
|
|
@@ -7764,17 +7825,17 @@ var DepChip = ({
|
|
|
7764
7825
|
children: "+"
|
|
7765
7826
|
}
|
|
7766
7827
|
),
|
|
7767
|
-
effectiveLag !== 0 && /* @__PURE__ */
|
|
7768
|
-
/* @__PURE__ */
|
|
7828
|
+
effectiveLag !== 0 && /* @__PURE__ */ jsx15("span", { children: "\u0434." }),
|
|
7829
|
+
/* @__PURE__ */ jsx15("span", { children: afterWhat })
|
|
7769
7830
|
] }),
|
|
7770
7831
|
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-edit-pred", children: [
|
|
7771
7832
|
formatTaskNumberLabel(predecessorTaskNumber),
|
|
7772
7833
|
depName
|
|
7773
7834
|
] }),
|
|
7774
7835
|
!disableDependencyEditing && /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
7775
|
-
/* @__PURE__ */
|
|
7836
|
+
/* @__PURE__ */ jsx15("hr", { className: "gantt-tl-dep-edit-divider" }),
|
|
7776
7837
|
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-edit-actions", children: [
|
|
7777
|
-
/* @__PURE__ */
|
|
7838
|
+
/* @__PURE__ */ jsx15(
|
|
7778
7839
|
"button",
|
|
7779
7840
|
{
|
|
7780
7841
|
type: "button",
|
|
@@ -7786,7 +7847,7 @@ var DepChip = ({
|
|
|
7786
7847
|
children: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C"
|
|
7787
7848
|
}
|
|
7788
7849
|
),
|
|
7789
|
-
/* @__PURE__ */
|
|
7850
|
+
/* @__PURE__ */ jsx15(
|
|
7790
7851
|
"button",
|
|
7791
7852
|
{
|
|
7792
7853
|
type: "button",
|
|
@@ -7839,7 +7900,7 @@ var areTaskListRowPropsEqual = (prevProps, nextProps) => {
|
|
|
7839
7900
|
const nextAnyPicking = nextProps.selectingPredecessorFor != null;
|
|
7840
7901
|
return prevTaskUnchanged && prevProps.rowIndex === nextProps.rowIndex && prevProps.taskNumber === nextProps.taskNumber && prevProps.taskNumberMap === nextProps.taskNumberMap && prevProps.rowHeight === nextProps.rowHeight && prevIsSelected === nextIsSelected && prevProps.disableTaskNameEditing === nextProps.disableTaskNameEditing && prevProps.disableDependencyEditing === nextProps.disableDependencyEditing && prevProps.allTasks === nextProps.allTasks && prevProps.activeLinkType === nextProps.activeLinkType && prevProps.dependencyPickMode === nextProps.dependencyPickMode && prevPickingTask === nextPickingTask && prevAnyPicking === nextAnyPicking && resolveSelectedChipRole(prevProps) === resolveSelectedChipRole(nextProps) && prevIsEditingTask === nextIsEditingTask && prevProps.isDragging === nextProps.isDragging && prevProps.isDragOver === nextProps.isDragOver && prevProps.dragOverPlacement === nextProps.dragOverPlacement && prevProps.isNestedDropTarget === nextProps.isNestedDropTarget && prevProps.isDirectChildDropTarget === nextProps.isDirectChildDropTarget && prevCollapsed === nextCollapsed && prevProps.canDemoteTask === nextProps.canDemoteTask && prevProps.isLastChild === nextProps.isLastChild && prevProps.nestingDepth === nextProps.nestingDepth && prevProps.hasVisibleChildren === nextProps.hasVisibleChildren && prevProps.ancestorLineModes === nextProps.ancestorLineModes && prevProps.customDays === nextProps.customDays && prevProps.isWeekend === nextProps.isWeekend && prevProps.fillParentRow === nextProps.fillParentRow && prevProps.businessDays === nextProps.businessDays && prevProps.defaultTaskDurationDays === nextProps.defaultTaskDurationDays && prevProps.isFilterMatch === nextProps.isFilterMatch && prevProps.isFilterHideMode === nextProps.isFilterHideMode && prevProps.resolvedColumns === nextProps.resolvedColumns && prevProps.isTaskSelected === nextProps.isTaskSelected && resolveActiveCustomCellForRow(prevProps) === resolveActiveCustomCellForRow(nextProps) && prevProps.taskListMenuCommands === nextProps.taskListMenuCommands && prevProps.hideTaskListRowActions === nextProps.hideTaskListRowActions && prevProps.rowClassName === nextProps.rowClassName && prevProps.getTaskListNamePrefixIcon === nextProps.getTaskListNamePrefixIcon && prevProps.taskDateChangeMode === nextProps.taskDateChangeMode && prevProps.printDependencyLabels === nextProps.printDependencyLabels;
|
|
7841
7902
|
};
|
|
7842
|
-
var TaskListRow =
|
|
7903
|
+
var TaskListRow = React11.memo(
|
|
7843
7904
|
({
|
|
7844
7905
|
task,
|
|
7845
7906
|
rowIndex,
|
|
@@ -7915,7 +7976,7 @@ var TaskListRow = React10.memo(
|
|
|
7915
7976
|
const editingDuration = editingColumnId === "duration";
|
|
7916
7977
|
const editingProgress = editingColumnId === "progress";
|
|
7917
7978
|
const taskListNamePrefixIcon = getTaskListNamePrefixIcon?.(task) ?? null;
|
|
7918
|
-
const columnWidthStyleMap =
|
|
7979
|
+
const columnWidthStyleMap = useMemo9(() => {
|
|
7919
7980
|
return new Map(
|
|
7920
7981
|
(resolvedColumns ?? []).map((column) => {
|
|
7921
7982
|
const width = column.width ?? 120;
|
|
@@ -7939,8 +8000,8 @@ var TaskListRow = React10.memo(
|
|
|
7939
8000
|
flex: `0 0 ${fallbackWidth}px`
|
|
7940
8001
|
};
|
|
7941
8002
|
}, [columnWidthStyleMap]);
|
|
7942
|
-
const normalizedTask =
|
|
7943
|
-
const isMilestone =
|
|
8003
|
+
const normalizedTask = useMemo9(() => normalizeTaskDatesForType(task), [task]);
|
|
8004
|
+
const isMilestone = useMemo9(() => isMilestoneTask(normalizedTask), [normalizedTask]);
|
|
7944
8005
|
const [nameValue, setNameValue] = useState6("");
|
|
7945
8006
|
const nameInputRef = useRef5(null);
|
|
7946
8007
|
const [durationValue, setDurationValue] = useState6(
|
|
@@ -7963,7 +8024,7 @@ var TaskListRow = React10.memo(
|
|
|
7963
8024
|
);
|
|
7964
8025
|
const rowRef = useRef5(null);
|
|
7965
8026
|
const isSelected = selectedTaskId === task.id;
|
|
7966
|
-
const isParent =
|
|
8027
|
+
const isParent = useMemo9(
|
|
7967
8028
|
() => isTaskParent(task.id, allTasks),
|
|
7968
8029
|
[task.id, allTasks]
|
|
7969
8030
|
);
|
|
@@ -7971,7 +8032,7 @@ var TaskListRow = React10.memo(
|
|
|
7971
8032
|
const rowFillLevel = Math.min(nestingDepth, 2);
|
|
7972
8033
|
const isTotalRow = Boolean(task.isTotal);
|
|
7973
8034
|
const isMilestoneRow = normalizedTask.type === "milestone";
|
|
7974
|
-
const weekendPredicate =
|
|
8035
|
+
const weekendPredicate = useMemo9(
|
|
7975
8036
|
() => createCustomDayPredicate({ customDays, isWeekend: isWeekend3 }),
|
|
7976
8037
|
[customDays, isWeekend3]
|
|
7977
8038
|
);
|
|
@@ -7994,7 +8055,7 @@ var TaskListRow = React10.memo(
|
|
|
7994
8055
|
const compositeIconModeRef = useRef5(compositeIconMode);
|
|
7995
8056
|
const [compositeIconAnimation, setCompositeIconAnimation] = useState6(null);
|
|
7996
8057
|
const [compositeIconAnimationPhase, setCompositeIconAnimationPhase] = useState6(null);
|
|
7997
|
-
|
|
8058
|
+
useEffect6(() => {
|
|
7998
8059
|
const nextMode = isCollapsed ? "composite" : "down";
|
|
7999
8060
|
if (nextMode === compositeIconModeRef.current) {
|
|
8000
8061
|
setCompositeIconAnimation(null);
|
|
@@ -8024,7 +8085,7 @@ var TaskListRow = React10.memo(
|
|
|
8024
8085
|
const isSourceRow = isPicking && selectingPredecessorFor === task.id;
|
|
8025
8086
|
const [dependencySearchQuery, setDependencySearchQuery] = useState6("");
|
|
8026
8087
|
const [highlightedDependencyIndex, setHighlightedDependencyIndex] = useState6(0);
|
|
8027
|
-
const chips =
|
|
8088
|
+
const chips = useMemo9(() => {
|
|
8028
8089
|
const taskById = new Map((allTasks ?? []).map((t) => [t.id, t]));
|
|
8029
8090
|
return (task.dependencies ?? []).map((dep) => {
|
|
8030
8091
|
const pred = taskById.get(dep.taskId);
|
|
@@ -8033,7 +8094,7 @@ var TaskListRow = React10.memo(
|
|
|
8033
8094
|
});
|
|
8034
8095
|
}, [task.dependencies, allTasks]);
|
|
8035
8096
|
const linkWord = chips.length <= 4 ? "\u0441\u0432\u044F\u0437\u0438" : "\u0441\u0432\u044F\u0437\u0435\u0439";
|
|
8036
|
-
const dependencySearchCandidates =
|
|
8097
|
+
const dependencySearchCandidates = useMemo9(() => {
|
|
8037
8098
|
if (!isSourceRow) return [];
|
|
8038
8099
|
const normalizedQuery = dependencySearchQuery.trim().toLowerCase();
|
|
8039
8100
|
return allTasks.filter((candidate) => candidate.id !== task.id).map((candidate) => {
|
|
@@ -8060,7 +8121,7 @@ var TaskListRow = React10.memo(
|
|
|
8060
8121
|
taskNumberMap,
|
|
8061
8122
|
task.dependencies
|
|
8062
8123
|
]);
|
|
8063
|
-
|
|
8124
|
+
useEffect6(() => {
|
|
8064
8125
|
if (editingName && nameInputRef.current) {
|
|
8065
8126
|
nameInputRef.current.focus();
|
|
8066
8127
|
if (editTriggerRef.current === "keypress") {
|
|
@@ -8071,15 +8132,15 @@ var TaskListRow = React10.memo(
|
|
|
8071
8132
|
}
|
|
8072
8133
|
}
|
|
8073
8134
|
}, [editingName]);
|
|
8074
|
-
|
|
8135
|
+
useEffect6(() => {
|
|
8075
8136
|
if (!isSourceRow && dependencySearchQuery !== "") {
|
|
8076
8137
|
setDependencySearchQuery("");
|
|
8077
8138
|
}
|
|
8078
8139
|
}, [isSourceRow, dependencySearchQuery]);
|
|
8079
|
-
|
|
8140
|
+
useEffect6(() => {
|
|
8080
8141
|
setHighlightedDependencyIndex(0);
|
|
8081
8142
|
}, [dependencySearchQuery, isSourceRow, dependencyPickMode]);
|
|
8082
|
-
|
|
8143
|
+
useEffect6(() => {
|
|
8083
8144
|
if (dependencySearchCandidates.length === 0) {
|
|
8084
8145
|
setHighlightedDependencyIndex(0);
|
|
8085
8146
|
return;
|
|
@@ -8088,13 +8149,13 @@ var TaskListRow = React10.memo(
|
|
|
8088
8149
|
setHighlightedDependencyIndex(dependencySearchCandidates.length - 1);
|
|
8089
8150
|
}
|
|
8090
8151
|
}, [dependencySearchCandidates, highlightedDependencyIndex]);
|
|
8091
|
-
|
|
8152
|
+
useEffect6(() => {
|
|
8092
8153
|
if (isSourceRow && dependencySearchInputRef.current) {
|
|
8093
8154
|
dependencySearchInputRef.current.focus();
|
|
8094
8155
|
dependencySearchInputRef.current.select();
|
|
8095
8156
|
}
|
|
8096
8157
|
}, [isSourceRow, dependencyPickMode, activeLinkType]);
|
|
8097
|
-
|
|
8158
|
+
useEffect6(() => {
|
|
8098
8159
|
if (!isSourceRow || dependencySearchCandidates.length === 0) {
|
|
8099
8160
|
return;
|
|
8100
8161
|
}
|
|
@@ -8106,7 +8167,7 @@ var TaskListRow = React10.memo(
|
|
|
8106
8167
|
block: "nearest"
|
|
8107
8168
|
});
|
|
8108
8169
|
}, [isSourceRow, highlightedDependencyIndex, dependencySearchCandidates]);
|
|
8109
|
-
|
|
8170
|
+
useEffect6(() => {
|
|
8110
8171
|
if (editingTaskId === task.id && !disableTaskNameEditing && autoEditedForRef.current !== editingTaskId) {
|
|
8111
8172
|
autoEditedForRef.current = editingTaskId;
|
|
8112
8173
|
nameConfirmedRef.current = false;
|
|
@@ -8288,16 +8349,16 @@ var TaskListRow = React10.memo(
|
|
|
8288
8349
|
},
|
|
8289
8350
|
[progressValue, task, onTasksChange, handleProgressCancel, allTasks]
|
|
8290
8351
|
);
|
|
8291
|
-
|
|
8352
|
+
useEffect6(() => {
|
|
8292
8353
|
if (editingProgress && progressInputRef.current) {
|
|
8293
8354
|
progressInputRef.current.focus();
|
|
8294
8355
|
progressInputRef.current.select();
|
|
8295
8356
|
}
|
|
8296
8357
|
}, [editingProgress]);
|
|
8297
|
-
|
|
8358
|
+
useEffect6(() => {
|
|
8298
8359
|
setDurationValue(getDuration(normalizedTask.startDate, normalizedTask.endDate));
|
|
8299
8360
|
}, [normalizedTask.startDate, normalizedTask.endDate, getDuration]);
|
|
8300
|
-
|
|
8361
|
+
useEffect6(() => {
|
|
8301
8362
|
if (editingDuration && durationInputRef.current) {
|
|
8302
8363
|
durationInputRef.current.focus();
|
|
8303
8364
|
durationInputRef.current.select();
|
|
@@ -8443,7 +8504,7 @@ var TaskListRow = React10.memo(
|
|
|
8443
8504
|
[task, onTasksChange, businessDays, getDuration, weekendPredicate, allTasks, isMilestone, emitMilestoneDateChange, taskDateChangeMode]
|
|
8444
8505
|
);
|
|
8445
8506
|
const datePickerFooter = onTaskDateChangeModeChange ? /* @__PURE__ */ jsxs10("label", { className: "gantt-datepicker-mode-checkbox", children: [
|
|
8446
|
-
/* @__PURE__ */
|
|
8507
|
+
/* @__PURE__ */ jsx15(
|
|
8447
8508
|
"input",
|
|
8448
8509
|
{
|
|
8449
8510
|
type: "checkbox",
|
|
@@ -8451,7 +8512,7 @@ var TaskListRow = React10.memo(
|
|
|
8451
8512
|
onChange: (event) => onTaskDateChangeModeChange(event.target.checked ? "preserve-duration" : "free")
|
|
8452
8513
|
}
|
|
8453
8514
|
),
|
|
8454
|
-
/* @__PURE__ */
|
|
8515
|
+
/* @__PURE__ */ jsx15("span", { children: "\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C" })
|
|
8455
8516
|
] }) : null;
|
|
8456
8517
|
const handleRowClickInternal = useCallback5(() => {
|
|
8457
8518
|
onRowClick?.(task.id);
|
|
@@ -8511,7 +8572,7 @@ var TaskListRow = React10.memo(
|
|
|
8511
8572
|
},
|
|
8512
8573
|
[onUngroupTask, task.id]
|
|
8513
8574
|
);
|
|
8514
|
-
const visibleCustomMenuCommands =
|
|
8575
|
+
const visibleCustomMenuCommands = useMemo9(
|
|
8515
8576
|
() => taskListMenuCommands.filter(
|
|
8516
8577
|
(command) => {
|
|
8517
8578
|
const scope = command.scope ?? "all";
|
|
@@ -8609,7 +8670,7 @@ var TaskListRow = React10.memo(
|
|
|
8609
8670
|
onClick: (e) => e.stopPropagation(),
|
|
8610
8671
|
children: [
|
|
8611
8672
|
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-dep-source-direction", children: [
|
|
8612
|
-
/* @__PURE__ */
|
|
8673
|
+
/* @__PURE__ */ jsx15(
|
|
8613
8674
|
"button",
|
|
8614
8675
|
{
|
|
8615
8676
|
type: "button",
|
|
@@ -8618,7 +8679,7 @@ var TaskListRow = React10.memo(
|
|
|
8618
8679
|
children: "\u041F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C"
|
|
8619
8680
|
}
|
|
8620
8681
|
),
|
|
8621
|
-
/* @__PURE__ */
|
|
8682
|
+
/* @__PURE__ */ jsx15(
|
|
8622
8683
|
"button",
|
|
8623
8684
|
{
|
|
8624
8685
|
type: "button",
|
|
@@ -8628,7 +8689,7 @@ var TaskListRow = React10.memo(
|
|
|
8628
8689
|
}
|
|
8629
8690
|
)
|
|
8630
8691
|
] }),
|
|
8631
|
-
/* @__PURE__ */
|
|
8692
|
+
/* @__PURE__ */ jsx15("div", { className: "gantt-tl-dep-source-types", children: LINK_TYPE_ORDER.map((linkType) => {
|
|
8632
8693
|
const Icon = LINK_TYPE_ICONS[linkType];
|
|
8633
8694
|
return /* @__PURE__ */ jsxs10(
|
|
8634
8695
|
"button",
|
|
@@ -8639,14 +8700,14 @@ var TaskListRow = React10.memo(
|
|
|
8639
8700
|
"aria-label": `\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u0438\u043F \u0441\u0432\u044F\u0437\u0438 ${linkType}`,
|
|
8640
8701
|
title: linkType,
|
|
8641
8702
|
children: [
|
|
8642
|
-
/* @__PURE__ */
|
|
8643
|
-
/* @__PURE__ */
|
|
8703
|
+
/* @__PURE__ */ jsx15(Icon, {}),
|
|
8704
|
+
/* @__PURE__ */ jsx15("span", { children: LINK_TYPE_LABELS_RU2[linkType] })
|
|
8644
8705
|
]
|
|
8645
8706
|
},
|
|
8646
8707
|
linkType
|
|
8647
8708
|
);
|
|
8648
8709
|
}) }),
|
|
8649
|
-
/* @__PURE__ */
|
|
8710
|
+
/* @__PURE__ */ jsx15("div", { className: "gantt-tl-dep-source-picker-head", children: /* @__PURE__ */ jsx15(
|
|
8650
8711
|
"input",
|
|
8651
8712
|
{
|
|
8652
8713
|
ref: dependencySearchInputRef,
|
|
@@ -8688,7 +8749,7 @@ var TaskListRow = React10.memo(
|
|
|
8688
8749
|
}
|
|
8689
8750
|
}
|
|
8690
8751
|
) }),
|
|
8691
|
-
/* @__PURE__ */
|
|
8752
|
+
/* @__PURE__ */ jsx15(
|
|
8692
8753
|
"div",
|
|
8693
8754
|
{
|
|
8694
8755
|
ref: dependencySearchListRef,
|
|
@@ -8713,8 +8774,8 @@ var TaskListRow = React10.memo(
|
|
|
8713
8774
|
},
|
|
8714
8775
|
title: label,
|
|
8715
8776
|
children: [
|
|
8716
|
-
/* @__PURE__ */
|
|
8717
|
-
isAlreadyLinked && /* @__PURE__ */
|
|
8777
|
+
/* @__PURE__ */ jsx15("span", { className: "gantt-tl-dep-source-option-label", children: label }),
|
|
8778
|
+
isAlreadyLinked && /* @__PURE__ */ jsx15(
|
|
8718
8779
|
"span",
|
|
8719
8780
|
{
|
|
8720
8781
|
className: "gantt-tl-dep-source-option-remove",
|
|
@@ -8729,7 +8790,7 @@ var TaskListRow = React10.memo(
|
|
|
8729
8790
|
]
|
|
8730
8791
|
},
|
|
8731
8792
|
candidate.id
|
|
8732
|
-
)) : /* @__PURE__ */
|
|
8793
|
+
)) : /* @__PURE__ */ jsx15("span", { className: "gantt-tl-dep-source-hint", children: "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E" })
|
|
8733
8794
|
}
|
|
8734
8795
|
)
|
|
8735
8796
|
]
|
|
@@ -8739,13 +8800,13 @@ var TaskListRow = React10.memo(
|
|
|
8739
8800
|
const isSelectedDependencyOwner = selectedChip != null && selectedChip.successorId === task.id;
|
|
8740
8801
|
const startDateISO = toISODate2(normalizedTask.startDate);
|
|
8741
8802
|
const endDateISO = editingDuration ? getEndDate(normalizedTask.startDate, durationValue) : toISODate2(normalizedTask.endDate);
|
|
8742
|
-
const selectionCell = /* @__PURE__ */
|
|
8803
|
+
const selectionCell = /* @__PURE__ */ jsx15(
|
|
8743
8804
|
"div",
|
|
8744
8805
|
{
|
|
8745
8806
|
className: "gantt-tl-cell gantt-tl-cell-selection",
|
|
8746
8807
|
style: getColumnStyle("selection", 36),
|
|
8747
8808
|
onClick: (e) => e.stopPropagation(),
|
|
8748
|
-
children: /* @__PURE__ */
|
|
8809
|
+
children: /* @__PURE__ */ jsx15(
|
|
8749
8810
|
"input",
|
|
8750
8811
|
{
|
|
8751
8812
|
type: "checkbox",
|
|
@@ -8764,7 +8825,7 @@ var TaskListRow = React10.memo(
|
|
|
8764
8825
|
style: getColumnStyle("number", 40),
|
|
8765
8826
|
onClick: handleNumberClick,
|
|
8766
8827
|
children: [
|
|
8767
|
-
onDragStart && /* @__PURE__ */
|
|
8828
|
+
onDragStart && /* @__PURE__ */ jsx15(
|
|
8768
8829
|
"span",
|
|
8769
8830
|
{
|
|
8770
8831
|
className: "gantt-tl-drag-handle",
|
|
@@ -8775,10 +8836,10 @@ var TaskListRow = React10.memo(
|
|
|
8775
8836
|
},
|
|
8776
8837
|
onDragEnd: (e) => onDragEnd?.(e),
|
|
8777
8838
|
onClick: (e) => e.stopPropagation(),
|
|
8778
|
-
children: /* @__PURE__ */
|
|
8839
|
+
children: /* @__PURE__ */ jsx15(DragHandleIcon, {})
|
|
8779
8840
|
}
|
|
8780
8841
|
),
|
|
8781
|
-
/* @__PURE__ */
|
|
8842
|
+
/* @__PURE__ */ jsx15("span", { className: "gantt-tl-num-label", children: taskNumber || rowIndex + 1 })
|
|
8782
8843
|
]
|
|
8783
8844
|
}
|
|
8784
8845
|
);
|
|
@@ -8798,8 +8859,8 @@ var TaskListRow = React10.memo(
|
|
|
8798
8859
|
isChild && !editingName && /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
8799
8860
|
!isFilterHideMode && /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
8800
8861
|
ancestorLineModes.map(
|
|
8801
|
-
(mode, idx) => mode ? /* @__PURE__ */ jsxs10(
|
|
8802
|
-
/* @__PURE__ */
|
|
8862
|
+
(mode, idx) => mode ? /* @__PURE__ */ jsxs10(React11.Fragment, { children: [
|
|
8863
|
+
/* @__PURE__ */ jsx15(
|
|
8803
8864
|
"span",
|
|
8804
8865
|
{
|
|
8805
8866
|
"data-testid": `gantt-tl-ancestor-connector-${idx}`,
|
|
@@ -8815,7 +8876,7 @@ var TaskListRow = React10.memo(
|
|
|
8815
8876
|
}
|
|
8816
8877
|
}
|
|
8817
8878
|
),
|
|
8818
|
-
mode === "half" && /* @__PURE__ */
|
|
8879
|
+
mode === "half" && /* @__PURE__ */ jsx15(
|
|
8819
8880
|
"span",
|
|
8820
8881
|
{
|
|
8821
8882
|
"data-testid": `gantt-tl-ancestor-connector-cap-${idx}`,
|
|
@@ -8833,7 +8894,7 @@ var TaskListRow = React10.memo(
|
|
|
8833
8894
|
)
|
|
8834
8895
|
] }, idx) : null
|
|
8835
8896
|
),
|
|
8836
|
-
nestingDepth > 0 && /* @__PURE__ */
|
|
8897
|
+
nestingDepth > 0 && /* @__PURE__ */ jsx15(
|
|
8837
8898
|
"span",
|
|
8838
8899
|
{
|
|
8839
8900
|
"data-testid": "gantt-tl-child-connector-vertical",
|
|
@@ -8849,7 +8910,7 @@ var TaskListRow = React10.memo(
|
|
|
8849
8910
|
}
|
|
8850
8911
|
}
|
|
8851
8912
|
),
|
|
8852
|
-
/* @__PURE__ */
|
|
8913
|
+
/* @__PURE__ */ jsx15(
|
|
8853
8914
|
"span",
|
|
8854
8915
|
{
|
|
8855
8916
|
style: {
|
|
@@ -8864,7 +8925,7 @@ var TaskListRow = React10.memo(
|
|
|
8864
8925
|
}
|
|
8865
8926
|
}
|
|
8866
8927
|
),
|
|
8867
|
-
/* @__PURE__ */
|
|
8928
|
+
/* @__PURE__ */ jsx15(
|
|
8868
8929
|
"span",
|
|
8869
8930
|
{
|
|
8870
8931
|
style: {
|
|
@@ -8880,7 +8941,7 @@ var TaskListRow = React10.memo(
|
|
|
8880
8941
|
}
|
|
8881
8942
|
)
|
|
8882
8943
|
] }),
|
|
8883
|
-
task.composite && !isFilterHideMode && !isCollapsed && !editingName && /* @__PURE__ */
|
|
8944
|
+
task.composite && !isFilterHideMode && !isCollapsed && !editingName && /* @__PURE__ */ jsx15(
|
|
8884
8945
|
"span",
|
|
8885
8946
|
{
|
|
8886
8947
|
"data-testid": "gantt-tl-parent-connector-tail",
|
|
@@ -8896,7 +8957,7 @@ var TaskListRow = React10.memo(
|
|
|
8896
8957
|
}
|
|
8897
8958
|
}
|
|
8898
8959
|
),
|
|
8899
|
-
isParent && !task.composite && !editingName && /* @__PURE__ */
|
|
8960
|
+
isParent && !task.composite && !editingName && /* @__PURE__ */ jsx15(Fragment3, { children: /* @__PURE__ */ jsx15(
|
|
8900
8961
|
"button",
|
|
8901
8962
|
{
|
|
8902
8963
|
type: "button",
|
|
@@ -8904,12 +8965,12 @@ var TaskListRow = React10.memo(
|
|
|
8904
8965
|
onClick: handleToggleCollapse,
|
|
8905
8966
|
style: { left: `${nestingDepth * 20 - 2}px` },
|
|
8906
8967
|
"aria-label": isCollapsed ? "Expand children" : "Collapse children",
|
|
8907
|
-
children: /* @__PURE__ */
|
|
8968
|
+
children: /* @__PURE__ */ jsx15(ChevronRightIcon, {})
|
|
8908
8969
|
}
|
|
8909
8970
|
) })
|
|
8910
8971
|
] }),
|
|
8911
8972
|
!isChild && isParent && !task.composite && !editingName && /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
8912
|
-
!isFilterHideMode && !isCollapsed && /* @__PURE__ */
|
|
8973
|
+
!isFilterHideMode && !isCollapsed && /* @__PURE__ */ jsx15(
|
|
8913
8974
|
"span",
|
|
8914
8975
|
{
|
|
8915
8976
|
"data-testid": "gantt-tl-parent-connector-tail",
|
|
@@ -8925,7 +8986,7 @@ var TaskListRow = React10.memo(
|
|
|
8925
8986
|
}
|
|
8926
8987
|
}
|
|
8927
8988
|
),
|
|
8928
|
-
/* @__PURE__ */
|
|
8989
|
+
/* @__PURE__ */ jsx15(
|
|
8929
8990
|
"button",
|
|
8930
8991
|
{
|
|
8931
8992
|
type: "button",
|
|
@@ -8933,11 +8994,11 @@ var TaskListRow = React10.memo(
|
|
|
8933
8994
|
onClick: handleToggleCollapse,
|
|
8934
8995
|
style: { left: `${nestingDepth * 20 - 2}px` },
|
|
8935
8996
|
"aria-label": isCollapsed ? "Expand children" : "Collapse children",
|
|
8936
|
-
children: /* @__PURE__ */
|
|
8997
|
+
children: /* @__PURE__ */ jsx15(ChevronRightIcon, {})
|
|
8937
8998
|
}
|
|
8938
8999
|
)
|
|
8939
9000
|
] }),
|
|
8940
|
-
editingName ? /* @__PURE__ */
|
|
9001
|
+
editingName ? /* @__PURE__ */ jsx15(
|
|
8941
9002
|
Input,
|
|
8942
9003
|
{
|
|
8943
9004
|
ref: nameInputRef,
|
|
@@ -8951,7 +9012,7 @@ var TaskListRow = React10.memo(
|
|
|
8951
9012
|
onClick: (e) => e.stopPropagation()
|
|
8952
9013
|
}
|
|
8953
9014
|
) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
8954
|
-
task.composite && /* @__PURE__ */
|
|
9015
|
+
task.composite && /* @__PURE__ */ jsx15(
|
|
8955
9016
|
"button",
|
|
8956
9017
|
{
|
|
8957
9018
|
type: "button",
|
|
@@ -8961,7 +9022,7 @@ var TaskListRow = React10.memo(
|
|
|
8961
9022
|
"aria-label": isCollapsed ? `\u0420\u0430\u0441\u043A\u0440\u044B\u0442\u044C ${task.name}` : `\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C ${task.name}`,
|
|
8962
9023
|
"aria-expanded": !isCollapsed,
|
|
8963
9024
|
title: isCollapsed ? "\u0420\u0430\u0441\u043A\u0440\u044B\u0442\u044C \u044D\u0442\u0430\u0436\u0438" : "\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u044D\u0442\u0430\u0436\u0438",
|
|
8964
|
-
children: /* @__PURE__ */
|
|
9025
|
+
children: /* @__PURE__ */ jsx15(
|
|
8965
9026
|
"svg",
|
|
8966
9027
|
{
|
|
8967
9028
|
className: compositeIconAnimation && compositeIconAnimationPhase ? `gantt-tl-compositeGlyph-${compositeIconMode}-${compositeIconAnimation}-${compositeIconAnimationPhase}` : void 0,
|
|
@@ -8973,11 +9034,11 @@ var TaskListRow = React10.memo(
|
|
|
8973
9034
|
strokeLinejoin: "round",
|
|
8974
9035
|
"aria-hidden": "true",
|
|
8975
9036
|
children: compositeIconMode === "composite" ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
8976
|
-
/* @__PURE__ */
|
|
8977
|
-
/* @__PURE__ */
|
|
8978
|
-
/* @__PURE__ */
|
|
8979
|
-
/* @__PURE__ */
|
|
8980
|
-
] }) : /* @__PURE__ */
|
|
9037
|
+
/* @__PURE__ */ jsx15("path", { d: "M21 5H11" }),
|
|
9038
|
+
/* @__PURE__ */ jsx15("path", { d: "M21 12H11" }),
|
|
9039
|
+
/* @__PURE__ */ jsx15("path", { d: "M21 19H11" }),
|
|
9040
|
+
/* @__PURE__ */ jsx15("path", { d: "m3 8 4 4-4 4" })
|
|
9041
|
+
] }) : /* @__PURE__ */ jsx15("path", { d: "m6 9 6 6 6-6" })
|
|
8981
9042
|
}
|
|
8982
9043
|
)
|
|
8983
9044
|
}
|
|
@@ -8995,13 +9056,13 @@ var TaskListRow = React10.memo(
|
|
|
8995
9056
|
paddingRight: task.color ? "20px" : void 0
|
|
8996
9057
|
},
|
|
8997
9058
|
children: [
|
|
8998
|
-
taskListNamePrefixIcon ? /* @__PURE__ */
|
|
8999
|
-
/* @__PURE__ */
|
|
9059
|
+
taskListNamePrefixIcon ? /* @__PURE__ */ jsx15("span", { className: "gantt-tl-name-trigger-icon", "aria-hidden": "true", children: taskListNamePrefixIcon }) : null,
|
|
9060
|
+
/* @__PURE__ */ jsx15("span", { className: "gantt-tl-name-trigger-text", children: task.name })
|
|
9000
9061
|
]
|
|
9001
9062
|
}
|
|
9002
9063
|
)
|
|
9003
9064
|
] }),
|
|
9004
|
-
!editingName && task.color && /* @__PURE__ */
|
|
9065
|
+
!editingName && task.color && /* @__PURE__ */ jsx15(
|
|
9005
9066
|
"span",
|
|
9006
9067
|
{
|
|
9007
9068
|
className: "gantt-tl-name-color-stripe",
|
|
@@ -9010,7 +9071,7 @@ var TaskListRow = React10.memo(
|
|
|
9010
9071
|
}
|
|
9011
9072
|
),
|
|
9012
9073
|
!editingName && !hideTaskListRowActions && (onInsertAfter || onDelete || onPromoteTask || onDemoteTask || onUngroupTask || onDuplicateTask || onTasksChange || hasContextMenu) && /* @__PURE__ */ jsxs10("div", { className: `gantt-tl-name-actions${contextMenuOpen ? " gantt-tl-name-actions-open" : ""}`, children: [
|
|
9013
|
-
onInsertAfter && /* @__PURE__ */
|
|
9074
|
+
onInsertAfter && /* @__PURE__ */ jsx15(
|
|
9014
9075
|
"button",
|
|
9015
9076
|
{
|
|
9016
9077
|
type: "button",
|
|
@@ -9032,10 +9093,10 @@ var TaskListRow = React10.memo(
|
|
|
9032
9093
|
onInsertAfter(task.id, newTask);
|
|
9033
9094
|
},
|
|
9034
9095
|
"aria-label": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443 \u043F\u043E\u0441\u043B\u0435 \u044D\u0442\u043E\u0439",
|
|
9035
|
-
children: /* @__PURE__ */
|
|
9096
|
+
children: /* @__PURE__ */ jsx15(PlusIcon, {})
|
|
9036
9097
|
}
|
|
9037
9098
|
),
|
|
9038
|
-
/* @__PURE__ */
|
|
9099
|
+
/* @__PURE__ */ jsx15(
|
|
9039
9100
|
HierarchyButton,
|
|
9040
9101
|
{
|
|
9041
9102
|
isChild,
|
|
@@ -9049,7 +9110,7 @@ var TaskListRow = React10.memo(
|
|
|
9049
9110
|
setContextMenuOpen(open);
|
|
9050
9111
|
if (!open) closeColorMenu();
|
|
9051
9112
|
}, children: [
|
|
9052
|
-
/* @__PURE__ */
|
|
9113
|
+
/* @__PURE__ */ jsx15(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
9053
9114
|
"button",
|
|
9054
9115
|
{
|
|
9055
9116
|
type: "button",
|
|
@@ -9059,7 +9120,7 @@ var TaskListRow = React10.memo(
|
|
|
9059
9120
|
setContextMenuOpen((v) => !v);
|
|
9060
9121
|
},
|
|
9061
9122
|
"aria-label": "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E",
|
|
9062
|
-
children: /* @__PURE__ */
|
|
9123
|
+
children: /* @__PURE__ */ jsx15(VerticalDotsIcon, {})
|
|
9063
9124
|
}
|
|
9064
9125
|
) }),
|
|
9065
9126
|
/* @__PURE__ */ jsxs10(PopoverContent, { className: "gantt-tl-context-menu", portal: true, align: "end", children: [
|
|
@@ -9088,7 +9149,7 @@ var TaskListRow = React10.memo(
|
|
|
9088
9149
|
"aria-haspopup": "menu",
|
|
9089
9150
|
children: [
|
|
9090
9151
|
/* @__PURE__ */ jsxs10("span", { className: "gantt-tl-context-menu-item-main", children: [
|
|
9091
|
-
task.color && /* @__PURE__ */
|
|
9152
|
+
task.color && /* @__PURE__ */ jsx15(
|
|
9092
9153
|
"span",
|
|
9093
9154
|
{
|
|
9094
9155
|
className: "gantt-tl-color-swatch gantt-tl-color-swatch-inline",
|
|
@@ -9098,12 +9159,12 @@ var TaskListRow = React10.memo(
|
|
|
9098
9159
|
),
|
|
9099
9160
|
"\u0426\u0432\u0435\u0442"
|
|
9100
9161
|
] }),
|
|
9101
|
-
/* @__PURE__ */
|
|
9162
|
+
/* @__PURE__ */ jsx15(ChevronRightIcon, {})
|
|
9102
9163
|
]
|
|
9103
9164
|
}
|
|
9104
9165
|
),
|
|
9105
|
-
colorMenuOpen && /* @__PURE__ */
|
|
9106
|
-
/* @__PURE__ */
|
|
9166
|
+
colorMenuOpen && /* @__PURE__ */ jsx15("div", { className: "gantt-tl-context-submenu", role: "menu", "aria-label": "\u0412\u044B\u0431\u043E\u0440 \u0446\u0432\u0435\u0442\u0430", children: /* @__PURE__ */ jsxs10("div", { className: "gantt-tl-color-grid", children: [
|
|
9167
|
+
/* @__PURE__ */ jsx15(
|
|
9107
9168
|
"button",
|
|
9108
9169
|
{
|
|
9109
9170
|
type: "button",
|
|
@@ -9114,10 +9175,10 @@ var TaskListRow = React10.memo(
|
|
|
9114
9175
|
},
|
|
9115
9176
|
"aria-label": "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0446\u0432\u0435\u0442",
|
|
9116
9177
|
title: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0446\u0432\u0435\u0442",
|
|
9117
|
-
children: /* @__PURE__ */
|
|
9178
|
+
children: /* @__PURE__ */ jsx15("span", { className: "gantt-tl-color-swatch-clear-line" })
|
|
9118
9179
|
}
|
|
9119
9180
|
),
|
|
9120
|
-
TASK_COLOR_PALETTE.map((paletteColor) => /* @__PURE__ */
|
|
9181
|
+
TASK_COLOR_PALETTE.map((paletteColor) => /* @__PURE__ */ jsx15(
|
|
9121
9182
|
"button",
|
|
9122
9183
|
{
|
|
9123
9184
|
type: "button",
|
|
@@ -9147,13 +9208,13 @@ var TaskListRow = React10.memo(
|
|
|
9147
9208
|
onDuplicateTask(task.id);
|
|
9148
9209
|
},
|
|
9149
9210
|
children: [
|
|
9150
|
-
/* @__PURE__ */
|
|
9211
|
+
/* @__PURE__ */ jsx15(CopyIcon, {}),
|
|
9151
9212
|
"\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C"
|
|
9152
9213
|
]
|
|
9153
9214
|
}
|
|
9154
9215
|
),
|
|
9155
|
-
visibleCustomMenuCommands.map((command) => /* @__PURE__ */ jsxs10(
|
|
9156
|
-
command.divider === "top" && /* @__PURE__ */
|
|
9216
|
+
visibleCustomMenuCommands.map((command) => /* @__PURE__ */ jsxs10(React11.Fragment, { children: [
|
|
9217
|
+
command.divider === "top" && /* @__PURE__ */ jsx15("hr", { className: "gantt-tl-context-menu-divider" }),
|
|
9157
9218
|
/* @__PURE__ */ jsxs10(
|
|
9158
9219
|
"button",
|
|
9159
9220
|
{
|
|
@@ -9167,7 +9228,7 @@ var TaskListRow = React10.memo(
|
|
|
9167
9228
|
]
|
|
9168
9229
|
}
|
|
9169
9230
|
),
|
|
9170
|
-
command.divider === "bottom" && /* @__PURE__ */
|
|
9231
|
+
command.divider === "bottom" && /* @__PURE__ */ jsx15("hr", { className: "gantt-tl-context-menu-divider" })
|
|
9171
9232
|
] }, command.id)),
|
|
9172
9233
|
isParent && onUngroupTask && /* @__PURE__ */ jsxs10(
|
|
9173
9234
|
"button",
|
|
@@ -9176,7 +9237,7 @@ var TaskListRow = React10.memo(
|
|
|
9176
9237
|
className: "gantt-tl-context-menu-item",
|
|
9177
9238
|
onClick: handleUngroup,
|
|
9178
9239
|
children: [
|
|
9179
|
-
/* @__PURE__ */
|
|
9240
|
+
/* @__PURE__ */ jsx15(UngroupIcon, {}),
|
|
9180
9241
|
"\u0420\u0430\u0437\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C"
|
|
9181
9242
|
]
|
|
9182
9243
|
}
|
|
@@ -9192,7 +9253,7 @@ var TaskListRow = React10.memo(
|
|
|
9192
9253
|
onDelete(task.id);
|
|
9193
9254
|
},
|
|
9194
9255
|
children: [
|
|
9195
|
-
/* @__PURE__ */
|
|
9256
|
+
/* @__PURE__ */ jsx15(TrashIcon, {}),
|
|
9196
9257
|
"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0431\u043E\u0442\u0443"
|
|
9197
9258
|
]
|
|
9198
9259
|
}
|
|
@@ -9201,13 +9262,13 @@ var TaskListRow = React10.memo(
|
|
|
9201
9262
|
] })
|
|
9202
9263
|
] })
|
|
9203
9264
|
] });
|
|
9204
|
-
const startDateCell = /* @__PURE__ */
|
|
9265
|
+
const startDateCell = /* @__PURE__ */ jsx15(
|
|
9205
9266
|
"div",
|
|
9206
9267
|
{
|
|
9207
9268
|
className: "gantt-tl-cell gantt-tl-cell-date",
|
|
9208
9269
|
style: getColumnStyle("startDate", 90),
|
|
9209
9270
|
onClick: (e) => e.stopPropagation(),
|
|
9210
|
-
children: /* @__PURE__ */
|
|
9271
|
+
children: /* @__PURE__ */ jsx15(
|
|
9211
9272
|
DatePicker,
|
|
9212
9273
|
{
|
|
9213
9274
|
value: startDateISO,
|
|
@@ -9222,13 +9283,13 @@ var TaskListRow = React10.memo(
|
|
|
9222
9283
|
)
|
|
9223
9284
|
}
|
|
9224
9285
|
);
|
|
9225
|
-
const endDateCell = /* @__PURE__ */
|
|
9286
|
+
const endDateCell = /* @__PURE__ */ jsx15(
|
|
9226
9287
|
"div",
|
|
9227
9288
|
{
|
|
9228
9289
|
className: "gantt-tl-cell gantt-tl-cell-date",
|
|
9229
9290
|
style: getColumnStyle("endDate", 90),
|
|
9230
9291
|
onClick: (e) => e.stopPropagation(),
|
|
9231
|
-
children: /* @__PURE__ */
|
|
9292
|
+
children: /* @__PURE__ */ jsx15(
|
|
9232
9293
|
DatePicker,
|
|
9233
9294
|
{
|
|
9234
9295
|
value: endDateISO,
|
|
@@ -9256,7 +9317,7 @@ var TaskListRow = React10.memo(
|
|
|
9256
9317
|
className: "gantt-tl-number-editor",
|
|
9257
9318
|
onClick: (e) => e.stopPropagation(),
|
|
9258
9319
|
children: [
|
|
9259
|
-
/* @__PURE__ */
|
|
9320
|
+
/* @__PURE__ */ jsx15(
|
|
9260
9321
|
Input,
|
|
9261
9322
|
{
|
|
9262
9323
|
ref: durationInputRef,
|
|
@@ -9271,7 +9332,7 @@ var TaskListRow = React10.memo(
|
|
|
9271
9332
|
}
|
|
9272
9333
|
),
|
|
9273
9334
|
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-number-steppers", "aria-hidden": "true", children: [
|
|
9274
|
-
/* @__PURE__ */
|
|
9335
|
+
/* @__PURE__ */ jsx15(
|
|
9275
9336
|
"button",
|
|
9276
9337
|
{
|
|
9277
9338
|
type: "button",
|
|
@@ -9279,7 +9340,7 @@ var TaskListRow = React10.memo(
|
|
|
9279
9340
|
tabIndex: -1,
|
|
9280
9341
|
onMouseDown: (e) => e.preventDefault(),
|
|
9281
9342
|
onClick: () => handleDurationAdjust(1),
|
|
9282
|
-
children: /* @__PURE__ */
|
|
9343
|
+
children: /* @__PURE__ */ jsx15(
|
|
9283
9344
|
"svg",
|
|
9284
9345
|
{
|
|
9285
9346
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9291,12 +9352,12 @@ var TaskListRow = React10.memo(
|
|
|
9291
9352
|
strokeWidth: "2",
|
|
9292
9353
|
strokeLinecap: "round",
|
|
9293
9354
|
strokeLinejoin: "round",
|
|
9294
|
-
children: /* @__PURE__ */
|
|
9355
|
+
children: /* @__PURE__ */ jsx15("path", { d: "m18 15-6-6-6 6" })
|
|
9295
9356
|
}
|
|
9296
9357
|
)
|
|
9297
9358
|
}
|
|
9298
9359
|
),
|
|
9299
|
-
/* @__PURE__ */
|
|
9360
|
+
/* @__PURE__ */ jsx15(
|
|
9300
9361
|
"button",
|
|
9301
9362
|
{
|
|
9302
9363
|
type: "button",
|
|
@@ -9304,7 +9365,7 @@ var TaskListRow = React10.memo(
|
|
|
9304
9365
|
tabIndex: -1,
|
|
9305
9366
|
onMouseDown: (e) => e.preventDefault(),
|
|
9306
9367
|
onClick: () => handleDurationAdjust(-1),
|
|
9307
|
-
children: /* @__PURE__ */
|
|
9368
|
+
children: /* @__PURE__ */ jsx15(
|
|
9308
9369
|
"svg",
|
|
9309
9370
|
{
|
|
9310
9371
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9316,7 +9377,7 @@ var TaskListRow = React10.memo(
|
|
|
9316
9377
|
strokeWidth: "2",
|
|
9317
9378
|
strokeLinecap: "round",
|
|
9318
9379
|
strokeLinejoin: "round",
|
|
9319
|
-
children: /* @__PURE__ */
|
|
9380
|
+
children: /* @__PURE__ */ jsx15("path", { d: "m6 9 6 6 6-6" })
|
|
9320
9381
|
}
|
|
9321
9382
|
)
|
|
9322
9383
|
}
|
|
@@ -9325,7 +9386,7 @@ var TaskListRow = React10.memo(
|
|
|
9325
9386
|
]
|
|
9326
9387
|
}
|
|
9327
9388
|
),
|
|
9328
|
-
/* @__PURE__ */
|
|
9389
|
+
/* @__PURE__ */ jsx15(
|
|
9329
9390
|
"span",
|
|
9330
9391
|
{
|
|
9331
9392
|
className: "gantt-tl-duration-display",
|
|
@@ -9349,7 +9410,7 @@ var TaskListRow = React10.memo(
|
|
|
9349
9410
|
className: "gantt-tl-number-editor",
|
|
9350
9411
|
onClick: (e) => e.stopPropagation(),
|
|
9351
9412
|
children: [
|
|
9352
|
-
/* @__PURE__ */
|
|
9413
|
+
/* @__PURE__ */ jsx15(
|
|
9353
9414
|
Input,
|
|
9354
9415
|
{
|
|
9355
9416
|
ref: progressInputRef,
|
|
@@ -9365,7 +9426,7 @@ var TaskListRow = React10.memo(
|
|
|
9365
9426
|
}
|
|
9366
9427
|
),
|
|
9367
9428
|
/* @__PURE__ */ jsxs10("div", { className: "gantt-tl-number-steppers", "aria-hidden": "true", children: [
|
|
9368
|
-
/* @__PURE__ */
|
|
9429
|
+
/* @__PURE__ */ jsx15(
|
|
9369
9430
|
"button",
|
|
9370
9431
|
{
|
|
9371
9432
|
type: "button",
|
|
@@ -9373,7 +9434,7 @@ var TaskListRow = React10.memo(
|
|
|
9373
9434
|
tabIndex: -1,
|
|
9374
9435
|
onMouseDown: (e) => e.preventDefault(),
|
|
9375
9436
|
onClick: () => handleProgressAdjust(1),
|
|
9376
|
-
children: /* @__PURE__ */
|
|
9437
|
+
children: /* @__PURE__ */ jsx15(
|
|
9377
9438
|
"svg",
|
|
9378
9439
|
{
|
|
9379
9440
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9385,12 +9446,12 @@ var TaskListRow = React10.memo(
|
|
|
9385
9446
|
strokeWidth: "2",
|
|
9386
9447
|
strokeLinecap: "round",
|
|
9387
9448
|
strokeLinejoin: "round",
|
|
9388
|
-
children: /* @__PURE__ */
|
|
9449
|
+
children: /* @__PURE__ */ jsx15("path", { d: "m18 15-6-6-6 6" })
|
|
9389
9450
|
}
|
|
9390
9451
|
)
|
|
9391
9452
|
}
|
|
9392
9453
|
),
|
|
9393
|
-
/* @__PURE__ */
|
|
9454
|
+
/* @__PURE__ */ jsx15(
|
|
9394
9455
|
"button",
|
|
9395
9456
|
{
|
|
9396
9457
|
type: "button",
|
|
@@ -9398,7 +9459,7 @@ var TaskListRow = React10.memo(
|
|
|
9398
9459
|
tabIndex: -1,
|
|
9399
9460
|
onMouseDown: (e) => e.preventDefault(),
|
|
9400
9461
|
onClick: () => handleProgressAdjust(-1),
|
|
9401
|
-
children: /* @__PURE__ */
|
|
9462
|
+
children: /* @__PURE__ */ jsx15(
|
|
9402
9463
|
"svg",
|
|
9403
9464
|
{
|
|
9404
9465
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9410,7 +9471,7 @@ var TaskListRow = React10.memo(
|
|
|
9410
9471
|
strokeWidth: "2",
|
|
9411
9472
|
strokeLinecap: "round",
|
|
9412
9473
|
strokeLinejoin: "round",
|
|
9413
|
-
children: /* @__PURE__ */
|
|
9474
|
+
children: /* @__PURE__ */ jsx15("path", { d: "m6 9 6 6 6-6" })
|
|
9414
9475
|
}
|
|
9415
9476
|
)
|
|
9416
9477
|
}
|
|
@@ -9419,7 +9480,7 @@ var TaskListRow = React10.memo(
|
|
|
9419
9480
|
]
|
|
9420
9481
|
}
|
|
9421
9482
|
),
|
|
9422
|
-
/* @__PURE__ */
|
|
9483
|
+
/* @__PURE__ */ jsx15(
|
|
9423
9484
|
"span",
|
|
9424
9485
|
{
|
|
9425
9486
|
className: "gantt-tl-progress-display",
|
|
@@ -9435,14 +9496,14 @@ var TaskListRow = React10.memo(
|
|
|
9435
9496
|
]
|
|
9436
9497
|
}
|
|
9437
9498
|
);
|
|
9438
|
-
const dependenciesCell = /* @__PURE__ */
|
|
9499
|
+
const dependenciesCell = /* @__PURE__ */ jsx15(
|
|
9439
9500
|
"div",
|
|
9440
9501
|
{
|
|
9441
9502
|
className: "gantt-tl-cell gantt-tl-cell-deps",
|
|
9442
9503
|
style: getColumnStyle("dependencies", 128),
|
|
9443
9504
|
onClick: isSourceRow ? handleSourceCellClick : isPicking ? handlePredecessorPick : void 0,
|
|
9444
9505
|
children: isSourceRow ? /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
9445
|
-
/* @__PURE__ */
|
|
9506
|
+
/* @__PURE__ */ jsx15(
|
|
9446
9507
|
"span",
|
|
9447
9508
|
{
|
|
9448
9509
|
className: "gantt-tl-dep-source-hint",
|
|
@@ -9452,14 +9513,14 @@ var TaskListRow = React10.memo(
|
|
|
9452
9513
|
),
|
|
9453
9514
|
sourcePickerContent
|
|
9454
9515
|
] }) : /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
9455
|
-
printDependencyLabels ? /* @__PURE__ */
|
|
9516
|
+
printDependencyLabels ? /* @__PURE__ */ jsx15("span", { className: "gantt-tl-dependency-print-labels", children: chips.map(({ dep, lag }) => formatDependencyPrintLabel(
|
|
9456
9517
|
dep,
|
|
9457
9518
|
taskNumberMap[dep.taskId],
|
|
9458
9519
|
lag
|
|
9459
9520
|
)).join(", ") }) : chips.length >= 2 ? (
|
|
9460
9521
|
/* 2+ deps — show only "N связей" summary chip that opens a popover */
|
|
9461
9522
|
/* @__PURE__ */ jsxs10(Popover, { open: overflowOpen, onOpenChange: setOverflowOpen, children: [
|
|
9462
|
-
/* @__PURE__ */
|
|
9523
|
+
/* @__PURE__ */ jsx15(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs10(
|
|
9463
9524
|
"button",
|
|
9464
9525
|
{
|
|
9465
9526
|
type: "button",
|
|
@@ -9475,12 +9536,12 @@ var TaskListRow = React10.memo(
|
|
|
9475
9536
|
]
|
|
9476
9537
|
}
|
|
9477
9538
|
) }),
|
|
9478
|
-
/* @__PURE__ */
|
|
9539
|
+
/* @__PURE__ */ jsx15(PopoverContent, { portal: true, align: "start", children: /* @__PURE__ */ jsx15(
|
|
9479
9540
|
"div",
|
|
9480
9541
|
{
|
|
9481
9542
|
className: "gantt-tl-dep-overflow-list",
|
|
9482
9543
|
onClick: (e) => e.stopPropagation(),
|
|
9483
|
-
children: chips.map(({ dep, lag, predecessorName }) => /* @__PURE__ */
|
|
9544
|
+
children: chips.map(({ dep, lag, predecessorName }) => /* @__PURE__ */ jsx15(
|
|
9484
9545
|
DepChip,
|
|
9485
9546
|
{
|
|
9486
9547
|
lag,
|
|
@@ -9509,7 +9570,7 @@ var TaskListRow = React10.memo(
|
|
|
9509
9570
|
] })
|
|
9510
9571
|
) : chips.length === 1 ? (
|
|
9511
9572
|
/* Single chip — unified DepChip */
|
|
9512
|
-
/* @__PURE__ */
|
|
9573
|
+
/* @__PURE__ */ jsx15(
|
|
9513
9574
|
DepChip,
|
|
9514
9575
|
{
|
|
9515
9576
|
lag: chips[0].lag,
|
|
@@ -9533,7 +9594,7 @@ var TaskListRow = React10.memo(
|
|
|
9533
9594
|
}
|
|
9534
9595
|
)
|
|
9535
9596
|
) : null,
|
|
9536
|
-
!printDependencyLabels && !disableDependencyEditing && !isPicking && /* @__PURE__ */
|
|
9597
|
+
!printDependencyLabels && !disableDependencyEditing && !isPicking && /* @__PURE__ */ jsx15(
|
|
9537
9598
|
"button",
|
|
9538
9599
|
{
|
|
9539
9600
|
type: "button",
|
|
@@ -9598,7 +9659,7 @@ var TaskListRow = React10.memo(
|
|
|
9598
9659
|
focusCustomCell(nextCell.taskId, nextCell.columnId);
|
|
9599
9660
|
});
|
|
9600
9661
|
}, [focusCustomCell, onActiveCustomCellChange, resolvedColumns, task.id]);
|
|
9601
|
-
return /* @__PURE__ */
|
|
9662
|
+
return /* @__PURE__ */ jsx15(
|
|
9602
9663
|
"div",
|
|
9603
9664
|
{
|
|
9604
9665
|
ref: rowRef,
|
|
@@ -9640,7 +9701,7 @@ var TaskListRow = React10.memo(
|
|
|
9640
9701
|
tabIndex: isSelected ? 0 : -1,
|
|
9641
9702
|
children: resolvedColumns?.map((col) => {
|
|
9642
9703
|
const builtIn = builtInCells[col.id];
|
|
9643
|
-
if (builtIn) return /* @__PURE__ */
|
|
9704
|
+
if (builtIn) return /* @__PURE__ */ jsx15(React11.Fragment, { children: builtIn }, col.id);
|
|
9644
9705
|
const isEditing = editingColumnId === col.id;
|
|
9645
9706
|
const editorFn = col.renderEditor;
|
|
9646
9707
|
const isActiveCustomCell = activeCustomCell?.taskId === task.id && activeCustomCell?.columnId === col.id;
|
|
@@ -9678,7 +9739,7 @@ var TaskListRow = React10.memo(
|
|
|
9678
9739
|
});
|
|
9679
9740
|
}
|
|
9680
9741
|
};
|
|
9681
|
-
return /* @__PURE__ */
|
|
9742
|
+
return /* @__PURE__ */ jsx15(
|
|
9682
9743
|
"div",
|
|
9683
9744
|
{
|
|
9684
9745
|
className: `gantt-tl-cell gantt-tl-cell-custom gantt-tl-cell-align-${col.align ?? "left"}`,
|
|
@@ -9747,7 +9808,7 @@ var TaskListRow = React10.memo(
|
|
|
9747
9808
|
}
|
|
9748
9809
|
} : void 0,
|
|
9749
9810
|
style: { width: col.width ?? 120, minWidth: col.width ?? 120, flexShrink: 0 },
|
|
9750
|
-
children: isEditing && editorFn ? /* @__PURE__ */
|
|
9811
|
+
children: isEditing && editorFn ? /* @__PURE__ */ jsx15(
|
|
9751
9812
|
"div",
|
|
9752
9813
|
{
|
|
9753
9814
|
className: "gantt-tl-cell-custom-editor",
|
|
@@ -9756,7 +9817,7 @@ var TaskListRow = React10.memo(
|
|
|
9756
9817
|
onClick: (e) => e.stopPropagation(),
|
|
9757
9818
|
children: editorFn(columnContext)
|
|
9758
9819
|
}
|
|
9759
|
-
) : /* @__PURE__ */
|
|
9820
|
+
) : /* @__PURE__ */ jsx15("div", { className: "gantt-tl-cell-custom-content", children: col.renderCell(columnContext) })
|
|
9760
9821
|
},
|
|
9761
9822
|
col.id
|
|
9762
9823
|
);
|
|
@@ -9769,8 +9830,8 @@ var TaskListRow = React10.memo(
|
|
|
9769
9830
|
TaskListRow.displayName = "TaskListRow";
|
|
9770
9831
|
|
|
9771
9832
|
// src/components/TaskList/NewTaskRow.tsx
|
|
9772
|
-
import { useState as useState7, useRef as useRef6, useEffect as
|
|
9773
|
-
import { jsx as
|
|
9833
|
+
import { useState as useState7, useRef as useRef6, useEffect as useEffect7 } from "react";
|
|
9834
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
9774
9835
|
var NewTaskRow = ({
|
|
9775
9836
|
rowHeight,
|
|
9776
9837
|
onConfirm,
|
|
@@ -9782,7 +9843,7 @@ var NewTaskRow = ({
|
|
|
9782
9843
|
const confirmedRef = useRef6(false);
|
|
9783
9844
|
const inputInnerPadding = 4;
|
|
9784
9845
|
const levelOffset = nestingDepth > 0 ? nestingDepth * 20 + 8 : 0;
|
|
9785
|
-
|
|
9846
|
+
useEffect7(() => {
|
|
9786
9847
|
if (inputRef.current) {
|
|
9787
9848
|
inputRef.current.focus();
|
|
9788
9849
|
inputRef.current.select();
|
|
@@ -9810,8 +9871,8 @@ var NewTaskRow = ({
|
|
|
9810
9871
|
}
|
|
9811
9872
|
};
|
|
9812
9873
|
return /* @__PURE__ */ jsxs11("div", { className: "gantt-tl-row gantt-tl-row-new", style: { height: `${rowHeight}px` }, children: [
|
|
9813
|
-
/* @__PURE__ */
|
|
9814
|
-
/* @__PURE__ */
|
|
9874
|
+
/* @__PURE__ */ jsx16("div", { className: "gantt-tl-cell gantt-tl-cell-number" }),
|
|
9875
|
+
/* @__PURE__ */ jsx16("div", { className: "gantt-tl-cell gantt-tl-cell-name gantt-tl-cell-new-name", children: /* @__PURE__ */ jsx16(
|
|
9815
9876
|
Input,
|
|
9816
9877
|
{
|
|
9817
9878
|
ref: inputRef,
|
|
@@ -9828,15 +9889,15 @@ var NewTaskRow = ({
|
|
|
9828
9889
|
}
|
|
9829
9890
|
}
|
|
9830
9891
|
) }),
|
|
9831
|
-
/* @__PURE__ */
|
|
9832
|
-
/* @__PURE__ */
|
|
9833
|
-
/* @__PURE__ */
|
|
9892
|
+
/* @__PURE__ */ jsx16("div", { className: "gantt-tl-cell" }),
|
|
9893
|
+
/* @__PURE__ */ jsx16("div", { className: "gantt-tl-cell" }),
|
|
9894
|
+
/* @__PURE__ */ jsx16("div", { className: "gantt-tl-cell" })
|
|
9834
9895
|
] });
|
|
9835
9896
|
};
|
|
9836
9897
|
|
|
9837
9898
|
// src/components/GenerationSkeleton/GenerationSkeleton.tsx
|
|
9838
9899
|
import { useRef as useRef7 } from "react";
|
|
9839
|
-
import { Fragment as Fragment4, jsx as
|
|
9900
|
+
import { Fragment as Fragment4, jsx as jsx17 } from "react/jsx-runtime";
|
|
9840
9901
|
var MAX_SKELETON_ROWS = 200;
|
|
9841
9902
|
var SHIMMER_DURATION_MS = 1450;
|
|
9842
9903
|
function stableRowJitter(rowIndex, maxDays) {
|
|
@@ -9867,7 +9928,7 @@ var GenerationSkeletonRows = ({
|
|
|
9867
9928
|
shimmerDelayRef.current = `-${Date.now() % SHIMMER_DURATION_MS}ms`;
|
|
9868
9929
|
}
|
|
9869
9930
|
if (safeCount === 0) return null;
|
|
9870
|
-
return /* @__PURE__ */
|
|
9931
|
+
return /* @__PURE__ */ jsx17(
|
|
9871
9932
|
"div",
|
|
9872
9933
|
{
|
|
9873
9934
|
className: `gantt-generation-skeleton gantt-generation-skeleton-${variant}`,
|
|
@@ -9890,12 +9951,12 @@ var GenerationSkeletonRows = ({
|
|
|
9890
9951
|
width: `${chartBarDays * Math.max(1, chartDayWidth)}px`,
|
|
9891
9952
|
marginLeft: `${Math.max(0, chartStartDayOffset - chartStartJitter) * Math.max(1, chartDayWidth)}px`
|
|
9892
9953
|
} : void 0;
|
|
9893
|
-
return /* @__PURE__ */
|
|
9954
|
+
return /* @__PURE__ */ jsx17(
|
|
9894
9955
|
"div",
|
|
9895
9956
|
{
|
|
9896
9957
|
className: "gantt-generation-skeleton-row",
|
|
9897
9958
|
style: { top: `${(startTop ?? startIndex * rowHeight) + index * rowHeight}px`, height: `${rowHeight}px` },
|
|
9898
|
-
children: variant === "task-list" ? /* @__PURE__ */
|
|
9959
|
+
children: variant === "task-list" ? /* @__PURE__ */ jsx17(Fragment4, { children: /* @__PURE__ */ jsx17("span", { className: `gantt-generation-skeleton-label ${shortShape ? "gantt-generation-skeleton-label-short" : ""} ${mediumShape ? "gantt-generation-skeleton-label-medium" : ""}` }) }) : /* @__PURE__ */ jsx17("span", { className: `gantt-generation-skeleton-bar ${parentShape ? "gantt-generation-skeleton-bar-parent" : ""} ${shortShape ? "gantt-generation-skeleton-bar-short" : ""}`, style: chartBarStyle })
|
|
9899
9960
|
},
|
|
9900
9961
|
rowIndex
|
|
9901
9962
|
);
|
|
@@ -10025,7 +10086,7 @@ function buildTaskNumberMap(tasks) {
|
|
|
10025
10086
|
}
|
|
10026
10087
|
|
|
10027
10088
|
// src/components/TaskList/TaskList.tsx
|
|
10028
|
-
import { jsx as
|
|
10089
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
10029
10090
|
var LINK_TYPE_ORDER2 = ["FS", "SS", "FF", "SF"];
|
|
10030
10091
|
var MIN_TASK_LIST_WIDTH = 530;
|
|
10031
10092
|
var DEFAULT_COLUMN_MIN_WIDTH = 40;
|
|
@@ -10133,12 +10194,12 @@ var SelectAllCheckbox = ({
|
|
|
10133
10194
|
onChange
|
|
10134
10195
|
}) => {
|
|
10135
10196
|
const ref = useRef8(null);
|
|
10136
|
-
|
|
10197
|
+
useEffect8(() => {
|
|
10137
10198
|
if (ref.current) {
|
|
10138
10199
|
ref.current.indeterminate = indeterminate;
|
|
10139
10200
|
}
|
|
10140
10201
|
}, [indeterminate]);
|
|
10141
|
-
return /* @__PURE__ */
|
|
10202
|
+
return /* @__PURE__ */ jsx18(
|
|
10142
10203
|
"input",
|
|
10143
10204
|
{
|
|
10144
10205
|
ref,
|
|
@@ -10221,7 +10282,7 @@ var TaskList = ({
|
|
|
10221
10282
|
const columnResizeHeaderRef = useRef8(null);
|
|
10222
10283
|
const resizeStateRef = useRef8(null);
|
|
10223
10284
|
const effectiveSelectedTaskIds = selectedTaskIds ?? internalSelectedTaskIds;
|
|
10224
|
-
|
|
10285
|
+
useEffect8(() => {
|
|
10225
10286
|
if (!isColumnResizeMode) {
|
|
10226
10287
|
return;
|
|
10227
10288
|
}
|
|
@@ -10256,14 +10317,14 @@ var TaskList = ({
|
|
|
10256
10317
|
return next;
|
|
10257
10318
|
});
|
|
10258
10319
|
}, []);
|
|
10259
|
-
const orderedTasks =
|
|
10320
|
+
const orderedTasks = useMemo10(() => {
|
|
10260
10321
|
return normalizeHierarchyTasks(tasks);
|
|
10261
10322
|
}, [tasks]);
|
|
10262
|
-
const weekendPredicate =
|
|
10323
|
+
const weekendPredicate = useMemo10(
|
|
10263
10324
|
() => createCustomDayPredicate({ customDays, isWeekend: isWeekend3 }),
|
|
10264
10325
|
[customDays, isWeekend3]
|
|
10265
10326
|
);
|
|
10266
|
-
const visibleTasks =
|
|
10327
|
+
const visibleTasks = useMemo10(() => {
|
|
10267
10328
|
const parentMap = new Map(orderedTasks.map((t) => [t.id, t.parentId]));
|
|
10268
10329
|
function isAnyAncestorCollapsed(parentId) {
|
|
10269
10330
|
let current = parentId;
|
|
@@ -10282,35 +10343,35 @@ var TaskList = ({
|
|
|
10282
10343
|
}
|
|
10283
10344
|
return tasks2;
|
|
10284
10345
|
}, [orderedTasks, collapsedParentIds, filterMode, filteredTaskIds, isFilterActive, criticalPathMode, criticalTaskIds]);
|
|
10285
|
-
const totalHeight =
|
|
10346
|
+
const totalHeight = useMemo10(
|
|
10286
10347
|
() => (rowTops && rowHeights && visibleTasks.length > 0 ? rowTops[visibleTasks.length - 1] + rowHeights[visibleTasks.length - 1] : visibleTasks.length * rowHeight) + Math.max(0, Math.floor(skeletonRowCount)) * rowHeight,
|
|
10287
10348
|
[rowHeight, rowTops, rowHeights, skeletonRowCount, visibleTasks.length]
|
|
10288
10349
|
);
|
|
10289
|
-
const visibleTaskNumberMap =
|
|
10350
|
+
const visibleTaskNumberMap = useMemo10(
|
|
10290
10351
|
() => Object.fromEntries(buildTaskNumberMap(visibleTasks)),
|
|
10291
10352
|
[visibleTasks]
|
|
10292
10353
|
);
|
|
10293
|
-
const visibleTaskIds =
|
|
10294
|
-
const compositeParentIds =
|
|
10354
|
+
const visibleTaskIds = useMemo10(() => visibleTasks.map((task) => task.id), [visibleTasks]);
|
|
10355
|
+
const compositeParentIds = useMemo10(
|
|
10295
10356
|
() => new Set(tasks.filter((task) => task.composite).map((task) => task.id)),
|
|
10296
10357
|
[tasks]
|
|
10297
10358
|
);
|
|
10298
|
-
const compositeParentsById =
|
|
10359
|
+
const compositeParentsById = useMemo10(
|
|
10299
10360
|
() => new Map(tasks.filter((task) => task.composite).map((task) => [task.id, task])),
|
|
10300
10361
|
[tasks]
|
|
10301
10362
|
);
|
|
10302
|
-
const renderedVisibleRowIndices =
|
|
10363
|
+
const renderedVisibleRowIndices = useMemo10(
|
|
10303
10364
|
() => visibleRowIndices ?? visibleTasks.map((_, index) => index),
|
|
10304
10365
|
[visibleRowIndices, visibleTasks]
|
|
10305
10366
|
);
|
|
10306
|
-
const renderedVisibleTasks =
|
|
10367
|
+
const renderedVisibleTasks = useMemo10(
|
|
10307
10368
|
() => renderedVisibleRowIndices.map((index) => {
|
|
10308
10369
|
const task = visibleTasks[index];
|
|
10309
10370
|
return task ? { index, task } : null;
|
|
10310
10371
|
}).filter((entry) => entry !== null),
|
|
10311
10372
|
[renderedVisibleRowIndices, visibleTasks]
|
|
10312
10373
|
);
|
|
10313
|
-
const selectedVisibleTaskCount =
|
|
10374
|
+
const selectedVisibleTaskCount = useMemo10(
|
|
10314
10375
|
() => visibleTaskIds.filter((taskId) => effectiveSelectedTaskIds.has(taskId)).length,
|
|
10315
10376
|
[effectiveSelectedTaskIds, visibleTaskIds]
|
|
10316
10377
|
);
|
|
@@ -10336,11 +10397,11 @@ var TaskList = ({
|
|
|
10336
10397
|
}
|
|
10337
10398
|
emitSelectedTaskIdsChange(nextSelectedTaskIds);
|
|
10338
10399
|
}, [effectiveSelectedTaskIds, emitSelectedTaskIdsChange, visibleTaskIds]);
|
|
10339
|
-
const originalTaskNumberMap =
|
|
10400
|
+
const originalTaskNumberMap = useMemo10(
|
|
10340
10401
|
() => Object.fromEntries(buildTaskNumberMap(orderedTasks)),
|
|
10341
10402
|
[orderedTasks]
|
|
10342
10403
|
);
|
|
10343
|
-
const nestingDepthMap =
|
|
10404
|
+
const nestingDepthMap = useMemo10(() => {
|
|
10344
10405
|
const depthMap = /* @__PURE__ */ new Map();
|
|
10345
10406
|
const taskById = new Map(tasks.map((t) => [t.id, t]));
|
|
10346
10407
|
function getDepth(taskId) {
|
|
@@ -10359,7 +10420,7 @@ var TaskList = ({
|
|
|
10359
10420
|
}
|
|
10360
10421
|
return depthMap;
|
|
10361
10422
|
}, [tasks]);
|
|
10362
|
-
const lastChildIds =
|
|
10423
|
+
const lastChildIds = useMemo10(() => {
|
|
10363
10424
|
const last = /* @__PURE__ */ new Set();
|
|
10364
10425
|
const seenParents = /* @__PURE__ */ new Set();
|
|
10365
10426
|
for (let i = visibleTasks.length - 1; i >= 0; i--) {
|
|
@@ -10371,14 +10432,14 @@ var TaskList = ({
|
|
|
10371
10432
|
}
|
|
10372
10433
|
return last;
|
|
10373
10434
|
}, [visibleTasks]);
|
|
10374
|
-
const visibleParentIds =
|
|
10435
|
+
const visibleParentIds = useMemo10(() => {
|
|
10375
10436
|
const parentIds = /* @__PURE__ */ new Set();
|
|
10376
10437
|
for (const task of visibleTasks) {
|
|
10377
10438
|
if (task.parentId) parentIds.add(task.parentId);
|
|
10378
10439
|
}
|
|
10379
10440
|
return parentIds;
|
|
10380
10441
|
}, [visibleTasks]);
|
|
10381
|
-
const ancestorLineModesMap =
|
|
10442
|
+
const ancestorLineModesMap = useMemo10(() => {
|
|
10382
10443
|
const taskById = new Map(tasks.map((t) => [t.id, t]));
|
|
10383
10444
|
const isDescendantOf2 = (taskId, ancestorId) => {
|
|
10384
10445
|
let current = taskById.get(taskId);
|
|
@@ -10416,7 +10477,7 @@ var TaskList = ({
|
|
|
10416
10477
|
const [dependencyError, setDependencyError] = useState8(null);
|
|
10417
10478
|
const overlayRef = useRef8(null);
|
|
10418
10479
|
const [selectedChip, setSelectedChip] = useState8(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
10419
|
-
|
|
10480
|
+
useEffect8(() => {
|
|
10420
10481
|
if (controlledSelectedChip !== void 0) {
|
|
10421
10482
|
setSelectedChip(controlledSelectedChip ? { ...controlledSelectedChip, linkType: controlledSelectedChip.linkType } : null);
|
|
10422
10483
|
}
|
|
@@ -10425,7 +10486,7 @@ var TaskList = ({
|
|
|
10425
10486
|
setSelectedChip(chip);
|
|
10426
10487
|
onSelectedChipChange?.(chip);
|
|
10427
10488
|
}, [onSelectedChipChange]);
|
|
10428
|
-
|
|
10489
|
+
useEffect8(() => {
|
|
10429
10490
|
if (!selectingPredecessorFor && !selectedChip && !selectedTaskId && !activeCustomCell) return;
|
|
10430
10491
|
const pendingCanvasMouseDownRef = {
|
|
10431
10492
|
container: null,
|
|
@@ -10839,7 +10900,7 @@ var TaskList = ({
|
|
|
10839
10900
|
}
|
|
10840
10901
|
return insertAfterTaskId;
|
|
10841
10902
|
}, [orderedTasks]);
|
|
10842
|
-
const pendingInsertDisplayTaskId =
|
|
10903
|
+
const pendingInsertDisplayTaskId = useMemo10(() => {
|
|
10843
10904
|
if (!pendingInsert) {
|
|
10844
10905
|
return null;
|
|
10845
10906
|
}
|
|
@@ -10860,7 +10921,7 @@ var TaskList = ({
|
|
|
10860
10921
|
}
|
|
10861
10922
|
return displayTaskId;
|
|
10862
10923
|
}, [pendingInsert, visibleTasks]);
|
|
10863
|
-
const pendingInsertRowIndex =
|
|
10924
|
+
const pendingInsertRowIndex = useMemo10(
|
|
10864
10925
|
() => pendingInsertDisplayTaskId ? visibleTasks.findIndex((task) => task.id === pendingInsertDisplayTaskId) : -1,
|
|
10865
10926
|
[pendingInsertDisplayTaskId, visibleTasks]
|
|
10866
10927
|
);
|
|
@@ -10945,14 +11006,14 @@ var TaskList = ({
|
|
|
10945
11006
|
const duplicatedTasks = duplicateTaskSubtree(taskId, orderedTasks);
|
|
10946
11007
|
onReorder?.(duplicatedTasks);
|
|
10947
11008
|
}, [orderedTasks, onReorder]);
|
|
10948
|
-
const builtInColumns =
|
|
11009
|
+
const builtInColumns = useMemo10(
|
|
10949
11010
|
() => createBuiltInColumns({ businessDays, enableTaskMultiSelect }),
|
|
10950
11011
|
[businessDays, enableTaskMultiSelect]
|
|
10951
11012
|
);
|
|
10952
|
-
|
|
11013
|
+
useEffect8(() => {
|
|
10953
11014
|
setColumnWidthOverrides(normalizeColumnWidthMap(taskListColumnWidths));
|
|
10954
11015
|
}, [taskListColumnWidths]);
|
|
10955
|
-
const resolvedColumns =
|
|
11016
|
+
const resolvedColumns = useMemo10(
|
|
10956
11017
|
() => resolveTaskListColumns(
|
|
10957
11018
|
builtInColumns,
|
|
10958
11019
|
additionalColumns ?? [],
|
|
@@ -10968,11 +11029,11 @@ var TaskList = ({
|
|
|
10968
11029
|
}),
|
|
10969
11030
|
[builtInColumns, additionalColumns, hiddenTaskListColumns, columnWidthOverrides]
|
|
10970
11031
|
);
|
|
10971
|
-
const resolvedColumnWidthTotal =
|
|
11032
|
+
const resolvedColumnWidthTotal = useMemo10(
|
|
10972
11033
|
() => resolvedColumns.reduce((sum, col) => sum + (col.width ?? 120), 0),
|
|
10973
11034
|
[resolvedColumns]
|
|
10974
11035
|
);
|
|
10975
|
-
const generationSkeletonTaskListLayout =
|
|
11036
|
+
const generationSkeletonTaskListLayout = useMemo10(() => {
|
|
10976
11037
|
let left = 0;
|
|
10977
11038
|
const layout = {
|
|
10978
11039
|
nameLeft: 40,
|
|
@@ -11001,7 +11062,7 @@ var TaskList = ({
|
|
|
11001
11062
|
return next;
|
|
11002
11063
|
});
|
|
11003
11064
|
}, [onTaskListColumnWidthsChange]);
|
|
11004
|
-
|
|
11065
|
+
useEffect8(() => {
|
|
11005
11066
|
const updateResizedColumn = (clientX) => {
|
|
11006
11067
|
const resizeState = resizeStateRef.current;
|
|
11007
11068
|
if (!resizeState) {
|
|
@@ -11104,7 +11165,7 @@ var TaskList = ({
|
|
|
11104
11165
|
document.body.style.userSelect = "none";
|
|
11105
11166
|
document.body.style.touchAction = "none";
|
|
11106
11167
|
}, [resolvedColumns]);
|
|
11107
|
-
const renderResizeHandle = useCallback6((columnId) => /* @__PURE__ */
|
|
11168
|
+
const renderResizeHandle = useCallback6((columnId) => /* @__PURE__ */ jsx18(
|
|
11108
11169
|
"button",
|
|
11109
11170
|
{
|
|
11110
11171
|
type: "button",
|
|
@@ -11132,20 +11193,20 @@ var TaskList = ({
|
|
|
11132
11193
|
className: "gantt-tl-column-resize-icon lucide lucide-unfold-horizontal-icon lucide-unfold-horizontal",
|
|
11133
11194
|
"aria-hidden": "true",
|
|
11134
11195
|
children: [
|
|
11135
|
-
/* @__PURE__ */
|
|
11136
|
-
/* @__PURE__ */
|
|
11137
|
-
/* @__PURE__ */
|
|
11138
|
-
/* @__PURE__ */
|
|
11139
|
-
/* @__PURE__ */
|
|
11140
|
-
/* @__PURE__ */
|
|
11141
|
-
/* @__PURE__ */
|
|
11142
|
-
/* @__PURE__ */
|
|
11196
|
+
/* @__PURE__ */ jsx18("path", { d: "M16 12h6" }),
|
|
11197
|
+
/* @__PURE__ */ jsx18("path", { d: "M8 12H2" }),
|
|
11198
|
+
/* @__PURE__ */ jsx18("path", { d: "M12 2v2" }),
|
|
11199
|
+
/* @__PURE__ */ jsx18("path", { d: "M12 8v2" }),
|
|
11200
|
+
/* @__PURE__ */ jsx18("path", { d: "M12 14v2" }),
|
|
11201
|
+
/* @__PURE__ */ jsx18("path", { d: "M12 20v2" }),
|
|
11202
|
+
/* @__PURE__ */ jsx18("path", { d: "m19 15 3-3-3-3" }),
|
|
11203
|
+
/* @__PURE__ */ jsx18("path", { d: "m5 9-3 3 3 3" })
|
|
11143
11204
|
]
|
|
11144
11205
|
}
|
|
11145
11206
|
)
|
|
11146
11207
|
}
|
|
11147
11208
|
), [startColumnResize]);
|
|
11148
|
-
return /* @__PURE__ */
|
|
11209
|
+
return /* @__PURE__ */ jsx18(
|
|
11149
11210
|
"div",
|
|
11150
11211
|
{
|
|
11151
11212
|
ref: overlayRef,
|
|
@@ -11155,7 +11216,7 @@ var TaskList = ({
|
|
|
11155
11216
|
"--gantt-row-content-lines": String(Math.max(2, Math.floor(rowContentLines)))
|
|
11156
11217
|
},
|
|
11157
11218
|
children: /* @__PURE__ */ jsxs12("div", { className: "gantt-tl-table", children: [
|
|
11158
|
-
/* @__PURE__ */
|
|
11219
|
+
/* @__PURE__ */ jsx18(
|
|
11159
11220
|
"div",
|
|
11160
11221
|
{
|
|
11161
11222
|
ref: columnResizeHeaderRef,
|
|
@@ -11172,7 +11233,7 @@ var TaskList = ({
|
|
|
11172
11233
|
"data-column-id": "selection",
|
|
11173
11234
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
11174
11235
|
children: [
|
|
11175
|
-
/* @__PURE__ */
|
|
11236
|
+
/* @__PURE__ */ jsx18(
|
|
11176
11237
|
SelectAllCheckbox,
|
|
11177
11238
|
{
|
|
11178
11239
|
checked: areAllVisibleTasksSelected,
|
|
@@ -11195,7 +11256,7 @@ var TaskList = ({
|
|
|
11195
11256
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
11196
11257
|
children: [
|
|
11197
11258
|
/* @__PURE__ */ jsxs12(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
11198
|
-
/* @__PURE__ */
|
|
11259
|
+
/* @__PURE__ */ jsx18(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs12(
|
|
11199
11260
|
"button",
|
|
11200
11261
|
{
|
|
11201
11262
|
className: "gantt-tl-dep-type-trigger",
|
|
@@ -11203,12 +11264,12 @@ var TaskList = ({
|
|
|
11203
11264
|
onClick: (e) => e.stopPropagation(),
|
|
11204
11265
|
children: [
|
|
11205
11266
|
"\u0421\u0432\u044F\u0437\u0438 ",
|
|
11206
|
-
|
|
11267
|
+
React14.createElement(LINK_TYPE_ICONS[activeLinkType]),
|
|
11207
11268
|
" \u25BE"
|
|
11208
11269
|
]
|
|
11209
11270
|
}
|
|
11210
11271
|
) }),
|
|
11211
|
-
/* @__PURE__ */
|
|
11272
|
+
/* @__PURE__ */ jsx18(PopoverContent, { portal: true, align: "start", children: /* @__PURE__ */ jsx18("div", { className: "gantt-tl-dep-type-menu", children: LINK_TYPE_ORDER2.map((lt) => /* @__PURE__ */ jsxs12(
|
|
11212
11273
|
"button",
|
|
11213
11274
|
{
|
|
11214
11275
|
className: `gantt-tl-dep-type-option${activeLinkType === lt ? " active" : ""}`,
|
|
@@ -11217,14 +11278,14 @@ var TaskList = ({
|
|
|
11217
11278
|
setTypeMenuOpen(false);
|
|
11218
11279
|
},
|
|
11219
11280
|
children: [
|
|
11220
|
-
|
|
11221
|
-
/* @__PURE__ */
|
|
11281
|
+
React14.createElement(LINK_TYPE_ICONS[lt]),
|
|
11282
|
+
/* @__PURE__ */ jsx18("span", { children: LINK_TYPE_LABELS[lt] })
|
|
11222
11283
|
]
|
|
11223
11284
|
},
|
|
11224
11285
|
lt
|
|
11225
11286
|
)) }) })
|
|
11226
11287
|
] }),
|
|
11227
|
-
dependencyError && /* @__PURE__ */
|
|
11288
|
+
dependencyError && /* @__PURE__ */ jsx18("div", { className: "gantt-tl-dep-error", children: dependencyError }),
|
|
11228
11289
|
renderResizeHandle(col.id)
|
|
11229
11290
|
]
|
|
11230
11291
|
},
|
|
@@ -11274,7 +11335,7 @@ var TaskList = ({
|
|
|
11274
11335
|
position: "relative"
|
|
11275
11336
|
},
|
|
11276
11337
|
children: [
|
|
11277
|
-
shouldShowBeforeFirstDropZone && /* @__PURE__ */
|
|
11338
|
+
shouldShowBeforeFirstDropZone && /* @__PURE__ */ jsx18(
|
|
11278
11339
|
"div",
|
|
11279
11340
|
{
|
|
11280
11341
|
className: [
|
|
@@ -11291,7 +11352,7 @@ var TaskList = ({
|
|
|
11291
11352
|
const previousVisibleTask = index > 0 ? visibleTasks[index - 1] : void 0;
|
|
11292
11353
|
const canDemoteTask = index === 0 || !task.parentId || previousVisibleTask?.id !== task.parentId;
|
|
11293
11354
|
const topOffset = (rowTops?.[index] ?? index * rowHeight) + (hasVisiblePendingInsert && index > pendingInsertRowIndex ? rowHeight : 0);
|
|
11294
|
-
return /* @__PURE__ */
|
|
11355
|
+
return /* @__PURE__ */ jsx18(
|
|
11295
11356
|
"div",
|
|
11296
11357
|
{
|
|
11297
11358
|
style: {
|
|
@@ -11300,7 +11361,7 @@ var TaskList = ({
|
|
|
11300
11361
|
left: 0,
|
|
11301
11362
|
right: 0
|
|
11302
11363
|
},
|
|
11303
|
-
children: /* @__PURE__ */
|
|
11364
|
+
children: /* @__PURE__ */ jsx18(
|
|
11304
11365
|
TaskListRow,
|
|
11305
11366
|
{
|
|
11306
11367
|
task,
|
|
@@ -11380,7 +11441,7 @@ var TaskList = ({
|
|
|
11380
11441
|
task.id
|
|
11381
11442
|
);
|
|
11382
11443
|
}),
|
|
11383
|
-
hasVisiblePendingInsert && /* @__PURE__ */
|
|
11444
|
+
hasVisiblePendingInsert && /* @__PURE__ */ jsx18(
|
|
11384
11445
|
"div",
|
|
11385
11446
|
{
|
|
11386
11447
|
style: {
|
|
@@ -11389,7 +11450,7 @@ var TaskList = ({
|
|
|
11389
11450
|
left: 0,
|
|
11390
11451
|
right: 0
|
|
11391
11452
|
},
|
|
11392
|
-
children: /* @__PURE__ */
|
|
11453
|
+
children: /* @__PURE__ */ jsx18(
|
|
11393
11454
|
NewTaskRow,
|
|
11394
11455
|
{
|
|
11395
11456
|
rowHeight,
|
|
@@ -11400,7 +11461,7 @@ var TaskList = ({
|
|
|
11400
11461
|
)
|
|
11401
11462
|
}
|
|
11402
11463
|
),
|
|
11403
|
-
/* @__PURE__ */
|
|
11464
|
+
/* @__PURE__ */ jsx18(
|
|
11404
11465
|
GenerationSkeleton_default,
|
|
11405
11466
|
{
|
|
11406
11467
|
count: skeletonRowCount,
|
|
@@ -11414,7 +11475,7 @@ var TaskList = ({
|
|
|
11414
11475
|
]
|
|
11415
11476
|
}
|
|
11416
11477
|
),
|
|
11417
|
-
isCreating && !pendingInsert && /* @__PURE__ */
|
|
11478
|
+
isCreating && !pendingInsert && /* @__PURE__ */ jsx18(
|
|
11418
11479
|
NewTaskRow,
|
|
11419
11480
|
{
|
|
11420
11481
|
rowHeight,
|
|
@@ -11461,7 +11522,7 @@ var TaskList = ({
|
|
|
11461
11522
|
};
|
|
11462
11523
|
|
|
11463
11524
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
11464
|
-
import
|
|
11525
|
+
import React15, { useCallback as useCallback8, useEffect as useEffect10, useMemo as useMemo11, useRef as useRef10, useState as useState10 } from "react";
|
|
11465
11526
|
|
|
11466
11527
|
// src/utils/resourceTimelineLayout.ts
|
|
11467
11528
|
var isInvalidDate = (date) => Number.isNaN(date.getTime());
|
|
@@ -11663,7 +11724,7 @@ var layoutResourceTimelineItems = (resources, options) => {
|
|
|
11663
11724
|
};
|
|
11664
11725
|
|
|
11665
11726
|
// src/hooks/useResourceItemDrag.ts
|
|
11666
|
-
import { useCallback as useCallback7, useEffect as
|
|
11727
|
+
import { useCallback as useCallback7, useEffect as useEffect9, useRef as useRef9, useState as useState9 } from "react";
|
|
11667
11728
|
var RESOURCE_CURSOR_STYLE_ID = "gantt-resource-global-drag-cursor-style";
|
|
11668
11729
|
function ensureResourceGlobalCursorStyle() {
|
|
11669
11730
|
if (typeof document === "undefined") return;
|
|
@@ -11780,10 +11841,10 @@ var useResourceItemDrag = ({
|
|
|
11780
11841
|
const onResourceItemMoveRef = useRef9(onResourceItemMove);
|
|
11781
11842
|
const rafRef = useRef9(null);
|
|
11782
11843
|
const [preview, setPreview] = useState9(null);
|
|
11783
|
-
|
|
11844
|
+
useEffect9(() => {
|
|
11784
11845
|
rowsRef.current = rows;
|
|
11785
11846
|
}, [rows]);
|
|
11786
|
-
|
|
11847
|
+
useEffect9(() => {
|
|
11787
11848
|
onResourceItemMoveRef.current = onResourceItemMove;
|
|
11788
11849
|
}, [onResourceItemMove]);
|
|
11789
11850
|
const clearRaf = useCallback7(() => {
|
|
@@ -11798,7 +11859,7 @@ var useResourceItemDrag = ({
|
|
|
11798
11859
|
activeDragRef.current = null;
|
|
11799
11860
|
setPreview(null);
|
|
11800
11861
|
}, [clearRaf]);
|
|
11801
|
-
|
|
11862
|
+
useEffect9(() => {
|
|
11802
11863
|
const handleMouseMove = (event) => {
|
|
11803
11864
|
const activeDrag = activeDragRef.current;
|
|
11804
11865
|
if (!activeDrag || rafRef.current !== null) {
|
|
@@ -11917,7 +11978,7 @@ var useResourceItemDrag = ({
|
|
|
11917
11978
|
};
|
|
11918
11979
|
|
|
11919
11980
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
11920
|
-
import { Fragment as Fragment5, jsx as
|
|
11981
|
+
import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
11921
11982
|
var DEFAULT_DAY_WIDTH = 40;
|
|
11922
11983
|
var DEFAULT_HEADER_HEIGHT = 40;
|
|
11923
11984
|
var DEFAULT_LANE_HEIGHT = 40;
|
|
@@ -12081,40 +12142,40 @@ var orderResourcesByType = (resources) => {
|
|
|
12081
12142
|
var ResourceTypeIcon = ({ type }) => {
|
|
12082
12143
|
if (type === "\u041B\u044E\u0434\u0438") {
|
|
12083
12144
|
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconPeople", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
12084
|
-
/* @__PURE__ */
|
|
12085
|
-
/* @__PURE__ */
|
|
12086
|
-
/* @__PURE__ */
|
|
12087
|
-
/* @__PURE__ */
|
|
12145
|
+
/* @__PURE__ */ jsx19("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
12146
|
+
/* @__PURE__ */ jsx19("circle", { cx: "9", cy: "7", r: "4" }),
|
|
12147
|
+
/* @__PURE__ */ jsx19("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
|
|
12148
|
+
/* @__PURE__ */ jsx19("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
12088
12149
|
] });
|
|
12089
12150
|
}
|
|
12090
12151
|
if (type === "\u041E\u0431\u043E\u0440\u0443\u0434\u043E\u0432\u0430\u043D\u0438\u0435") {
|
|
12091
12152
|
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconEquipment", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
12092
|
-
/* @__PURE__ */
|
|
12093
|
-
/* @__PURE__ */
|
|
12094
|
-
/* @__PURE__ */
|
|
12153
|
+
/* @__PURE__ */ jsx19("path", { d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" }),
|
|
12154
|
+
/* @__PURE__ */ jsx19("path", { d: "m18 15 4-4" }),
|
|
12155
|
+
/* @__PURE__ */ jsx19("path", { d: "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5" })
|
|
12095
12156
|
] });
|
|
12096
12157
|
}
|
|
12097
12158
|
if (type === "\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B") {
|
|
12098
12159
|
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconMaterials", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
12099
|
-
/* @__PURE__ */
|
|
12100
|
-
/* @__PURE__ */
|
|
12101
|
-
/* @__PURE__ */
|
|
12160
|
+
/* @__PURE__ */ jsx19("path", { d: "M10 22v-8" }),
|
|
12161
|
+
/* @__PURE__ */ jsx19("path", { d: "M2.336 8.89 10 14l11.715-7.029" }),
|
|
12162
|
+
/* @__PURE__ */ jsx19("path", { d: "M22 14a2 2 0 0 1-.971 1.715l-10 6a2 2 0 0 1-2.138-.05l-6-4A2 2 0 0 1 2 16v-6a2 2 0 0 1 .971-1.715l10-6a2 2 0 0 1 2.138.05l6 4A2 2 0 0 1 22 8z" })
|
|
12102
12163
|
] });
|
|
12103
12164
|
}
|
|
12104
12165
|
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconOther", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
12105
|
-
/* @__PURE__ */
|
|
12106
|
-
/* @__PURE__ */
|
|
12107
|
-
/* @__PURE__ */
|
|
12166
|
+
/* @__PURE__ */ jsx19("circle", { cx: "12", cy: "12", r: "9" }),
|
|
12167
|
+
/* @__PURE__ */ jsx19("path", { d: "M12 8v4" }),
|
|
12168
|
+
/* @__PURE__ */ jsx19("path", { d: "M12 16h.01" })
|
|
12108
12169
|
] });
|
|
12109
12170
|
};
|
|
12110
|
-
var ResourceTypeDropdownIcon = () => /* @__PURE__ */
|
|
12111
|
-
var ResourceGroupChevronIcon = () => /* @__PURE__ */
|
|
12171
|
+
var ResourceTypeDropdownIcon = () => /* @__PURE__ */ jsx19("svg", { className: "gantt-resourceTimeline-resourceTypeDropdownIcon", width: "10", height: "10", viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ jsx19("path", { d: "M2 3.5 5 6.5 8 3.5" }) });
|
|
12172
|
+
var ResourceGroupChevronIcon = () => /* @__PURE__ */ jsx19("svg", { className: "gantt-resourceTimeline-resourceGroupChevronIcon", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx19("path", { d: "M4 2.5 7.5 6 4 9.5" }) });
|
|
12112
12173
|
function isInactiveResourceStatus(status) {
|
|
12113
12174
|
return status?.trim().toLocaleLowerCase() === "inactive";
|
|
12114
12175
|
}
|
|
12115
12176
|
var ResourceStatusLockIcon = () => /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceStatusIcon", width: "12", height: "12", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
12116
|
-
/* @__PURE__ */
|
|
12117
|
-
/* @__PURE__ */
|
|
12177
|
+
/* @__PURE__ */ jsx19("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }),
|
|
12178
|
+
/* @__PURE__ */ jsx19("path", { d: "M8 11V8a4 4 0 1 1 8 0v3" })
|
|
12118
12179
|
] });
|
|
12119
12180
|
var ResourceHeader = ({
|
|
12120
12181
|
resource,
|
|
@@ -12138,7 +12199,7 @@ var ResourceHeader = ({
|
|
|
12138
12199
|
const [nameValue, setNameValue] = useState10(resource.name);
|
|
12139
12200
|
const nameInputRef = useRef10(null);
|
|
12140
12201
|
const nameConfirmedRef = useRef10(false);
|
|
12141
|
-
const visibleCommands =
|
|
12202
|
+
const visibleCommands = useMemo11(
|
|
12142
12203
|
() => menuCommands.filter((command) => command.isVisible?.(resource) ?? true),
|
|
12143
12204
|
[menuCommands, resource]
|
|
12144
12205
|
);
|
|
@@ -12150,12 +12211,12 @@ var ResourceHeader = ({
|
|
|
12150
12211
|
const applyResourcePatch = useCallback8((patch) => {
|
|
12151
12212
|
onResourceChange?.({ ...resource, ...patch });
|
|
12152
12213
|
}, [onResourceChange, resource]);
|
|
12153
|
-
|
|
12214
|
+
useEffect10(() => {
|
|
12154
12215
|
if (!editingName) {
|
|
12155
12216
|
setNameValue(resource.name);
|
|
12156
12217
|
}
|
|
12157
12218
|
}, [editingName, resource.name]);
|
|
12158
|
-
|
|
12219
|
+
useEffect10(() => {
|
|
12159
12220
|
if (editingName && nameInputRef.current) {
|
|
12160
12221
|
nameInputRef.current.focus();
|
|
12161
12222
|
nameInputRef.current.select();
|
|
@@ -12215,10 +12276,10 @@ var ResourceHeader = ({
|
|
|
12215
12276
|
gridTemplateColumns: columnTemplate
|
|
12216
12277
|
},
|
|
12217
12278
|
children: [
|
|
12218
|
-
/* @__PURE__ */
|
|
12279
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceNumber", children: rowIndex + 1 }),
|
|
12219
12280
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceName", children: [
|
|
12220
12281
|
/* @__PURE__ */ jsxs13(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
12221
|
-
/* @__PURE__ */
|
|
12282
|
+
/* @__PURE__ */ jsx19(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs13(
|
|
12222
12283
|
"button",
|
|
12223
12284
|
{
|
|
12224
12285
|
type: "button",
|
|
@@ -12231,12 +12292,12 @@ var ResourceHeader = ({
|
|
|
12231
12292
|
setTypeMenuOpen((open) => !open);
|
|
12232
12293
|
},
|
|
12233
12294
|
children: [
|
|
12234
|
-
/* @__PURE__ */
|
|
12235
|
-
/* @__PURE__ */
|
|
12295
|
+
/* @__PURE__ */ jsx19(ResourceTypeIcon, { type }),
|
|
12296
|
+
/* @__PURE__ */ jsx19(ResourceTypeDropdownIcon, {})
|
|
12236
12297
|
]
|
|
12237
12298
|
}
|
|
12238
12299
|
) }),
|
|
12239
|
-
/* @__PURE__ */
|
|
12300
|
+
/* @__PURE__ */ jsx19(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_TYPE_OPTIONS.map((option) => /* @__PURE__ */ jsxs13(
|
|
12240
12301
|
"button",
|
|
12241
12302
|
{
|
|
12242
12303
|
type: "button",
|
|
@@ -12247,14 +12308,14 @@ var ResourceHeader = ({
|
|
|
12247
12308
|
applyResourcePatch({ type: option });
|
|
12248
12309
|
},
|
|
12249
12310
|
children: [
|
|
12250
|
-
/* @__PURE__ */
|
|
12311
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceOptionIcon", children: /* @__PURE__ */ jsx19(ResourceTypeIcon, { type: option }) }),
|
|
12251
12312
|
option
|
|
12252
12313
|
]
|
|
12253
12314
|
},
|
|
12254
12315
|
option
|
|
12255
12316
|
)) })
|
|
12256
12317
|
] }),
|
|
12257
|
-
editingName ? /* @__PURE__ */
|
|
12318
|
+
editingName ? /* @__PURE__ */ jsx19(
|
|
12258
12319
|
Input,
|
|
12259
12320
|
{
|
|
12260
12321
|
ref: nameInputRef,
|
|
@@ -12266,7 +12327,7 @@ var ResourceHeader = ({
|
|
|
12266
12327
|
"aria-label": `\u041D\u043E\u0432\u043E\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 ${resource.name}`,
|
|
12267
12328
|
className: "gantt-tl-name-input gantt-resourceTimeline-resourceNameInput"
|
|
12268
12329
|
}
|
|
12269
|
-
) : /* @__PURE__ */
|
|
12330
|
+
) : /* @__PURE__ */ jsx19(
|
|
12270
12331
|
"button",
|
|
12271
12332
|
{
|
|
12272
12333
|
type: "button",
|
|
@@ -12279,22 +12340,22 @@ var ResourceHeader = ({
|
|
|
12279
12340
|
},
|
|
12280
12341
|
onDoubleClick: handleNameDoubleClick,
|
|
12281
12342
|
children: /* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceNameContent", children: [
|
|
12282
|
-
isInactive && /* @__PURE__ */
|
|
12343
|
+
isInactive && /* @__PURE__ */ jsx19(
|
|
12283
12344
|
"span",
|
|
12284
12345
|
{
|
|
12285
12346
|
className: "gantt-resourceTimeline-resourceStatusMarker",
|
|
12286
12347
|
"aria-label": `\u0420\u0435\u0441\u0443\u0440\u0441 ${resource.name} \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D`,
|
|
12287
12348
|
title: "\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D",
|
|
12288
|
-
children: /* @__PURE__ */
|
|
12349
|
+
children: /* @__PURE__ */ jsx19(ResourceStatusLockIcon, {})
|
|
12289
12350
|
}
|
|
12290
12351
|
),
|
|
12291
|
-
/* @__PURE__ */
|
|
12352
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceNameText", children: resource.name })
|
|
12292
12353
|
] })
|
|
12293
12354
|
}
|
|
12294
12355
|
)
|
|
12295
12356
|
] }),
|
|
12296
12357
|
/* @__PURE__ */ jsxs13(Popover, { open: scopeMenuOpen, onOpenChange: setScopeMenuOpen, children: [
|
|
12297
|
-
/* @__PURE__ */
|
|
12358
|
+
/* @__PURE__ */ jsx19(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx19(
|
|
12298
12359
|
"button",
|
|
12299
12360
|
{
|
|
12300
12361
|
type: "button",
|
|
@@ -12305,10 +12366,10 @@ var ResourceHeader = ({
|
|
|
12305
12366
|
event.stopPropagation();
|
|
12306
12367
|
setScopeMenuOpen((open) => !open);
|
|
12307
12368
|
},
|
|
12308
|
-
children: /* @__PURE__ */
|
|
12369
|
+
children: /* @__PURE__ */ jsx19("span", { children: scopeLabel })
|
|
12309
12370
|
}
|
|
12310
12371
|
) }),
|
|
12311
|
-
/* @__PURE__ */
|
|
12372
|
+
/* @__PURE__ */ jsx19(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_SCOPE_OPTIONS.map((option) => /* @__PURE__ */ jsxs13(
|
|
12312
12373
|
"button",
|
|
12313
12374
|
{
|
|
12314
12375
|
type: "button",
|
|
@@ -12319,7 +12380,7 @@ var ResourceHeader = ({
|
|
|
12319
12380
|
applyResourcePatch({ scope: option });
|
|
12320
12381
|
},
|
|
12321
12382
|
children: [
|
|
12322
|
-
/* @__PURE__ */
|
|
12383
|
+
/* @__PURE__ */ jsx19("span", { className: `gantt-resourceTimeline-resourceOptionScopeDot gantt-resourceTimeline-resourceScope${option}` }),
|
|
12323
12384
|
RESOURCE_SCOPE_LABELS[option] ?? option
|
|
12324
12385
|
]
|
|
12325
12386
|
},
|
|
@@ -12333,21 +12394,21 @@ var ResourceHeader = ({
|
|
|
12333
12394
|
"aria-label": `\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0440\u0435\u0441\u0443\u0440\u0441\u0430 ${resource.name}: ${assignmentCount}, ${workedDays} \u0434\u043D.`,
|
|
12334
12395
|
children: [
|
|
12335
12396
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceWorkedDays", children: [
|
|
12336
|
-
/* @__PURE__ */
|
|
12337
|
-
/* @__PURE__ */
|
|
12397
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: workedDays > 0 ? workedDays : "-" }),
|
|
12398
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceMetricLabel", children: workedDays > 0 ? "\u0434\u043D." : "" })
|
|
12338
12399
|
] }),
|
|
12339
12400
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceAssignmentCount", children: [
|
|
12340
|
-
/* @__PURE__ */
|
|
12401
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: assignmentCount > 0 ? assignmentCount : "" }),
|
|
12341
12402
|
assignmentCount > 0 && /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceAssignmentIcon", width: "14", height: "14", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
12342
|
-
/* @__PURE__ */
|
|
12343
|
-
/* @__PURE__ */
|
|
12403
|
+
/* @__PURE__ */ jsx19("rect", { width: "15", height: "5", x: "4", y: "5", rx: "2" }),
|
|
12404
|
+
/* @__PURE__ */ jsx19("rect", { width: "10", height: "5", x: "4", y: "14", rx: "2" })
|
|
12344
12405
|
] })
|
|
12345
12406
|
] })
|
|
12346
12407
|
]
|
|
12347
12408
|
}
|
|
12348
12409
|
),
|
|
12349
12410
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceActions", children: [
|
|
12350
|
-
conflictCount > 0 && /* @__PURE__ */
|
|
12411
|
+
conflictCount > 0 && /* @__PURE__ */ jsx19(
|
|
12351
12412
|
"button",
|
|
12352
12413
|
{
|
|
12353
12414
|
type: "button",
|
|
@@ -12362,7 +12423,7 @@ var ResourceHeader = ({
|
|
|
12362
12423
|
}
|
|
12363
12424
|
),
|
|
12364
12425
|
hasMenu && /* @__PURE__ */ jsxs13(Popover, { open: menuOpen, onOpenChange: setMenuOpen, children: [
|
|
12365
|
-
/* @__PURE__ */
|
|
12426
|
+
/* @__PURE__ */ jsx19(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx19(
|
|
12366
12427
|
"button",
|
|
12367
12428
|
{
|
|
12368
12429
|
className: "gantt-resourceTimeline-resourceMenuButton",
|
|
@@ -12372,10 +12433,10 @@ var ResourceHeader = ({
|
|
|
12372
12433
|
event.stopPropagation();
|
|
12373
12434
|
setMenuOpen((open) => !open);
|
|
12374
12435
|
},
|
|
12375
|
-
children: /* @__PURE__ */
|
|
12436
|
+
children: /* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
12376
12437
|
}
|
|
12377
12438
|
) }),
|
|
12378
|
-
/* @__PURE__ */
|
|
12439
|
+
/* @__PURE__ */ jsx19(PopoverContent, { className: "gantt-resourceTimeline-resourceMenu", portal: true, align: "end", children: visibleCommands.map((command) => /* @__PURE__ */ jsxs13(
|
|
12379
12440
|
"button",
|
|
12380
12441
|
{
|
|
12381
12442
|
type: "button",
|
|
@@ -12399,7 +12460,7 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
12399
12460
|
const [nameValue, setNameValue] = useState10("");
|
|
12400
12461
|
const inputRef = useRef10(null);
|
|
12401
12462
|
const confirmedRef = useRef10(false);
|
|
12402
|
-
|
|
12463
|
+
useEffect10(() => {
|
|
12403
12464
|
inputRef.current?.focus();
|
|
12404
12465
|
inputRef.current?.select();
|
|
12405
12466
|
}, []);
|
|
@@ -12438,8 +12499,8 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
12438
12499
|
gridTemplateColumns: columnTemplate
|
|
12439
12500
|
},
|
|
12440
12501
|
children: [
|
|
12441
|
-
/* @__PURE__ */
|
|
12442
|
-
/* @__PURE__ */
|
|
12502
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceNumber", children: "+" }),
|
|
12503
|
+
/* @__PURE__ */ jsx19(
|
|
12443
12504
|
Input,
|
|
12444
12505
|
{
|
|
12445
12506
|
ref: inputRef,
|
|
@@ -12496,21 +12557,21 @@ function ResourceTimelineChart({
|
|
|
12496
12557
|
const [activeConflictItemId, setActiveConflictItemId] = useState10(null);
|
|
12497
12558
|
const [resourceColumnHasRightShadow, setResourceColumnHasRightShadow] = useState10(false);
|
|
12498
12559
|
const [resourceColumnWidthOverrides, setResourceColumnWidthOverrides] = useState10(() => normalizeResourceColumnWidthMap(resourceTableColumnWidths));
|
|
12499
|
-
const validItems =
|
|
12500
|
-
const dateRange =
|
|
12501
|
-
const monthStart =
|
|
12560
|
+
const validItems = useMemo11(() => collectValidItems(resources), [resources]);
|
|
12561
|
+
const dateRange = useMemo11(() => getMultiMonthDays(validItems), [validItems]);
|
|
12562
|
+
const monthStart = useMemo11(() => {
|
|
12502
12563
|
const firstDay = dateRange[0] ?? /* @__PURE__ */ new Date();
|
|
12503
12564
|
return new Date(Date.UTC(firstDay.getUTCFullYear(), firstDay.getUTCMonth(), 1));
|
|
12504
12565
|
}, [dateRange]);
|
|
12505
|
-
const weekendPredicate =
|
|
12566
|
+
const weekendPredicate = useMemo11(
|
|
12506
12567
|
() => createCustomDayPredicate({ customDays, isWeekend: isWeekend3 }),
|
|
12507
12568
|
[customDays, isWeekend3]
|
|
12508
12569
|
);
|
|
12509
|
-
const gridWidth =
|
|
12510
|
-
|
|
12570
|
+
const gridWidth = useMemo11(() => Math.round(dateRange.length * dayWidth), [dateRange.length, dayWidth]);
|
|
12571
|
+
useEffect10(() => {
|
|
12511
12572
|
setResourceColumnWidthOverrides(normalizeResourceColumnWidthMap(resourceTableColumnWidths));
|
|
12512
12573
|
}, [resourceTableColumnWidths]);
|
|
12513
|
-
const resolvedResourceColumnWidths =
|
|
12574
|
+
const resolvedResourceColumnWidths = useMemo11(
|
|
12514
12575
|
() => ({
|
|
12515
12576
|
number: getResourceColumnWidth("number", resourceColumnWidthOverrides),
|
|
12516
12577
|
name: getResourceColumnWidth("name", resourceColumnWidthOverrides),
|
|
@@ -12520,20 +12581,20 @@ function ResourceTimelineChart({
|
|
|
12520
12581
|
}),
|
|
12521
12582
|
[resourceColumnWidthOverrides]
|
|
12522
12583
|
);
|
|
12523
|
-
const resourceColumnTemplate =
|
|
12584
|
+
const resourceColumnTemplate = useMemo11(
|
|
12524
12585
|
() => `${resolvedResourceColumnWidths.number}px minmax(${resolvedResourceColumnWidths.name}px, 1fr) ${resolvedResourceColumnWidths.availability}px ${resolvedResourceColumnWidths.assignments}px ${resolvedResourceColumnWidths.actions}px`,
|
|
12525
12586
|
[resolvedResourceColumnWidths]
|
|
12526
12587
|
);
|
|
12527
|
-
const resolvedResourceColumnWidthTotal =
|
|
12588
|
+
const resolvedResourceColumnWidthTotal = useMemo11(
|
|
12528
12589
|
() => Object.values(resolvedResourceColumnWidths).reduce((sum, width) => sum + width, 0),
|
|
12529
12590
|
[resolvedResourceColumnWidths]
|
|
12530
12591
|
);
|
|
12531
12592
|
const effectiveRowHeaderWidth = Math.max(rowHeaderWidth, DEFAULT_ROW_HEADER_WIDTH, resolvedResourceColumnWidthTotal);
|
|
12532
|
-
const orderedResources =
|
|
12593
|
+
const orderedResources = useMemo11(
|
|
12533
12594
|
() => resourceGrouping === "type" ? orderResourcesByType(resources) : resources,
|
|
12534
12595
|
[resourceGrouping, resources]
|
|
12535
12596
|
);
|
|
12536
|
-
const workedDaysByResourceId =
|
|
12597
|
+
const workedDaysByResourceId = useMemo11(() => {
|
|
12537
12598
|
const map = /* @__PURE__ */ new Map();
|
|
12538
12599
|
for (const resource of resources) {
|
|
12539
12600
|
const workedDays = resource.items.reduce((sum, item) => {
|
|
@@ -12552,7 +12613,7 @@ function ResourceTimelineChart({
|
|
|
12552
12613
|
}
|
|
12553
12614
|
return map;
|
|
12554
12615
|
}, [businessDays, resources, weekendPredicate]);
|
|
12555
|
-
const layout =
|
|
12616
|
+
const layout = useMemo11(
|
|
12556
12617
|
() => layoutResourceTimelineItems(orderedResources, {
|
|
12557
12618
|
monthStart,
|
|
12558
12619
|
dayWidth,
|
|
@@ -12574,7 +12635,7 @@ function ResourceTimelineChart({
|
|
|
12574
12635
|
return next;
|
|
12575
12636
|
});
|
|
12576
12637
|
}, [onResourceTableColumnWidthsChange]);
|
|
12577
|
-
|
|
12638
|
+
useEffect10(() => {
|
|
12578
12639
|
const handleMouseMove = (event) => {
|
|
12579
12640
|
const resizeState = resourceColumnResizeRef.current;
|
|
12580
12641
|
if (!resizeState) {
|
|
@@ -12618,7 +12679,7 @@ function ResourceTimelineChart({
|
|
|
12618
12679
|
document.body.style.cursor = "col-resize";
|
|
12619
12680
|
document.body.style.userSelect = "none";
|
|
12620
12681
|
}, [resolvedResourceColumnWidths]);
|
|
12621
|
-
const renderResizeHandle = useCallback8((columnId) => /* @__PURE__ */
|
|
12682
|
+
const renderResizeHandle = useCallback8((columnId) => /* @__PURE__ */ jsx19(
|
|
12622
12683
|
"button",
|
|
12623
12684
|
{
|
|
12624
12685
|
type: "button",
|
|
@@ -12643,7 +12704,7 @@ function ResourceTimelineChart({
|
|
|
12643
12704
|
return next;
|
|
12644
12705
|
});
|
|
12645
12706
|
}, []);
|
|
12646
|
-
const displayLayout =
|
|
12707
|
+
const displayLayout = useMemo11(() => {
|
|
12647
12708
|
if (resourceGrouping !== "type") {
|
|
12648
12709
|
return {
|
|
12649
12710
|
rows: layout.rows,
|
|
@@ -12726,11 +12787,11 @@ function ResourceTimelineChart({
|
|
|
12726
12787
|
totalHeight: currentTop
|
|
12727
12788
|
};
|
|
12728
12789
|
}, [collapsedResourceGroups, creatingResourceGroupType, layout, resourceAddRowHeight, resourceGrouping]);
|
|
12729
|
-
const todayInRange =
|
|
12790
|
+
const todayInRange = useMemo11(() => {
|
|
12730
12791
|
const today = getTodayLocalUtcDate();
|
|
12731
12792
|
return dateRange.some((day) => day.getTime() === today.getTime());
|
|
12732
12793
|
}, [dateRange]);
|
|
12733
|
-
const itemsByResourceId =
|
|
12794
|
+
const itemsByResourceId = useMemo11(() => {
|
|
12734
12795
|
const map = /* @__PURE__ */ new Map();
|
|
12735
12796
|
for (const item of displayLayout.items) {
|
|
12736
12797
|
const next = map.get(item.resourceId) ?? [];
|
|
@@ -12739,7 +12800,7 @@ function ResourceTimelineChart({
|
|
|
12739
12800
|
}
|
|
12740
12801
|
return map;
|
|
12741
12802
|
}, [displayLayout.items]);
|
|
12742
|
-
const conflictItemsByResourceId =
|
|
12803
|
+
const conflictItemsByResourceId = useMemo11(() => {
|
|
12743
12804
|
const map = /* @__PURE__ */ new Map();
|
|
12744
12805
|
for (const item of displayLayout.items) {
|
|
12745
12806
|
if (item.conflictRanges.length === 0) {
|
|
@@ -12843,7 +12904,7 @@ function ResourceTimelineChart({
|
|
|
12843
12904
|
weekendPredicate,
|
|
12844
12905
|
onResourceItemMove
|
|
12845
12906
|
});
|
|
12846
|
-
|
|
12907
|
+
useEffect10(() => {
|
|
12847
12908
|
const container = scrollContainerRef.current;
|
|
12848
12909
|
if (!container) return;
|
|
12849
12910
|
const updateShadow = () => {
|
|
@@ -12883,7 +12944,7 @@ function ResourceTimelineChart({
|
|
|
12883
12944
|
container.style.cursor = "grabbing";
|
|
12884
12945
|
event.preventDefault();
|
|
12885
12946
|
}, []);
|
|
12886
|
-
|
|
12947
|
+
useEffect10(() => {
|
|
12887
12948
|
const handlePanMove = (event) => {
|
|
12888
12949
|
const pan = panStateRef.current;
|
|
12889
12950
|
const container = scrollContainerRef.current;
|
|
@@ -12912,7 +12973,7 @@ function ResourceTimelineChart({
|
|
|
12912
12973
|
window.removeEventListener("mouseup", handlePanEnd);
|
|
12913
12974
|
};
|
|
12914
12975
|
}, [allowVerticalPan]);
|
|
12915
|
-
|
|
12976
|
+
useEffect10(() => {
|
|
12916
12977
|
const nextNavigation = /* @__PURE__ */ new Map();
|
|
12917
12978
|
for (const [resourceId, resourceItems] of itemsByResourceId.entries()) {
|
|
12918
12979
|
if (resourceItems.length === 0) {
|
|
@@ -12922,14 +12983,14 @@ function ResourceTimelineChart({
|
|
|
12922
12983
|
}
|
|
12923
12984
|
resourceNavigationIndexRef.current = nextNavigation;
|
|
12924
12985
|
}, [itemsByResourceId]);
|
|
12925
|
-
|
|
12986
|
+
useEffect10(() => {
|
|
12926
12987
|
return () => {
|
|
12927
12988
|
if (conflictHighlightTimeoutRef.current) {
|
|
12928
12989
|
window.clearTimeout(conflictHighlightTimeoutRef.current);
|
|
12929
12990
|
}
|
|
12930
12991
|
};
|
|
12931
12992
|
}, []);
|
|
12932
|
-
return /* @__PURE__ */
|
|
12993
|
+
return /* @__PURE__ */ jsx19("div", { className: "gantt-container gantt-resourceTimeline", children: /* @__PURE__ */ jsx19(
|
|
12933
12994
|
"div",
|
|
12934
12995
|
{
|
|
12935
12996
|
ref: scrollContainerRef,
|
|
@@ -12961,23 +13022,23 @@ function ResourceTimelineChart({
|
|
|
12961
13022
|
"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",
|
|
12962
13023
|
renderResizeHandle("name")
|
|
12963
13024
|
] }),
|
|
12964
|
-
/* @__PURE__ */
|
|
13025
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceHeaderCell", "aria-label": "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u044C", children: renderResizeHandle("availability") }),
|
|
12965
13026
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceHeaderCell", children: [
|
|
12966
13027
|
"\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F",
|
|
12967
13028
|
renderResizeHandle("assignments")
|
|
12968
13029
|
] }),
|
|
12969
|
-
/* @__PURE__ */
|
|
13030
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderActions", "aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F", children: renderResizeHandle("actions") })
|
|
12970
13031
|
]
|
|
12971
13032
|
}
|
|
12972
13033
|
),
|
|
12973
|
-
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */ jsxs13(
|
|
13034
|
+
displayLayout.groupHeaders.length > 0 ? displayLayout.groupHeaders.map((group) => /* @__PURE__ */ jsxs13(React15.Fragment, { children: [
|
|
12974
13035
|
/* @__PURE__ */ jsxs13(
|
|
12975
13036
|
"div",
|
|
12976
13037
|
{
|
|
12977
13038
|
className: "gantt-resourceTimeline-resourceGroupHeader",
|
|
12978
13039
|
style: { height: `${group.height}px` },
|
|
12979
13040
|
children: [
|
|
12980
|
-
/* @__PURE__ */
|
|
13041
|
+
/* @__PURE__ */ jsx19(
|
|
12981
13042
|
"button",
|
|
12982
13043
|
{
|
|
12983
13044
|
type: "button",
|
|
@@ -12988,12 +13049,12 @@ function ResourceTimelineChart({
|
|
|
12988
13049
|
event.stopPropagation();
|
|
12989
13050
|
toggleResourceGroupCollapsed(group.key);
|
|
12990
13051
|
},
|
|
12991
|
-
children: /* @__PURE__ */
|
|
13052
|
+
children: /* @__PURE__ */ jsx19(ResourceGroupChevronIcon, {})
|
|
12992
13053
|
}
|
|
12993
13054
|
),
|
|
12994
|
-
/* @__PURE__ */
|
|
12995
|
-
/* @__PURE__ */
|
|
12996
|
-
canAddResource && /* @__PURE__ */
|
|
13055
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceGroupTitle", children: group.label }),
|
|
13056
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resourceGroupCount", children: group.count }),
|
|
13057
|
+
canAddResource && /* @__PURE__ */ jsx19(
|
|
12997
13058
|
"button",
|
|
12998
13059
|
{
|
|
12999
13060
|
type: "button",
|
|
@@ -13012,7 +13073,7 @@ function ResourceTimelineChart({
|
|
|
13012
13073
|
),
|
|
13013
13074
|
displayLayout.rows.filter((row) => getResourceType(row.resource) === group.key).map((row) => {
|
|
13014
13075
|
const rowIndex = displayLayout.rows.findIndex((candidate) => candidate.resourceId === row.resourceId);
|
|
13015
|
-
return /* @__PURE__ */
|
|
13076
|
+
return /* @__PURE__ */ jsx19(
|
|
13016
13077
|
ResourceHeader,
|
|
13017
13078
|
{
|
|
13018
13079
|
resource: row.resource,
|
|
@@ -13032,7 +13093,7 @@ function ResourceTimelineChart({
|
|
|
13032
13093
|
row.resourceId
|
|
13033
13094
|
);
|
|
13034
13095
|
}),
|
|
13035
|
-
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */
|
|
13096
|
+
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */ jsx19(
|
|
13036
13097
|
NewResourceRow,
|
|
13037
13098
|
{
|
|
13038
13099
|
height: resourceAddRowHeight,
|
|
@@ -13041,7 +13102,7 @@ function ResourceTimelineChart({
|
|
|
13041
13102
|
columnTemplate: resourceColumnTemplate
|
|
13042
13103
|
}
|
|
13043
13104
|
)
|
|
13044
|
-
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */
|
|
13105
|
+
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */ jsx19(
|
|
13045
13106
|
ResourceHeader,
|
|
13046
13107
|
{
|
|
13047
13108
|
resource: row.resource,
|
|
@@ -13060,7 +13121,7 @@ function ResourceTimelineChart({
|
|
|
13060
13121
|
},
|
|
13061
13122
|
row.resourceId
|
|
13062
13123
|
)),
|
|
13063
|
-
canAddResource && (isCreatingResource ? /* @__PURE__ */
|
|
13124
|
+
canAddResource && (isCreatingResource ? /* @__PURE__ */ jsx19(
|
|
13064
13125
|
NewResourceRow,
|
|
13065
13126
|
{
|
|
13066
13127
|
height: resourceAddRowHeight,
|
|
@@ -13068,7 +13129,7 @@ function ResourceTimelineChart({
|
|
|
13068
13129
|
onCancel: handleCancelNewResource,
|
|
13069
13130
|
columnTemplate: resourceColumnTemplate
|
|
13070
13131
|
}
|
|
13071
|
-
) : /* @__PURE__ */
|
|
13132
|
+
) : /* @__PURE__ */ jsx19(
|
|
13072
13133
|
"button",
|
|
13073
13134
|
{
|
|
13074
13135
|
className: "gantt-resourceTimeline-addResourceButton",
|
|
@@ -13090,12 +13151,12 @@ function ResourceTimelineChart({
|
|
|
13090
13151
|
className: "gantt-resourceTimeline-chartSurface",
|
|
13091
13152
|
style: { minWidth: `${gridWidth}px` },
|
|
13092
13153
|
children: [
|
|
13093
|
-
/* @__PURE__ */
|
|
13154
|
+
/* @__PURE__ */ jsx19(
|
|
13094
13155
|
"div",
|
|
13095
13156
|
{
|
|
13096
13157
|
className: "gantt-resourceTimeline-stickyHeader",
|
|
13097
13158
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
13098
|
-
children: /* @__PURE__ */
|
|
13159
|
+
children: /* @__PURE__ */ jsx19(
|
|
13099
13160
|
TimeScaleHeader_default,
|
|
13100
13161
|
{
|
|
13101
13162
|
days: dateRange,
|
|
@@ -13114,7 +13175,7 @@ function ResourceTimelineChart({
|
|
|
13114
13175
|
className: "gantt-resourceTimeline-grid",
|
|
13115
13176
|
style: { width: `${gridWidth}px`, height: `${displayTotalHeight}px` },
|
|
13116
13177
|
children: [
|
|
13117
|
-
/* @__PURE__ */
|
|
13178
|
+
/* @__PURE__ */ jsx19(
|
|
13118
13179
|
GridBackground_default,
|
|
13119
13180
|
{
|
|
13120
13181
|
dateRange,
|
|
@@ -13124,8 +13185,8 @@ function ResourceTimelineChart({
|
|
|
13124
13185
|
isCustomWeekend: weekendPredicate
|
|
13125
13186
|
}
|
|
13126
13187
|
),
|
|
13127
|
-
todayInRange && /* @__PURE__ */
|
|
13128
|
-
displayLayout.groupHeaders.map((group) => /* @__PURE__ */
|
|
13188
|
+
todayInRange && /* @__PURE__ */ jsx19(TodayIndicator_default, { monthStart, dayWidth }),
|
|
13189
|
+
displayLayout.groupHeaders.map((group) => /* @__PURE__ */ jsx19(
|
|
13129
13190
|
"div",
|
|
13130
13191
|
{
|
|
13131
13192
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-groupRow",
|
|
@@ -13137,7 +13198,7 @@ function ResourceTimelineChart({
|
|
|
13137
13198
|
},
|
|
13138
13199
|
`group-row-${group.key}`
|
|
13139
13200
|
)),
|
|
13140
|
-
displayLayout.rows.map((row) => /* @__PURE__ */
|
|
13201
|
+
displayLayout.rows.map((row) => /* @__PURE__ */ jsx19(
|
|
13141
13202
|
"div",
|
|
13142
13203
|
{
|
|
13143
13204
|
className: "gantt-resourceTimeline-row",
|
|
@@ -13149,7 +13210,7 @@ function ResourceTimelineChart({
|
|
|
13149
13210
|
},
|
|
13150
13211
|
row.resourceId
|
|
13151
13212
|
)),
|
|
13152
|
-
canAddResource && /* @__PURE__ */
|
|
13213
|
+
canAddResource && /* @__PURE__ */ jsx19(
|
|
13153
13214
|
"div",
|
|
13154
13215
|
{
|
|
13155
13216
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -13160,7 +13221,7 @@ function ResourceTimelineChart({
|
|
|
13160
13221
|
}
|
|
13161
13222
|
}
|
|
13162
13223
|
),
|
|
13163
|
-
displayLayout.groupAddRows.map((row) => /* @__PURE__ */
|
|
13224
|
+
displayLayout.groupAddRows.map((row) => /* @__PURE__ */ jsx19(
|
|
13164
13225
|
"div",
|
|
13165
13226
|
{
|
|
13166
13227
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -13260,10 +13321,10 @@ function ResourceTimelineChart({
|
|
|
13260
13321
|
},
|
|
13261
13322
|
children: [
|
|
13262
13323
|
!readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
13263
|
-
/* @__PURE__ */
|
|
13264
|
-
/* @__PURE__ */
|
|
13324
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleStart" }),
|
|
13325
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleEnd" })
|
|
13265
13326
|
] }),
|
|
13266
|
-
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */
|
|
13327
|
+
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */ jsx19(
|
|
13267
13328
|
"span",
|
|
13268
13329
|
{
|
|
13269
13330
|
className: "gantt-resourceTimeline-weekendOverlay",
|
|
@@ -13275,7 +13336,7 @@ function ResourceTimelineChart({
|
|
|
13275
13336
|
},
|
|
13276
13337
|
`weekend-overlay-${index}`
|
|
13277
13338
|
)),
|
|
13278
|
-
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */
|
|
13339
|
+
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */ jsx19(
|
|
13279
13340
|
"span",
|
|
13280
13341
|
{
|
|
13281
13342
|
className: "gantt-resourceTimeline-conflictOverlay",
|
|
@@ -13287,7 +13348,7 @@ function ResourceTimelineChart({
|
|
|
13287
13348
|
},
|
|
13288
13349
|
`conflict-overlay-${index}`
|
|
13289
13350
|
)),
|
|
13290
|
-
hasItemMenu && /* @__PURE__ */
|
|
13351
|
+
hasItemMenu && /* @__PURE__ */ jsx19(
|
|
13291
13352
|
"button",
|
|
13292
13353
|
{
|
|
13293
13354
|
type: "button",
|
|
@@ -13300,12 +13361,12 @@ function ResourceTimelineChart({
|
|
|
13300
13361
|
event.stopPropagation();
|
|
13301
13362
|
onResourceItemMenuClick?.(layoutItem.item);
|
|
13302
13363
|
},
|
|
13303
|
-
children: /* @__PURE__ */
|
|
13364
|
+
children: /* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
13304
13365
|
}
|
|
13305
13366
|
),
|
|
13306
|
-
/* @__PURE__ */
|
|
13367
|
+
/* @__PURE__ */ jsx19("div", { className: "gantt-resourceTimeline-itemInner", children: renderItem ? renderItem(layoutItem.item, renderContext) : /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-defaultItemContent", children: [
|
|
13307
13368
|
/* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-defaultItemMain", children: [
|
|
13308
|
-
/* @__PURE__ */
|
|
13369
|
+
/* @__PURE__ */ jsx19(
|
|
13309
13370
|
"span",
|
|
13310
13371
|
{
|
|
13311
13372
|
className: "gantt-resourceTimeline-itemDurationChip",
|
|
@@ -13313,15 +13374,15 @@ function ResourceTimelineChart({
|
|
|
13313
13374
|
children: durationValue
|
|
13314
13375
|
}
|
|
13315
13376
|
),
|
|
13316
|
-
/* @__PURE__ */
|
|
13377
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-itemTitle", children: layoutItem.item.title })
|
|
13317
13378
|
] }),
|
|
13318
|
-
layoutItem.item.subtitle && /* @__PURE__ */
|
|
13379
|
+
layoutItem.item.subtitle && /* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-itemSubtitle", children: layoutItem.item.subtitle })
|
|
13319
13380
|
] }) }),
|
|
13320
13381
|
/* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-itemTooltip", role: "tooltip", children: [
|
|
13321
|
-
/* @__PURE__ */
|
|
13382
|
+
/* @__PURE__ */ jsx19("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLinePrimary", children: tooltipFirstLine }),
|
|
13322
13383
|
tooltipSecondLine && /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLineSecondary", children: [
|
|
13323
|
-
tooltipSecondLineIcon && /* @__PURE__ */
|
|
13324
|
-
/* @__PURE__ */
|
|
13384
|
+
tooltipSecondLineIcon && /* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-itemTooltipIcon", "aria-hidden": "true", children: tooltipSecondLineIcon }),
|
|
13385
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-resourceTimeline-itemTooltipText", children: tooltipSecondLine })
|
|
13325
13386
|
] })
|
|
13326
13387
|
] })
|
|
13327
13388
|
]
|
|
@@ -13342,8 +13403,8 @@ function ResourceTimelineChart({
|
|
|
13342
13403
|
}
|
|
13343
13404
|
|
|
13344
13405
|
// src/components/TableMatrix/TableMatrix.tsx
|
|
13345
|
-
import { useLayoutEffect, useMemo as
|
|
13346
|
-
import { jsx as
|
|
13406
|
+
import { useLayoutEffect, useMemo as useMemo12, useRef as useRef11, useState as useState11 } from "react";
|
|
13407
|
+
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
13347
13408
|
var AUTO_COLUMN_MIN_WIDTH = 72;
|
|
13348
13409
|
var AUTO_COLUMN_MAX_WIDTH = 180;
|
|
13349
13410
|
var DAY_MS5 = 24 * 60 * 60 * 1e3;
|
|
@@ -13411,7 +13472,7 @@ function TableMatrix({
|
|
|
13411
13472
|
}) {
|
|
13412
13473
|
const measureRef = useRef11(null);
|
|
13413
13474
|
const [measuredAutoWidths, setMeasuredAutoWidths] = useState11([]);
|
|
13414
|
-
const hasAutoWidthColumns =
|
|
13475
|
+
const hasAutoWidthColumns = useMemo12(
|
|
13415
13476
|
() => columns.some((column) => typeof column.width !== "number"),
|
|
13416
13477
|
[columns]
|
|
13417
13478
|
);
|
|
@@ -13442,7 +13503,7 @@ function TableMatrix({
|
|
|
13442
13503
|
return changed ? nextWidths : previousWidths;
|
|
13443
13504
|
});
|
|
13444
13505
|
}, [columns, hasAutoWidthColumns, tasks]);
|
|
13445
|
-
const resolvedColumnWidths =
|
|
13506
|
+
const resolvedColumnWidths = useMemo12(
|
|
13446
13507
|
() => columns.map((column, index) => {
|
|
13447
13508
|
if (typeof column.width === "number") return column.width;
|
|
13448
13509
|
const minWidth = getAutoMinWidth(column);
|
|
@@ -13451,27 +13512,27 @@ function TableMatrix({
|
|
|
13451
13512
|
}),
|
|
13452
13513
|
[columns, measuredAutoWidths]
|
|
13453
13514
|
);
|
|
13454
|
-
const gridTemplateColumns =
|
|
13515
|
+
const gridTemplateColumns = useMemo12(
|
|
13455
13516
|
() => resolvedColumnWidths.map((width) => `${width}px`).join(" "),
|
|
13456
13517
|
[resolvedColumnWidths]
|
|
13457
13518
|
);
|
|
13458
|
-
const totalWidth =
|
|
13519
|
+
const totalWidth = useMemo12(
|
|
13459
13520
|
() => resolvedColumnWidths.reduce((sum, width) => sum + width, 0),
|
|
13460
13521
|
[resolvedColumnWidths]
|
|
13461
13522
|
);
|
|
13462
|
-
const overlayDateMs =
|
|
13523
|
+
const overlayDateMs = useMemo12(
|
|
13463
13524
|
() => dateOverlay ? parseDateOnlyMs(dateOverlay.date) : null,
|
|
13464
13525
|
[dateOverlay]
|
|
13465
13526
|
);
|
|
13466
|
-
const hasGroupHeader =
|
|
13527
|
+
const hasGroupHeader = useMemo12(
|
|
13467
13528
|
() => columns.some((column) => !!column.groupId) || (columnGroups?.length ?? 0) > 0,
|
|
13468
13529
|
[columnGroups, columns]
|
|
13469
13530
|
);
|
|
13470
|
-
const groupMap =
|
|
13531
|
+
const groupMap = useMemo12(
|
|
13471
13532
|
() => new Map((columnGroups ?? []).map((group) => [group.id, group])),
|
|
13472
13533
|
[columnGroups]
|
|
13473
13534
|
);
|
|
13474
|
-
const headerSpans =
|
|
13535
|
+
const headerSpans = useMemo12(() => {
|
|
13475
13536
|
if (!hasGroupHeader) return [];
|
|
13476
13537
|
if (columnGroups?.some((group) => typeof group.width === "number")) {
|
|
13477
13538
|
return columnGroups.map((group) => ({
|
|
@@ -13504,7 +13565,7 @@ function TableMatrix({
|
|
|
13504
13565
|
const headerContentHeight = Math.max(0, headerHeight - 1);
|
|
13505
13566
|
const topRowHeight = hasGroupHeader ? Math.ceil(headerContentHeight / 2) : headerContentHeight;
|
|
13506
13567
|
const bottomRowHeight = hasGroupHeader ? Math.floor(headerContentHeight / 2) : 0;
|
|
13507
|
-
const parentTaskIds =
|
|
13568
|
+
const parentTaskIds = useMemo12(() => {
|
|
13508
13569
|
const ids = /* @__PURE__ */ new Set();
|
|
13509
13570
|
for (const task of allTasks) {
|
|
13510
13571
|
if (task.parentId) {
|
|
@@ -13513,7 +13574,7 @@ function TableMatrix({
|
|
|
13513
13574
|
}
|
|
13514
13575
|
return ids;
|
|
13515
13576
|
}, [allTasks]);
|
|
13516
|
-
const nestingDepthMap =
|
|
13577
|
+
const nestingDepthMap = useMemo12(() => {
|
|
13517
13578
|
const depthMap = /* @__PURE__ */ new Map();
|
|
13518
13579
|
const taskById = new Map(allTasks.map((task) => [task.id, task]));
|
|
13519
13580
|
const getDepth = (taskId, seen = /* @__PURE__ */ new Set()) => {
|
|
@@ -13534,7 +13595,7 @@ function TableMatrix({
|
|
|
13534
13595
|
}
|
|
13535
13596
|
return depthMap;
|
|
13536
13597
|
}, [allTasks]);
|
|
13537
|
-
const renderedRows =
|
|
13598
|
+
const renderedRows = useMemo12(() => {
|
|
13538
13599
|
if (!visibleRowIndices) {
|
|
13539
13600
|
return tasks.map((task, index) => ({ task, index }));
|
|
13540
13601
|
}
|
|
@@ -13545,7 +13606,7 @@ function TableMatrix({
|
|
|
13545
13606
|
}, [tasks, visibleRowIndices]);
|
|
13546
13607
|
return /* @__PURE__ */ jsxs14("div", { className: "gantt-mx-root", style: { width: `${totalWidth}px` }, children: [
|
|
13547
13608
|
hasAutoWidthColumns && /* @__PURE__ */ jsxs14("div", { ref: measureRef, className: "gantt-mx-measure", "aria-hidden": "true", children: [
|
|
13548
|
-
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */
|
|
13609
|
+
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ jsx20(
|
|
13549
13610
|
"div",
|
|
13550
13611
|
{
|
|
13551
13612
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -13554,7 +13615,7 @@ function TableMatrix({
|
|
|
13554
13615
|
},
|
|
13555
13616
|
`header:${column.id}`
|
|
13556
13617
|
)),
|
|
13557
|
-
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */
|
|
13618
|
+
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ jsx20(
|
|
13558
13619
|
"div",
|
|
13559
13620
|
{
|
|
13560
13621
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -13565,7 +13626,7 @@ function TableMatrix({
|
|
|
13565
13626
|
)))
|
|
13566
13627
|
] }),
|
|
13567
13628
|
/* @__PURE__ */ jsxs14("div", { className: "gantt-mx-header", style: { height: `${headerHeight}px` }, children: [
|
|
13568
|
-
hasGroupHeader && /* @__PURE__ */
|
|
13629
|
+
hasGroupHeader && /* @__PURE__ */ jsx20(
|
|
13569
13630
|
"div",
|
|
13570
13631
|
{
|
|
13571
13632
|
className: "gantt-mx-headerRow gantt-mx-headerGroupRow",
|
|
@@ -13573,7 +13634,7 @@ function TableMatrix({
|
|
|
13573
13634
|
gridTemplateColumns: headerSpans.map((span) => `${span.width ?? 0}px`).join(" "),
|
|
13574
13635
|
height: `${topRowHeight}px`
|
|
13575
13636
|
},
|
|
13576
|
-
children: headerSpans.map((span) => /* @__PURE__ */
|
|
13637
|
+
children: headerSpans.map((span) => /* @__PURE__ */ jsx20(
|
|
13577
13638
|
"div",
|
|
13578
13639
|
{
|
|
13579
13640
|
className: joinClasses("gantt-mx-groupCell", span.className),
|
|
@@ -13584,7 +13645,7 @@ function TableMatrix({
|
|
|
13584
13645
|
))
|
|
13585
13646
|
}
|
|
13586
13647
|
),
|
|
13587
|
-
/* @__PURE__ */
|
|
13648
|
+
/* @__PURE__ */ jsx20(
|
|
13588
13649
|
"div",
|
|
13589
13650
|
{
|
|
13590
13651
|
className: "gantt-mx-headerRow",
|
|
@@ -13601,7 +13662,7 @@ function TableMatrix({
|
|
|
13601
13662
|
),
|
|
13602
13663
|
style: column.minWidth !== void 0 ? { minWidth: `${column.minWidth}px` } : void 0,
|
|
13603
13664
|
children: [
|
|
13604
|
-
shouldRenderOverlayEdge && /* @__PURE__ */
|
|
13665
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ jsx20(
|
|
13605
13666
|
"span",
|
|
13606
13667
|
{
|
|
13607
13668
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -13611,7 +13672,7 @@ function TableMatrix({
|
|
|
13611
13672
|
}
|
|
13612
13673
|
}
|
|
13613
13674
|
),
|
|
13614
|
-
/* @__PURE__ */
|
|
13675
|
+
/* @__PURE__ */ jsx20("span", { className: "gantt-mx-headerContent", children: column.header })
|
|
13615
13676
|
]
|
|
13616
13677
|
},
|
|
13617
13678
|
column.id
|
|
@@ -13620,7 +13681,7 @@ function TableMatrix({
|
|
|
13620
13681
|
}
|
|
13621
13682
|
)
|
|
13622
13683
|
] }),
|
|
13623
|
-
/* @__PURE__ */
|
|
13684
|
+
/* @__PURE__ */ jsx20(
|
|
13624
13685
|
"div",
|
|
13625
13686
|
{
|
|
13626
13687
|
className: "gantt-mx-body",
|
|
@@ -13634,7 +13695,7 @@ function TableMatrix({
|
|
|
13634
13695
|
const nestingDepth = nestingDepthMap.get(task.id) ?? 0;
|
|
13635
13696
|
const rowFillLevel = Math.min(nestingDepth, 2);
|
|
13636
13697
|
const isTotal = Boolean(task.isTotal);
|
|
13637
|
-
return /* @__PURE__ */
|
|
13698
|
+
return /* @__PURE__ */ jsx20(
|
|
13638
13699
|
"div",
|
|
13639
13700
|
{
|
|
13640
13701
|
"data-gantt-task-row-id": task.id,
|
|
@@ -13674,7 +13735,7 @@ function TableMatrix({
|
|
|
13674
13735
|
onCellClick?.({ task, column, rowIndex: index, columnIndex, event });
|
|
13675
13736
|
},
|
|
13676
13737
|
children: [
|
|
13677
|
-
shouldRenderOverlay && /* @__PURE__ */
|
|
13738
|
+
shouldRenderOverlay && /* @__PURE__ */ jsx20(
|
|
13678
13739
|
"span",
|
|
13679
13740
|
{
|
|
13680
13741
|
className: joinClasses("gantt-mx-dateOverlay", dateOverlay && dateOverlay.className),
|
|
@@ -13684,7 +13745,7 @@ function TableMatrix({
|
|
|
13684
13745
|
}
|
|
13685
13746
|
}
|
|
13686
13747
|
),
|
|
13687
|
-
shouldRenderOverlayEdge && /* @__PURE__ */
|
|
13748
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ jsx20(
|
|
13688
13749
|
"span",
|
|
13689
13750
|
{
|
|
13690
13751
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -13694,7 +13755,7 @@ function TableMatrix({
|
|
|
13694
13755
|
}
|
|
13695
13756
|
}
|
|
13696
13757
|
),
|
|
13697
|
-
/* @__PURE__ */
|
|
13758
|
+
/* @__PURE__ */ jsx20("div", { className: "gantt-mx-cellContent", children: column.renderCell(task) })
|
|
13698
13759
|
]
|
|
13699
13760
|
},
|
|
13700
13761
|
`${task.id}:${column.id}`
|
|
@@ -13710,8 +13771,8 @@ function TableMatrix({
|
|
|
13710
13771
|
}
|
|
13711
13772
|
|
|
13712
13773
|
// src/components/PlanFactMatrix/PlanFactMatrix.tsx
|
|
13713
|
-
import
|
|
13714
|
-
import { jsx as
|
|
13774
|
+
import React17, { useCallback as useCallback9, useEffect as useEffect11, useMemo as useMemo13, useRef as useRef12, useState as useState12 } from "react";
|
|
13775
|
+
import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
13715
13776
|
var DAY_MS6 = 24 * 60 * 60 * 1e3;
|
|
13716
13777
|
function joinClasses2(...values) {
|
|
13717
13778
|
return values.filter(Boolean).join(" ");
|
|
@@ -13804,7 +13865,7 @@ function PlanFactCellEditor({
|
|
|
13804
13865
|
}) {
|
|
13805
13866
|
const [draft, setDraft] = useState12(startValue ?? (value === void 0 ? "" : String(value)));
|
|
13806
13867
|
const inputRef = useRef12(null);
|
|
13807
|
-
|
|
13868
|
+
useEffect11(() => {
|
|
13808
13869
|
inputRef.current?.focus();
|
|
13809
13870
|
if (startValue === void 0) {
|
|
13810
13871
|
inputRef.current?.select();
|
|
@@ -13820,7 +13881,7 @@ function PlanFactCellEditor({
|
|
|
13820
13881
|
}
|
|
13821
13882
|
onCommit(parsed);
|
|
13822
13883
|
}, [draft, onCancel, onCommit]);
|
|
13823
|
-
return /* @__PURE__ */
|
|
13884
|
+
return /* @__PURE__ */ jsx21(
|
|
13824
13885
|
"input",
|
|
13825
13886
|
{
|
|
13826
13887
|
ref: inputRef,
|
|
@@ -13934,7 +13995,7 @@ function PlanFactRowInner({
|
|
|
13934
13995
|
showOverflowTooltip,
|
|
13935
13996
|
hideOverflowTooltip
|
|
13936
13997
|
}) {
|
|
13937
|
-
return /* @__PURE__ */
|
|
13998
|
+
return /* @__PURE__ */ jsx21(
|
|
13938
13999
|
"div",
|
|
13939
14000
|
{
|
|
13940
14001
|
"data-gantt-task-row-id": task.id,
|
|
@@ -14069,7 +14130,7 @@ function PlanFactRowInner({
|
|
|
14069
14130
|
}
|
|
14070
14131
|
},
|
|
14071
14132
|
children: [
|
|
14072
|
-
isEditing ? /* @__PURE__ */
|
|
14133
|
+
isEditing ? /* @__PURE__ */ jsx21(
|
|
14073
14134
|
PlanFactCellEditor,
|
|
14074
14135
|
{
|
|
14075
14136
|
value,
|
|
@@ -14095,7 +14156,7 @@ function PlanFactRowInner({
|
|
|
14095
14156
|
focusCell(nextActiveCell);
|
|
14096
14157
|
}
|
|
14097
14158
|
}
|
|
14098
|
-
) : /* @__PURE__ */
|
|
14159
|
+
) : /* @__PURE__ */ jsx21(
|
|
14099
14160
|
"span",
|
|
14100
14161
|
{
|
|
14101
14162
|
className: "gantt-pf-cellValue",
|
|
@@ -14109,7 +14170,7 @@ function PlanFactRowInner({
|
|
|
14109
14170
|
children: isParent ? "" : formatValue(value)
|
|
14110
14171
|
}
|
|
14111
14172
|
),
|
|
14112
|
-
showFillHandle && /* @__PURE__ */
|
|
14173
|
+
showFillHandle && /* @__PURE__ */ jsx21(
|
|
14113
14174
|
"span",
|
|
14114
14175
|
{
|
|
14115
14176
|
className: "gantt-pf-fillHandle",
|
|
@@ -14137,7 +14198,7 @@ function arePlanFactRowsEqual(previous, next) {
|
|
|
14137
14198
|
const nextRangeTouchesRow = doesRangeTouchRow(next.renderedRangeBounds, next.rowIndex);
|
|
14138
14199
|
return previous.task === next.task && previous.rowIndex === next.rowIndex && previous.dateRange === next.dateRange && previous.dateKeys === next.dateKeys && previous.renderedDateIndices === next.renderedDateIndices && previous.totalWidth === next.totalWidth && previous.rowHeight === next.rowHeight && previous.subrowHeight === next.subrowHeight && previous.dayWidth === next.dayWidth && previous.plannedRange === next.plannedRange && previous.todayDateIndex === next.todayDateIndex && previous.isParent === next.isParent && previous.isHighlighted === next.isHighlighted && previous.selectedTaskId === previous.task.id === (next.selectedTaskId === next.task.id) && getCellSignatureForTask(previous.activeCell, previous.task.id) === getCellSignatureForTask(next.activeCell, next.task.id) && getEditingCellSignatureForTask(previous.editingCell, previous.task.id) === getEditingCellSignatureForTask(next.editingCell, next.task.id) && getRangeAnchorSignatureForTask(previous.selectedRange, previous.task.id) === getRangeAnchorSignatureForTask(next.selectedRange, next.task.id) && previousRangeTouchesRow === nextRangeTouchesRow && (!nextRangeTouchesRow || areRangeBoundsEqual(previous.renderedRangeBounds, next.renderedRangeBounds));
|
|
14139
14200
|
}
|
|
14140
|
-
var PlanFactRow =
|
|
14201
|
+
var PlanFactRow = React17.memo(PlanFactRowInner, arePlanFactRowsEqual);
|
|
14141
14202
|
function PlanFactMatrix({
|
|
14142
14203
|
tasks,
|
|
14143
14204
|
allTasks = tasks,
|
|
@@ -14171,37 +14232,37 @@ function PlanFactMatrix({
|
|
|
14171
14232
|
const bodyRef = useRef12(null);
|
|
14172
14233
|
const totalWidth = dateRange.length * dayWidth;
|
|
14173
14234
|
const subrowHeight = rowHeight / 2;
|
|
14174
|
-
const renderedRowIndices =
|
|
14235
|
+
const renderedRowIndices = useMemo13(
|
|
14175
14236
|
() => visibleRowIndices ?? tasks.map((_, index) => index),
|
|
14176
14237
|
[tasks, visibleRowIndices]
|
|
14177
14238
|
);
|
|
14178
|
-
const renderedDateIndices =
|
|
14239
|
+
const renderedDateIndices = useMemo13(
|
|
14179
14240
|
() => visibleDateIndices ?? dateRange.map((_, index) => index),
|
|
14180
14241
|
[dateRange, visibleDateIndices]
|
|
14181
14242
|
);
|
|
14182
|
-
const parentTaskIds =
|
|
14243
|
+
const parentTaskIds = useMemo13(() => {
|
|
14183
14244
|
const ids = /* @__PURE__ */ new Set();
|
|
14184
14245
|
for (const task of allTasks) {
|
|
14185
14246
|
if (task.parentId) ids.add(task.parentId);
|
|
14186
14247
|
}
|
|
14187
14248
|
return ids;
|
|
14188
14249
|
}, [allTasks]);
|
|
14189
|
-
const dateKeys =
|
|
14190
|
-
const renderedDateWindow =
|
|
14250
|
+
const dateKeys = useMemo13(() => dateRange.map(formatDateKey), [dateRange]);
|
|
14251
|
+
const renderedDateWindow = useMemo13(
|
|
14191
14252
|
() => getRenderedDateWindow(dateRange, renderedDateIndices),
|
|
14192
14253
|
[dateRange, renderedDateIndices]
|
|
14193
14254
|
);
|
|
14194
14255
|
const dateRangeStartMs = dateRange[0] ? getDateOnlyMs(dateRange[0]) : 0;
|
|
14195
|
-
const taskIndexById =
|
|
14256
|
+
const taskIndexById = useMemo13(() => {
|
|
14196
14257
|
const indexById = /* @__PURE__ */ new Map();
|
|
14197
14258
|
tasks.forEach((task, index) => indexById.set(task.id, index));
|
|
14198
14259
|
return indexById;
|
|
14199
14260
|
}, [tasks]);
|
|
14200
|
-
const taskById =
|
|
14261
|
+
const taskById = useMemo13(
|
|
14201
14262
|
() => new Map(tasks.map((task) => [task.id, task])),
|
|
14202
14263
|
[tasks]
|
|
14203
14264
|
);
|
|
14204
|
-
const monthSeparatorIndices =
|
|
14265
|
+
const monthSeparatorIndices = useMemo13(() => {
|
|
14205
14266
|
const indices = [];
|
|
14206
14267
|
for (let index = 1; index < dateRange.length; index += 1) {
|
|
14207
14268
|
if (dateRange[index].getUTCDate() === 1) {
|
|
@@ -14210,7 +14271,7 @@ function PlanFactMatrix({
|
|
|
14210
14271
|
}
|
|
14211
14272
|
return indices;
|
|
14212
14273
|
}, [dateRange]);
|
|
14213
|
-
const plannedRangeByTaskId =
|
|
14274
|
+
const plannedRangeByTaskId = useMemo13(() => {
|
|
14214
14275
|
const rangeByTaskId = /* @__PURE__ */ new Map();
|
|
14215
14276
|
for (const task of tasks) {
|
|
14216
14277
|
rangeByTaskId.set(task.id, getPlannedIndexRange(task, dateRangeStartMs, dateRange.length));
|
|
@@ -14307,7 +14368,7 @@ function PlanFactMatrix({
|
|
|
14307
14368
|
};
|
|
14308
14369
|
}, [taskIndexById]);
|
|
14309
14370
|
const renderedRange = fillRange ?? selectedRange;
|
|
14310
|
-
const renderedRangeBounds =
|
|
14371
|
+
const renderedRangeBounds = useMemo13(
|
|
14311
14372
|
() => renderedRange ? getRangeBounds(renderedRange) : null,
|
|
14312
14373
|
[getRangeBounds, renderedRange]
|
|
14313
14374
|
);
|
|
@@ -14574,7 +14635,7 @@ function PlanFactMatrix({
|
|
|
14574
14635
|
onTaskSelect?.(nextCell.taskId);
|
|
14575
14636
|
focusCell(selectedRange?.anchor ?? cell);
|
|
14576
14637
|
}, [dateRange.length, focusCell, onTaskSelect, parentTaskIds, selectedRange, tasks]);
|
|
14577
|
-
|
|
14638
|
+
useEffect11(() => {
|
|
14578
14639
|
const endSelection = () => {
|
|
14579
14640
|
let pendingFillRange = null;
|
|
14580
14641
|
if (hoverFrameRef.current !== null) {
|
|
@@ -14597,12 +14658,12 @@ function PlanFactMatrix({
|
|
|
14597
14658
|
window.removeEventListener("mouseup", endSelection);
|
|
14598
14659
|
};
|
|
14599
14660
|
}, [applyFillRange, flushPendingHoverCell]);
|
|
14600
|
-
|
|
14661
|
+
useEffect11(() => () => {
|
|
14601
14662
|
if (hoverFrameRef.current !== null) {
|
|
14602
14663
|
window.cancelAnimationFrame(hoverFrameRef.current);
|
|
14603
14664
|
}
|
|
14604
14665
|
}, []);
|
|
14605
|
-
|
|
14666
|
+
useEffect11(() => {
|
|
14606
14667
|
const handleKeyDown = (event) => {
|
|
14607
14668
|
if (event.key !== "Escape") return;
|
|
14608
14669
|
clearSelection();
|
|
@@ -14632,7 +14693,7 @@ function PlanFactMatrix({
|
|
|
14632
14693
|
},
|
|
14633
14694
|
children: [
|
|
14634
14695
|
/* @__PURE__ */ jsxs15("div", { className: "gantt-pf-header", style: { width: `${totalWidth}px`, height: `${headerHeight}px` }, children: [
|
|
14635
|
-
/* @__PURE__ */
|
|
14696
|
+
/* @__PURE__ */ jsx21(
|
|
14636
14697
|
"div",
|
|
14637
14698
|
{
|
|
14638
14699
|
className: "gantt-pf-dateWindow",
|
|
@@ -14640,7 +14701,7 @@ function PlanFactMatrix({
|
|
|
14640
14701
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
14641
14702
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
14642
14703
|
},
|
|
14643
|
-
children: /* @__PURE__ */
|
|
14704
|
+
children: /* @__PURE__ */ jsx21(
|
|
14644
14705
|
TimeScaleHeader_default,
|
|
14645
14706
|
{
|
|
14646
14707
|
days: renderedDateWindow.days,
|
|
@@ -14652,7 +14713,7 @@ function PlanFactMatrix({
|
|
|
14652
14713
|
)
|
|
14653
14714
|
}
|
|
14654
14715
|
),
|
|
14655
|
-
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */
|
|
14716
|
+
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */ jsx21(
|
|
14656
14717
|
"span",
|
|
14657
14718
|
{
|
|
14658
14719
|
className: "gantt-pf-headerTodayLine",
|
|
@@ -14664,7 +14725,7 @@ function PlanFactMatrix({
|
|
|
14664
14725
|
}
|
|
14665
14726
|
)
|
|
14666
14727
|
] }),
|
|
14667
|
-
/* @__PURE__ */
|
|
14728
|
+
/* @__PURE__ */ jsx21("div", { className: "gantt-pf-monthSeparatorLayer", "aria-hidden": "true", children: monthSeparatorIndices.map((dateIndex) => /* @__PURE__ */ jsx21(
|
|
14668
14729
|
"span",
|
|
14669
14730
|
{
|
|
14670
14731
|
className: "gantt-pf-monthSeparator",
|
|
@@ -14686,7 +14747,7 @@ function PlanFactMatrix({
|
|
|
14686
14747
|
width: `${totalWidth}px`
|
|
14687
14748
|
},
|
|
14688
14749
|
children: [
|
|
14689
|
-
/* @__PURE__ */
|
|
14750
|
+
/* @__PURE__ */ jsx21(
|
|
14690
14751
|
"div",
|
|
14691
14752
|
{
|
|
14692
14753
|
className: "gantt-pf-dateWindow gantt-pf-dateWindow-body",
|
|
@@ -14694,7 +14755,7 @@ function PlanFactMatrix({
|
|
|
14694
14755
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
14695
14756
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
14696
14757
|
},
|
|
14697
|
-
children: /* @__PURE__ */
|
|
14758
|
+
children: /* @__PURE__ */ jsx21(
|
|
14698
14759
|
GridBackground_default,
|
|
14699
14760
|
{
|
|
14700
14761
|
dateRange: renderedDateWindow.days,
|
|
@@ -14712,7 +14773,7 @@ function PlanFactMatrix({
|
|
|
14712
14773
|
if (!task) return null;
|
|
14713
14774
|
const isParent = parentTaskIds.has(task.id);
|
|
14714
14775
|
const isHighlighted = filterMode === "highlight" && !!highlightedTaskIds?.has(task.id);
|
|
14715
|
-
return /* @__PURE__ */
|
|
14776
|
+
return /* @__PURE__ */ jsx21(
|
|
14716
14777
|
PlanFactRow,
|
|
14717
14778
|
{
|
|
14718
14779
|
task,
|
|
@@ -14757,7 +14818,7 @@ function PlanFactMatrix({
|
|
|
14757
14818
|
]
|
|
14758
14819
|
}
|
|
14759
14820
|
),
|
|
14760
|
-
overflowTooltip && /* @__PURE__ */
|
|
14821
|
+
overflowTooltip && /* @__PURE__ */ jsx21(
|
|
14761
14822
|
"div",
|
|
14762
14823
|
{
|
|
14763
14824
|
className: "gantt-pf-overflowTooltip",
|
|
@@ -15113,7 +15174,7 @@ async function printGanttChart({
|
|
|
15113
15174
|
}
|
|
15114
15175
|
|
|
15115
15176
|
// src/components/GanttChart/GanttChart.tsx
|
|
15116
|
-
import { Fragment as Fragment6, jsx as
|
|
15177
|
+
import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
15117
15178
|
var SCROLL_TO_ROW_CONTEXT_ROWS = 2;
|
|
15118
15179
|
var TASK_ROW_OVERSCAN = 8;
|
|
15119
15180
|
var SCROLL_TOP_BUCKET_PX = 64;
|
|
@@ -15254,9 +15315,9 @@ function arePreviewTaskMapsEqual(left, right) {
|
|
|
15254
15315
|
}
|
|
15255
15316
|
function GanttChartInner(props, ref) {
|
|
15256
15317
|
if (props.mode === "resource-planner") {
|
|
15257
|
-
return /* @__PURE__ */
|
|
15318
|
+
return /* @__PURE__ */ jsx22(ResourceTimelineChart, { ...props });
|
|
15258
15319
|
}
|
|
15259
|
-
return /* @__PURE__ */
|
|
15320
|
+
return /* @__PURE__ */ jsx22(
|
|
15260
15321
|
TaskGanttChart,
|
|
15261
15322
|
{
|
|
15262
15323
|
...props,
|
|
@@ -15315,6 +15376,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15315
15376
|
activityClickToDrag = false,
|
|
15316
15377
|
activityActivationMode = "none",
|
|
15317
15378
|
showActivityLinks = true,
|
|
15379
|
+
activityDependencies,
|
|
15380
|
+
activityDependencyHighlight,
|
|
15318
15381
|
showActivityLag = true,
|
|
15319
15382
|
activityTooltip,
|
|
15320
15383
|
timelineMarkers,
|
|
@@ -15426,7 +15489,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15426
15489
|
dependencyCreationRef.current = nextDrag;
|
|
15427
15490
|
setDependencyCreationDrag(nextDrag);
|
|
15428
15491
|
}, [disableDependencyEditing, getDependencyPortPoint]);
|
|
15429
|
-
|
|
15492
|
+
useEffect12(() => {
|
|
15430
15493
|
if (!dependencyCreationDrag) return;
|
|
15431
15494
|
const handlePointerMove = (event) => {
|
|
15432
15495
|
const activeDrag = dependencyCreationRef.current;
|
|
@@ -15510,12 +15573,12 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15510
15573
|
document.removeEventListener("keydown", handleKeyDown);
|
|
15511
15574
|
};
|
|
15512
15575
|
}, [businessDays, customDays, dependencyCreationDrag !== null, getDependencyPortPoint, getVisualDependencyType, isWeekend3, onTasksChange, tasks]);
|
|
15513
|
-
|
|
15576
|
+
useEffect12(() => {
|
|
15514
15577
|
if (!dependencyCreationError) return;
|
|
15515
15578
|
const timeout = window.setTimeout(() => setDependencyCreationError(null), 3e3);
|
|
15516
15579
|
return () => window.clearTimeout(timeout);
|
|
15517
15580
|
}, [dependencyCreationError]);
|
|
15518
|
-
|
|
15581
|
+
useEffect12(() => {
|
|
15519
15582
|
if (!dependencyLineMenu) return;
|
|
15520
15583
|
const closeMenu = (event) => {
|
|
15521
15584
|
const target = event.target;
|
|
@@ -15561,11 +15624,11 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15561
15624
|
const handleTaskDateChangeMode = externalOnTaskDateChangeModeChange ?? setInternalTaskDateChangeMode;
|
|
15562
15625
|
const resolvedRowContentLines = isPlanFactMode ? Math.max(2, Math.floor(rowContentLines)) : Math.max(1, Math.floor(rowContentLines));
|
|
15563
15626
|
const shouldFillParentRowsInTaskList = fillParentRowsInTaskList ?? isPlanFactMode;
|
|
15564
|
-
const effectiveRowHeight =
|
|
15627
|
+
const effectiveRowHeight = useMemo14(
|
|
15565
15628
|
() => rowContentLines === 0 && !isPlanFactMode ? rowHeight : Math.max(rowHeight, 10 + resolvedRowContentLines * 18),
|
|
15566
15629
|
[isPlanFactMode, resolvedRowContentLines, rowContentLines, rowHeight]
|
|
15567
15630
|
);
|
|
15568
|
-
const normalizedTasks =
|
|
15631
|
+
const normalizedTasks = useMemo14(() => {
|
|
15569
15632
|
const ordered = normalizeHierarchyTasks(tasks);
|
|
15570
15633
|
const ranges = /* @__PURE__ */ new Map();
|
|
15571
15634
|
for (const task of ordered) {
|
|
@@ -15587,7 +15650,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15587
15650
|
} : task;
|
|
15588
15651
|
});
|
|
15589
15652
|
}, [tasks]);
|
|
15590
|
-
const collapsedParentIds =
|
|
15653
|
+
const collapsedParentIds = useMemo14(() => {
|
|
15591
15654
|
if (externalCollapsedParentIds) return externalCollapsedParentIds;
|
|
15592
15655
|
const ids = new Set(internalCollapsedParentIds);
|
|
15593
15656
|
for (const task of normalizedTasks) {
|
|
@@ -15595,22 +15658,22 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15595
15658
|
}
|
|
15596
15659
|
return ids;
|
|
15597
15660
|
}, [externalCollapsedParentIds, internalCollapsedParentIds, normalizedTasks, expandedCompositeIds]);
|
|
15598
|
-
const controlledScheduleIdentity =
|
|
15661
|
+
const controlledScheduleIdentity = useMemo14(
|
|
15599
15662
|
() => buildControlledScheduleIdentity(normalizedTasks),
|
|
15600
15663
|
[normalizedTasks]
|
|
15601
15664
|
);
|
|
15602
15665
|
const previousControlledScheduleIdentityRef = useRef13(null);
|
|
15603
15666
|
const controlledScheduleChanged = previousControlledScheduleIdentityRef.current !== null && previousControlledScheduleIdentityRef.current !== controlledScheduleIdentity;
|
|
15604
15667
|
const [previewTasksById, setPreviewTasksById] = useState13(/* @__PURE__ */ new Map());
|
|
15605
|
-
const previewNormalizedTasks =
|
|
15668
|
+
const previewNormalizedTasks = useMemo14(() => {
|
|
15606
15669
|
if (controlledScheduleChanged || previewTasksById.size === 0) return normalizedTasks;
|
|
15607
15670
|
return normalizedTasks.map((task) => previewTasksById.get(task.id) ?? task);
|
|
15608
15671
|
}, [controlledScheduleChanged, normalizedTasks, previewTasksById]);
|
|
15609
|
-
const isCustomWeekend =
|
|
15672
|
+
const isCustomWeekend = useMemo14(
|
|
15610
15673
|
() => createCustomDayPredicate({ customDays, isWeekend: isWeekend3 }),
|
|
15611
15674
|
[customDays, isWeekend3]
|
|
15612
15675
|
);
|
|
15613
|
-
const criticalTaskIds =
|
|
15676
|
+
const criticalTaskIds = useMemo14(() => {
|
|
15614
15677
|
if (!criticalPathMode) return /* @__PURE__ */ new Set();
|
|
15615
15678
|
const leafCritical = computeCriticalPath(previewNormalizedTasks, {
|
|
15616
15679
|
businessDays,
|
|
@@ -15618,7 +15681,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15618
15681
|
});
|
|
15619
15682
|
return extendCriticalIdsToParents(leafCritical, previewNormalizedTasks);
|
|
15620
15683
|
}, [criticalPathMode, previewNormalizedTasks, businessDays, isCustomWeekend]);
|
|
15621
|
-
const dateRangeTasks =
|
|
15684
|
+
const dateRangeTasks = useMemo14(() => {
|
|
15622
15685
|
if (isPlanFactMode) {
|
|
15623
15686
|
return getPlanFactRangeTasks(normalizedTasks);
|
|
15624
15687
|
}
|
|
@@ -15638,7 +15701,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15638
15701
|
}
|
|
15639
15702
|
return rangeTasks;
|
|
15640
15703
|
}, [isPlanFactMode, normalizedTasks, showBaseline]);
|
|
15641
|
-
const dateRange =
|
|
15704
|
+
const dateRange = useMemo14(
|
|
15642
15705
|
() => {
|
|
15643
15706
|
if (!isPlanFactMode && explicitDateRange) {
|
|
15644
15707
|
const exactDays = getDateRangeDays(explicitDateRange);
|
|
@@ -15650,19 +15713,19 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15650
15713
|
);
|
|
15651
15714
|
const [validationResult, setValidationResult] = useState13(null);
|
|
15652
15715
|
const [cascadeOverrides, setCascadeOverrides] = useState13(/* @__PURE__ */ new Map());
|
|
15653
|
-
const gridWidth =
|
|
15716
|
+
const gridWidth = useMemo14(
|
|
15654
15717
|
() => Math.round(dateRange.length * dayWidth),
|
|
15655
15718
|
[dateRange.length, dayWidth]
|
|
15656
15719
|
);
|
|
15657
15720
|
const renderGridWidth = Math.max(gridWidth, skeletonRowCount > 0 ? 720 : 0);
|
|
15658
|
-
const matrixWidth =
|
|
15721
|
+
const matrixWidth = useMemo14(
|
|
15659
15722
|
() => matrixColumns.reduce((sum, column) => {
|
|
15660
15723
|
if (typeof column.width !== "number") return void 0;
|
|
15661
15724
|
return sum !== void 0 ? sum + column.width : void 0;
|
|
15662
15725
|
}, 0),
|
|
15663
15726
|
[matrixColumns]
|
|
15664
15727
|
);
|
|
15665
|
-
const visibleTasks =
|
|
15728
|
+
const visibleTasks = useMemo14(() => {
|
|
15666
15729
|
const parentMap = new Map(normalizedTasks.map((t) => [t.id, t.parentId]));
|
|
15667
15730
|
function isAnyAncestorCollapsed(parentId) {
|
|
15668
15731
|
let current = parentId;
|
|
@@ -15681,7 +15744,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15681
15744
|
}
|
|
15682
15745
|
return tasks2;
|
|
15683
15746
|
}, [normalizedTasks, collapsedParentIds, filterMode, taskFilter, criticalPathMode, criticalTaskIds]);
|
|
15684
|
-
const monthStart =
|
|
15747
|
+
const monthStart = useMemo14(() => {
|
|
15685
15748
|
if (dateRange.length === 0) {
|
|
15686
15749
|
return new Date(Date.UTC((/* @__PURE__ */ new Date()).getUTCFullYear(), (/* @__PURE__ */ new Date()).getUTCMonth(), 1));
|
|
15687
15750
|
}
|
|
@@ -15691,7 +15754,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15691
15754
|
}
|
|
15692
15755
|
return new Date(Date.UTC(firstDay.getUTCFullYear(), firstDay.getUTCMonth(), 1));
|
|
15693
15756
|
}, [dateRange, explicitDateRange, isPlanFactMode]);
|
|
15694
|
-
const activityLaneCounts =
|
|
15757
|
+
const activityLaneCounts = useMemo14(() => {
|
|
15695
15758
|
const counts = /* @__PURE__ */ new Map();
|
|
15696
15759
|
for (const task of visibleTasks) {
|
|
15697
15760
|
if (task.activities && task.activities.length > 0) {
|
|
@@ -15700,7 +15763,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15700
15763
|
}
|
|
15701
15764
|
return counts;
|
|
15702
15765
|
}, [visibleTasks, monthStart, dayWidth]);
|
|
15703
|
-
const compositeRowLayout =
|
|
15766
|
+
const compositeRowLayout = useMemo14(() => {
|
|
15704
15767
|
const compositeIds = new Set(normalizedTasks.filter((task) => task.composite).map((task) => task.id));
|
|
15705
15768
|
const tops = [];
|
|
15706
15769
|
const heights = [];
|
|
@@ -15713,15 +15776,15 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15713
15776
|
}
|
|
15714
15777
|
return { tops, heights, totalHeight: top };
|
|
15715
15778
|
}, [normalizedTasks, visibleTasks, effectiveRowHeight, activityLaneCounts]);
|
|
15716
|
-
const compositeParentsById =
|
|
15779
|
+
const compositeParentsById = useMemo14(
|
|
15717
15780
|
() => new Map(normalizedTasks.filter((task) => task.composite).map((task) => [task.id, task])),
|
|
15718
15781
|
[normalizedTasks]
|
|
15719
15782
|
);
|
|
15720
|
-
const matchedTaskIds =
|
|
15783
|
+
const matchedTaskIds = useMemo14(() => {
|
|
15721
15784
|
if (!taskFilter) return /* @__PURE__ */ new Set();
|
|
15722
15785
|
return new Set(visibleTasks.filter(taskFilter).map((task) => task.id));
|
|
15723
15786
|
}, [visibleTasks, taskFilter]);
|
|
15724
|
-
const taskListHighlightedTaskIds =
|
|
15787
|
+
const taskListHighlightedTaskIds = useMemo14(() => {
|
|
15725
15788
|
if (filterMode === "hide") {
|
|
15726
15789
|
return /* @__PURE__ */ new Set();
|
|
15727
15790
|
}
|
|
@@ -15737,12 +15800,12 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15737
15800
|
}
|
|
15738
15801
|
return mergedHighlightedTaskIds;
|
|
15739
15802
|
}, [filterMode, highlightedTaskIds, matchedTaskIds, criticalPathMode, criticalTaskIds]);
|
|
15740
|
-
const totalGridHeight =
|
|
15803
|
+
const totalGridHeight = useMemo14(
|
|
15741
15804
|
() => compositeRowLayout.totalHeight + Math.max(0, Math.floor(skeletonRowCount)) * effectiveRowHeight,
|
|
15742
15805
|
[compositeRowLayout.totalHeight, effectiveRowHeight, skeletonRowCount]
|
|
15743
15806
|
);
|
|
15744
15807
|
const timelineHeaderHeight = headerHeight + 1;
|
|
15745
|
-
const tableBodyMinHeight =
|
|
15808
|
+
const tableBodyMinHeight = useMemo14(() => {
|
|
15746
15809
|
if (!isTableMatrixMode && !isPlanFactMode || containerHeight === void 0) {
|
|
15747
15810
|
return void 0;
|
|
15748
15811
|
}
|
|
@@ -15751,12 +15814,12 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15751
15814
|
}
|
|
15752
15815
|
return `calc(${containerHeight} - ${timelineHeaderHeight}px)`;
|
|
15753
15816
|
}, [containerHeight, isPlanFactMode, isTableMatrixMode, timelineHeaderHeight]);
|
|
15754
|
-
const todayIndex =
|
|
15817
|
+
const todayIndex = useMemo14(() => {
|
|
15755
15818
|
const today = getTodayLocalUtcDate();
|
|
15756
15819
|
return dateRange.findIndex((day) => day.getTime() === today.getTime());
|
|
15757
15820
|
}, [dateRange]);
|
|
15758
15821
|
const todayInRange = todayIndex !== -1;
|
|
15759
|
-
const visibleTimelineMarkers =
|
|
15822
|
+
const visibleTimelineMarkers = useMemo14(() => {
|
|
15760
15823
|
if (isTableMatrixMode || !timelineMarkers || timelineMarkers.length === 0 || dateRange.length === 0) {
|
|
15761
15824
|
return [];
|
|
15762
15825
|
}
|
|
@@ -15767,7 +15830,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15767
15830
|
return markerDate >= rangeStartMs && markerDate <= rangeEndMs;
|
|
15768
15831
|
});
|
|
15769
15832
|
}, [dateRange, isTableMatrixMode, timelineMarkers]);
|
|
15770
|
-
|
|
15833
|
+
useEffect12(() => {
|
|
15771
15834
|
if (isTableMatrixMode) return;
|
|
15772
15835
|
if (hasAutoScrolledToTodayRef.current) return;
|
|
15773
15836
|
const container = scrollContainerRef.current;
|
|
@@ -15781,7 +15844,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15781
15844
|
container.scrollLeft = Math.max(0, scrollLeft);
|
|
15782
15845
|
hasAutoScrolledToTodayRef.current = true;
|
|
15783
15846
|
}, [dateRange, dayWidth, isTableMatrixMode]);
|
|
15784
|
-
|
|
15847
|
+
useEffect12(() => {
|
|
15785
15848
|
const container = scrollContainerRef.current;
|
|
15786
15849
|
if (!container) return;
|
|
15787
15850
|
let frameId = null;
|
|
@@ -15918,7 +15981,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15918
15981
|
}, [effectiveRowHeight, compositeRowLayout, tasks, visibleTasks]);
|
|
15919
15982
|
const [dragGuideLines, setDragGuideLines] = useState13(null);
|
|
15920
15983
|
const [draggedTaskOverride, setDraggedTaskOverride] = useState13(null);
|
|
15921
|
-
|
|
15984
|
+
useEffect12(() => {
|
|
15922
15985
|
const previousIdentity = previousControlledScheduleIdentityRef.current;
|
|
15923
15986
|
previousControlledScheduleIdentityRef.current = controlledScheduleIdentity;
|
|
15924
15987
|
if (previousIdentity === null || previousIdentity === controlledScheduleIdentity) {
|
|
@@ -15934,12 +15997,12 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15934
15997
|
setDraggedTaskOverride((current) => current === null ? current : null);
|
|
15935
15998
|
setDragGuideLines((current) => current === null ? current : null);
|
|
15936
15999
|
}, [controlledScheduleIdentity, previewPositionStore, activityPreviewStore, activityBlockStore, activityDragOwner, activityActivationStore]);
|
|
15937
|
-
|
|
16000
|
+
useEffect12(() => {
|
|
15938
16001
|
const result = validateDependencies(tasks);
|
|
15939
16002
|
setValidationResult(result);
|
|
15940
16003
|
onValidateDependencies?.(result);
|
|
15941
16004
|
}, [tasks, onValidateDependencies]);
|
|
15942
|
-
|
|
16005
|
+
useEffect12(() => () => {
|
|
15943
16006
|
if (clearSelectedTaskTimeoutRef.current !== null) {
|
|
15944
16007
|
window.clearTimeout(clearSelectedTaskTimeoutRef.current);
|
|
15945
16008
|
}
|
|
@@ -16143,7 +16206,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16143
16206
|
}
|
|
16144
16207
|
onTasksChange?.(normalized);
|
|
16145
16208
|
}, [onTasksChange, onReorder]);
|
|
16146
|
-
const dependencyOverrides =
|
|
16209
|
+
const dependencyOverrides = useMemo14(() => {
|
|
16147
16210
|
if (controlledScheduleChanged) return /* @__PURE__ */ new Map();
|
|
16148
16211
|
const map = new Map(cascadeOverrides);
|
|
16149
16212
|
if (draggedTaskOverride) {
|
|
@@ -16169,22 +16232,22 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16169
16232
|
return arePreviewTaskMapsEqual(current, next) ? current : next;
|
|
16170
16233
|
});
|
|
16171
16234
|
}, [previewPositionStore]);
|
|
16172
|
-
const previewVisibleTasks =
|
|
16235
|
+
const previewVisibleTasks = useMemo14(() => {
|
|
16173
16236
|
if (controlledScheduleChanged || previewTasksById.size === 0) return visibleTasks;
|
|
16174
16237
|
return visibleTasks.map((task) => previewTasksById.get(task.id) ?? task);
|
|
16175
16238
|
}, [controlledScheduleChanged, visibleTasks, previewTasksById]);
|
|
16176
|
-
const visibleTaskIndexMap =
|
|
16239
|
+
const visibleTaskIndexMap = useMemo14(
|
|
16177
16240
|
() => new Map(visibleTasks.map((task, index) => [task.id, index])),
|
|
16178
16241
|
[visibleTasks]
|
|
16179
16242
|
);
|
|
16180
|
-
const forcedRenderedTaskIds =
|
|
16243
|
+
const forcedRenderedTaskIds = useMemo14(() => {
|
|
16181
16244
|
const ids = /* @__PURE__ */ new Set();
|
|
16182
16245
|
if (draggedTaskOverride) {
|
|
16183
16246
|
ids.add(draggedTaskOverride.taskId);
|
|
16184
16247
|
}
|
|
16185
16248
|
return ids;
|
|
16186
16249
|
}, [draggedTaskOverride]);
|
|
16187
|
-
const horizontalWindow =
|
|
16250
|
+
const horizontalWindow = useMemo14(() => {
|
|
16188
16251
|
const width = scrollViewport.viewportWidth;
|
|
16189
16252
|
if (width <= 0) return void 0;
|
|
16190
16253
|
const left = scrollViewport.chartScrollLeft;
|
|
@@ -16193,7 +16256,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16193
16256
|
endPx: left + width + HORIZONTAL_WINDOW_OVERSCAN_PX
|
|
16194
16257
|
};
|
|
16195
16258
|
}, [scrollViewport.chartScrollLeft, scrollViewport.viewportWidth]);
|
|
16196
|
-
const visibleTaskWindowIndices =
|
|
16259
|
+
const visibleTaskWindowIndices = useMemo14(() => {
|
|
16197
16260
|
const totalTasks = visibleTasks.length;
|
|
16198
16261
|
if (totalTasks === 0) {
|
|
16199
16262
|
return [];
|
|
@@ -16235,7 +16298,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16235
16298
|
}
|
|
16236
16299
|
return Array.from(indices).sort((left, right) => left - right);
|
|
16237
16300
|
}, [compositeRowLayout, forceFullRenderForPrint, forcedRenderedTaskIds, scrollViewport, visibleTaskIndexMap, visibleTasks.length]);
|
|
16238
|
-
const visiblePlanFactDateIndices =
|
|
16301
|
+
const visiblePlanFactDateIndices = useMemo14(() => {
|
|
16239
16302
|
if (forceFullRenderForPrint) {
|
|
16240
16303
|
return void 0;
|
|
16241
16304
|
}
|
|
@@ -16248,18 +16311,18 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16248
16311
|
(_, index) => window2.start + index
|
|
16249
16312
|
);
|
|
16250
16313
|
}, [dateRange.length, forceFullRenderForPrint, isPlanFactMode, planFactDateWindow]);
|
|
16251
|
-
const renderedChartTasks =
|
|
16314
|
+
const renderedChartTasks = useMemo14(
|
|
16252
16315
|
() => visibleTaskWindowIndices.map((index) => {
|
|
16253
16316
|
const task = previewVisibleTasks[index];
|
|
16254
16317
|
return task ? { index, task } : null;
|
|
16255
16318
|
}).filter((entry) => entry !== null),
|
|
16256
16319
|
[previewVisibleTasks, visibleTaskWindowIndices]
|
|
16257
16320
|
);
|
|
16258
|
-
const renderedDependencyTasks =
|
|
16321
|
+
const renderedDependencyTasks = useMemo14(
|
|
16259
16322
|
() => renderedChartTasks.map(({ task }) => task),
|
|
16260
16323
|
[renderedChartTasks]
|
|
16261
16324
|
);
|
|
16262
|
-
renderedTaskIdsRef.current =
|
|
16325
|
+
renderedTaskIdsRef.current = useMemo14(
|
|
16263
16326
|
() => new Set(renderedChartTasks.map(({ task }) => task.id)),
|
|
16264
16327
|
[renderedChartTasks]
|
|
16265
16328
|
);
|
|
@@ -16338,7 +16401,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16338
16401
|
lastCompositeBarToggleRef.current = { id: taskId, time: now, source };
|
|
16339
16402
|
handleToggleCollapse(taskId);
|
|
16340
16403
|
};
|
|
16341
|
-
const allParentIds =
|
|
16404
|
+
const allParentIds = useMemo14(() => {
|
|
16342
16405
|
const taskIds = new Set(normalizedTasks.map((task) => task.id));
|
|
16343
16406
|
return new Set(normalizedTasks.map((task) => task.parentId).filter((parentId) => Boolean(parentId && taskIds.has(parentId))));
|
|
16344
16407
|
}, [normalizedTasks]);
|
|
@@ -16551,7 +16614,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16551
16614
|
container.style.cursor = "grabbing";
|
|
16552
16615
|
e.preventDefault();
|
|
16553
16616
|
}, [activityActivationStore]);
|
|
16554
|
-
|
|
16617
|
+
useEffect12(() => {
|
|
16555
16618
|
const flushPanMove = () => {
|
|
16556
16619
|
const pan = panStateRef.current;
|
|
16557
16620
|
if (!pan?.active) return;
|
|
@@ -16594,12 +16657,12 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16594
16657
|
window.removeEventListener("mouseup", handlePanEnd);
|
|
16595
16658
|
};
|
|
16596
16659
|
}, []);
|
|
16597
|
-
return /* @__PURE__ */
|
|
16660
|
+
return /* @__PURE__ */ jsx22(
|
|
16598
16661
|
"div",
|
|
16599
16662
|
{
|
|
16600
16663
|
ref: containerRef,
|
|
16601
16664
|
className: isTableMatrixMode ? "gantt-container gantt-container-tableMatrix" : isPlanFactMode ? "gantt-container gantt-container-planFact" : "gantt-container",
|
|
16602
|
-
children: /* @__PURE__ */
|
|
16665
|
+
children: /* @__PURE__ */ jsx22(
|
|
16603
16666
|
"div",
|
|
16604
16667
|
{
|
|
16605
16668
|
ref: scrollContainerRef,
|
|
@@ -16614,7 +16677,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16614
16677
|
onMouseOver: handleSharedRowHover,
|
|
16615
16678
|
onMouseLeave: clearHoveredRows,
|
|
16616
16679
|
children: [
|
|
16617
|
-
/* @__PURE__ */
|
|
16680
|
+
/* @__PURE__ */ jsx22(
|
|
16618
16681
|
TaskList,
|
|
16619
16682
|
{
|
|
16620
16683
|
tasks: normalizedTasks,
|
|
@@ -16680,7 +16743,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16680
16743
|
skeletonRowCount
|
|
16681
16744
|
}
|
|
16682
16745
|
),
|
|
16683
|
-
/* @__PURE__ */
|
|
16746
|
+
/* @__PURE__ */ jsx22(
|
|
16684
16747
|
"div",
|
|
16685
16748
|
{
|
|
16686
16749
|
className: isTableMatrixMode || isPlanFactMode || showChart ? "gantt-chartSurface" : "gantt-chartSurface gantt-chart-hidden",
|
|
@@ -16690,7 +16753,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16690
16753
|
flex: isTableMatrixMode || isPlanFactMode ? "0 0 auto" : 1,
|
|
16691
16754
|
display: isTableMatrixMode || isPlanFactMode || showChart ? void 0 : "none"
|
|
16692
16755
|
},
|
|
16693
|
-
children: isTableMatrixMode ? /* @__PURE__ */
|
|
16756
|
+
children: isTableMatrixMode ? /* @__PURE__ */ jsx22(
|
|
16694
16757
|
TableMatrix,
|
|
16695
16758
|
{
|
|
16696
16759
|
tasks: visibleTasks,
|
|
@@ -16708,7 +16771,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16708
16771
|
filterMode,
|
|
16709
16772
|
visibleRowIndices: visibleTaskWindowIndices
|
|
16710
16773
|
}
|
|
16711
|
-
) : isPlanFactMode ? /* @__PURE__ */
|
|
16774
|
+
) : isPlanFactMode ? /* @__PURE__ */ jsx22(
|
|
16712
16775
|
PlanFactMatrix,
|
|
16713
16776
|
{
|
|
16714
16777
|
tasks: visibleTasks,
|
|
@@ -16736,7 +16799,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16736
16799
|
className: "gantt-stickyHeader",
|
|
16737
16800
|
style: { width: `${renderGridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
16738
16801
|
children: [
|
|
16739
|
-
/* @__PURE__ */
|
|
16802
|
+
/* @__PURE__ */ jsx22(
|
|
16740
16803
|
TimeScaleHeader_default,
|
|
16741
16804
|
{
|
|
16742
16805
|
days: dateRange,
|
|
@@ -16749,7 +16812,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16749
16812
|
onTimelineHoverEnd: () => setActiveTimelineTooltip(null)
|
|
16750
16813
|
}
|
|
16751
16814
|
),
|
|
16752
|
-
activeTimelineTooltip && /* @__PURE__ */
|
|
16815
|
+
activeTimelineTooltip && /* @__PURE__ */ jsx22("div", { className: "gantt-timelineTooltipLayer", "aria-hidden": "true", children: /* @__PURE__ */ jsx22(
|
|
16753
16816
|
"div",
|
|
16754
16817
|
{
|
|
16755
16818
|
className: "gantt-timelineTooltip",
|
|
@@ -16773,7 +16836,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16773
16836
|
height: `${totalGridHeight}px`
|
|
16774
16837
|
},
|
|
16775
16838
|
children: [
|
|
16776
|
-
/* @__PURE__ */
|
|
16839
|
+
/* @__PURE__ */ jsx22(
|
|
16777
16840
|
GridBackground_default,
|
|
16778
16841
|
{
|
|
16779
16842
|
dateRange,
|
|
@@ -16784,7 +16847,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16784
16847
|
horizontalWindow
|
|
16785
16848
|
}
|
|
16786
16849
|
),
|
|
16787
|
-
todayInRange && /* @__PURE__ */
|
|
16850
|
+
todayInRange && /* @__PURE__ */ jsx22(
|
|
16788
16851
|
TodayIndicator_default,
|
|
16789
16852
|
{
|
|
16790
16853
|
monthStart,
|
|
@@ -16793,7 +16856,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16793
16856
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
16794
16857
|
}
|
|
16795
16858
|
),
|
|
16796
|
-
visibleTimelineMarkers.length > 0 && /* @__PURE__ */
|
|
16859
|
+
visibleTimelineMarkers.length > 0 && /* @__PURE__ */ jsx22(
|
|
16797
16860
|
TimelineMarkers_default,
|
|
16798
16861
|
{
|
|
16799
16862
|
rangeStart: monthStart,
|
|
@@ -16804,7 +16867,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16804
16867
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
16805
16868
|
}
|
|
16806
16869
|
),
|
|
16807
|
-
/* @__PURE__ */
|
|
16870
|
+
showActivityLinks && activityDependencies !== void 0 && /* @__PURE__ */ jsx22(ActivityDependencyLines, { tasks: visibleTasks, renderedTaskIds: renderedTaskIdsRef.current, dependencies: activityDependencies, highlight: activityDependencyHighlight, monthStart, dayWidth, rowHeight: effectiveRowHeight, gridWidth: renderGridWidth, totalHeight: totalGridHeight, rowIndexByTaskId: visibleTaskIndexMap, rowTops: compositeRowLayout.tops, rowHeights: compositeRowLayout.heights, showLag: showActivityLag, previewStore: activityPreviewStore, horizontalWindow }),
|
|
16871
|
+
/* @__PURE__ */ jsx22(
|
|
16808
16872
|
DependencyLines_default,
|
|
16809
16873
|
{
|
|
16810
16874
|
tasks: renderedDependencyTasks,
|
|
@@ -16835,8 +16899,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16835
16899
|
role: "dialog",
|
|
16836
16900
|
"aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0432\u044F\u0437\u044C\u044E",
|
|
16837
16901
|
children: [
|
|
16838
|
-
/* @__PURE__ */
|
|
16839
|
-
!disableDependencyEditing && /* @__PURE__ */
|
|
16902
|
+
/* @__PURE__ */ jsx22("span", { className: "gantt-dependencyLineMenuType", children: dependencyLineMenu.linkType === "FS" ? "\u041E\u041D" : dependencyLineMenu.linkType === "SS" ? "\u041D\u041D" : dependencyLineMenu.linkType === "FF" ? "\u041E\u041E" : "\u041D\u041E" }),
|
|
16903
|
+
!disableDependencyEditing && /* @__PURE__ */ jsx22(
|
|
16840
16904
|
"button",
|
|
16841
16905
|
{
|
|
16842
16906
|
type: "button",
|
|
@@ -16858,15 +16922,15 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16858
16922
|
strokeLinejoin: "round",
|
|
16859
16923
|
"aria-hidden": "true",
|
|
16860
16924
|
children: [
|
|
16861
|
-
/* @__PURE__ */
|
|
16862
|
-
/* @__PURE__ */
|
|
16863
|
-
/* @__PURE__ */
|
|
16925
|
+
/* @__PURE__ */ jsx22("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
16926
|
+
/* @__PURE__ */ jsx22("path", { d: "M3 6h18" }),
|
|
16927
|
+
/* @__PURE__ */ jsx22("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
16864
16928
|
]
|
|
16865
16929
|
}
|
|
16866
16930
|
)
|
|
16867
16931
|
}
|
|
16868
16932
|
),
|
|
16869
|
-
/* @__PURE__ */
|
|
16933
|
+
/* @__PURE__ */ jsx22(
|
|
16870
16934
|
"button",
|
|
16871
16935
|
{
|
|
16872
16936
|
type: "button",
|
|
@@ -16880,7 +16944,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16880
16944
|
]
|
|
16881
16945
|
}
|
|
16882
16946
|
),
|
|
16883
|
-
/* @__PURE__ */
|
|
16947
|
+
/* @__PURE__ */ jsx22(
|
|
16884
16948
|
DependencyCreationOverlay,
|
|
16885
16949
|
{
|
|
16886
16950
|
drag: dependencyCreationDrag,
|
|
@@ -16888,8 +16952,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16888
16952
|
height: totalGridHeight
|
|
16889
16953
|
}
|
|
16890
16954
|
),
|
|
16891
|
-
dependencyCreationError && /* @__PURE__ */
|
|
16892
|
-
dragGuideLines && /* @__PURE__ */
|
|
16955
|
+
dependencyCreationError && /* @__PURE__ */ jsx22("div", { className: "gantt-dependencyCreation-error", role: "status", children: dependencyCreationError }),
|
|
16956
|
+
dragGuideLines && /* @__PURE__ */ jsx22(
|
|
16893
16957
|
DragGuideLines_default,
|
|
16894
16958
|
{
|
|
16895
16959
|
isDragging: dragGuideLines.isDragging,
|
|
@@ -16900,7 +16964,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16900
16964
|
top: Math.max(0, scrollViewport.scrollTop)
|
|
16901
16965
|
}
|
|
16902
16966
|
),
|
|
16903
|
-
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */
|
|
16967
|
+
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */ jsx22(
|
|
16904
16968
|
"div",
|
|
16905
16969
|
{
|
|
16906
16970
|
style: {
|
|
@@ -16910,7 +16974,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16910
16974
|
right: 0,
|
|
16911
16975
|
height: `${compositeRowLayout.heights[index]}px`
|
|
16912
16976
|
},
|
|
16913
|
-
children: /* @__PURE__ */
|
|
16977
|
+
children: /* @__PURE__ */ jsx22(
|
|
16914
16978
|
TaskRow_default,
|
|
16915
16979
|
{
|
|
16916
16980
|
task,
|
|
@@ -16946,7 +17010,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16946
17010
|
activityActivationStore,
|
|
16947
17011
|
activityClickToDrag,
|
|
16948
17012
|
activityActivationMode,
|
|
16949
|
-
showActivityLinks,
|
|
17013
|
+
showActivityLinks: showActivityLinks && activityDependencies === void 0,
|
|
16950
17014
|
showActivityLag,
|
|
16951
17015
|
activityTooltip,
|
|
16952
17016
|
horizontalWindow,
|
|
@@ -16975,7 +17039,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
16975
17039
|
},
|
|
16976
17040
|
task.id
|
|
16977
17041
|
)),
|
|
16978
|
-
/* @__PURE__ */
|
|
17042
|
+
/* @__PURE__ */ jsx22(
|
|
16979
17043
|
GenerationSkeleton_default,
|
|
16980
17044
|
{
|
|
16981
17045
|
count: skeletonRowCount,
|
|
@@ -17007,9 +17071,9 @@ var GanttChart = forwardRef(GanttChartInner);
|
|
|
17007
17071
|
GanttChart.displayName = "GanttChart";
|
|
17008
17072
|
|
|
17009
17073
|
// src/components/ui/Button.tsx
|
|
17010
|
-
import
|
|
17011
|
-
import { jsx as
|
|
17012
|
-
var Button =
|
|
17074
|
+
import React19 from "react";
|
|
17075
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
17076
|
+
var Button = React19.forwardRef(
|
|
17013
17077
|
({ className, variant = "default", size = "default", children, ...props }, ref) => {
|
|
17014
17078
|
const classes = [
|
|
17015
17079
|
"gantt-btn",
|
|
@@ -17017,7 +17081,7 @@ var Button = React18.forwardRef(
|
|
|
17017
17081
|
size !== "default" ? `gantt-btn-${size}` : "",
|
|
17018
17082
|
className || ""
|
|
17019
17083
|
].filter(Boolean).join(" ");
|
|
17020
|
-
return /* @__PURE__ */
|
|
17084
|
+
return /* @__PURE__ */ jsx23("button", { ref, className: classes, ...props, children });
|
|
17021
17085
|
}
|
|
17022
17086
|
);
|
|
17023
17087
|
Button.displayName = "Button";
|