@isettingkit/business-rules 2.1.16 → 2.1.18
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 +727 -693
- 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 k = /* @__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))(k || {});
|
|
74
74
|
const dr = {
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
75
|
+
[k.LIST_OF_VALUES]: rr,
|
|
76
|
+
[k.LIST_OF_VALUES_MULTI]: or,
|
|
77
|
+
[k.RANGE]: ar,
|
|
78
|
+
[k.GREATER_THAN]: ir,
|
|
79
|
+
[k.LESS_THAN]: lr,
|
|
80
|
+
[k.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
|
+
[k.LIST_OF_VALUES]: Ar,
|
|
757
|
+
[k.LIST_OF_VALUES_MULTI]: $r,
|
|
758
|
+
[k.RANGE]: Ir,
|
|
759
|
+
[k.GREATER_THAN]: Rr,
|
|
760
|
+
[k.LESS_THAN]: Fr,
|
|
761
|
+
[k.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
|
+
[k.LIST_OF_VALUES]: Gr,
|
|
1104
|
+
[k.LIST_OF_VALUES_MULTI]: Yr,
|
|
1105
|
+
[k.RANGE]: Wr,
|
|
1106
|
+
[k.GREATER_THAN]: bn,
|
|
1107
|
+
[k.LESS_THAN]: bn,
|
|
1108
|
+
[k.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
|
+
[k.LIST_OF_VALUES]: lo,
|
|
1659
|
+
[k.LIST_OF_VALUES_MULTI]: so,
|
|
1660
|
+
[k.RANGE]: co,
|
|
1661
|
+
[k.GREATER_THAN]: uo,
|
|
1662
|
+
[k.LESS_THAN]: po,
|
|
1663
|
+
[k.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 ")) {
|
|
@@ -1678,7 +1678,7 @@ const Jr = C.div`
|
|
|
1678
1678
|
}
|
|
1679
1679
|
return n;
|
|
1680
1680
|
}
|
|
1681
|
-
return typeof n == "object" && n !== null && !Array.isArray(n) ? (ho[e == null ? void 0 : e.howToSetTheDecision] || io)(n) : n || void 0;
|
|
1681
|
+
return typeof n == "object" && n !== null && !Array.isArray(n) ? "from" in n && "to" in n ? n : (ho[e == null ? void 0 : e.howToSetTheDecision] || io)(n) : n || void 0;
|
|
1682
1682
|
}, fo = C.div`
|
|
1683
1683
|
display: flex;
|
|
1684
1684
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
@@ -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, {}),
|
|
@@ -1883,8 +1883,15 @@ const yo = (e) => {
|
|
|
1883
1883
|
) }),
|
|
1884
1884
|
l && /* @__PURE__ */ m(z, { children: [
|
|
1885
1885
|
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
1886
|
-
N ? /* @__PURE__ */ i(
|
|
1887
|
-
|
|
1886
|
+
N ? /* @__PURE__ */ i(
|
|
1887
|
+
st,
|
|
1888
|
+
{
|
|
1889
|
+
tabs: b,
|
|
1890
|
+
selectedTab: D,
|
|
1891
|
+
onChange: T
|
|
1892
|
+
}
|
|
1893
|
+
) : /* @__PURE__ */ i(
|
|
1894
|
+
R,
|
|
1888
1895
|
{
|
|
1889
1896
|
type: "label",
|
|
1890
1897
|
size: "large",
|
|
@@ -1912,7 +1919,11 @@ const yo = (e) => {
|
|
|
1912
1919
|
children: /* @__PURE__ */ i(
|
|
1913
1920
|
Je,
|
|
1914
1921
|
{
|
|
1915
|
-
element: {
|
|
1922
|
+
element: {
|
|
1923
|
+
...w,
|
|
1924
|
+
value: w.value,
|
|
1925
|
+
howToSetTheCondition: w.howToSetTheCondition === se.LIST_OF_VALUES ? se.LIST_OF_VALUES_MULTI : w.howToSetTheCondition
|
|
1926
|
+
},
|
|
1916
1927
|
valueData: Be(
|
|
1917
1928
|
w
|
|
1918
1929
|
)
|
|
@@ -1976,7 +1987,7 @@ const yo = (e) => {
|
|
|
1976
1987
|
n.has(o) || (n.add(o), t.push(r));
|
|
1977
1988
|
}
|
|
1978
1989
|
return t;
|
|
1979
|
-
},
|
|
1990
|
+
}, Pe = (e) => {
|
|
1980
1991
|
if (!e) return {};
|
|
1981
1992
|
if (Array.isArray(e.conditionGroups)) {
|
|
1982
1993
|
const n = e.conditionGroups.map((t) => [
|
|
@@ -2009,8 +2020,25 @@ const yo = (e) => {
|
|
|
2009
2020
|
default:
|
|
2010
2021
|
return `${e}`;
|
|
2011
2022
|
}
|
|
2023
|
+
}, To = (e, n) => {
|
|
2024
|
+
if (e == null) return "";
|
|
2025
|
+
const t = Array.isArray(e) ? e.join(", ") : typeof e == "object" && e !== null ? JSON.stringify(e) : String(e ?? "");
|
|
2026
|
+
switch (n) {
|
|
2027
|
+
case k.LESS_THAN:
|
|
2028
|
+
return `Menor a ${t}`;
|
|
2029
|
+
case k.GREATER_THAN:
|
|
2030
|
+
return `Mayor a ${t}`;
|
|
2031
|
+
case k.LIST_OF_VALUES:
|
|
2032
|
+
return e;
|
|
2033
|
+
case k.LIST_OF_VALUES_MULTI:
|
|
2034
|
+
return e;
|
|
2035
|
+
case k.RANGE:
|
|
2036
|
+
return e;
|
|
2037
|
+
default:
|
|
2038
|
+
return String(t);
|
|
2039
|
+
}
|
|
2012
2040
|
}, Bn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ft = (e) => {
|
|
2013
|
-
var me, le,
|
|
2041
|
+
var me, le, _;
|
|
2014
2042
|
const {
|
|
2015
2043
|
cardTitle: n = !0,
|
|
2016
2044
|
decision: t,
|
|
@@ -2027,76 +2055,82 @@ const yo = (e) => {
|
|
|
2027
2055
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2028
2056
|
value: String(t.effectiveFrom),
|
|
2029
2057
|
howToSetTheDecision: ne.EQUAL,
|
|
2030
|
-
decisionDataType:
|
|
2058
|
+
decisionDataType: q.DATE
|
|
2031
2059
|
},
|
|
2032
2060
|
valueData: Be({
|
|
2033
2061
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2034
2062
|
value: String(t.effectiveFrom),
|
|
2035
2063
|
howToSetTheDecision: ne.EQUAL,
|
|
2036
|
-
decisionDataType:
|
|
2064
|
+
decisionDataType: q.DATE
|
|
2037
2065
|
})
|
|
2038
2066
|
} : null, h = g ? {
|
|
2039
2067
|
element: {
|
|
2040
2068
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2041
2069
|
value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
|
|
2042
2070
|
howToSetTheDecision: ne.EQUAL,
|
|
2043
|
-
decisionDataType:
|
|
2071
|
+
decisionDataType: q.DATE
|
|
2044
2072
|
},
|
|
2045
2073
|
valueData: Be({
|
|
2046
2074
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2047
2075
|
value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
|
|
2048
2076
|
howToSetTheDecision: ne.EQUAL,
|
|
2049
|
-
decisionDataType:
|
|
2077
|
+
decisionDataType: q.DATE
|
|
2050
2078
|
})
|
|
2051
2079
|
} : null, x = t ? {
|
|
2052
2080
|
labelName: n && t.labelName || "",
|
|
2053
|
-
decisionDataType: t.decisionDataType ||
|
|
2081
|
+
decisionDataType: t.decisionDataType || q.ALPHABETICAL,
|
|
2054
2082
|
value: Be(t),
|
|
2055
2083
|
howToSetTheDecision: t.howToSetTheDecision || ne.EQUAL
|
|
2056
|
-
} : null, b =
|
|
2057
|
-
() => t ?
|
|
2084
|
+
} : null, b = P.useMemo(
|
|
2085
|
+
() => t ? Pe(t) : {},
|
|
2058
2086
|
[t]
|
|
2059
|
-
), D = ((le = (me = t == null ? void 0 : t.conditionGroups) == null ? void 0 : me.map((
|
|
2060
|
-
const
|
|
2061
|
-
|
|
2062
|
-
for (const
|
|
2063
|
-
!
|
|
2064
|
-
for (const
|
|
2065
|
-
|
|
2066
|
-
return
|
|
2067
|
-
}, [b, T, D]), N =
|
|
2068
|
-
const
|
|
2087
|
+
), D = ((le = (me = t == null ? void 0 : t.conditionGroups) == null ? void 0 : me.map((A) => A == null ? void 0 : A.ConditionGroupId)) == null ? void 0 : le.filter(Boolean)) || Object.keys(b), T = D[0] || "group-primary", S = P.useMemo(() => {
|
|
2088
|
+
const A = {}, M = b[T] || [], pe = b["group-primary"] || [];
|
|
2089
|
+
A["group-primary"] = T === "group-primary" ? pe : [...M, ...pe];
|
|
2090
|
+
for (const L of D)
|
|
2091
|
+
!L || L === T || L !== "group-primary" && b[L] && (A[L] = b[L]);
|
|
2092
|
+
for (const L of Object.keys(b))
|
|
2093
|
+
L === "group-primary" || L === T || L in A || (A[L] = b[L]);
|
|
2094
|
+
return A;
|
|
2095
|
+
}, [b, T, D]), N = P.useMemo(() => {
|
|
2096
|
+
const A = [
|
|
2069
2097
|
"group-primary",
|
|
2070
|
-
...Object.keys(S).filter((
|
|
2098
|
+
...Object.keys(S).filter((M) => M !== "group-primary")
|
|
2071
2099
|
];
|
|
2072
|
-
return Array.from(new Set(
|
|
2073
|
-
}, [S]), w =
|
|
2074
|
-
const
|
|
2075
|
-
return Object.keys(S).forEach((
|
|
2076
|
-
const pe = S[
|
|
2077
|
-
pe && Array.isArray(pe) ?
|
|
2078
|
-
|
|
2079
|
-
labelName
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2100
|
+
return Array.from(new Set(A));
|
|
2101
|
+
}, [S]), w = P.useMemo(() => {
|
|
2102
|
+
const A = {};
|
|
2103
|
+
return Object.keys(S).forEach((M) => {
|
|
2104
|
+
const pe = S[M];
|
|
2105
|
+
pe && Array.isArray(pe) ? A[M] = pe.map((L) => {
|
|
2106
|
+
let I = L.labelName;
|
|
2107
|
+
L.TimeUnit && L.labelName && (I = xo(L.labelName, L.TimeUnit));
|
|
2108
|
+
let U = L.value;
|
|
2109
|
+
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(
|
|
2110
|
+
L.value,
|
|
2111
|
+
L.howToSetTheCondition
|
|
2112
|
+
)), {
|
|
2113
|
+
...L,
|
|
2114
|
+
labelName: I,
|
|
2115
|
+
value: U
|
|
2116
|
+
};
|
|
2117
|
+
}) : A[M] = pe;
|
|
2118
|
+
}), A;
|
|
2119
|
+
}, [S]), F = ht(
|
|
2086
2120
|
w,
|
|
2087
|
-
(
|
|
2088
|
-
),
|
|
2089
|
-
let
|
|
2090
|
-
const V = N.map((
|
|
2091
|
-
const
|
|
2092
|
-
return
|
|
2093
|
-
id:
|
|
2094
|
-
label:
|
|
2121
|
+
(A) => !A.hidden
|
|
2122
|
+
), O = {};
|
|
2123
|
+
let $ = 1;
|
|
2124
|
+
const V = N.map((A) => {
|
|
2125
|
+
const M = A === "group-primary" ? "mainCondition" : `alternateCondition-${$++}`;
|
|
2126
|
+
return O[M] = A, {
|
|
2127
|
+
id: M,
|
|
2128
|
+
label: A === "group-primary" ? Bn(A, 0) : Bn(A, Number(M.split("-").at(-1))),
|
|
2095
2129
|
isDisabled: !1
|
|
2096
2130
|
};
|
|
2097
|
-
}), [Z, be] =
|
|
2098
|
-
((
|
|
2099
|
-
), ve = (
|
|
2131
|
+
}), [Z, be] = P.useState(
|
|
2132
|
+
((_ = V[0]) == null ? void 0 : _.id) ?? "mainCondition"
|
|
2133
|
+
), ve = (A) => be(A), 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
2134
|
return /* @__PURE__ */ i(
|
|
2101
2135
|
yo,
|
|
2102
2136
|
{
|
|
@@ -2123,7 +2157,7 @@ const yo = (e) => {
|
|
|
2123
2157
|
hasMultipleGroups: ye
|
|
2124
2158
|
}
|
|
2125
2159
|
);
|
|
2126
|
-
},
|
|
2160
|
+
}, wo = $n`
|
|
2127
2161
|
from {
|
|
2128
2162
|
opacity: 0;
|
|
2129
2163
|
transform: translateY(20px);
|
|
@@ -2157,7 +2191,7 @@ C.div`
|
|
|
2157
2191
|
}};
|
|
2158
2192
|
}
|
|
2159
2193
|
`;
|
|
2160
|
-
const
|
|
2194
|
+
const Co = C.div`
|
|
2161
2195
|
& > div {
|
|
2162
2196
|
box-shadow: 0px 2px 3px 0px
|
|
2163
2197
|
${({ theme: e }) => {
|
|
@@ -2166,18 +2200,18 @@ const wo = C.div`
|
|
|
2166
2200
|
}};
|
|
2167
2201
|
cursor: pointer;
|
|
2168
2202
|
}
|
|
2169
|
-
`,
|
|
2203
|
+
`, Do = C.div`
|
|
2170
2204
|
width: 100%;
|
|
2171
2205
|
height: 100%;
|
|
2172
2206
|
& > div {
|
|
2173
|
-
animation: ${
|
|
2207
|
+
animation: ${wo} 600ms ease-out;
|
|
2174
2208
|
}
|
|
2175
|
-
`,
|
|
2209
|
+
`, So = C.div`
|
|
2176
2210
|
& > div > div {
|
|
2177
2211
|
border-radius: 8px;
|
|
2178
2212
|
box-sizing: border-box;
|
|
2179
2213
|
}
|
|
2180
|
-
`,
|
|
2214
|
+
`, Eo = C.div`
|
|
2181
2215
|
& > div {
|
|
2182
2216
|
width: 100%;
|
|
2183
2217
|
height: 100%;
|
|
@@ -2197,7 +2231,7 @@ const wo = C.div`
|
|
|
2197
2231
|
border-radius: 8px;
|
|
2198
2232
|
}
|
|
2199
2233
|
}
|
|
2200
|
-
`,
|
|
2234
|
+
`, No = (e) => {
|
|
2201
2235
|
const { index: n, handleOpenModal: t } = e;
|
|
2202
2236
|
return /* @__PURE__ */ i(
|
|
2203
2237
|
gt,
|
|
@@ -2211,7 +2245,7 @@ const wo = C.div`
|
|
|
2211
2245
|
},
|
|
2212
2246
|
`loading-card-${n}`
|
|
2213
2247
|
);
|
|
2214
|
-
},
|
|
2248
|
+
}, ko = (e) => {
|
|
2215
2249
|
const {
|
|
2216
2250
|
cardTitle: n,
|
|
2217
2251
|
decision: t,
|
|
@@ -2245,15 +2279,15 @@ const wo = C.div`
|
|
|
2245
2279
|
)
|
|
2246
2280
|
}
|
|
2247
2281
|
) }) }, t.decisionId) : null;
|
|
2248
|
-
},
|
|
2282
|
+
}, Ao = (e) => {
|
|
2249
2283
|
const {
|
|
2250
2284
|
customTitleContentAddCard: n,
|
|
2251
2285
|
index: t,
|
|
2252
2286
|
handleOpenModal: r,
|
|
2253
2287
|
shouldRenderEmptyMessage: o
|
|
2254
2288
|
} = e;
|
|
2255
|
-
return /* @__PURE__ */ i(
|
|
2256
|
-
|
|
2289
|
+
return /* @__PURE__ */ i(Do, { children: o ? null : /* @__PURE__ */ i(
|
|
2290
|
+
Co,
|
|
2257
2291
|
{
|
|
2258
2292
|
onClick: () => r ? r() : null,
|
|
2259
2293
|
children: /* @__PURE__ */ i(
|
|
@@ -2272,9 +2306,9 @@ const wo = C.div`
|
|
|
2272
2306
|
alignItems: "center",
|
|
2273
2307
|
padding: "16px",
|
|
2274
2308
|
children: [
|
|
2275
|
-
/* @__PURE__ */ i(
|
|
2309
|
+
/* @__PURE__ */ i(R, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
|
|
2276
2310
|
/* @__PURE__ */ i(
|
|
2277
|
-
|
|
2311
|
+
j,
|
|
2278
2312
|
{
|
|
2279
2313
|
appearance: "gray",
|
|
2280
2314
|
icon: /* @__PURE__ */ i(We, {}),
|
|
@@ -2289,14 +2323,14 @@ const wo = C.div`
|
|
|
2289
2323
|
)
|
|
2290
2324
|
}
|
|
2291
2325
|
) }, `add-decision-${t}`);
|
|
2292
|
-
},
|
|
2293
|
-
loading:
|
|
2294
|
-
decision:
|
|
2295
|
-
add:
|
|
2326
|
+
}, $o = {
|
|
2327
|
+
loading: No,
|
|
2328
|
+
decision: ko,
|
|
2329
|
+
add: Ao
|
|
2296
2330
|
}, Sn = (e) => {
|
|
2297
|
-
const { type: n } = e, t =
|
|
2331
|
+
const { type: n } = e, t = $o[n];
|
|
2298
2332
|
return t ? t(e) : null;
|
|
2299
|
-
},
|
|
2333
|
+
}, Io = (e) => {
|
|
2300
2334
|
const {
|
|
2301
2335
|
cardTitle: n,
|
|
2302
2336
|
controls: t,
|
|
@@ -2336,13 +2370,13 @@ const wo = C.div`
|
|
|
2336
2370
|
})
|
|
2337
2371
|
), g = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !a && t;
|
|
2338
2372
|
return { renderedCards: c, shouldRenderAddCard: g };
|
|
2339
|
-
},
|
|
2373
|
+
}, Ro = C.div`
|
|
2340
2374
|
position: relative;
|
|
2341
2375
|
& > div {
|
|
2342
2376
|
padding: 24px 16px;
|
|
2343
2377
|
place-items: unset;
|
|
2344
2378
|
}
|
|
2345
|
-
`,
|
|
2379
|
+
`, Fo = C.div`
|
|
2346
2380
|
background-color: ${({ theme: e }) => {
|
|
2347
2381
|
var n, t;
|
|
2348
2382
|
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 +2408,7 @@ const wo = C.div`
|
|
|
2374
2408
|
background-color: #ebecf0;
|
|
2375
2409
|
border-radius: 8px;
|
|
2376
2410
|
}
|
|
2377
|
-
`,
|
|
2411
|
+
`, Lo = (e) => {
|
|
2378
2412
|
const { children: n, description: t, portalId: r, onCloseModal: o, title: a } = e, s = document.getElementById(r);
|
|
2379
2413
|
if (!s)
|
|
2380
2414
|
throw new Error(
|
|
@@ -2382,12 +2416,12 @@ const wo = C.div`
|
|
|
2382
2416
|
);
|
|
2383
2417
|
const d = re("(max-width: 400px)");
|
|
2384
2418
|
return pn(
|
|
2385
|
-
/* @__PURE__ */ i(
|
|
2419
|
+
/* @__PURE__ */ i(Ro, { smallScreen: d, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(Fo, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
2386
2420
|
/* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
2387
2421
|
/* @__PURE__ */ m(y, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2388
2422
|
/* @__PURE__ */ m(y, { direction: "column", gap: "8px", children: [
|
|
2389
2423
|
/* @__PURE__ */ i(
|
|
2390
|
-
|
|
2424
|
+
R,
|
|
2391
2425
|
{
|
|
2392
2426
|
type: "title",
|
|
2393
2427
|
size: "medium",
|
|
@@ -2396,7 +2430,7 @@ const wo = C.div`
|
|
|
2396
2430
|
children: a
|
|
2397
2431
|
}
|
|
2398
2432
|
),
|
|
2399
|
-
/* @__PURE__ */ i(
|
|
2433
|
+
/* @__PURE__ */ i(R, { size: "medium", appearance: "gray", children: t })
|
|
2400
2434
|
] }),
|
|
2401
2435
|
/* @__PURE__ */ i(dn, { size: "24px", cursor: "pointer", onClick: o })
|
|
2402
2436
|
] }),
|
|
@@ -2406,14 +2440,14 @@ const wo = C.div`
|
|
|
2406
2440
|
] }) }) }) }),
|
|
2407
2441
|
s
|
|
2408
2442
|
);
|
|
2409
|
-
},
|
|
2443
|
+
}, Oo = (e) => ({
|
|
2410
2444
|
schema: de().required("Requerido").test(
|
|
2411
2445
|
"non-empty",
|
|
2412
2446
|
"El valor no puede estar vacío",
|
|
2413
2447
|
(n) => n != null && n.trim() !== ""
|
|
2414
2448
|
),
|
|
2415
2449
|
value: e
|
|
2416
|
-
}),
|
|
2450
|
+
}), Mo = (e) => ({
|
|
2417
2451
|
schema: Ve().test(
|
|
2418
2452
|
"isArrayOrString",
|
|
2419
2453
|
"Por favor selecciona una opcion",
|
|
@@ -2431,7 +2465,7 @@ const wo = C.div`
|
|
|
2431
2465
|
) : typeof n == "string"
|
|
2432
2466
|
),
|
|
2433
2467
|
value: e
|
|
2434
|
-
}),
|
|
2468
|
+
}), zo = (e) => {
|
|
2435
2469
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
2436
2470
|
return {
|
|
2437
2471
|
schema: te({
|
|
@@ -2450,7 +2484,7 @@ const wo = C.div`
|
|
|
2450
2484
|
}, vn = (e, n) => {
|
|
2451
2485
|
if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
|
|
2452
2486
|
const t = e;
|
|
2453
|
-
return n ===
|
|
2487
|
+
return n === q.PERCENTAGE ? {
|
|
2454
2488
|
schema: te({
|
|
2455
2489
|
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
2490
|
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 +2498,29 @@ const wo = C.div`
|
|
|
2464
2498
|
value: t
|
|
2465
2499
|
};
|
|
2466
2500
|
}
|
|
2467
|
-
return n ===
|
|
2501
|
+
return n === q.PERCENTAGE ? {
|
|
2468
2502
|
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
2503
|
value: e
|
|
2470
2504
|
} : {
|
|
2471
2505
|
schema: de().required("Requerido"),
|
|
2472
2506
|
value: e
|
|
2473
2507
|
};
|
|
2474
|
-
},
|
|
2475
|
-
[
|
|
2476
|
-
[
|
|
2477
|
-
[
|
|
2478
|
-
[
|
|
2479
|
-
[
|
|
2480
|
-
[
|
|
2481
|
-
}, Gn = (e) =>
|
|
2482
|
-
function
|
|
2508
|
+
}, Vo = {
|
|
2509
|
+
[k.LIST_OF_VALUES]: Mo,
|
|
2510
|
+
[k.LIST_OF_VALUES_MULTI]: Po,
|
|
2511
|
+
[k.RANGE]: zo,
|
|
2512
|
+
[k.GREATER_THAN]: vn,
|
|
2513
|
+
[k.LESS_THAN]: vn,
|
|
2514
|
+
[k.EQUAL]: vn
|
|
2515
|
+
}, Gn = (e) => Vo[e] || Oo;
|
|
2516
|
+
function _o({
|
|
2483
2517
|
decision: e,
|
|
2484
2518
|
onSubmitEvent: n,
|
|
2485
2519
|
textValues: t
|
|
2486
2520
|
}) {
|
|
2487
|
-
const r =
|
|
2521
|
+
const r = Pe(e) || {}, o = () => Object.values(r).flat(), a = {
|
|
2488
2522
|
ruleName: e.ruleName || "",
|
|
2489
|
-
decisionDataType: e.decisionDataType ||
|
|
2523
|
+
decisionDataType: e.decisionDataType || q.ALPHABETICAL,
|
|
2490
2524
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
2491
2525
|
value: e.value || "",
|
|
2492
2526
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -2532,9 +2566,9 @@ function Vo({
|
|
|
2532
2566
|
);
|
|
2533
2567
|
})
|
|
2534
2568
|
};
|
|
2535
|
-
t.terms && (d.effectiveFrom =
|
|
2569
|
+
t.terms && (d.effectiveFrom = Me().required(
|
|
2536
2570
|
"Se requiere la fecha de vigencia desde"
|
|
2537
|
-
), d.validUntil =
|
|
2571
|
+
), d.validUntil = Me().when(
|
|
2538
2572
|
"checkClosed",
|
|
2539
2573
|
(u, c, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? c.required("Se requiere la fecha de vigencia hasta").test(
|
|
2540
2574
|
"is-after-startDate",
|
|
@@ -2623,7 +2657,7 @@ C.div`
|
|
|
2623
2657
|
border-radius: 8px;
|
|
2624
2658
|
}
|
|
2625
2659
|
`;
|
|
2626
|
-
const
|
|
2660
|
+
const Uo = C.div`
|
|
2627
2661
|
display: flex;
|
|
2628
2662
|
width: -webkit-fill-available;
|
|
2629
2663
|
& > div {
|
|
@@ -2632,7 +2666,7 @@ const jo = C.div`
|
|
|
2632
2666
|
gap: 16px;
|
|
2633
2667
|
width: -webkit-fill-available;
|
|
2634
2668
|
}
|
|
2635
|
-
`,
|
|
2669
|
+
`, jo = (e) => {
|
|
2636
2670
|
const {
|
|
2637
2671
|
onHandleStartChange: n,
|
|
2638
2672
|
onHandleEndChange: t,
|
|
@@ -2647,16 +2681,16 @@ const jo = C.div`
|
|
|
2647
2681
|
messageEnd: c = "",
|
|
2648
2682
|
statusStart: g = "pending",
|
|
2649
2683
|
statusEnd: f = "pending"
|
|
2650
|
-
} = e, [h, x] =
|
|
2651
|
-
x(
|
|
2652
|
-
}, w = (
|
|
2653
|
-
D(
|
|
2654
|
-
},
|
|
2655
|
-
S(
|
|
2656
|
-
},
|
|
2684
|
+
} = e, [h, x] = H(s), [b, D] = H(l), [T, S] = H(p), N = ({ target: $ }) => {
|
|
2685
|
+
x($.checked), r && r($.checked);
|
|
2686
|
+
}, w = ($) => {
|
|
2687
|
+
D($.target.value), n($);
|
|
2688
|
+
}, F = ($) => {
|
|
2689
|
+
S($.target.value), t($);
|
|
2690
|
+
}, O = re("(max-width: 400px)");
|
|
2657
2691
|
return /* @__PURE__ */ m(y, { direction: "column", width: "100%", gap: "20px", children: [
|
|
2658
2692
|
/* @__PURE__ */ m(y, { justifyContent: "space-between", children: [
|
|
2659
|
-
/* @__PURE__ */ i(
|
|
2693
|
+
/* @__PURE__ */ i(R, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
2660
2694
|
/* @__PURE__ */ i(
|
|
2661
2695
|
An,
|
|
2662
2696
|
{
|
|
@@ -2670,7 +2704,7 @@ const jo = C.div`
|
|
|
2670
2704
|
/* @__PURE__ */ m(
|
|
2671
2705
|
y,
|
|
2672
2706
|
{
|
|
2673
|
-
direction:
|
|
2707
|
+
direction: O ? "column" : "row",
|
|
2674
2708
|
justifyContent: "space-between",
|
|
2675
2709
|
gap: "24px",
|
|
2676
2710
|
children: [
|
|
@@ -2693,7 +2727,7 @@ const jo = C.div`
|
|
|
2693
2727
|
{
|
|
2694
2728
|
id: "dateEnd",
|
|
2695
2729
|
label: a,
|
|
2696
|
-
onChange:
|
|
2730
|
+
onChange: F,
|
|
2697
2731
|
value: T,
|
|
2698
2732
|
required: d,
|
|
2699
2733
|
size: "compact",
|
|
@@ -2706,7 +2740,7 @@ const jo = C.div`
|
|
|
2706
2740
|
}
|
|
2707
2741
|
)
|
|
2708
2742
|
] });
|
|
2709
|
-
},
|
|
2743
|
+
}, Ho = (e) => {
|
|
2710
2744
|
const {
|
|
2711
2745
|
activeTab: n,
|
|
2712
2746
|
conditionsErrorText: t,
|
|
@@ -2729,12 +2763,12 @@ const jo = C.div`
|
|
|
2729
2763
|
} = e;
|
|
2730
2764
|
return /* @__PURE__ */ m(z, { children: [
|
|
2731
2765
|
/* @__PURE__ */ i("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2732
|
-
/* @__PURE__ */ i(
|
|
2766
|
+
/* @__PURE__ */ i(je, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ i(y, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
|
|
2733
2767
|
condition: a,
|
|
2734
2768
|
formik: o,
|
|
2735
2769
|
isDecision: !0
|
|
2736
2770
|
}) }) }),
|
|
2737
|
-
/* @__PURE__ */ i(
|
|
2771
|
+
/* @__PURE__ */ i(je, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(y, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2738
2772
|
/* @__PURE__ */ i(
|
|
2739
2773
|
st,
|
|
2740
2774
|
{
|
|
@@ -2745,7 +2779,7 @@ const jo = C.div`
|
|
|
2745
2779
|
),
|
|
2746
2780
|
/* @__PURE__ */ m(y, { justifyContent: "flex-end", alignItems: "center", children: [
|
|
2747
2781
|
/* @__PURE__ */ i(
|
|
2748
|
-
|
|
2782
|
+
j,
|
|
2749
2783
|
{
|
|
2750
2784
|
icon: /* @__PURE__ */ i(Ot, {}),
|
|
2751
2785
|
appearance: "help",
|
|
@@ -2757,7 +2791,7 @@ const jo = C.div`
|
|
|
2757
2791
|
B,
|
|
2758
2792
|
{
|
|
2759
2793
|
type: "button",
|
|
2760
|
-
iconBefore: /* @__PURE__ */ i(
|
|
2794
|
+
iconBefore: /* @__PURE__ */ i(Mt, {}),
|
|
2761
2795
|
variant: "none",
|
|
2762
2796
|
appearance: "gray",
|
|
2763
2797
|
onClick: b,
|
|
@@ -2772,7 +2806,7 @@ const jo = C.div`
|
|
|
2772
2806
|
gap: "16px",
|
|
2773
2807
|
alignItems: "center",
|
|
2774
2808
|
children: [
|
|
2775
|
-
/* @__PURE__ */ i(
|
|
2809
|
+
/* @__PURE__ */ i(Uo, { children: /* @__PURE__ */ i(
|
|
2776
2810
|
Vn,
|
|
2777
2811
|
{
|
|
2778
2812
|
condition: S,
|
|
@@ -2780,7 +2814,7 @@ const jo = C.div`
|
|
|
2780
2814
|
}
|
|
2781
2815
|
) }),
|
|
2782
2816
|
/* @__PURE__ */ i(
|
|
2783
|
-
|
|
2817
|
+
j,
|
|
2784
2818
|
{
|
|
2785
2819
|
icon: /* @__PURE__ */ i(sn, {}),
|
|
2786
2820
|
appearance: "danger",
|
|
@@ -2792,10 +2826,10 @@ const jo = C.div`
|
|
|
2792
2826
|
},
|
|
2793
2827
|
S.conditionName
|
|
2794
2828
|
)) }),
|
|
2795
|
-
p && /* @__PURE__ */ i(
|
|
2829
|
+
p && /* @__PURE__ */ i(R, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2796
2830
|
] }) }),
|
|
2797
|
-
/* @__PURE__ */ i(
|
|
2798
|
-
|
|
2831
|
+
/* @__PURE__ */ i(je, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
|
|
2832
|
+
jo,
|
|
2799
2833
|
{
|
|
2800
2834
|
labelStart: f.termStart,
|
|
2801
2835
|
labelEnd: f.termEnd,
|
|
@@ -2825,7 +2859,7 @@ const jo = C.div`
|
|
|
2825
2859
|
title: "Redefinir la condición",
|
|
2826
2860
|
onCloseModal: D,
|
|
2827
2861
|
children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
2828
|
-
/* @__PURE__ */ i(
|
|
2862
|
+
/* @__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
2863
|
/* @__PURE__ */ m(y, { justifyContent: "end", gap: "12px", children: [
|
|
2830
2864
|
/* @__PURE__ */ i(
|
|
2831
2865
|
B,
|
|
@@ -2844,18 +2878,18 @@ const jo = C.div`
|
|
|
2844
2878
|
}
|
|
2845
2879
|
)
|
|
2846
2880
|
] });
|
|
2847
|
-
},
|
|
2848
|
-
const { label: n, howToSet: t, isFirst: r = !1 } = e, o =
|
|
2881
|
+
}, qo = (e) => {
|
|
2882
|
+
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
2883
|
return `${s} ${d} ${l}`;
|
|
2850
|
-
},
|
|
2851
|
-
function Bo(e) {
|
|
2852
|
-
return qo.test(e);
|
|
2853
|
-
}
|
|
2884
|
+
}, Bo = /^(el|la|los|las)\s/i;
|
|
2854
2885
|
function Go(e) {
|
|
2855
|
-
return
|
|
2886
|
+
return Bo.test(e);
|
|
2856
2887
|
}
|
|
2857
2888
|
function Yo(e) {
|
|
2858
|
-
|
|
2889
|
+
return e.replace(/\s+/g, " ").trim();
|
|
2890
|
+
}
|
|
2891
|
+
function Wo(e) {
|
|
2892
|
+
const n = Xo(e).toLowerCase(), t = /\b(s|es)\b/.test(Qo(e).toLowerCase()) && !n.endsWith("és");
|
|
2859
2893
|
return ({
|
|
2860
2894
|
mano: "f",
|
|
2861
2895
|
día: "m",
|
|
@@ -2867,36 +2901,36 @@ function Yo(e) {
|
|
|
2867
2901
|
antigüedad: "f",
|
|
2868
2902
|
antiguedad: "f",
|
|
2869
2903
|
puntaje: "m"
|
|
2870
|
-
}[n] ??
|
|
2904
|
+
}[n] ?? Zo(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
|
|
2871
2905
|
}
|
|
2872
|
-
function
|
|
2906
|
+
function Xo(e) {
|
|
2873
2907
|
return (e.toLowerCase().split(
|
|
2874
2908
|
/\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
|
|
2875
2909
|
)[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
|
|
2876
2910
|
}
|
|
2877
|
-
function
|
|
2911
|
+
function Qo(e) {
|
|
2878
2912
|
const n = e.trim().split(/\s+/);
|
|
2879
2913
|
return n[n.length - 1] || "";
|
|
2880
2914
|
}
|
|
2881
|
-
function
|
|
2915
|
+
function Zo(e) {
|
|
2882
2916
|
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
2917
|
}
|
|
2884
|
-
function
|
|
2918
|
+
function Ko(e) {
|
|
2885
2919
|
switch (e) {
|
|
2886
|
-
case
|
|
2887
|
-
case
|
|
2888
|
-
case
|
|
2920
|
+
case k.EQUAL:
|
|
2921
|
+
case k.GREATER_THAN:
|
|
2922
|
+
case k.LESS_THAN:
|
|
2889
2923
|
return "sea";
|
|
2890
|
-
case
|
|
2924
|
+
case k.RANGE:
|
|
2891
2925
|
return "esté entre";
|
|
2892
|
-
case
|
|
2893
|
-
case
|
|
2926
|
+
case k.LIST_OF_VALUES:
|
|
2927
|
+
case k.LIST_OF_VALUES_MULTI:
|
|
2894
2928
|
return "esté en";
|
|
2895
2929
|
default:
|
|
2896
2930
|
return "sea";
|
|
2897
2931
|
}
|
|
2898
2932
|
}
|
|
2899
|
-
const
|
|
2933
|
+
const Jo = (e) => {
|
|
2900
2934
|
if (typeof e == "string") {
|
|
2901
2935
|
const n = e.toLowerCase();
|
|
2902
2936
|
if (n.includes("equal")) return se.EQUAL;
|
|
@@ -2908,8 +2942,8 @@ const Ko = (e) => {
|
|
|
2908
2942
|
return se.LIST_OF_VALUES;
|
|
2909
2943
|
}
|
|
2910
2944
|
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
|
|
2945
|
+
}, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ea = (e) => {
|
|
2946
|
+
var L;
|
|
2913
2947
|
const {
|
|
2914
2948
|
decision: n,
|
|
2915
2949
|
onSubmitEvent: t,
|
|
@@ -2918,103 +2952,103 @@ const Ko = (e) => {
|
|
|
2918
2952
|
onRemoveCondition: a,
|
|
2919
2953
|
onRestoreConditions: s,
|
|
2920
2954
|
fullTemplate: d
|
|
2921
|
-
} = e, { formik: l, handleToggleNoneChange: p } =
|
|
2955
|
+
} = e, { formik: l, handleToggleNoneChange: p } = _o({
|
|
2922
2956
|
decision: n,
|
|
2923
2957
|
onSubmitEvent: t,
|
|
2924
2958
|
textValues: r
|
|
2925
|
-
}), c =
|
|
2959
|
+
}), c = Pe(d ?? n), g = Pe(n), f = ht(
|
|
2926
2960
|
g,
|
|
2927
|
-
(
|
|
2961
|
+
(I) => !I.hidden
|
|
2928
2962
|
), h = Object.keys(f), x = [
|
|
2929
|
-
...h.filter((
|
|
2930
|
-
...h.filter((
|
|
2963
|
+
...h.filter((I) => I === "group-primary"),
|
|
2964
|
+
...h.filter((I) => I !== "group-primary")
|
|
2931
2965
|
], b = {};
|
|
2932
2966
|
let D = 1;
|
|
2933
|
-
const T = x.map((
|
|
2934
|
-
const
|
|
2935
|
-
return b[
|
|
2936
|
-
id:
|
|
2937
|
-
label:
|
|
2967
|
+
const T = x.map((I) => {
|
|
2968
|
+
const U = I === "group-primary" ? "mainCondition" : `alternateCondition-${D++}`;
|
|
2969
|
+
return b[U] = I, {
|
|
2970
|
+
id: U,
|
|
2971
|
+
label: I === "group-primary" ? Yn(I, 0) : Yn(I, Number(U.split("-").at(-1))),
|
|
2938
2972
|
isDisabled: !1
|
|
2939
2973
|
};
|
|
2940
|
-
}), [S, N] =
|
|
2941
|
-
((
|
|
2942
|
-
), w = (
|
|
2943
|
-
const
|
|
2974
|
+
}), [S, N] = P.useState(
|
|
2975
|
+
((L = T[0]) == null ? void 0 : L.id) ?? "mainCondition"
|
|
2976
|
+
), w = (I) => N(I), F = b[S] ?? "group-primary", O = P.useMemo(() => {
|
|
2977
|
+
const I = [
|
|
2944
2978
|
...Object.keys(f).filter((K) => K === "group-primary"),
|
|
2945
2979
|
...Object.keys(f).filter((K) => K !== "group-primary")
|
|
2946
2980
|
];
|
|
2947
|
-
let
|
|
2948
|
-
const Q =
|
|
2981
|
+
let U = !1;
|
|
2982
|
+
const Q = I.map((K) => {
|
|
2949
2983
|
const At = (f[K] ?? []).map((Ke, $t) => {
|
|
2950
|
-
const
|
|
2951
|
-
|
|
2952
|
-
const It =
|
|
2984
|
+
const Pn = !U && K === "group-primary" && $t === 0;
|
|
2985
|
+
Pn && (U = !0);
|
|
2986
|
+
const It = Jo(Ke.howToSetTheCondition ?? Ke.valueUse), Rt = qo({
|
|
2953
2987
|
label: Ke.labelName || "",
|
|
2954
2988
|
howToSet: It,
|
|
2955
|
-
isFirst:
|
|
2989
|
+
isFirst: Pn
|
|
2956
2990
|
});
|
|
2957
2991
|
return { ...Ke, labelName: Rt };
|
|
2958
2992
|
});
|
|
2959
2993
|
return [K, At];
|
|
2960
2994
|
});
|
|
2961
2995
|
return Object.fromEntries(Q);
|
|
2962
|
-
}, [f]),
|
|
2996
|
+
}, [f]), $ = O[F] ?? [], V = O["group-primary"] ?? [], Z = {
|
|
2963
2997
|
decisionDataType: n.decisionDataType,
|
|
2964
2998
|
howToSetTheCondition: n.howToSetTheDecision,
|
|
2965
2999
|
labelName: n.labelName,
|
|
2966
3000
|
listOfPossibleValues: n.listOfPossibleValues,
|
|
2967
3001
|
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
|
|
3002
|
+
}, 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(() => {
|
|
3003
|
+
const I = l.errors.conditionsThatEstablishesTheDecision;
|
|
3004
|
+
if (!I) return;
|
|
3005
|
+
if (typeof I == "string") return I;
|
|
3006
|
+
const U = (Q) => {
|
|
2973
3007
|
if (Q) {
|
|
2974
3008
|
if (typeof Q == "string") return Q;
|
|
2975
3009
|
if (Array.isArray(Q))
|
|
2976
3010
|
for (const K of Q) {
|
|
2977
|
-
const we =
|
|
3011
|
+
const we = U(K);
|
|
2978
3012
|
if (we) return we;
|
|
2979
3013
|
}
|
|
2980
3014
|
else if (typeof Q == "object")
|
|
2981
3015
|
for (const K of Object.values(Q)) {
|
|
2982
|
-
const we =
|
|
3016
|
+
const we = U(K);
|
|
2983
3017
|
if (we) return we;
|
|
2984
3018
|
}
|
|
2985
3019
|
}
|
|
2986
3020
|
};
|
|
2987
|
-
return
|
|
2988
|
-
}, [l.errors.conditionsThatEstablishesTheDecision]), Ne = l.submitCount > 0 && !!ye, ue = (
|
|
2989
|
-
const Q = Object.values(c).flat().find((we) => we.conditionName ===
|
|
3021
|
+
return U(I);
|
|
3022
|
+
}, [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) => {
|
|
3023
|
+
const Q = Object.values(c).flat().find((we) => we.conditionName === I), K = ue(Q);
|
|
2990
3024
|
l.setFieldValue(
|
|
2991
|
-
`conditionsThatEstablishesTheDecision.${
|
|
3025
|
+
`conditionsThatEstablishesTheDecision.${I}`,
|
|
2992
3026
|
K
|
|
2993
3027
|
), l.setFieldTouched(
|
|
2994
|
-
`conditionsThatEstablishesTheDecision.${
|
|
3028
|
+
`conditionsThatEstablishesTheDecision.${I}`,
|
|
2995
3029
|
!1,
|
|
2996
3030
|
!1
|
|
2997
3031
|
);
|
|
2998
3032
|
}, Te = () => {
|
|
2999
|
-
(c[
|
|
3000
|
-
const Q = `conditionsThatEstablishesTheDecision.${
|
|
3001
|
-
l.setFieldValue(Q, ue(
|
|
3033
|
+
(c[F] ?? []).forEach((U) => {
|
|
3034
|
+
const Q = `conditionsThatEstablishesTheDecision.${U.conditionName}`;
|
|
3035
|
+
l.setFieldValue(Q, ue(U)), l.setFieldTouched(Q, !1, !1);
|
|
3002
3036
|
});
|
|
3003
|
-
}, [me, le] =
|
|
3037
|
+
}, [me, le] = P.useState(!1);
|
|
3004
3038
|
return /* @__PURE__ */ i(
|
|
3005
|
-
|
|
3039
|
+
Ho,
|
|
3006
3040
|
{
|
|
3007
3041
|
activeTab: S,
|
|
3008
3042
|
conditionsErrorText: ye,
|
|
3009
|
-
currentConditions:
|
|
3043
|
+
currentConditions: $,
|
|
3010
3044
|
decision: n,
|
|
3011
3045
|
formik: l,
|
|
3012
3046
|
normalizedDecision: Z,
|
|
3013
3047
|
onCancel: o,
|
|
3014
3048
|
onRedefineCurrentTab: Te,
|
|
3015
3049
|
onTabChange: w,
|
|
3016
|
-
onClearCondition: (
|
|
3017
|
-
xe(
|
|
3050
|
+
onClearCondition: (I) => {
|
|
3051
|
+
xe(I), a == null || a(I);
|
|
3018
3052
|
},
|
|
3019
3053
|
showConditionsError: Ne,
|
|
3020
3054
|
tabs: T,
|
|
@@ -3022,7 +3056,7 @@ const Ko = (e) => {
|
|
|
3022
3056
|
termStartStatus: fe,
|
|
3023
3057
|
textValues: r,
|
|
3024
3058
|
visibleConditions: V,
|
|
3025
|
-
visibleConditionsByGroup:
|
|
3059
|
+
visibleConditionsByGroup: O,
|
|
3026
3060
|
handleToggleNoneChange: p,
|
|
3027
3061
|
portalId: "redefine-confirm-portal",
|
|
3028
3062
|
showRedefineConfirm: me,
|
|
@@ -3030,14 +3064,14 @@ const Ko = (e) => {
|
|
|
3030
3064
|
onCloseRedefineConfirm: () => le(!1),
|
|
3031
3065
|
onConfirmRedefine: () => {
|
|
3032
3066
|
Te();
|
|
3033
|
-
const
|
|
3034
|
-
(
|
|
3067
|
+
const I = (c[F] ?? []).map(
|
|
3068
|
+
(U) => U.conditionName
|
|
3035
3069
|
);
|
|
3036
|
-
s == null || s(
|
|
3070
|
+
s == null || s(I), le(!1);
|
|
3037
3071
|
}
|
|
3038
3072
|
}
|
|
3039
3073
|
);
|
|
3040
|
-
},
|
|
3074
|
+
}, vl = (e) => {
|
|
3041
3075
|
const {
|
|
3042
3076
|
cardTitle: n = !0,
|
|
3043
3077
|
controls: t = !0,
|
|
@@ -3057,7 +3091,7 @@ const Ko = (e) => {
|
|
|
3057
3091
|
onRemoveCondition: b,
|
|
3058
3092
|
onRestoreConditions: D,
|
|
3059
3093
|
baseDecisionTemplate: T
|
|
3060
|
-
} = e, [S, N] =
|
|
3094
|
+
} = e, [S, N] = H(null), w = re("(max-width: 681px)"), { renderedCards: F, shouldRenderAddCard: O } = Io({
|
|
3061
3095
|
cardTitle: n,
|
|
3062
3096
|
controls: t,
|
|
3063
3097
|
customTitleContentAddCard: r,
|
|
@@ -3068,9 +3102,9 @@ const Ko = (e) => {
|
|
|
3068
3102
|
textValues: s,
|
|
3069
3103
|
isOpenFor: (V) => S === V,
|
|
3070
3104
|
toggleAt: (V) => N((Z) => Z === V ? null : V)
|
|
3071
|
-
}),
|
|
3105
|
+
}), $ = (a == null ? void 0 : a.length) === 0 && !u;
|
|
3072
3106
|
return /* @__PURE__ */ m(z, { children: [
|
|
3073
|
-
/* @__PURE__ */ i(
|
|
3107
|
+
/* @__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
3108
|
y,
|
|
3075
3109
|
{
|
|
3076
3110
|
direction: "column",
|
|
@@ -3080,15 +3114,15 @@ const Ko = (e) => {
|
|
|
3080
3114
|
alignItems: "center",
|
|
3081
3115
|
children: [
|
|
3082
3116
|
/* @__PURE__ */ i(
|
|
3083
|
-
|
|
3117
|
+
j,
|
|
3084
3118
|
{
|
|
3085
3119
|
appearance: "help",
|
|
3086
|
-
icon: /* @__PURE__ */ i(
|
|
3120
|
+
icon: /* @__PURE__ */ i(Pt, {}),
|
|
3087
3121
|
size: "40px"
|
|
3088
3122
|
}
|
|
3089
3123
|
),
|
|
3090
3124
|
/* @__PURE__ */ i(
|
|
3091
|
-
|
|
3125
|
+
R,
|
|
3092
3126
|
{
|
|
3093
3127
|
type: "title",
|
|
3094
3128
|
size: "medium",
|
|
@@ -3097,7 +3131,7 @@ const Ko = (e) => {
|
|
|
3097
3131
|
children: "Sin decisiones"
|
|
3098
3132
|
}
|
|
3099
3133
|
),
|
|
3100
|
-
/* @__PURE__ */ i(
|
|
3134
|
+
/* @__PURE__ */ i(R, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */ m(z, { children: [
|
|
3101
3135
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
3102
3136
|
r || ' "Agregar decisión"'
|
|
3103
3137
|
] }) })
|
|
@@ -3116,8 +3150,8 @@ const Ko = (e) => {
|
|
|
3116
3150
|
padding: "6px",
|
|
3117
3151
|
height: w ? "auto" : "484px",
|
|
3118
3152
|
children: [
|
|
3119
|
-
|
|
3120
|
-
|
|
3153
|
+
F,
|
|
3154
|
+
O && Sn({
|
|
3121
3155
|
type: "add",
|
|
3122
3156
|
index: a == null ? void 0 : a.length,
|
|
3123
3157
|
controls: t,
|
|
@@ -3127,21 +3161,21 @@ const Ko = (e) => {
|
|
|
3127
3161
|
handleOpenModal: c,
|
|
3128
3162
|
handleDelete: h,
|
|
3129
3163
|
textValues: s,
|
|
3130
|
-
shouldRenderEmptyMessage:
|
|
3164
|
+
shouldRenderEmptyMessage: $,
|
|
3131
3165
|
terms: x
|
|
3132
3166
|
})
|
|
3133
3167
|
]
|
|
3134
3168
|
}
|
|
3135
3169
|
) }) }) }),
|
|
3136
3170
|
l && /* @__PURE__ */ i(
|
|
3137
|
-
|
|
3171
|
+
Lo,
|
|
3138
3172
|
{
|
|
3139
3173
|
portalId: "modal-portal",
|
|
3140
3174
|
onCloseModal: g,
|
|
3141
3175
|
title: p ? "Editar Decisión" : "Configurar Decisión",
|
|
3142
3176
|
description: "Diligencia los campos para configurar tu decisión.",
|
|
3143
3177
|
children: /* @__PURE__ */ i(
|
|
3144
|
-
|
|
3178
|
+
ea,
|
|
3145
3179
|
{
|
|
3146
3180
|
decision: p || d,
|
|
3147
3181
|
fullTemplate: T ?? d,
|
|
@@ -3156,16 +3190,16 @@ const Ko = (e) => {
|
|
|
3156
3190
|
}
|
|
3157
3191
|
)
|
|
3158
3192
|
] });
|
|
3159
|
-
},
|
|
3193
|
+
}, na = {
|
|
3160
3194
|
border: {
|
|
3161
3195
|
color: E.palette.neutral.N40
|
|
3162
3196
|
}
|
|
3163
|
-
},
|
|
3197
|
+
}, ta = C.div`
|
|
3164
3198
|
border-width: 1px;
|
|
3165
3199
|
border-style: solid;
|
|
3166
3200
|
border-color: ${({ theme: e }) => {
|
|
3167
3201
|
var n, t;
|
|
3168
|
-
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) ||
|
|
3202
|
+
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || na.border.color;
|
|
3169
3203
|
}};
|
|
3170
3204
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
3171
3205
|
margin: ${({ $margin: e }) => e};
|
|
@@ -3174,7 +3208,7 @@ const Ko = (e) => {
|
|
|
3174
3208
|
height: ${({ $height: e }) => e};
|
|
3175
3209
|
box-sizing: border-box;
|
|
3176
3210
|
`;
|
|
3177
|
-
function
|
|
3211
|
+
function ra(e) {
|
|
3178
3212
|
const {
|
|
3179
3213
|
children: n,
|
|
3180
3214
|
padding: t = "16px",
|
|
@@ -3184,7 +3218,7 @@ function ta(e) {
|
|
|
3184
3218
|
height: s
|
|
3185
3219
|
} = e;
|
|
3186
3220
|
return /* @__PURE__ */ i(
|
|
3187
|
-
|
|
3221
|
+
ta,
|
|
3188
3222
|
{
|
|
3189
3223
|
$padding: t,
|
|
3190
3224
|
$margin: r,
|
|
@@ -3195,8 +3229,8 @@ function ta(e) {
|
|
|
3195
3229
|
}
|
|
3196
3230
|
);
|
|
3197
3231
|
}
|
|
3198
|
-
const
|
|
3199
|
-
const [t, r] =
|
|
3232
|
+
const oa = (e, n) => {
|
|
3233
|
+
const [t, r] = H([]), [o, a] = H([]), [s, d] = H(!1), l = Fe(null);
|
|
3200
3234
|
return $e(() => {
|
|
3201
3235
|
if (!e.current || !l.current) return;
|
|
3202
3236
|
const p = e.current, u = l.current, c = () => {
|
|
@@ -3222,19 +3256,19 @@ C.div`
|
|
|
3222
3256
|
width: 100%;
|
|
3223
3257
|
}
|
|
3224
3258
|
`;
|
|
3225
|
-
const
|
|
3259
|
+
const aa = C.div`
|
|
3226
3260
|
position: absolute;
|
|
3227
3261
|
top: calc(100% + 4px);
|
|
3228
3262
|
right: 0;
|
|
3229
3263
|
z-index: 1000;
|
|
3230
3264
|
width: 170px;
|
|
3231
|
-
`,
|
|
3265
|
+
`, ia = C.div`
|
|
3232
3266
|
position: absolute;
|
|
3233
3267
|
visibility: hidden;
|
|
3234
3268
|
pointer-events: none;
|
|
3235
3269
|
height: 0;
|
|
3236
3270
|
overflow: hidden;
|
|
3237
|
-
`,
|
|
3271
|
+
`, la = C.div`
|
|
3238
3272
|
cursor: pointer;
|
|
3239
3273
|
`, En = {
|
|
3240
3274
|
border: {
|
|
@@ -3272,7 +3306,7 @@ const oa = C.div`
|
|
|
3272
3306
|
hover: E.palette.neutral.N30
|
|
3273
3307
|
}
|
|
3274
3308
|
}
|
|
3275
|
-
},
|
|
3309
|
+
}, sa = C.li`
|
|
3276
3310
|
display: flex;
|
|
3277
3311
|
align-items: center;
|
|
3278
3312
|
align-self: stretch;
|
|
@@ -3290,11 +3324,11 @@ const oa = C.div`
|
|
|
3290
3324
|
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
3325
|
}};
|
|
3292
3326
|
}
|
|
3293
|
-
`,
|
|
3327
|
+
`, da = (e) => {
|
|
3294
3328
|
var g, f, h, x, b, D;
|
|
3295
|
-
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, s] =
|
|
3329
|
+
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
3330
|
return /* @__PURE__ */ i(
|
|
3297
|
-
|
|
3331
|
+
sa,
|
|
3298
3332
|
{
|
|
3299
3333
|
id: n,
|
|
3300
3334
|
onMouseEnter: d,
|
|
@@ -3311,7 +3345,7 @@ const oa = C.div`
|
|
|
3311
3345
|
width: "100%",
|
|
3312
3346
|
children: [
|
|
3313
3347
|
r && /* @__PURE__ */ i(
|
|
3314
|
-
|
|
3348
|
+
j,
|
|
3315
3349
|
{
|
|
3316
3350
|
icon: r,
|
|
3317
3351
|
size: "medium",
|
|
@@ -3319,7 +3353,7 @@ const oa = C.div`
|
|
|
3319
3353
|
}
|
|
3320
3354
|
),
|
|
3321
3355
|
/* @__PURE__ */ i(
|
|
3322
|
-
|
|
3356
|
+
R,
|
|
3323
3357
|
{
|
|
3324
3358
|
textAlign: "start",
|
|
3325
3359
|
size: "medium",
|
|
@@ -3328,7 +3362,7 @@ const oa = C.div`
|
|
|
3328
3362
|
}
|
|
3329
3363
|
),
|
|
3330
3364
|
/* @__PURE__ */ i(
|
|
3331
|
-
|
|
3365
|
+
j,
|
|
3332
3366
|
{
|
|
3333
3367
|
icon: /* @__PURE__ */ i(zt, {}),
|
|
3334
3368
|
size: "small",
|
|
@@ -3344,7 +3378,7 @@ const oa = C.div`
|
|
|
3344
3378
|
)
|
|
3345
3379
|
}
|
|
3346
3380
|
);
|
|
3347
|
-
},
|
|
3381
|
+
}, yl = (e) => {
|
|
3348
3382
|
const {
|
|
3349
3383
|
appliedFilters: n = [],
|
|
3350
3384
|
onClear: t,
|
|
@@ -3357,14 +3391,14 @@ const oa = C.div`
|
|
|
3357
3391
|
hidden: c,
|
|
3358
3392
|
showOverflowIndicator: g,
|
|
3359
3393
|
measurementRef: f
|
|
3360
|
-
} =
|
|
3361
|
-
w.stopPropagation(), x((
|
|
3394
|
+
} = oa(d, n), [h, x] = H(!1), b = (w) => {
|
|
3395
|
+
w.stopPropagation(), x((F) => !F);
|
|
3362
3396
|
};
|
|
3363
3397
|
$e(() => {
|
|
3364
|
-
const w = (
|
|
3398
|
+
const w = (F) => {
|
|
3365
3399
|
var V, Z;
|
|
3366
|
-
const
|
|
3367
|
-
!((V = l.current) != null && V.contains(
|
|
3400
|
+
const O = F.target;
|
|
3401
|
+
!((V = l.current) != null && V.contains(O)) && !((Z = p.current) != null && Z.contains(O)) && x(!1);
|
|
3368
3402
|
};
|
|
3369
3403
|
return h && window.addEventListener("mousedown", w), () => window.removeEventListener("mousedown", w);
|
|
3370
3404
|
}, [h]);
|
|
@@ -3374,11 +3408,11 @@ const oa = C.div`
|
|
|
3374
3408
|
label: w.label,
|
|
3375
3409
|
icon: w.icon
|
|
3376
3410
|
})), N = (w) => {
|
|
3377
|
-
var
|
|
3378
|
-
(
|
|
3411
|
+
var F, O;
|
|
3412
|
+
(O = (F = c.find(($) => $.label === w)) == null ? void 0 : F.onClose) == null || O.call(F), x(!1);
|
|
3379
3413
|
};
|
|
3380
|
-
return /* @__PURE__ */ m(
|
|
3381
|
-
/* @__PURE__ */ i(
|
|
3414
|
+
return /* @__PURE__ */ m(ra, { borderRadius: "8px", width: "100%", children: [
|
|
3415
|
+
/* @__PURE__ */ i(ia, { ref: f, children: n.map((w) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
|
|
3382
3416
|
ke,
|
|
3383
3417
|
{
|
|
3384
3418
|
appearance: "primary",
|
|
@@ -3402,7 +3436,7 @@ const oa = C.div`
|
|
|
3402
3436
|
alignItems: "center",
|
|
3403
3437
|
padding: "0px 8px",
|
|
3404
3438
|
border: !0,
|
|
3405
|
-
children: D ? /* @__PURE__ */ i(
|
|
3439
|
+
children: D ? /* @__PURE__ */ i(R, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(z, { children: [
|
|
3406
3440
|
u.map((w) => /* @__PURE__ */ i(
|
|
3407
3441
|
ke,
|
|
3408
3442
|
{
|
|
@@ -3422,27 +3456,27 @@ const oa = C.div`
|
|
|
3422
3456
|
ref: p,
|
|
3423
3457
|
style: { position: "relative", display: "inline-block" },
|
|
3424
3458
|
children: [
|
|
3425
|
-
/* @__PURE__ */ i(
|
|
3459
|
+
/* @__PURE__ */ i(la, { onClick: b, children: /* @__PURE__ */ i(
|
|
3426
3460
|
ke,
|
|
3427
3461
|
{
|
|
3428
3462
|
appearance: "primary",
|
|
3429
3463
|
label: `+${c.length}`
|
|
3430
3464
|
}
|
|
3431
3465
|
) }),
|
|
3432
|
-
T && /* @__PURE__ */ i(
|
|
3466
|
+
T && /* @__PURE__ */ i(aa, { ref: l, children: /* @__PURE__ */ i(
|
|
3433
3467
|
Gt,
|
|
3434
3468
|
{
|
|
3435
3469
|
options: S,
|
|
3436
3470
|
onOptionClick: N,
|
|
3437
3471
|
children: c.map((w) => /* @__PURE__ */ i(
|
|
3438
|
-
|
|
3472
|
+
da,
|
|
3439
3473
|
{
|
|
3440
3474
|
id: w.label,
|
|
3441
3475
|
label: w.label,
|
|
3442
3476
|
leadingIcon: w.icon,
|
|
3443
3477
|
onClose: () => {
|
|
3444
|
-
var
|
|
3445
|
-
(
|
|
3478
|
+
var F;
|
|
3479
|
+
(F = w.onClose) == null || F.call(w), x(!1);
|
|
3446
3480
|
}
|
|
3447
3481
|
},
|
|
3448
3482
|
w.label
|
|
@@ -3478,7 +3512,7 @@ const oa = C.div`
|
|
|
3478
3512
|
)
|
|
3479
3513
|
] })
|
|
3480
3514
|
] });
|
|
3481
|
-
},
|
|
3515
|
+
}, ca = C.div`
|
|
3482
3516
|
display: flex;
|
|
3483
3517
|
flex-direction: column;
|
|
3484
3518
|
background-color: ${({ theme: e }) => {
|
|
@@ -3491,7 +3525,7 @@ const oa = C.div`
|
|
|
3491
3525
|
padding: 24px;
|
|
3492
3526
|
gap: 24px;
|
|
3493
3527
|
box-sizing: border-box;
|
|
3494
|
-
`,
|
|
3528
|
+
`, xl = (e) => {
|
|
3495
3529
|
const {
|
|
3496
3530
|
actionButtonLabel: n,
|
|
3497
3531
|
cancelButtonLabel: t,
|
|
@@ -3507,14 +3541,14 @@ const oa = C.div`
|
|
|
3507
3541
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
3508
3542
|
);
|
|
3509
3543
|
return pn(
|
|
3510
|
-
/* @__PURE__ */ i(cn, { children: /* @__PURE__ */ m(
|
|
3544
|
+
/* @__PURE__ */ i(cn, { children: /* @__PURE__ */ m(ca, { $smallScreen: p, children: [
|
|
3511
3545
|
/* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
3512
3546
|
/* @__PURE__ */ m(y, { alignContent: "center", justifyContent: "space-between", children: [
|
|
3513
|
-
/* @__PURE__ */ i(
|
|
3547
|
+
/* @__PURE__ */ i(R, { appearance: "dark", size: "small", type: "headline", children: l }),
|
|
3514
3548
|
/* @__PURE__ */ m(y, { alignItems: "center", children: [
|
|
3515
|
-
/* @__PURE__ */ i(
|
|
3549
|
+
/* @__PURE__ */ i(R, { children: "Cerrar" }),
|
|
3516
3550
|
/* @__PURE__ */ i(
|
|
3517
|
-
|
|
3551
|
+
j,
|
|
3518
3552
|
{
|
|
3519
3553
|
appearance: "dark",
|
|
3520
3554
|
icon: /* @__PURE__ */ i(dn, {}),
|
|
@@ -3554,12 +3588,12 @@ const oa = C.div`
|
|
|
3554
3588
|
] }) }),
|
|
3555
3589
|
u
|
|
3556
3590
|
);
|
|
3557
|
-
},
|
|
3591
|
+
}, Tl = (e) => {
|
|
3558
3592
|
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a = re("(max-width: 768px)"), s = !n || n.length === 0;
|
|
3559
3593
|
return /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
3560
3594
|
a && /* @__PURE__ */ m(z, { children: [
|
|
3561
3595
|
/* @__PURE__ */ m(y, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
3562
|
-
/* @__PURE__ */ i(
|
|
3596
|
+
/* @__PURE__ */ i(j, { appearance: "gray", icon: /* @__PURE__ */ i(lt, {}) }),
|
|
3563
3597
|
/* @__PURE__ */ i(
|
|
3564
3598
|
ie,
|
|
3565
3599
|
{
|
|
@@ -3572,7 +3606,7 @@ const oa = C.div`
|
|
|
3572
3606
|
border: !0,
|
|
3573
3607
|
width: "100%",
|
|
3574
3608
|
height: "36px",
|
|
3575
|
-
children: s ? /* @__PURE__ */ i(
|
|
3609
|
+
children: s ? /* @__PURE__ */ i(R, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ i(
|
|
3576
3610
|
ke,
|
|
3577
3611
|
{
|
|
3578
3612
|
appearance: "primary",
|
|
@@ -3590,7 +3624,7 @@ const oa = C.div`
|
|
|
3590
3624
|
/* @__PURE__ */ i(G, { dashed: !0 })
|
|
3591
3625
|
] }),
|
|
3592
3626
|
t.map((d) => /* @__PURE__ */ m(y, { gap: "6px", alignItems: "center", children: [
|
|
3593
|
-
/* @__PURE__ */ i(y, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(
|
|
3627
|
+
/* @__PURE__ */ i(y, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(j, { appearance: "primary", icon: d.icon }) }),
|
|
3594
3628
|
/* @__PURE__ */ i(
|
|
3595
3629
|
Yt,
|
|
3596
3630
|
{
|
|
@@ -3610,12 +3644,12 @@ const oa = C.div`
|
|
|
3610
3644
|
)
|
|
3611
3645
|
] }, d.name))
|
|
3612
3646
|
] });
|
|
3613
|
-
},
|
|
3647
|
+
}, ua = (e) => {
|
|
3614
3648
|
const n = [];
|
|
3615
3649
|
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
|
-
},
|
|
3650
|
+
}, wl = (e) => {
|
|
3617
3651
|
var s;
|
|
3618
|
-
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ?
|
|
3652
|
+
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
3653
|
var c;
|
|
3620
3654
|
const p = d == null ? void 0 : d.value;
|
|
3621
3655
|
return p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0 ? null : {
|
|
@@ -3631,7 +3665,7 @@ const oa = C.div`
|
|
|
3631
3665
|
value: o(n.value),
|
|
3632
3666
|
conditionsThatEstablishesTheDecision: a
|
|
3633
3667
|
};
|
|
3634
|
-
},
|
|
3668
|
+
}, Cl = (e) => {
|
|
3635
3669
|
if (typeof e != "string") return e;
|
|
3636
3670
|
const n = e.split(";").map((r) => r.trim()), t = {};
|
|
3637
3671
|
for (const r of n)
|
|
@@ -3643,7 +3677,7 @@ const oa = C.div`
|
|
|
3643
3677
|
isNaN(o) || (t.to = o);
|
|
3644
3678
|
}
|
|
3645
3679
|
return t.from !== void 0 || t.to !== void 0 ? t : e;
|
|
3646
|
-
},
|
|
3680
|
+
}, Dl = (e) => {
|
|
3647
3681
|
const { dataDecision: n, originalDecision: t } = e, r = {
|
|
3648
3682
|
conditionName: n.ruleName || "",
|
|
3649
3683
|
labelName: n.labelName || "",
|
|
@@ -3659,7 +3693,7 @@ const oa = C.div`
|
|
|
3659
3693
|
(o) => o.hidden ? { ...r } : o
|
|
3660
3694
|
)
|
|
3661
3695
|
};
|
|
3662
|
-
},
|
|
3696
|
+
}, Sl = (e) => {
|
|
3663
3697
|
const { decisions: n } = e;
|
|
3664
3698
|
return n == null ? void 0 : n.map((t) => {
|
|
3665
3699
|
var o;
|
|
@@ -3678,14 +3712,14 @@ const oa = C.div`
|
|
|
3678
3712
|
)
|
|
3679
3713
|
} : t;
|
|
3680
3714
|
});
|
|
3681
|
-
},
|
|
3715
|
+
}, pa = (e) => ({
|
|
3682
3716
|
schema: de().required("Requerido").test(
|
|
3683
3717
|
"non-empty",
|
|
3684
3718
|
"El valor no puede estar vacío",
|
|
3685
3719
|
(n) => n != null && n.trim() !== ""
|
|
3686
3720
|
),
|
|
3687
3721
|
value: e
|
|
3688
|
-
}),
|
|
3722
|
+
}), ga = (e) => ({
|
|
3689
3723
|
schema: Ve().test(
|
|
3690
3724
|
"isArrayOrString",
|
|
3691
3725
|
"Debe ser un array de strings/numbers o un solo string",
|
|
@@ -3694,7 +3728,7 @@ const oa = C.div`
|
|
|
3694
3728
|
) : typeof n == "string"
|
|
3695
3729
|
),
|
|
3696
3730
|
value: e
|
|
3697
|
-
}),
|
|
3731
|
+
}), ha = (e) => ({
|
|
3698
3732
|
schema: Ve().test(
|
|
3699
3733
|
"isArrayOrString",
|
|
3700
3734
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
@@ -3703,7 +3737,7 @@ const oa = C.div`
|
|
|
3703
3737
|
) : typeof n == "string"
|
|
3704
3738
|
),
|
|
3705
3739
|
value: e
|
|
3706
|
-
}),
|
|
3740
|
+
}), fa = (e) => {
|
|
3707
3741
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
3708
3742
|
return {
|
|
3709
3743
|
schema: te({
|
|
@@ -3719,28 +3753,28 @@ const oa = C.div`
|
|
|
3719
3753
|
}),
|
|
3720
3754
|
value: { from: n, to: t }
|
|
3721
3755
|
};
|
|
3722
|
-
}, yn = (e, n) => n ===
|
|
3756
|
+
}, yn = (e, n) => n === q.PERCENTAGE ? {
|
|
3723
3757
|
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
3758
|
value: e
|
|
3725
3759
|
} : {
|
|
3726
3760
|
schema: de().required("Requerido"),
|
|
3727
3761
|
value: e
|
|
3728
|
-
},
|
|
3729
|
-
[
|
|
3730
|
-
[
|
|
3731
|
-
[
|
|
3732
|
-
[
|
|
3733
|
-
[
|
|
3734
|
-
[
|
|
3735
|
-
}, Wn = (e) =>
|
|
3736
|
-
function
|
|
3762
|
+
}, ma = {
|
|
3763
|
+
[k.LIST_OF_VALUES]: ga,
|
|
3764
|
+
[k.LIST_OF_VALUES_MULTI]: ha,
|
|
3765
|
+
[k.RANGE]: fa,
|
|
3766
|
+
[k.GREATER_THAN]: yn,
|
|
3767
|
+
[k.LESS_THAN]: yn,
|
|
3768
|
+
[k.EQUAL]: yn
|
|
3769
|
+
}, Wn = (e) => ma[e] || pa;
|
|
3770
|
+
function ba({
|
|
3737
3771
|
decision: e,
|
|
3738
3772
|
onSubmitEvent: n,
|
|
3739
3773
|
textValues: t
|
|
3740
3774
|
}) {
|
|
3741
3775
|
const r = {
|
|
3742
3776
|
ruleName: e.ruleName || "",
|
|
3743
|
-
decisionDataType: e.decisionDataType ||
|
|
3777
|
+
decisionDataType: e.decisionDataType || q.ALPHABETICAL,
|
|
3744
3778
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
3745
3779
|
value: e.value || "",
|
|
3746
3780
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -3817,9 +3851,9 @@ function ma({
|
|
|
3817
3851
|
return te(c);
|
|
3818
3852
|
})
|
|
3819
3853
|
};
|
|
3820
|
-
t.terms && (a.effectiveFrom =
|
|
3854
|
+
t.terms && (a.effectiveFrom = Me().required(
|
|
3821
3855
|
"La fecha de inicio es requerida"
|
|
3822
|
-
), a.validUntil =
|
|
3856
|
+
), a.validUntil = Me().when(
|
|
3823
3857
|
"checkClosed",
|
|
3824
3858
|
(l, p, { parent: u }) => (u == null ? void 0 : u.checkClosed) ? p.required("La fecha de finalización es requerida").test(
|
|
3825
3859
|
"is-after-startDate",
|
|
@@ -3864,7 +3898,7 @@ function ma({
|
|
|
3864
3898
|
void 0
|
|
3865
3899
|
);
|
|
3866
3900
|
else {
|
|
3867
|
-
const c = u.howToSetTheCondition ===
|
|
3901
|
+
const c = u.howToSetTheCondition === k.LIST_OF_VALUES_MULTI ? [] : "";
|
|
3868
3902
|
o.setFieldValue(
|
|
3869
3903
|
`conditionsThatEstablishesTheDecision.${u.conditionName}`,
|
|
3870
3904
|
c
|
|
@@ -3873,7 +3907,7 @@ function ma({
|
|
|
3873
3907
|
});
|
|
3874
3908
|
} };
|
|
3875
3909
|
}
|
|
3876
|
-
const
|
|
3910
|
+
const va = C.div`
|
|
3877
3911
|
& > div {
|
|
3878
3912
|
border-radius: 8px;
|
|
3879
3913
|
border: 1px solid
|
|
@@ -3882,7 +3916,7 @@ const ba = C.div`
|
|
|
3882
3916
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
|
|
3883
3917
|
}};
|
|
3884
3918
|
}
|
|
3885
|
-
`,
|
|
3919
|
+
`, ya = C.div`
|
|
3886
3920
|
width: 100%;
|
|
3887
3921
|
height: 100%;
|
|
3888
3922
|
overflow-y: auto;
|
|
@@ -3899,7 +3933,7 @@ const ba = C.div`
|
|
|
3899
3933
|
background-color: #ebecf0;
|
|
3900
3934
|
border-radius: 8px;
|
|
3901
3935
|
}
|
|
3902
|
-
`,
|
|
3936
|
+
`, xa = (e) => {
|
|
3903
3937
|
const {
|
|
3904
3938
|
checked: n,
|
|
3905
3939
|
children: t,
|
|
@@ -3908,7 +3942,7 @@ const ba = C.div`
|
|
|
3908
3942
|
labelToggle: a,
|
|
3909
3943
|
name: s,
|
|
3910
3944
|
valueToggle: d = ""
|
|
3911
|
-
} = e, [l, p] =
|
|
3945
|
+
} = e, [l, p] = H(n), u = (c) => {
|
|
3912
3946
|
p(c.target.checked), r(c);
|
|
3913
3947
|
};
|
|
3914
3948
|
return $e(() => {
|
|
@@ -3923,12 +3957,12 @@ const ba = C.div`
|
|
|
3923
3957
|
onChange: u,
|
|
3924
3958
|
size: "small",
|
|
3925
3959
|
value: d,
|
|
3926
|
-
children: /* @__PURE__ */ i(
|
|
3960
|
+
children: /* @__PURE__ */ i(R, { size: "medium", type: "label", weight: "bold", children: a })
|
|
3927
3961
|
}
|
|
3928
3962
|
) }),
|
|
3929
3963
|
l && /* @__PURE__ */ i(z, { children: t })
|
|
3930
3964
|
] });
|
|
3931
|
-
},
|
|
3965
|
+
}, Ta = (e) => {
|
|
3932
3966
|
const {
|
|
3933
3967
|
onHandleStartChange: n,
|
|
3934
3968
|
onHandleEndChange: t,
|
|
@@ -3943,17 +3977,17 @@ const ba = C.div`
|
|
|
3943
3977
|
messageEnd: c = "",
|
|
3944
3978
|
statusStart: g = "pending",
|
|
3945
3979
|
statusEnd: f = "pending"
|
|
3946
|
-
} = e, [h, x] =
|
|
3947
|
-
x(
|
|
3948
|
-
}, w = (
|
|
3949
|
-
D(
|
|
3950
|
-
},
|
|
3951
|
-
S(
|
|
3952
|
-
},
|
|
3980
|
+
} = e, [h, x] = H(s), [b, D] = H(l), [T, S] = H(p), N = ({ target: $ }) => {
|
|
3981
|
+
x($.checked), r && r($.checked);
|
|
3982
|
+
}, w = ($) => {
|
|
3983
|
+
D($.target.value), n($);
|
|
3984
|
+
}, F = ($) => {
|
|
3985
|
+
S($.target.value), t($);
|
|
3986
|
+
}, O = re("(max-width: 400px)");
|
|
3953
3987
|
return /* @__PURE__ */ m(z, { children: [
|
|
3954
3988
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
3955
3989
|
/* @__PURE__ */ i(
|
|
3956
|
-
|
|
3990
|
+
R,
|
|
3957
3991
|
{
|
|
3958
3992
|
appearance: "gray",
|
|
3959
3993
|
margin: "10px 0",
|
|
@@ -3985,7 +4019,7 @@ const ba = C.div`
|
|
|
3985
4019
|
/* @__PURE__ */ m(
|
|
3986
4020
|
y,
|
|
3987
4021
|
{
|
|
3988
|
-
direction:
|
|
4022
|
+
direction: O ? "column" : "row",
|
|
3989
4023
|
justifyContent: "space-between",
|
|
3990
4024
|
gap: "24px",
|
|
3991
4025
|
children: [
|
|
@@ -4007,7 +4041,7 @@ const ba = C.div`
|
|
|
4007
4041
|
{
|
|
4008
4042
|
id: "dateEnd",
|
|
4009
4043
|
label: a,
|
|
4010
|
-
onChange:
|
|
4044
|
+
onChange: F,
|
|
4011
4045
|
value: T,
|
|
4012
4046
|
required: d,
|
|
4013
4047
|
size: "compact",
|
|
@@ -4019,7 +4053,7 @@ const ba = C.div`
|
|
|
4019
4053
|
}
|
|
4020
4054
|
)
|
|
4021
4055
|
] });
|
|
4022
|
-
},
|
|
4056
|
+
}, wa = (e) => {
|
|
4023
4057
|
const {
|
|
4024
4058
|
formik: n,
|
|
4025
4059
|
textValues: t,
|
|
@@ -4039,7 +4073,7 @@ const ba = C.div`
|
|
|
4039
4073
|
isDecision: !0
|
|
4040
4074
|
}),
|
|
4041
4075
|
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
4042
|
-
/* @__PURE__ */ i(
|
|
4076
|
+
/* @__PURE__ */ i(va, { children: /* @__PURE__ */ i(ya, { children: /* @__PURE__ */ m(
|
|
4043
4077
|
y,
|
|
4044
4078
|
{
|
|
4045
4079
|
direction: "column",
|
|
@@ -4054,7 +4088,7 @@ const ba = C.div`
|
|
|
4054
4088
|
alignItems: "center",
|
|
4055
4089
|
gap: "64px",
|
|
4056
4090
|
children: [
|
|
4057
|
-
/* @__PURE__ */ i(
|
|
4091
|
+
/* @__PURE__ */ i(R, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
4058
4092
|
/* @__PURE__ */ i(
|
|
4059
4093
|
un,
|
|
4060
4094
|
{
|
|
@@ -4062,14 +4096,14 @@ const ba = C.div`
|
|
|
4062
4096
|
onChange: () => s(!n.values.toggleNone),
|
|
4063
4097
|
checked: n.values.toggleNone,
|
|
4064
4098
|
size: "small",
|
|
4065
|
-
children: /* @__PURE__ */ i(
|
|
4099
|
+
children: /* @__PURE__ */ i(R, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
4066
4100
|
}
|
|
4067
4101
|
)
|
|
4068
4102
|
]
|
|
4069
4103
|
}
|
|
4070
4104
|
),
|
|
4071
4105
|
/* @__PURE__ */ i(y, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => /* @__PURE__ */ i(
|
|
4072
|
-
|
|
4106
|
+
xa,
|
|
4073
4107
|
{
|
|
4074
4108
|
id: `toggle-${c.conditionName}`,
|
|
4075
4109
|
name: `toggle.${c.conditionName}`,
|
|
@@ -4077,7 +4111,7 @@ const ba = C.div`
|
|
|
4077
4111
|
checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[c.conditionName] !== void 0,
|
|
4078
4112
|
handleToggleChange: (g) => d(
|
|
4079
4113
|
c.conditionName,
|
|
4080
|
-
c.howToSetTheCondition ===
|
|
4114
|
+
c.howToSetTheCondition === k.LIST_OF_VALUES_MULTI
|
|
4081
4115
|
)(g.target.checked),
|
|
4082
4116
|
children: on({ condition: c, formik: n })
|
|
4083
4117
|
},
|
|
@@ -4089,7 +4123,7 @@ const ba = C.div`
|
|
|
4089
4123
|
t.terms && /* @__PURE__ */ m(z, { children: [
|
|
4090
4124
|
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
4091
4125
|
/* @__PURE__ */ i(
|
|
4092
|
-
|
|
4126
|
+
Ta,
|
|
4093
4127
|
{
|
|
4094
4128
|
labelStart: t.termStart,
|
|
4095
4129
|
labelEnd: t.termEnd,
|
|
@@ -4109,15 +4143,15 @@ const ba = C.div`
|
|
|
4109
4143
|
)
|
|
4110
4144
|
] }),
|
|
4111
4145
|
/* @__PURE__ */ i(G, {}),
|
|
4112
|
-
l && /* @__PURE__ */ i(
|
|
4146
|
+
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
4147
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
4114
4148
|
/* @__PURE__ */ i(B, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
4115
4149
|
/* @__PURE__ */ i(B, { type: "submit", children: t.confirm })
|
|
4116
4150
|
] })
|
|
4117
4151
|
] }) });
|
|
4118
|
-
},
|
|
4152
|
+
}, Ca = (e) => {
|
|
4119
4153
|
var f;
|
|
4120
|
-
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } =
|
|
4154
|
+
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } = ba({
|
|
4121
4155
|
decision: n,
|
|
4122
4156
|
onSubmitEvent: t,
|
|
4123
4157
|
textValues: r
|
|
@@ -4131,7 +4165,7 @@ const ba = C.div`
|
|
|
4131
4165
|
(h) => !h.hidden
|
|
4132
4166
|
)) || [], 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
4167
|
return /* @__PURE__ */ i(
|
|
4134
|
-
|
|
4168
|
+
wa,
|
|
4135
4169
|
{
|
|
4136
4170
|
formik: a,
|
|
4137
4171
|
onCancel: o,
|
|
@@ -4163,7 +4197,7 @@ const ba = C.div`
|
|
|
4163
4197
|
termEndStatus: c
|
|
4164
4198
|
}
|
|
4165
4199
|
);
|
|
4166
|
-
},
|
|
4200
|
+
}, El = (e) => {
|
|
4167
4201
|
var o;
|
|
4168
4202
|
const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
|
|
4169
4203
|
(a) => a.switchPlaces
|
|
@@ -4179,7 +4213,7 @@ const ba = C.div`
|
|
|
4179
4213
|
(a) => a.conditionName === r.conditionName ? { ...a, hidden: !0 } : a
|
|
4180
4214
|
)
|
|
4181
4215
|
} : t;
|
|
4182
|
-
},
|
|
4216
|
+
}, Nl = (e) => {
|
|
4183
4217
|
const { decisions: n } = e;
|
|
4184
4218
|
return n == null ? void 0 : n.map((t) => {
|
|
4185
4219
|
var o;
|
|
@@ -4215,7 +4249,7 @@ const ba = C.div`
|
|
|
4215
4249
|
color: E.palette.neutral.N0
|
|
4216
4250
|
}
|
|
4217
4251
|
}
|
|
4218
|
-
},
|
|
4252
|
+
}, Da = C.div`
|
|
4219
4253
|
& > div {
|
|
4220
4254
|
border: 1px solid
|
|
4221
4255
|
${({ theme: e, $active: n }) => {
|
|
@@ -4238,20 +4272,20 @@ const ba = C.div`
|
|
|
4238
4272
|
width: 100%;
|
|
4239
4273
|
outline: none;
|
|
4240
4274
|
cursor: pointer;
|
|
4241
|
-
`,
|
|
4275
|
+
`, Sa = C.div`
|
|
4242
4276
|
display: flex;
|
|
4243
4277
|
align-items: center;
|
|
4244
4278
|
outline: none;
|
|
4245
4279
|
cursor: pointer;
|
|
4246
|
-
`,
|
|
4280
|
+
`, Ea = C(ct)`
|
|
4247
4281
|
display: flex;
|
|
4248
4282
|
align-items: center;
|
|
4249
4283
|
text-decoration: none;
|
|
4250
|
-
`,
|
|
4284
|
+
`, Na = C(ct)`
|
|
4251
4285
|
display: block;
|
|
4252
4286
|
text-decoration: none;
|
|
4253
4287
|
color: inherit;
|
|
4254
|
-
`,
|
|
4288
|
+
`, ka = C.div`
|
|
4255
4289
|
& > div {
|
|
4256
4290
|
border-bottom: 1px solid
|
|
4257
4291
|
${({ theme: e, $active: n }) => {
|
|
@@ -4278,31 +4312,31 @@ const ba = C.div`
|
|
|
4278
4312
|
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
4313
|
}};
|
|
4280
4314
|
}
|
|
4281
|
-
`,
|
|
4315
|
+
`, Aa = C.div`
|
|
4282
4316
|
display: flex;
|
|
4283
4317
|
flex-direction: column;
|
|
4284
4318
|
|
|
4285
4319
|
& > a:last-child ${mt} {
|
|
4286
4320
|
border-radius: 0 0 8px 8px;
|
|
4287
4321
|
}
|
|
4288
|
-
`,
|
|
4322
|
+
`, $a = (e) => {
|
|
4289
4323
|
const { isOpen: n, links: t, onClick: r, title: o, activeId: a, headerPath: s, headerActive: d } = e, l = (h) => {
|
|
4290
4324
|
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), r());
|
|
4291
4325
|
}, p = (h) => {
|
|
4292
4326
|
h.preventDefault(), h.stopPropagation(), r();
|
|
4293
4327
|
}, u = (h) => {
|
|
4294
4328
|
(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(
|
|
4329
|
+
}, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f = P.useId();
|
|
4330
|
+
return /* @__PURE__ */ i(Da, { $active: n, children: /* @__PURE__ */ m(ie, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
4297
4331
|
/* @__PURE__ */ i(
|
|
4298
|
-
|
|
4332
|
+
ka,
|
|
4299
4333
|
{
|
|
4300
4334
|
$active: n && t.length > 0,
|
|
4301
4335
|
"aria-controls": f,
|
|
4302
4336
|
"aria-expanded": n,
|
|
4303
4337
|
onClick: p,
|
|
4304
4338
|
onKeyDown: u,
|
|
4305
|
-
children: s ? /* @__PURE__ */ i(
|
|
4339
|
+
children: s ? /* @__PURE__ */ i(Ea, { to: s, children: /* @__PURE__ */ m(
|
|
4306
4340
|
ie,
|
|
4307
4341
|
{
|
|
4308
4342
|
alignItems: "center",
|
|
@@ -4312,7 +4346,7 @@ const ba = C.div`
|
|
|
4312
4346
|
padding: "12px 8px",
|
|
4313
4347
|
children: [
|
|
4314
4348
|
/* @__PURE__ */ i(
|
|
4315
|
-
|
|
4349
|
+
j,
|
|
4316
4350
|
{
|
|
4317
4351
|
appearance: c,
|
|
4318
4352
|
cursorHover: !0,
|
|
@@ -4320,7 +4354,7 @@ const ba = C.div`
|
|
|
4320
4354
|
}
|
|
4321
4355
|
),
|
|
4322
4356
|
/* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(
|
|
4323
|
-
|
|
4357
|
+
R,
|
|
4324
4358
|
{
|
|
4325
4359
|
appearance: c,
|
|
4326
4360
|
cursorHover: !0,
|
|
@@ -4342,7 +4376,7 @@ const ba = C.div`
|
|
|
4342
4376
|
padding: "12px 8px",
|
|
4343
4377
|
children: [
|
|
4344
4378
|
/* @__PURE__ */ i(
|
|
4345
|
-
|
|
4379
|
+
j,
|
|
4346
4380
|
{
|
|
4347
4381
|
appearance: c,
|
|
4348
4382
|
cursorHover: !0,
|
|
@@ -4350,14 +4384,14 @@ const ba = C.div`
|
|
|
4350
4384
|
}
|
|
4351
4385
|
),
|
|
4352
4386
|
/* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(
|
|
4353
|
-
|
|
4387
|
+
Sa,
|
|
4354
4388
|
{
|
|
4355
4389
|
"aria-controls": f,
|
|
4356
4390
|
"aria-expanded": n,
|
|
4357
4391
|
onClick: r,
|
|
4358
4392
|
onKeyDown: l,
|
|
4359
4393
|
children: /* @__PURE__ */ i(
|
|
4360
|
-
|
|
4394
|
+
R,
|
|
4361
4395
|
{
|
|
4362
4396
|
appearance: c,
|
|
4363
4397
|
cursorHover: !0,
|
|
@@ -4375,9 +4409,9 @@ const ba = C.div`
|
|
|
4375
4409
|
)
|
|
4376
4410
|
}
|
|
4377
4411
|
),
|
|
4378
|
-
n && t.length > 0 && /* @__PURE__ */ i(
|
|
4412
|
+
n && t.length > 0 && /* @__PURE__ */ i(Aa, { id: f, children: t.map((h) => {
|
|
4379
4413
|
const x = h.id === a;
|
|
4380
|
-
return /* @__PURE__ */ i(
|
|
4414
|
+
return /* @__PURE__ */ i(Na, { to: h.path, children: /* @__PURE__ */ i(mt, { $active: x, children: /* @__PURE__ */ m(
|
|
4381
4415
|
y,
|
|
4382
4416
|
{
|
|
4383
4417
|
alignItems: "center",
|
|
@@ -4385,9 +4419,9 @@ const ba = C.div`
|
|
|
4385
4419
|
gap: "8px",
|
|
4386
4420
|
padding: x ? "8px 4px" : "8px 32px",
|
|
4387
4421
|
children: [
|
|
4388
|
-
x && /* @__PURE__ */ i(
|
|
4422
|
+
x && /* @__PURE__ */ i(j, { appearance: "primary", icon: /* @__PURE__ */ i(Vt, {}) }),
|
|
4389
4423
|
/* @__PURE__ */ i(
|
|
4390
|
-
|
|
4424
|
+
R,
|
|
4391
4425
|
{
|
|
4392
4426
|
appearance: x ? "primary" : "dark",
|
|
4393
4427
|
size: "small",
|
|
@@ -4401,7 +4435,7 @@ const ba = C.div`
|
|
|
4401
4435
|
) }) }, h.id);
|
|
4402
4436
|
}) })
|
|
4403
4437
|
] }) });
|
|
4404
|
-
},
|
|
4438
|
+
}, Ia = C.div`
|
|
4405
4439
|
& > div {
|
|
4406
4440
|
background: ${({ $background: e, theme: n }) => {
|
|
4407
4441
|
var t, r, o, a;
|
|
@@ -4409,36 +4443,36 @@ const ba = C.div`
|
|
|
4409
4443
|
}};
|
|
4410
4444
|
}
|
|
4411
4445
|
height: 90vh;
|
|
4412
|
-
`,
|
|
4446
|
+
`, Ra = (e, n) => {
|
|
4413
4447
|
var t;
|
|
4414
4448
|
for (const r of n)
|
|
4415
4449
|
if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
|
|
4416
4450
|
return null;
|
|
4417
|
-
},
|
|
4418
|
-
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Kt(), [a, s] =
|
|
4451
|
+
}, kl = (e) => {
|
|
4452
|
+
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
4453
|
(u) => {
|
|
4420
4454
|
var c;
|
|
4421
4455
|
return (c = u.find((g) => g.path === o.pathname)) == null ? void 0 : c.id;
|
|
4422
4456
|
},
|
|
4423
4457
|
[o.pathname]
|
|
4424
|
-
), p =
|
|
4458
|
+
), p = P.useCallback(
|
|
4425
4459
|
(u) => !!u && (o.pathname === u || o.pathname.startsWith(u + "/")),
|
|
4426
4460
|
[o.pathname]
|
|
4427
4461
|
);
|
|
4428
|
-
return
|
|
4462
|
+
return P.useEffect(() => {
|
|
4429
4463
|
if (!(d.current !== o.pathname)) return;
|
|
4430
4464
|
if (d.current = o.pathname, n) {
|
|
4431
4465
|
s(null);
|
|
4432
4466
|
return;
|
|
4433
4467
|
}
|
|
4434
|
-
const c =
|
|
4468
|
+
const c = Ra(o.pathname, r);
|
|
4435
4469
|
if (c) {
|
|
4436
4470
|
s(c);
|
|
4437
4471
|
return;
|
|
4438
4472
|
}
|
|
4439
4473
|
t && s(t);
|
|
4440
|
-
}, [n, t, r, o.pathname]), /* @__PURE__ */ i(
|
|
4441
|
-
|
|
4474
|
+
}, [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(
|
|
4475
|
+
$a,
|
|
4442
4476
|
{
|
|
4443
4477
|
activeId: l(u.links),
|
|
4444
4478
|
headerPath: u.path,
|
|
@@ -4469,7 +4503,7 @@ function bt() {
|
|
|
4469
4503
|
}];
|
|
4470
4504
|
}
|
|
4471
4505
|
var [vt, yt] = bt();
|
|
4472
|
-
function
|
|
4506
|
+
function Fa(e, n) {
|
|
4473
4507
|
return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
|
|
4474
4508
|
}
|
|
4475
4509
|
function Ye(e, n, t = !0, r = ["__key"]) {
|
|
@@ -4479,7 +4513,7 @@ function Ye(e, n, t = !0, r = ["__key"]) {
|
|
|
4479
4513
|
if (e instanceof Date && n instanceof Date)
|
|
4480
4514
|
return e.getTime() === n.getTime();
|
|
4481
4515
|
if (e instanceof RegExp && n instanceof RegExp)
|
|
4482
|
-
return
|
|
4516
|
+
return Fa(e, n);
|
|
4483
4517
|
if (e === null || n === null) return !1;
|
|
4484
4518
|
const o = e, a = n;
|
|
4485
4519
|
if (Object.keys(o).length !== Object.keys(a).length) return !1;
|
|
@@ -4494,19 +4528,19 @@ function Ye(e, n, t = !0, r = ["__key"]) {
|
|
|
4494
4528
|
function xt(e) {
|
|
4495
4529
|
return e.split(" ").filter((n) => n);
|
|
4496
4530
|
}
|
|
4497
|
-
function
|
|
4531
|
+
function _e(e) {
|
|
4498
4532
|
return { x: e.clientX, y: e.clientY };
|
|
4499
4533
|
}
|
|
4500
4534
|
Array();
|
|
4501
|
-
var
|
|
4535
|
+
var Mn = typeof window < "u", Y = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap();
|
|
4502
4536
|
function Tt() {
|
|
4503
|
-
if (!
|
|
4537
|
+
if (!Mn) return !1;
|
|
4504
4538
|
if ("userAgentData" in navigator)
|
|
4505
4539
|
return navigator.userAgentData.mobile === !0;
|
|
4506
4540
|
const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
4507
4541
|
return n || t;
|
|
4508
4542
|
}
|
|
4509
|
-
var
|
|
4543
|
+
var La = {
|
|
4510
4544
|
affectedNodes: [],
|
|
4511
4545
|
coordinates: {
|
|
4512
4546
|
x: 0,
|
|
@@ -4540,8 +4574,8 @@ var Fa = {
|
|
|
4540
4574
|
scrollDebounceTimeout: void 0,
|
|
4541
4575
|
frameIdX: void 0,
|
|
4542
4576
|
frameIdY: void 0
|
|
4543
|
-
}, v =
|
|
4544
|
-
function
|
|
4577
|
+
}, v = La, Se = !1, Qn, xn;
|
|
4578
|
+
function Oa() {
|
|
4545
4579
|
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
4580
|
affectedNodes: [],
|
|
4547
4581
|
coordinates: {
|
|
@@ -4585,7 +4619,7 @@ function La() {
|
|
|
4585
4619
|
function wt(e) {
|
|
4586
4620
|
return Object.assign(v, e), e.initialParent.data.emit("dragStarted", v), Se = !1, v.emit("dragStarted", v), v;
|
|
4587
4621
|
}
|
|
4588
|
-
function
|
|
4622
|
+
function Ma() {
|
|
4589
4623
|
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
4624
|
}
|
|
4591
4625
|
function Pa() {
|
|
@@ -4593,22 +4627,22 @@ function Pa() {
|
|
|
4593
4627
|
const e = v.currentParent.data.config;
|
|
4594
4628
|
oe(v) && e.handleEnd(v);
|
|
4595
4629
|
}
|
|
4596
|
-
function
|
|
4630
|
+
function za(e) {
|
|
4597
4631
|
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
4632
|
}
|
|
4599
|
-
function
|
|
4633
|
+
function Va(e) {
|
|
4600
4634
|
if (!X(v)) return;
|
|
4601
4635
|
Se = !0;
|
|
4602
4636
|
const n = v.initialParent.data.config.handleEnd;
|
|
4603
4637
|
n(v);
|
|
4604
4638
|
}
|
|
4605
|
-
function
|
|
4639
|
+
function _a(e) {
|
|
4606
4640
|
if (!X(v)) return;
|
|
4607
4641
|
W(e);
|
|
4608
|
-
const { x: n, y: t } =
|
|
4642
|
+
const { x: n, y: t } = _e(e);
|
|
4609
4643
|
X(v) && fn({ x: n, y: t }, e, v);
|
|
4610
4644
|
}
|
|
4611
|
-
function
|
|
4645
|
+
function Ua(e) {
|
|
4612
4646
|
if (!v.pointerDown || !v.pointerDown.validated) return;
|
|
4613
4647
|
const n = v.pointerDown.parent.data.config;
|
|
4614
4648
|
if (!(e.pointerType === "mouse" && !Tt()))
|
|
@@ -4621,7 +4655,7 @@ function ja(e) {
|
|
|
4621
4655
|
}
|
|
4622
4656
|
const t = n.draggedNodes(v.pointerDown);
|
|
4623
4657
|
n.dragstartClasses(v.pointerDown.node, t, n, !0);
|
|
4624
|
-
const r = v.pointerDown.node.el.getBoundingClientRect(), o =
|
|
4658
|
+
const r = v.pointerDown.node.el.getBoundingClientRect(), o = mi(
|
|
4625
4659
|
v.pointerDown.node,
|
|
4626
4660
|
v.pointerDown.parent,
|
|
4627
4661
|
e,
|
|
@@ -4632,21 +4666,21 @@ function ja(e) {
|
|
|
4632
4666
|
Zn(e, o, !0);
|
|
4633
4667
|
}
|
|
4634
4668
|
}
|
|
4635
|
-
function
|
|
4669
|
+
function ja({
|
|
4636
4670
|
parent: e,
|
|
4637
4671
|
getValues: n,
|
|
4638
4672
|
setValues: t,
|
|
4639
4673
|
config: r = {}
|
|
4640
4674
|
}) {
|
|
4641
4675
|
var l, p, u;
|
|
4642
|
-
if (!
|
|
4676
|
+
if (!Mn) return;
|
|
4643
4677
|
Qn || (Qn = an(document, {
|
|
4644
|
-
dragover:
|
|
4645
|
-
pointerdown:
|
|
4678
|
+
dragover: _a,
|
|
4679
|
+
pointerdown: Ma,
|
|
4646
4680
|
pointerup: Pa,
|
|
4647
|
-
keydown:
|
|
4648
|
-
drop:
|
|
4649
|
-
pointermove:
|
|
4681
|
+
keydown: za,
|
|
4682
|
+
drop: Va,
|
|
4683
|
+
pointermove: Ua,
|
|
4650
4684
|
pointercancel: J(r.handlePointercancel),
|
|
4651
4685
|
touchmove: (c) => {
|
|
4652
4686
|
X(v) && c.cancelable && W(c);
|
|
@@ -4661,38 +4695,38 @@ function Ua({
|
|
|
4661
4695
|
config: {
|
|
4662
4696
|
dragDropEffect: r.dragDropEffect ?? "move",
|
|
4663
4697
|
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:
|
|
4698
|
+
draggedNodes: ni,
|
|
4699
|
+
dragstartClasses: ai,
|
|
4700
|
+
handleNodeKeydown: li,
|
|
4701
|
+
handleDragstart: ri,
|
|
4702
|
+
handleNodeDragover: vi,
|
|
4703
|
+
handleParentDragover: yi,
|
|
4704
|
+
handleNodeDrop: di,
|
|
4705
|
+
handleNodeFocus: ci,
|
|
4706
|
+
handleNodeBlur: ui,
|
|
4707
|
+
handlePointercancel: gi,
|
|
4708
|
+
handleEnd: hi,
|
|
4709
|
+
handleDragend: pi,
|
|
4710
|
+
handleParentFocus: qa,
|
|
4711
|
+
handleNodePointerup: fi,
|
|
4712
|
+
handleNodePointerover: si,
|
|
4713
|
+
handleParentPointerover: xi,
|
|
4714
|
+
handleParentScroll: ti,
|
|
4715
|
+
handleNodePointerdown: oi,
|
|
4716
|
+
handleNodeDragenter: wi,
|
|
4717
|
+
handleNodeDragleave: Ci,
|
|
4718
|
+
handleParentDrop: Ga,
|
|
4685
4719
|
multiDrag: r.multiDrag ?? !1,
|
|
4686
4720
|
nativeDrag: r.nativeDrag ?? !0,
|
|
4687
|
-
performSort:
|
|
4688
|
-
performTransfer:
|
|
4721
|
+
performSort: Ha,
|
|
4722
|
+
performTransfer: Ba,
|
|
4689
4723
|
root: r.root ?? document,
|
|
4690
|
-
setupNode:
|
|
4724
|
+
setupNode: Wa,
|
|
4691
4725
|
setupNodeRemap: St,
|
|
4692
|
-
reapplyDragClasses:
|
|
4693
|
-
tearDownNode:
|
|
4694
|
-
tearDownNodeRemap:
|
|
4695
|
-
remapFinished:
|
|
4726
|
+
reapplyDragClasses: Xa,
|
|
4727
|
+
tearDownNode: Za,
|
|
4728
|
+
tearDownNodeRemap: Qa,
|
|
4729
|
+
remapFinished: Ja,
|
|
4696
4730
|
threshold: {
|
|
4697
4731
|
horizontal: 0,
|
|
4698
4732
|
vertical: 0
|
|
@@ -4705,7 +4739,7 @@ function Ua({
|
|
|
4705
4739
|
on: a,
|
|
4706
4740
|
emit: o
|
|
4707
4741
|
};
|
|
4708
|
-
new MutationObserver(
|
|
4742
|
+
new MutationObserver(Ka).observe(e, { childList: !0 }), Y.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
|
|
4709
4743
|
var g, f;
|
|
4710
4744
|
(f = (g = c(e)) == null ? void 0 : g.tearDown) == null || f.call(g);
|
|
4711
4745
|
}), (p = r.plugins) == null || p.forEach((c) => {
|
|
@@ -4714,10 +4748,10 @@ function Ua({
|
|
|
4714
4748
|
}), (u = r.plugins) == null || u.forEach((c) => {
|
|
4715
4749
|
var g, f;
|
|
4716
4750
|
(f = (g = c(e)) == null ? void 0 : g.setup) == null || f.call(g);
|
|
4717
|
-
}),
|
|
4751
|
+
}), Ya(e, s), gn(e, !0);
|
|
4718
4752
|
}
|
|
4719
4753
|
function Ct(e, n, t, r, o, a) {
|
|
4720
|
-
const { x: s, y: d } =
|
|
4754
|
+
const { x: s, y: d } = _e(t), l = e.el.getBoundingClientRect();
|
|
4721
4755
|
return {
|
|
4722
4756
|
affectedNodes: [],
|
|
4723
4757
|
ascendingDirection: !1,
|
|
@@ -4751,7 +4785,7 @@ function Ct(e, n, t, r, o, a) {
|
|
|
4751
4785
|
transferred: !1
|
|
4752
4786
|
};
|
|
4753
4787
|
}
|
|
4754
|
-
function
|
|
4788
|
+
function Ha({
|
|
4755
4789
|
parent: e,
|
|
4756
4790
|
draggedNodes: n,
|
|
4757
4791
|
targetNodes: t
|
|
@@ -4809,11 +4843,11 @@ function en(e, n, t, r, o = !1) {
|
|
|
4809
4843
|
parent: e
|
|
4810
4844
|
}, Ie(e, t, r);
|
|
4811
4845
|
}
|
|
4812
|
-
function
|
|
4846
|
+
function qa(e, n) {
|
|
4813
4847
|
const t = e.targetData.parent.data.enabledNodes[0];
|
|
4814
4848
|
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
4849
|
}
|
|
4816
|
-
function
|
|
4850
|
+
function Ba({
|
|
4817
4851
|
currentParent: e,
|
|
4818
4852
|
targetParent: n,
|
|
4819
4853
|
initialParent: t,
|
|
@@ -4853,7 +4887,7 @@ function ze(e, n) {
|
|
|
4853
4887
|
function Nn(e, n, t) {
|
|
4854
4888
|
n.setValues(t, e);
|
|
4855
4889
|
}
|
|
4856
|
-
function
|
|
4890
|
+
function Ga(e, n) {
|
|
4857
4891
|
Ee(e.e), Se = !0;
|
|
4858
4892
|
const t = n.initialParent.data.config.handleEnd;
|
|
4859
4893
|
t(n);
|
|
@@ -4868,7 +4902,7 @@ function X(e) {
|
|
|
4868
4902
|
function oe(e) {
|
|
4869
4903
|
return "synthDragging" in e && !!e.synthDragging;
|
|
4870
4904
|
}
|
|
4871
|
-
function
|
|
4905
|
+
function Ya(e, n) {
|
|
4872
4906
|
n.abortControllers.mainParent = an(e, {
|
|
4873
4907
|
dragover: nn(n.config.handleParentDragover),
|
|
4874
4908
|
handleParentPointerover: n.config.handleParentPointerover,
|
|
@@ -4912,7 +4946,7 @@ function Ga(e, n) {
|
|
|
4912
4946
|
}
|
|
4913
4947
|
));
|
|
4914
4948
|
}
|
|
4915
|
-
function
|
|
4949
|
+
function Wa(e) {
|
|
4916
4950
|
var t;
|
|
4917
4951
|
const n = e.parent.data.config;
|
|
4918
4952
|
e.node.data.abortControllers.mainNode = an(e.node.el, {
|
|
@@ -4947,26 +4981,26 @@ function St(e) {
|
|
|
4947
4981
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
|
|
4948
4982
|
});
|
|
4949
4983
|
}
|
|
4950
|
-
function
|
|
4984
|
+
function Xa(e, n) {
|
|
4951
4985
|
if (!X(v)) return;
|
|
4952
4986
|
const t = oe(v) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
|
|
4953
4987
|
v.draggedNode.el === e && Le([e], t, !0);
|
|
4954
4988
|
}
|
|
4955
|
-
function
|
|
4989
|
+
function Qa(e) {
|
|
4956
4990
|
var n;
|
|
4957
4991
|
(n = e.parent.data.config.plugins) == null || n.forEach((t) => {
|
|
4958
4992
|
var r, o;
|
|
4959
4993
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.tearDownNodeRemap) == null || o.call(r, e);
|
|
4960
4994
|
});
|
|
4961
4995
|
}
|
|
4962
|
-
function
|
|
4996
|
+
function Za(e) {
|
|
4963
4997
|
var n, t, r, o, a;
|
|
4964
4998
|
(n = e.parent.data.config.plugins) == null || n.forEach((s) => {
|
|
4965
4999
|
var d, l;
|
|
4966
5000
|
(l = (d = s(e.parent.el)) == null ? void 0 : d.tearDownNode) == null || l.call(d, e);
|
|
4967
5001
|
}), 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
5002
|
}
|
|
4969
|
-
function
|
|
5003
|
+
function Ka(e) {
|
|
4970
5004
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
4971
5005
|
return;
|
|
4972
5006
|
const n = e[0].target;
|
|
@@ -5058,13 +5092,13 @@ function gn(e, n) {
|
|
|
5058
5092
|
(u = (p = l(e)) == null ? void 0 : p.remapFinished) == null || u.call(p);
|
|
5059
5093
|
});
|
|
5060
5094
|
}
|
|
5061
|
-
function
|
|
5095
|
+
function Ja() {
|
|
5062
5096
|
v.remapJustFinished = !0, "draggedNode" in v && (v.affectedNodes = []);
|
|
5063
5097
|
}
|
|
5064
|
-
function
|
|
5098
|
+
function ei(e) {
|
|
5065
5099
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
5066
5100
|
}
|
|
5067
|
-
function
|
|
5101
|
+
function ni(e) {
|
|
5068
5102
|
var n;
|
|
5069
5103
|
if (e.parent.data.config.multiDrag) {
|
|
5070
5104
|
if (v.selectedState)
|
|
@@ -5077,14 +5111,14 @@ function ei(e) {
|
|
|
5077
5111
|
} else return [e.node];
|
|
5078
5112
|
return [];
|
|
5079
5113
|
}
|
|
5080
|
-
function
|
|
5114
|
+
function ti(e) {
|
|
5081
5115
|
X(v) && (v.emit("scrollStarted", v), !oe(v) && (v.preventEnter = !0, xn && clearTimeout(xn), xn = setTimeout(() => {
|
|
5082
5116
|
v.preventEnter = !1, v.emit("scrollEnded", v);
|
|
5083
5117
|
}, 100)));
|
|
5084
5118
|
}
|
|
5085
|
-
function
|
|
5119
|
+
function ri(e, n) {
|
|
5086
5120
|
const t = e.targetData.parent.data.config;
|
|
5087
|
-
if (!t.nativeDrag || !
|
|
5121
|
+
if (!t.nativeDrag || !ei(e) || !Et({
|
|
5088
5122
|
x: e.e.clientX,
|
|
5089
5123
|
y: e.e.clientY,
|
|
5090
5124
|
node: e.targetData.node,
|
|
@@ -5098,7 +5132,7 @@ function ti(e, n) {
|
|
|
5098
5132
|
node: e.targetData.node
|
|
5099
5133
|
});
|
|
5100
5134
|
r.length === 0 && (r = [e.targetData.node]), t.dragstartClasses(e.targetData.node, r, t);
|
|
5101
|
-
const o =
|
|
5135
|
+
const o = ii(e, r);
|
|
5102
5136
|
if (t.onDragstart) {
|
|
5103
5137
|
const a = {
|
|
5104
5138
|
parent: e.targetData.parent,
|
|
@@ -5114,7 +5148,7 @@ function ti(e, n) {
|
|
|
5114
5148
|
t.onDragstart(a);
|
|
5115
5149
|
}
|
|
5116
5150
|
}
|
|
5117
|
-
function
|
|
5151
|
+
function oi(e, n) {
|
|
5118
5152
|
var d, l;
|
|
5119
5153
|
if (Ee(e.e), n.pointerDown = {
|
|
5120
5154
|
parent: e.targetData.parent,
|
|
@@ -5127,7 +5161,7 @@ function ri(e, n) {
|
|
|
5127
5161
|
config: e.targetData.parent.data.config
|
|
5128
5162
|
}))
|
|
5129
5163
|
return;
|
|
5130
|
-
n.pointerDown.validated = !0,
|
|
5164
|
+
n.pointerDown.validated = !0, bi(e, n, e.targetData.node);
|
|
5131
5165
|
const t = e.targetData.parent.data;
|
|
5132
5166
|
let r = [e.targetData.node];
|
|
5133
5167
|
const o = e.e.ctrlKey || e.e.metaKey, a = e.e.shiftKey, s = e.targetData.node;
|
|
@@ -5190,7 +5224,7 @@ function ri(e, n) {
|
|
|
5190
5224
|
!0
|
|
5191
5225
|
);
|
|
5192
5226
|
}
|
|
5193
|
-
function
|
|
5227
|
+
function ai(e, n, t, r = !1) {
|
|
5194
5228
|
Le(
|
|
5195
5229
|
n.map((o) => o.el),
|
|
5196
5230
|
r ? t.synthDraggingClass : t.draggingClass
|
|
@@ -5210,7 +5244,7 @@ function oi(e, n, t, r = !1) {
|
|
|
5210
5244
|
);
|
|
5211
5245
|
});
|
|
5212
5246
|
}
|
|
5213
|
-
function
|
|
5247
|
+
function ii(e, n) {
|
|
5214
5248
|
Ee(e.e);
|
|
5215
5249
|
const t = wt(
|
|
5216
5250
|
Ct(
|
|
@@ -5281,22 +5315,22 @@ function Et({
|
|
|
5281
5315
|
if (a === s || s.contains(a)) return !0;
|
|
5282
5316
|
return !1;
|
|
5283
5317
|
}
|
|
5284
|
-
function ii(e) {
|
|
5285
|
-
}
|
|
5286
5318
|
function li(e) {
|
|
5319
|
+
}
|
|
5320
|
+
function si(e) {
|
|
5287
5321
|
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) : hn(e.detail, e.detail.state);
|
|
5288
5322
|
}
|
|
5289
|
-
function
|
|
5323
|
+
function di(e, n) {
|
|
5290
5324
|
const t = e.targetData.parent.data.config;
|
|
5291
5325
|
t.nativeDrag && (Ee(e.e), Se = !0, t.handleEnd(n));
|
|
5292
5326
|
}
|
|
5293
|
-
function
|
|
5327
|
+
function ci(e) {
|
|
5294
5328
|
e.e.target !== e.e.currentTarget && v.pointerDown && (v.pointerDown.node.el.draggable = !1);
|
|
5295
5329
|
}
|
|
5296
|
-
function
|
|
5330
|
+
function ui(e) {
|
|
5297
5331
|
e.e.target !== e.e.currentTarget && v.pointerDown && (v.pointerDown.node.el.draggable = !0);
|
|
5298
5332
|
}
|
|
5299
|
-
function
|
|
5333
|
+
function pi(e, n) {
|
|
5300
5334
|
const t = e.targetData.parent.data.config;
|
|
5301
5335
|
if (t.nativeDrag) {
|
|
5302
5336
|
if (W(e.e), Ee(e.e), Se) {
|
|
@@ -5306,7 +5340,7 @@ function ui(e, n) {
|
|
|
5306
5340
|
t.handleEnd(n);
|
|
5307
5341
|
}
|
|
5308
5342
|
}
|
|
5309
|
-
function
|
|
5343
|
+
function gi(e, n) {
|
|
5310
5344
|
var r;
|
|
5311
5345
|
if (!oe(n)) return;
|
|
5312
5346
|
if (W(e.e), Se) {
|
|
@@ -5322,7 +5356,7 @@ function pi(e, n) {
|
|
|
5322
5356
|
state: n
|
|
5323
5357
|
}), t == null || t.handleEnd(n);
|
|
5324
5358
|
}
|
|
5325
|
-
function
|
|
5359
|
+
function hi(e) {
|
|
5326
5360
|
var u, c, g, f, h;
|
|
5327
5361
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
5328
5362
|
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 +5373,9 @@ function gi(e) {
|
|
|
5339
5373
|
draggedNode: p.draggedNode,
|
|
5340
5374
|
draggedNodes: p.draggedNodes,
|
|
5341
5375
|
state: p
|
|
5342
|
-
}), e.emit("dragEnded", p),
|
|
5376
|
+
}), e.emit("dragEnded", p), Oa();
|
|
5343
5377
|
}
|
|
5344
|
-
function
|
|
5378
|
+
function fi(e, n) {
|
|
5345
5379
|
Ee(e.e), !n.pointerSelection && n.selectedState && Ae(n.selectedState.nodes, e.targetData.parent, n);
|
|
5346
5380
|
const t = e.targetData.parent.data.config;
|
|
5347
5381
|
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, De(
|
|
@@ -5349,7 +5383,7 @@ function hi(e, n) {
|
|
|
5349
5383
|
t.longPressClass
|
|
5350
5384
|
), X(n) && t.handleEnd(n);
|
|
5351
5385
|
}
|
|
5352
|
-
function
|
|
5386
|
+
function mi(e, n, t, r, o, a) {
|
|
5353
5387
|
var h, x;
|
|
5354
5388
|
const s = n.data.config;
|
|
5355
5389
|
let d, l;
|
|
@@ -5432,7 +5466,7 @@ function fi(e, n, t, r, o, a) {
|
|
|
5432
5466
|
...g
|
|
5433
5467
|
});
|
|
5434
5468
|
}
|
|
5435
|
-
function
|
|
5469
|
+
function bi(e, n, t) {
|
|
5436
5470
|
const r = e.targetData.parent.data.config;
|
|
5437
5471
|
n.longPressTimeout = setTimeout(() => {
|
|
5438
5472
|
n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Le([t.el], r.longPressClass), W(e.e));
|
|
@@ -5450,11 +5484,11 @@ function Nt(e, n = !1) {
|
|
|
5450
5484
|
));
|
|
5451
5485
|
}
|
|
5452
5486
|
function Zn(e, n, t = !1) {
|
|
5453
|
-
const r =
|
|
5487
|
+
const r = _e(e);
|
|
5454
5488
|
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
5489
|
oe(n) && fn(n.coordinates, e, n);
|
|
5456
5490
|
}, 16);
|
|
5457
|
-
const o =
|
|
5491
|
+
const o = Ni(r);
|
|
5458
5492
|
if (!o) {
|
|
5459
5493
|
document.dispatchEvent(
|
|
5460
5494
|
new CustomEvent("handleRootPointerover", {
|
|
@@ -5481,22 +5515,22 @@ function Zn(e, n, t = !1) {
|
|
|
5481
5515
|
})
|
|
5482
5516
|
);
|
|
5483
5517
|
}
|
|
5484
|
-
function
|
|
5518
|
+
function vi(e, n) {
|
|
5485
5519
|
var a;
|
|
5486
5520
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5487
|
-
const { x: r, y: o } =
|
|
5521
|
+
const { x: r, y: o } = _e(e.e);
|
|
5488
5522
|
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
5523
|
}
|
|
5490
|
-
function
|
|
5524
|
+
function yi(e, n) {
|
|
5491
5525
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5492
5526
|
W(e.e), Ee(e.e);
|
|
5493
|
-
const { x: r, y: o } =
|
|
5527
|
+
const { x: r, y: o } = _e(e.e);
|
|
5494
5528
|
X(n) && fn({ x: r, y: o }, e.e, n), hn(e, n);
|
|
5495
5529
|
}
|
|
5496
|
-
function
|
|
5530
|
+
function xi(e) {
|
|
5497
5531
|
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && hn(e.detail, e.detail.state);
|
|
5498
5532
|
}
|
|
5499
|
-
function
|
|
5533
|
+
function Ti({
|
|
5500
5534
|
currentParent: e,
|
|
5501
5535
|
targetParent: n,
|
|
5502
5536
|
initialParent: t,
|
|
@@ -5514,13 +5548,13 @@ function xi({
|
|
|
5514
5548
|
o
|
|
5515
5549
|
) : !(!a.group || a.group !== s.group);
|
|
5516
5550
|
}
|
|
5517
|
-
function
|
|
5551
|
+
function wi(e, n) {
|
|
5518
5552
|
W(e.e);
|
|
5519
5553
|
}
|
|
5520
|
-
function
|
|
5554
|
+
function Ci(e, n) {
|
|
5521
5555
|
W(e.e);
|
|
5522
5556
|
}
|
|
5523
|
-
function
|
|
5557
|
+
function Di(e, n, t, r) {
|
|
5524
5558
|
var u;
|
|
5525
5559
|
if (n.affectedNodes.map((c) => c.data.value).includes(e.targetData.node.data.value))
|
|
5526
5560
|
return !1;
|
|
@@ -5555,8 +5589,8 @@ function Ci(e, n, t, r) {
|
|
|
5555
5589
|
return !1;
|
|
5556
5590
|
}
|
|
5557
5591
|
function kt(e, n) {
|
|
5558
|
-
const { x: t, y: r } =
|
|
5559
|
-
if (!
|
|
5592
|
+
const { x: t, y: r } = _e(e.e);
|
|
5593
|
+
if (!Di(e, n, t, r))
|
|
5560
5594
|
return;
|
|
5561
5595
|
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
5596
|
n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
|
|
@@ -5597,7 +5631,7 @@ function J(e) {
|
|
|
5597
5631
|
};
|
|
5598
5632
|
}
|
|
5599
5633
|
function hn(e, n) {
|
|
5600
|
-
W(e.e),
|
|
5634
|
+
W(e.e), Ti({
|
|
5601
5635
|
currentParent: n.currentParent,
|
|
5602
5636
|
targetParent: e.targetData.parent,
|
|
5603
5637
|
initialParent: n.initialParent,
|
|
@@ -5641,11 +5675,11 @@ function Le(e, n, t = !1) {
|
|
|
5641
5675
|
he.set(o, a);
|
|
5642
5676
|
}
|
|
5643
5677
|
for (const o of e) {
|
|
5644
|
-
const a = he.get(o), s =
|
|
5678
|
+
const a = he.get(o), s = Si(o, n, a, t);
|
|
5645
5679
|
s && r(o, s);
|
|
5646
5680
|
}
|
|
5647
5681
|
}
|
|
5648
|
-
function
|
|
5682
|
+
function Si(e, n, t, r = !1) {
|
|
5649
5683
|
if (!n) return;
|
|
5650
5684
|
const o = xt(n);
|
|
5651
5685
|
if (!o.length) return;
|
|
@@ -5701,7 +5735,7 @@ function Kn(e, n, t, r, o) {
|
|
|
5701
5735
|
}
|
|
5702
5736
|
return s ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
5703
5737
|
}
|
|
5704
|
-
function
|
|
5738
|
+
function Ei(e, n, t, r) {
|
|
5705
5739
|
if (!X(t) || !t.draggedNode)
|
|
5706
5740
|
return;
|
|
5707
5741
|
t.preventEnter = !0;
|
|
@@ -5732,7 +5766,7 @@ function fn(e, n, t) {
|
|
|
5732
5766
|
const { x: r, y: o } = e;
|
|
5733
5767
|
let a = !1;
|
|
5734
5768
|
const s = (l, p, u) => {
|
|
5735
|
-
|
|
5769
|
+
Ei(u, n, t, { axis: l, direction: p }), a = !0;
|
|
5736
5770
|
}, d = (l) => {
|
|
5737
5771
|
const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Kn(l, n, p, u, {
|
|
5738
5772
|
axis: "x",
|
|
@@ -5751,7 +5785,7 @@ function fn(e, n, t) {
|
|
|
5751
5785
|
}
|
|
5752
5786
|
a || kn(t);
|
|
5753
5787
|
}
|
|
5754
|
-
function
|
|
5788
|
+
function Ni(e) {
|
|
5755
5789
|
let n = document.elementFromPoint(e.x, e.y);
|
|
5756
5790
|
if (!mn(n)) return;
|
|
5757
5791
|
let t, r = !0;
|
|
@@ -5801,38 +5835,38 @@ function an(e, n) {
|
|
|
5801
5835
|
}
|
|
5802
5836
|
return t;
|
|
5803
5837
|
}
|
|
5804
|
-
function
|
|
5838
|
+
function ki(e) {
|
|
5805
5839
|
if (e instanceof HTMLElement) return e;
|
|
5806
5840
|
if ("current" in e && e.current instanceof HTMLElement)
|
|
5807
5841
|
return e.current;
|
|
5808
5842
|
console.warn("Invalid parent element", e);
|
|
5809
5843
|
}
|
|
5810
|
-
function
|
|
5811
|
-
const t =
|
|
5844
|
+
function Ai(e, n) {
|
|
5845
|
+
const t = ki(e);
|
|
5812
5846
|
t && n(t);
|
|
5813
5847
|
}
|
|
5814
5848
|
var ln = /* @__PURE__ */ new WeakMap();
|
|
5815
|
-
function
|
|
5849
|
+
function $i(e) {
|
|
5816
5850
|
const n = ln.get(e);
|
|
5817
5851
|
return n ? n[0] : (console.warn("No values found for parent element"), []);
|
|
5818
5852
|
}
|
|
5819
|
-
function
|
|
5853
|
+
function Ii(e, n) {
|
|
5820
5854
|
const t = ln.get(n);
|
|
5821
5855
|
t && t[1](e), ln.set(n, [e, t[1]]);
|
|
5822
5856
|
}
|
|
5823
|
-
function
|
|
5857
|
+
function Ri(e, n) {
|
|
5824
5858
|
return (t) => {
|
|
5825
|
-
ln.set(t, n),
|
|
5859
|
+
ln.set(t, n), ja({ parent: t, getValues: $i, setValues: Ii, config: e });
|
|
5826
5860
|
};
|
|
5827
5861
|
}
|
|
5828
5862
|
function et(e) {
|
|
5829
|
-
|
|
5863
|
+
Mn && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
|
|
5830
5864
|
const { parent: t, state: r, ...o } = n;
|
|
5831
|
-
|
|
5865
|
+
Ai(t, Ri(o, r));
|
|
5832
5866
|
}));
|
|
5833
5867
|
}
|
|
5834
|
-
function
|
|
5835
|
-
const t = Fe(null), [r, o] =
|
|
5868
|
+
function Fi(e, n = {}) {
|
|
5869
|
+
const t = Fe(null), [r, o] = H(e);
|
|
5836
5870
|
function a(s = {}) {
|
|
5837
5871
|
et({ parent: t, state: [r, o], ...s });
|
|
5838
5872
|
}
|
|
@@ -5851,7 +5885,7 @@ const nt = {
|
|
|
5851
5885
|
color: E.palette.neutral.N40
|
|
5852
5886
|
}
|
|
5853
5887
|
}
|
|
5854
|
-
},
|
|
5888
|
+
}, Li = C.ul`
|
|
5855
5889
|
list-style: none;
|
|
5856
5890
|
padding: 0;
|
|
5857
5891
|
margin: 0;
|
|
@@ -5860,7 +5894,7 @@ const nt = {
|
|
|
5860
5894
|
gap: 12px;
|
|
5861
5895
|
width: 100%;
|
|
5862
5896
|
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
5863
|
-
`,
|
|
5897
|
+
`, Oi = C.li`
|
|
5864
5898
|
& > div {
|
|
5865
5899
|
border: 1px solid
|
|
5866
5900
|
${({ theme: e, $active: n }) => {
|
|
@@ -5878,57 +5912,57 @@ const nt = {
|
|
|
5878
5912
|
highlightFirst: s,
|
|
5879
5913
|
onMove: d,
|
|
5880
5914
|
locked: l = !1
|
|
5881
|
-
} = e, p =
|
|
5915
|
+
} = e, p = P.useRef(null), u = l ? [p, a] : Fi(a, { group: r }), [c, g] = u, [f, h] = P.useState(
|
|
5882
5916
|
null
|
|
5883
|
-
), x =
|
|
5884
|
-
|
|
5917
|
+
), x = P.useRef(a);
|
|
5918
|
+
P.useEffect(() => {
|
|
5885
5919
|
if (l) return;
|
|
5886
5920
|
const N = (w) => {
|
|
5887
|
-
const
|
|
5888
|
-
h(
|
|
5921
|
+
const F = w.detail ?? null;
|
|
5922
|
+
h(F);
|
|
5889
5923
|
};
|
|
5890
5924
|
return window.addEventListener(Tn, N), () => window.removeEventListener(Tn, N);
|
|
5891
5925
|
}, [l]);
|
|
5892
|
-
const b =
|
|
5926
|
+
const b = P.useCallback((N) => {
|
|
5893
5927
|
l || window.dispatchEvent(
|
|
5894
5928
|
new CustomEvent(Tn, { detail: N })
|
|
5895
5929
|
);
|
|
5896
5930
|
}, [l]), D = (N) => {
|
|
5897
|
-
var
|
|
5931
|
+
var $;
|
|
5898
5932
|
if (l) return;
|
|
5899
|
-
const w = N.target,
|
|
5900
|
-
|
|
5901
|
-
}, T =
|
|
5933
|
+
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;
|
|
5934
|
+
O && (h(O), b(O));
|
|
5935
|
+
}, T = P.useCallback(() => {
|
|
5902
5936
|
l || (h(null), b(null));
|
|
5903
5937
|
}, [b, l]);
|
|
5904
|
-
|
|
5938
|
+
P.useEffect(() => {
|
|
5905
5939
|
if (l) return;
|
|
5906
5940
|
const N = () => T();
|
|
5907
5941
|
return window.addEventListener("pointerup", N), window.addEventListener("blur", N), () => {
|
|
5908
5942
|
window.removeEventListener("pointerup", N), window.removeEventListener("blur", N);
|
|
5909
5943
|
};
|
|
5910
|
-
}, [T, l]),
|
|
5944
|
+
}, [T, l]), P.useEffect(() => {
|
|
5911
5945
|
if (l) return;
|
|
5912
5946
|
const N = x.current;
|
|
5913
5947
|
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:
|
|
5948
|
+
const w = new Set(N), F = g.find((O) => !w.has(O)) || null;
|
|
5949
|
+
if (F) {
|
|
5950
|
+
const O = t === "left" ? "right" : "left";
|
|
5951
|
+
d == null || d({ item: F, from: O, to: t });
|
|
5918
5952
|
}
|
|
5919
5953
|
}
|
|
5920
5954
|
x.current = g;
|
|
5921
5955
|
}, [g, t, d, l]);
|
|
5922
5956
|
const S = g.length === 0;
|
|
5923
5957
|
return /* @__PURE__ */ i(
|
|
5924
|
-
|
|
5958
|
+
je,
|
|
5925
5959
|
{
|
|
5926
5960
|
legend: o,
|
|
5927
5961
|
width: "100%",
|
|
5928
5962
|
height: "-webkit-fill-available",
|
|
5929
5963
|
spacing: "wide",
|
|
5930
5964
|
children: /* @__PURE__ */ i(
|
|
5931
|
-
|
|
5965
|
+
Li,
|
|
5932
5966
|
{
|
|
5933
5967
|
ref: c,
|
|
5934
5968
|
onPointerDownCapture: l ? void 0 : D,
|
|
@@ -5946,23 +5980,23 @@ const nt = {
|
|
|
5946
5980
|
width: "100%",
|
|
5947
5981
|
alignItems: "center",
|
|
5948
5982
|
justifyContent: "center",
|
|
5949
|
-
children: /* @__PURE__ */ i(
|
|
5983
|
+
children: /* @__PURE__ */ i(R, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
|
|
5950
5984
|
}
|
|
5951
5985
|
) : g.map((N, w) => {
|
|
5952
|
-
const
|
|
5986
|
+
const F = !l && f === N;
|
|
5953
5987
|
return /* @__PURE__ */ i(
|
|
5954
|
-
|
|
5988
|
+
Oi,
|
|
5955
5989
|
{
|
|
5956
|
-
className: `dnd-item${
|
|
5990
|
+
className: `dnd-item${F ? " is-dragging" : ""}`,
|
|
5957
5991
|
"data-label": N,
|
|
5958
5992
|
"data-first": !!(s && w === 0) || void 0,
|
|
5959
|
-
$active:
|
|
5993
|
+
$active: F,
|
|
5960
5994
|
children: /* @__PURE__ */ i(ie, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
|
|
5961
|
-
|
|
5995
|
+
R,
|
|
5962
5996
|
{
|
|
5963
5997
|
type: "title",
|
|
5964
|
-
appearance:
|
|
5965
|
-
weight:
|
|
5998
|
+
appearance: F ? "primary" : "dark",
|
|
5999
|
+
weight: F ? "bold" : "normal",
|
|
5966
6000
|
size: "medium",
|
|
5967
6001
|
padding: "6px 12px",
|
|
5968
6002
|
children: N
|
|
@@ -5976,7 +6010,7 @@ const nt = {
|
|
|
5976
6010
|
)
|
|
5977
6011
|
}
|
|
5978
6012
|
);
|
|
5979
|
-
},
|
|
6013
|
+
}, Al = (e) => {
|
|
5980
6014
|
const { group: n = "clients", left: t, right: r, onMove: o, locked: a = !1 } = e, s = (d) => {
|
|
5981
6015
|
a || o == null || o(d);
|
|
5982
6016
|
};
|
|
@@ -6017,7 +6051,7 @@ const nt = {
|
|
|
6017
6051
|
]
|
|
6018
6052
|
}
|
|
6019
6053
|
);
|
|
6020
|
-
},
|
|
6054
|
+
}, Mi = C.div`
|
|
6021
6055
|
& > button {
|
|
6022
6056
|
height: 66px;
|
|
6023
6057
|
min-width: 66px;
|
|
@@ -6035,7 +6069,7 @@ const nt = {
|
|
|
6035
6069
|
}
|
|
6036
6070
|
}
|
|
6037
6071
|
}
|
|
6038
|
-
`,
|
|
6072
|
+
`, $l = (e) => /* @__PURE__ */ i(Mi, { children: /* @__PURE__ */ i(B, { ...e }) }), Pi = C.div`
|
|
6039
6073
|
display: flex;
|
|
6040
6074
|
justify-content: space-between;
|
|
6041
6075
|
align-items: center;
|
|
@@ -6064,14 +6098,14 @@ const nt = {
|
|
|
6064
6098
|
}
|
|
6065
6099
|
}
|
|
6066
6100
|
}
|
|
6067
|
-
`,
|
|
6101
|
+
`, Il = (e) => {
|
|
6068
6102
|
const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: a } = e;
|
|
6069
6103
|
return /* @__PURE__ */ m(Pi, { children: [
|
|
6070
6104
|
/* @__PURE__ */ i(
|
|
6071
6105
|
B,
|
|
6072
6106
|
{
|
|
6073
6107
|
...e,
|
|
6074
|
-
iconBefore: /* @__PURE__ */ i(
|
|
6108
|
+
iconBefore: /* @__PURE__ */ i(_t, {}),
|
|
6075
6109
|
variant: "none",
|
|
6076
6110
|
onClick: n,
|
|
6077
6111
|
children: a.back,
|
|
@@ -6128,7 +6162,7 @@ const nt = {
|
|
|
6128
6162
|
hover: E.palette.neutral.N30
|
|
6129
6163
|
}
|
|
6130
6164
|
}
|
|
6131
|
-
},
|
|
6165
|
+
}, zi = C.ul`
|
|
6132
6166
|
display: flex;
|
|
6133
6167
|
flex-direction: column;
|
|
6134
6168
|
padding: 4px 0px;
|
|
@@ -6179,7 +6213,7 @@ const nt = {
|
|
|
6179
6213
|
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
6214
|
}};
|
|
6181
6215
|
}
|
|
6182
|
-
`,
|
|
6216
|
+
`, Vi = (e) => {
|
|
6183
6217
|
const { children: n, onOptionClick: t, options: r, maxItems: o } = e, a = (s) => {
|
|
6184
6218
|
try {
|
|
6185
6219
|
if (s.target.closest('input[type="checkbox"]'))
|
|
@@ -6196,7 +6230,7 @@ const nt = {
|
|
|
6196
6230
|
}
|
|
6197
6231
|
};
|
|
6198
6232
|
return /* @__PURE__ */ i(
|
|
6199
|
-
|
|
6233
|
+
zi,
|
|
6200
6234
|
{
|
|
6201
6235
|
$maxItems: o,
|
|
6202
6236
|
$totalOptions: r == null ? void 0 : r.length,
|
|
@@ -6204,17 +6238,17 @@ const nt = {
|
|
|
6204
6238
|
children: n
|
|
6205
6239
|
}
|
|
6206
6240
|
);
|
|
6207
|
-
},
|
|
6241
|
+
}, _i = C.div`
|
|
6208
6242
|
cursor: ${({ $disabled: e }) => e && "not-allowed"};
|
|
6209
6243
|
width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
|
|
6210
6244
|
position: relative;
|
|
6211
|
-
`,
|
|
6245
|
+
`, Ui = C.div`
|
|
6212
6246
|
display: flex;
|
|
6213
6247
|
align-items: center;
|
|
6214
6248
|
margin-bottom: 4px;
|
|
6215
6249
|
gap: 4px;
|
|
6216
6250
|
pointer-events: ${({ $disabled: e }) => e && "none"};
|
|
6217
|
-
`,
|
|
6251
|
+
`, ji = C.div`
|
|
6218
6252
|
display: grid;
|
|
6219
6253
|
height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
|
|
6220
6254
|
padding: 8px 16px;
|
|
@@ -6238,7 +6272,7 @@ const nt = {
|
|
|
6238
6272
|
const o = ((s = (a = r == null ? void 0 : r.input) == null ? void 0 : a.border) == null ? void 0 : s.color) || ge.border.color;
|
|
6239
6273
|
return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
|
|
6240
6274
|
}};
|
|
6241
|
-
`,
|
|
6275
|
+
`, Hi = C.input`
|
|
6242
6276
|
display: ${({ $inputWithData: e }) => e ? "none" : "block"};
|
|
6243
6277
|
outline: none;
|
|
6244
6278
|
padding: 0;
|
|
@@ -6296,23 +6330,23 @@ const nt = {
|
|
|
6296
6330
|
&:-webkit-autofill {
|
|
6297
6331
|
-webkit-background-clip: text;
|
|
6298
6332
|
}
|
|
6299
|
-
`,
|
|
6333
|
+
`, qi = C.div`
|
|
6300
6334
|
display: flex;
|
|
6301
6335
|
justify-content: flex-end;
|
|
6302
6336
|
transition: ease;
|
|
6303
6337
|
transition-duration: 500ms;
|
|
6304
6338
|
transform: ${({ $displayList: e }) => e ? "rotate(-90deg)" : "rotate(90deg)"};
|
|
6305
|
-
`,
|
|
6339
|
+
`, Bi = (e) => e === "compact" ? "medium" : "large";
|
|
6306
6340
|
function rt(e, n) {
|
|
6307
6341
|
const t = e.find((r) => r.value === n);
|
|
6308
6342
|
return t ? t.label : n;
|
|
6309
6343
|
}
|
|
6310
|
-
const
|
|
6344
|
+
const Gi = (e) => {
|
|
6311
6345
|
var o, a;
|
|
6312
6346
|
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
6347
|
return /* @__PURE__ */ m(y, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
|
|
6314
6348
|
/* @__PURE__ */ i(
|
|
6315
|
-
|
|
6349
|
+
j,
|
|
6316
6350
|
{
|
|
6317
6351
|
appearance: r,
|
|
6318
6352
|
icon: /* @__PURE__ */ i(Ht, {}),
|
|
@@ -6320,7 +6354,7 @@ const Bi = (e) => {
|
|
|
6320
6354
|
}
|
|
6321
6355
|
),
|
|
6322
6356
|
/* @__PURE__ */ i(
|
|
6323
|
-
|
|
6357
|
+
R,
|
|
6324
6358
|
{
|
|
6325
6359
|
type: "body",
|
|
6326
6360
|
size: "small",
|
|
@@ -6330,7 +6364,7 @@ const Bi = (e) => {
|
|
|
6330
6364
|
}
|
|
6331
6365
|
)
|
|
6332
6366
|
] });
|
|
6333
|
-
},
|
|
6367
|
+
}, Yi = Qt((e, n) => {
|
|
6334
6368
|
var me, le;
|
|
6335
6369
|
const {
|
|
6336
6370
|
displayList: t,
|
|
@@ -6353,25 +6387,25 @@ const Bi = (e) => {
|
|
|
6353
6387
|
checkedItems: S,
|
|
6354
6388
|
editable: N = !1,
|
|
6355
6389
|
clearable: w,
|
|
6356
|
-
onKeyUp:
|
|
6357
|
-
onBlur:
|
|
6358
|
-
onChange:
|
|
6390
|
+
onKeyUp: F,
|
|
6391
|
+
onBlur: O,
|
|
6392
|
+
onChange: $,
|
|
6359
6393
|
onClick: V,
|
|
6360
6394
|
onFocus: Z,
|
|
6361
6395
|
onOptionClick: be,
|
|
6362
6396
|
onCheckboxChange: ve,
|
|
6363
6397
|
handleClear: fe
|
|
6364
6398
|
} = 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((
|
|
6399
|
+
() => g.filter((_) => S.includes(_.id)),
|
|
6366
6400
|
[g, S]
|
|
6367
|
-
), Te = (
|
|
6368
|
-
|
|
6369
|
-
target: { checked: !1, value:
|
|
6401
|
+
), Te = (_, A) => {
|
|
6402
|
+
_.stopPropagation(), ve({
|
|
6403
|
+
target: { checked: !1, value: A }
|
|
6370
6404
|
});
|
|
6371
6405
|
};
|
|
6372
|
-
return /* @__PURE__ */ m(
|
|
6406
|
+
return /* @__PURE__ */ m(_i, { $fullwidth: a, $disabled: r, ref: n, children: [
|
|
6373
6407
|
l && /* @__PURE__ */ m(
|
|
6374
|
-
|
|
6408
|
+
Ui,
|
|
6375
6409
|
{
|
|
6376
6410
|
$alignItems: "center",
|
|
6377
6411
|
$disabled: r,
|
|
@@ -6384,17 +6418,17 @@ const Bi = (e) => {
|
|
|
6384
6418
|
focused: o,
|
|
6385
6419
|
invalid: d,
|
|
6386
6420
|
margin: "0px 0px 0px 16px",
|
|
6387
|
-
size:
|
|
6421
|
+
size: Bi(x),
|
|
6388
6422
|
disabled: r,
|
|
6389
6423
|
children: l
|
|
6390
6424
|
}
|
|
6391
6425
|
),
|
|
6392
|
-
Ne && /* @__PURE__ */ i(
|
|
6426
|
+
Ne && /* @__PURE__ */ i(R, { appearance: ye, size: "small", type: "body", children: "(Requerido)" })
|
|
6393
6427
|
]
|
|
6394
6428
|
}
|
|
6395
6429
|
),
|
|
6396
6430
|
/* @__PURE__ */ m(
|
|
6397
|
-
|
|
6431
|
+
ji,
|
|
6398
6432
|
{
|
|
6399
6433
|
$disabled: r,
|
|
6400
6434
|
$focused: o,
|
|
@@ -6404,7 +6438,7 @@ const Bi = (e) => {
|
|
|
6404
6438
|
$size: x,
|
|
6405
6439
|
children: [
|
|
6406
6440
|
/* @__PURE__ */ i(
|
|
6407
|
-
|
|
6441
|
+
Hi,
|
|
6408
6442
|
{
|
|
6409
6443
|
$inputWithData: !!b,
|
|
6410
6444
|
autoComplete: "off",
|
|
@@ -6419,10 +6453,10 @@ const Bi = (e) => {
|
|
|
6419
6453
|
$focused: o,
|
|
6420
6454
|
readOnly: !N,
|
|
6421
6455
|
onFocus: Z,
|
|
6422
|
-
onBlur:
|
|
6423
|
-
onChange: (
|
|
6456
|
+
onBlur: O,
|
|
6457
|
+
onChange: (_) => $(c, _.target.value),
|
|
6424
6458
|
onClick: N ? V : void 0,
|
|
6425
|
-
onKeyUp:
|
|
6459
|
+
onKeyUp: F
|
|
6426
6460
|
}
|
|
6427
6461
|
),
|
|
6428
6462
|
/* @__PURE__ */ m(
|
|
@@ -6433,16 +6467,16 @@ const Bi = (e) => {
|
|
|
6433
6467
|
alignItems: "center",
|
|
6434
6468
|
justifyContent: "space-between",
|
|
6435
6469
|
children: [
|
|
6436
|
-
/* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: w && !r && (D ? xe.map((
|
|
6470
|
+
/* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: w && !r && (D ? xe.map((_) => /* @__PURE__ */ i(
|
|
6437
6471
|
ke,
|
|
6438
6472
|
{
|
|
6439
6473
|
appearance: "gray",
|
|
6440
|
-
label:
|
|
6474
|
+
label: _.label,
|
|
6441
6475
|
removable: !0,
|
|
6442
6476
|
displayIcon: !1,
|
|
6443
|
-
onClose: (
|
|
6477
|
+
onClose: (A) => Te(A, _.id)
|
|
6444
6478
|
},
|
|
6445
|
-
|
|
6479
|
+
_.id
|
|
6446
6480
|
)) : (b ?? "") !== "" && /* @__PURE__ */ i(
|
|
6447
6481
|
ke,
|
|
6448
6482
|
{
|
|
@@ -6450,16 +6484,16 @@ const Bi = (e) => {
|
|
|
6450
6484
|
label: rt(g, b),
|
|
6451
6485
|
removable: !0,
|
|
6452
6486
|
displayIcon: !1,
|
|
6453
|
-
onClose: (
|
|
6454
|
-
|
|
6487
|
+
onClose: (_) => {
|
|
6488
|
+
_.stopPropagation(), fe();
|
|
6455
6489
|
}
|
|
6456
6490
|
}
|
|
6457
6491
|
)) }),
|
|
6458
|
-
T && /* @__PURE__ */ i(
|
|
6459
|
-
|
|
6492
|
+
T && /* @__PURE__ */ i(qi, { $displayList: t, children: /* @__PURE__ */ i(
|
|
6493
|
+
j,
|
|
6460
6494
|
{
|
|
6461
6495
|
appearance: "dark",
|
|
6462
|
-
icon: /* @__PURE__ */ i(
|
|
6496
|
+
icon: /* @__PURE__ */ i(jt, {}),
|
|
6463
6497
|
spacing: "narrow",
|
|
6464
6498
|
disabled: r
|
|
6465
6499
|
}
|
|
@@ -6470,28 +6504,28 @@ const Bi = (e) => {
|
|
|
6470
6504
|
]
|
|
6471
6505
|
}
|
|
6472
6506
|
),
|
|
6473
|
-
d && /* @__PURE__ */ i(
|
|
6507
|
+
d && /* @__PURE__ */ i(Gi, { message: u }),
|
|
6474
6508
|
t && !r && /* @__PURE__ */ i(
|
|
6475
|
-
|
|
6509
|
+
Vi,
|
|
6476
6510
|
{
|
|
6477
6511
|
maxItems: p,
|
|
6478
6512
|
onOptionClick: be,
|
|
6479
6513
|
options: g,
|
|
6480
|
-
children: g.map((
|
|
6514
|
+
children: g.map((_) => /* @__PURE__ */ i(
|
|
6481
6515
|
Xt,
|
|
6482
6516
|
{
|
|
6483
|
-
id:
|
|
6484
|
-
label:
|
|
6485
|
-
checked: S.includes(
|
|
6517
|
+
id: _.id,
|
|
6518
|
+
label: _.label,
|
|
6519
|
+
checked: S.includes(_.id),
|
|
6486
6520
|
onCheckboxChange: ve,
|
|
6487
6521
|
picker: D
|
|
6488
6522
|
},
|
|
6489
|
-
|
|
6523
|
+
_.id
|
|
6490
6524
|
))
|
|
6491
6525
|
}
|
|
6492
6526
|
)
|
|
6493
6527
|
] });
|
|
6494
|
-
}),
|
|
6528
|
+
}), Wi = (e) => {
|
|
6495
6529
|
const {
|
|
6496
6530
|
disabled: n = !1,
|
|
6497
6531
|
fullwidth: t = !1,
|
|
@@ -6514,71 +6548,71 @@ const Bi = (e) => {
|
|
|
6514
6548
|
showOptions: S = !1,
|
|
6515
6549
|
picker: N = !1,
|
|
6516
6550
|
showChevron: w = !0,
|
|
6517
|
-
editable:
|
|
6518
|
-
clearable:
|
|
6519
|
-
} = e, [
|
|
6551
|
+
editable: F = !1,
|
|
6552
|
+
clearable: O = !0
|
|
6553
|
+
} = e, [$, V] = H(!1), [Z, be] = H(!1), [ve, fe] = H([]), ae = Fe(null);
|
|
6520
6554
|
$e(() => {
|
|
6521
6555
|
if (N) {
|
|
6522
|
-
const
|
|
6523
|
-
fe(
|
|
6556
|
+
const A = T ? T.split(",").map((M) => M.trim()) : [];
|
|
6557
|
+
fe(A);
|
|
6524
6558
|
}
|
|
6525
6559
|
}, [T, N]);
|
|
6526
6560
|
function ye() {
|
|
6527
6561
|
u(l, ""), fe([]), V(!1);
|
|
6528
6562
|
}
|
|
6529
|
-
function Ne(
|
|
6563
|
+
function Ne(A) {
|
|
6530
6564
|
if (!n) {
|
|
6531
|
-
V(
|
|
6565
|
+
V(!$);
|
|
6532
6566
|
try {
|
|
6533
|
-
c && c(
|
|
6534
|
-
} catch (
|
|
6535
|
-
console.error(`Error when clicking over select. ${
|
|
6567
|
+
c && c(A);
|
|
6568
|
+
} catch (M) {
|
|
6569
|
+
console.error(`Error when clicking over select. ${M}`);
|
|
6536
6570
|
}
|
|
6537
6571
|
}
|
|
6538
6572
|
}
|
|
6539
|
-
const ue = Zt((
|
|
6540
|
-
ae.current &&
|
|
6573
|
+
const ue = Zt((A) => {
|
|
6574
|
+
ae.current && A.target && !ae.current.contains(A.target) && V(!1);
|
|
6541
6575
|
}, []);
|
|
6542
|
-
function xe(
|
|
6576
|
+
function xe(A) {
|
|
6543
6577
|
try {
|
|
6544
|
-
|
|
6545
|
-
} catch (
|
|
6546
|
-
console.error(`Error executing focus/blur callback. ${
|
|
6578
|
+
A.type === "focus" && (be(!0), g && g(A)), A.type === "blur" && (be(!1), p && p(A));
|
|
6579
|
+
} catch (M) {
|
|
6580
|
+
console.error(`Error executing focus/blur callback. ${M}`);
|
|
6547
6581
|
}
|
|
6548
6582
|
}
|
|
6549
|
-
function Te(
|
|
6583
|
+
function Te(A) {
|
|
6550
6584
|
V(!1);
|
|
6551
6585
|
try {
|
|
6552
|
-
u && u(l,
|
|
6553
|
-
} catch (
|
|
6554
|
-
console.error(`Error when changing value using callback. ${
|
|
6586
|
+
u && u(l, A);
|
|
6587
|
+
} catch (M) {
|
|
6588
|
+
console.error(`Error when changing value using callback. ${M}`);
|
|
6555
6589
|
}
|
|
6556
6590
|
}
|
|
6557
|
-
function me(
|
|
6558
|
-
|
|
6591
|
+
function me(A) {
|
|
6592
|
+
A.key === "Escape" && V(!1), V(!$);
|
|
6559
6593
|
try {
|
|
6560
|
-
f && f(
|
|
6561
|
-
} catch (
|
|
6562
|
-
console.error(`Error when clicking over select. ${
|
|
6594
|
+
f && f(A);
|
|
6595
|
+
} catch (M) {
|
|
6596
|
+
console.error(`Error when clicking over select. ${M}`);
|
|
6563
6597
|
}
|
|
6564
6598
|
}
|
|
6565
|
-
function le(
|
|
6566
|
-
const { value:
|
|
6567
|
-
fe((
|
|
6568
|
-
const
|
|
6569
|
-
return u(l,
|
|
6599
|
+
function le(A) {
|
|
6600
|
+
const { value: M, checked: pe } = A.target;
|
|
6601
|
+
fe((L) => {
|
|
6602
|
+
const I = pe ? [...L, M] : L.filter((U) => U !== M);
|
|
6603
|
+
return u(l, I.join(",")), I;
|
|
6570
6604
|
});
|
|
6571
6605
|
}
|
|
6572
6606
|
$e(() => (document.addEventListener("click", ue), () => {
|
|
6573
6607
|
document.removeEventListener("click", ue);
|
|
6574
6608
|
}), [ue]);
|
|
6575
|
-
const
|
|
6609
|
+
const _ = dt(() => O || N ? h : [{ id: "empty-option", label: "", value: "" }, ...h], [h, O, N]);
|
|
6576
6610
|
return /* @__PURE__ */ i(
|
|
6577
|
-
|
|
6611
|
+
Yi,
|
|
6578
6612
|
{
|
|
6579
6613
|
ref: ae,
|
|
6580
6614
|
disabled: n,
|
|
6581
|
-
displayList:
|
|
6615
|
+
displayList: $ || S,
|
|
6582
6616
|
focused: Z,
|
|
6583
6617
|
fullwidth: t,
|
|
6584
6618
|
id: r,
|
|
@@ -6587,7 +6621,7 @@ const Bi = (e) => {
|
|
|
6587
6621
|
maxItems: s,
|
|
6588
6622
|
message: d,
|
|
6589
6623
|
name: l,
|
|
6590
|
-
options:
|
|
6624
|
+
options: _,
|
|
6591
6625
|
placeholder: x,
|
|
6592
6626
|
required: b,
|
|
6593
6627
|
size: D,
|
|
@@ -6595,8 +6629,8 @@ const Bi = (e) => {
|
|
|
6595
6629
|
picker: N,
|
|
6596
6630
|
showChevron: w,
|
|
6597
6631
|
checkedItems: ve,
|
|
6598
|
-
editable:
|
|
6599
|
-
clearable:
|
|
6632
|
+
editable: F,
|
|
6633
|
+
clearable: O,
|
|
6600
6634
|
handleClear: ye,
|
|
6601
6635
|
onBlur: xe,
|
|
6602
6636
|
onChange: u,
|
|
@@ -6607,7 +6641,7 @@ const Bi = (e) => {
|
|
|
6607
6641
|
onCheckboxChange: le
|
|
6608
6642
|
}
|
|
6609
6643
|
);
|
|
6610
|
-
},
|
|
6644
|
+
}, Rl = (e) => {
|
|
6611
6645
|
const {
|
|
6612
6646
|
disabled: n = !1,
|
|
6613
6647
|
fullwidth: t = !1,
|
|
@@ -6625,7 +6659,7 @@ const Bi = (e) => {
|
|
|
6625
6659
|
values: h
|
|
6626
6660
|
} = e;
|
|
6627
6661
|
return /* @__PURE__ */ i(
|
|
6628
|
-
|
|
6662
|
+
Wi,
|
|
6629
6663
|
{
|
|
6630
6664
|
disabled: n,
|
|
6631
6665
|
fullwidth: t,
|
|
@@ -6644,30 +6678,30 @@ const Bi = (e) => {
|
|
|
6644
6678
|
picker: !0
|
|
6645
6679
|
}
|
|
6646
6680
|
);
|
|
6647
|
-
},
|
|
6648
|
-
const t =
|
|
6681
|
+
}, Fl = (e) => Object.values(e).flat(), Ll = (e, n) => {
|
|
6682
|
+
const t = Pe(e);
|
|
6649
6683
|
return Object.fromEntries(
|
|
6650
6684
|
Object.entries(t).map(([r, o]) => [r, o.map(n)])
|
|
6651
6685
|
);
|
|
6652
|
-
},
|
|
6686
|
+
}, Xi = (e) => Object.entries(e).map(([n, t]) => ({
|
|
6653
6687
|
ConditionGroupId: n,
|
|
6654
6688
|
conditionsThatEstablishesTheDecision: rn(t)
|
|
6655
|
-
})),
|
|
6656
|
-
const n =
|
|
6689
|
+
})), Ol = (e) => {
|
|
6690
|
+
const n = Pe(e), t = {
|
|
6657
6691
|
...e,
|
|
6658
|
-
conditionGroups:
|
|
6692
|
+
conditionGroups: Xi(n)
|
|
6659
6693
|
};
|
|
6660
6694
|
return delete t.conditionsThatEstablishesTheDecision, t;
|
|
6661
|
-
}, Ue = /* @__PURE__ */ new Map(),
|
|
6695
|
+
}, Ue = /* @__PURE__ */ new Map(), Qi = (e, n) => Ue.get(`${n}:${e}`), Zi = (e, n, t) => {
|
|
6662
6696
|
const r = `${n}:${e}`;
|
|
6663
6697
|
if (Ue.set(r, t), Ue.size > 1e3) {
|
|
6664
6698
|
const o = Ue.keys().next().value;
|
|
6665
6699
|
o !== void 0 && Ue.delete(o);
|
|
6666
6700
|
}
|
|
6667
|
-
}, ot = /* @__PURE__ */ new Map(),
|
|
6701
|
+
}, ot = /* @__PURE__ */ new Map(), Ki = 1e3, Ji = (e) => {
|
|
6668
6702
|
const n = Date.now(), t = ot.get(e) || 0;
|
|
6669
|
-
return n - t <
|
|
6670
|
-
},
|
|
6703
|
+
return n - t < Ki ? !0 : (ot.set(e, n), !1);
|
|
6704
|
+
}, el = (e) => {
|
|
6671
6705
|
const n = er(e);
|
|
6672
6706
|
return {
|
|
6673
6707
|
spa: "es",
|
|
@@ -6677,12 +6711,12 @@ const Bi = (e) => {
|
|
|
6677
6711
|
ita: "it",
|
|
6678
6712
|
por: "pt"
|
|
6679
6713
|
}[n] || "en";
|
|
6680
|
-
},
|
|
6681
|
-
const o = `${n}:${e}`, a =
|
|
6714
|
+
}, nl = async (e, n, { url: t, apiKey: r }) => {
|
|
6715
|
+
const o = `${n}:${e}`, a = Qi(e, n);
|
|
6682
6716
|
if (a) return a;
|
|
6683
|
-
if (
|
|
6717
|
+
if (Ji(o))
|
|
6684
6718
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
6685
|
-
const s =
|
|
6719
|
+
const s = el(e);
|
|
6686
6720
|
try {
|
|
6687
6721
|
const { data: d } = await Jt.post(
|
|
6688
6722
|
t,
|
|
@@ -6698,15 +6732,15 @@ const Bi = (e) => {
|
|
|
6698
6732
|
}
|
|
6699
6733
|
}
|
|
6700
6734
|
), l = (d == null ? void 0 : d.translatedText) || e;
|
|
6701
|
-
return
|
|
6735
|
+
return Zi(e, n, l), l;
|
|
6702
6736
|
} catch (d) {
|
|
6703
6737
|
return console.warn(`[Translation] Failed for: "${e}"`, d), e;
|
|
6704
6738
|
}
|
|
6705
|
-
},
|
|
6739
|
+
}, tl = (e) => typeof e == "string" && e.trim().length > 0, at = async (e, n, t) => {
|
|
6706
6740
|
const r = await Promise.all(
|
|
6707
6741
|
Object.entries(e).map(async ([o, a]) => {
|
|
6708
|
-
if (
|
|
6709
|
-
const s = await
|
|
6742
|
+
if (tl(a)) {
|
|
6743
|
+
const s = await nl(a, n, t);
|
|
6710
6744
|
return [o, s];
|
|
6711
6745
|
} else if (Array.isArray(a)) {
|
|
6712
6746
|
const s = await Promise.all(
|
|
@@ -6725,40 +6759,40 @@ const Bi = (e) => {
|
|
|
6725
6759
|
return Object.fromEntries(r);
|
|
6726
6760
|
};
|
|
6727
6761
|
export {
|
|
6728
|
-
|
|
6762
|
+
Il as BackAndNextButton,
|
|
6729
6763
|
Qe as BusinessRuleCard,
|
|
6730
6764
|
gt as BusinessRuleCardNew,
|
|
6731
6765
|
Ln as BusinessRuleView,
|
|
6732
6766
|
ft as BusinessRuleViewNew,
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6767
|
+
ml as BusinessRules,
|
|
6768
|
+
vl as BusinessRulesNew,
|
|
6769
|
+
bl as BusinessRulesWithGroup,
|
|
6770
|
+
Rl as Checkpicker,
|
|
6771
|
+
Al as DragAndDropBoxes,
|
|
6738
6772
|
tt as DraggableList,
|
|
6739
|
-
|
|
6740
|
-
|
|
6773
|
+
$a as DropdownMenu,
|
|
6774
|
+
kl as DropdownMenuContainer,
|
|
6741
6775
|
se as EValueHowToSetUp,
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6776
|
+
yl as Filter,
|
|
6777
|
+
xl as FilterModal,
|
|
6778
|
+
Tl as FormFilter,
|
|
6745
6779
|
ut as ModalRules,
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6780
|
+
Ca as RulesForm,
|
|
6781
|
+
$l as SendButton,
|
|
6782
|
+
qo as buildEsConditionSentence,
|
|
6783
|
+
ua as convertRangeToString,
|
|
6750
6784
|
ht as filterByGroup,
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6785
|
+
Fl as flatFromGroups,
|
|
6786
|
+
wl as formatDecisionForBackend,
|
|
6787
|
+
Pe as getConditionsByGroupNew,
|
|
6788
|
+
Xi as groupsRecordToArrayNew,
|
|
6789
|
+
Ll as mapByGroupNew,
|
|
6790
|
+
Ol as normalizeDecisionToNewShape,
|
|
6791
|
+
Cl as parseRangeFromString,
|
|
6792
|
+
Dl as revertSortedDataSampleSwitchPlaces,
|
|
6793
|
+
Sl as revertSortedDataSwitchPlaces,
|
|
6794
|
+
El as sortDisplayDataSampleSwitchPlaces,
|
|
6795
|
+
Nl as sortDisplayDataSwitchPlaces,
|
|
6762
6796
|
at as translateObject,
|
|
6763
|
-
|
|
6797
|
+
nl as translateText
|
|
6764
6798
|
};
|