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.
- package/components/Accordion/Accordion.vue.js +19 -16
- package/components/Accordion/AccordionContent.vue.js +2 -2
- package/components/Accordion/AccordionItem.vue.js +38 -36
- package/components/CategoryManager/CategoryManager.vue2.js +4 -3
- package/components/CategoryManager/CategoryNode.vue.js +30 -30
- package/components/CategoryMenu/CategoryMenu.vue.js +9 -11
- package/components/Chart/GanttChart.vue.d.ts +18 -2
- package/components/Chart/GanttChart.vue.js +1 -1
- package/components/Chart/GanttChart.vue2.js +1347 -604
- package/components/Chart/GanttChartConnectorRouting.d.ts +83 -0
- package/components/Chart/GanttChartConnectorRouting.js +405 -0
- package/components/Chart/GanttChartDateUtils.d.ts +38 -0
- package/components/Chart/GanttChartDateUtils.js +79 -0
- package/components/Chart/GanttChartDependencyUtils.d.ts +92 -0
- package/components/Chart/GanttChartDependencyUtils.js +109 -0
- package/components/Chart/GanttChartResizePreviewUtils.d.ts +52 -0
- package/components/Chart/GanttChartResizePreviewUtils.js +53 -0
- package/components/Chart/GanttChartTooltipUtils.d.ts +41 -0
- package/components/Chart/GanttChartTooltipUtils.js +63 -0
- package/components/Chart/index.d.ts +3 -1
- package/components/Chart/types.d.ts +92 -2
- package/components/Chart/types.js +8 -0
- package/components/ColorPicker/ColorIro.vue2.js +155 -0
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.d.ts +5 -0
- package/components/ColorPicker/ColorPicker.vue.js +111 -65
- package/components/ColorPicker/constants.d.ts +2 -0
- package/components/ColorPicker/constants.js +4 -0
- package/components/ColorPicker/index.d.ts +1 -0
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/Dropdown/Dropdown.vue.js +100 -97
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/AccordionView.vue.js +5 -220
- package/components/Form/AccordionView.vue3.js +250 -0
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +309 -280
- package/components/Form/FormField.vue.js +177 -197
- package/components/Form/FormFields.vue.js +1 -1
- package/components/Form/FormFields.vue2.js +60 -60
- package/components/Form/FormSkeleton.vue.js +50 -35
- package/components/Form/TableView.vue.js +59 -43
- package/components/Form/composables/useForm.js +159 -148
- package/components/Form/index.vue2.js +7 -7
- package/components/Form/utils/form.utils.d.ts +2 -0
- package/components/Form/utils/form.utils.js +17 -13
- package/components/GoogleMap.vue.d.ts +1 -1
- package/components/Kanban/Kanban.vue.d.ts +16 -2
- package/components/Kanban/Kanban.vue.js +2 -2
- package/components/Kanban/Kanban.vue2.js +150 -86
- package/components/Kanban/types.d.ts +37 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +189 -0
- package/components/PanZoomViewport/PanZoomViewport.vue.js +7 -0
- package/components/PanZoomViewport/PanZoomViewport.vue2.js +536 -0
- package/components/PanZoomViewport/index.d.ts +2 -0
- package/components/PanZoomViewport/types.d.ts +121 -0
- package/components/ScaleGenerator/ScaleGenerator.vue.d.ts +3 -0
- package/components/ScaleGenerator/ScaleGenerator.vue.js +5 -108
- package/components/ScaleGenerator/ScaleGenerator.vue2.js +143 -2
- package/components/ScaleGenerator/types.d.ts +2 -0
- package/components/Screen/ScreenFilter.vue.js +19 -18
- package/components/SeoProvider/SeoProvider.vue.d.ts +4 -1
- package/components/SeoProvider/SeoProvider.vue.js +39 -33
- package/components/SeoProvider/domAdapter.d.ts +1 -4
- package/components/SeoProvider/domAdapter.js +71 -58
- package/components/SeoProvider/index.d.ts +5 -2
- package/components/SeoProvider/normalizeSeo.d.ts +10 -49
- package/components/SeoProvider/normalizeSeo.js +246 -182
- package/components/SeoProvider/plainText.d.ts +8 -0
- package/components/SeoProvider/plainText.js +117 -0
- package/components/SeoProvider/seoUrl.d.ts +13 -0
- package/components/SeoProvider/seoUrl.js +25 -0
- package/components/SeoProvider/structuredData.d.ts +100 -0
- package/components/SeoProvider/structuredData.js +33 -0
- package/components/SeoProvider/types.d.ts +47 -109
- package/components/Tabes/Tabes.vue.js +1 -1
- package/components/Tabes/Tabes.vue2.js +215 -193
- package/components/Tabes/TabesMarkerGeometry.d.ts +34 -0
- package/components/Tabes/TabesMarkerGeometry.js +21 -0
- package/components/ThemeProvider/ThemeProvider.vue.d.ts +2 -0
- package/components/ThemeProvider/ThemeProvider.vue.js +29 -23
- package/components/ThemeProvider/index.d.ts +1 -1
- package/components/ThemeProvider/themeVars.d.ts +9 -13
- package/components/ThemeProvider/themeVars.js +173 -125
- package/components/ThemeProvider/types.d.ts +10 -0
- package/components/ToastNotification.vue.js +1 -1
- package/components/ToastNotification.vue2.js +3 -3
- package/components/index.d.ts +3 -2
- package/composables/useKeyStroke.d.ts +18 -0
- package/composables/useKeyStroke.js +103 -77
- package/composables/useTheme.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +380 -350
- package/package.json +12 -4
- package/style.css +1 -1
- package/utils/environment.d.ts +29 -0
- package/utils/environment.js +4 -0
- package/utils/functions.js +14 -13
- package/components/ColorPicker/ColorIro.vue.js +0 -141
- package/components/Form/AccordionView.vue2.js +0 -4
- /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
|
@@ -1,24 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CHART_COLORS as
|
|
3
|
-
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
36
|
+
}, fa = { class: "vlite-gantt-tooltip-progress-track" }, ga = { class: "text-[10px] font-semibold" }, ya = {
|
|
16
37
|
key: 1,
|
|
17
|
-
class: "
|
|
18
|
-
},
|
|
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
|
-
},
|
|
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: () =>
|
|
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:
|
|
48
|
-
const
|
|
49
|
-
function
|
|
50
|
-
return
|
|
51
|
-
}
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
),
|
|
84
|
-
function
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
for (const
|
|
91
|
-
|
|
92
|
-
return { grouped:
|
|
93
|
-
}),
|
|
94
|
-
const
|
|
95
|
-
for (const [
|
|
96
|
-
if (
|
|
97
|
-
for (const
|
|
98
|
-
return
|
|
99
|
-
}),
|
|
100
|
-
if (!
|
|
101
|
-
const
|
|
102
|
-
return { start:
|
|
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
|
|
105
|
-
for (const
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
let
|
|
109
|
-
return
|
|
110
|
-
}),
|
|
111
|
-
let
|
|
112
|
-
function
|
|
113
|
-
if (
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
if (!
|
|
117
|
-
const
|
|
118
|
-
let
|
|
119
|
-
if (
|
|
120
|
-
|
|
121
|
-
const k =
|
|
122
|
-
|
|
123
|
-
|
|
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
|
|
128
|
-
const
|
|
129
|
-
if (!
|
|
130
|
-
|
|
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
|
|
134
|
-
|
|
135
|
-
const a =
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
function
|
|
139
|
-
const
|
|
140
|
-
if (!
|
|
141
|
-
|
|
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
|
|
145
|
-
|
|
146
|
-
const a =
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
let
|
|
152
|
-
if (
|
|
153
|
-
for (;
|
|
154
|
-
|
|
155
|
-
else if (
|
|
156
|
-
for (;
|
|
157
|
-
|
|
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 (;
|
|
160
|
-
|
|
161
|
-
return
|
|
162
|
-
}),
|
|
163
|
-
let
|
|
164
|
-
const
|
|
165
|
-
return
|
|
166
|
-
}),
|
|
167
|
-
const
|
|
168
|
-
return
|
|
169
|
-
let
|
|
170
|
-
return
|
|
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
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
return 1 + Math.round(((
|
|
178
|
-
}
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
return Math.max(
|
|
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
|
|
184
|
-
|
|
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
|
|
194
|
-
return
|
|
211
|
+
function tn(e) {
|
|
212
|
+
return eo(e, u.viewMode, ie.value);
|
|
195
213
|
}
|
|
196
|
-
function
|
|
197
|
-
return
|
|
214
|
+
function nn(e) {
|
|
215
|
+
return Qn(e, u.viewMode, ie.value);
|
|
198
216
|
}
|
|
199
|
-
const w =
|
|
200
|
-
const
|
|
201
|
-
return
|
|
202
|
-
if (
|
|
203
|
-
const a =
|
|
204
|
-
return
|
|
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
|
-
}),
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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
|
|
257
|
-
!
|
|
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
|
|
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
|
|
273
|
-
function
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
function
|
|
277
|
-
const
|
|
278
|
-
if (!
|
|
279
|
-
const
|
|
280
|
-
for (;
|
|
281
|
-
const
|
|
282
|
-
for (const
|
|
283
|
-
|
|
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
|
|
286
|
-
}
|
|
287
|
-
function
|
|
288
|
-
if (!
|
|
289
|
-
const
|
|
290
|
-
if (!
|
|
291
|
-
const
|
|
292
|
-
return
|
|
293
|
-
}
|
|
294
|
-
function
|
|
295
|
-
if (!
|
|
296
|
-
const
|
|
297
|
-
if (!
|
|
298
|
-
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
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
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
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
|
-
|
|
356
|
-
|
|
357
|
-
|
|
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
|
|
360
|
-
|
|
361
|
-
|
|
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
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
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
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
function
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
if (
|
|
423
|
-
if (e
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
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:
|
|
918
|
+
ref: be,
|
|
430
919
|
class: "vlite-gantt-chart w-full select-none"
|
|
431
920
|
}, [
|
|
432
|
-
c.showTodayLine &&
|
|
433
|
-
|
|
434
|
-
|
|
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:
|
|
437
|
-
disabled:
|
|
438
|
-
}, [...
|
|
439
|
-
|
|
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
|
-
|
|
960
|
+
s("circle", {
|
|
450
961
|
cx: "11",
|
|
451
962
|
cy: "11",
|
|
452
963
|
r: "8"
|
|
453
964
|
}),
|
|
454
|
-
|
|
965
|
+
s("line", {
|
|
455
966
|
x1: "21",
|
|
456
967
|
y1: "21",
|
|
457
968
|
x2: "16.65",
|
|
458
969
|
y2: "16.65"
|
|
459
970
|
}),
|
|
460
|
-
|
|
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
|
-
|
|
468
|
-
])], 8,
|
|
469
|
-
|
|
978
|
+
s("span", null, "Zoom Out", -1)
|
|
979
|
+
])], 8, io),
|
|
980
|
+
s("button", {
|
|
470
981
|
class: "vlite-gantt-btn",
|
|
471
|
-
onClick:
|
|
472
|
-
disabled:
|
|
473
|
-
}, [...
|
|
474
|
-
|
|
475
|
-
])], 8,
|
|
476
|
-
])) :
|
|
477
|
-
c.showTodayLine &&
|
|
478
|
-
key:
|
|
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:
|
|
481
|
-
}, [...
|
|
482
|
-
|
|
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
|
-
|
|
1003
|
+
s("circle", {
|
|
493
1004
|
cx: "12",
|
|
494
1005
|
cy: "12",
|
|
495
1006
|
r: "10"
|
|
496
1007
|
}),
|
|
497
|
-
|
|
1008
|
+
s("line", {
|
|
498
1009
|
x1: "12",
|
|
499
1010
|
y1: "8",
|
|
500
1011
|
x2: "12",
|
|
501
1012
|
y2: "12"
|
|
502
1013
|
}),
|
|
503
|
-
|
|
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
|
-
|
|
511
|
-
])])) :
|
|
512
|
-
])) :
|
|
513
|
-
|
|
514
|
-
|
|
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:
|
|
1027
|
+
style: E({ width: `${c.sidebarWidth}px`, minWidth: `${c.sidebarWidth}px` })
|
|
517
1028
|
}, [
|
|
518
|
-
c.showHeader ? (
|
|
1029
|
+
c.showHeader ? (d(), v("div", {
|
|
519
1030
|
key: 0,
|
|
520
1031
|
class: "vlite-gantt-sidebar-header",
|
|
521
|
-
style:
|
|
522
|
-
}, [...
|
|
523
|
-
|
|
524
|
-
])], 4)) :
|
|
525
|
-
|
|
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:
|
|
1038
|
+
ref: U,
|
|
528
1039
|
class: "vlite-gantt-sidebar-body",
|
|
529
|
-
style:
|
|
1040
|
+
style: E({ height: `${ne.value}px` })
|
|
530
1041
|
}, [
|
|
531
|
-
(
|
|
532
|
-
key: `s-${
|
|
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:
|
|
1045
|
+
style: E({ height: `${c.rowHeight}px` })
|
|
535
1046
|
}, [
|
|
536
|
-
|
|
1047
|
+
t.type === "group-header" ? (d(), v("button", {
|
|
537
1048
|
key: 0,
|
|
538
1049
|
class: "vlite-gantt-group-toggle",
|
|
539
|
-
onClick: (a) =>
|
|
1050
|
+
onClick: (a) => jt(t.group)
|
|
540
1051
|
}, [
|
|
541
|
-
(
|
|
542
|
-
class:
|
|
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
|
-
}, [...
|
|
552
|
-
|
|
1062
|
+
}, [...n[6] || (n[6] = [
|
|
1063
|
+
s("polyline", { points: "6 9 12 15 18 9" }, null, -1)
|
|
553
1064
|
])], 2)),
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
], 8,
|
|
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:
|
|
559
|
-
"vlite-gantt-task-name-grouped": !!
|
|
560
|
-
"vlite-gantt-task-name-dragging":
|
|
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) =>
|
|
1073
|
+
onClick: (a) => t.task && Ze(t.task)
|
|
563
1074
|
}, [
|
|
564
|
-
|
|
1075
|
+
s("span", {
|
|
565
1076
|
class: "vlite-gantt-task-dot",
|
|
566
|
-
style:
|
|
1077
|
+
style: E({ backgroundColor: t.task?._color })
|
|
567
1078
|
}, null, 4),
|
|
568
|
-
|
|
569
|
-
c.showProgress &&
|
|
570
|
-
], 10,
|
|
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
|
-
|
|
1085
|
+
s("div", {
|
|
575
1086
|
ref_key: "timelineRef",
|
|
576
|
-
ref:
|
|
1087
|
+
ref: R,
|
|
577
1088
|
class: "vlite-gantt-timeline",
|
|
578
|
-
onScroll:
|
|
579
|
-
onWheel:
|
|
1089
|
+
onScroll: Cn,
|
|
1090
|
+
onWheel: Ut
|
|
580
1091
|
}, [
|
|
581
|
-
c.showHeader ? (
|
|
1092
|
+
c.showHeader ? (d(), v("div", {
|
|
582
1093
|
key: 0,
|
|
583
1094
|
class: "vlite-gantt-timeline-header",
|
|
584
|
-
style:
|
|
1095
|
+
style: E({ height: `${te.value}px`, width: `${ee.value}px` })
|
|
585
1096
|
}, [
|
|
586
|
-
(
|
|
587
|
-
width:
|
|
588
|
-
height:
|
|
1097
|
+
(d(), v("svg", {
|
|
1098
|
+
width: ee.value,
|
|
1099
|
+
height: te.value,
|
|
589
1100
|
class: "overflow-visible"
|
|
590
1101
|
}, [
|
|
591
|
-
(
|
|
592
|
-
|
|
593
|
-
x1:
|
|
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:
|
|
596
|
-
y2:
|
|
1106
|
+
x2: t.x,
|
|
1107
|
+
y2: te.value,
|
|
597
1108
|
stroke: "currentColor",
|
|
598
1109
|
"stroke-opacity": "0.06"
|
|
599
|
-
}, null, 8,
|
|
600
|
-
|
|
601
|
-
x:
|
|
602
|
-
y:
|
|
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
|
-
},
|
|
609
|
-
|
|
1119
|
+
}, I(t.label), 9, xo),
|
|
1120
|
+
t.sublabel ? (d(), v("text", {
|
|
610
1121
|
key: 0,
|
|
611
|
-
x:
|
|
612
|
-
y:
|
|
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
|
-
},
|
|
1128
|
+
}, I(t.sublabel), 9, wo)) : p("", !0)
|
|
618
1129
|
]))), 128))
|
|
619
|
-
], 8,
|
|
620
|
-
], 4)) :
|
|
621
|
-
|
|
1130
|
+
], 8, ko))
|
|
1131
|
+
], 4)) : p("", !0),
|
|
1132
|
+
s("div", {
|
|
622
1133
|
class: "vlite-gantt-timeline-body",
|
|
623
|
-
style:
|
|
1134
|
+
style: E({ height: `${ne.value}px` })
|
|
624
1135
|
}, [
|
|
625
|
-
(
|
|
626
|
-
|
|
627
|
-
|
|
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
|
-
|
|
633
|
-
(
|
|
634
|
-
key: `g${
|
|
635
|
-
id: `gg-${
|
|
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
|
-
|
|
1155
|
+
s("stop", {
|
|
642
1156
|
offset: "0%",
|
|
643
|
-
"stop-color":
|
|
1157
|
+
"stop-color": t.task._color,
|
|
644
1158
|
"stop-opacity": "1"
|
|
645
|
-
}, null, 8,
|
|
646
|
-
|
|
1159
|
+
}, null, 8, Io),
|
|
1160
|
+
s("stop", {
|
|
647
1161
|
offset: "100%",
|
|
648
|
-
"stop-color":
|
|
1162
|
+
"stop-color": t.task._color,
|
|
649
1163
|
"stop-opacity": "0.75"
|
|
650
|
-
}, null, 8,
|
|
651
|
-
], 8,
|
|
652
|
-
(
|
|
653
|
-
key: `p${
|
|
654
|
-
id: `gp-${
|
|
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
|
-
|
|
1174
|
+
s("stop", {
|
|
661
1175
|
offset: "0%",
|
|
662
|
-
"stop-color":
|
|
1176
|
+
"stop-color": t.task._color,
|
|
663
1177
|
"stop-opacity": "0.35"
|
|
664
|
-
}, null, 8,
|
|
665
|
-
|
|
1178
|
+
}, null, 8, So),
|
|
1179
|
+
s("stop", {
|
|
666
1180
|
offset: "100%",
|
|
667
|
-
"stop-color":
|
|
1181
|
+
"stop-color": t.task._color,
|
|
668
1182
|
"stop-opacity": "0.15"
|
|
669
|
-
}, null, 8,
|
|
670
|
-
], 8,
|
|
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 ? (
|
|
673
|
-
key:
|
|
674
|
-
x1:
|
|
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:
|
|
677
|
-
y2:
|
|
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,
|
|
682
|
-
(
|
|
683
|
-
key:
|
|
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: (
|
|
686
|
-
x2:
|
|
687
|
-
y2: (
|
|
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,
|
|
691
|
-
(
|
|
692
|
-
key: `bg${
|
|
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:
|
|
695
|
-
width:
|
|
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,
|
|
700
|
-
[
|
|
1230
|
+
}, null, 8, Ao)), [
|
|
1231
|
+
[Pn, t.type === "group-header"]
|
|
701
1232
|
])), 128)),
|
|
702
|
-
(
|
|
703
|
-
key:
|
|
704
|
-
|
|
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
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
"
|
|
710
|
-
|
|
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
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
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) =>
|
|
724
|
-
class:
|
|
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
|
-
|
|
1325
|
+
t.task.milestone ? (d(), v("path", {
|
|
727
1326
|
key: 0,
|
|
728
|
-
d:
|
|
729
|
-
fill: `url(#gg-${
|
|
730
|
-
stroke:
|
|
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:
|
|
735
|
-
onMouseenter: (a) =>
|
|
736
|
-
onMousemove: (a) =>
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
d:
|
|
742
|
-
fill: `url(#gp-${
|
|
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,
|
|
745
|
-
c.showProgress &&
|
|
1343
|
+
}, null, 8, Xo),
|
|
1344
|
+
c.showProgress && t.progressW > 0 ? (d(), v("path", {
|
|
746
1345
|
key: 0,
|
|
747
|
-
|
|
748
|
-
|
|
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,
|
|
751
|
-
c.showProgress ?
|
|
1350
|
+
}, null, 8, Go)) : p("", !0),
|
|
1351
|
+
c.showProgress ? p("", !0) : (d(), v("path", {
|
|
752
1352
|
key: 1,
|
|
753
|
-
|
|
754
|
-
|
|
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,
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
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:
|
|
764
|
-
onMouseenter: (a) =>
|
|
765
|
-
onMousemove: (a) =>
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
x:
|
|
773
|
-
y:
|
|
774
|
-
width:
|
|
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,
|
|
782
|
-
c.draggable && !
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
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,
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
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,
|
|
803
|
-
], 64)) :
|
|
804
|
-
c.showLabels &&
|
|
805
|
-
key:
|
|
806
|
-
|
|
807
|
-
|
|
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:
|
|
1453
|
+
opacity: Re.value > 0.3 ? 0.85 : 0,
|
|
813
1454
|
class: "pointer-events-none"
|
|
814
|
-
},
|
|
815
|
-
], 64))
|
|
816
|
-
|
|
817
|
-
|
|
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:
|
|
820
|
-
style: { display: "none" }
|
|
821
|
-
|
|
822
|
-
|
|
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: "
|
|
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
|
-
|
|
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 &&
|
|
842
|
-
|
|
843
|
-
x1:
|
|
1560
|
+
c.showTodayLine && Se.value ? (d(), v("g", aa, [
|
|
1561
|
+
s("line", {
|
|
1562
|
+
x1: de.value,
|
|
844
1563
|
y1: 0,
|
|
845
|
-
x2:
|
|
846
|
-
y2:
|
|
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,
|
|
852
|
-
|
|
853
|
-
cx:
|
|
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,
|
|
859
|
-
|
|
860
|
-
x:
|
|
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,
|
|
868
|
-
])) :
|
|
869
|
-
],
|
|
1586
|
+
}, "TODAY", 8, sa)
|
|
1587
|
+
])) : p("", !0)
|
|
1588
|
+
], 42, bo))
|
|
870
1589
|
], 4)
|
|
871
1590
|
], 544)
|
|
872
1591
|
]),
|
|
873
|
-
(
|
|
874
|
-
|
|
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:
|
|
1597
|
+
style: E({ left: `${y.value.left}px`, top: `${y.value.top}px` })
|
|
878
1598
|
}, [
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
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:
|
|
1603
|
+
style: E({ backgroundColor: y.value.task._color ?? y.value.task.color })
|
|
884
1604
|
}, null, 4),
|
|
885
|
-
|
|
1605
|
+
s("span", null, I(y.value.startStr) + " — " + I(y.value.endStr), 1)
|
|
886
1606
|
]),
|
|
887
|
-
|
|
888
|
-
c.showProgress &&
|
|
889
|
-
|
|
890
|
-
|
|
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:
|
|
893
|
-
width: `${
|
|
894
|
-
backgroundColor:
|
|
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
|
-
|
|
899
|
-
])) :
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
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
|
-
|
|
1656
|
+
La as default
|
|
914
1657
|
};
|