vlite3 1.4.31 → 1.4.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/components/Accordion/Accordion.vue.js +19 -16
  2. package/components/Accordion/AccordionContent.vue.js +2 -2
  3. package/components/Accordion/AccordionItem.vue.js +38 -36
  4. package/components/CategoryManager/CategoryManager.vue2.js +4 -3
  5. package/components/CategoryManager/CategoryNode.vue.js +30 -30
  6. package/components/CategoryMenu/CategoryMenu.vue.js +9 -11
  7. package/components/Chart/GanttChart.vue.d.ts +18 -2
  8. package/components/Chart/GanttChart.vue.js +1 -1
  9. package/components/Chart/GanttChart.vue2.js +1347 -604
  10. package/components/Chart/GanttChartConnectorRouting.d.ts +83 -0
  11. package/components/Chart/GanttChartConnectorRouting.js +405 -0
  12. package/components/Chart/GanttChartDateUtils.d.ts +38 -0
  13. package/components/Chart/GanttChartDateUtils.js +79 -0
  14. package/components/Chart/GanttChartDependencyUtils.d.ts +92 -0
  15. package/components/Chart/GanttChartDependencyUtils.js +109 -0
  16. package/components/Chart/GanttChartResizePreviewUtils.d.ts +52 -0
  17. package/components/Chart/GanttChartResizePreviewUtils.js +53 -0
  18. package/components/Chart/GanttChartTooltipUtils.d.ts +41 -0
  19. package/components/Chart/GanttChartTooltipUtils.js +63 -0
  20. package/components/Chart/index.d.ts +3 -1
  21. package/components/Chart/types.d.ts +92 -2
  22. package/components/Chart/types.js +8 -0
  23. package/components/ColorPicker/ColorIro.vue2.js +155 -0
  24. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  25. package/components/ColorPicker/ColorPicker.vue.d.ts +5 -0
  26. package/components/ColorPicker/ColorPicker.vue.js +111 -65
  27. package/components/ColorPicker/constants.d.ts +2 -0
  28. package/components/ColorPicker/constants.js +4 -0
  29. package/components/ColorPicker/index.d.ts +1 -0
  30. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  31. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  32. package/components/Dropdown/Dropdown.vue.js +100 -97
  33. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  34. package/components/Form/AccordionView.vue.js +5 -220
  35. package/components/Form/AccordionView.vue3.js +250 -0
  36. package/components/Form/Form.vue.js +2 -2
  37. package/components/Form/Form.vue2.js +309 -280
  38. package/components/Form/FormField.vue.js +177 -197
  39. package/components/Form/FormFields.vue.js +1 -1
  40. package/components/Form/FormFields.vue2.js +60 -60
  41. package/components/Form/FormSkeleton.vue.js +50 -35
  42. package/components/Form/TableView.vue.js +59 -43
  43. package/components/Form/composables/useForm.js +159 -148
  44. package/components/Form/index.vue2.js +7 -7
  45. package/components/Form/utils/form.utils.d.ts +2 -0
  46. package/components/Form/utils/form.utils.js +17 -13
  47. package/components/GoogleMap.vue.d.ts +1 -1
  48. package/components/Kanban/Kanban.vue.d.ts +16 -2
  49. package/components/Kanban/Kanban.vue.js +2 -2
  50. package/components/Kanban/Kanban.vue2.js +150 -86
  51. package/components/Kanban/types.d.ts +37 -0
  52. package/components/NavbarCommandPalette.vue.js +1 -1
  53. package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +189 -0
  54. package/components/PanZoomViewport/PanZoomViewport.vue.js +7 -0
  55. package/components/PanZoomViewport/PanZoomViewport.vue2.js +536 -0
  56. package/components/PanZoomViewport/index.d.ts +2 -0
  57. package/components/PanZoomViewport/types.d.ts +121 -0
  58. package/components/ScaleGenerator/ScaleGenerator.vue.d.ts +3 -0
  59. package/components/ScaleGenerator/ScaleGenerator.vue.js +5 -108
  60. package/components/ScaleGenerator/ScaleGenerator.vue2.js +143 -2
  61. package/components/ScaleGenerator/types.d.ts +2 -0
  62. package/components/Screen/ScreenFilter.vue.js +19 -18
  63. package/components/SeoProvider/SeoProvider.vue.d.ts +4 -1
  64. package/components/SeoProvider/SeoProvider.vue.js +39 -33
  65. package/components/SeoProvider/domAdapter.d.ts +1 -4
  66. package/components/SeoProvider/domAdapter.js +71 -58
  67. package/components/SeoProvider/index.d.ts +5 -2
  68. package/components/SeoProvider/normalizeSeo.d.ts +10 -49
  69. package/components/SeoProvider/normalizeSeo.js +246 -182
  70. package/components/SeoProvider/plainText.d.ts +8 -0
  71. package/components/SeoProvider/plainText.js +117 -0
  72. package/components/SeoProvider/seoUrl.d.ts +13 -0
  73. package/components/SeoProvider/seoUrl.js +25 -0
  74. package/components/SeoProvider/structuredData.d.ts +100 -0
  75. package/components/SeoProvider/structuredData.js +33 -0
  76. package/components/SeoProvider/types.d.ts +47 -109
  77. package/components/Tabes/Tabes.vue.js +1 -1
  78. package/components/Tabes/Tabes.vue2.js +215 -193
  79. package/components/Tabes/TabesMarkerGeometry.d.ts +34 -0
  80. package/components/Tabes/TabesMarkerGeometry.js +21 -0
  81. package/components/ThemeProvider/ThemeProvider.vue.d.ts +2 -0
  82. package/components/ThemeProvider/ThemeProvider.vue.js +29 -23
  83. package/components/ThemeProvider/index.d.ts +1 -1
  84. package/components/ThemeProvider/themeVars.d.ts +9 -13
  85. package/components/ThemeProvider/themeVars.js +173 -125
  86. package/components/ThemeProvider/types.d.ts +10 -0
  87. package/components/ToastNotification.vue.js +1 -1
  88. package/components/ToastNotification.vue2.js +3 -3
  89. package/components/index.d.ts +3 -2
  90. package/composables/useKeyStroke.d.ts +18 -0
  91. package/composables/useKeyStroke.js +103 -77
  92. package/composables/useTheme.js +1 -1
  93. package/index.d.ts +2 -0
  94. package/index.js +380 -350
  95. package/package.json +12 -4
  96. package/style.css +1 -1
  97. package/utils/environment.d.ts +29 -0
  98. package/utils/environment.js +4 -0
  99. package/utils/functions.js +14 -13
  100. package/components/ColorPicker/ColorIro.vue.js +0 -141
  101. package/components/Form/AccordionView.vue2.js +0 -4
  102. /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
@@ -1,24 +1,51 @@
1
- import { defineComponent as et, ref as x, computed as p, onMounted as tt, watch as ze, onUnmounted as ot, openBlock as u, createElementBlock as d, createElementVNode as r, createStaticVNode as nt, createCommentVNode as h, normalizeStyle as D, Fragment as $, renderList as C, normalizeClass as me, toDisplayString as b, unref as z, withDirectives as lt, vShow as at, createBlock as st, Teleport as rt, createTextVNode as We, nextTick as ke } from "vue";
2
- import { CHART_COLORS as it, getColor as ut, animateProgress as dt } from "./utils.js";
3
- const ct = {
1
+ import { defineComponent as Wn, ref as m, computed as D, watch as me, onMounted as An, onUnmounted as En, openBlock as d, createElementBlock as v, createElementVNode as s, createCommentVNode as p, createStaticVNode as Rn, normalizeStyle as E, Fragment as C, renderList as z, normalizeClass as xe, toDisplayString as I, unref as X, withDirectives as Bn, vShow as Pn, withKeys as je, withModifiers as zt, createBlock as Hn, Teleport as _n, createTextVNode as Xt, nextTick as Ue } from "vue";
2
+ import { CHART_COLORS as zn, getColor as Xn, animateProgress as Gn } from "./utils.js";
3
+ import { resolveGanttScheduleDependencyEdges as Gt, ganttDependencyEdgeKey as qn, ganttDependencyTypeLabel as qt, getGanttDependencyEdgeScrollDelta as Ft, getGanttDependencyConnectorPosition as Fn, validateGanttDependencyLink as Je, describeGanttDependencyLinkValidation as Qe, findGanttDependencyBarAtPoint as Yn } from "./GanttChartDependencyUtils.js";
4
+ import { routeGanttDependencyConnectors as On, ganttConnectorPreviewPath as Vn, ganttConnectorArrowPath as Kn } from "./GanttChartConnectorRouting.js";
5
+ import { parseGanttDate as we, ganttAddDays as Nn, ganttStartOfWeek as Zn, ganttStartOfMonth as jn, ganttDateToX as Un, ganttCalendarDaysBetween as Jn, ganttDaysToPx as Qn, ganttPxToDays as eo } from "./GanttChartDateUtils.js";
6
+ import { ganttPreviewBarGeometry as to, computeGanttInteractionPreview as no } from "./GanttChartResizePreviewUtils.js";
7
+ import { placeGanttTaskTooltip as oo, isGanttPointerNearConnector as ao } from "./GanttChartTooltipUtils.js";
8
+ const lo = {
4
9
  key: 0,
5
10
  class: "vlite-gantt-toolbar"
6
- }, vt = {
11
+ }, ro = {
7
12
  key: 0,
13
+ class: "vlite-gantt-legend-blocked",
14
+ role: "note",
15
+ "aria-label": "Legend: blocked task"
16
+ }, so = {
17
+ key: 1,
8
18
  class: "vlite-gantt-zoom-controls"
9
- }, ft = ["disabled"], gt = ["disabled"], ht = { class: "vlite-gantt-wrapper" }, yt = ["onClick"], mt = { class: "text-xs font-bold text-foreground uppercase tracking-wide" }, kt = { class: "vlite-gantt-group-count" }, xt = ["onClick"], pt = { class: "truncate text-xs font-medium text-foreground" }, wt = {
19
+ }, io = ["disabled"], uo = ["disabled"], co = { class: "vlite-gantt-wrapper" }, vo = ["onClick"], fo = { class: "text-xs font-bold text-foreground uppercase tracking-wide" }, go = { class: "vlite-gantt-group-count" }, yo = ["onClick"], po = { class: "truncate text-xs font-medium text-foreground" }, ho = {
10
20
  key: 0,
11
21
  class: "vlite-gantt-progress-badge"
12
- }, bt = ["width", "height"], $t = ["x1", "x2", "y2"], Mt = ["x", "y"], Dt = ["x", "y"], St = ["width", "height"], Ct = ["id"], Lt = ["stop-color"], _t = ["stop-color"], Ht = ["id"], zt = ["stop-color"], Wt = ["stop-color"], Tt = ["x1", "x2", "y2"], Et = ["y1", "x2", "y2"], It = ["y", "width", "height"], Bt = ["d"], Rt = ["d"], At = ["d", "fill", "stroke", "opacity", "onMouseenter", "onMousemove", "onClick"], Pt = ["d", "fill"], Ft = ["d", "fill"], Zt = ["d", "fill"], Ot = ["x", "y", "width", "height", "onMouseenter", "onMousemove", "onMousedown", "onClick"], Gt = ["x", "y", "width", "height", "rx", "ry"], qt = ["x", "y", "height"], Xt = ["x", "y", "height"], jt = ["x", "y", "fill", "opacity"], Nt = { key: 1 }, Vt = ["x1", "x2", "y2", "stroke"], Ut = ["cx", "fill"], Kt = ["x", "fill"], Qt = { class: "font-semibold text-xs mb-1.5" }, Jt = { class: "flex items-center gap-1.5 text-[11px] text-muted-foreground mb-1" }, Yt = { class: "text-[10px] text-muted-foreground" }, eo = {
22
+ }, ko = ["width", "height"], mo = ["x1", "x2", "y2"], xo = ["x", "y"], wo = ["x", "y"], bo = ["width", "height"], Do = ["id"], Io = ["stop-color"], $o = ["stop-color"], Mo = ["id"], So = ["stop-color"], Lo = ["stop-color"], Co = ["id"], To = ["x1", "x2", "y2"], Wo = ["y1", "x2", "y2"], Ao = ["y", "width", "height"], Eo = ["aria-label"], Ro = ["d", "tabindex", "onClick", "onKeydown", "onMouseenter", "onFocus"], Bo = ["d", "stroke", "stroke-width", "stroke-opacity"], Po = ["d", "fill", "fill-opacity"], Ho = ["transform", "aria-label", "onKeydown"], _o = ["onMouseenter"], zo = ["d", "fill", "stroke", "opacity", "onMouseenter", "onMousemove", "onClick"], Xo = ["d", "fill"], Go = ["d", "fill"], qo = ["d", "fill"], Fo = ["d", "fill"], Yo = ["d"], Oo = ["transform"], Vo = ["x", "y", "width", "height", "onMouseenter", "onMousemove", "onMousedown", "onClick"], Ko = ["x", "y", "width", "height", "rx", "ry"], No = ["x", "y", "height"], Zo = ["x", "y", "height"], jo = ["data-name", "x", "y", "fill", "opacity"], Uo = ["transform", "aria-label", "onPointerdown", "onKeydown", "onFocus", "onMouseenter"], Jo = {
23
+ key: 3,
24
+ class: "pointer-events-none"
25
+ }, Qo = ["x", "y", "width", "height", "rx", "stroke", "stroke-dasharray"], ea = ["x", "y", "fill"], ta = {
26
+ key: 2,
27
+ class: "vlite-gantt-link-preview pointer-events-none"
28
+ }, na = ["x1", "y1", "x2", "y2", "stroke", "stroke-dasharray", "stroke-opacity"], oa = ["cx", "cy", "fill", "fill-opacity"], aa = { key: 3 }, la = ["x1", "x2", "y2", "stroke"], ra = ["cx", "fill"], sa = ["x", "fill"], ia = {
29
+ class: "sr-only",
30
+ role: "status",
31
+ "aria-live": "polite",
32
+ "aria-atomic": "true"
33
+ }, ua = { class: "font-semibold text-xs mb-1.5" }, ca = { class: "flex items-center gap-1.5 text-[11px] text-muted-foreground mb-1" }, da = { class: "text-[10px] text-muted-foreground" }, va = {
13
34
  key: 0,
14
35
  class: "mt-1.5 flex items-center gap-2"
15
- }, to = { class: "vlite-gantt-tooltip-progress-track" }, oo = { class: "text-[10px] font-semibold" }, no = {
36
+ }, fa = { class: "vlite-gantt-tooltip-progress-track" }, ga = { class: "text-[10px] font-semibold" }, ya = {
16
37
  key: 1,
17
- class: "text-[10px] text-muted-foreground mt-1 opacity-60"
18
- }, lo = {
38
+ class: "vlite-gantt-tooltip-blocked mt-1.5"
39
+ }, pa = {
19
40
  key: 2,
41
+ class: "text-[10px] text-muted-foreground mt-1 opacity-60"
42
+ }, ha = {
43
+ key: 3,
20
44
  class: "text-[9px] text-muted-foreground mt-1.5 opacity-40"
21
- }, ao = 16, Y = 5, so = 4, Te = 8, uo = /* @__PURE__ */ et({
45
+ }, ka = {
46
+ key: 4,
47
+ class: "text-[9px] text-muted-foreground mt-1 opacity-40"
48
+ }, et = "#eab308", Yt = 8, ma = 7, Ot = 6.5, xa = 10, La = /* @__PURE__ */ Wn({
22
49
  __name: "GanttChart",
23
50
  props: {
24
51
  tasks: {},
@@ -36,227 +63,313 @@ const ct = {
36
63
  showTodayLine: { type: Boolean, default: !0 },
37
64
  showHeader: { type: Boolean, default: !0 },
38
65
  animate: { type: Boolean, default: !0 },
39
- colors: { default: () => it },
66
+ colors: { default: () => zn },
40
67
  todayColor: { default: "var(--color-danger)" },
41
68
  locale: { default: "en-US" },
42
69
  draggable: { type: Boolean, default: !0 },
70
+ editableDependencies: { type: Boolean, default: !1 },
43
71
  cascadeDependencies: { type: Boolean, default: !1 },
44
72
  zoom: { type: Boolean, default: !0 }
45
73
  },
46
- emits: ["task-click", "task-hover", "task-update"],
47
- setup(c, { emit: Ee }) {
48
- const s = c, A = Ee;
49
- function xe(t) {
50
- return t instanceof Date ? new Date(t.getTime()) : new Date(t);
51
- }
52
- function X(t, o) {
53
- const e = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds());
54
- return (Date.UTC(o.getFullYear(), o.getMonth(), o.getDate(), o.getHours(), o.getMinutes(), o.getSeconds()) - e) / 864e5;
55
- }
56
- function y(t, o) {
57
- const e = new Date(t);
58
- return e.setDate(e.getDate() + o), e;
59
- }
60
- function Ie(t) {
61
- const o = new Date(t), e = o.getDay();
62
- return o.setDate(o.getDate() - (e === 0 ? 6 : e - 1)), o.setHours(0, 0, 0, 0), o;
63
- }
64
- function Be(t) {
65
- return new Date(t.getFullYear(), t.getMonth(), 1);
66
- }
67
- const j = x(), L = x(), P = x(800);
68
- let ee = null;
69
- function Re() {
70
- j.value && (ee = new ResizeObserver((t) => {
71
- const o = Math.round(t[0].contentRect.width || 800);
72
- Math.abs(P.value - o) > 0.5 && (P.value = o);
73
- }), ee.observe(j.value), P.value = Math.round(j.value.clientWidth || 800));
74
- }
75
- const _ = p(
76
- () => s.tasks.map((t, o) => ({
77
- ...t,
78
- _start: xe(t.start),
79
- _end: xe(t.end),
80
- _color: t.color ?? ut(s.colors, o),
81
- _index: o
74
+ emits: ["task-click", "task-hover", "task-update", "dependency-create", "dependency-delete"],
75
+ setup(c, { emit: Vt }) {
76
+ const u = c, J = Vt;
77
+ function tt(e) {
78
+ return we(e);
79
+ }
80
+ function nt(e, n) {
81
+ return Jn(e, n);
82
+ }
83
+ function O(e, n) {
84
+ return Nn(e, n);
85
+ }
86
+ function Kt(e) {
87
+ return Zn(e);
88
+ }
89
+ function Nt(e) {
90
+ return jn(e);
91
+ }
92
+ const be = m(), R = m(), re = m(800);
93
+ let Pe = null;
94
+ function Zt() {
95
+ be.value && (Pe = new ResizeObserver((e) => {
96
+ const n = Math.round(e[0].contentRect.width || 800);
97
+ Math.abs(re.value - n) > 0.5 && (re.value = n);
98
+ }), Pe.observe(be.value), re.value = Math.round(be.value.clientWidth || 800));
99
+ }
100
+ const x = D(
101
+ () => u.tasks.map((e, n) => ({
102
+ ...e,
103
+ _start: tt(e.start),
104
+ _end: tt(e.end),
105
+ _color: e.color ?? Xn(u.colors, n),
106
+ _index: n
82
107
  }))
83
- ), N = x(/* @__PURE__ */ new Set());
84
- function Ae(t) {
85
- const o = new Set(N.value);
86
- o.has(t) ? o.delete(t) : o.add(t), N.value = o;
87
- }
88
- const te = p(() => {
89
- const t = /* @__PURE__ */ new Map(), o = [];
90
- for (const e of _.value)
91
- e.group ? (t.has(e.group) || t.set(e.group, []), t.get(e.group).push(e)) : o.push(e);
92
- return { grouped: t, ungrouped: o };
93
- }), F = p(() => {
94
- const t = [];
95
- for (const [o, e] of te.value.grouped)
96
- if (t.push({ type: "group-header", group: o }), !N.value.has(o)) for (const n of e) t.push({ type: "task", group: o, task: n });
97
- for (const o of te.value.ungrouped) t.push({ type: "task", task: o });
98
- return t;
99
- }), W = p(() => {
100
- if (!_.value.length) {
101
- const i = /* @__PURE__ */ new Date();
102
- return { start: y(i, -7), end: y(i, 30) };
108
+ ), ot = D(() => x.value.some((e) => e.blocked)), De = m(/* @__PURE__ */ new Set());
109
+ function jt(e) {
110
+ const n = new Set(De.value);
111
+ n.has(e) ? n.delete(e) : n.add(e), De.value = n;
112
+ }
113
+ const He = D(() => {
114
+ const e = /* @__PURE__ */ new Map(), n = [];
115
+ for (const t of x.value)
116
+ t.group ? (e.has(t.group) || e.set(t.group, []), e.get(t.group).push(t)) : n.push(t);
117
+ return { grouped: e, ungrouped: n };
118
+ }), se = D(() => {
119
+ const e = [];
120
+ for (const [n, t] of He.value.grouped)
121
+ if (e.push({ type: "group-header", group: n }), !De.value.has(n)) for (const o of t) e.push({ type: "task", group: n, task: o });
122
+ for (const n of He.value.ungrouped) e.push({ type: "task", task: n });
123
+ return e;
124
+ }), Ie = D(() => {
125
+ if (!x.value.length) {
126
+ const l = we(/* @__PURE__ */ new Date());
127
+ return { start: O(l, -7), end: O(l, 30) };
103
128
  }
104
- let t = _.value[0]._start, o = _.value[0]._end;
105
- for (const i of _.value)
106
- i._start < t && (t = i._start), i._end > o && (o = i._end);
107
- const e = s.viewMode === "day" ? 2 : s.viewMode === "week" ? 5 : 15;
108
- let n = y(t, -e), a = y(o, e);
109
- return s.viewMode === "week" ? n = Ie(n) : s.viewMode === "month" ? n = Be(n) : n.setHours(0, 0, 0, 0), { start: n, end: a };
110
- }), m = x(1);
111
- let T = null;
112
- function Pe(t) {
113
- if (s.zoom && (t.ctrlKey || t.metaKey)) {
114
- t.preventDefault();
115
- const o = L.value;
116
- if (!o) return;
117
- const e = o.getBoundingClientRect(), n = t.clientX - e.left, i = (T !== null ? T : o.scrollLeft) + n, f = m.value;
118
- let v = f * Math.exp(-t.deltaY * 5e-3);
119
- if (v = Math.max(0.2, Math.min(v, 5)), v === f) return;
120
- m.value = v;
121
- const k = v / f;
122
- T = i * k - n, ke(() => {
123
- L.value && T !== null && (L.value.scrollLeft = T, T = null);
129
+ let e = x.value[0]._start, n = x.value[0]._end;
130
+ for (const l of x.value)
131
+ l._start < e && (e = l._start), l._end > n && (n = l._end);
132
+ const t = u.viewMode === "day" ? 2 : u.viewMode === "week" ? 5 : 15;
133
+ let o = O(e, -t), a = O(n, t);
134
+ return u.viewMode === "week" ? o = Kt(o) : u.viewMode === "month" ? o = Nt(o) : o = we(o), { start: o, end: a };
135
+ }), $ = m(1);
136
+ let Q = null;
137
+ function Ut(e) {
138
+ if (u.zoom && (e.ctrlKey || e.metaKey)) {
139
+ e.preventDefault();
140
+ const n = R.value;
141
+ if (!n) return;
142
+ const t = n.getBoundingClientRect(), o = e.clientX - t.left, l = (Q !== null ? Q : n.scrollLeft) + o, f = $.value;
143
+ let g = f * Math.exp(-e.deltaY * 5e-3);
144
+ if (g = Math.max(0.2, Math.min(g, 5)), g === f) return;
145
+ $.value = g;
146
+ const k = g / f;
147
+ Q = l * k - o, Ue(() => {
148
+ R.value && Q !== null && (R.value.scrollLeft = Q, Q = null);
124
149
  });
125
150
  }
126
151
  }
127
- function Fe() {
128
- const t = L.value;
129
- if (!t) {
130
- m.value = Math.min(m.value + 0.2, 5);
152
+ function Jt() {
153
+ const e = R.value;
154
+ if (!e) {
155
+ $.value = Math.min($.value + 0.2, 5);
131
156
  return;
132
157
  }
133
- const o = t.clientWidth / 2, e = t.scrollLeft + o, n = m.value;
134
- m.value = Math.min(n + 0.2, 5);
135
- const a = m.value / n;
136
- ke(() => t.scrollLeft = e * a - o);
137
- }
138
- function Ze() {
139
- const t = L.value;
140
- if (!t) {
141
- m.value = Math.max(m.value - 0.2, 0.2);
158
+ const n = e.clientWidth / 2, t = e.scrollLeft + n, o = $.value;
159
+ $.value = Math.min(o + 0.2, 5);
160
+ const a = $.value / o;
161
+ Ue(() => e.scrollLeft = t * a - n);
162
+ }
163
+ function Qt() {
164
+ const e = R.value;
165
+ if (!e) {
166
+ $.value = Math.max($.value - 0.2, 0.2);
142
167
  return;
143
168
  }
144
- const o = t.clientWidth / 2, e = t.scrollLeft + o, n = m.value;
145
- m.value = Math.max(n - 0.2, 0.2);
146
- const a = m.value / n;
147
- ke(() => t.scrollLeft = e * a - o);
148
- }
149
- const oe = p(() => {
150
- const t = [], { start: o, end: e } = W.value;
151
- let n = new Date(o);
152
- if (s.viewMode === "day")
153
- for (; n <= e; )
154
- t.push(n), n = y(n, 1);
155
- else if (s.viewMode === "week")
156
- for (; n <= e; )
157
- t.push(n), n = y(n, 7);
169
+ const n = e.clientWidth / 2, t = e.scrollLeft + n, o = $.value;
170
+ $.value = Math.max(o - 0.2, 0.2);
171
+ const a = $.value / o;
172
+ Ue(() => e.scrollLeft = t * a - n);
173
+ }
174
+ const _e = D(() => {
175
+ const e = [], { start: n, end: t } = Ie.value;
176
+ let o = new Date(n);
177
+ if (u.viewMode === "day")
178
+ for (; o <= t; )
179
+ e.push(o), o = O(o, 1);
180
+ else if (u.viewMode === "week")
181
+ for (; o <= t; )
182
+ e.push(o), o = O(o, 7);
158
183
  else
159
- for (; n <= e; )
160
- t.push(n), n = new Date(n.getFullYear(), n.getMonth() + 1, 1);
161
- return t;
162
- }), M = p(() => {
163
- let o = { day: 40, week: 120, month: 180 }[s.viewMode] * m.value;
164
- const e = Math.max(0, P.value - s.sidebarWidth), n = oe.value.length;
165
- return n > 0 && o * n < e && (o = e / n), o;
166
- }), pe = p(() => {
167
- const t = M.value;
168
- return oe.value.map((o, e) => {
169
- let n = "", a = "";
170
- return s.viewMode === "day" ? (n = o.toLocaleDateString(s.locale, { day: "numeric" }), a = o.toLocaleDateString(s.locale, { weekday: "short" })) : s.viewMode === "week" ? (n = o.toLocaleDateString(s.locale, { month: "short", day: "numeric" }), a = `W${Oe(o)}`) : (n = o.toLocaleDateString(s.locale, { month: "long" }), a = String(o.getFullYear())), { label: n, sublabel: a, x: e * t, width: t };
184
+ for (; o <= t; )
185
+ e.push(o), o = new Date(o.getFullYear(), o.getMonth() + 1, 1);
186
+ return e;
187
+ }), ie = D(() => {
188
+ let n = { day: 40, week: 120, month: 180 }[u.viewMode] * $.value;
189
+ const t = Math.max(0, re.value - u.sidebarWidth), o = _e.value.length;
190
+ return o > 0 && n * o < t && (n = t / o), n;
191
+ }), at = D(() => {
192
+ const e = ie.value;
193
+ return _e.value.map((n, t) => {
194
+ let o = "", a = "";
195
+ return u.viewMode === "day" ? (o = n.toLocaleDateString(u.locale, { day: "numeric" }), a = n.toLocaleDateString(u.locale, { weekday: "short" })) : u.viewMode === "week" ? (o = n.toLocaleDateString(u.locale, { month: "short", day: "numeric" }), a = `W${en(n)}`) : (o = n.toLocaleDateString(u.locale, { month: "long" }), a = String(n.getFullYear())), { label: o, sublabel: a, x: t * e, width: e };
171
196
  });
172
197
  });
173
- function Oe(t) {
174
- const o = new Date(t.getTime());
175
- o.setHours(0, 0, 0, 0), o.setDate(o.getDate() + 3 - (o.getDay() + 6) % 7);
176
- const e = new Date(o.getFullYear(), 0, 4);
177
- return 1 + Math.round(((o.getTime() - e.getTime()) / 864e5 - 3 + (e.getDay() + 6) % 7) / 7);
178
- }
179
- const Z = p(() => oe.value.length * M.value), E = p(() => s.showHeader ? 56 : 0), O = p(() => {
180
- const t = F.value.length * s.rowHeight;
181
- return Math.max(s.height || t, t);
198
+ function en(e) {
199
+ const n = new Date(e.getTime());
200
+ n.setHours(0, 0, 0, 0), n.setDate(n.getDate() + 3 - (n.getDay() + 6) % 7);
201
+ const t = new Date(n.getFullYear(), 0, 4);
202
+ return 1 + Math.round(((n.getTime() - t.getTime()) / 864e5 - 3 + (t.getDay() + 6) % 7) / 7);
203
+ }
204
+ const ee = D(() => _e.value.length * ie.value), te = D(() => u.showHeader ? 56 : 0), ne = D(() => {
205
+ const e = se.value.length * u.rowHeight;
206
+ return Math.max(u.height || e, e);
182
207
  });
183
- function ne(t) {
184
- if (s.viewMode === "day")
185
- return X(W.value.start, t) * M.value;
186
- if (s.viewMode === "week")
187
- return X(W.value.start, t) / 7 * M.value;
188
- {
189
- const o = W.value.start, e = (t.getFullYear() - o.getFullYear()) * 12 + (t.getMonth() - o.getMonth()), n = new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate(), a = (t.getDate() - 1 + t.getHours() / 24 + t.getMinutes() / 1440) / n;
190
- return (e + a) * M.value;
191
- }
208
+ function $e(e) {
209
+ return Un(e, Ie.value.start, u.viewMode, ie.value);
192
210
  }
193
- function le(t) {
194
- return s.viewMode === "day" ? t / M.value : s.viewMode === "week" ? t / M.value * 7 : t / M.value * 30.44;
211
+ function tn(e) {
212
+ return eo(e, u.viewMode, ie.value);
195
213
  }
196
- function we(t) {
197
- return s.viewMode === "day" ? t * M.value : s.viewMode === "week" ? t / 7 * M.value : t / 30.44 * M.value;
214
+ function nn(e) {
215
+ return Qn(e, u.viewMode, ie.value);
198
216
  }
199
- const w = p(() => {
200
- const t = Q.value;
201
- return F.value.reduce((o, e, n) => {
202
- if (e.type !== "task" || !e.task) return o;
203
- const a = e.task, i = ne(a._start), f = ne(a._end), v = Math.max(8, f - i), k = v * t, S = n * s.rowHeight + (s.rowHeight - s.barHeight) / 2, ge = a.progress != null ? v * Math.min(100, a.progress) / 100 * t : 0;
204
- return o.push({ task: a, x: i, y: S, fullW: v, w: k, progressW: ge, rowIndex: n }), o;
217
+ const w = D(() => {
218
+ const e = Re.value;
219
+ return se.value.reduce((n, t, o) => {
220
+ if (t.type !== "task" || !t.task) return n;
221
+ const a = t.task, l = $e(a._start), f = $e(a._end), g = Math.max(8, f - l), k = g * e, b = o * u.rowHeight + (u.rowHeight - u.barHeight) / 2, A = a.progress != null ? g * Math.min(100, a.progress) / 100 * e : 0;
222
+ return n.push({ task: a, x: l, y: b, fullW: g, w: k, progressW: A, rowIndex: o }), n;
205
223
  }, []);
206
- }), Ge = p(() => {
207
- if (!s.showDependencies) return [];
208
- const t = /* @__PURE__ */ new Map();
209
- for (const e of w.value) t.set(e.task.id, e);
210
- const o = [];
211
- for (const e of w.value)
212
- if (e.task.dependencies?.length)
213
- for (const n of e.task.dependencies) {
214
- const a = t.get(n);
215
- if (!a) continue;
216
- const i = a.x + a.fullW, f = a.y + s.barHeight / 2, v = e.x, k = e.y + s.barHeight / 2;
217
- o.push({ d: qe(i, f, v, k), ad: Xe(v, k) });
218
- }
219
- return o;
220
- });
221
- function qe(t, o, e, n) {
222
- const a = ao, i = so;
223
- if (e > t + a * 2) {
224
- if (Math.abs(o - n) < 2) return `M ${t} ${o} L ${e} ${n}`;
225
- const v = t + (e - t) / 2;
226
- return ae([[t, o], [v, o], [v, n], [e, n]], i);
224
+ }), lt = D(() => {
225
+ const e = /* @__PURE__ */ new Map();
226
+ for (const n of w.value) e.set(n.task.id, n);
227
+ return e;
228
+ }), V = D(() => {
229
+ if (!u.showDependencies) return [];
230
+ const e = /* @__PURE__ */ new Map();
231
+ for (const t of w.value)
232
+ e.set(t.task.id, {
233
+ id: t.task.id,
234
+ x: t.x,
235
+ y: t.y,
236
+ w: t.fullW,
237
+ h: u.barHeight,
238
+ row: t.rowIndex,
239
+ milestone: t.task.milestone
240
+ });
241
+ const n = Gt(x.value).map((t) => ({
242
+ predecessorId: t.predecessorId,
243
+ successorId: t.successorId,
244
+ key: qn(t.predecessorId, t.successorId)
245
+ }));
246
+ return On(n, e, {
247
+ rowHeight: u.rowHeight,
248
+ barHeight: u.barHeight,
249
+ chartWidth: ee.value,
250
+ chartHeight: ne.value,
251
+ cornerRadius: 5
252
+ });
253
+ }), G = m(null);
254
+ function rt(e) {
255
+ i.active || r.active || h.value || (G.value = e);
256
+ }
257
+ function st() {
258
+ G.value = null;
259
+ }
260
+ const it = /* @__PURE__ */ new Map();
261
+ function on(e, n) {
262
+ it.set(n, e ?? null);
263
+ }
264
+ function ut(e, n, t) {
265
+ const o = it.get(e);
266
+ if (!o) return;
267
+ const a = o.querySelector('[data-dep-part="hit"]');
268
+ a && a.setAttribute("d", n);
269
+ const l = o.querySelector('[data-dep-part="line"]');
270
+ l && l.setAttribute("d", n);
271
+ const f = o.querySelector('[data-dep-part="arrow"]');
272
+ f && f.setAttribute("d", t);
273
+ }
274
+ function ct(e) {
275
+ if (!u.showDependencies || !V.value.length) return;
276
+ const n = u.barHeight * 0.4;
277
+ for (const t of V.value) {
278
+ const o = e.get(t.predecessorId), a = e.get(t.successorId);
279
+ if (!o && !a) continue;
280
+ const l = lt.value.get(t.predecessorId), f = lt.value.get(t.successorId);
281
+ if (!l || !f) continue;
282
+ const g = (o?.geo?.x ?? l.x) + (o?.dx ?? 0), k = o?.geo?.fullW ?? l.fullW, b = (a?.geo?.x ?? f.x) + (a?.dx ?? 0), A = a?.geo?.fullW ?? f.fullW, pe = l.task.milestone ? g + k / 2 + n : g + k, he = l.y + u.barHeight / 2, ae = f.task.milestone ? b + A / 2 - n : b, le = f.y + u.barHeight / 2;
283
+ ut(
284
+ t.key,
285
+ Vn(pe, he, ae, le, u.rowHeight, u.barHeight),
286
+ Kn(ae, le)
287
+ );
227
288
  }
228
- const f = t + a;
229
- if (Math.abs(o - n) < s.rowHeight * 0.5) {
230
- const v = Math.max(o, n) + s.barHeight / 2 + a;
231
- return ae([[t, o], [f, o], [f, v], [e - a, v], [e - a, n], [e, n]], i);
289
+ }
290
+ function ze() {
291
+ for (const e of V.value)
292
+ ut(e.key, e.d, e.ad);
293
+ }
294
+ const L = m(null), ue = D(() => L.value ? V.value.find((e) => e.key === L.value) ?? null : null), an = D(() => {
295
+ const e = ue.value;
296
+ if (!e) return "Delete dependency";
297
+ const n = x.value.find((o) => o.id === e.predecessorId)?.name ?? e.predecessorId, t = x.value.find((o) => o.id === e.successorId)?.name ?? e.successorId;
298
+ return `Delete dependency from ${n} to ${t}`;
299
+ }), dt = D(() => {
300
+ const e = /* @__PURE__ */ new Map();
301
+ for (const n of x.value) e.set(n.id, n.name);
302
+ return e;
303
+ });
304
+ function vt(e) {
305
+ const n = dt.value.get(e.predecessorId) ?? e.predecessorId, t = dt.value.get(e.successorId) ?? e.successorId;
306
+ return `${t} is waiting on ${n} · ${n} is blocking ${t}`;
307
+ }
308
+ function K(e) {
309
+ return L.value === e;
310
+ }
311
+ function ce(e = !1) {
312
+ L.value && (L.value = null, e && W("Dependency deselected"));
313
+ }
314
+ function ft(e, n) {
315
+ if (!u.editableDependencies || r.active || i.active) return;
316
+ e.preventDefault(), e.stopPropagation(), L.value = n.key;
317
+ const t = x.value.find((a) => a.id === n.predecessorId), o = x.value.find((a) => a.id === n.successorId);
318
+ W(
319
+ `Dependency selected from ${t?.name ?? n.predecessorId} to ${o?.name ?? n.successorId}. Press Delete to remove, or Escape to deselect.`
320
+ );
321
+ }
322
+ function ln(e) {
323
+ e.preventDefault(), e.stopPropagation(), Me();
324
+ }
325
+ function Me() {
326
+ const e = ue.value;
327
+ if (!e || !u.editableDependencies) return;
328
+ const n = x.value.find((a) => a.id === e.predecessorId), t = x.value.find((a) => a.id === e.successorId);
329
+ if (!n || !t) {
330
+ ce();
331
+ return;
232
332
  }
233
- return ae([[t, o], [f, o], [f, n], [e, n]], i);
234
- }
235
- function ae(t, o) {
236
- if (t.length < 2) return "";
237
- if (t.length === 2) return `M ${t[0][0]} ${t[0][1]} L ${t[1][0]} ${t[1][1]}`;
238
- const e = [`M ${t[0][0]} ${t[0][1]}`];
239
- for (let a = 1; a < t.length - 1; a++) {
240
- const [i, f] = t[a - 1], [v, k] = t[a], [S, ge] = t[a + 1], Ce = v - i, Le = k - f, _e = S - v, He = ge - k, he = Math.hypot(Ce, Le), ye = Math.hypot(_e, He), J = Math.min(o, he / 2, ye / 2);
241
- e.push(`L ${v - Ce / he * J} ${k - Le / he * J}`), e.push(`Q ${v} ${k} ${v + _e / ye * J} ${k + He / ye * J}`);
333
+ const o = {
334
+ predecessorId: e.predecessorId,
335
+ successorId: e.successorId,
336
+ predecessor: Ae(n),
337
+ successor: Ae(t),
338
+ type: "waiting-on",
339
+ typeLabel: qt("waiting-on")
340
+ };
341
+ L.value = null, W(`Dependency removed from ${n.name} to ${t.name}`), J("dependency-delete", o);
342
+ }
343
+ function rn(e) {
344
+ !L.value || e.target?.closest?.(".vlite-gantt-dep-group, .vlite-gantt-dep-delete, .vlite-gantt-dep-connector") || ce();
345
+ }
346
+ function Xe(e) {
347
+ if (!(!L.value || r.active || h.value)) {
348
+ if (e.key === "Escape") {
349
+ e.preventDefault(), ce(!0);
350
+ return;
351
+ }
352
+ if (e.key === "Delete" || e.key === "Backspace") {
353
+ const n = e.target?.tagName;
354
+ if (n === "INPUT" || n === "TEXTAREA" || e.target?.isContentEditable) return;
355
+ e.preventDefault(), Me();
356
+ }
242
357
  }
243
- const n = t[t.length - 1];
244
- return e.push(`L ${n[0]} ${n[1]}`), e.join(" ");
245
- }
246
- function Xe(t, o) {
247
- return `M ${t} ${o} L ${t - Y} ${o - Y * 0.6} L ${t - Y} ${o + Y * 0.6} Z`;
248
- }
249
- const G = p(() => {
250
- const t = /* @__PURE__ */ new Date();
251
- return t.setHours(12, 0, 0, 0), ne(t);
252
- }), V = p(() => {
253
- const t = /* @__PURE__ */ new Date();
254
- return t >= W.value.start && t <= W.value.end;
358
+ }
359
+ me(L, (e, n) => {
360
+ e && !n && document.addEventListener("keydown", Xe), !e && n && document.removeEventListener("keydown", Xe);
361
+ });
362
+ const de = D(() => {
363
+ const e = we(/* @__PURE__ */ new Date());
364
+ return $e(e);
365
+ }), Se = D(() => {
366
+ const e = we(/* @__PURE__ */ new Date());
367
+ return e >= Ie.value.start && e <= Ie.value.end;
255
368
  });
256
- function je() {
257
- !L.value || !V.value || L.value.scrollTo({ left: Math.max(0, G.value - (P.value - s.sidebarWidth) / 2), behavior: "smooth" });
369
+ function sn() {
370
+ !R.value || !Se.value || R.value.scrollTo({ left: Math.max(0, de.value - (re.value - u.sidebarWidth) / 2), behavior: "smooth" });
258
371
  }
259
- let l = {
372
+ let i = {
260
373
  active: !1,
261
374
  barIndex: -1,
262
375
  taskId: "",
@@ -268,175 +381,573 @@ const ct = {
268
381
  affectedIds: /* @__PURE__ */ new Set(),
269
382
  // cascade set
270
383
  rafId: 0
384
+ }, r = {
385
+ active: !1,
386
+ sourceId: "",
387
+ sourceIndex: -1,
388
+ pointerX: 0,
389
+ pointerY: 0,
390
+ targetId: null,
391
+ targetValid: !1,
392
+ rafId: 0,
393
+ scrollRafId: 0,
394
+ keyboard: !1,
395
+ keyboardTargetIndex: -1
271
396
  };
272
- const I = x(!1), q = x(""), se = x(null), U = x("default"), K = x([]), H = x(null);
273
- function Ne(t, o) {
274
- K.value[o] = t;
275
- }
276
- function Ve(t) {
277
- const o = /* @__PURE__ */ new Set();
278
- if (!s.cascadeDependencies) return o;
279
- const e = [t];
280
- for (; e.length; ) {
281
- const n = e.shift();
282
- for (const a of _.value)
283
- a.dependencies?.includes(n) && !o.has(a.id) && (o.add(a.id), e.push(a.id));
397
+ const B = m(!1), N = m(""), q = m(null), Le = m(null), ve = m("default"), h = m(!1), oe = m(""), fe = m(null), S = m("none"), T = m(null), Ge = m(""), Ce = m(null), M = m(!1), Z = m([]), _ = m(null);
398
+ function un(e, n) {
399
+ Z.value[n] = e;
400
+ }
401
+ function cn(e) {
402
+ const n = /* @__PURE__ */ new Set();
403
+ if (!u.cascadeDependencies) return n;
404
+ const t = Gt(x.value), o = [e];
405
+ for (; o.length; ) {
406
+ const a = o.shift();
407
+ for (const l of t)
408
+ l.predecessorId === a && !n.has(l.successorId) && (n.add(l.successorId), o.push(l.successorId));
284
409
  }
285
- return o;
286
- }
287
- function be(t, o) {
288
- if (!s.draggable || o.task.milestone) return "move";
289
- const e = t.currentTarget.closest("svg");
290
- if (!e) return "move";
291
- const n = t.clientX - e.getBoundingClientRect().left;
292
- return n < o.x + Te ? "resize-left" : n > o.x + o.fullW - Te ? "resize-right" : "move";
293
- }
294
- function Ue(t, o) {
295
- if (!s.draggable) return;
296
- const e = w.value[o];
297
- if (!e || e.task.milestone) return;
298
- t.preventDefault(), t.stopPropagation();
299
- const n = be(t, e);
300
- l.active = !0, l.barIndex = o, l.taskId = e.task.id, l.mode = n, l.startMouseX = t.clientX, l.pxDelta = 0, l.origStart = new Date(e.task._start), l.origEnd = new Date(e.task._end), l.affectedIds = n === "move" ? Ve(e.task.id) : /* @__PURE__ */ new Set(), I.value = !0, q.value = e.task.id, g.value = null, B.value = o, document.addEventListener("mousemove", re), document.addEventListener("mouseup", ie), document.body.style.cursor = n === "move" ? "grabbing" : "ew-resize", document.body.style.userSelect = "none";
301
- }
302
- function re(t) {
303
- if (l.active) {
304
- if (l.pxDelta = t.clientX - l.startMouseX, l.mode !== "move" && l.origStart && l.origEnd) {
305
- const o = X(l.origStart, l.origEnd), e = le(l.pxDelta);
306
- l.mode === "resize-left" && e >= o - 0.5 && (l.pxDelta = we(o - 0.5)), l.mode === "resize-right" && -e >= o - 0.5 && (l.pxDelta = -we(o - 0.5));
307
- }
308
- cancelAnimationFrame(l.rafId), l.rafId = requestAnimationFrame(Ke);
410
+ return n;
411
+ }
412
+ function gt(e, n) {
413
+ if (!u.draggable || n.task.milestone) return "move";
414
+ const t = e.currentTarget.closest("svg");
415
+ if (!t) return "move";
416
+ const o = e.clientX - t.getBoundingClientRect().left;
417
+ return o < n.x + Yt ? "resize-left" : o > n.x + n.fullW - Yt ? "resize-right" : "move";
418
+ }
419
+ function dn(e, n) {
420
+ if (!u.draggable || r.active || h.value) return;
421
+ const t = w.value[n];
422
+ if (!t || t.task.milestone) return;
423
+ e.preventDefault(), e.stopPropagation();
424
+ const o = gt(e, t);
425
+ i.active = !0, i.barIndex = n, i.taskId = t.task.id, i.mode = o, i.startMouseX = e.clientX, i.pxDelta = 0, i.origStart = new Date(t.task._start), i.origEnd = new Date(t.task._end), i.affectedIds = o === "move" ? cn(t.task.id) : /* @__PURE__ */ new Set(), B.value = !0, N.value = t.task.id, y.value = null, M.value = !1, G.value = null, H.value = n, ge = "", document.addEventListener("mousemove", pt), document.addEventListener("mouseup", $t), document.addEventListener("pointercancel", kt), document.addEventListener("keydown", ht), document.body.style.cursor = o === "move" ? "grabbing" : "ew-resize", document.body.style.userSelect = "none", W(
426
+ o === "move" ? `Moving ${t.task.name}` : `Resizing ${t.task.name}. Preview dates update as you drag.`
427
+ );
428
+ }
429
+ function yt() {
430
+ if (!i.origStart || !i.origEnd) return null;
431
+ const e = nt(i.origStart, i.origEnd);
432
+ return no({
433
+ mode: i.mode,
434
+ pxDelta: i.pxDelta,
435
+ origStart: i.origStart,
436
+ origEnd: i.origEnd,
437
+ origDurationDays: e,
438
+ pxToDays: tn,
439
+ daysToPx: nn,
440
+ addDays: O
441
+ });
442
+ }
443
+ function pt(e) {
444
+ if (!i.active) return;
445
+ i.pxDelta = e.clientX - i.startMouseX;
446
+ const n = R.value;
447
+ if (n) {
448
+ const t = n.getBoundingClientRect(), { dx: o, dy: a } = Ft(e.clientX, e.clientY, {
449
+ left: t.left,
450
+ top: t.top,
451
+ right: t.right,
452
+ bottom: t.bottom
453
+ });
454
+ (o || a) && (n.scrollLeft += o, n.scrollTop += a, U.value && (U.value.scrollTop = n.scrollTop));
309
455
  }
456
+ cancelAnimationFrame(i.rafId), i.rafId = requestAnimationFrame(vn);
310
457
  }
311
- function Ke() {
312
- const t = l.pxDelta, o = K.value[l.barIndex];
313
- if (o) {
314
- if (l.mode === "move") {
315
- if (o.style.transform = `translateX(${t}px)`, l.affectedIds.size > 0) {
316
- for (let e = 0; e < w.value.length; e++)
317
- if (l.affectedIds.has(w.value[e].task.id)) {
318
- const n = K.value[e];
319
- n && (n.style.transform = `translateX(${t}px)`);
320
- }
321
- }
322
- } else l.mode === "resize-right" ? (o.style.transform = "translateX(0px)", w.value[l.barIndex] && o.setAttribute("data-resize-px", String(t))) : l.mode === "resize-left" && (o.style.transform = `translateX(${t}px)`, w.value[l.barIndex] && o.setAttribute("data-resize-px", String(-t)));
323
- if (H.value && l.origStart && l.origEnd) {
324
- const e = le(t), n = { month: "short", day: "numeric" };
325
- let a, i;
326
- l.mode === "move" ? (a = y(l.origStart, e), i = y(l.origEnd, e)) : l.mode === "resize-left" ? (a = y(l.origStart, e), i = l.origEnd) : (a = l.origStart, i = y(l.origEnd, e));
327
- const f = w.value[l.barIndex];
328
- if (f) {
329
- const v = l.mode === "move" ? f.x + f.fullW / 2 + t : f.x + f.fullW / 2;
330
- H.value.style.display = "";
331
- const k = H.value.querySelector("rect"), S = H.value.querySelector("text");
332
- k && (k.setAttribute("x", String(v - 62)), k.setAttribute("y", String(f.y - 20))), S && (S.setAttribute("x", String(v)), S.setAttribute("y", String(f.y - 10)), S.textContent = `${a.toLocaleDateString(s.locale, n)} — ${i.toLocaleDateString(s.locale, n)}`);
333
- }
334
- }
458
+ function ht(e) {
459
+ i.active && e.key === "Escape" && (e.preventDefault(), We(i.mode === "move" ? "Move cancelled" : "Resize cancelled"));
460
+ }
461
+ function kt() {
462
+ We(i.mode === "move" ? "Move cancelled" : "Resize cancelled");
463
+ }
464
+ function mt(e, n) {
465
+ const { x: t, y: o, fullW: a, progressW: l } = n, f = u.barHeight, g = u.barRadius, k = e.querySelector('[data-gantt-part="bg"]');
466
+ k && k.setAttribute("d", P(t, o, a, f, g));
467
+ const b = e.querySelector('[data-gantt-part="progress"]');
468
+ b && (l > 0 ? (b.setAttribute("d", P(t, o, Math.min(l, a), f, g)), b.style.display = "") : b.style.display = "none");
469
+ const A = e.querySelector('[data-gantt-part="fill"]');
470
+ A && A.setAttribute("d", P(t, o, a, f, g));
471
+ const pe = e.querySelector('[data-gantt-part="hitbox"]');
472
+ pe && (pe.setAttribute("x", String(t)), pe.setAttribute("width", String(a)));
473
+ const he = e.querySelector('[data-gantt-part="highlight"]');
474
+ he && (he.setAttribute("x", String(t)), he.setAttribute("width", String(a)));
475
+ const ae = e.querySelector('[data-gantt-part="handle-left"]');
476
+ ae && (ae.setAttribute("x", String(t)), ae.style.display = "");
477
+ const le = e.querySelector('[data-gantt-part="handle-right"]');
478
+ le && (le.setAttribute("x", String(t + a - 4)), le.style.display = "");
479
+ const Pt = e.querySelector('[data-gantt-part="blocked-hatch"]');
480
+ Pt && Pt.setAttribute("d", P(t, o, a, f, g));
481
+ const Ht = e.querySelector('[data-gantt-part="blocked-outline"]');
482
+ Ht && Ht.setAttribute("d", P(t, o, a, f, g));
483
+ const Be = e.querySelector('[data-gantt-part="blocked-lock"]');
484
+ Be && Be.setAttribute("transform", `translate(${t + 10}, ${o + f / 2})`);
485
+ const ke = e.querySelector('[data-gantt-part="label"]');
486
+ if (ke) {
487
+ ke.setAttribute("x", String(t + (Be ? 24 : 12))), ke.style.display = a > 60 ? "" : "none";
488
+ const _t = ke.getAttribute("data-name");
489
+ _t && (ke.textContent = Et(_t, a, !!Be));
335
490
  }
336
491
  }
337
- function ie() {
338
- if (!l.active) return;
339
- document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", ie), document.body.style.cursor = "", document.body.style.userSelect = "", cancelAnimationFrame(l.rafId);
340
- const t = le(l.pxDelta), o = Math.round(t * 2) / 2;
341
- if (Math.abs(o) > 0.1 && l.origStart && l.origEnd) {
342
- const e = _.value.find((n) => n.id === l.taskId);
343
- if (e) {
344
- let n, a;
345
- if (l.mode === "move" ? (n = y(l.origStart, o), a = y(l.origEnd, o)) : l.mode === "resize-left" ? (n = y(l.origStart, o), a = new Date(l.origEnd)) : (n = new Date(l.origStart), a = y(l.origEnd, o)), A("task-update", e, { start: n, end: a }), l.mode === "move" && l.affectedIds.size > 0)
346
- for (const i of l.affectedIds) {
347
- const f = _.value.find((v) => v.id === i);
348
- f && A("task-update", f, {
349
- start: y(f._start, o),
350
- end: y(f._end, o)
351
- });
492
+ function xt(e) {
493
+ const n = w.value[e], t = Z.value[e];
494
+ if (!n || !t || n.task.milestone) return;
495
+ t.style.transform = "", t.removeAttribute("data-resize-px");
496
+ const o = n.task.progress != null ? n.fullW * Math.min(100, n.task.progress) / 100 : 0;
497
+ mt(t, {
498
+ x: n.x,
499
+ y: n.y,
500
+ fullW: n.fullW,
501
+ progressW: o
502
+ });
503
+ }
504
+ const wt = { month: "short", day: "numeric", year: "numeric" };
505
+ function Te(e, n) {
506
+ return `${e.toLocaleDateString(u.locale, wt)} — ${n.toLocaleDateString(u.locale, wt)}`;
507
+ }
508
+ function bt(e, n, t, o, a) {
509
+ if (!_.value) return;
510
+ const l = Te(e, n), f = t + a / 2, g = o - 22, k = Math.max(148, l.length * 6.2);
511
+ _.value.style.display = "";
512
+ const b = _.value.querySelector("rect"), A = _.value.querySelector("text");
513
+ b && (b.setAttribute("x", String(f - k / 2)), b.setAttribute("y", String(g - 8)), b.setAttribute("width", String(k))), A && (A.setAttribute("x", String(f)), A.setAttribute("y", String(g + 2)), A.textContent = l);
514
+ }
515
+ let ge = "";
516
+ function Dt(e) {
517
+ e !== ge && (ge = e, W(e));
518
+ }
519
+ function vn() {
520
+ const e = w.value[i.barIndex], n = Z.value[i.barIndex];
521
+ if (!e || !n || !i.origStart || !i.origEnd) return;
522
+ const t = yt();
523
+ if (!t) return;
524
+ if (i.mode === "move") {
525
+ const l = t.clampedPxDelta;
526
+ if (n.style.transform = `translateX(${l}px)`, i.affectedIds.size > 0) {
527
+ for (let g = 0; g < w.value.length; g++)
528
+ if (i.affectedIds.has(w.value[g].task.id)) {
529
+ const k = Z.value[g];
530
+ k && (k.style.transform = `translateX(${l}px)`);
352
531
  }
353
532
  }
533
+ const f = /* @__PURE__ */ new Map([[e.task.id, { dx: l }]]);
534
+ for (const g of i.affectedIds) f.set(g, { dx: l });
535
+ ct(f), bt(
536
+ t.start,
537
+ t.end,
538
+ e.x + l,
539
+ e.y,
540
+ e.fullW
541
+ ), Dt(`${e.task.name}: ${Te(t.start, t.end)}`);
542
+ return;
543
+ }
544
+ n.style.transform = "";
545
+ const o = to({
546
+ start: t.start,
547
+ end: t.end,
548
+ dateToX: $e
549
+ }), a = e.fullW > 0 ? e.progressW / e.fullW : 0;
550
+ mt(n, {
551
+ x: o.x,
552
+ y: e.y,
553
+ fullW: o.fullW,
554
+ progressW: o.fullW * a
555
+ }), ct(/* @__PURE__ */ new Map([[e.task.id, { geo: { x: o.x, fullW: o.fullW } }]])), bt(t.start, t.end, o.x, e.y, o.fullW), Dt(`${e.task.name}: ${Te(t.start, t.end)}`);
556
+ }
557
+ function It() {
558
+ document.removeEventListener("mousemove", pt), document.removeEventListener("mouseup", $t), document.removeEventListener("pointercancel", kt), document.removeEventListener("keydown", ht), document.body.style.cursor = "", document.body.style.userSelect = "", cancelAnimationFrame(i.rafId);
559
+ }
560
+ function We(e) {
561
+ if (!i.active) return;
562
+ It();
563
+ const n = i.barIndex;
564
+ if (i.mode === "move")
565
+ for (const t of Z.value)
566
+ t && (t.style.transform = "", t.removeAttribute("data-resize-px"));
567
+ else n >= 0 && xt(n);
568
+ ze(), _.value && (_.value.style.display = "none"), i.active = !1, i.barIndex = -1, i.taskId = "", i.pxDelta = 0, i.origStart = null, i.origEnd = null, i.affectedIds.clear(), B.value = !1, N.value = "", H.value = null, ge = "", e && W(e);
569
+ }
570
+ function $t() {
571
+ if (!i.active) return;
572
+ const e = yt(), n = i.mode, t = i.taskId, o = i.barIndex;
573
+ if (It(), !!e && Math.abs(e.snappedDays) > 0.1 && e) {
574
+ const l = x.value.find((f) => f.id === t);
575
+ if (l && (J("task-update", l, { start: e.start, end: e.end }), W(`Updated ${l.name} to ${Te(e.start, e.end)}`)), n === "move") {
576
+ for (const f of Z.value)
577
+ f && (f.style.transform = "", f.removeAttribute("data-resize-px"));
578
+ ze();
579
+ }
580
+ } else {
581
+ if (n === "move")
582
+ for (const l of Z.value)
583
+ l && (l.style.transform = "", l.removeAttribute("data-resize-px"));
584
+ else o >= 0 && xt(o);
585
+ ze();
586
+ }
587
+ _.value && (_.value.style.display = "none"), i.active = !1, i.barIndex = -1, i.taskId = "", i.pxDelta = 0, i.origStart = null, i.origEnd = null, i.affectedIds.clear(), B.value = !1, N.value = "", H.value = null, ge = "";
588
+ }
589
+ function qe(e, n) {
590
+ if (r.active || h.value) {
591
+ ve.value = "crosshair";
592
+ return;
593
+ }
594
+ if (i.active || !u.draggable || n.task.milestone) {
595
+ ve.value = i.active ? "grabbing" : "pointer";
596
+ return;
597
+ }
598
+ ve.value = gt(e, n) === "move" ? "grab" : "ew-resize";
599
+ }
600
+ function Ae(e) {
601
+ const { _start: n, _end: t, _color: o, _index: a, ...l } = e;
602
+ return l;
603
+ }
604
+ function Fe(e, n) {
605
+ const t = Ce.value;
606
+ if (!t) return { x: 0, y: 0 };
607
+ const o = t.getBoundingClientRect();
608
+ return { x: e - o.left, y: n - o.top };
609
+ }
610
+ function F(e) {
611
+ return Fn(
612
+ { id: e.task.id, x: e.x, y: e.y, fullW: e.fullW, milestone: e.task.milestone },
613
+ u.barHeight
614
+ );
615
+ }
616
+ function fn(e) {
617
+ return !u.editableDependencies || i.active || B.value ? !1 : h.value && oe.value === w.value[e]?.task.id ? !0 : q.value === e || Le.value === e;
618
+ }
619
+ function gn() {
620
+ return w.value.map((e) => ({
621
+ id: e.task.id,
622
+ x: e.x,
623
+ y: e.y,
624
+ fullW: e.fullW,
625
+ milestone: e.task.milestone
626
+ }));
627
+ }
628
+ function W(e) {
629
+ Ge.value = "", requestAnimationFrame(() => {
630
+ Ge.value = e;
631
+ });
632
+ }
633
+ function ye() {
634
+ const e = w.value.find((t) => t.task.id === r.sourceId);
635
+ if (!e) {
636
+ T.value = null;
637
+ return;
638
+ }
639
+ const n = F(e);
640
+ T.value = {
641
+ x1: n.cx,
642
+ y1: n.cy,
643
+ x2: r.pointerX,
644
+ y2: r.pointerY
645
+ };
646
+ }
647
+ function Ee(e) {
648
+ if (r.targetId = e, fe.value = e, !e || e === r.sourceId) {
649
+ r.targetValid = !1, S.value = e ? "invalid" : "none";
650
+ return;
651
+ }
652
+ const n = Je(x.value, r.sourceId, e);
653
+ r.targetValid = n.valid, S.value = n.valid ? "valid" : "invalid";
654
+ }
655
+ function Ye(e, n) {
656
+ const t = Fe(e, n);
657
+ r.pointerX = t.x, r.pointerY = t.y;
658
+ const o = Yn(gn(), t.x, t.y, u.barHeight), a = o && o.id !== r.sourceId ? o.id : o?.id === r.sourceId ? r.sourceId : null;
659
+ Ee(a), ye();
660
+ const l = R.value;
661
+ if (l) {
662
+ const f = l.getBoundingClientRect(), { dx: g, dy: k } = Ft(e, n, {
663
+ left: f.left,
664
+ top: f.top,
665
+ right: f.right,
666
+ bottom: f.bottom
667
+ });
668
+ (g || k) && (cancelAnimationFrame(r.scrollRafId), r.scrollRafId = requestAnimationFrame(() => {
669
+ l.scrollLeft += g, l.scrollTop += k, U.value && (U.value.scrollTop = l.scrollTop);
670
+ const b = Fe(e, n);
671
+ r.pointerX = b.x, r.pointerY = b.y, ye();
672
+ }));
673
+ }
674
+ }
675
+ function Mt() {
676
+ document.removeEventListener("pointermove", Ct), document.removeEventListener("pointerup", Tt), document.removeEventListener("pointercancel", Wt), document.removeEventListener("keydown", At);
677
+ }
678
+ function j(e) {
679
+ !r.active && !h.value || (Mt(), cancelAnimationFrame(r.rafId), cancelAnimationFrame(r.scrollRafId), document.body.style.cursor = "", document.body.style.userSelect = "", r.active = !1, r.sourceId = "", r.sourceIndex = -1, r.targetId = null, r.targetValid = !1, r.keyboard = !1, r.keyboardTargetIndex = -1, h.value = !1, oe.value = "", fe.value = null, S.value = "none", T.value = null, M.value = !1, e && W(e));
680
+ }
681
+ function St() {
682
+ if (!r.active) return;
683
+ const e = r.sourceId, n = r.targetId;
684
+ if (!(r.targetValid && !!n) || !n) {
685
+ j(
686
+ n ? Qe(
687
+ Je(x.value, e, n),
688
+ x.value.find((f) => f.id === e)?.name ?? e,
689
+ x.value.find((f) => f.id === n)?.name ?? n
690
+ ) : "Dependency linking cancelled"
691
+ );
692
+ return;
354
693
  }
355
- for (const e of K.value)
356
- e && (e.style.transform = "", e.removeAttribute("data-resize-px"));
357
- H.value && (H.value.style.display = "none"), l.active = !1, l.barIndex = -1, l.taskId = "", l.pxDelta = 0, l.origStart = null, l.origEnd = null, l.affectedIds.clear(), I.value = !1, q.value = "", B.value = null;
694
+ const o = x.value.find((f) => f.id === e), a = x.value.find((f) => f.id === n);
695
+ if (!o || !a) {
696
+ j("Dependency linking cancelled");
697
+ return;
698
+ }
699
+ const l = {
700
+ predecessorId: e,
701
+ successorId: n,
702
+ predecessor: Ae(o),
703
+ successor: Ae(a),
704
+ type: "waiting-on",
705
+ typeLabel: qt("waiting-on")
706
+ };
707
+ W(
708
+ Qe(
709
+ { valid: !0 },
710
+ o.name,
711
+ a.name
712
+ )
713
+ ), Mt(), cancelAnimationFrame(r.rafId), cancelAnimationFrame(r.scrollRafId), document.body.style.cursor = "", document.body.style.userSelect = "", r.active = !1, r.sourceId = "", r.sourceIndex = -1, r.targetId = null, r.targetValid = !1, r.keyboard = !1, r.keyboardTargetIndex = -1, h.value = !1, oe.value = "", fe.value = null, S.value = "none", T.value = null, M.value = !1, J("dependency-create", l);
714
+ }
715
+ function Lt(e, n, t, o = !1) {
716
+ if (!u.editableDependencies || i.active || B.value) return;
717
+ const a = w.value[e];
718
+ if (!a) return;
719
+ ce(), r.active = !0, r.sourceId = a.task.id, r.sourceIndex = e, r.keyboard = o, r.keyboardTargetIndex = -1, h.value = !0, oe.value = a.task.id, y.value = null, M.value = !0, G.value = null, H.value = e;
720
+ const l = F(a);
721
+ o ? (r.pointerX = l.cx + 40, r.pointerY = l.cy, Ee(null)) : Ye(n, t), ye(), W(`Linking from ${a.task.name}. Drop on a target task, or press Escape to cancel.`), document.addEventListener("pointermove", Ct), document.addEventListener("pointerup", Tt), document.addEventListener("pointercancel", Wt), document.addEventListener("keydown", At), document.body.style.cursor = "crosshair", document.body.style.userSelect = "none";
358
722
  }
359
- function $e(t, o) {
360
- if (l.active || !s.draggable || o.task.milestone) {
361
- U.value = l.active ? "grabbing" : "pointer";
723
+ function Ct(e) {
724
+ !r.active || r.keyboard || (cancelAnimationFrame(r.rafId), r.rafId = requestAnimationFrame(() => Ye(e.clientX, e.clientY)));
725
+ }
726
+ function Tt(e) {
727
+ !r.active || r.keyboard || (Ye(e.clientX, e.clientY), St());
728
+ }
729
+ function Wt() {
730
+ j("Dependency linking cancelled");
731
+ }
732
+ function Oe(e) {
733
+ const n = w.value;
734
+ if (!n.length) return;
735
+ const t = n.map((k, b) => ({ b: k, i: b })).filter(({ b: k }) => k.task.id !== r.sourceId);
736
+ if (!t.length) {
737
+ Ee(null), ye();
362
738
  return;
363
739
  }
364
- U.value = be(t, o) === "move" ? "grab" : "ew-resize";
365
- }
366
- const Q = x(s.animate ? 0 : 1);
367
- let ue = null;
368
- function de() {
369
- ue?.(), Q.value = 0, ue = dt(900, (t) => Q.value = t);
370
- }
371
- tt(() => {
372
- Re(), s.animate && de();
373
- }), ze(() => s.viewMode, () => {
374
- m.value = 1, s.animate && de();
375
- }), ze(() => s.tasks.length, () => {
376
- s.animate && de();
377
- }), ot(() => {
378
- ue?.(), ee?.disconnect(), document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", ie), cancelAnimationFrame(l.rafId);
740
+ let o = t.findIndex(({ b: k }) => k.task.id === r.targetId);
741
+ o < 0 && (o = e === 1 ? -1 : 0), o = (o + e + t.length) % t.length;
742
+ const a = t[o];
743
+ r.keyboardTargetIndex = a.i;
744
+ const l = F(a.b);
745
+ r.pointerX = a.b.task.milestone ? a.b.x + a.b.fullW / 2 : a.b.x, r.pointerY = l.cy, Ee(a.b.task.id), ye();
746
+ const f = Je(x.value, r.sourceId, a.b.task.id), g = x.value.find((k) => k.id === r.sourceId)?.name ?? r.sourceId;
747
+ W(
748
+ f.valid ? `Target ${a.b.task.name}. Press Enter to create dependency.` : Qe(f, g, a.b.task.name)
749
+ );
750
+ }
751
+ function At(e) {
752
+ if (r.active) {
753
+ if (e.key === "Escape") {
754
+ e.preventDefault(), j("Dependency linking cancelled");
755
+ return;
756
+ }
757
+ r.keyboard && (e.key === "ArrowDown" || e.key === "ArrowRight" ? (e.preventDefault(), Oe(1)) : e.key === "ArrowUp" || e.key === "ArrowLeft" ? (e.preventDefault(), Oe(-1)) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), St()));
758
+ }
759
+ }
760
+ function yn(e, n) {
761
+ !u.editableDependencies || i.active || (e.preventDefault(), e.stopPropagation(), y.value = null, M.value = !0, Lt(n, e.clientX, e.clientY, !1));
762
+ }
763
+ function pn(e, n) {
764
+ if (!(!u.editableDependencies || i.active || h.value) && (e.key === "Enter" || e.key === " ")) {
765
+ e.preventDefault(), e.stopPropagation();
766
+ const t = w.value[n];
767
+ if (!t) return;
768
+ y.value = null;
769
+ const o = F(t), l = Ce.value?.getBoundingClientRect(), f = (l?.left ?? 0) + o.cx, g = (l?.top ?? 0) + o.cy;
770
+ Lt(n, f, g, !0), Oe(1);
771
+ }
772
+ }
773
+ function hn(e) {
774
+ Le.value = e, q.value = e, y.value = null;
775
+ }
776
+ function kn() {
777
+ Le.value = null, M.value = !1, h.value || (q.value = null);
778
+ }
779
+ function mn(e) {
780
+ return !h.value || oe.value === e ? "" : fe.value !== e ? "vlite-gantt-link-candidate" : S.value === "valid" ? "vlite-gantt-link-target-valid" : "vlite-gantt-link-target-invalid";
781
+ }
782
+ const Re = m(u.animate ? 0 : 1);
783
+ let Ve = null;
784
+ function Ke() {
785
+ Ve?.(), Re.value = 0, Ve = Gn(900, (e) => Re.value = e);
786
+ }
787
+ An(() => {
788
+ Zt(), u.animate && Ke();
789
+ }), me(() => u.viewMode, () => {
790
+ $.value = 1, u.animate && Ke();
791
+ }), me(() => u.tasks.length, () => {
792
+ u.animate && Ke();
793
+ }), me(() => u.tasks, () => {
794
+ i.active && (u.tasks.some((n) => n.id === i.taskId) || We(i.mode === "move" ? "Move cancelled because task was removed" : "Resize cancelled because task was removed")), (r.active || h.value) && j("Dependency linking cancelled because tasks changed"), L.value && !V.value.some((e) => e.key === L.value) && (L.value = null), G.value && !V.value.some((e) => e.key === G.value) && (G.value = null);
795
+ }), me(() => u.editableDependencies, (e) => {
796
+ e || ((r.active || h.value) && j("Dependency linking cancelled"), ce());
797
+ }), En(() => {
798
+ Ve?.(), Pe?.disconnect(), We(), document.removeEventListener("keydown", Xe), j();
379
799
  });
380
- function ce(t, o, e, n, a) {
381
- const i = Math.min(a, e / 2, n / 2);
382
- return i <= 0 || e <= 0 ? `M${t},${o}h${e}v${n}h${-e}Z` : `M${t + i},${o}h${e - 2 * i}q${i},0 ${i},${i}v${n - 2 * i}q0,${i} ${-i},${i}h${-(e - 2 * i)}q${-i},0 ${-i},${-i}v${-(n - 2 * i)}q0,${-i} ${i},${-i}Z`;
383
- }
384
- function Qe(t, o, e) {
385
- return `M${t},${o - e}L${t + e},${o}L${t},${o + e}L${t - e},${o}Z`;
386
- }
387
- const g = x(null), B = x(null);
388
- function Me(t, o) {
389
- if (!s.showTooltip || l.active) return;
390
- se.value = o, B.value = o;
391
- const e = w.value[o];
392
- if (!e) return;
393
- A("task-hover", e.task);
394
- const n = e.task;
395
- g.value = {
396
- x: t.clientX,
397
- y: t.clientY,
398
- task: n,
399
- startStr: n._start.toLocaleDateString(s.locale, { month: "short", day: "numeric", year: "numeric" }),
400
- endStr: n._end.toLocaleDateString(s.locale, { month: "short", day: "numeric", year: "numeric" })
401
- }, $e(t, e);
402
- }
403
- function De(t, o) {
404
- if (l.active) return;
405
- g.value && (g.value = { ...g.value, x: t.clientX, y: t.clientY });
406
- const e = w.value[o];
407
- e && $e(t, e);
408
- }
409
- function Se() {
410
- l.active || (g.value = null, B.value = null, se.value = null, U.value = "default", A("task-hover", null));
411
- }
412
- function ve(t) {
413
- l.active || A("task-click", t);
414
- }
415
- const fe = x();
416
- function Je(t) {
417
- fe.value && (fe.value.scrollTop = t.target.scrollTop);
418
- }
419
- const R = Math.random().toString(36).slice(2, 7);
420
- function Ye(t, o) {
421
- const e = Math.ceil(X(t, o));
422
- if (e <= 1) return "1 day";
423
- if (e < 7) return `${e} days`;
424
- const n = Math.floor(e / 7), a = e % 7;
425
- return a === 0 ? `${n} week${n > 1 ? "s" : ""}` : `${n}w ${a}d`;
426
- }
427
- return (t, o) => (u(), d("div", {
800
+ function Et(e, n, t) {
801
+ const o = n - (t ? 24 : 12) - xa;
802
+ if (o < Ot * 3) return "";
803
+ const a = Math.floor(o / Ot);
804
+ return e.length <= a ? e : `${e.slice(0, Math.max(1, a - 1)).trimEnd()}…`;
805
+ }
806
+ function P(e, n, t, o, a) {
807
+ const l = Math.min(a, t / 2, o / 2);
808
+ return l <= 0 || t <= 0 ? `M${e},${n}h${t}v${o}h${-t}Z` : `M${e + l},${n}h${t - 2 * l}q${l},0 ${l},${l}v${o - 2 * l}q0,${l} ${-l},${l}h${-(t - 2 * l)}q${-l},0 ${-l},${-l}v${-(o - 2 * l)}q0,${-l} ${l},${-l}Z`;
809
+ }
810
+ function xn(e, n, t) {
811
+ return `M${e},${n - t}L${e + t},${n}L${e},${n + t}L${e - t},${n}Z`;
812
+ }
813
+ const y = m(null), H = m(null);
814
+ function wn(e) {
815
+ const n = e;
816
+ return !n || typeof n.closest != "function" ? !1 : !!n.closest(".vlite-gantt-bar-group");
817
+ }
818
+ function bn(e) {
819
+ if (!u.editableDependencies) return null;
820
+ const n = Ce.value;
821
+ if (!n) return null;
822
+ const t = n.getBoundingClientRect(), o = F(e), a = 14;
823
+ return {
824
+ left: t.left + o.cx - a,
825
+ top: t.top + o.cy - a,
826
+ right: t.left + o.cx + a,
827
+ bottom: t.top + o.cy + a
828
+ };
829
+ }
830
+ function Dn(e, n, t) {
831
+ if (!u.editableDependencies) return !1;
832
+ if (M.value) return !0;
833
+ const o = Fe(e, n), a = F(t);
834
+ return ao(o.x, o.y, a.cx, a.cy);
835
+ }
836
+ function Ne(e, n) {
837
+ if (!u.showTooltip || i.active || r.active || h.value) {
838
+ y.value = null;
839
+ return;
840
+ }
841
+ const t = w.value[n];
842
+ if (!t) return;
843
+ if (Dn(e.clientX, e.clientY, t)) {
844
+ y.value = null;
845
+ return;
846
+ }
847
+ const o = t.task, a = oo({
848
+ pointerX: e.clientX,
849
+ pointerY: e.clientY,
850
+ viewportWidth: window.innerWidth,
851
+ viewportHeight: window.innerHeight,
852
+ avoid: bn(t)
853
+ });
854
+ y.value = {
855
+ left: a.left,
856
+ top: a.top,
857
+ task: o,
858
+ startStr: o._start.toLocaleDateString(u.locale, { month: "short", day: "numeric", year: "numeric" }),
859
+ endStr: o._end.toLocaleDateString(u.locale, { month: "short", day: "numeric", year: "numeric" })
860
+ };
861
+ }
862
+ function In(e = !0) {
863
+ y.value = null, H.value = null, M.value = !1, Le.value == null && (q.value = null), ve.value = "default", e && J("task-hover", null);
864
+ }
865
+ function $n(e, n) {
866
+ if (i.active || r.active || h.value) return;
867
+ q.value = n, H.value = n;
868
+ const t = w.value[n];
869
+ if (!t) return;
870
+ J("task-hover", t.task), qe(e, t);
871
+ const o = !!e.target?.closest?.(".vlite-gantt-dep-connector");
872
+ M.value = o, o ? y.value = null : Ne(e, n);
873
+ }
874
+ function Mn() {
875
+ i.active || r.active || h.value || In(!0);
876
+ }
877
+ function Rt(e, n) {
878
+ if (i.active || r.active || h.value) return;
879
+ M.value = !1, q.value = n, H.value = n;
880
+ const t = w.value[n];
881
+ t && (qe(e, t), Ne(e, n));
882
+ }
883
+ function Bt(e, n) {
884
+ if (i.active || r.active || h.value) return;
885
+ M.value = !1;
886
+ const t = w.value[n];
887
+ t && qe(e, t), Ne(e, n);
888
+ }
889
+ function Sn(e) {
890
+ i.active || r.active || h.value || (M.value = !0, q.value = e, H.value = e, y.value = null);
891
+ }
892
+ function Ln(e) {
893
+ if (!(i.active || r.active || h.value)) {
894
+ if (wn(e.relatedTarget) && !e.relatedTarget?.closest?.(".vlite-gantt-dep-connector")) {
895
+ M.value = !1;
896
+ return;
897
+ }
898
+ M.value = !1, y.value = null;
899
+ }
900
+ }
901
+ function Ze(e) {
902
+ !i.active && !r.active && J("task-click", e);
903
+ }
904
+ const U = m();
905
+ function Cn(e) {
906
+ U.value && (U.value.scrollTop = e.target.scrollTop);
907
+ }
908
+ const Y = Math.random().toString(36).slice(2, 7);
909
+ function Tn(e, n) {
910
+ const t = Math.ceil(nt(e, n));
911
+ if (t <= 1) return "1 day";
912
+ if (t < 7) return `${t} days`;
913
+ const o = Math.floor(t / 7), a = t % 7;
914
+ return a === 0 ? `${o} week${o > 1 ? "s" : ""}` : `${o}w ${a}d`;
915
+ }
916
+ return (e, n) => (d(), v("div", {
428
917
  ref_key: "containerRef",
429
- ref: j,
918
+ ref: be,
430
919
  class: "vlite-gantt-chart w-full select-none"
431
920
  }, [
432
- c.showTodayLine && V.value || c.zoom ? (u(), d("div", ct, [
433
- c.zoom ? (u(), d("div", vt, [
434
- r("button", {
921
+ c.showTodayLine && Se.value || c.zoom || ot.value ? (d(), v("div", lo, [
922
+ ot.value ? (d(), v("span", ro, [...n[1] || (n[1] = [
923
+ s("svg", {
924
+ width: "12",
925
+ height: "12",
926
+ viewBox: "0 0 24 24",
927
+ fill: "none",
928
+ stroke: "currentColor",
929
+ "stroke-width": "2",
930
+ "stroke-linecap": "round",
931
+ "stroke-linejoin": "round"
932
+ }, [
933
+ s("rect", {
934
+ x: "5",
935
+ y: "11",
936
+ width: "14",
937
+ height: "9",
938
+ rx: "2"
939
+ }),
940
+ s("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })
941
+ ], -1),
942
+ s("span", null, "Blocked", -1)
943
+ ])])) : p("", !0),
944
+ c.zoom ? (d(), v("div", so, [
945
+ s("button", {
435
946
  class: "vlite-gantt-btn",
436
- onClick: Ze,
437
- disabled: m.value <= 0.4
438
- }, [...o[0] || (o[0] = [
439
- r("svg", {
947
+ onClick: Qt,
948
+ disabled: $.value <= 0.4
949
+ }, [...n[2] || (n[2] = [
950
+ s("svg", {
440
951
  width: "12",
441
952
  height: "12",
442
953
  viewBox: "0 0 24 24",
@@ -446,40 +957,40 @@ const ct = {
446
957
  "stroke-linecap": "round",
447
958
  "stroke-linejoin": "round"
448
959
  }, [
449
- r("circle", {
960
+ s("circle", {
450
961
  cx: "11",
451
962
  cy: "11",
452
963
  r: "8"
453
964
  }),
454
- r("line", {
965
+ s("line", {
455
966
  x1: "21",
456
967
  y1: "21",
457
968
  x2: "16.65",
458
969
  y2: "16.65"
459
970
  }),
460
- r("line", {
971
+ s("line", {
461
972
  x1: "8",
462
973
  y1: "11",
463
974
  x2: "14",
464
975
  y2: "11"
465
976
  })
466
977
  ], -1),
467
- r("span", null, "Zoom Out", -1)
468
- ])], 8, ft),
469
- r("button", {
978
+ s("span", null, "Zoom Out", -1)
979
+ ])], 8, io),
980
+ s("button", {
470
981
  class: "vlite-gantt-btn",
471
- onClick: Fe,
472
- disabled: m.value >= 3
473
- }, [...o[1] || (o[1] = [
474
- nt('<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-v-ebb84e3d><circle cx="11" cy="11" r="8" data-v-ebb84e3d></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-ebb84e3d></line><line x1="11" y1="8" x2="11" y2="14" data-v-ebb84e3d></line><line x1="8" y1="11" x2="14" y2="11" data-v-ebb84e3d></line></svg><span data-v-ebb84e3d>Zoom In</span>', 2)
475
- ])], 8, gt)
476
- ])) : h("", !0),
477
- c.showTodayLine && V.value ? (u(), d("button", {
478
- key: 1,
982
+ onClick: Jt,
983
+ disabled: $.value >= 3
984
+ }, [...n[3] || (n[3] = [
985
+ Rn('<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-v-94a48eeb><circle cx="11" cy="11" r="8" data-v-94a48eeb></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-94a48eeb></line><line x1="11" y1="8" x2="11" y2="14" data-v-94a48eeb></line><line x1="8" y1="11" x2="14" y2="11" data-v-94a48eeb></line></svg><span data-v-94a48eeb>Zoom In</span>', 2)
986
+ ])], 8, uo)
987
+ ])) : p("", !0),
988
+ c.showTodayLine && Se.value ? (d(), v("button", {
989
+ key: 2,
479
990
  class: "vlite-gantt-btn",
480
- onClick: je
481
- }, [...o[2] || (o[2] = [
482
- r("svg", {
991
+ onClick: sn
992
+ }, [...n[4] || (n[4] = [
993
+ s("svg", {
483
994
  width: "12",
484
995
  height: "12",
485
996
  viewBox: "0 0 24 24",
@@ -489,57 +1000,57 @@ const ct = {
489
1000
  "stroke-linecap": "round",
490
1001
  "stroke-linejoin": "round"
491
1002
  }, [
492
- r("circle", {
1003
+ s("circle", {
493
1004
  cx: "12",
494
1005
  cy: "12",
495
1006
  r: "10"
496
1007
  }),
497
- r("line", {
1008
+ s("line", {
498
1009
  x1: "12",
499
1010
  y1: "8",
500
1011
  x2: "12",
501
1012
  y2: "12"
502
1013
  }),
503
- r("line", {
1014
+ s("line", {
504
1015
  x1: "12",
505
1016
  y1: "16",
506
1017
  x2: "12.01",
507
1018
  y2: "16"
508
1019
  })
509
1020
  ], -1),
510
- r("span", null, "Today", -1)
511
- ])])) : h("", !0)
512
- ])) : h("", !0),
513
- r("div", ht, [
514
- r("div", {
1021
+ s("span", null, "Today", -1)
1022
+ ])])) : p("", !0)
1023
+ ])) : p("", !0),
1024
+ s("div", co, [
1025
+ s("div", {
515
1026
  class: "vlite-gantt-sidebar",
516
- style: D({ width: `${c.sidebarWidth}px`, minWidth: `${c.sidebarWidth}px` })
1027
+ style: E({ width: `${c.sidebarWidth}px`, minWidth: `${c.sidebarWidth}px` })
517
1028
  }, [
518
- c.showHeader ? (u(), d("div", {
1029
+ c.showHeader ? (d(), v("div", {
519
1030
  key: 0,
520
1031
  class: "vlite-gantt-sidebar-header",
521
- style: D({ height: `${E.value}px` })
522
- }, [...o[3] || (o[3] = [
523
- r("span", { class: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, "Tasks", -1)
524
- ])], 4)) : h("", !0),
525
- r("div", {
1032
+ style: E({ height: `${te.value}px` })
1033
+ }, [...n[5] || (n[5] = [
1034
+ s("span", { class: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, "Tasks", -1)
1035
+ ])], 4)) : p("", !0),
1036
+ s("div", {
526
1037
  ref_key: "sidebarRef",
527
- ref: fe,
1038
+ ref: U,
528
1039
  class: "vlite-gantt-sidebar-body",
529
- style: D({ height: `${O.value}px` })
1040
+ style: E({ height: `${ne.value}px` })
530
1041
  }, [
531
- (u(!0), d($, null, C(F.value, (e, n) => (u(), d("div", {
532
- key: `s-${n}`,
1042
+ (d(!0), v(C, null, z(se.value, (t, o) => (d(), v("div", {
1043
+ key: `s-${o}`,
533
1044
  class: "vlite-gantt-sidebar-row",
534
- style: D({ height: `${c.rowHeight}px` })
1045
+ style: E({ height: `${c.rowHeight}px` })
535
1046
  }, [
536
- e.type === "group-header" ? (u(), d("button", {
1047
+ t.type === "group-header" ? (d(), v("button", {
537
1048
  key: 0,
538
1049
  class: "vlite-gantt-group-toggle",
539
- onClick: (a) => Ae(e.group)
1050
+ onClick: (a) => jt(t.group)
540
1051
  }, [
541
- (u(), d("svg", {
542
- class: me(["vlite-gantt-chevron", { "vlite-gantt-chevron-collapsed": N.value.has(e.group) }]),
1052
+ (d(), v("svg", {
1053
+ class: xe(["vlite-gantt-chevron", { "vlite-gantt-chevron-collapsed": De.value.has(t.group) }]),
543
1054
  width: "14",
544
1055
  height: "14",
545
1056
  viewBox: "0 0 24 24",
@@ -548,287 +1059,495 @@ const ct = {
548
1059
  "stroke-width": "2.5",
549
1060
  "stroke-linecap": "round",
550
1061
  "stroke-linejoin": "round"
551
- }, [...o[4] || (o[4] = [
552
- r("polyline", { points: "6 9 12 15 18 9" }, null, -1)
1062
+ }, [...n[6] || (n[6] = [
1063
+ s("polyline", { points: "6 9 12 15 18 9" }, null, -1)
553
1064
  ])], 2)),
554
- r("span", mt, b(e.group), 1),
555
- r("span", kt, b(te.value.grouped.get(e.group)?.length ?? 0), 1)
556
- ], 8, yt)) : (u(), d("div", {
1065
+ s("span", fo, I(t.group), 1),
1066
+ s("span", go, I(He.value.grouped.get(t.group)?.length ?? 0), 1)
1067
+ ], 8, vo)) : (d(), v("div", {
557
1068
  key: 1,
558
- class: me(["vlite-gantt-task-name", {
559
- "vlite-gantt-task-name-grouped": !!e.group,
560
- "vlite-gantt-task-name-dragging": I.value && q.value === e.task?.id
1069
+ class: xe(["vlite-gantt-task-name", {
1070
+ "vlite-gantt-task-name-grouped": !!t.group,
1071
+ "vlite-gantt-task-name-dragging": B.value && N.value === t.task?.id
561
1072
  }]),
562
- onClick: (a) => e.task && ve(e.task)
1073
+ onClick: (a) => t.task && Ze(t.task)
563
1074
  }, [
564
- r("span", {
1075
+ s("span", {
565
1076
  class: "vlite-gantt-task-dot",
566
- style: D({ backgroundColor: e.task?._color })
1077
+ style: E({ backgroundColor: t.task?._color })
567
1078
  }, null, 4),
568
- r("span", pt, b(e.task?.name), 1),
569
- c.showProgress && e.task?.progress != null ? (u(), d("span", wt, b(e.task.progress) + "%", 1)) : h("", !0)
570
- ], 10, xt))
1079
+ s("span", po, I(t.task?.name), 1),
1080
+ c.showProgress && t.task?.progress != null ? (d(), v("span", ho, I(t.task.progress) + "%", 1)) : p("", !0)
1081
+ ], 10, yo))
571
1082
  ], 4))), 128))
572
1083
  ], 4)
573
1084
  ], 4),
574
- r("div", {
1085
+ s("div", {
575
1086
  ref_key: "timelineRef",
576
- ref: L,
1087
+ ref: R,
577
1088
  class: "vlite-gantt-timeline",
578
- onScroll: Je,
579
- onWheel: Pe
1089
+ onScroll: Cn,
1090
+ onWheel: Ut
580
1091
  }, [
581
- c.showHeader ? (u(), d("div", {
1092
+ c.showHeader ? (d(), v("div", {
582
1093
  key: 0,
583
1094
  class: "vlite-gantt-timeline-header",
584
- style: D({ height: `${E.value}px`, width: `${Z.value}px` })
1095
+ style: E({ height: `${te.value}px`, width: `${ee.value}px` })
585
1096
  }, [
586
- (u(), d("svg", {
587
- width: Z.value,
588
- height: E.value,
1097
+ (d(), v("svg", {
1098
+ width: ee.value,
1099
+ height: te.value,
589
1100
  class: "overflow-visible"
590
1101
  }, [
591
- (u(!0), d($, null, C(pe.value, (e, n) => (u(), d("g", { key: n }, [
592
- r("line", {
593
- x1: e.x,
1102
+ (d(!0), v(C, null, z(at.value, (t, o) => (d(), v("g", { key: o }, [
1103
+ s("line", {
1104
+ x1: t.x,
594
1105
  y1: 0,
595
- x2: e.x,
596
- y2: E.value,
1106
+ x2: t.x,
1107
+ y2: te.value,
597
1108
  stroke: "currentColor",
598
1109
  "stroke-opacity": "0.06"
599
- }, null, 8, $t),
600
- r("text", {
601
- x: e.x + e.width / 2,
602
- y: E.value / 2 - 5,
1110
+ }, null, 8, mo),
1111
+ s("text", {
1112
+ x: t.x + t.width / 2,
1113
+ y: te.value / 2 - 5,
603
1114
  "text-anchor": "middle",
604
1115
  "dominant-baseline": "middle",
605
1116
  "font-size": "11",
606
1117
  "font-weight": "600",
607
1118
  class: "fill-foreground"
608
- }, b(e.label), 9, Mt),
609
- e.sublabel ? (u(), d("text", {
1119
+ }, I(t.label), 9, xo),
1120
+ t.sublabel ? (d(), v("text", {
610
1121
  key: 0,
611
- x: e.x + e.width / 2,
612
- y: E.value / 2 + 11,
1122
+ x: t.x + t.width / 2,
1123
+ y: te.value / 2 + 11,
613
1124
  "text-anchor": "middle",
614
1125
  "dominant-baseline": "middle",
615
1126
  "font-size": "10",
616
1127
  class: "fill-muted-foreground"
617
- }, b(e.sublabel), 9, Dt)) : h("", !0)
1128
+ }, I(t.sublabel), 9, wo)) : p("", !0)
618
1129
  ]))), 128))
619
- ], 8, bt))
620
- ], 4)) : h("", !0),
621
- r("div", {
1130
+ ], 8, ko))
1131
+ ], 4)) : p("", !0),
1132
+ s("div", {
622
1133
  class: "vlite-gantt-timeline-body",
623
- style: D({ height: `${O.value}px` })
1134
+ style: E({ height: `${ne.value}px` })
624
1135
  }, [
625
- (u(), d("svg", {
626
- width: Z.value,
627
- height: O.value,
1136
+ (d(), v("svg", {
1137
+ ref_key: "timelineSvgRef",
1138
+ ref: Ce,
1139
+ width: ee.value,
1140
+ height: ne.value,
628
1141
  role: "img",
629
1142
  "aria-label": "Gantt chart",
630
- class: "overflow-visible"
1143
+ class: xe(["overflow-visible", { "vlite-gantt-linking": h.value }]),
1144
+ onPointerdown: rn
631
1145
  }, [
632
- r("defs", null, [
633
- (u(!0), d($, null, C(w.value, (e, n) => (u(), d("linearGradient", {
634
- key: `g${n}`,
635
- id: `gg-${z(R)}-${n}`,
1146
+ s("defs", null, [
1147
+ (d(!0), v(C, null, z(w.value, (t, o) => (d(), v("linearGradient", {
1148
+ key: `g${o}`,
1149
+ id: `gg-${X(Y)}-${o}`,
636
1150
  x1: "0",
637
1151
  y1: "0",
638
1152
  x2: "1",
639
1153
  y2: "0"
640
1154
  }, [
641
- r("stop", {
1155
+ s("stop", {
642
1156
  offset: "0%",
643
- "stop-color": e.task._color,
1157
+ "stop-color": t.task._color,
644
1158
  "stop-opacity": "1"
645
- }, null, 8, Lt),
646
- r("stop", {
1159
+ }, null, 8, Io),
1160
+ s("stop", {
647
1161
  offset: "100%",
648
- "stop-color": e.task._color,
1162
+ "stop-color": t.task._color,
649
1163
  "stop-opacity": "0.75"
650
- }, null, 8, _t)
651
- ], 8, Ct))), 128)),
652
- (u(!0), d($, null, C(w.value, (e, n) => (u(), d("linearGradient", {
653
- key: `p${n}`,
654
- id: `gp-${z(R)}-${n}`,
1164
+ }, null, 8, $o)
1165
+ ], 8, Do))), 128)),
1166
+ (d(!0), v(C, null, z(w.value, (t, o) => (d(), v("linearGradient", {
1167
+ key: `p${o}`,
1168
+ id: `gp-${X(Y)}-${o}`,
655
1169
  x1: "0",
656
1170
  y1: "0",
657
1171
  x2: "1",
658
1172
  y2: "0"
659
1173
  }, [
660
- r("stop", {
1174
+ s("stop", {
661
1175
  offset: "0%",
662
- "stop-color": e.task._color,
1176
+ "stop-color": t.task._color,
663
1177
  "stop-opacity": "0.35"
664
- }, null, 8, zt),
665
- r("stop", {
1178
+ }, null, 8, So),
1179
+ s("stop", {
666
1180
  offset: "100%",
667
- "stop-color": e.task._color,
1181
+ "stop-color": t.task._color,
668
1182
  "stop-opacity": "0.15"
669
- }, null, 8, Wt)
670
- ], 8, Ht))), 128))
1183
+ }, null, 8, Lo)
1184
+ ], 8, Mo))), 128)),
1185
+ s("pattern", {
1186
+ id: `gb-${X(Y)}`,
1187
+ width: "6",
1188
+ height: "6",
1189
+ patternUnits: "userSpaceOnUse",
1190
+ patternTransform: "rotate(45)"
1191
+ }, [...n[7] || (n[7] = [
1192
+ s("line", {
1193
+ x1: "0",
1194
+ y1: "0",
1195
+ x2: "0",
1196
+ y2: "6",
1197
+ stroke: "currentColor",
1198
+ "stroke-width": "2",
1199
+ "stroke-opacity": "0.3"
1200
+ }, null, -1)
1201
+ ])], 8, Co)
671
1202
  ]),
672
- c.showGrid ? (u(!0), d($, { key: 0 }, C(pe.value, (e, n) => (u(), d("line", {
673
- key: n,
674
- x1: e.x,
1203
+ c.showGrid ? (d(!0), v(C, { key: 0 }, z(at.value, (t, o) => (d(), v("line", {
1204
+ key: o,
1205
+ x1: t.x,
675
1206
  y1: 0,
676
- x2: e.x,
677
- y2: O.value,
1207
+ x2: t.x,
1208
+ y2: ne.value,
678
1209
  stroke: "currentColor",
679
1210
  "stroke-opacity": "0.06",
680
1211
  "stroke-dasharray": "4 4"
681
- }, null, 8, Tt))), 128)) : h("", !0),
682
- (u(!0), d($, null, C(F.value, (e, n) => (u(), d("line", {
683
- key: n,
1212
+ }, null, 8, To))), 128)) : p("", !0),
1213
+ (d(!0), v(C, null, z(se.value, (t, o) => (d(), v("line", {
1214
+ key: o,
684
1215
  x1: 0,
685
- y1: (n + 1) * c.rowHeight,
686
- x2: Z.value,
687
- y2: (n + 1) * c.rowHeight,
1216
+ y1: (o + 1) * c.rowHeight,
1217
+ x2: ee.value,
1218
+ y2: (o + 1) * c.rowHeight,
688
1219
  stroke: "currentColor",
689
1220
  "stroke-opacity": "0.04"
690
- }, null, 8, Et))), 128)),
691
- (u(!0), d($, null, C(F.value, (e, n) => lt((u(), d("rect", {
692
- key: `bg${n}`,
1221
+ }, null, 8, Wo))), 128)),
1222
+ (d(!0), v(C, null, z(se.value, (t, o) => Bn((d(), v("rect", {
1223
+ key: `bg${o}`,
693
1224
  x: 0,
694
- y: n * c.rowHeight,
695
- width: Z.value,
1225
+ y: o * c.rowHeight,
1226
+ width: ee.value,
696
1227
  height: c.rowHeight,
697
1228
  fill: "currentColor",
698
1229
  "fill-opacity": "0.02"
699
- }, null, 8, It)), [
700
- [at, e.type === "group-header"]
1230
+ }, null, 8, Ao)), [
1231
+ [Pn, t.type === "group-header"]
701
1232
  ])), 128)),
702
- (u(!0), d($, null, C(Ge.value, (e, n) => (u(), d("g", {
703
- key: n,
704
- class: "vlite-gantt-dep-group"
1233
+ (d(!0), v(C, null, z(V.value, (t) => (d(), v("g", {
1234
+ key: t.key,
1235
+ ref_for: !0,
1236
+ ref: (o) => on(o, t.key),
1237
+ class: xe(["vlite-gantt-dep-group", {
1238
+ "vlite-gantt-dep-selectable": c.editableDependencies,
1239
+ "vlite-gantt-dep-active": K(t.key),
1240
+ "vlite-gantt-dep-hovered": G.value === t.key && !K(t.key)
1241
+ }]),
1242
+ role: "img",
1243
+ "aria-label": vt(t)
705
1244
  }, [
706
- r("path", {
707
- d: e.d,
708
- stroke: "var(--color-muted-foreground)",
709
- "stroke-width": "1.5",
710
- "stroke-opacity": "0.35",
1245
+ s("title", null, I(vt(t)), 1),
1246
+ s("path", {
1247
+ d: t.d,
1248
+ "data-dep-part": "hit",
1249
+ stroke: "transparent",
1250
+ "stroke-width": "16",
711
1251
  fill: "none",
712
- "stroke-linejoin": "round"
713
- }, null, 8, Bt),
714
- r("path", {
715
- d: e.ad,
716
- fill: "var(--color-muted-foreground)",
717
- "fill-opacity": "0.5"
718
- }, null, 8, Rt)
719
- ]))), 128)),
720
- (u(!0), d($, null, C(w.value, (e, n) => (u(), d("g", {
721
- key: e.task.id,
1252
+ "stroke-linejoin": "round",
1253
+ "stroke-linecap": "round",
1254
+ class: "vlite-gantt-dep-hit",
1255
+ tabindex: c.editableDependencies ? 0 : void 0,
1256
+ onClick: (o) => ft(o, t),
1257
+ onKeydown: je((o) => ft(o, t), ["enter"]),
1258
+ onMouseenter: (o) => rt(t.key),
1259
+ onMouseleave: st,
1260
+ onFocus: (o) => rt(t.key),
1261
+ onBlur: st
1262
+ }, null, 40, Ro),
1263
+ s("path", {
1264
+ d: t.d,
1265
+ "data-dep-part": "line",
1266
+ stroke: K(t.key) ? et : "var(--color-muted-foreground)",
1267
+ "stroke-width": K(t.key) ? 2.5 : 1.5,
1268
+ "stroke-opacity": K(t.key) ? 1 : 0.45,
1269
+ fill: "none",
1270
+ "stroke-linejoin": "round",
1271
+ class: "vlite-gantt-dep-line pointer-events-none"
1272
+ }, null, 8, Bo),
1273
+ s("path", {
1274
+ d: t.ad,
1275
+ "data-dep-part": "arrow",
1276
+ fill: K(t.key) ? et : "var(--color-muted-foreground)",
1277
+ "fill-opacity": K(t.key) ? 1 : 0.6,
1278
+ class: "vlite-gantt-dep-arrowhead pointer-events-none"
1279
+ }, null, 8, Po)
1280
+ ], 10, Eo))), 128)),
1281
+ c.editableDependencies && ue.value ? (d(), v("g", {
1282
+ key: 1,
1283
+ class: "vlite-gantt-dep-delete",
1284
+ transform: `translate(${ue.value.midX}, ${ue.value.midY})`,
1285
+ role: "button",
1286
+ tabindex: "0",
1287
+ focusable: "true",
1288
+ "aria-label": an.value,
1289
+ onClick: ln,
1290
+ onKeydown: [
1291
+ je(zt(Me, ["prevent"]), ["enter"]),
1292
+ je(zt(Me, ["prevent"]), ["space"])
1293
+ ]
1294
+ }, [
1295
+ n[8] || (n[8] = s("circle", {
1296
+ r: "11",
1297
+ fill: "transparent"
1298
+ }, null, -1)),
1299
+ s("circle", {
1300
+ r: "8",
1301
+ fill: et,
1302
+ stroke: "var(--color-background)",
1303
+ "stroke-width": "1.5"
1304
+ }),
1305
+ n[9] || (n[9] = s("path", {
1306
+ d: "M -3 -3 L 3 3 M 3 -3 L -3 3",
1307
+ stroke: "var(--color-background)",
1308
+ "stroke-width": "1.75",
1309
+ "stroke-linecap": "round",
1310
+ class: "pointer-events-none"
1311
+ }, null, -1))
1312
+ ], 40, Ho)) : p("", !0),
1313
+ (d(!0), v(C, null, z(w.value, (t, o) => (d(), v("g", {
1314
+ key: t.task.id,
722
1315
  ref_for: !0,
723
- ref: (a) => Ne(a, n),
724
- class: me({ "vlite-gantt-bar-dragging": I.value && (q.value === e.task.id || z(l).affectedIds.has(e.task.id)) })
1316
+ ref: (a) => un(a, o),
1317
+ class: xe(["vlite-gantt-bar-group", [
1318
+ { "vlite-gantt-bar-dragging": B.value && (N.value === t.task.id || X(i).affectedIds.has(t.task.id)) },
1319
+ mn(t.task.id),
1320
+ { "vlite-gantt-link-source": h.value && oe.value === t.task.id }
1321
+ ]]),
1322
+ onMouseenter: (a) => $n(a, o),
1323
+ onMouseleave: Mn
725
1324
  }, [
726
- e.task.milestone ? (u(), d("path", {
1325
+ t.task.milestone ? (d(), v("path", {
727
1326
  key: 0,
728
- d: Qe(e.x + e.fullW / 2, e.y + c.barHeight / 2, c.barHeight * 0.4),
729
- fill: `url(#gg-${z(R)}-${n})`,
730
- stroke: e.task._color,
1327
+ d: xn(t.x + t.fullW / 2, t.y + c.barHeight / 2, c.barHeight * 0.4),
1328
+ fill: `url(#gg-${X(Y)}-${o})`,
1329
+ stroke: t.task._color,
731
1330
  "stroke-width": "1.5",
732
1331
  "stroke-opacity": "0.6",
733
1332
  class: "cursor-pointer",
734
- opacity: B.value === n ? 0.9 : 1,
735
- onMouseenter: (a) => Me(a, n),
736
- onMousemove: (a) => De(a, n),
737
- onMouseleave: Se,
738
- onClick: (a) => ve(e.task)
739
- }, null, 40, At)) : (u(), d($, { key: 1 }, [
740
- r("path", {
741
- d: ce(e.x, e.y, e.fullW, c.barHeight, c.barRadius),
742
- fill: `url(#gp-${z(R)}-${n})`,
1333
+ opacity: H.value === o ? 0.9 : 1,
1334
+ onMouseenter: (a) => Rt(a, o),
1335
+ onMousemove: (a) => Bt(a, o),
1336
+ onClick: (a) => Ze(t.task)
1337
+ }, null, 40, zo)) : (d(), v(C, { key: 1 }, [
1338
+ s("path", {
1339
+ "data-gantt-part": "bg",
1340
+ d: P(t.x, t.y, t.fullW, c.barHeight, c.barRadius),
1341
+ fill: `url(#gp-${X(Y)}-${o})`,
743
1342
  class: "pointer-events-none"
744
- }, null, 8, Pt),
745
- c.showProgress && e.progressW > 0 ? (u(), d("path", {
1343
+ }, null, 8, Xo),
1344
+ c.showProgress && t.progressW > 0 ? (d(), v("path", {
746
1345
  key: 0,
747
- d: ce(e.x, e.y, Math.min(e.progressW, e.fullW), c.barHeight, c.barRadius),
748
- fill: `url(#gg-${z(R)}-${n})`,
1346
+ "data-gantt-part": "progress",
1347
+ d: P(t.x, t.y, Math.min(t.progressW, t.fullW), c.barHeight, c.barRadius),
1348
+ fill: `url(#gg-${X(Y)}-${o})`,
749
1349
  class: "pointer-events-none"
750
- }, null, 8, Ft)) : h("", !0),
751
- c.showProgress ? h("", !0) : (u(), d("path", {
1350
+ }, null, 8, Go)) : p("", !0),
1351
+ c.showProgress ? p("", !0) : (d(), v("path", {
752
1352
  key: 1,
753
- d: ce(e.x, e.y, e.w, c.barHeight, c.barRadius),
754
- fill: `url(#gg-${z(R)}-${n})`,
1353
+ "data-gantt-part": "fill",
1354
+ d: P(t.x, t.y, t.w, c.barHeight, c.barRadius),
1355
+ fill: `url(#gg-${X(Y)}-${o})`,
755
1356
  class: "pointer-events-none"
756
- }, null, 8, Zt)),
757
- r("rect", {
758
- x: e.x,
759
- y: e.y,
760
- width: e.fullW,
1357
+ }, null, 8, qo)),
1358
+ t.task.blocked ? (d(), v(C, { key: 2 }, [
1359
+ s("path", {
1360
+ "data-gantt-part": "blocked-hatch",
1361
+ d: P(t.x, t.y, t.fullW, c.barHeight, c.barRadius),
1362
+ fill: `url(#gb-${X(Y)})`,
1363
+ class: "pointer-events-none"
1364
+ }, null, 8, Fo),
1365
+ s("path", {
1366
+ "data-gantt-part": "blocked-outline",
1367
+ d: P(t.x, t.y, t.fullW, c.barHeight, c.barRadius),
1368
+ fill: "none",
1369
+ stroke: "var(--color-danger)",
1370
+ "stroke-width": "1.5",
1371
+ "stroke-opacity": "0.9",
1372
+ "stroke-dasharray": "4 3",
1373
+ class: "pointer-events-none"
1374
+ }, null, 8, Yo),
1375
+ s("g", {
1376
+ "data-gantt-part": "blocked-lock",
1377
+ transform: `translate(${t.x + 10}, ${t.y + c.barHeight / 2})`,
1378
+ class: "pointer-events-none"
1379
+ }, [...n[10] || (n[10] = [
1380
+ s("circle", {
1381
+ r: "7",
1382
+ fill: "var(--color-danger)"
1383
+ }, null, -1),
1384
+ s("path", {
1385
+ d: "M -2 -0.5 v -1.3 a 2 2 0 0 1 4 0 v 1.3 M -3 -0.5 h 6 v 3.8 h -6 Z",
1386
+ fill: "none",
1387
+ stroke: "var(--color-background)",
1388
+ "stroke-width": "1.2",
1389
+ "stroke-linejoin": "round"
1390
+ }, null, -1)
1391
+ ])], 8, Oo)
1392
+ ], 64)) : p("", !0),
1393
+ s("rect", {
1394
+ "data-gantt-part": "hitbox",
1395
+ x: t.x,
1396
+ y: t.y,
1397
+ width: t.fullW,
761
1398
  height: c.barHeight,
762
1399
  fill: "transparent",
763
- style: D({ cursor: U.value }),
764
- onMouseenter: (a) => Me(a, n),
765
- onMousemove: (a) => De(a, n),
766
- onMouseleave: Se,
767
- onMousedown: (a) => Ue(a, n),
768
- onClick: (a) => ve(e.task)
769
- }, null, 44, Ot),
770
- B.value === n ? (u(), d("rect", {
771
- key: 2,
772
- x: e.x,
773
- y: e.y,
774
- width: e.fullW,
1400
+ style: E({ cursor: ve.value }),
1401
+ onMouseenter: (a) => Rt(a, o),
1402
+ onMousemove: (a) => Bt(a, o),
1403
+ onMousedown: (a) => dn(a, o),
1404
+ onClick: (a) => Ze(t.task)
1405
+ }, null, 44, Vo),
1406
+ H.value === o || B.value && N.value === t.task.id ? (d(), v("rect", {
1407
+ key: 3,
1408
+ "data-gantt-part": "highlight",
1409
+ x: t.x,
1410
+ y: t.y,
1411
+ width: t.fullW,
775
1412
  height: c.barHeight,
776
1413
  rx: c.barRadius,
777
1414
  ry: c.barRadius,
778
1415
  fill: "currentColor",
779
1416
  "fill-opacity": "0.06",
780
1417
  class: "pointer-events-none"
781
- }, null, 8, Gt)) : h("", !0),
782
- c.draggable && !e.task.milestone && (se.value === n || I.value && q.value === e.task.id) ? (u(), d($, { key: 3 }, [
783
- r("rect", {
784
- x: e.x,
785
- y: e.y + 4,
1418
+ }, null, 8, Ko)) : p("", !0),
1419
+ c.draggable && !t.task.milestone && (q.value === o || B.value && N.value === t.task.id) ? (d(), v(C, { key: 4 }, [
1420
+ s("rect", {
1421
+ "data-gantt-part": "handle-left",
1422
+ x: t.x,
1423
+ y: t.y + 4,
786
1424
  width: "4",
787
1425
  height: c.barHeight - 8,
788
1426
  rx: "2",
789
1427
  fill: "currentColor",
790
1428
  "fill-opacity": "0.4",
791
1429
  class: "pointer-events-none"
792
- }, null, 8, qt),
793
- r("rect", {
794
- x: e.x + e.fullW - 4,
795
- y: e.y + 4,
1430
+ }, null, 8, No),
1431
+ s("rect", {
1432
+ "data-gantt-part": "handle-right",
1433
+ x: t.x + t.fullW - 4,
1434
+ y: t.y + 4,
796
1435
  width: "4",
797
1436
  height: c.barHeight - 8,
798
1437
  rx: "2",
799
1438
  fill: "currentColor",
800
1439
  "fill-opacity": "0.4",
801
1440
  class: "pointer-events-none"
802
- }, null, 8, Xt)
803
- ], 64)) : h("", !0),
804
- c.showLabels && e.fullW > 60 ? (u(), d("text", {
805
- key: 4,
806
- x: e.x + 12,
807
- y: e.y + c.barHeight / 2,
1441
+ }, null, 8, Zo)
1442
+ ], 64)) : p("", !0),
1443
+ c.showLabels && t.fullW > 60 ? (d(), v("text", {
1444
+ key: 5,
1445
+ "data-gantt-part": "label",
1446
+ "data-name": t.task.name,
1447
+ x: t.x + (t.task.blocked ? 24 : 12),
1448
+ y: t.y + c.barHeight / 2,
808
1449
  "dominant-baseline": "middle",
809
1450
  "font-size": "11",
810
1451
  "font-weight": "600",
811
1452
  fill: c.showProgress ? "currentColor" : "white",
812
- opacity: Q.value > 0.3 ? 0.85 : 0,
1453
+ opacity: Re.value > 0.3 ? 0.85 : 0,
813
1454
  class: "pointer-events-none"
814
- }, b(e.task.name), 9, jt)) : h("", !0)
815
- ], 64))
816
- ], 2))), 128)),
817
- r("g", {
1455
+ }, I(Et(t.task.name, t.fullW, t.task.blocked)), 9, jo)) : p("", !0)
1456
+ ], 64)),
1457
+ c.editableDependencies && fn(o) ? (d(), v("g", {
1458
+ key: 2,
1459
+ class: "vlite-gantt-dep-connector",
1460
+ transform: `translate(${F(t).cx}, ${F(t).cy})`,
1461
+ role: "button",
1462
+ tabindex: "0",
1463
+ focusable: "true",
1464
+ "aria-label": `Create dependency from ${t.task.name}`,
1465
+ onPointerdown: (a) => yn(a, o),
1466
+ onKeydown: (a) => pn(a, o),
1467
+ onFocus: (a) => hn(o),
1468
+ onBlur: kn,
1469
+ onMouseenter: (a) => Sn(o),
1470
+ onMouseleave: n[0] || (n[0] = (a) => Ln(a))
1471
+ }, [
1472
+ n[11] || (n[11] = s("circle", {
1473
+ r: "11",
1474
+ fill: "transparent",
1475
+ class: "vlite-gantt-dep-connector-hit"
1476
+ }, null, -1)),
1477
+ s("circle", {
1478
+ r: ma,
1479
+ class: "vlite-gantt-dep-connector-disc",
1480
+ fill: "var(--color-background)",
1481
+ stroke: "var(--color-foreground)",
1482
+ "stroke-width": "1.5"
1483
+ }),
1484
+ n[12] || (n[12] = s("path", {
1485
+ d: "M -3.5 0 H 3.5 M 0 -3.5 V 3.5",
1486
+ stroke: "var(--color-foreground)",
1487
+ "stroke-width": "1.5",
1488
+ "stroke-linecap": "round",
1489
+ class: "pointer-events-none"
1490
+ }, null, -1))
1491
+ ], 40, Uo)) : p("", !0),
1492
+ h.value && fe.value === t.task.id ? (d(), v("g", Jo, [
1493
+ s("rect", {
1494
+ x: t.x - 3,
1495
+ y: t.y - 3,
1496
+ width: t.fullW + 6,
1497
+ height: c.barHeight + 6,
1498
+ rx: c.barRadius + 2,
1499
+ fill: "none",
1500
+ stroke: S.value === "valid" ? "var(--color-success)" : "var(--color-danger)",
1501
+ "stroke-width": "2",
1502
+ "stroke-dasharray": S.value === "valid" ? "0" : "5 3"
1503
+ }, null, 8, Qo),
1504
+ s("text", {
1505
+ x: t.x + t.fullW + 10,
1506
+ y: t.y + c.barHeight / 2,
1507
+ "dominant-baseline": "middle",
1508
+ "font-size": "11",
1509
+ "font-weight": "700",
1510
+ fill: S.value === "valid" ? "var(--color-success)" : "var(--color-danger)"
1511
+ }, I(S.value === "valid" ? "✓" : "✕"), 9, ea)
1512
+ ])) : p("", !0)
1513
+ ], 42, _o))), 128)),
1514
+ h.value && T.value ? (d(), v("g", ta, [
1515
+ s("line", {
1516
+ x1: T.value.x1,
1517
+ y1: T.value.y1,
1518
+ x2: T.value.x2,
1519
+ y2: T.value.y2,
1520
+ stroke: S.value === "invalid" ? "var(--color-danger)" : "var(--color-primary)",
1521
+ "stroke-width": "2",
1522
+ "stroke-dasharray": S.value === "invalid" ? "2 4" : "6 4",
1523
+ "stroke-linecap": "round",
1524
+ "stroke-opacity": S.value === "none" ? 0.55 : 0.9
1525
+ }, null, 8, na),
1526
+ s("circle", {
1527
+ cx: T.value.x2,
1528
+ cy: T.value.y2,
1529
+ r: "4",
1530
+ fill: S.value === "invalid" ? "var(--color-danger)" : "var(--color-primary)",
1531
+ "fill-opacity": S.value === "none" ? 0.55 : 0.9
1532
+ }, null, 8, oa)
1533
+ ])) : p("", !0),
1534
+ s("g", {
818
1535
  ref_key: "dragLabelRef",
819
- ref: H,
820
- style: { display: "none" }
821
- }, [...o[5] || (o[5] = [
822
- r("rect", {
1536
+ ref: _,
1537
+ style: { display: "none" },
1538
+ "pointer-events": "none",
1539
+ "aria-hidden": "true"
1540
+ }, [...n[13] || (n[13] = [
1541
+ s("rect", {
823
1542
  x: "0",
824
1543
  y: "0",
825
- width: "124",
1544
+ width: "148",
826
1545
  height: "18",
827
1546
  rx: "4",
828
1547
  fill: "var(--color-foreground)",
829
1548
  "fill-opacity": "0.85"
830
1549
  }, null, -1),
831
- r("text", {
1550
+ s("text", {
832
1551
  x: "0",
833
1552
  y: "0",
834
1553
  "text-anchor": "middle",
@@ -838,77 +1557,101 @@ const ct = {
838
1557
  fill: "var(--color-background)"
839
1558
  }, null, -1)
840
1559
  ])], 512),
841
- c.showTodayLine && V.value ? (u(), d("g", Nt, [
842
- r("line", {
843
- x1: G.value,
1560
+ c.showTodayLine && Se.value ? (d(), v("g", aa, [
1561
+ s("line", {
1562
+ x1: de.value,
844
1563
  y1: 0,
845
- x2: G.value,
846
- y2: O.value,
1564
+ x2: de.value,
1565
+ y2: ne.value,
847
1566
  stroke: c.todayColor,
848
1567
  "stroke-width": "2",
849
1568
  "stroke-opacity": "0.7",
850
1569
  "stroke-dasharray": "6 3"
851
- }, null, 8, Vt),
852
- r("circle", {
853
- cx: G.value,
1570
+ }, null, 8, la),
1571
+ s("circle", {
1572
+ cx: de.value,
854
1573
  cy: 0,
855
1574
  r: "4",
856
1575
  fill: c.todayColor,
857
1576
  "fill-opacity": "0.9"
858
- }, null, 8, Ut),
859
- r("text", {
860
- x: G.value,
1577
+ }, null, 8, ra),
1578
+ s("text", {
1579
+ x: de.value,
861
1580
  y: -8,
862
1581
  "text-anchor": "middle",
863
1582
  "font-size": "9",
864
1583
  "font-weight": "700",
865
1584
  fill: c.todayColor,
866
1585
  "fill-opacity": "0.9"
867
- }, "TODAY", 8, Kt)
868
- ])) : h("", !0)
869
- ], 8, St))
1586
+ }, "TODAY", 8, sa)
1587
+ ])) : p("", !0)
1588
+ ], 42, bo))
870
1589
  ], 4)
871
1590
  ], 544)
872
1591
  ]),
873
- (u(), st(rt, { to: "body" }, [
874
- g.value && !I.value ? (u(), d("div", {
1592
+ s("div", ia, I(Ge.value), 1),
1593
+ (d(), Hn(_n, { to: "body" }, [
1594
+ y.value && !B.value && !h.value && !M.value ? (d(), v("div", {
875
1595
  key: 0,
876
1596
  class: "vlite-chart-tooltip",
877
- style: D({ left: `${g.value.x + 14}px`, top: `${g.value.y - 12}px` })
1597
+ style: E({ left: `${y.value.left}px`, top: `${y.value.top}px` })
878
1598
  }, [
879
- r("div", Qt, b(g.value.task.name), 1),
880
- r("div", Jt, [
881
- r("span", {
1599
+ s("div", ua, I(y.value.task.name), 1),
1600
+ s("div", ca, [
1601
+ s("span", {
882
1602
  class: "w-2 h-2 rounded-sm shrink-0",
883
- style: D({ backgroundColor: g.value.task._color ?? g.value.task.color })
1603
+ style: E({ backgroundColor: y.value.task._color ?? y.value.task.color })
884
1604
  }, null, 4),
885
- r("span", null, b(g.value.startStr) + " — " + b(g.value.endStr), 1)
1605
+ s("span", null, I(y.value.startStr) + " — " + I(y.value.endStr), 1)
886
1606
  ]),
887
- r("div", Yt, b(Ye(g.value.task._start, g.value.task._end)), 1),
888
- c.showProgress && g.value.task.progress != null ? (u(), d("div", eo, [
889
- r("div", to, [
890
- r("div", {
1607
+ s("div", da, I(Tn(y.value.task._start, y.value.task._end)), 1),
1608
+ c.showProgress && y.value.task.progress != null ? (d(), v("div", va, [
1609
+ s("div", fa, [
1610
+ s("div", {
891
1611
  class: "vlite-gantt-tooltip-progress-fill",
892
- style: D({
893
- width: `${g.value.task.progress}%`,
894
- backgroundColor: g.value.task._color ?? g.value.task.color
1612
+ style: E({
1613
+ width: `${y.value.task.progress}%`,
1614
+ backgroundColor: y.value.task._color ?? y.value.task.color
895
1615
  })
896
1616
  }, null, 4)
897
1617
  ]),
898
- r("span", oo, b(g.value.task.progress) + "%", 1)
899
- ])) : h("", !0),
900
- g.value.task.group ? (u(), d("div", no, b(g.value.task.group), 1)) : h("", !0),
901
- c.draggable && !g.value.task.milestone ? (u(), d("div", lo, [
902
- o[6] || (o[6] = We(" Drag to move · Edges to resize ", -1)),
903
- c.cascadeDependencies ? (u(), d($, { key: 0 }, [
904
- We(" · Dependents follow")
905
- ], 64)) : h("", !0)
906
- ])) : h("", !0)
907
- ], 4)) : h("", !0)
1618
+ s("span", ga, I(y.value.task.progress) + "%", 1)
1619
+ ])) : p("", !0),
1620
+ y.value.task.blocked ? (d(), v("div", ya, [
1621
+ n[14] || (n[14] = s("svg", {
1622
+ width: "10",
1623
+ height: "10",
1624
+ viewBox: "0 0 24 24",
1625
+ fill: "none",
1626
+ stroke: "currentColor",
1627
+ "stroke-width": "2.5",
1628
+ "stroke-linecap": "round",
1629
+ "stroke-linejoin": "round"
1630
+ }, [
1631
+ s("rect", {
1632
+ x: "5",
1633
+ y: "11",
1634
+ width: "14",
1635
+ height: "9",
1636
+ rx: "2"
1637
+ }),
1638
+ s("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })
1639
+ ], -1)),
1640
+ s("span", null, I(y.value.task.blockedReason || "Blocked"), 1)
1641
+ ])) : p("", !0),
1642
+ y.value.task.group ? (d(), v("div", pa, I(y.value.task.group), 1)) : p("", !0),
1643
+ c.draggable && !y.value.task.milestone ? (d(), v("div", ha, [
1644
+ n[15] || (n[15] = Xt(" Drag to move · Edges to resize ", -1)),
1645
+ c.cascadeDependencies ? (d(), v(C, { key: 0 }, [
1646
+ Xt(" · Dependents follow")
1647
+ ], 64)) : p("", !0)
1648
+ ])) : p("", !0),
1649
+ c.editableDependencies ? (d(), v("div", ka, " Drag the + connector to link a dependency ")) : p("", !0)
1650
+ ], 4)) : p("", !0)
908
1651
  ]))
909
1652
  ], 512));
910
1653
  }
911
1654
  });
912
1655
  export {
913
- uo as default
1656
+ La as default
914
1657
  };