gantt-lib 0.131.1 → 0.132.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 +1 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +309 -218
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +255 -165
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +105 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8520,6 +8520,55 @@ var NewTaskRow = ({
|
|
|
8520
8520
|
] });
|
|
8521
8521
|
};
|
|
8522
8522
|
|
|
8523
|
+
// src/components/GenerationSkeleton/GenerationSkeleton.tsx
|
|
8524
|
+
import { Fragment as Fragment4, jsx as jsx16 } from "react/jsx-runtime";
|
|
8525
|
+
var MAX_SKELETON_ROWS = 200;
|
|
8526
|
+
function clampCount(count) {
|
|
8527
|
+
if (!Number.isFinite(count)) return 0;
|
|
8528
|
+
return Math.min(MAX_SKELETON_ROWS, Math.max(0, Math.floor(count)));
|
|
8529
|
+
}
|
|
8530
|
+
var GenerationSkeletonRows = ({
|
|
8531
|
+
count,
|
|
8532
|
+
rowHeight,
|
|
8533
|
+
variant,
|
|
8534
|
+
startIndex = 0,
|
|
8535
|
+
taskListLayout,
|
|
8536
|
+
chartDayWidth = 40
|
|
8537
|
+
}) => {
|
|
8538
|
+
const safeCount = clampCount(count);
|
|
8539
|
+
if (safeCount === 0) return null;
|
|
8540
|
+
return /* @__PURE__ */ jsx16(
|
|
8541
|
+
"div",
|
|
8542
|
+
{
|
|
8543
|
+
className: `gantt-generation-skeleton gantt-generation-skeleton-${variant}`,
|
|
8544
|
+
"aria-hidden": "true",
|
|
8545
|
+
style: taskListLayout ? {
|
|
8546
|
+
"--skeleton-name-left": `${taskListLayout.nameLeft}px`,
|
|
8547
|
+
"--skeleton-name-width": `${taskListLayout.nameWidth}px`
|
|
8548
|
+
} : void 0,
|
|
8549
|
+
children: Array.from({ length: safeCount }, (_, index) => {
|
|
8550
|
+
const rowIndex = startIndex + index;
|
|
8551
|
+
const parentShape = rowIndex % 4 === 0;
|
|
8552
|
+
const shortShape = rowIndex % 3 === 1;
|
|
8553
|
+
const mediumShape = rowIndex % 3 === 2;
|
|
8554
|
+
const chartBarDays = 5 + rowIndex % 6;
|
|
8555
|
+
const chartBarStyle = variant === "chart" ? { width: `${chartBarDays * Math.max(1, chartDayWidth)}px` } : void 0;
|
|
8556
|
+
return /* @__PURE__ */ jsx16(
|
|
8557
|
+
"div",
|
|
8558
|
+
{
|
|
8559
|
+
className: "gantt-generation-skeleton-row",
|
|
8560
|
+
style: { top: `${rowIndex * rowHeight}px`, height: `${rowHeight}px` },
|
|
8561
|
+
children: variant === "task-list" ? /* @__PURE__ */ jsx16(Fragment4, { children: /* @__PURE__ */ jsx16("span", { className: `gantt-generation-skeleton-label ${shortShape ? "gantt-generation-skeleton-label-short" : ""} ${mediumShape ? "gantt-generation-skeleton-label-medium" : ""}` }) }) : /* @__PURE__ */ jsx16("span", { className: `gantt-generation-skeleton-bar ${parentShape ? "gantt-generation-skeleton-bar-parent" : ""} ${shortShape ? "gantt-generation-skeleton-bar-short" : ""}`, style: chartBarStyle })
|
|
8562
|
+
},
|
|
8563
|
+
rowIndex
|
|
8564
|
+
);
|
|
8565
|
+
})
|
|
8566
|
+
}
|
|
8567
|
+
);
|
|
8568
|
+
};
|
|
8569
|
+
GenerationSkeletonRows.displayName = "GenerationSkeletonRows";
|
|
8570
|
+
var GenerationSkeleton_default = GenerationSkeletonRows;
|
|
8571
|
+
|
|
8523
8572
|
// src/components/TaskList/columns/createBuiltInColumns.tsx
|
|
8524
8573
|
var BUILT_IN_COLUMN_WIDTHS = {
|
|
8525
8574
|
selection: 36,
|
|
@@ -8607,7 +8656,7 @@ function resolveTaskListColumns(builtIn, custom, hiddenColumnIds = []) {
|
|
|
8607
8656
|
}
|
|
8608
8657
|
|
|
8609
8658
|
// src/components/TaskList/TaskList.tsx
|
|
8610
|
-
import { jsx as
|
|
8659
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
8611
8660
|
var LINK_TYPE_ORDER2 = ["FS", "SS", "FF", "SF"];
|
|
8612
8661
|
var MIN_TASK_LIST_WIDTH = 530;
|
|
8613
8662
|
var DEFAULT_COLUMN_MIN_WIDTH = 40;
|
|
@@ -8745,7 +8794,7 @@ var SelectAllCheckbox = ({
|
|
|
8745
8794
|
ref.current.indeterminate = indeterminate;
|
|
8746
8795
|
}
|
|
8747
8796
|
}, [indeterminate]);
|
|
8748
|
-
return /* @__PURE__ */
|
|
8797
|
+
return /* @__PURE__ */ jsx17(
|
|
8749
8798
|
"input",
|
|
8750
8799
|
{
|
|
8751
8800
|
ref,
|
|
@@ -8814,7 +8863,8 @@ var TaskList = ({
|
|
|
8814
8863
|
bodyMinHeight,
|
|
8815
8864
|
taskDateChangeMode = "preserve-duration",
|
|
8816
8865
|
onTaskDateChangeModeChange,
|
|
8817
|
-
visibleRowIndices
|
|
8866
|
+
visibleRowIndices,
|
|
8867
|
+
skeletonRowCount = 0
|
|
8818
8868
|
}) => {
|
|
8819
8869
|
const reorderDisabled = disableTaskListReorder || disableTaskDrag;
|
|
8820
8870
|
const [internalSelectedTaskIds, setInternalSelectedTaskIds] = useState7(/* @__PURE__ */ new Set());
|
|
@@ -8868,8 +8918,8 @@ var TaskList = ({
|
|
|
8868
8918
|
return tasks2;
|
|
8869
8919
|
}, [orderedTasks, collapsedParentIds, filterMode, filteredTaskIds, isFilterActive, criticalPathMode, criticalTaskIds]);
|
|
8870
8920
|
const totalHeight = useMemo9(
|
|
8871
|
-
() => visibleTasks.length * rowHeight,
|
|
8872
|
-
[visibleTasks.length
|
|
8921
|
+
() => (visibleTasks.length + Math.max(0, Math.floor(skeletonRowCount))) * rowHeight,
|
|
8922
|
+
[rowHeight, skeletonRowCount, visibleTasks.length]
|
|
8873
8923
|
);
|
|
8874
8924
|
const visibleTaskNumberMap = useMemo9(
|
|
8875
8925
|
() => Object.fromEntries(
|
|
@@ -9557,6 +9607,22 @@ var TaskList = ({
|
|
|
9557
9607
|
() => resolvedColumns.reduce((sum, col) => sum + (col.width ?? 120), 0),
|
|
9558
9608
|
[resolvedColumns]
|
|
9559
9609
|
);
|
|
9610
|
+
const generationSkeletonTaskListLayout = useMemo9(() => {
|
|
9611
|
+
let left = 0;
|
|
9612
|
+
const layout = {
|
|
9613
|
+
nameLeft: 40,
|
|
9614
|
+
nameWidth: 200
|
|
9615
|
+
};
|
|
9616
|
+
for (const column of resolvedColumns) {
|
|
9617
|
+
const width = column.width ?? 120;
|
|
9618
|
+
if (column.id === "name") {
|
|
9619
|
+
layout.nameLeft = left;
|
|
9620
|
+
layout.nameWidth = width;
|
|
9621
|
+
}
|
|
9622
|
+
left += width;
|
|
9623
|
+
}
|
|
9624
|
+
return layout;
|
|
9625
|
+
}, [resolvedColumns]);
|
|
9560
9626
|
const requestedTaskListWidth = taskListWidth ?? Math.min(MIN_TASK_LIST_WIDTH, resolvedColumnWidthTotal);
|
|
9561
9627
|
const effectiveTaskListWidth = Math.max(requestedTaskListWidth, resolvedColumnWidthTotal);
|
|
9562
9628
|
const tableHeaderHeight = headerHeight + 1;
|
|
@@ -9618,7 +9684,7 @@ var TaskList = ({
|
|
|
9618
9684
|
document.body.style.cursor = "col-resize";
|
|
9619
9685
|
document.body.style.userSelect = "none";
|
|
9620
9686
|
}, [resolvedColumns]);
|
|
9621
|
-
const renderResizeHandle = useCallback6((columnId) => /* @__PURE__ */
|
|
9687
|
+
const renderResizeHandle = useCallback6((columnId) => /* @__PURE__ */ jsx17(
|
|
9622
9688
|
"button",
|
|
9623
9689
|
{
|
|
9624
9690
|
type: "button",
|
|
@@ -9632,7 +9698,7 @@ var TaskList = ({
|
|
|
9632
9698
|
}
|
|
9633
9699
|
}
|
|
9634
9700
|
), [startColumnResize]);
|
|
9635
|
-
return /* @__PURE__ */
|
|
9701
|
+
return /* @__PURE__ */ jsx17(
|
|
9636
9702
|
"div",
|
|
9637
9703
|
{
|
|
9638
9704
|
ref: overlayRef,
|
|
@@ -9642,7 +9708,7 @@ var TaskList = ({
|
|
|
9642
9708
|
"--gantt-row-content-lines": String(Math.max(2, Math.floor(rowContentLines)))
|
|
9643
9709
|
},
|
|
9644
9710
|
children: /* @__PURE__ */ jsxs12("div", { className: "gantt-tl-table", children: [
|
|
9645
|
-
/* @__PURE__ */
|
|
9711
|
+
/* @__PURE__ */ jsx17("div", { className: "gantt-tl-header", style: { height: `${tableHeaderHeight}px` }, children: resolvedColumns.map((col) => {
|
|
9646
9712
|
if (col.id === "selection") {
|
|
9647
9713
|
return /* @__PURE__ */ jsxs12(
|
|
9648
9714
|
"div",
|
|
@@ -9651,7 +9717,7 @@ var TaskList = ({
|
|
|
9651
9717
|
"data-column-id": "selection",
|
|
9652
9718
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
9653
9719
|
children: [
|
|
9654
|
-
/* @__PURE__ */
|
|
9720
|
+
/* @__PURE__ */ jsx17(
|
|
9655
9721
|
SelectAllCheckbox,
|
|
9656
9722
|
{
|
|
9657
9723
|
checked: areAllVisibleTasksSelected,
|
|
@@ -9674,7 +9740,7 @@ var TaskList = ({
|
|
|
9674
9740
|
style: { width: col.width, minWidth: col.width, maxWidth: col.width, flex: `0 0 ${col.width}px`, position: "relative" },
|
|
9675
9741
|
children: [
|
|
9676
9742
|
/* @__PURE__ */ jsxs12(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
9677
|
-
/* @__PURE__ */
|
|
9743
|
+
/* @__PURE__ */ jsx17(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs12(
|
|
9678
9744
|
"button",
|
|
9679
9745
|
{
|
|
9680
9746
|
className: "gantt-tl-dep-type-trigger",
|
|
@@ -9687,7 +9753,7 @@ var TaskList = ({
|
|
|
9687
9753
|
]
|
|
9688
9754
|
}
|
|
9689
9755
|
) }),
|
|
9690
|
-
/* @__PURE__ */
|
|
9756
|
+
/* @__PURE__ */ jsx17(PopoverContent, { portal: true, align: "start", children: /* @__PURE__ */ jsx17("div", { className: "gantt-tl-dep-type-menu", children: LINK_TYPE_ORDER2.map((lt) => /* @__PURE__ */ jsxs12(
|
|
9691
9757
|
"button",
|
|
9692
9758
|
{
|
|
9693
9759
|
className: `gantt-tl-dep-type-option${activeLinkType === lt ? " active" : ""}`,
|
|
@@ -9697,13 +9763,13 @@ var TaskList = ({
|
|
|
9697
9763
|
},
|
|
9698
9764
|
children: [
|
|
9699
9765
|
React12.createElement(LINK_TYPE_ICONS[lt]),
|
|
9700
|
-
/* @__PURE__ */
|
|
9766
|
+
/* @__PURE__ */ jsx17("span", { children: LINK_TYPE_LABELS[lt] })
|
|
9701
9767
|
]
|
|
9702
9768
|
},
|
|
9703
9769
|
lt
|
|
9704
9770
|
)) }) })
|
|
9705
9771
|
] }),
|
|
9706
|
-
dependencyError && /* @__PURE__ */
|
|
9772
|
+
dependencyError && /* @__PURE__ */ jsx17("div", { className: "gantt-tl-dep-error", children: dependencyError }),
|
|
9707
9773
|
renderResizeHandle(col.id)
|
|
9708
9774
|
]
|
|
9709
9775
|
},
|
|
@@ -9751,7 +9817,7 @@ var TaskList = ({
|
|
|
9751
9817
|
position: "relative"
|
|
9752
9818
|
},
|
|
9753
9819
|
children: [
|
|
9754
|
-
shouldShowBeforeFirstDropZone && /* @__PURE__ */
|
|
9820
|
+
shouldShowBeforeFirstDropZone && /* @__PURE__ */ jsx17(
|
|
9755
9821
|
"div",
|
|
9756
9822
|
{
|
|
9757
9823
|
className: [
|
|
@@ -9768,7 +9834,7 @@ var TaskList = ({
|
|
|
9768
9834
|
const previousVisibleTask = index > 0 ? visibleTasks[index - 1] : void 0;
|
|
9769
9835
|
const canDemoteTask = index === 0 || !task.parentId || previousVisibleTask?.id !== task.parentId;
|
|
9770
9836
|
const topOffset = index * rowHeight + (hasVisiblePendingInsert && index > pendingInsertRowIndex ? rowHeight : 0);
|
|
9771
|
-
return /* @__PURE__ */
|
|
9837
|
+
return /* @__PURE__ */ jsx17(
|
|
9772
9838
|
"div",
|
|
9773
9839
|
{
|
|
9774
9840
|
style: {
|
|
@@ -9777,7 +9843,7 @@ var TaskList = ({
|
|
|
9777
9843
|
left: 0,
|
|
9778
9844
|
right: 0
|
|
9779
9845
|
},
|
|
9780
|
-
children: /* @__PURE__ */
|
|
9846
|
+
children: /* @__PURE__ */ jsx17(
|
|
9781
9847
|
TaskListRow,
|
|
9782
9848
|
{
|
|
9783
9849
|
task,
|
|
@@ -9851,7 +9917,7 @@ var TaskList = ({
|
|
|
9851
9917
|
task.id
|
|
9852
9918
|
);
|
|
9853
9919
|
}),
|
|
9854
|
-
hasVisiblePendingInsert && /* @__PURE__ */
|
|
9920
|
+
hasVisiblePendingInsert && /* @__PURE__ */ jsx17(
|
|
9855
9921
|
"div",
|
|
9856
9922
|
{
|
|
9857
9923
|
style: {
|
|
@@ -9860,7 +9926,7 @@ var TaskList = ({
|
|
|
9860
9926
|
left: 0,
|
|
9861
9927
|
right: 0
|
|
9862
9928
|
},
|
|
9863
|
-
children: /* @__PURE__ */
|
|
9929
|
+
children: /* @__PURE__ */ jsx17(
|
|
9864
9930
|
NewTaskRow,
|
|
9865
9931
|
{
|
|
9866
9932
|
rowHeight,
|
|
@@ -9870,11 +9936,21 @@ var TaskList = ({
|
|
|
9870
9936
|
}
|
|
9871
9937
|
)
|
|
9872
9938
|
}
|
|
9939
|
+
),
|
|
9940
|
+
/* @__PURE__ */ jsx17(
|
|
9941
|
+
GenerationSkeleton_default,
|
|
9942
|
+
{
|
|
9943
|
+
count: skeletonRowCount,
|
|
9944
|
+
rowHeight,
|
|
9945
|
+
variant: "task-list",
|
|
9946
|
+
startIndex: visibleTasks.length,
|
|
9947
|
+
taskListLayout: generationSkeletonTaskListLayout
|
|
9948
|
+
}
|
|
9873
9949
|
)
|
|
9874
9950
|
]
|
|
9875
9951
|
}
|
|
9876
9952
|
),
|
|
9877
|
-
isCreating && !pendingInsert && /* @__PURE__ */
|
|
9953
|
+
isCreating && !pendingInsert && /* @__PURE__ */ jsx17(
|
|
9878
9954
|
NewTaskRow,
|
|
9879
9955
|
{
|
|
9880
9956
|
rowHeight,
|
|
@@ -10377,7 +10453,7 @@ var useResourceItemDrag = ({
|
|
|
10377
10453
|
};
|
|
10378
10454
|
|
|
10379
10455
|
// src/components/ResourceTimelineChart/ResourceTimelineChart.tsx
|
|
10380
|
-
import { Fragment as
|
|
10456
|
+
import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
10381
10457
|
var DEFAULT_DAY_WIDTH = 40;
|
|
10382
10458
|
var DEFAULT_HEADER_HEIGHT = 40;
|
|
10383
10459
|
var DEFAULT_LANE_HEIGHT = 40;
|
|
@@ -10541,40 +10617,40 @@ var orderResourcesByType = (resources) => {
|
|
|
10541
10617
|
var ResourceTypeIcon = ({ type }) => {
|
|
10542
10618
|
if (type === "\u041B\u044E\u0434\u0438") {
|
|
10543
10619
|
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconPeople", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
10544
|
-
/* @__PURE__ */
|
|
10545
|
-
/* @__PURE__ */
|
|
10546
|
-
/* @__PURE__ */
|
|
10547
|
-
/* @__PURE__ */
|
|
10620
|
+
/* @__PURE__ */ jsx18("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
10621
|
+
/* @__PURE__ */ jsx18("circle", { cx: "9", cy: "7", r: "4" }),
|
|
10622
|
+
/* @__PURE__ */ jsx18("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
|
|
10623
|
+
/* @__PURE__ */ jsx18("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
10548
10624
|
] });
|
|
10549
10625
|
}
|
|
10550
10626
|
if (type === "\u041E\u0431\u043E\u0440\u0443\u0434\u043E\u0432\u0430\u043D\u0438\u0435") {
|
|
10551
10627
|
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconEquipment", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
10552
|
-
/* @__PURE__ */
|
|
10553
|
-
/* @__PURE__ */
|
|
10554
|
-
/* @__PURE__ */
|
|
10628
|
+
/* @__PURE__ */ jsx18("path", { d: "m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9" }),
|
|
10629
|
+
/* @__PURE__ */ jsx18("path", { d: "m18 15 4-4" }),
|
|
10630
|
+
/* @__PURE__ */ jsx18("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" })
|
|
10555
10631
|
] });
|
|
10556
10632
|
}
|
|
10557
10633
|
if (type === "\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u044B") {
|
|
10558
10634
|
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconMaterials", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
10559
|
-
/* @__PURE__ */
|
|
10560
|
-
/* @__PURE__ */
|
|
10561
|
-
/* @__PURE__ */
|
|
10635
|
+
/* @__PURE__ */ jsx18("path", { d: "M10 22v-8" }),
|
|
10636
|
+
/* @__PURE__ */ jsx18("path", { d: "M2.336 8.89 10 14l11.715-7.029" }),
|
|
10637
|
+
/* @__PURE__ */ jsx18("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" })
|
|
10562
10638
|
] });
|
|
10563
10639
|
}
|
|
10564
10640
|
return /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceTypeIcon gantt-resourceTimeline-resourceTypeIconOther", width: "16", height: "16", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
10565
|
-
/* @__PURE__ */
|
|
10566
|
-
/* @__PURE__ */
|
|
10567
|
-
/* @__PURE__ */
|
|
10641
|
+
/* @__PURE__ */ jsx18("circle", { cx: "12", cy: "12", r: "9" }),
|
|
10642
|
+
/* @__PURE__ */ jsx18("path", { d: "M12 8v4" }),
|
|
10643
|
+
/* @__PURE__ */ jsx18("path", { d: "M12 16h.01" })
|
|
10568
10644
|
] });
|
|
10569
10645
|
};
|
|
10570
|
-
var ResourceTypeDropdownIcon = () => /* @__PURE__ */
|
|
10571
|
-
var ResourceGroupChevronIcon = () => /* @__PURE__ */
|
|
10646
|
+
var ResourceTypeDropdownIcon = () => /* @__PURE__ */ jsx18("svg", { className: "gantt-resourceTimeline-resourceTypeDropdownIcon", width: "10", height: "10", viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M2 3.5 5 6.5 8 3.5" }) });
|
|
10647
|
+
var ResourceGroupChevronIcon = () => /* @__PURE__ */ jsx18("svg", { className: "gantt-resourceTimeline-resourceGroupChevronIcon", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M4 2.5 7.5 6 4 9.5" }) });
|
|
10572
10648
|
function isInactiveResourceStatus(status) {
|
|
10573
10649
|
return status?.trim().toLocaleLowerCase() === "inactive";
|
|
10574
10650
|
}
|
|
10575
10651
|
var ResourceStatusLockIcon = () => /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceStatusIcon", width: "12", height: "12", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
10576
|
-
/* @__PURE__ */
|
|
10577
|
-
/* @__PURE__ */
|
|
10652
|
+
/* @__PURE__ */ jsx18("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }),
|
|
10653
|
+
/* @__PURE__ */ jsx18("path", { d: "M8 11V8a4 4 0 1 1 8 0v3" })
|
|
10578
10654
|
] });
|
|
10579
10655
|
var ResourceHeader = ({
|
|
10580
10656
|
resource,
|
|
@@ -10675,10 +10751,10 @@ var ResourceHeader = ({
|
|
|
10675
10751
|
gridTemplateColumns: columnTemplate
|
|
10676
10752
|
},
|
|
10677
10753
|
children: [
|
|
10678
|
-
/* @__PURE__ */
|
|
10754
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceNumber", children: rowIndex + 1 }),
|
|
10679
10755
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceName", children: [
|
|
10680
10756
|
/* @__PURE__ */ jsxs13(Popover, { open: typeMenuOpen, onOpenChange: setTypeMenuOpen, children: [
|
|
10681
|
-
/* @__PURE__ */
|
|
10757
|
+
/* @__PURE__ */ jsx18(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs13(
|
|
10682
10758
|
"button",
|
|
10683
10759
|
{
|
|
10684
10760
|
type: "button",
|
|
@@ -10691,12 +10767,12 @@ var ResourceHeader = ({
|
|
|
10691
10767
|
setTypeMenuOpen((open) => !open);
|
|
10692
10768
|
},
|
|
10693
10769
|
children: [
|
|
10694
|
-
/* @__PURE__ */
|
|
10695
|
-
/* @__PURE__ */
|
|
10770
|
+
/* @__PURE__ */ jsx18(ResourceTypeIcon, { type }),
|
|
10771
|
+
/* @__PURE__ */ jsx18(ResourceTypeDropdownIcon, {})
|
|
10696
10772
|
]
|
|
10697
10773
|
}
|
|
10698
10774
|
) }),
|
|
10699
|
-
/* @__PURE__ */
|
|
10775
|
+
/* @__PURE__ */ jsx18(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_TYPE_OPTIONS.map((option) => /* @__PURE__ */ jsxs13(
|
|
10700
10776
|
"button",
|
|
10701
10777
|
{
|
|
10702
10778
|
type: "button",
|
|
@@ -10707,14 +10783,14 @@ var ResourceHeader = ({
|
|
|
10707
10783
|
applyResourcePatch({ type: option });
|
|
10708
10784
|
},
|
|
10709
10785
|
children: [
|
|
10710
|
-
/* @__PURE__ */
|
|
10786
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceOptionIcon", children: /* @__PURE__ */ jsx18(ResourceTypeIcon, { type: option }) }),
|
|
10711
10787
|
option
|
|
10712
10788
|
]
|
|
10713
10789
|
},
|
|
10714
10790
|
option
|
|
10715
10791
|
)) })
|
|
10716
10792
|
] }),
|
|
10717
|
-
editingName ? /* @__PURE__ */
|
|
10793
|
+
editingName ? /* @__PURE__ */ jsx18(
|
|
10718
10794
|
Input,
|
|
10719
10795
|
{
|
|
10720
10796
|
ref: nameInputRef,
|
|
@@ -10726,7 +10802,7 @@ var ResourceHeader = ({
|
|
|
10726
10802
|
"aria-label": `\u041D\u043E\u0432\u043E\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 ${resource.name}`,
|
|
10727
10803
|
className: "gantt-tl-name-input gantt-resourceTimeline-resourceNameInput"
|
|
10728
10804
|
}
|
|
10729
|
-
) : /* @__PURE__ */
|
|
10805
|
+
) : /* @__PURE__ */ jsx18(
|
|
10730
10806
|
"button",
|
|
10731
10807
|
{
|
|
10732
10808
|
type: "button",
|
|
@@ -10739,22 +10815,22 @@ var ResourceHeader = ({
|
|
|
10739
10815
|
},
|
|
10740
10816
|
onDoubleClick: handleNameDoubleClick,
|
|
10741
10817
|
children: /* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceNameContent", children: [
|
|
10742
|
-
isInactive && /* @__PURE__ */
|
|
10818
|
+
isInactive && /* @__PURE__ */ jsx18(
|
|
10743
10819
|
"span",
|
|
10744
10820
|
{
|
|
10745
10821
|
className: "gantt-resourceTimeline-resourceStatusMarker",
|
|
10746
10822
|
"aria-label": `\u0420\u0435\u0441\u0443\u0440\u0441 ${resource.name} \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D`,
|
|
10747
10823
|
title: "\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D",
|
|
10748
|
-
children: /* @__PURE__ */
|
|
10824
|
+
children: /* @__PURE__ */ jsx18(ResourceStatusLockIcon, {})
|
|
10749
10825
|
}
|
|
10750
10826
|
),
|
|
10751
|
-
/* @__PURE__ */
|
|
10827
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceNameText", children: resource.name })
|
|
10752
10828
|
] })
|
|
10753
10829
|
}
|
|
10754
10830
|
)
|
|
10755
10831
|
] }),
|
|
10756
10832
|
/* @__PURE__ */ jsxs13(Popover, { open: scopeMenuOpen, onOpenChange: setScopeMenuOpen, children: [
|
|
10757
|
-
/* @__PURE__ */
|
|
10833
|
+
/* @__PURE__ */ jsx18(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx18(
|
|
10758
10834
|
"button",
|
|
10759
10835
|
{
|
|
10760
10836
|
type: "button",
|
|
@@ -10765,10 +10841,10 @@ var ResourceHeader = ({
|
|
|
10765
10841
|
event.stopPropagation();
|
|
10766
10842
|
setScopeMenuOpen((open) => !open);
|
|
10767
10843
|
},
|
|
10768
|
-
children: /* @__PURE__ */
|
|
10844
|
+
children: /* @__PURE__ */ jsx18("span", { children: scopeLabel })
|
|
10769
10845
|
}
|
|
10770
10846
|
) }),
|
|
10771
|
-
/* @__PURE__ */
|
|
10847
|
+
/* @__PURE__ */ jsx18(PopoverContent, { className: "gantt-resourceTimeline-resourceOptionMenu", portal: true, align: "start", children: RESOURCE_SCOPE_OPTIONS.map((option) => /* @__PURE__ */ jsxs13(
|
|
10772
10848
|
"button",
|
|
10773
10849
|
{
|
|
10774
10850
|
type: "button",
|
|
@@ -10779,7 +10855,7 @@ var ResourceHeader = ({
|
|
|
10779
10855
|
applyResourcePatch({ scope: option });
|
|
10780
10856
|
},
|
|
10781
10857
|
children: [
|
|
10782
|
-
/* @__PURE__ */
|
|
10858
|
+
/* @__PURE__ */ jsx18("span", { className: `gantt-resourceTimeline-resourceOptionScopeDot gantt-resourceTimeline-resourceScope${option}` }),
|
|
10783
10859
|
RESOURCE_SCOPE_LABELS[option] ?? option
|
|
10784
10860
|
]
|
|
10785
10861
|
},
|
|
@@ -10793,21 +10869,21 @@ var ResourceHeader = ({
|
|
|
10793
10869
|
"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.`,
|
|
10794
10870
|
children: [
|
|
10795
10871
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceWorkedDays", children: [
|
|
10796
|
-
/* @__PURE__ */
|
|
10797
|
-
/* @__PURE__ */
|
|
10872
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: workedDays > 0 ? workedDays : "-" }),
|
|
10873
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceMetricLabel", children: workedDays > 0 ? "\u0434\u043D." : "" })
|
|
10798
10874
|
] }),
|
|
10799
10875
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceAssignmentCount", children: [
|
|
10800
|
-
/* @__PURE__ */
|
|
10876
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceMetricValue", children: assignmentCount > 0 ? assignmentCount : "" }),
|
|
10801
10877
|
assignmentCount > 0 && /* @__PURE__ */ jsxs13("svg", { className: "gantt-resourceTimeline-resourceAssignmentIcon", width: "14", height: "14", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
10802
|
-
/* @__PURE__ */
|
|
10803
|
-
/* @__PURE__ */
|
|
10878
|
+
/* @__PURE__ */ jsx18("rect", { width: "15", height: "5", x: "4", y: "5", rx: "2" }),
|
|
10879
|
+
/* @__PURE__ */ jsx18("rect", { width: "10", height: "5", x: "4", y: "14", rx: "2" })
|
|
10804
10880
|
] })
|
|
10805
10881
|
] })
|
|
10806
10882
|
]
|
|
10807
10883
|
}
|
|
10808
10884
|
),
|
|
10809
10885
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceActions", children: [
|
|
10810
|
-
conflictCount > 0 && /* @__PURE__ */
|
|
10886
|
+
conflictCount > 0 && /* @__PURE__ */ jsx18(
|
|
10811
10887
|
"button",
|
|
10812
10888
|
{
|
|
10813
10889
|
type: "button",
|
|
@@ -10822,7 +10898,7 @@ var ResourceHeader = ({
|
|
|
10822
10898
|
}
|
|
10823
10899
|
),
|
|
10824
10900
|
hasMenu && /* @__PURE__ */ jsxs13(Popover, { open: menuOpen, onOpenChange: setMenuOpen, children: [
|
|
10825
|
-
/* @__PURE__ */
|
|
10901
|
+
/* @__PURE__ */ jsx18(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx18(
|
|
10826
10902
|
"button",
|
|
10827
10903
|
{
|
|
10828
10904
|
className: "gantt-resourceTimeline-resourceMenuButton",
|
|
@@ -10832,10 +10908,10 @@ var ResourceHeader = ({
|
|
|
10832
10908
|
event.stopPropagation();
|
|
10833
10909
|
setMenuOpen((open) => !open);
|
|
10834
10910
|
},
|
|
10835
|
-
children: /* @__PURE__ */
|
|
10911
|
+
children: /* @__PURE__ */ jsx18("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
10836
10912
|
}
|
|
10837
10913
|
) }),
|
|
10838
|
-
/* @__PURE__ */
|
|
10914
|
+
/* @__PURE__ */ jsx18(PopoverContent, { className: "gantt-resourceTimeline-resourceMenu", portal: true, align: "end", children: visibleCommands.map((command) => /* @__PURE__ */ jsxs13(
|
|
10839
10915
|
"button",
|
|
10840
10916
|
{
|
|
10841
10917
|
type: "button",
|
|
@@ -10898,8 +10974,8 @@ var NewResourceRow = ({ height, onConfirm, onCancel, columnTemplate }) => {
|
|
|
10898
10974
|
gridTemplateColumns: columnTemplate
|
|
10899
10975
|
},
|
|
10900
10976
|
children: [
|
|
10901
|
-
/* @__PURE__ */
|
|
10902
|
-
/* @__PURE__ */
|
|
10977
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceNumber", children: "+" }),
|
|
10978
|
+
/* @__PURE__ */ jsx18(
|
|
10903
10979
|
Input,
|
|
10904
10980
|
{
|
|
10905
10981
|
ref: inputRef,
|
|
@@ -11078,7 +11154,7 @@ function ResourceTimelineChart({
|
|
|
11078
11154
|
document.body.style.cursor = "col-resize";
|
|
11079
11155
|
document.body.style.userSelect = "none";
|
|
11080
11156
|
}, [resolvedResourceColumnWidths]);
|
|
11081
|
-
const renderResizeHandle = useCallback8((columnId) => /* @__PURE__ */
|
|
11157
|
+
const renderResizeHandle = useCallback8((columnId) => /* @__PURE__ */ jsx18(
|
|
11082
11158
|
"button",
|
|
11083
11159
|
{
|
|
11084
11160
|
type: "button",
|
|
@@ -11389,7 +11465,7 @@ function ResourceTimelineChart({
|
|
|
11389
11465
|
}
|
|
11390
11466
|
};
|
|
11391
11467
|
}, []);
|
|
11392
|
-
return /* @__PURE__ */
|
|
11468
|
+
return /* @__PURE__ */ jsx18("div", { className: "gantt-container gantt-resourceTimeline", children: /* @__PURE__ */ jsx18(
|
|
11393
11469
|
"div",
|
|
11394
11470
|
{
|
|
11395
11471
|
ref: scrollContainerRef,
|
|
@@ -11421,12 +11497,12 @@ function ResourceTimelineChart({
|
|
|
11421
11497
|
"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",
|
|
11422
11498
|
renderResizeHandle("name")
|
|
11423
11499
|
] }),
|
|
11424
|
-
/* @__PURE__ */
|
|
11500
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceHeaderCell", "aria-label": "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u044C", children: renderResizeHandle("availability") }),
|
|
11425
11501
|
/* @__PURE__ */ jsxs13("span", { className: "gantt-resourceTimeline-resourceHeaderCell", children: [
|
|
11426
11502
|
"\u041D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F",
|
|
11427
11503
|
renderResizeHandle("assignments")
|
|
11428
11504
|
] }),
|
|
11429
|
-
/* @__PURE__ */
|
|
11505
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceHeaderCell gantt-resourceTimeline-resourceHeaderActions", "aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F", children: renderResizeHandle("actions") })
|
|
11430
11506
|
]
|
|
11431
11507
|
}
|
|
11432
11508
|
),
|
|
@@ -11437,7 +11513,7 @@ function ResourceTimelineChart({
|
|
|
11437
11513
|
className: "gantt-resourceTimeline-resourceGroupHeader",
|
|
11438
11514
|
style: { height: `${group.height}px` },
|
|
11439
11515
|
children: [
|
|
11440
|
-
/* @__PURE__ */
|
|
11516
|
+
/* @__PURE__ */ jsx18(
|
|
11441
11517
|
"button",
|
|
11442
11518
|
{
|
|
11443
11519
|
type: "button",
|
|
@@ -11448,12 +11524,12 @@ function ResourceTimelineChart({
|
|
|
11448
11524
|
event.stopPropagation();
|
|
11449
11525
|
toggleResourceGroupCollapsed(group.key);
|
|
11450
11526
|
},
|
|
11451
|
-
children: /* @__PURE__ */
|
|
11527
|
+
children: /* @__PURE__ */ jsx18(ResourceGroupChevronIcon, {})
|
|
11452
11528
|
}
|
|
11453
11529
|
),
|
|
11454
|
-
/* @__PURE__ */
|
|
11455
|
-
/* @__PURE__ */
|
|
11456
|
-
canAddResource && /* @__PURE__ */
|
|
11530
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceGroupTitle", children: group.label }),
|
|
11531
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resourceGroupCount", children: group.count }),
|
|
11532
|
+
canAddResource && /* @__PURE__ */ jsx18(
|
|
11457
11533
|
"button",
|
|
11458
11534
|
{
|
|
11459
11535
|
type: "button",
|
|
@@ -11472,7 +11548,7 @@ function ResourceTimelineChart({
|
|
|
11472
11548
|
),
|
|
11473
11549
|
displayLayout.rows.filter((row) => getResourceType(row.resource) === group.key).map((row) => {
|
|
11474
11550
|
const rowIndex = displayLayout.rows.findIndex((candidate) => candidate.resourceId === row.resourceId);
|
|
11475
|
-
return /* @__PURE__ */
|
|
11551
|
+
return /* @__PURE__ */ jsx18(
|
|
11476
11552
|
ResourceHeader,
|
|
11477
11553
|
{
|
|
11478
11554
|
resource: row.resource,
|
|
@@ -11492,7 +11568,7 @@ function ResourceTimelineChart({
|
|
|
11492
11568
|
row.resourceId
|
|
11493
11569
|
);
|
|
11494
11570
|
}),
|
|
11495
|
-
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */
|
|
11571
|
+
displayLayout.groupAddRows.some((row) => row.key === group.key) && /* @__PURE__ */ jsx18(
|
|
11496
11572
|
NewResourceRow,
|
|
11497
11573
|
{
|
|
11498
11574
|
height: resourceAddRowHeight,
|
|
@@ -11501,7 +11577,7 @@ function ResourceTimelineChart({
|
|
|
11501
11577
|
columnTemplate: resourceColumnTemplate
|
|
11502
11578
|
}
|
|
11503
11579
|
)
|
|
11504
|
-
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */
|
|
11580
|
+
] }, group.key)) : displayLayout.rows.map((row, rowIndex) => /* @__PURE__ */ jsx18(
|
|
11505
11581
|
ResourceHeader,
|
|
11506
11582
|
{
|
|
11507
11583
|
resource: row.resource,
|
|
@@ -11520,7 +11596,7 @@ function ResourceTimelineChart({
|
|
|
11520
11596
|
},
|
|
11521
11597
|
row.resourceId
|
|
11522
11598
|
)),
|
|
11523
|
-
canAddResource && (isCreatingResource ? /* @__PURE__ */
|
|
11599
|
+
canAddResource && (isCreatingResource ? /* @__PURE__ */ jsx18(
|
|
11524
11600
|
NewResourceRow,
|
|
11525
11601
|
{
|
|
11526
11602
|
height: resourceAddRowHeight,
|
|
@@ -11528,7 +11604,7 @@ function ResourceTimelineChart({
|
|
|
11528
11604
|
onCancel: handleCancelNewResource,
|
|
11529
11605
|
columnTemplate: resourceColumnTemplate
|
|
11530
11606
|
}
|
|
11531
|
-
) : /* @__PURE__ */
|
|
11607
|
+
) : /* @__PURE__ */ jsx18(
|
|
11532
11608
|
"button",
|
|
11533
11609
|
{
|
|
11534
11610
|
className: "gantt-resourceTimeline-addResourceButton",
|
|
@@ -11550,12 +11626,12 @@ function ResourceTimelineChart({
|
|
|
11550
11626
|
className: "gantt-resourceTimeline-chartSurface",
|
|
11551
11627
|
style: { minWidth: `${gridWidth}px` },
|
|
11552
11628
|
children: [
|
|
11553
|
-
/* @__PURE__ */
|
|
11629
|
+
/* @__PURE__ */ jsx18(
|
|
11554
11630
|
"div",
|
|
11555
11631
|
{
|
|
11556
11632
|
className: "gantt-resourceTimeline-stickyHeader",
|
|
11557
11633
|
style: { width: `${gridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
11558
|
-
children: /* @__PURE__ */
|
|
11634
|
+
children: /* @__PURE__ */ jsx18(
|
|
11559
11635
|
TimeScaleHeader_default,
|
|
11560
11636
|
{
|
|
11561
11637
|
days: dateRange,
|
|
@@ -11574,7 +11650,7 @@ function ResourceTimelineChart({
|
|
|
11574
11650
|
className: "gantt-resourceTimeline-grid",
|
|
11575
11651
|
style: { width: `${gridWidth}px`, height: `${displayTotalHeight}px` },
|
|
11576
11652
|
children: [
|
|
11577
|
-
/* @__PURE__ */
|
|
11653
|
+
/* @__PURE__ */ jsx18(
|
|
11578
11654
|
GridBackground_default,
|
|
11579
11655
|
{
|
|
11580
11656
|
dateRange,
|
|
@@ -11584,8 +11660,8 @@ function ResourceTimelineChart({
|
|
|
11584
11660
|
isCustomWeekend: weekendPredicate
|
|
11585
11661
|
}
|
|
11586
11662
|
),
|
|
11587
|
-
todayInRange && /* @__PURE__ */
|
|
11588
|
-
displayLayout.groupHeaders.map((group) => /* @__PURE__ */
|
|
11663
|
+
todayInRange && /* @__PURE__ */ jsx18(TodayIndicator_default, { monthStart, dayWidth }),
|
|
11664
|
+
displayLayout.groupHeaders.map((group) => /* @__PURE__ */ jsx18(
|
|
11589
11665
|
"div",
|
|
11590
11666
|
{
|
|
11591
11667
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-groupRow",
|
|
@@ -11597,7 +11673,7 @@ function ResourceTimelineChart({
|
|
|
11597
11673
|
},
|
|
11598
11674
|
`group-row-${group.key}`
|
|
11599
11675
|
)),
|
|
11600
|
-
displayLayout.rows.map((row) => /* @__PURE__ */
|
|
11676
|
+
displayLayout.rows.map((row) => /* @__PURE__ */ jsx18(
|
|
11601
11677
|
"div",
|
|
11602
11678
|
{
|
|
11603
11679
|
className: "gantt-resourceTimeline-row",
|
|
@@ -11609,7 +11685,7 @@ function ResourceTimelineChart({
|
|
|
11609
11685
|
},
|
|
11610
11686
|
row.resourceId
|
|
11611
11687
|
)),
|
|
11612
|
-
canAddResource && /* @__PURE__ */
|
|
11688
|
+
canAddResource && /* @__PURE__ */ jsx18(
|
|
11613
11689
|
"div",
|
|
11614
11690
|
{
|
|
11615
11691
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -11620,7 +11696,7 @@ function ResourceTimelineChart({
|
|
|
11620
11696
|
}
|
|
11621
11697
|
}
|
|
11622
11698
|
),
|
|
11623
|
-
displayLayout.groupAddRows.map((row) => /* @__PURE__ */
|
|
11699
|
+
displayLayout.groupAddRows.map((row) => /* @__PURE__ */ jsx18(
|
|
11624
11700
|
"div",
|
|
11625
11701
|
{
|
|
11626
11702
|
className: "gantt-resourceTimeline-row gantt-resourceTimeline-rowNew",
|
|
@@ -11719,11 +11795,11 @@ function ResourceTimelineChart({
|
|
|
11719
11795
|
backgroundColor: layoutItem.item.color ?? "var(--gantt-task-bar-default-color, #3b82f6)"
|
|
11720
11796
|
},
|
|
11721
11797
|
children: [
|
|
11722
|
-
!readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(
|
|
11723
|
-
/* @__PURE__ */
|
|
11724
|
-
/* @__PURE__ */
|
|
11798
|
+
!readonly && !layoutItem.item.locked && /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
11799
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleStart" }),
|
|
11800
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-resizeHandle gantt-resourceTimeline-resizeHandleEnd" })
|
|
11725
11801
|
] }),
|
|
11726
|
-
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */
|
|
11802
|
+
weekendOverlaySegments.map((segment, index) => /* @__PURE__ */ jsx18(
|
|
11727
11803
|
"span",
|
|
11728
11804
|
{
|
|
11729
11805
|
className: "gantt-resourceTimeline-weekendOverlay",
|
|
@@ -11735,7 +11811,7 @@ function ResourceTimelineChart({
|
|
|
11735
11811
|
},
|
|
11736
11812
|
`weekend-overlay-${index}`
|
|
11737
11813
|
)),
|
|
11738
|
-
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */
|
|
11814
|
+
conflictOverlaySegments.map((segment, index) => /* @__PURE__ */ jsx18(
|
|
11739
11815
|
"span",
|
|
11740
11816
|
{
|
|
11741
11817
|
className: "gantt-resourceTimeline-conflictOverlay",
|
|
@@ -11747,7 +11823,7 @@ function ResourceTimelineChart({
|
|
|
11747
11823
|
},
|
|
11748
11824
|
`conflict-overlay-${index}`
|
|
11749
11825
|
)),
|
|
11750
|
-
hasItemMenu && /* @__PURE__ */
|
|
11826
|
+
hasItemMenu && /* @__PURE__ */ jsx18(
|
|
11751
11827
|
"button",
|
|
11752
11828
|
{
|
|
11753
11829
|
type: "button",
|
|
@@ -11760,12 +11836,12 @@ function ResourceTimelineChart({
|
|
|
11760
11836
|
event.stopPropagation();
|
|
11761
11837
|
onResourceItemMenuClick?.(layoutItem.item);
|
|
11762
11838
|
},
|
|
11763
|
-
children: /* @__PURE__ */
|
|
11839
|
+
children: /* @__PURE__ */ jsx18("span", { "aria-hidden": "true", children: "\u22EE" })
|
|
11764
11840
|
}
|
|
11765
11841
|
),
|
|
11766
|
-
/* @__PURE__ */
|
|
11842
|
+
/* @__PURE__ */ jsx18("div", { className: "gantt-resourceTimeline-itemInner", children: renderItem ? renderItem(layoutItem.item, renderContext) : /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-defaultItemContent", children: [
|
|
11767
11843
|
/* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-defaultItemMain", children: [
|
|
11768
|
-
/* @__PURE__ */
|
|
11844
|
+
/* @__PURE__ */ jsx18(
|
|
11769
11845
|
"span",
|
|
11770
11846
|
{
|
|
11771
11847
|
className: "gantt-resourceTimeline-itemDurationChip",
|
|
@@ -11773,15 +11849,15 @@ function ResourceTimelineChart({
|
|
|
11773
11849
|
children: durationValue
|
|
11774
11850
|
}
|
|
11775
11851
|
),
|
|
11776
|
-
/* @__PURE__ */
|
|
11852
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-itemTitle", children: layoutItem.item.title })
|
|
11777
11853
|
] }),
|
|
11778
|
-
layoutItem.item.subtitle && /* @__PURE__ */
|
|
11854
|
+
layoutItem.item.subtitle && /* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-itemSubtitle", children: layoutItem.item.subtitle })
|
|
11779
11855
|
] }) }),
|
|
11780
11856
|
/* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-itemTooltip", role: "tooltip", children: [
|
|
11781
|
-
/* @__PURE__ */
|
|
11857
|
+
/* @__PURE__ */ jsx18("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLinePrimary", children: tooltipFirstLine }),
|
|
11782
11858
|
tooltipSecondLine && /* @__PURE__ */ jsxs13("div", { className: "gantt-resourceTimeline-itemTooltipLine gantt-resourceTimeline-itemTooltipLineSecondary", children: [
|
|
11783
|
-
tooltipSecondLineIcon && /* @__PURE__ */
|
|
11784
|
-
/* @__PURE__ */
|
|
11859
|
+
tooltipSecondLineIcon && /* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-itemTooltipIcon", "aria-hidden": "true", children: tooltipSecondLineIcon }),
|
|
11860
|
+
/* @__PURE__ */ jsx18("span", { className: "gantt-resourceTimeline-itemTooltipText", children: tooltipSecondLine })
|
|
11785
11861
|
] })
|
|
11786
11862
|
] })
|
|
11787
11863
|
]
|
|
@@ -11803,7 +11879,7 @@ function ResourceTimelineChart({
|
|
|
11803
11879
|
|
|
11804
11880
|
// src/components/TableMatrix/TableMatrix.tsx
|
|
11805
11881
|
import { useLayoutEffect, useMemo as useMemo11, useRef as useRef9, useState as useState10 } from "react";
|
|
11806
|
-
import { jsx as
|
|
11882
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
11807
11883
|
var AUTO_COLUMN_MIN_WIDTH = 72;
|
|
11808
11884
|
var AUTO_COLUMN_MAX_WIDTH = 180;
|
|
11809
11885
|
var DAY_MS4 = 24 * 60 * 60 * 1e3;
|
|
@@ -12005,7 +12081,7 @@ function TableMatrix({
|
|
|
12005
12081
|
}, [tasks, visibleRowIndices]);
|
|
12006
12082
|
return /* @__PURE__ */ jsxs14("div", { className: "gantt-mx-root", style: { width: `${totalWidth}px` }, children: [
|
|
12007
12083
|
hasAutoWidthColumns && /* @__PURE__ */ jsxs14("div", { ref: measureRef, className: "gantt-mx-measure", "aria-hidden": "true", children: [
|
|
12008
|
-
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */
|
|
12084
|
+
columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ jsx19(
|
|
12009
12085
|
"div",
|
|
12010
12086
|
{
|
|
12011
12087
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -12014,7 +12090,7 @@ function TableMatrix({
|
|
|
12014
12090
|
},
|
|
12015
12091
|
`header:${column.id}`
|
|
12016
12092
|
)),
|
|
12017
|
-
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */
|
|
12093
|
+
tasks.map((task) => columns.map((column, columnIndex) => typeof column.width === "number" ? null : /* @__PURE__ */ jsx19(
|
|
12018
12094
|
"div",
|
|
12019
12095
|
{
|
|
12020
12096
|
"data-gantt-mx-measure-column": columnIndex,
|
|
@@ -12025,7 +12101,7 @@ function TableMatrix({
|
|
|
12025
12101
|
)))
|
|
12026
12102
|
] }),
|
|
12027
12103
|
/* @__PURE__ */ jsxs14("div", { className: "gantt-mx-header", style: { height: `${headerHeight}px` }, children: [
|
|
12028
|
-
hasGroupHeader && /* @__PURE__ */
|
|
12104
|
+
hasGroupHeader && /* @__PURE__ */ jsx19(
|
|
12029
12105
|
"div",
|
|
12030
12106
|
{
|
|
12031
12107
|
className: "gantt-mx-headerRow gantt-mx-headerGroupRow",
|
|
@@ -12033,7 +12109,7 @@ function TableMatrix({
|
|
|
12033
12109
|
gridTemplateColumns: headerSpans.map((span) => `${span.width ?? 0}px`).join(" "),
|
|
12034
12110
|
height: `${topRowHeight}px`
|
|
12035
12111
|
},
|
|
12036
|
-
children: headerSpans.map((span) => /* @__PURE__ */
|
|
12112
|
+
children: headerSpans.map((span) => /* @__PURE__ */ jsx19(
|
|
12037
12113
|
"div",
|
|
12038
12114
|
{
|
|
12039
12115
|
className: joinClasses("gantt-mx-groupCell", span.className),
|
|
@@ -12044,7 +12120,7 @@ function TableMatrix({
|
|
|
12044
12120
|
))
|
|
12045
12121
|
}
|
|
12046
12122
|
),
|
|
12047
|
-
/* @__PURE__ */
|
|
12123
|
+
/* @__PURE__ */ jsx19(
|
|
12048
12124
|
"div",
|
|
12049
12125
|
{
|
|
12050
12126
|
className: "gantt-mx-headerRow",
|
|
@@ -12061,7 +12137,7 @@ function TableMatrix({
|
|
|
12061
12137
|
),
|
|
12062
12138
|
style: column.minWidth !== void 0 ? { minWidth: `${column.minWidth}px` } : void 0,
|
|
12063
12139
|
children: [
|
|
12064
|
-
shouldRenderOverlayEdge && /* @__PURE__ */
|
|
12140
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ jsx19(
|
|
12065
12141
|
"span",
|
|
12066
12142
|
{
|
|
12067
12143
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -12071,7 +12147,7 @@ function TableMatrix({
|
|
|
12071
12147
|
}
|
|
12072
12148
|
}
|
|
12073
12149
|
),
|
|
12074
|
-
/* @__PURE__ */
|
|
12150
|
+
/* @__PURE__ */ jsx19("span", { className: "gantt-mx-headerContent", children: column.header })
|
|
12075
12151
|
]
|
|
12076
12152
|
},
|
|
12077
12153
|
column.id
|
|
@@ -12080,7 +12156,7 @@ function TableMatrix({
|
|
|
12080
12156
|
}
|
|
12081
12157
|
)
|
|
12082
12158
|
] }),
|
|
12083
|
-
/* @__PURE__ */
|
|
12159
|
+
/* @__PURE__ */ jsx19(
|
|
12084
12160
|
"div",
|
|
12085
12161
|
{
|
|
12086
12162
|
className: "gantt-mx-body",
|
|
@@ -12094,7 +12170,7 @@ function TableMatrix({
|
|
|
12094
12170
|
const nestingDepth = nestingDepthMap.get(task.id) ?? 0;
|
|
12095
12171
|
const rowFillLevel = Math.min(nestingDepth, 2);
|
|
12096
12172
|
const isTotal = Boolean(task.isTotal);
|
|
12097
|
-
return /* @__PURE__ */
|
|
12173
|
+
return /* @__PURE__ */ jsx19(
|
|
12098
12174
|
"div",
|
|
12099
12175
|
{
|
|
12100
12176
|
"data-gantt-task-row-id": task.id,
|
|
@@ -12134,7 +12210,7 @@ function TableMatrix({
|
|
|
12134
12210
|
onCellClick?.({ task, column, rowIndex: index, columnIndex, event });
|
|
12135
12211
|
},
|
|
12136
12212
|
children: [
|
|
12137
|
-
shouldRenderOverlay && /* @__PURE__ */
|
|
12213
|
+
shouldRenderOverlay && /* @__PURE__ */ jsx19(
|
|
12138
12214
|
"span",
|
|
12139
12215
|
{
|
|
12140
12216
|
className: joinClasses("gantt-mx-dateOverlay", dateOverlay && dateOverlay.className),
|
|
@@ -12144,7 +12220,7 @@ function TableMatrix({
|
|
|
12144
12220
|
}
|
|
12145
12221
|
}
|
|
12146
12222
|
),
|
|
12147
|
-
shouldRenderOverlayEdge && /* @__PURE__ */
|
|
12223
|
+
shouldRenderOverlayEdge && /* @__PURE__ */ jsx19(
|
|
12148
12224
|
"span",
|
|
12149
12225
|
{
|
|
12150
12226
|
className: "gantt-mx-dateOverlayEdge",
|
|
@@ -12154,7 +12230,7 @@ function TableMatrix({
|
|
|
12154
12230
|
}
|
|
12155
12231
|
}
|
|
12156
12232
|
),
|
|
12157
|
-
/* @__PURE__ */
|
|
12233
|
+
/* @__PURE__ */ jsx19("div", { className: "gantt-mx-cellContent", children: column.renderCell(task) })
|
|
12158
12234
|
]
|
|
12159
12235
|
},
|
|
12160
12236
|
`${task.id}:${column.id}`
|
|
@@ -12171,7 +12247,7 @@ function TableMatrix({
|
|
|
12171
12247
|
|
|
12172
12248
|
// src/components/PlanFactMatrix/PlanFactMatrix.tsx
|
|
12173
12249
|
import React15, { useCallback as useCallback9, useEffect as useEffect9, useMemo as useMemo12, useRef as useRef10, useState as useState11 } from "react";
|
|
12174
|
-
import { jsx as
|
|
12250
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
12175
12251
|
var DAY_MS5 = 24 * 60 * 60 * 1e3;
|
|
12176
12252
|
function joinClasses2(...values) {
|
|
12177
12253
|
return values.filter(Boolean).join(" ");
|
|
@@ -12280,7 +12356,7 @@ function PlanFactCellEditor({
|
|
|
12280
12356
|
}
|
|
12281
12357
|
onCommit(parsed);
|
|
12282
12358
|
}, [draft, onCancel, onCommit]);
|
|
12283
|
-
return /* @__PURE__ */
|
|
12359
|
+
return /* @__PURE__ */ jsx20(
|
|
12284
12360
|
"input",
|
|
12285
12361
|
{
|
|
12286
12362
|
ref: inputRef,
|
|
@@ -12394,7 +12470,7 @@ function PlanFactRowInner({
|
|
|
12394
12470
|
showOverflowTooltip,
|
|
12395
12471
|
hideOverflowTooltip
|
|
12396
12472
|
}) {
|
|
12397
|
-
return /* @__PURE__ */
|
|
12473
|
+
return /* @__PURE__ */ jsx20(
|
|
12398
12474
|
"div",
|
|
12399
12475
|
{
|
|
12400
12476
|
"data-gantt-task-row-id": task.id,
|
|
@@ -12529,7 +12605,7 @@ function PlanFactRowInner({
|
|
|
12529
12605
|
}
|
|
12530
12606
|
},
|
|
12531
12607
|
children: [
|
|
12532
|
-
isEditing ? /* @__PURE__ */
|
|
12608
|
+
isEditing ? /* @__PURE__ */ jsx20(
|
|
12533
12609
|
PlanFactCellEditor,
|
|
12534
12610
|
{
|
|
12535
12611
|
value,
|
|
@@ -12555,7 +12631,7 @@ function PlanFactRowInner({
|
|
|
12555
12631
|
focusCell(nextActiveCell);
|
|
12556
12632
|
}
|
|
12557
12633
|
}
|
|
12558
|
-
) : /* @__PURE__ */
|
|
12634
|
+
) : /* @__PURE__ */ jsx20(
|
|
12559
12635
|
"span",
|
|
12560
12636
|
{
|
|
12561
12637
|
className: "gantt-pf-cellValue",
|
|
@@ -12569,7 +12645,7 @@ function PlanFactRowInner({
|
|
|
12569
12645
|
children: isParent ? "" : formatValue(value)
|
|
12570
12646
|
}
|
|
12571
12647
|
),
|
|
12572
|
-
showFillHandle && /* @__PURE__ */
|
|
12648
|
+
showFillHandle && /* @__PURE__ */ jsx20(
|
|
12573
12649
|
"span",
|
|
12574
12650
|
{
|
|
12575
12651
|
className: "gantt-pf-fillHandle",
|
|
@@ -13092,7 +13168,7 @@ function PlanFactMatrix({
|
|
|
13092
13168
|
},
|
|
13093
13169
|
children: [
|
|
13094
13170
|
/* @__PURE__ */ jsxs15("div", { className: "gantt-pf-header", style: { width: `${totalWidth}px`, height: `${headerHeight}px` }, children: [
|
|
13095
|
-
/* @__PURE__ */
|
|
13171
|
+
/* @__PURE__ */ jsx20(
|
|
13096
13172
|
"div",
|
|
13097
13173
|
{
|
|
13098
13174
|
className: "gantt-pf-dateWindow",
|
|
@@ -13100,7 +13176,7 @@ function PlanFactMatrix({
|
|
|
13100
13176
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
13101
13177
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
13102
13178
|
},
|
|
13103
|
-
children: /* @__PURE__ */
|
|
13179
|
+
children: /* @__PURE__ */ jsx20(
|
|
13104
13180
|
TimeScaleHeader_default,
|
|
13105
13181
|
{
|
|
13106
13182
|
days: renderedDateWindow.days,
|
|
@@ -13112,7 +13188,7 @@ function PlanFactMatrix({
|
|
|
13112
13188
|
)
|
|
13113
13189
|
}
|
|
13114
13190
|
),
|
|
13115
|
-
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */
|
|
13191
|
+
todayDateIndex !== void 0 && todayDateIndex >= renderedDateWindow.startIndex && todayDateIndex < renderedDateWindow.startIndex + renderedDateWindow.days.length && /* @__PURE__ */ jsx20(
|
|
13116
13192
|
"span",
|
|
13117
13193
|
{
|
|
13118
13194
|
className: "gantt-pf-headerTodayLine",
|
|
@@ -13124,7 +13200,7 @@ function PlanFactMatrix({
|
|
|
13124
13200
|
}
|
|
13125
13201
|
)
|
|
13126
13202
|
] }),
|
|
13127
|
-
/* @__PURE__ */
|
|
13203
|
+
/* @__PURE__ */ jsx20("div", { className: "gantt-pf-monthSeparatorLayer", "aria-hidden": "true", children: monthSeparatorIndices.map((dateIndex) => /* @__PURE__ */ jsx20(
|
|
13128
13204
|
"span",
|
|
13129
13205
|
{
|
|
13130
13206
|
className: "gantt-pf-monthSeparator",
|
|
@@ -13146,7 +13222,7 @@ function PlanFactMatrix({
|
|
|
13146
13222
|
width: `${totalWidth}px`
|
|
13147
13223
|
},
|
|
13148
13224
|
children: [
|
|
13149
|
-
/* @__PURE__ */
|
|
13225
|
+
/* @__PURE__ */ jsx20(
|
|
13150
13226
|
"div",
|
|
13151
13227
|
{
|
|
13152
13228
|
className: "gantt-pf-dateWindow gantt-pf-dateWindow-body",
|
|
@@ -13154,7 +13230,7 @@ function PlanFactMatrix({
|
|
|
13154
13230
|
left: `${renderedDateWindow.startIndex * dayWidth}px`,
|
|
13155
13231
|
width: `${renderedDateWindow.days.length * dayWidth}px`
|
|
13156
13232
|
},
|
|
13157
|
-
children: /* @__PURE__ */
|
|
13233
|
+
children: /* @__PURE__ */ jsx20(
|
|
13158
13234
|
GridBackground_default,
|
|
13159
13235
|
{
|
|
13160
13236
|
dateRange: renderedDateWindow.days,
|
|
@@ -13172,7 +13248,7 @@ function PlanFactMatrix({
|
|
|
13172
13248
|
if (!task) return null;
|
|
13173
13249
|
const isParent = parentTaskIds.has(task.id);
|
|
13174
13250
|
const isHighlighted = filterMode === "highlight" && !!highlightedTaskIds?.has(task.id);
|
|
13175
|
-
return /* @__PURE__ */
|
|
13251
|
+
return /* @__PURE__ */ jsx20(
|
|
13176
13252
|
PlanFactRow,
|
|
13177
13253
|
{
|
|
13178
13254
|
task,
|
|
@@ -13217,7 +13293,7 @@ function PlanFactMatrix({
|
|
|
13217
13293
|
]
|
|
13218
13294
|
}
|
|
13219
13295
|
),
|
|
13220
|
-
overflowTooltip && /* @__PURE__ */
|
|
13296
|
+
overflowTooltip && /* @__PURE__ */ jsx20(
|
|
13221
13297
|
"div",
|
|
13222
13298
|
{
|
|
13223
13299
|
className: "gantt-pf-overflowTooltip",
|
|
@@ -13643,7 +13719,7 @@ function createTaskPreviewPositionStore() {
|
|
|
13643
13719
|
}
|
|
13644
13720
|
|
|
13645
13721
|
// src/components/GanttChart/GanttChart.tsx
|
|
13646
|
-
import { Fragment as
|
|
13722
|
+
import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
13647
13723
|
var SCROLL_TO_ROW_CONTEXT_ROWS = 2;
|
|
13648
13724
|
var TASK_ROW_OVERSCAN = 8;
|
|
13649
13725
|
var PLAN_FACT_COLUMN_OVERSCAN = 24;
|
|
@@ -13770,9 +13846,9 @@ function arePreviewTaskMapsEqual(left, right) {
|
|
|
13770
13846
|
}
|
|
13771
13847
|
function GanttChartInner(props, ref) {
|
|
13772
13848
|
if (props.mode === "resource-planner") {
|
|
13773
|
-
return /* @__PURE__ */
|
|
13849
|
+
return /* @__PURE__ */ jsx21(ResourceTimelineChart, { ...props });
|
|
13774
13850
|
}
|
|
13775
|
-
return /* @__PURE__ */
|
|
13851
|
+
return /* @__PURE__ */ jsx21(
|
|
13776
13852
|
TaskGanttChart,
|
|
13777
13853
|
{
|
|
13778
13854
|
...props,
|
|
@@ -13822,6 +13898,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
13822
13898
|
onSelectedTaskIdsChange,
|
|
13823
13899
|
disableTaskDrag = false,
|
|
13824
13900
|
showChart = true,
|
|
13901
|
+
skeletonRowCount = 0,
|
|
13825
13902
|
timelineMarkers,
|
|
13826
13903
|
additionalColumns,
|
|
13827
13904
|
hiddenTaskListColumns,
|
|
@@ -14081,6 +14158,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
14081
14158
|
() => Math.round(dateRange.length * dayWidth),
|
|
14082
14159
|
[dateRange.length, dayWidth]
|
|
14083
14160
|
);
|
|
14161
|
+
const renderGridWidth = Math.max(gridWidth, skeletonRowCount > 0 ? 720 : 0);
|
|
14084
14162
|
const matrixWidth = useMemo13(
|
|
14085
14163
|
() => matrixColumns.reduce((sum, column) => {
|
|
14086
14164
|
if (typeof column.width !== "number") return void 0;
|
|
@@ -14128,8 +14206,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
14128
14206
|
return mergedHighlightedTaskIds;
|
|
14129
14207
|
}, [filterMode, highlightedTaskIds, matchedTaskIds, criticalPathMode, criticalTaskIds]);
|
|
14130
14208
|
const totalGridHeight = useMemo13(
|
|
14131
|
-
() => visibleTasks.length * effectiveRowHeight,
|
|
14132
|
-
[effectiveRowHeight, visibleTasks.length]
|
|
14209
|
+
() => (visibleTasks.length + Math.max(0, Math.floor(skeletonRowCount))) * effectiveRowHeight,
|
|
14210
|
+
[effectiveRowHeight, skeletonRowCount, visibleTasks.length]
|
|
14133
14211
|
);
|
|
14134
14212
|
const timelineHeaderHeight = headerHeight + 1;
|
|
14135
14213
|
const tableBodyMinHeight = useMemo13(() => {
|
|
@@ -14912,12 +14990,12 @@ function TaskGanttChartInner(props, ref) {
|
|
|
14912
14990
|
window.removeEventListener("mouseup", handlePanEnd);
|
|
14913
14991
|
};
|
|
14914
14992
|
}, []);
|
|
14915
|
-
return /* @__PURE__ */
|
|
14993
|
+
return /* @__PURE__ */ jsx21(
|
|
14916
14994
|
"div",
|
|
14917
14995
|
{
|
|
14918
14996
|
ref: containerRef,
|
|
14919
14997
|
className: isTableMatrixMode ? "gantt-container gantt-container-tableMatrix" : isPlanFactMode ? "gantt-container gantt-container-planFact" : "gantt-container",
|
|
14920
|
-
children: /* @__PURE__ */
|
|
14998
|
+
children: /* @__PURE__ */ jsx21(
|
|
14921
14999
|
"div",
|
|
14922
15000
|
{
|
|
14923
15001
|
ref: scrollContainerRef,
|
|
@@ -14932,7 +15010,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
14932
15010
|
onMouseOver: handleSharedRowHover,
|
|
14933
15011
|
onMouseLeave: clearHoveredRows,
|
|
14934
15012
|
children: [
|
|
14935
|
-
/* @__PURE__ */
|
|
15013
|
+
/* @__PURE__ */ jsx21(
|
|
14936
15014
|
TaskList,
|
|
14937
15015
|
{
|
|
14938
15016
|
tasks: normalizedTasks,
|
|
@@ -14991,20 +15069,21 @@ function TaskGanttChartInner(props, ref) {
|
|
|
14991
15069
|
bodyMinHeight: tableBodyMinHeight,
|
|
14992
15070
|
taskDateChangeMode,
|
|
14993
15071
|
onTaskDateChangeModeChange: handleTaskDateChangeMode,
|
|
14994
|
-
visibleRowIndices: visibleTaskWindowIndices
|
|
15072
|
+
visibleRowIndices: visibleTaskWindowIndices,
|
|
15073
|
+
skeletonRowCount
|
|
14995
15074
|
}
|
|
14996
15075
|
),
|
|
14997
|
-
/* @__PURE__ */
|
|
15076
|
+
/* @__PURE__ */ jsx21(
|
|
14998
15077
|
"div",
|
|
14999
15078
|
{
|
|
15000
15079
|
className: isTableMatrixMode || isPlanFactMode || showChart ? "gantt-chartSurface" : "gantt-chartSurface gantt-chart-hidden",
|
|
15001
15080
|
style: {
|
|
15002
|
-
minWidth: isTableMatrixMode ? matrixWidth !== void 0 ? `${matrixWidth}px` : void 0 : isPlanFactMode ? `${
|
|
15003
|
-
width: isTableMatrixMode ? matrixWidth !== void 0 ? `${matrixWidth}px` : "max-content" : isPlanFactMode ? `${
|
|
15081
|
+
minWidth: isTableMatrixMode ? matrixWidth !== void 0 ? `${matrixWidth}px` : void 0 : isPlanFactMode ? `${renderGridWidth}px` : `${renderGridWidth}px`,
|
|
15082
|
+
width: isTableMatrixMode ? matrixWidth !== void 0 ? `${matrixWidth}px` : "max-content" : isPlanFactMode ? `${renderGridWidth}px` : void 0,
|
|
15004
15083
|
flex: isTableMatrixMode || isPlanFactMode ? "0 0 auto" : 1,
|
|
15005
15084
|
display: isTableMatrixMode || isPlanFactMode || showChart ? void 0 : "none"
|
|
15006
15085
|
},
|
|
15007
|
-
children: isTableMatrixMode ? /* @__PURE__ */
|
|
15086
|
+
children: isTableMatrixMode ? /* @__PURE__ */ jsx21(
|
|
15008
15087
|
TableMatrix,
|
|
15009
15088
|
{
|
|
15010
15089
|
tasks: visibleTasks,
|
|
@@ -15022,7 +15101,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15022
15101
|
filterMode,
|
|
15023
15102
|
visibleRowIndices: visibleTaskWindowIndices
|
|
15024
15103
|
}
|
|
15025
|
-
) : isPlanFactMode ? /* @__PURE__ */
|
|
15104
|
+
) : isPlanFactMode ? /* @__PURE__ */ jsx21(
|
|
15026
15105
|
PlanFactMatrix,
|
|
15027
15106
|
{
|
|
15028
15107
|
tasks: visibleTasks,
|
|
@@ -15043,14 +15122,14 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15043
15122
|
todayDateIndex: todayInRange ? todayIndex : void 0,
|
|
15044
15123
|
isCustomWeekend
|
|
15045
15124
|
}
|
|
15046
|
-
) : /* @__PURE__ */ jsxs16(
|
|
15125
|
+
) : /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
15047
15126
|
/* @__PURE__ */ jsxs16(
|
|
15048
15127
|
"div",
|
|
15049
15128
|
{
|
|
15050
15129
|
className: "gantt-stickyHeader",
|
|
15051
|
-
style: { width: `${
|
|
15130
|
+
style: { width: `${renderGridWidth}px`, height: `${timelineHeaderHeight}px` },
|
|
15052
15131
|
children: [
|
|
15053
|
-
/* @__PURE__ */
|
|
15132
|
+
/* @__PURE__ */ jsx21(
|
|
15054
15133
|
TimeScaleHeader_default,
|
|
15055
15134
|
{
|
|
15056
15135
|
days: dateRange,
|
|
@@ -15063,7 +15142,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15063
15142
|
onTimelineHoverEnd: () => setActiveTimelineTooltip(null)
|
|
15064
15143
|
}
|
|
15065
15144
|
),
|
|
15066
|
-
activeTimelineTooltip && /* @__PURE__ */
|
|
15145
|
+
activeTimelineTooltip && /* @__PURE__ */ jsx21("div", { className: "gantt-timelineTooltipLayer", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(
|
|
15067
15146
|
"div",
|
|
15068
15147
|
{
|
|
15069
15148
|
className: "gantt-timelineTooltip",
|
|
@@ -15083,11 +15162,11 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15083
15162
|
className: "gantt-taskArea",
|
|
15084
15163
|
style: {
|
|
15085
15164
|
position: "relative",
|
|
15086
|
-
width: `${
|
|
15165
|
+
width: `${renderGridWidth}px`,
|
|
15087
15166
|
height: `${totalGridHeight}px`
|
|
15088
15167
|
},
|
|
15089
15168
|
children: [
|
|
15090
|
-
/* @__PURE__ */
|
|
15169
|
+
/* @__PURE__ */ jsx21(
|
|
15091
15170
|
GridBackground_default,
|
|
15092
15171
|
{
|
|
15093
15172
|
dateRange,
|
|
@@ -15097,7 +15176,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15097
15176
|
isCustomWeekend
|
|
15098
15177
|
}
|
|
15099
15178
|
),
|
|
15100
|
-
todayInRange && /* @__PURE__ */
|
|
15179
|
+
todayInRange && /* @__PURE__ */ jsx21(
|
|
15101
15180
|
TodayIndicator_default,
|
|
15102
15181
|
{
|
|
15103
15182
|
monthStart,
|
|
@@ -15106,7 +15185,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15106
15185
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
15107
15186
|
}
|
|
15108
15187
|
),
|
|
15109
|
-
visibleTimelineMarkers.length > 0 && /* @__PURE__ */
|
|
15188
|
+
visibleTimelineMarkers.length > 0 && /* @__PURE__ */ jsx21(
|
|
15110
15189
|
TimelineMarkers_default,
|
|
15111
15190
|
{
|
|
15112
15191
|
rangeStart: monthStart,
|
|
@@ -15117,7 +15196,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15117
15196
|
onHoverEnd: () => setActiveTimelineTooltip(null)
|
|
15118
15197
|
}
|
|
15119
15198
|
),
|
|
15120
|
-
/* @__PURE__ */
|
|
15199
|
+
/* @__PURE__ */ jsx21(
|
|
15121
15200
|
DependencyLines_default,
|
|
15122
15201
|
{
|
|
15123
15202
|
tasks: renderedDependencyTasks,
|
|
@@ -15126,7 +15205,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15126
15205
|
monthStart,
|
|
15127
15206
|
dayWidth,
|
|
15128
15207
|
rowHeight: effectiveRowHeight,
|
|
15129
|
-
gridWidth,
|
|
15208
|
+
gridWidth: renderGridWidth,
|
|
15130
15209
|
totalHeight: totalGridHeight,
|
|
15131
15210
|
rowIndexByTaskId: visibleTaskIndexMap,
|
|
15132
15211
|
dragOverrides: dependencyOverrides,
|
|
@@ -15145,8 +15224,8 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15145
15224
|
role: "dialog",
|
|
15146
15225
|
"aria-label": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0432\u044F\u0437\u044C\u044E",
|
|
15147
15226
|
children: [
|
|
15148
|
-
/* @__PURE__ */
|
|
15149
|
-
!disableDependencyEditing && /* @__PURE__ */
|
|
15227
|
+
/* @__PURE__ */ jsx21("span", { className: "gantt-dependencyLineMenuType", children: dependencyLineMenu.linkType === "FS" ? "\u041E\u041D" : dependencyLineMenu.linkType === "SS" ? "\u041D\u041D" : dependencyLineMenu.linkType === "FF" ? "\u041E\u041E" : "\u041D\u041E" }),
|
|
15228
|
+
!disableDependencyEditing && /* @__PURE__ */ jsx21(
|
|
15150
15229
|
"button",
|
|
15151
15230
|
{
|
|
15152
15231
|
type: "button",
|
|
@@ -15168,15 +15247,15 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15168
15247
|
strokeLinejoin: "round",
|
|
15169
15248
|
"aria-hidden": "true",
|
|
15170
15249
|
children: [
|
|
15171
|
-
/* @__PURE__ */
|
|
15172
|
-
/* @__PURE__ */
|
|
15173
|
-
/* @__PURE__ */
|
|
15250
|
+
/* @__PURE__ */ jsx21("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
15251
|
+
/* @__PURE__ */ jsx21("path", { d: "M3 6h18" }),
|
|
15252
|
+
/* @__PURE__ */ jsx21("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
15174
15253
|
]
|
|
15175
15254
|
}
|
|
15176
15255
|
)
|
|
15177
15256
|
}
|
|
15178
15257
|
),
|
|
15179
|
-
/* @__PURE__ */
|
|
15258
|
+
/* @__PURE__ */ jsx21(
|
|
15180
15259
|
"button",
|
|
15181
15260
|
{
|
|
15182
15261
|
type: "button",
|
|
@@ -15190,16 +15269,16 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15190
15269
|
]
|
|
15191
15270
|
}
|
|
15192
15271
|
),
|
|
15193
|
-
/* @__PURE__ */
|
|
15272
|
+
/* @__PURE__ */ jsx21(
|
|
15194
15273
|
DependencyCreationOverlay,
|
|
15195
15274
|
{
|
|
15196
15275
|
drag: dependencyCreationDrag,
|
|
15197
|
-
width:
|
|
15276
|
+
width: renderGridWidth,
|
|
15198
15277
|
height: totalGridHeight
|
|
15199
15278
|
}
|
|
15200
15279
|
),
|
|
15201
|
-
dependencyCreationError && /* @__PURE__ */
|
|
15202
|
-
dragGuideLines && /* @__PURE__ */
|
|
15280
|
+
dependencyCreationError && /* @__PURE__ */ jsx21("div", { className: "gantt-dependencyCreation-error", role: "status", children: dependencyCreationError }),
|
|
15281
|
+
dragGuideLines && /* @__PURE__ */ jsx21(
|
|
15203
15282
|
DragGuideLines_default,
|
|
15204
15283
|
{
|
|
15205
15284
|
isDragging: dragGuideLines.isDragging,
|
|
@@ -15209,7 +15288,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15209
15288
|
totalHeight: totalGridHeight
|
|
15210
15289
|
}
|
|
15211
15290
|
),
|
|
15212
|
-
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */
|
|
15291
|
+
renderedChartTasks.map(({ task, index }) => /* @__PURE__ */ jsx21(
|
|
15213
15292
|
"div",
|
|
15214
15293
|
{
|
|
15215
15294
|
style: {
|
|
@@ -15219,7 +15298,7 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15219
15298
|
right: 0,
|
|
15220
15299
|
height: `${effectiveRowHeight}px`
|
|
15221
15300
|
},
|
|
15222
|
-
children: /* @__PURE__ */
|
|
15301
|
+
children: /* @__PURE__ */ jsx21(
|
|
15223
15302
|
TaskRow_default,
|
|
15224
15303
|
{
|
|
15225
15304
|
task,
|
|
@@ -15263,7 +15342,17 @@ function TaskGanttChartInner(props, ref) {
|
|
|
15263
15342
|
)
|
|
15264
15343
|
},
|
|
15265
15344
|
task.id
|
|
15266
|
-
))
|
|
15345
|
+
)),
|
|
15346
|
+
/* @__PURE__ */ jsx21(
|
|
15347
|
+
GenerationSkeleton_default,
|
|
15348
|
+
{
|
|
15349
|
+
count: skeletonRowCount,
|
|
15350
|
+
rowHeight: effectiveRowHeight,
|
|
15351
|
+
variant: "chart",
|
|
15352
|
+
startIndex: visibleTasks.length,
|
|
15353
|
+
chartDayWidth: dayWidth
|
|
15354
|
+
}
|
|
15355
|
+
)
|
|
15267
15356
|
]
|
|
15268
15357
|
}
|
|
15269
15358
|
)
|
|
@@ -15284,7 +15373,7 @@ GanttChart.displayName = "GanttChart";
|
|
|
15284
15373
|
|
|
15285
15374
|
// src/components/ui/Button.tsx
|
|
15286
15375
|
import React17 from "react";
|
|
15287
|
-
import { jsx as
|
|
15376
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
15288
15377
|
var Button = React17.forwardRef(
|
|
15289
15378
|
({ className, variant = "default", size = "default", children, ...props }, ref) => {
|
|
15290
15379
|
const classes = [
|
|
@@ -15293,7 +15382,7 @@ var Button = React17.forwardRef(
|
|
|
15293
15382
|
size !== "default" ? `gantt-btn-${size}` : "",
|
|
15294
15383
|
className || ""
|
|
15295
15384
|
].filter(Boolean).join(" ");
|
|
15296
|
-
return /* @__PURE__ */
|
|
15385
|
+
return /* @__PURE__ */ jsx22("button", { ref, className: classes, ...props, children });
|
|
15297
15386
|
}
|
|
15298
15387
|
);
|
|
15299
15388
|
Button.displayName = "Button";
|
|
@@ -15338,6 +15427,7 @@ export {
|
|
|
15338
15427
|
DatePicker,
|
|
15339
15428
|
DragGuideLines_default as DragGuideLines,
|
|
15340
15429
|
GanttChart,
|
|
15430
|
+
GenerationSkeleton_default as GenerationSkeletonRows,
|
|
15341
15431
|
GridBackground_default as GridBackground,
|
|
15342
15432
|
Input,
|
|
15343
15433
|
PlanFactMatrix,
|