@realtek/core-theme-live 0.0.461 → 0.0.462
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/{FileField-B8zHAP3t.js → FileField-D7P4Ezvq.js} +525 -501
- package/dist-lib/FileField-D7P4Ezvq.js.map +1 -0
- package/dist-lib/FileField-QeCSFxEn.cjs +3 -0
- package/dist-lib/FileField-QeCSFxEn.cjs.map +1 -0
- package/dist-lib/{LinkedRecordFileField-DeB4dO6C.cjs → LinkedRecordFileField-Bewdr9co.cjs} +2 -2
- package/dist-lib/{LinkedRecordFileField-DeB4dO6C.cjs.map → LinkedRecordFileField-Bewdr9co.cjs.map} +1 -1
- package/dist-lib/{LinkedRecordFileField-BQLakQg9.js → LinkedRecordFileField-d5p7sJCV.js} +2 -2
- package/dist-lib/{LinkedRecordFileField-BQLakQg9.js.map → LinkedRecordFileField-d5p7sJCV.js.map} +1 -1
- package/dist-lib/dropdownApi-BQInpe86.cjs +2 -0
- package/dist-lib/dropdownApi-BQInpe86.cjs.map +1 -0
- package/dist-lib/{dropdownApi-CKrs-Jwa.js → dropdownApi-uT-llqYT.js} +5 -5
- package/dist-lib/dropdownApi-uT-llqYT.js.map +1 -0
- package/dist-lib/index.cjs +7 -7
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +8964 -8337
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
- package/dist-lib/FileField-B8zHAP3t.js.map +0 -1
- package/dist-lib/FileField-CEMkSyLL.cjs +0 -3
- package/dist-lib/FileField-CEMkSyLL.cjs.map +0 -1
- package/dist-lib/dropdownApi-C7L-0-2E.cjs +0 -2
- package/dist-lib/dropdownApi-C7L-0-2E.cjs.map +0 -1
- package/dist-lib/dropdownApi-CKrs-Jwa.js.map +0 -1
|
@@ -214,7 +214,7 @@ async function se(e, { gateway: n, strategies: i }) {
|
|
|
214
214
|
async function ce() {
|
|
215
215
|
let e = [];
|
|
216
216
|
try {
|
|
217
|
-
e = await
|
|
217
|
+
e = await Et();
|
|
218
218
|
} catch {
|
|
219
219
|
e = [];
|
|
220
220
|
}
|
|
@@ -504,10 +504,10 @@ function qe(e) {
|
|
|
504
504
|
raw: e
|
|
505
505
|
};
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function T(e) {
|
|
508
508
|
return e?.raw?.teamId ?? e?.teamId ?? e?.key;
|
|
509
509
|
}
|
|
510
|
-
async function
|
|
510
|
+
async function Je({ offset: e = 0, limit: n = 10, sortBy: i = "new", search: a = "" } = {}) {
|
|
511
511
|
let o = new URLSearchParams({
|
|
512
512
|
searchquery: a,
|
|
513
513
|
sortBy: i,
|
|
@@ -519,8 +519,8 @@ async function Ye({ offset: e = 0, limit: n = 10, sortBy: i = "new", search: a =
|
|
|
519
519
|
total: u
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
async function
|
|
523
|
-
let o =
|
|
522
|
+
async function Ye(e, { teamName: n, managerId: i, memberIds: a = [] }) {
|
|
523
|
+
let o = T(e);
|
|
524
524
|
return t(r, `/team/edit?teamId=${o}`, {
|
|
525
525
|
method: "PUT",
|
|
526
526
|
body: JSON.stringify({
|
|
@@ -531,23 +531,24 @@ async function Xe(e, { teamName: n, managerId: i, memberIds: a = [] }) {
|
|
|
531
531
|
})
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
|
-
async function
|
|
534
|
+
async function E(e, n, i, a = "listView", o = !1) {
|
|
535
535
|
let s = new URLSearchParams({
|
|
536
536
|
module: e,
|
|
537
537
|
userId: "0",
|
|
538
538
|
[n]: String(i),
|
|
539
539
|
configType: a
|
|
540
540
|
});
|
|
541
|
-
o &&
|
|
541
|
+
o && s.set("includeMeta", "1");
|
|
542
542
|
let c = await t(r, `${p}?${s}`), l = c.data ?? c, u = h(l, l?.visibleFields, c?.visibleFields);
|
|
543
543
|
return o ? {
|
|
544
544
|
fields: u,
|
|
545
545
|
dataVisibilityMode: l?.dataVisibilityMode ?? c?.dataVisibilityMode ?? "all",
|
|
546
|
-
dataOwnerField: l?.dataOwnerField ?? c?.dataOwnerField ?? "createdBy"
|
|
546
|
+
dataOwnerField: l?.dataOwnerField ?? c?.dataOwnerField ?? "createdBy",
|
|
547
|
+
filterDisplayMode: l?.filterDisplayMode === "top" ? "top" : "popup"
|
|
547
548
|
} : u;
|
|
548
549
|
}
|
|
549
|
-
async function
|
|
550
|
-
let r = w(e), i = y(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => [e, (await
|
|
550
|
+
async function Xe(e, t = "listView", n = m) {
|
|
551
|
+
let r = w(e), i = y(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => [e, (await E(n, "roleId", r, t)).map((t, i) => ({
|
|
551
552
|
...v(t, i),
|
|
552
553
|
module: e,
|
|
553
554
|
apiModule: n,
|
|
@@ -555,9 +556,9 @@ async function Qe(e, t = "listView", n = m) {
|
|
|
555
556
|
}))]));
|
|
556
557
|
return Object.fromEntries(a);
|
|
557
558
|
}
|
|
558
|
-
async function
|
|
559
|
+
async function Ze(e, t = "listView", n = m) {
|
|
559
560
|
let r = w(e), i = y(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => {
|
|
560
|
-
let i = await
|
|
561
|
+
let i = await E(n, "roleId", r, t, !0);
|
|
561
562
|
return [e, {
|
|
562
563
|
fields: i.fields.map((t, i) => ({
|
|
563
564
|
...v(t, i),
|
|
@@ -566,13 +567,14 @@ async function $e(e, t = "listView", n = m) {
|
|
|
566
567
|
roleId: r
|
|
567
568
|
})),
|
|
568
569
|
dataVisibilityMode: i.dataVisibilityMode ?? "all",
|
|
569
|
-
dataOwnerField: i.dataOwnerField ?? "createdBy"
|
|
570
|
+
dataOwnerField: i.dataOwnerField ?? "createdBy",
|
|
571
|
+
filterDisplayMode: i.filterDisplayMode ?? "popup"
|
|
570
572
|
}];
|
|
571
573
|
}));
|
|
572
574
|
return Object.fromEntries(a);
|
|
573
575
|
}
|
|
574
|
-
async function
|
|
575
|
-
let n =
|
|
576
|
+
async function Qe(e, t = "listView") {
|
|
577
|
+
let n = T(e), r = await Promise.all(m.map(async ({ key: e, apiModule: r }) => [e, (await E(r, "teamId", n, t)).map((t, i) => ({
|
|
576
578
|
...v(t, i),
|
|
577
579
|
module: e,
|
|
578
580
|
apiModule: r,
|
|
@@ -580,7 +582,7 @@ async function et(e, t = "listView") {
|
|
|
580
582
|
}))]));
|
|
581
583
|
return Object.fromEntries(r);
|
|
582
584
|
}
|
|
583
|
-
function
|
|
585
|
+
function $e(e) {
|
|
584
586
|
if (!e?.lookup) return null;
|
|
585
587
|
let t = { ...e.lookup }, n = String(t.localField ?? "").trim() || String(e.fieldKey ?? "").trim(), r = String(t.valueField ?? t.foreignField ?? "").trim() || "_id", i = String(t.displayField ?? t.projectField ?? "").trim(), a = String(t.displayField2 ?? "").trim(), o = Array.isArray(t.projectFields) ? t.projectFields.map((e) => String(e ?? "").trim()).filter(Boolean) : [];
|
|
586
588
|
return o.length === 0 && (o = [i, a].filter(Boolean)), {
|
|
@@ -592,7 +594,7 @@ function tt(e) {
|
|
|
592
594
|
projectFields: o
|
|
593
595
|
};
|
|
594
596
|
}
|
|
595
|
-
function
|
|
597
|
+
function et(e, t) {
|
|
596
598
|
let n = !t || t === "listView";
|
|
597
599
|
return e.map((e, r) => {
|
|
598
600
|
let i = {
|
|
@@ -603,6 +605,7 @@ function nt(e, t) {
|
|
|
603
605
|
order: e.order ?? r
|
|
604
606
|
};
|
|
605
607
|
return n ? Object.assign(i, {
|
|
608
|
+
...typeof e.showByDefault == "boolean" ? { showByDefault: e.showByDefault } : {},
|
|
606
609
|
isLink: e.isLink ?? !1,
|
|
607
610
|
linkTemplate: e.linkTemplate ?? "",
|
|
608
611
|
linkType: e.linkType ?? "internal",
|
|
@@ -612,7 +615,7 @@ function nt(e, t) {
|
|
|
612
615
|
secondaryLabel: e.secondaryLabel ?? "",
|
|
613
616
|
secondaryFields: Array.isArray(e.secondaryFields) ? e.secondaryFields : [],
|
|
614
617
|
secondarySeparator: e.secondarySeparator ?? "",
|
|
615
|
-
lookup:
|
|
618
|
+
lookup: $e(e),
|
|
616
619
|
actionButtons: e.actionButtons ?? [],
|
|
617
620
|
derived: e.derived ?? null,
|
|
618
621
|
computed: e.computed ?? null,
|
|
@@ -633,16 +636,17 @@ function nt(e, t) {
|
|
|
633
636
|
].includes(e.type) && (i.dataSource = e.dataSource ?? "module", e.dataSource === "group" && (i.groupName = e.groupName ?? ""))), i;
|
|
634
637
|
});
|
|
635
638
|
}
|
|
636
|
-
async function
|
|
637
|
-
let
|
|
639
|
+
async function tt(e, n, i, a = "listView", o = m, s = "", c = "createdBy", l = !1, u = "popup") {
|
|
640
|
+
let d = w(e), f = y(o).find((e) => e.key === n)?.apiModule ?? n;
|
|
638
641
|
return t(r, `${p}/role`, {
|
|
639
642
|
method: "PUT",
|
|
640
643
|
body: JSON.stringify({
|
|
641
|
-
module:
|
|
642
|
-
roleId:
|
|
644
|
+
module: f,
|
|
645
|
+
roleId: d,
|
|
643
646
|
configType: a,
|
|
644
647
|
updateAllRoles: l,
|
|
645
|
-
|
|
648
|
+
...a === "filter" ? { filterDisplayMode: u } : {},
|
|
649
|
+
visibleFields: et(i, a),
|
|
646
650
|
...(!a || a === "listView") && s ? {
|
|
647
651
|
dataVisibilityMode: s,
|
|
648
652
|
dataOwnerField: String(c || "createdBy").trim() || "createdBy"
|
|
@@ -650,25 +654,25 @@ async function rt(e, n, i, a = "listView", o = m, s = "", c = "createdBy", l = !
|
|
|
650
654
|
})
|
|
651
655
|
});
|
|
652
656
|
}
|
|
653
|
-
var
|
|
654
|
-
function
|
|
657
|
+
var nt = "/admin/role-form-permissions";
|
|
658
|
+
function rt(e) {
|
|
655
659
|
return `__group__:${e}`;
|
|
656
660
|
}
|
|
657
|
-
async function
|
|
661
|
+
async function it(e, n, i = {}) {
|
|
658
662
|
let a = w(e), o = new URLSearchParams({
|
|
659
663
|
module: n,
|
|
660
664
|
roleId: String(a ?? "")
|
|
661
665
|
});
|
|
662
666
|
i.clientId && o.set("clientId", i.clientId), i.region && o.set("region", i.region);
|
|
663
|
-
let s = await t(r, `${
|
|
667
|
+
let s = await t(r, `${nt}?${o}`), c = s?.data ?? s;
|
|
664
668
|
return Array.isArray(c) ? c : [];
|
|
665
669
|
}
|
|
666
|
-
async function
|
|
670
|
+
async function at(e, n, i) {
|
|
667
671
|
let a = w(e), o = [], s = 0;
|
|
668
672
|
for (let e of i) {
|
|
669
673
|
e.locked || o.push({
|
|
670
674
|
label: e.label,
|
|
671
|
-
field:
|
|
675
|
+
field: rt(e.name),
|
|
672
676
|
isVisible: e.enabled,
|
|
673
677
|
isEditable: e.editable !== !1,
|
|
674
678
|
order: s++
|
|
@@ -691,19 +695,19 @@ async function st(e, n, i) {
|
|
|
691
695
|
})
|
|
692
696
|
});
|
|
693
697
|
}
|
|
694
|
-
async function
|
|
695
|
-
let o =
|
|
698
|
+
async function ot(e, n, i, a = "listView") {
|
|
699
|
+
let o = T(e), s = m.find((e) => e.key === n)?.apiModule ?? n;
|
|
696
700
|
return t(r, `${p}/team`, {
|
|
697
701
|
method: "PUT",
|
|
698
702
|
body: JSON.stringify({
|
|
699
703
|
module: s,
|
|
700
704
|
teamId: o,
|
|
701
705
|
configType: a,
|
|
702
|
-
visibleFields:
|
|
706
|
+
visibleFields: et(i, a)
|
|
703
707
|
})
|
|
704
708
|
});
|
|
705
709
|
}
|
|
706
|
-
async function
|
|
710
|
+
async function st({ offset: e = 0, limit: n = 10, sortBy: i = "new", searchQuery: a = "" } = {}) {
|
|
707
711
|
let o = new URLSearchParams({
|
|
708
712
|
offset: String(e),
|
|
709
713
|
limit: String(n),
|
|
@@ -719,21 +723,21 @@ async function lt({ offset: e = 0, limit: n = 10, sortBy: i = "new", searchQuery
|
|
|
719
723
|
}, l)
|
|
720
724
|
};
|
|
721
725
|
}
|
|
722
|
-
async function
|
|
726
|
+
async function ct(e = []) {
|
|
723
727
|
return t(r, `${p}/seed`, {
|
|
724
728
|
method: "POST",
|
|
725
729
|
headers: { "Content-Type": "application/json" },
|
|
726
730
|
body: JSON.stringify({ collections: e })
|
|
727
731
|
});
|
|
728
732
|
}
|
|
729
|
-
async function
|
|
733
|
+
async function lt() {
|
|
730
734
|
let e = await t(r, `${p}/seed-status`), n = e?.data ?? e ?? {};
|
|
731
735
|
return {
|
|
732
736
|
modules: Array.isArray(n.modules) ? n.modules : [],
|
|
733
737
|
seededModules: n.seededModules ?? {}
|
|
734
738
|
};
|
|
735
739
|
}
|
|
736
|
-
async function
|
|
740
|
+
async function ut(e) {
|
|
737
741
|
let t = localStorage.getItem("authToken"), n = new FormData();
|
|
738
742
|
n.append("icon", e);
|
|
739
743
|
let i = await fetch(`${r}/admin/field-config/action-icon`, {
|
|
@@ -748,11 +752,11 @@ async function ft(e) {
|
|
|
748
752
|
let a = await i.json();
|
|
749
753
|
return a.data ?? a;
|
|
750
754
|
}
|
|
751
|
-
async function
|
|
755
|
+
async function dt() {
|
|
752
756
|
let [e, t, n] = await Promise.all([
|
|
753
757
|
ce().catch(() => []),
|
|
754
|
-
|
|
755
|
-
|
|
758
|
+
Ct().catch(() => []),
|
|
759
|
+
Ut().catch(() => [])
|
|
756
760
|
]), r = Array.isArray(e) ? e : [], i = n.map((e) => String(e?.module ?? "").trim()).filter(Boolean);
|
|
757
761
|
return [
|
|
758
762
|
...r,
|
|
@@ -760,7 +764,7 @@ async function pt() {
|
|
|
760
764
|
...i
|
|
761
765
|
];
|
|
762
766
|
}
|
|
763
|
-
async function
|
|
767
|
+
async function ft(e, { page: n = 1, limit: i = 100 } = {}) {
|
|
764
768
|
let a = new URLSearchParams({
|
|
765
769
|
module: e,
|
|
766
770
|
page: String(n),
|
|
@@ -771,24 +775,24 @@ async function mt(e, { page: n = 1, limit: i = 100 } = {}) {
|
|
|
771
775
|
total: s.pagination?.total ?? 0
|
|
772
776
|
};
|
|
773
777
|
}
|
|
774
|
-
async function
|
|
778
|
+
async function pt(e, n) {
|
|
775
779
|
return t(r, `/module/create?module=${encodeURIComponent(e)}`, {
|
|
776
780
|
method: "POST",
|
|
777
781
|
headers: { "Content-Type": "application/json" },
|
|
778
782
|
body: JSON.stringify(n)
|
|
779
783
|
});
|
|
780
784
|
}
|
|
781
|
-
async function
|
|
785
|
+
async function mt(e, n, i) {
|
|
782
786
|
return t(r, `/module/update/${encodeURIComponent(n)}?module=${encodeURIComponent(e)}`, {
|
|
783
787
|
method: "PUT",
|
|
784
788
|
headers: { "Content-Type": "application/json" },
|
|
785
789
|
body: JSON.stringify(i)
|
|
786
790
|
});
|
|
787
791
|
}
|
|
788
|
-
async function
|
|
792
|
+
async function ht(e, n) {
|
|
789
793
|
return t(r, `/module/delete/${encodeURIComponent(n)}?module=${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
790
794
|
}
|
|
791
|
-
async function
|
|
795
|
+
async function gt(e = "", n = 50) {
|
|
792
796
|
let i = new URLSearchParams({
|
|
793
797
|
search: e,
|
|
794
798
|
limit: String(n),
|
|
@@ -802,7 +806,7 @@ async function vt(e = "", n = 50) {
|
|
|
802
806
|
};
|
|
803
807
|
}).filter((e) => e.label);
|
|
804
808
|
}
|
|
805
|
-
async function
|
|
809
|
+
async function _t(e, n, i = "_id") {
|
|
806
810
|
let a = new URLSearchParams({
|
|
807
811
|
collection: String(e),
|
|
808
812
|
displayField: String(n),
|
|
@@ -813,7 +817,7 @@ async function yt(e, n, i = "_id") {
|
|
|
813
817
|
value: String(e.value ?? e._id ?? e.id ?? "")
|
|
814
818
|
})).filter((e) => e.value && e.label);
|
|
815
819
|
}
|
|
816
|
-
function
|
|
820
|
+
function vt(e) {
|
|
817
821
|
if (typeof e == "string") {
|
|
818
822
|
let t = e.trim();
|
|
819
823
|
return t ? {
|
|
@@ -832,18 +836,18 @@ function bt(e) {
|
|
|
832
836
|
forceReq: e.forceReq === !0
|
|
833
837
|
} : null;
|
|
834
838
|
}
|
|
835
|
-
function
|
|
839
|
+
function yt(e) {
|
|
836
840
|
let t = /* @__PURE__ */ new Map();
|
|
837
841
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
838
|
-
let n =
|
|
842
|
+
let n = vt(e);
|
|
839
843
|
n && !t.has(n.field) && t.set(n.field, n);
|
|
840
844
|
}), t;
|
|
841
845
|
}
|
|
842
|
-
async function
|
|
846
|
+
async function bt(e) {
|
|
843
847
|
let n = await t(r, `/admin/default-fields?module=${encodeURIComponent(e)}`), i = n?.data ?? n ?? {};
|
|
844
848
|
return Array.isArray(i.fields) ? i.fields : [];
|
|
845
849
|
}
|
|
846
|
-
async function
|
|
850
|
+
async function xt(e, n, i) {
|
|
847
851
|
return t(r, "/admin/default-fields", {
|
|
848
852
|
method: "PUT",
|
|
849
853
|
headers: { "Content-Type": "application/json" },
|
|
@@ -854,7 +858,7 @@ async function Ct(e, n, i) {
|
|
|
854
858
|
})
|
|
855
859
|
});
|
|
856
860
|
}
|
|
857
|
-
async function
|
|
861
|
+
async function St(e) {
|
|
858
862
|
let n = await t(r, "/email-verify", {
|
|
859
863
|
method: "POST",
|
|
860
864
|
headers: { "Content-Type": "application/json" },
|
|
@@ -872,23 +876,23 @@ async function wt(e) {
|
|
|
872
876
|
checks: Array.isArray(i.checks) ? i.checks : []
|
|
873
877
|
};
|
|
874
878
|
}
|
|
875
|
-
async function
|
|
879
|
+
async function Ct() {
|
|
876
880
|
let e = await t(r, "/admin/lookup/collections"), n = e.data ?? e;
|
|
877
881
|
return Array.isArray(n) ? n : [];
|
|
878
882
|
}
|
|
879
|
-
async function
|
|
883
|
+
async function wt(e) {
|
|
880
884
|
let n = await t(r, `/admin/lookup/collection-fields?collection=${encodeURIComponent(e)}`), i = n.data ?? n;
|
|
881
885
|
return Array.isArray(i) ? i : [];
|
|
882
886
|
}
|
|
883
|
-
async function
|
|
887
|
+
async function Tt(e, n) {
|
|
884
888
|
let i = await t(r, `/admin/field-array-subfields?module=${encodeURIComponent(e)}&field=${encodeURIComponent(n)}`), a = i.data ?? i;
|
|
885
889
|
return Array.isArray(a?.fields) ? a.fields : [];
|
|
886
890
|
}
|
|
887
|
-
async function
|
|
891
|
+
async function Et() {
|
|
888
892
|
let e = await t(r, "/admin/menu-modules");
|
|
889
893
|
return h(e.data, e);
|
|
890
894
|
}
|
|
891
|
-
async function
|
|
895
|
+
async function Dt({ menuName: e, apiUrl: n = "", menuType: i = "menu", parentMenuId: a = 0, displayOrder: o = 0 }) {
|
|
892
896
|
let s = await t(r, "/admin/menu-modules", {
|
|
893
897
|
method: "POST",
|
|
894
898
|
body: JSON.stringify({
|
|
@@ -901,22 +905,22 @@ async function kt({ menuName: e, apiUrl: n = "", menuType: i = "menu", parentMen
|
|
|
901
905
|
});
|
|
902
906
|
return s.data ?? s;
|
|
903
907
|
}
|
|
904
|
-
async function
|
|
908
|
+
async function Ot(e, { menuName: n }) {
|
|
905
909
|
let i = await t(r, `/admin/menu-modules/${e}`, {
|
|
906
910
|
method: "PUT",
|
|
907
911
|
body: JSON.stringify({ menuName: n })
|
|
908
912
|
});
|
|
909
913
|
return i.data ?? i;
|
|
910
914
|
}
|
|
911
|
-
async function
|
|
915
|
+
async function kt(e) {
|
|
912
916
|
let n = await t(r, `/admin/menu-modules/${e}`, { method: "DELETE" });
|
|
913
917
|
return n.data ?? n;
|
|
914
918
|
}
|
|
915
|
-
async function
|
|
919
|
+
async function At() {
|
|
916
920
|
let e = await t(r, "/admin/menu-actions");
|
|
917
921
|
return h(e.data, e);
|
|
918
922
|
}
|
|
919
|
-
async function
|
|
923
|
+
async function jt({ permissionName: e, permissionKey: n }) {
|
|
920
924
|
let i = await t(r, "/admin/menu-actions", {
|
|
921
925
|
method: "POST",
|
|
922
926
|
body: JSON.stringify({
|
|
@@ -926,83 +930,83 @@ async function Nt({ permissionName: e, permissionKey: n }) {
|
|
|
926
930
|
});
|
|
927
931
|
return i.data ?? i;
|
|
928
932
|
}
|
|
929
|
-
async function
|
|
933
|
+
async function Mt(e, { permissionName: n }) {
|
|
930
934
|
let i = await t(r, `/admin/menu-actions/${e}`, {
|
|
931
935
|
method: "PUT",
|
|
932
936
|
body: JSON.stringify({ permissionName: n })
|
|
933
937
|
});
|
|
934
938
|
return i.data ?? i;
|
|
935
939
|
}
|
|
936
|
-
async function
|
|
940
|
+
async function Nt(e) {
|
|
937
941
|
let n = await t(r, `/admin/menu-actions/${e}`, { method: "DELETE" });
|
|
938
942
|
return n.data ?? n;
|
|
939
943
|
}
|
|
940
|
-
function
|
|
941
|
-
if (e && typeof e == "object" && !Array.isArray(e)) return
|
|
944
|
+
function Pt(e) {
|
|
945
|
+
if (e && typeof e == "object" && !Array.isArray(e)) return Pt(e.value ?? e.access_value ?? e.accessValue ?? e.permissionValue ?? e.enabled);
|
|
942
946
|
if (e === !0 || e === 1 || e === "1") return "1";
|
|
943
947
|
let t = String(e ?? "").trim().toLowerCase();
|
|
944
948
|
return t === "true" || t === "yes" || t === "active" ? "1" : "0";
|
|
945
949
|
}
|
|
946
|
-
function
|
|
950
|
+
function Ft(e = {}) {
|
|
947
951
|
return !e || typeof e != "object" || Array.isArray(e) ? e : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, {
|
|
948
952
|
...t,
|
|
949
953
|
menuId: t?.menuId ?? t?.menu_id ?? 0,
|
|
950
954
|
permissions: Object.fromEntries(Object.entries(t?.permissions ?? {}).map(([e, t]) => [e, {
|
|
951
955
|
...t && typeof t == "object" && !Array.isArray(t) ? t : {},
|
|
952
956
|
id: t?.id ?? t?.permission_id ?? t?.permissionId ?? 0,
|
|
953
|
-
value:
|
|
957
|
+
value: Pt(t)
|
|
954
958
|
}]))
|
|
955
959
|
}]));
|
|
956
960
|
}
|
|
957
|
-
async function
|
|
961
|
+
async function It(e) {
|
|
958
962
|
let n = await t(r, `/get-role-details?roleid=${e}`);
|
|
959
963
|
return n?.data ?? n ?? {};
|
|
960
964
|
}
|
|
961
|
-
async function
|
|
965
|
+
async function Lt(e, n) {
|
|
962
966
|
return t(r, "/edit-role-details", {
|
|
963
967
|
method: "PUT",
|
|
964
968
|
headers: { "Content-Type": "application/json" },
|
|
965
969
|
body: JSON.stringify({
|
|
966
970
|
roleId: e,
|
|
967
|
-
menus:
|
|
971
|
+
menus: Ft(n)
|
|
968
972
|
})
|
|
969
973
|
});
|
|
970
974
|
}
|
|
971
|
-
var
|
|
972
|
-
async function
|
|
975
|
+
var D = "/admin/custom-forms";
|
|
976
|
+
async function Rt(e = "", n = "", i = "") {
|
|
973
977
|
let a = new URLSearchParams();
|
|
974
978
|
e && a.append("module", e), n && a.append("formType", n), i && a.append("action", i);
|
|
975
|
-
let o = `${
|
|
979
|
+
let o = `${D}?${a.toString()}`, s = await t(r, o), c = s?.data;
|
|
976
980
|
return Array.isArray(c) ? c : Array.isArray(s) ? s : [];
|
|
977
981
|
}
|
|
978
|
-
async function
|
|
979
|
-
return t(r,
|
|
982
|
+
async function zt(e) {
|
|
983
|
+
return t(r, D, {
|
|
980
984
|
method: "POST",
|
|
981
985
|
headers: { "Content-Type": "application/json" },
|
|
982
986
|
body: JSON.stringify(e)
|
|
983
987
|
});
|
|
984
988
|
}
|
|
985
|
-
async function
|
|
986
|
-
return t(r, `${
|
|
989
|
+
async function Bt(e, n) {
|
|
990
|
+
return t(r, `${D}/${e}`, {
|
|
987
991
|
method: "PUT",
|
|
988
992
|
headers: { "Content-Type": "application/json" },
|
|
989
993
|
body: JSON.stringify(n)
|
|
990
994
|
});
|
|
991
995
|
}
|
|
992
|
-
async function
|
|
993
|
-
return t(r, `${
|
|
996
|
+
async function Vt(e) {
|
|
997
|
+
return t(r, `${D}/${e}`, { method: "DELETE" });
|
|
994
998
|
}
|
|
995
|
-
var
|
|
996
|
-
function
|
|
999
|
+
var O = "/admin/row-action-config";
|
|
1000
|
+
function Ht(e) {
|
|
997
1001
|
return String(e ?? "").trim().toLowerCase();
|
|
998
1002
|
}
|
|
999
|
-
async function
|
|
1000
|
-
let n =
|
|
1003
|
+
async function Ut(e = "") {
|
|
1004
|
+
let n = Ht(e), i = n ? `${O}?module=${encodeURIComponent(n)}` : O, a = await t(r, i), o = a?.data;
|
|
1001
1005
|
return Array.isArray(o) ? o : Array.isArray(a) ? a : [];
|
|
1002
1006
|
}
|
|
1003
|
-
async function
|
|
1004
|
-
let a =
|
|
1005
|
-
return t(r,
|
|
1007
|
+
async function Wt({ module: e, roleId: n = 0, rowActions: i = [] }) {
|
|
1008
|
+
let a = Ht(e);
|
|
1009
|
+
return t(r, O, {
|
|
1006
1010
|
method: "POST",
|
|
1007
1011
|
headers: { "Content-Type": "application/json" },
|
|
1008
1012
|
body: JSON.stringify({
|
|
@@ -1012,23 +1016,23 @@ async function Kt({ module: e, roleId: n = 0, rowActions: i = [] }) {
|
|
|
1012
1016
|
})
|
|
1013
1017
|
});
|
|
1014
1018
|
}
|
|
1015
|
-
async function
|
|
1016
|
-
return t(r, `${
|
|
1019
|
+
async function Gt(e, n = []) {
|
|
1020
|
+
return t(r, `${O}/${e}`, {
|
|
1017
1021
|
method: "PUT",
|
|
1018
1022
|
headers: { "Content-Type": "application/json" },
|
|
1019
1023
|
body: JSON.stringify({ rowActions: n })
|
|
1020
1024
|
});
|
|
1021
1025
|
}
|
|
1022
|
-
async function
|
|
1023
|
-
return t(r, `${
|
|
1026
|
+
async function Kt(e) {
|
|
1027
|
+
return t(r, `${O}/${e}`, { method: "DELETE" });
|
|
1024
1028
|
}
|
|
1025
|
-
var
|
|
1026
|
-
async function
|
|
1027
|
-
let n = await t(r, `${
|
|
1029
|
+
var k = "/admin/module-action-rules";
|
|
1030
|
+
async function qt(e) {
|
|
1031
|
+
let n = await t(r, `${k}?module=${encodeURIComponent(e)}`), i = n?.data;
|
|
1028
1032
|
return Array.isArray(i) ? i : Array.isArray(n) ? n : [];
|
|
1029
1033
|
}
|
|
1030
|
-
async function
|
|
1031
|
-
return t(r,
|
|
1034
|
+
async function Jt({ module: e, name: n, description: i = "", conditions: a = [], blockedActions: o = [], disabledActions: s = [], allowedActions: c = void 0, isActive: l = !0 }) {
|
|
1035
|
+
return t(r, k, {
|
|
1032
1036
|
method: "POST",
|
|
1033
1037
|
headers: { "Content-Type": "application/json" },
|
|
1034
1038
|
body: JSON.stringify({
|
|
@@ -1043,8 +1047,8 @@ async function Xt({ module: e, name: n, description: i = "", conditions: a = [],
|
|
|
1043
1047
|
})
|
|
1044
1048
|
});
|
|
1045
1049
|
}
|
|
1046
|
-
async function
|
|
1047
|
-
return t(r, `${
|
|
1050
|
+
async function Yt(e, { name: n, description: i = "", conditions: a = [], blockedActions: o = [], disabledActions: s = [], allowedActions: c = void 0, isActive: l = !0 }) {
|
|
1051
|
+
return t(r, `${k}/${e}`, {
|
|
1048
1052
|
method: "PUT",
|
|
1049
1053
|
headers: { "Content-Type": "application/json" },
|
|
1050
1054
|
body: JSON.stringify({
|
|
@@ -1058,8 +1062,28 @@ async function Zt(e, { name: n, description: i = "", conditions: a = [], blocked
|
|
|
1058
1062
|
})
|
|
1059
1063
|
});
|
|
1060
1064
|
}
|
|
1061
|
-
async function
|
|
1062
|
-
return t(r, `${
|
|
1065
|
+
async function Xt(e) {
|
|
1066
|
+
return t(r, `${k}/${e}`, { method: "DELETE" });
|
|
1067
|
+
}
|
|
1068
|
+
async function Zt(e) {
|
|
1069
|
+
let n = new URLSearchParams({
|
|
1070
|
+
module: "onboarding",
|
|
1071
|
+
configType: "tabs",
|
|
1072
|
+
userId: "0",
|
|
1073
|
+
roleId: String(w(e))
|
|
1074
|
+
}), i = await t(r, `${p}?${n}`);
|
|
1075
|
+
return i.data ?? i;
|
|
1076
|
+
}
|
|
1077
|
+
async function Qt(e, n) {
|
|
1078
|
+
return t(r, `${p}/role`, {
|
|
1079
|
+
method: "PUT",
|
|
1080
|
+
body: JSON.stringify({
|
|
1081
|
+
module: "onboarding",
|
|
1082
|
+
roleId: w(e),
|
|
1083
|
+
configType: "tabs",
|
|
1084
|
+
onboardingTabs: n
|
|
1085
|
+
})
|
|
1086
|
+
});
|
|
1063
1087
|
}
|
|
1064
1088
|
//#endregion
|
|
1065
1089
|
//#region src/components/detailViewMode.js
|
|
@@ -1101,7 +1125,7 @@ function rn(e, { href: t, navigate: n, location: r } = {}) {
|
|
|
1101
1125
|
}
|
|
1102
1126
|
//#endregion
|
|
1103
1127
|
//#region src/services/detailDefaults.js
|
|
1104
|
-
var
|
|
1128
|
+
var A = Object.freeze({
|
|
1105
1129
|
s3BaseUrl: "https://zinnext-devlopment-ap-south-1.s3.ap-south-1.amazonaws.com".replace(/\/+$/, ""),
|
|
1106
1130
|
dateFormat: "DD MMM YYYY",
|
|
1107
1131
|
dateTimeFormat: "MMM DD, YYYY | hh:mm A",
|
|
@@ -1124,22 +1148,22 @@ var O = Object.freeze({
|
|
|
1124
1148
|
phoneFormat: "3-3-4",
|
|
1125
1149
|
phoneCountryCode: "",
|
|
1126
1150
|
candidateDetailViewMode: "popup"
|
|
1127
|
-
}),
|
|
1128
|
-
function
|
|
1129
|
-
return
|
|
1151
|
+
}), j = { ...A }, an = null;
|
|
1152
|
+
function M() {
|
|
1153
|
+
return j;
|
|
1130
1154
|
}
|
|
1131
|
-
function
|
|
1155
|
+
function on(e) {
|
|
1132
1156
|
if (!e || typeof e != "object") return {};
|
|
1133
1157
|
let t = {};
|
|
1134
1158
|
if (e.s3BaseUrl && (t.s3BaseUrl = String(e.s3BaseUrl).replace(/\/+$/, "")), e.dateFormat && (t.dateFormat = e.dateFormat), e.dateTimeFormat && (t.dateTimeFormat = e.dateTimeFormat), typeof e.showTimeZoneLabel == "boolean" && (t.showTimeZoneLabel = e.showTimeZoneLabel), typeof e.timeZone == "string" && (t.timeZone = e.timeZone.trim()), typeof e.region == "string" && (t.region = e.region.trim()), e.timeZoneAliases && typeof e.timeZoneAliases == "object" && !Array.isArray(e.timeZoneAliases) && (t.timeZoneAliases = {
|
|
1135
|
-
...
|
|
1159
|
+
...j.timeZoneAliases,
|
|
1136
1160
|
...e.timeZoneAliases
|
|
1137
1161
|
}), e.booleanTrueLabel && (t.booleanTrueLabel = e.booleanTrueLabel), e.booleanFalseLabel && (t.booleanFalseLabel = e.booleanFalseLabel), e.emptyPlaceholder && (t.emptyPlaceholder = e.emptyPlaceholder), e.emptyTexts && typeof e.emptyTexts == "object" && !Array.isArray(e.emptyTexts)) {
|
|
1138
1162
|
let n = {};
|
|
1139
1163
|
Object.entries(e.emptyTexts).forEach(([e, t]) => {
|
|
1140
1164
|
typeof t == "string" && t.trim() !== "" && (n[e] = t.trim());
|
|
1141
1165
|
}), Object.keys(n).length && (t.emptyTexts = {
|
|
1142
|
-
...
|
|
1166
|
+
...j.emptyTexts,
|
|
1143
1167
|
...n
|
|
1144
1168
|
});
|
|
1145
1169
|
}
|
|
@@ -1151,7 +1175,7 @@ function an(e) {
|
|
|
1151
1175
|
}
|
|
1152
1176
|
return t;
|
|
1153
1177
|
}
|
|
1154
|
-
function
|
|
1178
|
+
function sn(e = cn()) {
|
|
1155
1179
|
let t = (String(e).match(/\d+/g) ?? [
|
|
1156
1180
|
"3",
|
|
1157
1181
|
"3",
|
|
@@ -1167,18 +1191,18 @@ function M(e = N()) {
|
|
|
1167
1191
|
total: r.reduce((e, t) => e + t, 0)
|
|
1168
1192
|
};
|
|
1169
1193
|
}
|
|
1170
|
-
function
|
|
1171
|
-
return
|
|
1194
|
+
function cn() {
|
|
1195
|
+
return j.phoneFormat || A.phoneFormat;
|
|
1172
1196
|
}
|
|
1173
|
-
function
|
|
1174
|
-
return
|
|
1197
|
+
function ln() {
|
|
1198
|
+
return j.phoneCountryCode ?? A.phoneCountryCode;
|
|
1175
1199
|
}
|
|
1176
|
-
function
|
|
1177
|
-
let { total: n } =
|
|
1200
|
+
function un(e, t = cn()) {
|
|
1201
|
+
let { total: n } = sn(t);
|
|
1178
1202
|
return String(e ?? "").replace(/\D/g, "").slice(0, n);
|
|
1179
1203
|
}
|
|
1180
|
-
function
|
|
1181
|
-
let { groups: n, sep: r } =
|
|
1204
|
+
function dn(e, t = cn()) {
|
|
1205
|
+
let { groups: n, sep: r } = sn(t), i = un(e, t);
|
|
1182
1206
|
if (!i) return "";
|
|
1183
1207
|
let a = [], o = 0;
|
|
1184
1208
|
for (let e of n) {
|
|
@@ -1187,19 +1211,19 @@ function cn(e, t = N()) {
|
|
|
1187
1211
|
}
|
|
1188
1212
|
return a.join(r);
|
|
1189
1213
|
}
|
|
1190
|
-
function
|
|
1191
|
-
let t =
|
|
1192
|
-
return Object.keys(t).forEach((e) =>
|
|
1193
|
-
...
|
|
1214
|
+
function fn(e) {
|
|
1215
|
+
let t = on(e);
|
|
1216
|
+
return Object.keys(t).forEach((e) => pn.add(e)), j = {
|
|
1217
|
+
...j,
|
|
1194
1218
|
...t
|
|
1195
|
-
},
|
|
1219
|
+
}, j;
|
|
1196
1220
|
}
|
|
1197
|
-
var
|
|
1198
|
-
function
|
|
1199
|
-
return
|
|
1221
|
+
var pn = /* @__PURE__ */ new Set();
|
|
1222
|
+
function mn() {
|
|
1223
|
+
return pn.has("dateFormat") ? j.dateFormat : void 0;
|
|
1200
1224
|
}
|
|
1201
|
-
function
|
|
1202
|
-
let t =
|
|
1225
|
+
function hn(e) {
|
|
1226
|
+
let t = j.formDateFormats, n = String(e ?? "").trim().toLowerCase();
|
|
1203
1227
|
if (!t || !n) return;
|
|
1204
1228
|
let r = n.endsWith("s") ? n.slice(0, -1) : n, i = Object.keys(t).find((e) => {
|
|
1205
1229
|
let t = e.trim().toLowerCase();
|
|
@@ -1207,20 +1231,20 @@ function fn(e) {
|
|
|
1207
1231
|
});
|
|
1208
1232
|
return i ? t[i] : void 0;
|
|
1209
1233
|
}
|
|
1210
|
-
function
|
|
1211
|
-
return
|
|
1234
|
+
function gn(e = !1) {
|
|
1235
|
+
return an && !e || (an = Promise.resolve().then(() => Oe()).then((e) => fn(e)).catch(() => j)), an;
|
|
1212
1236
|
}
|
|
1213
1237
|
c.extend(l), c.extend(u);
|
|
1214
|
-
var
|
|
1215
|
-
function
|
|
1216
|
-
if (
|
|
1217
|
-
|
|
1238
|
+
var N = null;
|
|
1239
|
+
function _n() {
|
|
1240
|
+
if (N === null) try {
|
|
1241
|
+
N = c.tz.guess() || "UTC";
|
|
1218
1242
|
} catch {
|
|
1219
|
-
|
|
1243
|
+
N = "UTC";
|
|
1220
1244
|
}
|
|
1221
|
-
return
|
|
1245
|
+
return N;
|
|
1222
1246
|
}
|
|
1223
|
-
function
|
|
1247
|
+
function vn(e) {
|
|
1224
1248
|
let t = String(e ?? "").trim();
|
|
1225
1249
|
if (!t || t !== "UTC" && !t.includes("/")) return !1;
|
|
1226
1250
|
try {
|
|
@@ -1229,30 +1253,30 @@ function hn(e) {
|
|
|
1229
1253
|
return !1;
|
|
1230
1254
|
}
|
|
1231
1255
|
}
|
|
1232
|
-
function
|
|
1256
|
+
function P(e = M()) {
|
|
1233
1257
|
let t = String(e?.timeZone ?? "").trim();
|
|
1234
|
-
return
|
|
1258
|
+
return vn(t) ? t : _n();
|
|
1235
1259
|
}
|
|
1236
|
-
function
|
|
1237
|
-
return c().tz(
|
|
1260
|
+
function yn(e) {
|
|
1261
|
+
return c().tz(P(e));
|
|
1238
1262
|
}
|
|
1239
|
-
function
|
|
1263
|
+
function bn(e, t) {
|
|
1240
1264
|
let n = c(e?.$date ?? e);
|
|
1241
|
-
return n.isValid() ? n.tz(
|
|
1265
|
+
return n.isValid() ? n.tz(P(t)) : n;
|
|
1242
1266
|
}
|
|
1243
|
-
function
|
|
1244
|
-
let r =
|
|
1267
|
+
function xn(e, t, n = M()) {
|
|
1268
|
+
let r = bn(e, n);
|
|
1245
1269
|
return r.isValid() ? r.format(t || n?.dateFormat || "DD MMM YYYY") : "";
|
|
1246
1270
|
}
|
|
1247
|
-
function
|
|
1248
|
-
let n =
|
|
1271
|
+
function Sn(e = M(), t) {
|
|
1272
|
+
let n = P(e), r = An(n, e);
|
|
1249
1273
|
if (r && r.includes("/")) {
|
|
1250
|
-
let e =
|
|
1274
|
+
let e = Cn(n, t);
|
|
1251
1275
|
if (e) return r.split("/").map((e) => e.trim()).find((t) => t.toUpperCase() === e.toUpperCase()) || e;
|
|
1252
1276
|
}
|
|
1253
|
-
return r ||
|
|
1277
|
+
return r || Cn(n, t) || n;
|
|
1254
1278
|
}
|
|
1255
|
-
function
|
|
1279
|
+
function Cn(e, t) {
|
|
1256
1280
|
try {
|
|
1257
1281
|
let n = t === void 0 ? /* @__PURE__ */ new Date() : new Date(c(t?.$date ?? t).valueOf());
|
|
1258
1282
|
if (Number.isNaN(n.valueOf())) return "";
|
|
@@ -1265,28 +1289,28 @@ function bn(e, t) {
|
|
|
1265
1289
|
return "";
|
|
1266
1290
|
}
|
|
1267
1291
|
}
|
|
1268
|
-
function
|
|
1269
|
-
let n =
|
|
1292
|
+
function wn(e, t = M()) {
|
|
1293
|
+
let n = xn(e, t?.dateTimeFormat || "MMM DD, YYYY | hh:mm A", t);
|
|
1270
1294
|
if (!n) return "";
|
|
1271
1295
|
if (t?.showTimeZoneLabel === !1) return n;
|
|
1272
|
-
let r =
|
|
1296
|
+
let r = Sn(t, e);
|
|
1273
1297
|
return r ? `${n} ${r}` : n;
|
|
1274
1298
|
}
|
|
1275
|
-
function
|
|
1299
|
+
function Tn(e) {
|
|
1276
1300
|
if (!e) return !1;
|
|
1277
1301
|
if (e.tzAware === !0) return !0;
|
|
1278
1302
|
if (e.tzAware === !1) return !1;
|
|
1279
1303
|
let t = String(e.type ?? "").toLowerCase();
|
|
1280
1304
|
return t === "datetime" || t === "time" || t === "datetime-local";
|
|
1281
1305
|
}
|
|
1282
|
-
function
|
|
1306
|
+
function En(e, t) {
|
|
1283
1307
|
if (e == null || e === "") return null;
|
|
1284
1308
|
let n = c(e);
|
|
1285
1309
|
if (!n.isValid()) return null;
|
|
1286
|
-
let r =
|
|
1310
|
+
let r = P(t);
|
|
1287
1311
|
return c.tz(n.format("YYYY-MM-DDTHH:mm:ss"), r);
|
|
1288
1312
|
}
|
|
1289
|
-
function
|
|
1313
|
+
function Dn(e = P()) {
|
|
1290
1314
|
try {
|
|
1291
1315
|
let t = c().tz(e).utcOffset(), n = t < 0 ? "-" : "+", r = Math.abs(t);
|
|
1292
1316
|
return `UTC${n}${String(Math.floor(r / 60)).padStart(2, "0")}:${String(r % 60).padStart(2, "0")}`;
|
|
@@ -1294,11 +1318,11 @@ function wn(e = F()) {
|
|
|
1294
1318
|
return "";
|
|
1295
1319
|
}
|
|
1296
1320
|
}
|
|
1297
|
-
function
|
|
1298
|
-
let t =
|
|
1299
|
-
return `${
|
|
1321
|
+
function On(e = M()) {
|
|
1322
|
+
let t = P(e);
|
|
1323
|
+
return `${An(t, e) || t} (${Dn(t)})`;
|
|
1300
1324
|
}
|
|
1301
|
-
var
|
|
1325
|
+
var kn = Object.freeze({
|
|
1302
1326
|
UTC: "UTC",
|
|
1303
1327
|
"Asia/Kolkata": "IST",
|
|
1304
1328
|
"Asia/Calcutta": "IST",
|
|
@@ -1313,10 +1337,10 @@ var En = Object.freeze({
|
|
|
1313
1337
|
"Asia/Tokyo": "JST",
|
|
1314
1338
|
"Australia/Sydney": "AEST/AEDT"
|
|
1315
1339
|
});
|
|
1316
|
-
function
|
|
1317
|
-
return (t?.timeZoneAliases ?? {})[e] ??
|
|
1340
|
+
function An(e, t = M()) {
|
|
1341
|
+
return (t?.timeZoneAliases ?? {})[e] ?? kn[e] ?? "";
|
|
1318
1342
|
}
|
|
1319
|
-
function
|
|
1343
|
+
function jn(e = M()) {
|
|
1320
1344
|
let t = [];
|
|
1321
1345
|
try {
|
|
1322
1346
|
t = Intl.supportedValuesOf("timeZone") ?? [];
|
|
@@ -1325,17 +1349,17 @@ function On(e = j()) {
|
|
|
1325
1349
|
}
|
|
1326
1350
|
let n = [
|
|
1327
1351
|
"UTC",
|
|
1328
|
-
...Object.keys(
|
|
1352
|
+
...Object.keys(kn),
|
|
1329
1353
|
...Object.keys(e?.timeZoneAliases ?? {})
|
|
1330
1354
|
];
|
|
1331
|
-
return [.../* @__PURE__ */ new Set([...n, ...t])].filter(
|
|
1355
|
+
return [.../* @__PURE__ */ new Set([...n, ...t])].filter(vn).map((t) => {
|
|
1332
1356
|
let n = 0;
|
|
1333
1357
|
try {
|
|
1334
1358
|
n = c().tz(t).utcOffset();
|
|
1335
1359
|
} catch {
|
|
1336
1360
|
return null;
|
|
1337
1361
|
}
|
|
1338
|
-
let r =
|
|
1362
|
+
let r = An(t, e), i = Dn(t);
|
|
1339
1363
|
return {
|
|
1340
1364
|
value: t,
|
|
1341
1365
|
alias: r,
|
|
@@ -1347,7 +1371,7 @@ function On(e = j()) {
|
|
|
1347
1371
|
}
|
|
1348
1372
|
//#endregion
|
|
1349
1373
|
//#region src/utils/modulePath.js
|
|
1350
|
-
function
|
|
1374
|
+
function Mn(e) {
|
|
1351
1375
|
let t = String(e ?? "").trim();
|
|
1352
1376
|
if (!t) return {
|
|
1353
1377
|
baseModule: "",
|
|
@@ -1359,35 +1383,35 @@ function kn(e) {
|
|
|
1359
1383
|
nestedPath: r.map((e) => e.trim()).filter(Boolean).join(".")
|
|
1360
1384
|
};
|
|
1361
1385
|
}
|
|
1362
|
-
function
|
|
1363
|
-
return
|
|
1386
|
+
function F(e) {
|
|
1387
|
+
return Mn(e).baseModule;
|
|
1364
1388
|
}
|
|
1365
1389
|
//#endregion
|
|
1366
1390
|
//#region src/services/moduleDataApi.js
|
|
1367
|
-
var
|
|
1368
|
-
function
|
|
1391
|
+
var Nn = "test-flows", Pn = "lms-flows";
|
|
1392
|
+
function Fn(e) {
|
|
1369
1393
|
let t = (Array.isArray(e) ? e : [e]).flat().map((e) => e && typeof e == "object" ? e.value ?? e.label ?? e.name ?? "" : e).map((e) => String(e ?? "").trim().toLowerCase()).filter(Boolean);
|
|
1370
1394
|
return t.includes("dice") ? "dice" : t.includes("internal") ? "internal" : t[0] || "";
|
|
1371
1395
|
}
|
|
1372
|
-
function
|
|
1396
|
+
function In(...e) {
|
|
1373
1397
|
for (let t of e) {
|
|
1374
1398
|
let e = Number(t);
|
|
1375
1399
|
if (Number.isFinite(e)) return e;
|
|
1376
1400
|
}
|
|
1377
1401
|
}
|
|
1378
|
-
function
|
|
1402
|
+
function Ln(e, t, n, r = "") {
|
|
1379
1403
|
let i = e?.count, a = t?.count, o = String(r ?? "").trim().toLowerCase();
|
|
1380
1404
|
if (i && typeof i == "object") {
|
|
1381
|
-
let e =
|
|
1405
|
+
let e = In(o ? i[o] : void 0, i.total, i.searchCount, i.count);
|
|
1382
1406
|
if (e !== void 0) return e;
|
|
1383
1407
|
}
|
|
1384
1408
|
if (a && typeof a == "object") {
|
|
1385
|
-
let e =
|
|
1409
|
+
let e = In(o ? a[o] : void 0, a.total, a.searchCount, a.count);
|
|
1386
1410
|
if (e !== void 0) return e;
|
|
1387
1411
|
}
|
|
1388
|
-
return
|
|
1412
|
+
return In(e?.total, typeof i == "object" ? void 0 : i, e?.totalCount, t?.total, typeof a == "object" ? void 0 : a, t?.totalCount, n.length) ?? 0;
|
|
1389
1413
|
}
|
|
1390
|
-
function
|
|
1414
|
+
function Rn(e, t) {
|
|
1391
1415
|
let n = {};
|
|
1392
1416
|
return [e?.count, t?.count].forEach((e) => {
|
|
1393
1417
|
!e || typeof e != "object" || Object.entries(e).forEach(([e, t]) => {
|
|
@@ -1396,9 +1420,9 @@ function Fn(e, t) {
|
|
|
1396
1420
|
});
|
|
1397
1421
|
}), n;
|
|
1398
1422
|
}
|
|
1399
|
-
async function
|
|
1423
|
+
async function zn(e, t, i = "", a = 50, o = 0, s = {}) {
|
|
1400
1424
|
let c = new URLSearchParams({
|
|
1401
|
-
module:
|
|
1425
|
+
module: F(e),
|
|
1402
1426
|
field: t,
|
|
1403
1427
|
value: i,
|
|
1404
1428
|
limit: String(a),
|
|
@@ -1406,9 +1430,9 @@ async function In(e, t, i = "", a = 50, o = 0, s = {}) {
|
|
|
1406
1430
|
});
|
|
1407
1431
|
return s.dataSource && c.set("dataSource", s.dataSource), s.masterName && c.set("masterName", s.masterName), s.groupName && c.set("groupName", s.groupName), s.scope && c.set("scope", s.scope), s.arrayLabelField && c.set("arrayLabelField", s.arrayLabelField), s.arrayValueField && c.set("arrayValueField", s.arrayValueField), n(r, `/filter-dropdown-values?${c}`);
|
|
1408
1432
|
}
|
|
1409
|
-
async function
|
|
1433
|
+
async function Bn(e, n = 10, i = 0, a = {}) {
|
|
1410
1434
|
let { scope: o = "", sort: s = "", sortDir: c = "", filters: l = [] } = a;
|
|
1411
|
-
if (e ===
|
|
1435
|
+
if (e === Nn) {
|
|
1412
1436
|
let { getTestFlows: e } = await import("./index.js").then((e) => e.t), t = await e({
|
|
1413
1437
|
limit: n,
|
|
1414
1438
|
offset: i
|
|
@@ -1425,7 +1449,7 @@ async function Ln(e, n = 10, i = 0, a = {}) {
|
|
|
1425
1449
|
}]
|
|
1426
1450
|
};
|
|
1427
1451
|
}
|
|
1428
|
-
if (e ===
|
|
1452
|
+
if (e === Pn) {
|
|
1429
1453
|
let { getLmsFlows: e } = await import("./index.js").then((e) => e.t), t = await e({
|
|
1430
1454
|
limit: n,
|
|
1431
1455
|
offset: i
|
|
@@ -1443,13 +1467,13 @@ async function Ln(e, n = 10, i = 0, a = {}) {
|
|
|
1443
1467
|
};
|
|
1444
1468
|
}
|
|
1445
1469
|
let u = new URLSearchParams({
|
|
1446
|
-
module:
|
|
1470
|
+
module: F(e),
|
|
1447
1471
|
limit: String(n),
|
|
1448
1472
|
offset: String(i)
|
|
1449
1473
|
}), d = String(o ?? "").trim();
|
|
1450
1474
|
return d && u.set("scope", d), s && u.set("sort", s), c && u.set("sortDir", c), Array.isArray(l) && l.some((e) => e?.field) && u.set("filters", JSON.stringify(l)), t(r, `/module-data-list?${u.toString()}`);
|
|
1451
1475
|
}
|
|
1452
|
-
async function
|
|
1476
|
+
async function Vn(e, n) {
|
|
1453
1477
|
if (!e || !n) return null;
|
|
1454
1478
|
try {
|
|
1455
1479
|
let i = await t(r, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(n)}`), a = i?.data?.data ?? i?.data ?? i, o = Array.isArray(a) ? a[0] : a;
|
|
@@ -1458,14 +1482,14 @@ async function Rn(e, n) {
|
|
|
1458
1482
|
return null;
|
|
1459
1483
|
}
|
|
1460
1484
|
}
|
|
1461
|
-
async function
|
|
1462
|
-
let { limit: o = 10, offset: s = 0 } = i, { sort: c = "", sortDir: l = "", scope: u = "", filters: d = [] } = a, f =
|
|
1463
|
-
p.append("module",
|
|
1485
|
+
async function Hn(e, n = {}, i = {}, a = {}) {
|
|
1486
|
+
let { limit: o = 10, offset: s = 0 } = i, { sort: c = "", sortDir: l = "", scope: u = "", filters: d = [] } = a, f = Fn(u || String(n.selectedSource ?? "").split(",")), p = new URLSearchParams();
|
|
1487
|
+
p.append("module", F(e)), p.append("limit", String(o)), p.append("offset", String(s)), f && (p.set("scope", f), console.log("[searchModuleData] Adding scope to query:", f)), c && p.set("sort", c), l && p.set("sortDir", l), Array.isArray(d) && d.some((e) => e?.field) && p.set("filters", JSON.stringify(d)), console.log("[searchModuleData] Final query string:", p.toString()), Object.entries(n).forEach(([e, t]) => {
|
|
1464
1488
|
if (t == null || t === "") return;
|
|
1465
1489
|
let n = t;
|
|
1466
1490
|
n = typeof t == "object" ? t.value ?? t.label ?? t.name ?? String(t) : String(t), p.append(e, n);
|
|
1467
1491
|
});
|
|
1468
|
-
let m = await t(r, `/module-data-list?${p.toString()}`), h = m?.data ?? m, g = Array.isArray(h) ? h : h?.rows ?? h?.records ?? h?.items ?? h?.list ?? h?.data ?? [], _ =
|
|
1492
|
+
let m = await t(r, `/module-data-list?${p.toString()}`), h = m?.data ?? m, g = Array.isArray(h) ? h : h?.rows ?? h?.records ?? h?.items ?? h?.list ?? h?.data ?? [], _ = Ln(m, h, g, f), v = Rn(m, h);
|
|
1469
1493
|
f && v[f] === void 0 && Number.isFinite(_) && (v[f] = _);
|
|
1470
1494
|
let ee = g.some((e) => [
|
|
1471
1495
|
e?.sourceType,
|
|
@@ -1478,9 +1502,9 @@ async function zn(e, n = {}, i = {}, a = {}) {
|
|
|
1478
1502
|
let { transformDiceResponseToInternalFormat: e } = await import("./diceCandidateMapper-DqBO4EhL.js").then((e) => e.t);
|
|
1479
1503
|
y = e(m, m)?.data?.data ?? g;
|
|
1480
1504
|
} catch (e) {
|
|
1481
|
-
console.error("[searchModuleData] Dice transformation failed:", e), y = g.map(
|
|
1505
|
+
console.error("[searchModuleData] Dice transformation failed:", e), y = g.map(Gn);
|
|
1482
1506
|
}
|
|
1483
|
-
else y = Array.isArray(g) ? g.map(
|
|
1507
|
+
else y = Array.isArray(g) ? g.map(Gn) : [];
|
|
1484
1508
|
return {
|
|
1485
1509
|
rows: y,
|
|
1486
1510
|
total: Number(_) || 0,
|
|
@@ -1493,10 +1517,10 @@ async function zn(e, n = {}, i = {}, a = {}) {
|
|
|
1493
1517
|
columnActions: h?.columnActions ?? []
|
|
1494
1518
|
};
|
|
1495
1519
|
}
|
|
1496
|
-
function
|
|
1520
|
+
function Un(e, t) {
|
|
1497
1521
|
return String(t).split(".").reduce((e, t) => e?.[t], e);
|
|
1498
1522
|
}
|
|
1499
|
-
function
|
|
1523
|
+
function Wn(e, t, n) {
|
|
1500
1524
|
let r = String(t).split(".").filter(Boolean);
|
|
1501
1525
|
if (!r.length) return e;
|
|
1502
1526
|
let i = { ...e }, a = i, o = e;
|
|
@@ -1505,7 +1529,7 @@ function Vn(e, t, n) {
|
|
|
1505
1529
|
a[e] = n, a = n, o = t;
|
|
1506
1530
|
}), a[r[r.length - 1]] = n, i;
|
|
1507
1531
|
}
|
|
1508
|
-
function
|
|
1532
|
+
function Gn(e) {
|
|
1509
1533
|
if (!e || typeof e != "object") return e;
|
|
1510
1534
|
let t = [
|
|
1511
1535
|
"skills",
|
|
@@ -1515,11 +1539,11 @@ function Hn(e) {
|
|
|
1515
1539
|
"customFields.diceProfileData.skills"
|
|
1516
1540
|
], n = e, r = null;
|
|
1517
1541
|
if (t.forEach((e) => {
|
|
1518
|
-
let t =
|
|
1542
|
+
let t = Un(n, e);
|
|
1519
1543
|
if (t == null) return;
|
|
1520
1544
|
let a = i(t);
|
|
1521
|
-
a.length === 0 && Array.isArray(t) && t.length > 0 || (r ??= a, n =
|
|
1522
|
-
}), r &&
|
|
1545
|
+
a.length === 0 && Array.isArray(t) && t.length > 0 || (r ??= a, n = Wn(n, e, a));
|
|
1546
|
+
}), r && Un(n, "skills") === void 0 && (n = Wn(n, "skills", r)), [
|
|
1523
1547
|
n?.sourceType,
|
|
1524
1548
|
n?.profileSource,
|
|
1525
1549
|
n?.selectedSource,
|
|
@@ -1538,10 +1562,10 @@ function Hn(e) {
|
|
|
1538
1562
|
}
|
|
1539
1563
|
//#endregion
|
|
1540
1564
|
//#region src/services/documentApi.js
|
|
1541
|
-
function
|
|
1565
|
+
function Kn(e) {
|
|
1542
1566
|
return String(e ?? "").replace(/^__mw__.*?__/, "").replace(/\[\d+\]$/, "").trim() || "file";
|
|
1543
1567
|
}
|
|
1544
|
-
async function
|
|
1568
|
+
async function qn(t, n, i = [], a = {}) {
|
|
1545
1569
|
if (!t) throw Error("moduleName is required to upload documents");
|
|
1546
1570
|
if (!n) throw Error("refId (created record id) is required to upload documents");
|
|
1547
1571
|
if (!i.length) return {
|
|
@@ -1551,7 +1575,7 @@ async function Wn(t, n, i = [], a = {}) {
|
|
|
1551
1575
|
let o = await e(), s = new FormData();
|
|
1552
1576
|
i.forEach(({ formKey: e, file: t }) => {
|
|
1553
1577
|
let n = t?.name ?? void 0;
|
|
1554
|
-
s.append(
|
|
1578
|
+
s.append(Kn(e), t, n);
|
|
1555
1579
|
}), a && Object.keys(a).length > 0 && s.append("metadata", JSON.stringify(a));
|
|
1556
1580
|
let c = new URLSearchParams({
|
|
1557
1581
|
module: t,
|
|
@@ -1574,7 +1598,7 @@ async function Wn(t, n, i = [], a = {}) {
|
|
|
1574
1598
|
}
|
|
1575
1599
|
return u?.data ?? u;
|
|
1576
1600
|
}
|
|
1577
|
-
async function
|
|
1601
|
+
async function Jn(e, n, i = "") {
|
|
1578
1602
|
if (!e) throw Error("moduleName is required to fetch documents");
|
|
1579
1603
|
if (!n) throw Error("refId is required to fetch documents");
|
|
1580
1604
|
let a = new URLSearchParams({
|
|
@@ -1588,7 +1612,7 @@ async function Gn(e, n, i = "") {
|
|
|
1588
1612
|
total: s?.total ?? 0
|
|
1589
1613
|
};
|
|
1590
1614
|
}
|
|
1591
|
-
async function
|
|
1615
|
+
async function Yn(e) {
|
|
1592
1616
|
if (!e) return !1;
|
|
1593
1617
|
try {
|
|
1594
1618
|
return await t(r, `/documents/${encodeURIComponent(String(e))}`, { method: "DELETE" }), !0;
|
|
@@ -1596,22 +1620,22 @@ async function Kn(e) {
|
|
|
1596
1620
|
return !1;
|
|
1597
1621
|
}
|
|
1598
1622
|
}
|
|
1599
|
-
function
|
|
1623
|
+
function Xn() {
|
|
1600
1624
|
let e = Math.floor(Date.now() / 1e3).toString(16).padStart(8, "0").slice(0, 8), t = /* @__PURE__ */ new Uint8Array(8);
|
|
1601
1625
|
if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") crypto.getRandomValues(t);
|
|
1602
1626
|
else for (let e = 0; e < t.length; e += 1) t[e] = Math.floor(Math.random() * 256);
|
|
1603
1627
|
return `${e}${Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
1604
1628
|
}
|
|
1605
|
-
function
|
|
1629
|
+
function Zn(e) {
|
|
1606
1630
|
return (Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : []).map((e) => String(e?.id ?? e?._id ?? "").trim()).filter(Boolean);
|
|
1607
1631
|
}
|
|
1608
|
-
async function
|
|
1632
|
+
async function Qn(e = []) {
|
|
1609
1633
|
let t = Array.from(new Set((e || []).map((e) => String(e || "").trim()).filter(Boolean)));
|
|
1610
|
-
t.length !== 0 && await Promise.allSettled(t.map((e) =>
|
|
1634
|
+
t.length !== 0 && await Promise.allSettled(t.map((e) => Yn(e)));
|
|
1611
1635
|
}
|
|
1612
1636
|
//#endregion
|
|
1613
1637
|
//#region src/components/form/inputSecurity.js
|
|
1614
|
-
var
|
|
1638
|
+
var $n = [
|
|
1615
1639
|
"p",
|
|
1616
1640
|
"br",
|
|
1617
1641
|
"strong",
|
|
@@ -1633,12 +1657,12 @@ var Xn = [
|
|
|
1633
1657
|
"a",
|
|
1634
1658
|
"code",
|
|
1635
1659
|
"pre"
|
|
1636
|
-
],
|
|
1660
|
+
], er = [
|
|
1637
1661
|
"href",
|
|
1638
1662
|
"title",
|
|
1639
1663
|
"target",
|
|
1640
1664
|
"rel"
|
|
1641
|
-
],
|
|
1665
|
+
], tr = /[\u200B-\u200D\u2060\uFEFF]/g, nr = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, rr = /^[\p{L}\p{M}\p{N} .'-]+$/u, ir = /^\+?[0-9 ()-]+$/, ar = /^-?(?:\d+|\d*\.\d+)$/, or = [
|
|
1642
1666
|
{
|
|
1643
1667
|
re: /<\s*\/?\s*(?:script|iframe|object|embed|svg|img|form|input|style|link|meta|base|applet|frame|frameset)\b/i,
|
|
1644
1668
|
message: "HTML/script content is not allowed"
|
|
@@ -1665,12 +1689,12 @@ var Xn = [
|
|
|
1665
1689
|
plainOnly: !0
|
|
1666
1690
|
}
|
|
1667
1691
|
];
|
|
1668
|
-
function
|
|
1692
|
+
function sr(e) {
|
|
1669
1693
|
if (typeof document > "u") return e;
|
|
1670
1694
|
let t = document.createElement("textarea");
|
|
1671
1695
|
return t.innerHTML = e, t.value;
|
|
1672
1696
|
}
|
|
1673
|
-
function
|
|
1697
|
+
function cr(e) {
|
|
1674
1698
|
let t = String(e ?? "");
|
|
1675
1699
|
for (let e = 0; e < 2; e += 1) try {
|
|
1676
1700
|
let e = decodeURIComponent(t);
|
|
@@ -1679,12 +1703,12 @@ function ar(e) {
|
|
|
1679
1703
|
} catch {
|
|
1680
1704
|
break;
|
|
1681
1705
|
}
|
|
1682
|
-
return t =
|
|
1706
|
+
return t = sr(t).replace(/\\x([0-9a-f]{2})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))).replace(/\\u([0-9a-f]{4})/gi, (e, t) => String.fromCharCode(Number.parseInt(t, 16))), t.normalize("NFC");
|
|
1683
1707
|
}
|
|
1684
|
-
function
|
|
1708
|
+
function lr(e) {
|
|
1685
1709
|
return f.sanitize(String(e ?? ""), {
|
|
1686
|
-
ALLOWED_TAGS:
|
|
1687
|
-
ALLOWED_ATTR:
|
|
1710
|
+
ALLOWED_TAGS: $n,
|
|
1711
|
+
ALLOWED_ATTR: er,
|
|
1688
1712
|
ALLOW_DATA_ATTR: !1,
|
|
1689
1713
|
FORBID_TAGS: [
|
|
1690
1714
|
"script",
|
|
@@ -1704,35 +1728,35 @@ function or(e) {
|
|
|
1704
1728
|
]
|
|
1705
1729
|
});
|
|
1706
1730
|
}
|
|
1707
|
-
function
|
|
1731
|
+
function ur(e) {
|
|
1708
1732
|
let t = (e.validations ?? []).find((e) => e?.type === "max"), n = Number(e.validator?.maxLength ?? t?.value ?? e.maxLength);
|
|
1709
1733
|
return Number.isFinite(n) && n > 0 ? n : e.type === "email" || e.formatter === "email" ? 255 : e.formatter === "phone" || e.formatter === "digits" ? 32 : e.formatter === "name" ? 100 : e.type === "text-editor" ? 5e4 : (e.type, 5e3);
|
|
1710
1734
|
}
|
|
1711
|
-
function
|
|
1735
|
+
function dr(e) {
|
|
1712
1736
|
return e.type === "textarea" || e.type === "text-editor";
|
|
1713
1737
|
}
|
|
1714
|
-
function
|
|
1738
|
+
function fr(e, t = {}) {
|
|
1715
1739
|
if (typeof e != "string") return e;
|
|
1716
|
-
if (t.type === "text-editor") return
|
|
1717
|
-
let n = e.normalize("NFC").replace(
|
|
1718
|
-
return n =
|
|
1740
|
+
if (t.type === "text-editor") return lr(e.normalize("NFC"));
|
|
1741
|
+
let n = e.normalize("NFC").replace(tr, "").replace(/\u00A0/g, " ").replace(nr, "");
|
|
1742
|
+
return n = dr(t) ? n.replace(/\r\n?/g, "\n").replace(/[ \t]{2,}/g, " ").trim() : n.replace(/\s+/g, " ").trim(), n;
|
|
1719
1743
|
}
|
|
1720
|
-
function
|
|
1744
|
+
function pr(e, t = {}) {
|
|
1721
1745
|
if (typeof e != "string" || e === "") return null;
|
|
1722
|
-
let n = t.label || t.field || "Field", r =
|
|
1746
|
+
let n = t.label || t.field || "Field", r = cr(e);
|
|
1723
1747
|
if (r.includes("\0") || r.includes("\0")) return `${n} contains a null byte`;
|
|
1724
|
-
let i = t.type === "text-editor", a =
|
|
1748
|
+
let i = t.type === "text-editor", a = or.find(({ re: e, plainOnly: t }) => (!t || !i) && e.test(r));
|
|
1725
1749
|
if (a) return `${n}: ${a.message}`;
|
|
1726
|
-
let o =
|
|
1727
|
-
return [...o].length >
|
|
1750
|
+
let o = fr(e, t);
|
|
1751
|
+
return [...o].length > ur(t) ? `${n} is too long` : t.formatter === "name" && o && !rr.test(o) ? `${n} allows only letters, numbers, spaces, apostrophes, hyphens and periods` : (t.formatter === "phone" || t.formatter === "digits") && o && !ir.test(o) ? `${n} contains invalid phone characters` : t.type === "number" && o && !ar.test(o) ? `${n} must contain only a valid number` : (t.type === "url" || t.formatter === "url") && o && !/^https?:\/\//i.test(o) ? `${n} must use http:// or https://` : null;
|
|
1728
1752
|
}
|
|
1729
|
-
function
|
|
1753
|
+
function mr(e) {
|
|
1730
1754
|
return { validator: (t, n) => {
|
|
1731
|
-
let r = (Array.isArray(n) ? n : [n]).map((t) =>
|
|
1755
|
+
let r = (Array.isArray(n) ? n : [n]).map((t) => pr(t, e)).find(Boolean);
|
|
1732
1756
|
return r ? Promise.reject(Error(r)) : Promise.resolve();
|
|
1733
1757
|
} };
|
|
1734
1758
|
}
|
|
1735
|
-
function
|
|
1759
|
+
function hr(e = []) {
|
|
1736
1760
|
let t = /* @__PURE__ */ new Map();
|
|
1737
1761
|
return e.forEach((e) => {
|
|
1738
1762
|
(e.fields ?? []).forEach((n) => {
|
|
@@ -1744,12 +1768,12 @@ function fr(e = []) {
|
|
|
1744
1768
|
});
|
|
1745
1769
|
}), t;
|
|
1746
1770
|
}
|
|
1747
|
-
function
|
|
1748
|
-
let n =
|
|
1771
|
+
function gr(e, t = []) {
|
|
1772
|
+
let n = hr(t), r = (e, t = "") => {
|
|
1749
1773
|
if (typeof e == "string") {
|
|
1750
|
-
let r = n.get(t) ?? {}, i =
|
|
1774
|
+
let r = n.get(t) ?? {}, i = pr(e, r);
|
|
1751
1775
|
if (i) throw Error(i);
|
|
1752
|
-
return
|
|
1776
|
+
return fr(e, r);
|
|
1753
1777
|
}
|
|
1754
1778
|
return Array.isArray(e) ? e.map((e) => r(e, `${t}[]`)) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, n]) => {
|
|
1755
1779
|
if (e.startsWith("$") || e.includes(".") || e.includes("\0")) throw Error(`Unsafe object key: ${e}`);
|
|
@@ -1761,23 +1785,23 @@ function pr(e, t = []) {
|
|
|
1761
1785
|
}
|
|
1762
1786
|
//#endregion
|
|
1763
1787
|
//#region src/components/form/validationOverride.js
|
|
1764
|
-
var
|
|
1765
|
-
function
|
|
1788
|
+
var _r = (e) => e === !0 || e === 1 || e === "1" || e === "true";
|
|
1789
|
+
function I(e) {
|
|
1766
1790
|
let t = e?.overrideCheckbox;
|
|
1767
|
-
return !t || typeof t != "object" ? null :
|
|
1791
|
+
return !t || typeof t != "object" ? null : yr(e).size > 0 ? t : null;
|
|
1768
1792
|
}
|
|
1769
|
-
function
|
|
1793
|
+
function vr(e) {
|
|
1770
1794
|
return String(e?.overrideCheckbox?.field ?? "").trim() || `${String(e?.field ?? "").replace(/\./g, "_")}__override`;
|
|
1771
1795
|
}
|
|
1772
|
-
function
|
|
1796
|
+
function yr(e) {
|
|
1773
1797
|
let t = e?.overrideCheckbox?.skipValidations, n = Array.isArray(t) ? t : String(t ?? "").split(",");
|
|
1774
1798
|
return new Set(n.map((e) => String(e ?? "").trim()).filter(Boolean));
|
|
1775
1799
|
}
|
|
1776
|
-
function
|
|
1800
|
+
function br(e) {
|
|
1777
1801
|
return e?.overrideCheckbox?.store !== !1;
|
|
1778
1802
|
}
|
|
1779
|
-
function
|
|
1780
|
-
let r =
|
|
1803
|
+
function xr(e, t, n) {
|
|
1804
|
+
let r = vr(e);
|
|
1781
1805
|
if (typeof n == "function") {
|
|
1782
1806
|
let e = n(r);
|
|
1783
1807
|
if (Array.isArray(e) && e.length) return [...e, r];
|
|
@@ -1788,27 +1812,27 @@ function vr(e, t, n) {
|
|
|
1788
1812
|
r
|
|
1789
1813
|
] : [r];
|
|
1790
1814
|
}
|
|
1791
|
-
function
|
|
1815
|
+
function Sr(e, t) {
|
|
1792
1816
|
return (n) => {
|
|
1793
1817
|
let r = !1;
|
|
1794
1818
|
try {
|
|
1795
|
-
r =
|
|
1819
|
+
r = _r(n?.getFieldValue?.(t));
|
|
1796
1820
|
} catch {
|
|
1797
1821
|
r = !1;
|
|
1798
1822
|
}
|
|
1799
1823
|
return r ? {} : e;
|
|
1800
1824
|
};
|
|
1801
1825
|
}
|
|
1802
|
-
function
|
|
1803
|
-
if (!
|
|
1804
|
-
let i =
|
|
1826
|
+
function Cr(e, t, n, r) {
|
|
1827
|
+
if (!I(e)) return r;
|
|
1828
|
+
let i = yr(e), a = xr(e, t, n);
|
|
1805
1829
|
return (e) => {
|
|
1806
1830
|
let t = r(e), n = typeof e == "string" ? e : e?.type;
|
|
1807
|
-
return i.has(n) ?
|
|
1831
|
+
return i.has(n) ? Sr(t, a) : t;
|
|
1808
1832
|
};
|
|
1809
1833
|
}
|
|
1810
|
-
function
|
|
1811
|
-
let t =
|
|
1834
|
+
function wr(e) {
|
|
1835
|
+
let t = I(e) ?? {}, n = e?.label ?? e?.field ?? "this field";
|
|
1812
1836
|
return {
|
|
1813
1837
|
tone: t.tone ?? "overwrite",
|
|
1814
1838
|
title: t.confirmTitle || "Remove the validation on this field?",
|
|
@@ -1819,12 +1843,12 @@ function xr(e) {
|
|
|
1819
1843
|
}
|
|
1820
1844
|
//#endregion
|
|
1821
1845
|
//#region src/components/form/optionMatching.js
|
|
1822
|
-
function
|
|
1846
|
+
function L(e) {
|
|
1823
1847
|
return String(e ?? "").normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "");
|
|
1824
1848
|
}
|
|
1825
|
-
function
|
|
1849
|
+
function Tr(e) {
|
|
1826
1850
|
let t = /* @__PURE__ */ new Map(), n = (e, n) => {
|
|
1827
|
-
let r =
|
|
1851
|
+
let r = L(e);
|
|
1828
1852
|
r && !t.has(r) && t.set(r, n);
|
|
1829
1853
|
};
|
|
1830
1854
|
return (Array.isArray(e?.options) ? e.options : []).forEach((e) => {
|
|
@@ -1832,40 +1856,40 @@ function Sr(e) {
|
|
|
1832
1856
|
let t = typeof e == "object" ? e.value : e;
|
|
1833
1857
|
t != null && t !== "" && (n(t, t), typeof e == "object" && e.label !== void 0 && n(e.label, t));
|
|
1834
1858
|
}), Object.entries(e?.optionAliases ?? {}).forEach(([e, r]) => {
|
|
1835
|
-
let i = t.get(
|
|
1859
|
+
let i = t.get(L(r));
|
|
1836
1860
|
i !== void 0 && n(e, i);
|
|
1837
1861
|
}), t;
|
|
1838
1862
|
}
|
|
1839
|
-
var
|
|
1840
|
-
function
|
|
1863
|
+
var Er = (e) => Array.isArray(e?.options) && e.options.length > 0;
|
|
1864
|
+
function Dr(e, t) {
|
|
1841
1865
|
if (t == null || t === "" || typeof t == "object") return t;
|
|
1842
|
-
let n = e.get(
|
|
1866
|
+
let n = e.get(L(t));
|
|
1843
1867
|
return n === void 0 ? t : n;
|
|
1844
1868
|
}
|
|
1845
|
-
function
|
|
1846
|
-
if (!
|
|
1847
|
-
let n =
|
|
1848
|
-
return n.size === 0 ? t : Array.isArray(t) ? t.map((e) =>
|
|
1869
|
+
function Or(e, t) {
|
|
1870
|
+
if (!Er(e)) return t;
|
|
1871
|
+
let n = Tr(e);
|
|
1872
|
+
return n.size === 0 ? t : Array.isArray(t) ? t.map((e) => Dr(n, e)) : Dr(n, t);
|
|
1849
1873
|
}
|
|
1850
1874
|
//#endregion
|
|
1851
1875
|
//#region src/components/form/mountDefaultValue.js
|
|
1852
|
-
function
|
|
1876
|
+
function kr(e = {}) {
|
|
1853
1877
|
let t = e?.defaultValue;
|
|
1854
1878
|
if (t === void 0 || t === "") return;
|
|
1855
|
-
if (e?.type === "time") return
|
|
1856
|
-
if (e?.type === "date") return
|
|
1879
|
+
if (e?.type === "time") return Mr(t);
|
|
1880
|
+
if (e?.type === "date") return Fr(t);
|
|
1857
1881
|
if (e?.type !== "checkbox") return t;
|
|
1858
1882
|
let n = Array.isArray(e.options) ? e.options : [];
|
|
1859
1883
|
if (!n.length) return t;
|
|
1860
1884
|
let r = n.map((e) => String(e && typeof e == "object" ? e.value : e));
|
|
1861
1885
|
return (Array.isArray(t) ? t : [t]).some((e) => r.includes(String(e))) ? t : void 0;
|
|
1862
1886
|
}
|
|
1863
|
-
var
|
|
1864
|
-
function
|
|
1887
|
+
var Ar = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*([ap]\.?\s?m\.?)?$/i, jr = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;
|
|
1888
|
+
function Mr(e) {
|
|
1865
1889
|
if (e == null || e === "") return;
|
|
1866
1890
|
if (c.isDayjs(e)) return e.isValid() ? e : void 0;
|
|
1867
1891
|
if (typeof e != "string") return;
|
|
1868
|
-
let t = e.trim(), n = t.match(
|
|
1892
|
+
let t = e.trim(), n = t.match(Ar);
|
|
1869
1893
|
if (n) {
|
|
1870
1894
|
let e = Number(n[1]), t = Number(n[2]), r = Number(n[3] ?? 0), i = n[4]?.replace(/[.\s]/g, "").toLowerCase();
|
|
1871
1895
|
if (i) {
|
|
@@ -1874,13 +1898,13 @@ function kr(e) {
|
|
|
1874
1898
|
}
|
|
1875
1899
|
return e > 23 || t > 59 || r > 59 ? void 0 : c().hour(e).minute(t).second(r).millisecond(0);
|
|
1876
1900
|
}
|
|
1877
|
-
if (
|
|
1901
|
+
if (jr.test(t)) {
|
|
1878
1902
|
let e = c(t);
|
|
1879
1903
|
return e.isValid() ? e : void 0;
|
|
1880
1904
|
}
|
|
1881
1905
|
}
|
|
1882
|
-
var
|
|
1883
|
-
function
|
|
1906
|
+
var Nr = /^today\s*(?:([+-])\s*(\d{1,4}))?$/i, Pr = /^\d{4}-\d{2}-\d{2}(?:[T ].*)?$/;
|
|
1907
|
+
function Fr(e, t = c()) {
|
|
1884
1908
|
if (e == null || e === "") return;
|
|
1885
1909
|
if (c.isDayjs(e)) return e.isValid() ? e : void 0;
|
|
1886
1910
|
if (e instanceof Date) {
|
|
@@ -1888,49 +1912,49 @@ function Mr(e, t = c()) {
|
|
|
1888
1912
|
return t.isValid() ? t : void 0;
|
|
1889
1913
|
}
|
|
1890
1914
|
if (typeof e != "string") return;
|
|
1891
|
-
let n = e.trim(), r = n.match(
|
|
1915
|
+
let n = e.trim(), r = n.match(Nr);
|
|
1892
1916
|
if (r) {
|
|
1893
1917
|
let e = r[2] ? Number(r[2]) * (r[1] === "-" ? -1 : 1) : 0;
|
|
1894
1918
|
return c(t).startOf("day").add(e, "day");
|
|
1895
1919
|
}
|
|
1896
|
-
if (
|
|
1920
|
+
if (Pr.test(n)) {
|
|
1897
1921
|
let e = c(n);
|
|
1898
1922
|
return e.isValid() ? e : void 0;
|
|
1899
1923
|
}
|
|
1900
1924
|
}
|
|
1901
1925
|
//#endregion
|
|
1902
1926
|
//#region src/components/form/csvTags.js
|
|
1903
|
-
var
|
|
1904
|
-
function
|
|
1927
|
+
var Ir = "csvTags", Lr = (e) => e.toLowerCase();
|
|
1928
|
+
function Rr(e) {
|
|
1905
1929
|
let t = Array.isArray(e) ? e : [e], n = [], r = /* @__PURE__ */ new Set();
|
|
1906
1930
|
return t.forEach((e) => {
|
|
1907
1931
|
e != null && typeof e != "object" && String(e).split(",").forEach((e) => {
|
|
1908
1932
|
let t = e.trim().replace(/\s+/g, " ");
|
|
1909
|
-
!t || r.has(
|
|
1933
|
+
!t || r.has(Lr(t)) || (r.add(Lr(t)), n.push(t));
|
|
1910
1934
|
});
|
|
1911
1935
|
}), n;
|
|
1912
1936
|
}
|
|
1913
|
-
function
|
|
1914
|
-
return
|
|
1937
|
+
function zr(e, t = ", ") {
|
|
1938
|
+
return Rr(e).join(t || ", ");
|
|
1915
1939
|
}
|
|
1916
1940
|
//#endregion
|
|
1917
1941
|
//#region src/components/form/payloadTransformer.js
|
|
1918
|
-
var
|
|
1919
|
-
function
|
|
1942
|
+
var R = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0, Br = (e) => e === !0 || e === 1 || e === "1", z = (e) => typeof e == "object" && !!e && !Array.isArray(e) && !B(e);
|
|
1943
|
+
function B(e) {
|
|
1920
1944
|
return e && typeof e == "object" && typeof e.format == "function" && typeof e.isValid == "function";
|
|
1921
1945
|
}
|
|
1922
|
-
function
|
|
1923
|
-
return
|
|
1946
|
+
function Vr(e) {
|
|
1947
|
+
return B(e) || e instanceof Date;
|
|
1924
1948
|
}
|
|
1925
|
-
function
|
|
1926
|
-
return e instanceof Date ? e.toISOString() :
|
|
1949
|
+
function Hr(e) {
|
|
1950
|
+
return e instanceof Date ? e.toISOString() : B(e) ? e.isValid() ? e.toISOString() : null : e;
|
|
1927
1951
|
}
|
|
1928
|
-
function
|
|
1929
|
-
if (!
|
|
1930
|
-
let n =
|
|
1931
|
-
return n ? n.toISOString() :
|
|
1952
|
+
function Ur(e, t) {
|
|
1953
|
+
if (!Tn(t)) return Hr(e);
|
|
1954
|
+
let n = En(e);
|
|
1955
|
+
return n ? n.toISOString() : Hr(e);
|
|
1932
1956
|
}
|
|
1933
|
-
function
|
|
1957
|
+
function V(e, t) {
|
|
1934
1958
|
if (!t) return;
|
|
1935
1959
|
let n = String(t).split("."), r = e;
|
|
1936
1960
|
for (let e of n) {
|
|
@@ -1939,51 +1963,51 @@ function H(e, t) {
|
|
|
1939
1963
|
}
|
|
1940
1964
|
return r;
|
|
1941
1965
|
}
|
|
1942
|
-
function
|
|
1943
|
-
return e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] :
|
|
1966
|
+
function H(e, t) {
|
|
1967
|
+
return e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] : V(e, t);
|
|
1944
1968
|
}
|
|
1945
|
-
function
|
|
1946
|
-
return e && Object.prototype.hasOwnProperty.call(e, t) ? !0 :
|
|
1969
|
+
function U(e, t) {
|
|
1970
|
+
return e && Object.prototype.hasOwnProperty.call(e, t) ? !0 : V(e, t) !== void 0;
|
|
1947
1971
|
}
|
|
1948
|
-
function
|
|
1972
|
+
function W(e, t, n) {
|
|
1949
1973
|
let r = String(t).split("."), i = e;
|
|
1950
1974
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
1951
1975
|
let t = r[e];
|
|
1952
|
-
|
|
1976
|
+
z(i[t]) || (i[t] = {}), i = i[t];
|
|
1953
1977
|
}
|
|
1954
1978
|
return i[r[r.length - 1]] = n, e;
|
|
1955
1979
|
}
|
|
1956
|
-
function
|
|
1980
|
+
function Wr(e, t, n) {
|
|
1957
1981
|
let r = String(t).split("."), i = e;
|
|
1958
1982
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
1959
1983
|
let t = r[e];
|
|
1960
|
-
|
|
1984
|
+
z(i[t]) || (i[t] = {}), i = i[t];
|
|
1961
1985
|
}
|
|
1962
1986
|
let a = r[r.length - 1];
|
|
1963
|
-
return i[a] =
|
|
1987
|
+
return i[a] = z(i[a]) && z(n) ? {
|
|
1964
1988
|
...n,
|
|
1965
1989
|
...i[a]
|
|
1966
1990
|
} : n, e;
|
|
1967
1991
|
}
|
|
1968
|
-
function
|
|
1992
|
+
function Gr(e) {
|
|
1969
1993
|
let t = Array.isArray(e) ? e : e == null ? [] : [e];
|
|
1970
1994
|
if (!t.length || t.some((e) => e?.originFileObj)) return;
|
|
1971
1995
|
let n = t.map((e) => e?.stored).filter((e) => e != null);
|
|
1972
1996
|
if (n.length) return n.length === 1 && t.length === 1 ? n[0] : n;
|
|
1973
1997
|
}
|
|
1974
|
-
function
|
|
1998
|
+
function Kr(e, t) {
|
|
1975
1999
|
return Object.entries(t ?? {}).forEach(([t, n]) => {
|
|
1976
|
-
|
|
2000
|
+
z(n) && z(e[t]) ? Kr(e[t], n) : e[t] = n;
|
|
1977
2001
|
}), e;
|
|
1978
2002
|
}
|
|
1979
|
-
function
|
|
2003
|
+
function qr(e, t) {
|
|
1980
2004
|
let n = e.options ?? e.values ?? [];
|
|
1981
2005
|
for (let e of n) if (typeof e == "string") {
|
|
1982
2006
|
if (e === t) return e;
|
|
1983
2007
|
} else if ((e.value ?? e.id ?? e.name ?? e.label) === t) return e.label ?? e.name ?? e.value;
|
|
1984
2008
|
}
|
|
1985
|
-
function
|
|
1986
|
-
if (
|
|
2009
|
+
function Jr(e, t) {
|
|
2010
|
+
if (z(e)) {
|
|
1987
2011
|
let n = (t.valueKey && e[t.valueKey]) ?? e.value ?? e.id ?? e._id ?? e.key ?? e.code;
|
|
1988
2012
|
return {
|
|
1989
2013
|
value: n,
|
|
@@ -1992,10 +2016,10 @@ function Gr(e, t) {
|
|
|
1992
2016
|
}
|
|
1993
2017
|
return {
|
|
1994
2018
|
value: e,
|
|
1995
|
-
label:
|
|
2019
|
+
label: qr(t, e) ?? e
|
|
1996
2020
|
};
|
|
1997
2021
|
}
|
|
1998
|
-
function
|
|
2022
|
+
function G(e = {}) {
|
|
1999
2023
|
if (e.dataType && e.dataType !== "auto") return e.dataType;
|
|
2000
2024
|
if (e.multiSelect || e.mode === "multiple" || e.addRow) return "array";
|
|
2001
2025
|
if (e.type === "csvTags") return "csv";
|
|
@@ -2006,37 +2030,37 @@ function K(e = {}) {
|
|
|
2006
2030
|
default: return "auto";
|
|
2007
2031
|
}
|
|
2008
2032
|
}
|
|
2009
|
-
function
|
|
2010
|
-
if (
|
|
2011
|
-
if (t === "string") return
|
|
2033
|
+
function K(e, t, n = {}) {
|
|
2034
|
+
if (Vr(e)) {
|
|
2035
|
+
if (t === "string") return Ur(e, n);
|
|
2012
2036
|
if (t === "number") {
|
|
2013
|
-
let t =
|
|
2037
|
+
let t = B(e) ? e.valueOf() : e.getTime();
|
|
2014
2038
|
return Number.isNaN(t) ? null : t;
|
|
2015
2039
|
}
|
|
2016
|
-
if (t === "date" || t === "auto" || !t) return
|
|
2040
|
+
if (t === "date" || t === "auto" || !t) return Ur(e, n);
|
|
2017
2041
|
}
|
|
2018
2042
|
switch (t) {
|
|
2019
2043
|
case "string": return e == null ? "" : String(e);
|
|
2020
|
-
case "csv": return
|
|
2044
|
+
case "csv": return zr(e, n.csvSeparator);
|
|
2021
2045
|
case "number": {
|
|
2022
|
-
if (
|
|
2046
|
+
if (R(e)) return null;
|
|
2023
2047
|
let t = Number(e);
|
|
2024
2048
|
return Number.isNaN(t) ? null : t;
|
|
2025
2049
|
}
|
|
2026
2050
|
case "boolean": return e === !0 || e === 1 || e === "1" || e === "true";
|
|
2027
2051
|
case "array": {
|
|
2028
2052
|
let t;
|
|
2029
|
-
return t = Array.isArray(e) ? e :
|
|
2053
|
+
return t = Array.isArray(e) ? e : R(e) ? [] : typeof e == "string" && e.includes(",") ? e.split(",").map((e) => e.trim()).filter(Boolean) : [e], n.elementType ? t.map((e) => K(e, n.elementType, {})).filter((e) => e != null && e !== "") : t;
|
|
2030
2054
|
}
|
|
2031
|
-
case "object": return
|
|
2032
|
-
case "date": return
|
|
2055
|
+
case "object": return z(e), e;
|
|
2056
|
+
case "date": return Ur(e, n);
|
|
2033
2057
|
case "custom":
|
|
2034
2058
|
case "auto":
|
|
2035
2059
|
case void 0:
|
|
2036
2060
|
default: return e;
|
|
2037
2061
|
}
|
|
2038
2062
|
}
|
|
2039
|
-
var
|
|
2063
|
+
var q = {
|
|
2040
2064
|
firstChecked: (e) => Array.isArray(e) ? e[0] : e,
|
|
2041
2065
|
csvToArray: (e) => typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : e,
|
|
2042
2066
|
arrayToCsv: (e) => Array.isArray(e) ? e.join(",") : e,
|
|
@@ -2044,11 +2068,11 @@ var J = {
|
|
|
2044
2068
|
upper: (e) => typeof e == "string" ? e.toUpperCase() : e,
|
|
2045
2069
|
lower: (e) => typeof e == "string" ? e.toLowerCase() : e
|
|
2046
2070
|
};
|
|
2047
|
-
function
|
|
2071
|
+
function Yr(e, t) {
|
|
2048
2072
|
if (!t) return e;
|
|
2049
2073
|
let n = t;
|
|
2050
2074
|
if (typeof n == "string") {
|
|
2051
|
-
if (
|
|
2075
|
+
if (q[n]) return q[n](e);
|
|
2052
2076
|
try {
|
|
2053
2077
|
n = JSON.parse(n);
|
|
2054
2078
|
} catch {
|
|
@@ -2056,39 +2080,39 @@ function Kr(e, t) {
|
|
|
2056
2080
|
}
|
|
2057
2081
|
}
|
|
2058
2082
|
let r = e;
|
|
2059
|
-
if (n.name &&
|
|
2083
|
+
if (n.name && q[n.name] && (r = q[n.name](r)), n.map && typeof n.map == "object") {
|
|
2060
2084
|
let e = String(Array.isArray(r) ? r[0] : r);
|
|
2061
2085
|
Object.prototype.hasOwnProperty.call(n.map, e) ? r = n.map[e] : n.default !== void 0 && (r = n.default);
|
|
2062
2086
|
}
|
|
2063
2087
|
return r;
|
|
2064
2088
|
}
|
|
2065
|
-
var
|
|
2066
|
-
function
|
|
2089
|
+
var Xr = /\{\{\s*([\w.]+)\s*\}\}/g;
|
|
2090
|
+
function Zr(e, t) {
|
|
2067
2091
|
let [n, ...r] = e.split("."), i;
|
|
2068
2092
|
if (n === "value") i = t.value;
|
|
2069
2093
|
else if (n === "label") i = t.label;
|
|
2070
2094
|
else if (n === "raw") i = t.raw;
|
|
2071
2095
|
else return;
|
|
2072
|
-
return r.length ?
|
|
2096
|
+
return r.length ? V(i, r.join(".")) : i;
|
|
2073
2097
|
}
|
|
2074
|
-
function
|
|
2098
|
+
function Qr(e, t) {
|
|
2075
2099
|
if (typeof e == "string") {
|
|
2076
2100
|
let n = e.match(/^\{\{\s*([\w.]+)\s*\}\}$/);
|
|
2077
|
-
return n ?
|
|
2078
|
-
let r =
|
|
2101
|
+
return n ? Zr(n[1], t) : e.replace(Xr, (e, n) => {
|
|
2102
|
+
let r = Zr(n, t);
|
|
2079
2103
|
return r == null ? "" : String(r);
|
|
2080
2104
|
});
|
|
2081
2105
|
}
|
|
2082
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
2083
|
-
if (
|
|
2106
|
+
if (Array.isArray(e)) return e.map((e) => Qr(e, t));
|
|
2107
|
+
if (z(e)) {
|
|
2084
2108
|
let n = {};
|
|
2085
2109
|
return Object.entries(e).forEach(([e, r]) => {
|
|
2086
|
-
n[e] =
|
|
2110
|
+
n[e] = Qr(r, t);
|
|
2087
2111
|
}), n;
|
|
2088
2112
|
}
|
|
2089
2113
|
return e;
|
|
2090
2114
|
}
|
|
2091
|
-
function
|
|
2115
|
+
function $r(e) {
|
|
2092
2116
|
if (!e) return null;
|
|
2093
2117
|
if (typeof e == "string") try {
|
|
2094
2118
|
return JSON.parse(e);
|
|
@@ -2097,36 +2121,36 @@ function Xr(e) {
|
|
|
2097
2121
|
}
|
|
2098
2122
|
return e;
|
|
2099
2123
|
}
|
|
2100
|
-
function
|
|
2101
|
-
let n = e.payloadMode || "auto", r =
|
|
2124
|
+
function ei(e, t) {
|
|
2125
|
+
let n = e.payloadMode || "auto", r = G(e), { value: i, label: a } = Jr(t, e);
|
|
2102
2126
|
switch (n) {
|
|
2103
2127
|
case "value": return {
|
|
2104
2128
|
kind: "scalar",
|
|
2105
|
-
out:
|
|
2129
|
+
out: K(i, r, e)
|
|
2106
2130
|
};
|
|
2107
2131
|
case "label": return {
|
|
2108
2132
|
kind: "scalar",
|
|
2109
|
-
out:
|
|
2133
|
+
out: K(a, e.dataType || "string", e)
|
|
2110
2134
|
};
|
|
2111
2135
|
case "object": {
|
|
2112
2136
|
let t = e.valueKey || "id", n = e.displayKey || "name";
|
|
2113
2137
|
return {
|
|
2114
2138
|
kind: "scalar",
|
|
2115
2139
|
out: {
|
|
2116
|
-
[t]:
|
|
2140
|
+
[t]: K(i, e.elementType || "auto", {}),
|
|
2117
2141
|
[n]: a
|
|
2118
2142
|
}
|
|
2119
2143
|
};
|
|
2120
2144
|
}
|
|
2121
2145
|
case "custom":
|
|
2122
2146
|
case "template": {
|
|
2123
|
-
let n =
|
|
2147
|
+
let n = $r(e.payloadTemplate);
|
|
2124
2148
|
if (!n) return {
|
|
2125
2149
|
kind: "scalar",
|
|
2126
|
-
out:
|
|
2150
|
+
out: K(i, r, e)
|
|
2127
2151
|
};
|
|
2128
|
-
let o =
|
|
2129
|
-
value:
|
|
2152
|
+
let o = Qr(n, {
|
|
2153
|
+
value: K(i, e.elementType || "auto", {}),
|
|
2130
2154
|
label: a,
|
|
2131
2155
|
raw: t
|
|
2132
2156
|
});
|
|
@@ -2137,27 +2161,27 @@ function Zr(e, t) {
|
|
|
2137
2161
|
}
|
|
2138
2162
|
default: return {
|
|
2139
2163
|
kind: "scalar",
|
|
2140
|
-
out:
|
|
2164
|
+
out: K(i, r, e)
|
|
2141
2165
|
};
|
|
2142
2166
|
}
|
|
2143
2167
|
}
|
|
2144
|
-
function
|
|
2168
|
+
function ti(e = {}) {
|
|
2145
2169
|
let t = e.defaultValue;
|
|
2146
|
-
if (t !== void 0 && t !== "") return e.type === "time" ?
|
|
2170
|
+
if (t !== void 0 && t !== "") return e.type === "time" ? Mr(t) : e.type === "date" ? Fr(t) : t;
|
|
2147
2171
|
}
|
|
2148
|
-
function
|
|
2172
|
+
function ni(e, t) {
|
|
2149
2173
|
if (e.payloadMode === "skip") return { kind: "skip" };
|
|
2150
2174
|
let n = t;
|
|
2151
|
-
if (
|
|
2152
|
-
let t =
|
|
2175
|
+
if (R(n)) {
|
|
2176
|
+
let t = ti(e);
|
|
2153
2177
|
t !== void 0 && (n = t);
|
|
2154
2178
|
}
|
|
2155
|
-
return n =
|
|
2179
|
+
return n = Yr(n, e.transformRule), R(n) && e.omitEmpty ? { kind: "skip" } : Array.isArray(n) && (G(e) === "array" || e.payloadMode === "object") && e.payloadMode && e.payloadMode !== "value" && e.payloadMode !== "auto" ? {
|
|
2156
2180
|
kind: "scalar",
|
|
2157
|
-
out: n.map((t) =>
|
|
2158
|
-
} :
|
|
2181
|
+
out: n.map((t) => ei(e, t).out)
|
|
2182
|
+
} : ei(e, n);
|
|
2159
2183
|
}
|
|
2160
|
-
function
|
|
2184
|
+
function ri(e = {}) {
|
|
2161
2185
|
return !!e.richValue || [
|
|
2162
2186
|
"label",
|
|
2163
2187
|
"object",
|
|
@@ -2165,10 +2189,10 @@ function ei(e = {}) {
|
|
|
2165
2189
|
"template"
|
|
2166
2190
|
].includes(e.payloadMode);
|
|
2167
2191
|
}
|
|
2168
|
-
function
|
|
2169
|
-
if (!
|
|
2192
|
+
function ii(e, t, n = []) {
|
|
2193
|
+
if (!ri(e) || t == null) return t;
|
|
2170
2194
|
let r = (e) => {
|
|
2171
|
-
if (
|
|
2195
|
+
if (z(e) && e.value !== void 0) return e;
|
|
2172
2196
|
let t = n.find((t) => String(t?.value ?? "") === String(e) || String(t?.label ?? "") === String(e));
|
|
2173
2197
|
return {
|
|
2174
2198
|
value: t?.value ?? e,
|
|
@@ -2177,9 +2201,9 @@ function ti(e, t, n = []) {
|
|
|
2177
2201
|
};
|
|
2178
2202
|
return Array.isArray(t) ? t.map(r) : r(t);
|
|
2179
2203
|
}
|
|
2180
|
-
function
|
|
2204
|
+
function ai(e, t, n) {
|
|
2181
2205
|
if (!e?.field) return !0;
|
|
2182
|
-
let r =
|
|
2206
|
+
let r = U(t, e.field) ? H(t, e.field) : H(n ?? t, e.field), i = () => String(e.value ?? "").split(",").map((e) => e.trim());
|
|
2183
2207
|
switch (e.operator) {
|
|
2184
2208
|
case "eq": return String(r ?? "") === String(e.value ?? "");
|
|
2185
2209
|
case "neq": return String(r ?? "") !== String(e.value ?? "");
|
|
@@ -2191,49 +2215,49 @@ function ni(e, t, n) {
|
|
|
2191
2215
|
default: return !0;
|
|
2192
2216
|
}
|
|
2193
2217
|
}
|
|
2194
|
-
function
|
|
2218
|
+
function oi(e) {
|
|
2195
2219
|
let t = [];
|
|
2196
2220
|
return e?.field && t.push(e.field), Array.isArray(e?.conditions) && e.conditions.forEach((e) => {
|
|
2197
2221
|
e?.field && t.push(e.field);
|
|
2198
2222
|
}), t;
|
|
2199
2223
|
}
|
|
2200
|
-
function
|
|
2224
|
+
function si(e, t, n) {
|
|
2201
2225
|
if (!e) return !0;
|
|
2202
2226
|
let r = Array.isArray(e.conditions) ? e.conditions.filter((e) => e?.field) : [];
|
|
2203
2227
|
if (r.length) {
|
|
2204
|
-
let i = r.map((e) =>
|
|
2228
|
+
let i = r.map((e) => ai(e, t, n)), a = String(e.logic ?? "and").toLowerCase() === "or", o = a ? i.some(Boolean) : i.every(Boolean);
|
|
2205
2229
|
if (e.field) {
|
|
2206
|
-
let r =
|
|
2230
|
+
let r = ai(e, t, n);
|
|
2207
2231
|
o = a ? o || r : o && r;
|
|
2208
2232
|
}
|
|
2209
2233
|
return o;
|
|
2210
2234
|
}
|
|
2211
|
-
return
|
|
2235
|
+
return ai(e, t, n);
|
|
2212
2236
|
}
|
|
2213
|
-
function
|
|
2214
|
-
let a =
|
|
2215
|
-
return !a.length || i.has(e.field) ? !0 : (i.add(e.field),
|
|
2237
|
+
function ci(e, t, n, r, i = /* @__PURE__ */ new Set()) {
|
|
2238
|
+
let a = oi(e?.showIf);
|
|
2239
|
+
return !a.length || i.has(e.field) ? !0 : (i.add(e.field), si(e.showIf, t, n) ? a.every((e) => {
|
|
2216
2240
|
let a = r?.get?.(e);
|
|
2217
|
-
return !a ||
|
|
2241
|
+
return !a || ci(a, t, n, r, i);
|
|
2218
2242
|
}) : !1);
|
|
2219
2243
|
}
|
|
2220
|
-
function
|
|
2244
|
+
function li(e = []) {
|
|
2221
2245
|
let t = /* @__PURE__ */ new Map();
|
|
2222
2246
|
return e.forEach((e) => (e.fields ?? []).forEach((e) => {
|
|
2223
2247
|
e?.field && !t.has(e.field) && t.set(e.field, e);
|
|
2224
2248
|
})), t;
|
|
2225
2249
|
}
|
|
2226
|
-
function
|
|
2250
|
+
function ui(e = {}, { editing: t = !1 } = {}) {
|
|
2227
2251
|
let n = {};
|
|
2228
2252
|
return (e.fields ?? []).forEach((e) => {
|
|
2229
|
-
if (!(!e.field ||
|
|
2253
|
+
if (!(!e.field || J(e)) && !(t && !e.defaultOnEdit) && e.defaultValue !== void 0 && e.defaultValue !== "") {
|
|
2230
2254
|
if (e.type === "time") {
|
|
2231
|
-
let t =
|
|
2255
|
+
let t = Mr(e.defaultValue);
|
|
2232
2256
|
t !== void 0 && (n[e.field] = t);
|
|
2233
2257
|
return;
|
|
2234
2258
|
}
|
|
2235
2259
|
if (e.type === "date") {
|
|
2236
|
-
let t =
|
|
2260
|
+
let t = Fr(e.defaultValue);
|
|
2237
2261
|
t !== void 0 && (n[e.field] = t);
|
|
2238
2262
|
return;
|
|
2239
2263
|
}
|
|
@@ -2241,7 +2265,7 @@ function si(e = {}, { editing: t = !1 } = {}) {
|
|
|
2241
2265
|
}
|
|
2242
2266
|
}), n;
|
|
2243
2267
|
}
|
|
2244
|
-
function
|
|
2268
|
+
function di(e = []) {
|
|
2245
2269
|
let t = [];
|
|
2246
2270
|
return e.forEach((e) => {
|
|
2247
2271
|
(e.fields ?? []).forEach((n) => {
|
|
@@ -2252,27 +2276,27 @@ function ci(e = []) {
|
|
|
2252
2276
|
});
|
|
2253
2277
|
}), t;
|
|
2254
2278
|
}
|
|
2255
|
-
var
|
|
2279
|
+
var fi = [
|
|
2256
2280
|
"file",
|
|
2257
2281
|
"document",
|
|
2258
2282
|
"image",
|
|
2259
2283
|
"upload",
|
|
2260
2284
|
"attachment"
|
|
2261
2285
|
];
|
|
2262
|
-
function
|
|
2263
|
-
return
|
|
2286
|
+
function J(e) {
|
|
2287
|
+
return fi.includes(String(e?.type ?? "").trim().toLowerCase());
|
|
2264
2288
|
}
|
|
2265
|
-
function
|
|
2266
|
-
return
|
|
2289
|
+
function pi(e = []) {
|
|
2290
|
+
return di(e).map(({ field: e }) => e).filter(J);
|
|
2267
2291
|
}
|
|
2268
|
-
function
|
|
2292
|
+
function mi(e) {
|
|
2269
2293
|
return String(e ?? "").trim().toLowerCase();
|
|
2270
2294
|
}
|
|
2271
|
-
function
|
|
2272
|
-
return !!t &&
|
|
2295
|
+
function hi(e, t) {
|
|
2296
|
+
return !!t && mi(e.moduleName) === t;
|
|
2273
2297
|
}
|
|
2274
|
-
function
|
|
2275
|
-
let r = [], i = n.scope ?? "all", a =
|
|
2298
|
+
function gi(e, t = [], n = {}) {
|
|
2299
|
+
let r = [], i = n.scope ?? "all", a = mi(n.module), o = (e, t) => {
|
|
2276
2300
|
t != null && (Array.isArray(t) ? t : [t]).forEach((t) => {
|
|
2277
2301
|
let n = t?.originFileObj || t;
|
|
2278
2302
|
(typeof File < "u" && n instanceof File || typeof Blob < "u" && n instanceof Blob) && r.push({
|
|
@@ -2282,9 +2306,9 @@ function pi(e, t = [], n = {}) {
|
|
|
2282
2306
|
});
|
|
2283
2307
|
};
|
|
2284
2308
|
return (t ?? []).forEach((t) => {
|
|
2285
|
-
let r = (t.fields ?? []).filter(
|
|
2309
|
+
let r = (t.fields ?? []).filter(J);
|
|
2286
2310
|
if (!r.length) return;
|
|
2287
|
-
let s = t.moduleName && !
|
|
2311
|
+
let s = t.moduleName && !hi(t, a), c = (e) => s ? `__mw__${t.moduleName}__${e}` : e;
|
|
2288
2312
|
if (t.addRow) {
|
|
2289
2313
|
if (i === "flat") return;
|
|
2290
2314
|
let a = e[t.name];
|
|
@@ -2293,94 +2317,94 @@ function pi(e, t = [], n = {}) {
|
|
|
2293
2317
|
let t = e.fileKey ?? String(e.field).split(".")[0];
|
|
2294
2318
|
a.forEach((r, i) => {
|
|
2295
2319
|
let a = c(n.indexed ? `${t}[${i}]` : t);
|
|
2296
|
-
o(a,
|
|
2320
|
+
o(a, H(r, e.field));
|
|
2297
2321
|
});
|
|
2298
2322
|
});
|
|
2299
2323
|
return;
|
|
2300
2324
|
}
|
|
2301
2325
|
i !== "addRow" && r.forEach((t) => {
|
|
2302
2326
|
let n = c(t.fileKey ?? String(t.field).split(".")[0]);
|
|
2303
|
-
o(n,
|
|
2327
|
+
o(n, H(e, t.field));
|
|
2304
2328
|
});
|
|
2305
2329
|
}), r;
|
|
2306
2330
|
}
|
|
2307
|
-
function
|
|
2308
|
-
let r =
|
|
2309
|
-
|
|
2310
|
-
(e.payloadKey || e.field) && (
|
|
2331
|
+
function _i(e, t, n = {}) {
|
|
2332
|
+
let r = z(n.base) ? structuredClone(n.base) : {};
|
|
2333
|
+
pi(t).forEach((e) => {
|
|
2334
|
+
(e.payloadKey || e.field) && (bi(r, e.payloadKey || e.field), bi(r, e.field));
|
|
2311
2335
|
});
|
|
2312
|
-
let i =
|
|
2336
|
+
let i = mi(n.module), a = li(t), o = /* @__PURE__ */ new Map(), s = (e) => !e.moduleName || hi(e, i) ? r : (o.has(e.moduleName) || o.set(e.moduleName, {}), o.get(e.moduleName));
|
|
2313
2337
|
return (t ?? []).forEach((t) => {
|
|
2314
|
-
let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField &&
|
|
2315
|
-
if (t.toggleEnabled && t.toggleField &&
|
|
2316
|
-
|
|
2338
|
+
let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField && U(e, t.toggleField) ? !!H(e, t.toggleField) : !1;
|
|
2339
|
+
if (t.toggleEnabled && t.toggleField && U(e, t.toggleField) && (W(n, t.toggleField, i), i && t.addRow)) {
|
|
2340
|
+
W(n, t.payloadKey || t.name, []);
|
|
2317
2341
|
return;
|
|
2318
2342
|
}
|
|
2319
2343
|
if (t.addRow) {
|
|
2320
2344
|
let i = e[t.name];
|
|
2321
2345
|
if (!Array.isArray(i)) return;
|
|
2322
|
-
|
|
2346
|
+
W(n, t.payloadKey || t.name, i.map((t) => yi(r, t, e, a)).filter((e) => e && Object.keys(e).length > 0));
|
|
2323
2347
|
return;
|
|
2324
2348
|
}
|
|
2325
|
-
r.forEach((t) =>
|
|
2349
|
+
r.forEach((t) => vi(t, e, n, e, a));
|
|
2326
2350
|
}), o.size > 0 && (r.moduleWrites = Array.from(o, ([e, t]) => ({
|
|
2327
2351
|
moduleName: e,
|
|
2328
2352
|
data: t
|
|
2329
|
-
}))),
|
|
2353
|
+
}))), gr(r, t);
|
|
2330
2354
|
}
|
|
2331
|
-
function
|
|
2332
|
-
if (
|
|
2333
|
-
let r =
|
|
2334
|
-
|
|
2355
|
+
function vi(e, t, n, r, i) {
|
|
2356
|
+
if (I(e) && br(e)) {
|
|
2357
|
+
let r = vr(e);
|
|
2358
|
+
U(t, r) && W(n, r, !!H(t, r));
|
|
2335
2359
|
}
|
|
2336
|
-
if (
|
|
2337
|
-
let i =
|
|
2360
|
+
if (J(e)) {
|
|
2361
|
+
let i = Gr(H(t, e.field));
|
|
2338
2362
|
if (i !== void 0) {
|
|
2339
2363
|
let a = r !== void 0 && r !== t;
|
|
2340
|
-
|
|
2364
|
+
Wr(n, e.payloadKey || (a ? e.field : e.fileKey || e.field), i);
|
|
2341
2365
|
}
|
|
2342
2366
|
return;
|
|
2343
2367
|
}
|
|
2344
|
-
if (
|
|
2345
|
-
(r === void 0 || r === t) &&
|
|
2368
|
+
if (oi(e.showIf).length && !ci(e, t, r, i)) {
|
|
2369
|
+
(r === void 0 || r === t) && U(t, e.field) && W(n, e.payloadKey || e.field, null);
|
|
2346
2370
|
return;
|
|
2347
2371
|
}
|
|
2348
2372
|
if (Array.isArray(e.subFields) && e.subFields.length > 0) {
|
|
2349
|
-
if (!
|
|
2350
|
-
let a =
|
|
2373
|
+
if (!U(t, e.field)) return;
|
|
2374
|
+
let a = H(t, e.field);
|
|
2351
2375
|
if (!Array.isArray(a)) return;
|
|
2352
|
-
let o = a.map((t) =>
|
|
2353
|
-
|
|
2376
|
+
let o = a.map((t) => yi(e.subFields, t, r, i)).filter((e) => e && Object.keys(e).length > 0);
|
|
2377
|
+
W(n, e.payloadKey || e.field, o);
|
|
2354
2378
|
return;
|
|
2355
2379
|
}
|
|
2356
|
-
if (!
|
|
2357
|
-
if (
|
|
2358
|
-
let r =
|
|
2359
|
-
|
|
2380
|
+
if (!U(t, e.field)) return;
|
|
2381
|
+
if (Br(e.addRow) && (!Array.isArray(e.subFields) || e.subFields.length === 0)) {
|
|
2382
|
+
let r = H(t, e.field), i = Array.isArray(r) ? r : R(r) ? [] : [r], a = X(e), o = i.map((e) => ni(a, e)).filter((e) => e.kind !== "skip").map((e) => e.out);
|
|
2383
|
+
W(n, e.payloadKey || e.field, o);
|
|
2360
2384
|
return;
|
|
2361
2385
|
}
|
|
2362
|
-
let a =
|
|
2386
|
+
let a = ni(e, H(t, e.field));
|
|
2363
2387
|
if (a.kind !== "skip") {
|
|
2364
|
-
if (a.kind === "spread" &&
|
|
2365
|
-
|
|
2388
|
+
if (a.kind === "spread" && z(a.out)) {
|
|
2389
|
+
Kr(n, a.out);
|
|
2366
2390
|
return;
|
|
2367
2391
|
}
|
|
2368
|
-
|
|
2392
|
+
W(n, e.payloadKey || e.field, a.out);
|
|
2369
2393
|
}
|
|
2370
2394
|
}
|
|
2371
|
-
function
|
|
2395
|
+
function yi(e, t, n, r) {
|
|
2372
2396
|
let i = {};
|
|
2373
|
-
return e.forEach((e) =>
|
|
2397
|
+
return e.forEach((e) => vi(e, t, i, n ?? t, r)), i;
|
|
2374
2398
|
}
|
|
2375
|
-
function
|
|
2399
|
+
function bi(e, t) {
|
|
2376
2400
|
let n = String(t).split("."), r = e;
|
|
2377
2401
|
for (let e = 0; e < n.length - 1; e += 1) {
|
|
2378
|
-
if (!
|
|
2402
|
+
if (!z(r[n[e]])) return;
|
|
2379
2403
|
r = r[n[e]];
|
|
2380
2404
|
}
|
|
2381
2405
|
delete r[n[n.length - 1]];
|
|
2382
2406
|
}
|
|
2383
|
-
var
|
|
2407
|
+
var xi = /* @__PURE__ */ new Set([
|
|
2384
2408
|
"text",
|
|
2385
2409
|
"textarea",
|
|
2386
2410
|
"email",
|
|
@@ -2392,23 +2416,23 @@ var vi = /* @__PURE__ */ new Set([
|
|
|
2392
2416
|
"datetime",
|
|
2393
2417
|
"password"
|
|
2394
2418
|
]);
|
|
2395
|
-
function
|
|
2396
|
-
let n = (t) => (Array.isArray(e.emptyValues) ? e.emptyValues : []).some((e) => String(e) === String(t)), r = () => e.defaultOnEdit ?
|
|
2419
|
+
function Y(e, t) {
|
|
2420
|
+
let n = (t) => (Array.isArray(e.emptyValues) ? e.emptyValues : []).some((e) => String(e) === String(t)), r = () => e.defaultOnEdit ? ti(e) : void 0;
|
|
2397
2421
|
if (t == null) return r() ?? t;
|
|
2398
|
-
if (n(t) ||
|
|
2399
|
-
if (
|
|
2422
|
+
if (n(t) || R(t) && r() !== void 0) return r();
|
|
2423
|
+
if (xi.has(e.type) && z(t)) {
|
|
2400
2424
|
let n = String(e.payloadKey || e.field || "").split(".").pop(), r = n ? t[n] : void 0;
|
|
2401
|
-
if (r === void 0 ||
|
|
2425
|
+
if (r === void 0 || z(r)) return;
|
|
2402
2426
|
t = r;
|
|
2403
2427
|
}
|
|
2404
|
-
if (e.type === "csvTags") return
|
|
2428
|
+
if (e.type === "csvTags") return Rr(t);
|
|
2405
2429
|
if (e.type === "date" || e.type === "time") {
|
|
2406
2430
|
if (!t || t === "0001-01-01T00:00:00Z") return null;
|
|
2407
2431
|
let e = c(t);
|
|
2408
2432
|
return e.isValid() ? e : null;
|
|
2409
2433
|
}
|
|
2410
|
-
t =
|
|
2411
|
-
let i = (t) =>
|
|
2434
|
+
t = Or(e, t);
|
|
2435
|
+
let i = (t) => z(t) ? (e.valueKey && t[e.valueKey]) ?? t.id ?? t._id ?? t.value ?? t.userId ?? t.recruiterId : t, a = e.type !== "radio" && G(e) === "array", o = (t) => {
|
|
2412
2436
|
if (t == null || t === "" || !Array.isArray(e.options)) return t;
|
|
2413
2437
|
let n = e.options.find((e) => String(e?.value ?? "").toLowerCase() === String(t).toLowerCase());
|
|
2414
2438
|
return n ? n.value : t;
|
|
@@ -2420,7 +2444,7 @@ function X(e, t) {
|
|
|
2420
2444
|
}
|
|
2421
2445
|
return t;
|
|
2422
2446
|
}
|
|
2423
|
-
function
|
|
2447
|
+
function X(e = {}) {
|
|
2424
2448
|
return {
|
|
2425
2449
|
...e,
|
|
2426
2450
|
addRow: !1,
|
|
@@ -2429,26 +2453,26 @@ function yi(e = {}) {
|
|
|
2429
2453
|
dataType: void 0
|
|
2430
2454
|
};
|
|
2431
2455
|
}
|
|
2432
|
-
function
|
|
2456
|
+
function Si(e, t) {
|
|
2433
2457
|
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;
|
|
2434
2458
|
if (Array.isArray(e.subFields) && e.subFields.length > 0) {
|
|
2435
2459
|
let i = [];
|
|
2436
2460
|
Array.isArray(t) && (i = t.map((t) => {
|
|
2437
2461
|
let n = {};
|
|
2438
2462
|
return e.subFields.forEach((e) => {
|
|
2439
|
-
if (!e.field ||
|
|
2440
|
-
let r =
|
|
2441
|
-
r != null && (n[e.field] =
|
|
2463
|
+
if (!e.field || J(e)) return;
|
|
2464
|
+
let r = V(t ?? {}, e.field) ?? (t ?? {})[e.field];
|
|
2465
|
+
r != null && (n[e.field] = Y(e, r));
|
|
2442
2466
|
}), n;
|
|
2443
2467
|
}));
|
|
2444
2468
|
let a = i.length > 0 ? n : Math.max(n, r);
|
|
2445
2469
|
for (; i.length < a;) i.push({});
|
|
2446
2470
|
return i;
|
|
2447
2471
|
}
|
|
2448
|
-
let i =
|
|
2449
|
-
if (Array.isArray(t)) a = t.map((e) =>
|
|
2472
|
+
let i = X(e), a = [];
|
|
2473
|
+
if (Array.isArray(t)) a = t.map((e) => Y(i, e)).filter((e) => e != null && e !== "");
|
|
2450
2474
|
else if (t != null && t !== "") {
|
|
2451
|
-
let e =
|
|
2475
|
+
let e = Y(i, t);
|
|
2452
2476
|
e != null && e !== "" && (a = [e]);
|
|
2453
2477
|
}
|
|
2454
2478
|
let o = a.length > 0 ? n : Math.max(n, r);
|
|
@@ -2457,8 +2481,8 @@ function bi(e, t) {
|
|
|
2457
2481
|
}
|
|
2458
2482
|
//#endregion
|
|
2459
2483
|
//#region src/components/detail/phoneDisplay.js
|
|
2460
|
-
var
|
|
2461
|
-
function
|
|
2484
|
+
var Ci = (e) => e == null || e === "";
|
|
2485
|
+
function wi(e, t) {
|
|
2462
2486
|
return String(t ?? "").split(".").filter(Boolean).reduce((e, t) => e?.[t], e);
|
|
2463
2487
|
}
|
|
2464
2488
|
function Z(e) {
|
|
@@ -2467,7 +2491,7 @@ function Z(e) {
|
|
|
2467
2491
|
let n = t.replace(/^\+/, "");
|
|
2468
2492
|
return /^\d{1,4}$/.test(n) ? `+${n}` : "";
|
|
2469
2493
|
}
|
|
2470
|
-
function
|
|
2494
|
+
function Ti(e) {
|
|
2471
2495
|
let t = String(e?.field ?? "").trim(), n = t.replace(/(number|no|phone|mobile|contact)$/i, "");
|
|
2472
2496
|
return [
|
|
2473
2497
|
...t ? [`${t}CountryCode`, `${t}Code`] : [],
|
|
@@ -2480,15 +2504,15 @@ function Ci(e) {
|
|
|
2480
2504
|
"isdCode"
|
|
2481
2505
|
];
|
|
2482
2506
|
}
|
|
2483
|
-
function
|
|
2484
|
-
let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...
|
|
2507
|
+
function Ei(e, t, n = "") {
|
|
2508
|
+
let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...Ti(e)] : Ti(e);
|
|
2485
2509
|
for (let e of i) {
|
|
2486
|
-
let n = Z(
|
|
2510
|
+
let n = Z(wi(t, e));
|
|
2487
2511
|
if (n) return n;
|
|
2488
2512
|
}
|
|
2489
2513
|
return Z(n);
|
|
2490
2514
|
}
|
|
2491
|
-
function
|
|
2515
|
+
function Di(e) {
|
|
2492
2516
|
let t = String(e ?? "").trim(), n = t.match(/^(\+\d{1,4})[\s-]*(.*)$/);
|
|
2493
2517
|
return n ? {
|
|
2494
2518
|
code: n[1],
|
|
@@ -2498,17 +2522,17 @@ function Ti(e) {
|
|
|
2498
2522
|
rest: t
|
|
2499
2523
|
};
|
|
2500
2524
|
}
|
|
2501
|
-
function
|
|
2502
|
-
if (
|
|
2503
|
-
let { code: n, rest: r } =
|
|
2525
|
+
function Oi(e, t = "") {
|
|
2526
|
+
if (Ci(e)) return "";
|
|
2527
|
+
let { code: n, rest: r } = Di(e), i = n || Z(t), a = dn(r) || r;
|
|
2504
2528
|
return `${i ? `${i} ` : ""}${a}`.trim();
|
|
2505
2529
|
}
|
|
2506
|
-
function
|
|
2507
|
-
return
|
|
2530
|
+
function ki(e, t, n) {
|
|
2531
|
+
return Oi(t, Ei(e, n, ln()));
|
|
2508
2532
|
}
|
|
2509
2533
|
//#endregion
|
|
2510
2534
|
//#region src/components/detail/renderConfig.js
|
|
2511
|
-
var
|
|
2535
|
+
var Ai = [
|
|
2512
2536
|
{
|
|
2513
2537
|
value: "auto",
|
|
2514
2538
|
label: "Default (auto)"
|
|
@@ -2565,7 +2589,7 @@ var Oi = [
|
|
|
2565
2589
|
value: "html",
|
|
2566
2590
|
label: "HTML"
|
|
2567
2591
|
}
|
|
2568
|
-
],
|
|
2592
|
+
], ji = [
|
|
2569
2593
|
{
|
|
2570
2594
|
value: "preview",
|
|
2571
2595
|
label: "Preview (viewer)"
|
|
@@ -2586,7 +2610,7 @@ var Oi = [
|
|
|
2586
2610
|
value: "text",
|
|
2587
2611
|
label: "Text (filename)"
|
|
2588
2612
|
}
|
|
2589
|
-
],
|
|
2613
|
+
], Mi = [
|
|
2590
2614
|
{
|
|
2591
2615
|
value: "none",
|
|
2592
2616
|
label: "None"
|
|
@@ -2603,76 +2627,76 @@ var Oi = [
|
|
|
2603
2627
|
value: "title",
|
|
2604
2628
|
label: "Title Case"
|
|
2605
2629
|
}
|
|
2606
|
-
],
|
|
2630
|
+
], Ni = [
|
|
2607
2631
|
"location",
|
|
2608
2632
|
"path",
|
|
2609
2633
|
"url",
|
|
2610
2634
|
"key"
|
|
2611
|
-
],
|
|
2635
|
+
], Pi = [
|
|
2612
2636
|
"location",
|
|
2613
2637
|
"filepath",
|
|
2614
2638
|
"path",
|
|
2615
2639
|
"url",
|
|
2616
2640
|
"key"
|
|
2617
|
-
],
|
|
2641
|
+
], Fi = [
|
|
2618
2642
|
"uploadedfilename",
|
|
2619
2643
|
"uploadname",
|
|
2620
2644
|
"originalname",
|
|
2621
2645
|
"displayname",
|
|
2622
2646
|
"documentname",
|
|
2623
2647
|
"filename"
|
|
2624
|
-
],
|
|
2625
|
-
function
|
|
2648
|
+
], Ii = ["name"], Li = (e) => String(e).toLowerCase(), Ri = (e) => e == null || e === "";
|
|
2649
|
+
function zi(e, t) {
|
|
2626
2650
|
for (let n of t) {
|
|
2627
2651
|
let t = e[n];
|
|
2628
2652
|
if (typeof t == "string" && t) return t;
|
|
2629
2653
|
}
|
|
2630
2654
|
return "";
|
|
2631
2655
|
}
|
|
2632
|
-
function
|
|
2633
|
-
for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r &&
|
|
2656
|
+
function Bi(e, t) {
|
|
2657
|
+
for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r && Li(t).endsWith(n)) return r;
|
|
2634
2658
|
return "";
|
|
2635
2659
|
}
|
|
2636
|
-
function
|
|
2660
|
+
function Vi(e) {
|
|
2637
2661
|
if (!e) return "";
|
|
2638
2662
|
let t = String(e).split("?")[0].split("#")[0];
|
|
2639
2663
|
return decodeURIComponent(t.split("/").pop() || "");
|
|
2640
2664
|
}
|
|
2641
|
-
function
|
|
2665
|
+
function Hi(e) {
|
|
2642
2666
|
if (!e) return "";
|
|
2643
2667
|
let t = String(e);
|
|
2644
2668
|
return /^https?:\/\//i.test(t) ? t : "";
|
|
2645
2669
|
}
|
|
2646
|
-
function
|
|
2670
|
+
function Ui(e) {
|
|
2647
2671
|
let t = String(e ?? "").trim();
|
|
2648
2672
|
return !t || /^https?:\/\//i.test(t) || t.startsWith("blob:") || t.startsWith("data:") ? !1 : t.includes("/");
|
|
2649
2673
|
}
|
|
2650
|
-
function
|
|
2651
|
-
return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" :
|
|
2674
|
+
function Wi(e) {
|
|
2675
|
+
return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : zi(e, Ni) || Bi(e, Pi);
|
|
2652
2676
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return e ? typeof e == "string" ?
|
|
2677
|
+
function Gi(e) {
|
|
2678
|
+
return e ? typeof e == "string" ? Vi(e) || e : typeof e == "object" && (zi(e, M().documentNameOrder ?? []) || Bi(e, Fi) || Vi(Wi(e)) || Bi(e, Ii)) || "Document" : "Document";
|
|
2655
2679
|
}
|
|
2656
|
-
function
|
|
2657
|
-
if (
|
|
2680
|
+
function Ki(e) {
|
|
2681
|
+
if (Ri(e)) return [];
|
|
2658
2682
|
let t = Array.isArray(e) ? e : [e], n = [];
|
|
2659
|
-
for (let e of t) if (!
|
|
2683
|
+
for (let e of t) if (!Ri(e)) {
|
|
2660
2684
|
if (typeof e == "string") {
|
|
2661
2685
|
let t = e.includes("/") ? e : "";
|
|
2662
2686
|
n.push({
|
|
2663
2687
|
location: t,
|
|
2664
|
-
name:
|
|
2665
|
-
url:
|
|
2666
|
-
needsAuthFetch:
|
|
2688
|
+
name: Vi(e) || e,
|
|
2689
|
+
url: Hi(t),
|
|
2690
|
+
needsAuthFetch: Ui(t)
|
|
2667
2691
|
});
|
|
2668
2692
|
} else if (typeof e == "object") {
|
|
2669
|
-
let t =
|
|
2693
|
+
let t = Wi(e), r = e.fileUrl || e.downloadUrl || e.signedUrl || "";
|
|
2670
2694
|
n.push({
|
|
2671
2695
|
location: t,
|
|
2672
|
-
name:
|
|
2673
|
-
url: r ||
|
|
2696
|
+
name: Gi(e),
|
|
2697
|
+
url: r || Hi(t),
|
|
2674
2698
|
documentId: e.id || e._id || e.documentId || "",
|
|
2675
|
-
needsAuthFetch: !r &&
|
|
2699
|
+
needsAuthFetch: !r && Ui(t)
|
|
2676
2700
|
});
|
|
2677
2701
|
}
|
|
2678
2702
|
}
|
|
@@ -2680,19 +2704,19 @@ function Ui(e) {
|
|
|
2680
2704
|
}
|
|
2681
2705
|
//#endregion
|
|
2682
2706
|
//#region src/components/form/repeatableRowShape.js
|
|
2683
|
-
function
|
|
2707
|
+
function qi(e) {
|
|
2684
2708
|
return e?.primaryField ? e.primaryField : (e?.fields ?? []).find((e) => e?.field)?.field ?? null;
|
|
2685
2709
|
}
|
|
2686
|
-
function
|
|
2710
|
+
function Ji(e, t) {
|
|
2687
2711
|
if (!Array.isArray(t) || t.length === 0) return t;
|
|
2688
|
-
let n =
|
|
2712
|
+
let n = qi(e);
|
|
2689
2713
|
if (!n) return t;
|
|
2690
2714
|
let r = !1, i = t.map((e) => typeof e == "object" && e && !Array.isArray(e) ? e : e == null || String(e).trim() === "" ? (r = !0, {}) : (r = !0, { [n]: e }));
|
|
2691
2715
|
return r ? i : t;
|
|
2692
2716
|
}
|
|
2693
2717
|
//#endregion
|
|
2694
2718
|
//#region src/components/AppButton.jsx
|
|
2695
|
-
function
|
|
2719
|
+
function Yi({ children: e, className: t = "", icon: n, to: r, variant: i = "default", ...a }) {
|
|
2696
2720
|
let c = /* @__PURE__ */ s(o, {
|
|
2697
2721
|
className: `app-button app-button--${i} ${t}`.trim(),
|
|
2698
2722
|
icon: n,
|
|
@@ -2707,13 +2731,13 @@ function Ki({ children: e, className: t = "", icon: n, to: r, variant: i = "defa
|
|
|
2707
2731
|
}
|
|
2708
2732
|
//#endregion
|
|
2709
2733
|
//#region src/components/detail/userNames.js
|
|
2710
|
-
function
|
|
2734
|
+
function Xi(e) {
|
|
2711
2735
|
return !e || typeof e != "object" ? "" : [e.first_name ?? e.firstName ?? e.FIRST_NAME, e.last_name ?? e.lastName ?? e.LAST_NAME].filter(Boolean).join(" ").trim() || e.name || e.user_name || e.userName || e.username || e.email || "";
|
|
2712
2736
|
}
|
|
2713
|
-
function
|
|
2737
|
+
function Zi(e) {
|
|
2714
2738
|
let t = {};
|
|
2715
2739
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
2716
|
-
let n =
|
|
2740
|
+
let n = Xi(e);
|
|
2717
2741
|
n && [
|
|
2718
2742
|
e.legacyUserId,
|
|
2719
2743
|
e.userId,
|
|
@@ -2727,38 +2751,38 @@ function Ji(e) {
|
|
|
2727
2751
|
});
|
|
2728
2752
|
}), t;
|
|
2729
2753
|
}
|
|
2730
|
-
var
|
|
2731
|
-
function
|
|
2754
|
+
var Qi = /* @__PURE__ */ new Map();
|
|
2755
|
+
function $i(e) {
|
|
2732
2756
|
let n = String(e ?? "").trim();
|
|
2733
2757
|
if (!n) return Promise.resolve("");
|
|
2734
|
-
if (
|
|
2735
|
-
let i = t(r, `/get-detailed-view?userId=${encodeURIComponent(n)}`).then((e) =>
|
|
2736
|
-
return
|
|
2758
|
+
if (Qi.has(n)) return Qi.get(n);
|
|
2759
|
+
let i = t(r, `/get-detailed-view?userId=${encodeURIComponent(n)}`).then((e) => Xi(e?.data ?? e ?? null)).catch(() => "");
|
|
2760
|
+
return Qi.set(n, i), i;
|
|
2737
2761
|
}
|
|
2738
2762
|
//#endregion
|
|
2739
2763
|
//#region src/utils/roleAllowsAction.js
|
|
2740
|
-
function
|
|
2741
|
-
return e == null ? !0 : typeof e == "object" ?
|
|
2764
|
+
function Q(e) {
|
|
2765
|
+
return e == null ? !0 : typeof e == "object" ? Q(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
|
|
2742
2766
|
}
|
|
2743
|
-
function
|
|
2767
|
+
function ea(e, t) {
|
|
2744
2768
|
let n = String(t ?? "").trim().toLowerCase();
|
|
2745
2769
|
if (!(!n || !e || typeof e != "object")) for (let [t, r] of Object.entries(e)) {
|
|
2746
2770
|
let e = String(t).trim().toLowerCase();
|
|
2747
2771
|
if (e === n || e === `${n}s` || `${e}s` === n) return r && typeof r == "object" ? r : void 0;
|
|
2748
2772
|
}
|
|
2749
2773
|
}
|
|
2750
|
-
function
|
|
2774
|
+
function ta(e, t) {
|
|
2751
2775
|
if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
2752
2776
|
let n = `${t}Access`;
|
|
2753
2777
|
if (Object.prototype.hasOwnProperty.call(e, n)) return e[n];
|
|
2754
2778
|
}
|
|
2755
|
-
function
|
|
2779
|
+
function na(e, t) {
|
|
2756
2780
|
if (!e) return !0;
|
|
2757
2781
|
try {
|
|
2758
2782
|
let n = JSON.parse(localStorage.getItem("menuPermission") || "{}"), [r, i] = String(e).split("."), a = i ?? r, o = i ? [r, t] : [t];
|
|
2759
2783
|
for (let e of o) {
|
|
2760
|
-
let t =
|
|
2761
|
-
if (t) return
|
|
2784
|
+
let t = ea(n, e);
|
|
2785
|
+
if (t) return Q(ta(t, a));
|
|
2762
2786
|
}
|
|
2763
2787
|
return !0;
|
|
2764
2788
|
} catch {
|
|
@@ -2767,7 +2791,7 @@ function ea(e, t) {
|
|
|
2767
2791
|
}
|
|
2768
2792
|
//#endregion
|
|
2769
2793
|
//#region src/components/form/conditionalFieldLabel.js
|
|
2770
|
-
function
|
|
2794
|
+
function ra(e) {
|
|
2771
2795
|
return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
|
|
2772
2796
|
}
|
|
2773
2797
|
function $(e, t) {
|
|
@@ -2778,36 +2802,36 @@ function $(e, t) {
|
|
|
2778
2802
|
case "truthy": return t != null && t !== "" && t !== !1;
|
|
2779
2803
|
case "falsy": return t == null || t === "" || t === !1;
|
|
2780
2804
|
case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
|
|
2781
|
-
case "in": return
|
|
2782
|
-
case "notIn": return !
|
|
2805
|
+
case "in": return ra(e.value).includes(String(t ?? ""));
|
|
2806
|
+
case "notIn": return !ra(e.value).includes(String(t ?? ""));
|
|
2783
2807
|
default: return !1;
|
|
2784
2808
|
}
|
|
2785
2809
|
}
|
|
2786
|
-
function
|
|
2810
|
+
function ia(e, t, n = !1) {
|
|
2787
2811
|
let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
|
|
2788
2812
|
return $(i, t) && i?.label ? i.label : r;
|
|
2789
2813
|
}
|
|
2790
|
-
function
|
|
2814
|
+
function aa(e) {
|
|
2791
2815
|
return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
|
|
2792
2816
|
}
|
|
2793
|
-
function
|
|
2794
|
-
let n =
|
|
2817
|
+
function oa(e, t) {
|
|
2818
|
+
let n = aa(e);
|
|
2795
2819
|
if (!n.length) return !0;
|
|
2796
2820
|
let r = n.map((e) => $(e, t(e.field)));
|
|
2797
2821
|
return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
|
|
2798
2822
|
}
|
|
2799
|
-
function
|
|
2823
|
+
function sa(e) {
|
|
2800
2824
|
let t = e?.colWhen;
|
|
2801
2825
|
return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
|
|
2802
2826
|
}
|
|
2803
|
-
function
|
|
2804
|
-
for (let t of
|
|
2827
|
+
function ca(e, t, n) {
|
|
2828
|
+
for (let t of sa(e)) if ($(t, n(t))) return Number(t.col);
|
|
2805
2829
|
return t;
|
|
2806
2830
|
}
|
|
2807
|
-
function
|
|
2831
|
+
function la(e, t) {
|
|
2808
2832
|
return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
|
|
2809
2833
|
}
|
|
2810
2834
|
//#endregion
|
|
2811
|
-
export {
|
|
2835
|
+
export { Qn as $, Bt as $n, Ke as $t, V as A, It as An, We as At, Tr as B, Te as Bn, Vt as Bt, Di as C, _e as Cn, un as Ct, gi as D, Xe as Dn, tn as Dt, Si as E, w as En, nn as Et, ri as F, vt as Fn, Jt as Ft, Cr as G, ae as Gn, ht as Gt, I as H, Be as Hn, Nt as Ht, Ir as I, yt as In, pt as It, pr as J, Qt as Jn, Ee as Jt, lr as K, he as Kn, oe as Kt, Rr as L, xe as Ln, Wt as Lt, ui as M, Qe as Mn, zt as Mt, X as N, ft as Nn, jt as Nt, ti as O, Ze as On, rn as Ot, ii as P, ie as Pn, Dt as Pt, Jn as Q, ye as Qn, Ae as Qt, kr as R, je as Rn, be as Rt, Z as S, bt as Sn, sn as St, _i as T, it as Tn, en as Tt, wr as U, se as Un, kt as Ut, Or as V, ke as Vn, Ve as Vt, xr as W, xt as Wn, Xt as Wt, Zn as X, Ne as Xn, ge as Xt, Yn as Y, ct as Yn, dt as Yt, Xn as Z, He as Zn, pe as Zt, Mi as _, At as _n, dn as _t, oa as a, Fe as an, Lt as ar, F as at, Ti as b, re as bn, hn as bt, Q as c, Rt as cn, ot as cr, xn as ct, Zi as d, lt as dn, jn as dt, Je as en, Mt as er, qn as et, Xi as f, ze as fn, bn as ft, Ai as g, _t as gn, fn as gt, ji as h, gt as hn, A as ht, ia as i, ce as in, tt as ir, Hn as it, J as j, Ut as jn, ve as jt, G as k, Zt as kn, Se as kt, na as l, we as ln, ut as lr, wn as lt, Ji as m, Ue as mn, Sn as mt, la as n, Tt as nn, Yt as nr, Bn as nt, ca as o, Le as on, Gt as or, Mn as ot, Yi as p, Re as pn, On as pt, mr as q, at as qn, Kt as qt, $ as r, Ct as rn, mt as rr, Vn as rt, aa as s, wt as sn, Ye as sr, yn as st, sa as t, st as tn, Ot as tr, zn as tt, $i as u, Oe as un, St as ur, P as ut, Hi as v, Et as vn, mn as vt, Y as w, me as wn, $t as wt, ki as x, le as xn, gn as xt, Ki as y, qt as yn, M as yt, L as z, Ie as zn, Me as zt };
|
|
2812
2836
|
|
|
2813
|
-
//# sourceMappingURL=FileField-
|
|
2837
|
+
//# sourceMappingURL=FileField-D7P4Ezvq.js.map
|