@isettingkit/business-rules 2.1.16 → 2.1.17
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/index.es.js +691 -670
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as i, jsxs as m, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import { MdOutlineDelete as sn, MdClear as dn, MdAdd as We, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as wn, MdInfo as Ot, MdCached as
|
|
3
|
-
import { inube as E, Stack as y, Divider as G, Icon as
|
|
2
|
+
import { MdOutlineDelete as sn, MdClear as dn, MdAdd as We, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as wn, MdInfo as Ot, MdCached as Mt, MdOutlineInfo as Pt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as _t, MdOutlineArrowCircleRight as Ut, MdOutlineChevronRight as jt, MdOutlineError as Ht } from "react-icons/md";
|
|
3
|
+
import { inube as E, Stack as y, Divider as G, Icon as j, Text as R, SkeletonLine as ee, useMediaQuery as re, Blanket as cn, Button as B, Grid as Xe, Toggle as un, Checkbox as An, Date as Oe, Box as qt, Tag as ke, Tabs as st, SkeletonIcon as Bt, Fieldset as je, OptionList as Gt, Checkpicker as Yt, Label as Wt, OptionItem as Xt } from "@inubekit/inubekit";
|
|
4
4
|
import C, { keyframes as $n, ThemeContext as In } from "styled-components";
|
|
5
|
-
import { ValueDataType as
|
|
5
|
+
import { ValueDataType as q, ValueHowToSetUp as ne, DecisionConditionRender as on, DecisionConditionRenderNew as Vn } from "@isettingkit/input";
|
|
6
6
|
import { DecisionViewConditionRenderer as Re, DecisionViewConditionRendererNew as Je } from "@isettingkit/view";
|
|
7
7
|
import { createPortal as pn } from "react-dom";
|
|
8
8
|
import { useFormik as Rn } from "formik";
|
|
9
|
-
import { string as de, mixed as Ve, object as te, number as ce, lazy as Ge, date as
|
|
10
|
-
import
|
|
9
|
+
import { string as de, mixed as Ve, object as te, number as ce, lazy as Ge, date as Me } from "yup";
|
|
10
|
+
import P, { useState as H, useRef as Fe, useEffect as $e, useContext as Fn, forwardRef as Qt, useMemo as dt, useCallback as Zt } from "react";
|
|
11
11
|
import { Link as ct, useLocation as Kt } from "react-router-dom";
|
|
12
12
|
import Jt from "axios";
|
|
13
13
|
import { franc as er } from "franc-min";
|
|
@@ -53,7 +53,7 @@ const Qe = (e) => {
|
|
|
53
53
|
t && /* @__PURE__ */ m(z, { children: [
|
|
54
54
|
/* @__PURE__ */ i(G, {}),
|
|
55
55
|
/* @__PURE__ */ i(y, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
|
|
56
|
-
|
|
56
|
+
j,
|
|
57
57
|
{
|
|
58
58
|
cursorHover: !0,
|
|
59
59
|
appearance: "danger",
|
|
@@ -70,18 +70,18 @@ const Qe = (e) => {
|
|
|
70
70
|
from: e.from ?? "",
|
|
71
71
|
to: e.to ?? ""
|
|
72
72
|
}), ir = (e) => e.value, lr = (e) => e.value, sr = (e) => e.value;
|
|
73
|
-
var
|
|
73
|
+
var A = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(A || {});
|
|
74
74
|
const dr = {
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
75
|
+
[A.LIST_OF_VALUES]: rr,
|
|
76
|
+
[A.LIST_OF_VALUES_MULTI]: or,
|
|
77
|
+
[A.RANGE]: ar,
|
|
78
|
+
[A.GREATER_THAN]: ir,
|
|
79
|
+
[A.LESS_THAN]: lr,
|
|
80
|
+
[A.EQUAL]: sr
|
|
81
81
|
}, He = (e) => {
|
|
82
82
|
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = dr[e == null ? void 0 : e.howToSetTheDecision] || tr;
|
|
83
83
|
return t && r(n) || n || void 0;
|
|
84
|
-
},
|
|
84
|
+
}, _n = C.div`
|
|
85
85
|
& > div {
|
|
86
86
|
border-radius: 8px;
|
|
87
87
|
border: 1px solid
|
|
@@ -141,7 +141,7 @@ const dr = {
|
|
|
141
141
|
height: "203px",
|
|
142
142
|
children: [
|
|
143
143
|
p.length > 0 && /* @__PURE__ */ i(
|
|
144
|
-
|
|
144
|
+
R,
|
|
145
145
|
{
|
|
146
146
|
type: "label",
|
|
147
147
|
size: "large",
|
|
@@ -151,7 +151,7 @@ const dr = {
|
|
|
151
151
|
children: l.factsThatConditionIt
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
p.length > 0 && p.map((u) => /* @__PURE__ */ i(
|
|
154
|
+
p.length > 0 && p.map((u) => /* @__PURE__ */ i(_n, { children: /* @__PURE__ */ i(y, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
155
155
|
Re,
|
|
156
156
|
{
|
|
157
157
|
element: { ...u, value: u.value },
|
|
@@ -189,7 +189,7 @@ const dr = {
|
|
|
189
189
|
gap: "12px",
|
|
190
190
|
justifyContent: "space-between",
|
|
191
191
|
height: "203px",
|
|
192
|
-
children: s.map((u, c) => /* @__PURE__ */ i(
|
|
192
|
+
children: s.map((u, c) => /* @__PURE__ */ i(_n, { children: /* @__PURE__ */ m(
|
|
193
193
|
y,
|
|
194
194
|
{
|
|
195
195
|
direction: "column",
|
|
@@ -212,7 +212,7 @@ const dr = {
|
|
|
212
212
|
labelName: r == null ? void 0 : r.terms,
|
|
213
213
|
value: String(n.effectiveFrom),
|
|
214
214
|
howToSetTheDecision: ne.RANGE,
|
|
215
|
-
decisionDataType:
|
|
215
|
+
decisionDataType: q.DATE
|
|
216
216
|
},
|
|
217
217
|
valueData: He({
|
|
218
218
|
labelName: r == null ? void 0 : r.terms,
|
|
@@ -221,20 +221,20 @@ const dr = {
|
|
|
221
221
|
to: String(n.validUntil)
|
|
222
222
|
},
|
|
223
223
|
howToSetTheDecision: ne.RANGE,
|
|
224
|
-
decisionDataType:
|
|
224
|
+
decisionDataType: q.DATE
|
|
225
225
|
})
|
|
226
226
|
} : o && !a ? {
|
|
227
227
|
element: {
|
|
228
228
|
labelName: r == null ? void 0 : r.terms,
|
|
229
229
|
value: String(n.effectiveFrom),
|
|
230
230
|
howToSetTheDecision: ne.EQUAL,
|
|
231
|
-
decisionDataType:
|
|
231
|
+
decisionDataType: q.DATE
|
|
232
232
|
},
|
|
233
233
|
valueData: He({
|
|
234
234
|
labelName: r == null ? void 0 : r.terms,
|
|
235
235
|
value: String(n.effectiveFrom),
|
|
236
236
|
howToSetTheDecision: ne.EQUAL,
|
|
237
|
-
decisionDataType:
|
|
237
|
+
decisionDataType: q.DATE
|
|
238
238
|
})
|
|
239
239
|
} : null, d = n ? {
|
|
240
240
|
labelName: n.labelName || "",
|
|
@@ -304,7 +304,7 @@ const dr = {
|
|
|
304
304
|
return pn(
|
|
305
305
|
/* @__PURE__ */ i(ur, { smallScreen: s, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(pr, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
306
306
|
/* @__PURE__ */ i(y, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(y, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
|
-
/* @__PURE__ */ i(
|
|
307
|
+
/* @__PURE__ */ i(R, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
308
308
|
/* @__PURE__ */ i(dn, { size: "24px", cursor: "pointer", onClick: r })
|
|
309
309
|
] }) }),
|
|
310
310
|
n
|
|
@@ -406,7 +406,7 @@ const pt = C.div`
|
|
|
406
406
|
}, br = (e) => {
|
|
407
407
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: a } = e;
|
|
408
408
|
return n ? /* @__PURE__ */ i(Ze, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
409
|
-
/* @__PURE__ */ i(
|
|
409
|
+
/* @__PURE__ */ i(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
410
410
|
/* @__PURE__ */ i(
|
|
411
411
|
Qe,
|
|
412
412
|
{
|
|
@@ -426,7 +426,7 @@ const pt = C.div`
|
|
|
426
426
|
shouldRenderEmptyMessage: o
|
|
427
427
|
} = e, a = n || "Agregar decisión";
|
|
428
428
|
return /* @__PURE__ */ i(Ze, { children: o ? null : /* @__PURE__ */ m(y, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
429
|
-
/* @__PURE__ */ i(
|
|
429
|
+
/* @__PURE__ */ i(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
430
430
|
/* @__PURE__ */ i(
|
|
431
431
|
pt,
|
|
432
432
|
{
|
|
@@ -440,8 +440,8 @@ const pt = C.div`
|
|
|
440
440
|
handleView: () => r ? r() : null,
|
|
441
441
|
controls: !1,
|
|
442
442
|
children: /* @__PURE__ */ m(y, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
443
|
-
/* @__PURE__ */ i(
|
|
444
|
-
/* @__PURE__ */ i(
|
|
443
|
+
/* @__PURE__ */ i(j, { appearance: "gray", icon: /* @__PURE__ */ i(We, {}), size: "35px" }),
|
|
444
|
+
/* @__PURE__ */ i(R, { appearance: "gray", type: "body", size: "large", children: a })
|
|
445
445
|
] })
|
|
446
446
|
}
|
|
447
447
|
)
|
|
@@ -488,7 +488,7 @@ const pt = C.div`
|
|
|
488
488
|
})
|
|
489
489
|
), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
490
490
|
return { renderedCards: l, shouldRenderAddCard: p };
|
|
491
|
-
},
|
|
491
|
+
}, ml = (e) => {
|
|
492
492
|
const {
|
|
493
493
|
controls: n = !0,
|
|
494
494
|
customTitleContentAddCard: t,
|
|
@@ -524,10 +524,10 @@ const pt = C.div`
|
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ i(
|
|
527
|
+
/* @__PURE__ */ i(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(z, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
529
|
/* @__PURE__ */ m(
|
|
530
|
-
|
|
530
|
+
R,
|
|
531
531
|
{
|
|
532
532
|
as: "span",
|
|
533
533
|
type: "label",
|
|
@@ -590,7 +590,7 @@ const pt = C.div`
|
|
|
590
590
|
onCloseModal: c,
|
|
591
591
|
title: l ? "Editar Decisión" : "Nueva decisión",
|
|
592
592
|
children: /* @__PURE__ */ i(
|
|
593
|
-
|
|
593
|
+
Ca,
|
|
594
594
|
{
|
|
595
595
|
decision: l || s,
|
|
596
596
|
onSubmitEvent: g,
|
|
@@ -648,7 +648,7 @@ const pt = C.div`
|
|
|
648
648
|
return pn(
|
|
649
649
|
/* @__PURE__ */ i(Tr, { $smallScreen: s, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(wr, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
650
650
|
/* @__PURE__ */ i(y, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(y, { alignItems: "center", justifyContent: "space-between", children: [
|
|
651
|
-
/* @__PURE__ */ i(
|
|
651
|
+
/* @__PURE__ */ i(R, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
652
652
|
/* @__PURE__ */ i(dn, { size: "24px", cursor: "pointer", onClick: r })
|
|
653
653
|
] }) }),
|
|
654
654
|
n
|
|
@@ -753,16 +753,16 @@ const Sr = C.div`
|
|
|
753
753
|
from: e.from ?? "",
|
|
754
754
|
to: e.to ?? ""
|
|
755
755
|
}), Rr = (e) => e.value, Fr = (e) => e.value, Lr = (e) => e.value, Or = {
|
|
756
|
-
[
|
|
757
|
-
[
|
|
758
|
-
[
|
|
759
|
-
[
|
|
760
|
-
[
|
|
761
|
-
[
|
|
756
|
+
[A.LIST_OF_VALUES]: Ar,
|
|
757
|
+
[A.LIST_OF_VALUES_MULTI]: $r,
|
|
758
|
+
[A.RANGE]: Ir,
|
|
759
|
+
[A.GREATER_THAN]: Rr,
|
|
760
|
+
[A.LESS_THAN]: Fr,
|
|
761
|
+
[A.EQUAL]: Lr
|
|
762
762
|
}, qe = (e) => {
|
|
763
763
|
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = Or[e == null ? void 0 : e.howToSetTheDecision] || kr;
|
|
764
764
|
return t && r(n) || n || void 0;
|
|
765
|
-
},
|
|
765
|
+
}, jn = C.div`
|
|
766
766
|
& > div {
|
|
767
767
|
border-radius: 8px;
|
|
768
768
|
border: 1px solid
|
|
@@ -789,7 +789,7 @@ const Sr = C.div`
|
|
|
789
789
|
background-color: #ebecf0;
|
|
790
790
|
border-radius: 8px;
|
|
791
791
|
}
|
|
792
|
-
`,
|
|
792
|
+
`, Mr = (e) => {
|
|
793
793
|
const {
|
|
794
794
|
conditionsAlignment: n,
|
|
795
795
|
decision: t,
|
|
@@ -822,7 +822,7 @@ const Sr = C.div`
|
|
|
822
822
|
height: "203px",
|
|
823
823
|
children: [
|
|
824
824
|
p.length > 0 && /* @__PURE__ */ i(
|
|
825
|
-
|
|
825
|
+
R,
|
|
826
826
|
{
|
|
827
827
|
type: "label",
|
|
828
828
|
size: "large",
|
|
@@ -832,7 +832,7 @@ const Sr = C.div`
|
|
|
832
832
|
children: l.factsThatConditionIt
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
|
-
p.length > 0 && p.map((u) => /* @__PURE__ */ i(
|
|
835
|
+
p.length > 0 && p.map((u) => /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ i(y, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
836
836
|
Re,
|
|
837
837
|
{
|
|
838
838
|
element: { ...u, value: u.value },
|
|
@@ -870,7 +870,7 @@ const Sr = C.div`
|
|
|
870
870
|
gap: "12px",
|
|
871
871
|
justifyContent: "space-between",
|
|
872
872
|
height: "203px",
|
|
873
|
-
children: s.map((u, c) => /* @__PURE__ */ i(
|
|
873
|
+
children: s.map((u, c) => /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ m(
|
|
874
874
|
y,
|
|
875
875
|
{
|
|
876
876
|
direction: "column",
|
|
@@ -886,16 +886,16 @@ const Sr = C.div`
|
|
|
886
886
|
}
|
|
887
887
|
) })
|
|
888
888
|
] });
|
|
889
|
-
},
|
|
889
|
+
}, Pr = (e) => Array.isArray(e) ? e[0] : e ?? null, zr = (e) => {
|
|
890
890
|
var n;
|
|
891
|
-
return ((n =
|
|
891
|
+
return ((n = Pr(e == null ? void 0 : e.conditionGroups)) == null ? void 0 : n.conditionsThatEstablishesTheDecision) ?? [];
|
|
892
892
|
}, Vr = (e) => {
|
|
893
893
|
const { decision: n, loading: t = !1, textValues: r } = e, o = !!(n != null && n.effectiveFrom), a = !!(n != null && n.validUntil), s = o && a ? {
|
|
894
894
|
element: {
|
|
895
895
|
labelName: r == null ? void 0 : r.terms,
|
|
896
896
|
value: String(n.effectiveFrom),
|
|
897
897
|
howToSetTheDecision: ne.RANGE,
|
|
898
|
-
decisionDataType:
|
|
898
|
+
decisionDataType: q.DATE
|
|
899
899
|
},
|
|
900
900
|
valueData: qe({
|
|
901
901
|
labelName: r == null ? void 0 : r.terms,
|
|
@@ -904,20 +904,20 @@ const Sr = C.div`
|
|
|
904
904
|
to: String(n.validUntil)
|
|
905
905
|
},
|
|
906
906
|
howToSetTheDecision: ne.RANGE,
|
|
907
|
-
decisionDataType:
|
|
907
|
+
decisionDataType: q.DATE
|
|
908
908
|
})
|
|
909
909
|
} : o && !a ? {
|
|
910
910
|
element: {
|
|
911
911
|
labelName: r == null ? void 0 : r.terms,
|
|
912
912
|
value: String(n.effectiveFrom),
|
|
913
913
|
howToSetTheDecision: ne.EQUAL,
|
|
914
|
-
decisionDataType:
|
|
914
|
+
decisionDataType: q.DATE
|
|
915
915
|
},
|
|
916
916
|
valueData: qe({
|
|
917
917
|
labelName: r == null ? void 0 : r.terms,
|
|
918
918
|
value: String(n.effectiveFrom),
|
|
919
919
|
howToSetTheDecision: ne.EQUAL,
|
|
920
|
-
decisionDataType:
|
|
920
|
+
decisionDataType: q.DATE
|
|
921
921
|
})
|
|
922
922
|
} : null, d = n ? {
|
|
923
923
|
labelName: n.labelName || "",
|
|
@@ -926,7 +926,7 @@ const Sr = C.div`
|
|
|
926
926
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
927
927
|
} : null, l = zr(n).filter((g) => !(g != null && g.hidden)), p = Array.from({ length: 5 }), u = !!(!t && n && r && d), c = l.length < 2 ? "start" : "space-between";
|
|
928
928
|
return /* @__PURE__ */ i(
|
|
929
|
-
|
|
929
|
+
Mr,
|
|
930
930
|
{
|
|
931
931
|
conditionsAlignment: c,
|
|
932
932
|
decision: n,
|
|
@@ -939,7 +939,7 @@ const Sr = C.div`
|
|
|
939
939
|
visibleConditions: l
|
|
940
940
|
}
|
|
941
941
|
);
|
|
942
|
-
},
|
|
942
|
+
}, _r = C.div`
|
|
943
943
|
border-radius: 8px;
|
|
944
944
|
border: 1px solid
|
|
945
945
|
${({ theme: e }) => {
|
|
@@ -976,12 +976,12 @@ C.div`
|
|
|
976
976
|
`;
|
|
977
977
|
const Ur = (e) => {
|
|
978
978
|
const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
|
|
979
|
-
return /* @__PURE__ */ i(
|
|
979
|
+
return /* @__PURE__ */ i(_r, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
980
980
|
n,
|
|
981
981
|
t && /* @__PURE__ */ m(z, { children: [
|
|
982
982
|
/* @__PURE__ */ i(G, {}),
|
|
983
983
|
/* @__PURE__ */ i(y, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
|
|
984
|
-
|
|
984
|
+
j,
|
|
985
985
|
{
|
|
986
986
|
cursorHover: !0,
|
|
987
987
|
appearance: "danger",
|
|
@@ -994,10 +994,10 @@ const Ur = (e) => {
|
|
|
994
994
|
) })
|
|
995
995
|
] })
|
|
996
996
|
] }) });
|
|
997
|
-
},
|
|
997
|
+
}, jr = (e) => {
|
|
998
998
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: a } = e;
|
|
999
999
|
return n ? /* @__PURE__ */ i(Ze, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
1000
|
-
/* @__PURE__ */ i(
|
|
1000
|
+
/* @__PURE__ */ i(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
1001
1001
|
/* @__PURE__ */ i(
|
|
1002
1002
|
Ur,
|
|
1003
1003
|
{
|
|
@@ -1023,7 +1023,7 @@ const Ur = (e) => {
|
|
|
1023
1023
|
shouldRenderEmptyMessage: o
|
|
1024
1024
|
} = e, a = n || "Agregar decisión";
|
|
1025
1025
|
return /* @__PURE__ */ i(Ze, { children: o ? null : /* @__PURE__ */ m(y, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
1026
|
-
/* @__PURE__ */ i(
|
|
1026
|
+
/* @__PURE__ */ i(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
1027
1027
|
/* @__PURE__ */ i(
|
|
1028
1028
|
pt,
|
|
1029
1029
|
{
|
|
@@ -1037,8 +1037,8 @@ const Ur = (e) => {
|
|
|
1037
1037
|
handleView: () => r ? r() : null,
|
|
1038
1038
|
controls: !1,
|
|
1039
1039
|
children: /* @__PURE__ */ m(y, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
1040
|
-
/* @__PURE__ */ i(
|
|
1041
|
-
/* @__PURE__ */ i(
|
|
1040
|
+
/* @__PURE__ */ i(j, { appearance: "gray", icon: /* @__PURE__ */ i(We, {}), size: "35px" }),
|
|
1041
|
+
/* @__PURE__ */ i(R, { appearance: "gray", type: "body", size: "large", children: a })
|
|
1042
1042
|
] })
|
|
1043
1043
|
}
|
|
1044
1044
|
)
|
|
@@ -1047,7 +1047,7 @@ const Ur = (e) => {
|
|
|
1047
1047
|
] }) }, `add-decision-${t}`);
|
|
1048
1048
|
}, qr = {
|
|
1049
1049
|
loading: Nr,
|
|
1050
|
-
decision:
|
|
1050
|
+
decision: jr,
|
|
1051
1051
|
add: Hr
|
|
1052
1052
|
}, Dn = (e) => {
|
|
1053
1053
|
const { type: n } = e, t = qr[n];
|
|
@@ -1093,19 +1093,19 @@ const Ur = (e) => {
|
|
|
1093
1093
|
}),
|
|
1094
1094
|
value: { from: n, to: t }
|
|
1095
1095
|
};
|
|
1096
|
-
}, bn = (e, n) => n ===
|
|
1096
|
+
}, bn = (e, n) => n === q.PERCENTAGE ? {
|
|
1097
1097
|
schema: ce().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
|
|
1098
1098
|
value: e
|
|
1099
1099
|
} : {
|
|
1100
1100
|
schema: de().required("Requerido"),
|
|
1101
1101
|
value: e
|
|
1102
1102
|
}, Xr = {
|
|
1103
|
-
[
|
|
1104
|
-
[
|
|
1105
|
-
[
|
|
1106
|
-
[
|
|
1107
|
-
[
|
|
1108
|
-
[
|
|
1103
|
+
[A.LIST_OF_VALUES]: Gr,
|
|
1104
|
+
[A.LIST_OF_VALUES_MULTI]: Yr,
|
|
1105
|
+
[A.RANGE]: Wr,
|
|
1106
|
+
[A.GREATER_THAN]: bn,
|
|
1107
|
+
[A.LESS_THAN]: bn,
|
|
1108
|
+
[A.EQUAL]: bn
|
|
1109
1109
|
}, Qr = (e) => Xr[e] || Br;
|
|
1110
1110
|
var On = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(On || {});
|
|
1111
1111
|
const tn = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Zr = (e, n) => {
|
|
@@ -1135,7 +1135,7 @@ function Kr({
|
|
|
1135
1135
|
var c, g;
|
|
1136
1136
|
const r = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((f, h) => (tn(h.value) && (f[h.conditionName] = h.value), f), {}), a = Object.keys(o).length > 0, s = {
|
|
1137
1137
|
ruleName: e.ruleName || "",
|
|
1138
|
-
decisionDataType: e.decisionDataType ||
|
|
1138
|
+
decisionDataType: e.decisionDataType || q.ALPHABETICAL,
|
|
1139
1139
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
1140
1140
|
value: e.value ?? "",
|
|
1141
1141
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -1160,7 +1160,7 @@ function Kr({
|
|
|
1160
1160
|
).schema),
|
|
1161
1161
|
conditionsThatEstablishesTheDecision: te().shape({})
|
|
1162
1162
|
};
|
|
1163
|
-
t.terms && (l.effectiveFrom =
|
|
1163
|
+
t.terms && (l.effectiveFrom = Me().required("La fecha de inicio es requerida"), l.validUntil = Me().when(
|
|
1164
1164
|
"checkClosed",
|
|
1165
1165
|
(f, h, { parent: x }) => (x == null ? void 0 : x.checkClosed) ? h.required("La fecha de finalización es requerida").test(
|
|
1166
1166
|
"is-after-startDate",
|
|
@@ -1245,7 +1245,7 @@ const Jr = C.div`
|
|
|
1245
1245
|
labelToggle: a,
|
|
1246
1246
|
name: s,
|
|
1247
1247
|
valueToggle: d = ""
|
|
1248
|
-
} = e, [l, p] =
|
|
1248
|
+
} = e, [l, p] = H(n);
|
|
1249
1249
|
return /* @__PURE__ */ m(z, { children: [
|
|
1250
1250
|
/* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(
|
|
1251
1251
|
un,
|
|
@@ -1258,7 +1258,7 @@ const Jr = C.div`
|
|
|
1258
1258
|
},
|
|
1259
1259
|
size: "small",
|
|
1260
1260
|
value: d,
|
|
1261
|
-
children: /* @__PURE__ */ i(
|
|
1261
|
+
children: /* @__PURE__ */ i(R, { size: "medium", type: "label", weight: "bold", as: "span", children: a })
|
|
1262
1262
|
}
|
|
1263
1263
|
) }),
|
|
1264
1264
|
l && /* @__PURE__ */ i(z, { children: t })
|
|
@@ -1278,17 +1278,17 @@ const Jr = C.div`
|
|
|
1278
1278
|
messageEnd: c = "",
|
|
1279
1279
|
statusStart: g = "pending",
|
|
1280
1280
|
statusEnd: f = "pending"
|
|
1281
|
-
} = e, [h, x] =
|
|
1282
|
-
x(
|
|
1283
|
-
}, w = (
|
|
1284
|
-
D(
|
|
1285
|
-
},
|
|
1286
|
-
S(
|
|
1287
|
-
},
|
|
1281
|
+
} = e, [h, x] = H(s), [b, D] = H(l), [T, S] = H(p), N = ({ target: $ }) => {
|
|
1282
|
+
x($.checked), r && r($.checked);
|
|
1283
|
+
}, w = ($) => {
|
|
1284
|
+
D($.target.value), n($);
|
|
1285
|
+
}, F = ($) => {
|
|
1286
|
+
S($.target.value), t($);
|
|
1287
|
+
}, O = re("(max-width: 400px)");
|
|
1288
1288
|
return /* @__PURE__ */ m(z, { children: [
|
|
1289
1289
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
1290
1290
|
/* @__PURE__ */ i(
|
|
1291
|
-
|
|
1291
|
+
R,
|
|
1292
1292
|
{
|
|
1293
1293
|
appearance: "gray",
|
|
1294
1294
|
margin: "10px 0",
|
|
@@ -1320,7 +1320,7 @@ const Jr = C.div`
|
|
|
1320
1320
|
/* @__PURE__ */ m(
|
|
1321
1321
|
y,
|
|
1322
1322
|
{
|
|
1323
|
-
direction:
|
|
1323
|
+
direction: O ? "column" : "row",
|
|
1324
1324
|
justifyContent: "space-between",
|
|
1325
1325
|
gap: "24px",
|
|
1326
1326
|
children: [
|
|
@@ -1342,7 +1342,7 @@ const Jr = C.div`
|
|
|
1342
1342
|
{
|
|
1343
1343
|
id: "dateEnd",
|
|
1344
1344
|
label: a,
|
|
1345
|
-
onChange:
|
|
1345
|
+
onChange: F,
|
|
1346
1346
|
value: T,
|
|
1347
1347
|
required: d,
|
|
1348
1348
|
size: "compact",
|
|
@@ -1389,7 +1389,7 @@ const Jr = C.div`
|
|
|
1389
1389
|
alignItems: "center",
|
|
1390
1390
|
gap: "64px",
|
|
1391
1391
|
children: [
|
|
1392
|
-
/* @__PURE__ */ i(
|
|
1392
|
+
/* @__PURE__ */ i(R, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
1393
1393
|
/* @__PURE__ */ i(
|
|
1394
1394
|
un,
|
|
1395
1395
|
{
|
|
@@ -1397,7 +1397,7 @@ const Jr = C.div`
|
|
|
1397
1397
|
onChange: () => s(!n.values.toggleNone),
|
|
1398
1398
|
checked: n.values.toggleNone,
|
|
1399
1399
|
size: "small",
|
|
1400
|
-
children: /* @__PURE__ */ i(
|
|
1400
|
+
children: /* @__PURE__ */ i(R, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
1401
1401
|
}
|
|
1402
1402
|
)
|
|
1403
1403
|
]
|
|
@@ -1447,7 +1447,7 @@ const Jr = C.div`
|
|
|
1447
1447
|
)
|
|
1448
1448
|
] }),
|
|
1449
1449
|
/* @__PURE__ */ i(G, {}),
|
|
1450
|
-
l && /* @__PURE__ */ i(
|
|
1450
|
+
l && /* @__PURE__ */ i(R, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
1451
1451
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
1452
1452
|
/* @__PURE__ */ i(B, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
1453
1453
|
/* @__PURE__ */ i(B, { type: "submit", children: t.confirm })
|
|
@@ -1534,7 +1534,7 @@ const Jr = C.div`
|
|
|
1534
1534
|
})
|
|
1535
1535
|
), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
1536
1536
|
return { renderedCards: l, shouldRenderAddCard: p };
|
|
1537
|
-
},
|
|
1537
|
+
}, bl = (e) => {
|
|
1538
1538
|
const {
|
|
1539
1539
|
controls: n = !0,
|
|
1540
1540
|
customTitleContentAddCard: t,
|
|
@@ -1570,10 +1570,10 @@ const Jr = C.div`
|
|
|
1570
1570
|
justifyContent: "center",
|
|
1571
1571
|
alignItems: "center",
|
|
1572
1572
|
children: [
|
|
1573
|
-
/* @__PURE__ */ i(
|
|
1573
|
+
/* @__PURE__ */ i(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(z, { children: [
|
|
1574
1574
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1575
1575
|
/* @__PURE__ */ m(
|
|
1576
|
-
|
|
1576
|
+
R,
|
|
1577
1577
|
{
|
|
1578
1578
|
as: "span",
|
|
1579
1579
|
type: "label",
|
|
@@ -1655,12 +1655,12 @@ const Jr = C.div`
|
|
|
1655
1655
|
from: e.from ?? "",
|
|
1656
1656
|
to: e.to ?? ""
|
|
1657
1657
|
}), uo = (e) => e.value, po = (e) => e.value, go = (e) => e.value, ho = {
|
|
1658
|
-
[
|
|
1659
|
-
[
|
|
1660
|
-
[
|
|
1661
|
-
[
|
|
1662
|
-
[
|
|
1663
|
-
[
|
|
1658
|
+
[A.LIST_OF_VALUES]: lo,
|
|
1659
|
+
[A.LIST_OF_VALUES_MULTI]: so,
|
|
1660
|
+
[A.RANGE]: co,
|
|
1661
|
+
[A.GREATER_THAN]: uo,
|
|
1662
|
+
[A.LESS_THAN]: po,
|
|
1663
|
+
[A.EQUAL]: go
|
|
1664
1664
|
}, Be = (e) => {
|
|
1665
1665
|
const n = e == null ? void 0 : e.value;
|
|
1666
1666
|
if (typeof n == "string" && n.includes(" a ")) {
|
|
@@ -1702,7 +1702,7 @@ const Jr = C.div`
|
|
|
1702
1702
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
1703
1703
|
box-sizing: ${({ $boxSizing: e }) => e};
|
|
1704
1704
|
overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
|
|
1705
|
-
`, ie =
|
|
1705
|
+
`, ie = P.forwardRef(
|
|
1706
1706
|
(e, n) => {
|
|
1707
1707
|
const {
|
|
1708
1708
|
children: t,
|
|
@@ -1843,7 +1843,7 @@ const yo = (e) => {
|
|
|
1843
1843
|
/* @__PURE__ */ m(y, { gap: "12px", children: [
|
|
1844
1844
|
n && /* @__PURE__ */ m(z, { children: [
|
|
1845
1845
|
/* @__PURE__ */ i(
|
|
1846
|
-
|
|
1846
|
+
j,
|
|
1847
1847
|
{
|
|
1848
1848
|
appearance: "primary",
|
|
1849
1849
|
icon: /* @__PURE__ */ i(Ft, {}),
|
|
@@ -1855,7 +1855,7 @@ const yo = (e) => {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
),
|
|
1857
1857
|
/* @__PURE__ */ i(
|
|
1858
|
-
|
|
1858
|
+
j,
|
|
1859
1859
|
{
|
|
1860
1860
|
appearance: "danger",
|
|
1861
1861
|
icon: /* @__PURE__ */ i(sn, {}),
|
|
@@ -1868,7 +1868,7 @@ const yo = (e) => {
|
|
|
1868
1868
|
)
|
|
1869
1869
|
] }),
|
|
1870
1870
|
/* @__PURE__ */ i(
|
|
1871
|
-
|
|
1871
|
+
j,
|
|
1872
1872
|
{
|
|
1873
1873
|
appearance: "dark",
|
|
1874
1874
|
icon: l ? /* @__PURE__ */ i(Lt, {}) : /* @__PURE__ */ i(wn, {}),
|
|
@@ -1884,7 +1884,7 @@ const yo = (e) => {
|
|
|
1884
1884
|
l && /* @__PURE__ */ m(z, { children: [
|
|
1885
1885
|
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
1886
1886
|
N ? /* @__PURE__ */ i(st, { tabs: b, selectedTab: D, onChange: T }) : /* @__PURE__ */ i(
|
|
1887
|
-
|
|
1887
|
+
R,
|
|
1888
1888
|
{
|
|
1889
1889
|
type: "label",
|
|
1890
1890
|
size: "large",
|
|
@@ -1976,7 +1976,7 @@ const yo = (e) => {
|
|
|
1976
1976
|
n.has(o) || (n.add(o), t.push(r));
|
|
1977
1977
|
}
|
|
1978
1978
|
return t;
|
|
1979
|
-
},
|
|
1979
|
+
}, Pe = (e) => {
|
|
1980
1980
|
if (!e) return {};
|
|
1981
1981
|
if (Array.isArray(e.conditionGroups)) {
|
|
1982
1982
|
const n = e.conditionGroups.map((t) => [
|
|
@@ -2009,8 +2009,23 @@ const yo = (e) => {
|
|
|
2009
2009
|
default:
|
|
2010
2010
|
return `${e}`;
|
|
2011
2011
|
}
|
|
2012
|
+
}, To = (e, n) => {
|
|
2013
|
+
if (e == null) return "";
|
|
2014
|
+
const t = Array.isArray(e) ? e.join(", ") : typeof e == "object" && e !== null ? JSON.stringify(e) : String(e ?? "");
|
|
2015
|
+
switch (n) {
|
|
2016
|
+
case A.LESS_THAN:
|
|
2017
|
+
return `Menor a ${t}`;
|
|
2018
|
+
case A.GREATER_THAN:
|
|
2019
|
+
return `Mayor a ${t}`;
|
|
2020
|
+
case A.LIST_OF_VALUES:
|
|
2021
|
+
return e;
|
|
2022
|
+
case A.LIST_OF_VALUES_MULTI:
|
|
2023
|
+
return e;
|
|
2024
|
+
default:
|
|
2025
|
+
return String(t);
|
|
2026
|
+
}
|
|
2012
2027
|
}, Bn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ft = (e) => {
|
|
2013
|
-
var me, le,
|
|
2028
|
+
var me, le, _;
|
|
2014
2029
|
const {
|
|
2015
2030
|
cardTitle: n = !0,
|
|
2016
2031
|
decision: t,
|
|
@@ -2027,76 +2042,82 @@ const yo = (e) => {
|
|
|
2027
2042
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2028
2043
|
value: String(t.effectiveFrom),
|
|
2029
2044
|
howToSetTheDecision: ne.EQUAL,
|
|
2030
|
-
decisionDataType:
|
|
2045
|
+
decisionDataType: q.DATE
|
|
2031
2046
|
},
|
|
2032
2047
|
valueData: Be({
|
|
2033
2048
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2034
2049
|
value: String(t.effectiveFrom),
|
|
2035
2050
|
howToSetTheDecision: ne.EQUAL,
|
|
2036
|
-
decisionDataType:
|
|
2051
|
+
decisionDataType: q.DATE
|
|
2037
2052
|
})
|
|
2038
2053
|
} : null, h = g ? {
|
|
2039
2054
|
element: {
|
|
2040
2055
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2041
2056
|
value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
|
|
2042
2057
|
howToSetTheDecision: ne.EQUAL,
|
|
2043
|
-
decisionDataType:
|
|
2058
|
+
decisionDataType: q.DATE
|
|
2044
2059
|
},
|
|
2045
2060
|
valueData: Be({
|
|
2046
2061
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2047
2062
|
value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
|
|
2048
2063
|
howToSetTheDecision: ne.EQUAL,
|
|
2049
|
-
decisionDataType:
|
|
2064
|
+
decisionDataType: q.DATE
|
|
2050
2065
|
})
|
|
2051
2066
|
} : null, x = t ? {
|
|
2052
2067
|
labelName: n && t.labelName || "",
|
|
2053
|
-
decisionDataType: t.decisionDataType ||
|
|
2068
|
+
decisionDataType: t.decisionDataType || q.ALPHABETICAL,
|
|
2054
2069
|
value: Be(t),
|
|
2055
2070
|
howToSetTheDecision: t.howToSetTheDecision || ne.EQUAL
|
|
2056
|
-
} : null, b =
|
|
2057
|
-
() => t ?
|
|
2071
|
+
} : null, b = P.useMemo(
|
|
2072
|
+
() => t ? Pe(t) : {},
|
|
2058
2073
|
[t]
|
|
2059
|
-
), D = ((le = (me = t == null ? void 0 : t.conditionGroups) == null ? void 0 : me.map((k) => k == null ? void 0 : k.ConditionGroupId)) == null ? void 0 : le.filter(Boolean)) || Object.keys(b), T = D[0] || "group-primary", S =
|
|
2060
|
-
const k = {},
|
|
2061
|
-
k["group-primary"] = T === "group-primary" ? pe : [...
|
|
2062
|
-
for (const
|
|
2063
|
-
!
|
|
2064
|
-
for (const
|
|
2065
|
-
|
|
2074
|
+
), D = ((le = (me = t == null ? void 0 : t.conditionGroups) == null ? void 0 : me.map((k) => k == null ? void 0 : k.ConditionGroupId)) == null ? void 0 : le.filter(Boolean)) || Object.keys(b), T = D[0] || "group-primary", S = P.useMemo(() => {
|
|
2075
|
+
const k = {}, M = b[T] || [], pe = b["group-primary"] || [];
|
|
2076
|
+
k["group-primary"] = T === "group-primary" ? pe : [...M, ...pe];
|
|
2077
|
+
for (const L of D)
|
|
2078
|
+
!L || L === T || L !== "group-primary" && b[L] && (k[L] = b[L]);
|
|
2079
|
+
for (const L of Object.keys(b))
|
|
2080
|
+
L === "group-primary" || L === T || L in k || (k[L] = b[L]);
|
|
2066
2081
|
return k;
|
|
2067
|
-
}, [b, T, D]), N =
|
|
2082
|
+
}, [b, T, D]), N = P.useMemo(() => {
|
|
2068
2083
|
const k = [
|
|
2069
2084
|
"group-primary",
|
|
2070
|
-
...Object.keys(S).filter((
|
|
2085
|
+
...Object.keys(S).filter((M) => M !== "group-primary")
|
|
2071
2086
|
];
|
|
2072
2087
|
return Array.from(new Set(k));
|
|
2073
|
-
}, [S]), w =
|
|
2088
|
+
}, [S]), w = P.useMemo(() => {
|
|
2074
2089
|
const k = {};
|
|
2075
|
-
return Object.keys(S).forEach((
|
|
2076
|
-
const pe = S[
|
|
2077
|
-
pe && Array.isArray(pe) ? k[
|
|
2078
|
-
|
|
2079
|
-
labelName
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2090
|
+
return Object.keys(S).forEach((M) => {
|
|
2091
|
+
const pe = S[M];
|
|
2092
|
+
pe && Array.isArray(pe) ? k[M] = pe.map((L) => {
|
|
2093
|
+
let I = L.labelName;
|
|
2094
|
+
L.TimeUnit && L.labelName && (I = xo(L.labelName, L.TimeUnit));
|
|
2095
|
+
let U = L.value;
|
|
2096
|
+
return (L == null ? void 0 : L.howToSetTheCondition) !== void 0 && (L == null ? void 0 : L.howToSetTheCondition) !== null && (L == null ? void 0 : L.value) !== void 0 && (L == null ? void 0 : L.value) !== null && (U = To(
|
|
2097
|
+
L.value,
|
|
2098
|
+
L.howToSetTheCondition
|
|
2099
|
+
)), {
|
|
2100
|
+
...L,
|
|
2101
|
+
labelName: I,
|
|
2102
|
+
value: U
|
|
2103
|
+
};
|
|
2104
|
+
}) : k[M] = pe;
|
|
2084
2105
|
}), k;
|
|
2085
|
-
}, [S]),
|
|
2106
|
+
}, [S]), F = ht(
|
|
2086
2107
|
w,
|
|
2087
2108
|
(k) => !k.hidden
|
|
2088
|
-
),
|
|
2089
|
-
let
|
|
2109
|
+
), O = {};
|
|
2110
|
+
let $ = 1;
|
|
2090
2111
|
const V = N.map((k) => {
|
|
2091
|
-
const
|
|
2092
|
-
return
|
|
2093
|
-
id:
|
|
2094
|
-
label: k === "group-primary" ? Bn(k, 0) : Bn(k, Number(
|
|
2112
|
+
const M = k === "group-primary" ? "mainCondition" : `alternateCondition-${$++}`;
|
|
2113
|
+
return O[M] = k, {
|
|
2114
|
+
id: M,
|
|
2115
|
+
label: k === "group-primary" ? Bn(k, 0) : Bn(k, Number(M.split("-").at(-1))),
|
|
2095
2116
|
isDisabled: !1
|
|
2096
2117
|
};
|
|
2097
|
-
}), [Z, be] =
|
|
2098
|
-
((
|
|
2099
|
-
), ve = (k) => be(k), fe =
|
|
2118
|
+
}), [Z, be] = P.useState(
|
|
2119
|
+
((_ = V[0]) == null ? void 0 : _.id) ?? "mainCondition"
|
|
2120
|
+
), ve = (k) => be(k), fe = O[Z] ?? "group-primary", ae = F[fe] ?? [], ye = N.length > 1, Ne = Array.from({ length: 5 }), ue = !!(!r && t && o && x), xe = ae.length < 2 ? "start" : "space-between", Te = `N° ${String((a ?? 0) + 1).padStart(2, "0")}`;
|
|
2100
2121
|
return /* @__PURE__ */ i(
|
|
2101
2122
|
yo,
|
|
2102
2123
|
{
|
|
@@ -2123,7 +2144,7 @@ const yo = (e) => {
|
|
|
2123
2144
|
hasMultipleGroups: ye
|
|
2124
2145
|
}
|
|
2125
2146
|
);
|
|
2126
|
-
},
|
|
2147
|
+
}, wo = $n`
|
|
2127
2148
|
from {
|
|
2128
2149
|
opacity: 0;
|
|
2129
2150
|
transform: translateY(20px);
|
|
@@ -2157,7 +2178,7 @@ C.div`
|
|
|
2157
2178
|
}};
|
|
2158
2179
|
}
|
|
2159
2180
|
`;
|
|
2160
|
-
const
|
|
2181
|
+
const Co = C.div`
|
|
2161
2182
|
& > div {
|
|
2162
2183
|
box-shadow: 0px 2px 3px 0px
|
|
2163
2184
|
${({ theme: e }) => {
|
|
@@ -2166,18 +2187,18 @@ const wo = C.div`
|
|
|
2166
2187
|
}};
|
|
2167
2188
|
cursor: pointer;
|
|
2168
2189
|
}
|
|
2169
|
-
`,
|
|
2190
|
+
`, Do = C.div`
|
|
2170
2191
|
width: 100%;
|
|
2171
2192
|
height: 100%;
|
|
2172
2193
|
& > div {
|
|
2173
|
-
animation: ${
|
|
2194
|
+
animation: ${wo} 600ms ease-out;
|
|
2174
2195
|
}
|
|
2175
|
-
`,
|
|
2196
|
+
`, So = C.div`
|
|
2176
2197
|
& > div > div {
|
|
2177
2198
|
border-radius: 8px;
|
|
2178
2199
|
box-sizing: border-box;
|
|
2179
2200
|
}
|
|
2180
|
-
`,
|
|
2201
|
+
`, Eo = C.div`
|
|
2181
2202
|
& > div {
|
|
2182
2203
|
width: 100%;
|
|
2183
2204
|
height: 100%;
|
|
@@ -2197,7 +2218,7 @@ const wo = C.div`
|
|
|
2197
2218
|
border-radius: 8px;
|
|
2198
2219
|
}
|
|
2199
2220
|
}
|
|
2200
|
-
`,
|
|
2221
|
+
`, No = (e) => {
|
|
2201
2222
|
const { index: n, handleOpenModal: t } = e;
|
|
2202
2223
|
return /* @__PURE__ */ i(
|
|
2203
2224
|
gt,
|
|
@@ -2211,7 +2232,7 @@ const wo = C.div`
|
|
|
2211
2232
|
},
|
|
2212
2233
|
`loading-card-${n}`
|
|
2213
2234
|
);
|
|
2214
|
-
},
|
|
2235
|
+
}, ko = (e) => {
|
|
2215
2236
|
const {
|
|
2216
2237
|
cardTitle: n,
|
|
2217
2238
|
decision: t,
|
|
@@ -2245,15 +2266,15 @@ const wo = C.div`
|
|
|
2245
2266
|
)
|
|
2246
2267
|
}
|
|
2247
2268
|
) }) }, t.decisionId) : null;
|
|
2248
|
-
},
|
|
2269
|
+
}, Ao = (e) => {
|
|
2249
2270
|
const {
|
|
2250
2271
|
customTitleContentAddCard: n,
|
|
2251
2272
|
index: t,
|
|
2252
2273
|
handleOpenModal: r,
|
|
2253
2274
|
shouldRenderEmptyMessage: o
|
|
2254
2275
|
} = e;
|
|
2255
|
-
return /* @__PURE__ */ i(
|
|
2256
|
-
|
|
2276
|
+
return /* @__PURE__ */ i(Do, { children: o ? null : /* @__PURE__ */ i(
|
|
2277
|
+
Co,
|
|
2257
2278
|
{
|
|
2258
2279
|
onClick: () => r ? r() : null,
|
|
2259
2280
|
children: /* @__PURE__ */ i(
|
|
@@ -2272,9 +2293,9 @@ const wo = C.div`
|
|
|
2272
2293
|
alignItems: "center",
|
|
2273
2294
|
padding: "16px",
|
|
2274
2295
|
children: [
|
|
2275
|
-
/* @__PURE__ */ i(
|
|
2296
|
+
/* @__PURE__ */ i(R, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
|
|
2276
2297
|
/* @__PURE__ */ i(
|
|
2277
|
-
|
|
2298
|
+
j,
|
|
2278
2299
|
{
|
|
2279
2300
|
appearance: "gray",
|
|
2280
2301
|
icon: /* @__PURE__ */ i(We, {}),
|
|
@@ -2289,14 +2310,14 @@ const wo = C.div`
|
|
|
2289
2310
|
)
|
|
2290
2311
|
}
|
|
2291
2312
|
) }, `add-decision-${t}`);
|
|
2292
|
-
},
|
|
2293
|
-
loading:
|
|
2294
|
-
decision:
|
|
2295
|
-
add:
|
|
2313
|
+
}, $o = {
|
|
2314
|
+
loading: No,
|
|
2315
|
+
decision: ko,
|
|
2316
|
+
add: Ao
|
|
2296
2317
|
}, Sn = (e) => {
|
|
2297
|
-
const { type: n } = e, t =
|
|
2318
|
+
const { type: n } = e, t = $o[n];
|
|
2298
2319
|
return t ? t(e) : null;
|
|
2299
|
-
},
|
|
2320
|
+
}, Io = (e) => {
|
|
2300
2321
|
const {
|
|
2301
2322
|
cardTitle: n,
|
|
2302
2323
|
controls: t,
|
|
@@ -2336,13 +2357,13 @@ const wo = C.div`
|
|
|
2336
2357
|
})
|
|
2337
2358
|
), g = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !a && t;
|
|
2338
2359
|
return { renderedCards: c, shouldRenderAddCard: g };
|
|
2339
|
-
},
|
|
2360
|
+
}, Ro = C.div`
|
|
2340
2361
|
position: relative;
|
|
2341
2362
|
& > div {
|
|
2342
2363
|
padding: 24px 16px;
|
|
2343
2364
|
place-items: unset;
|
|
2344
2365
|
}
|
|
2345
|
-
`,
|
|
2366
|
+
`, Fo = C.div`
|
|
2346
2367
|
background-color: ${({ theme: e }) => {
|
|
2347
2368
|
var n, t;
|
|
2348
2369
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
|
|
@@ -2374,7 +2395,7 @@ const wo = C.div`
|
|
|
2374
2395
|
background-color: #ebecf0;
|
|
2375
2396
|
border-radius: 8px;
|
|
2376
2397
|
}
|
|
2377
|
-
`,
|
|
2398
|
+
`, Lo = (e) => {
|
|
2378
2399
|
const { children: n, description: t, portalId: r, onCloseModal: o, title: a } = e, s = document.getElementById(r);
|
|
2379
2400
|
if (!s)
|
|
2380
2401
|
throw new Error(
|
|
@@ -2382,12 +2403,12 @@ const wo = C.div`
|
|
|
2382
2403
|
);
|
|
2383
2404
|
const d = re("(max-width: 400px)");
|
|
2384
2405
|
return pn(
|
|
2385
|
-
/* @__PURE__ */ i(
|
|
2406
|
+
/* @__PURE__ */ i(Ro, { smallScreen: d, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(Fo, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
2386
2407
|
/* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
2387
2408
|
/* @__PURE__ */ m(y, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2388
2409
|
/* @__PURE__ */ m(y, { direction: "column", gap: "8px", children: [
|
|
2389
2410
|
/* @__PURE__ */ i(
|
|
2390
|
-
|
|
2411
|
+
R,
|
|
2391
2412
|
{
|
|
2392
2413
|
type: "title",
|
|
2393
2414
|
size: "medium",
|
|
@@ -2396,7 +2417,7 @@ const wo = C.div`
|
|
|
2396
2417
|
children: a
|
|
2397
2418
|
}
|
|
2398
2419
|
),
|
|
2399
|
-
/* @__PURE__ */ i(
|
|
2420
|
+
/* @__PURE__ */ i(R, { size: "medium", appearance: "gray", children: t })
|
|
2400
2421
|
] }),
|
|
2401
2422
|
/* @__PURE__ */ i(dn, { size: "24px", cursor: "pointer", onClick: o })
|
|
2402
2423
|
] }),
|
|
@@ -2406,14 +2427,14 @@ const wo = C.div`
|
|
|
2406
2427
|
] }) }) }) }),
|
|
2407
2428
|
s
|
|
2408
2429
|
);
|
|
2409
|
-
},
|
|
2430
|
+
}, Oo = (e) => ({
|
|
2410
2431
|
schema: de().required("Requerido").test(
|
|
2411
2432
|
"non-empty",
|
|
2412
2433
|
"El valor no puede estar vacío",
|
|
2413
2434
|
(n) => n != null && n.trim() !== ""
|
|
2414
2435
|
),
|
|
2415
2436
|
value: e
|
|
2416
|
-
}),
|
|
2437
|
+
}), Mo = (e) => ({
|
|
2417
2438
|
schema: Ve().test(
|
|
2418
2439
|
"isArrayOrString",
|
|
2419
2440
|
"Por favor selecciona una opcion",
|
|
@@ -2431,7 +2452,7 @@ const wo = C.div`
|
|
|
2431
2452
|
) : typeof n == "string"
|
|
2432
2453
|
),
|
|
2433
2454
|
value: e
|
|
2434
|
-
}),
|
|
2455
|
+
}), zo = (e) => {
|
|
2435
2456
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
2436
2457
|
return {
|
|
2437
2458
|
schema: te({
|
|
@@ -2450,7 +2471,7 @@ const wo = C.div`
|
|
|
2450
2471
|
}, vn = (e, n) => {
|
|
2451
2472
|
if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
|
|
2452
2473
|
const t = e;
|
|
2453
|
-
return n ===
|
|
2474
|
+
return n === q.PERCENTAGE ? {
|
|
2454
2475
|
schema: te({
|
|
2455
2476
|
from: ce().required("El campo desde es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
|
|
2456
2477
|
to: ce().required("El campo hasta es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100")
|
|
@@ -2464,29 +2485,29 @@ const wo = C.div`
|
|
|
2464
2485
|
value: t
|
|
2465
2486
|
};
|
|
2466
2487
|
}
|
|
2467
|
-
return n ===
|
|
2488
|
+
return n === q.PERCENTAGE ? {
|
|
2468
2489
|
schema: ce().required("El campo porcentaje es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
|
|
2469
2490
|
value: e
|
|
2470
2491
|
} : {
|
|
2471
2492
|
schema: de().required("Requerido"),
|
|
2472
2493
|
value: e
|
|
2473
2494
|
};
|
|
2474
|
-
},
|
|
2475
|
-
[
|
|
2476
|
-
[
|
|
2477
|
-
[
|
|
2478
|
-
[
|
|
2479
|
-
[
|
|
2480
|
-
[
|
|
2481
|
-
}, Gn = (e) =>
|
|
2482
|
-
function
|
|
2495
|
+
}, Vo = {
|
|
2496
|
+
[A.LIST_OF_VALUES]: Mo,
|
|
2497
|
+
[A.LIST_OF_VALUES_MULTI]: Po,
|
|
2498
|
+
[A.RANGE]: zo,
|
|
2499
|
+
[A.GREATER_THAN]: vn,
|
|
2500
|
+
[A.LESS_THAN]: vn,
|
|
2501
|
+
[A.EQUAL]: vn
|
|
2502
|
+
}, Gn = (e) => Vo[e] || Oo;
|
|
2503
|
+
function _o({
|
|
2483
2504
|
decision: e,
|
|
2484
2505
|
onSubmitEvent: n,
|
|
2485
2506
|
textValues: t
|
|
2486
2507
|
}) {
|
|
2487
|
-
const r =
|
|
2508
|
+
const r = Pe(e) || {}, o = () => Object.values(r).flat(), a = {
|
|
2488
2509
|
ruleName: e.ruleName || "",
|
|
2489
|
-
decisionDataType: e.decisionDataType ||
|
|
2510
|
+
decisionDataType: e.decisionDataType || q.ALPHABETICAL,
|
|
2490
2511
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
2491
2512
|
value: e.value || "",
|
|
2492
2513
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -2532,9 +2553,9 @@ function Vo({
|
|
|
2532
2553
|
);
|
|
2533
2554
|
})
|
|
2534
2555
|
};
|
|
2535
|
-
t.terms && (d.effectiveFrom =
|
|
2556
|
+
t.terms && (d.effectiveFrom = Me().required(
|
|
2536
2557
|
"Se requiere la fecha de vigencia desde"
|
|
2537
|
-
), d.validUntil =
|
|
2558
|
+
), d.validUntil = Me().when(
|
|
2538
2559
|
"checkClosed",
|
|
2539
2560
|
(u, c, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? c.required("Se requiere la fecha de vigencia hasta").test(
|
|
2540
2561
|
"is-after-startDate",
|
|
@@ -2623,7 +2644,7 @@ C.div`
|
|
|
2623
2644
|
border-radius: 8px;
|
|
2624
2645
|
}
|
|
2625
2646
|
`;
|
|
2626
|
-
const
|
|
2647
|
+
const Uo = C.div`
|
|
2627
2648
|
display: flex;
|
|
2628
2649
|
width: -webkit-fill-available;
|
|
2629
2650
|
& > div {
|
|
@@ -2632,7 +2653,7 @@ const jo = C.div`
|
|
|
2632
2653
|
gap: 16px;
|
|
2633
2654
|
width: -webkit-fill-available;
|
|
2634
2655
|
}
|
|
2635
|
-
`,
|
|
2656
|
+
`, jo = (e) => {
|
|
2636
2657
|
const {
|
|
2637
2658
|
onHandleStartChange: n,
|
|
2638
2659
|
onHandleEndChange: t,
|
|
@@ -2647,16 +2668,16 @@ const jo = C.div`
|
|
|
2647
2668
|
messageEnd: c = "",
|
|
2648
2669
|
statusStart: g = "pending",
|
|
2649
2670
|
statusEnd: f = "pending"
|
|
2650
|
-
} = e, [h, x] =
|
|
2651
|
-
x(
|
|
2652
|
-
}, w = (
|
|
2653
|
-
D(
|
|
2654
|
-
},
|
|
2655
|
-
S(
|
|
2656
|
-
},
|
|
2671
|
+
} = e, [h, x] = H(s), [b, D] = H(l), [T, S] = H(p), N = ({ target: $ }) => {
|
|
2672
|
+
x($.checked), r && r($.checked);
|
|
2673
|
+
}, w = ($) => {
|
|
2674
|
+
D($.target.value), n($);
|
|
2675
|
+
}, F = ($) => {
|
|
2676
|
+
S($.target.value), t($);
|
|
2677
|
+
}, O = re("(max-width: 400px)");
|
|
2657
2678
|
return /* @__PURE__ */ m(y, { direction: "column", width: "100%", gap: "20px", children: [
|
|
2658
2679
|
/* @__PURE__ */ m(y, { justifyContent: "space-between", children: [
|
|
2659
|
-
/* @__PURE__ */ i(
|
|
2680
|
+
/* @__PURE__ */ i(R, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
2660
2681
|
/* @__PURE__ */ i(
|
|
2661
2682
|
An,
|
|
2662
2683
|
{
|
|
@@ -2670,7 +2691,7 @@ const jo = C.div`
|
|
|
2670
2691
|
/* @__PURE__ */ m(
|
|
2671
2692
|
y,
|
|
2672
2693
|
{
|
|
2673
|
-
direction:
|
|
2694
|
+
direction: O ? "column" : "row",
|
|
2674
2695
|
justifyContent: "space-between",
|
|
2675
2696
|
gap: "24px",
|
|
2676
2697
|
children: [
|
|
@@ -2693,7 +2714,7 @@ const jo = C.div`
|
|
|
2693
2714
|
{
|
|
2694
2715
|
id: "dateEnd",
|
|
2695
2716
|
label: a,
|
|
2696
|
-
onChange:
|
|
2717
|
+
onChange: F,
|
|
2697
2718
|
value: T,
|
|
2698
2719
|
required: d,
|
|
2699
2720
|
size: "compact",
|
|
@@ -2706,7 +2727,7 @@ const jo = C.div`
|
|
|
2706
2727
|
}
|
|
2707
2728
|
)
|
|
2708
2729
|
] });
|
|
2709
|
-
},
|
|
2730
|
+
}, Ho = (e) => {
|
|
2710
2731
|
const {
|
|
2711
2732
|
activeTab: n,
|
|
2712
2733
|
conditionsErrorText: t,
|
|
@@ -2729,12 +2750,12 @@ const jo = C.div`
|
|
|
2729
2750
|
} = e;
|
|
2730
2751
|
return /* @__PURE__ */ m(z, { children: [
|
|
2731
2752
|
/* @__PURE__ */ i("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2732
|
-
/* @__PURE__ */ i(
|
|
2753
|
+
/* @__PURE__ */ i(je, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ i(y, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
|
|
2733
2754
|
condition: a,
|
|
2734
2755
|
formik: o,
|
|
2735
2756
|
isDecision: !0
|
|
2736
2757
|
}) }) }),
|
|
2737
|
-
/* @__PURE__ */ i(
|
|
2758
|
+
/* @__PURE__ */ i(je, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(y, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2738
2759
|
/* @__PURE__ */ i(
|
|
2739
2760
|
st,
|
|
2740
2761
|
{
|
|
@@ -2745,7 +2766,7 @@ const jo = C.div`
|
|
|
2745
2766
|
),
|
|
2746
2767
|
/* @__PURE__ */ m(y, { justifyContent: "flex-end", alignItems: "center", children: [
|
|
2747
2768
|
/* @__PURE__ */ i(
|
|
2748
|
-
|
|
2769
|
+
j,
|
|
2749
2770
|
{
|
|
2750
2771
|
icon: /* @__PURE__ */ i(Ot, {}),
|
|
2751
2772
|
appearance: "help",
|
|
@@ -2757,7 +2778,7 @@ const jo = C.div`
|
|
|
2757
2778
|
B,
|
|
2758
2779
|
{
|
|
2759
2780
|
type: "button",
|
|
2760
|
-
iconBefore: /* @__PURE__ */ i(
|
|
2781
|
+
iconBefore: /* @__PURE__ */ i(Mt, {}),
|
|
2761
2782
|
variant: "none",
|
|
2762
2783
|
appearance: "gray",
|
|
2763
2784
|
onClick: b,
|
|
@@ -2772,7 +2793,7 @@ const jo = C.div`
|
|
|
2772
2793
|
gap: "16px",
|
|
2773
2794
|
alignItems: "center",
|
|
2774
2795
|
children: [
|
|
2775
|
-
/* @__PURE__ */ i(
|
|
2796
|
+
/* @__PURE__ */ i(Uo, { children: /* @__PURE__ */ i(
|
|
2776
2797
|
Vn,
|
|
2777
2798
|
{
|
|
2778
2799
|
condition: S,
|
|
@@ -2780,7 +2801,7 @@ const jo = C.div`
|
|
|
2780
2801
|
}
|
|
2781
2802
|
) }),
|
|
2782
2803
|
/* @__PURE__ */ i(
|
|
2783
|
-
|
|
2804
|
+
j,
|
|
2784
2805
|
{
|
|
2785
2806
|
icon: /* @__PURE__ */ i(sn, {}),
|
|
2786
2807
|
appearance: "danger",
|
|
@@ -2792,10 +2813,10 @@ const jo = C.div`
|
|
|
2792
2813
|
},
|
|
2793
2814
|
S.conditionName
|
|
2794
2815
|
)) }),
|
|
2795
|
-
p && /* @__PURE__ */ i(
|
|
2816
|
+
p && /* @__PURE__ */ i(R, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2796
2817
|
] }) }),
|
|
2797
|
-
/* @__PURE__ */ i(
|
|
2798
|
-
|
|
2818
|
+
/* @__PURE__ */ i(je, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
|
|
2819
|
+
jo,
|
|
2799
2820
|
{
|
|
2800
2821
|
labelStart: f.termStart,
|
|
2801
2822
|
labelEnd: f.termEnd,
|
|
@@ -2825,7 +2846,7 @@ const jo = C.div`
|
|
|
2825
2846
|
title: "Redefinir la condición",
|
|
2826
2847
|
onCloseModal: D,
|
|
2827
2848
|
children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
2828
|
-
/* @__PURE__ */ i(
|
|
2849
|
+
/* @__PURE__ */ i(R, { type: "body", size: "large", appearance: "gray", children: "¿Estás seguro? Se perderá todo lo que tienes actualmente definido y deberás reescribir completamente la condición, de esta manera podrás usar las últimas variables condicionales que están definidas en la actualidad para esta decisión ." }),
|
|
2829
2850
|
/* @__PURE__ */ m(y, { justifyContent: "end", gap: "12px", children: [
|
|
2830
2851
|
/* @__PURE__ */ i(
|
|
2831
2852
|
B,
|
|
@@ -2844,18 +2865,18 @@ const jo = C.div`
|
|
|
2844
2865
|
}
|
|
2845
2866
|
)
|
|
2846
2867
|
] });
|
|
2847
|
-
},
|
|
2848
|
-
const { label: n, howToSet: t, isFirst: r = !1 } = e, o =
|
|
2868
|
+
}, qo = (e) => {
|
|
2869
|
+
const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Yo(n), a = Go(o), s = r ? "Que" : "Y que", d = a ? o : `${Wo(o)} ${o}`, l = Ko(t);
|
|
2849
2870
|
return `${s} ${d} ${l}`;
|
|
2850
|
-
},
|
|
2851
|
-
function Bo(e) {
|
|
2852
|
-
return qo.test(e);
|
|
2853
|
-
}
|
|
2871
|
+
}, Bo = /^(el|la|los|las)\s/i;
|
|
2854
2872
|
function Go(e) {
|
|
2855
|
-
return
|
|
2873
|
+
return Bo.test(e);
|
|
2856
2874
|
}
|
|
2857
2875
|
function Yo(e) {
|
|
2858
|
-
|
|
2876
|
+
return e.replace(/\s+/g, " ").trim();
|
|
2877
|
+
}
|
|
2878
|
+
function Wo(e) {
|
|
2879
|
+
const n = Xo(e).toLowerCase(), t = /\b(s|es)\b/.test(Qo(e).toLowerCase()) && !n.endsWith("és");
|
|
2859
2880
|
return ({
|
|
2860
2881
|
mano: "f",
|
|
2861
2882
|
día: "m",
|
|
@@ -2867,36 +2888,36 @@ function Yo(e) {
|
|
|
2867
2888
|
antigüedad: "f",
|
|
2868
2889
|
antiguedad: "f",
|
|
2869
2890
|
puntaje: "m"
|
|
2870
|
-
}[n] ??
|
|
2891
|
+
}[n] ?? Zo(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
|
|
2871
2892
|
}
|
|
2872
|
-
function
|
|
2893
|
+
function Xo(e) {
|
|
2873
2894
|
return (e.toLowerCase().split(
|
|
2874
2895
|
/\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
|
|
2875
2896
|
)[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
|
|
2876
2897
|
}
|
|
2877
|
-
function
|
|
2898
|
+
function Qo(e) {
|
|
2878
2899
|
const n = e.trim().split(/\s+/);
|
|
2879
2900
|
return n[n.length - 1] || "";
|
|
2880
2901
|
}
|
|
2881
|
-
function
|
|
2902
|
+
function Zo(e) {
|
|
2882
2903
|
return /(?:dad|tad|tud|umbre|ción|sión|ie|sis|itis)$/.test(e) || e.endsWith("ez") || e.endsWith("eza") ? "f" : /(?:aje|or|án|ambre)$/.test(e) ? "m" : e.endsWith("a") ? "f" : "m";
|
|
2883
2904
|
}
|
|
2884
|
-
function
|
|
2905
|
+
function Ko(e) {
|
|
2885
2906
|
switch (e) {
|
|
2886
|
-
case
|
|
2887
|
-
case
|
|
2888
|
-
case
|
|
2907
|
+
case A.EQUAL:
|
|
2908
|
+
case A.GREATER_THAN:
|
|
2909
|
+
case A.LESS_THAN:
|
|
2889
2910
|
return "sea";
|
|
2890
|
-
case
|
|
2911
|
+
case A.RANGE:
|
|
2891
2912
|
return "esté entre";
|
|
2892
|
-
case
|
|
2893
|
-
case
|
|
2913
|
+
case A.LIST_OF_VALUES:
|
|
2914
|
+
case A.LIST_OF_VALUES_MULTI:
|
|
2894
2915
|
return "esté en";
|
|
2895
2916
|
default:
|
|
2896
2917
|
return "sea";
|
|
2897
2918
|
}
|
|
2898
2919
|
}
|
|
2899
|
-
const
|
|
2920
|
+
const Jo = (e) => {
|
|
2900
2921
|
if (typeof e == "string") {
|
|
2901
2922
|
const n = e.toLowerCase();
|
|
2902
2923
|
if (n.includes("equal")) return se.EQUAL;
|
|
@@ -2908,8 +2929,8 @@ const Ko = (e) => {
|
|
|
2908
2929
|
return se.LIST_OF_VALUES;
|
|
2909
2930
|
}
|
|
2910
2931
|
return e ?? se.EQUAL;
|
|
2911
|
-
}, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`,
|
|
2912
|
-
var
|
|
2932
|
+
}, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ea = (e) => {
|
|
2933
|
+
var L;
|
|
2913
2934
|
const {
|
|
2914
2935
|
decision: n,
|
|
2915
2936
|
onSubmitEvent: t,
|
|
@@ -2918,103 +2939,103 @@ const Ko = (e) => {
|
|
|
2918
2939
|
onRemoveCondition: a,
|
|
2919
2940
|
onRestoreConditions: s,
|
|
2920
2941
|
fullTemplate: d
|
|
2921
|
-
} = e, { formik: l, handleToggleNoneChange: p } =
|
|
2942
|
+
} = e, { formik: l, handleToggleNoneChange: p } = _o({
|
|
2922
2943
|
decision: n,
|
|
2923
2944
|
onSubmitEvent: t,
|
|
2924
2945
|
textValues: r
|
|
2925
|
-
}), c =
|
|
2946
|
+
}), c = Pe(d ?? n), g = Pe(n), f = ht(
|
|
2926
2947
|
g,
|
|
2927
|
-
(
|
|
2948
|
+
(I) => !I.hidden
|
|
2928
2949
|
), h = Object.keys(f), x = [
|
|
2929
|
-
...h.filter((
|
|
2930
|
-
...h.filter((
|
|
2950
|
+
...h.filter((I) => I === "group-primary"),
|
|
2951
|
+
...h.filter((I) => I !== "group-primary")
|
|
2931
2952
|
], b = {};
|
|
2932
2953
|
let D = 1;
|
|
2933
|
-
const T = x.map((
|
|
2934
|
-
const
|
|
2935
|
-
return b[
|
|
2936
|
-
id:
|
|
2937
|
-
label:
|
|
2954
|
+
const T = x.map((I) => {
|
|
2955
|
+
const U = I === "group-primary" ? "mainCondition" : `alternateCondition-${D++}`;
|
|
2956
|
+
return b[U] = I, {
|
|
2957
|
+
id: U,
|
|
2958
|
+
label: I === "group-primary" ? Yn(I, 0) : Yn(I, Number(U.split("-").at(-1))),
|
|
2938
2959
|
isDisabled: !1
|
|
2939
2960
|
};
|
|
2940
|
-
}), [S, N] =
|
|
2941
|
-
((
|
|
2942
|
-
), w = (
|
|
2943
|
-
const
|
|
2961
|
+
}), [S, N] = P.useState(
|
|
2962
|
+
((L = T[0]) == null ? void 0 : L.id) ?? "mainCondition"
|
|
2963
|
+
), w = (I) => N(I), F = b[S] ?? "group-primary", O = P.useMemo(() => {
|
|
2964
|
+
const I = [
|
|
2944
2965
|
...Object.keys(f).filter((K) => K === "group-primary"),
|
|
2945
2966
|
...Object.keys(f).filter((K) => K !== "group-primary")
|
|
2946
2967
|
];
|
|
2947
|
-
let
|
|
2948
|
-
const Q =
|
|
2968
|
+
let U = !1;
|
|
2969
|
+
const Q = I.map((K) => {
|
|
2949
2970
|
const At = (f[K] ?? []).map((Ke, $t) => {
|
|
2950
|
-
const
|
|
2951
|
-
|
|
2952
|
-
const It =
|
|
2971
|
+
const Pn = !U && K === "group-primary" && $t === 0;
|
|
2972
|
+
Pn && (U = !0);
|
|
2973
|
+
const It = Jo(Ke.howToSetTheCondition ?? Ke.valueUse), Rt = qo({
|
|
2953
2974
|
label: Ke.labelName || "",
|
|
2954
2975
|
howToSet: It,
|
|
2955
|
-
isFirst:
|
|
2976
|
+
isFirst: Pn
|
|
2956
2977
|
});
|
|
2957
2978
|
return { ...Ke, labelName: Rt };
|
|
2958
2979
|
});
|
|
2959
2980
|
return [K, At];
|
|
2960
2981
|
});
|
|
2961
2982
|
return Object.fromEntries(Q);
|
|
2962
|
-
}, [f]),
|
|
2983
|
+
}, [f]), $ = O[F] ?? [], V = O["group-primary"] ?? [], Z = {
|
|
2963
2984
|
decisionDataType: n.decisionDataType,
|
|
2964
2985
|
howToSetTheCondition: n.howToSetTheDecision,
|
|
2965
2986
|
labelName: n.labelName,
|
|
2966
2987
|
listOfPossibleValues: n.listOfPossibleValues,
|
|
2967
2988
|
ruleName: n.ruleName
|
|
2968
|
-
}, be = l.submitCount > 0 || !!l.touched.effectiveFrom, ve = l.submitCount > 0 || !!l.touched.validUntil, fe = be ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, ae = ve ? l.errors.validUntil ? "invalid" : "valid" : void 0, ye =
|
|
2969
|
-
const
|
|
2970
|
-
if (!
|
|
2971
|
-
if (typeof
|
|
2972
|
-
const
|
|
2989
|
+
}, be = l.submitCount > 0 || !!l.touched.effectiveFrom, ve = l.submitCount > 0 || !!l.touched.validUntil, fe = be ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, ae = ve ? l.errors.validUntil ? "invalid" : "valid" : void 0, ye = P.useMemo(() => {
|
|
2990
|
+
const I = l.errors.conditionsThatEstablishesTheDecision;
|
|
2991
|
+
if (!I) return;
|
|
2992
|
+
if (typeof I == "string") return I;
|
|
2993
|
+
const U = (Q) => {
|
|
2973
2994
|
if (Q) {
|
|
2974
2995
|
if (typeof Q == "string") return Q;
|
|
2975
2996
|
if (Array.isArray(Q))
|
|
2976
2997
|
for (const K of Q) {
|
|
2977
|
-
const we =
|
|
2998
|
+
const we = U(K);
|
|
2978
2999
|
if (we) return we;
|
|
2979
3000
|
}
|
|
2980
3001
|
else if (typeof Q == "object")
|
|
2981
3002
|
for (const K of Object.values(Q)) {
|
|
2982
|
-
const we =
|
|
3003
|
+
const we = U(K);
|
|
2983
3004
|
if (we) return we;
|
|
2984
3005
|
}
|
|
2985
3006
|
}
|
|
2986
3007
|
};
|
|
2987
|
-
return
|
|
2988
|
-
}, [l.errors.conditionsThatEstablishesTheDecision]), Ne = l.submitCount > 0 && !!ye, ue = (
|
|
2989
|
-
const Q = Object.values(c).flat().find((we) => we.conditionName ===
|
|
3008
|
+
return U(I);
|
|
3009
|
+
}, [l.errors.conditionsThatEstablishesTheDecision]), Ne = l.submitCount > 0 && !!ye, ue = (I) => I != null && I.isMulti || I != null && I.multiple || (I == null ? void 0 : I.valueUse) === "Among" ? [] : "", xe = (I) => {
|
|
3010
|
+
const Q = Object.values(c).flat().find((we) => we.conditionName === I), K = ue(Q);
|
|
2990
3011
|
l.setFieldValue(
|
|
2991
|
-
`conditionsThatEstablishesTheDecision.${
|
|
3012
|
+
`conditionsThatEstablishesTheDecision.${I}`,
|
|
2992
3013
|
K
|
|
2993
3014
|
), l.setFieldTouched(
|
|
2994
|
-
`conditionsThatEstablishesTheDecision.${
|
|
3015
|
+
`conditionsThatEstablishesTheDecision.${I}`,
|
|
2995
3016
|
!1,
|
|
2996
3017
|
!1
|
|
2997
3018
|
);
|
|
2998
3019
|
}, Te = () => {
|
|
2999
|
-
(c[
|
|
3000
|
-
const Q = `conditionsThatEstablishesTheDecision.${
|
|
3001
|
-
l.setFieldValue(Q, ue(
|
|
3020
|
+
(c[F] ?? []).forEach((U) => {
|
|
3021
|
+
const Q = `conditionsThatEstablishesTheDecision.${U.conditionName}`;
|
|
3022
|
+
l.setFieldValue(Q, ue(U)), l.setFieldTouched(Q, !1, !1);
|
|
3002
3023
|
});
|
|
3003
|
-
}, [me, le] =
|
|
3024
|
+
}, [me, le] = P.useState(!1);
|
|
3004
3025
|
return /* @__PURE__ */ i(
|
|
3005
|
-
|
|
3026
|
+
Ho,
|
|
3006
3027
|
{
|
|
3007
3028
|
activeTab: S,
|
|
3008
3029
|
conditionsErrorText: ye,
|
|
3009
|
-
currentConditions:
|
|
3030
|
+
currentConditions: $,
|
|
3010
3031
|
decision: n,
|
|
3011
3032
|
formik: l,
|
|
3012
3033
|
normalizedDecision: Z,
|
|
3013
3034
|
onCancel: o,
|
|
3014
3035
|
onRedefineCurrentTab: Te,
|
|
3015
3036
|
onTabChange: w,
|
|
3016
|
-
onClearCondition: (
|
|
3017
|
-
xe(
|
|
3037
|
+
onClearCondition: (I) => {
|
|
3038
|
+
xe(I), a == null || a(I);
|
|
3018
3039
|
},
|
|
3019
3040
|
showConditionsError: Ne,
|
|
3020
3041
|
tabs: T,
|
|
@@ -3022,7 +3043,7 @@ const Ko = (e) => {
|
|
|
3022
3043
|
termStartStatus: fe,
|
|
3023
3044
|
textValues: r,
|
|
3024
3045
|
visibleConditions: V,
|
|
3025
|
-
visibleConditionsByGroup:
|
|
3046
|
+
visibleConditionsByGroup: O,
|
|
3026
3047
|
handleToggleNoneChange: p,
|
|
3027
3048
|
portalId: "redefine-confirm-portal",
|
|
3028
3049
|
showRedefineConfirm: me,
|
|
@@ -3030,14 +3051,14 @@ const Ko = (e) => {
|
|
|
3030
3051
|
onCloseRedefineConfirm: () => le(!1),
|
|
3031
3052
|
onConfirmRedefine: () => {
|
|
3032
3053
|
Te();
|
|
3033
|
-
const
|
|
3034
|
-
(
|
|
3054
|
+
const I = (c[F] ?? []).map(
|
|
3055
|
+
(U) => U.conditionName
|
|
3035
3056
|
);
|
|
3036
|
-
s == null || s(
|
|
3057
|
+
s == null || s(I), le(!1);
|
|
3037
3058
|
}
|
|
3038
3059
|
}
|
|
3039
3060
|
);
|
|
3040
|
-
},
|
|
3061
|
+
}, vl = (e) => {
|
|
3041
3062
|
const {
|
|
3042
3063
|
cardTitle: n = !0,
|
|
3043
3064
|
controls: t = !0,
|
|
@@ -3057,7 +3078,7 @@ const Ko = (e) => {
|
|
|
3057
3078
|
onRemoveCondition: b,
|
|
3058
3079
|
onRestoreConditions: D,
|
|
3059
3080
|
baseDecisionTemplate: T
|
|
3060
|
-
} = e, [S, N] =
|
|
3081
|
+
} = e, [S, N] = H(null), w = re("(max-width: 681px)"), { renderedCards: F, shouldRenderAddCard: O } = Io({
|
|
3061
3082
|
cardTitle: n,
|
|
3062
3083
|
controls: t,
|
|
3063
3084
|
customTitleContentAddCard: r,
|
|
@@ -3068,9 +3089,9 @@ const Ko = (e) => {
|
|
|
3068
3089
|
textValues: s,
|
|
3069
3090
|
isOpenFor: (V) => S === V,
|
|
3070
3091
|
toggleAt: (V) => N((Z) => Z === V ? null : V)
|
|
3071
|
-
}),
|
|
3092
|
+
}), $ = (a == null ? void 0 : a.length) === 0 && !u;
|
|
3072
3093
|
return /* @__PURE__ */ m(z, { children: [
|
|
3073
|
-
/* @__PURE__ */ i(
|
|
3094
|
+
/* @__PURE__ */ i(So, { children: /* @__PURE__ */ i(Eo, { children: /* @__PURE__ */ i(y, { direction: "column", gap: "16px", padding: "6px", children: $ ? /* @__PURE__ */ i(je, { legend: "Decisiones", children: /* @__PURE__ */ m(
|
|
3074
3095
|
y,
|
|
3075
3096
|
{
|
|
3076
3097
|
direction: "column",
|
|
@@ -3080,15 +3101,15 @@ const Ko = (e) => {
|
|
|
3080
3101
|
alignItems: "center",
|
|
3081
3102
|
children: [
|
|
3082
3103
|
/* @__PURE__ */ i(
|
|
3083
|
-
|
|
3104
|
+
j,
|
|
3084
3105
|
{
|
|
3085
3106
|
appearance: "help",
|
|
3086
|
-
icon: /* @__PURE__ */ i(
|
|
3107
|
+
icon: /* @__PURE__ */ i(Pt, {}),
|
|
3087
3108
|
size: "40px"
|
|
3088
3109
|
}
|
|
3089
3110
|
),
|
|
3090
3111
|
/* @__PURE__ */ i(
|
|
3091
|
-
|
|
3112
|
+
R,
|
|
3092
3113
|
{
|
|
3093
3114
|
type: "title",
|
|
3094
3115
|
size: "medium",
|
|
@@ -3097,7 +3118,7 @@ const Ko = (e) => {
|
|
|
3097
3118
|
children: "Sin decisiones"
|
|
3098
3119
|
}
|
|
3099
3120
|
),
|
|
3100
|
-
/* @__PURE__ */ i(
|
|
3121
|
+
/* @__PURE__ */ i(R, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */ m(z, { children: [
|
|
3101
3122
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
3102
3123
|
r || ' "Agregar decisión"'
|
|
3103
3124
|
] }) })
|
|
@@ -3116,8 +3137,8 @@ const Ko = (e) => {
|
|
|
3116
3137
|
padding: "6px",
|
|
3117
3138
|
height: w ? "auto" : "484px",
|
|
3118
3139
|
children: [
|
|
3119
|
-
|
|
3120
|
-
|
|
3140
|
+
F,
|
|
3141
|
+
O && Sn({
|
|
3121
3142
|
type: "add",
|
|
3122
3143
|
index: a == null ? void 0 : a.length,
|
|
3123
3144
|
controls: t,
|
|
@@ -3127,21 +3148,21 @@ const Ko = (e) => {
|
|
|
3127
3148
|
handleOpenModal: c,
|
|
3128
3149
|
handleDelete: h,
|
|
3129
3150
|
textValues: s,
|
|
3130
|
-
shouldRenderEmptyMessage:
|
|
3151
|
+
shouldRenderEmptyMessage: $,
|
|
3131
3152
|
terms: x
|
|
3132
3153
|
})
|
|
3133
3154
|
]
|
|
3134
3155
|
}
|
|
3135
3156
|
) }) }) }),
|
|
3136
3157
|
l && /* @__PURE__ */ i(
|
|
3137
|
-
|
|
3158
|
+
Lo,
|
|
3138
3159
|
{
|
|
3139
3160
|
portalId: "modal-portal",
|
|
3140
3161
|
onCloseModal: g,
|
|
3141
3162
|
title: p ? "Editar Decisión" : "Configurar Decisión",
|
|
3142
3163
|
description: "Diligencia los campos para configurar tu decisión.",
|
|
3143
3164
|
children: /* @__PURE__ */ i(
|
|
3144
|
-
|
|
3165
|
+
ea,
|
|
3145
3166
|
{
|
|
3146
3167
|
decision: p || d,
|
|
3147
3168
|
fullTemplate: T ?? d,
|
|
@@ -3156,16 +3177,16 @@ const Ko = (e) => {
|
|
|
3156
3177
|
}
|
|
3157
3178
|
)
|
|
3158
3179
|
] });
|
|
3159
|
-
},
|
|
3180
|
+
}, na = {
|
|
3160
3181
|
border: {
|
|
3161
3182
|
color: E.palette.neutral.N40
|
|
3162
3183
|
}
|
|
3163
|
-
},
|
|
3184
|
+
}, ta = C.div`
|
|
3164
3185
|
border-width: 1px;
|
|
3165
3186
|
border-style: solid;
|
|
3166
3187
|
border-color: ${({ theme: e }) => {
|
|
3167
3188
|
var n, t;
|
|
3168
|
-
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) ||
|
|
3189
|
+
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || na.border.color;
|
|
3169
3190
|
}};
|
|
3170
3191
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
3171
3192
|
margin: ${({ $margin: e }) => e};
|
|
@@ -3174,7 +3195,7 @@ const Ko = (e) => {
|
|
|
3174
3195
|
height: ${({ $height: e }) => e};
|
|
3175
3196
|
box-sizing: border-box;
|
|
3176
3197
|
`;
|
|
3177
|
-
function
|
|
3198
|
+
function ra(e) {
|
|
3178
3199
|
const {
|
|
3179
3200
|
children: n,
|
|
3180
3201
|
padding: t = "16px",
|
|
@@ -3184,7 +3205,7 @@ function ta(e) {
|
|
|
3184
3205
|
height: s
|
|
3185
3206
|
} = e;
|
|
3186
3207
|
return /* @__PURE__ */ i(
|
|
3187
|
-
|
|
3208
|
+
ta,
|
|
3188
3209
|
{
|
|
3189
3210
|
$padding: t,
|
|
3190
3211
|
$margin: r,
|
|
@@ -3195,8 +3216,8 @@ function ta(e) {
|
|
|
3195
3216
|
}
|
|
3196
3217
|
);
|
|
3197
3218
|
}
|
|
3198
|
-
const
|
|
3199
|
-
const [t, r] =
|
|
3219
|
+
const oa = (e, n) => {
|
|
3220
|
+
const [t, r] = H([]), [o, a] = H([]), [s, d] = H(!1), l = Fe(null);
|
|
3200
3221
|
return $e(() => {
|
|
3201
3222
|
if (!e.current || !l.current) return;
|
|
3202
3223
|
const p = e.current, u = l.current, c = () => {
|
|
@@ -3222,19 +3243,19 @@ C.div`
|
|
|
3222
3243
|
width: 100%;
|
|
3223
3244
|
}
|
|
3224
3245
|
`;
|
|
3225
|
-
const
|
|
3246
|
+
const aa = C.div`
|
|
3226
3247
|
position: absolute;
|
|
3227
3248
|
top: calc(100% + 4px);
|
|
3228
3249
|
right: 0;
|
|
3229
3250
|
z-index: 1000;
|
|
3230
3251
|
width: 170px;
|
|
3231
|
-
`,
|
|
3252
|
+
`, ia = C.div`
|
|
3232
3253
|
position: absolute;
|
|
3233
3254
|
visibility: hidden;
|
|
3234
3255
|
pointer-events: none;
|
|
3235
3256
|
height: 0;
|
|
3236
3257
|
overflow: hidden;
|
|
3237
|
-
`,
|
|
3258
|
+
`, la = C.div`
|
|
3238
3259
|
cursor: pointer;
|
|
3239
3260
|
`, En = {
|
|
3240
3261
|
border: {
|
|
@@ -3272,7 +3293,7 @@ const oa = C.div`
|
|
|
3272
3293
|
hover: E.palette.neutral.N30
|
|
3273
3294
|
}
|
|
3274
3295
|
}
|
|
3275
|
-
},
|
|
3296
|
+
}, sa = C.li`
|
|
3276
3297
|
display: flex;
|
|
3277
3298
|
align-items: center;
|
|
3278
3299
|
align-self: stretch;
|
|
@@ -3290,11 +3311,11 @@ const oa = C.div`
|
|
|
3290
3311
|
return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : r.regular) || En.background.color.regular;
|
|
3291
3312
|
}};
|
|
3292
3313
|
}
|
|
3293
|
-
`,
|
|
3314
|
+
`, da = (e) => {
|
|
3294
3315
|
var g, f, h, x, b, D;
|
|
3295
|
-
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, s] =
|
|
3316
|
+
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, s] = H(!1), d = () => s(!0), l = () => s(!1), p = Fn(In), u = ((h = (f = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : h.hover) ?? En.option.appearance.hover, c = ((D = (b = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : b.appearance) == null ? void 0 : D.regular) ?? En.option.appearance.regular;
|
|
3296
3317
|
return /* @__PURE__ */ i(
|
|
3297
|
-
|
|
3318
|
+
sa,
|
|
3298
3319
|
{
|
|
3299
3320
|
id: n,
|
|
3300
3321
|
onMouseEnter: d,
|
|
@@ -3311,7 +3332,7 @@ const oa = C.div`
|
|
|
3311
3332
|
width: "100%",
|
|
3312
3333
|
children: [
|
|
3313
3334
|
r && /* @__PURE__ */ i(
|
|
3314
|
-
|
|
3335
|
+
j,
|
|
3315
3336
|
{
|
|
3316
3337
|
icon: r,
|
|
3317
3338
|
size: "medium",
|
|
@@ -3319,7 +3340,7 @@ const oa = C.div`
|
|
|
3319
3340
|
}
|
|
3320
3341
|
),
|
|
3321
3342
|
/* @__PURE__ */ i(
|
|
3322
|
-
|
|
3343
|
+
R,
|
|
3323
3344
|
{
|
|
3324
3345
|
textAlign: "start",
|
|
3325
3346
|
size: "medium",
|
|
@@ -3328,7 +3349,7 @@ const oa = C.div`
|
|
|
3328
3349
|
}
|
|
3329
3350
|
),
|
|
3330
3351
|
/* @__PURE__ */ i(
|
|
3331
|
-
|
|
3352
|
+
j,
|
|
3332
3353
|
{
|
|
3333
3354
|
icon: /* @__PURE__ */ i(zt, {}),
|
|
3334
3355
|
size: "small",
|
|
@@ -3344,7 +3365,7 @@ const oa = C.div`
|
|
|
3344
3365
|
)
|
|
3345
3366
|
}
|
|
3346
3367
|
);
|
|
3347
|
-
},
|
|
3368
|
+
}, yl = (e) => {
|
|
3348
3369
|
const {
|
|
3349
3370
|
appliedFilters: n = [],
|
|
3350
3371
|
onClear: t,
|
|
@@ -3357,14 +3378,14 @@ const oa = C.div`
|
|
|
3357
3378
|
hidden: c,
|
|
3358
3379
|
showOverflowIndicator: g,
|
|
3359
3380
|
measurementRef: f
|
|
3360
|
-
} =
|
|
3361
|
-
w.stopPropagation(), x((
|
|
3381
|
+
} = oa(d, n), [h, x] = H(!1), b = (w) => {
|
|
3382
|
+
w.stopPropagation(), x((F) => !F);
|
|
3362
3383
|
};
|
|
3363
3384
|
$e(() => {
|
|
3364
|
-
const w = (
|
|
3385
|
+
const w = (F) => {
|
|
3365
3386
|
var V, Z;
|
|
3366
|
-
const
|
|
3367
|
-
!((V = l.current) != null && V.contains(
|
|
3387
|
+
const O = F.target;
|
|
3388
|
+
!((V = l.current) != null && V.contains(O)) && !((Z = p.current) != null && Z.contains(O)) && x(!1);
|
|
3368
3389
|
};
|
|
3369
3390
|
return h && window.addEventListener("mousedown", w), () => window.removeEventListener("mousedown", w);
|
|
3370
3391
|
}, [h]);
|
|
@@ -3374,11 +3395,11 @@ const oa = C.div`
|
|
|
3374
3395
|
label: w.label,
|
|
3375
3396
|
icon: w.icon
|
|
3376
3397
|
})), N = (w) => {
|
|
3377
|
-
var
|
|
3378
|
-
(
|
|
3398
|
+
var F, O;
|
|
3399
|
+
(O = (F = c.find(($) => $.label === w)) == null ? void 0 : F.onClose) == null || O.call(F), x(!1);
|
|
3379
3400
|
};
|
|
3380
|
-
return /* @__PURE__ */ m(
|
|
3381
|
-
/* @__PURE__ */ i(
|
|
3401
|
+
return /* @__PURE__ */ m(ra, { borderRadius: "8px", width: "100%", children: [
|
|
3402
|
+
/* @__PURE__ */ i(ia, { ref: f, children: n.map((w) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
|
|
3382
3403
|
ke,
|
|
3383
3404
|
{
|
|
3384
3405
|
appearance: "primary",
|
|
@@ -3402,7 +3423,7 @@ const oa = C.div`
|
|
|
3402
3423
|
alignItems: "center",
|
|
3403
3424
|
padding: "0px 8px",
|
|
3404
3425
|
border: !0,
|
|
3405
|
-
children: D ? /* @__PURE__ */ i(
|
|
3426
|
+
children: D ? /* @__PURE__ */ i(R, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(z, { children: [
|
|
3406
3427
|
u.map((w) => /* @__PURE__ */ i(
|
|
3407
3428
|
ke,
|
|
3408
3429
|
{
|
|
@@ -3422,27 +3443,27 @@ const oa = C.div`
|
|
|
3422
3443
|
ref: p,
|
|
3423
3444
|
style: { position: "relative", display: "inline-block" },
|
|
3424
3445
|
children: [
|
|
3425
|
-
/* @__PURE__ */ i(
|
|
3446
|
+
/* @__PURE__ */ i(la, { onClick: b, children: /* @__PURE__ */ i(
|
|
3426
3447
|
ke,
|
|
3427
3448
|
{
|
|
3428
3449
|
appearance: "primary",
|
|
3429
3450
|
label: `+${c.length}`
|
|
3430
3451
|
}
|
|
3431
3452
|
) }),
|
|
3432
|
-
T && /* @__PURE__ */ i(
|
|
3453
|
+
T && /* @__PURE__ */ i(aa, { ref: l, children: /* @__PURE__ */ i(
|
|
3433
3454
|
Gt,
|
|
3434
3455
|
{
|
|
3435
3456
|
options: S,
|
|
3436
3457
|
onOptionClick: N,
|
|
3437
3458
|
children: c.map((w) => /* @__PURE__ */ i(
|
|
3438
|
-
|
|
3459
|
+
da,
|
|
3439
3460
|
{
|
|
3440
3461
|
id: w.label,
|
|
3441
3462
|
label: w.label,
|
|
3442
3463
|
leadingIcon: w.icon,
|
|
3443
3464
|
onClose: () => {
|
|
3444
|
-
var
|
|
3445
|
-
(
|
|
3465
|
+
var F;
|
|
3466
|
+
(F = w.onClose) == null || F.call(w), x(!1);
|
|
3446
3467
|
}
|
|
3447
3468
|
},
|
|
3448
3469
|
w.label
|
|
@@ -3478,7 +3499,7 @@ const oa = C.div`
|
|
|
3478
3499
|
)
|
|
3479
3500
|
] })
|
|
3480
3501
|
] });
|
|
3481
|
-
},
|
|
3502
|
+
}, ca = C.div`
|
|
3482
3503
|
display: flex;
|
|
3483
3504
|
flex-direction: column;
|
|
3484
3505
|
background-color: ${({ theme: e }) => {
|
|
@@ -3491,7 +3512,7 @@ const oa = C.div`
|
|
|
3491
3512
|
padding: 24px;
|
|
3492
3513
|
gap: 24px;
|
|
3493
3514
|
box-sizing: border-box;
|
|
3494
|
-
`,
|
|
3515
|
+
`, xl = (e) => {
|
|
3495
3516
|
const {
|
|
3496
3517
|
actionButtonLabel: n,
|
|
3497
3518
|
cancelButtonLabel: t,
|
|
@@ -3507,14 +3528,14 @@ const oa = C.div`
|
|
|
3507
3528
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
3508
3529
|
);
|
|
3509
3530
|
return pn(
|
|
3510
|
-
/* @__PURE__ */ i(cn, { children: /* @__PURE__ */ m(
|
|
3531
|
+
/* @__PURE__ */ i(cn, { children: /* @__PURE__ */ m(ca, { $smallScreen: p, children: [
|
|
3511
3532
|
/* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
3512
3533
|
/* @__PURE__ */ m(y, { alignContent: "center", justifyContent: "space-between", children: [
|
|
3513
|
-
/* @__PURE__ */ i(
|
|
3534
|
+
/* @__PURE__ */ i(R, { appearance: "dark", size: "small", type: "headline", children: l }),
|
|
3514
3535
|
/* @__PURE__ */ m(y, { alignItems: "center", children: [
|
|
3515
|
-
/* @__PURE__ */ i(
|
|
3536
|
+
/* @__PURE__ */ i(R, { children: "Cerrar" }),
|
|
3516
3537
|
/* @__PURE__ */ i(
|
|
3517
|
-
|
|
3538
|
+
j,
|
|
3518
3539
|
{
|
|
3519
3540
|
appearance: "dark",
|
|
3520
3541
|
icon: /* @__PURE__ */ i(dn, {}),
|
|
@@ -3554,12 +3575,12 @@ const oa = C.div`
|
|
|
3554
3575
|
] }) }),
|
|
3555
3576
|
u
|
|
3556
3577
|
);
|
|
3557
|
-
},
|
|
3578
|
+
}, Tl = (e) => {
|
|
3558
3579
|
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a = re("(max-width: 768px)"), s = !n || n.length === 0;
|
|
3559
3580
|
return /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
3560
3581
|
a && /* @__PURE__ */ m(z, { children: [
|
|
3561
3582
|
/* @__PURE__ */ m(y, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
3562
|
-
/* @__PURE__ */ i(
|
|
3583
|
+
/* @__PURE__ */ i(j, { appearance: "gray", icon: /* @__PURE__ */ i(lt, {}) }),
|
|
3563
3584
|
/* @__PURE__ */ i(
|
|
3564
3585
|
ie,
|
|
3565
3586
|
{
|
|
@@ -3572,7 +3593,7 @@ const oa = C.div`
|
|
|
3572
3593
|
border: !0,
|
|
3573
3594
|
width: "100%",
|
|
3574
3595
|
height: "36px",
|
|
3575
|
-
children: s ? /* @__PURE__ */ i(
|
|
3596
|
+
children: s ? /* @__PURE__ */ i(R, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ i(
|
|
3576
3597
|
ke,
|
|
3577
3598
|
{
|
|
3578
3599
|
appearance: "primary",
|
|
@@ -3590,7 +3611,7 @@ const oa = C.div`
|
|
|
3590
3611
|
/* @__PURE__ */ i(G, { dashed: !0 })
|
|
3591
3612
|
] }),
|
|
3592
3613
|
t.map((d) => /* @__PURE__ */ m(y, { gap: "6px", alignItems: "center", children: [
|
|
3593
|
-
/* @__PURE__ */ i(y, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(
|
|
3614
|
+
/* @__PURE__ */ i(y, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(j, { appearance: "primary", icon: d.icon }) }),
|
|
3594
3615
|
/* @__PURE__ */ i(
|
|
3595
3616
|
Yt,
|
|
3596
3617
|
{
|
|
@@ -3610,12 +3631,12 @@ const oa = C.div`
|
|
|
3610
3631
|
)
|
|
3611
3632
|
] }, d.name))
|
|
3612
3633
|
] });
|
|
3613
|
-
},
|
|
3634
|
+
}, ua = (e) => {
|
|
3614
3635
|
const n = [];
|
|
3615
3636
|
return e.from !== void 0 && e.from !== null && n.push(`>${e.from}`), e.to !== void 0 && e.to !== null && n.push(`<${e.to}`), n.join(";");
|
|
3616
|
-
},
|
|
3637
|
+
}, wl = (e) => {
|
|
3617
3638
|
var s;
|
|
3618
|
-
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ?
|
|
3639
|
+
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? ua(d) : d, a = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
|
|
3619
3640
|
var c;
|
|
3620
3641
|
const p = d == null ? void 0 : d.value;
|
|
3621
3642
|
return p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0 ? null : {
|
|
@@ -3631,7 +3652,7 @@ const oa = C.div`
|
|
|
3631
3652
|
value: o(n.value),
|
|
3632
3653
|
conditionsThatEstablishesTheDecision: a
|
|
3633
3654
|
};
|
|
3634
|
-
},
|
|
3655
|
+
}, Cl = (e) => {
|
|
3635
3656
|
if (typeof e != "string") return e;
|
|
3636
3657
|
const n = e.split(";").map((r) => r.trim()), t = {};
|
|
3637
3658
|
for (const r of n)
|
|
@@ -3643,7 +3664,7 @@ const oa = C.div`
|
|
|
3643
3664
|
isNaN(o) || (t.to = o);
|
|
3644
3665
|
}
|
|
3645
3666
|
return t.from !== void 0 || t.to !== void 0 ? t : e;
|
|
3646
|
-
},
|
|
3667
|
+
}, Dl = (e) => {
|
|
3647
3668
|
const { dataDecision: n, originalDecision: t } = e, r = {
|
|
3648
3669
|
conditionName: n.ruleName || "",
|
|
3649
3670
|
labelName: n.labelName || "",
|
|
@@ -3659,7 +3680,7 @@ const oa = C.div`
|
|
|
3659
3680
|
(o) => o.hidden ? { ...r } : o
|
|
3660
3681
|
)
|
|
3661
3682
|
};
|
|
3662
|
-
},
|
|
3683
|
+
}, Sl = (e) => {
|
|
3663
3684
|
const { decisions: n } = e;
|
|
3664
3685
|
return n == null ? void 0 : n.map((t) => {
|
|
3665
3686
|
var o;
|
|
@@ -3678,14 +3699,14 @@ const oa = C.div`
|
|
|
3678
3699
|
)
|
|
3679
3700
|
} : t;
|
|
3680
3701
|
});
|
|
3681
|
-
},
|
|
3702
|
+
}, pa = (e) => ({
|
|
3682
3703
|
schema: de().required("Requerido").test(
|
|
3683
3704
|
"non-empty",
|
|
3684
3705
|
"El valor no puede estar vacío",
|
|
3685
3706
|
(n) => n != null && n.trim() !== ""
|
|
3686
3707
|
),
|
|
3687
3708
|
value: e
|
|
3688
|
-
}),
|
|
3709
|
+
}), ga = (e) => ({
|
|
3689
3710
|
schema: Ve().test(
|
|
3690
3711
|
"isArrayOrString",
|
|
3691
3712
|
"Debe ser un array de strings/numbers o un solo string",
|
|
@@ -3694,7 +3715,7 @@ const oa = C.div`
|
|
|
3694
3715
|
) : typeof n == "string"
|
|
3695
3716
|
),
|
|
3696
3717
|
value: e
|
|
3697
|
-
}),
|
|
3718
|
+
}), ha = (e) => ({
|
|
3698
3719
|
schema: Ve().test(
|
|
3699
3720
|
"isArrayOrString",
|
|
3700
3721
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
@@ -3703,7 +3724,7 @@ const oa = C.div`
|
|
|
3703
3724
|
) : typeof n == "string"
|
|
3704
3725
|
),
|
|
3705
3726
|
value: e
|
|
3706
|
-
}),
|
|
3727
|
+
}), fa = (e) => {
|
|
3707
3728
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
3708
3729
|
return {
|
|
3709
3730
|
schema: te({
|
|
@@ -3719,28 +3740,28 @@ const oa = C.div`
|
|
|
3719
3740
|
}),
|
|
3720
3741
|
value: { from: n, to: t }
|
|
3721
3742
|
};
|
|
3722
|
-
}, yn = (e, n) => n ===
|
|
3743
|
+
}, yn = (e, n) => n === q.PERCENTAGE ? {
|
|
3723
3744
|
schema: ce().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
|
|
3724
3745
|
value: e
|
|
3725
3746
|
} : {
|
|
3726
3747
|
schema: de().required("Requerido"),
|
|
3727
3748
|
value: e
|
|
3728
|
-
},
|
|
3729
|
-
[
|
|
3730
|
-
[
|
|
3731
|
-
[
|
|
3732
|
-
[
|
|
3733
|
-
[
|
|
3734
|
-
[
|
|
3735
|
-
}, Wn = (e) =>
|
|
3736
|
-
function
|
|
3749
|
+
}, ma = {
|
|
3750
|
+
[A.LIST_OF_VALUES]: ga,
|
|
3751
|
+
[A.LIST_OF_VALUES_MULTI]: ha,
|
|
3752
|
+
[A.RANGE]: fa,
|
|
3753
|
+
[A.GREATER_THAN]: yn,
|
|
3754
|
+
[A.LESS_THAN]: yn,
|
|
3755
|
+
[A.EQUAL]: yn
|
|
3756
|
+
}, Wn = (e) => ma[e] || pa;
|
|
3757
|
+
function ba({
|
|
3737
3758
|
decision: e,
|
|
3738
3759
|
onSubmitEvent: n,
|
|
3739
3760
|
textValues: t
|
|
3740
3761
|
}) {
|
|
3741
3762
|
const r = {
|
|
3742
3763
|
ruleName: e.ruleName || "",
|
|
3743
|
-
decisionDataType: e.decisionDataType ||
|
|
3764
|
+
decisionDataType: e.decisionDataType || q.ALPHABETICAL,
|
|
3744
3765
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
3745
3766
|
value: e.value || "",
|
|
3746
3767
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -3817,9 +3838,9 @@ function ma({
|
|
|
3817
3838
|
return te(c);
|
|
3818
3839
|
})
|
|
3819
3840
|
};
|
|
3820
|
-
t.terms && (a.effectiveFrom =
|
|
3841
|
+
t.terms && (a.effectiveFrom = Me().required(
|
|
3821
3842
|
"La fecha de inicio es requerida"
|
|
3822
|
-
), a.validUntil =
|
|
3843
|
+
), a.validUntil = Me().when(
|
|
3823
3844
|
"checkClosed",
|
|
3824
3845
|
(l, p, { parent: u }) => (u == null ? void 0 : u.checkClosed) ? p.required("La fecha de finalización es requerida").test(
|
|
3825
3846
|
"is-after-startDate",
|
|
@@ -3864,7 +3885,7 @@ function ma({
|
|
|
3864
3885
|
void 0
|
|
3865
3886
|
);
|
|
3866
3887
|
else {
|
|
3867
|
-
const c = u.howToSetTheCondition ===
|
|
3888
|
+
const c = u.howToSetTheCondition === A.LIST_OF_VALUES_MULTI ? [] : "";
|
|
3868
3889
|
o.setFieldValue(
|
|
3869
3890
|
`conditionsThatEstablishesTheDecision.${u.conditionName}`,
|
|
3870
3891
|
c
|
|
@@ -3873,7 +3894,7 @@ function ma({
|
|
|
3873
3894
|
});
|
|
3874
3895
|
} };
|
|
3875
3896
|
}
|
|
3876
|
-
const
|
|
3897
|
+
const va = C.div`
|
|
3877
3898
|
& > div {
|
|
3878
3899
|
border-radius: 8px;
|
|
3879
3900
|
border: 1px solid
|
|
@@ -3882,7 +3903,7 @@ const ba = C.div`
|
|
|
3882
3903
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
|
|
3883
3904
|
}};
|
|
3884
3905
|
}
|
|
3885
|
-
`,
|
|
3906
|
+
`, ya = C.div`
|
|
3886
3907
|
width: 100%;
|
|
3887
3908
|
height: 100%;
|
|
3888
3909
|
overflow-y: auto;
|
|
@@ -3899,7 +3920,7 @@ const ba = C.div`
|
|
|
3899
3920
|
background-color: #ebecf0;
|
|
3900
3921
|
border-radius: 8px;
|
|
3901
3922
|
}
|
|
3902
|
-
`,
|
|
3923
|
+
`, xa = (e) => {
|
|
3903
3924
|
const {
|
|
3904
3925
|
checked: n,
|
|
3905
3926
|
children: t,
|
|
@@ -3908,7 +3929,7 @@ const ba = C.div`
|
|
|
3908
3929
|
labelToggle: a,
|
|
3909
3930
|
name: s,
|
|
3910
3931
|
valueToggle: d = ""
|
|
3911
|
-
} = e, [l, p] =
|
|
3932
|
+
} = e, [l, p] = H(n), u = (c) => {
|
|
3912
3933
|
p(c.target.checked), r(c);
|
|
3913
3934
|
};
|
|
3914
3935
|
return $e(() => {
|
|
@@ -3923,12 +3944,12 @@ const ba = C.div`
|
|
|
3923
3944
|
onChange: u,
|
|
3924
3945
|
size: "small",
|
|
3925
3946
|
value: d,
|
|
3926
|
-
children: /* @__PURE__ */ i(
|
|
3947
|
+
children: /* @__PURE__ */ i(R, { size: "medium", type: "label", weight: "bold", children: a })
|
|
3927
3948
|
}
|
|
3928
3949
|
) }),
|
|
3929
3950
|
l && /* @__PURE__ */ i(z, { children: t })
|
|
3930
3951
|
] });
|
|
3931
|
-
},
|
|
3952
|
+
}, Ta = (e) => {
|
|
3932
3953
|
const {
|
|
3933
3954
|
onHandleStartChange: n,
|
|
3934
3955
|
onHandleEndChange: t,
|
|
@@ -3943,17 +3964,17 @@ const ba = C.div`
|
|
|
3943
3964
|
messageEnd: c = "",
|
|
3944
3965
|
statusStart: g = "pending",
|
|
3945
3966
|
statusEnd: f = "pending"
|
|
3946
|
-
} = e, [h, x] =
|
|
3947
|
-
x(
|
|
3948
|
-
}, w = (
|
|
3949
|
-
D(
|
|
3950
|
-
},
|
|
3951
|
-
S(
|
|
3952
|
-
},
|
|
3967
|
+
} = e, [h, x] = H(s), [b, D] = H(l), [T, S] = H(p), N = ({ target: $ }) => {
|
|
3968
|
+
x($.checked), r && r($.checked);
|
|
3969
|
+
}, w = ($) => {
|
|
3970
|
+
D($.target.value), n($);
|
|
3971
|
+
}, F = ($) => {
|
|
3972
|
+
S($.target.value), t($);
|
|
3973
|
+
}, O = re("(max-width: 400px)");
|
|
3953
3974
|
return /* @__PURE__ */ m(z, { children: [
|
|
3954
3975
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
3955
3976
|
/* @__PURE__ */ i(
|
|
3956
|
-
|
|
3977
|
+
R,
|
|
3957
3978
|
{
|
|
3958
3979
|
appearance: "gray",
|
|
3959
3980
|
margin: "10px 0",
|
|
@@ -3985,7 +4006,7 @@ const ba = C.div`
|
|
|
3985
4006
|
/* @__PURE__ */ m(
|
|
3986
4007
|
y,
|
|
3987
4008
|
{
|
|
3988
|
-
direction:
|
|
4009
|
+
direction: O ? "column" : "row",
|
|
3989
4010
|
justifyContent: "space-between",
|
|
3990
4011
|
gap: "24px",
|
|
3991
4012
|
children: [
|
|
@@ -4007,7 +4028,7 @@ const ba = C.div`
|
|
|
4007
4028
|
{
|
|
4008
4029
|
id: "dateEnd",
|
|
4009
4030
|
label: a,
|
|
4010
|
-
onChange:
|
|
4031
|
+
onChange: F,
|
|
4011
4032
|
value: T,
|
|
4012
4033
|
required: d,
|
|
4013
4034
|
size: "compact",
|
|
@@ -4019,7 +4040,7 @@ const ba = C.div`
|
|
|
4019
4040
|
}
|
|
4020
4041
|
)
|
|
4021
4042
|
] });
|
|
4022
|
-
},
|
|
4043
|
+
}, wa = (e) => {
|
|
4023
4044
|
const {
|
|
4024
4045
|
formik: n,
|
|
4025
4046
|
textValues: t,
|
|
@@ -4039,7 +4060,7 @@ const ba = C.div`
|
|
|
4039
4060
|
isDecision: !0
|
|
4040
4061
|
}),
|
|
4041
4062
|
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
4042
|
-
/* @__PURE__ */ i(
|
|
4063
|
+
/* @__PURE__ */ i(va, { children: /* @__PURE__ */ i(ya, { children: /* @__PURE__ */ m(
|
|
4043
4064
|
y,
|
|
4044
4065
|
{
|
|
4045
4066
|
direction: "column",
|
|
@@ -4054,7 +4075,7 @@ const ba = C.div`
|
|
|
4054
4075
|
alignItems: "center",
|
|
4055
4076
|
gap: "64px",
|
|
4056
4077
|
children: [
|
|
4057
|
-
/* @__PURE__ */ i(
|
|
4078
|
+
/* @__PURE__ */ i(R, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
4058
4079
|
/* @__PURE__ */ i(
|
|
4059
4080
|
un,
|
|
4060
4081
|
{
|
|
@@ -4062,14 +4083,14 @@ const ba = C.div`
|
|
|
4062
4083
|
onChange: () => s(!n.values.toggleNone),
|
|
4063
4084
|
checked: n.values.toggleNone,
|
|
4064
4085
|
size: "small",
|
|
4065
|
-
children: /* @__PURE__ */ i(
|
|
4086
|
+
children: /* @__PURE__ */ i(R, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
4066
4087
|
}
|
|
4067
4088
|
)
|
|
4068
4089
|
]
|
|
4069
4090
|
}
|
|
4070
4091
|
),
|
|
4071
4092
|
/* @__PURE__ */ i(y, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => /* @__PURE__ */ i(
|
|
4072
|
-
|
|
4093
|
+
xa,
|
|
4073
4094
|
{
|
|
4074
4095
|
id: `toggle-${c.conditionName}`,
|
|
4075
4096
|
name: `toggle.${c.conditionName}`,
|
|
@@ -4077,7 +4098,7 @@ const ba = C.div`
|
|
|
4077
4098
|
checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[c.conditionName] !== void 0,
|
|
4078
4099
|
handleToggleChange: (g) => d(
|
|
4079
4100
|
c.conditionName,
|
|
4080
|
-
c.howToSetTheCondition ===
|
|
4101
|
+
c.howToSetTheCondition === A.LIST_OF_VALUES_MULTI
|
|
4081
4102
|
)(g.target.checked),
|
|
4082
4103
|
children: on({ condition: c, formik: n })
|
|
4083
4104
|
},
|
|
@@ -4089,7 +4110,7 @@ const ba = C.div`
|
|
|
4089
4110
|
t.terms && /* @__PURE__ */ m(z, { children: [
|
|
4090
4111
|
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
4091
4112
|
/* @__PURE__ */ i(
|
|
4092
|
-
|
|
4113
|
+
Ta,
|
|
4093
4114
|
{
|
|
4094
4115
|
labelStart: t.termStart,
|
|
4095
4116
|
labelEnd: t.termEnd,
|
|
@@ -4109,15 +4130,15 @@ const ba = C.div`
|
|
|
4109
4130
|
)
|
|
4110
4131
|
] }),
|
|
4111
4132
|
/* @__PURE__ */ i(G, {}),
|
|
4112
|
-
l && /* @__PURE__ */ i(
|
|
4133
|
+
l && /* @__PURE__ */ i(R, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
4113
4134
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
4114
4135
|
/* @__PURE__ */ i(B, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
4115
4136
|
/* @__PURE__ */ i(B, { type: "submit", children: t.confirm })
|
|
4116
4137
|
] })
|
|
4117
4138
|
] }) });
|
|
4118
|
-
},
|
|
4139
|
+
}, Ca = (e) => {
|
|
4119
4140
|
var f;
|
|
4120
|
-
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } =
|
|
4141
|
+
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } = ba({
|
|
4121
4142
|
decision: n,
|
|
4122
4143
|
onSubmitEvent: t,
|
|
4123
4144
|
textValues: r
|
|
@@ -4131,7 +4152,7 @@ const ba = C.div`
|
|
|
4131
4152
|
(h) => !h.hidden
|
|
4132
4153
|
)) || [], p = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, u = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0, c = a.touched.validUntil ? a.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
4133
4154
|
return /* @__PURE__ */ i(
|
|
4134
|
-
|
|
4155
|
+
wa,
|
|
4135
4156
|
{
|
|
4136
4157
|
formik: a,
|
|
4137
4158
|
onCancel: o,
|
|
@@ -4163,7 +4184,7 @@ const ba = C.div`
|
|
|
4163
4184
|
termEndStatus: c
|
|
4164
4185
|
}
|
|
4165
4186
|
);
|
|
4166
|
-
},
|
|
4187
|
+
}, El = (e) => {
|
|
4167
4188
|
var o;
|
|
4168
4189
|
const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
|
|
4169
4190
|
(a) => a.switchPlaces
|
|
@@ -4179,7 +4200,7 @@ const ba = C.div`
|
|
|
4179
4200
|
(a) => a.conditionName === r.conditionName ? { ...a, hidden: !0 } : a
|
|
4180
4201
|
)
|
|
4181
4202
|
} : t;
|
|
4182
|
-
},
|
|
4203
|
+
}, Nl = (e) => {
|
|
4183
4204
|
const { decisions: n } = e;
|
|
4184
4205
|
return n == null ? void 0 : n.map((t) => {
|
|
4185
4206
|
var o;
|
|
@@ -4215,7 +4236,7 @@ const ba = C.div`
|
|
|
4215
4236
|
color: E.palette.neutral.N0
|
|
4216
4237
|
}
|
|
4217
4238
|
}
|
|
4218
|
-
},
|
|
4239
|
+
}, Da = C.div`
|
|
4219
4240
|
& > div {
|
|
4220
4241
|
border: 1px solid
|
|
4221
4242
|
${({ theme: e, $active: n }) => {
|
|
@@ -4238,20 +4259,20 @@ const ba = C.div`
|
|
|
4238
4259
|
width: 100%;
|
|
4239
4260
|
outline: none;
|
|
4240
4261
|
cursor: pointer;
|
|
4241
|
-
`,
|
|
4262
|
+
`, Sa = C.div`
|
|
4242
4263
|
display: flex;
|
|
4243
4264
|
align-items: center;
|
|
4244
4265
|
outline: none;
|
|
4245
4266
|
cursor: pointer;
|
|
4246
|
-
`,
|
|
4267
|
+
`, Ea = C(ct)`
|
|
4247
4268
|
display: flex;
|
|
4248
4269
|
align-items: center;
|
|
4249
4270
|
text-decoration: none;
|
|
4250
|
-
`,
|
|
4271
|
+
`, Na = C(ct)`
|
|
4251
4272
|
display: block;
|
|
4252
4273
|
text-decoration: none;
|
|
4253
4274
|
color: inherit;
|
|
4254
|
-
`,
|
|
4275
|
+
`, ka = C.div`
|
|
4255
4276
|
& > div {
|
|
4256
4277
|
border-bottom: 1px solid
|
|
4257
4278
|
${({ theme: e, $active: n }) => {
|
|
@@ -4278,31 +4299,31 @@ const ba = C.div`
|
|
|
4278
4299
|
return ((a = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : a.hover) || Ce.item.background.hover;
|
|
4279
4300
|
}};
|
|
4280
4301
|
}
|
|
4281
|
-
`,
|
|
4302
|
+
`, Aa = C.div`
|
|
4282
4303
|
display: flex;
|
|
4283
4304
|
flex-direction: column;
|
|
4284
4305
|
|
|
4285
4306
|
& > a:last-child ${mt} {
|
|
4286
4307
|
border-radius: 0 0 8px 8px;
|
|
4287
4308
|
}
|
|
4288
|
-
`,
|
|
4309
|
+
`, $a = (e) => {
|
|
4289
4310
|
const { isOpen: n, links: t, onClick: r, title: o, activeId: a, headerPath: s, headerActive: d } = e, l = (h) => {
|
|
4290
4311
|
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), r());
|
|
4291
4312
|
}, p = (h) => {
|
|
4292
4313
|
h.preventDefault(), h.stopPropagation(), r();
|
|
4293
4314
|
}, u = (h) => {
|
|
4294
4315
|
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), h.stopPropagation(), r());
|
|
4295
|
-
}, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f =
|
|
4296
|
-
return /* @__PURE__ */ i(
|
|
4316
|
+
}, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f = P.useId();
|
|
4317
|
+
return /* @__PURE__ */ i(Da, { $active: n, children: /* @__PURE__ */ m(ie, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
4297
4318
|
/* @__PURE__ */ i(
|
|
4298
|
-
|
|
4319
|
+
ka,
|
|
4299
4320
|
{
|
|
4300
4321
|
$active: n && t.length > 0,
|
|
4301
4322
|
"aria-controls": f,
|
|
4302
4323
|
"aria-expanded": n,
|
|
4303
4324
|
onClick: p,
|
|
4304
4325
|
onKeyDown: u,
|
|
4305
|
-
children: s ? /* @__PURE__ */ i(
|
|
4326
|
+
children: s ? /* @__PURE__ */ i(Ea, { to: s, children: /* @__PURE__ */ m(
|
|
4306
4327
|
ie,
|
|
4307
4328
|
{
|
|
4308
4329
|
alignItems: "center",
|
|
@@ -4312,7 +4333,7 @@ const ba = C.div`
|
|
|
4312
4333
|
padding: "12px 8px",
|
|
4313
4334
|
children: [
|
|
4314
4335
|
/* @__PURE__ */ i(
|
|
4315
|
-
|
|
4336
|
+
j,
|
|
4316
4337
|
{
|
|
4317
4338
|
appearance: c,
|
|
4318
4339
|
cursorHover: !0,
|
|
@@ -4320,7 +4341,7 @@ const ba = C.div`
|
|
|
4320
4341
|
}
|
|
4321
4342
|
),
|
|
4322
4343
|
/* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(
|
|
4323
|
-
|
|
4344
|
+
R,
|
|
4324
4345
|
{
|
|
4325
4346
|
appearance: c,
|
|
4326
4347
|
cursorHover: !0,
|
|
@@ -4342,7 +4363,7 @@ const ba = C.div`
|
|
|
4342
4363
|
padding: "12px 8px",
|
|
4343
4364
|
children: [
|
|
4344
4365
|
/* @__PURE__ */ i(
|
|
4345
|
-
|
|
4366
|
+
j,
|
|
4346
4367
|
{
|
|
4347
4368
|
appearance: c,
|
|
4348
4369
|
cursorHover: !0,
|
|
@@ -4350,14 +4371,14 @@ const ba = C.div`
|
|
|
4350
4371
|
}
|
|
4351
4372
|
),
|
|
4352
4373
|
/* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(
|
|
4353
|
-
|
|
4374
|
+
Sa,
|
|
4354
4375
|
{
|
|
4355
4376
|
"aria-controls": f,
|
|
4356
4377
|
"aria-expanded": n,
|
|
4357
4378
|
onClick: r,
|
|
4358
4379
|
onKeyDown: l,
|
|
4359
4380
|
children: /* @__PURE__ */ i(
|
|
4360
|
-
|
|
4381
|
+
R,
|
|
4361
4382
|
{
|
|
4362
4383
|
appearance: c,
|
|
4363
4384
|
cursorHover: !0,
|
|
@@ -4375,9 +4396,9 @@ const ba = C.div`
|
|
|
4375
4396
|
)
|
|
4376
4397
|
}
|
|
4377
4398
|
),
|
|
4378
|
-
n && t.length > 0 && /* @__PURE__ */ i(
|
|
4399
|
+
n && t.length > 0 && /* @__PURE__ */ i(Aa, { id: f, children: t.map((h) => {
|
|
4379
4400
|
const x = h.id === a;
|
|
4380
|
-
return /* @__PURE__ */ i(
|
|
4401
|
+
return /* @__PURE__ */ i(Na, { to: h.path, children: /* @__PURE__ */ i(mt, { $active: x, children: /* @__PURE__ */ m(
|
|
4381
4402
|
y,
|
|
4382
4403
|
{
|
|
4383
4404
|
alignItems: "center",
|
|
@@ -4385,9 +4406,9 @@ const ba = C.div`
|
|
|
4385
4406
|
gap: "8px",
|
|
4386
4407
|
padding: x ? "8px 4px" : "8px 32px",
|
|
4387
4408
|
children: [
|
|
4388
|
-
x && /* @__PURE__ */ i(
|
|
4409
|
+
x && /* @__PURE__ */ i(j, { appearance: "primary", icon: /* @__PURE__ */ i(Vt, {}) }),
|
|
4389
4410
|
/* @__PURE__ */ i(
|
|
4390
|
-
|
|
4411
|
+
R,
|
|
4391
4412
|
{
|
|
4392
4413
|
appearance: x ? "primary" : "dark",
|
|
4393
4414
|
size: "small",
|
|
@@ -4401,7 +4422,7 @@ const ba = C.div`
|
|
|
4401
4422
|
) }) }, h.id);
|
|
4402
4423
|
}) })
|
|
4403
4424
|
] }) });
|
|
4404
|
-
},
|
|
4425
|
+
}, Ia = C.div`
|
|
4405
4426
|
& > div {
|
|
4406
4427
|
background: ${({ $background: e, theme: n }) => {
|
|
4407
4428
|
var t, r, o, a;
|
|
@@ -4409,36 +4430,36 @@ const ba = C.div`
|
|
|
4409
4430
|
}};
|
|
4410
4431
|
}
|
|
4411
4432
|
height: 90vh;
|
|
4412
|
-
`,
|
|
4433
|
+
`, Ra = (e, n) => {
|
|
4413
4434
|
var t;
|
|
4414
4435
|
for (const r of n)
|
|
4415
4436
|
if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
|
|
4416
4437
|
return null;
|
|
4417
|
-
},
|
|
4418
|
-
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Kt(), [a, s] =
|
|
4438
|
+
}, kl = (e) => {
|
|
4439
|
+
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Kt(), [a, s] = P.useState(t), d = P.useRef(o.pathname), l = P.useCallback(
|
|
4419
4440
|
(u) => {
|
|
4420
4441
|
var c;
|
|
4421
4442
|
return (c = u.find((g) => g.path === o.pathname)) == null ? void 0 : c.id;
|
|
4422
4443
|
},
|
|
4423
4444
|
[o.pathname]
|
|
4424
|
-
), p =
|
|
4445
|
+
), p = P.useCallback(
|
|
4425
4446
|
(u) => !!u && (o.pathname === u || o.pathname.startsWith(u + "/")),
|
|
4426
4447
|
[o.pathname]
|
|
4427
4448
|
);
|
|
4428
|
-
return
|
|
4449
|
+
return P.useEffect(() => {
|
|
4429
4450
|
if (!(d.current !== o.pathname)) return;
|
|
4430
4451
|
if (d.current = o.pathname, n) {
|
|
4431
4452
|
s(null);
|
|
4432
4453
|
return;
|
|
4433
4454
|
}
|
|
4434
|
-
const c =
|
|
4455
|
+
const c = Ra(o.pathname, r);
|
|
4435
4456
|
if (c) {
|
|
4436
4457
|
s(c);
|
|
4437
4458
|
return;
|
|
4438
4459
|
}
|
|
4439
4460
|
t && s(t);
|
|
4440
|
-
}, [n, t, r, o.pathname]), /* @__PURE__ */ i(
|
|
4441
|
-
|
|
4461
|
+
}, [n, t, r, o.pathname]), /* @__PURE__ */ i(Ia, { $background: !0, children: /* @__PURE__ */ i(y, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((u) => /* @__PURE__ */ i(
|
|
4462
|
+
$a,
|
|
4442
4463
|
{
|
|
4443
4464
|
activeId: l(u.links),
|
|
4444
4465
|
headerPath: u.path,
|
|
@@ -4469,7 +4490,7 @@ function bt() {
|
|
|
4469
4490
|
}];
|
|
4470
4491
|
}
|
|
4471
4492
|
var [vt, yt] = bt();
|
|
4472
|
-
function
|
|
4493
|
+
function Fa(e, n) {
|
|
4473
4494
|
return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
|
|
4474
4495
|
}
|
|
4475
4496
|
function Ye(e, n, t = !0, r = ["__key"]) {
|
|
@@ -4479,7 +4500,7 @@ function Ye(e, n, t = !0, r = ["__key"]) {
|
|
|
4479
4500
|
if (e instanceof Date && n instanceof Date)
|
|
4480
4501
|
return e.getTime() === n.getTime();
|
|
4481
4502
|
if (e instanceof RegExp && n instanceof RegExp)
|
|
4482
|
-
return
|
|
4503
|
+
return Fa(e, n);
|
|
4483
4504
|
if (e === null || n === null) return !1;
|
|
4484
4505
|
const o = e, a = n;
|
|
4485
4506
|
if (Object.keys(o).length !== Object.keys(a).length) return !1;
|
|
@@ -4494,19 +4515,19 @@ function Ye(e, n, t = !0, r = ["__key"]) {
|
|
|
4494
4515
|
function xt(e) {
|
|
4495
4516
|
return e.split(" ").filter((n) => n);
|
|
4496
4517
|
}
|
|
4497
|
-
function
|
|
4518
|
+
function _e(e) {
|
|
4498
4519
|
return { x: e.clientX, y: e.clientY };
|
|
4499
4520
|
}
|
|
4500
4521
|
Array();
|
|
4501
|
-
var
|
|
4522
|
+
var Mn = typeof window < "u", Y = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap();
|
|
4502
4523
|
function Tt() {
|
|
4503
|
-
if (!
|
|
4524
|
+
if (!Mn) return !1;
|
|
4504
4525
|
if ("userAgentData" in navigator)
|
|
4505
4526
|
return navigator.userAgentData.mobile === !0;
|
|
4506
4527
|
const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
4507
4528
|
return n || t;
|
|
4508
4529
|
}
|
|
4509
|
-
var
|
|
4530
|
+
var La = {
|
|
4510
4531
|
affectedNodes: [],
|
|
4511
4532
|
coordinates: {
|
|
4512
4533
|
x: 0,
|
|
@@ -4540,8 +4561,8 @@ var Fa = {
|
|
|
4540
4561
|
scrollDebounceTimeout: void 0,
|
|
4541
4562
|
frameIdX: void 0,
|
|
4542
4563
|
frameIdY: void 0
|
|
4543
|
-
}, v =
|
|
4544
|
-
function
|
|
4564
|
+
}, v = La, Se = !1, Qn, xn;
|
|
4565
|
+
function Oa() {
|
|
4545
4566
|
v.scrollDebounceTimeout && clearTimeout(v.scrollDebounceTimeout), v.longPressTimeout && clearTimeout(v.longPressTimeout), v.frameIdX !== void 0 && cancelAnimationFrame(v.frameIdX), v.frameIdY !== void 0 && cancelAnimationFrame(v.frameIdY), v = { ...{
|
|
4546
4567
|
affectedNodes: [],
|
|
4547
4568
|
coordinates: {
|
|
@@ -4585,7 +4606,7 @@ function La() {
|
|
|
4585
4606
|
function wt(e) {
|
|
4586
4607
|
return Object.assign(v, e), e.initialParent.data.emit("dragStarted", v), Se = !1, v.emit("dragStarted", v), v;
|
|
4587
4608
|
}
|
|
4588
|
-
function
|
|
4609
|
+
function Ma() {
|
|
4589
4610
|
v.activeState && Ie(v.activeState.parent, void 0, v), v.selectedState && Ae(v.selectedState.nodes, v.selectedState.parent, v), v.selectedState = v.activeState = void 0;
|
|
4590
4611
|
}
|
|
4591
4612
|
function Pa() {
|
|
@@ -4593,22 +4614,22 @@ function Pa() {
|
|
|
4593
4614
|
const e = v.currentParent.data.config;
|
|
4594
4615
|
oe(v) && e.handleEnd(v);
|
|
4595
4616
|
}
|
|
4596
|
-
function
|
|
4617
|
+
function za(e) {
|
|
4597
4618
|
e.key === "Escape" && (v.selectedState && Ae(v.selectedState.nodes, v.selectedState.parent, v), v.activeState && Ie(v.activeState.parent, void 0, v), v.selectedState = v.activeState = void 0);
|
|
4598
4619
|
}
|
|
4599
|
-
function
|
|
4620
|
+
function Va(e) {
|
|
4600
4621
|
if (!X(v)) return;
|
|
4601
4622
|
Se = !0;
|
|
4602
4623
|
const n = v.initialParent.data.config.handleEnd;
|
|
4603
4624
|
n(v);
|
|
4604
4625
|
}
|
|
4605
|
-
function
|
|
4626
|
+
function _a(e) {
|
|
4606
4627
|
if (!X(v)) return;
|
|
4607
4628
|
W(e);
|
|
4608
|
-
const { x: n, y: t } =
|
|
4629
|
+
const { x: n, y: t } = _e(e);
|
|
4609
4630
|
X(v) && fn({ x: n, y: t }, e, v);
|
|
4610
4631
|
}
|
|
4611
|
-
function
|
|
4632
|
+
function Ua(e) {
|
|
4612
4633
|
if (!v.pointerDown || !v.pointerDown.validated) return;
|
|
4613
4634
|
const n = v.pointerDown.parent.data.config;
|
|
4614
4635
|
if (!(e.pointerType === "mouse" && !Tt()))
|
|
@@ -4621,7 +4642,7 @@ function ja(e) {
|
|
|
4621
4642
|
}
|
|
4622
4643
|
const t = n.draggedNodes(v.pointerDown);
|
|
4623
4644
|
n.dragstartClasses(v.pointerDown.node, t, n, !0);
|
|
4624
|
-
const r = v.pointerDown.node.el.getBoundingClientRect(), o =
|
|
4645
|
+
const r = v.pointerDown.node.el.getBoundingClientRect(), o = mi(
|
|
4625
4646
|
v.pointerDown.node,
|
|
4626
4647
|
v.pointerDown.parent,
|
|
4627
4648
|
e,
|
|
@@ -4632,21 +4653,21 @@ function ja(e) {
|
|
|
4632
4653
|
Zn(e, o, !0);
|
|
4633
4654
|
}
|
|
4634
4655
|
}
|
|
4635
|
-
function
|
|
4656
|
+
function ja({
|
|
4636
4657
|
parent: e,
|
|
4637
4658
|
getValues: n,
|
|
4638
4659
|
setValues: t,
|
|
4639
4660
|
config: r = {}
|
|
4640
4661
|
}) {
|
|
4641
4662
|
var l, p, u;
|
|
4642
|
-
if (!
|
|
4663
|
+
if (!Mn) return;
|
|
4643
4664
|
Qn || (Qn = an(document, {
|
|
4644
|
-
dragover:
|
|
4645
|
-
pointerdown:
|
|
4665
|
+
dragover: _a,
|
|
4666
|
+
pointerdown: Ma,
|
|
4646
4667
|
pointerup: Pa,
|
|
4647
|
-
keydown:
|
|
4648
|
-
drop:
|
|
4649
|
-
pointermove:
|
|
4668
|
+
keydown: za,
|
|
4669
|
+
drop: Va,
|
|
4670
|
+
pointermove: Ua,
|
|
4650
4671
|
pointercancel: J(r.handlePointercancel),
|
|
4651
4672
|
touchmove: (c) => {
|
|
4652
4673
|
X(v) && c.cancelable && W(c);
|
|
@@ -4661,38 +4682,38 @@ function Ua({
|
|
|
4661
4682
|
config: {
|
|
4662
4683
|
dragDropEffect: r.dragDropEffect ?? "move",
|
|
4663
4684
|
dragEffectAllowed: r.dragEffectAllowed ?? "move",
|
|
4664
|
-
draggedNodes:
|
|
4665
|
-
dragstartClasses:
|
|
4666
|
-
handleNodeKeydown:
|
|
4667
|
-
handleDragstart:
|
|
4668
|
-
handleNodeDragover:
|
|
4669
|
-
handleParentDragover:
|
|
4670
|
-
handleNodeDrop:
|
|
4671
|
-
handleNodeFocus:
|
|
4672
|
-
handleNodeBlur:
|
|
4673
|
-
handlePointercancel:
|
|
4674
|
-
handleEnd:
|
|
4675
|
-
handleDragend:
|
|
4676
|
-
handleParentFocus:
|
|
4677
|
-
handleNodePointerup:
|
|
4678
|
-
handleNodePointerover:
|
|
4679
|
-
handleParentPointerover:
|
|
4680
|
-
handleParentScroll:
|
|
4681
|
-
handleNodePointerdown:
|
|
4682
|
-
handleNodeDragenter:
|
|
4683
|
-
handleNodeDragleave:
|
|
4684
|
-
handleParentDrop:
|
|
4685
|
+
draggedNodes: ni,
|
|
4686
|
+
dragstartClasses: ai,
|
|
4687
|
+
handleNodeKeydown: li,
|
|
4688
|
+
handleDragstart: ri,
|
|
4689
|
+
handleNodeDragover: vi,
|
|
4690
|
+
handleParentDragover: yi,
|
|
4691
|
+
handleNodeDrop: di,
|
|
4692
|
+
handleNodeFocus: ci,
|
|
4693
|
+
handleNodeBlur: ui,
|
|
4694
|
+
handlePointercancel: gi,
|
|
4695
|
+
handleEnd: hi,
|
|
4696
|
+
handleDragend: pi,
|
|
4697
|
+
handleParentFocus: qa,
|
|
4698
|
+
handleNodePointerup: fi,
|
|
4699
|
+
handleNodePointerover: si,
|
|
4700
|
+
handleParentPointerover: xi,
|
|
4701
|
+
handleParentScroll: ti,
|
|
4702
|
+
handleNodePointerdown: oi,
|
|
4703
|
+
handleNodeDragenter: wi,
|
|
4704
|
+
handleNodeDragleave: Ci,
|
|
4705
|
+
handleParentDrop: Ga,
|
|
4685
4706
|
multiDrag: r.multiDrag ?? !1,
|
|
4686
4707
|
nativeDrag: r.nativeDrag ?? !0,
|
|
4687
|
-
performSort:
|
|
4688
|
-
performTransfer:
|
|
4708
|
+
performSort: Ha,
|
|
4709
|
+
performTransfer: Ba,
|
|
4689
4710
|
root: r.root ?? document,
|
|
4690
|
-
setupNode:
|
|
4711
|
+
setupNode: Wa,
|
|
4691
4712
|
setupNodeRemap: St,
|
|
4692
|
-
reapplyDragClasses:
|
|
4693
|
-
tearDownNode:
|
|
4694
|
-
tearDownNodeRemap:
|
|
4695
|
-
remapFinished:
|
|
4713
|
+
reapplyDragClasses: Xa,
|
|
4714
|
+
tearDownNode: Za,
|
|
4715
|
+
tearDownNodeRemap: Qa,
|
|
4716
|
+
remapFinished: Ja,
|
|
4696
4717
|
threshold: {
|
|
4697
4718
|
horizontal: 0,
|
|
4698
4719
|
vertical: 0
|
|
@@ -4705,7 +4726,7 @@ function Ua({
|
|
|
4705
4726
|
on: a,
|
|
4706
4727
|
emit: o
|
|
4707
4728
|
};
|
|
4708
|
-
new MutationObserver(
|
|
4729
|
+
new MutationObserver(Ka).observe(e, { childList: !0 }), Y.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
|
|
4709
4730
|
var g, f;
|
|
4710
4731
|
(f = (g = c(e)) == null ? void 0 : g.tearDown) == null || f.call(g);
|
|
4711
4732
|
}), (p = r.plugins) == null || p.forEach((c) => {
|
|
@@ -4714,10 +4735,10 @@ function Ua({
|
|
|
4714
4735
|
}), (u = r.plugins) == null || u.forEach((c) => {
|
|
4715
4736
|
var g, f;
|
|
4716
4737
|
(f = (g = c(e)) == null ? void 0 : g.setup) == null || f.call(g);
|
|
4717
|
-
}),
|
|
4738
|
+
}), Ya(e, s), gn(e, !0);
|
|
4718
4739
|
}
|
|
4719
4740
|
function Ct(e, n, t, r, o, a) {
|
|
4720
|
-
const { x: s, y: d } =
|
|
4741
|
+
const { x: s, y: d } = _e(t), l = e.el.getBoundingClientRect();
|
|
4721
4742
|
return {
|
|
4722
4743
|
affectedNodes: [],
|
|
4723
4744
|
ascendingDirection: !1,
|
|
@@ -4751,7 +4772,7 @@ function Ct(e, n, t, r, o, a) {
|
|
|
4751
4772
|
transferred: !1
|
|
4752
4773
|
};
|
|
4753
4774
|
}
|
|
4754
|
-
function
|
|
4775
|
+
function Ha({
|
|
4755
4776
|
parent: e,
|
|
4756
4777
|
draggedNodes: n,
|
|
4757
4778
|
targetNodes: t
|
|
@@ -4809,11 +4830,11 @@ function en(e, n, t, r, o = !1) {
|
|
|
4809
4830
|
parent: e
|
|
4810
4831
|
}, Ie(e, t, r);
|
|
4811
4832
|
}
|
|
4812
|
-
function
|
|
4833
|
+
function qa(e, n) {
|
|
4813
4834
|
const t = e.targetData.parent.data.enabledNodes[0];
|
|
4814
4835
|
t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? Ie(e.targetData.parent, t, n) : n.selectedState || Ie(e.targetData.parent, t, n));
|
|
4815
4836
|
}
|
|
4816
|
-
function
|
|
4837
|
+
function Ba({
|
|
4817
4838
|
currentParent: e,
|
|
4818
4839
|
targetParent: n,
|
|
4819
4840
|
initialParent: t,
|
|
@@ -4853,7 +4874,7 @@ function ze(e, n) {
|
|
|
4853
4874
|
function Nn(e, n, t) {
|
|
4854
4875
|
n.setValues(t, e);
|
|
4855
4876
|
}
|
|
4856
|
-
function
|
|
4877
|
+
function Ga(e, n) {
|
|
4857
4878
|
Ee(e.e), Se = !0;
|
|
4858
4879
|
const t = n.initialParent.data.config.handleEnd;
|
|
4859
4880
|
t(n);
|
|
@@ -4868,7 +4889,7 @@ function X(e) {
|
|
|
4868
4889
|
function oe(e) {
|
|
4869
4890
|
return "synthDragging" in e && !!e.synthDragging;
|
|
4870
4891
|
}
|
|
4871
|
-
function
|
|
4892
|
+
function Ya(e, n) {
|
|
4872
4893
|
n.abortControllers.mainParent = an(e, {
|
|
4873
4894
|
dragover: nn(n.config.handleParentDragover),
|
|
4874
4895
|
handleParentPointerover: n.config.handleParentPointerover,
|
|
@@ -4912,7 +4933,7 @@ function Ga(e, n) {
|
|
|
4912
4933
|
}
|
|
4913
4934
|
));
|
|
4914
4935
|
}
|
|
4915
|
-
function
|
|
4936
|
+
function Wa(e) {
|
|
4916
4937
|
var t;
|
|
4917
4938
|
const n = e.parent.data.config;
|
|
4918
4939
|
e.node.data.abortControllers.mainNode = an(e.node.el, {
|
|
@@ -4947,26 +4968,26 @@ function St(e) {
|
|
|
4947
4968
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
|
|
4948
4969
|
});
|
|
4949
4970
|
}
|
|
4950
|
-
function
|
|
4971
|
+
function Xa(e, n) {
|
|
4951
4972
|
if (!X(v)) return;
|
|
4952
4973
|
const t = oe(v) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
|
|
4953
4974
|
v.draggedNode.el === e && Le([e], t, !0);
|
|
4954
4975
|
}
|
|
4955
|
-
function
|
|
4976
|
+
function Qa(e) {
|
|
4956
4977
|
var n;
|
|
4957
4978
|
(n = e.parent.data.config.plugins) == null || n.forEach((t) => {
|
|
4958
4979
|
var r, o;
|
|
4959
4980
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.tearDownNodeRemap) == null || o.call(r, e);
|
|
4960
4981
|
});
|
|
4961
4982
|
}
|
|
4962
|
-
function
|
|
4983
|
+
function Za(e) {
|
|
4963
4984
|
var n, t, r, o, a;
|
|
4964
4985
|
(n = e.parent.data.config.plugins) == null || n.forEach((s) => {
|
|
4965
4986
|
var d, l;
|
|
4966
4987
|
(l = (d = s(e.parent.el)) == null ? void 0 : d.tearDownNode) == null || l.call(d, e);
|
|
4967
4988
|
}), e.node.el.draggable = !1, (r = (t = e.node.data) == null ? void 0 : t.abortControllers) != null && r.mainNode && ((a = (o = e.node.data) == null ? void 0 : o.abortControllers) == null || a.mainNode.abort());
|
|
4968
4989
|
}
|
|
4969
|
-
function
|
|
4990
|
+
function Ka(e) {
|
|
4970
4991
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
4971
4992
|
return;
|
|
4972
4993
|
const n = e[0].target;
|
|
@@ -5058,13 +5079,13 @@ function gn(e, n) {
|
|
|
5058
5079
|
(u = (p = l(e)) == null ? void 0 : p.remapFinished) == null || u.call(p);
|
|
5059
5080
|
});
|
|
5060
5081
|
}
|
|
5061
|
-
function
|
|
5082
|
+
function Ja() {
|
|
5062
5083
|
v.remapJustFinished = !0, "draggedNode" in v && (v.affectedNodes = []);
|
|
5063
5084
|
}
|
|
5064
|
-
function
|
|
5085
|
+
function ei(e) {
|
|
5065
5086
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
5066
5087
|
}
|
|
5067
|
-
function
|
|
5088
|
+
function ni(e) {
|
|
5068
5089
|
var n;
|
|
5069
5090
|
if (e.parent.data.config.multiDrag) {
|
|
5070
5091
|
if (v.selectedState)
|
|
@@ -5077,14 +5098,14 @@ function ei(e) {
|
|
|
5077
5098
|
} else return [e.node];
|
|
5078
5099
|
return [];
|
|
5079
5100
|
}
|
|
5080
|
-
function
|
|
5101
|
+
function ti(e) {
|
|
5081
5102
|
X(v) && (v.emit("scrollStarted", v), !oe(v) && (v.preventEnter = !0, xn && clearTimeout(xn), xn = setTimeout(() => {
|
|
5082
5103
|
v.preventEnter = !1, v.emit("scrollEnded", v);
|
|
5083
5104
|
}, 100)));
|
|
5084
5105
|
}
|
|
5085
|
-
function
|
|
5106
|
+
function ri(e, n) {
|
|
5086
5107
|
const t = e.targetData.parent.data.config;
|
|
5087
|
-
if (!t.nativeDrag || !
|
|
5108
|
+
if (!t.nativeDrag || !ei(e) || !Et({
|
|
5088
5109
|
x: e.e.clientX,
|
|
5089
5110
|
y: e.e.clientY,
|
|
5090
5111
|
node: e.targetData.node,
|
|
@@ -5098,7 +5119,7 @@ function ti(e, n) {
|
|
|
5098
5119
|
node: e.targetData.node
|
|
5099
5120
|
});
|
|
5100
5121
|
r.length === 0 && (r = [e.targetData.node]), t.dragstartClasses(e.targetData.node, r, t);
|
|
5101
|
-
const o =
|
|
5122
|
+
const o = ii(e, r);
|
|
5102
5123
|
if (t.onDragstart) {
|
|
5103
5124
|
const a = {
|
|
5104
5125
|
parent: e.targetData.parent,
|
|
@@ -5114,7 +5135,7 @@ function ti(e, n) {
|
|
|
5114
5135
|
t.onDragstart(a);
|
|
5115
5136
|
}
|
|
5116
5137
|
}
|
|
5117
|
-
function
|
|
5138
|
+
function oi(e, n) {
|
|
5118
5139
|
var d, l;
|
|
5119
5140
|
if (Ee(e.e), n.pointerDown = {
|
|
5120
5141
|
parent: e.targetData.parent,
|
|
@@ -5127,7 +5148,7 @@ function ri(e, n) {
|
|
|
5127
5148
|
config: e.targetData.parent.data.config
|
|
5128
5149
|
}))
|
|
5129
5150
|
return;
|
|
5130
|
-
n.pointerDown.validated = !0,
|
|
5151
|
+
n.pointerDown.validated = !0, bi(e, n, e.targetData.node);
|
|
5131
5152
|
const t = e.targetData.parent.data;
|
|
5132
5153
|
let r = [e.targetData.node];
|
|
5133
5154
|
const o = e.e.ctrlKey || e.e.metaKey, a = e.e.shiftKey, s = e.targetData.node;
|
|
@@ -5190,7 +5211,7 @@ function ri(e, n) {
|
|
|
5190
5211
|
!0
|
|
5191
5212
|
);
|
|
5192
5213
|
}
|
|
5193
|
-
function
|
|
5214
|
+
function ai(e, n, t, r = !1) {
|
|
5194
5215
|
Le(
|
|
5195
5216
|
n.map((o) => o.el),
|
|
5196
5217
|
r ? t.synthDraggingClass : t.draggingClass
|
|
@@ -5210,7 +5231,7 @@ function oi(e, n, t, r = !1) {
|
|
|
5210
5231
|
);
|
|
5211
5232
|
});
|
|
5212
5233
|
}
|
|
5213
|
-
function
|
|
5234
|
+
function ii(e, n) {
|
|
5214
5235
|
Ee(e.e);
|
|
5215
5236
|
const t = wt(
|
|
5216
5237
|
Ct(
|
|
@@ -5281,22 +5302,22 @@ function Et({
|
|
|
5281
5302
|
if (a === s || s.contains(a)) return !0;
|
|
5282
5303
|
return !1;
|
|
5283
5304
|
}
|
|
5284
|
-
function ii(e) {
|
|
5285
|
-
}
|
|
5286
5305
|
function li(e) {
|
|
5306
|
+
}
|
|
5307
|
+
function si(e) {
|
|
5287
5308
|
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) : hn(e.detail, e.detail.state);
|
|
5288
5309
|
}
|
|
5289
|
-
function
|
|
5310
|
+
function di(e, n) {
|
|
5290
5311
|
const t = e.targetData.parent.data.config;
|
|
5291
5312
|
t.nativeDrag && (Ee(e.e), Se = !0, t.handleEnd(n));
|
|
5292
5313
|
}
|
|
5293
|
-
function
|
|
5314
|
+
function ci(e) {
|
|
5294
5315
|
e.e.target !== e.e.currentTarget && v.pointerDown && (v.pointerDown.node.el.draggable = !1);
|
|
5295
5316
|
}
|
|
5296
|
-
function
|
|
5317
|
+
function ui(e) {
|
|
5297
5318
|
e.e.target !== e.e.currentTarget && v.pointerDown && (v.pointerDown.node.el.draggable = !0);
|
|
5298
5319
|
}
|
|
5299
|
-
function
|
|
5320
|
+
function pi(e, n) {
|
|
5300
5321
|
const t = e.targetData.parent.data.config;
|
|
5301
5322
|
if (t.nativeDrag) {
|
|
5302
5323
|
if (W(e.e), Ee(e.e), Se) {
|
|
@@ -5306,7 +5327,7 @@ function ui(e, n) {
|
|
|
5306
5327
|
t.handleEnd(n);
|
|
5307
5328
|
}
|
|
5308
5329
|
}
|
|
5309
|
-
function
|
|
5330
|
+
function gi(e, n) {
|
|
5310
5331
|
var r;
|
|
5311
5332
|
if (!oe(n)) return;
|
|
5312
5333
|
if (W(e.e), Se) {
|
|
@@ -5322,7 +5343,7 @@ function pi(e, n) {
|
|
|
5322
5343
|
state: n
|
|
5323
5344
|
}), t == null || t.handleEnd(n);
|
|
5324
5345
|
}
|
|
5325
|
-
function
|
|
5346
|
+
function hi(e) {
|
|
5326
5347
|
var u, c, g, f, h;
|
|
5327
5348
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
5328
5349
|
const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = oe(e), o = (u = Y.get(e.initialParent.el)) == null ? void 0 : u.config, a = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, s = (c = t == null ? void 0 : t.config) == null ? void 0 : c.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (f = t == null ? void 0 : t.config) == null ? void 0 : f.dragPlaceholderClass, l = e.originalZIndex;
|
|
@@ -5339,9 +5360,9 @@ function gi(e) {
|
|
|
5339
5360
|
draggedNode: p.draggedNode,
|
|
5340
5361
|
draggedNodes: p.draggedNodes,
|
|
5341
5362
|
state: p
|
|
5342
|
-
}), e.emit("dragEnded", p),
|
|
5363
|
+
}), e.emit("dragEnded", p), Oa();
|
|
5343
5364
|
}
|
|
5344
|
-
function
|
|
5365
|
+
function fi(e, n) {
|
|
5345
5366
|
Ee(e.e), !n.pointerSelection && n.selectedState && Ae(n.selectedState.nodes, e.targetData.parent, n);
|
|
5346
5367
|
const t = e.targetData.parent.data.config;
|
|
5347
5368
|
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, De(
|
|
@@ -5349,7 +5370,7 @@ function hi(e, n) {
|
|
|
5349
5370
|
t.longPressClass
|
|
5350
5371
|
), X(n) && t.handleEnd(n);
|
|
5351
5372
|
}
|
|
5352
|
-
function
|
|
5373
|
+
function mi(e, n, t, r, o, a) {
|
|
5353
5374
|
var h, x;
|
|
5354
5375
|
const s = n.data.config;
|
|
5355
5376
|
let d, l;
|
|
@@ -5432,7 +5453,7 @@ function fi(e, n, t, r, o, a) {
|
|
|
5432
5453
|
...g
|
|
5433
5454
|
});
|
|
5434
5455
|
}
|
|
5435
|
-
function
|
|
5456
|
+
function bi(e, n, t) {
|
|
5436
5457
|
const r = e.targetData.parent.data.config;
|
|
5437
5458
|
n.longPressTimeout = setTimeout(() => {
|
|
5438
5459
|
n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Le([t.el], r.longPressClass), W(e.e));
|
|
@@ -5450,11 +5471,11 @@ function Nt(e, n = !1) {
|
|
|
5450
5471
|
));
|
|
5451
5472
|
}
|
|
5452
5473
|
function Zn(e, n, t = !1) {
|
|
5453
|
-
const r =
|
|
5474
|
+
const r = _e(e);
|
|
5454
5475
|
n.coordinates.x = r.x, n.coordinates.y = r.y, Nt(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
|
|
5455
5476
|
oe(n) && fn(n.coordinates, e, n);
|
|
5456
5477
|
}, 16);
|
|
5457
|
-
const o =
|
|
5478
|
+
const o = Ni(r);
|
|
5458
5479
|
if (!o) {
|
|
5459
5480
|
document.dispatchEvent(
|
|
5460
5481
|
new CustomEvent("handleRootPointerover", {
|
|
@@ -5481,22 +5502,22 @@ function Zn(e, n, t = !1) {
|
|
|
5481
5502
|
})
|
|
5482
5503
|
);
|
|
5483
5504
|
}
|
|
5484
|
-
function
|
|
5505
|
+
function vi(e, n) {
|
|
5485
5506
|
var a;
|
|
5486
5507
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5487
|
-
const { x: r, y: o } =
|
|
5508
|
+
const { x: r, y: o } = _e(e.e);
|
|
5488
5509
|
n.coordinates.y = o, n.coordinates.x = r, W(e.e), Ee(e.e), X(n) && fn({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((a = n.currentParent) == null ? void 0 : a.el) ? kt(e, n) : hn(e, n);
|
|
5489
5510
|
}
|
|
5490
|
-
function
|
|
5511
|
+
function yi(e, n) {
|
|
5491
5512
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5492
5513
|
W(e.e), Ee(e.e);
|
|
5493
|
-
const { x: r, y: o } =
|
|
5514
|
+
const { x: r, y: o } = _e(e.e);
|
|
5494
5515
|
X(n) && fn({ x: r, y: o }, e.e, n), hn(e, n);
|
|
5495
5516
|
}
|
|
5496
|
-
function
|
|
5517
|
+
function xi(e) {
|
|
5497
5518
|
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && hn(e.detail, e.detail.state);
|
|
5498
5519
|
}
|
|
5499
|
-
function
|
|
5520
|
+
function Ti({
|
|
5500
5521
|
currentParent: e,
|
|
5501
5522
|
targetParent: n,
|
|
5502
5523
|
initialParent: t,
|
|
@@ -5514,13 +5535,13 @@ function xi({
|
|
|
5514
5535
|
o
|
|
5515
5536
|
) : !(!a.group || a.group !== s.group);
|
|
5516
5537
|
}
|
|
5517
|
-
function
|
|
5538
|
+
function wi(e, n) {
|
|
5518
5539
|
W(e.e);
|
|
5519
5540
|
}
|
|
5520
|
-
function
|
|
5541
|
+
function Ci(e, n) {
|
|
5521
5542
|
W(e.e);
|
|
5522
5543
|
}
|
|
5523
|
-
function
|
|
5544
|
+
function Di(e, n, t, r) {
|
|
5524
5545
|
var u;
|
|
5525
5546
|
if (n.affectedNodes.map((c) => c.data.value).includes(e.targetData.node.data.value))
|
|
5526
5547
|
return !1;
|
|
@@ -5555,8 +5576,8 @@ function Ci(e, n, t, r) {
|
|
|
5555
5576
|
return !1;
|
|
5556
5577
|
}
|
|
5557
5578
|
function kt(e, n) {
|
|
5558
|
-
const { x: t, y: r } =
|
|
5559
|
-
if (!
|
|
5579
|
+
const { x: t, y: r } = _e(e.e);
|
|
5580
|
+
if (!Di(e, n, t, r))
|
|
5560
5581
|
return;
|
|
5561
5582
|
const o = n.draggedNode.data.index > e.targetData.node.data.index ? [e.targetData.node.data.index, n.draggedNode.data.index] : [n.draggedNode.data.index, e.targetData.node.data.index];
|
|
5562
5583
|
n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
|
|
@@ -5597,7 +5618,7 @@ function J(e) {
|
|
|
5597
5618
|
};
|
|
5598
5619
|
}
|
|
5599
5620
|
function hn(e, n) {
|
|
5600
|
-
W(e.e),
|
|
5621
|
+
W(e.e), Ti({
|
|
5601
5622
|
currentParent: n.currentParent,
|
|
5602
5623
|
targetParent: e.targetData.parent,
|
|
5603
5624
|
initialParent: n.initialParent,
|
|
@@ -5641,11 +5662,11 @@ function Le(e, n, t = !1) {
|
|
|
5641
5662
|
he.set(o, a);
|
|
5642
5663
|
}
|
|
5643
5664
|
for (const o of e) {
|
|
5644
|
-
const a = he.get(o), s =
|
|
5665
|
+
const a = he.get(o), s = Si(o, n, a, t);
|
|
5645
5666
|
s && r(o, s);
|
|
5646
5667
|
}
|
|
5647
5668
|
}
|
|
5648
|
-
function
|
|
5669
|
+
function Si(e, n, t, r = !1) {
|
|
5649
5670
|
if (!n) return;
|
|
5650
5671
|
const o = xt(n);
|
|
5651
5672
|
if (!o.length) return;
|
|
@@ -5701,7 +5722,7 @@ function Kn(e, n, t, r, o) {
|
|
|
5701
5722
|
}
|
|
5702
5723
|
return s ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
5703
5724
|
}
|
|
5704
|
-
function
|
|
5725
|
+
function Ei(e, n, t, r) {
|
|
5705
5726
|
if (!X(t) || !t.draggedNode)
|
|
5706
5727
|
return;
|
|
5707
5728
|
t.preventEnter = !0;
|
|
@@ -5732,7 +5753,7 @@ function fn(e, n, t) {
|
|
|
5732
5753
|
const { x: r, y: o } = e;
|
|
5733
5754
|
let a = !1;
|
|
5734
5755
|
const s = (l, p, u) => {
|
|
5735
|
-
|
|
5756
|
+
Ei(u, n, t, { axis: l, direction: p }), a = !0;
|
|
5736
5757
|
}, d = (l) => {
|
|
5737
5758
|
const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Kn(l, n, p, u, {
|
|
5738
5759
|
axis: "x",
|
|
@@ -5751,7 +5772,7 @@ function fn(e, n, t) {
|
|
|
5751
5772
|
}
|
|
5752
5773
|
a || kn(t);
|
|
5753
5774
|
}
|
|
5754
|
-
function
|
|
5775
|
+
function Ni(e) {
|
|
5755
5776
|
let n = document.elementFromPoint(e.x, e.y);
|
|
5756
5777
|
if (!mn(n)) return;
|
|
5757
5778
|
let t, r = !0;
|
|
@@ -5801,38 +5822,38 @@ function an(e, n) {
|
|
|
5801
5822
|
}
|
|
5802
5823
|
return t;
|
|
5803
5824
|
}
|
|
5804
|
-
function
|
|
5825
|
+
function ki(e) {
|
|
5805
5826
|
if (e instanceof HTMLElement) return e;
|
|
5806
5827
|
if ("current" in e && e.current instanceof HTMLElement)
|
|
5807
5828
|
return e.current;
|
|
5808
5829
|
console.warn("Invalid parent element", e);
|
|
5809
5830
|
}
|
|
5810
|
-
function
|
|
5811
|
-
const t =
|
|
5831
|
+
function Ai(e, n) {
|
|
5832
|
+
const t = ki(e);
|
|
5812
5833
|
t && n(t);
|
|
5813
5834
|
}
|
|
5814
5835
|
var ln = /* @__PURE__ */ new WeakMap();
|
|
5815
|
-
function
|
|
5836
|
+
function $i(e) {
|
|
5816
5837
|
const n = ln.get(e);
|
|
5817
5838
|
return n ? n[0] : (console.warn("No values found for parent element"), []);
|
|
5818
5839
|
}
|
|
5819
|
-
function
|
|
5840
|
+
function Ii(e, n) {
|
|
5820
5841
|
const t = ln.get(n);
|
|
5821
5842
|
t && t[1](e), ln.set(n, [e, t[1]]);
|
|
5822
5843
|
}
|
|
5823
|
-
function
|
|
5844
|
+
function Ri(e, n) {
|
|
5824
5845
|
return (t) => {
|
|
5825
|
-
ln.set(t, n),
|
|
5846
|
+
ln.set(t, n), ja({ parent: t, getValues: $i, setValues: Ii, config: e });
|
|
5826
5847
|
};
|
|
5827
5848
|
}
|
|
5828
5849
|
function et(e) {
|
|
5829
|
-
|
|
5850
|
+
Mn && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
|
|
5830
5851
|
const { parent: t, state: r, ...o } = n;
|
|
5831
|
-
|
|
5852
|
+
Ai(t, Ri(o, r));
|
|
5832
5853
|
}));
|
|
5833
5854
|
}
|
|
5834
|
-
function
|
|
5835
|
-
const t = Fe(null), [r, o] =
|
|
5855
|
+
function Fi(e, n = {}) {
|
|
5856
|
+
const t = Fe(null), [r, o] = H(e);
|
|
5836
5857
|
function a(s = {}) {
|
|
5837
5858
|
et({ parent: t, state: [r, o], ...s });
|
|
5838
5859
|
}
|
|
@@ -5851,7 +5872,7 @@ const nt = {
|
|
|
5851
5872
|
color: E.palette.neutral.N40
|
|
5852
5873
|
}
|
|
5853
5874
|
}
|
|
5854
|
-
},
|
|
5875
|
+
}, Li = C.ul`
|
|
5855
5876
|
list-style: none;
|
|
5856
5877
|
padding: 0;
|
|
5857
5878
|
margin: 0;
|
|
@@ -5860,7 +5881,7 @@ const nt = {
|
|
|
5860
5881
|
gap: 12px;
|
|
5861
5882
|
width: 100%;
|
|
5862
5883
|
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
5863
|
-
`,
|
|
5884
|
+
`, Oi = C.li`
|
|
5864
5885
|
& > div {
|
|
5865
5886
|
border: 1px solid
|
|
5866
5887
|
${({ theme: e, $active: n }) => {
|
|
@@ -5878,57 +5899,57 @@ const nt = {
|
|
|
5878
5899
|
highlightFirst: s,
|
|
5879
5900
|
onMove: d,
|
|
5880
5901
|
locked: l = !1
|
|
5881
|
-
} = e, p =
|
|
5902
|
+
} = e, p = P.useRef(null), u = l ? [p, a] : Fi(a, { group: r }), [c, g] = u, [f, h] = P.useState(
|
|
5882
5903
|
null
|
|
5883
|
-
), x =
|
|
5884
|
-
|
|
5904
|
+
), x = P.useRef(a);
|
|
5905
|
+
P.useEffect(() => {
|
|
5885
5906
|
if (l) return;
|
|
5886
5907
|
const N = (w) => {
|
|
5887
|
-
const
|
|
5888
|
-
h(
|
|
5908
|
+
const F = w.detail ?? null;
|
|
5909
|
+
h(F);
|
|
5889
5910
|
};
|
|
5890
5911
|
return window.addEventListener(Tn, N), () => window.removeEventListener(Tn, N);
|
|
5891
5912
|
}, [l]);
|
|
5892
|
-
const b =
|
|
5913
|
+
const b = P.useCallback((N) => {
|
|
5893
5914
|
l || window.dispatchEvent(
|
|
5894
5915
|
new CustomEvent(Tn, { detail: N })
|
|
5895
5916
|
);
|
|
5896
5917
|
}, [l]), D = (N) => {
|
|
5897
|
-
var
|
|
5918
|
+
var $;
|
|
5898
5919
|
if (l) return;
|
|
5899
|
-
const w = N.target,
|
|
5900
|
-
|
|
5901
|
-
}, T =
|
|
5920
|
+
const w = N.target, F = ($ = w == null ? void 0 : w.closest) == null ? void 0 : $.call(w, "li.dnd-item"), O = (F == null ? void 0 : F.getAttribute("data-label")) || null;
|
|
5921
|
+
O && (h(O), b(O));
|
|
5922
|
+
}, T = P.useCallback(() => {
|
|
5902
5923
|
l || (h(null), b(null));
|
|
5903
5924
|
}, [b, l]);
|
|
5904
|
-
|
|
5925
|
+
P.useEffect(() => {
|
|
5905
5926
|
if (l) return;
|
|
5906
5927
|
const N = () => T();
|
|
5907
5928
|
return window.addEventListener("pointerup", N), window.addEventListener("blur", N), () => {
|
|
5908
5929
|
window.removeEventListener("pointerup", N), window.removeEventListener("blur", N);
|
|
5909
5930
|
};
|
|
5910
|
-
}, [T, l]),
|
|
5931
|
+
}, [T, l]), P.useEffect(() => {
|
|
5911
5932
|
if (l) return;
|
|
5912
5933
|
const N = x.current;
|
|
5913
5934
|
if (g.length !== N.length && g.length === N.length + 1) {
|
|
5914
|
-
const w = new Set(N),
|
|
5915
|
-
if (
|
|
5916
|
-
const
|
|
5917
|
-
d == null || d({ item:
|
|
5935
|
+
const w = new Set(N), F = g.find((O) => !w.has(O)) || null;
|
|
5936
|
+
if (F) {
|
|
5937
|
+
const O = t === "left" ? "right" : "left";
|
|
5938
|
+
d == null || d({ item: F, from: O, to: t });
|
|
5918
5939
|
}
|
|
5919
5940
|
}
|
|
5920
5941
|
x.current = g;
|
|
5921
5942
|
}, [g, t, d, l]);
|
|
5922
5943
|
const S = g.length === 0;
|
|
5923
5944
|
return /* @__PURE__ */ i(
|
|
5924
|
-
|
|
5945
|
+
je,
|
|
5925
5946
|
{
|
|
5926
5947
|
legend: o,
|
|
5927
5948
|
width: "100%",
|
|
5928
5949
|
height: "-webkit-fill-available",
|
|
5929
5950
|
spacing: "wide",
|
|
5930
5951
|
children: /* @__PURE__ */ i(
|
|
5931
|
-
|
|
5952
|
+
Li,
|
|
5932
5953
|
{
|
|
5933
5954
|
ref: c,
|
|
5934
5955
|
onPointerDownCapture: l ? void 0 : D,
|
|
@@ -5946,23 +5967,23 @@ const nt = {
|
|
|
5946
5967
|
width: "100%",
|
|
5947
5968
|
alignItems: "center",
|
|
5948
5969
|
justifyContent: "center",
|
|
5949
|
-
children: /* @__PURE__ */ i(
|
|
5970
|
+
children: /* @__PURE__ */ i(R, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
|
|
5950
5971
|
}
|
|
5951
5972
|
) : g.map((N, w) => {
|
|
5952
|
-
const
|
|
5973
|
+
const F = !l && f === N;
|
|
5953
5974
|
return /* @__PURE__ */ i(
|
|
5954
|
-
|
|
5975
|
+
Oi,
|
|
5955
5976
|
{
|
|
5956
|
-
className: `dnd-item${
|
|
5977
|
+
className: `dnd-item${F ? " is-dragging" : ""}`,
|
|
5957
5978
|
"data-label": N,
|
|
5958
5979
|
"data-first": !!(s && w === 0) || void 0,
|
|
5959
|
-
$active:
|
|
5980
|
+
$active: F,
|
|
5960
5981
|
children: /* @__PURE__ */ i(ie, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
|
|
5961
|
-
|
|
5982
|
+
R,
|
|
5962
5983
|
{
|
|
5963
5984
|
type: "title",
|
|
5964
|
-
appearance:
|
|
5965
|
-
weight:
|
|
5985
|
+
appearance: F ? "primary" : "dark",
|
|
5986
|
+
weight: F ? "bold" : "normal",
|
|
5966
5987
|
size: "medium",
|
|
5967
5988
|
padding: "6px 12px",
|
|
5968
5989
|
children: N
|
|
@@ -5976,7 +5997,7 @@ const nt = {
|
|
|
5976
5997
|
)
|
|
5977
5998
|
}
|
|
5978
5999
|
);
|
|
5979
|
-
},
|
|
6000
|
+
}, Al = (e) => {
|
|
5980
6001
|
const { group: n = "clients", left: t, right: r, onMove: o, locked: a = !1 } = e, s = (d) => {
|
|
5981
6002
|
a || o == null || o(d);
|
|
5982
6003
|
};
|
|
@@ -6017,7 +6038,7 @@ const nt = {
|
|
|
6017
6038
|
]
|
|
6018
6039
|
}
|
|
6019
6040
|
);
|
|
6020
|
-
},
|
|
6041
|
+
}, Mi = C.div`
|
|
6021
6042
|
& > button {
|
|
6022
6043
|
height: 66px;
|
|
6023
6044
|
min-width: 66px;
|
|
@@ -6035,7 +6056,7 @@ const nt = {
|
|
|
6035
6056
|
}
|
|
6036
6057
|
}
|
|
6037
6058
|
}
|
|
6038
|
-
`,
|
|
6059
|
+
`, $l = (e) => /* @__PURE__ */ i(Mi, { children: /* @__PURE__ */ i(B, { ...e }) }), Pi = C.div`
|
|
6039
6060
|
display: flex;
|
|
6040
6061
|
justify-content: space-between;
|
|
6041
6062
|
align-items: center;
|
|
@@ -6064,14 +6085,14 @@ const nt = {
|
|
|
6064
6085
|
}
|
|
6065
6086
|
}
|
|
6066
6087
|
}
|
|
6067
|
-
`,
|
|
6088
|
+
`, Il = (e) => {
|
|
6068
6089
|
const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: a } = e;
|
|
6069
6090
|
return /* @__PURE__ */ m(Pi, { children: [
|
|
6070
6091
|
/* @__PURE__ */ i(
|
|
6071
6092
|
B,
|
|
6072
6093
|
{
|
|
6073
6094
|
...e,
|
|
6074
|
-
iconBefore: /* @__PURE__ */ i(
|
|
6095
|
+
iconBefore: /* @__PURE__ */ i(_t, {}),
|
|
6075
6096
|
variant: "none",
|
|
6076
6097
|
onClick: n,
|
|
6077
6098
|
children: a.back,
|
|
@@ -6128,7 +6149,7 @@ const nt = {
|
|
|
6128
6149
|
hover: E.palette.neutral.N30
|
|
6129
6150
|
}
|
|
6130
6151
|
}
|
|
6131
|
-
},
|
|
6152
|
+
}, zi = C.ul`
|
|
6132
6153
|
display: flex;
|
|
6133
6154
|
flex-direction: column;
|
|
6134
6155
|
padding: 4px 0px;
|
|
@@ -6179,7 +6200,7 @@ const nt = {
|
|
|
6179
6200
|
return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.hover) || ge.option.background.hover;
|
|
6180
6201
|
}};
|
|
6181
6202
|
}
|
|
6182
|
-
`,
|
|
6203
|
+
`, Vi = (e) => {
|
|
6183
6204
|
const { children: n, onOptionClick: t, options: r, maxItems: o } = e, a = (s) => {
|
|
6184
6205
|
try {
|
|
6185
6206
|
if (s.target.closest('input[type="checkbox"]'))
|
|
@@ -6196,7 +6217,7 @@ const nt = {
|
|
|
6196
6217
|
}
|
|
6197
6218
|
};
|
|
6198
6219
|
return /* @__PURE__ */ i(
|
|
6199
|
-
|
|
6220
|
+
zi,
|
|
6200
6221
|
{
|
|
6201
6222
|
$maxItems: o,
|
|
6202
6223
|
$totalOptions: r == null ? void 0 : r.length,
|
|
@@ -6204,17 +6225,17 @@ const nt = {
|
|
|
6204
6225
|
children: n
|
|
6205
6226
|
}
|
|
6206
6227
|
);
|
|
6207
|
-
},
|
|
6228
|
+
}, _i = C.div`
|
|
6208
6229
|
cursor: ${({ $disabled: e }) => e && "not-allowed"};
|
|
6209
6230
|
width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
|
|
6210
6231
|
position: relative;
|
|
6211
|
-
`,
|
|
6232
|
+
`, Ui = C.div`
|
|
6212
6233
|
display: flex;
|
|
6213
6234
|
align-items: center;
|
|
6214
6235
|
margin-bottom: 4px;
|
|
6215
6236
|
gap: 4px;
|
|
6216
6237
|
pointer-events: ${({ $disabled: e }) => e && "none"};
|
|
6217
|
-
`,
|
|
6238
|
+
`, ji = C.div`
|
|
6218
6239
|
display: grid;
|
|
6219
6240
|
height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
|
|
6220
6241
|
padding: 8px 16px;
|
|
@@ -6238,7 +6259,7 @@ const nt = {
|
|
|
6238
6259
|
const o = ((s = (a = r == null ? void 0 : r.input) == null ? void 0 : a.border) == null ? void 0 : s.color) || ge.border.color;
|
|
6239
6260
|
return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
|
|
6240
6261
|
}};
|
|
6241
|
-
`,
|
|
6262
|
+
`, Hi = C.input`
|
|
6242
6263
|
display: ${({ $inputWithData: e }) => e ? "none" : "block"};
|
|
6243
6264
|
outline: none;
|
|
6244
6265
|
padding: 0;
|
|
@@ -6296,23 +6317,23 @@ const nt = {
|
|
|
6296
6317
|
&:-webkit-autofill {
|
|
6297
6318
|
-webkit-background-clip: text;
|
|
6298
6319
|
}
|
|
6299
|
-
`,
|
|
6320
|
+
`, qi = C.div`
|
|
6300
6321
|
display: flex;
|
|
6301
6322
|
justify-content: flex-end;
|
|
6302
6323
|
transition: ease;
|
|
6303
6324
|
transition-duration: 500ms;
|
|
6304
6325
|
transform: ${({ $displayList: e }) => e ? "rotate(-90deg)" : "rotate(90deg)"};
|
|
6305
|
-
`,
|
|
6326
|
+
`, Bi = (e) => e === "compact" ? "medium" : "large";
|
|
6306
6327
|
function rt(e, n) {
|
|
6307
6328
|
const t = e.find((r) => r.value === n);
|
|
6308
6329
|
return t ? t.label : n;
|
|
6309
6330
|
}
|
|
6310
|
-
const
|
|
6331
|
+
const Gi = (e) => {
|
|
6311
6332
|
var o, a;
|
|
6312
6333
|
const { message: n } = e, t = Fn(In), r = ((a = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : a.appearance) || ge.message.appearance;
|
|
6313
6334
|
return /* @__PURE__ */ m(y, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
|
|
6314
6335
|
/* @__PURE__ */ i(
|
|
6315
|
-
|
|
6336
|
+
j,
|
|
6316
6337
|
{
|
|
6317
6338
|
appearance: r,
|
|
6318
6339
|
icon: /* @__PURE__ */ i(Ht, {}),
|
|
@@ -6320,7 +6341,7 @@ const Bi = (e) => {
|
|
|
6320
6341
|
}
|
|
6321
6342
|
),
|
|
6322
6343
|
/* @__PURE__ */ i(
|
|
6323
|
-
|
|
6344
|
+
R,
|
|
6324
6345
|
{
|
|
6325
6346
|
type: "body",
|
|
6326
6347
|
size: "small",
|
|
@@ -6330,7 +6351,7 @@ const Bi = (e) => {
|
|
|
6330
6351
|
}
|
|
6331
6352
|
)
|
|
6332
6353
|
] });
|
|
6333
|
-
},
|
|
6354
|
+
}, Yi = Qt((e, n) => {
|
|
6334
6355
|
var me, le;
|
|
6335
6356
|
const {
|
|
6336
6357
|
displayList: t,
|
|
@@ -6353,25 +6374,25 @@ const Bi = (e) => {
|
|
|
6353
6374
|
checkedItems: S,
|
|
6354
6375
|
editable: N = !1,
|
|
6355
6376
|
clearable: w,
|
|
6356
|
-
onKeyUp:
|
|
6357
|
-
onBlur:
|
|
6358
|
-
onChange:
|
|
6377
|
+
onKeyUp: F,
|
|
6378
|
+
onBlur: O,
|
|
6379
|
+
onChange: $,
|
|
6359
6380
|
onClick: V,
|
|
6360
6381
|
onFocus: Z,
|
|
6361
6382
|
onOptionClick: be,
|
|
6362
6383
|
onCheckboxChange: ve,
|
|
6363
6384
|
handleClear: fe
|
|
6364
6385
|
} = e, ae = Fn(In), ye = ((le = (me = ae == null ? void 0 : ae.input) == null ? void 0 : me.required) == null ? void 0 : le.appearance) || ge.required.appearance, Ne = h && !r, ue = D || b === "" ? "" : rt(g, b), xe = dt(
|
|
6365
|
-
() => g.filter((
|
|
6386
|
+
() => g.filter((_) => S.includes(_.id)),
|
|
6366
6387
|
[g, S]
|
|
6367
|
-
), Te = (
|
|
6368
|
-
|
|
6388
|
+
), Te = (_, k) => {
|
|
6389
|
+
_.stopPropagation(), ve({
|
|
6369
6390
|
target: { checked: !1, value: k }
|
|
6370
6391
|
});
|
|
6371
6392
|
};
|
|
6372
|
-
return /* @__PURE__ */ m(
|
|
6393
|
+
return /* @__PURE__ */ m(_i, { $fullwidth: a, $disabled: r, ref: n, children: [
|
|
6373
6394
|
l && /* @__PURE__ */ m(
|
|
6374
|
-
|
|
6395
|
+
Ui,
|
|
6375
6396
|
{
|
|
6376
6397
|
$alignItems: "center",
|
|
6377
6398
|
$disabled: r,
|
|
@@ -6384,17 +6405,17 @@ const Bi = (e) => {
|
|
|
6384
6405
|
focused: o,
|
|
6385
6406
|
invalid: d,
|
|
6386
6407
|
margin: "0px 0px 0px 16px",
|
|
6387
|
-
size:
|
|
6408
|
+
size: Bi(x),
|
|
6388
6409
|
disabled: r,
|
|
6389
6410
|
children: l
|
|
6390
6411
|
}
|
|
6391
6412
|
),
|
|
6392
|
-
Ne && /* @__PURE__ */ i(
|
|
6413
|
+
Ne && /* @__PURE__ */ i(R, { appearance: ye, size: "small", type: "body", children: "(Requerido)" })
|
|
6393
6414
|
]
|
|
6394
6415
|
}
|
|
6395
6416
|
),
|
|
6396
6417
|
/* @__PURE__ */ m(
|
|
6397
|
-
|
|
6418
|
+
ji,
|
|
6398
6419
|
{
|
|
6399
6420
|
$disabled: r,
|
|
6400
6421
|
$focused: o,
|
|
@@ -6404,7 +6425,7 @@ const Bi = (e) => {
|
|
|
6404
6425
|
$size: x,
|
|
6405
6426
|
children: [
|
|
6406
6427
|
/* @__PURE__ */ i(
|
|
6407
|
-
|
|
6428
|
+
Hi,
|
|
6408
6429
|
{
|
|
6409
6430
|
$inputWithData: !!b,
|
|
6410
6431
|
autoComplete: "off",
|
|
@@ -6419,10 +6440,10 @@ const Bi = (e) => {
|
|
|
6419
6440
|
$focused: o,
|
|
6420
6441
|
readOnly: !N,
|
|
6421
6442
|
onFocus: Z,
|
|
6422
|
-
onBlur:
|
|
6423
|
-
onChange: (
|
|
6443
|
+
onBlur: O,
|
|
6444
|
+
onChange: (_) => $(c, _.target.value),
|
|
6424
6445
|
onClick: N ? V : void 0,
|
|
6425
|
-
onKeyUp:
|
|
6446
|
+
onKeyUp: F
|
|
6426
6447
|
}
|
|
6427
6448
|
),
|
|
6428
6449
|
/* @__PURE__ */ m(
|
|
@@ -6433,16 +6454,16 @@ const Bi = (e) => {
|
|
|
6433
6454
|
alignItems: "center",
|
|
6434
6455
|
justifyContent: "space-between",
|
|
6435
6456
|
children: [
|
|
6436
|
-
/* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: w && !r && (D ? xe.map((
|
|
6457
|
+
/* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: w && !r && (D ? xe.map((_) => /* @__PURE__ */ i(
|
|
6437
6458
|
ke,
|
|
6438
6459
|
{
|
|
6439
6460
|
appearance: "gray",
|
|
6440
|
-
label:
|
|
6461
|
+
label: _.label,
|
|
6441
6462
|
removable: !0,
|
|
6442
6463
|
displayIcon: !1,
|
|
6443
|
-
onClose: (k) => Te(k,
|
|
6464
|
+
onClose: (k) => Te(k, _.id)
|
|
6444
6465
|
},
|
|
6445
|
-
|
|
6466
|
+
_.id
|
|
6446
6467
|
)) : (b ?? "") !== "" && /* @__PURE__ */ i(
|
|
6447
6468
|
ke,
|
|
6448
6469
|
{
|
|
@@ -6450,16 +6471,16 @@ const Bi = (e) => {
|
|
|
6450
6471
|
label: rt(g, b),
|
|
6451
6472
|
removable: !0,
|
|
6452
6473
|
displayIcon: !1,
|
|
6453
|
-
onClose: (
|
|
6454
|
-
|
|
6474
|
+
onClose: (_) => {
|
|
6475
|
+
_.stopPropagation(), fe();
|
|
6455
6476
|
}
|
|
6456
6477
|
}
|
|
6457
6478
|
)) }),
|
|
6458
|
-
T && /* @__PURE__ */ i(
|
|
6459
|
-
|
|
6479
|
+
T && /* @__PURE__ */ i(qi, { $displayList: t, children: /* @__PURE__ */ i(
|
|
6480
|
+
j,
|
|
6460
6481
|
{
|
|
6461
6482
|
appearance: "dark",
|
|
6462
|
-
icon: /* @__PURE__ */ i(
|
|
6483
|
+
icon: /* @__PURE__ */ i(jt, {}),
|
|
6463
6484
|
spacing: "narrow",
|
|
6464
6485
|
disabled: r
|
|
6465
6486
|
}
|
|
@@ -6470,28 +6491,28 @@ const Bi = (e) => {
|
|
|
6470
6491
|
]
|
|
6471
6492
|
}
|
|
6472
6493
|
),
|
|
6473
|
-
d && /* @__PURE__ */ i(
|
|
6494
|
+
d && /* @__PURE__ */ i(Gi, { message: u }),
|
|
6474
6495
|
t && !r && /* @__PURE__ */ i(
|
|
6475
|
-
|
|
6496
|
+
Vi,
|
|
6476
6497
|
{
|
|
6477
6498
|
maxItems: p,
|
|
6478
6499
|
onOptionClick: be,
|
|
6479
6500
|
options: g,
|
|
6480
|
-
children: g.map((
|
|
6501
|
+
children: g.map((_) => /* @__PURE__ */ i(
|
|
6481
6502
|
Xt,
|
|
6482
6503
|
{
|
|
6483
|
-
id:
|
|
6484
|
-
label:
|
|
6485
|
-
checked: S.includes(
|
|
6504
|
+
id: _.id,
|
|
6505
|
+
label: _.label,
|
|
6506
|
+
checked: S.includes(_.id),
|
|
6486
6507
|
onCheckboxChange: ve,
|
|
6487
6508
|
picker: D
|
|
6488
6509
|
},
|
|
6489
|
-
|
|
6510
|
+
_.id
|
|
6490
6511
|
))
|
|
6491
6512
|
}
|
|
6492
6513
|
)
|
|
6493
6514
|
] });
|
|
6494
|
-
}),
|
|
6515
|
+
}), Wi = (e) => {
|
|
6495
6516
|
const {
|
|
6496
6517
|
disabled: n = !1,
|
|
6497
6518
|
fullwidth: t = !1,
|
|
@@ -6514,12 +6535,12 @@ const Bi = (e) => {
|
|
|
6514
6535
|
showOptions: S = !1,
|
|
6515
6536
|
picker: N = !1,
|
|
6516
6537
|
showChevron: w = !0,
|
|
6517
|
-
editable:
|
|
6518
|
-
clearable:
|
|
6519
|
-
} = e, [
|
|
6538
|
+
editable: F = !1,
|
|
6539
|
+
clearable: O = !0
|
|
6540
|
+
} = e, [$, V] = H(!1), [Z, be] = H(!1), [ve, fe] = H([]), ae = Fe(null);
|
|
6520
6541
|
$e(() => {
|
|
6521
6542
|
if (N) {
|
|
6522
|
-
const k = T ? T.split(",").map((
|
|
6543
|
+
const k = T ? T.split(",").map((M) => M.trim()) : [];
|
|
6523
6544
|
fe(k);
|
|
6524
6545
|
}
|
|
6525
6546
|
}, [T, N]);
|
|
@@ -6528,11 +6549,11 @@ const Bi = (e) => {
|
|
|
6528
6549
|
}
|
|
6529
6550
|
function Ne(k) {
|
|
6530
6551
|
if (!n) {
|
|
6531
|
-
V(
|
|
6552
|
+
V(!$);
|
|
6532
6553
|
try {
|
|
6533
6554
|
c && c(k);
|
|
6534
|
-
} catch (
|
|
6535
|
-
console.error(`Error when clicking over select. ${
|
|
6555
|
+
} catch (M) {
|
|
6556
|
+
console.error(`Error when clicking over select. ${M}`);
|
|
6536
6557
|
}
|
|
6537
6558
|
}
|
|
6538
6559
|
}
|
|
@@ -6542,43 +6563,43 @@ const Bi = (e) => {
|
|
|
6542
6563
|
function xe(k) {
|
|
6543
6564
|
try {
|
|
6544
6565
|
k.type === "focus" && (be(!0), g && g(k)), k.type === "blur" && (be(!1), p && p(k));
|
|
6545
|
-
} catch (
|
|
6546
|
-
console.error(`Error executing focus/blur callback. ${
|
|
6566
|
+
} catch (M) {
|
|
6567
|
+
console.error(`Error executing focus/blur callback. ${M}`);
|
|
6547
6568
|
}
|
|
6548
6569
|
}
|
|
6549
6570
|
function Te(k) {
|
|
6550
6571
|
V(!1);
|
|
6551
6572
|
try {
|
|
6552
6573
|
u && u(l, k);
|
|
6553
|
-
} catch (
|
|
6554
|
-
console.error(`Error when changing value using callback. ${
|
|
6574
|
+
} catch (M) {
|
|
6575
|
+
console.error(`Error when changing value using callback. ${M}`);
|
|
6555
6576
|
}
|
|
6556
6577
|
}
|
|
6557
6578
|
function me(k) {
|
|
6558
|
-
k.key === "Escape" && V(!1), V(
|
|
6579
|
+
k.key === "Escape" && V(!1), V(!$);
|
|
6559
6580
|
try {
|
|
6560
6581
|
f && f(k);
|
|
6561
|
-
} catch (
|
|
6562
|
-
console.error(`Error when clicking over select. ${
|
|
6582
|
+
} catch (M) {
|
|
6583
|
+
console.error(`Error when clicking over select. ${M}`);
|
|
6563
6584
|
}
|
|
6564
6585
|
}
|
|
6565
6586
|
function le(k) {
|
|
6566
|
-
const { value:
|
|
6567
|
-
fe((
|
|
6568
|
-
const
|
|
6569
|
-
return u(l,
|
|
6587
|
+
const { value: M, checked: pe } = k.target;
|
|
6588
|
+
fe((L) => {
|
|
6589
|
+
const I = pe ? [...L, M] : L.filter((U) => U !== M);
|
|
6590
|
+
return u(l, I.join(",")), I;
|
|
6570
6591
|
});
|
|
6571
6592
|
}
|
|
6572
6593
|
$e(() => (document.addEventListener("click", ue), () => {
|
|
6573
6594
|
document.removeEventListener("click", ue);
|
|
6574
6595
|
}), [ue]);
|
|
6575
|
-
const
|
|
6596
|
+
const _ = dt(() => O || N ? h : [{ id: "empty-option", label: "", value: "" }, ...h], [h, O, N]);
|
|
6576
6597
|
return /* @__PURE__ */ i(
|
|
6577
|
-
|
|
6598
|
+
Yi,
|
|
6578
6599
|
{
|
|
6579
6600
|
ref: ae,
|
|
6580
6601
|
disabled: n,
|
|
6581
|
-
displayList:
|
|
6602
|
+
displayList: $ || S,
|
|
6582
6603
|
focused: Z,
|
|
6583
6604
|
fullwidth: t,
|
|
6584
6605
|
id: r,
|
|
@@ -6587,7 +6608,7 @@ const Bi = (e) => {
|
|
|
6587
6608
|
maxItems: s,
|
|
6588
6609
|
message: d,
|
|
6589
6610
|
name: l,
|
|
6590
|
-
options:
|
|
6611
|
+
options: _,
|
|
6591
6612
|
placeholder: x,
|
|
6592
6613
|
required: b,
|
|
6593
6614
|
size: D,
|
|
@@ -6595,8 +6616,8 @@ const Bi = (e) => {
|
|
|
6595
6616
|
picker: N,
|
|
6596
6617
|
showChevron: w,
|
|
6597
6618
|
checkedItems: ve,
|
|
6598
|
-
editable:
|
|
6599
|
-
clearable:
|
|
6619
|
+
editable: F,
|
|
6620
|
+
clearable: O,
|
|
6600
6621
|
handleClear: ye,
|
|
6601
6622
|
onBlur: xe,
|
|
6602
6623
|
onChange: u,
|
|
@@ -6607,7 +6628,7 @@ const Bi = (e) => {
|
|
|
6607
6628
|
onCheckboxChange: le
|
|
6608
6629
|
}
|
|
6609
6630
|
);
|
|
6610
|
-
},
|
|
6631
|
+
}, Rl = (e) => {
|
|
6611
6632
|
const {
|
|
6612
6633
|
disabled: n = !1,
|
|
6613
6634
|
fullwidth: t = !1,
|
|
@@ -6625,7 +6646,7 @@ const Bi = (e) => {
|
|
|
6625
6646
|
values: h
|
|
6626
6647
|
} = e;
|
|
6627
6648
|
return /* @__PURE__ */ i(
|
|
6628
|
-
|
|
6649
|
+
Wi,
|
|
6629
6650
|
{
|
|
6630
6651
|
disabled: n,
|
|
6631
6652
|
fullwidth: t,
|
|
@@ -6644,30 +6665,30 @@ const Bi = (e) => {
|
|
|
6644
6665
|
picker: !0
|
|
6645
6666
|
}
|
|
6646
6667
|
);
|
|
6647
|
-
},
|
|
6648
|
-
const t =
|
|
6668
|
+
}, Fl = (e) => Object.values(e).flat(), Ll = (e, n) => {
|
|
6669
|
+
const t = Pe(e);
|
|
6649
6670
|
return Object.fromEntries(
|
|
6650
6671
|
Object.entries(t).map(([r, o]) => [r, o.map(n)])
|
|
6651
6672
|
);
|
|
6652
|
-
},
|
|
6673
|
+
}, Xi = (e) => Object.entries(e).map(([n, t]) => ({
|
|
6653
6674
|
ConditionGroupId: n,
|
|
6654
6675
|
conditionsThatEstablishesTheDecision: rn(t)
|
|
6655
|
-
})),
|
|
6656
|
-
const n =
|
|
6676
|
+
})), Ol = (e) => {
|
|
6677
|
+
const n = Pe(e), t = {
|
|
6657
6678
|
...e,
|
|
6658
|
-
conditionGroups:
|
|
6679
|
+
conditionGroups: Xi(n)
|
|
6659
6680
|
};
|
|
6660
6681
|
return delete t.conditionsThatEstablishesTheDecision, t;
|
|
6661
|
-
}, Ue = /* @__PURE__ */ new Map(),
|
|
6682
|
+
}, Ue = /* @__PURE__ */ new Map(), Qi = (e, n) => Ue.get(`${n}:${e}`), Zi = (e, n, t) => {
|
|
6662
6683
|
const r = `${n}:${e}`;
|
|
6663
6684
|
if (Ue.set(r, t), Ue.size > 1e3) {
|
|
6664
6685
|
const o = Ue.keys().next().value;
|
|
6665
6686
|
o !== void 0 && Ue.delete(o);
|
|
6666
6687
|
}
|
|
6667
|
-
}, ot = /* @__PURE__ */ new Map(),
|
|
6688
|
+
}, ot = /* @__PURE__ */ new Map(), Ki = 1e3, Ji = (e) => {
|
|
6668
6689
|
const n = Date.now(), t = ot.get(e) || 0;
|
|
6669
|
-
return n - t <
|
|
6670
|
-
},
|
|
6690
|
+
return n - t < Ki ? !0 : (ot.set(e, n), !1);
|
|
6691
|
+
}, el = (e) => {
|
|
6671
6692
|
const n = er(e);
|
|
6672
6693
|
return {
|
|
6673
6694
|
spa: "es",
|
|
@@ -6677,12 +6698,12 @@ const Bi = (e) => {
|
|
|
6677
6698
|
ita: "it",
|
|
6678
6699
|
por: "pt"
|
|
6679
6700
|
}[n] || "en";
|
|
6680
|
-
},
|
|
6681
|
-
const o = `${n}:${e}`, a =
|
|
6701
|
+
}, nl = async (e, n, { url: t, apiKey: r }) => {
|
|
6702
|
+
const o = `${n}:${e}`, a = Qi(e, n);
|
|
6682
6703
|
if (a) return a;
|
|
6683
|
-
if (
|
|
6704
|
+
if (Ji(o))
|
|
6684
6705
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
6685
|
-
const s =
|
|
6706
|
+
const s = el(e);
|
|
6686
6707
|
try {
|
|
6687
6708
|
const { data: d } = await Jt.post(
|
|
6688
6709
|
t,
|
|
@@ -6698,15 +6719,15 @@ const Bi = (e) => {
|
|
|
6698
6719
|
}
|
|
6699
6720
|
}
|
|
6700
6721
|
), l = (d == null ? void 0 : d.translatedText) || e;
|
|
6701
|
-
return
|
|
6722
|
+
return Zi(e, n, l), l;
|
|
6702
6723
|
} catch (d) {
|
|
6703
6724
|
return console.warn(`[Translation] Failed for: "${e}"`, d), e;
|
|
6704
6725
|
}
|
|
6705
|
-
},
|
|
6726
|
+
}, tl = (e) => typeof e == "string" && e.trim().length > 0, at = async (e, n, t) => {
|
|
6706
6727
|
const r = await Promise.all(
|
|
6707
6728
|
Object.entries(e).map(async ([o, a]) => {
|
|
6708
|
-
if (
|
|
6709
|
-
const s = await
|
|
6729
|
+
if (tl(a)) {
|
|
6730
|
+
const s = await nl(a, n, t);
|
|
6710
6731
|
return [o, s];
|
|
6711
6732
|
} else if (Array.isArray(a)) {
|
|
6712
6733
|
const s = await Promise.all(
|
|
@@ -6725,40 +6746,40 @@ const Bi = (e) => {
|
|
|
6725
6746
|
return Object.fromEntries(r);
|
|
6726
6747
|
};
|
|
6727
6748
|
export {
|
|
6728
|
-
|
|
6749
|
+
Il as BackAndNextButton,
|
|
6729
6750
|
Qe as BusinessRuleCard,
|
|
6730
6751
|
gt as BusinessRuleCardNew,
|
|
6731
6752
|
Ln as BusinessRuleView,
|
|
6732
6753
|
ft as BusinessRuleViewNew,
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6754
|
+
ml as BusinessRules,
|
|
6755
|
+
vl as BusinessRulesNew,
|
|
6756
|
+
bl as BusinessRulesWithGroup,
|
|
6757
|
+
Rl as Checkpicker,
|
|
6758
|
+
Al as DragAndDropBoxes,
|
|
6738
6759
|
tt as DraggableList,
|
|
6739
|
-
|
|
6740
|
-
|
|
6760
|
+
$a as DropdownMenu,
|
|
6761
|
+
kl as DropdownMenuContainer,
|
|
6741
6762
|
se as EValueHowToSetUp,
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6763
|
+
yl as Filter,
|
|
6764
|
+
xl as FilterModal,
|
|
6765
|
+
Tl as FormFilter,
|
|
6745
6766
|
ut as ModalRules,
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6767
|
+
Ca as RulesForm,
|
|
6768
|
+
$l as SendButton,
|
|
6769
|
+
qo as buildEsConditionSentence,
|
|
6770
|
+
ua as convertRangeToString,
|
|
6750
6771
|
ht as filterByGroup,
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6772
|
+
Fl as flatFromGroups,
|
|
6773
|
+
wl as formatDecisionForBackend,
|
|
6774
|
+
Pe as getConditionsByGroupNew,
|
|
6775
|
+
Xi as groupsRecordToArrayNew,
|
|
6776
|
+
Ll as mapByGroupNew,
|
|
6777
|
+
Ol as normalizeDecisionToNewShape,
|
|
6778
|
+
Cl as parseRangeFromString,
|
|
6779
|
+
Dl as revertSortedDataSampleSwitchPlaces,
|
|
6780
|
+
Sl as revertSortedDataSwitchPlaces,
|
|
6781
|
+
El as sortDisplayDataSampleSwitchPlaces,
|
|
6782
|
+
Nl as sortDisplayDataSwitchPlaces,
|
|
6762
6783
|
at as translateObject,
|
|
6763
|
-
|
|
6784
|
+
nl as translateText
|
|
6764
6785
|
};
|