@baishuyun/ui-mobile 0.6.1 → 0.7.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.
@@ -1,107 +1,107 @@
1
1
  import { t as e } from "../ActionSheet/ActionSheet-DbrKxa_y.js";
2
2
  import { a as t, i as n, t as r } from "../ConfigProvider/useLocale-CP8NRZoj.js";
3
- import { r as i } from "../Calendar/timeUtils-t4A3-Hr6.js";
4
- import { createContext as a, memo as o, useCallback as s, useContext as c, useEffect as l, useLayoutEffect as u, useMemo as d, useRef as f, useState as p } from "react";
5
- import { createPortal as m } from "react-dom";
6
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
7
- import { useControllableValue as v } from "ahooks";
8
- import y from "dayjs";
9
- import { useVirtualizer as b } from "@tanstack/react-virtual";
3
+ import { i, t as a } from "../Calendar/cssVars-UpgK6spf.js";
4
+ import { createContext as o, memo as s, useCallback as c, useContext as l, useEffect as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
5
+ import { createPortal as h } from "react-dom";
6
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
7
+ import { useControllableValue as y } from "ahooks";
8
+ import b from "dayjs";
9
+ import { useVirtualizer as x } from "@tanstack/react-virtual";
10
10
  //#region src/components/Gantt/Gantt.module.scss
11
- var x = {
12
- "bsy-mobile-gantt": "_bsy-mobile-gantt_1ni8r_1",
13
- "bsy-mobile-gantt__scroll": "_bsy-mobile-gantt__scroll_1ni8r_18",
14
- "bsy-mobile-gantt__canvas": "_bsy-mobile-gantt__canvas_1ni8r_28",
15
- "bsy-mobile-gantt__overlay-host": "_bsy-mobile-gantt__overlay-host_1ni8r_34",
16
- "bsy-mobile-gantt__header": "_bsy-mobile-gantt__header_1ni8r_43",
17
- "bsy-mobile-gantt__header-row1": "_bsy-mobile-gantt__header-row1_1ni8r_50",
18
- "bsy-mobile-gantt__header-row2": "_bsy-mobile-gantt__header-row2_1ni8r_54",
19
- "bsy-mobile-gantt__header-cell": "_bsy-mobile-gantt__header-cell_1ni8r_57",
20
- "bsy-mobile-gantt__header-cell-label": "_bsy-mobile-gantt__header-cell-label_1ni8r_62",
21
- "bsy-mobile-gantt__header-cell-label--today": "_bsy-mobile-gantt__header-cell-label--today_1ni8r_73",
22
- "bsy-mobile-gantt__today-dot": "_bsy-mobile-gantt__today-dot_1ni8r_77",
23
- "bsy-mobile-gantt__sticky-label": "_bsy-mobile-gantt__sticky-label_1ni8r_87",
24
- "bsy-mobile-gantt__sticky-label-text": "_bsy-mobile-gantt__sticky-label-text_1ni8r_95",
25
- "bsy-mobile-gantt__toolbar": "_bsy-mobile-gantt__toolbar_1ni8r_102",
26
- "bsy-mobile-gantt__toolbar-zoom": "_bsy-mobile-gantt__toolbar-zoom_1ni8r_115",
27
- "bsy-mobile-gantt__toolbar-today": "_bsy-mobile-gantt__toolbar-today_1ni8r_115",
28
- "bsy-mobile-gantt__toolbar-nav": "_bsy-mobile-gantt__toolbar-nav_1ni8r_115",
29
- "bsy-mobile-gantt__toolbar-divider": "_bsy-mobile-gantt__toolbar-divider_1ni8r_130",
30
- "bsy-mobile-gantt__chevron": "_bsy-mobile-gantt__chevron_1ni8r_156",
31
- "bsy-mobile-gantt__chevron--left": "_bsy-mobile-gantt__chevron--left_1ni8r_160",
32
- "bsy-mobile-gantt__chevron--right": "_bsy-mobile-gantt__chevron--right_1ni8r_163",
33
- "bsy-mobile-gantt__timeline": "_bsy-mobile-gantt__timeline_1ni8r_166",
34
- "bsy-mobile-gantt__timeline-inner": "_bsy-mobile-gantt__timeline-inner_1ni8r_177",
35
- "bsy-mobile-gantt__column": "_bsy-mobile-gantt__column_1ni8r_181",
36
- "bsy-mobile-gantt__column--weekend": "_bsy-mobile-gantt__column--weekend_1ni8r_192",
37
- "bsy-mobile-gantt__today-line": "_bsy-mobile-gantt__today-line_1ni8r_195",
38
- "bsy-mobile-gantt__bar": "_bsy-mobile-gantt__bar_1ni8r_203",
39
- "bsy-mobile-gantt__bar-track": "_bsy-mobile-gantt__bar-track_1ni8r_210",
40
- "bsy-mobile-gantt__bar-progress": "_bsy-mobile-gantt__bar-progress_1ni8r_210",
41
- "bsy-mobile-gantt__bar-label": "_bsy-mobile-gantt__bar-label_1ni8r_220",
42
- "bsy-mobile-gantt__bar-label-overlay": "_bsy-mobile-gantt__bar-label-overlay_1ni8r_230",
43
- "bsy-mobile-gantt__offscreen": "_bsy-mobile-gantt__offscreen_1ni8r_242",
44
- "bsy-mobile-gantt__offscreen-layer": "_bsy-mobile-gantt__offscreen-layer_1ni8r_251",
45
- "bsy-mobile-gantt__offscreen-row": "_bsy-mobile-gantt__offscreen-row_1ni8r_261",
46
- "bsy-mobile-gantt__offscreen-arrow": "_bsy-mobile-gantt__offscreen-arrow_1ni8r_269",
47
- "bsy-mobile-gantt-arrow-enter": "_bsy-mobile-gantt-arrow-enter_1ni8r_1",
48
- "bsy-mobile-gantt__offscreen-arrow--right": "_bsy-mobile-gantt__offscreen-arrow--right_1ni8r_289"
49
- }, S = a(null), C = a(null), w = () => {
50
- let e = c(S);
11
+ var S = {
12
+ "bsy-mobile-gantt": "_bsy-mobile-gantt_1gpx8_1",
13
+ "bsy-mobile-gantt__scroll": "_bsy-mobile-gantt__scroll_1gpx8_18",
14
+ "bsy-mobile-gantt__canvas": "_bsy-mobile-gantt__canvas_1gpx8_28",
15
+ "bsy-mobile-gantt__overlay-host": "_bsy-mobile-gantt__overlay-host_1gpx8_34",
16
+ "bsy-mobile-gantt__header": "_bsy-mobile-gantt__header_1gpx8_43",
17
+ "bsy-mobile-gantt__header-row1": "_bsy-mobile-gantt__header-row1_1gpx8_50",
18
+ "bsy-mobile-gantt__header-row2": "_bsy-mobile-gantt__header-row2_1gpx8_54",
19
+ "bsy-mobile-gantt__header-cell": "_bsy-mobile-gantt__header-cell_1gpx8_57",
20
+ "bsy-mobile-gantt__header-cell-label": "_bsy-mobile-gantt__header-cell-label_1gpx8_62",
21
+ "bsy-mobile-gantt__header-cell-label--today": "_bsy-mobile-gantt__header-cell-label--today_1gpx8_73",
22
+ "bsy-mobile-gantt__today-dot": "_bsy-mobile-gantt__today-dot_1gpx8_77",
23
+ "bsy-mobile-gantt__sticky-label": "_bsy-mobile-gantt__sticky-label_1gpx8_87",
24
+ "bsy-mobile-gantt__sticky-label-text": "_bsy-mobile-gantt__sticky-label-text_1gpx8_95",
25
+ "bsy-mobile-gantt__toolbar": "_bsy-mobile-gantt__toolbar_1gpx8_102",
26
+ "bsy-mobile-gantt__toolbar-zoom": "_bsy-mobile-gantt__toolbar-zoom_1gpx8_119",
27
+ "bsy-mobile-gantt__toolbar-today": "_bsy-mobile-gantt__toolbar-today_1gpx8_119",
28
+ "bsy-mobile-gantt__toolbar-nav": "_bsy-mobile-gantt__toolbar-nav_1gpx8_119",
29
+ "bsy-mobile-gantt__toolbar-divider": "_bsy-mobile-gantt__toolbar-divider_1gpx8_137",
30
+ "bsy-mobile-gantt__chevron": "_bsy-mobile-gantt__chevron_1gpx8_166",
31
+ "bsy-mobile-gantt__chevron--left": "_bsy-mobile-gantt__chevron--left_1gpx8_170",
32
+ "bsy-mobile-gantt__chevron--right": "_bsy-mobile-gantt__chevron--right_1gpx8_173",
33
+ "bsy-mobile-gantt__timeline": "_bsy-mobile-gantt__timeline_1gpx8_176",
34
+ "bsy-mobile-gantt__timeline-inner": "_bsy-mobile-gantt__timeline-inner_1gpx8_187",
35
+ "bsy-mobile-gantt__column": "_bsy-mobile-gantt__column_1gpx8_191",
36
+ "bsy-mobile-gantt__column--weekend": "_bsy-mobile-gantt__column--weekend_1gpx8_202",
37
+ "bsy-mobile-gantt__today-line": "_bsy-mobile-gantt__today-line_1gpx8_205",
38
+ "bsy-mobile-gantt__bar": "_bsy-mobile-gantt__bar_1gpx8_213",
39
+ "bsy-mobile-gantt__bar-track": "_bsy-mobile-gantt__bar-track_1gpx8_220",
40
+ "bsy-mobile-gantt__bar-progress": "_bsy-mobile-gantt__bar-progress_1gpx8_220",
41
+ "bsy-mobile-gantt__bar-label": "_bsy-mobile-gantt__bar-label_1gpx8_230",
42
+ "bsy-mobile-gantt__bar-label-overlay": "_bsy-mobile-gantt__bar-label-overlay_1gpx8_240",
43
+ "bsy-mobile-gantt__offscreen": "_bsy-mobile-gantt__offscreen_1gpx8_252",
44
+ "bsy-mobile-gantt__offscreen-layer": "_bsy-mobile-gantt__offscreen-layer_1gpx8_261",
45
+ "bsy-mobile-gantt__offscreen-row": "_bsy-mobile-gantt__offscreen-row_1gpx8_271",
46
+ "bsy-mobile-gantt__offscreen-arrow": "_bsy-mobile-gantt__offscreen-arrow_1gpx8_279",
47
+ "bsy-mobile-gantt-arrow-enter": "_bsy-mobile-gantt-arrow-enter_1gpx8_1",
48
+ "bsy-mobile-gantt__offscreen-arrow--right": "_bsy-mobile-gantt__offscreen-arrow--right_1gpx8_300"
49
+ }, C = o(null), w = o(null), T = () => {
50
+ let e = l(C);
51
51
  if (!e) throw Error("useGanttState must be used within a GanttStateContext.Provider");
52
52
  return e;
53
- }, T = () => {
54
- let e = c(C);
53
+ }, E = () => {
54
+ let e = l(w);
55
55
  if (!e) throw Error("useGanttAction must be used within a GanttActionContext.Provider");
56
56
  return e;
57
- }, E = [
57
+ }, D = [
58
58
  "day",
59
59
  "week",
60
60
  "month",
61
61
  "quarter",
62
62
  "quarterMonth",
63
63
  "year"
64
- ], D = [
64
+ ], O = [
65
65
  "halfDay",
66
66
  "sixHour",
67
67
  "hour",
68
68
  "halfHour",
69
69
  "tenMinute",
70
70
  "oneMinute"
71
- ], O = [...E, ...D];
71
+ ], k = [...D, ...O];
72
72
  t.gantt.zoom;
73
- var k = [...[...D].reverse(), ...E], A = 1440 * 60 * 1e3, j = A / 24, M = j / 60, N = {
73
+ var ee = [...[...O].reverse(), ...D], A = 1440 * 60 * 1e3, j = A / 24, M = j / 60, N = {
74
74
  halfDay: 12 * j,
75
75
  sixHour: 6 * j,
76
76
  hour: j,
77
77
  halfHour: 30 * M,
78
78
  tenMinute: 10 * M,
79
79
  oneMinute: M
80
- }, P = {
80
+ }, te = {
81
81
  halfDay: 80,
82
82
  sixHour: 70,
83
83
  hour: 50,
84
84
  halfHour: 45,
85
85
  tenMinute: 40,
86
86
  oneMinute: 40
87
- }, ee = 30 / 40;
88
- function F(e) {
89
- return (e === "tenMinute" || e === "oneMinute" ? 30 : Math.round(P[e] * ee)) * (A / N[e]);
87
+ }, ne = 30 / 40;
88
+ function P(e) {
89
+ return (e === "tenMinute" || e === "oneMinute" ? 30 : Math.round(te[e] * ne)) * (A / N[e]);
90
90
  }
91
- var I = {
91
+ var F = {
92
92
  day: 30,
93
93
  week: 18,
94
94
  month: 6.5,
95
95
  quarter: 2.2,
96
96
  quarterMonth: 100 / 30,
97
97
  year: 1.1,
98
- halfDay: F("halfDay"),
99
- sixHour: F("sixHour"),
100
- hour: F("hour"),
101
- halfHour: F("halfHour"),
102
- tenMinute: F("tenMinute"),
103
- oneMinute: F("oneMinute")
104
- }, te = {
98
+ halfDay: P("halfDay"),
99
+ sixHour: P("sixHour"),
100
+ hour: P("hour"),
101
+ halfHour: P("halfHour"),
102
+ tenMinute: P("tenMinute"),
103
+ oneMinute: P("oneMinute")
104
+ }, re = {
105
105
  halfDay: 30,
106
106
  sixHour: 14,
107
107
  hour: 7,
@@ -109,34 +109,34 @@ var I = {
109
109
  tenMinute: 2,
110
110
  oneMinute: 0
111
111
  };
112
- function L(e) {
113
- return D.includes(e);
112
+ function I(e) {
113
+ return O.includes(e);
114
114
  }
115
- function R(e) {
116
- return L(e) ? N[e] : A;
115
+ function L(e) {
116
+ return I(e) ? N[e] : A;
117
117
  }
118
- function ne(e, t) {
119
- return t * (R(e) / A);
118
+ function ie(e, t) {
119
+ return t * (L(e) / A);
120
120
  }
121
- function z(e, t, n) {
121
+ function R(e, t, n) {
122
122
  return (e.valueOf() - t.valueOf()) / A * n;
123
123
  }
124
- function re(e, t, n) {
124
+ function ae(e, t, n) {
125
125
  let r = e / n * A;
126
126
  return t.add(r, "millisecond");
127
127
  }
128
128
  //#endregion
129
129
  //#region src/components/Gantt/utils/time.ts
130
- var B = (e) => e ? y().tz(e) : y(), ie = (e, t) => i(e, t), ae = (e, r) => n(t, e, r), V = (e) => `calendar.monthShort.${e}`, H = (e) => `gantt.quarter.${e + 1}`, oe = new Set([
130
+ var z = (e) => e ? b().tz(e) : b(), oe = (e, t) => i(e, t), se = (e, r) => n(t, e, r), B = (e) => `calendar.monthShort.${e}`, V = (e) => `gantt.quarter.${e + 1}`, ce = new Set([
131
131
  "halfDay",
132
132
  "sixHour",
133
133
  "hour"
134
- ]), se = new Set([
134
+ ]), le = new Set([
135
135
  "halfHour",
136
136
  "tenMinute",
137
137
  "oneMinute"
138
138
  ]);
139
- function ce(e, t, n) {
139
+ function ue(e, t, n) {
140
140
  switch (t) {
141
141
  case "halfDay": return e.hour() < 12 ? n("gantt.am") : n("gantt.pm");
142
142
  case "sixHour": {
@@ -153,7 +153,7 @@ function ce(e, t, n) {
153
153
  default: return e.format("HH:mm");
154
154
  }
155
155
  }
156
- function le(e, t) {
156
+ function de(e, t) {
157
157
  let n = e.hour();
158
158
  if (n === 0) {
159
159
  let r = e.month() + 1;
@@ -161,12 +161,12 @@ function le(e, t) {
161
161
  month: r,
162
162
  day: e.date(),
163
163
  hour: n,
164
- monthShort: t(V(r))
164
+ monthShort: t(B(r))
165
165
  });
166
166
  }
167
167
  return t("gantt.hour", { hour: n });
168
168
  }
169
- function ue(e, t) {
169
+ function fe(e, t) {
170
170
  switch (t) {
171
171
  case "halfDay": return e.add(12, "hour");
172
172
  case "sixHour": return e.add(6, "hour");
@@ -177,26 +177,26 @@ function ue(e, t) {
177
177
  default: return e.add(1, "hour");
178
178
  }
179
179
  }
180
- function de(e, t, n, r = ae) {
180
+ function pe(e, t, n, r = se) {
181
181
  let i = [], a = "", o = null;
182
182
  return e.forEach((e, s) => {
183
183
  let c, l, u = e.date.year(), d = e.date.month() + 1;
184
- if (oe.has(t)) c = e.date.format("YYYY-MM-DD"), l = r("gantt.yearMonthDay", {
184
+ if (ce.has(t)) c = e.date.format("YYYY-MM-DD"), l = r("gantt.yearMonthDay", {
185
185
  year: u,
186
186
  month: d,
187
187
  day: e.date.date(),
188
- monthShort: r(V(d))
188
+ monthShort: r(B(d))
189
189
  });
190
- else if (se.has(t)) c = e.date.format("YYYY-MM-DD-HH"), l = le(e.date, r);
190
+ else if (le.has(t)) c = e.date.format("YYYY-MM-DD-HH"), l = de(e.date, r);
191
191
  else if (t === "day" || t === "week") c = e.date.format("YYYY-MM"), l = r("calendar.yearMonth", {
192
192
  year: u,
193
- monthShort: r(V(d))
193
+ monthShort: r(B(d))
194
194
  });
195
195
  else if (t === "quarterMonth") {
196
196
  let t = Math.floor(e.date.month() / 3);
197
197
  c = `${u}-Q${t + 1}`, l = r("gantt.yearQuarter", {
198
198
  year: u,
199
- quarter: r(H(t))
199
+ quarter: r(V(t))
200
200
  });
201
201
  } else c = e.date.format("YYYY"), l = r("gantt.year", { year: u });
202
202
  c === a ? o && (o.span++, o.widthPx += e.days * n) : (o && i.push(o), a = c, o = {
@@ -207,14 +207,14 @@ function de(e, t, n, r = ae) {
207
207
  });
208
208
  }), o && i.push(o), i;
209
209
  }
210
- function U(e, t, n, r, i = ae) {
210
+ function me(e, t, n, r, i = se) {
211
211
  let a = [];
212
- if (L(n)) {
212
+ if (I(n)) {
213
213
  let o = N[n] / A, s = e;
214
214
  for (let e = 0; e < t; e++) {
215
- let e = s, t = ue(e, n), c = !r.isBefore(e) && r.isBefore(t);
215
+ let e = s, t = fe(e, n), c = !r.isBefore(e) && r.isBefore(t);
216
216
  a.push({
217
- label: ce(e, n, i),
217
+ label: ue(e, n, i),
218
218
  isToday: c,
219
219
  isWeekend: !1,
220
220
  date: e,
@@ -238,12 +238,12 @@ function U(e, t, n, r, i = ae) {
238
238
  }
239
239
  case "month":
240
240
  case "quarterMonth":
241
- t = e.add(o, "month").startOf("month"), s = t.add(1, "month"), c = i(V(t.month() + 1)), l = r.month() === t.month() && r.year() === t.year();
241
+ t = e.add(o, "month").startOf("month"), s = t.add(1, "month"), c = i(B(t.month() + 1)), l = r.month() === t.month() && r.year() === t.year();
242
242
  break;
243
243
  case "quarter": {
244
244
  t = e.add(o * 3, "month").startOf("month"), s = t.add(3, "month");
245
245
  let n = Math.floor(t.month() / 3);
246
- c = i(H(n)), l = Math.floor(r.month() / 3) === n && r.year() === t.year();
246
+ c = i(V(n)), l = Math.floor(r.month() / 3) === n && r.year() === t.year();
247
247
  break;
248
248
  }
249
249
  case "year": {
@@ -267,21 +267,21 @@ function U(e, t, n, r, i = ae) {
267
267
  }
268
268
  return a;
269
269
  }
270
- function fe(e, t) {
270
+ function he(e, t) {
271
271
  if (t === "oneMinute") return {
272
272
  startDate: e.subtract(12, "hour").startOf("minute"),
273
273
  count: 1440,
274
274
  totalDays: 1
275
275
  };
276
- let n = te[t], r = R(t), i = e.startOf("day").subtract(n, "day"), a = e.startOf("day").add(n + 1, "day").diff(i, "day", !0);
276
+ let n = re[t], r = L(t), i = e.startOf("day").subtract(n, "day"), a = e.startOf("day").add(n + 1, "day").diff(i, "day", !0);
277
277
  return {
278
278
  startDate: i,
279
279
  count: Math.max(1, Math.round(a * A / r)),
280
280
  totalDays: a
281
281
  };
282
282
  }
283
- function W(e, t, n, r, i = 30) {
284
- if (L(t)) return fe(e, t);
283
+ function H(e, t, n, r, i = 30) {
284
+ if (I(t)) return he(e, t);
285
285
  let a = Math.ceil((r > 0 ? r : 375) / n) * (1 + i * 2), o = Math.floor(a / 2), s, c;
286
286
  switch (t) {
287
287
  case "day":
@@ -342,14 +342,14 @@ function W(e, t, n, r, i = 30) {
342
342
  }
343
343
  //#endregion
344
344
  //#region src/components/Gantt/hooks/useGanttViewport.ts
345
- function pe({ timeZone: e, initialZoomLevel: t = "day" }) {
346
- let n = t, [r, i] = p(() => B(e)), a = f(null), [o, s] = p(0), c = I[n], { startDate: u, count: m, totalDays: h } = d(() => W(r, n, c, o), [
345
+ function ge({ timeZone: e, initialZoomLevel: t = "day" }) {
346
+ let n = t, [r, i] = m(() => z(e)), a = p(null), [o, s] = m(0), c = F[n], { startDate: l, count: d, totalDays: h } = f(() => H(r, n, c, o), [
347
347
  r,
348
348
  n,
349
349
  c,
350
350
  o
351
351
  ]), g = h * c;
352
- return l(() => {
352
+ return u(() => {
353
353
  let e = a.current;
354
354
  if (!e) return;
355
355
  let t = new ResizeObserver((e) => {
@@ -363,8 +363,8 @@ function pe({ timeZone: e, initialZoomLevel: t = "day" }) {
363
363
  anchorDate: r,
364
364
  containerRef: a,
365
365
  viewportWidth: o,
366
- startDate: u,
367
- count: m,
366
+ startDate: l,
367
+ count: d,
368
368
  totalDays: h,
369
369
  totalWidth: g,
370
370
  setAnchorDate: i
@@ -372,49 +372,49 @@ function pe({ timeZone: e, initialZoomLevel: t = "day" }) {
372
372
  }
373
373
  //#endregion
374
374
  //#region src/components/Gantt/utils/viewportDateUtils.ts
375
- function G(e, t, n, r) {
376
- return re(e + t / 2, n, r);
375
+ function _e(e, t, n, r) {
376
+ return ae(e + t / 2, n, r);
377
377
  }
378
- function K(e, t, n, r) {
379
- let i = z(e, t, n);
378
+ function U(e, t, n, r) {
379
+ let i = R(e, t, n);
380
380
  return Math.max(0, i - r / 2);
381
381
  }
382
382
  //#endregion
383
383
  //#region src/components/Gantt/utils/zoomReanchor.ts
384
- function me({ currentZoomLevel: e, nextZoomLevel: t, currentAnchorDate: n, currentScrollLeft: r, viewportWidth: i }) {
385
- let a = I[e], o = G(r, i, W(n, e, a, i).startDate, a), s = I[t];
384
+ function ve({ currentZoomLevel: e, nextZoomLevel: t, currentAnchorDate: n, currentScrollLeft: r, viewportWidth: i }) {
385
+ let a = F[e], o = _e(r, i, H(n, e, a, i).startDate, a), s = F[t];
386
386
  return {
387
387
  anchorDate: o,
388
- scrollLeft: K(o, W(o, t, s, i).startDate, s, i)
388
+ scrollLeft: U(o, H(o, t, s, i).startDate, s, i)
389
389
  };
390
390
  }
391
391
  //#endregion
392
392
  //#region src/components/Gantt/hooks/useGanttScroll.ts
393
- var he = 2;
394
- function ge(e, { onZoomLevelChange: t }) {
395
- let { timeZone: n, zoomLevel: r, anchorDate: i, viewportWidth: a, startDate: o, totalWidth: c, pxPerDay: l, totalDays: d, setAnchorDate: p } = e, m = f(null), h = f(t);
393
+ var ye = 2;
394
+ function be(e, { onZoomLevelChange: t }) {
395
+ let { timeZone: n, zoomLevel: r, anchorDate: i, viewportWidth: a, startDate: o, totalWidth: s, pxPerDay: l, totalDays: u, setAnchorDate: f } = e, m = p(null), h = p(t);
396
396
  h.current = t;
397
- let g = f({
397
+ let g = p({
398
398
  zoomLevel: r,
399
399
  anchorDate: i,
400
400
  viewportWidth: a,
401
401
  startDate: o,
402
- totalWidth: c,
402
+ totalWidth: s,
403
403
  pxPerDay: l,
404
- totalDays: d
404
+ totalDays: u
405
405
  });
406
- u(() => {
406
+ d(() => {
407
407
  g.current = {
408
408
  zoomLevel: r,
409
409
  anchorDate: i,
410
410
  viewportWidth: a,
411
411
  startDate: o,
412
- totalWidth: c,
412
+ totalWidth: s,
413
413
  pxPerDay: l,
414
- totalDays: d
414
+ totalDays: u
415
415
  };
416
416
  });
417
- let _ = f(!1), v = f(!1), y = f(!1), b = f(null), x = s(() => m.current?.scrollLeft ?? 0, []), S = s((e, t = "auto") => {
417
+ let _ = p(!1), v = p(!1), y = p(!1), b = p(null), x = c(() => m.current?.scrollLeft ?? 0, []), S = c((e, t = "auto") => {
418
418
  let n = m.current;
419
419
  if (!n) return;
420
420
  let r = Math.max(0, n.scrollWidth - n.clientWidth), i = Math.max(0, Math.min(e, r));
@@ -422,28 +422,28 @@ function ge(e, { onZoomLevelChange: t }) {
422
422
  left: i,
423
423
  behavior: t
424
424
  });
425
- }, []), C = s((e) => {
425
+ }, []), C = c((e) => {
426
426
  let { zoomLevel: t, anchorDate: n, viewportWidth: r } = g.current;
427
427
  if (e === t) return;
428
428
  if (r <= 0) {
429
429
  h.current(e);
430
430
  return;
431
431
  }
432
- let { anchorDate: i, scrollLeft: a } = me({
432
+ let { anchorDate: i, scrollLeft: a } = ve({
433
433
  currentZoomLevel: t,
434
434
  nextZoomLevel: e,
435
435
  currentAnchorDate: n,
436
436
  currentScrollLeft: m.current?.scrollLeft ?? 0,
437
437
  viewportWidth: r
438
438
  });
439
- p(i), h.current(e), y.current = !0, b.current = a;
440
- }, [p]), w = s(() => {
441
- let { zoomLevel: e, pxPerDay: t, viewportWidth: r } = g.current, i = B(n), a = K(i, W(i, e, t, r).startDate, t, r);
442
- y.current = !0, b.current = a, p(i);
443
- }, [n, p]);
444
- return u(() => {
439
+ f(i), h.current(e), y.current = !0, b.current = a;
440
+ }, [f]), w = c(() => {
441
+ let { zoomLevel: e, pxPerDay: t, viewportWidth: r } = g.current, i = z(n), a = U(i, H(i, e, t, r).startDate, t, r);
442
+ y.current = !0, b.current = a, f(i);
443
+ }, [n, f]);
444
+ return d(() => {
445
445
  if (a <= 0 || v.current) return;
446
- let e = K(i, o, l, a);
446
+ let e = U(i, o, l, a);
447
447
  y.current = !0, b.current = e, v.current = !0;
448
448
  }, [
449
449
  i,
@@ -451,7 +451,7 @@ function ge(e, { onZoomLevelChange: t }) {
451
451
  l,
452
452
  a,
453
453
  o
454
- ]), u(() => {
454
+ ]), d(() => {
455
455
  let e = b.current;
456
456
  e !== null && (S(e), b.current = null);
457
457
  }, [
@@ -459,12 +459,12 @@ function ge(e, { onZoomLevelChange: t }) {
459
459
  i,
460
460
  r,
461
461
  a,
462
- c
462
+ s
463
463
  ]), {
464
464
  horizontalScrollRef: m,
465
465
  scrollToX: S,
466
466
  getScrollLeft: x,
467
- handleHorizontalScroll: s(() => {
467
+ handleHorizontalScroll: c(() => {
468
468
  if (!v.current) return;
469
469
  if (y.current) {
470
470
  y.current = !1;
@@ -476,35 +476,35 @@ function ge(e, { onZoomLevelChange: t }) {
476
476
  }
477
477
  let { viewportWidth: e, zoomLevel: t, pxPerDay: n, startDate: r, totalWidth: i } = g.current;
478
478
  if (e <= 0) return;
479
- let a = x(), o = Math.max(0, i - e), s = e * he, c = a < s, l = a > o - s;
479
+ let a = x(), o = Math.max(0, i - e), s = e * ye, c = a < s, l = a > o - s;
480
480
  if (!c && !l) return;
481
481
  _.current = !0, y.current = !0;
482
- let u = G(a, e, r, n);
483
- b.current = K(u, W(u, t, n, e).startDate, n, e), p(u);
484
- }, [x, p]),
482
+ let u = _e(a, e, r, n);
483
+ b.current = U(u, H(u, t, n, e).startDate, n, e), f(u);
484
+ }, [x, f]),
485
485
  setZoomLevel: C,
486
486
  handleTodayClick: w,
487
- navigateToBar: s((e) => {
487
+ navigateToBar: c((e) => {
488
488
  if (!e) return;
489
489
  let t = m.current;
490
490
  if (!t) return;
491
- let { pxPerDay: n, startDate: r, viewportWidth: i, zoomLevel: a } = g.current, o = z(e, r, n) - i / 2, s = Math.max(0, t.scrollWidth - t.clientWidth);
491
+ let { pxPerDay: n, startDate: r, viewportWidth: i, zoomLevel: a } = g.current, o = R(e, r, n) - i / 2, s = Math.max(0, t.scrollWidth - t.clientWidth);
492
492
  if (o >= 0 && o <= s) {
493
493
  S(o, Math.abs(o - t.scrollLeft) > i * 2 ? "auto" : "smooth");
494
494
  return;
495
495
  }
496
- let c = K(e, W(e, a, n, i).startDate, n, i);
497
- y.current = !0, b.current = c, p(e);
498
- }, [S, p])
496
+ let c = U(e, H(e, a, n, i).startDate, n, i);
497
+ y.current = !0, b.current = c, f(e);
498
+ }, [S, f])
499
499
  };
500
500
  }
501
501
  //#endregion
502
502
  //#region src/components/Gantt/utils/color.ts
503
- var _e = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, ve = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, ye = (e, t) => {
503
+ var xe = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, Se = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, W = (e, t) => {
504
504
  if (t < 0 || t > 1) return null;
505
- let n = e.replace(_e, (e, t, n, r) => t + t + n + n + r + r), r = ve.exec(n);
505
+ let n = e.replace(xe, (e, t, n, r) => t + t + n + n + r + r), r = Se.exec(n);
506
506
  return r ? `rgba(${parseInt(r[1], 16)}, ${parseInt(r[2], 16)}, ${parseInt(r[3], 16)}, ${t})` : null;
507
- }, be = (e, t = 2.5) => {
507
+ }, Ce = (e, t = 2.5) => {
508
508
  if (!e) return "#121211";
509
509
  let n, r, i;
510
510
  if (e.startsWith("#")) {
@@ -524,7 +524,7 @@ var _e = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, ve = /^#?([a-f\d]{2})([a-f\d]{2})([
524
524
  return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
525
525
  };
526
526
  return 1.05 / (.2126 * a(n) + .7152 * a(r) + .0722 * a(i) + .05) >= t ? "#ffffff" : "#121211";
527
- }, q = (e) => !e || !e.isValid() ? !1 : e.valueOf() !== e.startOf("day").valueOf(), xe = (e, t) => {
527
+ }, G = (e) => !e || !e.isValid() ? !1 : e.valueOf() !== e.startOf("day").valueOf(), we = (e, t) => {
528
528
  let n = e?.isValid() ? e : null, r = t?.isValid() ? t : null, i = n ? n.startOf("day") : null, a = r ? r.startOf("day").add(1, "day") : null;
529
529
  return {
530
530
  rawStart: n,
@@ -533,24 +533,24 @@ var _e = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, ve = /^#?([a-f\d]{2})([a-f\d]{2})([
533
533
  baseEnd: a,
534
534
  invalid: n !== null && r !== null && n.valueOf() > r.valueOf() || i === null || a === null || a.valueOf() <= i.valueOf()
535
535
  };
536
- }, Se = (e, t) => L(t) && (q(e.rawStart) || q(e.rawEnd)) ? {
536
+ }, Te = (e, t) => I(t) && (G(e.rawStart) || G(e.rawEnd)) ? {
537
537
  start: e.rawStart,
538
538
  end: e.rawEnd
539
539
  } : {
540
540
  start: e.baseStart,
541
541
  end: e.baseEnd
542
- }, Ce = (e) => e === void 0 ? 1 : Number.isFinite(e) ? e < 0 || e > 1 ? 1 : e : 0;
543
- function we(e, t, n) {
544
- let { startDate: r, pxPerDay: i, zoomLevel: a } = t, o = L(a) ? ne(a, i) : i, s = L(a) ? r : r.startOf("day");
542
+ }, Ee = (e) => e === void 0 ? 1 : Number.isFinite(e) ? e < 0 || e > 1 ? 1 : e : 0;
543
+ function De(e, t, n) {
544
+ let { startDate: r, pxPerDay: i, zoomLevel: a } = t, o = I(a) ? ie(a, i) : i, s = I(a) ? r : r.startOf("day");
545
545
  return e.map((e, t) => {
546
- let r = ie(e.startTime, n), c = ie(e.endTime, n), l = r.isValid(), u = c.isValid(), d = l ? r : null, f = u ? c : null, p = e.color || "#5170E8", m = ye(p, .2) || `${p}33`, h = Ce(e.progress), g = 0, _ = 0, v = !1;
546
+ let r = oe(e.startTime, n), c = oe(e.endTime, n), l = r.isValid(), u = c.isValid(), d = l ? r : null, f = u ? c : null, p = e.color || "#5170E8", m = W(p, .2) || `${p}33`, h = Ee(e.progress), g = 0, _ = 0, v = !1;
547
547
  if (d && f) {
548
- let e = xe(d, f);
548
+ let e = we(d, f);
549
549
  if (!e.invalid) {
550
- let { start: t, end: n } = Se(e, a);
550
+ let { start: t, end: n } = Te(e, a);
551
551
  if (t && n) {
552
- v = !0, g = z(t, s, i);
553
- let e = z(n, s, i);
552
+ v = !0, g = R(t, s, i);
553
+ let e = R(n, s, i);
554
554
  _ = Math.max(o, e - g);
555
555
  }
556
556
  }
@@ -572,41 +572,45 @@ function we(e, t, n) {
572
572
  });
573
573
  }
574
574
  //#endregion
575
- //#region src/components/Gantt/utils/cx.ts
576
- var J = (...e) => e.filter(Boolean).join(" ");
575
+ //#region src/components/Gantt/utils/theme/resolveGanttThemeVars.ts
576
+ var Oe = "#0265ff", ke = (e) => {
577
+ if (!e) return {};
578
+ let t = e.colorPrimary ?? Oe, n = {};
579
+ return a(n, "--bsy-mobile-gantt-color-text", e.colorText), a(n, "--bsy-mobile-gantt-color-text-secondary", e.colorTextSecondary), a(n, "--bsy-mobile-gantt-color-split", e.colorSplit), a(n, "--bsy-mobile-gantt-color-border", e.colorBorder), a(n, "--bsy-mobile-gantt-color-primary", e.colorPrimary), a(n, "--bsy-mobile-gantt-color-bg-container", e.colorBgContainer), a(n, "--bsy-mobile-gantt-color-bg-weekend", e.colorBgWeekend), a(n, "--bsy-mobile-gantt-color-today-line", e.todayLineColor ?? W(t, .2) ?? void 0), a(n, "--bsy-mobile-gantt-toolbar-today-hover-bg", e.toolbarTodayHoverBg ?? W(t, .1) ?? void 0), a(n, "--bsy-mobile-gantt-toolbar-icon-color", e.toolbarIconColor), a(n, "--bsy-mobile-gantt-toolbar-icon-hover-color", e.toolbarIconHoverColor), a(n, "--bsy-mobile-gantt-arrow-bg", e.arrowBg), a(n, "--bsy-mobile-gantt-toolbar-bg", e.toolbarBg), n;
580
+ }, K = (...e) => e.filter(Boolean).join(" ");
577
581
  //#endregion
578
582
  //#region src/components/Gantt/utils/calcTodayLeft.ts
579
- function Y(e, t, n, r, i = "day") {
583
+ function q(e, t, n, r, i = "day") {
580
584
  let a = r * n;
581
- if (L(i)) {
582
- let r = R(i), o = e.startOf("day"), s = e.diff(o, "millisecond"), c = Math.floor(s / r), l = o.add(c * r, "millisecond"), u = r / A / 2 * n, d = z(l, t, n) + u;
585
+ if (I(i)) {
586
+ let r = L(i), o = e.startOf("day"), s = e.diff(o, "millisecond"), c = Math.floor(s / r), l = o.add(c * r, "millisecond"), u = r / A / 2 * n, d = R(l, t, n) + u;
583
587
  return d < 0 || d >= a ? null : d;
584
588
  }
585
- let o = z(e.startOf("day"), t.startOf("day"), n);
589
+ let o = R(e.startOf("day"), t.startOf("day"), n);
586
590
  return o < 0 || o >= a ? null : o + n / 2;
587
591
  }
588
592
  //#endregion
589
593
  //#region src/components/Gantt/utils/msUntilNextDay.ts
590
- function Te(e) {
591
- let t = B(e);
594
+ function J(e) {
595
+ let t = z(e);
592
596
  return t.add(1, "day").startOf("day").add(1, "millisecond").valueOf() - t.valueOf();
593
597
  }
594
- function Ee(e, t) {
595
- if (t <= 0) return Te(e);
596
- let n = B(e), r = n.startOf("day"), i = n.valueOf() - r.valueOf(), a = Math.floor(i / t), o = r.valueOf() + (a + 1) * t + 1;
598
+ function Ae(e, t) {
599
+ if (t <= 0) return J(e);
600
+ let n = z(e), r = n.startOf("day"), i = n.valueOf() - r.valueOf(), a = Math.floor(i / t), o = r.valueOf() + (a + 1) * t + 1;
597
601
  return Math.max(1, o - n.valueOf());
598
602
  }
599
603
  //#endregion
600
604
  //#region src/components/Gantt/hooks/useTodayTracker.ts
601
- function X(e, t = "day") {
602
- let [n, r] = p(() => B(e)), i = f(e);
605
+ function Y(e, t = "day") {
606
+ let [n, r] = m(() => z(e)), i = p(e);
603
607
  i.current = e;
604
- let a = f(t);
608
+ let a = p(t);
605
609
  a.current = t;
606
- let o = s(() => B(i.current), []);
607
- return l(() => {
610
+ let o = c(() => z(i.current), []);
611
+ return u(() => {
608
612
  let e, t = () => {
609
- let n = a.current, s = i.current, c = L(n) ? Ee(s, R(n)) : Te(s);
613
+ let n = a.current, s = i.current, c = I(n) ? Ae(s, L(n)) : J(s);
610
614
  e = setTimeout(() => {
611
615
  r(o()), t();
612
616
  }, c);
@@ -626,112 +630,112 @@ function X(e, t = "day") {
626
630
  }
627
631
  //#endregion
628
632
  //#region src/components/Gantt/StickyLabel.tsx
629
- var De = ({ cell: e }) => /* @__PURE__ */ g("div", {
630
- className: x["bsy-mobile-gantt__sticky-label"],
633
+ var je = ({ cell: e }) => /* @__PURE__ */ _("div", {
634
+ className: S["bsy-mobile-gantt__sticky-label"],
631
635
  style: { width: e.widthPx },
632
- children: /* @__PURE__ */ g("div", {
633
- className: x["bsy-mobile-gantt__sticky-label-text"],
636
+ children: /* @__PURE__ */ _("div", {
637
+ className: S["bsy-mobile-gantt__sticky-label-text"],
634
638
  children: e.label
635
639
  })
636
- }), Oe = 34, ke = 8, Ae = 5, je = () => {
637
- let { t: e } = r(), { zoomLevel: t, pxPerDay: n, timeZone: i, startDate: a, count: o, totalWidth: s, totalDays: c } = w(), { horizontalScrollRef: l } = T(), u = X(i, t), f = d(() => U(a, o, t, u, e), [
640
+ }), Me = 34, Ne = 8, Pe = 5, Fe = () => {
641
+ let { t: e } = r(), { zoomLevel: t, pxPerDay: n, timeZone: i, startDate: a, count: o, totalWidth: s, totalDays: c } = T(), { horizontalScrollRef: l } = E(), u = Y(i, t), d = f(() => me(a, o, t, u, e), [
638
642
  a,
639
643
  o,
640
644
  t,
641
645
  u,
642
646
  e
643
- ]), p = d(() => de(f, t, n, e), [
644
- f,
647
+ ]), p = f(() => pe(d, t, n, e), [
648
+ d,
645
649
  t,
646
650
  n,
647
651
  e
648
- ]), m = d(() => Y(u, a, n, c, t), [
652
+ ]), m = f(() => q(u, a, n, c, t), [
649
653
  u,
650
654
  a,
651
655
  n,
652
656
  c,
653
657
  t
654
- ]), h = d(() => f.map((e) => e.days * n), [f, n]), v = b({
655
- count: f.length,
658
+ ]), h = f(() => d.map((e) => e.days * n), [d, n]), g = x({
659
+ count: d.length,
656
660
  getScrollElement: () => l.current,
657
661
  estimateSize: (e) => h[e],
658
662
  horizontal: !0,
659
- overscan: Ae
663
+ overscan: Pe
660
664
  });
661
- return /* @__PURE__ */ _("div", {
662
- className: x["bsy-mobile-gantt__header"],
665
+ return /* @__PURE__ */ v("div", {
666
+ className: S["bsy-mobile-gantt__header"],
663
667
  style: { width: s },
664
668
  children: [
665
- /* @__PURE__ */ g("div", {
666
- className: x["bsy-mobile-gantt__header-row1"],
667
- children: p.map((e) => /* @__PURE__ */ g(De, { cell: e }, `${e.label}-${e.startIndex}`))
669
+ /* @__PURE__ */ _("div", {
670
+ className: S["bsy-mobile-gantt__header-row1"],
671
+ children: p.map((e) => /* @__PURE__ */ _(je, { cell: e }, `${e.label}-${e.startIndex}`))
668
672
  }),
669
- /* @__PURE__ */ g("div", {
670
- className: x["bsy-mobile-gantt__header-row2"],
671
- style: { height: Oe },
672
- children: v.getVirtualItems().map((e) => {
673
- let t = f[e.index], n = Math.round(e.start), r = Math.max(1, Math.round(e.size));
674
- return /* @__PURE__ */ g("div", {
675
- className: x["bsy-mobile-gantt__header-cell"],
673
+ /* @__PURE__ */ _("div", {
674
+ className: S["bsy-mobile-gantt__header-row2"],
675
+ style: { height: Me },
676
+ children: g.getVirtualItems().map((e) => {
677
+ let t = d[e.index], n = Math.round(e.start), r = Math.max(1, Math.round(e.size));
678
+ return /* @__PURE__ */ _("div", {
679
+ className: S["bsy-mobile-gantt__header-cell"],
676
680
  style: {
677
681
  left: n,
678
682
  width: r,
679
683
  height: "100%"
680
684
  },
681
- children: /* @__PURE__ */ g("div", {
682
- className: J(x["bsy-mobile-gantt__header-cell-label"], t.isToday && x["bsy-mobile-gantt__header-cell-label--today"]),
683
- style: { lineHeight: `${Oe}px` },
685
+ children: /* @__PURE__ */ _("div", {
686
+ className: K(S["bsy-mobile-gantt__header-cell-label"], t.isToday && S["bsy-mobile-gantt__header-cell-label--today"]),
687
+ style: { lineHeight: `${Me}px` },
684
688
  children: t.label
685
689
  })
686
690
  }, e.index);
687
691
  })
688
692
  }),
689
- m === null ? null : /* @__PURE__ */ g("div", {
690
- className: x["bsy-mobile-gantt__today-dot"],
691
- style: { left: m - ke / 2 }
693
+ m === null ? null : /* @__PURE__ */ _("div", {
694
+ className: S["bsy-mobile-gantt__today-dot"],
695
+ style: { left: m - Ne / 2 }
692
696
  })
693
697
  ]
694
698
  });
695
- }, Me = 2, Ne = ({ today: e, startDate: t, pxPerDay: n, totalDays: r, zoomLevel: i }) => {
696
- let a = d(() => Y(e, t, n, r, i), [
699
+ }, Ie = 2, Le = ({ today: e, startDate: t, pxPerDay: n, totalDays: r, zoomLevel: i }) => {
700
+ let a = f(() => q(e, t, n, r, i), [
697
701
  e,
698
702
  t,
699
703
  n,
700
704
  r,
701
705
  i
702
706
  ]);
703
- return a === null ? null : /* @__PURE__ */ g("div", {
704
- className: x["bsy-mobile-gantt__today-line"],
707
+ return a === null ? null : /* @__PURE__ */ _("div", {
708
+ className: S["bsy-mobile-gantt__today-line"],
705
709
  style: {
706
- left: a - Me / 2,
707
- width: Me
710
+ left: a - Ie / 2,
711
+ width: Ie
708
712
  }
709
713
  });
710
- }, Pe = 26, Fe = 6, Z = 4;
711
- function Ie(e, t, n, r) {
712
- if (r > t - Z * 2) return "outside";
714
+ }, Re = 26, ze = 6, X = 4;
715
+ function Be(e, t, n, r) {
716
+ if (r > t - X * 2) return "outside";
713
717
  if (e < n) {
714
718
  let i = e + t - n;
715
- return r + Z > i ? "outside" : "overlay-sticky";
719
+ return r + X > i ? "outside" : "overlay-sticky";
716
720
  }
717
721
  return "inside";
718
722
  }
719
- var Le = o(({ bar: e, top: t, horizontalScrollRef: n, verticalScrollRef: r, overlayHost: i, onClick: a }) => {
720
- let o = e.progress > 0 ? Math.max(4, e.width * e.progress) : 0, s = be(e.bgColor), c = f(null), [l, d] = p(0);
721
- return u(() => {
723
+ var Ve = s(({ bar: e, top: t, horizontalScrollRef: n, verticalScrollRef: r, overlayHost: i, onClick: a }) => {
724
+ let o = e.progress > 0 ? Math.max(4, e.width * e.progress) : 0, s = Ce(e.bgColor), c = p(null), [l, u] = m(0);
725
+ return d(() => {
722
726
  if (!c.current || !e.label) {
723
- d(0);
727
+ u(0);
724
728
  return;
725
729
  }
726
- d(c.current.scrollWidth);
727
- }, [e.label]), u(() => {
730
+ u(c.current.scrollWidth);
731
+ }, [e.label]), d(() => {
728
732
  let a = c.current, o = n.current;
729
733
  if (!a || !o || !e.label) return;
730
734
  let u = document.createElement("span");
731
- u.className = x["bsy-mobile-gantt__bar-label-overlay"], u.textContent = e.label, u.style.display = "none", u.style.color = s, i?.appendChild(u);
735
+ u.className = S["bsy-mobile-gantt__bar-label-overlay"], u.textContent = e.label, u.style.display = "none", u.style.color = s, i?.appendChild(u);
732
736
  let d = () => {
733
- let { scrollLeft: n } = o, i = Ie(e.left, e.width, n, l), c = i === "outside", d = i === "overlay-sticky", f = e.left + e.width - n;
734
- d ? (a.style.visibility = "hidden", u.style.display = "block", u.style.top = `${t - (r.current?.scrollTop ?? 0)}px`, u.style.maxWidth = `${Math.max(0, f - Z * 2)}px`) : (a.style.visibility = "visible", u.style.display = "none", a.style.left = c ? `${e.width + Fe}px` : `${Z}px`, a.style.maxWidth = c ? "none" : `${e.width - Z * 2}px`, a.style.overflow = c ? "visible" : "hidden", a.style.textOverflow = c ? "clip" : "ellipsis", a.style.color = c ? "#000" : s);
737
+ let { scrollLeft: n } = o, i = Be(e.left, e.width, n, l), c = i === "outside", d = i === "overlay-sticky", f = e.left + e.width - n;
738
+ d ? (a.style.visibility = "hidden", u.style.display = "block", u.style.top = `${t - (r.current?.scrollTop ?? 0)}px`, u.style.maxWidth = `${Math.max(0, f - X * 2)}px`) : (a.style.visibility = "visible", u.style.display = "none", a.style.left = c ? `${e.width + ze}px` : `${X}px`, a.style.maxWidth = c ? "none" : `${e.width - X * 2}px`, a.style.overflow = c ? "visible" : "hidden", a.style.textOverflow = c ? "clip" : "ellipsis", a.style.color = c ? "#000" : s);
735
739
  };
736
740
  d(), o.addEventListener("scroll", d, { passive: !0 });
737
741
  let f = r.current;
@@ -748,70 +752,70 @@ var Le = o(({ bar: e, top: t, horizontalScrollRef: n, verticalScrollRef: r, over
748
752
  i,
749
753
  t,
750
754
  r
751
- ]), /* @__PURE__ */ _("div", {
752
- className: x["bsy-mobile-gantt__bar"],
755
+ ]), /* @__PURE__ */ v("div", {
756
+ className: S["bsy-mobile-gantt__bar"],
753
757
  style: {
754
758
  top: t,
755
759
  left: e.left,
756
760
  width: e.width,
757
- height: Pe
761
+ height: Re
758
762
  },
759
763
  onClick: () => a?.(e.task),
760
764
  children: [
761
- /* @__PURE__ */ g("div", {
762
- className: x["bsy-mobile-gantt__bar-track"],
765
+ /* @__PURE__ */ _("div", {
766
+ className: S["bsy-mobile-gantt__bar-track"],
763
767
  style: { backgroundColor: e.bgColor }
764
768
  }),
765
- o > 0 ? /* @__PURE__ */ g("div", {
766
- className: x["bsy-mobile-gantt__bar-progress"],
769
+ o > 0 ? /* @__PURE__ */ _("div", {
770
+ className: S["bsy-mobile-gantt__bar-progress"],
767
771
  style: {
768
772
  width: o,
769
773
  backgroundColor: e.color,
770
774
  borderRadius: e.progress === 1 ? 4 : "4px 0 0 4px"
771
775
  }
772
776
  }) : null,
773
- e.label ? /* @__PURE__ */ g("span", {
777
+ e.label ? /* @__PURE__ */ _("span", {
774
778
  ref: c,
775
- className: x["bsy-mobile-gantt__bar-label"],
779
+ className: S["bsy-mobile-gantt__bar-label"],
776
780
  style: {
777
- left: Z,
778
- maxWidth: e.width - Z * 2,
779
- lineHeight: `${Pe}px`,
781
+ left: X,
782
+ maxWidth: e.width - X * 2,
783
+ lineHeight: `${Re}px`,
780
784
  color: s
781
785
  },
782
786
  children: e.label
783
787
  }) : null
784
788
  ]
785
789
  });
786
- }), Re = o(({ direction: e, edge: t, offset: n, onClick: i }) => {
790
+ }), He = s(({ direction: e, edge: t, offset: n, onClick: i }) => {
787
791
  let { t: a } = r();
788
- return /* @__PURE__ */ g("button", {
792
+ return /* @__PURE__ */ _("button", {
789
793
  type: "button",
790
- className: J(x["bsy-mobile-gantt__offscreen-arrow"], t === "right" && x["bsy-mobile-gantt__offscreen-arrow--right"]),
794
+ className: K(S["bsy-mobile-gantt__offscreen-arrow"], t === "right" && S["bsy-mobile-gantt__offscreen-arrow--right"]),
791
795
  style: { [t]: n },
792
796
  onClick: i,
793
797
  "aria-label": a("gantt.locateTask"),
794
- children: /* @__PURE__ */ g("svg", {
798
+ children: /* @__PURE__ */ _("svg", {
795
799
  width: "16",
796
800
  height: "16",
797
801
  viewBox: "0 0 16 16",
798
802
  "aria-hidden": "true",
799
- children: e === "left" ? /* @__PURE__ */ g("path", {
803
+ children: e === "left" ? /* @__PURE__ */ _("path", {
800
804
  d: "M10 12L6 8l4-4",
801
805
  fill: "none",
802
- stroke: "#666",
806
+ stroke: "currentColor",
803
807
  strokeWidth: "1.5"
804
- }) : /* @__PURE__ */ g("path", {
808
+ }) : /* @__PURE__ */ _("path", {
805
809
  d: "M6 4l4 4-4 4",
806
810
  fill: "none",
807
- stroke: "#666",
811
+ stroke: "currentColor",
808
812
  strokeWidth: "1.5"
809
813
  })
810
814
  })
811
815
  });
812
- }), ze = 24, Be = 4, Ve = o(({ virtualRows: e, bars: t, horizontalScrollRef: n, viewportWidth: r, rowHeight: i, onNavigate: a }) => {
813
- let [o, s] = p(() => n.current?.scrollLeft ?? 0), c = f(0);
814
- l(() => {
816
+ }), Z = 24, Ue = 4, We = s(({ virtualRows: e, bars: t, horizontalScrollRef: n, viewportWidth: r, rowHeight: i, onNavigate: a }) => {
817
+ let [o, s] = m(() => n.current?.scrollLeft ?? 0), c = p(0);
818
+ u(() => {
815
819
  let e = n.current;
816
820
  if (!e) return;
817
821
  let t = () => {
@@ -823,59 +827,59 @@ var Le = o(({ bar: e, top: t, horizontalScrollRef: n, verticalScrollRef: r, over
823
827
  e.removeEventListener("scroll", t), cancelAnimationFrame(c.current);
824
828
  };
825
829
  }, [n]);
826
- let u = o + r;
827
- return /* @__PURE__ */ g("div", {
828
- className: x["bsy-mobile-gantt__offscreen"],
829
- children: /* @__PURE__ */ g("div", {
830
- className: x["bsy-mobile-gantt__offscreen-layer"],
830
+ let l = o + r;
831
+ return /* @__PURE__ */ _("div", {
832
+ className: S["bsy-mobile-gantt__offscreen"],
833
+ children: /* @__PURE__ */ _("div", {
834
+ className: S["bsy-mobile-gantt__offscreen-layer"],
831
835
  children: e.map((e) => {
832
836
  let n = t[e.index];
833
837
  if (!n || !n.hasTimeRange) return null;
834
- let r = n.left + n.width < o, s = n.left > u;
835
- return !r && !s ? null : /* @__PURE__ */ _("div", {
836
- className: x["bsy-mobile-gantt__offscreen-row"],
838
+ let r = n.left + n.width < o, s = n.left > l;
839
+ return !r && !s ? null : /* @__PURE__ */ v("div", {
840
+ className: S["bsy-mobile-gantt__offscreen-row"],
837
841
  style: {
838
- top: e.start + (i - ze) / 2,
839
- height: ze
842
+ top: e.start + (i - Z) / 2,
843
+ height: Z
840
844
  },
841
- children: [r ? /* @__PURE__ */ g(Re, {
845
+ children: [r ? /* @__PURE__ */ _(He, {
842
846
  direction: "left",
843
847
  edge: "left",
844
- offset: Be,
848
+ offset: Ue,
845
849
  onClick: () => a(n.startDate)
846
- }) : null, s ? /* @__PURE__ */ g(Re, {
850
+ }) : null, s ? /* @__PURE__ */ _(He, {
847
851
  direction: "right",
848
852
  edge: "right",
849
- offset: Be,
853
+ offset: Ue,
850
854
  onClick: () => a(n.startDate)
851
855
  }) : null]
852
856
  }, `overlay-${n.id}`);
853
857
  })
854
858
  })
855
859
  });
856
- }), He = 5, Ue = 5, Q = 28, We = 4, Ge = ({ bars: e, onTaskClick: t, overlayHostRef: n }) => {
857
- let { zoomLevel: r, pxPerDay: i, timeZone: a, startDate: o, count: s, totalWidth: c, totalDays: u, viewportWidth: v } = w(), { horizontalScrollRef: y, navigateToBar: S } = T(), C = X(a, r), E = d(() => U(o, s, r, C), [
860
+ }), Ge = 5, Ke = 5, Q = 28, qe = 4, Je = ({ bars: e, onTaskClick: t, overlayHostRef: n }) => {
861
+ let { zoomLevel: r, pxPerDay: i, timeZone: a, startDate: o, count: s, totalWidth: c, totalDays: l, viewportWidth: d } = T(), { horizontalScrollRef: y, navigateToBar: b } = E(), C = Y(a, r), w = f(() => me(o, s, r, C), [
858
862
  o,
859
863
  s,
860
864
  r,
861
865
  C
862
- ]), D = e.length, O = Math.max(D * Q + We, 0), k = f(null), A = d(() => E.map((e) => e.days * i), [E, i]), j = b({
863
- count: E.length,
866
+ ]), D = e.length, O = Math.max(D * Q + qe, 0), k = p(null), ee = f(() => w.map((e) => e.days * i), [w, i]), A = x({
867
+ count: w.length,
864
868
  getScrollElement: () => y.current,
865
- estimateSize: (e) => A[e],
869
+ estimateSize: (e) => ee[e],
866
870
  horizontal: !0,
867
- overscan: He
868
- }), M = b({
871
+ overscan: Ge
872
+ }), j = x({
869
873
  count: D,
870
874
  getScrollElement: () => k.current,
871
875
  estimateSize: () => Q,
872
- paddingStart: We,
873
- overscan: Ue
874
- }).getVirtualItems(), [N, P] = p(null);
875
- return l(() => {
876
- P(n?.current ?? null);
877
- }, [n]), l(() => {
878
- let e = k.current, t = N;
876
+ paddingStart: qe,
877
+ overscan: Ke
878
+ }).getVirtualItems(), [M, N] = m(null);
879
+ return u(() => {
880
+ N(n?.current ?? null);
881
+ }, [n]), u(() => {
882
+ let e = k.current, t = M;
879
883
  if (!e || !t) return;
880
884
  let n = 0, r = () => {
881
885
  n ||= window.requestAnimationFrame(() => {
@@ -885,116 +889,116 @@ var Le = o(({ bar: e, top: t, horizontalScrollRef: n, verticalScrollRef: r, over
885
889
  return t.style.setProperty("--gantt-overlay-translate-y", `${-e.scrollTop}px`), e.addEventListener("scroll", r, { passive: !0 }), () => {
886
890
  e.removeEventListener("scroll", r), n && window.cancelAnimationFrame(n);
887
891
  };
888
- }, [N]), /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
892
+ }, [M]), /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
889
893
  ref: k,
890
- className: x["bsy-mobile-gantt__timeline"],
894
+ className: S["bsy-mobile-gantt__timeline"],
891
895
  style: { width: c },
892
- children: /* @__PURE__ */ _("div", {
893
- className: x["bsy-mobile-gantt__timeline-inner"],
896
+ children: /* @__PURE__ */ v("div", {
897
+ className: S["bsy-mobile-gantt__timeline-inner"],
894
898
  style: {
895
899
  width: c,
896
900
  height: O || "100%"
897
901
  },
898
902
  children: [
899
- j.getVirtualItems().map((e) => /* @__PURE__ */ g("div", {
900
- className: J(x["bsy-mobile-gantt__column"], r === "day" && E[e.index]?.isWeekend && x["bsy-mobile-gantt__column--weekend"]),
903
+ A.getVirtualItems().map((e) => /* @__PURE__ */ _("div", {
904
+ className: K(S["bsy-mobile-gantt__column"], r === "day" && w[e.index]?.isWeekend && S["bsy-mobile-gantt__column--weekend"]),
901
905
  style: {
902
906
  width: e.size,
903
907
  transform: `translateX(${e.start}px)`
904
908
  }
905
909
  }, e.index)),
906
- /* @__PURE__ */ g(Ne, {
910
+ /* @__PURE__ */ _(Le, {
907
911
  today: C,
908
912
  startDate: o,
909
913
  pxPerDay: i,
910
- totalDays: u,
914
+ totalDays: l,
911
915
  zoomLevel: r
912
916
  }),
913
- M.map((n) => {
917
+ j.map((n) => {
914
918
  let r = e[n.index];
915
- return !r || !r.hasTimeRange ? null : /* @__PURE__ */ g(Le, {
919
+ return !r || !r.hasTimeRange ? null : /* @__PURE__ */ _(Ve, {
916
920
  bar: r,
917
921
  top: n.start,
918
922
  horizontalScrollRef: y,
919
923
  verticalScrollRef: k,
920
- overlayHost: N,
924
+ overlayHost: M,
921
925
  onClick: t
922
926
  }, r.id);
923
927
  })
924
928
  ]
925
929
  })
926
- }), N ? m(/* @__PURE__ */ g(Ve, {
927
- virtualRows: M,
930
+ }), M ? h(/* @__PURE__ */ _(We, {
931
+ virtualRows: j,
928
932
  bars: e,
929
933
  horizontalScrollRef: y,
930
- viewportWidth: v,
934
+ viewportWidth: d,
931
935
  rowHeight: Q,
932
- onNavigate: S
933
- }), N) : null] });
934
- }, $ = ({ direction: e }) => /* @__PURE__ */ g("svg", {
935
- className: J(x["bsy-mobile-gantt__chevron"], e === "left" && x["bsy-mobile-gantt__chevron--left"], e === "right" && x["bsy-mobile-gantt__chevron--right"]),
936
+ onNavigate: b
937
+ }), M) : null] });
938
+ }, $ = ({ direction: e }) => /* @__PURE__ */ _("svg", {
939
+ className: K(S["bsy-mobile-gantt__chevron"], e === "left" && S["bsy-mobile-gantt__chevron--left"], e === "right" && S["bsy-mobile-gantt__chevron--right"]),
936
940
  width: "16",
937
941
  height: "16",
938
942
  viewBox: "0 0 16 16",
939
943
  "aria-hidden": "true",
940
- children: /* @__PURE__ */ g("path", {
944
+ children: /* @__PURE__ */ _("path", {
941
945
  d: "M4 6l4 4 4-4",
942
946
  fill: "none",
943
947
  stroke: "currentColor",
944
948
  strokeWidth: "1.5"
945
949
  })
946
- }), Ke = () => {
947
- let { t } = r(), { zoomLevel: n, viewportWidth: i, totalWidth: a } = w(), { setZoomLevel: o, getScrollLeft: c, scrollToX: l, handleTodayClick: u } = T(), [d, f] = p(!1), m = s(() => {
948
- l(Math.max(0, c() - i), "smooth");
950
+ }), Ye = () => {
951
+ let { t } = r(), { zoomLevel: n, viewportWidth: i, totalWidth: a } = T(), { setZoomLevel: o, getScrollLeft: s, scrollToX: l, handleTodayClick: u } = E(), [d, f] = m(!1), p = c(() => {
952
+ l(Math.max(0, s() - i), "smooth");
949
953
  }, [
950
- c,
954
+ s,
951
955
  l,
952
956
  i
953
- ]), v = s(() => {
957
+ ]), h = c(() => {
954
958
  let e = Math.max(0, a - i);
955
- l(Math.min(c() + i, e), "smooth");
959
+ l(Math.min(s() + i, e), "smooth");
956
960
  }, [
957
- c,
961
+ s,
958
962
  l,
959
963
  i,
960
964
  a
961
965
  ]);
962
- return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("div", {
963
- className: x["bsy-mobile-gantt__toolbar"],
966
+ return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
967
+ className: S["bsy-mobile-gantt__toolbar"],
964
968
  children: [
965
- /* @__PURE__ */ _("button", {
969
+ /* @__PURE__ */ v("button", {
966
970
  type: "button",
967
- className: x["bsy-mobile-gantt__toolbar-zoom"],
971
+ className: S["bsy-mobile-gantt__toolbar-zoom"],
968
972
  onClick: () => f(!0),
969
- children: [/* @__PURE__ */ g("span", { children: t(`gantt.zoom.${n}`) }), /* @__PURE__ */ g($, { direction: "down" })]
973
+ children: [/* @__PURE__ */ _("span", { children: t(`gantt.zoom.${n}`) }), /* @__PURE__ */ _($, { direction: "down" })]
970
974
  }),
971
- /* @__PURE__ */ g("div", { className: x["bsy-mobile-gantt__toolbar-divider"] }),
972
- /* @__PURE__ */ g("button", {
975
+ /* @__PURE__ */ _("div", { className: S["bsy-mobile-gantt__toolbar-divider"] }),
976
+ /* @__PURE__ */ _("button", {
973
977
  type: "button",
974
- className: x["bsy-mobile-gantt__toolbar-today"],
978
+ className: S["bsy-mobile-gantt__toolbar-today"],
975
979
  onClick: u,
976
980
  children: t("gantt.today")
977
981
  }),
978
- /* @__PURE__ */ g("button", {
982
+ /* @__PURE__ */ _("button", {
979
983
  type: "button",
980
- className: x["bsy-mobile-gantt__toolbar-nav"],
981
- onClick: m,
984
+ className: S["bsy-mobile-gantt__toolbar-nav"],
985
+ onClick: p,
982
986
  "aria-label": t("gantt.prevScreen"),
983
- children: /* @__PURE__ */ g($, { direction: "left" })
987
+ children: /* @__PURE__ */ _($, { direction: "left" })
984
988
  }),
985
- /* @__PURE__ */ g("button", {
989
+ /* @__PURE__ */ _("button", {
986
990
  type: "button",
987
- className: x["bsy-mobile-gantt__toolbar-nav"],
988
- onClick: v,
991
+ className: S["bsy-mobile-gantt__toolbar-nav"],
992
+ onClick: h,
989
993
  "aria-label": t("gantt.nextScreen"),
990
- children: /* @__PURE__ */ g($, { direction: "right" })
994
+ children: /* @__PURE__ */ _($, { direction: "right" })
991
995
  })
992
996
  ]
993
- }), /* @__PURE__ */ g(e, {
997
+ }), /* @__PURE__ */ _(e, {
994
998
  open: d,
995
999
  onClose: () => f(!1),
996
1000
  title: t("gantt.zoomSheetTitle"),
997
- actions: k.map((e) => ({
1001
+ actions: ee.map((e) => ({
998
1002
  key: e,
999
1003
  text: t(`gantt.zoom.${e}`),
1000
1004
  selected: n === e
@@ -1003,92 +1007,93 @@ var Le = o(({ bar: e, top: t, horizontalScrollRef: n, verticalScrollRef: r, over
1003
1007
  o(e.key), f(!1);
1004
1008
  }
1005
1009
  })] });
1006
- }, qe = 88, Je = (e) => {
1007
- let { tasks: t = [], timeZone: n, className: r, onTaskClick: i } = e, [a, o] = v(e, {
1010
+ }, Xe = 88, Ze = (e) => {
1011
+ let { tasks: t = [], timeZone: n, className: r, onTaskClick: i, theme: a } = e, [o, s] = y(e, {
1008
1012
  defaultValue: "day",
1009
1013
  defaultValuePropName: "defaultZoomLevel",
1010
1014
  valuePropName: "zoomLevel",
1011
1015
  trigger: "onZoomChange"
1012
- }), s = f(null), c = pe({
1016
+ }), c = p(null), l = ge({
1013
1017
  timeZone: n,
1014
- initialZoomLevel: a
1015
- }), l = ge(c, { onZoomLevelChange: o }), u = d(() => we(t, {
1016
- startDate: c.startDate,
1017
- pxPerDay: c.pxPerDay,
1018
- zoomLevel: c.zoomLevel
1018
+ initialZoomLevel: o
1019
+ }), u = be(l, { onZoomLevelChange: s }), d = f(() => De(t, {
1020
+ startDate: l.startDate,
1021
+ pxPerDay: l.pxPerDay,
1022
+ zoomLevel: l.zoomLevel
1019
1023
  }, n), [
1020
1024
  t,
1021
- c.startDate,
1022
- c.pxPerDay,
1023
- c.zoomLevel,
1025
+ l.startDate,
1026
+ l.pxPerDay,
1027
+ l.zoomLevel,
1024
1028
  n
1025
- ]), p = d(() => ({
1026
- zoomLevel: c.zoomLevel,
1027
- pxPerDay: c.pxPerDay,
1029
+ ]), m = f(() => ({
1030
+ zoomLevel: l.zoomLevel,
1031
+ pxPerDay: l.pxPerDay,
1028
1032
  timeZone: n,
1029
- viewportWidth: c.viewportWidth,
1030
- anchorDate: c.anchorDate,
1031
- startDate: c.startDate,
1032
- count: c.count,
1033
- totalDays: c.totalDays,
1034
- totalWidth: c.totalWidth
1033
+ viewportWidth: l.viewportWidth,
1034
+ anchorDate: l.anchorDate,
1035
+ startDate: l.startDate,
1036
+ count: l.count,
1037
+ totalDays: l.totalDays,
1038
+ totalWidth: l.totalWidth
1035
1039
  }), [
1036
- c.zoomLevel,
1037
- c.pxPerDay,
1040
+ l.zoomLevel,
1041
+ l.pxPerDay,
1038
1042
  n,
1039
- c.viewportWidth,
1040
- c.anchorDate,
1041
- c.startDate,
1042
- c.count,
1043
- c.totalDays,
1044
- c.totalWidth
1045
- ]), m = d(() => ({
1046
- setZoomLevel: l.setZoomLevel,
1047
- horizontalScrollRef: l.horizontalScrollRef,
1048
- scrollToX: l.scrollToX,
1049
- getScrollLeft: l.getScrollLeft,
1050
- handleTodayClick: l.handleTodayClick,
1051
- navigateToBar: l.navigateToBar
1043
+ l.viewportWidth,
1044
+ l.anchorDate,
1045
+ l.startDate,
1046
+ l.count,
1047
+ l.totalDays,
1048
+ l.totalWidth
1049
+ ]), h = f(() => ({
1050
+ setZoomLevel: u.setZoomLevel,
1051
+ horizontalScrollRef: u.horizontalScrollRef,
1052
+ scrollToX: u.scrollToX,
1053
+ getScrollLeft: u.getScrollLeft,
1054
+ handleTodayClick: u.handleTodayClick,
1055
+ navigateToBar: u.navigateToBar
1052
1056
  }), [
1053
- l.setZoomLevel,
1054
- l.horizontalScrollRef,
1055
- l.scrollToX,
1056
- l.getScrollLeft,
1057
- l.handleTodayClick,
1058
- l.navigateToBar
1059
- ]);
1060
- return /* @__PURE__ */ g(S.Provider, {
1061
- value: p,
1062
- children: /* @__PURE__ */ g(C.Provider, {
1063
- value: m,
1064
- children: /* @__PURE__ */ _("div", {
1065
- ref: c.containerRef,
1066
- className: J(x["bsy-mobile-gantt"], r),
1057
+ u.setZoomLevel,
1058
+ u.horizontalScrollRef,
1059
+ u.scrollToX,
1060
+ u.getScrollLeft,
1061
+ u.handleTodayClick,
1062
+ u.navigateToBar
1063
+ ]), g = f(() => ke(a), [a]);
1064
+ return /* @__PURE__ */ _(C.Provider, {
1065
+ value: m,
1066
+ children: /* @__PURE__ */ _(w.Provider, {
1067
+ value: h,
1068
+ children: /* @__PURE__ */ v("div", {
1069
+ ref: l.containerRef,
1070
+ className: K(S["bsy-mobile-gantt"], r),
1071
+ style: g,
1067
1072
  children: [
1068
- /* @__PURE__ */ g("div", {
1069
- ref: l.horizontalScrollRef,
1070
- className: x["bsy-mobile-gantt__scroll"],
1071
- onScroll: l.handleHorizontalScroll,
1072
- children: /* @__PURE__ */ _("div", {
1073
- className: x["bsy-mobile-gantt__canvas"],
1074
- style: { width: c.totalWidth },
1075
- children: [/* @__PURE__ */ g(je, {}), /* @__PURE__ */ g(Ge, {
1076
- bars: u,
1073
+ /* @__PURE__ */ _("div", {
1074
+ ref: u.horizontalScrollRef,
1075
+ className: S["bsy-mobile-gantt__scroll"],
1076
+ onScroll: u.handleHorizontalScroll,
1077
+ children: /* @__PURE__ */ v("div", {
1078
+ className: S["bsy-mobile-gantt__canvas"],
1079
+ style: { width: l.totalWidth },
1080
+ children: [/* @__PURE__ */ _(Fe, {}), /* @__PURE__ */ _(Je, {
1081
+ bars: d,
1077
1082
  onTaskClick: i,
1078
- overlayHostRef: s
1083
+ overlayHostRef: c
1079
1084
  })]
1080
1085
  })
1081
1086
  }),
1082
- /* @__PURE__ */ g("div", {
1083
- ref: s,
1084
- className: x["bsy-mobile-gantt__overlay-host"],
1085
- style: { top: qe }
1087
+ /* @__PURE__ */ _("div", {
1088
+ ref: c,
1089
+ className: S["bsy-mobile-gantt__overlay-host"],
1090
+ style: { top: Xe }
1086
1091
  }),
1087
- /* @__PURE__ */ g(Ke, {})
1092
+ /* @__PURE__ */ _(Ye, {})
1088
1093
  ]
1089
1094
  })
1090
1095
  })
1091
1096
  });
1092
1097
  };
1093
1098
  //#endregion
1094
- export { O as n, Je as t };
1099
+ export { k as n, Ze as t };