@baishuyun/ui-base 6.4.1 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/Amap/{Amap-DL5dLiUm.js → Amap-Dnvu_pUP.js} +1 -1
  2. package/dist/Amap/AmapCircle/index.js +3 -3
  3. package/dist/Amap/{AmapCircle-mh92P2l6.js → AmapCircle-Wfn43qco.js} +1 -1
  4. package/dist/Amap/AmapMarker/index.js +4 -4
  5. package/dist/Amap/{AmapMarker-DYW0-8Hd.js → AmapMarker-CB66dQIG.js} +2 -2
  6. package/dist/Amap/AmapMarkerCluster/index.js +4 -4
  7. package/dist/Amap/{AmapMarkerCluster-BRVHHMbi.js → AmapMarkerCluster-DvXchCC0.js} +2 -2
  8. package/dist/Amap/AmapProvider/index.js +4 -4
  9. package/dist/Amap/{AmapProvider-CwKdpmCg.js → AmapProvider-XCrqzo9W.js} +2 -2
  10. package/dist/Amap/hooks/index.js +2 -2
  11. package/dist/Amap/{hooks-D1m8KgVM.js → hooks-DwRvpafb.js} +1 -1
  12. package/dist/Amap/index.js +10 -10
  13. package/dist/Calendar/{AllDaySection-CseF1DuB.js → AllDaySection-M-b9tRHh.js} +4 -4
  14. package/dist/Calendar/{Calendar-Yu2HfA5D.js → Calendar-C9PhASp0.js} +13 -13
  15. package/dist/Calendar/{CurrentTimeIndicator-CUeblc9r.js → CurrentTimeIndicator-Dpi36eVJ.js} +1 -1
  16. package/dist/Calendar/{EventCard-L6jaKgEw.js → EventCard-BIfRqCk5.js} +3 -3
  17. package/dist/Calendar/{TimeGrid-B8lvUb1W.js → TimeGrid-Dk3soSo4.js} +2 -2
  18. package/dist/Calendar/context/index.js +1 -1
  19. package/dist/Calendar/index.js +19 -19
  20. package/dist/Calendar/subcomponents/AllDaySection/index.js +7 -7
  21. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +4 -4
  22. package/dist/Calendar/subcomponents/EventCard/index.js +5 -5
  23. package/dist/Calendar/subcomponents/TimeAxis/index.js +3 -3
  24. package/dist/Calendar/subcomponents/TimeGrid/index.js +3 -3
  25. package/dist/Calendar/{theme-BzNDRi0U.js → theme-Cgn0zQoC.js} +2 -2
  26. package/dist/Calendar/utils/index.js +3 -3
  27. package/dist/Calendar/utils/layout/index.js +2 -2
  28. package/dist/Calendar/utils/theme/index.js +1 -1
  29. package/dist/Card/{Card-CRrtIjNT.js → Card-BjWdQRjq.js} +1 -1
  30. package/dist/Card/index.js +2 -2
  31. package/dist/CheckBox/{CheckBox-DIunYcfS.js → CheckBox-81R8QKHb.js} +1 -1
  32. package/dist/CheckBox/{CheckBox-CkVe5Boq.js → CheckBox-ejvbDr-a.js} +1 -1
  33. package/dist/CheckBox/index.js +3 -3
  34. package/dist/ColorPicker/{ColorPicker-By-Y8Tyz.js → ColorPicker-aj57lMA5.js} +5 -5
  35. package/dist/ColorPicker/index.js +6 -6
  36. package/dist/ConfigProvider/index.js +2 -2
  37. package/dist/DatePicker/{DatePicker-PCdNachD.js → DatePicker-EIFyC9zF.js} +6 -6
  38. package/dist/DatePicker/{DatePickerPanel-HoxXteK0.js → DatePickerPanel-BjnLfncu.js} +5 -5
  39. package/dist/DatePicker/index.js +7 -7
  40. package/dist/DatePicker/style/index.js +1 -1
  41. package/dist/DatePicker/{style-DZaSSoNs.js → style-BxWyBhZ3.js} +1 -1
  42. package/dist/DropDown/DropDown-B34vfoOs.js +172 -0
  43. package/dist/DropDown/index.js +8 -7
  44. package/dist/DropDown/style/index.js +2 -0
  45. package/dist/DropDown/style-4LK6rNHe.js +9 -0
  46. package/dist/Editor/{Buttons-DmSUkHWl.js → Buttons-Ds6bLmnl.js} +6 -6
  47. package/dist/Editor/ToolbarPlugin/Buttons/index.js +15 -14
  48. package/dist/Editor/index.js +15 -14
  49. package/dist/Gantt/GanttChart/index.js +15 -14
  50. package/dist/Gantt/{GanttChart-DJA8pG9U.js → GanttChart-CnIWe_wk.js} +685 -598
  51. package/dist/Gantt/GanttTable/index.js +9 -9
  52. package/dist/Gantt/{GanttTable-Di_p-0M1.js → GanttTable-C3PLGmKr.js} +20 -19
  53. package/dist/Gantt/GanttToolBar/index.js +11 -10
  54. package/dist/Gantt/GanttToolBar-8jPQ9BAG.js +121 -0
  55. package/dist/Gantt/{collapseKeys-C8139wvy.js → collapseKeys-1N9ci2oJ.js} +2 -2
  56. package/dist/Gantt/index.js +195 -162
  57. package/dist/Gantt/theme-C197Dtjy.js +31 -0
  58. package/dist/Gantt/{timelineViewConfig-BXl2UkN8.js → timelineViewConfig-Dl3AXO45.js} +1 -1
  59. package/dist/Gantt/utils/index.js +5 -5
  60. package/dist/Gantt/utils/theme/index.js +2 -0
  61. package/dist/Icon/index.js +1 -1
  62. package/dist/InputTag/InputTag-CGQ5dXyf.js +143 -0
  63. package/dist/InputTag/index.js +3 -2
  64. package/dist/Loading/index.js +1 -1
  65. package/dist/Modal/{Modal-D3LFqIV4.js → Modal-GGHNlZv3.js} +1 -1
  66. package/dist/Modal/index.js +2 -2
  67. package/dist/NotFoundContent/index.js +1 -1
  68. package/dist/Radio/index.js +1 -1
  69. package/dist/ScrollBar/ScrollBar-CSGBOE3e.js +68 -0
  70. package/dist/ScrollBar/index.js +2 -0
  71. package/dist/Segmented/{Segmented-BTW445jc.js → Segmented-CzVKrL6o.js} +1 -1
  72. package/dist/Segmented/index.js +1 -1
  73. package/dist/Select/{Select-OjCjCogR.js → Select-B0r9VgF6.js} +199 -200
  74. package/dist/Select/{SelectInputSearch-DXPTGSc2.js → SelectInputSearch-BDwg-Noi.js} +2 -2
  75. package/dist/Select/index.js +12 -11
  76. package/dist/Table/Table-BtH9Oa14.js +545 -0
  77. package/dist/Table/hooks/index.js +1 -1
  78. package/dist/Table/{hooks-CJ2CnSep.js → hooks-DK8Pf7iH.js} +1 -1
  79. package/dist/Table/index.js +8 -7
  80. package/dist/Table/{processRowspan-BCzfI5un.js → processRowspan-D4uv6zLk.js} +1 -1
  81. package/dist/Table/style/index.js +2 -0
  82. package/dist/Table/style-BwcnT2ee.js +9 -0
  83. package/dist/Table/utils/index.js +1 -1
  84. package/dist/Tabs/{Tabs-DVQcB3YG.js → Tabs-7wEcxUv6.js} +4 -4
  85. package/dist/Tabs/index.js +4 -4
  86. package/dist/Tooltip/{Tooltip-DW_XP13m.js → Tooltip-B_SZOy6k.js} +41 -44
  87. package/dist/Tooltip/index.js +1 -1
  88. package/dist/Tree/index.js +4 -4
  89. package/dist/components/DropDown/index.d.ts +1 -0
  90. package/dist/components/DropDown/interface.d.ts +45 -0
  91. package/dist/components/DropDown/style/__tests__/resolveDropDownThemeVars.test.d.ts +1 -0
  92. package/dist/components/DropDown/style/index.d.ts +1 -0
  93. package/dist/components/DropDown/style/resolveDropDownThemeVars.d.ts +2 -0
  94. package/dist/components/Gantt/Gantt.d.ts +1 -1
  95. package/dist/components/Gantt/GanttChart/hooks/useEdgeScroll.d.ts +1 -1
  96. package/dist/components/Gantt/GanttTable/GanttTable.d.ts +1 -1
  97. package/dist/components/Gantt/GanttThemeContext.d.ts +3 -0
  98. package/dist/components/Gantt/index.d.ts +2 -1
  99. package/dist/components/Gantt/interface.d.ts +39 -0
  100. package/dist/components/Gantt/internal/GanttLayout.d.ts +1 -1
  101. package/dist/components/Gantt/types.internal.d.ts +2 -0
  102. package/dist/components/Gantt/utils/theme/__tests__/resolveGanttTheme.test.d.ts +1 -0
  103. package/dist/components/Gantt/utils/theme/__tests__/resolveGanttThemeVars.test.d.ts +1 -0
  104. package/dist/components/Gantt/utils/theme/__tests__/resolveTableThemeFromGantt.test.d.ts +1 -0
  105. package/dist/components/Gantt/utils/theme/index.d.ts +3 -0
  106. package/dist/components/Gantt/utils/theme/resolveGanttTheme.d.ts +3 -0
  107. package/dist/components/Gantt/utils/theme/resolveGanttThemeVars.d.ts +5 -0
  108. package/dist/components/Gantt/utils/theme/resolveTableThemeFromGantt.d.ts +4 -0
  109. package/dist/components/ScrollBar/ScrollBar.d.ts +3 -0
  110. package/dist/components/ScrollBar/__tests__/ScrollBar.test.d.ts +1 -0
  111. package/dist/components/ScrollBar/index.d.ts +3 -0
  112. package/dist/components/ScrollBar/interface.d.ts +23 -0
  113. package/dist/components/Table/index.d.ts +2 -1
  114. package/dist/components/Table/interface.d.ts +17 -0
  115. package/dist/components/Table/style/__tests__/resolveTableThemeVars.test.d.ts +1 -0
  116. package/dist/components/Table/style/index.d.ts +1 -0
  117. package/dist/components/Table/style/resolveTableThemeVars.d.ts +3 -0
  118. package/dist/components/index.d.ts +5 -2
  119. package/dist/index.js +50 -47
  120. package/dist/style.css +1 -1
  121. package/dist/utils/mergeRefs.d.ts +1 -0
  122. package/dist/vendors/{ConfigProvider-DwmA94S2.js → ConfigProvider-AQTr7T_c.js} +1 -1
  123. package/dist/vendors/{Tree-C7BgkjCQ.js → Tree-DqnOGJtB.js} +3 -3
  124. package/dist/vendors/mergeRefs-TiJ0xjUN.js +9 -0
  125. package/dist/vendors/{useLocale-BTz4slNW.js → useLocale-DZ8XW2VL.js} +1 -1
  126. package/package.json +1 -2
  127. package/dist/DropDown/DropDown-CvQAbsEo.js +0 -168
  128. package/dist/Gantt/GanttToolBar-D5pQdrzv.js +0 -105
  129. package/dist/InputTag/InputTag-zP5QdId7.js +0 -139
  130. package/dist/Table/Table-3-kFIm5v.js +0 -543
  131. /package/dist/Amap/{AmapContext-JaYk1a3H.js → AmapContext-CFmsMycg.js} +0 -0
  132. /package/dist/Amap/{useMarkerInfoWindowController-CRgf2I0Q.js → useMarkerInfoWindowController-G-Bg-NDJ.js} +0 -0
  133. /package/dist/Calendar/{TimeAxis-cK2_3FeM.js → TimeAxis-Chwxo6Yj.js} +0 -0
  134. /package/dist/Calendar/{colorUtils-DcpqM3KR.js → colorUtils-FNbm3zBQ.js} +0 -0
  135. /package/dist/Calendar/{context-DNOJ9LW_.js → context-CzS6P3nk.js} +0 -0
  136. /package/dist/Calendar/{layout-CaPxiRd-.js → layout-Cb39seCc.js} +0 -0
  137. /package/dist/DatePicker/{ensureDayjsPlugins-C3aqki6i.js → ensureDayjsPlugins-DxqbKqon.js} +0 -0
  138. /package/dist/DatePicker/{pickerLocale-VqSP_iIm.js → pickerLocale-CtDOOxxD.js} +0 -0
  139. /package/dist/Gantt/{GanttHighlightContext-AIpN3-af.js → GanttHighlightContext-CtT98ZnK.js} +0 -0
  140. /package/dist/Gantt/{columnResize-By_1E48E.js → columnResize-DFe7F98O.js} +0 -0
  141. /package/dist/Gantt/{constants-D4ur8WRs.js → constants-CrBb5i5p.js} +0 -0
  142. /package/dist/Gantt/{highlightTarget-DmzCIiQb.js → highlightTarget-DtCe7zto.js} +0 -0
  143. /package/dist/Icon/{Icon-BQ3Whub2.js → Icon-SQ5tu-yG.js} +0 -0
  144. /package/dist/Loading/{Loading-WjmzBabh.js → Loading-ho-6d72M.js} +0 -0
  145. /package/dist/NotFoundContent/{NotFoundContent-7xV-zOG2.js → NotFoundContent-CV9fTylQ.js} +0 -0
  146. /package/dist/Radio/{Radio-DkrZHoG1.js → Radio-C2zJzZc3.js} +0 -0
  147. /package/dist/Table/{constants-CKqc9Os_.js → constants-CuBlYZLO.js} +0 -0
  148. /package/dist/vendors/{LocaleContext-BJdHS0sH.js → LocaleContext-CBcJzvUD.js} +0 -0
  149. /package/dist/vendors/{animations-BeI8JZp1.js → animations-Mlw78WYo.js} +0 -0
  150. /package/dist/vendors/{color-BeQo449h.js → color-BQYy0Wgy.js} +0 -0
  151. /package/dist/vendors/{cssVars-C4BlzyxA.js → cssVars-DoQgQ2CM.js} +0 -0
  152. /package/dist/vendors/{useFloatingOverlay-3KB88hpZ.js → useFloatingOverlay-WbbHmuT-.js} +0 -0
  153. /package/dist/vendors/{useFloatingPortal-DsEtsAGW.js → useFloatingPortal-B2SDNV5C.js} +0 -0
@@ -1,29 +1,29 @@
1
- import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
- import { t } from "../vendors/useLocale-BTz4slNW.js";
3
- import { t as n } from "../Tooltip/Tooltip-DW_XP13m.js";
4
- import { a as r, f as i, g as a, i as o, m as s, n as c, o as l, r as u } from "./constants-D4ur8WRs.js";
5
- import { t as d } from "./GanttHighlightContext-AIpN3-af.js";
6
- import { n as f, r as p } from "./highlightTarget-DmzCIiQb.js";
7
- import { a as m, d as h, i as g, n as _, r as v, t as y, u as b } from "./timelineViewConfig-BXl2UkN8.js";
8
- import { _ as x, a as S, b as C, c as w, d as T, f as ee, g as E, h as D, i as O, l as k, m as A, o as j, p as M, r as N, s as te, t as ne, u as re, v as ie, x as ae, y as P } from "./collapseKeys-C8139wvy.js";
9
- import { n as oe, t as F } from "./GanttToolBar-D5pQdrzv.js";
10
- import { isFunction as I, isNumber as L, isString as R } from "lodash-es";
11
- import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
12
- import H, { forwardRef as U, memo as W, useCallback as G, useEffect as K, useImperativeHandle as se, useLayoutEffect as ce, useMemo as q, useRef as J, useState as Y } from "react";
13
- import X from "clsx";
14
- import { useDocumentVisibility as le, useSize as ue } from "ahooks";
15
- import { createContext as de, useContextSelector as Z } from "use-context-selector";
16
- import Q from "dayjs";
17
- import fe from "dayjs/plugin/isoWeek";
18
- import { useVirtualizer as pe } from "@tanstack/react-virtual";
19
- import me from "dayjs/plugin/quarterOfYear";
20
- import { OverlayScrollbars as he } from "overlayscrollbars";
1
+ import { t as e } from "../Icon/Icon-SQ5tu-yG.js";
2
+ import { t } from "../vendors/useLocale-DZ8XW2VL.js";
3
+ import { t as n } from "../Tooltip/Tooltip-B_SZOy6k.js";
4
+ import { a as r, f as i, g as a, i as o, m as s, n as c, o as l, r as u } from "./constants-CrBb5i5p.js";
5
+ import { t as d } from "./GanttHighlightContext-CtT98ZnK.js";
6
+ import { n as f, r as p } from "./highlightTarget-DtCe7zto.js";
7
+ import { a as m, d as h, i as g, n as _, r as v, t as y, u as b } from "./timelineViewConfig-Dl3AXO45.js";
8
+ import { _ as x, a as S, b as C, c as w, d as T, f as ee, g as E, h as D, i as O, l as k, m as A, o as j, p as M, r as N, s as te, t as ne, u as re, v as ie, x as ae, y as oe } from "./collapseKeys-1N9ci2oJ.js";
9
+ import { r as se, t as ce } from "./GanttToolBar-8jPQ9BAG.js";
10
+ import { isFunction as P, isNumber as F, isString as I } from "lodash-es";
11
+ import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
12
+ import B, { forwardRef as V, memo as H, useCallback as U, useEffect as W, useImperativeHandle as le, useLayoutEffect as ue, useMemo as G, useRef as K, useState as q } from "react";
13
+ import J from "clsx";
14
+ import { useDocumentVisibility as de, useSize as fe } from "ahooks";
15
+ import { createContext as pe, useContextSelector as Y } from "use-context-selector";
16
+ import X from "dayjs";
17
+ import me from "dayjs/plugin/isoWeek";
18
+ import { useVirtualizer as he } from "@tanstack/react-virtual";
19
+ import ge from "dayjs/plugin/quarterOfYear";
20
+ import { OverlayScrollbars as _e } from "overlayscrollbars";
21
21
  //#region src/components/Gantt/GanttChart/utils/dragEngine.ts
22
- var ge = (e) => e?.type === "task" && e?.draggable !== !1 && !e?.invalid, _e = {
22
+ var ve = (e) => e?.type === "task" && e?.draggable !== !1 && !e?.invalid, ye = {
23
23
  canMove: !1,
24
24
  canResizeStart: !1,
25
25
  canResizeEnd: !1
26
- }, ve = (e) => !e || e.invalid || e.type === "summary" || e.draggable === !1 ? _e : e.dragPermission ? {
26
+ }, be = (e) => !e || e.invalid || e.type === "summary" || e.draggable === !1 ? ye : e.dragPermission ? {
27
27
  canMove: e.dragPermission.canMove === !0,
28
28
  canResizeStart: e.dragPermission.canResizeStart === !0,
29
29
  canResizeEnd: e.dragPermission.canResizeEnd === !0
@@ -31,14 +31,14 @@ var ge = (e) => e?.type === "task" && e?.draggable !== !1 && !e?.invalid, _e = {
31
31
  canMove: !0,
32
32
  canResizeStart: !0,
33
33
  canResizeEnd: !0
34
- }, ye = (e, t) => ge(e) ? e?.dragPermission ? t === "move" ? e.dragPermission.canMove === !0 : t === "resize-start" ? e.dragPermission.canResizeStart === !0 : t === "resize-end" ? e.dragPermission.canResizeEnd === !0 : !1 : !0 : !1, be = (e, t) => !t || Math.abs(e) < Math.min(5, t) ? 0 : Math.round(e / t), xe = (e, t) => be(e, t), Se = (e, t, n = "round") => {
34
+ }, xe = (e, t) => ve(e) ? e?.dragPermission ? t === "move" ? e.dragPermission.canMove === !0 : t === "resize-start" ? e.dragPermission.canResizeStart === !0 : t === "resize-end" ? e.dragPermission.canResizeEnd === !0 : !1 : !0 : !1, Se = (e, t) => !t || Math.abs(e) < Math.min(5, t) ? 0 : Math.round(e / t), Ce = (e, t) => Se(e, t), we = (e, t, n = "round") => {
35
35
  if (!t || !Number.isFinite(e)) return e;
36
- let r = ae(e), i = Q(r).startOf("day").valueOf(), a = (r - i) / t, o;
36
+ let r = ae(e), i = X(r).startOf("day").valueOf(), a = (r - i) / t, o;
37
37
  return o = n === "floor" ? Math.floor(a) : n === "ceil" ? Math.ceil(a) : Math.round(a), ie(i + o * t);
38
- }, Ce = (e, t, n) => ({
38
+ }, Te = (e, t, n) => ({
39
39
  startMs: e + n,
40
40
  endMs: t + n
41
- }), we = ({ startMs: e, endMs: t, deltaMs: n, edge: r, minDurationMs: i }) => {
41
+ }), Ee = ({ startMs: e, endMs: t, deltaMs: n, edge: r, minDurationMs: i }) => {
42
42
  if (r === "start") {
43
43
  let r = t - i;
44
44
  return {
@@ -51,12 +51,12 @@ var ge = (e) => e?.type === "task" && e?.draggable !== !1 && !e?.invalid, _e = {
51
51
  startMs: e,
52
52
  endMs: Math.max(t + n, a)
53
53
  };
54
- }, Te = (e, t, n, r) => {
54
+ }, De = (e, t, n, r) => {
55
55
  let i = e.originStartMs, a = e.originEndMs, o = e.originAnchorPx ?? e.originLeftPx, c = e.originAnchorMs ?? n.timeAtX(o), l = o + t, u = n.timeAtX(l);
56
56
  if (e.dragMode === "move") {
57
57
  let t = Math.round((u - c) / s) * s;
58
58
  i = e.originStartMs + t, a = e.originEndMs + t;
59
- } else e.dragMode === "resize-start" ? (i = Se(u, r, "round"), a = e.originEndMs, a - i < r && (i = a - r)) : (a = Se(u, r, "round"), i = e.originStartMs, a - i < r && (a = i + r));
59
+ } else e.dragMode === "resize-start" ? (i = we(u, r, "round"), a = e.originEndMs, a - i < r && (i = a - r)) : (a = we(u, r, "round"), i = e.originStartMs, a - i < r && (a = i + r));
60
60
  return {
61
61
  deltaUnits: e.dragMode === "resize-end" ? Math.round((a - e.originEndMs) / r) : Math.round((i - e.originStartMs) / r),
62
62
  previewStartMs: i,
@@ -64,7 +64,7 @@ var ge = (e) => e?.type === "task" && e?.draggable !== !1 && !e?.invalid, _e = {
64
64
  previewLeftPx: e.dragMode === "resize-end" ? e.originLeftPx : l
65
65
  };
66
66
  };
67
- function Ee(e) {
67
+ function Oe(e) {
68
68
  let t = {
69
69
  taskId: String(e.item.id),
70
70
  newStart: e.startMs,
@@ -95,17 +95,20 @@ function Ee(e) {
95
95
  deltaDays: n.deltaDays
96
96
  };
97
97
  }
98
- var De = (e) => e && I(e.then) ? e : Promise.resolve(e);
98
+ var ke = (e) => e && P(e.then) ? e : Promise.resolve(e);
99
99
  //#endregion
100
100
  //#region src/components/Gantt/GanttChart/hooks/useEdgeScroll.tsx
101
- function Oe(e, t) {
102
- let n = J(null), r = J(0), i = G(() => {
103
- n.current !== null && (cancelAnimationFrame(n.current), n.current = null), r.current = 0;
101
+ function Ae(e, t) {
102
+ return e < 0 ? t * 10 : e >= 60 ? 0 : t * (2 + 8 * (1 - e / 60));
103
+ }
104
+ function je(e, t) {
105
+ let n = K(null), r = K(0), i = U(() => {
106
+ n.current !== null && cancelAnimationFrame(n.current), n.current = null, r.current = 0;
104
107
  }, []);
105
- K(() => () => {
108
+ W(() => () => {
106
109
  n.current !== null && cancelAnimationFrame(n.current);
107
110
  }, []);
108
- let a = G(() => {
111
+ let a = U(() => {
109
112
  if (n.current !== null) return;
110
113
  let i = () => {
111
114
  let a = e.current, o = r.current;
@@ -119,30 +122,34 @@ function Oe(e, t) {
119
122
  n.current = requestAnimationFrame(i);
120
123
  }, [e, t]);
121
124
  return {
122
- startEdgeDetection: G((t) => {
123
- let i = e.current;
124
- if (!i) return;
125
- let o = i.getBoundingClientRect(), s = t - o.left, c = o.right - t, l = 0;
126
- s < 0 ? (l = -10, a()) : c < 0 ? (l = 10, a()) : s < 60 ? (l = -(2 + 8 * (1 - s / 60)), a()) : c < 60 ? (l = 2 + 8 * (1 - c / 60), a()) : n.current !== null && (cancelAnimationFrame(n.current), n.current = null), r.current = l;
127
- }, [e, a]),
125
+ startEdgeDetection: U((t, n) => {
126
+ let o = e.current;
127
+ if (!o) return 0;
128
+ let s = n ?? o.getBoundingClientRect(), c = t - s.left, l = s.right - t, u = c < 60 ? Ae(c, -1) : l < 60 ? Ae(l, 1) : 0;
129
+ return r.current = u, u === 0 ? i() : a(), u;
130
+ }, [
131
+ e,
132
+ a,
133
+ i
134
+ ]),
128
135
  stopEdgeScroll: i
129
136
  };
130
137
  }
131
138
  //#endregion
132
139
  //#region src/components/Gantt/GanttChart/hooks/useGanttDrag.tsx
133
- function ke({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange: i, containerRef: c, onDragInteractionChange: u }) {
134
- let d = h(t), f = m(t), p = f / s * e, g = J(n);
140
+ function Me({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange: i, containerRef: c, onDragInteractionChange: u }) {
141
+ let d = h(t), f = m(t), p = f / s * e, g = K(n);
135
142
  g.current = n;
136
- let [_, v] = Y({}), [y, b] = Y(null), x = J(null), S = J({
143
+ let [_, v] = q({}), [y, b] = q(null), x = K(null), S = K({
137
144
  shouldSuppressClick: !1,
138
145
  at: 0
139
- }), C = J(0), w = J(null), { startEdgeDetection: T, stopEdgeScroll: ee } = Oe(c ?? { current: null }, w), E = J({});
140
- K(() => {
146
+ }), C = K(0), w = K(null), { startEdgeDetection: T, stopEdgeScroll: ee } = je(c ?? { current: null }, w), E = K({});
147
+ W(() => {
141
148
  x.current = y;
142
- }, [y]), K(() => () => {
149
+ }, [y]), W(() => () => {
143
150
  for (let e of Object.values(E.current)) e.timeoutId && clearTimeout(e.timeoutId);
144
151
  }, []);
145
- let D = G(() => {
152
+ let D = U(() => {
146
153
  v((e) => {
147
154
  let t = Object.keys(E.current);
148
155
  if (t.length === 0) return {};
@@ -153,14 +160,14 @@ function ke({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
153
160
  shouldSuppressClick: !1,
154
161
  at: 0
155
162
  };
156
- }, []), O = G(() => {
163
+ }, []), O = U(() => {
157
164
  for (let e of Object.values(E.current)) e.timeoutId && clearTimeout(e.timeoutId);
158
165
  E.current = {}, v({}), S.current = {
159
166
  shouldSuppressClick: !1,
160
167
  at: 0
161
168
  };
162
- }, []), k = G((e, t, n, r, i = 1) => {
163
- if (!ye(t, r) || t.invalid) return;
169
+ }, []), k = U((e, t, n, r, i = 1) => {
170
+ if (!xe(t, r) || t.invalid) return;
164
171
  e.preventDefault(), e.stopPropagation();
165
172
  let a = c?.current, o = a?.scrollLeft ?? 0, s = a?.getBoundingClientRect(), l = s ? e.clientX - s.left : 0, d = t.endMs ?? 0, f = t.startMs ?? 0, p = Math.max(1, i), m = r === "resize-end" ? n + p : n, h = l - (m - o), _ = {
166
173
  taskId: t.id,
@@ -183,63 +190,73 @@ function ke({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
183
190
  shouldSuppressClick: !1,
184
191
  at: 0
185
192
  }, x.current = _, b(_), u?.(!0);
186
- }, [c, u]), A = G((e, t, n, r) => {
193
+ }, [c, u]), A = U((e, t, n, r) => {
187
194
  k(e, t, n, o, r);
188
- }, [k]), j = G((e, t, n, i, a) => {
195
+ }, [k]), j = U((e, t, n, i, a) => {
189
196
  k(e, t, n, i === "start" ? l : r, a);
190
197
  }, [k]);
191
- return K(() => {
198
+ return W(() => {
192
199
  if (!y?.taskId) return;
193
- let e = (e) => {
194
- let t = x.current;
195
- if (!t) return;
196
- let n = c?.current, r = n?.getBoundingClientRect(), i = n?.scrollLeft ?? 0, a = n?.clientWidth ?? 0, o = g.current, s = i + (r ? e - r.left : 0) - t.grabOffsetInBar, l = t.originWidthPx, u = l > a, m = s;
197
- if (t.dragMode === "resize-end") m = t.originLeftPx;
198
- else if (!u && a > 0) {
199
- let e = i, n = i + Math.max(0, a - l);
200
- t.dragMode === "move" && (m = Math.min(n, Math.max(e, s)));
200
+ let e = (e, t, n = "mousemove") => {
201
+ let r = x.current;
202
+ if (!r) return;
203
+ let i = c?.current, a = t ?? i?.getBoundingClientRect(), o = i?.scrollLeft ?? 0, s = g.current, l = o + (a ? e - a.left : 0) - r.grabOffsetInBar, u = r.dragMode === "resize-end" ? r.originLeftPx : l;
204
+ if (n === "edgeScroll") {
205
+ let e = r.dragMode === "resize-end" ? r.originLeftPx : u;
206
+ if (e === r.previewLeftPx) return;
207
+ let t = {
208
+ ...r,
209
+ previewLeftPx: e
210
+ };
211
+ x.current = t, b(t);
212
+ return;
201
213
  }
202
- let h = (t.dragMode === "resize-end" ? s : m) - t.originAnchorPx;
214
+ let m = l - r.originAnchorPx;
203
215
  if (!d) {
204
216
  let e = {
205
- ...Te(t, h, o, f),
206
- previewLeftPx: m
217
+ ...De(r, m, s, f),
218
+ previewLeftPx: u
207
219
  };
208
- if (e.deltaUnits === t.deltaUnits && e.previewLeftPx === t.previewLeftPx && e.previewStartMs === t.previewStartMs && e.previewEndMs === t.previewEndMs) return;
209
- let n = {
210
- ...t,
220
+ if (e.deltaUnits === r.deltaUnits && e.previewLeftPx === r.previewLeftPx && e.previewStartMs === r.previewStartMs && e.previewEndMs === r.previewEndMs) return;
221
+ let t = {
222
+ ...r,
211
223
  ...e
212
224
  };
213
- x.current = n, b(n);
225
+ x.current = t, b(t);
214
226
  return;
215
227
  }
216
- let _ = xe(h, p), v = {
217
- ...t,
218
- deltaUnits: _,
219
- previewLeftPx: t.dragMode === "resize-end" ? t.originLeftPx : m
228
+ let h = Ce(m, p), _ = {
229
+ ...r,
230
+ deltaUnits: h,
231
+ previewLeftPx: u
220
232
  };
221
- if (t.dragMode === "move") {
222
- let e = Ce(t.originStartMs, t.originEndMs, _ * f);
223
- v.previewStartMs = e.startMs, v.previewEndMs = e.endMs;
233
+ if (r.dragMode === "move") {
234
+ let e = Te(r.originStartMs, r.originEndMs, h * f);
235
+ _.previewStartMs = e.startMs, _.previewEndMs = e.endMs;
224
236
  } else {
225
- let e = we({
226
- startMs: t.originStartMs,
227
- endMs: t.originEndMs,
228
- deltaMs: _ * f,
229
- edge: t.dragMode === "resize-start" ? "start" : "end",
237
+ let e = Ee({
238
+ startMs: r.originStartMs,
239
+ endMs: r.originEndMs,
240
+ deltaMs: h * f,
241
+ edge: r.dragMode === "resize-start" ? "start" : "end",
230
242
  minDurationMs: f
231
243
  });
232
- v.previewStartMs = e.startMs, v.previewEndMs = e.endMs, t.dragMode === "resize-start" && (v.previewLeftPx = m);
244
+ _.previewStartMs = e.startMs, _.previewEndMs = e.endMs;
233
245
  }
234
- let y = Math.round((v.previewStartMs - t.originStartMs) / f), S = {
235
- ...v,
236
- deltaUnits: t.dragMode === "resize-end" ? Math.round((v.previewEndMs - t.originEndMs) / f) : y
246
+ let v = Math.round((_.previewStartMs - r.originStartMs) / f), y = {
247
+ ..._,
248
+ deltaUnits: r.dragMode === "resize-end" ? Math.round((_.previewEndMs - r.originEndMs) / f) : v
237
249
  };
238
- S.deltaUnits === t.deltaUnits && S.previewLeftPx === t.previewLeftPx && S.previewStartMs === t.previewStartMs && S.previewEndMs === t.previewEndMs || (x.current = S, b(S));
250
+ y.deltaUnits === r.deltaUnits && y.previewLeftPx === r.previewLeftPx && y.previewStartMs === r.previewStartMs && y.previewEndMs === r.previewEndMs || (x.current = y, b(y));
251
+ };
252
+ w.current = () => {
253
+ let t = c?.current?.getBoundingClientRect() ?? null;
254
+ e(C.current, t, "edgeScroll");
239
255
  };
240
- w.current = () => e(C.current);
241
256
  let n = (t) => {
242
- C.current = t.clientX, T(t.clientX), e(t.clientX);
257
+ C.current = t.clientX;
258
+ let n = c?.current?.getBoundingClientRect() ?? null, r = T(t.clientX, n ?? void 0);
259
+ e(t.clientX, n, r === 0 ? "mousemove" : "edgeScroll");
243
260
  }, r = () => {
244
261
  ee(), w.current = null, e(C.current);
245
262
  let n = x.current;
@@ -250,7 +267,7 @@ function ke({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
250
267
  at: Date.now()
251
268
  };
252
269
  let o = r;
253
- if (!ye(n.item, n.dragMode) || !o || !i) {
270
+ if (!xe(n.item, n.dragMode) || !o || !i) {
254
271
  x.current = null, b(null);
255
272
  return;
256
273
  }
@@ -277,15 +294,15 @@ function ke({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
277
294
  };
278
295
  let m, g;
279
296
  if (d) if (n.dragMode === "move") {
280
- let e = Se(n.previewStartMs, f, "round"), t = e - n.previewStartMs;
297
+ let e = we(n.previewStartMs, f, "round"), t = e - n.previewStartMs;
281
298
  m = e, g = n.previewEndMs + t;
282
- } else n.dragMode === "resize-start" ? (m = Se(n.previewStartMs, f, "round"), g = n.previewEndMs) : (m = n.previewStartMs, g = Se(n.previewEndMs, f, "round"));
299
+ } else n.dragMode === "resize-start" ? (m = we(n.previewStartMs, f, "round"), g = n.previewEndMs) : (m = n.previewStartMs, g = we(n.previewEndMs, f, "round"));
283
300
  else {
284
301
  let e = Number.isFinite(n.item.rawStartMs) && Number.isFinite(n.item.baseStartMs) && Number.isFinite(n.previewStartMs), t = Number.isFinite(n.item.rawEndMs) && Number.isFinite(n.item.baseEndMs) && Number.isFinite(n.previewEndMs), r = e ? Math.round((n.previewStartMs - (n.item.baseStartMs ?? 0)) / s) : 0, i = t ? Math.round((n.previewEndMs - (n.item.baseEndMs ?? 0)) / s) : 0;
285
302
  m = e ? (n.item.rawStartMs ?? 0) + r * s : n.item.rawStartMs ?? 0, g = t ? (n.item.rawEndMs ?? 0) + i * s : n.item.rawEndMs ?? 0;
286
303
  }
287
304
  let _;
288
- _ = h(t) ? Ee({
305
+ _ = h(t) ? Oe({
289
306
  item: n.item,
290
307
  startMs: m,
291
308
  endMs: g,
@@ -293,7 +310,7 @@ function ke({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
293
310
  snapUnitMs: f,
294
311
  changeType: n.dragMode,
295
312
  viewMode: t
296
- }) : Ee({
313
+ }) : Oe({
297
314
  item: n.item,
298
315
  startMs: m,
299
316
  endMs: g,
@@ -302,7 +319,7 @@ function ke({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
302
319
  snapUnitMs: f,
303
320
  changeType: n.dragMode,
304
321
  viewMode: t
305
- }), De(i(_)).catch((e) => {
322
+ }), ke(i(_)).catch((e) => {
306
323
  console.error("[GanttChart] onTaskTimeChange rejected", e), E.current[c]?.opId === l && v((e) => {
307
324
  let t = { ...e };
308
325
  return delete t[c], t;
@@ -335,7 +352,7 @@ function ke({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
335
352
  forceResetAllCommittedRanges: O,
336
353
  handleTaskMouseDown: A,
337
354
  handleResizeMouseDown: j,
338
- consumeRecentDragResult: G(() => {
355
+ consumeRecentDragResult: U(() => {
339
356
  let { shouldSuppressClick: e, at: t } = S.current;
340
357
  return S.current = {
341
358
  shouldSuppressClick: !1,
@@ -346,25 +363,25 @@ function ke({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
346
363
  }
347
364
  //#endregion
348
365
  //#region src/components/Gantt/GanttChart/utils/timelineFocus.ts
349
- function Ae(e, t, n) {
366
+ function Ne(e, t, n) {
350
367
  let r = Number(t) > 0 ? Number(t) : 0, i = Number(n) > 0 ? Number(n) : 0, a = Math.max(0, i - r);
351
368
  return Number.isFinite(e) ? Math.min(Math.max(0, e), a) : 0;
352
369
  }
353
- function je({ anchorMs: e, toX: t, viewportWidth: n, timelineWidth: r }) {
370
+ function Pe({ anchorMs: e, toX: t, viewportWidth: n, timelineWidth: r }) {
354
371
  let i = Number(n) > 0 ? Number(n) : 0;
355
372
  if (!Number.isFinite(e) || typeof t != "function" || i <= 0) return 0;
356
373
  let a = t(e);
357
- return Number.isFinite(a) ? Ae(a - i / 2, i, r) : 0;
374
+ return Number.isFinite(a) ? Ne(a - i / 2, i, r) : 0;
358
375
  }
359
376
  //#endregion
360
377
  //#region src/components/Gantt/GanttChart/hooks/useGanttColumnVirtual.ts
361
- function Me(e) {
378
+ function Fe(e) {
362
379
  let t = Number(e);
363
380
  return Math.max((Number.isFinite(t) && t > 0 ? t : 0) * 4, 240);
364
381
  }
365
- function Ne(e, t) {
382
+ function Ie(e, t) {
366
383
  if (!Array.isArray(e) || e.length === 0) return [];
367
- let { scrollLeft: n = 0, viewportWidth: r = 0, pixelsPerDay: i } = t || {}, a = Me(Number(e[0]?.width) > 0 ? Number(e[0].width) : i), o = e[e.length - 1], s = Ae(n, r, Number(o?.left) + Number(o?.width) > 0 ? Number(o.left) + Number(o.width) : 0), c = Math.max(0, s - a), l = s + r + a, u = e.length, d = 0, f = u - 1, p = u;
384
+ let { scrollLeft: n = 0, viewportWidth: r = 0, pixelsPerDay: i } = t || {}, a = Fe(Number(e[0]?.width) > 0 ? Number(e[0].width) : i), o = e[e.length - 1], s = Ne(n, r, Number(o?.left) + Number(o?.width) > 0 ? Number(o.left) + Number(o.width) : 0), c = Math.max(0, s - a), l = s + r + a, u = e.length, d = 0, f = u - 1, p = u;
368
385
  for (; d <= f;) {
369
386
  let t = d + f >> 1, n = e[t];
370
387
  n.left + n.width > c ? (p = t, f = t - 1) : d = t + 1;
@@ -380,9 +397,9 @@ function Ne(e, t) {
380
397
  for (let e = p; e <= m; e += 1) h.push({ index: e });
381
398
  return h;
382
399
  }
383
- function Pe({ lowerSegments: e, pixelsPerDay: t, scrollLeft: n, viewportWidth: r, showWeekendHighlight: i, timelineStartMs: a, timelineWidth: o, viewMode: c }) {
400
+ function Le({ lowerSegments: e, pixelsPerDay: t, scrollLeft: n, viewportWidth: r, showWeekendHighlight: i, timelineStartMs: a, timelineWidth: o, viewMode: c }) {
384
401
  return {
385
- virtualColumns: q(() => Ne(e, {
402
+ virtualColumns: G(() => Ie(e, {
386
403
  scrollLeft: n,
387
404
  viewportWidth: r,
388
405
  pixelsPerDay: t
@@ -392,11 +409,11 @@ function Pe({ lowerSegments: e, pixelsPerDay: t, scrollLeft: n, viewportWidth: r
392
409
  n,
393
410
  r
394
411
  ]),
395
- weekendSegments: q(() => {
412
+ weekendSegments: G(() => {
396
413
  if (!i || o <= 0 || c !== "day") return [];
397
414
  let e = Math.max(0, n - 120), l = n + r + 120, u = Math.max(0, Math.floor(e / t)), d = Math.ceil(l / t), f = [];
398
415
  for (let e = u; e <= d; e += 1) {
399
- let n = a + e * s, r = P(n);
416
+ let n = a + e * s, r = oe(n);
400
417
  (r === 0 || r === 6) && f.push({
401
418
  id: `weekend-${n}`,
402
419
  left: e * t,
@@ -415,8 +432,8 @@ function Pe({ lowerSegments: e, pixelsPerDay: t, scrollLeft: n, viewportWidth: r
415
432
  ])
416
433
  };
417
434
  }
418
- Q.extend(fe), Q.extend(me);
419
- var Fe = {
435
+ X.extend(me), X.extend(ge);
436
+ var Re = {
420
437
  day: {
421
438
  amount: 1,
422
439
  unit: "day"
@@ -469,7 +486,7 @@ var Fe = {
469
486
  amount: 1,
470
487
  unit: "minute"
471
488
  }
472
- }, Ie = (e, t, n) => {
489
+ }, ze = (e, t, n) => {
473
490
  switch (t) {
474
491
  case "halfDay": return e.hour() < 12 ? n("header.lower.halfDayAm") : n("header.lower.halfDayPm");
475
492
  case "sixHour": {
@@ -485,7 +502,7 @@ var Fe = {
485
502
  case "oneMinute": return e.format("mm");
486
503
  default: return e.format("DD");
487
504
  }
488
- }, Le = (e, t, n) => {
505
+ }, Be = (e, t, n) => {
489
506
  let r = C(e.valueOf());
490
507
  switch (t) {
491
508
  case "day": return r.format("DD");
@@ -494,12 +511,12 @@ var Fe = {
494
511
  case "quarterMonth": return D(e.valueOf(), n);
495
512
  case "quarter": return n("header.lower.quarter", { quarter: r.quarter() });
496
513
  case "year": return r.month() < 6 ? n("firstHalf") : n("secondHalf");
497
- default: return Ie(r, t, n);
514
+ default: return ze(r, t, n);
498
515
  }
499
- }, Re = (e, t) => {
516
+ }, Ve = (e, t) => {
500
517
  let n = C(e.valueOf()), r = y(t).headerLayout;
501
518
  return r === "dayNested" ? `day-${n.format("YYYY-MM-DD")}` : r === "hourNested" ? `hour-${n.format("YYYY-MM-DD-HH")}` : r === "quarterNested" ? `quarter-${n.format("YYYY")}-Q${n.quarter()}` : t === "day" || t === "week" ? `month-${n.format("YYYY-MM")}` : `year-${n.format("YYYY")}`;
502
- }, ze = (e, t, n) => {
519
+ }, He = (e, t, n) => {
503
520
  let r = C(e.valueOf()), i = y(t).headerLayout;
504
521
  return i === "dayNested" ? n("header.top.monthDay", {
505
522
  month: r.month() + 1,
@@ -512,7 +529,7 @@ var Fe = {
512
529
  year: r.year(),
513
530
  month: r.month() + 1
514
531
  }) : n("header.top.year", { year: r.year() });
515
- }, Be = (e, t, n, r, i, a, o) => {
532
+ }, Ue = (e, t, n, r, i, a, o) => {
516
533
  let s = _(r), c = A ?? 100;
517
534
  e.push({
518
535
  id: `${r}-${t}`,
@@ -520,23 +537,23 @@ var Fe = {
520
537
  endMs: n,
521
538
  left: s ? e.length * c : M(t, i, a, r),
522
539
  width: s ? c : Math.max(1, ee(t, n, a, r)),
523
- label: Le(Q(t), r, o)
540
+ label: Be(X(t), r, o)
524
541
  });
525
- }, Ve = ({ viewMode: e, timelineStartMs: t, timelineEndMs: n, pixelsPerDay: r, formatMessage: i }) => {
526
- let a = [], o = Fe[e] || Fe.day, s = Q(ae(t));
542
+ }, We = ({ viewMode: e, timelineStartMs: t, timelineEndMs: n, pixelsPerDay: r, formatMessage: i }) => {
543
+ let a = [], o = Re[e] || Re.day, s = X(ae(t));
527
544
  _(e) && (s = s.startOf("month"));
528
- let c = Q(ae(n));
545
+ let c = X(ae(n));
529
546
  for (; s.isBefore(c);) {
530
547
  o.align && (s = o.align(s));
531
548
  let n = s.add(o.amount, o.unit);
532
- Be(a, ie(s.valueOf()), ie(n.valueOf()), e, t, r, i), s = n;
549
+ Ue(a, ie(s.valueOf()), ie(n.valueOf()), e, t, r, i), s = n;
533
550
  }
534
551
  return a;
535
- }, He = ({ lowerSegments: e, viewMode: t, formatMessage: n }) => {
552
+ }, Ge = ({ lowerSegments: e, viewMode: t, formatMessage: n }) => {
536
553
  if (!Array.isArray(e) || e.length === 0) return [];
537
554
  let r = [], i = null;
538
555
  for (let a of e) {
539
- let e = Q(a.startMs), o = Re(e, t);
556
+ let e = X(a.startMs), o = Ve(e, t);
540
557
  if (!i || i.key !== o) {
541
558
  i && r.push({
542
559
  id: i.key,
@@ -547,7 +564,7 @@ var Fe = {
547
564
  key: o,
548
565
  left: a.left,
549
566
  width: a.width,
550
- label: ze(e, t, n)
567
+ label: He(e, t, n)
551
568
  };
552
569
  continue;
553
570
  }
@@ -559,25 +576,25 @@ var Fe = {
559
576
  width: i.width,
560
577
  label: i.label
561
578
  }), r;
562
- }, Ue = (e) => Number.isFinite(e.startMs) && Number.isFinite(e.endMs) && e.startMs < e.endMs, We = (e) => {
563
- if (!Ue(e)) throw RangeError("Timeline range must be finite and satisfy startMs < endMs");
564
- }, Ge = (e, t) => {
565
- if (We(e), !Number.isFinite(t)) throw RangeError("Timeline time must be finite");
579
+ }, Ke = (e) => Number.isFinite(e.startMs) && Number.isFinite(e.endMs) && e.startMs < e.endMs, qe = (e) => {
580
+ if (!Ke(e)) throw RangeError("Timeline range must be finite and satisfy startMs < endMs");
581
+ }, Je = (e, t) => {
582
+ if (qe(e), !Number.isFinite(t)) throw RangeError("Timeline time must be finite");
566
583
  return e.startMs <= t && t < e.endMs;
567
- }, Ke = (e, t) => (We(e), We(t), e.startMs < t.endMs && t.startMs < e.endMs), qe = (e, t) => {
568
- We(e), We(t);
584
+ }, Ye = (e, t) => (qe(e), qe(t), e.startMs < t.endMs && t.startMs < e.endMs), Xe = (e, t) => {
585
+ qe(e), qe(t);
569
586
  let n = Math.max(e.startMs, t.startMs), r = Math.min(e.endMs, t.endMs);
570
587
  return n < r ? {
571
588
  startMs: n,
572
589
  endMs: r
573
590
  } : null;
574
- }, Je = (e, t) => {
591
+ }, Ze = (e, t) => {
575
592
  if (!Number.isFinite(e) || e <= 0) throw RangeError(`${t} must be finite and greater than zero`);
576
- }, Ye = (e, t) => {
593
+ }, Qe = (e, t) => {
577
594
  if (Number.isFinite(e)) return e;
578
595
  if (Number.isFinite(t)) return t;
579
596
  throw RangeError("focusMs or fallbackFocusMs must be finite");
580
- }, Xe = ({ startMs: e, endMs: t, viewMode: n, viewportWidth: r, pixelsPerDay: i }) => {
597
+ }, $e = ({ startMs: e, endMs: t, viewMode: n, viewportWidth: r, pixelsPerDay: i }) => {
581
598
  let a = (t - e) / s;
582
599
  if (a * i >= r) return {
583
600
  startMs: e,
@@ -585,24 +602,24 @@ var Fe = {
585
602
  };
586
603
  let o = Math.ceil(r / i), c = Math.ceil((o - a) / 2) * s;
587
604
  return S(e - c, t + c, n);
588
- }, Ze = ({ range: e, focusMs: t, viewMode: n, viewportWidth: r, pixelsPerDay: i }) => {
605
+ }, et = ({ range: e, focusMs: t, viewMode: n, viewportWidth: r, pixelsPerDay: i }) => {
589
606
  let a = (r / 2 + 281) / i * s;
590
- return Xe({
607
+ return $e({
591
608
  ...S(Math.min(e.startMs, t - a), Math.max(e.endMs, t + a), n),
592
609
  viewMode: n,
593
610
  viewportWidth: r,
594
611
  pixelsPerDay: i
595
612
  });
596
- }, Qe = ({ renderWindow: e, timelineCoords: t, scrollLeft: n, viewportWidth: r }) => {
597
- if (!Ue(e)) throw RangeError("renderWindow must be a valid timeline range");
613
+ }, tt = ({ renderWindow: e, timelineCoords: t, scrollLeft: n, viewportWidth: r }) => {
614
+ if (!Ke(e)) throw RangeError("renderWindow must be a valid timeline range");
598
615
  if (!Number.isFinite(n) || n < 0) throw RangeError("scrollLeft must be finite and non-negative");
599
- Je(r, "viewportWidth");
616
+ Ze(r, "viewportWidth");
600
617
  let i = {
601
618
  startMs: t.timeAtX(n),
602
619
  endMs: t.timeAtX(n + r)
603
620
  };
604
- if (!Ue(i)) throw RangeError("TimelineCoords must produce an increasing finite visible range");
605
- let a = qe(i, e);
621
+ if (!Ke(i)) throw RangeError("TimelineCoords must produce an increasing finite visible range");
622
+ let a = Xe(i, e);
606
623
  if (!a) throw RangeError("Visible range must intersect renderWindow");
607
624
  let o = t.timeAtX(n + r / 2);
608
625
  if (!Number.isFinite(o)) throw RangeError("TimelineCoords must produce a finite focus");
@@ -611,65 +628,65 @@ var Fe = {
611
628
  visibleRange: a,
612
629
  focusMs: o
613
630
  };
614
- }, $e = ({ scrollLeft: e, viewportWidth: t, timelineWidth: n, guardBandPx: r }) => {
631
+ }, nt = ({ scrollLeft: e, viewportWidth: t, timelineWidth: n, guardBandPx: r }) => {
615
632
  if (!Number.isFinite(e) || e < 0) throw RangeError("scrollLeft must be finite and non-negative");
616
- if (Je(t, "viewportWidth"), Je(n, "timelineWidth"), !Number.isFinite(r) || r < 0) throw RangeError("guardBandPx must be finite and non-negative");
633
+ if (Ze(t, "viewportWidth"), Ze(n, "timelineWidth"), !Number.isFinite(r) || r < 0) throw RangeError("guardBandPx must be finite and non-negative");
617
634
  let i = Math.max(0, n - t);
618
635
  if (i === 0) return null;
619
636
  let a = Math.min(e, i), o = a <= r;
620
637
  return o === i - a <= r ? null : o ? "left" : "right";
621
- }, et = ({ focusMs: e, fallbackFocusMs: t, viewMode: n, timeRangeConfig: r, viewportWidth: i, pixelsPerDay: a }) => {
622
- Je(i, "viewportWidth"), Je(a, "pixelsPerDay");
623
- let o = Ye(e, t), s = Ze({
638
+ }, rt = ({ focusMs: e, fallbackFocusMs: t, viewMode: n, timeRangeConfig: r, viewportWidth: i, pixelsPerDay: a }) => {
639
+ Ze(i, "viewportWidth"), Ze(a, "pixelsPerDay");
640
+ let o = Qe(e, t), s = et({
624
641
  range: j(r, o),
625
642
  focusMs: o,
626
643
  viewMode: n,
627
644
  viewportWidth: i,
628
645
  pixelsPerDay: a
629
646
  });
630
- if (!Ue(s)) throw RangeError("Viewport engine produced an invalid render window");
647
+ if (!Ke(s)) throw RangeError("Viewport engine produced an invalid render window");
631
648
  return s;
632
- }, tt = ({ focusMs: e, fallbackFocusMs: t, timelineCoords: n, viewportWidth: r, timelineWidth: i }) => {
633
- let a = Ye(e, t);
634
- return Je(r, "viewportWidth"), Je(i, "timelineWidth"), {
649
+ }, it = ({ focusMs: e, fallbackFocusMs: t, timelineCoords: n, viewportWidth: r, timelineWidth: i }) => {
650
+ let a = Qe(e, t);
651
+ return Ze(r, "viewportWidth"), Ze(i, "timelineWidth"), {
635
652
  focusMs: a,
636
- scrollLeft: je({
653
+ scrollLeft: Pe({
637
654
  anchorMs: a,
638
655
  toX: n.toX,
639
656
  viewportWidth: r,
640
657
  timelineWidth: i
641
658
  })
642
659
  };
643
- }, nt = (e) => {
660
+ }, at = (e) => {
644
661
  if (v(e)) {
645
662
  let t = g(e);
646
- return Se(Date.now(), t, "floor") + t / 2;
663
+ return we(Date.now(), t, "floor") + t / 2;
647
664
  }
648
665
  return T(Date.now()) + s / 2;
649
- }, rt = (e, t) => {
666
+ }, ot = (e, t) => {
650
667
  if (v(t)) {
651
668
  let n = g(t);
652
- return Se(e, n, "floor") + n + 1;
669
+ return we(e, n, "floor") + n + 1;
653
670
  }
654
671
  return T(e) + s + 1;
655
- }, it = (e) => {
656
- let [t, n] = Y(() => nt(e)), r = J(null), i = G(() => {
672
+ }, st = (e) => {
673
+ let [t, n] = q(() => at(e)), r = K(null), i = U(() => {
657
674
  r.current &&= (clearTimeout(r.current), null);
658
- }, []), a = G(() => {
675
+ }, []), a = U(() => {
659
676
  i();
660
- let t = Date.now(), o = rt(t, e);
677
+ let t = Date.now(), o = ot(t, e);
661
678
  r.current = setTimeout(() => {
662
- n(nt(e)), a();
679
+ n(at(e)), a();
663
680
  }, Math.max(1, o - t));
664
681
  }, [i, e]);
665
- K(() => (n(nt(e)), a(), i), [
682
+ W(() => (n(at(e)), a(), i), [
666
683
  e,
667
684
  a,
668
685
  i
669
686
  ]);
670
- let o = le();
671
- return K(() => {
672
- o === "visible" && (n(nt(e)), a());
687
+ let o = de();
688
+ return W(() => {
689
+ o === "visible" && (n(at(e)), a());
673
690
  }, [
674
691
  o,
675
692
  a,
@@ -678,43 +695,43 @@ var Fe = {
678
695
  };
679
696
  //#endregion
680
697
  //#region src/components/Gantt/GanttChart/hooks/useTimelineViewportController.ts
681
- function at({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef: r, contentSize: i, headerTrackRef: a, formatMessage: o, isHorizontalScrollbarInteracting: s, isTaskBarInteracting: c = !1 }) {
682
- let l = k(n, t), u = q(() => re(n, e), [n, e]), d = i?.width !== null && i?.width !== void 0 && Number(i.width) > 0 ? Number(i.width) : 0, f = J(!1), [p, m] = Y(!1), [h, g] = Y(d), _ = J(null), v = J(!1), y = J(!1), b = J(null), x = J(null), S = J(null), [C, w] = Y(0), T = G((e) => {
698
+ function ct({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef: r, contentSize: i, headerTrackRef: a, formatMessage: o, isHorizontalScrollbarInteracting: s, isTaskBarInteracting: c = !1 }) {
699
+ let l = k(n, t), u = G(() => re(n, e), [n, e]), d = i?.width !== null && i?.width !== void 0 && Number(i.width) > 0 ? Number(i.width) : 0, f = K(!1), [p, m] = q(!1), [h, g] = q(d), _ = K(null), v = K(!1), y = K(!1), b = K(null), x = K(null), S = K(null), [C, w] = q(0), T = U((e) => {
683
700
  let t = S.current;
684
701
  if (!t || !e) return !1;
685
702
  let n = e.scrollLeft || 0;
686
703
  return Math.abs(n - t.targetLeft) > 1;
687
- }, []), ee = G((e) => {
704
+ }, []), ee = U((e) => {
688
705
  let t = S.current;
689
706
  t && Math.abs(e - t.targetLeft) <= 1 && (S.current = null);
690
- }, []), E = G(() => {
707
+ }, []), E = U(() => {
691
708
  x.current !== null && (cancelAnimationFrame(x.current), x.current = null), b.current = null;
692
- }, []), D = G((e) => {
709
+ }, []), D = U((e) => {
693
710
  E();
694
711
  let t = { left: e };
695
712
  b.current = t, x.current = requestAnimationFrame(() => {
696
713
  x.current = null, b.current === t && (b.current = null);
697
714
  });
698
- }, [E]), [O, A] = Y(0), j = J(0), M = J(0), N = J(null), ne = G((e) => {
715
+ }, [E]), [O, A] = q(0), j = K(0), M = K(0), N = K(null), ne = U((e) => {
699
716
  M.current = e, N.current === null && (N.current = requestAnimationFrame(() => {
700
717
  N.current = null;
701
718
  let e = M.current;
702
719
  A((t) => t === e ? t : e);
703
720
  }));
704
721
  }, []);
705
- K(() => () => {
722
+ W(() => () => {
706
723
  N.current !== null && cancelAnimationFrame(N.current), E();
707
724
  }, [E]);
708
- let [ie, ae] = Y(null), P = J(n), oe = P.current === n, F = oe ? ie : null, I = G(() => {
725
+ let [ie, ae] = q(null), oe = K(n), se = oe.current === n, ce = se ? ie : null, P = U(() => {
709
726
  let e = _.current;
710
- return e !== null && Number.isFinite(e) ? e : nt(n);
711
- }, [n]), L = G((e) => {
727
+ return e !== null && Number.isFinite(e) ? e : at(n);
728
+ }, [n]), F = U((e) => {
712
729
  Number.isFinite(e) && (_.current = e);
713
- }, []), R = G((e) => {
730
+ }, []), I = U((e) => {
714
731
  S.current = null;
715
- let t = et({
732
+ let t = rt({
716
733
  focusMs: e,
717
- fallbackFocusMs: I(),
734
+ fallbackFocusMs: P(),
718
735
  viewMode: n,
719
736
  timeRangeConfig: u,
720
737
  viewportWidth: h || 1e3,
@@ -724,13 +741,13 @@ function at({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef
724
741
  }, [
725
742
  u,
726
743
  l,
727
- I,
744
+ P,
728
745
  n,
729
746
  h
730
747
  ]);
731
- K(() => {
732
- P.current = n, R(I());
733
- }, [e?.bufferDaysBefore, e?.bufferDaysAfter]), ce(() => {
748
+ W(() => {
749
+ oe.current = n, I(P());
750
+ }, [e?.bufferDaysBefore, e?.bufferDaysAfter]), ue(() => {
734
751
  let e = i?.width !== null && i?.width !== void 0 && Number(i.width) > 0 ? Number(i.width) : 0, t = r.current?.clientWidth !== null && r.current?.clientWidth !== void 0 && Number(r.current.clientWidth) > 0 ? Number(r.current.clientWidth) : 0, n = e > 0 ? e : f.current ? t : 0;
735
752
  n > 0 && n !== h && g(n);
736
753
  }, [
@@ -738,259 +755,259 @@ function at({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef
738
755
  i?.width,
739
756
  h
740
757
  ]);
741
- let z = q(() => F || et({
742
- focusMs: I(),
758
+ let L = G(() => ce || rt({
759
+ focusMs: P(),
743
760
  viewMode: n,
744
761
  timeRangeConfig: u,
745
762
  viewportWidth: h || 1e3,
746
763
  pixelsPerDay: l
747
764
  }), [
748
- F,
765
+ ce,
749
766
  u,
750
767
  l,
751
- I,
768
+ P,
752
769
  n,
753
770
  h
754
- ]), { timelineStartMs: B, timelineEndMs: V } = q(() => ({
755
- timelineStartMs: z.startMs,
756
- timelineEndMs: z.endMs
757
- }), [z]), H = q(() => Ve({
771
+ ]), { timelineStartMs: R, timelineEndMs: z } = G(() => ({
772
+ timelineStartMs: L.startMs,
773
+ timelineEndMs: L.endMs
774
+ }), [L]), B = G(() => We({
758
775
  viewMode: n,
759
- timelineStartMs: B,
760
- timelineEndMs: V,
776
+ timelineStartMs: R,
777
+ timelineEndMs: z,
761
778
  pixelsPerDay: l,
762
779
  formatMessage: o
763
780
  }), [
764
781
  n,
765
- B,
766
- V,
782
+ R,
783
+ z,
767
784
  l,
768
785
  o
769
- ]), U = q(() => te({
786
+ ]), V = G(() => te({
770
787
  viewMode: n,
771
- timelineStartMs: B,
772
- timelineEndMs: V,
788
+ timelineStartMs: R,
789
+ timelineEndMs: z,
773
790
  pixelsPerDay: l,
774
- lowerSegments: H
791
+ lowerSegments: B
775
792
  }), [
776
793
  n,
777
- B,
778
- V,
794
+ R,
795
+ z,
779
796
  l,
780
- H
781
- ]), W = q(() => {
782
- if (H.length === 0) return 0;
783
- let e = H[H.length - 1];
797
+ B
798
+ ]), H = G(() => {
799
+ if (B.length === 0) return 0;
800
+ let e = B[B.length - 1];
784
801
  return e.left + e.width;
785
- }, [H]), se = G(() => v.current ? !1 : (R(I()), !0), [I, R]);
786
- ce(() => {
787
- P.current !== n && (P.current = n, R(I()));
802
+ }, [B]), le = U(() => v.current ? !1 : (I(P()), !0), [P, I]);
803
+ ue(() => {
804
+ oe.current !== n && (oe.current = n, I(P()));
788
805
  }, [
789
806
  n,
790
- I,
791
- R
807
+ P,
808
+ I
792
809
  ]);
793
- let X = it(n), le = q(() => W <= 0 ? null : U.toX(X), [
794
- X,
795
- U,
796
- W
797
- ]), ue = G((e) => {
810
+ let J = st(n), de = G(() => H <= 0 ? null : V.toX(J), [
811
+ J,
812
+ V,
813
+ H
814
+ ]), fe = U((e) => {
798
815
  let t = a?.current;
799
816
  t && t.style.setProperty("--gantt-scroll-left", `${e}px`);
800
- }, [a]), de = G((e, t) => {
801
- D(t), e.scrollLeft = t, ue(t), A(t), j.current = t;
802
- }, [ue, D]), Z = G(() => {
817
+ }, [a]), pe = U((e, t) => {
818
+ D(t), e.scrollLeft = t, fe(t), A(t), j.current = t;
819
+ }, [fe, D]), Y = U(() => {
803
820
  let e = r.current, t = h;
804
- if (!e || t <= 0 || W <= 0) return !1;
805
- let { scrollLeft: n } = tt({
821
+ if (!e || t <= 0 || H <= 0) return !1;
822
+ let { scrollLeft: n } = it({
806
823
  focusMs: _.current ?? NaN,
807
- fallbackFocusMs: I(),
808
- timelineCoords: U,
824
+ fallbackFocusMs: P(),
825
+ timelineCoords: V,
809
826
  viewportWidth: t,
810
- timelineWidth: W
827
+ timelineWidth: H
811
828
  });
812
- return de(e, n), !0;
829
+ return pe(e, n), !0;
813
830
  }, [
814
- de,
831
+ pe,
815
832
  r,
816
- I,
817
- U,
818
- W,
833
+ P,
834
+ V,
835
+ H,
819
836
  h
820
- ]), Q = G((e) => {
837
+ ]), X = U((e) => {
821
838
  let t = e.currentTarget.scrollLeft, n = h, r = b.current, i = r !== null && Math.abs(t - r.left) <= 1;
822
- r && E(), !i && f.current && (y.current = !0), ue(t);
839
+ r && E(), !i && f.current && (y.current = !0), fe(t);
823
840
  let a = t !== j.current;
824
841
  if (j.current = t, a && ne(t), n > 0 && !i) {
825
- let e = Ae(t, n, W);
826
- L(Qe({
842
+ let e = Ne(t, n, H);
843
+ F(tt({
827
844
  renderWindow: {
828
- startMs: B,
829
- endMs: V
845
+ startMs: R,
846
+ endMs: z
830
847
  },
831
- timelineCoords: U,
848
+ timelineCoords: V,
832
849
  scrollLeft: e,
833
850
  viewportWidth: n
834
851
  }).focusMs);
835
852
  }
836
853
  ee(t);
837
854
  }, [
838
- ue,
855
+ fe,
839
856
  E,
840
- U,
857
+ V,
841
858
  h,
842
859
  ne,
843
- L,
860
+ F,
844
861
  ee,
845
- V,
846
- B,
847
- W
848
- ]), fe = G(() => {
849
- let e = nt(n);
850
- L(e), R(e);
851
- }, [
862
+ z,
852
863
  R,
853
- L,
864
+ H
865
+ ]), me = U(() => {
866
+ let e = at(n);
867
+ F(e), I(e);
868
+ }, [
869
+ I,
870
+ F,
854
871
  n
855
- ]), pe = G((e) => {
872
+ ]), he = U((e) => {
856
873
  let t = r.current, n = e?.targetMs;
857
874
  if (!t || !Number.isFinite(n)) return;
858
875
  let i = t.clientWidth > 0 ? t.clientWidth : h;
859
- if (n < B || n >= V) {
860
- S.current = null, L(n), R(n);
876
+ if (n < R || n >= z) {
877
+ S.current = null, F(n), I(n);
861
878
  return;
862
879
  }
863
- let a = je({
880
+ let a = Pe({
864
881
  anchorMs: n,
865
- toX: U.toX,
882
+ toX: V.toX,
866
883
  viewportWidth: i,
867
- timelineWidth: W
884
+ timelineWidth: H
868
885
  }), o = t.scrollLeft || 0;
869
886
  if (!(i > 0 && Math.abs(a - o) <= i * 1.5)) {
870
- L(n), R(n);
887
+ F(n), I(n);
871
888
  return;
872
889
  }
873
890
  let s = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth";
874
891
  s === "smooth" ? S.current = { targetLeft: a } : (S.current = null, D(a)), t.scrollTo({
875
892
  left: a,
876
893
  behavior: s
877
- }), L(n), s === "auto" && (ue(a), A(a), j.current = a);
894
+ }), F(n), s === "auto" && (fe(a), A(a), j.current = a);
878
895
  }, [
879
- ue,
896
+ fe,
880
897
  r,
881
898
  D,
882
- R,
883
- L,
884
- U,
899
+ I,
900
+ F,
885
901
  V,
886
- B,
887
- W,
902
+ z,
903
+ R,
904
+ H,
888
905
  h
889
906
  ]);
890
- K(() => {
891
- if (!f.current || !h || !W || v.current || !y.current) return;
892
- let e = r.current, t = e?.scrollLeft ?? O, n = $e({
907
+ W(() => {
908
+ if (!f.current || !h || !H || v.current || !y.current) return;
909
+ let e = r.current, t = e?.scrollLeft ?? O, n = nt({
893
910
  scrollLeft: Math.max(0, t),
894
911
  viewportWidth: h,
895
- timelineWidth: W,
912
+ timelineWidth: H,
896
913
  guardBandPx: 280
897
914
  });
898
- s || c || T(e) || (e && ee(e.scrollLeft || 0), n && se());
915
+ s || c || T(e) || (e && ee(e.scrollLeft || 0), n && le());
899
916
  }, [
900
917
  O,
901
- W,
918
+ H,
902
919
  h,
903
920
  r,
904
921
  T,
905
922
  ee,
906
- se,
923
+ le,
907
924
  s,
908
925
  c,
909
926
  C
910
- ]), ce(() => {
911
- !f.current || h <= 0 || R(I());
927
+ ]), ue(() => {
928
+ !f.current || h <= 0 || I(P());
912
929
  }, [
930
+ P,
913
931
  I,
914
- R,
915
932
  h
916
- ]), ce(() => {
917
- v.current && (h <= 0 || W <= 0 || Z() && (v.current = !1, f.current || (f.current = !0, m(!0))));
933
+ ]), ue(() => {
934
+ v.current && (h <= 0 || H <= 0 || Y() && (v.current = !1, f.current || (f.current = !0, m(!0))));
918
935
  }, [
919
- Z,
920
- W,
936
+ Y,
937
+ H,
921
938
  h,
922
939
  ie
923
- ]), ce(() => {
924
- if (!f.current && h > 0 && W > 0) {
925
- if (Number.isFinite(_.current ?? NaN) || L(nt(n)), !ie) {
926
- R(I());
940
+ ]), ue(() => {
941
+ if (!f.current && h > 0 && H > 0) {
942
+ if (Number.isFinite(_.current ?? NaN) || F(at(n)), !ie) {
943
+ I(P());
927
944
  return;
928
945
  }
929
- v.current = !0, Z(), v.current = !1, f.current = !0, m(!0);
946
+ v.current = !0, Y(), v.current = !1, f.current = !0, m(!0);
930
947
  }
931
948
  }, [
932
- Z,
949
+ Y,
950
+ P,
933
951
  I,
934
- R,
935
- L,
952
+ F,
936
953
  ie,
937
- W,
954
+ H,
938
955
  h,
939
956
  n
940
957
  ]);
941
- let me = G((e) => {
958
+ let ge = U((e) => {
942
959
  let t = h;
943
- t <= 0 || L(U.timeAtX(e + t / 2));
960
+ t <= 0 || F(V.timeAtX(e + t / 2));
944
961
  }, [
945
962
  h,
946
- U,
947
- L
948
- ]), he = G(() => {
963
+ V,
964
+ F
965
+ ]), _e = U(() => {
949
966
  let e = r.current;
950
967
  if (!e) return;
951
968
  let t = h, n = e.scrollLeft || 0, i = Math.max(0, n - t);
952
969
  if (Math.abs(i - n) <= 1) {
953
970
  S.current = null;
954
- let e = U.timeAtX(n - t / 2);
955
- L(e), R(e);
971
+ let e = V.timeAtX(n - t / 2);
972
+ F(e), I(e);
956
973
  return;
957
974
  }
958
975
  S.current = { targetLeft: i }, e.scrollTo({
959
976
  left: i,
960
977
  behavior: "smooth"
961
- }), me(i);
978
+ }), ge(i);
962
979
  }, [
963
980
  r,
964
- R,
965
- L,
966
- U,
967
- me,
981
+ I,
982
+ F,
983
+ V,
984
+ ge,
968
985
  h
969
- ]), ge = G(() => {
986
+ ]), ve = U(() => {
970
987
  let e = r.current;
971
988
  if (!e) return;
972
- let t = h, n = e.scrollLeft || 0, i = Math.max(0, W - t), a = Ae(n + t, t, W);
989
+ let t = h, n = e.scrollLeft || 0, i = Math.max(0, H - t), a = Ne(n + t, t, H);
973
990
  if (Math.abs(a - n) <= 1) {
974
991
  if (S.current = null, a >= i - 1) {
975
- let e = U.timeAtX(n + t * 1.5);
976
- L(e), R(e);
992
+ let e = V.timeAtX(n + t * 1.5);
993
+ F(e), I(e);
977
994
  }
978
995
  return;
979
996
  }
980
997
  S.current = { targetLeft: a }, e.scrollTo({
981
998
  left: a,
982
999
  behavior: "smooth"
983
- }), me(a);
1000
+ }), ge(a);
984
1001
  }, [
985
1002
  r,
986
- R,
987
- L,
988
- U,
1003
+ I,
1004
+ F,
1005
+ V,
989
1006
  h,
990
- W,
991
- me
1007
+ H,
1008
+ ge
992
1009
  ]);
993
- K(() => {
1010
+ W(() => {
994
1011
  let e = r.current;
995
1012
  if (!e) return;
996
1013
  let t = () => {
@@ -998,23 +1015,23 @@ function at({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef
998
1015
  };
999
1016
  return e.addEventListener("scrollend", t), () => e.removeEventListener("scrollend", t);
1000
1017
  }, [r]);
1001
- let _e = (!oe || v.current) && W > 0 && h > 0 ? tt({
1018
+ let ye = (!se || v.current) && H > 0 && h > 0 ? it({
1002
1019
  focusMs: _.current ?? NaN,
1003
- fallbackFocusMs: I(),
1004
- timelineCoords: U,
1020
+ fallbackFocusMs: P(),
1021
+ timelineCoords: V,
1005
1022
  viewportWidth: h,
1006
- timelineWidth: W
1007
- }).scrollLeft : O, { visibleStartMs: ve, visibleEndMs: ye } = q(() => {
1008
- if (W <= 0 || h <= 0) return {
1009
- visibleStartMs: B,
1010
- visibleEndMs: B
1023
+ timelineWidth: H
1024
+ }).scrollLeft : O, { visibleStartMs: be, visibleEndMs: xe } = G(() => {
1025
+ if (H <= 0 || h <= 0) return {
1026
+ visibleStartMs: R,
1027
+ visibleEndMs: R
1011
1028
  };
1012
- let e = Ae(_e, h, W), { visibleRange: t } = Qe({
1029
+ let e = Ne(ye, h, H), { visibleRange: t } = tt({
1013
1030
  renderWindow: {
1014
- startMs: B,
1015
- endMs: V
1031
+ startMs: R,
1032
+ endMs: z
1016
1033
  },
1017
- timelineCoords: U,
1034
+ timelineCoords: V,
1018
1035
  scrollLeft: e,
1019
1036
  viewportWidth: h
1020
1037
  });
@@ -1023,38 +1040,38 @@ function at({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef
1023
1040
  visibleEndMs: t.endMs
1024
1041
  };
1025
1042
  }, [
1026
- _e,
1027
- U,
1043
+ ye,
1028
1044
  V,
1029
- B,
1030
- W,
1045
+ z,
1046
+ R,
1047
+ H,
1031
1048
  h
1032
1049
  ]);
1033
1050
  return {
1034
1051
  pixelsPerDay: l,
1035
1052
  viewportWidth: h,
1036
- scrollLeft: _e,
1037
- timelineStartMs: B,
1038
- timelineEndMs: V,
1039
- visibleStartMs: ve,
1040
- visibleEndMs: ye,
1041
- lowerSegments: H,
1042
- timelineCoords: U,
1043
- timelineWidth: W,
1044
- todayCenterMs: X,
1045
- todayLineLeft: le,
1053
+ scrollLeft: ye,
1054
+ timelineStartMs: R,
1055
+ timelineEndMs: z,
1056
+ visibleStartMs: be,
1057
+ visibleEndMs: xe,
1058
+ lowerSegments: B,
1059
+ timelineCoords: V,
1060
+ timelineWidth: H,
1061
+ todayCenterMs: J,
1062
+ todayLineLeft: de,
1046
1063
  isInitialLayoutReady: p,
1047
- handleContentScroll: Q,
1048
- handleTodayClick: fe,
1049
- handleOffscreenJump: pe,
1050
- handleScrollPrev: he,
1051
- handleScrollNext: ge
1064
+ handleContentScroll: X,
1065
+ handleTodayClick: me,
1066
+ handleOffscreenJump: he,
1067
+ handleScrollPrev: _e,
1068
+ handleScrollNext: ve
1052
1069
  };
1053
1070
  }
1054
1071
  //#endregion
1055
1072
  //#region src/components/Gantt/GanttChart/hooks/useNormalizedItems.ts
1056
- function ot({ visibleItems: e, committedRangeById: t = {}, viewMode: n = "day" }) {
1057
- return { normalizedItems: q(() => {
1073
+ function lt({ visibleItems: e, committedRangeById: t = {}, viewMode: n = "day" }) {
1074
+ return { normalizedItems: G(() => {
1058
1075
  let r = Array.isArray(e) ? e : [], i = [], a = b(n) ? n : "day";
1059
1076
  for (let e = 0; e < r.length; e++) {
1060
1077
  let n = r[e], o = String(n?.id ?? `row-${e}`), { rawStartMs: s, rawEndMs: c, baseStartMs: l, baseEndMs: u, invalid: d } = N(n?.start, n?.end), f = t[o], p = n?.type === "summary" ? !1 : d, m = O({
@@ -1093,12 +1110,12 @@ function ot({ visibleItems: e, committedRangeById: t = {}, viewMode: n = "day" }
1093
1110
  }
1094
1111
  //#endregion
1095
1112
  //#region src/components/Gantt/GanttChart/hooks/useGanttScrollbars.tsx
1096
- function st(e, t) {
1097
- let [n, r] = Y(!1);
1098
- return ce(() => {
1113
+ function ut(e, t) {
1114
+ let [n, r] = q(!1);
1115
+ return ue(() => {
1099
1116
  let n = e.current, i = t.current;
1100
1117
  if (!n || !i) return;
1101
- let a = he({
1118
+ let a = _e({
1102
1119
  target: n,
1103
1120
  elements: { viewport: i }
1104
1121
  }, { scrollbars: {
@@ -1110,7 +1127,7 @@ function st(e, t) {
1110
1127
  e.pointerType === "mouse" && e.button !== 0 || (s = !0, c = e.pointerId, r(!0));
1111
1128
  }, u = (e) => {
1112
1129
  if (!s) return;
1113
- let t = e.pointerId, n = "pointerId" in e && L(t) ? t : null;
1130
+ let t = e.pointerId, n = "pointerId" in e && F(t) ? t : null;
1114
1131
  n !== null && c !== null && n !== c || (s = !1, c = null, r(!1));
1115
1132
  }, d = { capture: !0 };
1116
1133
  return o.addEventListener("pointerdown", l, d), o.addEventListener("lostpointercapture", u, d), document.addEventListener("pointerup", u, d), document.addEventListener("pointercancel", u, d), document.addEventListener("lostpointercapture", u, d), window.addEventListener("blur", u), () => {
@@ -1120,11 +1137,50 @@ function st(e, t) {
1120
1137
  }
1121
1138
  //#endregion
1122
1139
  //#region src/components/Gantt/GanttChart/utils/timelineMarkers.ts
1123
- function ct(e, t, n, r, i) {
1124
- return !!e && Number.isFinite(r) && Ge(i, r) && t !== null && Number.isFinite(t) && t >= 0 && t <= n;
1140
+ function dt(e, t, n, r, i) {
1141
+ return !!e && Number.isFinite(r) && Je(i, r) && t !== null && Number.isFinite(t) && t >= 0 && t <= n;
1125
1142
  }
1126
- var lt = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackRef: r, virtualColumns: i, lowerSegments: a, todayLineLeft: o, todayCenterMs: s, showTodayLine: c, viewMode: l, availableModes: u, formatMessage: d, onViewModeChange: f, onTodayClick: p, onScrollPrev: m, onScrollNext: h }) => {
1127
- let g = q(() => He({
1143
+ var Z = {
1144
+ root: "_root_1m9dr_1",
1145
+ timelineHost: "_timelineHost_1m9dr_12",
1146
+ timelineContent: "_timelineContent_1m9dr_19",
1147
+ canvas: "_canvas_1m9dr_27",
1148
+ weekendBg: "_weekendBg_1m9dr_33",
1149
+ colLine: "_colLine_1m9dr_40",
1150
+ rowLine: "_rowLine_1m9dr_49",
1151
+ rowHoverBg: "_rowHoverBg_1m9dr_56",
1152
+ todayIndicator: "_todayIndicator_1m9dr_65",
1153
+ todayIndicatorContentLine: "_todayIndicatorContentLine_1m9dr_73",
1154
+ todayIndicatorLine: "_todayIndicatorLine_1m9dr_77",
1155
+ todayIndicatorHeaderDot: "_todayIndicatorHeaderDot_1m9dr_86",
1156
+ calendar: "_calendar_1m9dr_98",
1157
+ calendarTrack: "_calendarTrack_1m9dr_105",
1158
+ calendarToolbar: "_calendarToolbar_1m9dr_112",
1159
+ headerCell: "_headerCell_1m9dr_126",
1160
+ headerCellTop: "_headerCellTop_1m9dr_140",
1161
+ headerCellBottom: "_headerCellBottom_1m9dr_147",
1162
+ isActive: "_isActive_1m9dr_152",
1163
+ headerColLine: "_headerColLine_1m9dr_156",
1164
+ headerCellStickyText: "_headerCellStickyText_1m9dr_164",
1165
+ offscreenRow: "_offscreenRow_1m9dr_171",
1166
+ offscreenTrack: "_offscreenTrack_1m9dr_179",
1167
+ offscreenBtn: "_offscreenBtn_1m9dr_185",
1168
+ offscreenBtnLeft: "_offscreenBtnLeft_1m9dr_209",
1169
+ offscreenBtnRight: "_offscreenBtnRight_1m9dr_214",
1170
+ bar: "_bar_1m9dr_220",
1171
+ barProgress: "_barProgress_1m9dr_238",
1172
+ barResizeHandle: "_barResizeHandle_1m9dr_241",
1173
+ isReadonly: "_isReadonly_1m9dr_251",
1174
+ isDragging: "_isDragging_1m9dr_255",
1175
+ isMicro: "_isMicro_1m9dr_267",
1176
+ isFull: "_isFull_1m9dr_292",
1177
+ barLabel: "_barLabel_1m9dr_296",
1178
+ isHidden: "_isHidden_1m9dr_306",
1179
+ isOutside: "_isOutside_1m9dr_310",
1180
+ barResizeHandleLeft: "_barResizeHandleLeft_1m9dr_348",
1181
+ barResizeHandleRight: "_barResizeHandleRight_1m9dr_356"
1182
+ }, ft = B.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackRef: r, virtualColumns: i, lowerSegments: a, todayLineLeft: o, todayCenterMs: s, showTodayLine: c, viewMode: l, availableModes: u, formatMessage: d, onViewModeChange: f, onTodayClick: p, onScrollPrev: m, onScrollNext: h }) => {
1183
+ let g = G(() => Ge({
1128
1184
  lowerSegments: a,
1129
1185
  viewMode: l,
1130
1186
  formatMessage: d
@@ -1132,29 +1188,30 @@ var lt = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1132
1188
  a,
1133
1189
  l,
1134
1190
  d
1135
- ]), _ = q(() => {
1136
- let r = Ae(n, t, e), i = r - 240, a = r + t + 240;
1191
+ ]), _ = G(() => {
1192
+ let r = Ne(n, t, e), i = r - 240, a = r + t + 240;
1137
1193
  return g.filter((e) => e.left < a && e.left + e.width > i);
1138
1194
  }, [
1139
1195
  g,
1140
1196
  n,
1141
1197
  t,
1142
1198
  e
1143
- ]), v = q(() => a.length && a.find((e) => s != null && s >= e.startMs && s < e.endMs)?.id || null, [a, s]), y = a[0]?.startMs ?? 0, b = a[a.length - 1]?.endMs ?? 0, x = ct(c, o, e, s ?? NaN, {
1199
+ ]), v = G(() => a.length && a.find((e) => s != null && s >= e.startMs && s < e.endMs)?.id || null, [a, s]), y = a[0]?.startMs ?? 0, b = a[a.length - 1]?.endMs ?? 0, x = dt(c, o, e, s ?? NaN, {
1144
1200
  startMs: y,
1145
1201
  endMs: b
1146
1202
  });
1147
- return /* @__PURE__ */ V("div", {
1148
- className: "bsy-gantt-chart__calendar",
1149
- children: [/* @__PURE__ */ V("div", {
1203
+ return /* @__PURE__ */ z("div", {
1204
+ className: Z.calendar,
1205
+ children: [/* @__PURE__ */ z("div", {
1150
1206
  ref: r,
1151
- className: "bsy-gantt-chart__calendar-track",
1207
+ className: Z.calendarTrack,
1208
+ "data-testid": "gantt-calendar-track",
1152
1209
  style: { width: e },
1153
1210
  children: [
1154
1211
  i.map((e) => {
1155
1212
  let t = a[e.index];
1156
- return t ? /* @__PURE__ */ B("div", {
1157
- className: "bsy-gantt-chart__header-col-line",
1213
+ return t ? /* @__PURE__ */ R("div", {
1214
+ className: Z.headerColLine,
1158
1215
  style: {
1159
1216
  left: t.left,
1160
1217
  top: 34,
@@ -1162,20 +1219,21 @@ var lt = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1162
1219
  }
1163
1220
  }, `header-line-${t.id}`) : null;
1164
1221
  }),
1165
- _.map((e) => /* @__PURE__ */ V(H.Fragment, { children: [/* @__PURE__ */ B("div", {
1166
- className: "bsy-gantt-chart__header-cell bsy-gantt-chart__header-cell--top",
1222
+ _.map((e) => /* @__PURE__ */ z(B.Fragment, { children: [/* @__PURE__ */ R("div", {
1223
+ className: J(Z.headerCell, Z.headerCellTop),
1224
+ "data-testid": "gantt-header-cell-top",
1167
1225
  style: {
1168
1226
  left: e.left,
1169
1227
  width: e.width,
1170
1228
  height: 34,
1171
1229
  "--segment-left": `${e.left}px`
1172
1230
  },
1173
- children: /* @__PURE__ */ B("span", {
1174
- className: "bsy-gantt-chart__header-cell-sticky-text",
1231
+ children: /* @__PURE__ */ R("span", {
1232
+ className: Z.headerCellStickyText,
1175
1233
  children: e.label
1176
1234
  })
1177
- }), /* @__PURE__ */ B("div", {
1178
- className: "bsy-gantt-chart__header-col-line",
1235
+ }), /* @__PURE__ */ R("div", {
1236
+ className: Z.headerColLine,
1179
1237
  style: {
1180
1238
  left: e.left + e.width,
1181
1239
  top: 0,
@@ -1184,8 +1242,11 @@ var lt = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1184
1242
  })] }, `top-group-${e.id}`)),
1185
1243
  i.map((e) => {
1186
1244
  let t = a[e.index];
1187
- return t ? /* @__PURE__ */ B("div", {
1188
- className: X("bsy-gantt-chart__header-cell", "bsy-gantt-chart__header-cell--bottom", t.id === v && "bsy-gantt-chart__header-cell--bottom-active"),
1245
+ if (!t) return null;
1246
+ let n = t.id === v;
1247
+ return /* @__PURE__ */ R("div", {
1248
+ className: J(Z.headerCell, Z.headerCellBottom, n && Z.isActive),
1249
+ "data-testid": "gantt-header-cell-bottom",
1189
1250
  style: {
1190
1251
  left: t.left,
1191
1252
  width: t.width,
@@ -1193,16 +1254,17 @@ var lt = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1193
1254
  top: 34
1194
1255
  },
1195
1256
  children: t.label
1196
- }, t.id) : null;
1257
+ }, t.id);
1197
1258
  }),
1198
- x && /* @__PURE__ */ B("span", {
1199
- className: "bsy-gantt-chart__today-indicator--header-dot",
1259
+ x && /* @__PURE__ */ R("span", {
1260
+ className: Z.todayIndicatorHeaderDot,
1200
1261
  style: { left: o ?? void 0 }
1201
1262
  })
1202
1263
  ]
1203
- }), /* @__PURE__ */ B("div", {
1204
- className: "bsy-gantt-chart__calendar-toolbar",
1205
- children: /* @__PURE__ */ B(F, {
1264
+ }), /* @__PURE__ */ R("div", {
1265
+ className: Z.calendarToolbar,
1266
+ "data-testid": "gantt-calendar-toolbar",
1267
+ children: /* @__PURE__ */ R(ce, {
1206
1268
  viewMode: l,
1207
1269
  availableModes: u,
1208
1270
  onViewModeChange: f,
@@ -1215,8 +1277,8 @@ var lt = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1215
1277
  });
1216
1278
  //#endregion
1217
1279
  //#region src/components/Gantt/GanttChart/hooks/useGanttRowVirtualScroll.ts
1218
- function ut({ items: e, contentRef: t, safeRowHeight: n, viewportHeight: r, overscan: i = 4 }) {
1219
- let [a, o] = Y(!1), s = pe({
1280
+ function pt({ items: e, contentRef: t, safeRowHeight: n, viewportHeight: r, overscan: i = 4 }) {
1281
+ let [a, o] = q(!1), s = he({
1220
1282
  count: e.length,
1221
1283
  getScrollElement: () => t.current,
1222
1284
  estimateSize: () => n,
@@ -1234,8 +1296,8 @@ function ut({ items: e, contentRef: t, safeRowHeight: n, viewportHeight: r, over
1234
1296
  }
1235
1297
  //#endregion
1236
1298
  //#region src/components/Gantt/GanttChart/hooks/useOffscreenIndicators.ts
1237
- function dt({ virtualRows: e, normalizedItems: t, visibleStartMs: n, visibleEndMs: r, enabled: i = !0, excludeTaskId: a = null }) {
1238
- return q(() => {
1299
+ function mt({ virtualRows: e, normalizedItems: t, visibleStartMs: n, visibleEndMs: r, enabled: i = !0, excludeTaskId: a = null }) {
1300
+ return G(() => {
1239
1301
  if (!i || !Array.isArray(e) || !Array.isArray(t) || !Number.isFinite(n) || !Number.isFinite(r) || n >= r) return [];
1240
1302
  let o = [];
1241
1303
  return e.forEach((e) => {
@@ -1263,8 +1325,8 @@ function dt({ virtualRows: e, normalizedItems: t, visibleStartMs: n, visibleEndM
1263
1325
  }
1264
1326
  //#endregion
1265
1327
  //#region src/components/Gantt/GanttChart/hooks/useRowHoverHighlight.ts
1266
- function ft({ normalizedItems: e, safeRowHeight: t }) {
1267
- let n = Z(d, (e) => e.setHighlightTarget), r = Z(d, (e) => e.subscribeHighlight), i = Z(d, (e) => e.getIsScrollActive), a = J(null), o = J(null), s = J(null), c = J(!1), l = q(() => {
1328
+ function ht({ normalizedItems: e, safeRowHeight: t }) {
1329
+ let n = Y(d, (e) => e.setHighlightTarget), r = Y(d, (e) => e.subscribeHighlight), i = Y(d, (e) => e.getIsScrollActive), a = K(null), o = K(null), s = K(null), c = K(!1), l = G(() => {
1268
1330
  let t = /* @__PURE__ */ new Map(), n = 0;
1269
1331
  for (; n < e.length;) {
1270
1332
  let r = e[n]?.parentId;
@@ -1279,15 +1341,15 @@ function ft({ normalizedItems: e, safeRowHeight: t }) {
1279
1341
  } else t.set(n, null), n += 1;
1280
1342
  }
1281
1343
  return t;
1282
- }, [e]), u = J(l);
1344
+ }, [e]), u = K(l);
1283
1345
  u.current = l;
1284
- let m = G((e, n) => {
1346
+ let m = U((e, n) => {
1285
1347
  let r = o.current;
1286
1348
  r && (r.style.top = `${e * t}px`, r.style.height = `${(n - e + 1) * t}px`, r.style.display = "block");
1287
- }, [t]), h = G(() => {
1349
+ }, [t]), h = U(() => {
1288
1350
  let e = o.current;
1289
1351
  e && (e.style.display = "none");
1290
- }, []), g = G((t) => {
1352
+ }, []), g = U((t) => {
1291
1353
  if (!t) {
1292
1354
  h();
1293
1355
  return;
@@ -1306,7 +1368,7 @@ function ft({ normalizedItems: e, safeRowHeight: t }) {
1306
1368
  e,
1307
1369
  m,
1308
1370
  h
1309
- ]), _ = G((r) => {
1371
+ ]), _ = U((r) => {
1310
1372
  if (i?.()) {
1311
1373
  a.current !== null && (a.current = null, h()), c.current = !1;
1312
1374
  return;
@@ -1331,10 +1393,10 @@ function ft({ normalizedItems: e, safeRowHeight: t }) {
1331
1393
  m,
1332
1394
  h,
1333
1395
  i
1334
- ]), v = G(() => {
1396
+ ]), v = U(() => {
1335
1397
  c.current = !1, a.current = null, h(), s.current !== null && (s.current = null, n?.(null));
1336
1398
  }, [n, h]);
1337
- return K(() => {
1399
+ return W(() => {
1338
1400
  if (r) return r((e, t) => {
1339
1401
  if (t?.source === "table") {
1340
1402
  c.current = !1, a.current = null, s.current = e, g(e);
@@ -1350,14 +1412,14 @@ function ft({ normalizedItems: e, safeRowHeight: t }) {
1350
1412
  }
1351
1413
  //#endregion
1352
1414
  //#region src/components/Gantt/GanttChart/GanttInteractionContext.ts
1353
- var pt = de({
1415
+ var gt = pe({
1354
1416
  tooltip: null,
1355
1417
  isScrolling: !1,
1356
1418
  collapsedKeys: void 0,
1357
1419
  onBarClick: () => {},
1358
1420
  onTaskMouseDown: () => {},
1359
1421
  onResizeMouseDown: () => {}
1360
- }), mt = (e) => Z(pt, e), ht = de({
1422
+ }), _t = (e) => Y(gt, e), vt = pe({
1361
1423
  viewMode: "day",
1362
1424
  pixelsPerDay: 1,
1363
1425
  timelineStartMs: 0,
@@ -1373,15 +1435,15 @@ var pt = de({
1373
1435
  viewportWidth: 0,
1374
1436
  timelineWidth: 0,
1375
1437
  isInitialLayoutReady: !1
1376
- }), $ = (e) => Z(ht, e), gt = (e, t) => {
1438
+ }), Q = (e) => Y(vt, e), yt = (e, t) => {
1377
1439
  let n = e.replace("#", ""), r = n.length === 3 ? n.split("").map((e) => e + e).join("") : n;
1378
1440
  return `rgba(${parseInt(r.slice(0, 2), 16)}, ${parseInt(r.slice(2, 4), 16)}, ${parseInt(r.slice(4, 6), 16)}, ${t})`;
1379
- }, _t = (e, t) => {
1380
- if (!R(e)) return null;
1441
+ }, bt = (e, t) => {
1442
+ if (!I(e)) return null;
1381
1443
  let n = e.trim();
1382
- return i.test(n) ? gt(n, t) : null;
1383
- }, vt = (e, t = 2.5) => {
1384
- if (!e || !R(e)) return "#121211";
1444
+ return i.test(n) ? yt(n, t) : null;
1445
+ }, xt = (e, t = 2.5) => {
1446
+ if (!e || !I(e)) return "#121211";
1385
1447
  let n, r, i;
1386
1448
  if (e.startsWith("#")) {
1387
1449
  let t = e.replace("#", ""), a = t.length === 3 ? [...t].map((e) => e + e) : [
@@ -1399,23 +1461,23 @@ var pt = de({
1399
1461
  return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
1400
1462
  };
1401
1463
  return 1.05 / (.2126 * a(n) + .7152 * a(r) + .0722 * a(i) + .05) >= t ? "#ffffff" : "#121211";
1402
- }, yt, bt = () => {
1403
- if (yt !== void 0) return yt;
1464
+ }, St, Ct = () => {
1465
+ if (St !== void 0) return St;
1404
1466
  try {
1405
- yt = document.createElement("canvas").getContext("2d");
1467
+ St = document.createElement("canvas").getContext("2d");
1406
1468
  } catch {
1407
- yt = null;
1469
+ St = null;
1408
1470
  }
1409
- return yt;
1410
- }, xt = (e, t = "12px -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, PingFang SC, Noto Sans, Noto Sans CJK SC, Microsoft YaHei, \"微软雅黑\", sans-serif") => {
1471
+ return St;
1472
+ }, wt = (e, t = "12px -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, PingFang SC, Noto Sans, Noto Sans CJK SC, Microsoft YaHei, \"微软雅黑\", sans-serif") => {
1411
1473
  if (!e) return 0;
1412
- let n = String(e), r = bt();
1474
+ let n = String(e), r = Ct();
1413
1475
  return r ? (r.font = t, r.measureText(n).width + 20) : n.length * 12 + 20;
1414
1476
  };
1415
1477
  //#endregion
1416
1478
  //#region src/components/Gantt/GanttChart/hooks/useBarTooltipHover.ts
1417
- function St() {
1418
- let [e, t] = Y(null), n = J("idle"), r = G((e) => {
1479
+ function Tt() {
1480
+ let [e, t] = q(null), n = K("idle"), r = U((e) => {
1419
1481
  n.current === "frozen" && (n.current = "open");
1420
1482
  let r = e.currentTarget.getBoundingClientRect();
1421
1483
  t({
@@ -1425,13 +1487,13 @@ function St() {
1425
1487
  bottom: r.bottom,
1426
1488
  height: r.height
1427
1489
  });
1428
- }, []), i = G(() => {
1490
+ }, []), i = U(() => {
1429
1491
  n.current === "open" ? n.current = "frozen" : t(null);
1430
- }, []), a = G((e) => {
1492
+ }, []), a = U((e) => {
1431
1493
  n.current = e ? "open" : "idle", e || t(null);
1432
1494
  }, []);
1433
1495
  return {
1434
- virtualReference: q(() => {
1496
+ virtualReference: G(() => {
1435
1497
  if (e) return { getBoundingClientRect: () => ({
1436
1498
  width: 0,
1437
1499
  height: e.height,
@@ -1451,18 +1513,18 @@ function St() {
1451
1513
  }
1452
1514
  //#endregion
1453
1515
  //#region src/components/Gantt/GanttChart/GanttBarTooltip/GanttBarTooltip.tsx
1454
- var Ct = {
1516
+ var Et = {
1455
1517
  borderRadius: "10px",
1456
1518
  padding: 0,
1457
1519
  backgroundColor: "#fff",
1458
1520
  boxShadow: "0 0 12px 0 rgba(0, 0, 0, 0.08)"
1459
- }, wt = ({ item: e, tooltip: t, disabled: r = !1, children: i }) => {
1460
- let { virtualReference: a, handleMouseMove: o, handleMouseLeave: s, handleTooltipVisibleChange: c } = St(), l = q(() => r || !t ? null : t(e), [
1521
+ }, Dt = ({ item: e, tooltip: t, disabled: r = !1, children: i }) => {
1522
+ let { virtualReference: a, handleMouseMove: o, handleMouseLeave: s, handleTooltipVisibleChange: c } = Tt(), l = G(() => r || !t ? null : t(e), [
1461
1523
  r,
1462
1524
  t,
1463
1525
  e
1464
1526
  ]);
1465
- return l ? /* @__PURE__ */ B(n, {
1527
+ return l ? /* @__PURE__ */ R(n, {
1466
1528
  content: l,
1467
1529
  placement: "bottom",
1468
1530
  showArrow: !1,
@@ -1474,33 +1536,33 @@ var Ct = {
1474
1536
  zIndex: 8001,
1475
1537
  virtualReference: a,
1476
1538
  onVisibleChange: c,
1477
- style: Ct,
1539
+ style: Et,
1478
1540
  children: i({
1479
1541
  onMouseMove: o,
1480
1542
  onMouseLeave: s
1481
1543
  })
1482
- }) : /* @__PURE__ */ B(z, { children: i({
1544
+ }) : /* @__PURE__ */ R(L, { children: i({
1483
1545
  onMouseMove: () => {},
1484
1546
  onMouseLeave: () => {}
1485
1547
  }) });
1486
- }, Tt = (e, t, n) => ({
1548
+ }, Ot = (e, t, n) => ({
1487
1549
  ...e,
1488
1550
  clientX: t,
1489
1551
  clientY: n,
1490
1552
  preventDefault: () => e.preventDefault(),
1491
1553
  stopPropagation: () => e.stopPropagation()
1492
1554
  });
1493
- function Et({ enabled: e, onTaskMouseDown: t, onBarClick: n }) {
1494
- let r = J(null), i = J(null), a = J(t), o = J(n);
1495
- K(() => {
1555
+ function kt({ enabled: e, onTaskMouseDown: t, onBarClick: n }) {
1556
+ let r = K(null), i = K(null), a = K(t), o = K(n);
1557
+ W(() => {
1496
1558
  a.current = t, o.current = n;
1497
1559
  }, [t, n]);
1498
- let s = G(() => {
1560
+ let s = U(() => {
1499
1561
  r.current = null;
1500
1562
  let e = i.current;
1501
1563
  e && (document.removeEventListener("mousemove", e.move), document.removeEventListener("mouseup", e.up), i.current = null);
1502
1564
  }, []);
1503
- return K(() => () => s(), [s]), { handlePointerMouseDown: G((t, n, c, l = 1) => {
1565
+ return W(() => () => s(), [s]), { handlePointerMouseDown: U((t, n, c, l = 1) => {
1504
1566
  if (!e) return;
1505
1567
  s();
1506
1568
  let u = {
@@ -1515,7 +1577,7 @@ function Et({ enabled: e, onTaskMouseDown: t, onBarClick: n }) {
1515
1577
  let d = (e) => {
1516
1578
  if (r.current !== u || u.dragStarted) return;
1517
1579
  let t = e.clientX - u.startClientX, i = e.clientY - u.startClientY;
1518
- Math.hypot(t, i) < 5 || (u.dragStarted = !0, s(), a.current?.(Tt(e, u.startClientX, u.startClientY), n, c, u.width));
1580
+ Math.hypot(t, i) < 5 || (u.dragStarted = !0, s(), a.current?.(Ot(e, u.startClientX, u.startClientY), n, c, u.width));
1519
1581
  }, f = (e) => {
1520
1582
  r.current === u && (s(), u.dragStarted || o.current?.(e, n));
1521
1583
  };
@@ -1525,18 +1587,18 @@ function Et({ enabled: e, onTaskMouseDown: t, onBarClick: n }) {
1525
1587
  }, document.addEventListener("mousemove", d), document.addEventListener("mouseup", f);
1526
1588
  }, [e, s]) };
1527
1589
  }
1528
- var Dt = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermission: a }) => {
1529
- let { t: o } = t(), s = $((e) => e.viewMode), c = $((e) => e.timelineCoords), l = $((e) => e.timelineStartMs), u = $((e) => e.timelineEndMs), d = $((e) => e.timelineWidth), f = mt((e) => e.tooltip), p = mt((e) => e.isScrolling), m = mt((e) => e.onBarClick), h = mt((e) => e.onTaskMouseDown), g = mt((e) => e.onResizeMouseDown), _ = p ? null : f, v = r === e.id, y = v && i ? i.previewStartMs : e.startMs, b = v && i ? i.previewEndMs : e.endMs, S = q(() => {
1590
+ var At = B.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermission: a }) => {
1591
+ let { t: o } = t(), s = Q((e) => e.viewMode), c = Q((e) => e.timelineCoords), l = Q((e) => e.timelineStartMs), u = Q((e) => e.timelineEndMs), d = Q((e) => e.timelineWidth), f = _t((e) => e.tooltip), p = _t((e) => e.isScrolling), m = _t((e) => e.onBarClick), h = _t((e) => e.onTaskMouseDown), g = _t((e) => e.onResizeMouseDown), _ = p ? null : f, v = r === e.id, y = v && i ? i.previewStartMs : e.startMs, b = v && i ? i.previewEndMs : e.endMs, S = G(() => {
1530
1592
  let t = e.color;
1531
1593
  return {
1532
1594
  baseColor: t,
1533
- containerBgColor: _t(t, .2) || t,
1534
- hoverBorderColor: _t(t, .5) || "transparent",
1535
- insideLabelColor: vt(t)
1595
+ containerBgColor: bt(t, .2) || t,
1596
+ hoverBorderColor: bt(t, .5) || "transparent",
1597
+ insideLabelColor: xt(t)
1536
1598
  };
1537
- }, [e.color]), C = q(() => {
1599
+ }, [e.color]), C = G(() => {
1538
1600
  if (y == null || b == null || y >= b || l >= u) return null;
1539
- let e = qe({
1601
+ let e = Xe({
1540
1602
  startMs: y,
1541
1603
  endMs: b
1542
1604
  }, {
@@ -1544,14 +1606,14 @@ var Dt = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1544
1606
  endMs: u
1545
1607
  });
1546
1608
  if (!e) return null;
1547
- let t = c.toX(e.startMs), n = c.toWidth(e.startMs, e.endMs), r = t + n, a = e.startMs !== y, o = e.endMs !== b, s = v && i && Number.isFinite(i.previewLeftPx), f = s && !a ? i.previewLeftPx : t, p = s && !o ? f + n : r, m = Math.max(0, f), h = Math.min(d, p);
1548
- return m >= h ? null : {
1609
+ let t = c.toX(e.startMs), n = c.toWidth(e.startMs, e.endMs), r = t + n, a = e.startMs !== y, o = e.endMs !== b, s = v && i && Number.isFinite(i.previewLeftPx), f = s ? c.toWidth(y, b) : n, p = s ? i.previewLeftPx : t, m = s ? p + f : r, h = s ? p : Math.max(0, p), g = Math.min(d, m);
1610
+ return g <= 0 || h >= d || h >= g ? null : {
1549
1611
  clippedRange: e,
1550
- rawBarLeft: f,
1551
- calculatedBarLeft: m,
1552
- calculatedBarWidth: h - m,
1553
- clippedStart: a || m !== f,
1554
- clippedEnd: o || h !== p
1612
+ rawBarLeft: p,
1613
+ calculatedBarLeft: h,
1614
+ calculatedBarWidth: g - h,
1615
+ clippedStart: s ? !1 : a || h !== p,
1616
+ clippedEnd: o || g !== m
1555
1617
  };
1556
1618
  }, [
1557
1619
  y,
@@ -1562,14 +1624,14 @@ var Dt = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1562
1624
  c,
1563
1625
  v,
1564
1626
  i
1565
- ]), { baseColor: w, containerBgColor: T, hoverBorderColor: ee, insideLabelColor: E } = S, D = C?.calculatedBarWidth ?? 0, O = e.progress === null, k = !C || y === null || b === null ? 0 : Math.max(0, Math.min(1, (C.rawBarLeft + c.toWidth(C.clippedRange.startMs, Math.min(C.clippedRange.endMs, Math.max(C.clippedRange.startMs, y + (b - y) * Math.max(0, e.progress ?? 0)))) - C.calculatedBarLeft) / C.calculatedBarWidth)), A = O || k >= 1, j = A ? "100%" : `${k * 100}%`, M = a || _e, N = M.canMove, te = e.label ?? "", ne = typeof te == "string" ? te : "", re = D < 40, ie = Math.max(0, D - 10), ae = q(() => ne ? xt(ne) : 0, [ne]), P = !!ne && ae > ie && !!C && C.calculatedBarLeft + C.calculatedBarWidth + 4 + ae <= d, { handlePointerMouseDown: oe } = Et({
1627
+ ]), { baseColor: w, containerBgColor: T, hoverBorderColor: ee, insideLabelColor: E } = S, D = C?.calculatedBarWidth ?? 0, O = e.progress === null, k = !C || y === null || b === null ? 0 : Math.max(0, Math.min(1, (C.rawBarLeft + c.toWidth(C.clippedRange.startMs, Math.min(C.clippedRange.endMs, Math.max(C.clippedRange.startMs, y + (b - y) * Math.max(0, e.progress ?? 0)))) - C.calculatedBarLeft) / C.calculatedBarWidth)), A = O || k >= 1, j = A ? "100%" : `${k * 100}%`, M = a || ye, N = M.canMove, te = e.label ?? "", ne = typeof te == "string" ? te : "", re = D < 40, ie = Math.max(0, D - 10), ae = G(() => ne ? wt(ne) : 0, [ne]), oe = !!ne && ae > ie && !!C && C.calculatedBarLeft + C.calculatedBarWidth + 4 + ae <= d, { handlePointerMouseDown: se } = kt({
1566
1628
  enabled: N,
1567
1629
  onTaskMouseDown: h,
1568
1630
  onBarClick: m
1569
1631
  });
1570
1632
  if (!C) return null;
1571
- let { calculatedBarLeft: F, clippedStart: I, clippedEnd: L } = C, R = F + D, H = F + Math.max(40, D + 12) <= d, U = y !== null && b !== null ? s === "quarterMonth" ? x(y, b) : c.toWidth(y, b) : D, W = U < 40 ? Math.max(40, U + 12) : U, G = R + 4 <= d, K = {
1572
- left: F,
1633
+ let { calculatedBarLeft: ce, clippedStart: P, clippedEnd: F } = C, I = ce + D, B = ce + Math.max(40, D + 12) <= d, V = y !== null && b !== null ? s === "quarterMonth" ? x(y, b) : c.toWidth(y, b) : D, H = V < 40 ? Math.max(40, V + 12) : V, U = I + 4 <= d, W = {
1634
+ left: ce,
1573
1635
  top: n,
1574
1636
  width: `var(--bsy-gantt-bar-actual-width, ${D}px)`,
1575
1637
  height: 26,
@@ -1580,19 +1642,20 @@ var Dt = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1580
1642
  "--bsy-gantt-bar-calc-width": `${D}px`,
1581
1643
  "--bsy-gantt-bar-label-color": E
1582
1644
  };
1583
- return /* @__PURE__ */ B(wt, {
1645
+ return /* @__PURE__ */ R(Dt, {
1584
1646
  item: e,
1585
1647
  tooltip: _,
1586
1648
  disabled: v,
1587
- children: ({ onMouseMove: t, onMouseLeave: n }) => /* @__PURE__ */ V("div", {
1588
- className: X("bsy-gantt-chart__bar", `bsy-gantt-chart__bar--${e.type || "task"}`, {
1589
- "bsy-gantt-chart__bar--readonly": !N,
1590
- "bsy-gantt-chart__bar--dragging": v,
1591
- "bsy-gantt-chart__bar--micro": re && H
1649
+ children: ({ onMouseMove: t, onMouseLeave: n }) => /* @__PURE__ */ z("div", {
1650
+ className: J(Z.bar, {
1651
+ [Z.isReadonly]: !N,
1652
+ [Z.isDragging]: v,
1653
+ [Z.isMicro]: re && B
1592
1654
  }),
1593
- style: K,
1655
+ "data-testid": "gantt-bar",
1656
+ style: W,
1594
1657
  onMouseDown: (t) => {
1595
- N && oe(t, e, F, W);
1658
+ N && se(t, e, ce, H);
1596
1659
  },
1597
1660
  onClick: (t) => {
1598
1661
  N || m(t, e);
@@ -1600,29 +1663,32 @@ var Dt = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1600
1663
  onMouseMove: t,
1601
1664
  onMouseLeave: n,
1602
1665
  children: [
1603
- e.type === "task" ? /* @__PURE__ */ B("div", {
1604
- className: X("bsy-gantt-chart__bar-progress", { "bsy-gantt-chart__bar-progress--full": A }),
1666
+ e.type === "task" ? /* @__PURE__ */ R("div", {
1667
+ className: J(Z.barProgress, { [Z.isFull]: A }),
1668
+ "data-testid": "gantt-bar-progress",
1605
1669
  style: { width: j }
1606
1670
  }) : null,
1607
- /* @__PURE__ */ B("span", {
1608
- className: X("bsy-gantt-chart__bar-label", { "bsy-gantt-chart__bar-label--hidden": P }),
1671
+ /* @__PURE__ */ R("span", {
1672
+ className: J(Z.barLabel, { [Z.isHidden]: oe }),
1609
1673
  style: { color: "var(--bsy-gantt-bar-label-color)" },
1610
1674
  children: te
1611
1675
  }),
1612
- P ? /* @__PURE__ */ B("span", {
1613
- className: "bsy-gantt-chart__bar-label bsy-gantt-chart__bar-label--outside",
1614
- style: { color: "#121211" },
1676
+ oe ? /* @__PURE__ */ R("span", {
1677
+ className: J(Z.barLabel, Z.isOutside),
1678
+ "data-testid": "gantt-bar-label-outside",
1615
1679
  children: te
1616
1680
  }) : null,
1617
- M.canResizeStart && !I || M.canResizeEnd && !L && G ? /* @__PURE__ */ V(z, { children: [M.canResizeStart && !I ? /* @__PURE__ */ B("button", {
1681
+ M.canResizeStart && !P || M.canResizeEnd && !F && U ? /* @__PURE__ */ z(L, { children: [M.canResizeStart && !P ? /* @__PURE__ */ R("button", {
1618
1682
  type: "button",
1619
- className: "bsy-gantt-chart__bar-resize-handle bsy-gantt-chart__bar-resize-handle--left",
1620
- onMouseDown: (t) => g(t, e, F, "start", D),
1683
+ className: J(Z.barResizeHandle, Z.barResizeHandleLeft),
1684
+ "data-testid": "gantt-bar-resize-left",
1685
+ onMouseDown: (t) => g(t, e, ce, "start", D),
1621
1686
  "aria-label": o("gantt.timeBegin")
1622
- }) : null, M.canResizeEnd && !L && G ? /* @__PURE__ */ B("button", {
1687
+ }) : null, M.canResizeEnd && !F && U ? /* @__PURE__ */ R("button", {
1623
1688
  type: "button",
1624
- className: "bsy-gantt-chart__bar-resize-handle bsy-gantt-chart__bar-resize-handle--right",
1625
- onMouseDown: (t) => g(t, e, F, "end", D),
1689
+ className: J(Z.barResizeHandle, Z.barResizeHandleRight),
1690
+ "data-testid": "gantt-bar-resize-right",
1691
+ onMouseDown: (t) => g(t, e, ce, "end", D),
1626
1692
  "aria-label": o("gantt.timeEnd")
1627
1693
  }) : null] }) : null
1628
1694
  ]
@@ -1632,34 +1698,44 @@ var Dt = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1632
1698
  if (e.barTop !== t.barTop || e.dragTaskId !== t.dragTaskId || e.dragPermission?.canMove !== t.dragPermission?.canMove || e.dragPermission?.canResizeStart !== t.dragPermission?.canResizeStart || e.dragPermission?.canResizeEnd !== t.dragPermission?.canResizeEnd || e.item !== t.item) return !1;
1633
1699
  let n = e.dragPreview, r = t.dragPreview;
1634
1700
  return !(n !== r && (!n || !r || n.previewStartMs !== r.previewStartMs || n.previewEndMs !== r.previewEndMs || n.previewLeftPx !== r.previewLeftPx));
1635
- }), Ot = (e) => String(e).padStart(2, "0");
1636
- function kt(e, t) {
1701
+ }), $ = {
1702
+ root: "_root_8s9va_1",
1703
+ arrow: "_arrow_8s9va_9",
1704
+ label: "_label_8s9va_13",
1705
+ isCollapsed: "_isCollapsed_8s9va_28",
1706
+ labelText: "_labelText_8s9va_32",
1707
+ track: "_track_8s9va_39",
1708
+ progress: "_progress_8s9va_46",
1709
+ summaryTooltip: "_summaryTooltip_8s9va_56",
1710
+ summaryTooltipLine: "_summaryTooltipLine_8s9va_66"
1711
+ }, jt = (e) => String(e).padStart(2, "0");
1712
+ function Mt(e, t) {
1637
1713
  if (e == null) return t("summary.empty");
1638
1714
  let n = C(e);
1639
1715
  return t("summary.datetime", {
1640
1716
  year: n.year(),
1641
- month: Ot(n.month() + 1),
1642
- day: Ot(n.date()),
1643
- hour: Ot(n.hour()),
1644
- minute: Ot(n.minute()),
1645
- second: Ot(n.second())
1717
+ month: jt(n.month() + 1),
1718
+ day: jt(n.date()),
1719
+ hour: jt(n.hour()),
1720
+ minute: jt(n.minute()),
1721
+ second: jt(n.second())
1646
1722
  });
1647
1723
  }
1648
- function At(e, t) {
1649
- let n = L(e?.progress), r = n ? Math.max(0, Math.min(1, e.progress ?? 0)) : 0, i = kt(e?.rawStartMs, t), a = kt(e?.rawEndMs, t);
1650
- return /* @__PURE__ */ V("div", {
1651
- className: "bsy-gantt-summary-tooltip",
1724
+ function Nt(e, t) {
1725
+ let n = F(e?.progress), r = n ? Math.max(0, Math.min(1, e.progress ?? 0)) : 0, i = Mt(e?.rawStartMs, t), a = Mt(e?.rawEndMs, t);
1726
+ return /* @__PURE__ */ z("div", {
1727
+ className: $.summaryTooltip,
1652
1728
  children: [
1653
- /* @__PURE__ */ B("p", {
1654
- className: "bsy-gantt-summary-tooltip__line",
1729
+ /* @__PURE__ */ R("p", {
1730
+ className: $.summaryTooltipLine,
1655
1731
  children: t("summary.startTime", { datetime: i })
1656
1732
  }),
1657
- /* @__PURE__ */ B("p", {
1658
- className: "bsy-gantt-summary-tooltip__line",
1733
+ /* @__PURE__ */ R("p", {
1734
+ className: $.summaryTooltipLine,
1659
1735
  children: t("summary.endTime", { datetime: a })
1660
1736
  }),
1661
- n ? /* @__PURE__ */ B("p", {
1662
- className: "bsy-gantt-summary-tooltip__line",
1737
+ n ? /* @__PURE__ */ R("p", {
1738
+ className: $.summaryTooltipLine,
1663
1739
  children: t("summary.progress", { percent: Math.round(r * 100) })
1664
1740
  }) : null
1665
1741
  ]
@@ -1667,17 +1743,17 @@ function At(e, t) {
1667
1743
  }
1668
1744
  //#endregion
1669
1745
  //#region src/components/Gantt/GanttChart/GanttSummaryBar/GanttSummaryBar.tsx
1670
- var jt = 24, Mt = {
1746
+ var Pt = 24, Ft = {
1671
1747
  borderRadius: "6px",
1672
1748
  padding: 0,
1673
1749
  backgroundColor: "rgba(0, 0, 0, 0.5)",
1674
1750
  boxShadow: "none"
1675
1751
  };
1676
- function Nt(e, t) {
1752
+ function It(e, t) {
1677
1753
  return e == null || e === "__empty__" ? t : e;
1678
1754
  }
1679
- var Pt = ({ item: r, barTop: i }) => {
1680
- let { t: a } = t(), o = G((e, t) => a(oe(e), t), [a]), s = $((e) => e.timelineCoords), c = $((e) => e.timelineStartMs), l = $((e) => e.timelineEndMs), u = $((e) => e.timelineWidth), d = mt((e) => e.collapsedKeys), f = mt((e) => e.onBarClick), { virtualReference: p, handleMouseMove: m, handleMouseLeave: h, handleTooltipVisibleChange: g } = St(), _ = L(r.progress) ? Math.max(0, Math.min(1, r.progress ?? 0)) : 0, v = q(() => At({
1755
+ var Lt = ({ item: r, barTop: i }) => {
1756
+ let { t: a } = t(), o = U((e, t) => a(se(e), t), [a]), s = Q((e) => e.timelineCoords), c = Q((e) => e.timelineStartMs), l = Q((e) => e.timelineEndMs), u = Q((e) => e.timelineWidth), d = _t((e) => e.collapsedKeys), f = _t((e) => e.onBarClick), { virtualReference: p, handleMouseMove: m, handleMouseLeave: h, handleTooltipVisibleChange: g } = Tt(), _ = F(r.progress) ? Math.max(0, Math.min(1, r.progress ?? 0)) : 0, v = G(() => Nt({
1681
1757
  rawStartMs: r.rawStartMs,
1682
1758
  rawEndMs: r.rawEndMs,
1683
1759
  progress: r.progress
@@ -1686,9 +1762,9 @@ var Pt = ({ item: r, barTop: i }) => {
1686
1762
  r.rawEndMs,
1687
1763
  r.progress,
1688
1764
  o
1689
- ]), y = q(() => {
1765
+ ]), y = G(() => {
1690
1766
  if (r.startMs === null || r.endMs === null || r.startMs >= r.endMs || c >= l) return null;
1691
- let e = qe({
1767
+ let e = Xe({
1692
1768
  startMs: r.startMs,
1693
1769
  endMs: r.endMs
1694
1770
  }, {
@@ -1698,7 +1774,7 @@ var Pt = ({ item: r, barTop: i }) => {
1698
1774
  return e ? {
1699
1775
  barLeft: s.toX(e.startMs),
1700
1776
  barWidth: s.toWidth(e.startMs, e.endMs),
1701
- wrapperTop: i + (26 - jt) / 2,
1777
+ wrapperTop: i + (26 - Pt) / 2,
1702
1778
  clippedEnd: e.endMs !== r.endMs,
1703
1779
  clippedRange: e,
1704
1780
  itemStartMs: r.startMs,
@@ -1713,8 +1789,8 @@ var Pt = ({ item: r, barTop: i }) => {
1713
1789
  i
1714
1790
  ]);
1715
1791
  if (!y) return null;
1716
- let { barLeft: b, barWidth: x, wrapperTop: S, clippedEnd: C, clippedRange: w, itemStartMs: T, itemEndMs: ee } = y, E = T + (ee - T) * _, D = Math.min(w.endMs, Math.max(w.startMs, E)), O = s.toWidth(w.startMs, D), k = `${Math.max(0, Math.min(1, O / x)) * 100}%`, A = Math.max(0, u - b), j = Nt(r.label, a("gantt.emptyGroup")), M = ne(d, r.groupKey);
1717
- return /* @__PURE__ */ B(n, {
1792
+ let { barLeft: b, barWidth: x, wrapperTop: S, clippedEnd: C, clippedRange: w, itemStartMs: T, itemEndMs: ee } = y, E = T + (ee - T) * _, D = Math.min(w.endMs, Math.max(w.startMs, E)), O = s.toWidth(w.startMs, D), k = `${Math.max(0, Math.min(1, O / x)) * 100}%`, A = Math.max(0, u - b), j = It(r.label, a("gantt.emptyGroup")), M = ne(d, r.groupKey);
1793
+ return /* @__PURE__ */ R(n, {
1718
1794
  content: v,
1719
1795
  placement: "bottom-start",
1720
1796
  showArrow: !1,
@@ -1725,9 +1801,10 @@ var Pt = ({ item: r, barTop: i }) => {
1725
1801
  zIndex: 8001,
1726
1802
  virtualReference: p,
1727
1803
  onVisibleChange: g,
1728
- style: Mt,
1729
- children: /* @__PURE__ */ V("div", {
1730
- className: "bsy-gantt-summary-bar",
1804
+ style: Ft,
1805
+ children: /* @__PURE__ */ z("div", {
1806
+ className: $.root,
1807
+ "data-testid": "gantt-summary-bar",
1731
1808
  style: {
1732
1809
  left: b,
1733
1810
  top: S,
@@ -1737,34 +1814,36 @@ var Pt = ({ item: r, barTop: i }) => {
1737
1814
  onClick: (e) => f?.(e, r),
1738
1815
  onMouseMove: m,
1739
1816
  onMouseLeave: h,
1740
- children: [/* @__PURE__ */ V("div", {
1741
- className: "bsy-gantt-summary-bar__label",
1817
+ children: [/* @__PURE__ */ z("div", {
1818
+ className: $.label,
1819
+ "data-testid": "gantt-summary-bar-label",
1742
1820
  style: {
1743
1821
  maxWidth: A,
1744
1822
  overflow: "hidden"
1745
1823
  },
1746
- children: [/* @__PURE__ */ B(e, {
1824
+ children: [/* @__PURE__ */ R(e, {
1747
1825
  name: "xiangxiazhankai1",
1748
1826
  size: 16,
1749
- className: X("bsy-gantt-summary-bar__arrow", { "bsy-gantt-summary-bar__arrow--collapsed": M })
1750
- }), /* @__PURE__ */ B("span", {
1751
- className: "bsy-gantt-summary-bar__label-text",
1827
+ className: J($.arrow, { [$.isCollapsed]: M })
1828
+ }), /* @__PURE__ */ R("span", {
1829
+ className: $.labelText,
1752
1830
  children: j
1753
1831
  })]
1754
- }), /* @__PURE__ */ B("div", {
1755
- className: "bsy-gantt-summary-bar__track",
1756
- children: /* @__PURE__ */ B("div", {
1757
- className: "bsy-gantt-summary-bar__progress",
1832
+ }), /* @__PURE__ */ R("div", {
1833
+ className: $.track,
1834
+ children: /* @__PURE__ */ R("div", {
1835
+ className: $.progress,
1836
+ "data-testid": "gantt-summary-bar-progress",
1758
1837
  style: { width: k }
1759
1838
  })
1760
1839
  })]
1761
1840
  })
1762
1841
  });
1763
1842
  };
1764
- function Ft(e, t) {
1843
+ function Rt(e, t) {
1765
1844
  return e.barTop === t.barTop && e.item === t.item;
1766
1845
  }
1767
- var It = H.memo(Pt, Ft), Lt = H.memo(({ indicators: n = [], onJump: r }) => {
1846
+ var zt = B.memo(Lt, Rt), Bt = B.memo(({ indicators: n = [], onJump: r }) => {
1768
1847
  let { t: i } = t();
1769
1848
  if (!Array.isArray(n) || n.length === 0) return null;
1770
1849
  let a = (e, t) => {
@@ -1773,46 +1852,49 @@ var It = H.memo(Pt, Ft), Lt = H.memo(({ indicators: n = [], onJump: r }) => {
1773
1852
  taskId: t.taskId
1774
1853
  });
1775
1854
  };
1776
- return /* @__PURE__ */ B(z, { children: n.map((t) => /* @__PURE__ */ B("div", {
1777
- className: "bsy-gantt-chart__offscreen-row",
1855
+ return /* @__PURE__ */ R(L, { children: n.map((t) => /* @__PURE__ */ R("div", {
1856
+ className: Z.offscreenRow,
1778
1857
  style: {
1779
1858
  top: t.rowTop,
1780
1859
  height: t.rowHeight
1781
1860
  },
1782
- children: /* @__PURE__ */ V("div", {
1783
- className: "bsy-gantt-chart__offscreen-track",
1784
- children: [t.showLeft ? /* @__PURE__ */ B("button", {
1861
+ children: /* @__PURE__ */ z("div", {
1862
+ className: Z.offscreenTrack,
1863
+ children: [t.showLeft ? /* @__PURE__ */ R("button", {
1785
1864
  type: "button",
1786
- className: "bsy-gantt-chart__offscreen-btn bsy-gantt-chart__offscreen-btn--left",
1865
+ className: J(Z.offscreenBtn, Z.offscreenBtnLeft),
1866
+ "data-testid": "gantt-offscreen-btn-left",
1787
1867
  "aria-label": i("gantt.aria.jumpLeft"),
1788
1868
  onClick: (e) => a(e, t),
1789
- children: /* @__PURE__ */ B(e, {
1869
+ children: /* @__PURE__ */ R(e, {
1790
1870
  name: "left",
1791
1871
  size: 16
1792
1872
  })
1793
- }) : null, t.showRight ? /* @__PURE__ */ B("button", {
1873
+ }) : null, t.showRight ? /* @__PURE__ */ R("button", {
1794
1874
  type: "button",
1795
- className: "bsy-gantt-chart__offscreen-btn bsy-gantt-chart__offscreen-btn--right",
1875
+ className: J(Z.offscreenBtn, Z.offscreenBtnRight),
1876
+ "data-testid": "gantt-offscreen-btn-right",
1796
1877
  "aria-label": i("gantt.aria.jumpRight"),
1797
1878
  onClick: (e) => a(e, t),
1798
- children: /* @__PURE__ */ B(e, {
1879
+ children: /* @__PURE__ */ R(e, {
1799
1880
  name: "arrow-right",
1800
1881
  size: 16
1801
1882
  })
1802
1883
  }) : null]
1803
1884
  })
1804
1885
  }, t.rowKey)) });
1805
- }), Rt = ({ left: e, height: t, className: n = "" }) => /* @__PURE__ */ B("div", {
1806
- className: X("bsy-gantt-chart__today-indicator", n),
1886
+ }), Vt = ({ left: e, height: t, className: n = "" }) => /* @__PURE__ */ R("div", {
1887
+ className: J(Z.todayIndicator, n),
1888
+ "data-testid": "gantt-today-indicator-content-line",
1807
1889
  style: {
1808
1890
  left: e,
1809
1891
  height: t
1810
1892
  },
1811
- children: /* @__PURE__ */ B("span", { className: "bsy-gantt-chart__today-indicator-line" })
1812
- }), zt = W(function({ canvasHeight: e, weekendSegments: t, virtualColumns: n, lowerSegments: r, shouldShowTodayMarker: i, todayLineLeft: a }) {
1813
- return /* @__PURE__ */ V(z, { children: [
1814
- t.map((t) => /* @__PURE__ */ B("div", {
1815
- className: "bsy-gantt-chart__weekend-bg",
1893
+ children: /* @__PURE__ */ R("span", { className: Z.todayIndicatorLine })
1894
+ }), Ht = H(function({ canvasHeight: e, weekendSegments: t, virtualColumns: n, lowerSegments: r, shouldShowTodayMarker: i, todayLineLeft: a }) {
1895
+ return /* @__PURE__ */ z(L, { children: [
1896
+ t.map((t) => /* @__PURE__ */ R("div", {
1897
+ className: Z.weekendBg,
1816
1898
  style: {
1817
1899
  left: t.left,
1818
1900
  width: t.width,
@@ -1821,27 +1903,27 @@ var It = H.memo(Pt, Ft), Lt = H.memo(({ indicators: n = [], onJump: r }) => {
1821
1903
  }, t.id)),
1822
1904
  n.map((t) => {
1823
1905
  let n = r[t.index];
1824
- return n ? /* @__PURE__ */ B("div", {
1825
- className: "bsy-gantt-chart__col-line",
1906
+ return n ? /* @__PURE__ */ R("div", {
1907
+ className: Z.colLine,
1826
1908
  style: {
1827
1909
  left: n.left,
1828
1910
  height: e
1829
1911
  }
1830
1912
  }, `line-${n.id}`) : null;
1831
1913
  }),
1832
- i ? /* @__PURE__ */ B(Rt, {
1914
+ i ? /* @__PURE__ */ R(Vt, {
1833
1915
  left: a ?? 0,
1834
1916
  height: e,
1835
- className: "bsy-gantt-chart__today-indicator--content-line"
1917
+ className: Z.todayIndicatorContentLine
1836
1918
  }) : null
1837
1919
  ] });
1838
- }), Bt = ({ virtualRows: e, normalizedItems: t, dragState: n, dragPermissionById: r, timelineStartMs: i, timelineEndMs: a }) => {
1920
+ }), Ut = ({ virtualRows: e, normalizedItems: t, dragState: n, dragPermissionById: r, timelineStartMs: i, timelineEndMs: a }) => {
1839
1921
  let o = n?.taskId ?? null;
1840
1922
  return e.map((e) => {
1841
1923
  let s = t[e.index];
1842
1924
  if (!s || s.invalid) return null;
1843
1925
  let c = o === s.id;
1844
- if (!c && (s.startMs === null || s.endMs === null || s.startMs >= s.endMs || !Ke({
1926
+ if (!c && (s.startMs === null || s.endMs === null || s.startMs >= s.endMs || !Ye({
1845
1927
  startMs: s.startMs,
1846
1928
  endMs: s.endMs
1847
1929
  }, {
@@ -1849,10 +1931,10 @@ var It = H.memo(Pt, Ft), Lt = H.memo(({ indicators: n = [], onJump: r }) => {
1849
1931
  endMs: a
1850
1932
  }))) return null;
1851
1933
  let l = e.start + (e.size - 26) / 2;
1852
- return s.type === "summary" ? /* @__PURE__ */ B(It, {
1934
+ return s.type === "summary" ? /* @__PURE__ */ R(zt, {
1853
1935
  item: s,
1854
1936
  barTop: l
1855
- }, `summary-${s.id}`) : /* @__PURE__ */ B(Dt, {
1937
+ }, `summary-${s.id}`) : /* @__PURE__ */ R(At, {
1856
1938
  item: s,
1857
1939
  barTop: l,
1858
1940
  dragTaskId: o,
@@ -1860,8 +1942,8 @@ var It = H.memo(Pt, Ft), Lt = H.memo(({ indicators: n = [], onJump: r }) => {
1860
1942
  dragPermission: r[s.id]
1861
1943
  }, `bar-${s.id}`);
1862
1944
  });
1863
- }, Vt = W(function({ virtualRows: e, normalizedItems: t, dragState: n, dragPermissionById: r, handleOffscreenJump: i, hoverBgRef: a }) {
1864
- let o = $((e) => e.timelineStartMs), s = $((e) => e.timelineEndMs), c = $((e) => e.visibleStartMs), l = $((e) => e.visibleEndMs), u = $((e) => e.isInitialLayoutReady), d = dt({
1945
+ }, Wt = H(function({ virtualRows: e, normalizedItems: t, dragState: n, dragPermissionById: r, handleOffscreenJump: i, hoverBgRef: a }) {
1946
+ let o = Q((e) => e.timelineStartMs), s = Q((e) => e.timelineEndMs), c = Q((e) => e.visibleStartMs), l = Q((e) => e.visibleEndMs), u = Q((e) => e.isInitialLayoutReady), d = mt({
1865
1947
  virtualRows: e,
1866
1948
  normalizedItems: t,
1867
1949
  visibleStartMs: c,
@@ -1869,20 +1951,22 @@ var It = H.memo(Pt, Ft), Lt = H.memo(({ indicators: n = [], onJump: r }) => {
1869
1951
  enabled: u,
1870
1952
  excludeTaskId: n?.taskId ?? null
1871
1953
  });
1872
- return /* @__PURE__ */ V(z, { children: [
1873
- e.map((e) => /* @__PURE__ */ B("div", {
1874
- className: "bsy-gantt-chart__row-line",
1954
+ return /* @__PURE__ */ z(L, { children: [
1955
+ e.map((e) => /* @__PURE__ */ R("div", {
1956
+ className: Z.rowLine,
1957
+ "data-testid": "gantt-row-line",
1875
1958
  style: {
1876
1959
  top: e.start,
1877
1960
  height: e.size
1878
1961
  }
1879
1962
  }, `row-line-${e.key}`)),
1880
- /* @__PURE__ */ B("div", {
1963
+ /* @__PURE__ */ R("div", {
1881
1964
  ref: a,
1882
- className: "bsy-gantt-chart__row-hover-bg",
1965
+ className: Z.rowHoverBg,
1966
+ "data-testid": "gantt-row-hover-bg",
1883
1967
  style: { display: "none" }
1884
1968
  }),
1885
- u && Bt({
1969
+ u && Ut({
1886
1970
  virtualRows: e,
1887
1971
  normalizedItems: t,
1888
1972
  dragState: n,
@@ -1890,24 +1974,24 @@ var It = H.memo(Pt, Ft), Lt = H.memo(({ indicators: n = [], onJump: r }) => {
1890
1974
  timelineStartMs: o,
1891
1975
  timelineEndMs: s
1892
1976
  }),
1893
- u ? /* @__PURE__ */ B(Lt, {
1977
+ u ? /* @__PURE__ */ R(Bt, {
1894
1978
  indicators: d,
1895
1979
  onJump: i
1896
1980
  }) : null
1897
1981
  ] });
1898
- }), Ht = W(function({ contentRef: e, normalizedItems: t, safeRowHeight: n, viewportHeight: r, lowerSegments: i, virtualColumns: a, weekendSegments: o, dragState: s, dragPermissionById: c, tooltip: l, handleTaskMouseDown: u, handleResizeMouseDown: d, handleBarClick: f, collapsedKeys: p, handleOffscreenJump: m, todayLineLeft: h, shouldShowTodayMarker: g }) {
1899
- let _ = $((e) => e.timelineWidth), { virtualRows: v, canvasHeight: y, isScrolling: b } = ut({
1982
+ }), Gt = H(function({ contentRef: e, normalizedItems: t, safeRowHeight: n, viewportHeight: r, lowerSegments: i, virtualColumns: a, weekendSegments: o, dragState: s, dragPermissionById: c, tooltip: l, handleTaskMouseDown: u, handleResizeMouseDown: d, handleBarClick: f, collapsedKeys: p, handleOffscreenJump: m, todayLineLeft: h, shouldShowTodayMarker: g }) {
1983
+ let _ = Q((e) => e.timelineWidth), { virtualRows: v, canvasHeight: y, isScrolling: b } = pt({
1900
1984
  items: t,
1901
1985
  contentRef: e,
1902
1986
  safeRowHeight: n,
1903
1987
  viewportHeight: r
1904
- }), { hoverBgRef: x, handleContentMouseMove: S, handleContentMouseLeave: C } = ft({
1988
+ }), { hoverBgRef: x, handleContentMouseMove: S, handleContentMouseLeave: C } = ht({
1905
1989
  normalizedItems: t,
1906
1990
  safeRowHeight: n
1907
- }), w = q(() => ({
1991
+ }), w = G(() => ({
1908
1992
  width: _,
1909
1993
  height: y
1910
- }), [_, y]), T = q(() => ({
1994
+ }), [_, y]), T = G(() => ({
1911
1995
  tooltip: l ?? null,
1912
1996
  isScrolling: b,
1913
1997
  collapsedKeys: p,
@@ -1922,21 +2006,22 @@ var It = H.memo(Pt, Ft), Lt = H.memo(({ indicators: n = [], onJump: r }) => {
1922
2006
  u,
1923
2007
  d
1924
2008
  ]);
1925
- return /* @__PURE__ */ V("div", {
1926
- className: "bsy-gantt-chart__canvas",
2009
+ return /* @__PURE__ */ z("div", {
2010
+ className: Z.canvas,
2011
+ "data-testid": "gantt-canvas",
1927
2012
  style: w,
1928
2013
  onMouseMove: S,
1929
2014
  onMouseLeave: C,
1930
- children: [/* @__PURE__ */ B(zt, {
2015
+ children: [/* @__PURE__ */ R(Ht, {
1931
2016
  canvasHeight: y,
1932
2017
  weekendSegments: o,
1933
2018
  virtualColumns: a,
1934
2019
  lowerSegments: i,
1935
2020
  shouldShowTodayMarker: g,
1936
2021
  todayLineLeft: h
1937
- }), /* @__PURE__ */ B(pt.Provider, {
2022
+ }), /* @__PURE__ */ R(gt.Provider, {
1938
2023
  value: T,
1939
- children: /* @__PURE__ */ B(Vt, {
2024
+ children: /* @__PURE__ */ R(Wt, {
1940
2025
  virtualRows: v,
1941
2026
  normalizedItems: t,
1942
2027
  dragState: s,
@@ -1949,8 +2034,8 @@ var It = H.memo(Pt, Ft), Lt = H.memo(({ indicators: n = [], onJump: r }) => {
1949
2034
  });
1950
2035
  //#endregion
1951
2036
  //#region src/components/Gantt/GanttChart/GanttChart.tsx
1952
- function Ut({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeChange: i, timeRangeConfig: a = u, pixelsPerDayConfig: o = c, onTaskTimeChange: s, onRowClick: l, tooltip: d, verticalScrollController: f, showWeekendHighlight: p = !0, showTodayLine: m = !0, collapsedKeys: h, onToggleCollapse: g }, _) {
1953
- let { t: v } = t(), y = G((e, t) => v(oe(e), t), [v]), b = J(null), x = J(null), S = J(null), C = ue(x), w = J(null), T = st(b, x), [ee, E] = Y(!1), { pixelsPerDay: D, viewportWidth: O, scrollLeft: k, timelineStartMs: A, timelineEndMs: j, visibleStartMs: M, visibleEndMs: N, lowerSegments: te, timelineCoords: ne, timelineWidth: re, todayCenterMs: ie, todayLineLeft: ae, isInitialLayoutReady: P, handleContentScroll: F, handleTodayClick: I, handleOffscreenJump: L, handleScrollPrev: R, handleScrollNext: z } = at({
2037
+ function Kt({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeChange: i, timeRangeConfig: a = u, pixelsPerDayConfig: o = c, onTaskTimeChange: s, onRowClick: l, tooltip: d, verticalScrollController: f, showWeekendHighlight: p = !0, showTodayLine: m = !0, collapsedKeys: h, onToggleCollapse: g }, _) {
2038
+ let { t: v } = t(), y = U((e, t) => v(se(e), t), [v]), b = K(null), x = K(null), S = K(null), C = fe(x), w = K(null), T = ut(b, x), [ee, E] = q(!1), { pixelsPerDay: D, viewportWidth: O, scrollLeft: k, timelineStartMs: A, timelineEndMs: j, visibleStartMs: M, visibleEndMs: N, lowerSegments: te, timelineCoords: ne, timelineWidth: re, todayCenterMs: ie, todayLineLeft: ae, isInitialLayoutReady: oe, handleContentScroll: ce, handleTodayClick: P, handleOffscreenJump: F, handleScrollPrev: I, handleScrollNext: L } = ct({
1954
2039
  timeRangeConfig: a,
1955
2040
  pixelsPerDayConfig: o,
1956
2041
  viewMode: n,
@@ -1961,16 +2046,16 @@ function Ut({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
1961
2046
  isHorizontalScrollbarInteracting: T,
1962
2047
  isTaskBarInteracting: ee
1963
2048
  });
1964
- se(_, () => ({
1965
- scrollToToday: I,
1966
- scrollPrev: R,
1967
- scrollNext: z
2049
+ le(_, () => ({
2050
+ scrollToToday: P,
2051
+ scrollPrev: I,
2052
+ scrollNext: L
1968
2053
  }), [
2054
+ P,
1969
2055
  I,
1970
- R,
1971
- z
2056
+ L
1972
2057
  ]);
1973
- let { dragState: H, committedRangeById: U, resetCommittedRanges: W, forceResetAllCommittedRanges: ce, handleTaskMouseDown: X, handleResizeMouseDown: le, consumeRecentDragResult: de } = ke({
2058
+ let { dragState: B, committedRangeById: V, resetCommittedRanges: H, forceResetAllCommittedRanges: ue, handleTaskMouseDown: J, handleResizeMouseDown: de, consumeRecentDragResult: pe } = Me({
1974
2059
  pixelsPerDay: D,
1975
2060
  viewMode: n,
1976
2061
  timelineCoords: ne,
@@ -1978,7 +2063,7 @@ function Ut({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
1978
2063
  containerRef: x,
1979
2064
  onDragInteractionChange: E
1980
2065
  });
1981
- K(() => {
2066
+ W(() => {
1982
2067
  let t = new Set((e || []).map((e) => String(e?.id ?? ""))), n = w.current, r = !1;
1983
2068
  if (n) {
1984
2069
  if (n.size !== t.size) r = !0;
@@ -1988,45 +2073,45 @@ function Ut({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
1988
2073
  }
1989
2074
  }
1990
2075
  if (w.current = t, r) {
1991
- ce();
2076
+ ue();
1992
2077
  return;
1993
2078
  }
1994
- W();
2079
+ H();
1995
2080
  }, [
1996
2081
  e,
1997
- W,
1998
- ce
2082
+ H,
2083
+ ue
1999
2084
  ]);
2000
- let { normalizedItems: Z } = ot({
2085
+ let { normalizedItems: Y } = lt({
2001
2086
  visibleItems: e,
2002
- committedRangeById: U,
2087
+ committedRangeById: V,
2003
2088
  viewMode: n
2004
- }), Q = q(() => {
2089
+ }), X = G(() => {
2005
2090
  let e = {};
2006
- return Z.forEach((t) => {
2007
- e[t.id] = ve(t);
2091
+ return Y.forEach((t) => {
2092
+ e[t.id] = be(t);
2008
2093
  }), e;
2009
- }, [Z]), fe = G((e, t, n, r) => {
2010
- let i = Q[t.id];
2011
- i?.canMove && X(e, {
2094
+ }, [Y]), me = U((e, t, n, r) => {
2095
+ let i = X[t.id];
2096
+ i?.canMove && J(e, {
2012
2097
  ...t,
2013
2098
  dragPermission: i
2014
2099
  }, n, r);
2015
- }, [Q, X]), pe = G((e, t, n, r, i) => {
2016
- let a = Q[t.id];
2017
- (r === "start" ? a?.canResizeStart : a?.canResizeEnd) && le(e, {
2100
+ }, [X, J]), he = U((e, t, n, r, i) => {
2101
+ let a = X[t.id];
2102
+ (r === "start" ? a?.canResizeStart : a?.canResizeEnd) && de(e, {
2018
2103
  ...t,
2019
2104
  dragPermission: a
2020
2105
  }, n, r, i);
2021
- }, [Q, le]);
2022
- K(() => {
2106
+ }, [X, de]);
2107
+ W(() => {
2023
2108
  if (!f || !x.current) return;
2024
2109
  let e = x.current;
2025
2110
  return f.registerTimelineScroller({ setScrollTop: (t) => {
2026
2111
  e.scrollTop = t;
2027
2112
  } });
2028
2113
  }, [f]);
2029
- let me = C?.height || 0, { virtualColumns: he, weekendSegments: ge } = Pe({
2114
+ let ge = C?.height || 0, { virtualColumns: _e, weekendSegments: ve } = Le({
2030
2115
  lowerSegments: te,
2031
2116
  pixelsPerDay: D,
2032
2117
  scrollLeft: k,
@@ -2035,11 +2120,11 @@ function Ut({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2035
2120
  timelineStartMs: A,
2036
2121
  timelineWidth: re,
2037
2122
  viewMode: n
2038
- }), _e = ct(m, ae, re, ie, {
2123
+ }), ye = dt(m, ae, re, ie, {
2039
2124
  startMs: A,
2040
2125
  endMs: j
2041
- }), ye = G((e, t) => {
2042
- if (!(e.target instanceof Element && e.target.closest(".bsy-gantt-chart__bar-resize-handle")) && !de()) {
2126
+ }), xe = U((e, t) => {
2127
+ if (!(e.target instanceof Element && e.target.closest(`.${Z.barResizeHandle}`)) && !pe()) {
2043
2128
  if (t?.type === "summary") {
2044
2129
  let e = t.groupKey;
2045
2130
  if (!e || !g) return;
@@ -2049,10 +2134,10 @@ function Ut({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2049
2134
  l && l(t, t.rowIndex, e);
2050
2135
  }
2051
2136
  }, [
2052
- de,
2137
+ pe,
2053
2138
  l,
2054
2139
  g
2055
- ]), be = q(() => ({
2140
+ ]), Se = G(() => ({
2056
2141
  viewMode: n,
2057
2142
  pixelsPerDay: D,
2058
2143
  timelineStartMs: A,
@@ -2063,7 +2148,7 @@ function Ut({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2063
2148
  scrollLeft: k,
2064
2149
  viewportWidth: O,
2065
2150
  timelineWidth: re,
2066
- isInitialLayoutReady: P
2151
+ isInitialLayoutReady: oe
2067
2152
  }), [
2068
2153
  n,
2069
2154
  D,
@@ -2075,19 +2160,20 @@ function Ut({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2075
2160
  k,
2076
2161
  O,
2077
2162
  re,
2078
- P
2163
+ oe
2079
2164
  ]);
2080
- return /* @__PURE__ */ B(ht.Provider, {
2081
- value: be,
2082
- children: /* @__PURE__ */ V("div", {
2083
- className: "bsy-gantt-chart",
2084
- style: { visibility: P ? "visible" : "hidden" },
2085
- children: [/* @__PURE__ */ B(lt, {
2165
+ return /* @__PURE__ */ R(vt.Provider, {
2166
+ value: Se,
2167
+ children: /* @__PURE__ */ z("div", {
2168
+ className: Z.root,
2169
+ "data-testid": "gantt-chart",
2170
+ style: { visibility: oe ? "visible" : "hidden" },
2171
+ children: [/* @__PURE__ */ R(ft, {
2086
2172
  timelineWidth: re,
2087
2173
  viewportWidth: O,
2088
2174
  scrollLeft: k,
2089
2175
  trackRef: S,
2090
- virtualColumns: he,
2176
+ virtualColumns: _e,
2091
2177
  lowerSegments: te,
2092
2178
  todayLineLeft: ae,
2093
2179
  todayCenterMs: ie,
@@ -2096,44 +2182,45 @@ function Ut({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2096
2182
  availableModes: r,
2097
2183
  formatMessage: y,
2098
2184
  onViewModeChange: i,
2099
- onTodayClick: I,
2100
- onScrollPrev: R,
2101
- onScrollNext: z
2102
- }), /* @__PURE__ */ B("div", {
2185
+ onTodayClick: P,
2186
+ onScrollPrev: I,
2187
+ onScrollNext: L
2188
+ }), /* @__PURE__ */ R("div", {
2103
2189
  ref: b,
2104
- className: "bsy-gantt-chart__timeline-host",
2105
- children: /* @__PURE__ */ B("div", {
2190
+ className: Z.timelineHost,
2191
+ children: /* @__PURE__ */ R("div", {
2106
2192
  ref: x,
2107
- className: "bsy-gantt-chart__timeline-content",
2193
+ className: Z.timelineContent,
2194
+ "data-testid": "gantt-timeline-content",
2108
2195
  role: "region",
2109
2196
  "aria-label": v("gantt.aria.timeline"),
2110
2197
  onScroll: (e) => {
2111
- F(e), f && f.sync("timeline", e.currentTarget.scrollTop);
2198
+ ce(e), f && f.sync("timeline", e.currentTarget.scrollTop);
2112
2199
  },
2113
- children: /* @__PURE__ */ B(Ht, {
2200
+ children: /* @__PURE__ */ R(Gt, {
2114
2201
  contentRef: x,
2115
- normalizedItems: Z,
2202
+ normalizedItems: Y,
2116
2203
  safeRowHeight: 34,
2117
- viewportHeight: me,
2204
+ viewportHeight: ge,
2118
2205
  lowerSegments: te,
2119
- virtualColumns: he,
2120
- weekendSegments: ge,
2121
- dragState: H,
2122
- dragPermissionById: Q,
2206
+ virtualColumns: _e,
2207
+ weekendSegments: ve,
2208
+ dragState: B,
2209
+ dragPermissionById: X,
2123
2210
  tooltip: d,
2124
- handleTaskMouseDown: fe,
2125
- handleResizeMouseDown: pe,
2126
- handleBarClick: ye,
2211
+ handleTaskMouseDown: me,
2212
+ handleResizeMouseDown: he,
2213
+ handleBarClick: xe,
2127
2214
  collapsedKeys: h,
2128
- handleOffscreenJump: L,
2215
+ handleOffscreenJump: F,
2129
2216
  todayLineLeft: ae,
2130
- shouldShowTodayMarker: _e
2217
+ shouldShowTodayMarker: ye
2131
2218
  })
2132
2219
  })
2133
2220
  })]
2134
2221
  })
2135
2222
  });
2136
2223
  }
2137
- var Wt = U(Ut);
2224
+ var qt = V(Kt);
2138
2225
  //#endregion
2139
- export { Wt as t };
2226
+ export { qt as t };