@gemafajarramadhan/dynamic-ui 1.2.57 → 1.2.58
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/dynamic-ui.es.js +774 -773
- package/dist/dynamic-ui.umd.js +9 -9
- package/package.json +1 -1
package/dist/dynamic-ui.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var hf = Object.defineProperty;
|
|
2
2
|
var pf = (e, t, n) => t in e ? hf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Te = (e, t, n) => pf(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { computed as O, ref as Y, shallowRef as sr, watch as Fe, getCurrentScope as mf, onScopeDispose as gf, shallowReadonly as zs, unref as C, defineComponent as xe, useAttrs as Wt, onMounted as Ct, onBeforeUnmount as fn, withDirectives as ln, openBlock as p, createElementBlock as k, normalizeClass as ue, Fragment as we, createCommentVNode as z, createElementVNode as v, createTextVNode as Ie, toDisplayString as
|
|
4
|
+
import { computed as O, ref as Y, shallowRef as sr, watch as Fe, getCurrentScope as mf, onScopeDispose as gf, shallowReadonly as zs, unref as C, defineComponent as xe, useAttrs as Wt, onMounted as Ct, onBeforeUnmount as fn, withDirectives as ln, openBlock as p, createElementBlock as k, normalizeClass as ue, Fragment as we, createCommentVNode as z, createElementVNode as v, createTextVNode as Ie, toDisplayString as W, renderSlot as Be, createBlock as pe, resolveDynamicComponent as _t, mergeProps as Ke, withModifiers as xt, createVNode as G, Teleport as Ga, normalizeStyle as ct, renderList as Ve, vShow as cs, onUnmounted as no, withCtx as re, normalizeProps as Hn, guardReactiveProps as Gn, nextTick as tn, vModelText as qa, toRef as bf, createSlots as or, withKeys as ws, Transition as En, resolveComponent as Jo, reactive as Rt, isRef as Ri, toRaw as an, createApp as yf, h as Qo, isVNode as sd, cloneVNode as vf, watchEffect as vo, getCurrentInstance as xo, inject as Ks, provide as xf, defineCustomElement as od } from "vue";
|
|
5
5
|
import * as mn from "lucide-vue-next";
|
|
6
6
|
import { ChevronDown as Ps, Eye as ar, EyeOff as wf, Check as Pa, Minus as kf, Loader2 as Nn, AlertCircle as Xa, X as Ss, Calendar as _f, CheckCircle2 as Jr, Upload as Cf, FileText as ir, Pencil as ad, Trash2 as rr, ArrowRight as Af, MessageSquare as Qr, Phone as Sf, Globe as Df, Cpu as Mf, CpuIcon as Ef, Share2 as Pf, Link as Tf, User as Of, Circle as If, MapPinIcon as Lf, ServerIcon as Bf, PencilIcon as Rf, ShoppingCartIcon as Ff, ClockIcon as $f, PlaneIcon as zf, UploadCloud as Vf, ChevronRight as lr, MoreHorizontal as Uf, ChevronLeftIcon as id, ChevronRightIcon as rd, ChevronUp as jf, Search as hi, RefreshCw as Zr, ChevronsLeft as Wf, ChevronLeft as Nf, ChevronsRight as Hf, SlidersHorizontal as Gf, Download as qf, Plus as Xf, CheckCircle as Kf, SquarePen as Yf, ToggleLeft as Jf, Slash as Qf, Home as Zf } from "lucide-vue-next";
|
|
7
7
|
import { Primitive as eh, useForwardPropsEmits as Ts, TooltipRoot as th, TooltipPortal as nh, TooltipContent as sh, TooltipProvider as oh, TooltipTrigger as ah, Label as ih, DialogRoot as rh, DialogPortal as lh, DialogOverlay as ch, DialogContent as dh, DialogClose as uh, useForwardProps as Pn, DialogDescription as fh, DialogTitle as hh, AvatarRoot as ph, AvatarFallback as mh, AvatarImage as gh, Separator as bh, PaginationRoot as yh, PaginationList as vh, PaginationEllipsis as xh, PaginationFirst as wh, PaginationListItem as kh, PaginationLast as _h, PaginationNext as Ch, PaginationPrev as Ah, SelectRoot as Sh, SelectPortal as Dh, SelectContent as Mh, SelectViewport as Eh, SelectItem as Ph, SelectItemIndicator as Th, SelectItemText as Oh, SelectScrollDownButton as Ih, SelectScrollUpButton as Lh, SelectTrigger as Bh, SelectIcon as Rh, SelectValue as Fh } from "reka-ui";
|
|
@@ -393,8 +393,8 @@ const rp = 50, lp = async (e, t, n) => {
|
|
|
393
393
|
if (!X)
|
|
394
394
|
switch (h) {
|
|
395
395
|
case "bestFit": {
|
|
396
|
-
var
|
|
397
|
-
const Z = (
|
|
396
|
+
var $;
|
|
397
|
+
const Z = ($ = P.filter((ae) => {
|
|
398
398
|
if (_) {
|
|
399
399
|
const de = Un(ae.placement);
|
|
400
400
|
return de === E || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -402,7 +402,7 @@ const rp = 50, lp = async (e, t, n) => {
|
|
|
402
402
|
de === "y";
|
|
403
403
|
}
|
|
404
404
|
return !0;
|
|
405
|
-
}).map((ae) => [ae.placement, ae.overflows.filter((de) => de > 0).reduce((de, R) => de + R, 0)]).sort((ae, de) => ae[1] - de[1])[0]) == null ? void 0 :
|
|
405
|
+
}).map((ae) => [ae.placement, ae.overflows.filter((de) => de > 0).reduce((de, R) => de + R, 0)]).sort((ae, de) => ae[1] - de[1])[0]) == null ? void 0 : $[0];
|
|
406
406
|
Z && (X = Z);
|
|
407
407
|
break;
|
|
408
408
|
}
|
|
@@ -551,8 +551,8 @@ const fp = function(e) {
|
|
|
551
551
|
const E = w - d.top - d.bottom, D = m - d.left - d.right, S = Ys(w - d[x], E), M = Ys(m - d[g], D), _ = !t.middlewareData.shift;
|
|
552
552
|
let y = S, b = M;
|
|
553
553
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (b = D), (s = t.middlewareData.shift) != null && s.enabled.y && (y = E), _ && !f) {
|
|
554
|
-
const P = Qt(d.left, 0), I = Qt(d.right, 0), L = Qt(d.top, 0),
|
|
555
|
-
h ? b = m - 2 * (P !== 0 || I !== 0 ? P + I : Qt(d.left, d.right)) : y = w - 2 * (L !== 0 ||
|
|
554
|
+
const P = Qt(d.left, 0), I = Qt(d.right, 0), L = Qt(d.top, 0), $ = Qt(d.bottom, 0);
|
|
555
|
+
h ? b = m - 2 * (P !== 0 || I !== 0 ? P + I : Qt(d.left, d.right)) : y = w - 2 * (L !== 0 || $ !== 0 ? L + $ : Qt(d.top, d.bottom));
|
|
556
556
|
}
|
|
557
557
|
await l({
|
|
558
558
|
...t,
|
|
@@ -1271,13 +1271,13 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1271
1271
|
class: qo,
|
|
1272
1272
|
"fetch-items": fs,
|
|
1273
1273
|
fetchItems: io,
|
|
1274
|
-
error:
|
|
1274
|
+
error: F,
|
|
1275
1275
|
errorMessage: J,
|
|
1276
1276
|
"error-message": H,
|
|
1277
|
-
...
|
|
1277
|
+
...U
|
|
1278
1278
|
} = o || {};
|
|
1279
|
-
return
|
|
1280
|
-
}),
|
|
1279
|
+
return U;
|
|
1280
|
+
}), $ = () => {
|
|
1281
1281
|
if (n.apiOptions)
|
|
1282
1282
|
return typeof n.apiOptions == "function" ? n.apiOptions() : n.apiOptions;
|
|
1283
1283
|
}, B = O(() => {
|
|
@@ -1413,7 +1413,7 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1413
1413
|
try {
|
|
1414
1414
|
let Re;
|
|
1415
1415
|
if (n.fetchItems) {
|
|
1416
|
-
const ot =
|
|
1416
|
+
const ot = $() || {}, He = {
|
|
1417
1417
|
page: 1,
|
|
1418
1418
|
perPage: 100,
|
|
1419
1419
|
search: (R.value || "").trim(),
|
|
@@ -1430,7 +1430,7 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1430
1430
|
const ve = {
|
|
1431
1431
|
page: 1,
|
|
1432
1432
|
perPage: 100,
|
|
1433
|
-
|
|
1433
|
+
...$() || {},
|
|
1434
1434
|
...n.apiParams
|
|
1435
1435
|
};
|
|
1436
1436
|
let Se;
|
|
@@ -1453,7 +1453,7 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1453
1453
|
return h.value ? S.value ? Array.isArray(S.value) ? S.value.some((Re) => ye(Re) == _e) : ye(S.value) == _e : !1 : Array.isArray(S.value) ? S.value.some((Re) => Re == _e) : S.value == _e;
|
|
1454
1454
|
};
|
|
1455
1455
|
Fe(
|
|
1456
|
-
() => [
|
|
1456
|
+
() => [$(), B.value, n.apiParams],
|
|
1457
1457
|
([ee, _e, Re], [ot, He, fe]) => {
|
|
1458
1458
|
const ve = B.value;
|
|
1459
1459
|
if (!(ve.apiModule && ve.apiAction || ve.apiUrl || n.fetchItems)) {
|
|
@@ -1501,7 +1501,7 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1501
1501
|
for: D.value,
|
|
1502
1502
|
class: "mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"
|
|
1503
1503
|
}, [
|
|
1504
|
-
Ie(
|
|
1504
|
+
Ie(W(a.value) + " ", 1),
|
|
1505
1505
|
m.value ? (p(), k("span", zp, "*")) : z("", !0)
|
|
1506
1506
|
], 8, $p)) : z("", !0),
|
|
1507
1507
|
v("div", Vp, [
|
|
@@ -1595,18 +1595,18 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1595
1595
|
}, ["prevent"])),
|
|
1596
1596
|
onClick: (He) => se(Re)
|
|
1597
1597
|
}, [
|
|
1598
|
-
Ie(
|
|
1598
|
+
Ie(W(Q(Re)) + " ", 1),
|
|
1599
1599
|
lt(Re) ? (p(), k("span", qp, " ✓ ")) : z("", !0)
|
|
1600
1600
|
], 42, Gp))), 128)) : Be(ee.$slots, "no-data", { key: 1 }, () => [
|
|
1601
1601
|
v("div", Xp, [
|
|
1602
|
-
I.value ? (p(), k("span", Kp, "Loading data…")) : ie.value ? (p(), k("span", Yp,
|
|
1602
|
+
I.value ? (p(), k("span", Kp, "Loading data…")) : ie.value ? (p(), k("span", Yp, W(ie.value), 1)) : (p(), k("span", Jp, "No data available"))
|
|
1603
1603
|
])
|
|
1604
1604
|
])
|
|
1605
1605
|
])
|
|
1606
1606
|
], 4)) : z("", !0)
|
|
1607
1607
|
]))
|
|
1608
1608
|
]),
|
|
1609
|
-
le.value || w.value ? (p(), k("p", Qp,
|
|
1609
|
+
le.value || w.value ? (p(), k("p", Qp, W(le.value || w.value), 1)) : z("", !0)
|
|
1610
1610
|
], 64))
|
|
1611
1611
|
], 10, Rp)), [
|
|
1612
1612
|
[cs, e.visible]
|
|
@@ -1737,7 +1737,7 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1737
1737
|
m.value = !0;
|
|
1738
1738
|
}, b = () => {
|
|
1739
1739
|
m.value = !1;
|
|
1740
|
-
}, A = (q) => typeof n.itemTitle == "function" ? n.itemTitle(q) : q[n.itemTitle] || "", P = (q) => typeof n.itemValue == "function" ? n.itemValue(q) : q[n.itemValue] || q, I = (q) => n.itemSubtitle ? typeof n.itemSubtitle == "function" ? n.itemSubtitle(q) : q[n.itemSubtitle] || "" : "", L = (q) => n.modelValue ? n.returnObject ? P(q) === P(n.modelValue) : P(q) === n.modelValue : !1,
|
|
1740
|
+
}, A = (q) => typeof n.itemTitle == "function" ? n.itemTitle(q) : q[n.itemTitle] || "", P = (q) => typeof n.itemValue == "function" ? n.itemValue(q) : q[n.itemValue] || q, I = (q) => n.itemSubtitle ? typeof n.itemSubtitle == "function" ? n.itemSubtitle(q) : q[n.itemSubtitle] || "" : "", L = (q) => n.modelValue ? n.returnObject ? P(q) === P(n.modelValue) : P(q) === n.modelValue : !1, $ = (q) => {
|
|
1741
1741
|
var ie;
|
|
1742
1742
|
const le = n.returnObject ? q : P(q);
|
|
1743
1743
|
s("update:modelValue", le), s("select", q), m.value = !1, u.value = "", (ie = a.value) == null || ie.blur();
|
|
@@ -1765,7 +1765,7 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1765
1765
|
q.preventDefault(), w.value = Math.max(w.value - 1, 0);
|
|
1766
1766
|
break;
|
|
1767
1767
|
case "Enter":
|
|
1768
|
-
q.preventDefault(), w.value >= 0 && M.value[w.value] &&
|
|
1768
|
+
q.preventDefault(), w.value >= 0 && M.value[w.value] && $(M.value[w.value]);
|
|
1769
1769
|
break;
|
|
1770
1770
|
case "Escape":
|
|
1771
1771
|
m.value = !1;
|
|
@@ -1829,7 +1829,7 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1829
1829
|
for: d.value,
|
|
1830
1830
|
class: "mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"
|
|
1831
1831
|
}, [
|
|
1832
|
-
Ie(
|
|
1832
|
+
Ie(W(e.label) + " ", 1),
|
|
1833
1833
|
e.required ? (p(), k("span", nm, "*")) : z("", !0)
|
|
1834
1834
|
], 8, tm)) : z("", !0),
|
|
1835
1835
|
v("div", sm, [
|
|
@@ -1926,7 +1926,7 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1926
1926
|
onMouseenter: (ye) => w.value = Q,
|
|
1927
1927
|
onMousedown: le[2] || (le[2] = xt(() => {
|
|
1928
1928
|
}, ["prevent"])),
|
|
1929
|
-
onClick: (ye) =>
|
|
1929
|
+
onClick: (ye) => $(ie)
|
|
1930
1930
|
}, [
|
|
1931
1931
|
Be(q.$slots, "item", {
|
|
1932
1932
|
item: ie,
|
|
@@ -1934,8 +1934,8 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1934
1934
|
}, () => [
|
|
1935
1935
|
v("div", dm, [
|
|
1936
1936
|
v("div", um, [
|
|
1937
|
-
v("div", fm,
|
|
1938
|
-
e.itemSubtitle ? (p(), k("div", hm,
|
|
1937
|
+
v("div", fm, W(A(ie)), 1),
|
|
1938
|
+
e.itemSubtitle ? (p(), k("div", hm, W(I(ie)), 1)) : z("", !0)
|
|
1939
1939
|
])
|
|
1940
1940
|
])
|
|
1941
1941
|
]),
|
|
@@ -1944,17 +1944,17 @@ const Rp = ["aria-busy"], Fp = {
|
|
|
1944
1944
|
h.value && f.value.length > 0 ? (p(), k("div", mm, [
|
|
1945
1945
|
v("div", gm, [
|
|
1946
1946
|
le[6] || (le[6] = v("div", { class: "animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600" }, null, -1)),
|
|
1947
|
-
v("span", bm,
|
|
1947
|
+
v("span", bm, W(e.loadingText), 1)
|
|
1948
1948
|
])
|
|
1949
1949
|
])) : z("", !0),
|
|
1950
1950
|
!g.value && f.value.length > 0 ? (p(), k("div", ym, [
|
|
1951
|
-
v("div", vm,
|
|
1952
|
-
])) : !h.value && f.value.length === 0 ? (p(), k("div", xm,
|
|
1951
|
+
v("div", vm, W(e.endOfResultsText), 1)
|
|
1952
|
+
])) : !h.value && f.value.length === 0 ? (p(), k("div", xm, W(e.noResultsText), 1)) : z("", !0)
|
|
1953
1953
|
], 544)
|
|
1954
1954
|
], 4)) : z("", !0)
|
|
1955
1955
|
]))
|
|
1956
1956
|
]),
|
|
1957
|
-
e.error ? (p(), k("p", wm,
|
|
1957
|
+
e.error ? (p(), k("p", wm, W(e.errorMessage || e.error), 1)) : e.helperText ? (p(), k("p", km, W(e.helperText), 1)) : z("", !0)
|
|
1958
1958
|
], 64))
|
|
1959
1959
|
], 10, Zp)), [
|
|
1960
1960
|
[cs, e.visible]
|
|
@@ -2280,7 +2280,7 @@ const Cm = (e, t) => {
|
|
|
2280
2280
|
"left-bottom"
|
|
2281
2281
|
], M = () => [...S(), Oe, Ee], _ = () => ["auto", "hidden", "clip", "visible", "scroll"], y = () => ["auto", "contain", "none"], b = () => [Oe, Ee, l], A = () => [Yn, "full", "auto", ...b()], P = () => [Jn, "none", "subgrid", Oe, Ee], I = () => ["auto", {
|
|
2282
2282
|
span: ["full", Jn, Oe, Ee]
|
|
2283
|
-
}, Jn, Oe, Ee], L = () => [Jn, "auto", Oe, Ee],
|
|
2283
|
+
}, Jn, Oe, Ee], L = () => [Jn, "auto", Oe, Ee], $ = () => ["auto", "min", "max", "fr", Oe, Ee], B = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], ne = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], X = () => ["auto", ...b()], Z = () => [Yn, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...b()], ae = () => [Yn, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...b()], de = () => [Yn, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...b()], R = () => [e, Oe, Ee], q = () => [...S(), gl, ml, {
|
|
2284
2284
|
position: [Oe, Ee]
|
|
2285
2285
|
}], le = () => ["no-repeat", {
|
|
2286
2286
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -2695,14 +2695,14 @@ const Cm = (e, t) => {
|
|
|
2695
2695
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2696
2696
|
*/
|
|
2697
2697
|
"auto-cols": [{
|
|
2698
|
-
"auto-cols":
|
|
2698
|
+
"auto-cols": $()
|
|
2699
2699
|
}],
|
|
2700
2700
|
/**
|
|
2701
2701
|
* Grid Auto Rows
|
|
2702
2702
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2703
2703
|
*/
|
|
2704
2704
|
"auto-rows": [{
|
|
2705
|
-
"auto-rows":
|
|
2705
|
+
"auto-rows": $()
|
|
2706
2706
|
}],
|
|
2707
2707
|
/**
|
|
2708
2708
|
* Gap
|
|
@@ -5590,7 +5590,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5590
5590
|
}, I = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950], L = (ie) => {
|
|
5591
5591
|
const Q = I.indexOf(ie);
|
|
5592
5592
|
return Q === -1 ? ie : I[Math.min(I.length - 1, Q + 2)];
|
|
5593
|
-
},
|
|
5593
|
+
}, $ = (ie, Q) => {
|
|
5594
5594
|
const ye = yg[ie];
|
|
5595
5595
|
if (!ye) return null;
|
|
5596
5596
|
if (typeof ye == "string") return ye;
|
|
@@ -5610,18 +5610,18 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5610
5610
|
y.value = null;
|
|
5611
5611
|
return;
|
|
5612
5612
|
}
|
|
5613
|
-
const Q = B(ie), ye = Q == null ? void 0 : Q.colorName, ke = (Q == null ? void 0 : Q.shade) ?? null, Le = (ye ?
|
|
5613
|
+
const Q = B(ie), ye = Q == null ? void 0 : Q.colorName, ke = (Q == null ? void 0 : Q.shade) ?? null, Le = (ye ? $(ye, ke) : null) ?? P(ie);
|
|
5614
5614
|
if (!Le) {
|
|
5615
5615
|
y.value = null;
|
|
5616
5616
|
return;
|
|
5617
5617
|
}
|
|
5618
5618
|
let Ne;
|
|
5619
|
-
const De = B(E.value, !0), oe = De ?
|
|
5619
|
+
const De = B(E.value, !0), oe = De ? $(De.colorName, De.shade ?? null) : null;
|
|
5620
5620
|
if (oe)
|
|
5621
5621
|
Ne = oe;
|
|
5622
5622
|
else if (ye && ke) {
|
|
5623
5623
|
const V = L(ke);
|
|
5624
|
-
Ne =
|
|
5624
|
+
Ne = $(ye, V) ?? A(Le, 0.2);
|
|
5625
5625
|
} else
|
|
5626
5626
|
Ne = A(Le, 0.2);
|
|
5627
5627
|
y.value = {
|
|
@@ -5787,7 +5787,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5787
5787
|
n.text ? (p(), k("span", {
|
|
5788
5788
|
key: 1,
|
|
5789
5789
|
class: ue(s.value ? "ml-1" : "")
|
|
5790
|
-
},
|
|
5790
|
+
}, W(n.text), 3)) : z("", !0)
|
|
5791
5791
|
]),
|
|
5792
5792
|
_: 1
|
|
5793
5793
|
}, 16, ["variant", "size", "disabled", "type", "class", "style"])
|
|
@@ -5800,7 +5800,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5800
5800
|
class: "animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0"
|
|
5801
5801
|
}, {
|
|
5802
5802
|
default: re(() => [
|
|
5803
|
-
v("span", vg,
|
|
5803
|
+
v("span", vg, W(n.tooltip), 1)
|
|
5804
5804
|
]),
|
|
5805
5805
|
_: 1
|
|
5806
5806
|
})
|
|
@@ -5824,7 +5824,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5824
5824
|
n.text ? (p(), k("span", {
|
|
5825
5825
|
key: 1,
|
|
5826
5826
|
class: ue(s.value ? "ml-1" : "")
|
|
5827
|
-
},
|
|
5827
|
+
}, W(n.text), 3)) : z("", !0)
|
|
5828
5828
|
], !0)
|
|
5829
5829
|
]),
|
|
5830
5830
|
_: 3
|
|
@@ -5888,8 +5888,8 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5888
5888
|
e.title || s.$slots.header || s.$slots.actions ? (p(), k("div", kg, [
|
|
5889
5889
|
v("div", _g, [
|
|
5890
5890
|
Be(s.$slots, "header", {}, () => [
|
|
5891
|
-
e.title ? (p(), k("h3", Cg,
|
|
5892
|
-
e.subtitle ? (p(), k("p", Ag,
|
|
5891
|
+
e.title ? (p(), k("h3", Cg, W(e.title), 1)) : z("", !0),
|
|
5892
|
+
e.subtitle ? (p(), k("p", Ag, W(e.subtitle), 1)) : z("", !0)
|
|
5893
5893
|
])
|
|
5894
5894
|
]),
|
|
5895
5895
|
s.$slots.actions ? (p(), k("div", Sg, [
|
|
@@ -5958,7 +5958,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5958
5958
|
v("div", Og, [
|
|
5959
5959
|
v("h3", Ig, [
|
|
5960
5960
|
l[2] || (l[2] = v("span", { class: "w-2 h-2 rounded-full bg-danger-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]" }, null, -1)),
|
|
5961
|
-
Ie(" " +
|
|
5961
|
+
Ie(" " + W(C(t)("beforeAfter.dataBefore")), 1)
|
|
5962
5962
|
]),
|
|
5963
5963
|
l[3] || (l[3] = v("span", { class: "text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 border border-neutral-200 dark:border-neutral-700 shadow-sm" }, " ORIGINAL ", -1))
|
|
5964
5964
|
])
|
|
@@ -5970,7 +5970,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5970
5970
|
onScroll: l[0] || (l[0] = (c) => a("before")),
|
|
5971
5971
|
class: "p-4 overflow-auto max-h-[500px] custom-scrollbar"
|
|
5972
5972
|
}, [
|
|
5973
|
-
v("pre", Bg,
|
|
5973
|
+
v("pre", Bg, W(i(e.dataBefore)), 1)
|
|
5974
5974
|
], 544)
|
|
5975
5975
|
])
|
|
5976
5976
|
]),
|
|
@@ -5979,7 +5979,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5979
5979
|
v("div", $g, [
|
|
5980
5980
|
v("h3", zg, [
|
|
5981
5981
|
l[4] || (l[4] = v("span", { class: "w-2 h-2 rounded-full bg-success-500 shadow-[0_0_8px_rgba(34,197,94,0.5)]" }, null, -1)),
|
|
5982
|
-
Ie(" " +
|
|
5982
|
+
Ie(" " + W(C(t)("beforeAfter.dataAfter")), 1)
|
|
5983
5983
|
]),
|
|
5984
5984
|
l[5] || (l[5] = v("span", { class: "text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-primary-600 dark:text-primary-400 border border-primary-100 dark:border-primary-900/50 shadow-sm" }, " MODIFIED ", -1))
|
|
5985
5985
|
])
|
|
@@ -5991,7 +5991,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
5991
5991
|
onScroll: l[1] || (l[1] = (c) => a("after")),
|
|
5992
5992
|
class: "p-4 overflow-auto max-h-[500px] custom-scrollbar"
|
|
5993
5993
|
}, [
|
|
5994
|
-
v("pre", Ug,
|
|
5994
|
+
v("pre", Ug, W(i(e.dataAfter)), 1)
|
|
5995
5995
|
], 544)
|
|
5996
5996
|
])
|
|
5997
5997
|
])
|
|
@@ -6144,7 +6144,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
6144
6144
|
const V = r.maxLength ?? n.maxlength ?? n.maxLength;
|
|
6145
6145
|
let se = Number.NaN;
|
|
6146
6146
|
return typeof V == "number" ? se = V : typeof V == "string" && (se = Number.parseInt(V, 10)), Number.isFinite(se) && se > 0 ? se : -1;
|
|
6147
|
-
}),
|
|
6147
|
+
}), $ = O(() => g.value.length), B = O(() => r.showCharCount ? L.value > 0 : !1), ne = (V) => L.value > 0 ? V.slice(0, L.value) : V, X = (V) => {
|
|
6148
6148
|
const se = I(V), me = r.applyTextCaseToValue ? _(se) : se;
|
|
6149
6149
|
return ne(me);
|
|
6150
6150
|
};
|
|
@@ -6204,8 +6204,8 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
6204
6204
|
const Le = () => {
|
|
6205
6205
|
g.value = "", Z && (Z.value = ""), i("update:modelValue", null), i("clear");
|
|
6206
6206
|
}, Ne = O(
|
|
6207
|
-
() => B.value &&
|
|
6208
|
-
), De = O(() => `${
|
|
6207
|
+
() => B.value && $.value > 0
|
|
6208
|
+
), De = O(() => `${$.value} / ${L.value}`), oe = O(() => !!r.error);
|
|
6209
6209
|
return (V, se) => ln((p(), k("div", {
|
|
6210
6210
|
class: ue(["flex flex-col gap-1 w-full", C(n).class]),
|
|
6211
6211
|
"aria-busy": r.skeleton
|
|
@@ -6224,7 +6224,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
6224
6224
|
for: d.value,
|
|
6225
6225
|
class: "text-sm font-medium"
|
|
6226
6226
|
}, [
|
|
6227
|
-
Ie(
|
|
6227
|
+
Ie(W(l.value) + " ", 1),
|
|
6228
6228
|
u.value ? (p(), k("span", Gg, "*")) : z("", !0)
|
|
6229
6229
|
], 8, Hg)) : z("", !0),
|
|
6230
6230
|
v("div", qg, [
|
|
@@ -6233,7 +6233,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
6233
6233
|
r.icon ? (p(), pe(_t(r.icon), {
|
|
6234
6234
|
key: 0,
|
|
6235
6235
|
class: "h-4 w-4"
|
|
6236
|
-
})) : r.prependInner ? (p(), k("span", Kg,
|
|
6236
|
+
})) : r.prependInner ? (p(), k("span", Kg, W(r.prependInner), 1)) : z("", !0)
|
|
6237
6237
|
])
|
|
6238
6238
|
])) : z("", !0),
|
|
6239
6239
|
v("input", Ke({
|
|
@@ -6266,9 +6266,9 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
6266
6266
|
onClick: Le
|
|
6267
6267
|
}, " ✕ ")
|
|
6268
6268
|
])) : z("", !0),
|
|
6269
|
-
Ne.value && !oe.value ? (p(), k("p", Zg,
|
|
6269
|
+
Ne.value && !oe.value ? (p(), k("p", Zg, W(De.value), 1)) : z("", !0)
|
|
6270
6270
|
]),
|
|
6271
|
-
oe.value ? (p(), k("p", e0,
|
|
6271
|
+
oe.value ? (p(), k("p", e0, W(r.error), 1)) : z("", !0)
|
|
6272
6272
|
], 64))
|
|
6273
6273
|
], 10, jg)), [
|
|
6274
6274
|
[cs, e.visible]
|
|
@@ -6305,9 +6305,9 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
6305
6305
|
v("div", o0, [
|
|
6306
6306
|
v("h3", a0, [
|
|
6307
6307
|
c[0] || (c[0] = v("span", { class: "w-2 h-2 rounded-full bg-danger-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]" }, null, -1)),
|
|
6308
|
-
Ie(" " +
|
|
6308
|
+
Ie(" " + W(C(t)("beforeAfter.dataBefore")), 1)
|
|
6309
6309
|
]),
|
|
6310
|
-
v("span", i0,
|
|
6310
|
+
v("span", i0, W(C(t)("beforeAfter.original")), 1)
|
|
6311
6311
|
])
|
|
6312
6312
|
]),
|
|
6313
6313
|
v("div", r0, [
|
|
@@ -6329,9 +6329,9 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
6329
6329
|
v("div", f0, [
|
|
6330
6330
|
v("h3", h0, [
|
|
6331
6331
|
c[1] || (c[1] = v("span", { class: "w-2 h-2 rounded-full bg-success-500 shadow-[0_0_8px_rgba(34,197,94,0.5)]" }, null, -1)),
|
|
6332
|
-
Ie(" " +
|
|
6332
|
+
Ie(" " + W(C(t)("beforeAfter.dataAfter")), 1)
|
|
6333
6333
|
]),
|
|
6334
|
-
v("span", p0,
|
|
6334
|
+
v("span", p0, W(C(t)("beforeAfter.modified")), 1)
|
|
6335
6335
|
])
|
|
6336
6336
|
]),
|
|
6337
6337
|
v("div", m0, [
|
|
@@ -6344,7 +6344,7 @@ const yg = /* @__PURE__ */ Bd(bg), wl = (e) => typeof e == "boolean" ? `${e}` :
|
|
|
6344
6344
|
variant: "underlined",
|
|
6345
6345
|
class: "w-full"
|
|
6346
6346
|
}, null, 8, ["model-value", "label"]))), 128)),
|
|
6347
|
-
Object.keys(a.value).length === 0 ? (p(), k("div", b0,
|
|
6347
|
+
Object.keys(a.value).length === 0 ? (p(), k("div", b0, W(C(t)("beforeAfter.noModifiedData")), 1)) : z("", !0)
|
|
6348
6348
|
])
|
|
6349
6349
|
])
|
|
6350
6350
|
])
|
|
@@ -10762,11 +10762,11 @@ class oo extends Xn {
|
|
|
10762
10762
|
const n = this.axis, s = this.chart, o = this.options, { grid: a, position: i, border: r } = o, l = a.offset, c = this.isHorizontal(), u = this.ticks.length + (l ? 1 : 0), f = ho(a), h = [], m = r.setContext(this.getContext()), w = m.display ? m.width : 0, x = w / 2, g = function(X) {
|
|
10763
10763
|
return gs(s, X, w);
|
|
10764
10764
|
};
|
|
10765
|
-
let E, D, S, M, _, y, b, A, P, I, L,
|
|
10765
|
+
let E, D, S, M, _, y, b, A, P, I, L, $;
|
|
10766
10766
|
if (i === "top")
|
|
10767
|
-
E = g(this.bottom), y = this.bottom - f, A = E - x, I = g(t.top) + x,
|
|
10767
|
+
E = g(this.bottom), y = this.bottom - f, A = E - x, I = g(t.top) + x, $ = t.bottom;
|
|
10768
10768
|
else if (i === "bottom")
|
|
10769
|
-
E = g(this.top), I = t.top,
|
|
10769
|
+
E = g(this.top), I = t.top, $ = g(t.bottom) - x, y = E + x, A = this.top + f;
|
|
10770
10770
|
else if (i === "left")
|
|
10771
10771
|
E = g(this.right), _ = this.right - f, b = E - x, P = g(t.left) + x, L = t.right;
|
|
10772
10772
|
else if (i === "right")
|
|
@@ -10778,7 +10778,7 @@ class oo extends Xn {
|
|
|
10778
10778
|
const X = Object.keys(i)[0], Z = i[X];
|
|
10779
10779
|
E = g(this.chart.scales[X].getPixelForValue(Z));
|
|
10780
10780
|
}
|
|
10781
|
-
I = t.top,
|
|
10781
|
+
I = t.top, $ = t.bottom, y = E + x, A = y + f;
|
|
10782
10782
|
} else if (n === "y") {
|
|
10783
10783
|
if (i === "center")
|
|
10784
10784
|
E = g((t.left + t.right) / 2);
|
|
@@ -10791,7 +10791,7 @@ class oo extends Xn {
|
|
|
10791
10791
|
const B = Ge(o.ticks.maxTicksLimit, u), ne = Math.max(1, Math.ceil(u / B));
|
|
10792
10792
|
for (D = 0; D < u; D += ne) {
|
|
10793
10793
|
const X = this.getContext(D), Z = a.setContext(X), ae = r.setContext(X), de = Z.lineWidth, R = Z.color, q = ae.dash || [], le = ae.dashOffset, ie = Z.tickWidth, Q = Z.tickColor, ye = Z.tickBorderDash || [], ke = Z.tickBorderDashOffset;
|
|
10794
|
-
S = pv(this, D, l), S !== void 0 && (M = gs(s, S, de), c ? _ = b = P = L = M : y = A = I =
|
|
10794
|
+
S = pv(this, D, l), S !== void 0 && (M = gs(s, S, de), c ? _ = b = P = L = M : y = A = I = $ = M, h.push({
|
|
10795
10795
|
tx1: _,
|
|
10796
10796
|
ty1: y,
|
|
10797
10797
|
tx2: b,
|
|
@@ -10799,7 +10799,7 @@ class oo extends Xn {
|
|
|
10799
10799
|
x1: P,
|
|
10800
10800
|
y1: I,
|
|
10801
10801
|
x2: L,
|
|
10802
|
-
y2:
|
|
10802
|
+
y2: $,
|
|
10803
10803
|
width: de,
|
|
10804
10804
|
color: R,
|
|
10805
10805
|
borderDash: q,
|
|
@@ -10814,7 +10814,7 @@ class oo extends Xn {
|
|
|
10814
10814
|
}
|
|
10815
10815
|
_computeLabelItems(t) {
|
|
10816
10816
|
const n = this.axis, s = this.options, { position: o, ticks: a } = s, i = this.isHorizontal(), r = this.ticks, { align: l, crossAlign: c, padding: d, mirror: u } = a, f = ho(s.grid), h = f + d, m = u ? -d : h, w = -jn(this.labelRotation), x = [];
|
|
10817
|
-
let g, E, D, S, M, _, y, b, A, P, I, L,
|
|
10817
|
+
let g, E, D, S, M, _, y, b, A, P, I, L, $ = "middle";
|
|
10818
10818
|
if (o === "top")
|
|
10819
10819
|
_ = this.bottom - m, y = this._getXAxisLabelAlignment();
|
|
10820
10820
|
else if (o === "bottom")
|
|
@@ -10842,7 +10842,7 @@ class oo extends Xn {
|
|
|
10842
10842
|
}
|
|
10843
10843
|
y = this._getYAxisLabelAlignment(f).textAlign;
|
|
10844
10844
|
}
|
|
10845
|
-
n === "y" && (l === "start" ?
|
|
10845
|
+
n === "y" && (l === "start" ? $ = "top" : l === "end" && ($ = "bottom"));
|
|
10846
10846
|
const B = this._getLabelSizes();
|
|
10847
10847
|
for (g = 0, E = r.length; g < E; ++g) {
|
|
10848
10848
|
D = r[g], S = D.label;
|
|
@@ -10855,7 +10855,7 @@ class oo extends Xn {
|
|
|
10855
10855
|
if (ne.showLabelBackdrop) {
|
|
10856
10856
|
const le = dn(ne.backdropPadding), ie = B.heights[g], Q = B.widths[g];
|
|
10857
10857
|
let ye = L - le.top, ke = 0 - le.left;
|
|
10858
|
-
switch (
|
|
10858
|
+
switch ($) {
|
|
10859
10859
|
case "middle":
|
|
10860
10860
|
ye -= ie / 2;
|
|
10861
10861
|
break;
|
|
@@ -10892,7 +10892,7 @@ class oo extends Xn {
|
|
|
10892
10892
|
strokeColor: ae,
|
|
10893
10893
|
strokeWidth: de,
|
|
10894
10894
|
textAlign: R,
|
|
10895
|
-
textBaseline:
|
|
10895
|
+
textBaseline: $,
|
|
10896
10896
|
translation: [
|
|
10897
10897
|
M,
|
|
10898
10898
|
_
|
|
@@ -12105,7 +12105,7 @@ function Ua(e, t, n, s, o, a) {
|
|
|
12105
12105
|
const ne = d > 0 ? d - s : 0, X = u > 0 ? u - s : 0, Z = (ne + X) / 2, ae = Z !== 0 ? m * Z / (Z + s) : m;
|
|
12106
12106
|
h = (m - ae) / 2;
|
|
12107
12107
|
}
|
|
12108
|
-
const w = Math.max(1e-3, m * u - n / pt) / u, x = (m - w) / 2, g = l + x + h, E = o - x - h, { outerStart: D, outerEnd: S, innerStart: M, innerEnd: _ } = Gv(t, f, u, E - g), y = u - D, b = u - S, A = g + D / y, P = E - S / b, I = f + M, L = f + _,
|
|
12108
|
+
const w = Math.max(1e-3, m * u - n / pt) / u, x = (m - w) / 2, g = l + x + h, E = o - x - h, { outerStart: D, outerEnd: S, innerStart: M, innerEnd: _ } = Gv(t, f, u, E - g), y = u - D, b = u - S, A = g + D / y, P = E - S / b, I = f + M, L = f + _, $ = g + M / I, B = E - _ / L;
|
|
12109
12109
|
if (e.beginPath(), a) {
|
|
12110
12110
|
const ne = (A + P) / 2;
|
|
12111
12111
|
if (e.arc(i, r, u, A, ne), e.arc(i, r, u, ne, P), S > 0) {
|
|
@@ -12119,8 +12119,8 @@ function Ua(e, t, n, s, o, a) {
|
|
|
12119
12119
|
}
|
|
12120
12120
|
const Z = (E - _ / f + (g + M / f)) / 2;
|
|
12121
12121
|
if (e.arc(i, r, f, E - _ / f, Z, !0), e.arc(i, r, f, Z, g + M / f, !0), M > 0) {
|
|
12122
|
-
const de = Us(I,
|
|
12123
|
-
e.arc(de.x, de.y, M,
|
|
12122
|
+
const de = Us(I, $, i, r);
|
|
12123
|
+
e.arc(de.x, de.y, M, $ + Math.PI, g - Tt);
|
|
12124
12124
|
}
|
|
12125
12125
|
const ae = Us(y, g, i, r);
|
|
12126
12126
|
if (e.lineTo(ae.x, ae.y), D > 0) {
|
|
@@ -13090,7 +13090,7 @@ class Dc extends Xn {
|
|
|
13090
13090
|
eu(o, P, I, L, i.pointStyleWidth && m);
|
|
13091
13091
|
} else {
|
|
13092
13092
|
const P = y + Math.max((u - w) / 2, 0), I = l.leftForLtr(_, m), L = Hs(b.borderRadius);
|
|
13093
|
-
o.beginPath(), Object.values(L).some((
|
|
13093
|
+
o.beginPath(), Object.values(L).some(($) => $ !== 0) ? $a(o, {
|
|
13094
13094
|
x: I,
|
|
13095
13095
|
y: P,
|
|
13096
13096
|
w: m,
|
|
@@ -13120,8 +13120,8 @@ class Dc extends Xn {
|
|
|
13120
13120
|
const b = o.measureText(_.text).width, A = l.textAlign(_.textAlign || (_.textAlign = i.textAlign)), P = m + f + b;
|
|
13121
13121
|
let I = h.x, L = h.y;
|
|
13122
13122
|
l.setWidth(this.width), D ? y > 0 && I + P + d > this.right && (L = h.y += M, h.line++, I = h.x = zt(a, this.left + d, this.right - s[h.line])) : y > 0 && L + M > this.bottom && (I = h.x = I + n[h.line].width + d, h.line++, L = h.y = zt(a, this.top + S + d, this.bottom - n[h.line].height));
|
|
13123
|
-
const
|
|
13124
|
-
if (g(
|
|
13123
|
+
const $ = l.x(I);
|
|
13124
|
+
if (g($, L, _), I = ib(A, I + m + f, D ? I + P : this.right, t.rtl), E(l.x(I), L, _), D)
|
|
13125
13125
|
h.x += P + d;
|
|
13126
13126
|
else if (typeof _.text != "string") {
|
|
13127
13127
|
const B = c.lineHeight;
|
|
@@ -14642,7 +14642,7 @@ const Zx = {
|
|
|
14642
14642
|
class: ue(["d-code-chart", l.value])
|
|
14643
14643
|
}, [
|
|
14644
14644
|
e.label ? (p(), k("div", Zx, [
|
|
14645
|
-
Ie(
|
|
14645
|
+
Ie(W(e.label) + " ", 1),
|
|
14646
14646
|
e.required ? (p(), k("span", e1, "*")) : z("", !0)
|
|
14647
14647
|
])) : z("", !0),
|
|
14648
14648
|
v("div", {
|
|
@@ -14657,11 +14657,11 @@ const Zx = {
|
|
|
14657
14657
|
v("div", { class: "animate-pulse-slow rounded-full h-8 w-8 border-b-2 border-blue-600" }, null, -1)
|
|
14658
14658
|
])])) : z("", !0),
|
|
14659
14659
|
e.error ? (p(), k("div", n1, [
|
|
14660
|
-
v("div", s1,
|
|
14660
|
+
v("div", s1, W(e.error), 1)
|
|
14661
14661
|
])) : z("", !0)
|
|
14662
14662
|
], 4),
|
|
14663
14663
|
e.showInfo && r.value ? (p(), k("div", o1, [
|
|
14664
|
-
r.value.datasets ? (p(), k("div", a1,
|
|
14664
|
+
r.value.datasets ? (p(), k("div", a1, W(r.value.datasets.length) + " dataset(s) • " + W(r.value.labels ? r.value.labels.length : 0) + " data points ", 1)) : z("", !0)
|
|
14665
14665
|
])) : z("", !0)
|
|
14666
14666
|
], 2));
|
|
14667
14667
|
}
|
|
@@ -14734,7 +14734,7 @@ const Zx = {
|
|
|
14734
14734
|
class: "text-sm font-medium mb-1"
|
|
14735
14735
|
}, {
|
|
14736
14736
|
default: re(() => [
|
|
14737
|
-
Ie(
|
|
14737
|
+
Ie(W(e.label) + " ", 1),
|
|
14738
14738
|
e.required ? (p(), k("span", c1, "*")) : z("", !0)
|
|
14739
14739
|
]),
|
|
14740
14740
|
_: 1
|
|
@@ -14789,7 +14789,7 @@ const Zx = {
|
|
|
14789
14789
|
class: ue(["text-sm leading-relaxed select-none transition-colors", [
|
|
14790
14790
|
e.disabled ? "text-gray-400 dark:text-gray-500" : "text-gray-700 dark:text-gray-300 group-hover:text-gray-900 dark:group-hover:text-gray-100"
|
|
14791
14791
|
]])
|
|
14792
|
-
},
|
|
14792
|
+
}, W(e.title), 3)) : z("", !0)
|
|
14793
14793
|
], 2)
|
|
14794
14794
|
]))
|
|
14795
14795
|
], 10, d1), [
|
|
@@ -14888,7 +14888,7 @@ const Zx = {
|
|
|
14888
14888
|
}
|
|
14889
14889
|
let I = b;
|
|
14890
14890
|
o.dataPath ? I = o.dataPath.split(".").reduce(
|
|
14891
|
-
(
|
|
14891
|
+
($, B) => $ && $[B] !== void 0 ? $[B] : void 0,
|
|
14892
14892
|
b
|
|
14893
14893
|
) : typeof b == "object" && !Array.isArray(b) && b.data && (I = b.data), Array.isArray(I) ? i.value = I : (console.warn(
|
|
14894
14894
|
"DCodeCardCheckboxList: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."
|
|
@@ -14934,7 +14934,7 @@ const Zx = {
|
|
|
14934
14934
|
return (M, _) => ln((p(), k("div", m1, [
|
|
14935
14935
|
e.label || E.value ? (p(), k("div", g1, [
|
|
14936
14936
|
E.value ? (p(), k("div", b1)) : (p(), k("h3", y1, [
|
|
14937
|
-
Ie(
|
|
14937
|
+
Ie(W(e.label) + " ", 1),
|
|
14938
14938
|
e.required ? (p(), k("span", v1, "*")) : z("", !0)
|
|
14939
14939
|
]))
|
|
14940
14940
|
])) : z("", !0),
|
|
@@ -14968,7 +14968,7 @@ const Zx = {
|
|
|
14968
14968
|
], 64)),
|
|
14969
14969
|
D.value && S.value ? (p(), k("div", C1, [
|
|
14970
14970
|
G(C(Xa), { class: "w-4 h-4 flex-shrink-0" }),
|
|
14971
|
-
Ie(" " +
|
|
14971
|
+
Ie(" " + W(S.value), 1)
|
|
14972
14972
|
])) : z("", !0)
|
|
14973
14973
|
])
|
|
14974
14974
|
], 512)), [
|
|
@@ -15034,25 +15034,25 @@ const Zx = {
|
|
|
15034
15034
|
{ immediate: !0 }
|
|
15035
15035
|
);
|
|
15036
15036
|
const x = (I, L) => {
|
|
15037
|
-
let
|
|
15037
|
+
let $ = 0;
|
|
15038
15038
|
for (let B = 0; B < L; B++)
|
|
15039
|
-
/\d/.test(I[B]) &&
|
|
15040
|
-
return
|
|
15039
|
+
/\d/.test(I[B]) && $++;
|
|
15040
|
+
return $;
|
|
15041
15041
|
}, g = (I, L) => {
|
|
15042
|
-
let
|
|
15042
|
+
let $ = 0;
|
|
15043
15043
|
for (let B = 0; B < I.length; B++)
|
|
15044
|
-
if (/\d/.test(I[B]) && (
|
|
15044
|
+
if (/\d/.test(I[B]) && ($++, $ === L))
|
|
15045
15045
|
return B + 1;
|
|
15046
15046
|
return I.length;
|
|
15047
15047
|
}, E = (I) => {
|
|
15048
|
-
const L = I.target,
|
|
15048
|
+
const L = I.target, $ = L.value, B = L.selectionStart ?? $.length, ne = f($);
|
|
15049
15049
|
if (ne === null) {
|
|
15050
15050
|
m.value = "", s("update:modelValue", null);
|
|
15051
15051
|
return;
|
|
15052
15052
|
}
|
|
15053
15053
|
const X = h(ne);
|
|
15054
|
-
if (
|
|
15055
|
-
const Z = x(
|
|
15054
|
+
if ($ !== X) {
|
|
15055
|
+
const Z = x($, B);
|
|
15056
15056
|
m.value = X, tn(() => {
|
|
15057
15057
|
if (w.value) {
|
|
15058
15058
|
const ae = g(X, Z);
|
|
@@ -15064,7 +15064,7 @@ const Zx = {
|
|
|
15064
15064
|
}, D = () => {
|
|
15065
15065
|
m.value = "", s("update:modelValue", null), s("clear");
|
|
15066
15066
|
}, S = O(() => !o.clearable || o.disabled || o.readonly ? !1 : o.hideClearWhenEmpty ? m.value.length > 0 : !0), M = O(() => !!o.error), _ = O(() => {
|
|
15067
|
-
const { class: I, maxlength: L, maxLength:
|
|
15067
|
+
const { class: I, maxlength: L, maxLength: $, ...B } = n;
|
|
15068
15068
|
return B;
|
|
15069
15069
|
}), y = O(() => m.value.length), b = O(() => o.showCharCount ? (l.value ?? 0) > 0 : !1), A = O(
|
|
15070
15070
|
() => b.value && y.value > 0
|
|
@@ -15087,7 +15087,7 @@ const Zx = {
|
|
|
15087
15087
|
for: i.value,
|
|
15088
15088
|
class: "text-sm font-medium text-gray-700 dark:text-gray-300"
|
|
15089
15089
|
}, [
|
|
15090
|
-
Ie(
|
|
15090
|
+
Ie(W(e.label) + " ", 1),
|
|
15091
15091
|
r.value ? (p(), k("span", P1, "*")) : z("", !0)
|
|
15092
15092
|
], 8, E1)) : z("", !0),
|
|
15093
15093
|
v("div", T1, [
|
|
@@ -15100,13 +15100,13 @@ const Zx = {
|
|
|
15100
15100
|
])
|
|
15101
15101
|
}, [
|
|
15102
15102
|
v("div", O1, [
|
|
15103
|
-
v("span", I1,
|
|
15103
|
+
v("span", I1, W(d.value), 1)
|
|
15104
15104
|
]),
|
|
15105
15105
|
ln(v("input", Ke({
|
|
15106
15106
|
id: i.value,
|
|
15107
15107
|
ref_key: "inputRef",
|
|
15108
15108
|
ref: w,
|
|
15109
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
15109
|
+
"onUpdate:modelValue": L[0] || (L[0] = ($) => m.value = $),
|
|
15110
15110
|
onInput: E,
|
|
15111
15111
|
type: "text",
|
|
15112
15112
|
inputmode: "numeric"
|
|
@@ -15132,11 +15132,11 @@ const Zx = {
|
|
|
15132
15132
|
G(C(Ss), { class: "w-3.5 h-3.5" })
|
|
15133
15133
|
])) : z("", !0)
|
|
15134
15134
|
], 2),
|
|
15135
|
-
A.value && !M.value ? (p(), k("p", B1,
|
|
15135
|
+
A.value && !M.value ? (p(), k("p", B1, W(P.value), 1)) : z("", !0)
|
|
15136
15136
|
]),
|
|
15137
15137
|
M.value ? (p(), k("p", R1, [
|
|
15138
15138
|
G(C(Xa), { class: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
15139
|
-
Ie(" " +
|
|
15139
|
+
Ie(" " + W(o.error), 1)
|
|
15140
15140
|
])) : z("", !0)
|
|
15141
15141
|
], 64))
|
|
15142
15142
|
], 10, S1));
|
|
@@ -16938,58 +16938,58 @@ const vk = {
|
|
|
16938
16938
|
emits: ["update:modelValue", "change", "clear"],
|
|
16939
16939
|
setup(e, { emit: t }) {
|
|
16940
16940
|
const n = Wt(), s = e, o = t, a = Math.random().toString(36).slice(2, 7), i = O(() => `dcode-datepicker-${n.id || s.label || "date-picker"}-${a}`), r = O(() => {
|
|
16941
|
-
const
|
|
16942
|
-
return
|
|
16941
|
+
const $ = n.required, B = n["aria-required"];
|
|
16942
|
+
return $ === "" || $ === !0 || $ === "true" || B === "true" || B === !0;
|
|
16943
16943
|
}), l = O(() => !!s.error), c = O({
|
|
16944
16944
|
get: () => s.modelValue,
|
|
16945
|
-
set: (
|
|
16946
|
-
o("update:modelValue",
|
|
16945
|
+
set: ($) => {
|
|
16946
|
+
o("update:modelValue", $), o("change", $);
|
|
16947
16947
|
}
|
|
16948
16948
|
}), d = O(
|
|
16949
16949
|
() => s.locale === "en" ? $u : gk
|
|
16950
16950
|
), u = O(() => s.range ? 2 : !1), f = O(() => {
|
|
16951
16951
|
if (!s.range) return !1;
|
|
16952
|
-
const
|
|
16953
|
-
return s.autoRangeDays && s.autoRangeDays > 0 && (
|
|
16954
|
-
}), h = (
|
|
16955
|
-
const B = new Date(
|
|
16952
|
+
const $ = { partialRange: !1 };
|
|
16953
|
+
return s.autoRangeDays && s.autoRangeDays > 0 && ($.maxRange = s.autoRangeDays, $.autoRange = s.autoRangeDays), $;
|
|
16954
|
+
}), h = ($) => {
|
|
16955
|
+
const B = new Date($);
|
|
16956
16956
|
return B.setHours(0, 0, 0, 0), B;
|
|
16957
|
-
}, m = (
|
|
16958
|
-
const B = new Date(
|
|
16957
|
+
}, m = ($) => {
|
|
16958
|
+
const B = new Date($);
|
|
16959
16959
|
return B.setHours(23, 59, 59, 999), B;
|
|
16960
|
-
}, w = (
|
|
16961
|
-
const ne = new Date(
|
|
16960
|
+
}, w = ($, B) => {
|
|
16961
|
+
const ne = new Date($);
|
|
16962
16962
|
return ne.setDate(ne.getDate() + B), ne;
|
|
16963
16963
|
}, x = O(() => {
|
|
16964
16964
|
if (s.disablePast) return h(/* @__PURE__ */ new Date());
|
|
16965
16965
|
}), g = O(() => {
|
|
16966
16966
|
if (s.maxDaysAhead && s.maxDaysAhead > 0)
|
|
16967
16967
|
return m(w(/* @__PURE__ */ new Date(), s.maxDaysAhead));
|
|
16968
|
-
}), E = Y(null), D = Y(null), S = (
|
|
16969
|
-
D.value = { month:
|
|
16968
|
+
}), E = Y(null), D = Y(null), S = ($) => {
|
|
16969
|
+
D.value = { month: $.month, year: $.year };
|
|
16970
16970
|
}, M = Y(!1);
|
|
16971
16971
|
let _ = null;
|
|
16972
16972
|
Ct(() => {
|
|
16973
|
-
const
|
|
16974
|
-
B(), _ = new MutationObserver(B), _.observe(
|
|
16973
|
+
const $ = document.documentElement, B = () => M.value = $.classList.contains("dark");
|
|
16974
|
+
B(), _ = new MutationObserver(B), _.observe($, { attributes: !0, attributeFilter: ["class"] });
|
|
16975
16975
|
}), fn(() => {
|
|
16976
16976
|
_ == null || _.disconnect(), _ = null;
|
|
16977
16977
|
}), yk(bf(s, "tone"));
|
|
16978
|
-
const y = (
|
|
16979
|
-
const B = new Date(
|
|
16978
|
+
const y = ($) => {
|
|
16979
|
+
const B = new Date($), ne = B.getDay(), X = B.getDate() - ne + (ne === 0 ? -6 : 1);
|
|
16980
16980
|
return B.setDate(X), h(B);
|
|
16981
|
-
}, b = (
|
|
16982
|
-
const B = y(
|
|
16981
|
+
}, b = ($) => {
|
|
16982
|
+
const B = y($);
|
|
16983
16983
|
return B.setDate(B.getDate() + 6), m(B);
|
|
16984
|
-
}, A = (
|
|
16985
|
-
const B = new Date(
|
|
16984
|
+
}, A = ($) => {
|
|
16985
|
+
const B = new Date($);
|
|
16986
16986
|
return B.setDate(1), h(B);
|
|
16987
|
-
}, P = (
|
|
16988
|
-
const B = new Date(
|
|
16987
|
+
}, P = ($) => {
|
|
16988
|
+
const B = new Date($);
|
|
16989
16989
|
return B.setMonth(B.getMonth() + 1), B.setDate(0), m(B);
|
|
16990
16990
|
}, I = O(() => {
|
|
16991
16991
|
if (!s.range) return [];
|
|
16992
|
-
const
|
|
16992
|
+
const $ = /* @__PURE__ */ new Date(), B = h($), ne = y($), X = b($), Z = A($), ae = P($), de = (R, q) => {
|
|
16993
16993
|
let le = R;
|
|
16994
16994
|
s.disablePast && le < B && (le = B);
|
|
16995
16995
|
let ie = q;
|
|
@@ -17009,23 +17009,23 @@ const vk = {
|
|
|
17009
17009
|
range: de(Z, ae)
|
|
17010
17010
|
}
|
|
17011
17011
|
];
|
|
17012
|
-
}), L = async (
|
|
17012
|
+
}), L = async ($) => {
|
|
17013
17013
|
var q, le;
|
|
17014
17014
|
const B = s.modelType || "yyyy-MM-dd";
|
|
17015
|
-
if (
|
|
17015
|
+
if ($.length === 0) {
|
|
17016
17016
|
c.value = null;
|
|
17017
17017
|
return;
|
|
17018
17018
|
}
|
|
17019
|
-
if (
|
|
17020
|
-
const ne = Xc(
|
|
17019
|
+
if ($.length < 2) return;
|
|
17020
|
+
const ne = Xc($[0], B), X = Xc($[1], B);
|
|
17021
17021
|
c.value = [ne, X], await tn();
|
|
17022
|
-
const Z =
|
|
17022
|
+
const Z = $[0], ae = Z.getMonth(), de = Z.getFullYear();
|
|
17023
17023
|
D.value && D.value.month === ae && D.value.year === de || (q = E.value) == null || q.setMonthYear({
|
|
17024
17024
|
month: ae,
|
|
17025
17025
|
year: de
|
|
17026
17026
|
}), (le = E.value) == null || le.openMenu();
|
|
17027
17027
|
};
|
|
17028
|
-
return (
|
|
17028
|
+
return ($, B) => (p(), k("div", {
|
|
17029
17029
|
class: ue(["flex flex-col gap-1 w-full", C(n).class])
|
|
17030
17030
|
}, [
|
|
17031
17031
|
e.skeleton ? (p(), k(we, { key: 0 }, [
|
|
@@ -17037,7 +17037,7 @@ const vk = {
|
|
|
17037
17037
|
for: i.value,
|
|
17038
17038
|
class: "text-sm font-medium"
|
|
17039
17039
|
}, [
|
|
17040
|
-
Ie(
|
|
17040
|
+
Ie(W(e.label) + " ", 1),
|
|
17041
17041
|
r.value ? (p(), k("span", wk, "*")) : z("", !0)
|
|
17042
17042
|
], 8, xk)) : z("", !0),
|
|
17043
17043
|
G(C(Uh), {
|
|
@@ -17091,7 +17091,7 @@ const vk = {
|
|
|
17091
17091
|
], 8, kk),
|
|
17092
17092
|
B[4] || (B[4] = v("span", { class: "w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0" }, null, -1)),
|
|
17093
17093
|
e.prependInner ? (p(), k(we, { key: 0 }, [
|
|
17094
|
-
v("span", _k,
|
|
17094
|
+
v("span", _k, W(e.prependInner), 1),
|
|
17095
17095
|
B[3] || (B[3] = v("span", { class: "w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0" }, null, -1))
|
|
17096
17096
|
], 64)) : z("", !0),
|
|
17097
17097
|
v("input", {
|
|
@@ -17124,13 +17124,13 @@ const vk = {
|
|
|
17124
17124
|
var ae;
|
|
17125
17125
|
return (ae = E.value) == null ? void 0 : ae.closeMenu();
|
|
17126
17126
|
})
|
|
17127
|
-
},
|
|
17127
|
+
}, W(e.cancelLabel), 1),
|
|
17128
17128
|
v("button", {
|
|
17129
17129
|
type: "button",
|
|
17130
17130
|
disabled: X,
|
|
17131
17131
|
class: "inline-flex items-center justify-center rounded-md text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400 disabled:pointer-events-none disabled:opacity-50",
|
|
17132
17132
|
onClick: (Z) => ne()
|
|
17133
|
-
},
|
|
17133
|
+
}, W(e.selectLabel), 9, Mk)
|
|
17134
17134
|
])
|
|
17135
17135
|
]),
|
|
17136
17136
|
_: 2
|
|
@@ -17144,13 +17144,13 @@ const vk = {
|
|
|
17144
17144
|
type: "button",
|
|
17145
17145
|
class: "w-full inline-flex items-center justify-center rounded-md text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400",
|
|
17146
17146
|
onClick: (X) => L(ne.range)
|
|
17147
|
-
},
|
|
17147
|
+
}, W(ne.label), 9, Sk))), 128)) : z("", !0)
|
|
17148
17148
|
])
|
|
17149
17149
|
]),
|
|
17150
17150
|
key: "0"
|
|
17151
17151
|
} : void 0
|
|
17152
17152
|
]), 1032, ["modelValue", "dark", "range", "multi-calendars", "disabled", "locale", "model-type", "formats", "min-date", "max-date", "preset-ranges", "floating"]),
|
|
17153
|
-
l.value ? (p(), k("p", Ek,
|
|
17153
|
+
l.value ? (p(), k("p", Ek, W(s.error), 1)) : z("", !0)
|
|
17154
17154
|
], 64))
|
|
17155
17155
|
], 2));
|
|
17156
17156
|
}
|
|
@@ -17302,13 +17302,13 @@ const vk = {
|
|
|
17302
17302
|
v("div", Rk, [
|
|
17303
17303
|
G(C(Ik), { class: "text-lg font-bold text-neutral-900 dark:text-neutral-50 leading-tight" }, {
|
|
17304
17304
|
default: re(() => [
|
|
17305
|
-
Ie(
|
|
17305
|
+
Ie(W(e.title), 1)
|
|
17306
17306
|
]),
|
|
17307
17307
|
_: 1
|
|
17308
17308
|
}),
|
|
17309
17309
|
G(C(Ok), { class: "hidden" }, {
|
|
17310
17310
|
default: re(() => [
|
|
17311
|
-
Ie(
|
|
17311
|
+
Ie(W(e.title || "Dialog Content"), 1)
|
|
17312
17312
|
]),
|
|
17313
17313
|
_: 1
|
|
17314
17314
|
})
|
|
@@ -17376,7 +17376,7 @@ const vk = {
|
|
|
17376
17376
|
key: 0,
|
|
17377
17377
|
class: ue(["shrink-0", i.value, e.iconClass])
|
|
17378
17378
|
}, null, 8, ["class"])) : z("", !0),
|
|
17379
|
-
Ie(" " +
|
|
17379
|
+
Ie(" " + W(e.label || e.text), 1)
|
|
17380
17380
|
], 16));
|
|
17381
17381
|
}
|
|
17382
17382
|
}), Uk = { class: "flex flex-col gap-3 w-full" }, jk = {
|
|
@@ -17527,8 +17527,8 @@ const vk = {
|
|
|
17527
17527
|
(b) => b.typeDocument === y || b.idDocumentType === y || b[n.itemValue] === y
|
|
17528
17528
|
) || null;
|
|
17529
17529
|
}, E = async (_, y, b) => {
|
|
17530
|
-
var
|
|
17531
|
-
const A = b.target, P = (
|
|
17530
|
+
var $, B, ne, X;
|
|
17531
|
+
const A = b.target, P = ($ = A.files) == null ? void 0 : $[0];
|
|
17532
17532
|
if (!P) return;
|
|
17533
17533
|
const I = _[n.itemValue] || _.id || _.typeDocument, L = URL.createObjectURL(P);
|
|
17534
17534
|
if (!i.value) {
|
|
@@ -17633,7 +17633,7 @@ const vk = {
|
|
|
17633
17633
|
])
|
|
17634
17634
|
])) : l.value.length === 0 && !u.value ? (p(), k("div", Nk, [
|
|
17635
17635
|
G(C(Jr), { class: "w-6 h-6 text-slate-400" }),
|
|
17636
|
-
v("span", Hk,
|
|
17636
|
+
v("span", Hk, W(C(o)("dynamicUploadList.noDocsRequired")), 1)
|
|
17637
17637
|
])) : z("", !0),
|
|
17638
17638
|
(p(!0), k(we, null, Ve(l.value, (b, A) => {
|
|
17639
17639
|
var P;
|
|
@@ -17657,7 +17657,7 @@ const vk = {
|
|
|
17657
17657
|
]),
|
|
17658
17658
|
g(b) ? (p(), k("div", Xk, [
|
|
17659
17659
|
G(C(Jr), { class: "w-4 h-4 text-green-600 shrink-0" }),
|
|
17660
|
-
v("span", Kk,
|
|
17660
|
+
v("span", Kk, W(((P = g(b)) == null ? void 0 : P.filename) || C(o)("dynamicUploadList.fileUploaded")), 1),
|
|
17661
17661
|
e.disabled ? z("", !0) : (p(), k("button", {
|
|
17662
17662
|
key: 0,
|
|
17663
17663
|
type: "button",
|
|
@@ -17684,8 +17684,8 @@ const vk = {
|
|
|
17684
17684
|
key: 1,
|
|
17685
17685
|
class: "w-6 h-6 text-slate-400"
|
|
17686
17686
|
})),
|
|
17687
|
-
v("span", Qk,
|
|
17688
|
-
e.typeFile ? (p(), k("span", Zk,
|
|
17687
|
+
v("span", Qk, W(d.value.has(A) ? C(o)("dynamicUploadList.uploading") : C(o)("dynamicUploadList.clickOrDrag")), 1),
|
|
17688
|
+
e.typeFile ? (p(), k("span", Zk, W(e.typeFile), 1)) : z("", !0),
|
|
17689
17689
|
v("input", {
|
|
17690
17690
|
id: `dyn-upload-input-${A}`,
|
|
17691
17691
|
type: "file",
|
|
@@ -17711,7 +17711,7 @@ const vk = {
|
|
|
17711
17711
|
type: "button",
|
|
17712
17712
|
class: "px-4 py-2 border border-slate-200 dark:border-zinc-700 rounded-md text-sm font-medium hover:bg-slate-50 dark:hover:bg-zinc-800 transition-colors",
|
|
17713
17713
|
onClick: y[1] || (y[1] = (b) => f.value = !1)
|
|
17714
|
-
},
|
|
17714
|
+
}, W(C(o)("common.close") || "Close"), 1)
|
|
17715
17715
|
]),
|
|
17716
17716
|
default: re(() => [
|
|
17717
17717
|
v("div", t2, [
|
|
@@ -17727,12 +17727,12 @@ const vk = {
|
|
|
17727
17727
|
title: "Document Preview"
|
|
17728
17728
|
}, null, 8, s2)) : (p(), k("div", o2, [
|
|
17729
17729
|
G(C(ir), { class: "w-16 h-16 stroke-1" }),
|
|
17730
|
-
v("span", a2,
|
|
17730
|
+
v("span", a2, W(C(o)("dynamicUploadList.noSupportPreview") || "Preview not supported for this file type"), 1),
|
|
17731
17731
|
v("a", {
|
|
17732
17732
|
href: h.value,
|
|
17733
17733
|
target: "_blank",
|
|
17734
17734
|
class: "px-4 py-2 bg-primary-500 text-white rounded-md text-sm font-semibold hover:bg-primary-600 transition-colors"
|
|
17735
|
-
},
|
|
17735
|
+
}, W(C(o)("dynamicUploadList.viewOriginal") || "View Original"), 9, i2)
|
|
17736
17736
|
]))
|
|
17737
17737
|
])
|
|
17738
17738
|
]),
|
|
@@ -17991,7 +17991,7 @@ const vk = {
|
|
|
17991
17991
|
default: re(() => [
|
|
17992
17992
|
G(C(jr), { class: "text-sm font-semibold dark:text-neutral-100" }, {
|
|
17993
17993
|
default: re(() => [
|
|
17994
|
-
Ie(
|
|
17994
|
+
Ie(W(e.label), 1)
|
|
17995
17995
|
]),
|
|
17996
17996
|
_: 1
|
|
17997
17997
|
})
|
|
@@ -18026,7 +18026,7 @@ const vk = {
|
|
|
18026
18026
|
class: "text-[11px] dark:bg-neutral-800 dark:text-neutral-300"
|
|
18027
18027
|
}, {
|
|
18028
18028
|
default: re(() => [
|
|
18029
|
-
Ie(" Allowed: " +
|
|
18029
|
+
Ie(" Allowed: " + W(S.value), 1)
|
|
18030
18030
|
]),
|
|
18031
18031
|
_: 1
|
|
18032
18032
|
}),
|
|
@@ -18035,7 +18035,7 @@ const vk = {
|
|
|
18035
18035
|
class: "text-[11px] dark:bg-neutral-800 dark:text-neutral-300"
|
|
18036
18036
|
}, {
|
|
18037
18037
|
default: re(() => [
|
|
18038
|
-
Ie(" Max: " +
|
|
18038
|
+
Ie(" Max: " + W(n.maxSizeMb) + "MB ", 1)
|
|
18039
18039
|
]),
|
|
18040
18040
|
_: 1
|
|
18041
18041
|
})
|
|
@@ -18046,7 +18046,7 @@ const vk = {
|
|
|
18046
18046
|
class: "mt-2 dark:bg-neutral-800 dark:text-neutral-300"
|
|
18047
18047
|
}, {
|
|
18048
18048
|
default: re(() => [
|
|
18049
|
-
Ie(
|
|
18049
|
+
Ie(W(r.value) + " • " + W(l.value ? u(l.value) : ""), 1)
|
|
18050
18050
|
]),
|
|
18051
18051
|
_: 1
|
|
18052
18052
|
})) : z("", !0)
|
|
@@ -18069,7 +18069,7 @@ const vk = {
|
|
|
18069
18069
|
default: re(() => [
|
|
18070
18070
|
G(C(c2), { class: "text-sm" }, {
|
|
18071
18071
|
default: re(() => [
|
|
18072
|
-
Ie(
|
|
18072
|
+
Ie(W(c.value), 1)
|
|
18073
18073
|
]),
|
|
18074
18074
|
_: 1
|
|
18075
18075
|
})
|
|
@@ -18145,11 +18145,11 @@ const vk = {
|
|
|
18145
18145
|
default: re(() => [
|
|
18146
18146
|
G(jr, { class: "text-sm font-semibold dark:text-neutral-100" }, {
|
|
18147
18147
|
default: re(() => [
|
|
18148
|
-
Ie(
|
|
18148
|
+
Ie(W(e.title), 1)
|
|
18149
18149
|
]),
|
|
18150
18150
|
_: 1
|
|
18151
18151
|
}),
|
|
18152
|
-
e.description ? (p(), k("div", g2,
|
|
18152
|
+
e.description ? (p(), k("div", g2, W(e.description), 1)) : z("", !0)
|
|
18153
18153
|
]),
|
|
18154
18154
|
_: 1
|
|
18155
18155
|
}),
|
|
@@ -18171,8 +18171,8 @@ const vk = {
|
|
|
18171
18171
|
}, null, 8, b2)) : (p(), k("div", y2, [
|
|
18172
18172
|
G(C(ir), { class: "w-10 h-10" }),
|
|
18173
18173
|
v("div", v2, [
|
|
18174
|
-
v("p", x2,
|
|
18175
|
-
v("p", w2,
|
|
18174
|
+
v("p", x2, W((w = r.value) == null ? void 0 : w.name), 1),
|
|
18175
|
+
v("p", w2, W((x = r.value) == null ? void 0 : x.size), 1)
|
|
18176
18176
|
])
|
|
18177
18177
|
])),
|
|
18178
18178
|
v("div", {
|
|
@@ -18258,15 +18258,15 @@ const vk = {
|
|
|
18258
18258
|
v("div", A2, [
|
|
18259
18259
|
v("div", S2, [
|
|
18260
18260
|
m[4] || (m[4] = v("span", { class: "w-14 shrink-0 text-muted-foreground dark:text-neutral-400" }, "Nama", -1)),
|
|
18261
|
-
v("span", D2,
|
|
18261
|
+
v("span", D2, W((g = r.value) == null ? void 0 : g.name), 1)
|
|
18262
18262
|
]),
|
|
18263
18263
|
v("div", M2, [
|
|
18264
18264
|
m[5] || (m[5] = v("span", { class: "w-14 shrink-0 text-muted-foreground dark:text-neutral-400" }, "Ukuran", -1)),
|
|
18265
|
-
v("span", E2,
|
|
18265
|
+
v("span", E2, W((E = r.value) == null ? void 0 : E.size), 1)
|
|
18266
18266
|
]),
|
|
18267
18267
|
v("div", P2, [
|
|
18268
18268
|
m[6] || (m[6] = v("span", { class: "w-14 shrink-0 text-muted-foreground dark:text-neutral-400" }, "Tipe", -1)),
|
|
18269
|
-
v("span", T2,
|
|
18269
|
+
v("span", T2, W((D = r.value) == null ? void 0 : D.type), 1)
|
|
18270
18270
|
])
|
|
18271
18271
|
])
|
|
18272
18272
|
], 4)
|
|
@@ -18403,7 +18403,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
18403
18403
|
_method: A,
|
|
18404
18404
|
withCredentials: !0,
|
|
18405
18405
|
transformRequest: [
|
|
18406
|
-
(
|
|
18406
|
+
($, B) => (B && (delete B["Content-Type"], delete B["content-type"]), $)
|
|
18407
18407
|
]
|
|
18408
18408
|
}), L = (I == null ? void 0 : I.data) ?? I;
|
|
18409
18409
|
o.value = _, s("uploaded", L);
|
|
@@ -18541,12 +18541,12 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
18541
18541
|
}, L = async () => {
|
|
18542
18542
|
n.disabled || (c.value ? I() : await P());
|
|
18543
18543
|
};
|
|
18544
|
-
let
|
|
18544
|
+
let $ = null;
|
|
18545
18545
|
const B = async (R) => {
|
|
18546
18546
|
if (n.disabled) return;
|
|
18547
|
-
s("update:modelValue", null), c.value || await P(!1),
|
|
18547
|
+
s("update:modelValue", null), c.value || await P(!1), $ && clearTimeout($);
|
|
18548
18548
|
const q = S.value;
|
|
18549
|
-
|
|
18549
|
+
$ = setTimeout(() => {
|
|
18550
18550
|
u.value = q;
|
|
18551
18551
|
}, 300);
|
|
18552
18552
|
}, ne = (R) => {
|
|
@@ -18582,7 +18582,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
18582
18582
|
i.value = ((R = a.value) == null ? void 0 : R.querySelector("input")) ?? null;
|
|
18583
18583
|
}), d.value && E();
|
|
18584
18584
|
}), fn(() => {
|
|
18585
|
-
document.removeEventListener("mousedown", ae),
|
|
18585
|
+
document.removeEventListener("mousedown", ae), $ && clearTimeout($);
|
|
18586
18586
|
}), Fe(d, (R) => {
|
|
18587
18587
|
c.value || (S.value = R);
|
|
18588
18588
|
}), Fe(
|
|
@@ -18600,7 +18600,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
18600
18600
|
for: l.value,
|
|
18601
18601
|
class: "!text-sm !font-medium !mb-1 !block"
|
|
18602
18602
|
}, [
|
|
18603
|
-
Ie(
|
|
18603
|
+
Ie(W(n.label) + " ", 1),
|
|
18604
18604
|
n.required ? (p(), k("span", F2, "*")) : z("", !0)
|
|
18605
18605
|
], 8, R2)) : z("", !0),
|
|
18606
18606
|
v("div", $2, [
|
|
@@ -18674,11 +18674,11 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
18674
18674
|
class: "shrink-0"
|
|
18675
18675
|
}, null, 8, ["size"]))
|
|
18676
18676
|
]),
|
|
18677
|
-
v("span", X2,
|
|
18677
|
+
v("span", X2, W(le), 1)
|
|
18678
18678
|
])
|
|
18679
18679
|
], 10, H2))), 128))
|
|
18680
18680
|
], 2)),
|
|
18681
|
-
h.value && _.value.length > 0 ? (p(), k("div", K2, " Showing " +
|
|
18681
|
+
h.value && _.value.length > 0 ? (p(), k("div", K2, " Showing " + W(y.value.length) + " / " + W(_.value.length), 1)) : z("", !0)
|
|
18682
18682
|
], 36)
|
|
18683
18683
|
])) : z("", !0)
|
|
18684
18684
|
])
|
|
@@ -18720,12 +18720,12 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
18720
18720
|
}
|
|
18721
18721
|
async function f(D, S, M, _, y) {
|
|
18722
18722
|
const b = await new Promise((I, L) => {
|
|
18723
|
-
const
|
|
18723
|
+
const $ = URL.createObjectURL(D), B = new Image();
|
|
18724
18724
|
B.onload = () => {
|
|
18725
|
-
URL.revokeObjectURL(
|
|
18725
|
+
URL.revokeObjectURL($), I(B);
|
|
18726
18726
|
}, B.onerror = (ne) => {
|
|
18727
|
-
URL.revokeObjectURL(
|
|
18728
|
-
}, B.src =
|
|
18727
|
+
URL.revokeObjectURL($), L(ne);
|
|
18728
|
+
}, B.src = $;
|
|
18729
18729
|
}), A = document.createElement("canvas");
|
|
18730
18730
|
A.width = S, A.height = M;
|
|
18731
18731
|
const P = A.getContext("2d");
|
|
@@ -18986,11 +18986,11 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
18986
18986
|
default: re(() => [
|
|
18987
18987
|
G(jr, { class: "text-sm font-semibold dark:text-neutral-100" }, {
|
|
18988
18988
|
default: re(() => [
|
|
18989
|
-
Ie(
|
|
18989
|
+
Ie(W(e.title), 1)
|
|
18990
18990
|
]),
|
|
18991
18991
|
_: 1
|
|
18992
18992
|
}),
|
|
18993
|
-
e.description ? (p(), k("div", e_,
|
|
18993
|
+
e.description ? (p(), k("div", e_, W(e.description), 1)) : z("", !0)
|
|
18994
18994
|
]),
|
|
18995
18995
|
_: 1
|
|
18996
18996
|
}),
|
|
@@ -19098,15 +19098,15 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19098
19098
|
v("div", o_, [
|
|
19099
19099
|
v("div", a_, [
|
|
19100
19100
|
h[4] || (h[4] = v("span", { class: "w-14 shrink-0 text-muted-foreground dark:text-neutral-400" }, "Nama", -1)),
|
|
19101
|
-
v("span", i_,
|
|
19101
|
+
v("span", i_, W((m = i.value) == null ? void 0 : m.name), 1)
|
|
19102
19102
|
]),
|
|
19103
19103
|
v("div", r_, [
|
|
19104
19104
|
h[5] || (h[5] = v("span", { class: "w-14 shrink-0 text-muted-foreground dark:text-neutral-400" }, "Ukuran", -1)),
|
|
19105
|
-
v("span", l_,
|
|
19105
|
+
v("span", l_, W((w = i.value) == null ? void 0 : w.size), 1)
|
|
19106
19106
|
]),
|
|
19107
19107
|
v("div", c_, [
|
|
19108
19108
|
h[6] || (h[6] = v("span", { class: "w-14 shrink-0 text-muted-foreground dark:text-neutral-400" }, "Tipe", -1)),
|
|
19109
|
-
v("span", d_,
|
|
19109
|
+
v("span", d_, W((x = i.value) == null ? void 0 : x.type), 1)
|
|
19110
19110
|
])
|
|
19111
19111
|
])
|
|
19112
19112
|
], 4)
|
|
@@ -19275,7 +19275,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19275
19275
|
var Z;
|
|
19276
19276
|
d(), n.uploadFn || (Z = n.endpoint) != null && Z.apiUrl ? await I(X) : o.value = X, a.value = !1, i.value = null;
|
|
19277
19277
|
}
|
|
19278
|
-
function
|
|
19278
|
+
function $() {
|
|
19279
19279
|
a.value = !1, i.value = null;
|
|
19280
19280
|
}
|
|
19281
19281
|
async function B() {
|
|
@@ -19334,7 +19334,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19334
19334
|
"output-height": e.outputHeight,
|
|
19335
19335
|
quality: e.quality,
|
|
19336
19336
|
onDone: L,
|
|
19337
|
-
onCancel:
|
|
19337
|
+
onCancel: $
|
|
19338
19338
|
}, null, 8, ["modelValue", "file", "title", "description", "auto-open-editor", "aspect-ratio", "output-width", "output-height", "quality"])
|
|
19339
19339
|
]));
|
|
19340
19340
|
}
|
|
@@ -19506,13 +19506,13 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19506
19506
|
function L(fe) {
|
|
19507
19507
|
return !A(fe) && I.value;
|
|
19508
19508
|
}
|
|
19509
|
-
const
|
|
19509
|
+
const $ = O(() => {
|
|
19510
19510
|
const fe = m.value, ve = /* @__PURE__ */ new Set();
|
|
19511
19511
|
if (o.returnObject) for (const Se of fe) ve.add(f(Se));
|
|
19512
19512
|
else for (const Se of fe) ve.add(Se);
|
|
19513
19513
|
return ve;
|
|
19514
19514
|
}), B = O(() => {
|
|
19515
|
-
const fe =
|
|
19515
|
+
const fe = $.value;
|
|
19516
19516
|
return (M.value || []).filter((ve) => !fe.has(f(ve)));
|
|
19517
19517
|
}), ne = O(() => M.value.length === 0 ? !1 : B.value.length === 0), X = Y(null), Z = Y(null), ae = Y(null), de = Y(!1), R = Y(""), q = Y(0), le = Y(0), { floatingStyles: ie } = vr(X, Z, {
|
|
19518
19518
|
whileElementsMounted: pr,
|
|
@@ -19652,7 +19652,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19652
19652
|
for: l.value,
|
|
19653
19653
|
class: "text-sm font-medium"
|
|
19654
19654
|
}, [
|
|
19655
|
-
Ie(
|
|
19655
|
+
Ie(W(a.value) + " ", 1),
|
|
19656
19656
|
c.value ? (p(), k("span", g_, "*")) : z("", !0)
|
|
19657
19657
|
], 8, m_)) : z("", !0),
|
|
19658
19658
|
v("div", {
|
|
@@ -19676,7 +19676,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19676
19676
|
key: `chip-${h(Se, ze)}`,
|
|
19677
19677
|
class: "inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 border-transparent gap-1"
|
|
19678
19678
|
}, [
|
|
19679
|
-
v("span", x_,
|
|
19679
|
+
v("span", x_, W(u(Se)), 1),
|
|
19680
19680
|
o.disabled ? z("", !0) : (p(), k("button", {
|
|
19681
19681
|
key: 0,
|
|
19682
19682
|
class: "ml-1 opacity-70 hover:opacity-100",
|
|
@@ -19684,8 +19684,8 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19684
19684
|
"aria-label": "Remove"
|
|
19685
19685
|
}, " ✕ ", 8, w_))
|
|
19686
19686
|
]))), 128)),
|
|
19687
|
-
o.maxChips !== null && y.value.length > o.maxChips ? (p(), k("div", k_, " +" +
|
|
19688
|
-
])) : (p(), k("div", __,
|
|
19687
|
+
o.maxChips !== null && y.value.length > o.maxChips ? (p(), k("div", k_, " +" + W(y.value.length - (o.maxChips ?? 0)), 1)) : z("", !0)
|
|
19688
|
+
])) : (p(), k("div", __, W(o.placeholder), 1))
|
|
19689
19689
|
]),
|
|
19690
19690
|
v("div", C_, [
|
|
19691
19691
|
ot.value ? (p(), k("button", {
|
|
@@ -19750,7 +19750,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19750
19750
|
disabled: o.disabled || L(Se),
|
|
19751
19751
|
onClick: (mt) => oe(Se)
|
|
19752
19752
|
}, [
|
|
19753
|
-
v("span", E_,
|
|
19753
|
+
v("span", E_, W(u(Se)), 1),
|
|
19754
19754
|
A(Se) ? (p(), k("span", P_, "✓")) : z("", !0)
|
|
19755
19755
|
], 14, M_))), 128))
|
|
19756
19756
|
], 6),
|
|
@@ -19762,7 +19762,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19762
19762
|
], 4)) : z("", !0)
|
|
19763
19763
|
]))
|
|
19764
19764
|
], 512),
|
|
19765
|
-
d.value ? (p(), k("p", L_,
|
|
19765
|
+
d.value ? (p(), k("p", L_, W(o.error), 1)) : z("", !0)
|
|
19766
19766
|
], 64))
|
|
19767
19767
|
], 10, h_)), [
|
|
19768
19768
|
[cs, i.value]
|
|
@@ -19877,9 +19877,9 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19877
19877
|
const A = (((L = _.clipboardData) == null ? void 0 : L.getData("text")) ?? "").replaceAll(/[^a-zA-Z0-9]/g, "");
|
|
19878
19878
|
if (!A) return;
|
|
19879
19879
|
let P = y;
|
|
19880
|
-
for (const
|
|
19880
|
+
for (const $ of A) {
|
|
19881
19881
|
if (P >= f.value) break;
|
|
19882
|
-
l.value[P] =
|
|
19882
|
+
l.value[P] = $, P++;
|
|
19883
19883
|
}
|
|
19884
19884
|
const I = l.value.join("");
|
|
19885
19885
|
i("updateOtp", I), i("update:modelValue", I), I.length === f.value && x(I), m(Math.min(P, f.value - 1));
|
|
@@ -19892,12 +19892,12 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19892
19892
|
key: 0,
|
|
19893
19893
|
for: o.value,
|
|
19894
19894
|
class: "text-sm font-medium text-foreground"
|
|
19895
|
-
},
|
|
19895
|
+
}, W(a.label), 9, F_)) : (p(), k("label", {
|
|
19896
19896
|
key: 1,
|
|
19897
19897
|
for: o.value,
|
|
19898
19898
|
class: "text-sm font-medium text-foreground"
|
|
19899
19899
|
}, " Masukkan kode keamanan ", 8, $_)),
|
|
19900
|
-
v("p", z_, " Ketik " +
|
|
19900
|
+
v("p", z_, " Ketik " + W(f.value) + " digit kode verifikasi Anda ", 1)
|
|
19901
19901
|
])) : z("", !0),
|
|
19902
19902
|
v("div", V_, [
|
|
19903
19903
|
(p(!0), k(we, null, Ve(f.value, (b) => (p(), k("input", {
|
|
@@ -19976,8 +19976,8 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
19976
19976
|
}), i = O(() => `${Math.round(s.value)}%`);
|
|
19977
19977
|
return (r, l) => (p(), k("div", j_, [
|
|
19978
19978
|
e.label || e.showValue ? (p(), k("div", W_, [
|
|
19979
|
-
e.label ? (p(), k("span", N_,
|
|
19980
|
-
e.showValue ? (p(), k("span", H_,
|
|
19979
|
+
e.label ? (p(), k("span", N_, W(e.label), 1)) : z("", !0),
|
|
19980
|
+
e.showValue ? (p(), k("span", H_, W(i.value), 1)) : z("", !0)
|
|
19981
19981
|
])) : z("", !0),
|
|
19982
19982
|
v("div", {
|
|
19983
19983
|
class: ue(o.value)
|
|
@@ -20106,7 +20106,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20106
20106
|
class: "text-sm font-medium"
|
|
20107
20107
|
}, {
|
|
20108
20108
|
default: re(() => [
|
|
20109
|
-
Ie(
|
|
20109
|
+
Ie(W(e.label) + " ", 1),
|
|
20110
20110
|
e.required ? (p(), k("span", Q_, "*")) : z("", !0)
|
|
20111
20111
|
]),
|
|
20112
20112
|
_: 1
|
|
@@ -20152,7 +20152,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20152
20152
|
e.disabled ? "cursor-not-allowed opacity-50" : ""
|
|
20153
20153
|
])
|
|
20154
20154
|
}, [
|
|
20155
|
-
Ie(
|
|
20155
|
+
Ie(W(u(M)) + " ", 1),
|
|
20156
20156
|
e.required && c.value.length === 1 && e.label ? (p(), k("span", aC, "*")) : z("", !0)
|
|
20157
20157
|
], 10, oC)
|
|
20158
20158
|
], 8, sC)
|
|
@@ -20160,7 +20160,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20160
20160
|
], 2),
|
|
20161
20161
|
h.value && m.value ? (p(), k("div", iC, [
|
|
20162
20162
|
G(C(Xa), { class: "w-4 h-4 flex-shrink-0" }),
|
|
20163
|
-
Ie(" " +
|
|
20163
|
+
Ie(" " + W(m.value), 1)
|
|
20164
20164
|
])) : z("", !0)
|
|
20165
20165
|
])
|
|
20166
20166
|
]));
|
|
@@ -20219,7 +20219,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20219
20219
|
if (A) {
|
|
20220
20220
|
r.value = !0, l.value = null;
|
|
20221
20221
|
try {
|
|
20222
|
-
const L = { page: 1, perPage: 100 },
|
|
20222
|
+
const L = { page: 1, perPage: 100 }, $ = ((I = o.endpoint) == null ? void 0 : I.apiMethod) || o.apiMethod, B = await n(A, $, L);
|
|
20223
20223
|
let ne = B;
|
|
20224
20224
|
o.dataPath ? ne = o.dataPath.split(".").reduce((Z, ae) => Z && Z[ae] !== "undefined" ? Z[ae] : void 0, B) : typeof B == "object" && !Array.isArray(B) && B.data && (ne = B.data), Array.isArray(ne) ? i.value = ne : (console.warn("DCodeRadioCustom: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."), l.value = "Format respons data tidak valid. Array tidak ditemukan.");
|
|
20225
20225
|
} catch (L) {
|
|
@@ -20277,7 +20277,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20277
20277
|
class: "text-sm font-medium"
|
|
20278
20278
|
}, {
|
|
20279
20279
|
default: re(() => [
|
|
20280
|
-
Ie(
|
|
20280
|
+
Ie(W(e.label) + " ", 1),
|
|
20281
20281
|
e.required ? (p(), k("span", lC, "*")) : z("", !0)
|
|
20282
20282
|
]),
|
|
20283
20283
|
_: 1
|
|
@@ -20297,7 +20297,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20297
20297
|
S(m(I)) ? d.value ? "border-primary-500 bg-primary-500/10 shadow-none" : "border-primary-500 bg-primary-50 shadow-md shadow-primary-100" : d.value ? "border-neutral-700 bg-neutral-800 hover:border-neutral-600" : "border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm",
|
|
20298
20298
|
e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
20299
20299
|
]),
|
|
20300
|
-
onClick: (
|
|
20300
|
+
onClick: ($) => !e.disabled && b(m(I))
|
|
20301
20301
|
}, [
|
|
20302
20302
|
v("input", {
|
|
20303
20303
|
id: e.id ? `${e.id}-${L}` : `${g.value}-${L}`,
|
|
@@ -20307,7 +20307,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20307
20307
|
checked: S(m(I)),
|
|
20308
20308
|
disabled: e.disabled,
|
|
20309
20309
|
required: e.required && L === 0,
|
|
20310
|
-
onChange: (
|
|
20310
|
+
onChange: ($) => y(m(I), $),
|
|
20311
20311
|
class: "sr-only",
|
|
20312
20312
|
tabindex: "-1"
|
|
20313
20313
|
}, null, 40, fC),
|
|
@@ -20337,14 +20337,14 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20337
20337
|
e.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
20338
20338
|
])
|
|
20339
20339
|
}, [
|
|
20340
|
-
Ie(
|
|
20340
|
+
Ie(W(w(I)) + " ", 1),
|
|
20341
20341
|
e.required && h.value.length === 1 && e.label ? (p(), k("span", mC, "*")) : z("", !0)
|
|
20342
20342
|
], 10, pC)
|
|
20343
20343
|
], 10, uC))), 128))
|
|
20344
20344
|
], 2),
|
|
20345
20345
|
E.value && D.value ? (p(), k("div", gC, [
|
|
20346
20346
|
G(C(Xa), { class: "w-4 h-4 flex-shrink-0" }),
|
|
20347
|
-
Ie(" " +
|
|
20347
|
+
Ie(" " + W(D.value), 1)
|
|
20348
20348
|
])) : z("", !0)
|
|
20349
20349
|
])
|
|
20350
20350
|
]));
|
|
@@ -20483,16 +20483,16 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20483
20483
|
class: "text-sm font-medium"
|
|
20484
20484
|
}, {
|
|
20485
20485
|
default: re(() => [
|
|
20486
|
-
Ie(
|
|
20486
|
+
Ie(W(c.value) + " ", 1),
|
|
20487
20487
|
e.required ? (p(), k("span", bC, "*")) : z("", !0)
|
|
20488
20488
|
]),
|
|
20489
20489
|
_: 1
|
|
20490
20490
|
}, 8, ["for"])) : z("", !0),
|
|
20491
20491
|
v("div", yC, [
|
|
20492
20492
|
e.showValue ? (p(), k("div", vC, [
|
|
20493
|
-
v("span", xC,
|
|
20494
|
-
v("span", wC,
|
|
20495
|
-
v("span", kC,
|
|
20493
|
+
v("span", xC, W(o.valuePrefix) + W(e.min) + W(o.valueSuffix), 1),
|
|
20494
|
+
v("span", wC, W(h.value), 1),
|
|
20495
|
+
v("span", kC, W(o.valuePrefix) + W(e.max) + W(o.valueSuffix), 1)
|
|
20496
20496
|
])) : z("", !0),
|
|
20497
20497
|
v("div", _C, [
|
|
20498
20498
|
v("div", {
|
|
@@ -20534,7 +20534,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20534
20534
|
style: ct({ left: `${D(y.value)}%`, transform: "translateX(-50%)" })
|
|
20535
20535
|
}, [
|
|
20536
20536
|
_[0] || (_[0] = v("div", { class: "w-1 h-2 bg-gray-400 rounded-full" }, null, -1)),
|
|
20537
|
-
v("span", SC,
|
|
20537
|
+
v("span", SC, W(y.label), 1)
|
|
20538
20538
|
], 4))), 128))
|
|
20539
20539
|
])) : z("", !0)
|
|
20540
20540
|
]),
|
|
@@ -20552,11 +20552,11 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20552
20552
|
d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
20553
20553
|
})
|
|
20554
20554
|
], -1)),
|
|
20555
|
-
Ie(" " +
|
|
20555
|
+
Ie(" " + W(e.error), 1)
|
|
20556
20556
|
])) : z("", !0),
|
|
20557
20557
|
S.value ? (p(), pe(_t("style"), { key: 2 }, {
|
|
20558
20558
|
default: re(() => [
|
|
20559
|
-
Ie(
|
|
20559
|
+
Ie(W(S.value), 1)
|
|
20560
20560
|
]),
|
|
20561
20561
|
_: 1
|
|
20562
20562
|
})) : z("", !0)
|
|
@@ -20651,7 +20651,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20651
20651
|
class: "text-sm font-medium"
|
|
20652
20652
|
}, {
|
|
20653
20653
|
default: re(() => [
|
|
20654
|
-
Ie(
|
|
20654
|
+
Ie(W(e.label) + " ", 1),
|
|
20655
20655
|
e.required ? (p(), k("span", PC, "*")) : z("", !0)
|
|
20656
20656
|
]),
|
|
20657
20657
|
_: 1
|
|
@@ -20758,7 +20758,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20758
20758
|
v("span", {
|
|
20759
20759
|
class: ue(["inline-block w-2 h-2 rounded-full animate-pulse", o.value ? "bg-green-200" : "bg-gray-300"])
|
|
20760
20760
|
}, null, 2),
|
|
20761
|
-
Ie(" " +
|
|
20761
|
+
Ie(" " + W(d.value), 1)
|
|
20762
20762
|
])
|
|
20763
20763
|
]),
|
|
20764
20764
|
_: 1
|
|
@@ -20966,7 +20966,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20966
20966
|
return f(se);
|
|
20967
20967
|
};
|
|
20968
20968
|
let L = null;
|
|
20969
|
-
const
|
|
20969
|
+
const $ = (oe) => {
|
|
20970
20970
|
if (oe === "") return null;
|
|
20971
20971
|
if (o.valueType === "number" && o.returnNumber) {
|
|
20972
20972
|
const V = oe.replaceAll(`
|
|
@@ -20975,7 +20975,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
20975
20975
|
}
|
|
20976
20976
|
return oe;
|
|
20977
20977
|
}, B = (oe) => {
|
|
20978
|
-
w.value = oe, s("update:modelValue",
|
|
20978
|
+
w.value = oe, s("update:modelValue", $(oe));
|
|
20979
20979
|
}, ne = (oe, V) => {
|
|
20980
20980
|
const se = f(V);
|
|
20981
20981
|
g.value = !0, oe.value = se, B(se), queueMicrotask(() => g.value = !1);
|
|
@@ -21057,7 +21057,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21057
21057
|
for: l.value,
|
|
21058
21058
|
class: "text-sm font-medium"
|
|
21059
21059
|
}, [
|
|
21060
|
-
Ie(
|
|
21060
|
+
Ie(W(a.value) + " ", 1),
|
|
21061
21061
|
c.value ? (p(), k("span", UC, "*")) : z("", !0)
|
|
21062
21062
|
], 8, VC)) : z("", !0),
|
|
21063
21063
|
v("div", jC, [
|
|
@@ -21079,9 +21079,9 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21079
21079
|
onClick: le
|
|
21080
21080
|
}, " ✕ ")
|
|
21081
21081
|
])) : z("", !0),
|
|
21082
|
-
ye.value && !Le.value ? (p(), k("p", HC,
|
|
21082
|
+
ye.value && !Le.value ? (p(), k("p", HC, W(ke.value), 1)) : z("", !0)
|
|
21083
21083
|
]),
|
|
21084
|
-
Le.value ? (p(), k("p", GC,
|
|
21084
|
+
Le.value ? (p(), k("p", GC, W(o.error), 1)) : z("", !0)
|
|
21085
21085
|
], 64))
|
|
21086
21086
|
], 10, $C)), [
|
|
21087
21087
|
[cs, i.value]
|
|
@@ -21258,7 +21258,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21258
21258
|
v("div", KC, [
|
|
21259
21259
|
o.value ? (p(), k("div", YC, [...f[0] || (f[0] = [
|
|
21260
21260
|
v("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" }, null, -1)
|
|
21261
|
-
])])) : a.value ? (p(), k("div", JC,
|
|
21261
|
+
])])) : a.value ? (p(), k("div", JC, W(a.value), 1)) : (p(), k("div", QC, [
|
|
21262
21262
|
f[7] || (f[7] = v("div", { class: "absolute left-4 top-0 h-full w-px bg-border" }, null, -1)),
|
|
21263
21263
|
v("div", ZC, [
|
|
21264
21264
|
(p(!0), k(we, null, Ve(r.value, (g, E) => (p(), k("div", {
|
|
@@ -21274,25 +21274,25 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21274
21274
|
v("div", tA, [
|
|
21275
21275
|
g.type === "flight" ? (p(), k(we, { key: 0 }, [
|
|
21276
21276
|
v("div", nA, [
|
|
21277
|
-
v("p", sA,
|
|
21278
|
-
v("p", oA,
|
|
21277
|
+
v("p", sA, W(g.title), 1),
|
|
21278
|
+
v("p", oA, W(g.meta), 1)
|
|
21279
21279
|
]),
|
|
21280
21280
|
v("p", aA, [
|
|
21281
|
-
v("span", iA,
|
|
21281
|
+
v("span", iA, W(g.from), 1),
|
|
21282
21282
|
G(C(Af), { class: "mx-2 inline h-4 w-4" }),
|
|
21283
|
-
v("span", rA,
|
|
21283
|
+
v("span", rA, W(g.to), 1)
|
|
21284
21284
|
]),
|
|
21285
|
-
v("p", lA,
|
|
21285
|
+
v("p", lA, W(g.time), 1),
|
|
21286
21286
|
g.fileName ? (p(), k("div", cA, [
|
|
21287
21287
|
G(C(ir), { class: "h-4 w-4 text-muted-foreground" }),
|
|
21288
|
-
v("span", null,
|
|
21288
|
+
v("span", null, W(g.fileName), 1)
|
|
21289
21289
|
])) : z("", !0)
|
|
21290
21290
|
], 64)) : g.type === "interview" ? (p(), k(we, { key: 1 }, [
|
|
21291
21291
|
v("div", dA, [
|
|
21292
|
-
v("p", uA,
|
|
21293
|
-
v("p", fA,
|
|
21292
|
+
v("p", uA, W(g.title), 1),
|
|
21293
|
+
v("p", fA, W(g.meta), 1)
|
|
21294
21294
|
]),
|
|
21295
|
-
v("p", hA,
|
|
21295
|
+
v("p", hA, W(g.desc), 1),
|
|
21296
21296
|
G(C(Ca), { class: "my-4" }),
|
|
21297
21297
|
v("div", pA, [
|
|
21298
21298
|
v("div", mA, [
|
|
@@ -21304,7 +21304,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21304
21304
|
}, null, 8, ["src"])) : z("", !0),
|
|
21305
21305
|
G(C(Jc), null, {
|
|
21306
21306
|
default: re(() => [
|
|
21307
|
-
Ie(
|
|
21307
|
+
Ie(W(d(g.personName ?? "")), 1)
|
|
21308
21308
|
]),
|
|
21309
21309
|
_: 2
|
|
21310
21310
|
}, 1024)
|
|
@@ -21312,8 +21312,8 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21312
21312
|
_: 2
|
|
21313
21313
|
}, 1024),
|
|
21314
21314
|
v("div", gA, [
|
|
21315
|
-
v("p", bA,
|
|
21316
|
-
v("p", yA,
|
|
21315
|
+
v("p", bA, W(g.personName), 1),
|
|
21316
|
+
v("p", yA, W(g.personRole), 1)
|
|
21317
21317
|
])
|
|
21318
21318
|
]),
|
|
21319
21319
|
v("div", vA, [
|
|
@@ -21351,33 +21351,33 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21351
21351
|
]),
|
|
21352
21352
|
v("div", _A, [
|
|
21353
21353
|
v("div", CA, [
|
|
21354
|
-
v("p", AA,
|
|
21355
|
-
v("p", SA,
|
|
21354
|
+
v("p", AA, W(g.title), 1),
|
|
21355
|
+
v("p", SA, W(g.meta), 1)
|
|
21356
21356
|
]),
|
|
21357
|
-
v("p", DA,
|
|
21357
|
+
v("p", DA, W(g.desc), 1),
|
|
21358
21358
|
v("div", {
|
|
21359
21359
|
class: ue(["mt-4 grid gap-3", C(n) ? "grid-cols-1" : "grid-cols-3"])
|
|
21360
21360
|
}, [
|
|
21361
21361
|
v("div", MA, [
|
|
21362
21362
|
f[1] || (f[1] = v("p", { class: "text-sm font-medium" }, "Customer", -1)),
|
|
21363
|
-
v("p", EA,
|
|
21363
|
+
v("p", EA, W(g.customer), 1)
|
|
21364
21364
|
]),
|
|
21365
21365
|
v("div", PA, [
|
|
21366
21366
|
f[2] || (f[2] = v("p", { class: "text-sm font-medium" }, "Price", -1)),
|
|
21367
|
-
v("p", TA,
|
|
21367
|
+
v("p", TA, W(g.price), 1)
|
|
21368
21368
|
]),
|
|
21369
21369
|
v("div", OA, [
|
|
21370
21370
|
f[3] || (f[3] = v("p", { class: "text-sm font-medium" }, "Quantity", -1)),
|
|
21371
|
-
v("p", IA,
|
|
21371
|
+
v("p", IA, W(g.qty), 1)
|
|
21372
21372
|
])
|
|
21373
21373
|
], 2)
|
|
21374
21374
|
])
|
|
21375
21375
|
])) : g.type === "design" ? (p(), k(we, { key: 3 }, [
|
|
21376
21376
|
v("div", LA, [
|
|
21377
|
-
v("p", BA,
|
|
21378
|
-
v("p", RA,
|
|
21377
|
+
v("p", BA, W(g.title), 1),
|
|
21378
|
+
v("p", RA, W(g.meta), 1)
|
|
21379
21379
|
]),
|
|
21380
|
-
v("p", FA,
|
|
21380
|
+
v("p", FA, W(g.desc), 1),
|
|
21381
21381
|
v("div", $A, [
|
|
21382
21382
|
G(C(Yc), { class: "h-10 w-10" }, {
|
|
21383
21383
|
default: re(() => [
|
|
@@ -21387,24 +21387,24 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21387
21387
|
}, null, 8, ["src"])) : z("", !0),
|
|
21388
21388
|
G(C(Jc), null, {
|
|
21389
21389
|
default: re(() => [
|
|
21390
|
-
Ie(
|
|
21390
|
+
Ie(W(d(g.personName ?? "")), 1)
|
|
21391
21391
|
]),
|
|
21392
21392
|
_: 2
|
|
21393
21393
|
}, 1024)
|
|
21394
21394
|
]),
|
|
21395
21395
|
_: 2
|
|
21396
21396
|
}, 1024),
|
|
21397
|
-
v("p", zA,
|
|
21397
|
+
v("p", zA, W(g.personName), 1)
|
|
21398
21398
|
])
|
|
21399
21399
|
], 64)) : g.type === "server" ? (p(), k(we, { key: 4 }, [
|
|
21400
21400
|
v("div", VA, [
|
|
21401
|
-
v("p", UA,
|
|
21401
|
+
v("p", UA, W(g.title), 1),
|
|
21402
21402
|
G(m, {
|
|
21403
21403
|
variant: "destructive",
|
|
21404
21404
|
class: "h-6"
|
|
21405
21405
|
}, {
|
|
21406
21406
|
default: re(() => [
|
|
21407
|
-
Ie(
|
|
21407
|
+
Ie(W(g.chipText ?? ""), 1)
|
|
21408
21408
|
]),
|
|
21409
21409
|
_: 2
|
|
21410
21410
|
}, 1024)
|
|
@@ -21415,21 +21415,21 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21415
21415
|
G(C(Df), { class: "h-4 w-4" }),
|
|
21416
21416
|
f[4] || (f[4] = v("span", null, "IP Address", -1))
|
|
21417
21417
|
]),
|
|
21418
|
-
v("span", HA,
|
|
21418
|
+
v("span", HA, W(g.ip), 1)
|
|
21419
21419
|
]),
|
|
21420
21420
|
v("div", GA, [
|
|
21421
21421
|
v("div", qA, [
|
|
21422
21422
|
G(C(Mf), { class: "h-4 w-4" }),
|
|
21423
21423
|
f[5] || (f[5] = v("span", null, "CPU", -1))
|
|
21424
21424
|
]),
|
|
21425
|
-
v("span", XA,
|
|
21425
|
+
v("span", XA, W(g.cpu), 1)
|
|
21426
21426
|
]),
|
|
21427
21427
|
v("div", KA, [
|
|
21428
21428
|
v("div", YA, [
|
|
21429
21429
|
G(C(Ef), { class: "h-4 w-4" }),
|
|
21430
21430
|
f[6] || (f[6] = v("span", null, "Memory", -1))
|
|
21431
21431
|
]),
|
|
21432
|
-
v("span", JA,
|
|
21432
|
+
v("span", JA, W(g.memory), 1)
|
|
21433
21433
|
])
|
|
21434
21434
|
]),
|
|
21435
21435
|
G(C(Ca), { class: "my-4" }),
|
|
@@ -21459,20 +21459,20 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21459
21459
|
v("div", eS, [
|
|
21460
21460
|
v("div", tS, [
|
|
21461
21461
|
G(x, { class: "h-4 w-4 text-muted-foreground" }),
|
|
21462
|
-
v("p", nS,
|
|
21462
|
+
v("p", nS, W(g.title), 1)
|
|
21463
21463
|
]),
|
|
21464
21464
|
G(m, {
|
|
21465
21465
|
variant: "destructive",
|
|
21466
21466
|
class: "h-6"
|
|
21467
21467
|
}, {
|
|
21468
21468
|
default: re(() => [
|
|
21469
|
-
Ie(
|
|
21469
|
+
Ie(W(g.chipText), 1)
|
|
21470
21470
|
]),
|
|
21471
21471
|
_: 2
|
|
21472
21472
|
}, 1024)
|
|
21473
21473
|
]),
|
|
21474
|
-
v("p", sS,
|
|
21475
|
-
g.desc2 ? (p(), k("p", oS,
|
|
21474
|
+
v("p", sS, W(g.desc1), 1),
|
|
21475
|
+
g.desc2 ? (p(), k("p", oS, W(g.desc2), 1)) : z("", !0),
|
|
21476
21476
|
G(C(Ca), { class: "my-4" }),
|
|
21477
21477
|
v("div", aS, [
|
|
21478
21478
|
v("div", iS, [
|
|
@@ -21504,7 +21504,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21504
21504
|
_: 1
|
|
21505
21505
|
})
|
|
21506
21506
|
]),
|
|
21507
|
-
v("p", rS, "Due date: " +
|
|
21507
|
+
v("p", rS, "Due date: " + W(g.due), 1)
|
|
21508
21508
|
])
|
|
21509
21509
|
], 64)) : z("", !0)
|
|
21510
21510
|
])
|
|
@@ -21549,7 +21549,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21549
21549
|
v("span", { class: "font-medium text-primary-600" }, "Click to upload"),
|
|
21550
21550
|
Ie(" or drag and drop ")
|
|
21551
21551
|
], -1)),
|
|
21552
|
-
e.accept ? (p(), k("p", uS,
|
|
21552
|
+
e.accept ? (p(), k("p", uS, W(e.accept), 1)) : z("", !0),
|
|
21553
21553
|
v("input", {
|
|
21554
21554
|
type: "file",
|
|
21555
21555
|
class: "hidden",
|
|
@@ -21557,7 +21557,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21557
21557
|
accept: e.accept
|
|
21558
21558
|
}, null, 40, fS)
|
|
21559
21559
|
]),
|
|
21560
|
-
e.errorMessage ? (p(), k("p", hS,
|
|
21560
|
+
e.errorMessage ? (p(), k("p", hS, W(e.errorMessage), 1)) : z("", !0)
|
|
21561
21561
|
]));
|
|
21562
21562
|
}
|
|
21563
21563
|
}), mS = ["onClick"], gS = {
|
|
@@ -21680,8 +21680,8 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21680
21680
|
const L = await g({ tabIndex: A, tab: P });
|
|
21681
21681
|
I.data = L, I.loaded = !0, s("loaded", { tabIndex: A, tab: P, data: L });
|
|
21682
21682
|
} catch (L) {
|
|
21683
|
-
const
|
|
21684
|
-
I.error =
|
|
21683
|
+
const $ = typeof (L == null ? void 0 : L.message) == "string" && L.message || typeof L == "string" && L || "Failed to load tab data.";
|
|
21684
|
+
I.error = $, s("error", { tabIndex: A, tab: P, message: $ });
|
|
21685
21685
|
} finally {
|
|
21686
21686
|
I.loading = !1;
|
|
21687
21687
|
}
|
|
@@ -21749,12 +21749,12 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21749
21749
|
key: 0,
|
|
21750
21750
|
class: "w-4 h-4"
|
|
21751
21751
|
})) : e.typeWizard === "number" || !A.icon && e.typeWizard !== "none" ? (p(), k("span", yS, [
|
|
21752
|
-
P < r.value ? (p(), k("span", vS, "✓")) : (p(), k("span", xS,
|
|
21752
|
+
P < r.value ? (p(), k("span", vS, "✓")) : (p(), k("span", xS, W(P + 1), 1))
|
|
21753
21753
|
])) : (p(), k("span", wS))
|
|
21754
21754
|
], 2),
|
|
21755
21755
|
v("span", {
|
|
21756
21756
|
class: ue(["text-xs font-semibold whitespace-normal px-2 py-1 rounded transition-colors text-left", P === r.value ? "wizard-text-active" : "wizard-text-pending"])
|
|
21757
|
-
},
|
|
21757
|
+
}, W(A.title), 3)
|
|
21758
21758
|
]))), 128)) : (p(!0), k(we, { key: 0 }, Ve(e.tabs, (A, P) => (p(), k("div", {
|
|
21759
21759
|
key: A.key,
|
|
21760
21760
|
onClick: (I) => D(P),
|
|
@@ -21770,8 +21770,8 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21770
21770
|
e.typeWizard === "icon" && A.icon ? (p(), pe(_t(u(A.icon)), {
|
|
21771
21771
|
key: 0,
|
|
21772
21772
|
class: "w-4 h-4 mr-2 shrink-0"
|
|
21773
|
-
})) : e.typeWizard === "number" ? (p(), k("span", gS,
|
|
21774
|
-
v("span", bS,
|
|
21773
|
+
})) : e.typeWizard === "number" ? (p(), k("span", gS, W(P + 1), 1)) : z("", !0),
|
|
21774
|
+
v("span", bS, W(A.title), 1)
|
|
21775
21775
|
], 2),
|
|
21776
21776
|
P < e.tabs.length - 1 ? (p(), k("svg", {
|
|
21777
21777
|
key: 0,
|
|
@@ -21804,8 +21804,8 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21804
21804
|
e.typeWizard === "icon" && A.icon ? (p(), pe(_t(u(A.icon)), {
|
|
21805
21805
|
key: 0,
|
|
21806
21806
|
class: "h-4 w-4 shrink-0"
|
|
21807
|
-
})) : e.typeWizard === "number" ? (p(), k("span", _S,
|
|
21808
|
-
v("span", CS,
|
|
21807
|
+
})) : e.typeWizard === "number" ? (p(), k("span", _S, W(P + 1), 1)) : z("", !0),
|
|
21808
|
+
v("span", CS, W(A.title), 1)
|
|
21809
21809
|
], 10, kS))), 128))
|
|
21810
21810
|
], 2))
|
|
21811
21811
|
], 2)
|
|
@@ -21846,7 +21846,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21846
21846
|
}, () => [
|
|
21847
21847
|
v("div", DS, [
|
|
21848
21848
|
b[2] || (b[2] = Ie(" Slot ", -1)),
|
|
21849
|
-
v("code", MS, "tab-" +
|
|
21849
|
+
v("code", MS, "tab-" + W(c.value.key), 1),
|
|
21850
21850
|
b[3] || (b[3] = Ie(" belum dibuat. ", -1))
|
|
21851
21851
|
])
|
|
21852
21852
|
], !0)
|
|
@@ -21882,7 +21882,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21882
21882
|
key: 0,
|
|
21883
21883
|
class: "w-4 h-4 mr-2 animate-spin"
|
|
21884
21884
|
})) : z("", !0),
|
|
21885
|
-
Ie(" " +
|
|
21885
|
+
Ie(" " + W(e.submitText), 1)
|
|
21886
21886
|
], 8, TS))
|
|
21887
21887
|
], 2)) : z("", !0)
|
|
21888
21888
|
])
|
|
@@ -21922,14 +21922,14 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21922
21922
|
setup(e, { expose: t, emit: n }) {
|
|
21923
21923
|
const { t: s } = cn(), o = e, a = n, i = O(() => o.menuList && o.menuList.length > 0 ? o.menuList : o.treeData || []), r = Y(/* @__PURE__ */ new Map()), l = Y(/* @__PURE__ */ new Set()), c = (P = !0) => {
|
|
21924
21924
|
((L) => {
|
|
21925
|
-
L.forEach((
|
|
21926
|
-
|
|
21927
|
-
const ne = `${
|
|
21925
|
+
L.forEach(($) => {
|
|
21926
|
+
$.permission.forEach((B) => {
|
|
21927
|
+
const ne = `${$.id}-${B.id}-parent`, X = B.code === "VIEW" || B.name.toUpperCase() === "VIEW";
|
|
21928
21928
|
r.value.has(ne) || r.value.set(
|
|
21929
21929
|
ne,
|
|
21930
|
-
X || (P ?
|
|
21930
|
+
X || (P ? $.checked ?? !1 : !1)
|
|
21931
21931
|
);
|
|
21932
|
-
}),
|
|
21932
|
+
}), $.detail && $.detail.length > 0 && $.detail.forEach((B) => {
|
|
21933
21933
|
B.permission.forEach((ne) => {
|
|
21934
21934
|
const X = `${B.id}-${ne.id}-child`, Z = ne.code === "VIEW" || ne.name.toUpperCase() === "VIEW";
|
|
21935
21935
|
r.value.has(X) || r.value.set(
|
|
@@ -21946,11 +21946,11 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21946
21946
|
o.modelValue
|
|
21947
21947
|
), r.value.clear(), c(!1), o.modelValue && o.modelValue.length > 0 && o.modelValue.forEach((P) => {
|
|
21948
21948
|
const I = P.menuId, L = P.actionsIds;
|
|
21949
|
-
i.value.forEach((
|
|
21950
|
-
|
|
21949
|
+
i.value.forEach(($) => {
|
|
21950
|
+
$.id === I && L.forEach((B) => {
|
|
21951
21951
|
const ne = `${I}-${B}-parent`;
|
|
21952
21952
|
r.value.set(ne, !0);
|
|
21953
|
-
}),
|
|
21953
|
+
}), $.detail && $.detail.length > 0 && $.detail.forEach((B) => {
|
|
21954
21954
|
B.id === I && L.forEach((ne) => {
|
|
21955
21955
|
const X = `${I}-${ne}-child`;
|
|
21956
21956
|
r.value.set(X, !0);
|
|
@@ -21974,16 +21974,16 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21974
21974
|
const u = (P) => P.detail && P.detail.length > 0, f = (P) => {
|
|
21975
21975
|
l.value.has(P) ? l.value.delete(P) : l.value.add(P);
|
|
21976
21976
|
}, h = (P) => l.value.has(P), m = (P, I, L = !1) => {
|
|
21977
|
-
const
|
|
21978
|
-
return r.value.get(
|
|
21977
|
+
const $ = `${P}-${I}-${L ? "child" : "parent"}`;
|
|
21978
|
+
return r.value.get($) ?? !1;
|
|
21979
21979
|
}, w = () => {
|
|
21980
21980
|
const P = _();
|
|
21981
21981
|
a("update:modelValue", P.permissions);
|
|
21982
|
-
}, x = (P, I, L,
|
|
21983
|
-
const B = L.target.checked, ne = `${P}-${I}-${
|
|
21984
|
-
r.value.set(ne, B), a("permission-change", P, I, B,
|
|
21982
|
+
}, x = (P, I, L, $ = !1) => {
|
|
21983
|
+
const B = L.target.checked, ne = `${P}-${I}-${$ ? "child" : "parent"}`;
|
|
21984
|
+
r.value.set(ne, B), a("permission-change", P, I, B, !$), w();
|
|
21985
21985
|
}, g = (P) => P.permission.filter(E), E = (P) => P.code === "VIEW" || P.name.toUpperCase() === "VIEW", D = (P, I, L) => {
|
|
21986
|
-
const
|
|
21986
|
+
const $ = L.target.checked;
|
|
21987
21987
|
I.permission.forEach((B) => {
|
|
21988
21988
|
if (E(B)) {
|
|
21989
21989
|
const X = `${I.id}-${B.id}-child`;
|
|
@@ -21991,12 +21991,12 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
21991
21991
|
return;
|
|
21992
21992
|
}
|
|
21993
21993
|
const ne = `${I.id}-${B.id}-child`;
|
|
21994
|
-
r.value.set(ne,
|
|
21995
|
-
}), r.value = new Map(r.value), a("menu-check", I.id,
|
|
21994
|
+
r.value.set(ne, $);
|
|
21995
|
+
}), r.value = new Map(r.value), a("menu-check", I.id, $), w();
|
|
21996
21996
|
}, S = (P, I = !1) => {
|
|
21997
21997
|
const L = I ? P.permission : g(P);
|
|
21998
|
-
return !L || L.length === 0 ? !1 : L.every((
|
|
21999
|
-
const B = `${P.id}-${
|
|
21998
|
+
return !L || L.length === 0 ? !1 : L.every(($) => {
|
|
21999
|
+
const B = `${P.id}-${$.id}-${I ? "child" : "parent"}`;
|
|
22000
22000
|
return r.value.get(B) ?? !1;
|
|
22001
22001
|
});
|
|
22002
22002
|
}, M = () => {
|
|
@@ -22005,27 +22005,27 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22005
22005
|
var L;
|
|
22006
22006
|
P[I.id] = {
|
|
22007
22007
|
name: I.name,
|
|
22008
|
-
parentPermissions: I.permission.map((
|
|
22009
|
-
id:
|
|
22010
|
-
name:
|
|
22011
|
-
checked: m(I.id,
|
|
22008
|
+
parentPermissions: I.permission.map(($) => ({
|
|
22009
|
+
id: $.id,
|
|
22010
|
+
name: $.name,
|
|
22011
|
+
checked: m(I.id, $.id, !1)
|
|
22012
22012
|
})),
|
|
22013
|
-
children: ((L = I.detail) == null ? void 0 : L.map((
|
|
22014
|
-
id:
|
|
22015
|
-
name:
|
|
22016
|
-
permissions:
|
|
22013
|
+
children: ((L = I.detail) == null ? void 0 : L.map(($) => ({
|
|
22014
|
+
id: $.id,
|
|
22015
|
+
name: $.name,
|
|
22016
|
+
permissions: $.permission.map((B) => ({
|
|
22017
22017
|
id: B.id,
|
|
22018
22018
|
name: B.name,
|
|
22019
|
-
checked: m(
|
|
22019
|
+
checked: m($.id, B.id, !0)
|
|
22020
22020
|
}))
|
|
22021
22021
|
}))) || []
|
|
22022
22022
|
};
|
|
22023
22023
|
}), P;
|
|
22024
22024
|
}, _ = () => {
|
|
22025
|
-
const P = [], I = (L,
|
|
22025
|
+
const P = [], I = (L, $ = !1) => {
|
|
22026
22026
|
const B = [];
|
|
22027
22027
|
L.permission.forEach((ne) => {
|
|
22028
|
-
const X = `${L.id}-${ne.id}-${
|
|
22028
|
+
const X = `${L.id}-${ne.id}-${$ ? "child" : "parent"}`;
|
|
22029
22029
|
(r.value.get(X) ?? !1) && B.push(ne.id);
|
|
22030
22030
|
}), B.length > 0 && P.push({
|
|
22031
22031
|
menuId: L.id,
|
|
@@ -22033,8 +22033,8 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22033
22033
|
});
|
|
22034
22034
|
};
|
|
22035
22035
|
return i.value.forEach((L) => {
|
|
22036
|
-
I(L, !1), L.detail && L.detail.length > 0 && L.detail.forEach((
|
|
22037
|
-
I(
|
|
22036
|
+
I(L, !1), L.detail && L.detail.length > 0 && L.detail.forEach(($) => {
|
|
22037
|
+
I($, !0);
|
|
22038
22038
|
});
|
|
22039
22039
|
}), { permissions: P };
|
|
22040
22040
|
};
|
|
@@ -22042,9 +22042,9 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22042
22042
|
getCurrentStates: M,
|
|
22043
22043
|
getPermissionsForDatabase: _,
|
|
22044
22044
|
getAllPermissionsWithStatus: () => {
|
|
22045
|
-
const P = [], I = (L,
|
|
22045
|
+
const P = [], I = (L, $ = !1) => {
|
|
22046
22046
|
const B = L.permission.map((X) => {
|
|
22047
|
-
const Z = `${L.id}-${X.id}-${
|
|
22047
|
+
const Z = `${L.id}-${X.id}-${$ ? "child" : "parent"}`, ae = r.value.get(Z) ?? !1;
|
|
22048
22048
|
return {
|
|
22049
22049
|
id: X.id,
|
|
22050
22050
|
name: X.name,
|
|
@@ -22059,8 +22059,8 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22059
22059
|
});
|
|
22060
22060
|
};
|
|
22061
22061
|
return i.value.forEach((L) => {
|
|
22062
|
-
I(L, !1), L.detail && L.detail.length > 0 && L.detail.forEach((
|
|
22063
|
-
I(
|
|
22062
|
+
I(L, !1), L.detail && L.detail.length > 0 && L.detail.forEach(($) => {
|
|
22063
|
+
I($, !0);
|
|
22064
22064
|
});
|
|
22065
22065
|
}), { permissions: P };
|
|
22066
22066
|
},
|
|
@@ -22083,7 +22083,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22083
22083
|
v("div", RS, [
|
|
22084
22084
|
u(L) ? (p(), k("button", {
|
|
22085
22085
|
key: 0,
|
|
22086
|
-
onClick: (
|
|
22086
|
+
onClick: ($) => f(L.id),
|
|
22087
22087
|
type: "button",
|
|
22088
22088
|
class: "p-1 hover:bg-white/20 rounded-lg transition-colors"
|
|
22089
22089
|
}, [
|
|
@@ -22100,28 +22100,28 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22100
22100
|
class: ue([L.icon, "text-2xl"])
|
|
22101
22101
|
}, null, 2)
|
|
22102
22102
|
])) : z("", !0),
|
|
22103
|
-
v("h3", VS,
|
|
22103
|
+
v("h3", VS, W(L.name), 1)
|
|
22104
22104
|
])
|
|
22105
22105
|
])
|
|
22106
22106
|
]),
|
|
22107
22107
|
L.permission && L.permission.length > 0 && !u(L) ? (p(), k("div", US, [
|
|
22108
|
-
v("h4", jS,
|
|
22108
|
+
v("h4", jS, W(C(s)("common.permissions")) + ": ", 1),
|
|
22109
22109
|
v("div", WS, [
|
|
22110
|
-
(p(!0), k(we, null, Ve(g(L), (
|
|
22111
|
-
key:
|
|
22110
|
+
(p(!0), k(we, null, Ve(g(L), ($) => (p(), k("label", {
|
|
22111
|
+
key: $.id,
|
|
22112
22112
|
class: "flex items-center gap-2 px-3 py-2 bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700/50 rounded-lg cursor-pointer hover:border-blue-400 dark:hover:border-primary-500 hover:bg-blue-50 dark:hover:bg-neutral-900/50 transition-all group"
|
|
22113
22113
|
}, [
|
|
22114
22114
|
v("input", {
|
|
22115
22115
|
type: "checkbox",
|
|
22116
|
-
checked: E(
|
|
22117
|
-
disabled: E(
|
|
22118
|
-
onChange: (B) => x(L.id,
|
|
22116
|
+
checked: E($) || m(L.id, $.id, !1),
|
|
22117
|
+
disabled: E($),
|
|
22118
|
+
onChange: (B) => x(L.id, $.id, B, !1),
|
|
22119
22119
|
class: ue([
|
|
22120
22120
|
"w-4 h-4 text-blue-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-blue-500 dark:focus:ring-blue-600",
|
|
22121
|
-
E(
|
|
22121
|
+
E($) ? "cursor-not-allowed opacity-75" : "cursor-pointer"
|
|
22122
22122
|
])
|
|
22123
22123
|
}, null, 42, NS),
|
|
22124
|
-
v("span", HS,
|
|
22124
|
+
v("span", HS, W($.name), 1)
|
|
22125
22125
|
]))), 128))
|
|
22126
22126
|
])
|
|
22127
22127
|
])) : z("", !0),
|
|
@@ -22137,51 +22137,51 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22137
22137
|
u(L) && h(L.id) ? (p(), k("div", GS, [
|
|
22138
22138
|
v("h4", qS, [
|
|
22139
22139
|
I[0] || (I[0] = v("span", { class: "w-1 h-4 bg-blue-500 rounded" }, null, -1)),
|
|
22140
|
-
Ie(" " +
|
|
22140
|
+
Ie(" " + W(C(s)("common.subMenus")), 1)
|
|
22141
22141
|
]),
|
|
22142
|
-
(p(!0), k(we, null, Ve(L.detail, (
|
|
22143
|
-
key:
|
|
22142
|
+
(p(!0), k(we, null, Ve(L.detail, ($) => (p(), k("div", {
|
|
22143
|
+
key: $.id,
|
|
22144
22144
|
class: "bg-white dark:bg-neutral-800 rounded-lg border border-gray-200 dark:border-neutral-700/50 overflow-hidden shadow-sm hover:shadow transition-shadow"
|
|
22145
22145
|
}, [
|
|
22146
22146
|
v("div", XS, [
|
|
22147
22147
|
v("div", KS, [
|
|
22148
22148
|
v("div", YS, [
|
|
22149
|
-
e.showIcons &&
|
|
22149
|
+
e.showIcons && $.icon ? (p(), k("span", JS, [
|
|
22150
22150
|
v("i", {
|
|
22151
|
-
class: ue([
|
|
22151
|
+
class: ue([$.icon, "text-xl"])
|
|
22152
22152
|
}, null, 2)
|
|
22153
22153
|
])) : z("", !0),
|
|
22154
|
-
v("h5", QS,
|
|
22155
|
-
|
|
22154
|
+
v("h5", QS, W($.name), 1),
|
|
22155
|
+
$.path ? (p(), k("span", ZS, W($.path), 1)) : z("", !0),
|
|
22156
22156
|
v("label", eD, [
|
|
22157
22157
|
v("input", {
|
|
22158
22158
|
type: "checkbox",
|
|
22159
|
-
checked: S(
|
|
22160
|
-
onChange: (B) => D(L,
|
|
22159
|
+
checked: S($, !0),
|
|
22160
|
+
onChange: (B) => D(L, $, B),
|
|
22161
22161
|
class: "w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600 cursor-pointer"
|
|
22162
22162
|
}, null, 40, tD),
|
|
22163
|
-
v("span", nD,
|
|
22163
|
+
v("span", nD, W(C(s)("common.selectAll")), 1)
|
|
22164
22164
|
])
|
|
22165
22165
|
])
|
|
22166
22166
|
])
|
|
22167
22167
|
]),
|
|
22168
|
-
|
|
22168
|
+
$.permission && $.permission.length > 0 ? (p(), k("div", sD, [
|
|
22169
22169
|
v("div", oD, [
|
|
22170
|
-
(p(!0), k(we, null, Ve(
|
|
22170
|
+
(p(!0), k(we, null, Ve($.permission, (B) => (p(), k("label", {
|
|
22171
22171
|
key: B.id,
|
|
22172
22172
|
class: "flex items-center gap-2 px-2.5 py-1.5 bg-gray-50 dark:bg-zinc-900/50 border border-gray-200 dark:border-neutral-700 rounded-md cursor-pointer hover:border-pink-400 dark:hover:border-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/20 transition-all group"
|
|
22173
22173
|
}, [
|
|
22174
22174
|
v("input", {
|
|
22175
22175
|
type: "checkbox",
|
|
22176
|
-
checked: E(B) || m(
|
|
22176
|
+
checked: E(B) || m($.id, B.id, !0),
|
|
22177
22177
|
disabled: E(B),
|
|
22178
|
-
onChange: (ne) => x(
|
|
22178
|
+
onChange: (ne) => x($.id, B.id, ne, !0),
|
|
22179
22179
|
class: ue([
|
|
22180
22180
|
"w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600",
|
|
22181
22181
|
E(B) ? "cursor-not-allowed opacity-75" : "cursor-pointer"
|
|
22182
22182
|
])
|
|
22183
22183
|
}, null, 42, aD),
|
|
22184
|
-
v("span", iD,
|
|
22184
|
+
v("span", iD, W(B.name), 1)
|
|
22185
22185
|
]))), 128))
|
|
22186
22186
|
])
|
|
22187
22187
|
])) : z("", !0)
|
|
@@ -22401,7 +22401,7 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22401
22401
|
{ deep: !0 }
|
|
22402
22402
|
), Ct(u), (g, E) => (p(), k("div", lD, [
|
|
22403
22403
|
e.label ? (p(), k("label", cD, [
|
|
22404
|
-
Ie(
|
|
22404
|
+
Ie(W(e.label) + " ", 1),
|
|
22405
22405
|
e.required ? (p(), k("span", dD, "*")) : z("", !0)
|
|
22406
22406
|
])) : z("", !0),
|
|
22407
22407
|
a.value ? (p(), k("div", uD, [
|
|
@@ -22409,9 +22409,9 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22409
22409
|
class: "animate-spin text-primary-600 mr-2",
|
|
22410
22410
|
size: 24
|
|
22411
22411
|
}),
|
|
22412
|
-
v("span", fD,
|
|
22412
|
+
v("span", fD, W(C(o)("common.loadingPermissions")), 1)
|
|
22413
22413
|
])) : i.value.length === 0 ? (p(), k("div", hD, [
|
|
22414
|
-
v("p", pD,
|
|
22414
|
+
v("p", pD, W(C(o)("common.noPermissions")), 1)
|
|
22415
22415
|
])) : (p(), k("div", mD, [
|
|
22416
22416
|
(p(!0), k(we, null, Ve(i.value, (D) => (p(), k("div", {
|
|
22417
22417
|
key: D.module,
|
|
@@ -22426,12 +22426,12 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22426
22426
|
disabled: e.disabled
|
|
22427
22427
|
}, null, 8, ["modelValue", "indeterminate", "onUpdate:modelValue", "disabled"]),
|
|
22428
22428
|
v("div", null, [
|
|
22429
|
-
v("div", yD,
|
|
22430
|
-
v("div", vD,
|
|
22429
|
+
v("div", yD, W(D.label || D.module), 1),
|
|
22430
|
+
v("div", vD, W(f(D)) + " " + W(C(o)("common.from")) + " " + W(D.permissions.length) + " " + W(C(o)("common.selected")), 1)
|
|
22431
22431
|
])
|
|
22432
22432
|
]),
|
|
22433
22433
|
v("div", xD, [
|
|
22434
|
-
v("div", wD,
|
|
22434
|
+
v("div", wD, W(f(D)) + "/" + W(D.permissions.length), 1)
|
|
22435
22435
|
])
|
|
22436
22436
|
]),
|
|
22437
22437
|
v("div", kD, [
|
|
@@ -22450,15 +22450,15 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22450
22450
|
v("label", {
|
|
22451
22451
|
for: `perm-${S.id}`,
|
|
22452
22452
|
class: "text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer block"
|
|
22453
|
-
},
|
|
22454
|
-
S.description ? (p(), k("p", SD,
|
|
22453
|
+
}, W(S.label || S.key), 9, AD),
|
|
22454
|
+
S.description ? (p(), k("p", SD, W(S.description), 1)) : z("", !0)
|
|
22455
22455
|
])
|
|
22456
22456
|
]))), 128))
|
|
22457
22457
|
])
|
|
22458
22458
|
])
|
|
22459
22459
|
]))), 128))
|
|
22460
22460
|
])),
|
|
22461
|
-
e.error ? (p(), k("p", DD,
|
|
22461
|
+
e.error ? (p(), k("p", DD, W(e.error), 1)) : z("", !0)
|
|
22462
22462
|
]));
|
|
22463
22463
|
}
|
|
22464
22464
|
}), MD = (e, t = "short", n = "id-ID") => {
|
|
@@ -22562,8 +22562,8 @@ const I2 = { class: "space-y-3" }, L2 = {
|
|
|
22562
22562
|
n.value ? (p(), k("div", OD, [
|
|
22563
22563
|
v("div", ID, [
|
|
22564
22564
|
v("div", null, [
|
|
22565
|
-
v("h3", LD,
|
|
22566
|
-
e.description ? (p(), k("p", BD,
|
|
22565
|
+
v("h3", LD, W(e.title), 1),
|
|
22566
|
+
e.description ? (p(), k("p", BD, W(e.description), 1)) : z("", !0)
|
|
22567
22567
|
]),
|
|
22568
22568
|
G(gt, {
|
|
22569
22569
|
variant: "ghost",
|
|
@@ -24296,7 +24296,7 @@ const ZM = "4.8.0", e5 = { g: "LottieFiles AE ", a: "", k: "", d: "", tc: "" },
|
|
|
24296
24296
|
"stroke-width": "2.5"
|
|
24297
24297
|
}, null, 8, ["class"])) : z("", !0),
|
|
24298
24298
|
Be(u.$slots, "default", {}, () => [
|
|
24299
|
-
v("span", null,
|
|
24299
|
+
v("span", null, W(e.text), 1)
|
|
24300
24300
|
], !0)
|
|
24301
24301
|
], 2))
|
|
24302
24302
|
])) : z("", !0);
|
|
@@ -24653,33 +24653,33 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24653
24653
|
const d = Y(""), u = Y(1), f = Y(s.perPage), h = Y({
|
|
24654
24654
|
key: "",
|
|
24655
24655
|
direction: "asc"
|
|
24656
|
-
}), m = Y([]), w = Y(!1), x = Y(0), g = Y({}), E = Y([]), D = Y(null), S = Y(!0), M = Y([]), _ = Y([]), y = Y([]), b = Y(!1), A = Y(!1), P = Y({}), I = Y(null), L = Y(null),
|
|
24656
|
+
}), m = Y([]), w = Y(!1), x = Y(0), g = Y({}), E = Y([]), D = Y(null), S = Y(!0), M = Y([]), _ = Y([]), y = Y([]), b = Y(!1), A = Y(!1), P = Y({}), I = Y(null), L = Y(null), $ = Y(null), B = Y([]), ne = O(() => {
|
|
24657
24657
|
if (ee.value.length === 0) return !1;
|
|
24658
24658
|
const T = ee.value.map((N) => {
|
|
24659
|
-
const ce = oe.value.find((K) => K.type === "CHECKBOX"),
|
|
24660
|
-
return N[
|
|
24659
|
+
const ce = oe.value.find((K) => K.type === "CHECKBOX"), j = (ce == null ? void 0 : ce.keyCheckbox) || "id";
|
|
24660
|
+
return N[j];
|
|
24661
24661
|
}).filter((N) => N != null);
|
|
24662
24662
|
return T.length === 0 ? !1 : T.every((N) => B.value.includes(N));
|
|
24663
24663
|
}), X = O(() => {
|
|
24664
24664
|
if (ee.value.length === 0) return !1;
|
|
24665
|
-
const T = oe.value.find((K) => K.type === "CHECKBOX"), N = (T == null ? void 0 : T.keyCheckbox) || "id", ce = ee.value.map((K) => K[N]).filter((K) => K != null),
|
|
24665
|
+
const T = oe.value.find((K) => K.type === "CHECKBOX"), N = (T == null ? void 0 : T.keyCheckbox) || "id", ce = ee.value.map((K) => K[N]).filter((K) => K != null), j = ce.filter(
|
|
24666
24666
|
(K) => B.value.includes(K)
|
|
24667
24667
|
).length;
|
|
24668
|
-
return
|
|
24668
|
+
return j > 0 && j < ce.length;
|
|
24669
24669
|
}), Z = (T) => {
|
|
24670
|
-
const N = oe.value.find((K) => K.type === "CHECKBOX"), ce = (N == null ? void 0 : N.keyCheckbox) || "id",
|
|
24671
|
-
return
|
|
24670
|
+
const N = oe.value.find((K) => K.type === "CHECKBOX"), ce = (N == null ? void 0 : N.keyCheckbox) || "id", j = T[ce];
|
|
24671
|
+
return j !== void 0 && B.value.includes(j);
|
|
24672
24672
|
}, ae = (T) => {
|
|
24673
|
-
const N = oe.value.find((K) => K.type === "CHECKBOX"), ce = (N == null ? void 0 : N.keyCheckbox) || "id",
|
|
24673
|
+
const N = oe.value.find((K) => K.type === "CHECKBOX"), ce = (N == null ? void 0 : N.keyCheckbox) || "id", j = ee.value.map((K) => K[ce]).filter((K) => K != null);
|
|
24674
24674
|
if (T) {
|
|
24675
|
-
const K = /* @__PURE__ */ new Set([...B.value, ...
|
|
24675
|
+
const K = /* @__PURE__ */ new Set([...B.value, ...j]);
|
|
24676
24676
|
B.value = Array.from(K);
|
|
24677
24677
|
} else
|
|
24678
24678
|
B.value = B.value.filter(
|
|
24679
|
-
(K) => !
|
|
24679
|
+
(K) => !j.includes(K)
|
|
24680
24680
|
);
|
|
24681
24681
|
}, de = (T, N) => {
|
|
24682
|
-
const ce = oe.value.find((he) => he.type === "CHECKBOX"),
|
|
24682
|
+
const ce = oe.value.find((he) => he.type === "CHECKBOX"), j = (ce == null ? void 0 : ce.keyCheckbox) || "id", K = T[j];
|
|
24683
24683
|
K != null && (N ? B.value.includes(K) || B.value.push(K) : B.value = B.value.filter(
|
|
24684
24684
|
(he) => he !== K
|
|
24685
24685
|
));
|
|
@@ -24690,11 +24690,11 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24690
24690
|
var ce;
|
|
24691
24691
|
o("update:selection", T);
|
|
24692
24692
|
const N = ne.value || T.length > 1;
|
|
24693
|
-
(ce = _.value) != null && ce.length && _.value.forEach((
|
|
24693
|
+
(ce = _.value) != null && ce.length && _.value.forEach((j) => {
|
|
24694
24694
|
var K;
|
|
24695
|
-
(K =
|
|
24695
|
+
(K = j.fieldActionGlobal) != null && K.length && j.fieldActionGlobal.forEach((he) => {
|
|
24696
24696
|
var We, it;
|
|
24697
|
-
const Me =
|
|
24697
|
+
const Me = j.endpoint || ((We = j.propsActionGlobal) == null ? void 0 : We.endpointPropAction) || j.propsActionGlobal, Ue = (it = Me == null ? void 0 : Me.keyParam) == null ? void 0 : it[0];
|
|
24698
24698
|
(Ue && he.model === Ue || !Ue && /^(id|ids|idAuditTrail)/i.test(he.model)) && N && he.model && (P.value[he.model] = T);
|
|
24699
24699
|
});
|
|
24700
24700
|
});
|
|
@@ -24702,29 +24702,29 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24702
24702
|
{ deep: !0 }
|
|
24703
24703
|
);
|
|
24704
24704
|
const R = (T) => Array.from({ length: T }).map((N, ce) => {
|
|
24705
|
-
const
|
|
24705
|
+
const j = { id: ce + 1, no: ce + 1 };
|
|
24706
24706
|
return oe.value.forEach((K) => {
|
|
24707
|
-
K.key !== "no" && K.key !== "action" && K.type !== "ACTION" && K.type !== "action" && (K.type === "CHECKBOX" ?
|
|
24708
|
-
}),
|
|
24707
|
+
K.key !== "no" && K.key !== "action" && K.type !== "ACTION" && K.type !== "action" && (K.type === "CHECKBOX" ? j[K.keyCheckbox || "id"] = ce + 1 : K.type === "BADGE" || K.type === "badge" || K.condition ? j[K.key] = K.condition && K.condition.length > 0 ? K.condition[0].value : "Active" : j[K.key] = `Data ${K.label} ${ce + 1}`);
|
|
24708
|
+
}), j;
|
|
24709
24709
|
}), q = (T) => T && typeof T == "string" && T.trim() ? T : void 0, le = O(
|
|
24710
24710
|
() => {
|
|
24711
|
-
var T, N, ce,
|
|
24712
|
-
return q((N = (T = D.value) == null ? void 0 : T.endpoint) == null ? void 0 : N.apiModule) || q((
|
|
24711
|
+
var T, N, ce, j;
|
|
24712
|
+
return q((N = (T = D.value) == null ? void 0 : T.endpoint) == null ? void 0 : N.apiModule) || q((j = (ce = D.value) == null ? void 0 : ce.endpointGlobal) == null ? void 0 : j.apiModule) || s.apiModule;
|
|
24713
24713
|
}
|
|
24714
24714
|
), ie = O(
|
|
24715
24715
|
() => {
|
|
24716
|
-
var T, N, ce,
|
|
24717
|
-
return q((N = (T = D.value) == null ? void 0 : T.endpoint) == null ? void 0 : N.apiAction) || q((
|
|
24716
|
+
var T, N, ce, j;
|
|
24717
|
+
return q((N = (T = D.value) == null ? void 0 : T.endpoint) == null ? void 0 : N.apiAction) || q((j = (ce = D.value) == null ? void 0 : ce.endpointGlobal) == null ? void 0 : j.apiAction) || s.apiAction;
|
|
24718
24718
|
}
|
|
24719
24719
|
), Q = O(
|
|
24720
24720
|
() => {
|
|
24721
|
-
var T, N, ce,
|
|
24722
|
-
return q((N = (T = D.value) == null ? void 0 : T.endpoint) == null ? void 0 : N.apiMethod) || q((
|
|
24721
|
+
var T, N, ce, j;
|
|
24722
|
+
return q((N = (T = D.value) == null ? void 0 : T.endpoint) == null ? void 0 : N.apiMethod) || q((j = (ce = D.value) == null ? void 0 : ce.endpointGlobal) == null ? void 0 : j.apiMethod) || s.apiMethod || "POST";
|
|
24723
24723
|
}
|
|
24724
24724
|
), ye = O(
|
|
24725
24725
|
() => {
|
|
24726
|
-
var T, N, ce,
|
|
24727
|
-
return q((N = (T = D.value) == null ? void 0 : T.endpoint) == null ? void 0 : N.apiUrl) || q((
|
|
24726
|
+
var T, N, ce, j;
|
|
24727
|
+
return q((N = (T = D.value) == null ? void 0 : T.endpoint) == null ? void 0 : N.apiUrl) || q((j = (ce = D.value) == null ? void 0 : ce.endpointGlobal) == null ? void 0 : j.apiUrl) || s.apiUrl;
|
|
24728
24728
|
}
|
|
24729
24729
|
), ke = O(() => s.permissionBase || ""), Le = O(() => !y.value || y.value.length === 0 ? [] : [...y.value].sort((T, N) => (T.seq || 0) - (N.seq || 0))), Ne = (T) => {
|
|
24730
24730
|
var he, Me, Ue;
|
|
@@ -24741,10 +24741,10 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24741
24741
|
}, De = () => {
|
|
24742
24742
|
let T = null;
|
|
24743
24743
|
if (s.tableConfig && (T = s.tableConfig), T) {
|
|
24744
|
-
D.value = T, T.headers && (E.value = T.headers.map((
|
|
24744
|
+
D.value = T, T.headers && (E.value = T.headers.map((j) => {
|
|
24745
24745
|
var Me, Ue, je, We, it, qe, nt, Kt, xn, Xo;
|
|
24746
|
-
if (
|
|
24747
|
-
const Yt = ((je =
|
|
24746
|
+
if (j.key === "action" || ((Me = j.custom) == null ? void 0 : Me.type) === "ACTION" || ((Ue = j.custom) == null ? void 0 : Ue.type) === "action") {
|
|
24747
|
+
const Yt = ((je = j.custom) == null ? void 0 : je.actionCustom) || ((We = j.custom) == null ? void 0 : We.action);
|
|
24748
24748
|
return Yt && (M.value = Yt.map((sn) => {
|
|
24749
24749
|
const At = sn.propsActionCustom || sn.props || {}, Ko = sn.propCustomMessage || {};
|
|
24750
24750
|
return {
|
|
@@ -24782,8 +24782,8 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24782
24782
|
})), null;
|
|
24783
24783
|
}
|
|
24784
24784
|
let K;
|
|
24785
|
-
const he = ((it =
|
|
24786
|
-
return (((nt =
|
|
24785
|
+
const he = ((it = j.custom) == null ? void 0 : it.conditionBadge) || ((qe = j.custom) == null ? void 0 : qe.condition);
|
|
24786
|
+
return (((nt = j.custom) == null ? void 0 : nt.type) === "BADGE" || ((Kt = j.custom) == null ? void 0 : Kt.type) === "badge") && he && (K = he.map((Yt) => ({
|
|
24787
24787
|
value: Yt.value,
|
|
24788
24788
|
label: r.value === "id" ? Yt.labelID : Yt.labelEN,
|
|
24789
24789
|
labelID: Yt.labelID,
|
|
@@ -24792,29 +24792,29 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24792
24792
|
variant: Yt.variant,
|
|
24793
24793
|
logic: Yt.logic || Yt.conditionRule || null
|
|
24794
24794
|
}))), {
|
|
24795
|
-
key:
|
|
24796
|
-
label: r.value === "id" ?
|
|
24797
|
-
width:
|
|
24798
|
-
align:
|
|
24795
|
+
key: j.key,
|
|
24796
|
+
label: r.value === "id" ? j.labelID : j.labelEN,
|
|
24797
|
+
width: j.width,
|
|
24798
|
+
align: j.align,
|
|
24799
24799
|
sortable: !0,
|
|
24800
|
-
type: (xn =
|
|
24800
|
+
type: (xn = j.custom) == null ? void 0 : xn.type,
|
|
24801
24801
|
condition: K,
|
|
24802
|
-
keyCheckbox: (Xo =
|
|
24802
|
+
keyCheckbox: (Xo = j.custom) == null ? void 0 : Xo.keyCheckbox
|
|
24803
24803
|
};
|
|
24804
|
-
}).filter((
|
|
24804
|
+
}).filter((j) => j !== null));
|
|
24805
24805
|
const N = T.filters || T.filter;
|
|
24806
|
-
N && Array.isArray(N) && (y.value = N.map((
|
|
24807
|
-
...
|
|
24808
|
-
props:
|
|
24809
|
-
})), y.value.forEach((
|
|
24810
|
-
g.value[
|
|
24806
|
+
N && Array.isArray(N) && (y.value = N.map((j) => ({
|
|
24807
|
+
...j,
|
|
24808
|
+
props: j.propsFilters || j.props || {}
|
|
24809
|
+
})), y.value.forEach((j) => {
|
|
24810
|
+
g.value[j.model] = "";
|
|
24811
24811
|
}));
|
|
24812
24812
|
const ce = T.actionTableGlobal || T.actionGlobal || T.action;
|
|
24813
|
-
console.log("[DEBUG] loadConfig rawActions:", ce), ce && Array.isArray(ce) ? (_.value = ce.map((
|
|
24814
|
-
const K =
|
|
24813
|
+
console.log("[DEBUG] loadConfig rawActions:", ce), ce && Array.isArray(ce) ? (_.value = ce.map((j) => {
|
|
24814
|
+
const K = j.propsActionGlobal || j.props || {};
|
|
24815
24815
|
return {
|
|
24816
24816
|
key: K.key,
|
|
24817
|
-
permission:
|
|
24817
|
+
permission: j.permission,
|
|
24818
24818
|
label: r.value === "id" ? K.labelID || "Action" : K.labelEN || "Action",
|
|
24819
24819
|
tooltip: r.value === "id" ? K.tooltipID || K.labelID : K.tooltipEN || K.labelEN,
|
|
24820
24820
|
icon: K.icon,
|
|
@@ -24823,11 +24823,11 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24823
24823
|
textColor: K.textColor,
|
|
24824
24824
|
route: K.route,
|
|
24825
24825
|
path: K.path,
|
|
24826
|
-
endpoint: K.endpointPropAction ||
|
|
24827
|
-
fieldMapping:
|
|
24828
|
-
visibleRule:
|
|
24829
|
-
openDialog:
|
|
24830
|
-
fieldActionGlobal: (
|
|
24826
|
+
endpoint: K.endpointPropAction || j.endpoint,
|
|
24827
|
+
fieldMapping: j.fieldMapping || K.fieldMapping || null,
|
|
24828
|
+
visibleRule: j.visibleRule || K.visibleRule || j.propCustomCondition || K.propCustomCondition || null,
|
|
24829
|
+
openDialog: j.openDialog || !1,
|
|
24830
|
+
fieldActionGlobal: (j.fieldActionGlobal || j.field || []).map(
|
|
24831
24831
|
(he) => {
|
|
24832
24832
|
const Me = he.propsFieldGlobal || he.props || {};
|
|
24833
24833
|
return {
|
|
@@ -24854,10 +24854,10 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24854
24854
|
() => !!le.value || !!ye.value
|
|
24855
24855
|
), $e = O(() => []), Qe = (T) => {
|
|
24856
24856
|
if (console.log("[DEBUG] hasAction called:", { actionCode: T, permissionChecker: !!s.permissionChecker, effectivePath: ke.value }), s.menuPermissions && s.menuPermissions.length > 0) {
|
|
24857
|
-
const N = l.path, ce = s.menuPermissions.find((
|
|
24857
|
+
const N = l.path, ce = s.menuPermissions.find((j) => N.startsWith(j.path));
|
|
24858
24858
|
if (ce && ce.actions) {
|
|
24859
|
-
const
|
|
24860
|
-
return
|
|
24859
|
+
const j = ce.actions.find((K) => K.code === T.toUpperCase());
|
|
24860
|
+
return j ? j.checked : !1;
|
|
24861
24861
|
}
|
|
24862
24862
|
return !1;
|
|
24863
24863
|
}
|
|
@@ -24874,8 +24874,8 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24874
24874
|
return console.warn("Row action jsonLogic error:", Me), !1;
|
|
24875
24875
|
}
|
|
24876
24876
|
if (!T.visibilityCondition) return !0;
|
|
24877
|
-
const { field: ce, operator:
|
|
24878
|
-
switch (
|
|
24877
|
+
const { field: ce, operator: j, value: K } = T.visibilityCondition, he = He(N, ce);
|
|
24878
|
+
switch (j) {
|
|
24879
24879
|
case "equals":
|
|
24880
24880
|
return he === K;
|
|
24881
24881
|
case "notEquals":
|
|
@@ -24899,21 +24899,21 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24899
24899
|
const T = _.value.filter((N) => {
|
|
24900
24900
|
if (N.visibleRule)
|
|
24901
24901
|
try {
|
|
24902
|
-
const
|
|
24903
|
-
if (!Cn.apply(N.visibleRule,
|
|
24904
|
-
} catch (
|
|
24905
|
-
console.warn("Header action visibility logic error:",
|
|
24902
|
+
const j = ee.value[0] || {};
|
|
24903
|
+
if (!Cn.apply(N.visibleRule, j)) return !1;
|
|
24904
|
+
} catch (j) {
|
|
24905
|
+
console.warn("Header action visibility logic error:", j);
|
|
24906
24906
|
}
|
|
24907
24907
|
if (s.ignorePermissions) return !0;
|
|
24908
24908
|
if (!N.permission)
|
|
24909
24909
|
return console.log("[DEBUG] Action no permission, showing:", N.label), !0;
|
|
24910
24910
|
if (s.checkPermission) {
|
|
24911
|
-
const
|
|
24912
|
-
return console.log("[DEBUG] Parent checkPermission result:",
|
|
24911
|
+
const j = s.checkPermission(N.permission);
|
|
24912
|
+
return console.log("[DEBUG] Parent checkPermission result:", j), j;
|
|
24913
24913
|
}
|
|
24914
24914
|
if (s.permissions) {
|
|
24915
|
-
const
|
|
24916
|
-
return console.log("[DEBUG] Parent permissions check result:",
|
|
24915
|
+
const j = s.permissions.includes(N.permission);
|
|
24916
|
+
return console.log("[DEBUG] Parent permissions check result:", j), j;
|
|
24917
24917
|
}
|
|
24918
24918
|
const ce = Qe(N.permission);
|
|
24919
24919
|
return console.log("[DEBUG] Internal permission check:", { label: N.label, permission: N.permission, hasPerm: ce }), ce;
|
|
@@ -24931,10 +24931,10 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24931
24931
|
}
|
|
24932
24932
|
if (!T.dynamicColor || !T.colorCondition)
|
|
24933
24933
|
return T.bgColor || "primary";
|
|
24934
|
-
const ce = He(N, T.colorCondition.field),
|
|
24934
|
+
const ce = He(N, T.colorCondition.field), j = (he = T.colorCondition.conditions) == null ? void 0 : he.find(
|
|
24935
24935
|
(Me) => Me.value === ce
|
|
24936
24936
|
);
|
|
24937
|
-
return (
|
|
24937
|
+
return (j == null ? void 0 : j.bgColor) || T.bgColor || "primary";
|
|
24938
24938
|
}, Et = (T) => {
|
|
24939
24939
|
const N = (T || "left").toLowerCase();
|
|
24940
24940
|
return N === "center" ? "justify-center" : N === "right" ? "justify-end" : "justify-start";
|
|
@@ -24957,26 +24957,26 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
24957
24957
|
return T > _e.value ? _e.value : T;
|
|
24958
24958
|
}), He = (T, N) => {
|
|
24959
24959
|
if (!(!T || !N))
|
|
24960
|
-
return N in T ? T[N] : N.split(".").reduce((ce,
|
|
24960
|
+
return N in T ? T[N] : N.split(".").reduce((ce, j) => ce && ce[j], T);
|
|
24961
24961
|
}, fe = O(() => {
|
|
24962
24962
|
if (me.value) return [];
|
|
24963
24963
|
if (!d.value) return s.data;
|
|
24964
24964
|
const T = d.value.toLowerCase();
|
|
24965
24965
|
return s.data.filter((N) => oe.value.some((ce) => {
|
|
24966
|
-
const
|
|
24967
|
-
return
|
|
24966
|
+
const j = He(N, ce.key);
|
|
24967
|
+
return j == null ? !1 : String(j).toLowerCase().includes(T);
|
|
24968
24968
|
}));
|
|
24969
24969
|
}), ve = O(() => me.value ? [] : h.value.key ? [...fe.value].sort((N, ce) => {
|
|
24970
|
-
const
|
|
24971
|
-
if (
|
|
24970
|
+
const j = He(N, h.value.key), K = He(ce, h.value.key);
|
|
24971
|
+
if (j === K) return 0;
|
|
24972
24972
|
let he = 0;
|
|
24973
|
-
return typeof
|
|
24973
|
+
return typeof j == "number" && typeof K == "number" ? he = j - K : he = String(j).localeCompare(String(K)), h.value.direction === "asc" ? he : -he;
|
|
24974
24974
|
}) : fe.value), Se = O(() => {
|
|
24975
24975
|
if (me.value) return [];
|
|
24976
24976
|
const T = (u.value - 1) * f.value, N = T + f.value;
|
|
24977
|
-
return ve.value.slice(T, N).map((ce,
|
|
24977
|
+
return ve.value.slice(T, N).map((ce, j) => ({
|
|
24978
24978
|
...ce,
|
|
24979
|
-
no: T +
|
|
24979
|
+
no: T + j + 1
|
|
24980
24980
|
}));
|
|
24981
24981
|
}), ze = O(() => me.value ? Object.values(g.value).some((T) => !!T) : !!d.value), mt = [10, 25, 50, 100], Ht = () => {
|
|
24982
24982
|
me.value && (g.value = { ...g.value, keyword: d.value }, u.value = 1, Lt());
|
|
@@ -25019,8 +25019,8 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25019
25019
|
else if (ye.value) {
|
|
25020
25020
|
let ce = ye.value;
|
|
25021
25021
|
if (s.baseUrl && typeof ce == "string" && !ce.startsWith("http")) {
|
|
25022
|
-
const
|
|
25023
|
-
ce = `${
|
|
25022
|
+
const j = s.baseUrl.replace(/\/$/, ""), K = ce.startsWith("/") ? ce : `/${ce}`;
|
|
25023
|
+
ce = `${j}${K}`;
|
|
25024
25024
|
}
|
|
25025
25025
|
N = await i(
|
|
25026
25026
|
ce,
|
|
@@ -25055,7 +25055,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25055
25055
|
u.value = 1, Lt();
|
|
25056
25056
|
}, fs = (T, N) => {
|
|
25057
25057
|
const ce = He(T, N.key);
|
|
25058
|
-
let
|
|
25058
|
+
let j = {
|
|
25059
25059
|
variant: "secondary",
|
|
25060
25060
|
class: "",
|
|
25061
25061
|
label: ce
|
|
@@ -25080,10 +25080,10 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25080
25080
|
return !1;
|
|
25081
25081
|
});
|
|
25082
25082
|
if (K) {
|
|
25083
|
-
K.variant && (
|
|
25083
|
+
K.variant && (j.variant = K.variant);
|
|
25084
25084
|
const Me = (r.value || "en") === "id" ? K.labelID : K.labelEN;
|
|
25085
|
-
if (
|
|
25086
|
-
const Ue = (K.color || K.bgColor || "").toLowerCase(), je =
|
|
25085
|
+
if (j.label = Me || K.label || (typeof ce == "object" ? ce.name || ce.code : ce), K.color || K.bgColor) {
|
|
25086
|
+
const Ue = (K.color || K.bgColor || "").toLowerCase(), je = j.variant === "outline", We = {
|
|
25087
25087
|
success: "bg-green-500 hover:bg-green-600 border-transparent text-white shadow",
|
|
25088
25088
|
warning: "bg-yellow-500 hover:bg-yellow-600 border-transparent text-white shadow",
|
|
25089
25089
|
info: "bg-blue-500 hover:bg-blue-600 border-transparent text-white shadow",
|
|
@@ -25108,16 +25108,16 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25108
25108
|
warning: "warning",
|
|
25109
25109
|
info: "info"
|
|
25110
25110
|
};
|
|
25111
|
-
je ? it[Ue] && (
|
|
25111
|
+
je ? it[Ue] && (j.class = it[Ue]) : qe[Ue] ? j.variant = qe[Ue] : We[Ue] && (j.class = We[Ue]);
|
|
25112
25112
|
}
|
|
25113
25113
|
} else
|
|
25114
|
-
|
|
25114
|
+
j.label = typeof ce == "object" ? (ce == null ? void 0 : ce.name) || (ce == null ? void 0 : ce.code) || "-" : ce;
|
|
25115
25115
|
} else
|
|
25116
|
-
|
|
25117
|
-
return
|
|
25116
|
+
j.label = typeof ce == "object" ? (ce == null ? void 0 : ce.name) || (ce == null ? void 0 : ce.code) || "-" : ce;
|
|
25117
|
+
return j;
|
|
25118
25118
|
}, io = (T) => {
|
|
25119
25119
|
h.value.key === T ? h.value.direction = h.value.direction === "asc" ? "desc" : "asc" : (h.value.key = T, h.value.direction = "asc"), o("update:sort", h.value);
|
|
25120
|
-
},
|
|
25120
|
+
}, F = (T) => {
|
|
25121
25121
|
T !== u.value && (u.value = T, me.value && Lt(), o("update:page", T));
|
|
25122
25122
|
}, J = (T) => {
|
|
25123
25123
|
f.value = T, u.value = 1, me.value && Lt();
|
|
@@ -25128,7 +25128,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25128
25128
|
return ce < 100 ? `${Math.floor(ce * (Math.random() * 0.2 + 0.7))}px` : `${N}%`;
|
|
25129
25129
|
}
|
|
25130
25130
|
return `${N}%`;
|
|
25131
|
-
},
|
|
25131
|
+
}, U = () => {
|
|
25132
25132
|
d.value = "", g.value = {}, u.value = 1, Lt();
|
|
25133
25133
|
}, te = (T) => {
|
|
25134
25134
|
var N;
|
|
@@ -25139,12 +25139,12 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25139
25139
|
}
|
|
25140
25140
|
c == null || c.push(T.route);
|
|
25141
25141
|
} else if (T.openDialog || s.dummyMode && T.route) {
|
|
25142
|
-
L.value = T,
|
|
25142
|
+
L.value = T, $.value = null, P.value = {};
|
|
25143
25143
|
const ce = T.fieldActionGlobal || T.field || [];
|
|
25144
|
-
ce.length && ce.forEach((
|
|
25144
|
+
ce.length && ce.forEach((j) => {
|
|
25145
25145
|
var Me;
|
|
25146
25146
|
const K = T.endpoint || ((Me = T.propsActionGlobal) == null ? void 0 : Me.endpointPropAction) || T.propsActionGlobal, he = K != null && K.keyParam && K.keyParam.length > 0 ? K.keyParam[0] : null;
|
|
25147
|
-
he &&
|
|
25147
|
+
he && j.model === he || !he && /^(id|ids|idAuditTrail)/i.test(j.model) ? P.value[j.model] = B.value : P.value[j.model] || (P.value[j.model] = "");
|
|
25148
25148
|
}), A.value = !0;
|
|
25149
25149
|
} else
|
|
25150
25150
|
o("action", {
|
|
@@ -25153,18 +25153,18 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25153
25153
|
selection: B.value
|
|
25154
25154
|
});
|
|
25155
25155
|
}, be = async (T, N) => {
|
|
25156
|
-
var ce,
|
|
25156
|
+
var ce, j, K, he;
|
|
25157
25157
|
if (T.requireConfirm) {
|
|
25158
25158
|
I.value = { button: T, row: N }, b.value = !0;
|
|
25159
25159
|
return;
|
|
25160
25160
|
}
|
|
25161
25161
|
if (T.openDialog) {
|
|
25162
|
-
L.value = T,
|
|
25162
|
+
L.value = T, $.value = N, P.value = {};
|
|
25163
25163
|
const Me = oe.value.find((We) => We.type === "CHECKBOX"), Ue = (Me == null ? void 0 : Me.keyCheckbox) || "id";
|
|
25164
25164
|
T.fieldActionCustom && T.fieldActionCustom.forEach((We) => {
|
|
25165
25165
|
/^(id|ids|idAuditTrail)/i.test(We.model) ? P.value[We.model] = [N[Ue]] : T.action === "showToken" && We.model === "token" ? P.value[We.model] = N.token !== void 0 ? N.token : "" : N[We.model] !== void 0 ? P.value[We.model] = N[We.model] : P.value[We.model] = "";
|
|
25166
25166
|
});
|
|
25167
|
-
const je = T.endpoint || ((ce = T.propsActionGlobal) == null ? void 0 : ce.endpointPropAction) || ((
|
|
25167
|
+
const je = T.endpoint || ((ce = T.propsActionGlobal) == null ? void 0 : ce.endpointPropAction) || ((j = T.propsActionCustom) == null ? void 0 : j.endpointPropAction) || ((K = T.props) == null ? void 0 : K.endpointPropAction);
|
|
25168
25168
|
if (((he = je == null ? void 0 : je.apiMethod) == null ? void 0 : he.toUpperCase()) === "GET" && je.apiUrl) {
|
|
25169
25169
|
w.value = !0;
|
|
25170
25170
|
const { apiUrl: We } = Mt(), it = {};
|
|
@@ -25211,11 +25211,11 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25211
25211
|
/:([a-zA-Z0-9_]+)/g,
|
|
25212
25212
|
(K, he) => N[he] || N.id || he
|
|
25213
25213
|
) : N.id && (ce = `${ce.replace(/\/$/, "")}/${N.id}`);
|
|
25214
|
-
const
|
|
25215
|
-
T.path && (
|
|
25214
|
+
const j = {};
|
|
25215
|
+
T.path && (j.code = T.path), c == null || c.push({ path: ce, query: j });
|
|
25216
25216
|
} else if (T.endpoint && T.endpoint.apiUrl) {
|
|
25217
25217
|
w.value = !0;
|
|
25218
|
-
const { apiUrl: ce } = Mt(),
|
|
25218
|
+
const { apiUrl: ce } = Mt(), j = T.endpoint.apiUrl, K = T.endpoint.apiMethod || "POST", he = {}, Me = T.fieldMapping;
|
|
25219
25219
|
if (Me && typeof Me == "object") {
|
|
25220
25220
|
const { locale: Ue } = cn(), je = Ue.value || "en", We = [];
|
|
25221
25221
|
if (Object.entries(Me).forEach(([it, qe]) => {
|
|
@@ -25238,7 +25238,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25238
25238
|
We !== void 0 && (he[Ue.model] = We);
|
|
25239
25239
|
}) : N.id && (he.id = N.id);
|
|
25240
25240
|
}
|
|
25241
|
-
ce(
|
|
25241
|
+
ce(j, K, he).then(() => {
|
|
25242
25242
|
Lt(), o("action", { action: T.action || "success", row: N });
|
|
25243
25243
|
}).catch((Ue) => {
|
|
25244
25244
|
console.error("Action Failed", Ue);
|
|
@@ -25252,25 +25252,25 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25252
25252
|
}, ge = () => {
|
|
25253
25253
|
var T, N, ce;
|
|
25254
25254
|
if (L.value) {
|
|
25255
|
-
const
|
|
25255
|
+
const j = L.value, K = j.endpoint || ((T = j.propsActionGlobal) == null ? void 0 : T.endpointPropAction) || j.propsActionGlobal;
|
|
25256
25256
|
let he = (K == null ? void 0 : K.model) || (K != null && K.keyParam && K.keyParam.length > 0 ? K.keyParam[0] : null);
|
|
25257
25257
|
if (!he) {
|
|
25258
|
-
const We = (
|
|
25258
|
+
const We = (j.fieldActionGlobal || j.fieldActionCustom || j.field || []).find(
|
|
25259
25259
|
(it) => /^(id|ids|idAuditTrail)/i.test(it.model)
|
|
25260
25260
|
);
|
|
25261
25261
|
he = We ? We.model : "ids";
|
|
25262
25262
|
}
|
|
25263
25263
|
let Me = null, Ue = !1;
|
|
25264
|
-
if (
|
|
25265
|
-
const je = oe.value.find((qe) => qe.type === "CHECKBOX"), We = (je == null ? void 0 : je.keyCheckbox) || "id", it =
|
|
25264
|
+
if ($.value) {
|
|
25265
|
+
const je = oe.value.find((qe) => qe.type === "CHECKBOX"), We = (je == null ? void 0 : je.keyCheckbox) || "id", it = $.value[We];
|
|
25266
25266
|
if (K != null && K.apiUrl) {
|
|
25267
25267
|
Me = {
|
|
25268
25268
|
...P.value
|
|
25269
25269
|
};
|
|
25270
|
-
const qe =
|
|
25270
|
+
const qe = j.fieldMapping;
|
|
25271
25271
|
qe && typeof qe == "object" && Object.entries(qe).forEach(([nt, Kt]) => {
|
|
25272
25272
|
if (typeof Kt == "string") {
|
|
25273
|
-
const xn = He(
|
|
25273
|
+
const xn = He($.value, nt);
|
|
25274
25274
|
xn !== void 0 && (Me[Kt] = xn);
|
|
25275
25275
|
}
|
|
25276
25276
|
}), Me[he] || (Me[he] = K != null && K.model ? it : [it]), Ue = !0;
|
|
@@ -25281,19 +25281,19 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25281
25281
|
}, Me[he] || (Me[he] = B.value || []), Ue = !0);
|
|
25282
25282
|
if (Ue && Me && (K != null && K.apiUrl)) {
|
|
25283
25283
|
if (((N = K == null ? void 0 : K.apiMethod) == null ? void 0 : N.toUpperCase()) === "GET") {
|
|
25284
|
-
A.value = !1,
|
|
25284
|
+
A.value = !1, $.value || (B.value = []);
|
|
25285
25285
|
return;
|
|
25286
25286
|
}
|
|
25287
25287
|
const { apiUrl: je } = Mt(), We = K.apiUrl, it = K.apiMethod || "POST";
|
|
25288
25288
|
je(We, it, Me).then(() => {
|
|
25289
|
-
A.value = !1,
|
|
25289
|
+
A.value = !1, $.value || (B.value = []), Lt(), o("action", { action: "success", row: null });
|
|
25290
25290
|
}).catch((qe) => {
|
|
25291
25291
|
console.error("Action Failed", qe);
|
|
25292
25292
|
});
|
|
25293
|
-
} else if (
|
|
25293
|
+
} else if ($.value) {
|
|
25294
25294
|
const je = oe.value.find(
|
|
25295
25295
|
(nt) => nt.type === "CHECKBOX"
|
|
25296
|
-
), We = (je == null ? void 0 : je.keyCheckbox) || "id", it =
|
|
25296
|
+
), We = (je == null ? void 0 : je.keyCheckbox) || "id", it = $.value[We], qe = {
|
|
25297
25297
|
...P.value
|
|
25298
25298
|
};
|
|
25299
25299
|
qe[he] || (qe[he] = [it]), o("action", {
|
|
@@ -25327,7 +25327,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25327
25327
|
fetchData: Lt,
|
|
25328
25328
|
filters: g,
|
|
25329
25329
|
resetFilters: Fs,
|
|
25330
|
-
handleRefresh:
|
|
25330
|
+
handleRefresh: U
|
|
25331
25331
|
});
|
|
25332
25332
|
const ut = Y(""), Ft = (T) => {
|
|
25333
25333
|
if (!T) return "";
|
|
@@ -25383,7 +25383,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25383
25383
|
G(C(hi), { class: "absolute left-2.5 top-2.5 h-4 w-4 text-neutral-500 dark:text-neutral-400" }),
|
|
25384
25384
|
G(C(UD), {
|
|
25385
25385
|
modelValue: d.value,
|
|
25386
|
-
"onUpdate:modelValue": N[0] || (N[0] = (
|
|
25386
|
+
"onUpdate:modelValue": N[0] || (N[0] = (j) => d.value = j),
|
|
25387
25387
|
placeholder: "Search...",
|
|
25388
25388
|
style: { "padding-left": "2.25rem !important" },
|
|
25389
25389
|
class: "h-9 bg-white/95 dark:bg-zinc-800/95 border-white/30 dark:border-neutral-700/50 text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-500 dark:placeholder:text-neutral-400",
|
|
@@ -25414,14 +25414,14 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25414
25414
|
Be(T.$slots, "filter-form", { filters: g.value }, () => [
|
|
25415
25415
|
y.value.length > 0 ? (p(), k("div", C5, [
|
|
25416
25416
|
v("div", A5, [
|
|
25417
|
-
(p(!0), k(we, null, Ve(Le.value, (
|
|
25417
|
+
(p(!0), k(we, null, Ve(Le.value, (j, K) => (p(), k("div", {
|
|
25418
25418
|
key: K,
|
|
25419
|
-
class: ue(Ne(
|
|
25419
|
+
class: ue(Ne(j))
|
|
25420
25420
|
}, [
|
|
25421
25421
|
G(Zc, {
|
|
25422
|
-
field:
|
|
25423
|
-
modelValue: g.value[
|
|
25424
|
-
"onUpdate:modelValue": (he) => g.value[
|
|
25422
|
+
field: j,
|
|
25423
|
+
modelValue: g.value[j.model],
|
|
25424
|
+
"onUpdate:modelValue": (he) => g.value[j.model] = he
|
|
25425
25425
|
}, null, 8, ["field", "modelValue", "onUpdate:modelValue"])
|
|
25426
25426
|
], 2))), 128))
|
|
25427
25427
|
])
|
|
@@ -25463,7 +25463,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25463
25463
|
text: "Refresh",
|
|
25464
25464
|
tooltip: "Refresh",
|
|
25465
25465
|
class: "gap-2 h-9 bg-white/95 dark:bg-zinc-800/95 text-neutral-700 dark:text-neutral-300 hover:bg-white dark:hover:bg-zinc-800 border border-white/30 dark:border-neutral-700/50 shadow-sm backdrop-blur-sm text-xs font-medium",
|
|
25466
|
-
onClick:
|
|
25466
|
+
onClick: U,
|
|
25467
25467
|
disabled: se.value
|
|
25468
25468
|
}, {
|
|
25469
25469
|
icon: re(() => [
|
|
@@ -25473,16 +25473,16 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25473
25473
|
]),
|
|
25474
25474
|
_: 1
|
|
25475
25475
|
}, 8, ["disabled"])),
|
|
25476
|
-
(p(!0), k(we, null, Ve(at.value, (
|
|
25476
|
+
(p(!0), k(we, null, Ve(at.value, (j, K) => (p(), pe(gt, {
|
|
25477
25477
|
key: K,
|
|
25478
|
-
icon:
|
|
25479
|
-
text:
|
|
25480
|
-
tooltip:
|
|
25481
|
-
variant:
|
|
25482
|
-
"bg-color":
|
|
25483
|
-
"text-color":
|
|
25478
|
+
icon: j.icon,
|
|
25479
|
+
text: j.label,
|
|
25480
|
+
tooltip: j.tooltip,
|
|
25481
|
+
variant: j.variant,
|
|
25482
|
+
"bg-color": j.bgColor,
|
|
25483
|
+
"text-color": j.textColor,
|
|
25484
25484
|
class: "gap-2 h-9 shadow-lg shadow-primary-500/20 border-none text-xs font-medium",
|
|
25485
|
-
onClick: (he) => te(
|
|
25485
|
+
onClick: (he) => te(j)
|
|
25486
25486
|
}, null, 8, ["icon", "text", "tooltip", "variant", "bg-color", "text-color", "onClick"]))), 128)),
|
|
25487
25487
|
Be(T.$slots, "header-actions")
|
|
25488
25488
|
], 2)
|
|
@@ -25492,17 +25492,17 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25492
25492
|
v("table", P5, [
|
|
25493
25493
|
v("thead", T5, [
|
|
25494
25494
|
v("tr", null, [
|
|
25495
|
-
(p(!0), k(we, null, Ve(oe.value, (
|
|
25496
|
-
key:
|
|
25495
|
+
(p(!0), k(we, null, Ve(oe.value, (j) => (p(), k("th", {
|
|
25496
|
+
key: j.key,
|
|
25497
25497
|
class: ue([
|
|
25498
|
-
|
|
25499
|
-
|
|
25498
|
+
j.align ? `text-${j.align.toLowerCase()}` : "text-left",
|
|
25499
|
+
j.sortable ? "cursor-pointer select-none" : "",
|
|
25500
25500
|
"px-3 py-2 text-xs font-black text-white dark:text-neutral-100 uppercase tracking-wider transition-colors duration-150"
|
|
25501
25501
|
]),
|
|
25502
|
-
style: ct(
|
|
25503
|
-
onClick: (K) =>
|
|
25502
|
+
style: ct(j.width ? { width: j.width } : {}),
|
|
25503
|
+
onClick: (K) => j.sortable && io(j.key)
|
|
25504
25504
|
}, [
|
|
25505
|
-
|
|
25505
|
+
j.type === "CHECKBOX" ? (p(), k("div", I5, [
|
|
25506
25506
|
G(rs, {
|
|
25507
25507
|
"model-value": ne.value,
|
|
25508
25508
|
indeterminate: X.value,
|
|
@@ -25512,9 +25512,9 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25512
25512
|
}, null, 8, ["model-value", "indeterminate"])
|
|
25513
25513
|
])) : (p(), k("div", {
|
|
25514
25514
|
key: 1,
|
|
25515
|
-
class: ue(["flex items-center gap-2 w-full", Et(
|
|
25515
|
+
class: ue(["flex items-center gap-2 w-full", Et(j.align)])
|
|
25516
25516
|
}, [
|
|
25517
|
-
v("span", null, j
|
|
25517
|
+
v("span", null, W(j.label), 1)
|
|
25518
25518
|
], 2))
|
|
25519
25519
|
], 14, O5))), 128)),
|
|
25520
25520
|
V.value ? (p(), k("th", L5, [...N[10] || (N[10] = [
|
|
@@ -25523,8 +25523,8 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25523
25523
|
])
|
|
25524
25524
|
]),
|
|
25525
25525
|
v("tbody", B5, [
|
|
25526
|
-
se.value ? (p(!0), k(we, { key: 0 }, Ve(f.value, (
|
|
25527
|
-
key: `skeleton-${
|
|
25526
|
+
se.value ? (p(!0), k(we, { key: 0 }, Ve(f.value, (j) => (p(), k("tr", {
|
|
25527
|
+
key: `skeleton-${j}`
|
|
25528
25528
|
}, [
|
|
25529
25529
|
(p(!0), k(we, null, Ve(oe.value, (K) => {
|
|
25530
25530
|
var he, Me;
|
|
@@ -25567,12 +25567,12 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25567
25567
|
width: 200
|
|
25568
25568
|
}, null, 8, ["animationData"]),
|
|
25569
25569
|
v("div", null, [
|
|
25570
|
-
v("p", V5,
|
|
25571
|
-
v("p", U5,
|
|
25570
|
+
v("p", V5, W(ze.value ? "No search results" : "No data"), 1),
|
|
25571
|
+
v("p", U5, W(ze.value ? "Try changing keywords" : "No data added"), 1)
|
|
25572
25572
|
])
|
|
25573
25573
|
])
|
|
25574
25574
|
], 8, $5)
|
|
25575
|
-
])) : (p(!0), k(we, { key: 2 }, Ve(ee.value, (
|
|
25575
|
+
])) : (p(!0), k(we, { key: 2 }, Ve(ee.value, (j, K) => (p(), k(we, { key: K }, [
|
|
25576
25576
|
v("tr", j5, [
|
|
25577
25577
|
(p(!0), k(we, null, Ve(oe.value, (he) => (p(), k("td", {
|
|
25578
25578
|
key: he.key,
|
|
@@ -25582,13 +25582,13 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25582
25582
|
])
|
|
25583
25583
|
}, [
|
|
25584
25584
|
Be(T.$slots, `cell-${he.key}`, {
|
|
25585
|
-
row:
|
|
25586
|
-
value: He(
|
|
25585
|
+
row: j,
|
|
25586
|
+
value: He(j, he.key)
|
|
25587
25587
|
}, () => [
|
|
25588
25588
|
he.type === "CHECKBOX" ? (p(), k("div", W5, [
|
|
25589
25589
|
G(rs, {
|
|
25590
|
-
"model-value": Z(
|
|
25591
|
-
"onUpdate:modelValue": (Me) => de(
|
|
25590
|
+
"model-value": Z(j),
|
|
25591
|
+
"onUpdate:modelValue": (Me) => de(j, !!Me),
|
|
25592
25592
|
onClick: N[3] || (N[3] = xt(() => {
|
|
25593
25593
|
}, ["stop"]))
|
|
25594
25594
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
@@ -25599,35 +25599,35 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25599
25599
|
]])
|
|
25600
25600
|
}, [
|
|
25601
25601
|
G(lf, {
|
|
25602
|
-
variant: fs(
|
|
25602
|
+
variant: fs(j, he).variant,
|
|
25603
25603
|
class: ue([
|
|
25604
|
-
fs(
|
|
25604
|
+
fs(j, he).class,
|
|
25605
25605
|
"whitespace-nowrap truncate max-w-[150px] inline-block"
|
|
25606
25606
|
])
|
|
25607
25607
|
}, {
|
|
25608
25608
|
default: re(() => [
|
|
25609
|
-
Ie(
|
|
25609
|
+
Ie(W(fs(j, he).label), 1)
|
|
25610
25610
|
]),
|
|
25611
25611
|
_: 2
|
|
25612
25612
|
}, 1032, ["variant", "class"])
|
|
25613
25613
|
], 2)) : he.key === "no" ? (p(), k(we, { key: 2 }, [
|
|
25614
|
-
Ie(
|
|
25614
|
+
Ie(W((u.value - 1) * f.value + K + 1), 1)
|
|
25615
25615
|
], 64)) : he.type === "date" || he.type === "DATE" ? (p(), k(we, { key: 3 }, [
|
|
25616
|
-
Ie(
|
|
25616
|
+
Ie(W(He(j, he.key) ? C(MD)(He(j, he.key), "long") : "-"), 1)
|
|
25617
25617
|
], 64)) : (p(), k(we, { key: 4 }, [
|
|
25618
|
-
Ie(
|
|
25618
|
+
Ie(W(he.format ? he.format(He(j, he.key)) : He(j, he.key)), 1)
|
|
25619
25619
|
], 64))
|
|
25620
25620
|
])
|
|
25621
25621
|
], 2))), 128)),
|
|
25622
25622
|
V.value ? (p(), k("td", N5, [
|
|
25623
25623
|
Be(T.$slots, "actions", {
|
|
25624
|
-
row:
|
|
25625
|
-
buttons: yt(
|
|
25624
|
+
row: j,
|
|
25625
|
+
buttons: yt(j),
|
|
25626
25626
|
getButtonColor: et,
|
|
25627
25627
|
getIconComponent: Xt
|
|
25628
25628
|
}, () => [
|
|
25629
|
-
yt(
|
|
25630
|
-
(p(!0), k(we, null, Ve(yt(
|
|
25629
|
+
yt(j).length > 0 ? (p(), k("div", H5, [
|
|
25630
|
+
(p(!0), k(we, null, Ve(yt(j), (he, Me) => (p(), k("div", {
|
|
25631
25631
|
key: Me,
|
|
25632
25632
|
class: "group relative"
|
|
25633
25633
|
}, [
|
|
@@ -25638,8 +25638,8 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25638
25638
|
rounded: he.rounded || "sm",
|
|
25639
25639
|
borderStyle: he.borderStyle || "none",
|
|
25640
25640
|
variant: he.variant || "ghost",
|
|
25641
|
-
"bg-color": et(he,
|
|
25642
|
-
onClick: (Ue) => be(he,
|
|
25641
|
+
"bg-color": et(he, j),
|
|
25642
|
+
onClick: (Ue) => be(he, j)
|
|
25643
25643
|
}, null, 8, ["tooltip", "icon", "rounded", "borderStyle", "variant", "bg-color", "onClick"])
|
|
25644
25644
|
]))), 128))
|
|
25645
25645
|
])) : z("", !0)
|
|
@@ -25652,7 +25652,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25652
25652
|
class: "px-0 py-0"
|
|
25653
25653
|
}, [
|
|
25654
25654
|
Be(T.$slots, "expanded-row", {
|
|
25655
|
-
row:
|
|
25655
|
+
row: j,
|
|
25656
25656
|
index: K
|
|
25657
25657
|
})
|
|
25658
25658
|
], 8, q5)
|
|
@@ -25665,7 +25665,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25665
25665
|
v("div", K5, [
|
|
25666
25666
|
G(C(YD), {
|
|
25667
25667
|
"model-value": String(f.value),
|
|
25668
|
-
"onUpdate:modelValue": N[4] || (N[4] = (
|
|
25668
|
+
"onUpdate:modelValue": N[4] || (N[4] = (j) => J(Number(j)))
|
|
25669
25669
|
}, {
|
|
25670
25670
|
default: re(() => [
|
|
25671
25671
|
G(C(nM), { class: "h-8 w-[70px] bg-white dark:bg-zinc-800 border-neutral-200 dark:border-neutral-700" }, {
|
|
@@ -25678,12 +25678,12 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25678
25678
|
}),
|
|
25679
25679
|
G(C(JD), null, {
|
|
25680
25680
|
default: re(() => [
|
|
25681
|
-
(p(), k(we, null, Ve(mt, (
|
|
25682
|
-
key:
|
|
25683
|
-
value: String(
|
|
25681
|
+
(p(), k(we, null, Ve(mt, (j) => G(C(ZD), {
|
|
25682
|
+
key: j,
|
|
25683
|
+
value: String(j)
|
|
25684
25684
|
}, {
|
|
25685
25685
|
default: re(() => [
|
|
25686
|
-
Ie(j
|
|
25686
|
+
Ie(W(j), 1)
|
|
25687
25687
|
]),
|
|
25688
25688
|
_: 2
|
|
25689
25689
|
}, 1032, ["value"])), 64))
|
|
@@ -25696,11 +25696,11 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25696
25696
|
N[16] || (N[16] = v("div", { class: "h-5 w-px bg-zinc-300 dark:bg-zinc-600" }, null, -1)),
|
|
25697
25697
|
v("span", Y5, [
|
|
25698
25698
|
N[12] || (N[12] = Ie(" Showing ", -1)),
|
|
25699
|
-
v("span", J5,
|
|
25699
|
+
v("span", J5, W(Re.value), 1),
|
|
25700
25700
|
N[13] || (N[13] = Ie(" to ", -1)),
|
|
25701
|
-
v("span", Q5,
|
|
25701
|
+
v("span", Q5, W(ot.value), 1),
|
|
25702
25702
|
N[14] || (N[14] = Ie(" of ", -1)),
|
|
25703
|
-
v("span", Z5,
|
|
25703
|
+
v("span", Z5, W(_e.value), 1),
|
|
25704
25704
|
N[15] || (N[15] = Ie(" items ", -1))
|
|
25705
25705
|
])
|
|
25706
25706
|
]),
|
|
@@ -25711,12 +25711,12 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25711
25711
|
"sibling-count": 1,
|
|
25712
25712
|
"show-edges": "",
|
|
25713
25713
|
page: u.value,
|
|
25714
|
-
"onUpdate:page":
|
|
25714
|
+
"onUpdate:page": F,
|
|
25715
25715
|
class: "scale-90 origin-right"
|
|
25716
25716
|
}, {
|
|
25717
25717
|
default: re(() => [
|
|
25718
25718
|
G(C(WD), { class: "flex items-center gap-1" }, {
|
|
25719
|
-
default: re(({ items:
|
|
25719
|
+
default: re(({ items: j }) => [
|
|
25720
25720
|
G(C(HD), { class: "w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:opacity-50 disabled:cursor-not-allowed" }, {
|
|
25721
25721
|
default: re(() => [
|
|
25722
25722
|
G(C(Wf), { class: "h-4 w-4" })
|
|
@@ -25729,7 +25729,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25729
25729
|
]),
|
|
25730
25730
|
_: 1
|
|
25731
25731
|
}),
|
|
25732
|
-
(p(!0), k(we, null, Ve(
|
|
25732
|
+
(p(!0), k(we, null, Ve(j, (K, he) => (p(), k(we, null, [
|
|
25733
25733
|
K.type === "page" ? (p(), pe(C(GD), {
|
|
25734
25734
|
key: he,
|
|
25735
25735
|
value: K.value,
|
|
@@ -25740,10 +25740,10 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25740
25740
|
class: "w-8 h-8 p-0 text-sm",
|
|
25741
25741
|
variant: K.value === u.value ? "default" : "outline",
|
|
25742
25742
|
disabled: K.value === u.value,
|
|
25743
|
-
onClick: (Me) =>
|
|
25743
|
+
onClick: (Me) => F(K.value)
|
|
25744
25744
|
}, {
|
|
25745
25745
|
default: re(() => [
|
|
25746
|
-
Ie(
|
|
25746
|
+
Ie(W(K.value), 1)
|
|
25747
25747
|
]),
|
|
25748
25748
|
_: 2
|
|
25749
25749
|
}, 1032, ["variant", "disabled", "onClick"])
|
|
@@ -25776,7 +25776,7 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25776
25776
|
])) : z("", !0),
|
|
25777
25777
|
G(As, {
|
|
25778
25778
|
modelValue: b.value,
|
|
25779
|
-
"onUpdate:modelValue": N[5] || (N[5] = (
|
|
25779
|
+
"onUpdate:modelValue": N[5] || (N[5] = (j) => b.value = j),
|
|
25780
25780
|
title: bt.value,
|
|
25781
25781
|
icon: "AlertCircle",
|
|
25782
25782
|
"max-width": 450,
|
|
@@ -25796,27 +25796,27 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25796
25796
|
]),
|
|
25797
25797
|
default: re(() => [
|
|
25798
25798
|
v("div", tE, [
|
|
25799
|
-
v("p", nE,
|
|
25799
|
+
v("p", nE, W(wt.value), 1)
|
|
25800
25800
|
])
|
|
25801
25801
|
]),
|
|
25802
25802
|
_: 1
|
|
25803
25803
|
}, 8, ["modelValue", "title"]),
|
|
25804
25804
|
G(As, {
|
|
25805
25805
|
modelValue: A.value,
|
|
25806
|
-
"onUpdate:modelValue": N[8] || (N[8] = (
|
|
25806
|
+
"onUpdate:modelValue": N[8] || (N[8] = (j) => A.value = j),
|
|
25807
25807
|
title: ((ce = L.value) == null ? void 0 : ce.label) || "Action",
|
|
25808
25808
|
icon: "AlertCircle",
|
|
25809
25809
|
"max-width": 450
|
|
25810
25810
|
}, {
|
|
25811
25811
|
actions: re(() => {
|
|
25812
|
-
var
|
|
25812
|
+
var j;
|
|
25813
25813
|
return [
|
|
25814
25814
|
G(gt, {
|
|
25815
25815
|
variant: "outline",
|
|
25816
25816
|
onClick: N[6] || (N[6] = (K) => A.value = !1),
|
|
25817
25817
|
text: "Cancel"
|
|
25818
25818
|
}),
|
|
25819
|
-
e.dummyMode && ((
|
|
25819
|
+
e.dummyMode && ((j = L.value) != null && j.route) ? (p(), pe(gt, {
|
|
25820
25820
|
key: 1,
|
|
25821
25821
|
variant: "default",
|
|
25822
25822
|
onClick: N[7] || (N[7] = (K) => A.value = !1),
|
|
@@ -25830,16 +25830,16 @@ const Cn = /* @__PURE__ */ Bd(g5), b5 = { class: "dcode-card animate-slide-up" }
|
|
|
25830
25830
|
];
|
|
25831
25831
|
}),
|
|
25832
25832
|
default: re(() => {
|
|
25833
|
-
var
|
|
25833
|
+
var j, K, he;
|
|
25834
25834
|
return [
|
|
25835
25835
|
v("div", sE, [
|
|
25836
|
-
e.dummyMode && ((
|
|
25836
|
+
e.dummyMode && ((j = L.value) != null && j.route) ? (p(), k("div", oE, [
|
|
25837
25837
|
v("div", aE, [
|
|
25838
25838
|
G(C(hi), { class: "w-4 h-4" })
|
|
25839
25839
|
]),
|
|
25840
25840
|
v("div", iE, [
|
|
25841
|
-
v("span", rE,
|
|
25842
|
-
v("p", lE,
|
|
25841
|
+
v("span", rE, W(C(r) === "id" ? "Info Navigasi" : "Navigation Info"), 1),
|
|
25842
|
+
v("p", lE, W(C(r) === "id" ? `Aksi ini akan mengarah ke rute: ${L.value.route}` : `This action will navigate to: ${L.value.route}`), 1)
|
|
25843
25843
|
])
|
|
25844
25844
|
])) : z("", !0),
|
|
25845
25845
|
(p(!0), k(we, null, Ve(((K = L.value) == null ? void 0 : K.fieldActionCustom) || ((he = L.value) == null ? void 0 : he.fieldActionGlobal) || [], (Me, Ue) => {
|
|
@@ -25890,26 +25890,26 @@ function dE(e, t) {
|
|
|
25890
25890
|
const { t: n, locale: s } = cn(), o = O(() => s.value), { apiUrl: a } = Mt(), i = Ka();
|
|
25891
25891
|
let r = "";
|
|
25892
25892
|
const l = Y(!1), c = Y(null), d = O(() => e.schema || c.value), u = O(() => {
|
|
25893
|
-
var
|
|
25894
|
-
if ((
|
|
25893
|
+
var F;
|
|
25894
|
+
if ((F = e.selectedTokenCore) != null && F.address) return e.selectedTokenCore.address;
|
|
25895
25895
|
if (e.baseUrl) return e.baseUrl;
|
|
25896
|
-
}), f = (
|
|
25897
|
-
if (
|
|
25896
|
+
}), f = (F) => {
|
|
25897
|
+
if (!F || typeof F != "string" || F.startsWith("http")) return F;
|
|
25898
25898
|
const J = u.value;
|
|
25899
|
-
if (!J) return
|
|
25900
|
-
const H = J.replace(/\/$/, ""),
|
|
25901
|
-
return `${H}${
|
|
25899
|
+
if (!J) return F;
|
|
25900
|
+
const H = J.replace(/\/$/, ""), U = F.startsWith("/") ? F : `/${F}`;
|
|
25901
|
+
return `${H}${U}`;
|
|
25902
25902
|
}, h = O(() => {
|
|
25903
|
-
const
|
|
25903
|
+
const F = {}, J = d.value;
|
|
25904
25904
|
return J != null && J.sections && J.sections.forEach((H) => {
|
|
25905
25905
|
var te, be, Ce;
|
|
25906
25906
|
(((te = H.propsForm) == null ? void 0 : te.fields) || ((be = H.propsTable) == null ? void 0 : be.fields) || ((Ce = H.props) == null ? void 0 : Ce.fields) || []).forEach((Ae) => {
|
|
25907
25907
|
var ge, Pe, tt, bt, wt, ut, Ft, $t, In, $s, Kn;
|
|
25908
25908
|
if (Ae.component === "DCodeRadioCustom") {
|
|
25909
25909
|
const vn = ((ge = Ae.props) == null ? void 0 : ge.name) || "default-group";
|
|
25910
|
-
|
|
25910
|
+
F[vn] || (F[vn] = []);
|
|
25911
25911
|
let Ln = ((tt = (Pe = Ae.props) == null ? void 0 : Pe.endpoint) == null ? void 0 : tt.apiUrl) || ((bt = Ae.props) == null ? void 0 : bt.apiUrl);
|
|
25912
|
-
Ln = f(Ln),
|
|
25912
|
+
Ln = f(Ln), F[vn].push({
|
|
25913
25913
|
key: Ae.key,
|
|
25914
25914
|
value: (wt = Ae.props) == null ? void 0 : wt.value,
|
|
25915
25915
|
label: ((ut = Ae.props) == null ? void 0 : ut.labelID) || ((Ft = Ae.props) == null ? void 0 : Ft.labelEN) || Ae.key,
|
|
@@ -25921,24 +25921,24 @@ function dE(e, t) {
|
|
|
25921
25921
|
});
|
|
25922
25922
|
}
|
|
25923
25923
|
});
|
|
25924
|
-
}),
|
|
25924
|
+
}), F;
|
|
25925
25925
|
}), m = Rt({}), w = Rt({}), x = Rt({}), g = Rt({}), E = Rt({}), D = Rt({
|
|
25926
25926
|
visible: !1,
|
|
25927
25927
|
title: "",
|
|
25928
25928
|
message: "",
|
|
25929
25929
|
action: null
|
|
25930
|
-
}), S = (
|
|
25931
|
-
var J, H,
|
|
25932
|
-
return ((J =
|
|
25933
|
-
}, M = (
|
|
25930
|
+
}), S = (F) => {
|
|
25931
|
+
var J, H, U;
|
|
25932
|
+
return ((J = F.propsForm) == null ? void 0 : J.key) || ((H = F.propsTable) == null ? void 0 : H.key) || ((U = F.propsWizard) == null ? void 0 : U.key) || F.id || "unknown-section";
|
|
25933
|
+
}, M = (F) => {
|
|
25934
25934
|
var H;
|
|
25935
|
-
return (((H =
|
|
25935
|
+
return (((H = F.propsWizard) == null ? void 0 : H.propsSteps) || []).filter((U) => Q(U)).map((U, te) => {
|
|
25936
25936
|
var Ae;
|
|
25937
25937
|
let be = [];
|
|
25938
|
-
if (Array.isArray(
|
|
25939
|
-
be =
|
|
25940
|
-
else if (
|
|
25941
|
-
const ge =
|
|
25938
|
+
if (Array.isArray(U.sectionsWizard))
|
|
25939
|
+
be = U.sectionsWizard;
|
|
25940
|
+
else if (U.sectionsWizard && typeof U.sectionsWizard == "object") {
|
|
25941
|
+
const ge = U.sectionsWizard;
|
|
25942
25942
|
be = [
|
|
25943
25943
|
{
|
|
25944
25944
|
type: ge.type || (ge.fields ? "FORM" : ge.isDataTable ? "TABLE" : "UNKNOWN"),
|
|
@@ -25946,52 +25946,52 @@ function dE(e, t) {
|
|
|
25946
25946
|
}
|
|
25947
25947
|
];
|
|
25948
25948
|
}
|
|
25949
|
-
const Ce = ie(
|
|
25949
|
+
const Ce = ie(U);
|
|
25950
25950
|
return {
|
|
25951
|
-
key:
|
|
25951
|
+
key: U.key || `step-${te}`,
|
|
25952
25952
|
title: Ce.title,
|
|
25953
25953
|
description: Ce.description,
|
|
25954
|
-
icon:
|
|
25954
|
+
icon: U.icon || void 0,
|
|
25955
25955
|
sections: be,
|
|
25956
|
-
actions: ((Ae =
|
|
25956
|
+
actions: ((Ae = U.propsComponent) == null ? void 0 : Ae.actionComponent) || U.actionComponent || []
|
|
25957
25957
|
};
|
|
25958
25958
|
});
|
|
25959
|
-
}, _ = (
|
|
25959
|
+
}, _ = (F) => F ? [...F].sort((J, H) => (J.seq || 0) - (H.seq || 0)) : [], y = (F, J) => {
|
|
25960
25960
|
var te;
|
|
25961
|
-
const H = J ? L(J) :
|
|
25962
|
-
return B((te =
|
|
25963
|
-
}, b = (
|
|
25961
|
+
const H = J ? L(J) : $.value;
|
|
25962
|
+
return B((te = F.logic) == null ? void 0 : te.labelingRule, H, `LABEL-${F.model}`) || null;
|
|
25963
|
+
}, b = (F, J) => {
|
|
25964
25964
|
var te;
|
|
25965
|
-
const H = J ? L(J) :
|
|
25966
|
-
return B((te =
|
|
25967
|
-
}, A = (
|
|
25968
|
-
const
|
|
25969
|
-
if (!
|
|
25965
|
+
const H = J ? L(J) : $.value;
|
|
25966
|
+
return B((te = F.logic) == null ? void 0 : te.lengthRule, H, `LENGTH-${F.model}`) || null;
|
|
25967
|
+
}, A = (F, J, H) => {
|
|
25968
|
+
const U = F.props || F.propsFieldGlobal;
|
|
25969
|
+
if (!U) return null;
|
|
25970
25970
|
const te = J == null ? "" : String(J);
|
|
25971
25971
|
if (te === "") return null;
|
|
25972
|
-
const be = b(
|
|
25972
|
+
const be = b(F, H), Ce = (be == null ? void 0 : be.minLength) ?? U.minLength, Ae = (be == null ? void 0 : be.maxLength) ?? U.maxLength;
|
|
25973
25973
|
if (Ce && te.length < Ce)
|
|
25974
25974
|
return o.value === "id" ? `Minimal ${Ce} karakter` : `Minimum ${Ce} characters`;
|
|
25975
25975
|
if (Ae && te.length > Ae)
|
|
25976
25976
|
return o.value === "id" ? `Maksimal ${Ae} karakter` : `Maximum ${Ae} characters`;
|
|
25977
|
-
if (
|
|
25977
|
+
if (U.regex)
|
|
25978
25978
|
try {
|
|
25979
|
-
if (!new RegExp(
|
|
25980
|
-
return
|
|
25979
|
+
if (!new RegExp(U.regex).test(te))
|
|
25980
|
+
return U.regexMessage || (o.value === "id" ? "Format tidak valid" : "Invalid format");
|
|
25981
25981
|
} catch {
|
|
25982
|
-
console.warn(`[DynamicForm] Invalid validation regex for field ${
|
|
25982
|
+
console.warn(`[DynamicForm] Invalid validation regex for field ${F.model}:`, U.regex);
|
|
25983
25983
|
}
|
|
25984
25984
|
return null;
|
|
25985
25985
|
}, P = O(() => {
|
|
25986
25986
|
var J;
|
|
25987
|
-
const
|
|
25987
|
+
const F = /* @__PURE__ */ new Map();
|
|
25988
25988
|
return (J = d.value) != null && J.sections && d.value.sections.forEach((H) => {
|
|
25989
25989
|
var Ce, Ae;
|
|
25990
|
-
const
|
|
25991
|
-
(
|
|
25990
|
+
const U = H.propsForm || H.propsTable || H.props || {}, te = S(H);
|
|
25991
|
+
(U.fields || H.fields || []).forEach((ge) => {
|
|
25992
25992
|
if (ge.model) {
|
|
25993
25993
|
const Pe = te ? `${te}.${ge.model}` : ge.model;
|
|
25994
|
-
|
|
25994
|
+
F.set(ge.model, { field: ge, path: Pe });
|
|
25995
25995
|
}
|
|
25996
25996
|
}), ((Ce = H.type) == null ? void 0 : Ce.toUpperCase()) === "WIZARD" && ((Ae = H.propsWizard) != null && Ae.propsSteps) && H.propsWizard.propsSteps.forEach((ge) => {
|
|
25997
25997
|
const Pe = ge.key || ge.id;
|
|
@@ -25999,164 +25999,165 @@ function dE(e, t) {
|
|
|
25999
25999
|
bt.fields && bt.fields.forEach((wt) => {
|
|
26000
26000
|
if (wt.model) {
|
|
26001
26001
|
const ut = Pe ? `${Pe}.${wt.model}` : wt.model;
|
|
26002
|
-
|
|
26002
|
+
F.set(wt.model, { field: wt, path: ut });
|
|
26003
26003
|
}
|
|
26004
26004
|
});
|
|
26005
26005
|
});
|
|
26006
26006
|
});
|
|
26007
|
-
}),
|
|
26008
|
-
}), I = (
|
|
26007
|
+
}), F;
|
|
26008
|
+
}), I = (F, J) => {
|
|
26009
26009
|
if (J == null || typeof J == "object" && J._isLogicValue) return J;
|
|
26010
|
-
const H = P.value.get(
|
|
26010
|
+
const H = P.value.get(F);
|
|
26011
26011
|
if (!H) return J;
|
|
26012
|
-
const
|
|
26012
|
+
const U = H.field, te = X[U.key];
|
|
26013
26013
|
if (!te || !Array.isArray(te)) return J;
|
|
26014
|
-
const Ce = (
|
|
26014
|
+
const Ce = (U.props || {}).itemValue || "id", Ae = te.find((ge) => String(ge[Ce]) === String(J) || String(ge.id) === String(J) || String(ge.code) === String(J));
|
|
26015
26015
|
return Ae && Ae.code ? { id: J, code: Ae.code, _isLogicValue: !0 } : J;
|
|
26016
|
-
}, L = (
|
|
26017
|
-
const J = (H,
|
|
26016
|
+
}, L = (F) => {
|
|
26017
|
+
const J = (H, U) => {
|
|
26018
26018
|
if (H == null || typeof H == "object" && H._isLogicValue || typeof H == "boolean") return H;
|
|
26019
26019
|
if (typeof H == "number" || typeof H == "string")
|
|
26020
|
-
return
|
|
26020
|
+
return U ? I(U, H) : H;
|
|
26021
26021
|
if (typeof H == "object" && !Array.isArray(H)) {
|
|
26022
26022
|
const te = (H == null ? void 0 : H.id) ?? (H == null ? void 0 : H.code) ?? (H == null ? void 0 : H.value) ?? (H == null ? void 0 : H.key) ?? H;
|
|
26023
|
-
return
|
|
26023
|
+
return U && (typeof te == "string" || typeof te == "number") ? I(U, te) : te;
|
|
26024
26024
|
}
|
|
26025
26025
|
return H;
|
|
26026
26026
|
};
|
|
26027
|
-
return new Proxy(
|
|
26028
|
-
get(H,
|
|
26029
|
-
if (typeof
|
|
26030
|
-
const te = P.value.get(
|
|
26027
|
+
return new Proxy(F, {
|
|
26028
|
+
get(H, U) {
|
|
26029
|
+
if (typeof U != "string") return H[U];
|
|
26030
|
+
const te = P.value.get(U);
|
|
26031
26031
|
if (te) {
|
|
26032
26032
|
const be = Le(H, te.path);
|
|
26033
|
-
if (be != null) return J(be,
|
|
26033
|
+
if (be != null) return J(be, U);
|
|
26034
26034
|
}
|
|
26035
|
-
return J(H[
|
|
26035
|
+
return J(H[U], U);
|
|
26036
26036
|
},
|
|
26037
|
-
has(H,
|
|
26038
|
-
return typeof
|
|
26037
|
+
has(H, U) {
|
|
26038
|
+
return typeof U != "string" ? U in H : P.value.has(U) || U in H;
|
|
26039
26039
|
},
|
|
26040
26040
|
ownKeys(H) {
|
|
26041
26041
|
return Array.from(/* @__PURE__ */ new Set([...Object.keys(H), ...P.value.keys()]));
|
|
26042
26042
|
},
|
|
26043
|
-
getOwnPropertyDescriptor(H,
|
|
26043
|
+
getOwnPropertyDescriptor(H, U) {
|
|
26044
26044
|
return { enumerable: !0, configurable: !0 };
|
|
26045
26045
|
}
|
|
26046
26046
|
});
|
|
26047
|
-
},
|
|
26048
|
-
if (
|
|
26049
|
-
if (typeof
|
|
26050
|
-
if (typeof
|
|
26047
|
+
}, $ = O(() => L(m)), B = (F, J, H) => F == null ? null : Array.isArray(F) ? F.find((U) => !U.condition || ne(U.condition, J, H)) || null : F, ne = (F, J, H = "LOGIC") => {
|
|
26048
|
+
if (F == null || typeof F == "object" && Object.keys(F).length === 0) return !0;
|
|
26049
|
+
if (typeof F == "boolean") return F;
|
|
26050
|
+
if (typeof F == "object")
|
|
26051
26051
|
try {
|
|
26052
|
-
const
|
|
26052
|
+
const U = Cn.apply(F, J);
|
|
26053
26053
|
if (["VISIBLE", "SEC", "FILTER", "LENGTH", "CALC"].some((be) => H.includes(be))) {
|
|
26054
|
-
const be = JSON.stringify(
|
|
26055
|
-
console.log(`[DynamicForm][${H}] Rule: ${be} | Data: {${Ce.map((Ae) => `${Ae}: ${JSON.stringify(J[Ae])}`).join(", ")}} | Result: ${
|
|
26054
|
+
const be = JSON.stringify(F), Ce = Object.keys(J).filter((Ae) => be.includes(`"${Ae}"`));
|
|
26055
|
+
console.log(`[DynamicForm][${H}] Rule: ${be} | Data: {${Ce.map((Ae) => `${Ae}: ${JSON.stringify(J[Ae])}`).join(", ")}} | Result: ${U}`);
|
|
26056
26056
|
}
|
|
26057
|
-
return
|
|
26058
|
-
} catch (
|
|
26059
|
-
return console.error(`[${H}] JsonLogic error:`,
|
|
26057
|
+
return U;
|
|
26058
|
+
} catch (U) {
|
|
26059
|
+
return console.error(`[${H}] JsonLogic error:`, U), !1;
|
|
26060
26060
|
}
|
|
26061
26061
|
try {
|
|
26062
|
-
return !!new Function("formData", `return ${
|
|
26062
|
+
return !!new Function("formData", `return ${F};`)(J);
|
|
26063
26063
|
} catch {
|
|
26064
26064
|
return !1;
|
|
26065
26065
|
}
|
|
26066
|
-
}, X = Rt({}), Z = async (
|
|
26067
|
-
const J =
|
|
26068
|
-
if (!(!(H != null && H.apiUrl) || X[
|
|
26066
|
+
}, X = Rt({}), Z = async (F) => {
|
|
26067
|
+
const J = F.props || {}, H = J.endpointReference || J.endpoint;
|
|
26068
|
+
if (!(!(H != null && H.apiUrl) || X[F.key]) && !(Array.isArray(H.keyParam) && H.keyParam.some((U) => m[U] === null || m[U] === void 0 || m[U] === "")))
|
|
26069
26069
|
try {
|
|
26070
|
-
const
|
|
26070
|
+
const U = f(H.apiUrl), te = await a(U, H.apiMethod || "GET", { page: 1, perPage: 100 });
|
|
26071
26071
|
let be = (te == null ? void 0 : te.data) || te;
|
|
26072
|
-
X[
|
|
26072
|
+
X[F.key] = Array.isArray(be) ? be : be ? [be] : [];
|
|
26073
26073
|
} catch {
|
|
26074
|
-
X[
|
|
26074
|
+
X[F.key] = [];
|
|
26075
26075
|
}
|
|
26076
|
-
}, ae = (
|
|
26076
|
+
}, ae = (F, J) => {
|
|
26077
26077
|
var ge;
|
|
26078
|
-
const H =
|
|
26079
|
-
if (!((ge =
|
|
26080
|
-
const te = J ? L(J) :
|
|
26081
|
-
if (!be || !be.values) return
|
|
26078
|
+
const H = F.props || {}, U = X[F.key] || H.items || H.options || [];
|
|
26079
|
+
if (!((ge = F.logic) != null && ge.optionsFilterRule)) return U;
|
|
26080
|
+
const te = J ? L(J) : $.value, be = B(F.logic.optionsFilterRule, te, `FILTER-${F.model}`);
|
|
26081
|
+
if (!be || !be.values) return U;
|
|
26082
26082
|
const Ce = (be.values || []).map((Pe) => String(Pe)), Ae = H.itemValue || "id";
|
|
26083
|
-
return
|
|
26083
|
+
return U.filter((Pe) => Pe == null ? !1 : typeof Pe != "object" ? Ce.includes(String(Pe)) : [Ae, "code", "id", "value", "key"].some((tt) => {
|
|
26084
26084
|
const bt = Pe[tt];
|
|
26085
26085
|
return bt != null && Ce.includes(String(bt));
|
|
26086
26086
|
}));
|
|
26087
|
-
}, de = (
|
|
26088
|
-
if (
|
|
26089
|
-
if ("var" in
|
|
26087
|
+
}, de = (F) => {
|
|
26088
|
+
if (!F || typeof F != "object") return [];
|
|
26089
|
+
if ("var" in F) return [F.var];
|
|
26090
26090
|
let J = [];
|
|
26091
|
-
return Object.values(
|
|
26092
|
-
Array.isArray(H) ? H.forEach((
|
|
26093
|
-
J = J.concat(de(
|
|
26091
|
+
return Object.values(F).forEach((H) => {
|
|
26092
|
+
Array.isArray(H) ? H.forEach((U) => {
|
|
26093
|
+
J = J.concat(de(U));
|
|
26094
26094
|
}) : typeof H == "object" && (J = J.concat(de(H)));
|
|
26095
26095
|
}), J;
|
|
26096
26096
|
};
|
|
26097
|
-
Fe(() => d.value, (
|
|
26098
|
-
if (!(
|
|
26099
|
-
const J = /* @__PURE__ */ new Set(), H = (
|
|
26100
|
-
|
|
26101
|
-
const be =
|
|
26097
|
+
Fe(() => d.value, (F) => {
|
|
26098
|
+
if (!(F != null && F.sections)) return;
|
|
26099
|
+
const J = /* @__PURE__ */ new Set(), H = (U) => {
|
|
26100
|
+
U && ["visibleRule", "requiredRule", "disabledRule", "optionsFilterRule", "lengthRule", "calculateRule"].forEach((te) => {
|
|
26101
|
+
const be = U[te];
|
|
26102
26102
|
Array.isArray(be) ? be.forEach((Ce) => Ce.condition && de(Ce.condition).forEach((Ae) => J.add(Ae))) : be && de(be).forEach((Ce) => J.add(Ce));
|
|
26103
26103
|
});
|
|
26104
26104
|
};
|
|
26105
|
-
|
|
26105
|
+
F.sections.forEach((U) => {
|
|
26106
26106
|
var te, be, Ce, Ae, ge;
|
|
26107
|
-
H(
|
|
26107
|
+
H(U.logic || ((te = U.propsForm) == null ? void 0 : te.logic)), U.type === "WIZARD" && ((Ce = (be = U.propsWizard) == null ? void 0 : be.propsSteps) == null || Ce.forEach((Pe) => H(Pe.logic))), (((Ae = U.propsForm) == null ? void 0 : Ae.fields) || U.fields || []).forEach((Pe) => {
|
|
26108
26108
|
var tt;
|
|
26109
26109
|
H(Pe.logic), (tt = Pe.logic) != null && tt.optionsFilterRule && Z(Pe);
|
|
26110
|
-
}),
|
|
26110
|
+
}), U.type === "TABLE" && ((ge = U.propsTable) != null && ge.modelDatatable) && (m[U.propsTable.modelDatatable] = m[U.propsTable.modelDatatable] || []);
|
|
26111
26111
|
});
|
|
26112
26112
|
}, { immediate: !0 });
|
|
26113
|
-
const R = (
|
|
26113
|
+
const R = (F, J) => {
|
|
26114
26114
|
var be;
|
|
26115
|
-
|
|
26116
|
-
|
|
26117
|
-
|
|
26118
|
-
|
|
26119
|
-
|
|
26115
|
+
if (F.isHidden) return !0;
|
|
26116
|
+
const H = J ? L(J) : $.value, U = (be = F.logic) == null ? void 0 : be.visibleRule;
|
|
26117
|
+
if (U == null) return !0;
|
|
26118
|
+
const te = B(U, H, `VISIBLE-${F.model}`);
|
|
26119
|
+
return !!(typeof te == "object" ? ne(te, H, `VISIBLE-${F.model}`) : te);
|
|
26120
|
+
}, q = (F, J) => {
|
|
26120
26121
|
var be, Ce;
|
|
26121
|
-
const H = J ? L(J) :
|
|
26122
|
-
if (
|
|
26123
|
-
const te = B(
|
|
26122
|
+
const H = J ? L(J) : $.value, U = (be = F.logic) == null ? void 0 : be.requiredRule;
|
|
26123
|
+
if (U == null) return ((Ce = F.props) == null ? void 0 : Ce.required) || !1;
|
|
26124
|
+
const te = B(U, H, `REQUIRED-${F.model}`);
|
|
26124
26125
|
return !!(typeof te == "object" ? "required" in te ? te.required : ne(te, H) : te);
|
|
26125
|
-
}, le = (
|
|
26126
|
+
}, le = (F, J) => {
|
|
26126
26127
|
var be, Ce;
|
|
26127
|
-
const H = J ? L(J) :
|
|
26128
|
-
if (
|
|
26129
|
-
const te = B(
|
|
26128
|
+
const H = J ? L(J) : $.value, U = (be = F.logic) == null ? void 0 : be.disabledRule;
|
|
26129
|
+
if (U == null) return ((Ce = F.props) == null ? void 0 : Ce.disabled) || !1;
|
|
26130
|
+
const te = B(U, H, `DISABLED-${F.model}`);
|
|
26130
26131
|
return !!(typeof te == "object" ? "disabled" in te ? te.disabled : ne(te, H) : te);
|
|
26131
|
-
}, ie = (
|
|
26132
|
+
}, ie = (F) => {
|
|
26132
26133
|
var be;
|
|
26133
|
-
const J =
|
|
26134
|
-
let H = o.value === "id" ? J.titleID ||
|
|
26135
|
-
const te = B((be =
|
|
26136
|
-
return te && (H = o.value === "id" ? te.labelID || te.titleID || te.title : te.labelEN || te.titleEN || te.title,
|
|
26137
|
-
}, Q = (
|
|
26134
|
+
const J = F.propsForm || F.propsTable || F.propsWizard || F.props || {};
|
|
26135
|
+
let H = o.value === "id" ? J.titleID || F.titleID || F.labelID : J.titleEN || F.titleEN || F.labelEN, U = o.value === "id" ? J.descriptionID || F.descriptionID : J.descriptionEN || F.descriptionEN;
|
|
26136
|
+
const te = B((be = F.logic || J.logic) == null ? void 0 : be.labelingRule, $.value, "LABEL-SEC");
|
|
26137
|
+
return te && (H = o.value === "id" ? te.labelID || te.titleID || te.title : te.labelEN || te.titleEN || te.title, U = o.value === "id" ? te.descriptionID : te.descriptionEN), { title: H, description: U };
|
|
26138
|
+
}, Q = (F, J) => {
|
|
26138
26139
|
var Ce, Ae;
|
|
26139
|
-
if (
|
|
26140
|
-
const H =
|
|
26141
|
-
if (
|
|
26142
|
-
const ge = B(
|
|
26140
|
+
if (!F) return !0;
|
|
26141
|
+
const H = F.propsForm || F.propsTable || F.propsWizard || F.props || {}, U = (Ce = F.logic || H.logic) == null ? void 0 : Ce.visibleRule, te = J ? L(J) : $.value;
|
|
26142
|
+
if (U != null) {
|
|
26143
|
+
const ge = B(U, te, "VISIBLE-SEC");
|
|
26143
26144
|
return !!(typeof ge == "object" ? ne(ge, te, "VISIBLE-SEC") : ge);
|
|
26144
26145
|
}
|
|
26145
|
-
if (
|
|
26146
|
-
const be = H.fields ||
|
|
26146
|
+
if (F.type === "TABLE" && ((Ae = H.headers) != null && Ae.length)) return !0;
|
|
26147
|
+
const be = H.fields || F.fields || [];
|
|
26147
26148
|
return be.length === 0 || be.some((ge) => R(ge, J));
|
|
26148
26149
|
}, ye = () => {
|
|
26149
|
-
var
|
|
26150
|
-
if ((
|
|
26150
|
+
var F;
|
|
26151
|
+
if ((F = d.value) != null && F.sections)
|
|
26151
26152
|
for (let J = 0; J < 3; J++) {
|
|
26152
26153
|
let H = !1;
|
|
26153
|
-
if (d.value.sections.forEach((
|
|
26154
|
+
if (d.value.sections.forEach((U) => {
|
|
26154
26155
|
var te;
|
|
26155
|
-
(((te =
|
|
26156
|
+
(((te = U.propsForm) == null ? void 0 : te.fields) || U.fields || []).forEach((be) => {
|
|
26156
26157
|
var Ae;
|
|
26157
26158
|
const Ce = (Ae = be.logic) == null ? void 0 : Ae.calculateRule;
|
|
26158
26159
|
if (Ce && typeof Ce == "object") {
|
|
26159
|
-
const ge = Object.keys(Ce)[0], Pe = ne(Ce[ge],
|
|
26160
|
+
const ge = Object.keys(Ce)[0], Pe = ne(Ce[ge], $.value, `CALC-${ge}`);
|
|
26160
26161
|
Pe !== void 0 && m[ge] !== Pe && (m[ge] = Pe, H = !0);
|
|
26161
26162
|
}
|
|
26162
26163
|
});
|
|
@@ -26166,86 +26167,86 @@ function dE(e, t) {
|
|
|
26166
26167
|
var J;
|
|
26167
26168
|
if (!((J = d.value) != null && J.sections)) return !1;
|
|
26168
26169
|
if (Object.keys(w).length > 0) return !0;
|
|
26169
|
-
const
|
|
26170
|
+
const F = (H) => H.some((U) => R(U) && q(U) && (Array.isArray(m[U.model]) ? m[U.model].length === 0 : m[U.model] == null || m[U.model] === ""));
|
|
26170
26171
|
return d.value.sections.some((H) => {
|
|
26171
|
-
var
|
|
26172
|
-
return
|
|
26172
|
+
var U;
|
|
26173
|
+
return F(((U = H.propsForm) == null ? void 0 : U.fields) || H.fields || []) ? !0 : H.type === "WIZARD" ? M(H).some((te) => F(te.sections.flatMap((be) => be.fields || []))) : !1;
|
|
26173
26174
|
});
|
|
26174
|
-
}), Le = (
|
|
26175
|
-
const
|
|
26176
|
-
let te =
|
|
26177
|
-
for (let be = 0; be <
|
|
26178
|
-
te[
|
|
26179
|
-
}, De = (
|
|
26180
|
-
const J = an(
|
|
26175
|
+
}), Le = (F, J) => J ? J.split(".").reduce((H, U) => H == null ? void 0 : H[U], F) : void 0, Ne = (F, J, H) => {
|
|
26176
|
+
const U = J.split(".");
|
|
26177
|
+
let te = F;
|
|
26178
|
+
for (let be = 0; be < U.length - 1; be++) te = te[U[be]] = te[U[be]] || {};
|
|
26179
|
+
te[U[U.length - 1]] = H;
|
|
26180
|
+
}, De = (F) => {
|
|
26181
|
+
const J = an(F);
|
|
26181
26182
|
if (Array.isArray(J)) return J.map((H) => De(H));
|
|
26182
26183
|
if (J && typeof J == "object") {
|
|
26183
26184
|
const H = {};
|
|
26184
|
-
return Object.keys(J).forEach((
|
|
26185
|
+
return Object.keys(J).forEach((U) => H[U] = De(J[U])), H;
|
|
26185
26186
|
}
|
|
26186
26187
|
return J;
|
|
26187
26188
|
}, oe = () => {
|
|
26188
26189
|
var H;
|
|
26189
26190
|
if (!((H = d.value) != null && H.sections)) return { ...m };
|
|
26190
|
-
const
|
|
26191
|
-
return d.value.sections.forEach((
|
|
26191
|
+
const F = {}, J = /* @__PURE__ */ new Set();
|
|
26192
|
+
return d.value.sections.forEach((U) => {
|
|
26192
26193
|
var Ce, Ae;
|
|
26193
|
-
if (!Q(
|
|
26194
|
-
const te = S(
|
|
26194
|
+
if (!Q(U)) return;
|
|
26195
|
+
const te = S(U), be = (ge, Pe) => {
|
|
26195
26196
|
if (R(ge) && ge.model) {
|
|
26196
26197
|
const tt = Le(m, Pe ? `${Pe}.${ge.model}` : ge.model) ?? m[ge.model];
|
|
26197
|
-
|
|
26198
|
+
F[ge.model] = De(tt) ?? null, J.add(ge.model);
|
|
26198
26199
|
}
|
|
26199
26200
|
};
|
|
26200
|
-
if ((((Ce =
|
|
26201
|
+
if ((((Ce = U.propsForm) == null ? void 0 : Ce.fields) || U.fields || []).forEach((ge) => {
|
|
26201
26202
|
var Pe;
|
|
26202
|
-
return be(ge, te || ((Pe =
|
|
26203
|
-
}),
|
|
26204
|
-
const ge =
|
|
26205
|
-
|
|
26203
|
+
return be(ge, te || ((Pe = U.propsForm) == null ? void 0 : Pe.key));
|
|
26204
|
+
}), U.type === "WIZARD" && M(U).forEach((ge) => ge.sections.forEach((Pe) => (Pe.fields || []).forEach((tt) => be(tt, ge.key)))), (Ae = U.propsTable) != null && Ae.modelDatatable) {
|
|
26205
|
+
const ge = U.propsTable.modelDatatable;
|
|
26206
|
+
F[ge] = De(Le(m, te ? `${te}.${ge}` : ge) ?? m[ge]), J.add(ge);
|
|
26206
26207
|
}
|
|
26207
|
-
}), ["id", "_id"].forEach((
|
|
26208
|
-
m[
|
|
26209
|
-
}),
|
|
26210
|
-
}, V = (
|
|
26211
|
-
const H = (
|
|
26212
|
-
|
|
26213
|
-
const Ce =
|
|
26208
|
+
}), ["id", "_id"].forEach((U) => {
|
|
26209
|
+
m[U] !== void 0 && !J.has(U) && (F[U] = De(m[U]));
|
|
26210
|
+
}), F;
|
|
26211
|
+
}, V = (F, J) => {
|
|
26212
|
+
const H = (F == null ? void 0 : F.data) !== void 0 ? F.data : F, U = Array.isArray(H) ? H[0] : H;
|
|
26213
|
+
U && Object.entries(J).forEach(([te, be]) => {
|
|
26214
|
+
const Ce = U[be] ?? U[te];
|
|
26214
26215
|
Ce !== void 0 && Ne(m, te, Ce);
|
|
26215
26216
|
});
|
|
26216
26217
|
}, se = () => {
|
|
26217
26218
|
var H;
|
|
26218
|
-
const
|
|
26219
|
-
|
|
26219
|
+
const F = [], J = (U) => {
|
|
26220
|
+
U == null || U.forEach((te) => {
|
|
26220
26221
|
var Ce;
|
|
26221
26222
|
if (te.type === "TABLE" || te.propsTable) {
|
|
26222
26223
|
const Ae = te.propsTable || te;
|
|
26223
|
-
Ae.modelDatatable &&
|
|
26224
|
+
Ae.modelDatatable && F.push({ key: Ae.modelDatatable, subFields: (Ae.headers || []).map((ge) => ge.key) });
|
|
26224
26225
|
}
|
|
26225
26226
|
(((Ce = te.propsForm) == null ? void 0 : Ce.fields) || te.fields || []).forEach((Ae) => {
|
|
26226
26227
|
var Pe, tt;
|
|
26227
26228
|
const ge = ["DCodeDynamicUploadList", "DCodeUploadList", "DCodeDataTable", "DCodeDynamicFormList"].includes(Ae.component);
|
|
26228
26229
|
if (Ae.model && ((Pe = Ae.props) != null && Pe.multiple || ((tt = Ae.props) == null ? void 0 : tt.valueType) === "array" || ge)) {
|
|
26229
26230
|
const bt = Ae.component.includes("Upload") ? ["id", "filename", "document", "typeDocument", "idDocumentType"] : ["id"];
|
|
26230
|
-
|
|
26231
|
+
F.push({ key: Ae.model, subFields: bt });
|
|
26231
26232
|
}
|
|
26232
26233
|
}), te.type === "WIZARD" && M(te).forEach((Ae) => J(Ae.sections));
|
|
26233
26234
|
});
|
|
26234
26235
|
};
|
|
26235
|
-
return J((H = d.value) == null ? void 0 : H.sections),
|
|
26236
|
-
}, me = (
|
|
26237
|
-
const H = {},
|
|
26236
|
+
return J((H = d.value) == null ? void 0 : H.sections), F;
|
|
26237
|
+
}, me = (F, J) => {
|
|
26238
|
+
const H = {}, U = (te) => te && typeof te == "object" ? te._isLogicValue ? te.id : te.id ?? te.code ?? te.value ?? te : te;
|
|
26238
26239
|
return Object.entries(J).forEach(([te, be]) => {
|
|
26239
26240
|
if (typeof be == "string") {
|
|
26240
|
-
const Ce =
|
|
26241
|
-
Ce !== void 0 && (H[be] =
|
|
26241
|
+
const Ce = F[te] ?? Le(m, te) ?? m[te];
|
|
26242
|
+
Ce !== void 0 && (H[be] = U(Ce));
|
|
26242
26243
|
} else if (Array.isArray(be) && be[0]) {
|
|
26243
26244
|
const Ce = be[0], Ae = Object.keys(Ce);
|
|
26244
|
-
let ge =
|
|
26245
|
+
let ge = F[te] ?? Le(m, te) ?? m[te];
|
|
26245
26246
|
if (!Array.isArray(ge) || ge.length === 0) {
|
|
26246
26247
|
const Pe = se().find((tt) => Ae.some((bt) => tt.subFields.includes(bt)));
|
|
26247
26248
|
if (Pe) {
|
|
26248
|
-
const tt =
|
|
26249
|
+
const tt = F[Pe.key] ?? Le(m, Pe.key) ?? m[Pe.key];
|
|
26249
26250
|
Array.isArray(tt) && tt.length > 0 && (ge = tt);
|
|
26250
26251
|
}
|
|
26251
26252
|
}
|
|
@@ -26253,31 +26254,31 @@ function dE(e, t) {
|
|
|
26253
26254
|
const bt = {}, wt = De(Pe);
|
|
26254
26255
|
return Object.entries(Ce).forEach(([ut, Ft]) => {
|
|
26255
26256
|
const $t = wt[ut] ?? wt[Ft] ?? Pe[ut] ?? Pe[Ft] ?? null;
|
|
26256
|
-
bt[Ft] =
|
|
26257
|
+
bt[Ft] = U($t);
|
|
26257
26258
|
}), bt;
|
|
26258
26259
|
}));
|
|
26259
26260
|
}
|
|
26260
26261
|
}), console.log("[DynamicForm][MAPPING-RESULT]", H), H;
|
|
26261
|
-
}, $e = (
|
|
26262
|
-
var J, H,
|
|
26263
|
-
|
|
26262
|
+
}, $e = (F) => {
|
|
26263
|
+
var J, H, U, te;
|
|
26264
|
+
F.requireConfirm ? (D.title = o.value === "id" ? ((J = F.propCustomMessage) == null ? void 0 : J.titleID) || "Konfirmasi" : ((H = F.propCustomMessage) == null ? void 0 : H.titleEN) || "Confirm", D.message = o.value === "id" ? ((U = F.propCustomMessage) == null ? void 0 : U.messageID) || "Lanjutkan?" : ((te = F.propCustomMessage) == null ? void 0 : te.messageEN) || "Continue?", D.action = F, D.visible = !0) : Ye(F);
|
|
26264
26265
|
}, Qe = () => {
|
|
26265
26266
|
D.visible = !1, D.action && Ye(D.action);
|
|
26266
|
-
}, Ye = async (
|
|
26267
|
+
}, Ye = async (F) => {
|
|
26267
26268
|
var te, be;
|
|
26268
|
-
const J =
|
|
26269
|
-
t("action",
|
|
26270
|
-
const
|
|
26271
|
-
if ((J.type === "SUBMIT" || J.type === "ACTION") && (
|
|
26272
|
-
const Ce = rt.loading(o.value === "id" ? "Memproses..." : "Processing..."), Ae = f(
|
|
26269
|
+
const J = F.propsActionGlobal || F.props || {}, H = me(oe(), J.fieldMapping || F.fieldMapping || {});
|
|
26270
|
+
t("action", F, H);
|
|
26271
|
+
const U = J.endpointPropAction || F.endpointPropAction || J.endpoint || F.endpoint;
|
|
26272
|
+
if ((J.type === "SUBMIT" || J.type === "ACTION") && (U != null && U.apiUrl)) {
|
|
26273
|
+
const Ce = rt.loading(o.value === "id" ? "Memproses..." : "Processing..."), Ae = f(U.apiUrl);
|
|
26273
26274
|
try {
|
|
26274
|
-
const ge = await a(Ae,
|
|
26275
|
+
const ge = await a(Ae, U.apiMethod || "POST", H), Pe = (ge == null ? void 0 : ge.status) === !0 || (ge == null ? void 0 : ge.success) === !0, tt = (ge == null ? void 0 : ge.message) || (Pe ? o.value === "id" ? "Sukses" : "Success" : o.value === "id" ? "Gagal" : "Failed");
|
|
26275
26276
|
rt.update(Ce, {
|
|
26276
26277
|
render: tt,
|
|
26277
26278
|
type: Pe ? "success" : "error",
|
|
26278
26279
|
isLoading: !1,
|
|
26279
26280
|
autoClose: Pe ? 3e3 : 5e3
|
|
26280
|
-
}), Pe ? ((J.fieldMapping ||
|
|
26281
|
+
}), Pe ? ((J.fieldMapping || F.fieldMapping) && V(ge, J.fieldMapping || F.fieldMapping), t("success", ge)) : t("error", ge);
|
|
26281
26282
|
} catch (ge) {
|
|
26282
26283
|
const Pe = ((be = (te = ge.response) == null ? void 0 : te.data) == null ? void 0 : be.message) || ge.message || (o.value === "id" ? "Terjadi kesalahan" : "An error occurred");
|
|
26283
26284
|
rt.update(Ce, { render: `Gagal: ${Pe}`, type: "error", isLoading: !1, autoClose: 5e3 }), t("error", ge);
|
|
@@ -26286,129 +26287,129 @@ function dE(e, t) {
|
|
|
26286
26287
|
J.keyRedirect && J.route && i && i.push(J.route);
|
|
26287
26288
|
}, at = () => {
|
|
26288
26289
|
var J, H;
|
|
26289
|
-
let
|
|
26290
|
-
return (H = (J = d.value) == null ? void 0 : J.sections) == null || H.forEach((
|
|
26290
|
+
let F = !0;
|
|
26291
|
+
return (H = (J = d.value) == null ? void 0 : J.sections) == null || H.forEach((U) => {
|
|
26291
26292
|
var te;
|
|
26292
|
-
Q(
|
|
26293
|
+
Q(U) && (((te = U.propsForm) == null ? void 0 : te.fields) || U.fields || []).forEach((be) => {
|
|
26293
26294
|
if (R(be)) {
|
|
26294
26295
|
const Ce = A(be, m[be.model]);
|
|
26295
|
-
Ce && (w[be.model] = Ce,
|
|
26296
|
+
Ce && (w[be.model] = Ce, F = !1);
|
|
26296
26297
|
}
|
|
26297
26298
|
});
|
|
26298
|
-
}),
|
|
26299
|
+
}), F;
|
|
26299
26300
|
}, lt = async () => {
|
|
26300
|
-
var
|
|
26301
|
+
var F, J;
|
|
26301
26302
|
if (at()) {
|
|
26302
26303
|
l.value = !0;
|
|
26303
26304
|
try {
|
|
26304
|
-
const H = oe(),
|
|
26305
|
+
const H = oe(), U = (((F = d.value) == null ? void 0 : F.actions) || []).find((be) => {
|
|
26305
26306
|
var Ce;
|
|
26306
26307
|
return be.type === "SUBMIT" || be.key === "SUBMIT" || ((Ce = be.propsActionGlobal) == null ? void 0 : Ce.type) === "SUBMIT";
|
|
26307
|
-
}), te = (
|
|
26308
|
+
}), te = (U == null ? void 0 : U.fieldMapping) || ((J = U == null ? void 0 : U.propsActionGlobal) == null ? void 0 : J.fieldMapping);
|
|
26308
26309
|
t("submit", te ? me(H, te) : H);
|
|
26309
26310
|
} finally {
|
|
26310
26311
|
l.value = !1;
|
|
26311
26312
|
}
|
|
26312
26313
|
}
|
|
26313
|
-
}, yt = () => t("cancel"), et = (
|
|
26314
|
+
}, yt = () => t("cancel"), et = (F, J, H) => {
|
|
26314
26315
|
var be;
|
|
26315
|
-
const
|
|
26316
|
-
Ne(m,
|
|
26317
|
-
const te = (be = P.value.get(
|
|
26316
|
+
const U = H ? `${H}.${F}` : F;
|
|
26317
|
+
Ne(m, U, J);
|
|
26318
|
+
const te = (be = P.value.get(F)) == null ? void 0 : be.field;
|
|
26318
26319
|
if (te) {
|
|
26319
26320
|
const Ce = A(te, J);
|
|
26320
|
-
Ce ? w[
|
|
26321
|
+
Ce ? w[F] = Ce : delete w[F];
|
|
26321
26322
|
}
|
|
26322
26323
|
t("update:model", oe());
|
|
26323
|
-
}, Et = (
|
|
26324
|
-
var H,
|
|
26325
|
-
if ((H =
|
|
26326
|
-
const J = (
|
|
26327
|
-
return (
|
|
26328
|
-
}, Xt = (
|
|
26324
|
+
}, Et = (F) => !F.permission || (e.isEditMode ? F.permission !== "CREATE" : F.permission !== "UPDATE"), It = (F) => {
|
|
26325
|
+
var H, U;
|
|
26326
|
+
if ((H = F.fields) != null && H.length) return F.fields;
|
|
26327
|
+
const J = (F.actionTableGlobal || []).find((te) => te.permission === "CREATE" || (te.key || "").toLowerCase().includes("add"));
|
|
26328
|
+
return (U = J == null ? void 0 : J.fieldActionGlobal) != null && U.length ? J.fieldActionGlobal : (F.headers || []).filter((te) => te.key && te.key !== "no").map((te) => ({ key: te.key, model: te.key, component: "DCodeTextField" }));
|
|
26329
|
+
}, Xt = (F) => {
|
|
26329
26330
|
var J;
|
|
26330
|
-
return !(
|
|
26331
|
-
}, ee = (
|
|
26332
|
-
if (
|
|
26333
|
-
const J = (
|
|
26331
|
+
return !(F != null && F.apiUrl) && !((J = F == null ? void 0 : F.endpointTable) != null && J.apiUrl);
|
|
26332
|
+
}, ee = (F) => {
|
|
26333
|
+
if (!F) return !1;
|
|
26334
|
+
const J = (F.key || "").toLowerCase(), H = (F.permission || "").toUpperCase();
|
|
26334
26335
|
return J === "detail" || J.includes("view") || H === "VIEW";
|
|
26335
|
-
}, _e = (
|
|
26336
|
-
On.value = { propsTable:
|
|
26336
|
+
}, _e = (F) => Array.isArray(m[F.modelDatatable]) ? m[F.modelDatatable] : [], Re = Y(!1), ot = Y(""), He = Y("Plus"), fe = Y([]), ve = Rt({}), Se = Rt({}), ze = Y(""), mt = Y(null), Ht = Y(!1), On = Y(null), Bs = Y(!1), Rs = (F, J) => {
|
|
26337
|
+
On.value = { propsTable: F, row: J }, Bs.value = !0;
|
|
26337
26338
|
}, Go = () => {
|
|
26338
26339
|
if (!On.value) return;
|
|
26339
|
-
const { propsTable:
|
|
26340
|
+
const { propsTable: F, row: J } = On.value;
|
|
26340
26341
|
Bs.value = !1;
|
|
26341
|
-
const H = m[
|
|
26342
|
+
const H = m[F.modelDatatable];
|
|
26342
26343
|
if (Array.isArray(H)) {
|
|
26343
|
-
const
|
|
26344
|
-
if (
|
|
26344
|
+
const U = H.indexOf(J);
|
|
26345
|
+
if (U !== -1) H.splice(U, 1);
|
|
26345
26346
|
else {
|
|
26346
26347
|
const te = JSON.stringify(J, (Ce, Ae) => ["no", "_index"].includes(Ce) ? void 0 : Ae), be = H.findIndex((Ce) => JSON.stringify(Ce, (Ae, ge) => ["no", "_index"].includes(Ae) ? void 0 : ge) === te);
|
|
26347
26348
|
be !== -1 && H.splice(be, 1);
|
|
26348
26349
|
}
|
|
26349
26350
|
t("update:model", oe());
|
|
26350
26351
|
}
|
|
26351
|
-
}, Lt = (
|
|
26352
|
-
ve[
|
|
26353
|
-
const H = fe.value.find((
|
|
26352
|
+
}, Lt = (F, J) => {
|
|
26353
|
+
ve[F] = J;
|
|
26354
|
+
const H = fe.value.find((U) => U.model === F);
|
|
26354
26355
|
if (H) {
|
|
26355
|
-
const
|
|
26356
|
-
|
|
26357
|
-
}
|
|
26358
|
-
}, ao = (
|
|
26359
|
-
ze.value =
|
|
26360
|
-
const
|
|
26361
|
-
fe.value =
|
|
26362
|
-
}, Fs = (
|
|
26363
|
-
const { action: H, row:
|
|
26356
|
+
const U = A(H, J);
|
|
26357
|
+
U ? Se[F] = U : delete Se[F];
|
|
26358
|
+
}
|
|
26359
|
+
}, ao = (F, J, H) => {
|
|
26360
|
+
ze.value = F.modelDatatable || "", Ht.value = ee(J), mt.value = null, ot.value = o.value === "id" ? J.labelID || "Tambah Data" : J.labelEN || "Add Data", He.value = J.icon || "Plus";
|
|
26361
|
+
const U = It(F);
|
|
26362
|
+
fe.value = U, Object.keys(ve).forEach((te) => delete ve[te]), Object.keys(Se).forEach((te) => delete Se[te]), U.forEach((te) => ve[te.model] = H ? H[te.model] ?? null : null), Re.value = !0;
|
|
26363
|
+
}, Fs = (F, J) => {
|
|
26364
|
+
const { action: H, row: U } = J;
|
|
26364
26365
|
if (/delete|trash/i.test(H)) {
|
|
26365
|
-
const ge = m[
|
|
26366
|
+
const ge = m[F.modelDatatable];
|
|
26366
26367
|
if (Array.isArray(ge)) {
|
|
26367
|
-
const Pe = ge.indexOf(
|
|
26368
|
+
const Pe = ge.indexOf(U);
|
|
26368
26369
|
if (Pe !== -1) ge.splice(Pe, 1);
|
|
26369
26370
|
else {
|
|
26370
|
-
const tt = JSON.stringify(
|
|
26371
|
+
const tt = JSON.stringify(U, (wt, ut) => ["no", "_index"].includes(wt) ? void 0 : ut), bt = ge.findIndex((wt) => JSON.stringify(wt, (ut, Ft) => ["no", "_index"].includes(ut) ? void 0 : Ft) === tt);
|
|
26371
26372
|
bt !== -1 && ge.splice(bt, 1);
|
|
26372
26373
|
}
|
|
26373
26374
|
}
|
|
26374
26375
|
return;
|
|
26375
26376
|
}
|
|
26376
26377
|
if (/detail|view/i.test(H)) {
|
|
26377
|
-
ao(
|
|
26378
|
+
ao(F, { key: "detail", permission: "VIEW" }, U);
|
|
26378
26379
|
return;
|
|
26379
26380
|
}
|
|
26380
|
-
const te =
|
|
26381
|
+
const te = F.modelDatatable || "";
|
|
26381
26382
|
ze.value = te, Ht.value = !1, ot.value = o.value === "id" ? "Ubah Data" : "Edit Data", He.value = "SquarePen";
|
|
26382
26383
|
const be = m[te];
|
|
26383
|
-
let Ce = Array.isArray(be) ? be.indexOf(
|
|
26384
|
+
let Ce = Array.isArray(be) ? be.indexOf(U) : -1;
|
|
26384
26385
|
if (Ce === -1 && Array.isArray(be)) {
|
|
26385
|
-
const ge = JSON.stringify(
|
|
26386
|
+
const ge = JSON.stringify(U, (Pe, tt) => ["no", "_index"].includes(Pe) ? void 0 : tt);
|
|
26386
26387
|
Ce = be.findIndex((Pe) => JSON.stringify(Pe, (tt, bt) => ["no", "_index"].includes(tt) ? void 0 : bt) === ge);
|
|
26387
26388
|
}
|
|
26388
26389
|
mt.value = Ce !== -1 ? Ce : null;
|
|
26389
|
-
const Ae = It(
|
|
26390
|
-
fe.value = Ae, Object.keys(ve).forEach((ge) => delete ve[ge]), Ae.forEach((ge) => ve[ge.model] =
|
|
26390
|
+
const Ae = It(F);
|
|
26391
|
+
fe.value = Ae, Object.keys(ve).forEach((ge) => delete ve[ge]), Ae.forEach((ge) => ve[ge.model] = U[ge.model] ?? null), Re.value = !0;
|
|
26391
26392
|
}, qo = () => {
|
|
26392
|
-
let
|
|
26393
|
+
let F = !0;
|
|
26393
26394
|
if (fe.value.forEach((H) => {
|
|
26394
|
-
const
|
|
26395
|
-
|
|
26396
|
-
}),
|
|
26395
|
+
const U = A(H, ve[H.model]);
|
|
26396
|
+
U && (Se[H.model] = U, F = !1);
|
|
26397
|
+
}), !F) return;
|
|
26397
26398
|
const J = ze.value;
|
|
26398
26399
|
J && (m[J] = m[J] || [], mt.value !== null ? m[J].splice(mt.value, 1, { ...ve }) : m[J].push({ ...ve }), Re.value = !1, t("update:model", oe()));
|
|
26399
26400
|
}, fs = /* @__PURE__ */ new Map(), io = /* @__PURE__ */ new Map();
|
|
26400
|
-
return Fe(() => ({ ...m }), (
|
|
26401
|
+
return Fe(() => ({ ...m }), (F) => {
|
|
26401
26402
|
var be;
|
|
26402
26403
|
if (!((be = d.value) != null && be.sections)) return;
|
|
26403
26404
|
ye();
|
|
26404
|
-
const J = L(
|
|
26405
|
+
const J = L(F), H = (Ce) => {
|
|
26405
26406
|
Ce.forEach((Ae) => {
|
|
26406
26407
|
var bt;
|
|
26407
|
-
const ge = S(Ae), Pe = Q(Ae,
|
|
26408
|
+
const ge = S(Ae), Pe = Q(Ae, F);
|
|
26408
26409
|
(((bt = Ae.propsForm) == null ? void 0 : bt.fields) || Ae.fields || []).forEach((wt) => {
|
|
26409
26410
|
const ut = wt.model;
|
|
26410
26411
|
if (!ut) return;
|
|
26411
|
-
const Ft = ge ? `${ge}.${ut}` : ut, $t = Le(m, Ft), In = R(wt,
|
|
26412
|
+
const Ft = ge ? `${ge}.${ut}` : ut, $t = Le(m, Ft), In = R(wt, F) && Pe;
|
|
26412
26413
|
fs.get(ut) === !0 && In === !1 && $t !== null && $t !== void 0 && (console.log(`[DynamicForm][RESET-VISIBLE] ${ut} BEFORE:`, De($t)), Ne(m, Ft, Array.isArray($t) ? [] : null), console.log(`[DynamicForm][RESET-VISIBLE] ${ut} AFTER:`, De(Le(m, Ft)))), fs.set(ut, In);
|
|
26413
26414
|
const Kn = wt.logic;
|
|
26414
26415
|
if (Kn && In) {
|
|
@@ -26417,21 +26418,21 @@ function dE(e, t) {
|
|
|
26417
26418
|
["lengthRule", "optionsFilterRule", "visibleRule"].forEach((T) => {
|
|
26418
26419
|
const N = Kn[T];
|
|
26419
26420
|
if (!N) return;
|
|
26420
|
-
const ce = B(N, J, `${T}-${ut}`),
|
|
26421
|
-
vn[T] =
|
|
26421
|
+
const ce = B(N, J, `${T}-${ut}`), j = JSON.stringify(ce);
|
|
26422
|
+
vn[T] = j;
|
|
26422
26423
|
const K = io.get(ut);
|
|
26423
|
-
K && K[T] !== void 0 && K[T] !==
|
|
26424
|
+
K && K[T] !== void 0 && K[T] !== j && (Ln = !0);
|
|
26424
26425
|
}), Ln && $t !== null && $t !== void 0 && (console.log(`[DynamicForm][RESET-LOGIC] ${ut} due to rule change | BEFORE:`, De($t)), Ne(m, Ft, Array.isArray($t) ? [] : null), console.log(`[DynamicForm][RESET-LOGIC] ${ut} AFTER:`, De(Le(m, Ft)))), io.set(ut, vn);
|
|
26425
26426
|
}
|
|
26426
26427
|
}), Ae.type === "WIZARD" && M(Ae).forEach((wt) => H(wt.sections));
|
|
26427
26428
|
});
|
|
26428
26429
|
};
|
|
26429
26430
|
H(d.value.sections);
|
|
26430
|
-
const
|
|
26431
|
-
te !== r && (r = te, console.log("[DynamicForm] Emitting update:model:",
|
|
26432
|
-
}, { deep: !0, immediate: !0 }), Fe(() => e.model, (
|
|
26433
|
-
|
|
26434
|
-
m[H] =
|
|
26431
|
+
const U = oe() || {}, te = JSON.stringify(U);
|
|
26432
|
+
te !== r && (r = te, console.log("[DynamicForm] Emitting update:model:", U), t("update:model", U));
|
|
26433
|
+
}, { deep: !0, immediate: !0 }), Fe(() => e.model, (F) => {
|
|
26434
|
+
F && Object.keys(F).length > 0 ? JSON.stringify(F) !== r && (console.log("[DynamicForm] Received new model data:", F), Object.keys(F).forEach((H) => {
|
|
26435
|
+
m[H] = F[H];
|
|
26435
26436
|
}), console.log("[DynamicForm] Updated formData:", { ...m })) : console.log("[DynamicForm] Received empty or null model data");
|
|
26436
26437
|
}, { immediate: !0, deep: !0 }), {
|
|
26437
26438
|
t: n,
|
|
@@ -26460,7 +26461,7 @@ function dE(e, t) {
|
|
|
26460
26461
|
fieldMap: P,
|
|
26461
26462
|
resolveValueIdentifier: I,
|
|
26462
26463
|
getNormalizedData: L,
|
|
26463
|
-
normalizedData:
|
|
26464
|
+
normalizedData: $,
|
|
26464
26465
|
resolveActiveRule: B,
|
|
26465
26466
|
evaluateLogic: ne,
|
|
26466
26467
|
rawItemsCache: X,
|
|
@@ -26662,7 +26663,7 @@ const uE = { key: 0 }, fE = ["value", "name"], hE = {
|
|
|
26662
26663
|
name: e.field.model
|
|
26663
26664
|
}, null, 8, fE)
|
|
26664
26665
|
])) : e.viewOnly ? (p(), k("div", hE, [
|
|
26665
|
-
v("span", pE,
|
|
26666
|
+
v("span", pE, W(d.value), 1),
|
|
26666
26667
|
l.value ? (p(), k(we, { key: 0 }, [
|
|
26667
26668
|
u.value ? (p(), k("img", {
|
|
26668
26669
|
key: 0,
|
|
@@ -26673,14 +26674,14 @@ const uE = { key: 0 }, fE = ["value", "name"], hE = {
|
|
|
26673
26674
|
], 64)) : c.value ? (p(), k("span", {
|
|
26674
26675
|
key: 1,
|
|
26675
26676
|
class: ue(["inline-flex items-center gap-1 text-sm font-medium", u.value ? "text-green-600 dark:text-green-400" : "text-neutral-400"])
|
|
26676
|
-
},
|
|
26677
|
+
}, W(u.value ? "✓ Ya" : "✗ Tidak"), 3)) : (p(), k("span", bE, W(u.value || "-"), 1))
|
|
26677
26678
|
])) : r.value ? (p(), pe(_t(r.value), Ke({ key: 2 }, m.value, {
|
|
26678
26679
|
modelValue: a.value,
|
|
26679
26680
|
"onUpdate:modelValue": [
|
|
26680
26681
|
g[0] || (g[0] = (E) => a.value = E),
|
|
26681
26682
|
w
|
|
26682
26683
|
]
|
|
26683
|
-
}), null, 16, ["modelValue"])) : (p(), k("div", yE, " Unknown field: " +
|
|
26684
|
+
}), null, 16, ["modelValue"])) : (p(), k("div", yE, " Unknown field: " + W(e.field.component), 1));
|
|
26684
26685
|
}
|
|
26685
26686
|
}), vE = { class: "rounded-xl border border-neutral-200 dark:border-neutral-700 bg-white dark:bg-zinc-900 overflow-hidden" }, xE = {
|
|
26686
26687
|
key: 0,
|
|
@@ -26721,16 +26722,16 @@ const uE = { key: 0 }, fE = ["value", "name"], hE = {
|
|
|
26721
26722
|
return p(), k("div", vE, [
|
|
26722
26723
|
((y = e.section.type) == null ? void 0 : y.toUpperCase()) !== "TABLE" ? (p(), k("div", xE, [
|
|
26723
26724
|
C(n)(e.section).title ? (p(), k("div", wE, [
|
|
26724
|
-
v("h3", kE,
|
|
26725
|
+
v("h3", kE, W(C(n)(e.section).title), 1)
|
|
26725
26726
|
])) : z("", !0),
|
|
26726
26727
|
v("div", _E, [
|
|
26727
26728
|
(b = e.section.propsForm.actionSection) != null && b.length ? (p(!0), k(we, { key: 0 }, Ve(e.section.propsForm.actionSection, (A, P) => {
|
|
26728
|
-
var I, L,
|
|
26729
|
+
var I, L, $, B, ne, X, Z;
|
|
26729
26730
|
return p(), k(we, { key: P }, [
|
|
26730
26731
|
C(s)(A) ? (p(), pe(gt, {
|
|
26731
26732
|
key: 0,
|
|
26732
26733
|
icon: A.icon || ((I = A.propsActionGlobal) == null ? void 0 : I.icon),
|
|
26733
|
-
text: C(a) === "id" ? A.labelID || ((L = A.propsActionGlobal) == null ? void 0 : L.labelID) : A.labelEN || ((
|
|
26734
|
+
text: C(a) === "id" ? A.labelID || ((L = A.propsActionGlobal) == null ? void 0 : L.labelID) : A.labelEN || (($ = A.propsActionGlobal) == null ? void 0 : $.labelEN),
|
|
26734
26735
|
"bg-color": ((ne = A.bgColor || ((B = A.propsActionGlobal) == null ? void 0 : B.bgColor)) == null ? void 0 : ne.toLowerCase()) || "primary",
|
|
26735
26736
|
variant: ((Z = A.variant || ((X = A.propsActionGlobal) == null ? void 0 : X.variant)) == null ? void 0 : Z.toLowerCase()) || "outline",
|
|
26736
26737
|
size: "sm",
|
|
@@ -26980,15 +26981,15 @@ const uE = { key: 0 }, fE = ["value", "name"], hE = {
|
|
|
26980
26981
|
Ve(C(n)(e.section), (I) => ({
|
|
26981
26982
|
name: `tab-${I.key}`,
|
|
26982
26983
|
fn: re(() => {
|
|
26983
|
-
var L,
|
|
26984
|
+
var L, $;
|
|
26984
26985
|
return [
|
|
26985
26986
|
v("div", OE, [
|
|
26986
26987
|
I.title || (L = I.actions) != null && L.length ? (p(), k("div", IE, [
|
|
26987
26988
|
v("div", null, [
|
|
26988
|
-
I.title ? (p(), k("h4", LE,
|
|
26989
|
-
I.description ? (p(), k("p", BE,
|
|
26989
|
+
I.title ? (p(), k("h4", LE, W(I.title), 1)) : z("", !0),
|
|
26990
|
+
I.description ? (p(), k("p", BE, W(I.description), 1)) : z("", !0)
|
|
26990
26991
|
]),
|
|
26991
|
-
(
|
|
26992
|
+
($ = I.actions) != null && $.length ? (p(), k("div", RE, [
|
|
26992
26993
|
(p(!0), k(we, null, Ve(I.actions, (B, ne) => {
|
|
26993
26994
|
var X, Z, ae, de, R, q, le;
|
|
26994
26995
|
return p(), k(we, { key: ne }, [
|
|
@@ -27045,7 +27046,7 @@ const uE = { key: 0 }, fE = ["value", "name"], hE = {
|
|
|
27045
27046
|
"show-pagination": ((ae = B.propsDataTableWizard || B.propsTable) == null ? void 0 : ae.pagination) ?? !0,
|
|
27046
27047
|
onAction: (de) => C(y)(B.propsDataTableWizard || B.propsTable, de)
|
|
27047
27048
|
}, null, 8, ["table-config", "data", "show-pagination", "onAction"])
|
|
27048
|
-
])) : (p(), k("div", $E, " Unknown section type: " +
|
|
27049
|
+
])) : (p(), k("div", $E, " Unknown section type: " + W(B.type), 1))
|
|
27049
27050
|
], 64)) : z("", !0)
|
|
27050
27051
|
], 64);
|
|
27051
27052
|
}), 128))
|
|
@@ -27107,7 +27108,7 @@ const uE = { key: 0 }, fE = ["value", "name"], hE = {
|
|
|
27107
27108
|
}, null, 8, ["text", "onClick"])
|
|
27108
27109
|
]),
|
|
27109
27110
|
default: re(() => [
|
|
27110
|
-
v("div", VE,
|
|
27111
|
+
v("div", VE, W(C(n).message), 1)
|
|
27111
27112
|
]),
|
|
27112
27113
|
_: 1
|
|
27113
27114
|
}, 8, ["modelValue", "title"]),
|
|
@@ -27178,7 +27179,7 @@ const uE = { key: 0 }, fE = ["value", "name"], hE = {
|
|
|
27178
27179
|
}, null, 8, ["text", "onClick"])
|
|
27179
27180
|
]),
|
|
27180
27181
|
default: re(() => [
|
|
27181
|
-
v("div", jE,
|
|
27182
|
+
v("div", jE, W(C(S) === "id" ? "Apakah Anda yakin ingin menghapus data ini? Tindakan ini tidak dapat dibatalkan." : "Are you sure you want to delete this row? This action cannot be undone."), 1)
|
|
27182
27183
|
]),
|
|
27183
27184
|
_: 1
|
|
27184
27185
|
}, 8, ["modelValue", "title"])
|
|
@@ -27295,7 +27296,7 @@ const uE = { key: 0 }, fE = ["value", "name"], hE = {
|
|
|
27295
27296
|
]),
|
|
27296
27297
|
"stroke-width": e.strokeWidth
|
|
27297
27298
|
}, null, 8, ["size", "class", "stroke-width"])) : z("", !0),
|
|
27298
|
-
v("span", qE,
|
|
27299
|
+
v("span", qE, W(i.label), 1)
|
|
27299
27300
|
]),
|
|
27300
27301
|
_: 2
|
|
27301
27302
|
}, 1032, ["to", "class"])),
|
|
@@ -27376,8 +27377,8 @@ const KE = { class: "w-full space-y-6 animate-pulse" }, YE = { class: "p-4 grid
|
|
|
27376
27377
|
},
|
|
27377
27378
|
emits: ["submit-success", "cancel", "action-success", "update:model"],
|
|
27378
27379
|
setup(e, { emit: t }) {
|
|
27379
|
-
var L,
|
|
27380
|
-
const n = e, s = t, o = (
|
|
27380
|
+
var L, $, B, ne, X, Z, ae, de;
|
|
27381
|
+
const n = e, s = t, o = ($ = (L = xo()) == null ? void 0 : L.appContext) == null ? void 0 : $.app;
|
|
27381
27382
|
o && !o._context.provides[Symbol.for("vue-router-route-location")] && o.provide(Symbol.for("vue-router-route-location"), {
|
|
27382
27383
|
query: {},
|
|
27383
27384
|
params: {},
|
|
@@ -27617,7 +27618,7 @@ const KE = { class: "w-full space-y-6 animate-pulse" }, YE = { class: "p-4 grid
|
|
|
27617
27618
|
default: re(() => [
|
|
27618
27619
|
!w.value && m.value ? (p(), k("div", eP, [
|
|
27619
27620
|
v("div", tP, [
|
|
27620
|
-
v("p", nP,
|
|
27621
|
+
v("p", nP, W(m.value.description), 1)
|
|
27621
27622
|
]),
|
|
27622
27623
|
G(cf, {
|
|
27623
27624
|
schema: m.value,
|
|
@@ -27633,7 +27634,7 @@ const KE = { class: "w-full space-y-6 animate-pulse" }, YE = { class: "p-4 grid
|
|
|
27633
27634
|
}, null, 8, ["schema", "model", "is-edit-mode", "loading", "selected-token-core"])
|
|
27634
27635
|
])) : w.value ? (p(), k("div", sP, [
|
|
27635
27636
|
G(JE)
|
|
27636
|
-
])) : (p(), k("div", oP, " Failed to load form configuration for " +
|
|
27637
|
+
])) : (p(), k("div", oP, " Failed to load form configuration for " + W(n.layoutCode), 1))
|
|
27637
27638
|
]),
|
|
27638
27639
|
_: 1
|
|
27639
27640
|
})
|
|
@@ -27699,8 +27700,8 @@ const KE = { class: "w-full space-y-6 animate-pulse" }, YE = { class: "p-4 grid
|
|
|
27699
27700
|
const E = async () => {
|
|
27700
27701
|
u.value = !0;
|
|
27701
27702
|
try {
|
|
27702
|
-
const I = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE", L = I ? { Authorization: `Bearer ${I}` } : {},
|
|
27703
|
-
|
|
27703
|
+
const I = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE", L = I ? { Authorization: `Bearer ${I}` } : {}, $ = await a(m.value, "GET", null, L);
|
|
27704
|
+
$.status && (d.value = Array.isArray($.data) ? $.data[0] : $.data, console.log("[DEBUG] AutoLayoutDatatable config loaded:", d.value), g());
|
|
27704
27705
|
} catch (I) {
|
|
27705
27706
|
console.error("Gagal Menampilkan Datatable:", I);
|
|
27706
27707
|
} finally {
|
|
@@ -27711,15 +27712,15 @@ const KE = { class: "w-full space-y-6 animate-pulse" }, YE = { class: "p-4 grid
|
|
|
27711
27712
|
}, S = (I) => {
|
|
27712
27713
|
console.log("[DEBUG] AutoLayoutDatatable handleNavigate:", I);
|
|
27713
27714
|
let L = I.route;
|
|
27714
|
-
const
|
|
27715
|
-
if (!L &&
|
|
27715
|
+
const $ = I.path;
|
|
27716
|
+
if (!L && $) {
|
|
27716
27717
|
const ne = ((i == null ? void 0 : i.path) || "").split("/");
|
|
27717
27718
|
ne.length >= 2 && (L = `/${ne[1]}/create`);
|
|
27718
27719
|
}
|
|
27719
|
-
if (L ||
|
|
27720
|
+
if (L || $) {
|
|
27720
27721
|
const B = {
|
|
27721
27722
|
...I.query || {},
|
|
27722
|
-
code:
|
|
27723
|
+
code: $ || void 0
|
|
27723
27724
|
};
|
|
27724
27725
|
Object.keys(B).forEach((ne) => B[ne] === void 0 && delete B[ne]), console.log("[DEBUG] Emitting navigate to parent:", { route: L, query: B }), s("navigate", { route: L || "/form", query: B }), r && !r.__isFallback && r.push({ path: L || "/form", query: B });
|
|
27725
27726
|
} else
|
|
@@ -27747,7 +27748,7 @@ const KE = { class: "w-full space-y-6 animate-pulse" }, YE = { class: "p-4 grid
|
|
|
27747
27748
|
_: 1
|
|
27748
27749
|
}, 8, ["api-url", "table-config", "permission-base", "dummy-mode", "user-permissions", "permission-checker", "checkPermission"])) : u.value ? (p(), k("div", rP, [...L[1] || (L[1] = [
|
|
27749
27750
|
v("i", { class: "mdi mdi-loading mdi-spin text-4xl text-primary-600" }, null, -1)
|
|
27750
|
-
])])) : (p(), k("div", lP, " Failed to load configuration for " +
|
|
27751
|
+
])])) : (p(), k("div", lP, " Failed to load configuration for " + W(n.layoutCode), 1))
|
|
27751
27752
|
]));
|
|
27752
27753
|
}
|
|
27753
27754
|
}), cP = od(uf), dP = od(ff);
|