@stonecrop/aform 0.8.2 → 0.8.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/dist/aform.js +1432 -1366
- package/dist/aform.js.map +1 -1
- package/dist/aform.umd.cjs +12 -8
- package/dist/aform.umd.cjs.map +1 -1
- package/package.json +12 -12
package/dist/aform.js
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as te, useTemplateRef as fe, ref as L, computed as $, openBlock as w, createElementBlock as k, unref as V, normalizeClass as ae, normalizeStyle as xe, createBlock as pe, resolveDynamicComponent as We, mergeProps as vt, toDisplayString as K, createElementVNode as y, withModifiers as Ie, withDirectives as J, Fragment as ue, renderList as me, vShow as Ce, createCommentVNode as q, renderSlot as he, createTextVNode as Dt, onMounted as Ee, watch as oe, onBeforeUnmount as sn, nextTick as pt, toValue as E, shallowRef as ie, getCurrentScope as mt, onScopeDispose as ht, reactive as rn, vModelText as we, vModelCheckbox as un, vModelSelect as Cn, getCurrentInstance as gt, watchEffect as Oe, useCssVars as En, onUnmounted as An, useModel as ke, createVNode as dt, withCtx as Tt, mergeModels as Me, isRef as Tn, toRefs as $n, customRef as St, toRef as cn, readonly as Rt, resolveComponent as dn, withKeys as Ne } from "vue";
|
|
2
2
|
import { defineStore as Dn } from "pinia";
|
|
3
|
-
import './assets/index.css';function
|
|
4
|
-
return
|
|
3
|
+
import './assets/index.css';function fn(e, t) {
|
|
4
|
+
return mt() ? (ht(e, t), !0) : !1;
|
|
5
5
|
}
|
|
6
|
-
const
|
|
6
|
+
const Sn = typeof window < "u" && typeof document < "u";
|
|
7
7
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
8
|
-
const
|
|
8
|
+
const Rn = (e) => e != null, Ln = Object.prototype.toString, Hn = (e) => Ln.call(e) === "[object Object]", Vn = () => {
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function rt(e) {
|
|
11
11
|
return Array.isArray(e) ? e : [e];
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return
|
|
13
|
+
function Pn(e, t, n) {
|
|
14
|
+
return oe(e, t, {
|
|
15
15
|
...n,
|
|
16
16
|
immediate: !0
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
function
|
|
19
|
+
const qe = Sn ? window : void 0;
|
|
20
|
+
function Ge(e) {
|
|
21
21
|
var t;
|
|
22
|
-
const n =
|
|
22
|
+
const n = E(e);
|
|
23
23
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n =
|
|
27
|
-
const o =
|
|
25
|
+
function Ke(...e) {
|
|
26
|
+
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = $(() => {
|
|
27
|
+
const o = rt(E(e[0])).filter((a) => a != null);
|
|
28
28
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
29
29
|
});
|
|
30
|
-
return
|
|
30
|
+
return Pn(() => {
|
|
31
31
|
var o, a;
|
|
32
32
|
return [
|
|
33
|
-
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => Ge(r))) !== null && o !== void 0 ? o : [qe].filter((r) => r != null),
|
|
34
|
+
rt(E(n.value ? e[1] : e[0])),
|
|
35
|
+
rt(V(n.value ? e[2] : e[1])),
|
|
36
|
+
E(n.value ? e[3] : e[2])
|
|
37
37
|
];
|
|
38
38
|
}, ([o, a, r, s], l, i) => {
|
|
39
39
|
if (!o?.length || !a?.length || !r?.length) return;
|
|
40
|
-
const u =
|
|
40
|
+
const u = Hn(s) ? { ...s } : s, c = o.flatMap((p) => a.flatMap((h) => r.map((b) => t(p, h, b, u))));
|
|
41
41
|
i(() => {
|
|
42
42
|
c.forEach((p) => p());
|
|
43
43
|
});
|
|
44
44
|
}, { flush: "post" });
|
|
45
45
|
}
|
|
46
46
|
// @__NO_SIDE_EFFECTS__
|
|
47
|
-
function
|
|
48
|
-
const e =
|
|
49
|
-
return t &&
|
|
47
|
+
function On() {
|
|
48
|
+
const e = ie(!1), t = gt();
|
|
49
|
+
return t && Ee(() => {
|
|
50
50
|
e.value = !0;
|
|
51
51
|
}, t), e;
|
|
52
52
|
}
|
|
53
53
|
// @__NO_SIDE_EFFECTS__
|
|
54
|
-
function
|
|
55
|
-
const t = /* @__PURE__ */
|
|
56
|
-
return
|
|
54
|
+
function _n(e) {
|
|
55
|
+
const t = /* @__PURE__ */ On();
|
|
56
|
+
return $(() => (t.value, !!e()));
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const { window: o =
|
|
58
|
+
function Bn(e, t, n = {}) {
|
|
59
|
+
const { window: o = qe, ...a } = n;
|
|
60
60
|
let r;
|
|
61
|
-
const s = /* @__PURE__ */
|
|
61
|
+
const s = /* @__PURE__ */ _n(() => o && "MutationObserver" in o), l = () => {
|
|
62
62
|
r && (r.disconnect(), r = void 0);
|
|
63
|
-
}, i =
|
|
64
|
-
const p =
|
|
63
|
+
}, i = oe($(() => {
|
|
64
|
+
const p = rt(E(e)).map(Ge).filter(Rn);
|
|
65
65
|
return new Set(p);
|
|
66
66
|
}), (p) => {
|
|
67
67
|
l(), s.value && p.size && (r = new MutationObserver(t), p.forEach((h) => r.observe(h, a)));
|
|
@@ -71,22 +71,22 @@ function Pn(e, t, n = {}) {
|
|
|
71
71
|
}), u = () => r?.takeRecords(), c = () => {
|
|
72
72
|
i(), l();
|
|
73
73
|
};
|
|
74
|
-
return
|
|
74
|
+
return fn(c), {
|
|
75
75
|
isSupported: s,
|
|
76
76
|
stop: c,
|
|
77
77
|
takeRecords: u
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
const { window: o =
|
|
82
|
-
if (!o || !a) return
|
|
80
|
+
function Fn(e, t, n = {}) {
|
|
81
|
+
const { window: o = qe, document: a = o?.document, flush: r = "sync" } = n;
|
|
82
|
+
if (!o || !a) return Vn;
|
|
83
83
|
let s;
|
|
84
84
|
const l = (c) => {
|
|
85
85
|
s?.(), s = c;
|
|
86
|
-
}, i =
|
|
87
|
-
const c =
|
|
86
|
+
}, i = Oe(() => {
|
|
87
|
+
const c = Ge(e);
|
|
88
88
|
if (c) {
|
|
89
|
-
const { stop: p } =
|
|
89
|
+
const { stop: p } = Bn(a, (h) => {
|
|
90
90
|
h.map((b) => [...b.removedNodes]).flat().some((b) => b === c || b.contains(c)) && t(h);
|
|
91
91
|
}, {
|
|
92
92
|
window: o,
|
|
@@ -98,17 +98,17 @@ function Bn(e, t, n = {}) {
|
|
|
98
98
|
}, { flush: r }), u = () => {
|
|
99
99
|
i(), l();
|
|
100
100
|
};
|
|
101
|
-
return
|
|
101
|
+
return fn(u), u;
|
|
102
102
|
}
|
|
103
103
|
// @__NO_SIDE_EFFECTS__
|
|
104
|
-
function
|
|
104
|
+
function Zn(e = {}) {
|
|
105
105
|
var t;
|
|
106
|
-
const { window: n =
|
|
106
|
+
const { window: n = qe, deep: o = !0, triggerOnRemoval: a = !1 } = e, r = (t = e.document) !== null && t !== void 0 ? t : n?.document, s = () => {
|
|
107
107
|
let u = r?.activeElement;
|
|
108
108
|
if (o)
|
|
109
109
|
for (var c; u?.shadowRoot; ) u = u == null || (c = u.shadowRoot) === null || c === void 0 ? void 0 : c.activeElement;
|
|
110
110
|
return u;
|
|
111
|
-
}, l =
|
|
111
|
+
}, l = ie(), i = () => {
|
|
112
112
|
l.value = s();
|
|
113
113
|
};
|
|
114
114
|
if (n) {
|
|
@@ -116,26 +116,26 @@ function Fn(e = {}) {
|
|
|
116
116
|
capture: !0,
|
|
117
117
|
passive: !0
|
|
118
118
|
};
|
|
119
|
-
|
|
119
|
+
Ke(n, "blur", (c) => {
|
|
120
120
|
c.relatedTarget === null && i();
|
|
121
|
-
}, u),
|
|
121
|
+
}, u), Ke(n, "focus", i, u);
|
|
122
122
|
}
|
|
123
|
-
return a &&
|
|
123
|
+
return a && Fn(l, i, { document: r }), i(), l;
|
|
124
124
|
}
|
|
125
|
-
const
|
|
126
|
-
function
|
|
127
|
-
const { window: n =
|
|
128
|
-
if (!n || !(/* @__PURE__ */
|
|
125
|
+
const Nn = "focusin", Un = "focusout", Wn = ":focus-within";
|
|
126
|
+
function Gn(e, t = {}) {
|
|
127
|
+
const { window: n = qe } = t, o = $(() => Ge(e)), a = ie(!1), r = $(() => a.value);
|
|
128
|
+
if (!n || !(/* @__PURE__ */ Zn(t)).value) return { focused: r };
|
|
129
129
|
const s = { passive: !0 };
|
|
130
|
-
return
|
|
130
|
+
return Ke(o, Nn, () => a.value = !0, s), Ke(o, Un, () => {
|
|
131
131
|
var l, i, u;
|
|
132
132
|
return a.value = (l = (i = o.value) === null || i === void 0 || (u = i.matches) === null || u === void 0 ? void 0 : u.call(i, Wn)) !== null && l !== void 0 ? l : !1;
|
|
133
133
|
}, s), { focused: r };
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
const o =
|
|
135
|
+
function zn(e, { window: t = qe, scrollTarget: n } = {}) {
|
|
136
|
+
const o = L(!1), a = () => {
|
|
137
137
|
if (!t) return;
|
|
138
|
-
const r = t.document, s =
|
|
138
|
+
const r = t.document, s = Ge(e);
|
|
139
139
|
if (!s)
|
|
140
140
|
o.value = !1;
|
|
141
141
|
else {
|
|
@@ -143,22 +143,22 @@ function Gn(e, { window: t = _e, scrollTarget: n } = {}) {
|
|
|
143
143
|
o.value = l.top <= (t.innerHeight || r.documentElement.clientHeight) && l.left <= (t.innerWidth || r.documentElement.clientWidth) && l.bottom >= 0 && l.right >= 0;
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
return
|
|
147
|
-
() =>
|
|
146
|
+
return oe(
|
|
147
|
+
() => Ge(e),
|
|
148
148
|
() => a(),
|
|
149
149
|
{ immediate: !0, flush: "post" }
|
|
150
|
-
), t &&
|
|
150
|
+
), t && Ke(n || t, "scroll", a, {
|
|
151
151
|
capture: !1,
|
|
152
152
|
passive: !0
|
|
153
153
|
}), o;
|
|
154
154
|
}
|
|
155
|
-
const
|
|
156
|
-
let t =
|
|
155
|
+
const Ae = (e) => {
|
|
156
|
+
let t = zn(e).value;
|
|
157
157
|
return t = t && e.offsetHeight > 0, t;
|
|
158
|
-
},
|
|
158
|
+
}, Te = (e) => e.tabIndex >= 0, Wt = (e) => {
|
|
159
159
|
const t = e.target;
|
|
160
|
-
return
|
|
161
|
-
},
|
|
160
|
+
return Lt(t);
|
|
161
|
+
}, Lt = (e) => {
|
|
162
162
|
let t;
|
|
163
163
|
if (e instanceof HTMLTableCellElement) {
|
|
164
164
|
const n = e.parentElement?.previousElementSibling;
|
|
@@ -170,8 +170,8 @@ const ye = (e) => {
|
|
|
170
170
|
const n = e.previousElementSibling;
|
|
171
171
|
n && (t = n);
|
|
172
172
|
}
|
|
173
|
-
return t && (!
|
|
174
|
-
},
|
|
173
|
+
return t && (!Te(t) || !Ae(t)) ? Lt(t) : t;
|
|
174
|
+
}, qn = (e) => {
|
|
175
175
|
const t = e.target;
|
|
176
176
|
let n;
|
|
177
177
|
if (t instanceof HTMLTableCellElement) {
|
|
@@ -187,11 +187,11 @@ const ye = (e) => {
|
|
|
187
187
|
a && (n = a);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
return n && (!
|
|
191
|
-
},
|
|
190
|
+
return n && (!Te(n) || !Ae(n)) ? Ht(n) : n;
|
|
191
|
+
}, Gt = (e) => {
|
|
192
192
|
const t = e.target;
|
|
193
|
-
return
|
|
194
|
-
},
|
|
193
|
+
return Ht(t);
|
|
194
|
+
}, Ht = (e) => {
|
|
195
195
|
let t;
|
|
196
196
|
if (e instanceof HTMLTableCellElement) {
|
|
197
197
|
const n = e.parentElement?.nextElementSibling;
|
|
@@ -203,8 +203,8 @@ const ye = (e) => {
|
|
|
203
203
|
const n = e.nextElementSibling;
|
|
204
204
|
n && (t = n);
|
|
205
205
|
}
|
|
206
|
-
return t && (!
|
|
207
|
-
},
|
|
206
|
+
return t && (!Te(t) || !Ae(t)) ? Ht(t) : t;
|
|
207
|
+
}, Yn = (e) => {
|
|
208
208
|
const t = e.target;
|
|
209
209
|
let n;
|
|
210
210
|
if (t instanceof HTMLTableCellElement) {
|
|
@@ -220,71 +220,71 @@ const ye = (e) => {
|
|
|
220
220
|
a && (n = a);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
return n && (!
|
|
224
|
-
},
|
|
223
|
+
return n && (!Te(n) || !Ae(n)) ? Lt(n) : n;
|
|
224
|
+
}, zt = (e) => {
|
|
225
225
|
const t = e.target;
|
|
226
|
-
return
|
|
227
|
-
},
|
|
226
|
+
return Vt(t);
|
|
227
|
+
}, Vt = (e) => {
|
|
228
228
|
let t;
|
|
229
|
-
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!
|
|
230
|
-
},
|
|
229
|
+
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!Te(t) || !Ae(t)) ? Vt(t) : t;
|
|
230
|
+
}, qt = (e) => {
|
|
231
231
|
const t = e.target;
|
|
232
|
-
return
|
|
233
|
-
},
|
|
232
|
+
return Pt(t);
|
|
233
|
+
}, Pt = (e) => {
|
|
234
234
|
let t;
|
|
235
|
-
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!
|
|
236
|
-
},
|
|
235
|
+
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!Te(t) || !Ae(t)) ? Pt(t) : t;
|
|
236
|
+
}, Yt = (e) => {
|
|
237
237
|
const t = e.target.parentElement?.firstElementChild;
|
|
238
|
-
return t && (!
|
|
239
|
-
},
|
|
238
|
+
return t && (!Te(t) || !Ae(t)) ? Pt(t) : t;
|
|
239
|
+
}, Xt = (e) => {
|
|
240
240
|
const t = e.target.parentElement?.lastElementChild;
|
|
241
|
-
return t && (!
|
|
242
|
-
},
|
|
241
|
+
return t && (!Te(t) || !Ae(t)) ? Vt(t) : t;
|
|
242
|
+
}, ot = ["alt", "control", "shift", "meta"], Xn = {
|
|
243
243
|
ArrowUp: "up",
|
|
244
244
|
ArrowDown: "down",
|
|
245
245
|
ArrowLeft: "left",
|
|
246
246
|
ArrowRight: "right"
|
|
247
|
-
},
|
|
247
|
+
}, wt = {
|
|
248
248
|
"keydown.up": (e) => {
|
|
249
249
|
const t = Wt(e);
|
|
250
250
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
251
251
|
},
|
|
252
252
|
"keydown.down": (e) => {
|
|
253
|
-
const t =
|
|
253
|
+
const t = Gt(e);
|
|
254
254
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
255
255
|
},
|
|
256
256
|
"keydown.left": (e) => {
|
|
257
|
-
const t =
|
|
257
|
+
const t = zt(e);
|
|
258
258
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
259
259
|
},
|
|
260
260
|
"keydown.right": (e) => {
|
|
261
|
-
const t =
|
|
261
|
+
const t = qt(e);
|
|
262
262
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
263
263
|
},
|
|
264
264
|
"keydown.control.up": (e) => {
|
|
265
|
-
const t =
|
|
265
|
+
const t = qn(e);
|
|
266
266
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
267
267
|
},
|
|
268
268
|
"keydown.control.down": (e) => {
|
|
269
|
-
const t =
|
|
269
|
+
const t = Yn(e);
|
|
270
270
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
271
271
|
},
|
|
272
272
|
"keydown.control.left": (e) => {
|
|
273
|
-
const t =
|
|
273
|
+
const t = Yt(e);
|
|
274
274
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
275
275
|
},
|
|
276
276
|
"keydown.control.right": (e) => {
|
|
277
|
-
const t =
|
|
277
|
+
const t = Xt(e);
|
|
278
278
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
279
279
|
},
|
|
280
280
|
"keydown.end": (e) => {
|
|
281
|
-
const t =
|
|
281
|
+
const t = Xt(e);
|
|
282
282
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
283
283
|
},
|
|
284
284
|
"keydown.enter": (e) => {
|
|
285
285
|
if (e.target instanceof HTMLTableCellElement) {
|
|
286
286
|
e.preventDefault(), e.stopPropagation();
|
|
287
|
-
const t =
|
|
287
|
+
const t = Gt(e);
|
|
288
288
|
t && t.focus();
|
|
289
289
|
}
|
|
290
290
|
},
|
|
@@ -296,19 +296,19 @@ const ye = (e) => {
|
|
|
296
296
|
}
|
|
297
297
|
},
|
|
298
298
|
"keydown.home": (e) => {
|
|
299
|
-
const t =
|
|
299
|
+
const t = Yt(e);
|
|
300
300
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
301
301
|
},
|
|
302
302
|
"keydown.tab": (e) => {
|
|
303
|
-
const t =
|
|
303
|
+
const t = qt(e);
|
|
304
304
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
305
305
|
},
|
|
306
306
|
"keydown.shift.tab": (e) => {
|
|
307
|
-
const t =
|
|
307
|
+
const t = zt(e);
|
|
308
308
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
|
-
function
|
|
311
|
+
function Ot(e) {
|
|
312
312
|
const t = (s) => {
|
|
313
313
|
let l = null;
|
|
314
314
|
return s.parent && (typeof s.parent == "string" ? l = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? l = s.parent : l = s.parent.value), l;
|
|
@@ -332,23 +332,23 @@ function Vt(e) {
|
|
|
332
332
|
}, o = (s) => {
|
|
333
333
|
const l = t(s);
|
|
334
334
|
let i = [];
|
|
335
|
-
return s.selectors ? i = n(s) : l && (i = Array.from(l.children).filter((u) =>
|
|
335
|
+
return s.selectors ? i = n(s) : l && (i = Array.from(l.children).filter((u) => Te(u) && Ae(u))), i;
|
|
336
336
|
}, a = (s) => (l) => {
|
|
337
|
-
const i =
|
|
338
|
-
if (
|
|
339
|
-
const u = s.handlers ||
|
|
337
|
+
const i = Xn[l.key] || l.key.toLowerCase();
|
|
338
|
+
if (ot.includes(i)) return;
|
|
339
|
+
const u = s.handlers || wt;
|
|
340
340
|
for (const c of Object.keys(u)) {
|
|
341
341
|
const [p, ...h] = c.split(".");
|
|
342
342
|
if (p === "keydown" && h.includes(i)) {
|
|
343
|
-
const b = u[c],
|
|
344
|
-
const m =
|
|
343
|
+
const b = u[c], I = h.filter((f) => ot.includes(f)), x = ot.some((f) => {
|
|
344
|
+
const m = f.charAt(0).toUpperCase() + f.slice(1);
|
|
345
345
|
return l.getModifierState(m);
|
|
346
346
|
});
|
|
347
|
-
if (
|
|
347
|
+
if (I.length > 0) {
|
|
348
348
|
if (x) {
|
|
349
|
-
for (const
|
|
350
|
-
if (h.includes(
|
|
351
|
-
const m =
|
|
349
|
+
for (const f of ot)
|
|
350
|
+
if (h.includes(f)) {
|
|
351
|
+
const m = f.charAt(0).toUpperCase() + f.slice(1);
|
|
352
352
|
l.getModifierState(m) && b(l);
|
|
353
353
|
}
|
|
354
354
|
}
|
|
@@ -357,37 +357,37 @@ function Vt(e) {
|
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
}, r = [];
|
|
360
|
-
|
|
360
|
+
Ee(() => {
|
|
361
361
|
for (const s of e) {
|
|
362
362
|
const l = t(s), i = o(s), u = a(s), c = l ? [l] : i;
|
|
363
363
|
for (const p of c) {
|
|
364
|
-
const { focused: h } =
|
|
365
|
-
|
|
364
|
+
const { focused: h } = Gn(L(p)), b = oe(h, (I) => {
|
|
365
|
+
I ? p.addEventListener("keydown", u) : p.removeEventListener("keydown", u);
|
|
366
366
|
});
|
|
367
367
|
r.push(b);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
}),
|
|
370
|
+
}), sn(() => {
|
|
371
371
|
for (const s of r)
|
|
372
372
|
s();
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
return
|
|
375
|
+
function _t(e, t) {
|
|
376
|
+
return mt() ? (ht(e, t), !0) : !1;
|
|
377
377
|
}
|
|
378
378
|
const vn = typeof window < "u" && typeof document < "u";
|
|
379
379
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
380
|
-
const
|
|
380
|
+
const jn = (e) => e != null, Jn = Object.prototype.toString, Qn = (e) => Jn.call(e) === "[object Object]", _e = () => {
|
|
381
381
|
};
|
|
382
382
|
function Kn(...e) {
|
|
383
|
-
if (e.length !== 1) return
|
|
383
|
+
if (e.length !== 1) return cn(...e);
|
|
384
384
|
const t = e[0];
|
|
385
|
-
return typeof t == "function" ? St(
|
|
385
|
+
return typeof t == "function" ? Rt(St(() => ({
|
|
386
386
|
get: t,
|
|
387
|
-
set:
|
|
388
|
-
}))) :
|
|
387
|
+
set: _e
|
|
388
|
+
}))) : L(t);
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function eo(e, t) {
|
|
391
391
|
function n(...o) {
|
|
392
392
|
return new Promise((a, r) => {
|
|
393
393
|
Promise.resolve(e(() => t.apply(this, o), {
|
|
@@ -399,14 +399,14 @@ function Qn(e, t) {
|
|
|
399
399
|
}
|
|
400
400
|
return n;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
let n, o, a =
|
|
402
|
+
function to(e, t = {}) {
|
|
403
|
+
let n, o, a = _e;
|
|
404
404
|
const r = (l) => {
|
|
405
|
-
clearTimeout(l), a(), a =
|
|
405
|
+
clearTimeout(l), a(), a = _e;
|
|
406
406
|
};
|
|
407
407
|
let s;
|
|
408
408
|
return (l) => {
|
|
409
|
-
const i =
|
|
409
|
+
const i = E(e), u = E(t.maxWait);
|
|
410
410
|
return n && r(n), i <= 0 || u !== void 0 && u <= 0 ? (o && (r(o), o = void 0), Promise.resolve(l())) : new Promise((c, p) => {
|
|
411
411
|
a = t.rejectOnCancel ? p : c, s = l, u && !o && (o = setTimeout(() => {
|
|
412
412
|
n && r(n), o = void 0, c(s());
|
|
@@ -416,26 +416,26 @@ function eo(e, t = {}) {
|
|
|
416
416
|
});
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function it(e) {
|
|
420
420
|
return Array.isArray(e) ? e : [e];
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
422
|
+
function no(e) {
|
|
423
|
+
return gt();
|
|
424
424
|
}
|
|
425
425
|
// @__NO_SIDE_EFFECTS__
|
|
426
|
-
function
|
|
427
|
-
return
|
|
426
|
+
function oo(e, t = 200, n = {}) {
|
|
427
|
+
return eo(to(t, n), e);
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
if (!
|
|
429
|
+
function lo(e, t = {}) {
|
|
430
|
+
if (!Tn(e)) return $n(e);
|
|
431
431
|
const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
432
|
-
for (const o in e.value) n[o] =
|
|
432
|
+
for (const o in e.value) n[o] = St(() => ({
|
|
433
433
|
get() {
|
|
434
434
|
return e.value[o];
|
|
435
435
|
},
|
|
436
436
|
set(a) {
|
|
437
437
|
var r;
|
|
438
|
-
if (!((r =
|
|
438
|
+
if (!((r = E(t.replaceRef)) !== null && r !== void 0) || r) if (Array.isArray(e.value)) {
|
|
439
439
|
const s = [...e.value];
|
|
440
440
|
s[o] = a, e.value = s;
|
|
441
441
|
} else {
|
|
@@ -450,126 +450,126 @@ function oo(e, t = {}) {
|
|
|
450
450
|
}));
|
|
451
451
|
return n;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
|
|
453
|
+
function ao(e, t = !0, n) {
|
|
454
|
+
no() ? Ee(e, n) : t ? e() : pt(e);
|
|
455
455
|
}
|
|
456
|
-
function
|
|
457
|
-
return
|
|
456
|
+
function so(e, t, n) {
|
|
457
|
+
return oe(e, t, {
|
|
458
458
|
...n,
|
|
459
459
|
immediate: !0
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
|
-
const
|
|
463
|
-
function
|
|
462
|
+
const tt = vn ? window : void 0;
|
|
463
|
+
function ye(e) {
|
|
464
464
|
var t;
|
|
465
|
-
const n =
|
|
465
|
+
const n = E(e);
|
|
466
466
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n =
|
|
470
|
-
const o =
|
|
468
|
+
function He(...e) {
|
|
469
|
+
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = $(() => {
|
|
470
|
+
const o = it(E(e[0])).filter((a) => a != null);
|
|
471
471
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
472
472
|
});
|
|
473
|
-
return
|
|
473
|
+
return so(() => {
|
|
474
474
|
var o, a;
|
|
475
475
|
return [
|
|
476
|
-
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) =>
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
476
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => ye(r))) !== null && o !== void 0 ? o : [tt].filter((r) => r != null),
|
|
477
|
+
it(E(n.value ? e[1] : e[0])),
|
|
478
|
+
it(V(n.value ? e[2] : e[1])),
|
|
479
|
+
E(n.value ? e[3] : e[2])
|
|
480
480
|
];
|
|
481
481
|
}, ([o, a, r, s], l, i) => {
|
|
482
482
|
if (!o?.length || !a?.length || !r?.length) return;
|
|
483
|
-
const u =
|
|
483
|
+
const u = Qn(s) ? { ...s } : s, c = o.flatMap((p) => a.flatMap((h) => r.map((b) => t(p, h, b, u))));
|
|
484
484
|
i(() => {
|
|
485
485
|
c.forEach((p) => p());
|
|
486
486
|
});
|
|
487
487
|
}, { flush: "post" });
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
const { window: o =
|
|
489
|
+
function $t(e, t, n = {}) {
|
|
490
|
+
const { window: o = tt, ignore: a = [], capture: r = !0, detectIframe: s = !1, controls: l = !1 } = n;
|
|
491
491
|
if (!o) return l ? {
|
|
492
|
-
stop:
|
|
493
|
-
cancel:
|
|
494
|
-
trigger:
|
|
495
|
-
} :
|
|
492
|
+
stop: _e,
|
|
493
|
+
cancel: _e,
|
|
494
|
+
trigger: _e
|
|
495
|
+
} : _e;
|
|
496
496
|
let i = !0;
|
|
497
|
-
const u = (
|
|
498
|
-
if (typeof m == "string") return Array.from(o.document.querySelectorAll(m)).some((g) => g ===
|
|
497
|
+
const u = (f) => E(a).some((m) => {
|
|
498
|
+
if (typeof m == "string") return Array.from(o.document.querySelectorAll(m)).some((g) => g === f.target || f.composedPath().includes(g));
|
|
499
499
|
{
|
|
500
|
-
const g =
|
|
501
|
-
return g && (
|
|
500
|
+
const g = ye(m);
|
|
501
|
+
return g && (f.target === g || f.composedPath().includes(g));
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
|
-
function c(
|
|
505
|
-
const m =
|
|
504
|
+
function c(f) {
|
|
505
|
+
const m = E(f);
|
|
506
506
|
return m && m.$.subTree.shapeFlag === 16;
|
|
507
507
|
}
|
|
508
|
-
function p(
|
|
509
|
-
const g =
|
|
510
|
-
return
|
|
508
|
+
function p(f, m) {
|
|
509
|
+
const g = E(f), C = g.$.subTree && g.$.subTree.children;
|
|
510
|
+
return C == null || !Array.isArray(C) ? !1 : C.some((T) => T.el === m.target || m.composedPath().includes(T.el));
|
|
511
511
|
}
|
|
512
|
-
const h = (
|
|
513
|
-
const m =
|
|
514
|
-
if (
|
|
515
|
-
if ("detail" in
|
|
512
|
+
const h = (f) => {
|
|
513
|
+
const m = ye(e);
|
|
514
|
+
if (f.target != null && !(!(m instanceof Element) && c(e) && p(e, f)) && !(!m || m === f.target || f.composedPath().includes(m))) {
|
|
515
|
+
if ("detail" in f && f.detail === 0 && (i = !u(f)), !i) {
|
|
516
516
|
i = !0;
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
|
-
t(
|
|
519
|
+
t(f);
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
522
|
let b = !1;
|
|
523
|
-
const
|
|
524
|
-
|
|
523
|
+
const I = [
|
|
524
|
+
He(o, "click", (f) => {
|
|
525
525
|
b || (b = !0, setTimeout(() => {
|
|
526
526
|
b = !1;
|
|
527
|
-
}, 0), h(
|
|
527
|
+
}, 0), h(f));
|
|
528
528
|
}, {
|
|
529
529
|
passive: !0,
|
|
530
530
|
capture: r
|
|
531
531
|
}),
|
|
532
|
-
|
|
533
|
-
const m =
|
|
534
|
-
i = !u(
|
|
532
|
+
He(o, "pointerdown", (f) => {
|
|
533
|
+
const m = ye(e);
|
|
534
|
+
i = !u(f) && !!(m && !f.composedPath().includes(m));
|
|
535
535
|
}, { passive: !0 }),
|
|
536
|
-
s &&
|
|
536
|
+
s && He(o, "blur", (f) => {
|
|
537
537
|
setTimeout(() => {
|
|
538
538
|
var m;
|
|
539
|
-
const g =
|
|
540
|
-
((m = o.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !g?.contains(o.document.activeElement) && t(
|
|
539
|
+
const g = ye(e);
|
|
540
|
+
((m = o.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !g?.contains(o.document.activeElement) && t(f);
|
|
541
541
|
}, 0);
|
|
542
542
|
}, { passive: !0 })
|
|
543
|
-
].filter(Boolean), x = () =>
|
|
543
|
+
].filter(Boolean), x = () => I.forEach((f) => f());
|
|
544
544
|
return l ? {
|
|
545
545
|
stop: x,
|
|
546
546
|
cancel: () => {
|
|
547
547
|
i = !1;
|
|
548
548
|
},
|
|
549
|
-
trigger: (
|
|
550
|
-
i = !0, h(
|
|
549
|
+
trigger: (f) => {
|
|
550
|
+
i = !0, h(f), i = !1;
|
|
551
551
|
}
|
|
552
552
|
} : x;
|
|
553
553
|
}
|
|
554
554
|
// @__NO_SIDE_EFFECTS__
|
|
555
|
-
function
|
|
556
|
-
const e =
|
|
557
|
-
return t &&
|
|
555
|
+
function ro() {
|
|
556
|
+
const e = ie(!1), t = gt();
|
|
557
|
+
return t && Ee(() => {
|
|
558
558
|
e.value = !0;
|
|
559
559
|
}, t), e;
|
|
560
560
|
}
|
|
561
561
|
// @__NO_SIDE_EFFECTS__
|
|
562
|
-
function
|
|
563
|
-
const t = /* @__PURE__ */
|
|
564
|
-
return
|
|
562
|
+
function pn(e) {
|
|
563
|
+
const t = /* @__PURE__ */ ro();
|
|
564
|
+
return $(() => (t.value, !!e()));
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
const { window: o =
|
|
566
|
+
function mn(e, t, n = {}) {
|
|
567
|
+
const { window: o = tt, ...a } = n;
|
|
568
568
|
let r;
|
|
569
|
-
const s = /* @__PURE__ */
|
|
569
|
+
const s = /* @__PURE__ */ pn(() => o && "MutationObserver" in o), l = () => {
|
|
570
570
|
r && (r.disconnect(), r = void 0);
|
|
571
|
-
}, i =
|
|
572
|
-
const p =
|
|
571
|
+
}, i = oe($(() => {
|
|
572
|
+
const p = it(E(e)).map(ye).filter(jn);
|
|
573
573
|
return new Set(p);
|
|
574
574
|
}), (p) => {
|
|
575
575
|
l(), s.value && p.size && (r = new MutationObserver(t), p.forEach((h) => r.observe(h, a)));
|
|
@@ -579,63 +579,129 @@ function pn(e, t, n = {}) {
|
|
|
579
579
|
}), u = () => r?.takeRecords(), c = () => {
|
|
580
580
|
i(), l();
|
|
581
581
|
};
|
|
582
|
-
return
|
|
582
|
+
return _t(c), {
|
|
583
583
|
isSupported: s,
|
|
584
584
|
stop: c,
|
|
585
585
|
takeRecords: u
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
588
|
+
const lt = {
|
|
589
|
+
speed: 2,
|
|
590
|
+
margin: 30,
|
|
591
|
+
direction: "both"
|
|
592
|
+
};
|
|
593
|
+
function io(e) {
|
|
594
|
+
e.scrollLeft > e.scrollWidth - e.clientWidth && (e.scrollLeft = Math.max(0, e.scrollWidth - e.clientWidth)), e.scrollTop > e.scrollHeight - e.clientHeight && (e.scrollTop = Math.max(0, e.scrollHeight - e.clientHeight));
|
|
595
|
+
}
|
|
596
|
+
function yt(e, t = {}) {
|
|
597
|
+
var n, o, a, r;
|
|
598
|
+
const { pointerTypes: s, preventDefault: l, stopPropagation: i, exact: u, onMove: c, onEnd: p, onStart: h, initialValue: b, axis: I = "both", draggingElement: x = tt, containerElement: f, handle: m = e, buttons: g = [0], restrictInView: C, autoScroll: T = !1 } = t, R = L((n = E(b)) !== null && n !== void 0 ? n : {
|
|
591
599
|
x: 0,
|
|
592
600
|
y: 0
|
|
593
|
-
}),
|
|
594
|
-
|
|
595
|
-
},
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
+
}), S = L(), _ = (D) => s ? s.includes(D.pointerType) : !0, U = (D) => {
|
|
602
|
+
E(l) && D.preventDefault(), E(i) && D.stopPropagation();
|
|
603
|
+
}, ve = E(T), Y = typeof ve == "object" ? {
|
|
604
|
+
speed: (o = E(ve.speed)) !== null && o !== void 0 ? o : lt.speed,
|
|
605
|
+
margin: (a = E(ve.margin)) !== null && a !== void 0 ? a : lt.margin,
|
|
606
|
+
direction: (r = ve.direction) !== null && r !== void 0 ? r : lt.direction
|
|
607
|
+
} : lt, X = (D) => typeof D == "number" ? [D, D] : [D.x, D.y], ge = (D, F, W) => {
|
|
608
|
+
const { clientWidth: j, clientHeight: z, scrollLeft: se, scrollTop: be, scrollWidth: Le, scrollHeight: O } = D, [B, G] = X(Y.margin), [Q, ne] = X(Y.speed);
|
|
609
|
+
let ee = 0, re = 0;
|
|
610
|
+
(Y.direction === "x" || Y.direction === "both") && (W.x < B && se > 0 ? ee = -Q : W.x + F.width > j - B && se < Le - j && (ee = Q)), (Y.direction === "y" || Y.direction === "both") && (W.y < G && be > 0 ? re = -ne : W.y + F.height > z - G && be < O - z && (re = ne)), (ee || re) && D.scrollBy({
|
|
611
|
+
left: ee,
|
|
612
|
+
top: re,
|
|
613
|
+
behavior: "auto"
|
|
614
|
+
});
|
|
615
|
+
};
|
|
616
|
+
let de = null;
|
|
617
|
+
const Be = () => {
|
|
618
|
+
const D = E(f);
|
|
619
|
+
D && !de && (de = setInterval(() => {
|
|
620
|
+
const F = E(e).getBoundingClientRect(), { x: W, y: j } = R.value, z = {
|
|
621
|
+
x: W - D.scrollLeft,
|
|
622
|
+
y: j - D.scrollTop
|
|
623
|
+
};
|
|
624
|
+
z.x >= 0 && z.y >= 0 && (ge(D, F, z), z.x += D.scrollLeft, z.y += D.scrollTop, R.value = z);
|
|
625
|
+
}, 1e3 / 60));
|
|
626
|
+
}, Re = () => {
|
|
627
|
+
de && (clearInterval(de), de = null);
|
|
628
|
+
}, Xe = (D, F, W, j) => {
|
|
629
|
+
const [z, se] = typeof W == "number" ? [W, W] : [W.x, W.y], { clientWidth: be, clientHeight: Le } = F;
|
|
630
|
+
return D.x < z || D.x + j.width > be - z || D.y < se || D.y + j.height > Le - se;
|
|
631
|
+
}, je = () => {
|
|
632
|
+
if (E(t.disabled) || !S.value) return;
|
|
633
|
+
const D = E(f);
|
|
634
|
+
if (!D) return;
|
|
635
|
+
const F = E(e).getBoundingClientRect(), { x: W, y: j } = R.value;
|
|
636
|
+
Xe({
|
|
637
|
+
x: W - D.scrollLeft,
|
|
638
|
+
y: j - D.scrollTop
|
|
639
|
+
}, D, Y.margin, F) ? Be() : Re();
|
|
640
|
+
};
|
|
641
|
+
E(T) && oe(R, je);
|
|
642
|
+
const Fe = (D) => {
|
|
643
|
+
var F;
|
|
644
|
+
if (!E(g).includes(D.button) || E(t.disabled) || !_(D) || E(u) && D.target !== E(e)) return;
|
|
645
|
+
const W = E(f), j = W == null || (F = W.getBoundingClientRect) === null || F === void 0 ? void 0 : F.call(W), z = E(e).getBoundingClientRect(), se = {
|
|
646
|
+
x: D.clientX - (W ? z.left - j.left + (T ? 0 : W.scrollLeft) : z.left),
|
|
647
|
+
y: D.clientY - (W ? z.top - j.top + (T ? 0 : W.scrollTop) : z.top)
|
|
601
648
|
};
|
|
602
|
-
|
|
603
|
-
},
|
|
604
|
-
if (
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
649
|
+
h?.(se, D) !== !1 && (S.value = se, U(D));
|
|
650
|
+
}, Je = (D) => {
|
|
651
|
+
if (E(t.disabled) || !_(D) || !S.value) return;
|
|
652
|
+
const F = E(f);
|
|
653
|
+
F instanceof HTMLElement && io(F);
|
|
654
|
+
const W = E(e).getBoundingClientRect();
|
|
655
|
+
let { x: j, y: z } = R.value;
|
|
656
|
+
if ((I === "x" || I === "both") && (j = D.clientX - S.value.x, F && (j = Math.min(Math.max(0, j), F.scrollWidth - W.width))), (I === "y" || I === "both") && (z = D.clientY - S.value.y, F && (z = Math.min(Math.max(0, z), F.scrollHeight - W.height))), E(T) && F && (de === null && ge(F, W, {
|
|
657
|
+
x: j,
|
|
658
|
+
y: z
|
|
659
|
+
}), j += F.scrollLeft, z += F.scrollTop), F && (C || T)) {
|
|
660
|
+
if (I !== "y") {
|
|
661
|
+
const se = j - F.scrollLeft;
|
|
662
|
+
se < 0 ? j = F.scrollLeft : se > F.clientWidth - W.width && (j = F.clientWidth - W.width + F.scrollLeft);
|
|
663
|
+
}
|
|
664
|
+
if (I !== "x") {
|
|
665
|
+
const se = z - F.scrollTop;
|
|
666
|
+
se < 0 ? z = F.scrollTop : se > F.clientHeight - W.height && (z = F.clientHeight - W.height + F.scrollTop);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
R.value = {
|
|
670
|
+
x: j,
|
|
671
|
+
y: z
|
|
672
|
+
}, c?.(R.value, D), U(D);
|
|
673
|
+
}, Ze = (D) => {
|
|
674
|
+
E(t.disabled) || !_(D) || S.value && (S.value = void 0, T && Re(), p?.(R.value, D), U(D));
|
|
613
675
|
};
|
|
614
676
|
if (vn) {
|
|
615
|
-
const
|
|
616
|
-
var
|
|
677
|
+
const D = () => {
|
|
678
|
+
var F;
|
|
617
679
|
return {
|
|
618
|
-
capture: (
|
|
619
|
-
passive:
|
|
680
|
+
capture: (F = t.capture) !== null && F !== void 0 ? F : !0,
|
|
681
|
+
passive: !E(l)
|
|
620
682
|
};
|
|
621
683
|
};
|
|
622
|
-
|
|
684
|
+
He(m, "pointerdown", Fe, D), He(x, "pointermove", Je, D), He(x, "pointerup", Ze, D);
|
|
623
685
|
}
|
|
624
686
|
return {
|
|
625
|
-
...
|
|
626
|
-
position:
|
|
627
|
-
isDragging:
|
|
628
|
-
style:
|
|
687
|
+
...lo(R),
|
|
688
|
+
position: R,
|
|
689
|
+
isDragging: $(() => !!S.value),
|
|
690
|
+
style: $(() => `
|
|
691
|
+
left: ${R.value.x}px;
|
|
692
|
+
top: ${R.value.y}px;
|
|
693
|
+
${T ? "text-wrap: nowrap;" : ""}
|
|
694
|
+
`)
|
|
629
695
|
};
|
|
630
696
|
}
|
|
631
|
-
function
|
|
632
|
-
const { window: o =
|
|
697
|
+
function ft(e, t, n = {}) {
|
|
698
|
+
const { window: o = tt, ...a } = n;
|
|
633
699
|
let r;
|
|
634
|
-
const s = /* @__PURE__ */
|
|
700
|
+
const s = /* @__PURE__ */ pn(() => o && "ResizeObserver" in o), l = () => {
|
|
635
701
|
r && (r.disconnect(), r = void 0);
|
|
636
|
-
}, i =
|
|
637
|
-
const c =
|
|
638
|
-
return Array.isArray(c) ? c.map((p) =>
|
|
702
|
+
}, i = oe($(() => {
|
|
703
|
+
const c = E(e);
|
|
704
|
+
return Array.isArray(c) ? c.map((p) => ye(p)) : [ye(c)];
|
|
639
705
|
}), (c) => {
|
|
640
706
|
if (l(), s.value && o) {
|
|
641
707
|
r = new ResizeObserver(t);
|
|
@@ -647,30 +713,30 @@ function lt(e, t, n = {}) {
|
|
|
647
713
|
}), u = () => {
|
|
648
714
|
l(), i();
|
|
649
715
|
};
|
|
650
|
-
return
|
|
716
|
+
return _t(u), {
|
|
651
717
|
isSupported: s,
|
|
652
718
|
stop: u
|
|
653
719
|
};
|
|
654
720
|
}
|
|
655
|
-
function
|
|
656
|
-
const { reset: n = !0, windowResize: o = !0, windowScroll: a = !0, immediate: r = !0, updateTiming: s = "sync" } = t, l =
|
|
721
|
+
function Pe(e, t = {}) {
|
|
722
|
+
const { reset: n = !0, windowResize: o = !0, windowScroll: a = !0, immediate: r = !0, updateTiming: s = "sync" } = t, l = ie(0), i = ie(0), u = ie(0), c = ie(0), p = ie(0), h = ie(0), b = ie(0), I = ie(0);
|
|
657
723
|
function x() {
|
|
658
|
-
const m =
|
|
724
|
+
const m = ye(e);
|
|
659
725
|
if (!m) {
|
|
660
|
-
n && (l.value = 0, i.value = 0, u.value = 0, c.value = 0, p.value = 0, h.value = 0, b.value = 0,
|
|
726
|
+
n && (l.value = 0, i.value = 0, u.value = 0, c.value = 0, p.value = 0, h.value = 0, b.value = 0, I.value = 0);
|
|
661
727
|
return;
|
|
662
728
|
}
|
|
663
729
|
const g = m.getBoundingClientRect();
|
|
664
|
-
l.value = g.height, i.value = g.bottom, u.value = g.left, c.value = g.right, p.value = g.top, h.value = g.width, b.value = g.x,
|
|
730
|
+
l.value = g.height, i.value = g.bottom, u.value = g.left, c.value = g.right, p.value = g.top, h.value = g.width, b.value = g.x, I.value = g.y;
|
|
665
731
|
}
|
|
666
|
-
function
|
|
732
|
+
function f() {
|
|
667
733
|
s === "sync" ? x() : s === "next-frame" && requestAnimationFrame(() => x());
|
|
668
734
|
}
|
|
669
|
-
return
|
|
735
|
+
return ft(e, f), oe(() => ye(e), (m) => !m && f()), mn(e, f, { attributeFilter: ["style", "class"] }), a && He("scroll", f, {
|
|
670
736
|
capture: !0,
|
|
671
737
|
passive: !0
|
|
672
|
-
}), o &&
|
|
673
|
-
r &&
|
|
738
|
+
}), o && He("resize", f, { passive: !0 }), ao(() => {
|
|
739
|
+
r && f();
|
|
674
740
|
}), {
|
|
675
741
|
height: l,
|
|
676
742
|
bottom: i,
|
|
@@ -679,33 +745,33 @@ function Ae(e, t = {}) {
|
|
|
679
745
|
top: p,
|
|
680
746
|
width: h,
|
|
681
747
|
x: b,
|
|
682
|
-
y:
|
|
683
|
-
update:
|
|
748
|
+
y: I,
|
|
749
|
+
update: f
|
|
684
750
|
};
|
|
685
751
|
}
|
|
686
|
-
function
|
|
752
|
+
function xt(e) {
|
|
687
753
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
688
754
|
}
|
|
689
|
-
const
|
|
690
|
-
function
|
|
691
|
-
const n =
|
|
755
|
+
const bt = /* @__PURE__ */ new WeakMap();
|
|
756
|
+
function uo(e, t = !1) {
|
|
757
|
+
const n = ie(t);
|
|
692
758
|
let o = "";
|
|
693
|
-
|
|
694
|
-
const l =
|
|
759
|
+
oe(Kn(e), (s) => {
|
|
760
|
+
const l = xt(E(s));
|
|
695
761
|
if (l) {
|
|
696
762
|
const i = l;
|
|
697
|
-
if (
|
|
763
|
+
if (bt.get(i) || bt.set(i, i.style.overflow), i.style.overflow !== "hidden" && (o = i.style.overflow), i.style.overflow === "hidden") return n.value = !0;
|
|
698
764
|
if (n.value) return i.style.overflow = "hidden";
|
|
699
765
|
}
|
|
700
766
|
}, { immediate: !0 });
|
|
701
767
|
const a = () => {
|
|
702
|
-
const s =
|
|
768
|
+
const s = xt(E(e));
|
|
703
769
|
!s || n.value || (s.style.overflow = "hidden", n.value = !0);
|
|
704
770
|
}, r = () => {
|
|
705
|
-
const s =
|
|
706
|
-
!s || !n.value || (s.style.overflow = o,
|
|
771
|
+
const s = xt(E(e));
|
|
772
|
+
!s || !n.value || (s.style.overflow = o, bt.delete(s), n.value = !1);
|
|
707
773
|
};
|
|
708
|
-
return
|
|
774
|
+
return _t(r), $({
|
|
709
775
|
get() {
|
|
710
776
|
return n.value;
|
|
711
777
|
},
|
|
@@ -714,10 +780,10 @@ function ro(e, t = !1) {
|
|
|
714
780
|
}
|
|
715
781
|
});
|
|
716
782
|
}
|
|
717
|
-
const
|
|
783
|
+
const co = (e) => {
|
|
718
784
|
const t = new DOMParser().parseFromString(e, "text/html");
|
|
719
785
|
return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
|
|
720
|
-
},
|
|
786
|
+
}, fo = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), vo = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], po = ["innerHTML"], mo = { key: 2 }, ho = /* @__PURE__ */ te({
|
|
721
787
|
__name: "ACell",
|
|
722
788
|
props: {
|
|
723
789
|
colIndex: {},
|
|
@@ -729,146 +795,146 @@ const io = (e) => {
|
|
|
729
795
|
debounce: { default: 300 }
|
|
730
796
|
},
|
|
731
797
|
setup(e, { expose: t }) {
|
|
732
|
-
const n =
|
|
798
|
+
const n = fe("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), a = L(""), r = L(!1), s = e.store.columns[e.colIndex], l = e.store.rows[e.rowIndex], i = s.align || "center", u = s.width || "40ch", c = $(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), p = $(() => typeof c.value == "string" ? co(c.value) : !1), h = $(() => ({
|
|
733
799
|
textAlign: i,
|
|
734
800
|
width: u,
|
|
735
801
|
fontWeight: r.value ? "bold" : "inherit",
|
|
736
802
|
paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
|
|
737
|
-
})), b =
|
|
803
|
+
})), b = $(() => ({
|
|
738
804
|
"sticky-column": e.pinned,
|
|
739
805
|
"cell-modified": r.value
|
|
740
|
-
})),
|
|
741
|
-
|
|
806
|
+
})), I = () => {
|
|
807
|
+
f(), x();
|
|
742
808
|
}, x = () => {
|
|
743
|
-
const { left:
|
|
744
|
-
s.mask, s.modalComponent && e.store.$patch((
|
|
745
|
-
|
|
809
|
+
const { left: S, bottom: _, width: U, height: ve } = Pe(n);
|
|
810
|
+
s.mask, s.modalComponent && e.store.$patch((Y) => {
|
|
811
|
+
Y.modal.visible = !0, Y.modal.colIndex = e.colIndex, Y.modal.rowIndex = e.rowIndex, Y.modal.left = S, Y.modal.bottom = _, Y.modal.width = U, Y.modal.height = ve, Y.modal.cell = n.value, typeof s.modalComponent == "function" ? Y.modal.component = s.modalComponent({ table: Y.table, row: l, column: s }) : Y.modal.component = s.modalComponent, Y.modal.componentProps = s.modalComponentExtraProps;
|
|
746
812
|
});
|
|
747
813
|
};
|
|
748
814
|
if (e.addNavigation) {
|
|
749
|
-
let
|
|
750
|
-
...
|
|
815
|
+
let S = {
|
|
816
|
+
...wt,
|
|
751
817
|
"keydown.f2": x,
|
|
752
818
|
"keydown.alt.up": x,
|
|
753
819
|
"keydown.alt.down": x,
|
|
754
820
|
"keydown.alt.left": x,
|
|
755
821
|
"keydown.alt.right": x
|
|
756
822
|
};
|
|
757
|
-
typeof e.addNavigation == "object" && (
|
|
758
|
-
...
|
|
823
|
+
typeof e.addNavigation == "object" && (S = {
|
|
824
|
+
...S,
|
|
759
825
|
...e.addNavigation
|
|
760
|
-
}),
|
|
826
|
+
}), Ot([
|
|
761
827
|
{
|
|
762
828
|
selectors: n,
|
|
763
|
-
handlers:
|
|
829
|
+
handlers: S
|
|
764
830
|
}
|
|
765
831
|
]);
|
|
766
832
|
}
|
|
767
|
-
const
|
|
833
|
+
const f = () => {
|
|
768
834
|
if (n.value && s.edit) {
|
|
769
|
-
const
|
|
770
|
-
if (
|
|
835
|
+
const S = window.getSelection();
|
|
836
|
+
if (S)
|
|
771
837
|
try {
|
|
772
|
-
const
|
|
773
|
-
|
|
838
|
+
const _ = document.createRange();
|
|
839
|
+
_.selectNodeContents && (_.selectNodeContents(n.value), S.removeAllRanges(), S.addRange(_));
|
|
774
840
|
} catch {
|
|
775
841
|
}
|
|
776
842
|
}
|
|
777
843
|
}, m = () => {
|
|
778
|
-
n.value && (a.value = n.value.textContent,
|
|
844
|
+
n.value && (a.value = n.value.textContent, f());
|
|
779
845
|
}, g = () => {
|
|
780
846
|
try {
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
const
|
|
784
|
-
if (
|
|
785
|
-
return
|
|
847
|
+
const S = window.getSelection();
|
|
848
|
+
if (S && S.rangeCount > 0 && n.value) {
|
|
849
|
+
const _ = S.getRangeAt(0), U = _.cloneRange();
|
|
850
|
+
if (U.selectNodeContents && U.setEnd)
|
|
851
|
+
return U.selectNodeContents(n.value), U.setEnd(_.endContainer, _.endOffset), U.toString().length;
|
|
786
852
|
}
|
|
787
853
|
} catch {
|
|
788
854
|
}
|
|
789
855
|
return 0;
|
|
790
|
-
},
|
|
856
|
+
}, C = (S) => {
|
|
791
857
|
if (n.value)
|
|
792
858
|
try {
|
|
793
|
-
const
|
|
794
|
-
if (!
|
|
795
|
-
let
|
|
796
|
-
const
|
|
797
|
-
if (!
|
|
798
|
-
let
|
|
799
|
-
for (;
|
|
800
|
-
const
|
|
801
|
-
if (
|
|
802
|
-
|
|
859
|
+
const _ = window.getSelection();
|
|
860
|
+
if (!_) return;
|
|
861
|
+
let U = 0;
|
|
862
|
+
const ve = document.createTreeWalker ? document.createTreeWalker(n.value, NodeFilter.SHOW_TEXT, null) : null;
|
|
863
|
+
if (!ve) return;
|
|
864
|
+
let Y, X = null;
|
|
865
|
+
for (; Y = ve.nextNode(); ) {
|
|
866
|
+
const ge = Y, de = U + ge.textContent.length;
|
|
867
|
+
if (S <= de && (X = document.createRange(), X.setStart && X.setEnd)) {
|
|
868
|
+
X.setStart(ge, S - U), X.setEnd(ge, S - U);
|
|
803
869
|
break;
|
|
804
870
|
}
|
|
805
|
-
|
|
871
|
+
U = de;
|
|
806
872
|
}
|
|
807
|
-
|
|
873
|
+
X && _.removeAllRanges && _.addRange && (_.removeAllRanges(), _.addRange(X));
|
|
808
874
|
} catch {
|
|
809
875
|
}
|
|
810
|
-
},
|
|
876
|
+
}, T = (S) => {
|
|
811
877
|
if (!s.edit) return;
|
|
812
|
-
const
|
|
813
|
-
if (
|
|
878
|
+
const _ = S.target;
|
|
879
|
+
if (_.textContent === a.value)
|
|
814
880
|
return;
|
|
815
|
-
const
|
|
816
|
-
a.value =
|
|
817
|
-
|
|
881
|
+
const U = g();
|
|
882
|
+
a.value = _.textContent, s.format ? (r.value = _.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, _.textContent)) : (r.value = _.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, _.textContent)), pt().then(() => {
|
|
883
|
+
C(U);
|
|
818
884
|
});
|
|
819
|
-
},
|
|
885
|
+
}, R = /* @__PURE__ */ oo(T, e.debounce);
|
|
820
886
|
return t({
|
|
821
887
|
currentData: a
|
|
822
|
-
}), (
|
|
888
|
+
}), (S, _) => (w(), k("td", {
|
|
823
889
|
ref: "cell",
|
|
824
890
|
"data-colindex": e.colIndex,
|
|
825
891
|
"data-rowindex": e.rowIndex,
|
|
826
|
-
"data-editable":
|
|
827
|
-
contenteditable:
|
|
892
|
+
"data-editable": V(s).edit,
|
|
893
|
+
contenteditable: V(s).edit,
|
|
828
894
|
tabindex: e.tabIndex,
|
|
829
895
|
spellcheck: !1,
|
|
830
|
-
style:
|
|
831
|
-
class:
|
|
896
|
+
style: xe(h.value),
|
|
897
|
+
class: ae(["atable-cell", b.value]),
|
|
832
898
|
onFocus: m,
|
|
833
|
-
onPaste:
|
|
834
|
-
onInput:
|
|
835
|
-
(...
|
|
836
|
-
onClick:
|
|
899
|
+
onPaste: T,
|
|
900
|
+
onInput: _[0] || (_[0] = //@ts-ignore
|
|
901
|
+
(...U) => V(R) && V(R)(...U)),
|
|
902
|
+
onClick: I
|
|
837
903
|
}, [
|
|
838
|
-
|
|
904
|
+
V(s).cellComponent ? (w(), pe(We(V(s).cellComponent), vt({
|
|
839
905
|
key: 0,
|
|
840
906
|
value: c.value
|
|
841
|
-
},
|
|
907
|
+
}, V(s).cellComponentProps), null, 16, ["value"])) : p.value ? (w(), k("span", {
|
|
842
908
|
key: 1,
|
|
843
909
|
innerHTML: c.value
|
|
844
|
-
}, null, 8,
|
|
845
|
-
], 46,
|
|
910
|
+
}, null, 8, po)) : (w(), k("span", mo, K(c.value), 1))
|
|
911
|
+
], 46, vo));
|
|
846
912
|
}
|
|
847
|
-
}),
|
|
913
|
+
}), go = ["tabindex"], wo = ["tabindex"], yo = ["colspan"], xo = /* @__PURE__ */ te({
|
|
848
914
|
__name: "AExpansionRow",
|
|
849
915
|
props: {
|
|
850
916
|
rowIndex: {},
|
|
851
917
|
store: {},
|
|
852
918
|
tabIndex: { default: () => -1 },
|
|
853
|
-
addNavigation: { type: [Boolean, Object], default: () =>
|
|
919
|
+
addNavigation: { type: [Boolean, Object], default: () => wt }
|
|
854
920
|
},
|
|
855
921
|
setup(e) {
|
|
856
|
-
const t =
|
|
922
|
+
const t = fe("rowEl"), n = $(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
857
923
|
if (e.addNavigation) {
|
|
858
924
|
const o = {
|
|
859
925
|
"keydown.control.g": (a) => {
|
|
860
926
|
a.stopPropagation(), a.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
861
927
|
}
|
|
862
928
|
};
|
|
863
|
-
typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation),
|
|
929
|
+
typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation), Ot([
|
|
864
930
|
{
|
|
865
931
|
selectors: t,
|
|
866
932
|
handlers: o
|
|
867
933
|
}
|
|
868
934
|
]);
|
|
869
935
|
}
|
|
870
|
-
return (o, a) => (w(), k(
|
|
871
|
-
y("tr",
|
|
936
|
+
return (o, a) => (w(), k(ue, null, [
|
|
937
|
+
y("tr", vt(o.$attrs, {
|
|
872
938
|
ref: "rowEl",
|
|
873
939
|
tabindex: e.tabIndex,
|
|
874
940
|
class: "expandable-row"
|
|
@@ -877,9 +943,9 @@ const io = (e) => {
|
|
|
877
943
|
tabIndex: -1,
|
|
878
944
|
class: "row-index",
|
|
879
945
|
onClick: a[0] || (a[0] = (r) => e.store.toggleRowExpand(e.rowIndex))
|
|
880
|
-
},
|
|
881
|
-
|
|
882
|
-
], 16,
|
|
946
|
+
}, K(n.value), 1),
|
|
947
|
+
he(o.$slots, "row", {}, void 0, !0)
|
|
948
|
+
], 16, go),
|
|
883
949
|
e.store.display[e.rowIndex].expanded ? (w(), k("tr", {
|
|
884
950
|
key: 0,
|
|
885
951
|
ref: "rowExpanded",
|
|
@@ -891,23 +957,23 @@ const io = (e) => {
|
|
|
891
957
|
colspan: e.store.columns.length + 1,
|
|
892
958
|
class: "expanded-row-content"
|
|
893
959
|
}, [
|
|
894
|
-
|
|
895
|
-
], 8,
|
|
896
|
-
], 8,
|
|
960
|
+
he(o.$slots, "content", {}, void 0, !0)
|
|
961
|
+
], 8, yo)
|
|
962
|
+
], 8, wo)) : q("", !0)
|
|
897
963
|
], 64));
|
|
898
964
|
}
|
|
899
|
-
}),
|
|
965
|
+
}), Ve = (e, t) => {
|
|
900
966
|
const n = e.__vccOpts || e;
|
|
901
967
|
for (const [o, a] of t)
|
|
902
968
|
n[o] = a;
|
|
903
969
|
return n;
|
|
904
|
-
},
|
|
970
|
+
}, bo = /* @__PURE__ */ Ve(xo, [["__scopeId", "data-v-a42297c7"]]), Io = ["colspan"], ko = {
|
|
905
971
|
ref: "container",
|
|
906
972
|
class: "gantt-container"
|
|
907
|
-
},
|
|
973
|
+
}, Mo = ["data-rowindex", "data-colindex"], Co = {
|
|
908
974
|
key: 2,
|
|
909
975
|
class: "gantt-label"
|
|
910
|
-
},
|
|
976
|
+
}, Eo = ["x1", "y1", "x2", "y2"], Ao = /* @__PURE__ */ te({
|
|
911
977
|
__name: "AGanttCell",
|
|
912
978
|
props: {
|
|
913
979
|
store: {},
|
|
@@ -922,18 +988,18 @@ const io = (e) => {
|
|
|
922
988
|
},
|
|
923
989
|
emits: ["connection:create"],
|
|
924
990
|
setup(e, { expose: t, emit: n }) {
|
|
925
|
-
|
|
991
|
+
En((O) => ({
|
|
926
992
|
v6d722296: a.value,
|
|
927
|
-
v260b36f8:
|
|
993
|
+
v260b36f8: O.colspan
|
|
928
994
|
}));
|
|
929
|
-
const o = n, a =
|
|
930
|
-
const
|
|
995
|
+
const o = n, a = L(e.color.length >= 6 ? e.color : "#cccccc"), r = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, s = fe("container"), l = fe("bar"), i = fe("leftResizeHandle"), u = fe("rightResizeHandle"), c = fe("leftConnectionHandle"), p = fe("rightConnectionHandle"), { width: h } = Pe(s), { left: b, right: I } = Pe(l), x = L(e.start), f = L(e.end || x.value + e.colspan), m = L(!1), g = L(!1), C = L(!1), T = L(!1), R = L(!1), S = L({ startX: 0, startY: 0, endX: 0, endY: 0 }), _ = $(() => Be.value || ge.value || de.value), U = $(() => e.colspan > 0 ? h.value / e.colspan : 0), ve = $(() => {
|
|
996
|
+
const O = x.value / e.colspan * 100, B = f.value / e.colspan * 100;
|
|
931
997
|
return {
|
|
932
|
-
left: `${
|
|
933
|
-
width: `${B -
|
|
998
|
+
left: `${O}%`,
|
|
999
|
+
width: `${B - O}%`,
|
|
934
1000
|
backgroundColor: a.value
|
|
935
1001
|
};
|
|
936
|
-
}),
|
|
1002
|
+
}), Y = $(
|
|
937
1003
|
() => ({
|
|
938
1004
|
position: "fixed",
|
|
939
1005
|
top: 0,
|
|
@@ -943,111 +1009,111 @@ const io = (e) => {
|
|
|
943
1009
|
pointerEvents: "none",
|
|
944
1010
|
zIndex: 1e3
|
|
945
1011
|
})
|
|
946
|
-
),
|
|
1012
|
+
), X = L({ startX: 0, startPos: 0 }), { isDragging: ge } = yt(i, {
|
|
947
1013
|
axis: "x",
|
|
948
|
-
onStart: () =>
|
|
949
|
-
onMove: ({ x:
|
|
950
|
-
onEnd: ({ x:
|
|
951
|
-
}), { isDragging:
|
|
1014
|
+
onStart: () => Re(b.value, x.value),
|
|
1015
|
+
onMove: ({ x: O }) => Xe(O),
|
|
1016
|
+
onEnd: ({ x: O }) => je(O)
|
|
1017
|
+
}), { isDragging: de } = yt(u, {
|
|
952
1018
|
axis: "x",
|
|
953
|
-
onStart: () =>
|
|
954
|
-
onMove: ({ x:
|
|
955
|
-
onEnd: ({ x:
|
|
956
|
-
}), { isDragging:
|
|
1019
|
+
onStart: () => Re(I.value, f.value),
|
|
1020
|
+
onMove: ({ x: O }) => Fe(O),
|
|
1021
|
+
onEnd: ({ x: O }) => Je(O)
|
|
1022
|
+
}), { isDragging: Be } = yt(l, {
|
|
957
1023
|
exact: !0,
|
|
958
1024
|
axis: "x",
|
|
959
|
-
onStart: () =>
|
|
960
|
-
onMove: ({ x:
|
|
961
|
-
onEnd: ({ x:
|
|
1025
|
+
onStart: () => Re(b.value, x.value),
|
|
1026
|
+
onMove: ({ x: O }) => Ze(O),
|
|
1027
|
+
onEnd: ({ x: O }) => D(O)
|
|
962
1028
|
});
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
}),
|
|
966
|
-
|
|
1029
|
+
Ee(() => {
|
|
1030
|
+
F();
|
|
1031
|
+
}), An(() => {
|
|
1032
|
+
W();
|
|
967
1033
|
});
|
|
968
|
-
function
|
|
969
|
-
l.value && (l.value.style.transition = "none"),
|
|
1034
|
+
function Re(O, B) {
|
|
1035
|
+
l.value && (l.value.style.transition = "none"), X.value = { startX: O, startPos: B };
|
|
970
1036
|
}
|
|
971
|
-
function
|
|
972
|
-
if (!
|
|
973
|
-
const B = (
|
|
974
|
-
l.value.style.left = `${
|
|
1037
|
+
function Xe(O) {
|
|
1038
|
+
if (!ge.value || !l.value) return;
|
|
1039
|
+
const B = (O - X.value.startX) / U.value, G = Math.max(0, Math.min(f.value - 1, X.value.startPos + B));
|
|
1040
|
+
l.value.style.left = `${G / e.colspan * 100}%`, l.value.style.width = `${(f.value - G) / e.colspan * 100}%`;
|
|
975
1041
|
}
|
|
976
|
-
function
|
|
1042
|
+
function je(O) {
|
|
977
1043
|
if (!l.value) return;
|
|
978
|
-
const B =
|
|
979
|
-
x.value =
|
|
1044
|
+
const B = O - X.value.startX, G = Math.round(B / U.value), Q = x.value, ne = Math.max(0, Math.min(f.value - 1, X.value.startPos + G));
|
|
1045
|
+
x.value = ne, e.store.updateGanttBar({
|
|
980
1046
|
rowIndex: e.rowIndex,
|
|
981
1047
|
colIndex: e.colIndex,
|
|
982
1048
|
type: "resize",
|
|
983
1049
|
edge: "start",
|
|
984
|
-
oldStart:
|
|
985
|
-
newStart:
|
|
986
|
-
end:
|
|
987
|
-
delta:
|
|
988
|
-
oldColspan:
|
|
989
|
-
newColspan:
|
|
1050
|
+
oldStart: Q,
|
|
1051
|
+
newStart: ne,
|
|
1052
|
+
end: f.value,
|
|
1053
|
+
delta: G,
|
|
1054
|
+
oldColspan: f.value - Q,
|
|
1055
|
+
newColspan: f.value - ne
|
|
990
1056
|
});
|
|
991
1057
|
}
|
|
992
|
-
function
|
|
993
|
-
if (!
|
|
994
|
-
const B = (
|
|
995
|
-
l.value.style.width = `${(
|
|
1058
|
+
function Fe(O) {
|
|
1059
|
+
if (!de.value || !l.value) return;
|
|
1060
|
+
const B = (O - X.value.startX) / U.value, G = Math.max(x.value + 1, Math.min(e.columnsCount, X.value.startPos + B));
|
|
1061
|
+
l.value.style.width = `${(G - x.value) / e.colspan * 100}%`;
|
|
996
1062
|
}
|
|
997
|
-
function
|
|
1063
|
+
function Je(O) {
|
|
998
1064
|
if (!l.value) return;
|
|
999
|
-
const B =
|
|
1000
|
-
|
|
1065
|
+
const B = O - X.value.startX, G = Math.round(B / U.value), Q = f.value, ne = Math.max(x.value + 1, Math.min(e.columnsCount, X.value.startPos + G));
|
|
1066
|
+
f.value = ne, e.store.updateGanttBar({
|
|
1001
1067
|
rowIndex: e.rowIndex,
|
|
1002
1068
|
colIndex: e.colIndex,
|
|
1003
1069
|
type: "resize",
|
|
1004
1070
|
edge: "end",
|
|
1005
|
-
oldEnd:
|
|
1006
|
-
newEnd:
|
|
1071
|
+
oldEnd: Q,
|
|
1072
|
+
newEnd: ne,
|
|
1007
1073
|
start: x.value,
|
|
1008
|
-
delta:
|
|
1009
|
-
oldColspan:
|
|
1010
|
-
newColspan:
|
|
1074
|
+
delta: G,
|
|
1075
|
+
oldColspan: Q - x.value,
|
|
1076
|
+
newColspan: ne - x.value
|
|
1011
1077
|
});
|
|
1012
1078
|
}
|
|
1013
|
-
function
|
|
1014
|
-
if (!
|
|
1015
|
-
const B = (
|
|
1016
|
-
l.value.style.left = `${
|
|
1079
|
+
function Ze(O) {
|
|
1080
|
+
if (!Be.value || !l.value) return;
|
|
1081
|
+
const B = (O - X.value.startX) / U.value, G = f.value - x.value, Q = Math.max(0, Math.min(X.value.startPos + B, e.columnsCount - G));
|
|
1082
|
+
l.value.style.left = `${Q / e.colspan * 100}%`;
|
|
1017
1083
|
}
|
|
1018
|
-
function
|
|
1084
|
+
function D(O) {
|
|
1019
1085
|
if (!l.value) return;
|
|
1020
|
-
const B =
|
|
1021
|
-
let
|
|
1022
|
-
|
|
1086
|
+
const B = O - X.value.startX, G = Math.round(B / U.value), Q = f.value - x.value, ne = x.value, ee = f.value;
|
|
1087
|
+
let re = X.value.startPos + G, ce = re + Q;
|
|
1088
|
+
re < 0 ? (re = 0, ce = Q) : ce > e.columnsCount && (ce = e.columnsCount, re = ce - Q), x.value = re, f.value = ce, e.store.updateGanttBar({
|
|
1023
1089
|
rowIndex: e.rowIndex,
|
|
1024
1090
|
colIndex: e.colIndex,
|
|
1025
1091
|
type: "bar",
|
|
1026
|
-
oldStart:
|
|
1027
|
-
oldEnd:
|
|
1028
|
-
newStart:
|
|
1029
|
-
newEnd:
|
|
1030
|
-
delta:
|
|
1031
|
-
colspan:
|
|
1092
|
+
oldStart: ne,
|
|
1093
|
+
oldEnd: ee,
|
|
1094
|
+
newStart: re,
|
|
1095
|
+
newEnd: ce,
|
|
1096
|
+
delta: G,
|
|
1097
|
+
colspan: ce - re
|
|
1032
1098
|
});
|
|
1033
1099
|
}
|
|
1034
|
-
function
|
|
1035
|
-
const { x:
|
|
1100
|
+
function F() {
|
|
1101
|
+
const { x: O, y: B } = Pe(l), { x: G, y: Q } = Pe(c), { x: ne, y: ee } = Pe(p);
|
|
1036
1102
|
e.store.registerGanttBar({
|
|
1037
1103
|
id: r,
|
|
1038
1104
|
rowIndex: e.rowIndex,
|
|
1039
1105
|
colIndex: e.colIndex,
|
|
1040
1106
|
startIndex: x,
|
|
1041
|
-
endIndex:
|
|
1107
|
+
endIndex: f,
|
|
1042
1108
|
color: a,
|
|
1043
1109
|
label: e.label,
|
|
1044
|
-
position: { x:
|
|
1110
|
+
position: { x: O, y: B }
|
|
1045
1111
|
}), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
|
|
1046
1112
|
id: `${r}-connection-left`,
|
|
1047
1113
|
rowIndex: e.rowIndex,
|
|
1048
1114
|
colIndex: e.colIndex,
|
|
1049
1115
|
side: "left",
|
|
1050
|
-
position: { x:
|
|
1116
|
+
position: { x: G, y: Q },
|
|
1051
1117
|
visible: m,
|
|
1052
1118
|
barId: r
|
|
1053
1119
|
}), e.store.registerConnectionHandle({
|
|
@@ -1055,137 +1121,137 @@ const io = (e) => {
|
|
|
1055
1121
|
rowIndex: e.rowIndex,
|
|
1056
1122
|
colIndex: e.colIndex,
|
|
1057
1123
|
side: "right",
|
|
1058
|
-
position: { x:
|
|
1124
|
+
position: { x: ne, y: ee },
|
|
1059
1125
|
visible: g,
|
|
1060
1126
|
barId: r
|
|
1061
1127
|
}));
|
|
1062
1128
|
}
|
|
1063
|
-
function
|
|
1129
|
+
function W() {
|
|
1064
1130
|
e.store.unregisterGanttBar(r), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${r}-connection-left`), e.store.unregisterConnectionHandle(`${r}-connection-right`));
|
|
1065
1131
|
}
|
|
1066
|
-
function
|
|
1132
|
+
function j() {
|
|
1067
1133
|
e.store.isDependencyGraphEnabled && (m.value = !0, g.value = !0);
|
|
1068
1134
|
}
|
|
1069
|
-
function
|
|
1070
|
-
!
|
|
1135
|
+
function z() {
|
|
1136
|
+
!C.value && !T.value && (m.value = !1, g.value = !1);
|
|
1071
1137
|
}
|
|
1072
|
-
function
|
|
1073
|
-
B.preventDefault(), B.stopPropagation(),
|
|
1074
|
-
const
|
|
1075
|
-
if (
|
|
1076
|
-
const
|
|
1077
|
-
|
|
1138
|
+
function se(O, B) {
|
|
1139
|
+
B.preventDefault(), B.stopPropagation(), R.value = !0, O === "left" ? C.value = !0 : T.value = !0;
|
|
1140
|
+
const G = O === "left" ? c.value : p.value;
|
|
1141
|
+
if (G) {
|
|
1142
|
+
const ee = G.getBoundingClientRect(), re = ee.left + ee.width / 2, ce = ee.top + ee.height / 2;
|
|
1143
|
+
S.value = { startX: re, startY: ce, endX: re, endY: ce };
|
|
1078
1144
|
}
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1081
|
-
},
|
|
1082
|
-
|
|
1145
|
+
const Q = (ee) => {
|
|
1146
|
+
S.value.endX = ee.clientX, S.value.endY = ee.clientY;
|
|
1147
|
+
}, ne = (ee) => {
|
|
1148
|
+
be(ee, O), Le(Q, ne);
|
|
1083
1149
|
};
|
|
1084
|
-
document.addEventListener("mousemove",
|
|
1150
|
+
document.addEventListener("mousemove", Q), document.addEventListener("mouseup", ne);
|
|
1085
1151
|
}
|
|
1086
|
-
function
|
|
1087
|
-
const
|
|
1088
|
-
if (
|
|
1089
|
-
const
|
|
1090
|
-
if (
|
|
1091
|
-
const
|
|
1152
|
+
function be(O, B) {
|
|
1153
|
+
const G = document.elementFromPoint(O.clientX, O.clientY)?.closest(".connection-handle");
|
|
1154
|
+
if (G && G !== (B === "left" ? c.value : p.value)) {
|
|
1155
|
+
const Q = G.closest(".gantt-bar");
|
|
1156
|
+
if (Q) {
|
|
1157
|
+
const ne = parseInt(Q.getAttribute("data-rowindex") || "0"), ee = parseInt(Q.getAttribute("data-colindex") || "0"), re = G.classList.contains("left-connection-handle") ? "left" : "right", ce = `gantt-bar-row-${ne}-col-${ee}`, d = e.store.createConnection(
|
|
1092
1158
|
`${r}-connection-${B}`,
|
|
1093
|
-
`${
|
|
1159
|
+
`${ce}-connection-${re}`
|
|
1094
1160
|
);
|
|
1095
1161
|
d && o("connection:create", d);
|
|
1096
1162
|
}
|
|
1097
1163
|
}
|
|
1098
1164
|
}
|
|
1099
|
-
function
|
|
1100
|
-
|
|
1165
|
+
function Le(O, B) {
|
|
1166
|
+
R.value = !1, C.value = !1, T.value = !1, document.removeEventListener("mousemove", O), document.removeEventListener("mouseup", B), l.value?.matches(":hover") || z();
|
|
1101
1167
|
}
|
|
1102
1168
|
return t({
|
|
1103
|
-
barStyle:
|
|
1104
|
-
cleanupConnectionDrag:
|
|
1105
|
-
currentEnd:
|
|
1106
|
-
handleConnectionDrop:
|
|
1107
|
-
isLeftConnectionDragging:
|
|
1169
|
+
barStyle: ve,
|
|
1170
|
+
cleanupConnectionDrag: Le,
|
|
1171
|
+
currentEnd: f,
|
|
1172
|
+
handleConnectionDrop: be,
|
|
1173
|
+
isLeftConnectionDragging: C,
|
|
1108
1174
|
isLeftConnectionVisible: m,
|
|
1109
|
-
isRightConnectionDragging:
|
|
1175
|
+
isRightConnectionDragging: T,
|
|
1110
1176
|
isRightConnectionVisible: g,
|
|
1111
|
-
showDragPreview:
|
|
1112
|
-
}), (
|
|
1177
|
+
showDragPreview: R
|
|
1178
|
+
}), (O, B) => (w(), k("td", {
|
|
1113
1179
|
class: "aganttcell",
|
|
1114
1180
|
colspan: e.colspan
|
|
1115
1181
|
}, [
|
|
1116
|
-
y("div",
|
|
1182
|
+
y("div", ko, [
|
|
1117
1183
|
y("div", {
|
|
1118
1184
|
ref: "bar",
|
|
1119
1185
|
"data-rowindex": e.rowIndex,
|
|
1120
1186
|
"data-colindex": e.colIndex,
|
|
1121
|
-
class:
|
|
1122
|
-
style:
|
|
1123
|
-
onMouseenter:
|
|
1124
|
-
onMouseleave:
|
|
1187
|
+
class: ae(["gantt-bar", { "is-dragging": _.value }]),
|
|
1188
|
+
style: xe(ve.value),
|
|
1189
|
+
onMouseenter: j,
|
|
1190
|
+
onMouseleave: z
|
|
1125
1191
|
}, [
|
|
1126
1192
|
e.store.isDependencyGraphEnabled ? (w(), k("div", {
|
|
1127
1193
|
key: 0,
|
|
1128
1194
|
ref: "leftConnectionHandle",
|
|
1129
|
-
class:
|
|
1130
|
-
onMousedown: B[0] || (B[0] =
|
|
1195
|
+
class: ae(["connection-handle left-connection-handle", { visible: m.value, "is-dragging": C.value }]),
|
|
1196
|
+
onMousedown: B[0] || (B[0] = Ie((G) => se("left", G), ["stop"]))
|
|
1131
1197
|
}, [...B[2] || (B[2] = [
|
|
1132
1198
|
y("div", { class: "connection-dot" }, null, -1)
|
|
1133
|
-
])], 34)) :
|
|
1199
|
+
])], 34)) : q("", !0),
|
|
1134
1200
|
e.store.isDependencyGraphEnabled ? (w(), k("div", {
|
|
1135
1201
|
key: 1,
|
|
1136
1202
|
ref: "rightConnectionHandle",
|
|
1137
|
-
class:
|
|
1138
|
-
onMousedown: B[1] || (B[1] =
|
|
1203
|
+
class: ae(["connection-handle right-connection-handle", { visible: g.value, "is-dragging": T.value }]),
|
|
1204
|
+
onMousedown: B[1] || (B[1] = Ie((G) => se("right", G), ["stop"]))
|
|
1139
1205
|
}, [...B[3] || (B[3] = [
|
|
1140
1206
|
y("div", { class: "connection-dot" }, null, -1)
|
|
1141
|
-
])], 34)) :
|
|
1207
|
+
])], 34)) : q("", !0),
|
|
1142
1208
|
y("div", {
|
|
1143
1209
|
ref: "leftResizeHandle",
|
|
1144
|
-
class:
|
|
1210
|
+
class: ae(["resize-handle left-resize-handle", { "is-dragging": V(ge) }])
|
|
1145
1211
|
}, [...B[4] || (B[4] = [
|
|
1146
1212
|
y("div", { class: "handle-grip" }, null, -1),
|
|
1147
1213
|
y("div", { class: "vertical-indicator left-indicator" }, null, -1)
|
|
1148
1214
|
])], 2),
|
|
1149
|
-
e.label ? (w(), k("label",
|
|
1215
|
+
e.label ? (w(), k("label", Co, K(e.label), 1)) : q("", !0),
|
|
1150
1216
|
y("div", {
|
|
1151
1217
|
ref: "rightResizeHandle",
|
|
1152
|
-
class:
|
|
1218
|
+
class: ae(["resize-handle right-resize-handle", { "is-dragging": V(de) }])
|
|
1153
1219
|
}, [...B[5] || (B[5] = [
|
|
1154
1220
|
y("div", { class: "handle-grip" }, null, -1),
|
|
1155
1221
|
y("div", { class: "vertical-indicator right-indicator" }, null, -1)
|
|
1156
1222
|
])], 2)
|
|
1157
|
-
], 46,
|
|
1223
|
+
], 46, Mo)
|
|
1158
1224
|
], 512),
|
|
1159
|
-
e.store.isDependencyGraphEnabled &&
|
|
1225
|
+
e.store.isDependencyGraphEnabled && R.value ? (w(), k("svg", {
|
|
1160
1226
|
key: 0,
|
|
1161
|
-
style:
|
|
1227
|
+
style: xe(Y.value)
|
|
1162
1228
|
}, [
|
|
1163
1229
|
y("line", {
|
|
1164
|
-
x1:
|
|
1165
|
-
y1:
|
|
1166
|
-
x2:
|
|
1167
|
-
y2:
|
|
1230
|
+
x1: S.value.startX,
|
|
1231
|
+
y1: S.value.startY,
|
|
1232
|
+
x2: S.value.endX,
|
|
1233
|
+
y2: S.value.endY,
|
|
1168
1234
|
stroke: "#2196f3",
|
|
1169
1235
|
"stroke-width": "2",
|
|
1170
1236
|
"stroke-dasharray": "5,5"
|
|
1171
|
-
}, null, 8,
|
|
1172
|
-
], 4)) :
|
|
1173
|
-
], 8,
|
|
1237
|
+
}, null, 8, Eo)
|
|
1238
|
+
], 4)) : q("", !0)
|
|
1239
|
+
], 8, Io));
|
|
1174
1240
|
}
|
|
1175
|
-
}),
|
|
1241
|
+
}), To = /* @__PURE__ */ Ve(Ao, [["__scopeId", "data-v-8917a8a3"]]), $o = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1176
1242
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
1177
1243
|
<path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1178
1244
|
<polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
|
|
1179
1245
|
</svg>
|
|
1180
|
-
`,
|
|
1246
|
+
`, Do = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1181
1247
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
1182
1248
|
<path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1183
1249
|
<polygon points="46.84 19.99 44.01 17.16 32 29.17 19.99 17.16 17.16 19.99 29.17 32 17.16 44.01 19.99 46.84 32 34.83 44.01 46.84 46.84 44.01 34.83 32 46.84 19.99" style="fill: #000; stroke-width: 0px;"/>
|
|
1184
|
-
</svg>`,
|
|
1250
|
+
</svg>`, So = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1185
1251
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.67">
|
|
1186
1252
|
<path d="M68.67,16.67h-14.67V2c0-1.1-.9-2-2-2H2C.9,0,0,.9,0,2v50c0,1.1.9,2,2,2h14.67v14.67c0,1.1.9,2,2,2h50c1.1,0,2-.9,2-2V18.67c0-1.1-.9-2-2-2ZM4,4h46v46H4V4ZM66.67,66.67H20.67v-12.67h31.33c1.1,0,2-.9,2-2v-31.33h12.67v46Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1187
1253
|
<polygon points="41 25 29 25 29 13 25 13 25 25 13 25 13 29 25 29 25 41 29 41 29 29 41 29 41 25" style="fill: #000; stroke-width: 0px;"/>
|
|
1188
|
-
</svg>`,
|
|
1254
|
+
</svg>`, Ro = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1189
1255
|
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
|
|
1190
1256
|
<path d="M68.6,45.8v13.7H2v-13.7h66.6M70.6,43.8H0v17.7h70.6v-17.7h0Z"/>
|
|
1191
1257
|
<path d="M68.6,24.2v13.7H2v-13.7h66.6M70.6,22.2H0v17.7h70.6v-17.7h0Z"/>
|
|
@@ -1199,7 +1265,7 @@ const io = (e) => {
|
|
|
1199
1265
|
<polygon points="70.6 18.7 68.1 18.7 68.1 16.7 68.6 16.7 68.6 16.2 70.6 16.2 70.6 18.7"/>
|
|
1200
1266
|
<path d="M70.6,13.4h-2v-2.7h2v2.7ZM70.6,8h-2v-2.7h2v2.7Z"/>
|
|
1201
1267
|
</g>
|
|
1202
|
-
</svg>`,
|
|
1268
|
+
</svg>`, Lo = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1203
1269
|
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
|
|
1204
1270
|
<g>
|
|
1205
1271
|
<polygon points="70.6 45.3 68.6 45.3 68.6 44.8 68.1 44.8 68.1 42.8 70.6 42.8 70.6 45.3"/>
|
|
@@ -1213,23 +1279,23 @@ const io = (e) => {
|
|
|
1213
1279
|
</g>
|
|
1214
1280
|
<path d="M68.6,23.7v13.7H2v-13.7h66.6M70.6,21.7H0v17.7h70.6v-17.7h0Z"/>
|
|
1215
1281
|
<path d="M68.6,2v13.7H2V2h66.6M70.6,0H0v17.7h70.6V0h0Z"/>
|
|
1216
|
-
</svg>`,
|
|
1282
|
+
</svg>`, Ho = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1217
1283
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.64">
|
|
1218
1284
|
<path d="M70.08,33.9l-9.75-9.75-2.83,2.83,6.33,6.33h-26.51V6.81l6.33,6.33,2.83-2.83L36.75.56c-.75-.75-2.08-.75-2.83,0l-9.75,9.75,2.83,2.83,6.33-6.33v26.5H6.83l6.33-6.33-2.83-2.83L.59,33.9c-.38.38-.59.88-.59,1.41s.21,1.04.59,1.41l9.75,9.75,2.83-2.83-6.33-6.33h26.5v26.51l-6.33-6.33-2.83,2.83,9.75,9.75c.38.38.88.59,1.41.59s1.04-.21,1.41-.59l9.75-9.75-2.83-2.83-6.33,6.33v-26.51h26.51l-6.33,6.33,2.83,2.83,9.75-9.75c.38-.38.59-.88.59-1.41s-.21-1.04-.59-1.41Z" style="fill: #000; stroke-width: 0px;"/>
|
|
1219
|
-
</svg>`,
|
|
1220
|
-
add:
|
|
1221
|
-
delete:
|
|
1222
|
-
duplicate:
|
|
1223
|
-
insertAbove:
|
|
1224
|
-
insertBelow:
|
|
1225
|
-
move:
|
|
1226
|
-
},
|
|
1285
|
+
</svg>`, Vo = {
|
|
1286
|
+
add: $o,
|
|
1287
|
+
delete: Do,
|
|
1288
|
+
duplicate: So,
|
|
1289
|
+
insertAbove: Ro,
|
|
1290
|
+
insertBelow: Lo,
|
|
1291
|
+
move: Ho
|
|
1292
|
+
}, Po = {
|
|
1227
1293
|
key: 0,
|
|
1228
1294
|
class: "row-actions-dropdown"
|
|
1229
|
-
},
|
|
1295
|
+
}, Oo = ["aria-expanded"], _o = ["onClick"], Bo = ["innerHTML"], Fo = { class: "action-label" }, Zo = {
|
|
1230
1296
|
key: 1,
|
|
1231
1297
|
class: "row-actions-icons"
|
|
1232
|
-
},
|
|
1298
|
+
}, No = ["title", "aria-label", "onClick"], Uo = ["innerHTML"], ut = /* @__PURE__ */ te({
|
|
1233
1299
|
__name: "ARowActions",
|
|
1234
1300
|
props: {
|
|
1235
1301
|
rowIndex: {},
|
|
@@ -1239,27 +1305,27 @@ const io = (e) => {
|
|
|
1239
1305
|
},
|
|
1240
1306
|
emits: ["action"],
|
|
1241
1307
|
setup(e, { emit: t }) {
|
|
1242
|
-
const n = e, o = t, a =
|
|
1308
|
+
const n = e, o = t, a = fe("actionsCell"), r = fe("toggleButton"), s = L(0), l = L(!1), i = L(!1), u = L({ top: 0, left: 0 }), c = {
|
|
1243
1309
|
add: "Add Row",
|
|
1244
1310
|
delete: "Delete Row",
|
|
1245
1311
|
duplicate: "Duplicate Row",
|
|
1246
1312
|
insertAbove: "Insert Above",
|
|
1247
1313
|
insertBelow: "Insert Below",
|
|
1248
1314
|
move: "Move Row"
|
|
1249
|
-
}, p =
|
|
1250
|
-
const m = [], g = n.config.actions || {},
|
|
1251
|
-
for (const
|
|
1252
|
-
const
|
|
1253
|
-
if (
|
|
1254
|
-
let
|
|
1255
|
-
typeof
|
|
1315
|
+
}, p = $(() => {
|
|
1316
|
+
const m = [], g = n.config.actions || {}, C = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
|
|
1317
|
+
for (const T of C) {
|
|
1318
|
+
const R = g[T];
|
|
1319
|
+
if (R === !1 || R === void 0) continue;
|
|
1320
|
+
let S = !0, _ = c[T], U = Vo[T];
|
|
1321
|
+
typeof R == "object" && (S = R.enabled !== !1, _ = R.label || _, U = R.icon || U), S && m.push({ type: T, label: _, icon: U });
|
|
1256
1322
|
}
|
|
1257
1323
|
return m;
|
|
1258
|
-
}), h =
|
|
1324
|
+
}), h = $(() => {
|
|
1259
1325
|
if (n.config.forceDropdown) return !0;
|
|
1260
1326
|
const m = n.config.dropdownThreshold ?? 150;
|
|
1261
1327
|
return m === 0 ? !1 : s.value > 0 && s.value < m;
|
|
1262
|
-
}), b =
|
|
1328
|
+
}), b = $(() => l.value ? i.value ? {
|
|
1263
1329
|
position: "fixed",
|
|
1264
1330
|
bottom: `${window.innerHeight - u.value.top}px`,
|
|
1265
1331
|
left: `${u.value.left}px`,
|
|
@@ -1269,16 +1335,16 @@ const io = (e) => {
|
|
|
1269
1335
|
top: `${u.value.top}px`,
|
|
1270
1336
|
left: `${u.value.left}px`
|
|
1271
1337
|
} : {});
|
|
1272
|
-
|
|
1338
|
+
ft(a, (m) => {
|
|
1273
1339
|
const g = m[0];
|
|
1274
1340
|
g && (s.value = g.contentRect.width);
|
|
1275
1341
|
});
|
|
1276
|
-
const
|
|
1342
|
+
const I = () => {
|
|
1277
1343
|
l.value || x(), l.value = !l.value;
|
|
1278
1344
|
}, x = () => {
|
|
1279
1345
|
if (!r.value) return;
|
|
1280
|
-
const m = r.value.getBoundingClientRect(), g = window.innerHeight,
|
|
1281
|
-
i.value =
|
|
1346
|
+
const m = r.value.getBoundingClientRect(), g = window.innerHeight, C = p.value.length * 40 + 16, T = g - m.bottom, R = m.top;
|
|
1347
|
+
i.value = T < C && R > C, i.value ? u.value = {
|
|
1282
1348
|
top: m.top,
|
|
1283
1349
|
left: m.left
|
|
1284
1350
|
} : u.value = {
|
|
@@ -1286,68 +1352,68 @@ const io = (e) => {
|
|
|
1286
1352
|
left: m.left
|
|
1287
1353
|
};
|
|
1288
1354
|
};
|
|
1289
|
-
|
|
1355
|
+
$t(a, () => {
|
|
1290
1356
|
l.value = !1;
|
|
1291
1357
|
});
|
|
1292
|
-
const
|
|
1358
|
+
const f = (m) => {
|
|
1293
1359
|
l.value = !1;
|
|
1294
1360
|
const g = n.config.actions?.[m];
|
|
1295
1361
|
typeof g == "object" && g.handler && g.handler(n.rowIndex, n.store) === !1 || o("action", m, n.rowIndex);
|
|
1296
1362
|
};
|
|
1297
1363
|
return (m, g) => (w(), k("td", {
|
|
1298
1364
|
ref: "actionsCell",
|
|
1299
|
-
class:
|
|
1365
|
+
class: ae(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": l.value }])
|
|
1300
1366
|
}, [
|
|
1301
|
-
h.value ? (w(), k("div",
|
|
1367
|
+
h.value ? (w(), k("div", Po, [
|
|
1302
1368
|
y("button", {
|
|
1303
1369
|
ref: "toggleButton",
|
|
1304
1370
|
type: "button",
|
|
1305
1371
|
class: "row-actions-toggle",
|
|
1306
1372
|
"aria-expanded": l.value,
|
|
1307
1373
|
"aria-haspopup": "true",
|
|
1308
|
-
onClick:
|
|
1374
|
+
onClick: Ie(I, ["stop"])
|
|
1309
1375
|
}, [...g[0] || (g[0] = [
|
|
1310
1376
|
y("span", { class: "dropdown-icon" }, "⋮", -1)
|
|
1311
|
-
])], 8,
|
|
1312
|
-
|
|
1313
|
-
class:
|
|
1314
|
-
style:
|
|
1377
|
+
])], 8, Oo),
|
|
1378
|
+
J(y("div", {
|
|
1379
|
+
class: ae(["row-actions-menu", { "menu-flipped": i.value }]),
|
|
1380
|
+
style: xe(b.value),
|
|
1315
1381
|
role: "menu"
|
|
1316
1382
|
}, [
|
|
1317
|
-
(w(!0), k(
|
|
1318
|
-
key:
|
|
1383
|
+
(w(!0), k(ue, null, me(p.value, (C) => (w(), k("button", {
|
|
1384
|
+
key: C.type,
|
|
1319
1385
|
type: "button",
|
|
1320
1386
|
class: "row-action-menu-item",
|
|
1321
1387
|
role: "menuitem",
|
|
1322
|
-
onClick:
|
|
1388
|
+
onClick: Ie((T) => f(C.type), ["stop"])
|
|
1323
1389
|
}, [
|
|
1324
1390
|
y("span", {
|
|
1325
1391
|
class: "action-icon",
|
|
1326
|
-
innerHTML:
|
|
1327
|
-
}, null, 8,
|
|
1328
|
-
y("span",
|
|
1329
|
-
], 8,
|
|
1392
|
+
innerHTML: C.icon
|
|
1393
|
+
}, null, 8, Bo),
|
|
1394
|
+
y("span", Fo, K(C.label), 1)
|
|
1395
|
+
], 8, _o))), 128))
|
|
1330
1396
|
], 6), [
|
|
1331
|
-
[
|
|
1397
|
+
[Ce, l.value]
|
|
1332
1398
|
])
|
|
1333
|
-
])) : (w(), k("div",
|
|
1334
|
-
(w(!0), k(
|
|
1335
|
-
key:
|
|
1399
|
+
])) : (w(), k("div", Zo, [
|
|
1400
|
+
(w(!0), k(ue, null, me(p.value, (C) => (w(), k("button", {
|
|
1401
|
+
key: C.type,
|
|
1336
1402
|
type: "button",
|
|
1337
1403
|
class: "row-action-btn",
|
|
1338
|
-
title:
|
|
1339
|
-
"aria-label":
|
|
1340
|
-
onClick:
|
|
1404
|
+
title: C.label,
|
|
1405
|
+
"aria-label": C.label,
|
|
1406
|
+
onClick: Ie((T) => f(C.type), ["stop"])
|
|
1341
1407
|
}, [
|
|
1342
1408
|
y("span", {
|
|
1343
1409
|
class: "action-icon",
|
|
1344
|
-
innerHTML:
|
|
1345
|
-
}, null, 8,
|
|
1346
|
-
], 8,
|
|
1410
|
+
innerHTML: C.icon
|
|
1411
|
+
}, null, 8, Uo)
|
|
1412
|
+
], 8, No))), 128))
|
|
1347
1413
|
]))
|
|
1348
1414
|
], 2));
|
|
1349
1415
|
}
|
|
1350
|
-
}),
|
|
1416
|
+
}), Wo = ["tabindex"], Go = /* @__PURE__ */ te({
|
|
1351
1417
|
__name: "ARow",
|
|
1352
1418
|
props: {
|
|
1353
1419
|
rowIndex: {},
|
|
@@ -1357,97 +1423,97 @@ const io = (e) => {
|
|
|
1357
1423
|
},
|
|
1358
1424
|
emits: ["row:action"],
|
|
1359
1425
|
setup(e, { emit: t }) {
|
|
1360
|
-
const n = t, o =
|
|
1426
|
+
const n = t, o = fe("rowEl"), a = $(() => e.store.isRowVisible(e.rowIndex)), r = $(() => e.store.getRowExpandSymbol(e.rowIndex)), s = $(() => e.store.config.rowActions || { enabled: !1 }), l = $(() => s.value.enabled), i = $(() => s.value.position || "before-index"), u = (c, p) => {
|
|
1361
1427
|
n("row:action", c, p);
|
|
1362
1428
|
};
|
|
1363
1429
|
if (e.addNavigation) {
|
|
1364
|
-
let c =
|
|
1430
|
+
let c = wt;
|
|
1365
1431
|
typeof e.addNavigation == "object" && (c = {
|
|
1366
1432
|
...c,
|
|
1367
1433
|
...e.addNavigation
|
|
1368
|
-
}),
|
|
1434
|
+
}), Ot([
|
|
1369
1435
|
{
|
|
1370
1436
|
selectors: o,
|
|
1371
1437
|
handlers: c
|
|
1372
1438
|
}
|
|
1373
1439
|
]);
|
|
1374
1440
|
}
|
|
1375
|
-
return (c, p) =>
|
|
1441
|
+
return (c, p) => J((w(), k("tr", {
|
|
1376
1442
|
ref: "rowEl",
|
|
1377
1443
|
tabindex: e.tabIndex,
|
|
1378
1444
|
class: "atable-row"
|
|
1379
1445
|
}, [
|
|
1380
|
-
l.value && i.value === "before-index" ? (w(),
|
|
1446
|
+
l.value && i.value === "before-index" ? (w(), pe(ut, {
|
|
1381
1447
|
key: 0,
|
|
1382
1448
|
"row-index": e.rowIndex,
|
|
1383
1449
|
store: e.store,
|
|
1384
1450
|
config: s.value,
|
|
1385
1451
|
position: i.value,
|
|
1386
1452
|
onAction: u
|
|
1387
|
-
}, null, 8, ["row-index", "store", "config", "position"])) :
|
|
1388
|
-
e.store.config.view !== "uncounted" ?
|
|
1453
|
+
}, null, 8, ["row-index", "store", "config", "position"])) : q("", !0),
|
|
1454
|
+
e.store.config.view !== "uncounted" ? he(c.$slots, "index", { key: 1 }, () => [
|
|
1389
1455
|
e.store.config.view === "list" ? (w(), k("td", {
|
|
1390
1456
|
key: 0,
|
|
1391
1457
|
tabIndex: -1,
|
|
1392
|
-
class:
|
|
1393
|
-
},
|
|
1458
|
+
class: ae(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
|
|
1459
|
+
}, K(e.rowIndex + 1), 3)) : e.store.isTreeView ? (w(), k("td", {
|
|
1394
1460
|
key: 1,
|
|
1395
1461
|
tabIndex: -1,
|
|
1396
|
-
class:
|
|
1462
|
+
class: ae(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
|
|
1397
1463
|
onClick: p[0] || (p[0] = (h) => e.store.toggleRowExpand(e.rowIndex))
|
|
1398
|
-
},
|
|
1399
|
-
], !0) :
|
|
1400
|
-
l.value && i.value === "after-index" ? (w(),
|
|
1464
|
+
}, K(r.value), 3)) : q("", !0)
|
|
1465
|
+
], !0) : q("", !0),
|
|
1466
|
+
l.value && i.value === "after-index" ? (w(), pe(ut, {
|
|
1401
1467
|
key: 2,
|
|
1402
1468
|
"row-index": e.rowIndex,
|
|
1403
1469
|
store: e.store,
|
|
1404
1470
|
config: s.value,
|
|
1405
1471
|
position: i.value,
|
|
1406
1472
|
onAction: u
|
|
1407
|
-
}, null, 8, ["row-index", "store", "config", "position"])) :
|
|
1408
|
-
|
|
1409
|
-
l.value && i.value === "end" ? (w(),
|
|
1473
|
+
}, null, 8, ["row-index", "store", "config", "position"])) : q("", !0),
|
|
1474
|
+
he(c.$slots, "default", {}, void 0, !0),
|
|
1475
|
+
l.value && i.value === "end" ? (w(), pe(ut, {
|
|
1410
1476
|
key: 3,
|
|
1411
1477
|
"row-index": e.rowIndex,
|
|
1412
1478
|
store: e.store,
|
|
1413
1479
|
config: s.value,
|
|
1414
1480
|
position: i.value,
|
|
1415
1481
|
onAction: u
|
|
1416
|
-
}, null, 8, ["row-index", "store", "config", "position"])) :
|
|
1417
|
-
], 8,
|
|
1418
|
-
[
|
|
1482
|
+
}, null, 8, ["row-index", "store", "config", "position"])) : q("", !0)
|
|
1483
|
+
], 8, Wo)), [
|
|
1484
|
+
[Ce, a.value]
|
|
1419
1485
|
]);
|
|
1420
1486
|
}
|
|
1421
|
-
}),
|
|
1487
|
+
}), hn = /* @__PURE__ */ Ve(Go, [["__scopeId", "data-v-c35a3748"]]), It = /* @__PURE__ */ new WeakMap(), zo = {
|
|
1422
1488
|
mounted(e, t) {
|
|
1423
1489
|
const n = !t.modifiers.bubble;
|
|
1424
1490
|
let o;
|
|
1425
|
-
if (typeof t.value == "function") o =
|
|
1491
|
+
if (typeof t.value == "function") o = $t(e, t.value, { capture: n });
|
|
1426
1492
|
else {
|
|
1427
1493
|
const [a, r] = t.value;
|
|
1428
|
-
o =
|
|
1494
|
+
o = $t(e, a, Object.assign({ capture: n }, r));
|
|
1429
1495
|
}
|
|
1430
|
-
|
|
1496
|
+
It.set(e, o);
|
|
1431
1497
|
},
|
|
1432
1498
|
unmounted(e) {
|
|
1433
|
-
const t =
|
|
1434
|
-
t && typeof t == "function" ? t() : t?.stop(),
|
|
1499
|
+
const t = It.get(e);
|
|
1500
|
+
t && typeof t == "function" ? t() : t?.stop(), It.delete(e);
|
|
1435
1501
|
}
|
|
1436
|
-
},
|
|
1437
|
-
typeof t.value == "function" ?
|
|
1502
|
+
}, qo = { mounted(e, t) {
|
|
1503
|
+
typeof t.value == "function" ? ft(e, t.value) : ft(e, ...t.value);
|
|
1438
1504
|
} };
|
|
1439
|
-
function
|
|
1505
|
+
function Yo() {
|
|
1440
1506
|
let e = !1;
|
|
1441
|
-
const t =
|
|
1507
|
+
const t = ie(!1);
|
|
1442
1508
|
return (n, o) => {
|
|
1443
1509
|
if (t.value = o.value, e) return;
|
|
1444
1510
|
e = !0;
|
|
1445
|
-
const a =
|
|
1446
|
-
|
|
1511
|
+
const a = uo(n, o.value);
|
|
1512
|
+
oe(t, (r) => a.value = r);
|
|
1447
1513
|
};
|
|
1448
1514
|
}
|
|
1449
|
-
|
|
1450
|
-
const
|
|
1515
|
+
Yo();
|
|
1516
|
+
const Xo = { class: "gantt-connection-overlay" }, jo = {
|
|
1451
1517
|
class: "connection-svg",
|
|
1452
1518
|
style: {
|
|
1453
1519
|
position: "absolute",
|
|
@@ -1458,30 +1524,30 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
1458
1524
|
pointerEvents: "none",
|
|
1459
1525
|
zIndex: 1
|
|
1460
1526
|
}
|
|
1461
|
-
},
|
|
1527
|
+
}, Jo = ["d", "stroke-width", "onDblclick"], Qo = ["id", "d", "stroke", "stroke-width", "onDblclick"], Ko = 0.25, at = 16, el = /* @__PURE__ */ te({
|
|
1462
1528
|
__name: "AGanttConnection",
|
|
1463
1529
|
props: {
|
|
1464
1530
|
store: {}
|
|
1465
1531
|
},
|
|
1466
1532
|
emits: ["connection:delete"],
|
|
1467
1533
|
setup(e, { emit: t }) {
|
|
1468
|
-
const n = t, o =
|
|
1534
|
+
const n = t, o = $(() => e.store.connectionPaths.filter((s) => {
|
|
1469
1535
|
const l = e.store.ganttBars.find((u) => u.id === s.from.barId), i = e.store.ganttBars.find((u) => u.id === s.to.barId);
|
|
1470
1536
|
return l && i;
|
|
1471
1537
|
})), a = (s) => {
|
|
1472
1538
|
const l = e.store.connectionHandles.find(
|
|
1473
|
-
(
|
|
1539
|
+
(_) => _.barId === s.from.barId && _.side === s.from.side
|
|
1474
1540
|
), i = e.store.connectionHandles.find(
|
|
1475
|
-
(
|
|
1541
|
+
(_) => _.barId === s.to.barId && _.side === s.to.side
|
|
1476
1542
|
);
|
|
1477
1543
|
if (!l || !i) return "";
|
|
1478
|
-
const u = l.position.x +
|
|
1479
|
-
return `M ${u} ${c} Q ${x} ${c}, ${
|
|
1544
|
+
const u = l.position.x + at / 2, c = l.position.y + at / 2, p = i.position.x + at / 2, h = i.position.y + at / 2, b = Math.abs(p - u), I = Math.max(b * Ko, 50), x = u + (s.from.side === "left" ? -I : I), f = p + (s.to.side === "left" ? -I : I), m = { x: 0.5 * u + 0.5 * x, y: 0.5 * c + 0.5 * c }, g = { x: 0.5 * x + 0.5 * f, y: 0.5 * c + 0.5 * h }, C = { x: 0.5 * f + 0.5 * p, y: 0.5 * h + 0.5 * h }, T = { x: 0.5 * m.x + 0.5 * g.x, y: 0.5 * m.y + 0.5 * g.y }, R = { x: 0.5 * g.x + 0.5 * C.x, y: 0.5 * g.y + 0.5 * C.y }, S = { x: 0.5 * T.x + 0.5 * R.x, y: 0.5 * T.y + 0.5 * R.y };
|
|
1545
|
+
return `M ${u} ${c} Q ${x} ${c}, ${S.x} ${S.y} Q ${f} ${h}, ${p} ${h}`;
|
|
1480
1546
|
}, r = (s) => {
|
|
1481
1547
|
e.store.deleteConnection(s.id) && n("connection:delete", s);
|
|
1482
1548
|
};
|
|
1483
|
-
return (s, l) => (w(), k("div",
|
|
1484
|
-
(w(), k("svg",
|
|
1549
|
+
return (s, l) => (w(), k("div", Xo, [
|
|
1550
|
+
(w(), k("svg", jo, [
|
|
1485
1551
|
l[0] || (l[0] = y("defs", null, [
|
|
1486
1552
|
y("path", {
|
|
1487
1553
|
id: "arrowhead",
|
|
@@ -1505,7 +1571,7 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
1505
1571
|
})
|
|
1506
1572
|
])
|
|
1507
1573
|
], -1)),
|
|
1508
|
-
(w(!0), k(
|
|
1574
|
+
(w(!0), k(ue, null, me(o.value, (i) => (w(), k("path", {
|
|
1509
1575
|
key: `${i.id}-hitbox`,
|
|
1510
1576
|
d: a(i),
|
|
1511
1577
|
stroke: "transparent",
|
|
@@ -1513,8 +1579,8 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
1513
1579
|
fill: "none",
|
|
1514
1580
|
class: "connection-hitbox",
|
|
1515
1581
|
onDblclick: (u) => r(i)
|
|
1516
|
-
}, null, 40,
|
|
1517
|
-
(w(!0), k(
|
|
1582
|
+
}, null, 40, Jo))), 128)),
|
|
1583
|
+
(w(!0), k(ue, null, me(o.value, (i) => (w(), k("path", {
|
|
1518
1584
|
id: i.id,
|
|
1519
1585
|
key: i.id,
|
|
1520
1586
|
d: a(i),
|
|
@@ -1524,17 +1590,17 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
1524
1590
|
"marker-mid": "url(#arrowhead-marker)",
|
|
1525
1591
|
class: "connection-path animated-path",
|
|
1526
1592
|
onDblclick: (u) => r(i)
|
|
1527
|
-
}, null, 40,
|
|
1593
|
+
}, null, 40, Qo))), 128))
|
|
1528
1594
|
]))
|
|
1529
1595
|
]));
|
|
1530
1596
|
}
|
|
1531
|
-
}),
|
|
1597
|
+
}), tl = /* @__PURE__ */ Ve(el, [["__scopeId", "data-v-71911260"]]), nl = { class: "column-filter" }, ol = {
|
|
1532
1598
|
key: 2,
|
|
1533
1599
|
class: "checkbox-filter"
|
|
1534
|
-
},
|
|
1600
|
+
}, ll = ["value"], al = {
|
|
1535
1601
|
key: 5,
|
|
1536
1602
|
class: "date-range-filter"
|
|
1537
|
-
},
|
|
1603
|
+
}, sl = /* @__PURE__ */ te({
|
|
1538
1604
|
__name: "ATableColumnFilter",
|
|
1539
1605
|
props: {
|
|
1540
1606
|
column: {},
|
|
@@ -1542,7 +1608,7 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
1542
1608
|
store: {}
|
|
1543
1609
|
},
|
|
1544
1610
|
setup(e) {
|
|
1545
|
-
const t =
|
|
1611
|
+
const t = L(""), n = rn({
|
|
1546
1612
|
startValue: "",
|
|
1547
1613
|
endValue: ""
|
|
1548
1614
|
}), o = (i) => {
|
|
@@ -1555,7 +1621,7 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
1555
1621
|
value: c,
|
|
1556
1622
|
label: String(c)
|
|
1557
1623
|
}));
|
|
1558
|
-
}, a =
|
|
1624
|
+
}, a = $(() => !!(t.value || n.startValue || n.endValue)), r = (i) => {
|
|
1559
1625
|
!i && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = i, e.store.setFilter(e.colIndex, { value: i }));
|
|
1560
1626
|
}, s = (i, u) => {
|
|
1561
1627
|
i === "start" ? n.startValue = u : n.endValue = u, !n.startValue && !n.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
|
|
@@ -1566,189 +1632,189 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
1566
1632
|
}, l = () => {
|
|
1567
1633
|
t.value = "", n.startValue = "", n.endValue = "", e.store.clearFilter(e.colIndex);
|
|
1568
1634
|
};
|
|
1569
|
-
return (i, u) => (w(), k("div",
|
|
1570
|
-
(e.column.filterType || "text") === "text" ?
|
|
1635
|
+
return (i, u) => (w(), k("div", nl, [
|
|
1636
|
+
(e.column.filterType || "text") === "text" ? J((w(), k("input", {
|
|
1571
1637
|
key: 0,
|
|
1572
1638
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => t.value = c),
|
|
1573
1639
|
type: "text",
|
|
1574
1640
|
class: "filter-input",
|
|
1575
1641
|
onInput: u[1] || (u[1] = (c) => r(t.value))
|
|
1576
1642
|
}, null, 544)), [
|
|
1577
|
-
[
|
|
1578
|
-
]) : e.column.filterType === "number" ?
|
|
1643
|
+
[we, t.value]
|
|
1644
|
+
]) : e.column.filterType === "number" ? J((w(), k("input", {
|
|
1579
1645
|
key: 1,
|
|
1580
1646
|
"onUpdate:modelValue": u[2] || (u[2] = (c) => t.value = c),
|
|
1581
1647
|
type: "number",
|
|
1582
1648
|
class: "filter-input",
|
|
1583
1649
|
onInput: u[3] || (u[3] = (c) => r(t.value))
|
|
1584
1650
|
}, null, 544)), [
|
|
1585
|
-
[
|
|
1586
|
-
]) : e.column.filterType === "checkbox" ? (w(), k("label",
|
|
1587
|
-
|
|
1651
|
+
[we, t.value]
|
|
1652
|
+
]) : e.column.filterType === "checkbox" ? (w(), k("label", ol, [
|
|
1653
|
+
J(y("input", {
|
|
1588
1654
|
"onUpdate:modelValue": u[4] || (u[4] = (c) => t.value = c),
|
|
1589
1655
|
type: "checkbox",
|
|
1590
1656
|
class: "filter-checkbox",
|
|
1591
1657
|
onChange: u[5] || (u[5] = (c) => r(t.value))
|
|
1592
1658
|
}, null, 544), [
|
|
1593
|
-
[
|
|
1659
|
+
[un, t.value]
|
|
1594
1660
|
]),
|
|
1595
|
-
y("span", null,
|
|
1596
|
-
])) : e.column.filterType === "select" ?
|
|
1661
|
+
y("span", null, K(e.column.label), 1)
|
|
1662
|
+
])) : e.column.filterType === "select" ? J((w(), k("select", {
|
|
1597
1663
|
key: 3,
|
|
1598
1664
|
"onUpdate:modelValue": u[6] || (u[6] = (c) => t.value = c),
|
|
1599
1665
|
class: "filter-select",
|
|
1600
1666
|
onChange: u[7] || (u[7] = (c) => r(t.value))
|
|
1601
1667
|
}, [
|
|
1602
1668
|
u[15] || (u[15] = y("option", { value: "" }, "All", -1)),
|
|
1603
|
-
(w(!0), k(
|
|
1669
|
+
(w(!0), k(ue, null, me(o(e.column), (c) => (w(), k("option", {
|
|
1604
1670
|
key: c.value || c,
|
|
1605
1671
|
value: c.value || c
|
|
1606
|
-
},
|
|
1672
|
+
}, K(c.label || c), 9, ll))), 128))
|
|
1607
1673
|
], 544)), [
|
|
1608
|
-
[
|
|
1609
|
-
]) : e.column.filterType === "date" ?
|
|
1674
|
+
[Cn, t.value]
|
|
1675
|
+
]) : e.column.filterType === "date" ? J((w(), k("input", {
|
|
1610
1676
|
key: 4,
|
|
1611
1677
|
"onUpdate:modelValue": u[8] || (u[8] = (c) => t.value = c),
|
|
1612
1678
|
type: "date",
|
|
1613
1679
|
class: "filter-input",
|
|
1614
1680
|
onChange: u[9] || (u[9] = (c) => r(t.value))
|
|
1615
1681
|
}, null, 544)), [
|
|
1616
|
-
[
|
|
1617
|
-
]) : e.column.filterType === "dateRange" ? (w(), k("div",
|
|
1618
|
-
|
|
1682
|
+
[we, t.value]
|
|
1683
|
+
]) : e.column.filterType === "dateRange" ? (w(), k("div", al, [
|
|
1684
|
+
J(y("input", {
|
|
1619
1685
|
"onUpdate:modelValue": u[10] || (u[10] = (c) => n.startValue = c),
|
|
1620
1686
|
type: "date",
|
|
1621
1687
|
class: "filter-input",
|
|
1622
1688
|
onChange: u[11] || (u[11] = (c) => s("start", n.startValue))
|
|
1623
1689
|
}, null, 544), [
|
|
1624
|
-
[
|
|
1690
|
+
[we, n.startValue]
|
|
1625
1691
|
]),
|
|
1626
1692
|
u[16] || (u[16] = y("span", { class: "date-separator" }, "-", -1)),
|
|
1627
|
-
|
|
1693
|
+
J(y("input", {
|
|
1628
1694
|
"onUpdate:modelValue": u[12] || (u[12] = (c) => n.endValue = c),
|
|
1629
1695
|
type: "date",
|
|
1630
1696
|
class: "filter-input",
|
|
1631
1697
|
onChange: u[13] || (u[13] = (c) => s("end", n.endValue))
|
|
1632
1698
|
}, null, 544), [
|
|
1633
|
-
[
|
|
1699
|
+
[we, n.endValue]
|
|
1634
1700
|
])
|
|
1635
|
-
])) : e.column.filterType === "component" && e.column.filterComponent ? (w(),
|
|
1701
|
+
])) : e.column.filterType === "component" && e.column.filterComponent ? (w(), pe(We(e.column.filterComponent), {
|
|
1636
1702
|
key: 6,
|
|
1637
1703
|
value: t.value,
|
|
1638
1704
|
column: e.column,
|
|
1639
1705
|
colIndex: e.colIndex,
|
|
1640
1706
|
store: e.store,
|
|
1641
1707
|
"onUpdate:value": u[14] || (u[14] = (c) => r(c))
|
|
1642
|
-
}, null, 40, ["value", "column", "colIndex", "store"])) :
|
|
1708
|
+
}, null, 40, ["value", "column", "colIndex", "store"])) : q("", !0),
|
|
1643
1709
|
a.value ? (w(), k("button", {
|
|
1644
1710
|
key: 7,
|
|
1645
1711
|
onClick: l,
|
|
1646
1712
|
class: "clear-btn",
|
|
1647
1713
|
title: "Clear"
|
|
1648
|
-
}, "×")) :
|
|
1714
|
+
}, "×")) : q("", !0)
|
|
1649
1715
|
]));
|
|
1650
1716
|
}
|
|
1651
|
-
}),
|
|
1717
|
+
}), rl = /* @__PURE__ */ Ve(sl, [["__scopeId", "data-v-8487462d"]]), il = { key: 0 }, ul = {
|
|
1652
1718
|
class: "atable-header-row",
|
|
1653
1719
|
tabindex: "-1"
|
|
1654
|
-
},
|
|
1720
|
+
}, cl = {
|
|
1655
1721
|
key: 2,
|
|
1656
1722
|
class: "row-actions-header"
|
|
1657
|
-
},
|
|
1723
|
+
}, dl = ["data-colindex", "onClick"], fl = {
|
|
1658
1724
|
key: 3,
|
|
1659
1725
|
class: "row-actions-header"
|
|
1660
|
-
},
|
|
1726
|
+
}, vl = {
|
|
1661
1727
|
key: 0,
|
|
1662
1728
|
class: "atable-filters-row"
|
|
1663
|
-
},
|
|
1729
|
+
}, pl = {
|
|
1664
1730
|
key: 2,
|
|
1665
1731
|
class: "row-actions-header"
|
|
1666
|
-
},
|
|
1732
|
+
}, ml = {
|
|
1667
1733
|
key: 3,
|
|
1668
1734
|
class: "row-actions-header"
|
|
1669
|
-
},
|
|
1735
|
+
}, gn = /* @__PURE__ */ te({
|
|
1670
1736
|
__name: "ATableHeader",
|
|
1671
1737
|
props: {
|
|
1672
1738
|
columns: {},
|
|
1673
1739
|
store: {}
|
|
1674
1740
|
},
|
|
1675
1741
|
setup(e) {
|
|
1676
|
-
const t = e, n =
|
|
1742
|
+
const t = e, n = $(() => t.columns.filter((l) => l.filterable)), o = $(() => t.store.config.value?.rowActions?.enabled ?? !1), a = $(() => t.store.config.value?.rowActions?.position ?? "before-index"), r = (l) => t.store.sortByColumn(l), s = (l) => {
|
|
1677
1743
|
for (const i of l) {
|
|
1678
1744
|
if (i.borderBoxSize.length === 0) continue;
|
|
1679
1745
|
const u = i.borderBoxSize[0].inlineSize, c = Number(i.target.dataset.colindex), p = t.store.columns[c]?.width;
|
|
1680
1746
|
typeof p == "number" && p !== u && t.store.resizeColumn(c, u);
|
|
1681
1747
|
}
|
|
1682
1748
|
};
|
|
1683
|
-
return (l, i) => t.columns.length ? (w(), k("thead",
|
|
1684
|
-
y("tr",
|
|
1749
|
+
return (l, i) => t.columns.length ? (w(), k("thead", il, [
|
|
1750
|
+
y("tr", ul, [
|
|
1685
1751
|
o.value && a.value === "before-index" ? (w(), k("th", {
|
|
1686
1752
|
key: 0,
|
|
1687
|
-
class:
|
|
1688
|
-
}, null, 2)) :
|
|
1753
|
+
class: ae(["row-actions-header", { "sticky-column": a.value === "before-index" }])
|
|
1754
|
+
}, null, 2)) : q("", !0),
|
|
1689
1755
|
t.store.zeroColumn ? (w(), k("th", {
|
|
1690
1756
|
key: 1,
|
|
1691
1757
|
id: "header-index",
|
|
1692
|
-
class:
|
|
1758
|
+
class: ae([[
|
|
1693
1759
|
t.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1694
1760
|
t.store.isTreeView ? "tree-index" : "",
|
|
1695
1761
|
t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1696
1762
|
], "list-index"])
|
|
1697
|
-
}, null, 2)) :
|
|
1698
|
-
o.value && a.value === "after-index" ? (w(), k("th",
|
|
1699
|
-
(w(!0), k(
|
|
1763
|
+
}, null, 2)) : q("", !0),
|
|
1764
|
+
o.value && a.value === "after-index" ? (w(), k("th", cl)) : q("", !0),
|
|
1765
|
+
(w(!0), k(ue, null, me(t.columns, (u, c) => J((w(), k("th", {
|
|
1700
1766
|
key: u.name,
|
|
1701
1767
|
"data-colindex": c,
|
|
1702
1768
|
tabindex: "-1",
|
|
1703
|
-
style:
|
|
1704
|
-
class:
|
|
1769
|
+
style: xe(t.store.getHeaderCellStyle(u)),
|
|
1770
|
+
class: ae(`${u.pinned ? "sticky-column" : ""} ${u.sortable === !1 ? "" : "cursor-pointer"}`),
|
|
1705
1771
|
onClick: (p) => u.sortable !== !1 ? r(c) : void 0
|
|
1706
1772
|
}, [
|
|
1707
|
-
|
|
1708
|
-
Dt(
|
|
1773
|
+
he(l.$slots, "default", {}, () => [
|
|
1774
|
+
Dt(K(u.label || String.fromCharCode(c + 97).toUpperCase()), 1)
|
|
1709
1775
|
])
|
|
1710
|
-
], 14,
|
|
1711
|
-
[
|
|
1776
|
+
], 14, dl)), [
|
|
1777
|
+
[V(qo), s]
|
|
1712
1778
|
])), 128)),
|
|
1713
|
-
o.value && a.value === "end" ? (w(), k("th",
|
|
1779
|
+
o.value && a.value === "end" ? (w(), k("th", fl)) : q("", !0)
|
|
1714
1780
|
]),
|
|
1715
|
-
n.value.length > 0 ? (w(), k("tr",
|
|
1781
|
+
n.value.length > 0 ? (w(), k("tr", vl, [
|
|
1716
1782
|
o.value && a.value === "before-index" ? (w(), k("th", {
|
|
1717
1783
|
key: 0,
|
|
1718
|
-
class:
|
|
1719
|
-
}, null, 2)) :
|
|
1784
|
+
class: ae(["row-actions-header", { "sticky-column": a.value === "before-index" }])
|
|
1785
|
+
}, null, 2)) : q("", !0),
|
|
1720
1786
|
t.store.zeroColumn ? (w(), k("th", {
|
|
1721
1787
|
key: 1,
|
|
1722
|
-
class:
|
|
1788
|
+
class: ae([[
|
|
1723
1789
|
t.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1724
1790
|
t.store.isTreeView ? "tree-index" : "",
|
|
1725
1791
|
t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1726
1792
|
], "list-index"])
|
|
1727
|
-
}, null, 2)) :
|
|
1728
|
-
o.value && a.value === "after-index" ? (w(), k("th",
|
|
1729
|
-
(w(!0), k(
|
|
1793
|
+
}, null, 2)) : q("", !0),
|
|
1794
|
+
o.value && a.value === "after-index" ? (w(), k("th", pl)) : q("", !0),
|
|
1795
|
+
(w(!0), k(ue, null, me(t.columns, (u, c) => (w(), k("th", {
|
|
1730
1796
|
key: `filter-${u.name}`,
|
|
1731
|
-
class:
|
|
1732
|
-
style:
|
|
1797
|
+
class: ae(`${u.pinned ? "sticky-column" : ""}`),
|
|
1798
|
+
style: xe(t.store.getHeaderCellStyle(u))
|
|
1733
1799
|
}, [
|
|
1734
|
-
u.filterable ? (w(),
|
|
1800
|
+
u.filterable ? (w(), pe(rl, {
|
|
1735
1801
|
key: 0,
|
|
1736
1802
|
column: u,
|
|
1737
1803
|
"col-index": c,
|
|
1738
1804
|
store: t.store
|
|
1739
|
-
}, null, 8, ["column", "col-index", "store"])) :
|
|
1805
|
+
}, null, 8, ["column", "col-index", "store"])) : q("", !0)
|
|
1740
1806
|
], 6))), 128)),
|
|
1741
|
-
o.value && a.value === "end" ? (w(), k("th",
|
|
1742
|
-
])) :
|
|
1743
|
-
])) :
|
|
1807
|
+
o.value && a.value === "end" ? (w(), k("th", ml)) : q("", !0)
|
|
1808
|
+
])) : q("", !0)
|
|
1809
|
+
])) : q("", !0);
|
|
1744
1810
|
}
|
|
1745
|
-
}),
|
|
1811
|
+
}), wn = /* @__PURE__ */ te({
|
|
1746
1812
|
__name: "ATableModal",
|
|
1747
1813
|
props: {
|
|
1748
1814
|
store: {}
|
|
1749
1815
|
},
|
|
1750
1816
|
setup(e) {
|
|
1751
|
-
const t =
|
|
1817
|
+
const t = fe("amodal"), { width: n, height: o } = Pe(t), a = $(() => {
|
|
1752
1818
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
|
|
1753
1819
|
const r = e.store.modal.cell?.closest("table");
|
|
1754
1820
|
if (!r) return {};
|
|
@@ -1766,38 +1832,38 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
1766
1832
|
ref: "amodal",
|
|
1767
1833
|
class: "amodal",
|
|
1768
1834
|
tabindex: "-1",
|
|
1769
|
-
style:
|
|
1770
|
-
onClick: s[0] || (s[0] =
|
|
1835
|
+
style: xe(a.value),
|
|
1836
|
+
onClick: s[0] || (s[0] = Ie(() => {
|
|
1771
1837
|
}, ["stop"])),
|
|
1772
|
-
onInput: s[1] || (s[1] =
|
|
1838
|
+
onInput: s[1] || (s[1] = Ie(() => {
|
|
1773
1839
|
}, ["stop"]))
|
|
1774
1840
|
}, [
|
|
1775
|
-
|
|
1841
|
+
he(r.$slots, "default")
|
|
1776
1842
|
], 36));
|
|
1777
1843
|
}
|
|
1778
|
-
}),
|
|
1779
|
-
const t = e.id ||
|
|
1844
|
+
}), hl = (e) => {
|
|
1845
|
+
const t = e.id || fo();
|
|
1780
1846
|
return Dn(`table-${t}`, () => {
|
|
1781
1847
|
const n = () => {
|
|
1782
|
-
const d = [Object.assign({}, { rowModified: !1 })],
|
|
1848
|
+
const d = [Object.assign({}, { rowModified: !1 })], v = /* @__PURE__ */ new Set();
|
|
1783
1849
|
for (let A = 0; A < a.value.length; A++) {
|
|
1784
|
-
const
|
|
1785
|
-
|
|
1850
|
+
const H = a.value[A];
|
|
1851
|
+
H.parent !== null && H.parent !== void 0 && v.add(H.parent);
|
|
1786
1852
|
}
|
|
1787
|
-
const
|
|
1788
|
-
for (let
|
|
1789
|
-
if (a.value[
|
|
1853
|
+
const M = (A) => a.value[A]?.gantt !== void 0, P = (A) => {
|
|
1854
|
+
for (let H = 0; H < a.value.length; H++)
|
|
1855
|
+
if (a.value[H].parent === A && (M(H) || P(H)))
|
|
1790
1856
|
return !0;
|
|
1791
1857
|
return !1;
|
|
1792
|
-
},
|
|
1793
|
-
const
|
|
1794
|
-
if (!
|
|
1795
|
-
switch (
|
|
1858
|
+
}, Z = (A) => {
|
|
1859
|
+
const H = r.value, N = H.view === "tree" || H.view === "tree-gantt" ? H.defaultTreeExpansion : void 0;
|
|
1860
|
+
if (!N) return !0;
|
|
1861
|
+
switch (N) {
|
|
1796
1862
|
case "root":
|
|
1797
1863
|
return !1;
|
|
1798
1864
|
// Only root nodes are visible, all children start collapsed
|
|
1799
1865
|
case "branch":
|
|
1800
|
-
return
|
|
1866
|
+
return P(A);
|
|
1801
1867
|
case "leaf":
|
|
1802
1868
|
return !0;
|
|
1803
1869
|
// All nodes should be expanded
|
|
@@ -1806,244 +1872,244 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
1806
1872
|
}
|
|
1807
1873
|
};
|
|
1808
1874
|
for (let A = 0; A < a.value.length; A++) {
|
|
1809
|
-
const
|
|
1875
|
+
const H = a.value[A], N = H.parent === null || H.parent === void 0, le = v.has(A);
|
|
1810
1876
|
d[A] = {
|
|
1811
|
-
childrenOpen:
|
|
1877
|
+
childrenOpen: Z(A),
|
|
1812
1878
|
expanded: !1,
|
|
1813
|
-
indent:
|
|
1814
|
-
isParent:
|
|
1815
|
-
isRoot:
|
|
1879
|
+
indent: H.indent || 0,
|
|
1880
|
+
isParent: le,
|
|
1881
|
+
isRoot: N,
|
|
1816
1882
|
rowModified: !1,
|
|
1817
|
-
open:
|
|
1883
|
+
open: N,
|
|
1818
1884
|
// This will be recalculated later for non-root nodes
|
|
1819
|
-
parent:
|
|
1885
|
+
parent: H.parent
|
|
1820
1886
|
};
|
|
1821
1887
|
}
|
|
1822
1888
|
return d;
|
|
1823
|
-
}, o =
|
|
1889
|
+
}, o = L(e.columns), a = L(e.rows), r = L(e.config || {}), s = L({}), l = L({}), i = $(() => {
|
|
1824
1890
|
const d = {};
|
|
1825
|
-
for (const [
|
|
1826
|
-
for (const [
|
|
1827
|
-
d[`${
|
|
1891
|
+
for (const [v, M] of o.value.entries())
|
|
1892
|
+
for (const [P, Z] of a.value.entries())
|
|
1893
|
+
d[`${v}:${P}`] = Z[M.name];
|
|
1828
1894
|
return d;
|
|
1829
|
-
}), u =
|
|
1895
|
+
}), u = $({
|
|
1830
1896
|
get: () => {
|
|
1831
1897
|
const d = n();
|
|
1832
|
-
for (let
|
|
1833
|
-
s.value[
|
|
1834
|
-
if (
|
|
1835
|
-
const
|
|
1836
|
-
const
|
|
1837
|
-
if (
|
|
1898
|
+
for (let v = 0; v < d.length; v++)
|
|
1899
|
+
s.value[v] && (d[v].rowModified = s.value[v]), l.value[v] && (l.value[v].childrenOpen !== void 0 && (d[v].childrenOpen = l.value[v].childrenOpen), l.value[v].expanded !== void 0 && (d[v].expanded = l.value[v].expanded));
|
|
1900
|
+
if (C.value) {
|
|
1901
|
+
const v = (M, P) => {
|
|
1902
|
+
const Z = P[M];
|
|
1903
|
+
if (Z.isRoot || Z.parent === null || Z.parent === void 0)
|
|
1838
1904
|
return !0;
|
|
1839
|
-
const A =
|
|
1840
|
-
return A < 0 || A >=
|
|
1905
|
+
const A = Z.parent;
|
|
1906
|
+
return A < 0 || A >= P.length ? !1 : (P[A].childrenOpen || !1) && v(A, P);
|
|
1841
1907
|
};
|
|
1842
|
-
for (let
|
|
1843
|
-
d[
|
|
1908
|
+
for (let M = 0; M < d.length; M++)
|
|
1909
|
+
d[M].isRoot || (d[M].open = v(M, d));
|
|
1844
1910
|
}
|
|
1845
1911
|
return d;
|
|
1846
1912
|
},
|
|
1847
1913
|
set: (d) => {
|
|
1848
1914
|
JSON.stringify(d) !== JSON.stringify(u.value) && (u.value = d);
|
|
1849
1915
|
}
|
|
1850
|
-
}), c =
|
|
1916
|
+
}), c = L(e.modal || { visible: !1 }), p = L({}), h = L([]), b = L([]), I = L([]), x = L({
|
|
1851
1917
|
column: null,
|
|
1852
1918
|
direction: null
|
|
1853
|
-
}),
|
|
1919
|
+
}), f = L({}), m = $(() => o.value.some((d) => d.pinned)), g = $(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), C = $(() => r.value.view === "tree" || r.value.view === "tree-gantt"), T = $(() => {
|
|
1854
1920
|
const d = r.value;
|
|
1855
1921
|
return d.view === "gantt" || d.view === "tree-gantt" ? d.dependencyGraph !== !1 : !0;
|
|
1856
|
-
}),
|
|
1922
|
+
}), R = $(() => `${Math.ceil(a.value.length / 100 + 1)}ch`), S = $(
|
|
1857
1923
|
() => r.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(r.value.view) : !1
|
|
1858
|
-
),
|
|
1859
|
-
let d = a.value.map((
|
|
1860
|
-
...
|
|
1861
|
-
originalIndex:
|
|
1924
|
+
), _ = $(() => {
|
|
1925
|
+
let d = a.value.map((v, M) => ({
|
|
1926
|
+
...v,
|
|
1927
|
+
originalIndex: M
|
|
1862
1928
|
}));
|
|
1863
|
-
if (Object.entries(
|
|
1864
|
-
const
|
|
1865
|
-
!
|
|
1866
|
-
const
|
|
1867
|
-
return
|
|
1929
|
+
if (Object.entries(f.value).forEach(([v, M]) => {
|
|
1930
|
+
const P = parseInt(v), Z = o.value[P];
|
|
1931
|
+
!Z || !(M.value || M.startValue || M.endValue || Z.filterType === "checkbox" && M.value !== void 0) || (d = d.filter((A) => {
|
|
1932
|
+
const H = A[Z.name];
|
|
1933
|
+
return ne(H, M, Z);
|
|
1868
1934
|
}));
|
|
1869
1935
|
}), x.value.column !== null && x.value.direction) {
|
|
1870
|
-
const
|
|
1871
|
-
d.sort((
|
|
1872
|
-
let A =
|
|
1873
|
-
A == null && (A = ""),
|
|
1874
|
-
const
|
|
1875
|
-
if (!isNaN(
|
|
1876
|
-
return
|
|
1936
|
+
const v = o.value[x.value.column], M = x.value.direction;
|
|
1937
|
+
d.sort((P, Z) => {
|
|
1938
|
+
let A = P[v.name], H = Z[v.name];
|
|
1939
|
+
A == null && (A = ""), H == null && (H = "");
|
|
1940
|
+
const N = Number(A), le = Number(H);
|
|
1941
|
+
if (!isNaN(N) && !isNaN(le) && A !== "" && H !== "")
|
|
1942
|
+
return M === "asc" ? N - le : le - N;
|
|
1877
1943
|
{
|
|
1878
|
-
const
|
|
1879
|
-
return
|
|
1944
|
+
const nt = String(A).toLowerCase(), Ut = String(H).toLowerCase();
|
|
1945
|
+
return M === "asc" ? nt.localeCompare(Ut) : Ut.localeCompare(nt);
|
|
1880
1946
|
}
|
|
1881
1947
|
});
|
|
1882
1948
|
}
|
|
1883
1949
|
return d;
|
|
1884
|
-
}),
|
|
1885
|
-
const
|
|
1886
|
-
i.value[
|
|
1887
|
-
...a.value[
|
|
1888
|
-
[
|
|
1950
|
+
}), U = (d, v) => i.value[`${d}:${v}`], ve = (d, v, M) => {
|
|
1951
|
+
const P = `${d}:${v}`, Z = o.value[d];
|
|
1952
|
+
i.value[P] !== M && (s.value[v] = !0), i.value[P] = M, a.value[v] = {
|
|
1953
|
+
...a.value[v],
|
|
1954
|
+
[Z.name]: M
|
|
1889
1955
|
};
|
|
1890
|
-
},
|
|
1956
|
+
}, Y = (d) => {
|
|
1891
1957
|
a.value = d;
|
|
1892
|
-
},
|
|
1893
|
-
const
|
|
1894
|
-
i.value[
|
|
1895
|
-
},
|
|
1896
|
-
const
|
|
1958
|
+
}, X = (d, v, M) => {
|
|
1959
|
+
const P = `${d}:${v}`;
|
|
1960
|
+
i.value[P] !== M && (s.value[v] = !0, p.value[P] = M);
|
|
1961
|
+
}, ge = (d) => {
|
|
1962
|
+
const v = o.value.indexOf(d) === o.value.length - 1, M = r.value.fullWidth ? d.resizable && !v : d.resizable;
|
|
1897
1963
|
return {
|
|
1898
1964
|
width: d.width || "40ch",
|
|
1899
1965
|
textAlign: d.align || "center",
|
|
1900
|
-
...
|
|
1966
|
+
...M && {
|
|
1901
1967
|
resize: "horizontal",
|
|
1902
1968
|
overflow: "hidden",
|
|
1903
1969
|
whiteSpace: "nowrap"
|
|
1904
1970
|
}
|
|
1905
1971
|
};
|
|
1906
|
-
},
|
|
1972
|
+
}, de = (d, v) => {
|
|
1907
1973
|
if (d < 0 || d >= o.value.length) return;
|
|
1908
|
-
const
|
|
1974
|
+
const M = Math.max(v, 40);
|
|
1909
1975
|
o.value[d] = {
|
|
1910
1976
|
...o.value[d],
|
|
1911
|
-
width: `${
|
|
1977
|
+
width: `${M}px`
|
|
1912
1978
|
};
|
|
1913
|
-
},
|
|
1914
|
-
const
|
|
1915
|
-
return g.value &&
|
|
1916
|
-
},
|
|
1917
|
-
if (
|
|
1918
|
-
const
|
|
1979
|
+
}, Be = (d) => {
|
|
1980
|
+
const v = a.value[d];
|
|
1981
|
+
return g.value && v.gantt !== void 0;
|
|
1982
|
+
}, Re = (d) => !C.value || u.value[d].isRoot || u.value[d].open, Xe = (d) => !C.value && r.value.view !== "list-expansion" ? "" : C.value && (u.value[d].isRoot || u.value[d].isParent) ? u.value[d].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? u.value[d].expanded ? "▼" : "►" : "", je = (d) => {
|
|
1983
|
+
if (C.value) {
|
|
1984
|
+
const v = l.value[d] || {}, M = !(v.childrenOpen ?? u.value[d].childrenOpen);
|
|
1919
1985
|
l.value[d] = {
|
|
1920
|
-
...
|
|
1921
|
-
childrenOpen:
|
|
1922
|
-
},
|
|
1986
|
+
...v,
|
|
1987
|
+
childrenOpen: M
|
|
1988
|
+
}, M || Fe(d);
|
|
1923
1989
|
} else if (r.value.view === "list-expansion") {
|
|
1924
|
-
const
|
|
1990
|
+
const v = l.value[d] || {}, M = v.expanded ?? u.value[d].expanded;
|
|
1925
1991
|
l.value[d] = {
|
|
1926
|
-
...
|
|
1927
|
-
expanded: !
|
|
1992
|
+
...v,
|
|
1993
|
+
expanded: !M
|
|
1928
1994
|
};
|
|
1929
1995
|
}
|
|
1930
|
-
},
|
|
1931
|
-
for (let
|
|
1932
|
-
if (u.value[
|
|
1933
|
-
const
|
|
1934
|
-
l.value[
|
|
1935
|
-
...
|
|
1996
|
+
}, Fe = (d) => {
|
|
1997
|
+
for (let v = 0; v < a.value.length; v++)
|
|
1998
|
+
if (u.value[v].parent === d) {
|
|
1999
|
+
const M = l.value[v] || {};
|
|
2000
|
+
l.value[v] = {
|
|
2001
|
+
...M,
|
|
1936
2002
|
childrenOpen: !1
|
|
1937
|
-
},
|
|
2003
|
+
}, Fe(v);
|
|
1938
2004
|
}
|
|
1939
|
-
},
|
|
1940
|
-
const
|
|
1941
|
-
return
|
|
1942
|
-
},
|
|
1943
|
-
const
|
|
1944
|
-
return A ? typeof A == "function" ? A(
|
|
1945
|
-
},
|
|
2005
|
+
}, Je = (d, v) => {
|
|
2006
|
+
const M = U(d, v);
|
|
2007
|
+
return Ze(d, v, M);
|
|
2008
|
+
}, Ze = (d, v, M) => {
|
|
2009
|
+
const P = o.value[d], Z = a.value[v], A = P.format;
|
|
2010
|
+
return A ? typeof A == "function" ? A(M, { table: i.value, row: Z, column: P }) : typeof A == "string" ? Function(`"use strict";return (${A})`)()(M, { table: i.value, row: Z, column: P }) : M : M;
|
|
2011
|
+
}, D = (d) => {
|
|
1946
2012
|
d.target instanceof Node && c.value.parent?.contains(d.target) || c.value.visible && (c.value.visible = !1);
|
|
1947
|
-
},
|
|
1948
|
-
const
|
|
1949
|
-
|
|
1950
|
-
},
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1953
|
-
},
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1956
|
-
},
|
|
1957
|
-
const
|
|
1958
|
-
|
|
1959
|
-
},
|
|
1960
|
-
const
|
|
1961
|
-
|
|
1962
|
-
},
|
|
1963
|
-
const
|
|
1964
|
-
if (!
|
|
2013
|
+
}, F = (d, v) => v && d === 0 && v > 0 ? `${v}ch` : "inherit", W = (d) => {
|
|
2014
|
+
const v = a.value[d.rowIndex]?.gantt;
|
|
2015
|
+
v && (d.type === "resize" ? d.edge === "start" ? (v.startIndex = d.newStart, v.endIndex = d.end, v.colspan = v.endIndex - v.startIndex) : d.edge === "end" && (v.startIndex = d.start, v.endIndex = d.newEnd, v.colspan = v.endIndex - v.startIndex) : d.type === "bar" && (v.startIndex = d.newStart, v.endIndex = d.newEnd, v.colspan = v.endIndex - v.startIndex));
|
|
2016
|
+
}, j = (d) => {
|
|
2017
|
+
const v = h.value.findIndex((M) => M.id === d.id);
|
|
2018
|
+
v >= 0 ? h.value[v] = d : h.value.push(d);
|
|
2019
|
+
}, z = (d) => {
|
|
2020
|
+
const v = h.value.findIndex((M) => M.id === d);
|
|
2021
|
+
v >= 0 && h.value.splice(v, 1);
|
|
2022
|
+
}, se = (d) => {
|
|
2023
|
+
const v = b.value.findIndex((M) => M.id === d.id);
|
|
2024
|
+
v >= 0 ? b.value[v] = d : b.value.push(d);
|
|
2025
|
+
}, be = (d) => {
|
|
2026
|
+
const v = b.value.findIndex((M) => M.id === d);
|
|
2027
|
+
v >= 0 && b.value.splice(v, 1);
|
|
2028
|
+
}, Le = (d, v, M) => {
|
|
2029
|
+
const P = b.value.find((H) => H.id === d), Z = b.value.find((H) => H.id === v);
|
|
2030
|
+
if (!P || !Z)
|
|
1965
2031
|
return console.warn("Cannot create connection: handle not found"), null;
|
|
1966
2032
|
const A = {
|
|
1967
|
-
id: `connection-${d}-${
|
|
2033
|
+
id: `connection-${d}-${v}`,
|
|
1968
2034
|
from: {
|
|
1969
|
-
barId:
|
|
1970
|
-
side:
|
|
2035
|
+
barId: P.barId,
|
|
2036
|
+
side: P.side
|
|
1971
2037
|
},
|
|
1972
2038
|
to: {
|
|
1973
|
-
barId:
|
|
1974
|
-
side:
|
|
2039
|
+
barId: Z.barId,
|
|
2040
|
+
side: Z.side
|
|
1975
2041
|
},
|
|
1976
|
-
style:
|
|
1977
|
-
label:
|
|
2042
|
+
style: M?.style,
|
|
2043
|
+
label: M?.label
|
|
1978
2044
|
};
|
|
1979
|
-
return
|
|
1980
|
-
},
|
|
1981
|
-
const
|
|
1982
|
-
return
|
|
1983
|
-
}, B = (d) =>
|
|
2045
|
+
return I.value.push(A), A;
|
|
2046
|
+
}, O = (d) => {
|
|
2047
|
+
const v = I.value.findIndex((M) => M.id === d);
|
|
2048
|
+
return v >= 0 ? (I.value.splice(v, 1), !0) : !1;
|
|
2049
|
+
}, B = (d) => I.value.filter((v) => v.from.barId === d || v.to.barId === d), G = (d) => b.value.filter((v) => v.barId === d), Q = (d) => {
|
|
1984
2050
|
if (o.value[d].sortable === !1) return;
|
|
1985
|
-
let
|
|
1986
|
-
x.value.column === d && x.value.direction === "asc" ?
|
|
1987
|
-
},
|
|
1988
|
-
const
|
|
1989
|
-
if (!
|
|
1990
|
-
switch (
|
|
2051
|
+
let v;
|
|
2052
|
+
x.value.column === d && x.value.direction === "asc" ? v = "desc" : v = "asc", x.value.column = d, x.value.direction = v;
|
|
2053
|
+
}, ne = (d, v, M) => {
|
|
2054
|
+
const P = M.filterType || "text", Z = v.value;
|
|
2055
|
+
if (!Z && P !== "dateRange" && P !== "checkbox") return !0;
|
|
2056
|
+
switch (P) {
|
|
1991
2057
|
case "text": {
|
|
1992
2058
|
let A = "";
|
|
1993
|
-
return typeof d == "object" && d !== null ? A = Object.values(d).join(" ") : A = String(d || ""), A.toLowerCase().includes(String(
|
|
2059
|
+
return typeof d == "object" && d !== null ? A = Object.values(d).join(" ") : A = String(d || ""), A.toLowerCase().includes(String(Z).toLowerCase());
|
|
1994
2060
|
}
|
|
1995
2061
|
case "number": {
|
|
1996
|
-
const A = Number(d),
|
|
1997
|
-
return !isNaN(A) && !isNaN(
|
|
2062
|
+
const A = Number(d), H = Number(Z);
|
|
2063
|
+
return !isNaN(A) && !isNaN(H) && A === H;
|
|
1998
2064
|
}
|
|
1999
2065
|
case "select":
|
|
2000
|
-
return d ===
|
|
2066
|
+
return d === Z;
|
|
2001
2067
|
case "checkbox":
|
|
2002
|
-
return
|
|
2068
|
+
return Z === !0 ? !!d : !0;
|
|
2003
2069
|
case "date": {
|
|
2004
2070
|
let A;
|
|
2005
2071
|
if (typeof d == "number") {
|
|
2006
|
-
const
|
|
2007
|
-
A = new Date(
|
|
2072
|
+
const N = new Date(d), le = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2073
|
+
A = new Date(le, N.getMonth(), N.getDate());
|
|
2008
2074
|
} else
|
|
2009
2075
|
A = new Date(String(d));
|
|
2010
|
-
const
|
|
2011
|
-
return A.toDateString() ===
|
|
2076
|
+
const H = new Date(String(Z));
|
|
2077
|
+
return A.toDateString() === H.toDateString();
|
|
2012
2078
|
}
|
|
2013
2079
|
case "dateRange": {
|
|
2014
|
-
const A =
|
|
2015
|
-
if (!A && !
|
|
2016
|
-
let
|
|
2080
|
+
const A = v.startValue, H = v.endValue;
|
|
2081
|
+
if (!A && !H) return !0;
|
|
2082
|
+
let N;
|
|
2017
2083
|
if (typeof d == "number") {
|
|
2018
|
-
const
|
|
2019
|
-
|
|
2084
|
+
const le = new Date(d), nt = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2085
|
+
N = new Date(nt, le.getMonth(), le.getDate());
|
|
2020
2086
|
} else
|
|
2021
|
-
|
|
2022
|
-
return !(A &&
|
|
2087
|
+
N = new Date(String(d));
|
|
2088
|
+
return !(A && N < new Date(String(A)) || H && N > new Date(String(H)));
|
|
2023
2089
|
}
|
|
2024
2090
|
default:
|
|
2025
2091
|
return !0;
|
|
2026
2092
|
}
|
|
2027
|
-
},
|
|
2028
|
-
!
|
|
2029
|
-
},
|
|
2030
|
-
delete
|
|
2031
|
-
},
|
|
2032
|
-
const
|
|
2033
|
-
for (const
|
|
2034
|
-
|
|
2035
|
-
d && Object.assign(
|
|
2036
|
-
let
|
|
2037
|
-
return
|
|
2093
|
+
}, ee = (d, v) => {
|
|
2094
|
+
!v.value && !v.startValue && !v.endValue ? delete f.value[d] : f.value[d] = v;
|
|
2095
|
+
}, re = (d) => {
|
|
2096
|
+
delete f.value[d];
|
|
2097
|
+
}, ce = (d, v = "end") => {
|
|
2098
|
+
const M = {};
|
|
2099
|
+
for (const Z of o.value)
|
|
2100
|
+
M[Z.name] = "";
|
|
2101
|
+
d && Object.assign(M, d);
|
|
2102
|
+
let P;
|
|
2103
|
+
return v === "start" ? (P = 0, a.value.unshift(M)) : v === "end" ? (P = a.value.length, a.value.push(M)) : (P = Math.max(0, Math.min(v, a.value.length)), a.value.splice(P, 0, M)), P;
|
|
2038
2104
|
};
|
|
2039
2105
|
return {
|
|
2040
2106
|
// state
|
|
2041
2107
|
columns: o,
|
|
2042
2108
|
config: r,
|
|
2043
2109
|
connectionHandles: b,
|
|
2044
|
-
connectionPaths:
|
|
2110
|
+
connectionPaths: I,
|
|
2045
2111
|
display: u,
|
|
2046
|
-
filterState:
|
|
2112
|
+
filterState: f,
|
|
2047
2113
|
ganttBars: h,
|
|
2048
2114
|
modal: c,
|
|
2049
2115
|
rows: a,
|
|
@@ -2051,97 +2117,97 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
2051
2117
|
table: i,
|
|
2052
2118
|
updates: p,
|
|
2053
2119
|
// getters
|
|
2054
|
-
filteredRows:
|
|
2120
|
+
filteredRows: _,
|
|
2055
2121
|
hasPinnedColumns: m,
|
|
2056
2122
|
isGanttView: g,
|
|
2057
|
-
isTreeView:
|
|
2058
|
-
isDependencyGraphEnabled:
|
|
2059
|
-
numberedRowWidth:
|
|
2060
|
-
zeroColumn:
|
|
2123
|
+
isTreeView: C,
|
|
2124
|
+
isDependencyGraphEnabled: T,
|
|
2125
|
+
numberedRowWidth: R,
|
|
2126
|
+
zeroColumn: S,
|
|
2061
2127
|
// actions
|
|
2062
|
-
addRow:
|
|
2063
|
-
clearFilter:
|
|
2064
|
-
closeModal:
|
|
2065
|
-
createConnection:
|
|
2066
|
-
deleteConnection:
|
|
2128
|
+
addRow: ce,
|
|
2129
|
+
clearFilter: re,
|
|
2130
|
+
closeModal: D,
|
|
2131
|
+
createConnection: Le,
|
|
2132
|
+
deleteConnection: O,
|
|
2067
2133
|
deleteRow: (d) => {
|
|
2068
2134
|
if (d < 0 || d >= a.value.length)
|
|
2069
2135
|
return null;
|
|
2070
|
-
const [
|
|
2136
|
+
const [v] = a.value.splice(d, 1);
|
|
2071
2137
|
delete s.value[d], delete l.value[d];
|
|
2072
|
-
const
|
|
2073
|
-
for (const [
|
|
2074
|
-
const
|
|
2075
|
-
|
|
2138
|
+
const M = {}, P = {};
|
|
2139
|
+
for (const [Z, A] of Object.entries(s.value)) {
|
|
2140
|
+
const H = parseInt(Z);
|
|
2141
|
+
H > d ? M[H - 1] = A : M[H] = A;
|
|
2076
2142
|
}
|
|
2077
|
-
for (const [
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2143
|
+
for (const [Z, A] of Object.entries(l.value)) {
|
|
2144
|
+
const H = parseInt(Z);
|
|
2145
|
+
H > d ? P[H - 1] = A : P[H] = A;
|
|
2080
2146
|
}
|
|
2081
|
-
return s.value =
|
|
2147
|
+
return s.value = M, l.value = P, v;
|
|
2082
2148
|
},
|
|
2083
2149
|
duplicateRow: (d) => {
|
|
2084
2150
|
if (d < 0 || d >= a.value.length)
|
|
2085
2151
|
return -1;
|
|
2086
|
-
const
|
|
2087
|
-
return a.value.splice(
|
|
2152
|
+
const v = a.value[d], M = JSON.parse(JSON.stringify(v)), P = d + 1;
|
|
2153
|
+
return a.value.splice(P, 0, M), P;
|
|
2088
2154
|
},
|
|
2089
|
-
getCellData:
|
|
2090
|
-
getCellDisplayValue:
|
|
2155
|
+
getCellData: U,
|
|
2156
|
+
getCellDisplayValue: Je,
|
|
2091
2157
|
getConnectionsForBar: B,
|
|
2092
|
-
getFormattedValue:
|
|
2093
|
-
getHandlesForBar:
|
|
2094
|
-
getHeaderCellStyle:
|
|
2095
|
-
getIndent:
|
|
2096
|
-
getRowExpandSymbol:
|
|
2097
|
-
insertRowAbove: (d,
|
|
2098
|
-
const
|
|
2099
|
-
return
|
|
2158
|
+
getFormattedValue: Ze,
|
|
2159
|
+
getHandlesForBar: G,
|
|
2160
|
+
getHeaderCellStyle: ge,
|
|
2161
|
+
getIndent: F,
|
|
2162
|
+
getRowExpandSymbol: Xe,
|
|
2163
|
+
insertRowAbove: (d, v) => {
|
|
2164
|
+
const M = Math.max(0, d);
|
|
2165
|
+
return ce(v, M);
|
|
2100
2166
|
},
|
|
2101
|
-
insertRowBelow: (d,
|
|
2102
|
-
const
|
|
2103
|
-
return
|
|
2167
|
+
insertRowBelow: (d, v) => {
|
|
2168
|
+
const M = Math.min(d + 1, a.value.length);
|
|
2169
|
+
return ce(v, M);
|
|
2104
2170
|
},
|
|
2105
|
-
isRowGantt:
|
|
2106
|
-
isRowVisible:
|
|
2107
|
-
moveRow: (d,
|
|
2108
|
-
if (d < 0 || d >= a.value.length ||
|
|
2171
|
+
isRowGantt: Be,
|
|
2172
|
+
isRowVisible: Re,
|
|
2173
|
+
moveRow: (d, v) => {
|
|
2174
|
+
if (d < 0 || d >= a.value.length || v < 0 || v >= a.value.length || d === v)
|
|
2109
2175
|
return !1;
|
|
2110
|
-
const [
|
|
2111
|
-
a.value.splice(
|
|
2112
|
-
const
|
|
2113
|
-
for (const [A,
|
|
2114
|
-
const
|
|
2115
|
-
let
|
|
2116
|
-
|
|
2176
|
+
const [M] = a.value.splice(d, 1);
|
|
2177
|
+
a.value.splice(v, 0, M);
|
|
2178
|
+
const P = {}, Z = {};
|
|
2179
|
+
for (const [A, H] of Object.entries(s.value)) {
|
|
2180
|
+
const N = parseInt(A);
|
|
2181
|
+
let le = N;
|
|
2182
|
+
N === d ? le = v : d < v ? N > d && N <= v && (le = N - 1) : N >= v && N < d && (le = N + 1), P[le] = H;
|
|
2117
2183
|
}
|
|
2118
|
-
for (const [A,
|
|
2119
|
-
const
|
|
2120
|
-
let
|
|
2121
|
-
|
|
2184
|
+
for (const [A, H] of Object.entries(l.value)) {
|
|
2185
|
+
const N = parseInt(A);
|
|
2186
|
+
let le = N;
|
|
2187
|
+
N === d ? le = v : d < v ? N > d && N <= v && (le = N - 1) : N >= v && N < d && (le = N + 1), Z[le] = H;
|
|
2122
2188
|
}
|
|
2123
|
-
return s.value =
|
|
2189
|
+
return s.value = P, l.value = Z, !0;
|
|
2124
2190
|
},
|
|
2125
|
-
registerConnectionHandle:
|
|
2126
|
-
registerGanttBar:
|
|
2127
|
-
resizeColumn:
|
|
2128
|
-
setCellData:
|
|
2129
|
-
setCellText:
|
|
2130
|
-
setFilter:
|
|
2131
|
-
sortByColumn:
|
|
2132
|
-
toggleRowExpand:
|
|
2133
|
-
unregisterConnectionHandle:
|
|
2134
|
-
unregisterGanttBar:
|
|
2135
|
-
updateGanttBar:
|
|
2136
|
-
updateRows:
|
|
2191
|
+
registerConnectionHandle: se,
|
|
2192
|
+
registerGanttBar: j,
|
|
2193
|
+
resizeColumn: de,
|
|
2194
|
+
setCellData: ve,
|
|
2195
|
+
setCellText: X,
|
|
2196
|
+
setFilter: ee,
|
|
2197
|
+
sortByColumn: Q,
|
|
2198
|
+
toggleRowExpand: je,
|
|
2199
|
+
unregisterConnectionHandle: be,
|
|
2200
|
+
unregisterGanttBar: z,
|
|
2201
|
+
updateGanttBar: W,
|
|
2202
|
+
updateRows: Y
|
|
2137
2203
|
};
|
|
2138
2204
|
})();
|
|
2139
|
-
},
|
|
2205
|
+
}, gl = {
|
|
2140
2206
|
class: "atable-container",
|
|
2141
2207
|
style: { position: "relative" }
|
|
2142
|
-
},
|
|
2208
|
+
}, wl = /* @__PURE__ */ te({
|
|
2143
2209
|
__name: "ATable",
|
|
2144
|
-
props: /* @__PURE__ */
|
|
2210
|
+
props: /* @__PURE__ */ Me({
|
|
2145
2211
|
id: { default: "" },
|
|
2146
2212
|
config: { default: () => new Object() }
|
|
2147
2213
|
}, {
|
|
@@ -2150,110 +2216,110 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
2150
2216
|
columns: { required: !0 },
|
|
2151
2217
|
columnsModifiers: {}
|
|
2152
2218
|
}),
|
|
2153
|
-
emits: /* @__PURE__ */
|
|
2219
|
+
emits: /* @__PURE__ */ Me(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move"], ["update:rows", "update:columns"]),
|
|
2154
2220
|
setup(e, { expose: t, emit: n }) {
|
|
2155
|
-
const o =
|
|
2156
|
-
l.$onAction(({ name:
|
|
2157
|
-
if (
|
|
2158
|
-
const [g,
|
|
2221
|
+
const o = ke(e, "rows"), a = ke(e, "columns"), r = n, s = fe("table"), l = hl({ columns: a.value, rows: o.value, id: e.id, config: e.config });
|
|
2222
|
+
l.$onAction(({ name: I, store: x, args: f, after: m }) => {
|
|
2223
|
+
if (I === "setCellData" || I === "setCellText") {
|
|
2224
|
+
const [g, C, T] = f, R = x.getCellData(g, C);
|
|
2159
2225
|
m(() => {
|
|
2160
|
-
o.value = [...x.rows], r("cellUpdate", { colIndex: g, rowIndex:
|
|
2226
|
+
o.value = [...x.rows], r("cellUpdate", { colIndex: g, rowIndex: C, newValue: T, oldValue: R });
|
|
2161
2227
|
});
|
|
2162
|
-
} else if (
|
|
2163
|
-
const [g] =
|
|
2164
|
-
let
|
|
2165
|
-
g.type === "resize" ?
|
|
2228
|
+
} else if (I === "updateGanttBar") {
|
|
2229
|
+
const [g] = f;
|
|
2230
|
+
let C = !1;
|
|
2231
|
+
g.type === "resize" ? C = g.oldColspan !== g.newColspan : g.type === "bar" && (C = g.oldStart !== g.newStart || g.oldEnd !== g.newEnd), C && m(() => {
|
|
2166
2232
|
r("gantt:drag", g);
|
|
2167
2233
|
});
|
|
2168
|
-
} else
|
|
2234
|
+
} else I === "resizeColumn" && m(() => {
|
|
2169
2235
|
a.value = [...x.columns], r("columns:update", [...x.columns]);
|
|
2170
2236
|
});
|
|
2171
|
-
}),
|
|
2237
|
+
}), oe(
|
|
2172
2238
|
() => o.value,
|
|
2173
|
-
(
|
|
2174
|
-
JSON.stringify(
|
|
2239
|
+
(I) => {
|
|
2240
|
+
JSON.stringify(I) !== JSON.stringify(l.rows) && (l.rows = [...I]);
|
|
2175
2241
|
},
|
|
2176
2242
|
{ deep: !0 }
|
|
2177
|
-
),
|
|
2243
|
+
), oe(
|
|
2178
2244
|
a,
|
|
2179
|
-
(
|
|
2180
|
-
JSON.stringify(
|
|
2245
|
+
(I) => {
|
|
2246
|
+
JSON.stringify(I) !== JSON.stringify(l.columns) && (l.columns = [...I], r("columns:update", [...I]));
|
|
2181
2247
|
},
|
|
2182
2248
|
{ deep: !0 }
|
|
2183
|
-
),
|
|
2184
|
-
a.value.some((
|
|
2249
|
+
), Ee(() => {
|
|
2250
|
+
a.value.some((I) => I.pinned) && (u(), l.isTreeView && mn(s, u, { childList: !0, subtree: !0 }));
|
|
2185
2251
|
});
|
|
2186
|
-
const i =
|
|
2187
|
-
const
|
|
2188
|
-
for (const [g,
|
|
2189
|
-
const
|
|
2190
|
-
|
|
2252
|
+
const i = $(() => l.columns.filter((I) => I.pinned).length), u = () => {
|
|
2253
|
+
const I = s.value, x = I?.rows[0], f = I?.rows[1], m = x ? Array.from(x.cells) : [];
|
|
2254
|
+
for (const [g, C] of m.entries()) {
|
|
2255
|
+
const T = f?.cells[g];
|
|
2256
|
+
T && (C.style.width = `${T.offsetWidth}px`);
|
|
2191
2257
|
}
|
|
2192
|
-
for (const g of
|
|
2193
|
-
let
|
|
2194
|
-
const
|
|
2195
|
-
for (const
|
|
2196
|
-
(
|
|
2197
|
-
|
|
2258
|
+
for (const g of I?.rows || []) {
|
|
2259
|
+
let C = 0;
|
|
2260
|
+
const T = [];
|
|
2261
|
+
for (const R of g.cells)
|
|
2262
|
+
(R.classList.contains("sticky-column") || R.classList.contains("sticky-index")) && (R.style.left = `${C}px`, C += R.offsetWidth, T.push(R));
|
|
2263
|
+
T.length > 0 && T[T.length - 1].classList.add("sticky-column-edge");
|
|
2198
2264
|
}
|
|
2199
2265
|
};
|
|
2200
|
-
window.addEventListener("keydown", (
|
|
2201
|
-
if (
|
|
2266
|
+
window.addEventListener("keydown", (I) => {
|
|
2267
|
+
if (I.key === "Escape" && l.modal.visible) {
|
|
2202
2268
|
l.modal.visible = !1;
|
|
2203
2269
|
const x = l.modal.parent;
|
|
2204
|
-
x &&
|
|
2270
|
+
x && pt().then(() => {
|
|
2205
2271
|
x.focus();
|
|
2206
2272
|
});
|
|
2207
2273
|
}
|
|
2208
2274
|
});
|
|
2209
|
-
const c = (
|
|
2210
|
-
if (!
|
|
2275
|
+
const c = (I) => {
|
|
2276
|
+
if (!I.gantt || i.value === 0)
|
|
2211
2277
|
return l.columns;
|
|
2212
2278
|
const x = [];
|
|
2213
|
-
for (let
|
|
2214
|
-
const m = { ...l.columns[
|
|
2215
|
-
m.originalIndex =
|
|
2279
|
+
for (let f = 0; f < i.value; f++) {
|
|
2280
|
+
const m = { ...l.columns[f] };
|
|
2281
|
+
m.originalIndex = f, x.push(m);
|
|
2216
2282
|
}
|
|
2217
2283
|
return x.push({
|
|
2218
2284
|
...l.columns[i.value],
|
|
2219
2285
|
isGantt: !0,
|
|
2220
|
-
colspan:
|
|
2286
|
+
colspan: I.gantt?.colspan || l.columns.length - i.value,
|
|
2221
2287
|
originalIndex: i.value,
|
|
2222
2288
|
width: "auto"
|
|
2223
2289
|
// TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
|
|
2224
2290
|
}), x;
|
|
2225
|
-
}, p = (
|
|
2226
|
-
r("connection:event", { type: "create", connection:
|
|
2227
|
-
}, h = (
|
|
2228
|
-
r("connection:event", { type: "delete", connection:
|
|
2229
|
-
}, b = (
|
|
2230
|
-
switch (
|
|
2291
|
+
}, p = (I) => {
|
|
2292
|
+
r("connection:event", { type: "create", connection: I });
|
|
2293
|
+
}, h = (I) => {
|
|
2294
|
+
r("connection:event", { type: "delete", connection: I });
|
|
2295
|
+
}, b = (I, x) => {
|
|
2296
|
+
switch (I) {
|
|
2231
2297
|
case "add": {
|
|
2232
|
-
const
|
|
2233
|
-
o.value = [...l.rows], r("row:add", { rowIndex:
|
|
2298
|
+
const f = l.addRow({}, x + 1), m = l.rows[f];
|
|
2299
|
+
o.value = [...l.rows], r("row:add", { rowIndex: f, row: m });
|
|
2234
2300
|
break;
|
|
2235
2301
|
}
|
|
2236
2302
|
case "delete": {
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2303
|
+
const f = l.deleteRow(x);
|
|
2304
|
+
f && (o.value = [...l.rows], r("row:delete", { rowIndex: x, row: f }));
|
|
2239
2305
|
break;
|
|
2240
2306
|
}
|
|
2241
2307
|
case "duplicate": {
|
|
2242
|
-
const
|
|
2243
|
-
if (
|
|
2244
|
-
const m = l.rows[
|
|
2245
|
-
o.value = [...l.rows], r("row:duplicate", { sourceIndex: x, newIndex:
|
|
2308
|
+
const f = l.duplicateRow(x);
|
|
2309
|
+
if (f >= 0) {
|
|
2310
|
+
const m = l.rows[f];
|
|
2311
|
+
o.value = [...l.rows], r("row:duplicate", { sourceIndex: x, newIndex: f, row: m });
|
|
2246
2312
|
}
|
|
2247
2313
|
break;
|
|
2248
2314
|
}
|
|
2249
2315
|
case "insertAbove": {
|
|
2250
|
-
const
|
|
2251
|
-
o.value = [...l.rows], r("row:insert-above", { targetIndex: x, newIndex:
|
|
2316
|
+
const f = l.insertRowAbove(x), m = l.rows[f];
|
|
2317
|
+
o.value = [...l.rows], r("row:insert-above", { targetIndex: x, newIndex: f, row: m });
|
|
2252
2318
|
break;
|
|
2253
2319
|
}
|
|
2254
2320
|
case "insertBelow": {
|
|
2255
|
-
const
|
|
2256
|
-
o.value = [...l.rows], r("row:insert-below", { targetIndex: x, newIndex:
|
|
2321
|
+
const f = l.insertRowBelow(x), m = l.rows[f];
|
|
2322
|
+
o.value = [...l.rows], r("row:insert-below", { targetIndex: x, newIndex: f, row: m });
|
|
2257
2323
|
break;
|
|
2258
2324
|
}
|
|
2259
2325
|
case "move": {
|
|
@@ -2275,59 +2341,59 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
2275
2341
|
insertRowAbove: l.insertRowAbove,
|
|
2276
2342
|
insertRowBelow: l.insertRowBelow,
|
|
2277
2343
|
moveRow: l.moveRow
|
|
2278
|
-
}), (
|
|
2279
|
-
|
|
2344
|
+
}), (I, x) => (w(), k("div", gl, [
|
|
2345
|
+
J((w(), k("table", {
|
|
2280
2346
|
ref: "table",
|
|
2281
2347
|
class: "atable",
|
|
2282
|
-
style:
|
|
2283
|
-
width:
|
|
2348
|
+
style: xe({
|
|
2349
|
+
width: V(l).config.fullWidth ? "100%" : "auto"
|
|
2284
2350
|
})
|
|
2285
2351
|
}, [
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
columns:
|
|
2289
|
-
store:
|
|
2352
|
+
he(I.$slots, "header", { data: V(l) }, () => [
|
|
2353
|
+
dt(gn, {
|
|
2354
|
+
columns: V(l).columns,
|
|
2355
|
+
store: V(l)
|
|
2290
2356
|
}, null, 8, ["columns", "store"])
|
|
2291
2357
|
], !0),
|
|
2292
2358
|
y("tbody", null, [
|
|
2293
|
-
|
|
2294
|
-
(w(!0), k(
|
|
2295
|
-
key: `${
|
|
2296
|
-
row:
|
|
2297
|
-
rowIndex:
|
|
2298
|
-
store:
|
|
2359
|
+
he(I.$slots, "body", { data: V(l) }, () => [
|
|
2360
|
+
(w(!0), k(ue, null, me(V(l).filteredRows, (f, m) => (w(), pe(hn, {
|
|
2361
|
+
key: `${f.originalIndex}-${m}`,
|
|
2362
|
+
row: f,
|
|
2363
|
+
rowIndex: f.originalIndex,
|
|
2364
|
+
store: V(l),
|
|
2299
2365
|
"onRow:action": b
|
|
2300
2366
|
}, {
|
|
2301
|
-
default:
|
|
2302
|
-
(w(!0), k(
|
|
2367
|
+
default: Tt(() => [
|
|
2368
|
+
(w(!0), k(ue, null, me(c(f), (g, C) => (w(), k(ue, {
|
|
2303
2369
|
key: g.name
|
|
2304
2370
|
}, [
|
|
2305
|
-
g.isGantt ? (w(),
|
|
2371
|
+
g.isGantt ? (w(), pe(We(g.ganttComponent || "AGanttCell"), {
|
|
2306
2372
|
key: 0,
|
|
2307
|
-
store:
|
|
2308
|
-
"columns-count":
|
|
2309
|
-
color:
|
|
2310
|
-
start:
|
|
2311
|
-
end:
|
|
2373
|
+
store: V(l),
|
|
2374
|
+
"columns-count": V(l).columns.length - i.value,
|
|
2375
|
+
color: f.gantt?.color,
|
|
2376
|
+
start: f.gantt?.startIndex,
|
|
2377
|
+
end: f.gantt?.endIndex,
|
|
2312
2378
|
colspan: g.colspan,
|
|
2313
2379
|
pinned: g.pinned,
|
|
2314
|
-
rowIndex:
|
|
2315
|
-
colIndex: g.originalIndex ??
|
|
2316
|
-
style:
|
|
2380
|
+
rowIndex: f.originalIndex,
|
|
2381
|
+
colIndex: g.originalIndex ?? C,
|
|
2382
|
+
style: xe({
|
|
2317
2383
|
textAlign: g?.align || "center",
|
|
2318
2384
|
minWidth: g?.width || "40ch",
|
|
2319
|
-
width:
|
|
2385
|
+
width: V(l).config.fullWidth ? "auto" : null
|
|
2320
2386
|
}),
|
|
2321
2387
|
"onConnection:create": p
|
|
2322
|
-
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (w(),
|
|
2388
|
+
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (w(), pe(We(g.cellComponent || "ACell"), {
|
|
2323
2389
|
key: 1,
|
|
2324
|
-
store:
|
|
2390
|
+
store: V(l),
|
|
2325
2391
|
pinned: g.pinned,
|
|
2326
|
-
rowIndex:
|
|
2327
|
-
colIndex:
|
|
2328
|
-
style:
|
|
2392
|
+
rowIndex: f.originalIndex,
|
|
2393
|
+
colIndex: C,
|
|
2394
|
+
style: xe({
|
|
2329
2395
|
textAlign: g?.align || "center",
|
|
2330
|
-
width:
|
|
2396
|
+
width: V(l).config.fullWidth ? "auto" : null
|
|
2331
2397
|
}),
|
|
2332
2398
|
spellcheck: "false"
|
|
2333
2399
|
}, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
|
|
@@ -2337,57 +2403,57 @@ const jo = { class: "gantt-connection-overlay" }, qo = {
|
|
|
2337
2403
|
}, 1032, ["row", "rowIndex", "store"]))), 128))
|
|
2338
2404
|
], !0)
|
|
2339
2405
|
]),
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
default:
|
|
2344
|
-
(w(),
|
|
2345
|
-
key: `${
|
|
2346
|
-
"col-index":
|
|
2347
|
-
"row-index":
|
|
2348
|
-
store:
|
|
2349
|
-
},
|
|
2406
|
+
he(I.$slots, "footer", { data: V(l) }, void 0, !0),
|
|
2407
|
+
he(I.$slots, "modal", { data: V(l) }, () => [
|
|
2408
|
+
J(dt(wn, { store: V(l) }, {
|
|
2409
|
+
default: Tt(() => [
|
|
2410
|
+
(w(), pe(We(V(l).modal.component), vt({
|
|
2411
|
+
key: `${V(l).modal.rowIndex}:${V(l).modal.colIndex}`,
|
|
2412
|
+
"col-index": V(l).modal.colIndex,
|
|
2413
|
+
"row-index": V(l).modal.rowIndex,
|
|
2414
|
+
store: V(l)
|
|
2415
|
+
}, V(l).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
|
|
2350
2416
|
]),
|
|
2351
2417
|
_: 1
|
|
2352
2418
|
}, 8, ["store"]), [
|
|
2353
|
-
[
|
|
2419
|
+
[Ce, V(l).modal.visible]
|
|
2354
2420
|
])
|
|
2355
2421
|
], !0)
|
|
2356
2422
|
], 4)), [
|
|
2357
|
-
[
|
|
2423
|
+
[V(zo), V(l).closeModal]
|
|
2358
2424
|
]),
|
|
2359
|
-
|
|
2425
|
+
V(l).isGanttView && V(l).isDependencyGraphEnabled ? (w(), pe(tl, {
|
|
2360
2426
|
key: 0,
|
|
2361
|
-
store:
|
|
2427
|
+
store: V(l),
|
|
2362
2428
|
"onConnection:delete": h
|
|
2363
|
-
}, null, 8, ["store"])) :
|
|
2429
|
+
}, null, 8, ["store"])) : q("", !0)
|
|
2364
2430
|
]));
|
|
2365
2431
|
}
|
|
2366
|
-
}),
|
|
2367
|
-
function
|
|
2368
|
-
return w(), k("div",
|
|
2369
|
-
y("h2",
|
|
2370
|
-
|
|
2432
|
+
}), yl = /* @__PURE__ */ Ve(wl, [["__scopeId", "data-v-3d00d51b"]]), xl = {}, bl = { class: "aloading" }, Il = { class: "aloading-header" };
|
|
2433
|
+
function kl(e, t) {
|
|
2434
|
+
return w(), k("div", bl, [
|
|
2435
|
+
y("h2", Il, [
|
|
2436
|
+
he(e.$slots, "default", {}, void 0, !0)
|
|
2371
2437
|
]),
|
|
2372
2438
|
t[0] || (t[0] = y("div", { class: "aloading-bar" }, null, -1))
|
|
2373
2439
|
]);
|
|
2374
2440
|
}
|
|
2375
|
-
const
|
|
2376
|
-
function
|
|
2377
|
-
return w(), k("div",
|
|
2378
|
-
y("h2",
|
|
2379
|
-
|
|
2441
|
+
const Ml = /* @__PURE__ */ Ve(xl, [["render", kl], ["__scopeId", "data-v-a930a25b"]]), Cl = {}, El = { class: "aloading" }, Al = { class: "aloading-header" };
|
|
2442
|
+
function Tl(e, t) {
|
|
2443
|
+
return w(), k("div", El, [
|
|
2444
|
+
y("h2", Al, [
|
|
2445
|
+
he(e.$slots, "default", {}, void 0, !0)
|
|
2380
2446
|
]),
|
|
2381
2447
|
t[0] || (t[0] = y("div", { class: "aloading-bar" }, null, -1))
|
|
2382
2448
|
]);
|
|
2383
2449
|
}
|
|
2384
|
-
const
|
|
2385
|
-
function
|
|
2386
|
-
e.component("ACell",
|
|
2450
|
+
const $l = /* @__PURE__ */ Ve(Cl, [["render", Tl], ["__scopeId", "data-v-e1165876"]]);
|
|
2451
|
+
function Dl(e) {
|
|
2452
|
+
e.component("ACell", ho), e.component("AExpansionRow", bo), e.component("AGanttCell", To), e.component("ARow", hn), e.component("ARowActions", ut), e.component("ATable", yl), e.component("ATableHeader", gn), e.component("ATableLoading", Ml), e.component("ATableLoadingBar", $l), e.component("ATableModal", wn);
|
|
2387
2453
|
}
|
|
2388
|
-
const
|
|
2454
|
+
const Sl = { class: "aform_form-element" }, Rl = ["for"], Ll = { class: "aform_checkbox-container aform_input-field" }, Hl = ["id", "readonly", "required"], Vl = ["innerHTML"], Pl = /* @__PURE__ */ te({
|
|
2389
2455
|
__name: "ACheckbox",
|
|
2390
|
-
props: /* @__PURE__ */
|
|
2456
|
+
props: /* @__PURE__ */ Me({
|
|
2391
2457
|
schema: {},
|
|
2392
2458
|
label: {},
|
|
2393
2459
|
mask: {},
|
|
@@ -2396,54 +2462,54 @@ const Dl = { class: "aform_form-element" }, $l = ["for"], Sl = { class: "aform_c
|
|
|
2396
2462
|
uuid: {},
|
|
2397
2463
|
validation: { default: () => ({ errorMessage: " " }) }
|
|
2398
2464
|
}, {
|
|
2399
|
-
modelValue: {},
|
|
2465
|
+
modelValue: { type: [Boolean, String, Array, Set] },
|
|
2400
2466
|
modelModifiers: {}
|
|
2401
2467
|
}),
|
|
2402
2468
|
emits: ["update:modelValue"],
|
|
2403
2469
|
setup(e) {
|
|
2404
|
-
const t =
|
|
2405
|
-
return (n, o) => (w(), k("div",
|
|
2470
|
+
const t = ke(e, "modelValue");
|
|
2471
|
+
return (n, o) => (w(), k("div", Sl, [
|
|
2406
2472
|
y("label", {
|
|
2407
2473
|
class: "aform_field-label",
|
|
2408
2474
|
for: e.uuid
|
|
2409
|
-
},
|
|
2410
|
-
y("span",
|
|
2411
|
-
|
|
2475
|
+
}, K(e.label), 9, Rl),
|
|
2476
|
+
y("span", Ll, [
|
|
2477
|
+
J(y("input", {
|
|
2412
2478
|
id: e.uuid,
|
|
2413
2479
|
"onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
|
|
2414
2480
|
type: "checkbox",
|
|
2415
2481
|
class: "aform_checkbox",
|
|
2416
2482
|
readonly: e.readOnly,
|
|
2417
2483
|
required: e.required
|
|
2418
|
-
}, null, 8,
|
|
2419
|
-
[
|
|
2484
|
+
}, null, 8, Hl), [
|
|
2485
|
+
[un, t.value]
|
|
2420
2486
|
])
|
|
2421
2487
|
]),
|
|
2422
|
-
|
|
2488
|
+
J(y("p", {
|
|
2423
2489
|
class: "aform_error",
|
|
2424
2490
|
innerHTML: e.validation.errorMessage
|
|
2425
|
-
}, null, 8,
|
|
2426
|
-
[
|
|
2491
|
+
}, null, 8, Vl), [
|
|
2492
|
+
[Ce, e.validation.errorMessage]
|
|
2427
2493
|
])
|
|
2428
2494
|
]));
|
|
2429
2495
|
}
|
|
2430
|
-
}),
|
|
2496
|
+
}), $e = (e, t) => {
|
|
2431
2497
|
const n = e.__vccOpts || e;
|
|
2432
2498
|
for (const [o, a] of t)
|
|
2433
2499
|
n[o] = a;
|
|
2434
2500
|
return n;
|
|
2435
|
-
},
|
|
2501
|
+
}, Ol = /* @__PURE__ */ $e(Pl, [["__scopeId", "data-v-f13fd4d6"]]), _l = /* @__PURE__ */ te({
|
|
2436
2502
|
__name: "AComboBox",
|
|
2437
2503
|
props: ["event", "cellData", "tableID"],
|
|
2438
2504
|
setup(e) {
|
|
2439
2505
|
return (t, n) => {
|
|
2440
|
-
const o =
|
|
2441
|
-
return w(),
|
|
2506
|
+
const o = dn("ATableModal");
|
|
2507
|
+
return w(), pe(o, {
|
|
2442
2508
|
event: e.event,
|
|
2443
2509
|
"cell-data": e.cellData,
|
|
2444
2510
|
class: "amodal"
|
|
2445
2511
|
}, {
|
|
2446
|
-
default:
|
|
2512
|
+
default: Tt(() => [...n[0] || (n[0] = [
|
|
2447
2513
|
y("div", null, [
|
|
2448
2514
|
y("input", { type: "text" }),
|
|
2449
2515
|
y("input", { type: "text" }),
|
|
@@ -2454,9 +2520,9 @@ const Dl = { class: "aform_form-element" }, $l = ["for"], Sl = { class: "aform_c
|
|
|
2454
2520
|
}, 8, ["event", "cell-data"]);
|
|
2455
2521
|
};
|
|
2456
2522
|
}
|
|
2457
|
-
}),
|
|
2523
|
+
}), Bl = ["id", "disabled", "required"], Fl = ["for"], Zl = ["innerHTML"], Nl = /* @__PURE__ */ te({
|
|
2458
2524
|
__name: "ADate",
|
|
2459
|
-
props: /* @__PURE__ */
|
|
2525
|
+
props: /* @__PURE__ */ Me({
|
|
2460
2526
|
schema: {},
|
|
2461
2527
|
label: { default: "Date" },
|
|
2462
2528
|
mask: {},
|
|
@@ -2472,14 +2538,14 @@ const Dl = { class: "aform_form-element" }, $l = ["for"], Sl = { class: "aform_c
|
|
|
2472
2538
|
}),
|
|
2473
2539
|
emits: ["update:modelValue"],
|
|
2474
2540
|
setup(e) {
|
|
2475
|
-
const t =
|
|
2541
|
+
const t = ke(e, "modelValue", {
|
|
2476
2542
|
// format the date to be compatible with the native input datepicker
|
|
2477
2543
|
set: (a) => new Date(a).toISOString().split("T")[0]
|
|
2478
|
-
}), n =
|
|
2544
|
+
}), n = fe("date"), o = () => {
|
|
2479
2545
|
n.value && "showPicker" in HTMLInputElement.prototype && n.value.showPicker();
|
|
2480
2546
|
};
|
|
2481
2547
|
return (a, r) => (w(), k("div", null, [
|
|
2482
|
-
|
|
2548
|
+
J(y("input", {
|
|
2483
2549
|
id: e.uuid,
|
|
2484
2550
|
ref: "date",
|
|
2485
2551
|
"onUpdate:modelValue": r[0] || (r[0] = (s) => t.value = s),
|
|
@@ -2487,23 +2553,23 @@ const Dl = { class: "aform_form-element" }, $l = ["for"], Sl = { class: "aform_c
|
|
|
2487
2553
|
disabled: e.readOnly,
|
|
2488
2554
|
required: e.required,
|
|
2489
2555
|
onClick: o
|
|
2490
|
-
}, null, 8,
|
|
2491
|
-
[
|
|
2556
|
+
}, null, 8, Bl), [
|
|
2557
|
+
[we, t.value]
|
|
2492
2558
|
]),
|
|
2493
|
-
y("label", { for: e.uuid },
|
|
2494
|
-
|
|
2559
|
+
y("label", { for: e.uuid }, K(e.label), 9, Fl),
|
|
2560
|
+
J(y("p", {
|
|
2495
2561
|
innerHTML: e.validation.errorMessage
|
|
2496
|
-
}, null, 8,
|
|
2497
|
-
[
|
|
2562
|
+
}, null, 8, Zl), [
|
|
2563
|
+
[Ce, e.validation.errorMessage]
|
|
2498
2564
|
])
|
|
2499
2565
|
]));
|
|
2500
2566
|
}
|
|
2501
|
-
}),
|
|
2502
|
-
function
|
|
2503
|
-
return
|
|
2567
|
+
}), Ul = /* @__PURE__ */ $e(Nl, [["__scopeId", "data-v-a15ed922"]]);
|
|
2568
|
+
function yn(e, t) {
|
|
2569
|
+
return mt() ? (ht(e, t), !0) : !1;
|
|
2504
2570
|
}
|
|
2505
2571
|
// @__NO_SIDE_EFFECTS__
|
|
2506
|
-
function
|
|
2572
|
+
function jt() {
|
|
2507
2573
|
const e = /* @__PURE__ */ new Set(), t = (r) => {
|
|
2508
2574
|
e.delete(r);
|
|
2509
2575
|
};
|
|
@@ -2511,7 +2577,7 @@ function Yt() {
|
|
|
2511
2577
|
on: (r) => {
|
|
2512
2578
|
e.add(r);
|
|
2513
2579
|
const s = () => t(r);
|
|
2514
|
-
return
|
|
2580
|
+
return yn(s), { off: s };
|
|
2515
2581
|
},
|
|
2516
2582
|
off: t,
|
|
2517
2583
|
trigger: (...r) => Promise.all(Array.from(e).map((s) => s(...r))),
|
|
@@ -2520,136 +2586,136 @@ function Yt() {
|
|
|
2520
2586
|
}
|
|
2521
2587
|
};
|
|
2522
2588
|
}
|
|
2523
|
-
const
|
|
2589
|
+
const xn = typeof window < "u" && typeof document < "u";
|
|
2524
2590
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2525
|
-
const
|
|
2591
|
+
const Wl = Object.prototype.toString, Gl = (e) => Wl.call(e) === "[object Object]", Qe = () => {
|
|
2526
2592
|
}, zl = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
2527
|
-
function
|
|
2528
|
-
if (e.length !== 1) return
|
|
2593
|
+
function ql(...e) {
|
|
2594
|
+
if (e.length !== 1) return cn(...e);
|
|
2529
2595
|
const t = e[0];
|
|
2530
|
-
return typeof t == "function" ? St(
|
|
2596
|
+
return typeof t == "function" ? Rt(St(() => ({
|
|
2531
2597
|
get: t,
|
|
2532
|
-
set:
|
|
2533
|
-
}))) :
|
|
2598
|
+
set: Qe
|
|
2599
|
+
}))) : L(t);
|
|
2534
2600
|
}
|
|
2535
2601
|
function kt(e) {
|
|
2536
2602
|
return Array.isArray(e) ? e : [e];
|
|
2537
2603
|
}
|
|
2538
|
-
function
|
|
2539
|
-
return
|
|
2604
|
+
function Yl(e, t, n) {
|
|
2605
|
+
return oe(e, t, {
|
|
2540
2606
|
...n,
|
|
2541
2607
|
immediate: !0
|
|
2542
2608
|
});
|
|
2543
2609
|
}
|
|
2544
|
-
const
|
|
2545
|
-
function
|
|
2610
|
+
const bn = xn ? window : void 0, Xl = xn ? window.document : void 0;
|
|
2611
|
+
function Ue(e) {
|
|
2546
2612
|
var t;
|
|
2547
|
-
const n =
|
|
2613
|
+
const n = E(e);
|
|
2548
2614
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
2549
2615
|
}
|
|
2550
|
-
function
|
|
2551
|
-
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n =
|
|
2552
|
-
const o = kt(
|
|
2616
|
+
function Mt(...e) {
|
|
2617
|
+
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = $(() => {
|
|
2618
|
+
const o = kt(E(e[0])).filter((a) => a != null);
|
|
2553
2619
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
2554
2620
|
});
|
|
2555
|
-
return
|
|
2621
|
+
return Yl(() => {
|
|
2556
2622
|
var o, a;
|
|
2557
2623
|
return [
|
|
2558
|
-
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) =>
|
|
2559
|
-
kt(
|
|
2560
|
-
kt(
|
|
2561
|
-
|
|
2624
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => Ue(r))) !== null && o !== void 0 ? o : [bn].filter((r) => r != null),
|
|
2625
|
+
kt(E(n.value ? e[1] : e[0])),
|
|
2626
|
+
kt(V(n.value ? e[2] : e[1])),
|
|
2627
|
+
E(n.value ? e[3] : e[2])
|
|
2562
2628
|
];
|
|
2563
2629
|
}, ([o, a, r, s], l, i) => {
|
|
2564
2630
|
if (!o?.length || !a?.length || !r?.length) return;
|
|
2565
|
-
const u =
|
|
2631
|
+
const u = Gl(s) ? { ...s } : s, c = o.flatMap((p) => a.flatMap((h) => r.map((b) => t(p, h, b, u))));
|
|
2566
2632
|
i(() => {
|
|
2567
2633
|
c.forEach((p) => p());
|
|
2568
2634
|
});
|
|
2569
2635
|
}, { flush: "post" });
|
|
2570
2636
|
}
|
|
2571
|
-
function
|
|
2572
|
-
const { window: o =
|
|
2637
|
+
function Jt(e, t, n = {}) {
|
|
2638
|
+
const { window: o = bn, ignore: a = [], capture: r = !0, detectIframe: s = !1, controls: l = !1 } = n;
|
|
2573
2639
|
if (!o) return l ? {
|
|
2574
|
-
stop:
|
|
2575
|
-
cancel:
|
|
2576
|
-
trigger:
|
|
2577
|
-
} :
|
|
2640
|
+
stop: Qe,
|
|
2641
|
+
cancel: Qe,
|
|
2642
|
+
trigger: Qe
|
|
2643
|
+
} : Qe;
|
|
2578
2644
|
let i = !0;
|
|
2579
|
-
const u = (
|
|
2580
|
-
if (typeof m == "string") return Array.from(o.document.querySelectorAll(m)).some((g) => g ===
|
|
2645
|
+
const u = (f) => E(a).some((m) => {
|
|
2646
|
+
if (typeof m == "string") return Array.from(o.document.querySelectorAll(m)).some((g) => g === f.target || f.composedPath().includes(g));
|
|
2581
2647
|
{
|
|
2582
|
-
const g =
|
|
2583
|
-
return g && (
|
|
2648
|
+
const g = Ue(m);
|
|
2649
|
+
return g && (f.target === g || f.composedPath().includes(g));
|
|
2584
2650
|
}
|
|
2585
2651
|
});
|
|
2586
|
-
function c(
|
|
2587
|
-
const m =
|
|
2652
|
+
function c(f) {
|
|
2653
|
+
const m = E(f);
|
|
2588
2654
|
return m && m.$.subTree.shapeFlag === 16;
|
|
2589
2655
|
}
|
|
2590
|
-
function p(
|
|
2591
|
-
const g =
|
|
2592
|
-
return
|
|
2656
|
+
function p(f, m) {
|
|
2657
|
+
const g = E(f), C = g.$.subTree && g.$.subTree.children;
|
|
2658
|
+
return C == null || !Array.isArray(C) ? !1 : C.some((T) => T.el === m.target || m.composedPath().includes(T.el));
|
|
2593
2659
|
}
|
|
2594
|
-
const h = (
|
|
2595
|
-
const m =
|
|
2596
|
-
if (
|
|
2597
|
-
if ("detail" in
|
|
2660
|
+
const h = (f) => {
|
|
2661
|
+
const m = Ue(e);
|
|
2662
|
+
if (f.target != null && !(!(m instanceof Element) && c(e) && p(e, f)) && !(!m || m === f.target || f.composedPath().includes(m))) {
|
|
2663
|
+
if ("detail" in f && f.detail === 0 && (i = !u(f)), !i) {
|
|
2598
2664
|
i = !0;
|
|
2599
2665
|
return;
|
|
2600
2666
|
}
|
|
2601
|
-
t(
|
|
2667
|
+
t(f);
|
|
2602
2668
|
}
|
|
2603
2669
|
};
|
|
2604
2670
|
let b = !1;
|
|
2605
|
-
const
|
|
2606
|
-
|
|
2671
|
+
const I = [
|
|
2672
|
+
Mt(o, "click", (f) => {
|
|
2607
2673
|
b || (b = !0, setTimeout(() => {
|
|
2608
2674
|
b = !1;
|
|
2609
|
-
}, 0), h(
|
|
2675
|
+
}, 0), h(f));
|
|
2610
2676
|
}, {
|
|
2611
2677
|
passive: !0,
|
|
2612
2678
|
capture: r
|
|
2613
2679
|
}),
|
|
2614
|
-
|
|
2615
|
-
const m =
|
|
2616
|
-
i = !u(
|
|
2680
|
+
Mt(o, "pointerdown", (f) => {
|
|
2681
|
+
const m = Ue(e);
|
|
2682
|
+
i = !u(f) && !!(m && !f.composedPath().includes(m));
|
|
2617
2683
|
}, { passive: !0 }),
|
|
2618
|
-
s &&
|
|
2684
|
+
s && Mt(o, "blur", (f) => {
|
|
2619
2685
|
setTimeout(() => {
|
|
2620
2686
|
var m;
|
|
2621
|
-
const g =
|
|
2622
|
-
((m = o.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !g?.contains(o.document.activeElement) && t(
|
|
2687
|
+
const g = Ue(e);
|
|
2688
|
+
((m = o.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !g?.contains(o.document.activeElement) && t(f);
|
|
2623
2689
|
}, 0);
|
|
2624
2690
|
}, { passive: !0 })
|
|
2625
|
-
].filter(Boolean), x = () =>
|
|
2691
|
+
].filter(Boolean), x = () => I.forEach((f) => f());
|
|
2626
2692
|
return l ? {
|
|
2627
2693
|
stop: x,
|
|
2628
2694
|
cancel: () => {
|
|
2629
2695
|
i = !1;
|
|
2630
2696
|
},
|
|
2631
|
-
trigger: (
|
|
2632
|
-
i = !0, h(
|
|
2697
|
+
trigger: (f) => {
|
|
2698
|
+
i = !0, h(f), i = !1;
|
|
2633
2699
|
}
|
|
2634
2700
|
} : x;
|
|
2635
2701
|
}
|
|
2636
|
-
const
|
|
2702
|
+
const jl = {
|
|
2637
2703
|
multiple: !0,
|
|
2638
2704
|
accept: "*",
|
|
2639
2705
|
reset: !1,
|
|
2640
2706
|
directory: !1
|
|
2641
2707
|
};
|
|
2642
|
-
function
|
|
2708
|
+
function Jl(e) {
|
|
2643
2709
|
if (!e) return null;
|
|
2644
2710
|
if (e instanceof FileList) return e;
|
|
2645
2711
|
const t = new DataTransfer();
|
|
2646
2712
|
for (const n of e) t.items.add(n);
|
|
2647
2713
|
return t.files;
|
|
2648
2714
|
}
|
|
2649
|
-
function
|
|
2650
|
-
const { document: t =
|
|
2715
|
+
function Ql(e = {}) {
|
|
2716
|
+
const { document: t = Xl } = e, n = L(Jl(e.initialFiles)), { on: o, trigger: a } = /* @__PURE__ */ jt(), { on: r, trigger: s } = /* @__PURE__ */ jt(), l = $(() => {
|
|
2651
2717
|
var p;
|
|
2652
|
-
const h = (p =
|
|
2718
|
+
const h = (p = Ue(e.input)) !== null && p !== void 0 ? p : t ? t.createElement("input") : void 0;
|
|
2653
2719
|
return h && (h.type = "file", h.onchange = (b) => {
|
|
2654
2720
|
n.value = b.target.files, a(n.value);
|
|
2655
2721
|
}, h.oncancel = () => {
|
|
@@ -2659,21 +2725,21 @@ function Xl(e = {}) {
|
|
|
2659
2725
|
n.value = null, l.value && l.value.value && (l.value.value = "", a(null));
|
|
2660
2726
|
}, u = (p) => {
|
|
2661
2727
|
const h = l.value;
|
|
2662
|
-
h && (h.multiple =
|
|
2728
|
+
h && (h.multiple = E(p.multiple), h.accept = E(p.accept), h.webkitdirectory = E(p.directory), zl(p, "capture") && (h.capture = E(p.capture)));
|
|
2663
2729
|
}, c = (p) => {
|
|
2664
2730
|
const h = l.value;
|
|
2665
2731
|
if (!h) return;
|
|
2666
2732
|
const b = {
|
|
2667
|
-
...
|
|
2733
|
+
...jl,
|
|
2668
2734
|
...e,
|
|
2669
2735
|
...p
|
|
2670
2736
|
};
|
|
2671
|
-
u(b),
|
|
2737
|
+
u(b), E(b.reset) && i(), h.click();
|
|
2672
2738
|
};
|
|
2673
|
-
return
|
|
2739
|
+
return Oe(() => {
|
|
2674
2740
|
u(e);
|
|
2675
2741
|
}), {
|
|
2676
|
-
files:
|
|
2742
|
+
files: Rt(n),
|
|
2677
2743
|
open: c,
|
|
2678
2744
|
reset: i,
|
|
2679
2745
|
onCancel: r,
|
|
@@ -2683,26 +2749,26 @@ function Xl(e = {}) {
|
|
|
2683
2749
|
function Ct(e) {
|
|
2684
2750
|
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
2685
2751
|
}
|
|
2686
|
-
const
|
|
2687
|
-
function
|
|
2688
|
-
const n =
|
|
2752
|
+
const Et = /* @__PURE__ */ new WeakMap();
|
|
2753
|
+
function Kl(e, t = !1) {
|
|
2754
|
+
const n = ie(t);
|
|
2689
2755
|
let o = "";
|
|
2690
|
-
|
|
2691
|
-
const l = Ct(
|
|
2756
|
+
oe(ql(e), (s) => {
|
|
2757
|
+
const l = Ct(E(s));
|
|
2692
2758
|
if (l) {
|
|
2693
2759
|
const i = l;
|
|
2694
|
-
if (
|
|
2760
|
+
if (Et.get(i) || Et.set(i, i.style.overflow), i.style.overflow !== "hidden" && (o = i.style.overflow), i.style.overflow === "hidden") return n.value = !0;
|
|
2695
2761
|
if (n.value) return i.style.overflow = "hidden";
|
|
2696
2762
|
}
|
|
2697
2763
|
}, { immediate: !0 });
|
|
2698
2764
|
const a = () => {
|
|
2699
|
-
const s = Ct(
|
|
2765
|
+
const s = Ct(E(e));
|
|
2700
2766
|
!s || n.value || (s.style.overflow = "hidden", n.value = !0);
|
|
2701
2767
|
}, r = () => {
|
|
2702
|
-
const s = Ct(
|
|
2703
|
-
!s || !n.value || (s.style.overflow = o,
|
|
2768
|
+
const s = Ct(E(e));
|
|
2769
|
+
!s || !n.value || (s.style.overflow = o, Et.delete(s), n.value = !1);
|
|
2704
2770
|
};
|
|
2705
|
-
return
|
|
2771
|
+
return yn(r), $({
|
|
2706
2772
|
get() {
|
|
2707
2773
|
return n.value;
|
|
2708
2774
|
},
|
|
@@ -2711,42 +2777,42 @@ function Jl(e, t = !1) {
|
|
|
2711
2777
|
}
|
|
2712
2778
|
});
|
|
2713
2779
|
}
|
|
2714
|
-
const
|
|
2780
|
+
const At = /* @__PURE__ */ new WeakMap(), ea = {
|
|
2715
2781
|
mounted(e, t) {
|
|
2716
2782
|
const n = !t.modifiers.bubble;
|
|
2717
2783
|
let o;
|
|
2718
|
-
if (typeof t.value == "function") o =
|
|
2784
|
+
if (typeof t.value == "function") o = Jt(e, t.value, { capture: n });
|
|
2719
2785
|
else {
|
|
2720
2786
|
const [a, r] = t.value;
|
|
2721
|
-
o =
|
|
2787
|
+
o = Jt(e, a, Object.assign({ capture: n }, r));
|
|
2722
2788
|
}
|
|
2723
|
-
|
|
2789
|
+
At.set(e, o);
|
|
2724
2790
|
},
|
|
2725
2791
|
unmounted(e) {
|
|
2726
|
-
const t =
|
|
2727
|
-
t && typeof t == "function" ? t() : t?.stop(),
|
|
2792
|
+
const t = At.get(e);
|
|
2793
|
+
t && typeof t == "function" ? t() : t?.stop(), At.delete(e);
|
|
2728
2794
|
}
|
|
2729
2795
|
};
|
|
2730
|
-
function
|
|
2796
|
+
function ta() {
|
|
2731
2797
|
let e = !1;
|
|
2732
|
-
const t =
|
|
2798
|
+
const t = ie(!1);
|
|
2733
2799
|
return (n, o) => {
|
|
2734
2800
|
if (t.value = o.value, e) return;
|
|
2735
2801
|
e = !0;
|
|
2736
|
-
const a =
|
|
2737
|
-
|
|
2802
|
+
const a = Kl(n, o.value);
|
|
2803
|
+
oe(t, (r) => a.value = r);
|
|
2738
2804
|
};
|
|
2739
2805
|
}
|
|
2740
|
-
|
|
2741
|
-
const
|
|
2806
|
+
ta();
|
|
2807
|
+
const na = { class: "input-wrapper" }, oa = {
|
|
2742
2808
|
id: "autocomplete-results",
|
|
2743
2809
|
class: "autocomplete-results"
|
|
2744
|
-
},
|
|
2810
|
+
}, la = {
|
|
2745
2811
|
key: 0,
|
|
2746
2812
|
class: "loading autocomplete-result"
|
|
2747
|
-
},
|
|
2813
|
+
}, aa = ["onClick"], sa = /* @__PURE__ */ te({
|
|
2748
2814
|
__name: "ADropdown",
|
|
2749
|
-
props: /* @__PURE__ */
|
|
2815
|
+
props: /* @__PURE__ */ Me({
|
|
2750
2816
|
label: {},
|
|
2751
2817
|
items: { default: () => [] },
|
|
2752
2818
|
isAsync: { type: Boolean, default: !1 },
|
|
@@ -2757,7 +2823,7 @@ const ea = { class: "input-wrapper" }, ta = {
|
|
|
2757
2823
|
}),
|
|
2758
2824
|
emits: ["update:modelValue"],
|
|
2759
2825
|
setup(e) {
|
|
2760
|
-
const t =
|
|
2826
|
+
const t = ke(e, "modelValue"), n = rn({
|
|
2761
2827
|
activeItemIndex: null,
|
|
2762
2828
|
open: !1,
|
|
2763
2829
|
loading: !1,
|
|
@@ -2804,103 +2870,103 @@ const ea = { class: "input-wrapper" }, ta = {
|
|
|
2804
2870
|
}
|
|
2805
2871
|
n.activeItemIndex = 0;
|
|
2806
2872
|
};
|
|
2807
|
-
return (h, b) =>
|
|
2808
|
-
class:
|
|
2873
|
+
return (h, b) => J((w(), k("div", {
|
|
2874
|
+
class: ae(["autocomplete", { isOpen: n.open }])
|
|
2809
2875
|
}, [
|
|
2810
|
-
y("div",
|
|
2811
|
-
|
|
2812
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
2876
|
+
y("div", na, [
|
|
2877
|
+
J(y("input", {
|
|
2878
|
+
"onUpdate:modelValue": b[0] || (b[0] = (I) => t.value = I),
|
|
2813
2879
|
type: "text",
|
|
2814
2880
|
onInput: a,
|
|
2815
2881
|
onFocus: s,
|
|
2816
2882
|
onKeydown: [
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2883
|
+
Ne(u, ["down"]),
|
|
2884
|
+
Ne(c, ["up"]),
|
|
2885
|
+
Ne(p, ["enter"]),
|
|
2886
|
+
Ne(o, ["esc"]),
|
|
2887
|
+
Ne(o, ["tab"])
|
|
2822
2888
|
]
|
|
2823
2889
|
}, null, 544), [
|
|
2824
|
-
[
|
|
2890
|
+
[we, t.value]
|
|
2825
2891
|
]),
|
|
2826
|
-
|
|
2827
|
-
n.loading ? (w(), k("li",
|
|
2828
|
-
key:
|
|
2829
|
-
class:
|
|
2830
|
-
onClick:
|
|
2831
|
-
},
|
|
2892
|
+
J(y("ul", oa, [
|
|
2893
|
+
n.loading ? (w(), k("li", la, "Loading results...")) : (w(!0), k(ue, { key: 1 }, me(n.results, (I, x) => (w(), k("li", {
|
|
2894
|
+
key: I,
|
|
2895
|
+
class: ae(["autocomplete-result", { "is-active": x === n.activeItemIndex }]),
|
|
2896
|
+
onClick: Ie((f) => r(I), ["stop"])
|
|
2897
|
+
}, K(I), 11, aa))), 128))
|
|
2832
2898
|
], 512), [
|
|
2833
|
-
[
|
|
2899
|
+
[Ce, n.open]
|
|
2834
2900
|
]),
|
|
2835
|
-
y("label", null,
|
|
2901
|
+
y("label", null, K(e.label), 1)
|
|
2836
2902
|
])
|
|
2837
2903
|
], 2)), [
|
|
2838
|
-
[
|
|
2904
|
+
[V(ea), o]
|
|
2839
2905
|
]);
|
|
2840
2906
|
}
|
|
2841
|
-
}),
|
|
2842
|
-
function
|
|
2843
|
-
return
|
|
2907
|
+
}), ra = /* @__PURE__ */ $e(sa, [["__scopeId", "data-v-31a6db8c"]]);
|
|
2908
|
+
function In(e, t) {
|
|
2909
|
+
return mt() ? (ht(e, t), !0) : !1;
|
|
2844
2910
|
}
|
|
2845
|
-
const
|
|
2911
|
+
const ia = typeof window < "u" && typeof document < "u";
|
|
2846
2912
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2847
|
-
const
|
|
2913
|
+
const ua = (e) => e != null, ca = Object.prototype.toString, da = (e) => ca.call(e) === "[object Object]", fa = () => {
|
|
2848
2914
|
};
|
|
2849
|
-
function
|
|
2915
|
+
function ct(e) {
|
|
2850
2916
|
return Array.isArray(e) ? e : [e];
|
|
2851
2917
|
}
|
|
2852
|
-
function
|
|
2853
|
-
return
|
|
2918
|
+
function va(e, t, n) {
|
|
2919
|
+
return oe(e, t, {
|
|
2854
2920
|
...n,
|
|
2855
2921
|
immediate: !0
|
|
2856
2922
|
});
|
|
2857
2923
|
}
|
|
2858
|
-
const
|
|
2859
|
-
function
|
|
2924
|
+
const Ye = ia ? window : void 0;
|
|
2925
|
+
function ze(e) {
|
|
2860
2926
|
var t;
|
|
2861
|
-
const n =
|
|
2927
|
+
const n = E(e);
|
|
2862
2928
|
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
2863
2929
|
}
|
|
2864
|
-
function
|
|
2865
|
-
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n =
|
|
2866
|
-
const o =
|
|
2930
|
+
function et(...e) {
|
|
2931
|
+
const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = $(() => {
|
|
2932
|
+
const o = ct(E(e[0])).filter((a) => a != null);
|
|
2867
2933
|
return o.every((a) => typeof a != "string") ? o : void 0;
|
|
2868
2934
|
});
|
|
2869
|
-
return
|
|
2935
|
+
return va(() => {
|
|
2870
2936
|
var o, a;
|
|
2871
2937
|
return [
|
|
2872
|
-
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) =>
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2938
|
+
(o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => ze(r))) !== null && o !== void 0 ? o : [Ye].filter((r) => r != null),
|
|
2939
|
+
ct(E(n.value ? e[1] : e[0])),
|
|
2940
|
+
ct(V(n.value ? e[2] : e[1])),
|
|
2941
|
+
E(n.value ? e[3] : e[2])
|
|
2876
2942
|
];
|
|
2877
2943
|
}, ([o, a, r, s], l, i) => {
|
|
2878
2944
|
if (!o?.length || !a?.length || !r?.length) return;
|
|
2879
|
-
const u =
|
|
2945
|
+
const u = da(s) ? { ...s } : s, c = o.flatMap((p) => a.flatMap((h) => r.map((b) => t(p, h, b, u))));
|
|
2880
2946
|
i(() => {
|
|
2881
2947
|
c.forEach((p) => p());
|
|
2882
2948
|
});
|
|
2883
2949
|
}, { flush: "post" });
|
|
2884
2950
|
}
|
|
2885
2951
|
// @__NO_SIDE_EFFECTS__
|
|
2886
|
-
function
|
|
2887
|
-
const e =
|
|
2888
|
-
return t &&
|
|
2952
|
+
function pa() {
|
|
2953
|
+
const e = ie(!1), t = gt();
|
|
2954
|
+
return t && Ee(() => {
|
|
2889
2955
|
e.value = !0;
|
|
2890
2956
|
}, t), e;
|
|
2891
2957
|
}
|
|
2892
2958
|
// @__NO_SIDE_EFFECTS__
|
|
2893
|
-
function
|
|
2894
|
-
const t = /* @__PURE__ */
|
|
2895
|
-
return
|
|
2959
|
+
function ma(e) {
|
|
2960
|
+
const t = /* @__PURE__ */ pa();
|
|
2961
|
+
return $(() => (t.value, !!e()));
|
|
2896
2962
|
}
|
|
2897
|
-
function
|
|
2898
|
-
const { window: o =
|
|
2963
|
+
function ha(e, t, n = {}) {
|
|
2964
|
+
const { window: o = Ye, ...a } = n;
|
|
2899
2965
|
let r;
|
|
2900
|
-
const s = /* @__PURE__ */
|
|
2966
|
+
const s = /* @__PURE__ */ ma(() => o && "MutationObserver" in o), l = () => {
|
|
2901
2967
|
r && (r.disconnect(), r = void 0);
|
|
2902
|
-
}, i =
|
|
2903
|
-
const p =
|
|
2968
|
+
}, i = oe($(() => {
|
|
2969
|
+
const p = ct(E(e)).map(ze).filter(ua);
|
|
2904
2970
|
return new Set(p);
|
|
2905
2971
|
}), (p) => {
|
|
2906
2972
|
l(), s.value && p.size && (r = new MutationObserver(t), p.forEach((h) => r.observe(h, a)));
|
|
@@ -2910,22 +2976,22 @@ function pa(e, t, n = {}) {
|
|
|
2910
2976
|
}), u = () => r?.takeRecords(), c = () => {
|
|
2911
2977
|
i(), l();
|
|
2912
2978
|
};
|
|
2913
|
-
return
|
|
2979
|
+
return In(c), {
|
|
2914
2980
|
isSupported: s,
|
|
2915
2981
|
stop: c,
|
|
2916
2982
|
takeRecords: u
|
|
2917
2983
|
};
|
|
2918
2984
|
}
|
|
2919
|
-
function
|
|
2920
|
-
const { window: o =
|
|
2921
|
-
if (!o || !a) return
|
|
2985
|
+
function ga(e, t, n = {}) {
|
|
2986
|
+
const { window: o = Ye, document: a = o?.document, flush: r = "sync" } = n;
|
|
2987
|
+
if (!o || !a) return fa;
|
|
2922
2988
|
let s;
|
|
2923
2989
|
const l = (c) => {
|
|
2924
2990
|
s?.(), s = c;
|
|
2925
|
-
}, i =
|
|
2926
|
-
const c =
|
|
2991
|
+
}, i = Oe(() => {
|
|
2992
|
+
const c = ze(e);
|
|
2927
2993
|
if (c) {
|
|
2928
|
-
const { stop: p } =
|
|
2994
|
+
const { stop: p } = ha(a, (h) => {
|
|
2929
2995
|
h.map((b) => [...b.removedNodes]).flat().some((b) => b === c || b.contains(c)) && t(h);
|
|
2930
2996
|
}, {
|
|
2931
2997
|
window: o,
|
|
@@ -2937,17 +3003,17 @@ function ma(e, t, n = {}) {
|
|
|
2937
3003
|
}, { flush: r }), u = () => {
|
|
2938
3004
|
i(), l();
|
|
2939
3005
|
};
|
|
2940
|
-
return
|
|
3006
|
+
return In(u), u;
|
|
2941
3007
|
}
|
|
2942
3008
|
// @__NO_SIDE_EFFECTS__
|
|
2943
|
-
function
|
|
3009
|
+
function wa(e = {}) {
|
|
2944
3010
|
var t;
|
|
2945
|
-
const { window: n =
|
|
3011
|
+
const { window: n = Ye, deep: o = !0, triggerOnRemoval: a = !1 } = e, r = (t = e.document) !== null && t !== void 0 ? t : n?.document, s = () => {
|
|
2946
3012
|
let u = r?.activeElement;
|
|
2947
3013
|
if (o)
|
|
2948
3014
|
for (var c; u?.shadowRoot; ) u = u == null || (c = u.shadowRoot) === null || c === void 0 ? void 0 : c.activeElement;
|
|
2949
3015
|
return u;
|
|
2950
|
-
}, l =
|
|
3016
|
+
}, l = ie(), i = () => {
|
|
2951
3017
|
l.value = s();
|
|
2952
3018
|
};
|
|
2953
3019
|
if (n) {
|
|
@@ -2955,26 +3021,26 @@ function ha(e = {}) {
|
|
|
2955
3021
|
capture: !0,
|
|
2956
3022
|
passive: !0
|
|
2957
3023
|
};
|
|
2958
|
-
|
|
3024
|
+
et(n, "blur", (c) => {
|
|
2959
3025
|
c.relatedTarget === null && i();
|
|
2960
|
-
}, u),
|
|
3026
|
+
}, u), et(n, "focus", i, u);
|
|
2961
3027
|
}
|
|
2962
|
-
return a &&
|
|
3028
|
+
return a && ga(l, i, { document: r }), i(), l;
|
|
2963
3029
|
}
|
|
2964
|
-
const
|
|
2965
|
-
function
|
|
2966
|
-
const { window: n =
|
|
2967
|
-
if (!n || !(/* @__PURE__ */
|
|
3030
|
+
const ya = "focusin", xa = "focusout", ba = ":focus-within";
|
|
3031
|
+
function Ia(e, t = {}) {
|
|
3032
|
+
const { window: n = Ye } = t, o = $(() => ze(e)), a = ie(!1), r = $(() => a.value);
|
|
3033
|
+
if (!n || !(/* @__PURE__ */ wa(t)).value) return { focused: r };
|
|
2968
3034
|
const s = { passive: !0 };
|
|
2969
|
-
return
|
|
3035
|
+
return et(o, ya, () => a.value = !0, s), et(o, xa, () => {
|
|
2970
3036
|
var l, i, u;
|
|
2971
|
-
return a.value = (l = (i = o.value) === null || i === void 0 || (u = i.matches) === null || u === void 0 ? void 0 : u.call(i,
|
|
3037
|
+
return a.value = (l = (i = o.value) === null || i === void 0 || (u = i.matches) === null || u === void 0 ? void 0 : u.call(i, ba)) !== null && l !== void 0 ? l : !1;
|
|
2972
3038
|
}, s), { focused: r };
|
|
2973
3039
|
}
|
|
2974
|
-
function
|
|
2975
|
-
const o =
|
|
3040
|
+
function ka(e, { window: t = Ye, scrollTarget: n } = {}) {
|
|
3041
|
+
const o = L(!1), a = () => {
|
|
2976
3042
|
if (!t) return;
|
|
2977
|
-
const r = t.document, s =
|
|
3043
|
+
const r = t.document, s = ze(e);
|
|
2978
3044
|
if (!s)
|
|
2979
3045
|
o.value = !1;
|
|
2980
3046
|
else {
|
|
@@ -2982,22 +3048,22 @@ function ba(e, { window: t = Ve, scrollTarget: n } = {}) {
|
|
|
2982
3048
|
o.value = l.top <= (t.innerHeight || r.documentElement.clientHeight) && l.left <= (t.innerWidth || r.documentElement.clientWidth) && l.bottom >= 0 && l.right >= 0;
|
|
2983
3049
|
}
|
|
2984
3050
|
};
|
|
2985
|
-
return
|
|
2986
|
-
() =>
|
|
3051
|
+
return oe(
|
|
3052
|
+
() => ze(e),
|
|
2987
3053
|
() => a(),
|
|
2988
3054
|
{ immediate: !0, flush: "post" }
|
|
2989
|
-
), t &&
|
|
3055
|
+
), t && et(n || t, "scroll", a, {
|
|
2990
3056
|
capture: !1,
|
|
2991
3057
|
passive: !0
|
|
2992
3058
|
}), o;
|
|
2993
3059
|
}
|
|
2994
|
-
const
|
|
2995
|
-
let t =
|
|
3060
|
+
const De = (e) => {
|
|
3061
|
+
let t = ka(e).value;
|
|
2996
3062
|
return t = t && e.offsetHeight > 0, t;
|
|
2997
|
-
},
|
|
3063
|
+
}, Se = (e) => e.tabIndex >= 0, Qt = (e) => {
|
|
2998
3064
|
const t = e.target;
|
|
2999
|
-
return
|
|
3000
|
-
},
|
|
3065
|
+
return Bt(t);
|
|
3066
|
+
}, Bt = (e) => {
|
|
3001
3067
|
let t;
|
|
3002
3068
|
if (e instanceof HTMLTableCellElement) {
|
|
3003
3069
|
const n = e.parentElement?.previousElementSibling;
|
|
@@ -3009,8 +3075,8 @@ const ke = (e) => {
|
|
|
3009
3075
|
const n = e.previousElementSibling;
|
|
3010
3076
|
n && (t = n);
|
|
3011
3077
|
}
|
|
3012
|
-
return t && (!
|
|
3013
|
-
},
|
|
3078
|
+
return t && (!Se(t) || !De(t)) ? Bt(t) : t;
|
|
3079
|
+
}, Ma = (e) => {
|
|
3014
3080
|
const t = e.target;
|
|
3015
3081
|
let n;
|
|
3016
3082
|
if (t instanceof HTMLTableCellElement) {
|
|
@@ -3026,11 +3092,11 @@ const ke = (e) => {
|
|
|
3026
3092
|
a && (n = a);
|
|
3027
3093
|
}
|
|
3028
3094
|
}
|
|
3029
|
-
return n && (!
|
|
3095
|
+
return n && (!Se(n) || !De(n)) ? Ft(n) : n;
|
|
3030
3096
|
}, Kt = (e) => {
|
|
3031
3097
|
const t = e.target;
|
|
3032
|
-
return
|
|
3033
|
-
},
|
|
3098
|
+
return Ft(t);
|
|
3099
|
+
}, Ft = (e) => {
|
|
3034
3100
|
let t;
|
|
3035
3101
|
if (e instanceof HTMLTableCellElement) {
|
|
3036
3102
|
const n = e.parentElement?.nextElementSibling;
|
|
@@ -3042,8 +3108,8 @@ const ke = (e) => {
|
|
|
3042
3108
|
const n = e.nextElementSibling;
|
|
3043
3109
|
n && (t = n);
|
|
3044
3110
|
}
|
|
3045
|
-
return t && (!
|
|
3046
|
-
},
|
|
3111
|
+
return t && (!Se(t) || !De(t)) ? Ft(t) : t;
|
|
3112
|
+
}, Ca = (e) => {
|
|
3047
3113
|
const t = e.target;
|
|
3048
3114
|
let n;
|
|
3049
3115
|
if (t instanceof HTMLTableCellElement) {
|
|
@@ -3059,33 +3125,33 @@ const ke = (e) => {
|
|
|
3059
3125
|
a && (n = a);
|
|
3060
3126
|
}
|
|
3061
3127
|
}
|
|
3062
|
-
return n && (!
|
|
3063
|
-
}, Qt = (e) => {
|
|
3064
|
-
const t = e.target;
|
|
3065
|
-
return Ft(t);
|
|
3066
|
-
}, Ft = (e) => {
|
|
3067
|
-
let t;
|
|
3068
|
-
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!Ie(t) || !ke(t)) ? Ft(t) : t;
|
|
3128
|
+
return n && (!Se(n) || !De(n)) ? Bt(n) : n;
|
|
3069
3129
|
}, en = (e) => {
|
|
3070
3130
|
const t = e.target;
|
|
3071
3131
|
return Zt(t);
|
|
3072
3132
|
}, Zt = (e) => {
|
|
3073
3133
|
let t;
|
|
3074
|
-
return e.
|
|
3134
|
+
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!Se(t) || !De(t)) ? Zt(t) : t;
|
|
3075
3135
|
}, tn = (e) => {
|
|
3076
|
-
const t = e.target
|
|
3077
|
-
return
|
|
3136
|
+
const t = e.target;
|
|
3137
|
+
return Nt(t);
|
|
3138
|
+
}, Nt = (e) => {
|
|
3139
|
+
let t;
|
|
3140
|
+
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!Se(t) || !De(t)) ? Nt(t) : t;
|
|
3078
3141
|
}, nn = (e) => {
|
|
3142
|
+
const t = e.target.parentElement?.firstElementChild;
|
|
3143
|
+
return t && (!Se(t) || !De(t)) ? Nt(t) : t;
|
|
3144
|
+
}, on = (e) => {
|
|
3079
3145
|
const t = e.target.parentElement?.lastElementChild;
|
|
3080
|
-
return t && (!
|
|
3081
|
-
},
|
|
3146
|
+
return t && (!Se(t) || !De(t)) ? Zt(t) : t;
|
|
3147
|
+
}, st = ["alt", "control", "shift", "meta"], Ea = {
|
|
3082
3148
|
ArrowUp: "up",
|
|
3083
3149
|
ArrowDown: "down",
|
|
3084
3150
|
ArrowLeft: "left",
|
|
3085
3151
|
ArrowRight: "right"
|
|
3086
3152
|
}, kn = {
|
|
3087
3153
|
"keydown.up": (e) => {
|
|
3088
|
-
const t =
|
|
3154
|
+
const t = Qt(e);
|
|
3089
3155
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3090
3156
|
},
|
|
3091
3157
|
"keydown.down": (e) => {
|
|
@@ -3093,31 +3159,31 @@ const ke = (e) => {
|
|
|
3093
3159
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3094
3160
|
},
|
|
3095
3161
|
"keydown.left": (e) => {
|
|
3096
|
-
const t =
|
|
3162
|
+
const t = en(e);
|
|
3097
3163
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
3098
3164
|
},
|
|
3099
3165
|
"keydown.right": (e) => {
|
|
3100
|
-
const t =
|
|
3166
|
+
const t = tn(e);
|
|
3101
3167
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
3102
3168
|
},
|
|
3103
3169
|
"keydown.control.up": (e) => {
|
|
3104
|
-
const t =
|
|
3170
|
+
const t = Ma(e);
|
|
3105
3171
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3106
3172
|
},
|
|
3107
3173
|
"keydown.control.down": (e) => {
|
|
3108
|
-
const t =
|
|
3174
|
+
const t = Ca(e);
|
|
3109
3175
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3110
3176
|
},
|
|
3111
3177
|
"keydown.control.left": (e) => {
|
|
3112
|
-
const t =
|
|
3178
|
+
const t = nn(e);
|
|
3113
3179
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3114
3180
|
},
|
|
3115
3181
|
"keydown.control.right": (e) => {
|
|
3116
|
-
const t =
|
|
3182
|
+
const t = on(e);
|
|
3117
3183
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3118
3184
|
},
|
|
3119
3185
|
"keydown.end": (e) => {
|
|
3120
|
-
const t =
|
|
3186
|
+
const t = on(e);
|
|
3121
3187
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3122
3188
|
},
|
|
3123
3189
|
"keydown.enter": (e) => {
|
|
@@ -3130,24 +3196,24 @@ const ke = (e) => {
|
|
|
3130
3196
|
"keydown.shift.enter": (e) => {
|
|
3131
3197
|
if (e.target instanceof HTMLTableCellElement) {
|
|
3132
3198
|
e.preventDefault(), e.stopPropagation();
|
|
3133
|
-
const t =
|
|
3199
|
+
const t = Qt(e);
|
|
3134
3200
|
t && t.focus();
|
|
3135
3201
|
}
|
|
3136
3202
|
},
|
|
3137
3203
|
"keydown.home": (e) => {
|
|
3138
|
-
const t =
|
|
3204
|
+
const t = nn(e);
|
|
3139
3205
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3140
3206
|
},
|
|
3141
3207
|
"keydown.tab": (e) => {
|
|
3142
|
-
const t =
|
|
3208
|
+
const t = tn(e);
|
|
3143
3209
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3144
3210
|
},
|
|
3145
3211
|
"keydown.shift.tab": (e) => {
|
|
3146
|
-
const t =
|
|
3212
|
+
const t = en(e);
|
|
3147
3213
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3148
3214
|
}
|
|
3149
3215
|
};
|
|
3150
|
-
function
|
|
3216
|
+
function Aa(e) {
|
|
3151
3217
|
const t = (s) => {
|
|
3152
3218
|
let l = null;
|
|
3153
3219
|
return s.parent && (typeof s.parent == "string" ? l = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? l = s.parent : l = s.parent.value), l;
|
|
@@ -3171,23 +3237,23 @@ function Ma(e) {
|
|
|
3171
3237
|
}, o = (s) => {
|
|
3172
3238
|
const l = t(s);
|
|
3173
3239
|
let i = [];
|
|
3174
|
-
return s.selectors ? i = n(s) : l && (i = Array.from(l.children).filter((u) =>
|
|
3240
|
+
return s.selectors ? i = n(s) : l && (i = Array.from(l.children).filter((u) => Se(u) && De(u))), i;
|
|
3175
3241
|
}, a = (s) => (l) => {
|
|
3176
|
-
const i =
|
|
3177
|
-
if (
|
|
3242
|
+
const i = Ea[l.key] || l.key.toLowerCase();
|
|
3243
|
+
if (st.includes(i)) return;
|
|
3178
3244
|
const u = s.handlers || kn;
|
|
3179
3245
|
for (const c of Object.keys(u)) {
|
|
3180
3246
|
const [p, ...h] = c.split(".");
|
|
3181
3247
|
if (p === "keydown" && h.includes(i)) {
|
|
3182
|
-
const b = u[c],
|
|
3183
|
-
const m =
|
|
3248
|
+
const b = u[c], I = h.filter((f) => st.includes(f)), x = st.some((f) => {
|
|
3249
|
+
const m = f.charAt(0).toUpperCase() + f.slice(1);
|
|
3184
3250
|
return l.getModifierState(m);
|
|
3185
3251
|
});
|
|
3186
|
-
if (
|
|
3252
|
+
if (I.length > 0) {
|
|
3187
3253
|
if (x) {
|
|
3188
|
-
for (const
|
|
3189
|
-
if (h.includes(
|
|
3190
|
-
const m =
|
|
3254
|
+
for (const f of st)
|
|
3255
|
+
if (h.includes(f)) {
|
|
3256
|
+
const m = f.charAt(0).toUpperCase() + f.slice(1);
|
|
3191
3257
|
l.getModifierState(m) && b(l);
|
|
3192
3258
|
}
|
|
3193
3259
|
}
|
|
@@ -3196,29 +3262,29 @@ function Ma(e) {
|
|
|
3196
3262
|
}
|
|
3197
3263
|
}
|
|
3198
3264
|
}, r = [];
|
|
3199
|
-
|
|
3265
|
+
Ee(() => {
|
|
3200
3266
|
for (const s of e) {
|
|
3201
3267
|
const l = t(s), i = o(s), u = a(s), c = l ? [l] : i;
|
|
3202
3268
|
for (const p of c) {
|
|
3203
|
-
const { focused: h } =
|
|
3204
|
-
|
|
3269
|
+
const { focused: h } = Ia(L(p)), b = oe(h, (I) => {
|
|
3270
|
+
I ? p.addEventListener("keydown", u) : p.removeEventListener("keydown", u);
|
|
3205
3271
|
});
|
|
3206
3272
|
r.push(b);
|
|
3207
3273
|
}
|
|
3208
3274
|
}
|
|
3209
|
-
}),
|
|
3275
|
+
}), sn(() => {
|
|
3210
3276
|
for (const s of r)
|
|
3211
3277
|
s();
|
|
3212
3278
|
});
|
|
3213
3279
|
}
|
|
3214
|
-
const
|
|
3280
|
+
const Ta = {
|
|
3215
3281
|
ref: "datepicker",
|
|
3216
3282
|
class: "adatepicker",
|
|
3217
3283
|
tabindex: "0"
|
|
3218
|
-
},
|
|
3284
|
+
}, $a = {
|
|
3219
3285
|
colspan: "5",
|
|
3220
3286
|
tabindex: -1
|
|
3221
|
-
},
|
|
3287
|
+
}, Da = ["onClick", "onKeydown"], Sa = 6, ln = 7, Ra = /* @__PURE__ */ te({
|
|
3222
3288
|
__name: "ADatePicker",
|
|
3223
3289
|
props: {
|
|
3224
3290
|
modelValue: { default: /* @__PURE__ */ new Date() },
|
|
@@ -3226,39 +3292,39 @@ const Ea = {
|
|
|
3226
3292
|
},
|
|
3227
3293
|
emits: ["update:modelValue"],
|
|
3228
3294
|
setup(e, { expose: t }) {
|
|
3229
|
-
const n =
|
|
3230
|
-
|
|
3231
|
-
i(), await
|
|
3232
|
-
const
|
|
3233
|
-
if (
|
|
3234
|
-
|
|
3295
|
+
const n = ke(e, "modelValue"), o = L(new Date(n.value)), a = L(o.value.getMonth()), r = L(o.value.getFullYear()), s = L([]), l = fe("datepicker");
|
|
3296
|
+
Ee(async () => {
|
|
3297
|
+
i(), await pt();
|
|
3298
|
+
const C = document.getElementsByClassName("selectedDate");
|
|
3299
|
+
if (C.length > 0)
|
|
3300
|
+
C[0].focus();
|
|
3235
3301
|
else {
|
|
3236
|
-
const
|
|
3237
|
-
|
|
3302
|
+
const T = document.getElementsByClassName("todaysDate");
|
|
3303
|
+
T.length > 0 && T[0].focus();
|
|
3238
3304
|
}
|
|
3239
3305
|
});
|
|
3240
3306
|
const i = () => {
|
|
3241
3307
|
s.value = [];
|
|
3242
|
-
const
|
|
3243
|
-
for (const
|
|
3244
|
-
s.value.push(
|
|
3308
|
+
const C = new Date(r.value, a.value, 1), T = C.getDay(), R = C.setDate(C.getDate() - T);
|
|
3309
|
+
for (const S of Array(43).keys())
|
|
3310
|
+
s.value.push(R + S * 864e5);
|
|
3245
3311
|
};
|
|
3246
|
-
|
|
3312
|
+
oe([a, r], i);
|
|
3247
3313
|
const u = () => r.value -= 1, c = () => r.value += 1, p = () => {
|
|
3248
3314
|
a.value == 0 ? (a.value = 11, u()) : a.value -= 1;
|
|
3249
3315
|
}, h = () => {
|
|
3250
3316
|
a.value == 11 ? (a.value = 0, c()) : a.value += 1;
|
|
3251
|
-
}, b = (
|
|
3252
|
-
const
|
|
3253
|
-
if (a.value ===
|
|
3254
|
-
return
|
|
3255
|
-
},
|
|
3256
|
-
n.value = o.value = new Date(s.value[
|
|
3257
|
-
}, g =
|
|
3317
|
+
}, b = (C) => {
|
|
3318
|
+
const T = /* @__PURE__ */ new Date();
|
|
3319
|
+
if (a.value === T.getMonth())
|
|
3320
|
+
return T.toDateString() === new Date(C).toDateString();
|
|
3321
|
+
}, I = (C) => new Date(C).toDateString() === new Date(o.value).toDateString(), x = (C, T) => (C - 1) * ln + T, f = (C, T) => s.value[x(C, T)], m = (C) => {
|
|
3322
|
+
n.value = o.value = new Date(s.value[C]);
|
|
3323
|
+
}, g = $(() => new Date(r.value, a.value, 1).toLocaleDateString(void 0, {
|
|
3258
3324
|
year: "numeric",
|
|
3259
3325
|
month: "long"
|
|
3260
3326
|
}));
|
|
3261
|
-
return
|
|
3327
|
+
return Aa([
|
|
3262
3328
|
{
|
|
3263
3329
|
parent: l,
|
|
3264
3330
|
selectors: "td",
|
|
@@ -3274,7 +3340,7 @@ const Ea = {
|
|
|
3274
3340
|
}
|
|
3275
3341
|
}
|
|
3276
3342
|
}
|
|
3277
|
-
]), t({ currentMonth: a, currentYear: r, selectedDate: o }), (
|
|
3343
|
+
]), t({ currentMonth: a, currentYear: r, selectedDate: o }), (C, T) => (w(), k("div", Ta, [
|
|
3278
3344
|
y("table", null, [
|
|
3279
3345
|
y("tbody", null, [
|
|
3280
3346
|
y("tr", null, [
|
|
@@ -3283,14 +3349,14 @@ const Ea = {
|
|
|
3283
3349
|
tabindex: -1,
|
|
3284
3350
|
onClick: p
|
|
3285
3351
|
}, "<"),
|
|
3286
|
-
y("th",
|
|
3352
|
+
y("th", $a, K(g.value), 1),
|
|
3287
3353
|
y("td", {
|
|
3288
3354
|
id: "next-month-btn",
|
|
3289
3355
|
tabindex: -1,
|
|
3290
3356
|
onClick: h
|
|
3291
3357
|
}, ">")
|
|
3292
3358
|
]),
|
|
3293
|
-
|
|
3359
|
+
T[0] || (T[0] = y("tr", { class: "days-header" }, [
|
|
3294
3360
|
y("td", null, "M"),
|
|
3295
3361
|
y("td", null, "T"),
|
|
3296
3362
|
y("td", null, "W"),
|
|
@@ -3299,63 +3365,63 @@ const Ea = {
|
|
|
3299
3365
|
y("td", null, "S"),
|
|
3300
3366
|
y("td", null, "S")
|
|
3301
3367
|
], -1)),
|
|
3302
|
-
(w(), k(
|
|
3303
|
-
(w(), k(
|
|
3368
|
+
(w(), k(ue, null, me(Sa, (R) => y("tr", { key: R }, [
|
|
3369
|
+
(w(), k(ue, null, me(ln, (S) => y("td", {
|
|
3304
3370
|
ref_for: !0,
|
|
3305
3371
|
ref: "celldate",
|
|
3306
|
-
key: x(
|
|
3372
|
+
key: x(R, S),
|
|
3307
3373
|
contenteditable: !1,
|
|
3308
3374
|
spellcheck: !1,
|
|
3309
3375
|
tabindex: 0,
|
|
3310
|
-
class:
|
|
3311
|
-
todaysDate: b(
|
|
3312
|
-
selectedDate:
|
|
3376
|
+
class: ae({
|
|
3377
|
+
todaysDate: b(f(R, S)),
|
|
3378
|
+
selectedDate: I(f(R, S))
|
|
3313
3379
|
}),
|
|
3314
|
-
onClick:
|
|
3315
|
-
onKeydown:
|
|
3316
|
-
},
|
|
3380
|
+
onClick: Ie((_) => m(x(R, S)), ["prevent", "stop"]),
|
|
3381
|
+
onKeydown: Ne((_) => m(x(R, S)), ["enter"])
|
|
3382
|
+
}, K(new Date(f(R, S)).getDate()), 43, Da)), 64))
|
|
3317
3383
|
])), 64))
|
|
3318
3384
|
])
|
|
3319
3385
|
])
|
|
3320
3386
|
], 512));
|
|
3321
3387
|
}
|
|
3322
|
-
}),
|
|
3388
|
+
}), La = /* @__PURE__ */ $e(Ra, [["__scopeId", "data-v-056d2b5e"]]), Ha = /* @__PURE__ */ te({
|
|
3323
3389
|
__name: "CollapseButton",
|
|
3324
3390
|
props: {
|
|
3325
3391
|
collapsed: { type: Boolean }
|
|
3326
3392
|
},
|
|
3327
3393
|
setup(e) {
|
|
3328
3394
|
return (t, n) => (w(), k("button", {
|
|
3329
|
-
class:
|
|
3395
|
+
class: ae(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
|
|
3330
3396
|
}, "×", 2));
|
|
3331
3397
|
}
|
|
3332
|
-
}),
|
|
3398
|
+
}), Va = /* @__PURE__ */ $e(Ha, [["__scopeId", "data-v-6f1c1b45"]]), Pa = { class: "aform" }, Oa = {
|
|
3333
3399
|
key: 0,
|
|
3334
3400
|
class: "aform-nested-section"
|
|
3335
|
-
},
|
|
3401
|
+
}, _a = {
|
|
3336
3402
|
key: 0,
|
|
3337
3403
|
class: "aform-nested-label"
|
|
3338
|
-
},
|
|
3404
|
+
}, Ba = /* @__PURE__ */ te({
|
|
3339
3405
|
__name: "AForm",
|
|
3340
|
-
props: /* @__PURE__ */
|
|
3406
|
+
props: /* @__PURE__ */ Me({
|
|
3341
3407
|
schema: {},
|
|
3342
3408
|
readOnly: { type: Boolean }
|
|
3343
3409
|
}, {
|
|
3344
3410
|
data: { required: !0 },
|
|
3345
3411
|
dataModifiers: {}
|
|
3346
3412
|
}),
|
|
3347
|
-
emits: /* @__PURE__ */
|
|
3413
|
+
emits: /* @__PURE__ */ Me(["update:schema", "update:data"], ["update:data"]),
|
|
3348
3414
|
setup(e, { emit: t }) {
|
|
3349
|
-
const n = t, o =
|
|
3350
|
-
|
|
3415
|
+
const n = t, o = ke(e, "data"), a = L({});
|
|
3416
|
+
Oe(() => {
|
|
3351
3417
|
!e.schema || !o.value || e.schema.forEach((i) => {
|
|
3352
3418
|
"schema" in i && Array.isArray(i.schema) && i.schema.length > 0 && (!a.value[i.fieldname] && o.value[i.fieldname] ? a.value[i.fieldname] = o.value[i.fieldname] : a.value[i.fieldname] || (a.value[i.fieldname] = {}));
|
|
3353
3419
|
});
|
|
3354
|
-
}),
|
|
3420
|
+
}), Oe(() => {
|
|
3355
3421
|
Object.keys(a.value).forEach((i) => {
|
|
3356
3422
|
o.value && a.value[i] !== o.value[i] && (o.value[i] = a.value[i], n("update:data", o.value));
|
|
3357
3423
|
});
|
|
3358
|
-
}),
|
|
3424
|
+
}), Oe(() => {
|
|
3359
3425
|
o.value && e.schema && e.schema.forEach((i) => {
|
|
3360
3426
|
i.fieldname && o.value[i.fieldname] !== void 0 && (i.value = o.value[i.fieldname]);
|
|
3361
3427
|
});
|
|
@@ -3365,9 +3431,9 @@ const Ea = {
|
|
|
3365
3431
|
for (const [c, p] of Object.entries(i))
|
|
3366
3432
|
["component", "fieldtype"].includes(c) || (u[c] = p), c === "rows" && (!p || Array.isArray(p) && p.length === 0) && (u.rows = o.value[i.fieldname] || []);
|
|
3367
3433
|
return u;
|
|
3368
|
-
}, s =
|
|
3369
|
-
|
|
3370
|
-
e.schema && s.value.length !== e.schema.length && (s.value = e.schema.map((i, u) =>
|
|
3434
|
+
}, s = L([]);
|
|
3435
|
+
Oe(() => {
|
|
3436
|
+
e.schema && s.value.length !== e.schema.length && (s.value = e.schema.map((i, u) => $({
|
|
3371
3437
|
get() {
|
|
3372
3438
|
return i.value;
|
|
3373
3439
|
},
|
|
@@ -3377,20 +3443,20 @@ const Ea = {
|
|
|
3377
3443
|
}
|
|
3378
3444
|
})));
|
|
3379
3445
|
});
|
|
3380
|
-
const l =
|
|
3446
|
+
const l = $(() => s.value);
|
|
3381
3447
|
return (i, u) => {
|
|
3382
|
-
const c =
|
|
3383
|
-
return w(), k("form",
|
|
3384
|
-
(w(!0), k(
|
|
3385
|
-
"schema" in p && Array.isArray(p.schema) && p.schema.length > 0 ? (w(), k("div",
|
|
3386
|
-
p.label ? (w(), k("h4",
|
|
3387
|
-
|
|
3448
|
+
const c = dn("AForm", !0);
|
|
3449
|
+
return w(), k("form", Pa, [
|
|
3450
|
+
(w(!0), k(ue, null, me(e.schema, (p, h) => (w(), k(ue, { key: h }, [
|
|
3451
|
+
"schema" in p && Array.isArray(p.schema) && p.schema.length > 0 ? (w(), k("div", Oa, [
|
|
3452
|
+
p.label ? (w(), k("h4", _a, K(p.label), 1)) : q("", !0),
|
|
3453
|
+
dt(c, {
|
|
3388
3454
|
data: a.value[p.fieldname],
|
|
3389
3455
|
"onUpdate:data": (b) => a.value[p.fieldname] = b,
|
|
3390
3456
|
schema: p.schema,
|
|
3391
3457
|
"read-only": e.readOnly || p.readOnly
|
|
3392
3458
|
}, null, 8, ["data", "onUpdate:data", "schema", "read-only"])
|
|
3393
|
-
])) : (w(),
|
|
3459
|
+
])) : (w(), pe(We(p.component), vt({
|
|
3394
3460
|
key: 1,
|
|
3395
3461
|
modelValue: l.value[h].value,
|
|
3396
3462
|
"onUpdate:modelValue": (b) => l.value[h].value = b,
|
|
@@ -3402,7 +3468,7 @@ const Ea = {
|
|
|
3402
3468
|
]);
|
|
3403
3469
|
};
|
|
3404
3470
|
}
|
|
3405
|
-
}),
|
|
3471
|
+
}), Mn = /* @__PURE__ */ $e(Ba, [["__scopeId", "data-v-06e17c5b"]]), Fa = /* @__PURE__ */ te({
|
|
3406
3472
|
__name: "AFieldset",
|
|
3407
3473
|
props: {
|
|
3408
3474
|
schema: {},
|
|
@@ -3411,7 +3477,7 @@ const Ea = {
|
|
|
3411
3477
|
data: { default: () => ({}) }
|
|
3412
3478
|
},
|
|
3413
3479
|
setup(e, { expose: t }) {
|
|
3414
|
-
const n =
|
|
3480
|
+
const n = L(!1), o = L(e.data || []), a = L(e.schema), r = (s) => {
|
|
3415
3481
|
s.preventDefault(), e.collapsible && (n.value = !n.value);
|
|
3416
3482
|
};
|
|
3417
3483
|
return t({ collapsed: n }), (s, l) => (w(), k("fieldset", null, [
|
|
@@ -3419,59 +3485,59 @@ const Ea = {
|
|
|
3419
3485
|
onClick: r,
|
|
3420
3486
|
onSubmit: r
|
|
3421
3487
|
}, [
|
|
3422
|
-
Dt(
|
|
3423
|
-
e.collapsible ? (w(),
|
|
3488
|
+
Dt(K(e.label) + " ", 1),
|
|
3489
|
+
e.collapsible ? (w(), pe(Va, {
|
|
3424
3490
|
key: 0,
|
|
3425
3491
|
collapsed: n.value
|
|
3426
|
-
}, null, 8, ["collapsed"])) :
|
|
3492
|
+
}, null, 8, ["collapsed"])) : q("", !0)
|
|
3427
3493
|
], 32),
|
|
3428
|
-
|
|
3429
|
-
|
|
3494
|
+
he(s.$slots, "default", { collapsed: n.value }, () => [
|
|
3495
|
+
J(dt(Mn, {
|
|
3430
3496
|
schema: a.value,
|
|
3431
3497
|
data: o.value,
|
|
3432
3498
|
"onUpdate:data": l[0] || (l[0] = (i) => o.value = i)
|
|
3433
3499
|
}, null, 8, ["schema", "data"]), [
|
|
3434
|
-
[
|
|
3500
|
+
[Ce, !n.value]
|
|
3435
3501
|
])
|
|
3436
3502
|
], !0)
|
|
3437
3503
|
]));
|
|
3438
3504
|
}
|
|
3439
|
-
}),
|
|
3505
|
+
}), Za = /* @__PURE__ */ $e(Fa, [["__scopeId", "data-v-18fd6c61"]]), Na = { class: "aform_form-element aform_file-attach aform__grid--full" }, Ua = {
|
|
3440
3506
|
key: 0,
|
|
3441
3507
|
class: "aform_file-attach-feedback"
|
|
3442
|
-
},
|
|
3508
|
+
}, Wa = ["disabled"], Ga = /* @__PURE__ */ te({
|
|
3443
3509
|
__name: "AFileAttach",
|
|
3444
3510
|
props: {
|
|
3445
3511
|
label: {}
|
|
3446
3512
|
},
|
|
3447
3513
|
setup(e) {
|
|
3448
|
-
const { files: t, open: n, reset: o, onChange: a } =
|
|
3449
|
-
return a((s) => s), (s, l) => (w(), k("div",
|
|
3450
|
-
|
|
3514
|
+
const { files: t, open: n, reset: o, onChange: a } = Ql(), r = $(() => `${t.value.length} ${t.value.length === 1 ? "file" : "files"}`);
|
|
3515
|
+
return a((s) => s), (s, l) => (w(), k("div", Na, [
|
|
3516
|
+
V(t) ? (w(), k("div", Ua, [
|
|
3451
3517
|
y("p", null, [
|
|
3452
3518
|
l[2] || (l[2] = Dt(" You have selected: ", -1)),
|
|
3453
|
-
y("b", null,
|
|
3519
|
+
y("b", null, K(r.value), 1)
|
|
3454
3520
|
]),
|
|
3455
|
-
(w(!0), k(
|
|
3521
|
+
(w(!0), k(ue, null, me(V(t), (i) => (w(), k("li", {
|
|
3456
3522
|
key: i.name
|
|
3457
|
-
},
|
|
3458
|
-
])) :
|
|
3523
|
+
}, K(i.name), 1))), 128))
|
|
3524
|
+
])) : q("", !0),
|
|
3459
3525
|
y("button", {
|
|
3460
3526
|
type: "button",
|
|
3461
3527
|
class: "aform_form-btn",
|
|
3462
|
-
onClick: l[0] || (l[0] = (i) =>
|
|
3463
|
-
},
|
|
3528
|
+
onClick: l[0] || (l[0] = (i) => V(n)())
|
|
3529
|
+
}, K(e.label), 1),
|
|
3464
3530
|
y("button", {
|
|
3465
3531
|
type: "button",
|
|
3466
|
-
disabled: !
|
|
3532
|
+
disabled: !V(t),
|
|
3467
3533
|
class: "aform_form-btn",
|
|
3468
|
-
onClick: l[1] || (l[1] = (i) =>
|
|
3469
|
-
}, "Reset", 8,
|
|
3534
|
+
onClick: l[1] || (l[1] = (i) => V(o)())
|
|
3535
|
+
}, "Reset", 8, Wa)
|
|
3470
3536
|
]));
|
|
3471
3537
|
}
|
|
3472
|
-
}), za = /* @__PURE__ */
|
|
3538
|
+
}), za = /* @__PURE__ */ $e(Ga, [["__scopeId", "data-v-b700734f"]]), qa = { class: "aform_form-element" }, Ya = ["id", "disabled", "required"], Xa = ["for"], ja = ["innerHTML"], Ja = /* @__PURE__ */ te({
|
|
3473
3539
|
__name: "ANumericInput",
|
|
3474
|
-
props: /* @__PURE__ */
|
|
3540
|
+
props: /* @__PURE__ */ Me({
|
|
3475
3541
|
schema: {},
|
|
3476
3542
|
label: {},
|
|
3477
3543
|
mask: {},
|
|
@@ -3485,31 +3551,31 @@ const Ea = {
|
|
|
3485
3551
|
}),
|
|
3486
3552
|
emits: ["update:modelValue"],
|
|
3487
3553
|
setup(e) {
|
|
3488
|
-
const t =
|
|
3489
|
-
return (n, o) => (w(), k("div",
|
|
3490
|
-
|
|
3554
|
+
const t = ke(e, "modelValue");
|
|
3555
|
+
return (n, o) => (w(), k("div", qa, [
|
|
3556
|
+
J(y("input", {
|
|
3491
3557
|
id: e.uuid,
|
|
3492
3558
|
"onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
|
|
3493
3559
|
class: "aform_input-field",
|
|
3494
3560
|
type: "number",
|
|
3495
3561
|
disabled: e.readOnly,
|
|
3496
3562
|
required: e.required
|
|
3497
|
-
}, null, 8,
|
|
3498
|
-
[
|
|
3563
|
+
}, null, 8, Ya), [
|
|
3564
|
+
[we, t.value]
|
|
3499
3565
|
]),
|
|
3500
3566
|
y("label", {
|
|
3501
3567
|
class: "aform_field-label",
|
|
3502
3568
|
for: e.uuid
|
|
3503
|
-
},
|
|
3504
|
-
|
|
3569
|
+
}, K(e.label), 9, Xa),
|
|
3570
|
+
J(y("p", {
|
|
3505
3571
|
class: "aform_error",
|
|
3506
3572
|
innerHTML: e.validation.errorMessage
|
|
3507
|
-
}, null, 8,
|
|
3508
|
-
[
|
|
3573
|
+
}, null, 8, ja), [
|
|
3574
|
+
[Ce, e.validation.errorMessage]
|
|
3509
3575
|
])
|
|
3510
3576
|
]));
|
|
3511
3577
|
}
|
|
3512
|
-
}),
|
|
3578
|
+
}), an = {
|
|
3513
3579
|
date: "##/##/####",
|
|
3514
3580
|
datetime: "####/##/## ##:##",
|
|
3515
3581
|
time: "##:##",
|
|
@@ -3517,34 +3583,34 @@ const Ea = {
|
|
|
3517
3583
|
phone: "(###) ### - ####",
|
|
3518
3584
|
card: "#### #### #### ####"
|
|
3519
3585
|
};
|
|
3520
|
-
function
|
|
3586
|
+
function Qa(e) {
|
|
3521
3587
|
try {
|
|
3522
3588
|
return Function(`"use strict";return (${e})`)();
|
|
3523
3589
|
} catch {
|
|
3524
3590
|
}
|
|
3525
3591
|
}
|
|
3526
|
-
function
|
|
3592
|
+
function Ka(e) {
|
|
3527
3593
|
let t = e.value;
|
|
3528
3594
|
if (t) {
|
|
3529
|
-
const n =
|
|
3595
|
+
const n = Qa(t);
|
|
3530
3596
|
if (n) {
|
|
3531
3597
|
const o = e.instance?.locale;
|
|
3532
3598
|
t = n(o);
|
|
3533
3599
|
}
|
|
3534
3600
|
} else {
|
|
3535
3601
|
const o = e.instance?.schema?.fieldtype?.toLowerCase();
|
|
3536
|
-
o &&
|
|
3602
|
+
o && an[o] && (t = an[o]);
|
|
3537
3603
|
}
|
|
3538
3604
|
return t;
|
|
3539
3605
|
}
|
|
3540
|
-
function
|
|
3606
|
+
function es(e, t) {
|
|
3541
3607
|
let n = e;
|
|
3542
3608
|
const o = [t, "/", "-", "(", ")", " "];
|
|
3543
3609
|
for (const a of o)
|
|
3544
3610
|
n = n.replaceAll(a, "");
|
|
3545
3611
|
return n;
|
|
3546
3612
|
}
|
|
3547
|
-
function
|
|
3613
|
+
function ts(e, t, n) {
|
|
3548
3614
|
let o = t;
|
|
3549
3615
|
for (const a of e) {
|
|
3550
3616
|
const r = o.indexOf(n);
|
|
@@ -3555,19 +3621,19 @@ function Qa(e, t, n) {
|
|
|
3555
3621
|
}
|
|
3556
3622
|
return o.slice(0, t.length);
|
|
3557
3623
|
}
|
|
3558
|
-
function
|
|
3559
|
-
const n =
|
|
3624
|
+
function ns(e, t) {
|
|
3625
|
+
const n = Ka(t);
|
|
3560
3626
|
if (!n) return;
|
|
3561
|
-
const o = "#", a = e.value, r =
|
|
3627
|
+
const o = "#", a = e.value, r = es(a, o);
|
|
3562
3628
|
if (r) {
|
|
3563
|
-
const s =
|
|
3629
|
+
const s = ts(r, n, o);
|
|
3564
3630
|
t.instance?.maskFilled && (t.instance.maskFilled = !s.includes(o)), e.value = s;
|
|
3565
3631
|
} else
|
|
3566
3632
|
e.value = n;
|
|
3567
3633
|
}
|
|
3568
|
-
const
|
|
3634
|
+
const os = { class: "aform_form-element" }, ls = ["id", "disabled", "maxlength", "required"], as = ["for"], ss = ["innerHTML"], rs = /* @__PURE__ */ te({
|
|
3569
3635
|
__name: "ATextInput",
|
|
3570
|
-
props: /* @__PURE__ */
|
|
3636
|
+
props: /* @__PURE__ */ Me({
|
|
3571
3637
|
schema: {},
|
|
3572
3638
|
label: {},
|
|
3573
3639
|
mask: {},
|
|
@@ -3581,35 +3647,35 @@ const ts = { class: "aform_form-element" }, ns = ["id", "disabled", "maxlength",
|
|
|
3581
3647
|
}),
|
|
3582
3648
|
emits: ["update:modelValue"],
|
|
3583
3649
|
setup(e) {
|
|
3584
|
-
const t =
|
|
3585
|
-
return (o, a) => (w(), k("div",
|
|
3586
|
-
|
|
3650
|
+
const t = L(!0), n = ke(e, "modelValue");
|
|
3651
|
+
return (o, a) => (w(), k("div", os, [
|
|
3652
|
+
J(y("input", {
|
|
3587
3653
|
id: e.uuid,
|
|
3588
3654
|
"onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
|
|
3589
3655
|
class: "aform_input-field",
|
|
3590
3656
|
disabled: e.readOnly,
|
|
3591
3657
|
maxlength: e.mask && t.value ? e.mask.length : void 0,
|
|
3592
3658
|
required: e.required
|
|
3593
|
-
}, null, 8,
|
|
3594
|
-
[
|
|
3595
|
-
[
|
|
3659
|
+
}, null, 8, ls), [
|
|
3660
|
+
[we, n.value],
|
|
3661
|
+
[V(ns), e.mask]
|
|
3596
3662
|
]),
|
|
3597
3663
|
y("label", {
|
|
3598
3664
|
class: "aform_field-label",
|
|
3599
3665
|
for: e.uuid
|
|
3600
|
-
},
|
|
3601
|
-
|
|
3666
|
+
}, K(e.label), 9, as),
|
|
3667
|
+
J(y("p", {
|
|
3602
3668
|
class: "aform_error",
|
|
3603
3669
|
innerHTML: e.validation.errorMessage
|
|
3604
|
-
}, null, 8,
|
|
3605
|
-
[
|
|
3670
|
+
}, null, 8, ss), [
|
|
3671
|
+
[Ce, e.validation.errorMessage]
|
|
3606
3672
|
])
|
|
3607
3673
|
]));
|
|
3608
3674
|
}
|
|
3609
|
-
}),
|
|
3675
|
+
}), is = { class: "login-container" }, us = { class: "account-container" }, cs = { class: "account-header" }, ds = { id: "account-title" }, fs = { id: "account-subtitle" }, vs = { class: "login-form-container" }, ps = { class: "login-form-email aform_form-element" }, ms = ["disabled"], hs = { class: "login-form-password aform_form-element" }, gs = ["disabled"], ws = ["disabled"], ys = {
|
|
3610
3676
|
key: 0,
|
|
3611
3677
|
class: "material-symbols-outlined loading-icon"
|
|
3612
|
-
},
|
|
3678
|
+
}, xs = /* @__PURE__ */ te({
|
|
3613
3679
|
__name: "Login",
|
|
3614
3680
|
props: {
|
|
3615
3681
|
headerTitle: { default: "Login" },
|
|
@@ -3617,7 +3683,7 @@ const ts = { class: "aform_form-element" }, ns = ["id", "disabled", "maxlength",
|
|
|
3617
3683
|
},
|
|
3618
3684
|
emits: ["loginFailed", "loginSuccess"],
|
|
3619
3685
|
setup(e, { emit: t }) {
|
|
3620
|
-
const n = t, o =
|
|
3686
|
+
const n = t, o = L(""), a = L(""), r = L(!1), s = L(!1);
|
|
3621
3687
|
function l(i) {
|
|
3622
3688
|
if (i.preventDefault(), r.value = !0, s.value) {
|
|
3623
3689
|
r.value = !1, n("loginFailed");
|
|
@@ -3625,22 +3691,22 @@ const ts = { class: "aform_form-element" }, ns = ["id", "disabled", "maxlength",
|
|
|
3625
3691
|
}
|
|
3626
3692
|
r.value = !1, n("loginSuccess");
|
|
3627
3693
|
}
|
|
3628
|
-
return (i, u) => (w(), k("div",
|
|
3694
|
+
return (i, u) => (w(), k("div", is, [
|
|
3629
3695
|
y("div", null, [
|
|
3630
|
-
y("div",
|
|
3631
|
-
y("div",
|
|
3632
|
-
y("h1",
|
|
3633
|
-
y("p",
|
|
3696
|
+
y("div", us, [
|
|
3697
|
+
y("div", cs, [
|
|
3698
|
+
y("h1", ds, K(e.headerTitle), 1),
|
|
3699
|
+
y("p", fs, K(e.headerSubtitle), 1)
|
|
3634
3700
|
]),
|
|
3635
3701
|
y("form", { onSubmit: l }, [
|
|
3636
|
-
y("div",
|
|
3637
|
-
y("div",
|
|
3702
|
+
y("div", vs, [
|
|
3703
|
+
y("div", ps, [
|
|
3638
3704
|
u[2] || (u[2] = y("label", {
|
|
3639
3705
|
id: "login-email",
|
|
3640
3706
|
for: "email",
|
|
3641
3707
|
class: "aform_field-label"
|
|
3642
3708
|
}, "Email", -1)),
|
|
3643
|
-
|
|
3709
|
+
J(y("input", {
|
|
3644
3710
|
id: "email",
|
|
3645
3711
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
|
|
3646
3712
|
class: "aform_input-field",
|
|
@@ -3651,25 +3717,25 @@ const ts = { class: "aform_form-element" }, ns = ["id", "disabled", "maxlength",
|
|
|
3651
3717
|
"auto-complete": "email",
|
|
3652
3718
|
"auto-correct": "off",
|
|
3653
3719
|
disabled: r.value
|
|
3654
|
-
}, null, 8,
|
|
3655
|
-
[
|
|
3720
|
+
}, null, 8, ms), [
|
|
3721
|
+
[we, o.value]
|
|
3656
3722
|
])
|
|
3657
3723
|
]),
|
|
3658
|
-
y("div",
|
|
3724
|
+
y("div", hs, [
|
|
3659
3725
|
u[3] || (u[3] = y("label", {
|
|
3660
3726
|
id: "login-password",
|
|
3661
3727
|
for: "password",
|
|
3662
3728
|
class: "aform_field-label"
|
|
3663
3729
|
}, "Password", -1)),
|
|
3664
|
-
|
|
3730
|
+
J(y("input", {
|
|
3665
3731
|
id: "password",
|
|
3666
3732
|
"onUpdate:modelValue": u[1] || (u[1] = (c) => a.value = c),
|
|
3667
3733
|
class: "aform_input-field",
|
|
3668
3734
|
name: "password",
|
|
3669
3735
|
type: "password",
|
|
3670
3736
|
disabled: r.value
|
|
3671
|
-
}, null, 8,
|
|
3672
|
-
[
|
|
3737
|
+
}, null, 8, gs), [
|
|
3738
|
+
[we, a.value]
|
|
3673
3739
|
])
|
|
3674
3740
|
]),
|
|
3675
3741
|
y("button", {
|
|
@@ -3677,9 +3743,9 @@ const ts = { class: "aform_form-element" }, ns = ["id", "disabled", "maxlength",
|
|
|
3677
3743
|
disabled: r.value || !o.value || !a.value,
|
|
3678
3744
|
onClick: l
|
|
3679
3745
|
}, [
|
|
3680
|
-
r.value ? (w(), k("span",
|
|
3746
|
+
r.value ? (w(), k("span", ys, "progress_activity")) : q("", !0),
|
|
3681
3747
|
u[4] || (u[4] = y("span", { id: "login-form-button" }, "Login", -1))
|
|
3682
|
-
], 8,
|
|
3748
|
+
], 8, ws)
|
|
3683
3749
|
])
|
|
3684
3750
|
], 32),
|
|
3685
3751
|
u[5] || (u[5] = y("button", { class: "btn" }, [
|
|
@@ -3689,22 +3755,22 @@ const ts = { class: "aform_form-element" }, ns = ["id", "disabled", "maxlength",
|
|
|
3689
3755
|
])
|
|
3690
3756
|
]));
|
|
3691
3757
|
}
|
|
3692
|
-
}),
|
|
3693
|
-
function
|
|
3694
|
-
e.use(
|
|
3758
|
+
}), ks = /* @__PURE__ */ $e(xs, [["__scopeId", "data-v-d9ffd0a7"]]);
|
|
3759
|
+
function Ms(e) {
|
|
3760
|
+
e.use(Dl), e.component("ACheckbox", Ol), e.component("ACombobox", _l), e.component("ADate", Ul), e.component("ADropdown", ra), e.component("ADatePicker", La), e.component("AFieldset", Za), e.component("AFileAttach", za), e.component("AForm", Mn), e.component("ANumericInput", Ja), e.component("ATextInput", rs);
|
|
3695
3761
|
}
|
|
3696
3762
|
export {
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3763
|
+
Ol as ACheckbox,
|
|
3764
|
+
_l as AComboBox,
|
|
3765
|
+
Ul as ADate,
|
|
3766
|
+
La as ADatePicker,
|
|
3767
|
+
ra as ADropdown,
|
|
3768
|
+
Za as AFieldset,
|
|
3703
3769
|
za as AFileAttach,
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3770
|
+
Mn as AForm,
|
|
3771
|
+
Ja as ANumericInput,
|
|
3772
|
+
rs as ATextInput,
|
|
3773
|
+
ks as Login,
|
|
3774
|
+
Ms as install
|
|
3709
3775
|
};
|
|
3710
3776
|
//# sourceMappingURL=aform.js.map
|