@realtek/core-theme 0.0.314 → 0.0.315
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/index.cjs +6 -6
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +198 -152
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -14625,7 +14625,22 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14625
14625
|
F(() => (r && f(r), () => {
|
|
14626
14626
|
r && g();
|
|
14627
14627
|
}), [r]);
|
|
14628
|
-
let [x, S] = L({}), [C, w] = L([]), [T, E] = L(
|
|
14628
|
+
let [x, S] = L({}), [C, w] = L([]), [T, E] = L([]);
|
|
14629
|
+
F(() => {
|
|
14630
|
+
if (!e || !n) {
|
|
14631
|
+
E([]);
|
|
14632
|
+
return;
|
|
14633
|
+
}
|
|
14634
|
+
let t = !1;
|
|
14635
|
+
return er(e, n).then((e) => {
|
|
14636
|
+
t || E(Array.isArray(e) ? e : e?.data ?? []);
|
|
14637
|
+
}).catch(() => {
|
|
14638
|
+
t || E([]);
|
|
14639
|
+
}), () => {
|
|
14640
|
+
t = !0;
|
|
14641
|
+
};
|
|
14642
|
+
}, [e, n]);
|
|
14643
|
+
let [D, O] = L(!1), [k, ee] = L(""), [j, te] = L(!1), [ne, re] = L(""), [N, ae] = L(null), [oe, se] = L(() => /* @__PURE__ */ new Set()), [ce, le] = L(""), ue = i || ce, [de, me] = L({});
|
|
14629
14644
|
F(() => {
|
|
14630
14645
|
dt();
|
|
14631
14646
|
}, []), F(() => {
|
|
@@ -14633,16 +14648,16 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14633
14648
|
return queueMicrotask(() => {
|
|
14634
14649
|
if (!t) {
|
|
14635
14650
|
if (!e) {
|
|
14636
|
-
|
|
14651
|
+
ae(null);
|
|
14637
14652
|
return;
|
|
14638
14653
|
}
|
|
14639
14654
|
Ae({ roleId: localStorage.getItem("roleId") }, e, {
|
|
14640
|
-
clientId:
|
|
14655
|
+
clientId: ue,
|
|
14641
14656
|
region: a
|
|
14642
14657
|
}).then((e) => {
|
|
14643
|
-
t ||
|
|
14658
|
+
t || ae(Array.isArray(e) && e.length ? e : null);
|
|
14644
14659
|
}).catch(() => {
|
|
14645
|
-
t ||
|
|
14660
|
+
t || ae(null);
|
|
14646
14661
|
});
|
|
14647
14662
|
}
|
|
14648
14663
|
}), () => {
|
|
@@ -14650,34 +14665,34 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14650
14665
|
};
|
|
14651
14666
|
}, [
|
|
14652
14667
|
e,
|
|
14653
|
-
|
|
14668
|
+
ue,
|
|
14654
14669
|
a
|
|
14655
14670
|
]), F(() => {
|
|
14656
14671
|
let t = !1;
|
|
14657
14672
|
return queueMicrotask(() => {
|
|
14658
14673
|
if (!t) {
|
|
14659
14674
|
if (!e) {
|
|
14660
|
-
|
|
14675
|
+
se(/* @__PURE__ */ new Set());
|
|
14661
14676
|
return;
|
|
14662
14677
|
}
|
|
14663
14678
|
Xe(e).then((e) => {
|
|
14664
|
-
t ||
|
|
14679
|
+
t || se(new Set(Array.isArray(e) ? e : []));
|
|
14665
14680
|
}).catch(() => {
|
|
14666
|
-
t ||
|
|
14681
|
+
t || se(/* @__PURE__ */ new Set());
|
|
14667
14682
|
});
|
|
14668
14683
|
}
|
|
14669
14684
|
}), () => {
|
|
14670
14685
|
t = !0;
|
|
14671
14686
|
};
|
|
14672
14687
|
}, [e]);
|
|
14673
|
-
let
|
|
14688
|
+
let he = I(() => mx(C, e, N, oe), [
|
|
14674
14689
|
C,
|
|
14675
14690
|
e,
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
]),
|
|
14691
|
+
N,
|
|
14692
|
+
oe
|
|
14693
|
+
]), ve = gi(async (e, t) => {
|
|
14679
14694
|
if (!Array.isArray(t) || t.length < 3 || typeof t[1] != "number") return;
|
|
14680
|
-
let n = t[0], r = t[1], i =
|
|
14695
|
+
let n = t[0], r = t[1], i = he.find((e) => e.name === n);
|
|
14681
14696
|
if (!i) return;
|
|
14682
14697
|
let a = A(i, Ve().region);
|
|
14683
14698
|
if (!a.orderBy) return;
|
|
@@ -14687,7 +14702,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14687
14702
|
group: a,
|
|
14688
14703
|
rows: o,
|
|
14689
14704
|
rowIndex: r,
|
|
14690
|
-
move:
|
|
14705
|
+
move: Ne.current[n]?.move,
|
|
14691
14706
|
confirm: ({ title: e, body: t, okText: n, cancelText: r, from: i, to: a }) => pt({
|
|
14692
14707
|
tone: "suggestion",
|
|
14693
14708
|
title: e,
|
|
@@ -14703,8 +14718,8 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14703
14718
|
cancelText: r
|
|
14704
14719
|
})
|
|
14705
14720
|
});
|
|
14706
|
-
}, [
|
|
14707
|
-
let t = Ve().region, n =
|
|
14721
|
+
}, [he, b]), ye = gi((e) => {
|
|
14722
|
+
let t = Ve().region, n = he.find((t) => (t.fields ?? []).some((t) => t.field === e.field));
|
|
14708
14723
|
if (!n) return !1;
|
|
14709
14724
|
let r = A(n, t), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
|
|
14710
14725
|
if (e.field !== i || Kr(r)) return !1;
|
|
@@ -14722,38 +14737,38 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14722
14737
|
body: pe(r),
|
|
14723
14738
|
okText: a ? "Got it" : "Keep it anyway"
|
|
14724
14739
|
}), a;
|
|
14725
|
-
}, [
|
|
14726
|
-
let n =
|
|
14740
|
+
}, [he]), be = gi((e, t) => {
|
|
14741
|
+
let n = he.find((e) => e.name === t);
|
|
14727
14742
|
if (!n) return;
|
|
14728
14743
|
let r = A(n, Ve().region), i = r.orderBy?.inProgressField ?? "currentStudyingHere";
|
|
14729
14744
|
if (e.field !== i) return;
|
|
14730
14745
|
let a = mt(r);
|
|
14731
14746
|
return a ? [a] : void 0;
|
|
14732
|
-
}, [
|
|
14747
|
+
}, [he]), [Se, P] = L(0), Te = I(() => Yt({
|
|
14733
14748
|
checkFieldUnique: _r,
|
|
14734
|
-
onPendingChange:
|
|
14735
|
-
}), []),
|
|
14736
|
-
checker:
|
|
14749
|
+
onPendingChange: P
|
|
14750
|
+
}), []), Ee = I(() => ({
|
|
14751
|
+
checker: Te,
|
|
14737
14752
|
module: e,
|
|
14738
14753
|
recordId: n,
|
|
14739
|
-
clientId:
|
|
14754
|
+
clientId: ue || void 0,
|
|
14740
14755
|
region: a || void 0
|
|
14741
14756
|
}), [
|
|
14742
|
-
|
|
14757
|
+
Te,
|
|
14743
14758
|
e,
|
|
14744
14759
|
n,
|
|
14745
|
-
|
|
14760
|
+
ue,
|
|
14746
14761
|
a
|
|
14747
|
-
]),
|
|
14762
|
+
]), ke = I(() => On(he), [he]), je = I(() => ie(he), [he]), Ne = yi({}), Pe = ge({
|
|
14748
14763
|
form: b,
|
|
14749
|
-
groups:
|
|
14764
|
+
groups: he,
|
|
14750
14765
|
module: e
|
|
14751
|
-
}),
|
|
14766
|
+
}), Fe = I(() => {
|
|
14752
14767
|
let e = {};
|
|
14753
|
-
return
|
|
14768
|
+
return he.forEach((t) => {
|
|
14754
14769
|
t.addRow && (e[t.name] = tt(t));
|
|
14755
|
-
}), De(
|
|
14756
|
-
}, [
|
|
14770
|
+
}), De(je, e);
|
|
14771
|
+
}, [he, je]), Le = {
|
|
14757
14772
|
jobs: {
|
|
14758
14773
|
list: "Jobs",
|
|
14759
14774
|
path: "/jobs",
|
|
@@ -14769,8 +14784,8 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14769
14784
|
path: "/submissions",
|
|
14770
14785
|
edit: "Edit Submission"
|
|
14771
14786
|
}
|
|
14772
|
-
},
|
|
14773
|
-
let t =
|
|
14787
|
+
}, Re = h ? [] : o.length > 0 ? o : (() => {
|
|
14788
|
+
let t = Le[ix(e)];
|
|
14774
14789
|
return t ? [
|
|
14775
14790
|
{
|
|
14776
14791
|
label: "Home",
|
|
@@ -14788,16 +14803,16 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14788
14803
|
let r = !1;
|
|
14789
14804
|
async function o() {
|
|
14790
14805
|
try {
|
|
14791
|
-
|
|
14806
|
+
O(!0), ee(""), re("");
|
|
14792
14807
|
let o = await ui({
|
|
14793
14808
|
module: e,
|
|
14794
14809
|
id: n,
|
|
14795
|
-
clientId:
|
|
14810
|
+
clientId: ue,
|
|
14796
14811
|
region: a,
|
|
14797
14812
|
group: t
|
|
14798
14813
|
});
|
|
14799
14814
|
if (r) return;
|
|
14800
|
-
if (w(Array.isArray(o) ? o : []),
|
|
14815
|
+
if (w(Array.isArray(o) ? o : []), me(o?.recordMeta ?? {}), !i) {
|
|
14801
14816
|
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) || "");
|
|
14802
14817
|
if (!n && i) try {
|
|
14803
14818
|
let e = await ui({
|
|
@@ -14806,12 +14821,12 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14806
14821
|
});
|
|
14807
14822
|
n = String(t(e?.recordMeta?.clientId) || "");
|
|
14808
14823
|
} catch {}
|
|
14809
|
-
!r && n && n !==
|
|
14824
|
+
!r && n && n !== ce && le(n);
|
|
14810
14825
|
}
|
|
14811
14826
|
} catch (t) {
|
|
14812
|
-
console.error(`Failed to fetch ${e} edit data:`, t), r ||
|
|
14827
|
+
console.error(`Failed to fetch ${e} edit data:`, t), r || ee(t?.message || "Failed to load record");
|
|
14813
14828
|
} finally {
|
|
14814
|
-
r ||
|
|
14829
|
+
r || O(!1);
|
|
14815
14830
|
}
|
|
14816
14831
|
}
|
|
14817
14832
|
return o(), () => {
|
|
@@ -14822,20 +14837,51 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14822
14837
|
t,
|
|
14823
14838
|
n,
|
|
14824
14839
|
i,
|
|
14840
|
+
ue,
|
|
14825
14841
|
ce,
|
|
14826
|
-
oe,
|
|
14827
14842
|
a
|
|
14828
14843
|
]), F(() => {
|
|
14829
|
-
|
|
14844
|
+
D || he.length === 0 || fe(b, he);
|
|
14830
14845
|
}, [
|
|
14846
|
+
D,
|
|
14847
|
+
he,
|
|
14848
|
+
b
|
|
14849
|
+
]), F(() => {
|
|
14850
|
+
if (D || he.length === 0 || T.length === 0) return;
|
|
14851
|
+
let e = /* @__PURE__ */ new Map();
|
|
14852
|
+
T.forEach((t) => {
|
|
14853
|
+
let n = t?.fieldName || t?.field;
|
|
14854
|
+
n && (e.has(n) || e.set(n, []), e.get(n).push(t));
|
|
14855
|
+
});
|
|
14856
|
+
let t = {}, n = !1;
|
|
14857
|
+
he.forEach((r) => {
|
|
14858
|
+
ex(r.addRow) || (r.fields ?? []).forEach((r) => {
|
|
14859
|
+
if (!r?.field || !Vt(r)) return;
|
|
14860
|
+
let i = b.getFieldValue(Kn(r.field));
|
|
14861
|
+
if (Array.isArray(i) ? i.length > 0 : !nx(i)) return;
|
|
14862
|
+
let a = e.get(r.field) ?? (r.fileKey ? e.get(r.fileKey) : null);
|
|
14863
|
+
if (!a?.length) return;
|
|
14864
|
+
let o = ex(r.multiple) ? Number(r.maxCount ?? 5) : 1;
|
|
14865
|
+
M(t, r.field, a.slice(0, o).map((e) => ({
|
|
14866
|
+
uid: String(e._id ?? e.s3Key ?? e.fileName),
|
|
14867
|
+
name: e.fileName ?? e.uniqueName ?? "file",
|
|
14868
|
+
status: "done",
|
|
14869
|
+
url: e.fileUrl ?? e.s3Key ?? "",
|
|
14870
|
+
existing: !0,
|
|
14871
|
+
stored: e
|
|
14872
|
+
}))), n = !0;
|
|
14873
|
+
});
|
|
14874
|
+
}), n && b.setFieldsValue(t);
|
|
14875
|
+
}, [
|
|
14876
|
+
D,
|
|
14877
|
+
he,
|
|
14831
14878
|
T,
|
|
14832
|
-
de,
|
|
14833
14879
|
b
|
|
14834
14880
|
]);
|
|
14835
|
-
let
|
|
14881
|
+
let Be = y.state?.carryFiles;
|
|
14836
14882
|
F(() => {
|
|
14837
|
-
if (
|
|
14838
|
-
let e = Object.entries(
|
|
14883
|
+
if (D || !Be) return;
|
|
14884
|
+
let e = Object.entries(Be).filter(([, e]) => Array.isArray(e) && e.length > 0);
|
|
14839
14885
|
e.length && (b.setFieldsValue(Object.fromEntries(e)), q.info("The résumé you uploaded has been attached here — save to keep it."), v(y.pathname + y.search, {
|
|
14840
14886
|
replace: !0,
|
|
14841
14887
|
state: {
|
|
@@ -14844,29 +14890,29 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14844
14890
|
}
|
|
14845
14891
|
}));
|
|
14846
14892
|
}, [
|
|
14847
|
-
|
|
14848
|
-
|
|
14893
|
+
D,
|
|
14894
|
+
Be,
|
|
14849
14895
|
b,
|
|
14850
14896
|
v,
|
|
14851
14897
|
y.pathname,
|
|
14852
14898
|
y.search,
|
|
14853
14899
|
y.state
|
|
14854
14900
|
]);
|
|
14855
|
-
let
|
|
14901
|
+
let He = I(() => xe(he.map((e) => ({
|
|
14856
14902
|
...e,
|
|
14857
14903
|
fields: (e.fields ?? []).filter(Rt)
|
|
14858
|
-
})), ix), [
|
|
14904
|
+
})), ix), [he]), [Ue, Ge] = L({});
|
|
14859
14905
|
F(() => {
|
|
14860
|
-
if (
|
|
14906
|
+
if (He.length === 0) return;
|
|
14861
14907
|
let e = !1;
|
|
14862
|
-
return
|
|
14863
|
-
let n = Ie(t,
|
|
14908
|
+
return He.forEach(async (t) => {
|
|
14909
|
+
let n = Ie(t, de);
|
|
14864
14910
|
if (n) try {
|
|
14865
14911
|
let r = Me(vr(await ui({
|
|
14866
14912
|
module: t,
|
|
14867
14913
|
id: n
|
|
14868
14914
|
})));
|
|
14869
|
-
!e && Object.keys(r).length > 0 &&
|
|
14915
|
+
!e && Object.keys(r).length > 0 && Ge((e) => ({
|
|
14870
14916
|
...e,
|
|
14871
14917
|
[t]: r
|
|
14872
14918
|
}));
|
|
@@ -14876,50 +14922,50 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14876
14922
|
}), () => {
|
|
14877
14923
|
e = !0;
|
|
14878
14924
|
};
|
|
14879
|
-
}, [
|
|
14880
|
-
if (
|
|
14925
|
+
}, [He, de]), F(() => {
|
|
14926
|
+
if (D || he.length === 0 || Object.keys(Ue).length === 0) return;
|
|
14881
14927
|
let e = {}, t = !1;
|
|
14882
|
-
|
|
14928
|
+
he.forEach((n) => (n.fields ?? []).forEach((n) => {
|
|
14883
14929
|
if (!n.field || !n.prefillFromModule || !Rt(n)) return;
|
|
14884
|
-
let r =
|
|
14930
|
+
let r = Ue[ix(n.prefillFromModule)], i = Pt(r, n);
|
|
14885
14931
|
i != null && (M(e, n.field, i), t = !0);
|
|
14886
14932
|
})), t && b.setFieldsValue(e);
|
|
14887
14933
|
}, [
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
14934
|
+
Ue,
|
|
14935
|
+
D,
|
|
14936
|
+
he,
|
|
14891
14937
|
b
|
|
14892
14938
|
]);
|
|
14893
|
-
let
|
|
14939
|
+
let Ke = (e) => {
|
|
14894
14940
|
S((t) => ({
|
|
14895
14941
|
...t,
|
|
14896
14942
|
[e]: !t[e]
|
|
14897
14943
|
}));
|
|
14898
|
-
},
|
|
14944
|
+
}, qe = I(() => he.map((e) => `${e.name}:${+!!ex(e.allowCollapse)}${+!!ex(e.defaultCollapsed)}`).join("|"), [he]), Ye = yi(null);
|
|
14899
14945
|
F(() => {
|
|
14900
|
-
if (!
|
|
14901
|
-
|
|
14946
|
+
if (!he.length || Ye.current === qe) return;
|
|
14947
|
+
Ye.current = qe;
|
|
14902
14948
|
let e = {};
|
|
14903
|
-
|
|
14949
|
+
he.forEach((t, n) => {
|
|
14904
14950
|
let r = t.name ?? t.id ?? String(n);
|
|
14905
14951
|
ex(t.allowCollapse) && ex(t.defaultCollapsed) && (e[r] = !0);
|
|
14906
14952
|
}), S(e);
|
|
14907
|
-
}, [
|
|
14908
|
-
function
|
|
14909
|
-
let n = Nt(t,
|
|
14953
|
+
}, [qe, he]);
|
|
14954
|
+
function Ze(t) {
|
|
14955
|
+
let n = Nt(t, he, { module: e });
|
|
14910
14956
|
return Object.entries(u).forEach(([e, t]) => {
|
|
14911
14957
|
n[e] !== void 0 && (n[t] = n[e], delete n[e]);
|
|
14912
14958
|
}), n;
|
|
14913
14959
|
}
|
|
14914
|
-
async function
|
|
14960
|
+
async function Qe(t) {
|
|
14915
14961
|
if (!(p && await Promise.resolve().then(() => p(t)).catch(() => !1) === !1)) try {
|
|
14916
|
-
|
|
14917
|
-
let r = ze(t,
|
|
14962
|
+
te(!0), re("");
|
|
14963
|
+
let r = ze(t, he, {
|
|
14918
14964
|
indexed: !0,
|
|
14919
14965
|
module: e
|
|
14920
14966
|
});
|
|
14921
14967
|
if (d && d.useLegacyUpload) {
|
|
14922
|
-
let e =
|
|
14968
|
+
let e = he.flatMap((e) => e.fields ?? []).filter(Vt);
|
|
14923
14969
|
for (let r of e) {
|
|
14924
14970
|
let e = t[r.field];
|
|
14925
14971
|
if (!Array.isArray(e)) continue;
|
|
@@ -14932,19 +14978,19 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14932
14978
|
}
|
|
14933
14979
|
}
|
|
14934
14980
|
await hr(e, n, {
|
|
14935
|
-
...
|
|
14981
|
+
...Ze(t),
|
|
14936
14982
|
...m ?? {}
|
|
14937
14983
|
}, d?.useLegacyUpload ? [] : r);
|
|
14938
|
-
let i = ze(t,
|
|
14984
|
+
let i = ze(t, he, { module: e });
|
|
14939
14985
|
if (!d?.useLegacyUpload && i.length > 0) try {
|
|
14940
14986
|
await jn(e, n, i);
|
|
14941
14987
|
} catch (e) {
|
|
14942
14988
|
console.error("Document registry upload failed during edit:", e), q.warning("Changes saved, but saving document records failed.");
|
|
14943
14989
|
}
|
|
14944
|
-
let a = dn(
|
|
14990
|
+
let a = dn(he, e, "edit");
|
|
14945
14991
|
if (a && q.success(a), l) l(n, t);
|
|
14946
14992
|
else {
|
|
14947
|
-
let e = We(
|
|
14993
|
+
let e = We(he);
|
|
14948
14994
|
if (!e) zn(v, { cancelPath: c });
|
|
14949
14995
|
else if (e.mode === "back") zn(v, { cancelPath: c });
|
|
14950
14996
|
else if (e.mode === "route" || e.mode === "detail") {
|
|
@@ -14953,15 +14999,15 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14953
14999
|
}
|
|
14954
15000
|
}
|
|
14955
15001
|
} catch (t) {
|
|
14956
|
-
if (console.error(`Failed to update ${e}:`, t),
|
|
14957
|
-
let n = Lr(
|
|
14958
|
-
|
|
15002
|
+
if (console.error(`Failed to update ${e}:`, t), $e(t)) return;
|
|
15003
|
+
let n = Lr(he, e, "edit", t?.message);
|
|
15004
|
+
re(n), q.error(n);
|
|
14959
15005
|
} finally {
|
|
14960
|
-
|
|
15006
|
+
te(!1);
|
|
14961
15007
|
}
|
|
14962
15008
|
}
|
|
14963
|
-
function
|
|
14964
|
-
let t = Gr(e, { uniqueRules:
|
|
15009
|
+
function $e(e) {
|
|
15010
|
+
let t = Gr(e, { uniqueRules: ke });
|
|
14965
15011
|
return t.length === 0 ? !1 : (b.setFields(t.map((e) => ({
|
|
14966
15012
|
name: e.name ?? e.field,
|
|
14967
15013
|
errors: [e.message]
|
|
@@ -14973,11 +15019,11 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14973
15019
|
};
|
|
14974
15020
|
}) }, b), !0);
|
|
14975
15021
|
}
|
|
14976
|
-
let
|
|
15022
|
+
let et = (e) => {
|
|
14977
15023
|
S({}), qn(e, b);
|
|
14978
|
-
}, [
|
|
15024
|
+
}, [nt, rt] = L({}), it = (e) => String(e?.field ?? ""), at = (e, t) => typeof e == "function" ? e(t) : e, ot = (e, t, n) => {
|
|
14979
15025
|
if (!e?.field) return !0;
|
|
14980
|
-
let r =
|
|
15026
|
+
let r = at(n, e.field), i = t(r == null ? [e.field] : [...Array.isArray(r) ? r : [r], e.field]);
|
|
14981
15027
|
switch (e.operator) {
|
|
14982
15028
|
case "eq": return String(i ?? "") === String(e.value ?? "");
|
|
14983
15029
|
case "neq": return String(i ?? "") !== String(e.value ?? "");
|
|
@@ -14988,19 +15034,19 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
14988
15034
|
case "notIn": return !String(e.value ?? "").split(",").map((e) => e.trim()).includes(String(i ?? ""));
|
|
14989
15035
|
default: return !0;
|
|
14990
15036
|
}
|
|
14991
|
-
},
|
|
15037
|
+
}, st = (e, t, n) => {
|
|
14992
15038
|
if (!e) return !0;
|
|
14993
15039
|
let r = Array.isArray(e.conditions) ? e.conditions.filter((e) => e?.field) : [];
|
|
14994
15040
|
if (r.length) {
|
|
14995
|
-
let i = r.map((e) =>
|
|
15041
|
+
let i = r.map((e) => ot(e, t, n)), a = String(e.logic ?? "and").toLowerCase() === "or", o = a ? i.some(Boolean) : i.every(Boolean);
|
|
14996
15042
|
if (e.field) {
|
|
14997
|
-
let r =
|
|
15043
|
+
let r = ot(e, t, n);
|
|
14998
15044
|
o = a ? o || r : o && r;
|
|
14999
15045
|
}
|
|
15000
15046
|
return o;
|
|
15001
15047
|
}
|
|
15002
|
-
return
|
|
15003
|
-
},
|
|
15048
|
+
return ot(e, t, n);
|
|
15049
|
+
}, ct = (e) => !!(e?.field || e?.conditions?.some?.((e) => e?.field)), lt = (t, n, r, a = {}) => {
|
|
15004
15050
|
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 && !_e(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 = _n(t), g = h ? Pr(t, l, m) : null, _ = a.inline || a.hideLabel || !u && t.type === "checkbox" ? "" : /* @__PURE__ */ Y(Yb, {
|
|
15005
15051
|
form: b,
|
|
15006
15052
|
field: t,
|
|
@@ -15023,7 +15069,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15023
15069
|
name: c,
|
|
15024
15070
|
extra: Nx(t),
|
|
15025
15071
|
required: Cx(t),
|
|
15026
|
-
rules: wx(t, b, l, !1, m,
|
|
15072
|
+
rules: wx(t, b, l, !1, m, Ee, be(t, a.groupNameForActions)),
|
|
15027
15073
|
dependencies: x,
|
|
15028
15074
|
valuePropName: d,
|
|
15029
15075
|
getValueFromEvent: t.type === "file" ? (e) => Array.isArray(e) ? e : e?.fileList : void 0,
|
|
@@ -15036,10 +15082,10 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15036
15082
|
moduleName: e,
|
|
15037
15083
|
initialValue: t.value,
|
|
15038
15084
|
scopeValues: { clientId: i },
|
|
15039
|
-
onAiUpload: T ? (e) =>
|
|
15040
|
-
formDisabled:
|
|
15041
|
-
onRegionBlocked:
|
|
15042
|
-
onRowOrderChange:
|
|
15085
|
+
onAiUpload: T ? (e) => Pe.runAction(a.groupNameForActions, t, T, e) : void 0,
|
|
15086
|
+
formDisabled: Pe.busy,
|
|
15087
|
+
onRegionBlocked: ye,
|
|
15088
|
+
onRowOrderChange: ve
|
|
15043
15089
|
})
|
|
15044
15090
|
}), D = S && !v ? /* @__PURE__ */ Y(K, {
|
|
15045
15091
|
title: S,
|
|
@@ -15051,7 +15097,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15051
15097
|
let e = xt(w), n = (n) => /* @__PURE__ */ Y(Yr, {
|
|
15052
15098
|
position: n,
|
|
15053
15099
|
actions: e[n],
|
|
15054
|
-
aiActions:
|
|
15100
|
+
aiActions: Pe,
|
|
15055
15101
|
groupName: a.groupNameForActions,
|
|
15056
15102
|
field: t
|
|
15057
15103
|
}, n);
|
|
@@ -15101,10 +15147,10 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15101
15147
|
targetPath: l,
|
|
15102
15148
|
resetOnNoMatch: t.prefillWhenReset !== !1
|
|
15103
15149
|
}, `${t.field}-prefillWhen`) : null, M = !a.inline && rr(t).length > 0, ne = (e) => M ? Dr(t, y, (t) => e(Sr(t, m(t.field)))) : y;
|
|
15104
|
-
return
|
|
15150
|
+
return ct(t.showIf) || M ? /* @__PURE__ */ X(fi.Fragment, { children: [te, /* @__PURE__ */ Y(B.Item, {
|
|
15105
15151
|
shouldUpdate: !0,
|
|
15106
15152
|
noStyle: !0,
|
|
15107
|
-
children: ({ getFieldValue: e }) => !
|
|
15153
|
+
children: ({ getFieldValue: e }) => !ct(t.showIf) || st(t.showIf, e, m) ? /* @__PURE__ */ Y(z, {
|
|
15108
15154
|
xs: 24,
|
|
15109
15155
|
md: ne(e),
|
|
15110
15156
|
style: C,
|
|
@@ -15118,7 +15164,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15118
15164
|
className: a.inline ? "v1-combine-cell" : void 0,
|
|
15119
15165
|
children: j
|
|
15120
15166
|
})] }, t.field);
|
|
15121
|
-
},
|
|
15167
|
+
}, ut = (t) => {
|
|
15122
15168
|
let n = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : [t.field], r = !!t.editablePermission && !_e(t.editablePermission, e), a = /* @__PURE__ */ Y(dx, {
|
|
15123
15169
|
field: t,
|
|
15124
15170
|
label: t.label,
|
|
@@ -15160,7 +15206,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15160
15206
|
children: s ? /* @__PURE__ */ Y(Gi, {
|
|
15161
15207
|
gutter: [24, 0],
|
|
15162
15208
|
align: "top",
|
|
15163
|
-
children:
|
|
15209
|
+
children: gt(c, u, n[0], !1, t.field)
|
|
15164
15210
|
}) : /* @__PURE__ */ Y(B.Item, {
|
|
15165
15211
|
name: [u],
|
|
15166
15212
|
noStyle: !0,
|
|
@@ -15173,9 +15219,9 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15173
15219
|
name: [...n, u],
|
|
15174
15220
|
moduleName: e,
|
|
15175
15221
|
scopeValues: { clientId: i },
|
|
15176
|
-
formDisabled:
|
|
15177
|
-
onRegionBlocked:
|
|
15178
|
-
onRowOrderChange:
|
|
15222
|
+
formDisabled: Pe.busy,
|
|
15223
|
+
onRegionBlocked: ye,
|
|
15224
|
+
onRowOrderChange: ve
|
|
15179
15225
|
})
|
|
15180
15226
|
})
|
|
15181
15227
|
})]
|
|
@@ -15193,7 +15239,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15193
15239
|
})
|
|
15194
15240
|
})
|
|
15195
15241
|
}, t.field);
|
|
15196
|
-
},
|
|
15242
|
+
}, ft = (t, n, r) => {
|
|
15197
15243
|
let a = typeof t.field == "string" && t.field.includes(".") ? t.field.split(".") : [t.field], o = !!t.editablePermission && !_e(t.editablePermission, e), s = /* @__PURE__ */ Y(dx, {
|
|
15198
15244
|
field: t,
|
|
15199
15245
|
label: t.label,
|
|
@@ -15241,7 +15287,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15241
15287
|
children: l ? /* @__PURE__ */ Y(Gi, {
|
|
15242
15288
|
gutter: [24, 0],
|
|
15243
15289
|
align: "top",
|
|
15244
|
-
children:
|
|
15290
|
+
children: gt(u, o, m, !1, t.field)
|
|
15245
15291
|
}) : /* @__PURE__ */ Y(B.Item, {
|
|
15246
15292
|
name: [o],
|
|
15247
15293
|
noStyle: !0,
|
|
@@ -15254,9 +15300,9 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15254
15300
|
name: s,
|
|
15255
15301
|
moduleName: e,
|
|
15256
15302
|
scopeValues: { clientId: i },
|
|
15257
|
-
formDisabled:
|
|
15258
|
-
onRegionBlocked:
|
|
15259
|
-
onRowOrderChange:
|
|
15303
|
+
formDisabled: Pe.busy,
|
|
15304
|
+
onRegionBlocked: ye,
|
|
15305
|
+
onRowOrderChange: ve
|
|
15260
15306
|
})
|
|
15261
15307
|
})
|
|
15262
15308
|
})]
|
|
@@ -15275,7 +15321,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15275
15321
|
})
|
|
15276
15322
|
})
|
|
15277
15323
|
}, `${r}-${n}-${t.field}`);
|
|
15278
|
-
},
|
|
15324
|
+
}, ht = (e, t) => e.filter((e) => e.field && e.show !== void 0 && !ex(e.show)).map((e) => {
|
|
15279
15325
|
let n = String(e.field).includes(".") ? String(e.field).split(".") : e.field, r = t === void 0 ? n : [t, ...Array.isArray(n) ? n : [n]];
|
|
15280
15326
|
return /* @__PURE__ */ Y(B.Item, {
|
|
15281
15327
|
name: r,
|
|
@@ -15283,20 +15329,20 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15283
15329
|
noStyle: !0,
|
|
15284
15330
|
children: /* @__PURE__ */ Y(V, {})
|
|
15285
15331
|
}, `hidden-${e.field}`);
|
|
15286
|
-
}),
|
|
15332
|
+
}), gt = (e, t, n, r = !1, i) => {
|
|
15287
15333
|
let a = /* @__PURE__ */ new Set(), o = [], s = new Set(e.map((e) => e.field).filter(Boolean)), c = e.filter((e) => e.show === void 0 || ex(e.show));
|
|
15288
|
-
return o.push(...
|
|
15334
|
+
return o.push(...ht(e, t)), c.forEach((e) => {
|
|
15289
15335
|
if (ex(e.addRow) && t === void 0) {
|
|
15290
|
-
o.push(
|
|
15336
|
+
o.push(ut(e));
|
|
15291
15337
|
return;
|
|
15292
15338
|
}
|
|
15293
15339
|
if (ex(e.addRow) && t !== void 0) {
|
|
15294
|
-
o.push(
|
|
15340
|
+
o.push(ft(e, t, n));
|
|
15295
15341
|
return;
|
|
15296
15342
|
}
|
|
15297
15343
|
let l = e.combineKey?.trim?.();
|
|
15298
15344
|
if (!l) {
|
|
15299
|
-
o.push(
|
|
15345
|
+
o.push(lt(e, t, n, {
|
|
15300
15346
|
hideLabel: r,
|
|
15301
15347
|
groupNameForActions: i,
|
|
15302
15348
|
rowFieldKeys: s
|
|
@@ -15324,11 +15370,11 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15324
15370
|
flagPath: Pr(m, g, h),
|
|
15325
15371
|
fieldPath: g
|
|
15326
15372
|
})]
|
|
15327
|
-
}) : _, y = d.find((e) => e.combineToggleTarget)?.combineToggleTarget, x = d.find((e) => e.combineToggleLabel)?.combineToggleLabel ?? "Show range", S = d.some((e) => ex(e.combineWrap)), C = Number(d.find((e) => [12, 24].includes(Number(e.combineSpan)))?.combineSpan), w = y ? d.find((e) =>
|
|
15373
|
+
}) : _, y = d.find((e) => e.combineToggleTarget)?.combineToggleTarget, x = d.find((e) => e.combineToggleLabel)?.combineToggleLabel ?? "Show range", S = d.some((e) => ex(e.combineWrap)), C = Number(d.find((e) => [12, 24].includes(Number(e.combineSpan)))?.combineSpan), w = y ? d.find((e) => it(e) === y) : null, T = w?.field?.includes?.(".") ? w.field.split(".") : [w?.field].filter(Boolean), E = w ? n !== void 0 && t !== void 0 ? [
|
|
15328
15374
|
n,
|
|
15329
15375
|
t,
|
|
15330
15376
|
...T
|
|
15331
|
-
] : T.length > 1 ? T : w.field : null, D = d.some((e) => Cx(e)), O = [12, 24].includes(C) ? C : d.length >= 3 ? 24 : 12, k = (e) => p && (!s || s.has(e)) ? p : null, ee = d.some((e) =>
|
|
15377
|
+
] : T.length > 1 ? T : w.field : null, D = d.some((e) => Cx(e)), O = [12, 24].includes(C) ? C : d.length >= 3 ? 24 : 12, k = (e) => p && (!s || s.has(e)) ? p : null, ee = d.some((e) => ct(e.showIf)), A = (e) => d.some((t) => !ct(t.showIf) || st(t.showIf, e, k)), j = /* @__PURE__ */ Y(z, {
|
|
15332
15378
|
xs: 24,
|
|
15333
15379
|
md: O,
|
|
15334
15380
|
children: /* @__PURE__ */ Y(B.Item, {
|
|
@@ -15340,13 +15386,13 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15340
15386
|
noStyle: !0,
|
|
15341
15387
|
shouldUpdate: !0,
|
|
15342
15388
|
children: ({ getFieldValue: e }) => {
|
|
15343
|
-
let r = E ? !nx(e(E)) : !1, i =
|
|
15389
|
+
let r = E ? !nx(e(E)) : !1, i = nt[u] ?? r, a = y && !i ? d.filter((e) => it(e) !== y) : d;
|
|
15344
15390
|
return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Gi, {
|
|
15345
15391
|
gutter: [8, 0],
|
|
15346
15392
|
align: "top",
|
|
15347
15393
|
wrap: S,
|
|
15348
15394
|
className: `v1-combine-row${S ? " v1-combine-row-wrap" : ""}`,
|
|
15349
|
-
children: a.map((e) =>
|
|
15395
|
+
children: a.map((e) => lt(D ? {
|
|
15350
15396
|
...e,
|
|
15351
15397
|
req: 1
|
|
15352
15398
|
} : e, t, n, { inline: !0 }))
|
|
@@ -15356,7 +15402,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15356
15402
|
size: "small",
|
|
15357
15403
|
checked: i,
|
|
15358
15404
|
onChange: (e) => {
|
|
15359
|
-
!e && E && (b.setFieldValue(E, void 0), b.validateFields([E]).catch(() => {})),
|
|
15405
|
+
!e && E && (b.setFieldValue(E, void 0), b.validateFields([E]).catch(() => {})), rt((t) => ({
|
|
15360
15406
|
...t,
|
|
15361
15407
|
[u]: e
|
|
15362
15408
|
}));
|
|
@@ -15377,25 +15423,25 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15377
15423
|
children: ({ getFieldValue: e }) => A(e) ? j : null
|
|
15378
15424
|
}, u) : j);
|
|
15379
15425
|
}), o;
|
|
15380
|
-
},
|
|
15381
|
-
let t = e.name ?? e.id ?? "", n = kt(
|
|
15426
|
+
}, _t = (e) => {
|
|
15427
|
+
let t = e.name ?? e.id ?? "", n = kt(je, t), r = !!n && n.leaderName !== t, i = n ? he.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 = () => {
|
|
15382
15428
|
s.forEach((t) => {
|
|
15383
|
-
let n =
|
|
15384
|
-
|
|
15429
|
+
let n = he.find((e) => e.name === t) ?? e;
|
|
15430
|
+
Ne.current[t]?.add(Lt(n, { editing: !0 }));
|
|
15385
15431
|
});
|
|
15386
15432
|
}, l = (e) => {
|
|
15387
|
-
s.forEach((t) =>
|
|
15433
|
+
s.forEach((t) => Ne.current[t]?.remove(e));
|
|
15388
15434
|
};
|
|
15389
15435
|
return e.addRow ? /* @__PURE__ */ Y(B.List, {
|
|
15390
15436
|
name: t,
|
|
15391
|
-
initialValue:
|
|
15437
|
+
initialValue: Fe[e.name] ?? [],
|
|
15392
15438
|
rules: r ? [] : [{ validator: async (t, n = []) => {
|
|
15393
15439
|
if (!(ex(e.toggleEnabled) && e.toggleField && b.getFieldValue(e.toggleField))) {
|
|
15394
15440
|
if (a > 0 && n.length < a) throw Error(`Keep at least ${a} row${a > 1 ? "s" : ""}.`);
|
|
15395
15441
|
if (ex(e.requireOne) && n.some((e) => !rx(e))) throw Error("Fill at least one field in each added row.");
|
|
15396
15442
|
}
|
|
15397
15443
|
} }],
|
|
15398
|
-
children: (n, { add: s, remove: u, move: d }, { errors: f }) => (
|
|
15444
|
+
children: (n, { add: s, remove: u, move: d }, { errors: f }) => (Ne.current[t] = {
|
|
15399
15445
|
add: s,
|
|
15400
15446
|
remove: u,
|
|
15401
15447
|
move: d
|
|
@@ -15423,7 +15469,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15423
15469
|
md: e.col ?? 12,
|
|
15424
15470
|
className: "v1-addrow-header-label",
|
|
15425
15471
|
children: e.label
|
|
15426
|
-
},
|
|
15472
|
+
}, it(e)))
|
|
15427
15473
|
}),
|
|
15428
15474
|
n.map(({ key: r, name: i }) => /* @__PURE__ */ X("div", {
|
|
15429
15475
|
className: "v1-addrow-item",
|
|
@@ -15439,7 +15485,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15439
15485
|
children: /* @__PURE__ */ Y(Gi, {
|
|
15440
15486
|
gutter: [24, 0],
|
|
15441
15487
|
align: "top",
|
|
15442
|
-
children:
|
|
15488
|
+
children: gt(e.fields, i, t, ex(e.sharedRowLabels), t)
|
|
15443
15489
|
})
|
|
15444
15490
|
})]
|
|
15445
15491
|
}, r)),
|
|
@@ -15448,16 +15494,16 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15448
15494
|
}))
|
|
15449
15495
|
}) : /* @__PURE__ */ Y(Gi, {
|
|
15450
15496
|
gutter: [24, 0],
|
|
15451
|
-
children:
|
|
15497
|
+
children: gt(e.fields, void 0, void 0, !1, t)
|
|
15452
15498
|
});
|
|
15453
|
-
},
|
|
15454
|
-
let n = e.name ?? e.id ?? String(t), r =
|
|
15499
|
+
}, yt = (e) => he.filter((t) => t !== e && t.mergeInto && String(t.mergeInto) === String(e.name)), bt = (e) => !!(e.mergeInto && he.some((t) => t !== e && String(t.name) === String(e.mergeInto))), St = (e, t) => yt(e).filter((e) => String(e.mergePosition ?? "bottom") === t), Ct = (e, t) => {
|
|
15500
|
+
let n = e.name ?? e.id ?? String(t), r = _t(e), i = St(e, "top"), a = St(e, "bottom"), o = (e) => {
|
|
15455
15501
|
let t = /* @__PURE__ */ X("div", {
|
|
15456
15502
|
className: "v1-merged-group",
|
|
15457
15503
|
children: [/* @__PURE__ */ Y("div", {
|
|
15458
15504
|
className: "v1-merged-group-title",
|
|
15459
15505
|
children: e.label ?? e.name
|
|
15460
|
-
}),
|
|
15506
|
+
}), _t(e)]
|
|
15461
15507
|
}, e.name);
|
|
15462
15508
|
return /* @__PURE__ */ Y(cx, {
|
|
15463
15509
|
form: b,
|
|
@@ -15490,7 +15536,7 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15490
15536
|
"aria-label": x[n] ? "Expand section" : "Collapse section",
|
|
15491
15537
|
icon: x[n] ? /* @__PURE__ */ Y(Fa, {}) : /* @__PURE__ */ Y(Jo, {}),
|
|
15492
15538
|
onClick: (e) => {
|
|
15493
|
-
e.stopPropagation(),
|
|
15539
|
+
e.stopPropagation(), Ke(n);
|
|
15494
15540
|
}
|
|
15495
15541
|
})
|
|
15496
15542
|
]
|
|
@@ -15512,29 +15558,29 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15512
15558
|
})
|
|
15513
15559
|
}, n);
|
|
15514
15560
|
};
|
|
15515
|
-
return /* @__PURE__ */ X("main", { children: [
|
|
15561
|
+
return /* @__PURE__ */ X("main", { children: [Re.length > 0 && /* @__PURE__ */ Y(Mr, { items: Re }), /* @__PURE__ */ X("div", {
|
|
15516
15562
|
className: "v1-edit-page",
|
|
15517
15563
|
children: [/* @__PURE__ */ X("div", {
|
|
15518
15564
|
className: "v1-page-inner",
|
|
15519
15565
|
children: [/* @__PURE__ */ Y(Ji, {
|
|
15520
15566
|
fullscreen: !0,
|
|
15521
|
-
spinning:
|
|
15567
|
+
spinning: Pe.busy,
|
|
15522
15568
|
size: "large",
|
|
15523
|
-
tip:
|
|
15569
|
+
tip: Pe.loadingText || "Reading the file…"
|
|
15524
15570
|
}), /* @__PURE__ */ X(Ji, {
|
|
15525
|
-
spinning:
|
|
15571
|
+
spinning: D,
|
|
15526
15572
|
tip: "Loading form fields…",
|
|
15527
15573
|
children: [
|
|
15528
|
-
|
|
15574
|
+
k && /* @__PURE__ */ Y(bi, {
|
|
15529
15575
|
type: "error",
|
|
15530
15576
|
showIcon: !0,
|
|
15531
|
-
message:
|
|
15577
|
+
message: k,
|
|
15532
15578
|
style: { marginBottom: 16 }
|
|
15533
15579
|
}),
|
|
15534
|
-
|
|
15580
|
+
ne && /* @__PURE__ */ Y(bi, {
|
|
15535
15581
|
type: "error",
|
|
15536
15582
|
showIcon: !0,
|
|
15537
|
-
message:
|
|
15583
|
+
message: ne,
|
|
15538
15584
|
style: { marginBottom: 16 }
|
|
15539
15585
|
}),
|
|
15540
15586
|
/* @__PURE__ */ X(B, {
|
|
@@ -15542,22 +15588,22 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15542
15588
|
layout: "vertical",
|
|
15543
15589
|
colon: !1,
|
|
15544
15590
|
className: "v1-form",
|
|
15545
|
-
disabled:
|
|
15591
|
+
disabled: Pe.busy,
|
|
15546
15592
|
requiredMark: (e, { required: t }) => /* @__PURE__ */ X(J, { children: [e, t && /* @__PURE__ */ Y("span", {
|
|
15547
15593
|
className: "v1-required-mark",
|
|
15548
15594
|
children: " *"
|
|
15549
15595
|
})] }),
|
|
15550
|
-
onFinish:
|
|
15551
|
-
onFinishFailed:
|
|
15552
|
-
children: [
|
|
15596
|
+
onFinish: Qe,
|
|
15597
|
+
onFinishFailed: et,
|
|
15598
|
+
children: [he.filter((e) => !bt(e)).map((e, t) => /* @__PURE__ */ Y(cx, {
|
|
15553
15599
|
form: b,
|
|
15554
15600
|
group: e,
|
|
15555
15601
|
children: e.showIf?.field ? /* @__PURE__ */ Y(lx, {
|
|
15556
15602
|
form: b,
|
|
15557
15603
|
showIf: e.showIf,
|
|
15558
|
-
render: () =>
|
|
15559
|
-
}) :
|
|
15560
|
-
}, e.name ?? `grp-${t}`)), !
|
|
15604
|
+
render: () => Ct(e, t)
|
|
15605
|
+
}) : Ct(e, t)
|
|
15606
|
+
}, e.name ?? `grp-${t}`)), !D && !k && he.length === 0 && /* @__PURE__ */ Y(bi, {
|
|
15561
15607
|
type: "info",
|
|
15562
15608
|
showIcon: !0,
|
|
15563
15609
|
message: "No form fields are configured."
|
|
@@ -15577,10 +15623,10 @@ function Px({ moduleName: e, groupName: t, recordId: n, authToken: r, clientId:
|
|
|
15577
15623
|
children: "Cancel"
|
|
15578
15624
|
}), /* @__PURE__ */ Y(Xb, {
|
|
15579
15625
|
form: b,
|
|
15580
|
-
groups:
|
|
15626
|
+
groups: he,
|
|
15581
15627
|
onClick: () => b.submit(),
|
|
15582
|
-
disabled:
|
|
15583
|
-
loading:
|
|
15628
|
+
disabled: D || j || Se > 0,
|
|
15629
|
+
loading: j,
|
|
15584
15630
|
children: s
|
|
15585
15631
|
})]
|
|
15586
15632
|
})]
|