@realtek/core-theme 0.0.310 → 0.0.311
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-CYzqfTvW.js → Breadcrumb-BQ3prySs.js} +218 -211
- package/dist-lib/{Breadcrumb-CYzqfTvW.js.map → Breadcrumb-BQ3prySs.js.map} +1 -1
- package/dist-lib/{Breadcrumb-Ch7d3oV-.cjs → Breadcrumb-_Gj7uUV2.cjs} +2 -2
- package/dist-lib/{Breadcrumb-Ch7d3oV-.cjs.map → Breadcrumb-_Gj7uUV2.cjs.map} +1 -1
- package/dist-lib/index.cjs +8 -8
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +7577 -7574
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -4915,10 +4915,14 @@ function ic(e, t) {
|
|
|
4915
4915
|
let r = [...e];
|
|
4916
4916
|
return r[r.length - 1] = n[0], r;
|
|
4917
4917
|
}
|
|
4918
|
-
function ac(e) {
|
|
4918
|
+
function ac(e, t, n) {
|
|
4919
|
+
let r = e?.getFieldValue?.(ic(t, n));
|
|
4920
|
+
return r != null && r !== "" ? r : e?.getFieldValue?.(n);
|
|
4921
|
+
}
|
|
4922
|
+
function oc(e) {
|
|
4919
4923
|
return String(e ?? "").split(",").map((e) => e.trim()).filter(Boolean);
|
|
4920
4924
|
}
|
|
4921
|
-
function
|
|
4925
|
+
function sc(e, t) {
|
|
4922
4926
|
for (let n of e ?? []) {
|
|
4923
4927
|
let e = t(n);
|
|
4924
4928
|
if (e == null || e === "") continue;
|
|
@@ -4930,14 +4934,14 @@ function oc(e, t) {
|
|
|
4930
4934
|
}
|
|
4931
4935
|
return null;
|
|
4932
4936
|
}
|
|
4933
|
-
function
|
|
4937
|
+
function cc({ input: e, compareFields: t, readValue: n }) {
|
|
4934
4938
|
let r = {
|
|
4935
4939
|
ok: !0,
|
|
4936
4940
|
field: null,
|
|
4937
4941
|
maximum: null
|
|
4938
4942
|
};
|
|
4939
4943
|
if (e == null || e === "") return r;
|
|
4940
|
-
let i =
|
|
4944
|
+
let i = sc(t, n);
|
|
4941
4945
|
if (!i) return r;
|
|
4942
4946
|
let a = Number(e);
|
|
4943
4947
|
return Number.isFinite(a) ? {
|
|
@@ -4948,39 +4952,39 @@ function sc({ input: e, compareFields: t, readValue: n }) {
|
|
|
4948
4952
|
}
|
|
4949
4953
|
//#endregion
|
|
4950
4954
|
//#region src/components/form/contextPrefill.js
|
|
4951
|
-
var
|
|
4952
|
-
function
|
|
4955
|
+
var lc = { candidates: ["applicantId"] };
|
|
4956
|
+
function uc(e) {
|
|
4953
4957
|
let t = String(e ?? "").trim();
|
|
4954
4958
|
if (!t) return [];
|
|
4955
4959
|
let n = t.endsWith("s") ? t.slice(0, -1) : t;
|
|
4956
4960
|
return [...new Set([
|
|
4957
4961
|
`${n}Id`,
|
|
4958
4962
|
`${t}Id`,
|
|
4959
|
-
...
|
|
4963
|
+
...lc[t] ?? []
|
|
4960
4964
|
])];
|
|
4961
4965
|
}
|
|
4962
|
-
function
|
|
4966
|
+
function dc(e, t) {
|
|
4963
4967
|
if (!t) return "";
|
|
4964
4968
|
let n = (e) => e && typeof e == "object" ? e.id ?? e.value ?? "" : e ?? "";
|
|
4965
|
-
for (let r of
|
|
4969
|
+
for (let r of uc(e)) {
|
|
4966
4970
|
let e = String(n(t[r]) || "");
|
|
4967
4971
|
if (e) return e;
|
|
4968
4972
|
}
|
|
4969
4973
|
return "";
|
|
4970
4974
|
}
|
|
4971
|
-
function
|
|
4975
|
+
function fc(e, t) {
|
|
4972
4976
|
let n = /* @__PURE__ */ new Set();
|
|
4973
4977
|
return (e ?? []).forEach((e) => (e.fields ?? []).forEach((e) => {
|
|
4974
4978
|
e?.prefillFromModule && n.add(t(e.prefillFromModule));
|
|
4975
4979
|
})), [...n];
|
|
4976
4980
|
}
|
|
4977
|
-
function
|
|
4981
|
+
function pc(e) {
|
|
4978
4982
|
return e?.payloadMode === "skip";
|
|
4979
4983
|
}
|
|
4980
|
-
function
|
|
4984
|
+
function mc(e) {
|
|
4981
4985
|
return Array.isArray(e) ? e : Array.isArray(e?.groups) ? e.groups : Array.isArray(e?.data) ? e.data : Array.isArray(e?.data?.groups) ? e.data.groups : [];
|
|
4982
4986
|
}
|
|
4983
|
-
function
|
|
4987
|
+
function hc(e) {
|
|
4984
4988
|
let t = {};
|
|
4985
4989
|
return (e ?? []).forEach((e) => {
|
|
4986
4990
|
e?.addRow || (e?.fields ?? []).forEach((e) => {
|
|
@@ -4988,7 +4992,7 @@ function mc(e) {
|
|
|
4988
4992
|
});
|
|
4989
4993
|
}), t;
|
|
4990
4994
|
}
|
|
4991
|
-
function
|
|
4995
|
+
function gc(e, t) {
|
|
4992
4996
|
if (!(!e || !t)) for (let n of [
|
|
4993
4997
|
t.prefillFrom,
|
|
4994
4998
|
t.field,
|
|
@@ -5001,62 +5005,65 @@ function hc(e, t) {
|
|
|
5001
5005
|
}
|
|
5002
5006
|
//#endregion
|
|
5003
5007
|
//#region src/components/form/ValidationOverrideCheckbox.jsx
|
|
5004
|
-
function
|
|
5008
|
+
function _c({ form: e, field: t, flagPath: n, fieldPath: r, disabled: i }) {
|
|
5005
5009
|
let a = Vi(t), o = b.useWatch(n, e);
|
|
5006
5010
|
if (!a) return null;
|
|
5007
|
-
let s = () => {
|
|
5011
|
+
let s = a.label || "Allow beyond the limit", c = () => {
|
|
5008
5012
|
setTimeout(() => {
|
|
5009
5013
|
e?.validateFields?.([r]).catch(() => {});
|
|
5010
5014
|
});
|
|
5011
|
-
},
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5015
|
+
}, l = async (r) => {
|
|
5016
|
+
if (!r.target.checked) {
|
|
5017
|
+
e.setFieldValue(n, !1), c();
|
|
5018
|
+
return;
|
|
5019
|
+
}
|
|
5020
|
+
let i = await Ga(Ji(t));
|
|
5021
|
+
e.setFieldValue(n, !!i), c();
|
|
5022
|
+
}, u = a.help ? `${s} — ${a.help}` : s;
|
|
5023
|
+
return /* @__PURE__ */ C(x, {
|
|
5024
|
+
title: u,
|
|
5025
|
+
children: /* @__PURE__ */ C("span", {
|
|
5026
|
+
className: "v1-override-wrap",
|
|
5027
|
+
children: /* @__PURE__ */ C(y, {
|
|
5028
|
+
className: "v1-override-checkbox",
|
|
5029
|
+
checked: !!o,
|
|
5030
|
+
disabled: i,
|
|
5031
|
+
onChange: l,
|
|
5032
|
+
"aria-label": u
|
|
5033
|
+
})
|
|
5034
|
+
})
|
|
5024
5035
|
});
|
|
5025
|
-
return a.help ? /* @__PURE__ */ C(x, {
|
|
5026
|
-
title: a.help,
|
|
5027
|
-
children: c
|
|
5028
|
-
}) : c;
|
|
5029
5036
|
}
|
|
5030
5037
|
//#endregion
|
|
5031
5038
|
//#region src/components/form/prefillWhenRules.js
|
|
5032
|
-
var
|
|
5033
|
-
function
|
|
5039
|
+
var vc = (e) => String(e ?? "");
|
|
5040
|
+
function yc(e) {
|
|
5034
5041
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
5035
5042
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
5036
5043
|
let r = e?.field;
|
|
5037
5044
|
!r || t.has(r) || (t.add(r), n.push(r));
|
|
5038
5045
|
}), n;
|
|
5039
5046
|
}
|
|
5040
|
-
function
|
|
5041
|
-
return
|
|
5047
|
+
function bc(e, t, n, r) {
|
|
5048
|
+
return yc(e).map((e) => ({
|
|
5042
5049
|
field: e,
|
|
5043
5050
|
path: n(t, e, r)
|
|
5044
5051
|
}));
|
|
5045
5052
|
}
|
|
5046
|
-
function
|
|
5047
|
-
return !e || !e.field ? !1 :
|
|
5053
|
+
function xc(e, t = {}) {
|
|
5054
|
+
return !e || !e.field ? !1 : vc(t[e.field]) === vc(e.value);
|
|
5048
5055
|
}
|
|
5049
|
-
function
|
|
5050
|
-
let o = (Array.isArray(e) ? e : []).find((e) =>
|
|
5056
|
+
function Sc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMismatch: i = !0, initial: a = !1 } = {}) {
|
|
5057
|
+
let o = (Array.isArray(e) ? e : []).find((e) => xc(e, t));
|
|
5051
5058
|
return o ? o.clearValue ? a ? { action: "none" } : { action: "clear" } : {
|
|
5052
5059
|
action: "set",
|
|
5053
5060
|
value: o.setValue
|
|
5054
|
-
} : i && r !== void 0 &&
|
|
5061
|
+
} : i && r !== void 0 && vc(n) === vc(r) ? { action: "clear" } : { action: "none" };
|
|
5055
5062
|
}
|
|
5056
5063
|
//#endregion
|
|
5057
5064
|
//#region src/components/form/optionConstraints.js
|
|
5058
5065
|
var Q = (e) => String(e ?? "").trim().toLowerCase();
|
|
5059
|
-
function
|
|
5066
|
+
function Cc(e) {
|
|
5060
5067
|
let t = Array.isArray(e) ? e : [e], n = [];
|
|
5061
5068
|
return t.forEach((e) => {
|
|
5062
5069
|
if (!(e == null || e === "")) {
|
|
@@ -5076,38 +5083,38 @@ function Sc(e) {
|
|
|
5076
5083
|
}
|
|
5077
5084
|
}), n;
|
|
5078
5085
|
}
|
|
5079
|
-
function
|
|
5080
|
-
let n =
|
|
5086
|
+
function wc(e = [], t) {
|
|
5087
|
+
let n = Cc(t);
|
|
5081
5088
|
if (!n.length || !Array.isArray(e) || e.length === 0) return e;
|
|
5082
5089
|
let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(Q(e.value)) || r.has(Q(e.label)) : r.has(Q(e)));
|
|
5083
5090
|
return i.length > 0 ? i : e;
|
|
5084
5091
|
}
|
|
5085
|
-
function
|
|
5092
|
+
function Tc(e) {
|
|
5086
5093
|
let t = [];
|
|
5087
5094
|
return [e?.setValue, e?.setValueLabel].forEach((e) => {
|
|
5088
5095
|
e == null || e === "" || t.push(Q(e));
|
|
5089
5096
|
}), t;
|
|
5090
5097
|
}
|
|
5091
|
-
function
|
|
5098
|
+
function Ec(e, t = {}) {
|
|
5092
5099
|
let n = Array.isArray(e) ? e : [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
5093
5100
|
return n.forEach((e) => {
|
|
5094
5101
|
if (!e || e.clearValue) return;
|
|
5095
|
-
let n =
|
|
5102
|
+
let n = Tc(e);
|
|
5096
5103
|
if (!n.length) return;
|
|
5097
|
-
let a =
|
|
5104
|
+
let a = xc(e, t) ? i : r;
|
|
5098
5105
|
n.forEach((e) => a.add(e));
|
|
5099
5106
|
}), i.forEach((e) => r.delete(e)), [...r];
|
|
5100
5107
|
}
|
|
5101
|
-
function
|
|
5102
|
-
let r =
|
|
5108
|
+
function Dc(e = [], t, n) {
|
|
5109
|
+
let r = Ec(t, n);
|
|
5103
5110
|
if (!r.length || !Array.isArray(e) || e.length === 0) return e;
|
|
5104
5111
|
let i = new Set(r);
|
|
5105
5112
|
return e.filter((e) => e == null ? !0 : typeof e == "object" ? !(i.has(Q(e.value)) || i.has(Q(e.label))) : !i.has(Q(e)));
|
|
5106
5113
|
}
|
|
5107
5114
|
//#endregion
|
|
5108
5115
|
//#region src/components/form/optionRowFilters.js
|
|
5109
|
-
var
|
|
5110
|
-
function
|
|
5116
|
+
var Oc = 64;
|
|
5117
|
+
function kc(e) {
|
|
5111
5118
|
if (String(e ?? "").trim() !== "currentUserId") return "";
|
|
5112
5119
|
try {
|
|
5113
5120
|
return typeof localStorage > "u" ? "" : String(localStorage.getItem("userId") ?? "").trim();
|
|
@@ -5115,34 +5122,34 @@ function Oc(e) {
|
|
|
5115
5122
|
return "";
|
|
5116
5123
|
}
|
|
5117
5124
|
}
|
|
5118
|
-
var
|
|
5119
|
-
function
|
|
5125
|
+
var Ac = (e) => String(e ?? "").trim().toLowerCase(), jc = (e) => e != null && String(e).trim() !== "";
|
|
5126
|
+
function Mc(e) {
|
|
5120
5127
|
let t = Array.isArray(e) ? e : String(e ?? "").split(",");
|
|
5121
|
-
return new Set(t.map(
|
|
5128
|
+
return new Set(t.map(Ac).filter((e) => e !== ""));
|
|
5122
5129
|
}
|
|
5123
|
-
function
|
|
5124
|
-
return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) =>
|
|
5130
|
+
function Nc(e, t) {
|
|
5131
|
+
return !t || !Array.isArray(e) || e.length === 0 ? !1 : e.some((e) => jc(e?.extraData?.[t]));
|
|
5125
5132
|
}
|
|
5126
|
-
function
|
|
5133
|
+
function Pc(e, t, n) {
|
|
5127
5134
|
let r = e?.extraData?.[t];
|
|
5128
|
-
if (!
|
|
5129
|
-
let i =
|
|
5130
|
-
return i.size === 0 ? r === !0 : i.has(
|
|
5135
|
+
if (!jc(n)) return r === !0;
|
|
5136
|
+
let i = Mc(n);
|
|
5137
|
+
return i.size === 0 ? r === !0 : i.has(Ac(r));
|
|
5131
5138
|
}
|
|
5132
|
-
function
|
|
5139
|
+
function Fc(e, t) {
|
|
5133
5140
|
let n = /* @__PURE__ */ new Map();
|
|
5134
5141
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
5135
|
-
let r =
|
|
5136
|
-
r && n.set(r,
|
|
5142
|
+
let r = Ac(e?.value);
|
|
5143
|
+
r && n.set(r, Ac(e?.extraData?.[t]));
|
|
5137
5144
|
}), n;
|
|
5138
5145
|
}
|
|
5139
|
-
function
|
|
5140
|
-
let r =
|
|
5146
|
+
function Ic(e, t, n) {
|
|
5147
|
+
let r = Ac(n);
|
|
5141
5148
|
if (!r) return !1;
|
|
5142
|
-
let i = /* @__PURE__ */ new Set(), a =
|
|
5149
|
+
let i = /* @__PURE__ */ new Set(), a = Ac(e);
|
|
5143
5150
|
if (!a) return !1;
|
|
5144
5151
|
i.add(a);
|
|
5145
|
-
for (let e = 0; e <
|
|
5152
|
+
for (let e = 0; e < Oc; e += 1) {
|
|
5146
5153
|
let e = t.get(a);
|
|
5147
5154
|
if (!e) return !1;
|
|
5148
5155
|
if (e === r) return !0;
|
|
@@ -5151,57 +5158,57 @@ function Fc(e, t, n) {
|
|
|
5151
5158
|
}
|
|
5152
5159
|
return !1;
|
|
5153
5160
|
}
|
|
5154
|
-
function
|
|
5161
|
+
function Lc(e = {}) {
|
|
5155
5162
|
let t = [], n = (e) => {
|
|
5156
5163
|
let n = String(e ?? "").trim();
|
|
5157
5164
|
n && !t.includes(n) && t.push(n);
|
|
5158
5165
|
};
|
|
5159
5166
|
return (Array.isArray(e.extraFields) ? e.extraFields : []).forEach(n), n(e.optionsRequireExtraField), n(e.optionsHierarchyParentField), t;
|
|
5160
5167
|
}
|
|
5161
|
-
function
|
|
5168
|
+
function Rc(e, t = {}, n = {}) {
|
|
5162
5169
|
if (!Array.isArray(e) || e.length === 0) return e;
|
|
5163
5170
|
let r = n.source ? `[${n.source}]` : "[optionRowFilters]", i = t.field ?? t.label ?? "(unnamed field)", a = typeof n.warn == "function" ? n.warn : (e) => {
|
|
5164
5171
|
typeof console < "u" && console.warn(e);
|
|
5165
5172
|
}, o = e, s = String(t.optionsRequireExtraField ?? "").trim();
|
|
5166
|
-
s && (
|
|
5173
|
+
s && (Nc(o, s) ? o = o.filter((e) => Pc(e, s, t.optionsRequireExtraValue)) : a(`${r} "${i}": option filter SKIPPED — no option carried extraData["${s}"], so the value filter could not be applied (the lookup API returned no such extra field). Showing the unfiltered list; this is NOT "nothing matched".`));
|
|
5167
5174
|
let c = String(t.optionsHierarchyParentField ?? "").trim();
|
|
5168
5175
|
if (c) {
|
|
5169
|
-
let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s =
|
|
5176
|
+
let n = String(t.optionsHierarchySelfFrom ?? "").trim() || "currentUserId", s = kc(n);
|
|
5170
5177
|
if (!s) a(`${r} "${i}": hierarchy filter SKIPPED — identity "${n}" could not be resolved (no signed-in user id available). Showing the list unrestricted by reporting line.`);
|
|
5171
|
-
else if (!
|
|
5178
|
+
else if (!Nc(e, c)) a(`${r} "${i}": hierarchy filter SKIPPED — no option carried extraData["${c}"], so the reporting chain could not be walked (the lookup API returned no such extra field). Showing the list unrestricted by reporting line; this is NOT "nobody reports to you".`);
|
|
5172
5179
|
else {
|
|
5173
|
-
let t =
|
|
5174
|
-
o = o.filter((e) =>
|
|
5180
|
+
let t = Fc(e, c);
|
|
5181
|
+
o = o.filter((e) => Ic(e?.value, t, s));
|
|
5175
5182
|
}
|
|
5176
5183
|
}
|
|
5177
5184
|
return o;
|
|
5178
5185
|
}
|
|
5179
5186
|
//#endregion
|
|
5180
5187
|
//#region src/components/form/fieldTooltip.js
|
|
5181
|
-
var
|
|
5182
|
-
function
|
|
5183
|
-
return
|
|
5188
|
+
var zc = (e) => e == null || String(e).trim() === "", Bc = (e) => e === !0 || e === 1 || e === "1" || e === "true";
|
|
5189
|
+
function Vc(e) {
|
|
5190
|
+
return zc(e?.tooltip) ? Bc(e?.infoEnabled) && !zc(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
|
|
5184
5191
|
}
|
|
5185
5192
|
//#endregion
|
|
5186
5193
|
//#region src/utils/roleAllowsAction.js
|
|
5187
|
-
function
|
|
5188
|
-
return e == null ? !0 : typeof e == "object" ?
|
|
5194
|
+
function Hc(e) {
|
|
5195
|
+
return e == null ? !0 : typeof e == "object" ? Hc(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
|
|
5189
5196
|
}
|
|
5190
|
-
function
|
|
5197
|
+
function Uc(e, t) {
|
|
5191
5198
|
if (!e) return !0;
|
|
5192
5199
|
try {
|
|
5193
5200
|
let n = JSON.parse(localStorage.getItem("menuPermission") || "{}"), [r, i] = String(e).split(".");
|
|
5194
|
-
return
|
|
5201
|
+
return Hc((n[r || String(t || "").replace(/s$/i, "")] ?? n[String(t || "")] ?? n[String(t || "").replace(/s$/i, "")] ?? {})[i]);
|
|
5195
5202
|
} catch {
|
|
5196
5203
|
return !0;
|
|
5197
5204
|
}
|
|
5198
5205
|
}
|
|
5199
5206
|
//#endregion
|
|
5200
5207
|
//#region src/utils/afterSubmitNav.js
|
|
5201
|
-
function
|
|
5208
|
+
function Wc(e) {
|
|
5202
5209
|
return (e ?? []).filter((e) => e?.afterSubmit?.mode).sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.afterSubmit ?? null;
|
|
5203
5210
|
}
|
|
5204
|
-
function
|
|
5211
|
+
function Gc(e, t, n) {
|
|
5205
5212
|
let r = String(e ?? "").trim();
|
|
5206
5213
|
return !r || !r.startsWith("/") || r.startsWith("//") || /^[a-z][a-z0-9+.-]*:/i.test(r) ? null : r.replace(/:([A-Za-z_][\w]*)/g, (e, r) => {
|
|
5207
5214
|
let i = r === "id" ? t : n?.[r];
|
|
@@ -5210,50 +5217,50 @@ function Wc(e, t, n) {
|
|
|
5210
5217
|
}
|
|
5211
5218
|
//#endregion
|
|
5212
5219
|
//#region src/utils/backNav.js
|
|
5213
|
-
function
|
|
5220
|
+
function Kc(e = typeof window < "u" ? window : void 0) {
|
|
5214
5221
|
let t = e?.history?.state?.idx;
|
|
5215
5222
|
return typeof t == "number" && t > 0;
|
|
5216
5223
|
}
|
|
5217
|
-
function
|
|
5218
|
-
return t && e ? { path: e } :
|
|
5224
|
+
function qc({ cancelPath: e, cancelPathPriority: t = !1, fallbackPath: n = "/", win: r = typeof window < "u" ? window : void 0 } = {}) {
|
|
5225
|
+
return t && e ? { path: e } : Kc(r) ? { back: !0 } : e ? { path: e } : { path: n };
|
|
5219
5226
|
}
|
|
5220
|
-
function
|
|
5221
|
-
let n =
|
|
5227
|
+
function Jc(e, t = {}) {
|
|
5228
|
+
let n = qc(t);
|
|
5222
5229
|
return n.back ? e(-1) : e(n.path), n;
|
|
5223
5230
|
}
|
|
5224
5231
|
//#endregion
|
|
5225
5232
|
//#region src/components/form/educationRules.js
|
|
5226
|
-
var
|
|
5227
|
-
function
|
|
5233
|
+
var Yc = (e) => e == null ? "" : String(e).trim();
|
|
5234
|
+
function Xc(e, t) {
|
|
5228
5235
|
let n = e?.regionRules;
|
|
5229
5236
|
if (!n || typeof n != "object") return e ?? {};
|
|
5230
|
-
let r =
|
|
5237
|
+
let r = Yc(t), i = n[r] ?? n[r.toUpperCase()] ?? n.default;
|
|
5231
5238
|
return !i || typeof i != "object" ? e ?? {} : {
|
|
5232
5239
|
...e,
|
|
5233
5240
|
...i
|
|
5234
5241
|
};
|
|
5235
5242
|
}
|
|
5236
|
-
function Xc(e) {
|
|
5237
|
-
return e?.allowInProgress !== !1;
|
|
5238
|
-
}
|
|
5239
5243
|
function Zc(e) {
|
|
5240
|
-
return
|
|
5244
|
+
return e?.allowInProgress !== !1;
|
|
5241
5245
|
}
|
|
5242
5246
|
function Qc(e) {
|
|
5243
|
-
return
|
|
5247
|
+
return Zc(e) ? "" : tl(e) ? e?.inProgressWarningMessage || e?.inProgressMessage || "In this region an unfinished qualification is not usually accepted when a candidate is put forward for a role. You can still record it here — just be aware it will have to be completed before they can be submitted." : e?.inProgressMessage || "This one needs to be finished before the application can go ahead. Please untick “still ongoing”, or remove the row.";
|
|
5244
5248
|
}
|
|
5245
5249
|
function $c(e) {
|
|
5246
|
-
return
|
|
5250
|
+
return Zc(e) ? "allow" : Yc(e?.inProgressSeverity).toLowerCase() === "warn" ? "warn" : "block";
|
|
5247
5251
|
}
|
|
5248
5252
|
function el(e) {
|
|
5249
|
-
return
|
|
5253
|
+
return $c(e) === "block";
|
|
5250
5254
|
}
|
|
5251
5255
|
function tl(e) {
|
|
5252
|
-
|
|
5253
|
-
|
|
5256
|
+
return $c(e) === "warn";
|
|
5257
|
+
}
|
|
5258
|
+
function nl(e) {
|
|
5259
|
+
if (!el(e)) return null;
|
|
5260
|
+
let t = Qc(e);
|
|
5254
5261
|
return { validator: (e, n) => n === !0 ? Promise.reject(Error(t)) : Promise.resolve() };
|
|
5255
5262
|
}
|
|
5256
|
-
function
|
|
5263
|
+
function rl(e, t = {}) {
|
|
5257
5264
|
let n = t.tieBreak ?? "endDate", r = t.field ?? "startDate";
|
|
5258
5265
|
for (let t of [n, r]) {
|
|
5259
5266
|
let n = e?.[t];
|
|
@@ -5263,50 +5270,50 @@ function nl(e, t = {}) {
|
|
|
5263
5270
|
}
|
|
5264
5271
|
return null;
|
|
5265
5272
|
}
|
|
5266
|
-
function
|
|
5273
|
+
function il(e, t = {}) {
|
|
5267
5274
|
let n = t.inProgressField ?? "currentStudyingHere";
|
|
5268
5275
|
return !!e?.[n];
|
|
5269
5276
|
}
|
|
5270
|
-
function
|
|
5277
|
+
function al(e = [], t = {}) {
|
|
5271
5278
|
let n = (t.direction ?? "desc") === "desc";
|
|
5272
5279
|
return e.map((e, n) => ({
|
|
5273
5280
|
index: n,
|
|
5274
|
-
key:
|
|
5275
|
-
ongoing: t.inProgressFirst !== !1 &&
|
|
5281
|
+
key: rl(e, t),
|
|
5282
|
+
ongoing: t.inProgressFirst !== !1 && il(e, t)
|
|
5276
5283
|
})).slice().sort((e, t) => e.ongoing === t.ongoing ? e.key === null && t.key === null ? e.index - t.index : e.key === null ? 1 : t.key === null ? -1 : e.key === t.key ? e.index - t.index : n ? t.key - e.key : e.key - t.key : e.ongoing ? -1 : 1).map((e) => e.index);
|
|
5277
5284
|
}
|
|
5278
|
-
function
|
|
5285
|
+
function ol(e, t, n = {}) {
|
|
5279
5286
|
if (!Array.isArray(e) || e.length < 2 || t == null || t < 0 || t >= e.length) return null;
|
|
5280
|
-
let r =
|
|
5287
|
+
let r = al(e, n).indexOf(t);
|
|
5281
5288
|
return r === -1 || r === t ? null : {
|
|
5282
5289
|
from: t,
|
|
5283
5290
|
to: r,
|
|
5284
|
-
reason:
|
|
5291
|
+
reason: il(e[t], n) ? "inProgress" : "outOfOrder"
|
|
5285
5292
|
};
|
|
5286
5293
|
}
|
|
5287
|
-
var
|
|
5294
|
+
var sl = Object.freeze({
|
|
5288
5295
|
inProgress: "You’ve marked this one as still ongoing, so it’s the most recent. Shall we move it to the top? This list reads best newest first.",
|
|
5289
5296
|
outOfOrder: "These dates make this the most recent one. Shall we move it to the top? This list reads best newest first.",
|
|
5290
5297
|
ok: "Yes, move it up",
|
|
5291
5298
|
keep: "No, leave it here"
|
|
5292
5299
|
});
|
|
5293
|
-
function
|
|
5300
|
+
function cl(e, t = {}) {
|
|
5294
5301
|
let n = {
|
|
5295
|
-
...
|
|
5302
|
+
...sl,
|
|
5296
5303
|
...t.messages ?? {}
|
|
5297
5304
|
};
|
|
5298
5305
|
return n[e] ?? n.outOfOrder;
|
|
5299
5306
|
}
|
|
5300
|
-
function
|
|
5301
|
-
let n = t.levelField ?? "qualification", r =
|
|
5307
|
+
function ll(e, t = {}) {
|
|
5308
|
+
let n = t.levelField ?? "qualification", r = Yc(e?.[n]);
|
|
5302
5309
|
if (!r) return null;
|
|
5303
5310
|
let i = t.levels ?? {}, a = i[r] ?? i[r.toLowerCase()] ?? i[r.toUpperCase()];
|
|
5304
|
-
return Number.isFinite(Number(a)) ? Number(a) :
|
|
5311
|
+
return Number.isFinite(Number(a)) ? Number(a) : ul(r, t);
|
|
5305
5312
|
}
|
|
5306
|
-
function
|
|
5313
|
+
function ul(e, t) {
|
|
5307
5314
|
let n = Array.isArray(t?.levelPatterns) ? t.levelPatterns : [], r = e.toLowerCase();
|
|
5308
5315
|
for (let e of n) {
|
|
5309
|
-
let t =
|
|
5316
|
+
let t = Yc(e?.match);
|
|
5310
5317
|
if (!t) continue;
|
|
5311
5318
|
let n;
|
|
5312
5319
|
try {
|
|
@@ -5318,14 +5325,14 @@ function ll(e, t) {
|
|
|
5318
5325
|
}
|
|
5319
5326
|
return null;
|
|
5320
5327
|
}
|
|
5321
|
-
function
|
|
5322
|
-
return
|
|
5328
|
+
function dl(e, t = {}) {
|
|
5329
|
+
return Yc((t?.levelLabels ?? {})[e]) || Yc(e);
|
|
5323
5330
|
}
|
|
5324
|
-
function
|
|
5331
|
+
function fl(e = [], t = {}) {
|
|
5325
5332
|
if (!t || t.requireBelow === !1) return [];
|
|
5326
5333
|
let n = t.levels ?? {}, r = t.requiredLevels ?? [];
|
|
5327
5334
|
if (!r.length) return [];
|
|
5328
|
-
let i = e.map((e) =>
|
|
5335
|
+
let i = e.map((e) => ll(e, t)).filter((e) => e !== null);
|
|
5329
5336
|
if (!i.length) return [];
|
|
5330
5337
|
let a = Math.max(...i), o = [];
|
|
5331
5338
|
return r.forEach((e) => {
|
|
@@ -5333,43 +5340,43 @@ function dl(e = [], t = {}) {
|
|
|
5333
5340
|
Number.isFinite(r) && (r >= a || i.includes(r) || o.push(t));
|
|
5334
5341
|
}), o;
|
|
5335
5342
|
}
|
|
5336
|
-
function
|
|
5337
|
-
let n =
|
|
5343
|
+
function pl(e, t = {}) {
|
|
5344
|
+
let n = fl(e, t);
|
|
5338
5345
|
if (!n.length) return "";
|
|
5339
|
-
let r = n.map((e) =>
|
|
5346
|
+
let r = n.map((e) => dl(e, t)).join(", ");
|
|
5340
5347
|
return (t.message || "You’ve added a higher qualification but not the {missing} below it. Please add that too.").replace("{missing}", r);
|
|
5341
5348
|
}
|
|
5342
|
-
async function
|
|
5349
|
+
async function ml({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
|
|
5343
5350
|
let a = e?.orderBy;
|
|
5344
5351
|
if (!a || a.confirmMove === !1 || typeof r != "function") return !1;
|
|
5345
|
-
let o =
|
|
5352
|
+
let o = ol(t, n, a);
|
|
5346
5353
|
if (!o) return !1;
|
|
5347
5354
|
let s = {
|
|
5348
|
-
...
|
|
5355
|
+
...sl,
|
|
5349
5356
|
...a.messages ?? {}
|
|
5350
5357
|
};
|
|
5351
5358
|
return await i({
|
|
5352
5359
|
reason: o.reason,
|
|
5353
5360
|
title: o.reason === "inProgress" ? "This looks like the most recent one" : "These dates make this the most recent one",
|
|
5354
|
-
body:
|
|
5361
|
+
body: cl(o.reason, a),
|
|
5355
5362
|
okText: s.ok,
|
|
5356
5363
|
cancelText: s.keep,
|
|
5357
5364
|
from: o.from,
|
|
5358
5365
|
to: o.to
|
|
5359
5366
|
}) ? (r(o.from, o.to), !0) : !1;
|
|
5360
5367
|
}
|
|
5361
|
-
function
|
|
5362
|
-
let n =
|
|
5368
|
+
function hl(e, t) {
|
|
5369
|
+
let n = Xc(e, t), r = n?.orderBy?.inProgressField;
|
|
5363
5370
|
return r ? {
|
|
5364
5371
|
name: n.name,
|
|
5365
5372
|
label: n.label ?? n.name,
|
|
5366
5373
|
rowsKey: n.payloadKey || n.name,
|
|
5367
5374
|
inProgressField: r,
|
|
5368
|
-
severity:
|
|
5369
|
-
message:
|
|
5375
|
+
severity: $c(n),
|
|
5376
|
+
message: Qc(n)
|
|
5370
5377
|
} : null;
|
|
5371
5378
|
}
|
|
5372
|
-
function
|
|
5379
|
+
function gl(e = [], t, n) {
|
|
5373
5380
|
if (!n) return {
|
|
5374
5381
|
severity: "allow",
|
|
5375
5382
|
message: "",
|
|
@@ -5377,8 +5384,8 @@ function hl(e = [], t, n) {
|
|
|
5377
5384
|
};
|
|
5378
5385
|
let r = null;
|
|
5379
5386
|
for (let i of e) {
|
|
5380
|
-
let e =
|
|
5381
|
-
if (!(!e || e.severity === "allow") &&
|
|
5387
|
+
let e = hl(i, t);
|
|
5388
|
+
if (!(!e || e.severity === "allow") && _l(n, e.rowsKey).some((t) => il(t, e))) {
|
|
5382
5389
|
if (e.severity === "block") return {
|
|
5383
5390
|
severity: "block",
|
|
5384
5391
|
message: e.message,
|
|
@@ -5397,23 +5404,23 @@ function hl(e = [], t, n) {
|
|
|
5397
5404
|
group: null
|
|
5398
5405
|
};
|
|
5399
5406
|
}
|
|
5400
|
-
function
|
|
5407
|
+
function _l(e, t) {
|
|
5401
5408
|
let n = e?.[t];
|
|
5402
5409
|
return Array.isArray(n) ? n : Array.isArray(n?.rows) ? n.rows : [];
|
|
5403
5410
|
}
|
|
5404
|
-
function
|
|
5411
|
+
function vl(e) {
|
|
5405
5412
|
return String(e?.severity ?? "").toLowerCase() === "block" ? "block" : "warn";
|
|
5406
5413
|
}
|
|
5407
|
-
function
|
|
5414
|
+
function yl(e = [], t = {}) {
|
|
5408
5415
|
let n = null;
|
|
5409
5416
|
for (let r of e) {
|
|
5410
5417
|
let e = r?.levelRule;
|
|
5411
5418
|
if (!e) continue;
|
|
5412
|
-
let i =
|
|
5419
|
+
let i = bl(t, r);
|
|
5413
5420
|
if (!i.length) continue;
|
|
5414
|
-
let a =
|
|
5421
|
+
let a = pl(i, e);
|
|
5415
5422
|
if (a) {
|
|
5416
|
-
if (
|
|
5423
|
+
if (vl(e) === "block") return {
|
|
5417
5424
|
severity: "block",
|
|
5418
5425
|
message: a,
|
|
5419
5426
|
group: r
|
|
@@ -5431,7 +5438,7 @@ function vl(e = [], t = {}) {
|
|
|
5431
5438
|
group: null
|
|
5432
5439
|
};
|
|
5433
5440
|
}
|
|
5434
|
-
function
|
|
5441
|
+
function bl(e, t) {
|
|
5435
5442
|
for (let n of [t?.name, t?.payloadKey]) {
|
|
5436
5443
|
if (!n) continue;
|
|
5437
5444
|
let t = e?.[n];
|
|
@@ -5441,10 +5448,10 @@ function yl(e, t) {
|
|
|
5441
5448
|
}
|
|
5442
5449
|
//#endregion
|
|
5443
5450
|
//#region src/components/form/clearGroupOnChange.js
|
|
5444
|
-
function
|
|
5451
|
+
function xl(e, t) {
|
|
5445
5452
|
return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), t] : [t];
|
|
5446
5453
|
}
|
|
5447
|
-
function
|
|
5454
|
+
function Sl(e, t) {
|
|
5448
5455
|
let n = e?.field, r = [];
|
|
5449
5456
|
e?.clearGroupOnChange && (t instanceof Set ? [...t] : t ?? []).forEach((e) => {
|
|
5450
5457
|
e && e !== n && r.push(e);
|
|
@@ -5454,24 +5461,24 @@ function xl(e, t) {
|
|
|
5454
5461
|
e && e !== n && r.push(e);
|
|
5455
5462
|
}) : typeof i == "string" && i.trim() && i.trim() !== n && r.push(i.trim()), [...new Set(r)];
|
|
5456
5463
|
}
|
|
5457
|
-
function
|
|
5458
|
-
let i =
|
|
5464
|
+
function Cl(e, t, n, r) {
|
|
5465
|
+
let i = Sl(t, r).map((e) => xl(n, e));
|
|
5459
5466
|
return i.forEach((t) => e.setFieldValue(t, null)), i;
|
|
5460
5467
|
}
|
|
5461
5468
|
//#endregion
|
|
5462
5469
|
//#region src/components/form/resolveStoredOptions.js
|
|
5463
|
-
function
|
|
5470
|
+
function wl(e) {
|
|
5464
5471
|
return (Array.isArray(e) ? e : [e]).map((e) => e && typeof e == "object" ? e.value ?? e.key ?? e.id : e).filter((e) => e != null && e !== "");
|
|
5465
5472
|
}
|
|
5466
|
-
function
|
|
5473
|
+
function Tl(e, t = []) {
|
|
5467
5474
|
let n = new Set((t ?? []).map((e) => String(e?.value))), r = [];
|
|
5468
|
-
for (let t of
|
|
5475
|
+
for (let t of wl(e)) {
|
|
5469
5476
|
let e = String(t);
|
|
5470
5477
|
!n.has(e) && !r.includes(e) && r.push(e);
|
|
5471
5478
|
}
|
|
5472
5479
|
return r;
|
|
5473
5480
|
}
|
|
5474
|
-
async function
|
|
5481
|
+
async function El(e, r) {
|
|
5475
5482
|
if (!e?.lookupCollection || !r?.length) return [];
|
|
5476
5483
|
let i = new URLSearchParams({
|
|
5477
5484
|
collection: e.lookupCollection,
|
|
@@ -5483,7 +5490,7 @@ async function Tl(e, r) {
|
|
|
5483
5490
|
let a = await t(n, `/admin/lookup-dropdown-values?${i}`), o = a?.data ?? a ?? [];
|
|
5484
5491
|
return Array.isArray(o) ? o : [];
|
|
5485
5492
|
}
|
|
5486
|
-
function
|
|
5493
|
+
function Dl(e = [], t = []) {
|
|
5487
5494
|
if (!t.length) return e;
|
|
5488
5495
|
let n = new Set((e ?? []).map((e) => String(e?.value))), r = t.filter((e) => !n.has(String(e?.value))).map((e) => ({
|
|
5489
5496
|
...e,
|
|
@@ -5493,8 +5500,8 @@ function El(e = [], t = []) {
|
|
|
5493
5500
|
}
|
|
5494
5501
|
//#endregion
|
|
5495
5502
|
//#region src/components/form/dateRules.js
|
|
5496
|
-
var
|
|
5497
|
-
function
|
|
5503
|
+
var Ol = (e) => e == null || e === "";
|
|
5504
|
+
function kl(e) {
|
|
5498
5505
|
if (!e) return null;
|
|
5499
5506
|
if (typeof e.valueOf == "function") {
|
|
5500
5507
|
let t = e.valueOf();
|
|
@@ -5508,12 +5515,12 @@ function $(e) {
|
|
|
5508
5515
|
let t = T(e);
|
|
5509
5516
|
return t.isValid() ? t.startOf("day").valueOf() : null;
|
|
5510
5517
|
}
|
|
5511
|
-
function
|
|
5518
|
+
function Al(e) {
|
|
5512
5519
|
if (!e) return null;
|
|
5513
5520
|
let t = T(e);
|
|
5514
5521
|
return t.isValid() ? t.hour() * 60 + t.minute() : null;
|
|
5515
5522
|
}
|
|
5516
|
-
var
|
|
5523
|
+
var jl = {
|
|
5517
5524
|
d: "day",
|
|
5518
5525
|
day: "day",
|
|
5519
5526
|
days: "day",
|
|
@@ -5529,13 +5536,13 @@ var Al = {
|
|
|
5529
5536
|
year: "year",
|
|
5530
5537
|
years: "year"
|
|
5531
5538
|
};
|
|
5532
|
-
function
|
|
5539
|
+
function Ml(e) {
|
|
5533
5540
|
if (e == null || e === "") return null;
|
|
5534
5541
|
if (typeof e == "object" && !Array.isArray(e)) {
|
|
5535
5542
|
let t = Number(e.value ?? e.count ?? e.amount);
|
|
5536
5543
|
return !Number.isFinite(t) || t <= 0 ? null : {
|
|
5537
5544
|
value: t,
|
|
5538
|
-
unit:
|
|
5545
|
+
unit: jl[String(e.unit ?? "month").toLowerCase()] ?? "month"
|
|
5539
5546
|
};
|
|
5540
5547
|
}
|
|
5541
5548
|
let t = String(e).trim().toLowerCase();
|
|
@@ -5545,49 +5552,49 @@ function jl(e) {
|
|
|
5545
5552
|
let r = Number(n[1]);
|
|
5546
5553
|
return !Number.isFinite(r) || r <= 0 ? null : {
|
|
5547
5554
|
value: r,
|
|
5548
|
-
unit:
|
|
5555
|
+
unit: jl[n[2]] ?? "month"
|
|
5549
5556
|
};
|
|
5550
5557
|
}
|
|
5551
|
-
function
|
|
5558
|
+
function Nl(e, t) {
|
|
5552
5559
|
let n = e?.minGapFrom ?? e?.gapFrom;
|
|
5553
5560
|
if (n && typeof t == "function") {
|
|
5554
|
-
let e =
|
|
5561
|
+
let e = Ml(t(n));
|
|
5555
5562
|
if (e) return e;
|
|
5556
5563
|
}
|
|
5557
|
-
return
|
|
5564
|
+
return Ml(e?.minGap);
|
|
5558
5565
|
}
|
|
5559
|
-
function
|
|
5566
|
+
function Pl(e, t, n, r) {
|
|
5560
5567
|
if (t === null) return null;
|
|
5561
|
-
let i =
|
|
5568
|
+
let i = Nl(n, r), a = T(t);
|
|
5562
5569
|
return i && (a = e === "dateAfterField" ? a.add(i.value, i.unit) : a.subtract(i.value, i.unit)), a.startOf("day").valueOf();
|
|
5563
5570
|
}
|
|
5564
|
-
function
|
|
5571
|
+
function Fl(e, t, n, r, i) {
|
|
5565
5572
|
if (t === null || n === null) return !1;
|
|
5566
|
-
let a =
|
|
5573
|
+
let a = Pl(e, n, r, i);
|
|
5567
5574
|
if (a === null) return !1;
|
|
5568
|
-
let o = !!r?.strict && !
|
|
5575
|
+
let o = !!r?.strict && !Nl(r, i);
|
|
5569
5576
|
return e === "dateAfterField" ? o ? t <= a : t < a : o ? t >= a : t > a;
|
|
5570
5577
|
}
|
|
5571
|
-
function
|
|
5578
|
+
function Il(e, t, n, r) {
|
|
5572
5579
|
if (n?.message) return n.message;
|
|
5573
|
-
let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a =
|
|
5580
|
+
let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = Nl(n, r);
|
|
5574
5581
|
if (a) {
|
|
5575
5582
|
let n = a.value === 1 ? a.unit : `${a.unit}s`;
|
|
5576
5583
|
return e === "dateAfterField" ? `${t} must be at least ${a.value} ${n} after ${i}` : `${t} must be at least ${a.value} ${n} before ${i}`;
|
|
5577
5584
|
}
|
|
5578
5585
|
return n?.strict ? e === "dateAfterField" ? `${t} must be after ${i}` : `${t} must be before ${i}` : e === "dateAfterField" ? `${t} must be on or after ${i}` : `${t} must be on or before ${i}`;
|
|
5579
5586
|
}
|
|
5580
|
-
function
|
|
5587
|
+
function Ll({ type: e, label: t, rule: n, readSibling: r }) {
|
|
5581
5588
|
return { validator: async (i, a) => {
|
|
5582
5589
|
let o = n?.value ?? n?.compareField ?? n?.field;
|
|
5583
|
-
if (!o ||
|
|
5590
|
+
if (!o || Ol(a)) return Promise.resolve();
|
|
5584
5591
|
let s = r(o);
|
|
5585
|
-
if (
|
|
5592
|
+
if (Ol(s)) return Promise.resolve();
|
|
5586
5593
|
let c = $(a), l = $(s);
|
|
5587
|
-
return c === null || l === null ? Promise.resolve() :
|
|
5594
|
+
return c === null || l === null ? Promise.resolve() : Fl(e, c, l, n, r) ? Promise.reject(Error(Il(e, t, n, r))) : Promise.resolve();
|
|
5588
5595
|
} };
|
|
5589
5596
|
}
|
|
5590
|
-
function
|
|
5597
|
+
function Rl(e, t, { rows: n, rowIndex: r } = {}) {
|
|
5591
5598
|
if (e === null || !t || !Array.isArray(n) || r == null || (t.mode ?? "newestFirst") !== "newestFirst") return !1;
|
|
5592
5599
|
let i = t.startField ?? "startDate", a = t.endField ?? "endDate", o = n[r - 1];
|
|
5593
5600
|
if (o) {
|
|
@@ -5601,11 +5608,11 @@ function Ll(e, t, { rows: n, rowIndex: r } = {}) {
|
|
|
5601
5608
|
}
|
|
5602
5609
|
return !1;
|
|
5603
5610
|
}
|
|
5604
|
-
function
|
|
5611
|
+
function zl(e, t = "above") {
|
|
5605
5612
|
let n = e?.messages ?? {};
|
|
5606
5613
|
return t === "below" ? n.below || "This starts before the entry below it finished. Entries are listed newest first, so they cannot overlap." : n.above || "This overlaps the entry above it. Entries are listed newest first, so this one must finish before that one started.";
|
|
5607
5614
|
}
|
|
5608
|
-
function
|
|
5615
|
+
function Bl({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = qn }) {
|
|
5609
5616
|
let a = e?.validations ?? e?.validation ?? e?.rules ?? [], o = [];
|
|
5610
5617
|
for (let e of a) {
|
|
5611
5618
|
let n = typeof e == "string" ? { type: e } : e, r = n?.type;
|
|
@@ -5619,16 +5626,16 @@ function zl({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = qn }) {
|
|
|
5619
5626
|
o.push((i) => {
|
|
5620
5627
|
if (!i) return !1;
|
|
5621
5628
|
let a = t(e);
|
|
5622
|
-
return
|
|
5629
|
+
return Ol(a) ? !1 : Fl(r, $(i), $(a), n, t);
|
|
5623
5630
|
});
|
|
5624
5631
|
}
|
|
5625
5632
|
}
|
|
5626
|
-
return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ?
|
|
5633
|
+
return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? Rl($(t), e.rowHierarchy, {
|
|
5627
5634
|
rows: n,
|
|
5628
5635
|
rowIndex: r
|
|
5629
5636
|
}) : !1), o.length ? (e) => o.some((t) => t(e)) : void 0;
|
|
5630
5637
|
}
|
|
5631
|
-
function
|
|
5638
|
+
function Vl(e, t = qn) {
|
|
5632
5639
|
let n = e?.validations ?? e?.validation ?? e?.rules ?? [];
|
|
5633
5640
|
for (let e of n) {
|
|
5634
5641
|
let n = typeof e == "string" ? { type: e } : e;
|
|
@@ -5636,44 +5643,44 @@ function Bl(e, t = qn) {
|
|
|
5636
5643
|
if (n?.type === "noFutureDate" || n?.type === "noPastDate") return t();
|
|
5637
5644
|
}
|
|
5638
5645
|
}
|
|
5639
|
-
function
|
|
5646
|
+
function Hl({ field: e, rows: t, rowIndex: n }) {
|
|
5640
5647
|
let r = e?.rowHierarchy;
|
|
5641
5648
|
return { validator: async (e, i) => {
|
|
5642
|
-
if (!r ||
|
|
5649
|
+
if (!r || Ol(i) || !Array.isArray(t) || n == null) return Promise.resolve();
|
|
5643
5650
|
let a = $(i);
|
|
5644
|
-
if (a === null || !
|
|
5651
|
+
if (a === null || !Rl(a, r, {
|
|
5645
5652
|
rows: t,
|
|
5646
5653
|
rowIndex: n
|
|
5647
5654
|
})) return Promise.resolve();
|
|
5648
5655
|
let o = r.startField ?? "startDate", s = t[n - 1], c = s ? $(s[o]) : null, l = c !== null && a >= c ? "above" : "below";
|
|
5649
|
-
return Promise.reject(Error(
|
|
5656
|
+
return Promise.reject(Error(zl(r, l)));
|
|
5650
5657
|
} };
|
|
5651
5658
|
}
|
|
5652
5659
|
//#endregion
|
|
5653
5660
|
//#region src/utils/submitMessages.js
|
|
5654
|
-
function
|
|
5661
|
+
function Ul(e) {
|
|
5655
5662
|
return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
|
|
5656
5663
|
}
|
|
5657
|
-
function
|
|
5664
|
+
function Wl(e) {
|
|
5658
5665
|
let t = String(e ?? "").trim();
|
|
5659
5666
|
return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
|
|
5660
5667
|
}
|
|
5661
|
-
function
|
|
5662
|
-
return String(e).replaceAll("${module}",
|
|
5668
|
+
function Gl(e, t) {
|
|
5669
|
+
return String(e).replaceAll("${module}", Wl(t)).replaceAll("${moduleName}", Wl(t));
|
|
5663
5670
|
}
|
|
5664
|
-
function
|
|
5665
|
-
let r =
|
|
5671
|
+
function Kl(e, t, n) {
|
|
5672
|
+
let r = Ul(e);
|
|
5666
5673
|
if (r?.suppress) return null;
|
|
5667
5674
|
let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
|
|
5668
|
-
return i && String(i).trim() ?
|
|
5675
|
+
return i && String(i).trim() ? Gl(i, t) : n === "edit" ? `${Wl(t)} has Updated successfully` : `${Wl(t)} has added successfully`;
|
|
5669
5676
|
}
|
|
5670
|
-
function
|
|
5671
|
-
let i =
|
|
5672
|
-
return a && String(a).trim() ?
|
|
5677
|
+
function ql(e, t, n, r) {
|
|
5678
|
+
let i = Ul(e), a = n === "edit" ? i?.editError : i?.addError;
|
|
5679
|
+
return a && String(a).trim() ? Gl(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${Wl(t)}` : `Failed to create ${Wl(t)}`;
|
|
5673
5680
|
}
|
|
5674
5681
|
//#endregion
|
|
5675
5682
|
//#region src/utils/scrollToFirstFormError.js
|
|
5676
|
-
function
|
|
5683
|
+
function Jl({ errorFields: e } = {}, t, { root: n = document } = {}) {
|
|
5677
5684
|
if (!e?.length) return;
|
|
5678
5685
|
let r = e[0]?.name;
|
|
5679
5686
|
setTimeout(() => {
|
|
@@ -5698,10 +5705,10 @@ function ql({ errorFields: e } = {}, t, { root: n = document } = {}) {
|
|
|
5698
5705
|
}
|
|
5699
5706
|
//#endregion
|
|
5700
5707
|
//#region src/components/form/conditionalFieldLabel.js
|
|
5701
|
-
function
|
|
5708
|
+
function Yl(e) {
|
|
5702
5709
|
return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
|
|
5703
5710
|
}
|
|
5704
|
-
function
|
|
5711
|
+
function Xl(e, t) {
|
|
5705
5712
|
if (!e?.field) return !1;
|
|
5706
5713
|
switch (e.operator ?? "eq") {
|
|
5707
5714
|
case "eq": return String(t ?? "") === String(e.value ?? "");
|
|
@@ -5709,38 +5716,38 @@ function Yl(e, t) {
|
|
|
5709
5716
|
case "truthy": return t != null && t !== "" && t !== !1;
|
|
5710
5717
|
case "falsy": return t == null || t === "" || t === !1;
|
|
5711
5718
|
case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
|
|
5712
|
-
case "in": return
|
|
5713
|
-
case "notIn": return !
|
|
5719
|
+
case "in": return Yl(e.value).includes(String(t ?? ""));
|
|
5720
|
+
case "notIn": return !Yl(e.value).includes(String(t ?? ""));
|
|
5714
5721
|
default: return !1;
|
|
5715
5722
|
}
|
|
5716
5723
|
}
|
|
5717
|
-
function
|
|
5724
|
+
function Zl(e, t, n = !1) {
|
|
5718
5725
|
let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
|
|
5719
|
-
return
|
|
5726
|
+
return Xl(i, t) && i?.label ? i.label : r;
|
|
5720
5727
|
}
|
|
5721
|
-
function
|
|
5728
|
+
function Ql(e) {
|
|
5722
5729
|
return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
|
|
5723
5730
|
}
|
|
5724
|
-
function
|
|
5725
|
-
let n =
|
|
5731
|
+
function $l(e, t) {
|
|
5732
|
+
let n = Ql(e);
|
|
5726
5733
|
if (!n.length) return !0;
|
|
5727
|
-
let r = n.map((e) =>
|
|
5734
|
+
let r = n.map((e) => Xl(e, t(e.field)));
|
|
5728
5735
|
return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
|
|
5729
5736
|
}
|
|
5730
|
-
function
|
|
5737
|
+
function eu(e) {
|
|
5731
5738
|
let t = e?.colWhen;
|
|
5732
5739
|
return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
|
|
5733
5740
|
}
|
|
5734
|
-
function
|
|
5735
|
-
for (let t of
|
|
5741
|
+
function tu(e, t, n) {
|
|
5742
|
+
for (let t of eu(e)) if (Xl(t, n(t))) return Number(t.col);
|
|
5736
5743
|
return t;
|
|
5737
5744
|
}
|
|
5738
|
-
function
|
|
5745
|
+
function nu(e, t) {
|
|
5739
5746
|
return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
|
|
5740
5747
|
}
|
|
5741
5748
|
//#endregion
|
|
5742
5749
|
//#region src/components/Breadcrumb.jsx
|
|
5743
|
-
function
|
|
5750
|
+
function ru({ items: e = [] }) {
|
|
5744
5751
|
return /* @__PURE__ */ C(_, { items: e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(yr, {
|
|
5745
5752
|
variant: "body",
|
|
5746
5753
|
weight: "medium",
|
|
@@ -5756,6 +5763,6 @@ function nu({ items: e = [] }) {
|
|
|
5756
5763
|
}) })) });
|
|
5757
5764
|
}
|
|
5758
5765
|
//#endregion
|
|
5759
|
-
export {
|
|
5766
|
+
export { ac as $, pt as $n, He as $r, ya as $t, Xc as A, Qn as An, fn as Ar, Y as At, Dc as B, Un as Bn, Nt as Br, Va as Bt, hl as C, Vr as Cn, ct as Cr, qo as Ct, gl as D, I as Dn, Ct as Dr, Oo as Dt, Qc as E, L as En, vt as Er, Go as Et, Uc as F, Xn as Fn, tn as Fr, vo as Ft, fc as G, $e as Gn, Yt as Gr, za as Gt, bc as H, Bn as Hn, gn as Hr, Ua as Ht, Vc as I, Pn as In, Tt as Ir, Za as It, hc as J, ln as Jn, ft as Jr, H as Jt, dc as K, bn as Kn, ze as Kr, Ma as Kt, Rc as L, Hn as Ln, Qe as Lr, to as Lt, Wc as M, ar as Mn, An as Mr, no as Mt, Gc as N, Jn as Nn, Re as Nr, io as Nt, yl as O, qn as On, $t as Or, Do as Ot, Hc as P, nr as Pn, We as Pr, ho as Pt, oc as Q, tt as Qn, bt as Qr, ba as Qt, Lc as R, Vn as Rn, Vt as Rr, Ga as Rt, nl as S, Hr as Sn, at as Sr, Jo as St, el as T, yr as Tn, yt as Tr, Wo as Tt, Sc as U, rt as Un, Tn as Ur, J as Ut, yc as V, Ln as Vn, Pt as Vr, Ha as Vt, _c as W, wt as Wn, Ft as Wr, Na as Wt, gc as X, Xt as Xn, ot as Xr, Ea as Xt, pc as Y, jn as Yn, gt as Yr, q as Yt, cc as Z, En as Zn, lt as Zr, Ra as Zt, Al as _, rn as _i, ri as _n, Ue as _r, ls as _t, Zl as a, et as ai, xi as an, Qt as ar, Rs as at, Tl as b, Qr as bn, on as br, Qo as bt, Ql as c, un as ci, gi as cn, Jt as cr, js as ct, Kl as d, Rt as di, _i as dn, dt as dr, Es as dt, nn as ei, Vi as en, Sn as er, ic as et, Bl as f, _n as fi, di as fn, Dt as fr, bs as ft, kl as g, qt as gi, ii as gn, an as gr, rs as gt, Vl as h, Ut as hi, oi as hn, sn as hr, fs as ht, Xl as i, St as ii, bi as in, Nn as ir, $s as it, Jc as j, F as jn, cn as jr, ro as jt, ml as k, Yn as kn, en as kr, xo as kt, Jl as l, Mn as li, ui as ln, Ze as lr, Ms as lt, Hl as m, jt as mi, si as mn, Wt as mr, ps as mt, eu as n, Ht as ni, qi as nn, hn as nr, nc as nt, $l as o, xn as oi, yi as on, Ve as or, Is as ot, Ll as p, Dn as pi, fi as pn, At as pr, ys as pt, mc as q, pn as qn, nt as qr, ua as qt, nu as r, Gt as ri, Li as rn, dn as rr, tc as rt, tu as s, mn as si, vi as sn, On as sr, Ps as st, ru as t, Be as ti, Gi as tn, xt as tr, rc as tt, ql as u, Zt as ui, li as un, Xe as ur, ws as ut, El as v, Xr as vn, ht as vr, vs as vt, Zc as w, xr as wn, Kt as wr, Ko as wt, Cl as x, Ur as xn, yn as xr, Zo as xt, Dl as y, Zr as yn, _t as yr, Yo as yt, wc as z, P as zn, M as zr, Ka as zt };
|
|
5760
5767
|
|
|
5761
|
-
//# sourceMappingURL=Breadcrumb-
|
|
5768
|
+
//# sourceMappingURL=Breadcrumb-BQ3prySs.js.map
|