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.
@@ -4589,7 +4589,7 @@ const tooltipDefaultContainerTexts = "_tooltipDefaultContainerTexts_16o9s_17";
4589
4589
  const tooltipDefaultContainerParagraph = "_tooltipDefaultContainerParagraph_16o9s_31";
4590
4590
  const tooltipDetailsContainer = "_tooltipDetailsContainer_16o9s_47";
4591
4591
  const tooltipDetailsContainerHidden = "_tooltipDetailsContainerHidden_16o9s_71";
4592
- const styles$l = {
4592
+ const styles$m = {
4593
4593
  tooltipDefaultContainer,
4594
4594
  tooltipDefaultContainerTexts,
4595
4595
  tooltipDefaultContainerParagraph,
@@ -4632,26 +4632,26 @@ const StandardTooltipContent = ({ task }) => {
4632
4632
  return /* @__PURE__ */ jsxs(
4633
4633
  "div",
4634
4634
  {
4635
- className: styles$l.tooltipDefaultContainer,
4635
+ className: styles$m.tooltipDefaultContainer,
4636
4636
  style: { fontSize: "var(--gantt-font-size)" },
4637
4637
  children: [
4638
4638
  /* @__PURE__ */ 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()}` }),
4639
- /* @__PURE__ */ jsxs("div", { className: styles$l.tooltipDefaultContainerTexts, children: [
4639
+ /* @__PURE__ */ jsxs("div", { className: styles$m.tooltipDefaultContainerTexts, children: [
4640
4640
  task.end.getTime() - task.start.getTime() !== 0 && /* @__PURE__ */ jsx(
4641
4641
  "p",
4642
4642
  {
4643
- className: styles$l.tooltipDefaultContainerParagraph,
4643
+ className: styles$m.tooltipDefaultContainerParagraph,
4644
4644
  children: `${locale.tooltip.duration},: ${~~((task.end.getTime() - task.start.getTime()) / (1e3 * 60 * 60 * 24))} ${locale.suffix.days}`
4645
4645
  }
4646
4646
  ),
4647
- !!locale.tooltip.progress && /* @__PURE__ */ jsx("p", { className: styles$l.tooltipDefaultContainerParagraph, children: !!task.progress && `${locale.tooltip.progress}: ${task.progress} %` })
4647
+ !!locale.tooltip.progress && /* @__PURE__ */ jsx("p", { className: styles$m.tooltipDefaultContainerParagraph, children: !!task.progress && `${locale.tooltip.progress}: ${task.progress} %` })
4648
4648
  ] })
4649
4649
  ]
4650
4650
  }
4651
4651
  );
4652
4652
  };
4653
4653
  const scroll = "_scroll_hp3qb_1";
4654
- const styles$k = {
4654
+ const styles$l = {
4655
4655
  scroll
4656
4656
  };
4657
4657
  const VerticalScroll = ({
@@ -4672,7 +4672,7 @@ const VerticalScroll = ({
4672
4672
  marginLeft: rtl ? void 0 : "-1rem",
4673
4673
  pointerEvents: isChangeInProgress ? "none" : void 0
4674
4674
  },
4675
- className: styles$k.scroll,
4675
+ className: styles$l.scroll,
4676
4676
  onScroll,
4677
4677
  ref: verticalScrollbarRef,
4678
4678
  children: /* @__PURE__ */ jsx("div", { style: { height: ganttFullHeight, width: 1 } })
@@ -4750,7 +4750,7 @@ const dragging = "_dragging_16z6n_15";
4750
4750
  const taskListExpander = "_taskListExpander_16z6n_23";
4751
4751
  const taskListEmptyExpander = "_taskListEmptyExpander_16z6n_45";
4752
4752
  const taskName = "_taskName_16z6n_55";
4753
- const styles$j = {
4753
+ const styles$k = {
4754
4754
  taskListNameWrapper,
4755
4755
  dragging,
4756
4756
  taskListExpander,
@@ -4827,7 +4827,7 @@ const TitleColumn = ({
4827
4827
  "div",
4828
4828
  {
4829
4829
  "data-testid": `title-table-cell-${name}`,
4830
- className: `${styles$j.taskListNameWrapper}`,
4830
+ className: `${styles$k.taskListNameWrapper}`,
4831
4831
  style: {
4832
4832
  paddingLeft: depth * nestedTaskNameOffset
4833
4833
  },
@@ -4836,7 +4836,7 @@ const TitleColumn = ({
4836
4836
  /* @__PURE__ */ jsx(
4837
4837
  "div",
4838
4838
  {
4839
- className: `gantt-expander ${styles$j.taskListExpander} ${!hasChildren ? styles$j.taskListEmptyExpander : ""}`,
4839
+ className: `gantt-expander ${styles$k.taskListExpander} ${!hasChildren ? styles$k.taskListEmptyExpander : ""}`,
4840
4840
  style: {
4841
4841
  left: depth * nestedTaskNameOffset
4842
4842
  },
@@ -4847,7 +4847,7 @@ const TitleColumn = ({
4847
4847
  /* @__PURE__ */ jsxs(
4848
4848
  "div",
4849
4849
  {
4850
- className: styles$j.taskName,
4850
+ className: styles$k.taskName,
4851
4851
  style: { fontWeight: isProject ? "bold" : "regular" },
4852
4852
  children: [
4853
4853
  isShowTaskNumbers && /* @__PURE__ */ jsxs("b", { children: [
@@ -4902,7 +4902,7 @@ const DependenciesColumn = ({
4902
4902
  return /* @__PURE__ */ jsx(Fragment, { children: dependencies.map(({ name }) => name).join(", ") });
4903
4903
  };
4904
4904
  const button = "_button_l55x0_1";
4905
- const styles$i = {
4905
+ const styles$j = {
4906
4906
  button
4907
4907
  };
4908
4908
  const DeleteIcon = (props) => /* @__PURE__ */ jsxs(
@@ -4936,7 +4936,7 @@ const DeleteColumn = ({
4936
4936
  e.stopPropagation();
4937
4937
  },
4938
4938
  onClick,
4939
- className: styles$i.button,
4939
+ className: styles$j.button,
4940
4940
  children: (icons == null ? void 0 : icons.renderDeleteIcon) ? icons.renderDeleteIcon() : /* @__PURE__ */ jsx(DeleteIcon, {})
4941
4941
  }
4942
4942
  );
@@ -4971,7 +4971,7 @@ const EditColumn = ({
4971
4971
  e.stopPropagation();
4972
4972
  },
4973
4973
  onClick,
4974
- className: styles$i.button,
4974
+ className: styles$j.button,
4975
4975
  children: (icons == null ? void 0 : icons.renderEditIcon) ? icons.renderEditIcon() : /* @__PURE__ */ jsx(EditIcon, {})
4976
4976
  }
4977
4977
  );
@@ -5012,7 +5012,7 @@ const AddColumn = ({
5012
5012
  e.stopPropagation();
5013
5013
  },
5014
5014
  onClick,
5015
- className: styles$i.button,
5015
+ className: styles$j.button,
5016
5016
  children: (icons == null ? void 0 : icons.renderAddIcon) ? icons.renderAddIcon() : /* @__PURE__ */ jsx(AddIcon, {})
5017
5017
  }
5018
5018
  );
@@ -5521,7 +5521,7 @@ const ganttTable_HeaderMoveTask = "_ganttTable_HeaderMoveTask_5goa0_27";
5521
5521
  const ganttTable_HeaderSeparator = "_ganttTable_HeaderSeparator_5goa0_39";
5522
5522
  const ganttTable_HeaderItem = "_ganttTable_HeaderItem_5goa0_53";
5523
5523
  const resizer = "_resizer_5goa0_77";
5524
- const styles$h = {
5524
+ const styles$i = {
5525
5525
  ganttTable,
5526
5526
  ganttTable_Header,
5527
5527
  ganttTable_HeaderMoveTask,
@@ -5570,7 +5570,7 @@ const TaskListTableHeadersDefaultInner = ({
5570
5570
  return /* @__PURE__ */ jsx(
5571
5571
  "div",
5572
5572
  {
5573
- className: styles$h.ganttTable,
5573
+ className: styles$i.ganttTable,
5574
5574
  style: {
5575
5575
  fontFamily: "var(--gantt-font-family)",
5576
5576
  fontSize: "var(--gantt-font-size)"
@@ -5578,18 +5578,18 @@ const TaskListTableHeadersDefaultInner = ({
5578
5578
  children: /* @__PURE__ */ jsxs(
5579
5579
  "div",
5580
5580
  {
5581
- className: styles$h.ganttTable_Header,
5581
+ className: styles$i.ganttTable_Header,
5582
5582
  style: {
5583
5583
  height: headerHeight - 2
5584
5584
  },
5585
5585
  children: [
5586
- canMoveTasks && /* @__PURE__ */ jsx("div", { className: styles$h.ganttTable_HeaderMoveTask }),
5586
+ canMoveTasks && /* @__PURE__ */ jsx("div", { className: styles$i.ganttTable_HeaderMoveTask }),
5587
5587
  columns.map(({ title, width, canResize }, index2) => {
5588
5588
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
5589
5589
  index2 > 0 && !!title && /* @__PURE__ */ jsx(
5590
5590
  "div",
5591
5591
  {
5592
- className: styles$h.ganttTable_HeaderSeparator,
5592
+ className: styles$i.ganttTable_HeaderSeparator,
5593
5593
  style: {
5594
5594
  height: headerHeight * 0.5,
5595
5595
  marginTop: headerHeight * 0.2
@@ -5600,7 +5600,7 @@ const TaskListTableHeadersDefaultInner = ({
5600
5600
  "div",
5601
5601
  {
5602
5602
  "data-testid": `table-column-header-${title}`,
5603
- className: styles$h.ganttTable_HeaderItem,
5603
+ className: styles$i.ganttTable_HeaderItem,
5604
5604
  style: {
5605
5605
  minWidth: width,
5606
5606
  maxWidth: width,
@@ -5612,7 +5612,7 @@ const TaskListTableHeadersDefaultInner = ({
5612
5612
  "div",
5613
5613
  {
5614
5614
  "data-testid": `table-column-header-resize-handle-${title}`,
5615
- className: styles$h.resizer,
5615
+ className: styles$i.resizer,
5616
5616
  onMouseDown: (event) => {
5617
5617
  onColumnResizeStart(index2, event.clientX);
5618
5618
  },
@@ -9826,7 +9826,7 @@ function normalizeLocalDisabled(localDisabled, globalDisabled) {
9826
9826
  }
9827
9827
  [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];
9828
9828
  const taskListWrapper$1 = "_taskListWrapper_196te_3";
9829
- const styles$g = {
9829
+ const styles$h = {
9830
9830
  taskListWrapper: taskListWrapper$1
9831
9831
  };
9832
9832
  function getDragDepth(offset2, indentationWidth2) {
@@ -10012,7 +10012,7 @@ const dragIndicator = "_dragIndicator_1yqtr_99";
10012
10012
  const dragIndicatorIcon = "_dragIndicatorIcon_1yqtr_119";
10013
10013
  const isCut = "_isCut_1yqtr_135";
10014
10014
  const taskListCell = "_taskListCell_1yqtr_167";
10015
- const styles$f = {
10015
+ const styles$g = {
10016
10016
  taskListTableRow,
10017
10017
  isAfter,
10018
10018
  isBefore,
@@ -10152,18 +10152,18 @@ const TaskListTableRowInner = forwardRef(
10152
10152
  return isSelected ? "var(--gantt-table-selected-task-background-color)" : isEven ? "var(--gantt-table-even-background-color)" : void 0;
10153
10153
  }, [isEven, isOverlay2, isSelected]);
10154
10154
  const rowClassName = useMemo(() => {
10155
- const classNames = [styles$f.taskListTableRow];
10155
+ const classNames = [styles$g.taskListTableRow];
10156
10156
  if (moveOverPosition === "after") {
10157
- classNames.push(styles$f.isAfter);
10157
+ classNames.push(styles$g.isAfter);
10158
10158
  }
10159
10159
  if (moveOverPosition === "before") {
10160
- classNames.push(styles$f.isBefore);
10160
+ classNames.push(styles$g.isBefore);
10161
10161
  }
10162
10162
  if (isOverlay2 && !isDragging) {
10163
- classNames.push(styles$f.isOverlay);
10163
+ classNames.push(styles$g.isOverlay);
10164
10164
  }
10165
10165
  if (isCut2) {
10166
- classNames.push(styles$f.isCut);
10166
+ classNames.push(styles$g.isCut);
10167
10167
  }
10168
10168
  return classNames.join(" ");
10169
10169
  }, [isCut2, moveOverPosition, isOverlay2, isDragging]);
@@ -10211,12 +10211,12 @@ const TaskListTableRowInner = forwardRef(
10211
10211
  },
10212
10212
  onContextMenu,
10213
10213
  children: [
10214
- task.type !== "project" && task.id !== "no-project-asigned" && !isOverlay2 && moveHandleProps ? /* @__PURE__ */ jsx("div", { className: `${styles$f.dragIndicator}`, ...moveHandleProps, children: /* @__PURE__ */ jsx(DragIndicatorIcon, { className: styles$f.dragIndicatorIcon }) }) : /* @__PURE__ */ jsx("div", {}),
10214
+ task.type !== "project" && task.id !== "no-project-asigned" && !isOverlay2 && moveHandleProps ? /* @__PURE__ */ jsx("div", { className: `${styles$g.dragIndicator}`, ...moveHandleProps, children: /* @__PURE__ */ jsx(DragIndicatorIcon, { className: styles$g.dragIndicatorIcon }) }) : /* @__PURE__ */ jsx("div", {}),
10215
10215
  columns.map(({ id: id2, component: Component, width }, index2) => {
10216
10216
  return /* @__PURE__ */ jsx(
10217
10217
  "div",
10218
10218
  {
10219
- className: styles$f.taskListCell,
10219
+ className: styles$g.taskListCell,
10220
10220
  style: {
10221
10221
  minWidth: width,
10222
10222
  maxWidth: width,
@@ -10627,7 +10627,7 @@ const TaskListSortableTableDefaultInner = (props) => {
10627
10627
  children: /* @__PURE__ */ jsx(
10628
10628
  "div",
10629
10629
  {
10630
- className: styles$g.taskListWrapper,
10630
+ className: styles$h.taskListWrapper,
10631
10631
  style: {
10632
10632
  fontFamily: "var(--gantt-font-family)",
10633
10633
  fontSize: "var(--gantt-font-size)"
@@ -10666,7 +10666,7 @@ const TaskListSortableTableDefaultInner = (props) => {
10666
10666
  };
10667
10667
  const TaskListSortableTable = memo(TaskListSortableTableDefaultInner);
10668
10668
  const taskListWrapper = "_taskListWrapper_196te_3";
10669
- const styles$e = {
10669
+ const styles$f = {
10670
10670
  taskListWrapper
10671
10671
  };
10672
10672
  const TaskListTableDefaultInner = ({
@@ -10712,7 +10712,7 @@ const TaskListTableDefaultInner = ({
10712
10712
  return /* @__PURE__ */ jsx(
10713
10713
  "div",
10714
10714
  {
10715
- className: styles$e.taskListWrapper,
10715
+ className: styles$f.taskListWrapper,
10716
10716
  style: {
10717
10717
  fontFamily: "var(--gantt-font-family)",
10718
10718
  fontSize: "var(--gantt-font-size)"
@@ -10730,7 +10730,7 @@ const tableWrapper = "_tableWrapper_yoz76_159";
10730
10730
  const scrollToTop = "_scrollToTop_yoz76_173";
10731
10731
  const scrollToBottom = "_scrollToBottom_yoz76_189";
10732
10732
  const hidden = "_hidden_yoz76_205";
10733
- const styles$d = {
10733
+ const styles$e = {
10734
10734
  taskListRoot,
10735
10735
  taskListHorizontalScroll,
10736
10736
  taskListResizer,
@@ -10869,12 +10869,12 @@ const TaskListInner = ({
10869
10869
  ]
10870
10870
  );
10871
10871
  const RenderTaskListTable = canReorderTasks ? TaskListSortableTable : TaskListTable;
10872
- return /* @__PURE__ */ jsxs("div", { className: styles$d.taskListRoot, ref: taskListRef, children: [
10872
+ return /* @__PURE__ */ jsxs("div", { className: styles$e.taskListRoot, ref: taskListRef, children: [
10873
10873
  /* @__PURE__ */ jsxs(
10874
10874
  "div",
10875
10875
  {
10876
10876
  ref: taskListHorizontalScrollRef,
10877
- className: styles$d.taskListHorizontalScroll,
10877
+ className: styles$e.taskListHorizontalScroll,
10878
10878
  style: {
10879
10879
  width: tableWidth
10880
10880
  },
@@ -10889,12 +10889,12 @@ const TaskListInner = ({
10889
10889
  canResizeColumns
10890
10890
  }
10891
10891
  ),
10892
- /* @__PURE__ */ jsxs("div", { className: styles$d.tableWrapper, children: [
10892
+ /* @__PURE__ */ jsxs("div", { className: styles$e.tableWrapper, children: [
10893
10893
  /* @__PURE__ */ jsx(
10894
10894
  "div",
10895
10895
  {
10896
10896
  ref: taskListContainerRef,
10897
- className: styles$d.horizontalContainer,
10897
+ className: styles$e.horizontalContainer,
10898
10898
  style: {
10899
10899
  height: Math.max(
10900
10900
  ganttHeight - ((tableBottom == null ? void 0 : tableBottom.height) || 0),
@@ -10956,13 +10956,13 @@ const TaskListInner = ({
10956
10956
  /* @__PURE__ */ jsx(
10957
10957
  "div",
10958
10958
  {
10959
- className: `${styles$d.scrollToTop} ${!renderedIndexes || renderedIndexes[2] ? styles$d.hidden : ""}`
10959
+ className: `${styles$e.scrollToTop} ${!renderedIndexes || renderedIndexes[2] ? styles$e.hidden : ""}`
10960
10960
  }
10961
10961
  ),
10962
10962
  /* @__PURE__ */ jsx(
10963
10963
  "div",
10964
10964
  {
10965
- className: `${styles$d.scrollToBottom} ${!renderedIndexes || renderedIndexes[3] ? styles$d.hidden : ""}`
10965
+ className: `${styles$e.scrollToBottom} ${!renderedIndexes || renderedIndexes[3] ? styles$e.hidden : ""}`
10966
10966
  }
10967
10967
  )
10968
10968
  ] }),
@@ -10973,7 +10973,7 @@ const TaskListInner = ({
10973
10973
  /* @__PURE__ */ jsx(
10974
10974
  "div",
10975
10975
  {
10976
- className: styles$d.taskListResizer,
10976
+ className: styles$e.taskListResizer,
10977
10977
  onMouseDown: (event) => {
10978
10978
  onTableResizeStart(event.clientX);
10979
10979
  },
@@ -10990,7 +10990,7 @@ const TaskListInner = ({
10990
10990
  const TaskList = memo(TaskListInner);
10991
10991
  const ganttToday = "_ganttToday_1oyhk_1";
10992
10992
  const ganttTodayCircle = "_ganttTodayCircle_1oyhk_9";
10993
- const styles$c = {
10993
+ const styles$d = {
10994
10994
  ganttToday,
10995
10995
  ganttTodayCircle
10996
10996
  };
@@ -11056,7 +11056,7 @@ const GanttTodayInner = ({
11056
11056
  /* @__PURE__ */ jsx(
11057
11057
  "circle",
11058
11058
  {
11059
- className: styles$c.ganttTodayCircle,
11059
+ className: styles$d.ganttTodayCircle,
11060
11060
  cx: x + 1,
11061
11061
  cy: 6,
11062
11062
  r: 6,
@@ -11133,7 +11133,7 @@ const GanttTodayInner = ({
11133
11133
  /* @__PURE__ */ jsx(
11134
11134
  "circle",
11135
11135
  {
11136
- className: styles$c.ganttTodayCircle,
11136
+ className: styles$d.ganttTodayCircle,
11137
11137
  cx: x + 1,
11138
11138
  cy: 6,
11139
11139
  r: 6,
@@ -11176,7 +11176,7 @@ const calendarTopText = "_calendarTopText_15t8b_35";
11176
11176
  const calendarHeader = "_calendarHeader_15t8b_61";
11177
11177
  const calendar = "_calendar_15t8b_1";
11178
11178
  const calendarDragging$1 = "_calendarDragging_15t8b_85";
11179
- const styles$b = {
11179
+ const styles$c = {
11180
11180
  calendarBottomText,
11181
11181
  calendarTopTick,
11182
11182
  calendarTopText,
@@ -11207,10 +11207,10 @@ const TopPartOfCalendar = ({
11207
11207
  y1: y1Line,
11208
11208
  x2: x1Line,
11209
11209
  y2: y2Line,
11210
- className: styles$b.calendarTopTick
11210
+ className: styles$c.calendarTopTick
11211
11211
  }
11212
11212
  ),
11213
- value !== null && /* @__PURE__ */ jsx("text", { y: yText - 4, x: xText, className: styles$b.calendarTopText, children: value.toString().split(",")[1] ? t(value.toString().split(",")[0]) + "," + value.toString().split(",")[1] : value.toString().length >= 3 ? t(value.toString()) : value })
11213
+ value !== null && /* @__PURE__ */ 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 })
11214
11214
  ] });
11215
11215
  };
11216
11216
  const defaultRenderBottomHeader = (date, viewMode, dateSetup, index2, isUnknownDates) => {
@@ -11370,7 +11370,7 @@ const Calendar = ({
11370
11370
  [renderTopHeader, dateSetup]
11371
11371
  );
11372
11372
  const renderBottomText = (x, y, key2, text) => {
11373
- return /* @__PURE__ */ jsx("g", { className: styles$b.calendarBottomText, children: /* @__PURE__ */ jsx(
11373
+ return /* @__PURE__ */ jsx("g", { className: styles$c.calendarBottomText, children: /* @__PURE__ */ jsx(
11374
11374
  "text",
11375
11375
  {
11376
11376
  y,
@@ -11665,7 +11665,7 @@ const Calendar = ({
11665
11665
  scrollLeft: scrollRef.current.scrollLeft,
11666
11666
  scrollTop: scrollRef.current.scrollTop
11667
11667
  };
11668
- calendarContainer.classList.add(styles$b.calendarDragging);
11668
+ calendarContainer.classList.add(styles$c.calendarDragging);
11669
11669
  };
11670
11670
  const onScrollMove = (event) => {
11671
11671
  if (!moveStateRef.current) {
@@ -11680,7 +11680,7 @@ const Calendar = ({
11680
11680
  const onScrollEnd = (event) => {
11681
11681
  event.preventDefault();
11682
11682
  moveStateRef.current = null;
11683
- calendarContainer.classList.remove(styles$b.calendarDragging);
11683
+ calendarContainer.classList.remove(styles$c.calendarDragging);
11684
11684
  };
11685
11685
  calendarContainer.addEventListener("mousemove", onScrollMove);
11686
11686
  calendarContainer.addEventListener("mousedown", onScrollStart);
@@ -11697,7 +11697,7 @@ const Calendar = ({
11697
11697
  "g",
11698
11698
  {
11699
11699
  ref: calendarRef,
11700
- className: `${styles$b.calendar} calendar`,
11700
+ className: `${styles$c.calendar} calendar`,
11701
11701
  fontSize: "var(--gantt-font-size)",
11702
11702
  fontFamily: "var(--gantt-font-family)",
11703
11703
  children: [
@@ -11708,7 +11708,7 @@ const Calendar = ({
11708
11708
  y: 0,
11709
11709
  width: fullSvgWidth,
11710
11710
  height: headerHeight,
11711
- className: styles$b.calendarHeader
11711
+ className: styles$c.calendarHeader
11712
11712
  }
11713
11713
  ),
11714
11714
  topValues,
@@ -11727,10 +11727,10 @@ const generateTrianglePoints = (x, y, width, isLeftDirected) => {
11727
11727
  ${x - width},${y - width}
11728
11728
  ${x - width},${y + width}`;
11729
11729
  };
11730
- const arrow_clickable = "_arrow_clickable_w0fo0_1";
11731
- const mainPath = "_mainPath_w0fo0_11";
11732
- const clickZone = "_clickZone_w0fo0_57";
11733
- const styles$a = {
11730
+ const arrow_clickable = "_arrow_clickable_13ifc_1";
11731
+ const mainPath = "_mainPath_13ifc_9";
11732
+ const clickZone = "_clickZone_13ifc_33";
11733
+ const styles$b = {
11734
11734
  arrow_clickable,
11735
11735
  mainPath,
11736
11736
  clickZone
@@ -11753,6 +11753,7 @@ const ArrowInner = (props) => {
11753
11753
  isCritical,
11754
11754
  rtl,
11755
11755
  onArrowDoubleClick = void 0,
11756
+ onArrowClick = void 0,
11756
11757
  fromConnectionIndex = 0,
11757
11758
  fromTotalConnections = 1,
11758
11759
  toConnectionIndex = 0,
@@ -11771,6 +11772,11 @@ const ArrowInner = (props) => {
11771
11772
  onArrowDoubleClick(taskFrom, taskTo);
11772
11773
  }
11773
11774
  }, [taskFrom, taskTo, onArrowDoubleClick]);
11775
+ const handleClick = useCallback(() => {
11776
+ if (onArrowClick) {
11777
+ onArrowClick(taskFrom, taskTo);
11778
+ }
11779
+ }, [taskFrom, taskTo, onArrowClick]);
11774
11780
  const [path, trianglePoints] = useMemo(
11775
11781
  () => drownPathAndTriangle(
11776
11782
  indexFrom,
@@ -11818,19 +11824,29 @@ const ArrowInner = (props) => {
11818
11824
  }
11819
11825
  return "var(--gantt-arrow-color)";
11820
11826
  }, [isCritical]);
11821
- return /* @__PURE__ */ jsx("g", { fill: color, stroke: color, children: /* @__PURE__ */ jsxs(
11827
+ return /* @__PURE__ */ jsx(
11822
11828
  "g",
11823
11829
  {
11824
- "data-testid": `task-arrow-${targetFrom}-${taskFrom.name}-${targetTo}-${taskTo.name}`,
11825
- className: `arrow ${styles$a.arrow_clickable}`,
11826
- onDoubleClick,
11827
- children: [
11828
- onArrowDoubleClick && /* @__PURE__ */ jsx("path", { d: path, className: styles$a.clickZone }),
11829
- /* @__PURE__ */ jsx("path", { className: styles$a.mainPath, d: path }),
11830
- /* @__PURE__ */ jsx("polygon", { className: "polygon", points: trianglePoints })
11831
- ]
11830
+ fill: color,
11831
+ stroke: color,
11832
+ "data-arrow-from": taskFrom.id,
11833
+ "data-arrow-to": taskTo.id,
11834
+ children: /* @__PURE__ */ jsxs(
11835
+ "g",
11836
+ {
11837
+ "data-testid": `task-arrow-${targetFrom}-${taskFrom.name}-${targetTo}-${taskTo.name}`,
11838
+ className: `arrow ${styles$b.arrow_clickable}`,
11839
+ onDoubleClick,
11840
+ onClick: handleClick,
11841
+ children: [
11842
+ onArrowDoubleClick && /* @__PURE__ */ jsx("path", { d: path, className: styles$b.clickZone }),
11843
+ /* @__PURE__ */ jsx("path", { className: styles$b.mainPath, d: path }),
11844
+ /* @__PURE__ */ jsx("polygon", { className: "polygon", points: trianglePoints })
11845
+ ]
11846
+ }
11847
+ )
11832
11848
  }
11833
- ) });
11849
+ );
11834
11850
  };
11835
11851
  const Arrow = memo(ArrowInner);
11836
11852
  const roundedPath = (points, radius) => {
@@ -11922,7 +11938,7 @@ const drownPathAndTriangle = (indexForm, fromX1, fromX2, fromY, isTaskFromLeftSi
11922
11938
  return [path, trianglePoints];
11923
11939
  };
11924
11940
  const relationLine = "_relationLine_wh2qy_1";
11925
- const styles$9 = {
11941
+ const styles$a = {
11926
11942
  relationLine
11927
11943
  };
11928
11944
  const RelationLine = ({
@@ -11938,7 +11954,7 @@ const RelationLine = ({
11938
11954
  x2,
11939
11955
  y1,
11940
11956
  y2,
11941
- className: styles$9.relationLine
11957
+ className: styles$a.relationLine
11942
11958
  }
11943
11959
  );
11944
11960
  };
@@ -12161,7 +12177,7 @@ const barHandle = "_barHandle_5jhkr_11";
12161
12177
  const barHandleImportantVisible = "_barHandleImportantVisible_5jhkr_37";
12162
12178
  const barHandleImportantHidden = "_barHandleImportantHidden_5jhkr_47";
12163
12179
  const barBackground = "_barBackground_5jhkr_57";
12164
- const styles$8 = {
12180
+ const styles$9 = {
12165
12181
  barWrapper,
12166
12182
  barHandle,
12167
12183
  barHandleImportantVisible,
@@ -12263,7 +12279,7 @@ const BarDisplay = ({
12263
12279
  ry: barCornerRadius,
12264
12280
  rx: barCornerRadius,
12265
12281
  fill: barColor,
12266
- className: styles$8.barBackground
12282
+ className: styles$9.barBackground
12267
12283
  }
12268
12284
  ),
12269
12285
  showProgress && /* @__PURE__ */ jsx(
@@ -12320,7 +12336,7 @@ const BarDateHandle = ({
12320
12336
  const projectWrapper = "_projectWrapper_1maxt_1";
12321
12337
  const projectBackground = "_projectBackground_1maxt_11";
12322
12338
  const projectTop = "_projectTop_1maxt_21";
12323
- const styles$7 = {
12339
+ const styles$8 = {
12324
12340
  projectWrapper,
12325
12341
  projectBackground,
12326
12342
  projectTop
@@ -12401,7 +12417,7 @@ const ProjectDisplay = ({
12401
12417
  startMoveFullTask(firstTouch.clientX);
12402
12418
  }
12403
12419
  },
12404
- className: styles$7.projectWrapper,
12420
+ className: styles$8.projectWrapper,
12405
12421
  children: [
12406
12422
  /* @__PURE__ */ jsx(
12407
12423
  "rect",
@@ -12413,7 +12429,7 @@ const ProjectDisplay = ({
12413
12429
  height: taskHeight,
12414
12430
  rx: barCornerRadius,
12415
12431
  ry: barCornerRadius,
12416
- className: styles$7.projectBackground
12432
+ className: styles$8.projectBackground
12417
12433
  }
12418
12434
  ),
12419
12435
  showProgress && /* @__PURE__ */ jsx(
@@ -12438,13 +12454,13 @@ const ProjectDisplay = ({
12438
12454
  height: taskHalfHeight,
12439
12455
  rx: barCornerRadius,
12440
12456
  ry: barCornerRadius,
12441
- className: styles$7.projectTop
12457
+ className: styles$8.projectTop
12442
12458
  }
12443
12459
  ),
12444
12460
  /* @__PURE__ */ jsx(
12445
12461
  "polygon",
12446
12462
  {
12447
- className: styles$7.projectTop,
12463
+ className: styles$8.projectTop,
12448
12464
  points: projectLeftTriangle,
12449
12465
  fill: barColor
12450
12466
  }
@@ -12452,7 +12468,7 @@ const ProjectDisplay = ({
12452
12468
  /* @__PURE__ */ jsx(
12453
12469
  "polygon",
12454
12470
  {
12455
- className: styles$7.projectTop,
12471
+ className: styles$8.projectTop,
12456
12472
  points: projectRightTriangle,
12457
12473
  fill: barColor
12458
12474
  }
@@ -12464,7 +12480,7 @@ const ProjectDisplay = ({
12464
12480
  const barRelationHandleWrapper = "_barRelationHandleWrapper_eluno_1";
12465
12481
  const barRelationHandle = "_barRelationHandle_eluno_1";
12466
12482
  const barRelationHandle_drawMode = "_barRelationHandle_drawMode_eluno_9";
12467
- const styles$6 = {
12483
+ const styles$7 = {
12468
12484
  barRelationHandleWrapper,
12469
12485
  barRelationHandle,
12470
12486
  barRelationHandle_drawMode
@@ -12484,7 +12500,7 @@ const BarRelationHandleInner = ({
12484
12500
  cx: x,
12485
12501
  cy: y,
12486
12502
  r: radius,
12487
- className: `${styles$6.barRelationHandle} ${isRelationDrawMode ? styles$6.barRelationHandle_drawMode : ""}`,
12503
+ className: `${styles$7.barRelationHandle} ${isRelationDrawMode ? styles$7.barRelationHandle_drawMode : ""}`,
12488
12504
  onMouseDown: startDrawRelation,
12489
12505
  onTouchStart: startDrawRelation
12490
12506
  }
@@ -12497,7 +12513,7 @@ const BarRelationWrapperInner = forwardRef(({ className, children }, ref) => {
12497
12513
  {
12498
12514
  ref,
12499
12515
  tabIndex: 0,
12500
- className: `${styles$6.barRelationHandleWrapper} ${className || ""}`,
12516
+ className: `${styles$7.barRelationHandleWrapper} ${className || ""}`,
12501
12517
  children
12502
12518
  }
12503
12519
  );
@@ -12638,12 +12654,12 @@ const Bar = (props) => {
12638
12654
  return () => {
12639
12655
  };
12640
12656
  }, []);
12641
- return /* @__PURE__ */ jsxs(BarRelationWrapper, { ref: rootRef, className: styles$8.barWrapper, children: [
12657
+ return /* @__PURE__ */ jsxs(BarRelationWrapper, { ref: rootRef, className: styles$9.barWrapper, children: [
12642
12658
  task.id !== "no-project-asigned" && renderBarDisplay(),
12643
12659
  ctrlPressed && isDateChangeable(task) && /* @__PURE__ */ jsx(
12644
12660
  BarDateHandle,
12645
12661
  {
12646
- className: `${styles$8.barHandle} ${isMovingDate ? styles$8.barHandleImportantVisible : ""} ${isMovingProgress || isRelationDrawMode ? styles$8.barHandleImportantHidden : ""}`,
12662
+ className: `${styles$9.barHandle} ${isMovingDate ? styles$9.barHandleImportantVisible : ""} ${isMovingProgress || isRelationDrawMode ? styles$9.barHandleImportantHidden : ""}`,
12647
12663
  dataTestId: `bar-date-handle-left-${task.id}`,
12648
12664
  barCornerRadius,
12649
12665
  height: handleHeight,
@@ -12656,7 +12672,7 @@ const Bar = (props) => {
12656
12672
  ctrlPressed && isDateChangeable(task) && /* @__PURE__ */ jsx(
12657
12673
  BarDateHandle,
12658
12674
  {
12659
- className: `${styles$8.barHandle} ${isMovingDate ? styles$8.barHandleImportantVisible : ""} ${isMovingProgress || isRelationDrawMode ? styles$8.barHandleImportantHidden : ""}`,
12675
+ className: `${styles$9.barHandle} ${isMovingDate ? styles$9.barHandleImportantVisible : ""} ${isMovingProgress || isRelationDrawMode ? styles$9.barHandleImportantHidden : ""}`,
12660
12676
  dataTestId: `bar-date-handle-right-${task.id}`,
12661
12677
  barCornerRadius,
12662
12678
  height: handleHeight,
@@ -12672,7 +12688,7 @@ const Bar = (props) => {
12672
12688
  };
12673
12689
  const milestoneWrapper = "_milestoneWrapper_vcirf_1";
12674
12690
  const milestoneBackground = "_milestoneBackground_vcirf_11";
12675
- const styles$5 = {
12691
+ const styles$6 = {
12676
12692
  milestoneWrapper,
12677
12693
  milestoneBackground
12678
12694
  };
@@ -12702,7 +12718,7 @@ const Milestone = ({
12702
12718
  }
12703
12719
  return "var(--gantt-milestone-background-color)";
12704
12720
  }, [isSelected, isCritical]);
12705
- return /* @__PURE__ */ jsxs(BarRelationWrapper, { className: styles$5.milestoneWrapper, children: [
12721
+ return /* @__PURE__ */ jsxs(BarRelationWrapper, { className: styles$6.milestoneWrapper, children: [
12706
12722
  /* @__PURE__ */ jsx(
12707
12723
  "rect",
12708
12724
  {
@@ -12715,7 +12731,7 @@ const Milestone = ({
12715
12731
  rx: barCornerRadius,
12716
12732
  ry: barCornerRadius,
12717
12733
  transform,
12718
- className: styles$5.milestoneBackground,
12734
+ className: styles$6.milestoneBackground,
12719
12735
  onMouseDown: (e) => {
12720
12736
  e.stopPropagation();
12721
12737
  onTaskEventStart("move", e.clientX);
@@ -13041,11 +13057,11 @@ const TaskItemInner = (props) => {
13041
13057
  };
13042
13058
  const TaskItem = memo(TaskItemInner);
13043
13059
  const TaskItemWrapper = "_TaskItemWrapper_8x02m_1";
13044
- const styles$4 = {
13060
+ const styles$5 = {
13045
13061
  TaskItemWrapper
13046
13062
  };
13047
13063
  const barComparison = "_barComparison_14078_1";
13048
- const styles$3 = {
13064
+ const styles$4 = {
13049
13065
  barComparison
13050
13066
  };
13051
13067
  const BarComparison = (props) => {
@@ -13100,7 +13116,7 @@ const BarComparison = (props) => {
13100
13116
  ry: barCornerRadius,
13101
13117
  rx: barCornerRadius,
13102
13118
  fill: barColor,
13103
- className: styles$3.barComparison
13119
+ className: styles$4.barComparison
13104
13120
  }
13105
13121
  ),
13106
13122
  /* @__PURE__ */ jsx(
@@ -13170,7 +13186,9 @@ const TaskGanttContentInner = (props) => {
13170
13186
  waitCommitTasks,
13171
13187
  viewMode,
13172
13188
  showProgress = true,
13173
- progressColor
13189
+ progressColor,
13190
+ onArrowClick,
13191
+ selectedArrow
13174
13192
  } = props;
13175
13193
  const renderedHolidays = useMemo(() => {
13176
13194
  const { columnWidth } = distances;
@@ -13300,7 +13318,7 @@ const TaskGanttContentInner = (props) => {
13300
13318
  "svg",
13301
13319
  {
13302
13320
  id: task.id,
13303
- className: `${styles$4.TaskItemWrapper} TaskItemWrapper`,
13321
+ className: `${styles$5.TaskItemWrapper} TaskItemWrapper`,
13304
13322
  x: Math.max(safeContainerX + (additionalLeftSpace || 0), 0),
13305
13323
  y: safeLevelY,
13306
13324
  width: Math.max(safeContainerWidth, 0),
@@ -13452,6 +13470,7 @@ const TaskGanttContentInner = (props) => {
13452
13470
  isCritical: isCritical2,
13453
13471
  rtl,
13454
13472
  onArrowDoubleClick,
13473
+ onArrowClick,
13455
13474
  fromConnectionIndex: getConnectionIndex(
13456
13475
  `${source.id}|${sourceTarget}|out`
13457
13476
  ),
@@ -13536,6 +13555,7 @@ const TaskGanttContentInner = (props) => {
13536
13555
  isCritical: isCritical2,
13537
13556
  rtl,
13538
13557
  onArrowDoubleClick,
13558
+ onArrowClick,
13539
13559
  fromConnectionIndex: getConnectionIndex(
13540
13560
  `${taskId}|${ownTarget}|out`
13541
13561
  ),
@@ -13633,6 +13653,7 @@ const TaskGanttContentInner = (props) => {
13633
13653
  isCritical,
13634
13654
  rtl,
13635
13655
  onArrowDoubleClick,
13656
+ onArrowClick,
13636
13657
  fromConnectionIndex: getConnectionIndex(
13637
13658
  `${source.id}|${sourceTarget}|out`
13638
13659
  ),
@@ -13690,10 +13711,81 @@ const TaskGanttContentInner = (props) => {
13690
13711
  isRelationChangeable,
13691
13712
  visibleTasksMirror,
13692
13713
  onArrowDoubleClick,
13714
+ onArrowClick,
13693
13715
  showProgress,
13694
13716
  progressColor
13695
13717
  ]);
13696
- return /* @__PURE__ */ jsxs("g", { className: "content", children: [
13718
+ const contentRef = useRef(null);
13719
+ useEffect(() => {
13720
+ const contentEl = contentRef.current;
13721
+ if (!contentEl)
13722
+ return void 0;
13723
+ const svgRoot = contentEl.ownerSVGElement;
13724
+ if (!svgRoot)
13725
+ return void 0;
13726
+ let currentHighlightedTask = null;
13727
+ const highlightArrows = (taskId) => {
13728
+ if (currentHighlightedTask === taskId)
13729
+ return;
13730
+ clearHighlights();
13731
+ currentHighlightedTask = taskId;
13732
+ const arrows = svgRoot.querySelectorAll(
13733
+ `[data-arrow-from="${taskId}"], [data-arrow-to="${taskId}"]`
13734
+ );
13735
+ arrows.forEach((el) => el.classList.add("gantt-arrow-highlighted"));
13736
+ };
13737
+ const clearHighlights = () => {
13738
+ if (!currentHighlightedTask)
13739
+ return;
13740
+ svgRoot.querySelectorAll(".gantt-arrow-highlighted").forEach((el) => el.classList.remove("gantt-arrow-highlighted"));
13741
+ currentHighlightedTask = null;
13742
+ };
13743
+ const onMouseOver = (e) => {
13744
+ const target = e.target;
13745
+ const taskWrapper = target.closest(".TaskItemWrapper");
13746
+ if (taskWrapper && taskWrapper.id) {
13747
+ highlightArrows(taskWrapper.id);
13748
+ }
13749
+ };
13750
+ const onMouseOut = (e) => {
13751
+ const target = e.target;
13752
+ const taskWrapper = target.closest(".TaskItemWrapper");
13753
+ if (taskWrapper) {
13754
+ const relatedTarget = e.relatedTarget;
13755
+ if (!relatedTarget || !taskWrapper.contains(relatedTarget)) {
13756
+ clearHighlights();
13757
+ }
13758
+ }
13759
+ };
13760
+ contentEl.addEventListener("mouseover", onMouseOver);
13761
+ contentEl.addEventListener("mouseout", onMouseOut);
13762
+ return () => {
13763
+ contentEl.removeEventListener("mouseover", onMouseOver);
13764
+ contentEl.removeEventListener("mouseout", onMouseOut);
13765
+ };
13766
+ }, []);
13767
+ useLayoutEffect(() => {
13768
+ const contentEl = contentRef.current;
13769
+ if (!contentEl)
13770
+ return;
13771
+ const svgRoot = contentEl.ownerSVGElement;
13772
+ if (!svgRoot)
13773
+ return;
13774
+ svgRoot.querySelectorAll(".gantt-arrow-selected").forEach((el) => el.classList.remove("gantt-arrow-selected"));
13775
+ if (!selectedArrow)
13776
+ return;
13777
+ if (selectedArrow.taskId) {
13778
+ svgRoot.querySelectorAll(
13779
+ `[data-arrow-from="${selectedArrow.taskId}"], [data-arrow-to="${selectedArrow.taskId}"]`
13780
+ ).forEach((el) => el.classList.add("gantt-arrow-selected"));
13781
+ }
13782
+ if (selectedArrow.fromId && selectedArrow.toId) {
13783
+ svgRoot.querySelectorAll(
13784
+ `[data-arrow-from="${selectedArrow.fromId}"][data-arrow-to="${selectedArrow.toId}"]`
13785
+ ).forEach((el) => el.classList.add("gantt-arrow-selected"));
13786
+ }
13787
+ }, [selectedArrow, renderedArrows]);
13788
+ return /* @__PURE__ */ jsxs("g", { className: "content", ref: contentRef, children: [
13697
13789
  renderedSelectedTasks,
13698
13790
  /* @__PURE__ */ jsx("g", { children: renderedHolidays }),
13699
13791
  /* @__PURE__ */ jsx(
@@ -13730,7 +13822,7 @@ const ganttVerticalContainer = "_ganttVerticalContainer_1wr55_1";
13730
13822
  const horizontalContainer = "_horizontalContainer_1wr55_73";
13731
13823
  const wrapper = "_wrapper_1wr55_85";
13732
13824
  const calendarDragging = "_calendarDragging_1wr55_109";
13733
- const styles$2 = {
13825
+ const styles$3 = {
13734
13826
  ganttVerticalContainer,
13735
13827
  horizontalContainer,
13736
13828
  wrapper,
@@ -13814,7 +13906,7 @@ const TaskGanttInner = (props) => {
13814
13906
  scrollLeft: verticalScrollbarRef.current.scrollLeft,
13815
13907
  scrollTop: verticalScrollbarRef.current.scrollTop
13816
13908
  };
13817
- contentContainer.classList.add(styles$2.calendarDragging);
13909
+ contentContainer.classList.add(styles$3.calendarDragging);
13818
13910
  };
13819
13911
  const onScrollMove = (event) => {
13820
13912
  if (!moveStateVertRef.current) {
@@ -13847,7 +13939,7 @@ const TaskGanttInner = (props) => {
13847
13939
  event.preventDefault();
13848
13940
  moveStateVertRef.current = null;
13849
13941
  moveStateHorRef.current = null;
13850
- contentContainer.classList.remove(styles$2.calendarDragging);
13942
+ contentContainer.classList.remove(styles$3.calendarDragging);
13851
13943
  };
13852
13944
  contentContainer.addEventListener("mousemove", onScrollMove);
13853
13945
  contentContainer.addEventListener("mousedown", onScrollStart);
@@ -13863,7 +13955,7 @@ const TaskGanttInner = (props) => {
13863
13955
  return /* @__PURE__ */ jsxs(
13864
13956
  "div",
13865
13957
  {
13866
- className: styles$2.ganttVerticalContainer,
13958
+ className: styles$3.ganttVerticalContainer,
13867
13959
  ref: verticalGanttContainerRef,
13868
13960
  onScroll: onVerticalScrollbarScrollX,
13869
13961
  dir: "ltr",
@@ -13882,7 +13974,7 @@ const TaskGanttInner = (props) => {
13882
13974
  "div",
13883
13975
  {
13884
13976
  ref: horizontalContainerRef,
13885
- className: styles$2.horizontalContainer,
13977
+ className: styles$3.horizontalContainer,
13886
13978
  style: containerStyle,
13887
13979
  children: /* @__PURE__ */ jsx("div", { style: gridStyle, children: /* @__PURE__ */ jsxs(
13888
13980
  "svg",
@@ -18374,7 +18466,7 @@ const useContextMenu = (wrapperRef, scrollToTask) => {
18374
18466
  const menuOption = "_menuOption_1c3e3_3";
18375
18467
  const icon = "_icon_1c3e3_81";
18376
18468
  const label = "_label_1c3e3_89";
18377
- const styles$1 = {
18469
+ const styles$2 = {
18378
18470
  menuOption,
18379
18471
  icon,
18380
18472
  label
@@ -18468,7 +18560,7 @@ function MenuOption(props) {
18468
18560
  /* @__PURE__ */ jsxs(
18469
18561
  "button",
18470
18562
  {
18471
- className: styles$1.menuOption,
18563
+ className: styles$2.menuOption,
18472
18564
  "aria-disabled": disabled,
18473
18565
  disabled,
18474
18566
  style: {
@@ -18483,7 +18575,7 @@ function MenuOption(props) {
18483
18575
  /* @__PURE__ */ jsx(
18484
18576
  "div",
18485
18577
  {
18486
- className: styles$1.icon,
18578
+ className: styles$2.icon,
18487
18579
  style: {
18488
18580
  width: contextMenuIconWidth,
18489
18581
  color: "var(--gantt-context-menu-text-color)",
@@ -18492,7 +18584,7 @@ function MenuOption(props) {
18492
18584
  children: icon2
18493
18585
  }
18494
18586
  ),
18495
- /* @__PURE__ */ jsx("div", { className: styles$1.label, children: label2 }),
18587
+ /* @__PURE__ */ jsx("div", { className: styles$2.label, children: label2 }),
18496
18588
  children && children.length > 0 && /* @__PURE__ */ jsx(
18497
18589
  "div",
18498
18590
  {
@@ -19301,15 +19393,119 @@ const GANTT_EN_LOCALE = {
19301
19393
  const loader = "_loader_covn4_5";
19302
19394
  const l16 = "_l16_covn4_1";
19303
19395
  const loaderHidden = "_loaderHidden_covn4_49";
19304
- const styles = {
19396
+ const styles$1 = {
19305
19397
  loader,
19306
19398
  l16,
19307
19399
  loaderHidden
19308
19400
  };
19309
19401
  const GanttLoaderInner = ({ loading }) => {
19310
- return /* @__PURE__ */ jsx("div", { className: `${styles.loader} ${loading ? "" : styles.loaderHidden}` });
19402
+ return /* @__PURE__ */ jsx("div", { className: `${styles$1.loader} ${loading ? "" : styles$1.loaderHidden}` });
19311
19403
  };
19312
19404
  const GanttLoader = memo(GanttLoaderInner);
19405
+ const drawerOverlay = "_drawerOverlay_3p2w6_1";
19406
+ const drawer = "_drawer_3p2w6_1";
19407
+ const slideIn = "_slideIn_3p2w6_1";
19408
+ const drawerHeader = "_drawerHeader_3p2w6_71";
19409
+ const closeButton = "_closeButton_3p2w6_89";
19410
+ const drawerContent = "_drawerContent_3p2w6_127";
19411
+ const defaultSection = "_defaultSection_3p2w6_139";
19412
+ const defaultField = "_defaultField_3p2w6_175";
19413
+ const defaultFieldLabel = "_defaultFieldLabel_3p2w6_191";
19414
+ const styles = {
19415
+ drawerOverlay,
19416
+ drawer,
19417
+ slideIn,
19418
+ drawerHeader,
19419
+ closeButton,
19420
+ drawerContent,
19421
+ defaultSection,
19422
+ defaultField,
19423
+ defaultFieldLabel
19424
+ };
19425
+ const DefaultDrawerContent = ({
19426
+ data
19427
+ }) => {
19428
+ var _a, _b, _c, _d, _e, _f;
19429
+ if (data.type === "task" && data.task) {
19430
+ const { task } = data;
19431
+ return /* @__PURE__ */ jsxs("div", { className: styles.defaultSection, children: [
19432
+ /* @__PURE__ */ jsx("h3", { children: "Task Details" }),
19433
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19434
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "Name:" }),
19435
+ /* @__PURE__ */ jsx("span", { children: task.name })
19436
+ ] }),
19437
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19438
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "Start:" }),
19439
+ /* @__PURE__ */ jsx("span", { children: (_a = task.start) == null ? void 0 : _a.toLocaleDateString() })
19440
+ ] }),
19441
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19442
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "End:" }),
19443
+ /* @__PURE__ */ jsx("span", { children: (_b = task.end) == null ? void 0 : _b.toLocaleDateString() })
19444
+ ] }),
19445
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19446
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "Progress:" }),
19447
+ /* @__PURE__ */ jsxs("span", { children: [
19448
+ Math.round(task.progress || 0),
19449
+ "%"
19450
+ ] })
19451
+ ] })
19452
+ ] });
19453
+ }
19454
+ if (data.type === "connection" && data.taskFrom && data.taskTo) {
19455
+ return /* @__PURE__ */ jsxs("div", { className: styles.defaultSection, children: [
19456
+ /* @__PURE__ */ jsx("h3", { children: "Connection Details" }),
19457
+ /* @__PURE__ */ jsx("h4", { children: "From" }),
19458
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19459
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "Name:" }),
19460
+ /* @__PURE__ */ jsx("span", { children: data.taskFrom.name })
19461
+ ] }),
19462
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19463
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "Start:" }),
19464
+ /* @__PURE__ */ jsx("span", { children: (_c = data.taskFrom.start) == null ? void 0 : _c.toLocaleDateString() })
19465
+ ] }),
19466
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19467
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "End:" }),
19468
+ /* @__PURE__ */ jsx("span", { children: (_d = data.taskFrom.end) == null ? void 0 : _d.toLocaleDateString() })
19469
+ ] }),
19470
+ /* @__PURE__ */ jsx("h4", { children: "To" }),
19471
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19472
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "Name:" }),
19473
+ /* @__PURE__ */ jsx("span", { children: data.taskTo.name })
19474
+ ] }),
19475
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19476
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "Start:" }),
19477
+ /* @__PURE__ */ jsx("span", { children: (_e = data.taskTo.start) == null ? void 0 : _e.toLocaleDateString() })
19478
+ ] }),
19479
+ /* @__PURE__ */ jsxs("div", { className: styles.defaultField, children: [
19480
+ /* @__PURE__ */ jsx("span", { className: styles.defaultFieldLabel, children: "End:" }),
19481
+ /* @__PURE__ */ jsx("span", { children: (_f = data.taskTo.end) == null ? void 0 : _f.toLocaleDateString() })
19482
+ ] })
19483
+ ] });
19484
+ }
19485
+ return null;
19486
+ };
19487
+ const GanttDrawer = ({
19488
+ open,
19489
+ width,
19490
+ data,
19491
+ onClose,
19492
+ renderContent
19493
+ }) => {
19494
+ if (!open || !data)
19495
+ return null;
19496
+ return /* @__PURE__ */ jsx("div", { className: styles.drawerOverlay, children: /* @__PURE__ */ jsxs("div", { className: styles.drawer, style: { width }, children: [
19497
+ /* @__PURE__ */ jsx("div", { className: styles.drawerHeader, children: /* @__PURE__ */ jsx(
19498
+ "button",
19499
+ {
19500
+ className: styles.closeButton,
19501
+ onClick: onClose,
19502
+ "aria-label": "Close drawer",
19503
+ children: "×"
19504
+ }
19505
+ ) }),
19506
+ /* @__PURE__ */ jsx("div", { className: styles.drawerContent, children: renderContent ? renderContent(data) : /* @__PURE__ */ jsx(DefaultDrawerContent, { data }) })
19507
+ ] }) });
19508
+ };
19313
19509
  const Gantt = (props) => {
19314
19510
  var _a, _b;
19315
19511
  const {
@@ -19355,7 +19551,11 @@ const Gantt = (props) => {
19355
19551
  dataDateLabel = "Data Date",
19356
19552
  showProgress = true,
19357
19553
  progressColor,
19358
- scrollToTaskId
19554
+ scrollToTaskId,
19555
+ enableDrawer = false,
19556
+ drawerWidth = 300,
19557
+ renderDrawerContent,
19558
+ onArrowClick: onArrowClickProp
19359
19559
  } = props;
19360
19560
  const ganttSVGRef = useRef(null);
19361
19561
  const wrapperRef = useRef(null);
@@ -19372,6 +19572,36 @@ const Gantt = (props) => {
19372
19572
  [theme, rowHeight]
19373
19573
  );
19374
19574
  const [waitCommitTasks, setWaitCommitTasks] = useState(false);
19575
+ const [drawerData, setDrawerData] = useState(null);
19576
+ const [selectedArrow, setSelectedArrow] = useState(null);
19577
+ const handleDrawerClose = useCallback(() => {
19578
+ setDrawerData(null);
19579
+ setSelectedArrow(null);
19580
+ }, []);
19581
+ const handleBarClickForDrawer = useCallback(
19582
+ (task, _event) => {
19583
+ if (clientTaskBar == null ? void 0 : clientTaskBar.onClick) {
19584
+ clientTaskBar.onClick(task);
19585
+ }
19586
+ if (enableDrawer) {
19587
+ setDrawerData({ type: "task", task });
19588
+ setSelectedArrow({ taskId: task.id });
19589
+ }
19590
+ },
19591
+ [clientTaskBar == null ? void 0 : clientTaskBar.onClick, enableDrawer]
19592
+ );
19593
+ const handleArrowClickForDrawer = useCallback(
19594
+ (taskFrom, taskTo) => {
19595
+ if (onArrowClickProp) {
19596
+ onArrowClickProp(taskFrom, taskTo);
19597
+ }
19598
+ if (enableDrawer) {
19599
+ setDrawerData({ type: "connection", taskFrom, taskTo });
19600
+ setSelectedArrow({ fromId: taskFrom.id, toId: taskTo.id });
19601
+ }
19602
+ },
19603
+ [onArrowClickProp, enableDrawer]
19604
+ );
19375
19605
  const taskBar = useMemo(() => {
19376
19606
  return mergeDeepObj(
19377
19607
  {},
@@ -20684,7 +20914,10 @@ const Gantt = (props) => {
20684
20914
  visibleTasksMirror,
20685
20915
  viewMode,
20686
20916
  showProgress,
20687
- progressColor
20917
+ progressColor,
20918
+ onArrowClick: enableDrawer ? handleArrowClickForDrawer : void 0,
20919
+ onClick: enableDrawer ? handleBarClickForDrawer : taskBar.onClick,
20920
+ selectedArrow
20688
20921
  }),
20689
20922
  [
20690
20923
  viewMode,
@@ -20723,7 +20956,11 @@ const Gantt = (props) => {
20723
20956
  changeInProgress == null ? void 0 : changeInProgress.action,
20724
20957
  handleDeleteTasks,
20725
20958
  showProgress,
20726
- progressColor
20959
+ progressColor,
20960
+ enableDrawer,
20961
+ handleArrowClickForDrawer,
20962
+ handleBarClickForDrawer,
20963
+ selectedArrow
20727
20964
  ]
20728
20965
  );
20729
20966
  const renderTaskListProps = useMemo(
@@ -20792,7 +21029,7 @@ const Gantt = (props) => {
20792
21029
  "div",
20793
21030
  {
20794
21031
  style: cssVars,
20795
- className: `${styles$2.wrapper} gantt`,
21032
+ className: `${styles$3.wrapper} gantt`,
20796
21033
  onKeyDown: handleKeyDown,
20797
21034
  tabIndex: 0,
20798
21035
  ref: wrapperRef,
@@ -20876,7 +21113,17 @@ const Gantt = (props) => {
20876
21113
  boundaryElement: verticalGanttContainerRef
20877
21114
  }
20878
21115
  ),
20879
- /* @__PURE__ */ jsx(GanttLoader, { loading: waitCommitTasks })
21116
+ /* @__PURE__ */ jsx(GanttLoader, { loading: waitCommitTasks }),
21117
+ enableDrawer && /* @__PURE__ */ jsx(
21118
+ GanttDrawer,
21119
+ {
21120
+ open: drawerData !== null,
21121
+ width: drawerWidth,
21122
+ data: drawerData,
21123
+ onClose: handleDrawerClose,
21124
+ renderContent: renderDrawerContent
21125
+ }
21126
+ )
20880
21127
  ]
20881
21128
  }
20882
21129
  ) }) });