@stonecrop/aform 0.11.6 → 0.11.8
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 +749 -751
- package/dist/aform.js.map +1 -1
- package/dist/aform.tsbuildinfo +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/src/directives/mask.d.ts.map +1 -1
- package/dist/{directives → src/directives}/mask.js +3 -2
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +23 -22
- package/src/components/AForm.vue +1 -1
- package/src/directives/mask.ts +4 -3
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{types → src/types}/index.js +0 -0
package/dist/aform.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as oe, useTemplateRef as fe, ref as R, computed as
|
|
2
|
-
import { defineStore as
|
|
1
|
+
import { defineComponent as oe, useTemplateRef as fe, ref as R, computed as $, openBlock as h, createElementBlock as x, unref as V, normalizeClass as se, normalizeStyle as be, createBlock as ve, resolveDynamicComponent as Oe, mergeProps as dt, toDisplayString as N, createElementVNode as w, withModifiers as Ie, withDirectives as K, Fragment as X, renderList as pe, vShow as Ce, createCommentVNode as Y, renderSlot as he, createTextVNode as Dt, onMounted as Ee, watch as ne, onBeforeUnmount as an, nextTick as ft, toValue as E, shallowRef as ue, getCurrentScope as vt, onScopeDispose as pt, reactive as sn, vModelText as we, vModelCheckbox as rn, vModelSelect as In, getCurrentInstance as mt, watchEffect as ht, useCssVars as Mn, onUnmounted as Cn, useModel as Me, createVNode as At, withCtx as Tt, mergeModels as xe, isRef as En, toRefs as An, customRef as St, toRef as un, readonly as Rt, resolveComponent as Tn, withKeys as Ne } from "vue";
|
|
2
|
+
import { defineStore as $n } from "pinia";
|
|
3
3
|
import './assets/index.css';function cn(e, t) {
|
|
4
4
|
return vt() ? (pt(e, t), !0) : !1;
|
|
5
5
|
}
|
|
@@ -23,22 +23,22 @@ function We(e) {
|
|
|
23
23
|
return (t = o?.$el) !== null && t !== void 0 ? t : o;
|
|
24
24
|
}
|
|
25
25
|
function Qe(...e) {
|
|
26
|
-
const t = (n,
|
|
27
|
-
const n = st(E(e[0])).filter((
|
|
28
|
-
return n.every((
|
|
26
|
+
const t = (n, s, r, a) => (n.addEventListener(s, r, a), () => n.removeEventListener(s, r, a)), o = $(() => {
|
|
27
|
+
const n = st(E(e[0])).filter((s) => s != null);
|
|
28
|
+
return n.every((s) => typeof s != "string") ? n : void 0;
|
|
29
29
|
});
|
|
30
30
|
return Vn(() => {
|
|
31
|
-
var n,
|
|
31
|
+
var n, s;
|
|
32
32
|
return [
|
|
33
|
-
(n = (
|
|
33
|
+
(n = (s = o.value) === null || s === void 0 ? void 0 : s.map((r) => We(r))) !== null && n !== void 0 ? n : [ze].filter((r) => r != null),
|
|
34
34
|
st(E(o.value ? e[1] : e[0])),
|
|
35
35
|
st(V(o.value ? e[2] : e[1])),
|
|
36
36
|
E(o.value ? e[3] : e[2])
|
|
37
37
|
];
|
|
38
|
-
}, ([n,
|
|
39
|
-
if (!n?.length || !
|
|
40
|
-
const
|
|
41
|
-
|
|
38
|
+
}, ([n, s, r, a], l, i) => {
|
|
39
|
+
if (!n?.length || !s?.length || !r?.length) return;
|
|
40
|
+
const u = Ln(a) ? { ...a } : a, d = n.flatMap((p) => s.flatMap((y) => r.map((m) => t(p, y, m, u))));
|
|
41
|
+
i(() => {
|
|
42
42
|
d.forEach((p) => p());
|
|
43
43
|
});
|
|
44
44
|
}, { flush: "post" });
|
|
@@ -53,40 +53,40 @@ function Pn() {
|
|
|
53
53
|
// @__NO_SIDE_EFFECTS__
|
|
54
54
|
function _n(e) {
|
|
55
55
|
const t = /* @__PURE__ */ Pn();
|
|
56
|
-
return
|
|
56
|
+
return $(() => (t.value, !!e()));
|
|
57
57
|
}
|
|
58
58
|
function On(e, t, o = {}) {
|
|
59
|
-
const { window: n = ze, ...
|
|
59
|
+
const { window: n = ze, ...s } = o;
|
|
60
60
|
let r;
|
|
61
|
-
const
|
|
61
|
+
const a = /* @__PURE__ */ _n(() => n && "MutationObserver" in n), l = () => {
|
|
62
62
|
r && (r.disconnect(), r = void 0);
|
|
63
|
-
},
|
|
63
|
+
}, i = ne($(() => {
|
|
64
64
|
const p = st(E(e)).map(We).filter(Sn);
|
|
65
65
|
return new Set(p);
|
|
66
66
|
}), (p) => {
|
|
67
|
-
l(),
|
|
67
|
+
l(), a.value && p.size && (r = new MutationObserver(t), p.forEach((y) => r.observe(y, s)));
|
|
68
68
|
}, {
|
|
69
69
|
immediate: !0,
|
|
70
70
|
flush: "post"
|
|
71
|
-
}),
|
|
72
|
-
|
|
71
|
+
}), u = () => r?.takeRecords(), d = () => {
|
|
72
|
+
i(), l();
|
|
73
73
|
};
|
|
74
74
|
return cn(d), {
|
|
75
|
-
isSupported:
|
|
75
|
+
isSupported: a,
|
|
76
76
|
stop: d,
|
|
77
|
-
takeRecords:
|
|
77
|
+
takeRecords: u
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
function Bn(e, t, o = {}) {
|
|
81
|
-
const { window: n = ze, document:
|
|
82
|
-
if (!n || !
|
|
83
|
-
let
|
|
81
|
+
const { window: n = ze, document: s = n?.document, flush: r = "sync" } = o;
|
|
82
|
+
if (!n || !s) return Hn;
|
|
83
|
+
let a;
|
|
84
84
|
const l = (d) => {
|
|
85
|
-
|
|
86
|
-
},
|
|
85
|
+
a?.(), a = d;
|
|
86
|
+
}, i = ht(() => {
|
|
87
87
|
const d = We(e);
|
|
88
88
|
if (d) {
|
|
89
|
-
const { stop: p } = On(
|
|
89
|
+
const { stop: p } = On(s, (y) => {
|
|
90
90
|
y.map((m) => [...m.removedNodes]).flat().some((m) => m === d || m.contains(d)) && t(y);
|
|
91
91
|
}, {
|
|
92
92
|
window: n,
|
|
@@ -95,59 +95,59 @@ function Bn(e, t, o = {}) {
|
|
|
95
95
|
});
|
|
96
96
|
l(p);
|
|
97
97
|
}
|
|
98
|
-
}, { flush: r }),
|
|
99
|
-
|
|
98
|
+
}, { flush: r }), u = () => {
|
|
99
|
+
i(), l();
|
|
100
100
|
};
|
|
101
|
-
return cn(
|
|
101
|
+
return cn(u), u;
|
|
102
102
|
}
|
|
103
103
|
// @__NO_SIDE_EFFECTS__
|
|
104
104
|
function Fn(e = {}) {
|
|
105
105
|
var t;
|
|
106
|
-
const { window: o = ze, deep: n = !0, triggerOnRemoval:
|
|
107
|
-
let
|
|
106
|
+
const { window: o = ze, deep: n = !0, triggerOnRemoval: s = !1 } = e, r = (t = e.document) !== null && t !== void 0 ? t : o?.document, a = () => {
|
|
107
|
+
let u = r?.activeElement;
|
|
108
108
|
if (n)
|
|
109
|
-
for (var d;
|
|
110
|
-
return
|
|
111
|
-
}, l = ue(),
|
|
112
|
-
l.value =
|
|
109
|
+
for (var d; u?.shadowRoot; ) u = u == null || (d = u.shadowRoot) === null || d === void 0 ? void 0 : d.activeElement;
|
|
110
|
+
return u;
|
|
111
|
+
}, l = ue(), i = () => {
|
|
112
|
+
l.value = a();
|
|
113
113
|
};
|
|
114
114
|
if (o) {
|
|
115
|
-
const
|
|
115
|
+
const u = {
|
|
116
116
|
capture: !0,
|
|
117
117
|
passive: !0
|
|
118
118
|
};
|
|
119
119
|
Qe(o, "blur", (d) => {
|
|
120
|
-
d.relatedTarget === null &&
|
|
121
|
-
},
|
|
120
|
+
d.relatedTarget === null && i();
|
|
121
|
+
}, u), Qe(o, "focus", i, u);
|
|
122
122
|
}
|
|
123
|
-
return
|
|
123
|
+
return s && Bn(l, i, { document: r }), i(), l;
|
|
124
124
|
}
|
|
125
125
|
const Zn = "focusin", Nn = "focusout", Un = ":focus-within";
|
|
126
126
|
function Wn(e, t = {}) {
|
|
127
|
-
const { window: o = ze } = t, n =
|
|
127
|
+
const { window: o = ze } = t, n = $(() => We(e)), s = ue(!1), r = $(() => s.value);
|
|
128
128
|
if (!o || !(/* @__PURE__ */ Fn(t)).value) return { focused: r };
|
|
129
|
-
const
|
|
130
|
-
return Qe(n, Zn, () =>
|
|
131
|
-
var l,
|
|
132
|
-
return
|
|
133
|
-
},
|
|
129
|
+
const a = { passive: !0 };
|
|
130
|
+
return Qe(n, Zn, () => s.value = !0, a), Qe(n, Nn, () => {
|
|
131
|
+
var l, i, u;
|
|
132
|
+
return s.value = (l = (i = n.value) === null || i === void 0 || (u = i.matches) === null || u === void 0 ? void 0 : u.call(i, Un)) !== null && l !== void 0 ? l : !1;
|
|
133
|
+
}, a), { focused: r };
|
|
134
134
|
}
|
|
135
135
|
function Gn(e, { window: t = ze, scrollTarget: o } = {}) {
|
|
136
|
-
const n = R(!1),
|
|
136
|
+
const n = R(!1), s = () => {
|
|
137
137
|
if (!t) return;
|
|
138
|
-
const r = t.document,
|
|
139
|
-
if (!
|
|
138
|
+
const r = t.document, a = We(e);
|
|
139
|
+
if (!a)
|
|
140
140
|
n.value = !1;
|
|
141
141
|
else {
|
|
142
|
-
const l =
|
|
142
|
+
const l = a.getBoundingClientRect();
|
|
143
143
|
n.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
146
|
return ne(
|
|
147
147
|
() => We(e),
|
|
148
|
-
() =>
|
|
148
|
+
() => s(),
|
|
149
149
|
{ immediate: !0, flush: "post" }
|
|
150
|
-
), t && Qe(o || t, "scroll",
|
|
150
|
+
), t && Qe(o || t, "scroll", s, {
|
|
151
151
|
capture: !1,
|
|
152
152
|
passive: !0
|
|
153
153
|
}), n;
|
|
@@ -155,7 +155,7 @@ function Gn(e, { window: t = ze, scrollTarget: o } = {}) {
|
|
|
155
155
|
const Ae = (e) => {
|
|
156
156
|
let t = Gn(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
160
|
return Lt(t);
|
|
161
161
|
}, Lt = (e) => {
|
|
@@ -170,24 +170,24 @@ const Ae = (e) => {
|
|
|
170
170
|
const o = e.previousElementSibling;
|
|
171
171
|
o && (t = o);
|
|
172
172
|
}
|
|
173
|
-
return t && (
|
|
173
|
+
return t && (!Te(t) || !Ae(t)) ? Lt(t) : t;
|
|
174
174
|
}, zn = (e) => {
|
|
175
175
|
const t = e.target;
|
|
176
176
|
let o;
|
|
177
177
|
if (t instanceof HTMLTableCellElement) {
|
|
178
178
|
const n = t.parentElement?.parentElement;
|
|
179
179
|
if (n) {
|
|
180
|
-
const
|
|
181
|
-
|
|
180
|
+
const s = n.firstElementChild?.children[t.cellIndex];
|
|
181
|
+
s && (o = s);
|
|
182
182
|
}
|
|
183
183
|
} else if (t instanceof HTMLTableRowElement) {
|
|
184
184
|
const n = t.parentElement;
|
|
185
185
|
if (n) {
|
|
186
|
-
const
|
|
187
|
-
|
|
186
|
+
const s = n.firstElementChild;
|
|
187
|
+
s && (o = s);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
return o && (
|
|
190
|
+
return o && (!Te(o) || !Ae(o)) ? Ht(o) : o;
|
|
191
191
|
}, Gt = (e) => {
|
|
192
192
|
const t = e.target;
|
|
193
193
|
return Ht(t);
|
|
@@ -203,42 +203,42 @@ const Ae = (e) => {
|
|
|
203
203
|
const o = e.nextElementSibling;
|
|
204
204
|
o && (t = o);
|
|
205
205
|
}
|
|
206
|
-
return t && (
|
|
206
|
+
return t && (!Te(t) || !Ae(t)) ? Ht(t) : t;
|
|
207
207
|
}, qn = (e) => {
|
|
208
208
|
const t = e.target;
|
|
209
209
|
let o;
|
|
210
210
|
if (t instanceof HTMLTableCellElement) {
|
|
211
211
|
const n = t.parentElement?.parentElement;
|
|
212
212
|
if (n) {
|
|
213
|
-
const
|
|
214
|
-
|
|
213
|
+
const s = n.lastElementChild?.children[t.cellIndex];
|
|
214
|
+
s && (o = s);
|
|
215
215
|
}
|
|
216
216
|
} else if (t instanceof HTMLTableRowElement) {
|
|
217
217
|
const n = t.parentElement;
|
|
218
218
|
if (n) {
|
|
219
|
-
const
|
|
220
|
-
|
|
219
|
+
const s = n.lastElementChild;
|
|
220
|
+
s && (o = s);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
return o && (
|
|
223
|
+
return o && (!Te(o) || !Ae(o)) ? Lt(o) : o;
|
|
224
224
|
}, zt = (e) => {
|
|
225
225
|
const t = e.target;
|
|
226
226
|
return Vt(t);
|
|
227
227
|
}, Vt = (e) => {
|
|
228
228
|
let t;
|
|
229
|
-
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (
|
|
229
|
+
return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!Te(t) || !Ae(t)) ? Vt(t) : t;
|
|
230
230
|
}, qt = (e) => {
|
|
231
231
|
const t = e.target;
|
|
232
232
|
return Pt(t);
|
|
233
233
|
}, Pt = (e) => {
|
|
234
234
|
let t;
|
|
235
|
-
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (
|
|
235
|
+
return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!Te(t) || !Ae(t)) ? Pt(t) : t;
|
|
236
236
|
}, Yt = (e) => {
|
|
237
237
|
const t = e.target.parentElement?.firstElementChild;
|
|
238
|
-
return t && (
|
|
238
|
+
return t && (!Te(t) || !Ae(t)) ? Pt(t) : t;
|
|
239
239
|
}, Xt = (e) => {
|
|
240
240
|
const t = e.target.parentElement?.lastElementChild;
|
|
241
|
-
return t && (
|
|
241
|
+
return t && (!Te(t) || !Ae(t)) ? Vt(t) : t;
|
|
242
242
|
}, nt = ["alt", "control", "shift", "meta"], Yn = {
|
|
243
243
|
ArrowUp: "up",
|
|
244
244
|
ArrowDown: "down",
|
|
@@ -309,38 +309,38 @@ const Ae = (e) => {
|
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
311
|
function _t(e) {
|
|
312
|
-
const t = (
|
|
312
|
+
const t = (a) => {
|
|
313
313
|
let l = null;
|
|
314
|
-
return
|
|
315
|
-
}, o = (
|
|
316
|
-
const l = t(
|
|
317
|
-
let
|
|
318
|
-
if (typeof
|
|
319
|
-
|
|
320
|
-
else if (Array.isArray(
|
|
321
|
-
for (const
|
|
322
|
-
|
|
323
|
-
else if (
|
|
324
|
-
|
|
325
|
-
else if (
|
|
326
|
-
if (Array.isArray(
|
|
327
|
-
for (const
|
|
328
|
-
|
|
314
|
+
return a.parent && (typeof a.parent == "string" ? l = document.querySelector(a.parent) : a.parent instanceof HTMLElement ? l = a.parent : l = a.parent.value), l;
|
|
315
|
+
}, o = (a) => {
|
|
316
|
+
const l = t(a);
|
|
317
|
+
let i = [];
|
|
318
|
+
if (typeof a.selectors == "string")
|
|
319
|
+
i = Array.from(l ? l.querySelectorAll(a.selectors) : document.querySelectorAll(a.selectors));
|
|
320
|
+
else if (Array.isArray(a.selectors))
|
|
321
|
+
for (const u of a.selectors)
|
|
322
|
+
u instanceof HTMLElement ? i.push(u) : i.push(u.$el);
|
|
323
|
+
else if (a.selectors instanceof HTMLElement)
|
|
324
|
+
i.push(a.selectors);
|
|
325
|
+
else if (a.selectors?.value)
|
|
326
|
+
if (Array.isArray(a.selectors.value))
|
|
327
|
+
for (const u of a.selectors.value)
|
|
328
|
+
u instanceof HTMLElement ? i.push(u) : i.push(u.$el);
|
|
329
329
|
else
|
|
330
|
-
|
|
331
|
-
return
|
|
332
|
-
}, n = (
|
|
333
|
-
const l = t(
|
|
334
|
-
let
|
|
335
|
-
return
|
|
336
|
-
},
|
|
337
|
-
const
|
|
338
|
-
if (nt.includes(
|
|
339
|
-
const
|
|
340
|
-
for (const d of Object.keys(
|
|
330
|
+
i.push(a.selectors.value);
|
|
331
|
+
return i;
|
|
332
|
+
}, n = (a) => {
|
|
333
|
+
const l = t(a);
|
|
334
|
+
let i = [];
|
|
335
|
+
return a.selectors ? i = o(a) : l && (i = Array.from(l.children).filter((u) => Te(u) && Ae(u))), i;
|
|
336
|
+
}, s = (a) => (l) => {
|
|
337
|
+
const i = Yn[l.key] || l.key.toLowerCase();
|
|
338
|
+
if (nt.includes(i)) return;
|
|
339
|
+
const u = a.handlers || gt;
|
|
340
|
+
for (const d of Object.keys(u)) {
|
|
341
341
|
const [p, ...y] = d.split(".");
|
|
342
|
-
if (p === "keydown" && y.includes(
|
|
343
|
-
const m =
|
|
342
|
+
if (p === "keydown" && y.includes(i)) {
|
|
343
|
+
const m = u[d], I = y.filter((f) => nt.includes(f)), b = nt.some((f) => {
|
|
344
344
|
const g = f.charAt(0).toUpperCase() + f.slice(1);
|
|
345
345
|
return l.getModifierState(g);
|
|
346
346
|
});
|
|
@@ -358,18 +358,18 @@ function _t(e) {
|
|
|
358
358
|
}
|
|
359
359
|
}, r = [];
|
|
360
360
|
Ee(() => {
|
|
361
|
-
for (const
|
|
362
|
-
const l = t(
|
|
361
|
+
for (const a of e) {
|
|
362
|
+
const l = t(a), i = n(a), u = s(a), d = l ? [l] : i;
|
|
363
363
|
for (const p of d) {
|
|
364
364
|
const { focused: y } = Wn(R(p)), m = ne(y, (I) => {
|
|
365
|
-
I ? p.addEventListener("keydown",
|
|
365
|
+
I ? p.addEventListener("keydown", u) : p.removeEventListener("keydown", u);
|
|
366
366
|
});
|
|
367
367
|
r.push(m);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
}), an(() => {
|
|
371
|
-
for (const
|
|
372
|
-
|
|
371
|
+
for (const a of r)
|
|
372
|
+
a();
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
function Ot(e, t) {
|
|
@@ -389,30 +389,30 @@ function Qn(...e) {
|
|
|
389
389
|
}
|
|
390
390
|
function Kn(e, t) {
|
|
391
391
|
function o(...n) {
|
|
392
|
-
return new Promise((
|
|
392
|
+
return new Promise((s, r) => {
|
|
393
393
|
Promise.resolve(e(() => t.apply(this, n), {
|
|
394
394
|
fn: t,
|
|
395
395
|
thisArg: this,
|
|
396
396
|
args: n
|
|
397
|
-
})).then(
|
|
397
|
+
})).then(s).catch(r);
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
400
|
return o;
|
|
401
401
|
}
|
|
402
402
|
function eo(e, t = {}) {
|
|
403
|
-
let o, n,
|
|
403
|
+
let o, n, s = _e;
|
|
404
404
|
const r = (l) => {
|
|
405
|
-
clearTimeout(l),
|
|
405
|
+
clearTimeout(l), s(), s = _e;
|
|
406
406
|
};
|
|
407
|
-
let
|
|
407
|
+
let a;
|
|
408
408
|
return (l) => {
|
|
409
|
-
const
|
|
410
|
-
return o && r(o),
|
|
411
|
-
|
|
412
|
-
o && r(o), n = void 0, d(
|
|
413
|
-
},
|
|
409
|
+
const i = E(e), u = E(t.maxWait);
|
|
410
|
+
return o && r(o), i <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = void 0), Promise.resolve(l())) : new Promise((d, p) => {
|
|
411
|
+
s = t.rejectOnCancel ? p : d, a = l, u && !n && (n = setTimeout(() => {
|
|
412
|
+
o && r(o), n = void 0, d(a());
|
|
413
|
+
}, u)), o = setTimeout(() => {
|
|
414
414
|
n && r(n), n = void 0, d(l());
|
|
415
|
-
},
|
|
415
|
+
}, i);
|
|
416
416
|
});
|
|
417
417
|
};
|
|
418
418
|
}
|
|
@@ -433,19 +433,19 @@ function oo(e, t = {}) {
|
|
|
433
433
|
get() {
|
|
434
434
|
return e.value[n];
|
|
435
435
|
},
|
|
436
|
-
set(
|
|
436
|
+
set(s) {
|
|
437
437
|
var r;
|
|
438
438
|
if (!((r = E(t.replaceRef)) !== null && r !== void 0) || r) if (Array.isArray(e.value)) {
|
|
439
|
-
const
|
|
440
|
-
|
|
439
|
+
const a = [...e.value];
|
|
440
|
+
a[n] = s, e.value = a;
|
|
441
441
|
} else {
|
|
442
|
-
const
|
|
442
|
+
const a = {
|
|
443
443
|
...e.value,
|
|
444
|
-
[n]:
|
|
444
|
+
[n]: s
|
|
445
445
|
};
|
|
446
|
-
Object.setPrototypeOf(
|
|
446
|
+
Object.setPrototypeOf(a, Object.getPrototypeOf(e.value)), e.value = a;
|
|
447
447
|
}
|
|
448
|
-
else e.value[n] =
|
|
448
|
+
else e.value[n] = s;
|
|
449
449
|
}
|
|
450
450
|
}));
|
|
451
451
|
return o;
|
|
@@ -466,35 +466,35 @@ function ye(e) {
|
|
|
466
466
|
return (t = o?.$el) !== null && t !== void 0 ? t : o;
|
|
467
467
|
}
|
|
468
468
|
function He(...e) {
|
|
469
|
-
const t = (n,
|
|
470
|
-
const n = rt(E(e[0])).filter((
|
|
471
|
-
return n.every((
|
|
469
|
+
const t = (n, s, r, a) => (n.addEventListener(s, r, a), () => n.removeEventListener(s, r, a)), o = $(() => {
|
|
470
|
+
const n = rt(E(e[0])).filter((s) => s != null);
|
|
471
|
+
return n.every((s) => typeof s != "string") ? n : void 0;
|
|
472
472
|
});
|
|
473
473
|
return ao(() => {
|
|
474
|
-
var n,
|
|
474
|
+
var n, s;
|
|
475
475
|
return [
|
|
476
|
-
(n = (
|
|
476
|
+
(n = (s = o.value) === null || s === void 0 ? void 0 : s.map((r) => ye(r))) !== null && n !== void 0 ? n : [et].filter((r) => r != null),
|
|
477
477
|
rt(E(o.value ? e[1] : e[0])),
|
|
478
478
|
rt(V(o.value ? e[2] : e[1])),
|
|
479
479
|
E(o.value ? e[3] : e[2])
|
|
480
480
|
];
|
|
481
|
-
}, ([n,
|
|
482
|
-
if (!n?.length || !
|
|
483
|
-
const
|
|
484
|
-
|
|
481
|
+
}, ([n, s, r, a], l, i) => {
|
|
482
|
+
if (!n?.length || !s?.length || !r?.length) return;
|
|
483
|
+
const u = Jn(a) ? { ...a } : a, d = n.flatMap((p) => s.flatMap((y) => r.map((m) => t(p, y, m, u))));
|
|
484
|
+
i(() => {
|
|
485
485
|
d.forEach((p) => p());
|
|
486
486
|
});
|
|
487
487
|
}, { flush: "post" });
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
const { window: n = et, ignore:
|
|
489
|
+
function $t(e, t, o = {}) {
|
|
490
|
+
const { window: n = et, ignore: s = [], capture: r = !0, detectIframe: a = !1, controls: l = !1 } = o;
|
|
491
491
|
if (!n) return l ? {
|
|
492
492
|
stop: _e,
|
|
493
493
|
cancel: _e,
|
|
494
494
|
trigger: _e
|
|
495
495
|
} : _e;
|
|
496
|
-
let
|
|
497
|
-
const
|
|
496
|
+
let i = !0;
|
|
497
|
+
const u = (f) => E(s).some((g) => {
|
|
498
498
|
if (typeof g == "string") return Array.from(n.document.querySelectorAll(g)).some((k) => k === f.target || f.composedPath().includes(k));
|
|
499
499
|
{
|
|
500
500
|
const k = ye(g);
|
|
@@ -507,13 +507,13 @@ function Tt(e, t, o = {}) {
|
|
|
507
507
|
}
|
|
508
508
|
function p(f, g) {
|
|
509
509
|
const k = E(f), C = k.$.subTree && k.$.subTree.children;
|
|
510
|
-
return C == null || !Array.isArray(C) ? !1 : C.some((
|
|
510
|
+
return C == null || !Array.isArray(C) ? !1 : C.some((A) => A.el === g.target || g.composedPath().includes(A.el));
|
|
511
511
|
}
|
|
512
512
|
const y = (f) => {
|
|
513
513
|
const g = ye(e);
|
|
514
514
|
if (f.target != null && !(!(g instanceof Element) && d(e) && p(e, f)) && !(!g || g === f.target || f.composedPath().includes(g))) {
|
|
515
|
-
if ("detail" in f && f.detail === 0 && (
|
|
516
|
-
|
|
515
|
+
if ("detail" in f && f.detail === 0 && (i = !u(f)), !i) {
|
|
516
|
+
i = !0;
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
519
|
t(f);
|
|
@@ -531,9 +531,9 @@ function Tt(e, t, o = {}) {
|
|
|
531
531
|
}),
|
|
532
532
|
He(n, "pointerdown", (f) => {
|
|
533
533
|
const g = ye(e);
|
|
534
|
-
|
|
534
|
+
i = !u(f) && !!(g && !f.composedPath().includes(g));
|
|
535
535
|
}, { passive: !0 }),
|
|
536
|
-
|
|
536
|
+
a && He(n, "blur", (f) => {
|
|
537
537
|
setTimeout(() => {
|
|
538
538
|
var g;
|
|
539
539
|
const k = ye(e);
|
|
@@ -544,10 +544,10 @@ function Tt(e, t, o = {}) {
|
|
|
544
544
|
return l ? {
|
|
545
545
|
stop: b,
|
|
546
546
|
cancel: () => {
|
|
547
|
-
|
|
547
|
+
i = !1;
|
|
548
548
|
},
|
|
549
549
|
trigger: (f) => {
|
|
550
|
-
|
|
550
|
+
i = !0, y(f), i = !1;
|
|
551
551
|
}
|
|
552
552
|
} : b;
|
|
553
553
|
}
|
|
@@ -561,28 +561,28 @@ function so() {
|
|
|
561
561
|
// @__NO_SIDE_EFFECTS__
|
|
562
562
|
function fn(e) {
|
|
563
563
|
const t = /* @__PURE__ */ so();
|
|
564
|
-
return
|
|
564
|
+
return $(() => (t.value, !!e()));
|
|
565
565
|
}
|
|
566
566
|
function vn(e, t, o = {}) {
|
|
567
|
-
const { window: n = et, ...
|
|
567
|
+
const { window: n = et, ...s } = o;
|
|
568
568
|
let r;
|
|
569
|
-
const
|
|
569
|
+
const a = /* @__PURE__ */ fn(() => n && "MutationObserver" in n), l = () => {
|
|
570
570
|
r && (r.disconnect(), r = void 0);
|
|
571
|
-
},
|
|
571
|
+
}, i = ne($(() => {
|
|
572
572
|
const p = rt(E(e)).map(ye).filter(Xn);
|
|
573
573
|
return new Set(p);
|
|
574
574
|
}), (p) => {
|
|
575
|
-
l(),
|
|
575
|
+
l(), a.value && p.size && (r = new MutationObserver(t), p.forEach((y) => r.observe(y, s)));
|
|
576
576
|
}, {
|
|
577
577
|
immediate: !0,
|
|
578
578
|
flush: "post"
|
|
579
|
-
}),
|
|
580
|
-
|
|
579
|
+
}), u = () => r?.takeRecords(), d = () => {
|
|
580
|
+
i(), l();
|
|
581
581
|
};
|
|
582
582
|
return Ot(d), {
|
|
583
|
-
isSupported:
|
|
583
|
+
isSupported: a,
|
|
584
584
|
stop: d,
|
|
585
|
-
takeRecords:
|
|
585
|
+
takeRecords: u
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
588
|
const ot = {
|
|
@@ -594,15 +594,15 @@ function ro(e) {
|
|
|
594
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
595
|
}
|
|
596
596
|
function wt(e, t = {}) {
|
|
597
|
-
var o, n,
|
|
598
|
-
const { pointerTypes:
|
|
597
|
+
var o, n, s, r;
|
|
598
|
+
const { pointerTypes: a, preventDefault: l, stopPropagation: i, exact: u, onMove: d, onEnd: p, onStart: y, initialValue: m, axis: I = "both", draggingElement: b = et, containerElement: f, handle: g = e, buttons: k = [0], restrictInView: C, autoScroll: A = !1 } = t, L = R((o = E(m)) !== null && o !== void 0 ? o : {
|
|
599
599
|
x: 0,
|
|
600
600
|
y: 0
|
|
601
|
-
}), S = R(), O = (D) =>
|
|
602
|
-
E(l) && D.preventDefault(), E(
|
|
603
|
-
}, me = E(
|
|
601
|
+
}), S = R(), O = (D) => a ? a.includes(D.pointerType) : !0, W = (D) => {
|
|
602
|
+
E(l) && D.preventDefault(), E(i) && D.stopPropagation();
|
|
603
|
+
}, me = E(A), j = typeof me == "object" ? {
|
|
604
604
|
speed: (n = E(me.speed)) !== null && n !== void 0 ? n : ot.speed,
|
|
605
|
-
margin: (
|
|
605
|
+
margin: (s = E(me.margin)) !== null && s !== void 0 ? s : ot.margin,
|
|
606
606
|
direction: (r = me.direction) !== null && r !== void 0 ? r : ot.direction
|
|
607
607
|
} : ot, J = (D) => typeof D == "number" ? [D, D] : [D.x, D.y], ge = (D, F, G) => {
|
|
608
608
|
const { clientWidth: Q, clientHeight: q, scrollLeft: re, scrollTop: ke, scrollWidth: Le, scrollHeight: _ } = D, [B, z] = J(j.margin), [ee, le] = J(j.speed);
|
|
@@ -638,13 +638,13 @@ function wt(e, t = {}) {
|
|
|
638
638
|
y: Q - D.scrollTop
|
|
639
639
|
}, D, j.margin, F) ? Be() : Re();
|
|
640
640
|
};
|
|
641
|
-
E(
|
|
641
|
+
E(A) && ne(L, Xe);
|
|
642
642
|
const Fe = (D) => {
|
|
643
643
|
var F;
|
|
644
|
-
if (!E(k).includes(D.button) || E(t.disabled) || !O(D) || E(
|
|
644
|
+
if (!E(k).includes(D.button) || E(t.disabled) || !O(D) || E(u) && D.target !== E(e)) return;
|
|
645
645
|
const G = E(f), Q = G == null || (F = G.getBoundingClientRect) === null || F === void 0 ? void 0 : F.call(G), q = E(e).getBoundingClientRect(), re = {
|
|
646
|
-
x: D.clientX - (G ? q.left - Q.left + (
|
|
647
|
-
y: D.clientY - (G ? q.top - Q.top + (
|
|
646
|
+
x: D.clientX - (G ? q.left - Q.left + (A ? 0 : G.scrollLeft) : q.left),
|
|
647
|
+
y: D.clientY - (G ? q.top - Q.top + (A ? 0 : G.scrollTop) : q.top)
|
|
648
648
|
};
|
|
649
649
|
y?.(re, D) !== !1 && (S.value = re, W(D));
|
|
650
650
|
}, je = (D) => {
|
|
@@ -653,10 +653,10 @@ function wt(e, t = {}) {
|
|
|
653
653
|
F instanceof HTMLElement && ro(F);
|
|
654
654
|
const G = E(e).getBoundingClientRect();
|
|
655
655
|
let { x: Q, y: q } = L.value;
|
|
656
|
-
if ((I === "x" || I === "both") && (Q = D.clientX - S.value.x, F && (Q = Math.min(Math.max(0, Q), F.scrollWidth - G.width))), (I === "y" || I === "both") && (q = D.clientY - S.value.y, F && (q = Math.min(Math.max(0, q), F.scrollHeight - G.height))), E(
|
|
656
|
+
if ((I === "x" || I === "both") && (Q = D.clientX - S.value.x, F && (Q = Math.min(Math.max(0, Q), F.scrollWidth - G.width))), (I === "y" || I === "both") && (q = D.clientY - S.value.y, F && (q = Math.min(Math.max(0, q), F.scrollHeight - G.height))), E(A) && F && (de === null && ge(F, G, {
|
|
657
657
|
x: Q,
|
|
658
658
|
y: q
|
|
659
|
-
}), Q += F.scrollLeft, q += F.scrollTop), F && (C ||
|
|
659
|
+
}), Q += F.scrollLeft, q += F.scrollTop), F && (C || A)) {
|
|
660
660
|
if (I !== "y") {
|
|
661
661
|
const re = Q - F.scrollLeft;
|
|
662
662
|
re < 0 ? Q = F.scrollLeft : re > F.clientWidth - G.width && (Q = F.clientWidth - G.width + F.scrollLeft);
|
|
@@ -671,7 +671,7 @@ function wt(e, t = {}) {
|
|
|
671
671
|
y: q
|
|
672
672
|
}, d?.(L.value, D), W(D);
|
|
673
673
|
}, Ze = (D) => {
|
|
674
|
-
E(t.disabled) || !O(D) || S.value && (S.value = void 0,
|
|
674
|
+
E(t.disabled) || !O(D) || S.value && (S.value = void 0, A && Re(), p?.(L.value, D), W(D));
|
|
675
675
|
};
|
|
676
676
|
if (dn) {
|
|
677
677
|
const D = () => {
|
|
@@ -686,61 +686,61 @@ function wt(e, t = {}) {
|
|
|
686
686
|
return {
|
|
687
687
|
...oo(L),
|
|
688
688
|
position: L,
|
|
689
|
-
isDragging:
|
|
690
|
-
style:
|
|
689
|
+
isDragging: $(() => !!S.value),
|
|
690
|
+
style: $(() => `
|
|
691
691
|
left: ${L.value.x}px;
|
|
692
692
|
top: ${L.value.y}px;
|
|
693
|
-
${
|
|
693
|
+
${A ? "text-wrap: nowrap;" : ""}
|
|
694
694
|
`)
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
697
|
function ct(e, t, o = {}) {
|
|
698
|
-
const { window: n = et, ...
|
|
698
|
+
const { window: n = et, ...s } = o;
|
|
699
699
|
let r;
|
|
700
|
-
const
|
|
700
|
+
const a = /* @__PURE__ */ fn(() => n && "ResizeObserver" in n), l = () => {
|
|
701
701
|
r && (r.disconnect(), r = void 0);
|
|
702
|
-
},
|
|
702
|
+
}, i = ne($(() => {
|
|
703
703
|
const d = E(e);
|
|
704
704
|
return Array.isArray(d) ? d.map((p) => ye(p)) : [ye(d)];
|
|
705
705
|
}), (d) => {
|
|
706
|
-
if (l(),
|
|
706
|
+
if (l(), a.value && n) {
|
|
707
707
|
r = new ResizeObserver(t);
|
|
708
|
-
for (const p of d) p && r.observe(p,
|
|
708
|
+
for (const p of d) p && r.observe(p, s);
|
|
709
709
|
}
|
|
710
710
|
}, {
|
|
711
711
|
immediate: !0,
|
|
712
712
|
flush: "post"
|
|
713
|
-
}),
|
|
714
|
-
l(),
|
|
713
|
+
}), u = () => {
|
|
714
|
+
l(), i();
|
|
715
715
|
};
|
|
716
|
-
return Ot(
|
|
717
|
-
isSupported:
|
|
718
|
-
stop:
|
|
716
|
+
return Ot(u), {
|
|
717
|
+
isSupported: a,
|
|
718
|
+
stop: u
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
721
|
function Pe(e, t = {}) {
|
|
722
|
-
const { reset: o = !0, windowResize: n = !0, windowScroll:
|
|
722
|
+
const { reset: o = !0, windowResize: n = !0, windowScroll: s = !0, immediate: r = !0, updateTiming: a = "sync" } = t, l = ue(0), i = ue(0), u = ue(0), d = ue(0), p = ue(0), y = ue(0), m = ue(0), I = ue(0);
|
|
723
723
|
function b() {
|
|
724
724
|
const g = ye(e);
|
|
725
725
|
if (!g) {
|
|
726
|
-
o && (l.value = 0,
|
|
726
|
+
o && (l.value = 0, i.value = 0, u.value = 0, d.value = 0, p.value = 0, y.value = 0, m.value = 0, I.value = 0);
|
|
727
727
|
return;
|
|
728
728
|
}
|
|
729
729
|
const k = g.getBoundingClientRect();
|
|
730
|
-
l.value = k.height,
|
|
730
|
+
l.value = k.height, i.value = k.bottom, u.value = k.left, d.value = k.right, p.value = k.top, y.value = k.width, m.value = k.x, I.value = k.y;
|
|
731
731
|
}
|
|
732
732
|
function f() {
|
|
733
|
-
|
|
733
|
+
a === "sync" ? b() : a === "next-frame" && requestAnimationFrame(() => b());
|
|
734
734
|
}
|
|
735
|
-
return ct(e, f), ne(() => ye(e), (g) => !g && f()), vn(e, f, { attributeFilter: ["style", "class"] }),
|
|
735
|
+
return ct(e, f), ne(() => ye(e), (g) => !g && f()), vn(e, f, { attributeFilter: ["style", "class"] }), s && He("scroll", f, {
|
|
736
736
|
capture: !0,
|
|
737
737
|
passive: !0
|
|
738
738
|
}), n && He("resize", f, { passive: !0 }), lo(() => {
|
|
739
739
|
r && f();
|
|
740
740
|
}), {
|
|
741
741
|
height: l,
|
|
742
|
-
bottom:
|
|
743
|
-
left:
|
|
742
|
+
bottom: i,
|
|
743
|
+
left: u,
|
|
744
744
|
right: d,
|
|
745
745
|
top: p,
|
|
746
746
|
width: y,
|
|
@@ -756,27 +756,27 @@ const bt = /* @__PURE__ */ new WeakMap();
|
|
|
756
756
|
function io(e, t = !1) {
|
|
757
757
|
const o = ue(t);
|
|
758
758
|
let n = "";
|
|
759
|
-
ne(Qn(e), (
|
|
760
|
-
const l = yt(E(
|
|
759
|
+
ne(Qn(e), (a) => {
|
|
760
|
+
const l = yt(E(a));
|
|
761
761
|
if (l) {
|
|
762
|
-
const
|
|
763
|
-
if (bt.get(
|
|
764
|
-
if (o.value) return
|
|
762
|
+
const i = l;
|
|
763
|
+
if (bt.get(i) || bt.set(i, i.style.overflow), i.style.overflow !== "hidden" && (n = i.style.overflow), i.style.overflow === "hidden") return o.value = !0;
|
|
764
|
+
if (o.value) return i.style.overflow = "hidden";
|
|
765
765
|
}
|
|
766
766
|
}, { immediate: !0 });
|
|
767
|
-
const
|
|
768
|
-
const
|
|
769
|
-
!
|
|
767
|
+
const s = () => {
|
|
768
|
+
const a = yt(E(e));
|
|
769
|
+
!a || o.value || (a.style.overflow = "hidden", o.value = !0);
|
|
770
770
|
}, r = () => {
|
|
771
|
-
const
|
|
772
|
-
!
|
|
771
|
+
const a = yt(E(e));
|
|
772
|
+
!a || !o.value || (a.style.overflow = n, bt.delete(a), o.value = !1);
|
|
773
773
|
};
|
|
774
|
-
return Ot(r),
|
|
774
|
+
return Ot(r), $({
|
|
775
775
|
get() {
|
|
776
776
|
return o.value;
|
|
777
777
|
},
|
|
778
|
-
set(
|
|
779
|
-
|
|
778
|
+
set(a) {
|
|
779
|
+
a ? s() : r();
|
|
780
780
|
}
|
|
781
781
|
});
|
|
782
782
|
}
|
|
@@ -795,20 +795,20 @@ const uo = (e) => {
|
|
|
795
795
|
debounce: { default: 300 }
|
|
796
796
|
},
|
|
797
797
|
setup(e, { expose: t }) {
|
|
798
|
-
const o = fe("cell"), n = e.store.getCellData(e.colIndex, e.rowIndex),
|
|
799
|
-
textAlign:
|
|
800
|
-
width:
|
|
798
|
+
const o = fe("cell"), n = e.store.getCellData(e.colIndex, e.rowIndex), s = R(""), r = R(!1), a = e.store.columns[e.colIndex], l = e.store.rows[e.rowIndex], i = a.align || "center", u = a.width || "40ch", d = $(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), p = $(() => typeof d.value == "string" ? uo(d.value) : !1), y = $(() => ({
|
|
799
|
+
textAlign: i,
|
|
800
|
+
width: u,
|
|
801
801
|
fontWeight: r.value ? "bold" : "inherit",
|
|
802
802
|
paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
|
|
803
|
-
})), m =
|
|
803
|
+
})), m = $(() => ({
|
|
804
804
|
"sticky-column": e.pinned,
|
|
805
805
|
"cell-modified": r.value
|
|
806
806
|
})), I = () => {
|
|
807
807
|
f(), b();
|
|
808
808
|
}, b = () => {
|
|
809
809
|
const { left: S, bottom: O, width: W, height: me } = Pe(o);
|
|
810
|
-
|
|
811
|
-
j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left = S, j.modal.bottom = O, j.modal.width = W, j.modal.height = me, j.modal.cell = o.value, typeof
|
|
810
|
+
a.mask, a.modalComponent && e.store.$patch((j) => {
|
|
811
|
+
j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left = S, j.modal.bottom = O, j.modal.width = W, j.modal.height = me, j.modal.cell = o.value, typeof a.modalComponent == "function" ? j.modal.component = a.modalComponent({ table: j.table, row: l, column: a }) : j.modal.component = a.modalComponent, j.modal.componentProps = a.modalComponentExtraProps;
|
|
812
812
|
});
|
|
813
813
|
};
|
|
814
814
|
if (e.addNavigation) {
|
|
@@ -831,7 +831,7 @@ const uo = (e) => {
|
|
|
831
831
|
]);
|
|
832
832
|
}
|
|
833
833
|
const f = () => {
|
|
834
|
-
if (o.value &&
|
|
834
|
+
if (o.value && a.edit) {
|
|
835
835
|
const S = window.getSelection();
|
|
836
836
|
if (S)
|
|
837
837
|
try {
|
|
@@ -841,7 +841,7 @@ const uo = (e) => {
|
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
843
|
}, g = () => {
|
|
844
|
-
o.value && (
|
|
844
|
+
o.value && (s.value = o.value.textContent, f());
|
|
845
845
|
}, k = () => {
|
|
846
846
|
try {
|
|
847
847
|
const S = window.getSelection();
|
|
@@ -873,38 +873,38 @@ const uo = (e) => {
|
|
|
873
873
|
J && O.removeAllRanges && O.addRange && (O.removeAllRanges(), O.addRange(J));
|
|
874
874
|
} catch {
|
|
875
875
|
}
|
|
876
|
-
},
|
|
877
|
-
if (!
|
|
876
|
+
}, A = (S) => {
|
|
877
|
+
if (!a.edit) return;
|
|
878
878
|
const O = S.target;
|
|
879
|
-
if (O.textContent ===
|
|
879
|
+
if (O.textContent === s.value)
|
|
880
880
|
return;
|
|
881
881
|
const W = k();
|
|
882
|
-
|
|
882
|
+
s.value = O.textContent, a.format ? (r.value = O.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, n), e.store.setCellText(e.colIndex, e.rowIndex, O.textContent)) : (r.value = O.textContent !== n, e.store.setCellData(e.colIndex, e.rowIndex, O.textContent)), ft().then(() => {
|
|
883
883
|
C(W);
|
|
884
884
|
});
|
|
885
|
-
}, L = /* @__PURE__ */ no(
|
|
885
|
+
}, L = /* @__PURE__ */ no(A, e.debounce);
|
|
886
886
|
return t({
|
|
887
|
-
currentData:
|
|
887
|
+
currentData: s
|
|
888
888
|
}), (S, O) => (h(), x("td", {
|
|
889
889
|
ref: "cell",
|
|
890
890
|
"data-colindex": e.colIndex,
|
|
891
891
|
"data-rowindex": e.rowIndex,
|
|
892
|
-
"data-editable": V(
|
|
893
|
-
contenteditable: V(
|
|
892
|
+
"data-editable": V(a).edit,
|
|
893
|
+
contenteditable: V(a).edit,
|
|
894
894
|
tabindex: e.tabIndex,
|
|
895
895
|
spellcheck: !1,
|
|
896
896
|
style: be(y.value),
|
|
897
897
|
class: se(["atable-cell", m.value]),
|
|
898
898
|
onFocus: g,
|
|
899
|
-
onPaste:
|
|
899
|
+
onPaste: A,
|
|
900
900
|
onInput: O[0] || (O[0] = //@ts-ignore
|
|
901
901
|
(...W) => V(L) && V(L)(...W)),
|
|
902
902
|
onClick: I
|
|
903
903
|
}, [
|
|
904
|
-
V(
|
|
904
|
+
V(a).cellComponent ? (h(), ve(Oe(V(a).cellComponent), dt({
|
|
905
905
|
key: 0,
|
|
906
906
|
value: d.value
|
|
907
|
-
}, V(
|
|
907
|
+
}, V(a).cellComponentProps), null, 16, ["value"])) : p.value ? (h(), x("span", {
|
|
908
908
|
key: 1,
|
|
909
909
|
innerHTML: d.value
|
|
910
910
|
}, null, 8, vo)) : (h(), x("span", po, N(d.value), 1))
|
|
@@ -919,11 +919,11 @@ const uo = (e) => {
|
|
|
919
919
|
addNavigation: { type: [Boolean, Object], default: () => gt }
|
|
920
920
|
},
|
|
921
921
|
setup(e) {
|
|
922
|
-
const t = fe("rowEl"), o =
|
|
922
|
+
const t = fe("rowEl"), o = $(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
923
923
|
if (e.addNavigation) {
|
|
924
924
|
const n = {
|
|
925
|
-
"keydown.control.g": (
|
|
926
|
-
|
|
925
|
+
"keydown.control.g": (s) => {
|
|
926
|
+
s.stopPropagation(), s.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
|
|
927
927
|
}
|
|
928
928
|
};
|
|
929
929
|
typeof e.addNavigation == "object" && Object.assign(n, e.addNavigation), _t([
|
|
@@ -933,7 +933,7 @@ const uo = (e) => {
|
|
|
933
933
|
}
|
|
934
934
|
]);
|
|
935
935
|
}
|
|
936
|
-
return (n,
|
|
936
|
+
return (n, s) => (h(), x(X, null, [
|
|
937
937
|
w("tr", dt(n.$attrs, {
|
|
938
938
|
ref: "rowEl",
|
|
939
939
|
tabindex: e.tabIndex,
|
|
@@ -942,7 +942,7 @@ const uo = (e) => {
|
|
|
942
942
|
w("td", {
|
|
943
943
|
tabIndex: -1,
|
|
944
944
|
class: "row-index",
|
|
945
|
-
onClick:
|
|
945
|
+
onClick: s[0] || (s[0] = (r) => e.store.toggleRowExpand(e.rowIndex))
|
|
946
946
|
}, N(o.value), 1),
|
|
947
947
|
he(n.$slots, "row", {}, void 0, !0)
|
|
948
948
|
], 16, ho),
|
|
@@ -964,8 +964,8 @@ const uo = (e) => {
|
|
|
964
964
|
}
|
|
965
965
|
}), Ve = (e, t) => {
|
|
966
966
|
const o = e.__vccOpts || e;
|
|
967
|
-
for (const [n,
|
|
968
|
-
o[n] =
|
|
967
|
+
for (const [n, s] of t)
|
|
968
|
+
o[n] = s;
|
|
969
969
|
return o;
|
|
970
970
|
}, bo = /* @__PURE__ */ Ve(yo, [["__scopeId", "data-v-a42297c7"]]), xo = ["colspan"], ko = {
|
|
971
971
|
ref: "container",
|
|
@@ -989,17 +989,17 @@ const uo = (e) => {
|
|
|
989
989
|
emits: ["connection:create"],
|
|
990
990
|
setup(e, { expose: t, emit: o }) {
|
|
991
991
|
Mn((_) => ({
|
|
992
|
-
v737862e7:
|
|
992
|
+
v737862e7: s.value,
|
|
993
993
|
v05f25613: _.colspan
|
|
994
994
|
}));
|
|
995
|
-
const n = o,
|
|
995
|
+
const n = o, s = R(e.color.length >= 6 ? e.color : "#cccccc"), r = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, a = fe("container"), l = fe("bar"), i = fe("leftResizeHandle"), u = fe("rightResizeHandle"), d = fe("leftConnectionHandle"), p = fe("rightConnectionHandle"), { width: y } = Pe(a), { left: m, right: I } = Pe(l), b = R(e.start), f = R(e.end || b.value + e.colspan), g = R(!1), k = R(!1), C = R(!1), A = R(!1), L = R(!1), S = R({ startX: 0, startY: 0, endX: 0, endY: 0 }), O = $(() => Be.value || ge.value || de.value), W = $(() => e.colspan > 0 ? y.value / e.colspan : 0), me = $(() => {
|
|
996
996
|
const _ = b.value / e.colspan * 100, B = f.value / e.colspan * 100;
|
|
997
997
|
return {
|
|
998
998
|
left: `${_}%`,
|
|
999
999
|
width: `${B - _}%`,
|
|
1000
|
-
backgroundColor:
|
|
1000
|
+
backgroundColor: s.value
|
|
1001
1001
|
};
|
|
1002
|
-
}), j =
|
|
1002
|
+
}), j = $(
|
|
1003
1003
|
() => ({
|
|
1004
1004
|
position: "fixed",
|
|
1005
1005
|
top: 0,
|
|
@@ -1009,12 +1009,12 @@ const uo = (e) => {
|
|
|
1009
1009
|
pointerEvents: "none",
|
|
1010
1010
|
zIndex: 1e3
|
|
1011
1011
|
})
|
|
1012
|
-
), J = R({ startX: 0, startPos: 0 }), { isDragging: ge } = wt(
|
|
1012
|
+
), J = R({ startX: 0, startPos: 0 }), { isDragging: ge } = wt(i, {
|
|
1013
1013
|
axis: "x",
|
|
1014
1014
|
onStart: () => Re(m.value, b.value),
|
|
1015
1015
|
onMove: ({ x: _ }) => Ye(_),
|
|
1016
1016
|
onEnd: ({ x: _ }) => Xe(_)
|
|
1017
|
-
}), { isDragging: de } = wt(
|
|
1017
|
+
}), { isDragging: de } = wt(u, {
|
|
1018
1018
|
axis: "x",
|
|
1019
1019
|
onStart: () => Re(I.value, f.value),
|
|
1020
1020
|
onMove: ({ x: _ }) => Fe(_),
|
|
@@ -1105,7 +1105,7 @@ const uo = (e) => {
|
|
|
1105
1105
|
colIndex: e.colIndex,
|
|
1106
1106
|
startIndex: b,
|
|
1107
1107
|
endIndex: f,
|
|
1108
|
-
color:
|
|
1108
|
+
color: s,
|
|
1109
1109
|
label: e.label,
|
|
1110
1110
|
position: { x: _, y: B }
|
|
1111
1111
|
}), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
|
|
@@ -1133,10 +1133,10 @@ const uo = (e) => {
|
|
|
1133
1133
|
e.store.isDependencyGraphEnabled && (g.value = !0, k.value = !0);
|
|
1134
1134
|
}
|
|
1135
1135
|
function q() {
|
|
1136
|
-
!C.value &&
|
|
1136
|
+
!C.value && !A.value && (g.value = !1, k.value = !1);
|
|
1137
1137
|
}
|
|
1138
1138
|
function re(_, B) {
|
|
1139
|
-
B.preventDefault(), B.stopPropagation(), L.value = !0, _ === "left" ? C.value = !0 :
|
|
1139
|
+
B.preventDefault(), B.stopPropagation(), L.value = !0, _ === "left" ? C.value = !0 : A.value = !0;
|
|
1140
1140
|
const z = _ === "left" ? d.value : p.value;
|
|
1141
1141
|
if (z) {
|
|
1142
1142
|
const te = z.getBoundingClientRect(), ie = te.left + te.width / 2, ce = te.top + te.height / 2;
|
|
@@ -1163,7 +1163,7 @@ const uo = (e) => {
|
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
1165
|
function Le(_, B) {
|
|
1166
|
-
L.value = !1, C.value = !1,
|
|
1166
|
+
L.value = !1, C.value = !1, A.value = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", B), l.value?.matches(":hover") || q();
|
|
1167
1167
|
}
|
|
1168
1168
|
return t({
|
|
1169
1169
|
barStyle: me,
|
|
@@ -1172,7 +1172,7 @@ const uo = (e) => {
|
|
|
1172
1172
|
handleConnectionDrop: ke,
|
|
1173
1173
|
isLeftConnectionDragging: C,
|
|
1174
1174
|
isLeftConnectionVisible: g,
|
|
1175
|
-
isRightConnectionDragging:
|
|
1175
|
+
isRightConnectionDragging: A,
|
|
1176
1176
|
isRightConnectionVisible: k,
|
|
1177
1177
|
showDragPreview: L
|
|
1178
1178
|
}), (_, B) => (h(), x("td", {
|
|
@@ -1200,7 +1200,7 @@ const uo = (e) => {
|
|
|
1200
1200
|
e.store.isDependencyGraphEnabled ? (h(), x("div", {
|
|
1201
1201
|
key: 1,
|
|
1202
1202
|
ref: "rightConnectionHandle",
|
|
1203
|
-
class: se(["connection-handle right-connection-handle", { visible: k.value, "is-dragging":
|
|
1203
|
+
class: se(["connection-handle right-connection-handle", { visible: k.value, "is-dragging": A.value }]),
|
|
1204
1204
|
onMousedown: B[1] || (B[1] = Ie((z) => re("right", z), ["stop"]))
|
|
1205
1205
|
}, [...B[3] || (B[3] = [
|
|
1206
1206
|
w("div", { class: "connection-dot" }, null, -1)
|
|
@@ -1238,12 +1238,12 @@ const uo = (e) => {
|
|
|
1238
1238
|
], 4)) : Y("", !0)
|
|
1239
1239
|
], 8, xo));
|
|
1240
1240
|
}
|
|
1241
|
-
}), Ao = /* @__PURE__ */ Ve(Eo, [["__scopeId", "data-v-c2df3f52"]]),
|
|
1241
|
+
}), Ao = /* @__PURE__ */ Ve(Eo, [["__scopeId", "data-v-c2df3f52"]]), To = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1242
1242
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
1243
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;"/>
|
|
1244
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;"/>
|
|
1245
1245
|
</svg>
|
|
1246
|
-
`,
|
|
1246
|
+
`, $o = `<?xml version="1.0" encoding="UTF-8"?>
|
|
1247
1247
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
1248
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;"/>
|
|
1249
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;"/>
|
|
@@ -1283,8 +1283,8 @@ const uo = (e) => {
|
|
|
1283
1283
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.64">
|
|
1284
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;"/>
|
|
1285
1285
|
</svg>`, Ho = {
|
|
1286
|
-
add:
|
|
1287
|
-
delete:
|
|
1286
|
+
add: To,
|
|
1287
|
+
delete: $o,
|
|
1288
1288
|
duplicate: Do,
|
|
1289
1289
|
insertAbove: So,
|
|
1290
1290
|
insertBelow: Ro,
|
|
@@ -1305,54 +1305,54 @@ const uo = (e) => {
|
|
|
1305
1305
|
},
|
|
1306
1306
|
emits: ["action"],
|
|
1307
1307
|
setup(e, { emit: t }) {
|
|
1308
|
-
const o = e, n = t,
|
|
1308
|
+
const o = e, n = t, s = fe("actionsCell"), r = fe("toggleButton"), a = R(0), l = R(!1), i = R(!1), u = R({ top: 0, left: 0 }), d = {
|
|
1309
1309
|
add: "Add Row",
|
|
1310
1310
|
delete: "Delete Row",
|
|
1311
1311
|
duplicate: "Duplicate Row",
|
|
1312
1312
|
insertAbove: "Insert Above",
|
|
1313
1313
|
insertBelow: "Insert Below",
|
|
1314
1314
|
move: "Move Row"
|
|
1315
|
-
}, p =
|
|
1315
|
+
}, p = $(() => {
|
|
1316
1316
|
const g = [], k = o.config.actions || {}, C = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
|
|
1317
|
-
for (const
|
|
1318
|
-
const L = k[
|
|
1317
|
+
for (const A of C) {
|
|
1318
|
+
const L = k[A];
|
|
1319
1319
|
if (L === !1 || L === void 0) continue;
|
|
1320
|
-
let S = !0, O = d[
|
|
1321
|
-
typeof L == "object" && (S = L.enabled !== !1, O = L.label || O, W = L.icon || W), S && g.push({ type:
|
|
1320
|
+
let S = !0, O = d[A], W = Ho[A];
|
|
1321
|
+
typeof L == "object" && (S = L.enabled !== !1, O = L.label || O, W = L.icon || W), S && g.push({ type: A, label: O, icon: W });
|
|
1322
1322
|
}
|
|
1323
1323
|
return g;
|
|
1324
|
-
}), y =
|
|
1324
|
+
}), y = $(() => {
|
|
1325
1325
|
if (o.config.forceDropdown) return !0;
|
|
1326
1326
|
const g = o.config.dropdownThreshold ?? 150;
|
|
1327
|
-
return g === 0 ? !1 :
|
|
1328
|
-
}), m =
|
|
1327
|
+
return g === 0 ? !1 : a.value > 0 && a.value < g;
|
|
1328
|
+
}), m = $(() => l.value ? i.value ? {
|
|
1329
1329
|
position: "fixed",
|
|
1330
|
-
bottom: `${window.innerHeight -
|
|
1331
|
-
left: `${
|
|
1330
|
+
bottom: `${window.innerHeight - u.value.top}px`,
|
|
1331
|
+
left: `${u.value.left}px`,
|
|
1332
1332
|
top: "auto"
|
|
1333
1333
|
} : {
|
|
1334
1334
|
position: "fixed",
|
|
1335
|
-
top: `${
|
|
1336
|
-
left: `${
|
|
1335
|
+
top: `${u.value.top}px`,
|
|
1336
|
+
left: `${u.value.left}px`
|
|
1337
1337
|
} : {});
|
|
1338
|
-
ct(
|
|
1338
|
+
ct(s, (g) => {
|
|
1339
1339
|
const k = g[0];
|
|
1340
|
-
k && (
|
|
1340
|
+
k && (a.value = k.contentRect.width);
|
|
1341
1341
|
});
|
|
1342
1342
|
const I = () => {
|
|
1343
1343
|
l.value || b(), l.value = !l.value;
|
|
1344
1344
|
}, b = () => {
|
|
1345
1345
|
if (!r.value) return;
|
|
1346
|
-
const g = r.value.getBoundingClientRect(), k = window.innerHeight, C = p.value.length * 40 + 16,
|
|
1347
|
-
|
|
1346
|
+
const g = r.value.getBoundingClientRect(), k = window.innerHeight, C = p.value.length * 40 + 16, A = k - g.bottom, L = g.top;
|
|
1347
|
+
i.value = A < C && L > C, i.value ? u.value = {
|
|
1348
1348
|
top: g.top,
|
|
1349
1349
|
left: g.left
|
|
1350
|
-
} :
|
|
1350
|
+
} : u.value = {
|
|
1351
1351
|
top: g.bottom,
|
|
1352
1352
|
left: g.left
|
|
1353
1353
|
};
|
|
1354
1354
|
};
|
|
1355
|
-
|
|
1355
|
+
$t(s, () => {
|
|
1356
1356
|
l.value = !1;
|
|
1357
1357
|
});
|
|
1358
1358
|
const f = (g) => {
|
|
@@ -1376,7 +1376,7 @@ const uo = (e) => {
|
|
|
1376
1376
|
w("span", { class: "dropdown-icon" }, "⋮", -1)
|
|
1377
1377
|
])], 8, Po),
|
|
1378
1378
|
K(w("div", {
|
|
1379
|
-
class: se(["row-actions-menu", { "menu-flipped":
|
|
1379
|
+
class: se(["row-actions-menu", { "menu-flipped": i.value }]),
|
|
1380
1380
|
style: be(m.value),
|
|
1381
1381
|
role: "menu"
|
|
1382
1382
|
}, [
|
|
@@ -1385,7 +1385,7 @@ const uo = (e) => {
|
|
|
1385
1385
|
type: "button",
|
|
1386
1386
|
class: "row-action-menu-item",
|
|
1387
1387
|
role: "menuitem",
|
|
1388
|
-
onClick: Ie((
|
|
1388
|
+
onClick: Ie((A) => f(C.type), ["stop"])
|
|
1389
1389
|
}, [
|
|
1390
1390
|
w("span", {
|
|
1391
1391
|
class: "action-icon",
|
|
@@ -1403,7 +1403,7 @@ const uo = (e) => {
|
|
|
1403
1403
|
class: "row-action-btn",
|
|
1404
1404
|
title: C.label,
|
|
1405
1405
|
"aria-label": C.label,
|
|
1406
|
-
onClick: Ie((
|
|
1406
|
+
onClick: Ie((A) => f(C.type), ["stop"])
|
|
1407
1407
|
}, [
|
|
1408
1408
|
w("span", {
|
|
1409
1409
|
class: "action-icon",
|
|
@@ -1423,7 +1423,7 @@ const uo = (e) => {
|
|
|
1423
1423
|
},
|
|
1424
1424
|
emits: ["row:action"],
|
|
1425
1425
|
setup(e, { emit: t }) {
|
|
1426
|
-
const o = t, n = fe("rowEl"),
|
|
1426
|
+
const o = t, n = fe("rowEl"), s = $(() => e.store.isRowVisible(e.rowIndex)), r = $(() => e.store.getRowExpandSymbol(e.rowIndex)), a = $(() => e.store.config.rowActions || { enabled: !1 }), l = $(() => a.value.enabled), i = $(() => a.value.position || "before-index"), u = (d, p) => {
|
|
1427
1427
|
o("row:action", d, p);
|
|
1428
1428
|
};
|
|
1429
1429
|
if (e.addNavigation) {
|
|
@@ -1443,13 +1443,13 @@ const uo = (e) => {
|
|
|
1443
1443
|
tabindex: e.tabIndex,
|
|
1444
1444
|
class: "atable-row"
|
|
1445
1445
|
}, [
|
|
1446
|
-
l.value &&
|
|
1446
|
+
l.value && i.value === "before-index" ? (h(), ve(it, {
|
|
1447
1447
|
key: 0,
|
|
1448
1448
|
"row-index": e.rowIndex,
|
|
1449
1449
|
store: e.store,
|
|
1450
|
-
config:
|
|
1451
|
-
position:
|
|
1452
|
-
onAction:
|
|
1450
|
+
config: a.value,
|
|
1451
|
+
position: i.value,
|
|
1452
|
+
onAction: u
|
|
1453
1453
|
}, null, 8, ["row-index", "store", "config", "position"])) : Y("", !0),
|
|
1454
1454
|
e.store.config.view !== "uncounted" ? he(d.$slots, "index", { key: 1 }, () => [
|
|
1455
1455
|
e.store.config.view === "list" ? (h(), x("td", {
|
|
@@ -1463,35 +1463,35 @@ const uo = (e) => {
|
|
|
1463
1463
|
onClick: p[0] || (p[0] = (y) => e.store.toggleRowExpand(e.rowIndex))
|
|
1464
1464
|
}, N(r.value), 3)) : Y("", !0)
|
|
1465
1465
|
], !0) : Y("", !0),
|
|
1466
|
-
l.value &&
|
|
1466
|
+
l.value && i.value === "after-index" ? (h(), ve(it, {
|
|
1467
1467
|
key: 2,
|
|
1468
1468
|
"row-index": e.rowIndex,
|
|
1469
1469
|
store: e.store,
|
|
1470
|
-
config:
|
|
1471
|
-
position:
|
|
1472
|
-
onAction:
|
|
1470
|
+
config: a.value,
|
|
1471
|
+
position: i.value,
|
|
1472
|
+
onAction: u
|
|
1473
1473
|
}, null, 8, ["row-index", "store", "config", "position"])) : Y("", !0),
|
|
1474
1474
|
he(d.$slots, "default", {}, void 0, !0),
|
|
1475
|
-
l.value &&
|
|
1475
|
+
l.value && i.value === "end" ? (h(), ve(it, {
|
|
1476
1476
|
key: 3,
|
|
1477
1477
|
"row-index": e.rowIndex,
|
|
1478
1478
|
store: e.store,
|
|
1479
|
-
config:
|
|
1480
|
-
position:
|
|
1481
|
-
onAction:
|
|
1479
|
+
config: a.value,
|
|
1480
|
+
position: i.value,
|
|
1481
|
+
onAction: u
|
|
1482
1482
|
}, null, 8, ["row-index", "store", "config", "position"])) : Y("", !0)
|
|
1483
1483
|
], 8, Uo)), [
|
|
1484
|
-
[Ce,
|
|
1484
|
+
[Ce, s.value]
|
|
1485
1485
|
]);
|
|
1486
1486
|
}
|
|
1487
|
-
}), pn = /* @__PURE__ */ Ve(Wo, [["__scopeId", "data-v-
|
|
1487
|
+
}), pn = /* @__PURE__ */ Ve(Wo, [["__scopeId", "data-v-e7ca13d1"]]), xt = /* @__PURE__ */ new WeakMap(), Go = {
|
|
1488
1488
|
mounted(e, t) {
|
|
1489
1489
|
const o = !t.modifiers.bubble;
|
|
1490
1490
|
let n;
|
|
1491
|
-
if (typeof t.value == "function") n =
|
|
1491
|
+
if (typeof t.value == "function") n = $t(e, t.value, { capture: o });
|
|
1492
1492
|
else {
|
|
1493
|
-
const [
|
|
1494
|
-
n =
|
|
1493
|
+
const [s, r] = t.value;
|
|
1494
|
+
n = $t(e, s, Object.assign({ capture: o }, r));
|
|
1495
1495
|
}
|
|
1496
1496
|
xt.set(e, n);
|
|
1497
1497
|
},
|
|
@@ -1508,8 +1508,8 @@ function qo() {
|
|
|
1508
1508
|
return (o, n) => {
|
|
1509
1509
|
if (t.value = n.value, e) return;
|
|
1510
1510
|
e = !0;
|
|
1511
|
-
const
|
|
1512
|
-
ne(t, (r) =>
|
|
1511
|
+
const s = io(o, n.value);
|
|
1512
|
+
ne(t, (r) => s.value = r);
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
1515
|
qo();
|
|
@@ -1531,22 +1531,22 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1531
1531
|
},
|
|
1532
1532
|
emits: ["connection:delete"],
|
|
1533
1533
|
setup(e, { emit: t }) {
|
|
1534
|
-
const o = t, n =
|
|
1535
|
-
const l = e.store.ganttBars.find((
|
|
1536
|
-
return l &&
|
|
1537
|
-
})),
|
|
1534
|
+
const o = t, n = $(() => e.store.connectionPaths.filter((a) => {
|
|
1535
|
+
const l = e.store.ganttBars.find((u) => u.id === a.from.barId), i = e.store.ganttBars.find((u) => u.id === a.to.barId);
|
|
1536
|
+
return l && i;
|
|
1537
|
+
})), s = (a) => {
|
|
1538
1538
|
const l = e.store.connectionHandles.find(
|
|
1539
|
-
(O) => O.barId ===
|
|
1540
|
-
),
|
|
1541
|
-
(O) => O.barId ===
|
|
1539
|
+
(O) => O.barId === a.from.barId && O.side === a.from.side
|
|
1540
|
+
), i = e.store.connectionHandles.find(
|
|
1541
|
+
(O) => O.barId === a.to.barId && O.side === a.to.side
|
|
1542
1542
|
);
|
|
1543
|
-
if (!l || !
|
|
1544
|
-
const
|
|
1545
|
-
return `M ${
|
|
1546
|
-
}, r = (
|
|
1547
|
-
e.store.deleteConnection(
|
|
1543
|
+
if (!l || !i) return "";
|
|
1544
|
+
const u = l.position.x + lt / 2, d = l.position.y + lt / 2, p = i.position.x + lt / 2, y = i.position.y + lt / 2, m = Math.abs(p - u), I = Math.max(m * Qo, 50), b = u + (a.from.side === "left" ? -I : I), f = p + (a.to.side === "left" ? -I : I), g = { x: 0.5 * u + 0.5 * b, y: 0.5 * d + 0.5 * d }, k = { x: 0.5 * b + 0.5 * f, y: 0.5 * d + 0.5 * y }, C = { x: 0.5 * f + 0.5 * p, y: 0.5 * y + 0.5 * y }, A = { x: 0.5 * g.x + 0.5 * k.x, y: 0.5 * g.y + 0.5 * k.y }, L = { x: 0.5 * k.x + 0.5 * C.x, y: 0.5 * k.y + 0.5 * C.y }, S = { x: 0.5 * A.x + 0.5 * L.x, y: 0.5 * A.y + 0.5 * L.y };
|
|
1545
|
+
return `M ${u} ${d} Q ${b} ${d}, ${S.x} ${S.y} Q ${f} ${y}, ${p} ${y}`;
|
|
1546
|
+
}, r = (a) => {
|
|
1547
|
+
e.store.deleteConnection(a.id) && o("connection:delete", a);
|
|
1548
1548
|
};
|
|
1549
|
-
return (
|
|
1549
|
+
return (a, l) => (h(), x("div", Yo, [
|
|
1550
1550
|
(h(), x("svg", Xo, [
|
|
1551
1551
|
l[0] || (l[0] = w("defs", null, [
|
|
1552
1552
|
w("path", {
|
|
@@ -1571,25 +1571,25 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1571
1571
|
})
|
|
1572
1572
|
])
|
|
1573
1573
|
], -1)),
|
|
1574
|
-
(h(!0), x(X, null, pe(n.value, (
|
|
1575
|
-
key: `${
|
|
1576
|
-
d:
|
|
1574
|
+
(h(!0), x(X, null, pe(n.value, (i) => (h(), x("path", {
|
|
1575
|
+
key: `${i.id}-hitbox`,
|
|
1576
|
+
d: s(i),
|
|
1577
1577
|
stroke: "transparent",
|
|
1578
|
-
"stroke-width": (
|
|
1578
|
+
"stroke-width": (i.style?.width || 2) + 10,
|
|
1579
1579
|
fill: "none",
|
|
1580
1580
|
class: "connection-hitbox",
|
|
1581
|
-
onDblclick: (
|
|
1581
|
+
onDblclick: (u) => r(i)
|
|
1582
1582
|
}, null, 40, jo))), 128)),
|
|
1583
|
-
(h(!0), x(X, null, pe(n.value, (
|
|
1584
|
-
id:
|
|
1585
|
-
key:
|
|
1586
|
-
d:
|
|
1587
|
-
stroke:
|
|
1588
|
-
"stroke-width":
|
|
1583
|
+
(h(!0), x(X, null, pe(n.value, (i) => (h(), x("path", {
|
|
1584
|
+
id: i.id,
|
|
1585
|
+
key: i.id,
|
|
1586
|
+
d: s(i),
|
|
1587
|
+
stroke: i.style?.color || "#666",
|
|
1588
|
+
"stroke-width": i.style?.width || 2,
|
|
1589
1589
|
fill: "none",
|
|
1590
1590
|
"marker-mid": "url(#arrowhead-marker)",
|
|
1591
1591
|
class: "connection-path animated-path",
|
|
1592
|
-
onDblclick: (
|
|
1592
|
+
onDblclick: (u) => r(i)
|
|
1593
1593
|
}, null, 40, Jo))), 128))
|
|
1594
1594
|
]))
|
|
1595
1595
|
]));
|
|
@@ -1611,20 +1611,20 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1611
1611
|
const t = R(""), o = sn({
|
|
1612
1612
|
startValue: "",
|
|
1613
1613
|
endValue: ""
|
|
1614
|
-
}), n = (
|
|
1615
|
-
if (
|
|
1616
|
-
const
|
|
1614
|
+
}), n = (i) => {
|
|
1615
|
+
if (i.filterOptions) return i.filterOptions;
|
|
1616
|
+
const u = /* @__PURE__ */ new Set();
|
|
1617
1617
|
return e.store.rows.forEach((d) => {
|
|
1618
|
-
const p = d[
|
|
1619
|
-
p != null && p !== "" &&
|
|
1620
|
-
}), Array.from(
|
|
1618
|
+
const p = d[i.name];
|
|
1619
|
+
p != null && p !== "" && u.add(p);
|
|
1620
|
+
}), Array.from(u).map((d) => ({
|
|
1621
1621
|
value: d,
|
|
1622
1622
|
label: String(d)
|
|
1623
1623
|
}));
|
|
1624
|
-
},
|
|
1625
|
-
!
|
|
1626
|
-
},
|
|
1627
|
-
|
|
1624
|
+
}, s = $(() => !!(t.value || o.startValue || o.endValue)), r = (i) => {
|
|
1625
|
+
!i && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = i, e.store.setFilter(e.colIndex, { value: i }));
|
|
1626
|
+
}, a = (i, u) => {
|
|
1627
|
+
i === "start" ? o.startValue = u : o.endValue = u, !o.startValue && !o.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
|
|
1628
1628
|
value: null,
|
|
1629
1629
|
startValue: o.startValue,
|
|
1630
1630
|
endValue: o.endValue
|
|
@@ -1632,40 +1632,40 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1632
1632
|
}, l = () => {
|
|
1633
1633
|
t.value = "", o.startValue = "", o.endValue = "", e.store.clearFilter(e.colIndex);
|
|
1634
1634
|
};
|
|
1635
|
-
return (
|
|
1635
|
+
return (i, u) => (h(), x("div", tl, [
|
|
1636
1636
|
(e.column.filterType || "text") === "text" ? K((h(), x("input", {
|
|
1637
1637
|
key: 0,
|
|
1638
|
-
"onUpdate:modelValue":
|
|
1638
|
+
"onUpdate:modelValue": u[0] || (u[0] = (d) => t.value = d),
|
|
1639
1639
|
type: "text",
|
|
1640
1640
|
class: "filter-input",
|
|
1641
|
-
onInput:
|
|
1641
|
+
onInput: u[1] || (u[1] = (d) => r(t.value))
|
|
1642
1642
|
}, null, 544)), [
|
|
1643
1643
|
[we, t.value]
|
|
1644
1644
|
]) : e.column.filterType === "number" ? K((h(), x("input", {
|
|
1645
1645
|
key: 1,
|
|
1646
|
-
"onUpdate:modelValue":
|
|
1646
|
+
"onUpdate:modelValue": u[2] || (u[2] = (d) => t.value = d),
|
|
1647
1647
|
type: "number",
|
|
1648
1648
|
class: "filter-input",
|
|
1649
|
-
onInput:
|
|
1649
|
+
onInput: u[3] || (u[3] = (d) => r(t.value))
|
|
1650
1650
|
}, null, 544)), [
|
|
1651
1651
|
[we, t.value]
|
|
1652
1652
|
]) : e.column.filterType === "checkbox" ? (h(), x("label", nl, [
|
|
1653
1653
|
K(w("input", {
|
|
1654
|
-
"onUpdate:modelValue":
|
|
1654
|
+
"onUpdate:modelValue": u[4] || (u[4] = (d) => t.value = d),
|
|
1655
1655
|
type: "checkbox",
|
|
1656
1656
|
class: "filter-checkbox",
|
|
1657
|
-
onChange:
|
|
1657
|
+
onChange: u[5] || (u[5] = (d) => r(t.value))
|
|
1658
1658
|
}, null, 544), [
|
|
1659
1659
|
[rn, t.value]
|
|
1660
1660
|
]),
|
|
1661
1661
|
w("span", null, N(e.column.label), 1)
|
|
1662
1662
|
])) : e.column.filterType === "select" ? K((h(), x("select", {
|
|
1663
1663
|
key: 3,
|
|
1664
|
-
"onUpdate:modelValue":
|
|
1664
|
+
"onUpdate:modelValue": u[6] || (u[6] = (d) => t.value = d),
|
|
1665
1665
|
class: "filter-select",
|
|
1666
|
-
onChange:
|
|
1666
|
+
onChange: u[7] || (u[7] = (d) => r(t.value))
|
|
1667
1667
|
}, [
|
|
1668
|
-
|
|
1668
|
+
u[15] || (u[15] = w("option", { value: "" }, "All", -1)),
|
|
1669
1669
|
(h(!0), x(X, null, pe(n(e.column), (d) => (h(), x("option", {
|
|
1670
1670
|
key: d.value || d,
|
|
1671
1671
|
value: d.value || d
|
|
@@ -1674,27 +1674,27 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1674
1674
|
[In, t.value]
|
|
1675
1675
|
]) : e.column.filterType === "date" ? K((h(), x("input", {
|
|
1676
1676
|
key: 4,
|
|
1677
|
-
"onUpdate:modelValue":
|
|
1677
|
+
"onUpdate:modelValue": u[8] || (u[8] = (d) => t.value = d),
|
|
1678
1678
|
type: "date",
|
|
1679
1679
|
class: "filter-input",
|
|
1680
|
-
onChange:
|
|
1680
|
+
onChange: u[9] || (u[9] = (d) => r(t.value))
|
|
1681
1681
|
}, null, 544)), [
|
|
1682
1682
|
[we, t.value]
|
|
1683
1683
|
]) : e.column.filterType === "dateRange" ? (h(), x("div", ll, [
|
|
1684
1684
|
K(w("input", {
|
|
1685
|
-
"onUpdate:modelValue":
|
|
1685
|
+
"onUpdate:modelValue": u[10] || (u[10] = (d) => o.startValue = d),
|
|
1686
1686
|
type: "date",
|
|
1687
1687
|
class: "filter-input",
|
|
1688
|
-
onChange:
|
|
1688
|
+
onChange: u[11] || (u[11] = (d) => a("start", o.startValue))
|
|
1689
1689
|
}, null, 544), [
|
|
1690
1690
|
[we, o.startValue]
|
|
1691
1691
|
]),
|
|
1692
|
-
|
|
1692
|
+
u[16] || (u[16] = w("span", { class: "date-separator" }, "-", -1)),
|
|
1693
1693
|
K(w("input", {
|
|
1694
|
-
"onUpdate:modelValue":
|
|
1694
|
+
"onUpdate:modelValue": u[12] || (u[12] = (d) => o.endValue = d),
|
|
1695
1695
|
type: "date",
|
|
1696
1696
|
class: "filter-input",
|
|
1697
|
-
onChange:
|
|
1697
|
+
onChange: u[13] || (u[13] = (d) => a("end", o.endValue))
|
|
1698
1698
|
}, null, 544), [
|
|
1699
1699
|
[we, o.endValue]
|
|
1700
1700
|
])
|
|
@@ -1702,19 +1702,19 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1702
1702
|
key: 6,
|
|
1703
1703
|
value: t.value,
|
|
1704
1704
|
column: e.column,
|
|
1705
|
-
|
|
1705
|
+
"col-index": e.colIndex,
|
|
1706
1706
|
store: e.store,
|
|
1707
|
-
"onUpdate:value":
|
|
1708
|
-
}, null, 40, ["value", "column", "
|
|
1709
|
-
|
|
1707
|
+
"onUpdate:value": u[14] || (u[14] = (d) => r(d))
|
|
1708
|
+
}, null, 40, ["value", "column", "col-index", "store"])) : Y("", !0),
|
|
1709
|
+
s.value ? (h(), x("button", {
|
|
1710
1710
|
key: 7,
|
|
1711
|
-
onClick: l,
|
|
1712
1711
|
class: "clear-btn",
|
|
1713
|
-
title: "Clear"
|
|
1712
|
+
title: "Clear",
|
|
1713
|
+
onClick: l
|
|
1714
1714
|
}, "×")) : Y("", !0)
|
|
1715
1715
|
]));
|
|
1716
1716
|
}
|
|
1717
|
-
}), sl = /* @__PURE__ */ Ve(al, [["__scopeId", "data-v-
|
|
1717
|
+
}), sl = /* @__PURE__ */ Ve(al, [["__scopeId", "data-v-a809a3bf"]]), rl = { key: 0 }, il = {
|
|
1718
1718
|
class: "atable-header-row",
|
|
1719
1719
|
tabindex: "-1"
|
|
1720
1720
|
}, ul = {
|
|
@@ -1739,72 +1739,72 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1739
1739
|
store: {}
|
|
1740
1740
|
},
|
|
1741
1741
|
setup(e) {
|
|
1742
|
-
const t =
|
|
1743
|
-
for (const
|
|
1744
|
-
if (
|
|
1745
|
-
const i =
|
|
1746
|
-
typeof
|
|
1742
|
+
const t = $(() => e.columns.filter((a) => a.filterable)), o = $(() => e.store.config.rowActions?.enabled ?? !1), n = $(() => e.store.config.rowActions?.position ?? "before-index"), s = (a) => e.store.sortByColumn(a), r = (a) => {
|
|
1743
|
+
for (const l of a) {
|
|
1744
|
+
if (l.borderBoxSize.length === 0) continue;
|
|
1745
|
+
const i = l.borderBoxSize[0].inlineSize, u = Number(l.target.dataset.colindex), d = e.store.columns[u]?.width;
|
|
1746
|
+
typeof d == "number" && d !== i && e.store.resizeColumn(u, i);
|
|
1747
1747
|
}
|
|
1748
1748
|
};
|
|
1749
|
-
return (
|
|
1749
|
+
return (a, l) => e.columns.length ? (h(), x("thead", rl, [
|
|
1750
1750
|
w("tr", il, [
|
|
1751
|
-
|
|
1751
|
+
o.value && n.value === "before-index" ? (h(), x("th", {
|
|
1752
1752
|
key: 0,
|
|
1753
|
-
class: se(["row-actions-header", { "sticky-column":
|
|
1753
|
+
class: se(["row-actions-header", { "sticky-column": n.value === "before-index" }])
|
|
1754
1754
|
}, null, 2)) : Y("", !0),
|
|
1755
|
-
|
|
1755
|
+
e.store.zeroColumn ? (h(), x("th", {
|
|
1756
1756
|
key: 1,
|
|
1757
1757
|
id: "header-index",
|
|
1758
1758
|
class: se([[
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1759
|
+
e.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1760
|
+
e.store.isTreeView ? "tree-index" : "",
|
|
1761
|
+
e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1762
1762
|
], "list-index"])
|
|
1763
1763
|
}, null, 2)) : Y("", !0),
|
|
1764
|
-
|
|
1765
|
-
(h(!0), x(X, null, pe(
|
|
1764
|
+
o.value && n.value === "after-index" ? (h(), x("th", ul)) : Y("", !0),
|
|
1765
|
+
(h(!0), x(X, null, pe(e.columns, (i, u) => K((h(), x("th", {
|
|
1766
1766
|
key: i.name,
|
|
1767
|
-
"data-colindex":
|
|
1767
|
+
"data-colindex": u,
|
|
1768
1768
|
tabindex: "-1",
|
|
1769
|
-
style: be(
|
|
1769
|
+
style: be(e.store.getHeaderCellStyle(i)),
|
|
1770
1770
|
class: se(`${i.pinned ? "sticky-column" : ""} ${i.sortable === !1 ? "" : "cursor-pointer"}`),
|
|
1771
|
-
onClick: (
|
|
1771
|
+
onClick: (d) => i.sortable !== !1 ? s(u) : void 0
|
|
1772
1772
|
}, [
|
|
1773
|
-
he(
|
|
1774
|
-
Dt(N(i.label || String.fromCharCode(
|
|
1773
|
+
he(a.$slots, "default", {}, () => [
|
|
1774
|
+
Dt(N(i.label || String.fromCharCode(u + 97).toUpperCase()), 1)
|
|
1775
1775
|
])
|
|
1776
1776
|
], 14, cl)), [
|
|
1777
|
-
[V(zo),
|
|
1777
|
+
[V(zo), r]
|
|
1778
1778
|
])), 128)),
|
|
1779
|
-
|
|
1779
|
+
o.value && n.value === "end" ? (h(), x("th", dl)) : Y("", !0)
|
|
1780
1780
|
]),
|
|
1781
|
-
|
|
1782
|
-
|
|
1781
|
+
t.value.length > 0 ? (h(), x("tr", fl, [
|
|
1782
|
+
o.value && n.value === "before-index" ? (h(), x("th", {
|
|
1783
1783
|
key: 0,
|
|
1784
|
-
class: se(["row-actions-header", { "sticky-column":
|
|
1784
|
+
class: se(["row-actions-header", { "sticky-column": n.value === "before-index" }])
|
|
1785
1785
|
}, null, 2)) : Y("", !0),
|
|
1786
|
-
|
|
1786
|
+
e.store.zeroColumn ? (h(), x("th", {
|
|
1787
1787
|
key: 1,
|
|
1788
1788
|
class: se([[
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1789
|
+
e.store.hasPinnedColumns ? "sticky-index" : "",
|
|
1790
|
+
e.store.isTreeView ? "tree-index" : "",
|
|
1791
|
+
e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
|
|
1792
1792
|
], "list-index"])
|
|
1793
1793
|
}, null, 2)) : Y("", !0),
|
|
1794
|
-
|
|
1795
|
-
(h(!0), x(X, null, pe(
|
|
1794
|
+
o.value && n.value === "after-index" ? (h(), x("th", vl)) : Y("", !0),
|
|
1795
|
+
(h(!0), x(X, null, pe(e.columns, (i, u) => (h(), x("th", {
|
|
1796
1796
|
key: `filter-${i.name}`,
|
|
1797
1797
|
class: se(`${i.pinned ? "sticky-column" : ""}`),
|
|
1798
|
-
style: be(
|
|
1798
|
+
style: be(e.store.getHeaderCellStyle(i))
|
|
1799
1799
|
}, [
|
|
1800
1800
|
i.filterable ? (h(), ve(sl, {
|
|
1801
1801
|
key: 0,
|
|
1802
1802
|
column: i,
|
|
1803
|
-
"col-index":
|
|
1804
|
-
store:
|
|
1803
|
+
"col-index": u,
|
|
1804
|
+
store: e.store
|
|
1805
1805
|
}, null, 8, ["column", "col-index", "store"])) : Y("", !0)
|
|
1806
1806
|
], 6))), 128)),
|
|
1807
|
-
|
|
1807
|
+
o.value && n.value === "end" ? (h(), x("th", pl)) : Y("", !0)
|
|
1808
1808
|
])) : Y("", !0)
|
|
1809
1809
|
])) : Y("", !0);
|
|
1810
1810
|
}
|
|
@@ -1814,28 +1814,28 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1814
1814
|
store: {}
|
|
1815
1815
|
},
|
|
1816
1816
|
setup(e) {
|
|
1817
|
-
const t = fe("amodal"), { width: o, height: n } = Pe(t),
|
|
1817
|
+
const t = fe("amodal"), { width: o, height: n } = Pe(t), s = $(() => {
|
|
1818
1818
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
|
|
1819
1819
|
const r = e.store.modal.cell?.closest("table");
|
|
1820
1820
|
if (!r) return {};
|
|
1821
|
-
const
|
|
1822
|
-
let
|
|
1823
|
-
const
|
|
1824
|
-
|
|
1821
|
+
const a = r.offsetHeight || 0, l = r.offsetWidth || 0;
|
|
1822
|
+
let i = e.store.modal.cell?.offsetTop || 0;
|
|
1823
|
+
const u = r.querySelector("thead")?.offsetHeight || 0;
|
|
1824
|
+
i += u, i = i + n.value < a ? i : i - (n.value + e.store.modal.height);
|
|
1825
1825
|
let d = e.store.modal.cell?.offsetLeft || 0;
|
|
1826
1826
|
return d = d + o.value <= l ? d : d - (o.value - e.store.modal.width), {
|
|
1827
1827
|
left: `${d}px`,
|
|
1828
|
-
top: `${
|
|
1828
|
+
top: `${i}px`
|
|
1829
1829
|
};
|
|
1830
1830
|
});
|
|
1831
|
-
return (r,
|
|
1831
|
+
return (r, a) => (h(), x("div", {
|
|
1832
1832
|
ref: "amodal",
|
|
1833
1833
|
class: "amodal",
|
|
1834
1834
|
tabindex: "-1",
|
|
1835
|
-
style: be(
|
|
1836
|
-
onClick:
|
|
1835
|
+
style: be(s.value),
|
|
1836
|
+
onClick: a[0] || (a[0] = Ie(() => {
|
|
1837
1837
|
}, ["stop"])),
|
|
1838
|
-
onInput:
|
|
1838
|
+
onInput: a[1] || (a[1] = Ie(() => {
|
|
1839
1839
|
}, ["stop"]))
|
|
1840
1840
|
}, [
|
|
1841
1841
|
he(r.$slots, "default")
|
|
@@ -1843,19 +1843,19 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1843
1843
|
}
|
|
1844
1844
|
}), ml = (e) => {
|
|
1845
1845
|
const t = e.id || co();
|
|
1846
|
-
return
|
|
1846
|
+
return $n(`table-${t}`, () => {
|
|
1847
1847
|
const o = () => {
|
|
1848
1848
|
const c = [Object.assign({}, { rowModified: !1 })], v = /* @__PURE__ */ new Set();
|
|
1849
|
-
for (let
|
|
1850
|
-
const H =
|
|
1849
|
+
for (let T = 0; T < s.value.length; T++) {
|
|
1850
|
+
const H = s.value[T];
|
|
1851
1851
|
H.parent !== null && H.parent !== void 0 && v.add(H.parent);
|
|
1852
1852
|
}
|
|
1853
|
-
const M = (
|
|
1854
|
-
for (let H = 0; H <
|
|
1855
|
-
if (
|
|
1853
|
+
const M = (T) => s.value[T]?.gantt !== void 0, P = (T) => {
|
|
1854
|
+
for (let H = 0; H < s.value.length; H++)
|
|
1855
|
+
if (s.value[H].parent === T && (M(H) || P(H)))
|
|
1856
1856
|
return !0;
|
|
1857
1857
|
return !1;
|
|
1858
|
-
}, Z = (
|
|
1858
|
+
}, Z = (T) => {
|
|
1859
1859
|
const H = r.value, U = H.view === "tree" || H.view === "tree-gantt" ? H.defaultTreeExpansion : void 0;
|
|
1860
1860
|
if (!U) return !0;
|
|
1861
1861
|
switch (U) {
|
|
@@ -1863,7 +1863,7 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1863
1863
|
return !1;
|
|
1864
1864
|
// Only root nodes are visible, all children start collapsed
|
|
1865
1865
|
case "branch":
|
|
1866
|
-
return P(
|
|
1866
|
+
return P(T);
|
|
1867
1867
|
case "leaf":
|
|
1868
1868
|
return !0;
|
|
1869
1869
|
// All nodes should be expanded
|
|
@@ -1871,10 +1871,10 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1871
1871
|
return !0;
|
|
1872
1872
|
}
|
|
1873
1873
|
};
|
|
1874
|
-
for (let
|
|
1875
|
-
const H =
|
|
1876
|
-
c[
|
|
1877
|
-
childrenOpen: Z(
|
|
1874
|
+
for (let T = 0; T < s.value.length; T++) {
|
|
1875
|
+
const H = s.value[T], U = H.parent === null || H.parent === void 0, ae = v.has(T);
|
|
1876
|
+
c[T] = {
|
|
1877
|
+
childrenOpen: Z(T),
|
|
1878
1878
|
expanded: !1,
|
|
1879
1879
|
indent: H.indent || 0,
|
|
1880
1880
|
isParent: ae,
|
|
@@ -1886,24 +1886,24 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1886
1886
|
};
|
|
1887
1887
|
}
|
|
1888
1888
|
return c;
|
|
1889
|
-
}, n = R(e.columns),
|
|
1889
|
+
}, n = R(e.columns), s = R(e.rows), r = R(e.config || {}), a = R({}), l = R({}), i = $(() => {
|
|
1890
1890
|
const c = {};
|
|
1891
1891
|
for (const [v, M] of n.value.entries())
|
|
1892
|
-
for (const [P, Z] of
|
|
1892
|
+
for (const [P, Z] of s.value.entries())
|
|
1893
1893
|
c[`${v}:${P}`] = Z[M.name];
|
|
1894
1894
|
return c;
|
|
1895
|
-
}),
|
|
1895
|
+
}), u = $({
|
|
1896
1896
|
get: () => {
|
|
1897
1897
|
const c = o();
|
|
1898
1898
|
for (let v = 0; v < c.length; v++)
|
|
1899
|
-
|
|
1899
|
+
a.value[v] && (c[v].rowModified = a.value[v]), l.value[v] && (l.value[v].childrenOpen !== void 0 && (c[v].childrenOpen = l.value[v].childrenOpen), l.value[v].expanded !== void 0 && (c[v].expanded = l.value[v].expanded));
|
|
1900
1900
|
if (C.value) {
|
|
1901
1901
|
const v = (M, P) => {
|
|
1902
1902
|
const Z = P[M];
|
|
1903
1903
|
if (Z.isRoot || Z.parent === null || Z.parent === void 0)
|
|
1904
1904
|
return !0;
|
|
1905
|
-
const
|
|
1906
|
-
return
|
|
1905
|
+
const T = Z.parent;
|
|
1906
|
+
return T < 0 || T >= P.length ? !1 : (P[T].childrenOpen || !1) && v(T, P);
|
|
1907
1907
|
};
|
|
1908
1908
|
for (let M = 0; M < c.length; M++)
|
|
1909
1909
|
c[M].isRoot || (c[M].open = v(M, c));
|
|
@@ -1911,53 +1911,53 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1911
1911
|
return c;
|
|
1912
1912
|
},
|
|
1913
1913
|
set: (c) => {
|
|
1914
|
-
JSON.stringify(c) !== JSON.stringify(
|
|
1914
|
+
JSON.stringify(c) !== JSON.stringify(u.value) && (u.value = c);
|
|
1915
1915
|
}
|
|
1916
1916
|
}), d = R(e.modal || { visible: !1 }), p = R({}), y = R([]), m = R([]), I = R([]), b = R({
|
|
1917
1917
|
column: null,
|
|
1918
1918
|
direction: null
|
|
1919
|
-
}), f = R({}), g =
|
|
1919
|
+
}), f = R({}), g = $(() => n.value.some((c) => c.pinned)), k = $(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), C = $(() => r.value.view === "tree" || r.value.view === "tree-gantt"), A = $(() => {
|
|
1920
1920
|
const c = r.value;
|
|
1921
1921
|
return c.view === "gantt" || c.view === "tree-gantt" ? c.dependencyGraph !== !1 : !0;
|
|
1922
|
-
}), L =
|
|
1922
|
+
}), L = $(() => `${Math.ceil(s.value.length / 100 + 1)}ch`), S = $(
|
|
1923
1923
|
() => r.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(r.value.view) : !1
|
|
1924
|
-
), O =
|
|
1925
|
-
let c =
|
|
1924
|
+
), O = $(() => {
|
|
1925
|
+
let c = s.value.map((v, M) => ({
|
|
1926
1926
|
...v,
|
|
1927
1927
|
originalIndex: M
|
|
1928
1928
|
}));
|
|
1929
1929
|
if (Object.entries(f.value).forEach(([v, M]) => {
|
|
1930
1930
|
const P = parseInt(v), Z = n.value[P];
|
|
1931
|
-
!Z || !(M.value || M.startValue || M.endValue || Z.filterType === "checkbox" && M.value !== void 0) || (c = c.filter((
|
|
1932
|
-
const H =
|
|
1931
|
+
!Z || !(M.value || M.startValue || M.endValue || Z.filterType === "checkbox" && M.value !== void 0) || (c = c.filter((T) => {
|
|
1932
|
+
const H = T[Z.name];
|
|
1933
1933
|
return le(H, M, Z);
|
|
1934
1934
|
}));
|
|
1935
1935
|
}), b.value.column !== null && b.value.direction) {
|
|
1936
1936
|
const v = n.value[b.value.column], M = b.value.direction;
|
|
1937
1937
|
c.sort((P, Z) => {
|
|
1938
|
-
let
|
|
1939
|
-
|
|
1940
|
-
const U = Number(
|
|
1941
|
-
if (!isNaN(U) && !isNaN(ae) &&
|
|
1938
|
+
let T = P[v.name], H = Z[v.name];
|
|
1939
|
+
T == null && (T = ""), H == null && (H = "");
|
|
1940
|
+
const U = Number(T), ae = Number(H);
|
|
1941
|
+
if (!isNaN(U) && !isNaN(ae) && T !== "" && H !== "")
|
|
1942
1942
|
return M === "asc" ? U - ae : ae - U;
|
|
1943
1943
|
{
|
|
1944
|
-
const tt = String(
|
|
1944
|
+
const tt = String(T).toLowerCase(), Ut = String(H).toLowerCase();
|
|
1945
1945
|
return M === "asc" ? tt.localeCompare(Ut) : Ut.localeCompare(tt);
|
|
1946
1946
|
}
|
|
1947
1947
|
});
|
|
1948
1948
|
}
|
|
1949
1949
|
return c;
|
|
1950
|
-
}), W = (c, v) =>
|
|
1950
|
+
}), W = (c, v) => i.value[`${c}:${v}`], me = (c, v, M) => {
|
|
1951
1951
|
const P = `${c}:${v}`, Z = n.value[c];
|
|
1952
|
-
|
|
1953
|
-
...
|
|
1952
|
+
i.value[P] !== M && (a.value[v] = !0), i.value[P] = M, s.value[v] = {
|
|
1953
|
+
...s.value[v],
|
|
1954
1954
|
[Z.name]: M
|
|
1955
1955
|
};
|
|
1956
1956
|
}, j = (c) => {
|
|
1957
|
-
|
|
1957
|
+
s.value = c;
|
|
1958
1958
|
}, J = (c, v, M) => {
|
|
1959
1959
|
const P = `${c}:${v}`;
|
|
1960
|
-
|
|
1960
|
+
i.value[P] !== M && (a.value[v] = !0, p.value[P] = M);
|
|
1961
1961
|
}, ge = (c) => {
|
|
1962
1962
|
const v = n.value.indexOf(c) === n.value.length - 1, M = r.value.fullWidth ? c.resizable && !v : c.resizable;
|
|
1963
1963
|
return {
|
|
@@ -1977,25 +1977,25 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
1977
1977
|
width: `${M}px`
|
|
1978
1978
|
};
|
|
1979
1979
|
}, Be = (c) => {
|
|
1980
|
-
const v =
|
|
1980
|
+
const v = s.value[c];
|
|
1981
1981
|
return k.value && v.gantt !== void 0;
|
|
1982
|
-
}, Re = (c) => !C.value ||
|
|
1982
|
+
}, Re = (c) => !C.value || u.value[c].isRoot || u.value[c].open, Ye = (c) => !C.value && r.value.view !== "list-expansion" ? "" : C.value && (u.value[c].isRoot || u.value[c].isParent) ? u.value[c].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? u.value[c].expanded ? "▼" : "►" : "", Xe = (c) => {
|
|
1983
1983
|
if (C.value) {
|
|
1984
|
-
const v = l.value[c] || {}, M = !(v.childrenOpen ??
|
|
1984
|
+
const v = l.value[c] || {}, M = !(v.childrenOpen ?? u.value[c].childrenOpen);
|
|
1985
1985
|
l.value[c] = {
|
|
1986
1986
|
...v,
|
|
1987
1987
|
childrenOpen: M
|
|
1988
1988
|
}, M || Fe(c);
|
|
1989
1989
|
} else if (r.value.view === "list-expansion") {
|
|
1990
|
-
const v = l.value[c] || {}, M = v.expanded ??
|
|
1990
|
+
const v = l.value[c] || {}, M = v.expanded ?? u.value[c].expanded;
|
|
1991
1991
|
l.value[c] = {
|
|
1992
1992
|
...v,
|
|
1993
1993
|
expanded: !M
|
|
1994
1994
|
};
|
|
1995
1995
|
}
|
|
1996
1996
|
}, Fe = (c) => {
|
|
1997
|
-
for (let v = 0; v <
|
|
1998
|
-
if (
|
|
1997
|
+
for (let v = 0; v < s.value.length; v++)
|
|
1998
|
+
if (u.value[v].parent === c) {
|
|
1999
1999
|
const M = l.value[v] || {};
|
|
2000
2000
|
l.value[v] = {
|
|
2001
2001
|
...M,
|
|
@@ -2006,12 +2006,12 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2006
2006
|
const M = W(c, v);
|
|
2007
2007
|
return Ze(c, v, M);
|
|
2008
2008
|
}, Ze = (c, v, M) => {
|
|
2009
|
-
const P = n.value[c], Z =
|
|
2010
|
-
return
|
|
2009
|
+
const P = n.value[c], Z = s.value[v], T = P.format;
|
|
2010
|
+
return T ? typeof T == "function" ? T(M, { table: i.value, row: Z, column: P }) : typeof T == "string" ? Function(`"use strict";return (${T})`)()(M, { table: i.value, row: Z, column: P }) : M : M;
|
|
2011
2011
|
}, D = (c) => {
|
|
2012
2012
|
c.target instanceof Node && d.value.parent?.contains(c.target) || d.value.visible && (d.value.visible = !1);
|
|
2013
2013
|
}, F = (c, v) => v && c === 0 && v > 0 ? `${v}ch` : "inherit", G = (c) => {
|
|
2014
|
-
const v =
|
|
2014
|
+
const v = s.value[c.rowIndex]?.gantt;
|
|
2015
2015
|
v && (c.type === "resize" ? c.edge === "start" ? (v.startIndex = c.newStart, v.endIndex = c.end, v.colspan = v.endIndex - v.startIndex) : c.edge === "end" && (v.startIndex = c.start, v.endIndex = c.newEnd, v.colspan = v.endIndex - v.startIndex) : c.type === "bar" && (v.startIndex = c.newStart, v.endIndex = c.newEnd, v.colspan = v.endIndex - v.startIndex));
|
|
2016
2016
|
}, Q = (c) => {
|
|
2017
2017
|
const v = y.value.findIndex((M) => M.id === c.id);
|
|
@@ -2029,7 +2029,7 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2029
2029
|
const P = m.value.find((H) => H.id === c), Z = m.value.find((H) => H.id === v);
|
|
2030
2030
|
if (!P || !Z)
|
|
2031
2031
|
return console.warn("Cannot create connection: handle not found"), null;
|
|
2032
|
-
const
|
|
2032
|
+
const T = {
|
|
2033
2033
|
id: `connection-${c}-${v}`,
|
|
2034
2034
|
from: {
|
|
2035
2035
|
barId: P.barId,
|
|
@@ -2042,7 +2042,7 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2042
2042
|
style: M?.style,
|
|
2043
2043
|
label: M?.label
|
|
2044
2044
|
};
|
|
2045
|
-
return I.value.push(
|
|
2045
|
+
return I.value.push(T), T;
|
|
2046
2046
|
}, _ = (c) => {
|
|
2047
2047
|
const v = I.value.findIndex((M) => M.id === c);
|
|
2048
2048
|
return v >= 0 ? (I.value.splice(v, 1), !0) : !1;
|
|
@@ -2054,38 +2054,36 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2054
2054
|
const P = M.filterType || "text", Z = v.value;
|
|
2055
2055
|
if (!Z && P !== "dateRange" && P !== "checkbox") return !0;
|
|
2056
2056
|
switch (P) {
|
|
2057
|
-
case "text":
|
|
2058
|
-
|
|
2059
|
-
return typeof c == "object" && c !== null ? A = Object.values(c).join(" ") : A = String(c || ""), A.toLowerCase().includes(String(Z).toLowerCase());
|
|
2060
|
-
}
|
|
2057
|
+
case "text":
|
|
2058
|
+
return (typeof c == "object" && c !== null ? Object.values(c).join(" ") : String(c || "")).toLowerCase().includes(String(Z).toLowerCase());
|
|
2061
2059
|
case "number": {
|
|
2062
|
-
const
|
|
2063
|
-
return !isNaN(
|
|
2060
|
+
const T = Number(c), H = Number(Z);
|
|
2061
|
+
return !isNaN(T) && !isNaN(H) && T === H;
|
|
2064
2062
|
}
|
|
2065
2063
|
case "select":
|
|
2066
2064
|
return c === Z;
|
|
2067
2065
|
case "checkbox":
|
|
2068
2066
|
return Z === !0 ? !!c : !0;
|
|
2069
2067
|
case "date": {
|
|
2070
|
-
let
|
|
2068
|
+
let T;
|
|
2071
2069
|
if (typeof c == "number") {
|
|
2072
2070
|
const U = new Date(c), ae = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2073
|
-
|
|
2071
|
+
T = new Date(ae, U.getMonth(), U.getDate());
|
|
2074
2072
|
} else
|
|
2075
|
-
|
|
2073
|
+
T = new Date(String(c));
|
|
2076
2074
|
const H = new Date(String(Z));
|
|
2077
|
-
return
|
|
2075
|
+
return T.toDateString() === H.toDateString();
|
|
2078
2076
|
}
|
|
2079
2077
|
case "dateRange": {
|
|
2080
|
-
const
|
|
2081
|
-
if (!
|
|
2078
|
+
const T = v.startValue, H = v.endValue;
|
|
2079
|
+
if (!T && !H) return !0;
|
|
2082
2080
|
let U;
|
|
2083
2081
|
if (typeof c == "number") {
|
|
2084
2082
|
const ae = new Date(c), tt = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2085
2083
|
U = new Date(tt, ae.getMonth(), ae.getDate());
|
|
2086
2084
|
} else
|
|
2087
2085
|
U = new Date(String(c));
|
|
2088
|
-
return !(
|
|
2086
|
+
return !(T && U < new Date(String(T)) || H && U > new Date(String(H)));
|
|
2089
2087
|
}
|
|
2090
2088
|
default:
|
|
2091
2089
|
return !0;
|
|
@@ -2100,7 +2098,7 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2100
2098
|
M[Z.name] = "";
|
|
2101
2099
|
c && Object.assign(M, c);
|
|
2102
2100
|
let P;
|
|
2103
|
-
return v === "start" ? (P = 0,
|
|
2101
|
+
return v === "start" ? (P = 0, s.value.unshift(M)) : v === "end" ? (P = s.value.length, s.value.push(M)) : (P = Math.max(0, Math.min(v, s.value.length)), s.value.splice(P, 0, M)), P;
|
|
2104
2102
|
};
|
|
2105
2103
|
return {
|
|
2106
2104
|
// state
|
|
@@ -2108,20 +2106,20 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2108
2106
|
config: r,
|
|
2109
2107
|
connectionHandles: m,
|
|
2110
2108
|
connectionPaths: I,
|
|
2111
|
-
display:
|
|
2109
|
+
display: u,
|
|
2112
2110
|
filterState: f,
|
|
2113
2111
|
ganttBars: y,
|
|
2114
2112
|
modal: d,
|
|
2115
|
-
rows:
|
|
2113
|
+
rows: s,
|
|
2116
2114
|
sortState: b,
|
|
2117
|
-
table:
|
|
2115
|
+
table: i,
|
|
2118
2116
|
updates: p,
|
|
2119
2117
|
// getters
|
|
2120
2118
|
filteredRows: O,
|
|
2121
2119
|
hasPinnedColumns: g,
|
|
2122
2120
|
isGanttView: k,
|
|
2123
2121
|
isTreeView: C,
|
|
2124
|
-
isDependencyGraphEnabled:
|
|
2122
|
+
isDependencyGraphEnabled: A,
|
|
2125
2123
|
numberedRowWidth: L,
|
|
2126
2124
|
zeroColumn: S,
|
|
2127
2125
|
// actions
|
|
@@ -2131,26 +2129,26 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2131
2129
|
createConnection: Le,
|
|
2132
2130
|
deleteConnection: _,
|
|
2133
2131
|
deleteRow: (c) => {
|
|
2134
|
-
if (c < 0 || c >=
|
|
2132
|
+
if (c < 0 || c >= s.value.length)
|
|
2135
2133
|
return null;
|
|
2136
|
-
const [v] =
|
|
2137
|
-
delete
|
|
2134
|
+
const [v] = s.value.splice(c, 1);
|
|
2135
|
+
delete a.value[c], delete l.value[c];
|
|
2138
2136
|
const M = {}, P = {};
|
|
2139
|
-
for (const [Z,
|
|
2137
|
+
for (const [Z, T] of Object.entries(a.value)) {
|
|
2140
2138
|
const H = parseInt(Z);
|
|
2141
|
-
H > c ? M[H - 1] =
|
|
2139
|
+
H > c ? M[H - 1] = T : M[H] = T;
|
|
2142
2140
|
}
|
|
2143
|
-
for (const [Z,
|
|
2141
|
+
for (const [Z, T] of Object.entries(l.value)) {
|
|
2144
2142
|
const H = parseInt(Z);
|
|
2145
|
-
H > c ? P[H - 1] =
|
|
2143
|
+
H > c ? P[H - 1] = T : P[H] = T;
|
|
2146
2144
|
}
|
|
2147
|
-
return
|
|
2145
|
+
return a.value = M, l.value = P, v;
|
|
2148
2146
|
},
|
|
2149
2147
|
duplicateRow: (c) => {
|
|
2150
|
-
if (c < 0 || c >=
|
|
2148
|
+
if (c < 0 || c >= s.value.length)
|
|
2151
2149
|
return -1;
|
|
2152
|
-
const v =
|
|
2153
|
-
return
|
|
2150
|
+
const v = s.value[c], M = JSON.parse(JSON.stringify(v)), P = c + 1;
|
|
2151
|
+
return s.value.splice(P, 0, M), P;
|
|
2154
2152
|
},
|
|
2155
2153
|
getCellData: W,
|
|
2156
2154
|
getCellDisplayValue: je,
|
|
@@ -2165,28 +2163,28 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2165
2163
|
return ce(v, M);
|
|
2166
2164
|
},
|
|
2167
2165
|
insertRowBelow: (c, v) => {
|
|
2168
|
-
const M = Math.min(c + 1,
|
|
2166
|
+
const M = Math.min(c + 1, s.value.length);
|
|
2169
2167
|
return ce(v, M);
|
|
2170
2168
|
},
|
|
2171
2169
|
isRowGantt: Be,
|
|
2172
2170
|
isRowVisible: Re,
|
|
2173
2171
|
moveRow: (c, v) => {
|
|
2174
|
-
if (c < 0 || c >=
|
|
2172
|
+
if (c < 0 || c >= s.value.length || v < 0 || v >= s.value.length || c === v)
|
|
2175
2173
|
return !1;
|
|
2176
|
-
const [M] =
|
|
2177
|
-
|
|
2174
|
+
const [M] = s.value.splice(c, 1);
|
|
2175
|
+
s.value.splice(v, 0, M);
|
|
2178
2176
|
const P = {}, Z = {};
|
|
2179
|
-
for (const [
|
|
2180
|
-
const U = parseInt(
|
|
2177
|
+
for (const [T, H] of Object.entries(a.value)) {
|
|
2178
|
+
const U = parseInt(T);
|
|
2181
2179
|
let ae = U;
|
|
2182
2180
|
U === c ? ae = v : c < v ? U > c && U <= v && (ae = U - 1) : U >= v && U < c && (ae = U + 1), P[ae] = H;
|
|
2183
2181
|
}
|
|
2184
|
-
for (const [
|
|
2185
|
-
const U = parseInt(
|
|
2182
|
+
for (const [T, H] of Object.entries(l.value)) {
|
|
2183
|
+
const U = parseInt(T);
|
|
2186
2184
|
let ae = U;
|
|
2187
2185
|
U === c ? ae = v : c < v ? U > c && U <= v && (ae = U - 1) : U >= v && U < c && (ae = U + 1), Z[ae] = H;
|
|
2188
2186
|
}
|
|
2189
|
-
return
|
|
2187
|
+
return a.value = P, l.value = Z, !0;
|
|
2190
2188
|
},
|
|
2191
2189
|
registerConnectionHandle: re,
|
|
2192
2190
|
registerGanttBar: Q,
|
|
@@ -2218,12 +2216,12 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2218
2216
|
}),
|
|
2219
2217
|
emits: /* @__PURE__ */ xe(["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"]),
|
|
2220
2218
|
setup(e, { expose: t, emit: o }) {
|
|
2221
|
-
const n = Me(e, "rows"),
|
|
2219
|
+
const n = Me(e, "rows"), s = Me(e, "columns"), r = o, a = fe("table"), l = ml({ columns: s.value, rows: n.value, id: e.id, config: e.config });
|
|
2222
2220
|
l.$onAction(({ name: I, store: b, args: f, after: g }) => {
|
|
2223
2221
|
if (I === "setCellData" || I === "setCellText") {
|
|
2224
|
-
const [k, C,
|
|
2222
|
+
const [k, C, A] = f, L = b.getCellData(k, C);
|
|
2225
2223
|
g(() => {
|
|
2226
|
-
n.value = [...b.rows], r("cellUpdate", { colIndex: k, rowIndex: C, newValue:
|
|
2224
|
+
n.value = [...b.rows], r("cellUpdate", { colIndex: k, rowIndex: C, newValue: A, oldValue: L });
|
|
2227
2225
|
});
|
|
2228
2226
|
} else if (I === "updateGanttBar") {
|
|
2229
2227
|
const [k] = f;
|
|
@@ -2232,7 +2230,7 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2232
2230
|
r("gantt:drag", k);
|
|
2233
2231
|
});
|
|
2234
2232
|
} else I === "resizeColumn" && g(() => {
|
|
2235
|
-
|
|
2233
|
+
s.value = [...b.columns], r("columns:update", [...b.columns]);
|
|
2236
2234
|
});
|
|
2237
2235
|
}), ne(
|
|
2238
2236
|
() => n.value,
|
|
@@ -2241,26 +2239,26 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2241
2239
|
},
|
|
2242
2240
|
{ deep: !0 }
|
|
2243
2241
|
), ne(
|
|
2244
|
-
|
|
2242
|
+
s,
|
|
2245
2243
|
(I) => {
|
|
2246
2244
|
JSON.stringify(I) !== JSON.stringify(l.columns) && (l.columns = [...I], r("columns:update", [...I]));
|
|
2247
2245
|
},
|
|
2248
2246
|
{ deep: !0 }
|
|
2249
2247
|
), Ee(() => {
|
|
2250
|
-
|
|
2248
|
+
s.value.some((I) => I.pinned) && (u(), l.isTreeView && vn(a, u, { childList: !0, subtree: !0 }));
|
|
2251
2249
|
});
|
|
2252
|
-
const
|
|
2253
|
-
const I =
|
|
2250
|
+
const i = $(() => l.columns.filter((I) => I.pinned).length), u = () => {
|
|
2251
|
+
const I = a.value, b = I?.rows[0], f = I?.rows[1], g = b ? Array.from(b.cells) : [];
|
|
2254
2252
|
for (const [k, C] of g.entries()) {
|
|
2255
|
-
const
|
|
2256
|
-
|
|
2253
|
+
const A = f?.cells[k];
|
|
2254
|
+
A && (C.style.width = `${A.offsetWidth}px`);
|
|
2257
2255
|
}
|
|
2258
2256
|
for (const k of I?.rows || []) {
|
|
2259
2257
|
let C = 0;
|
|
2260
|
-
const
|
|
2258
|
+
const A = [];
|
|
2261
2259
|
for (const L of k.cells)
|
|
2262
|
-
(L.classList.contains("sticky-column") || L.classList.contains("sticky-index")) && (L.style.left = `${C}px`, C += L.offsetWidth,
|
|
2263
|
-
|
|
2260
|
+
(L.classList.contains("sticky-column") || L.classList.contains("sticky-index")) && (L.style.left = `${C}px`, C += L.offsetWidth, A.push(L));
|
|
2261
|
+
A.length > 0 && A[A.length - 1].classList.add("sticky-column-edge");
|
|
2264
2262
|
}
|
|
2265
2263
|
};
|
|
2266
2264
|
window.addEventListener("keydown", (I) => {
|
|
@@ -2273,18 +2271,18 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2273
2271
|
}
|
|
2274
2272
|
});
|
|
2275
2273
|
const d = (I) => {
|
|
2276
|
-
if (!I.gantt ||
|
|
2274
|
+
if (!I.gantt || i.value === 0)
|
|
2277
2275
|
return l.columns;
|
|
2278
2276
|
const b = [];
|
|
2279
|
-
for (let f = 0; f <
|
|
2277
|
+
for (let f = 0; f < i.value; f++) {
|
|
2280
2278
|
const g = { ...l.columns[f] };
|
|
2281
2279
|
g.originalIndex = f, b.push(g);
|
|
2282
2280
|
}
|
|
2283
2281
|
return b.push({
|
|
2284
|
-
...l.columns[
|
|
2282
|
+
...l.columns[i.value],
|
|
2285
2283
|
isGantt: !0,
|
|
2286
|
-
colspan: I.gantt?.colspan || l.columns.length -
|
|
2287
|
-
originalIndex:
|
|
2284
|
+
colspan: I.gantt?.colspan || l.columns.length - i.value,
|
|
2285
|
+
originalIndex: i.value,
|
|
2288
2286
|
width: "auto"
|
|
2289
2287
|
// TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
|
|
2290
2288
|
}), b;
|
|
@@ -2360,53 +2358,53 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2360
2358
|
(h(!0), x(X, null, pe(V(l).filteredRows, (f, g) => (h(), ve(pn, {
|
|
2361
2359
|
key: `${f.originalIndex}-${g}`,
|
|
2362
2360
|
row: f,
|
|
2363
|
-
|
|
2361
|
+
"row-index": f.originalIndex,
|
|
2364
2362
|
store: V(l),
|
|
2365
2363
|
"onRow:action": m
|
|
2366
2364
|
}, {
|
|
2367
|
-
default:
|
|
2365
|
+
default: Tt(() => [
|
|
2368
2366
|
(h(!0), x(X, null, pe(d(f), (k, C) => (h(), x(X, {
|
|
2369
2367
|
key: k.name
|
|
2370
2368
|
}, [
|
|
2371
2369
|
k.isGantt ? (h(), ve(Oe(k.ganttComponent || "AGanttCell"), {
|
|
2372
2370
|
key: 0,
|
|
2373
2371
|
store: V(l),
|
|
2374
|
-
"columns-count": V(l).columns.length -
|
|
2372
|
+
"columns-count": V(l).columns.length - i.value,
|
|
2375
2373
|
color: f.gantt?.color,
|
|
2376
2374
|
start: f.gantt?.startIndex,
|
|
2377
2375
|
end: f.gantt?.endIndex,
|
|
2378
2376
|
colspan: k.colspan,
|
|
2379
2377
|
pinned: k.pinned,
|
|
2380
|
-
|
|
2381
|
-
|
|
2378
|
+
"row-index": f.originalIndex,
|
|
2379
|
+
"col-index": k.originalIndex ?? C,
|
|
2382
2380
|
style: be({
|
|
2383
2381
|
textAlign: k?.align || "center",
|
|
2384
2382
|
minWidth: k?.width || "40ch",
|
|
2385
2383
|
width: V(l).config.fullWidth ? "auto" : null
|
|
2386
2384
|
}),
|
|
2387
2385
|
"onConnection:create": p
|
|
2388
|
-
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "
|
|
2386
|
+
}, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (h(), ve(Oe(k.cellComponent || "ACell"), {
|
|
2389
2387
|
key: 1,
|
|
2390
2388
|
store: V(l),
|
|
2391
2389
|
pinned: k.pinned,
|
|
2392
|
-
|
|
2393
|
-
|
|
2390
|
+
"row-index": f.originalIndex,
|
|
2391
|
+
"col-index": C,
|
|
2394
2392
|
style: be({
|
|
2395
2393
|
textAlign: k?.align || "center",
|
|
2396
2394
|
width: V(l).config.fullWidth ? "auto" : null
|
|
2397
2395
|
}),
|
|
2398
2396
|
spellcheck: "false"
|
|
2399
|
-
}, null, 8, ["store", "pinned", "
|
|
2397
|
+
}, null, 8, ["store", "pinned", "row-index", "col-index", "style"]))
|
|
2400
2398
|
], 64))), 128))
|
|
2401
2399
|
]),
|
|
2402
2400
|
_: 2
|
|
2403
|
-
}, 1032, ["row", "
|
|
2401
|
+
}, 1032, ["row", "row-index", "store"]))), 128))
|
|
2404
2402
|
], !0)
|
|
2405
2403
|
]),
|
|
2406
2404
|
he(I.$slots, "footer", { data: V(l) }, void 0, !0),
|
|
2407
2405
|
he(I.$slots, "modal", { data: V(l) }, () => [
|
|
2408
2406
|
K(At(hn, { store: V(l) }, {
|
|
2409
|
-
default:
|
|
2407
|
+
default: Tt(() => [
|
|
2410
2408
|
(h(), ve(Oe(V(l).modal.component), dt({
|
|
2411
2409
|
key: `${V(l).modal.rowIndex}:${V(l).modal.colIndex}`,
|
|
2412
2410
|
"col-index": V(l).modal.colIndex,
|
|
@@ -2429,7 +2427,7 @@ const Yo = { class: "gantt-connection-overlay" }, Xo = {
|
|
|
2429
2427
|
}, null, 8, ["store"])) : Y("", !0)
|
|
2430
2428
|
]));
|
|
2431
2429
|
}
|
|
2432
|
-
}), wl = /* @__PURE__ */ Ve(gl, [["__scopeId", "data-v-
|
|
2430
|
+
}), wl = /* @__PURE__ */ Ve(gl, [["__scopeId", "data-v-7b50ad21"]]), yl = {}, bl = { class: "aloading" }, xl = { class: "aloading-header" };
|
|
2433
2431
|
function kl(e, t) {
|
|
2434
2432
|
return h(), x("div", bl, [
|
|
2435
2433
|
w("h2", xl, [
|
|
@@ -2447,9 +2445,9 @@ function Al(e, t) {
|
|
|
2447
2445
|
t[0] || (t[0] = w("div", { class: "aloading-bar" }, null, -1))
|
|
2448
2446
|
]);
|
|
2449
2447
|
}
|
|
2450
|
-
const
|
|
2451
|
-
function
|
|
2452
|
-
e.component("ACell", mo), e.component("AExpansionRow", bo), e.component("AGanttCell", Ao), e.component("ARow", pn), e.component("ARowActions", it), e.component("ATable", wl), e.component("ATableHeader", mn), e.component("ATableLoading", Il), e.component("ATableLoadingBar",
|
|
2448
|
+
const Tl = /* @__PURE__ */ Ve(Ml, [["render", Al], ["__scopeId", "data-v-e1165876"]]);
|
|
2449
|
+
function $l(e) {
|
|
2450
|
+
e.component("ACell", mo), e.component("AExpansionRow", bo), e.component("AGanttCell", Ao), e.component("ARow", pn), e.component("ARowActions", it), e.component("ATable", wl), e.component("ATableHeader", mn), e.component("ATableLoading", Il), e.component("ATableLoadingBar", Tl), e.component("ATableModal", hn);
|
|
2453
2451
|
}
|
|
2454
2452
|
const Dl = { class: "aform_form-element" }, Sl = { class: "aform_field-label" }, Rl = { class: "aform_display-value" }, Ll = ["for"], Hl = { class: "aform_checkbox-container aform_input-field" }, Vl = ["id", "disabled", "required"], Pl = ["innerHTML"], _l = /* @__PURE__ */ oe({
|
|
2455
2453
|
__name: "ACheckbox",
|
|
@@ -2480,7 +2478,7 @@ const Dl = { class: "aform_form-element" }, Sl = { class: "aform_field-label" },
|
|
|
2480
2478
|
w("span", Hl, [
|
|
2481
2479
|
K(w("input", {
|
|
2482
2480
|
id: e.uuid,
|
|
2483
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
2481
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => t.value = s),
|
|
2484
2482
|
type: "checkbox",
|
|
2485
2483
|
class: "aform_checkbox",
|
|
2486
2484
|
disabled: e.mode === "read",
|
|
@@ -2498,12 +2496,12 @@ const Dl = { class: "aform_form-element" }, Sl = { class: "aform_field-label" },
|
|
|
2498
2496
|
], 64))
|
|
2499
2497
|
]));
|
|
2500
2498
|
}
|
|
2501
|
-
}),
|
|
2499
|
+
}), $e = (e, t) => {
|
|
2502
2500
|
const o = e.__vccOpts || e;
|
|
2503
|
-
for (const [n,
|
|
2504
|
-
o[n] =
|
|
2501
|
+
for (const [n, s] of t)
|
|
2502
|
+
o[n] = s;
|
|
2505
2503
|
return o;
|
|
2506
|
-
}, Ol = /* @__PURE__ */
|
|
2504
|
+
}, Ol = /* @__PURE__ */ $e(_l, [["__scopeId", "data-v-cc185b72"]]), Bl = /* @__PURE__ */ oe({
|
|
2507
2505
|
__name: "AComboBox",
|
|
2508
2506
|
props: {
|
|
2509
2507
|
schema: {},
|
|
@@ -2519,13 +2517,13 @@ const Dl = { class: "aform_form-element" }, Sl = { class: "aform_field-label" },
|
|
|
2519
2517
|
},
|
|
2520
2518
|
setup(e) {
|
|
2521
2519
|
return (t, o) => {
|
|
2522
|
-
const n =
|
|
2520
|
+
const n = Tn("ATableModal");
|
|
2523
2521
|
return h(), ve(n, {
|
|
2524
2522
|
event: e.event,
|
|
2525
2523
|
"cell-data": e.cellData,
|
|
2526
2524
|
class: "amodal"
|
|
2527
2525
|
}, {
|
|
2528
|
-
default:
|
|
2526
|
+
default: Tt(() => [...o[0] || (o[0] = [
|
|
2529
2527
|
w("div", null, [
|
|
2530
2528
|
w("input", { type: "text" }),
|
|
2531
2529
|
w("input", { type: "text" }),
|
|
@@ -2556,11 +2554,11 @@ const Dl = { class: "aform_form-element" }, Sl = { class: "aform_field-label" },
|
|
|
2556
2554
|
setup(e) {
|
|
2557
2555
|
const t = Me(e, "modelValue", {
|
|
2558
2556
|
// format the date to be compatible with the native input datepicker
|
|
2559
|
-
set: (
|
|
2557
|
+
set: (s) => new Date(s).toISOString().split("T")[0]
|
|
2560
2558
|
}), o = fe("date"), n = () => {
|
|
2561
2559
|
o.value && "showPicker" in HTMLInputElement.prototype && o.value.showPicker();
|
|
2562
2560
|
};
|
|
2563
|
-
return (
|
|
2561
|
+
return (s, r) => (h(), x("div", null, [
|
|
2564
2562
|
e.mode === "display" ? (h(), x(X, { key: 0 }, [
|
|
2565
2563
|
w("span", Fl, N(t.value ? new Date(t.value).toLocaleDateString() : ""), 1),
|
|
2566
2564
|
w("label", null, N(e.label), 1)
|
|
@@ -2568,7 +2566,7 @@ const Dl = { class: "aform_form-element" }, Sl = { class: "aform_field-label" },
|
|
|
2568
2566
|
K(w("input", {
|
|
2569
2567
|
id: e.uuid,
|
|
2570
2568
|
ref: "date",
|
|
2571
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
2569
|
+
"onUpdate:modelValue": r[0] || (r[0] = (a) => t.value = a),
|
|
2572
2570
|
type: "date",
|
|
2573
2571
|
disabled: e.mode === "read",
|
|
2574
2572
|
required: e.required,
|
|
@@ -2585,7 +2583,7 @@ const Dl = { class: "aform_form-element" }, Sl = { class: "aform_field-label" },
|
|
|
2585
2583
|
], 64))
|
|
2586
2584
|
]));
|
|
2587
2585
|
}
|
|
2588
|
-
}), Gl = /* @__PURE__ */
|
|
2586
|
+
}), Gl = /* @__PURE__ */ $e(Wl, [["__scopeId", "data-v-8e467bb3"]]);
|
|
2589
2587
|
function gn(e, t) {
|
|
2590
2588
|
return vt() ? (pt(e, t), !0) : !1;
|
|
2591
2589
|
}
|
|
@@ -2597,11 +2595,11 @@ function jt() {
|
|
|
2597
2595
|
return {
|
|
2598
2596
|
on: (r) => {
|
|
2599
2597
|
e.add(r);
|
|
2600
|
-
const
|
|
2601
|
-
return gn(
|
|
2598
|
+
const a = () => t(r);
|
|
2599
|
+
return gn(a), { off: a };
|
|
2602
2600
|
},
|
|
2603
2601
|
off: t,
|
|
2604
|
-
trigger: (...r) => Promise.all(Array.from(e).map((
|
|
2602
|
+
trigger: (...r) => Promise.all(Array.from(e).map((a) => a(...r))),
|
|
2605
2603
|
clear: () => {
|
|
2606
2604
|
e.clear();
|
|
2607
2605
|
}
|
|
@@ -2635,35 +2633,35 @@ function Ue(e) {
|
|
|
2635
2633
|
return (t = o?.$el) !== null && t !== void 0 ? t : o;
|
|
2636
2634
|
}
|
|
2637
2635
|
function It(...e) {
|
|
2638
|
-
const t = (n,
|
|
2639
|
-
const n = kt(E(e[0])).filter((
|
|
2640
|
-
return n.every((
|
|
2636
|
+
const t = (n, s, r, a) => (n.addEventListener(s, r, a), () => n.removeEventListener(s, r, a)), o = $(() => {
|
|
2637
|
+
const n = kt(E(e[0])).filter((s) => s != null);
|
|
2638
|
+
return n.every((s) => typeof s != "string") ? n : void 0;
|
|
2641
2639
|
});
|
|
2642
2640
|
return jl(() => {
|
|
2643
|
-
var n,
|
|
2641
|
+
var n, s;
|
|
2644
2642
|
return [
|
|
2645
|
-
(n = (
|
|
2643
|
+
(n = (s = o.value) === null || s === void 0 ? void 0 : s.map((r) => Ue(r))) !== null && n !== void 0 ? n : [yn].filter((r) => r != null),
|
|
2646
2644
|
kt(E(o.value ? e[1] : e[0])),
|
|
2647
2645
|
kt(V(o.value ? e[2] : e[1])),
|
|
2648
2646
|
E(o.value ? e[3] : e[2])
|
|
2649
2647
|
];
|
|
2650
|
-
}, ([n,
|
|
2651
|
-
if (!n?.length || !
|
|
2652
|
-
const
|
|
2653
|
-
|
|
2648
|
+
}, ([n, s, r, a], l, i) => {
|
|
2649
|
+
if (!n?.length || !s?.length || !r?.length) return;
|
|
2650
|
+
const u = ql(a) ? { ...a } : a, d = n.flatMap((p) => s.flatMap((y) => r.map((m) => t(p, y, m, u))));
|
|
2651
|
+
i(() => {
|
|
2654
2652
|
d.forEach((p) => p());
|
|
2655
2653
|
});
|
|
2656
2654
|
}, { flush: "post" });
|
|
2657
2655
|
}
|
|
2658
2656
|
function Jt(e, t, o = {}) {
|
|
2659
|
-
const { window: n = yn, ignore:
|
|
2657
|
+
const { window: n = yn, ignore: s = [], capture: r = !0, detectIframe: a = !1, controls: l = !1 } = o;
|
|
2660
2658
|
if (!n) return l ? {
|
|
2661
2659
|
stop: Je,
|
|
2662
2660
|
cancel: Je,
|
|
2663
2661
|
trigger: Je
|
|
2664
2662
|
} : Je;
|
|
2665
|
-
let
|
|
2666
|
-
const
|
|
2663
|
+
let i = !0;
|
|
2664
|
+
const u = (f) => E(s).some((g) => {
|
|
2667
2665
|
if (typeof g == "string") return Array.from(n.document.querySelectorAll(g)).some((k) => k === f.target || f.composedPath().includes(k));
|
|
2668
2666
|
{
|
|
2669
2667
|
const k = Ue(g);
|
|
@@ -2676,13 +2674,13 @@ function Jt(e, t, o = {}) {
|
|
|
2676
2674
|
}
|
|
2677
2675
|
function p(f, g) {
|
|
2678
2676
|
const k = E(f), C = k.$.subTree && k.$.subTree.children;
|
|
2679
|
-
return C == null || !Array.isArray(C) ? !1 : C.some((
|
|
2677
|
+
return C == null || !Array.isArray(C) ? !1 : C.some((A) => A.el === g.target || g.composedPath().includes(A.el));
|
|
2680
2678
|
}
|
|
2681
2679
|
const y = (f) => {
|
|
2682
2680
|
const g = Ue(e);
|
|
2683
2681
|
if (f.target != null && !(!(g instanceof Element) && d(e) && p(e, f)) && !(!g || g === f.target || f.composedPath().includes(g))) {
|
|
2684
|
-
if ("detail" in f && f.detail === 0 && (
|
|
2685
|
-
|
|
2682
|
+
if ("detail" in f && f.detail === 0 && (i = !u(f)), !i) {
|
|
2683
|
+
i = !0;
|
|
2686
2684
|
return;
|
|
2687
2685
|
}
|
|
2688
2686
|
t(f);
|
|
@@ -2700,9 +2698,9 @@ function Jt(e, t, o = {}) {
|
|
|
2700
2698
|
}),
|
|
2701
2699
|
It(n, "pointerdown", (f) => {
|
|
2702
2700
|
const g = Ue(e);
|
|
2703
|
-
|
|
2701
|
+
i = !u(f) && !!(g && !f.composedPath().includes(g));
|
|
2704
2702
|
}, { passive: !0 }),
|
|
2705
|
-
|
|
2703
|
+
a && It(n, "blur", (f) => {
|
|
2706
2704
|
setTimeout(() => {
|
|
2707
2705
|
var g;
|
|
2708
2706
|
const k = Ue(e);
|
|
@@ -2713,10 +2711,10 @@ function Jt(e, t, o = {}) {
|
|
|
2713
2711
|
return l ? {
|
|
2714
2712
|
stop: b,
|
|
2715
2713
|
cancel: () => {
|
|
2716
|
-
|
|
2714
|
+
i = !1;
|
|
2717
2715
|
},
|
|
2718
2716
|
trigger: (f) => {
|
|
2719
|
-
|
|
2717
|
+
i = !0, y(f), i = !1;
|
|
2720
2718
|
}
|
|
2721
2719
|
} : b;
|
|
2722
2720
|
}
|
|
@@ -2734,17 +2732,17 @@ function Kl(e) {
|
|
|
2734
2732
|
return t.files;
|
|
2735
2733
|
}
|
|
2736
2734
|
function ea(e = {}) {
|
|
2737
|
-
const { document: t = Jl } = e, o = R(Kl(e.initialFiles)), { on: n, trigger:
|
|
2735
|
+
const { document: t = Jl } = e, o = R(Kl(e.initialFiles)), { on: n, trigger: s } = /* @__PURE__ */ jt(), { on: r, trigger: a } = /* @__PURE__ */ jt(), l = $(() => {
|
|
2738
2736
|
var p;
|
|
2739
2737
|
const y = (p = Ue(e.input)) !== null && p !== void 0 ? p : t ? t.createElement("input") : void 0;
|
|
2740
2738
|
return y && (y.type = "file", y.onchange = (m) => {
|
|
2741
|
-
o.value = m.target.files,
|
|
2739
|
+
o.value = m.target.files, s(o.value);
|
|
2742
2740
|
}, y.oncancel = () => {
|
|
2743
|
-
|
|
2741
|
+
a();
|
|
2744
2742
|
}), y;
|
|
2745
|
-
}),
|
|
2746
|
-
o.value = null, l.value && l.value.value && (l.value.value = "",
|
|
2747
|
-
},
|
|
2743
|
+
}), i = () => {
|
|
2744
|
+
o.value = null, l.value && l.value.value && (l.value.value = "", s(null));
|
|
2745
|
+
}, u = (p) => {
|
|
2748
2746
|
const y = l.value;
|
|
2749
2747
|
y && (y.multiple = E(p.multiple), y.accept = E(p.accept), y.webkitdirectory = E(p.directory), Yl(p, "capture") && (y.capture = E(p.capture)));
|
|
2750
2748
|
}, d = (p) => {
|
|
@@ -2755,14 +2753,14 @@ function ea(e = {}) {
|
|
|
2755
2753
|
...e,
|
|
2756
2754
|
...p
|
|
2757
2755
|
};
|
|
2758
|
-
|
|
2756
|
+
u(m), E(m.reset) && i(), y.click();
|
|
2759
2757
|
};
|
|
2760
2758
|
return ht(() => {
|
|
2761
|
-
|
|
2759
|
+
u(e);
|
|
2762
2760
|
}), {
|
|
2763
2761
|
files: Rt(o),
|
|
2764
2762
|
open: d,
|
|
2765
|
-
reset:
|
|
2763
|
+
reset: i,
|
|
2766
2764
|
onCancel: r,
|
|
2767
2765
|
onChange: n
|
|
2768
2766
|
};
|
|
@@ -2774,27 +2772,27 @@ const Ct = /* @__PURE__ */ new WeakMap();
|
|
|
2774
2772
|
function ta(e, t = !1) {
|
|
2775
2773
|
const o = ue(t);
|
|
2776
2774
|
let n = "";
|
|
2777
|
-
ne(Xl(e), (
|
|
2778
|
-
const l = Mt(E(
|
|
2775
|
+
ne(Xl(e), (a) => {
|
|
2776
|
+
const l = Mt(E(a));
|
|
2779
2777
|
if (l) {
|
|
2780
|
-
const
|
|
2781
|
-
if (Ct.get(
|
|
2782
|
-
if (o.value) return
|
|
2778
|
+
const i = l;
|
|
2779
|
+
if (Ct.get(i) || Ct.set(i, i.style.overflow), i.style.overflow !== "hidden" && (n = i.style.overflow), i.style.overflow === "hidden") return o.value = !0;
|
|
2780
|
+
if (o.value) return i.style.overflow = "hidden";
|
|
2783
2781
|
}
|
|
2784
2782
|
}, { immediate: !0 });
|
|
2785
|
-
const
|
|
2786
|
-
const
|
|
2787
|
-
!
|
|
2783
|
+
const s = () => {
|
|
2784
|
+
const a = Mt(E(e));
|
|
2785
|
+
!a || o.value || (a.style.overflow = "hidden", o.value = !0);
|
|
2788
2786
|
}, r = () => {
|
|
2789
|
-
const
|
|
2790
|
-
!
|
|
2787
|
+
const a = Mt(E(e));
|
|
2788
|
+
!a || !o.value || (a.style.overflow = n, Ct.delete(a), o.value = !1);
|
|
2791
2789
|
};
|
|
2792
|
-
return gn(r),
|
|
2790
|
+
return gn(r), $({
|
|
2793
2791
|
get() {
|
|
2794
2792
|
return o.value;
|
|
2795
2793
|
},
|
|
2796
|
-
set(
|
|
2797
|
-
|
|
2794
|
+
set(a) {
|
|
2795
|
+
a ? s() : r();
|
|
2798
2796
|
}
|
|
2799
2797
|
});
|
|
2800
2798
|
}
|
|
@@ -2804,8 +2802,8 @@ const Et = /* @__PURE__ */ new WeakMap(), na = {
|
|
|
2804
2802
|
let n;
|
|
2805
2803
|
if (typeof t.value == "function") n = Jt(e, t.value, { capture: o });
|
|
2806
2804
|
else {
|
|
2807
|
-
const [
|
|
2808
|
-
n = Jt(e,
|
|
2805
|
+
const [s, r] = t.value;
|
|
2806
|
+
n = Jt(e, s, Object.assign({ capture: o }, r));
|
|
2809
2807
|
}
|
|
2810
2808
|
Et.set(e, n);
|
|
2811
2809
|
},
|
|
@@ -2820,8 +2818,8 @@ function oa() {
|
|
|
2820
2818
|
return (o, n) => {
|
|
2821
2819
|
if (t.value = n.value, e) return;
|
|
2822
2820
|
e = !0;
|
|
2823
|
-
const
|
|
2824
|
-
ne(t, (r) =>
|
|
2821
|
+
const s = ta(o, n.value);
|
|
2822
|
+
ne(t, (r) => s.value = r);
|
|
2825
2823
|
};
|
|
2826
2824
|
}
|
|
2827
2825
|
oa();
|
|
@@ -2858,7 +2856,7 @@ const la = {
|
|
|
2858
2856
|
open: !1,
|
|
2859
2857
|
loading: !1,
|
|
2860
2858
|
results: e.options
|
|
2861
|
-
}),
|
|
2859
|
+
}), s = () => i(), r = async () => {
|
|
2862
2860
|
if (n.open = !0, n.activeItemIndex = null, e.filterFunction) {
|
|
2863
2861
|
e.isAsync && (n.loading = !0);
|
|
2864
2862
|
try {
|
|
@@ -2870,15 +2868,15 @@ const la = {
|
|
|
2870
2868
|
e.isAsync && (n.loading = !1);
|
|
2871
2869
|
}
|
|
2872
2870
|
} else
|
|
2873
|
-
|
|
2874
|
-
},
|
|
2875
|
-
t.value = m, o.value = m,
|
|
2871
|
+
u();
|
|
2872
|
+
}, a = (m) => {
|
|
2873
|
+
t.value = m, o.value = m, i(m);
|
|
2876
2874
|
}, l = () => {
|
|
2877
2875
|
const m = e.options?.indexOf(t.value ?? "") ?? -1;
|
|
2878
2876
|
n.activeItemIndex = e.isAsync ? null : m >= 0 ? m : null, n.open = !0, n.results = e.isAsync ? [] : e.options;
|
|
2879
|
-
},
|
|
2877
|
+
}, i = (m) => {
|
|
2880
2878
|
n.activeItemIndex = null, n.open = !1, e.options?.includes(m || t.value || "") || (t.value = o.value);
|
|
2881
|
-
},
|
|
2879
|
+
}, u = () => {
|
|
2882
2880
|
t.value ? n.results = e.options?.filter((m) => m.toLowerCase().includes((t.value ?? "").toLowerCase())) : n.results = e.options;
|
|
2883
2881
|
}, d = () => {
|
|
2884
2882
|
const m = n.results?.length || 0;
|
|
@@ -2897,7 +2895,7 @@ const la = {
|
|
|
2897
2895
|
}, y = () => {
|
|
2898
2896
|
if (n.results) {
|
|
2899
2897
|
const m = n.activeItemIndex || 0, I = n.results[m];
|
|
2900
|
-
|
|
2898
|
+
a(I);
|
|
2901
2899
|
}
|
|
2902
2900
|
n.activeItemIndex = 0;
|
|
2903
2901
|
};
|
|
@@ -2919,8 +2917,8 @@ const la = {
|
|
|
2919
2917
|
Ne(d, ["down"]),
|
|
2920
2918
|
Ne(p, ["up"]),
|
|
2921
2919
|
Ne(y, ["enter"]),
|
|
2922
|
-
Ne(
|
|
2923
|
-
Ne(
|
|
2920
|
+
Ne(s, ["esc"]),
|
|
2921
|
+
Ne(s, ["tab"])
|
|
2924
2922
|
]
|
|
2925
2923
|
}, null, 40, ra), [
|
|
2926
2924
|
[we, t.value]
|
|
@@ -2929,7 +2927,7 @@ const la = {
|
|
|
2929
2927
|
n.loading ? (h(), x("li", ua, "Loading results...")) : (h(!0), x(X, { key: 1 }, pe(n.results, (b, f) => (h(), x("li", {
|
|
2930
2928
|
key: b,
|
|
2931
2929
|
class: se(["autocomplete-result", { "is-active": f === n.activeItemIndex }]),
|
|
2932
|
-
onClick: Ie((g) =>
|
|
2930
|
+
onClick: Ie((g) => a(b), ["stop"])
|
|
2933
2931
|
}, N(b), 11, ca))), 128))
|
|
2934
2932
|
], 512), [
|
|
2935
2933
|
[Ce, n.open]
|
|
@@ -2937,10 +2935,10 @@ const la = {
|
|
|
2937
2935
|
w("label", null, N(e.label), 1)
|
|
2938
2936
|
])
|
|
2939
2937
|
], 2)), [
|
|
2940
|
-
[V(na),
|
|
2938
|
+
[V(na), s]
|
|
2941
2939
|
]);
|
|
2942
2940
|
}
|
|
2943
|
-
}), fa = /* @__PURE__ */
|
|
2941
|
+
}), fa = /* @__PURE__ */ $e(da, [["__scopeId", "data-v-c823d475"]]);
|
|
2944
2942
|
function bn(e, t) {
|
|
2945
2943
|
return vt() ? (pt(e, t), !0) : !1;
|
|
2946
2944
|
}
|
|
@@ -2964,22 +2962,22 @@ function Ge(e) {
|
|
|
2964
2962
|
return (t = o?.$el) !== null && t !== void 0 ? t : o;
|
|
2965
2963
|
}
|
|
2966
2964
|
function Ke(...e) {
|
|
2967
|
-
const t = (n,
|
|
2968
|
-
const n = ut(E(e[0])).filter((
|
|
2969
|
-
return n.every((
|
|
2965
|
+
const t = (n, s, r, a) => (n.addEventListener(s, r, a), () => n.removeEventListener(s, r, a)), o = $(() => {
|
|
2966
|
+
const n = ut(E(e[0])).filter((s) => s != null);
|
|
2967
|
+
return n.every((s) => typeof s != "string") ? n : void 0;
|
|
2970
2968
|
});
|
|
2971
2969
|
return wa(() => {
|
|
2972
|
-
var n,
|
|
2970
|
+
var n, s;
|
|
2973
2971
|
return [
|
|
2974
|
-
(n = (
|
|
2972
|
+
(n = (s = o.value) === null || s === void 0 ? void 0 : s.map((r) => Ge(r))) !== null && n !== void 0 ? n : [qe].filter((r) => r != null),
|
|
2975
2973
|
ut(E(o.value ? e[1] : e[0])),
|
|
2976
2974
|
ut(V(o.value ? e[2] : e[1])),
|
|
2977
2975
|
E(o.value ? e[3] : e[2])
|
|
2978
2976
|
];
|
|
2979
|
-
}, ([n,
|
|
2980
|
-
if (!n?.length || !
|
|
2981
|
-
const
|
|
2982
|
-
|
|
2977
|
+
}, ([n, s, r, a], l, i) => {
|
|
2978
|
+
if (!n?.length || !s?.length || !r?.length) return;
|
|
2979
|
+
const u = ha(a) ? { ...a } : a, d = n.flatMap((p) => s.flatMap((y) => r.map((m) => t(p, y, m, u))));
|
|
2980
|
+
i(() => {
|
|
2983
2981
|
d.forEach((p) => p());
|
|
2984
2982
|
});
|
|
2985
2983
|
}, { flush: "post" });
|
|
@@ -2994,40 +2992,40 @@ function ya() {
|
|
|
2994
2992
|
// @__NO_SIDE_EFFECTS__
|
|
2995
2993
|
function ba(e) {
|
|
2996
2994
|
const t = /* @__PURE__ */ ya();
|
|
2997
|
-
return
|
|
2995
|
+
return $(() => (t.value, !!e()));
|
|
2998
2996
|
}
|
|
2999
2997
|
function xa(e, t, o = {}) {
|
|
3000
|
-
const { window: n = qe, ...
|
|
2998
|
+
const { window: n = qe, ...s } = o;
|
|
3001
2999
|
let r;
|
|
3002
|
-
const
|
|
3000
|
+
const a = /* @__PURE__ */ ba(() => n && "MutationObserver" in n), l = () => {
|
|
3003
3001
|
r && (r.disconnect(), r = void 0);
|
|
3004
|
-
},
|
|
3002
|
+
}, i = ne($(() => {
|
|
3005
3003
|
const p = ut(E(e)).map(Ge).filter(pa);
|
|
3006
3004
|
return new Set(p);
|
|
3007
3005
|
}), (p) => {
|
|
3008
|
-
l(),
|
|
3006
|
+
l(), a.value && p.size && (r = new MutationObserver(t), p.forEach((y) => r.observe(y, s)));
|
|
3009
3007
|
}, {
|
|
3010
3008
|
immediate: !0,
|
|
3011
3009
|
flush: "post"
|
|
3012
|
-
}),
|
|
3013
|
-
|
|
3010
|
+
}), u = () => r?.takeRecords(), d = () => {
|
|
3011
|
+
i(), l();
|
|
3014
3012
|
};
|
|
3015
3013
|
return bn(d), {
|
|
3016
|
-
isSupported:
|
|
3014
|
+
isSupported: a,
|
|
3017
3015
|
stop: d,
|
|
3018
|
-
takeRecords:
|
|
3016
|
+
takeRecords: u
|
|
3019
3017
|
};
|
|
3020
3018
|
}
|
|
3021
3019
|
function ka(e, t, o = {}) {
|
|
3022
|
-
const { window: n = qe, document:
|
|
3023
|
-
if (!n || !
|
|
3024
|
-
let
|
|
3020
|
+
const { window: n = qe, document: s = n?.document, flush: r = "sync" } = o;
|
|
3021
|
+
if (!n || !s) return ga;
|
|
3022
|
+
let a;
|
|
3025
3023
|
const l = (d) => {
|
|
3026
|
-
|
|
3027
|
-
},
|
|
3024
|
+
a?.(), a = d;
|
|
3025
|
+
}, i = ht(() => {
|
|
3028
3026
|
const d = Ge(e);
|
|
3029
3027
|
if (d) {
|
|
3030
|
-
const { stop: p } = xa(
|
|
3028
|
+
const { stop: p } = xa(s, (y) => {
|
|
3031
3029
|
y.map((m) => [...m.removedNodes]).flat().some((m) => m === d || m.contains(d)) && t(y);
|
|
3032
3030
|
}, {
|
|
3033
3031
|
window: n,
|
|
@@ -3036,65 +3034,65 @@ function ka(e, t, o = {}) {
|
|
|
3036
3034
|
});
|
|
3037
3035
|
l(p);
|
|
3038
3036
|
}
|
|
3039
|
-
}, { flush: r }),
|
|
3040
|
-
|
|
3037
|
+
}, { flush: r }), u = () => {
|
|
3038
|
+
i(), l();
|
|
3041
3039
|
};
|
|
3042
|
-
return bn(
|
|
3040
|
+
return bn(u), u;
|
|
3043
3041
|
}
|
|
3044
3042
|
// @__NO_SIDE_EFFECTS__
|
|
3045
3043
|
function Ia(e = {}) {
|
|
3046
3044
|
var t;
|
|
3047
|
-
const { window: o = qe, deep: n = !0, triggerOnRemoval:
|
|
3048
|
-
let
|
|
3045
|
+
const { window: o = qe, deep: n = !0, triggerOnRemoval: s = !1 } = e, r = (t = e.document) !== null && t !== void 0 ? t : o?.document, a = () => {
|
|
3046
|
+
let u = r?.activeElement;
|
|
3049
3047
|
if (n)
|
|
3050
|
-
for (var d;
|
|
3051
|
-
return
|
|
3052
|
-
}, l = ue(),
|
|
3053
|
-
l.value =
|
|
3048
|
+
for (var d; u?.shadowRoot; ) u = u == null || (d = u.shadowRoot) === null || d === void 0 ? void 0 : d.activeElement;
|
|
3049
|
+
return u;
|
|
3050
|
+
}, l = ue(), i = () => {
|
|
3051
|
+
l.value = a();
|
|
3054
3052
|
};
|
|
3055
3053
|
if (o) {
|
|
3056
|
-
const
|
|
3054
|
+
const u = {
|
|
3057
3055
|
capture: !0,
|
|
3058
3056
|
passive: !0
|
|
3059
3057
|
};
|
|
3060
3058
|
Ke(o, "blur", (d) => {
|
|
3061
|
-
d.relatedTarget === null &&
|
|
3062
|
-
},
|
|
3059
|
+
d.relatedTarget === null && i();
|
|
3060
|
+
}, u), Ke(o, "focus", i, u);
|
|
3063
3061
|
}
|
|
3064
|
-
return
|
|
3062
|
+
return s && ka(l, i, { document: r }), i(), l;
|
|
3065
3063
|
}
|
|
3066
3064
|
const Ma = "focusin", Ca = "focusout", Ea = ":focus-within";
|
|
3067
3065
|
function Aa(e, t = {}) {
|
|
3068
|
-
const { window: o = qe } = t, n =
|
|
3066
|
+
const { window: o = qe } = t, n = $(() => Ge(e)), s = ue(!1), r = $(() => s.value);
|
|
3069
3067
|
if (!o || !(/* @__PURE__ */ Ia(t)).value) return { focused: r };
|
|
3070
|
-
const
|
|
3071
|
-
return Ke(n, Ma, () =>
|
|
3072
|
-
var l,
|
|
3073
|
-
return
|
|
3074
|
-
},
|
|
3075
|
-
}
|
|
3076
|
-
function
|
|
3077
|
-
const n = R(!1),
|
|
3068
|
+
const a = { passive: !0 };
|
|
3069
|
+
return Ke(n, Ma, () => s.value = !0, a), Ke(n, Ca, () => {
|
|
3070
|
+
var l, i, u;
|
|
3071
|
+
return s.value = (l = (i = n.value) === null || i === void 0 || (u = i.matches) === null || u === void 0 ? void 0 : u.call(i, Ea)) !== null && l !== void 0 ? l : !1;
|
|
3072
|
+
}, a), { focused: r };
|
|
3073
|
+
}
|
|
3074
|
+
function Ta(e, { window: t = qe, scrollTarget: o } = {}) {
|
|
3075
|
+
const n = R(!1), s = () => {
|
|
3078
3076
|
if (!t) return;
|
|
3079
|
-
const r = t.document,
|
|
3080
|
-
if (!
|
|
3077
|
+
const r = t.document, a = Ge(e);
|
|
3078
|
+
if (!a)
|
|
3081
3079
|
n.value = !1;
|
|
3082
3080
|
else {
|
|
3083
|
-
const l =
|
|
3081
|
+
const l = a.getBoundingClientRect();
|
|
3084
3082
|
n.value = l.top <= (t.innerHeight || r.documentElement.clientHeight) && l.left <= (t.innerWidth || r.documentElement.clientWidth) && l.bottom >= 0 && l.right >= 0;
|
|
3085
3083
|
}
|
|
3086
3084
|
};
|
|
3087
3085
|
return ne(
|
|
3088
3086
|
() => Ge(e),
|
|
3089
|
-
() =>
|
|
3087
|
+
() => s(),
|
|
3090
3088
|
{ immediate: !0, flush: "post" }
|
|
3091
|
-
), t && Ke(o || t, "scroll",
|
|
3089
|
+
), t && Ke(o || t, "scroll", s, {
|
|
3092
3090
|
capture: !1,
|
|
3093
3091
|
passive: !0
|
|
3094
3092
|
}), n;
|
|
3095
3093
|
}
|
|
3096
3094
|
const De = (e) => {
|
|
3097
|
-
let t =
|
|
3095
|
+
let t = Ta(e).value;
|
|
3098
3096
|
return t = t && e.offsetHeight > 0, t;
|
|
3099
3097
|
}, Se = (e) => e.tabIndex >= 0, Qt = (e) => {
|
|
3100
3098
|
const t = e.target;
|
|
@@ -3112,20 +3110,20 @@ const De = (e) => {
|
|
|
3112
3110
|
o && (t = o);
|
|
3113
3111
|
}
|
|
3114
3112
|
return t && (!Se(t) || !De(t)) ? Bt(t) : t;
|
|
3115
|
-
},
|
|
3113
|
+
}, $a = (e) => {
|
|
3116
3114
|
const t = e.target;
|
|
3117
3115
|
let o;
|
|
3118
3116
|
if (t instanceof HTMLTableCellElement) {
|
|
3119
3117
|
const n = t.parentElement?.parentElement;
|
|
3120
3118
|
if (n) {
|
|
3121
|
-
const
|
|
3122
|
-
|
|
3119
|
+
const s = n.firstElementChild?.children[t.cellIndex];
|
|
3120
|
+
s && (o = s);
|
|
3123
3121
|
}
|
|
3124
3122
|
} else if (t instanceof HTMLTableRowElement) {
|
|
3125
3123
|
const n = t.parentElement;
|
|
3126
3124
|
if (n) {
|
|
3127
|
-
const
|
|
3128
|
-
|
|
3125
|
+
const s = n.firstElementChild;
|
|
3126
|
+
s && (o = s);
|
|
3129
3127
|
}
|
|
3130
3128
|
}
|
|
3131
3129
|
return o && (!Se(o) || !De(o)) ? Ft(o) : o;
|
|
@@ -3151,14 +3149,14 @@ const De = (e) => {
|
|
|
3151
3149
|
if (t instanceof HTMLTableCellElement) {
|
|
3152
3150
|
const n = t.parentElement?.parentElement;
|
|
3153
3151
|
if (n) {
|
|
3154
|
-
const
|
|
3155
|
-
|
|
3152
|
+
const s = n.lastElementChild?.children[t.cellIndex];
|
|
3153
|
+
s && (o = s);
|
|
3156
3154
|
}
|
|
3157
3155
|
} else if (t instanceof HTMLTableRowElement) {
|
|
3158
3156
|
const n = t.parentElement;
|
|
3159
3157
|
if (n) {
|
|
3160
|
-
const
|
|
3161
|
-
|
|
3158
|
+
const s = n.lastElementChild;
|
|
3159
|
+
s && (o = s);
|
|
3162
3160
|
}
|
|
3163
3161
|
}
|
|
3164
3162
|
return o && (!Se(o) || !De(o)) ? Bt(o) : o;
|
|
@@ -3203,7 +3201,7 @@ const De = (e) => {
|
|
|
3203
3201
|
e.preventDefault(), e.stopPropagation(), t && t.focus();
|
|
3204
3202
|
},
|
|
3205
3203
|
"keydown.control.up": (e) => {
|
|
3206
|
-
const t =
|
|
3204
|
+
const t = $a(e);
|
|
3207
3205
|
t && (e.preventDefault(), e.stopPropagation(), t.focus());
|
|
3208
3206
|
},
|
|
3209
3207
|
"keydown.control.down": (e) => {
|
|
@@ -3250,38 +3248,38 @@ const De = (e) => {
|
|
|
3250
3248
|
}
|
|
3251
3249
|
};
|
|
3252
3250
|
function Ra(e) {
|
|
3253
|
-
const t = (
|
|
3251
|
+
const t = (a) => {
|
|
3254
3252
|
let l = null;
|
|
3255
|
-
return
|
|
3256
|
-
}, o = (
|
|
3257
|
-
const l = t(
|
|
3258
|
-
let
|
|
3259
|
-
if (typeof
|
|
3260
|
-
|
|
3261
|
-
else if (Array.isArray(
|
|
3262
|
-
for (const
|
|
3263
|
-
|
|
3264
|
-
else if (
|
|
3265
|
-
|
|
3266
|
-
else if (
|
|
3267
|
-
if (Array.isArray(
|
|
3268
|
-
for (const
|
|
3269
|
-
|
|
3253
|
+
return a.parent && (typeof a.parent == "string" ? l = document.querySelector(a.parent) : a.parent instanceof HTMLElement ? l = a.parent : l = a.parent.value), l;
|
|
3254
|
+
}, o = (a) => {
|
|
3255
|
+
const l = t(a);
|
|
3256
|
+
let i = [];
|
|
3257
|
+
if (typeof a.selectors == "string")
|
|
3258
|
+
i = Array.from(l ? l.querySelectorAll(a.selectors) : document.querySelectorAll(a.selectors));
|
|
3259
|
+
else if (Array.isArray(a.selectors))
|
|
3260
|
+
for (const u of a.selectors)
|
|
3261
|
+
u instanceof HTMLElement ? i.push(u) : i.push(u.$el);
|
|
3262
|
+
else if (a.selectors instanceof HTMLElement)
|
|
3263
|
+
i.push(a.selectors);
|
|
3264
|
+
else if (a.selectors?.value)
|
|
3265
|
+
if (Array.isArray(a.selectors.value))
|
|
3266
|
+
for (const u of a.selectors.value)
|
|
3267
|
+
u instanceof HTMLElement ? i.push(u) : i.push(u.$el);
|
|
3270
3268
|
else
|
|
3271
|
-
|
|
3272
|
-
return
|
|
3273
|
-
}, n = (
|
|
3274
|
-
const l = t(
|
|
3275
|
-
let
|
|
3276
|
-
return
|
|
3277
|
-
},
|
|
3278
|
-
const
|
|
3279
|
-
if (at.includes(
|
|
3280
|
-
const
|
|
3281
|
-
for (const d of Object.keys(
|
|
3269
|
+
i.push(a.selectors.value);
|
|
3270
|
+
return i;
|
|
3271
|
+
}, n = (a) => {
|
|
3272
|
+
const l = t(a);
|
|
3273
|
+
let i = [];
|
|
3274
|
+
return a.selectors ? i = o(a) : l && (i = Array.from(l.children).filter((u) => Se(u) && De(u))), i;
|
|
3275
|
+
}, s = (a) => (l) => {
|
|
3276
|
+
const i = Sa[l.key] || l.key.toLowerCase();
|
|
3277
|
+
if (at.includes(i)) return;
|
|
3278
|
+
const u = a.handlers || xn;
|
|
3279
|
+
for (const d of Object.keys(u)) {
|
|
3282
3280
|
const [p, ...y] = d.split(".");
|
|
3283
|
-
if (p === "keydown" && y.includes(
|
|
3284
|
-
const m =
|
|
3281
|
+
if (p === "keydown" && y.includes(i)) {
|
|
3282
|
+
const m = u[d], I = y.filter((f) => at.includes(f)), b = at.some((f) => {
|
|
3285
3283
|
const g = f.charAt(0).toUpperCase() + f.slice(1);
|
|
3286
3284
|
return l.getModifierState(g);
|
|
3287
3285
|
});
|
|
@@ -3299,18 +3297,18 @@ function Ra(e) {
|
|
|
3299
3297
|
}
|
|
3300
3298
|
}, r = [];
|
|
3301
3299
|
Ee(() => {
|
|
3302
|
-
for (const
|
|
3303
|
-
const l = t(
|
|
3300
|
+
for (const a of e) {
|
|
3301
|
+
const l = t(a), i = n(a), u = s(a), d = l ? [l] : i;
|
|
3304
3302
|
for (const p of d) {
|
|
3305
3303
|
const { focused: y } = Aa(R(p)), m = ne(y, (I) => {
|
|
3306
|
-
I ? p.addEventListener("keydown",
|
|
3304
|
+
I ? p.addEventListener("keydown", u) : p.removeEventListener("keydown", u);
|
|
3307
3305
|
});
|
|
3308
3306
|
r.push(m);
|
|
3309
3307
|
}
|
|
3310
3308
|
}
|
|
3311
3309
|
}), an(() => {
|
|
3312
|
-
for (const
|
|
3313
|
-
|
|
3310
|
+
for (const a of r)
|
|
3311
|
+
a();
|
|
3314
3312
|
});
|
|
3315
3313
|
}
|
|
3316
3314
|
const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
@@ -3337,35 +3335,35 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3337
3335
|
}),
|
|
3338
3336
|
emits: ["update:modelValue"],
|
|
3339
3337
|
setup(e, { expose: t }) {
|
|
3340
|
-
const o = Me(e, "modelValue"), n = R(new Date(o.value)),
|
|
3338
|
+
const o = Me(e, "modelValue"), n = R(new Date(o.value)), s = R(n.value.getMonth()), r = R(n.value.getFullYear()), a = R([]), l = fe("datepicker");
|
|
3341
3339
|
Ee(async () => {
|
|
3342
|
-
|
|
3340
|
+
i(), await ft();
|
|
3343
3341
|
const C = document.getElementsByClassName("selectedDate");
|
|
3344
3342
|
if (C.length > 0)
|
|
3345
3343
|
C[0].focus();
|
|
3346
3344
|
else {
|
|
3347
|
-
const
|
|
3348
|
-
|
|
3345
|
+
const A = document.getElementsByClassName("todaysDate");
|
|
3346
|
+
A.length > 0 && A[0].focus();
|
|
3349
3347
|
}
|
|
3350
3348
|
});
|
|
3351
|
-
const
|
|
3352
|
-
|
|
3353
|
-
const C = new Date(r.value,
|
|
3349
|
+
const i = () => {
|
|
3350
|
+
a.value = [];
|
|
3351
|
+
const C = new Date(r.value, s.value, 1), A = C.getDay(), L = C.setDate(C.getDate() - A);
|
|
3354
3352
|
for (const S of Array(43).keys())
|
|
3355
|
-
|
|
3353
|
+
a.value.push(L + S * 864e5);
|
|
3356
3354
|
};
|
|
3357
|
-
ne([
|
|
3358
|
-
const
|
|
3359
|
-
|
|
3355
|
+
ne([s, r], i);
|
|
3356
|
+
const u = () => r.value -= 1, d = () => r.value += 1, p = () => {
|
|
3357
|
+
s.value == 0 ? (s.value = 11, u()) : s.value -= 1;
|
|
3360
3358
|
}, y = () => {
|
|
3361
|
-
|
|
3359
|
+
s.value == 11 ? (s.value = 0, d()) : s.value += 1;
|
|
3362
3360
|
}, m = (C) => {
|
|
3363
|
-
const
|
|
3364
|
-
if (
|
|
3365
|
-
return
|
|
3366
|
-
}, I = (C) => new Date(C).toDateString() === new Date(n.value).toDateString(), b = (C,
|
|
3367
|
-
o.value = n.value = new Date(
|
|
3368
|
-
}, k =
|
|
3361
|
+
const A = /* @__PURE__ */ new Date();
|
|
3362
|
+
if (s.value === A.getMonth())
|
|
3363
|
+
return A.toDateString() === new Date(C).toDateString();
|
|
3364
|
+
}, I = (C) => new Date(C).toDateString() === new Date(n.value).toDateString(), b = (C, A) => (C - 1) * ln + A, f = (C, A) => a.value[b(C, A)], g = (C) => {
|
|
3365
|
+
o.value = n.value = new Date(a.value[C]);
|
|
3366
|
+
}, k = $(() => new Date(r.value, s.value, 1).toLocaleDateString(void 0, {
|
|
3369
3367
|
year: "numeric",
|
|
3370
3368
|
month: "long"
|
|
3371
3369
|
}));
|
|
@@ -3376,7 +3374,7 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3376
3374
|
handlers: {
|
|
3377
3375
|
...xn,
|
|
3378
3376
|
"keydown.pageup": p,
|
|
3379
|
-
"keydown.shift.pageup":
|
|
3377
|
+
"keydown.shift.pageup": u,
|
|
3380
3378
|
"keydown.pagedown": y,
|
|
3381
3379
|
"keydown.shift.pagedown": d,
|
|
3382
3380
|
// TODO: this is a hack to override the stonecrop enter handler;
|
|
@@ -3385,7 +3383,7 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3385
3383
|
}
|
|
3386
3384
|
}
|
|
3387
3385
|
}
|
|
3388
|
-
]), t({ currentMonth:
|
|
3386
|
+
]), t({ currentMonth: s, currentYear: r, selectedDate: n }), (C, A) => e.mode === "display" || e.mode === "read" ? (h(), x(X, { key: 0 }, [
|
|
3389
3387
|
w("span", La, N(o.value ? new Date(o.value).toLocaleDateString() : ""), 1),
|
|
3390
3388
|
e.label ? (h(), x("label", Ha, N(e.label), 1)) : Y("", !0)
|
|
3391
3389
|
], 64)) : (h(), x("div", Va, [
|
|
@@ -3404,7 +3402,7 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3404
3402
|
onClick: y
|
|
3405
3403
|
}, ">")
|
|
3406
3404
|
]),
|
|
3407
|
-
|
|
3405
|
+
A[0] || (A[0] = w("tr", { class: "days-header" }, [
|
|
3408
3406
|
w("td", null, "M"),
|
|
3409
3407
|
w("td", null, "T"),
|
|
3410
3408
|
w("td", null, "W"),
|
|
@@ -3433,7 +3431,7 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3433
3431
|
])
|
|
3434
3432
|
], 512));
|
|
3435
3433
|
}
|
|
3436
|
-
}), Fa = /* @__PURE__ */
|
|
3434
|
+
}), Fa = /* @__PURE__ */ $e(Ba, [["__scopeId", "data-v-9da05d06"]]), Za = /* @__PURE__ */ oe({
|
|
3437
3435
|
__name: "CollapseButton",
|
|
3438
3436
|
props: {
|
|
3439
3437
|
collapsed: { type: Boolean }
|
|
@@ -3443,7 +3441,7 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3443
3441
|
class: se(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
|
|
3444
3442
|
}, "×", 2));
|
|
3445
3443
|
}
|
|
3446
|
-
}), Na = /* @__PURE__ */
|
|
3444
|
+
}), Na = /* @__PURE__ */ $e(Za, [["__scopeId", "data-v-6f1c1b45"]]), Ua = { class: "aform" }, Wa = {
|
|
3447
3445
|
key: 0,
|
|
3448
3446
|
class: "aform-nested-section"
|
|
3449
3447
|
}, Ga = {
|
|
@@ -3460,19 +3458,19 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3460
3458
|
}),
|
|
3461
3459
|
emits: /* @__PURE__ */ xe(["update:schema", "update:data"], ["update:data"]),
|
|
3462
3460
|
setup(e, { emit: t }) {
|
|
3463
|
-
const o = t, n = Me(e, "data"),
|
|
3461
|
+
const o = t, n = Me(e, "data"), s = R({});
|
|
3464
3462
|
ne(
|
|
3465
3463
|
() => n.value,
|
|
3466
3464
|
(p) => {
|
|
3467
3465
|
!e.schema || !p || e.schema.forEach((y) => {
|
|
3468
|
-
"schema" in y && Array.isArray(y.schema) && y.schema.length > 0 && (
|
|
3466
|
+
"schema" in y && Array.isArray(y.schema) && y.schema.length > 0 && (s.value[y.fieldname] = p[y.fieldname] ?? {});
|
|
3469
3467
|
});
|
|
3470
3468
|
},
|
|
3471
3469
|
{ immediate: !0 }
|
|
3472
3470
|
);
|
|
3473
3471
|
const r = (p, y) => {
|
|
3474
|
-
|
|
3475
|
-
},
|
|
3472
|
+
s.value[p] = y, n.value && (n.value[p] = y, o("update:data", { ...n.value }));
|
|
3473
|
+
}, a = (p) => {
|
|
3476
3474
|
const y = {};
|
|
3477
3475
|
for (const [m, I] of Object.entries(p))
|
|
3478
3476
|
["component", "fieldtype", "mode"].includes(m) || (y[m] = I);
|
|
@@ -3481,14 +3479,14 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3481
3479
|
(!m || Array.isArray(m) && m.length === 0) && (y.rows = n.value[p.fieldname] || []);
|
|
3482
3480
|
}
|
|
3483
3481
|
return y;
|
|
3484
|
-
}, l =
|
|
3485
|
-
function
|
|
3482
|
+
}, l = $(() => e.mode ?? "edit");
|
|
3483
|
+
function i(p) {
|
|
3486
3484
|
const y = p.mode;
|
|
3487
3485
|
return y || l.value;
|
|
3488
3486
|
}
|
|
3489
|
-
const
|
|
3487
|
+
const u = R([]);
|
|
3490
3488
|
ht(() => {
|
|
3491
|
-
e.schema &&
|
|
3489
|
+
e.schema && u.value.length !== e.schema.length && (u.value = e.schema.map((p, y) => $({
|
|
3492
3490
|
get() {
|
|
3493
3491
|
return n.value?.[e.schema[y].fieldname];
|
|
3494
3492
|
},
|
|
@@ -3498,14 +3496,14 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3498
3496
|
}
|
|
3499
3497
|
})));
|
|
3500
3498
|
});
|
|
3501
|
-
const d =
|
|
3499
|
+
const d = $(() => u.value);
|
|
3502
3500
|
return (p, y) => (h(), x("form", Ua, [
|
|
3503
3501
|
(h(!0), x(X, null, pe(e.schema, (m, I) => (h(), x(X, { key: I }, [
|
|
3504
3502
|
"schema" in m && Array.isArray(m.schema) && m.schema.length > 0 ? (h(), x("div", Wa, [
|
|
3505
3503
|
m.label && !("collapsible" in m) ? (h(), x("h4", Ga, N(m.label), 1)) : Y("", !0),
|
|
3506
3504
|
(h(), ve(Oe(m.component ?? "AForm"), {
|
|
3507
|
-
data:
|
|
3508
|
-
mode:
|
|
3505
|
+
data: s.value[m.fieldname],
|
|
3506
|
+
mode: i(m),
|
|
3509
3507
|
schema: m.schema,
|
|
3510
3508
|
label: m.label,
|
|
3511
3509
|
collapsible: m.collapsible,
|
|
@@ -3517,12 +3515,12 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3517
3515
|
"onUpdate:modelValue": (b) => d.value[I].value = b,
|
|
3518
3516
|
schema: m,
|
|
3519
3517
|
data: n.value[m.fieldname],
|
|
3520
|
-
mode:
|
|
3521
|
-
}, { ref_for: !0 },
|
|
3518
|
+
mode: i(m)
|
|
3519
|
+
}, { ref_for: !0 }, a(m)), null, 16, ["modelValue", "onUpdate:modelValue", "schema", "data", "mode"]))
|
|
3522
3520
|
], 64))), 128))
|
|
3523
3521
|
]));
|
|
3524
3522
|
}
|
|
3525
|
-
}), kn = /* @__PURE__ */
|
|
3523
|
+
}), kn = /* @__PURE__ */ $e(za, [["__scopeId", "data-v-8d4cd672"]]), qa = /* @__PURE__ */ oe({
|
|
3526
3524
|
__name: "AFieldset",
|
|
3527
3525
|
props: {
|
|
3528
3526
|
schema: {},
|
|
@@ -3533,10 +3531,10 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3533
3531
|
mode: { default: "edit" }
|
|
3534
3532
|
},
|
|
3535
3533
|
setup(e, { expose: t }) {
|
|
3536
|
-
const o = R(!1), n = R(e.data || []),
|
|
3537
|
-
|
|
3534
|
+
const o = R(!1), n = R(e.data || []), s = R(e.schema), r = (a) => {
|
|
3535
|
+
a.preventDefault(), e.collapsible && (o.value = !o.value);
|
|
3538
3536
|
};
|
|
3539
|
-
return t({ collapsed: o }), (
|
|
3537
|
+
return t({ collapsed: o }), (a, l) => (h(), x("fieldset", null, [
|
|
3540
3538
|
e.label || e.collapsible ? (h(), x("legend", {
|
|
3541
3539
|
key: 0,
|
|
3542
3540
|
onClick: r,
|
|
@@ -3548,11 +3546,11 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3548
3546
|
collapsed: o.value
|
|
3549
3547
|
}, null, 8, ["collapsed"])) : Y("", !0)
|
|
3550
3548
|
], 32)) : Y("", !0),
|
|
3551
|
-
he(
|
|
3549
|
+
he(a.$slots, "default", { collapsed: o.value }, () => [
|
|
3552
3550
|
K(At(kn, {
|
|
3553
3551
|
data: n.value,
|
|
3554
|
-
"onUpdate:data": l[0] || (l[0] = (
|
|
3555
|
-
schema:
|
|
3552
|
+
"onUpdate:data": l[0] || (l[0] = (i) => n.value = i),
|
|
3553
|
+
schema: s.value,
|
|
3556
3554
|
mode: e.mode
|
|
3557
3555
|
}, null, 8, ["data", "schema", "mode"]), [
|
|
3558
3556
|
[Ce, !o.value]
|
|
@@ -3560,7 +3558,7 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3560
3558
|
], !0)
|
|
3561
3559
|
]));
|
|
3562
3560
|
}
|
|
3563
|
-
}), Ya = /* @__PURE__ */
|
|
3561
|
+
}), Ya = /* @__PURE__ */ $e(qa, [["__scopeId", "data-v-3cefeba6"]]), Xa = { class: "aform_form-element aform_file-attach aform__grid--full" }, ja = {
|
|
3564
3562
|
key: 0,
|
|
3565
3563
|
class: "aform_file-attach-feedback"
|
|
3566
3564
|
}, Ja = {
|
|
@@ -3581,19 +3579,19 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3581
3579
|
validation: {}
|
|
3582
3580
|
},
|
|
3583
3581
|
setup(e) {
|
|
3584
|
-
const { files: t, open: o, reset: n, onChange:
|
|
3585
|
-
const
|
|
3586
|
-
return `${
|
|
3582
|
+
const { files: t, open: o, reset: n, onChange: s } = ea(), r = $(() => {
|
|
3583
|
+
const a = t.value?.length ?? 0;
|
|
3584
|
+
return `${a} ${a === 1 ? "file" : "files"}`;
|
|
3587
3585
|
});
|
|
3588
|
-
return
|
|
3586
|
+
return s((a) => a), (a, l) => (h(), x("div", Xa, [
|
|
3589
3587
|
e.mode === "display" ? (h(), x(X, { key: 0 }, [
|
|
3590
3588
|
V(t) ? (h(), x("div", ja, [
|
|
3591
3589
|
w("p", null, [
|
|
3592
3590
|
w("b", null, N(r.value), 1)
|
|
3593
3591
|
]),
|
|
3594
|
-
(h(!0), x(X, null, pe(V(t), (
|
|
3595
|
-
key:
|
|
3596
|
-
}, N(
|
|
3592
|
+
(h(!0), x(X, null, pe(V(t), (i) => (h(), x("li", {
|
|
3593
|
+
key: i.name
|
|
3594
|
+
}, N(i.name), 1))), 128))
|
|
3597
3595
|
])) : (h(), x("span", Ja, "No file selected"))
|
|
3598
3596
|
], 64)) : (h(), x(X, { key: 1 }, [
|
|
3599
3597
|
V(t) ? (h(), x("div", Qa, [
|
|
@@ -3601,26 +3599,26 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3601
3599
|
l[2] || (l[2] = Dt(" You have selected: ", -1)),
|
|
3602
3600
|
w("b", null, N(r.value), 1)
|
|
3603
3601
|
]),
|
|
3604
|
-
(h(!0), x(X, null, pe(V(t), (
|
|
3605
|
-
key:
|
|
3606
|
-
}, N(
|
|
3602
|
+
(h(!0), x(X, null, pe(V(t), (i) => (h(), x("li", {
|
|
3603
|
+
key: i.name
|
|
3604
|
+
}, N(i.name), 1))), 128))
|
|
3607
3605
|
])) : Y("", !0),
|
|
3608
3606
|
w("button", {
|
|
3609
3607
|
type: "button",
|
|
3610
3608
|
class: "aform_form-btn",
|
|
3611
3609
|
disabled: e.mode === "read",
|
|
3612
|
-
onClick: l[0] || (l[0] = (
|
|
3610
|
+
onClick: l[0] || (l[0] = (i) => V(o)())
|
|
3613
3611
|
}, N(e.label), 9, Ka),
|
|
3614
3612
|
w("button", {
|
|
3615
3613
|
type: "button",
|
|
3616
3614
|
disabled: !V(t) || e.mode === "read",
|
|
3617
3615
|
class: "aform_form-btn",
|
|
3618
|
-
onClick: l[1] || (l[1] = (
|
|
3616
|
+
onClick: l[1] || (l[1] = (i) => V(n)())
|
|
3619
3617
|
}, "Reset", 8, es)
|
|
3620
3618
|
], 64))
|
|
3621
3619
|
]));
|
|
3622
3620
|
}
|
|
3623
|
-
}), ns = /* @__PURE__ */
|
|
3621
|
+
}), ns = /* @__PURE__ */ $e(ts, [["__scopeId", "data-v-6543d39a"]]), os = { class: "aform_form-element" }, ls = { class: "aform_display-value" }, as = { class: "aform_field-label" }, ss = ["id", "disabled", "required"], rs = ["for"], is = ["innerHTML"], us = /* @__PURE__ */ oe({
|
|
3624
3622
|
__name: "ANumericInput",
|
|
3625
3623
|
props: /* @__PURE__ */ xe({
|
|
3626
3624
|
schema: {},
|
|
@@ -3644,7 +3642,7 @@ const La = { class: "aform_display-value" }, Ha = { key: 0 }, Va = {
|
|
|
3644
3642
|
], 64)) : (h(), x(X, { key: 1 }, [
|
|
3645
3643
|
K(w("input", {
|
|
3646
3644
|
id: e.uuid,
|
|
3647
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
3645
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => t.value = s),
|
|
3648
3646
|
class: "aform_input-field",
|
|
3649
3647
|
type: "number",
|
|
3650
3648
|
disabled: e.mode === "read",
|
|
@@ -3685,17 +3683,17 @@ function ds(e) {
|
|
|
3685
3683
|
function fs(e, t) {
|
|
3686
3684
|
let o = e;
|
|
3687
3685
|
const n = [t, "/", "-", "(", ")", " "];
|
|
3688
|
-
for (const
|
|
3689
|
-
o = o.replaceAll(
|
|
3686
|
+
for (const s of n)
|
|
3687
|
+
o = o.replaceAll(s, "");
|
|
3690
3688
|
return o;
|
|
3691
3689
|
}
|
|
3692
3690
|
function vs(e, t, o) {
|
|
3693
3691
|
let n = t;
|
|
3694
|
-
for (const
|
|
3692
|
+
for (const s of e) {
|
|
3695
3693
|
const r = n.indexOf(o);
|
|
3696
3694
|
if (r !== -1) {
|
|
3697
|
-
const
|
|
3698
|
-
n =
|
|
3695
|
+
const a = n.substring(0, r), l = n.substring(r + 1);
|
|
3696
|
+
n = a + s + l;
|
|
3699
3697
|
}
|
|
3700
3698
|
}
|
|
3701
3699
|
return n.slice(0, t.length);
|
|
@@ -3703,10 +3701,10 @@ function vs(e, t, o) {
|
|
|
3703
3701
|
function ps(e, t) {
|
|
3704
3702
|
const o = ds(t);
|
|
3705
3703
|
if (!o) return;
|
|
3706
|
-
const n = "#",
|
|
3704
|
+
const n = "#", s = e.value, r = fs(s, n);
|
|
3707
3705
|
if (r) {
|
|
3708
|
-
const
|
|
3709
|
-
|
|
3706
|
+
const a = vs(r, o, n), l = t.instance;
|
|
3707
|
+
l?.maskFilled && (l.maskFilled = !a.includes(n)), e.value = a;
|
|
3710
3708
|
} else
|
|
3711
3709
|
e.value = o;
|
|
3712
3710
|
}
|
|
@@ -3727,14 +3725,14 @@ const ms = { class: "aform_form-element" }, hs = { class: "aform_display-value"
|
|
|
3727
3725
|
emits: ["update:modelValue"],
|
|
3728
3726
|
setup(e) {
|
|
3729
3727
|
const t = R(!0), o = Me(e, "modelValue");
|
|
3730
|
-
return (n,
|
|
3728
|
+
return (n, s) => (h(), x("div", ms, [
|
|
3731
3729
|
e.mode === "display" ? (h(), x(X, { key: 0 }, [
|
|
3732
3730
|
w("span", hs, N(o.value ?? ""), 1),
|
|
3733
3731
|
w("label", gs, N(e.label), 1)
|
|
3734
3732
|
], 64)) : (h(), x(X, { key: 1 }, [
|
|
3735
3733
|
K(w("input", {
|
|
3736
3734
|
id: e.uuid,
|
|
3737
|
-
"onUpdate:modelValue":
|
|
3735
|
+
"onUpdate:modelValue": s[0] || (s[0] = (r) => o.value = r),
|
|
3738
3736
|
class: "aform_input-field",
|
|
3739
3737
|
disabled: e.mode === "read",
|
|
3740
3738
|
maxlength: e.mask && t.value ? e.mask.length : void 0,
|
|
@@ -3756,7 +3754,7 @@ const ms = { class: "aform_form-element" }, hs = { class: "aform_display-value"
|
|
|
3756
3754
|
], 64))
|
|
3757
3755
|
]));
|
|
3758
3756
|
}
|
|
3759
|
-
}), ks = { class: "login-container" }, Is = { class: "account-container" }, Ms = { class: "account-header" }, Cs = { id: "account-title" }, Es = { id: "account-subtitle" }, As = { class: "login-form-container" },
|
|
3757
|
+
}), ks = { class: "login-container" }, Is = { class: "account-container" }, Ms = { class: "account-header" }, Cs = { id: "account-title" }, Es = { id: "account-subtitle" }, As = { class: "login-form-container" }, Ts = { class: "login-form-email aform_form-element" }, $s = ["disabled"], Ds = { class: "login-form-password aform_form-element" }, Ss = ["disabled"], Rs = ["disabled"], Ls = {
|
|
3760
3758
|
key: 0,
|
|
3761
3759
|
class: "material-symbols-outlined loading-icon"
|
|
3762
3760
|
}, Hs = /* @__PURE__ */ oe({
|
|
@@ -3767,15 +3765,15 @@ const ms = { class: "aform_form-element" }, hs = { class: "aform_display-value"
|
|
|
3767
3765
|
},
|
|
3768
3766
|
emits: ["loginFailed", "loginSuccess"],
|
|
3769
3767
|
setup(e, { emit: t }) {
|
|
3770
|
-
const o = t, n = R(""),
|
|
3771
|
-
function l(
|
|
3772
|
-
if (
|
|
3768
|
+
const o = t, n = R(""), s = R(""), r = R(!1), a = R(!1);
|
|
3769
|
+
function l(i) {
|
|
3770
|
+
if (i.preventDefault(), r.value = !0, a.value) {
|
|
3773
3771
|
r.value = !1, o("loginFailed");
|
|
3774
3772
|
return;
|
|
3775
3773
|
}
|
|
3776
3774
|
r.value = !1, o("loginSuccess");
|
|
3777
3775
|
}
|
|
3778
|
-
return (
|
|
3776
|
+
return (i, u) => (h(), x("div", ks, [
|
|
3779
3777
|
w("div", null, [
|
|
3780
3778
|
w("div", Is, [
|
|
3781
3779
|
w("div", Ms, [
|
|
@@ -3784,15 +3782,15 @@ const ms = { class: "aform_form-element" }, hs = { class: "aform_display-value"
|
|
|
3784
3782
|
]),
|
|
3785
3783
|
w("form", { onSubmit: l }, [
|
|
3786
3784
|
w("div", As, [
|
|
3787
|
-
w("div",
|
|
3788
|
-
|
|
3785
|
+
w("div", Ts, [
|
|
3786
|
+
u[2] || (u[2] = w("label", {
|
|
3789
3787
|
id: "login-email",
|
|
3790
3788
|
for: "email",
|
|
3791
3789
|
class: "aform_field-label"
|
|
3792
3790
|
}, "Email", -1)),
|
|
3793
3791
|
K(w("input", {
|
|
3794
3792
|
id: "email",
|
|
3795
|
-
"onUpdate:modelValue":
|
|
3793
|
+
"onUpdate:modelValue": u[0] || (u[0] = (d) => n.value = d),
|
|
3796
3794
|
class: "aform_input-field",
|
|
3797
3795
|
name: "email",
|
|
3798
3796
|
placeholder: "name@example.com",
|
|
@@ -3801,47 +3799,47 @@ const ms = { class: "aform_form-element" }, hs = { class: "aform_display-value"
|
|
|
3801
3799
|
"auto-complete": "email",
|
|
3802
3800
|
"auto-correct": "off",
|
|
3803
3801
|
disabled: r.value
|
|
3804
|
-
}, null, 8,
|
|
3802
|
+
}, null, 8, $s), [
|
|
3805
3803
|
[we, n.value]
|
|
3806
3804
|
])
|
|
3807
3805
|
]),
|
|
3808
3806
|
w("div", Ds, [
|
|
3809
|
-
|
|
3807
|
+
u[3] || (u[3] = w("label", {
|
|
3810
3808
|
id: "login-password",
|
|
3811
3809
|
for: "password",
|
|
3812
3810
|
class: "aform_field-label"
|
|
3813
3811
|
}, "Password", -1)),
|
|
3814
3812
|
K(w("input", {
|
|
3815
3813
|
id: "password",
|
|
3816
|
-
"onUpdate:modelValue":
|
|
3814
|
+
"onUpdate:modelValue": u[1] || (u[1] = (d) => s.value = d),
|
|
3817
3815
|
class: "aform_input-field",
|
|
3818
3816
|
name: "password",
|
|
3819
3817
|
type: "password",
|
|
3820
3818
|
disabled: r.value
|
|
3821
3819
|
}, null, 8, Ss), [
|
|
3822
|
-
[we,
|
|
3820
|
+
[we, s.value]
|
|
3823
3821
|
])
|
|
3824
3822
|
]),
|
|
3825
3823
|
w("button", {
|
|
3826
3824
|
class: "btn",
|
|
3827
|
-
disabled: r.value || !n.value || !
|
|
3825
|
+
disabled: r.value || !n.value || !s.value,
|
|
3828
3826
|
onClick: l
|
|
3829
3827
|
}, [
|
|
3830
3828
|
r.value ? (h(), x("span", Ls, "progress_activity")) : Y("", !0),
|
|
3831
|
-
|
|
3829
|
+
u[4] || (u[4] = w("span", { id: "login-form-button" }, "Login", -1))
|
|
3832
3830
|
], 8, Rs)
|
|
3833
3831
|
])
|
|
3834
3832
|
], 32),
|
|
3835
|
-
|
|
3833
|
+
u[5] || (u[5] = w("button", { class: "btn" }, [
|
|
3836
3834
|
w("span", { id: "forgot-password-button" }, "Forgot password?")
|
|
3837
3835
|
], -1))
|
|
3838
3836
|
])
|
|
3839
3837
|
])
|
|
3840
3838
|
]));
|
|
3841
3839
|
}
|
|
3842
|
-
}), _s = /* @__PURE__ */
|
|
3840
|
+
}), _s = /* @__PURE__ */ $e(Hs, [["__scopeId", "data-v-d9ffd0a7"]]);
|
|
3843
3841
|
function Os(e) {
|
|
3844
|
-
e.use(
|
|
3842
|
+
e.use($l), e.component("ACheckbox", Ol), e.component("AComboBox", Bl), e.component("ADate", Gl), e.component("ADropdown", fa), e.component("ADatePicker", Fa), e.component("AFieldset", Ya), e.component("AFileAttach", ns), e.component("AForm", kn), e.component("ANumericInput", us), e.component("ATextInput", xs);
|
|
3845
3843
|
}
|
|
3846
3844
|
export {
|
|
3847
3845
|
Ol as ACheckbox,
|