@isettingkit/business-rules 3.2.4 → 3.2.6
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.d.ts +1 -1
- package/dist/index.es.js +134 -135
- package/package.json +1 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -266,7 +266,7 @@ declare interface IBusinessRules_3 {
|
|
|
266
266
|
handleOpenModal?: (decision?: IRuleDecisionNew) => void;
|
|
267
267
|
handleCloseModal?: () => void;
|
|
268
268
|
handleSubmitForm?: (dataDecision: IRuleDecisionNew) => void;
|
|
269
|
-
handleOpenRulesModal?: (checkedItems?: IOption[]
|
|
269
|
+
handleOpenRulesModal?: (checkedItems?: IOption[]) => void;
|
|
270
270
|
handleDelete?: (id: string) => void;
|
|
271
271
|
terms?: boolean;
|
|
272
272
|
onRemoveCondition?: (conditionName: string) => void;
|
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as i, jsxs as b, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import { MdOutlineDelete as
|
|
2
|
+
import { MdOutlineDelete as Yt, MdOutlinePercent as wr, MdOutlineChevronRight as na, MdOutlineError as ra, MdClear as wt, MdOutlineFilterAltOff as Sr, MdOutlineLockClock as nt, MdAdd as St, MdOutlineCreate as aa, MdExpandLess as oa, MdExpandMore as un, MdInfo as ia, MdCached as la, MdOutlineInfo as sa, MdClose as da, MdOutlineFilterAlt as xr, MdChevronRight as Mn, MdArrowRight as ca, MdOutlineArrowCircleLeft as ua, MdOutlineArrowCircleRight as pa, MdKeyboardArrowUp as ha, MdKeyboardArrowDown as ga, MdOutlineArrowBack as fa } from "react-icons/md";
|
|
3
3
|
import { inube as k, Stack as v, Divider as K, Icon as B, Textfield as mt, Moneyfield as Cr, Date as Oe, Numberfield as xn, Text as D, Tag as we, Checkpicker as Cn, Grid as Fe, Select as Ae, Label as ma, OptionItem as Dr, Box as Nr, useMediaQuery as Se, Blanket as xt, Button as Z, SkeletonLine as fe, Toggle as rt, Checkbox as Er, Tabs as Ar, SkeletonIcon as ba, Fieldset as Qe, OptionList as ya } from "@inubekit/inubekit";
|
|
4
4
|
import $, { ThemeContext as Dn, keyframes as Nn } from "styled-components";
|
|
5
|
-
import U, { useState as Y, forwardRef as va, useContext as En, useMemo as
|
|
6
|
-
import { createPortal as
|
|
5
|
+
import U, { useState as Y, forwardRef as va, useContext as En, useMemo as Ct, useRef as Ke, useEffect as Pe, useCallback as Ta } from "react";
|
|
6
|
+
import { createPortal as Dt } from "react-dom";
|
|
7
7
|
import { useFormik as An } from "formik";
|
|
8
8
|
import { string as Re, mixed as ze, object as ne, number as $e, lazy as bt, date as yt } from "yup";
|
|
9
9
|
import { Link as $r, useNavigate as wa, useLocation as Sa } from "react-router-dom";
|
|
@@ -44,7 +44,7 @@ $.div`
|
|
|
44
44
|
border-radius: 8px;
|
|
45
45
|
}
|
|
46
46
|
`;
|
|
47
|
-
const
|
|
47
|
+
const Nt = (e) => {
|
|
48
48
|
const { children: t, controls: n = !0, handleDelete: r, id: a } = e;
|
|
49
49
|
return /* @__PURE__ */ i(Da, { children: /* @__PURE__ */ b(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
50
50
|
t,
|
|
@@ -56,7 +56,7 @@ const Dt = (e) => {
|
|
|
56
56
|
cursorHover: !0,
|
|
57
57
|
appearance: "danger",
|
|
58
58
|
size: "24px",
|
|
59
|
-
icon: /* @__PURE__ */ i(
|
|
59
|
+
icon: /* @__PURE__ */ i(Yt, {}),
|
|
60
60
|
onClick: () => {
|
|
61
61
|
r(a);
|
|
62
62
|
}
|
|
@@ -99,7 +99,7 @@ const Dt = (e) => {
|
|
|
99
99
|
style: "currency",
|
|
100
100
|
currency: "COP",
|
|
101
101
|
minimumFractionDigits: 0
|
|
102
|
-
}).format(e),
|
|
102
|
+
}).format(e), Ut = (e) => e === "$ 0" ? NaN : parseInt(e.replace(/\$|\./g, "")), jt = (e) => {
|
|
103
103
|
const t = e.trim();
|
|
104
104
|
return t ? /^-?\d*(?:[.,]\d+)?$/.test(t) ? parseFloat(t.replace(",", ".")) : NaN : NaN;
|
|
105
105
|
}, Ea = (e) => {
|
|
@@ -110,7 +110,7 @@ const Dt = (e) => {
|
|
|
110
110
|
const t = e.trim();
|
|
111
111
|
if (!/^-?\d*(?:[.,]\d+)?$/.test(t))
|
|
112
112
|
return t;
|
|
113
|
-
const r =
|
|
113
|
+
const r = jt(t);
|
|
114
114
|
return Number.isNaN(r) ? t : `${String(e)}%`;
|
|
115
115
|
}, Aa = {
|
|
116
116
|
currency: (e) => vt(e),
|
|
@@ -387,10 +387,10 @@ const Oa = {
|
|
|
387
387
|
onBlur: g
|
|
388
388
|
} = e, [f, y] = Y(c), [m, T] = Y(l), S = (N) => {
|
|
389
389
|
let A;
|
|
390
|
-
a === "currency" ? A =
|
|
390
|
+
a === "currency" ? A = Ut(N.target.value) : a === "date" ? A = new Date(N.target.value) : A = Number(N.target.value), y(A), t(A);
|
|
391
391
|
}, E = (N) => {
|
|
392
392
|
let A;
|
|
393
|
-
a === "currency" ? A =
|
|
393
|
+
a === "currency" ? A = Ut(N.target.value) : a === "date" ? A = new Date(N.target.value) : A = Number(N.target.value), T(A), n(A);
|
|
394
394
|
}, C = (N, A) => A === "currency" ? vt(N) : A === "date" && N instanceof Date ? N.toISOString().split("T")[0] : Number(N);
|
|
395
395
|
return /* @__PURE__ */ b(v, { direction: "column", children: [
|
|
396
396
|
/* @__PURE__ */ i(D, { type: "label", weight: "bold", size: "large", appearance: "dark", children: o }),
|
|
@@ -646,7 +646,7 @@ const Oa = {
|
|
|
646
646
|
ListOfValues: "LIST_OF_VALUES",
|
|
647
647
|
ListOfValuesMulti: "LIST_OF_VALUES_MULTI",
|
|
648
648
|
Range: "RANGE"
|
|
649
|
-
})[e] || null,
|
|
649
|
+
})[e] || null, Gt = ({
|
|
650
650
|
condition: e,
|
|
651
651
|
formik: t,
|
|
652
652
|
isDecision: n = !1
|
|
@@ -962,7 +962,7 @@ const Oa = {
|
|
|
962
962
|
}
|
|
963
963
|
if (!/^-?\d*(?:[.,]\d*)?$/.test(f))
|
|
964
964
|
return;
|
|
965
|
-
const m =
|
|
965
|
+
const m = jt(f);
|
|
966
966
|
Number.isNaN(m) ? a(t, f) : a(t, m);
|
|
967
967
|
},
|
|
968
968
|
fullwidth: !0,
|
|
@@ -987,7 +987,7 @@ const Ja = {
|
|
|
987
987
|
[q.DATE]: Wa,
|
|
988
988
|
[q.NUMBER]: Qa,
|
|
989
989
|
[q.PERCENTAGE]: Xa
|
|
990
|
-
}, Za = (e) => Ja[e] || null,
|
|
990
|
+
}, Za = (e) => Ja[e] || null, Bt = (e) => {
|
|
991
991
|
const {
|
|
992
992
|
condition: t,
|
|
993
993
|
type: n,
|
|
@@ -1029,7 +1029,7 @@ const tn = ({
|
|
|
1029
1029
|
}) => {
|
|
1030
1030
|
var n, r;
|
|
1031
1031
|
return /* @__PURE__ */ i(kn, { children: /* @__PURE__ */ i(
|
|
1032
|
-
|
|
1032
|
+
Bt,
|
|
1033
1033
|
{
|
|
1034
1034
|
type: e.decisionDataType.toLowerCase(),
|
|
1035
1035
|
name: e.ruleName,
|
|
@@ -1314,7 +1314,7 @@ const lo = (e) => {
|
|
|
1314
1314
|
onOptionClick: ie,
|
|
1315
1315
|
onCheckboxChange: ce,
|
|
1316
1316
|
handleClear: re
|
|
1317
|
-
} = e, L = En(Dn), M = ((je = (_e = L == null ? void 0 : L.input) == null ? void 0 : _e.required) == null ? void 0 : je.appearance) || Ie.required.appearance, Ce = f && !r, De = T || m === "" ? "" : zn(h, m), Ve =
|
|
1317
|
+
} = e, L = En(Dn), M = ((je = (_e = L == null ? void 0 : L.input) == null ? void 0 : _e.required) == null ? void 0 : je.appearance) || Ie.required.appearance, Ce = f && !r, De = T || m === "" ? "" : zn(h, m), Ve = Ct(
|
|
1318
1318
|
() => h.filter((Q) => E.includes(Q.id)),
|
|
1319
1319
|
[h, E]
|
|
1320
1320
|
), Ye = (Q, W) => {
|
|
@@ -1516,16 +1516,16 @@ const lo = (e) => {
|
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
1518
|
function je(W) {
|
|
1519
|
-
const { value: ee, checked:
|
|
1519
|
+
const { value: ee, checked: At } = W.target;
|
|
1520
1520
|
re((it) => {
|
|
1521
|
-
const lt =
|
|
1521
|
+
const lt = At ? [...it, ee] : it.filter((st) => st !== ee);
|
|
1522
1522
|
return p(l, lt.join(",")), lt;
|
|
1523
1523
|
});
|
|
1524
1524
|
}
|
|
1525
1525
|
Pe(() => (document.addEventListener("click", De), () => {
|
|
1526
1526
|
document.removeEventListener("click", De);
|
|
1527
1527
|
}), [De]);
|
|
1528
|
-
const Q =
|
|
1528
|
+
const Q = Ct(() => O || C ? f : [{ id: "empty-option", label: "", value: "" }, ...f], [f, O, C]);
|
|
1529
1529
|
return /* @__PURE__ */ i(
|
|
1530
1530
|
so,
|
|
1531
1531
|
{
|
|
@@ -1652,11 +1652,11 @@ const lo = (e) => {
|
|
|
1652
1652
|
} = e, [C, N] = Y(l), [A, O] = Y(d), V = (L) => {
|
|
1653
1653
|
let M;
|
|
1654
1654
|
if (o === q.MONETARY)
|
|
1655
|
-
M =
|
|
1655
|
+
M = Ut(String(L));
|
|
1656
1656
|
else if (o === "date")
|
|
1657
1657
|
M = L instanceof Date ? L : new Date(String(L));
|
|
1658
1658
|
else if (o === "percentage") {
|
|
1659
|
-
const Ce =
|
|
1659
|
+
const Ce = jt(String(L));
|
|
1660
1660
|
N(String(L)), n(Ce);
|
|
1661
1661
|
return;
|
|
1662
1662
|
} else o === "number" ? M = Number(L) : M = String(L);
|
|
@@ -1664,11 +1664,11 @@ const lo = (e) => {
|
|
|
1664
1664
|
}, G = (L) => {
|
|
1665
1665
|
let M;
|
|
1666
1666
|
if (o === q.MONETARY)
|
|
1667
|
-
M =
|
|
1667
|
+
M = Ut(String(L));
|
|
1668
1668
|
else if (o === "date")
|
|
1669
1669
|
M = L instanceof Date ? L : new Date(String(L));
|
|
1670
1670
|
else if (o === "percentage") {
|
|
1671
|
-
const Ce =
|
|
1671
|
+
const Ce = jt(String(L));
|
|
1672
1672
|
O(String(L)), r(Ce);
|
|
1673
1673
|
return;
|
|
1674
1674
|
} else o === "number" ? M = Number(L) : M = String(L);
|
|
@@ -1726,7 +1726,7 @@ const lo = (e) => {
|
|
|
1726
1726
|
onBlur: ce
|
|
1727
1727
|
}
|
|
1728
1728
|
) : /* @__PURE__ */ i(
|
|
1729
|
-
|
|
1729
|
+
Bt,
|
|
1730
1730
|
{
|
|
1731
1731
|
type: o,
|
|
1732
1732
|
name: `${a}DynamicFieldFrom`,
|
|
@@ -1776,7 +1776,7 @@ const lo = (e) => {
|
|
|
1776
1776
|
onBlur: re
|
|
1777
1777
|
}
|
|
1778
1778
|
) : /* @__PURE__ */ i(
|
|
1779
|
-
|
|
1779
|
+
Bt,
|
|
1780
1780
|
{
|
|
1781
1781
|
type: o,
|
|
1782
1782
|
name: `${a}DynamicFieldTo`,
|
|
@@ -1866,7 +1866,7 @@ const lo = (e) => {
|
|
|
1866
1866
|
});
|
|
1867
1867
|
};
|
|
1868
1868
|
return /* @__PURE__ */ i(
|
|
1869
|
-
|
|
1869
|
+
Bt,
|
|
1870
1870
|
{
|
|
1871
1871
|
condition: !0,
|
|
1872
1872
|
type: e.conditionDataType.toLowerCase(),
|
|
@@ -2179,7 +2179,7 @@ const Ao = {
|
|
|
2179
2179
|
]
|
|
2180
2180
|
}
|
|
2181
2181
|
);
|
|
2182
|
-
},
|
|
2182
|
+
}, It = ({
|
|
2183
2183
|
nameLabel: e,
|
|
2184
2184
|
type: t,
|
|
2185
2185
|
valueData: n,
|
|
@@ -2301,10 +2301,10 @@ const Ao = {
|
|
|
2301
2301
|
}, Lo = {
|
|
2302
2302
|
LIST_OF_VALUES_MULTI: Io,
|
|
2303
2303
|
RANGE: Ro,
|
|
2304
|
-
GREATER_THAN:
|
|
2305
|
-
LESS_THAN:
|
|
2306
|
-
EQUAL:
|
|
2307
|
-
LIST_OF_VALUES:
|
|
2304
|
+
GREATER_THAN: It,
|
|
2305
|
+
LESS_THAN: It,
|
|
2306
|
+
EQUAL: It,
|
|
2307
|
+
LIST_OF_VALUES: It
|
|
2308
2308
|
}, Fo = (e) => Lo[e], Vo = (e) => ({
|
|
2309
2309
|
EqualTo: "EQUAL",
|
|
2310
2310
|
GreaterThan: "GREATER_THAN",
|
|
@@ -2376,7 +2376,7 @@ const Ao = {
|
|
|
2376
2376
|
throw new Error(
|
|
2377
2377
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
2378
2378
|
);
|
|
2379
|
-
return
|
|
2379
|
+
return Dt(
|
|
2380
2380
|
/* @__PURE__ */ i(
|
|
2381
2381
|
Mo,
|
|
2382
2382
|
{
|
|
@@ -2503,7 +2503,7 @@ const Ao = {
|
|
|
2503
2503
|
}
|
|
2504
2504
|
)
|
|
2505
2505
|
] });
|
|
2506
|
-
},
|
|
2506
|
+
}, Ot = ({
|
|
2507
2507
|
nameLabel: e,
|
|
2508
2508
|
type: t,
|
|
2509
2509
|
valueData: n,
|
|
@@ -2717,10 +2717,10 @@ const Ao = {
|
|
|
2717
2717
|
}, Bo = {
|
|
2718
2718
|
LIST_OF_VALUES_MULTI: Uo,
|
|
2719
2719
|
RANGE: Go,
|
|
2720
|
-
GREATER_THAN:
|
|
2721
|
-
LESS_THAN:
|
|
2722
|
-
EQUAL:
|
|
2723
|
-
LIST_OF_VALUES:
|
|
2720
|
+
GREATER_THAN: Ot,
|
|
2721
|
+
LESS_THAN: Ot,
|
|
2722
|
+
EQUAL: Ot,
|
|
2723
|
+
LIST_OF_VALUES: Ot
|
|
2724
2724
|
}, Ho = (e) => Bo[e], qo = (e) => ({
|
|
2725
2725
|
EqualTo: "EQUAL",
|
|
2726
2726
|
GreaterThan: "GREATER_THAN",
|
|
@@ -2728,7 +2728,7 @@ const Ao = {
|
|
|
2728
2728
|
ListOfValues: "LIST_OF_VALUES",
|
|
2729
2729
|
ListOfValuesMulti: "LIST_OF_VALUES_MULTI",
|
|
2730
2730
|
Range: "RANGE"
|
|
2731
|
-
})[e] || null,
|
|
2731
|
+
})[e] || null, Rt = (e) => {
|
|
2732
2732
|
const { element: t, valueData: n, type: r } = e, a = qo(
|
|
2733
2733
|
t.howToSetTheDecision || t.howToSetTheCondition
|
|
2734
2734
|
);
|
|
@@ -2951,7 +2951,7 @@ const Ao = {
|
|
|
2951
2951
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
2952
2952
|
);
|
|
2953
2953
|
const s = Se("(max-width: 400px)");
|
|
2954
|
-
return
|
|
2954
|
+
return Dt(
|
|
2955
2955
|
/* @__PURE__ */ i(Wo, { smallScreen: s, children: /* @__PURE__ */ i(xt, { children: /* @__PURE__ */ i(Qo, { children: /* @__PURE__ */ b(v, { direction: "column", gap: "24px", children: [
|
|
2956
2956
|
/* @__PURE__ */ i(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ b(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2957
2957
|
/* @__PURE__ */ i(D, { type: "title", size: "large", appearance: "dark", weight: "bold", children: a }),
|
|
@@ -3008,7 +3008,7 @@ const Fr = $.div`
|
|
|
3008
3008
|
height: 100%;
|
|
3009
3009
|
padding-bottom: 12px;
|
|
3010
3010
|
cursor: pointer;
|
|
3011
|
-
`,
|
|
3011
|
+
`, Et = $.div`
|
|
3012
3012
|
width: 100%;
|
|
3013
3013
|
height: 100%;
|
|
3014
3014
|
& > div {
|
|
@@ -3042,7 +3042,7 @@ const Fr = $.div`
|
|
|
3042
3042
|
`, ei = (e) => {
|
|
3043
3043
|
const { index: t, handleOpenModal: n } = e;
|
|
3044
3044
|
return /* @__PURE__ */ i(
|
|
3045
|
-
|
|
3045
|
+
Nt,
|
|
3046
3046
|
{
|
|
3047
3047
|
id: `loading-card-${t}`,
|
|
3048
3048
|
handleDelete: () => {
|
|
@@ -3055,10 +3055,10 @@ const Fr = $.div`
|
|
|
3055
3055
|
);
|
|
3056
3056
|
}, ti = (e) => {
|
|
3057
3057
|
const { decision: t, controls: n, handleOpenModal: r, handleDelete: a, textValues: o } = e;
|
|
3058
|
-
return t ? /* @__PURE__ */ i(
|
|
3058
|
+
return t ? /* @__PURE__ */ i(Et, { children: /* @__PURE__ */ b(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
3059
3059
|
/* @__PURE__ */ i(D, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
|
|
3060
3060
|
/* @__PURE__ */ i(
|
|
3061
|
-
|
|
3061
|
+
Nt,
|
|
3062
3062
|
{
|
|
3063
3063
|
id: t.decisionId,
|
|
3064
3064
|
handleDelete: () => a ? a(t.decisionId) : null,
|
|
@@ -3075,14 +3075,14 @@ const Fr = $.div`
|
|
|
3075
3075
|
handleOpenModal: r,
|
|
3076
3076
|
shouldRenderEmptyMessage: a
|
|
3077
3077
|
} = e, o = t || "Agregar decisión";
|
|
3078
|
-
return /* @__PURE__ */ i(
|
|
3078
|
+
return /* @__PURE__ */ i(Et, { children: a ? null : /* @__PURE__ */ b(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
3079
3079
|
/* @__PURE__ */ i(D, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
3080
3080
|
/* @__PURE__ */ i(
|
|
3081
3081
|
Fr,
|
|
3082
3082
|
{
|
|
3083
3083
|
onClick: () => r ? r() : null,
|
|
3084
3084
|
children: /* @__PURE__ */ i(
|
|
3085
|
-
|
|
3085
|
+
Nt,
|
|
3086
3086
|
{
|
|
3087
3087
|
id: `add-decision-${n}`,
|
|
3088
3088
|
handleDelete: () => {
|
|
@@ -3295,7 +3295,7 @@ const Fr = $.div`
|
|
|
3295
3295
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
3296
3296
|
);
|
|
3297
3297
|
const s = Se("(max-width: 400px)");
|
|
3298
|
-
return
|
|
3298
|
+
return Dt(
|
|
3299
3299
|
/* @__PURE__ */ i(oi, { $smallScreen: s, children: /* @__PURE__ */ i(xt, { children: /* @__PURE__ */ i(ii, { children: /* @__PURE__ */ b(v, { direction: "column", gap: "24px", children: [
|
|
3300
3300
|
/* @__PURE__ */ i(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ b(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
3301
3301
|
/* @__PURE__ */ i(D, { type: "title", size: "large", appearance: "dark", weight: "bold", children: a }),
|
|
@@ -3388,7 +3388,7 @@ const di = $.div`
|
|
|
3388
3388
|
`, ui = (e) => {
|
|
3389
3389
|
const { index: t, handleOpenModal: n } = e;
|
|
3390
3390
|
return /* @__PURE__ */ i(
|
|
3391
|
-
|
|
3391
|
+
Nt,
|
|
3392
3392
|
{
|
|
3393
3393
|
id: `loading-card-${t}`,
|
|
3394
3394
|
handleDelete: () => {
|
|
@@ -3647,7 +3647,7 @@ const Ni = (e) => {
|
|
|
3647
3647
|
cursorHover: !0,
|
|
3648
3648
|
appearance: "danger",
|
|
3649
3649
|
size: "24px",
|
|
3650
|
-
icon: /* @__PURE__ */ i(
|
|
3650
|
+
icon: /* @__PURE__ */ i(Yt, {}),
|
|
3651
3651
|
onClick: () => {
|
|
3652
3652
|
r(a);
|
|
3653
3653
|
}
|
|
@@ -3659,7 +3659,7 @@ const Ni = (e) => {
|
|
|
3659
3659
|
const { decision: t, controls: n, handleOpenModal: r, handleDelete: a, textValues: o, index: s } = e;
|
|
3660
3660
|
if (!t) return null;
|
|
3661
3661
|
const c = typeof s == "number" ? `Decisión ${s + 1}` : t.decisionId;
|
|
3662
|
-
return /* @__PURE__ */ i(
|
|
3662
|
+
return /* @__PURE__ */ i(Et, { children: /* @__PURE__ */ b(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
3663
3663
|
/* @__PURE__ */ i(D, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: c }),
|
|
3664
3664
|
/* @__PURE__ */ i(
|
|
3665
3665
|
Ni,
|
|
@@ -3685,14 +3685,14 @@ const Ni = (e) => {
|
|
|
3685
3685
|
handleOpenModal: r,
|
|
3686
3686
|
shouldRenderEmptyMessage: a
|
|
3687
3687
|
} = e, o = t || "Agregar decisión";
|
|
3688
|
-
return /* @__PURE__ */ i(
|
|
3688
|
+
return /* @__PURE__ */ i(Et, { children: a ? null : /* @__PURE__ */ b(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
3689
3689
|
/* @__PURE__ */ i(D, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
3690
3690
|
/* @__PURE__ */ i(
|
|
3691
3691
|
Fr,
|
|
3692
3692
|
{
|
|
3693
3693
|
onClick: () => r ? r() : null,
|
|
3694
3694
|
children: /* @__PURE__ */ i(
|
|
3695
|
-
|
|
3695
|
+
Nt,
|
|
3696
3696
|
{
|
|
3697
3697
|
id: `add-decision-${n}`,
|
|
3698
3698
|
handleDelete: () => {
|
|
@@ -3769,14 +3769,14 @@ const Ni = (e) => {
|
|
|
3769
3769
|
[F.GREATER_THAN]: rn,
|
|
3770
3770
|
[F.LESS_THAN]: rn,
|
|
3771
3771
|
[F.EQUAL]: rn
|
|
3772
|
-
}, Fi = (e) => Li[e] || ki,
|
|
3772
|
+
}, Fi = (e) => Li[e] || ki, Pt = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), qn = (e, t) => {
|
|
3773
3773
|
var c;
|
|
3774
3774
|
const n = Object.entries(
|
|
3775
3775
|
(e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}
|
|
3776
|
-
).filter(([, l]) =>
|
|
3776
|
+
).filter(([, l]) => Pt(l)).map(([l, d]) => ({ conditionName: l, value: d }));
|
|
3777
3777
|
let r = [];
|
|
3778
3778
|
const a = (c = e == null ? void 0 : e.conditionGroups) == null ? void 0 : c.conditionsThatEstablishesTheDecision;
|
|
3779
|
-
Array.isArray(a) ? r = a.filter((l) =>
|
|
3779
|
+
Array.isArray(a) ? r = a.filter((l) => Pt(l == null ? void 0 : l.value)).map((l) => ({ conditionName: l == null ? void 0 : l.conditionName, value: l == null ? void 0 : l.value })) : a && typeof a == "object" && (r = Object.entries(a).filter(([, l]) => Pt(l)).map(([l, d]) => ({ conditionName: l, value: d })));
|
|
3780
3780
|
const o = n.length ? n : r, s = new Map(
|
|
3781
3781
|
(t ?? []).map((l) => [l == null ? void 0 : l.conditionName, l])
|
|
3782
3782
|
);
|
|
@@ -3797,7 +3797,7 @@ function Vi({
|
|
|
3797
3797
|
}) {
|
|
3798
3798
|
var u, h;
|
|
3799
3799
|
const r = ((u = e.conditionGroups[0]) == null ? void 0 : u.conditionsThatEstablishesTheDecision) ?? [], a = r.reduce(
|
|
3800
|
-
(g, f) => (
|
|
3800
|
+
(g, f) => (Pt(f.value) && (g[f.conditionName] = f.value), g),
|
|
3801
3801
|
{}
|
|
3802
3802
|
), o = Object.keys(a).length > 0, s = {
|
|
3803
3803
|
ruleName: e.ruleName || "",
|
|
@@ -4052,7 +4052,7 @@ const Ui = (e) => {
|
|
|
4052
4052
|
termEndStatus: p
|
|
4053
4053
|
} = e;
|
|
4054
4054
|
return /* @__PURE__ */ i("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ b(v, { direction: "column", gap: "24px", children: [
|
|
4055
|
-
|
|
4055
|
+
Gt({
|
|
4056
4056
|
condition: o,
|
|
4057
4057
|
formik: t,
|
|
4058
4058
|
isDecision: !0
|
|
@@ -4100,7 +4100,7 @@ const Ui = (e) => {
|
|
|
4100
4100
|
u.conditionName,
|
|
4101
4101
|
u.howToSetTheCondition === Vr.LIST_OF_VALUES_MULTI
|
|
4102
4102
|
)(g.target.checked),
|
|
4103
|
-
children:
|
|
4103
|
+
children: Gt({ condition: u, formik: t })
|
|
4104
4104
|
},
|
|
4105
4105
|
u.conditionName
|
|
4106
4106
|
);
|
|
@@ -4520,7 +4520,7 @@ const nl = (e) => {
|
|
|
4520
4520
|
}
|
|
4521
4521
|
) }),
|
|
4522
4522
|
/* @__PURE__ */ i(tl, { children: /* @__PURE__ */ i(
|
|
4523
|
-
|
|
4523
|
+
Rt,
|
|
4524
4524
|
{
|
|
4525
4525
|
element: a,
|
|
4526
4526
|
valueData: Ze(
|
|
@@ -4549,7 +4549,7 @@ const nl = (e) => {
|
|
|
4549
4549
|
B,
|
|
4550
4550
|
{
|
|
4551
4551
|
appearance: "danger",
|
|
4552
|
-
icon: /* @__PURE__ */ i(
|
|
4552
|
+
icon: /* @__PURE__ */ i(Yt, {}),
|
|
4553
4553
|
size: "24px",
|
|
4554
4554
|
cursorHover: !0,
|
|
4555
4555
|
onClick: (A) => {
|
|
@@ -4608,7 +4608,7 @@ const nl = (e) => {
|
|
|
4608
4608
|
borderRadius: "8px",
|
|
4609
4609
|
background: !0,
|
|
4610
4610
|
children: /* @__PURE__ */ i(
|
|
4611
|
-
|
|
4611
|
+
Rt,
|
|
4612
4612
|
{
|
|
4613
4613
|
element: {
|
|
4614
4614
|
...A,
|
|
@@ -4632,7 +4632,7 @@ const nl = (e) => {
|
|
|
4632
4632
|
borderRadius: "8px",
|
|
4633
4633
|
background: !0,
|
|
4634
4634
|
children: /* @__PURE__ */ i(
|
|
4635
|
-
|
|
4635
|
+
Rt,
|
|
4636
4636
|
{
|
|
4637
4637
|
element: u.element,
|
|
4638
4638
|
valueData: u.valueData,
|
|
@@ -4650,7 +4650,7 @@ const nl = (e) => {
|
|
|
4650
4650
|
borderRadius: "8px",
|
|
4651
4651
|
background: !0,
|
|
4652
4652
|
children: /* @__PURE__ */ i(
|
|
4653
|
-
|
|
4653
|
+
Rt,
|
|
4654
4654
|
{
|
|
4655
4655
|
element: h.element,
|
|
4656
4656
|
valueData: h.valueData,
|
|
@@ -4674,7 +4674,7 @@ const nl = (e) => {
|
|
|
4674
4674
|
/* @__PURE__ */ i(ba, { animated: !0 })
|
|
4675
4675
|
] })
|
|
4676
4676
|
] });
|
|
4677
|
-
}, Yn = (e) => !e || typeof e != "object" || Array.isArray(e) ? !1 : Object.values(e).some(Array.isArray),
|
|
4677
|
+
}, Yn = (e) => !e || typeof e != "object" || Array.isArray(e) ? !1 : Object.values(e).some(Array.isArray), zt = (e) => {
|
|
4678
4678
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
4679
4679
|
for (const r of e) {
|
|
4680
4680
|
const a = String((r == null ? void 0 : r.conditionName) ?? "");
|
|
@@ -4686,20 +4686,20 @@ const nl = (e) => {
|
|
|
4686
4686
|
if (Yn(e.conditionsThatEstablishesTheDecision)) {
|
|
4687
4687
|
const t = e.conditionsThatEstablishesTheDecision;
|
|
4688
4688
|
return Object.fromEntries(
|
|
4689
|
-
Object.entries(t).map(([n, r]) => [n,
|
|
4689
|
+
Object.entries(t).map(([n, r]) => [n, zt(r)])
|
|
4690
4690
|
);
|
|
4691
4691
|
}
|
|
4692
4692
|
if (Array.isArray(e.conditionGroups)) {
|
|
4693
4693
|
const t = e.conditionGroups.map((n) => [
|
|
4694
4694
|
n.ConditionGroupId,
|
|
4695
|
-
|
|
4695
|
+
zt(
|
|
4696
4696
|
Array.isArray(n.conditionsThatEstablishesTheDecision) ? n.conditionsThatEstablishesTheDecision : []
|
|
4697
4697
|
)
|
|
4698
4698
|
]);
|
|
4699
4699
|
return Object.fromEntries(t);
|
|
4700
4700
|
}
|
|
4701
4701
|
return Yn(e) ? Object.fromEntries(
|
|
4702
|
-
Object.entries(e).map(([t, n]) => [t,
|
|
4702
|
+
Object.entries(e).map(([t, n]) => [t, zt(n)])
|
|
4703
4703
|
) : {};
|
|
4704
4704
|
}, Mr = (e, t) => Object.fromEntries(
|
|
4705
4705
|
Object.entries(e).map(([n, r]) => [n, r.filter(t)])
|
|
@@ -4727,7 +4727,7 @@ const nl = (e) => {
|
|
|
4727
4727
|
default:
|
|
4728
4728
|
return String(n);
|
|
4729
4729
|
}
|
|
4730
|
-
},
|
|
4730
|
+
}, Lt = (e) => {
|
|
4731
4731
|
if (e == null || e === "") return "";
|
|
4732
4732
|
const t = [
|
|
4733
4733
|
"Ene",
|
|
@@ -4798,24 +4798,24 @@ const nl = (e) => {
|
|
|
4798
4798
|
}, [n]) ?? n, f = !!(g != null && g.effectiveFrom), y = !!(g != null && g.validUntil), m = f ? {
|
|
4799
4799
|
element: {
|
|
4800
4800
|
labelName: "Vigencia desde:",
|
|
4801
|
-
value:
|
|
4801
|
+
value: Lt(g.effectiveFrom),
|
|
4802
4802
|
howToSetTheDecision: z.EQUAL,
|
|
4803
4803
|
decisionDataType: q.DATE
|
|
4804
4804
|
},
|
|
4805
4805
|
valueData: Ze({
|
|
4806
|
-
value:
|
|
4806
|
+
value: Lt(g.effectiveFrom),
|
|
4807
4807
|
howToSetTheDecision: z.EQUAL,
|
|
4808
4808
|
decisionDataType: q.DATE
|
|
4809
4809
|
})
|
|
4810
4810
|
} : null, T = y ? {
|
|
4811
4811
|
element: {
|
|
4812
4812
|
labelName: "Vigencia hasta:",
|
|
4813
|
-
value:
|
|
4813
|
+
value: Lt(g.validUntil),
|
|
4814
4814
|
howToSetTheDecision: z.EQUAL,
|
|
4815
4815
|
decisionDataType: q.DATE
|
|
4816
4816
|
},
|
|
4817
4817
|
valueData: Ze({
|
|
4818
|
-
value:
|
|
4818
|
+
value: Lt(g.validUntil),
|
|
4819
4819
|
howToSetTheDecision: z.EQUAL,
|
|
4820
4820
|
decisionDataType: q.DATE
|
|
4821
4821
|
})
|
|
@@ -4924,7 +4924,7 @@ const nl = (e) => {
|
|
|
4924
4924
|
};
|
|
4925
4925
|
}), [Ve, Ye] = U.useState(
|
|
4926
4926
|
((ct = De[0]) == null ? void 0 : ct.id) ?? "mainCondition"
|
|
4927
|
-
), _e = (I) => Ye(I), je = M[Ve] ?? L[0] ?? "group-primary", Q = re[je] ?? [], W = L.length > 1, ee = Array.from({ length: 5 }),
|
|
4927
|
+
), _e = (I) => Ye(I), je = M[Ve] ?? L[0] ?? "group-primary", Q = re[je] ?? [], W = L.length > 1, ee = Array.from({ length: 5 }), At = !!(!r && g && A), it = Q.length < 2 ? "start" : "space-between", lt = `N° ${String((a ?? 0) + 1).padStart(2, "0")}`;
|
|
4928
4928
|
return /* @__PURE__ */ i(
|
|
4929
4929
|
nl,
|
|
4930
4930
|
{
|
|
@@ -4932,7 +4932,7 @@ const nl = (e) => {
|
|
|
4932
4932
|
controls: d,
|
|
4933
4933
|
decision: g,
|
|
4934
4934
|
decisionMapper: A,
|
|
4935
|
-
loading:
|
|
4935
|
+
loading: At,
|
|
4936
4936
|
skeleton: ee,
|
|
4937
4937
|
tagLabel: lt,
|
|
4938
4938
|
isOpen: o,
|
|
@@ -5055,7 +5055,7 @@ const ll = $.div`
|
|
|
5055
5055
|
editionMode: d,
|
|
5056
5056
|
withEditOption: p
|
|
5057
5057
|
} = e;
|
|
5058
|
-
return n ? /* @__PURE__ */ i(
|
|
5058
|
+
return n ? /* @__PURE__ */ i(Et, { children: /* @__PURE__ */ i(v, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
|
|
5059
5059
|
_r,
|
|
5060
5060
|
{
|
|
5061
5061
|
id: n.decisionId,
|
|
@@ -5172,7 +5172,7 @@ const ll = $.div`
|
|
|
5172
5172
|
throw new Error(
|
|
5173
5173
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
5174
5174
|
);
|
|
5175
|
-
return
|
|
5175
|
+
return Dt(
|
|
5176
5176
|
/* @__PURE__ */ i(zr, { children: /* @__PURE__ */ i(xt, { children: /* @__PURE__ */ i(hl, { $size: s, children: /* @__PURE__ */ b(v, { direction: "column", gap: "24px", children: [
|
|
5177
5177
|
/* @__PURE__ */ b(v, { direction: "column", gap: "24px", children: [
|
|
5178
5178
|
/* @__PURE__ */ b(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
@@ -5222,13 +5222,13 @@ const ll = $.div`
|
|
|
5222
5222
|
) : typeof t == "string"
|
|
5223
5223
|
),
|
|
5224
5224
|
value: e
|
|
5225
|
-
}),
|
|
5225
|
+
}), Ft = "Por favor escribe un valor", Xn = "Por favor escribe un valor mayor o igual que 0", Jn = "El valor desde no puede ser mayor que el valor hasta", Zn = (e, t) => {
|
|
5226
5226
|
if (t !== "")
|
|
5227
5227
|
return e;
|
|
5228
5228
|
}, bl = (e) => ({
|
|
5229
5229
|
schema: ne({
|
|
5230
|
-
from: $e().transform(Zn).typeError(
|
|
5231
|
-
to: $e().transform(Zn).typeError(
|
|
5230
|
+
from: $e().transform(Zn).typeError(Ft).required(Ft).min(0, Xn),
|
|
5231
|
+
to: $e().transform(Zn).typeError(Ft).required(Ft).min(0, Xn)
|
|
5232
5232
|
}).test("from<=to", Jn, function(t) {
|
|
5233
5233
|
const n = t == null ? void 0 : t.from, r = t == null ? void 0 : t.to;
|
|
5234
5234
|
return n === void 0 || r === void 0 ? !0 : n > r ? this.createError({
|
|
@@ -5237,7 +5237,7 @@ const ll = $.div`
|
|
|
5237
5237
|
}) : !0;
|
|
5238
5238
|
}),
|
|
5239
5239
|
value: { from: e == null ? void 0 : e.from, to: e == null ? void 0 : e.to }
|
|
5240
|
-
}),
|
|
5240
|
+
}), Vt = "Por favor escribe un valor", Kn = "Por favor escribe un valor mayor o igual que 0", er = "El valor desde no puede ser mayor que el valor hasta", tr = (e, t) => {
|
|
5241
5241
|
if (t !== "")
|
|
5242
5242
|
return e;
|
|
5243
5243
|
}, yl = ({
|
|
@@ -5245,8 +5245,8 @@ const ll = $.div`
|
|
|
5245
5245
|
max: t,
|
|
5246
5246
|
pathPrefix: n = ""
|
|
5247
5247
|
} = {}) => ne({
|
|
5248
|
-
from: $e().transform(tr).typeError(
|
|
5249
|
-
to: $e().transform(tr).typeError(
|
|
5248
|
+
from: $e().transform(tr).typeError(Vt).required(Vt).min(e, Kn).max(t ?? Number.POSITIVE_INFINITY),
|
|
5249
|
+
to: $e().transform(tr).typeError(Vt).required(Vt).min(e, Kn).max(t ?? Number.POSITIVE_INFINITY)
|
|
5250
5250
|
}).test("from<=to", er, function(r) {
|
|
5251
5251
|
const a = r == null ? void 0 : r.from, o = r == null ? void 0 : r.to;
|
|
5252
5252
|
if (a === void 0 || o === void 0) return !0;
|
|
@@ -5584,7 +5584,7 @@ const xl = $.div`
|
|
|
5584
5584
|
withTerm: T,
|
|
5585
5585
|
decisionNumber: S
|
|
5586
5586
|
} = e;
|
|
5587
|
-
return
|
|
5587
|
+
return /* @__PURE__ */ b(j, { children: [
|
|
5588
5588
|
/* @__PURE__ */ i("form", { onSubmit: r.handleSubmit, autoComplete: "off", children: /* @__PURE__ */ b(v, { direction: "column", gap: "24px", width: "100%", children: [
|
|
5589
5589
|
/* @__PURE__ */ i(Qe, { legend: `Decisión N° ${S}`, spacing: "wide", children: /* @__PURE__ */ b(v, { direction: "column", width: "100%", gap: "16px", children: [
|
|
5590
5590
|
/* @__PURE__ */ b(
|
|
@@ -5667,7 +5667,7 @@ const xl = $.div`
|
|
|
5667
5667
|
/* @__PURE__ */ i(
|
|
5668
5668
|
B,
|
|
5669
5669
|
{
|
|
5670
|
-
icon: /* @__PURE__ */ i(
|
|
5670
|
+
icon: /* @__PURE__ */ i(Yt, {}),
|
|
5671
5671
|
appearance: "danger",
|
|
5672
5672
|
cursorHover: !0,
|
|
5673
5673
|
onClick: () => s(C)
|
|
@@ -5868,12 +5868,12 @@ const ut = (e) => {
|
|
|
5868
5868
|
const ae = _[be] || [], ve = Object.keys(ye).map((Ne) => {
|
|
5869
5869
|
const J = ye[Ne], ue = ae.find((ta) => ta.conditionName === Ne) || {}, Zt = ut(
|
|
5870
5870
|
ue.howToSetTheCondition ?? (J == null ? void 0 : J.howToSetTheCondition)
|
|
5871
|
-
),
|
|
5871
|
+
), $t = ue.value ?? pt(Zt), kt = J && typeof J == "object" && "value" in J ? J.value : J;
|
|
5872
5872
|
return {
|
|
5873
5873
|
...ue,
|
|
5874
5874
|
...typeof J == "object" && !Array.isArray(J) ? J : {},
|
|
5875
5875
|
conditionName: Ne,
|
|
5876
|
-
value:
|
|
5876
|
+
value: kt !== void 0 ? kt : $t
|
|
5877
5877
|
};
|
|
5878
5878
|
});
|
|
5879
5879
|
return {
|
|
@@ -5902,7 +5902,7 @@ const ut = (e) => {
|
|
|
5902
5902
|
d.values,
|
|
5903
5903
|
w,
|
|
5904
5904
|
X.conditionName
|
|
5905
|
-
),
|
|
5905
|
+
), $t = ue !== void 0 ? ue : Zt, kt = $t !== void 0 ? $t : pt(ae);
|
|
5906
5906
|
return {
|
|
5907
5907
|
...X,
|
|
5908
5908
|
__originalConditionName: X.conditionName,
|
|
@@ -5913,7 +5913,7 @@ const ut = (e) => {
|
|
|
5913
5913
|
groupKey: w,
|
|
5914
5914
|
labelName: ve,
|
|
5915
5915
|
__unitAfterInput: Ne,
|
|
5916
|
-
value:
|
|
5916
|
+
value: kt
|
|
5917
5917
|
};
|
|
5918
5918
|
});
|
|
5919
5919
|
return [w, P];
|
|
@@ -6042,30 +6042,29 @@ const ut = (e) => {
|
|
|
6042
6042
|
min-height: auto;
|
|
6043
6043
|
}
|
|
6044
6044
|
`, Ul = (e) => {
|
|
6045
|
-
const { options: t } = e, [n, r] = Y([]);
|
|
6045
|
+
const { options: t } = e, [n, r] = Y([]), a = Ct(() => t.filter((p) => p.value === "true"), [t]);
|
|
6046
6046
|
Pe(() => {
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
return h ? [...p, h] : p;
|
|
6047
|
+
r(a);
|
|
6048
|
+
}, [a]);
|
|
6049
|
+
const o = (p) => {
|
|
6050
|
+
r((u) => {
|
|
6051
|
+
if (u.some((f) => f.id === p))
|
|
6052
|
+
return u.filter((f) => f.id !== p);
|
|
6053
|
+
const g = t.find((f) => f.id === p);
|
|
6054
|
+
return g ? [...u, g] : u;
|
|
6056
6055
|
});
|
|
6057
|
-
}, o = () => {
|
|
6058
|
-
r([]);
|
|
6059
6056
|
}, s = () => {
|
|
6057
|
+
r([]);
|
|
6058
|
+
}, c = () => {
|
|
6060
6059
|
r(t);
|
|
6061
|
-
},
|
|
6060
|
+
}, l = n.length === 0, d = n.length === t.length;
|
|
6062
6061
|
return {
|
|
6063
|
-
onToggleAllConditions:
|
|
6064
|
-
isAllConditionsChecked:
|
|
6065
|
-
isAnyConditionChecked:
|
|
6066
|
-
onToggleAnyCondition:
|
|
6062
|
+
onToggleAllConditions: c,
|
|
6063
|
+
isAllConditionsChecked: d,
|
|
6064
|
+
isAnyConditionChecked: l,
|
|
6065
|
+
onToggleAnyCondition: s,
|
|
6067
6066
|
checkedItems: n,
|
|
6068
|
-
handleCheckboxChange:
|
|
6067
|
+
handleCheckboxChange: o
|
|
6069
6068
|
};
|
|
6070
6069
|
}, jl = (e) => {
|
|
6071
6070
|
const { options: t, portalId: n, onCloseModal: r, onOpenRulesModal: a } = e, o = document.getElementById(n);
|
|
@@ -6081,7 +6080,7 @@ const ut = (e) => {
|
|
|
6081
6080
|
checkedItems: p,
|
|
6082
6081
|
handleCheckboxChange: u
|
|
6083
6082
|
} = Ul({ options: t });
|
|
6084
|
-
return
|
|
6083
|
+
return Dt(
|
|
6085
6084
|
/* @__PURE__ */ i(zr, { children: /* @__PURE__ */ i(xt, { children: /* @__PURE__ */ i(Pl, { children: /* @__PURE__ */ b(v, { direction: "column", gap: "24px", children: [
|
|
6086
6085
|
/* @__PURE__ */ b(v, { direction: "column", gap: "24px", children: [
|
|
6087
6086
|
/* @__PURE__ */ b(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
@@ -7078,7 +7077,7 @@ const os = $.div`
|
|
|
7078
7077
|
termEndStatus: p
|
|
7079
7078
|
} = e;
|
|
7080
7079
|
return /* @__PURE__ */ i("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ b(v, { direction: "column", gap: "24px", children: [
|
|
7081
|
-
|
|
7080
|
+
Gt({
|
|
7082
7081
|
condition: o,
|
|
7083
7082
|
formik: t,
|
|
7084
7083
|
isDecision: !0
|
|
@@ -7124,7 +7123,7 @@ const os = $.div`
|
|
|
7124
7123
|
u.conditionName,
|
|
7125
7124
|
u.howToSetTheCondition === F.LIST_OF_VALUES_MULTI
|
|
7126
7125
|
)(h.target.checked),
|
|
7127
|
-
children:
|
|
7126
|
+
children: Gt({ condition: u, formik: t })
|
|
7128
7127
|
},
|
|
7129
7128
|
u.conditionName
|
|
7130
7129
|
)) })
|
|
@@ -7699,7 +7698,7 @@ function $s({
|
|
|
7699
7698
|
}) {
|
|
7700
7699
|
var l, d, p;
|
|
7701
7700
|
if (!Ln) return;
|
|
7702
|
-
dr || (dr =
|
|
7701
|
+
dr || (dr = Ht(document, {
|
|
7703
7702
|
dragover: Es,
|
|
7704
7703
|
pointerdown: xs,
|
|
7705
7704
|
pointerup: Cs,
|
|
@@ -7859,7 +7858,7 @@ function Xe(e, t, n) {
|
|
|
7859
7858
|
s !== -1 && n.selectedState.nodes.splice(s, 1);
|
|
7860
7859
|
}
|
|
7861
7860
|
}
|
|
7862
|
-
function
|
|
7861
|
+
function _t(e, t, n, r, a = !1) {
|
|
7863
7862
|
r.pointerSelection = a;
|
|
7864
7863
|
for (const o of t)
|
|
7865
7864
|
o.el.setAttribute("aria-selected", "true"), tt([o.el], e.data.config.selectedClass, !0);
|
|
@@ -7928,17 +7927,17 @@ function me(e) {
|
|
|
7928
7927
|
return "synthDragging" in e && !!e.synthDragging;
|
|
7929
7928
|
}
|
|
7930
7929
|
function Ls(e, t) {
|
|
7931
|
-
t.abortControllers.mainParent =
|
|
7932
|
-
dragover:
|
|
7930
|
+
t.abortControllers.mainParent = Ht(e, {
|
|
7931
|
+
dragover: Mt(t.config.handleParentDragover),
|
|
7933
7932
|
handleParentPointerover: t.config.handleParentPointerover,
|
|
7934
|
-
scroll:
|
|
7935
|
-
drop:
|
|
7933
|
+
scroll: Mt(t.config.handleParentScroll),
|
|
7934
|
+
drop: Mt(t.config.handleParentDrop),
|
|
7936
7935
|
hasNestedParent: (n) => {
|
|
7937
7936
|
const r = oe.get(n.target);
|
|
7938
7937
|
r && (r.nestedParent = n.detail.parent);
|
|
7939
7938
|
},
|
|
7940
|
-
focus:
|
|
7941
|
-
}), t.config.externalDragHandle && t.config.externalDragHandle.el && t.config.externalDragHandle.callback && (t.abortControllers.externalDragHandle =
|
|
7939
|
+
focus: Mt(t.config.handleParentFocus)
|
|
7940
|
+
}), t.config.externalDragHandle && t.config.externalDragHandle.el && t.config.externalDragHandle.callback && (t.abortControllers.externalDragHandle = Ht(
|
|
7942
7941
|
t.config.externalDragHandle.el,
|
|
7943
7942
|
{
|
|
7944
7943
|
pointerdown: (n) => {
|
|
@@ -7974,7 +7973,7 @@ function Ls(e, t) {
|
|
|
7974
7973
|
function Fs(e) {
|
|
7975
7974
|
var n;
|
|
7976
7975
|
const t = e.parent.data.config;
|
|
7977
|
-
e.node.data.abortControllers.mainNode =
|
|
7976
|
+
e.node.data.abortControllers.mainNode = Ht(e.node.el, {
|
|
7978
7977
|
keydown: pe(t.handleNodeKeydown),
|
|
7979
7978
|
dragstart: pe(t.handleDragstart),
|
|
7980
7979
|
dragover: pe(t.handleNodeDragover),
|
|
@@ -8195,7 +8194,7 @@ function Hs(e, t) {
|
|
|
8195
8194
|
(p) => p.el === s.el
|
|
8196
8195
|
) === -1 ? r = [...t.selectedState.nodes, s] : r = t.selectedState.nodes.filter(
|
|
8197
8196
|
(p) => p.el !== s.el
|
|
8198
|
-
) : r = [s],
|
|
8197
|
+
) : r = [s], _t(
|
|
8199
8198
|
e.targetData.parent,
|
|
8200
8199
|
r,
|
|
8201
8200
|
e.targetData.node,
|
|
@@ -8224,7 +8223,7 @@ function Hs(e, t) {
|
|
|
8224
8223
|
else
|
|
8225
8224
|
for (let p = 0; p <= s.data.index; p++)
|
|
8226
8225
|
r.push(d[p]);
|
|
8227
|
-
|
|
8226
|
+
_t(
|
|
8228
8227
|
e.targetData.parent,
|
|
8229
8228
|
r,
|
|
8230
8229
|
e.targetData.node,
|
|
@@ -8235,13 +8234,13 @@ function Hs(e, t) {
|
|
|
8235
8234
|
}
|
|
8236
8235
|
(l = (c = t.selectedState) == null ? void 0 : c.nodes) != null && l.length ? t.selectedState.nodes.findIndex(
|
|
8237
8236
|
(p) => p.el === e.targetData.node.el
|
|
8238
|
-
) === -1 && (t.selectedState.parent.el !== e.targetData.parent.el ? Xe(t.selectedState.nodes, e.targetData.parent, t) : n.config.multiDrag && Yr() ? r.push(...t.selectedState.nodes) : Xe(t.selectedState.nodes, e.targetData.parent, t),
|
|
8237
|
+
) === -1 && (t.selectedState.parent.el !== e.targetData.parent.el ? Xe(t.selectedState.nodes, e.targetData.parent, t) : n.config.multiDrag && Yr() ? r.push(...t.selectedState.nodes) : Xe(t.selectedState.nodes, e.targetData.parent, t), _t(
|
|
8239
8238
|
e.targetData.parent,
|
|
8240
8239
|
r,
|
|
8241
8240
|
e.targetData.node,
|
|
8242
8241
|
t,
|
|
8243
8242
|
!0
|
|
8244
|
-
)) :
|
|
8243
|
+
)) : _t(
|
|
8245
8244
|
e.targetData.parent,
|
|
8246
8245
|
[e.targetData.node],
|
|
8247
8246
|
e.targetData.node,
|
|
@@ -8672,7 +8671,7 @@ function Qt(e, t) {
|
|
|
8672
8671
|
targetNodes: "node" in e.targetData ? [e.targetData.node] : []
|
|
8673
8672
|
}), t.currentParent = e.targetData.parent, t.transferred = !0);
|
|
8674
8673
|
}
|
|
8675
|
-
function
|
|
8674
|
+
function Mt(e) {
|
|
8676
8675
|
function t(n) {
|
|
8677
8676
|
const r = oe.get(n);
|
|
8678
8677
|
if (r)
|
|
@@ -8848,7 +8847,7 @@ function gd(e) {
|
|
|
8848
8847
|
function Jt(e) {
|
|
8849
8848
|
return e instanceof HTMLElement && e.parentNode instanceof HTMLElement;
|
|
8850
8849
|
}
|
|
8851
|
-
function
|
|
8850
|
+
function Ht(e, t) {
|
|
8852
8851
|
const n = new AbortController();
|
|
8853
8852
|
for (const r in t) {
|
|
8854
8853
|
const a = t[r];
|
|
@@ -8870,18 +8869,18 @@ function md(e, t) {
|
|
|
8870
8869
|
const n = fd(e);
|
|
8871
8870
|
n && t(n);
|
|
8872
8871
|
}
|
|
8873
|
-
var
|
|
8872
|
+
var qt = /* @__PURE__ */ new WeakMap();
|
|
8874
8873
|
function bd(e) {
|
|
8875
|
-
const t =
|
|
8874
|
+
const t = qt.get(e);
|
|
8876
8875
|
return t ? t[0] : (console.warn("No values found for parent element"), []);
|
|
8877
8876
|
}
|
|
8878
8877
|
function yd(e, t) {
|
|
8879
|
-
const n =
|
|
8880
|
-
n && n[1](e),
|
|
8878
|
+
const n = qt.get(t);
|
|
8879
|
+
n && n[1](e), qt.set(t, [e, n[1]]);
|
|
8881
8880
|
}
|
|
8882
8881
|
function vd(e, t) {
|
|
8883
8882
|
return (n) => {
|
|
8884
|
-
|
|
8883
|
+
qt.set(n, t), $s({ parent: n, getValues: bd, setValues: yd, config: e });
|
|
8885
8884
|
};
|
|
8886
8885
|
}
|
|
8887
8886
|
function hr(e) {
|
|
@@ -9164,7 +9163,7 @@ const gr = {
|
|
|
9164
9163
|
);
|
|
9165
9164
|
}, Dd = (e) => Object.entries(e).map(([t, n]) => ({
|
|
9166
9165
|
ConditionGroupId: t,
|
|
9167
|
-
conditionsThatEstablishesTheDecision:
|
|
9166
|
+
conditionsThatEstablishesTheDecision: zt(n)
|
|
9168
9167
|
})), Vc = (e) => {
|
|
9169
9168
|
const t = Me(e);
|
|
9170
9169
|
return {
|
|
@@ -10082,10 +10081,10 @@ function ac(e) {
|
|
|
10082
10081
|
}) };
|
|
10083
10082
|
}
|
|
10084
10083
|
function oc(e, t) {
|
|
10085
|
-
return
|
|
10084
|
+
return Ct(() => t ?? ac(e), [t, e]);
|
|
10086
10085
|
}
|
|
10087
10086
|
function _c(e) {
|
|
10088
|
-
const { data: t, isMobile: n, isTablet: r, onBackStep: a, schema: o } = e, s = oc(t, o), c = { data: t, isMobile: n, isTablet: r }, l =
|
|
10087
|
+
const { data: t, isMobile: n, isTablet: r, onBackStep: a, schema: o } = e, s = oc(t, o), c = { data: t, isMobile: n, isTablet: r }, l = Ct(() => Kd(vr), []), d = s.steps.map((p) => {
|
|
10089
10088
|
const u = p.nodes.map((h) => vr(h, c, l)).filter((h) => h != null && h !== !1);
|
|
10090
10089
|
return {
|
|
10091
10090
|
...p,
|
|
@@ -10117,7 +10116,7 @@ function _c(e) {
|
|
|
10117
10116
|
}
|
|
10118
10117
|
export {
|
|
10119
10118
|
Rc as BackAndNextButton,
|
|
10120
|
-
|
|
10119
|
+
Nt as BusinessRuleCard,
|
|
10121
10120
|
_r as BusinessRuleCardNew,
|
|
10122
10121
|
Rn as BusinessRuleView,
|
|
10123
10122
|
Pr as BusinessRuleViewNew,
|
|
@@ -10125,16 +10124,16 @@ export {
|
|
|
10125
10124
|
wc as BusinessRulesNew,
|
|
10126
10125
|
Tc as BusinessRulesWithGroup,
|
|
10127
10126
|
Rr as Checkpicker,
|
|
10128
|
-
|
|
10127
|
+
Gt as DecisionConditionRender,
|
|
10129
10128
|
Un as DecisionConditionRenderNew,
|
|
10130
10129
|
et as DecisionViewConditionRenderer,
|
|
10131
|
-
|
|
10130
|
+
Rt as DecisionViewConditionRendererNew,
|
|
10132
10131
|
Ic as DragAndDropBoxes,
|
|
10133
10132
|
fr as DraggableList,
|
|
10134
10133
|
bs as DropdownMenu,
|
|
10135
10134
|
kc as DropdownMenuContainer,
|
|
10136
10135
|
kr as DynamicField,
|
|
10137
|
-
|
|
10136
|
+
Bt as DynamicFieldNew,
|
|
10138
10137
|
$o as DynamicViewField,
|
|
10139
10138
|
Po as DynamicViewFieldNew,
|
|
10140
10139
|
We as EFieldType,
|
|
@@ -10168,8 +10167,8 @@ export {
|
|
|
10168
10167
|
Dd as groupsRecordToArrayNew,
|
|
10169
10168
|
Fc as mapByGroupNew,
|
|
10170
10169
|
Vc as normalizeDecisionToNewShape,
|
|
10171
|
-
|
|
10172
|
-
|
|
10170
|
+
Ut as parseCurrencyString,
|
|
10171
|
+
jt as parsePercentageString,
|
|
10173
10172
|
Dc as parseRangeFromString,
|
|
10174
10173
|
Ea as percentageFormat,
|
|
10175
10174
|
Nc as revertSortedDataSampleSwitchPlaces,
|