@isettingkit/business-rules 2.2.10 → 2.2.12
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 +191 -191
- package/package.json +8 -8
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as a, jsxs as m, Fragment as
|
|
1
|
+
import { jsx as a, jsxs as m, Fragment as V } from "react/jsx-runtime";
|
|
2
2
|
import { MdOutlineDelete as ft, MdClear as Gt, MdAdd as We, MdOutlineCreate as zn, MdExpandLess as Hn, MdExpandMore as Lt, MdInfo as Gn, MdCached as Bn, MdOutlineInfo as qn, MdClose as Wn, MdOutlineFilterAltOff as Yn, MdOutlineFilterAlt as Tn, MdChevronRight as Kt, MdArrowRight as Xn, MdOutlineArrowCircleLeft as Qn, MdOutlineArrowCircleRight as Jn } from "react-icons/md";
|
|
3
|
-
import { inube as I, Stack as y, Divider as Y, Icon as G, Text as F, SkeletonLine as re, useMediaQuery as ue, Blanket as Bt, Button as Q, Grid as Ye, Toggle as mt, Checkbox as qt, Date as ke, Box as Zn, Tag as
|
|
3
|
+
import { inube as I, Stack as y, Divider as Y, Icon as G, Text as F, SkeletonLine as re, useMediaQuery as ue, Blanket as Bt, Button as Q, Grid as Ye, Toggle as mt, Checkbox as qt, Date as ke, Box as Zn, Tag as Pe, Tabs as xn, SkeletonIcon as Kn, Fieldset as Ve, OptionList as eo, Checkpicker as to } from "@inubekit/inubekit";
|
|
4
4
|
import E, { keyframes as Wt, ThemeContext as no } from "styled-components";
|
|
5
|
-
import { ValueDataType as
|
|
5
|
+
import { ValueDataType as H, ValueHowToSetUp as j, DecisionConditionRender as ut, DecisionConditionRenderNew as en } from "@isettingkit/input";
|
|
6
6
|
import { DecisionViewConditionRenderer as Ee, DecisionViewConditionRendererNew as it } from "@isettingkit/view";
|
|
7
7
|
import { createPortal as Yt } from "react-dom";
|
|
8
8
|
import { useFormik as Xt } from "formik";
|
|
9
9
|
import { string as pe, mixed as $e, object as te, number as he, lazy as Ge, date as Ae } from "yup";
|
|
10
|
-
import
|
|
10
|
+
import P, { useState as B, useRef as je, useEffect as Be, useContext as oo } from "react";
|
|
11
11
|
import { Link as Dn, useLocation as ro } from "react-router-dom";
|
|
12
12
|
import io from "axios";
|
|
13
13
|
import { franc as ao } from "franc-min";
|
|
@@ -50,7 +50,7 @@ const Xe = (e) => {
|
|
|
50
50
|
const { children: t, controls: n = !0, handleDelete: o, id: r } = e;
|
|
51
51
|
return /* @__PURE__ */ a(lo, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
52
52
|
t,
|
|
53
|
-
n && /* @__PURE__ */ m(
|
|
53
|
+
n && /* @__PURE__ */ m(V, { children: [
|
|
54
54
|
/* @__PURE__ */ a(Y, {}),
|
|
55
55
|
/* @__PURE__ */ a(y, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
|
|
56
56
|
G,
|
|
@@ -161,7 +161,7 @@ const mo = {
|
|
|
161
161
|
}
|
|
162
162
|
) }) }, p.conditionName)),
|
|
163
163
|
u.length > 0 && /* @__PURE__ */ a(Y, { dashed: !0 }),
|
|
164
|
-
d && /* @__PURE__ */ a(
|
|
164
|
+
d && /* @__PURE__ */ a(V, { children: o && /* @__PURE__ */ a(
|
|
165
165
|
Ee,
|
|
166
166
|
{
|
|
167
167
|
element: o.element,
|
|
@@ -211,8 +211,8 @@ const mo = {
|
|
|
211
211
|
element: {
|
|
212
212
|
labelName: o == null ? void 0 : o.terms,
|
|
213
213
|
value: String(t.effectiveFrom),
|
|
214
|
-
howToSetTheDecision:
|
|
215
|
-
decisionDataType:
|
|
214
|
+
howToSetTheDecision: j.RANGE,
|
|
215
|
+
decisionDataType: H.DATE
|
|
216
216
|
},
|
|
217
217
|
valueData: Ue({
|
|
218
218
|
labelName: o == null ? void 0 : o.terms,
|
|
@@ -220,21 +220,21 @@ const mo = {
|
|
|
220
220
|
from: String(t.effectiveFrom),
|
|
221
221
|
to: String(t.validUntil)
|
|
222
222
|
},
|
|
223
|
-
howToSetTheDecision:
|
|
224
|
-
decisionDataType:
|
|
223
|
+
howToSetTheDecision: j.RANGE,
|
|
224
|
+
decisionDataType: H.DATE
|
|
225
225
|
})
|
|
226
226
|
} : r && !i ? {
|
|
227
227
|
element: {
|
|
228
228
|
labelName: o == null ? void 0 : o.terms,
|
|
229
229
|
value: String(t.effectiveFrom),
|
|
230
|
-
howToSetTheDecision:
|
|
231
|
-
decisionDataType:
|
|
230
|
+
howToSetTheDecision: j.EQUAL,
|
|
231
|
+
decisionDataType: H.DATE
|
|
232
232
|
},
|
|
233
233
|
valueData: Ue({
|
|
234
234
|
labelName: o == null ? void 0 : o.terms,
|
|
235
235
|
value: String(t.effectiveFrom),
|
|
236
|
-
howToSetTheDecision:
|
|
237
|
-
decisionDataType:
|
|
236
|
+
howToSetTheDecision: j.EQUAL,
|
|
237
|
+
decisionDataType: H.DATE
|
|
238
238
|
})
|
|
239
239
|
} : null, d = t ? {
|
|
240
240
|
labelName: t.labelName || "",
|
|
@@ -513,7 +513,7 @@ const Cn = E.div`
|
|
|
513
513
|
handleDelete: g,
|
|
514
514
|
textValues: i
|
|
515
515
|
}), S = (r == null ? void 0 : r.length) === 0 && !u;
|
|
516
|
-
return /* @__PURE__ */ m(
|
|
516
|
+
return /* @__PURE__ */ m(V, { children: [
|
|
517
517
|
/* @__PURE__ */ a(xo, { children: /* @__PURE__ */ a(Do, { children: /* @__PURE__ */ a(y, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
|
|
518
518
|
y,
|
|
519
519
|
{
|
|
@@ -524,7 +524,7 @@ const Cn = E.div`
|
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ a(F, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ m(
|
|
527
|
+
/* @__PURE__ */ a(F, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ m(V, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
529
|
/* @__PURE__ */ m(
|
|
530
530
|
F,
|
|
@@ -749,14 +749,14 @@ const Fo = E.div`
|
|
|
749
749
|
},
|
|
750
750
|
`loading-card-${t}`
|
|
751
751
|
);
|
|
752
|
-
}, Oo = (e) => e.value, Mo = (e) => e.value,
|
|
752
|
+
}, Oo = (e) => e.value, Mo = (e) => e.value, _o = (e) => e.value, Po = (e) => ({
|
|
753
753
|
from: e.from ?? "",
|
|
754
754
|
to: e.to ?? ""
|
|
755
|
-
}),
|
|
755
|
+
}), Vo = (e) => e.value, jo = (e) => e.value, Uo = (e) => e.value, zo = {
|
|
756
756
|
[k.LIST_OF_VALUES]: Mo,
|
|
757
|
-
[k.LIST_OF_VALUES_MULTI]:
|
|
758
|
-
[k.RANGE]:
|
|
759
|
-
[k.GREATER_THAN]:
|
|
757
|
+
[k.LIST_OF_VALUES_MULTI]: _o,
|
|
758
|
+
[k.RANGE]: Po,
|
|
759
|
+
[k.GREATER_THAN]: Vo,
|
|
760
760
|
[k.LESS_THAN]: jo,
|
|
761
761
|
[k.EQUAL]: Uo
|
|
762
762
|
}, ze = (e) => {
|
|
@@ -842,7 +842,7 @@ const Fo = E.div`
|
|
|
842
842
|
}
|
|
843
843
|
) }) }, p.conditionName)),
|
|
844
844
|
u.length > 0 && /* @__PURE__ */ a(Y, { dashed: !0 }),
|
|
845
|
-
d && /* @__PURE__ */ a(
|
|
845
|
+
d && /* @__PURE__ */ a(V, { children: o && /* @__PURE__ */ a(
|
|
846
846
|
Ee,
|
|
847
847
|
{
|
|
848
848
|
element: o.element,
|
|
@@ -894,8 +894,8 @@ const Fo = E.div`
|
|
|
894
894
|
element: {
|
|
895
895
|
labelName: o == null ? void 0 : o.terms,
|
|
896
896
|
value: String(t.effectiveFrom),
|
|
897
|
-
howToSetTheDecision:
|
|
898
|
-
decisionDataType:
|
|
897
|
+
howToSetTheDecision: j.RANGE,
|
|
898
|
+
decisionDataType: H.DATE
|
|
899
899
|
},
|
|
900
900
|
valueData: ze({
|
|
901
901
|
labelName: o == null ? void 0 : o.terms,
|
|
@@ -903,21 +903,21 @@ const Fo = E.div`
|
|
|
903
903
|
from: String(t.effectiveFrom),
|
|
904
904
|
to: String(t.validUntil)
|
|
905
905
|
},
|
|
906
|
-
howToSetTheDecision:
|
|
907
|
-
decisionDataType:
|
|
906
|
+
howToSetTheDecision: j.RANGE,
|
|
907
|
+
decisionDataType: H.DATE
|
|
908
908
|
})
|
|
909
909
|
} : r && !i ? {
|
|
910
910
|
element: {
|
|
911
911
|
labelName: o == null ? void 0 : o.terms,
|
|
912
912
|
value: String(t.effectiveFrom),
|
|
913
|
-
howToSetTheDecision:
|
|
914
|
-
decisionDataType:
|
|
913
|
+
howToSetTheDecision: j.EQUAL,
|
|
914
|
+
decisionDataType: H.DATE
|
|
915
915
|
},
|
|
916
916
|
valueData: ze({
|
|
917
917
|
labelName: o == null ? void 0 : o.terms,
|
|
918
918
|
value: String(t.effectiveFrom),
|
|
919
|
-
howToSetTheDecision:
|
|
920
|
-
decisionDataType:
|
|
919
|
+
howToSetTheDecision: j.EQUAL,
|
|
920
|
+
decisionDataType: H.DATE
|
|
921
921
|
})
|
|
922
922
|
} : null, d = t ? {
|
|
923
923
|
labelName: t.labelName || "",
|
|
@@ -978,7 +978,7 @@ const Yo = (e) => {
|
|
|
978
978
|
const { children: t, controls: n = !0, handleDelete: o, id: r } = e;
|
|
979
979
|
return /* @__PURE__ */ a(Wo, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
980
980
|
t,
|
|
981
|
-
n && /* @__PURE__ */ m(
|
|
981
|
+
n && /* @__PURE__ */ m(V, { children: [
|
|
982
982
|
/* @__PURE__ */ a(Y, {}),
|
|
983
983
|
/* @__PURE__ */ a(y, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
|
|
984
984
|
G,
|
|
@@ -1093,7 +1093,7 @@ const Yo = (e) => {
|
|
|
1093
1093
|
}),
|
|
1094
1094
|
value: { from: t, to: n }
|
|
1095
1095
|
};
|
|
1096
|
-
}, At = (e, t) => t ===
|
|
1096
|
+
}, At = (e, t) => t === H.PERCENTAGE ? {
|
|
1097
1097
|
schema: he().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
|
} : {
|
|
@@ -1135,7 +1135,7 @@ function ir({
|
|
|
1135
1135
|
var c, h;
|
|
1136
1136
|
const o = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], r = o.reduce((g, f) => (dt(f.value) && (g[f.conditionName] = f.value), g), {}), i = Object.keys(r).length > 0, s = {
|
|
1137
1137
|
ruleName: e.ruleName || "",
|
|
1138
|
-
decisionDataType: e.decisionDataType ||
|
|
1138
|
+
decisionDataType: e.decisionDataType || H.ALPHABETICAL,
|
|
1139
1139
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
1140
1140
|
value: e.value ?? "",
|
|
1141
1141
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -1246,7 +1246,7 @@ const ar = E.div`
|
|
|
1246
1246
|
name: s,
|
|
1247
1247
|
valueToggle: d = ""
|
|
1248
1248
|
} = e, [l, u] = B(t);
|
|
1249
|
-
return /* @__PURE__ */ m(
|
|
1249
|
+
return /* @__PURE__ */ m(V, { children: [
|
|
1250
1250
|
/* @__PURE__ */ a(y, { children: /* @__PURE__ */ a(
|
|
1251
1251
|
mt,
|
|
1252
1252
|
{
|
|
@@ -1261,7 +1261,7 @@ const ar = E.div`
|
|
|
1261
1261
|
children: /* @__PURE__ */ a(F, { size: "medium", type: "label", weight: "bold", as: "span", children: i })
|
|
1262
1262
|
}
|
|
1263
1263
|
) }),
|
|
1264
|
-
l && /* @__PURE__ */ a(
|
|
1264
|
+
l && /* @__PURE__ */ a(V, { children: n })
|
|
1265
1265
|
] });
|
|
1266
1266
|
}, dr = (e) => {
|
|
1267
1267
|
const {
|
|
@@ -1285,7 +1285,7 @@ const ar = E.div`
|
|
|
1285
1285
|
}, A = ($) => {
|
|
1286
1286
|
S($.target.value), n($);
|
|
1287
1287
|
}, R = ue("(max-width: 400px)");
|
|
1288
|
-
return /* @__PURE__ */ m(
|
|
1288
|
+
return /* @__PURE__ */ m(V, { children: [
|
|
1289
1289
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
1290
1290
|
/* @__PURE__ */ a(
|
|
1291
1291
|
F,
|
|
@@ -1424,7 +1424,7 @@ const ar = E.div`
|
|
|
1424
1424
|
]
|
|
1425
1425
|
}
|
|
1426
1426
|
) }) }),
|
|
1427
|
-
n.terms && /* @__PURE__ */ m(
|
|
1427
|
+
n.terms && /* @__PURE__ */ m(V, { children: [
|
|
1428
1428
|
/* @__PURE__ */ a(Y, { dashed: !0 }),
|
|
1429
1429
|
/* @__PURE__ */ a(
|
|
1430
1430
|
dr,
|
|
@@ -1559,7 +1559,7 @@ const ar = E.div`
|
|
|
1559
1559
|
handleDelete: g,
|
|
1560
1560
|
textValues: i
|
|
1561
1561
|
}), S = (r == null ? void 0 : r.length) === 0 && !u;
|
|
1562
|
-
return /* @__PURE__ */ m(
|
|
1562
|
+
return /* @__PURE__ */ m(V, { children: [
|
|
1563
1563
|
/* @__PURE__ */ a(Fo, { children: /* @__PURE__ */ a(Ro, { children: /* @__PURE__ */ a(y, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
|
|
1564
1564
|
y,
|
|
1565
1565
|
{
|
|
@@ -1570,7 +1570,7 @@ const ar = E.div`
|
|
|
1570
1570
|
justifyContent: "center",
|
|
1571
1571
|
alignItems: "center",
|
|
1572
1572
|
children: [
|
|
1573
|
-
/* @__PURE__ */ a(F, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ m(
|
|
1573
|
+
/* @__PURE__ */ a(F, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ m(V, { children: [
|
|
1574
1574
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1575
1575
|
/* @__PURE__ */ m(
|
|
1576
1576
|
F,
|
|
@@ -1702,7 +1702,7 @@ const ar = E.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
|
-
`, ce =
|
|
1705
|
+
`, ce = P.forwardRef(
|
|
1706
1706
|
(e, t) => {
|
|
1707
1707
|
const {
|
|
1708
1708
|
children: n,
|
|
@@ -1821,7 +1821,7 @@ const Sr = (e) => {
|
|
|
1821
1821
|
children: [
|
|
1822
1822
|
/* @__PURE__ */ m(y, { gap: "12px", children: [
|
|
1823
1823
|
/* @__PURE__ */ a(wr, { children: /* @__PURE__ */ a(
|
|
1824
|
-
|
|
1824
|
+
Pe,
|
|
1825
1825
|
{
|
|
1826
1826
|
id: "tag",
|
|
1827
1827
|
appearance: "gray",
|
|
@@ -1841,7 +1841,7 @@ const Sr = (e) => {
|
|
|
1841
1841
|
) })
|
|
1842
1842
|
] }),
|
|
1843
1843
|
/* @__PURE__ */ m(y, { gap: "12px", children: [
|
|
1844
|
-
t && /* @__PURE__ */ m(
|
|
1844
|
+
t && /* @__PURE__ */ m(V, { children: [
|
|
1845
1845
|
/* @__PURE__ */ a(
|
|
1846
1846
|
G,
|
|
1847
1847
|
{
|
|
@@ -1881,7 +1881,7 @@ const Sr = (e) => {
|
|
|
1881
1881
|
},
|
|
1882
1882
|
o.ruleName
|
|
1883
1883
|
) }),
|
|
1884
|
-
l && /* @__PURE__ */ m(
|
|
1884
|
+
l && /* @__PURE__ */ m(V, { children: [
|
|
1885
1885
|
/* @__PURE__ */ a(Y, { dashed: !0 }),
|
|
1886
1886
|
N ? /* @__PURE__ */ a(
|
|
1887
1887
|
xn,
|
|
@@ -2013,7 +2013,7 @@ const Sr = (e) => {
|
|
|
2013
2013
|
Year: { label: "en años", labelView: "años" },
|
|
2014
2014
|
Month: { label: "en meses", labelView: "meses" },
|
|
2015
2015
|
Day: { label: "en días", labelView: "días" }
|
|
2016
|
-
},
|
|
2016
|
+
}, _t = (e, t, n = !1) => {
|
|
2017
2017
|
const o = Er[t ?? ""];
|
|
2018
2018
|
return o ? n ? `${e} ${o.labelView}` : `${e} ${o.label}` : e;
|
|
2019
2019
|
}, Nr = (e, t) => {
|
|
@@ -2058,7 +2058,7 @@ const Sr = (e) => {
|
|
|
2058
2058
|
if (isNaN(o.getTime())) return "";
|
|
2059
2059
|
const r = o.getUTCDate(), i = o.getUTCMonth(), s = o.getUTCFullYear(), d = String(r).padStart(2, "0"), l = t[i] ?? "";
|
|
2060
2060
|
return l ? `${d}/${l}/${s}` : "";
|
|
2061
|
-
},
|
|
2061
|
+
}, Pt = (e) => {
|
|
2062
2062
|
if (e == null) return !1;
|
|
2063
2063
|
if (typeof e == "number") return !Number.isNaN(e);
|
|
2064
2064
|
if (typeof e == "string") return e.trim().length > 0;
|
|
@@ -2066,10 +2066,10 @@ const Sr = (e) => {
|
|
|
2066
2066
|
if (typeof e == "object") {
|
|
2067
2067
|
if (Object.keys(e).length === 0) return !1;
|
|
2068
2068
|
const n = e.from ?? e.min ?? e.start, o = e.to ?? e.max ?? e.end;
|
|
2069
|
-
return n !== void 0 || o !== void 0 ?
|
|
2069
|
+
return n !== void 0 || o !== void 0 ? Pt(n) || Pt(o) : !0;
|
|
2070
2070
|
}
|
|
2071
2071
|
return !1;
|
|
2072
|
-
}, kr = (e) =>
|
|
2072
|
+
}, kr = (e) => Pt(e == null ? void 0 : e.value), pt = (e, t) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(t).padStart(2, "0")}`, Ar = (e) => {
|
|
2073
2073
|
var i, s;
|
|
2074
2074
|
const t = ((i = e.listOfPossibleValues) == null ? void 0 : i.list) ?? [], n = e.value, o = Array.isArray(n) ? n : [n];
|
|
2075
2075
|
return { list: ((s = t.filter((d) => o.includes(d.value)).map((d, l) => ({
|
|
@@ -2094,38 +2094,38 @@ const Sr = (e) => {
|
|
|
2094
2094
|
element: {
|
|
2095
2095
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
2096
2096
|
value: at(n.effectiveFrom),
|
|
2097
|
-
howToSetTheDecision:
|
|
2098
|
-
decisionDataType:
|
|
2097
|
+
howToSetTheDecision: j.EQUAL,
|
|
2098
|
+
decisionDataType: H.DATE
|
|
2099
2099
|
},
|
|
2100
2100
|
valueData: He({
|
|
2101
2101
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
2102
2102
|
value: at(n.effectiveFrom),
|
|
2103
|
-
howToSetTheDecision:
|
|
2104
|
-
decisionDataType:
|
|
2103
|
+
howToSetTheDecision: j.EQUAL,
|
|
2104
|
+
decisionDataType: H.DATE
|
|
2105
2105
|
})
|
|
2106
2106
|
} : null, f = h ? {
|
|
2107
2107
|
element: {
|
|
2108
2108
|
labelName: r == null ? void 0 : r.validUntil,
|
|
2109
2109
|
value: at(n.validUntil),
|
|
2110
|
-
howToSetTheDecision:
|
|
2111
|
-
decisionDataType:
|
|
2110
|
+
howToSetTheDecision: j.EQUAL,
|
|
2111
|
+
decisionDataType: H.DATE
|
|
2112
2112
|
},
|
|
2113
2113
|
valueData: He({
|
|
2114
2114
|
labelName: r == null ? void 0 : r.validUntil,
|
|
2115
2115
|
value: at(n.validUntil),
|
|
2116
|
-
howToSetTheDecision:
|
|
2117
|
-
decisionDataType:
|
|
2116
|
+
howToSetTheDecision: j.EQUAL,
|
|
2117
|
+
decisionDataType: H.DATE
|
|
2118
2118
|
})
|
|
2119
|
-
} : null, v = (n == null ? void 0 : n.howToSetTheDecision) ||
|
|
2119
|
+
} : null, v = (n == null ? void 0 : n.howToSetTheDecision) || j.EQUAL, T = n && (v === j.LIST_OF_VALUES || v === j.LIST_OF_VALUES_MULTI) ? Ar(n).list : He(n), w = n ? {
|
|
2120
2120
|
labelName: t && n.labelName || "",
|
|
2121
|
-
decisionDataType: n.decisionDataType ||
|
|
2121
|
+
decisionDataType: n.decisionDataType || H.ALPHABETICAL,
|
|
2122
2122
|
value: T,
|
|
2123
2123
|
howToSetTheDecision: v,
|
|
2124
2124
|
validUntil: n.validUntil
|
|
2125
|
-
} : null, D =
|
|
2125
|
+
} : null, D = P.useMemo(
|
|
2126
2126
|
() => n ? ye(n) : {},
|
|
2127
2127
|
[n]
|
|
2128
|
-
), S = ((Et = (St = n == null ? void 0 : n.conditionGroups) == null ? void 0 : St.map((O) => O == null ? void 0 : O.ConditionGroupId)) == null ? void 0 : Et.filter(Boolean)) || Object.keys(D), N = S[0] || "group-primary", C =
|
|
2128
|
+
), S = ((Et = (St = n == null ? void 0 : n.conditionGroups) == null ? void 0 : St.map((O) => O == null ? void 0 : O.ConditionGroupId)) == null ? void 0 : Et.filter(Boolean)) || Object.keys(D), N = S[0] || "group-primary", C = P.useMemo(() => {
|
|
2129
2129
|
const O = {}, q = D[N] || [], ee = D["group-primary"] || [];
|
|
2130
2130
|
O["group-primary"] = N === "group-primary" ? ee : [...q, ...ee];
|
|
2131
2131
|
for (const x of S)
|
|
@@ -2133,35 +2133,35 @@ const Sr = (e) => {
|
|
|
2133
2133
|
for (const x of Object.keys(D))
|
|
2134
2134
|
x === "group-primary" || x === N || x in O || (O[x] = D[x]);
|
|
2135
2135
|
return O;
|
|
2136
|
-
}, [D, N, S]), A =
|
|
2136
|
+
}, [D, N, S]), A = P.useMemo(() => {
|
|
2137
2137
|
const O = {};
|
|
2138
2138
|
return Object.keys(C).forEach((q) => {
|
|
2139
2139
|
const ee = C[q];
|
|
2140
2140
|
ee && Array.isArray(ee) ? O[q] = ee.map((x) => {
|
|
2141
2141
|
let L = x.labelName;
|
|
2142
|
-
x.timeUnit && x.labelName && (L =
|
|
2143
|
-
let
|
|
2144
|
-
return (x == null ? void 0 : x.howToSetTheCondition) !== void 0 && (x == null ? void 0 : x.howToSetTheCondition) !== null && (x == null ? void 0 : x.value) !== void 0 && (x == null ? void 0 : x.value) !== null && (x == null ? void 0 : x.value) !== "" && (
|
|
2142
|
+
x.timeUnit && x.labelName && (L = _t(x.labelName, x.timeUnit));
|
|
2143
|
+
let _ = x.value;
|
|
2144
|
+
return (x == null ? void 0 : x.howToSetTheCondition) !== void 0 && (x == null ? void 0 : x.howToSetTheCondition) !== null && (x == null ? void 0 : x.value) !== void 0 && (x == null ? void 0 : x.value) !== null && (x == null ? void 0 : x.value) !== "" && (_ = Nr(
|
|
2145
2145
|
x.value,
|
|
2146
2146
|
x.howToSetTheCondition
|
|
2147
2147
|
)), {
|
|
2148
2148
|
...x,
|
|
2149
2149
|
labelName: L,
|
|
2150
|
-
value:
|
|
2150
|
+
value: _
|
|
2151
2151
|
};
|
|
2152
2152
|
}) : O[q] = ee;
|
|
2153
2153
|
}), O;
|
|
2154
2154
|
}, [C]), R = En(
|
|
2155
2155
|
A,
|
|
2156
2156
|
(O) => !O.hidden
|
|
2157
|
-
), $ =
|
|
2157
|
+
), $ = P.useMemo(() => {
|
|
2158
2158
|
const O = Object.entries(R).map(
|
|
2159
2159
|
([ee, x]) => [ee, x.filter(kr)]
|
|
2160
2160
|
), q = {};
|
|
2161
2161
|
for (const [ee, x] of O)
|
|
2162
2162
|
x.length > 0 && (q[ee] = x);
|
|
2163
2163
|
return q;
|
|
2164
|
-
}, [R]), ae =
|
|
2164
|
+
}, [R]), ae = P.useMemo(() => {
|
|
2165
2165
|
const O = Object.keys($);
|
|
2166
2166
|
return O.includes("group-primary") ? ["group-primary", ...O.filter((q) => q !== "group-primary")] : O;
|
|
2167
2167
|
}, [$]), le = {};
|
|
@@ -2173,7 +2173,7 @@ const Sr = (e) => {
|
|
|
2173
2173
|
label: O === "group-primary" ? pt(O, 0) : pt(O, Number(q.split("-").at(-1))),
|
|
2174
2174
|
isDisabled: !1
|
|
2175
2175
|
};
|
|
2176
|
-
}), [Ze, xt] =
|
|
2176
|
+
}), [Ze, xt] = P.useState(
|
|
2177
2177
|
((Nt = Je[0]) == null ? void 0 : Nt.id) ?? "mainCondition"
|
|
2178
2178
|
), Ke = (O) => xt(O), Dt = le[Ze] ?? ae[0] ?? "group-primary", et = $[Dt] ?? [], tt = ae.length > 1, wt = Array.from({ length: 5 }), nt = !!(!o && n && r && w), Ct = et.length < 2 ? "start" : "space-between", Le = `N° ${String((i ?? 0) + 1).padStart(2, "0")}`;
|
|
2179
2179
|
return /* @__PURE__ */ a(
|
|
@@ -2324,7 +2324,7 @@ const $r = E.div`
|
|
|
2324
2324
|
)
|
|
2325
2325
|
}
|
|
2326
2326
|
) }) }, n.decisionId) : null;
|
|
2327
|
-
},
|
|
2327
|
+
}, _r = (e) => {
|
|
2328
2328
|
const {
|
|
2329
2329
|
customTitleContentAddCard: t,
|
|
2330
2330
|
index: n,
|
|
@@ -2368,14 +2368,14 @@ const $r = E.div`
|
|
|
2368
2368
|
)
|
|
2369
2369
|
}
|
|
2370
2370
|
) }, `add-decision-${n}`);
|
|
2371
|
-
},
|
|
2371
|
+
}, Pr = {
|
|
2372
2372
|
loading: Or,
|
|
2373
2373
|
decision: Mr,
|
|
2374
|
-
add:
|
|
2375
|
-
},
|
|
2376
|
-
const { type: t } = e, n =
|
|
2374
|
+
add: _r
|
|
2375
|
+
}, Vt = (e) => {
|
|
2376
|
+
const { type: t } = e, n = Pr[t];
|
|
2377
2377
|
return n ? n(e) : null;
|
|
2378
|
-
},
|
|
2378
|
+
}, Vr = (e) => {
|
|
2379
2379
|
const {
|
|
2380
2380
|
cardTitle: t,
|
|
2381
2381
|
controls: n,
|
|
@@ -2388,7 +2388,7 @@ const $r = E.div`
|
|
|
2388
2388
|
isOpenFor: u,
|
|
2389
2389
|
toggleAt: p
|
|
2390
2390
|
} = e, c = i ? Array.from({ length: 3 }).map(
|
|
2391
|
-
(g, f) =>
|
|
2391
|
+
(g, f) => Vt({
|
|
2392
2392
|
type: "loading",
|
|
2393
2393
|
index: f,
|
|
2394
2394
|
controls: n,
|
|
@@ -2399,7 +2399,7 @@ const $r = E.div`
|
|
|
2399
2399
|
textValues: l
|
|
2400
2400
|
})
|
|
2401
2401
|
) : r == null ? void 0 : r.map(
|
|
2402
|
-
(g, f) =>
|
|
2402
|
+
(g, f) => Vt({
|
|
2403
2403
|
cardTitle: t,
|
|
2404
2404
|
type: "decision",
|
|
2405
2405
|
decision: g,
|
|
@@ -2529,7 +2529,7 @@ const $r = E.div`
|
|
|
2529
2529
|
}, It = (e, t) => {
|
|
2530
2530
|
if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
|
|
2531
2531
|
const n = e;
|
|
2532
|
-
return t ===
|
|
2532
|
+
return t === H.PERCENTAGE ? {
|
|
2533
2533
|
schema: te({
|
|
2534
2534
|
from: he().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"),
|
|
2535
2535
|
to: he().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")
|
|
@@ -2543,7 +2543,7 @@ const $r = E.div`
|
|
|
2543
2543
|
value: n
|
|
2544
2544
|
};
|
|
2545
2545
|
}
|
|
2546
|
-
return t ===
|
|
2546
|
+
return t === H.PERCENTAGE ? {
|
|
2547
2547
|
schema: he().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"),
|
|
2548
2548
|
value: e
|
|
2549
2549
|
} : {
|
|
@@ -2595,7 +2595,7 @@ function Yr({
|
|
|
2595
2595
|
}
|
|
2596
2596
|
), d = {
|
|
2597
2597
|
ruleName: e.ruleName || "",
|
|
2598
|
-
decisionDataType: e.decisionDataType ||
|
|
2598
|
+
decisionDataType: e.decisionDataType || H.ALPHABETICAL,
|
|
2599
2599
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
2600
2600
|
value: e.value || "",
|
|
2601
2601
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -2841,9 +2841,9 @@ const Xr = E.div`
|
|
|
2841
2841
|
onCloseRedefineConfirm: w,
|
|
2842
2842
|
onConfirmRedefine: D
|
|
2843
2843
|
} = e;
|
|
2844
|
-
return /* @__PURE__ */ m(
|
|
2844
|
+
return /* @__PURE__ */ m(V, { children: [
|
|
2845
2845
|
/* @__PURE__ */ a("form", { onSubmit: r.handleSubmit, children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2846
|
-
/* @__PURE__ */ a(
|
|
2846
|
+
/* @__PURE__ */ a(Ve, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ m(
|
|
2847
2847
|
y,
|
|
2848
2848
|
{
|
|
2849
2849
|
justifyContent: "center",
|
|
@@ -2859,7 +2859,7 @@ const Xr = E.div`
|
|
|
2859
2859
|
]
|
|
2860
2860
|
}
|
|
2861
2861
|
) }),
|
|
2862
|
-
o && o.length > 0 && /* @__PURE__ */ a(
|
|
2862
|
+
o && o.length > 0 && /* @__PURE__ */ a(Ve, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(y, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2863
2863
|
/* @__PURE__ */ a(
|
|
2864
2864
|
xn,
|
|
2865
2865
|
{
|
|
@@ -2917,7 +2917,7 @@ const Xr = E.div`
|
|
|
2917
2917
|
}) }),
|
|
2918
2918
|
u && /* @__PURE__ */ a(F, { type: "label", size: "medium", appearance: "danger", children: n ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2919
2919
|
] }) }),
|
|
2920
|
-
/* @__PURE__ */ a(
|
|
2920
|
+
/* @__PURE__ */ a(Ve, { legend: "Vigencia", spacing: "wide", children: g.terms && /* @__PURE__ */ a(
|
|
2921
2921
|
Qr,
|
|
2922
2922
|
{
|
|
2923
2923
|
labelStart: g.termStart,
|
|
@@ -3035,14 +3035,14 @@ const Oe = (e) => {
|
|
|
3035
3035
|
return e ?? de.EQUAL;
|
|
3036
3036
|
}, Me = (e) => {
|
|
3037
3037
|
switch (e) {
|
|
3038
|
-
case
|
|
3038
|
+
case j.LIST_OF_VALUES_MULTI:
|
|
3039
3039
|
return [];
|
|
3040
|
-
case
|
|
3040
|
+
case j.RANGE:
|
|
3041
3041
|
return "";
|
|
3042
|
-
case
|
|
3043
|
-
case
|
|
3044
|
-
case
|
|
3045
|
-
case
|
|
3042
|
+
case j.EQUAL:
|
|
3043
|
+
case j.GREATER_THAN:
|
|
3044
|
+
case j.LESS_THAN:
|
|
3045
|
+
case j.LIST_OF_VALUES:
|
|
3046
3046
|
default:
|
|
3047
3047
|
return "";
|
|
3048
3048
|
}
|
|
@@ -3087,23 +3087,23 @@ const Oe = (e) => {
|
|
|
3087
3087
|
label: x === "group-primary" ? pt(x, 0) : pt(x, Number(L.split("-").at(-1))),
|
|
3088
3088
|
isDisabled: !1
|
|
3089
3089
|
};
|
|
3090
|
-
}), [S, N] =
|
|
3090
|
+
}), [S, N] = P.useState(
|
|
3091
3091
|
((q = D[0]) == null ? void 0 : q.id) ?? "mainCondition"
|
|
3092
3092
|
), C = (x) => N(x), A = T[S] ?? "group-primary";
|
|
3093
|
-
|
|
3093
|
+
P.useEffect(() => {
|
|
3094
3094
|
var W;
|
|
3095
3095
|
const x = (W = l.values) == null ? void 0 : W.conditionsThatEstablishesTheDecision;
|
|
3096
3096
|
let L = !1;
|
|
3097
3097
|
if (x && typeof x == "object" && (L = Object.values(x).some(
|
|
3098
3098
|
(X) => X && typeof X == "object" && Object.keys(X).length > 0
|
|
3099
3099
|
)), L) return;
|
|
3100
|
-
const
|
|
3101
|
-
if (!
|
|
3100
|
+
const _ = ye(t);
|
|
3101
|
+
if (!_ || Object.keys(_).length === 0)
|
|
3102
3102
|
return;
|
|
3103
3103
|
const M = Object.fromEntries(
|
|
3104
|
-
Object.entries(
|
|
3104
|
+
Object.entries(_).map(([X, U]) => {
|
|
3105
3105
|
const me = Object.fromEntries(
|
|
3106
|
-
|
|
3106
|
+
U.map((se) => {
|
|
3107
3107
|
const ge = Oe(se.howToSetTheCondition), ve = se.value ?? Me(ge);
|
|
3108
3108
|
return [se.conditionName, ve];
|
|
3109
3109
|
})
|
|
@@ -3116,21 +3116,21 @@ const Oe = (e) => {
|
|
|
3116
3116
|
M,
|
|
3117
3117
|
!1
|
|
3118
3118
|
);
|
|
3119
|
-
}, [t]),
|
|
3120
|
-
var
|
|
3121
|
-
const x = (
|
|
3119
|
+
}, [t]), P.useEffect(() => {
|
|
3120
|
+
var U;
|
|
3121
|
+
const x = (U = l.values) == null ? void 0 : U.conditionsThatEstablishesTheDecision;
|
|
3122
3122
|
if (!x || typeof x != "object") return;
|
|
3123
|
-
const L = ye(p),
|
|
3123
|
+
const L = ye(p), _ = Object.entries(x).map(
|
|
3124
3124
|
([me, se]) => {
|
|
3125
3125
|
const ge = L[me] || [], ve = Object.keys(se).map((be) => {
|
|
3126
|
-
const
|
|
3127
|
-
ne.howToSetTheCondition ?? (
|
|
3128
|
-
), ot = ne.value ?? Me(kt), rt =
|
|
3126
|
+
const z = se[be], ne = ge.find((Un) => Un.conditionName === be) || {}, kt = Oe(
|
|
3127
|
+
ne.howToSetTheCondition ?? (z == null ? void 0 : z.howToSetTheCondition)
|
|
3128
|
+
), ot = ne.value ?? Me(kt), rt = z && typeof z == "object" && "value" in z ? z.value : z;
|
|
3129
3129
|
return {
|
|
3130
3130
|
// meta (labelName, descriptionUse, timeUnit, etc.)
|
|
3131
3131
|
...ne,
|
|
3132
3132
|
// any extra fields that might live in the wrapper
|
|
3133
|
-
...typeof
|
|
3133
|
+
...typeof z == "object" && !Array.isArray(z) ? z : {},
|
|
3134
3134
|
conditionName: be,
|
|
3135
3135
|
value: rt !== void 0 ? rt : ot
|
|
3136
3136
|
};
|
|
@@ -3140,10 +3140,10 @@ const Oe = (e) => {
|
|
|
3140
3140
|
conditionsThatEstablishesTheDecision: ve
|
|
3141
3141
|
};
|
|
3142
3142
|
}
|
|
3143
|
-
), M = l.values.conditionGroups, W = JSON.stringify(
|
|
3144
|
-
W !== X && l.setFieldValue("conditionGroups",
|
|
3143
|
+
), M = l.values.conditionGroups, W = JSON.stringify(_), X = JSON.stringify(M ?? []);
|
|
3144
|
+
W !== X && l.setFieldValue("conditionGroups", _, !1);
|
|
3145
3145
|
}, [(ee = l.values) == null ? void 0 : ee.conditionsThatEstablishesTheDecision, p]);
|
|
3146
|
-
const R =
|
|
3146
|
+
const R = P.useMemo(() => {
|
|
3147
3147
|
const x = [
|
|
3148
3148
|
...Object.keys(g).filter(
|
|
3149
3149
|
(M) => M === "group-primary"
|
|
@@ -3153,30 +3153,30 @@ const Oe = (e) => {
|
|
|
3153
3153
|
)
|
|
3154
3154
|
];
|
|
3155
3155
|
let L = !1;
|
|
3156
|
-
const
|
|
3157
|
-
const X = (g[M] ?? []).map((
|
|
3156
|
+
const _ = x.map((M) => {
|
|
3157
|
+
const X = (g[M] ?? []).map((U, me) => {
|
|
3158
3158
|
const se = !L && M === "group-primary" && me === 0;
|
|
3159
3159
|
se && (L = !0);
|
|
3160
|
-
const ge = Oe(
|
|
3161
|
-
label:
|
|
3160
|
+
const ge = Oe(U.howToSetTheCondition), ve = Zr({
|
|
3161
|
+
label: U.labelName || "",
|
|
3162
3162
|
howToSet: ge,
|
|
3163
3163
|
isFirst: se
|
|
3164
|
-
}), be =
|
|
3164
|
+
}), be = U.timeUnit ? _t("", U.timeUnit, !0).trim() : "", z = `${M}.${U.conditionName}`, ne = li(
|
|
3165
3165
|
l.values,
|
|
3166
3166
|
M,
|
|
3167
|
-
|
|
3167
|
+
U.conditionName
|
|
3168
3168
|
), kt = si(
|
|
3169
3169
|
l.values,
|
|
3170
3170
|
M,
|
|
3171
|
-
|
|
3171
|
+
U.conditionName
|
|
3172
3172
|
), ot = ne !== void 0 ? ne : kt, rt = ot !== void 0 ? ot : Me(ge);
|
|
3173
3173
|
return {
|
|
3174
|
-
...
|
|
3175
|
-
__originalConditionName:
|
|
3174
|
+
...U,
|
|
3175
|
+
__originalConditionName: U.conditionName,
|
|
3176
3176
|
__groupKey: M,
|
|
3177
3177
|
__howToSet: ge,
|
|
3178
|
-
__scopedName:
|
|
3179
|
-
conditionName:
|
|
3178
|
+
__scopedName: z,
|
|
3179
|
+
conditionName: U.conditionName,
|
|
3180
3180
|
groupKey: M,
|
|
3181
3181
|
labelName: ve,
|
|
3182
3182
|
__unitAfterInput: be,
|
|
@@ -3185,28 +3185,28 @@ const Oe = (e) => {
|
|
|
3185
3185
|
});
|
|
3186
3186
|
return [M, X];
|
|
3187
3187
|
});
|
|
3188
|
-
return Object.fromEntries(
|
|
3188
|
+
return Object.fromEntries(_);
|
|
3189
3189
|
}, [g, l.values]), $ = R[A] ?? [], ae = R["group-primary"] ?? [], le = {
|
|
3190
3190
|
decisionDataType: t.decisionDataType,
|
|
3191
3191
|
howToSetTheCondition: t.howToSetTheDecision,
|
|
3192
3192
|
labelName: t.labelName,
|
|
3193
3193
|
listOfPossibleValues: t.listOfPossibleValues,
|
|
3194
3194
|
ruleName: t.ruleName,
|
|
3195
|
-
timeUnit: t.timeUnit ?
|
|
3196
|
-
}, Re = l.submitCount > 0 || !!l.touched.effectiveFrom, Je = l.submitCount > 0 || !!l.touched.validUntil, Ze = Re ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, xt = Je ? l.errors.validUntil ? "invalid" : "valid" : void 0, Ke =
|
|
3195
|
+
timeUnit: t.timeUnit ? _t("", t.timeUnit, !0).trim() : ""
|
|
3196
|
+
}, Re = l.submitCount > 0 || !!l.touched.effectiveFrom, Je = l.submitCount > 0 || !!l.touched.validUntil, Ze = Re ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, xt = Je ? l.errors.validUntil ? "invalid" : "valid" : void 0, Ke = P.useMemo(() => {
|
|
3197
3197
|
const x = l.errors.conditionsThatEstablishesTheDecision;
|
|
3198
3198
|
if (!x) return;
|
|
3199
3199
|
if (typeof x == "string") return x;
|
|
3200
|
-
const L = (
|
|
3201
|
-
if (
|
|
3202
|
-
if (typeof
|
|
3203
|
-
if (Array.isArray(
|
|
3204
|
-
for (const M of
|
|
3200
|
+
const L = (_) => {
|
|
3201
|
+
if (_) {
|
|
3202
|
+
if (typeof _ == "string") return _;
|
|
3203
|
+
if (Array.isArray(_))
|
|
3204
|
+
for (const M of _) {
|
|
3205
3205
|
const W = L(M);
|
|
3206
3206
|
if (W) return W;
|
|
3207
3207
|
}
|
|
3208
|
-
else if (typeof
|
|
3209
|
-
for (const M of Object.values(
|
|
3208
|
+
else if (typeof _ == "object")
|
|
3209
|
+
for (const M of Object.values(_)) {
|
|
3210
3210
|
const W = L(M);
|
|
3211
3211
|
if (W) return W;
|
|
3212
3212
|
}
|
|
@@ -3216,25 +3216,25 @@ const Oe = (e) => {
|
|
|
3216
3216
|
}, [l.errors.conditionsThatEstablishesTheDecision]), Dt = l.submitCount > 0 && !!Ke, et = (x) => {
|
|
3217
3217
|
const L = (x == null ? void 0 : x.__howToSet) ?? Oe(x == null ? void 0 : x.howToSetTheCondition);
|
|
3218
3218
|
return Me(L);
|
|
3219
|
-
}, tt = (x, L,
|
|
3220
|
-
var
|
|
3221
|
-
const M = `conditionsThatEstablishesTheDecision.${x}.${L}`, W = (se = (me = (
|
|
3222
|
-
W && typeof W == "object" && !Array.isArray(W) ? l.setFieldValue(`${M}.value`,
|
|
3219
|
+
}, tt = (x, L, _) => {
|
|
3220
|
+
var U, me, se, ge, ve;
|
|
3221
|
+
const M = `conditionsThatEstablishesTheDecision.${x}.${L}`, W = (se = (me = (U = l.values) == null ? void 0 : U.conditionsThatEstablishesTheDecision) == null ? void 0 : me[x]) == null ? void 0 : se[L];
|
|
3222
|
+
W && typeof W == "object" && !Array.isArray(W) ? l.setFieldValue(`${M}.value`, _, !1) : l.setFieldValue(M, _, !1);
|
|
3223
3223
|
const X = (ge = l.values) == null ? void 0 : ge.conditionGroups;
|
|
3224
3224
|
if (Array.isArray(X)) {
|
|
3225
|
-
const be = X.findIndex((
|
|
3225
|
+
const be = X.findIndex((z) => (z == null ? void 0 : z.ConditionGroupId) === x);
|
|
3226
3226
|
if (be >= 0) {
|
|
3227
|
-
const
|
|
3227
|
+
const z = (ve = X[be].conditionsThatEstablishesTheDecision) == null ? void 0 : ve.findIndex(
|
|
3228
3228
|
(ne) => (ne == null ? void 0 : ne.conditionName) === L
|
|
3229
3229
|
);
|
|
3230
|
-
if (
|
|
3230
|
+
if (z >= 0) {
|
|
3231
3231
|
const ne = JSON.parse(JSON.stringify(X));
|
|
3232
|
-
ne[be].conditionsThatEstablishesTheDecision[
|
|
3232
|
+
ne[be].conditionsThatEstablishesTheDecision[z].value = _, l.setFieldValue("conditionGroups", ne, !1);
|
|
3233
3233
|
}
|
|
3234
3234
|
}
|
|
3235
3235
|
}
|
|
3236
3236
|
}, wt = (x) => {
|
|
3237
|
-
const [L, ...
|
|
3237
|
+
const [L, ..._] = x.split("."), M = _.join("."), W = Object.values(c).flat().find((U) => U.conditionName === M), X = et(W || {});
|
|
3238
3238
|
tt(L, M, X), l.setFieldTouched(
|
|
3239
3239
|
`conditionsThatEstablishesTheDecision.${L}.${M}`,
|
|
3240
3240
|
!1,
|
|
@@ -3242,10 +3242,10 @@ const Oe = (e) => {
|
|
|
3242
3242
|
);
|
|
3243
3243
|
}, nt = () => {
|
|
3244
3244
|
(c[A] ?? []).forEach((L) => {
|
|
3245
|
-
const
|
|
3245
|
+
const _ = Oe(L == null ? void 0 : L.howToSetTheCondition), M = Me(_);
|
|
3246
3246
|
tt(A, L.conditionName, M);
|
|
3247
3247
|
});
|
|
3248
|
-
}, [Ct, Le] =
|
|
3248
|
+
}, [Ct, Le] = P.useState(!1);
|
|
3249
3249
|
return /* @__PURE__ */ a(
|
|
3250
3250
|
Jr,
|
|
3251
3251
|
{
|
|
@@ -3303,7 +3303,7 @@ const Oe = (e) => {
|
|
|
3303
3303
|
onRestoreConditions: w,
|
|
3304
3304
|
baseDecisionTemplate: D,
|
|
3305
3305
|
shouldRenderEmptyMessage: S = !0
|
|
3306
|
-
} = e, [N, C] = B(null), A = ue("(max-width: 681px)"), { renderedCards: R, shouldRenderAddCard: $ } =
|
|
3306
|
+
} = e, [N, C] = B(null), A = ue("(max-width: 681px)"), { renderedCards: R, shouldRenderAddCard: $ } = Vr({
|
|
3307
3307
|
cardTitle: t,
|
|
3308
3308
|
controls: n,
|
|
3309
3309
|
customTitleContentAddCard: o,
|
|
@@ -3315,8 +3315,8 @@ const Oe = (e) => {
|
|
|
3315
3315
|
isOpenFor: (le) => N === le,
|
|
3316
3316
|
toggleAt: (le) => C((Re) => Re === le ? null : le)
|
|
3317
3317
|
}), ae = (i == null ? void 0 : i.length) === 0 && !p;
|
|
3318
|
-
return /* @__PURE__ */ m(
|
|
3319
|
-
/* @__PURE__ */ a(Rr, { children: /* @__PURE__ */ a(Lr, { children: /* @__PURE__ */ a(y, { direction: "column", gap: "16px", padding: "6px", children: S && (ae ? /* @__PURE__ */ a(
|
|
3318
|
+
return /* @__PURE__ */ m(V, { children: [
|
|
3319
|
+
/* @__PURE__ */ a(Rr, { children: /* @__PURE__ */ a(Lr, { children: /* @__PURE__ */ a(y, { direction: "column", gap: "16px", padding: "6px", children: S && (ae ? /* @__PURE__ */ a(Ve, { legend: "Decisiones", children: /* @__PURE__ */ m(
|
|
3320
3320
|
y,
|
|
3321
3321
|
{
|
|
3322
3322
|
direction: "column",
|
|
@@ -3343,7 +3343,7 @@ const Oe = (e) => {
|
|
|
3343
3343
|
children: "Sin decisiones"
|
|
3344
3344
|
}
|
|
3345
3345
|
),
|
|
3346
|
-
/* @__PURE__ */ a(F, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ m(
|
|
3346
|
+
/* @__PURE__ */ a(F, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ m(V, { children: [
|
|
3347
3347
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
3348
3348
|
o || ' "Agregar decisión"'
|
|
3349
3349
|
] }) })
|
|
@@ -3363,7 +3363,7 @@ const Oe = (e) => {
|
|
|
3363
3363
|
height: A ? "auto" : "484px",
|
|
3364
3364
|
children: [
|
|
3365
3365
|
R,
|
|
3366
|
-
$ &&
|
|
3366
|
+
$ && Vt({
|
|
3367
3367
|
type: "add",
|
|
3368
3368
|
index: i == null ? void 0 : i.length,
|
|
3369
3369
|
controls: n,
|
|
@@ -3625,7 +3625,7 @@ const gi = E.div`
|
|
|
3625
3625
|
};
|
|
3626
3626
|
return /* @__PURE__ */ m(pi, { borderRadius: "8px", width: "100%", children: [
|
|
3627
3627
|
/* @__PURE__ */ a(fi, { ref: g, children: t.map((C) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
|
|
3628
|
-
|
|
3628
|
+
Pe,
|
|
3629
3629
|
{
|
|
3630
3630
|
appearance: "primary",
|
|
3631
3631
|
displayIcon: !0,
|
|
@@ -3648,9 +3648,9 @@ const gi = E.div`
|
|
|
3648
3648
|
alignItems: "center",
|
|
3649
3649
|
padding: "0px 8px",
|
|
3650
3650
|
border: !0,
|
|
3651
|
-
children: w ? /* @__PURE__ */ a(F, { size: "small", type: "label", appearance: "gray", children: r }) : /* @__PURE__ */ m(
|
|
3651
|
+
children: w ? /* @__PURE__ */ a(F, { size: "small", type: "label", appearance: "gray", children: r }) : /* @__PURE__ */ m(V, { children: [
|
|
3652
3652
|
p.map((C) => /* @__PURE__ */ a(
|
|
3653
|
-
|
|
3653
|
+
Pe,
|
|
3654
3654
|
{
|
|
3655
3655
|
"data-filter-tag": "true",
|
|
3656
3656
|
appearance: "primary",
|
|
@@ -3669,7 +3669,7 @@ const gi = E.div`
|
|
|
3669
3669
|
style: { position: "relative", display: "inline-block" },
|
|
3670
3670
|
children: [
|
|
3671
3671
|
/* @__PURE__ */ a(mi, { onClick: T, children: /* @__PURE__ */ a(
|
|
3672
|
-
|
|
3672
|
+
Pe,
|
|
3673
3673
|
{
|
|
3674
3674
|
appearance: "primary",
|
|
3675
3675
|
label: `+${c.length}`
|
|
@@ -3727,7 +3727,7 @@ const gi = E.div`
|
|
|
3727
3727
|
}, bl = (e) => {
|
|
3728
3728
|
const { appliedFilters: t, fields: n, onChange: o, noFiltersLabel: r } = e, i = ue("(max-width: 768px)"), s = !t || t.length === 0;
|
|
3729
3729
|
return /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
3730
|
-
i && /* @__PURE__ */ m(
|
|
3730
|
+
i && /* @__PURE__ */ m(V, { children: [
|
|
3731
3731
|
/* @__PURE__ */ m(y, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
3732
3732
|
/* @__PURE__ */ a(G, { appearance: "gray", icon: /* @__PURE__ */ a(Tn, {}) }),
|
|
3733
3733
|
/* @__PURE__ */ a(
|
|
@@ -3743,7 +3743,7 @@ const gi = E.div`
|
|
|
3743
3743
|
width: "100%",
|
|
3744
3744
|
height: "36px",
|
|
3745
3745
|
children: s ? /* @__PURE__ */ a(F, { size: "small", type: "label", appearance: "gray", children: r }) : t == null ? void 0 : t.map((d) => /* @__PURE__ */ a(
|
|
3746
|
-
|
|
3746
|
+
Pe,
|
|
3747
3747
|
{
|
|
3748
3748
|
appearance: "primary",
|
|
3749
3749
|
displayIcon: !0,
|
|
@@ -3889,7 +3889,7 @@ const gi = E.div`
|
|
|
3889
3889
|
}),
|
|
3890
3890
|
value: { from: t, to: n }
|
|
3891
3891
|
};
|
|
3892
|
-
}, $t = (e, t) => t ===
|
|
3892
|
+
}, $t = (e, t) => t === H.PERCENTAGE ? {
|
|
3893
3893
|
schema: he().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"),
|
|
3894
3894
|
value: e
|
|
3895
3895
|
} : {
|
|
@@ -3910,7 +3910,7 @@ function Si({
|
|
|
3910
3910
|
}) {
|
|
3911
3911
|
const o = {
|
|
3912
3912
|
ruleName: e.ruleName || "",
|
|
3913
|
-
decisionDataType: e.decisionDataType ||
|
|
3913
|
+
decisionDataType: e.decisionDataType || H.ALPHABETICAL,
|
|
3914
3914
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
3915
3915
|
value: e.value || "",
|
|
3916
3916
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -4083,7 +4083,7 @@ const Ei = E.div`
|
|
|
4083
4083
|
};
|
|
4084
4084
|
return Be(() => {
|
|
4085
4085
|
u(t);
|
|
4086
|
-
}, [t]), /* @__PURE__ */ m(
|
|
4086
|
+
}, [t]), /* @__PURE__ */ m(V, { children: [
|
|
4087
4087
|
/* @__PURE__ */ a(y, { children: /* @__PURE__ */ a(
|
|
4088
4088
|
mt,
|
|
4089
4089
|
{
|
|
@@ -4096,7 +4096,7 @@ const Ei = E.div`
|
|
|
4096
4096
|
children: /* @__PURE__ */ a(F, { size: "medium", type: "label", weight: "bold", children: i })
|
|
4097
4097
|
}
|
|
4098
4098
|
) }),
|
|
4099
|
-
l && /* @__PURE__ */ a(
|
|
4099
|
+
l && /* @__PURE__ */ a(V, { children: n })
|
|
4100
4100
|
] });
|
|
4101
4101
|
}, Ai = (e) => {
|
|
4102
4102
|
const {
|
|
@@ -4120,7 +4120,7 @@ const Ei = E.div`
|
|
|
4120
4120
|
}, A = ($) => {
|
|
4121
4121
|
S($.target.value), n($);
|
|
4122
4122
|
}, R = ue("(max-width: 400px)");
|
|
4123
|
-
return /* @__PURE__ */ m(
|
|
4123
|
+
return /* @__PURE__ */ m(V, { children: [
|
|
4124
4124
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
4125
4125
|
/* @__PURE__ */ a(
|
|
4126
4126
|
F,
|
|
@@ -4256,7 +4256,7 @@ const Ei = E.div`
|
|
|
4256
4256
|
]
|
|
4257
4257
|
}
|
|
4258
4258
|
) }) }),
|
|
4259
|
-
n.terms && /* @__PURE__ */ m(
|
|
4259
|
+
n.terms && /* @__PURE__ */ m(V, { children: [
|
|
4260
4260
|
/* @__PURE__ */ a(Y, { dashed: !0 }),
|
|
4261
4261
|
/* @__PURE__ */ a(
|
|
4262
4262
|
Ai,
|
|
@@ -4448,21 +4448,21 @@ const Ei = E.div`
|
|
|
4448
4448
|
return ((i = (r = (o = t == null ? void 0 : t.menu) == null ? void 0 : o.item) == null ? void 0 : r.background) == null ? void 0 : i.hover) || Te.item.background.hover;
|
|
4449
4449
|
}};
|
|
4450
4450
|
}
|
|
4451
|
-
`,
|
|
4451
|
+
`, _i = E.div`
|
|
4452
4452
|
display: flex;
|
|
4453
4453
|
flex-direction: column;
|
|
4454
4454
|
|
|
4455
4455
|
& > a:last-child ${kn} {
|
|
4456
4456
|
border-radius: 0 0 8px 8px;
|
|
4457
4457
|
}
|
|
4458
|
-
`,
|
|
4458
|
+
`, Pi = (e) => {
|
|
4459
4459
|
const { isOpen: t, links: n, onClick: o, title: r, activeId: i, headerPath: s, headerActive: d } = e, l = (f) => {
|
|
4460
4460
|
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), o());
|
|
4461
4461
|
}, u = (f) => {
|
|
4462
4462
|
f.preventDefault(), f.stopPropagation(), o();
|
|
4463
4463
|
}, p = (f) => {
|
|
4464
4464
|
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), f.stopPropagation(), o());
|
|
4465
|
-
}, c = t || d ? "primary" : "dark", h = t || d ? "bold" : "normal", g =
|
|
4465
|
+
}, c = t || d ? "primary" : "dark", h = t || d ? "bold" : "normal", g = P.useId();
|
|
4466
4466
|
return /* @__PURE__ */ a(Fi, { $active: t, children: /* @__PURE__ */ m(ce, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
4467
4467
|
/* @__PURE__ */ a(
|
|
4468
4468
|
Mi,
|
|
@@ -4545,7 +4545,7 @@ const Ei = E.div`
|
|
|
4545
4545
|
)
|
|
4546
4546
|
}
|
|
4547
4547
|
),
|
|
4548
|
-
t && n.length > 0 && /* @__PURE__ */ a(
|
|
4548
|
+
t && n.length > 0 && /* @__PURE__ */ a(_i, { id: g, children: n.map((f) => {
|
|
4549
4549
|
const v = f.id === i;
|
|
4550
4550
|
return /* @__PURE__ */ a(Oi, { to: f.path, children: /* @__PURE__ */ a(kn, { $active: v, children: /* @__PURE__ */ m(
|
|
4551
4551
|
y,
|
|
@@ -4571,7 +4571,7 @@ const Ei = E.div`
|
|
|
4571
4571
|
) }) }, f.id);
|
|
4572
4572
|
}) })
|
|
4573
4573
|
] }) });
|
|
4574
|
-
},
|
|
4574
|
+
}, Vi = E.div`
|
|
4575
4575
|
& > div {
|
|
4576
4576
|
background: ${({ $background: e, theme: t }) => {
|
|
4577
4577
|
var n, o, r, i;
|
|
@@ -4585,17 +4585,17 @@ const Ei = E.div`
|
|
|
4585
4585
|
if (o.path && (e === o.path || e.startsWith(o.path + "/")) || (n = o.links) != null && n.some((r) => r.path === e)) return o.id;
|
|
4586
4586
|
return null;
|
|
4587
4587
|
}, Cl = (e) => {
|
|
4588
|
-
const { collapseOnNavigate: t = !1, defaultOpenId: n = null, groups: o } = e, r = ro(), [i, s] =
|
|
4588
|
+
const { collapseOnNavigate: t = !1, defaultOpenId: n = null, groups: o } = e, r = ro(), [i, s] = P.useState(n), d = P.useRef(r.pathname), l = P.useCallback(
|
|
4589
4589
|
(p) => {
|
|
4590
4590
|
var c;
|
|
4591
4591
|
return (c = p.find((h) => h.path === r.pathname)) == null ? void 0 : c.id;
|
|
4592
4592
|
},
|
|
4593
4593
|
[r.pathname]
|
|
4594
|
-
), u =
|
|
4594
|
+
), u = P.useCallback(
|
|
4595
4595
|
(p) => !!p && (r.pathname === p || r.pathname.startsWith(p + "/")),
|
|
4596
4596
|
[r.pathname]
|
|
4597
4597
|
);
|
|
4598
|
-
return
|
|
4598
|
+
return P.useEffect(() => {
|
|
4599
4599
|
if (!(d.current !== r.pathname)) return;
|
|
4600
4600
|
if (d.current = r.pathname, t) {
|
|
4601
4601
|
s(null);
|
|
@@ -4607,8 +4607,8 @@ const Ei = E.div`
|
|
|
4607
4607
|
return;
|
|
4608
4608
|
}
|
|
4609
4609
|
n && s(n);
|
|
4610
|
-
}, [t, n, o, r.pathname]), /* @__PURE__ */ a(
|
|
4611
|
-
|
|
4610
|
+
}, [t, n, o, r.pathname]), /* @__PURE__ */ a(Vi, { $background: !0, children: /* @__PURE__ */ a(y, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: o.map((p) => /* @__PURE__ */ a(
|
|
4611
|
+
Pi,
|
|
4612
4612
|
{
|
|
4613
4613
|
activeId: l(p.links),
|
|
4614
4614
|
headerPath: p.path,
|
|
@@ -4858,7 +4858,7 @@ function Qi({
|
|
|
4858
4858
|
performTransfer: Ki,
|
|
4859
4859
|
root: o.root ?? document,
|
|
4860
4860
|
setupNode: na,
|
|
4861
|
-
setupNodeRemap:
|
|
4861
|
+
setupNodeRemap: _n,
|
|
4862
4862
|
reapplyDragClasses: oa,
|
|
4863
4863
|
tearDownNode: ia,
|
|
4864
4864
|
tearDownNodeRemap: ra,
|
|
@@ -5110,7 +5110,7 @@ function na(e) {
|
|
|
5110
5110
|
(i = (r = o(e.parent.el)) == null ? void 0 : r.setupNode) == null || i.call(r, e);
|
|
5111
5111
|
});
|
|
5112
5112
|
}
|
|
5113
|
-
function
|
|
5113
|
+
function _n(e) {
|
|
5114
5114
|
var t;
|
|
5115
5115
|
fe.set(e.node.el, e.node.data), (t = e.parent.data.config.plugins) == null || t.forEach((n) => {
|
|
5116
5116
|
var o, r;
|
|
@@ -5212,7 +5212,7 @@ function bt(e, t) {
|
|
|
5212
5212
|
el: u,
|
|
5213
5213
|
data: c
|
|
5214
5214
|
}
|
|
5215
|
-
}),
|
|
5215
|
+
}), _n({
|
|
5216
5216
|
parent: {
|
|
5217
5217
|
el: e,
|
|
5218
5218
|
data: n
|
|
@@ -5254,7 +5254,7 @@ function ca(e) {
|
|
|
5254
5254
|
}
|
|
5255
5255
|
function ua(e, t) {
|
|
5256
5256
|
const n = e.targetData.parent.data.config;
|
|
5257
|
-
if (!n.nativeDrag || !sa(e) || !
|
|
5257
|
+
if (!n.nativeDrag || !sa(e) || !Pn({
|
|
5258
5258
|
x: e.e.clientX,
|
|
5259
5259
|
y: e.e.clientY,
|
|
5260
5260
|
node: e.targetData.node,
|
|
@@ -5290,7 +5290,7 @@ function pa(e, t) {
|
|
|
5290
5290
|
parent: e.targetData.parent,
|
|
5291
5291
|
node: e.targetData.node,
|
|
5292
5292
|
validated: !1
|
|
5293
|
-
}, !
|
|
5293
|
+
}, !Pn({
|
|
5294
5294
|
x: e.e.clientX,
|
|
5295
5295
|
y: e.e.clientY,
|
|
5296
5296
|
node: e.targetData.node,
|
|
@@ -5435,7 +5435,7 @@ function ga(e, t) {
|
|
|
5435
5435
|
}
|
|
5436
5436
|
return n;
|
|
5437
5437
|
}
|
|
5438
|
-
function
|
|
5438
|
+
function Pn({
|
|
5439
5439
|
x: e,
|
|
5440
5440
|
y: t,
|
|
5441
5441
|
node: n,
|
|
@@ -5611,7 +5611,7 @@ function Sa(e, t, n) {
|
|
|
5611
5611
|
function Ht(e, t = !0, n = !0) {
|
|
5612
5612
|
t && (e.frameIdX !== void 0 && (cancelAnimationFrame(e.frameIdX), e.frameIdX = void 0), e.lastScrollDirectionX = void 0), n && (e.frameIdY !== void 0 && (cancelAnimationFrame(e.frameIdY), e.frameIdY = void 0), e.lastScrollDirectionY = void 0), !e.frameIdX && !e.frameIdY && (e.preventEnter = !1);
|
|
5613
5613
|
}
|
|
5614
|
-
function
|
|
5614
|
+
function Vn(e, t = !1) {
|
|
5615
5615
|
var p;
|
|
5616
5616
|
const { x: n, y: o } = e.coordinates, r = e.startLeft ?? 0, i = e.startTop ?? 0, s = window.scrollX ?? 0, d = window.scrollY ?? 0, l = n - r + s, u = o - i + d;
|
|
5617
5617
|
e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${u}px, 0px)`, t && (e.clonedDraggedNode.style.opacity = "1", xe(
|
|
@@ -5621,7 +5621,7 @@ function _n(e, t = !1) {
|
|
|
5621
5621
|
}
|
|
5622
5622
|
function pn(e, t, n = !1) {
|
|
5623
5623
|
const o = Fe(e);
|
|
5624
|
-
t.coordinates.x = o.x, t.coordinates.y = o.y,
|
|
5624
|
+
t.coordinates.x = o.x, t.coordinates.y = o.y, Vn(t, n), t.scrollDebounceTimeout && (clearTimeout(t.scrollDebounceTimeout), t.scrollDebounceTimeout = void 0), t.scrollDebounceTimeout = setTimeout(() => {
|
|
5625
5625
|
ie(t) && yt(t.coordinates, e, t);
|
|
5626
5626
|
}, 16);
|
|
5627
5627
|
const r = Oa(o);
|
|
@@ -5887,7 +5887,7 @@ function La(e, t, n, o) {
|
|
|
5887
5887
|
n[l] = void 0, n[d] = void 0;
|
|
5888
5888
|
return;
|
|
5889
5889
|
}
|
|
5890
|
-
e[p] += s * i, ie(n) &&
|
|
5890
|
+
e[p] += s * i, ie(n) && Vn(n), n[l] = requestAnimationFrame(u);
|
|
5891
5891
|
};
|
|
5892
5892
|
n[l] = requestAnimationFrame(u);
|
|
5893
5893
|
}
|
|
@@ -5977,28 +5977,28 @@ function Ma(e) {
|
|
|
5977
5977
|
return e.current;
|
|
5978
5978
|
console.warn("Invalid parent element", e);
|
|
5979
5979
|
}
|
|
5980
|
-
function
|
|
5980
|
+
function _a(e, t) {
|
|
5981
5981
|
const n = Ma(e);
|
|
5982
5982
|
n && t(n);
|
|
5983
5983
|
}
|
|
5984
5984
|
var gt = /* @__PURE__ */ new WeakMap();
|
|
5985
|
-
function
|
|
5985
|
+
function Pa(e) {
|
|
5986
5986
|
const t = gt.get(e);
|
|
5987
5987
|
return t ? t[0] : (console.warn("No values found for parent element"), []);
|
|
5988
5988
|
}
|
|
5989
|
-
function
|
|
5989
|
+
function Va(e, t) {
|
|
5990
5990
|
const n = gt.get(t);
|
|
5991
5991
|
n && n[1](e), gt.set(t, [e, n[1]]);
|
|
5992
5992
|
}
|
|
5993
5993
|
function ja(e, t) {
|
|
5994
5994
|
return (n) => {
|
|
5995
|
-
gt.set(n, t), Qi({ parent: n, getValues:
|
|
5995
|
+
gt.set(n, t), Qi({ parent: n, getValues: Pa, setValues: Va, config: e });
|
|
5996
5996
|
};
|
|
5997
5997
|
}
|
|
5998
5998
|
function fn(e) {
|
|
5999
5999
|
Zt && (Array.isArray(e) || (e = [e]), e.forEach((t) => {
|
|
6000
6000
|
const { parent: n, state: o, ...r } = t;
|
|
6001
|
-
|
|
6001
|
+
_a(n, ja(r, o));
|
|
6002
6002
|
}));
|
|
6003
6003
|
}
|
|
6004
6004
|
function Ua(e, t = {}) {
|
|
@@ -6048,10 +6048,10 @@ const mn = {
|
|
|
6048
6048
|
highlightFirst: s,
|
|
6049
6049
|
onMove: d,
|
|
6050
6050
|
locked: l = !1
|
|
6051
|
-
} = e, u =
|
|
6051
|
+
} = e, u = P.useRef(null), p = l ? [u, i] : Ua(i, { group: o }), [c, h] = p, [g, f] = P.useState(
|
|
6052
6052
|
null
|
|
6053
|
-
), v =
|
|
6054
|
-
|
|
6053
|
+
), v = P.useRef(i);
|
|
6054
|
+
P.useEffect(() => {
|
|
6055
6055
|
if (l) return;
|
|
6056
6056
|
const N = (C) => {
|
|
6057
6057
|
const A = C.detail ?? null;
|
|
@@ -6059,7 +6059,7 @@ const mn = {
|
|
|
6059
6059
|
};
|
|
6060
6060
|
return window.addEventListener(Rt, N), () => window.removeEventListener(Rt, N);
|
|
6061
6061
|
}, [l]);
|
|
6062
|
-
const T =
|
|
6062
|
+
const T = P.useCallback((N) => {
|
|
6063
6063
|
l || window.dispatchEvent(
|
|
6064
6064
|
new CustomEvent(Rt, { detail: N })
|
|
6065
6065
|
);
|
|
@@ -6068,16 +6068,16 @@ const mn = {
|
|
|
6068
6068
|
if (l) return;
|
|
6069
6069
|
const C = N.target, A = ($ = C == null ? void 0 : C.closest) == null ? void 0 : $.call(C, "li.dnd-item"), R = (A == null ? void 0 : A.getAttribute("data-label")) || null;
|
|
6070
6070
|
R && (f(R), T(R));
|
|
6071
|
-
}, D =
|
|
6071
|
+
}, D = P.useCallback(() => {
|
|
6072
6072
|
l || (f(null), T(null));
|
|
6073
6073
|
}, [T, l]);
|
|
6074
|
-
|
|
6074
|
+
P.useEffect(() => {
|
|
6075
6075
|
if (l) return;
|
|
6076
6076
|
const N = () => D();
|
|
6077
6077
|
return window.addEventListener("pointerup", N), window.addEventListener("blur", N), () => {
|
|
6078
6078
|
window.removeEventListener("pointerup", N), window.removeEventListener("blur", N);
|
|
6079
6079
|
};
|
|
6080
|
-
}, [D, l]),
|
|
6080
|
+
}, [D, l]), P.useEffect(() => {
|
|
6081
6081
|
if (l) return;
|
|
6082
6082
|
const N = v.current;
|
|
6083
6083
|
if (h.length !== N.length && h.length === N.length + 1) {
|
|
@@ -6091,7 +6091,7 @@ const mn = {
|
|
|
6091
6091
|
}, [h, n, d, l]);
|
|
6092
6092
|
const S = h.length === 0;
|
|
6093
6093
|
return /* @__PURE__ */ a(
|
|
6094
|
-
|
|
6094
|
+
Ve,
|
|
6095
6095
|
{
|
|
6096
6096
|
legend: r,
|
|
6097
6097
|
width: "100%",
|
|
@@ -6277,11 +6277,11 @@ const mn = {
|
|
|
6277
6277
|
conditionsThatEstablishesTheDecision: t
|
|
6278
6278
|
// preserve full structure
|
|
6279
6279
|
};
|
|
6280
|
-
},
|
|
6280
|
+
}, _e = /* @__PURE__ */ new Map(), Wa = (e, t) => _e.get(`${t}:${e}`), Ya = (e, t, n) => {
|
|
6281
6281
|
const o = `${t}:${e}`;
|
|
6282
|
-
if (
|
|
6283
|
-
const r =
|
|
6284
|
-
r !== void 0 &&
|
|
6282
|
+
if (_e.set(o, n), _e.size > 1e3) {
|
|
6283
|
+
const r = _e.keys().next().value;
|
|
6284
|
+
r !== void 0 && _e.delete(r);
|
|
6285
6285
|
}
|
|
6286
6286
|
}, vn = /* @__PURE__ */ new Map(), Xa = 1e3, Qa = (e) => {
|
|
6287
6287
|
const t = Date.now(), n = vn.get(e) || 0;
|
|
@@ -6354,7 +6354,7 @@ export {
|
|
|
6354
6354
|
gl as BusinessRulesWithGroup,
|
|
6355
6355
|
Sl as DragAndDropBoxes,
|
|
6356
6356
|
bn as DraggableList,
|
|
6357
|
-
|
|
6357
|
+
Pi as DropdownMenu,
|
|
6358
6358
|
Cl as DropdownMenuContainer,
|
|
6359
6359
|
de as EValueHowToSetUp,
|
|
6360
6360
|
ml as Filter,
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"description": "",
|
|
12
12
|
"private": false,
|
|
13
|
-
"version": "2.2.
|
|
13
|
+
"version": "2.2.12",
|
|
14
14
|
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@formkit/drag-and-drop": "^0.5.3",
|
|
40
|
-
"@inubekit/inubekit": "^6.
|
|
41
|
-
"@isettingkit/input": "^1.1.
|
|
42
|
-
"@isettingkit/view": "^0.1.
|
|
40
|
+
"@inubekit/inubekit": "^6.4.0",
|
|
41
|
+
"@isettingkit/input": "^1.1.10",
|
|
42
|
+
"@isettingkit/view": "^0.1.37",
|
|
43
43
|
"axios": "^1.9.0",
|
|
44
44
|
"franc-min": "^6.2.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"formik": "^2.4.6",
|
|
48
|
-
"react": "19.
|
|
49
|
-
"react-dom": "19.
|
|
48
|
+
"react": "19.2.1",
|
|
49
|
+
"react-dom": "19.2.1",
|
|
50
50
|
"react-icons": "^5.0.1",
|
|
51
51
|
"styled-components": "^6.1.8",
|
|
52
52
|
"yup": "^1.4.0"
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@storybook/addon-docs": "^9.1.3",
|
|
62
62
|
"@storybook/addon-links": "^9.1.3",
|
|
63
63
|
"@storybook/react-vite": "^9.1.3",
|
|
64
|
-
"@types/react": "19.
|
|
65
|
-
"@types/react-dom": "19.
|
|
64
|
+
"@types/react": "19.2.1",
|
|
65
|
+
"@types/react-dom": "19.2.1",
|
|
66
66
|
"@types/styled-components": "^5.1.34",
|
|
67
67
|
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
68
68
|
"@typescript-eslint/parser": "^6.14.0",
|