@baishuyun/ui-base 6.4.2 → 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-BgDJOyW1.js → GanttChart-CnIWe_wk.js} +672 -590
  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,20 +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) {
101
+ function Ae(e, t) {
102
102
  return e < 0 ? t * 10 : e >= 60 ? 0 : t * (2 + 8 * (1 - e / 60));
103
103
  }
104
- function ke(e, t) {
105
- let n = J(null), r = J(0), i = G(() => {
104
+ function je(e, t) {
105
+ let n = K(null), r = K(0), i = U(() => {
106
106
  n.current !== null && cancelAnimationFrame(n.current), n.current = null, r.current = 0;
107
107
  }, []);
108
- K(() => () => {
108
+ W(() => () => {
109
109
  n.current !== null && cancelAnimationFrame(n.current);
110
110
  }, []);
111
- let a = G(() => {
111
+ let a = U(() => {
112
112
  if (n.current !== null) return;
113
113
  let i = () => {
114
114
  let a = e.current, o = r.current;
@@ -122,11 +122,11 @@ function ke(e, t) {
122
122
  n.current = requestAnimationFrame(i);
123
123
  }, [e, t]);
124
124
  return {
125
- startEdgeDetection: G((t, n) => {
125
+ startEdgeDetection: U((t, n) => {
126
126
  let o = e.current;
127
- if (!o) return;
128
- let s = n ?? o.getBoundingClientRect(), c = t - s.left, l = s.right - t, u = c < 60 ? Oe(c, -1) : l < 60 ? Oe(l, 1) : 0;
129
- r.current = u, u === 0 ? i() : a();
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
130
  }, [
131
131
  e,
132
132
  a,
@@ -137,19 +137,19 @@ function ke(e, t) {
137
137
  }
138
138
  //#endregion
139
139
  //#region src/components/Gantt/GanttChart/hooks/useGanttDrag.tsx
140
- function Ae({ 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 = 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);
142
142
  g.current = n;
143
- 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({
144
144
  shouldSuppressClick: !1,
145
145
  at: 0
146
- }), C = J(0), w = J(null), { startEdgeDetection: T, stopEdgeScroll: ee } = ke(c ?? { current: null }, w), E = J({});
147
- K(() => {
146
+ }), C = K(0), w = K(null), { startEdgeDetection: T, stopEdgeScroll: ee } = je(c ?? { current: null }, w), E = K({});
147
+ W(() => {
148
148
  x.current = y;
149
- }, [y]), K(() => () => {
149
+ }, [y]), W(() => () => {
150
150
  for (let e of Object.values(E.current)) e.timeoutId && clearTimeout(e.timeoutId);
151
151
  }, []);
152
- let D = G(() => {
152
+ let D = U(() => {
153
153
  v((e) => {
154
154
  let t = Object.keys(E.current);
155
155
  if (t.length === 0) return {};
@@ -160,14 +160,14 @@ function Ae({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
160
160
  shouldSuppressClick: !1,
161
161
  at: 0
162
162
  };
163
- }, []), O = G(() => {
163
+ }, []), O = U(() => {
164
164
  for (let e of Object.values(E.current)) e.timeoutId && clearTimeout(e.timeoutId);
165
165
  E.current = {}, v({}), S.current = {
166
166
  shouldSuppressClick: !1,
167
167
  at: 0
168
168
  };
169
- }, []), k = G((e, t, n, r, i = 1) => {
170
- if (!ye(t, r) || t.invalid) return;
169
+ }, []), k = U((e, t, n, r, i = 1) => {
170
+ if (!xe(t, r) || t.invalid) return;
171
171
  e.preventDefault(), e.stopPropagation();
172
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), _ = {
173
173
  taskId: t.id,
@@ -190,61 +190,73 @@ function Ae({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
190
190
  shouldSuppressClick: !1,
191
191
  at: 0
192
192
  }, x.current = _, b(_), u?.(!0);
193
- }, [c, u]), A = G((e, t, n, r) => {
193
+ }, [c, u]), A = U((e, t, n, r) => {
194
194
  k(e, t, n, o, r);
195
- }, [k]), j = G((e, t, n, i, a) => {
195
+ }, [k]), j = U((e, t, n, i, a) => {
196
196
  k(e, t, n, i === "start" ? l : r, a);
197
197
  }, [k]);
198
- return K(() => {
198
+ return W(() => {
199
199
  if (!y?.taskId) return;
200
- let e = (e, t) => {
201
- let n = x.current;
202
- if (!n) return;
203
- let r = c?.current, i = t ?? r?.getBoundingClientRect(), a = r?.scrollLeft ?? 0, o = g.current, s = a + (i ? e - i.left : 0) - n.grabOffsetInBar, l = n.dragMode === "resize-end" ? n.originLeftPx : s, u = s - n.originAnchorPx;
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;
213
+ }
214
+ let m = l - r.originAnchorPx;
204
215
  if (!d) {
205
216
  let e = {
206
- ...Te(n, u, o, f),
207
- previewLeftPx: l
217
+ ...De(r, m, s, f),
218
+ previewLeftPx: u
208
219
  };
209
- if (e.deltaUnits === n.deltaUnits && e.previewLeftPx === n.previewLeftPx && e.previewStartMs === n.previewStartMs && e.previewEndMs === n.previewEndMs) return;
220
+ if (e.deltaUnits === r.deltaUnits && e.previewLeftPx === r.previewLeftPx && e.previewStartMs === r.previewStartMs && e.previewEndMs === r.previewEndMs) return;
210
221
  let t = {
211
- ...n,
222
+ ...r,
212
223
  ...e
213
224
  };
214
225
  x.current = t, b(t);
215
226
  return;
216
227
  }
217
- let m = xe(u, p), h = {
218
- ...n,
219
- deltaUnits: m,
220
- previewLeftPx: l
228
+ let h = Ce(m, p), _ = {
229
+ ...r,
230
+ deltaUnits: h,
231
+ previewLeftPx: u
221
232
  };
222
- if (n.dragMode === "move") {
223
- let e = Ce(n.originStartMs, n.originEndMs, m * f);
224
- h.previewStartMs = e.startMs, h.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;
225
236
  } else {
226
- let e = we({
227
- startMs: n.originStartMs,
228
- endMs: n.originEndMs,
229
- deltaMs: m * f,
230
- edge: n.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",
231
242
  minDurationMs: f
232
243
  });
233
- h.previewStartMs = e.startMs, h.previewEndMs = e.endMs;
244
+ _.previewStartMs = e.startMs, _.previewEndMs = e.endMs;
234
245
  }
235
- let _ = Math.round((h.previewStartMs - n.originStartMs) / f), v = {
236
- ...h,
237
- deltaUnits: n.dragMode === "resize-end" ? Math.round((h.previewEndMs - n.originEndMs) / f) : _
246
+ let v = Math.round((_.previewStartMs - r.originStartMs) / f), y = {
247
+ ..._,
248
+ deltaUnits: r.dragMode === "resize-end" ? Math.round((_.previewEndMs - r.originEndMs) / f) : v
238
249
  };
239
- v.deltaUnits === n.deltaUnits && v.previewLeftPx === n.previewLeftPx && v.previewStartMs === n.previewStartMs && v.previewEndMs === n.previewEndMs || (x.current = v, b(v));
250
+ y.deltaUnits === r.deltaUnits && y.previewLeftPx === r.previewLeftPx && y.previewStartMs === r.previewStartMs && y.previewEndMs === r.previewEndMs || (x.current = y, b(y));
240
251
  };
241
252
  w.current = () => {
242
- e(C.current);
253
+ let t = c?.current?.getBoundingClientRect() ?? null;
254
+ e(C.current, t, "edgeScroll");
243
255
  };
244
256
  let n = (t) => {
245
257
  C.current = t.clientX;
246
- let n = c?.current?.getBoundingClientRect() ?? null;
247
- e(t.clientX, n), T(t.clientX, n ?? void 0);
258
+ let n = c?.current?.getBoundingClientRect() ?? null, r = T(t.clientX, n ?? void 0);
259
+ e(t.clientX, n, r === 0 ? "mousemove" : "edgeScroll");
248
260
  }, r = () => {
249
261
  ee(), w.current = null, e(C.current);
250
262
  let n = x.current;
@@ -255,7 +267,7 @@ function Ae({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
255
267
  at: Date.now()
256
268
  };
257
269
  let o = r;
258
- if (!ye(n.item, n.dragMode) || !o || !i) {
270
+ if (!xe(n.item, n.dragMode) || !o || !i) {
259
271
  x.current = null, b(null);
260
272
  return;
261
273
  }
@@ -282,15 +294,15 @@ function Ae({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
282
294
  };
283
295
  let m, g;
284
296
  if (d) if (n.dragMode === "move") {
285
- let e = Se(n.previewStartMs, f, "round"), t = e - n.previewStartMs;
297
+ let e = we(n.previewStartMs, f, "round"), t = e - n.previewStartMs;
286
298
  m = e, g = n.previewEndMs + t;
287
- } 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"));
288
300
  else {
289
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;
290
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;
291
303
  }
292
304
  let _;
293
- _ = h(t) ? Ee({
305
+ _ = h(t) ? Oe({
294
306
  item: n.item,
295
307
  startMs: m,
296
308
  endMs: g,
@@ -298,7 +310,7 @@ function Ae({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
298
310
  snapUnitMs: f,
299
311
  changeType: n.dragMode,
300
312
  viewMode: t
301
- }) : Ee({
313
+ }) : Oe({
302
314
  item: n.item,
303
315
  startMs: m,
304
316
  endMs: g,
@@ -307,7 +319,7 @@ function Ae({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
307
319
  snapUnitMs: f,
308
320
  changeType: n.dragMode,
309
321
  viewMode: t
310
- }), De(i(_)).catch((e) => {
322
+ }), ke(i(_)).catch((e) => {
311
323
  console.error("[GanttChart] onTaskTimeChange rejected", e), E.current[c]?.opId === l && v((e) => {
312
324
  let t = { ...e };
313
325
  return delete t[c], t;
@@ -340,7 +352,7 @@ function Ae({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
340
352
  forceResetAllCommittedRanges: O,
341
353
  handleTaskMouseDown: A,
342
354
  handleResizeMouseDown: j,
343
- consumeRecentDragResult: G(() => {
355
+ consumeRecentDragResult: U(() => {
344
356
  let { shouldSuppressClick: e, at: t } = S.current;
345
357
  return S.current = {
346
358
  shouldSuppressClick: !1,
@@ -351,25 +363,25 @@ function Ae({ pixelsPerDay: e, viewMode: t, timelineCoords: n, onTaskTimeChange:
351
363
  }
352
364
  //#endregion
353
365
  //#region src/components/Gantt/GanttChart/utils/timelineFocus.ts
354
- function je(e, t, n) {
366
+ function Ne(e, t, n) {
355
367
  let r = Number(t) > 0 ? Number(t) : 0, i = Number(n) > 0 ? Number(n) : 0, a = Math.max(0, i - r);
356
368
  return Number.isFinite(e) ? Math.min(Math.max(0, e), a) : 0;
357
369
  }
358
- function Me({ anchorMs: e, toX: t, viewportWidth: n, timelineWidth: r }) {
370
+ function Pe({ anchorMs: e, toX: t, viewportWidth: n, timelineWidth: r }) {
359
371
  let i = Number(n) > 0 ? Number(n) : 0;
360
372
  if (!Number.isFinite(e) || typeof t != "function" || i <= 0) return 0;
361
373
  let a = t(e);
362
- return Number.isFinite(a) ? je(a - i / 2, i, r) : 0;
374
+ return Number.isFinite(a) ? Ne(a - i / 2, i, r) : 0;
363
375
  }
364
376
  //#endregion
365
377
  //#region src/components/Gantt/GanttChart/hooks/useGanttColumnVirtual.ts
366
- function Ne(e) {
378
+ function Fe(e) {
367
379
  let t = Number(e);
368
380
  return Math.max((Number.isFinite(t) && t > 0 ? t : 0) * 4, 240);
369
381
  }
370
- function Pe(e, t) {
382
+ function Ie(e, t) {
371
383
  if (!Array.isArray(e) || e.length === 0) return [];
372
- let { scrollLeft: n = 0, viewportWidth: r = 0, pixelsPerDay: i } = t || {}, a = Ne(Number(e[0]?.width) > 0 ? Number(e[0].width) : i), o = e[e.length - 1], s = je(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;
373
385
  for (; d <= f;) {
374
386
  let t = d + f >> 1, n = e[t];
375
387
  n.left + n.width > c ? (p = t, f = t - 1) : d = t + 1;
@@ -385,9 +397,9 @@ function Pe(e, t) {
385
397
  for (let e = p; e <= m; e += 1) h.push({ index: e });
386
398
  return h;
387
399
  }
388
- function Fe({ 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 }) {
389
401
  return {
390
- virtualColumns: q(() => Pe(e, {
402
+ virtualColumns: G(() => Ie(e, {
391
403
  scrollLeft: n,
392
404
  viewportWidth: r,
393
405
  pixelsPerDay: t
@@ -397,11 +409,11 @@ function Fe({ lowerSegments: e, pixelsPerDay: t, scrollLeft: n, viewportWidth: r
397
409
  n,
398
410
  r
399
411
  ]),
400
- weekendSegments: q(() => {
412
+ weekendSegments: G(() => {
401
413
  if (!i || o <= 0 || c !== "day") return [];
402
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 = [];
403
415
  for (let e = u; e <= d; e += 1) {
404
- let n = a + e * s, r = P(n);
416
+ let n = a + e * s, r = oe(n);
405
417
  (r === 0 || r === 6) && f.push({
406
418
  id: `weekend-${n}`,
407
419
  left: e * t,
@@ -420,8 +432,8 @@ function Fe({ lowerSegments: e, pixelsPerDay: t, scrollLeft: n, viewportWidth: r
420
432
  ])
421
433
  };
422
434
  }
423
- Q.extend(fe), Q.extend(me);
424
- var Ie = {
435
+ X.extend(me), X.extend(ge);
436
+ var Re = {
425
437
  day: {
426
438
  amount: 1,
427
439
  unit: "day"
@@ -474,7 +486,7 @@ var Ie = {
474
486
  amount: 1,
475
487
  unit: "minute"
476
488
  }
477
- }, Le = (e, t, n) => {
489
+ }, ze = (e, t, n) => {
478
490
  switch (t) {
479
491
  case "halfDay": return e.hour() < 12 ? n("header.lower.halfDayAm") : n("header.lower.halfDayPm");
480
492
  case "sixHour": {
@@ -490,7 +502,7 @@ var Ie = {
490
502
  case "oneMinute": return e.format("mm");
491
503
  default: return e.format("DD");
492
504
  }
493
- }, Re = (e, t, n) => {
505
+ }, Be = (e, t, n) => {
494
506
  let r = C(e.valueOf());
495
507
  switch (t) {
496
508
  case "day": return r.format("DD");
@@ -499,12 +511,12 @@ var Ie = {
499
511
  case "quarterMonth": return D(e.valueOf(), n);
500
512
  case "quarter": return n("header.lower.quarter", { quarter: r.quarter() });
501
513
  case "year": return r.month() < 6 ? n("firstHalf") : n("secondHalf");
502
- default: return Le(r, t, n);
514
+ default: return ze(r, t, n);
503
515
  }
504
- }, ze = (e, t) => {
516
+ }, Ve = (e, t) => {
505
517
  let n = C(e.valueOf()), r = y(t).headerLayout;
506
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")}`;
507
- }, Be = (e, t, n) => {
519
+ }, He = (e, t, n) => {
508
520
  let r = C(e.valueOf()), i = y(t).headerLayout;
509
521
  return i === "dayNested" ? n("header.top.monthDay", {
510
522
  month: r.month() + 1,
@@ -517,7 +529,7 @@ var Ie = {
517
529
  year: r.year(),
518
530
  month: r.month() + 1
519
531
  }) : n("header.top.year", { year: r.year() });
520
- }, Ve = (e, t, n, r, i, a, o) => {
532
+ }, Ue = (e, t, n, r, i, a, o) => {
521
533
  let s = _(r), c = A ?? 100;
522
534
  e.push({
523
535
  id: `${r}-${t}`,
@@ -525,23 +537,23 @@ var Ie = {
525
537
  endMs: n,
526
538
  left: s ? e.length * c : M(t, i, a, r),
527
539
  width: s ? c : Math.max(1, ee(t, n, a, r)),
528
- label: Re(Q(t), r, o)
540
+ label: Be(X(t), r, o)
529
541
  });
530
- }, He = ({ viewMode: e, timelineStartMs: t, timelineEndMs: n, pixelsPerDay: r, formatMessage: i }) => {
531
- let a = [], o = Ie[e] || Ie.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));
532
544
  _(e) && (s = s.startOf("month"));
533
- let c = Q(ae(n));
545
+ let c = X(ae(n));
534
546
  for (; s.isBefore(c);) {
535
547
  o.align && (s = o.align(s));
536
548
  let n = s.add(o.amount, o.unit);
537
- Ve(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;
538
550
  }
539
551
  return a;
540
- }, Ue = ({ lowerSegments: e, viewMode: t, formatMessage: n }) => {
552
+ }, Ge = ({ lowerSegments: e, viewMode: t, formatMessage: n }) => {
541
553
  if (!Array.isArray(e) || e.length === 0) return [];
542
554
  let r = [], i = null;
543
555
  for (let a of e) {
544
- let e = Q(a.startMs), o = ze(e, t);
556
+ let e = X(a.startMs), o = Ve(e, t);
545
557
  if (!i || i.key !== o) {
546
558
  i && r.push({
547
559
  id: i.key,
@@ -552,7 +564,7 @@ var Ie = {
552
564
  key: o,
553
565
  left: a.left,
554
566
  width: a.width,
555
- label: Be(e, t, n)
567
+ label: He(e, t, n)
556
568
  };
557
569
  continue;
558
570
  }
@@ -564,25 +576,25 @@ var Ie = {
564
576
  width: i.width,
565
577
  label: i.label
566
578
  }), r;
567
- }, We = (e) => Number.isFinite(e.startMs) && Number.isFinite(e.endMs) && e.startMs < e.endMs, Ge = (e) => {
568
- if (!We(e)) throw RangeError("Timeline range must be finite and satisfy startMs < endMs");
569
- }, Ke = (e, t) => {
570
- if (Ge(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");
571
583
  return e.startMs <= t && t < e.endMs;
572
- }, qe = (e, t) => (Ge(e), Ge(t), e.startMs < t.endMs && t.startMs < e.endMs), Je = (e, t) => {
573
- Ge(e), Ge(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);
574
586
  let n = Math.max(e.startMs, t.startMs), r = Math.min(e.endMs, t.endMs);
575
587
  return n < r ? {
576
588
  startMs: n,
577
589
  endMs: r
578
590
  } : null;
579
- }, Ye = (e, t) => {
591
+ }, Ze = (e, t) => {
580
592
  if (!Number.isFinite(e) || e <= 0) throw RangeError(`${t} must be finite and greater than zero`);
581
- }, Xe = (e, t) => {
593
+ }, Qe = (e, t) => {
582
594
  if (Number.isFinite(e)) return e;
583
595
  if (Number.isFinite(t)) return t;
584
596
  throw RangeError("focusMs or fallbackFocusMs must be finite");
585
- }, Ze = ({ startMs: e, endMs: t, viewMode: n, viewportWidth: r, pixelsPerDay: i }) => {
597
+ }, $e = ({ startMs: e, endMs: t, viewMode: n, viewportWidth: r, pixelsPerDay: i }) => {
586
598
  let a = (t - e) / s;
587
599
  if (a * i >= r) return {
588
600
  startMs: e,
@@ -590,24 +602,24 @@ var Ie = {
590
602
  };
591
603
  let o = Math.ceil(r / i), c = Math.ceil((o - a) / 2) * s;
592
604
  return S(e - c, t + c, n);
593
- }, Qe = ({ range: e, focusMs: t, viewMode: n, viewportWidth: r, pixelsPerDay: i }) => {
605
+ }, et = ({ range: e, focusMs: t, viewMode: n, viewportWidth: r, pixelsPerDay: i }) => {
594
606
  let a = (r / 2 + 281) / i * s;
595
- return Ze({
607
+ return $e({
596
608
  ...S(Math.min(e.startMs, t - a), Math.max(e.endMs, t + a), n),
597
609
  viewMode: n,
598
610
  viewportWidth: r,
599
611
  pixelsPerDay: i
600
612
  });
601
- }, $e = ({ renderWindow: e, timelineCoords: t, scrollLeft: n, viewportWidth: r }) => {
602
- if (!We(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");
603
615
  if (!Number.isFinite(n) || n < 0) throw RangeError("scrollLeft must be finite and non-negative");
604
- Ye(r, "viewportWidth");
616
+ Ze(r, "viewportWidth");
605
617
  let i = {
606
618
  startMs: t.timeAtX(n),
607
619
  endMs: t.timeAtX(n + r)
608
620
  };
609
- if (!We(i)) throw RangeError("TimelineCoords must produce an increasing finite visible range");
610
- let a = Je(i, e);
621
+ if (!Ke(i)) throw RangeError("TimelineCoords must produce an increasing finite visible range");
622
+ let a = Xe(i, e);
611
623
  if (!a) throw RangeError("Visible range must intersect renderWindow");
612
624
  let o = t.timeAtX(n + r / 2);
613
625
  if (!Number.isFinite(o)) throw RangeError("TimelineCoords must produce a finite focus");
@@ -616,65 +628,65 @@ var Ie = {
616
628
  visibleRange: a,
617
629
  focusMs: o
618
630
  };
619
- }, et = ({ scrollLeft: e, viewportWidth: t, timelineWidth: n, guardBandPx: r }) => {
631
+ }, nt = ({ scrollLeft: e, viewportWidth: t, timelineWidth: n, guardBandPx: r }) => {
620
632
  if (!Number.isFinite(e) || e < 0) throw RangeError("scrollLeft must be finite and non-negative");
621
- if (Ye(t, "viewportWidth"), Ye(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");
622
634
  let i = Math.max(0, n - t);
623
635
  if (i === 0) return null;
624
636
  let a = Math.min(e, i), o = a <= r;
625
637
  return o === i - a <= r ? null : o ? "left" : "right";
626
- }, tt = ({ focusMs: e, fallbackFocusMs: t, viewMode: n, timeRangeConfig: r, viewportWidth: i, pixelsPerDay: a }) => {
627
- Ye(i, "viewportWidth"), Ye(a, "pixelsPerDay");
628
- let o = Xe(e, t), s = Qe({
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({
629
641
  range: j(r, o),
630
642
  focusMs: o,
631
643
  viewMode: n,
632
644
  viewportWidth: i,
633
645
  pixelsPerDay: a
634
646
  });
635
- if (!We(s)) throw RangeError("Viewport engine produced an invalid render window");
647
+ if (!Ke(s)) throw RangeError("Viewport engine produced an invalid render window");
636
648
  return s;
637
- }, nt = ({ focusMs: e, fallbackFocusMs: t, timelineCoords: n, viewportWidth: r, timelineWidth: i }) => {
638
- let a = Xe(e, t);
639
- return Ye(r, "viewportWidth"), Ye(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"), {
640
652
  focusMs: a,
641
- scrollLeft: Me({
653
+ scrollLeft: Pe({
642
654
  anchorMs: a,
643
655
  toX: n.toX,
644
656
  viewportWidth: r,
645
657
  timelineWidth: i
646
658
  })
647
659
  };
648
- }, rt = (e) => {
660
+ }, at = (e) => {
649
661
  if (v(e)) {
650
662
  let t = g(e);
651
- return Se(Date.now(), t, "floor") + t / 2;
663
+ return we(Date.now(), t, "floor") + t / 2;
652
664
  }
653
665
  return T(Date.now()) + s / 2;
654
- }, it = (e, t) => {
666
+ }, ot = (e, t) => {
655
667
  if (v(t)) {
656
668
  let n = g(t);
657
- return Se(e, n, "floor") + n + 1;
669
+ return we(e, n, "floor") + n + 1;
658
670
  }
659
671
  return T(e) + s + 1;
660
- }, at = (e) => {
661
- let [t, n] = Y(() => rt(e)), r = J(null), i = G(() => {
672
+ }, st = (e) => {
673
+ let [t, n] = q(() => at(e)), r = K(null), i = U(() => {
662
674
  r.current &&= (clearTimeout(r.current), null);
663
- }, []), a = G(() => {
675
+ }, []), a = U(() => {
664
676
  i();
665
- let t = Date.now(), o = it(t, e);
677
+ let t = Date.now(), o = ot(t, e);
666
678
  r.current = setTimeout(() => {
667
- n(rt(e)), a();
679
+ n(at(e)), a();
668
680
  }, Math.max(1, o - t));
669
681
  }, [i, e]);
670
- K(() => (n(rt(e)), a(), i), [
682
+ W(() => (n(at(e)), a(), i), [
671
683
  e,
672
684
  a,
673
685
  i
674
686
  ]);
675
- let o = le();
676
- return K(() => {
677
- o === "visible" && (n(rt(e)), a());
687
+ let o = de();
688
+ return W(() => {
689
+ o === "visible" && (n(at(e)), a());
678
690
  }, [
679
691
  o,
680
692
  a,
@@ -683,43 +695,43 @@ var Ie = {
683
695
  };
684
696
  //#endregion
685
697
  //#region src/components/Gantt/GanttChart/hooks/useTimelineViewportController.ts
686
- function ot({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef: r, contentSize: i, headerTrackRef: a, formatMessage: o, isHorizontalScrollbarInteracting: s, isTaskBarInteracting: c = !1 }) {
687
- 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) => {
688
700
  let t = S.current;
689
701
  if (!t || !e) return !1;
690
702
  let n = e.scrollLeft || 0;
691
703
  return Math.abs(n - t.targetLeft) > 1;
692
- }, []), ee = G((e) => {
704
+ }, []), ee = U((e) => {
693
705
  let t = S.current;
694
706
  t && Math.abs(e - t.targetLeft) <= 1 && (S.current = null);
695
- }, []), E = G(() => {
707
+ }, []), E = U(() => {
696
708
  x.current !== null && (cancelAnimationFrame(x.current), x.current = null), b.current = null;
697
- }, []), D = G((e) => {
709
+ }, []), D = U((e) => {
698
710
  E();
699
711
  let t = { left: e };
700
712
  b.current = t, x.current = requestAnimationFrame(() => {
701
713
  x.current = null, b.current === t && (b.current = null);
702
714
  });
703
- }, [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) => {
704
716
  M.current = e, N.current === null && (N.current = requestAnimationFrame(() => {
705
717
  N.current = null;
706
718
  let e = M.current;
707
719
  A((t) => t === e ? t : e);
708
720
  }));
709
721
  }, []);
710
- K(() => () => {
722
+ W(() => () => {
711
723
  N.current !== null && cancelAnimationFrame(N.current), E();
712
724
  }, [E]);
713
- 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(() => {
714
726
  let e = _.current;
715
- return e !== null && Number.isFinite(e) ? e : rt(n);
716
- }, [n]), L = G((e) => {
727
+ return e !== null && Number.isFinite(e) ? e : at(n);
728
+ }, [n]), F = U((e) => {
717
729
  Number.isFinite(e) && (_.current = e);
718
- }, []), R = G((e) => {
730
+ }, []), I = U((e) => {
719
731
  S.current = null;
720
- let t = tt({
732
+ let t = rt({
721
733
  focusMs: e,
722
- fallbackFocusMs: I(),
734
+ fallbackFocusMs: P(),
723
735
  viewMode: n,
724
736
  timeRangeConfig: u,
725
737
  viewportWidth: h || 1e3,
@@ -729,13 +741,13 @@ function ot({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef
729
741
  }, [
730
742
  u,
731
743
  l,
732
- I,
744
+ P,
733
745
  n,
734
746
  h
735
747
  ]);
736
- K(() => {
737
- P.current = n, R(I());
738
- }, [e?.bufferDaysBefore, e?.bufferDaysAfter]), ce(() => {
748
+ W(() => {
749
+ oe.current = n, I(P());
750
+ }, [e?.bufferDaysBefore, e?.bufferDaysAfter]), ue(() => {
739
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;
740
752
  n > 0 && n !== h && g(n);
741
753
  }, [
@@ -743,259 +755,259 @@ function ot({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef
743
755
  i?.width,
744
756
  h
745
757
  ]);
746
- let z = q(() => F || tt({
747
- focusMs: I(),
758
+ let L = G(() => ce || rt({
759
+ focusMs: P(),
748
760
  viewMode: n,
749
761
  timeRangeConfig: u,
750
762
  viewportWidth: h || 1e3,
751
763
  pixelsPerDay: l
752
764
  }), [
753
- F,
765
+ ce,
754
766
  u,
755
767
  l,
756
- I,
768
+ P,
757
769
  n,
758
770
  h
759
- ]), { timelineStartMs: B, timelineEndMs: V } = q(() => ({
760
- timelineStartMs: z.startMs,
761
- timelineEndMs: z.endMs
762
- }), [z]), H = q(() => He({
771
+ ]), { timelineStartMs: R, timelineEndMs: z } = G(() => ({
772
+ timelineStartMs: L.startMs,
773
+ timelineEndMs: L.endMs
774
+ }), [L]), B = G(() => We({
763
775
  viewMode: n,
764
- timelineStartMs: B,
765
- timelineEndMs: V,
776
+ timelineStartMs: R,
777
+ timelineEndMs: z,
766
778
  pixelsPerDay: l,
767
779
  formatMessage: o
768
780
  }), [
769
781
  n,
770
- B,
771
- V,
782
+ R,
783
+ z,
772
784
  l,
773
785
  o
774
- ]), U = q(() => te({
786
+ ]), V = G(() => te({
775
787
  viewMode: n,
776
- timelineStartMs: B,
777
- timelineEndMs: V,
788
+ timelineStartMs: R,
789
+ timelineEndMs: z,
778
790
  pixelsPerDay: l,
779
- lowerSegments: H
791
+ lowerSegments: B
780
792
  }), [
781
793
  n,
782
- B,
783
- V,
794
+ R,
795
+ z,
784
796
  l,
785
- H
786
- ]), W = q(() => {
787
- if (H.length === 0) return 0;
788
- 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];
789
801
  return e.left + e.width;
790
- }, [H]), se = G(() => v.current ? !1 : (R(I()), !0), [I, R]);
791
- ce(() => {
792
- 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()));
793
805
  }, [
794
806
  n,
795
- I,
796
- R
807
+ P,
808
+ I
797
809
  ]);
798
- let X = at(n), le = q(() => W <= 0 ? null : U.toX(X), [
799
- X,
800
- U,
801
- W
802
- ]), 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) => {
803
815
  let t = a?.current;
804
816
  t && t.style.setProperty("--gantt-scroll-left", `${e}px`);
805
- }, [a]), de = G((e, t) => {
806
- D(t), e.scrollLeft = t, ue(t), A(t), j.current = t;
807
- }, [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(() => {
808
820
  let e = r.current, t = h;
809
- if (!e || t <= 0 || W <= 0) return !1;
810
- let { scrollLeft: n } = nt({
821
+ if (!e || t <= 0 || H <= 0) return !1;
822
+ let { scrollLeft: n } = it({
811
823
  focusMs: _.current ?? NaN,
812
- fallbackFocusMs: I(),
813
- timelineCoords: U,
824
+ fallbackFocusMs: P(),
825
+ timelineCoords: V,
814
826
  viewportWidth: t,
815
- timelineWidth: W
827
+ timelineWidth: H
816
828
  });
817
- return de(e, n), !0;
829
+ return pe(e, n), !0;
818
830
  }, [
819
- de,
831
+ pe,
820
832
  r,
821
- I,
822
- U,
823
- W,
833
+ P,
834
+ V,
835
+ H,
824
836
  h
825
- ]), Q = G((e) => {
837
+ ]), X = U((e) => {
826
838
  let t = e.currentTarget.scrollLeft, n = h, r = b.current, i = r !== null && Math.abs(t - r.left) <= 1;
827
- r && E(), !i && f.current && (y.current = !0), ue(t);
839
+ r && E(), !i && f.current && (y.current = !0), fe(t);
828
840
  let a = t !== j.current;
829
841
  if (j.current = t, a && ne(t), n > 0 && !i) {
830
- let e = je(t, n, W);
831
- L($e({
842
+ let e = Ne(t, n, H);
843
+ F(tt({
832
844
  renderWindow: {
833
- startMs: B,
834
- endMs: V
845
+ startMs: R,
846
+ endMs: z
835
847
  },
836
- timelineCoords: U,
848
+ timelineCoords: V,
837
849
  scrollLeft: e,
838
850
  viewportWidth: n
839
851
  }).focusMs);
840
852
  }
841
853
  ee(t);
842
854
  }, [
843
- ue,
855
+ fe,
844
856
  E,
845
- U,
857
+ V,
846
858
  h,
847
859
  ne,
848
- L,
860
+ F,
849
861
  ee,
850
- V,
851
- B,
852
- W
853
- ]), fe = G(() => {
854
- let e = rt(n);
855
- L(e), R(e);
856
- }, [
862
+ z,
857
863
  R,
858
- L,
864
+ H
865
+ ]), me = U(() => {
866
+ let e = at(n);
867
+ F(e), I(e);
868
+ }, [
869
+ I,
870
+ F,
859
871
  n
860
- ]), pe = G((e) => {
872
+ ]), he = U((e) => {
861
873
  let t = r.current, n = e?.targetMs;
862
874
  if (!t || !Number.isFinite(n)) return;
863
875
  let i = t.clientWidth > 0 ? t.clientWidth : h;
864
- if (n < B || n >= V) {
865
- S.current = null, L(n), R(n);
876
+ if (n < R || n >= z) {
877
+ S.current = null, F(n), I(n);
866
878
  return;
867
879
  }
868
- let a = Me({
880
+ let a = Pe({
869
881
  anchorMs: n,
870
- toX: U.toX,
882
+ toX: V.toX,
871
883
  viewportWidth: i,
872
- timelineWidth: W
884
+ timelineWidth: H
873
885
  }), o = t.scrollLeft || 0;
874
886
  if (!(i > 0 && Math.abs(a - o) <= i * 1.5)) {
875
- L(n), R(n);
887
+ F(n), I(n);
876
888
  return;
877
889
  }
878
890
  let s = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth";
879
891
  s === "smooth" ? S.current = { targetLeft: a } : (S.current = null, D(a)), t.scrollTo({
880
892
  left: a,
881
893
  behavior: s
882
- }), L(n), s === "auto" && (ue(a), A(a), j.current = a);
894
+ }), F(n), s === "auto" && (fe(a), A(a), j.current = a);
883
895
  }, [
884
- ue,
896
+ fe,
885
897
  r,
886
898
  D,
887
- R,
888
- L,
889
- U,
899
+ I,
900
+ F,
890
901
  V,
891
- B,
892
- W,
902
+ z,
903
+ R,
904
+ H,
893
905
  h
894
906
  ]);
895
- K(() => {
896
- if (!f.current || !h || !W || v.current || !y.current) return;
897
- let e = r.current, t = e?.scrollLeft ?? O, n = et({
907
+ W(() => {
908
+ if (!f.current || !h || !H || v.current || !y.current) return;
909
+ let e = r.current, t = e?.scrollLeft ?? O, n = nt({
898
910
  scrollLeft: Math.max(0, t),
899
911
  viewportWidth: h,
900
- timelineWidth: W,
912
+ timelineWidth: H,
901
913
  guardBandPx: 280
902
914
  });
903
- s || c || T(e) || (e && ee(e.scrollLeft || 0), n && se());
915
+ s || c || T(e) || (e && ee(e.scrollLeft || 0), n && le());
904
916
  }, [
905
917
  O,
906
- W,
918
+ H,
907
919
  h,
908
920
  r,
909
921
  T,
910
922
  ee,
911
- se,
923
+ le,
912
924
  s,
913
925
  c,
914
926
  C
915
- ]), ce(() => {
916
- !f.current || h <= 0 || R(I());
927
+ ]), ue(() => {
928
+ !f.current || h <= 0 || I(P());
917
929
  }, [
930
+ P,
918
931
  I,
919
- R,
920
932
  h
921
- ]), ce(() => {
922
- 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))));
923
935
  }, [
924
- Z,
925
- W,
936
+ Y,
937
+ H,
926
938
  h,
927
939
  ie
928
- ]), ce(() => {
929
- if (!f.current && h > 0 && W > 0) {
930
- if (Number.isFinite(_.current ?? NaN) || L(rt(n)), !ie) {
931
- 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());
932
944
  return;
933
945
  }
934
- 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);
935
947
  }
936
948
  }, [
937
- Z,
949
+ Y,
950
+ P,
938
951
  I,
939
- R,
940
- L,
952
+ F,
941
953
  ie,
942
- W,
954
+ H,
943
955
  h,
944
956
  n
945
957
  ]);
946
- let me = G((e) => {
958
+ let ge = U((e) => {
947
959
  let t = h;
948
- t <= 0 || L(U.timeAtX(e + t / 2));
960
+ t <= 0 || F(V.timeAtX(e + t / 2));
949
961
  }, [
950
962
  h,
951
- U,
952
- L
953
- ]), he = G(() => {
963
+ V,
964
+ F
965
+ ]), _e = U(() => {
954
966
  let e = r.current;
955
967
  if (!e) return;
956
968
  let t = h, n = e.scrollLeft || 0, i = Math.max(0, n - t);
957
969
  if (Math.abs(i - n) <= 1) {
958
970
  S.current = null;
959
- let e = U.timeAtX(n - t / 2);
960
- L(e), R(e);
971
+ let e = V.timeAtX(n - t / 2);
972
+ F(e), I(e);
961
973
  return;
962
974
  }
963
975
  S.current = { targetLeft: i }, e.scrollTo({
964
976
  left: i,
965
977
  behavior: "smooth"
966
- }), me(i);
978
+ }), ge(i);
967
979
  }, [
968
980
  r,
969
- R,
970
- L,
971
- U,
972
- me,
981
+ I,
982
+ F,
983
+ V,
984
+ ge,
973
985
  h
974
- ]), ge = G(() => {
986
+ ]), ve = U(() => {
975
987
  let e = r.current;
976
988
  if (!e) return;
977
- let t = h, n = e.scrollLeft || 0, i = Math.max(0, W - t), a = je(n + t, t, W);
989
+ let t = h, n = e.scrollLeft || 0, i = Math.max(0, H - t), a = Ne(n + t, t, H);
978
990
  if (Math.abs(a - n) <= 1) {
979
991
  if (S.current = null, a >= i - 1) {
980
- let e = U.timeAtX(n + t * 1.5);
981
- L(e), R(e);
992
+ let e = V.timeAtX(n + t * 1.5);
993
+ F(e), I(e);
982
994
  }
983
995
  return;
984
996
  }
985
997
  S.current = { targetLeft: a }, e.scrollTo({
986
998
  left: a,
987
999
  behavior: "smooth"
988
- }), me(a);
1000
+ }), ge(a);
989
1001
  }, [
990
1002
  r,
991
- R,
992
- L,
993
- U,
1003
+ I,
1004
+ F,
1005
+ V,
994
1006
  h,
995
- W,
996
- me
1007
+ H,
1008
+ ge
997
1009
  ]);
998
- K(() => {
1010
+ W(() => {
999
1011
  let e = r.current;
1000
1012
  if (!e) return;
1001
1013
  let t = () => {
@@ -1003,23 +1015,23 @@ function ot({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef
1003
1015
  };
1004
1016
  return e.addEventListener("scrollend", t), () => e.removeEventListener("scrollend", t);
1005
1017
  }, [r]);
1006
- let _e = (!oe || v.current) && W > 0 && h > 0 ? nt({
1018
+ let ye = (!se || v.current) && H > 0 && h > 0 ? it({
1007
1019
  focusMs: _.current ?? NaN,
1008
- fallbackFocusMs: I(),
1009
- timelineCoords: U,
1020
+ fallbackFocusMs: P(),
1021
+ timelineCoords: V,
1010
1022
  viewportWidth: h,
1011
- timelineWidth: W
1012
- }).scrollLeft : O, { visibleStartMs: ve, visibleEndMs: ye } = q(() => {
1013
- if (W <= 0 || h <= 0) return {
1014
- visibleStartMs: B,
1015
- 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
1016
1028
  };
1017
- let e = je(_e, h, W), { visibleRange: t } = $e({
1029
+ let e = Ne(ye, h, H), { visibleRange: t } = tt({
1018
1030
  renderWindow: {
1019
- startMs: B,
1020
- endMs: V
1031
+ startMs: R,
1032
+ endMs: z
1021
1033
  },
1022
- timelineCoords: U,
1034
+ timelineCoords: V,
1023
1035
  scrollLeft: e,
1024
1036
  viewportWidth: h
1025
1037
  });
@@ -1028,38 +1040,38 @@ function ot({ timeRangeConfig: e, pixelsPerDayConfig: t, viewMode: n, contentRef
1028
1040
  visibleEndMs: t.endMs
1029
1041
  };
1030
1042
  }, [
1031
- _e,
1032
- U,
1043
+ ye,
1033
1044
  V,
1034
- B,
1035
- W,
1045
+ z,
1046
+ R,
1047
+ H,
1036
1048
  h
1037
1049
  ]);
1038
1050
  return {
1039
1051
  pixelsPerDay: l,
1040
1052
  viewportWidth: h,
1041
- scrollLeft: _e,
1042
- timelineStartMs: B,
1043
- timelineEndMs: V,
1044
- visibleStartMs: ve,
1045
- visibleEndMs: ye,
1046
- lowerSegments: H,
1047
- timelineCoords: U,
1048
- timelineWidth: W,
1049
- todayCenterMs: X,
1050
- 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,
1051
1063
  isInitialLayoutReady: p,
1052
- handleContentScroll: Q,
1053
- handleTodayClick: fe,
1054
- handleOffscreenJump: pe,
1055
- handleScrollPrev: he,
1056
- handleScrollNext: ge
1064
+ handleContentScroll: X,
1065
+ handleTodayClick: me,
1066
+ handleOffscreenJump: he,
1067
+ handleScrollPrev: _e,
1068
+ handleScrollNext: ve
1057
1069
  };
1058
1070
  }
1059
1071
  //#endregion
1060
1072
  //#region src/components/Gantt/GanttChart/hooks/useNormalizedItems.ts
1061
- function st({ visibleItems: e, committedRangeById: t = {}, viewMode: n = "day" }) {
1062
- return { normalizedItems: q(() => {
1073
+ function lt({ visibleItems: e, committedRangeById: t = {}, viewMode: n = "day" }) {
1074
+ return { normalizedItems: G(() => {
1063
1075
  let r = Array.isArray(e) ? e : [], i = [], a = b(n) ? n : "day";
1064
1076
  for (let e = 0; e < r.length; e++) {
1065
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({
@@ -1098,12 +1110,12 @@ function st({ visibleItems: e, committedRangeById: t = {}, viewMode: n = "day" }
1098
1110
  }
1099
1111
  //#endregion
1100
1112
  //#region src/components/Gantt/GanttChart/hooks/useGanttScrollbars.tsx
1101
- function ct(e, t) {
1102
- let [n, r] = Y(!1);
1103
- return ce(() => {
1113
+ function ut(e, t) {
1114
+ let [n, r] = q(!1);
1115
+ return ue(() => {
1104
1116
  let n = e.current, i = t.current;
1105
1117
  if (!n || !i) return;
1106
- let a = he({
1118
+ let a = _e({
1107
1119
  target: n,
1108
1120
  elements: { viewport: i }
1109
1121
  }, { scrollbars: {
@@ -1115,7 +1127,7 @@ function ct(e, t) {
1115
1127
  e.pointerType === "mouse" && e.button !== 0 || (s = !0, c = e.pointerId, r(!0));
1116
1128
  }, u = (e) => {
1117
1129
  if (!s) return;
1118
- 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;
1119
1131
  n !== null && c !== null && n !== c || (s = !1, c = null, r(!1));
1120
1132
  }, d = { capture: !0 };
1121
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), () => {
@@ -1125,11 +1137,50 @@ function ct(e, t) {
1125
1137
  }
1126
1138
  //#endregion
1127
1139
  //#region src/components/Gantt/GanttChart/utils/timelineMarkers.ts
1128
- function lt(e, t, n, r, i) {
1129
- return !!e && Number.isFinite(r) && Ke(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;
1130
1142
  }
1131
- var ut = 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 }) => {
1132
- let g = q(() => Ue({
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({
1133
1184
  lowerSegments: a,
1134
1185
  viewMode: l,
1135
1186
  formatMessage: d
@@ -1137,29 +1188,30 @@ var ut = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1137
1188
  a,
1138
1189
  l,
1139
1190
  d
1140
- ]), _ = q(() => {
1141
- let r = je(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;
1142
1193
  return g.filter((e) => e.left < a && e.left + e.width > i);
1143
1194
  }, [
1144
1195
  g,
1145
1196
  n,
1146
1197
  t,
1147
1198
  e
1148
- ]), 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 = lt(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, {
1149
1200
  startMs: y,
1150
1201
  endMs: b
1151
1202
  });
1152
- return /* @__PURE__ */ V("div", {
1153
- className: "bsy-gantt-chart__calendar",
1154
- children: [/* @__PURE__ */ V("div", {
1203
+ return /* @__PURE__ */ z("div", {
1204
+ className: Z.calendar,
1205
+ children: [/* @__PURE__ */ z("div", {
1155
1206
  ref: r,
1156
- className: "bsy-gantt-chart__calendar-track",
1207
+ className: Z.calendarTrack,
1208
+ "data-testid": "gantt-calendar-track",
1157
1209
  style: { width: e },
1158
1210
  children: [
1159
1211
  i.map((e) => {
1160
1212
  let t = a[e.index];
1161
- return t ? /* @__PURE__ */ B("div", {
1162
- className: "bsy-gantt-chart__header-col-line",
1213
+ return t ? /* @__PURE__ */ R("div", {
1214
+ className: Z.headerColLine,
1163
1215
  style: {
1164
1216
  left: t.left,
1165
1217
  top: 34,
@@ -1167,20 +1219,21 @@ var ut = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1167
1219
  }
1168
1220
  }, `header-line-${t.id}`) : null;
1169
1221
  }),
1170
- _.map((e) => /* @__PURE__ */ V(H.Fragment, { children: [/* @__PURE__ */ B("div", {
1171
- 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",
1172
1225
  style: {
1173
1226
  left: e.left,
1174
1227
  width: e.width,
1175
1228
  height: 34,
1176
1229
  "--segment-left": `${e.left}px`
1177
1230
  },
1178
- children: /* @__PURE__ */ B("span", {
1179
- className: "bsy-gantt-chart__header-cell-sticky-text",
1231
+ children: /* @__PURE__ */ R("span", {
1232
+ className: Z.headerCellStickyText,
1180
1233
  children: e.label
1181
1234
  })
1182
- }), /* @__PURE__ */ B("div", {
1183
- className: "bsy-gantt-chart__header-col-line",
1235
+ }), /* @__PURE__ */ R("div", {
1236
+ className: Z.headerColLine,
1184
1237
  style: {
1185
1238
  left: e.left + e.width,
1186
1239
  top: 0,
@@ -1189,8 +1242,11 @@ var ut = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1189
1242
  })] }, `top-group-${e.id}`)),
1190
1243
  i.map((e) => {
1191
1244
  let t = a[e.index];
1192
- return t ? /* @__PURE__ */ B("div", {
1193
- 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",
1194
1250
  style: {
1195
1251
  left: t.left,
1196
1252
  width: t.width,
@@ -1198,16 +1254,17 @@ var ut = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1198
1254
  top: 34
1199
1255
  },
1200
1256
  children: t.label
1201
- }, t.id) : null;
1257
+ }, t.id);
1202
1258
  }),
1203
- x && /* @__PURE__ */ B("span", {
1204
- className: "bsy-gantt-chart__today-indicator--header-dot",
1259
+ x && /* @__PURE__ */ R("span", {
1260
+ className: Z.todayIndicatorHeaderDot,
1205
1261
  style: { left: o ?? void 0 }
1206
1262
  })
1207
1263
  ]
1208
- }), /* @__PURE__ */ B("div", {
1209
- className: "bsy-gantt-chart__calendar-toolbar",
1210
- children: /* @__PURE__ */ B(F, {
1264
+ }), /* @__PURE__ */ R("div", {
1265
+ className: Z.calendarToolbar,
1266
+ "data-testid": "gantt-calendar-toolbar",
1267
+ children: /* @__PURE__ */ R(ce, {
1211
1268
  viewMode: l,
1212
1269
  availableModes: u,
1213
1270
  onViewModeChange: f,
@@ -1220,8 +1277,8 @@ var ut = H.memo(({ timelineWidth: e, viewportWidth: t = 0, scrollLeft: n, trackR
1220
1277
  });
1221
1278
  //#endregion
1222
1279
  //#region src/components/Gantt/GanttChart/hooks/useGanttRowVirtualScroll.ts
1223
- function dt({ items: e, contentRef: t, safeRowHeight: n, viewportHeight: r, overscan: i = 4 }) {
1224
- 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({
1225
1282
  count: e.length,
1226
1283
  getScrollElement: () => t.current,
1227
1284
  estimateSize: () => n,
@@ -1239,8 +1296,8 @@ function dt({ items: e, contentRef: t, safeRowHeight: n, viewportHeight: r, over
1239
1296
  }
1240
1297
  //#endregion
1241
1298
  //#region src/components/Gantt/GanttChart/hooks/useOffscreenIndicators.ts
1242
- function ft({ virtualRows: e, normalizedItems: t, visibleStartMs: n, visibleEndMs: r, enabled: i = !0, excludeTaskId: a = null }) {
1243
- return q(() => {
1299
+ function mt({ virtualRows: e, normalizedItems: t, visibleStartMs: n, visibleEndMs: r, enabled: i = !0, excludeTaskId: a = null }) {
1300
+ return G(() => {
1244
1301
  if (!i || !Array.isArray(e) || !Array.isArray(t) || !Number.isFinite(n) || !Number.isFinite(r) || n >= r) return [];
1245
1302
  let o = [];
1246
1303
  return e.forEach((e) => {
@@ -1268,8 +1325,8 @@ function ft({ virtualRows: e, normalizedItems: t, visibleStartMs: n, visibleEndM
1268
1325
  }
1269
1326
  //#endregion
1270
1327
  //#region src/components/Gantt/GanttChart/hooks/useRowHoverHighlight.ts
1271
- function pt({ normalizedItems: e, safeRowHeight: t }) {
1272
- 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(() => {
1273
1330
  let t = /* @__PURE__ */ new Map(), n = 0;
1274
1331
  for (; n < e.length;) {
1275
1332
  let r = e[n]?.parentId;
@@ -1284,15 +1341,15 @@ function pt({ normalizedItems: e, safeRowHeight: t }) {
1284
1341
  } else t.set(n, null), n += 1;
1285
1342
  }
1286
1343
  return t;
1287
- }, [e]), u = J(l);
1344
+ }, [e]), u = K(l);
1288
1345
  u.current = l;
1289
- let m = G((e, n) => {
1346
+ let m = U((e, n) => {
1290
1347
  let r = o.current;
1291
1348
  r && (r.style.top = `${e * t}px`, r.style.height = `${(n - e + 1) * t}px`, r.style.display = "block");
1292
- }, [t]), h = G(() => {
1349
+ }, [t]), h = U(() => {
1293
1350
  let e = o.current;
1294
1351
  e && (e.style.display = "none");
1295
- }, []), g = G((t) => {
1352
+ }, []), g = U((t) => {
1296
1353
  if (!t) {
1297
1354
  h();
1298
1355
  return;
@@ -1311,7 +1368,7 @@ function pt({ normalizedItems: e, safeRowHeight: t }) {
1311
1368
  e,
1312
1369
  m,
1313
1370
  h
1314
- ]), _ = G((r) => {
1371
+ ]), _ = U((r) => {
1315
1372
  if (i?.()) {
1316
1373
  a.current !== null && (a.current = null, h()), c.current = !1;
1317
1374
  return;
@@ -1336,10 +1393,10 @@ function pt({ normalizedItems: e, safeRowHeight: t }) {
1336
1393
  m,
1337
1394
  h,
1338
1395
  i
1339
- ]), v = G(() => {
1396
+ ]), v = U(() => {
1340
1397
  c.current = !1, a.current = null, h(), s.current !== null && (s.current = null, n?.(null));
1341
1398
  }, [n, h]);
1342
- return K(() => {
1399
+ return W(() => {
1343
1400
  if (r) return r((e, t) => {
1344
1401
  if (t?.source === "table") {
1345
1402
  c.current = !1, a.current = null, s.current = e, g(e);
@@ -1355,14 +1412,14 @@ function pt({ normalizedItems: e, safeRowHeight: t }) {
1355
1412
  }
1356
1413
  //#endregion
1357
1414
  //#region src/components/Gantt/GanttChart/GanttInteractionContext.ts
1358
- var mt = de({
1415
+ var gt = pe({
1359
1416
  tooltip: null,
1360
1417
  isScrolling: !1,
1361
1418
  collapsedKeys: void 0,
1362
1419
  onBarClick: () => {},
1363
1420
  onTaskMouseDown: () => {},
1364
1421
  onResizeMouseDown: () => {}
1365
- }), ht = (e) => Z(mt, e), gt = de({
1422
+ }), _t = (e) => Y(gt, e), vt = pe({
1366
1423
  viewMode: "day",
1367
1424
  pixelsPerDay: 1,
1368
1425
  timelineStartMs: 0,
@@ -1378,15 +1435,15 @@ var mt = de({
1378
1435
  viewportWidth: 0,
1379
1436
  timelineWidth: 0,
1380
1437
  isInitialLayoutReady: !1
1381
- }), $ = (e) => Z(gt, e), _t = (e, t) => {
1438
+ }), Q = (e) => Y(vt, e), yt = (e, t) => {
1382
1439
  let n = e.replace("#", ""), r = n.length === 3 ? n.split("").map((e) => e + e).join("") : n;
1383
1440
  return `rgba(${parseInt(r.slice(0, 2), 16)}, ${parseInt(r.slice(2, 4), 16)}, ${parseInt(r.slice(4, 6), 16)}, ${t})`;
1384
- }, vt = (e, t) => {
1385
- if (!R(e)) return null;
1441
+ }, bt = (e, t) => {
1442
+ if (!I(e)) return null;
1386
1443
  let n = e.trim();
1387
- return i.test(n) ? _t(n, t) : null;
1388
- }, yt = (e, t = 2.5) => {
1389
- 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";
1390
1447
  let n, r, i;
1391
1448
  if (e.startsWith("#")) {
1392
1449
  let t = e.replace("#", ""), a = t.length === 3 ? [...t].map((e) => e + e) : [
@@ -1404,23 +1461,23 @@ var mt = de({
1404
1461
  return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
1405
1462
  };
1406
1463
  return 1.05 / (.2126 * a(n) + .7152 * a(r) + .0722 * a(i) + .05) >= t ? "#ffffff" : "#121211";
1407
- }, bt, xt = () => {
1408
- if (bt !== void 0) return bt;
1464
+ }, St, Ct = () => {
1465
+ if (St !== void 0) return St;
1409
1466
  try {
1410
- bt = document.createElement("canvas").getContext("2d");
1467
+ St = document.createElement("canvas").getContext("2d");
1411
1468
  } catch {
1412
- bt = null;
1469
+ St = null;
1413
1470
  }
1414
- return bt;
1415
- }, St = (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") => {
1416
1473
  if (!e) return 0;
1417
- let n = String(e), r = xt();
1474
+ let n = String(e), r = Ct();
1418
1475
  return r ? (r.font = t, r.measureText(n).width + 20) : n.length * 12 + 20;
1419
1476
  };
1420
1477
  //#endregion
1421
1478
  //#region src/components/Gantt/GanttChart/hooks/useBarTooltipHover.ts
1422
- function Ct() {
1423
- 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) => {
1424
1481
  n.current === "frozen" && (n.current = "open");
1425
1482
  let r = e.currentTarget.getBoundingClientRect();
1426
1483
  t({
@@ -1430,13 +1487,13 @@ function Ct() {
1430
1487
  bottom: r.bottom,
1431
1488
  height: r.height
1432
1489
  });
1433
- }, []), i = G(() => {
1490
+ }, []), i = U(() => {
1434
1491
  n.current === "open" ? n.current = "frozen" : t(null);
1435
- }, []), a = G((e) => {
1492
+ }, []), a = U((e) => {
1436
1493
  n.current = e ? "open" : "idle", e || t(null);
1437
1494
  }, []);
1438
1495
  return {
1439
- virtualReference: q(() => {
1496
+ virtualReference: G(() => {
1440
1497
  if (e) return { getBoundingClientRect: () => ({
1441
1498
  width: 0,
1442
1499
  height: e.height,
@@ -1456,18 +1513,18 @@ function Ct() {
1456
1513
  }
1457
1514
  //#endregion
1458
1515
  //#region src/components/Gantt/GanttChart/GanttBarTooltip/GanttBarTooltip.tsx
1459
- var wt = {
1516
+ var Et = {
1460
1517
  borderRadius: "10px",
1461
1518
  padding: 0,
1462
1519
  backgroundColor: "#fff",
1463
1520
  boxShadow: "0 0 12px 0 rgba(0, 0, 0, 0.08)"
1464
- }, Tt = ({ item: e, tooltip: t, disabled: r = !1, children: i }) => {
1465
- let { virtualReference: a, handleMouseMove: o, handleMouseLeave: s, handleTooltipVisibleChange: c } = Ct(), 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), [
1466
1523
  r,
1467
1524
  t,
1468
1525
  e
1469
1526
  ]);
1470
- return l ? /* @__PURE__ */ B(n, {
1527
+ return l ? /* @__PURE__ */ R(n, {
1471
1528
  content: l,
1472
1529
  placement: "bottom",
1473
1530
  showArrow: !1,
@@ -1479,33 +1536,33 @@ var wt = {
1479
1536
  zIndex: 8001,
1480
1537
  virtualReference: a,
1481
1538
  onVisibleChange: c,
1482
- style: wt,
1539
+ style: Et,
1483
1540
  children: i({
1484
1541
  onMouseMove: o,
1485
1542
  onMouseLeave: s
1486
1543
  })
1487
- }) : /* @__PURE__ */ B(z, { children: i({
1544
+ }) : /* @__PURE__ */ R(L, { children: i({
1488
1545
  onMouseMove: () => {},
1489
1546
  onMouseLeave: () => {}
1490
1547
  }) });
1491
- }, Et = (e, t, n) => ({
1548
+ }, Ot = (e, t, n) => ({
1492
1549
  ...e,
1493
1550
  clientX: t,
1494
1551
  clientY: n,
1495
1552
  preventDefault: () => e.preventDefault(),
1496
1553
  stopPropagation: () => e.stopPropagation()
1497
1554
  });
1498
- function Dt({ enabled: e, onTaskMouseDown: t, onBarClick: n }) {
1499
- let r = J(null), i = J(null), a = J(t), o = J(n);
1500
- 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(() => {
1501
1558
  a.current = t, o.current = n;
1502
1559
  }, [t, n]);
1503
- let s = G(() => {
1560
+ let s = U(() => {
1504
1561
  r.current = null;
1505
1562
  let e = i.current;
1506
1563
  e && (document.removeEventListener("mousemove", e.move), document.removeEventListener("mouseup", e.up), i.current = null);
1507
1564
  }, []);
1508
- return K(() => () => s(), [s]), { handlePointerMouseDown: G((t, n, c, l = 1) => {
1565
+ return W(() => () => s(), [s]), { handlePointerMouseDown: U((t, n, c, l = 1) => {
1509
1566
  if (!e) return;
1510
1567
  s();
1511
1568
  let u = {
@@ -1520,7 +1577,7 @@ function Dt({ enabled: e, onTaskMouseDown: t, onBarClick: n }) {
1520
1577
  let d = (e) => {
1521
1578
  if (r.current !== u || u.dragStarted) return;
1522
1579
  let t = e.clientX - u.startClientX, i = e.clientY - u.startClientY;
1523
- Math.hypot(t, i) < 5 || (u.dragStarted = !0, s(), a.current?.(Et(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));
1524
1581
  }, f = (e) => {
1525
1582
  r.current === u && (s(), u.dragStarted || o.current?.(e, n));
1526
1583
  };
@@ -1530,18 +1587,18 @@ function Dt({ enabled: e, onTaskMouseDown: t, onBarClick: n }) {
1530
1587
  }, document.addEventListener("mousemove", d), document.addEventListener("mouseup", f);
1531
1588
  }, [e, s]) };
1532
1589
  }
1533
- var Ot = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermission: a }) => {
1534
- 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 = ht((e) => e.tooltip), p = ht((e) => e.isScrolling), m = ht((e) => e.onBarClick), h = ht((e) => e.onTaskMouseDown), g = ht((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(() => {
1535
1592
  let t = e.color;
1536
1593
  return {
1537
1594
  baseColor: t,
1538
- containerBgColor: vt(t, .2) || t,
1539
- hoverBorderColor: vt(t, .5) || "transparent",
1540
- insideLabelColor: yt(t)
1595
+ containerBgColor: bt(t, .2) || t,
1596
+ hoverBorderColor: bt(t, .5) || "transparent",
1597
+ insideLabelColor: xt(t)
1541
1598
  };
1542
- }, [e.color]), C = q(() => {
1599
+ }, [e.color]), C = G(() => {
1543
1600
  if (y == null || b == null || y >= b || l >= u) return null;
1544
- let e = Je({
1601
+ let e = Xe({
1545
1602
  startMs: y,
1546
1603
  endMs: b
1547
1604
  }, {
@@ -1549,14 +1606,14 @@ var Ot = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1549
1606
  endMs: u
1550
1607
  });
1551
1608
  if (!e) return null;
1552
- 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);
1553
- 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 : {
1554
1611
  clippedRange: e,
1555
- rawBarLeft: f,
1556
- calculatedBarLeft: m,
1557
- calculatedBarWidth: h - m,
1558
- clippedStart: a || m !== f,
1559
- 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
1560
1617
  };
1561
1618
  }, [
1562
1619
  y,
@@ -1567,14 +1624,14 @@ var Ot = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1567
1624
  c,
1568
1625
  v,
1569
1626
  i
1570
- ]), { 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 ? St(ne) : 0, [ne]), P = !!ne && ae > ie && !!C && C.calculatedBarLeft + C.calculatedBarWidth + 4 + ae <= d, { handlePointerMouseDown: oe } = Dt({
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({
1571
1628
  enabled: N,
1572
1629
  onTaskMouseDown: h,
1573
1630
  onBarClick: m
1574
1631
  });
1575
1632
  if (!C) return null;
1576
- 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 = {
1577
- 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,
1578
1635
  top: n,
1579
1636
  width: `var(--bsy-gantt-bar-actual-width, ${D}px)`,
1580
1637
  height: 26,
@@ -1585,19 +1642,20 @@ var Ot = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1585
1642
  "--bsy-gantt-bar-calc-width": `${D}px`,
1586
1643
  "--bsy-gantt-bar-label-color": E
1587
1644
  };
1588
- return /* @__PURE__ */ B(Tt, {
1645
+ return /* @__PURE__ */ R(Dt, {
1589
1646
  item: e,
1590
1647
  tooltip: _,
1591
1648
  disabled: v,
1592
- children: ({ onMouseMove: t, onMouseLeave: n }) => /* @__PURE__ */ V("div", {
1593
- className: X("bsy-gantt-chart__bar", `bsy-gantt-chart__bar--${e.type || "task"}`, {
1594
- "bsy-gantt-chart__bar--readonly": !N,
1595
- "bsy-gantt-chart__bar--dragging": v,
1596
- "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
1597
1654
  }),
1598
- style: K,
1655
+ "data-testid": "gantt-bar",
1656
+ style: W,
1599
1657
  onMouseDown: (t) => {
1600
- N && oe(t, e, F, W);
1658
+ N && se(t, e, ce, H);
1601
1659
  },
1602
1660
  onClick: (t) => {
1603
1661
  N || m(t, e);
@@ -1605,29 +1663,32 @@ var Ot = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1605
1663
  onMouseMove: t,
1606
1664
  onMouseLeave: n,
1607
1665
  children: [
1608
- e.type === "task" ? /* @__PURE__ */ B("div", {
1609
- 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",
1610
1669
  style: { width: j }
1611
1670
  }) : null,
1612
- /* @__PURE__ */ B("span", {
1613
- 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 }),
1614
1673
  style: { color: "var(--bsy-gantt-bar-label-color)" },
1615
1674
  children: te
1616
1675
  }),
1617
- P ? /* @__PURE__ */ B("span", {
1618
- className: "bsy-gantt-chart__bar-label bsy-gantt-chart__bar-label--outside",
1619
- style: { color: "#121211" },
1676
+ oe ? /* @__PURE__ */ R("span", {
1677
+ className: J(Z.barLabel, Z.isOutside),
1678
+ "data-testid": "gantt-bar-label-outside",
1620
1679
  children: te
1621
1680
  }) : null,
1622
- 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", {
1623
1682
  type: "button",
1624
- className: "bsy-gantt-chart__bar-resize-handle bsy-gantt-chart__bar-resize-handle--left",
1625
- 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),
1626
1686
  "aria-label": o("gantt.timeBegin")
1627
- }) : null, M.canResizeEnd && !L && G ? /* @__PURE__ */ B("button", {
1687
+ }) : null, M.canResizeEnd && !F && U ? /* @__PURE__ */ R("button", {
1628
1688
  type: "button",
1629
- className: "bsy-gantt-chart__bar-resize-handle bsy-gantt-chart__bar-resize-handle--right",
1630
- 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),
1631
1692
  "aria-label": o("gantt.timeEnd")
1632
1693
  }) : null] }) : null
1633
1694
  ]
@@ -1637,34 +1698,44 @@ var Ot = H.memo(({ item: e, barTop: n, dragTaskId: r, dragPreview: i, dragPermis
1637
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;
1638
1699
  let n = e.dragPreview, r = t.dragPreview;
1639
1700
  return !(n !== r && (!n || !r || n.previewStartMs !== r.previewStartMs || n.previewEndMs !== r.previewEndMs || n.previewLeftPx !== r.previewLeftPx));
1640
- }), kt = (e) => String(e).padStart(2, "0");
1641
- function At(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) {
1642
1713
  if (e == null) return t("summary.empty");
1643
1714
  let n = C(e);
1644
1715
  return t("summary.datetime", {
1645
1716
  year: n.year(),
1646
- month: kt(n.month() + 1),
1647
- day: kt(n.date()),
1648
- hour: kt(n.hour()),
1649
- minute: kt(n.minute()),
1650
- second: kt(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())
1651
1722
  });
1652
1723
  }
1653
- function jt(e, t) {
1654
- let n = L(e?.progress), r = n ? Math.max(0, Math.min(1, e.progress ?? 0)) : 0, i = At(e?.rawStartMs, t), a = At(e?.rawEndMs, t);
1655
- return /* @__PURE__ */ V("div", {
1656
- 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,
1657
1728
  children: [
1658
- /* @__PURE__ */ B("p", {
1659
- className: "bsy-gantt-summary-tooltip__line",
1729
+ /* @__PURE__ */ R("p", {
1730
+ className: $.summaryTooltipLine,
1660
1731
  children: t("summary.startTime", { datetime: i })
1661
1732
  }),
1662
- /* @__PURE__ */ B("p", {
1663
- className: "bsy-gantt-summary-tooltip__line",
1733
+ /* @__PURE__ */ R("p", {
1734
+ className: $.summaryTooltipLine,
1664
1735
  children: t("summary.endTime", { datetime: a })
1665
1736
  }),
1666
- n ? /* @__PURE__ */ B("p", {
1667
- className: "bsy-gantt-summary-tooltip__line",
1737
+ n ? /* @__PURE__ */ R("p", {
1738
+ className: $.summaryTooltipLine,
1668
1739
  children: t("summary.progress", { percent: Math.round(r * 100) })
1669
1740
  }) : null
1670
1741
  ]
@@ -1672,17 +1743,17 @@ function jt(e, t) {
1672
1743
  }
1673
1744
  //#endregion
1674
1745
  //#region src/components/Gantt/GanttChart/GanttSummaryBar/GanttSummaryBar.tsx
1675
- var Mt = 24, Nt = {
1746
+ var Pt = 24, Ft = {
1676
1747
  borderRadius: "6px",
1677
1748
  padding: 0,
1678
1749
  backgroundColor: "rgba(0, 0, 0, 0.5)",
1679
1750
  boxShadow: "none"
1680
1751
  };
1681
- function Pt(e, t) {
1752
+ function It(e, t) {
1682
1753
  return e == null || e === "__empty__" ? t : e;
1683
1754
  }
1684
- var Ft = ({ item: r, barTop: i }) => {
1685
- 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 = ht((e) => e.collapsedKeys), f = ht((e) => e.onBarClick), { virtualReference: p, handleMouseMove: m, handleMouseLeave: h, handleTooltipVisibleChange: g } = Ct(), _ = L(r.progress) ? Math.max(0, Math.min(1, r.progress ?? 0)) : 0, v = q(() => jt({
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({
1686
1757
  rawStartMs: r.rawStartMs,
1687
1758
  rawEndMs: r.rawEndMs,
1688
1759
  progress: r.progress
@@ -1691,9 +1762,9 @@ var Ft = ({ item: r, barTop: i }) => {
1691
1762
  r.rawEndMs,
1692
1763
  r.progress,
1693
1764
  o
1694
- ]), y = q(() => {
1765
+ ]), y = G(() => {
1695
1766
  if (r.startMs === null || r.endMs === null || r.startMs >= r.endMs || c >= l) return null;
1696
- let e = Je({
1767
+ let e = Xe({
1697
1768
  startMs: r.startMs,
1698
1769
  endMs: r.endMs
1699
1770
  }, {
@@ -1703,7 +1774,7 @@ var Ft = ({ item: r, barTop: i }) => {
1703
1774
  return e ? {
1704
1775
  barLeft: s.toX(e.startMs),
1705
1776
  barWidth: s.toWidth(e.startMs, e.endMs),
1706
- wrapperTop: i + (26 - Mt) / 2,
1777
+ wrapperTop: i + (26 - Pt) / 2,
1707
1778
  clippedEnd: e.endMs !== r.endMs,
1708
1779
  clippedRange: e,
1709
1780
  itemStartMs: r.startMs,
@@ -1718,8 +1789,8 @@ var Ft = ({ item: r, barTop: i }) => {
1718
1789
  i
1719
1790
  ]);
1720
1791
  if (!y) return null;
1721
- 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 = Pt(r.label, a("gantt.emptyGroup")), M = ne(d, r.groupKey);
1722
- 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, {
1723
1794
  content: v,
1724
1795
  placement: "bottom-start",
1725
1796
  showArrow: !1,
@@ -1730,9 +1801,10 @@ var Ft = ({ item: r, barTop: i }) => {
1730
1801
  zIndex: 8001,
1731
1802
  virtualReference: p,
1732
1803
  onVisibleChange: g,
1733
- style: Nt,
1734
- children: /* @__PURE__ */ V("div", {
1735
- className: "bsy-gantt-summary-bar",
1804
+ style: Ft,
1805
+ children: /* @__PURE__ */ z("div", {
1806
+ className: $.root,
1807
+ "data-testid": "gantt-summary-bar",
1736
1808
  style: {
1737
1809
  left: b,
1738
1810
  top: S,
@@ -1742,34 +1814,36 @@ var Ft = ({ item: r, barTop: i }) => {
1742
1814
  onClick: (e) => f?.(e, r),
1743
1815
  onMouseMove: m,
1744
1816
  onMouseLeave: h,
1745
- children: [/* @__PURE__ */ V("div", {
1746
- className: "bsy-gantt-summary-bar__label",
1817
+ children: [/* @__PURE__ */ z("div", {
1818
+ className: $.label,
1819
+ "data-testid": "gantt-summary-bar-label",
1747
1820
  style: {
1748
1821
  maxWidth: A,
1749
1822
  overflow: "hidden"
1750
1823
  },
1751
- children: [/* @__PURE__ */ B(e, {
1824
+ children: [/* @__PURE__ */ R(e, {
1752
1825
  name: "xiangxiazhankai1",
1753
1826
  size: 16,
1754
- className: X("bsy-gantt-summary-bar__arrow", { "bsy-gantt-summary-bar__arrow--collapsed": M })
1755
- }), /* @__PURE__ */ B("span", {
1756
- className: "bsy-gantt-summary-bar__label-text",
1827
+ className: J($.arrow, { [$.isCollapsed]: M })
1828
+ }), /* @__PURE__ */ R("span", {
1829
+ className: $.labelText,
1757
1830
  children: j
1758
1831
  })]
1759
- }), /* @__PURE__ */ B("div", {
1760
- className: "bsy-gantt-summary-bar__track",
1761
- children: /* @__PURE__ */ B("div", {
1762
- 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",
1763
1837
  style: { width: k }
1764
1838
  })
1765
1839
  })]
1766
1840
  })
1767
1841
  });
1768
1842
  };
1769
- function It(e, t) {
1843
+ function Rt(e, t) {
1770
1844
  return e.barTop === t.barTop && e.item === t.item;
1771
1845
  }
1772
- var Lt = H.memo(Ft, It), Rt = H.memo(({ indicators: n = [], onJump: r }) => {
1846
+ var zt = B.memo(Lt, Rt), Bt = B.memo(({ indicators: n = [], onJump: r }) => {
1773
1847
  let { t: i } = t();
1774
1848
  if (!Array.isArray(n) || n.length === 0) return null;
1775
1849
  let a = (e, t) => {
@@ -1778,46 +1852,49 @@ var Lt = H.memo(Ft, It), Rt = H.memo(({ indicators: n = [], onJump: r }) => {
1778
1852
  taskId: t.taskId
1779
1853
  });
1780
1854
  };
1781
- return /* @__PURE__ */ B(z, { children: n.map((t) => /* @__PURE__ */ B("div", {
1782
- className: "bsy-gantt-chart__offscreen-row",
1855
+ return /* @__PURE__ */ R(L, { children: n.map((t) => /* @__PURE__ */ R("div", {
1856
+ className: Z.offscreenRow,
1783
1857
  style: {
1784
1858
  top: t.rowTop,
1785
1859
  height: t.rowHeight
1786
1860
  },
1787
- children: /* @__PURE__ */ V("div", {
1788
- className: "bsy-gantt-chart__offscreen-track",
1789
- children: [t.showLeft ? /* @__PURE__ */ B("button", {
1861
+ children: /* @__PURE__ */ z("div", {
1862
+ className: Z.offscreenTrack,
1863
+ children: [t.showLeft ? /* @__PURE__ */ R("button", {
1790
1864
  type: "button",
1791
- 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",
1792
1867
  "aria-label": i("gantt.aria.jumpLeft"),
1793
1868
  onClick: (e) => a(e, t),
1794
- children: /* @__PURE__ */ B(e, {
1869
+ children: /* @__PURE__ */ R(e, {
1795
1870
  name: "left",
1796
1871
  size: 16
1797
1872
  })
1798
- }) : null, t.showRight ? /* @__PURE__ */ B("button", {
1873
+ }) : null, t.showRight ? /* @__PURE__ */ R("button", {
1799
1874
  type: "button",
1800
- 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",
1801
1877
  "aria-label": i("gantt.aria.jumpRight"),
1802
1878
  onClick: (e) => a(e, t),
1803
- children: /* @__PURE__ */ B(e, {
1879
+ children: /* @__PURE__ */ R(e, {
1804
1880
  name: "arrow-right",
1805
1881
  size: 16
1806
1882
  })
1807
1883
  }) : null]
1808
1884
  })
1809
1885
  }, t.rowKey)) });
1810
- }), zt = ({ left: e, height: t, className: n = "" }) => /* @__PURE__ */ B("div", {
1811
- 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",
1812
1889
  style: {
1813
1890
  left: e,
1814
1891
  height: t
1815
1892
  },
1816
- children: /* @__PURE__ */ B("span", { className: "bsy-gantt-chart__today-indicator-line" })
1817
- }), Bt = W(function({ canvasHeight: e, weekendSegments: t, virtualColumns: n, lowerSegments: r, shouldShowTodayMarker: i, todayLineLeft: a }) {
1818
- return /* @__PURE__ */ V(z, { children: [
1819
- t.map((t) => /* @__PURE__ */ B("div", {
1820
- 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,
1821
1898
  style: {
1822
1899
  left: t.left,
1823
1900
  width: t.width,
@@ -1826,27 +1903,27 @@ var Lt = H.memo(Ft, It), Rt = H.memo(({ indicators: n = [], onJump: r }) => {
1826
1903
  }, t.id)),
1827
1904
  n.map((t) => {
1828
1905
  let n = r[t.index];
1829
- return n ? /* @__PURE__ */ B("div", {
1830
- className: "bsy-gantt-chart__col-line",
1906
+ return n ? /* @__PURE__ */ R("div", {
1907
+ className: Z.colLine,
1831
1908
  style: {
1832
1909
  left: n.left,
1833
1910
  height: e
1834
1911
  }
1835
1912
  }, `line-${n.id}`) : null;
1836
1913
  }),
1837
- i ? /* @__PURE__ */ B(zt, {
1914
+ i ? /* @__PURE__ */ R(Vt, {
1838
1915
  left: a ?? 0,
1839
1916
  height: e,
1840
- className: "bsy-gantt-chart__today-indicator--content-line"
1917
+ className: Z.todayIndicatorContentLine
1841
1918
  }) : null
1842
1919
  ] });
1843
- }), Vt = ({ 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 }) => {
1844
1921
  let o = n?.taskId ?? null;
1845
1922
  return e.map((e) => {
1846
1923
  let s = t[e.index];
1847
1924
  if (!s || s.invalid) return null;
1848
1925
  let c = o === s.id;
1849
- if (!c && (s.startMs === null || s.endMs === null || s.startMs >= s.endMs || !qe({
1926
+ if (!c && (s.startMs === null || s.endMs === null || s.startMs >= s.endMs || !Ye({
1850
1927
  startMs: s.startMs,
1851
1928
  endMs: s.endMs
1852
1929
  }, {
@@ -1854,10 +1931,10 @@ var Lt = H.memo(Ft, It), Rt = H.memo(({ indicators: n = [], onJump: r }) => {
1854
1931
  endMs: a
1855
1932
  }))) return null;
1856
1933
  let l = e.start + (e.size - 26) / 2;
1857
- return s.type === "summary" ? /* @__PURE__ */ B(Lt, {
1934
+ return s.type === "summary" ? /* @__PURE__ */ R(zt, {
1858
1935
  item: s,
1859
1936
  barTop: l
1860
- }, `summary-${s.id}`) : /* @__PURE__ */ B(Ot, {
1937
+ }, `summary-${s.id}`) : /* @__PURE__ */ R(At, {
1861
1938
  item: s,
1862
1939
  barTop: l,
1863
1940
  dragTaskId: o,
@@ -1865,8 +1942,8 @@ var Lt = H.memo(Ft, It), Rt = H.memo(({ indicators: n = [], onJump: r }) => {
1865
1942
  dragPermission: r[s.id]
1866
1943
  }, `bar-${s.id}`);
1867
1944
  });
1868
- }, Ht = W(function({ virtualRows: e, normalizedItems: t, dragState: n, dragPermissionById: r, handleOffscreenJump: i, hoverBgRef: a }) {
1869
- let o = $((e) => e.timelineStartMs), s = $((e) => e.timelineEndMs), c = $((e) => e.visibleStartMs), l = $((e) => e.visibleEndMs), u = $((e) => e.isInitialLayoutReady), d = ft({
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({
1870
1947
  virtualRows: e,
1871
1948
  normalizedItems: t,
1872
1949
  visibleStartMs: c,
@@ -1874,20 +1951,22 @@ var Lt = H.memo(Ft, It), Rt = H.memo(({ indicators: n = [], onJump: r }) => {
1874
1951
  enabled: u,
1875
1952
  excludeTaskId: n?.taskId ?? null
1876
1953
  });
1877
- return /* @__PURE__ */ V(z, { children: [
1878
- e.map((e) => /* @__PURE__ */ B("div", {
1879
- 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",
1880
1958
  style: {
1881
1959
  top: e.start,
1882
1960
  height: e.size
1883
1961
  }
1884
1962
  }, `row-line-${e.key}`)),
1885
- /* @__PURE__ */ B("div", {
1963
+ /* @__PURE__ */ R("div", {
1886
1964
  ref: a,
1887
- className: "bsy-gantt-chart__row-hover-bg",
1965
+ className: Z.rowHoverBg,
1966
+ "data-testid": "gantt-row-hover-bg",
1888
1967
  style: { display: "none" }
1889
1968
  }),
1890
- u && Vt({
1969
+ u && Ut({
1891
1970
  virtualRows: e,
1892
1971
  normalizedItems: t,
1893
1972
  dragState: n,
@@ -1895,24 +1974,24 @@ var Lt = H.memo(Ft, It), Rt = H.memo(({ indicators: n = [], onJump: r }) => {
1895
1974
  timelineStartMs: o,
1896
1975
  timelineEndMs: s
1897
1976
  }),
1898
- u ? /* @__PURE__ */ B(Rt, {
1977
+ u ? /* @__PURE__ */ R(Bt, {
1899
1978
  indicators: d,
1900
1979
  onJump: i
1901
1980
  }) : null
1902
1981
  ] });
1903
- }), Ut = 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 }) {
1904
- let _ = $((e) => e.timelineWidth), { virtualRows: v, canvasHeight: y, isScrolling: b } = dt({
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({
1905
1984
  items: t,
1906
1985
  contentRef: e,
1907
1986
  safeRowHeight: n,
1908
1987
  viewportHeight: r
1909
- }), { hoverBgRef: x, handleContentMouseMove: S, handleContentMouseLeave: C } = pt({
1988
+ }), { hoverBgRef: x, handleContentMouseMove: S, handleContentMouseLeave: C } = ht({
1910
1989
  normalizedItems: t,
1911
1990
  safeRowHeight: n
1912
- }), w = q(() => ({
1991
+ }), w = G(() => ({
1913
1992
  width: _,
1914
1993
  height: y
1915
- }), [_, y]), T = q(() => ({
1994
+ }), [_, y]), T = G(() => ({
1916
1995
  tooltip: l ?? null,
1917
1996
  isScrolling: b,
1918
1997
  collapsedKeys: p,
@@ -1927,21 +2006,22 @@ var Lt = H.memo(Ft, It), Rt = H.memo(({ indicators: n = [], onJump: r }) => {
1927
2006
  u,
1928
2007
  d
1929
2008
  ]);
1930
- return /* @__PURE__ */ V("div", {
1931
- className: "bsy-gantt-chart__canvas",
2009
+ return /* @__PURE__ */ z("div", {
2010
+ className: Z.canvas,
2011
+ "data-testid": "gantt-canvas",
1932
2012
  style: w,
1933
2013
  onMouseMove: S,
1934
2014
  onMouseLeave: C,
1935
- children: [/* @__PURE__ */ B(Bt, {
2015
+ children: [/* @__PURE__ */ R(Ht, {
1936
2016
  canvasHeight: y,
1937
2017
  weekendSegments: o,
1938
2018
  virtualColumns: a,
1939
2019
  lowerSegments: i,
1940
2020
  shouldShowTodayMarker: g,
1941
2021
  todayLineLeft: h
1942
- }), /* @__PURE__ */ B(mt.Provider, {
2022
+ }), /* @__PURE__ */ R(gt.Provider, {
1943
2023
  value: T,
1944
- children: /* @__PURE__ */ B(Ht, {
2024
+ children: /* @__PURE__ */ R(Wt, {
1945
2025
  virtualRows: v,
1946
2026
  normalizedItems: t,
1947
2027
  dragState: s,
@@ -1954,8 +2034,8 @@ var Lt = H.memo(Ft, It), Rt = H.memo(({ indicators: n = [], onJump: r }) => {
1954
2034
  });
1955
2035
  //#endregion
1956
2036
  //#region src/components/Gantt/GanttChart/GanttChart.tsx
1957
- function Wt({ 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 }, _) {
1958
- 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 = ct(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 } = ot({
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({
1959
2039
  timeRangeConfig: a,
1960
2040
  pixelsPerDayConfig: o,
1961
2041
  viewMode: n,
@@ -1966,16 +2046,16 @@ function Wt({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
1966
2046
  isHorizontalScrollbarInteracting: T,
1967
2047
  isTaskBarInteracting: ee
1968
2048
  });
1969
- se(_, () => ({
1970
- scrollToToday: I,
1971
- scrollPrev: R,
1972
- scrollNext: z
2049
+ le(_, () => ({
2050
+ scrollToToday: P,
2051
+ scrollPrev: I,
2052
+ scrollNext: L
1973
2053
  }), [
2054
+ P,
1974
2055
  I,
1975
- R,
1976
- z
2056
+ L
1977
2057
  ]);
1978
- let { dragState: H, committedRangeById: U, resetCommittedRanges: W, forceResetAllCommittedRanges: ce, handleTaskMouseDown: X, handleResizeMouseDown: le, consumeRecentDragResult: de } = Ae({
2058
+ let { dragState: B, committedRangeById: V, resetCommittedRanges: H, forceResetAllCommittedRanges: ue, handleTaskMouseDown: J, handleResizeMouseDown: de, consumeRecentDragResult: pe } = Me({
1979
2059
  pixelsPerDay: D,
1980
2060
  viewMode: n,
1981
2061
  timelineCoords: ne,
@@ -1983,7 +2063,7 @@ function Wt({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
1983
2063
  containerRef: x,
1984
2064
  onDragInteractionChange: E
1985
2065
  });
1986
- K(() => {
2066
+ W(() => {
1987
2067
  let t = new Set((e || []).map((e) => String(e?.id ?? ""))), n = w.current, r = !1;
1988
2068
  if (n) {
1989
2069
  if (n.size !== t.size) r = !0;
@@ -1993,45 +2073,45 @@ function Wt({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
1993
2073
  }
1994
2074
  }
1995
2075
  if (w.current = t, r) {
1996
- ce();
2076
+ ue();
1997
2077
  return;
1998
2078
  }
1999
- W();
2079
+ H();
2000
2080
  }, [
2001
2081
  e,
2002
- W,
2003
- ce
2082
+ H,
2083
+ ue
2004
2084
  ]);
2005
- let { normalizedItems: Z } = st({
2085
+ let { normalizedItems: Y } = lt({
2006
2086
  visibleItems: e,
2007
- committedRangeById: U,
2087
+ committedRangeById: V,
2008
2088
  viewMode: n
2009
- }), Q = q(() => {
2089
+ }), X = G(() => {
2010
2090
  let e = {};
2011
- return Z.forEach((t) => {
2012
- e[t.id] = ve(t);
2091
+ return Y.forEach((t) => {
2092
+ e[t.id] = be(t);
2013
2093
  }), e;
2014
- }, [Z]), fe = G((e, t, n, r) => {
2015
- let i = Q[t.id];
2016
- i?.canMove && X(e, {
2094
+ }, [Y]), me = U((e, t, n, r) => {
2095
+ let i = X[t.id];
2096
+ i?.canMove && J(e, {
2017
2097
  ...t,
2018
2098
  dragPermission: i
2019
2099
  }, n, r);
2020
- }, [Q, X]), pe = G((e, t, n, r, i) => {
2021
- let a = Q[t.id];
2022
- (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, {
2023
2103
  ...t,
2024
2104
  dragPermission: a
2025
2105
  }, n, r, i);
2026
- }, [Q, le]);
2027
- K(() => {
2106
+ }, [X, de]);
2107
+ W(() => {
2028
2108
  if (!f || !x.current) return;
2029
2109
  let e = x.current;
2030
2110
  return f.registerTimelineScroller({ setScrollTop: (t) => {
2031
2111
  e.scrollTop = t;
2032
2112
  } });
2033
2113
  }, [f]);
2034
- let me = C?.height || 0, { virtualColumns: he, weekendSegments: ge } = Fe({
2114
+ let ge = C?.height || 0, { virtualColumns: _e, weekendSegments: ve } = Le({
2035
2115
  lowerSegments: te,
2036
2116
  pixelsPerDay: D,
2037
2117
  scrollLeft: k,
@@ -2040,11 +2120,11 @@ function Wt({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2040
2120
  timelineStartMs: A,
2041
2121
  timelineWidth: re,
2042
2122
  viewMode: n
2043
- }), _e = lt(m, ae, re, ie, {
2123
+ }), ye = dt(m, ae, re, ie, {
2044
2124
  startMs: A,
2045
2125
  endMs: j
2046
- }), ye = G((e, t) => {
2047
- 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()) {
2048
2128
  if (t?.type === "summary") {
2049
2129
  let e = t.groupKey;
2050
2130
  if (!e || !g) return;
@@ -2054,10 +2134,10 @@ function Wt({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2054
2134
  l && l(t, t.rowIndex, e);
2055
2135
  }
2056
2136
  }, [
2057
- de,
2137
+ pe,
2058
2138
  l,
2059
2139
  g
2060
- ]), be = q(() => ({
2140
+ ]), Se = G(() => ({
2061
2141
  viewMode: n,
2062
2142
  pixelsPerDay: D,
2063
2143
  timelineStartMs: A,
@@ -2068,7 +2148,7 @@ function Wt({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2068
2148
  scrollLeft: k,
2069
2149
  viewportWidth: O,
2070
2150
  timelineWidth: re,
2071
- isInitialLayoutReady: P
2151
+ isInitialLayoutReady: oe
2072
2152
  }), [
2073
2153
  n,
2074
2154
  D,
@@ -2080,19 +2160,20 @@ function Wt({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2080
2160
  k,
2081
2161
  O,
2082
2162
  re,
2083
- P
2163
+ oe
2084
2164
  ]);
2085
- return /* @__PURE__ */ B(gt.Provider, {
2086
- value: be,
2087
- children: /* @__PURE__ */ V("div", {
2088
- className: "bsy-gantt-chart",
2089
- style: { visibility: P ? "visible" : "hidden" },
2090
- children: [/* @__PURE__ */ B(ut, {
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, {
2091
2172
  timelineWidth: re,
2092
2173
  viewportWidth: O,
2093
2174
  scrollLeft: k,
2094
2175
  trackRef: S,
2095
- virtualColumns: he,
2176
+ virtualColumns: _e,
2096
2177
  lowerSegments: te,
2097
2178
  todayLineLeft: ae,
2098
2179
  todayCenterMs: ie,
@@ -2101,44 +2182,45 @@ function Wt({ items: e = [], viewMode: n = "day", availableModes: r, onViewModeC
2101
2182
  availableModes: r,
2102
2183
  formatMessage: y,
2103
2184
  onViewModeChange: i,
2104
- onTodayClick: I,
2105
- onScrollPrev: R,
2106
- onScrollNext: z
2107
- }), /* @__PURE__ */ B("div", {
2185
+ onTodayClick: P,
2186
+ onScrollPrev: I,
2187
+ onScrollNext: L
2188
+ }), /* @__PURE__ */ R("div", {
2108
2189
  ref: b,
2109
- className: "bsy-gantt-chart__timeline-host",
2110
- children: /* @__PURE__ */ B("div", {
2190
+ className: Z.timelineHost,
2191
+ children: /* @__PURE__ */ R("div", {
2111
2192
  ref: x,
2112
- className: "bsy-gantt-chart__timeline-content",
2193
+ className: Z.timelineContent,
2194
+ "data-testid": "gantt-timeline-content",
2113
2195
  role: "region",
2114
2196
  "aria-label": v("gantt.aria.timeline"),
2115
2197
  onScroll: (e) => {
2116
- F(e), f && f.sync("timeline", e.currentTarget.scrollTop);
2198
+ ce(e), f && f.sync("timeline", e.currentTarget.scrollTop);
2117
2199
  },
2118
- children: /* @__PURE__ */ B(Ut, {
2200
+ children: /* @__PURE__ */ R(Gt, {
2119
2201
  contentRef: x,
2120
- normalizedItems: Z,
2202
+ normalizedItems: Y,
2121
2203
  safeRowHeight: 34,
2122
- viewportHeight: me,
2204
+ viewportHeight: ge,
2123
2205
  lowerSegments: te,
2124
- virtualColumns: he,
2125
- weekendSegments: ge,
2126
- dragState: H,
2127
- dragPermissionById: Q,
2206
+ virtualColumns: _e,
2207
+ weekendSegments: ve,
2208
+ dragState: B,
2209
+ dragPermissionById: X,
2128
2210
  tooltip: d,
2129
- handleTaskMouseDown: fe,
2130
- handleResizeMouseDown: pe,
2131
- handleBarClick: ye,
2211
+ handleTaskMouseDown: me,
2212
+ handleResizeMouseDown: he,
2213
+ handleBarClick: xe,
2132
2214
  collapsedKeys: h,
2133
- handleOffscreenJump: L,
2215
+ handleOffscreenJump: F,
2134
2216
  todayLineLeft: ae,
2135
- shouldShowTodayMarker: _e
2217
+ shouldShowTodayMarker: ye
2136
2218
  })
2137
2219
  })
2138
2220
  })]
2139
2221
  })
2140
2222
  });
2141
2223
  }
2142
- var Gt = U(Wt);
2224
+ var qt = V(Kt);
2143
2225
  //#endregion
2144
- export { Gt as t };
2226
+ export { qt as t };