@isettingkit/business-rules 3.2.3 → 3.2.4
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 +166 -161
- package/package.json +1 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -263,7 +263,7 @@ declare interface IBusinessRules_3 {
|
|
|
263
263
|
selectedDecision: IRuleDecisionNew | null;
|
|
264
264
|
loading: boolean;
|
|
265
265
|
configureDecisionModal: boolean;
|
|
266
|
-
handleOpenModal?: () => void;
|
|
266
|
+
handleOpenModal?: (decision?: IRuleDecisionNew) => void;
|
|
267
267
|
handleCloseModal?: () => void;
|
|
268
268
|
handleSubmitForm?: (dataDecision: IRuleDecisionNew) => void;
|
|
269
269
|
handleOpenRulesModal?: (checkedItems?: IOption[], decision?: IRuleDecisionNew | null) => void;
|
package/dist/index.es.js
CHANGED
|
@@ -2,10 +2,10 @@ import { jsx as i, jsxs as b, Fragment as j } from "react/jsx-runtime";
|
|
|
2
2
|
import { MdOutlineDelete as qt, 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 Yt, useRef as Ke, useEffect as
|
|
5
|
+
import U, { useState as Y, forwardRef as va, useContext as En, useMemo as Yt, useRef as Ke, useEffect as Pe, useCallback as Ta } from "react";
|
|
6
6
|
import { createPortal as Ct } from "react-dom";
|
|
7
7
|
import { useFormik as An } from "formik";
|
|
8
|
-
import { string as Re, mixed as
|
|
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";
|
|
10
10
|
import xa from "axios";
|
|
11
11
|
import { franc as Ca } from "franc-min";
|
|
@@ -119,7 +119,7 @@ const Dt = (e) => {
|
|
|
119
119
|
number: (e) => e,
|
|
120
120
|
alphabetical: (e) => e,
|
|
121
121
|
date: (e) => e
|
|
122
|
-
},
|
|
122
|
+
}, Ue = (e, t) => (Aa[t] || ((r) => r))(e), Pn = {
|
|
123
123
|
render: ({
|
|
124
124
|
name: e,
|
|
125
125
|
label: t,
|
|
@@ -1284,7 +1284,7 @@ const lo = (e) => {
|
|
|
1284
1284
|
)
|
|
1285
1285
|
] });
|
|
1286
1286
|
}, so = va((e, t) => {
|
|
1287
|
-
var _e,
|
|
1287
|
+
var _e, je;
|
|
1288
1288
|
const {
|
|
1289
1289
|
displayList: n,
|
|
1290
1290
|
disabled: r,
|
|
@@ -1308,13 +1308,13 @@ const lo = (e) => {
|
|
|
1308
1308
|
clearable: N,
|
|
1309
1309
|
onKeyUp: A,
|
|
1310
1310
|
onBlur: O,
|
|
1311
|
-
onChange:
|
|
1311
|
+
onChange: V,
|
|
1312
1312
|
onClick: G,
|
|
1313
1313
|
onFocus: te,
|
|
1314
1314
|
onOptionClick: ie,
|
|
1315
1315
|
onCheckboxChange: ce,
|
|
1316
1316
|
handleClear: re
|
|
1317
|
-
} = e,
|
|
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 = Yt(
|
|
1318
1318
|
() => h.filter((Q) => E.includes(Q.id)),
|
|
1319
1319
|
[h, E]
|
|
1320
1320
|
), Ye = (Q, W) => {
|
|
@@ -1373,7 +1373,7 @@ const lo = (e) => {
|
|
|
1373
1373
|
readOnly: !C,
|
|
1374
1374
|
onFocus: te,
|
|
1375
1375
|
onBlur: O,
|
|
1376
|
-
onChange: (Q) =>
|
|
1376
|
+
onChange: (Q) => V(u, Q.target.value),
|
|
1377
1377
|
onClick: C ? G : void 0,
|
|
1378
1378
|
onKeyUp: A
|
|
1379
1379
|
}
|
|
@@ -1469,8 +1469,8 @@ const lo = (e) => {
|
|
|
1469
1469
|
showChevron: N = !0,
|
|
1470
1470
|
editable: A = !1,
|
|
1471
1471
|
clearable: O = !0
|
|
1472
|
-
} = e, [
|
|
1473
|
-
|
|
1472
|
+
} = e, [V, G] = Y(!1), [te, ie] = Y(!1), [ce, re] = Y([]), L = Ke(null);
|
|
1473
|
+
Pe(() => {
|
|
1474
1474
|
if (C) {
|
|
1475
1475
|
const W = S ? S.split(",").map((ee) => ee.trim()) : [];
|
|
1476
1476
|
re(W);
|
|
@@ -1481,7 +1481,7 @@ const lo = (e) => {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
function Ce(W) {
|
|
1483
1483
|
if (!t) {
|
|
1484
|
-
G(!
|
|
1484
|
+
G(!V);
|
|
1485
1485
|
try {
|
|
1486
1486
|
u && u(W);
|
|
1487
1487
|
} catch (ee) {
|
|
@@ -1490,7 +1490,7 @@ const lo = (e) => {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
1492
|
const De = Ta((W) => {
|
|
1493
|
-
|
|
1493
|
+
L.current && W.target && !L.current.contains(W.target) && G(!1);
|
|
1494
1494
|
}, []);
|
|
1495
1495
|
function Ve(W) {
|
|
1496
1496
|
try {
|
|
@@ -1508,30 +1508,30 @@ const lo = (e) => {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
1510
|
function _e(W) {
|
|
1511
|
-
W.key === "Escape" && G(!1), G(!
|
|
1511
|
+
W.key === "Escape" && G(!1), G(!V);
|
|
1512
1512
|
try {
|
|
1513
1513
|
g && g(W);
|
|
1514
1514
|
} catch (ee) {
|
|
1515
1515
|
console.error(`Error when clicking over select. ${ee}`);
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function je(W) {
|
|
1519
1519
|
const { value: ee, checked: Et } = W.target;
|
|
1520
1520
|
re((it) => {
|
|
1521
1521
|
const lt = Et ? [...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
1528
|
const Q = Yt(() => O || C ? f : [{ id: "empty-option", label: "", value: "" }, ...f], [f, O, C]);
|
|
1529
1529
|
return /* @__PURE__ */ i(
|
|
1530
1530
|
so,
|
|
1531
1531
|
{
|
|
1532
|
-
ref:
|
|
1532
|
+
ref: L,
|
|
1533
1533
|
disabled: t,
|
|
1534
|
-
displayList:
|
|
1534
|
+
displayList: V || E,
|
|
1535
1535
|
focused: te,
|
|
1536
1536
|
fullwidth: n,
|
|
1537
1537
|
id: r,
|
|
@@ -1557,7 +1557,7 @@ const lo = (e) => {
|
|
|
1557
1557
|
onFocus: Ve,
|
|
1558
1558
|
onOptionClick: Ye,
|
|
1559
1559
|
onKeyUp: _e,
|
|
1560
|
-
onCheckboxChange:
|
|
1560
|
+
onCheckboxChange: je
|
|
1561
1561
|
}
|
|
1562
1562
|
);
|
|
1563
1563
|
}, Rr = (e) => {
|
|
@@ -1649,33 +1649,33 @@ const lo = (e) => {
|
|
|
1649
1649
|
listOfPossibleValues: T,
|
|
1650
1650
|
placeholderFrom: S,
|
|
1651
1651
|
placeholderTo: E
|
|
1652
|
-
} = e, [C, N] = Y(l), [A, O] = Y(d),
|
|
1652
|
+
} = e, [C, N] = Y(l), [A, O] = Y(d), V = (L) => {
|
|
1653
1653
|
let M;
|
|
1654
1654
|
if (o === q.MONETARY)
|
|
1655
|
-
M = zt(String(
|
|
1655
|
+
M = zt(String(L));
|
|
1656
1656
|
else if (o === "date")
|
|
1657
|
-
M =
|
|
1657
|
+
M = L instanceof Date ? L : new Date(String(L));
|
|
1658
1658
|
else if (o === "percentage") {
|
|
1659
|
-
const Ce = Ut(String(
|
|
1660
|
-
N(String(
|
|
1659
|
+
const Ce = Ut(String(L));
|
|
1660
|
+
N(String(L)), n(Ce);
|
|
1661
1661
|
return;
|
|
1662
|
-
} else o === "number" ? M = Number(
|
|
1662
|
+
} else o === "number" ? M = Number(L) : M = String(L);
|
|
1663
1663
|
N(M), n(M);
|
|
1664
|
-
}, G = (
|
|
1664
|
+
}, G = (L) => {
|
|
1665
1665
|
let M;
|
|
1666
1666
|
if (o === q.MONETARY)
|
|
1667
|
-
M = zt(String(
|
|
1667
|
+
M = zt(String(L));
|
|
1668
1668
|
else if (o === "date")
|
|
1669
|
-
M =
|
|
1669
|
+
M = L instanceof Date ? L : new Date(String(L));
|
|
1670
1670
|
else if (o === "percentage") {
|
|
1671
|
-
const Ce = Ut(String(
|
|
1672
|
-
O(String(
|
|
1671
|
+
const Ce = Ut(String(L));
|
|
1672
|
+
O(String(L)), r(Ce);
|
|
1673
1673
|
return;
|
|
1674
|
-
} else o === "number" ? M = Number(
|
|
1674
|
+
} else o === "number" ? M = Number(L) : M = String(L);
|
|
1675
1675
|
O(M), r(M);
|
|
1676
|
-
}, te = (
|
|
1677
|
-
|
|
1678
|
-
}, ie = (
|
|
1676
|
+
}, te = (L, M) => {
|
|
1677
|
+
L === `${a}SelectFrom` && (N(M), n(M)), L === `${a}SelectTo` && (O(M), r(M));
|
|
1678
|
+
}, ie = (L, M) => M === "date" && L instanceof Date ? L.toISOString().split("T")[0] : typeof L == "number" ? L : L ?? "", ce = y ?? f, re = m ?? f;
|
|
1679
1679
|
return /* @__PURE__ */ b(
|
|
1680
1680
|
v,
|
|
1681
1681
|
{
|
|
@@ -1734,8 +1734,8 @@ const lo = (e) => {
|
|
|
1734
1734
|
placeholder: S,
|
|
1735
1735
|
value: ie(C, o),
|
|
1736
1736
|
required: c,
|
|
1737
|
-
onChange: (
|
|
1738
|
-
|
|
1737
|
+
onChange: (L, M) => {
|
|
1738
|
+
V(M);
|
|
1739
1739
|
},
|
|
1740
1740
|
messageValidate: p,
|
|
1741
1741
|
statusValidate: h,
|
|
@@ -1784,7 +1784,7 @@ const lo = (e) => {
|
|
|
1784
1784
|
placeholder: E,
|
|
1785
1785
|
value: ie(A, o),
|
|
1786
1786
|
required: c,
|
|
1787
|
-
onChange: (
|
|
1787
|
+
onChange: (L, M) => {
|
|
1788
1788
|
G(M);
|
|
1789
1789
|
},
|
|
1790
1790
|
messageValidate: u,
|
|
@@ -2118,14 +2118,14 @@ const lo = (e) => {
|
|
|
2118
2118
|
from: e.from ?? "",
|
|
2119
2119
|
to: e.to ?? ""
|
|
2120
2120
|
}), Do = (e) => e.value, No = (e) => e.value, Eo = (e) => e.value;
|
|
2121
|
-
var
|
|
2121
|
+
var F = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(F || {});
|
|
2122
2122
|
const Ao = {
|
|
2123
|
-
[
|
|
2124
|
-
[
|
|
2125
|
-
[
|
|
2126
|
-
[
|
|
2127
|
-
[
|
|
2128
|
-
[
|
|
2123
|
+
[F.LIST_OF_VALUES]: So,
|
|
2124
|
+
[F.LIST_OF_VALUES_MULTI]: xo,
|
|
2125
|
+
[F.RANGE]: Co,
|
|
2126
|
+
[F.GREATER_THAN]: Do,
|
|
2127
|
+
[F.LESS_THAN]: No,
|
|
2128
|
+
[F.EQUAL]: Eo
|
|
2129
2129
|
}, gt = (e) => {
|
|
2130
2130
|
const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = Ao[e == null ? void 0 : e.howToSetTheDecision] || wo;
|
|
2131
2131
|
return n && r(t) || t || void 0;
|
|
@@ -2175,7 +2175,7 @@ const Ao = {
|
|
|
2175
2175
|
children: t
|
|
2176
2176
|
}
|
|
2177
2177
|
),
|
|
2178
|
-
n === "condition" ? /* @__PURE__ */ i(D, { type: "body", size: "medium", appearance: "gray", children:
|
|
2178
|
+
n === "condition" ? /* @__PURE__ */ i(D, { type: "body", size: "medium", appearance: "gray", children: Ue(a, r) }) : /* @__PURE__ */ i(D, { type: "label", size: "large", appearance: "gray", children: Ue(a, r) })
|
|
2179
2179
|
]
|
|
2180
2180
|
}
|
|
2181
2181
|
);
|
|
@@ -2260,7 +2260,7 @@ const Ao = {
|
|
|
2260
2260
|
weight: "bold",
|
|
2261
2261
|
size: n === "condition" ? "medium" : "large",
|
|
2262
2262
|
appearance: "gray",
|
|
2263
|
-
children:
|
|
2263
|
+
children: Ue(a, r)
|
|
2264
2264
|
}
|
|
2265
2265
|
),
|
|
2266
2266
|
"a",
|
|
@@ -2272,7 +2272,7 @@ const Ao = {
|
|
|
2272
2272
|
weight: "bold",
|
|
2273
2273
|
size: n === "condition" ? "medium" : "large",
|
|
2274
2274
|
appearance: "gray",
|
|
2275
|
-
children:
|
|
2275
|
+
children: Ue(o, r)
|
|
2276
2276
|
}
|
|
2277
2277
|
)
|
|
2278
2278
|
] })
|
|
@@ -2465,7 +2465,7 @@ const Ao = {
|
|
|
2465
2465
|
type: n === "condition" ? "body" : "title",
|
|
2466
2466
|
size: n === "condition" ? "small" : "medium",
|
|
2467
2467
|
appearance: n === "condition" ? "dark" : "gray",
|
|
2468
|
-
children:
|
|
2468
|
+
children: Ue(a, r)
|
|
2469
2469
|
}
|
|
2470
2470
|
),
|
|
2471
2471
|
o && /* @__PURE__ */ i(
|
|
@@ -2496,7 +2496,7 @@ const Ao = {
|
|
|
2496
2496
|
icon: /* @__PURE__ */ i(nt, {}),
|
|
2497
2497
|
children: /* @__PURE__ */ b(v, { direction: "row", gap: "4px", wrap: "wrap", children: [
|
|
2498
2498
|
/* @__PURE__ */ i(D, { type: "title", size: "medium", weight: "normal", appearance: "gray", children: t }),
|
|
2499
|
-
/* @__PURE__ */ i(D, { type: "title", size: "medium", appearance: "dark", weight: "bold", children:
|
|
2499
|
+
/* @__PURE__ */ i(D, { type: "title", size: "medium", appearance: "dark", weight: "bold", children: Ue(a, r) }),
|
|
2500
2500
|
/* @__PURE__ */ i(D, { type: "title", size: "medium", weight: "normal", appearance: "gray", children: "estará vigente hasta" }),
|
|
2501
2501
|
/* @__PURE__ */ i(D, { type: "title", size: "medium", appearance: "dark", weight: "bold", children: l })
|
|
2502
2502
|
] })
|
|
@@ -2600,7 +2600,7 @@ const Ao = {
|
|
|
2600
2600
|
), s = r.decisionDataType || r.conditionDataType, c = Array.isArray(n) ? n.map((l, d) => ({
|
|
2601
2601
|
checked: !0,
|
|
2602
2602
|
id: String(d + 1),
|
|
2603
|
-
label: String(
|
|
2603
|
+
label: String(Ue(l, s))
|
|
2604
2604
|
})) : [];
|
|
2605
2605
|
return /* @__PURE__ */ i(
|
|
2606
2606
|
zo,
|
|
@@ -2625,7 +2625,7 @@ const Ao = {
|
|
|
2625
2625
|
handleOnClick: c,
|
|
2626
2626
|
showModal: l,
|
|
2627
2627
|
validDate: d
|
|
2628
|
-
} = e, p = `De ${
|
|
2628
|
+
} = e, p = `De ${Ue(a, r)} a ${Ue(o, r)}`;
|
|
2629
2629
|
return /* @__PURE__ */ b(
|
|
2630
2630
|
v,
|
|
2631
2631
|
{
|
|
@@ -3403,12 +3403,12 @@ const di = $.div`
|
|
|
3403
3403
|
from: e.from ?? "",
|
|
3404
3404
|
to: e.to ?? ""
|
|
3405
3405
|
}), mi = (e) => e.value, bi = (e) => e.value, yi = (e) => e.value, vi = {
|
|
3406
|
-
[
|
|
3407
|
-
[
|
|
3408
|
-
[
|
|
3409
|
-
[
|
|
3410
|
-
[
|
|
3411
|
-
[
|
|
3406
|
+
[F.LIST_OF_VALUES]: hi,
|
|
3407
|
+
[F.LIST_OF_VALUES_MULTI]: gi,
|
|
3408
|
+
[F.RANGE]: fi,
|
|
3409
|
+
[F.GREATER_THAN]: mi,
|
|
3410
|
+
[F.LESS_THAN]: bi,
|
|
3411
|
+
[F.EQUAL]: yi
|
|
3412
3412
|
}, Ti = (e, t) => {
|
|
3413
3413
|
if (!e || e.decisionDataType !== le.PERCENTAGE || t == null || typeof t == "string" && t.endsWith("%"))
|
|
3414
3414
|
return t;
|
|
@@ -3723,7 +3723,7 @@ const Ni = (e) => {
|
|
|
3723
3723
|
),
|
|
3724
3724
|
value: e
|
|
3725
3725
|
}), Ii = (e) => ({
|
|
3726
|
-
schema:
|
|
3726
|
+
schema: ze().test(
|
|
3727
3727
|
"isArrayOrString",
|
|
3728
3728
|
"Debe ser un array de strings/numbers o un solo string",
|
|
3729
3729
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -3732,7 +3732,7 @@ const Ni = (e) => {
|
|
|
3732
3732
|
),
|
|
3733
3733
|
value: e
|
|
3734
3734
|
}), Oi = (e) => ({
|
|
3735
|
-
schema:
|
|
3735
|
+
schema: ze().test(
|
|
3736
3736
|
"isArrayOrString",
|
|
3737
3737
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
3738
3738
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -3763,12 +3763,12 @@ const Ni = (e) => {
|
|
|
3763
3763
|
schema: Re().required("Requerido"),
|
|
3764
3764
|
value: e
|
|
3765
3765
|
}, Li = {
|
|
3766
|
-
[
|
|
3767
|
-
[
|
|
3768
|
-
[
|
|
3769
|
-
[
|
|
3770
|
-
[
|
|
3771
|
-
[
|
|
3766
|
+
[F.LIST_OF_VALUES]: Ii,
|
|
3767
|
+
[F.LIST_OF_VALUES_MULTI]: Oi,
|
|
3768
|
+
[F.RANGE]: Ri,
|
|
3769
|
+
[F.GREATER_THAN]: rn,
|
|
3770
|
+
[F.LESS_THAN]: rn,
|
|
3771
|
+
[F.EQUAL]: rn
|
|
3772
3772
|
}, Fi = (e) => Li[e] || ki, Mt = (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(
|
|
@@ -3926,7 +3926,7 @@ const _i = $.div`
|
|
|
3926
3926
|
name: s,
|
|
3927
3927
|
valueToggle: c = ""
|
|
3928
3928
|
} = e, [l, d] = Y(t);
|
|
3929
|
-
return
|
|
3929
|
+
return Pe(() => {
|
|
3930
3930
|
d(t);
|
|
3931
3931
|
}, [t]), /* @__PURE__ */ b(j, { children: [
|
|
3932
3932
|
/* @__PURE__ */ i(v, { children: /* @__PURE__ */ i(
|
|
@@ -3960,12 +3960,12 @@ const _i = $.div`
|
|
|
3960
3960
|
messageEnd: u = "",
|
|
3961
3961
|
statusStart: h = "pending",
|
|
3962
3962
|
statusEnd: g = "pending"
|
|
3963
|
-
} = e, [f, y] = Y(s), [m, T] = Y(l), [S, E] = Y(d), C = ({ target:
|
|
3964
|
-
y(
|
|
3965
|
-
}, N = (
|
|
3966
|
-
T(
|
|
3967
|
-
}, A = (
|
|
3968
|
-
E(
|
|
3963
|
+
} = e, [f, y] = Y(s), [m, T] = Y(l), [S, E] = Y(d), C = ({ target: V }) => {
|
|
3964
|
+
y(V.checked), r && r(V.checked);
|
|
3965
|
+
}, N = (V) => {
|
|
3966
|
+
T(V.target.value), t(V);
|
|
3967
|
+
}, A = (V) => {
|
|
3968
|
+
E(V.target.value), n(V);
|
|
3969
3969
|
}, O = Se("(max-width: 400px)");
|
|
3970
3970
|
return /* @__PURE__ */ b(j, { children: [
|
|
3971
3971
|
/* @__PURE__ */ b(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
@@ -4344,12 +4344,12 @@ const Ui = (e) => {
|
|
|
4344
4344
|
from: e.from ?? "",
|
|
4345
4345
|
to: e.to ?? ""
|
|
4346
4346
|
}), Wi = (e) => e.value, Qi = (e) => e.value, Xi = (e) => e.value, Ji = {
|
|
4347
|
-
[
|
|
4348
|
-
[
|
|
4349
|
-
[
|
|
4350
|
-
[
|
|
4351
|
-
[
|
|
4352
|
-
[
|
|
4347
|
+
[F.LIST_OF_VALUES]: Hi,
|
|
4348
|
+
[F.LIST_OF_VALUES_MULTI]: qi,
|
|
4349
|
+
[F.RANGE]: Yi,
|
|
4350
|
+
[F.GREATER_THAN]: Wi,
|
|
4351
|
+
[F.LESS_THAN]: Qi,
|
|
4352
|
+
[F.EQUAL]: Xi
|
|
4353
4353
|
}, Ze = (e) => {
|
|
4354
4354
|
const t = e == null ? void 0 : e.value;
|
|
4355
4355
|
if (typeof t == "string" && t.includes(" a ")) {
|
|
@@ -4714,15 +4714,15 @@ const nl = (e) => {
|
|
|
4714
4714
|
if (e == null) return "";
|
|
4715
4715
|
const n = Array.isArray(e) ? e.join(", ") : typeof e == "object" && e !== null ? JSON.stringify(e) : String(e ?? "");
|
|
4716
4716
|
switch (t) {
|
|
4717
|
-
case
|
|
4717
|
+
case F.LESS_THAN:
|
|
4718
4718
|
return `Menor a ${n}`;
|
|
4719
|
-
case
|
|
4719
|
+
case F.GREATER_THAN:
|
|
4720
4720
|
return `Mayor a ${n}`;
|
|
4721
|
-
case
|
|
4721
|
+
case F.LIST_OF_VALUES:
|
|
4722
4722
|
return e;
|
|
4723
|
-
case
|
|
4723
|
+
case F.LIST_OF_VALUES_MULTI:
|
|
4724
4724
|
return e;
|
|
4725
|
-
case
|
|
4725
|
+
case F.RANGE:
|
|
4726
4726
|
return e;
|
|
4727
4727
|
default:
|
|
4728
4728
|
return String(n);
|
|
@@ -4843,15 +4843,15 @@ const nl = (e) => {
|
|
|
4843
4843
|
} : null, O = U.useMemo(
|
|
4844
4844
|
() => g ? Me(g) : {},
|
|
4845
4845
|
[g]
|
|
4846
|
-
),
|
|
4846
|
+
), V = ((dt = (st = g == null ? void 0 : g.conditionGroups) == null ? void 0 : st.map((I) => I == null ? void 0 : I.ConditionGroupId)) == null ? void 0 : dt.filter(Boolean)) || Object.keys(O), G = V[0] || "group-primary", te = U.useMemo(() => {
|
|
4847
4847
|
const I = {}, _ = O[G] || [], R = O["group-primary"] || [];
|
|
4848
4848
|
I["group-primary"] = G === "group-primary" ? R : [..._, ...R];
|
|
4849
|
-
for (const w of
|
|
4849
|
+
for (const w of V)
|
|
4850
4850
|
!w || w === G || w !== "group-primary" && O[w] && (I[w] = O[w]);
|
|
4851
4851
|
for (const w of Object.keys(O))
|
|
4852
4852
|
w === "group-primary" || w === G || w in I || (I[w] = O[w]);
|
|
4853
4853
|
return I;
|
|
4854
|
-
}, [O, G,
|
|
4854
|
+
}, [O, G, V]), ie = U.useMemo(() => {
|
|
4855
4855
|
const I = {};
|
|
4856
4856
|
return Object.keys(te).forEach((_) => {
|
|
4857
4857
|
const R = te[_];
|
|
@@ -4910,12 +4910,12 @@ const nl = (e) => {
|
|
|
4910
4910
|
for (const [R, w] of I)
|
|
4911
4911
|
w.length > 0 && (_[R] = w);
|
|
4912
4912
|
return _;
|
|
4913
|
-
}, [ce]),
|
|
4913
|
+
}, [ce]), L = U.useMemo(() => {
|
|
4914
4914
|
const I = Object.keys(re);
|
|
4915
4915
|
return I.includes("group-primary") ? ["group-primary", ...I.filter((_) => _ !== "group-primary")] : I;
|
|
4916
4916
|
}, [re]), M = {};
|
|
4917
4917
|
let Ce = 1;
|
|
4918
|
-
const De =
|
|
4918
|
+
const De = L.map((I) => {
|
|
4919
4919
|
const _ = I === "group-primary" ? "mainCondition" : `alternateCondition-${Ce++}`;
|
|
4920
4920
|
return M[_] = I, {
|
|
4921
4921
|
id: _,
|
|
@@ -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),
|
|
4927
|
+
), _e = (I) => Ye(I), je = M[Ve] ?? L[0] ?? "group-primary", Q = re[je] ?? [], W = L.length > 1, ee = Array.from({ length: 5 }), Et = !!(!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
|
{
|
|
@@ -5205,7 +5205,7 @@ const ll = $.div`
|
|
|
5205
5205
|
),
|
|
5206
5206
|
value: e
|
|
5207
5207
|
}), fl = (e) => ({
|
|
5208
|
-
schema:
|
|
5208
|
+
schema: ze().test(
|
|
5209
5209
|
"isArrayOrString",
|
|
5210
5210
|
"Por favor selecciona una opcion",
|
|
5211
5211
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -5214,7 +5214,7 @@ const ll = $.div`
|
|
|
5214
5214
|
),
|
|
5215
5215
|
value: e
|
|
5216
5216
|
}), ml = (e) => ({
|
|
5217
|
-
schema:
|
|
5217
|
+
schema: ze().test(
|
|
5218
5218
|
"isArrayOrString",
|
|
5219
5219
|
"Por favor selecciona al menos una opcion",
|
|
5220
5220
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -5258,7 +5258,7 @@ const ll = $.div`
|
|
|
5258
5258
|
}), nr = (e) => e && typeof e == "object" && !Array.isArray(e) && "value" in e && e.value !== "" && e.value != null, an = (e, t) => {
|
|
5259
5259
|
if (nr(e))
|
|
5260
5260
|
return {
|
|
5261
|
-
schema:
|
|
5261
|
+
schema: ze().test(
|
|
5262
5262
|
"required-option",
|
|
5263
5263
|
"Por favor selecciona una opcion",
|
|
5264
5264
|
(n) => nr(n)
|
|
@@ -5282,20 +5282,20 @@ const ll = $.div`
|
|
|
5282
5282
|
schema: $e().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"),
|
|
5283
5283
|
value: e
|
|
5284
5284
|
} : {
|
|
5285
|
-
schema:
|
|
5285
|
+
schema: ze().test("required", "Requerido", (n) => n == null ? !1 : typeof n == "string" ? n.trim().length > 0 : typeof n == "number" ? !Number.isNaN(n) : !1),
|
|
5286
5286
|
value: e
|
|
5287
5287
|
};
|
|
5288
5288
|
}, vl = {
|
|
5289
|
-
[
|
|
5290
|
-
[
|
|
5291
|
-
[
|
|
5292
|
-
[
|
|
5293
|
-
[
|
|
5294
|
-
[
|
|
5289
|
+
[F.LIST_OF_VALUES]: fl,
|
|
5290
|
+
[F.LIST_OF_VALUES_MULTI]: ml,
|
|
5291
|
+
[F.RANGE]: bl,
|
|
5292
|
+
[F.GREATER_THAN]: an,
|
|
5293
|
+
[F.LESS_THAN]: an,
|
|
5294
|
+
[F.EQUAL]: an
|
|
5295
5295
|
}, rr = (e) => vl[e] || gl, ar = "El valor desde no puede ser mayor que el valor hasta", or = (e) => {
|
|
5296
5296
|
var t;
|
|
5297
5297
|
return Array.isArray((t = e == null ? void 0 : e.listOfPossibleValues) == null ? void 0 : t.list) && e.listOfPossibleValues.list.length > 0;
|
|
5298
|
-
}, bn =
|
|
5298
|
+
}, bn = ze().test(
|
|
5299
5299
|
"required-option",
|
|
5300
5300
|
"Por favor selecciona una opcion",
|
|
5301
5301
|
(e) => {
|
|
@@ -5403,9 +5403,9 @@ function Sl({
|
|
|
5403
5403
|
for (const [E, C] of Object.entries(f)) {
|
|
5404
5404
|
const N = y == null ? void 0 : y[E], A = {};
|
|
5405
5405
|
C.forEach((O) => {
|
|
5406
|
-
const
|
|
5407
|
-
if (!on(
|
|
5408
|
-
const G = yn(
|
|
5406
|
+
const V = N == null ? void 0 : N[O.conditionName];
|
|
5407
|
+
if (!on(V)) return;
|
|
5408
|
+
const G = yn(V), ie = rr(
|
|
5409
5409
|
O.howToSetTheCondition
|
|
5410
5410
|
)(
|
|
5411
5411
|
G,
|
|
@@ -5748,16 +5748,16 @@ function Rl(e) {
|
|
|
5748
5748
|
}
|
|
5749
5749
|
function Ll(e) {
|
|
5750
5750
|
switch (e) {
|
|
5751
|
-
case
|
|
5751
|
+
case F.EQUAL:
|
|
5752
5752
|
return "sea";
|
|
5753
|
-
case
|
|
5753
|
+
case F.GREATER_THAN:
|
|
5754
5754
|
return "sea mayor a";
|
|
5755
|
-
case
|
|
5755
|
+
case F.LESS_THAN:
|
|
5756
5756
|
return "sea menor a";
|
|
5757
|
-
case
|
|
5757
|
+
case F.RANGE:
|
|
5758
5758
|
return "esté entre";
|
|
5759
|
-
case
|
|
5760
|
-
case
|
|
5759
|
+
case F.LIST_OF_VALUES:
|
|
5760
|
+
case F.LIST_OF_VALUES_MULTI:
|
|
5761
5761
|
return "esté en";
|
|
5762
5762
|
default:
|
|
5763
5763
|
return "sea";
|
|
@@ -5832,7 +5832,7 @@ const ut = (e) => {
|
|
|
5832
5832
|
};
|
|
5833
5833
|
}), [N, A] = U.useState(
|
|
5834
5834
|
((dt = C[0]) == null ? void 0 : dt.id) ?? "mainCondition"
|
|
5835
|
-
), O = (I) => A(I),
|
|
5835
|
+
), O = (I) => A(I), V = S[N] ?? m ?? "group-primary";
|
|
5836
5836
|
U.useEffect(() => {
|
|
5837
5837
|
var H;
|
|
5838
5838
|
const I = (H = d.values) == null ? void 0 : H.conditionsThatEstablishesTheDecision;
|
|
@@ -5919,7 +5919,7 @@ const ut = (e) => {
|
|
|
5919
5919
|
return [w, P];
|
|
5920
5920
|
});
|
|
5921
5921
|
return Object.fromEntries(R);
|
|
5922
|
-
}, [f, d.values, m]), te = G[
|
|
5922
|
+
}, [f, d.values, m]), te = G[V] ?? [], ie = G[m ?? "group-primary"] ?? [], ce = {
|
|
5923
5923
|
decisionDataType: t.decisionDataType,
|
|
5924
5924
|
howToSetTheCondition: t.howToSetTheDecision,
|
|
5925
5925
|
labelName: t.labelName,
|
|
@@ -5927,7 +5927,7 @@ const ut = (e) => {
|
|
|
5927
5927
|
listOfPossibleValues: t.listOfPossibleValues,
|
|
5928
5928
|
ruleName: t.ruleName,
|
|
5929
5929
|
timeUnit: t.timeUnit ? gn("", t.timeUnit, !0).trim() : ""
|
|
5930
|
-
}, re = d.submitCount > 0 || !!d.touched.effectiveFrom,
|
|
5930
|
+
}, re = d.submitCount > 0 || !!d.touched.effectiveFrom, L = d.submitCount > 0 || !!d.touched.validUntil, M = re ? d.errors.effectiveFrom ? "invalid" : "valid" : void 0, Ce = L ? d.errors.validUntil ? "invalid" : "valid" : void 0, De = U.useMemo(() => {
|
|
5931
5931
|
const I = d.errors.conditionsThatEstablishesTheDecision;
|
|
5932
5932
|
if (!I) return;
|
|
5933
5933
|
if (typeof I == "string") return I;
|
|
@@ -5967,7 +5967,7 @@ const ut = (e) => {
|
|
|
5967
5967
|
}
|
|
5968
5968
|
}
|
|
5969
5969
|
}
|
|
5970
|
-
},
|
|
5970
|
+
}, je = (I) => {
|
|
5971
5971
|
const [_, ...R] = I.split("."), w = R.join("."), H = Object.values(h).flat().find((X) => X.conditionName === w), P = Ye(H || {});
|
|
5972
5972
|
_e(_, w, P), d.setFieldTouched(
|
|
5973
5973
|
`conditionsThatEstablishesTheDecision.${_}.${w}`,
|
|
@@ -5975,9 +5975,9 @@ const ut = (e) => {
|
|
|
5975
5975
|
!1
|
|
5976
5976
|
);
|
|
5977
5977
|
}, Q = () => {
|
|
5978
|
-
(h[
|
|
5978
|
+
(h[V] ?? []).forEach((_) => {
|
|
5979
5979
|
const R = ut(_ == null ? void 0 : _.howToSetTheCondition), w = pt(R);
|
|
5980
|
-
_e(
|
|
5980
|
+
_e(V, _.conditionName, w);
|
|
5981
5981
|
});
|
|
5982
5982
|
}, [W, ee] = U.useState(!1);
|
|
5983
5983
|
return /* @__PURE__ */ i(
|
|
@@ -5993,7 +5993,7 @@ const ut = (e) => {
|
|
|
5993
5993
|
onRedefineCurrentTab: Q,
|
|
5994
5994
|
onTabChange: O,
|
|
5995
5995
|
onClearCondition: (I) => {
|
|
5996
|
-
|
|
5996
|
+
je(I), a == null || a(I);
|
|
5997
5997
|
},
|
|
5998
5998
|
showConditionsError: Ve,
|
|
5999
5999
|
tabs: C,
|
|
@@ -6008,8 +6008,8 @@ const ut = (e) => {
|
|
|
6008
6008
|
onCloseRedefineConfirm: () => ee(!1),
|
|
6009
6009
|
onConfirmRedefine: () => {
|
|
6010
6010
|
Q();
|
|
6011
|
-
const I = (h[
|
|
6012
|
-
(_) => `${
|
|
6011
|
+
const I = (h[V] ?? []).map(
|
|
6012
|
+
(_) => `${V}.${_.conditionName}`
|
|
6013
6013
|
);
|
|
6014
6014
|
o == null || o(I), ee(!1);
|
|
6015
6015
|
},
|
|
@@ -6042,7 +6042,12 @@ 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([]);
|
|
6046
|
+
Pe(() => {
|
|
6047
|
+
const d = t.filter((p) => p.value === "true");
|
|
6048
|
+
r(d);
|
|
6049
|
+
}, [t]);
|
|
6050
|
+
const a = (d) => {
|
|
6046
6051
|
r((p) => {
|
|
6047
6052
|
if (p.some((g) => g.id === d))
|
|
6048
6053
|
return p.filter((g) => g.id !== d);
|
|
@@ -6163,7 +6168,7 @@ const ut = (e) => {
|
|
|
6163
6168
|
withTerm: N,
|
|
6164
6169
|
configurateDecisionOptions: A = [],
|
|
6165
6170
|
configureDecisionModal: O,
|
|
6166
|
-
handleCloseRulesModal:
|
|
6171
|
+
handleCloseRulesModal: V = () => {
|
|
6167
6172
|
}
|
|
6168
6173
|
} = e, [G, te] = Y(null), { renderedCards: ie } = pl({
|
|
6169
6174
|
cardTitle: t,
|
|
@@ -6171,10 +6176,10 @@ const ut = (e) => {
|
|
|
6171
6176
|
customTitleContentAddCard: r,
|
|
6172
6177
|
decisions: o,
|
|
6173
6178
|
loading: p,
|
|
6174
|
-
handleOpenModal: (
|
|
6179
|
+
handleOpenModal: (L) => L !== null && u(L),
|
|
6175
6180
|
handleDelete: f,
|
|
6176
|
-
isOpenFor: (
|
|
6177
|
-
toggleAt: (
|
|
6181
|
+
isOpenFor: (L) => G === L,
|
|
6182
|
+
toggleAt: (L) => te((M) => M === L ? null : L),
|
|
6178
6183
|
editionMode: c,
|
|
6179
6184
|
withEditOption: C
|
|
6180
6185
|
}), ce = ((o == null ? void 0 : o.length) || 0) + 1, re = (o == null ? void 0 : o.length) === 0 && !p;
|
|
@@ -6252,7 +6257,7 @@ const ut = (e) => {
|
|
|
6252
6257
|
Ur,
|
|
6253
6258
|
{
|
|
6254
6259
|
portalId: "modal-portal",
|
|
6255
|
-
onCloseModal:
|
|
6260
|
+
onCloseModal: V,
|
|
6256
6261
|
title: d ? "Editar Decisión" : "Configurar Decisión",
|
|
6257
6262
|
description: "Diligencia los campos para configurar tu decisión.",
|
|
6258
6263
|
children: /* @__PURE__ */ i(
|
|
@@ -6261,7 +6266,7 @@ const ut = (e) => {
|
|
|
6261
6266
|
decision: d || s,
|
|
6262
6267
|
fullTemplate: S ?? s,
|
|
6263
6268
|
onSubmitEvent: g,
|
|
6264
|
-
onCancel: () =>
|
|
6269
|
+
onCancel: () => V ? V() : () => {
|
|
6265
6270
|
},
|
|
6266
6271
|
onRemoveCondition: y,
|
|
6267
6272
|
onRestoreConditions: m,
|
|
@@ -6313,7 +6318,7 @@ function Hl(e) {
|
|
|
6313
6318
|
}
|
|
6314
6319
|
const ql = (e, t) => {
|
|
6315
6320
|
const [n, r] = Y([]), [a, o] = Y([]), [s, c] = Y(!1), l = Ke(null);
|
|
6316
|
-
return
|
|
6321
|
+
return Pe(() => {
|
|
6317
6322
|
if (!e.current || !l.current) return;
|
|
6318
6323
|
const d = e.current, p = l.current, u = () => {
|
|
6319
6324
|
var E;
|
|
@@ -6476,7 +6481,7 @@ const Yl = $.div`
|
|
|
6476
6481
|
} = ql(c, t), [f, y] = Y(!1), m = (N) => {
|
|
6477
6482
|
N.stopPropagation(), y((A) => !A);
|
|
6478
6483
|
};
|
|
6479
|
-
|
|
6484
|
+
Pe(() => {
|
|
6480
6485
|
const N = (A) => {
|
|
6481
6486
|
var G, te;
|
|
6482
6487
|
const O = A.target;
|
|
@@ -6491,7 +6496,7 @@ const Yl = $.div`
|
|
|
6491
6496
|
icon: N.icon
|
|
6492
6497
|
})), C = (N) => {
|
|
6493
6498
|
var A, O;
|
|
6494
|
-
(O = (A = u.find((
|
|
6499
|
+
(O = (A = u.find((V) => V.label === N)) == null ? void 0 : A.onClose) == null || O.call(A), y(!1);
|
|
6495
6500
|
};
|
|
6496
6501
|
return /* @__PURE__ */ b(Hl, { borderRadius: "8px", width: "100%", children: [
|
|
6497
6502
|
/* @__PURE__ */ i(Wl, { ref: g, children: t.map((N) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
|
|
@@ -6726,7 +6731,7 @@ const Yl = $.div`
|
|
|
6726
6731
|
),
|
|
6727
6732
|
value: e
|
|
6728
6733
|
}), es = (e) => ({
|
|
6729
|
-
schema:
|
|
6734
|
+
schema: ze().test(
|
|
6730
6735
|
"isArrayOrString",
|
|
6731
6736
|
"Debe ser un array de strings/numbers o un solo string",
|
|
6732
6737
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -6735,7 +6740,7 @@ const Yl = $.div`
|
|
|
6735
6740
|
),
|
|
6736
6741
|
value: e
|
|
6737
6742
|
}), ts = (e) => ({
|
|
6738
|
-
schema:
|
|
6743
|
+
schema: ze().test(
|
|
6739
6744
|
"isArrayOrString",
|
|
6740
6745
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
6741
6746
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -6766,12 +6771,12 @@ const Yl = $.div`
|
|
|
6766
6771
|
schema: Re().required("Requerido"),
|
|
6767
6772
|
value: e
|
|
6768
6773
|
}, rs = {
|
|
6769
|
-
[
|
|
6770
|
-
[
|
|
6771
|
-
[
|
|
6772
|
-
[
|
|
6773
|
-
[
|
|
6774
|
-
[
|
|
6774
|
+
[F.LIST_OF_VALUES]: es,
|
|
6775
|
+
[F.LIST_OF_VALUES_MULTI]: ts,
|
|
6776
|
+
[F.RANGE]: ns,
|
|
6777
|
+
[F.GREATER_THAN]: ln,
|
|
6778
|
+
[F.LESS_THAN]: ln,
|
|
6779
|
+
[F.EQUAL]: ln
|
|
6775
6780
|
}, lr = (e) => rs[e] || Kl;
|
|
6776
6781
|
function as({
|
|
6777
6782
|
decision: e,
|
|
@@ -6904,7 +6909,7 @@ function as({
|
|
|
6904
6909
|
void 0
|
|
6905
6910
|
);
|
|
6906
6911
|
else {
|
|
6907
|
-
const u = p.howToSetTheCondition ===
|
|
6912
|
+
const u = p.howToSetTheCondition === F.LIST_OF_VALUES_MULTI ? [] : "";
|
|
6908
6913
|
a.setFieldValue(
|
|
6909
6914
|
`conditionsThatEstablishesTheDecision.${p.conditionName}`,
|
|
6910
6915
|
u
|
|
@@ -6951,7 +6956,7 @@ const os = $.div`
|
|
|
6951
6956
|
} = e, [l, d] = Y(t), p = (u) => {
|
|
6952
6957
|
d(u.target.checked), r(u);
|
|
6953
6958
|
};
|
|
6954
|
-
return
|
|
6959
|
+
return Pe(() => {
|
|
6955
6960
|
d(t);
|
|
6956
6961
|
}, [t]), /* @__PURE__ */ b(j, { children: [
|
|
6957
6962
|
/* @__PURE__ */ i(v, { children: /* @__PURE__ */ i(
|
|
@@ -6983,12 +6988,12 @@ const os = $.div`
|
|
|
6983
6988
|
messageEnd: u = "",
|
|
6984
6989
|
statusStart: h = "pending",
|
|
6985
6990
|
statusEnd: g = "pending"
|
|
6986
|
-
} = e, [f, y] = Y(s), [m, T] = Y(l), [S, E] = Y(d), C = ({ target:
|
|
6987
|
-
y(
|
|
6988
|
-
}, N = (
|
|
6989
|
-
T(
|
|
6990
|
-
}, A = (
|
|
6991
|
-
E(
|
|
6991
|
+
} = e, [f, y] = Y(s), [m, T] = Y(l), [S, E] = Y(d), C = ({ target: V }) => {
|
|
6992
|
+
y(V.checked), r && r(V.checked);
|
|
6993
|
+
}, N = (V) => {
|
|
6994
|
+
T(V.target.value), t(V);
|
|
6995
|
+
}, A = (V) => {
|
|
6996
|
+
E(V.target.value), n(V);
|
|
6992
6997
|
}, O = Se("(max-width: 400px)");
|
|
6993
6998
|
return /* @__PURE__ */ b(j, { children: [
|
|
6994
6999
|
/* @__PURE__ */ b(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
@@ -7117,7 +7122,7 @@ const os = $.div`
|
|
|
7117
7122
|
checked: !t.values.toggleNone && t.values.conditionsThatEstablishesTheDecision[u.conditionName] !== void 0,
|
|
7118
7123
|
handleToggleChange: (h) => c(
|
|
7119
7124
|
u.conditionName,
|
|
7120
|
-
u.howToSetTheCondition ===
|
|
7125
|
+
u.howToSetTheCondition === F.LIST_OF_VALUES_MULTI
|
|
7121
7126
|
)(h.target.checked),
|
|
7122
7127
|
children: jt({ condition: u, formik: t })
|
|
7123
7128
|
},
|
|
@@ -7238,7 +7243,7 @@ const os = $.div`
|
|
|
7238
7243
|
)
|
|
7239
7244
|
} : n;
|
|
7240
7245
|
});
|
|
7241
|
-
},
|
|
7246
|
+
}, Ge = {
|
|
7242
7247
|
item: {
|
|
7243
7248
|
background: {
|
|
7244
7249
|
active: k.palette.blue.B50,
|
|
@@ -7260,7 +7265,7 @@ const os = $.div`
|
|
|
7260
7265
|
border: 1px solid
|
|
7261
7266
|
${({ theme: e, $active: t }) => {
|
|
7262
7267
|
var n, r, a, o;
|
|
7263
|
-
return t ? ((r = (n = e == null ? void 0 : e.border) == null ? void 0 : n.expanded) == null ? void 0 : r.color) ||
|
|
7268
|
+
return t ? ((r = (n = e == null ? void 0 : e.border) == null ? void 0 : n.expanded) == null ? void 0 : r.color) || Ge.border.expanded.color : ((o = (a = e == null ? void 0 : e.border) == null ? void 0 : a.contracted) == null ? void 0 : o.color) || Ge.border.contracted.color;
|
|
7264
7269
|
}};
|
|
7265
7270
|
}
|
|
7266
7271
|
&:hover {
|
|
@@ -7268,7 +7273,7 @@ const os = $.div`
|
|
|
7268
7273
|
background-color: ${({ theme: e, $disabled: t }) => {
|
|
7269
7274
|
var n, r, a;
|
|
7270
7275
|
if (!t)
|
|
7271
|
-
return ((a = (r = (n = e == null ? void 0 : e.menu) == null ? void 0 : n.item) == null ? void 0 : r.background) == null ? void 0 : a.hover) ||
|
|
7276
|
+
return ((a = (r = (n = e == null ? void 0 : e.menu) == null ? void 0 : n.item) == null ? void 0 : r.background) == null ? void 0 : a.hover) || Ge.item.background.hover;
|
|
7272
7277
|
}};
|
|
7273
7278
|
}
|
|
7274
7279
|
`, sr = $.div`
|
|
@@ -7296,7 +7301,7 @@ const os = $.div`
|
|
|
7296
7301
|
border-bottom: 1px solid
|
|
7297
7302
|
${({ theme: e, $active: t }) => {
|
|
7298
7303
|
var n, r, a, o;
|
|
7299
|
-
return t ? ((r = (n = e == null ? void 0 : e.border) == null ? void 0 : n.expanded) == null ? void 0 : r.color) ||
|
|
7304
|
+
return t ? ((r = (n = e == null ? void 0 : e.border) == null ? void 0 : n.expanded) == null ? void 0 : r.color) || Ge.border.expanded.color : ((o = (a = e == null ? void 0 : e.border) == null ? void 0 : a.contracted) == null ? void 0 : o.color) || Ge.border.contracted.color;
|
|
7300
7305
|
}};
|
|
7301
7306
|
border-radius: 8px 8px 0 0;
|
|
7302
7307
|
}
|
|
@@ -7305,7 +7310,7 @@ const os = $.div`
|
|
|
7305
7310
|
text-decoration: none;
|
|
7306
7311
|
background-color: ${({ theme: e, $active: t }) => {
|
|
7307
7312
|
var n, r, a, o, s, c;
|
|
7308
|
-
return t ? ((a = (r = (n = e == null ? void 0 : e.menu) == null ? void 0 : n.item) == null ? void 0 : r.background) == null ? void 0 : a.active) ||
|
|
7313
|
+
return t ? ((a = (r = (n = e == null ? void 0 : e.menu) == null ? void 0 : n.item) == null ? void 0 : r.background) == null ? void 0 : a.active) || Ge.item.background.active : ((c = (s = (o = e == null ? void 0 : e.menu) == null ? void 0 : o.item) == null ? void 0 : s.background) == null ? void 0 : c.inactive) || Ge.item.background.inactive;
|
|
7309
7314
|
}};
|
|
7310
7315
|
&:last-child {
|
|
7311
7316
|
border-radius: 0 0 8px 8px;
|
|
@@ -7315,7 +7320,7 @@ const os = $.div`
|
|
|
7315
7320
|
background-color: ${({ $active: e, theme: t, $disabled: n }) => {
|
|
7316
7321
|
var r, a, o;
|
|
7317
7322
|
if (!n && !e)
|
|
7318
|
-
return ((o = (a = (r = t == null ? void 0 : t.menu) == null ? void 0 : r.item) == null ? void 0 : a.background) == null ? void 0 : o.hover) ||
|
|
7323
|
+
return ((o = (a = (r = t == null ? void 0 : t.menu) == null ? void 0 : r.item) == null ? void 0 : a.background) == null ? void 0 : o.hover) || Ge.item.background.hover;
|
|
7319
7324
|
}};
|
|
7320
7325
|
}
|
|
7321
7326
|
`, ms = $.div`
|
|
@@ -7844,7 +7849,7 @@ function Xe(e, t, n) {
|
|
|
7844
7849
|
const r = t.data.config.selectedClass;
|
|
7845
7850
|
if (!n.selectedState) return;
|
|
7846
7851
|
const a = Array.from(e);
|
|
7847
|
-
|
|
7852
|
+
Be(
|
|
7848
7853
|
e.map((o) => o.el),
|
|
7849
7854
|
r
|
|
7850
7855
|
);
|
|
@@ -8249,7 +8254,7 @@ function qs(e, t, n, r = !1) {
|
|
|
8249
8254
|
t.map((a) => a.el),
|
|
8250
8255
|
r ? n.synthDraggingClass : n.draggingClass
|
|
8251
8256
|
), setTimeout(() => {
|
|
8252
|
-
|
|
8257
|
+
Be(
|
|
8253
8258
|
t.map((a) => a.el),
|
|
8254
8259
|
r ? n.synthDraggingClass : n.draggingClass
|
|
8255
8260
|
), tt(
|
|
@@ -8258,7 +8263,7 @@ function qs(e, t, n, r = !1) {
|
|
|
8258
8263
|
), tt(
|
|
8259
8264
|
t.map((a) => a.el),
|
|
8260
8265
|
r ? n.synthDropZoneClass : n.dropZoneClass
|
|
8261
|
-
),
|
|
8266
|
+
), Be(
|
|
8262
8267
|
t.map((a) => a.el),
|
|
8263
8268
|
n.selectedClass
|
|
8264
8269
|
);
|
|
@@ -8381,7 +8386,7 @@ function td(e) {
|
|
|
8381
8386
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
8382
8387
|
const t = e.draggedNodes.map((y) => y.el), n = e.initialParent.data, r = me(e), a = (p = oe.get(e.initialParent.el)) == null ? void 0 : p.config, o = r ? a == null ? void 0 : a.synthDropZoneClass : a == null ? void 0 : a.dropZoneClass, s = (u = n == null ? void 0 : n.config) == null ? void 0 : u.longPressClass, c = r ? (h = n == null ? void 0 : n.config) == null ? void 0 : h.synthDragPlaceholderClass : (g = n == null ? void 0 : n.config) == null ? void 0 : g.dragPlaceholderClass, l = e.originalZIndex;
|
|
8383
8388
|
me(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), wn(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), l !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = l), requestAnimationFrame(() => {
|
|
8384
|
-
|
|
8389
|
+
Be(t, o), Be(t, s), Be(t, c);
|
|
8385
8390
|
}), Xe(e.draggedNodes, e.currentParent, e), Je(e.currentParent, void 0, e);
|
|
8386
8391
|
const d = { ...e };
|
|
8387
8392
|
(f = a == null ? void 0 : a.onDragend) == null || f.call(a, {
|
|
@@ -8398,7 +8403,7 @@ function td(e) {
|
|
|
8398
8403
|
function nd(e, t) {
|
|
8399
8404
|
qe(e.e), !t.pointerSelection && t.selectedState && Xe(t.selectedState.nodes, e.targetData.parent, t);
|
|
8400
8405
|
const n = e.targetData.parent.data.config;
|
|
8401
|
-
t.pointerSelection = !1, "longPressTimeout" in t && t.longPressTimeout && clearTimeout(t.longPressTimeout), t.longPress = !1,
|
|
8406
|
+
t.pointerSelection = !1, "longPressTimeout" in t && t.longPressTimeout && clearTimeout(t.longPressTimeout), t.longPress = !1, Be(
|
|
8402
8407
|
e.targetData.parent.data.enabledNodes.map((r) => r.el),
|
|
8403
8408
|
n.longPressClass
|
|
8404
8409
|
), de(t) && n.handleEnd(t);
|
|
@@ -8498,7 +8503,7 @@ function wn(e, t = !0, n = !0) {
|
|
|
8498
8503
|
function Kr(e, t = !1) {
|
|
8499
8504
|
var p;
|
|
8500
8505
|
const { x: n, y: r } = e.coordinates, a = e.startLeft ?? 0, o = e.startTop ?? 0, s = window.scrollX ?? 0, c = window.scrollY ?? 0, l = n - a + s, d = r - o + c;
|
|
8501
|
-
e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${d}px, 0px)`, t && (e.clonedDraggedNode.style.opacity = "1",
|
|
8506
|
+
e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${d}px, 0px)`, t && (e.clonedDraggedNode.style.opacity = "1", Be(
|
|
8502
8507
|
e.draggedNodes.map((u) => u.el),
|
|
8503
8508
|
(p = e.initialParent.data.config) == null ? void 0 : p.longPressClass
|
|
8504
8509
|
));
|
|
@@ -8716,7 +8721,7 @@ function pd(e, t, n, r = !1) {
|
|
|
8716
8721
|
) : e.classList.add(s);
|
|
8717
8722
|
return n.privateClasses = o, n;
|
|
8718
8723
|
}
|
|
8719
|
-
function
|
|
8724
|
+
function Be(e, t) {
|
|
8720
8725
|
if (!t) return;
|
|
8721
8726
|
const n = qr(t);
|
|
8722
8727
|
if (n.length)
|
|
@@ -8890,9 +8895,9 @@ function Td(e, t = {}) {
|
|
|
8890
8895
|
function o(s = {}) {
|
|
8891
8896
|
hr({ parent: n, state: [r, a], ...s });
|
|
8892
8897
|
}
|
|
8893
|
-
return
|
|
8898
|
+
return Pe(() => {
|
|
8894
8899
|
hr({ parent: n, state: [r, a], ...t });
|
|
8895
|
-
}, [r]),
|
|
8900
|
+
}, [r]), Pe(() => () => {
|
|
8896
8901
|
n.current && Xr(n.current);
|
|
8897
8902
|
}, []), [n, r, a, o];
|
|
8898
8903
|
}
|
|
@@ -8956,9 +8961,9 @@ const gr = {
|
|
|
8956
8961
|
},
|
|
8957
8962
|
[l]
|
|
8958
8963
|
), T = (C) => {
|
|
8959
|
-
var
|
|
8964
|
+
var V;
|
|
8960
8965
|
if (l) return;
|
|
8961
|
-
const N = C.target, A = (
|
|
8966
|
+
const N = C.target, A = (V = N == null ? void 0 : N.closest) == null ? void 0 : V.call(N, "li.dnd-item"), O = (A == null ? void 0 : A.getAttribute("data-label")) || null;
|
|
8962
8967
|
O && (f(O), m(O));
|
|
8963
8968
|
}, S = U.useCallback(() => {
|
|
8964
8969
|
l || (f(null), m(null));
|
|
@@ -10158,7 +10163,7 @@ export {
|
|
|
10158
10163
|
Mr as filterByGroup,
|
|
10159
10164
|
Lc as flatFromGroups,
|
|
10160
10165
|
Cc as formatDecisionForBackend,
|
|
10161
|
-
|
|
10166
|
+
Ue as formatValue,
|
|
10162
10167
|
Me as getConditionsByGroupNew,
|
|
10163
10168
|
Dd as groupsRecordToArrayNew,
|
|
10164
10169
|
Fc as mapByGroupNew,
|