@art-tools/react-gantt 0.2.0 → 0.2.1

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.
package/dist/index.mjs CHANGED
@@ -1823,14 +1823,64 @@ function Hn({ anchorRef: e, children: t }) {
1823
1823
  });
1824
1824
  }
1825
1825
  //#endregion
1826
+ //#region src/components/bars/barTooltip/useTooltipPosition.ts
1827
+ var Un = 12, Wn = 8, Gn = null;
1828
+ function Kn(e, t) {
1829
+ Gn = {
1830
+ x: e,
1831
+ y: t
1832
+ };
1833
+ }
1834
+ function qn(e, t, n, r) {
1835
+ let i = e + Un, a = i + t <= r - Wn;
1836
+ return Math.max(a ? i : e - Un - t, n + Wn);
1837
+ }
1838
+ var Jn = (e, t) => {
1839
+ let n = s(dn)?.gridRef, [r, i] = m({
1840
+ left: -9999,
1841
+ top: -9999
1842
+ }), a = c(r);
1843
+ return vt(() => {
1844
+ if (!t) return;
1845
+ let r = (t, r) => {
1846
+ let a = n?.current?.getBoundingClientRect(), o = a && a.width > 0 && a.height > 0 ? {
1847
+ left: a.left,
1848
+ top: a.top,
1849
+ right: a.right,
1850
+ bottom: a.bottom
1851
+ } : {
1852
+ left: 0,
1853
+ top: 0,
1854
+ right: window.innerWidth,
1855
+ bottom: window.innerHeight
1856
+ };
1857
+ if (t < o.left || t > o.right || r < o.top || r > o.bottom) return;
1858
+ let s = e.current?.getBoundingClientRect(), c = s?.width ?? 0, l = s?.height ?? 0, u = qn(t, c, o.left, o.right), d = qn(r, l, o.top, o.bottom);
1859
+ i((e) => e.left === u && e.top === d ? e : {
1860
+ left: u,
1861
+ top: d
1862
+ });
1863
+ };
1864
+ Gn && r(Gn.x, Gn.y);
1865
+ let a = (e) => r(e.clientX, e.clientY);
1866
+ return window.addEventListener("mousemove", a), () => {
1867
+ window.removeEventListener("mousemove", a);
1868
+ };
1869
+ }, [
1870
+ e,
1871
+ n,
1872
+ t
1873
+ ]), a;
1874
+ };
1875
+ //#endregion
1826
1876
  //#region src/components/bars/barTooltip/BarTooltipTrigger.tsx
1827
- function Un({ children: e }) {
1877
+ function Yn({ children: e }) {
1828
1878
  let n = Vn(), i = n?.open ?? !1, a = n?.setOpen, o = n?.anchorRef;
1829
1879
  if (l(() => {
1830
1880
  if (!i || !a) return;
1831
1881
  let e = () => a(!1), t = (e) => {
1832
- let t = o?.current?.getBoundingClientRect();
1833
- !t || t.width === 0 || t.height === 0 || e.clientX >= t.left && e.clientX <= t.right && e.clientY >= t.top && e.clientY <= t.bottom || a(!1);
1882
+ let t = o?.current, n = e.target;
1883
+ !t || !(n instanceof Node) || t.contains(n) || a(!1);
1834
1884
  };
1835
1885
  return document.addEventListener("scroll", e, {
1836
1886
  capture: !0,
@@ -1846,7 +1896,7 @@ function Un({ children: e }) {
1846
1896
  let { onMouseEnter: s, onMouseLeave: c } = e.props;
1847
1897
  return t(e, {
1848
1898
  onMouseEnter: (e) => {
1849
- s?.(e), a(!0);
1899
+ s?.(e), Kn(e.clientX, e.clientY), a(!0);
1850
1900
  },
1851
1901
  onMouseLeave: (e) => {
1852
1902
  c?.(e), a(!1);
@@ -1854,58 +1904,16 @@ function Un({ children: e }) {
1854
1904
  });
1855
1905
  }
1856
1906
  //#endregion
1857
- //#region src/components/bars/barTooltip/useTooltipPosition.ts
1858
- var Wn = 12, Gn = 8;
1859
- function Kn(e, t, n, r) {
1860
- let i = e + Wn, a = i + t <= r - Gn;
1861
- return Math.max(a ? i : e - Wn - t, n + Gn);
1862
- }
1863
- var qn = (e, t) => {
1864
- let n = s(dn)?.gridRef, [r, i] = m({
1865
- left: -9999,
1866
- top: -9999
1867
- }), a = c(r);
1868
- return l(() => {
1869
- if (!t) return;
1870
- let r = (t) => {
1871
- let { clientX: r, clientY: a } = t, o = n?.current?.getBoundingClientRect(), s = o && o.width > 0 && o.height > 0 ? {
1872
- left: o.left,
1873
- top: o.top,
1874
- right: o.right,
1875
- bottom: o.bottom
1876
- } : {
1877
- left: 0,
1878
- top: 0,
1879
- right: window.innerWidth,
1880
- bottom: window.innerHeight
1881
- };
1882
- if (r < s.left || r > s.right || a < s.top || a > s.bottom) return;
1883
- let c = e.current?.getBoundingClientRect(), l = c?.width ?? 0, u = c?.height ?? 0, d = Kn(r, l, s.left, s.right), f = Kn(a, u, s.top, s.bottom);
1884
- i((e) => e.left === d && e.top === f ? e : {
1885
- left: d,
1886
- top: f
1887
- });
1888
- };
1889
- return window.addEventListener("mousemove", r), () => {
1890
- window.removeEventListener("mousemove", r);
1891
- };
1892
- }, [
1893
- e,
1894
- n,
1895
- t
1896
- ]), a;
1897
- };
1898
- //#endregion
1899
1907
  //#region src/components/bars/barTooltip/BarTooltip.tsx
1900
- function Jn(e) {
1908
+ function Xn(e) {
1901
1909
  return e ? e.toLocaleDateString(void 0, {
1902
1910
  year: "numeric",
1903
1911
  month: "short",
1904
1912
  day: "numeric"
1905
1913
  }) : "—";
1906
1914
  }
1907
- function Yn({ task: e, progress: t, displayEnd: n, className: r, style: i, ...a }) {
1908
- let o = p(null), s = Vn()?.open ?? !1, c = qn(o, s);
1915
+ function Zn({ task: e, progress: t, displayEnd: n, className: r, style: i, ...a }) {
1916
+ let o = p(null), s = Vn()?.open ?? !1, c = Jn(o, s);
1909
1917
  return !s || typeof document > "u" ? null : h(/* @__PURE__ */ y("div", {
1910
1918
  role: "tooltip",
1911
1919
  ref: o,
@@ -1925,14 +1933,14 @@ function Yn({ task: e, progress: t, displayEnd: n, className: r, style: i, ...a
1925
1933
  children: [/* @__PURE__ */ v("span", {
1926
1934
  className: X.label,
1927
1935
  children: "Start"
1928
- }), /* @__PURE__ */ v("span", { children: Jn(e.startDate) })]
1936
+ }), /* @__PURE__ */ v("span", { children: Xn(e.startDate) })]
1929
1937
  }),
1930
1938
  /* @__PURE__ */ y("div", {
1931
1939
  className: X.row,
1932
1940
  children: [/* @__PURE__ */ v("span", {
1933
1941
  className: X.label,
1934
1942
  children: "End"
1935
- }), /* @__PURE__ */ v("span", { children: Jn(n) })]
1943
+ }), /* @__PURE__ */ v("span", { children: Xn(n) })]
1936
1944
  }),
1937
1945
  /* @__PURE__ */ y("div", {
1938
1946
  className: X.row,
@@ -1944,10 +1952,10 @@ function Yn({ task: e, progress: t, displayEnd: n, className: r, style: i, ...a
1944
1952
  ]
1945
1953
  }), document.body);
1946
1954
  }
1947
- function Xn({ task: e, progress: t, displayEnd: n, anchorRef: r, className: i, style: a, children: o, ...s }) {
1955
+ function Qn({ task: e, progress: t, displayEnd: n, anchorRef: r, className: i, style: a, children: o, ...s }) {
1948
1956
  return /* @__PURE__ */ y(Hn, {
1949
1957
  anchorRef: r,
1950
- children: [/* @__PURE__ */ v(Un, { children: o }), /* @__PURE__ */ v(Yn, {
1958
+ children: [/* @__PURE__ */ v(Yn, { children: o }), /* @__PURE__ */ v(Zn, {
1951
1959
  task: e,
1952
1960
  progress: t,
1953
1961
  displayEnd: n,
@@ -1959,7 +1967,7 @@ function Xn({ task: e, progress: t, displayEnd: n, anchorRef: r, className: i, s
1959
1967
  }
1960
1968
  //#endregion
1961
1969
  //#region src/components/bars/barTooltip/BarTooltipConsumer.tsx
1962
- function Zn({ children: e, tooltip: t, anchorRef: n }) {
1970
+ function $n({ children: e, tooltip: t, anchorRef: n }) {
1963
1971
  let r = J().bars?.tooltip, i = r?.slots?.tooltip;
1964
1972
  return !i || !t ? e : /* @__PURE__ */ v(i, {
1965
1973
  ...Y({}, r?.slotProps?.tooltip, t),
@@ -1970,7 +1978,7 @@ function Zn({ children: e, tooltip: t, anchorRef: n }) {
1970
1978
  }
1971
1979
  //#endregion
1972
1980
  //#region src/components/bars/common/DraggableBar.tsx
1973
- function Qn({ left: e, top: t, width: n, height: r, colWidth: i, dragAnchor: a, className: o, title: s, style: c, onMove: l, onMoveEnd: u, tooltip: d, onMouseEnter: f, onMouseLeave: m, children: h, ...g }) {
1981
+ function er({ left: e, top: t, width: n, height: r, colWidth: i, dragAnchor: a, className: o, title: s, style: c, onMove: l, onMoveEnd: u, tooltip: d, onMouseEnter: f, onMouseLeave: m, children: h, ...g }) {
1974
1982
  let _ = p(null), y = !l && !u, b = zn({
1975
1983
  onStart: () => ({ start: a }),
1976
1984
  onDrag: (e, { start: t }) => l?.(t + e),
@@ -1980,7 +1988,7 @@ function Qn({ left: e, top: t, width: n, height: r, colWidth: i, dragAnchor: a,
1980
1988
  },
1981
1989
  autoScroll: !0
1982
1990
  }), x = !!(l || u);
1983
- return /* @__PURE__ */ v(Zn, {
1991
+ return /* @__PURE__ */ v($n, {
1984
1992
  tooltip: d,
1985
1993
  anchorRef: _,
1986
1994
  children: /* @__PURE__ */ v("div", {
@@ -2003,22 +2011,22 @@ function Qn({ left: e, top: t, width: n, height: r, colWidth: i, dragAnchor: a,
2003
2011
  })
2004
2012
  });
2005
2013
  }
2006
- var $n = {
2014
+ var tr = {
2007
2015
  milestone: "_milestone_o4jql_1",
2008
2016
  milestoneShape: "_milestoneShape_o4jql_5"
2009
2017
  };
2010
2018
  //#endregion
2011
2019
  //#region src/components/bars/milestoneBar/MilestoneBar.tsx
2012
- function er({ size: e, centerLeft: t, top: n, colWidth: r, title: i, a11y: a, onMove: o, onMoveEnd: s, tooltip: c, slots: l, slotProps: u }) {
2020
+ function nr({ size: e, centerLeft: t, top: n, colWidth: r, title: i, a11y: a, onMove: o, onMoveEnd: s, tooltip: c, slots: l, slotProps: u }) {
2013
2021
  let d = J(), f = l ?? d.bars?.milestoneBar?.slots, p = u ?? d.bars?.milestoneBar?.slotProps, m = {
2014
2022
  size: e,
2015
2023
  title: i
2016
- }, h = f?.root ?? Qn, g = f?.shape ?? "div", _ = Y({
2017
- className: $n.milestone,
2024
+ }, h = f?.root ?? er, g = f?.shape ?? "div", _ = Y({
2025
+ className: tr.milestone,
2018
2026
  ...a,
2019
2027
  title: a ? a.title : i
2020
2028
  }, p?.root, m), y = Y({
2021
- className: $n.milestoneShape,
2029
+ className: tr.milestoneShape,
2022
2030
  "aria-hidden": !0
2023
2031
  }, p?.shape, m);
2024
2032
  return /* @__PURE__ */ v(h, {
@@ -2035,13 +2043,13 @@ function er({ size: e, centerLeft: t, top: n, colWidth: r, title: i, a11y: a, on
2035
2043
  children: /* @__PURE__ */ v(g, { ...y })
2036
2044
  });
2037
2045
  }
2038
- var tr = {
2046
+ var rr = {
2039
2047
  barProgress: "_barProgress_1obm3_1",
2040
2048
  barProgressResizeHandle: "_barProgressResizeHandle_1obm3_10"
2041
2049
  };
2042
2050
  //#endregion
2043
2051
  //#region src/components/bars/progress/BarProgressResizeHandle.tsx
2044
- function nr({ width: e, onResize: t, onResizeEnd: n, parentWidth: r, slots: i, slotProps: a }) {
2052
+ function ir({ width: e, onResize: t, onResizeEnd: n, parentWidth: r, slots: i, slotProps: a }) {
2045
2053
  let o = J(), s = i ?? o.bars?.barProgressResizeHandle?.slots, c = a ?? o.bars?.barProgressResizeHandle?.slotProps, l = (e, t) => Math.min(Math.max(0, t + e), r), u = zn({
2046
2054
  onStart: () => ({ startWidth: e }),
2047
2055
  onDrag: (e, { startWidth: n }) => t(l(e, n)),
@@ -2051,7 +2059,7 @@ function nr({ width: e, onResize: t, onResizeEnd: n, parentWidth: r, slots: i, s
2051
2059
  parentWidth: r
2052
2060
  };
2053
2061
  return /* @__PURE__ */ v(s?.root ?? "div", { ...Y({
2054
- className: tr.barProgressResizeHandle,
2062
+ className: rr.barProgressResizeHandle,
2055
2063
  "aria-hidden": !0,
2056
2064
  tabIndex: -1,
2057
2065
  onMouseDown: u
@@ -2059,7 +2067,7 @@ function nr({ width: e, onResize: t, onResizeEnd: n, parentWidth: r, slots: i, s
2059
2067
  }
2060
2068
  //#endregion
2061
2069
  //#region src/components/bars/progress/BarProgress.tsx
2062
- function rr({ progress: e, width: t, height: n, onProgressChange: r, onProgressEnd: i, slots: a, slotProps: o }) {
2070
+ function ar({ progress: e, width: t, height: n, onProgressChange: r, onProgressEnd: i, slots: a, slotProps: o }) {
2063
2071
  let s = J(), c = a ?? s.bars?.barProgress?.slots, l = o ?? s.bars?.barProgress?.slotProps, u = e / 100 * t, d = (e) => e / t * 100, f = {
2064
2072
  progress: e,
2065
2073
  width: u,
@@ -2067,13 +2075,13 @@ function rr({ progress: e, width: t, height: n, onProgressChange: r, onProgressE
2067
2075
  };
2068
2076
  return /* @__PURE__ */ v(c?.root ?? "div", {
2069
2077
  ...Y({
2070
- className: tr.barProgress,
2078
+ className: rr.barProgress,
2071
2079
  style: {
2072
2080
  width: u,
2073
2081
  height: n
2074
2082
  }
2075
2083
  }, l?.root, f),
2076
- children: r && /* @__PURE__ */ v(nr, {
2084
+ children: r && /* @__PURE__ */ v(ir, {
2077
2085
  width: u,
2078
2086
  parentWidth: t,
2079
2087
  onResize: (e) => r(d(e)),
@@ -2081,28 +2089,28 @@ function rr({ progress: e, width: t, height: n, onProgressChange: r, onProgressE
2081
2089
  })
2082
2090
  });
2083
2091
  }
2084
- var ir = {
2092
+ var or = {
2085
2093
  project: "_project_927ph_1",
2086
2094
  projectInner: "_projectInner_927ph_10",
2087
2095
  projectContent: "_projectContent_927ph_16"
2088
2096
  };
2089
2097
  //#endregion
2090
2098
  //#region src/components/bars/projectBar/ProjectBar.tsx
2091
- function ar({ width: e, height: t, left: n, top: r, colWidth: i, title: a, a11y: o, progress: s, onProgressChange: c, onProgressEnd: l, onMove: u, onMoveEnd: d, tooltip: f, slots: p, slotProps: m }) {
2099
+ function sr({ width: e, height: t, left: n, top: r, colWidth: i, title: a, a11y: o, progress: s, onProgressChange: c, onProgressEnd: l, onMove: u, onMoveEnd: d, tooltip: f, slots: p, slotProps: m }) {
2092
2100
  let h = J(), g = p ?? h.bars?.projectBar?.slots, _ = m ?? h.bars?.projectBar?.slotProps, b = {
2093
2101
  width: e,
2094
2102
  height: t,
2095
2103
  progress: s,
2096
2104
  title: a
2097
- }, x = g?.root ?? Qn, S = g?.inner ?? "div", C = g?.label ?? "div", w = Y({
2098
- className: ir.project,
2105
+ }, x = g?.root ?? er, S = g?.inner ?? "div", C = g?.label ?? "div", w = Y({
2106
+ className: or.project,
2099
2107
  style: { lineHeight: `${t}px` },
2100
2108
  ...o
2101
2109
  }, _?.root, b), T = Y({
2102
- className: ir.projectInner,
2110
+ className: or.projectInner,
2103
2111
  "aria-hidden": !0
2104
2112
  }, _?.inner, b), E = Y({
2105
- className: ir.projectContent,
2113
+ className: or.projectContent,
2106
2114
  children: a
2107
2115
  }, _?.label, b);
2108
2116
  return /* @__PURE__ */ v(x, {
@@ -2118,7 +2126,7 @@ function ar({ width: e, height: t, left: n, top: r, colWidth: i, title: a, a11y:
2118
2126
  ...w,
2119
2127
  children: /* @__PURE__ */ y(S, {
2120
2128
  ...T,
2121
- children: [/* @__PURE__ */ v(rr, {
2129
+ children: [/* @__PURE__ */ v(ar, {
2122
2130
  width: e,
2123
2131
  height: t,
2124
2132
  progress: s,
@@ -2128,7 +2136,7 @@ function ar({ width: e, height: t, left: n, top: r, colWidth: i, title: a, a11y:
2128
2136
  })
2129
2137
  });
2130
2138
  }
2131
- var or = {
2139
+ var cr = {
2132
2140
  task: "_task_18g5p_1",
2133
2141
  taskInner: "_taskInner_18g5p_9",
2134
2142
  taskContent: "_taskContent_18g5p_15",
@@ -2138,7 +2146,7 @@ var or = {
2138
2146
  };
2139
2147
  //#endregion
2140
2148
  //#region src/components/bars/taskBar/TaskResizer.tsx
2141
- function sr({ width: e, left: t, colWidth: n, onResize: r, onResizeEnd: i, slots: a, slotProps: o }) {
2149
+ function lr({ width: e, left: t, colWidth: n, onResize: r, onResizeEnd: i, slots: a, slotProps: o }) {
2142
2150
  let s = J(), c = a ?? s.bars?.taskResizer?.slots, l = o ?? s.bars?.taskResizer?.slotProps, u = zn({
2143
2151
  onStart: () => ({
2144
2152
  startWidth: e,
@@ -2171,34 +2179,34 @@ function sr({ width: e, left: t, colWidth: n, onResize: r, onResizeEnd: i, slots
2171
2179
  type: "button",
2172
2180
  "aria-hidden": !0,
2173
2181
  tabIndex: -1,
2174
- className: Dn(or.resizer, or.startResizer),
2182
+ className: Dn(cr.resizer, cr.startResizer),
2175
2183
  onMouseDown: u
2176
2184
  }, l?.startHandle, f), g = Y({
2177
2185
  type: "button",
2178
2186
  "aria-hidden": !0,
2179
2187
  tabIndex: -1,
2180
- className: Dn(or.resizer, or.endResizer),
2188
+ className: Dn(cr.resizer, cr.endResizer),
2181
2189
  onMouseDown: d
2182
2190
  }, l?.endHandle, f);
2183
2191
  return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(p, { ...h }), /* @__PURE__ */ v(m, { ...g })] });
2184
2192
  }
2185
2193
  //#endregion
2186
2194
  //#region src/components/bars/taskBar/TaskBar.tsx
2187
- function cr({ width: e, height: t, left: n, top: r, colWidth: i, title: a, a11y: o, progress: s = 30, onProgressChange: c, onProgressEnd: l, onResize: u, onResizeEnd: d, onMove: f, onMoveEnd: p, tooltip: m, slots: h, slotProps: g }) {
2195
+ function ur({ width: e, height: t, left: n, top: r, colWidth: i, title: a, a11y: o, progress: s = 30, onProgressChange: c, onProgressEnd: l, onResize: u, onResizeEnd: d, onMove: f, onMoveEnd: p, tooltip: m, slots: h, slotProps: g }) {
2188
2196
  let _ = J(), b = h ?? _.bars?.taskBar?.slots, x = g ?? _.bars?.taskBar?.slotProps, S = {
2189
2197
  width: e,
2190
2198
  height: t,
2191
2199
  progress: s,
2192
2200
  title: a
2193
- }, C = b?.root ?? Qn, w = b?.inner ?? "div", T = b?.label ?? "div", E = Y({
2194
- className: `${or.task} am-gantt-bar-task`,
2201
+ }, C = b?.root ?? er, w = b?.inner ?? "div", T = b?.label ?? "div", E = Y({
2202
+ className: `${cr.task} am-gantt-bar-task`,
2195
2203
  style: { lineHeight: `${t}px` },
2196
2204
  ...o
2197
2205
  }, x?.root, S), D = Y({
2198
- className: or.taskInner,
2206
+ className: cr.taskInner,
2199
2207
  "aria-hidden": !0
2200
2208
  }, x?.inner, S), O = Y({
2201
- className: or.taskContent,
2209
+ className: cr.taskContent,
2202
2210
  title: o?.title,
2203
2211
  children: a
2204
2212
  }, x?.label, S);
@@ -2216,7 +2224,7 @@ function cr({ width: e, height: t, left: n, top: r, colWidth: i, title: a, a11y:
2216
2224
  children: /* @__PURE__ */ y(w, {
2217
2225
  ...D,
2218
2226
  children: [
2219
- /* @__PURE__ */ v(rr, {
2227
+ /* @__PURE__ */ v(ar, {
2220
2228
  width: e,
2221
2229
  height: t,
2222
2230
  progress: s,
@@ -2224,7 +2232,7 @@ function cr({ width: e, height: t, left: n, top: r, colWidth: i, title: a, a11y:
2224
2232
  onProgressEnd: l
2225
2233
  }),
2226
2234
  /* @__PURE__ */ v(T, { ...O }),
2227
- u && d && /* @__PURE__ */ v(sr, {
2235
+ u && d && /* @__PURE__ */ v(lr, {
2228
2236
  width: e,
2229
2237
  left: n,
2230
2238
  colWidth: i,
@@ -2235,11 +2243,11 @@ function cr({ width: e, height: t, left: n, top: r, colWidth: i, title: a, a11y:
2235
2243
  })
2236
2244
  });
2237
2245
  }
2238
- var lr = {
2246
+ var dr = {
2239
2247
  handle: "_handle_fw6gu_1",
2240
2248
  visible: "_visible_fw6gu_18"
2241
- }, ur = 10 / 2;
2242
- function dr({ taskId: e, barLeft: t, barWidth: n, barCenterY: r, show: i, slots: a, slotProps: o }) {
2249
+ }, fr = 10 / 2;
2250
+ function pr({ taskId: e, barLeft: t, barWidth: n, barCenterY: r, show: i, slots: a, slotProps: o }) {
2243
2251
  let s = J(), c = a ?? s.bars?.connectorHandles?.slots, l = o ?? s.bars?.connectorHandles?.slotProps, { startDrag: u, endDrag: d } = gn(), f = vn(), { gridBodyRef: p } = fn(), m = (e, t) => {
2244
2252
  let n = p.current?.getBoundingClientRect();
2245
2253
  if (!n) return {
@@ -2274,27 +2282,27 @@ function dr({ taskId: e, barLeft: t, barWidth: n, barCenterY: r, show: i, slots:
2274
2282
  }, x = c?.startHandle ?? "div", S = c?.endHandle ?? "div", C = i || f, w = Y({
2275
2283
  "aria-hidden": !0,
2276
2284
  tabIndex: -1,
2277
- className: Dn(lr.handle, C && lr.visible),
2285
+ className: Dn(dr.handle, C && dr.visible),
2278
2286
  style: {
2279
2287
  left: t - 10,
2280
- top: r - ur
2288
+ top: r - fr
2281
2289
  },
2282
2290
  onMouseDown: (e) => h(e, "start"),
2283
2291
  onMouseUp: (e) => g(e, "start")
2284
2292
  }, l?.startHandle, b), T = Y({
2285
2293
  "aria-hidden": !0,
2286
2294
  tabIndex: -1,
2287
- className: Dn(lr.handle, C && lr.visible),
2295
+ className: Dn(dr.handle, C && dr.visible),
2288
2296
  style: {
2289
2297
  left: t + n,
2290
- top: r - ur
2298
+ top: r - fr
2291
2299
  },
2292
2300
  onMouseDown: (e) => h(e, "end"),
2293
2301
  onMouseUp: (e) => g(e, "end")
2294
2302
  }, l?.endHandle, b);
2295
2303
  return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(x, { ...w }), /* @__PURE__ */ v(S, { ...T })] });
2296
2304
  }
2297
- var fr = { row: "_row_1jios_13" }, pr = i(function({ task: e, index: t, origin: n, colWidth: r, rowHeight: i, unit: o, override: s, onOverride: c, onUpdate: l, onCommit: u, onTaskClick: d, rowIndexOffset: f }) {
2305
+ var mr = { row: "_row_1jios_13" }, hr = i(function({ task: e, index: t, origin: n, colWidth: r, rowHeight: i, unit: o, override: s, onOverride: c, onUpdate: l, onCommit: u, onTaskClick: d, rowIndexOffset: f }) {
2298
2306
  let p = $t(), h = rn(), g = un() === e.id, _ = tn(), b = J().bars?.tooltip?.slots?.tooltip, { left: x, width: S, progress: C } = Et(e, s || {}, n, r, o), w = t * i, T = x, E = i - 12, D = 6 + E / 2, O = e.type === "milestone", k = O ? T - E / 2 : T, A = O ? E - 1 : S, [j, M] = m(!1), N = (e) => ({
2299
2307
  startDate: Dt(e, n, r, o),
2300
2308
  endDate: Dt(e + S, n, r, o)
@@ -2342,7 +2350,7 @@ var fr = { row: "_row_1jios_13" }, pr = i(function({ task: e, index: t, origin:
2342
2350
  displayEnd: Pe(e, _)
2343
2351
  };
2344
2352
  return /* @__PURE__ */ y("div", {
2345
- className: fr.row,
2353
+ className: mr.row,
2346
2354
  style: {
2347
2355
  top: w,
2348
2356
  height: i
@@ -2353,14 +2361,14 @@ var fr = { row: "_row_1jios_13" }, pr = i(function({ task: e, index: t, origin:
2353
2361
  role: "row",
2354
2362
  "aria-rowindex": f + t + 1,
2355
2363
  children: [
2356
- !h && /* @__PURE__ */ v(dr, {
2364
+ !h && /* @__PURE__ */ v(pr, {
2357
2365
  taskId: e.id,
2358
2366
  barLeft: k,
2359
2367
  barWidth: A,
2360
2368
  barCenterY: D,
2361
2369
  show: j
2362
2370
  }),
2363
- e.type === "milestone" && /* @__PURE__ */ v(er, {
2371
+ e.type === "milestone" && /* @__PURE__ */ v(nr, {
2364
2372
  tooltip: te,
2365
2373
  size: E,
2366
2374
  centerLeft: T,
@@ -2370,7 +2378,7 @@ var fr = { row: "_row_1jios_13" }, pr = i(function({ task: e, index: t, origin:
2370
2378
  a11y: V,
2371
2379
  ...R
2372
2380
  }),
2373
- e.type === "summary" && /* @__PURE__ */ v(ar, {
2381
+ e.type === "summary" && /* @__PURE__ */ v(sr, {
2374
2382
  tooltip: te,
2375
2383
  left: T,
2376
2384
  top: 6,
@@ -2383,7 +2391,7 @@ var fr = { row: "_row_1jios_13" }, pr = i(function({ task: e, index: t, origin:
2383
2391
  ...z,
2384
2392
  ...R
2385
2393
  }),
2386
- e.type === "task" || !e.type ? /* @__PURE__ */ v(cr, {
2394
+ e.type === "task" || !e.type ? /* @__PURE__ */ v(ur, {
2387
2395
  tooltip: te,
2388
2396
  left: T,
2389
2397
  top: 6,
@@ -2400,11 +2408,11 @@ var fr = { row: "_row_1jios_13" }, pr = i(function({ task: e, index: t, origin:
2400
2408
  ]
2401
2409
  });
2402
2410
  });
2403
- pr.displayName = "Row";
2411
+ hr.displayName = "Row";
2404
2412
  //#endregion
2405
2413
  //#region src/components/dependency-links/geometry.ts
2406
- var mr = 12, hr = {};
2407
- function gr(e) {
2414
+ var gr = 12, _r = {};
2415
+ function vr(e) {
2408
2416
  let t = Infinity, n = Infinity, r = -Infinity, i = -Infinity;
2409
2417
  for (let a of e) a.x < t && (t = a.x), a.x > r && (r = a.x), a.y < n && (n = a.y), a.y > i && (i = a.y);
2410
2418
  return {
@@ -2414,7 +2422,7 @@ function gr(e) {
2414
2422
  maxY: i
2415
2423
  };
2416
2424
  }
2417
- function _r(e) {
2425
+ function yr(e) {
2418
2426
  if (e.length < 2) return e[0] ?? {
2419
2427
  x: 0,
2420
2428
  y: 0
@@ -2425,7 +2433,7 @@ function _r(e) {
2425
2433
  y: (n.y + r.y) / 2
2426
2434
  };
2427
2435
  }
2428
- function vr(e, t, n, { origin: r, colWidth: i, rowHeight: a, unit: o }) {
2436
+ function br(e, t, n, { origin: r, colWidth: i, rowHeight: a, unit: o }) {
2429
2437
  let { left: s, width: c } = Et(e, t, r, i, o);
2430
2438
  if (e.type === "milestone") {
2431
2439
  let t = (a - 12) / 2;
@@ -2443,13 +2451,13 @@ function vr(e, t, n, { origin: r, colWidth: i, rowHeight: a, unit: o }) {
2443
2451
  task: e
2444
2452
  };
2445
2453
  }
2446
- function yr(e, t) {
2454
+ function xr(e, t) {
2447
2455
  let n = /* @__PURE__ */ new Map(), { rowHeight: r } = t;
2448
2456
  return e.forEach((e, i) => {
2449
- n.set(e.id, vr(e, hr, i * r + r / 2, t));
2457
+ n.set(e.id, br(e, _r, i * r + r / 2, t));
2450
2458
  }), n;
2451
2459
  }
2452
- function br(e, t) {
2460
+ function Sr(e, t) {
2453
2461
  let n = (e.x + t.x) / 2;
2454
2462
  return [
2455
2463
  e,
@@ -2464,8 +2472,8 @@ function br(e, t) {
2464
2472
  t
2465
2473
  ];
2466
2474
  }
2467
- function xr(e, t, n, r) {
2468
- let i = e.x + n * mr, a = t.x - r * mr, o = (e.y + t.y) / 2;
2475
+ function Cr(e, t, n, r) {
2476
+ let i = e.x + n * gr, a = t.x - r * gr, o = (e.y + t.y) / 2;
2469
2477
  return [
2470
2478
  e,
2471
2479
  {
@@ -2487,7 +2495,7 @@ function xr(e, t, n, r) {
2487
2495
  t
2488
2496
  ];
2489
2497
  }
2490
- function Sr(e, t, n) {
2498
+ function wr(e, t, n) {
2491
2499
  return [
2492
2500
  e,
2493
2501
  {
@@ -2501,7 +2509,7 @@ function Sr(e, t, n) {
2501
2509
  t
2502
2510
  ];
2503
2511
  }
2504
- function Cr(e, t, n) {
2512
+ function Tr(e, t, n) {
2505
2513
  let r = t.centerY, i = n.centerY;
2506
2514
  switch (e) {
2507
2515
  case "FS": {
@@ -2512,22 +2520,22 @@ function Cr(e, t, n) {
2512
2520
  x: n.startX,
2513
2521
  y: i
2514
2522
  };
2515
- return n.startX >= t.endX + 2 * mr ? br(e, a) : xr(e, a, 1, 1);
2523
+ return n.startX >= t.endX + 2 * gr ? Sr(e, a) : Cr(e, a, 1, 1);
2516
2524
  }
2517
- case "SS": return Sr({
2525
+ case "SS": return wr({
2518
2526
  x: t.startX,
2519
2527
  y: r
2520
2528
  }, {
2521
2529
  x: n.startX,
2522
2530
  y: i
2523
- }, Math.min(t.startX, n.startX) - mr);
2524
- case "FF": return Sr({
2531
+ }, Math.min(t.startX, n.startX) - gr);
2532
+ case "FF": return wr({
2525
2533
  x: t.endX,
2526
2534
  y: r
2527
2535
  }, {
2528
2536
  x: n.endX,
2529
2537
  y: i
2530
- }, Math.max(t.endX, n.endX) + mr);
2538
+ }, Math.max(t.endX, n.endX) + gr);
2531
2539
  case "SF": {
2532
2540
  let e = {
2533
2541
  x: t.startX,
@@ -2536,36 +2544,36 @@ function Cr(e, t, n) {
2536
2544
  x: n.endX,
2537
2545
  y: i
2538
2546
  };
2539
- return n.endX <= t.startX - 2 * mr ? br(e, a) : xr(e, a, -1, -1);
2547
+ return n.endX <= t.startX - 2 * gr ? Sr(e, a) : Cr(e, a, -1, -1);
2540
2548
  }
2541
2549
  }
2542
2550
  }
2543
- function wr({ tasks: e, dependencies: t, ...n }) {
2544
- let r = yr(e, n), i = [];
2551
+ function Er({ tasks: e, dependencies: t, ...n }) {
2552
+ let r = xr(e, n), i = [];
2545
2553
  for (let e of t) {
2546
2554
  let t = r.get(e.from), n = r.get(e.to);
2547
- !t || !n || i.push(Tr(e, t, n));
2555
+ !t || !n || i.push(Dr(e, t, n));
2548
2556
  }
2549
2557
  let a = null;
2550
2558
  return {
2551
2559
  links: i,
2552
2560
  boxes: r,
2553
2561
  linksTouching(e) {
2554
- return a ??= Er(i), a.get(e);
2562
+ return a ??= Or(i), a.get(e);
2555
2563
  }
2556
2564
  };
2557
2565
  }
2558
- function Tr(e, t, n) {
2559
- let r = Cr(e.type, t, n);
2566
+ function Dr(e, t, n) {
2567
+ let r = Tr(e.type, t, n);
2560
2568
  return {
2561
2569
  id: `${e.from}->${e.to}`,
2562
2570
  type: e.type,
2563
2571
  points: r,
2564
- bounds: gr(r),
2572
+ bounds: vr(r),
2565
2573
  dep: e
2566
2574
  };
2567
2575
  }
2568
- function Er(e) {
2576
+ function Or(e) {
2569
2577
  let t = /* @__PURE__ */ new Map(), n = (e, n) => {
2570
2578
  let r = t.get(e);
2571
2579
  r ? r.push(n) : t.set(e, [n]);
@@ -2574,26 +2582,26 @@ function Er(e) {
2574
2582
  n(String(e.dep.from), t), n(String(e.dep.to), t);
2575
2583
  }), t;
2576
2584
  }
2577
- function Dr(e, t, n) {
2585
+ function kr(e, t, n) {
2578
2586
  let r = Object.keys(t);
2579
2587
  if (r.length === 0) return e.links;
2580
2588
  let i = /* @__PURE__ */ new Map(), a = (r) => {
2581
2589
  let a = e.boxes.get(r), o = a && t[String(r)];
2582
2590
  if (!a || !o) return a;
2583
2591
  let s = i.get(r);
2584
- return s || (s = vr(a.task, o, a.centerY, n), i.set(r, s)), s;
2592
+ return s || (s = br(a.task, o, a.centerY, n), i.set(r, s)), s;
2585
2593
  }, o = null;
2586
2594
  for (let t of r) for (let n of e.linksTouching(t) ?? []) {
2587
2595
  let { dep: t } = e.links[n], r = a(t.from), i = a(t.to);
2588
- !r || !i || (o ??= e.links.slice(), o[n] = Tr(t, r, i));
2596
+ !r || !i || (o ??= e.links.slice(), o[n] = Dr(t, r, i));
2589
2597
  }
2590
2598
  return o ?? e.links;
2591
2599
  }
2592
2600
  //#endregion
2593
2601
  //#region src/components/dependency-links/DependencyLinksContext.tsx
2594
- var Or = n(null);
2595
- function kr({ tasks: e, dependencies: t, origin: n, colWidth: r, rowHeight: i, unit: a, children: o, overrides: s }) {
2596
- let c = f(() => wr({
2602
+ var Ar = n(null);
2603
+ function jr({ tasks: e, dependencies: t, origin: n, colWidth: r, rowHeight: i, unit: a, children: o, overrides: s }) {
2604
+ let c = f(() => Er({
2597
2605
  tasks: e,
2598
2606
  dependencies: t,
2599
2607
  origin: n,
@@ -2607,7 +2615,7 @@ function kr({ tasks: e, dependencies: t, origin: n, colWidth: r, rowHeight: i, u
2607
2615
  r,
2608
2616
  i,
2609
2617
  a
2610
- ]), l = f(() => Dr(c, s, {
2618
+ ]), l = f(() => kr(c, s, {
2611
2619
  origin: n,
2612
2620
  colWidth: r,
2613
2621
  rowHeight: i,
@@ -2620,13 +2628,13 @@ function kr({ tasks: e, dependencies: t, origin: n, colWidth: r, rowHeight: i, u
2620
2628
  i,
2621
2629
  a
2622
2630
  ]);
2623
- return /* @__PURE__ */ v(Or.Provider, {
2631
+ return /* @__PURE__ */ v(Ar.Provider, {
2624
2632
  value: l,
2625
2633
  children: o
2626
2634
  });
2627
2635
  }
2628
- function Ar() {
2629
- let e = s(Or);
2636
+ function Mr() {
2637
+ let e = s(Ar);
2630
2638
  if (e === null) throw Error("useDependencyLinks must be used within a <DependencyLinksProvider>");
2631
2639
  return e;
2632
2640
  }
@@ -2640,11 +2648,11 @@ var Z = {
2640
2648
  arrowSelected: "_arrowSelected_1ih9f_43",
2641
2649
  lagLabel: "_lagLabel_1ih9f_51",
2642
2650
  deleteBtn: "_deleteBtn_1ih9f_65"
2643
- }, Q = 2, jr = 8, Mr = 6;
2644
- function Nr(e, t) {
2651
+ }, Q = 2, Nr = 8, Pr = 6;
2652
+ function Fr(e, t) {
2645
2653
  return t ? e.minX <= t.maxX && e.maxX >= t.minX && e.minY <= t.maxY && e.maxY >= t.minY : !0;
2646
2654
  }
2647
- function Pr(e, t) {
2655
+ function Ir(e, t) {
2648
2656
  return e.y === t.y ? {
2649
2657
  left: Math.min(e.x, t.x) - Q / 2,
2650
2658
  top: e.y - Q / 2,
@@ -2657,36 +2665,36 @@ function Pr(e, t) {
2657
2665
  height: Math.abs(t.y - e.y) + Q
2658
2666
  };
2659
2667
  }
2660
- function Fr(e, t) {
2668
+ function Lr(e, t) {
2661
2669
  return e.y === t.y ? {
2662
2670
  left: Math.min(e.x, t.x) - Q / 2,
2663
- top: e.y - Mr,
2671
+ top: e.y - Pr,
2664
2672
  width: Math.abs(t.x - e.x) + Q,
2665
- height: Q + Mr * 2
2673
+ height: Q + Pr * 2
2666
2674
  } : {
2667
- left: e.x - Mr,
2675
+ left: e.x - Pr,
2668
2676
  top: Math.min(e.y, t.y) - Q / 2,
2669
- width: Q + Mr * 2,
2677
+ width: Q + Pr * 2,
2670
2678
  height: Math.abs(t.y - e.y) + Q
2671
2679
  };
2672
2680
  }
2673
- function Ir(e) {
2681
+ function Rr(e) {
2674
2682
  let t = [];
2675
2683
  for (let n = 0; n + 1 < e.length; n++) t.push([e[n], e[n + 1]]);
2676
2684
  return t;
2677
2685
  }
2678
- function Lr(e) {
2686
+ function zr(e) {
2679
2687
  let t = e[e.length - 1], n = e[e.length - 2], r = t.x >= n.x;
2680
2688
  return {
2681
2689
  className: r ? Z.arrowRight : Z.arrowLeft,
2682
2690
  style: {
2683
- left: r ? t.x - jr : t.x,
2684
- top: t.y - jr / 2
2691
+ left: r ? t.x - Nr : t.x,
2692
+ top: t.y - Nr / 2
2685
2693
  }
2686
2694
  };
2687
2695
  }
2688
- function Rr({ width: t, height: n, onDependencyDelete: r, visibleRect: i, slots: a, slotProps: o }) {
2689
- let s = J(), c = a ?? s.dependencies?.links?.slots, u = o ?? s.dependencies?.links?.slotProps, d = $t(), f = rn(), p = Ar(), [h, g] = m(null), [_, b] = m(null), x = h ? p.find((e) => e.id === h) : null;
2696
+ function Br({ width: t, height: n, onDependencyDelete: r, visibleRect: i, slots: a, slotProps: o }) {
2697
+ let s = J(), c = a ?? s.dependencies?.links?.slots, u = o ?? s.dependencies?.links?.slotProps, d = $t(), f = rn(), p = Mr(), [h, g] = m(null), [_, b] = m(null), x = h ? p.find((e) => e.id === h) : null;
2690
2698
  if (l(() => {
2691
2699
  if (!h) return;
2692
2700
  let e = (e) => {
@@ -2730,8 +2738,8 @@ function Rr({ width: t, height: n, onDependencyDelete: r, visibleRect: i, slots:
2730
2738
  }),
2731
2739
  children: [p.map((t) => {
2732
2740
  let n = t.id === h;
2733
- if (!n && !Nr(t.bounds, i)) return null;
2734
- let r = Lr(t.points), a = Ir(t.points), o = t.dep.lag ? _r(t.points) : null, s = {
2741
+ if (!n && !Fr(t.bounds, i)) return null;
2742
+ let r = zr(t.points), a = Rr(t.points), o = t.dep.lag ? yr(t.points) : null, s = {
2735
2743
  link: t,
2736
2744
  isSelected: n
2737
2745
  }, c = Y({
@@ -2741,12 +2749,12 @@ function Rr({ width: t, height: n, onDependencyDelete: r, visibleRect: i, slots:
2741
2749
  return /* @__PURE__ */ y(e, { children: [
2742
2750
  !f && a.map(([e, n]) => /* @__PURE__ */ v("div", {
2743
2751
  className: Z.hitArea,
2744
- style: Fr(e, n),
2752
+ style: Lr(e, n),
2745
2753
  onClick: (e) => S(t.id, e)
2746
2754
  }, `hit-${e.x},${e.y}-${n.x},${n.y}`)),
2747
2755
  a.map(([e, r], i) => /* @__PURE__ */ v(T, { ...Y({
2748
2756
  className: `${Z.segment} ${n ? Z.segmentSelected : ""}`,
2749
- style: Pr(e, r)
2757
+ style: Ir(e, r)
2750
2758
  }, u?.segment, {
2751
2759
  link: t,
2752
2760
  isSelected: n,
@@ -2782,15 +2790,15 @@ function Rr({ width: t, height: n, onDependencyDelete: r, visibleRect: i, slots:
2782
2790
  }, u?.deleteButton, { dependency: x.dep }) })]
2783
2791
  });
2784
2792
  }
2785
- var zr = { preview: "_preview_1jjzd_1" };
2793
+ var Vr = { preview: "_preview_1jjzd_1" };
2786
2794
  //#endregion
2787
2795
  //#region src/components/dependency-links/DependencyPreview.tsx
2788
- function Br({ slots: e, slotProps: t }) {
2796
+ function Hr({ slots: e, slotProps: t }) {
2789
2797
  let n = J(), r = e ?? n.dependencies?.preview?.slots, i = t ?? n.dependencies?.preview?.slotProps, a = bn();
2790
2798
  if (!a) return null;
2791
2799
  let o = a.currentX - a.startX, s = a.currentY - a.startY, c = Math.hypot(o, s), l = 180 / Math.PI * Math.atan2(s, o);
2792
2800
  return /* @__PURE__ */ v(r?.root ?? "div", { ...Y({
2793
- className: zr.preview,
2801
+ className: Vr.preview,
2794
2802
  style: {
2795
2803
  left: a.startX,
2796
2804
  top: a.startY,
@@ -2804,17 +2812,17 @@ function Br({ slots: e, slotProps: t }) {
2804
2812
  angle: l
2805
2813
  }) });
2806
2814
  }
2807
- var Vr = {
2815
+ var Ur = {
2808
2816
  cols: "_cols_kjab1_1",
2809
2817
  col: "_col_kjab1_1",
2810
2818
  colWeekend: "_colWeekend_kjab1_14"
2811
2819
  };
2812
2820
  //#endregion
2813
2821
  //#region src/components/grid/GridColumns.tsx
2814
- function Hr({ dates: e, colWidth: t, bodyHeight: n, colRange: r, unit: i = "day", step: a = 1, slots: o, slotProps: s }) {
2822
+ function Wr({ dates: e, colWidth: t, bodyHeight: n, colRange: r, unit: i = "day", step: a = 1, slots: o, slotProps: s }) {
2815
2823
  let c = J(), l = o ?? c.timeline?.gridColumn?.slots, u = s ?? c.timeline?.gridColumn?.slotProps, d = l?.column ?? "div", { calendar: f } = tn(), p = i === "day" || i === "hour" || i === "minute";
2816
2824
  return /* @__PURE__ */ v("div", {
2817
- className: Vr.cols,
2825
+ className: Ur.cols,
2818
2826
  role: "presentation",
2819
2827
  "aria-hidden": !0,
2820
2828
  children: e.slice(r.start, r.end).map((e, o) => {
@@ -2831,7 +2839,7 @@ function Hr({ dates: e, colWidth: t, bodyHeight: n, colRange: r, unit: i = "day"
2831
2839
  bodyHeight: n
2832
2840
  };
2833
2841
  return /* @__PURE__ */ v(d, { ...Y({
2834
- className: Dn(Vr.col, l && Vr.colWeekend),
2842
+ className: Dn(Ur.col, l && Ur.colWeekend),
2835
2843
  style: {
2836
2844
  left: s * t,
2837
2845
  width: t,
@@ -2841,15 +2849,15 @@ function Hr({ dates: e, colWidth: t, bodyHeight: n, colRange: r, unit: i = "day"
2841
2849
  })
2842
2850
  });
2843
2851
  }
2844
- Hr.displayName = "GridColumns";
2845
- var Ur = {
2852
+ Wr.displayName = "GridColumns";
2853
+ var Gr = {
2846
2854
  gridWrapper: "_gridWrapper_1tr84_1",
2847
2855
  grid: "_grid_1tr84_1",
2848
2856
  body: "_body_1tr84_17"
2849
2857
  };
2850
2858
  //#endregion
2851
2859
  //#region src/core/virtualize.ts
2852
- function Wr(e, t, n, r, i = 0) {
2860
+ function Kr(e, t, n, r, i = 0) {
2853
2861
  if (r <= 0) return {
2854
2862
  start: 0,
2855
2863
  end: 0
@@ -2866,7 +2874,7 @@ function Wr(e, t, n, r, i = 0) {
2866
2874
  }
2867
2875
  //#endregion
2868
2876
  //#region src/components/grid/Grid.tsx
2869
- function Gr({ slots: e, slotProps: t } = {}) {
2877
+ function qr({ slots: e, slotProps: t } = {}) {
2870
2878
  let n = J(), r = e ?? n.timeline?.grid?.slots, i = t ?? n.timeline?.grid?.slotProps, { visibleTasks: a } = on(), { updateTask: s, commitTask: c, onTaskClick: u, setSelectedId: d } = cn(), { colWidth: p, rowHeight: h, scales: g, padDays: _, height: b } = Zt(), x = $t(), { gridRef: S, onGridScroll: C, gridBodyRef: w } = fn(), T = mn(), { dependencies: E, onDependencyDelete: D } = gn(), { zoomAt: O, zoomIn: k, zoomOut: A, wheelEnabled: j, keyboardEnabled: M } = Sn();
2871
2879
  l(() => {
2872
2880
  let e = S.current;
@@ -2913,7 +2921,7 @@ function Gr({ slots: e, slotProps: t } = {}) {
2913
2921
  g
2914
2922
  ]), L = I[0]?.getTime(), R = f(() => L == null ? void 0 : new Date(L), [L]);
2915
2923
  if (!R) return null;
2916
- let z = kt(g), B = I.length * p, V = a.length * h, te = (g ?? Ot).length, H = Wr(T.scrollTop, T.clientHeight, h, a.length, 6), ne = Wr(T.scrollLeft, T.clientWidth, p, I.length, 4), re = {
2924
+ let z = kt(g), B = I.length * p, V = a.length * h, te = (g ?? Ot).length, H = Kr(T.scrollTop, T.clientHeight, h, a.length, 6), ne = Kr(T.scrollLeft, T.clientWidth, p, I.length, 4), re = {
2917
2925
  minX: ne.start * p,
2918
2926
  maxX: ne.end * p,
2919
2927
  minY: H.start * h,
@@ -2923,7 +2931,7 @@ function Gr({ slots: e, slotProps: t } = {}) {
2923
2931
  bodyHeight: V,
2924
2932
  height: b
2925
2933
  }, se = Y({
2926
- className: Ur.gridWrapper,
2934
+ className: Gr.gridWrapper,
2927
2935
  style: b === void 0 ? {} : { height: b },
2928
2936
  onScroll: C,
2929
2937
  role: "grid",
@@ -2931,7 +2939,7 @@ function Gr({ slots: e, slotProps: t } = {}) {
2931
2939
  "aria-rowcount": te + a.length,
2932
2940
  "aria-colcount": I.length
2933
2941
  }, i?.root, oe), ce = Y({
2934
- className: Ur.body,
2942
+ className: Gr.body,
2935
2943
  style: {
2936
2944
  height: V,
2937
2945
  width: B
@@ -2942,7 +2950,7 @@ function Gr({ slots: e, slotProps: t } = {}) {
2942
2950
  ref: S,
2943
2951
  ...se,
2944
2952
  children: /* @__PURE__ */ y("div", {
2945
- className: Ur.grid,
2953
+ className: Gr.grid,
2946
2954
  style: { width: B },
2947
2955
  role: "presentation",
2948
2956
  children: [/* @__PURE__ */ v(Mn, {
@@ -2951,7 +2959,7 @@ function Gr({ slots: e, slotProps: t } = {}) {
2951
2959
  dates: I,
2952
2960
  scales: g,
2953
2961
  colRange: ne
2954
- }), /* @__PURE__ */ v(kr, {
2962
+ }), /* @__PURE__ */ v(jr, {
2955
2963
  tasks: a,
2956
2964
  dependencies: E,
2957
2965
  origin: R,
@@ -2963,7 +2971,7 @@ function Gr({ slots: e, slotProps: t } = {}) {
2963
2971
  ref: w,
2964
2972
  ...ce,
2965
2973
  children: [
2966
- /* @__PURE__ */ v(Hr, {
2974
+ /* @__PURE__ */ v(Wr, {
2967
2975
  dates: I,
2968
2976
  colWidth: p,
2969
2977
  bodyHeight: V,
@@ -2971,14 +2979,14 @@ function Gr({ slots: e, slotProps: t } = {}) {
2971
2979
  unit: z,
2972
2980
  step: At(g)
2973
2981
  }),
2974
- /* @__PURE__ */ v(Rr, {
2982
+ /* @__PURE__ */ v(Br, {
2975
2983
  width: B,
2976
2984
  height: V,
2977
2985
  onDependencyDelete: D,
2978
2986
  visibleRect: re
2979
2987
  }),
2980
- /* @__PURE__ */ v(Br, {}),
2981
- a.slice(H.start, H.end).map((e, t) => /* @__PURE__ */ v(pr, {
2988
+ /* @__PURE__ */ v(Hr, {}),
2989
+ a.slice(H.start, H.end).map((e, t) => /* @__PURE__ */ v(hr, {
2982
2990
  task: e,
2983
2991
  index: H.start + t,
2984
2992
  origin: R,
@@ -2998,14 +3006,14 @@ function Gr({ slots: e, slotProps: t } = {}) {
2998
3006
  })
2999
3007
  });
3000
3008
  }
3001
- Gr.displayName = "GanttGrid";
3002
- var Kr = { handle: "_handle_1o220_1" };
3009
+ qr.displayName = "GanttGrid";
3010
+ var Jr = { handle: "_handle_1o220_1" };
3003
3011
  //#endregion
3004
3012
  //#region src/components/grid/GridResizeHandle.tsx
3005
- function qr({ onMouseDown: e, isResizing: t = !1, slots: n, slotProps: r }) {
3013
+ function Yr({ onMouseDown: e, isResizing: t = !1, slots: n, slotProps: r }) {
3006
3014
  let i = J(), a = n ?? i.timeline?.gridResizeHandle?.slots, o = r ?? i.timeline?.gridResizeHandle?.slotProps, s = $t(), c = { isResizing: t };
3007
3015
  return /* @__PURE__ */ v(a?.root ?? "div", { ...Y({
3008
- className: Kr.handle,
3016
+ className: Jr.handle,
3009
3017
  onMouseDown: e,
3010
3018
  role: "separator",
3011
3019
  "aria-orientation": "vertical",
@@ -3029,7 +3037,7 @@ var $ = {
3029
3037
  };
3030
3038
  //#endregion
3031
3039
  //#region src/components/taskList/TaskListHeader.tsx
3032
- function Jr({ columns: e, rowHeight: t, scales: n = Ot, onResizeStart: r, slots: i, slotProps: a }) {
3040
+ function Xr({ columns: e, rowHeight: t, scales: n = Ot, onResizeStart: r, slots: i, slotProps: a }) {
3033
3041
  let o = n.length * t + 2, s = i?.header ?? "div", c = i?.headerCell ?? "div", l = i?.columnResizeHandle ?? "div";
3034
3042
  return /* @__PURE__ */ v(s, {
3035
3043
  ...Y({
@@ -3076,8 +3084,8 @@ function Jr({ columns: e, rowHeight: t, scales: n = Ot, onResizeStart: r, slots:
3076
3084
  }
3077
3085
  //#endregion
3078
3086
  //#region src/components/taskList/TreeCell.tsx
3079
- var Yr = 16;
3080
- function Xr({ taskId: e, depth: t, isParent: n, isExpanded: r, onToggleExpand: i, children: a, slots: o, slotProps: s }) {
3087
+ var Zr = 16;
3088
+ function Qr({ taskId: e, depth: t, isParent: n, isExpanded: r, onToggleExpand: i, children: a, slots: o, slotProps: s }) {
3081
3089
  let c = $t(), l = {
3082
3090
  taskId: e,
3083
3091
  depth: t,
@@ -3085,7 +3093,7 @@ function Xr({ taskId: e, depth: t, isParent: n, isExpanded: r, onToggleExpand: i
3085
3093
  isExpanded: r
3086
3094
  }, u = o?.root ?? "span", d = o?.expandButton ?? "button", f = o?.placeholder ?? "span", p = Y({
3087
3095
  className: $.nameContent,
3088
- style: { paddingLeft: t * Yr }
3096
+ style: { paddingLeft: t * Zr }
3089
3097
  }, s?.root, l), m = Y({
3090
3098
  className: $.expandBtn,
3091
3099
  type: "button",
@@ -3105,7 +3113,7 @@ function Xr({ taskId: e, depth: t, isParent: n, isExpanded: r, onToggleExpand: i
3105
3113
  }
3106
3114
  //#endregion
3107
3115
  //#region src/components/taskList/TaskListRow.tsx
3108
- var Zr = 100, Qr = i(function({ task: e, rowHeight: t, rowIndex: n, depth: r, posinset: i, setsize: a, isParent: o, isExpanded: s, isSelected: c, onToggleExpand: l, onSelect: u, columns: d, treeCell: f }) {
3116
+ var $r = 100, ei = i(function({ task: e, rowHeight: t, rowIndex: n, depth: r, posinset: i, setsize: a, isParent: o, isExpanded: s, isSelected: c, onToggleExpand: l, onSelect: u, columns: d, treeCell: f }) {
3109
3117
  let { columnApi: p } = cn();
3110
3118
  return /* @__PURE__ */ v("div", {
3111
3119
  className: `${$.row} ${c ? $.selected : ""}`,
@@ -3121,12 +3129,12 @@ var Zr = 100, Qr = i(function({ task: e, rowHeight: t, rowIndex: n, depth: r, po
3121
3129
  children: d.map((t, n) => /* @__PURE__ */ v("div", {
3122
3130
  className: `${$.cell} ${t.isTreeColumn ? $.treeCell : ""}`,
3123
3131
  style: {
3124
- width: t.width || Zr,
3132
+ width: t.width || $r,
3125
3133
  flexShrink: 0
3126
3134
  },
3127
3135
  role: t.isTreeColumn ? "rowheader" : "gridcell",
3128
3136
  "aria-colindex": n + 1,
3129
- children: t.isTreeColumn ? /* @__PURE__ */ v(Xr, {
3137
+ children: t.isTreeColumn ? /* @__PURE__ */ v(Qr, {
3130
3138
  taskId: e.id,
3131
3139
  depth: r,
3132
3140
  isParent: o,
@@ -3139,10 +3147,10 @@ var Zr = 100, Qr = i(function({ task: e, rowHeight: t, rowIndex: n, depth: r, po
3139
3147
  }, t.key))
3140
3148
  });
3141
3149
  });
3142
- Qr.displayName = "TaskListRow";
3150
+ ei.displayName = "TaskListRow";
3143
3151
  //#endregion
3144
3152
  //#region src/hooks/useColumnWidths.ts
3145
- function $r() {
3153
+ function ti() {
3146
3154
  let [e, t] = m({}), n = p(null);
3147
3155
  return {
3148
3156
  widths: e,
@@ -3168,12 +3176,12 @@ function $r() {
3168
3176
  }
3169
3177
  //#endregion
3170
3178
  //#region src/components/taskList/TaskList.tsx
3171
- var ei = {
3179
+ var ni = {
3172
3180
  flex: "1 1 auto",
3173
3181
  minHeight: 0
3174
3182
  };
3175
- function ti({ columns: e = [], taskList: t }) {
3176
- let { visibleTasks: n, expandedIds: r, parentIds: i } = on(), { toggleExpand: a, setSelectedId: s, onTaskClick: c, revealTask: l } = cn(), u = un(), { rowHeight: d, scales: p, height: m } = Zt(), h = $t(), { taskListRef: g, onTaskListScroll: _ } = fn(), { widths: b, onResizeStart: x } = $r(), S = f(() => e.map((e) => b[e.key] == null ? e : {
3183
+ function ri({ columns: e = [], taskList: t }) {
3184
+ let { visibleTasks: n, expandedIds: r, parentIds: i } = on(), { toggleExpand: a, setSelectedId: s, onTaskClick: c, revealTask: l } = cn(), u = un(), { rowHeight: d, scales: p, height: m } = Zt(), h = $t(), { taskListRef: g, onTaskListScroll: _ } = fn(), { widths: b, onResizeStart: x } = ti(), S = f(() => e.map((e) => b[e.key] == null ? e : {
3177
3185
  ...e,
3178
3186
  width: b[e.key]
3179
3187
  }), [e, b]), C = q((e) => {
@@ -3206,7 +3214,7 @@ function ti({ columns: e = [], taskList: t }) {
3206
3214
  return t;
3207
3215
  }, [n]), { viewport: D, scheduleMeasure: O } = St(g, { trackHorizontal: !1 }), k = o(() => {
3208
3216
  _(), O();
3209
- }, [_, O]), A = Wr(D.scrollTop, D.clientHeight, d, n.length, 6);
3217
+ }, [_, O]), A = Kr(D.scrollTop, D.clientHeight, d, n.length, 6);
3210
3218
  return /* @__PURE__ */ y("div", {
3211
3219
  className: $.taskList,
3212
3220
  style: { height: m },
@@ -3214,7 +3222,7 @@ function ti({ columns: e = [], taskList: t }) {
3214
3222
  "aria-label": h.taskList,
3215
3223
  "aria-rowcount": n.length + 1,
3216
3224
  "aria-colcount": S.length,
3217
- children: [/* @__PURE__ */ v(Jr, {
3225
+ children: [/* @__PURE__ */ v(Xr, {
3218
3226
  columns: S,
3219
3227
  rowHeight: d,
3220
3228
  scales: p,
@@ -3224,7 +3232,7 @@ function ti({ columns: e = [], taskList: t }) {
3224
3232
  }), /* @__PURE__ */ v("div", {
3225
3233
  ref: g,
3226
3234
  className: $.body,
3227
- style: ei,
3235
+ style: ni,
3228
3236
  onScroll: k,
3229
3237
  role: "presentation",
3230
3238
  children: /* @__PURE__ */ y("div", {
@@ -3238,7 +3246,7 @@ function ti({ columns: e = [], taskList: t }) {
3238
3246
  }),
3239
3247
  Array.from({ length: A.end - A.start }, (e, o) => {
3240
3248
  let s = A.start + o, c = n[s], l = E.get(c.id);
3241
- return /* @__PURE__ */ v(Qr, {
3249
+ return /* @__PURE__ */ v(ei, {
3242
3250
  task: c,
3243
3251
  rowHeight: d,
3244
3252
  rowIndex: s,
@@ -3266,7 +3274,7 @@ function ti({ columns: e = [], taskList: t }) {
3266
3274
  }
3267
3275
  //#endregion
3268
3276
  //#region src/hooks/useGridResize.ts
3269
- function ni(e, t) {
3277
+ function ii(e, t) {
3270
3278
  let [n, r] = m(void 0), i = p(null);
3271
3279
  return {
3272
3280
  gridWidth: n,
@@ -3290,10 +3298,10 @@ function ni(e, t) {
3290
3298
  }, [e, t])
3291
3299
  };
3292
3300
  }
3293
- var ri = { actionsCell: "_actionsCell_1gvtx_1" };
3301
+ var ai = { actionsCell: "_actionsCell_1gvtx_1" };
3294
3302
  //#endregion
3295
3303
  //#region src/components/taskList/ActionsCell.tsx
3296
- function ii(e) {
3304
+ function oi(e) {
3297
3305
  let t = j(e.startDate, 1);
3298
3306
  return {
3299
3307
  id: `task-${Date.now()}`,
@@ -3306,9 +3314,9 @@ function ii(e) {
3306
3314
  parentId: e.parentId ?? null
3307
3315
  };
3308
3316
  }
3309
- function ai({ task: e, api: t }) {
3317
+ function si({ task: e, api: t }) {
3310
3318
  return /* @__PURE__ */ y("div", {
3311
- className: ri.actionsCell,
3319
+ className: ai.actionsCell,
3312
3320
  children: [
3313
3321
  /* @__PURE__ */ v("button", {
3314
3322
  type: "button",
@@ -3328,7 +3336,7 @@ function ai({ task: e, api: t }) {
3328
3336
  "aria-label": t.labels.addTaskAfter(e),
3329
3337
  onClick: (n) => {
3330
3338
  n.stopPropagation();
3331
- let r = ii(e);
3339
+ let r = oi(e);
3332
3340
  t.createTask(r, e.id), t.editTask(r);
3333
3341
  },
3334
3342
  children: /* @__PURE__ */ v("span", {
@@ -3354,12 +3362,12 @@ function ai({ task: e, api: t }) {
3354
3362
  }
3355
3363
  //#endregion
3356
3364
  //#region src/components/taskList/defaultColumns.tsx
3357
- var oi = "__action", si = [
3365
+ var ci = "__action", li = [
3358
3366
  {
3359
- key: oi,
3367
+ key: ci,
3360
3368
  header: " ",
3361
3369
  width: 100,
3362
- render: (e, t) => /* @__PURE__ */ v(ai, {
3370
+ render: (e, t) => /* @__PURE__ */ v(si, {
3363
3371
  task: e,
3364
3372
  api: t
3365
3373
  })
@@ -3389,11 +3397,11 @@ var oi = "__action", si = [
3389
3397
  width: 90,
3390
3398
  render: (e) => `${e.progress ?? 0}%`
3391
3399
  }
3392
- ], ci = si.filter((e) => e.key !== oi);
3400
+ ], ui = li.filter((e) => e.key !== ci);
3393
3401
  //#endregion
3394
3402
  //#region src/Gantt.tsx
3395
- function li({ tasks: e, dependencies: t, rowHeight: n, colWidth: r, height: i, scales: a, padDays: o, zoomLevels: s, defaultZoomIndex: c, onZoomChange: l, zoomWheel: u, zoomKeyboard: d, onTaskClick: m, columns: h, defaultTaskListWidth: g = 280, onDependencyCreate: _, onDependencyDelete: b, onTaskCreate: x, onTaskDelete: S, onTaskEdit: C, onTasksChange: w, calendar: T, snapToWorking: E, durationUnit: D, readOnly: O = !1, apiRef: k, hideTaskList: A, taskList: j, bars: M, dependencySlots: N, timeline: P, labels: F }) {
3396
- let ee = p(null), I = p(null), { gridWidth: L, onHandleMouseDown: R } = ni(ee, I), z = h ?? (O ? ci : si), B = !A;
3403
+ function di({ tasks: e, dependencies: t, rowHeight: n, colWidth: r, height: i, scales: a, padDays: o, zoomLevels: s, defaultZoomIndex: c, onZoomChange: l, zoomWheel: u, zoomKeyboard: d, onTaskClick: m, columns: h, defaultTaskListWidth: g = 280, onDependencyCreate: _, onDependencyDelete: b, onTaskCreate: x, onTaskDelete: S, onTaskEdit: C, onTasksChange: w, calendar: T, snapToWorking: E, durationUnit: D, readOnly: O = !1, apiRef: k, hideTaskList: A, taskList: j, bars: M, dependencySlots: N, timeline: P, labels: F }) {
3404
+ let ee = p(null), I = p(null), { gridWidth: L, onHandleMouseDown: R } = ii(ee, I), z = h ?? (O ? ui : li), B = !A;
3397
3405
  return /* @__PURE__ */ v(Cn, {
3398
3406
  tasks: e,
3399
3407
  dependencies: t,
@@ -3435,7 +3443,7 @@ function li({ tasks: e, dependencies: t, rowHeight: n, colWidth: r, height: i, s
3435
3443
  role: "group",
3436
3444
  "aria-label": F?.gantt ?? Ie.gantt,
3437
3445
  style: { position: "relative" },
3438
- children: [/* @__PURE__ */ v(ti, {
3446
+ children: [/* @__PURE__ */ v(ri, {
3439
3447
  columns: z,
3440
3448
  taskList: j
3441
3449
  }), /* @__PURE__ */ y("div", {
@@ -3450,19 +3458,19 @@ function li({ tasks: e, dependencies: t, rowHeight: n, colWidth: r, height: i, s
3450
3458
  background: "var(--am-gantt-grid-bg, #ffffff)",
3451
3459
  ...L === void 0 ? { left: g } : { width: L }
3452
3460
  },
3453
- children: [/* @__PURE__ */ v(qr, { onMouseDown: R }), /* @__PURE__ */ v("div", {
3461
+ children: [/* @__PURE__ */ v(Yr, { onMouseDown: R }), /* @__PURE__ */ v("div", {
3454
3462
  style: {
3455
3463
  flex: "1 1 auto",
3456
3464
  minWidth: 0
3457
3465
  },
3458
- children: /* @__PURE__ */ v(Gr, {})
3466
+ children: /* @__PURE__ */ v(qr, {})
3459
3467
  })]
3460
3468
  })]
3461
- }) : /* @__PURE__ */ v(Gr, {})
3469
+ }) : /* @__PURE__ */ v(qr, {})
3462
3470
  })
3463
3471
  });
3464
3472
  }
3465
3473
  //#endregion
3466
- export { oi as ACTION_COLUMN_KEY, Hn as BarTooltipRoot, Un as BarTooltipTrigger, Mn as Calendar, si as DEFAULT_COLUMNS, Wt as DEFAULT_ZOOM_INDEX, Ut as DEFAULT_ZOOM_LEVELS, li as Gantt, Xn as GanttBarTooltip, Gr as GanttGrid, Cn as GanttProvider, Tn as GanttSlotsProvider, er as MilestoneBar, ar as ProjectBar, ci as READ_ONLY_COLUMNS, cr as TaskBar, ti as TaskList, Me as displayEndDate, Ne as endInstantFromDisplayDate, Y as mergeSlotProps, Vn as useBarTooltip, rn as useGanttReadOnly, J as useGanttSlots };
3474
+ export { ci as ACTION_COLUMN_KEY, Hn as BarTooltipRoot, Yn as BarTooltipTrigger, Mn as Calendar, li as DEFAULT_COLUMNS, Wt as DEFAULT_ZOOM_INDEX, Ut as DEFAULT_ZOOM_LEVELS, di as Gantt, Qn as GanttBarTooltip, qr as GanttGrid, Cn as GanttProvider, Tn as GanttSlotsProvider, nr as MilestoneBar, sr as ProjectBar, ui as READ_ONLY_COLUMNS, ur as TaskBar, ri as TaskList, Me as displayEndDate, Ne as endInstantFromDisplayDate, Y as mergeSlotProps, Vn as useBarTooltip, rn as useGanttReadOnly, J as useGanttSlots };
3467
3475
 
3468
3476
  //# sourceMappingURL=index.mjs.map