@stonecrop/aform 0.13.7 → 0.13.9
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/README.md +1 -1
- package/dist/aform.d.ts +92 -134
- package/dist/aform.js +169 -172
- package/dist/aform.js.map +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/src/types/index.d.ts +104 -142
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/AForm.vue +18 -21
- package/src/components/form/AFieldset.vue +5 -4
- package/src/types/index.ts +122 -162
package/dist/aform.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as te, useTemplateRef as pe, ref as C, computed as
|
|
1
|
+
import { defineComponent as te, useTemplateRef as pe, ref as C, computed as R, onMounted as Re, openBlock as g, createElementBlock as x, unref as B, normalizeClass as de, normalizeStyle as Se, createBlock as fe, resolveDynamicComponent as Ge, mergeProps as ot, toDisplayString as F, createElementVNode as b, withModifiers as ae, withDirectives as j, Fragment as X, renderList as ge, vShow as Ce, createCommentVNode as N, renderSlot as Me, createTextVNode as Mt, watch as le, onBeforeUnmount as dn, nextTick as at, toValue as A, shallowRef as he, getCurrentScope as It, onScopeDispose as Tt, reactive as Dt, vModelText as we, vModelCheckbox as _t, vModelSelect as Yt, getCurrentInstance as $t, watchEffect as St, useCssVars as vn, onUnmounted as fn, useModel as Te, inject as yt, createVNode as _e, withCtx as wt, mergeModels as xe, isRef as mn, toRefs as pn, customRef as Ct, toRef as Xt, readonly as Et, resolveComponent as hn, withKeys as ce, provide as gn } from "vue";
|
|
2
2
|
import { defineStore as yn } from "pinia";
|
|
3
3
|
import './assets/index.css';function bt(e) {
|
|
4
4
|
return Function(`"use strict"; return (${e})`)();
|
|
@@ -26,7 +26,7 @@ function We(e) {
|
|
|
26
26
|
return (t = l?.$el) !== null && t !== void 0 ? t : l;
|
|
27
27
|
}
|
|
28
28
|
function Ye(...e) {
|
|
29
|
-
const t = (n, a, o, s) => (n.addEventListener(a, o, s), () => n.removeEventListener(a, o, s)), l =
|
|
29
|
+
const t = (n, a, o, s) => (n.addEventListener(a, o, s), () => n.removeEventListener(a, o, s)), l = R(() => {
|
|
30
30
|
const n = Qe(A(e[0])).filter((a) => a != null);
|
|
31
31
|
return n.every((a) => typeof a != "string") ? n : void 0;
|
|
32
32
|
});
|
|
@@ -49,21 +49,21 @@ function Ye(...e) {
|
|
|
49
49
|
// @__NO_SIDE_EFFECTS__
|
|
50
50
|
function Tn() {
|
|
51
51
|
const e = he(!1), t = $t();
|
|
52
|
-
return t &&
|
|
52
|
+
return t && Re(() => {
|
|
53
53
|
e.value = !0;
|
|
54
54
|
}, t), e;
|
|
55
55
|
}
|
|
56
56
|
// @__NO_SIDE_EFFECTS__
|
|
57
57
|
function Dn(e) {
|
|
58
58
|
const t = /* @__PURE__ */ Tn();
|
|
59
|
-
return
|
|
59
|
+
return R(() => (t.value, !!e()));
|
|
60
60
|
}
|
|
61
61
|
function $n(e, t, l = {}) {
|
|
62
62
|
const { window: n = qe, ...a } = l;
|
|
63
63
|
let o;
|
|
64
64
|
const s = /* @__PURE__ */ Dn(() => n && "MutationObserver" in n), u = () => {
|
|
65
65
|
o && (o.disconnect(), o = void 0);
|
|
66
|
-
}, r = le(
|
|
66
|
+
}, r = le(R(() => {
|
|
67
67
|
const m = Qe(A(e)).map(We).filter(bn);
|
|
68
68
|
return new Set(m);
|
|
69
69
|
}), (m) => {
|
|
@@ -125,12 +125,12 @@ function Cn(e = {}) {
|
|
|
125
125
|
}
|
|
126
126
|
return a && Sn(u, r, { document: o }), r(), u;
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const En = "focusin", Rn = "focusout", An = ":focus-within";
|
|
129
129
|
function Ln(e, t = {}) {
|
|
130
|
-
const { window: l = qe } = t, n =
|
|
130
|
+
const { window: l = qe } = t, n = R(() => We(e)), a = he(!1), o = R(() => a.value);
|
|
131
131
|
if (!l || !(/* @__PURE__ */ Cn(t)).value) return { focused: o };
|
|
132
132
|
const s = { passive: !0 };
|
|
133
|
-
return Ye(n,
|
|
133
|
+
return Ye(n, En, () => a.value = !0, s), Ye(n, Rn, () => {
|
|
134
134
|
var u, r, i;
|
|
135
135
|
return a.value = (u = (r = n.value) === null || r === void 0 || (i = r.matches) === null || i === void 0 ? void 0 : i.call(r, An)) !== null && u !== void 0 ? u : !1;
|
|
136
136
|
}, s), { focused: o };
|
|
@@ -160,8 +160,8 @@ const Ae = (e) => {
|
|
|
160
160
|
return t = t && e.offsetHeight > 0, t;
|
|
161
161
|
}, Le = (e) => e.tabIndex >= 0, Nt = (e) => {
|
|
162
162
|
if (e.target instanceof HTMLElement)
|
|
163
|
-
return
|
|
164
|
-
},
|
|
163
|
+
return Rt(e.target);
|
|
164
|
+
}, Rt = (e) => {
|
|
165
165
|
let t;
|
|
166
166
|
if (e instanceof HTMLTableCellElement) {
|
|
167
167
|
const l = e.parentElement?.previousElementSibling;
|
|
@@ -173,7 +173,7 @@ const Ae = (e) => {
|
|
|
173
173
|
const l = e.previousElementSibling;
|
|
174
174
|
l instanceof HTMLTableRowElement && (t = l);
|
|
175
175
|
}
|
|
176
|
-
return t && (!Le(t) || !Ae(t)) ?
|
|
176
|
+
return t && (!Le(t) || !Ae(t)) ? Rt(t) : t;
|
|
177
177
|
}, Vn = (e) => {
|
|
178
178
|
if (!(e.target instanceof HTMLElement)) return;
|
|
179
179
|
const t = e.target;
|
|
@@ -225,7 +225,7 @@ const Ae = (e) => {
|
|
|
225
225
|
a instanceof HTMLTableRowElement && (l = a);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
return l && (!Le(l) || !Ae(l)) ?
|
|
228
|
+
return l && (!Le(l) || !Ae(l)) ? Rt(l) : l;
|
|
229
229
|
}, Ot = (e) => {
|
|
230
230
|
if (e.target instanceof HTMLElement)
|
|
231
231
|
return Lt(e.target);
|
|
@@ -379,7 +379,7 @@ function Vt(e) {
|
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
}, a = [];
|
|
382
|
-
|
|
382
|
+
Re(() => {
|
|
383
383
|
for (const o of e) {
|
|
384
384
|
const s = it(o), u = l(o), r = n(o), i = s ? [s] : u;
|
|
385
385
|
for (const d of i) {
|
|
@@ -404,7 +404,7 @@ const Pn = (e) => e != null, Nn = Object.prototype.toString, Zn = (e) => Nn.call
|
|
|
404
404
|
function On(...e) {
|
|
405
405
|
if (e.length !== 1) return Xt(...e);
|
|
406
406
|
const t = e[0];
|
|
407
|
-
return typeof t == "function" ?
|
|
407
|
+
return typeof t == "function" ? Et(Ct(() => ({
|
|
408
408
|
get: t,
|
|
409
409
|
set: Oe
|
|
410
410
|
}))) : C(t);
|
|
@@ -473,7 +473,7 @@ function zn(e, t = {}) {
|
|
|
473
473
|
return l;
|
|
474
474
|
}
|
|
475
475
|
function _n(e, t = !0, l) {
|
|
476
|
-
Wn() ?
|
|
476
|
+
Wn() ? Re(e, l) : t ? e() : at(e);
|
|
477
477
|
}
|
|
478
478
|
function Yn(e, t, l) {
|
|
479
479
|
return le(e, t, {
|
|
@@ -488,7 +488,7 @@ function $e(e) {
|
|
|
488
488
|
return (t = l?.$el) !== null && t !== void 0 ? t : l;
|
|
489
489
|
}
|
|
490
490
|
function Fe(...e) {
|
|
491
|
-
const t = (n, a, o, s) => (n.addEventListener(a, o, s), () => n.removeEventListener(a, o, s)), l =
|
|
491
|
+
const t = (n, a, o, s) => (n.addEventListener(a, o, s), () => n.removeEventListener(a, o, s)), l = R(() => {
|
|
492
492
|
const n = et(A(e[0])).filter((a) => a != null);
|
|
493
493
|
return n.every((a) => typeof a != "string") ? n : void 0;
|
|
494
494
|
});
|
|
@@ -528,8 +528,8 @@ function xt(e, t, l = {}) {
|
|
|
528
528
|
return h && h.$.subTree.shapeFlag === 16;
|
|
529
529
|
}
|
|
530
530
|
function m(c, h) {
|
|
531
|
-
const k = A(c),
|
|
532
|
-
return
|
|
531
|
+
const k = A(c), E = k.$.subTree && k.$.subTree.children;
|
|
532
|
+
return E == null || !Array.isArray(E) ? !1 : E.some((S) => S.el === h.target || h.composedPath().includes(S.el));
|
|
533
533
|
}
|
|
534
534
|
const I = (c) => {
|
|
535
535
|
const h = $e(e);
|
|
@@ -576,21 +576,21 @@ function xt(e, t, l = {}) {
|
|
|
576
576
|
// @__NO_SIDE_EFFECTS__
|
|
577
577
|
function Xn() {
|
|
578
578
|
const e = he(!1), t = $t();
|
|
579
|
-
return t &&
|
|
579
|
+
return t && Re(() => {
|
|
580
580
|
e.value = !0;
|
|
581
581
|
}, t), e;
|
|
582
582
|
}
|
|
583
583
|
// @__NO_SIDE_EFFECTS__
|
|
584
584
|
function Jt(e) {
|
|
585
585
|
const t = /* @__PURE__ */ Xn();
|
|
586
|
-
return
|
|
586
|
+
return R(() => (t.value, !!e()));
|
|
587
587
|
}
|
|
588
588
|
function Qt(e, t, l = {}) {
|
|
589
589
|
const { window: n = Xe, ...a } = l;
|
|
590
590
|
let o;
|
|
591
591
|
const s = /* @__PURE__ */ Jt(() => n && "MutationObserver" in n), u = () => {
|
|
592
592
|
o && (o.disconnect(), o = void 0);
|
|
593
|
-
}, r = le(
|
|
593
|
+
}, r = le(R(() => {
|
|
594
594
|
const m = et(A(e)).map($e).filter(Pn);
|
|
595
595
|
return new Set(m);
|
|
596
596
|
}), (m) => {
|
|
@@ -617,7 +617,7 @@ function Kn(e) {
|
|
|
617
617
|
}
|
|
618
618
|
function ut(e, t = {}) {
|
|
619
619
|
var l, n, a, o;
|
|
620
|
-
const { pointerTypes: s, preventDefault: u, stopPropagation: r, exact: i, onMove: d, onEnd: m, onStart: I, initialValue: w, axis: p = "both", draggingElement: v = Xe, containerElement: c, handle: h = e, buttons: k = [0], restrictInView:
|
|
620
|
+
const { pointerTypes: s, preventDefault: u, stopPropagation: r, exact: i, onMove: d, onEnd: m, onStart: I, initialValue: w, axis: p = "both", draggingElement: v = Xe, containerElement: c, handle: h = e, buttons: k = [0], restrictInView: E, autoScroll: S = !1 } = t, D = C((l = A(w)) !== null && l !== void 0 ? l : {
|
|
621
621
|
x: 0,
|
|
622
622
|
y: 0
|
|
623
623
|
}), L = C(), z = (M) => s ? s.includes(M.pointerType) : !0, H = (M) => {
|
|
@@ -627,9 +627,9 @@ function ut(e, t = {}) {
|
|
|
627
627
|
margin: (a = A(Z.margin)) !== null && a !== void 0 ? a : je.margin,
|
|
628
628
|
direction: (o = Z.direction) !== null && o !== void 0 ? o : je.direction
|
|
629
629
|
} : je, J = (M) => typeof M == "number" ? [M, M] : [M.x, M.y], ne = (M, T, V) => {
|
|
630
|
-
const { clientWidth: U, clientHeight: Y, scrollLeft: ve, scrollTop:
|
|
630
|
+
const { clientWidth: U, clientHeight: Y, scrollLeft: ve, scrollTop: Ee, scrollWidth: Be, scrollHeight: P } = M, [O, K] = J(_.margin), [oe, ie] = J(_.speed);
|
|
631
631
|
let re = 0, ue = 0;
|
|
632
|
-
(_.direction === "x" || _.direction === "both") && (V.x < O && ve > 0 ? re = -oe : V.x + T.width > U - O && ve < Be - U && (re = oe)), (_.direction === "y" || _.direction === "both") && (V.y < K &&
|
|
632
|
+
(_.direction === "x" || _.direction === "both") && (V.x < O && ve > 0 ? re = -oe : V.x + T.width > U - O && ve < Be - U && (re = oe)), (_.direction === "y" || _.direction === "both") && (V.y < K && Ee > 0 ? ue = -ie : V.y + T.height > Y - K && Ee < P - Y && (ue = ie)), (re || ue) && M.scrollBy({
|
|
633
633
|
left: re,
|
|
634
634
|
top: ue,
|
|
635
635
|
behavior: "auto"
|
|
@@ -648,8 +648,8 @@ function ut(e, t = {}) {
|
|
|
648
648
|
}, be = () => {
|
|
649
649
|
se && (clearInterval(se), se = null);
|
|
650
650
|
}, He = (M, T, V, U) => {
|
|
651
|
-
const [Y, ve] = typeof V == "number" ? [V, V] : [V.x, V.y], { clientWidth:
|
|
652
|
-
return M.x < Y || M.x + U.width >
|
|
651
|
+
const [Y, ve] = typeof V == "number" ? [V, V] : [V.x, V.y], { clientWidth: Ee, clientHeight: Be } = T;
|
|
652
|
+
return M.x < Y || M.x + U.width > Ee - Y || M.y < ve || M.y + U.height > Be - ve;
|
|
653
653
|
}, Ne = () => {
|
|
654
654
|
if (A(t.disabled) || !L.value) return;
|
|
655
655
|
const M = A(c);
|
|
@@ -678,7 +678,7 @@ function ut(e, t = {}) {
|
|
|
678
678
|
if ((p === "x" || p === "both") && (U = M.clientX - L.value.x, T && (U = Math.min(Math.max(0, U), T.scrollWidth - V.width))), (p === "y" || p === "both") && (Y = M.clientY - L.value.y, T && (Y = Math.min(Math.max(0, Y), T.scrollHeight - V.height))), A(S) && T && (se === null && ne(T, V, {
|
|
679
679
|
x: U,
|
|
680
680
|
y: Y
|
|
681
|
-
}), U += T.scrollLeft, Y += T.scrollTop), T && (
|
|
681
|
+
}), U += T.scrollLeft, Y += T.scrollTop), T && (E || S)) {
|
|
682
682
|
if (p !== "y") {
|
|
683
683
|
const ve = U - T.scrollLeft;
|
|
684
684
|
ve < 0 ? U = T.scrollLeft : ve > T.clientWidth - V.width && (U = T.clientWidth - V.width + T.scrollLeft);
|
|
@@ -708,8 +708,8 @@ function ut(e, t = {}) {
|
|
|
708
708
|
return {
|
|
709
709
|
...zn(D),
|
|
710
710
|
position: D,
|
|
711
|
-
isDragging:
|
|
712
|
-
style:
|
|
711
|
+
isDragging: R(() => !!L.value),
|
|
712
|
+
style: R(() => `
|
|
713
713
|
left: ${D.value.x}px;
|
|
714
714
|
top: ${D.value.y}px;
|
|
715
715
|
${S ? "text-wrap: nowrap;" : ""}
|
|
@@ -721,7 +721,7 @@ function nt(e, t, l = {}) {
|
|
|
721
721
|
let o;
|
|
722
722
|
const s = /* @__PURE__ */ Jt(() => n && "ResizeObserver" in n), u = () => {
|
|
723
723
|
o && (o.disconnect(), o = void 0);
|
|
724
|
-
}, r = le(
|
|
724
|
+
}, r = le(R(() => {
|
|
725
725
|
const d = A(e);
|
|
726
726
|
return Array.isArray(d) ? d.map((m) => $e(m)) : [$e(d)];
|
|
727
727
|
}), (d) => {
|
|
@@ -793,7 +793,7 @@ function jn(e, t = !1) {
|
|
|
793
793
|
const s = ct(A(e));
|
|
794
794
|
!s || !l.value || (s.style.overflow = n, dt.delete(s), l.value = !1);
|
|
795
795
|
};
|
|
796
|
-
return Bt(o),
|
|
796
|
+
return Bt(o), R({
|
|
797
797
|
get() {
|
|
798
798
|
return l.value;
|
|
799
799
|
},
|
|
@@ -817,8 +817,8 @@ const Jn = (e) => {
|
|
|
817
817
|
debounce: { default: 300 }
|
|
818
818
|
},
|
|
819
819
|
setup(e, { expose: t }) {
|
|
820
|
-
const l = pe("cell"), n = e.store.getCellData(e.colIndex, e.rowIndex), a = C(""), o = C(!1), s = e.store.columns[e.colIndex], u = e.store.rows[e.rowIndex], r = s.align || "center", i = s.width || "40ch", d =
|
|
821
|
-
|
|
820
|
+
const l = pe("cell"), n = e.store.getCellData(e.colIndex, e.rowIndex), a = C(""), o = C(!1), s = e.store.columns[e.colIndex], u = e.store.rows[e.rowIndex], r = s.align || "center", i = s.width || "40ch", d = R(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), m = C(null);
|
|
821
|
+
Re(() => {
|
|
822
822
|
if (!s.linkDoctype) return;
|
|
823
823
|
const H = e.store.getCellData(e.colIndex, e.rowIndex);
|
|
824
824
|
if (H != null && typeof H == "object") {
|
|
@@ -829,12 +829,12 @@ const Jn = (e) => {
|
|
|
829
829
|
const Z = e.store.linkResolver;
|
|
830
830
|
!Z || typeof H != "string" || H === "" || Z(s.linkDoctype, H).then((_) => (_ != null && (m.value = _), _));
|
|
831
831
|
});
|
|
832
|
-
const I =
|
|
832
|
+
const I = R(() => m.value ?? d.value), w = R(() => typeof I.value == "string" ? Jn(I.value) : !1), p = R(() => ({
|
|
833
833
|
textAlign: r,
|
|
834
834
|
width: i,
|
|
835
835
|
fontWeight: o.value ? "bold" : "inherit",
|
|
836
836
|
paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
|
|
837
|
-
})), v =
|
|
837
|
+
})), v = R(() => ({
|
|
838
838
|
"sticky-column": e.pinned,
|
|
839
839
|
"cell-modified": o.value
|
|
840
840
|
})), c = () => {
|
|
@@ -874,7 +874,7 @@ const Jn = (e) => {
|
|
|
874
874
|
} catch {
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
|
-
},
|
|
877
|
+
}, E = () => {
|
|
878
878
|
l.value && (a.value = l.value.textContent, k());
|
|
879
879
|
}, S = () => {
|
|
880
880
|
try {
|
|
@@ -927,7 +927,7 @@ const Jn = (e) => {
|
|
|
927
927
|
spellcheck: !1,
|
|
928
928
|
style: Se(p.value),
|
|
929
929
|
class: de(["atable-cell", v.value]),
|
|
930
|
-
onFocus:
|
|
930
|
+
onFocus: E,
|
|
931
931
|
onPaste: L,
|
|
932
932
|
onInput: Z[0] || (Z[0] = //@ts-ignore
|
|
933
933
|
(..._) => B(z) && B(z)(..._)),
|
|
@@ -951,7 +951,7 @@ const Jn = (e) => {
|
|
|
951
951
|
addNavigation: { type: [Boolean, Object], default: () => st }
|
|
952
952
|
},
|
|
953
953
|
setup(e) {
|
|
954
|
-
const t = pe("rowEl"), l =
|
|
954
|
+
const t = pe("rowEl"), l = R(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
|
|
955
955
|
if (e.addNavigation) {
|
|
956
956
|
const n = {
|
|
957
957
|
"keydown.control.g": (a) => {
|
|
@@ -1024,14 +1024,14 @@ const Jn = (e) => {
|
|
|
1024
1024
|
v1b78cb3b: a.value,
|
|
1025
1025
|
v0a4cd982: P.colspan
|
|
1026
1026
|
}));
|
|
1027
|
-
const n = l, a = C(e.color.length >= 6 ? e.color : "#cccccc"), o = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, s = pe("container"), u = pe("bar"), r = pe("leftResizeHandle"), i = pe("rightResizeHandle"), d = pe("leftConnectionHandle"), m = pe("rightConnectionHandle"), { width: I } = Ze(s), { left: w, right: p } = Ze(u), v = C(e.start), c = C(e.end || v.value + e.colspan), h = C(!1), k = C(!1),
|
|
1027
|
+
const n = l, a = C(e.color.length >= 6 ? e.color : "#cccccc"), o = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, s = pe("container"), u = pe("bar"), r = pe("leftResizeHandle"), i = pe("rightResizeHandle"), d = pe("leftConnectionHandle"), m = pe("rightConnectionHandle"), { width: I } = Ze(s), { left: w, right: p } = Ze(u), v = C(e.start), c = C(e.end || v.value + e.colspan), h = C(!1), k = C(!1), E = C(!1), S = C(!1), D = C(!1), L = C({ startX: 0, startY: 0, endX: 0, endY: 0 }), z = R(() => Ie.value || ne.value || se.value), H = R(() => e.colspan > 0 ? I.value / e.colspan : 0), Z = R(() => {
|
|
1028
1028
|
const P = v.value / e.colspan * 100, O = c.value / e.colspan * 100;
|
|
1029
1029
|
return {
|
|
1030
1030
|
left: `${P}%`,
|
|
1031
1031
|
width: `${O - P}%`,
|
|
1032
1032
|
backgroundColor: a.value
|
|
1033
1033
|
};
|
|
1034
|
-
}), _ =
|
|
1034
|
+
}), _ = R(
|
|
1035
1035
|
() => ({
|
|
1036
1036
|
position: "fixed",
|
|
1037
1037
|
top: 0,
|
|
@@ -1058,7 +1058,7 @@ const Jn = (e) => {
|
|
|
1058
1058
|
onMove: ({ x: P }) => Ve(P),
|
|
1059
1059
|
onEnd: ({ x: P }) => M(P)
|
|
1060
1060
|
});
|
|
1061
|
-
|
|
1061
|
+
Re(() => {
|
|
1062
1062
|
T();
|
|
1063
1063
|
}), fn(() => {
|
|
1064
1064
|
V();
|
|
@@ -1165,10 +1165,10 @@ const Jn = (e) => {
|
|
|
1165
1165
|
e.store.isDependencyGraphEnabled && (h.value = !0, k.value = !0);
|
|
1166
1166
|
}
|
|
1167
1167
|
function Y() {
|
|
1168
|
-
!
|
|
1168
|
+
!E.value && !S.value && (h.value = !1, k.value = !1);
|
|
1169
1169
|
}
|
|
1170
1170
|
function ve(P, O) {
|
|
1171
|
-
O.preventDefault(), O.stopPropagation(), D.value = !0, P === "left" ?
|
|
1171
|
+
O.preventDefault(), O.stopPropagation(), D.value = !0, P === "left" ? E.value = !0 : S.value = !0;
|
|
1172
1172
|
const K = P === "left" ? d.value : m.value;
|
|
1173
1173
|
if (K) {
|
|
1174
1174
|
const re = K.getBoundingClientRect(), ue = re.left + re.width / 2, f = re.top + re.height / 2;
|
|
@@ -1177,11 +1177,11 @@ const Jn = (e) => {
|
|
|
1177
1177
|
const oe = (re) => {
|
|
1178
1178
|
L.value.endX = re.clientX, L.value.endY = re.clientY;
|
|
1179
1179
|
}, ie = (re) => {
|
|
1180
|
-
|
|
1180
|
+
Ee(re, P), Be(oe, ie);
|
|
1181
1181
|
};
|
|
1182
1182
|
document.addEventListener("mousemove", oe), document.addEventListener("mouseup", ie);
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function Ee(P, O) {
|
|
1185
1185
|
const K = document.elementFromPoint(P.clientX, P.clientY)?.closest(".connection-handle");
|
|
1186
1186
|
if (K && K !== (O === "left" ? d.value : m.value)) {
|
|
1187
1187
|
const oe = K.closest(".gantt-bar");
|
|
@@ -1195,14 +1195,14 @@ const Jn = (e) => {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
1197
|
function Be(P, O) {
|
|
1198
|
-
D.value = !1,
|
|
1198
|
+
D.value = !1, E.value = !1, S.value = !1, document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", O), u.value?.matches(":hover") || Y();
|
|
1199
1199
|
}
|
|
1200
1200
|
return t({
|
|
1201
1201
|
barStyle: Z,
|
|
1202
1202
|
cleanupConnectionDrag: Be,
|
|
1203
1203
|
currentEnd: c,
|
|
1204
|
-
handleConnectionDrop:
|
|
1205
|
-
isLeftConnectionDragging:
|
|
1204
|
+
handleConnectionDrop: Ee,
|
|
1205
|
+
isLeftConnectionDragging: E,
|
|
1206
1206
|
isLeftConnectionVisible: h,
|
|
1207
1207
|
isRightConnectionDragging: S,
|
|
1208
1208
|
isRightConnectionVisible: k,
|
|
@@ -1224,7 +1224,7 @@ const Jn = (e) => {
|
|
|
1224
1224
|
e.store.isDependencyGraphEnabled ? (g(), x("div", {
|
|
1225
1225
|
key: 0,
|
|
1226
1226
|
ref: "leftConnectionHandle",
|
|
1227
|
-
class: de(["connection-handle left-connection-handle", { visible: h.value, "is-dragging":
|
|
1227
|
+
class: de(["connection-handle left-connection-handle", { visible: h.value, "is-dragging": E.value }]),
|
|
1228
1228
|
onMousedown: O[0] || (O[0] = ae((K) => ve("left", K), ["stop"]))
|
|
1229
1229
|
}, [...O[2] || (O[2] = [
|
|
1230
1230
|
b("div", { class: "connection-dot" }, null, -1)
|
|
@@ -1327,7 +1327,7 @@ const Jn = (e) => {
|
|
|
1327
1327
|
}, Il = ["aria-expanded"], Tl = ["onClick"], Dl = ["innerHTML"], $l = { class: "action-label" }, Sl = {
|
|
1328
1328
|
key: 1,
|
|
1329
1329
|
class: "row-actions-icons"
|
|
1330
|
-
}, Cl = ["title", "aria-label", "onClick"],
|
|
1330
|
+
}, Cl = ["title", "aria-label", "onClick"], El = ["innerHTML"], tt = /* @__PURE__ */ te({
|
|
1331
1331
|
__name: "ARowActions",
|
|
1332
1332
|
props: {
|
|
1333
1333
|
rowIndex: {},
|
|
@@ -1344,20 +1344,20 @@ const Jn = (e) => {
|
|
|
1344
1344
|
insertAbove: "Insert Above",
|
|
1345
1345
|
insertBelow: "Insert Below",
|
|
1346
1346
|
move: "Move Row"
|
|
1347
|
-
}, m =
|
|
1348
|
-
const h = [], k = l.config.actions || {},
|
|
1349
|
-
for (const S of
|
|
1347
|
+
}, m = R(() => {
|
|
1348
|
+
const h = [], k = l.config.actions || {}, E = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
|
|
1349
|
+
for (const S of E) {
|
|
1350
1350
|
const D = k[S];
|
|
1351
1351
|
if (D === !1 || D === void 0) continue;
|
|
1352
1352
|
let L = !0, z = d[S], H = kl[S];
|
|
1353
1353
|
typeof D == "object" && (L = D.enabled !== !1, z = D.label || z, H = D.icon || H), L && h.push({ type: S, label: z, icon: H });
|
|
1354
1354
|
}
|
|
1355
1355
|
return h;
|
|
1356
|
-
}), I =
|
|
1356
|
+
}), I = R(() => {
|
|
1357
1357
|
if (l.config.forceDropdown) return !0;
|
|
1358
1358
|
const h = l.config.dropdownThreshold ?? 150;
|
|
1359
1359
|
return h === 0 ? !1 : s.value > 0 && s.value < h;
|
|
1360
|
-
}), w =
|
|
1360
|
+
}), w = R(() => u.value ? r.value ? {
|
|
1361
1361
|
position: "fixed",
|
|
1362
1362
|
bottom: `${window.innerHeight - i.value.top}px`,
|
|
1363
1363
|
left: `${i.value.left}px`,
|
|
@@ -1375,8 +1375,8 @@ const Jn = (e) => {
|
|
|
1375
1375
|
u.value || v(), u.value = !u.value;
|
|
1376
1376
|
}, v = () => {
|
|
1377
1377
|
if (!o.value) return;
|
|
1378
|
-
const h = o.value.getBoundingClientRect(), k = window.innerHeight,
|
|
1379
|
-
r.value = S <
|
|
1378
|
+
const h = o.value.getBoundingClientRect(), k = window.innerHeight, E = m.value.length * 40 + 16, S = k - h.bottom, D = h.top;
|
|
1379
|
+
r.value = S < E && D > E, r.value ? i.value = {
|
|
1380
1380
|
top: h.top,
|
|
1381
1381
|
left: h.left
|
|
1382
1382
|
} : i.value = {
|
|
@@ -1412,40 +1412,40 @@ const Jn = (e) => {
|
|
|
1412
1412
|
style: Se(w.value),
|
|
1413
1413
|
role: "menu"
|
|
1414
1414
|
}, [
|
|
1415
|
-
(g(!0), x(X, null, ge(m.value, (
|
|
1416
|
-
key:
|
|
1415
|
+
(g(!0), x(X, null, ge(m.value, (E) => (g(), x("button", {
|
|
1416
|
+
key: E.type,
|
|
1417
1417
|
type: "button",
|
|
1418
1418
|
class: "row-action-menu-item",
|
|
1419
1419
|
role: "menuitem",
|
|
1420
|
-
onClick: ae((S) => c(
|
|
1420
|
+
onClick: ae((S) => c(E.type), ["stop"])
|
|
1421
1421
|
}, [
|
|
1422
1422
|
b("span", {
|
|
1423
1423
|
class: "action-icon",
|
|
1424
|
-
innerHTML:
|
|
1424
|
+
innerHTML: E.icon
|
|
1425
1425
|
}, null, 8, Dl),
|
|
1426
|
-
b("span", $l, F(
|
|
1426
|
+
b("span", $l, F(E.label), 1)
|
|
1427
1427
|
], 8, Tl))), 128))
|
|
1428
1428
|
], 6), [
|
|
1429
1429
|
[Ce, u.value]
|
|
1430
1430
|
])
|
|
1431
1431
|
])) : (g(), x("div", Sl, [
|
|
1432
|
-
(g(!0), x(X, null, ge(m.value, (
|
|
1433
|
-
key:
|
|
1432
|
+
(g(!0), x(X, null, ge(m.value, (E) => (g(), x("button", {
|
|
1433
|
+
key: E.type,
|
|
1434
1434
|
type: "button",
|
|
1435
1435
|
class: "row-action-btn",
|
|
1436
|
-
title:
|
|
1437
|
-
"aria-label":
|
|
1438
|
-
onClick: ae((S) => c(
|
|
1436
|
+
title: E.label,
|
|
1437
|
+
"aria-label": E.label,
|
|
1438
|
+
onClick: ae((S) => c(E.type), ["stop"])
|
|
1439
1439
|
}, [
|
|
1440
1440
|
b("span", {
|
|
1441
1441
|
class: "action-icon",
|
|
1442
|
-
innerHTML:
|
|
1443
|
-
}, null, 8,
|
|
1442
|
+
innerHTML: E.icon
|
|
1443
|
+
}, null, 8, El)
|
|
1444
1444
|
], 8, Cl))), 128))
|
|
1445
1445
|
]))
|
|
1446
1446
|
], 2));
|
|
1447
1447
|
}
|
|
1448
|
-
}),
|
|
1448
|
+
}), Rl = ["tabindex"], Al = /* @__PURE__ */ te({
|
|
1449
1449
|
__name: "ARow",
|
|
1450
1450
|
props: {
|
|
1451
1451
|
rowIndex: {},
|
|
@@ -1455,7 +1455,7 @@ const Jn = (e) => {
|
|
|
1455
1455
|
},
|
|
1456
1456
|
emits: ["row:action"],
|
|
1457
1457
|
setup(e, { emit: t }) {
|
|
1458
|
-
const l = t, n = pe("rowEl"), a =
|
|
1458
|
+
const l = t, n = pe("rowEl"), a = R(() => e.store.isRowVisible(e.rowIndex)), o = R(() => e.store.getRowExpandSymbol(e.rowIndex)), s = R(() => e.store.config.rowActions || { enabled: !1 }), u = R(() => s.value.enabled), r = R(() => s.value.position || "before-index"), i = (d, m) => {
|
|
1459
1459
|
l("row:action", d, m);
|
|
1460
1460
|
};
|
|
1461
1461
|
if (e.addNavigation) {
|
|
@@ -1512,7 +1512,7 @@ const Jn = (e) => {
|
|
|
1512
1512
|
position: r.value,
|
|
1513
1513
|
onAction: i
|
|
1514
1514
|
}, null, 8, ["row-index", "store", "config", "position"])) : N("", !0)
|
|
1515
|
-
], 8,
|
|
1515
|
+
], 8, Rl)), [
|
|
1516
1516
|
[Ce, a.value]
|
|
1517
1517
|
]);
|
|
1518
1518
|
}
|
|
@@ -1563,7 +1563,7 @@ const Bl = { class: "gantt-connection-overlay" }, Fl = {
|
|
|
1563
1563
|
},
|
|
1564
1564
|
emits: ["connection:delete"],
|
|
1565
1565
|
setup(e, { emit: t }) {
|
|
1566
|
-
const l = t, n =
|
|
1566
|
+
const l = t, n = R(() => e.store.connectionPaths.filter((s) => {
|
|
1567
1567
|
const u = e.store.ganttBars.find((i) => i.id === s.from.barId), r = e.store.ganttBars.find((i) => i.id === s.to.barId);
|
|
1568
1568
|
return u && r;
|
|
1569
1569
|
})), a = (s) => {
|
|
@@ -1573,7 +1573,7 @@ const Bl = { class: "gantt-connection-overlay" }, Fl = {
|
|
|
1573
1573
|
(z) => z.barId === s.to.barId && z.side === s.to.side
|
|
1574
1574
|
);
|
|
1575
1575
|
if (!u || !r) return "";
|
|
1576
|
-
const i = u.position.x + Je / 2, d = u.position.y + Je / 2, m = r.position.x + Je / 2, I = r.position.y + Je / 2, w = Math.abs(m - i), p = Math.max(w * Zl, 50), v = i + (s.from.side === "left" ? -p : p), c = m + (s.to.side === "left" ? -p : p), h = { x: 0.5 * i + 0.5 * v, y: 0.5 * d + 0.5 * d }, k = { x: 0.5 * v + 0.5 * c, y: 0.5 * d + 0.5 * I },
|
|
1576
|
+
const i = u.position.x + Je / 2, d = u.position.y + Je / 2, m = r.position.x + Je / 2, I = r.position.y + Je / 2, w = Math.abs(m - i), p = Math.max(w * Zl, 50), v = i + (s.from.side === "left" ? -p : p), c = m + (s.to.side === "left" ? -p : p), h = { x: 0.5 * i + 0.5 * v, y: 0.5 * d + 0.5 * d }, k = { x: 0.5 * v + 0.5 * c, y: 0.5 * d + 0.5 * I }, E = { x: 0.5 * c + 0.5 * m, y: 0.5 * I + 0.5 * I }, S = { x: 0.5 * h.x + 0.5 * k.x, y: 0.5 * h.y + 0.5 * k.y }, D = { x: 0.5 * k.x + 0.5 * E.x, y: 0.5 * k.y + 0.5 * E.y }, L = { x: 0.5 * S.x + 0.5 * D.x, y: 0.5 * S.y + 0.5 * D.y };
|
|
1577
1577
|
return `M ${i} ${d} Q ${v} ${d}, ${L.x} ${L.y} Q ${c} ${I}, ${m} ${I}`;
|
|
1578
1578
|
}, o = (s) => {
|
|
1579
1579
|
e.store.deleteConnection(s.id) && l("connection:delete", s);
|
|
@@ -1643,7 +1643,7 @@ const Bl = { class: "gantt-connection-overlay" }, Fl = {
|
|
|
1643
1643
|
const t = C(""), l = Dt({
|
|
1644
1644
|
startValue: "",
|
|
1645
1645
|
endValue: ""
|
|
1646
|
-
}), n =
|
|
1646
|
+
}), n = R(() => {
|
|
1647
1647
|
if (e.column.filterType) return e.column.filterType;
|
|
1648
1648
|
switch (e.column.fieldtype) {
|
|
1649
1649
|
case "Check":
|
|
@@ -1673,7 +1673,7 @@ const Bl = { class: "gantt-connection-overlay" }, Fl = {
|
|
|
1673
1673
|
value: m,
|
|
1674
1674
|
label: String(m)
|
|
1675
1675
|
}));
|
|
1676
|
-
}, o =
|
|
1676
|
+
}, o = R(() => !!(t.value || l.startValue || l.endValue)), s = (i) => {
|
|
1677
1677
|
!i && n.value !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = i, e.store.setFilter(e.colIndex, { value: i }));
|
|
1678
1678
|
}, u = (i, d) => {
|
|
1679
1679
|
i === "start" ? l.startValue = d : l.endValue = d, !l.startValue && !l.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
|
|
@@ -1791,7 +1791,7 @@ const Bl = { class: "gantt-connection-overlay" }, Fl = {
|
|
|
1791
1791
|
store: {}
|
|
1792
1792
|
},
|
|
1793
1793
|
setup(e) {
|
|
1794
|
-
const t =
|
|
1794
|
+
const t = R(() => e.columns.filter((s) => s.filterable)), l = R(() => e.store.config.rowActions?.enabled ?? !1), n = R(() => e.store.config.rowActions?.position ?? "before-index"), a = (s) => e.store.sortByColumn(s), o = (s) => {
|
|
1795
1795
|
for (const u of s) {
|
|
1796
1796
|
if (u.borderBoxSize.length === 0) continue;
|
|
1797
1797
|
const r = u.borderBoxSize[0].inlineSize, i = Number(u.target.dataset.colindex), d = e.store.columns[i]?.width;
|
|
@@ -1866,7 +1866,7 @@ const Bl = { class: "gantt-connection-overlay" }, Fl = {
|
|
|
1866
1866
|
store: {}
|
|
1867
1867
|
},
|
|
1868
1868
|
setup(e) {
|
|
1869
|
-
const t = pe("amodal"), { width: l, height: n } = Ze(t), a =
|
|
1869
|
+
const t = pe("amodal"), { width: l, height: n } = Ze(t), a = R(() => {
|
|
1870
1870
|
if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return {};
|
|
1871
1871
|
const o = e.store.modal.cell?.closest("table");
|
|
1872
1872
|
if (!o) return {};
|
|
@@ -1988,13 +1988,13 @@ const ao = (e) => {
|
|
|
1988
1988
|
};
|
|
1989
1989
|
}
|
|
1990
1990
|
return f;
|
|
1991
|
-
}, a = C(e.columns), o = C(e.rows), s = C(e.config || {}), u = C({}), r = C({}), i =
|
|
1991
|
+
}, a = C(e.columns), o = C(e.rows), s = C(e.config || {}), u = C({}), r = C({}), i = R(() => {
|
|
1992
1992
|
const f = {};
|
|
1993
1993
|
for (const [y, $] of a.value.entries())
|
|
1994
1994
|
for (const [q, Q] of o.value.entries())
|
|
1995
1995
|
f[`${y}:${q}`] = Q[$.name];
|
|
1996
1996
|
return f;
|
|
1997
|
-
}), d =
|
|
1997
|
+
}), d = R({
|
|
1998
1998
|
get: () => {
|
|
1999
1999
|
const f = n();
|
|
2000
2000
|
for (let y = 0; y < f.length; y++)
|
|
@@ -2010,12 +2010,12 @@ const ao = (e) => {
|
|
|
2010
2010
|
}), m = C(e.modal || { visible: !1 }), I = C({}), w = C([]), p = C([]), v = C([]), c = C({
|
|
2011
2011
|
column: null,
|
|
2012
2012
|
direction: null
|
|
2013
|
-
}), h = C({}), k =
|
|
2013
|
+
}), h = C({}), k = R(() => a.value.some((f) => f.pinned)), E = R(() => s.value.view === "gantt" || s.value.view === "tree-gantt"), S = R(() => s.value.view === "tree" || s.value.view === "tree-gantt"), D = R(() => {
|
|
2014
2014
|
const f = s.value;
|
|
2015
2015
|
return f.view === "gantt" || f.view === "tree-gantt" ? f.dependencyGraph !== !1 : !0;
|
|
2016
|
-
}), L =
|
|
2016
|
+
}), L = R(() => `${Math.ceil(o.value.length / 100 + 1)}ch`), z = R(
|
|
2017
2017
|
() => s.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(s.value.view) : !1
|
|
2018
|
-
), H =
|
|
2018
|
+
), H = R(() => {
|
|
2019
2019
|
let f = o.value.map((y, $) => ({
|
|
2020
2020
|
...y,
|
|
2021
2021
|
originalIndex: $
|
|
@@ -2072,7 +2072,7 @@ const ao = (e) => {
|
|
|
2072
2072
|
};
|
|
2073
2073
|
}, be = (f) => {
|
|
2074
2074
|
const y = o.value[f];
|
|
2075
|
-
return
|
|
2075
|
+
return E.value && y.gantt !== void 0;
|
|
2076
2076
|
}, He = (f) => !S.value || d.value[f].isRoot || d.value[f].open, Ne = (f) => !S.value && s.value.view !== "list-expansion" ? "" : S.value && (d.value[f].isRoot || d.value[f].isParent) ? d.value[f].childrenOpen ? "▼" : "►" : s.value.view === "list-expansion" ? d.value[f].expanded ? "▼" : "►" : "", me = (f) => {
|
|
2077
2077
|
if (S.value) {
|
|
2078
2078
|
const y = r.value[f] || {}, $ = !(y.childrenOpen ?? d.value[f].childrenOpen);
|
|
@@ -2127,7 +2127,7 @@ const ao = (e) => {
|
|
|
2127
2127
|
}, ve = (f) => {
|
|
2128
2128
|
const y = p.value.findIndex(($) => $.id === f.id);
|
|
2129
2129
|
y >= 0 ? p.value[y] = f : p.value.push(f);
|
|
2130
|
-
},
|
|
2130
|
+
}, Ee = (f) => {
|
|
2131
2131
|
const y = p.value.findIndex(($) => $.id === f);
|
|
2132
2132
|
y >= 0 && p.value.splice(y, 1);
|
|
2133
2133
|
}, Be = (f, y, $) => {
|
|
@@ -2184,7 +2184,7 @@ const ao = (e) => {
|
|
|
2184
2184
|
// getters
|
|
2185
2185
|
filteredRows: H,
|
|
2186
2186
|
hasPinnedColumns: k,
|
|
2187
|
-
isGanttView:
|
|
2187
|
+
isGanttView: E,
|
|
2188
2188
|
isTreeView: S,
|
|
2189
2189
|
isDependencyGraphEnabled: D,
|
|
2190
2190
|
numberedRowWidth: L,
|
|
@@ -2263,7 +2263,7 @@ const ao = (e) => {
|
|
|
2263
2263
|
setFilter: ie,
|
|
2264
2264
|
sortByColumn: oe,
|
|
2265
2265
|
toggleRowExpand: me,
|
|
2266
|
-
unregisterConnectionHandle:
|
|
2266
|
+
unregisterConnectionHandle: Ee,
|
|
2267
2267
|
unregisterGanttBar: Y,
|
|
2268
2268
|
updateGanttBar: V,
|
|
2269
2269
|
updateRows: J
|
|
@@ -2312,19 +2312,19 @@ const ro = {
|
|
|
2312
2312
|
config: e.config,
|
|
2313
2313
|
linkResolver: e.linkResolver ?? r
|
|
2314
2314
|
});
|
|
2315
|
-
i.$onAction(({ name: c, store: h, args: k, after:
|
|
2315
|
+
i.$onAction(({ name: c, store: h, args: k, after: E }) => {
|
|
2316
2316
|
if (c === "setCellData" || c === "setCellText") {
|
|
2317
2317
|
const [S, D, L] = k, z = h.getCellData(S, D);
|
|
2318
|
-
|
|
2318
|
+
E(() => {
|
|
2319
2319
|
n.value = [...i.rows], o("cellUpdate", { colIndex: S, rowIndex: D, newValue: L, oldValue: z });
|
|
2320
2320
|
});
|
|
2321
2321
|
} else if (c === "updateGanttBar") {
|
|
2322
2322
|
const [S] = k;
|
|
2323
2323
|
let D = !1;
|
|
2324
|
-
S.type === "resize" ? D = S.oldColspan !== S.newColspan : S.type === "bar" && (D = S.oldStart !== S.newStart || S.oldEnd !== S.newEnd), D &&
|
|
2324
|
+
S.type === "resize" ? D = S.oldColspan !== S.newColspan : S.type === "bar" && (D = S.oldStart !== S.newStart || S.oldEnd !== S.newEnd), D && E(() => {
|
|
2325
2325
|
o("gantt:drag", S);
|
|
2326
2326
|
});
|
|
2327
|
-
} else c === "resizeColumn" &&
|
|
2327
|
+
} else c === "resizeColumn" && E(() => {
|
|
2328
2328
|
a.value = [...i.columns], o("columns:update", [...i.columns]);
|
|
2329
2329
|
});
|
|
2330
2330
|
}), le(
|
|
@@ -2339,12 +2339,12 @@ const ro = {
|
|
|
2339
2339
|
JSON.stringify(c) !== JSON.stringify(i.columns) && (i.columns = [...c], o("columns:update", [...c]));
|
|
2340
2340
|
},
|
|
2341
2341
|
{ deep: !0 }
|
|
2342
|
-
),
|
|
2342
|
+
), Re(() => {
|
|
2343
2343
|
a.value?.some((c) => c.pinned) && (m(), i.isTreeView && Qt(s, m, { childList: !0, subtree: !0 }));
|
|
2344
2344
|
});
|
|
2345
|
-
const d =
|
|
2346
|
-
const c = s.value, h = c?.rows[0], k = c?.rows[1],
|
|
2347
|
-
for (const [S, D] of
|
|
2345
|
+
const d = R(() => i.columns.filter((c) => c.pinned).length), m = () => {
|
|
2346
|
+
const c = s.value, h = c?.rows[0], k = c?.rows[1], E = h ? Array.from(h.cells) : [];
|
|
2347
|
+
for (const [S, D] of E.entries()) {
|
|
2348
2348
|
const L = k?.cells[S];
|
|
2349
2349
|
L && (D.style.width = `${L.offsetWidth}px`);
|
|
2350
2350
|
}
|
|
@@ -2368,8 +2368,8 @@ const ro = {
|
|
|
2368
2368
|
return i.columns;
|
|
2369
2369
|
const h = [];
|
|
2370
2370
|
for (let k = 0; k < d.value; k++) {
|
|
2371
|
-
const
|
|
2372
|
-
|
|
2371
|
+
const E = { ...i.columns[k] };
|
|
2372
|
+
E.originalIndex = k, h.push(E);
|
|
2373
2373
|
}
|
|
2374
2374
|
return h.push({
|
|
2375
2375
|
...i.columns[d.value],
|
|
@@ -2386,8 +2386,8 @@ const ro = {
|
|
|
2386
2386
|
}, v = (c, h) => {
|
|
2387
2387
|
switch (c) {
|
|
2388
2388
|
case "add": {
|
|
2389
|
-
const k = i.addRow({}, h + 1),
|
|
2390
|
-
n.value = [...i.rows], o("row:add", { rowIndex: k, row:
|
|
2389
|
+
const k = i.addRow({}, h + 1), E = i.rows[k];
|
|
2390
|
+
n.value = [...i.rows], o("row:add", { rowIndex: k, row: E });
|
|
2391
2391
|
break;
|
|
2392
2392
|
}
|
|
2393
2393
|
case "delete": {
|
|
@@ -2398,19 +2398,19 @@ const ro = {
|
|
|
2398
2398
|
case "duplicate": {
|
|
2399
2399
|
const k = i.duplicateRow(h);
|
|
2400
2400
|
if (k >= 0) {
|
|
2401
|
-
const
|
|
2402
|
-
n.value = [...i.rows], o("row:duplicate", { sourceIndex: h, newIndex: k, row:
|
|
2401
|
+
const E = i.rows[k];
|
|
2402
|
+
n.value = [...i.rows], o("row:duplicate", { sourceIndex: h, newIndex: k, row: E });
|
|
2403
2403
|
}
|
|
2404
2404
|
break;
|
|
2405
2405
|
}
|
|
2406
2406
|
case "insertAbove": {
|
|
2407
|
-
const k = i.insertRowAbove(h),
|
|
2408
|
-
n.value = [...i.rows], o("row:insert-above", { targetIndex: h, newIndex: k, row:
|
|
2407
|
+
const k = i.insertRowAbove(h), E = i.rows[k];
|
|
2408
|
+
n.value = [...i.rows], o("row:insert-above", { targetIndex: h, newIndex: k, row: E });
|
|
2409
2409
|
break;
|
|
2410
2410
|
}
|
|
2411
2411
|
case "insertBelow": {
|
|
2412
|
-
const k = i.insertRowBelow(h),
|
|
2413
|
-
n.value = [...i.rows], o("row:insert-below", { targetIndex: h, newIndex: k, row:
|
|
2412
|
+
const k = i.insertRowBelow(h), E = i.rows[k];
|
|
2413
|
+
n.value = [...i.rows], o("row:insert-below", { targetIndex: h, newIndex: k, row: E });
|
|
2414
2414
|
break;
|
|
2415
2415
|
}
|
|
2416
2416
|
case "move": {
|
|
@@ -2448,8 +2448,8 @@ const ro = {
|
|
|
2448
2448
|
], !0),
|
|
2449
2449
|
b("tbody", null, [
|
|
2450
2450
|
Me(c.$slots, "body", { data: B(i) }, () => [
|
|
2451
|
-
(g(!0), x(X, null, ge(B(i).filteredRows, (k,
|
|
2452
|
-
key: `${k.originalIndex}-${
|
|
2451
|
+
(g(!0), x(X, null, ge(B(i).filteredRows, (k, E) => (g(), fe(en, {
|
|
2452
|
+
key: `${k.originalIndex}-${E}`,
|
|
2453
2453
|
row: k,
|
|
2454
2454
|
"row-index": k.originalIndex,
|
|
2455
2455
|
store: B(i),
|
|
@@ -2595,7 +2595,7 @@ const ko = { class: "aform_form-element" }, Mo = { class: "aform_field-label" },
|
|
|
2595
2595
|
for (const [n, a] of t)
|
|
2596
2596
|
l[n] = a;
|
|
2597
2597
|
return l;
|
|
2598
|
-
},
|
|
2598
|
+
}, Eo = /* @__PURE__ */ ke(Co, [["__scopeId", "data-v-cc185b72"]]), Ro = /* @__PURE__ */ te({
|
|
2599
2599
|
__name: "AComboBox",
|
|
2600
2600
|
props: {
|
|
2601
2601
|
schema: {},
|
|
@@ -2658,7 +2658,7 @@ const Ao = Object.prototype.toString, Lo = (e) => Ao.call(e) === "[object Object
|
|
|
2658
2658
|
function Vo(...e) {
|
|
2659
2659
|
if (e.length !== 1) return Xt(...e);
|
|
2660
2660
|
const t = e[0];
|
|
2661
|
-
return typeof t == "function" ?
|
|
2661
|
+
return typeof t == "function" ? Et(Ct(() => ({
|
|
2662
2662
|
get: t,
|
|
2663
2663
|
set: ze
|
|
2664
2664
|
}))) : C(t);
|
|
@@ -2679,7 +2679,7 @@ function Ue(e) {
|
|
|
2679
2679
|
return (t = l?.$el) !== null && t !== void 0 ? t : l;
|
|
2680
2680
|
}
|
|
2681
2681
|
function mt(...e) {
|
|
2682
|
-
const t = (n, a, o, s) => (n.addEventListener(a, o, s), () => n.removeEventListener(a, o, s)), l =
|
|
2682
|
+
const t = (n, a, o, s) => (n.addEventListener(a, o, s), () => n.removeEventListener(a, o, s)), l = R(() => {
|
|
2683
2683
|
const n = ft(A(e[0])).filter((a) => a != null);
|
|
2684
2684
|
return n.every((a) => typeof a != "string") ? n : void 0;
|
|
2685
2685
|
});
|
|
@@ -2719,8 +2719,8 @@ function lt(e, t, l = {}) {
|
|
|
2719
2719
|
return h && h.$.subTree.shapeFlag === 16;
|
|
2720
2720
|
}
|
|
2721
2721
|
function m(c, h) {
|
|
2722
|
-
const k = A(c),
|
|
2723
|
-
return
|
|
2722
|
+
const k = A(c), E = k.$.subTree && k.$.subTree.children;
|
|
2723
|
+
return E == null || !Array.isArray(E) ? !1 : E.some((S) => S.el === h.target || h.composedPath().includes(S.el));
|
|
2724
2724
|
}
|
|
2725
2725
|
const I = (c) => {
|
|
2726
2726
|
const h = Ue(e);
|
|
@@ -2778,7 +2778,7 @@ function No(e) {
|
|
|
2778
2778
|
return t.files;
|
|
2779
2779
|
}
|
|
2780
2780
|
function Zo(e = {}) {
|
|
2781
|
-
const { document: t = Fo } = e, l = C(No(e.initialFiles)), { on: n, trigger: a } = /* @__PURE__ */ qt(), { on: o, trigger: s } = /* @__PURE__ */ qt(), u =
|
|
2781
|
+
const { document: t = Fo } = e, l = C(No(e.initialFiles)), { on: n, trigger: a } = /* @__PURE__ */ qt(), { on: o, trigger: s } = /* @__PURE__ */ qt(), u = R(() => {
|
|
2782
2782
|
var m;
|
|
2783
2783
|
const I = (m = Ue(e.input)) !== null && m !== void 0 ? m : t ? t.createElement("input") : void 0;
|
|
2784
2784
|
return I && (I.type = "file", I.onchange = (w) => {
|
|
@@ -2804,7 +2804,7 @@ function Zo(e = {}) {
|
|
|
2804
2804
|
return St(() => {
|
|
2805
2805
|
i(e);
|
|
2806
2806
|
}), {
|
|
2807
|
-
files:
|
|
2807
|
+
files: Et(l),
|
|
2808
2808
|
open: d,
|
|
2809
2809
|
reset: r,
|
|
2810
2810
|
onCancel: o,
|
|
@@ -2833,7 +2833,7 @@ function Oo(e, t = !1) {
|
|
|
2833
2833
|
const s = pt(A(e));
|
|
2834
2834
|
!s || !l.value || (s.style.overflow = n, ht.delete(s), l.value = !1);
|
|
2835
2835
|
};
|
|
2836
|
-
return on(o),
|
|
2836
|
+
return on(o), R({
|
|
2837
2837
|
get() {
|
|
2838
2838
|
return l.value;
|
|
2839
2839
|
},
|
|
@@ -2867,13 +2867,13 @@ const Go = { class: "aform_display-value" }, Uo = { key: 0 }, Wo = {
|
|
|
2867
2867
|
}),
|
|
2868
2868
|
emits: /* @__PURE__ */ xe(["get-date"], ["update:modelValue"]),
|
|
2869
2869
|
setup(e, { expose: t, emit: l }) {
|
|
2870
|
-
const n = Te(e, "modelValue"), a = C(new Date(n.value)), o = C(a.value.getMonth()), s = C(a.value.getFullYear()), u = C([]), r = C(new Date(n.value)), i = C(null), d = C(null), m = pe("start-date-input"), I = pe("end-date-input"), w = l, p =
|
|
2870
|
+
const n = Te(e, "modelValue"), a = C(new Date(n.value)), o = C(a.value.getMonth()), s = C(a.value.getFullYear()), u = C([]), r = C(new Date(n.value)), i = C(null), d = C(null), m = pe("start-date-input"), I = pe("end-date-input"), w = l, p = R(() => new Date(s.value, o.value, 1).toLocaleDateString(void 0, {
|
|
2871
2871
|
year: "numeric",
|
|
2872
2872
|
month: "long"
|
|
2873
|
-
})), v =
|
|
2873
|
+
})), v = R(() => i.value != null ? h(i.value) : ""), c = R(() => d.value != null ? h(d.value) : ""), h = (M) => me(M) ? M.getMonth() + 1 + "/" + M.getDate() + "/" + M.getFullYear() : "", k = (M) => {
|
|
2874
2874
|
const T = /* @__PURE__ */ new Date();
|
|
2875
2875
|
return o.value !== T.getMonth() ? !1 : T.toDateString() === new Date(M).toDateString();
|
|
2876
|
-
},
|
|
2876
|
+
}, E = (M) => new Date(M).toDateString() === new Date(a.value).toDateString(), S = (M) => {
|
|
2877
2877
|
const T = i.value;
|
|
2878
2878
|
return me(T) ? new Date(M).toDateString() === T.toDateString() : !1;
|
|
2879
2879
|
}, D = (M) => {
|
|
@@ -2927,7 +2927,7 @@ const Go = { class: "aform_display-value" }, Uo = { key: 0 }, Wo = {
|
|
|
2927
2927
|
selected: a.value
|
|
2928
2928
|
});
|
|
2929
2929
|
};
|
|
2930
|
-
return
|
|
2930
|
+
return Re(async () => {
|
|
2931
2931
|
_(), await at();
|
|
2932
2932
|
const M = document.getElementsByClassName("selectedDate");
|
|
2933
2933
|
if (M.length > 0)
|
|
@@ -2996,7 +2996,7 @@ const Go = { class: "aform_display-value" }, Uo = { key: 0 }, Wo = {
|
|
|
2996
2996
|
key: L(V, U),
|
|
2997
2997
|
class: de(["date-cell", {
|
|
2998
2998
|
todaysDate: k(H(V, U)),
|
|
2999
|
-
selectedDate:
|
|
2999
|
+
selectedDate: E(H(V, U)),
|
|
3000
3000
|
withinRange: e.selectRange ? z(H(V, U)) : !1,
|
|
3001
3001
|
startDate: e.selectRange ? S(H(V, U)) : !1,
|
|
3002
3002
|
endDate: e.selectRange ? D(H(V, U)) : !1
|
|
@@ -3033,7 +3033,7 @@ const Go = { class: "aform_display-value" }, Uo = { key: 0 }, Wo = {
|
|
|
3033
3033
|
minutes: String(e.defaultMinutes).padStart(2, "0"),
|
|
3034
3034
|
seconds: String(e.defaultSeconds).padStart(2, "0")
|
|
3035
3035
|
}), o = C(e.defaultMeridiem == "AM" ? "AM" : "PM");
|
|
3036
|
-
|
|
3036
|
+
Re(() => {
|
|
3037
3037
|
u();
|
|
3038
3038
|
});
|
|
3039
3039
|
const s = () => {
|
|
@@ -3055,8 +3055,8 @@ const Go = { class: "aform_display-value" }, Uo = { key: 0 }, Wo = {
|
|
|
3055
3055
|
}, i = (w, p = 1) => {
|
|
3056
3056
|
const v = e.allowMilitaryTime ? 23 : 12, c = e.allowMilitaryTime ? 0 : 1;
|
|
3057
3057
|
if (w == "hours") {
|
|
3058
|
-
const
|
|
3059
|
-
a.hours = String(
|
|
3058
|
+
const E = Number(a.hours);
|
|
3059
|
+
a.hours = String(E + p), (E == 11 && Number(a.hours) == 12 || E == 12 && Number(a.hours) == 11) && m();
|
|
3060
3060
|
} else w == "minutes" ? a.minutes = String(Number(a.minutes) + p) : w == "seconds" && (a.seconds = String(Number(a.seconds) + p));
|
|
3061
3061
|
const h = Number(a.hours);
|
|
3062
3062
|
Number(a.seconds) < 0 ? a.minutes = String(Number(a.minutes) - 1) : Number(a.seconds) > 59 && (a.minutes = String(Number(a.minutes) + 1)), Number(a.minutes) < 0 ? a.hours = String(h - 1) : Number(a.minutes) > 59 && (a.hours = String(h + 1));
|
|
@@ -3255,7 +3255,7 @@ const Go = { class: "aform_display-value" }, Uo = { key: 0 }, Wo = {
|
|
|
3255
3255
|
}),
|
|
3256
3256
|
emits: ["update:modelValue"],
|
|
3257
3257
|
setup(e) {
|
|
3258
|
-
const t = Te(e, "modelValue"), l = C(t.value ? new Date(t.value) : /* @__PURE__ */ new Date()), n =
|
|
3258
|
+
const t = Te(e, "modelValue"), l = C(t.value ? new Date(t.value) : /* @__PURE__ */ new Date()), n = R({
|
|
3259
3259
|
get: () => l.value.toISOString().split("T")[0],
|
|
3260
3260
|
set: (u) => {
|
|
3261
3261
|
l.value = new Date(u), t.value = u;
|
|
@@ -3456,7 +3456,7 @@ const ga = {
|
|
|
3456
3456
|
}), Ta = /* @__PURE__ */ ke(Ia, [["__scopeId", "data-v-c823d475"]]), Da = { class: "aduration" }, $a = { class: "aform_display-value" }, Sa = { class: "aduration__footer" }, Ca = {
|
|
3457
3457
|
key: 0,
|
|
3458
3458
|
class: "aduration__summary"
|
|
3459
|
-
},
|
|
3459
|
+
}, Ea = { class: "aduration__value" }, Ra = { class: "aduration__ms" }, Aa = /* @__PURE__ */ te({
|
|
3460
3460
|
__name: "ADuration",
|
|
3461
3461
|
props: /* @__PURE__ */ xe({
|
|
3462
3462
|
label: { default: "Duration" },
|
|
@@ -3469,7 +3469,7 @@ const ga = {
|
|
|
3469
3469
|
}),
|
|
3470
3470
|
emits: ["update:modelValue"],
|
|
3471
3471
|
setup(e) {
|
|
3472
|
-
const t = Te(e, "modelValue"), l = C(null), n = C(null), a =
|
|
3472
|
+
const t = Te(e, "modelValue"), l = C(null), n = C(null), a = R(() => {
|
|
3473
3473
|
if (!l.value || !n.value) return 0;
|
|
3474
3474
|
const r = n.value.getTime() - l.value.getTime();
|
|
3475
3475
|
return r > 0 ? r : 0;
|
|
@@ -3479,12 +3479,12 @@ const ga = {
|
|
|
3479
3479
|
});
|
|
3480
3480
|
const o = (r) => {
|
|
3481
3481
|
l.value = r.start, n.value = r.end, t.value = a.value;
|
|
3482
|
-
}, s =
|
|
3482
|
+
}, s = R(() => {
|
|
3483
3483
|
const r = a.value;
|
|
3484
3484
|
if (r === 0) return "0s";
|
|
3485
3485
|
const i = Math.floor(r / 1e3) % 60, d = Math.floor(r / 6e4) % 60, m = Math.floor(r / 36e5) % 24, I = Math.floor(r / 864e5);
|
|
3486
3486
|
return [I && `${I}d`, m && `${m}h`, d && `${d}m`, i && `${i}s`].filter(Boolean).join(" ") || "0s";
|
|
3487
|
-
}), u =
|
|
3487
|
+
}), u = R(() => {
|
|
3488
3488
|
const r = t.value;
|
|
3489
3489
|
if (!r) return "—";
|
|
3490
3490
|
const i = Math.floor(r / 1e3) % 60, d = Math.floor(r / 6e4) % 60, m = Math.floor(r / 36e5) % 24, I = Math.floor(r / 864e5);
|
|
@@ -3508,8 +3508,8 @@ const ga = {
|
|
|
3508
3508
|
b("label", null, F(e.label), 1),
|
|
3509
3509
|
l.value && n.value ? (g(), x("div", Ca, [
|
|
3510
3510
|
i[0] || (i[0] = b("span", { class: "aduration__label" }, "Duration:", -1)),
|
|
3511
|
-
b("span",
|
|
3512
|
-
b("span",
|
|
3511
|
+
b("span", Ea, F(s.value), 1),
|
|
3512
|
+
b("span", Ra, "(" + F(t.value ?? 0) + " ms)", 1)
|
|
3513
3513
|
])) : N("", !0)
|
|
3514
3514
|
])
|
|
3515
3515
|
], 64))
|
|
@@ -3538,10 +3538,10 @@ const ga = {
|
|
|
3538
3538
|
lt(s, () => o.value = !1);
|
|
3539
3539
|
const u = () => {
|
|
3540
3540
|
e.mode !== "read" && (o.value = !0);
|
|
3541
|
-
}, r = (v) => v ? `${v.getMonth() + 1}/${v.getDate()}/${v.getFullYear()}` : "", i =
|
|
3541
|
+
}, r = (v) => v ? `${v.getMonth() + 1}/${v.getDate()}/${v.getFullYear()}` : "", i = R(() => {
|
|
3542
3542
|
const v = r(n.value), c = r(a.value);
|
|
3543
3543
|
return v && c ? `${v} — ${c}` : v ? `${v} — ...` : "";
|
|
3544
|
-
}), d =
|
|
3544
|
+
}), d = R(() => {
|
|
3545
3545
|
const v = l.value.start_date, c = l.value.end_date;
|
|
3546
3546
|
return !v && !c ? "" : v && c ? `${t(v)} — ${t(c)}` : v ? `From ${t(v)}` : `Until ${t(c)}`;
|
|
3547
3547
|
}), m = () => {
|
|
@@ -3594,23 +3594,13 @@ const ga = {
|
|
|
3594
3594
|
], 64))
|
|
3595
3595
|
]));
|
|
3596
3596
|
}
|
|
3597
|
-
}), Za = /* @__PURE__ */ ke(Na, [["__scopeId", "data-v-810e8eb5"]]), Oa =
|
|
3598
|
-
__name: "CollapseButton",
|
|
3599
|
-
props: {
|
|
3600
|
-
collapsed: { type: Boolean }
|
|
3601
|
-
},
|
|
3602
|
-
setup(e) {
|
|
3603
|
-
return (t, l) => (g(), x("button", {
|
|
3604
|
-
class: de(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
|
|
3605
|
-
}, "×", 2));
|
|
3606
|
-
}
|
|
3607
|
-
}), Ga = /* @__PURE__ */ ke(Oa, [["__scopeId", "data-v-6f1c1b45"]]), Ua = { class: "aform" }, Wa = {
|
|
3597
|
+
}), Za = /* @__PURE__ */ ke(Na, [["__scopeId", "data-v-810e8eb5"]]), Oa = { class: "aform" }, Ga = {
|
|
3608
3598
|
key: 0,
|
|
3609
3599
|
class: "aform-nested-section"
|
|
3610
|
-
},
|
|
3600
|
+
}, Ua = {
|
|
3611
3601
|
key: 0,
|
|
3612
3602
|
class: "aform-nested-label"
|
|
3613
|
-
},
|
|
3603
|
+
}, Wa = /* @__PURE__ */ te({
|
|
3614
3604
|
__name: "AForm",
|
|
3615
3605
|
props: /* @__PURE__ */ xe({
|
|
3616
3606
|
schema: {},
|
|
@@ -3621,7 +3611,7 @@ const ga = {
|
|
|
3621
3611
|
}),
|
|
3622
3612
|
emits: /* @__PURE__ */ xe(["update:schema", "update:data"], ["update:data"]),
|
|
3623
3613
|
setup(e, { emit: t }) {
|
|
3624
|
-
const l = t, n = Te(e, "data"), a = (w) => "schema" in w && Array.isArray(w.schema) && w.schema.length > 0
|
|
3614
|
+
const l = t, n = Te(e, "data"), a = (w) => (w.kind === "link" || w.kind === "fieldset") && "schema" in w && Array.isArray(w.schema) && w.schema.length > 0, o = C({});
|
|
3625
3615
|
le(
|
|
3626
3616
|
() => n.value,
|
|
3627
3617
|
(w) => {
|
|
@@ -3637,22 +3627,19 @@ const ga = {
|
|
|
3637
3627
|
const p = {};
|
|
3638
3628
|
for (const [v, c] of Object.entries(w))
|
|
3639
3629
|
["component", "fieldtype", "hidden", "mode", "width"].includes(v) || (p[v] = c);
|
|
3640
|
-
|
|
3641
|
-
const v = w.rows;
|
|
3642
|
-
(!v || Array.isArray(v) && v.length === 0) && (p.rows = n.value[w.fieldname] || []);
|
|
3643
|
-
}
|
|
3644
|
-
return p;
|
|
3630
|
+
return (w.kind === "table" || "columns" in w) && (p.rows = n.value[w.fieldname] || []), p;
|
|
3645
3631
|
}, r = (w) => {
|
|
3632
|
+
if (w.kind !== "field") return {};
|
|
3646
3633
|
const p = w.width;
|
|
3647
3634
|
return p ? { flexBasis: p, width: p } : {};
|
|
3648
|
-
}, i =
|
|
3635
|
+
}, i = R(() => e.mode ?? "edit");
|
|
3649
3636
|
function d(w) {
|
|
3650
3637
|
const p = w.mode;
|
|
3651
3638
|
return p || i.value;
|
|
3652
3639
|
}
|
|
3653
3640
|
const m = C([]);
|
|
3654
3641
|
St(() => {
|
|
3655
|
-
e.schema && m.value.length !== e.schema.length && (m.value = e.schema.map((w, p) =>
|
|
3642
|
+
e.schema && m.value.length !== e.schema.length && (m.value = e.schema.map((w, p) => R({
|
|
3656
3643
|
get() {
|
|
3657
3644
|
return n.value?.[e.schema[p].fieldname];
|
|
3658
3645
|
},
|
|
@@ -3662,17 +3649,17 @@ const ga = {
|
|
|
3662
3649
|
}
|
|
3663
3650
|
})));
|
|
3664
3651
|
});
|
|
3665
|
-
const I =
|
|
3666
|
-
return (w, p) => (g(), x("form",
|
|
3652
|
+
const I = R(() => m.value);
|
|
3653
|
+
return (w, p) => (g(), x("form", Oa, [
|
|
3667
3654
|
(g(!0), x(X, null, ge(e.schema, (v, c) => (g(), x(X, { key: c }, [
|
|
3668
|
-
a(v) ? (g(), x("div",
|
|
3669
|
-
v.label &&
|
|
3655
|
+
a(v) ? (g(), x("div", Ga, [
|
|
3656
|
+
v.label && v.kind !== "fieldset" ? (g(), x("h4", Ua, F(v.label), 1)) : N("", !0),
|
|
3670
3657
|
(g(), fe(Ge(v.component ?? "AForm"), {
|
|
3671
3658
|
data: o.value[v.fieldname],
|
|
3672
3659
|
mode: d(v),
|
|
3673
3660
|
schema: v.schema,
|
|
3674
3661
|
label: v.label,
|
|
3675
|
-
collapsible: v.collapsible,
|
|
3662
|
+
collapsible: v.kind === "fieldset" ? v.collapsible : void 0,
|
|
3676
3663
|
"onUpdate:data": (h) => s(v.fieldname, h)
|
|
3677
3664
|
}, null, 40, ["data", "mode", "schema", "label", "collapsible", "onUpdate:data"]))
|
|
3678
3665
|
])) : v.hidden ? N("", !0) : (g(), fe(Ge(v.component), ot({
|
|
@@ -3687,7 +3674,17 @@ const ga = {
|
|
|
3687
3674
|
], 64))), 128))
|
|
3688
3675
|
]));
|
|
3689
3676
|
}
|
|
3690
|
-
}), cn = /* @__PURE__ */ ke(
|
|
3677
|
+
}), cn = /* @__PURE__ */ ke(Wa, [["__scopeId", "data-v-5396e11b"]]), qa = /* @__PURE__ */ te({
|
|
3678
|
+
__name: "CollapseButton",
|
|
3679
|
+
props: {
|
|
3680
|
+
collapsed: { type: Boolean }
|
|
3681
|
+
},
|
|
3682
|
+
setup(e) {
|
|
3683
|
+
return (t, l) => (g(), x("button", {
|
|
3684
|
+
class: de(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
|
|
3685
|
+
}, "×", 2));
|
|
3686
|
+
}
|
|
3687
|
+
}), za = /* @__PURE__ */ ke(qa, [["__scopeId", "data-v-6f1c1b45"]]), _a = /* @__PURE__ */ te({
|
|
3691
3688
|
__name: "AFieldset",
|
|
3692
3689
|
props: {
|
|
3693
3690
|
schema: {},
|
|
@@ -3708,7 +3705,7 @@ const ga = {
|
|
|
3708
3705
|
onSubmit: o
|
|
3709
3706
|
}, [
|
|
3710
3707
|
Mt(F(e.label) + " ", 1),
|
|
3711
|
-
e.collapsible ? (g(), fe(
|
|
3708
|
+
e.collapsible ? (g(), fe(za, {
|
|
3712
3709
|
key: 0,
|
|
3713
3710
|
collapsed: l.value
|
|
3714
3711
|
}, null, 8, ["collapsed"])) : N("", !0)
|
|
@@ -3725,7 +3722,7 @@ const ga = {
|
|
|
3725
3722
|
], !0)
|
|
3726
3723
|
]));
|
|
3727
3724
|
}
|
|
3728
|
-
}), Ya = /* @__PURE__ */ ke(_a, [["__scopeId", "data-v-
|
|
3725
|
+
}), Ya = /* @__PURE__ */ ke(_a, [["__scopeId", "data-v-162e7317"]]), Xa = { class: "aform_form-element aform_file-attach aform__grid--full" }, Ka = {
|
|
3729
3726
|
key: 0,
|
|
3730
3727
|
class: "aform_file-attach-feedback"
|
|
3731
3728
|
}, ja = {
|
|
@@ -3747,7 +3744,7 @@ const ga = {
|
|
|
3747
3744
|
validation: {}
|
|
3748
3745
|
},
|
|
3749
3746
|
setup(e) {
|
|
3750
|
-
const { files: t, open: l, reset: n, onChange: a } = Zo(), o =
|
|
3747
|
+
const { files: t, open: l, reset: n, onChange: a } = Zo(), o = R(() => {
|
|
3751
3748
|
const s = t.value?.length ?? 0;
|
|
3752
3749
|
return `${s} ${s === 1 ? "file" : "files"}`;
|
|
3753
3750
|
});
|
|
@@ -3822,10 +3819,10 @@ const ga = {
|
|
|
3822
3819
|
}),
|
|
3823
3820
|
emits: ["update:modelValue"],
|
|
3824
3821
|
setup(e) {
|
|
3825
|
-
const t = Te(e, "modelValue"), l =
|
|
3822
|
+
const t = Te(e, "modelValue"), l = R(() => {
|
|
3826
3823
|
const D = t.value?.id;
|
|
3827
3824
|
return D != null && D !== "";
|
|
3828
|
-
}), n =
|
|
3825
|
+
}), n = R(() => l.value ? e.formatter ? e.formatter(t.value) : t.value.displayText ?? String(t.value.id) : "—"), a = C(l.value ? n.value : ""), o = C(!1), s = C(!1), u = C([]), r = C(null), i = yt("aformLinkNavigator", null), d = yt("aformLinkResolver", null);
|
|
3829
3826
|
le(
|
|
3830
3827
|
() => t.value,
|
|
3831
3828
|
(D) => {
|
|
@@ -3871,7 +3868,7 @@ const ga = {
|
|
|
3871
3868
|
}, k = () => {
|
|
3872
3869
|
const D = u.value.length;
|
|
3873
3870
|
D && (r.value = r.value === null ? 0 : (r.value + 1) % D);
|
|
3874
|
-
},
|
|
3871
|
+
}, E = () => {
|
|
3875
3872
|
u.value.length && (r.value === null || r.value === 0 ? r.value = null : r.value -= 1);
|
|
3876
3873
|
}, S = () => {
|
|
3877
3874
|
r.value !== null && u.value[r.value] && h(u.value[r.value]);
|
|
@@ -3889,7 +3886,7 @@ const ga = {
|
|
|
3889
3886
|
onFocus: v,
|
|
3890
3887
|
onKeydown: [
|
|
3891
3888
|
ce(ae(k, ["prevent"]), ["down"]),
|
|
3892
|
-
ce(ae(
|
|
3889
|
+
ce(ae(E, ["prevent"]), ["up"]),
|
|
3893
3890
|
ce(ae(S, ["prevent"]), ["enter"]),
|
|
3894
3891
|
ce(w, ["esc"]),
|
|
3895
3892
|
ce(w, ["tab"])
|
|
@@ -4013,7 +4010,7 @@ function Ds(e, t) {
|
|
|
4013
4010
|
} else
|
|
4014
4011
|
e.value = l;
|
|
4015
4012
|
}
|
|
4016
|
-
const $s = { class: "aform_form-element" }, Ss = { class: "aform_display-value" }, Cs = { class: "aform_field-label" },
|
|
4013
|
+
const $s = { class: "aform_form-element" }, Ss = { class: "aform_display-value" }, Cs = { class: "aform_field-label" }, Es = ["id", "disabled", "maxlength", "required"], Rs = ["for"], As = ["innerHTML"], Ls = /* @__PURE__ */ te({
|
|
4017
4014
|
__name: "ATextInput",
|
|
4018
4015
|
props: /* @__PURE__ */ xe({
|
|
4019
4016
|
schema: {},
|
|
@@ -4043,14 +4040,14 @@ const $s = { class: "aform_form-element" }, Ss = { class: "aform_display-value"
|
|
|
4043
4040
|
disabled: e.mode === "read",
|
|
4044
4041
|
maxlength: e.mask && t.value ? e.mask.length : void 0,
|
|
4045
4042
|
required: e.required
|
|
4046
|
-
}, null, 8,
|
|
4043
|
+
}, null, 8, Es), [
|
|
4047
4044
|
[we, l.value],
|
|
4048
4045
|
[B(Ds), e.mask]
|
|
4049
4046
|
]),
|
|
4050
4047
|
b("label", {
|
|
4051
4048
|
class: "aform_field-label",
|
|
4052
4049
|
for: e.uuid
|
|
4053
|
-
}, F(e.label), 9,
|
|
4050
|
+
}, F(e.label), 9, Rs),
|
|
4054
4051
|
j(b("p", {
|
|
4055
4052
|
class: "aform_error",
|
|
4056
4053
|
innerHTML: e.validation.errorMessage
|
|
@@ -4145,11 +4142,11 @@ const $s = { class: "aform_form-element" }, Ss = { class: "aform_display-value"
|
|
|
4145
4142
|
}
|
|
4146
4143
|
}), Xs = /* @__PURE__ */ ke(zs, [["__scopeId", "data-v-d9ffd0a7"]]);
|
|
4147
4144
|
function Ks(e) {
|
|
4148
|
-
e.use(xo), e.component("ACheckbox",
|
|
4145
|
+
e.use(xo), e.component("ACheckbox", Eo), e.component("AComboBox", Ro), e.component("ADate", pa), e.component("ADropdown", Ta), e.component("ADatePicker", rn), e.component("ADateTime", kt), e.component("ADateRange", Za), e.component("ADateSelection", rt), e.component("AFieldset", Ya), e.component("AFileAttach", ns), e.component("AForm", cn), e.component("AFormLink", ms), e.component("ANumericInput", xs), e.component("ATextInput", Ls), e.component("ADuration", La);
|
|
4149
4146
|
}
|
|
4150
4147
|
export {
|
|
4151
|
-
|
|
4152
|
-
|
|
4148
|
+
Eo as ACheckbox,
|
|
4149
|
+
Ro as AComboBox,
|
|
4153
4150
|
pa as ADate,
|
|
4154
4151
|
rn as ADatePicker,
|
|
4155
4152
|
Za as ADateRange,
|