@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,37 +1,44 @@
1
- import "../Icon/Icon-BQ3Whub2.js";
2
- import "../vendors/LocaleContext-BJdHS0sH.js";
3
- import "../vendors/useLocale-BTz4slNW.js";
4
- import "../Tooltip/Tooltip-DW_XP13m.js";
5
- import "../Select/SelectInputSearch-DXPTGSc2.js";
6
- import "../NotFoundContent/NotFoundContent-7xV-zOG2.js";
7
- import "../vendors/useFloatingPortal-DsEtsAGW.js";
8
- import "../DropDown/DropDown-CvQAbsEo.js";
9
- import "../Table/processRowspan-BCzfI5un.js";
10
- import "../Table/Table-3-kFIm5v.js";
11
- import "../Table/hooks-CJ2CnSep.js";
12
- import { a as e, c as t, i as n, l as r, o as i, s as a } from "./constants-D4ur8WRs.js";
13
- import { r as o } from "./columnResize-By_1E48E.js";
14
- import { t as s } from "./GanttTable-Di_p-0M1.js";
15
- import { t as c } from "./GanttHighlightContext-AIpN3-af.js";
16
- import { n as l, t as u } from "./highlightTarget-DmzCIiQb.js";
17
- import { c as d, o as f, r as p, s as m } from "./timelineViewConfig-BXl2UkN8.js";
18
- import { n as h, r as g, t as _ } from "./collapseKeys-C8139wvy.js";
19
- import { t as v } from "./GanttChart-BgDJOyW1.js";
20
- import "./GanttToolBar-D5pQdrzv.js";
21
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
22
- import { forwardRef as x, useCallback as S, useEffect as C, useMemo as w, useRef as T, useState as E } from "react";
23
- import D from "clsx";
24
- import { useEventListener as O, useSize as k } from "ahooks";
25
- import { useContextSelector as A } from "use-context-selector";
26
- //#region src/components/Gantt/GanttResizeIndicator.tsx
27
- var j = ({ tableWidth: e, onWidthChange: t, onResizeEnd: n, containerRef: r }) => {
28
- let [i, a] = E(!1), [o, s] = E(!1), c = T(0), l = T(0), u = T(e);
29
- C(() => {
1
+ import "../ScrollBar/ScrollBar-CSGBOE3e.js";
2
+ import "../Icon/Icon-SQ5tu-yG.js";
3
+ import "../vendors/LocaleContext-CBcJzvUD.js";
4
+ import "../vendors/useLocale-DZ8XW2VL.js";
5
+ import "../Tooltip/Tooltip-B_SZOy6k.js";
6
+ import "../Select/SelectInputSearch-BDwg-Noi.js";
7
+ import "../NotFoundContent/NotFoundContent-CV9fTylQ.js";
8
+ import "../vendors/useFloatingPortal-B2SDNV5C.js";
9
+ import "../DropDown/DropDown-B34vfoOs.js";
10
+ import "../Table/processRowspan-D4uv6zLk.js";
11
+ import "../Table/Table-BtH9Oa14.js";
12
+ import "../Table/hooks-DK8Pf7iH.js";
13
+ import { a as e, c as t, i as n, l as r, o as i, s as a } from "./constants-CrBb5i5p.js";
14
+ import { r as o } from "./columnResize-DFe7F98O.js";
15
+ import { t as s } from "./GanttTable-C3PLGmKr.js";
16
+ import { t as c } from "./GanttHighlightContext-CtT98ZnK.js";
17
+ import { n as l, t as u } from "./highlightTarget-DtCe7zto.js";
18
+ import { c as d, o as f, r as p, s as m } from "./timelineViewConfig-Dl3AXO45.js";
19
+ import { n as h, r as g, t as _ } from "./collapseKeys-1N9ci2oJ.js";
20
+ import { t as v } from "./GanttChart-CnIWe_wk.js";
21
+ import { n as ee } from "./GanttToolBar-8jPQ9BAG.js";
22
+ import { i as y, n as te, r as b, t as x } from "./theme-C197Dtjy.js";
23
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
24
+ import { forwardRef as w, useCallback as T, useEffect as E, useMemo as D, useRef as O, useState as k } from "react";
25
+ import ne from "clsx";
26
+ import { useEventListener as A, useSize as j } from "ahooks";
27
+ import { useContextSelector as M } from "use-context-selector";
28
+ var N = {
29
+ root: "_root_1p401_1",
30
+ body: "_body_1p401_11",
31
+ chartSlot: "_chartSlot_1p401_19",
32
+ resizeIndicator: "_resizeIndicator_1p401_25",
33
+ resizeIndicatorBar: "_resizeIndicatorBar_1p401_35"
34
+ }, re = ({ tableWidth: e, onWidthChange: t, onResizeEnd: n, containerRef: r }) => {
35
+ let [i, a] = k(!1), [o, s] = k(!1), c = O(0), l = O(0), u = O(e);
36
+ E(() => {
30
37
  u.current = e;
31
38
  }, [e]);
32
- let d = i || o, f = S((e) => {
39
+ let d = i || o, f = T((e) => {
33
40
  s(!0), c.current = e.clientX, l.current = u.current, e.preventDefault();
34
- }, []), p = S((e) => {
41
+ }, []), p = T((e) => {
35
42
  if (!o) return;
36
43
  let n = e.clientX - c.current, i = l.current + n, a = (r.current?.offsetWidth || 1e3) - 300;
37
44
  i < 200 ? i = 200 : i > a && (i = a), t(i);
@@ -39,41 +46,42 @@ var j = ({ tableWidth: e, onWidthChange: t, onResizeEnd: n, containerRef: r }) =
39
46
  o,
40
47
  r,
41
48
  t
42
- ]), m = S(() => {
49
+ ]), m = T(() => {
43
50
  o && (s(!1), n?.(u.current));
44
51
  }, [o, n]);
45
- return O("mousemove", p, { target: () => document }), O("mouseup", m, { target: () => document }), /* @__PURE__ */ y("div", {
46
- className: "bsy-gantt-resize-indicator",
52
+ return A("mousemove", p, { target: () => document }), A("mouseup", m, { target: () => document }), /* @__PURE__ */ S("div", {
53
+ className: N.resizeIndicator,
54
+ "data-testid": "gantt-resize-indicator",
47
55
  style: { left: `${e}px` },
48
56
  onMouseEnter: () => a(!0),
49
57
  onMouseLeave: () => a(!1),
50
58
  onMouseDown: f,
51
- children: d ? /* @__PURE__ */ y("div", { className: "bsy-gantt-resize-indicator__bar" }) : null
59
+ children: d ? /* @__PURE__ */ S("div", { className: N.resizeIndicatorBar }) : null
52
60
  });
53
- }, M = Object.freeze({ source: "table" });
54
- function N() {
55
- let e = T(null), t = T(void 0), n = T(/* @__PURE__ */ new Set()), r = T(!1), i = T(null), a = S(() => e.current, []), o = S((r) => (n.current.add(r), r(e.current, { source: t.current }), () => {
61
+ }, P = Object.freeze({ source: "table" });
62
+ function ie() {
63
+ let e = O(null), t = O(void 0), n = O(/* @__PURE__ */ new Set()), r = O(!1), i = O(null), a = T(() => e.current, []), o = T((r) => (n.current.add(r), r(e.current, { source: t.current }), () => {
56
64
  n.current.delete(r);
57
- }), []), s = S((e, t) => {
58
- let r = t === "table" ? M : { source: t };
65
+ }), []), s = T((e, t) => {
66
+ let r = t === "table" ? P : { source: t };
59
67
  n.current.forEach((t) => t(e, r));
60
- }, []), c = S(() => {
68
+ }, []), c = T(() => {
61
69
  e.current !== null && (e.current = null, t.current = void 0, s(null, void 0));
62
- }, [s]), u = S(() => {
70
+ }, [s]), u = T(() => {
63
71
  r.current || (r.current = !0, c()), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
64
72
  r.current = !1, i.current = null;
65
73
  }, 150);
66
- }, [c]), d = S((n, i) => {
74
+ }, [c]), d = T((n, i) => {
67
75
  if (r.current) return;
68
76
  let a = i?.source;
69
77
  l(e.current, n) && (a !== "table" || t.current === "table") || (e.current = n, t.current = a, s(n, a));
70
- }, [s]), f = S((e) => {
71
- d(e, M);
72
- }, [d]), p = S(() => r.current, []);
73
- return C(() => () => {
78
+ }, [s]), f = T((e) => {
79
+ d(e, P);
80
+ }, [d]), p = T(() => r.current, []);
81
+ return E(() => () => {
74
82
  i.current && clearTimeout(i.current);
75
83
  }, []), {
76
- highlightContextValue: w(() => ({
84
+ highlightContextValue: D(() => ({
77
85
  getHighlightTarget: a,
78
86
  setHighlightTarget: d,
79
87
  setTableHighlightTarget: f,
@@ -95,13 +103,13 @@ function N() {
95
103
  }
96
104
  //#endregion
97
105
  //#region src/components/Gantt/utils/tableWidthStorage.ts
98
- function P(e) {
106
+ function F(e) {
99
107
  return `gantt_view_${e}`;
100
108
  }
101
- function F(e) {
109
+ function I(e) {
102
110
  if (!e) return null;
103
111
  try {
104
- let t = localStorage.getItem(P(e));
112
+ let t = localStorage.getItem(F(e));
105
113
  if (t === null || t === "") return null;
106
114
  let n = parseInt(t, 10);
107
115
  return Number.isNaN(n) ? null : n;
@@ -109,42 +117,42 @@ function F(e) {
109
117
  return null;
110
118
  }
111
119
  }
112
- function I(e, t) {
120
+ function L(e, t) {
113
121
  if (!(!e || !Number.isFinite(t))) try {
114
- localStorage.setItem(P(e), String(Math.round(t)));
122
+ localStorage.setItem(F(e), String(Math.round(t)));
115
123
  } catch {}
116
124
  }
117
125
  //#endregion
118
126
  //#region src/components/Gantt/hooks/useGanttLayout.ts
119
- var L = (e) => e > 0 ? e / 3 : 333, R = (e, t) => {
127
+ var R = (e) => e > 0 ? e / 3 : 333, z = (e, t) => {
120
128
  if (!t) return e;
121
129
  let n = Math.max(200, t - 300);
122
130
  return Math.min(Math.max(e, 200), n);
123
131
  };
124
- function z({ id: e } = {}) {
125
- let t = T(null), n = k(t), [r, i] = E(300), a = T(!1), o = n?.width || t.current?.offsetWidth || 0;
126
- return C(() => {
127
- !o || a.current || (i(R((e ? F(e) : null) ?? L(o), o)), a.current = !0);
128
- }, [o, e]), C(() => {
132
+ function B({ id: e } = {}) {
133
+ let t = O(null), n = j(t), [r, i] = k(300), a = O(!1), o = n?.width || t.current?.offsetWidth || 0;
134
+ return E(() => {
135
+ !o || a.current || (i(z((e ? I(e) : null) ?? R(o), o)), a.current = !0);
136
+ }, [o, e]), E(() => {
129
137
  a.current = !1;
130
138
  }, [e]), {
131
139
  containerRef: t,
132
- resolvedTableWidth: w(() => o ? R(r, o) : r, [o, r]),
133
- handleTableWidthChange: S((e) => {
140
+ resolvedTableWidth: D(() => o ? z(r, o) : r, [o, r]),
141
+ handleTableWidthChange: T((e) => {
134
142
  i(e);
135
143
  }, []),
136
- handleResizeEnd: S((t) => {
137
- e && I(e, o ? R(t, o) : t);
144
+ handleResizeEnd: T((t) => {
145
+ e && L(e, o ? z(t, o) : t);
138
146
  }, [e, o])
139
147
  };
140
148
  }
141
149
  //#endregion
142
150
  //#region src/components/Gantt/hooks/useGanttCollapseState.ts
143
- function B({ collapsedKeys: e, onToggleCollapse: t } = {}) {
144
- let [n, r] = E(() => /* @__PURE__ */ new Set()), i = e !== void 0;
151
+ function V({ collapsedKeys: e, onToggleCollapse: t } = {}) {
152
+ let [n, r] = k(() => /* @__PURE__ */ new Set()), i = e !== void 0;
145
153
  return {
146
154
  collapsedKeys: i ? e : n,
147
- onToggleCollapse: S((e) => {
155
+ onToggleCollapse: T((e) => {
148
156
  e && (t?.(e), i || r((t) => h(t, e)));
149
157
  }, [i, t]),
150
158
  isControlled: i
@@ -152,21 +160,21 @@ function B({ collapsedKeys: e, onToggleCollapse: t } = {}) {
152
160
  }
153
161
  //#endregion
154
162
  //#region src/components/Gantt/hooks/useLinkedVerticalScroll.ts
155
- function V(e = {}) {
156
- let { onScrollActivity: t } = e, n = T(t);
163
+ function H(e = {}) {
164
+ let { onScrollActivity: t } = e, n = O(t);
157
165
  n.current = t;
158
- let r = T(null), i = T(null), a = T(null), o = S((e) => (i.current = e, () => {
166
+ let r = O(null), i = O(null), a = O(null), o = T((e) => (i.current = e, () => {
159
167
  i.current = null;
160
- }), []), s = S((e) => (a.current = e, () => {
168
+ }), []), s = T((e) => (a.current = e, () => {
161
169
  a.current = null;
162
- }), []), c = S((e, t) => {
170
+ }), []), c = T((e, t) => {
163
171
  if (r.current === e) return;
164
172
  let o = e === "timeline" ? "table" : "timeline", s = o === "timeline" ? i.current : a.current;
165
173
  s?.setScrollTop && (r.current = o, s.setScrollTop(t), n.current?.(), requestAnimationFrame(() => {
166
174
  r.current === o && (r.current = null);
167
175
  }));
168
176
  }, []);
169
- return w(() => ({
177
+ return D(() => ({
170
178
  registerTimelineScroller: o,
171
179
  registerTableScroller: s,
172
180
  sync: c
@@ -178,7 +186,7 @@ function V(e = {}) {
178
186
  }
179
187
  //#endregion
180
188
  //#region src/components/Gantt/utils/filterItemsByCollapse.ts
181
- function H(e, t) {
189
+ function U(e, t) {
182
190
  if (!Array.isArray(e) || e.length === 0) return e || [];
183
191
  if (!t || !(t instanceof Set ? t.size > 0 : Array.isArray(t) && t.length > 0)) return e;
184
192
  let n = [], r = null;
@@ -195,12 +203,12 @@ function H(e, t) {
195
203
  }
196
204
  //#endregion
197
205
  //#region src/components/Gantt/GanttTable/hooks/useGanttTableHighlightDomSync.ts
198
- function U(e) {
199
- let t = A(c, (e) => e.getHighlightTarget), n = A(c, (e) => e.subscribeHighlight), r = T(null), i = S((e, t) => {
206
+ function W(e) {
207
+ let t = M(c, (e) => e.getHighlightTarget), n = M(c, (e) => e.subscribeHighlight), r = O(null), i = T((e, t) => {
200
208
  if (!e || !t?.id || !t?.type) return [];
201
209
  let n = CSS.escape(String(t.id)), r = CSS.escape(String(t.type));
202
210
  return Array.from(e.querySelectorAll(`[data-highlight-id="${n}"][data-highlight-type="${r}"]`));
203
- }, []), a = S((t, n) => {
211
+ }, []), a = T((t, n) => {
204
212
  if (l(t, n)) return;
205
213
  let r = e.current;
206
214
  r && (t?.id && i(r, t).forEach((e) => {
@@ -209,7 +217,7 @@ function U(e) {
209
217
  e.classList.add("table-row-hover");
210
218
  }));
211
219
  }, [i, e]);
212
- C(() => {
220
+ E(() => {
213
221
  let e = t?.() || null;
214
222
  return r.current = e, a(null, e), n?.((e) => {
215
223
  let t = r.current;
@@ -223,8 +231,8 @@ function U(e) {
223
231
  }
224
232
  //#endregion
225
233
  //#region src/components/Gantt/GanttTable/hooks/useGanttTableLinkedScroll.ts
226
- function W({ tableRef: e, verticalScrollController: t, dataLength: n }) {
227
- C(() => {
234
+ function G({ tableRef: e, verticalScrollController: t, dataLength: n }) {
235
+ E(() => {
228
236
  if (!t || !e.current) return;
229
237
  let n = e.current.querySelector(".custom-table-wrapper");
230
238
  if (n) return t.registerTableScroller({ setScrollTop: (e) => {
@@ -234,7 +242,7 @@ function W({ tableRef: e, verticalScrollController: t, dataLength: n }) {
234
242
  t,
235
243
  n,
236
244
  e
237
- ]), O("scroll", () => {
245
+ ]), A("scroll", () => {
238
246
  let n = e.current?.querySelector(".custom-table-wrapper");
239
247
  n && t && t.sync("table", n.scrollTop);
240
248
  }, {
@@ -242,115 +250,139 @@ function W({ tableRef: e, verticalScrollController: t, dataLength: n }) {
242
250
  passive: !0
243
251
  });
244
252
  }
245
- //#endregion
246
- //#region src/components/Gantt/internal/GanttTableShell.tsx
247
- var G = x(function({ width: e, verticalScrollController: t, dataLength: n = 0, emptyOverlay: r = null, children: i }, a) {
248
- let o = T(null), s = S((e) => {
253
+ var K = {
254
+ root: "_root_1rdh6_1",
255
+ emptyOverlay: "_emptyOverlay_1rdh6_25",
256
+ emptyOverlayInner: "_emptyOverlayInner_1rdh6_37"
257
+ }, q = w(function({ width: e, verticalScrollController: t, dataLength: n = 0, emptyOverlay: r = null, children: i }, a) {
258
+ let o = O(null), s = T((e) => {
249
259
  o.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
250
260
  }, [a]);
251
- return U(o), W({
261
+ return W(o), G({
252
262
  tableRef: o,
253
263
  verticalScrollController: t,
254
264
  dataLength: n
255
- }), /* @__PURE__ */ b("div", {
265
+ }), /* @__PURE__ */ C("div", {
256
266
  ref: s,
257
- className: "bsy-gantt-table",
267
+ className: K.root,
268
+ "data-testid": "gantt-table",
258
269
  style: { width: e ? `${e}px` : void 0 },
259
- children: [i, r ? /* @__PURE__ */ y("div", {
260
- className: "bsy-gantt-table__empty-overlay",
270
+ children: [i, r ? /* @__PURE__ */ S("div", {
271
+ className: K.emptyOverlay,
261
272
  style: { top: 68 },
262
- children: /* @__PURE__ */ y("div", {
263
- className: "bsy-gantt-table__empty-overlay-inner",
273
+ children: /* @__PURE__ */ S("div", {
274
+ className: K.emptyOverlayInner,
264
275
  children: r
265
276
  })
266
277
  }) : null]
267
278
  });
268
279
  });
269
- G.displayName = "GanttTableShell";
280
+ q.displayName = "GanttTableShell";
270
281
  //#endregion
271
282
  //#region src/components/Gantt/internal/GanttLayout.tsx
272
- function K({ data: e = [], tableData: t, columns: n, mode: r, availableModes: i, onModeChange: a, id: o, onRowClick: l, onTaskTimeChange: u, tooltip: d, className: f, style: p, renderTable: m, collapsedKeys: h, onToggleCollapse: g, emptyOverlay: _ = null }, x) {
273
- let { highlightContextValue: C, setTableHighlightTarget: T, notifyScrollActivity: O } = N(), k = V({ onScrollActivity: O }), [A, M] = E("day"), P = r ?? A, { containerRef: F, resolvedTableWidth: I, handleTableWidthChange: L, handleResizeEnd: R } = z({ id: o }), U = S((e) => {
274
- r === void 0 && M(e), a?.(e);
275
- }, [r, a]), { collapsedKeys: W, onToggleCollapse: K, isControlled: q } = B({
283
+ function J({ data: e = [], tableData: t, columns: n, mode: r, availableModes: i, onModeChange: a, id: o, onRowClick: l, onTaskTimeChange: u, tooltip: d, className: f, style: p, renderTable: m, collapsedKeys: h, onToggleCollapse: g, emptyOverlay: _ = null, theme: b }, w) {
284
+ let { highlightContextValue: E, setTableHighlightTarget: O, notifyScrollActivity: A } = ie(), j = H({ onScrollActivity: A }), [M, P] = k("day"), F = r ?? M, { containerRef: I, resolvedTableWidth: L, handleTableWidthChange: R, handleResizeEnd: z } = B({ id: o }), W = T((e) => {
285
+ r === void 0 && P(e), a?.(e);
286
+ }, [r, a]), { collapsedKeys: G, onToggleCollapse: K, isControlled: J } = V({
276
287
  collapsedKeys: h,
277
288
  onToggleCollapse: g
278
- }), J = w(() => q ? e : H(e, W), [
289
+ }), Y = D(() => J ? e : U(e, G), [
279
290
  e,
280
- q,
281
- W
282
- ]), Y = typeof m == "function", X = w(() => Y ? t ?? [] : J, [
283
- Y,
291
+ J,
292
+ G
293
+ ]), X = typeof m == "function", Z = D(() => X ? t ?? [] : Y, [
294
+ X,
284
295
  t,
285
- J
286
- ]), Z = X.length, Q = w(() => ({
296
+ Y
297
+ ]), ae = Z.length, { resolvedTheme: oe, themeStyle: Q, tableTheme: $ } = D(() => {
298
+ let e = y(b);
299
+ return {
300
+ resolvedTheme: e,
301
+ themeStyle: e ? te(e) : {},
302
+ tableTheme: x(e)
303
+ };
304
+ }, [b]), se = D(() => X ? m({
287
305
  columns: n,
288
- tableData: X,
289
- setHighlightTarget: T,
306
+ tableData: Z,
307
+ setHighlightTarget: O,
290
308
  rowHeight: 34,
291
- collapsedKeys: W ?? void 0,
292
- onToggleCollapse: K
293
- }), [
294
- n,
295
- X,
296
- T,
297
- W,
298
- K
299
- ]), $ = Y ? m(Q) : /* @__PURE__ */ y(s, {
300
- data: J,
309
+ collapsedKeys: G ?? void 0,
310
+ onToggleCollapse: K,
311
+ tableTheme: $
312
+ }) : /* @__PURE__ */ S(s, {
313
+ data: Y,
301
314
  columns: n,
302
315
  onRowClick: l,
303
- rowHeight: 34
304
- });
305
- return /* @__PURE__ */ y(c.Provider, {
306
- value: C,
307
- children: /* @__PURE__ */ y("div", {
308
- className: D("bsy-gantt", f),
309
- style: p,
310
- children: /* @__PURE__ */ b("div", {
311
- ref: F,
312
- className: "bsy-gantt__body",
313
- children: [
314
- /* @__PURE__ */ y(G, {
315
- ref: x,
316
- width: I,
317
- verticalScrollController: k,
318
- dataLength: Z,
319
- emptyOverlay: _,
320
- children: $
321
- }),
322
- /* @__PURE__ */ y(j, {
323
- tableWidth: I,
324
- onWidthChange: L,
325
- onResizeEnd: R,
326
- containerRef: F
327
- }),
328
- /* @__PURE__ */ y("div", {
329
- className: "bsy-gantt__chart",
330
- children: /* @__PURE__ */ y(v, {
331
- items: J,
332
- viewMode: P,
333
- availableModes: i,
334
- onViewModeChange: U,
335
- verticalScrollController: k,
336
- onRowClick: l,
337
- onTaskTimeChange: u,
338
- tooltip: d,
339
- collapsedKeys: W,
340
- onToggleCollapse: K
316
+ rowHeight: 34,
317
+ tableTheme: $
318
+ }), [
319
+ X,
320
+ m,
321
+ n,
322
+ Z,
323
+ O,
324
+ G,
325
+ K,
326
+ $,
327
+ Y,
328
+ l
329
+ ]), ce = D(() => ({
330
+ ...Q,
331
+ ...p
332
+ }), [Q, p]);
333
+ return /* @__PURE__ */ S(ee, {
334
+ value: oe,
335
+ children: /* @__PURE__ */ S(c.Provider, {
336
+ value: E,
337
+ children: /* @__PURE__ */ S("div", {
338
+ className: ne(N.root, f),
339
+ "data-testid": "gantt-root",
340
+ style: ce,
341
+ children: /* @__PURE__ */ C("div", {
342
+ ref: I,
343
+ className: N.body,
344
+ children: [
345
+ /* @__PURE__ */ S(q, {
346
+ ref: w,
347
+ width: L,
348
+ verticalScrollController: j,
349
+ dataLength: ae,
350
+ emptyOverlay: _,
351
+ children: se
352
+ }),
353
+ /* @__PURE__ */ S(re, {
354
+ tableWidth: L,
355
+ onWidthChange: R,
356
+ onResizeEnd: z,
357
+ containerRef: I
358
+ }),
359
+ /* @__PURE__ */ S("div", {
360
+ className: N.chartSlot,
361
+ children: /* @__PURE__ */ S(v, {
362
+ items: Y,
363
+ viewMode: F,
364
+ availableModes: i,
365
+ onViewModeChange: W,
366
+ verticalScrollController: j,
367
+ onRowClick: l,
368
+ onTaskTimeChange: u,
369
+ tooltip: d,
370
+ collapsedKeys: G,
371
+ onToggleCollapse: K
372
+ })
341
373
  })
342
- })
343
- ]
374
+ ]
375
+ })
344
376
  })
345
377
  })
346
378
  });
347
379
  }
348
- var q = x(K);
380
+ var Y = w(J);
349
381
  //#endregion
350
382
  //#region src/components/Gantt/Gantt.tsx
351
- function J({ data: e, columns: t, mode: n, availableModes: r, onModeChange: i, id: a, onRowClick: o, onTaskTimeChange: s, tooltip: c, className: l, style: u, tableData: d, renderTable: f, collapsedKeys: p, onToggleCollapse: m, emptyOverlay: h }, g) {
352
- return /* @__PURE__ */ y(q, {
353
- ref: g,
383
+ function X({ data: e, columns: t, mode: n, availableModes: r, onModeChange: i, id: a, onRowClick: o, onTaskTimeChange: s, tooltip: c, className: l, style: u, tableData: d, renderTable: f, collapsedKeys: p, onToggleCollapse: m, emptyOverlay: h, theme: g }, _) {
384
+ return /* @__PURE__ */ S(Y, {
385
+ ref: _,
354
386
  data: e,
355
387
  columns: t,
356
388
  mode: n,
@@ -366,9 +398,10 @@ function J({ data: e, columns: t, mode: n, availableModes: r, onModeChange: i, i
366
398
  renderTable: f,
367
399
  collapsedKeys: p,
368
400
  onToggleCollapse: m,
369
- emptyOverlay: h
401
+ emptyOverlay: h,
402
+ theme: g
370
403
  });
371
404
  }
372
- var Y = x(J);
405
+ var Z = w(X);
373
406
  //#endregion
374
- export { f as ALL_GANTT_MODES, m as CALENDAR_TIER_MODES, d as DEFAULT_GANTT_MODE, n as DRAG_MODE_MOVE, e as DRAG_MODE_RESIZE_END, i as DRAG_MODE_RESIZE_START, a as EMPTY_GROUP_VALUE, t as GANTT_DEFAULT_ROW_HEIGHT, r as GANTT_TABLE_HEADER_ROW_SPAN, Y as default, _ as isGroupCollapsed, u as isHighlightMatch, p as isSubDayViewMode, g as normalizeTaskDateRange, o as useGanttTableColumnResize };
407
+ export { f as ALL_GANTT_MODES, m as CALENDAR_TIER_MODES, d as DEFAULT_GANTT_MODE, n as DRAG_MODE_MOVE, e as DRAG_MODE_RESIZE_END, i as DRAG_MODE_RESIZE_START, a as EMPTY_GROUP_VALUE, t as GANTT_DEFAULT_ROW_HEIGHT, r as GANTT_TABLE_HEADER_ROW_SPAN, Z as default, _ as isGroupCollapsed, u as isHighlightMatch, p as isSubDayViewMode, g as normalizeTaskDateRange, y as resolveGanttTheme, b as resolveGanttThemeVars, x as resolveTableThemeFromGantt, o as useGanttTableColumnResize };
@@ -0,0 +1,31 @@
1
+ import { t as e } from "../vendors/cssVars-DoQgQ2CM.js";
2
+ import t from "tinycolor2";
3
+ //#region src/components/Gantt/utils/theme/resolveGanttTheme.ts
4
+ var n = "#0265ff", r = "#121111", i = "#fff", a = (e) => {
5
+ if (!e) return;
6
+ let a = e.colorPrimary ?? n, o = t(a), s = (e) => o.isValid() ? o.clone().setAlpha(e).toRgbString() : void 0, c = { ...e };
7
+ c.todayLineColor === void 0 && (c.todayLineColor = s(.2)), c.toolbarTodayHoverBg === void 0 && (c.toolbarTodayHoverBg = s(.1));
8
+ let l = e.colorText ?? r, u = {
9
+ colorBgContainer: e.toolbarBg ?? e.colorBgContainer ?? i,
10
+ colorText: l,
11
+ itemActiveBg: a,
12
+ itemActiveColor: l,
13
+ itemHoverBg: s(.3)
14
+ };
15
+ return c.dropdownTheme = e.dropdownTheme === void 0 ? u : {
16
+ ...u,
17
+ ...e.dropdownTheme
18
+ }, c;
19
+ }, o = (t) => {
20
+ let n = {};
21
+ return e(n, "--bsy-gantt-color-text", t.colorText), e(n, "--bsy-gantt-color-text-secondary", t.colorTextSecondary), e(n, "--bsy-gantt-color-split", t.colorSplit), e(n, "--bsy-gantt-color-border", t.colorBorder), e(n, "--bsy-gantt-color-primary", t.colorPrimary), e(n, "--bsy-gantt-color-bg-container", t.colorBgContainer), e(n, "--bsy-gantt-color-bg-weekend", t.colorBgWeekend), e(n, "--bsy-gantt-color-bg-row-hover", t.colorBgRowHover), e(n, "--bsy-gantt-color-today-line", t.todayLineColor), e(n, "--bsy-gantt-toolbar-today-hover-bg", t.toolbarTodayHoverBg), e(n, "--bsy-gantt-toolbar-icon-color", t.toolbarIconColor), e(n, "--bsy-gantt-toolbar-icon-hover-color", t.toolbarIconHoverColor), e(n, "--bsy-gantt-arrow-bg", t.arrowBg), e(n, "--bsy-gantt-toolbar-bg", t.toolbarBg), n;
22
+ }, s = (e) => {
23
+ let t = a(e);
24
+ return t ? o(t) : {};
25
+ }, c = (e) => e.colorBorder !== void 0 || e.colorBgContainer !== void 0 || e.colorText !== void 0 || e.colorBgRowHover !== void 0, l = (e) => {
26
+ if (!e || !c(e)) return;
27
+ let t = {};
28
+ return e.colorBorder !== void 0 && (t.colorBorder = e.colorBorder), e.colorBgContainer !== void 0 && (t.colorBgContainer = e.colorBgContainer, t.colorBgHeader = e.colorBgContainer), e.colorText !== void 0 && (t.colorText = e.colorText, t.colorTextHeading = e.colorText), e.colorBgRowHover !== void 0 && (t.colorBgRowHover = e.colorBgRowHover), t;
29
+ };
30
+ //#endregion
31
+ export { a as i, o as n, s as r, l as t };
@@ -1,4 +1,4 @@
1
- import { m as e } from "./constants-D4ur8WRs.js";
1
+ import { m as e } from "./constants-CrBb5i5p.js";
2
2
  //#region src/components/Gantt/interface.ts
3
3
  var t = [
4
4
  "day",
@@ -1,6 +1,6 @@
1
- import { a as e, c as t, d as n, i as r, l as i, o as a, p as o, s, u as c } from "../constants-D4ur8WRs.js";
2
- import { a as l, i as u, n as d, o as f, r as p, t as m } from "../columnResize-By_1E48E.js";
3
- import { n as h, r as g, t as _ } from "../highlightTarget-DmzCIiQb.js";
4
- import { c as v, o as y, r as b, s as x } from "../timelineViewConfig-BXl2UkN8.js";
5
- import { n as S, r as C, t as w } from "../collapseKeys-C8139wvy.js";
1
+ import { a as e, c as t, d as n, i as r, l as i, o as a, p as o, s, u as c } from "../constants-CrBb5i5p.js";
2
+ import { a as l, i as u, n as d, o as f, r as p, t as m } from "../columnResize-DFe7F98O.js";
3
+ import { n as h, r as g, t as _ } from "../highlightTarget-DtCe7zto.js";
4
+ import { c as v, o as y, r as b, s as x } from "../timelineViewConfig-Dl3AXO45.js";
5
+ import { n as S, r as C, t as w } from "../collapseKeys-1N9ci2oJ.js";
6
6
  export { y as ALL_GANTT_MODES, x as CALENDAR_TIER_MODES, v as DEFAULT_GANTT_MODE, u as DEFAULT_TABLE_WIDTH_FALLBACK, r as DRAG_MODE_MOVE, e as DRAG_MODE_RESIZE_END, a as DRAG_MODE_RESIZE_START, s as EMPTY_GROUP_VALUE, t as GANTT_DEFAULT_ROW_HEIGHT, m as GANTT_TABLE_DISABLED_RESIZE_COLUMNS, i as GANTT_TABLE_HEADER_ROW_SPAN, c as HEADER_BOTTOM_HEIGHT, n as HEADER_TOP_HEIGHT, l as MIN_CHART_WIDTH, o as MIN_TABLE_WIDTH, f as TABLE_WIDTH_PLACEHOLDER, w as isGroupCollapsed, _ as isHighlightMatch, h as isSameHighlightTarget, b as isSubDayViewMode, d as mergeColumnWidths, C as normalizeTaskDateRange, g as resolveChartHighlightTarget, S as toggleCollapsedKey, p as useGanttTableColumnResize };
@@ -0,0 +1,2 @@
1
+ import { i as e, n as t, r as n, t as r } from "../../theme-C197Dtjy.js";
2
+ export { t as mapGanttThemeToCssVars, e as resolveGanttTheme, n as resolveGanttThemeVars, r as resolveTableThemeFromGantt };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./Icon-BQ3Whub2.js";
1
+ import { t as e } from "./Icon-SQ5tu-yG.js";
2
2
  export { e as default };