@isettingkit/business-rules 2.2.19 → 2.2.21
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 +789 -790
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as a, jsxs as b, Fragment as
|
|
2
|
-
import { MdOutlineDelete as
|
|
3
|
-
import { inube as A, Stack as T, Divider as W, Icon as B, Text as R, SkeletonLine as
|
|
4
|
-
import
|
|
5
|
-
import { ValueDataType as H, ValueHowToSetUp as P, DecisionConditionRender as
|
|
6
|
-
import { DecisionViewConditionRenderer as Re, DecisionViewConditionRendererNew as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import { useFormik as
|
|
9
|
-
import { string as
|
|
10
|
-
import
|
|
1
|
+
import { jsx as a, jsxs as b, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import { MdOutlineDelete as vt, MdClear as Xt, MdAdd as Ke, MdOutlineCreate as lr, MdExpandLess as sr, MdExpandMore as jt, MdInfo as dr, MdCached as cr, MdOutlineInfo as ur, MdClose as pr, MdOutlineFilterAltOff as hr, MdOutlineFilterAlt as _n, MdChevronRight as un, MdArrowRight as gr, MdOutlineArrowCircleLeft as fr, MdOutlineArrowCircleRight as mr, MdKeyboardArrowUp as br, MdKeyboardArrowDown as vr, MdOutlineArrowBack as yr } from "react-icons/md";
|
|
3
|
+
import { inube as A, Stack as T, Divider as W, Icon as B, Text as R, SkeletonLine as oe, useMediaQuery as ie, Blanket as Qt, Button as Y, Grid as we, Toggle as yt, Checkbox as Jt, Date as Fe, Box as Tr, Tag as He, Tabs as Vn, SkeletonIcon as xr, Fieldset as Be, OptionList as wr, Checkpicker as Sr } from "@inubekit/inubekit";
|
|
4
|
+
import E, { keyframes as Zt, ThemeContext as Cr } from "styled-components";
|
|
5
|
+
import { ValueDataType as H, ValueHowToSetUp as P, DecisionConditionRender as gt, DecisionConditionRenderNew as pn } from "@isettingkit/input";
|
|
6
|
+
import { DecisionViewConditionRenderer as Re, DecisionViewConditionRendererNew as lt } from "@isettingkit/view";
|
|
7
|
+
import { createPortal as Kt } from "react-dom";
|
|
8
|
+
import { useFormik as en } from "formik";
|
|
9
|
+
import { string as me, mixed as xe, object as X, number as ge, lazy as Qe, date as Le } from "yup";
|
|
10
|
+
import j, { useState as q, useRef as qe, useEffect as Je, useContext as Dr, useMemo as Pn } from "react";
|
|
11
11
|
import { Link as Un, useNavigate as Nr, useLocation as Er } from "react-router-dom";
|
|
12
12
|
import kr from "axios";
|
|
13
13
|
import { franc as Ar } from "franc-min";
|
|
14
|
-
const $r =
|
|
14
|
+
const $r = E.div`
|
|
15
15
|
border-radius: 8px;
|
|
16
16
|
border: 1px solid
|
|
17
17
|
${({ theme: e }) => {
|
|
@@ -27,7 +27,7 @@ const $r = N.div`
|
|
|
27
27
|
height: 100%;
|
|
28
28
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
29
29
|
`;
|
|
30
|
-
|
|
30
|
+
E.div`
|
|
31
31
|
width: 100%;
|
|
32
32
|
height: 100%;
|
|
33
33
|
overflow-y: auto;
|
|
@@ -50,7 +50,7 @@ const et = (e) => {
|
|
|
50
50
|
const { children: t, controls: n = !0, handleDelete: r, id: o } = e;
|
|
51
51
|
return /* @__PURE__ */ a($r, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
52
52
|
t,
|
|
53
|
-
n && /* @__PURE__ */ b(
|
|
53
|
+
n && /* @__PURE__ */ b(_, { children: [
|
|
54
54
|
/* @__PURE__ */ a(W, {}),
|
|
55
55
|
/* @__PURE__ */ a(T, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
|
|
56
56
|
B,
|
|
@@ -58,7 +58,7 @@ const et = (e) => {
|
|
|
58
58
|
cursorHover: !0,
|
|
59
59
|
appearance: "danger",
|
|
60
60
|
size: "24px",
|
|
61
|
-
icon: /* @__PURE__ */ a(
|
|
61
|
+
icon: /* @__PURE__ */ a(vt, {}),
|
|
62
62
|
onClick: () => {
|
|
63
63
|
r(o);
|
|
64
64
|
}
|
|
@@ -81,7 +81,7 @@ const _r = {
|
|
|
81
81
|
}, We = (e) => {
|
|
82
82
|
const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = _r[e == null ? void 0 : e.howToSetTheDecision] || Ir;
|
|
83
83
|
return n && r(t) || t || void 0;
|
|
84
|
-
}, hn =
|
|
84
|
+
}, hn = E.div`
|
|
85
85
|
& > div {
|
|
86
86
|
border-radius: 8px;
|
|
87
87
|
border: 1px solid
|
|
@@ -90,7 +90,7 @@ const _r = {
|
|
|
90
90
|
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
91
91
|
}};
|
|
92
92
|
}
|
|
93
|
-
`, gn =
|
|
93
|
+
`, gn = E.div`
|
|
94
94
|
width: 100%;
|
|
95
95
|
height: 100%;
|
|
96
96
|
overflow-y: auto;
|
|
@@ -161,7 +161,7 @@ const _r = {
|
|
|
161
161
|
}
|
|
162
162
|
) }) }, p.conditionName)),
|
|
163
163
|
s.length > 0 && /* @__PURE__ */ a(W, { dashed: !0 }),
|
|
164
|
-
u && /* @__PURE__ */ a(
|
|
164
|
+
u && /* @__PURE__ */ a(_, { children: r && /* @__PURE__ */ a(
|
|
165
165
|
Re,
|
|
166
166
|
{
|
|
167
167
|
element: r.element,
|
|
@@ -175,12 +175,12 @@ const _r = {
|
|
|
175
175
|
) })
|
|
176
176
|
] }) : /* @__PURE__ */ b(T, { direction: "column", gap: "12px", children: [
|
|
177
177
|
/* @__PURE__ */ b(T, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
178
|
-
/* @__PURE__ */ a(
|
|
179
|
-
/* @__PURE__ */ a(
|
|
178
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "180px" }),
|
|
179
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "85px" })
|
|
180
180
|
] }, "loading"),
|
|
181
181
|
/* @__PURE__ */ b(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
182
182
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
183
|
-
/* @__PURE__ */ a(
|
|
183
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "150px" })
|
|
184
184
|
] }),
|
|
185
185
|
/* @__PURE__ */ a(gn, { children: /* @__PURE__ */ a(
|
|
186
186
|
T,
|
|
@@ -197,15 +197,15 @@ const _r = {
|
|
|
197
197
|
alignItems: "start",
|
|
198
198
|
padding: "8px",
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */ a(
|
|
201
|
-
/* @__PURE__ */ a(
|
|
200
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "180px" }),
|
|
201
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "85px" })
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
204
|
) }, `condition-${d}`))
|
|
205
205
|
}
|
|
206
206
|
) })
|
|
207
207
|
] });
|
|
208
|
-
},
|
|
208
|
+
}, tn = (e) => {
|
|
209
209
|
var h;
|
|
210
210
|
const { decision: t, loading: n = !1, textValues: r } = e, o = !!(t != null && t.effectiveFrom), i = !!(t != null && t.validUntil), c = o && i ? {
|
|
211
211
|
element: {
|
|
@@ -258,12 +258,12 @@ const _r = {
|
|
|
258
258
|
visibleConditions: l
|
|
259
259
|
}
|
|
260
260
|
);
|
|
261
|
-
}, Pr =
|
|
261
|
+
}, Pr = E.div`
|
|
262
262
|
position: relative;
|
|
263
263
|
& > div {
|
|
264
264
|
padding: 24px 16px;
|
|
265
265
|
}
|
|
266
|
-
`, Ur =
|
|
266
|
+
`, Ur = E.div`
|
|
267
267
|
background-color: ${({ theme: e }) => {
|
|
268
268
|
var t, n;
|
|
269
269
|
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || A.palette.neutral.N0;
|
|
@@ -300,18 +300,18 @@ const _r = {
|
|
|
300
300
|
throw new Error(
|
|
301
301
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
302
302
|
);
|
|
303
|
-
const c =
|
|
304
|
-
return
|
|
305
|
-
/* @__PURE__ */ a(Pr, { smallScreen: c, children: /* @__PURE__ */ a(
|
|
303
|
+
const c = ie("(max-width: 400px)");
|
|
304
|
+
return Kt(
|
|
305
|
+
/* @__PURE__ */ a(Pr, { smallScreen: c, children: /* @__PURE__ */ a(Qt, { children: /* @__PURE__ */ a(Ur, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
306
306
|
/* @__PURE__ */ a(T, { direction: "column", gap: "24px", children: /* @__PURE__ */ b(T, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
307
|
/* @__PURE__ */ a(R, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
308
|
-
/* @__PURE__ */ a(
|
|
308
|
+
/* @__PURE__ */ a(Xt, { size: "24px", cursor: "pointer", onClick: r })
|
|
309
309
|
] }) }),
|
|
310
310
|
t
|
|
311
311
|
] }) }) }) }),
|
|
312
312
|
i
|
|
313
313
|
);
|
|
314
|
-
}, Gr =
|
|
314
|
+
}, Gr = Zt`
|
|
315
315
|
from {
|
|
316
316
|
opacity: 0;
|
|
317
317
|
transform: translateY(20px);
|
|
@@ -321,7 +321,7 @@ const _r = {
|
|
|
321
321
|
transform: translateY(0);
|
|
322
322
|
}
|
|
323
323
|
`;
|
|
324
|
-
|
|
324
|
+
E.div`
|
|
325
325
|
border-radius: 8px;
|
|
326
326
|
border: 1px solid
|
|
327
327
|
${({ theme: e }) => {
|
|
@@ -335,7 +335,7 @@ N.div`
|
|
|
335
335
|
height: 100%;
|
|
336
336
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
337
337
|
`;
|
|
338
|
-
|
|
338
|
+
E.div`
|
|
339
339
|
& > div {
|
|
340
340
|
border-radius: 8px;
|
|
341
341
|
border: 1px solid
|
|
@@ -345,7 +345,7 @@ N.div`
|
|
|
345
345
|
}};
|
|
346
346
|
}
|
|
347
347
|
`;
|
|
348
|
-
const zn =
|
|
348
|
+
const zn = E.div`
|
|
349
349
|
& > div {
|
|
350
350
|
background-color: ${({ theme: e }) => {
|
|
351
351
|
var t, n;
|
|
@@ -358,18 +358,18 @@ const zn = N.div`
|
|
|
358
358
|
height: 100%;
|
|
359
359
|
padding-bottom: 12px;
|
|
360
360
|
cursor: pointer;
|
|
361
|
-
`, tt =
|
|
361
|
+
`, tt = E.div`
|
|
362
362
|
width: 100%;
|
|
363
363
|
height: 100%;
|
|
364
364
|
& > div {
|
|
365
365
|
animation: ${Gr} 600ms ease-out;
|
|
366
366
|
}
|
|
367
|
-
`, zr =
|
|
367
|
+
`, zr = E.div`
|
|
368
368
|
& > div > div {
|
|
369
369
|
border-radius: 8px;
|
|
370
370
|
box-sizing: border-box;
|
|
371
371
|
}
|
|
372
|
-
`, Hr =
|
|
372
|
+
`, Hr = E.div`
|
|
373
373
|
& > div {
|
|
374
374
|
width: 100%;
|
|
375
375
|
height: 100%;
|
|
@@ -399,7 +399,7 @@ const zn = N.div`
|
|
|
399
399
|
},
|
|
400
400
|
handleView: () => n ? n() : null,
|
|
401
401
|
controls: !1,
|
|
402
|
-
children: /* @__PURE__ */ a(
|
|
402
|
+
children: /* @__PURE__ */ a(tn, { loading: !0 })
|
|
403
403
|
},
|
|
404
404
|
`loading-card-${t}`
|
|
405
405
|
);
|
|
@@ -414,7 +414,7 @@ const zn = N.div`
|
|
|
414
414
|
handleDelete: () => o ? o(t.decisionId) : null,
|
|
415
415
|
handleView: () => r ? r(t) : null,
|
|
416
416
|
controls: n,
|
|
417
|
-
children: /* @__PURE__ */ a(
|
|
417
|
+
children: /* @__PURE__ */ a(tn, { decision: t, textValues: i })
|
|
418
418
|
}
|
|
419
419
|
)
|
|
420
420
|
] }) }, t.decisionId) : null;
|
|
@@ -452,7 +452,7 @@ const zn = N.div`
|
|
|
452
452
|
loading: Br,
|
|
453
453
|
decision: qr,
|
|
454
454
|
add: Wr
|
|
455
|
-
},
|
|
455
|
+
}, _t = (e) => {
|
|
456
456
|
const { type: t } = e, n = Yr[t];
|
|
457
457
|
return n ? n(e) : null;
|
|
458
458
|
}, Xr = (e) => {
|
|
@@ -465,7 +465,7 @@ const zn = N.div`
|
|
|
465
465
|
handleDelete: c,
|
|
466
466
|
textValues: u
|
|
467
467
|
} = e, l = o ? Array.from({ length: 3 }).map(
|
|
468
|
-
(p, d) =>
|
|
468
|
+
(p, d) => _t({
|
|
469
469
|
type: "loading",
|
|
470
470
|
index: d,
|
|
471
471
|
controls: t,
|
|
@@ -476,7 +476,7 @@ const zn = N.div`
|
|
|
476
476
|
textValues: u
|
|
477
477
|
})
|
|
478
478
|
) : r == null ? void 0 : r.map(
|
|
479
|
-
(p) =>
|
|
479
|
+
(p) => _t({
|
|
480
480
|
type: "decision",
|
|
481
481
|
decision: p,
|
|
482
482
|
controls: t,
|
|
@@ -504,7 +504,7 @@ const zn = N.div`
|
|
|
504
504
|
handleSubmitForm: h,
|
|
505
505
|
handleDelete: g,
|
|
506
506
|
terms: f = !0
|
|
507
|
-
} = e, m =
|
|
507
|
+
} = e, m = ie("(max-width: 681px)"), v = ie("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: w } = Xr({
|
|
508
508
|
controls: t,
|
|
509
509
|
customTitleContentAddCard: n,
|
|
510
510
|
decisions: o,
|
|
@@ -512,9 +512,9 @@ const zn = N.div`
|
|
|
512
512
|
handleOpenModal: p,
|
|
513
513
|
handleDelete: g,
|
|
514
514
|
textValues: i
|
|
515
|
-
}),
|
|
516
|
-
return /* @__PURE__ */ b(
|
|
517
|
-
/* @__PURE__ */ a(zr, { children: /* @__PURE__ */ a(Hr, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children:
|
|
515
|
+
}), C = (o == null ? void 0 : o.length) === 0 && !s;
|
|
516
|
+
return /* @__PURE__ */ b(_, { children: [
|
|
517
|
+
/* @__PURE__ */ a(zr, { children: /* @__PURE__ */ a(Hr, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ b(
|
|
518
518
|
T,
|
|
519
519
|
{
|
|
520
520
|
direction: "column",
|
|
@@ -524,7 +524,7 @@ const zn = N.div`
|
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ a(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ b(
|
|
527
|
+
/* @__PURE__ */ a(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ b(_, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
529
|
/* @__PURE__ */ b(
|
|
530
530
|
R,
|
|
@@ -554,7 +554,7 @@ const zn = N.div`
|
|
|
554
554
|
]
|
|
555
555
|
}
|
|
556
556
|
) : /* @__PURE__ */ b(
|
|
557
|
-
|
|
557
|
+
we,
|
|
558
558
|
{
|
|
559
559
|
templateColumns: v ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
560
560
|
autoFlow: "row dense",
|
|
@@ -567,7 +567,7 @@ const zn = N.div`
|
|
|
567
567
|
height: m ? "auto" : "484px",
|
|
568
568
|
children: [
|
|
569
569
|
x,
|
|
570
|
-
w &&
|
|
570
|
+
w && _t({
|
|
571
571
|
type: "add",
|
|
572
572
|
index: o == null ? void 0 : o.length,
|
|
573
573
|
controls: t,
|
|
@@ -577,7 +577,7 @@ const zn = N.div`
|
|
|
577
577
|
handleOpenModal: p,
|
|
578
578
|
handleDelete: g,
|
|
579
579
|
textValues: i,
|
|
580
|
-
shouldRenderEmptyMessage:
|
|
580
|
+
shouldRenderEmptyMessage: C,
|
|
581
581
|
terms: f
|
|
582
582
|
})
|
|
583
583
|
]
|
|
@@ -602,12 +602,12 @@ const zn = N.div`
|
|
|
602
602
|
}
|
|
603
603
|
)
|
|
604
604
|
] });
|
|
605
|
-
}, Qr =
|
|
605
|
+
}, Qr = E.div`
|
|
606
606
|
position: relative;
|
|
607
607
|
& > div {
|
|
608
608
|
padding: 24px 16px;
|
|
609
609
|
}
|
|
610
|
-
`, Jr =
|
|
610
|
+
`, Jr = E.div`
|
|
611
611
|
background-color: ${({ theme: e }) => {
|
|
612
612
|
var t, n;
|
|
613
613
|
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || A.palette.neutral.N0;
|
|
@@ -644,18 +644,18 @@ const zn = N.div`
|
|
|
644
644
|
throw new Error(
|
|
645
645
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
646
646
|
);
|
|
647
|
-
const c =
|
|
648
|
-
return
|
|
649
|
-
/* @__PURE__ */ a(Qr, { $smallScreen: c, children: /* @__PURE__ */ a(
|
|
647
|
+
const c = ie("(max-width: 400px)");
|
|
648
|
+
return Kt(
|
|
649
|
+
/* @__PURE__ */ a(Qr, { $smallScreen: c, children: /* @__PURE__ */ a(Qt, { children: /* @__PURE__ */ a(Jr, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
650
650
|
/* @__PURE__ */ a(T, { direction: "column", gap: "24px", children: /* @__PURE__ */ b(T, { alignItems: "center", justifyContent: "space-between", children: [
|
|
651
651
|
/* @__PURE__ */ a(R, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
652
|
-
/* @__PURE__ */ a(
|
|
652
|
+
/* @__PURE__ */ a(Xt, { size: "24px", cursor: "pointer", onClick: r })
|
|
653
653
|
] }) }),
|
|
654
654
|
t
|
|
655
655
|
] }) }) }) }),
|
|
656
656
|
i
|
|
657
657
|
);
|
|
658
|
-
}, Kr =
|
|
658
|
+
}, Kr = Zt`
|
|
659
659
|
from {
|
|
660
660
|
opacity: 0;
|
|
661
661
|
transform: translateY(20px);
|
|
@@ -665,7 +665,7 @@ const zn = N.div`
|
|
|
665
665
|
transform: translateY(0);
|
|
666
666
|
}
|
|
667
667
|
`;
|
|
668
|
-
|
|
668
|
+
E.div`
|
|
669
669
|
border-radius: 8px;
|
|
670
670
|
border: 1px solid
|
|
671
671
|
${({ theme: e }) => {
|
|
@@ -679,7 +679,7 @@ N.div`
|
|
|
679
679
|
height: 100%;
|
|
680
680
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
681
681
|
`;
|
|
682
|
-
|
|
682
|
+
E.div`
|
|
683
683
|
& > div {
|
|
684
684
|
border-radius: 8px;
|
|
685
685
|
border: 1px solid
|
|
@@ -689,7 +689,7 @@ N.div`
|
|
|
689
689
|
}};
|
|
690
690
|
}
|
|
691
691
|
`;
|
|
692
|
-
|
|
692
|
+
E.div`
|
|
693
693
|
& > div {
|
|
694
694
|
background-color: ${({ theme: e }) => {
|
|
695
695
|
var t, n;
|
|
@@ -703,19 +703,19 @@ N.div`
|
|
|
703
703
|
padding-bottom: 12px;
|
|
704
704
|
cursor: pointer;
|
|
705
705
|
`;
|
|
706
|
-
|
|
706
|
+
E.div`
|
|
707
707
|
width: 100%;
|
|
708
708
|
height: 100%;
|
|
709
709
|
& > div {
|
|
710
710
|
animation: ${Kr} 600ms ease-out;
|
|
711
711
|
}
|
|
712
712
|
`;
|
|
713
|
-
const eo =
|
|
713
|
+
const eo = E.div`
|
|
714
714
|
& > div > div {
|
|
715
715
|
border-radius: 8px;
|
|
716
716
|
box-sizing: border-box;
|
|
717
717
|
}
|
|
718
|
-
`, to =
|
|
718
|
+
`, to = E.div`
|
|
719
719
|
& > div {
|
|
720
720
|
width: 100%;
|
|
721
721
|
height: 100%;
|
|
@@ -745,7 +745,7 @@ const eo = N.div`
|
|
|
745
745
|
},
|
|
746
746
|
handleView: () => n ? n() : null,
|
|
747
747
|
controls: !1,
|
|
748
|
-
children: /* @__PURE__ */ a(
|
|
748
|
+
children: /* @__PURE__ */ a(tn, { loading: !0 })
|
|
749
749
|
},
|
|
750
750
|
`loading-card-${t}`
|
|
751
751
|
);
|
|
@@ -762,7 +762,7 @@ const eo = N.div`
|
|
|
762
762
|
}, Ye = (e) => {
|
|
763
763
|
const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), r = uo[e == null ? void 0 : e.howToSetTheDecision] || ro;
|
|
764
764
|
return n && r(t) || t || void 0;
|
|
765
|
-
}, fn =
|
|
765
|
+
}, fn = E.div`
|
|
766
766
|
& > div {
|
|
767
767
|
border-radius: 8px;
|
|
768
768
|
border: 1px solid
|
|
@@ -771,7 +771,7 @@ const eo = N.div`
|
|
|
771
771
|
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
772
772
|
}};
|
|
773
773
|
}
|
|
774
|
-
`, mn =
|
|
774
|
+
`, mn = E.div`
|
|
775
775
|
width: 100%;
|
|
776
776
|
height: 100%;
|
|
777
777
|
overflow-y: auto;
|
|
@@ -842,7 +842,7 @@ const eo = N.div`
|
|
|
842
842
|
}
|
|
843
843
|
) }) }, p.conditionName)),
|
|
844
844
|
s.length > 0 && /* @__PURE__ */ a(W, { dashed: !0 }),
|
|
845
|
-
u && /* @__PURE__ */ a(
|
|
845
|
+
u && /* @__PURE__ */ a(_, { children: r && /* @__PURE__ */ a(
|
|
846
846
|
Re,
|
|
847
847
|
{
|
|
848
848
|
element: r.element,
|
|
@@ -856,12 +856,12 @@ const eo = N.div`
|
|
|
856
856
|
) })
|
|
857
857
|
] }) : /* @__PURE__ */ b(T, { direction: "column", gap: "12px", children: [
|
|
858
858
|
/* @__PURE__ */ b(T, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
859
|
-
/* @__PURE__ */ a(
|
|
860
|
-
/* @__PURE__ */ a(
|
|
859
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "180px" }),
|
|
860
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "85px" })
|
|
861
861
|
] }, "loading"),
|
|
862
862
|
/* @__PURE__ */ b(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
863
863
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
864
|
-
/* @__PURE__ */ a(
|
|
864
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "150px" })
|
|
865
865
|
] }),
|
|
866
866
|
/* @__PURE__ */ a(mn, { children: /* @__PURE__ */ a(
|
|
867
867
|
T,
|
|
@@ -878,8 +878,8 @@ const eo = N.div`
|
|
|
878
878
|
alignItems: "start",
|
|
879
879
|
padding: "8px",
|
|
880
880
|
children: [
|
|
881
|
-
/* @__PURE__ */ a(
|
|
882
|
-
/* @__PURE__ */ a(
|
|
881
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "180px" }),
|
|
882
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "85px" })
|
|
883
883
|
]
|
|
884
884
|
}
|
|
885
885
|
) }, `condition-${d}`))
|
|
@@ -939,7 +939,7 @@ const eo = N.div`
|
|
|
939
939
|
visibleConditions: l
|
|
940
940
|
}
|
|
941
941
|
);
|
|
942
|
-
}, mo =
|
|
942
|
+
}, mo = E.div`
|
|
943
943
|
border-radius: 8px;
|
|
944
944
|
border: 1px solid
|
|
945
945
|
${({ theme: e }) => {
|
|
@@ -955,7 +955,7 @@ const eo = N.div`
|
|
|
955
955
|
height: 100%;
|
|
956
956
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
957
957
|
`;
|
|
958
|
-
|
|
958
|
+
E.div`
|
|
959
959
|
width: 100%;
|
|
960
960
|
height: 100%;
|
|
961
961
|
overflow-y: auto;
|
|
@@ -978,7 +978,7 @@ const bo = (e) => {
|
|
|
978
978
|
const { children: t, controls: n = !0, handleDelete: r, id: o } = e;
|
|
979
979
|
return /* @__PURE__ */ a(mo, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
980
980
|
t,
|
|
981
|
-
n && /* @__PURE__ */ b(
|
|
981
|
+
n && /* @__PURE__ */ b(_, { children: [
|
|
982
982
|
/* @__PURE__ */ a(W, {}),
|
|
983
983
|
/* @__PURE__ */ a(T, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
|
|
984
984
|
B,
|
|
@@ -986,7 +986,7 @@ const bo = (e) => {
|
|
|
986
986
|
cursorHover: !0,
|
|
987
987
|
appearance: "danger",
|
|
988
988
|
size: "24px",
|
|
989
|
-
icon: /* @__PURE__ */ a(
|
|
989
|
+
icon: /* @__PURE__ */ a(vt, {}),
|
|
990
990
|
onClick: () => {
|
|
991
991
|
r(o);
|
|
992
992
|
}
|
|
@@ -995,9 +995,11 @@ const bo = (e) => {
|
|
|
995
995
|
] })
|
|
996
996
|
] }) });
|
|
997
997
|
}, vo = (e) => {
|
|
998
|
-
const { decision: t, controls: n, handleOpenModal: r, handleDelete: o, textValues: i } = e;
|
|
999
|
-
|
|
1000
|
-
|
|
998
|
+
const { decision: t, controls: n, handleOpenModal: r, handleDelete: o, textValues: i, index: c } = e;
|
|
999
|
+
if (!t) return null;
|
|
1000
|
+
const u = typeof c == "number" ? `Decision ${c + 1}` : t.decisionId;
|
|
1001
|
+
return /* @__PURE__ */ a(tt, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
1002
|
+
/* @__PURE__ */ a(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: u }),
|
|
1001
1003
|
/* @__PURE__ */ a(
|
|
1002
1004
|
bo,
|
|
1003
1005
|
{
|
|
@@ -1014,7 +1016,7 @@ const bo = (e) => {
|
|
|
1014
1016
|
)
|
|
1015
1017
|
}
|
|
1016
1018
|
)
|
|
1017
|
-
] }) }, t.decisionId)
|
|
1019
|
+
] }) }, t.decisionId);
|
|
1018
1020
|
}, yo = (e) => {
|
|
1019
1021
|
const {
|
|
1020
1022
|
customTitleContentAddCard: t,
|
|
@@ -1049,18 +1051,18 @@ const bo = (e) => {
|
|
|
1049
1051
|
loading: no,
|
|
1050
1052
|
decision: vo,
|
|
1051
1053
|
add: yo
|
|
1052
|
-
},
|
|
1054
|
+
}, Vt = (e) => {
|
|
1053
1055
|
const { type: t } = e, n = To[t];
|
|
1054
1056
|
return n ? n(e) : null;
|
|
1055
1057
|
}, xo = (e) => ({
|
|
1056
|
-
schema:
|
|
1058
|
+
schema: me().required("Requerido").test(
|
|
1057
1059
|
"non-empty",
|
|
1058
1060
|
"El valor no puede estar vacío",
|
|
1059
1061
|
(t) => t != null && t.trim() !== ""
|
|
1060
1062
|
),
|
|
1061
1063
|
value: e
|
|
1062
1064
|
}), wo = (e) => ({
|
|
1063
|
-
schema:
|
|
1065
|
+
schema: xe().test(
|
|
1064
1066
|
"isArrayOrString",
|
|
1065
1067
|
"Debe ser un array de strings/numbers o un solo string",
|
|
1066
1068
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -1069,7 +1071,7 @@ const bo = (e) => {
|
|
|
1069
1071
|
),
|
|
1070
1072
|
value: e
|
|
1071
1073
|
}), So = (e) => ({
|
|
1072
|
-
schema:
|
|
1074
|
+
schema: xe().test(
|
|
1073
1075
|
"isArrayOrString",
|
|
1074
1076
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
1075
1077
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -1080,7 +1082,7 @@ const bo = (e) => {
|
|
|
1080
1082
|
}), Co = (e) => {
|
|
1081
1083
|
const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
|
|
1082
1084
|
return {
|
|
1083
|
-
schema:
|
|
1085
|
+
schema: X({
|
|
1084
1086
|
from: ge().required("El campo 'Rango desde' es requerido").max(n, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
|
|
1085
1087
|
to: ge().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
|
|
1086
1088
|
"is-greater",
|
|
@@ -1093,27 +1095,27 @@ const bo = (e) => {
|
|
|
1093
1095
|
}),
|
|
1094
1096
|
value: { from: t, to: n }
|
|
1095
1097
|
};
|
|
1096
|
-
},
|
|
1098
|
+
}, It = (e, t) => t === H.PERCENTAGE ? {
|
|
1097
1099
|
schema: ge().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
1100
|
value: e
|
|
1099
1101
|
} : {
|
|
1100
|
-
schema:
|
|
1102
|
+
schema: me().required("Requerido"),
|
|
1101
1103
|
value: e
|
|
1102
1104
|
}, Do = {
|
|
1103
1105
|
[I.LIST_OF_VALUES]: wo,
|
|
1104
1106
|
[I.LIST_OF_VALUES_MULTI]: So,
|
|
1105
1107
|
[I.RANGE]: Co,
|
|
1106
|
-
[I.GREATER_THAN]:
|
|
1107
|
-
[I.LESS_THAN]:
|
|
1108
|
-
[I.EQUAL]:
|
|
1108
|
+
[I.GREATER_THAN]: It,
|
|
1109
|
+
[I.LESS_THAN]: It,
|
|
1110
|
+
[I.EQUAL]: It
|
|
1109
1111
|
}, No = (e) => Do[e] || xo;
|
|
1110
|
-
var
|
|
1111
|
-
const
|
|
1112
|
+
var nn = /* @__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))(nn || {});
|
|
1113
|
+
const pt = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Eo = (e, t) => {
|
|
1112
1114
|
var u;
|
|
1113
|
-
const n = Object.entries((e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}).filter(([, l]) =>
|
|
1115
|
+
const n = Object.entries((e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}).filter(([, l]) => pt(l)).map(([l, s]) => ({ conditionName: l, value: s }));
|
|
1114
1116
|
let r = [];
|
|
1115
1117
|
const o = (u = e == null ? void 0 : e.conditionGroups) == null ? void 0 : u.conditionsThatEstablishesTheDecision;
|
|
1116
|
-
Array.isArray(o) ? r = o.filter((l) =>
|
|
1118
|
+
Array.isArray(o) ? r = o.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 })) : o && typeof o == "object" && (r = Object.entries(o).filter(([, l]) => pt(l)).map(([l, s]) => ({ conditionName: l, value: s })));
|
|
1117
1119
|
const i = n.length ? n : r, c = new Map(
|
|
1118
1120
|
(t ?? []).map((l) => [l == null ? void 0 : l.conditionName, l])
|
|
1119
1121
|
);
|
|
@@ -1133,7 +1135,7 @@ function ko({
|
|
|
1133
1135
|
textValues: n
|
|
1134
1136
|
}) {
|
|
1135
1137
|
var d, h;
|
|
1136
|
-
const r = ((d = e.conditionGroups[0]) == null ? void 0 : d.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((g, f) => (
|
|
1138
|
+
const r = ((d = e.conditionGroups[0]) == null ? void 0 : d.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((g, f) => (pt(f.value) && (g[f.conditionName] = f.value), g), {}), i = Object.keys(o).length > 0, c = {
|
|
1137
1139
|
ruleName: e.ruleName || "",
|
|
1138
1140
|
decisionDataType: e.decisionDataType || H.ALPHABETICAL,
|
|
1139
1141
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
@@ -1151,14 +1153,14 @@ function ko({
|
|
|
1151
1153
|
};
|
|
1152
1154
|
let u;
|
|
1153
1155
|
const l = {
|
|
1154
|
-
ruleName:
|
|
1156
|
+
ruleName: me().required("El nombre de la regla es requerido"),
|
|
1155
1157
|
value: Qe(() => No(
|
|
1156
1158
|
u.values.howToSetTheDecision
|
|
1157
1159
|
)(
|
|
1158
1160
|
u.values.value,
|
|
1159
1161
|
u.values.decisionDataType
|
|
1160
1162
|
).schema),
|
|
1161
|
-
conditionsThatEstablishesTheDecision:
|
|
1163
|
+
conditionsThatEstablishesTheDecision: X().shape({})
|
|
1162
1164
|
};
|
|
1163
1165
|
n.terms && (l.effectiveFrom = Le().required("La fecha de inicio es requerida"), l.validUntil = Le().when(
|
|
1164
1166
|
"checkClosed",
|
|
@@ -1171,8 +1173,8 @@ function ko({
|
|
|
1171
1173
|
}
|
|
1172
1174
|
) : f.notRequired()
|
|
1173
1175
|
));
|
|
1174
|
-
const s =
|
|
1175
|
-
return u =
|
|
1176
|
+
const s = X(l);
|
|
1177
|
+
return u = en({
|
|
1176
1178
|
initialValues: c,
|
|
1177
1179
|
validationSchema: s,
|
|
1178
1180
|
validateOnBlur: !0,
|
|
@@ -1201,7 +1203,7 @@ function ko({
|
|
|
1201
1203
|
void 0
|
|
1202
1204
|
);
|
|
1203
1205
|
else if (u.values.conditionsThatEstablishesTheDecision[f.conditionName] === void 0) {
|
|
1204
|
-
const v = f.howToSetTheCondition ===
|
|
1206
|
+
const v = f.howToSetTheCondition === nn.LIST_OF_VALUES_MULTI ? [] : "";
|
|
1205
1207
|
u.setFieldValue(
|
|
1206
1208
|
`conditionsThatEstablishesTheDecision.${f.conditionName}`,
|
|
1207
1209
|
v
|
|
@@ -1210,7 +1212,7 @@ function ko({
|
|
|
1210
1212
|
});
|
|
1211
1213
|
} };
|
|
1212
1214
|
}
|
|
1213
|
-
const Ao =
|
|
1215
|
+
const Ao = E.div`
|
|
1214
1216
|
& > div {
|
|
1215
1217
|
border-radius: 8px;
|
|
1216
1218
|
border: 1px solid
|
|
@@ -1219,7 +1221,7 @@ const Ao = N.div`
|
|
|
1219
1221
|
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
1220
1222
|
}};
|
|
1221
1223
|
}
|
|
1222
|
-
`, $o =
|
|
1224
|
+
`, $o = E.div`
|
|
1223
1225
|
width: 100%;
|
|
1224
1226
|
height: 100%;
|
|
1225
1227
|
overflow-y: auto;
|
|
@@ -1246,9 +1248,9 @@ const Ao = N.div`
|
|
|
1246
1248
|
name: c,
|
|
1247
1249
|
valueToggle: u = ""
|
|
1248
1250
|
} = e, [l, s] = q(t);
|
|
1249
|
-
return /* @__PURE__ */ b(
|
|
1251
|
+
return /* @__PURE__ */ b(_, { children: [
|
|
1250
1252
|
/* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(
|
|
1251
|
-
|
|
1253
|
+
yt,
|
|
1252
1254
|
{
|
|
1253
1255
|
checked: l,
|
|
1254
1256
|
id: o,
|
|
@@ -1261,7 +1263,7 @@ const Ao = N.div`
|
|
|
1261
1263
|
children: /* @__PURE__ */ a(R, { size: "medium", type: "label", weight: "bold", as: "span", children: i })
|
|
1262
1264
|
}
|
|
1263
1265
|
) }),
|
|
1264
|
-
l && /* @__PURE__ */ a(
|
|
1266
|
+
l && /* @__PURE__ */ a(_, { children: n })
|
|
1265
1267
|
] });
|
|
1266
1268
|
}, Ro = (e) => {
|
|
1267
1269
|
const {
|
|
@@ -1278,14 +1280,14 @@ const Ao = N.div`
|
|
|
1278
1280
|
messageEnd: d = "",
|
|
1279
1281
|
statusStart: h = "pending",
|
|
1280
1282
|
statusEnd: g = "pending"
|
|
1281
|
-
} = e, [f, m] = q(c), [v, x] = q(l), [w,
|
|
1283
|
+
} = e, [f, m] = q(c), [v, x] = q(l), [w, C] = q(s), N = ({ target: F }) => {
|
|
1282
1284
|
m(F.checked), r && r(F.checked);
|
|
1283
|
-
},
|
|
1285
|
+
}, D = (F) => {
|
|
1284
1286
|
x(F.target.value), t(F);
|
|
1285
1287
|
}, k = (F) => {
|
|
1286
|
-
|
|
1287
|
-
}, L =
|
|
1288
|
-
return /* @__PURE__ */ b(
|
|
1288
|
+
C(F.target.value), n(F);
|
|
1289
|
+
}, L = ie("(max-width: 400px)");
|
|
1290
|
+
return /* @__PURE__ */ b(_, { children: [
|
|
1289
1291
|
/* @__PURE__ */ b(T, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
1290
1292
|
/* @__PURE__ */ a(
|
|
1291
1293
|
R,
|
|
@@ -1306,10 +1308,10 @@ const Ao = N.div`
|
|
|
1306
1308
|
wrap: "wrap",
|
|
1307
1309
|
gap: "4px",
|
|
1308
1310
|
children: /* @__PURE__ */ a(
|
|
1309
|
-
|
|
1311
|
+
Jt,
|
|
1310
1312
|
{
|
|
1311
1313
|
label: "Cerrada",
|
|
1312
|
-
onChange:
|
|
1314
|
+
onChange: N,
|
|
1313
1315
|
checked: f,
|
|
1314
1316
|
value: ""
|
|
1315
1317
|
}
|
|
@@ -1329,7 +1331,7 @@ const Ao = N.div`
|
|
|
1329
1331
|
{
|
|
1330
1332
|
id: "dateStart",
|
|
1331
1333
|
label: o,
|
|
1332
|
-
onChange:
|
|
1334
|
+
onChange: D,
|
|
1333
1335
|
value: v,
|
|
1334
1336
|
required: u,
|
|
1335
1337
|
size: "compact",
|
|
@@ -1368,7 +1370,7 @@ const Ao = N.div`
|
|
|
1368
1370
|
termEndStatus: p
|
|
1369
1371
|
} = e;
|
|
1370
1372
|
return /* @__PURE__ */ a("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
1371
|
-
|
|
1373
|
+
gt({
|
|
1372
1374
|
condition: i,
|
|
1373
1375
|
formik: t,
|
|
1374
1376
|
isDecision: !0
|
|
@@ -1391,7 +1393,7 @@ const Ao = N.div`
|
|
|
1391
1393
|
children: [
|
|
1392
1394
|
/* @__PURE__ */ a(R, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
|
|
1393
1395
|
/* @__PURE__ */ a(
|
|
1394
|
-
|
|
1396
|
+
yt,
|
|
1395
1397
|
{
|
|
1396
1398
|
id: "toggleNone",
|
|
1397
1399
|
onChange: () => c(!t.values.toggleNone),
|
|
@@ -1414,9 +1416,9 @@ const Ao = N.div`
|
|
|
1414
1416
|
checked: !t.values.toggleNone && ((h = t.values.conditionsThatEstablishesTheDecision) == null ? void 0 : h[d.conditionName]) !== void 0,
|
|
1415
1417
|
handleToggleChange: (g) => u(
|
|
1416
1418
|
d.conditionName,
|
|
1417
|
-
d.howToSetTheCondition ===
|
|
1419
|
+
d.howToSetTheCondition === nn.LIST_OF_VALUES_MULTI
|
|
1418
1420
|
)(g.target.checked),
|
|
1419
|
-
children:
|
|
1421
|
+
children: gt({ condition: d, formik: t })
|
|
1420
1422
|
},
|
|
1421
1423
|
d.conditionName
|
|
1422
1424
|
);
|
|
@@ -1424,7 +1426,7 @@ const Ao = N.div`
|
|
|
1424
1426
|
]
|
|
1425
1427
|
}
|
|
1426
1428
|
) }) }),
|
|
1427
|
-
n.terms && /* @__PURE__ */ b(
|
|
1429
|
+
n.terms && /* @__PURE__ */ b(_, { children: [
|
|
1428
1430
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
1429
1431
|
/* @__PURE__ */ a(
|
|
1430
1432
|
Ro,
|
|
@@ -1487,7 +1489,7 @@ const Ao = N.div`
|
|
|
1487
1489
|
`conditionsThatEstablishesTheDecision.${m}`,
|
|
1488
1490
|
!1,
|
|
1489
1491
|
!1
|
|
1490
|
-
), Object.keys(i.touched).filter((
|
|
1492
|
+
), Object.keys(i.touched).filter((C) => C.startsWith("conditionsThatEstablishesTheDecision.")).some((C) => i.touched[C] === !0) || c(!0);
|
|
1491
1493
|
else {
|
|
1492
1494
|
const w = v ? [] : "";
|
|
1493
1495
|
c(!1), i.setFieldValue(
|
|
@@ -1511,7 +1513,7 @@ const Ao = N.div`
|
|
|
1511
1513
|
handleDelete: c,
|
|
1512
1514
|
textValues: u
|
|
1513
1515
|
} = e, l = o ? Array.from({ length: 3 }).map(
|
|
1514
|
-
(p, d) =>
|
|
1516
|
+
(p, d) => Vt({
|
|
1515
1517
|
type: "loading",
|
|
1516
1518
|
index: d,
|
|
1517
1519
|
controls: t,
|
|
@@ -1522,7 +1524,8 @@ const Ao = N.div`
|
|
|
1522
1524
|
textValues: u
|
|
1523
1525
|
})
|
|
1524
1526
|
) : r == null ? void 0 : r.map(
|
|
1525
|
-
(p) =>
|
|
1527
|
+
(p, d) => Vt({
|
|
1528
|
+
index: d,
|
|
1526
1529
|
type: "decision",
|
|
1527
1530
|
decision: p,
|
|
1528
1531
|
controls: t,
|
|
@@ -1550,7 +1553,7 @@ const Ao = N.div`
|
|
|
1550
1553
|
handleSubmitForm: h,
|
|
1551
1554
|
handleDelete: g,
|
|
1552
1555
|
terms: f = !0
|
|
1553
|
-
} = e, m =
|
|
1556
|
+
} = e, m = ie("(max-width: 681px)"), v = ie("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: w } = Lo({
|
|
1554
1557
|
controls: t,
|
|
1555
1558
|
customTitleContentAddCard: n,
|
|
1556
1559
|
decisions: o,
|
|
@@ -1558,9 +1561,9 @@ const Ao = N.div`
|
|
|
1558
1561
|
handleOpenModal: p,
|
|
1559
1562
|
handleDelete: g,
|
|
1560
1563
|
textValues: i
|
|
1561
|
-
}),
|
|
1562
|
-
return /* @__PURE__ */ b(
|
|
1563
|
-
/* @__PURE__ */ a(eo, { children: /* @__PURE__ */ a(to, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children:
|
|
1564
|
+
}), C = (o == null ? void 0 : o.length) === 0 && !s;
|
|
1565
|
+
return /* @__PURE__ */ b(_, { children: [
|
|
1566
|
+
/* @__PURE__ */ a(eo, { children: /* @__PURE__ */ a(to, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ b(
|
|
1564
1567
|
T,
|
|
1565
1568
|
{
|
|
1566
1569
|
direction: "column",
|
|
@@ -1570,7 +1573,7 @@ const Ao = N.div`
|
|
|
1570
1573
|
justifyContent: "center",
|
|
1571
1574
|
alignItems: "center",
|
|
1572
1575
|
children: [
|
|
1573
|
-
/* @__PURE__ */ a(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ b(
|
|
1576
|
+
/* @__PURE__ */ a(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ b(_, { children: [
|
|
1574
1577
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1575
1578
|
/* @__PURE__ */ b(
|
|
1576
1579
|
R,
|
|
@@ -1600,7 +1603,7 @@ const Ao = N.div`
|
|
|
1600
1603
|
]
|
|
1601
1604
|
}
|
|
1602
1605
|
) : /* @__PURE__ */ b(
|
|
1603
|
-
|
|
1606
|
+
we,
|
|
1604
1607
|
{
|
|
1605
1608
|
templateColumns: v ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
1606
1609
|
autoFlow: "row dense",
|
|
@@ -1613,7 +1616,7 @@ const Ao = N.div`
|
|
|
1613
1616
|
height: m ? "auto" : "484px",
|
|
1614
1617
|
children: [
|
|
1615
1618
|
x,
|
|
1616
|
-
w &&
|
|
1619
|
+
w && Vt({
|
|
1617
1620
|
type: "add",
|
|
1618
1621
|
index: o == null ? void 0 : o.length,
|
|
1619
1622
|
controls: t,
|
|
@@ -1623,7 +1626,7 @@ const Ao = N.div`
|
|
|
1623
1626
|
handleOpenModal: p,
|
|
1624
1627
|
handleDelete: g,
|
|
1625
1628
|
textValues: i,
|
|
1626
|
-
shouldRenderEmptyMessage:
|
|
1629
|
+
shouldRenderEmptyMessage: C,
|
|
1627
1630
|
terms: f
|
|
1628
1631
|
})
|
|
1629
1632
|
]
|
|
@@ -1679,7 +1682,7 @@ const Ao = N.div`
|
|
|
1679
1682
|
return t;
|
|
1680
1683
|
}
|
|
1681
1684
|
return typeof t == "object" && t !== null && !Array.isArray(t) ? "from" in t && "to" in t ? t : (zo[e == null ? void 0 : e.howToSetTheDecision] || Mo)(t) : t || void 0;
|
|
1682
|
-
}, Ho =
|
|
1685
|
+
}, Ho = E.div`
|
|
1683
1686
|
display: flex;
|
|
1684
1687
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
1685
1688
|
align-items: ${({ $alignItems: e }) => e};
|
|
@@ -1702,7 +1705,7 @@ const Ao = N.div`
|
|
|
1702
1705
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
1703
1706
|
box-sizing: ${({ $boxSizing: e }) => e};
|
|
1704
1707
|
overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
|
|
1705
|
-
`,
|
|
1708
|
+
`, ue = j.forwardRef(
|
|
1706
1709
|
(e, t) => {
|
|
1707
1710
|
const {
|
|
1708
1711
|
children: n,
|
|
@@ -1746,8 +1749,8 @@ const Ao = N.div`
|
|
|
1746
1749
|
);
|
|
1747
1750
|
}
|
|
1748
1751
|
);
|
|
1749
|
-
|
|
1750
|
-
|
|
1752
|
+
ue.displayName = "BorderStack";
|
|
1753
|
+
E.div`
|
|
1751
1754
|
& > div {
|
|
1752
1755
|
border-radius: 8px;
|
|
1753
1756
|
border: 1px solid
|
|
@@ -1757,7 +1760,7 @@ N.div`
|
|
|
1757
1760
|
}};
|
|
1758
1761
|
}
|
|
1759
1762
|
`;
|
|
1760
|
-
|
|
1763
|
+
E.div`
|
|
1761
1764
|
width: 100%;
|
|
1762
1765
|
height: 100%;
|
|
1763
1766
|
overflow-y: auto;
|
|
@@ -1776,19 +1779,19 @@ N.div`
|
|
|
1776
1779
|
border-radius: 8px;
|
|
1777
1780
|
}
|
|
1778
1781
|
`;
|
|
1779
|
-
const Bo =
|
|
1782
|
+
const Bo = E.div`
|
|
1780
1783
|
cursor: pointer;
|
|
1781
|
-
`, qo =
|
|
1784
|
+
`, qo = E.div`
|
|
1782
1785
|
& > div > div > div > p {
|
|
1783
1786
|
text-wrap-mode: nowrap;
|
|
1784
1787
|
}
|
|
1785
|
-
`, Wo =
|
|
1788
|
+
`, Wo = E.div`
|
|
1786
1789
|
& > div {
|
|
1787
1790
|
justify-content: auto;
|
|
1788
1791
|
gap: 8px;
|
|
1789
1792
|
}
|
|
1790
1793
|
`;
|
|
1791
|
-
var
|
|
1794
|
+
var re = /* @__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))(re || {});
|
|
1792
1795
|
const Yo = (e) => {
|
|
1793
1796
|
const {
|
|
1794
1797
|
controls: t,
|
|
@@ -1809,9 +1812,9 @@ const Yo = (e) => {
|
|
|
1809
1812
|
tabs: v,
|
|
1810
1813
|
selectedTab: x,
|
|
1811
1814
|
onTabChange: w,
|
|
1812
|
-
currentConditions:
|
|
1813
|
-
hasMultipleGroups:
|
|
1814
|
-
editionMode:
|
|
1815
|
+
currentConditions: C,
|
|
1816
|
+
hasMultipleGroups: N,
|
|
1817
|
+
editionMode: D = "versioned"
|
|
1815
1818
|
} = e;
|
|
1816
1819
|
return i ? /* @__PURE__ */ b(T, { direction: "column", gap: "16px", children: [
|
|
1817
1820
|
/* @__PURE__ */ a(Bo, { onClick: s, children: /* @__PURE__ */ b(
|
|
@@ -1831,19 +1834,19 @@ const Yo = (e) => {
|
|
|
1831
1834
|
}
|
|
1832
1835
|
) }),
|
|
1833
1836
|
/* @__PURE__ */ a(Wo, { children: /* @__PURE__ */ a(
|
|
1834
|
-
|
|
1837
|
+
lt,
|
|
1835
1838
|
{
|
|
1836
1839
|
element: o,
|
|
1837
1840
|
valueData: Xe(
|
|
1838
1841
|
o
|
|
1839
1842
|
),
|
|
1840
1843
|
type: "decision",
|
|
1841
|
-
editionMode:
|
|
1844
|
+
editionMode: D
|
|
1842
1845
|
}
|
|
1843
1846
|
) })
|
|
1844
1847
|
] }),
|
|
1845
1848
|
/* @__PURE__ */ b(T, { gap: "12px", children: [
|
|
1846
|
-
t && /* @__PURE__ */ b(
|
|
1849
|
+
t && /* @__PURE__ */ b(_, { children: [
|
|
1847
1850
|
/* @__PURE__ */ a(
|
|
1848
1851
|
B,
|
|
1849
1852
|
{
|
|
@@ -1860,7 +1863,7 @@ const Yo = (e) => {
|
|
|
1860
1863
|
B,
|
|
1861
1864
|
{
|
|
1862
1865
|
appearance: "danger",
|
|
1863
|
-
icon: /* @__PURE__ */ a(
|
|
1866
|
+
icon: /* @__PURE__ */ a(vt, {}),
|
|
1864
1867
|
size: "24px",
|
|
1865
1868
|
cursorHover: !0,
|
|
1866
1869
|
onClick: (k) => {
|
|
@@ -1873,7 +1876,7 @@ const Yo = (e) => {
|
|
|
1873
1876
|
B,
|
|
1874
1877
|
{
|
|
1875
1878
|
appearance: "dark",
|
|
1876
|
-
icon: l ? /* @__PURE__ */ a(sr, {}) : /* @__PURE__ */ a(
|
|
1879
|
+
icon: l ? /* @__PURE__ */ a(sr, {}) : /* @__PURE__ */ a(jt, {}),
|
|
1877
1880
|
size: "24px",
|
|
1878
1881
|
cursorHover: !0
|
|
1879
1882
|
}
|
|
@@ -1883,9 +1886,9 @@ const Yo = (e) => {
|
|
|
1883
1886
|
},
|
|
1884
1887
|
r.ruleName
|
|
1885
1888
|
) }),
|
|
1886
|
-
l && /* @__PURE__ */ b(
|
|
1889
|
+
l && /* @__PURE__ */ b(_, { children: [
|
|
1887
1890
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
1888
|
-
|
|
1891
|
+
N ? /* @__PURE__ */ a(
|
|
1889
1892
|
Vn,
|
|
1890
1893
|
{
|
|
1891
1894
|
tabs: v,
|
|
@@ -1911,61 +1914,61 @@ const Yo = (e) => {
|
|
|
1911
1914
|
gap: "8px",
|
|
1912
1915
|
justifyContent: n,
|
|
1913
1916
|
children: [
|
|
1914
|
-
|
|
1915
|
-
|
|
1917
|
+
C.map((k) => /* @__PURE__ */ a(
|
|
1918
|
+
ue,
|
|
1916
1919
|
{
|
|
1917
1920
|
direction: "column",
|
|
1918
1921
|
padding: "6px 12px",
|
|
1919
1922
|
borderRadius: "8px",
|
|
1920
1923
|
background: !0,
|
|
1921
1924
|
children: /* @__PURE__ */ a(
|
|
1922
|
-
|
|
1925
|
+
lt,
|
|
1923
1926
|
{
|
|
1924
1927
|
element: {
|
|
1925
1928
|
...k,
|
|
1926
1929
|
value: k.value,
|
|
1927
|
-
howToSetTheCondition: k.howToSetTheCondition ===
|
|
1930
|
+
howToSetTheCondition: k.howToSetTheCondition === re.LIST_OF_VALUES ? re.LIST_OF_VALUES_MULTI : k.howToSetTheCondition
|
|
1928
1931
|
},
|
|
1929
1932
|
valueData: Xe(
|
|
1930
1933
|
k
|
|
1931
1934
|
),
|
|
1932
|
-
editionMode:
|
|
1935
|
+
editionMode: D
|
|
1933
1936
|
}
|
|
1934
1937
|
)
|
|
1935
1938
|
},
|
|
1936
1939
|
k.conditionName
|
|
1937
1940
|
)),
|
|
1938
1941
|
p && h && /* @__PURE__ */ a(
|
|
1939
|
-
|
|
1942
|
+
ue,
|
|
1940
1943
|
{
|
|
1941
1944
|
direction: "column",
|
|
1942
1945
|
padding: "6px 12px",
|
|
1943
1946
|
borderRadius: "8px",
|
|
1944
1947
|
background: !0,
|
|
1945
1948
|
children: /* @__PURE__ */ a(
|
|
1946
|
-
|
|
1949
|
+
lt,
|
|
1947
1950
|
{
|
|
1948
1951
|
element: h.element,
|
|
1949
1952
|
valueData: h.valueData,
|
|
1950
|
-
editionMode:
|
|
1953
|
+
editionMode: D
|
|
1951
1954
|
},
|
|
1952
1955
|
"effectiveFrom"
|
|
1953
1956
|
)
|
|
1954
1957
|
}
|
|
1955
1958
|
),
|
|
1956
1959
|
d && g && /* @__PURE__ */ a(
|
|
1957
|
-
|
|
1960
|
+
ue,
|
|
1958
1961
|
{
|
|
1959
1962
|
direction: "column",
|
|
1960
1963
|
padding: "6px 12px",
|
|
1961
1964
|
borderRadius: "8px",
|
|
1962
1965
|
background: !0,
|
|
1963
1966
|
children: /* @__PURE__ */ a(
|
|
1964
|
-
|
|
1967
|
+
lt,
|
|
1965
1968
|
{
|
|
1966
1969
|
element: g.element,
|
|
1967
1970
|
valueData: g.valueData,
|
|
1968
|
-
editionMode:
|
|
1971
|
+
editionMode: D
|
|
1969
1972
|
},
|
|
1970
1973
|
"validUntil"
|
|
1971
1974
|
)
|
|
@@ -1977,40 +1980,40 @@ const Yo = (e) => {
|
|
|
1977
1980
|
] })
|
|
1978
1981
|
] }) : /* @__PURE__ */ b(T, { justifyContent: "space-between", children: [
|
|
1979
1982
|
/* @__PURE__ */ b(T, { alignItems: "center", gap: "8px", children: [
|
|
1980
|
-
/* @__PURE__ */ a(
|
|
1981
|
-
/* @__PURE__ */ a(
|
|
1983
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "150px" }),
|
|
1984
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "70px" })
|
|
1982
1985
|
] }),
|
|
1983
1986
|
/* @__PURE__ */ b(T, { alignItems: "center", gap: "8px", children: [
|
|
1984
|
-
/* @__PURE__ */ a(
|
|
1987
|
+
/* @__PURE__ */ a(oe, { animated: !0, width: "50px" }),
|
|
1985
1988
|
/* @__PURE__ */ a(xr, { animated: !0 })
|
|
1986
1989
|
] })
|
|
1987
1990
|
] });
|
|
1988
|
-
}, bn = (e) => !e || typeof e != "object" || Array.isArray(e) ? !1 : Object.values(e).some(Array.isArray),
|
|
1991
|
+
}, bn = (e) => !e || typeof e != "object" || Array.isArray(e) ? !1 : Object.values(e).some(Array.isArray), ht = (e) => {
|
|
1989
1992
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
1990
1993
|
for (const r of e) {
|
|
1991
1994
|
const o = String((r == null ? void 0 : r.conditionName) ?? "");
|
|
1992
1995
|
t.has(o) || (t.add(o), n.push(r));
|
|
1993
1996
|
}
|
|
1994
1997
|
return n;
|
|
1995
|
-
},
|
|
1998
|
+
}, Te = (e) => {
|
|
1996
1999
|
if (!e) return {};
|
|
1997
2000
|
if (bn(e.conditionsThatEstablishesTheDecision)) {
|
|
1998
2001
|
const t = e.conditionsThatEstablishesTheDecision;
|
|
1999
2002
|
return Object.fromEntries(
|
|
2000
|
-
Object.entries(t).map(([n, r]) => [n,
|
|
2003
|
+
Object.entries(t).map(([n, r]) => [n, ht(r)])
|
|
2001
2004
|
);
|
|
2002
2005
|
}
|
|
2003
2006
|
if (Array.isArray(e.conditionGroups)) {
|
|
2004
2007
|
const t = e.conditionGroups.map((n) => [
|
|
2005
2008
|
n.ConditionGroupId,
|
|
2006
|
-
|
|
2009
|
+
ht(
|
|
2007
2010
|
Array.isArray(n.conditionsThatEstablishesTheDecision) ? n.conditionsThatEstablishesTheDecision : []
|
|
2008
2011
|
)
|
|
2009
2012
|
]);
|
|
2010
2013
|
return Object.fromEntries(t);
|
|
2011
2014
|
}
|
|
2012
2015
|
return bn(e) ? Object.fromEntries(
|
|
2013
|
-
Object.entries(e).map(([t, n]) => [t,
|
|
2016
|
+
Object.entries(e).map(([t, n]) => [t, ht(n)])
|
|
2014
2017
|
) : {};
|
|
2015
2018
|
}, Bn = (e, t) => Object.fromEntries(
|
|
2016
2019
|
Object.entries(e).map(([n, r]) => [n, r.filter(t)])
|
|
@@ -2018,7 +2021,7 @@ const Yo = (e) => {
|
|
|
2018
2021
|
Year: { label: "en años", labelView: "años" },
|
|
2019
2022
|
Month: { label: "en meses", labelView: "meses" },
|
|
2020
2023
|
Day: { label: "en días", labelView: "días" }
|
|
2021
|
-
},
|
|
2024
|
+
}, Pt = (e, t, n = !1) => {
|
|
2022
2025
|
const r = Xo[t ?? ""];
|
|
2023
2026
|
return r ? n ? `${e} ${r.labelView}` : `${e} ${r.label}` : e;
|
|
2024
2027
|
}, Qo = (e, t) => {
|
|
@@ -2038,7 +2041,7 @@ const Yo = (e) => {
|
|
|
2038
2041
|
default:
|
|
2039
2042
|
return String(n);
|
|
2040
2043
|
}
|
|
2041
|
-
},
|
|
2044
|
+
}, st = (e) => {
|
|
2042
2045
|
if (e == null || e === "") return "";
|
|
2043
2046
|
const t = [
|
|
2044
2047
|
"Ene",
|
|
@@ -2063,7 +2066,7 @@ const Yo = (e) => {
|
|
|
2063
2066
|
if (isNaN(r.getTime())) return "";
|
|
2064
2067
|
const o = r.getUTCDate(), i = r.getUTCMonth(), c = r.getUTCFullYear(), u = String(o).padStart(2, "0"), l = t[i] ?? "";
|
|
2065
2068
|
return l ? `${u}/${l}/${c}` : "";
|
|
2066
|
-
},
|
|
2069
|
+
}, Ut = (e) => {
|
|
2067
2070
|
if (e == null) return !1;
|
|
2068
2071
|
if (typeof e == "number") return !Number.isNaN(e);
|
|
2069
2072
|
if (typeof e == "string") return e.trim().length > 0;
|
|
@@ -2071,10 +2074,10 @@ const Yo = (e) => {
|
|
|
2071
2074
|
if (typeof e == "object") {
|
|
2072
2075
|
if (Object.keys(e).length === 0) return !1;
|
|
2073
2076
|
const n = e.from ?? e.min ?? e.start, r = e.to ?? e.max ?? e.end;
|
|
2074
|
-
return n !== void 0 || r !== void 0 ?
|
|
2077
|
+
return n !== void 0 || r !== void 0 ? Ut(n) || Ut(r) : !0;
|
|
2075
2078
|
}
|
|
2076
2079
|
return !1;
|
|
2077
|
-
}, Jo = (e) =>
|
|
2080
|
+
}, Jo = (e) => Ut(e == null ? void 0 : e.value), ft = (e, t) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(t).padStart(2, "0")}`, Zo = (e) => {
|
|
2078
2081
|
var i, c;
|
|
2079
2082
|
const t = ((i = e.listOfPossibleValues) == null ? void 0 : i.list) ?? [], n = e.value, r = Array.isArray(n) ? n : [n];
|
|
2080
2083
|
return { list: ((c = t.filter((u) => r.includes(u.value)).map((u, l) => ({
|
|
@@ -2083,7 +2086,7 @@ const Yo = (e) => {
|
|
|
2083
2086
|
value: u.label
|
|
2084
2087
|
}))[0]) == null ? void 0 : c.label) ?? "" };
|
|
2085
2088
|
}, qn = (e) => {
|
|
2086
|
-
var
|
|
2089
|
+
var kt, At, Pe;
|
|
2087
2090
|
const {
|
|
2088
2091
|
cardTitle: t = !0,
|
|
2089
2092
|
decision: n,
|
|
@@ -2099,100 +2102,100 @@ const Yo = (e) => {
|
|
|
2099
2102
|
} = e, h = !!(n != null && n.effectiveFrom), g = !!(n != null && n.validUntil), f = h ? {
|
|
2100
2103
|
element: {
|
|
2101
2104
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2102
|
-
value:
|
|
2105
|
+
value: st(n.effectiveFrom),
|
|
2103
2106
|
howToSetTheDecision: P.EQUAL,
|
|
2104
2107
|
decisionDataType: H.DATE
|
|
2105
2108
|
},
|
|
2106
2109
|
valueData: Xe({
|
|
2107
2110
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2108
|
-
value:
|
|
2111
|
+
value: st(n.effectiveFrom),
|
|
2109
2112
|
howToSetTheDecision: P.EQUAL,
|
|
2110
2113
|
decisionDataType: H.DATE
|
|
2111
2114
|
})
|
|
2112
2115
|
} : null, m = g ? {
|
|
2113
2116
|
element: {
|
|
2114
2117
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2115
|
-
value:
|
|
2118
|
+
value: st(n.validUntil),
|
|
2116
2119
|
howToSetTheDecision: P.EQUAL,
|
|
2117
2120
|
decisionDataType: H.DATE
|
|
2118
2121
|
},
|
|
2119
2122
|
valueData: Xe({
|
|
2120
2123
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2121
|
-
value:
|
|
2124
|
+
value: st(n.validUntil),
|
|
2122
2125
|
howToSetTheDecision: P.EQUAL,
|
|
2123
2126
|
decisionDataType: H.DATE
|
|
2124
2127
|
})
|
|
2125
|
-
} : null, v = (n == null ? void 0 : n.howToSetTheDecision) || P.EQUAL, x = v === P.LIST_OF_VALUES || v === P.LIST_OF_VALUES_MULTI, w = n && (x ? Zo(n).list : n.i18nValue ?? Xe(n)),
|
|
2128
|
+
} : null, v = (n == null ? void 0 : n.howToSetTheDecision) || P.EQUAL, x = v === P.LIST_OF_VALUES || v === P.LIST_OF_VALUES_MULTI, w = n && (x ? Zo(n).list : n.i18nValue ?? Xe(n)), C = n ? {
|
|
2126
2129
|
labelName: t && n.labelName || "",
|
|
2127
2130
|
decisionDataType: n.decisionDataType || H.ALPHABETICAL,
|
|
2128
2131
|
value: w,
|
|
2129
2132
|
howToSetTheDecision: n.i18nValue ? P.EQUAL : v,
|
|
2130
2133
|
validUntil: n.validUntil
|
|
2131
|
-
} : null,
|
|
2132
|
-
() => n ?
|
|
2134
|
+
} : null, N = j.useMemo(
|
|
2135
|
+
() => n ? Te(n) : {},
|
|
2133
2136
|
[n]
|
|
2134
|
-
),
|
|
2135
|
-
const M = {}, $ =
|
|
2137
|
+
), D = ((At = (kt = n == null ? void 0 : n.conditionGroups) == null ? void 0 : kt.map((M) => M == null ? void 0 : M.ConditionGroupId)) == null ? void 0 : At.filter(Boolean)) || Object.keys(N), k = D[0] || "group-primary", L = j.useMemo(() => {
|
|
2138
|
+
const M = {}, $ = N[k] || [], O = N["group-primary"] || [];
|
|
2136
2139
|
M["group-primary"] = k === "group-primary" ? O : [...$, ...O];
|
|
2137
|
-
for (const
|
|
2138
|
-
!
|
|
2139
|
-
for (const
|
|
2140
|
-
|
|
2140
|
+
for (const S of D)
|
|
2141
|
+
!S || S === k || S !== "group-primary" && N[S] && (M[S] = N[S]);
|
|
2142
|
+
for (const S of Object.keys(N))
|
|
2143
|
+
S === "group-primary" || S === k || S in M || (M[S] = N[S]);
|
|
2141
2144
|
return M;
|
|
2142
|
-
}, [
|
|
2145
|
+
}, [N, k, D]), F = j.useMemo(() => {
|
|
2143
2146
|
const M = {};
|
|
2144
2147
|
return Object.keys(L).forEach(($) => {
|
|
2145
2148
|
const O = L[$];
|
|
2146
|
-
O && Array.isArray(O) ? M[$] = O.map((
|
|
2147
|
-
let
|
|
2148
|
-
|
|
2149
|
-
let U =
|
|
2150
|
-
return (
|
|
2151
|
-
|
|
2152
|
-
|
|
2149
|
+
O && Array.isArray(O) ? M[$] = O.map((S) => {
|
|
2150
|
+
let z = S.labelName;
|
|
2151
|
+
S.timeUnit && S.labelName && (z = Pt(S.labelName, S.timeUnit));
|
|
2152
|
+
let U = S.value;
|
|
2153
|
+
return (S == null ? void 0 : S.howToSetTheCondition) !== void 0 && (S == null ? void 0 : S.howToSetTheCondition) !== null && (S == null ? void 0 : S.value) !== void 0 && (S == null ? void 0 : S.value) !== null && (S == null ? void 0 : S.value) !== "" && (U = Qo(
|
|
2154
|
+
S.value,
|
|
2155
|
+
S.howToSetTheCondition
|
|
2153
2156
|
)), {
|
|
2154
|
-
...
|
|
2155
|
-
labelName:
|
|
2157
|
+
...S,
|
|
2158
|
+
labelName: z,
|
|
2156
2159
|
value: U
|
|
2157
2160
|
};
|
|
2158
2161
|
}) : M[$] = O;
|
|
2159
2162
|
}), M;
|
|
2160
|
-
}, [L]),
|
|
2163
|
+
}, [L]), le = Bn(
|
|
2161
2164
|
F,
|
|
2162
2165
|
(M) => !M.hidden
|
|
2163
|
-
),
|
|
2164
|
-
const M = Object.entries(
|
|
2165
|
-
([O,
|
|
2166
|
+
), K = j.useMemo(() => {
|
|
2167
|
+
const M = Object.entries(le).map(
|
|
2168
|
+
([O, S]) => [O, S.filter(Jo)]
|
|
2166
2169
|
), $ = {};
|
|
2167
|
-
for (const [O,
|
|
2168
|
-
|
|
2170
|
+
for (const [O, S] of M)
|
|
2171
|
+
S.length > 0 && ($[O] = S);
|
|
2169
2172
|
return $;
|
|
2170
|
-
}, [
|
|
2171
|
-
const M = Object.keys(
|
|
2173
|
+
}, [le]), se = j.useMemo(() => {
|
|
2174
|
+
const M = Object.keys(K);
|
|
2172
2175
|
return M.includes("group-primary") ? ["group-primary", ...M.filter(($) => $ !== "group-primary")] : M;
|
|
2173
|
-
}, [
|
|
2174
|
-
let
|
|
2175
|
-
const nt =
|
|
2176
|
-
const $ = M === "group-primary" ? "mainCondition" : `alternateCondition-${
|
|
2176
|
+
}, [K]), Ie = {};
|
|
2177
|
+
let Ct = 1;
|
|
2178
|
+
const nt = se.map((M) => {
|
|
2179
|
+
const $ = M === "group-primary" ? "mainCondition" : `alternateCondition-${Ct++}`;
|
|
2177
2180
|
return Ie[$] = M, {
|
|
2178
2181
|
id: $,
|
|
2179
|
-
label: M === "group-primary" ?
|
|
2182
|
+
label: M === "group-primary" ? ft(M, 0) : ft(M, Number($.split("-").at(-1))),
|
|
2180
2183
|
isDisabled: !1
|
|
2181
2184
|
};
|
|
2182
|
-
}), [_e,
|
|
2185
|
+
}), [_e, Dt] = j.useState(
|
|
2183
2186
|
((Pe = nt[0]) == null ? void 0 : Pe.id) ?? "mainCondition"
|
|
2184
|
-
),
|
|
2187
|
+
), Nt = (M) => Dt(M), rt = Ie[_e] ?? se[0] ?? "group-primary", ot = K[rt] ?? [], it = se.length > 1, Et = Array.from({ length: 5 }), Ve = !!(!r && n && o && C), sn = ot.length < 2 ? "start" : "space-between", dn = `N° ${String((i ?? 0) + 1).padStart(2, "0")}`;
|
|
2185
2188
|
return /* @__PURE__ */ a(
|
|
2186
2189
|
Yo,
|
|
2187
2190
|
{
|
|
2188
|
-
conditionsAlignment:
|
|
2191
|
+
conditionsAlignment: sn,
|
|
2189
2192
|
controls: p,
|
|
2190
2193
|
decision: n,
|
|
2191
|
-
decisionMapper:
|
|
2194
|
+
decisionMapper: C,
|
|
2192
2195
|
loading: Ve,
|
|
2193
|
-
skeleton:
|
|
2196
|
+
skeleton: Et,
|
|
2194
2197
|
textValues: o,
|
|
2195
|
-
tagLabel:
|
|
2198
|
+
tagLabel: dn,
|
|
2196
2199
|
isOpen: c,
|
|
2197
2200
|
onToggle: u,
|
|
2198
2201
|
hasEffectiveFrom: h,
|
|
@@ -2203,13 +2206,13 @@ const Yo = (e) => {
|
|
|
2203
2206
|
onDelete: s,
|
|
2204
2207
|
tabs: nt,
|
|
2205
2208
|
selectedTab: _e,
|
|
2206
|
-
onTabChange:
|
|
2209
|
+
onTabChange: Nt,
|
|
2207
2210
|
currentConditions: ot,
|
|
2208
2211
|
hasMultipleGroups: it,
|
|
2209
2212
|
editionMode: d
|
|
2210
2213
|
}
|
|
2211
2214
|
);
|
|
2212
|
-
}, Ko =
|
|
2215
|
+
}, Ko = Zt`
|
|
2213
2216
|
from {
|
|
2214
2217
|
opacity: 0;
|
|
2215
2218
|
transform: translateY(20px);
|
|
@@ -2219,7 +2222,7 @@ const Yo = (e) => {
|
|
|
2219
2222
|
transform: translateY(0);
|
|
2220
2223
|
}
|
|
2221
2224
|
`;
|
|
2222
|
-
|
|
2225
|
+
E.div`
|
|
2223
2226
|
border-radius: 8px;
|
|
2224
2227
|
border: 1px solid
|
|
2225
2228
|
${({ theme: e }) => {
|
|
@@ -2233,7 +2236,7 @@ N.div`
|
|
|
2233
2236
|
height: 100%;
|
|
2234
2237
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
2235
2238
|
`;
|
|
2236
|
-
|
|
2239
|
+
E.div`
|
|
2237
2240
|
& > div {
|
|
2238
2241
|
border-radius: 8px;
|
|
2239
2242
|
border: 1px solid
|
|
@@ -2243,7 +2246,7 @@ N.div`
|
|
|
2243
2246
|
}};
|
|
2244
2247
|
}
|
|
2245
2248
|
`;
|
|
2246
|
-
const ei =
|
|
2249
|
+
const ei = E.div`
|
|
2247
2250
|
& > div {
|
|
2248
2251
|
box-shadow: 0px 2px 3px 0px
|
|
2249
2252
|
${({ theme: e }) => {
|
|
@@ -2252,18 +2255,18 @@ const ei = N.div`
|
|
|
2252
2255
|
}};
|
|
2253
2256
|
cursor: pointer;
|
|
2254
2257
|
}
|
|
2255
|
-
`, ti =
|
|
2258
|
+
`, ti = E.div`
|
|
2256
2259
|
width: 100%;
|
|
2257
2260
|
height: 100%;
|
|
2258
2261
|
& > div {
|
|
2259
2262
|
animation: ${Ko} 600ms ease-out;
|
|
2260
2263
|
}
|
|
2261
|
-
`, ni =
|
|
2264
|
+
`, ni = E.div`
|
|
2262
2265
|
& > div > div {
|
|
2263
2266
|
border-radius: 8px;
|
|
2264
2267
|
box-sizing: border-box;
|
|
2265
2268
|
}
|
|
2266
|
-
`, ri =
|
|
2269
|
+
`, ri = E.div`
|
|
2267
2270
|
& > div {
|
|
2268
2271
|
width: 100%;
|
|
2269
2272
|
height: 100%;
|
|
@@ -2345,7 +2348,7 @@ const ei = N.div`
|
|
|
2345
2348
|
{
|
|
2346
2349
|
onClick: () => r ? r() : null,
|
|
2347
2350
|
children: /* @__PURE__ */ a(
|
|
2348
|
-
|
|
2351
|
+
ue,
|
|
2349
2352
|
{
|
|
2350
2353
|
direction: "column",
|
|
2351
2354
|
gap: "4px",
|
|
@@ -2381,7 +2384,7 @@ const ei = N.div`
|
|
|
2381
2384
|
loading: oi,
|
|
2382
2385
|
decision: ii,
|
|
2383
2386
|
add: ai
|
|
2384
|
-
},
|
|
2387
|
+
}, Gt = (e) => {
|
|
2385
2388
|
const { type: t } = e, n = li[t];
|
|
2386
2389
|
return n ? n(e) : null;
|
|
2387
2390
|
}, si = (e) => {
|
|
@@ -2398,7 +2401,7 @@ const ei = N.div`
|
|
|
2398
2401
|
toggleAt: p,
|
|
2399
2402
|
editionMode: d
|
|
2400
2403
|
} = e, h = i ? Array.from({ length: 3 }).map(
|
|
2401
|
-
(f, m) =>
|
|
2404
|
+
(f, m) => Gt({
|
|
2402
2405
|
type: "loading",
|
|
2403
2406
|
index: m,
|
|
2404
2407
|
controls: n,
|
|
@@ -2410,7 +2413,7 @@ const ei = N.div`
|
|
|
2410
2413
|
editionMode: d
|
|
2411
2414
|
})
|
|
2412
2415
|
) : o == null ? void 0 : o.map(
|
|
2413
|
-
(f, m) =>
|
|
2416
|
+
(f, m) => Gt({
|
|
2414
2417
|
cardTitle: t,
|
|
2415
2418
|
type: "decision",
|
|
2416
2419
|
decision: f,
|
|
@@ -2427,13 +2430,13 @@ const ei = N.div`
|
|
|
2427
2430
|
})
|
|
2428
2431
|
), g = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !i && n;
|
|
2429
2432
|
return { renderedCards: h, shouldRenderAddCard: g };
|
|
2430
|
-
}, di =
|
|
2433
|
+
}, di = E.div`
|
|
2431
2434
|
position: relative;
|
|
2432
2435
|
& > div {
|
|
2433
2436
|
padding: 24px 16px;
|
|
2434
2437
|
place-items: unset;
|
|
2435
2438
|
}
|
|
2436
|
-
`, ci =
|
|
2439
|
+
`, ci = E.div`
|
|
2437
2440
|
background-color: ${({ theme: e }) => {
|
|
2438
2441
|
var t, n;
|
|
2439
2442
|
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || A.palette.neutral.N0;
|
|
@@ -2471,9 +2474,9 @@ const ei = N.div`
|
|
|
2471
2474
|
throw new Error(
|
|
2472
2475
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
2473
2476
|
);
|
|
2474
|
-
const u =
|
|
2475
|
-
return
|
|
2476
|
-
/* @__PURE__ */ a(di, { smallScreen: u, children: /* @__PURE__ */ a(
|
|
2477
|
+
const u = ie("(max-width: 400px)");
|
|
2478
|
+
return Kt(
|
|
2479
|
+
/* @__PURE__ */ a(di, { smallScreen: u, children: /* @__PURE__ */ a(Qt, { children: /* @__PURE__ */ a(ci, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
2477
2480
|
/* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
2478
2481
|
/* @__PURE__ */ b(T, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2479
2482
|
/* @__PURE__ */ b(T, { direction: "column", gap: "8px", children: [
|
|
@@ -2489,7 +2492,7 @@ const ei = N.div`
|
|
|
2489
2492
|
),
|
|
2490
2493
|
/* @__PURE__ */ a(R, { size: "medium", appearance: "gray", children: n })
|
|
2491
2494
|
] }),
|
|
2492
|
-
/* @__PURE__ */ a(
|
|
2495
|
+
/* @__PURE__ */ a(Xt, { size: "24px", cursor: "pointer", onClick: o })
|
|
2493
2496
|
] }),
|
|
2494
2497
|
/* @__PURE__ */ a(W, { dashed: !0 })
|
|
2495
2498
|
] }),
|
|
@@ -2498,14 +2501,14 @@ const ei = N.div`
|
|
|
2498
2501
|
c
|
|
2499
2502
|
);
|
|
2500
2503
|
}, pi = (e) => ({
|
|
2501
|
-
schema:
|
|
2504
|
+
schema: me().required("Requerido").test(
|
|
2502
2505
|
"non-empty",
|
|
2503
2506
|
"El valor no puede estar vacío",
|
|
2504
2507
|
(t) => t != null && t.trim() !== ""
|
|
2505
2508
|
),
|
|
2506
2509
|
value: e
|
|
2507
2510
|
}), hi = (e) => ({
|
|
2508
|
-
schema:
|
|
2511
|
+
schema: xe().test(
|
|
2509
2512
|
"isArrayOrString",
|
|
2510
2513
|
"Por favor selecciona una opcion",
|
|
2511
2514
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -2514,7 +2517,7 @@ const ei = N.div`
|
|
|
2514
2517
|
),
|
|
2515
2518
|
value: e
|
|
2516
2519
|
}), gi = (e) => ({
|
|
2517
|
-
schema:
|
|
2520
|
+
schema: xe().test(
|
|
2518
2521
|
"isArrayOrString",
|
|
2519
2522
|
"Por favor selecciona al menos una opcion",
|
|
2520
2523
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -2522,28 +2525,28 @@ const ei = N.div`
|
|
|
2522
2525
|
) : typeof t == "string"
|
|
2523
2526
|
),
|
|
2524
2527
|
value: e
|
|
2525
|
-
}),
|
|
2528
|
+
}), dt = "Por favor escribe un valor", vn = "Por favor escribe un valor mayor que 0", fi = "El valor desde no puede ser mayor que el valor hasta", mi = "El valor hasta debe ser mayor que el valor desde", yn = (e, t) => {
|
|
2526
2529
|
if (t !== "")
|
|
2527
2530
|
return e;
|
|
2528
2531
|
}, bi = (e) => {
|
|
2529
2532
|
const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
|
|
2530
2533
|
return {
|
|
2531
|
-
schema:
|
|
2532
|
-
from: ge().transform(yn).typeError(
|
|
2534
|
+
schema: X({
|
|
2535
|
+
from: ge().transform(yn).typeError(dt).required(dt).moreThan(0, vn).test("from<=to", fi, function(r) {
|
|
2533
2536
|
const { to: o } = this.parent;
|
|
2534
2537
|
return r === void 0 || o === void 0 ? !0 : r <= o;
|
|
2535
2538
|
}),
|
|
2536
|
-
to: ge().transform(yn).typeError(
|
|
2539
|
+
to: ge().transform(yn).typeError(dt).required(dt).moreThan(0, vn).test("to>from", mi, function(r) {
|
|
2537
2540
|
const { from: o } = this.parent;
|
|
2538
2541
|
return o === void 0 || r === void 0 ? !0 : r > o;
|
|
2539
2542
|
})
|
|
2540
2543
|
}),
|
|
2541
2544
|
value: { from: t, to: n }
|
|
2542
2545
|
};
|
|
2543
|
-
}, Tn = (e) => e && typeof e == "object" && !Array.isArray(e) && "value" in e && e.value !== "" && e.value != null,
|
|
2546
|
+
}, Tn = (e) => e && typeof e == "object" && !Array.isArray(e) && "value" in e && e.value !== "" && e.value != null, Rt = (e, t) => {
|
|
2544
2547
|
if (Tn(e))
|
|
2545
2548
|
return {
|
|
2546
|
-
schema:
|
|
2549
|
+
schema: xe().test(
|
|
2547
2550
|
"required-option",
|
|
2548
2551
|
"Por favor selecciona una opcion",
|
|
2549
2552
|
(n) => Tn(n)
|
|
@@ -2553,15 +2556,15 @@ const ei = N.div`
|
|
|
2553
2556
|
if (e && typeof e == "object" && "from" in e && "to" in e) {
|
|
2554
2557
|
const n = e;
|
|
2555
2558
|
return t === H.PERCENTAGE ? {
|
|
2556
|
-
schema:
|
|
2559
|
+
schema: X({
|
|
2557
2560
|
from: ge().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"),
|
|
2558
2561
|
to: ge().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")
|
|
2559
2562
|
}),
|
|
2560
2563
|
value: n
|
|
2561
2564
|
} : {
|
|
2562
|
-
schema:
|
|
2563
|
-
from:
|
|
2564
|
-
to:
|
|
2565
|
+
schema: X({
|
|
2566
|
+
from: me().required("Requerido"),
|
|
2567
|
+
to: me().required("Requerido")
|
|
2565
2568
|
}),
|
|
2566
2569
|
value: n
|
|
2567
2570
|
};
|
|
@@ -2570,20 +2573,20 @@ const ei = N.div`
|
|
|
2570
2573
|
schema: ge().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"),
|
|
2571
2574
|
value: e
|
|
2572
2575
|
} : {
|
|
2573
|
-
schema:
|
|
2576
|
+
schema: xe().test("required", "Requerido", (n) => n == null ? !1 : typeof n == "string" ? n.trim().length > 0 : typeof n == "number" ? !Number.isNaN(n) : !1),
|
|
2574
2577
|
value: e
|
|
2575
2578
|
};
|
|
2576
2579
|
}, vi = {
|
|
2577
2580
|
[I.LIST_OF_VALUES]: hi,
|
|
2578
2581
|
[I.LIST_OF_VALUES_MULTI]: gi,
|
|
2579
2582
|
[I.RANGE]: bi,
|
|
2580
|
-
[I.GREATER_THAN]:
|
|
2581
|
-
[I.LESS_THAN]:
|
|
2582
|
-
[I.EQUAL]:
|
|
2583
|
+
[I.GREATER_THAN]: Rt,
|
|
2584
|
+
[I.LESS_THAN]: Rt,
|
|
2585
|
+
[I.EQUAL]: Rt
|
|
2583
2586
|
}, xn = (e) => vi[e] || pi, wn = (e) => {
|
|
2584
2587
|
var t;
|
|
2585
2588
|
return Array.isArray((t = e == null ? void 0 : e.listOfPossibleValues) == null ? void 0 : t.list) && e.listOfPossibleValues.list.length > 0;
|
|
2586
|
-
},
|
|
2589
|
+
}, zt = xe().test(
|
|
2587
2590
|
"required-option",
|
|
2588
2591
|
"Por favor selecciona una opcion",
|
|
2589
2592
|
(e) => {
|
|
@@ -2594,11 +2597,11 @@ const ei = N.div`
|
|
|
2594
2597
|
}
|
|
2595
2598
|
return typeof e == "string" ? e.trim().length > 0 : typeof e == "number" ? !Number.isNaN(e) : !1;
|
|
2596
2599
|
}
|
|
2597
|
-
), yi =
|
|
2598
|
-
from:
|
|
2599
|
-
to:
|
|
2600
|
-
}),
|
|
2601
|
-
const t =
|
|
2600
|
+
), yi = X({
|
|
2601
|
+
from: zt,
|
|
2602
|
+
to: zt
|
|
2603
|
+
}), Ht = (e) => e && typeof e == "object" && "value" in e ? e.value : e, Sn = (e) => {
|
|
2604
|
+
const t = Ht(e);
|
|
2602
2605
|
return t == null ? !1 : typeof t == "string" ? t.trim().length > 0 : typeof t == "number" ? !Number.isNaN(t) : Array.isArray(t) ? t.length > 0 : typeof t == "object" ? Object.keys(t).length > 0 : !0;
|
|
2603
2606
|
};
|
|
2604
2607
|
function Ti({
|
|
@@ -2606,13 +2609,13 @@ function Ti({
|
|
|
2606
2609
|
onSubmitEvent: t,
|
|
2607
2610
|
textValues: n
|
|
2608
2611
|
}) {
|
|
2609
|
-
const r =
|
|
2612
|
+
const r = Te(e) || {}, o = () => Object.entries(r).flatMap(
|
|
2610
2613
|
([h, g]) => g.map((f) => ({ group: h, cond: f }))
|
|
2611
2614
|
), i = Object.fromEntries(
|
|
2612
2615
|
Object.entries(r).map(([h, g]) => {
|
|
2613
2616
|
const f = {};
|
|
2614
2617
|
return g.forEach((m) => {
|
|
2615
|
-
const v = m.conditionName, x = m.value !== void 0 && m.value !== null && m.value !== "", w = m.howToSetTheCondition ===
|
|
2618
|
+
const v = m.conditionName, x = m.value !== void 0 && m.value !== null && m.value !== "", w = m.howToSetTheCondition === re.LIST_OF_VALUES_MULTI ? [] : "";
|
|
2616
2619
|
f[v] = {
|
|
2617
2620
|
...m,
|
|
2618
2621
|
value: x ? m.value : w
|
|
@@ -2622,10 +2625,10 @@ function Ti({
|
|
|
2622
2625
|
), c = Object.entries(r).map(
|
|
2623
2626
|
([h, g]) => {
|
|
2624
2627
|
const f = i[h] || {}, m = g.map((v) => {
|
|
2625
|
-
const x = v.conditionName, w = f[x],
|
|
2628
|
+
const x = v.conditionName, w = f[x], C = w && typeof w == "object" && "value" in w ? w.value : v.value;
|
|
2626
2629
|
return {
|
|
2627
2630
|
...v,
|
|
2628
|
-
value:
|
|
2631
|
+
value: C
|
|
2629
2632
|
};
|
|
2630
2633
|
});
|
|
2631
2634
|
return {
|
|
@@ -2648,43 +2651,43 @@ function Ti({
|
|
|
2648
2651
|
};
|
|
2649
2652
|
let l;
|
|
2650
2653
|
const s = {
|
|
2651
|
-
ruleName:
|
|
2654
|
+
ruleName: me().required("El nombre de la decision es requerido"),
|
|
2652
2655
|
value: Qe(() => {
|
|
2653
2656
|
const h = l.values.howToSetTheDecision;
|
|
2654
|
-
return h ===
|
|
2657
|
+
return h === re.RANGE && wn(e) ? yi : wn(e) ? zt : xn(h)(
|
|
2655
2658
|
l.values.value,
|
|
2656
2659
|
l.values.decisionDataType
|
|
2657
2660
|
).schema;
|
|
2658
2661
|
}),
|
|
2659
2662
|
conditionsThatEstablishesTheDecision: Qe((h, { parent: g }) => {
|
|
2660
|
-
const f =
|
|
2663
|
+
const f = Te(e) || {};
|
|
2661
2664
|
if (!(Object.keys(f).length > 0))
|
|
2662
|
-
return
|
|
2665
|
+
return X().shape({});
|
|
2663
2666
|
const v = g && g.conditionsThatEstablishesTheDecision && typeof g.conditionsThatEstablishesTheDecision == "object" && Object.keys(g.conditionsThatEstablishesTheDecision).length > 0;
|
|
2664
|
-
if ((g == null ? void 0 : g.toggleNone) && v) return
|
|
2667
|
+
if ((g == null ? void 0 : g.toggleNone) && v) return X().shape({});
|
|
2665
2668
|
const w = {};
|
|
2666
|
-
for (const [
|
|
2667
|
-
const
|
|
2668
|
-
|
|
2669
|
-
var
|
|
2670
|
-
const L = (
|
|
2669
|
+
for (const [C, N] of Object.entries(f)) {
|
|
2670
|
+
const D = {};
|
|
2671
|
+
N.forEach((k) => {
|
|
2672
|
+
var le, K;
|
|
2673
|
+
const L = (K = (le = g == null ? void 0 : g.conditionsThatEstablishesTheDecision) == null ? void 0 : le[C]) == null ? void 0 : K[k.conditionName], F = Ht(L);
|
|
2671
2674
|
if (F !== void 0) {
|
|
2672
|
-
const
|
|
2675
|
+
const se = xn(
|
|
2673
2676
|
k.howToSetTheCondition
|
|
2674
2677
|
);
|
|
2675
|
-
|
|
2678
|
+
D[k.conditionName] = se(
|
|
2676
2679
|
F,
|
|
2677
2680
|
k.conditionDataType
|
|
2678
2681
|
).schema;
|
|
2679
2682
|
}
|
|
2680
|
-
}), w[
|
|
2683
|
+
}), w[C] = X(D);
|
|
2681
2684
|
}
|
|
2682
|
-
return
|
|
2685
|
+
return X(w).test(
|
|
2683
2686
|
"at-least-one-condition",
|
|
2684
2687
|
"Debe existir al menos una condición para que la decisión se valide correctamente.",
|
|
2685
|
-
(
|
|
2686
|
-
(
|
|
2687
|
-
(
|
|
2688
|
+
(C) => !C || typeof C != "object" ? !1 : Object.values(C).some(
|
|
2689
|
+
(N) => N && typeof N == "object" && Object.values(N).some(
|
|
2690
|
+
(D) => Sn(D)
|
|
2688
2691
|
)
|
|
2689
2692
|
)
|
|
2690
2693
|
);
|
|
@@ -2703,22 +2706,22 @@ function Ti({
|
|
|
2703
2706
|
}
|
|
2704
2707
|
) : g.notRequired()
|
|
2705
2708
|
));
|
|
2706
|
-
const p =
|
|
2707
|
-
return l =
|
|
2709
|
+
const p = X(s);
|
|
2710
|
+
return l = en({
|
|
2708
2711
|
initialValues: u,
|
|
2709
2712
|
validationSchema: p,
|
|
2710
2713
|
validateOnBlur: !0,
|
|
2711
2714
|
onSubmit: (h) => {
|
|
2712
2715
|
const g = Object.fromEntries(
|
|
2713
2716
|
Object.entries(r).map(([m, v]) => {
|
|
2714
|
-
var
|
|
2715
|
-
const x = ((
|
|
2716
|
-
const
|
|
2717
|
+
var C;
|
|
2718
|
+
const x = ((C = h.conditionsThatEstablishesTheDecision) == null ? void 0 : C[m]) || {}, w = v.map((N) => {
|
|
2719
|
+
const D = N.conditionName, k = x[D], L = Ht(k);
|
|
2717
2720
|
return {
|
|
2718
|
-
...
|
|
2721
|
+
...N,
|
|
2719
2722
|
value: L
|
|
2720
2723
|
};
|
|
2721
|
-
}).filter((
|
|
2724
|
+
}).filter((N) => Sn(N.value));
|
|
2722
2725
|
return [m, w];
|
|
2723
2726
|
})
|
|
2724
2727
|
), f = {
|
|
@@ -2739,7 +2742,7 @@ function Ti({
|
|
|
2739
2742
|
if (h)
|
|
2740
2743
|
l.setFieldValue(m, void 0);
|
|
2741
2744
|
else {
|
|
2742
|
-
const v = f.howToSetTheCondition ===
|
|
2745
|
+
const v = f.howToSetTheCondition === re.LIST_OF_VALUES_MULTI ? [] : "";
|
|
2743
2746
|
l.setFieldValue(
|
|
2744
2747
|
m,
|
|
2745
2748
|
{
|
|
@@ -2752,7 +2755,7 @@ function Ti({
|
|
|
2752
2755
|
});
|
|
2753
2756
|
} };
|
|
2754
2757
|
}
|
|
2755
|
-
|
|
2758
|
+
E.div`
|
|
2756
2759
|
& > div {
|
|
2757
2760
|
border-radius: 8px;
|
|
2758
2761
|
border: 1px solid
|
|
@@ -2762,7 +2765,7 @@ N.div`
|
|
|
2762
2765
|
}};
|
|
2763
2766
|
}
|
|
2764
2767
|
`;
|
|
2765
|
-
|
|
2768
|
+
E.div`
|
|
2766
2769
|
width: 100%;
|
|
2767
2770
|
height: 100%;
|
|
2768
2771
|
overflow-y: auto;
|
|
@@ -2780,7 +2783,7 @@ N.div`
|
|
|
2780
2783
|
border-radius: 8px;
|
|
2781
2784
|
}
|
|
2782
2785
|
`;
|
|
2783
|
-
const xi =
|
|
2786
|
+
const xi = E.div`
|
|
2784
2787
|
display: flex;
|
|
2785
2788
|
width: -webkit-fill-available;
|
|
2786
2789
|
align-items: center;
|
|
@@ -2805,21 +2808,21 @@ const xi = N.div`
|
|
|
2805
2808
|
messageEnd: d = "",
|
|
2806
2809
|
statusStart: h = "pending",
|
|
2807
2810
|
statusEnd: g = "pending"
|
|
2808
|
-
} = e, [f, m] = q(c), [v, x] = q(l), [w,
|
|
2811
|
+
} = e, [f, m] = q(c), [v, x] = q(l), [w, C] = q(s), N = ({ target: F }) => {
|
|
2809
2812
|
m(F.checked), r && r(F.checked);
|
|
2810
|
-
},
|
|
2813
|
+
}, D = (F) => {
|
|
2811
2814
|
x(F.target.value), t(F);
|
|
2812
2815
|
}, k = (F) => {
|
|
2813
|
-
|
|
2814
|
-
}, L =
|
|
2816
|
+
C(F.target.value), n(F);
|
|
2817
|
+
}, L = ie("(max-width: 400px)");
|
|
2815
2818
|
return /* @__PURE__ */ b(T, { direction: "column", width: "100%", gap: "20px", children: [
|
|
2816
2819
|
/* @__PURE__ */ b(T, { justifyContent: "space-between", children: [
|
|
2817
2820
|
/* @__PURE__ */ a(R, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
2818
2821
|
/* @__PURE__ */ a(
|
|
2819
|
-
|
|
2822
|
+
Jt,
|
|
2820
2823
|
{
|
|
2821
2824
|
label: "Cerrada",
|
|
2822
|
-
onChange:
|
|
2825
|
+
onChange: N,
|
|
2823
2826
|
checked: f,
|
|
2824
2827
|
value: ""
|
|
2825
2828
|
}
|
|
@@ -2837,7 +2840,7 @@ const xi = N.div`
|
|
|
2837
2840
|
{
|
|
2838
2841
|
id: "dateStart",
|
|
2839
2842
|
label: o,
|
|
2840
|
-
onChange:
|
|
2843
|
+
onChange: D,
|
|
2841
2844
|
value: v,
|
|
2842
2845
|
required: u,
|
|
2843
2846
|
size: "compact",
|
|
@@ -2885,7 +2888,7 @@ const xi = N.div`
|
|
|
2885
2888
|
onCloseRedefineConfirm: x,
|
|
2886
2889
|
onConfirmRedefine: w
|
|
2887
2890
|
} = e;
|
|
2888
|
-
return /* @__PURE__ */ b(
|
|
2891
|
+
return /* @__PURE__ */ b(_, { children: [
|
|
2889
2892
|
/* @__PURE__ */ a("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2890
2893
|
/* @__PURE__ */ a(Be, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ b(
|
|
2891
2894
|
T,
|
|
@@ -2935,29 +2938,29 @@ const xi = N.div`
|
|
|
2935
2938
|
}
|
|
2936
2939
|
)
|
|
2937
2940
|
] }),
|
|
2938
|
-
/* @__PURE__ */ a(T, { direction: "column", gap: "20px", children: r == null ? void 0 : r.map((
|
|
2939
|
-
const
|
|
2941
|
+
/* @__PURE__ */ a(T, { direction: "column", gap: "20px", children: r == null ? void 0 : r.map((C) => {
|
|
2942
|
+
const N = C.__scopedName ?? `${C.groupKey}.${C.conditionName}`;
|
|
2940
2943
|
return /* @__PURE__ */ b(T, { gap: "16px", alignItems: "center", children: [
|
|
2941
2944
|
/* @__PURE__ */ b(xi, { children: [
|
|
2942
2945
|
/* @__PURE__ */ a(
|
|
2943
2946
|
pn,
|
|
2944
2947
|
{
|
|
2945
|
-
condition:
|
|
2948
|
+
condition: C,
|
|
2946
2949
|
formik: o
|
|
2947
2950
|
}
|
|
2948
2951
|
),
|
|
2949
|
-
|
|
2952
|
+
C.timeUnit && /* @__PURE__ */ a(R, { as: "span", size: "medium", padding: "0 0 0 16px", children: C.__unitAfterInput })
|
|
2950
2953
|
] }),
|
|
2951
2954
|
/* @__PURE__ */ a(
|
|
2952
2955
|
B,
|
|
2953
2956
|
{
|
|
2954
|
-
icon: /* @__PURE__ */ a(
|
|
2957
|
+
icon: /* @__PURE__ */ a(vt, {}),
|
|
2955
2958
|
appearance: "danger",
|
|
2956
2959
|
cursorHover: !0,
|
|
2957
|
-
onClick: () => u(
|
|
2960
|
+
onClick: () => u(N)
|
|
2958
2961
|
}
|
|
2959
2962
|
)
|
|
2960
|
-
] },
|
|
2963
|
+
] }, N);
|
|
2961
2964
|
}) }),
|
|
2962
2965
|
s && /* @__PURE__ */ a(R, { type: "label", size: "medium", appearance: "danger", children: n ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2963
2966
|
] }) }),
|
|
@@ -2972,10 +2975,10 @@ const xi = N.div`
|
|
|
2972
2975
|
messageEnd: o.errors.validUntil,
|
|
2973
2976
|
statusStart: h,
|
|
2974
2977
|
statusEnd: d,
|
|
2975
|
-
onHandleStartChange: (
|
|
2976
|
-
onHandleEndChange: (
|
|
2977
|
-
onCheckClosedChange: (
|
|
2978
|
-
o.setFieldValue("checkClosed",
|
|
2978
|
+
onHandleStartChange: (C) => o.setFieldValue("effectiveFrom", C.target.value),
|
|
2979
|
+
onHandleEndChange: (C) => o.setFieldValue("validUntil", C.target.value),
|
|
2980
|
+
onCheckClosedChange: (C) => {
|
|
2981
|
+
o.setFieldValue("checkClosed", C), C && o.setFieldValue("validUntil", "");
|
|
2979
2982
|
},
|
|
2980
2983
|
checkedClosed: o.values.checkClosed
|
|
2981
2984
|
}
|
|
@@ -3068,15 +3071,15 @@ function Ri(e) {
|
|
|
3068
3071
|
const Ue = (e) => {
|
|
3069
3072
|
if (typeof e == "string") {
|
|
3070
3073
|
const t = e.toLowerCase();
|
|
3071
|
-
if (t.includes("equal")) return
|
|
3072
|
-
if (t.includes("greater")) return
|
|
3073
|
-
if (t.includes("less")) return
|
|
3074
|
-
if (t.includes("range") || t.includes("between")) return
|
|
3075
|
-
if (t.includes("multi")) return
|
|
3074
|
+
if (t.includes("equal")) return re.EQUAL;
|
|
3075
|
+
if (t.includes("greater")) return re.GREATER_THAN;
|
|
3076
|
+
if (t.includes("less")) return re.LESS_THAN;
|
|
3077
|
+
if (t.includes("range") || t.includes("between")) return re.RANGE;
|
|
3078
|
+
if (t.includes("multi")) return re.LIST_OF_VALUES_MULTI;
|
|
3076
3079
|
if (t.includes("list_of_values") || t.includes("among") || t.includes("in"))
|
|
3077
|
-
return
|
|
3080
|
+
return re.LIST_OF_VALUES;
|
|
3078
3081
|
}
|
|
3079
|
-
return e ??
|
|
3082
|
+
return e ?? re.EQUAL;
|
|
3080
3083
|
}, Ge = (e) => {
|
|
3081
3084
|
switch (e) {
|
|
3082
3085
|
case P.LIST_OF_VALUES_MULTI:
|
|
@@ -3116,7 +3119,7 @@ const Ue = (e) => {
|
|
|
3116
3119
|
decision: t,
|
|
3117
3120
|
onSubmitEvent: n,
|
|
3118
3121
|
textValues: r
|
|
3119
|
-
}), p = u ?? t, d =
|
|
3122
|
+
}), p = u ?? t, d = Te(p), h = Te(t), g = Bn(
|
|
3120
3123
|
h,
|
|
3121
3124
|
($) => !$.hidden
|
|
3122
3125
|
), f = Object.keys(g), m = [
|
|
@@ -3128,191 +3131,187 @@ const Ue = (e) => {
|
|
|
3128
3131
|
const O = $ === "group-primary" ? "mainCondition" : `alternateCondition-${x++}`;
|
|
3129
3132
|
return v[O] = $, {
|
|
3130
3133
|
id: O,
|
|
3131
|
-
label: $ === "group-primary" ?
|
|
3134
|
+
label: $ === "group-primary" ? ft($, 0) : ft($, Number(O.split("-").at(-1))),
|
|
3132
3135
|
isDisabled: !1
|
|
3133
3136
|
};
|
|
3134
|
-
}), [
|
|
3137
|
+
}), [C, N] = j.useState(
|
|
3135
3138
|
((Pe = w[0]) == null ? void 0 : Pe.id) ?? "mainCondition"
|
|
3136
|
-
),
|
|
3137
|
-
|
|
3139
|
+
), D = ($) => N($), k = v[C] ?? "group-primary";
|
|
3140
|
+
j.useEffect(() => {
|
|
3138
3141
|
var U;
|
|
3139
3142
|
const $ = (U = l.values) == null ? void 0 : U.conditionsThatEstablishesTheDecision;
|
|
3140
3143
|
let O = !1;
|
|
3141
3144
|
if ($ && typeof $ == "object" && (O = Object.values($).some(
|
|
3142
|
-
(
|
|
3145
|
+
(V) => V && typeof V == "object" && Object.keys(V).length > 0
|
|
3143
3146
|
)), O) return;
|
|
3144
|
-
const
|
|
3145
|
-
if (!
|
|
3147
|
+
const S = Te(t);
|
|
3148
|
+
if (!S || Object.keys(S).length === 0)
|
|
3146
3149
|
return;
|
|
3147
|
-
const
|
|
3148
|
-
Object.entries(
|
|
3149
|
-
const
|
|
3150
|
-
|
|
3151
|
-
const
|
|
3152
|
-
return [
|
|
3150
|
+
const z = Object.fromEntries(
|
|
3151
|
+
Object.entries(S).map(([V, he]) => {
|
|
3152
|
+
const ve = Object.fromEntries(
|
|
3153
|
+
he.map((ee) => {
|
|
3154
|
+
const Se = Ue(ee.howToSetTheCondition), Ce = ee.value ?? Ge(Se);
|
|
3155
|
+
return [ee.conditionName, Ce];
|
|
3153
3156
|
})
|
|
3154
3157
|
);
|
|
3155
|
-
return [
|
|
3158
|
+
return [V, ve];
|
|
3156
3159
|
})
|
|
3157
3160
|
);
|
|
3158
3161
|
l.setFieldValue(
|
|
3159
3162
|
"conditionsThatEstablishesTheDecision",
|
|
3160
|
-
|
|
3163
|
+
z,
|
|
3161
3164
|
!1
|
|
3162
3165
|
);
|
|
3163
|
-
}, [t]),
|
|
3164
|
-
var
|
|
3165
|
-
const $ = (
|
|
3166
|
+
}, [t]), j.useEffect(() => {
|
|
3167
|
+
var he;
|
|
3168
|
+
const $ = (he = l.values) == null ? void 0 : he.conditionsThatEstablishesTheDecision;
|
|
3166
3169
|
if (!$ || typeof $ != "object") return;
|
|
3167
|
-
const O =
|
|
3168
|
-
([
|
|
3169
|
-
const
|
|
3170
|
-
const
|
|
3171
|
-
|
|
3172
|
-
),
|
|
3170
|
+
const O = Te(p), S = Object.entries($).map(
|
|
3171
|
+
([ve, ee]) => {
|
|
3172
|
+
const Se = O[ve] || [], Ce = Object.keys(ee).map((ye) => {
|
|
3173
|
+
const G = ee[ye], de = Se.find((ar) => ar.conditionName === ye) || {}, at = Ue(
|
|
3174
|
+
de.howToSetTheCondition ?? (G == null ? void 0 : G.howToSetTheCondition)
|
|
3175
|
+
), $t = de.value ?? Ge(at), cn = G && typeof G == "object" && "value" in G ? G.value : G;
|
|
3173
3176
|
return {
|
|
3174
|
-
...
|
|
3175
|
-
...typeof
|
|
3176
|
-
conditionName:
|
|
3177
|
-
value:
|
|
3177
|
+
...de,
|
|
3178
|
+
...typeof G == "object" && !Array.isArray(G) ? G : {},
|
|
3179
|
+
conditionName: ye,
|
|
3180
|
+
value: cn !== void 0 ? cn : $t
|
|
3178
3181
|
};
|
|
3179
3182
|
});
|
|
3180
3183
|
return {
|
|
3181
|
-
ConditionGroupId:
|
|
3184
|
+
ConditionGroupId: ve,
|
|
3182
3185
|
conditionsThatEstablishesTheDecision: Ce
|
|
3183
3186
|
};
|
|
3184
3187
|
}
|
|
3185
|
-
),
|
|
3186
|
-
U !==
|
|
3188
|
+
), z = l.values.conditionGroups, U = JSON.stringify(S), V = JSON.stringify(z ?? []);
|
|
3189
|
+
U !== V && l.setFieldValue("conditionGroups", S, !1);
|
|
3187
3190
|
}, [(M = l.values) == null ? void 0 : M.conditionsThatEstablishesTheDecision, p]);
|
|
3188
|
-
const L =
|
|
3189
|
-
const
|
|
3191
|
+
const L = j.useMemo(() => {
|
|
3192
|
+
const O = [
|
|
3190
3193
|
...Object.keys(g).filter(
|
|
3191
|
-
(
|
|
3194
|
+
(S) => S === "group-primary"
|
|
3192
3195
|
),
|
|
3193
3196
|
...Object.keys(g).filter(
|
|
3194
|
-
(
|
|
3197
|
+
(S) => S !== "group-primary"
|
|
3195
3198
|
)
|
|
3196
|
-
]
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
label: G.labelName || "",
|
|
3204
|
-
howToSet: fe,
|
|
3205
|
-
isFirst: ce
|
|
3206
|
-
}), Te = G.timeUnit ? Ut("", G.timeUnit, !0).trim() : "", z = `${j}.${G.conditionName}`, te = Oi(
|
|
3199
|
+
].map((S) => {
|
|
3200
|
+
const U = (g[S] ?? []).map((V, he) => {
|
|
3201
|
+
const ve = he === 0, ee = Ue(V.howToSetTheCondition), Se = Ci({
|
|
3202
|
+
label: V.labelName || "",
|
|
3203
|
+
howToSet: ee,
|
|
3204
|
+
isFirst: ve
|
|
3205
|
+
}), Ce = V.timeUnit ? Pt("", V.timeUnit, !0).trim() : "", ye = `${S}.${V.conditionName}`, G = Oi(
|
|
3207
3206
|
l.values,
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
),
|
|
3207
|
+
S,
|
|
3208
|
+
V.conditionName
|
|
3209
|
+
), de = Fi(
|
|
3211
3210
|
l.values,
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
), at =
|
|
3211
|
+
S,
|
|
3212
|
+
V.conditionName
|
|
3213
|
+
), at = G !== void 0 ? G : de, $t = at !== void 0 ? at : Ge(ee);
|
|
3215
3214
|
return {
|
|
3216
|
-
...
|
|
3217
|
-
__originalConditionName:
|
|
3218
|
-
__groupKey:
|
|
3219
|
-
__howToSet:
|
|
3220
|
-
__scopedName:
|
|
3221
|
-
conditionName:
|
|
3222
|
-
groupKey:
|
|
3223
|
-
labelName:
|
|
3224
|
-
__unitAfterInput:
|
|
3225
|
-
value:
|
|
3215
|
+
...V,
|
|
3216
|
+
__originalConditionName: V.conditionName,
|
|
3217
|
+
__groupKey: S,
|
|
3218
|
+
__howToSet: ee,
|
|
3219
|
+
__scopedName: ye,
|
|
3220
|
+
conditionName: V.conditionName,
|
|
3221
|
+
groupKey: S,
|
|
3222
|
+
labelName: Se,
|
|
3223
|
+
__unitAfterInput: Ce,
|
|
3224
|
+
value: $t
|
|
3226
3225
|
};
|
|
3227
3226
|
});
|
|
3228
|
-
return [
|
|
3227
|
+
return [S, U];
|
|
3229
3228
|
});
|
|
3230
|
-
return Object.fromEntries(
|
|
3231
|
-
}, [g, l.values]), F = L[k] ?? [],
|
|
3229
|
+
return Object.fromEntries(O);
|
|
3230
|
+
}, [g, l.values]), F = L[k] ?? [], le = L["group-primary"] ?? [], K = {
|
|
3232
3231
|
decisionDataType: t.decisionDataType,
|
|
3233
3232
|
howToSetTheCondition: t.howToSetTheDecision,
|
|
3234
3233
|
labelName: t.labelName,
|
|
3235
3234
|
listOfPossibleValues: t.listOfPossibleValues,
|
|
3236
3235
|
ruleName: t.ruleName,
|
|
3237
|
-
timeUnit: t.timeUnit ?
|
|
3238
|
-
},
|
|
3236
|
+
timeUnit: t.timeUnit ? Pt("", t.timeUnit, !0).trim() : ""
|
|
3237
|
+
}, se = l.submitCount > 0 || !!l.touched.effectiveFrom, Ie = l.submitCount > 0 || !!l.touched.validUntil, Ct = se ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, nt = Ie ? l.errors.validUntil ? "invalid" : "valid" : void 0, _e = j.useMemo(() => {
|
|
3239
3238
|
const $ = l.errors.conditionsThatEstablishesTheDecision;
|
|
3240
3239
|
if (!$) return;
|
|
3241
3240
|
if (typeof $ == "string") return $;
|
|
3242
|
-
const O = (
|
|
3243
|
-
if (
|
|
3244
|
-
if (typeof
|
|
3245
|
-
if (Array.isArray(
|
|
3246
|
-
for (const
|
|
3247
|
-
const U = O(
|
|
3241
|
+
const O = (S) => {
|
|
3242
|
+
if (S) {
|
|
3243
|
+
if (typeof S == "string") return S;
|
|
3244
|
+
if (Array.isArray(S))
|
|
3245
|
+
for (const z of S) {
|
|
3246
|
+
const U = O(z);
|
|
3248
3247
|
if (U) return U;
|
|
3249
3248
|
}
|
|
3250
|
-
else if (typeof
|
|
3251
|
-
for (const
|
|
3252
|
-
const U = O(
|
|
3249
|
+
else if (typeof S == "object")
|
|
3250
|
+
for (const z of Object.values(S)) {
|
|
3251
|
+
const U = O(z);
|
|
3253
3252
|
if (U) return U;
|
|
3254
3253
|
}
|
|
3255
3254
|
}
|
|
3256
3255
|
};
|
|
3257
3256
|
return O($);
|
|
3258
|
-
}, [l.errors.conditionsThatEstablishesTheDecision]),
|
|
3257
|
+
}, [l.errors.conditionsThatEstablishesTheDecision]), Dt = l.submitCount > 0 && !!_e, Nt = ($) => {
|
|
3259
3258
|
const O = ($ == null ? void 0 : $.__howToSet) ?? Ue($ == null ? void 0 : $.howToSetTheCondition);
|
|
3260
3259
|
return Ge(O);
|
|
3261
|
-
}, rt = ($, O,
|
|
3262
|
-
var
|
|
3263
|
-
const
|
|
3264
|
-
U && typeof U == "object" && !Array.isArray(U) ? l.setFieldValue(`${
|
|
3265
|
-
const
|
|
3266
|
-
if (Array.isArray(
|
|
3267
|
-
const
|
|
3268
|
-
if (
|
|
3269
|
-
const
|
|
3270
|
-
(
|
|
3260
|
+
}, rt = ($, O, S) => {
|
|
3261
|
+
var he, ve, ee, Se, Ce;
|
|
3262
|
+
const z = `conditionsThatEstablishesTheDecision.${$}.${O}`, U = (ee = (ve = (he = l.values) == null ? void 0 : he.conditionsThatEstablishesTheDecision) == null ? void 0 : ve[$]) == null ? void 0 : ee[O];
|
|
3263
|
+
U && typeof U == "object" && !Array.isArray(U) ? l.setFieldValue(`${z}.value`, S, !1) : l.setFieldValue(z, S, !1);
|
|
3264
|
+
const V = (Se = l.values) == null ? void 0 : Se.conditionGroups;
|
|
3265
|
+
if (Array.isArray(V)) {
|
|
3266
|
+
const ye = V.findIndex((G) => (G == null ? void 0 : G.ConditionGroupId) === $);
|
|
3267
|
+
if (ye >= 0) {
|
|
3268
|
+
const G = (Ce = V[ye].conditionsThatEstablishesTheDecision) == null ? void 0 : Ce.findIndex(
|
|
3269
|
+
(de) => (de == null ? void 0 : de.conditionName) === O
|
|
3271
3270
|
);
|
|
3272
|
-
if (
|
|
3273
|
-
const
|
|
3274
|
-
|
|
3271
|
+
if (G >= 0) {
|
|
3272
|
+
const de = JSON.parse(JSON.stringify(V));
|
|
3273
|
+
de[ye].conditionsThatEstablishesTheDecision[G].value = S, l.setFieldValue("conditionGroups", de, !1);
|
|
3275
3274
|
}
|
|
3276
3275
|
}
|
|
3277
3276
|
}
|
|
3278
3277
|
}, ot = ($) => {
|
|
3279
|
-
const [O, ...
|
|
3280
|
-
rt(O,
|
|
3281
|
-
`conditionsThatEstablishesTheDecision.${O}.${
|
|
3278
|
+
const [O, ...S] = $.split("."), z = S.join("."), U = Object.values(d).flat().find((he) => he.conditionName === z), V = Nt(U || {});
|
|
3279
|
+
rt(O, z, V), l.setFieldTouched(
|
|
3280
|
+
`conditionsThatEstablishesTheDecision.${O}.${z}`,
|
|
3282
3281
|
!1,
|
|
3283
3282
|
!1
|
|
3284
3283
|
);
|
|
3285
3284
|
}, it = () => {
|
|
3286
3285
|
(d[k] ?? []).forEach((O) => {
|
|
3287
|
-
const
|
|
3288
|
-
rt(k, O.conditionName,
|
|
3286
|
+
const S = Ue(O == null ? void 0 : O.howToSetTheCondition), z = Ge(S);
|
|
3287
|
+
rt(k, O.conditionName, z);
|
|
3289
3288
|
});
|
|
3290
|
-
}, [
|
|
3289
|
+
}, [Et, Ve] = j.useState(!1);
|
|
3291
3290
|
return /* @__PURE__ */ a(
|
|
3292
3291
|
Si,
|
|
3293
3292
|
{
|
|
3294
|
-
activeTab:
|
|
3293
|
+
activeTab: C,
|
|
3295
3294
|
conditionsErrorText: _e,
|
|
3296
3295
|
currentConditions: F,
|
|
3297
3296
|
decision: t,
|
|
3298
3297
|
formik: l,
|
|
3299
|
-
normalizedDecision:
|
|
3298
|
+
normalizedDecision: K,
|
|
3300
3299
|
onCancel: o,
|
|
3301
3300
|
onRedefineCurrentTab: it,
|
|
3302
|
-
onTabChange:
|
|
3301
|
+
onTabChange: D,
|
|
3303
3302
|
onClearCondition: ($) => {
|
|
3304
3303
|
ot($), i == null || i($);
|
|
3305
3304
|
},
|
|
3306
|
-
showConditionsError:
|
|
3305
|
+
showConditionsError: Dt,
|
|
3307
3306
|
tabs: w,
|
|
3308
3307
|
termEndStatus: nt,
|
|
3309
|
-
termStartStatus:
|
|
3308
|
+
termStartStatus: Ct,
|
|
3310
3309
|
textValues: r,
|
|
3311
|
-
visibleConditions:
|
|
3310
|
+
visibleConditions: le,
|
|
3312
3311
|
visibleConditionsByGroup: L,
|
|
3313
3312
|
handleToggleNoneChange: s,
|
|
3314
3313
|
portalId: "redefine-confirm-portal",
|
|
3315
|
-
showRedefineConfirm:
|
|
3314
|
+
showRedefineConfirm: Et,
|
|
3316
3315
|
onOpenRedefineConfirm: () => Ve(!0),
|
|
3317
3316
|
onCloseRedefineConfirm: () => Ve(!1),
|
|
3318
3317
|
onConfirmRedefine: () => {
|
|
@@ -3344,9 +3343,9 @@ const Ue = (e) => {
|
|
|
3344
3343
|
terms: v = !0,
|
|
3345
3344
|
onRemoveCondition: x,
|
|
3346
3345
|
onRestoreConditions: w,
|
|
3347
|
-
baseDecisionTemplate:
|
|
3348
|
-
shouldRenderEmptyMessage:
|
|
3349
|
-
} = e, [
|
|
3346
|
+
baseDecisionTemplate: C,
|
|
3347
|
+
shouldRenderEmptyMessage: N = !0
|
|
3348
|
+
} = e, [D, k] = q(null), L = ie("(max-width: 681px)"), { renderedCards: F, shouldRenderAddCard: le } = si({
|
|
3350
3349
|
cardTitle: t,
|
|
3351
3350
|
controls: n,
|
|
3352
3351
|
customTitleContentAddCard: r,
|
|
@@ -3355,12 +3354,12 @@ const Ue = (e) => {
|
|
|
3355
3354
|
handleOpenModal: h,
|
|
3356
3355
|
handleDelete: m,
|
|
3357
3356
|
textValues: c,
|
|
3358
|
-
isOpenFor: (
|
|
3359
|
-
toggleAt: (
|
|
3357
|
+
isOpenFor: (se) => D === se,
|
|
3358
|
+
toggleAt: (se) => k((Ie) => Ie === se ? null : se),
|
|
3360
3359
|
editionMode: l
|
|
3361
|
-
}),
|
|
3362
|
-
return /* @__PURE__ */ b(
|
|
3363
|
-
/* @__PURE__ */ a(ni, { children: /* @__PURE__ */ a(ri, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children:
|
|
3360
|
+
}), K = (i == null ? void 0 : i.length) === 0 && !d;
|
|
3361
|
+
return /* @__PURE__ */ b(_, { children: [
|
|
3362
|
+
/* @__PURE__ */ a(ni, { children: /* @__PURE__ */ a(ri, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children: N && (K ? /* @__PURE__ */ a(Be, { legend: "Decisiones", children: /* @__PURE__ */ b(
|
|
3364
3363
|
T,
|
|
3365
3364
|
{
|
|
3366
3365
|
direction: "column",
|
|
@@ -3387,14 +3386,14 @@ const Ue = (e) => {
|
|
|
3387
3386
|
children: "Sin decisiones"
|
|
3388
3387
|
}
|
|
3389
3388
|
),
|
|
3390
|
-
/* @__PURE__ */ a(R, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */ b(
|
|
3389
|
+
/* @__PURE__ */ a(R, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */ b(_, { children: [
|
|
3391
3390
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
3392
3391
|
r || ' "Agregar decisión"'
|
|
3393
3392
|
] }) })
|
|
3394
3393
|
]
|
|
3395
3394
|
}
|
|
3396
3395
|
) }) : /* @__PURE__ */ b(
|
|
3397
|
-
|
|
3396
|
+
we,
|
|
3398
3397
|
{
|
|
3399
3398
|
templateColumns: "1fr",
|
|
3400
3399
|
autoFlow: "row dense",
|
|
@@ -3407,7 +3406,7 @@ const Ue = (e) => {
|
|
|
3407
3406
|
height: L ? "auto" : "484px",
|
|
3408
3407
|
children: [
|
|
3409
3408
|
F,
|
|
3410
|
-
|
|
3409
|
+
le && Gt({
|
|
3411
3410
|
type: "add",
|
|
3412
3411
|
index: i == null ? void 0 : i.length,
|
|
3413
3412
|
controls: n,
|
|
@@ -3417,7 +3416,7 @@ const Ue = (e) => {
|
|
|
3417
3416
|
handleOpenModal: h,
|
|
3418
3417
|
handleDelete: m,
|
|
3419
3418
|
textValues: c,
|
|
3420
|
-
shouldRenderEmptyMessage:
|
|
3419
|
+
shouldRenderEmptyMessage: N,
|
|
3421
3420
|
terms: v,
|
|
3422
3421
|
editionMode: l
|
|
3423
3422
|
})
|
|
@@ -3435,7 +3434,7 @@ const Ue = (e) => {
|
|
|
3435
3434
|
Li,
|
|
3436
3435
|
{
|
|
3437
3436
|
decision: p || u,
|
|
3438
|
-
fullTemplate:
|
|
3437
|
+
fullTemplate: C ?? u,
|
|
3439
3438
|
onSubmitEvent: f,
|
|
3440
3439
|
textValues: c,
|
|
3441
3440
|
onCancel: () => g ? g() : () => {
|
|
@@ -3451,7 +3450,7 @@ const Ue = (e) => {
|
|
|
3451
3450
|
border: {
|
|
3452
3451
|
color: A.palette.neutral.N40
|
|
3453
3452
|
}
|
|
3454
|
-
}, ji =
|
|
3453
|
+
}, ji = E.div`
|
|
3455
3454
|
border-width: 1px;
|
|
3456
3455
|
border-style: solid;
|
|
3457
3456
|
border-color: ${({ theme: e }) => {
|
|
@@ -3491,15 +3490,15 @@ const Vi = (e, t) => {
|
|
|
3491
3490
|
return Je(() => {
|
|
3492
3491
|
if (!e.current || !l.current) return;
|
|
3493
3492
|
const s = e.current, p = l.current, d = () => {
|
|
3494
|
-
var
|
|
3493
|
+
var C;
|
|
3495
3494
|
const g = s.clientWidth, f = Array.from(
|
|
3496
3495
|
p.querySelectorAll('[data-filter-tag="true"]')
|
|
3497
3496
|
), m = 48;
|
|
3498
3497
|
let v = 0;
|
|
3499
3498
|
const x = [], w = [];
|
|
3500
|
-
for (let
|
|
3501
|
-
const
|
|
3502
|
-
v +
|
|
3499
|
+
for (let N = 0; N < t.length; N++) {
|
|
3500
|
+
const D = ((C = f[N]) == null ? void 0 : C.offsetWidth) ?? 0;
|
|
3501
|
+
v + D + m <= g ? (x.push(t[N]), v += D) : w.push(t[N]);
|
|
3503
3502
|
}
|
|
3504
3503
|
r(x), i(w), u(w.length > 0);
|
|
3505
3504
|
}, h = new ResizeObserver(() => {
|
|
@@ -3508,26 +3507,26 @@ const Vi = (e, t) => {
|
|
|
3508
3507
|
return h.observe(s), () => h.disconnect();
|
|
3509
3508
|
}, [t, e]), { visible: n, hidden: o, showOverflowIndicator: c, measurementRef: l };
|
|
3510
3509
|
};
|
|
3511
|
-
|
|
3510
|
+
E.div`
|
|
3512
3511
|
& > div {
|
|
3513
3512
|
width: 100%;
|
|
3514
3513
|
}
|
|
3515
3514
|
`;
|
|
3516
|
-
const Pi =
|
|
3515
|
+
const Pi = E.div`
|
|
3517
3516
|
position: absolute;
|
|
3518
3517
|
top: calc(100% + 4px);
|
|
3519
3518
|
right: 0;
|
|
3520
3519
|
z-index: 1000;
|
|
3521
3520
|
width: 170px;
|
|
3522
|
-
`, Ui =
|
|
3521
|
+
`, Ui = E.div`
|
|
3523
3522
|
position: absolute;
|
|
3524
3523
|
visibility: hidden;
|
|
3525
3524
|
pointer-events: none;
|
|
3526
3525
|
height: 0;
|
|
3527
3526
|
overflow: hidden;
|
|
3528
|
-
`, Gi =
|
|
3527
|
+
`, Gi = E.div`
|
|
3529
3528
|
cursor: pointer;
|
|
3530
|
-
`,
|
|
3529
|
+
`, Bt = {
|
|
3531
3530
|
border: {
|
|
3532
3531
|
color: {
|
|
3533
3532
|
regular: A.palette.neutral.N40,
|
|
@@ -3563,7 +3562,7 @@ const Pi = N.div`
|
|
|
3563
3562
|
hover: A.palette.neutral.N30
|
|
3564
3563
|
}
|
|
3565
3564
|
}
|
|
3566
|
-
}, zi =
|
|
3565
|
+
}, zi = E.li`
|
|
3567
3566
|
display: flex;
|
|
3568
3567
|
align-items: center;
|
|
3569
3568
|
align-self: stretch;
|
|
@@ -3578,12 +3577,12 @@ const Pi = N.div`
|
|
|
3578
3577
|
&:hover {
|
|
3579
3578
|
background-color: ${({ theme: e }) => {
|
|
3580
3579
|
var t, n, r;
|
|
3581
|
-
return ((r = (n = (t = e == null ? void 0 : e.input) == null ? void 0 : t.background) == null ? void 0 : n.color) == null ? void 0 : r.regular) ||
|
|
3580
|
+
return ((r = (n = (t = e == null ? void 0 : e.input) == null ? void 0 : t.background) == null ? void 0 : n.color) == null ? void 0 : r.regular) || Bt.background.color.regular;
|
|
3582
3581
|
}};
|
|
3583
3582
|
}
|
|
3584
3583
|
`, Hi = (e) => {
|
|
3585
3584
|
var h, g, f, m, v, x;
|
|
3586
|
-
const { id: t, label: n, leadingIcon: r, onClose: o } = e, [i, c] = q(!1), u = () => c(!0), l = () => c(!1), s = Dr(Cr), p = ((f = (g = (h = s == null ? void 0 : s.input) == null ? void 0 : h.option) == null ? void 0 : g.appearance) == null ? void 0 : f.hover) ??
|
|
3585
|
+
const { id: t, label: n, leadingIcon: r, onClose: o } = e, [i, c] = q(!1), u = () => c(!0), l = () => c(!1), s = Dr(Cr), p = ((f = (g = (h = s == null ? void 0 : s.input) == null ? void 0 : h.option) == null ? void 0 : g.appearance) == null ? void 0 : f.hover) ?? Bt.option.appearance.hover, d = ((x = (v = (m = s == null ? void 0 : s.input) == null ? void 0 : m.option) == null ? void 0 : v.appearance) == null ? void 0 : x.regular) ?? Bt.option.appearance.regular;
|
|
3587
3586
|
return /* @__PURE__ */ a(
|
|
3588
3587
|
zi,
|
|
3589
3588
|
{
|
|
@@ -3594,7 +3593,7 @@ const Pi = N.div`
|
|
|
3594
3593
|
w.stopPropagation();
|
|
3595
3594
|
},
|
|
3596
3595
|
children: /* @__PURE__ */ b(
|
|
3597
|
-
|
|
3596
|
+
we,
|
|
3598
3597
|
{
|
|
3599
3598
|
alignItems: "center",
|
|
3600
3599
|
gap: "8px",
|
|
@@ -3648,41 +3647,41 @@ const Pi = N.div`
|
|
|
3648
3647
|
hidden: d,
|
|
3649
3648
|
showOverflowIndicator: h,
|
|
3650
3649
|
measurementRef: g
|
|
3651
|
-
} = Vi(u, t), [f, m] = q(!1), v = (
|
|
3652
|
-
|
|
3650
|
+
} = Vi(u, t), [f, m] = q(!1), v = (D) => {
|
|
3651
|
+
D.stopPropagation(), m((k) => !k);
|
|
3653
3652
|
};
|
|
3654
3653
|
Je(() => {
|
|
3655
|
-
const
|
|
3656
|
-
var
|
|
3654
|
+
const D = (k) => {
|
|
3655
|
+
var le, K;
|
|
3657
3656
|
const L = k.target;
|
|
3658
|
-
!((
|
|
3657
|
+
!((le = l.current) != null && le.contains(L)) && !((K = s.current) != null && K.contains(L)) && m(!1);
|
|
3659
3658
|
};
|
|
3660
|
-
return f && window.addEventListener("mousedown",
|
|
3659
|
+
return f && window.addEventListener("mousedown", D), () => window.removeEventListener("mousedown", D);
|
|
3661
3660
|
}, [f]);
|
|
3662
|
-
const x = t.length === 0, w = f && d.length > 0,
|
|
3663
|
-
id:
|
|
3664
|
-
value:
|
|
3665
|
-
label:
|
|
3666
|
-
icon:
|
|
3667
|
-
})),
|
|
3661
|
+
const x = t.length === 0, w = f && d.length > 0, C = d.map((D) => ({
|
|
3662
|
+
id: D.label,
|
|
3663
|
+
value: D.label,
|
|
3664
|
+
label: D.label,
|
|
3665
|
+
icon: D.icon
|
|
3666
|
+
})), N = (D) => {
|
|
3668
3667
|
var k, L;
|
|
3669
|
-
(L = (k = d.find((F) => F.label ===
|
|
3668
|
+
(L = (k = d.find((F) => F.label === D)) == null ? void 0 : k.onClose) == null || L.call(k), m(!1);
|
|
3670
3669
|
};
|
|
3671
3670
|
return /* @__PURE__ */ b(_i, { borderRadius: "8px", width: "100%", children: [
|
|
3672
|
-
/* @__PURE__ */ a(Ui, { ref: g, children: t.map((
|
|
3671
|
+
/* @__PURE__ */ a(Ui, { ref: g, children: t.map((D) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
|
|
3673
3672
|
He,
|
|
3674
3673
|
{
|
|
3675
3674
|
appearance: "primary",
|
|
3676
3675
|
displayIcon: !0,
|
|
3677
3676
|
removable: !0,
|
|
3678
|
-
icon:
|
|
3679
|
-
label:
|
|
3680
|
-
onClose:
|
|
3677
|
+
icon: D.icon,
|
|
3678
|
+
label: D.label,
|
|
3679
|
+
onClose: D.onClose
|
|
3681
3680
|
}
|
|
3682
|
-
) },
|
|
3683
|
-
/* @__PURE__ */ b(
|
|
3681
|
+
) }, D.label)) }),
|
|
3682
|
+
/* @__PURE__ */ b(we, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
3684
3683
|
/* @__PURE__ */ a(
|
|
3685
|
-
|
|
3684
|
+
ue,
|
|
3686
3685
|
{
|
|
3687
3686
|
ref: u,
|
|
3688
3687
|
background: !0,
|
|
@@ -3693,19 +3692,19 @@ const Pi = N.div`
|
|
|
3693
3692
|
alignItems: "center",
|
|
3694
3693
|
padding: "0px 8px",
|
|
3695
3694
|
border: !0,
|
|
3696
|
-
children: x ? /* @__PURE__ */ a(R, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ b(
|
|
3697
|
-
p.map((
|
|
3695
|
+
children: x ? /* @__PURE__ */ a(R, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ b(_, { children: [
|
|
3696
|
+
p.map((D) => /* @__PURE__ */ a(
|
|
3698
3697
|
He,
|
|
3699
3698
|
{
|
|
3700
3699
|
"data-filter-tag": "true",
|
|
3701
3700
|
appearance: "primary",
|
|
3702
3701
|
displayIcon: !0,
|
|
3703
3702
|
removable: !0,
|
|
3704
|
-
icon:
|
|
3705
|
-
label:
|
|
3706
|
-
onClose:
|
|
3703
|
+
icon: D.icon,
|
|
3704
|
+
label: D.label,
|
|
3705
|
+
onClose: D.onClose
|
|
3707
3706
|
},
|
|
3708
|
-
|
|
3707
|
+
D.label
|
|
3709
3708
|
)),
|
|
3710
3709
|
h && /* @__PURE__ */ b(
|
|
3711
3710
|
"div",
|
|
@@ -3723,20 +3722,20 @@ const Pi = N.div`
|
|
|
3723
3722
|
w && /* @__PURE__ */ a(Pi, { ref: l, children: /* @__PURE__ */ a(
|
|
3724
3723
|
wr,
|
|
3725
3724
|
{
|
|
3726
|
-
options:
|
|
3727
|
-
onOptionClick:
|
|
3728
|
-
children: d.map((
|
|
3725
|
+
options: C,
|
|
3726
|
+
onOptionClick: N,
|
|
3727
|
+
children: d.map((D) => /* @__PURE__ */ a(
|
|
3729
3728
|
Hi,
|
|
3730
3729
|
{
|
|
3731
|
-
id:
|
|
3732
|
-
label:
|
|
3733
|
-
leadingIcon:
|
|
3730
|
+
id: D.label,
|
|
3731
|
+
label: D.label,
|
|
3732
|
+
leadingIcon: D.icon,
|
|
3734
3733
|
onClose: () => {
|
|
3735
3734
|
var k;
|
|
3736
|
-
(k =
|
|
3735
|
+
(k = D.onClose) == null || k.call(D), m(!1);
|
|
3737
3736
|
}
|
|
3738
3737
|
},
|
|
3739
|
-
|
|
3738
|
+
D.label
|
|
3740
3739
|
))
|
|
3741
3740
|
}
|
|
3742
3741
|
) })
|
|
@@ -3770,13 +3769,13 @@ const Pi = N.div`
|
|
|
3770
3769
|
] })
|
|
3771
3770
|
] });
|
|
3772
3771
|
}, ms = (e) => {
|
|
3773
|
-
const { appliedFilters: t, fields: n, onChange: r, noFiltersLabel: o } = e, i =
|
|
3772
|
+
const { appliedFilters: t, fields: n, onChange: r, noFiltersLabel: o } = e, i = ie("(max-width: 768px)"), c = !t || t.length === 0;
|
|
3774
3773
|
return /* @__PURE__ */ b(T, { direction: "column", gap: "16px", children: [
|
|
3775
|
-
i && /* @__PURE__ */ b(
|
|
3774
|
+
i && /* @__PURE__ */ b(_, { children: [
|
|
3776
3775
|
/* @__PURE__ */ b(T, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
3777
3776
|
/* @__PURE__ */ a(B, { appearance: "gray", icon: /* @__PURE__ */ a(_n, {}) }),
|
|
3778
3777
|
/* @__PURE__ */ a(
|
|
3779
|
-
|
|
3778
|
+
ue,
|
|
3780
3779
|
{
|
|
3781
3780
|
background: !0,
|
|
3782
3781
|
borderRadius: "8px",
|
|
@@ -3894,14 +3893,14 @@ const Pi = N.div`
|
|
|
3894
3893
|
} : n;
|
|
3895
3894
|
});
|
|
3896
3895
|
}, qi = (e) => ({
|
|
3897
|
-
schema:
|
|
3896
|
+
schema: me().required("Requerido").test(
|
|
3898
3897
|
"non-empty",
|
|
3899
3898
|
"El valor no puede estar vacío",
|
|
3900
3899
|
(t) => t != null && t.trim() !== ""
|
|
3901
3900
|
),
|
|
3902
3901
|
value: e
|
|
3903
3902
|
}), Wi = (e) => ({
|
|
3904
|
-
schema:
|
|
3903
|
+
schema: xe().test(
|
|
3905
3904
|
"isArrayOrString",
|
|
3906
3905
|
"Debe ser un array de strings/numbers o un solo string",
|
|
3907
3906
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -3910,7 +3909,7 @@ const Pi = N.div`
|
|
|
3910
3909
|
),
|
|
3911
3910
|
value: e
|
|
3912
3911
|
}), Yi = (e) => ({
|
|
3913
|
-
schema:
|
|
3912
|
+
schema: xe().test(
|
|
3914
3913
|
"isArrayOrString",
|
|
3915
3914
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
3916
3915
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -3921,7 +3920,7 @@ const Pi = N.div`
|
|
|
3921
3920
|
}), Xi = (e) => {
|
|
3922
3921
|
const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
|
|
3923
3922
|
return {
|
|
3924
|
-
schema:
|
|
3923
|
+
schema: X({
|
|
3925
3924
|
from: ge().required("El campo 'Rango desde' es requerido").max(n, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
|
|
3926
3925
|
to: ge().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
|
|
3927
3926
|
"is-greater",
|
|
@@ -3934,19 +3933,19 @@ const Pi = N.div`
|
|
|
3934
3933
|
}),
|
|
3935
3934
|
value: { from: t, to: n }
|
|
3936
3935
|
};
|
|
3937
|
-
},
|
|
3936
|
+
}, Ot = (e, t) => t === H.PERCENTAGE ? {
|
|
3938
3937
|
schema: ge().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"),
|
|
3939
3938
|
value: e
|
|
3940
3939
|
} : {
|
|
3941
|
-
schema:
|
|
3940
|
+
schema: me().required("Requerido"),
|
|
3942
3941
|
value: e
|
|
3943
3942
|
}, Qi = {
|
|
3944
3943
|
[I.LIST_OF_VALUES]: Wi,
|
|
3945
3944
|
[I.LIST_OF_VALUES_MULTI]: Yi,
|
|
3946
3945
|
[I.RANGE]: Xi,
|
|
3947
|
-
[I.GREATER_THAN]:
|
|
3948
|
-
[I.LESS_THAN]:
|
|
3949
|
-
[I.EQUAL]:
|
|
3946
|
+
[I.GREATER_THAN]: Ot,
|
|
3947
|
+
[I.LESS_THAN]: Ot,
|
|
3948
|
+
[I.EQUAL]: Ot
|
|
3950
3949
|
}, Cn = (e) => Qi[e] || qi;
|
|
3951
3950
|
function Ji({
|
|
3952
3951
|
decision: e,
|
|
@@ -3967,7 +3966,7 @@ function Ji({
|
|
|
3967
3966
|
};
|
|
3968
3967
|
let o;
|
|
3969
3968
|
const i = {
|
|
3970
|
-
ruleName:
|
|
3969
|
+
ruleName: me().required("El nombre de la regla es requerido"),
|
|
3971
3970
|
value: Qe(() => Cn(
|
|
3972
3971
|
o.values.howToSetTheDecision
|
|
3973
3972
|
)(
|
|
@@ -4013,7 +4012,7 @@ function Ji({
|
|
|
4013
4012
|
// }),
|
|
4014
4013
|
conditionsThatEstablishesTheDecision: Qe((l, { parent: s }) => {
|
|
4015
4014
|
var h;
|
|
4016
|
-
if ((s == null ? void 0 : s.toggleNone) && Object.keys(s.conditionsThatEstablishesTheDecision || {}).length > 0) return
|
|
4015
|
+
if ((s == null ? void 0 : s.toggleNone) && Object.keys(s.conditionsThatEstablishesTheDecision || {}).length > 0) return X().shape({});
|
|
4017
4016
|
const d = ((h = e.conditionsThatEstablishesTheDecision) == null ? void 0 : h.reduce(
|
|
4018
4017
|
(g, f) => {
|
|
4019
4018
|
if (o.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
|
|
@@ -4029,7 +4028,7 @@ function Ji({
|
|
|
4029
4028
|
},
|
|
4030
4029
|
{}
|
|
4031
4030
|
)) ?? {};
|
|
4032
|
-
return
|
|
4031
|
+
return X(d);
|
|
4033
4032
|
})
|
|
4034
4033
|
};
|
|
4035
4034
|
n.terms && (i.effectiveFrom = Le().required(
|
|
@@ -4045,8 +4044,8 @@ function Ji({
|
|
|
4045
4044
|
}
|
|
4046
4045
|
) : s.notRequired()
|
|
4047
4046
|
));
|
|
4048
|
-
const c =
|
|
4049
|
-
return o =
|
|
4047
|
+
const c = X(i);
|
|
4048
|
+
return o = en({
|
|
4050
4049
|
initialValues: r,
|
|
4051
4050
|
validationSchema: c,
|
|
4052
4051
|
validateOnBlur: !0,
|
|
@@ -4088,7 +4087,7 @@ function Ji({
|
|
|
4088
4087
|
});
|
|
4089
4088
|
} };
|
|
4090
4089
|
}
|
|
4091
|
-
const Zi =
|
|
4090
|
+
const Zi = E.div`
|
|
4092
4091
|
& > div {
|
|
4093
4092
|
border-radius: 8px;
|
|
4094
4093
|
border: 1px solid
|
|
@@ -4097,7 +4096,7 @@ const Zi = N.div`
|
|
|
4097
4096
|
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
4098
4097
|
}};
|
|
4099
4098
|
}
|
|
4100
|
-
`, Ki =
|
|
4099
|
+
`, Ki = E.div`
|
|
4101
4100
|
width: 100%;
|
|
4102
4101
|
height: 100%;
|
|
4103
4102
|
overflow-y: auto;
|
|
@@ -4128,9 +4127,9 @@ const Zi = N.div`
|
|
|
4128
4127
|
};
|
|
4129
4128
|
return Je(() => {
|
|
4130
4129
|
s(t);
|
|
4131
|
-
}, [t]), /* @__PURE__ */ b(
|
|
4130
|
+
}, [t]), /* @__PURE__ */ b(_, { children: [
|
|
4132
4131
|
/* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(
|
|
4133
|
-
|
|
4132
|
+
yt,
|
|
4134
4133
|
{
|
|
4135
4134
|
checked: l,
|
|
4136
4135
|
id: o,
|
|
@@ -4141,7 +4140,7 @@ const Zi = N.div`
|
|
|
4141
4140
|
children: /* @__PURE__ */ a(R, { size: "medium", type: "label", weight: "bold", children: i })
|
|
4142
4141
|
}
|
|
4143
4142
|
) }),
|
|
4144
|
-
l && /* @__PURE__ */ a(
|
|
4143
|
+
l && /* @__PURE__ */ a(_, { children: n })
|
|
4145
4144
|
] });
|
|
4146
4145
|
}, ta = (e) => {
|
|
4147
4146
|
const {
|
|
@@ -4158,14 +4157,14 @@ const Zi = N.div`
|
|
|
4158
4157
|
messageEnd: d = "",
|
|
4159
4158
|
statusStart: h = "pending",
|
|
4160
4159
|
statusEnd: g = "pending"
|
|
4161
|
-
} = e, [f, m] = q(c), [v, x] = q(l), [w,
|
|
4160
|
+
} = e, [f, m] = q(c), [v, x] = q(l), [w, C] = q(s), N = ({ target: F }) => {
|
|
4162
4161
|
m(F.checked), r && r(F.checked);
|
|
4163
|
-
},
|
|
4162
|
+
}, D = (F) => {
|
|
4164
4163
|
x(F.target.value), t(F);
|
|
4165
4164
|
}, k = (F) => {
|
|
4166
|
-
|
|
4167
|
-
}, L =
|
|
4168
|
-
return /* @__PURE__ */ b(
|
|
4165
|
+
C(F.target.value), n(F);
|
|
4166
|
+
}, L = ie("(max-width: 400px)");
|
|
4167
|
+
return /* @__PURE__ */ b(_, { children: [
|
|
4169
4168
|
/* @__PURE__ */ b(T, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
4170
4169
|
/* @__PURE__ */ a(
|
|
4171
4170
|
R,
|
|
@@ -4186,10 +4185,10 @@ const Zi = N.div`
|
|
|
4186
4185
|
wrap: "wrap",
|
|
4187
4186
|
gap: "4px",
|
|
4188
4187
|
children: /* @__PURE__ */ a(
|
|
4189
|
-
|
|
4188
|
+
Jt,
|
|
4190
4189
|
{
|
|
4191
4190
|
label: "Cerrada",
|
|
4192
|
-
onChange:
|
|
4191
|
+
onChange: N,
|
|
4193
4192
|
checked: f,
|
|
4194
4193
|
value: ""
|
|
4195
4194
|
}
|
|
@@ -4209,7 +4208,7 @@ const Zi = N.div`
|
|
|
4209
4208
|
{
|
|
4210
4209
|
id: "dateStart",
|
|
4211
4210
|
label: o,
|
|
4212
|
-
onChange:
|
|
4211
|
+
onChange: D,
|
|
4213
4212
|
value: v,
|
|
4214
4213
|
required: u,
|
|
4215
4214
|
size: "compact",
|
|
@@ -4248,7 +4247,7 @@ const Zi = N.div`
|
|
|
4248
4247
|
termEndStatus: p
|
|
4249
4248
|
} = e;
|
|
4250
4249
|
return /* @__PURE__ */ a("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
4251
|
-
|
|
4250
|
+
gt({
|
|
4252
4251
|
condition: i,
|
|
4253
4252
|
formik: t,
|
|
4254
4253
|
isDecision: !0
|
|
@@ -4271,7 +4270,7 @@ const Zi = N.div`
|
|
|
4271
4270
|
children: [
|
|
4272
4271
|
/* @__PURE__ */ a(R, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
|
|
4273
4272
|
/* @__PURE__ */ a(
|
|
4274
|
-
|
|
4273
|
+
yt,
|
|
4275
4274
|
{
|
|
4276
4275
|
id: "toggleNone",
|
|
4277
4276
|
onChange: () => c(!t.values.toggleNone),
|
|
@@ -4294,14 +4293,14 @@ const Zi = N.div`
|
|
|
4294
4293
|
d.conditionName,
|
|
4295
4294
|
d.howToSetTheCondition === I.LIST_OF_VALUES_MULTI
|
|
4296
4295
|
)(h.target.checked),
|
|
4297
|
-
children:
|
|
4296
|
+
children: gt({ condition: d, formik: t })
|
|
4298
4297
|
},
|
|
4299
4298
|
d.conditionName
|
|
4300
4299
|
)) })
|
|
4301
4300
|
]
|
|
4302
4301
|
}
|
|
4303
4302
|
) }) }),
|
|
4304
|
-
n.terms && /* @__PURE__ */ b(
|
|
4303
|
+
n.terms && /* @__PURE__ */ b(_, { children: [
|
|
4305
4304
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
4306
4305
|
/* @__PURE__ */ a(
|
|
4307
4306
|
ta,
|
|
@@ -4430,7 +4429,7 @@ const Zi = N.div`
|
|
|
4430
4429
|
color: A.palette.neutral.N0
|
|
4431
4430
|
}
|
|
4432
4431
|
}
|
|
4433
|
-
}, oa =
|
|
4432
|
+
}, oa = E.div`
|
|
4434
4433
|
& > div {
|
|
4435
4434
|
border: 1px solid
|
|
4436
4435
|
${({ theme: e, $active: t }) => {
|
|
@@ -4446,27 +4445,27 @@ const Zi = N.div`
|
|
|
4446
4445
|
return ((o = (r = (n = e == null ? void 0 : e.menu) == null ? void 0 : n.item) == null ? void 0 : r.background) == null ? void 0 : o.hover) || De.item.background.hover;
|
|
4447
4446
|
}};
|
|
4448
4447
|
}
|
|
4449
|
-
`, Dn =
|
|
4448
|
+
`, Dn = E.div`
|
|
4450
4449
|
display: flex;
|
|
4451
4450
|
align-items: center;
|
|
4452
4451
|
gap: 12px;
|
|
4453
4452
|
width: 100%;
|
|
4454
4453
|
outline: none;
|
|
4455
4454
|
cursor: pointer;
|
|
4456
|
-
`, ia =
|
|
4455
|
+
`, ia = E.div`
|
|
4457
4456
|
display: flex;
|
|
4458
4457
|
align-items: center;
|
|
4459
4458
|
outline: none;
|
|
4460
4459
|
cursor: pointer;
|
|
4461
|
-
`, aa =
|
|
4460
|
+
`, aa = E(Un)`
|
|
4462
4461
|
display: flex;
|
|
4463
4462
|
align-items: center;
|
|
4464
4463
|
text-decoration: none;
|
|
4465
|
-
`, la =
|
|
4464
|
+
`, la = E(Un)`
|
|
4466
4465
|
display: block;
|
|
4467
4466
|
text-decoration: none;
|
|
4468
4467
|
color: inherit;
|
|
4469
|
-
`, sa =
|
|
4468
|
+
`, sa = E.div`
|
|
4470
4469
|
& > div {
|
|
4471
4470
|
border-bottom: 1px solid
|
|
4472
4471
|
${({ theme: e, $active: t }) => {
|
|
@@ -4475,7 +4474,7 @@ const Zi = N.div`
|
|
|
4475
4474
|
}};
|
|
4476
4475
|
border-radius: 8px 8px 0 0;
|
|
4477
4476
|
}
|
|
4478
|
-
`, Wn =
|
|
4477
|
+
`, Wn = E.div`
|
|
4479
4478
|
display: block;
|
|
4480
4479
|
text-decoration: none;
|
|
4481
4480
|
background-color: ${({ theme: e, $active: t }) => {
|
|
@@ -4493,7 +4492,7 @@ const Zi = N.div`
|
|
|
4493
4492
|
return ((i = (o = (r = t == null ? void 0 : t.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : i.hover) || De.item.background.hover;
|
|
4494
4493
|
}};
|
|
4495
4494
|
}
|
|
4496
|
-
`, da =
|
|
4495
|
+
`, da = E.div`
|
|
4497
4496
|
display: flex;
|
|
4498
4497
|
flex-direction: column;
|
|
4499
4498
|
|
|
@@ -4507,13 +4506,13 @@ const Zi = N.div`
|
|
|
4507
4506
|
x.preventDefault(), x.stopPropagation(), r();
|
|
4508
4507
|
}, h = (x) => {
|
|
4509
4508
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), x.stopPropagation(), r());
|
|
4510
|
-
}, g =
|
|
4509
|
+
}, g = j.useCallback(
|
|
4511
4510
|
async (x, w) => {
|
|
4512
4511
|
l && !await l(x, w) || s(x);
|
|
4513
4512
|
},
|
|
4514
4513
|
[s, l]
|
|
4515
|
-
), f = t || u ? "primary" : "dark", m = t || u ? "bold" : "normal", v =
|
|
4516
|
-
return /* @__PURE__ */ a(oa, { $active: t, children: /* @__PURE__ */ b(
|
|
4514
|
+
), f = t || u ? "primary" : "dark", m = t || u ? "bold" : "normal", v = j.useId();
|
|
4515
|
+
return /* @__PURE__ */ a(oa, { $active: t, children: /* @__PURE__ */ b(ue, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
4517
4516
|
/* @__PURE__ */ a(
|
|
4518
4517
|
sa,
|
|
4519
4518
|
{
|
|
@@ -4529,7 +4528,7 @@ const Zi = N.div`
|
|
|
4529
4528
|
label: o
|
|
4530
4529
|
});
|
|
4531
4530
|
}, children: /* @__PURE__ */ b(
|
|
4532
|
-
|
|
4531
|
+
ue,
|
|
4533
4532
|
{
|
|
4534
4533
|
alignItems: "center",
|
|
4535
4534
|
borderRadius: "8px",
|
|
@@ -4542,7 +4541,7 @@ const Zi = N.div`
|
|
|
4542
4541
|
{
|
|
4543
4542
|
appearance: f,
|
|
4544
4543
|
cursorHover: !0,
|
|
4545
|
-
icon: t && n.length > 0 ? /* @__PURE__ */ a(
|
|
4544
|
+
icon: t && n.length > 0 ? /* @__PURE__ */ a(jt, {}) : /* @__PURE__ */ a(un, {})
|
|
4546
4545
|
}
|
|
4547
4546
|
),
|
|
4548
4547
|
/* @__PURE__ */ a(Dn, { children: /* @__PURE__ */ a(
|
|
@@ -4559,7 +4558,7 @@ const Zi = N.div`
|
|
|
4559
4558
|
]
|
|
4560
4559
|
}
|
|
4561
4560
|
) }) : /* @__PURE__ */ b(
|
|
4562
|
-
|
|
4561
|
+
ue,
|
|
4563
4562
|
{
|
|
4564
4563
|
alignItems: "center",
|
|
4565
4564
|
borderRadius: "8px",
|
|
@@ -4572,7 +4571,7 @@ const Zi = N.div`
|
|
|
4572
4571
|
{
|
|
4573
4572
|
appearance: f,
|
|
4574
4573
|
cursorHover: !0,
|
|
4575
|
-
icon: t && n.length > 0 ? /* @__PURE__ */ a(
|
|
4574
|
+
icon: t && n.length > 0 ? /* @__PURE__ */ a(jt, {}) : /* @__PURE__ */ a(un, {})
|
|
4576
4575
|
}
|
|
4577
4576
|
),
|
|
4578
4577
|
/* @__PURE__ */ a(Dn, { children: /* @__PURE__ */ a(
|
|
@@ -4603,8 +4602,8 @@ const Zi = N.div`
|
|
|
4603
4602
|
),
|
|
4604
4603
|
t && n.length > 0 && /* @__PURE__ */ a(da, { id: v, children: n.map((x) => {
|
|
4605
4604
|
const w = x.id === i;
|
|
4606
|
-
return /* @__PURE__ */ a(la, { to: x.path, onClick: async (
|
|
4607
|
-
|
|
4605
|
+
return /* @__PURE__ */ a(la, { to: x.path, onClick: async (C) => {
|
|
4606
|
+
C.preventDefault(), C.stopPropagation(), await g(x.path, x);
|
|
4608
4607
|
}, children: /* @__PURE__ */ a(Wn, { $active: w, children: /* @__PURE__ */ b(
|
|
4609
4608
|
T,
|
|
4610
4609
|
{
|
|
@@ -4629,7 +4628,7 @@ const Zi = N.div`
|
|
|
4629
4628
|
) }) }, x.id);
|
|
4630
4629
|
}) })
|
|
4631
4630
|
] }) });
|
|
4632
|
-
}, ua =
|
|
4631
|
+
}, ua = E.div`
|
|
4633
4632
|
& > div {
|
|
4634
4633
|
background: ${({ $background: e, theme: t }) => {
|
|
4635
4634
|
var n, r, o, i;
|
|
@@ -4643,17 +4642,17 @@ const Zi = N.div`
|
|
|
4643
4642
|
if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (n = r.links) != null && n.some((o) => o.path === e)) return r.id;
|
|
4644
4643
|
return null;
|
|
4645
4644
|
}, Ss = (e) => {
|
|
4646
|
-
const { collapseOnNavigate: t = !1, defaultOpenId: n = null, groups: r, onBeforeNavigate: o } = e, i = Er(), [c, u] =
|
|
4645
|
+
const { collapseOnNavigate: t = !1, defaultOpenId: n = null, groups: r, onBeforeNavigate: o } = e, i = Er(), [c, u] = j.useState(n), l = j.useRef(i.pathname), s = j.useCallback(
|
|
4647
4646
|
(d) => {
|
|
4648
4647
|
var h;
|
|
4649
4648
|
return (h = d.find((g) => g.path === i.pathname)) == null ? void 0 : h.id;
|
|
4650
4649
|
},
|
|
4651
4650
|
[i.pathname]
|
|
4652
|
-
), p =
|
|
4651
|
+
), p = j.useCallback(
|
|
4653
4652
|
(d) => !!d && (i.pathname === d || i.pathname.startsWith(d + "/")),
|
|
4654
4653
|
[i.pathname]
|
|
4655
4654
|
);
|
|
4656
|
-
return
|
|
4655
|
+
return j.useEffect(() => {
|
|
4657
4656
|
if (!(l.current !== i.pathname)) return;
|
|
4658
4657
|
if (l.current = i.pathname, t) {
|
|
4659
4658
|
u(null);
|
|
@@ -4680,7 +4679,7 @@ const Zi = N.div`
|
|
|
4680
4679
|
d.id
|
|
4681
4680
|
)) }) });
|
|
4682
4681
|
};
|
|
4683
|
-
function
|
|
4682
|
+
function J(e) {
|
|
4684
4683
|
e.preventDefault();
|
|
4685
4684
|
}
|
|
4686
4685
|
function ke(e) {
|
|
@@ -4727,9 +4726,9 @@ function je(e) {
|
|
|
4727
4726
|
return { x: e.clientX, y: e.clientY };
|
|
4728
4727
|
}
|
|
4729
4728
|
Array();
|
|
4730
|
-
var
|
|
4729
|
+
var rn = typeof window < "u", Q = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap();
|
|
4731
4730
|
function Zn() {
|
|
4732
|
-
if (!
|
|
4731
|
+
if (!rn) return !1;
|
|
4733
4732
|
if ("userAgentData" in navigator)
|
|
4734
4733
|
return navigator.userAgentData.mobile === !0;
|
|
4735
4734
|
const e = navigator.userAgent, t = /android|iphone|ipod/i.test(e), n = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
@@ -4769,7 +4768,7 @@ var ga = {
|
|
|
4769
4768
|
scrollDebounceTimeout: void 0,
|
|
4770
4769
|
frameIdX: void 0,
|
|
4771
4770
|
frameIdY: void 0
|
|
4772
|
-
}, y = ga, Ee = !1, Nn,
|
|
4771
|
+
}, y = ga, Ee = !1, Nn, Ft;
|
|
4773
4772
|
function fa() {
|
|
4774
4773
|
y.scrollDebounceTimeout && clearTimeout(y.scrollDebounceTimeout), y.longPressTimeout && clearTimeout(y.longPressTimeout), y.frameIdX !== void 0 && cancelAnimationFrame(y.frameIdX), y.frameIdY !== void 0 && cancelAnimationFrame(y.frameIdY), y = { ...{
|
|
4775
4774
|
affectedNodes: [],
|
|
@@ -4818,33 +4817,33 @@ function ma() {
|
|
|
4818
4817
|
y.activeState && $e(y.activeState.parent, void 0, y), y.selectedState && Ae(y.selectedState.nodes, y.selectedState.parent, y), y.selectedState = y.activeState = void 0;
|
|
4819
4818
|
}
|
|
4820
4819
|
function ba() {
|
|
4821
|
-
if (y.pointerDown && (y.pointerDown.node.el.draggable = !0), y.pointerDown = void 0, !
|
|
4820
|
+
if (y.pointerDown && (y.pointerDown.node.el.draggable = !0), y.pointerDown = void 0, !ae(y)) return;
|
|
4822
4821
|
const e = y.currentParent.data.config;
|
|
4823
|
-
|
|
4822
|
+
ae(y) && e.handleEnd(y);
|
|
4824
4823
|
}
|
|
4825
4824
|
function va(e) {
|
|
4826
4825
|
e.key === "Escape" && (y.selectedState && Ae(y.selectedState.nodes, y.selectedState.parent, y), y.activeState && $e(y.activeState.parent, void 0, y), y.selectedState = y.activeState = void 0);
|
|
4827
4826
|
}
|
|
4828
4827
|
function ya(e) {
|
|
4829
|
-
if (!
|
|
4828
|
+
if (!Z(y)) return;
|
|
4830
4829
|
Ee = !0;
|
|
4831
4830
|
const t = y.initialParent.data.config.handleEnd;
|
|
4832
4831
|
t(y);
|
|
4833
4832
|
}
|
|
4834
4833
|
function Ta(e) {
|
|
4835
|
-
if (!
|
|
4836
|
-
|
|
4834
|
+
if (!Z(y)) return;
|
|
4835
|
+
J(e);
|
|
4837
4836
|
const { x: t, y: n } = je(e);
|
|
4838
|
-
|
|
4837
|
+
Z(y) && wt({ x: t, y: n }, e, y);
|
|
4839
4838
|
}
|
|
4840
4839
|
function xa(e) {
|
|
4841
4840
|
if (!y.pointerDown || !y.pointerDown.validated) return;
|
|
4842
4841
|
const t = y.pointerDown.parent.data.config;
|
|
4843
4842
|
if (!(e.pointerType === "mouse" && !Zn()))
|
|
4844
|
-
if (
|
|
4845
|
-
|
|
4843
|
+
if (ae(y))
|
|
4844
|
+
ae(y) && En(e, y);
|
|
4846
4845
|
else {
|
|
4847
|
-
if (
|
|
4846
|
+
if (J(e), t.longPress && !y.longPress) {
|
|
4848
4847
|
clearTimeout(y.longPressTimeout), y.longPress = !1;
|
|
4849
4848
|
return;
|
|
4850
4849
|
}
|
|
@@ -4868,20 +4867,20 @@ function wa({
|
|
|
4868
4867
|
config: r = {}
|
|
4869
4868
|
}) {
|
|
4870
4869
|
var l, s, p;
|
|
4871
|
-
if (!
|
|
4872
|
-
Nn || (Nn =
|
|
4870
|
+
if (!rn) return;
|
|
4871
|
+
Nn || (Nn = mt(document, {
|
|
4873
4872
|
dragover: Ta,
|
|
4874
4873
|
pointerdown: ma,
|
|
4875
4874
|
pointerup: ba,
|
|
4876
4875
|
keydown: va,
|
|
4877
4876
|
drop: ya,
|
|
4878
4877
|
pointermove: xa,
|
|
4879
|
-
pointercancel:
|
|
4878
|
+
pointercancel: te(r.handlePointercancel),
|
|
4880
4879
|
touchmove: (d) => {
|
|
4881
|
-
|
|
4880
|
+
Z(y) && d.cancelable && J(d);
|
|
4882
4881
|
},
|
|
4883
4882
|
contextmenu: (d) => {
|
|
4884
|
-
|
|
4883
|
+
ae(y) && J(d);
|
|
4885
4884
|
}
|
|
4886
4885
|
})), tr(e);
|
|
4887
4886
|
const [o, i] = Yn(), c = {
|
|
@@ -4934,7 +4933,7 @@ function wa({
|
|
|
4934
4933
|
on: i,
|
|
4935
4934
|
emit: o
|
|
4936
4935
|
};
|
|
4937
|
-
new MutationObserver(Ra).observe(e, { childList: !0 }),
|
|
4936
|
+
new MutationObserver(Ra).observe(e, { childList: !0 }), Q.set(e, c), (l = r.plugins) == null || l.forEach((d) => {
|
|
4938
4937
|
var h, g;
|
|
4939
4938
|
(g = (h = d(e)) == null ? void 0 : h.tearDown) == null || g.call(h);
|
|
4940
4939
|
}), (s = r.plugins) == null || s.forEach((d) => {
|
|
@@ -4943,7 +4942,7 @@ function wa({
|
|
|
4943
4942
|
}), (p = r.plugins) == null || p.forEach((d) => {
|
|
4944
4943
|
var h, g;
|
|
4945
4944
|
(g = (h = d(e)) == null ? void 0 : h.setup) == null || g.call(h);
|
|
4946
|
-
}), Ea(e, c),
|
|
4945
|
+
}), Ea(e, c), Tt(e, !0);
|
|
4947
4946
|
}
|
|
4948
4947
|
function er(e, t, n, r, o, i) {
|
|
4949
4948
|
const { x: c, y: u } = je(n), l = e.el.getBoundingClientRect();
|
|
@@ -4985,11 +4984,11 @@ function Sa({
|
|
|
4985
4984
|
draggedNodes: t,
|
|
4986
4985
|
targetNodes: n
|
|
4987
4986
|
}) {
|
|
4988
|
-
|
|
4987
|
+
Tt(e.el);
|
|
4989
4988
|
const r = t.map((l) => l.data.value), o = Me(e.el, e.data), i = t[0].data.index, c = [...e.data.enabledNodes], u = [
|
|
4990
4989
|
...o.filter((l) => !r.some((s) => Ze(l, s)))
|
|
4991
4990
|
];
|
|
4992
|
-
u.splice(n[0].data.index, 0, ...r), "draggedNode" in y && (y.currentTargetValue = n[0].data.value),
|
|
4991
|
+
u.splice(n[0].data.index, 0, ...r), "draggedNode" in y && (y.currentTargetValue = n[0].data.value), qt(e.el, e.data, [...u]), e.data.config.onSort && e.data.config.onSort({
|
|
4993
4992
|
parent: {
|
|
4994
4993
|
el: e.el,
|
|
4995
4994
|
data: e.data
|
|
@@ -5029,7 +5028,7 @@ function Ae(e, t, n) {
|
|
|
5029
5028
|
c !== -1 && n.selectedState.nodes.splice(c, 1);
|
|
5030
5029
|
}
|
|
5031
5030
|
}
|
|
5032
|
-
function
|
|
5031
|
+
function ct(e, t, n, r, o = !1) {
|
|
5033
5032
|
r.pointerSelection = o;
|
|
5034
5033
|
for (const i of t)
|
|
5035
5034
|
i.el.setAttribute("aria-selected", "true"), Oe([i.el], e.data.config.selectedClass, !0);
|
|
@@ -5051,14 +5050,14 @@ function Da({
|
|
|
5051
5050
|
targetNodes: i,
|
|
5052
5051
|
state: c
|
|
5053
5052
|
}) {
|
|
5054
|
-
|
|
5053
|
+
Tt(n.el);
|
|
5055
5054
|
const u = r.map((h) => h.data.value), l = [
|
|
5056
5055
|
...Me(e.el, e.data).filter(
|
|
5057
5056
|
(h) => !u.some((g) => Ze(h, g))
|
|
5058
5057
|
)
|
|
5059
5058
|
], s = Me(t.el, t.data), p = n.el === t.el && t.data.config.sortable === !1;
|
|
5060
5059
|
let d;
|
|
5061
|
-
i.length ? (p ? d = o : t.data.config.sortable === !1 ? d = t.data.enabledNodes.length : d = i[0].data.index, s.splice(d, 0, ...u)) : (d = p ? o : t.data.enabledNodes.length, s.splice(d, 0, ...u)),
|
|
5060
|
+
i.length ? (p ? d = o : t.data.config.sortable === !1 ? d = t.data.enabledNodes.length : d = i[0].data.index, s.splice(d, 0, ...u)) : (d = p ? o : t.data.enabledNodes.length, s.splice(d, 0, ...u)), qt(e.el, e.data, l), qt(t.el, t.data, s), t.data.config.onTransfer && t.data.config.onTransfer({
|
|
5062
5061
|
sourceParent: e,
|
|
5063
5062
|
targetParent: t,
|
|
5064
5063
|
initialParent: n,
|
|
@@ -5079,7 +5078,7 @@ function Da({
|
|
|
5079
5078
|
function Me(e, t) {
|
|
5080
5079
|
return [...t.getValues(e)];
|
|
5081
5080
|
}
|
|
5082
|
-
function
|
|
5081
|
+
function qt(e, t, n) {
|
|
5083
5082
|
t.setValues(n, e);
|
|
5084
5083
|
}
|
|
5085
5084
|
function Na(e, t) {
|
|
@@ -5088,44 +5087,44 @@ function Na(e, t) {
|
|
|
5088
5087
|
n(t);
|
|
5089
5088
|
}
|
|
5090
5089
|
function tr(e) {
|
|
5091
|
-
const t =
|
|
5090
|
+
const t = Q.get(e);
|
|
5092
5091
|
t && t.abortControllers.mainParent && t.abortControllers.mainParent.abort();
|
|
5093
5092
|
}
|
|
5094
|
-
function
|
|
5093
|
+
function Z(e) {
|
|
5095
5094
|
return "draggedNode" in e && !!e.draggedNode;
|
|
5096
5095
|
}
|
|
5097
|
-
function
|
|
5096
|
+
function ae(e) {
|
|
5098
5097
|
return "synthDragging" in e && !!e.synthDragging;
|
|
5099
5098
|
}
|
|
5100
5099
|
function Ea(e, t) {
|
|
5101
|
-
t.abortControllers.mainParent =
|
|
5102
|
-
dragover:
|
|
5100
|
+
t.abortControllers.mainParent = mt(e, {
|
|
5101
|
+
dragover: ut(t.config.handleParentDragover),
|
|
5103
5102
|
handleParentPointerover: t.config.handleParentPointerover,
|
|
5104
|
-
scroll:
|
|
5105
|
-
drop:
|
|
5103
|
+
scroll: ut(t.config.handleParentScroll),
|
|
5104
|
+
drop: ut(t.config.handleParentDrop),
|
|
5106
5105
|
hasNestedParent: (n) => {
|
|
5107
|
-
const r =
|
|
5106
|
+
const r = Q.get(n.target);
|
|
5108
5107
|
r && (r.nestedParent = n.detail.parent);
|
|
5109
5108
|
},
|
|
5110
|
-
focus:
|
|
5111
|
-
}), t.config.externalDragHandle && t.config.externalDragHandle.el && t.config.externalDragHandle.callback && (t.abortControllers.externalDragHandle =
|
|
5109
|
+
focus: ut(t.config.handleParentFocus)
|
|
5110
|
+
}), t.config.externalDragHandle && t.config.externalDragHandle.el && t.config.externalDragHandle.callback && (t.abortControllers.externalDragHandle = mt(
|
|
5112
5111
|
t.config.externalDragHandle.el,
|
|
5113
5112
|
{
|
|
5114
5113
|
pointerdown: (n) => {
|
|
5115
5114
|
if (!t.config.externalDragHandle || !t.config.externalDragHandle.callback)
|
|
5116
5115
|
return;
|
|
5117
5116
|
const r = t.config.externalDragHandle.callback();
|
|
5118
|
-
if (!
|
|
5117
|
+
if (!St(r)) {
|
|
5119
5118
|
console.warn(
|
|
5120
5119
|
"No draggable item found from external drag handle callback"
|
|
5121
5120
|
);
|
|
5122
5121
|
return;
|
|
5123
5122
|
}
|
|
5124
|
-
const o =
|
|
5123
|
+
const o = be.get(r);
|
|
5125
5124
|
if (!o) return;
|
|
5126
5125
|
const i = r.parentNode;
|
|
5127
5126
|
if (!(i instanceof HTMLElement)) return;
|
|
5128
|
-
const c =
|
|
5127
|
+
const c = Q.get(i);
|
|
5129
5128
|
c && (y.pointerDown = {
|
|
5130
5129
|
parent: {
|
|
5131
5130
|
el: i,
|
|
@@ -5144,25 +5143,25 @@ function Ea(e, t) {
|
|
|
5144
5143
|
function ka(e) {
|
|
5145
5144
|
var n;
|
|
5146
5145
|
const t = e.parent.data.config;
|
|
5147
|
-
e.node.data.abortControllers.mainNode =
|
|
5148
|
-
keydown:
|
|
5149
|
-
dragstart:
|
|
5150
|
-
dragover:
|
|
5151
|
-
dragenter:
|
|
5152
|
-
dragleave:
|
|
5153
|
-
dragend:
|
|
5154
|
-
drop:
|
|
5155
|
-
focus:
|
|
5156
|
-
blur:
|
|
5157
|
-
pointerup:
|
|
5158
|
-
pointercancel:
|
|
5159
|
-
pointerdown:
|
|
5146
|
+
e.node.data.abortControllers.mainNode = mt(e.node.el, {
|
|
5147
|
+
keydown: te(t.handleNodeKeydown),
|
|
5148
|
+
dragstart: te(t.handleDragstart),
|
|
5149
|
+
dragover: te(t.handleNodeDragover),
|
|
5150
|
+
dragenter: te(t.handleNodeDragenter),
|
|
5151
|
+
dragleave: te(t.handleNodeDragleave),
|
|
5152
|
+
dragend: te(t.handleDragend),
|
|
5153
|
+
drop: te(t.handleNodeDrop),
|
|
5154
|
+
focus: te(t.handleNodeFocus),
|
|
5155
|
+
blur: te(t.handleNodeBlur),
|
|
5156
|
+
pointerup: te(t.handleNodePointerup),
|
|
5157
|
+
pointercancel: te(t.handlePointercancel),
|
|
5158
|
+
pointerdown: te(t.handleNodePointerdown),
|
|
5160
5159
|
handleNodePointerover: t.handleNodePointerover,
|
|
5161
5160
|
touchmove: (r) => {
|
|
5162
|
-
|
|
5161
|
+
Z(y) && r.cancelable && J(r);
|
|
5163
5162
|
},
|
|
5164
5163
|
contextmenu: (r) => {
|
|
5165
|
-
|
|
5164
|
+
ae(y) && J(r);
|
|
5166
5165
|
}
|
|
5167
5166
|
}), e.node.el.draggable = !0, t.reapplyDragClasses(e.node.el, e.parent.data), (n = e.parent.data.config.plugins) == null || n.forEach((r) => {
|
|
5168
5167
|
var o, i;
|
|
@@ -5171,14 +5170,14 @@ function ka(e) {
|
|
|
5171
5170
|
}
|
|
5172
5171
|
function nr(e) {
|
|
5173
5172
|
var t;
|
|
5174
|
-
|
|
5173
|
+
be.set(e.node.el, e.node.data), (t = e.parent.data.config.plugins) == null || t.forEach((n) => {
|
|
5175
5174
|
var r, o;
|
|
5176
5175
|
(o = (r = n(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
|
|
5177
5176
|
});
|
|
5178
5177
|
}
|
|
5179
5178
|
function Aa(e, t) {
|
|
5180
|
-
if (!
|
|
5181
|
-
const n =
|
|
5179
|
+
if (!Z(y)) return;
|
|
5180
|
+
const n = ae(y) ? t.config.synthDropZoneClass : t.config.dropZoneClass;
|
|
5182
5181
|
y.draggedNode.el === e && Oe([e], n, !0);
|
|
5183
5182
|
}
|
|
5184
5183
|
function $a(e) {
|
|
@@ -5199,18 +5198,18 @@ function Ra(e) {
|
|
|
5199
5198
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
5200
5199
|
return;
|
|
5201
5200
|
const t = e[0].target;
|
|
5202
|
-
!(t instanceof HTMLElement) || !
|
|
5201
|
+
!(t instanceof HTMLElement) || !Q.get(t) || Tt(t);
|
|
5203
5202
|
}
|
|
5204
|
-
function
|
|
5203
|
+
function Tt(e, t) {
|
|
5205
5204
|
var u;
|
|
5206
|
-
const n =
|
|
5205
|
+
const n = Q.get(e);
|
|
5207
5206
|
if (!n) return;
|
|
5208
5207
|
n.privateClasses = Array.from(e.classList);
|
|
5209
5208
|
const r = [], o = n.config;
|
|
5210
5209
|
for (let l = 0; l < e.children.length; l++) {
|
|
5211
5210
|
const s = e.children[l];
|
|
5212
|
-
if (!
|
|
5213
|
-
const p =
|
|
5211
|
+
if (!St(s) || s.id === "dnd-dragged-node-clone") continue;
|
|
5212
|
+
const p = be.get(s);
|
|
5214
5213
|
(t || !p) && o.tearDownNode({
|
|
5215
5214
|
parent: {
|
|
5216
5215
|
el: e,
|
|
@@ -5230,7 +5229,7 @@ function xt(e, t) {
|
|
|
5230
5229
|
}
|
|
5231
5230
|
const i = n.getValues(e), c = [];
|
|
5232
5231
|
for (let l = 0; l < r.length; l++) {
|
|
5233
|
-
const s = r[l], p =
|
|
5232
|
+
const s = r[l], p = be.get(s);
|
|
5234
5233
|
if (o.draggableValue && !o.draggableValue(i[l])) continue;
|
|
5235
5234
|
const d = Object.assign(
|
|
5236
5235
|
p ?? {
|
|
@@ -5242,7 +5241,7 @@ function xt(e, t) {
|
|
|
5242
5241
|
index: l
|
|
5243
5242
|
}
|
|
5244
5243
|
);
|
|
5245
|
-
if (!
|
|
5244
|
+
if (!Z(y) && y.activeState && Ze(y.activeState.node.data.value, d.value) && $e(
|
|
5246
5245
|
{
|
|
5247
5246
|
data: n,
|
|
5248
5247
|
el: e
|
|
@@ -5252,7 +5251,7 @@ function xt(e, t) {
|
|
|
5252
5251
|
data: d
|
|
5253
5252
|
},
|
|
5254
5253
|
y
|
|
5255
|
-
),
|
|
5254
|
+
), Z(y) && Ze(y.draggedNode.data.value, d.value)) {
|
|
5256
5255
|
y.draggedNode.data = d, y.draggedNode.el = s;
|
|
5257
5256
|
const h = y.draggedNodes.find(
|
|
5258
5257
|
(g) => g.data.value === d.value
|
|
@@ -5282,7 +5281,7 @@ function xt(e, t) {
|
|
|
5282
5281
|
}
|
|
5283
5282
|
});
|
|
5284
5283
|
}
|
|
5285
|
-
|
|
5284
|
+
Q.set(e, { ...n, enabledNodes: c }), o.remapFinished(n), (u = n.config.plugins) == null || u.forEach((l) => {
|
|
5286
5285
|
var s, p;
|
|
5287
5286
|
(p = (s = l(e)) == null ? void 0 : s.remapFinished) == null || p.call(s);
|
|
5288
5287
|
});
|
|
@@ -5307,7 +5306,7 @@ function La(e) {
|
|
|
5307
5306
|
return [];
|
|
5308
5307
|
}
|
|
5309
5308
|
function Ma(e) {
|
|
5310
|
-
|
|
5309
|
+
Z(y) && (y.emit("scrollStarted", y), !ae(y) && (y.preventEnter = !0, Ft && clearTimeout(Ft), Ft = setTimeout(() => {
|
|
5311
5310
|
y.preventEnter = !1, y.emit("scrollEnded", y);
|
|
5312
5311
|
}, 100)));
|
|
5313
5312
|
}
|
|
@@ -5319,7 +5318,7 @@ function ja(e, t) {
|
|
|
5319
5318
|
node: e.targetData.node,
|
|
5320
5319
|
config: n
|
|
5321
5320
|
})) {
|
|
5322
|
-
|
|
5321
|
+
J(e.e);
|
|
5323
5322
|
return;
|
|
5324
5323
|
}
|
|
5325
5324
|
let r = n.draggedNodes({
|
|
@@ -5365,7 +5364,7 @@ function _a(e, t) {
|
|
|
5365
5364
|
(p) => p.el === c.el
|
|
5366
5365
|
) === -1 ? r = [...t.selectedState.nodes, c] : r = t.selectedState.nodes.filter(
|
|
5367
5366
|
(p) => p.el !== c.el
|
|
5368
|
-
) : r = [c],
|
|
5367
|
+
) : r = [c], ct(
|
|
5369
5368
|
e.targetData.parent,
|
|
5370
5369
|
r,
|
|
5371
5370
|
e.targetData.node,
|
|
@@ -5394,7 +5393,7 @@ function _a(e, t) {
|
|
|
5394
5393
|
else
|
|
5395
5394
|
for (let p = 0; p <= c.data.index; p++)
|
|
5396
5395
|
r.push(s[p]);
|
|
5397
|
-
|
|
5396
|
+
ct(
|
|
5398
5397
|
e.targetData.parent,
|
|
5399
5398
|
r,
|
|
5400
5399
|
e.targetData.node,
|
|
@@ -5405,13 +5404,13 @@ function _a(e, t) {
|
|
|
5405
5404
|
}
|
|
5406
5405
|
(l = (u = t.selectedState) == null ? void 0 : u.nodes) != null && l.length ? t.selectedState.nodes.findIndex(
|
|
5407
5406
|
(p) => p.el === e.targetData.node.el
|
|
5408
|
-
) === -1 && (t.selectedState.parent.el !== e.targetData.parent.el ? Ae(t.selectedState.nodes, e.targetData.parent, t) : n.config.multiDrag && Zn() ? r.push(...t.selectedState.nodes) : Ae(t.selectedState.nodes, e.targetData.parent, t),
|
|
5407
|
+
) === -1 && (t.selectedState.parent.el !== e.targetData.parent.el ? Ae(t.selectedState.nodes, e.targetData.parent, t) : n.config.multiDrag && Zn() ? r.push(...t.selectedState.nodes) : Ae(t.selectedState.nodes, e.targetData.parent, t), ct(
|
|
5409
5408
|
e.targetData.parent,
|
|
5410
5409
|
r,
|
|
5411
5410
|
e.targetData.node,
|
|
5412
5411
|
t,
|
|
5413
5412
|
!0
|
|
5414
|
-
)) :
|
|
5413
|
+
)) : ct(
|
|
5415
5414
|
e.targetData.parent,
|
|
5416
5415
|
[e.targetData.node],
|
|
5417
5416
|
e.targetData.node,
|
|
@@ -5513,7 +5512,7 @@ function rr({
|
|
|
5513
5512
|
function Ua(e) {
|
|
5514
5513
|
}
|
|
5515
5514
|
function Ga(e) {
|
|
5516
|
-
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? ir(e.detail, e.detail.state) :
|
|
5515
|
+
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? ir(e.detail, e.detail.state) : xt(e.detail, e.detail.state);
|
|
5517
5516
|
}
|
|
5518
5517
|
function za(e, t) {
|
|
5519
5518
|
const n = e.targetData.parent.data.config;
|
|
@@ -5528,7 +5527,7 @@ function Ba(e) {
|
|
|
5528
5527
|
function qa(e, t) {
|
|
5529
5528
|
const n = e.targetData.parent.data.config;
|
|
5530
5529
|
if (n.nativeDrag) {
|
|
5531
|
-
if (
|
|
5530
|
+
if (J(e.e), ke(e.e), Ee) {
|
|
5532
5531
|
Ee = !1;
|
|
5533
5532
|
return;
|
|
5534
5533
|
}
|
|
@@ -5537,12 +5536,12 @@ function qa(e, t) {
|
|
|
5537
5536
|
}
|
|
5538
5537
|
function Wa(e, t) {
|
|
5539
5538
|
var r;
|
|
5540
|
-
if (!
|
|
5541
|
-
if (
|
|
5539
|
+
if (!ae(t)) return;
|
|
5540
|
+
if (J(e.e), Ee) {
|
|
5542
5541
|
Ee = !1;
|
|
5543
5542
|
return;
|
|
5544
5543
|
}
|
|
5545
|
-
const n = (r =
|
|
5544
|
+
const n = (r = Q.get(t.initialParent.el)) == null ? void 0 : r.config;
|
|
5546
5545
|
n != null && n.onDragend && n.onDragend({
|
|
5547
5546
|
parent: t.currentParent,
|
|
5548
5547
|
values: Me(t.currentParent.el, t.currentParent.data),
|
|
@@ -5554,8 +5553,8 @@ function Wa(e, t) {
|
|
|
5554
5553
|
function Ya(e) {
|
|
5555
5554
|
var p, d, h, g, f;
|
|
5556
5555
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
5557
|
-
const t = e.draggedNodes.map((m) => m.el), n = e.initialParent.data, r =
|
|
5558
|
-
|
|
5556
|
+
const t = e.draggedNodes.map((m) => m.el), n = e.initialParent.data, r = ae(e), o = (p = Q.get(e.initialParent.el)) == null ? void 0 : p.config, i = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, c = (d = n == null ? void 0 : n.config) == null ? void 0 : d.longPressClass, u = 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;
|
|
5557
|
+
ae(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Wt(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(() => {
|
|
5559
5558
|
Ne(t, i), Ne(t, c), Ne(t, u);
|
|
5560
5559
|
}), Ae(e.draggedNodes, e.currentParent, e), $e(e.currentParent, void 0, e);
|
|
5561
5560
|
const s = { ...e };
|
|
@@ -5576,7 +5575,7 @@ function Xa(e, t) {
|
|
|
5576
5575
|
t.pointerSelection = !1, "longPressTimeout" in t && t.longPressTimeout && clearTimeout(t.longPressTimeout), t.longPress = !1, Ne(
|
|
5577
5576
|
e.targetData.parent.data.enabledNodes.map((r) => r.el),
|
|
5578
5577
|
n.longPressClass
|
|
5579
|
-
),
|
|
5578
|
+
), Z(t) && n.handleEnd(t);
|
|
5580
5579
|
}
|
|
5581
5580
|
function Qa(e, t, n, r, o, i) {
|
|
5582
5581
|
var f, m;
|
|
@@ -5612,8 +5611,8 @@ function Qa(e, t, n, r, o, i) {
|
|
|
5612
5611
|
"overflow"
|
|
5613
5612
|
], p = (v, x) => {
|
|
5614
5613
|
const w = window.getComputedStyle(v);
|
|
5615
|
-
s.forEach((
|
|
5616
|
-
x.style[
|
|
5614
|
+
s.forEach((C) => {
|
|
5615
|
+
x.style[C] = w[C];
|
|
5617
5616
|
});
|
|
5618
5617
|
}, d = (v, x = {}) => {
|
|
5619
5618
|
Object.assign(v.style, {
|
|
@@ -5664,10 +5663,10 @@ function Qa(e, t, n, r, o, i) {
|
|
|
5664
5663
|
function Ja(e, t, n) {
|
|
5665
5664
|
const r = e.targetData.parent.data.config;
|
|
5666
5665
|
t.longPressTimeout = setTimeout(() => {
|
|
5667
|
-
t && (t.longPress = !0, r.longPressClass && e.e.cancelable && Oe([n.el], r.longPressClass),
|
|
5666
|
+
t && (t.longPress = !0, r.longPressClass && e.e.cancelable && Oe([n.el], r.longPressClass), J(e.e));
|
|
5668
5667
|
}, r.longPressDuration || 1e3);
|
|
5669
5668
|
}
|
|
5670
|
-
function
|
|
5669
|
+
function Wt(e, t = !0, n = !0) {
|
|
5671
5670
|
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);
|
|
5672
5671
|
}
|
|
5673
5672
|
function or(e, t = !1) {
|
|
@@ -5681,7 +5680,7 @@ function or(e, t = !1) {
|
|
|
5681
5680
|
function En(e, t, n = !1) {
|
|
5682
5681
|
const r = je(e);
|
|
5683
5682
|
t.coordinates.x = r.x, t.coordinates.y = r.y, or(t, n), t.scrollDebounceTimeout && (clearTimeout(t.scrollDebounceTimeout), t.scrollDebounceTimeout = void 0), t.scrollDebounceTimeout = setTimeout(() => {
|
|
5684
|
-
|
|
5683
|
+
ae(t) && wt(t.coordinates, e, t);
|
|
5685
5684
|
}, 16);
|
|
5686
5685
|
const o = ll(r);
|
|
5687
5686
|
if (!o) {
|
|
@@ -5714,16 +5713,16 @@ function Za(e, t) {
|
|
|
5714
5713
|
var i;
|
|
5715
5714
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5716
5715
|
const { x: r, y: o } = je(e.e);
|
|
5717
|
-
t.coordinates.y = o, t.coordinates.x = r,
|
|
5716
|
+
t.coordinates.y = o, t.coordinates.x = r, J(e.e), ke(e.e), Z(t) && wt({ x: r, y: o }, e.e, t), e.targetData.parent.el === ((i = t.currentParent) == null ? void 0 : i.el) ? ir(e, t) : xt(e, t);
|
|
5718
5717
|
}
|
|
5719
5718
|
function Ka(e, t) {
|
|
5720
5719
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5721
|
-
|
|
5720
|
+
J(e.e), ke(e.e);
|
|
5722
5721
|
const { x: r, y: o } = je(e.e);
|
|
5723
|
-
|
|
5722
|
+
Z(t) && wt({ x: r, y: o }, e.e, t), xt(e, t);
|
|
5724
5723
|
}
|
|
5725
5724
|
function el(e) {
|
|
5726
|
-
e.detail.targetData.parent.el !== e.detail.state.currentParent.el &&
|
|
5725
|
+
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && xt(e.detail, e.detail.state);
|
|
5727
5726
|
}
|
|
5728
5727
|
function tl({
|
|
5729
5728
|
currentParent: e,
|
|
@@ -5744,10 +5743,10 @@ function tl({
|
|
|
5744
5743
|
) : !(!i.group || i.group !== c.group);
|
|
5745
5744
|
}
|
|
5746
5745
|
function nl(e, t) {
|
|
5747
|
-
|
|
5746
|
+
J(e.e);
|
|
5748
5747
|
}
|
|
5749
5748
|
function rl(e, t) {
|
|
5750
|
-
|
|
5749
|
+
J(e.e);
|
|
5751
5750
|
}
|
|
5752
5751
|
function ol(e, t, n, r) {
|
|
5753
5752
|
var p;
|
|
@@ -5796,11 +5795,11 @@ function ir(e, t) {
|
|
|
5796
5795
|
targetNodes: [e.targetData.node]
|
|
5797
5796
|
});
|
|
5798
5797
|
}
|
|
5799
|
-
function
|
|
5798
|
+
function te(e) {
|
|
5800
5799
|
function t(n) {
|
|
5801
|
-
const r =
|
|
5800
|
+
const r = be.get(n);
|
|
5802
5801
|
if (!r) return;
|
|
5803
|
-
const o =
|
|
5802
|
+
const o = Q.get(n.parentNode);
|
|
5804
5803
|
if (o)
|
|
5805
5804
|
return {
|
|
5806
5805
|
node: {
|
|
@@ -5825,8 +5824,8 @@ function ne(e) {
|
|
|
5825
5824
|
);
|
|
5826
5825
|
};
|
|
5827
5826
|
}
|
|
5828
|
-
function
|
|
5829
|
-
|
|
5827
|
+
function xt(e, t) {
|
|
5828
|
+
J(e.e), tl({
|
|
5830
5829
|
currentParent: t.currentParent,
|
|
5831
5830
|
targetParent: e.targetData.parent,
|
|
5832
5831
|
initialParent: t.initialParent,
|
|
@@ -5842,9 +5841,9 @@ function wt(e, t) {
|
|
|
5842
5841
|
targetNodes: "node" in e.targetData ? [e.targetData.node] : []
|
|
5843
5842
|
}), t.currentParent = e.targetData.parent, t.transferred = !0);
|
|
5844
5843
|
}
|
|
5845
|
-
function
|
|
5844
|
+
function ut(e) {
|
|
5846
5845
|
function t(n) {
|
|
5847
|
-
const r =
|
|
5846
|
+
const r = Q.get(n);
|
|
5848
5847
|
if (r)
|
|
5849
5848
|
return {
|
|
5850
5849
|
parent: {
|
|
@@ -5867,10 +5866,10 @@ function pt(e) {
|
|
|
5867
5866
|
}
|
|
5868
5867
|
function Oe(e, t, n = !1) {
|
|
5869
5868
|
function r(o, i) {
|
|
5870
|
-
|
|
5869
|
+
be.set(o, i);
|
|
5871
5870
|
}
|
|
5872
5871
|
for (const o of e) {
|
|
5873
|
-
const i =
|
|
5872
|
+
const i = be.get(o), c = il(o, t, i, n);
|
|
5874
5873
|
c && r(o, c);
|
|
5875
5874
|
}
|
|
5876
5875
|
}
|
|
@@ -5896,11 +5895,11 @@ function Ne(e, t) {
|
|
|
5896
5895
|
const n = Jn(t);
|
|
5897
5896
|
if (n.length)
|
|
5898
5897
|
for (const r of e) {
|
|
5899
|
-
if (!
|
|
5898
|
+
if (!St(r)) {
|
|
5900
5899
|
r.classList.remove(...n);
|
|
5901
5900
|
continue;
|
|
5902
5901
|
}
|
|
5903
|
-
const o =
|
|
5902
|
+
const o = be.get(r) || Q.get(r);
|
|
5904
5903
|
if (o)
|
|
5905
5904
|
for (const i of n)
|
|
5906
5905
|
o.privateClasses.includes(i) || r.classList.remove(i);
|
|
@@ -5919,25 +5918,25 @@ function kn(e, t, n, r, o) {
|
|
|
5919
5918
|
};
|
|
5920
5919
|
}
|
|
5921
5920
|
if ((f === "auto" || f === "scroll") && e !== document.body && e !== document.documentElement) {
|
|
5922
|
-
const m = e[d], v = e[p], x = e[l], w = x > 0,
|
|
5921
|
+
const m = e[d], v = e[p], x = e[l], w = x > 0, C = x < m - v;
|
|
5923
5922
|
return c ? {
|
|
5924
5923
|
left: w && h < g + v * 0.075,
|
|
5925
|
-
right:
|
|
5924
|
+
right: C && h > g + v * (1 - 0.075)
|
|
5926
5925
|
} : {
|
|
5927
5926
|
up: w && h < g + v * 0.075,
|
|
5928
|
-
down:
|
|
5927
|
+
down: C && h > g + v * (1 - 0.075)
|
|
5929
5928
|
};
|
|
5930
5929
|
}
|
|
5931
5930
|
return c ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
5932
5931
|
}
|
|
5933
5932
|
function al(e, t, n, r) {
|
|
5934
|
-
if (!
|
|
5933
|
+
if (!Z(n) || !n.draggedNode)
|
|
5935
5934
|
return;
|
|
5936
5935
|
n.preventEnter = !0;
|
|
5937
5936
|
const o = r.axis === "x", i = r.direction === "positive" ? 1 : -1, c = 20, u = o ? "lastScrollDirectionX" : "lastScrollDirectionY", l = o ? "frameIdX" : "frameIdY";
|
|
5938
5937
|
n[l] !== void 0 && (cancelAnimationFrame(n[l]), n[l] = void 0), n[u] = r.direction;
|
|
5939
5938
|
const s = () => {
|
|
5940
|
-
if (!
|
|
5939
|
+
if (!Z(n) || !n.draggedNode) {
|
|
5941
5940
|
n[l] !== void 0 && (cancelAnimationFrame(n[l]), n[l] = void 0);
|
|
5942
5941
|
return;
|
|
5943
5942
|
}
|
|
@@ -5946,7 +5945,7 @@ function al(e, t, n, r) {
|
|
|
5946
5945
|
n[l] = void 0, n[u] = void 0;
|
|
5947
5946
|
return;
|
|
5948
5947
|
}
|
|
5949
|
-
e[p] += c * i,
|
|
5948
|
+
e[p] += c * i, ae(n) && or(n), n[l] = requestAnimationFrame(s);
|
|
5950
5949
|
};
|
|
5951
5950
|
n[l] = requestAnimationFrame(s);
|
|
5952
5951
|
}
|
|
@@ -5954,10 +5953,10 @@ function An(e, t, n) {
|
|
|
5954
5953
|
const r = e.getBoundingClientRect();
|
|
5955
5954
|
return t >= r.left && t <= r.right && n >= r.top && n <= r.bottom;
|
|
5956
5955
|
}
|
|
5957
|
-
function
|
|
5958
|
-
if (!
|
|
5956
|
+
function wt(e, t, n) {
|
|
5957
|
+
if (!Z(n) || !n.draggedNode)
|
|
5959
5958
|
return;
|
|
5960
|
-
|
|
5959
|
+
Wt(n);
|
|
5961
5960
|
const { x: r, y: o } = e;
|
|
5962
5961
|
let i = !1;
|
|
5963
5962
|
const c = (l, s, p) => {
|
|
@@ -5978,21 +5977,21 @@ function St(e, t, n) {
|
|
|
5978
5977
|
const l = document.scrollingElement;
|
|
5979
5978
|
l instanceof HTMLElement && u(l);
|
|
5980
5979
|
}
|
|
5981
|
-
i ||
|
|
5980
|
+
i || Wt(n);
|
|
5982
5981
|
}
|
|
5983
5982
|
function ll(e) {
|
|
5984
5983
|
let t = document.elementFromPoint(e.x, e.y);
|
|
5985
|
-
if (!
|
|
5984
|
+
if (!St(t)) return;
|
|
5986
5985
|
let n, r = !0;
|
|
5987
5986
|
for (; t && r; ) {
|
|
5988
|
-
if (
|
|
5989
|
-
r = !1, n =
|
|
5987
|
+
if (be.has(t) || Q.has(t)) {
|
|
5988
|
+
r = !1, n = Q.has(t);
|
|
5990
5989
|
break;
|
|
5991
5990
|
}
|
|
5992
5991
|
t = t.parentNode;
|
|
5993
5992
|
}
|
|
5994
5993
|
if (n) {
|
|
5995
|
-
const o =
|
|
5994
|
+
const o = Q.get(t);
|
|
5996
5995
|
return o ? {
|
|
5997
5996
|
parent: {
|
|
5998
5997
|
el: t,
|
|
@@ -6000,9 +5999,9 @@ function ll(e) {
|
|
|
6000
5999
|
}
|
|
6001
6000
|
} : void 0;
|
|
6002
6001
|
} else {
|
|
6003
|
-
const o =
|
|
6002
|
+
const o = be.get(t);
|
|
6004
6003
|
if (!o) return;
|
|
6005
|
-
const i =
|
|
6004
|
+
const i = Q.get(t.parentNode);
|
|
6006
6005
|
return i ? {
|
|
6007
6006
|
node: {
|
|
6008
6007
|
el: t,
|
|
@@ -6015,10 +6014,10 @@ function ll(e) {
|
|
|
6015
6014
|
} : void 0;
|
|
6016
6015
|
}
|
|
6017
6016
|
}
|
|
6018
|
-
function
|
|
6017
|
+
function St(e) {
|
|
6019
6018
|
return e instanceof HTMLElement && e.parentNode instanceof HTMLElement;
|
|
6020
6019
|
}
|
|
6021
|
-
function
|
|
6020
|
+
function mt(e, t) {
|
|
6022
6021
|
const n = new AbortController();
|
|
6023
6022
|
for (const r in t) {
|
|
6024
6023
|
const o = t[r];
|
|
@@ -6040,22 +6039,22 @@ function dl(e, t) {
|
|
|
6040
6039
|
const n = sl(e);
|
|
6041
6040
|
n && t(n);
|
|
6042
6041
|
}
|
|
6043
|
-
var
|
|
6042
|
+
var bt = /* @__PURE__ */ new WeakMap();
|
|
6044
6043
|
function cl(e) {
|
|
6045
|
-
const t =
|
|
6044
|
+
const t = bt.get(e);
|
|
6046
6045
|
return t ? t[0] : (console.warn("No values found for parent element"), []);
|
|
6047
6046
|
}
|
|
6048
6047
|
function ul(e, t) {
|
|
6049
|
-
const n =
|
|
6050
|
-
n && n[1](e),
|
|
6048
|
+
const n = bt.get(t);
|
|
6049
|
+
n && n[1](e), bt.set(t, [e, n[1]]);
|
|
6051
6050
|
}
|
|
6052
6051
|
function pl(e, t) {
|
|
6053
6052
|
return (n) => {
|
|
6054
|
-
|
|
6053
|
+
bt.set(n, t), wa({ parent: n, getValues: cl, setValues: ul, config: e });
|
|
6055
6054
|
};
|
|
6056
6055
|
}
|
|
6057
6056
|
function $n(e) {
|
|
6058
|
-
|
|
6057
|
+
rn && (Array.isArray(e) || (e = [e]), e.forEach((t) => {
|
|
6059
6058
|
const { parent: n, state: r, ...o } = t;
|
|
6060
6059
|
dl(n, pl(o, r));
|
|
6061
6060
|
}));
|
|
@@ -6080,7 +6079,7 @@ const In = {
|
|
|
6080
6079
|
color: A.palette.neutral.N40
|
|
6081
6080
|
}
|
|
6082
6081
|
}
|
|
6083
|
-
}, gl =
|
|
6082
|
+
}, gl = E.ul`
|
|
6084
6083
|
list-style: none;
|
|
6085
6084
|
padding: 0;
|
|
6086
6085
|
margin: 0;
|
|
@@ -6089,7 +6088,7 @@ const In = {
|
|
|
6089
6088
|
gap: 12px;
|
|
6090
6089
|
width: 100%;
|
|
6091
6090
|
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
6092
|
-
`, fl =
|
|
6091
|
+
`, fl = E.li`
|
|
6093
6092
|
& > div {
|
|
6094
6093
|
border: 1px solid
|
|
6095
6094
|
${({ theme: e, $active: t }) => {
|
|
@@ -6097,7 +6096,7 @@ const In = {
|
|
|
6097
6096
|
return t ? ((r = (n = e == null ? void 0 : e.border) == null ? void 0 : n.selected) == null ? void 0 : r.color) || In.border.selected.color : ((i = (o = e == null ? void 0 : e.border) == null ? void 0 : o.clear) == null ? void 0 : i.color) || In.border.clear.color;
|
|
6098
6097
|
}};
|
|
6099
6098
|
}
|
|
6100
|
-
`,
|
|
6099
|
+
`, Lt = "dnd:draggingLabel", Rn = (e) => {
|
|
6101
6100
|
const {
|
|
6102
6101
|
emptyMessage: t,
|
|
6103
6102
|
id: n,
|
|
@@ -6107,40 +6106,40 @@ const In = {
|
|
|
6107
6106
|
highlightFirst: c,
|
|
6108
6107
|
onMove: u,
|
|
6109
6108
|
locked: l = !1
|
|
6110
|
-
} = e, s =
|
|
6109
|
+
} = e, s = j.useRef(null), p = l ? [s, i] : hl(i, { group: r }), [d, h] = p, [g, f] = j.useState(
|
|
6111
6110
|
null
|
|
6112
|
-
), m =
|
|
6113
|
-
|
|
6111
|
+
), m = j.useRef(i);
|
|
6112
|
+
j.useEffect(() => {
|
|
6114
6113
|
if (l) return;
|
|
6115
|
-
const
|
|
6116
|
-
const k =
|
|
6114
|
+
const N = (D) => {
|
|
6115
|
+
const k = D.detail ?? null;
|
|
6117
6116
|
f(k);
|
|
6118
6117
|
};
|
|
6119
|
-
return window.addEventListener(
|
|
6118
|
+
return window.addEventListener(Lt, N), () => window.removeEventListener(Lt, N);
|
|
6120
6119
|
}, [l]);
|
|
6121
|
-
const v =
|
|
6120
|
+
const v = j.useCallback((N) => {
|
|
6122
6121
|
l || window.dispatchEvent(
|
|
6123
|
-
new CustomEvent(
|
|
6122
|
+
new CustomEvent(Lt, { detail: N })
|
|
6124
6123
|
);
|
|
6125
|
-
}, [l]), x = (
|
|
6124
|
+
}, [l]), x = (N) => {
|
|
6126
6125
|
var F;
|
|
6127
6126
|
if (l) return;
|
|
6128
|
-
const
|
|
6127
|
+
const D = N.target, k = (F = D == null ? void 0 : D.closest) == null ? void 0 : F.call(D, "li.dnd-item"), L = (k == null ? void 0 : k.getAttribute("data-label")) || null;
|
|
6129
6128
|
L && (f(L), v(L));
|
|
6130
|
-
}, w =
|
|
6129
|
+
}, w = j.useCallback(() => {
|
|
6131
6130
|
l || (f(null), v(null));
|
|
6132
6131
|
}, [v, l]);
|
|
6133
|
-
|
|
6132
|
+
j.useEffect(() => {
|
|
6134
6133
|
if (l) return;
|
|
6135
|
-
const
|
|
6136
|
-
return window.addEventListener("pointerup",
|
|
6137
|
-
window.removeEventListener("pointerup",
|
|
6134
|
+
const N = () => w();
|
|
6135
|
+
return window.addEventListener("pointerup", N), window.addEventListener("blur", N), () => {
|
|
6136
|
+
window.removeEventListener("pointerup", N), window.removeEventListener("blur", N);
|
|
6138
6137
|
};
|
|
6139
|
-
}, [w, l]),
|
|
6138
|
+
}, [w, l]), j.useEffect(() => {
|
|
6140
6139
|
if (l) return;
|
|
6141
|
-
const
|
|
6142
|
-
if (h.length !==
|
|
6143
|
-
const
|
|
6140
|
+
const N = m.current;
|
|
6141
|
+
if (h.length !== N.length && h.length === N.length + 1) {
|
|
6142
|
+
const D = new Set(N), k = h.find((L) => !D.has(L)) || null;
|
|
6144
6143
|
if (k) {
|
|
6145
6144
|
const L = n === "left" ? "right" : "left";
|
|
6146
6145
|
u == null || u({ item: k, from: L, to: n });
|
|
@@ -6148,7 +6147,7 @@ const In = {
|
|
|
6148
6147
|
}
|
|
6149
6148
|
m.current = h;
|
|
6150
6149
|
}, [h, n, u, l]);
|
|
6151
|
-
const
|
|
6150
|
+
const C = h.length === 0;
|
|
6152
6151
|
return /* @__PURE__ */ a(
|
|
6153
6152
|
Be,
|
|
6154
6153
|
{
|
|
@@ -6163,12 +6162,12 @@ const In = {
|
|
|
6163
6162
|
onPointerDownCapture: l ? void 0 : x,
|
|
6164
6163
|
onPointerUpCapture: l ? void 0 : w,
|
|
6165
6164
|
onPointerCancelCapture: l ? void 0 : w,
|
|
6166
|
-
$isEmpty:
|
|
6165
|
+
$isEmpty: C,
|
|
6167
6166
|
$locked: l,
|
|
6168
6167
|
"aria-disabled": l,
|
|
6169
6168
|
"data-locked": l || void 0,
|
|
6170
|
-
children:
|
|
6171
|
-
|
|
6169
|
+
children: C ? /* @__PURE__ */ a(
|
|
6170
|
+
ue,
|
|
6172
6171
|
{
|
|
6173
6172
|
background: !0,
|
|
6174
6173
|
borderRadius: "8px",
|
|
@@ -6177,16 +6176,16 @@ const In = {
|
|
|
6177
6176
|
justifyContent: "center",
|
|
6178
6177
|
children: /* @__PURE__ */ a(R, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: t || "No hay elementos en esta lista" })
|
|
6179
6178
|
}
|
|
6180
|
-
) : h.map((
|
|
6181
|
-
const k = !l && g ===
|
|
6179
|
+
) : h.map((N, D) => {
|
|
6180
|
+
const k = !l && g === N;
|
|
6182
6181
|
return /* @__PURE__ */ a(
|
|
6183
6182
|
fl,
|
|
6184
6183
|
{
|
|
6185
6184
|
className: `dnd-item${k ? " is-dragging" : ""}`,
|
|
6186
|
-
"data-label":
|
|
6187
|
-
"data-first": !!(c &&
|
|
6185
|
+
"data-label": N,
|
|
6186
|
+
"data-first": !!(c && D === 0) || void 0,
|
|
6188
6187
|
$active: k,
|
|
6189
|
-
children: /* @__PURE__ */ a(
|
|
6188
|
+
children: /* @__PURE__ */ a(ue, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ a(
|
|
6190
6189
|
R,
|
|
6191
6190
|
{
|
|
6192
6191
|
type: "title",
|
|
@@ -6194,11 +6193,11 @@ const In = {
|
|
|
6194
6193
|
weight: k ? "bold" : "normal",
|
|
6195
6194
|
size: "medium",
|
|
6196
6195
|
padding: "6px 12px",
|
|
6197
|
-
children:
|
|
6196
|
+
children: N
|
|
6198
6197
|
}
|
|
6199
6198
|
) })
|
|
6200
6199
|
},
|
|
6201
|
-
|
|
6200
|
+
N
|
|
6202
6201
|
);
|
|
6203
6202
|
})
|
|
6204
6203
|
}
|
|
@@ -6246,7 +6245,7 @@ const In = {
|
|
|
6246
6245
|
]
|
|
6247
6246
|
}
|
|
6248
6247
|
);
|
|
6249
|
-
}, ml =
|
|
6248
|
+
}, ml = E.div`
|
|
6250
6249
|
& > button {
|
|
6251
6250
|
height: 66px;
|
|
6252
6251
|
min-width: 66px;
|
|
@@ -6264,7 +6263,7 @@ const In = {
|
|
|
6264
6263
|
}
|
|
6265
6264
|
}
|
|
6266
6265
|
}
|
|
6267
|
-
`, Ds = (e) => /* @__PURE__ */ a(ml, { children: /* @__PURE__ */ a(Y, { ...e }) }), bl =
|
|
6266
|
+
`, Ds = (e) => /* @__PURE__ */ a(ml, { children: /* @__PURE__ */ a(Y, { ...e }) }), bl = E.div`
|
|
6268
6267
|
display: flex;
|
|
6269
6268
|
justify-content: space-between;
|
|
6270
6269
|
align-items: center;
|
|
@@ -6320,15 +6319,15 @@ const In = {
|
|
|
6320
6319
|
)
|
|
6321
6320
|
] });
|
|
6322
6321
|
}, Es = (e) => Object.values(e).flat(), ks = (e, t) => {
|
|
6323
|
-
const n =
|
|
6322
|
+
const n = Te(e);
|
|
6324
6323
|
return Object.fromEntries(
|
|
6325
6324
|
Object.entries(n).map(([r, o]) => [r, o.map(t)])
|
|
6326
6325
|
);
|
|
6327
6326
|
}, vl = (e) => Object.entries(e).map(([t, n]) => ({
|
|
6328
6327
|
ConditionGroupId: t,
|
|
6329
|
-
conditionsThatEstablishesTheDecision:
|
|
6328
|
+
conditionsThatEstablishesTheDecision: ht(n)
|
|
6330
6329
|
})), As = (e) => {
|
|
6331
|
-
const t =
|
|
6330
|
+
const t = Te(e);
|
|
6332
6331
|
return {
|
|
6333
6332
|
...e,
|
|
6334
6333
|
conditionGroups: vl(t),
|
|
@@ -6405,13 +6404,13 @@ const In = {
|
|
|
6405
6404
|
function Nl(e) {
|
|
6406
6405
|
return typeof e == "function";
|
|
6407
6406
|
}
|
|
6408
|
-
function
|
|
6407
|
+
function on(e, t) {
|
|
6409
6408
|
return Nl(e) ? e(t) : e.split(".").reduce((n, r) => n ? n[r] : void 0, t);
|
|
6410
6409
|
}
|
|
6411
6410
|
const El = {
|
|
6412
6411
|
1: "1fr",
|
|
6413
6412
|
2: "1fr 1fr"
|
|
6414
|
-
}, kl = (e, t) => t ? "1fr" : El[e.length] || `repeat(${Math.ceil(e.length / 2)}, 1fr)`, Al = (e, t) => !t && e.length <= 2 ? "1fr" : t ? `repeat(${Math.ceil(e.length)}, 1fr)` : `repeat(${Math.ceil(e.length / 2)}, 1fr)`, $l =
|
|
6413
|
+
}, kl = (e, t) => t ? "1fr" : El[e.length] || `repeat(${Math.ceil(e.length / 2)}, 1fr)`, Al = (e, t) => !t && e.length <= 2 ? "1fr" : t ? `repeat(${Math.ceil(e.length)}, 1fr)` : `repeat(${Math.ceil(e.length / 2)}, 1fr)`, $l = E.div`
|
|
6415
6414
|
display: flex;
|
|
6416
6415
|
align-items: center;
|
|
6417
6416
|
padding: 0px 4px 0px 2px;
|
|
@@ -6423,7 +6422,7 @@ const El = {
|
|
|
6423
6422
|
}};
|
|
6424
6423
|
cursor: pointer;
|
|
6425
6424
|
`;
|
|
6426
|
-
var
|
|
6425
|
+
var pe = /* @__PURE__ */ ((e) => (e.DANGER = "danger", e.DARK = "dark", e.GRAY = "gray", e.HELP = "help", e.LIGHT = "light", e.PRIMARY = "primary", e.SUCCESS = "success", e.WARNING = "warning", e))(pe || {});
|
|
6427
6426
|
const Il = (e) => {
|
|
6428
6427
|
const { onClick: t, icon: n, value: r } = e;
|
|
6429
6428
|
return /* @__PURE__ */ b($l, { onClick: t, children: [
|
|
@@ -6433,7 +6432,7 @@ const Il = (e) => {
|
|
|
6433
6432
|
justifyContent: "center",
|
|
6434
6433
|
alignItems: "center",
|
|
6435
6434
|
padding: "2px",
|
|
6436
|
-
children: /* @__PURE__ */ a(B, { icon: n, appearance:
|
|
6435
|
+
children: /* @__PURE__ */ a(B, { icon: n, appearance: pe.DARK })
|
|
6437
6436
|
}
|
|
6438
6437
|
),
|
|
6439
6438
|
/* @__PURE__ */ a(R, { size: "small", as: "span", children: r })
|
|
@@ -6454,11 +6453,11 @@ function Rl(e) {
|
|
|
6454
6453
|
);
|
|
6455
6454
|
}
|
|
6456
6455
|
function Ol(e) {
|
|
6457
|
-
return
|
|
6456
|
+
return j.isValidElement(e);
|
|
6458
6457
|
}
|
|
6459
6458
|
const Fl = (e) => {
|
|
6460
6459
|
const { withTag: t, children: n, isMobile: r, direction: o, value: i } = e, c = r ? "small" : "medium", u = o === "column" ? "start" : "end";
|
|
6461
|
-
if (t) return /* @__PURE__ */ a(
|
|
6460
|
+
if (t) return /* @__PURE__ */ a(_, { children: n });
|
|
6462
6461
|
let l;
|
|
6463
6462
|
if (Ol(i))
|
|
6464
6463
|
l = i;
|
|
@@ -6476,13 +6475,13 @@ const Fl = (e) => {
|
|
|
6476
6475
|
R,
|
|
6477
6476
|
{
|
|
6478
6477
|
size: c,
|
|
6479
|
-
appearance:
|
|
6478
|
+
appearance: pe.GRAY,
|
|
6480
6479
|
textAlign: u,
|
|
6481
6480
|
as: "span",
|
|
6482
6481
|
children: l
|
|
6483
6482
|
}
|
|
6484
6483
|
);
|
|
6485
|
-
},
|
|
6484
|
+
}, Mt = {
|
|
6486
6485
|
light: {
|
|
6487
6486
|
border: {
|
|
6488
6487
|
color: A.palette.neutral.N0
|
|
@@ -6549,7 +6548,7 @@ const Fl = (e) => {
|
|
|
6549
6548
|
color: A.palette.red.R50
|
|
6550
6549
|
}
|
|
6551
6550
|
}
|
|
6552
|
-
}, Ll =
|
|
6551
|
+
}, Ll = E.div`
|
|
6553
6552
|
display: flex;
|
|
6554
6553
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
6555
6554
|
align-items: ${({ $alignItems: e }) => e};
|
|
@@ -6564,24 +6563,24 @@ const Fl = (e) => {
|
|
|
6564
6563
|
box-sizing: ${({ $boxSizing: e }) => e};
|
|
6565
6564
|
background: ${({ $backgroundColor: e, theme: t }) => {
|
|
6566
6565
|
var n, r;
|
|
6567
|
-
return ((r = (n = t == null ? void 0 : t.boxContainer) == null ? void 0 : n[e].background) == null ? void 0 : r.color) ??
|
|
6566
|
+
return ((r = (n = t == null ? void 0 : t.boxContainer) == null ? void 0 : n[e].background) == null ? void 0 : r.color) ?? Mt[e].background.color;
|
|
6568
6567
|
}};
|
|
6569
6568
|
border: ${({ $borderColor: e, theme: t }) => {
|
|
6570
6569
|
var n, r;
|
|
6571
|
-
return `1px solid ${((r = (n = t == null ? void 0 : t.boxContainer) == null ? void 0 : n[e].border) == null ? void 0 : r.color) ??
|
|
6570
|
+
return `1px solid ${((r = (n = t == null ? void 0 : t.boxContainer) == null ? void 0 : n[e].border) == null ? void 0 : r.color) ?? Mt[e].border.color}`;
|
|
6572
6571
|
}};
|
|
6573
6572
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
6574
6573
|
overflow-y: ${({ $overflowY: e }) => e};
|
|
6575
6574
|
overflow-x: ${({ $overflowX: e }) => e};
|
|
6576
6575
|
box-shadow: ${({ theme: e, $boxShadow: t }) => {
|
|
6577
6576
|
var n, r;
|
|
6578
|
-
return t && `1px 1px 4px 2px ${((r = (n = e == null ? void 0 : e.boxContainer) == null ? void 0 : n[t].border) == null ? void 0 : r.color) ??
|
|
6577
|
+
return t && `1px 1px 4px 2px ${((r = (n = e == null ? void 0 : e.boxContainer) == null ? void 0 : n[t].border) == null ? void 0 : r.color) ?? Mt[t].border.color}`;
|
|
6579
6578
|
}};
|
|
6580
6579
|
min-height: ${({ $minHeight: e }) => e};
|
|
6581
6580
|
max-height: ${({ $maxHeight: e }) => e};
|
|
6582
6581
|
max-width: ${({ $maxWidth: e }) => e};
|
|
6583
6582
|
min-width: ${({ $minWidth: e }) => e};
|
|
6584
|
-
`,
|
|
6583
|
+
`, an = (e) => {
|
|
6585
6584
|
const {
|
|
6586
6585
|
children: t,
|
|
6587
6586
|
wrap: n,
|
|
@@ -6595,15 +6594,15 @@ const Fl = (e) => {
|
|
|
6595
6594
|
gap: p,
|
|
6596
6595
|
margin: d = "0px",
|
|
6597
6596
|
padding: h = "0px",
|
|
6598
|
-
backgroundColor: g =
|
|
6597
|
+
backgroundColor: g = pe.LIGHT,
|
|
6599
6598
|
boxSizing: f,
|
|
6600
|
-
borderColor: m =
|
|
6599
|
+
borderColor: m = pe.LIGHT,
|
|
6601
6600
|
overflowY: v,
|
|
6602
6601
|
overflowX: x,
|
|
6603
6602
|
boxShadow: w,
|
|
6604
|
-
minHeight:
|
|
6605
|
-
maxHeight:
|
|
6606
|
-
maxWidth:
|
|
6603
|
+
minHeight: C,
|
|
6604
|
+
maxHeight: N,
|
|
6605
|
+
maxWidth: D,
|
|
6607
6606
|
minWidth: k
|
|
6608
6607
|
} = e;
|
|
6609
6608
|
return /* @__PURE__ */ a(
|
|
@@ -6626,14 +6625,14 @@ const Fl = (e) => {
|
|
|
6626
6625
|
$overflowY: v,
|
|
6627
6626
|
$overflowX: x,
|
|
6628
6627
|
$boxShadow: w,
|
|
6629
|
-
$minHeight:
|
|
6630
|
-
$maxHeight:
|
|
6631
|
-
$maxWidth:
|
|
6628
|
+
$minHeight: C,
|
|
6629
|
+
$maxHeight: N,
|
|
6630
|
+
$maxWidth: D,
|
|
6632
6631
|
$minWidth: k,
|
|
6633
6632
|
children: t
|
|
6634
6633
|
}
|
|
6635
6634
|
);
|
|
6636
|
-
},
|
|
6635
|
+
}, ln = (e) => {
|
|
6637
6636
|
const {
|
|
6638
6637
|
label: t,
|
|
6639
6638
|
value: n,
|
|
@@ -6644,17 +6643,17 @@ const Fl = (e) => {
|
|
|
6644
6643
|
onClickButton: u,
|
|
6645
6644
|
withTag: l,
|
|
6646
6645
|
children: s
|
|
6647
|
-
} = e, p =
|
|
6646
|
+
} = e, p = ie("(max-width: 1281px)");
|
|
6648
6647
|
return /* @__PURE__ */ a(
|
|
6649
|
-
|
|
6648
|
+
an,
|
|
6650
6649
|
{
|
|
6651
6650
|
alignItems: "center",
|
|
6652
6651
|
borderRadius: "8px",
|
|
6653
6652
|
padding: p ? "8px" : "6px 16px",
|
|
6654
6653
|
boxSizing: "border-box",
|
|
6655
|
-
backgroundColor:
|
|
6654
|
+
backgroundColor: pe.GRAY,
|
|
6656
6655
|
children: /* @__PURE__ */ b(
|
|
6657
|
-
|
|
6656
|
+
we,
|
|
6658
6657
|
{
|
|
6659
6658
|
templateColumns: c === "column" ? "1fr" : "auto 1fr",
|
|
6660
6659
|
templateRows: "auto auto",
|
|
@@ -6669,7 +6668,7 @@ const Fl = (e) => {
|
|
|
6669
6668
|
{
|
|
6670
6669
|
type: "label",
|
|
6671
6670
|
size: p ? "small" : "medium",
|
|
6672
|
-
appearance:
|
|
6671
|
+
appearance: pe.DARK,
|
|
6673
6672
|
weight: "bold",
|
|
6674
6673
|
as: "span",
|
|
6675
6674
|
children: t
|
|
@@ -6687,7 +6686,7 @@ const Fl = (e) => {
|
|
|
6687
6686
|
value: i,
|
|
6688
6687
|
onClick: u
|
|
6689
6688
|
}
|
|
6690
|
-
) : /* @__PURE__ */ a(
|
|
6689
|
+
) : /* @__PURE__ */ a(_, { children: /* @__PURE__ */ a(
|
|
6691
6690
|
Fl,
|
|
6692
6691
|
{
|
|
6693
6692
|
withTag: l ?? !1,
|
|
@@ -6709,10 +6708,10 @@ function Ml(e) {
|
|
|
6709
6708
|
return e === "" || e === null || e === void 0 ? !0 : Array.isArray(e) ? e.length === 0 : !1;
|
|
6710
6709
|
}
|
|
6711
6710
|
function jl(e) {
|
|
6712
|
-
const { ctx: t, node: n } = e, r = n.layout ?? {}, o =
|
|
6711
|
+
const { ctx: t, node: n } = e, r = n.layout ?? {}, o = on(n.entries, t.data);
|
|
6713
6712
|
if (!o || o.length === 0) return null;
|
|
6714
6713
|
const i = /* @__PURE__ */ a(
|
|
6715
|
-
|
|
6714
|
+
we,
|
|
6716
6715
|
{
|
|
6717
6716
|
width: "100%",
|
|
6718
6717
|
height: "auto",
|
|
@@ -6723,7 +6722,7 @@ function jl(e) {
|
|
|
6723
6722
|
children: o.map((c) => {
|
|
6724
6723
|
const u = n.valueOf(c);
|
|
6725
6724
|
return Ml(u) ? null : /* @__PURE__ */ a(
|
|
6726
|
-
|
|
6725
|
+
ln,
|
|
6727
6726
|
{
|
|
6728
6727
|
direction: "column",
|
|
6729
6728
|
label: n.labelOf(c),
|
|
@@ -6736,12 +6735,12 @@ function jl(e) {
|
|
|
6736
6735
|
n.id
|
|
6737
6736
|
);
|
|
6738
6737
|
return r.variant === "lightCard" ? /* @__PURE__ */ a(
|
|
6739
|
-
|
|
6738
|
+
an,
|
|
6740
6739
|
{
|
|
6741
6740
|
direction: "column",
|
|
6742
6741
|
borderRadius: "8px",
|
|
6743
6742
|
width: "100%",
|
|
6744
|
-
backgroundColor:
|
|
6743
|
+
backgroundColor: pe.LIGHT,
|
|
6745
6744
|
boxSizing: "initial",
|
|
6746
6745
|
children: i
|
|
6747
6746
|
}
|
|
@@ -6755,7 +6754,7 @@ function Vl(e) {
|
|
|
6755
6754
|
const n = (e.split(".").pop() ?? e).replace(/([A-Z])/g, " $1").trim();
|
|
6756
6755
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
6757
6756
|
}
|
|
6758
|
-
function
|
|
6757
|
+
function fe(e) {
|
|
6759
6758
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
6760
6759
|
}
|
|
6761
6760
|
function Pl(e) {
|
|
@@ -6802,7 +6801,7 @@ function Gl(e, t) {
|
|
|
6802
6801
|
c(p, h);
|
|
6803
6802
|
return;
|
|
6804
6803
|
}
|
|
6805
|
-
if (
|
|
6804
|
+
if (fe(s)) {
|
|
6806
6805
|
if (i.has(s)) {
|
|
6807
6806
|
c(p, "[Circular]");
|
|
6808
6807
|
return;
|
|
@@ -6814,10 +6813,10 @@ function Gl(e, t) {
|
|
|
6814
6813
|
return;
|
|
6815
6814
|
}
|
|
6816
6815
|
for (const [g, f] of h) {
|
|
6817
|
-
if (!
|
|
6816
|
+
if (!fe(f) && !Array.isArray(f) && u(f))
|
|
6818
6817
|
continue;
|
|
6819
6818
|
const m = n.has(g) ? p : Ul(p, g);
|
|
6820
|
-
|
|
6819
|
+
fe(f) || Array.isArray(f) ? l(f, m, d + 1) : c(m || g, f);
|
|
6821
6820
|
}
|
|
6822
6821
|
return;
|
|
6823
6822
|
}
|
|
@@ -6844,27 +6843,27 @@ function Ln(e, t = 2) {
|
|
|
6844
6843
|
return String(e);
|
|
6845
6844
|
}
|
|
6846
6845
|
}
|
|
6847
|
-
function
|
|
6846
|
+
function ce(e) {
|
|
6848
6847
|
return e == null ? "" : Array.isArray(e) ? e.map((t) => t == null ? "" : typeof t == "string" ? t : typeof t == "number" || typeof t == "boolean" ? String(t) : Ln(t, 0)).filter((t) => !!String(t).trim()).join(", ") : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : Ln(e, 2);
|
|
6849
6848
|
}
|
|
6850
|
-
function
|
|
6849
|
+
function Yt(e) {
|
|
6851
6850
|
const { value: t, isMobile: n } = e, r = Gl(t, {
|
|
6852
6851
|
skipKeys: ["values"],
|
|
6853
6852
|
maxDepth: 4
|
|
6854
6853
|
}), o = n || r.length === 1 ? "1fr" : "repeat(2, 1fr)";
|
|
6855
|
-
return /* @__PURE__ */ a(
|
|
6856
|
-
|
|
6854
|
+
return /* @__PURE__ */ a(we, { width: "100%", templateColumns: o, gap: "8px", autoRows: "unset", children: r.map((i) => /* @__PURE__ */ a(
|
|
6855
|
+
ln,
|
|
6857
6856
|
{
|
|
6858
6857
|
direction: "column",
|
|
6859
6858
|
label: i.label,
|
|
6860
|
-
value:
|
|
6859
|
+
value: ce(i.value)
|
|
6861
6860
|
},
|
|
6862
6861
|
i.id
|
|
6863
6862
|
)) });
|
|
6864
6863
|
}
|
|
6865
6864
|
function zl(e) {
|
|
6866
|
-
const { ctx: t, node: n } = e, r =
|
|
6867
|
-
return /* @__PURE__ */ a(
|
|
6865
|
+
const { ctx: t, node: n } = e, r = on(n.value, t.data);
|
|
6866
|
+
return /* @__PURE__ */ a(Yt, { value: r });
|
|
6868
6867
|
}
|
|
6869
6868
|
function Hl(e) {
|
|
6870
6869
|
return e === "" || e === null || e === void 0 ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1;
|
|
@@ -6872,7 +6871,7 @@ function Hl(e) {
|
|
|
6872
6871
|
function Bl(e) {
|
|
6873
6872
|
var l, s;
|
|
6874
6873
|
const { ctx: t, node: n } = e, r = n.layout ?? {}, o = n.items.map((p) => {
|
|
6875
|
-
const d =
|
|
6874
|
+
const d = on(p.value, t.data);
|
|
6876
6875
|
if (Hl(d))
|
|
6877
6876
|
return null;
|
|
6878
6877
|
const h = p.render ? p.render(d, t) : String(d ?? ""), g = !!p.withTag;
|
|
@@ -6884,8 +6883,8 @@ function Bl(e) {
|
|
|
6884
6883
|
}).filter(Boolean);
|
|
6885
6884
|
if (o.length === 0)
|
|
6886
6885
|
return null;
|
|
6887
|
-
const c = o.length === 1 ? "1fr" : t.isMobile ? ((l = r.columns) == null ? void 0 : l.mobile) ?? "1fr" : ((s = r.columns) == null ? void 0 : s.desktop) ?? "repeat(2, 1fr)", u = /* @__PURE__ */ a(
|
|
6888
|
-
|
|
6886
|
+
const c = o.length === 1 ? "1fr" : t.isMobile ? ((l = r.columns) == null ? void 0 : l.mobile) ?? "1fr" : ((s = r.columns) == null ? void 0 : s.desktop) ?? "repeat(2, 1fr)", u = /* @__PURE__ */ a(we, { width: "100%", templateColumns: c, gap: "8px 16px", autoRows: "unset", children: o.map(({ item: p, valueNode: d, shouldUseChildren: h }) => /* @__PURE__ */ a(
|
|
6887
|
+
ln,
|
|
6889
6888
|
{
|
|
6890
6889
|
direction: "column",
|
|
6891
6890
|
label: p.label,
|
|
@@ -6896,12 +6895,12 @@ function Bl(e) {
|
|
|
6896
6895
|
p.id
|
|
6897
6896
|
)) });
|
|
6898
6897
|
return r.variant === "lightCard" ? /* @__PURE__ */ a(
|
|
6899
|
-
|
|
6898
|
+
an,
|
|
6900
6899
|
{
|
|
6901
6900
|
direction: "column",
|
|
6902
6901
|
borderRadius: "8px",
|
|
6903
6902
|
width: "100%",
|
|
6904
|
-
backgroundColor:
|
|
6903
|
+
backgroundColor: pe.LIGHT,
|
|
6905
6904
|
boxSizing: "initial",
|
|
6906
6905
|
children: u
|
|
6907
6906
|
}
|
|
@@ -6921,11 +6920,11 @@ function Wl(e, t) {
|
|
|
6921
6920
|
function Mn(e, t, n) {
|
|
6922
6921
|
if (!Wl(e, t.data)) return null;
|
|
6923
6922
|
if (!n)
|
|
6924
|
-
return /* @__PURE__ */ a(
|
|
6923
|
+
return /* @__PURE__ */ a(Yt, { value: e }, e.id);
|
|
6925
6924
|
const r = n[e.type];
|
|
6926
|
-
return r ? /* @__PURE__ */ a(
|
|
6925
|
+
return r ? /* @__PURE__ */ a(j.Fragment, { children: r(e, t) }, e.id) : /* @__PURE__ */ a(Yt, { value: e }, e.id);
|
|
6927
6926
|
}
|
|
6928
|
-
const Yl =
|
|
6927
|
+
const Yl = E.div`
|
|
6929
6928
|
display: flex;
|
|
6930
6929
|
padding: 12px 8px;
|
|
6931
6930
|
flex-direction: column;
|
|
@@ -6940,7 +6939,7 @@ const Yl = N.div`
|
|
|
6940
6939
|
var t, n;
|
|
6941
6940
|
return ((n = (t = e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N40) ?? A.palette.neutral.N40;
|
|
6942
6941
|
}};
|
|
6943
|
-
`, Xl =
|
|
6942
|
+
`, Xl = E.div`
|
|
6944
6943
|
display: flex;
|
|
6945
6944
|
justify-content: space-between;
|
|
6946
6945
|
align-items: center;
|
|
@@ -6957,7 +6956,7 @@ const Yl = N.div`
|
|
|
6957
6956
|
{
|
|
6958
6957
|
type: "label",
|
|
6959
6958
|
size: "large",
|
|
6960
|
-
appearance:
|
|
6959
|
+
appearance: pe.DARK,
|
|
6961
6960
|
weight: "bold",
|
|
6962
6961
|
ellipsis: !0,
|
|
6963
6962
|
children: t
|
|
@@ -6967,33 +6966,33 @@ const Yl = N.div`
|
|
|
6967
6966
|
B,
|
|
6968
6967
|
{
|
|
6969
6968
|
icon: o ? /* @__PURE__ */ a(br, {}) : /* @__PURE__ */ a(vr, {}),
|
|
6970
|
-
appearance:
|
|
6969
|
+
appearance: pe.DARK,
|
|
6971
6970
|
spacing: "compact",
|
|
6972
6971
|
cursorHover: !0,
|
|
6973
6972
|
size: "24px"
|
|
6974
6973
|
}
|
|
6975
6974
|
)
|
|
6976
6975
|
] }),
|
|
6977
|
-
o && /* @__PURE__ */ b(
|
|
6976
|
+
o && /* @__PURE__ */ b(_, { children: [
|
|
6978
6977
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
6979
6978
|
r
|
|
6980
6979
|
] })
|
|
6981
6980
|
] });
|
|
6982
6981
|
};
|
|
6983
|
-
function
|
|
6982
|
+
function ne(e) {
|
|
6984
6983
|
const t = e.replace(/([A-Z])/g, " $1").trim();
|
|
6985
6984
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
6986
6985
|
}
|
|
6987
6986
|
function jn(e, t) {
|
|
6988
6987
|
return Object.keys(t).map((r) => ({
|
|
6989
6988
|
id: `${e}.${r}`,
|
|
6990
|
-
label:
|
|
6989
|
+
label: ne(r),
|
|
6991
6990
|
value: `${e}.${r}`,
|
|
6992
|
-
render: (o) =>
|
|
6991
|
+
render: (o) => ce(o)
|
|
6993
6992
|
}));
|
|
6994
6993
|
}
|
|
6995
6994
|
function Jl(e) {
|
|
6996
|
-
if (!
|
|
6995
|
+
if (!fe(e) && !Array.isArray(e))
|
|
6997
6996
|
return {
|
|
6998
6997
|
steps: [
|
|
6999
6998
|
{
|
|
@@ -7012,7 +7011,7 @@ function Jl(e) {
|
|
|
7012
7011
|
id: "value",
|
|
7013
7012
|
label: "Valor",
|
|
7014
7013
|
value: () => e,
|
|
7015
|
-
render: (o) =>
|
|
7014
|
+
render: (o) => ce(o)
|
|
7016
7015
|
}
|
|
7017
7016
|
]
|
|
7018
7017
|
},
|
|
@@ -7039,7 +7038,7 @@ function Jl(e) {
|
|
|
7039
7038
|
entries: () => e,
|
|
7040
7039
|
keyOf: (o, i) => String(i ?? Math.random()),
|
|
7041
7040
|
labelOf: (o, i) => `Item ${i ?? ""}`,
|
|
7042
|
-
valueOf: (o) =>
|
|
7041
|
+
valueOf: (o) => ce(o)
|
|
7043
7042
|
},
|
|
7044
7043
|
{
|
|
7045
7044
|
id: "json-fallback",
|
|
@@ -7053,10 +7052,10 @@ function Jl(e) {
|
|
|
7053
7052
|
const t = e;
|
|
7054
7053
|
return { steps: Object.keys(t).map((o, i) => {
|
|
7055
7054
|
const c = String(i + 1), u = t[o];
|
|
7056
|
-
if (!
|
|
7055
|
+
if (!fe(u) && !Array.isArray(u))
|
|
7057
7056
|
return {
|
|
7058
7057
|
id: c,
|
|
7059
|
-
name:
|
|
7058
|
+
name: ne(o),
|
|
7060
7059
|
nodes: [
|
|
7061
7060
|
{
|
|
7062
7061
|
id: `${o}-primitive`,
|
|
@@ -7068,18 +7067,18 @@ function Jl(e) {
|
|
|
7068
7067
|
items: [
|
|
7069
7068
|
{
|
|
7070
7069
|
id: `${o}.value`,
|
|
7071
|
-
label:
|
|
7070
|
+
label: ne(o),
|
|
7072
7071
|
value: (l) => l == null ? void 0 : l[o],
|
|
7073
|
-
render: (l) =>
|
|
7072
|
+
render: (l) => ce(l)
|
|
7074
7073
|
}
|
|
7075
7074
|
]
|
|
7076
7075
|
}
|
|
7077
7076
|
]
|
|
7078
7077
|
};
|
|
7079
7078
|
if (Array.isArray(u))
|
|
7080
|
-
return u.some((s) =>
|
|
7079
|
+
return u.some((s) => fe(s)) ? {
|
|
7081
7080
|
id: c,
|
|
7082
|
-
name:
|
|
7081
|
+
name: ne(o),
|
|
7083
7082
|
nodes: u.map((s, p) => {
|
|
7084
7083
|
const h = Object.keys(s);
|
|
7085
7084
|
return {
|
|
@@ -7091,18 +7090,18 @@ function Jl(e) {
|
|
|
7091
7090
|
},
|
|
7092
7091
|
items: h.map((g) => ({
|
|
7093
7092
|
id: `${o}[${p}].${g}`,
|
|
7094
|
-
label:
|
|
7093
|
+
label: ne(g),
|
|
7095
7094
|
value: (f) => {
|
|
7096
7095
|
var m, v;
|
|
7097
7096
|
return (v = (m = f == null ? void 0 : f[o]) == null ? void 0 : m[p]) == null ? void 0 : v[g];
|
|
7098
7097
|
},
|
|
7099
|
-
render: (f) =>
|
|
7098
|
+
render: (f) => ce(f)
|
|
7100
7099
|
}))
|
|
7101
7100
|
};
|
|
7102
7101
|
})
|
|
7103
7102
|
} : {
|
|
7104
7103
|
id: c,
|
|
7105
|
-
name:
|
|
7104
|
+
name: ne(o),
|
|
7106
7105
|
nodes: [
|
|
7107
7106
|
{
|
|
7108
7107
|
id: `${o}-entries`,
|
|
@@ -7112,15 +7111,15 @@ function Jl(e) {
|
|
|
7112
7111
|
entries: (s) => s == null ? void 0 : s[o],
|
|
7113
7112
|
keyOf: (s, p) => (s == null ? void 0 : s.id) ?? (s == null ? void 0 : s.businessRuleId) ?? String(p ?? Math.random()),
|
|
7114
7113
|
labelOf: (s, p) => (s == null ? void 0 : s.decisionId) ?? (s == null ? void 0 : s.label) ?? `Item ${p ?? ""}`,
|
|
7115
|
-
valueOf: (s) =>
|
|
7114
|
+
valueOf: (s) => ce((s == null ? void 0 : s.value) ?? s)
|
|
7116
7115
|
}
|
|
7117
7116
|
]
|
|
7118
7117
|
};
|
|
7119
|
-
if (
|
|
7118
|
+
if (fe(u) && "values" in u) {
|
|
7120
7119
|
const l = u.values;
|
|
7121
|
-
return Array.isArray(l) ? l.length > 0 && l.every((d) =>
|
|
7120
|
+
return Array.isArray(l) ? l.length > 0 && l.every((d) => fe(d) && "labelName" in d && "value" in d) ? {
|
|
7122
7121
|
id: c,
|
|
7123
|
-
name:
|
|
7122
|
+
name: ne(o),
|
|
7124
7123
|
nodes: [
|
|
7125
7124
|
{
|
|
7126
7125
|
id: `${o}-values`,
|
|
@@ -7133,12 +7132,12 @@ function Jl(e) {
|
|
|
7133
7132
|
entries: `${o}.values`,
|
|
7134
7133
|
keyOf: (d, h) => (d == null ? void 0 : d.businessRuleId) ?? (d == null ? void 0 : d.id) ?? String(h ?? Math.random()),
|
|
7135
7134
|
labelOf: (d) => (d == null ? void 0 : d.decisionId) ?? (d == null ? void 0 : d.labelName) ?? "",
|
|
7136
|
-
valueOf: (d) => "labelName" in (d ?? {}) && "value" in (d ?? {}) ? `${String(d.labelName)}: ${
|
|
7135
|
+
valueOf: (d) => "labelName" in (d ?? {}) && "value" in (d ?? {}) ? `${String(d.labelName)}: ${ce(d.value)}` : ce(d)
|
|
7137
7136
|
}
|
|
7138
7137
|
]
|
|
7139
|
-
} : l.some((d) =>
|
|
7138
|
+
} : l.some((d) => fe(d)) ? {
|
|
7140
7139
|
id: c,
|
|
7141
|
-
name:
|
|
7140
|
+
name: ne(o),
|
|
7142
7141
|
nodes: l.map((d, h) => {
|
|
7143
7142
|
const f = Object.keys(d);
|
|
7144
7143
|
return {
|
|
@@ -7150,18 +7149,18 @@ function Jl(e) {
|
|
|
7150
7149
|
},
|
|
7151
7150
|
items: f.map((m) => ({
|
|
7152
7151
|
id: `${o}.values[${h}].${m}`,
|
|
7153
|
-
label:
|
|
7152
|
+
label: ne(m),
|
|
7154
7153
|
value: (v) => {
|
|
7155
|
-
var x, w,
|
|
7156
|
-
return (
|
|
7154
|
+
var x, w, C;
|
|
7155
|
+
return (C = (w = (x = v == null ? void 0 : v[o]) == null ? void 0 : x.values) == null ? void 0 : w[h]) == null ? void 0 : C[m];
|
|
7157
7156
|
},
|
|
7158
|
-
render: (v) =>
|
|
7157
|
+
render: (v) => ce(v)
|
|
7159
7158
|
}))
|
|
7160
7159
|
};
|
|
7161
7160
|
})
|
|
7162
7161
|
} : {
|
|
7163
7162
|
id: c,
|
|
7164
|
-
name:
|
|
7163
|
+
name: ne(o),
|
|
7165
7164
|
nodes: [
|
|
7166
7165
|
{
|
|
7167
7166
|
id: `${o}-values`,
|
|
@@ -7174,12 +7173,12 @@ function Jl(e) {
|
|
|
7174
7173
|
entries: `${o}.values`,
|
|
7175
7174
|
keyOf: (d, h) => String(h ?? Math.random()),
|
|
7176
7175
|
labelOf: (d, h) => `Item ${h ?? ""}`,
|
|
7177
|
-
valueOf: (d) =>
|
|
7176
|
+
valueOf: (d) => ce(d)
|
|
7178
7177
|
}
|
|
7179
7178
|
]
|
|
7180
|
-
} :
|
|
7179
|
+
} : fe(l) ? {
|
|
7181
7180
|
id: c,
|
|
7182
|
-
name:
|
|
7181
|
+
name: ne(o),
|
|
7183
7182
|
nodes: [
|
|
7184
7183
|
{
|
|
7185
7184
|
id: `${o}-values`,
|
|
@@ -7200,7 +7199,7 @@ function Jl(e) {
|
|
|
7200
7199
|
]
|
|
7201
7200
|
} : {
|
|
7202
7201
|
id: c,
|
|
7203
|
-
name:
|
|
7202
|
+
name: ne(o),
|
|
7204
7203
|
nodes: [
|
|
7205
7204
|
{
|
|
7206
7205
|
id: `${o}-values`,
|
|
@@ -7218,7 +7217,7 @@ function Jl(e) {
|
|
|
7218
7217
|
id: `${o}.values`,
|
|
7219
7218
|
label: "values",
|
|
7220
7219
|
value: `${o}.values`,
|
|
7221
|
-
render: (s) =>
|
|
7220
|
+
render: (s) => ce(s)
|
|
7222
7221
|
}
|
|
7223
7222
|
]
|
|
7224
7223
|
}
|
|
@@ -7227,7 +7226,7 @@ function Jl(e) {
|
|
|
7227
7226
|
}
|
|
7228
7227
|
return {
|
|
7229
7228
|
id: c,
|
|
7230
|
-
name:
|
|
7229
|
+
name: ne(o),
|
|
7231
7230
|
nodes: [
|
|
7232
7231
|
{
|
|
7233
7232
|
id: `${o}-object`,
|
|
@@ -7268,7 +7267,7 @@ function $s(e) {
|
|
|
7268
7267
|
{
|
|
7269
7268
|
iconBefore: /* @__PURE__ */ a(yr, {}),
|
|
7270
7269
|
onClick: () => p.onBack ? p.onBack({ stepId: p.id }) : o == null ? void 0 : o(Number(p.id)),
|
|
7271
|
-
appearance:
|
|
7270
|
+
appearance: pe.DARK,
|
|
7272
7271
|
variant: "none",
|
|
7273
7272
|
children: "Regresar a este paso"
|
|
7274
7273
|
}
|
|
@@ -7281,7 +7280,7 @@ export {
|
|
|
7281
7280
|
Ns as BackAndNextButton,
|
|
7282
7281
|
et as BusinessRuleCard,
|
|
7283
7282
|
Hn as BusinessRuleCardNew,
|
|
7284
|
-
|
|
7283
|
+
tn as BusinessRuleView,
|
|
7285
7284
|
qn as BusinessRuleViewNew,
|
|
7286
7285
|
ps as BusinessRules,
|
|
7287
7286
|
gs as BusinessRulesNew,
|
|
@@ -7290,7 +7289,7 @@ export {
|
|
|
7290
7289
|
Rn as DraggableList,
|
|
7291
7290
|
ca as DropdownMenu,
|
|
7292
7291
|
Ss as DropdownMenuContainer,
|
|
7293
|
-
|
|
7292
|
+
re as EValueHowToSetUp,
|
|
7294
7293
|
fs as Filter,
|
|
7295
7294
|
ms as FormFilter,
|
|
7296
7295
|
Gn as ModalRules,
|
|
@@ -7302,7 +7301,7 @@ export {
|
|
|
7302
7301
|
Bn as filterByGroup,
|
|
7303
7302
|
Es as flatFromGroups,
|
|
7304
7303
|
bs as formatDecisionForBackend,
|
|
7305
|
-
|
|
7304
|
+
Te as getConditionsByGroupNew,
|
|
7306
7305
|
vl as groupsRecordToArrayNew,
|
|
7307
7306
|
ks as mapByGroupNew,
|
|
7308
7307
|
As as normalizeDecisionToNewShape,
|