@baishuyun/ui-base 6.4.0 → 6.4.2

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 (67) hide show
  1. package/dist/Amap/AmapProvider/index.js +2 -2
  2. package/dist/Amap/{AmapProvider-By5tTMAj.js → AmapProvider-CwKdpmCg.js} +1 -1
  3. package/dist/Amap/index.js +2 -2
  4. package/dist/Calendar/{AllDaySection-DwQz-p7a.js → AllDaySection-CseF1DuB.js} +1 -1
  5. package/dist/Calendar/{Calendar-CuBzeTkR.js → Calendar-Yu2HfA5D.js} +4 -3
  6. package/dist/Calendar/{EventCard-DRJrT_AG.js → EventCard-L6jaKgEw.js} +1 -0
  7. package/dist/Calendar/index.js +4 -4
  8. package/dist/Calendar/subcomponents/AllDaySection/index.js +2 -2
  9. package/dist/Calendar/subcomponents/EventCard/index.js +1 -1
  10. package/dist/ConfigProvider/index.js +1 -1
  11. package/dist/DatePicker/{DatePicker-B6ZFxTt6.js → DatePicker-PCdNachD.js} +44 -43
  12. package/dist/DatePicker/index.js +1 -1
  13. package/dist/DropDown/{DropDown-C5H9UObs.js → DropDown-CvQAbsEo.js} +8 -8
  14. package/dist/DropDown/index.js +1 -1
  15. package/dist/Editor/{Buttons-B8_yDqF5.js → Buttons-DmSUkHWl.js} +2 -2
  16. package/dist/Editor/ToolbarPlugin/Buttons/index.js +3 -3
  17. package/dist/Editor/index.js +3 -3
  18. package/dist/Gantt/GanttChart/index.js +6 -6
  19. package/dist/Gantt/GanttChart-BgDJOyW1.js +2144 -0
  20. package/dist/Gantt/GanttTable/index.js +3 -3
  21. package/dist/Gantt/{GanttTable-DSTq5XmX.js → GanttTable-Di_p-0M1.js} +2 -2
  22. package/dist/Gantt/GanttToolBar/index.js +4 -4
  23. package/dist/Gantt/GanttToolBar-D5pQdrzv.js +105 -0
  24. package/dist/Gantt/{collapseKeys-BWMH5k37.js → collapseKeys-C8139wvy.js} +34 -30
  25. package/dist/Gantt/{constants-_vMvDXFh.js → constants-D4ur8WRs.js} +16 -17
  26. package/dist/Gantt/index.js +8 -8
  27. package/dist/Gantt/{timelineViewConfig-DshzoBp7.js → timelineViewConfig-BXl2UkN8.js} +1 -1
  28. package/dist/Gantt/utils/index.js +4 -4
  29. package/dist/Modal/{Modal-CrK8gFOn.js → Modal-D3LFqIV4.js} +3 -3
  30. package/dist/Modal/index.js +1 -1
  31. package/dist/Select/{Select-Gkywa_sm.js → Select-OjCjCogR.js} +4 -4
  32. package/dist/Select/index.js +2 -2
  33. package/dist/Table/{Table-DVTq4n2V.js → Table-3-kFIm5v.js} +3 -4
  34. package/dist/Table/index.js +1 -1
  35. package/dist/Tree/index.js +1 -1
  36. package/dist/components/DatePicker/__tests__/DatePicker.triggerActiveClassName.test.d.ts +1 -0
  37. package/dist/components/DatePicker/interface.d.ts +2 -0
  38. package/dist/components/Gantt/GanttChart/GanttTaskBar/GanttTaskBar.d.ts +1 -1
  39. package/dist/components/Gantt/GanttChart/GanttTaskBar/useTaskBarPointer.d.ts +2 -2
  40. package/dist/components/Gantt/GanttChart/OffscreenTaskIndicators/__tests__/OffscreenTaskIndicators.test.d.ts +1 -0
  41. package/dist/components/Gantt/GanttChart/hooks/__tests__/useGanttDrag.clippedQuarterMonth.test.d.ts +0 -0
  42. package/dist/components/Gantt/GanttChart/hooks/__tests__/useOffscreenIndicators.test.d.ts +1 -0
  43. package/dist/components/Gantt/GanttChart/hooks/__tests__/useTimelineViewportController.test.d.ts +0 -0
  44. package/dist/components/Gantt/GanttChart/hooks/useEdgeScroll.d.ts +1 -2
  45. package/dist/components/Gantt/GanttChart/hooks/useGanttDrag.d.ts +3 -3
  46. package/dist/components/Gantt/GanttChart/hooks/useGanttScrollbars.d.ts +1 -1
  47. package/dist/components/Gantt/GanttChart/hooks/useOffscreenIndicators.d.ts +6 -6
  48. package/dist/components/Gantt/GanttChart/hooks/useTimelineViewportController.d.ts +4 -2
  49. package/dist/components/Gantt/GanttChart/utils/__tests__/timelineMarkers.test.d.ts +1 -0
  50. package/dist/components/Gantt/GanttChart/utils/__tests__/timelineRange.test.d.ts +1 -0
  51. package/dist/components/Gantt/GanttChart/utils/__tests__/timelineViewportEngine.test.d.ts +1 -0
  52. package/dist/components/Gantt/GanttChart/utils/constants.d.ts +26 -17
  53. package/dist/components/Gantt/GanttChart/utils/dragEngine.d.ts +2 -0
  54. package/dist/components/Gantt/GanttChart/utils/quarterMonthScale.d.ts +1 -0
  55. package/dist/components/Gantt/GanttChart/utils/timelineFocus.d.ts +0 -34
  56. package/dist/components/Gantt/GanttChart/utils/timelineMarkers.d.ts +2 -1
  57. package/dist/components/Gantt/GanttChart/utils/timelineRange.d.ts +8 -0
  58. package/dist/components/Gantt/GanttChart/utils/timelineViewportEngine.d.ts +44 -0
  59. package/dist/components/Gantt/__tests__/GanttBars.renderWindow.test.d.ts +1 -0
  60. package/dist/components/Gantt/types.internal.d.ts +22 -8
  61. package/dist/index.js +11 -11
  62. package/dist/style.css +1 -1
  63. package/dist/vendors/{ConfigProvider-BRfJ7gWc.js → ConfigProvider-DwmA94S2.js} +5 -0
  64. package/dist/vendors/{Tree-DJpkMB5u.js → Tree-C7BgkjCQ.js} +1 -1
  65. package/package.json +1 -1
  66. package/dist/Gantt/GanttChart-DpmbH0GI.js +0 -1965
  67. package/dist/Gantt/GanttToolBar-fCAi-4zZ.js +0 -91
@@ -1,10 +1,10 @@
1
1
  import "../../vendors/LocaleContext-BJdHS0sH.js";
2
2
  import "../../vendors/useLocale-BTz4slNW.js";
3
3
  import "../../Table/processRowspan-BCzfI5un.js";
4
- import "../../Table/Table-DVTq4n2V.js";
4
+ import "../../Table/Table-3-kFIm5v.js";
5
5
  import "../../Table/hooks-CJ2CnSep.js";
6
- import "../constants-_vMvDXFh.js";
6
+ import "../constants-D4ur8WRs.js";
7
7
  import "../columnResize-By_1E48E.js";
8
- import { t as e } from "../GanttTable-DSTq5XmX.js";
8
+ import { t as e } from "../GanttTable-Di_p-0M1.js";
9
9
  import "../GanttHighlightContext-AIpN3-af.js";
10
10
  export { e as default };
@@ -1,5 +1,5 @@
1
- import { t as e } from "../Table/Table-DVTq4n2V.js";
2
- import { l as t } from "./constants-_vMvDXFh.js";
1
+ import { t as e } from "../Table/Table-3-kFIm5v.js";
2
+ import { l as t } from "./constants-D4ur8WRs.js";
3
3
  import { r as n } from "./columnResize-By_1E48E.js";
4
4
  import { t as r } from "./GanttHighlightContext-AIpN3-af.js";
5
5
  import { r as i } from "./highlightTarget-DmzCIiQb.js";
@@ -4,8 +4,8 @@ import "../../vendors/useLocale-BTz4slNW.js";
4
4
  import "../../Select/SelectInputSearch-DXPTGSc2.js";
5
5
  import "../../NotFoundContent/NotFoundContent-7xV-zOG2.js";
6
6
  import "../../vendors/useFloatingPortal-DsEtsAGW.js";
7
- import "../../DropDown/DropDown-C5H9UObs.js";
8
- import "../constants-_vMvDXFh.js";
9
- import "../timelineViewConfig-DshzoBp7.js";
10
- import { t as e } from "../GanttToolBar-fCAi-4zZ.js";
7
+ import "../../DropDown/DropDown-CvQAbsEo.js";
8
+ import "../constants-D4ur8WRs.js";
9
+ import "../timelineViewConfig-BXl2UkN8.js";
10
+ import { t as e } from "../GanttToolBar-D5pQdrzv.js";
11
11
  export { e as default };
@@ -0,0 +1,105 @@
1
+ import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
+ import { t } from "../vendors/useLocale-BTz4slNW.js";
3
+ import { t as n } from "../DropDown/DropDown-CvQAbsEo.js";
4
+ import { l as r } from "./timelineViewConfig-BXl2UkN8.js";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { useCallback as o, useMemo as s, useRef as c, useState as l } from "react";
7
+ import u from "clsx";
8
+ //#region src/components/Gantt/utils/localeKey.ts
9
+ var d = (e) => e.startsWith("gantt.") ? e : `gantt.${e}`, f = ".bsy-form-view-data-manager", p = {
10
+ oneMinute: "mode.oneMinute",
11
+ tenMinute: "mode.tenMinute",
12
+ halfHour: "mode.halfHour",
13
+ hour: "mode.hour",
14
+ sixHour: "mode.sixHour",
15
+ halfDay: "mode.halfDay",
16
+ day: "mode.day",
17
+ week: "mode.week",
18
+ month: "mode.month",
19
+ quarter: "mode.quarter",
20
+ quarterMonth: "mode.quarterMonth",
21
+ year: "mode.year"
22
+ }, m = ({ viewMode: m = "day", availableModes: h, onViewModeChange: g, onTodayClick: _, onScrollPrev: v, onScrollNext: y, className: b = "" }) => {
23
+ let { t: x } = t(), S = o((e) => x(d(p[e])), [x]), C = `bsy-gantt-toolbar ${b}`.trim(), w = c(null), [T, E] = l(!1), D = o(() => {
24
+ let e = w.current;
25
+ if (!e) return document.body;
26
+ let t = e.closest(f);
27
+ return t instanceof HTMLElement ? t : document.body;
28
+ }, []), O = s(() => {
29
+ let e = new Set(h ?? r);
30
+ return r.filter((t) => e.has(t)).map((e) => ({
31
+ key: e,
32
+ label: S(e)
33
+ }));
34
+ }, [h, S]), k = s(() => O.find((e) => e.key === m)?.label ?? m, [O, m]), A = o((e) => {
35
+ e?.key && e.key !== m && g?.(e.key);
36
+ }, [g, m]);
37
+ return /* @__PURE__ */ a("div", {
38
+ className: C,
39
+ ref: w,
40
+ children: [
41
+ /* @__PURE__ */ i(n, {
42
+ menus: O,
43
+ activeKey: [m],
44
+ showSearch: !1,
45
+ visible: T,
46
+ onOpenChange: E,
47
+ offset: {
48
+ x: 0,
49
+ y: 4
50
+ },
51
+ zIndex: 10001,
52
+ getPopupContainer: D,
53
+ onClick: A,
54
+ style: {
55
+ width: 100,
56
+ minWidth: 100
57
+ },
58
+ children: /* @__PURE__ */ a("button", {
59
+ type: "button",
60
+ className: u("bsy-gantt-toolbar__mode-trigger", { "bsy-gantt-toolbar__mode-trigger--active": T }),
61
+ "aria-haspopup": "listbox",
62
+ "aria-expanded": T,
63
+ children: [/* @__PURE__ */ i("span", {
64
+ className: "bsy-gantt-toolbar__mode-trigger-label",
65
+ children: k
66
+ }), /* @__PURE__ */ i(e, {
67
+ name: "arrow-down",
68
+ size: 16
69
+ })]
70
+ })
71
+ }),
72
+ /* @__PURE__ */ i("span", { className: "bsy-gantt-toolbar__divider" }),
73
+ /* @__PURE__ */ i("button", {
74
+ type: "button",
75
+ className: "bsy-gantt-toolbar__today-btn",
76
+ onClick: _,
77
+ children: x("gantt.today")
78
+ }),
79
+ /* @__PURE__ */ a("div", {
80
+ className: "bsy-gantt-toolbar__scroll-btns",
81
+ children: [/* @__PURE__ */ i("button", {
82
+ type: "button",
83
+ className: "bsy-gantt-toolbar__icon-btn bsy-gantt-toolbar__icon-btn--left",
84
+ "aria-label": x("gantt.aria.scrollPrev"),
85
+ onClick: v,
86
+ children: /* @__PURE__ */ i(e, {
87
+ name: "Pulldownleft",
88
+ size: 16
89
+ })
90
+ }), /* @__PURE__ */ i("button", {
91
+ type: "button",
92
+ className: "bsy-gantt-toolbar__icon-btn bsy-gantt-toolbar__icon-btn--right",
93
+ "aria-label": x("gantt.aria.scrollNext"),
94
+ onClick: y,
95
+ children: /* @__PURE__ */ i(e, {
96
+ name: "Pulldownright",
97
+ size: 16
98
+ })
99
+ })]
100
+ })
101
+ ]
102
+ });
103
+ };
104
+ //#endregion
105
+ export { d as n, m as t };
@@ -1,5 +1,5 @@
1
- import { h as e, n as t, r as n, t as r } from "./constants-_vMvDXFh.js";
2
- import { n as i, r as a, t as o } from "./timelineViewConfig-DshzoBp7.js";
1
+ import { m as e, n as t, r as n, t as r } from "./constants-D4ur8WRs.js";
2
+ import { n as i, r as a, t as o } from "./timelineViewConfig-BXl2UkN8.js";
3
3
  import { isString as s } from "lodash-es";
4
4
  import c from "dayjs";
5
5
  import l from "dayjs/plugin/isoWeek";
@@ -15,13 +15,17 @@ var d = () => -(/* @__PURE__ */ new Date()).getTimezoneOffset() / 60, f = () =>
15
15
  //#endregion
16
16
  //#region src/components/Gantt/GanttChart/utils/quarterMonthScale.ts
17
17
  c.extend(u);
18
- var x = o("quarterMonth").bottomCellWidthPx, S = (e, t) => {
18
+ var x = o("quarterMonth").bottomCellWidthPx, S = (e) => {
19
+ if (!Number.isFinite(e)) return 0;
20
+ let t = b(e), n = _(e, "month"), r = g(v(e, "month") + 1) - n, i = r > 0 ? (e - n) / r : 0;
21
+ return (t.year() * 12 + t.month() + i) * (x ?? 100);
22
+ }, C = (e, t) => Math.max(0, S(t) - S(e)), w = (e, t) => {
19
23
  let n = b(e), r = n.quarter();
20
24
  return t("header.top.quarter", {
21
25
  year: n.year(),
22
26
  ordinal: t(`quarter.${r}`)
23
27
  });
24
- }, C = (e, t) => t("header.lower.month", { month: b(e).month() + 1 }), w = (e, t) => {
28
+ }, T = (e, t) => t("header.lower.month", { month: b(e).month() + 1 }), E = (e, t) => {
25
29
  if (!Array.isArray(e) || e.length === 0) return null;
26
30
  let n = 0, r = e.length - 1;
27
31
  for (; n <= r;) {
@@ -31,17 +35,17 @@ var x = o("quarterMonth").bottomCellWidthPx, S = (e, t) => {
31
35
  else return a;
32
36
  }
33
37
  return t < e[0].startMs ? e[0] : e[e.length - 1];
34
- }, T = (e, t) => {
38
+ }, D = (e, t) => {
35
39
  if (!t) return 0;
36
40
  let n = t.endMs - t.startMs;
37
41
  if (n <= 0) return t.left;
38
42
  let r = Math.max(0, Math.min(1, (e - t.startMs) / n));
39
43
  return t.left + r * t.width;
40
- }, E = (e, t) => Number.isFinite(e) ? T(e, w(t, e)) : 0, D = (e, t, n) => {
44
+ }, O = (e, t) => Number.isFinite(e) ? D(e, E(t, e)) : 0, k = (e, t, n) => {
41
45
  if (!Number.isFinite(e) || !Number.isFinite(t)) return 0;
42
- let r = w(n, e), i = w(n, t);
43
- return r === i ? Math.max(0, T(t, r) - T(e, r)) : Math.max(0, T(t, i) - T(e, r));
44
- }, O = (e, t, n) => {
46
+ let r = E(n, e), i = E(n, t);
47
+ return r === i ? Math.max(0, D(t, r) - D(e, r)) : Math.max(0, D(t, i) - D(e, r));
48
+ }, A = (e, t, n) => {
45
49
  if (!Array.isArray(t) || t.length === 0) return 0;
46
50
  if (!Number.isFinite(e) || e <= 0) return t[0].startMs;
47
51
  let r = 0, i = t.length - 1;
@@ -58,15 +62,15 @@ var x = o("quarterMonth").bottomCellWidthPx, S = (e, t) => {
58
62
  return Math.min(a.endMs, n);
59
63
  };
60
64
  c.extend(l), c.extend(u);
61
- var k = (e) => {
65
+ var j = (e) => {
62
66
  if (e == null || s(e) && e.trim() === "") return 0;
63
67
  let t = Number(e);
64
68
  return Number.isFinite(t) ? t < 0 || t > 1 ? 1 : t : 0;
65
- }, A = (e) => {
69
+ }, M = (e) => {
66
70
  if (e == null) return null;
67
71
  let t = c(e);
68
72
  return t.isValid() ? t.valueOf() : null;
69
- }, j = (e) => g(e), M = (n, r = t) => {
73
+ }, N = (e) => g(e), P = (n, r = t) => {
70
74
  let a = Number(r?.[n]);
71
75
  if (a > 0) return a;
72
76
  if (i(n)) {
@@ -75,25 +79,25 @@ var k = (e) => {
75
79
  }
76
80
  let s = Number(t[n]);
77
81
  return s > 0 ? s : t.day;
78
- }, N = (e, t) => {
82
+ }, F = (e, t) => {
79
83
  let n = Number(e);
80
84
  return Number.isFinite(n) ? n : t;
81
- }, P = (e, t = n) => {
85
+ }, I = (e, t = n) => {
82
86
  let i = Number(r[e]);
83
87
  return Number.isFinite(i) && i >= 0 ? {
84
88
  bufferDaysBefore: i,
85
89
  bufferDaysAfter: i
86
90
  } : {
87
- bufferDaysBefore: N(t?.bufferDaysBefore, n.bufferDaysBefore),
88
- bufferDaysAfter: N(t?.bufferDaysAfter, n.bufferDaysAfter)
91
+ bufferDaysBefore: F(t?.bufferDaysBefore, n.bufferDaysBefore),
92
+ bufferDaysAfter: F(t?.bufferDaysAfter, n.bufferDaysAfter)
89
93
  };
90
- }, F = (t = n, r = h()) => {
91
- let i = N(t?.bufferDaysBefore, n.bufferDaysBefore), a = N(t?.bufferDaysAfter, n.bufferDaysAfter), o = j(r);
94
+ }, L = (t = n, r = h()) => {
95
+ let i = F(t?.bufferDaysBefore, n.bufferDaysBefore), a = F(t?.bufferDaysAfter, n.bufferDaysAfter), o = N(r);
92
96
  return {
93
97
  startMs: o - i * e,
94
98
  endMs: o + (a + 1) * e
95
99
  };
96
- }, I = (t, n, r) => {
100
+ }, R = (t, n, r) => {
97
101
  let i = c(t).isValid() ? t : Date.now(), a = c(n).isValid() ? n : Date.now() + e;
98
102
  switch (r) {
99
103
  case "week": return {
@@ -114,25 +118,25 @@ var k = (e) => {
114
118
  endMs: g(v(a, "year") + 1)
115
119
  };
116
120
  default: {
117
- let t = j(i), n = j(a);
121
+ let t = N(i), n = N(a);
118
122
  return {
119
123
  startMs: t,
120
124
  endMs: a === n ? a : n + e
121
125
  };
122
126
  }
123
127
  }
124
- }, L = (t, n, r, a, o) => i(a) && Array.isArray(o) && o.length ? E(t, o) : (t - n) / e * r, R = (t, n, r, a, o, s) => i(a) && Array.isArray(s) && s.length ? D(t, n, s) : (n - t) / e * r, z = (t, n, r, a, o, s) => i(a) && Array.isArray(s) && s.length ? O(t, s, o ?? n) : n + t / r * e, B = ({ viewMode: e, timelineStartMs: t, timelineEndMs: n, pixelsPerDay: r, lowerSegments: i }) => ({
125
- toX: (n) => L(n, t, r, e, i),
126
- toWidth: (n, a) => R(n, a, r, e, t, i),
127
- timeAtX: (a) => z(a, t, r, e, n, i)
128
- }), V = (e) => e !== null && e !== j(e), H = ({ rawStartMs: e, rawEndMs: t, baseStartMs: n, baseEndMs: r }, i) => a(i) && (V(e) || V(t)) ? {
128
+ }, z = (t, n, r, a, o) => i(a) && Array.isArray(o) && o.length ? O(t, o) : (t - n) / e * r, B = (t, n, r, a, o, s) => i(a) && Array.isArray(s) && s.length ? k(t, n, s) : (n - t) / e * r, V = (t, n, r, a, o, s) => i(a) && Array.isArray(s) && s.length ? A(t, s, o ?? n) : n + t / r * e, H = ({ viewMode: e, timelineStartMs: t, timelineEndMs: n, pixelsPerDay: r, lowerSegments: i }) => ({
129
+ toX: (n) => z(n, t, r, e, i),
130
+ toWidth: (n, a) => B(n, a, r, e, t, i),
131
+ timeAtX: (a) => V(a, t, r, e, n, i)
132
+ }), U = (e) => e !== null && e !== N(e), W = ({ rawStartMs: e, rawEndMs: t, baseStartMs: n, baseEndMs: r }, i) => a(i) && (U(e) || U(t)) ? {
129
133
  startMs: e,
130
134
  endMs: t
131
135
  } : {
132
136
  startMs: n,
133
137
  endMs: r
134
- }, U = (t, n) => {
135
- let r = A(t), i = A(n), a = r === null ? null : j(r), o = i === null ? null : j(i) + e;
138
+ }, G = (t, n) => {
139
+ let r = M(t), i = M(n), a = r === null ? null : N(r), o = i === null ? null : N(i) + e;
136
140
  return {
137
141
  rawStartMs: r,
138
142
  rawEndMs: i,
@@ -143,14 +147,14 @@ var k = (e) => {
143
147
  };
144
148
  //#endregion
145
149
  //#region src/components/Gantt/utils/collapseKeys.ts
146
- function W(e, t) {
150
+ function K(e, t) {
147
151
  if (t == null || t === "" || !e) return !1;
148
152
  let n = String(t);
149
153
  return e instanceof Set ? e.has(n) : Array.isArray(e) ? e.includes(n) : !1;
150
154
  }
151
- function G(e, t) {
155
+ function q(e, t) {
152
156
  let n = String(t), r = e instanceof Set ? e : new Set(Array.isArray(e) ? e : []), i = new Set(r);
153
157
  return i.has(n) ? i.delete(n) : i.add(n), i;
154
158
  }
155
159
  //#endregion
156
- export { m as _, I as a, p as b, k as c, j as d, R as f, S as g, C as h, H as i, M as l, x as m, G as n, F as o, L as p, U as r, B as s, W as t, P as u, y as v, b as y };
160
+ export { C as _, R as a, b, j as c, N as d, B as f, w as g, T as h, W as i, P as l, x as m, q as n, L as o, z as p, G as r, H as s, K as t, I as u, m as v, p as x, y };
@@ -1,29 +1,28 @@
1
1
  //#region src/components/Gantt/GanttChart/utils/constants.ts
2
2
  var e = 34, t = 34, n = 200, r = 34, i = 68 / 34, a = 1440 * 60 * 1e3, o = "move", s = "resize-start", c = "resize-end", l = 3e4, u = 1.5, d = "__empty__", f = /^#([a-f\d]{3}|[a-f\d]{6})$/i, p = {
3
- day: 120,
4
- week: 364,
5
- month: 730,
6
- quarter: 1460,
7
- quarterMonth: 90,
8
- year: 3650,
9
- halfDay: 30,
10
- sixHour: 14,
11
- hour: 7,
12
- halfHour: 3,
13
- tenMinute: 2,
14
- oneMinute: 1
15
- }, m = {
16
3
  bufferDaysBefore: 90,
17
4
  bufferDaysAfter: 90
18
- }, h = {
5
+ }, m = {
19
6
  halfDay: 30,
20
7
  sixHour: 14,
21
8
  hour: 7,
22
9
  halfHour: 3,
23
10
  tenMinute: 2,
24
- oneMinute: 0,
25
- quarterMonth: 180
11
+ oneMinute: 0
12
+ }, h = {
13
+ week: 20,
14
+ month: 20,
15
+ quarter: 20,
16
+ year: 10,
17
+ quarterMonth: 20
26
18
  }, g = {
19
+ ...m,
20
+ week: h.week * 7,
21
+ month: h.month * 30,
22
+ quarter: h.quarter * 90,
23
+ year: h.year * 365,
24
+ quarterMonth: h.quarterMonth * 30
25
+ }, _ = {
27
26
  day: 40,
28
27
  week: 14,
29
28
  month: 200 / 30,
@@ -37,4 +36,4 @@ var e = 34, t = 34, n = 200, r = 34, i = 68 / 34, a = 1440 * 60 * 1e3, o = "move
37
36
  oneMinute: 57600
38
37
  };
39
38
  //#endregion
40
- export { l as _, c as a, r as c, e as d, f, u as g, a as h, o as i, i as l, n as m, g as n, s as o, p, m as r, d as s, h as t, t as u };
39
+ export { c as a, r as c, e as d, f, l as g, u as h, o as i, i as l, a as m, _ as n, s as o, n as p, p as r, d as s, g as t, t as u };
@@ -5,19 +5,19 @@ import "../Tooltip/Tooltip-DW_XP13m.js";
5
5
  import "../Select/SelectInputSearch-DXPTGSc2.js";
6
6
  import "../NotFoundContent/NotFoundContent-7xV-zOG2.js";
7
7
  import "../vendors/useFloatingPortal-DsEtsAGW.js";
8
- import "../DropDown/DropDown-C5H9UObs.js";
8
+ import "../DropDown/DropDown-CvQAbsEo.js";
9
9
  import "../Table/processRowspan-BCzfI5un.js";
10
- import "../Table/Table-DVTq4n2V.js";
10
+ import "../Table/Table-3-kFIm5v.js";
11
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-_vMvDXFh.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
13
  import { r as o } from "./columnResize-By_1E48E.js";
14
- import { t as s } from "./GanttTable-DSTq5XmX.js";
14
+ import { t as s } from "./GanttTable-Di_p-0M1.js";
15
15
  import { t as c } from "./GanttHighlightContext-AIpN3-af.js";
16
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-DshzoBp7.js";
18
- import { n as h, r as g, t as _ } from "./collapseKeys-BWMH5k37.js";
19
- import { t as v } from "./GanttChart-DpmbH0GI.js";
20
- import "./GanttToolBar-fCAi-4zZ.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
21
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
22
22
  import { forwardRef as x, useCallback as S, useEffect as C, useMemo as w, useRef as T, useState as E } from "react";
23
23
  import D from "clsx";
@@ -1,4 +1,4 @@
1
- import { h as e } from "./constants-_vMvDXFh.js";
1
+ import { m as e } from "./constants-D4ur8WRs.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, m as a, o, s, u as c } from "../constants-_vMvDXFh.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-D4ur8WRs.js";
2
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
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-DshzoBp7.js";
5
- import { n as S, r as C, t as w } from "../collapseKeys-BWMH5k37.js";
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, o 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, a 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 };
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";
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 };
@@ -4,14 +4,14 @@ import { useState as r } from "react";
4
4
  import { Modal as i } from "antd";
5
5
  import { useControllableValue as a } from "ahooks";
6
6
  //#region src/components/Modal/constants.ts
7
- var o = "bsy-modal-motion", s = "bsy-modal-mask-motion", c = "rgba(0, 0, 0, 0.5)", l = "_modal_17jj2_1", u = "_modal__title_17jj2_7", d = "_modal__actions_17jj2_20", f = "_modal__button_groups_17jj2_24", p = "_modal__button_17jj2_24", m = "_modal__icon_17jj2_44", h = {
7
+ var o = "bsy-modal-motion", s = "bsy-modal-mask-motion", c = "rgba(0, 0, 0, 0.5)", l = "_modal_1wkiy_1", u = "_modal__title_1wkiy_7", d = "_modal__actions_1wkiy_20", f = "_modal__button_groups_1wkiy_24", p = "_modal__button_1wkiy_24", m = "_modal__icon_1wkiy_44", h = {
8
8
  modal: l,
9
9
  modal__title: u,
10
- "modal__title-text": "_modal__title-text_17jj2_16",
10
+ "modal__title-text": "_modal__title-text_1wkiy_16",
11
11
  modal__actions: d,
12
12
  modal__button_groups: f,
13
13
  modal__button: p,
14
- "modal__button--fullscreen": "_modal__button--fullscreen_17jj2_41",
14
+ "modal__button--fullscreen": "_modal__button--fullscreen_1wkiy_41",
15
15
  modal__icon: m
16
16
  }, g = (l) => {
17
17
  let { fullSwitch: u = !1 } = l, [d, f] = a(l, {
@@ -1,3 +1,3 @@
1
1
  import "../Icon/Icon-BQ3Whub2.js";
2
- import { t as e } from "./Modal-CrK8gFOn.js";
2
+ import { t as e } from "./Modal-D3LFqIV4.js";
3
3
  export { e as default };
@@ -2,7 +2,7 @@ import { t as e } from "../Icon/Icon-BQ3Whub2.js";
2
2
  import { t } from "../vendors/useLocale-BTz4slNW.js";
3
3
  import { n, t as r } from "../vendors/animations-BeI8JZp1.js";
4
4
  import { t as i } from "./SelectInputSearch-DXPTGSc2.js";
5
- import { n as a, t as o } from "../vendors/Tree-DJpkMB5u.js";
5
+ import { n as a, t as o } from "../vendors/Tree-C7BgkjCQ.js";
6
6
  import { t as s } from "../CheckBox/CheckBox-DIunYcfS.js";
7
7
  import { t as c } from "../NotFoundContent/NotFoundContent-7xV-zOG2.js";
8
8
  import { t as l } from "../vendors/useFloatingPortal-DsEtsAGW.js";
@@ -312,7 +312,7 @@ var Z = x((e) => {
312
312
  role: "option",
313
313
  "aria-selected": S,
314
314
  className: j("cursor-pointer rounded-[4px] py-[7px] px-[10px] min-h-[34px]", {
315
- "hover:bg-[#f3f3f3]": !S,
315
+ "hover:bg-[#eff0f6]": !S,
316
316
  "text-[#4d609f]": y && !S,
317
317
  "text-[#0265ff] bg-[#f0f6ff]": S,
318
318
  "flex items-center": b && l === "inline"
@@ -361,7 +361,7 @@ var Q = (e) => {
361
361
  children: /* @__PURE__ */ _("ul", {
362
362
  className: "bsy-multiple-select-list",
363
363
  children: [/* @__PURE__ */ g("li", {
364
- className: j("flex items-center gap-[8px]", "cursor-pointer hover:bg-[#f3f3f3] rounded-[4px] min-h-[34px]", "bsy-multiple-select-item"),
364
+ className: j("flex items-center gap-[8px]", "cursor-pointer hover:bg-[#eff0f6] rounded-[4px] min-h-[34px]", "bsy-multiple-select-item"),
365
365
  children: /* @__PURE__ */ g(s, {
366
366
  checked: m,
367
367
  onChange: () => {
@@ -383,7 +383,7 @@ var Q = (e) => {
383
383
  let n = d.getValue(e), r = d.getLabel(e), o = f.includes(n), c = e.systemField || !1;
384
384
  return /* @__PURE__ */ g("li", {
385
385
  className: j("flex items-center gap-[8px] min-h-[34px]", "cursor-pointer rounded-[4px]", "bsy-multiple-select-item", {
386
- "hover:bg-[#f3f3f3]": !0,
386
+ "hover:bg-[#eff0f6]": !0,
387
387
  "text-[#4d609f]": c && !o
388
388
  }),
389
389
  children: /* @__PURE__ */ g(s, {
@@ -1,9 +1,9 @@
1
1
  import "../Icon/Icon-BQ3Whub2.js";
2
2
  import "../vendors/LocaleContext-BJdHS0sH.js";
3
3
  import "../vendors/useLocale-BTz4slNW.js";
4
- import { n as e, r as t, t as n } from "./Select-Gkywa_sm.js";
4
+ import { n as e, r as t, t as n } from "./Select-OjCjCogR.js";
5
5
  import "./SelectInputSearch-DXPTGSc2.js";
6
- import "../vendors/Tree-DJpkMB5u.js";
6
+ import "../vendors/Tree-C7BgkjCQ.js";
7
7
  import "../CheckBox/CheckBox-CkVe5Boq.js";
8
8
  import "../CheckBox/CheckBox-DIunYcfS.js";
9
9
  import "../Radio/Radio-DkrZHoG1.js";
@@ -387,13 +387,12 @@ var ne = b(I), re = [], ie = {
387
387
  s,
388
388
  z
389
389
  ]), Ze = w(() => {
390
- let e = { "--row-height": typeof q == "string" ? "" : `${q || 34}px` };
391
- return d ? e.border = "1px solid #e8e8e8" : e.border = "none", (u || b?.y) && (e.maxHeight = u || b?.y), e;
390
+ let e = {};
391
+ return d ? e.border = "1px solid #e0e0e0" : e.border = "none", (u || b?.y) && (e.maxHeight = u || b?.y), e;
392
392
  }, [
393
393
  d,
394
394
  u,
395
- b,
396
- q
395
+ b
397
396
  ]);
398
397
  C(() => {
399
398
  let e = V.current;
@@ -2,6 +2,6 @@ import "../vendors/LocaleContext-BJdHS0sH.js";
2
2
  import "../vendors/useLocale-BTz4slNW.js";
3
3
  import { a as e, n as t, t as n } from "./constants-CKqc9Os_.js";
4
4
  import { a as r, c as i, d as a, f as o, n as s, o as c, r as l, t as u, u as d } from "./processRowspan-BCzfI5un.js";
5
- import { n as f, t as p } from "./Table-DVTq4n2V.js";
5
+ import { n as f, t as p } from "./Table-3-kFIm5v.js";
6
6
  import { n as m, t as h } from "./hooks-CJ2CnSep.js";
7
7
  export { n as COLUMN_DEFAULTS, t as DEFAULT_CONFIG, e as TABLE_DOM, p as Table, p as default, f as TableBody, r as calculateFixedOffset, c as expandLeafColumns, u as getCellRowspan, i as getColumnsWidth, d as getRowKey, s as processRowspan, l as shouldRenderCell, a as sortData, o as splitFixedColumns, h as useColumnResize, m as useTableVirtual };
@@ -1,5 +1,5 @@
1
1
  import "../Icon/Icon-BQ3Whub2.js";
2
- import { t as e } from "../vendors/Tree-DJpkMB5u.js";
2
+ import { t as e } from "../vendors/Tree-C7BgkjCQ.js";
3
3
  import "../CheckBox/CheckBox-CkVe5Boq.js";
4
4
  import "../Radio/Radio-DkrZHoG1.js";
5
5
  export { e as Tree };
@@ -39,4 +39,6 @@ export interface DatePickerProps {
39
39
  * 用于浮层需挂入局部容器(滚动/层叠上下文)时;未传则挂到 `document.body`。
40
40
  */
41
41
  getPopupContainer?: () => HTMLElement;
42
+ /** 浮层打开时追加到 trigger 元素的 className */
43
+ triggerActiveClassName?: string;
42
44
  }
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { GanttTaskBarProps } from '../../types.internal';
3
- declare const _default: React.MemoExoticComponent<({ item, barTop, dragTaskId, dragPreview, dragPermission, }: GanttTaskBarProps) => import("react/jsx-runtime").JSX.Element>;
3
+ declare const _default: React.MemoExoticComponent<({ item, barTop, dragTaskId, dragPreview, dragPermission, }: GanttTaskBarProps) => import("react/jsx-runtime").JSX.Element | null>;
4
4
  export default _default;
@@ -2,8 +2,8 @@ import { MouseEvent } from 'react';
2
2
  import { NormalizedGanttItem } from '../../types.internal';
3
3
  export declare function useTaskBarPointer({ enabled, onTaskMouseDown, onBarClick, }: {
4
4
  enabled: boolean;
5
- onTaskMouseDown?: (event: MouseEvent, item: NormalizedGanttItem, baseLeft: number) => void;
5
+ onTaskMouseDown?: (event: MouseEvent, item: NormalizedGanttItem, baseLeft: number, width?: number) => void;
6
6
  onBarClick?: (event: MouseEvent, item: NormalizedGanttItem) => void;
7
7
  }): {
8
- handlePointerMouseDown: (event: MouseEvent, item: NormalizedGanttItem, baseLeft: number) => void;
8
+ handlePointerMouseDown: (event: MouseEvent, item: NormalizedGanttItem, baseLeft: number, width?: number) => void;
9
9
  };
@@ -1,7 +1,6 @@
1
1
  import { MutableRefObject } from 'react';
2
2
  import { ElementRef } from '../../types.internal';
3
3
  export declare function useEdgeScroll(containerRef: ElementRef<HTMLDivElement>, onScrolledRef?: MutableRefObject<(() => void) | null>): {
4
- scrollCompensation: MutableRefObject<number>;
5
- startEdgeDetection: (clientX: number) => void;
4
+ startEdgeDetection: (clientX: number, containerRect?: DOMRectReadOnly) => void;
6
5
  stopEdgeScroll: () => void;
7
6
  };
@@ -1,15 +1,15 @@
1
1
  import { MouseEvent } from 'react';
2
2
  import { CommittedRangeById, InternalDragState, NormalizedGanttItem, ResolvedDragPermission, UseGanttDragOptions } from '../../types.internal';
3
- export declare function useGanttDrag({ pixelsPerDay, viewMode, timelineCoords, onTaskTimeChange, containerRef, }: UseGanttDragOptions): {
3
+ export declare function useGanttDrag({ pixelsPerDay, viewMode, timelineCoords, onTaskTimeChange, containerRef, onDragInteractionChange, }: UseGanttDragOptions): {
4
4
  dragState: InternalDragState | null;
5
5
  committedRangeById: CommittedRangeById;
6
6
  resetCommittedRanges: () => void;
7
7
  forceResetAllCommittedRanges: () => void;
8
8
  handleTaskMouseDown: (event: MouseEvent, item: NormalizedGanttItem & {
9
9
  dragPermission?: ResolvedDragPermission;
10
- }, left: number) => void;
10
+ }, left: number, width?: number) => void;
11
11
  handleResizeMouseDown: (event: MouseEvent, item: NormalizedGanttItem & {
12
12
  dragPermission?: ResolvedDragPermission;
13
- }, left: number, edge: "start" | "end") => void;
13
+ }, left: number, edge: "start" | "end", width?: number) => void;
14
14
  consumeRecentDragResult: () => boolean;
15
15
  };
@@ -1,2 +1,2 @@
1
1
  import { RefObject } from 'react';
2
- export declare function useGanttScrollbars(hostRef: RefObject<HTMLDivElement | null>, viewportRef: RefObject<HTMLDivElement | null>): void;
2
+ export declare function useGanttScrollbars(hostRef: RefObject<HTMLDivElement | null>, viewportRef: RefObject<HTMLDivElement | null>): boolean;
@@ -1,11 +1,11 @@
1
1
  import { VirtualItem } from '@tanstack/react-virtual';
2
- import { NormalizedGanttItem, OffscreenIndicator, TimelineCoords } from '../../types.internal';
3
- export declare function useOffscreenIndicators({ virtualRows, normalizedItems, scrollLeft, viewportWidth, timelineCoords, timelineWidth, enabled, }: {
2
+ import { NormalizedGanttItem, OffscreenIndicator } from '../../types.internal';
3
+ export declare function useOffscreenIndicators({ virtualRows, normalizedItems, visibleStartMs, visibleEndMs, enabled, excludeTaskId, }: {
4
4
  virtualRows: VirtualItem[];
5
5
  normalizedItems: NormalizedGanttItem[];
6
- scrollLeft: number;
7
- viewportWidth: number;
8
- timelineCoords: TimelineCoords;
9
- timelineWidth: number;
6
+ visibleStartMs: number;
7
+ visibleEndMs: number;
10
8
  enabled?: boolean;
9
+ /** Hide indicators for the row currently being dragged. */
10
+ excludeTaskId?: string | null;
11
11
  }): OffscreenIndicator[];
@@ -4,12 +4,14 @@ import { OffscreenJumpTarget, UseTimelineViewportControllerOptions } from '../..
4
4
  * 时间轴视口:Focus(anchorCenterMs) → Window → Scroll 单向流。
5
5
  * 切档只重建窗口并对齐 scroll,禁止用 (oldStart, oldPpd, scrollLeft) 反推焦点。
6
6
  */
7
- export declare function useTimelineViewportController({ timeRangeConfig, pixelsPerDayConfig, viewMode, contentRef, contentSize, headerTrackRef, formatMessage, }: UseTimelineViewportControllerOptions): {
7
+ export declare function useTimelineViewportController({ timeRangeConfig, pixelsPerDayConfig, viewMode, contentRef, contentSize, headerTrackRef, formatMessage, isHorizontalScrollbarInteracting, isTaskBarInteracting, }: UseTimelineViewportControllerOptions): {
8
8
  pixelsPerDay: number;
9
9
  viewportWidth: number;
10
10
  scrollLeft: number;
11
11
  timelineStartMs: number;
12
12
  timelineEndMs: number;
13
+ visibleStartMs: number;
14
+ visibleEndMs: number;
13
15
  lowerSegments: import('../../types.internal').TimelineSegment[];
14
16
  timelineCoords: import('../../types.internal').TimelineCoords;
15
17
  timelineWidth: number;
@@ -18,7 +20,7 @@ export declare function useTimelineViewportController({ timeRangeConfig, pixelsP
18
20
  isInitialLayoutReady: boolean;
19
21
  handleContentScroll: (event: UIEvent<HTMLDivElement>) => void;
20
22
  handleTodayClick: () => void;
21
- handleOffscreenJump: (jumpTarget: number | OffscreenJumpTarget) => void;
23
+ handleOffscreenJump: (jumpTarget: OffscreenJumpTarget) => void;
22
24
  handleScrollPrev: () => void;
23
25
  handleScrollNext: () => void;
24
26
  };