gantt-task-react-v 1.4.4 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/gantt/task-gantt-content.d.ts +6 -0
- package/dist/components/other/arrow.d.ts +1 -0
- package/dist/components/other/gantt-drawer.d.ts +17 -0
- package/dist/gantt-task-react.es.js +355 -108
- package/dist/gantt-task-react.umd.js +355 -108
- package/dist/style.css +146 -18
- package/dist/types/index.d.ts +1 -0
- package/dist/types/public-types.d.ts +22 -0
- package/package.json +1 -1
|
@@ -4606,7 +4606,7 @@
|
|
|
4606
4606
|
const tooltipDefaultContainerParagraph = "_tooltipDefaultContainerParagraph_16o9s_31";
|
|
4607
4607
|
const tooltipDetailsContainer = "_tooltipDetailsContainer_16o9s_47";
|
|
4608
4608
|
const tooltipDetailsContainerHidden = "_tooltipDetailsContainerHidden_16o9s_71";
|
|
4609
|
-
const styles$
|
|
4609
|
+
const styles$m = {
|
|
4610
4610
|
tooltipDefaultContainer,
|
|
4611
4611
|
tooltipDefaultContainerTexts,
|
|
4612
4612
|
tooltipDefaultContainerParagraph,
|
|
@@ -4649,26 +4649,26 @@
|
|
|
4649
4649
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4650
4650
|
"div",
|
|
4651
4651
|
{
|
|
4652
|
-
className: styles$
|
|
4652
|
+
className: styles$m.tooltipDefaultContainer,
|
|
4653
4653
|
style: { fontSize: "var(--gantt-font-size)" },
|
|
4654
4654
|
children: [
|
|
4655
4655
|
/* @__PURE__ */ jsxRuntime.jsx("b", { style: { fontSize: "var(--gantt-font-size)" }, children: `${task.name}: ${task.start.getDate()}-${task.start.getMonth() + 1}-${task.start.getFullYear()} - ${task.end.getDate()}-${task.end.getMonth() + 1}-${task.end.getFullYear()}` }),
|
|
4656
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$
|
|
4656
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$m.tooltipDefaultContainerTexts, children: [
|
|
4657
4657
|
task.end.getTime() - task.start.getTime() !== 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4658
4658
|
"p",
|
|
4659
4659
|
{
|
|
4660
|
-
className: styles$
|
|
4660
|
+
className: styles$m.tooltipDefaultContainerParagraph,
|
|
4661
4661
|
children: `${locale.tooltip.duration},: ${~~((task.end.getTime() - task.start.getTime()) / (1e3 * 60 * 60 * 24))} ${locale.suffix.days}`
|
|
4662
4662
|
}
|
|
4663
4663
|
),
|
|
4664
|
-
!!locale.tooltip.progress && /* @__PURE__ */ jsxRuntime.jsx("p", { className: styles$
|
|
4664
|
+
!!locale.tooltip.progress && /* @__PURE__ */ jsxRuntime.jsx("p", { className: styles$m.tooltipDefaultContainerParagraph, children: !!task.progress && `${locale.tooltip.progress}: ${task.progress} %` })
|
|
4665
4665
|
] })
|
|
4666
4666
|
]
|
|
4667
4667
|
}
|
|
4668
4668
|
);
|
|
4669
4669
|
};
|
|
4670
4670
|
const scroll = "_scroll_hp3qb_1";
|
|
4671
|
-
const styles$
|
|
4671
|
+
const styles$l = {
|
|
4672
4672
|
scroll
|
|
4673
4673
|
};
|
|
4674
4674
|
const VerticalScroll = ({
|
|
@@ -4689,7 +4689,7 @@
|
|
|
4689
4689
|
marginLeft: rtl ? void 0 : "-1rem",
|
|
4690
4690
|
pointerEvents: isChangeInProgress ? "none" : void 0
|
|
4691
4691
|
},
|
|
4692
|
-
className: styles$
|
|
4692
|
+
className: styles$l.scroll,
|
|
4693
4693
|
onScroll,
|
|
4694
4694
|
ref: verticalScrollbarRef,
|
|
4695
4695
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: ganttFullHeight, width: 1 } })
|
|
@@ -4767,7 +4767,7 @@
|
|
|
4767
4767
|
const taskListExpander = "_taskListExpander_16z6n_23";
|
|
4768
4768
|
const taskListEmptyExpander = "_taskListEmptyExpander_16z6n_45";
|
|
4769
4769
|
const taskName = "_taskName_16z6n_55";
|
|
4770
|
-
const styles$
|
|
4770
|
+
const styles$k = {
|
|
4771
4771
|
taskListNameWrapper,
|
|
4772
4772
|
dragging,
|
|
4773
4773
|
taskListExpander,
|
|
@@ -4844,7 +4844,7 @@
|
|
|
4844
4844
|
"div",
|
|
4845
4845
|
{
|
|
4846
4846
|
"data-testid": `title-table-cell-${name}`,
|
|
4847
|
-
className: `${styles$
|
|
4847
|
+
className: `${styles$k.taskListNameWrapper}`,
|
|
4848
4848
|
style: {
|
|
4849
4849
|
paddingLeft: depth * nestedTaskNameOffset
|
|
4850
4850
|
},
|
|
@@ -4853,7 +4853,7 @@
|
|
|
4853
4853
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4854
4854
|
"div",
|
|
4855
4855
|
{
|
|
4856
|
-
className: `gantt-expander ${styles$
|
|
4856
|
+
className: `gantt-expander ${styles$k.taskListExpander} ${!hasChildren ? styles$k.taskListEmptyExpander : ""}`,
|
|
4857
4857
|
style: {
|
|
4858
4858
|
left: depth * nestedTaskNameOffset
|
|
4859
4859
|
},
|
|
@@ -4864,7 +4864,7 @@
|
|
|
4864
4864
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4865
4865
|
"div",
|
|
4866
4866
|
{
|
|
4867
|
-
className: styles$
|
|
4867
|
+
className: styles$k.taskName,
|
|
4868
4868
|
style: { fontWeight: isProject ? "bold" : "regular" },
|
|
4869
4869
|
children: [
|
|
4870
4870
|
isShowTaskNumbers && /* @__PURE__ */ jsxRuntime.jsxs("b", { children: [
|
|
@@ -4919,7 +4919,7 @@
|
|
|
4919
4919
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: dependencies.map(({ name }) => name).join(", ") });
|
|
4920
4920
|
};
|
|
4921
4921
|
const button = "_button_l55x0_1";
|
|
4922
|
-
const styles$
|
|
4922
|
+
const styles$j = {
|
|
4923
4923
|
button
|
|
4924
4924
|
};
|
|
4925
4925
|
const DeleteIcon = (props) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4953,7 +4953,7 @@
|
|
|
4953
4953
|
e.stopPropagation();
|
|
4954
4954
|
},
|
|
4955
4955
|
onClick,
|
|
4956
|
-
className: styles$
|
|
4956
|
+
className: styles$j.button,
|
|
4957
4957
|
children: (icons == null ? void 0 : icons.renderDeleteIcon) ? icons.renderDeleteIcon() : /* @__PURE__ */ jsxRuntime.jsx(DeleteIcon, {})
|
|
4958
4958
|
}
|
|
4959
4959
|
);
|
|
@@ -4988,7 +4988,7 @@
|
|
|
4988
4988
|
e.stopPropagation();
|
|
4989
4989
|
},
|
|
4990
4990
|
onClick,
|
|
4991
|
-
className: styles$
|
|
4991
|
+
className: styles$j.button,
|
|
4992
4992
|
children: (icons == null ? void 0 : icons.renderEditIcon) ? icons.renderEditIcon() : /* @__PURE__ */ jsxRuntime.jsx(EditIcon, {})
|
|
4993
4993
|
}
|
|
4994
4994
|
);
|
|
@@ -5029,7 +5029,7 @@
|
|
|
5029
5029
|
e.stopPropagation();
|
|
5030
5030
|
},
|
|
5031
5031
|
onClick,
|
|
5032
|
-
className: styles$
|
|
5032
|
+
className: styles$j.button,
|
|
5033
5033
|
children: (icons == null ? void 0 : icons.renderAddIcon) ? icons.renderAddIcon() : /* @__PURE__ */ jsxRuntime.jsx(AddIcon, {})
|
|
5034
5034
|
}
|
|
5035
5035
|
);
|
|
@@ -5538,7 +5538,7 @@
|
|
|
5538
5538
|
const ganttTable_HeaderSeparator = "_ganttTable_HeaderSeparator_5goa0_39";
|
|
5539
5539
|
const ganttTable_HeaderItem = "_ganttTable_HeaderItem_5goa0_53";
|
|
5540
5540
|
const resizer = "_resizer_5goa0_77";
|
|
5541
|
-
const styles$
|
|
5541
|
+
const styles$i = {
|
|
5542
5542
|
ganttTable,
|
|
5543
5543
|
ganttTable_Header,
|
|
5544
5544
|
ganttTable_HeaderMoveTask,
|
|
@@ -5587,7 +5587,7 @@
|
|
|
5587
5587
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5588
5588
|
"div",
|
|
5589
5589
|
{
|
|
5590
|
-
className: styles$
|
|
5590
|
+
className: styles$i.ganttTable,
|
|
5591
5591
|
style: {
|
|
5592
5592
|
fontFamily: "var(--gantt-font-family)",
|
|
5593
5593
|
fontSize: "var(--gantt-font-size)"
|
|
@@ -5595,18 +5595,18 @@
|
|
|
5595
5595
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5596
5596
|
"div",
|
|
5597
5597
|
{
|
|
5598
|
-
className: styles$
|
|
5598
|
+
className: styles$i.ganttTable_Header,
|
|
5599
5599
|
style: {
|
|
5600
5600
|
height: headerHeight - 2
|
|
5601
5601
|
},
|
|
5602
5602
|
children: [
|
|
5603
|
-
canMoveTasks && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$
|
|
5603
|
+
canMoveTasks && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$i.ganttTable_HeaderMoveTask }),
|
|
5604
5604
|
columns.map(({ title, width, canResize }, index2) => {
|
|
5605
5605
|
return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
5606
5606
|
index2 > 0 && !!title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5607
5607
|
"div",
|
|
5608
5608
|
{
|
|
5609
|
-
className: styles$
|
|
5609
|
+
className: styles$i.ganttTable_HeaderSeparator,
|
|
5610
5610
|
style: {
|
|
5611
5611
|
height: headerHeight * 0.5,
|
|
5612
5612
|
marginTop: headerHeight * 0.2
|
|
@@ -5617,7 +5617,7 @@
|
|
|
5617
5617
|
"div",
|
|
5618
5618
|
{
|
|
5619
5619
|
"data-testid": `table-column-header-${title}`,
|
|
5620
|
-
className: styles$
|
|
5620
|
+
className: styles$i.ganttTable_HeaderItem,
|
|
5621
5621
|
style: {
|
|
5622
5622
|
minWidth: width,
|
|
5623
5623
|
maxWidth: width,
|
|
@@ -5629,7 +5629,7 @@
|
|
|
5629
5629
|
"div",
|
|
5630
5630
|
{
|
|
5631
5631
|
"data-testid": `table-column-header-resize-handle-${title}`,
|
|
5632
|
-
className: styles$
|
|
5632
|
+
className: styles$i.resizer,
|
|
5633
5633
|
onMouseDown: (event) => {
|
|
5634
5634
|
onColumnResizeStart(index2, event.clientX);
|
|
5635
5635
|
},
|
|
@@ -9843,7 +9843,7 @@
|
|
|
9843
9843
|
}
|
|
9844
9844
|
[KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];
|
|
9845
9845
|
const taskListWrapper$1 = "_taskListWrapper_196te_3";
|
|
9846
|
-
const styles$
|
|
9846
|
+
const styles$h = {
|
|
9847
9847
|
taskListWrapper: taskListWrapper$1
|
|
9848
9848
|
};
|
|
9849
9849
|
function getDragDepth(offset2, indentationWidth2) {
|
|
@@ -10029,7 +10029,7 @@
|
|
|
10029
10029
|
const dragIndicatorIcon = "_dragIndicatorIcon_1yqtr_119";
|
|
10030
10030
|
const isCut = "_isCut_1yqtr_135";
|
|
10031
10031
|
const taskListCell = "_taskListCell_1yqtr_167";
|
|
10032
|
-
const styles$
|
|
10032
|
+
const styles$g = {
|
|
10033
10033
|
taskListTableRow,
|
|
10034
10034
|
isAfter,
|
|
10035
10035
|
isBefore,
|
|
@@ -10169,18 +10169,18 @@
|
|
|
10169
10169
|
return isSelected ? "var(--gantt-table-selected-task-background-color)" : isEven ? "var(--gantt-table-even-background-color)" : void 0;
|
|
10170
10170
|
}, [isEven, isOverlay2, isSelected]);
|
|
10171
10171
|
const rowClassName = React.useMemo(() => {
|
|
10172
|
-
const classNames = [styles$
|
|
10172
|
+
const classNames = [styles$g.taskListTableRow];
|
|
10173
10173
|
if (moveOverPosition === "after") {
|
|
10174
|
-
classNames.push(styles$
|
|
10174
|
+
classNames.push(styles$g.isAfter);
|
|
10175
10175
|
}
|
|
10176
10176
|
if (moveOverPosition === "before") {
|
|
10177
|
-
classNames.push(styles$
|
|
10177
|
+
classNames.push(styles$g.isBefore);
|
|
10178
10178
|
}
|
|
10179
10179
|
if (isOverlay2 && !isDragging) {
|
|
10180
|
-
classNames.push(styles$
|
|
10180
|
+
classNames.push(styles$g.isOverlay);
|
|
10181
10181
|
}
|
|
10182
10182
|
if (isCut2) {
|
|
10183
|
-
classNames.push(styles$
|
|
10183
|
+
classNames.push(styles$g.isCut);
|
|
10184
10184
|
}
|
|
10185
10185
|
return classNames.join(" ");
|
|
10186
10186
|
}, [isCut2, moveOverPosition, isOverlay2, isDragging]);
|
|
@@ -10228,12 +10228,12 @@
|
|
|
10228
10228
|
},
|
|
10229
10229
|
onContextMenu,
|
|
10230
10230
|
children: [
|
|
10231
|
-
task.type !== "project" && task.id !== "no-project-asigned" && !isOverlay2 && moveHandleProps ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles$
|
|
10231
|
+
task.type !== "project" && task.id !== "no-project-asigned" && !isOverlay2 && moveHandleProps ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles$g.dragIndicator}`, ...moveHandleProps, children: /* @__PURE__ */ jsxRuntime.jsx(DragIndicatorIcon, { className: styles$g.dragIndicatorIcon }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
|
|
10232
10232
|
columns.map(({ id: id2, component: Component, width }, index2) => {
|
|
10233
10233
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10234
10234
|
"div",
|
|
10235
10235
|
{
|
|
10236
|
-
className: styles$
|
|
10236
|
+
className: styles$g.taskListCell,
|
|
10237
10237
|
style: {
|
|
10238
10238
|
minWidth: width,
|
|
10239
10239
|
maxWidth: width,
|
|
@@ -10644,7 +10644,7 @@
|
|
|
10644
10644
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10645
10645
|
"div",
|
|
10646
10646
|
{
|
|
10647
|
-
className: styles$
|
|
10647
|
+
className: styles$h.taskListWrapper,
|
|
10648
10648
|
style: {
|
|
10649
10649
|
fontFamily: "var(--gantt-font-family)",
|
|
10650
10650
|
fontSize: "var(--gantt-font-size)"
|
|
@@ -10683,7 +10683,7 @@
|
|
|
10683
10683
|
};
|
|
10684
10684
|
const TaskListSortableTable = React.memo(TaskListSortableTableDefaultInner);
|
|
10685
10685
|
const taskListWrapper = "_taskListWrapper_196te_3";
|
|
10686
|
-
const styles$
|
|
10686
|
+
const styles$f = {
|
|
10687
10687
|
taskListWrapper
|
|
10688
10688
|
};
|
|
10689
10689
|
const TaskListTableDefaultInner = ({
|
|
@@ -10729,7 +10729,7 @@
|
|
|
10729
10729
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10730
10730
|
"div",
|
|
10731
10731
|
{
|
|
10732
|
-
className: styles$
|
|
10732
|
+
className: styles$f.taskListWrapper,
|
|
10733
10733
|
style: {
|
|
10734
10734
|
fontFamily: "var(--gantt-font-family)",
|
|
10735
10735
|
fontSize: "var(--gantt-font-size)"
|
|
@@ -10747,7 +10747,7 @@
|
|
|
10747
10747
|
const scrollToTop = "_scrollToTop_yoz76_173";
|
|
10748
10748
|
const scrollToBottom = "_scrollToBottom_yoz76_189";
|
|
10749
10749
|
const hidden = "_hidden_yoz76_205";
|
|
10750
|
-
const styles$
|
|
10750
|
+
const styles$e = {
|
|
10751
10751
|
taskListRoot,
|
|
10752
10752
|
taskListHorizontalScroll,
|
|
10753
10753
|
taskListResizer,
|
|
@@ -10886,12 +10886,12 @@
|
|
|
10886
10886
|
]
|
|
10887
10887
|
);
|
|
10888
10888
|
const RenderTaskListTable = canReorderTasks ? TaskListSortableTable : TaskListTable;
|
|
10889
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$
|
|
10889
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$e.taskListRoot, ref: taskListRef, children: [
|
|
10890
10890
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10891
10891
|
"div",
|
|
10892
10892
|
{
|
|
10893
10893
|
ref: taskListHorizontalScrollRef,
|
|
10894
|
-
className: styles$
|
|
10894
|
+
className: styles$e.taskListHorizontalScroll,
|
|
10895
10895
|
style: {
|
|
10896
10896
|
width: tableWidth
|
|
10897
10897
|
},
|
|
@@ -10906,12 +10906,12 @@
|
|
|
10906
10906
|
canResizeColumns
|
|
10907
10907
|
}
|
|
10908
10908
|
),
|
|
10909
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$
|
|
10909
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$e.tableWrapper, children: [
|
|
10910
10910
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10911
10911
|
"div",
|
|
10912
10912
|
{
|
|
10913
10913
|
ref: taskListContainerRef,
|
|
10914
|
-
className: styles$
|
|
10914
|
+
className: styles$e.horizontalContainer,
|
|
10915
10915
|
style: {
|
|
10916
10916
|
height: Math.max(
|
|
10917
10917
|
ganttHeight - ((tableBottom == null ? void 0 : tableBottom.height) || 0),
|
|
@@ -10973,13 +10973,13 @@
|
|
|
10973
10973
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10974
10974
|
"div",
|
|
10975
10975
|
{
|
|
10976
|
-
className: `${styles$
|
|
10976
|
+
className: `${styles$e.scrollToTop} ${!renderedIndexes || renderedIndexes[2] ? styles$e.hidden : ""}`
|
|
10977
10977
|
}
|
|
10978
10978
|
),
|
|
10979
10979
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10980
10980
|
"div",
|
|
10981
10981
|
{
|
|
10982
|
-
className: `${styles$
|
|
10982
|
+
className: `${styles$e.scrollToBottom} ${!renderedIndexes || renderedIndexes[3] ? styles$e.hidden : ""}`
|
|
10983
10983
|
}
|
|
10984
10984
|
)
|
|
10985
10985
|
] }),
|
|
@@ -10990,7 +10990,7 @@
|
|
|
10990
10990
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10991
10991
|
"div",
|
|
10992
10992
|
{
|
|
10993
|
-
className: styles$
|
|
10993
|
+
className: styles$e.taskListResizer,
|
|
10994
10994
|
onMouseDown: (event) => {
|
|
10995
10995
|
onTableResizeStart(event.clientX);
|
|
10996
10996
|
},
|
|
@@ -11007,7 +11007,7 @@
|
|
|
11007
11007
|
const TaskList = React.memo(TaskListInner);
|
|
11008
11008
|
const ganttToday = "_ganttToday_1oyhk_1";
|
|
11009
11009
|
const ganttTodayCircle = "_ganttTodayCircle_1oyhk_9";
|
|
11010
|
-
const styles$
|
|
11010
|
+
const styles$d = {
|
|
11011
11011
|
ganttToday,
|
|
11012
11012
|
ganttTodayCircle
|
|
11013
11013
|
};
|
|
@@ -11073,7 +11073,7 @@
|
|
|
11073
11073
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11074
11074
|
"circle",
|
|
11075
11075
|
{
|
|
11076
|
-
className: styles$
|
|
11076
|
+
className: styles$d.ganttTodayCircle,
|
|
11077
11077
|
cx: x + 1,
|
|
11078
11078
|
cy: 6,
|
|
11079
11079
|
r: 6,
|
|
@@ -11150,7 +11150,7 @@
|
|
|
11150
11150
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11151
11151
|
"circle",
|
|
11152
11152
|
{
|
|
11153
|
-
className: styles$
|
|
11153
|
+
className: styles$d.ganttTodayCircle,
|
|
11154
11154
|
cx: x + 1,
|
|
11155
11155
|
cy: 6,
|
|
11156
11156
|
r: 6,
|
|
@@ -11193,7 +11193,7 @@
|
|
|
11193
11193
|
const calendarHeader = "_calendarHeader_15t8b_61";
|
|
11194
11194
|
const calendar = "_calendar_15t8b_1";
|
|
11195
11195
|
const calendarDragging$1 = "_calendarDragging_15t8b_85";
|
|
11196
|
-
const styles$
|
|
11196
|
+
const styles$c = {
|
|
11197
11197
|
calendarBottomText,
|
|
11198
11198
|
calendarTopTick,
|
|
11199
11199
|
calendarTopText,
|
|
@@ -11224,10 +11224,10 @@
|
|
|
11224
11224
|
y1: y1Line,
|
|
11225
11225
|
x2: x1Line,
|
|
11226
11226
|
y2: y2Line,
|
|
11227
|
-
className: styles$
|
|
11227
|
+
className: styles$c.calendarTopTick
|
|
11228
11228
|
}
|
|
11229
11229
|
),
|
|
11230
|
-
value !== null && /* @__PURE__ */ jsxRuntime.jsx("text", { y: yText - 4, x: xText, className: styles$
|
|
11230
|
+
value !== null && /* @__PURE__ */ jsxRuntime.jsx("text", { y: yText - 4, x: xText, className: styles$c.calendarTopText, children: value.toString().split(",")[1] ? t(value.toString().split(",")[0]) + "," + value.toString().split(",")[1] : value.toString().length >= 3 ? t(value.toString()) : value })
|
|
11231
11231
|
] });
|
|
11232
11232
|
};
|
|
11233
11233
|
const defaultRenderBottomHeader = (date, viewMode, dateSetup, index2, isUnknownDates) => {
|
|
@@ -11387,7 +11387,7 @@
|
|
|
11387
11387
|
[renderTopHeader, dateSetup]
|
|
11388
11388
|
);
|
|
11389
11389
|
const renderBottomText = (x, y, key2, text) => {
|
|
11390
|
-
return /* @__PURE__ */ jsxRuntime.jsx("g", { className: styles$
|
|
11390
|
+
return /* @__PURE__ */ jsxRuntime.jsx("g", { className: styles$c.calendarBottomText, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11391
11391
|
"text",
|
|
11392
11392
|
{
|
|
11393
11393
|
y,
|
|
@@ -11682,7 +11682,7 @@
|
|
|
11682
11682
|
scrollLeft: scrollRef.current.scrollLeft,
|
|
11683
11683
|
scrollTop: scrollRef.current.scrollTop
|
|
11684
11684
|
};
|
|
11685
|
-
calendarContainer.classList.add(styles$
|
|
11685
|
+
calendarContainer.classList.add(styles$c.calendarDragging);
|
|
11686
11686
|
};
|
|
11687
11687
|
const onScrollMove = (event) => {
|
|
11688
11688
|
if (!moveStateRef.current) {
|
|
@@ -11697,7 +11697,7 @@
|
|
|
11697
11697
|
const onScrollEnd = (event) => {
|
|
11698
11698
|
event.preventDefault();
|
|
11699
11699
|
moveStateRef.current = null;
|
|
11700
|
-
calendarContainer.classList.remove(styles$
|
|
11700
|
+
calendarContainer.classList.remove(styles$c.calendarDragging);
|
|
11701
11701
|
};
|
|
11702
11702
|
calendarContainer.addEventListener("mousemove", onScrollMove);
|
|
11703
11703
|
calendarContainer.addEventListener("mousedown", onScrollStart);
|
|
@@ -11714,7 +11714,7 @@
|
|
|
11714
11714
|
"g",
|
|
11715
11715
|
{
|
|
11716
11716
|
ref: calendarRef,
|
|
11717
|
-
className: `${styles$
|
|
11717
|
+
className: `${styles$c.calendar} calendar`,
|
|
11718
11718
|
fontSize: "var(--gantt-font-size)",
|
|
11719
11719
|
fontFamily: "var(--gantt-font-family)",
|
|
11720
11720
|
children: [
|
|
@@ -11725,7 +11725,7 @@
|
|
|
11725
11725
|
y: 0,
|
|
11726
11726
|
width: fullSvgWidth,
|
|
11727
11727
|
height: headerHeight,
|
|
11728
|
-
className: styles$
|
|
11728
|
+
className: styles$c.calendarHeader
|
|
11729
11729
|
}
|
|
11730
11730
|
),
|
|
11731
11731
|
topValues,
|
|
@@ -11744,10 +11744,10 @@
|
|
|
11744
11744
|
${x - width},${y - width}
|
|
11745
11745
|
${x - width},${y + width}`;
|
|
11746
11746
|
};
|
|
11747
|
-
const arrow_clickable = "
|
|
11748
|
-
const mainPath = "
|
|
11749
|
-
const clickZone = "
|
|
11750
|
-
const styles$
|
|
11747
|
+
const arrow_clickable = "_arrow_clickable_13ifc_1";
|
|
11748
|
+
const mainPath = "_mainPath_13ifc_9";
|
|
11749
|
+
const clickZone = "_clickZone_13ifc_33";
|
|
11750
|
+
const styles$b = {
|
|
11751
11751
|
arrow_clickable,
|
|
11752
11752
|
mainPath,
|
|
11753
11753
|
clickZone
|
|
@@ -11770,6 +11770,7 @@
|
|
|
11770
11770
|
isCritical,
|
|
11771
11771
|
rtl,
|
|
11772
11772
|
onArrowDoubleClick = void 0,
|
|
11773
|
+
onArrowClick = void 0,
|
|
11773
11774
|
fromConnectionIndex = 0,
|
|
11774
11775
|
fromTotalConnections = 1,
|
|
11775
11776
|
toConnectionIndex = 0,
|
|
@@ -11788,6 +11789,11 @@
|
|
|
11788
11789
|
onArrowDoubleClick(taskFrom, taskTo);
|
|
11789
11790
|
}
|
|
11790
11791
|
}, [taskFrom, taskTo, onArrowDoubleClick]);
|
|
11792
|
+
const handleClick = React.useCallback(() => {
|
|
11793
|
+
if (onArrowClick) {
|
|
11794
|
+
onArrowClick(taskFrom, taskTo);
|
|
11795
|
+
}
|
|
11796
|
+
}, [taskFrom, taskTo, onArrowClick]);
|
|
11791
11797
|
const [path, trianglePoints] = React.useMemo(
|
|
11792
11798
|
() => drownPathAndTriangle(
|
|
11793
11799
|
indexFrom,
|
|
@@ -11835,19 +11841,29 @@
|
|
|
11835
11841
|
}
|
|
11836
11842
|
return "var(--gantt-arrow-color)";
|
|
11837
11843
|
}, [isCritical]);
|
|
11838
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11844
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11839
11845
|
"g",
|
|
11840
11846
|
{
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11847
|
+
fill: color,
|
|
11848
|
+
stroke: color,
|
|
11849
|
+
"data-arrow-from": taskFrom.id,
|
|
11850
|
+
"data-arrow-to": taskTo.id,
|
|
11851
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11852
|
+
"g",
|
|
11853
|
+
{
|
|
11854
|
+
"data-testid": `task-arrow-${targetFrom}-${taskFrom.name}-${targetTo}-${taskTo.name}`,
|
|
11855
|
+
className: `arrow ${styles$b.arrow_clickable}`,
|
|
11856
|
+
onDoubleClick,
|
|
11857
|
+
onClick: handleClick,
|
|
11858
|
+
children: [
|
|
11859
|
+
onArrowDoubleClick && /* @__PURE__ */ jsxRuntime.jsx("path", { d: path, className: styles$b.clickZone }),
|
|
11860
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: styles$b.mainPath, d: path }),
|
|
11861
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { className: "polygon", points: trianglePoints })
|
|
11862
|
+
]
|
|
11863
|
+
}
|
|
11864
|
+
)
|
|
11849
11865
|
}
|
|
11850
|
-
)
|
|
11866
|
+
);
|
|
11851
11867
|
};
|
|
11852
11868
|
const Arrow = React.memo(ArrowInner);
|
|
11853
11869
|
const roundedPath = (points, radius) => {
|
|
@@ -11939,7 +11955,7 @@
|
|
|
11939
11955
|
return [path, trianglePoints];
|
|
11940
11956
|
};
|
|
11941
11957
|
const relationLine = "_relationLine_wh2qy_1";
|
|
11942
|
-
const styles$
|
|
11958
|
+
const styles$a = {
|
|
11943
11959
|
relationLine
|
|
11944
11960
|
};
|
|
11945
11961
|
const RelationLine = ({
|
|
@@ -11955,7 +11971,7 @@
|
|
|
11955
11971
|
x2,
|
|
11956
11972
|
y1,
|
|
11957
11973
|
y2,
|
|
11958
|
-
className: styles$
|
|
11974
|
+
className: styles$a.relationLine
|
|
11959
11975
|
}
|
|
11960
11976
|
);
|
|
11961
11977
|
};
|
|
@@ -12178,7 +12194,7 @@
|
|
|
12178
12194
|
const barHandleImportantVisible = "_barHandleImportantVisible_5jhkr_37";
|
|
12179
12195
|
const barHandleImportantHidden = "_barHandleImportantHidden_5jhkr_47";
|
|
12180
12196
|
const barBackground = "_barBackground_5jhkr_57";
|
|
12181
|
-
const styles$
|
|
12197
|
+
const styles$9 = {
|
|
12182
12198
|
barWrapper,
|
|
12183
12199
|
barHandle,
|
|
12184
12200
|
barHandleImportantVisible,
|
|
@@ -12280,7 +12296,7 @@
|
|
|
12280
12296
|
ry: barCornerRadius,
|
|
12281
12297
|
rx: barCornerRadius,
|
|
12282
12298
|
fill: barColor,
|
|
12283
|
-
className: styles$
|
|
12299
|
+
className: styles$9.barBackground
|
|
12284
12300
|
}
|
|
12285
12301
|
),
|
|
12286
12302
|
showProgress && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12337,7 +12353,7 @@
|
|
|
12337
12353
|
const projectWrapper = "_projectWrapper_1maxt_1";
|
|
12338
12354
|
const projectBackground = "_projectBackground_1maxt_11";
|
|
12339
12355
|
const projectTop = "_projectTop_1maxt_21";
|
|
12340
|
-
const styles$
|
|
12356
|
+
const styles$8 = {
|
|
12341
12357
|
projectWrapper,
|
|
12342
12358
|
projectBackground,
|
|
12343
12359
|
projectTop
|
|
@@ -12418,7 +12434,7 @@
|
|
|
12418
12434
|
startMoveFullTask(firstTouch.clientX);
|
|
12419
12435
|
}
|
|
12420
12436
|
},
|
|
12421
|
-
className: styles$
|
|
12437
|
+
className: styles$8.projectWrapper,
|
|
12422
12438
|
children: [
|
|
12423
12439
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12424
12440
|
"rect",
|
|
@@ -12430,7 +12446,7 @@
|
|
|
12430
12446
|
height: taskHeight,
|
|
12431
12447
|
rx: barCornerRadius,
|
|
12432
12448
|
ry: barCornerRadius,
|
|
12433
|
-
className: styles$
|
|
12449
|
+
className: styles$8.projectBackground
|
|
12434
12450
|
}
|
|
12435
12451
|
),
|
|
12436
12452
|
showProgress && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12455,13 +12471,13 @@
|
|
|
12455
12471
|
height: taskHalfHeight,
|
|
12456
12472
|
rx: barCornerRadius,
|
|
12457
12473
|
ry: barCornerRadius,
|
|
12458
|
-
className: styles$
|
|
12474
|
+
className: styles$8.projectTop
|
|
12459
12475
|
}
|
|
12460
12476
|
),
|
|
12461
12477
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12462
12478
|
"polygon",
|
|
12463
12479
|
{
|
|
12464
|
-
className: styles$
|
|
12480
|
+
className: styles$8.projectTop,
|
|
12465
12481
|
points: projectLeftTriangle,
|
|
12466
12482
|
fill: barColor
|
|
12467
12483
|
}
|
|
@@ -12469,7 +12485,7 @@
|
|
|
12469
12485
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12470
12486
|
"polygon",
|
|
12471
12487
|
{
|
|
12472
|
-
className: styles$
|
|
12488
|
+
className: styles$8.projectTop,
|
|
12473
12489
|
points: projectRightTriangle,
|
|
12474
12490
|
fill: barColor
|
|
12475
12491
|
}
|
|
@@ -12481,7 +12497,7 @@
|
|
|
12481
12497
|
const barRelationHandleWrapper = "_barRelationHandleWrapper_eluno_1";
|
|
12482
12498
|
const barRelationHandle = "_barRelationHandle_eluno_1";
|
|
12483
12499
|
const barRelationHandle_drawMode = "_barRelationHandle_drawMode_eluno_9";
|
|
12484
|
-
const styles$
|
|
12500
|
+
const styles$7 = {
|
|
12485
12501
|
barRelationHandleWrapper,
|
|
12486
12502
|
barRelationHandle,
|
|
12487
12503
|
barRelationHandle_drawMode
|
|
@@ -12501,7 +12517,7 @@
|
|
|
12501
12517
|
cx: x,
|
|
12502
12518
|
cy: y,
|
|
12503
12519
|
r: radius,
|
|
12504
|
-
className: `${styles$
|
|
12520
|
+
className: `${styles$7.barRelationHandle} ${isRelationDrawMode ? styles$7.barRelationHandle_drawMode : ""}`,
|
|
12505
12521
|
onMouseDown: startDrawRelation,
|
|
12506
12522
|
onTouchStart: startDrawRelation
|
|
12507
12523
|
}
|
|
@@ -12514,7 +12530,7 @@
|
|
|
12514
12530
|
{
|
|
12515
12531
|
ref,
|
|
12516
12532
|
tabIndex: 0,
|
|
12517
|
-
className: `${styles$
|
|
12533
|
+
className: `${styles$7.barRelationHandleWrapper} ${className || ""}`,
|
|
12518
12534
|
children
|
|
12519
12535
|
}
|
|
12520
12536
|
);
|
|
@@ -12655,12 +12671,12 @@
|
|
|
12655
12671
|
return () => {
|
|
12656
12672
|
};
|
|
12657
12673
|
}, []);
|
|
12658
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(BarRelationWrapper, { ref: rootRef, className: styles$
|
|
12674
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(BarRelationWrapper, { ref: rootRef, className: styles$9.barWrapper, children: [
|
|
12659
12675
|
task.id !== "no-project-asigned" && renderBarDisplay(),
|
|
12660
12676
|
ctrlPressed && isDateChangeable(task) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12661
12677
|
BarDateHandle,
|
|
12662
12678
|
{
|
|
12663
|
-
className: `${styles$
|
|
12679
|
+
className: `${styles$9.barHandle} ${isMovingDate ? styles$9.barHandleImportantVisible : ""} ${isMovingProgress || isRelationDrawMode ? styles$9.barHandleImportantHidden : ""}`,
|
|
12664
12680
|
dataTestId: `bar-date-handle-left-${task.id}`,
|
|
12665
12681
|
barCornerRadius,
|
|
12666
12682
|
height: handleHeight,
|
|
@@ -12673,7 +12689,7 @@
|
|
|
12673
12689
|
ctrlPressed && isDateChangeable(task) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12674
12690
|
BarDateHandle,
|
|
12675
12691
|
{
|
|
12676
|
-
className: `${styles$
|
|
12692
|
+
className: `${styles$9.barHandle} ${isMovingDate ? styles$9.barHandleImportantVisible : ""} ${isMovingProgress || isRelationDrawMode ? styles$9.barHandleImportantHidden : ""}`,
|
|
12677
12693
|
dataTestId: `bar-date-handle-right-${task.id}`,
|
|
12678
12694
|
barCornerRadius,
|
|
12679
12695
|
height: handleHeight,
|
|
@@ -12689,7 +12705,7 @@
|
|
|
12689
12705
|
};
|
|
12690
12706
|
const milestoneWrapper = "_milestoneWrapper_vcirf_1";
|
|
12691
12707
|
const milestoneBackground = "_milestoneBackground_vcirf_11";
|
|
12692
|
-
const styles$
|
|
12708
|
+
const styles$6 = {
|
|
12693
12709
|
milestoneWrapper,
|
|
12694
12710
|
milestoneBackground
|
|
12695
12711
|
};
|
|
@@ -12719,7 +12735,7 @@
|
|
|
12719
12735
|
}
|
|
12720
12736
|
return "var(--gantt-milestone-background-color)";
|
|
12721
12737
|
}, [isSelected, isCritical]);
|
|
12722
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(BarRelationWrapper, { className: styles$
|
|
12738
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(BarRelationWrapper, { className: styles$6.milestoneWrapper, children: [
|
|
12723
12739
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12724
12740
|
"rect",
|
|
12725
12741
|
{
|
|
@@ -12732,7 +12748,7 @@
|
|
|
12732
12748
|
rx: barCornerRadius,
|
|
12733
12749
|
ry: barCornerRadius,
|
|
12734
12750
|
transform,
|
|
12735
|
-
className: styles$
|
|
12751
|
+
className: styles$6.milestoneBackground,
|
|
12736
12752
|
onMouseDown: (e) => {
|
|
12737
12753
|
e.stopPropagation();
|
|
12738
12754
|
onTaskEventStart("move", e.clientX);
|
|
@@ -13058,11 +13074,11 @@
|
|
|
13058
13074
|
};
|
|
13059
13075
|
const TaskItem = React.memo(TaskItemInner);
|
|
13060
13076
|
const TaskItemWrapper = "_TaskItemWrapper_8x02m_1";
|
|
13061
|
-
const styles$
|
|
13077
|
+
const styles$5 = {
|
|
13062
13078
|
TaskItemWrapper
|
|
13063
13079
|
};
|
|
13064
13080
|
const barComparison = "_barComparison_14078_1";
|
|
13065
|
-
const styles$
|
|
13081
|
+
const styles$4 = {
|
|
13066
13082
|
barComparison
|
|
13067
13083
|
};
|
|
13068
13084
|
const BarComparison = (props) => {
|
|
@@ -13117,7 +13133,7 @@
|
|
|
13117
13133
|
ry: barCornerRadius,
|
|
13118
13134
|
rx: barCornerRadius,
|
|
13119
13135
|
fill: barColor,
|
|
13120
|
-
className: styles$
|
|
13136
|
+
className: styles$4.barComparison
|
|
13121
13137
|
}
|
|
13122
13138
|
),
|
|
13123
13139
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13187,7 +13203,9 @@
|
|
|
13187
13203
|
waitCommitTasks,
|
|
13188
13204
|
viewMode,
|
|
13189
13205
|
showProgress = true,
|
|
13190
|
-
progressColor
|
|
13206
|
+
progressColor,
|
|
13207
|
+
onArrowClick,
|
|
13208
|
+
selectedArrow
|
|
13191
13209
|
} = props;
|
|
13192
13210
|
const renderedHolidays = React.useMemo(() => {
|
|
13193
13211
|
const { columnWidth } = distances;
|
|
@@ -13317,7 +13335,7 @@
|
|
|
13317
13335
|
"svg",
|
|
13318
13336
|
{
|
|
13319
13337
|
id: task.id,
|
|
13320
|
-
className: `${styles$
|
|
13338
|
+
className: `${styles$5.TaskItemWrapper} TaskItemWrapper`,
|
|
13321
13339
|
x: Math.max(safeContainerX + (additionalLeftSpace || 0), 0),
|
|
13322
13340
|
y: safeLevelY,
|
|
13323
13341
|
width: Math.max(safeContainerWidth, 0),
|
|
@@ -13469,6 +13487,7 @@
|
|
|
13469
13487
|
isCritical: isCritical2,
|
|
13470
13488
|
rtl,
|
|
13471
13489
|
onArrowDoubleClick,
|
|
13490
|
+
onArrowClick,
|
|
13472
13491
|
fromConnectionIndex: getConnectionIndex(
|
|
13473
13492
|
`${source.id}|${sourceTarget}|out`
|
|
13474
13493
|
),
|
|
@@ -13553,6 +13572,7 @@
|
|
|
13553
13572
|
isCritical: isCritical2,
|
|
13554
13573
|
rtl,
|
|
13555
13574
|
onArrowDoubleClick,
|
|
13575
|
+
onArrowClick,
|
|
13556
13576
|
fromConnectionIndex: getConnectionIndex(
|
|
13557
13577
|
`${taskId}|${ownTarget}|out`
|
|
13558
13578
|
),
|
|
@@ -13650,6 +13670,7 @@
|
|
|
13650
13670
|
isCritical,
|
|
13651
13671
|
rtl,
|
|
13652
13672
|
onArrowDoubleClick,
|
|
13673
|
+
onArrowClick,
|
|
13653
13674
|
fromConnectionIndex: getConnectionIndex(
|
|
13654
13675
|
`${source.id}|${sourceTarget}|out`
|
|
13655
13676
|
),
|
|
@@ -13707,10 +13728,81 @@
|
|
|
13707
13728
|
isRelationChangeable,
|
|
13708
13729
|
visibleTasksMirror,
|
|
13709
13730
|
onArrowDoubleClick,
|
|
13731
|
+
onArrowClick,
|
|
13710
13732
|
showProgress,
|
|
13711
13733
|
progressColor
|
|
13712
13734
|
]);
|
|
13713
|
-
|
|
13735
|
+
const contentRef = React.useRef(null);
|
|
13736
|
+
React.useEffect(() => {
|
|
13737
|
+
const contentEl = contentRef.current;
|
|
13738
|
+
if (!contentEl)
|
|
13739
|
+
return void 0;
|
|
13740
|
+
const svgRoot = contentEl.ownerSVGElement;
|
|
13741
|
+
if (!svgRoot)
|
|
13742
|
+
return void 0;
|
|
13743
|
+
let currentHighlightedTask = null;
|
|
13744
|
+
const highlightArrows = (taskId) => {
|
|
13745
|
+
if (currentHighlightedTask === taskId)
|
|
13746
|
+
return;
|
|
13747
|
+
clearHighlights();
|
|
13748
|
+
currentHighlightedTask = taskId;
|
|
13749
|
+
const arrows = svgRoot.querySelectorAll(
|
|
13750
|
+
`[data-arrow-from="${taskId}"], [data-arrow-to="${taskId}"]`
|
|
13751
|
+
);
|
|
13752
|
+
arrows.forEach((el) => el.classList.add("gantt-arrow-highlighted"));
|
|
13753
|
+
};
|
|
13754
|
+
const clearHighlights = () => {
|
|
13755
|
+
if (!currentHighlightedTask)
|
|
13756
|
+
return;
|
|
13757
|
+
svgRoot.querySelectorAll(".gantt-arrow-highlighted").forEach((el) => el.classList.remove("gantt-arrow-highlighted"));
|
|
13758
|
+
currentHighlightedTask = null;
|
|
13759
|
+
};
|
|
13760
|
+
const onMouseOver = (e) => {
|
|
13761
|
+
const target = e.target;
|
|
13762
|
+
const taskWrapper = target.closest(".TaskItemWrapper");
|
|
13763
|
+
if (taskWrapper && taskWrapper.id) {
|
|
13764
|
+
highlightArrows(taskWrapper.id);
|
|
13765
|
+
}
|
|
13766
|
+
};
|
|
13767
|
+
const onMouseOut = (e) => {
|
|
13768
|
+
const target = e.target;
|
|
13769
|
+
const taskWrapper = target.closest(".TaskItemWrapper");
|
|
13770
|
+
if (taskWrapper) {
|
|
13771
|
+
const relatedTarget = e.relatedTarget;
|
|
13772
|
+
if (!relatedTarget || !taskWrapper.contains(relatedTarget)) {
|
|
13773
|
+
clearHighlights();
|
|
13774
|
+
}
|
|
13775
|
+
}
|
|
13776
|
+
};
|
|
13777
|
+
contentEl.addEventListener("mouseover", onMouseOver);
|
|
13778
|
+
contentEl.addEventListener("mouseout", onMouseOut);
|
|
13779
|
+
return () => {
|
|
13780
|
+
contentEl.removeEventListener("mouseover", onMouseOver);
|
|
13781
|
+
contentEl.removeEventListener("mouseout", onMouseOut);
|
|
13782
|
+
};
|
|
13783
|
+
}, []);
|
|
13784
|
+
React.useLayoutEffect(() => {
|
|
13785
|
+
const contentEl = contentRef.current;
|
|
13786
|
+
if (!contentEl)
|
|
13787
|
+
return;
|
|
13788
|
+
const svgRoot = contentEl.ownerSVGElement;
|
|
13789
|
+
if (!svgRoot)
|
|
13790
|
+
return;
|
|
13791
|
+
svgRoot.querySelectorAll(".gantt-arrow-selected").forEach((el) => el.classList.remove("gantt-arrow-selected"));
|
|
13792
|
+
if (!selectedArrow)
|
|
13793
|
+
return;
|
|
13794
|
+
if (selectedArrow.taskId) {
|
|
13795
|
+
svgRoot.querySelectorAll(
|
|
13796
|
+
`[data-arrow-from="${selectedArrow.taskId}"], [data-arrow-to="${selectedArrow.taskId}"]`
|
|
13797
|
+
).forEach((el) => el.classList.add("gantt-arrow-selected"));
|
|
13798
|
+
}
|
|
13799
|
+
if (selectedArrow.fromId && selectedArrow.toId) {
|
|
13800
|
+
svgRoot.querySelectorAll(
|
|
13801
|
+
`[data-arrow-from="${selectedArrow.fromId}"][data-arrow-to="${selectedArrow.toId}"]`
|
|
13802
|
+
).forEach((el) => el.classList.add("gantt-arrow-selected"));
|
|
13803
|
+
}
|
|
13804
|
+
}, [selectedArrow, renderedArrows]);
|
|
13805
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "content", ref: contentRef, children: [
|
|
13714
13806
|
renderedSelectedTasks,
|
|
13715
13807
|
/* @__PURE__ */ jsxRuntime.jsx("g", { children: renderedHolidays }),
|
|
13716
13808
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13747,7 +13839,7 @@
|
|
|
13747
13839
|
const horizontalContainer = "_horizontalContainer_1wr55_73";
|
|
13748
13840
|
const wrapper = "_wrapper_1wr55_85";
|
|
13749
13841
|
const calendarDragging = "_calendarDragging_1wr55_109";
|
|
13750
|
-
const styles$
|
|
13842
|
+
const styles$3 = {
|
|
13751
13843
|
ganttVerticalContainer,
|
|
13752
13844
|
horizontalContainer,
|
|
13753
13845
|
wrapper,
|
|
@@ -13831,7 +13923,7 @@
|
|
|
13831
13923
|
scrollLeft: verticalScrollbarRef.current.scrollLeft,
|
|
13832
13924
|
scrollTop: verticalScrollbarRef.current.scrollTop
|
|
13833
13925
|
};
|
|
13834
|
-
contentContainer.classList.add(styles$
|
|
13926
|
+
contentContainer.classList.add(styles$3.calendarDragging);
|
|
13835
13927
|
};
|
|
13836
13928
|
const onScrollMove = (event) => {
|
|
13837
13929
|
if (!moveStateVertRef.current) {
|
|
@@ -13864,7 +13956,7 @@
|
|
|
13864
13956
|
event.preventDefault();
|
|
13865
13957
|
moveStateVertRef.current = null;
|
|
13866
13958
|
moveStateHorRef.current = null;
|
|
13867
|
-
contentContainer.classList.remove(styles$
|
|
13959
|
+
contentContainer.classList.remove(styles$3.calendarDragging);
|
|
13868
13960
|
};
|
|
13869
13961
|
contentContainer.addEventListener("mousemove", onScrollMove);
|
|
13870
13962
|
contentContainer.addEventListener("mousedown", onScrollStart);
|
|
@@ -13880,7 +13972,7 @@
|
|
|
13880
13972
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13881
13973
|
"div",
|
|
13882
13974
|
{
|
|
13883
|
-
className: styles$
|
|
13975
|
+
className: styles$3.ganttVerticalContainer,
|
|
13884
13976
|
ref: verticalGanttContainerRef,
|
|
13885
13977
|
onScroll: onVerticalScrollbarScrollX,
|
|
13886
13978
|
dir: "ltr",
|
|
@@ -13899,7 +13991,7 @@
|
|
|
13899
13991
|
"div",
|
|
13900
13992
|
{
|
|
13901
13993
|
ref: horizontalContainerRef,
|
|
13902
|
-
className: styles$
|
|
13994
|
+
className: styles$3.horizontalContainer,
|
|
13903
13995
|
style: containerStyle,
|
|
13904
13996
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: gridStyle, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13905
13997
|
"svg",
|
|
@@ -18391,7 +18483,7 @@
|
|
|
18391
18483
|
const menuOption = "_menuOption_1c3e3_3";
|
|
18392
18484
|
const icon = "_icon_1c3e3_81";
|
|
18393
18485
|
const label = "_label_1c3e3_89";
|
|
18394
|
-
const styles$
|
|
18486
|
+
const styles$2 = {
|
|
18395
18487
|
menuOption,
|
|
18396
18488
|
icon,
|
|
18397
18489
|
label
|
|
@@ -18485,7 +18577,7 @@
|
|
|
18485
18577
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
18486
18578
|
"button",
|
|
18487
18579
|
{
|
|
18488
|
-
className: styles$
|
|
18580
|
+
className: styles$2.menuOption,
|
|
18489
18581
|
"aria-disabled": disabled,
|
|
18490
18582
|
disabled,
|
|
18491
18583
|
style: {
|
|
@@ -18500,7 +18592,7 @@
|
|
|
18500
18592
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18501
18593
|
"div",
|
|
18502
18594
|
{
|
|
18503
|
-
className: styles$
|
|
18595
|
+
className: styles$2.icon,
|
|
18504
18596
|
style: {
|
|
18505
18597
|
width: contextMenuIconWidth,
|
|
18506
18598
|
color: "var(--gantt-context-menu-text-color)",
|
|
@@ -18509,7 +18601,7 @@
|
|
|
18509
18601
|
children: icon2
|
|
18510
18602
|
}
|
|
18511
18603
|
),
|
|
18512
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$
|
|
18604
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2.label, children: label2 }),
|
|
18513
18605
|
children && children.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
18514
18606
|
"div",
|
|
18515
18607
|
{
|
|
@@ -19318,15 +19410,119 @@
|
|
|
19318
19410
|
const loader = "_loader_covn4_5";
|
|
19319
19411
|
const l16 = "_l16_covn4_1";
|
|
19320
19412
|
const loaderHidden = "_loaderHidden_covn4_49";
|
|
19321
|
-
const styles = {
|
|
19413
|
+
const styles$1 = {
|
|
19322
19414
|
loader,
|
|
19323
19415
|
l16,
|
|
19324
19416
|
loaderHidden
|
|
19325
19417
|
};
|
|
19326
19418
|
const GanttLoaderInner = ({ loading }) => {
|
|
19327
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.loader} ${loading ? "" : styles.loaderHidden}` });
|
|
19419
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles$1.loader} ${loading ? "" : styles$1.loaderHidden}` });
|
|
19328
19420
|
};
|
|
19329
19421
|
const GanttLoader = React.memo(GanttLoaderInner);
|
|
19422
|
+
const drawerOverlay = "_drawerOverlay_3p2w6_1";
|
|
19423
|
+
const drawer = "_drawer_3p2w6_1";
|
|
19424
|
+
const slideIn = "_slideIn_3p2w6_1";
|
|
19425
|
+
const drawerHeader = "_drawerHeader_3p2w6_71";
|
|
19426
|
+
const closeButton = "_closeButton_3p2w6_89";
|
|
19427
|
+
const drawerContent = "_drawerContent_3p2w6_127";
|
|
19428
|
+
const defaultSection = "_defaultSection_3p2w6_139";
|
|
19429
|
+
const defaultField = "_defaultField_3p2w6_175";
|
|
19430
|
+
const defaultFieldLabel = "_defaultFieldLabel_3p2w6_191";
|
|
19431
|
+
const styles = {
|
|
19432
|
+
drawerOverlay,
|
|
19433
|
+
drawer,
|
|
19434
|
+
slideIn,
|
|
19435
|
+
drawerHeader,
|
|
19436
|
+
closeButton,
|
|
19437
|
+
drawerContent,
|
|
19438
|
+
defaultSection,
|
|
19439
|
+
defaultField,
|
|
19440
|
+
defaultFieldLabel
|
|
19441
|
+
};
|
|
19442
|
+
const DefaultDrawerContent = ({
|
|
19443
|
+
data
|
|
19444
|
+
}) => {
|
|
19445
|
+
var _a, _b, _c, _d, _e, _f;
|
|
19446
|
+
if (data.type === "task" && data.task) {
|
|
19447
|
+
const { task } = data;
|
|
19448
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultSection, children: [
|
|
19449
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { children: "Task Details" }),
|
|
19450
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19451
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "Name:" }),
|
|
19452
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: task.name })
|
|
19453
|
+
] }),
|
|
19454
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19455
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "Start:" }),
|
|
19456
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (_a = task.start) == null ? void 0 : _a.toLocaleDateString() })
|
|
19457
|
+
] }),
|
|
19458
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19459
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "End:" }),
|
|
19460
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (_b = task.end) == null ? void 0 : _b.toLocaleDateString() })
|
|
19461
|
+
] }),
|
|
19462
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19463
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "Progress:" }),
|
|
19464
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
19465
|
+
Math.round(task.progress || 0),
|
|
19466
|
+
"%"
|
|
19467
|
+
] })
|
|
19468
|
+
] })
|
|
19469
|
+
] });
|
|
19470
|
+
}
|
|
19471
|
+
if (data.type === "connection" && data.taskFrom && data.taskTo) {
|
|
19472
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultSection, children: [
|
|
19473
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { children: "Connection Details" }),
|
|
19474
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { children: "From" }),
|
|
19475
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19476
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "Name:" }),
|
|
19477
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: data.taskFrom.name })
|
|
19478
|
+
] }),
|
|
19479
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19480
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "Start:" }),
|
|
19481
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (_c = data.taskFrom.start) == null ? void 0 : _c.toLocaleDateString() })
|
|
19482
|
+
] }),
|
|
19483
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19484
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "End:" }),
|
|
19485
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (_d = data.taskFrom.end) == null ? void 0 : _d.toLocaleDateString() })
|
|
19486
|
+
] }),
|
|
19487
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { children: "To" }),
|
|
19488
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19489
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "Name:" }),
|
|
19490
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: data.taskTo.name })
|
|
19491
|
+
] }),
|
|
19492
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19493
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "Start:" }),
|
|
19494
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (_e = data.taskTo.start) == null ? void 0 : _e.toLocaleDateString() })
|
|
19495
|
+
] }),
|
|
19496
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.defaultField, children: [
|
|
19497
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.defaultFieldLabel, children: "End:" }),
|
|
19498
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (_f = data.taskTo.end) == null ? void 0 : _f.toLocaleDateString() })
|
|
19499
|
+
] })
|
|
19500
|
+
] });
|
|
19501
|
+
}
|
|
19502
|
+
return null;
|
|
19503
|
+
};
|
|
19504
|
+
const GanttDrawer = ({
|
|
19505
|
+
open,
|
|
19506
|
+
width,
|
|
19507
|
+
data,
|
|
19508
|
+
onClose,
|
|
19509
|
+
renderContent
|
|
19510
|
+
}) => {
|
|
19511
|
+
if (!open || !data)
|
|
19512
|
+
return null;
|
|
19513
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.drawerOverlay, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.drawer, style: { width }, children: [
|
|
19514
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.drawerHeader, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19515
|
+
"button",
|
|
19516
|
+
{
|
|
19517
|
+
className: styles.closeButton,
|
|
19518
|
+
onClick: onClose,
|
|
19519
|
+
"aria-label": "Close drawer",
|
|
19520
|
+
children: "×"
|
|
19521
|
+
}
|
|
19522
|
+
) }),
|
|
19523
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.drawerContent, children: renderContent ? renderContent(data) : /* @__PURE__ */ jsxRuntime.jsx(DefaultDrawerContent, { data }) })
|
|
19524
|
+
] }) });
|
|
19525
|
+
};
|
|
19330
19526
|
const Gantt = (props) => {
|
|
19331
19527
|
var _a, _b;
|
|
19332
19528
|
const {
|
|
@@ -19372,7 +19568,11 @@
|
|
|
19372
19568
|
dataDateLabel = "Data Date",
|
|
19373
19569
|
showProgress = true,
|
|
19374
19570
|
progressColor,
|
|
19375
|
-
scrollToTaskId
|
|
19571
|
+
scrollToTaskId,
|
|
19572
|
+
enableDrawer = false,
|
|
19573
|
+
drawerWidth = 300,
|
|
19574
|
+
renderDrawerContent,
|
|
19575
|
+
onArrowClick: onArrowClickProp
|
|
19376
19576
|
} = props;
|
|
19377
19577
|
const ganttSVGRef = React.useRef(null);
|
|
19378
19578
|
const wrapperRef = React.useRef(null);
|
|
@@ -19389,6 +19589,36 @@
|
|
|
19389
19589
|
[theme, rowHeight]
|
|
19390
19590
|
);
|
|
19391
19591
|
const [waitCommitTasks, setWaitCommitTasks] = React.useState(false);
|
|
19592
|
+
const [drawerData, setDrawerData] = React.useState(null);
|
|
19593
|
+
const [selectedArrow, setSelectedArrow] = React.useState(null);
|
|
19594
|
+
const handleDrawerClose = React.useCallback(() => {
|
|
19595
|
+
setDrawerData(null);
|
|
19596
|
+
setSelectedArrow(null);
|
|
19597
|
+
}, []);
|
|
19598
|
+
const handleBarClickForDrawer = React.useCallback(
|
|
19599
|
+
(task, _event) => {
|
|
19600
|
+
if (clientTaskBar == null ? void 0 : clientTaskBar.onClick) {
|
|
19601
|
+
clientTaskBar.onClick(task);
|
|
19602
|
+
}
|
|
19603
|
+
if (enableDrawer) {
|
|
19604
|
+
setDrawerData({ type: "task", task });
|
|
19605
|
+
setSelectedArrow({ taskId: task.id });
|
|
19606
|
+
}
|
|
19607
|
+
},
|
|
19608
|
+
[clientTaskBar == null ? void 0 : clientTaskBar.onClick, enableDrawer]
|
|
19609
|
+
);
|
|
19610
|
+
const handleArrowClickForDrawer = React.useCallback(
|
|
19611
|
+
(taskFrom, taskTo) => {
|
|
19612
|
+
if (onArrowClickProp) {
|
|
19613
|
+
onArrowClickProp(taskFrom, taskTo);
|
|
19614
|
+
}
|
|
19615
|
+
if (enableDrawer) {
|
|
19616
|
+
setDrawerData({ type: "connection", taskFrom, taskTo });
|
|
19617
|
+
setSelectedArrow({ fromId: taskFrom.id, toId: taskTo.id });
|
|
19618
|
+
}
|
|
19619
|
+
},
|
|
19620
|
+
[onArrowClickProp, enableDrawer]
|
|
19621
|
+
);
|
|
19392
19622
|
const taskBar = React.useMemo(() => {
|
|
19393
19623
|
return mergeDeepObj(
|
|
19394
19624
|
{},
|
|
@@ -20701,7 +20931,10 @@
|
|
|
20701
20931
|
visibleTasksMirror,
|
|
20702
20932
|
viewMode,
|
|
20703
20933
|
showProgress,
|
|
20704
|
-
progressColor
|
|
20934
|
+
progressColor,
|
|
20935
|
+
onArrowClick: enableDrawer ? handleArrowClickForDrawer : void 0,
|
|
20936
|
+
onClick: enableDrawer ? handleBarClickForDrawer : taskBar.onClick,
|
|
20937
|
+
selectedArrow
|
|
20705
20938
|
}),
|
|
20706
20939
|
[
|
|
20707
20940
|
viewMode,
|
|
@@ -20740,7 +20973,11 @@
|
|
|
20740
20973
|
changeInProgress == null ? void 0 : changeInProgress.action,
|
|
20741
20974
|
handleDeleteTasks,
|
|
20742
20975
|
showProgress,
|
|
20743
|
-
progressColor
|
|
20976
|
+
progressColor,
|
|
20977
|
+
enableDrawer,
|
|
20978
|
+
handleArrowClickForDrawer,
|
|
20979
|
+
handleBarClickForDrawer,
|
|
20980
|
+
selectedArrow
|
|
20744
20981
|
]
|
|
20745
20982
|
);
|
|
20746
20983
|
const renderTaskListProps = React.useMemo(
|
|
@@ -20809,7 +21046,7 @@
|
|
|
20809
21046
|
"div",
|
|
20810
21047
|
{
|
|
20811
21048
|
style: cssVars,
|
|
20812
|
-
className: `${styles$
|
|
21049
|
+
className: `${styles$3.wrapper} gantt`,
|
|
20813
21050
|
onKeyDown: handleKeyDown,
|
|
20814
21051
|
tabIndex: 0,
|
|
20815
21052
|
ref: wrapperRef,
|
|
@@ -20893,7 +21130,17 @@
|
|
|
20893
21130
|
boundaryElement: verticalGanttContainerRef
|
|
20894
21131
|
}
|
|
20895
21132
|
),
|
|
20896
|
-
/* @__PURE__ */ jsxRuntime.jsx(GanttLoader, { loading: waitCommitTasks })
|
|
21133
|
+
/* @__PURE__ */ jsxRuntime.jsx(GanttLoader, { loading: waitCommitTasks }),
|
|
21134
|
+
enableDrawer && /* @__PURE__ */ jsxRuntime.jsx(
|
|
21135
|
+
GanttDrawer,
|
|
21136
|
+
{
|
|
21137
|
+
open: drawerData !== null,
|
|
21138
|
+
width: drawerWidth,
|
|
21139
|
+
data: drawerData,
|
|
21140
|
+
onClose: handleDrawerClose,
|
|
21141
|
+
renderContent: renderDrawerContent
|
|
21142
|
+
}
|
|
21143
|
+
)
|
|
20897
21144
|
]
|
|
20898
21145
|
}
|
|
20899
21146
|
) }) });
|