@realtek/core-theme 0.0.252 → 0.0.254
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-lib/{Breadcrumb-3IbKxa9n.js → Breadcrumb-BFq5E87_.js} +8 -8
- package/dist-lib/Breadcrumb-BFq5E87_.js.map +1 -0
- package/dist-lib/{Breadcrumb-ObJO1vIZ.cjs → Breadcrumb-CeJ3Xmr0.cjs} +2 -2
- package/dist-lib/Breadcrumb-CeJ3Xmr0.cjs.map +1 -0
- package/dist-lib/index.cjs +5 -5
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +435 -391
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
- package/dist-lib/Breadcrumb-3IbKxa9n.js.map +0 -1
- package/dist-lib/Breadcrumb-ObJO1vIZ.cjs.map +0 -1
package/dist-lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as e, E as t, S as n, T as r, _ as i, a, b as o, c as s, d as c, f as l, g as u, h as d, i as f, l as p, m, n as h, o as g, p as _, r as v, s as y, t as b, u as x, v as S, w as C, x as w, y as T } from "./authApi-CVxnHdIU.js";
|
|
2
|
-
import { $ as E, $n as D, $t as O, A as k, An as A, At as j, B as M, Bn as ee, Bt as N, C as te, Cn as P, Ct as ne, D as re, Dn as ie, Dt as ae, E as oe, En as se, Et as ce, F, Fn as le, Ft as ue, G as de, Gn as fe, Gt as pe, H as me, Hn as he, Ht as ge, I as _e, In as ve, It as ye, J as be, Jn as xe, Jt as Se, K as Ce, Kn as we, Kt as Te, L as Ee, Ln as De, Lt as Oe, M as ke, Mn as Ae, Mt as je, N as Me, Nn as Ne, Nt as Pe, O as Fe, On as Ie, Ot as Le, P as Re, Pn as ze, Pt as Be, Q as Ve, Qn as He, Qt as Ue, R as We, Rn as Ge, Rt as Ke, S as qe, Sn as Je, St as Ye, T as Xe, Tn as Ze, Tt as Qe, U as $e, Un as et, Ut as tt, V as nt, Vn as rt, Vt as it, W as at, Wn as ot, Wt as st, X as ct, Xn as lt, Xt as ut, Y as dt, Yn as ft, Yt as pt, Z as mt, Zn as ht, Zt as gt, _ as _t, _n as vt, _t as yt, a as bt, an as xt, at as St, b as Ct, bn as wt, bt as Tt, c as Et, cn as Dt, ct as Ot, d as kt, dn as At, dt as jt, en as Mt, et as Nt, f as Pt, fn as Ft, ft as It, g as Lt, gn as Rt, gt as zt, h as Bt, hn as Vt, ht as Ht, i as Ut, in as Wt, it as Gt, j as Kt, jn as qt, jt as Jt, k as Yt, kn as Xt, kt as Zt, l as Qt, ln as $t, lt as en, m as tn, mn as nn, mt as rn, n as an, nn as on, nt as sn, o as cn, on as ln, ot as un, p as dn, pn as fn, pt as pn, q as mn, qn as hn, qt as gn, r as _n, rn as vn, rt as yn, s as bn, sn as xn, st as Sn, t as Cn, tn as wn, tt as Tn, u as En, un as Dn, ut as On, v as kn, vn as An, vt as jn, w as Mn, wn as Nn, wt as Pn, x as Fn, xn as In, xt as Ln, y as Rn, yn as zn, yt as Bn, z as Vn, zn as Hn, zt as Un } from "./Breadcrumb-
|
|
2
|
+
import { $ as E, $n as D, $t as O, A as k, An as A, At as j, B as M, Bn as ee, Bt as N, C as te, Cn as P, Ct as ne, D as re, Dn as ie, Dt as ae, E as oe, En as se, Et as ce, F, Fn as le, Ft as ue, G as de, Gn as fe, Gt as pe, H as me, Hn as he, Ht as ge, I as _e, In as ve, It as ye, J as be, Jn as xe, Jt as Se, K as Ce, Kn as we, Kt as Te, L as Ee, Ln as De, Lt as Oe, M as ke, Mn as Ae, Mt as je, N as Me, Nn as Ne, Nt as Pe, O as Fe, On as Ie, Ot as Le, P as Re, Pn as ze, Pt as Be, Q as Ve, Qn as He, Qt as Ue, R as We, Rn as Ge, Rt as Ke, S as qe, Sn as Je, St as Ye, T as Xe, Tn as Ze, Tt as Qe, U as $e, Un as et, Ut as tt, V as nt, Vn as rt, Vt as it, W as at, Wn as ot, Wt as st, X as ct, Xn as lt, Xt as ut, Y as dt, Yn as ft, Yt as pt, Z as mt, Zn as ht, Zt as gt, _ as _t, _n as vt, _t as yt, a as bt, an as xt, at as St, b as Ct, bn as wt, bt as Tt, c as Et, cn as Dt, ct as Ot, d as kt, dn as At, dt as jt, en as Mt, et as Nt, f as Pt, fn as Ft, ft as It, g as Lt, gn as Rt, gt as zt, h as Bt, hn as Vt, ht as Ht, i as Ut, in as Wt, it as Gt, j as Kt, jn as qt, jt as Jt, k as Yt, kn as Xt, kt as Zt, l as Qt, ln as $t, lt as en, m as tn, mn as nn, mt as rn, n as an, nn as on, nt as sn, o as cn, on as ln, ot as un, p as dn, pn as fn, pt as pn, q as mn, qn as hn, qt as gn, r as _n, rn as vn, rt as yn, s as bn, sn as xn, st as Sn, t as Cn, tn as wn, tt as Tn, u as En, un as Dn, ut as On, v as kn, vn as An, vt as jn, w as Mn, wn as Nn, wt as Pn, x as Fn, xn as In, xt as Ln, y as Rn, yn as zn, yt as Bn, z as Vn, zn as Hn, zt as Un } from "./Breadcrumb-BFq5E87_.js";
|
|
3
3
|
import { i as Wn } from "./diceCandidateMapper-BKRGwz7g.js";
|
|
4
4
|
import Gn, { Fragment as Kn, createContext as qn, useCallback as Jn, useContext as Yn, useEffect as I, useMemo as L, useRef as Xn, useState as R } from "react";
|
|
5
5
|
import { Alert as Zn, AutoComplete as Qn, Avatar as $n, Badge as er, Breadcrumb as tr, Button as z, Card as nr, Checkbox as rr, Col as B, Collapse as ir, DatePicker as ar, Divider as or, Drawer as sr, Dropdown as cr, Empty as lr, Flex as ur, Form as V, Input as H, InputNumber as dr, Layout as fr, Mentions as pr, Menu as mr, Modal as hr, Pagination as gr, Popconfirm as _r, Popover as vr, Progress as yr, Radio as br, Result as xr, Row as Sr, Select as U, Space as W, Spin as Cr, Statistic as wr, Steps as Tr, Switch as G, Table as Er, Tabs as Dr, Tag as K, TimePicker as Or, Tooltip as q, Tree as kr, Typography as Ar, Upload as jr, message as J } from "antd";
|
|
@@ -6464,7 +6464,16 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6464
6464
|
open: !1,
|
|
6465
6465
|
docs: [],
|
|
6466
6466
|
index: 0
|
|
6467
|
-
}), [O, k] = R(null), A = Xn([]), j = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", M = e.lookupFilterValueFrom ? Xf(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], ee = e.lookupFilterValueFrom && j ? [...n.slice(0, 2), ...Xf(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], N = V.useWatch(M, t), te = V.useWatch(ee, t), P = hp(te) ? N : te, ne = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], re = V.useWatch(ne, t), ie = e.disabledIf?.field ? Xf(e.disabledIf.field) : ["__noop_disabled_if__"], ae = e.disabledIf?.field && j ? [...n.slice(0, 2), ...Xf(e.disabledIf.field)] : ["__noop_disabled_if_row__"], oe = V.useWatch(ie, t), se = V.useWatch(ae, t), ce = e.disabledIf?.field ? Ut(e.disabledIf, hp(se) ? oe : se) : !1, F = Yn(op), le =
|
|
6467
|
+
}), [O, k] = R(null), A = Xn([]), j = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", M = e.lookupFilterValueFrom ? Xf(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], ee = e.lookupFilterValueFrom && j ? [...n.slice(0, 2), ...Xf(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], N = V.useWatch(M, t), te = V.useWatch(ee, t), P = hp(te) ? N : te, ne = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], re = V.useWatch(ne, t), ie = e.disabledIf?.field ? Xf(e.disabledIf.field) : ["__noop_disabled_if__"], ae = e.disabledIf?.field && j ? [...n.slice(0, 2), ...Xf(e.disabledIf.field)] : ["__noop_disabled_if_row__"], oe = V.useWatch(ie, t), se = V.useWatch(ae, t), ce = e.disabledIf?.field ? Ut(e.disabledIf, hp(se) ? oe : se) : !1, F = Yn(op), le = e.exclusiveInGroup && j ? [n[0]] : ["__noop_exclusive_watch__"], ue = V.useWatch(le, t), de = L(() => {
|
|
6468
|
+
if (!e.exclusiveInGroup || !j || !Array.isArray(ue)) return !1;
|
|
6469
|
+
let t = n[1], r = n[n.length - 1];
|
|
6470
|
+
return ue.some((e, n) => n !== t && qf(e?.[r]));
|
|
6471
|
+
}, [
|
|
6472
|
+
e.exclusiveInGroup,
|
|
6473
|
+
j,
|
|
6474
|
+
ue,
|
|
6475
|
+
n
|
|
6476
|
+
]), fe = p || !!e.disabled || ce || (e.disabledByField ? qf(re) : !1) || !!d || F || de, pe = e.lookupFilterValueFrom ? l[e.lookupFilterValueFrom] : void 0, me = hp(pe) ? P : pe;
|
|
6468
6477
|
I(() => {
|
|
6469
6478
|
if (f === "location") {
|
|
6470
6479
|
let t = !1;
|
|
@@ -6493,7 +6502,7 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6493
6502
|
"radio",
|
|
6494
6503
|
"checkbox"
|
|
6495
6504
|
].includes(f) || !t || t === "static") return;
|
|
6496
|
-
if (t === "lookup" && e.lookupFilterField && hp(
|
|
6505
|
+
if (t === "lookup" && e.lookupFilterField && hp(me)) {
|
|
6497
6506
|
h([]), _(!1);
|
|
6498
6507
|
return;
|
|
6499
6508
|
}
|
|
@@ -6517,7 +6526,7 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6517
6526
|
displayField: e.displayField ?? "",
|
|
6518
6527
|
valueField: e.valueField ?? "_id"
|
|
6519
6528
|
});
|
|
6520
|
-
e.displayField2 && t.set("displayField2", e.displayField2), b && t.set("search", b), e.lookupFilterField && !hp(
|
|
6529
|
+
e.displayField2 && t.set("displayField2", e.displayField2), b && t.set("search", b), e.lookupFilterField && !hp(me) && (t.set("filterField", e.lookupFilterField), t.set("filterValue", String(me))), e.extraFields?.length && t.set("extraFields", e.extraFields.join(","));
|
|
6521
6530
|
let n = await a(o, `/admin/lookup-dropdown-values?${t}`);
|
|
6522
6531
|
i = n?.data ?? n ?? [], e.optionsRequireExtraField && (i = i.filter((t) => t?.extraData?.[e.optionsRequireExtraField] === !0));
|
|
6523
6532
|
} else if (t === "group") {
|
|
@@ -6550,7 +6559,7 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6550
6559
|
e.displayField2,
|
|
6551
6560
|
e.valueField,
|
|
6552
6561
|
e.lookupFilterField,
|
|
6553
|
-
|
|
6562
|
+
me,
|
|
6554
6563
|
e.groupName,
|
|
6555
6564
|
e.masterName,
|
|
6556
6565
|
v,
|
|
@@ -6562,11 +6571,11 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6562
6571
|
w,
|
|
6563
6572
|
e.lookupMinSearchLength
|
|
6564
6573
|
]);
|
|
6565
|
-
let
|
|
6574
|
+
let he = Yf(e.options ?? e.values ?? []), ge = m ?? he, _e = (e.multiSelect ? "multiple" : e.mode ?? (qf(e.multiple) ? "multiple" : void 0)) ?? (nt(e) === "array" ? "multiple" : void 0), ve = ["select", "location"].includes(f), ye = e.hidePlaceholder ? void 0 : e.placeholder ?? `${ve ? "Select" : "Enter"} ${String(e.label ?? "").toLowerCase()}`, be = kp(e), xe = (e) => {
|
|
6566
6575
|
c?.(e), setTimeout(() => {
|
|
6567
6576
|
t.validateFields([n]).catch(() => {});
|
|
6568
6577
|
}, 0);
|
|
6569
|
-
},
|
|
6578
|
+
}, Se = Lt({
|
|
6570
6579
|
field: e,
|
|
6571
6580
|
form: t,
|
|
6572
6581
|
name: n,
|
|
@@ -6576,83 +6585,83 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6576
6585
|
onDone: (t, n) => {
|
|
6577
6586
|
T((e) => e + 1);
|
|
6578
6587
|
let r = nt(e) !== "array" && !e.multiSelect && !e.multiple;
|
|
6579
|
-
t === "create" && n != null && r &&
|
|
6588
|
+
t === "create" && n != null && r && xe(mn(e) ? { value: n } : n);
|
|
6580
6589
|
}
|
|
6581
|
-
}),
|
|
6590
|
+
}), we = e.validator?.type ? {
|
|
6582
6591
|
...e.validator,
|
|
6583
6592
|
title: e.validator.title || e.label || "Field"
|
|
6584
|
-
} : null,
|
|
6585
|
-
...
|
|
6586
|
-
disabled:
|
|
6587
|
-
placeholder:
|
|
6593
|
+
} : null, Te = {
|
|
6594
|
+
...be,
|
|
6595
|
+
disabled: fe,
|
|
6596
|
+
placeholder: ye,
|
|
6588
6597
|
prefix: e.icon ? null : Kf[e.field],
|
|
6589
6598
|
value: i ?? "",
|
|
6590
6599
|
onChange: (t) => {
|
|
6591
6600
|
let n = e.formatter ? Mp(t.target.value, e.formatter) : t.target.value;
|
|
6592
|
-
if (
|
|
6593
|
-
let { cleaned: e, error: t } = Ct(n,
|
|
6601
|
+
if (we) {
|
|
6602
|
+
let { cleaned: e, error: t } = Ct(n, we, "change");
|
|
6594
6603
|
k(t), n = e;
|
|
6595
6604
|
}
|
|
6596
|
-
|
|
6605
|
+
xe(n);
|
|
6597
6606
|
},
|
|
6598
|
-
...
|
|
6607
|
+
...we && {
|
|
6599
6608
|
onBlur: (e) => {
|
|
6600
|
-
let { cleaned: t, error: n } = Ct(e.target.value,
|
|
6601
|
-
k(n), t !== e.target.value &&
|
|
6609
|
+
let { cleaned: t, error: n } = Ct(e.target.value, we, "blur");
|
|
6610
|
+
k(n), t !== e.target.value && xe(t);
|
|
6602
6611
|
},
|
|
6603
6612
|
onKeyPress: (e) => {
|
|
6604
|
-
let t = Fn(
|
|
6613
|
+
let t = Fn(we.type);
|
|
6605
6614
|
if (!t || e.which === 0 || e.keyCode === 8 || e.keyCode === 13) return;
|
|
6606
6615
|
let n = String.fromCharCode(e.which ?? e.keyCode);
|
|
6607
6616
|
if (!t.test(n)) {
|
|
6608
6617
|
e.preventDefault();
|
|
6609
|
-
let t = `${
|
|
6618
|
+
let t = `${we.title} — invalid character.`;
|
|
6610
6619
|
k(t), setTimeout(() => k((e) => e === t ? null : e), 1800);
|
|
6611
6620
|
}
|
|
6612
6621
|
},
|
|
6613
|
-
maxLength:
|
|
6622
|
+
maxLength: we.maxLength ?? be.maxLength
|
|
6614
6623
|
}
|
|
6615
6624
|
};
|
|
6616
6625
|
if (f === "tagify") return /* @__PURE__ */ X(U, {
|
|
6617
6626
|
value: i,
|
|
6618
6627
|
allowClear: !0,
|
|
6619
|
-
disabled:
|
|
6628
|
+
disabled: fe,
|
|
6620
6629
|
mode: "tags",
|
|
6621
|
-
placeholder:
|
|
6622
|
-
onChange:
|
|
6630
|
+
placeholder: ye,
|
|
6631
|
+
onChange: xe
|
|
6623
6632
|
});
|
|
6624
6633
|
if (f === "location") return /* @__PURE__ */ X(U, {
|
|
6625
6634
|
value: i,
|
|
6626
6635
|
allowClear: !0,
|
|
6627
6636
|
showSearch: !0,
|
|
6628
6637
|
filterOption: !1,
|
|
6629
|
-
disabled:
|
|
6638
|
+
disabled: fe,
|
|
6630
6639
|
loading: g,
|
|
6631
|
-
options:
|
|
6632
|
-
placeholder:
|
|
6640
|
+
options: ge,
|
|
6641
|
+
placeholder: ye,
|
|
6633
6642
|
notFoundContent: g ? /* @__PURE__ */ X(Cr, { size: "small" }) : void 0,
|
|
6634
6643
|
onSearch: y,
|
|
6635
6644
|
onFocus: () => y((e) => e),
|
|
6636
|
-
onChange:
|
|
6645
|
+
onChange: xe
|
|
6637
6646
|
});
|
|
6638
6647
|
if (f === "select") {
|
|
6639
6648
|
let r = e.dataSource === "lookup", a = e.dataSource === "master", o = r || a, s = mn(e);
|
|
6640
6649
|
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(U, {
|
|
6641
|
-
value: Ce(e, i,
|
|
6650
|
+
value: Ce(e, i, ge),
|
|
6642
6651
|
labelInValue: s || void 0,
|
|
6643
6652
|
allowClear: !0,
|
|
6644
6653
|
showSearch: e.showSearch !== !1,
|
|
6645
6654
|
optionFilterProp: "label",
|
|
6646
6655
|
filterOption: o ? !1 : void 0,
|
|
6647
|
-
disabled:
|
|
6656
|
+
disabled: fe,
|
|
6648
6657
|
loading: g,
|
|
6649
|
-
mode:
|
|
6650
|
-
options:
|
|
6651
|
-
placeholder:
|
|
6658
|
+
mode: _e,
|
|
6659
|
+
options: ge,
|
|
6660
|
+
placeholder: ye,
|
|
6652
6661
|
notFoundContent: g ? /* @__PURE__ */ X(Cr, { size: "small" }) : void 0,
|
|
6653
6662
|
onSearch: r ? x : a ? C : void 0,
|
|
6654
6663
|
onChange: (r) => {
|
|
6655
|
-
if (
|
|
6664
|
+
if (xe(r), e.autofillFrom?.length) {
|
|
6656
6665
|
let i = r && !Array.isArray(r) && typeof r == "object" ? r.value : r, a = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number";
|
|
6657
6666
|
if (r == null) e.autofillFrom.forEach(({ targetField: e }) => {
|
|
6658
6667
|
let r = a ? [...n.slice(0, 2), ...Xf(e)] : Xf(e);
|
|
@@ -6667,26 +6676,26 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6667
6676
|
}
|
|
6668
6677
|
}
|
|
6669
6678
|
},
|
|
6670
|
-
dropdownRender:
|
|
6671
|
-
}),
|
|
6679
|
+
dropdownRender: Se.footer ? (e) => /* @__PURE__ */ Z(Y, { children: [e, Se.footer] }) : void 0
|
|
6680
|
+
}), Se.modal] });
|
|
6672
6681
|
}
|
|
6673
6682
|
if (f === "radio") return /* @__PURE__ */ X(br.Group, {
|
|
6674
6683
|
value: i,
|
|
6675
|
-
disabled:
|
|
6676
|
-
options:
|
|
6677
|
-
onChange: (e) =>
|
|
6684
|
+
disabled: fe,
|
|
6685
|
+
options: ge,
|
|
6686
|
+
onChange: (e) => xe(e.target.value)
|
|
6678
6687
|
});
|
|
6679
|
-
if (f === "checkbox") return
|
|
6688
|
+
if (f === "checkbox") return ge.length > 0 ? /* @__PURE__ */ X(rr.Group, {
|
|
6680
6689
|
value: i,
|
|
6681
|
-
disabled:
|
|
6682
|
-
options:
|
|
6683
|
-
onChange:
|
|
6690
|
+
disabled: fe,
|
|
6691
|
+
options: ge,
|
|
6692
|
+
onChange: xe
|
|
6684
6693
|
}) : /* @__PURE__ */ X(rr, {
|
|
6685
6694
|
checked: !!(s ?? i),
|
|
6686
|
-
disabled:
|
|
6695
|
+
disabled: fe,
|
|
6687
6696
|
onChange: (r) => {
|
|
6688
6697
|
let i = r.target.checked;
|
|
6689
|
-
if (
|
|
6698
|
+
if (xe(i), e.linkedClearField && i) {
|
|
6690
6699
|
let r = Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.linkedClearField] : [e.linkedClearField];
|
|
6691
6700
|
t.setFieldValue(r, null);
|
|
6692
6701
|
}
|
|
@@ -6695,21 +6704,21 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6695
6704
|
});
|
|
6696
6705
|
if (f === "text-editor") return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(lt, {
|
|
6697
6706
|
value: i ?? t.getFieldValue(n) ?? "",
|
|
6698
|
-
disabled:
|
|
6699
|
-
placeholder:
|
|
6707
|
+
disabled: fe,
|
|
6708
|
+
placeholder: ye,
|
|
6700
6709
|
onChange: (e) => {
|
|
6701
|
-
if (
|
|
6702
|
-
let { error: t } = Ct(e,
|
|
6710
|
+
if (we) {
|
|
6711
|
+
let { error: t } = Ct(e, we, "change");
|
|
6703
6712
|
k(t);
|
|
6704
6713
|
}
|
|
6705
|
-
|
|
6714
|
+
xe(e);
|
|
6706
6715
|
}
|
|
6707
6716
|
}), O && /* @__PURE__ */ X("div", {
|
|
6708
6717
|
className: "v1-input-validator-hint",
|
|
6709
6718
|
children: O
|
|
6710
6719
|
})] });
|
|
6711
6720
|
if (f === "textarea") return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Uf, {
|
|
6712
|
-
...
|
|
6721
|
+
...Te,
|
|
6713
6722
|
rows: e.rows ?? 3,
|
|
6714
6723
|
className: "v1-scroll-textarea"
|
|
6715
6724
|
}), O && /* @__PURE__ */ X("div", {
|
|
@@ -6717,21 +6726,21 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6717
6726
|
children: O
|
|
6718
6727
|
})] });
|
|
6719
6728
|
if (f === "date") return /* @__PURE__ */ X(ar, {
|
|
6720
|
-
disabled:
|
|
6721
|
-
placeholder:
|
|
6729
|
+
disabled: fe,
|
|
6730
|
+
placeholder: ye,
|
|
6722
6731
|
style: { width: "100%" },
|
|
6723
6732
|
suffixIcon: /* @__PURE__ */ X(Wr, {}),
|
|
6724
6733
|
value: i ?? null,
|
|
6725
6734
|
disabledDate: Ap(e, t, n),
|
|
6726
6735
|
defaultPickerValue: jp(e),
|
|
6727
|
-
onChange: (e) =>
|
|
6736
|
+
onChange: (e) => xe(e)
|
|
6728
6737
|
});
|
|
6729
6738
|
if (f === "time") return /* @__PURE__ */ X(Or, {
|
|
6730
|
-
disabled:
|
|
6731
|
-
placeholder:
|
|
6739
|
+
disabled: fe,
|
|
6740
|
+
placeholder: ye,
|
|
6732
6741
|
style: { width: "100%" },
|
|
6733
6742
|
value: i ?? null,
|
|
6734
|
-
onChange: (e) =>
|
|
6743
|
+
onChange: (e) => xe(e)
|
|
6735
6744
|
});
|
|
6736
6745
|
if (f === "file") {
|
|
6737
6746
|
let t = e.validations ?? e.validation ?? e.rules ?? [], n = t.find((e) => (typeof e == "string" ? e : e?.type) === "fileType"), r = t.find((e) => (typeof e == "string" ? e : e?.type) === "fileSize"), a = t.find((e) => (typeof e == "string" ? e : e?.type) === "maxFiles"), o = kn(e), s = o ? o.exts.map((e) => `.${e}`).join(",") : n?.value ? n.value.split(",").map((e) => `.${e.trim().replace(/^\./, "")}`).join(",") : void 0, c = r ? Number(r?.value ?? 5) : void 0, l = a ? Number(a?.value ?? 1) : qf(e.multiple) ? e.maxCount ?? 5 : 1, d = Array.isArray(i) ? i : [], f = d.length < l, p = (e) => e ? e < 1024 * 1024 ? `${(e / 1024).toFixed(0)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB` : "", m = (e) => {
|
|
@@ -6749,7 +6758,7 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6749
6758
|
"webp"
|
|
6750
6759
|
].includes(t) ? /* @__PURE__ */ X(xi, { className: "v1-file-type-icon v1-file-icon-image" }) : /* @__PURE__ */ X(Si, { className: "v1-file-type-icon v1-file-icon-default" });
|
|
6751
6760
|
}, h = (e) => {
|
|
6752
|
-
|
|
6761
|
+
xe(d.filter((t, n) => n !== e));
|
|
6753
6762
|
}, g = (e, t) => {
|
|
6754
6763
|
D({
|
|
6755
6764
|
open: !0,
|
|
@@ -6771,7 +6780,7 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6771
6780
|
return c !== void 0 && e.size / 1024 / 1024 > c ? (J.error(r?.message ?? `File must be smaller than ${c} MB`), jr.LIST_IGNORE) : !1;
|
|
6772
6781
|
}, C = ({ fileList: e }) => {
|
|
6773
6782
|
let t = e.slice(0, l);
|
|
6774
|
-
if (
|
|
6783
|
+
if (xe(t), u && t.length > d.length) {
|
|
6775
6784
|
let e = t[t.length - 1];
|
|
6776
6785
|
e?.originFileObj && u(e.originFileObj);
|
|
6777
6786
|
}
|
|
@@ -6783,7 +6792,7 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6783
6792
|
maxCount: l,
|
|
6784
6793
|
beforeUpload: S,
|
|
6785
6794
|
onChange: C,
|
|
6786
|
-
disabled:
|
|
6795
|
+
disabled: fe
|
|
6787
6796
|
}, T = d.map((e, t) => /* @__PURE__ */ Z("div", {
|
|
6788
6797
|
className: "v1-file-item",
|
|
6789
6798
|
children: [
|
|
@@ -6841,7 +6850,7 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6841
6850
|
display: "block"
|
|
6842
6851
|
},
|
|
6843
6852
|
children: /* @__PURE__ */ Z("div", {
|
|
6844
|
-
className: `v1-upload-dropzone v1-upload-dropzone-center${
|
|
6853
|
+
className: `v1-upload-dropzone v1-upload-dropzone-center${fe ? " v1-upload-dropzone-disabled" : ""}`,
|
|
6845
6854
|
children: [
|
|
6846
6855
|
/* @__PURE__ */ Z("div", {
|
|
6847
6856
|
className: "v1-upload-dropzone-title-row",
|
|
@@ -6892,13 +6901,13 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6892
6901
|
maxCount: 1,
|
|
6893
6902
|
beforeUpload: S,
|
|
6894
6903
|
onChange: C,
|
|
6895
|
-
disabled:
|
|
6904
|
+
disabled: fe,
|
|
6896
6905
|
style: {
|
|
6897
6906
|
width: "100%",
|
|
6898
6907
|
display: "block"
|
|
6899
6908
|
},
|
|
6900
6909
|
children: /* @__PURE__ */ Z("div", {
|
|
6901
|
-
className: `v1-upload-dropzone v1-upload-dropzone-single${
|
|
6910
|
+
className: `v1-upload-dropzone v1-upload-dropzone-single${fe ? " v1-upload-dropzone-disabled" : ""}`,
|
|
6902
6911
|
children: [
|
|
6903
6912
|
/* @__PURE__ */ X(ni, { className: "v1-upload-cloud-icon" }),
|
|
6904
6913
|
/* @__PURE__ */ X("span", {
|
|
@@ -6915,7 +6924,7 @@ function Rp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
|
|
|
6915
6924
|
}), O] });
|
|
6916
6925
|
}
|
|
6917
6926
|
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(H, {
|
|
6918
|
-
...
|
|
6927
|
+
...Te,
|
|
6919
6928
|
type: f === "number" ? "number" : f,
|
|
6920
6929
|
...f === "number" && qf(e.decimal) ? { step: "any" } : {},
|
|
6921
6930
|
...e.suffix ? { suffix: e.suffix } : {}
|
|
@@ -11926,7 +11935,7 @@ function O_(e, t) {
|
|
|
11926
11935
|
return [];
|
|
11927
11936
|
}
|
|
11928
11937
|
function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction: i, onTabChange: s, onHeaderData: c, hideActions: l = !1, defaultTab: u, refreshKey: f = 0 }) {
|
|
11929
|
-
let p = Fa(), m = Pa(), [g, _] = R([]), [v, y] = R([]), [b, x] = R([]), [S, C] = R(!1), [w, T] = R([]), E = n || e;
|
|
11938
|
+
let p = Fa(), m = Pa(), [g, _] = R([]), [v, y] = R([]), [b, x] = R([]), [S, C] = R(!1), [w, T] = R([]), [E, D] = R(0), O = n || e;
|
|
11930
11939
|
I(() => (r && d(r), () => {
|
|
11931
11940
|
r && h();
|
|
11932
11941
|
}), [r]), I(() => {
|
|
@@ -11940,7 +11949,7 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
11940
11949
|
id: t,
|
|
11941
11950
|
view: "detail"
|
|
11942
11951
|
}),
|
|
11943
|
-
Sn(
|
|
11952
|
+
Sn(O).catch(() => ({
|
|
11944
11953
|
actions: [],
|
|
11945
11954
|
actionRules: []
|
|
11946
11955
|
})),
|
|
@@ -11956,70 +11965,71 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
11956
11965
|
};
|
|
11957
11966
|
}, [
|
|
11958
11967
|
e,
|
|
11959
|
-
|
|
11968
|
+
O,
|
|
11960
11969
|
t,
|
|
11961
|
-
f
|
|
11970
|
+
f,
|
|
11971
|
+
E
|
|
11962
11972
|
]);
|
|
11963
|
-
let
|
|
11973
|
+
let k = L(() => hg(O, g), [O, g]);
|
|
11964
11974
|
I(() => {
|
|
11965
|
-
|
|
11966
|
-
}, [
|
|
11967
|
-
let { eyebrow:
|
|
11975
|
+
k && c && c(k);
|
|
11976
|
+
}, [k]);
|
|
11977
|
+
let { eyebrow: A, title: j = "-", status: M, titleIds: ee = [], meta: N = [], ids: te = [], tabs: P = [], stats: ne = [], timestamp: re = null } = k ?? {}, { canAdd: ie, canEdit: ae, canDelete: oe } = $c(e), se = L(() => b_(g, t), [g, t]), ce = jm(P, {
|
|
11968
11978
|
id: t,
|
|
11969
11979
|
moduleName: e,
|
|
11970
|
-
record:
|
|
11971
|
-
}),
|
|
11980
|
+
record: se
|
|
11981
|
+
}), F = mg(O)?.resolveScope, [le, ue] = R(void 0);
|
|
11972
11982
|
I(() => {
|
|
11973
|
-
if (typeof
|
|
11983
|
+
if (typeof F != "function" || !t) return;
|
|
11974
11984
|
let n = !1, r = Number(localStorage.getItem("userId")) || 0;
|
|
11975
|
-
return Promise.resolve().then(() =>
|
|
11985
|
+
return Promise.resolve().then(() => F({
|
|
11976
11986
|
id: t,
|
|
11977
11987
|
moduleName: e,
|
|
11978
|
-
record:
|
|
11988
|
+
record: se,
|
|
11979
11989
|
currentUserId: r
|
|
11980
11990
|
})).then((e) => {
|
|
11981
|
-
n ||
|
|
11991
|
+
n || ue(e ?? null);
|
|
11982
11992
|
}).catch(() => {
|
|
11983
|
-
n ||
|
|
11993
|
+
n || ue(null);
|
|
11984
11994
|
}), () => {
|
|
11985
11995
|
n = !0;
|
|
11986
11996
|
};
|
|
11987
11997
|
}, [
|
|
11988
|
-
|
|
11998
|
+
F,
|
|
11989
11999
|
t,
|
|
11990
12000
|
e,
|
|
11991
12001
|
g
|
|
11992
12002
|
]);
|
|
11993
|
-
let
|
|
12003
|
+
let de = typeof F != "function" || le !== void 0, fe = L(() => de ? v.filter((e) => e.showInDetail ?? e.showInList).map(D_).filter((e) => !T_(e, se, b, le ?? void 0)) : [], [
|
|
11994
12004
|
b,
|
|
11995
12005
|
v,
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
12006
|
+
se,
|
|
12007
|
+
le,
|
|
12008
|
+
de
|
|
11999
12009
|
]);
|
|
12000
|
-
function
|
|
12010
|
+
function pe(e) {
|
|
12001
12011
|
let t = tl(e);
|
|
12002
|
-
if (t === "add" && !
|
|
12012
|
+
if (t === "add" && !ie || t === "edit" && !ae || t === "delete" && !oe || !Bt(e.permission, O)) return !1;
|
|
12003
12013
|
if (e.permissionKey) {
|
|
12004
|
-
let t = C_(
|
|
12014
|
+
let t = C_(se, `actionPermission.${e.permissionKey}`);
|
|
12005
12015
|
if (t === !1 || t === 0 || t === "0") return !1;
|
|
12006
12016
|
}
|
|
12007
12017
|
return !0;
|
|
12008
12018
|
}
|
|
12009
|
-
let [
|
|
12019
|
+
let [me, he] = R({
|
|
12010
12020
|
sourceDefaultTab: u,
|
|
12011
12021
|
selectedTab: u
|
|
12012
|
-
}),
|
|
12013
|
-
if (!
|
|
12014
|
-
let
|
|
12015
|
-
let r = [...
|
|
12022
|
+
}), ge = me.sourceDefaultTab === u ? me.selectedTab : u, _e = ce.some((e) => e.key === ge) ? ge : ce[0]?.key, ve = (e) => !e.allowedTabs?.length || e.allowedTabs.some((e) => w_(e) === w_(_e)), ye = fe.filter((e) => e.detailPlacement === "primary" && pe(e) && ve(e)), be = fe.filter((e) => e.detailPlacement !== "primary" && pe(e) && ve(e));
|
|
12023
|
+
if (!k) return null;
|
|
12024
|
+
let xe = (n) => {
|
|
12025
|
+
let r = [...ye, ...be].find((e) => e.key === n);
|
|
12016
12026
|
if (r?.actionType === "document" && r.documentField) {
|
|
12017
12027
|
let n = O_(g, r.documentField);
|
|
12018
12028
|
if (n.length) {
|
|
12019
12029
|
T(n), C(!0);
|
|
12020
12030
|
return;
|
|
12021
12031
|
}
|
|
12022
|
-
It(r.documentModule || e, r.documentIdField ? C_(
|
|
12032
|
+
It(r.documentModule || e, r.documentIdField ? C_(se, r.documentIdField) : t, r.documentField).then((e) => {
|
|
12023
12033
|
let t = (e?.data ?? []).map((e) => ({
|
|
12024
12034
|
name: e.fileName || e.name || e.uploadedFileName || r.documentField,
|
|
12025
12035
|
url: e.fileUrl || e.url || "",
|
|
@@ -12030,19 +12040,26 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12030
12040
|
return;
|
|
12031
12041
|
}
|
|
12032
12042
|
if (r?.actionType === "copy") {
|
|
12033
|
-
let e = C_(
|
|
12043
|
+
let e = C_(se, r.copyField || "id");
|
|
12034
12044
|
navigator.clipboard.writeText(x_(e)).then(() => J.success("Copied to clipboard")).catch(() => J.error("Could not copy to clipboard"));
|
|
12035
12045
|
return;
|
|
12036
12046
|
}
|
|
12037
12047
|
if (r?.actionType === "api" && r.apiPath) {
|
|
12038
|
-
let
|
|
12039
|
-
a(o,
|
|
12040
|
-
method:
|
|
12041
|
-
body: ["GET", "DELETE"].includes(
|
|
12048
|
+
let s = S_(r.apiPath, se), c = String(r.apiMethod || "POST").toUpperCase();
|
|
12049
|
+
a(o, s.startsWith("/") ? s : `/${s}`, {
|
|
12050
|
+
method: c,
|
|
12051
|
+
body: ["GET", "DELETE"].includes(c) ? void 0 : JSON.stringify({
|
|
12042
12052
|
ids: [t],
|
|
12043
|
-
record:
|
|
12053
|
+
record: se
|
|
12044
12054
|
})
|
|
12045
|
-
}).then(() =>
|
|
12055
|
+
}).then(() => {
|
|
12056
|
+
J.success(`${r.label} completed`), D((e) => e + 1), i?.(n, {
|
|
12057
|
+
moduleName: e,
|
|
12058
|
+
id: t,
|
|
12059
|
+
action: r,
|
|
12060
|
+
refreshed: !0
|
|
12061
|
+
});
|
|
12062
|
+
}).catch((e) => J.error(e.message || `${r.label} failed`));
|
|
12046
12063
|
return;
|
|
12047
12064
|
}
|
|
12048
12065
|
if (r?.route) {
|
|
@@ -12055,7 +12072,7 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12055
12072
|
background: m,
|
|
12056
12073
|
moduleName: e,
|
|
12057
12074
|
selectedIds: [t],
|
|
12058
|
-
selectedRecords: [
|
|
12075
|
+
selectedRecords: [se],
|
|
12059
12076
|
popupContext: r.popupState ?? {},
|
|
12060
12077
|
popupAction: {
|
|
12061
12078
|
key: r.key,
|
|
@@ -12072,37 +12089,37 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12072
12089
|
id: t,
|
|
12073
12090
|
action: r
|
|
12074
12091
|
});
|
|
12075
|
-
},
|
|
12076
|
-
|
|
12092
|
+
}, Se = (n) => {
|
|
12093
|
+
he({
|
|
12077
12094
|
sourceDefaultTab: u,
|
|
12078
12095
|
selectedTab: n
|
|
12079
12096
|
}), s?.(n, {
|
|
12080
12097
|
moduleName: e,
|
|
12081
12098
|
id: t
|
|
12082
12099
|
});
|
|
12083
|
-
},
|
|
12084
|
-
let t = fl(e,
|
|
12100
|
+
}, Ce = be.map((e) => {
|
|
12101
|
+
let t = fl(e, se, le ?? void 0), n = !t && E_(e, se, b, le ?? void 0);
|
|
12085
12102
|
return {
|
|
12086
12103
|
key: e.key,
|
|
12087
12104
|
label: t ? t.label : e.label,
|
|
12088
12105
|
danger: e.danger,
|
|
12089
12106
|
disabled: !!t || !!n,
|
|
12090
12107
|
title: n || void 0,
|
|
12091
|
-
onClick: t || n ? void 0 : () =>
|
|
12108
|
+
onClick: t || n ? void 0 : () => xe(e.key)
|
|
12092
12109
|
};
|
|
12093
|
-
}),
|
|
12094
|
-
if (
|
|
12110
|
+
}), we = mg(O)?.header;
|
|
12111
|
+
if (we?.variant === "finance") {
|
|
12095
12112
|
let t = (e) => e == null ? "" : Array.isArray(e) ? e.map(t).filter(Boolean).join(", ") : String(typeof e == "object" ? e.value ?? e.label ?? e.name ?? e.id ?? "" : e), n = {};
|
|
12096
12113
|
for (let e of g ?? []) for (let t of e.fields ?? []) t?.field != null && (n[t.field] = t.value);
|
|
12097
|
-
let r = (e) => t(n[e]), i = r(
|
|
12114
|
+
let r = (e) => t(n[e]), i = r(we.statusField), a = (we.chips ?? []).map((e) => ({
|
|
12098
12115
|
key: e.field,
|
|
12099
12116
|
icon: e.icon ? __[e.icon] : void 0,
|
|
12100
12117
|
label: e.label,
|
|
12101
12118
|
value: r(e.field) || "—",
|
|
12102
12119
|
badge: e.badgeField && r(e.badgeField) || void 0,
|
|
12103
12120
|
tooltip: e.tooltip
|
|
12104
|
-
})), o = l ? [] :
|
|
12105
|
-
let t = fl(e,
|
|
12121
|
+
})), o = l ? [] : ye.map((e) => {
|
|
12122
|
+
let t = fl(e, se, le ?? void 0), n = !t && E_(e, se, b, le ?? void 0);
|
|
12106
12123
|
return {
|
|
12107
12124
|
key: e.key,
|
|
12108
12125
|
label: t ? t.label : e.label,
|
|
@@ -12110,7 +12127,7 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12110
12127
|
enabled: !t && !n,
|
|
12111
12128
|
variant: e.tone,
|
|
12112
12129
|
disabledReason: n || void 0,
|
|
12113
|
-
onClick: t || n ? void 0 : () =>
|
|
12130
|
+
onClick: t || n ? void 0 : () => xe(e.key)
|
|
12114
12131
|
};
|
|
12115
12132
|
}), s = i ? jg(e, i) : [];
|
|
12116
12133
|
return /* @__PURE__ */ Z("div", {
|
|
@@ -12121,7 +12138,7 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12121
12138
|
children: [/* @__PURE__ */ Z("div", {
|
|
12122
12139
|
className: "fin-dh__identity",
|
|
12123
12140
|
children: [/* @__PURE__ */ X(c_, {
|
|
12124
|
-
name:
|
|
12141
|
+
name: j,
|
|
12125
12142
|
size: "lg"
|
|
12126
12143
|
}), /* @__PURE__ */ Z("div", {
|
|
12127
12144
|
className: "fin-dh__who",
|
|
@@ -12129,11 +12146,11 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12129
12146
|
className: "fin-dh__name-row",
|
|
12130
12147
|
children: [/* @__PURE__ */ X("h2", {
|
|
12131
12148
|
className: "fin-dh__name",
|
|
12132
|
-
children:
|
|
12149
|
+
children: j || "Details"
|
|
12133
12150
|
}), i ? /* @__PURE__ */ X(Jg, { status: i }) : null]
|
|
12134
|
-
}),
|
|
12151
|
+
}), A ? /* @__PURE__ */ X("span", {
|
|
12135
12152
|
className: "fin-dh__designation",
|
|
12136
|
-
children:
|
|
12153
|
+
children: A
|
|
12137
12154
|
}) : null]
|
|
12138
12155
|
})]
|
|
12139
12156
|
}), o.length ? /* @__PURE__ */ X("div", {
|
|
@@ -12171,18 +12188,18 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12171
12188
|
children: [/* @__PURE__ */ Z("div", {
|
|
12172
12189
|
className: "znx-dh-left",
|
|
12173
12190
|
children: [
|
|
12174
|
-
|
|
12191
|
+
A && /* @__PURE__ */ X("div", {
|
|
12175
12192
|
className: "znx-dh-eyebrow",
|
|
12176
|
-
children:
|
|
12193
|
+
children: A
|
|
12177
12194
|
}),
|
|
12178
12195
|
/* @__PURE__ */ Z("div", {
|
|
12179
12196
|
className: "znx-dh-titlerow",
|
|
12180
12197
|
children: [
|
|
12181
12198
|
/* @__PURE__ */ X("span", {
|
|
12182
12199
|
className: "znx-dh-title",
|
|
12183
|
-
children:
|
|
12200
|
+
children: j
|
|
12184
12201
|
}),
|
|
12185
|
-
|
|
12202
|
+
ee.map((e) => /* @__PURE__ */ Z("span", {
|
|
12186
12203
|
className: "znx-dh-titleid",
|
|
12187
12204
|
children: [
|
|
12188
12205
|
/* @__PURE__ */ Z("span", {
|
|
@@ -12193,21 +12210,21 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12193
12210
|
e.value
|
|
12194
12211
|
]
|
|
12195
12212
|
}, e.label)),
|
|
12196
|
-
|
|
12197
|
-
color:
|
|
12213
|
+
M && /* @__PURE__ */ X(K, {
|
|
12214
|
+
color: M.color,
|
|
12198
12215
|
className: "znx-dh-status",
|
|
12199
12216
|
style: {
|
|
12200
|
-
backgroundColor:
|
|
12201
|
-
borderColor:
|
|
12202
|
-
color:
|
|
12217
|
+
backgroundColor: M.backgroundColor ?? M.color,
|
|
12218
|
+
borderColor: M.backgroundColor ?? M.color,
|
|
12219
|
+
color: M.textColor
|
|
12203
12220
|
},
|
|
12204
|
-
children:
|
|
12221
|
+
children: M.label
|
|
12205
12222
|
})
|
|
12206
12223
|
]
|
|
12207
12224
|
}),
|
|
12208
|
-
|
|
12225
|
+
te.length > 0 && /* @__PURE__ */ X("div", {
|
|
12209
12226
|
className: "znx-dh-ids",
|
|
12210
|
-
children:
|
|
12227
|
+
children: te.map((e) => /* @__PURE__ */ Z("span", {
|
|
12211
12228
|
className: "znx-dh-id",
|
|
12212
12229
|
children: [
|
|
12213
12230
|
/* @__PURE__ */ Z("span", {
|
|
@@ -12219,9 +12236,9 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12219
12236
|
]
|
|
12220
12237
|
}, e.label))
|
|
12221
12238
|
}),
|
|
12222
|
-
|
|
12239
|
+
N.length > 0 && /* @__PURE__ */ X("div", {
|
|
12223
12240
|
className: "znx-dh-meta",
|
|
12224
|
-
children:
|
|
12241
|
+
children: N.map((e, t) => /* @__PURE__ */ Z("span", {
|
|
12225
12242
|
className: "znx-dh-meta-item",
|
|
12226
12243
|
children: [e.icon && __[e.icon] && /* @__PURE__ */ X("span", {
|
|
12227
12244
|
className: "znx-dh-meta-icon",
|
|
@@ -12235,23 +12252,23 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12235
12252
|
children: [
|
|
12236
12253
|
/* @__PURE__ */ Z("div", {
|
|
12237
12254
|
className: "znx-dh-actions",
|
|
12238
|
-
children: [
|
|
12239
|
-
let t = fl(e,
|
|
12255
|
+
children: [ye.map((e) => {
|
|
12256
|
+
let t = fl(e, se, le ?? void 0), n = !t && E_(e, se, b, le ?? void 0), r = /* @__PURE__ */ X(z, {
|
|
12240
12257
|
type: "text",
|
|
12241
12258
|
disabled: !!t || !!n,
|
|
12242
12259
|
className: `znx-dh-btn znx-dh-btn--${t ? t.tone : e.tone ?? "primary"}${t ? " znx-dh-btn--done" : ""}`,
|
|
12243
12260
|
icon: t ? /* @__PURE__ */ X(Jr, {}) : e.icon ? __[e.icon] : void 0,
|
|
12244
|
-
onClick: t || n ? void 0 : () =>
|
|
12261
|
+
onClick: t || n ? void 0 : () => xe(e.key),
|
|
12245
12262
|
children: t ? t.label : e.label
|
|
12246
12263
|
}, e.key);
|
|
12247
12264
|
return n ? /* @__PURE__ */ X(q, {
|
|
12248
12265
|
title: n,
|
|
12249
12266
|
children: /* @__PURE__ */ X("span", { children: r })
|
|
12250
12267
|
}, e.key) : r;
|
|
12251
|
-
}),
|
|
12268
|
+
}), be.length > 0 && /* @__PURE__ */ X(cr, {
|
|
12252
12269
|
trigger: ["click"],
|
|
12253
12270
|
placement: "bottomRight",
|
|
12254
|
-
menu: { items:
|
|
12271
|
+
menu: { items: Ce },
|
|
12255
12272
|
children: /* @__PURE__ */ X(z, {
|
|
12256
12273
|
type: "text",
|
|
12257
12274
|
className: "znx-dh-more",
|
|
@@ -12259,9 +12276,9 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12259
12276
|
})
|
|
12260
12277
|
})]
|
|
12261
12278
|
}),
|
|
12262
|
-
|
|
12279
|
+
ne.length > 0 && /* @__PURE__ */ X("div", {
|
|
12263
12280
|
className: "znx-dh-stats",
|
|
12264
|
-
children:
|
|
12281
|
+
children: ne.map((e) => /* @__PURE__ */ Z("div", {
|
|
12265
12282
|
className: "znx-dh-stat",
|
|
12266
12283
|
children: [/* @__PURE__ */ X("span", {
|
|
12267
12284
|
className: "znx-dh-stat-value",
|
|
@@ -12272,18 +12289,18 @@ function k_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
|
|
|
12272
12289
|
})]
|
|
12273
12290
|
}, e.label))
|
|
12274
12291
|
}),
|
|
12275
|
-
|
|
12292
|
+
re?.value && /* @__PURE__ */ Z("div", {
|
|
12276
12293
|
className: "znx-dh-created",
|
|
12277
|
-
children: ["Created on ",
|
|
12294
|
+
children: ["Created on ", re.value]
|
|
12278
12295
|
})
|
|
12279
12296
|
]
|
|
12280
12297
|
})]
|
|
12281
|
-
}),
|
|
12298
|
+
}), ce.length > 0 && /* @__PURE__ */ X("div", {
|
|
12282
12299
|
className: "znx-dh-tabs",
|
|
12283
|
-
children:
|
|
12300
|
+
children: ce.map((e) => /* @__PURE__ */ X("button", {
|
|
12284
12301
|
type: "button",
|
|
12285
|
-
className: `znx-dh-tab${
|
|
12286
|
-
onClick: () =>
|
|
12302
|
+
className: `znx-dh-tab${_e === e.key ? " is-active" : ""}`,
|
|
12303
|
+
onClick: () => Se(e.key),
|
|
12287
12304
|
children: e.label
|
|
12288
12305
|
}, e.key))
|
|
12289
12306
|
})]
|
|
@@ -12980,7 +12997,16 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
12980
12997
|
open: !1,
|
|
12981
12998
|
docs: [],
|
|
12982
12999
|
index: 0
|
|
12983
|
-
}), [D, O] = R(null), [k, A] = R(0), j = Xn([]), M = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", ee = e.lookupFilterValueFrom ? Fe(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], N = e.lookupFilterValueFrom && M ? [...n.slice(0, 2), ...Fe(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], te = V.useWatch(ee, t), P = V.useWatch(N, t), ne = Z_(P) ? te : P, re = e.lookupFilterValueFrom ? u[e.lookupFilterValueFrom] : void 0, ie = Z_(re) ? ne : re, ae = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], oe = V.useWatch(ae, t), se = e.disabledIf?.field ? Fe(e.disabledIf.field) : ["__noop_disabled_if__"], ce = e.disabledIf?.field && M ? [...n.slice(0, 2), ...Fe(e.disabledIf.field)] : ["__noop_disabled_if_row__"], F = V.useWatch(se, t), le = V.useWatch(ce, t), ue = e.disabledIf?.field ? Ut(e.disabledIf, Z_(le) ? F : le) : !1, de = Gn.useContext(nv), fe =
|
|
13000
|
+
}), [D, O] = R(null), [k, A] = R(0), j = Xn([]), M = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", ee = e.lookupFilterValueFrom ? Fe(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], N = e.lookupFilterValueFrom && M ? [...n.slice(0, 2), ...Fe(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], te = V.useWatch(ee, t), P = V.useWatch(N, t), ne = Z_(P) ? te : P, re = e.lookupFilterValueFrom ? u[e.lookupFilterValueFrom] : void 0, ie = Z_(re) ? ne : re, ae = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], oe = V.useWatch(ae, t), se = e.disabledIf?.field ? Fe(e.disabledIf.field) : ["__noop_disabled_if__"], ce = e.disabledIf?.field && M ? [...n.slice(0, 2), ...Fe(e.disabledIf.field)] : ["__noop_disabled_if_row__"], F = V.useWatch(se, t), le = V.useWatch(ce, t), ue = e.disabledIf?.field ? Ut(e.disabledIf, Z_(le) ? F : le) : !1, de = Gn.useContext(nv), fe = e.exclusiveInGroup && M ? [n[0]] : ["__noop_exclusive_watch__"], pe = V.useWatch(fe, t), me = L(() => {
|
|
13001
|
+
if (!e.exclusiveInGroup || !M || !Array.isArray(pe)) return !1;
|
|
13002
|
+
let t = n[1], r = n[n.length - 1];
|
|
13003
|
+
return pe.some((e, n) => n !== t && Y_(e?.[r]));
|
|
13004
|
+
}, [
|
|
13005
|
+
e.exclusiveInGroup,
|
|
13006
|
+
M,
|
|
13007
|
+
pe,
|
|
13008
|
+
n
|
|
13009
|
+
]), he = m || !!e.disabled || ue || (e.disabledByField ? Y_(oe) : !1) || !!f || de || me;
|
|
12984
13010
|
I(() => {
|
|
12985
13011
|
if (p === "location") {
|
|
12986
13012
|
let t = !1;
|
|
@@ -13073,13 +13099,13 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13073
13099
|
e.optionsRequireExtraField,
|
|
13074
13100
|
k
|
|
13075
13101
|
]);
|
|
13076
|
-
let
|
|
13102
|
+
let ge = ev([e.options, e.values].find((e) => Array.isArray(e) && e.length > 0) ?? (p === "checkbox" ? [] : R_(e))), _e = h ?? ge, ve = (e.multiSelect ? "multiple" : e.mode ?? (Y_(e.multiple) ? "multiple" : void 0)) ?? (nt(e) === "array" ? "multiple" : void 0), ye = ["select", "location"].includes(p), be = e.hidePlaceholder ? void 0 : e.placeholder ?? `${ye ? "Select" : "Enter"} ${String(e.label ?? "").toLowerCase()}`, xe = wv(e), Se = () => {
|
|
13077
13103
|
setTimeout(() => {
|
|
13078
13104
|
t.validateFields([n]).catch(() => {});
|
|
13079
13105
|
});
|
|
13080
|
-
},
|
|
13081
|
-
t.setFieldValue(n, e),
|
|
13082
|
-
},
|
|
13106
|
+
}, we = (e) => {
|
|
13107
|
+
t.setFieldValue(n, e), Se();
|
|
13108
|
+
}, Te = Lt({
|
|
13083
13109
|
field: e,
|
|
13084
13110
|
form: t,
|
|
13085
13111
|
name: n,
|
|
@@ -13089,83 +13115,83 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13089
13115
|
onDone: (t, n) => {
|
|
13090
13116
|
A((e) => e + 1);
|
|
13091
13117
|
let r = nt(e) !== "array" && !e.multiSelect && !e.multiple;
|
|
13092
|
-
t === "create" && n != null && r &&
|
|
13118
|
+
t === "create" && n != null && r && we(mn(e) ? { value: n } : n);
|
|
13093
13119
|
}
|
|
13094
|
-
}),
|
|
13120
|
+
}), Ee = e.validator?.type ? {
|
|
13095
13121
|
...e.validator,
|
|
13096
13122
|
title: e.validator.title || e.label || "Field"
|
|
13097
|
-
} : null,
|
|
13098
|
-
...
|
|
13123
|
+
} : null, De = {
|
|
13124
|
+
...xe,
|
|
13099
13125
|
value: r,
|
|
13100
|
-
disabled:
|
|
13101
|
-
placeholder:
|
|
13126
|
+
disabled: he,
|
|
13127
|
+
placeholder: be,
|
|
13102
13128
|
prefix: e.icon ? null : J_[e.field],
|
|
13103
13129
|
onChange: (t) => {
|
|
13104
13130
|
let n = e.formatter ? Dv(t.target.value, e.formatter) : t.target.value;
|
|
13105
|
-
if (
|
|
13106
|
-
let { cleaned: e, error: t } = Ct(n,
|
|
13131
|
+
if (Ee) {
|
|
13132
|
+
let { cleaned: e, error: t } = Ct(n, Ee, "change");
|
|
13107
13133
|
O(t), n = e;
|
|
13108
13134
|
}
|
|
13109
|
-
|
|
13135
|
+
we(n);
|
|
13110
13136
|
},
|
|
13111
|
-
...
|
|
13137
|
+
...Ee && {
|
|
13112
13138
|
onBlur: (e) => {
|
|
13113
|
-
let { cleaned: t, error: n } = Ct(e.target.value,
|
|
13114
|
-
O(n), t !== e.target.value &&
|
|
13139
|
+
let { cleaned: t, error: n } = Ct(e.target.value, Ee, "blur");
|
|
13140
|
+
O(n), t !== e.target.value && we(t);
|
|
13115
13141
|
},
|
|
13116
13142
|
onKeyPress: (e) => {
|
|
13117
|
-
let t = Fn(
|
|
13143
|
+
let t = Fn(Ee.type);
|
|
13118
13144
|
if (!t || e.which === 0 || e.keyCode === 8 || e.keyCode === 13) return;
|
|
13119
13145
|
let n = String.fromCharCode(e.which ?? e.keyCode);
|
|
13120
13146
|
if (!t.test(n)) {
|
|
13121
13147
|
e.preventDefault();
|
|
13122
|
-
let t = `${
|
|
13148
|
+
let t = `${Ee.title} — invalid character.`;
|
|
13123
13149
|
O(t), setTimeout(() => O((e) => e === t ? null : e), 1800);
|
|
13124
13150
|
}
|
|
13125
13151
|
},
|
|
13126
|
-
maxLength:
|
|
13152
|
+
maxLength: Ee.maxLength ?? xe.maxLength
|
|
13127
13153
|
}
|
|
13128
13154
|
};
|
|
13129
13155
|
if (p === "tagify") return /* @__PURE__ */ X(U, {
|
|
13130
13156
|
value: r,
|
|
13131
13157
|
allowClear: !0,
|
|
13132
|
-
disabled:
|
|
13158
|
+
disabled: he,
|
|
13133
13159
|
mode: "tags",
|
|
13134
|
-
placeholder:
|
|
13135
|
-
onChange:
|
|
13160
|
+
placeholder: be,
|
|
13161
|
+
onChange: we
|
|
13136
13162
|
});
|
|
13137
13163
|
if (p === "location") return /* @__PURE__ */ X(U, {
|
|
13138
13164
|
value: r,
|
|
13139
13165
|
allowClear: !0,
|
|
13140
13166
|
showSearch: !0,
|
|
13141
13167
|
filterOption: !1,
|
|
13142
|
-
disabled:
|
|
13168
|
+
disabled: he,
|
|
13143
13169
|
loading: _,
|
|
13144
|
-
options:
|
|
13145
|
-
placeholder:
|
|
13170
|
+
options: _e,
|
|
13171
|
+
placeholder: be,
|
|
13146
13172
|
notFoundContent: _ ? /* @__PURE__ */ X(Cr, { size: "small" }) : void 0,
|
|
13147
13173
|
onSearch: b,
|
|
13148
13174
|
onFocus: () => b((e) => e),
|
|
13149
|
-
onChange:
|
|
13175
|
+
onChange: we
|
|
13150
13176
|
});
|
|
13151
13177
|
if (p === "select") {
|
|
13152
13178
|
let i = e.dataSource === "lookup", a = e.dataSource === "master", o = i || a, s = mn(e);
|
|
13153
13179
|
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(U, {
|
|
13154
|
-
value: Ce(e, r,
|
|
13180
|
+
value: Ce(e, r, _e),
|
|
13155
13181
|
allowClear: !0,
|
|
13156
|
-
disabled:
|
|
13182
|
+
disabled: he,
|
|
13157
13183
|
loading: _,
|
|
13158
13184
|
labelInValue: s || void 0,
|
|
13159
13185
|
showSearch: e.showSearch !== !1,
|
|
13160
13186
|
optionFilterProp: "label",
|
|
13161
13187
|
filterOption: o ? !1 : void 0,
|
|
13162
|
-
mode:
|
|
13163
|
-
options:
|
|
13164
|
-
placeholder:
|
|
13188
|
+
mode: ve,
|
|
13189
|
+
options: _e,
|
|
13190
|
+
placeholder: be,
|
|
13165
13191
|
notFoundContent: _ ? /* @__PURE__ */ X(Cr, { size: "small" }) : void 0,
|
|
13166
13192
|
onSearch: i ? S : a ? w : void 0,
|
|
13167
13193
|
onChange: (r) => {
|
|
13168
|
-
if (
|
|
13194
|
+
if (we(r), e.autofillFrom?.length) {
|
|
13169
13195
|
let i = r && !Array.isArray(r) && typeof r == "object" ? r.value : r, a = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number";
|
|
13170
13196
|
if (r == null) e.autofillFrom.forEach(({ targetField: e }) => {
|
|
13171
13197
|
let r = a ? [...n.slice(0, 2), ...Fe(e)] : Fe(e);
|
|
@@ -13180,26 +13206,26 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13180
13206
|
}
|
|
13181
13207
|
}
|
|
13182
13208
|
},
|
|
13183
|
-
dropdownRender:
|
|
13184
|
-
}),
|
|
13209
|
+
dropdownRender: Te.footer ? (e) => /* @__PURE__ */ Z(Y, { children: [e, Te.footer] }) : void 0
|
|
13210
|
+
}), Te.modal] });
|
|
13185
13211
|
}
|
|
13186
13212
|
if (p === "radio") return /* @__PURE__ */ X(br.Group, {
|
|
13187
13213
|
value: r,
|
|
13188
|
-
disabled:
|
|
13189
|
-
options:
|
|
13190
|
-
onChange: (e) =>
|
|
13214
|
+
disabled: he,
|
|
13215
|
+
options: _e,
|
|
13216
|
+
onChange: (e) => we(e.target.value)
|
|
13191
13217
|
});
|
|
13192
|
-
if (p === "checkbox") return
|
|
13218
|
+
if (p === "checkbox") return _e.length > 0 ? /* @__PURE__ */ X(rr.Group, {
|
|
13193
13219
|
value: r,
|
|
13194
|
-
disabled:
|
|
13195
|
-
options:
|
|
13196
|
-
onChange:
|
|
13220
|
+
disabled: he,
|
|
13221
|
+
options: _e,
|
|
13222
|
+
onChange: we
|
|
13197
13223
|
}) : /* @__PURE__ */ X(rr, {
|
|
13198
13224
|
checked: i,
|
|
13199
|
-
disabled:
|
|
13225
|
+
disabled: he,
|
|
13200
13226
|
onChange: (r) => {
|
|
13201
13227
|
let i = r.target.checked;
|
|
13202
|
-
if (
|
|
13228
|
+
if (we(i), e.linkedClearField && i) {
|
|
13203
13229
|
let r = Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.linkedClearField] : [e.linkedClearField];
|
|
13204
13230
|
t.setFieldValue(r, null);
|
|
13205
13231
|
}
|
|
@@ -13208,21 +13234,21 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13208
13234
|
});
|
|
13209
13235
|
if (p === "text-editor") return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(lt, {
|
|
13210
13236
|
value: r ?? l ?? "",
|
|
13211
|
-
disabled:
|
|
13212
|
-
placeholder:
|
|
13237
|
+
disabled: he,
|
|
13238
|
+
placeholder: be,
|
|
13213
13239
|
onChange: (e) => {
|
|
13214
|
-
if (
|
|
13215
|
-
let { error: t } = Ct(e,
|
|
13240
|
+
if (Ee) {
|
|
13241
|
+
let { error: t } = Ct(e, Ee, "change");
|
|
13216
13242
|
O(t);
|
|
13217
13243
|
}
|
|
13218
|
-
|
|
13244
|
+
we(e);
|
|
13219
13245
|
}
|
|
13220
13246
|
}), D && /* @__PURE__ */ X("div", {
|
|
13221
13247
|
className: "v1-input-validator-hint",
|
|
13222
13248
|
children: D
|
|
13223
13249
|
})] });
|
|
13224
13250
|
if (p === "textarea") return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(V_, {
|
|
13225
|
-
...
|
|
13251
|
+
...De,
|
|
13226
13252
|
rows: e.rows ?? 3,
|
|
13227
13253
|
className: "v1-scroll-textarea"
|
|
13228
13254
|
}), D && /* @__PURE__ */ X("div", {
|
|
@@ -13231,20 +13257,20 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13231
13257
|
})] });
|
|
13232
13258
|
if (p === "date") return /* @__PURE__ */ X(ar, {
|
|
13233
13259
|
value: r,
|
|
13234
|
-
disabled:
|
|
13235
|
-
placeholder:
|
|
13260
|
+
disabled: he,
|
|
13261
|
+
placeholder: be,
|
|
13236
13262
|
style: { width: "100%" },
|
|
13237
13263
|
suffixIcon: /* @__PURE__ */ X(Wr, {}),
|
|
13238
13264
|
disabledDate: Tv(e, t, n),
|
|
13239
13265
|
defaultPickerValue: Ev(e),
|
|
13240
|
-
onChange: (e) =>
|
|
13266
|
+
onChange: (e) => we(e)
|
|
13241
13267
|
});
|
|
13242
13268
|
if (p === "time") return /* @__PURE__ */ X(Or, {
|
|
13243
13269
|
value: r,
|
|
13244
|
-
disabled:
|
|
13245
|
-
placeholder:
|
|
13270
|
+
disabled: he,
|
|
13271
|
+
placeholder: be,
|
|
13246
13272
|
style: { width: "100%" },
|
|
13247
|
-
onChange: (e) =>
|
|
13273
|
+
onChange: (e) => we(e)
|
|
13248
13274
|
});
|
|
13249
13275
|
if (p === "file") {
|
|
13250
13276
|
let t = e.validations ?? e.validation ?? e.rules ?? [], n = t.find((e) => (typeof e == "string" ? e : e?.type) === "fileType"), i = t.find((e) => (typeof e == "string" ? e : e?.type) === "fileSize"), a = t.find((e) => (typeof e == "string" ? e : e?.type) === "maxFiles"), o = kn(e), s = o ? o.exts.map((e) => `.${e}`).join(",") : n?.value ? n.value.split(",").map((e) => `.${e.trim().replace(/^\./, "")}`).join(",") : void 0, c = i ? Number(i?.value ?? 5) : void 0, l = a ? Number(a?.value ?? 1) : Y_(e.multiple) ? e.maxCount ?? 5 : 1, u = Array.isArray(r) ? r : [], f = u.length < l, p = (e) => e ? e < 1024 * 1024 ? `${(e / 1024).toFixed(0)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB` : "", m = (e) => {
|
|
@@ -13262,7 +13288,7 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13262
13288
|
"webp"
|
|
13263
13289
|
].includes(t) ? /* @__PURE__ */ X(xi, { className: "v1-file-type-icon v1-file-icon-image" }) : /* @__PURE__ */ X(Si, { className: "v1-file-type-icon v1-file-icon-default" });
|
|
13264
13290
|
}, h = (e) => {
|
|
13265
|
-
|
|
13291
|
+
we(u.filter((t, n) => n !== e));
|
|
13266
13292
|
}, g = (e, t) => {
|
|
13267
13293
|
E({
|
|
13268
13294
|
open: !0,
|
|
@@ -13284,7 +13310,7 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13284
13310
|
return c !== void 0 && e.size / 1024 / 1024 > c ? (J.error(i?.message ?? `File must be smaller than ${c} MB`), jr.LIST_IGNORE) : !1;
|
|
13285
13311
|
}, C = ({ fileList: e }) => {
|
|
13286
13312
|
let t = e.slice(0, l);
|
|
13287
|
-
if (
|
|
13313
|
+
if (we(t), d && t.length > u.length) {
|
|
13288
13314
|
let e = t[t.length - 1];
|
|
13289
13315
|
e?.originFileObj && d(e.originFileObj);
|
|
13290
13316
|
}
|
|
@@ -13296,7 +13322,7 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13296
13322
|
maxCount: l,
|
|
13297
13323
|
beforeUpload: S,
|
|
13298
13324
|
onChange: C,
|
|
13299
|
-
disabled:
|
|
13325
|
+
disabled: he
|
|
13300
13326
|
}, D = u.map((e, t) => /* @__PURE__ */ Z("div", {
|
|
13301
13327
|
className: "v1-file-item",
|
|
13302
13328
|
children: [
|
|
@@ -13354,7 +13380,7 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13354
13380
|
display: "block"
|
|
13355
13381
|
},
|
|
13356
13382
|
children: /* @__PURE__ */ Z("div", {
|
|
13357
|
-
className: `v1-upload-dropzone v1-upload-dropzone-center${
|
|
13383
|
+
className: `v1-upload-dropzone v1-upload-dropzone-center${he ? " v1-upload-dropzone-disabled" : ""}`,
|
|
13358
13384
|
children: [
|
|
13359
13385
|
/* @__PURE__ */ Z("div", {
|
|
13360
13386
|
className: "v1-upload-dropzone-title-row",
|
|
@@ -13405,13 +13431,13 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13405
13431
|
maxCount: 1,
|
|
13406
13432
|
beforeUpload: S,
|
|
13407
13433
|
onChange: C,
|
|
13408
|
-
disabled:
|
|
13434
|
+
disabled: he,
|
|
13409
13435
|
style: {
|
|
13410
13436
|
width: "100%",
|
|
13411
13437
|
display: "block"
|
|
13412
13438
|
},
|
|
13413
13439
|
children: /* @__PURE__ */ Z("div", {
|
|
13414
|
-
className: `v1-upload-dropzone v1-upload-dropzone-single${
|
|
13440
|
+
className: `v1-upload-dropzone v1-upload-dropzone-single${he ? " v1-upload-dropzone-disabled" : ""}`,
|
|
13415
13441
|
children: [
|
|
13416
13442
|
/* @__PURE__ */ X(ni, { className: "v1-upload-cloud-icon" }),
|
|
13417
13443
|
/* @__PURE__ */ X("span", {
|
|
@@ -13428,7 +13454,7 @@ function Ov({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
|
|
|
13428
13454
|
}), O] });
|
|
13429
13455
|
}
|
|
13430
13456
|
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(H, {
|
|
13431
|
-
...
|
|
13457
|
+
...De,
|
|
13432
13458
|
type: p === "number" ? "number" : p,
|
|
13433
13459
|
...p === "number" && Y_(e.decimal) ? { step: "any" } : {},
|
|
13434
13460
|
...e.suffix ? { suffix: e.suffix } : {}
|
|
@@ -13451,12 +13477,12 @@ function kv({ icon: e, title: t }) {
|
|
|
13451
13477
|
})]
|
|
13452
13478
|
});
|
|
13453
13479
|
}
|
|
13454
|
-
function Av({ moduleName: e,
|
|
13455
|
-
let
|
|
13456
|
-
I(() => (
|
|
13457
|
-
|
|
13458
|
-
}), [
|
|
13459
|
-
let [
|
|
13480
|
+
function Av({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId: i, region: a, breadcrumbItems: o = [], submitText: s = "Update", cancelPath: c, onSuccess: l, fieldNameMap: u = {}, onFileUpload: f = null, onBeforeSubmit: p = null, extraPayload: m = null, embedded: g = !1, onCancel: _ = null }) {
|
|
13481
|
+
let v = Fa(), [y] = V.useForm();
|
|
13482
|
+
I(() => (r && d(r), () => {
|
|
13483
|
+
r && h();
|
|
13484
|
+
}), [r]);
|
|
13485
|
+
let [b, x] = R({}), [S, C] = R([]), [w, T] = R(!1), [E, D] = R(""), [O, k] = R(!1), [A, j] = R(""), [ee, N] = R(null), [P, ne] = R(() => /* @__PURE__ */ new Set()), [ie, ae] = R(""), se = i || ie;
|
|
13460
13486
|
I(() => {
|
|
13461
13487
|
sn();
|
|
13462
13488
|
}, []), I(() => {
|
|
@@ -13464,16 +13490,16 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13464
13490
|
return queueMicrotask(() => {
|
|
13465
13491
|
if (!t) {
|
|
13466
13492
|
if (!e) {
|
|
13467
|
-
|
|
13493
|
+
N(null);
|
|
13468
13494
|
return;
|
|
13469
13495
|
}
|
|
13470
13496
|
$t({ roleId: localStorage.getItem("roleId") }, e, {
|
|
13471
|
-
clientId:
|
|
13472
|
-
region:
|
|
13497
|
+
clientId: se,
|
|
13498
|
+
region: a
|
|
13473
13499
|
}).then((e) => {
|
|
13474
|
-
t ||
|
|
13500
|
+
t || N(Array.isArray(e) && e.length ? e : null);
|
|
13475
13501
|
}).catch(() => {
|
|
13476
|
-
t ||
|
|
13502
|
+
t || N(null);
|
|
13477
13503
|
});
|
|
13478
13504
|
}
|
|
13479
13505
|
}), () => {
|
|
@@ -13481,41 +13507,41 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13481
13507
|
};
|
|
13482
13508
|
}, [
|
|
13483
13509
|
e,
|
|
13484
|
-
|
|
13485
|
-
|
|
13510
|
+
se,
|
|
13511
|
+
a
|
|
13486
13512
|
]), I(() => {
|
|
13487
13513
|
let t = !1;
|
|
13488
13514
|
return queueMicrotask(() => {
|
|
13489
13515
|
if (!t) {
|
|
13490
13516
|
if (!e) {
|
|
13491
|
-
|
|
13517
|
+
ne(/* @__PURE__ */ new Set());
|
|
13492
13518
|
return;
|
|
13493
13519
|
}
|
|
13494
13520
|
xt(e).then((e) => {
|
|
13495
|
-
t ||
|
|
13521
|
+
t || ne(new Set(Array.isArray(e) ? e : []));
|
|
13496
13522
|
}).catch(() => {
|
|
13497
|
-
t ||
|
|
13523
|
+
t || ne(/* @__PURE__ */ new Set());
|
|
13498
13524
|
});
|
|
13499
13525
|
}
|
|
13500
13526
|
}), () => {
|
|
13501
13527
|
t = !0;
|
|
13502
13528
|
};
|
|
13503
13529
|
}, [e]);
|
|
13504
|
-
let
|
|
13505
|
-
|
|
13530
|
+
let ce = L(() => lv(S, e, ee, P), [
|
|
13531
|
+
S,
|
|
13506
13532
|
e,
|
|
13507
|
-
|
|
13508
|
-
|
|
13509
|
-
]),
|
|
13510
|
-
form:
|
|
13511
|
-
groups:
|
|
13533
|
+
ee,
|
|
13534
|
+
P
|
|
13535
|
+
]), le = L(() => Re(ce), [ce]), ue = Xn({}), fe = Xe({
|
|
13536
|
+
form: y,
|
|
13537
|
+
groups: ce,
|
|
13512
13538
|
module: e
|
|
13513
|
-
}),
|
|
13539
|
+
}), pe = L(() => {
|
|
13514
13540
|
let e = {};
|
|
13515
|
-
return
|
|
13541
|
+
return ce.forEach((t) => {
|
|
13516
13542
|
t.addRow && (e[t.name] = re(t));
|
|
13517
|
-
}), _e(
|
|
13518
|
-
}, [
|
|
13543
|
+
}), _e(le, e);
|
|
13544
|
+
}, [ce, le]), me = {
|
|
13519
13545
|
jobs: {
|
|
13520
13546
|
list: "Jobs",
|
|
13521
13547
|
path: "/jobs",
|
|
@@ -13531,8 +13557,8 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13531
13557
|
path: "/submissions",
|
|
13532
13558
|
edit: "Edit Submission"
|
|
13533
13559
|
}
|
|
13534
|
-
},
|
|
13535
|
-
let t =
|
|
13560
|
+
}, he = g ? [] : o.length > 0 ? o : (() => {
|
|
13561
|
+
let t = me[$_(e)];
|
|
13536
13562
|
return t ? [
|
|
13537
13563
|
{
|
|
13538
13564
|
label: "Home",
|
|
@@ -13546,113 +13572,115 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13546
13572
|
] : [];
|
|
13547
13573
|
})();
|
|
13548
13574
|
I(() => {
|
|
13549
|
-
if (!e || !
|
|
13550
|
-
let
|
|
13551
|
-
async function
|
|
13575
|
+
if (!e || !n) return;
|
|
13576
|
+
let r = !1;
|
|
13577
|
+
async function o() {
|
|
13552
13578
|
try {
|
|
13553
|
-
|
|
13554
|
-
let
|
|
13579
|
+
T(!0), D(""), j("");
|
|
13580
|
+
let o = await et({
|
|
13555
13581
|
module: e,
|
|
13556
|
-
id:
|
|
13557
|
-
clientId:
|
|
13558
|
-
region:
|
|
13582
|
+
id: n,
|
|
13583
|
+
clientId: se,
|
|
13584
|
+
region: a,
|
|
13585
|
+
group: t
|
|
13559
13586
|
});
|
|
13560
|
-
if (
|
|
13561
|
-
if (
|
|
13562
|
-
let e =
|
|
13563
|
-
if (!
|
|
13587
|
+
if (r) return;
|
|
13588
|
+
if (C(Array.isArray(o) ? o : []), !i) {
|
|
13589
|
+
let e = o?.recordMeta ?? {}, t = (e) => e && typeof e == "object" ? e.id ?? e.value ?? "" : e ?? "", n = String(t(e.clientId) || ""), i = String(t(e.jobId) || "");
|
|
13590
|
+
if (!n && i) try {
|
|
13564
13591
|
let e = await et({
|
|
13565
13592
|
module: "jobs",
|
|
13566
13593
|
id: i
|
|
13567
13594
|
});
|
|
13568
|
-
|
|
13595
|
+
n = String(t(e?.recordMeta?.clientId) || "");
|
|
13569
13596
|
} catch {}
|
|
13570
|
-
!
|
|
13597
|
+
!r && n && n !== ie && ae(n);
|
|
13571
13598
|
}
|
|
13572
13599
|
} catch (t) {
|
|
13573
|
-
console.error(`Failed to fetch ${e} edit data:`, t),
|
|
13600
|
+
console.error(`Failed to fetch ${e} edit data:`, t), r || D(t?.message || "Failed to load record");
|
|
13574
13601
|
} finally {
|
|
13575
|
-
|
|
13602
|
+
r || T(!1);
|
|
13576
13603
|
}
|
|
13577
13604
|
}
|
|
13578
|
-
return
|
|
13579
|
-
|
|
13605
|
+
return o(), () => {
|
|
13606
|
+
r = !0;
|
|
13580
13607
|
};
|
|
13581
13608
|
}, [
|
|
13582
13609
|
e,
|
|
13583
13610
|
t,
|
|
13584
|
-
|
|
13585
|
-
|
|
13586
|
-
|
|
13587
|
-
|
|
13611
|
+
n,
|
|
13612
|
+
i,
|
|
13613
|
+
se,
|
|
13614
|
+
ie,
|
|
13615
|
+
a
|
|
13588
13616
|
]), I(() => {
|
|
13589
|
-
|
|
13617
|
+
w || ce.length === 0 || oe(y, ce);
|
|
13590
13618
|
}, [
|
|
13591
|
-
|
|
13592
|
-
|
|
13593
|
-
|
|
13619
|
+
w,
|
|
13620
|
+
ce,
|
|
13621
|
+
y
|
|
13594
13622
|
]);
|
|
13595
|
-
let
|
|
13596
|
-
|
|
13623
|
+
let ge = (e) => {
|
|
13624
|
+
x((t) => ({
|
|
13597
13625
|
...t,
|
|
13598
13626
|
[e]: !t[e]
|
|
13599
13627
|
}));
|
|
13600
13628
|
};
|
|
13601
|
-
function
|
|
13602
|
-
let n = We(t,
|
|
13603
|
-
return Object.entries(
|
|
13629
|
+
function ve(t) {
|
|
13630
|
+
let n = We(t, ce, { module: e });
|
|
13631
|
+
return Object.entries(u).forEach(([e, t]) => {
|
|
13604
13632
|
n[e] !== void 0 && (n[t] = n[e], delete n[e]);
|
|
13605
13633
|
}), n;
|
|
13606
13634
|
}
|
|
13607
|
-
async function
|
|
13608
|
-
if (!(
|
|
13609
|
-
|
|
13610
|
-
let r = M(
|
|
13635
|
+
async function ye(t) {
|
|
13636
|
+
if (!(p && await Promise.resolve().then(() => p(t)).catch(() => !1) === !1)) try {
|
|
13637
|
+
k(!0), j("");
|
|
13638
|
+
let r = M(t, ce, {
|
|
13611
13639
|
indexed: !0,
|
|
13612
13640
|
module: e
|
|
13613
13641
|
});
|
|
13614
|
-
if (
|
|
13615
|
-
let e =
|
|
13642
|
+
if (f && f.useLegacyUpload) {
|
|
13643
|
+
let e = ce.flatMap((e) => e.fields ?? []).filter($e);
|
|
13616
13644
|
for (let r of e) {
|
|
13617
|
-
let e =
|
|
13645
|
+
let e = t[r.field];
|
|
13618
13646
|
if (!Array.isArray(e)) continue;
|
|
13619
13647
|
let i = e.filter((e) => e.originFileObj instanceof File);
|
|
13620
13648
|
try {
|
|
13621
|
-
await Promise.all(i.map((e) =>
|
|
13649
|
+
await Promise.all(i.map((e) => f(r.field, e.originFileObj, n)));
|
|
13622
13650
|
} catch (e) {
|
|
13623
13651
|
console.warn("File upload failed — continuing with save:", e);
|
|
13624
13652
|
}
|
|
13625
13653
|
}
|
|
13626
13654
|
}
|
|
13627
|
-
await jt(e,
|
|
13628
|
-
...
|
|
13629
|
-
...
|
|
13630
|
-
},
|
|
13631
|
-
let i = M(
|
|
13632
|
-
if (!
|
|
13633
|
-
await pn(e,
|
|
13655
|
+
await jt(e, n, {
|
|
13656
|
+
...ve(t),
|
|
13657
|
+
...m ?? {}
|
|
13658
|
+
}, f?.useLegacyUpload ? [] : r);
|
|
13659
|
+
let i = M(t, ce, { module: e });
|
|
13660
|
+
if (!f?.useLegacyUpload && i.length > 0) try {
|
|
13661
|
+
await pn(e, n, i);
|
|
13634
13662
|
} catch (e) {
|
|
13635
13663
|
console.error("Document registry upload failed during edit:", e), J.warning("Changes saved, but saving document records failed.");
|
|
13636
13664
|
}
|
|
13637
|
-
let a = kt(
|
|
13638
|
-
if (a && J.success(a),
|
|
13665
|
+
let a = kt(ce, e, "edit");
|
|
13666
|
+
if (a && J.success(a), l) l(n, t);
|
|
13639
13667
|
else {
|
|
13640
|
-
let e = Pt(
|
|
13641
|
-
e ? e.mode === "back" ?
|
|
13668
|
+
let e = Pt(ce);
|
|
13669
|
+
e ? e.mode === "back" ? v(-1) : (e.mode === "route" || e.mode === "detail") && v(dn(e.target, n, t) || c || -1) : v(c || -1);
|
|
13642
13670
|
}
|
|
13643
13671
|
} catch (t) {
|
|
13644
13672
|
console.error(`Failed to update ${e}:`, t);
|
|
13645
|
-
let n = En(
|
|
13646
|
-
|
|
13673
|
+
let n = En(ce, e, "edit", t?.message);
|
|
13674
|
+
j(n), J.error(n);
|
|
13647
13675
|
} finally {
|
|
13648
|
-
|
|
13676
|
+
k(!1);
|
|
13649
13677
|
}
|
|
13650
13678
|
}
|
|
13651
|
-
let
|
|
13652
|
-
|
|
13653
|
-
}, [
|
|
13679
|
+
let be = (e) => {
|
|
13680
|
+
x({}), Qt(e, y);
|
|
13681
|
+
}, [xe, Se] = R({}), Ce = (e) => String(e?.field ?? ""), we = (e, t) => typeof e == "function" ? e(t) : e, Te = (e, t, n) => {
|
|
13654
13682
|
if (!e?.field) return !0;
|
|
13655
|
-
let r =
|
|
13683
|
+
let r = we(n, e.field), i = t(r == null ? [e.field] : [...Array.isArray(r) ? r : [r], e.field]);
|
|
13656
13684
|
switch (e.operator) {
|
|
13657
13685
|
case "eq": return String(i ?? "") === String(e.value ?? "");
|
|
13658
13686
|
case "neq": return String(i ?? "") !== String(e.value ?? "");
|
|
@@ -13663,25 +13691,25 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13663
13691
|
case "notIn": return !String(e.value ?? "").split(",").map((e) => e.trim()).includes(String(i ?? ""));
|
|
13664
13692
|
default: return !0;
|
|
13665
13693
|
}
|
|
13666
|
-
},
|
|
13694
|
+
}, Ee = (e, t, n) => {
|
|
13667
13695
|
if (!e) return !0;
|
|
13668
13696
|
let r = Array.isArray(e.conditions) ? e.conditions.filter((e) => e?.field) : [];
|
|
13669
13697
|
if (r.length) {
|
|
13670
|
-
let i = r.map((e) =>
|
|
13698
|
+
let i = r.map((e) => Te(e, t, n)), a = String(e.logic ?? "and").toLowerCase() === "or", o = a ? i.some(Boolean) : i.every(Boolean);
|
|
13671
13699
|
if (e.field) {
|
|
13672
|
-
let r =
|
|
13700
|
+
let r = Te(e, t, n);
|
|
13673
13701
|
o = a ? o || r : o && r;
|
|
13674
13702
|
}
|
|
13675
13703
|
return o;
|
|
13676
13704
|
}
|
|
13677
|
-
return
|
|
13678
|
-
},
|
|
13679
|
-
let o = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : null, s = o ?? t.field, c = n === void 0 ? s : [n, ...o ?? [t.field]], l =
|
|
13680
|
-
form:
|
|
13705
|
+
return Te(e, t, n);
|
|
13706
|
+
}, De = (e) => !!(e?.field || e?.conditions?.some?.((e) => e?.field)), Oe = (t, n, r, a = {}) => {
|
|
13707
|
+
let o = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : null, s = o ?? t.field, c = n === void 0 ? s : [n, ...o ?? [t.field]], l = r !== void 0 && n !== void 0 ? [...Array.isArray(r) ? r : [r], ...Array.isArray(c) ? c : [c]] : c, u = t.type === "checkbox" && (t.options && t.options.length > 0 || t.dataSource && t.dataSource !== "static"), d = !u && t.type === "checkbox" ? "checked" : "value", f = !!t.editablePermission && !Bt(t.editablePermission, e), p = r !== void 0 && n !== void 0 ? [...Array.isArray(r) ? r : [r], n] : null, m = (e) => p && (!a.rowFieldKeys || a.rowFieldKeys.has(e)) ? p : null, h = a.inline || a.hideLabel || !u && t.type === "checkbox" ? "" : /* @__PURE__ */ X(W_, {
|
|
13708
|
+
form: y,
|
|
13681
13709
|
field: t,
|
|
13682
13710
|
siblingPrefix: t.labelWhen?.field ? m(t.labelWhen.field) : p,
|
|
13683
13711
|
locked: f
|
|
13684
|
-
}), g = a.inline || t.type === "text-editor" || t.type === "file" && Y_(t.multiple) ? 24 : t.col ?? 12, _ = Cv(t, l),
|
|
13712
|
+
}), g = a.inline || t.type === "text-editor" || t.type === "file" && Y_(t.multiple) ? 24 : t.col ?? 12, _ = Cv(t, l), v = a.inline ? {
|
|
13685
13713
|
flex: `${Number(t.combineWidth) > 0 ? Number(t.combineWidth) : 1} 1 0`,
|
|
13686
13714
|
maxWidth: "none"
|
|
13687
13715
|
} : void 0, b = (t.aiActions || []).filter((e) => e.trigger === "click"), x = (t.aiActions || []).find((e) => e.trigger === "upload"), S = /* @__PURE__ */ X(V.Item, {
|
|
@@ -13693,26 +13721,26 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13693
13721
|
children: t.helpText
|
|
13694
13722
|
}) : void 0,
|
|
13695
13723
|
required: xv(t),
|
|
13696
|
-
rules: Sv(t,
|
|
13724
|
+
rules: Sv(t, y, l),
|
|
13697
13725
|
dependencies: _,
|
|
13698
13726
|
valuePropName: d,
|
|
13699
13727
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
13700
13728
|
validateTrigger: ["onBlur", "onChange"],
|
|
13701
13729
|
children: /* @__PURE__ */ X(Ov, {
|
|
13702
13730
|
field: t,
|
|
13703
|
-
form:
|
|
13731
|
+
form: y,
|
|
13704
13732
|
name: l,
|
|
13705
13733
|
moduleName: e,
|
|
13706
13734
|
initialValue: t.value,
|
|
13707
|
-
scopeValues: { clientId:
|
|
13708
|
-
onAiUpload: x ? (e) =>
|
|
13709
|
-
formDisabled:
|
|
13735
|
+
scopeValues: { clientId: i },
|
|
13736
|
+
onAiUpload: x ? (e) => fe.runAction(a.groupNameForActions, t, x, e) : void 0,
|
|
13737
|
+
formDisabled: fe.busy
|
|
13710
13738
|
})
|
|
13711
13739
|
}), C = b.length > 0 ? (() => {
|
|
13712
13740
|
let e = Mn(b), n = (n) => /* @__PURE__ */ X(te, {
|
|
13713
13741
|
position: n,
|
|
13714
13742
|
actions: e[n],
|
|
13715
|
-
aiActions:
|
|
13743
|
+
aiActions: fe,
|
|
13716
13744
|
groupName: a.groupNameForActions,
|
|
13717
13745
|
field: t
|
|
13718
13746
|
}, n);
|
|
@@ -13743,41 +13771,41 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13743
13771
|
children: [
|
|
13744
13772
|
C,
|
|
13745
13773
|
/* @__PURE__ */ X(U_, {
|
|
13746
|
-
form:
|
|
13774
|
+
form: y,
|
|
13747
13775
|
field: t,
|
|
13748
13776
|
absoluteName: l
|
|
13749
13777
|
}),
|
|
13750
13778
|
T
|
|
13751
13779
|
]
|
|
13752
13780
|
}) : C, D = t.prefillWhen?.length ? /* @__PURE__ */ X(K_, {
|
|
13753
|
-
form:
|
|
13781
|
+
form: y,
|
|
13754
13782
|
rules: t.prefillWhen,
|
|
13755
13783
|
watchPath: m(t.prefillWhen[0].field) ? [...p, t.prefillWhen[0].field] : Fe(t.prefillWhen[0].field),
|
|
13756
13784
|
targetPath: l,
|
|
13757
13785
|
resetOnNoMatch: t.prefillWhenReset !== !1
|
|
13758
13786
|
}, `${t.field}-prefillWhen`) : null, O = !a.inline && an(t).length > 0, k = (e) => O ? bn(t, g, (t) => e(_n(t, m(t.field)))) : g;
|
|
13759
|
-
return
|
|
13787
|
+
return De(t.showIf) || O ? /* @__PURE__ */ Z(Gn.Fragment, { children: [D, /* @__PURE__ */ X(V.Item, {
|
|
13760
13788
|
shouldUpdate: !0,
|
|
13761
13789
|
noStyle: !0,
|
|
13762
|
-
children: ({ getFieldValue: e }) => !
|
|
13790
|
+
children: ({ getFieldValue: e }) => !De(t.showIf) || Ee(t.showIf, e, m) ? /* @__PURE__ */ X(B, {
|
|
13763
13791
|
xs: 24,
|
|
13764
13792
|
md: k(e),
|
|
13765
|
-
style:
|
|
13793
|
+
style: v,
|
|
13766
13794
|
className: a.inline ? "v1-combine-cell" : void 0,
|
|
13767
13795
|
children: E
|
|
13768
13796
|
}) : null
|
|
13769
13797
|
})] }, t.field) : /* @__PURE__ */ Z(Gn.Fragment, { children: [D, /* @__PURE__ */ X(B, {
|
|
13770
13798
|
xs: 24,
|
|
13771
13799
|
md: g,
|
|
13772
|
-
style:
|
|
13800
|
+
style: v,
|
|
13773
13801
|
className: a.inline ? "v1-combine-cell" : void 0,
|
|
13774
13802
|
children: E
|
|
13775
13803
|
})] }, t.field);
|
|
13776
|
-
},
|
|
13777
|
-
let n = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : [t.field],
|
|
13804
|
+
}, ke = (t) => {
|
|
13805
|
+
let n = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : [t.field], r = !!t.editablePermission && !Bt(t.editablePermission, e), a = /* @__PURE__ */ X(ov, {
|
|
13778
13806
|
field: t,
|
|
13779
13807
|
label: t.label,
|
|
13780
|
-
locked:
|
|
13808
|
+
locked: r
|
|
13781
13809
|
}), o = de(t), s = Array.isArray(t.subFields) && t.subFields.length > 0, c = s ? t.subFields.map((e) => ({
|
|
13782
13810
|
...e,
|
|
13783
13811
|
show: 1,
|
|
@@ -13798,42 +13826,42 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13798
13826
|
if (xv(t) && !(s ? n.some((e) => Q_(e)) : n.some((e) => e != null && e !== "" && !(Array.isArray(e) && e.length === 0)))) throw Error("Mandatory Field");
|
|
13799
13827
|
if (l > 0 && n.length < l) throw Error(`Keep at least ${l} ${s ? "row" : "value"}${l > 1 ? "s" : ""}.`);
|
|
13800
13828
|
} }],
|
|
13801
|
-
children: (
|
|
13829
|
+
children: (r, { add: a, remove: d }, { errors: f }) => /* @__PURE__ */ Z("div", {
|
|
13802
13830
|
className: "v1-addrow-wrapper",
|
|
13803
13831
|
children: [
|
|
13804
|
-
|
|
13832
|
+
r.map(({ key: a, name: u }) => /* @__PURE__ */ Z("div", {
|
|
13805
13833
|
className: "v1-addrow-item",
|
|
13806
13834
|
children: [/* @__PURE__ */ X(z, {
|
|
13807
13835
|
type: "text",
|
|
13808
13836
|
danger: !0,
|
|
13809
13837
|
icon: /* @__PURE__ */ X(si, {}),
|
|
13810
13838
|
onClick: () => d(u),
|
|
13811
|
-
disabled:
|
|
13839
|
+
disabled: r.length <= l,
|
|
13812
13840
|
className: "v1-addrow-delete-btn"
|
|
13813
13841
|
}), /* @__PURE__ */ X("div", {
|
|
13814
13842
|
className: "v1-addrow-fields",
|
|
13815
13843
|
children: s ? /* @__PURE__ */ X(Sr, {
|
|
13816
13844
|
gutter: [24, 0],
|
|
13817
13845
|
align: "top",
|
|
13818
|
-
children:
|
|
13846
|
+
children: je(c, u, n[0], !1, t.field)
|
|
13819
13847
|
}) : /* @__PURE__ */ X(V.Item, {
|
|
13820
13848
|
name: [u],
|
|
13821
13849
|
noStyle: !0,
|
|
13822
13850
|
valuePropName: t.type === "checkbox" && !t.options?.length ? "checked" : "value",
|
|
13823
13851
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
13824
|
-
rules: Sv(o,
|
|
13852
|
+
rules: Sv(o, y, [...n, u], !1),
|
|
13825
13853
|
children: /* @__PURE__ */ X(Ov, {
|
|
13826
13854
|
field: o,
|
|
13827
|
-
form:
|
|
13855
|
+
form: y,
|
|
13828
13856
|
name: [...n, u],
|
|
13829
13857
|
moduleName: e,
|
|
13830
|
-
scopeValues: { clientId:
|
|
13831
|
-
formDisabled:
|
|
13858
|
+
scopeValues: { clientId: i },
|
|
13859
|
+
formDisabled: fe.busy
|
|
13832
13860
|
})
|
|
13833
13861
|
})
|
|
13834
13862
|
})]
|
|
13835
13863
|
}, a)),
|
|
13836
|
-
(!u ||
|
|
13864
|
+
(!u || r.length < u) && /* @__PURE__ */ X(z, {
|
|
13837
13865
|
type: "link",
|
|
13838
13866
|
icon: /* @__PURE__ */ X(Yi, {}),
|
|
13839
13867
|
onClick: () => a(),
|
|
@@ -13846,7 +13874,7 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13846
13874
|
})
|
|
13847
13875
|
})
|
|
13848
13876
|
}, t.field);
|
|
13849
|
-
},
|
|
13877
|
+
}, Ae = (t, n, r) => {
|
|
13850
13878
|
let a = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : [t.field], o = !!t.editablePermission && !Bt(t.editablePermission, e), s = /* @__PURE__ */ X(ov, {
|
|
13851
13879
|
field: t,
|
|
13852
13880
|
label: t.label,
|
|
@@ -13856,7 +13884,7 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13856
13884
|
show: 1,
|
|
13857
13885
|
edit: 1
|
|
13858
13886
|
})) : null, d = Math.max(0, Number(t.minRows ?? 0) || 0), f = t.maxRows !== void 0 && t.maxRows !== "" && Number(t.maxRows) > 0 ? Number(t.maxRows) : 0, p = [n, ...a], m = [
|
|
13859
|
-
...Array.isArray(
|
|
13887
|
+
...Array.isArray(r) ? r : [r],
|
|
13860
13888
|
n,
|
|
13861
13889
|
...a
|
|
13862
13890
|
], h = Vn(t, void 0);
|
|
@@ -13875,10 +13903,10 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13875
13903
|
if (xv(t) && !n.some((e) => Q_(e))) throw Error("Mandatory Field");
|
|
13876
13904
|
if (d > 0 && n.length < d) throw Error(`Keep at least ${d} row${d > 1 ? "s" : ""}.`);
|
|
13877
13905
|
} }] : [],
|
|
13878
|
-
children: (n, { add:
|
|
13906
|
+
children: (n, { add: r, remove: a }, { errors: o }) => /* @__PURE__ */ Z("div", {
|
|
13879
13907
|
className: "v1-addrow-wrapper",
|
|
13880
13908
|
children: [
|
|
13881
|
-
n.map(({ key:
|
|
13909
|
+
n.map(({ key: r, name: o }) => {
|
|
13882
13910
|
let s = [...m, o];
|
|
13883
13911
|
return /* @__PURE__ */ Z("div", {
|
|
13884
13912
|
className: "v1-addrow-item",
|
|
@@ -13894,29 +13922,29 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13894
13922
|
children: l ? /* @__PURE__ */ X(Sr, {
|
|
13895
13923
|
gutter: [24, 0],
|
|
13896
13924
|
align: "top",
|
|
13897
|
-
children:
|
|
13925
|
+
children: je(u, o, m, !1, t.field)
|
|
13898
13926
|
}) : /* @__PURE__ */ X(V.Item, {
|
|
13899
13927
|
name: [o],
|
|
13900
13928
|
noStyle: !0,
|
|
13901
13929
|
valuePropName: t.type === "checkbox" && !t.options?.length ? "checked" : "value",
|
|
13902
13930
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
13903
|
-
rules: Sv(c,
|
|
13931
|
+
rules: Sv(c, y, s, !1),
|
|
13904
13932
|
children: /* @__PURE__ */ X(Ov, {
|
|
13905
13933
|
field: c,
|
|
13906
|
-
form:
|
|
13934
|
+
form: y,
|
|
13907
13935
|
name: s,
|
|
13908
13936
|
moduleName: e,
|
|
13909
|
-
scopeValues: { clientId:
|
|
13910
|
-
formDisabled:
|
|
13937
|
+
scopeValues: { clientId: i },
|
|
13938
|
+
formDisabled: fe.busy
|
|
13911
13939
|
})
|
|
13912
13940
|
})
|
|
13913
13941
|
})]
|
|
13914
|
-
},
|
|
13942
|
+
}, r);
|
|
13915
13943
|
}),
|
|
13916
13944
|
(!f || n.length < f) && /* @__PURE__ */ X(z, {
|
|
13917
13945
|
type: "link",
|
|
13918
13946
|
icon: /* @__PURE__ */ X(Yi, {}),
|
|
13919
|
-
onClick: () =>
|
|
13947
|
+
onClick: () => r(),
|
|
13920
13948
|
className: "v1-addrow-add-btn",
|
|
13921
13949
|
children: t.addLabel ?? `Add ${t.label ?? "Value"}`
|
|
13922
13950
|
}),
|
|
@@ -13925,21 +13953,21 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13925
13953
|
})
|
|
13926
13954
|
})
|
|
13927
13955
|
})
|
|
13928
|
-
}, `${
|
|
13929
|
-
},
|
|
13956
|
+
}, `${r}-${n}-${t.field}`);
|
|
13957
|
+
}, je = (e, t, n, r = !1, i) => {
|
|
13930
13958
|
let a = /* @__PURE__ */ new Set(), o = [], s = new Set(e.map((e) => e.field).filter(Boolean)), c = e.filter((e) => e.show === void 0 || Y_(e.show));
|
|
13931
13959
|
return c.forEach((e) => {
|
|
13932
13960
|
if (Y_(e.addRow) && t === void 0) {
|
|
13933
|
-
o.push(
|
|
13961
|
+
o.push(ke(e));
|
|
13934
13962
|
return;
|
|
13935
13963
|
}
|
|
13936
13964
|
if (Y_(e.addRow) && t !== void 0) {
|
|
13937
|
-
o.push(
|
|
13965
|
+
o.push(Ae(e, t, n));
|
|
13938
13966
|
return;
|
|
13939
13967
|
}
|
|
13940
13968
|
let l = e.combineKey?.trim?.();
|
|
13941
13969
|
if (!l) {
|
|
13942
|
-
o.push(
|
|
13970
|
+
o.push(Oe(e, t, n, {
|
|
13943
13971
|
hideLabel: r,
|
|
13944
13972
|
groupNameForActions: i,
|
|
13945
13973
|
rowFieldKeys: s
|
|
@@ -13951,15 +13979,15 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13951
13979
|
let d = c.filter((e) => e.combineKey === l);
|
|
13952
13980
|
d.forEach((e) => a.add(`${n ?? "root"}:${t ?? "root"}:${e.combineKey}`));
|
|
13953
13981
|
let f = d.find((e) => e.combineLabel) ?? e, p = n !== void 0 && t !== void 0 ? [...Array.isArray(n) ? n : [n], t] : null, m = /* @__PURE__ */ X(W_, {
|
|
13954
|
-
form:
|
|
13982
|
+
form: y,
|
|
13955
13983
|
field: f,
|
|
13956
13984
|
siblingPrefix: p,
|
|
13957
13985
|
combined: !0
|
|
13958
|
-
}), h = d.find((e) => e.combineToggleTarget)?.combineToggleTarget, g = d.find((e) => e.combineToggleLabel)?.combineToggleLabel ?? "Show range", _ = d.some((e) => Y_(e.combineWrap)),
|
|
13986
|
+
}), h = d.find((e) => e.combineToggleTarget)?.combineToggleTarget, g = d.find((e) => e.combineToggleLabel)?.combineToggleLabel ?? "Show range", _ = d.some((e) => Y_(e.combineWrap)), v = Number(d.find((e) => [12, 24].includes(Number(e.combineSpan)))?.combineSpan), b = h ? d.find((e) => Ce(e) === h) : null, x = b?.field?.includes?.(".") ? b.field.split(".") : [b?.field].filter(Boolean), S = b ? n !== void 0 && t !== void 0 ? [
|
|
13959
13987
|
n,
|
|
13960
13988
|
t,
|
|
13961
13989
|
...x
|
|
13962
|
-
] : x.length > 1 ? x : b.field : null, C = d.some((e) => xv(e)), w = [12, 24].includes(
|
|
13990
|
+
] : x.length > 1 ? x : b.field : null, C = d.some((e) => xv(e)), w = [12, 24].includes(v) ? v : d.length >= 3 ? 24 : 12, T = (e) => p && (!s || s.has(e)) ? p : null, E = d.some((e) => De(e.showIf)), D = (e) => d.some((t) => !De(t.showIf) || Ee(t.showIf, e, T)), O = /* @__PURE__ */ X(B, {
|
|
13963
13991
|
xs: 24,
|
|
13964
13992
|
md: w,
|
|
13965
13993
|
children: /* @__PURE__ */ X(V.Item, {
|
|
@@ -13971,13 +13999,13 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13971
13999
|
noStyle: !0,
|
|
13972
14000
|
shouldUpdate: !0,
|
|
13973
14001
|
children: ({ getFieldValue: e }) => {
|
|
13974
|
-
let r = S ? !Z_(e(S)) : !1, i =
|
|
14002
|
+
let r = S ? !Z_(e(S)) : !1, i = xe[u] ?? r, a = h && !i ? d.filter((e) => Ce(e) !== h) : d;
|
|
13975
14003
|
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(Sr, {
|
|
13976
14004
|
gutter: [8, 0],
|
|
13977
14005
|
align: "top",
|
|
13978
14006
|
wrap: _,
|
|
13979
14007
|
className: `v1-combine-row${_ ? " v1-combine-row-wrap" : ""}`,
|
|
13980
|
-
children: a.map((e) =>
|
|
14008
|
+
children: a.map((e) => Oe(C ? {
|
|
13981
14009
|
...e,
|
|
13982
14010
|
req: 1
|
|
13983
14011
|
} : e, t, n, { inline: !0 }))
|
|
@@ -13987,7 +14015,7 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
13987
14015
|
size: "small",
|
|
13988
14016
|
checked: i,
|
|
13989
14017
|
onChange: (e) => {
|
|
13990
|
-
!e && S && (
|
|
14018
|
+
!e && S && (y.setFieldValue(S, void 0), y.validateFields([S]).catch(() => {})), Se((t) => ({
|
|
13991
14019
|
...t,
|
|
13992
14020
|
[u]: e
|
|
13993
14021
|
}));
|
|
@@ -14008,25 +14036,25 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
14008
14036
|
children: ({ getFieldValue: e }) => D(e) ? O : null
|
|
14009
14037
|
}, u) : O);
|
|
14010
14038
|
}), o;
|
|
14011
|
-
},
|
|
14012
|
-
let t = e.name ?? e.id ?? "", n = F(
|
|
14039
|
+
}, Me = (e) => {
|
|
14040
|
+
let t = e.name ?? e.id ?? "", n = F(le, t), r = !!n && n.leaderName !== t, i = n ? ce.find((e) => e.name === n.leaderName) ?? e : e, a = Math.max(0, Number(i.minRows ?? 0) || 0), o = Math.max(0, Number(i.maxRows ?? 0) || 0), s = n ? n.memberNames : [t], c = () => {
|
|
14013
14041
|
s.forEach((t) => {
|
|
14014
|
-
let n =
|
|
14015
|
-
|
|
14042
|
+
let n = ce.find((e) => e.name === t) ?? e;
|
|
14043
|
+
ue.current[t]?.add(at(n, { editing: !0 }));
|
|
14016
14044
|
});
|
|
14017
14045
|
}, l = (e) => {
|
|
14018
|
-
s.forEach((t) =>
|
|
14046
|
+
s.forEach((t) => ue.current[t]?.remove(e));
|
|
14019
14047
|
};
|
|
14020
14048
|
return e.addRow ? /* @__PURE__ */ X(V.List, {
|
|
14021
14049
|
name: t,
|
|
14022
|
-
initialValue:
|
|
14050
|
+
initialValue: pe[e.name] ?? [],
|
|
14023
14051
|
rules: r ? [] : [{ validator: async (t, n = []) => {
|
|
14024
|
-
if (!(Y_(e.toggleEnabled) && e.toggleField &&
|
|
14052
|
+
if (!(Y_(e.toggleEnabled) && e.toggleField && y.getFieldValue(e.toggleField))) {
|
|
14025
14053
|
if (a > 0 && n.length < a) throw Error(`Keep at least ${a} row${a > 1 ? "s" : ""}.`);
|
|
14026
14054
|
if (Y_(e.requireOne) && n.some((e) => !Q_(e))) throw Error("Fill at least one field in each added row.");
|
|
14027
14055
|
}
|
|
14028
14056
|
} }],
|
|
14029
|
-
children: (n, { add: s, remove: u }, { errors: d }) => (
|
|
14057
|
+
children: (n, { add: s, remove: u }, { errors: d }) => (ue.current[t] = {
|
|
14030
14058
|
add: s,
|
|
14031
14059
|
remove: u
|
|
14032
14060
|
}, /* @__PURE__ */ Z("div", {
|
|
@@ -14053,7 +14081,7 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
14053
14081
|
md: e.col ?? 12,
|
|
14054
14082
|
className: "v1-addrow-header-label",
|
|
14055
14083
|
children: e.label
|
|
14056
|
-
},
|
|
14084
|
+
}, Ce(e)))
|
|
14057
14085
|
}),
|
|
14058
14086
|
n.map(({ key: r, name: i }) => /* @__PURE__ */ Z("div", {
|
|
14059
14087
|
className: "v1-addrow-item",
|
|
@@ -14069,7 +14097,7 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
14069
14097
|
children: /* @__PURE__ */ X(Sr, {
|
|
14070
14098
|
gutter: [24, 0],
|
|
14071
14099
|
align: "top",
|
|
14072
|
-
children:
|
|
14100
|
+
children: je(e.fields, i, t, Y_(e.sharedRowLabels), t)
|
|
14073
14101
|
})
|
|
14074
14102
|
})]
|
|
14075
14103
|
}, r)),
|
|
@@ -14078,10 +14106,10 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
14078
14106
|
}))
|
|
14079
14107
|
}) : /* @__PURE__ */ X(Sr, {
|
|
14080
14108
|
gutter: [24, 0],
|
|
14081
|
-
children:
|
|
14109
|
+
children: je(e.fields, void 0, void 0, !1, t)
|
|
14082
14110
|
});
|
|
14083
|
-
},
|
|
14084
|
-
let n = e.name ?? e.id ?? String(t), r =
|
|
14111
|
+
}, Ne = (e) => ce.filter((t) => t !== e && t.mergeInto && String(t.mergeInto) === String(e.name)), Pe = (e) => !!(e.mergeInto && ce.some((t) => t !== e && String(t.name) === String(e.mergeInto))), Ie = (e, t) => {
|
|
14112
|
+
let n = e.name ?? e.id ?? String(t), r = Me(e), i = Ne(e);
|
|
14085
14113
|
return /* @__PURE__ */ X(nr, {
|
|
14086
14114
|
className: "v1-card v1-edit-card",
|
|
14087
14115
|
title: /* @__PURE__ */ X(kv, {
|
|
@@ -14098,9 +14126,9 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
14098
14126
|
/* @__PURE__ */ X(z, {
|
|
14099
14127
|
type: "text",
|
|
14100
14128
|
size: "small",
|
|
14101
|
-
icon:
|
|
14129
|
+
icon: b[n] ? /* @__PURE__ */ X(ui, {}) : /* @__PURE__ */ X(Sa, {}),
|
|
14102
14130
|
onClick: (e) => {
|
|
14103
|
-
e.stopPropagation(),
|
|
14131
|
+
e.stopPropagation(), ge(n);
|
|
14104
14132
|
}
|
|
14105
14133
|
})
|
|
14106
14134
|
]
|
|
@@ -14111,17 +14139,17 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
14111
14139
|
children: ({ getFieldValue: t }) => {
|
|
14112
14140
|
let a = Y_(e.toggleEnabled) && e.toggleField && !!t(e.toggleField);
|
|
14113
14141
|
return /* @__PURE__ */ Z("div", {
|
|
14114
|
-
style: { display:
|
|
14142
|
+
style: { display: b[n] || a ? "none" : "block" },
|
|
14115
14143
|
children: [r, i.map((e) => {
|
|
14116
14144
|
let t = /* @__PURE__ */ Z("div", {
|
|
14117
14145
|
className: "v1-merged-group",
|
|
14118
14146
|
children: [/* @__PURE__ */ X("div", {
|
|
14119
14147
|
className: "v1-merged-group-title",
|
|
14120
14148
|
children: e.label ?? e.name
|
|
14121
|
-
}),
|
|
14149
|
+
}), Me(e)]
|
|
14122
14150
|
}, e.name);
|
|
14123
14151
|
return e.showIf?.field ? /* @__PURE__ */ X(iv, {
|
|
14124
|
-
form:
|
|
14152
|
+
form: y,
|
|
14125
14153
|
showIf: e.showIf,
|
|
14126
14154
|
render: () => t
|
|
14127
14155
|
}, e.name) : t;
|
|
@@ -14131,47 +14159,47 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
14131
14159
|
})
|
|
14132
14160
|
}, n);
|
|
14133
14161
|
};
|
|
14134
|
-
return /* @__PURE__ */ Z("main", { children: [
|
|
14162
|
+
return /* @__PURE__ */ Z("main", { children: [he.length > 0 && /* @__PURE__ */ X(Cn, { items: he }), /* @__PURE__ */ Z("div", {
|
|
14135
14163
|
className: "v1-edit-page",
|
|
14136
14164
|
children: [/* @__PURE__ */ X("div", {
|
|
14137
14165
|
className: "v1-page-inner",
|
|
14138
14166
|
children: /* @__PURE__ */ Z(Cr, {
|
|
14139
|
-
spinning:
|
|
14140
|
-
tip:
|
|
14167
|
+
spinning: w || fe.busy,
|
|
14168
|
+
tip: fe.busy ? "Running AI action…" : "Loading form fields...",
|
|
14141
14169
|
children: [
|
|
14142
|
-
|
|
14170
|
+
E && /* @__PURE__ */ X(Zn, {
|
|
14143
14171
|
type: "error",
|
|
14144
14172
|
showIcon: !0,
|
|
14145
|
-
message:
|
|
14173
|
+
message: E,
|
|
14146
14174
|
style: { marginBottom: 16 }
|
|
14147
14175
|
}),
|
|
14148
|
-
|
|
14176
|
+
A && /* @__PURE__ */ X(Zn, {
|
|
14149
14177
|
type: "error",
|
|
14150
14178
|
showIcon: !0,
|
|
14151
|
-
message:
|
|
14179
|
+
message: A,
|
|
14152
14180
|
style: { marginBottom: 16 }
|
|
14153
14181
|
}),
|
|
14154
14182
|
/* @__PURE__ */ Z(V, {
|
|
14155
|
-
form:
|
|
14183
|
+
form: y,
|
|
14156
14184
|
layout: "vertical",
|
|
14157
14185
|
colon: !1,
|
|
14158
14186
|
className: "v1-form",
|
|
14159
|
-
disabled:
|
|
14187
|
+
disabled: fe.busy,
|
|
14160
14188
|
requiredMark: (e, { required: t }) => /* @__PURE__ */ Z(Y, { children: [e, t && /* @__PURE__ */ X("span", {
|
|
14161
14189
|
className: "v1-required-mark",
|
|
14162
14190
|
children: " *"
|
|
14163
14191
|
})] }),
|
|
14164
|
-
onFinish:
|
|
14165
|
-
onFinishFailed:
|
|
14166
|
-
children: [
|
|
14167
|
-
form:
|
|
14192
|
+
onFinish: ye,
|
|
14193
|
+
onFinishFailed: be,
|
|
14194
|
+
children: [ce.filter((e) => !Pe(e)).map((e, t) => /* @__PURE__ */ X(rv, {
|
|
14195
|
+
form: y,
|
|
14168
14196
|
group: e,
|
|
14169
14197
|
children: e.showIf?.field ? /* @__PURE__ */ X(iv, {
|
|
14170
|
-
form:
|
|
14198
|
+
form: y,
|
|
14171
14199
|
showIf: e.showIf,
|
|
14172
|
-
render: () =>
|
|
14173
|
-
}) :
|
|
14174
|
-
}, e.name ?? `grp-${t}`)), !
|
|
14200
|
+
render: () => Ie(e, t)
|
|
14201
|
+
}) : Ie(e, t)
|
|
14202
|
+
}, e.name ?? `grp-${t}`)), !w && !E && ce.length === 0 && /* @__PURE__ */ X(Zn, {
|
|
14175
14203
|
type: "info",
|
|
14176
14204
|
showIcon: !0,
|
|
14177
14205
|
message: "No form fields are configured."
|
|
@@ -14180,22 +14208,22 @@ function Av({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
|
|
|
14180
14208
|
]
|
|
14181
14209
|
})
|
|
14182
14210
|
}), /* @__PURE__ */ Z("div", {
|
|
14183
|
-
className:
|
|
14211
|
+
className: g ? "v1-footer v1-footer--embedded" : "v1-footer",
|
|
14184
14212
|
children: [/* @__PURE__ */ X(B_, {
|
|
14185
14213
|
type: "secondary",
|
|
14186
14214
|
children: "All unsaved changes will be lost if you cancel and reload."
|
|
14187
14215
|
}), /* @__PURE__ */ Z(W, {
|
|
14188
14216
|
size: 12,
|
|
14189
14217
|
children: [/* @__PURE__ */ X(z, {
|
|
14190
|
-
onClick: () =>
|
|
14218
|
+
onClick: () => g && _ ? _() : v(c || -1),
|
|
14191
14219
|
children: "Cancel"
|
|
14192
14220
|
}), /* @__PURE__ */ X(G_, {
|
|
14193
|
-
form:
|
|
14194
|
-
groups:
|
|
14195
|
-
onClick: () =>
|
|
14196
|
-
disabled:
|
|
14197
|
-
loading:
|
|
14198
|
-
children:
|
|
14221
|
+
form: y,
|
|
14222
|
+
groups: ce,
|
|
14223
|
+
onClick: () => y.submit(),
|
|
14224
|
+
disabled: w || O,
|
|
14225
|
+
loading: O,
|
|
14226
|
+
children: s
|
|
14199
14227
|
})]
|
|
14200
14228
|
})]
|
|
14201
14229
|
})]
|
|
@@ -22358,7 +22386,7 @@ function aw({ collection: e, displayField: t, valueField: n, value: r, labelValu
|
|
|
22358
22386
|
getPopupContainer: () => document.body
|
|
22359
22387
|
});
|
|
22360
22388
|
}
|
|
22361
|
-
var ow = new Set(/* @__PURE__ */ "label.field.type.show.req.edit.order.formatter.validations.showOnAdd.addRow.minRows.maxRows.initialRows.addLabel.subFields.placeholder.hidePlaceholder.combineKey.combineLabel.combineRole.combineToggleLabel.combineToggleTarget.combineWidth.combineWrap.combineSpan.defaultOnEdit.noPrefill.emptyValues.valuePaths.clientScope.clientGateMessage.clientGateResetOnChange.visiblePermission.editablePermission.infoEnabled.infoText.helpText.payloadKey.prefillFrom.prefillFromModule.dataType.elementType.payloadMode.valueKey.displayKey.defaultValue.richValue.omitEmpty.payloadTemplate.transformRule.multiple.maxCount.fileKey.fileNameKey.fileUrlKey.accept.showIf.labelWhen.colWhen.colWhenField.colWhenOperator.colWhenValue.colWhenCol.verifyAction.verifyResultField.verifyTimestampField.prefillWhen.prefillWhenReset.verifyIdleLabel.verifyRetryLabel.verifySuccessLabel.disabledByField.linkedClearField.autofillFrom.aiActions.validator.dataSource.masterName.groupName.options.multiSelect.lookupCollection.displayField.displayField2.valueField.lookupFilterField.lookupFilterValueFrom.quickCreate.quickCreateModule.quickCreateLabel.quickEdit.quickEditModule.quickEditLabel.quickEditIdFrom.value.documentPreview.displayAs.renderType.renderOptions".split(".")), sw = new Set(/* @__PURE__ */ "module.name.label.addRow.order.fields.hideGroup.hideGroupInForm.moduleName.linkField.linkTypeField.parentRefField.hierarchyLevel.hierarchyParent.hierarchyLinkField.writeRefs.dependsOn.optionalWrite.appendHistory.historyField.historyFields.historyTimestampField.historyLabels.historyLabelFrom.historyAfterGroup.minRows.maxRows.initialRows.requireOne.requireValidatedField.requireValidatedFieldMessage.submitDisabledMessage.linkGroup.mergeInto.infoEnabled.infoText.toggleEnabled.toggleLabel.toggleField.afterSubmit.showIf.showIfField.showIfOperator.showIfValue.disabled.disabledIf.disabledIfField.disabledIfOperator.disabledIfValue.formActions.afterSubmitMode.afterSubmitTarget.submitMessages.submitMsgAddSuccess.submitMsgEditSuccess.submitMsgAddError.submitMsgEditError.submitMsgSuppress.id._id.rows.toggleValue".split("."));
|
|
22389
|
+
var ow = new Set(/* @__PURE__ */ "label.field.type.show.req.edit.order.formatter.validations.showOnAdd.addRow.minRows.maxRows.initialRows.addLabel.subFields.placeholder.hidePlaceholder.combineKey.combineLabel.combineRole.combineToggleLabel.combineToggleTarget.combineWidth.combineWrap.combineSpan.defaultOnEdit.noPrefill.emptyValues.valuePaths.clientScope.clientGateMessage.clientGateResetOnChange.visiblePermission.editablePermission.infoEnabled.infoText.helpText.payloadKey.prefillFrom.prefillFromModule.dataType.elementType.payloadMode.valueKey.displayKey.defaultValue.richValue.omitEmpty.payloadTemplate.transformRule.multiple.maxCount.fileKey.fileNameKey.fileUrlKey.accept.showIf.labelWhen.colWhen.colWhenField.colWhenOperator.colWhenValue.colWhenCol.verifyAction.verifyResultField.verifyTimestampField.prefillWhen.prefillWhenReset.verifyIdleLabel.verifyRetryLabel.verifySuccessLabel.disabledByField.linkedClearField.exclusiveInGroup.autofillFrom.aiActions.validator.dataSource.masterName.groupName.options.multiSelect.lookupCollection.displayField.displayField2.valueField.lookupFilterField.lookupFilterValueFrom.quickCreate.quickCreateModule.quickCreateLabel.quickEdit.quickEditModule.quickEditLabel.quickEditIdFrom.value.documentPreview.displayAs.renderType.renderOptions".split(".")), sw = new Set(/* @__PURE__ */ "module.name.label.addRow.order.fields.hideGroup.hideGroupInForm.moduleName.linkField.linkTypeField.parentRefField.hierarchyLevel.hierarchyParent.hierarchyLinkField.writeRefs.dependsOn.optionalWrite.appendHistory.historyField.historyFields.historyTimestampField.historyLabels.historyLabelFrom.historyAfterGroup.minRows.maxRows.initialRows.requireOne.requireValidatedField.requireValidatedFieldMessage.submitDisabledMessage.linkGroup.mergeInto.infoEnabled.infoText.toggleEnabled.toggleLabel.toggleField.afterSubmit.showIf.showIfField.showIfOperator.showIfValue.disabled.disabledIf.disabledIfField.disabledIfOperator.disabledIfValue.formActions.afterSubmitMode.afterSubmitTarget.submitMessages.submitMsgAddSuccess.submitMsgEditSuccess.submitMsgAddError.submitMsgEditError.submitMsgSuppress.id._id.rows.toggleValue".split("."));
|
|
22362
22390
|
function cw(e) {
|
|
22363
22391
|
return {
|
|
22364
22392
|
...e,
|
|
@@ -24879,6 +24907,22 @@ function uw({ form: e, fieldItems: t, add: n, remove: r, move: i, absBase: a, mo
|
|
|
24879
24907
|
/* @__PURE__ */ X("p", {
|
|
24880
24908
|
className: "fg-source-hint",
|
|
24881
24909
|
children: "When this checkbox is checked the specified sibling field is cleared and disabled."
|
|
24910
|
+
}),
|
|
24911
|
+
/* @__PURE__ */ Z("div", {
|
|
24912
|
+
style: { marginTop: 10 },
|
|
24913
|
+
children: [/* @__PURE__ */ X(V.Item, {
|
|
24914
|
+
name: [n, "exclusiveInGroup"],
|
|
24915
|
+
valuePropName: "checked",
|
|
24916
|
+
style: { marginBottom: 0 },
|
|
24917
|
+
children: /* @__PURE__ */ X(G, {
|
|
24918
|
+
size: "small",
|
|
24919
|
+
checkedChildren: "One row only",
|
|
24920
|
+
unCheckedChildren: "Any row"
|
|
24921
|
+
})
|
|
24922
|
+
}), /* @__PURE__ */ X("p", {
|
|
24923
|
+
className: "fg-source-hint",
|
|
24924
|
+
children: "Only one row of a repeatable group may have this checked — e.g. Currently Working Here / Currently Pursuing. Once a row is ticked the box is disabled on every other row; untick it to move the claim. No effect outside a repeatable group."
|
|
24925
|
+
})]
|
|
24882
24926
|
})
|
|
24883
24927
|
]
|
|
24884
24928
|
}) : i ? /* @__PURE__ */ Z("div", {
|