@realtek/core-theme 0.0.194 → 0.0.195
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-C_ybG8rI.js → Breadcrumb-Ctv5bKNw.js} +173 -153
- package/dist-lib/Breadcrumb-Ctv5bKNw.js.map +1 -0
- package/dist-lib/Breadcrumb-DMBfmXlX.cjs +3 -0
- package/dist-lib/Breadcrumb-DMBfmXlX.cjs.map +1 -0
- package/dist-lib/index.cjs +7 -7
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +1736 -1449
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
- package/dist-lib/Breadcrumb-Bt70pMBf.cjs +0 -3
- package/dist-lib/Breadcrumb-Bt70pMBf.cjs.map +0 -1
- package/dist-lib/Breadcrumb-C_ybG8rI.js.map +0 -1
|
@@ -2500,25 +2500,45 @@ function yi(e, t, n) {
|
|
|
2500
2500
|
default: return !0;
|
|
2501
2501
|
}
|
|
2502
2502
|
}
|
|
2503
|
-
function bi(e
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2503
|
+
function bi(e) {
|
|
2504
|
+
let t = [];
|
|
2505
|
+
return e?.field && t.push(e.field), Array.isArray(e?.conditions) && e.conditions.forEach((e) => {
|
|
2506
|
+
e?.field && t.push(e.field);
|
|
2507
|
+
}), t;
|
|
2508
2508
|
}
|
|
2509
|
-
function xi(e
|
|
2509
|
+
function xi(e, t, n) {
|
|
2510
|
+
if (!e) return !0;
|
|
2511
|
+
let r = Array.isArray(e.conditions) ? e.conditions.filter((e) => e?.field) : [];
|
|
2512
|
+
if (r.length) {
|
|
2513
|
+
let i = r.map((e) => yi(e, t, n)), a = String(e.logic ?? "and").toLowerCase() === "or", o = a ? i.some(Boolean) : i.every(Boolean);
|
|
2514
|
+
if (e.field) {
|
|
2515
|
+
let r = yi(e, t, n);
|
|
2516
|
+
o = a ? o || r : o && r;
|
|
2517
|
+
}
|
|
2518
|
+
return o;
|
|
2519
|
+
}
|
|
2520
|
+
return yi(e, t, n);
|
|
2521
|
+
}
|
|
2522
|
+
function Si(e, t, n, r, i = /* @__PURE__ */ new Set()) {
|
|
2523
|
+
let a = bi(e?.showIf);
|
|
2524
|
+
return !a.length || i.has(e.field) ? !0 : (i.add(e.field), xi(e.showIf, t, n) ? a.every((e) => {
|
|
2525
|
+
let a = r?.get?.(e);
|
|
2526
|
+
return a ? Si(a, t, n, r, i) : !0;
|
|
2527
|
+
}) : !1);
|
|
2528
|
+
}
|
|
2529
|
+
function Ci(e = []) {
|
|
2510
2530
|
let t = /* @__PURE__ */ new Map();
|
|
2511
2531
|
return e.forEach((e) => (e.fields ?? []).forEach((e) => {
|
|
2512
2532
|
e?.field && !t.has(e.field) && t.set(e.field, e);
|
|
2513
2533
|
})), t;
|
|
2514
2534
|
}
|
|
2515
|
-
function
|
|
2535
|
+
function wi(e = {}, { editing: t = !1 } = {}) {
|
|
2516
2536
|
let n = {};
|
|
2517
2537
|
return (e.fields ?? []).forEach((e) => {
|
|
2518
2538
|
!e.field || e.type === "file" || t && !e.defaultOnEdit || e.defaultValue === void 0 || e.defaultValue === "" || (n[e.field] = e.defaultValue);
|
|
2519
2539
|
}), n;
|
|
2520
2540
|
}
|
|
2521
|
-
function
|
|
2541
|
+
function Ti(e = []) {
|
|
2522
2542
|
let t = [];
|
|
2523
2543
|
return e.forEach((e) => {
|
|
2524
2544
|
(e.fields ?? []).forEach((n) => {
|
|
@@ -2529,17 +2549,17 @@ function Ci(e = []) {
|
|
|
2529
2549
|
});
|
|
2530
2550
|
}), t;
|
|
2531
2551
|
}
|
|
2532
|
-
function
|
|
2533
|
-
return
|
|
2552
|
+
function Ei(e = []) {
|
|
2553
|
+
return Ti(e).map(({ field: e }) => e).filter((e) => e.type === "file");
|
|
2534
2554
|
}
|
|
2535
|
-
function
|
|
2555
|
+
function Di(e) {
|
|
2536
2556
|
return String(e ?? "").trim().toLowerCase();
|
|
2537
2557
|
}
|
|
2538
|
-
function
|
|
2539
|
-
return !!t &&
|
|
2558
|
+
function Oi(e, t) {
|
|
2559
|
+
return !!t && Di(e.moduleName) === t;
|
|
2540
2560
|
}
|
|
2541
|
-
function
|
|
2542
|
-
let r = [], i = n.scope ?? "all", a =
|
|
2561
|
+
function ki(e, t = [], n = {}) {
|
|
2562
|
+
let r = [], i = n.scope ?? "all", a = Di(n.module), o = (e, t) => {
|
|
2543
2563
|
t != null && (Array.isArray(t) ? t : [t]).forEach((t) => {
|
|
2544
2564
|
let n = t?.originFileObj || t;
|
|
2545
2565
|
(typeof File < "u" && n instanceof File || typeof Blob < "u" && n instanceof Blob) && r.push({
|
|
@@ -2551,7 +2571,7 @@ function Di(e, t = [], n = {}) {
|
|
|
2551
2571
|
return (t ?? []).forEach((t) => {
|
|
2552
2572
|
let r = (t.fields ?? []).filter((e) => e.type === "file");
|
|
2553
2573
|
if (!r.length) return;
|
|
2554
|
-
let s = t.moduleName && !
|
|
2574
|
+
let s = t.moduleName && !Oi(t, a), c = (e) => s ? `__mw__${t.moduleName}__${e}` : e;
|
|
2555
2575
|
if (t.addRow) {
|
|
2556
2576
|
if (i === "flat") return;
|
|
2557
2577
|
let a = e[t.name];
|
|
@@ -2569,12 +2589,12 @@ function Di(e, t = [], n = {}) {
|
|
|
2569
2589
|
});
|
|
2570
2590
|
}), r;
|
|
2571
2591
|
}
|
|
2572
|
-
function
|
|
2592
|
+
function Ai(e, t, n = {}) {
|
|
2573
2593
|
let r = U(n.base) ? structuredClone(n.base) : {};
|
|
2574
|
-
|
|
2575
|
-
(e.payloadKey || e.field) && (
|
|
2594
|
+
Ei(t).forEach((e) => {
|
|
2595
|
+
(e.payloadKey || e.field) && (Ni(r, e.payloadKey || e.field), Ni(r, e.field));
|
|
2576
2596
|
});
|
|
2577
|
-
let i =
|
|
2597
|
+
let i = Di(n.module), a = Ci(t), o = /* @__PURE__ */ new Map(), s = (e) => !e.moduleName || Oi(e, i) ? r : (o.has(e.moduleName) || o.set(e.moduleName, {}), o.get(e.moduleName));
|
|
2578
2598
|
return (t ?? []).forEach((t) => {
|
|
2579
2599
|
let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField && K(e, t.toggleField) ? !!G(e, t.toggleField) : !1;
|
|
2580
2600
|
if (t.toggleEnabled && t.toggleField && K(e, t.toggleField) && (q(n, t.toggleField, i), i && t.addRow)) {
|
|
@@ -2584,18 +2604,18 @@ function Oi(e, t, n = {}) {
|
|
|
2584
2604
|
if (t.addRow) {
|
|
2585
2605
|
let i = e[t.name];
|
|
2586
2606
|
if (!Array.isArray(i)) return;
|
|
2587
|
-
q(n, t.payloadKey || t.name, i.map((t) =>
|
|
2607
|
+
q(n, t.payloadKey || t.name, i.map((t) => Mi(r, t, e, a)).filter((e) => e && Object.keys(e).length > 0));
|
|
2588
2608
|
return;
|
|
2589
2609
|
}
|
|
2590
|
-
r.forEach((t) =>
|
|
2610
|
+
r.forEach((t) => ji(t, e, n, e, a));
|
|
2591
2611
|
}), o.size > 0 && (r.moduleWrites = Array.from(o, ([e, t]) => ({
|
|
2592
2612
|
moduleName: e,
|
|
2593
2613
|
data: t
|
|
2594
2614
|
}))), ei(r, t);
|
|
2595
2615
|
}
|
|
2596
|
-
function
|
|
2616
|
+
function ji(e, t, n, r, i) {
|
|
2597
2617
|
if (e.type === "file") return;
|
|
2598
|
-
if (e.showIf
|
|
2618
|
+
if (bi(e.showIf).length && !Si(e, t, r, i)) {
|
|
2599
2619
|
(r === void 0 || r === t) && K(t, e.field) && q(n, e.payloadKey || e.field, null);
|
|
2600
2620
|
return;
|
|
2601
2621
|
}
|
|
@@ -2603,13 +2623,13 @@ function ki(e, t, n, r, i) {
|
|
|
2603
2623
|
if (!K(t, e.field)) return;
|
|
2604
2624
|
let a = G(t, e.field);
|
|
2605
2625
|
if (!Array.isArray(a)) return;
|
|
2606
|
-
let o = a.map((t) =>
|
|
2626
|
+
let o = a.map((t) => Mi(e.subFields, t, r, i)).filter((e) => e && Object.keys(e).length > 0);
|
|
2607
2627
|
q(n, e.payloadKey || e.field, o);
|
|
2608
2628
|
return;
|
|
2609
2629
|
}
|
|
2610
2630
|
if (!K(t, e.field)) return;
|
|
2611
2631
|
if (ti(e.addRow) && (!Array.isArray(e.subFields) || e.subFields.length === 0)) {
|
|
2612
|
-
let r = G(t, e.field), i = Array.isArray(r) ? r : H(r) ? [] : [r], a =
|
|
2632
|
+
let r = G(t, e.field), i = Array.isArray(r) ? r : H(r) ? [] : [r], a = Pi(e), o = i.map((e) => gi(a, e)).filter((e) => e.kind !== "skip").map((e) => e.out);
|
|
2613
2633
|
q(n, e.payloadKey || e.field, o);
|
|
2614
2634
|
return;
|
|
2615
2635
|
}
|
|
@@ -2622,11 +2642,11 @@ function ki(e, t, n, r, i) {
|
|
|
2622
2642
|
q(n, e.payloadKey || e.field, a.out);
|
|
2623
2643
|
}
|
|
2624
2644
|
}
|
|
2625
|
-
function
|
|
2645
|
+
function Mi(e, t, n, r) {
|
|
2626
2646
|
let i = {};
|
|
2627
|
-
return e.forEach((e) =>
|
|
2647
|
+
return e.forEach((e) => ji(e, t, i, n ?? t, r)), i;
|
|
2628
2648
|
}
|
|
2629
|
-
function
|
|
2649
|
+
function Ni(e, t) {
|
|
2630
2650
|
let n = String(t).split("."), r = e;
|
|
2631
2651
|
for (let e = 0; e < n.length - 1; e += 1) {
|
|
2632
2652
|
if (!U(r[n[e]])) return;
|
|
@@ -2656,7 +2676,7 @@ function Y(e, t) {
|
|
|
2656
2676
|
}
|
|
2657
2677
|
return t;
|
|
2658
2678
|
}
|
|
2659
|
-
function
|
|
2679
|
+
function Pi(e = {}) {
|
|
2660
2680
|
return {
|
|
2661
2681
|
...e,
|
|
2662
2682
|
addRow: !1,
|
|
@@ -2665,7 +2685,7 @@ function Mi(e = {}) {
|
|
|
2665
2685
|
dataType: void 0
|
|
2666
2686
|
};
|
|
2667
2687
|
}
|
|
2668
|
-
function
|
|
2688
|
+
function Fi(e, t) {
|
|
2669
2689
|
let n = Math.max(0, Number(e.minRows ?? 0) || 0), r = e.initialRows !== void 0 && e.initialRows !== "" ? Math.max(n, Math.max(0, Number(e.initialRows) || 0)) : n;
|
|
2670
2690
|
if (Array.isArray(e.subFields) && e.subFields.length > 0) {
|
|
2671
2691
|
let i = [];
|
|
@@ -2681,7 +2701,7 @@ function Ni(e, t) {
|
|
|
2681
2701
|
for (; i.length < a;) i.push({});
|
|
2682
2702
|
return i;
|
|
2683
2703
|
}
|
|
2684
|
-
let i =
|
|
2704
|
+
let i = Pi(e), a = [];
|
|
2685
2705
|
if (Array.isArray(t)) a = t.map((e) => Y(i, e)).filter((e) => e != null && e !== "");
|
|
2686
2706
|
else if (t != null && t !== "") {
|
|
2687
2707
|
let e = Y(i, t);
|
|
@@ -2693,12 +2713,12 @@ function Ni(e, t) {
|
|
|
2693
2713
|
}
|
|
2694
2714
|
//#endregion
|
|
2695
2715
|
//#region src/components/form/linkedAddRowGroups.js
|
|
2696
|
-
var
|
|
2697
|
-
function
|
|
2716
|
+
var Ii = (e) => e === !0 || e === 1 || e === "1";
|
|
2717
|
+
function Li(e = []) {
|
|
2698
2718
|
let t = /* @__PURE__ */ new Map();
|
|
2699
2719
|
e.forEach((e) => {
|
|
2700
2720
|
let n = e?.linkGroup;
|
|
2701
|
-
!
|
|
2721
|
+
!Ii(e?.addRow) || !n || (t.has(n) || t.set(n, []), t.get(n).push(e.name));
|
|
2702
2722
|
});
|
|
2703
2723
|
let n = /* @__PURE__ */ new Map();
|
|
2704
2724
|
return t.forEach((e, t) => {
|
|
@@ -2708,11 +2728,11 @@ function Fi(e = []) {
|
|
|
2708
2728
|
});
|
|
2709
2729
|
}), n;
|
|
2710
2730
|
}
|
|
2711
|
-
function
|
|
2731
|
+
function Ri(e, t) {
|
|
2712
2732
|
for (let n of e.values()) if (n.memberNames.includes(t)) return n;
|
|
2713
2733
|
return null;
|
|
2714
2734
|
}
|
|
2715
|
-
function
|
|
2735
|
+
function zi(e, t = {}) {
|
|
2716
2736
|
let n = { ...t };
|
|
2717
2737
|
return e.forEach(({ memberNames: e }) => {
|
|
2718
2738
|
let t = Math.max(...e.map((e) => (n[e] ?? []).length));
|
|
@@ -2724,7 +2744,7 @@ function Li(e, t = {}) {
|
|
|
2724
2744
|
}
|
|
2725
2745
|
//#endregion
|
|
2726
2746
|
//#region src/services/aiActionApi.js
|
|
2727
|
-
async function
|
|
2747
|
+
async function Bi({ module: e, group: t, field: r, actionKey: a, inputs: o = {}, files: s = {} }) {
|
|
2728
2748
|
if (!e || !t || !r || !a) throw Error("module, group, field and actionKey are required to run an AI action");
|
|
2729
2749
|
let c = await n(), l = new FormData();
|
|
2730
2750
|
l.append("json", JSON.stringify({ inputs: o })), Object.entries(s).forEach(([e, t]) => {
|
|
@@ -2750,7 +2770,7 @@ async function Ri({ module: e, group: t, field: r, actionKey: a, inputs: o = {},
|
|
|
2750
2770
|
}
|
|
2751
2771
|
//#endregion
|
|
2752
2772
|
//#region src/components/detail/renderConfig.js
|
|
2753
|
-
var
|
|
2773
|
+
var Vi = [
|
|
2754
2774
|
{
|
|
2755
2775
|
value: "auto",
|
|
2756
2776
|
label: "Default (auto)"
|
|
@@ -2807,7 +2827,7 @@ var zi = [
|
|
|
2807
2827
|
value: "html",
|
|
2808
2828
|
label: "HTML"
|
|
2809
2829
|
}
|
|
2810
|
-
],
|
|
2830
|
+
], Hi = [
|
|
2811
2831
|
{
|
|
2812
2832
|
value: "preview",
|
|
2813
2833
|
label: "Preview (viewer)"
|
|
@@ -2828,7 +2848,7 @@ var zi = [
|
|
|
2828
2848
|
value: "text",
|
|
2829
2849
|
label: "Text (filename)"
|
|
2830
2850
|
}
|
|
2831
|
-
],
|
|
2851
|
+
], Ui = [
|
|
2832
2852
|
{
|
|
2833
2853
|
value: "none",
|
|
2834
2854
|
label: "None"
|
|
@@ -2845,37 +2865,37 @@ var zi = [
|
|
|
2845
2865
|
value: "title",
|
|
2846
2866
|
label: "Title Case"
|
|
2847
2867
|
}
|
|
2848
|
-
],
|
|
2868
|
+
], Wi = [
|
|
2849
2869
|
"location",
|
|
2850
2870
|
"path",
|
|
2851
2871
|
"url",
|
|
2852
2872
|
"key"
|
|
2853
|
-
],
|
|
2873
|
+
], Gi = [
|
|
2854
2874
|
"location",
|
|
2855
2875
|
"filepath",
|
|
2856
2876
|
"path",
|
|
2857
2877
|
"url",
|
|
2858
2878
|
"key"
|
|
2859
|
-
],
|
|
2879
|
+
], Ki = [
|
|
2860
2880
|
"uploadedfilename",
|
|
2861
2881
|
"uploadname",
|
|
2862
2882
|
"originalname",
|
|
2863
2883
|
"displayname",
|
|
2864
2884
|
"documentname",
|
|
2865
2885
|
"filename"
|
|
2866
|
-
],
|
|
2867
|
-
function
|
|
2886
|
+
], qi = ["name"], Ji = (e) => String(e).toLowerCase(), Yi = (e) => e == null || e === "";
|
|
2887
|
+
function Xi(e, t) {
|
|
2868
2888
|
for (let n of t) {
|
|
2869
2889
|
let t = e[n];
|
|
2870
2890
|
if (typeof t == "string" && t) return t;
|
|
2871
2891
|
}
|
|
2872
2892
|
return "";
|
|
2873
2893
|
}
|
|
2874
|
-
function
|
|
2875
|
-
for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r &&
|
|
2894
|
+
function Zi(e, t) {
|
|
2895
|
+
for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r && Ji(t).endsWith(n)) return r;
|
|
2876
2896
|
return "";
|
|
2877
2897
|
}
|
|
2878
|
-
function
|
|
2898
|
+
function Qi(e) {
|
|
2879
2899
|
if (!e) return "";
|
|
2880
2900
|
let t = String(e).split("?")[0].split("#")[0];
|
|
2881
2901
|
return decodeURIComponent(t.split("/").pop() || "");
|
|
@@ -2887,28 +2907,28 @@ function X(e) {
|
|
|
2887
2907
|
let n = Er().s3BaseUrl || "";
|
|
2888
2908
|
return n ? `${n}/${t.replace(/^\/+/, "")}` : "";
|
|
2889
2909
|
}
|
|
2890
|
-
function
|
|
2891
|
-
return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" :
|
|
2910
|
+
function $i(e) {
|
|
2911
|
+
return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : Xi(e, Wi) || Zi(e, Gi);
|
|
2892
2912
|
}
|
|
2893
|
-
function
|
|
2894
|
-
return e ? typeof e == "string" ?
|
|
2913
|
+
function ea(e) {
|
|
2914
|
+
return e ? typeof e == "string" ? Qi(e) || e : typeof e == "object" && (Xi(e, Er().documentNameOrder ?? []) || Zi(e, Ki) || Qi($i(e)) || Zi(e, qi)) || "Document" : "Document";
|
|
2895
2915
|
}
|
|
2896
|
-
function
|
|
2897
|
-
if (
|
|
2916
|
+
function ta(e) {
|
|
2917
|
+
if (Yi(e)) return [];
|
|
2898
2918
|
let t = Array.isArray(e) ? e : [e], n = [];
|
|
2899
|
-
for (let e of t) if (!
|
|
2919
|
+
for (let e of t) if (!Yi(e)) {
|
|
2900
2920
|
if (typeof e == "string") {
|
|
2901
2921
|
let t = e.includes("/") ? e : "";
|
|
2902
2922
|
n.push({
|
|
2903
2923
|
location: t,
|
|
2904
|
-
name:
|
|
2924
|
+
name: Qi(e) || e,
|
|
2905
2925
|
url: X(t)
|
|
2906
2926
|
});
|
|
2907
2927
|
} else if (typeof e == "object") {
|
|
2908
|
-
let t =
|
|
2928
|
+
let t = $i(e), r = e.fileUrl || e.downloadUrl || e.signedUrl || "";
|
|
2909
2929
|
n.push({
|
|
2910
2930
|
location: t,
|
|
2911
|
-
name:
|
|
2931
|
+
name: ea(e),
|
|
2912
2932
|
url: r || X(t)
|
|
2913
2933
|
});
|
|
2914
2934
|
}
|
|
@@ -2917,12 +2937,12 @@ function $i(e) {
|
|
|
2917
2937
|
}
|
|
2918
2938
|
//#endregion
|
|
2919
2939
|
//#region src/components/form/applyGroupValues.js
|
|
2920
|
-
var
|
|
2921
|
-
function
|
|
2940
|
+
var na = (e) => e === !0 || e === 1 || e === "1", ra = (e) => e == null || e === "";
|
|
2941
|
+
function ia(e) {
|
|
2922
2942
|
return String(e ?? "").split(".").map((e) => e.trim()).filter(Boolean);
|
|
2923
2943
|
}
|
|
2924
2944
|
function Z(e, t, n) {
|
|
2925
|
-
let r = Array.isArray(t) ? t :
|
|
2945
|
+
let r = Array.isArray(t) ? t : ia(t);
|
|
2926
2946
|
if (!r.length) return e;
|
|
2927
2947
|
let i = e;
|
|
2928
2948
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
@@ -2931,23 +2951,23 @@ function Z(e, t, n) {
|
|
|
2931
2951
|
}
|
|
2932
2952
|
return i[r[r.length - 1]] = n, e;
|
|
2933
2953
|
}
|
|
2934
|
-
function
|
|
2954
|
+
function aa(e, t = []) {
|
|
2935
2955
|
if (!(!e || typeof e != "object")) for (let n of t) {
|
|
2936
2956
|
if (!n) continue;
|
|
2937
2957
|
let t = W(e, n);
|
|
2938
|
-
if (!
|
|
2958
|
+
if (!ra(t)) return t;
|
|
2939
2959
|
}
|
|
2940
2960
|
}
|
|
2941
2961
|
function Q(e, t) {
|
|
2942
2962
|
if (!e || typeof e != "object") return;
|
|
2943
|
-
let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !
|
|
2963
|
+
let n = Object.entries(e), r = n.find(([e, n]) => t.test(e) && !ra(n));
|
|
2944
2964
|
if (r) return r[1];
|
|
2945
2965
|
for (let [, e] of n) if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
2946
2966
|
let n = Q(e, t);
|
|
2947
|
-
if (!
|
|
2967
|
+
if (!ra(n)) return n;
|
|
2948
2968
|
}
|
|
2949
2969
|
}
|
|
2950
|
-
function
|
|
2970
|
+
function oa(e, t) {
|
|
2951
2971
|
let n = Array.isArray(e) ? e : e ? [e] : [];
|
|
2952
2972
|
if (!n.length) return;
|
|
2953
2973
|
let r = n.map((e, n) => {
|
|
@@ -2957,7 +2977,7 @@ function ia(e, t) {
|
|
|
2957
2977
|
status: "done"
|
|
2958
2978
|
};
|
|
2959
2979
|
if (!e || typeof e != "object") return null;
|
|
2960
|
-
let r =
|
|
2980
|
+
let r = aa(e, [t.fileUrlKey, t.locationKey]) ?? Q(e, /(location|url|path)$/i) ?? "", i = aa(e, [t.fileNameKey]) ?? Q(e, /(uploadName|uploadedFileName|fileName|name)$/i) ?? "";
|
|
2961
2981
|
if (!r && !i) return null;
|
|
2962
2982
|
let a = r && !String(r).startsWith("http") ? X(r) : r;
|
|
2963
2983
|
return {
|
|
@@ -2970,9 +2990,9 @@ function ia(e, t) {
|
|
|
2970
2990
|
}).filter(Boolean);
|
|
2971
2991
|
return r.length ? r : void 0;
|
|
2972
2992
|
}
|
|
2973
|
-
function
|
|
2993
|
+
function sa(e, t) {
|
|
2974
2994
|
if (!e || typeof e != "object") return;
|
|
2975
|
-
let n =
|
|
2995
|
+
let n = aa(e, [t.fileNameKey, t.field]) ?? Q(e, /(uploadName|uploadedFileName|fileName|name)$/i), r = aa(e, [t.fileUrlKey, t.locationKey]) ?? Q(e, /(location|url|path)$/i) ?? "";
|
|
2976
2996
|
if (!n && !r) return;
|
|
2977
2997
|
let i = r && !String(r).startsWith("http") ? X(r) : r, a = e.documentCopyUniqueName ?? e.uniqueName ?? n ?? `${t.field}-0`;
|
|
2978
2998
|
return [{
|
|
@@ -2983,7 +3003,7 @@ function aa(e, t) {
|
|
|
2983
3003
|
url: i || void 0
|
|
2984
3004
|
}];
|
|
2985
3005
|
}
|
|
2986
|
-
function
|
|
3006
|
+
function ca(e) {
|
|
2987
3007
|
let t = Array.isArray(e.rows) ? e.rows : null, n = Math.max(0, Number(e.minRows ?? 0) || 0), r = (t, n, r) => {
|
|
2988
3008
|
let i = {};
|
|
2989
3009
|
return (e.fields ?? []).forEach((e) => {
|
|
@@ -2998,26 +3018,26 @@ function oa(e) {
|
|
|
2998
3018
|
e.defaultOnEdit && e.defaultValue !== void 0 && e.defaultValue !== "" && Z(i, e.field, e.defaultValue);
|
|
2999
3019
|
return;
|
|
3000
3020
|
}
|
|
3001
|
-
Z(i, e.field,
|
|
3021
|
+
Z(i, e.field, na(e.addRow) ? Fi(e, a) : Y(e, a));
|
|
3002
3022
|
}), i;
|
|
3003
|
-
}, i =
|
|
3023
|
+
}, i = wi(e, { editing: !0 });
|
|
3004
3024
|
if (t && t.length > 0) {
|
|
3005
|
-
let e = t.map((e) => r(e, (e, t) =>
|
|
3025
|
+
let e = t.map((e) => r(e, (e, t) => sa(e, t), (e, t) => W(e, t.field)));
|
|
3006
3026
|
for (; e.length < n;) e.push({ ...i });
|
|
3007
3027
|
return e;
|
|
3008
3028
|
}
|
|
3009
|
-
let a = r(e, (e, t) =>
|
|
3029
|
+
let a = r(e, (e, t) => oa(t.value, t), (e, t) => t.value), o = Object.keys(a).length > 0 ? [a] : [];
|
|
3010
3030
|
for (; o.length < n;) o.push({ ...i });
|
|
3011
3031
|
return o;
|
|
3012
3032
|
}
|
|
3013
|
-
function
|
|
3033
|
+
function la(e, t = []) {
|
|
3014
3034
|
let n = {};
|
|
3015
3035
|
return t.forEach((e) => {
|
|
3016
3036
|
e.toggleEnabled && e.toggleField && Z(n, e.toggleField, !!e.toggleValue), !e.addRow && (e.fields ?? []).forEach((e) => {
|
|
3017
3037
|
if (!e.field || e.addRow) return;
|
|
3018
3038
|
let t = e.value, r = e.field;
|
|
3019
3039
|
if (e.type === "file") {
|
|
3020
|
-
let i =
|
|
3040
|
+
let i = oa(t, e);
|
|
3021
3041
|
i && Z(n, r, i);
|
|
3022
3042
|
return;
|
|
3023
3043
|
}
|
|
@@ -3037,27 +3057,27 @@ function sa(e, t = []) {
|
|
|
3037
3057
|
}
|
|
3038
3058
|
//#endregion
|
|
3039
3059
|
//#region src/components/form/useAiActions.js
|
|
3040
|
-
function
|
|
3060
|
+
function ua(e) {
|
|
3041
3061
|
let t = document.createElement("div");
|
|
3042
3062
|
return t.innerHTML = String(e ?? ""), t.textContent || t.innerText || "";
|
|
3043
3063
|
}
|
|
3044
|
-
function
|
|
3045
|
-
return t && t === "stripHtml" ?
|
|
3064
|
+
function da(e, t) {
|
|
3065
|
+
return t && t === "stripHtml" ? ua(e) : e;
|
|
3046
3066
|
}
|
|
3047
|
-
function
|
|
3067
|
+
function fa(e) {
|
|
3048
3068
|
return String(e ?? "").trim().split(/\s+/).filter(Boolean).length;
|
|
3049
3069
|
}
|
|
3050
|
-
function
|
|
3070
|
+
function pa(e) {
|
|
3051
3071
|
return Object.values(e || {}).some((e) => e != null && e !== "");
|
|
3052
3072
|
}
|
|
3053
|
-
function
|
|
3073
|
+
function ma(e, t) {
|
|
3054
3074
|
if (e.kind === "file") return Array.isArray(t) ? t.length > 0 : !!t;
|
|
3055
|
-
let n =
|
|
3075
|
+
let n = da(t, e.transform), r = String(n ?? "").trim();
|
|
3056
3076
|
if (!r) return !1;
|
|
3057
3077
|
let i = Number(e.minWords) || 0;
|
|
3058
|
-
return i > 0 ?
|
|
3078
|
+
return i > 0 ? fa(r) >= i : !0;
|
|
3059
3079
|
}
|
|
3060
|
-
function
|
|
3080
|
+
function ha(e, t) {
|
|
3061
3081
|
let n = e.inputs || [];
|
|
3062
3082
|
if (n.length === 0) return !0;
|
|
3063
3083
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -3065,35 +3085,35 @@ function pa(e, t) {
|
|
|
3065
3085
|
let n = e.group || `__solo_${t}`;
|
|
3066
3086
|
r.has(n) || r.set(n, []), r.get(n).push(e);
|
|
3067
3087
|
});
|
|
3068
|
-
for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) =>
|
|
3088
|
+
for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) => ma(e, t(e.sourceField)))) return !1;
|
|
3069
3089
|
return !0;
|
|
3070
3090
|
}
|
|
3071
|
-
var
|
|
3091
|
+
var ga = [
|
|
3072
3092
|
"top-left",
|
|
3073
3093
|
"top-center",
|
|
3074
3094
|
"top-right",
|
|
3075
3095
|
"bottom-left",
|
|
3076
3096
|
"bottom-center",
|
|
3077
3097
|
"bottom-right"
|
|
3078
|
-
],
|
|
3079
|
-
function
|
|
3098
|
+
], _a = "bottom-left";
|
|
3099
|
+
function va(e = []) {
|
|
3080
3100
|
let t = {};
|
|
3081
3101
|
return e.forEach((e) => {
|
|
3082
|
-
let n =
|
|
3102
|
+
let n = ga.includes(e.position) ? e.position : _a;
|
|
3083
3103
|
(t[n] ??= []).push(e);
|
|
3084
3104
|
}), t;
|
|
3085
3105
|
}
|
|
3086
|
-
function
|
|
3087
|
-
let [r, i] = h(null), a = v.useWatch((e) => e, e), o = d((e) =>
|
|
3106
|
+
function ya({ form: e, groups: t, module: n }) {
|
|
3107
|
+
let [r, i] = h(null), a = v.useWatch((e) => e, e), o = d((e) => ha(e, (e) => (a || {})[e]), [a]), s = d((t) => {
|
|
3088
3108
|
if (!Array.isArray(t) || t.length === 0) return !1;
|
|
3089
|
-
let n =
|
|
3109
|
+
let n = la(e, t.filter((e) => !e.addRow)), r = Object.keys(n).length > 0;
|
|
3090
3110
|
return t.forEach((t) => {
|
|
3091
3111
|
if (!t.addRow || !Array.isArray(t.rows) || t.rows.length === 0) return;
|
|
3092
|
-
let n =
|
|
3112
|
+
let n = ca(t);
|
|
3093
3113
|
if (n.length === 0) return;
|
|
3094
3114
|
r = !0;
|
|
3095
3115
|
let i = () => e.setFieldsValue({ [t.name]: n }), a = e.getFieldValue(t.name) || [];
|
|
3096
|
-
a.some(
|
|
3116
|
+
a.some(pa) ? y.confirm({
|
|
3097
3117
|
title: "Replace existing rows?",
|
|
3098
3118
|
content: `This will replace ${a.length} existing row(s) in "${t.label || t.name}".`,
|
|
3099
3119
|
okText: "Replace",
|
|
@@ -3113,12 +3133,12 @@ function _a({ form: e, groups: t, module: n }) {
|
|
|
3113
3133
|
r && (c[t.param] = r);
|
|
3114
3134
|
} else {
|
|
3115
3135
|
let n = e.getFieldValue(t.sourceField);
|
|
3116
|
-
n != null && n !== "" && (i[t.param] =
|
|
3136
|
+
n != null && n !== "" && (i[t.param] = da(n, t.transform));
|
|
3117
3137
|
}
|
|
3118
3138
|
}), (a.inputs || []).forEach((e) => {
|
|
3119
3139
|
!e.group || e.kind !== "text" || (a.inputs || []).some((t) => t.group === e.group && t.kind === "file" && c[t.param]) && delete i[e.param];
|
|
3120
3140
|
});
|
|
3121
|
-
let l = await
|
|
3141
|
+
let l = await Bi({
|
|
3122
3142
|
module: n,
|
|
3123
3143
|
group: t,
|
|
3124
3144
|
field: r.field,
|
|
@@ -3145,7 +3165,7 @@ function _a({ form: e, groups: t, module: n }) {
|
|
|
3145
3165
|
}
|
|
3146
3166
|
//#endregion
|
|
3147
3167
|
//#region src/components/form/AiActionButtons.jsx
|
|
3148
|
-
function
|
|
3168
|
+
function ba({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
|
|
3149
3169
|
return !t || t.length === 0 ? null : /* @__PURE__ */ C(ee, {
|
|
3150
3170
|
size: 8,
|
|
3151
3171
|
className: "v1-ai-action-buttons",
|
|
@@ -3164,18 +3184,18 @@ function va({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
|
|
|
3164
3184
|
}
|
|
3165
3185
|
//#endregion
|
|
3166
3186
|
//#region src/components/form/emailValidator.js
|
|
3167
|
-
function
|
|
3187
|
+
function xa(e) {
|
|
3168
3188
|
let t = String(e ?? "").trim(), n = /^([^\s@]+)@([^\s@]+)\.([A-Za-z]{2,})$/.exec(t);
|
|
3169
3189
|
if (!n) return !1;
|
|
3170
3190
|
let [, r, i] = n;
|
|
3171
3191
|
return /[A-Za-z]/.test(r) && /[A-Za-z]/.test(i);
|
|
3172
3192
|
}
|
|
3173
|
-
function
|
|
3174
|
-
return { validator: (n, r) => r == null || r === "" ||
|
|
3193
|
+
function Sa(e = "Email", t) {
|
|
3194
|
+
return { validator: (n, r) => r == null || r === "" || xa(r) ? Promise.resolve() : Promise.reject(Error(t ?? `Enter a valid ${e}; numeric-only email addresses are not allowed`)) };
|
|
3175
3195
|
}
|
|
3176
3196
|
//#endregion
|
|
3177
3197
|
//#region src/components/form/inputValidator.js
|
|
3178
|
-
var
|
|
3198
|
+
var Ca = [
|
|
3179
3199
|
{
|
|
3180
3200
|
label: "Only Numbers",
|
|
3181
3201
|
value: "onlyNumber"
|
|
@@ -3244,7 +3264,7 @@ var xa = [
|
|
|
3244
3264
|
label: "Website URL",
|
|
3245
3265
|
value: "websiteUrl"
|
|
3246
3266
|
}
|
|
3247
|
-
],
|
|
3267
|
+
], wa = {
|
|
3248
3268
|
onlyNumber: /^[0-9]$/,
|
|
3249
3269
|
experience: /^[0-9]$/,
|
|
3250
3270
|
numericTwoDigits: /^[0-9]$/,
|
|
@@ -3259,10 +3279,10 @@ var xa = [
|
|
|
3259
3279
|
decimalRange: /^[0-9.]$/,
|
|
3260
3280
|
contactNumber: /^[0-9()\-+\s]$/
|
|
3261
3281
|
};
|
|
3262
|
-
function
|
|
3263
|
-
return
|
|
3282
|
+
function Ta(e) {
|
|
3283
|
+
return wa[e] ?? null;
|
|
3264
3284
|
}
|
|
3265
|
-
function
|
|
3285
|
+
function Ea(e, t = {}, n = "change") {
|
|
3266
3286
|
if (!t?.type || e == null) return {
|
|
3267
3287
|
cleaned: e ?? "",
|
|
3268
3288
|
error: null
|
|
@@ -3340,7 +3360,7 @@ function wa(e, t = {}, n = "change") {
|
|
|
3340
3360
|
break;
|
|
3341
3361
|
}
|
|
3342
3362
|
case "email":
|
|
3343
|
-
c = n === "blur" ? r.trim() : r, c && !
|
|
3363
|
+
c = n === "blur" ? r.trim() : r, c && !xa(c) && (l = `${s} must be a valid email address; numeric-only email addresses are not allowed.`);
|
|
3344
3364
|
break;
|
|
3345
3365
|
case "websiteUrl":
|
|
3346
3366
|
c = n === "blur" ? r.trim() : r, c && !/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/i.test(c) && (l = `${s} must be a valid URL.`);
|
|
@@ -3354,7 +3374,7 @@ function wa(e, t = {}, n = "change") {
|
|
|
3354
3374
|
}
|
|
3355
3375
|
//#endregion
|
|
3356
3376
|
//#region src/components/form/uploadAccept.js
|
|
3357
|
-
var
|
|
3377
|
+
var Da = [
|
|
3358
3378
|
"jpg",
|
|
3359
3379
|
"jpeg",
|
|
3360
3380
|
"png",
|
|
@@ -3363,18 +3383,18 @@ var Ta = [
|
|
|
3363
3383
|
"bmp",
|
|
3364
3384
|
"svg",
|
|
3365
3385
|
"avif"
|
|
3366
|
-
],
|
|
3386
|
+
], Oa = [
|
|
3367
3387
|
"mp4",
|
|
3368
3388
|
"webm",
|
|
3369
3389
|
"ogg",
|
|
3370
3390
|
"ogv",
|
|
3371
3391
|
"mov",
|
|
3372
3392
|
"m4v"
|
|
3373
|
-
],
|
|
3393
|
+
], ka = [
|
|
3374
3394
|
"pdf",
|
|
3375
3395
|
"doc",
|
|
3376
3396
|
"docx"
|
|
3377
|
-
],
|
|
3397
|
+
], Aa = [
|
|
3378
3398
|
{
|
|
3379
3399
|
label: "Any file",
|
|
3380
3400
|
value: "any"
|
|
@@ -3395,44 +3415,44 @@ var Ta = [
|
|
|
3395
3415
|
label: "Images & Videos",
|
|
3396
3416
|
value: "imagesAndVideos"
|
|
3397
3417
|
}
|
|
3398
|
-
],
|
|
3418
|
+
], ja = {
|
|
3399
3419
|
documents: {
|
|
3400
|
-
exts: [...
|
|
3420
|
+
exts: [...ka, ...Da],
|
|
3401
3421
|
hint: "PDF, DOC or image files",
|
|
3402
3422
|
error: "Only document (PDF/DOC) or image files are allowed"
|
|
3403
3423
|
},
|
|
3404
3424
|
images: {
|
|
3405
|
-
exts:
|
|
3425
|
+
exts: Da,
|
|
3406
3426
|
hint: "Image files",
|
|
3407
3427
|
error: "Only image files are allowed"
|
|
3408
3428
|
},
|
|
3409
3429
|
videos: {
|
|
3410
|
-
exts:
|
|
3430
|
+
exts: Oa,
|
|
3411
3431
|
hint: "Video files",
|
|
3412
3432
|
error: "Only video files are allowed"
|
|
3413
3433
|
},
|
|
3414
3434
|
imagesAndVideos: {
|
|
3415
|
-
exts: [...
|
|
3435
|
+
exts: [...Da, ...Oa],
|
|
3416
3436
|
hint: "Image or video files",
|
|
3417
3437
|
error: "Only image or video files are allowed"
|
|
3418
3438
|
}
|
|
3419
3439
|
};
|
|
3420
|
-
function
|
|
3421
|
-
return
|
|
3440
|
+
function Ma(e) {
|
|
3441
|
+
return ja[String(e?.accept ?? "").trim()] ?? null;
|
|
3422
3442
|
}
|
|
3423
3443
|
//#endregion
|
|
3424
3444
|
//#region src/components/form/QuickCreateEditField.jsx
|
|
3425
|
-
var
|
|
3426
|
-
function
|
|
3445
|
+
var Na = u(() => import("./index.js").then((e) => e.i)), Pa = u(() => import("./index.js").then((e) => e.n)), Fa = (e) => e == null || e === "", Ia = (e) => typeof e == "string" && e.includes(".") ? e.split(".") : [e];
|
|
3446
|
+
function La(e, t, n, r, i) {
|
|
3427
3447
|
let a = e.quickEditIdFrom;
|
|
3428
3448
|
if (a) {
|
|
3429
|
-
let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...
|
|
3430
|
-
return
|
|
3449
|
+
let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...Ia(a)] : Ia(a), i = t?.getFieldValue?.(e);
|
|
3450
|
+
return Fa(i) && (i = r?.[a]), Fa(i) ? null : i;
|
|
3431
3451
|
}
|
|
3432
|
-
return i && typeof i == "object" ? i.value ?? null :
|
|
3452
|
+
return i && typeof i == "object" ? i.value ?? null : Fa(i) ? null : i;
|
|
3433
3453
|
}
|
|
3434
|
-
function
|
|
3435
|
-
let [s, c] = h(null), u = !!e?.quickCreate, d = !!e?.quickEdit, f = e?.quickCreateModule || e?.lookupCollection || "", m = e?.quickEditModule || e?.lookupCollection || "", g = p(() => d ?
|
|
3454
|
+
function Ra({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValue: a, onDone: o }) {
|
|
3455
|
+
let [s, c] = h(null), u = !!e?.quickCreate, d = !!e?.quickEdit, f = e?.quickCreateModule || e?.lookupCollection || "", m = e?.quickEditModule || e?.lookupCollection || "", g = p(() => d ? La(e, t, n, i, a) : null, [
|
|
3436
3456
|
d,
|
|
3437
3457
|
e,
|
|
3438
3458
|
t,
|
|
@@ -3503,7 +3523,7 @@ function Ia({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
3503
3523
|
},
|
|
3504
3524
|
children: /* @__PURE__ */ C(b, {})
|
|
3505
3525
|
}),
|
|
3506
|
-
children: s.mode === "create" ? /* @__PURE__ */ C(
|
|
3526
|
+
children: s.mode === "create" ? /* @__PURE__ */ C(Na, {
|
|
3507
3527
|
moduleName: s.module,
|
|
3508
3528
|
embedded: !0,
|
|
3509
3529
|
breadcrumbItems: [],
|
|
@@ -3511,7 +3531,7 @@ function Ia({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
3511
3531
|
onSuccess: (e) => {
|
|
3512
3532
|
v(), o?.("create", e);
|
|
3513
3533
|
}
|
|
3514
|
-
}) : /* @__PURE__ */ C(
|
|
3534
|
+
}) : /* @__PURE__ */ C(Pa, {
|
|
3515
3535
|
moduleName: s.module,
|
|
3516
3536
|
recordId: s.recordId,
|
|
3517
3537
|
embedded: !0,
|
|
@@ -3527,24 +3547,24 @@ function Ia({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
|
|
|
3527
3547
|
}
|
|
3528
3548
|
//#endregion
|
|
3529
3549
|
//#region src/utils/roleAllowsAction.js
|
|
3530
|
-
function
|
|
3531
|
-
return e == null ? !0 : typeof e == "object" ?
|
|
3550
|
+
function za(e) {
|
|
3551
|
+
return e == null ? !0 : typeof e == "object" ? za(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
|
|
3532
3552
|
}
|
|
3533
|
-
function
|
|
3553
|
+
function Ba(e, t) {
|
|
3534
3554
|
if (!e) return !0;
|
|
3535
3555
|
try {
|
|
3536
3556
|
let n = JSON.parse(localStorage.getItem("menuPermission") || "{}"), [r, i] = String(e).split(".");
|
|
3537
|
-
return
|
|
3557
|
+
return za((n[r || String(t || "").replace(/s$/i, "")] ?? n[String(t || "")] ?? n[String(t || "").replace(/s$/i, "")] ?? {})[i]);
|
|
3538
3558
|
} catch {
|
|
3539
3559
|
return !0;
|
|
3540
3560
|
}
|
|
3541
3561
|
}
|
|
3542
3562
|
//#endregion
|
|
3543
3563
|
//#region src/utils/afterSubmitNav.js
|
|
3544
|
-
function
|
|
3564
|
+
function Va(e) {
|
|
3545
3565
|
return (e ?? []).filter((e) => e?.afterSubmit?.mode).sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.afterSubmit ?? null;
|
|
3546
3566
|
}
|
|
3547
|
-
function
|
|
3567
|
+
function Ha(e, t, n) {
|
|
3548
3568
|
let r = String(e ?? "").trim();
|
|
3549
3569
|
return !r || !r.startsWith("/") || r.startsWith("//") || /^[a-z][a-z0-9+.-]*:/i.test(r) ? null : r.replace(/:([A-Za-z_][\w]*)/g, (e, r) => {
|
|
3550
3570
|
let i = r === "id" ? t : n?.[r];
|
|
@@ -3553,29 +3573,29 @@ function Ba(e, t, n) {
|
|
|
3553
3573
|
}
|
|
3554
3574
|
//#endregion
|
|
3555
3575
|
//#region src/utils/submitMessages.js
|
|
3556
|
-
function
|
|
3576
|
+
function Ua(e) {
|
|
3557
3577
|
return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
|
|
3558
3578
|
}
|
|
3559
3579
|
function $(e) {
|
|
3560
3580
|
let t = String(e ?? "").trim();
|
|
3561
3581
|
return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
|
|
3562
3582
|
}
|
|
3563
|
-
function
|
|
3583
|
+
function Wa(e, t) {
|
|
3564
3584
|
return String(e).replaceAll("${module}", $(t)).replaceAll("${moduleName}", $(t));
|
|
3565
3585
|
}
|
|
3566
|
-
function
|
|
3567
|
-
let r =
|
|
3586
|
+
function Ga(e, t, n) {
|
|
3587
|
+
let r = Ua(e);
|
|
3568
3588
|
if (r?.suppress) return null;
|
|
3569
3589
|
let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
|
|
3570
|
-
return i && String(i).trim() ?
|
|
3590
|
+
return i && String(i).trim() ? Wa(i, t) : n === "edit" ? `${$(t)} has Updated successfully` : `${$(t)} has added successfully`;
|
|
3571
3591
|
}
|
|
3572
|
-
function
|
|
3573
|
-
let i =
|
|
3574
|
-
return a && String(a).trim() ?
|
|
3592
|
+
function Ka(e, t, n, r) {
|
|
3593
|
+
let i = Ua(e), a = n === "edit" ? i?.editError : i?.addError;
|
|
3594
|
+
return a && String(a).trim() ? Wa(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${$(t)}` : `Failed to create ${$(t)}`;
|
|
3575
3595
|
}
|
|
3576
3596
|
//#endregion
|
|
3577
3597
|
//#region src/utils/scrollToFirstFormError.js
|
|
3578
|
-
function
|
|
3598
|
+
function qa({ errorFields: e } = {}, t) {
|
|
3579
3599
|
if (!e?.length) return;
|
|
3580
3600
|
let n = e[0]?.name;
|
|
3581
3601
|
setTimeout(() => {
|
|
@@ -3600,10 +3620,10 @@ function Ga({ errorFields: e } = {}, t) {
|
|
|
3600
3620
|
}
|
|
3601
3621
|
//#endregion
|
|
3602
3622
|
//#region src/components/form/conditionalFieldLabel.js
|
|
3603
|
-
function
|
|
3623
|
+
function Ja(e) {
|
|
3604
3624
|
return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
|
|
3605
3625
|
}
|
|
3606
|
-
function
|
|
3626
|
+
function Ya(e, t) {
|
|
3607
3627
|
if (!e?.field) return !1;
|
|
3608
3628
|
switch (e.operator ?? "eq") {
|
|
3609
3629
|
case "eq": return String(t ?? "") === String(e.value ?? "");
|
|
@@ -3611,21 +3631,21 @@ function qa(e, t) {
|
|
|
3611
3631
|
case "truthy": return t != null && t !== "" && t !== !1;
|
|
3612
3632
|
case "falsy": return t == null || t === "" || t === !1;
|
|
3613
3633
|
case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
|
|
3614
|
-
case "in": return
|
|
3615
|
-
case "notIn": return !
|
|
3634
|
+
case "in": return Ja(e.value).includes(String(t ?? ""));
|
|
3635
|
+
case "notIn": return !Ja(e.value).includes(String(t ?? ""));
|
|
3616
3636
|
default: return !1;
|
|
3617
3637
|
}
|
|
3618
3638
|
}
|
|
3619
|
-
function
|
|
3639
|
+
function Xa(e, t, n = !1) {
|
|
3620
3640
|
let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
|
|
3621
|
-
return
|
|
3641
|
+
return Ya(i, t) && i?.label ? i.label : r;
|
|
3622
3642
|
}
|
|
3623
|
-
function
|
|
3643
|
+
function Za(e, t) {
|
|
3624
3644
|
return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
|
|
3625
3645
|
}
|
|
3626
3646
|
//#endregion
|
|
3627
3647
|
//#region src/components/Breadcrumb.jsx
|
|
3628
|
-
function
|
|
3648
|
+
function Qa({ items: e = [] }) {
|
|
3629
3649
|
return /* @__PURE__ */ C(g, { items: e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(Le, {
|
|
3630
3650
|
variant: "body",
|
|
3631
3651
|
weight: "medium",
|
|
@@ -3641,6 +3661,6 @@ function Xa({ items: e = [] }) {
|
|
|
3641
3661
|
}) })) });
|
|
3642
3662
|
}
|
|
3643
3663
|
//#endregion
|
|
3644
|
-
export { Ar as $, fn as $t,
|
|
3664
|
+
export { Ar as $, fn as $t, Li as A, lr as An, mn as At, Pi as B, A as Bn, Gt as Bt, ca as C, ir as Cn, Ln as Ct, Ui as D, In as Dn, Lt as Dt, Vi as E, pr as En, Nn as Et, Fi as F, xt as Fn, Nt as Ft, Ir as G, D as Gn, un as Gt, _i as H, at as Hn, jn as Ht, ki as I, bt as In, tn as It, Mr as J, Xn as Jt, Pr as K, E as Kn, Rn as Kt, ci as L, pt as Ln, rn as Lt, zi as M, On as Mn, kn as Mt, Y as N, Mn as Nn, Gn as Nt, X as O, Cn as On, It as Ot, Ai as P, Hn as Pn, Un as Pt, Or as Q, Bn as Qt, W as R, mt as Rn, Wn as Rt, la as S, Bt as Sn, mr as St, Hi as T, Jn as Tn, ur as Tt, Qr as U, ze as Un, on as Ut, vi as V, ot as Vn, Jt as Vt, Fr as W, Le as Wn, an as Wt, Er as X, dr as Xt, jr as Y, Kn as Yt, Nr as Z, Ot as Zt, Ta as _, Vn as _n, $t as _t, qa as a, er as an, vr as at, va as b, An as bn, $n as bt, Va as c, Pn as cn, dn as ct, Ba as d, Qt as dn, Zn as dt, Rt as en, Cr as et, Ra as f, nn as fn, qn as ft, Ea as g, Mt as gn, Vt as gt, Ca as h, sn as hn, cr as ht, Xa as i, bn as in, Sr as it, Ri as j, vn as jn, _n as jt, ta as k, tr as kn, Zt as kt, Ha as l, kt as ln, zt as lt, Ma as m, Yt as mn, Fn as mt, Za as n, En as nn, _r as nt, Ka as o, sr as on, yr as ot, Aa as p, Kt as pn, fr as pt, wr as q, zn as qt, Ya as r, L as rn, gr as rt, Ga as s, xn as sn, Ut as st, Qa as t, Dt as tn, xr as tt, za as u, Ht as un, rr as ut, Sa as v, At as vn, ar as vt, ia as w, Qn as wn, jt as wt, ya as x, ln as xn, Yn as xt, ba as y, Dn as yn, cn as yt, wi as z, ht as zn, nr as zt };
|
|
3645
3665
|
|
|
3646
|
-
//# sourceMappingURL=Breadcrumb-
|
|
3666
|
+
//# sourceMappingURL=Breadcrumb-Ctv5bKNw.js.map
|