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