@isettingkit/business-rules 2.2.18 → 2.2.20
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 +1003 -997
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { MdOutlineDelete as yt, MdClear as Qt, MdAdd as Ke, MdOutlineCreate as lr, MdExpandLess as sr, MdExpandMore as _t, MdInfo as dr, MdCached as cr, MdOutlineInfo as ur, MdClose as pr, MdOutlineFilterAltOff as
|
|
3
|
-
import { inube as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as a, jsxs as b, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { MdOutlineDelete as yt, MdClear as Qt, MdAdd as Ke, MdOutlineCreate as lr, MdExpandLess as sr, MdExpandMore as _t, 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 ie, useMediaQuery as ae, Blanket as Jt, Button as Y, Grid as Se, Toggle as Tt, Checkbox as Zt, 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 N, { keyframes as Kt, ThemeContext as Cr } from "styled-components";
|
|
5
5
|
import { ValueDataType as H, ValueHowToSetUp as P, DecisionConditionRender as ft, DecisionConditionRenderNew as pn } from "@isettingkit/input";
|
|
6
6
|
import { DecisionViewConditionRenderer as Re, DecisionViewConditionRendererNew as st } from "@isettingkit/view";
|
|
7
7
|
import { createPortal as en } from "react-dom";
|
|
8
8
|
import { useFormik as tn } from "formik";
|
|
9
|
-
import { string as be, mixed as
|
|
9
|
+
import { string as be, mixed as we, object as Q, number as ge, lazy as Qe, date as Le } from "yup";
|
|
10
10
|
import _, { 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 = N.div`
|
|
15
15
|
border-radius: 8px;
|
|
16
16
|
border: 1px solid
|
|
17
17
|
${({ theme: e }) => {
|
|
18
18
|
var t, n;
|
|
19
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
19
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
20
20
|
}};
|
|
21
21
|
box-sizing: border-box;
|
|
22
22
|
display: flex;
|
|
@@ -27,7 +27,7 @@ const $r = D.div`
|
|
|
27
27
|
height: 100%;
|
|
28
28
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
29
29
|
`;
|
|
30
|
-
|
|
30
|
+
N.div`
|
|
31
31
|
width: 100%;
|
|
32
32
|
height: 100%;
|
|
33
33
|
overflow-y: auto;
|
|
@@ -48,11 +48,11 @@ D.div`
|
|
|
48
48
|
`;
|
|
49
49
|
const et = (e) => {
|
|
50
50
|
const { children: t, controls: n = !0, handleDelete: r, id: o } = e;
|
|
51
|
-
return /* @__PURE__ */ a($r, { children: /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ a($r, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
52
52
|
t,
|
|
53
|
-
n && /* @__PURE__ */
|
|
53
|
+
n && /* @__PURE__ */ b(V, { children: [
|
|
54
54
|
/* @__PURE__ */ a(W, {}),
|
|
55
|
-
/* @__PURE__ */ a(
|
|
55
|
+
/* @__PURE__ */ a(T, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
|
|
56
56
|
B,
|
|
57
57
|
{
|
|
58
58
|
cursorHover: !0,
|
|
@@ -81,16 +81,16 @@ 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
|
-
},
|
|
84
|
+
}, hn = N.div`
|
|
85
85
|
& > div {
|
|
86
86
|
border-radius: 8px;
|
|
87
87
|
border: 1px solid
|
|
88
88
|
${({ theme: e }) => {
|
|
89
89
|
var t, n;
|
|
90
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
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
|
-
`,
|
|
93
|
+
`, gn = N.div`
|
|
94
94
|
width: 100%;
|
|
95
95
|
height: 100%;
|
|
96
96
|
overflow-y: auto;
|
|
@@ -120,8 +120,8 @@ const _r = {
|
|
|
120
120
|
textValues: l,
|
|
121
121
|
visibleConditions: s
|
|
122
122
|
} = e;
|
|
123
|
-
return i ? /* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */ a(
|
|
123
|
+
return i ? /* @__PURE__ */ b(T, { direction: "column", gap: "12px", children: [
|
|
124
|
+
/* @__PURE__ */ a(T, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
|
|
125
125
|
Re,
|
|
126
126
|
{
|
|
127
127
|
element: o,
|
|
@@ -132,8 +132,8 @@ const _r = {
|
|
|
132
132
|
}
|
|
133
133
|
) }, n.ruleName),
|
|
134
134
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
135
|
-
/* @__PURE__ */ a(
|
|
136
|
-
|
|
135
|
+
/* @__PURE__ */ a(gn, { children: /* @__PURE__ */ b(
|
|
136
|
+
T,
|
|
137
137
|
{
|
|
138
138
|
direction: "column",
|
|
139
139
|
gap: "12px",
|
|
@@ -151,7 +151,7 @@ const _r = {
|
|
|
151
151
|
children: l.factsThatConditionIt
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
s.length > 0 && s.map((p) => /* @__PURE__ */ a(
|
|
154
|
+
s.length > 0 && s.map((p) => /* @__PURE__ */ a(hn, { children: /* @__PURE__ */ a(T, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
|
|
155
155
|
Re,
|
|
156
156
|
{
|
|
157
157
|
element: { ...p, value: p.value },
|
|
@@ -173,32 +173,32 @@ const _r = {
|
|
|
173
173
|
]
|
|
174
174
|
}
|
|
175
175
|
) })
|
|
176
|
-
] }) : /* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */ a(
|
|
179
|
-
/* @__PURE__ */ a(
|
|
176
|
+
] }) : /* @__PURE__ */ b(T, { direction: "column", gap: "12px", children: [
|
|
177
|
+
/* @__PURE__ */ b(T, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
178
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "180px" }),
|
|
179
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "85px" })
|
|
180
180
|
] }, "loading"),
|
|
181
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ b(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
182
182
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
183
|
-
/* @__PURE__ */ a(
|
|
183
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "150px" })
|
|
184
184
|
] }),
|
|
185
|
-
/* @__PURE__ */ a(
|
|
186
|
-
|
|
185
|
+
/* @__PURE__ */ a(gn, { children: /* @__PURE__ */ a(
|
|
186
|
+
T,
|
|
187
187
|
{
|
|
188
188
|
direction: "column",
|
|
189
189
|
gap: "12px",
|
|
190
190
|
justifyContent: "space-between",
|
|
191
191
|
height: "203px",
|
|
192
|
-
children: c.map((p, d) => /* @__PURE__ */ a(
|
|
193
|
-
|
|
192
|
+
children: c.map((p, d) => /* @__PURE__ */ a(hn, { children: /* @__PURE__ */ b(
|
|
193
|
+
T,
|
|
194
194
|
{
|
|
195
195
|
direction: "column",
|
|
196
196
|
gap: "12px",
|
|
197
197
|
alignItems: "start",
|
|
198
198
|
padding: "8px",
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */ a(
|
|
201
|
-
/* @__PURE__ */ a(
|
|
200
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "180px" }),
|
|
201
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "85px" })
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
204
|
) }, `condition-${d}`))
|
|
@@ -206,7 +206,7 @@ const _r = {
|
|
|
206
206
|
) })
|
|
207
207
|
] });
|
|
208
208
|
}, nn = (e) => {
|
|
209
|
-
var
|
|
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: {
|
|
212
212
|
labelName: r == null ? void 0 : r.terms,
|
|
@@ -241,8 +241,8 @@ const _r = {
|
|
|
241
241
|
decisionDataType: t.decisionDataType || "alphabetical",
|
|
242
242
|
value: We(t),
|
|
243
243
|
howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
|
|
244
|
-
} : null, l = ((
|
|
245
|
-
(
|
|
244
|
+
} : null, l = ((h = t == null ? void 0 : t.conditionsThatEstablishesTheDecision) == null ? void 0 : h.filter(
|
|
245
|
+
(g) => !g.hidden
|
|
246
246
|
)) || [], s = Array.from({ length: 5 }), p = !!(!n && t && r && u), d = l.length < 2 ? "start" : "space-between";
|
|
247
247
|
return /* @__PURE__ */ a(
|
|
248
248
|
Vr,
|
|
@@ -258,15 +258,15 @@ const _r = {
|
|
|
258
258
|
visibleConditions: l
|
|
259
259
|
}
|
|
260
260
|
);
|
|
261
|
-
}, Pr =
|
|
261
|
+
}, Pr = N.div`
|
|
262
262
|
position: relative;
|
|
263
263
|
& > div {
|
|
264
264
|
padding: 24px 16px;
|
|
265
265
|
}
|
|
266
|
-
`, Ur =
|
|
266
|
+
`, Ur = N.div`
|
|
267
267
|
background-color: ${({ theme: e }) => {
|
|
268
268
|
var t, n;
|
|
269
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) ||
|
|
269
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || A.palette.neutral.N0;
|
|
270
270
|
}};
|
|
271
271
|
max-width: 450px;
|
|
272
272
|
max-height: 90vh;
|
|
@@ -300,10 +300,10 @@ 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 =
|
|
303
|
+
const c = ae("(max-width: 400px)");
|
|
304
304
|
return en(
|
|
305
|
-
/* @__PURE__ */ a(Pr, { smallScreen: c, children: /* @__PURE__ */ a(Jt, { children: /* @__PURE__ */ a(Ur, { children: /* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */ a(
|
|
305
|
+
/* @__PURE__ */ a(Pr, { smallScreen: c, children: /* @__PURE__ */ a(Jt, { children: /* @__PURE__ */ a(Ur, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
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
308
|
/* @__PURE__ */ a(Qt, { size: "24px", cursor: "pointer", onClick: r })
|
|
309
309
|
] }) }),
|
|
@@ -321,12 +321,12 @@ const _r = {
|
|
|
321
321
|
transform: translateY(0);
|
|
322
322
|
}
|
|
323
323
|
`;
|
|
324
|
-
|
|
324
|
+
N.div`
|
|
325
325
|
border-radius: 8px;
|
|
326
326
|
border: 1px solid
|
|
327
327
|
${({ theme: e }) => {
|
|
328
328
|
var t, n;
|
|
329
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
329
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
330
330
|
}};
|
|
331
331
|
box-sizing: border-box;
|
|
332
332
|
display: flex;
|
|
@@ -335,21 +335,21 @@ D.div`
|
|
|
335
335
|
height: 100%;
|
|
336
336
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
337
337
|
`;
|
|
338
|
-
|
|
338
|
+
N.div`
|
|
339
339
|
& > div {
|
|
340
340
|
border-radius: 8px;
|
|
341
341
|
border: 1px solid
|
|
342
342
|
${({ theme: e }) => {
|
|
343
343
|
var t, n;
|
|
344
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
344
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
345
345
|
}};
|
|
346
346
|
}
|
|
347
347
|
`;
|
|
348
|
-
const zn =
|
|
348
|
+
const zn = N.div`
|
|
349
349
|
& > div {
|
|
350
350
|
background-color: ${({ theme: e }) => {
|
|
351
351
|
var t, n;
|
|
352
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N10) ||
|
|
352
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N10) || A.palette.neutral.N10;
|
|
353
353
|
}};
|
|
354
354
|
justify-content: center;
|
|
355
355
|
}
|
|
@@ -358,18 +358,18 @@ const zn = D.div`
|
|
|
358
358
|
height: 100%;
|
|
359
359
|
padding-bottom: 12px;
|
|
360
360
|
cursor: pointer;
|
|
361
|
-
`, tt =
|
|
361
|
+
`, tt = N.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 = N.div`
|
|
368
368
|
& > div > div {
|
|
369
369
|
border-radius: 8px;
|
|
370
370
|
box-sizing: border-box;
|
|
371
371
|
}
|
|
372
|
-
`, Hr =
|
|
372
|
+
`, Hr = N.div`
|
|
373
373
|
& > div {
|
|
374
374
|
width: 100%;
|
|
375
375
|
height: 100%;
|
|
@@ -405,7 +405,7 @@ const zn = D.div`
|
|
|
405
405
|
);
|
|
406
406
|
}, qr = (e) => {
|
|
407
407
|
const { decision: t, controls: n, handleOpenModal: r, handleDelete: o, textValues: i } = e;
|
|
408
|
-
return t ? /* @__PURE__ */ a(tt, { children: /* @__PURE__ */
|
|
408
|
+
return t ? /* @__PURE__ */ a(tt, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
409
409
|
/* @__PURE__ */ a(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
|
|
410
410
|
/* @__PURE__ */ a(
|
|
411
411
|
et,
|
|
@@ -425,7 +425,7 @@ const zn = D.div`
|
|
|
425
425
|
handleOpenModal: r,
|
|
426
426
|
shouldRenderEmptyMessage: o
|
|
427
427
|
} = e, i = t || "Agregar decisión";
|
|
428
|
-
return /* @__PURE__ */ a(tt, { children: o ? null : /* @__PURE__ */
|
|
428
|
+
return /* @__PURE__ */ a(tt, { children: o ? null : /* @__PURE__ */ b(T, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
429
429
|
/* @__PURE__ */ a(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
430
430
|
/* @__PURE__ */ a(
|
|
431
431
|
zn,
|
|
@@ -439,7 +439,7 @@ const zn = D.div`
|
|
|
439
439
|
},
|
|
440
440
|
handleView: () => r ? r() : null,
|
|
441
441
|
controls: !1,
|
|
442
|
-
children: /* @__PURE__ */
|
|
442
|
+
children: /* @__PURE__ */ b(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
443
443
|
/* @__PURE__ */ a(B, { appearance: "gray", icon: /* @__PURE__ */ a(Ke, {}), size: "35px" }),
|
|
444
444
|
/* @__PURE__ */ a(R, { appearance: "gray", type: "body", size: "large", children: i })
|
|
445
445
|
] })
|
|
@@ -501,21 +501,21 @@ const zn = D.div`
|
|
|
501
501
|
loading: s,
|
|
502
502
|
handleOpenModal: p,
|
|
503
503
|
handleCloseModal: d,
|
|
504
|
-
handleSubmitForm:
|
|
505
|
-
handleDelete:
|
|
504
|
+
handleSubmitForm: h,
|
|
505
|
+
handleDelete: g,
|
|
506
506
|
terms: f = !0
|
|
507
|
-
} = e, m =
|
|
507
|
+
} = e, m = ae("(max-width: 681px)"), v = ae("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: w } = Xr({
|
|
508
508
|
controls: t,
|
|
509
509
|
customTitleContentAddCard: n,
|
|
510
510
|
decisions: o,
|
|
511
511
|
loading: s,
|
|
512
512
|
handleOpenModal: p,
|
|
513
|
-
handleDelete:
|
|
513
|
+
handleDelete: g,
|
|
514
514
|
textValues: i
|
|
515
515
|
}), S = (o == null ? void 0 : o.length) === 0 && !s;
|
|
516
|
-
return /* @__PURE__ */
|
|
517
|
-
/* @__PURE__ */ a(zr, { children: /* @__PURE__ */ a(Hr, { children: /* @__PURE__ */ a(
|
|
518
|
-
|
|
516
|
+
return /* @__PURE__ */ b(V, { children: [
|
|
517
|
+
/* @__PURE__ */ a(zr, { children: /* @__PURE__ */ a(Hr, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ b(
|
|
518
|
+
T,
|
|
519
519
|
{
|
|
520
520
|
direction: "column",
|
|
521
521
|
gap: "28px",
|
|
@@ -524,9 +524,9 @@ const zn = D.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__ */
|
|
527
|
+
/* @__PURE__ */ a(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ b(V, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ b(
|
|
530
530
|
R,
|
|
531
531
|
{
|
|
532
532
|
as: "span",
|
|
@@ -553,10 +553,10 @@ const zn = D.div`
|
|
|
553
553
|
)
|
|
554
554
|
]
|
|
555
555
|
}
|
|
556
|
-
) : /* @__PURE__ */
|
|
557
|
-
|
|
556
|
+
) : /* @__PURE__ */ b(
|
|
557
|
+
Se,
|
|
558
558
|
{
|
|
559
|
-
templateColumns:
|
|
559
|
+
templateColumns: v ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
560
560
|
autoFlow: "row dense",
|
|
561
561
|
gap: "24px",
|
|
562
562
|
alignItems: "start",
|
|
@@ -566,7 +566,7 @@ const zn = D.div`
|
|
|
566
566
|
padding: "6px",
|
|
567
567
|
height: m ? "auto" : "484px",
|
|
568
568
|
children: [
|
|
569
|
-
|
|
569
|
+
x,
|
|
570
570
|
w && Vt({
|
|
571
571
|
type: "add",
|
|
572
572
|
index: o == null ? void 0 : o.length,
|
|
@@ -575,7 +575,7 @@ const zn = D.div`
|
|
|
575
575
|
customMessageEmptyDecisions: r,
|
|
576
576
|
loading: s,
|
|
577
577
|
handleOpenModal: p,
|
|
578
|
-
handleDelete:
|
|
578
|
+
handleDelete: g,
|
|
579
579
|
textValues: i,
|
|
580
580
|
shouldRenderEmptyMessage: S,
|
|
581
581
|
terms: f
|
|
@@ -593,7 +593,7 @@ const zn = D.div`
|
|
|
593
593
|
ra,
|
|
594
594
|
{
|
|
595
595
|
decision: l || c,
|
|
596
|
-
onSubmitEvent:
|
|
596
|
+
onSubmitEvent: h,
|
|
597
597
|
textValues: i,
|
|
598
598
|
onCancel: () => d ? d() : () => {
|
|
599
599
|
}
|
|
@@ -602,15 +602,15 @@ const zn = D.div`
|
|
|
602
602
|
}
|
|
603
603
|
)
|
|
604
604
|
] });
|
|
605
|
-
}, Qr =
|
|
605
|
+
}, Qr = N.div`
|
|
606
606
|
position: relative;
|
|
607
607
|
& > div {
|
|
608
608
|
padding: 24px 16px;
|
|
609
609
|
}
|
|
610
|
-
`, Jr =
|
|
610
|
+
`, Jr = N.div`
|
|
611
611
|
background-color: ${({ theme: e }) => {
|
|
612
612
|
var t, n;
|
|
613
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) ||
|
|
613
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || A.palette.neutral.N0;
|
|
614
614
|
}};
|
|
615
615
|
max-width: 450px;
|
|
616
616
|
max-height: 90vh;
|
|
@@ -644,10 +644,10 @@ const zn = D.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 =
|
|
647
|
+
const c = ae("(max-width: 400px)");
|
|
648
648
|
return en(
|
|
649
|
-
/* @__PURE__ */ a(Qr, { $smallScreen: c, children: /* @__PURE__ */ a(Jt, { children: /* @__PURE__ */ a(Jr, { children: /* @__PURE__ */
|
|
650
|
-
/* @__PURE__ */ a(
|
|
649
|
+
/* @__PURE__ */ a(Qr, { $smallScreen: c, children: /* @__PURE__ */ a(Jt, { children: /* @__PURE__ */ a(Jr, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
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
652
|
/* @__PURE__ */ a(Qt, { size: "24px", cursor: "pointer", onClick: r })
|
|
653
653
|
] }) }),
|
|
@@ -665,12 +665,12 @@ const zn = D.div`
|
|
|
665
665
|
transform: translateY(0);
|
|
666
666
|
}
|
|
667
667
|
`;
|
|
668
|
-
|
|
668
|
+
N.div`
|
|
669
669
|
border-radius: 8px;
|
|
670
670
|
border: 1px solid
|
|
671
671
|
${({ theme: e }) => {
|
|
672
672
|
var t, n;
|
|
673
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
673
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
674
674
|
}};
|
|
675
675
|
box-sizing: border-box;
|
|
676
676
|
display: flex;
|
|
@@ -679,21 +679,21 @@ D.div`
|
|
|
679
679
|
height: 100%;
|
|
680
680
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
681
681
|
`;
|
|
682
|
-
|
|
682
|
+
N.div`
|
|
683
683
|
& > div {
|
|
684
684
|
border-radius: 8px;
|
|
685
685
|
border: 1px solid
|
|
686
686
|
${({ theme: e }) => {
|
|
687
687
|
var t, n;
|
|
688
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
688
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
689
689
|
}};
|
|
690
690
|
}
|
|
691
691
|
`;
|
|
692
|
-
|
|
692
|
+
N.div`
|
|
693
693
|
& > div {
|
|
694
694
|
background-color: ${({ theme: e }) => {
|
|
695
695
|
var t, n;
|
|
696
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N10) ||
|
|
696
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N10) || A.palette.neutral.N10;
|
|
697
697
|
}};
|
|
698
698
|
justify-content: center;
|
|
699
699
|
}
|
|
@@ -703,19 +703,19 @@ D.div`
|
|
|
703
703
|
padding-bottom: 12px;
|
|
704
704
|
cursor: pointer;
|
|
705
705
|
`;
|
|
706
|
-
|
|
706
|
+
N.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 = N.div`
|
|
714
714
|
& > div > div {
|
|
715
715
|
border-radius: 8px;
|
|
716
716
|
box-sizing: border-box;
|
|
717
717
|
}
|
|
718
|
-
`, to =
|
|
718
|
+
`, to = N.div`
|
|
719
719
|
& > div {
|
|
720
720
|
width: 100%;
|
|
721
721
|
height: 100%;
|
|
@@ -762,16 +762,16 @@ const eo = D.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 = N.div`
|
|
766
766
|
& > div {
|
|
767
767
|
border-radius: 8px;
|
|
768
768
|
border: 1px solid
|
|
769
769
|
${({ theme: e }) => {
|
|
770
770
|
var t, n;
|
|
771
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
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 = N.div`
|
|
775
775
|
width: 100%;
|
|
776
776
|
height: 100%;
|
|
777
777
|
overflow-y: auto;
|
|
@@ -801,8 +801,8 @@ const eo = D.div`
|
|
|
801
801
|
textValues: l,
|
|
802
802
|
visibleConditions: s
|
|
803
803
|
} = e;
|
|
804
|
-
return i ? /* @__PURE__ */
|
|
805
|
-
/* @__PURE__ */ a(
|
|
804
|
+
return i ? /* @__PURE__ */ b(T, { direction: "column", gap: "12px", children: [
|
|
805
|
+
/* @__PURE__ */ a(T, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
|
|
806
806
|
Re,
|
|
807
807
|
{
|
|
808
808
|
element: o,
|
|
@@ -813,8 +813,8 @@ const eo = D.div`
|
|
|
813
813
|
}
|
|
814
814
|
) }, n.ruleName),
|
|
815
815
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
816
|
-
/* @__PURE__ */ a(mn, { children: /* @__PURE__ */
|
|
817
|
-
|
|
816
|
+
/* @__PURE__ */ a(mn, { children: /* @__PURE__ */ b(
|
|
817
|
+
T,
|
|
818
818
|
{
|
|
819
819
|
direction: "column",
|
|
820
820
|
gap: "12px",
|
|
@@ -832,7 +832,7 @@ const eo = D.div`
|
|
|
832
832
|
children: l.factsThatConditionIt
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
|
-
s.length > 0 && s.map((p) => /* @__PURE__ */ a(fn, { children: /* @__PURE__ */ a(
|
|
835
|
+
s.length > 0 && s.map((p) => /* @__PURE__ */ a(fn, { children: /* @__PURE__ */ a(T, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
|
|
836
836
|
Re,
|
|
837
837
|
{
|
|
838
838
|
element: { ...p, value: p.value },
|
|
@@ -854,41 +854,41 @@ const eo = D.div`
|
|
|
854
854
|
]
|
|
855
855
|
}
|
|
856
856
|
) })
|
|
857
|
-
] }) : /* @__PURE__ */
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
/* @__PURE__ */ a(
|
|
860
|
-
/* @__PURE__ */ a(
|
|
857
|
+
] }) : /* @__PURE__ */ b(T, { direction: "column", gap: "12px", children: [
|
|
858
|
+
/* @__PURE__ */ b(T, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
859
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "180px" }),
|
|
860
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "85px" })
|
|
861
861
|
] }, "loading"),
|
|
862
|
-
/* @__PURE__ */
|
|
862
|
+
/* @__PURE__ */ b(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
863
863
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
864
|
-
/* @__PURE__ */ a(
|
|
864
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "150px" })
|
|
865
865
|
] }),
|
|
866
866
|
/* @__PURE__ */ a(mn, { children: /* @__PURE__ */ a(
|
|
867
|
-
|
|
867
|
+
T,
|
|
868
868
|
{
|
|
869
869
|
direction: "column",
|
|
870
870
|
gap: "12px",
|
|
871
871
|
justifyContent: "space-between",
|
|
872
872
|
height: "203px",
|
|
873
|
-
children: c.map((p, d) => /* @__PURE__ */ a(fn, { children: /* @__PURE__ */
|
|
874
|
-
|
|
873
|
+
children: c.map((p, d) => /* @__PURE__ */ a(fn, { children: /* @__PURE__ */ b(
|
|
874
|
+
T,
|
|
875
875
|
{
|
|
876
876
|
direction: "column",
|
|
877
877
|
gap: "12px",
|
|
878
878
|
alignItems: "start",
|
|
879
879
|
padding: "8px",
|
|
880
880
|
children: [
|
|
881
|
-
/* @__PURE__ */ a(
|
|
882
|
-
/* @__PURE__ */ a(
|
|
881
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "180px" }),
|
|
882
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "85px" })
|
|
883
883
|
]
|
|
884
884
|
}
|
|
885
885
|
) }, `condition-${d}`))
|
|
886
886
|
}
|
|
887
887
|
) })
|
|
888
888
|
] });
|
|
889
|
-
},
|
|
889
|
+
}, ho = (e) => Array.isArray(e) ? e[0] : e ?? null, go = (e) => {
|
|
890
890
|
var t;
|
|
891
|
-
return ((t =
|
|
891
|
+
return ((t = ho(e == null ? void 0 : e.conditionGroups)) == null ? void 0 : t.conditionsThatEstablishesTheDecision) ?? [];
|
|
892
892
|
}, fo = (e) => {
|
|
893
893
|
const { decision: t, loading: n = !1, textValues: r } = e, o = !!(t != null && t.effectiveFrom), i = !!(t != null && t.validUntil), c = o && i ? {
|
|
894
894
|
element: {
|
|
@@ -924,7 +924,7 @@ const eo = D.div`
|
|
|
924
924
|
decisionDataType: t.decisionDataType || "alphabetical",
|
|
925
925
|
value: Ye(t),
|
|
926
926
|
howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
|
|
927
|
-
} : null, l =
|
|
927
|
+
} : null, l = go(t).filter((h) => !(h != null && h.hidden)), s = Array.from({ length: 5 }), p = !!(!n && t && r && u), d = l.length < 2 ? "start" : "space-between";
|
|
928
928
|
return /* @__PURE__ */ a(
|
|
929
929
|
po,
|
|
930
930
|
{
|
|
@@ -939,12 +939,12 @@ const eo = D.div`
|
|
|
939
939
|
visibleConditions: l
|
|
940
940
|
}
|
|
941
941
|
);
|
|
942
|
-
}, mo =
|
|
942
|
+
}, mo = N.div`
|
|
943
943
|
border-radius: 8px;
|
|
944
944
|
border: 1px solid
|
|
945
945
|
${({ theme: e }) => {
|
|
946
946
|
var t, n;
|
|
947
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
947
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
948
948
|
}};
|
|
949
949
|
box-sizing: border-box;
|
|
950
950
|
display: flex;
|
|
@@ -955,7 +955,7 @@ const eo = D.div`
|
|
|
955
955
|
height: 100%;
|
|
956
956
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
957
957
|
`;
|
|
958
|
-
|
|
958
|
+
N.div`
|
|
959
959
|
width: 100%;
|
|
960
960
|
height: 100%;
|
|
961
961
|
overflow-y: auto;
|
|
@@ -976,11 +976,11 @@ D.div`
|
|
|
976
976
|
`;
|
|
977
977
|
const bo = (e) => {
|
|
978
978
|
const { children: t, controls: n = !0, handleDelete: r, id: o } = e;
|
|
979
|
-
return /* @__PURE__ */ a(mo, { children: /* @__PURE__ */
|
|
979
|
+
return /* @__PURE__ */ a(mo, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
980
980
|
t,
|
|
981
|
-
n && /* @__PURE__ */
|
|
981
|
+
n && /* @__PURE__ */ b(V, { children: [
|
|
982
982
|
/* @__PURE__ */ a(W, {}),
|
|
983
|
-
/* @__PURE__ */ a(
|
|
983
|
+
/* @__PURE__ */ a(T, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
|
|
984
984
|
B,
|
|
985
985
|
{
|
|
986
986
|
cursorHover: !0,
|
|
@@ -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,
|
|
@@ -1022,7 +1024,7 @@ const bo = (e) => {
|
|
|
1022
1024
|
handleOpenModal: r,
|
|
1023
1025
|
shouldRenderEmptyMessage: o
|
|
1024
1026
|
} = e, i = t || "Agregar decisión";
|
|
1025
|
-
return /* @__PURE__ */ a(tt, { children: o ? null : /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ a(tt, { children: o ? null : /* @__PURE__ */ b(T, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
1026
1028
|
/* @__PURE__ */ a(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
1027
1029
|
/* @__PURE__ */ a(
|
|
1028
1030
|
zn,
|
|
@@ -1036,7 +1038,7 @@ const bo = (e) => {
|
|
|
1036
1038
|
},
|
|
1037
1039
|
handleView: () => r ? r() : null,
|
|
1038
1040
|
controls: !1,
|
|
1039
|
-
children: /* @__PURE__ */
|
|
1041
|
+
children: /* @__PURE__ */ b(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
1040
1042
|
/* @__PURE__ */ a(B, { appearance: "gray", icon: /* @__PURE__ */ a(Ke, {}), size: "35px" }),
|
|
1041
1043
|
/* @__PURE__ */ a(R, { appearance: "gray", type: "body", size: "large", children: i })
|
|
1042
1044
|
] })
|
|
@@ -1060,7 +1062,7 @@ const bo = (e) => {
|
|
|
1060
1062
|
),
|
|
1061
1063
|
value: e
|
|
1062
1064
|
}), wo = (e) => ({
|
|
1063
|
-
schema:
|
|
1065
|
+
schema: we().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: we().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,9 +1082,9 @@ 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:
|
|
1084
|
-
from:
|
|
1085
|
-
to:
|
|
1085
|
+
schema: Q({
|
|
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"),
|
|
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",
|
|
1087
1089
|
"El campo 'Rango hasta' debe ser mayor que 'Rango desde'",
|
|
1088
1090
|
function(r) {
|
|
@@ -1094,7 +1096,7 @@ const bo = (e) => {
|
|
|
1094
1096
|
value: { from: t, to: n }
|
|
1095
1097
|
};
|
|
1096
1098
|
}, Rt = (e, t) => t === H.PERCENTAGE ? {
|
|
1097
|
-
schema:
|
|
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
1102
|
schema: be().required("Requerido"),
|
|
@@ -1108,18 +1110,18 @@ const bo = (e) => {
|
|
|
1108
1110
|
[I.EQUAL]: Rt
|
|
1109
1111
|
}, No = (e) => Do[e] || xo;
|
|
1110
1112
|
var rn = /* @__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))(rn || {});
|
|
1111
|
-
const
|
|
1113
|
+
const ht = (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]) => ht(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) => ht(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]) => ht(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
|
);
|
|
1120
1122
|
return i.map((l, s) => {
|
|
1121
|
-
var
|
|
1122
|
-
const p = l.conditionName ?? ((
|
|
1123
|
+
var h;
|
|
1124
|
+
const p = l.conditionName ?? ((h = t == null ? void 0 : t[s]) == null ? void 0 : h.conditionName) ?? void 0;
|
|
1123
1125
|
return {
|
|
1124
1126
|
...(p && c.get(p)) ?? (t == null ? void 0 : t[s]) ?? {},
|
|
1125
1127
|
...p ? { conditionName: p } : {},
|
|
@@ -1132,8 +1134,8 @@ function ko({
|
|
|
1132
1134
|
onSubmitEvent: t,
|
|
1133
1135
|
textValues: n
|
|
1134
1136
|
}) {
|
|
1135
|
-
var d,
|
|
1136
|
-
const r = ((d = e.conditionGroups[0]) == null ? void 0 : d.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((
|
|
1137
|
+
var d, h;
|
|
1138
|
+
const r = ((d = e.conditionGroups[0]) == null ? void 0 : d.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((g, f) => (ht(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 || "",
|
|
@@ -1143,7 +1145,7 @@ function ko({
|
|
|
1143
1145
|
toggleNone: !i,
|
|
1144
1146
|
conditionsThatEstablishesTheDecision: o,
|
|
1145
1147
|
conditionGroups: {
|
|
1146
|
-
ConditionGroupId: ((
|
|
1148
|
+
ConditionGroupId: ((h = e.conditionGroups) == null ? void 0 : h.ConditionGroupId) ?? "group-primary",
|
|
1147
1149
|
conditionsThatEstablishesTheDecision: r
|
|
1148
1150
|
},
|
|
1149
1151
|
checkClosed: !1,
|
|
@@ -1158,68 +1160,68 @@ function ko({
|
|
|
1158
1160
|
u.values.value,
|
|
1159
1161
|
u.values.decisionDataType
|
|
1160
1162
|
).schema),
|
|
1161
|
-
conditionsThatEstablishesTheDecision:
|
|
1163
|
+
conditionsThatEstablishesTheDecision: Q().shape({})
|
|
1162
1164
|
};
|
|
1163
1165
|
n.terms && (l.effectiveFrom = Le().required("La fecha de inicio es requerida"), l.validUntil = Le().when(
|
|
1164
1166
|
"checkClosed",
|
|
1165
|
-
(
|
|
1167
|
+
(g, f, { parent: m }) => (m == null ? void 0 : m.checkClosed) ? f.required("La fecha de finalización es requerida").test(
|
|
1166
1168
|
"is-after-startDate",
|
|
1167
1169
|
"La fecha de finalización debe ser mayor o igual a la fecha de inicio",
|
|
1168
|
-
function(
|
|
1170
|
+
function(x) {
|
|
1169
1171
|
const w = this.parent.effectiveFrom;
|
|
1170
|
-
return !w || !
|
|
1172
|
+
return !w || !x ? !0 : new Date(x) >= new Date(w);
|
|
1171
1173
|
}
|
|
1172
1174
|
) : f.notRequired()
|
|
1173
1175
|
));
|
|
1174
|
-
const s =
|
|
1176
|
+
const s = Q(l);
|
|
1175
1177
|
return u = tn({
|
|
1176
1178
|
initialValues: c,
|
|
1177
1179
|
validationSchema: s,
|
|
1178
1180
|
validateOnBlur: !0,
|
|
1179
|
-
onSubmit: (
|
|
1180
|
-
var
|
|
1181
|
-
const f = ((
|
|
1181
|
+
onSubmit: (g) => {
|
|
1182
|
+
var x;
|
|
1183
|
+
const f = ((x = e.conditionGroups) == null ? void 0 : x.ConditionGroupId) ?? "group-primary", m = g.toggleNone ? [] : Eo(g, r), v = {
|
|
1182
1184
|
...e,
|
|
1183
|
-
ruleName:
|
|
1184
|
-
decisionDataType:
|
|
1185
|
-
howToSetTheDecision:
|
|
1186
|
-
value:
|
|
1187
|
-
effectiveFrom:
|
|
1188
|
-
validUntil:
|
|
1185
|
+
ruleName: g.ruleName,
|
|
1186
|
+
decisionDataType: g.decisionDataType,
|
|
1187
|
+
howToSetTheDecision: g.howToSetTheDecision,
|
|
1188
|
+
value: g.value,
|
|
1189
|
+
effectiveFrom: g.effectiveFrom,
|
|
1190
|
+
validUntil: g.validUntil,
|
|
1189
1191
|
conditionGroups: {
|
|
1190
1192
|
ConditionGroupId: f,
|
|
1191
1193
|
conditionsThatEstablishesTheDecision: m
|
|
1192
1194
|
}
|
|
1193
1195
|
};
|
|
1194
|
-
t(
|
|
1196
|
+
t(v);
|
|
1195
1197
|
}
|
|
1196
|
-
}), { formik: u, handleToggleNoneChange: (
|
|
1197
|
-
u.setFieldValue("toggleNone",
|
|
1198
|
-
if (
|
|
1198
|
+
}), { formik: u, handleToggleNoneChange: (g) => {
|
|
1199
|
+
u.setFieldValue("toggleNone", g), r.forEach((f) => {
|
|
1200
|
+
if (g)
|
|
1199
1201
|
u.setFieldValue(
|
|
1200
1202
|
`conditionsThatEstablishesTheDecision.${f.conditionName}`,
|
|
1201
1203
|
void 0
|
|
1202
1204
|
);
|
|
1203
1205
|
else if (u.values.conditionsThatEstablishesTheDecision[f.conditionName] === void 0) {
|
|
1204
|
-
const
|
|
1206
|
+
const v = f.howToSetTheCondition === rn.LIST_OF_VALUES_MULTI ? [] : "";
|
|
1205
1207
|
u.setFieldValue(
|
|
1206
1208
|
`conditionsThatEstablishesTheDecision.${f.conditionName}`,
|
|
1207
|
-
|
|
1209
|
+
v
|
|
1208
1210
|
);
|
|
1209
1211
|
}
|
|
1210
1212
|
});
|
|
1211
1213
|
} };
|
|
1212
1214
|
}
|
|
1213
|
-
const Ao =
|
|
1215
|
+
const Ao = N.div`
|
|
1214
1216
|
& > div {
|
|
1215
1217
|
border-radius: 8px;
|
|
1216
1218
|
border: 1px solid
|
|
1217
1219
|
${({ theme: e }) => {
|
|
1218
1220
|
var t, n;
|
|
1219
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
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 = N.div`
|
|
1223
1225
|
width: 100%;
|
|
1224
1226
|
height: 100%;
|
|
1225
1227
|
overflow-y: auto;
|
|
@@ -1246,8 +1248,8 @@ const Ao = D.div`
|
|
|
1246
1248
|
name: c,
|
|
1247
1249
|
valueToggle: u = ""
|
|
1248
1250
|
} = e, [l, s] = q(t);
|
|
1249
|
-
return /* @__PURE__ */
|
|
1250
|
-
/* @__PURE__ */ a(
|
|
1251
|
+
return /* @__PURE__ */ b(V, { children: [
|
|
1252
|
+
/* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(
|
|
1251
1253
|
Tt,
|
|
1252
1254
|
{
|
|
1253
1255
|
checked: l,
|
|
@@ -1276,17 +1278,17 @@ const Ao = D.div`
|
|
|
1276
1278
|
valueEnd: s = "",
|
|
1277
1279
|
messageStart: p = "",
|
|
1278
1280
|
messageEnd: d = "",
|
|
1279
|
-
statusStart:
|
|
1280
|
-
statusEnd:
|
|
1281
|
-
} = e, [f, m] = q(c), [
|
|
1281
|
+
statusStart: h = "pending",
|
|
1282
|
+
statusEnd: g = "pending"
|
|
1283
|
+
} = e, [f, m] = q(c), [v, x] = q(l), [w, S] = q(s), D = ({ target: F }) => {
|
|
1282
1284
|
m(F.checked), r && r(F.checked);
|
|
1283
1285
|
}, C = (F) => {
|
|
1284
|
-
|
|
1285
|
-
},
|
|
1286
|
+
x(F.target.value), t(F);
|
|
1287
|
+
}, k = (F) => {
|
|
1286
1288
|
S(F.target.value), n(F);
|
|
1287
|
-
}, L =
|
|
1288
|
-
return /* @__PURE__ */
|
|
1289
|
-
/* @__PURE__ */
|
|
1289
|
+
}, L = ae("(max-width: 400px)");
|
|
1290
|
+
return /* @__PURE__ */ b(V, { children: [
|
|
1291
|
+
/* @__PURE__ */ b(T, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
1290
1292
|
/* @__PURE__ */ a(
|
|
1291
1293
|
R,
|
|
1292
1294
|
{
|
|
@@ -1299,7 +1301,7 @@ const Ao = D.div`
|
|
|
1299
1301
|
}
|
|
1300
1302
|
),
|
|
1301
1303
|
/* @__PURE__ */ a(
|
|
1302
|
-
|
|
1304
|
+
T,
|
|
1303
1305
|
{
|
|
1304
1306
|
alignContent: "center",
|
|
1305
1307
|
justifyContent: "center",
|
|
@@ -1309,7 +1311,7 @@ const Ao = D.div`
|
|
|
1309
1311
|
Zt,
|
|
1310
1312
|
{
|
|
1311
1313
|
label: "Cerrada",
|
|
1312
|
-
onChange:
|
|
1314
|
+
onChange: D,
|
|
1313
1315
|
checked: f,
|
|
1314
1316
|
value: ""
|
|
1315
1317
|
}
|
|
@@ -1317,8 +1319,8 @@ const Ao = D.div`
|
|
|
1317
1319
|
}
|
|
1318
1320
|
)
|
|
1319
1321
|
] }),
|
|
1320
|
-
/* @__PURE__ */
|
|
1321
|
-
|
|
1322
|
+
/* @__PURE__ */ b(
|
|
1323
|
+
T,
|
|
1322
1324
|
{
|
|
1323
1325
|
direction: L ? "column" : "row",
|
|
1324
1326
|
justifyContent: "space-between",
|
|
@@ -1330,10 +1332,10 @@ const Ao = D.div`
|
|
|
1330
1332
|
id: "dateStart",
|
|
1331
1333
|
label: o,
|
|
1332
1334
|
onChange: C,
|
|
1333
|
-
value:
|
|
1335
|
+
value: v,
|
|
1334
1336
|
required: u,
|
|
1335
1337
|
size: "compact",
|
|
1336
|
-
status:
|
|
1338
|
+
status: h,
|
|
1337
1339
|
message: p
|
|
1338
1340
|
}
|
|
1339
1341
|
),
|
|
@@ -1342,11 +1344,11 @@ const Ao = D.div`
|
|
|
1342
1344
|
{
|
|
1343
1345
|
id: "dateEnd",
|
|
1344
1346
|
label: i,
|
|
1345
|
-
onChange:
|
|
1347
|
+
onChange: k,
|
|
1346
1348
|
value: w,
|
|
1347
1349
|
required: u,
|
|
1348
1350
|
size: "compact",
|
|
1349
|
-
status:
|
|
1351
|
+
status: g,
|
|
1350
1352
|
message: d
|
|
1351
1353
|
}
|
|
1352
1354
|
)
|
|
@@ -1367,23 +1369,23 @@ const Ao = D.div`
|
|
|
1367
1369
|
termStartStatus: s,
|
|
1368
1370
|
termEndStatus: p
|
|
1369
1371
|
} = e;
|
|
1370
|
-
return /* @__PURE__ */ a("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */
|
|
1372
|
+
return /* @__PURE__ */ a("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
1371
1373
|
ft({
|
|
1372
1374
|
condition: i,
|
|
1373
1375
|
formik: t,
|
|
1374
1376
|
isDecision: !0
|
|
1375
1377
|
}),
|
|
1376
1378
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
1377
|
-
/* @__PURE__ */ a(Ao, { children: /* @__PURE__ */ a($o, { children: /* @__PURE__ */
|
|
1378
|
-
|
|
1379
|
+
/* @__PURE__ */ a(Ao, { children: /* @__PURE__ */ a($o, { children: /* @__PURE__ */ b(
|
|
1380
|
+
T,
|
|
1379
1381
|
{
|
|
1380
1382
|
direction: "column",
|
|
1381
1383
|
padding: "6px 12px",
|
|
1382
1384
|
gap: "16px",
|
|
1383
1385
|
height: "272px",
|
|
1384
1386
|
children: [
|
|
1385
|
-
/* @__PURE__ */
|
|
1386
|
-
|
|
1387
|
+
/* @__PURE__ */ b(
|
|
1388
|
+
T,
|
|
1387
1389
|
{
|
|
1388
1390
|
justifyContent: "space-between",
|
|
1389
1391
|
alignItems: "center",
|
|
@@ -1403,19 +1405,19 @@ const Ao = D.div`
|
|
|
1403
1405
|
]
|
|
1404
1406
|
}
|
|
1405
1407
|
),
|
|
1406
|
-
/* @__PURE__ */ a(
|
|
1407
|
-
var
|
|
1408
|
+
/* @__PURE__ */ a(T, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((d) => {
|
|
1409
|
+
var h;
|
|
1408
1410
|
return /* @__PURE__ */ a(
|
|
1409
1411
|
Io,
|
|
1410
1412
|
{
|
|
1411
1413
|
id: `toggle-${d.conditionName}`,
|
|
1412
1414
|
name: `toggle.${d.conditionName}`,
|
|
1413
1415
|
labelToggle: d.labelName,
|
|
1414
|
-
checked: !t.values.toggleNone && ((
|
|
1415
|
-
handleToggleChange: (
|
|
1416
|
+
checked: !t.values.toggleNone && ((h = t.values.conditionsThatEstablishesTheDecision) == null ? void 0 : h[d.conditionName]) !== void 0,
|
|
1417
|
+
handleToggleChange: (g) => u(
|
|
1416
1418
|
d.conditionName,
|
|
1417
1419
|
d.howToSetTheCondition === rn.LIST_OF_VALUES_MULTI
|
|
1418
|
-
)(
|
|
1420
|
+
)(g.target.checked),
|
|
1419
1421
|
children: ft({ condition: d, formik: t })
|
|
1420
1422
|
},
|
|
1421
1423
|
d.conditionName
|
|
@@ -1424,7 +1426,7 @@ const Ao = D.div`
|
|
|
1424
1426
|
]
|
|
1425
1427
|
}
|
|
1426
1428
|
) }) }),
|
|
1427
|
-
n.terms && /* @__PURE__ */
|
|
1429
|
+
n.terms && /* @__PURE__ */ b(V, { children: [
|
|
1428
1430
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
1429
1431
|
/* @__PURE__ */ a(
|
|
1430
1432
|
Ro,
|
|
@@ -1448,13 +1450,13 @@ const Ao = D.div`
|
|
|
1448
1450
|
] }),
|
|
1449
1451
|
/* @__PURE__ */ a(W, {}),
|
|
1450
1452
|
l && /* @__PURE__ */ a(R, { type: "label", size: "medium", appearance: "danger", children: typeof t.errors.conditionsThatEstablishesTheDecision == "string" ? t.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
1451
|
-
/* @__PURE__ */
|
|
1453
|
+
/* @__PURE__ */ b(T, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
1452
1454
|
/* @__PURE__ */ a(Y, { appearance: "gray", onClick: r, children: n.cancel }),
|
|
1453
1455
|
/* @__PURE__ */ a(Y, { type: "submit", children: n.confirm })
|
|
1454
1456
|
] })
|
|
1455
1457
|
] }) });
|
|
1456
1458
|
}, Fo = (e) => {
|
|
1457
|
-
var
|
|
1459
|
+
var g, f;
|
|
1458
1460
|
const { decision: t, onSubmitEvent: n, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: c } = ko({
|
|
1459
1461
|
decision: t,
|
|
1460
1462
|
onSubmitEvent: n,
|
|
@@ -1465,7 +1467,7 @@ const Ao = D.div`
|
|
|
1465
1467
|
howToSetTheCondition: t.howToSetTheDecision,
|
|
1466
1468
|
decisionDataType: t.decisionDataType,
|
|
1467
1469
|
listOfPossibleValues: t.listOfPossibleValues
|
|
1468
|
-
}, l = ((f = (
|
|
1470
|
+
}, l = ((f = (g = t.conditionGroups[0]) == null ? void 0 : g.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
|
|
1469
1471
|
(m) => !m.hidden
|
|
1470
1472
|
)) || [], s = !!i.errors.conditionsThatEstablishesTheDecision && i.submitCount > 0, p = i.touched.effectiveFrom ? i.errors.effectiveFrom ? "invalid" : "valid" : void 0, d = i.touched.validUntil ? i.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
1471
1473
|
return /* @__PURE__ */ a(
|
|
@@ -1478,8 +1480,8 @@ const Ao = D.div`
|
|
|
1478
1480
|
visibleConditions: l,
|
|
1479
1481
|
normalizedDecision: u,
|
|
1480
1482
|
handleToggleNoneChange: c,
|
|
1481
|
-
handleConditionToggleChange: (m,
|
|
1482
|
-
if (!
|
|
1483
|
+
handleConditionToggleChange: (m, v) => (x) => {
|
|
1484
|
+
if (!x)
|
|
1483
1485
|
i.setFieldValue(
|
|
1484
1486
|
`conditionsThatEstablishesTheDecision.${m}`,
|
|
1485
1487
|
void 0
|
|
@@ -1489,7 +1491,7 @@ const Ao = D.div`
|
|
|
1489
1491
|
!1
|
|
1490
1492
|
), Object.keys(i.touched).filter((S) => S.startsWith("conditionsThatEstablishesTheDecision.")).some((S) => i.touched[S] === !0) || c(!0);
|
|
1491
1493
|
else {
|
|
1492
|
-
const w =
|
|
1494
|
+
const w = v ? [] : "";
|
|
1493
1495
|
c(!1), i.setFieldValue(
|
|
1494
1496
|
`conditionsThatEstablishesTheDecision.${m}`,
|
|
1495
1497
|
w
|
|
@@ -1522,7 +1524,8 @@ const Ao = D.div`
|
|
|
1522
1524
|
textValues: u
|
|
1523
1525
|
})
|
|
1524
1526
|
) : r == null ? void 0 : r.map(
|
|
1525
|
-
(p) => Pt({
|
|
1527
|
+
(p, d) => Pt({
|
|
1528
|
+
index: d,
|
|
1526
1529
|
type: "decision",
|
|
1527
1530
|
decision: p,
|
|
1528
1531
|
controls: t,
|
|
@@ -1534,7 +1537,7 @@ const Ao = D.div`
|
|
|
1534
1537
|
})
|
|
1535
1538
|
), s = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && t;
|
|
1536
1539
|
return { renderedCards: l, shouldRenderAddCard: s };
|
|
1537
|
-
},
|
|
1540
|
+
}, hs = (e) => {
|
|
1538
1541
|
const {
|
|
1539
1542
|
controls: t = !0,
|
|
1540
1543
|
customTitleContentAddCard: n,
|
|
@@ -1547,21 +1550,21 @@ const Ao = D.div`
|
|
|
1547
1550
|
loading: s,
|
|
1548
1551
|
handleOpenModal: p,
|
|
1549
1552
|
handleCloseModal: d,
|
|
1550
|
-
handleSubmitForm:
|
|
1551
|
-
handleDelete:
|
|
1553
|
+
handleSubmitForm: h,
|
|
1554
|
+
handleDelete: g,
|
|
1552
1555
|
terms: f = !0
|
|
1553
|
-
} = e, m =
|
|
1556
|
+
} = e, m = ae("(max-width: 681px)"), v = ae("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: w } = Lo({
|
|
1554
1557
|
controls: t,
|
|
1555
1558
|
customTitleContentAddCard: n,
|
|
1556
1559
|
decisions: o,
|
|
1557
1560
|
loading: s,
|
|
1558
1561
|
handleOpenModal: p,
|
|
1559
|
-
handleDelete:
|
|
1562
|
+
handleDelete: g,
|
|
1560
1563
|
textValues: i
|
|
1561
1564
|
}), S = (o == null ? void 0 : o.length) === 0 && !s;
|
|
1562
|
-
return /* @__PURE__ */
|
|
1563
|
-
/* @__PURE__ */ a(eo, { children: /* @__PURE__ */ a(to, { children: /* @__PURE__ */ a(
|
|
1564
|
-
|
|
1565
|
+
return /* @__PURE__ */ b(V, { children: [
|
|
1566
|
+
/* @__PURE__ */ a(eo, { children: /* @__PURE__ */ a(to, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ b(
|
|
1567
|
+
T,
|
|
1565
1568
|
{
|
|
1566
1569
|
direction: "column",
|
|
1567
1570
|
gap: "28px",
|
|
@@ -1570,9 +1573,9 @@ const Ao = D.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__ */
|
|
1576
|
+
/* @__PURE__ */ a(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ b(V, { children: [
|
|
1574
1577
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1575
|
-
/* @__PURE__ */
|
|
1578
|
+
/* @__PURE__ */ b(
|
|
1576
1579
|
R,
|
|
1577
1580
|
{
|
|
1578
1581
|
as: "span",
|
|
@@ -1599,10 +1602,10 @@ const Ao = D.div`
|
|
|
1599
1602
|
)
|
|
1600
1603
|
]
|
|
1601
1604
|
}
|
|
1602
|
-
) : /* @__PURE__ */
|
|
1603
|
-
|
|
1605
|
+
) : /* @__PURE__ */ b(
|
|
1606
|
+
Se,
|
|
1604
1607
|
{
|
|
1605
|
-
templateColumns:
|
|
1608
|
+
templateColumns: v ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
1606
1609
|
autoFlow: "row dense",
|
|
1607
1610
|
gap: "24px",
|
|
1608
1611
|
alignItems: "start",
|
|
@@ -1612,7 +1615,7 @@ const Ao = D.div`
|
|
|
1612
1615
|
padding: "6px",
|
|
1613
1616
|
height: m ? "auto" : "484px",
|
|
1614
1617
|
children: [
|
|
1615
|
-
|
|
1618
|
+
x,
|
|
1616
1619
|
w && Pt({
|
|
1617
1620
|
type: "add",
|
|
1618
1621
|
index: o == null ? void 0 : o.length,
|
|
@@ -1621,7 +1624,7 @@ const Ao = D.div`
|
|
|
1621
1624
|
customMessageEmptyDecisions: r,
|
|
1622
1625
|
loading: s,
|
|
1623
1626
|
handleOpenModal: p,
|
|
1624
|
-
handleDelete:
|
|
1627
|
+
handleDelete: g,
|
|
1625
1628
|
textValues: i,
|
|
1626
1629
|
shouldRenderEmptyMessage: S,
|
|
1627
1630
|
terms: f
|
|
@@ -1639,7 +1642,7 @@ const Ao = D.div`
|
|
|
1639
1642
|
Fo,
|
|
1640
1643
|
{
|
|
1641
1644
|
decision: l || c,
|
|
1642
|
-
onSubmitEvent:
|
|
1645
|
+
onSubmitEvent: h,
|
|
1643
1646
|
textValues: i,
|
|
1644
1647
|
onCancel: () => d ? d() : () => {
|
|
1645
1648
|
}
|
|
@@ -1679,7 +1682,7 @@ const Ao = D.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 = N.div`
|
|
1683
1686
|
display: flex;
|
|
1684
1687
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
1685
1688
|
align-items: ${({ $alignItems: e }) => e};
|
|
@@ -1693,16 +1696,16 @@ const Ao = D.div`
|
|
|
1693
1696
|
padding: ${({ $padding: e }) => e};
|
|
1694
1697
|
background: ${({ $background: e, theme: t }) => {
|
|
1695
1698
|
var n, r, o, i;
|
|
1696
|
-
return e ? `${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N10) ||
|
|
1699
|
+
return e ? `${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N10) || A.palette.neutral.N10}` : `${((i = (o = t == null ? void 0 : t.palette) == null ? void 0 : o.neutral) == null ? void 0 : i.N0) || A.palette.neutral.N0}`;
|
|
1697
1700
|
}};
|
|
1698
1701
|
border: ${({ $border: e, theme: t }) => {
|
|
1699
1702
|
var n, r;
|
|
1700
|
-
return e ? `1px solid ${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N40) ||
|
|
1703
|
+
return e ? `1px solid ${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N40) || A.palette.neutral.N40}` : "none";
|
|
1701
1704
|
}};
|
|
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
|
+
`, pe = _.forwardRef(
|
|
1706
1709
|
(e, t) => {
|
|
1707
1710
|
const {
|
|
1708
1711
|
children: n,
|
|
@@ -1715,12 +1718,12 @@ const Ao = D.div`
|
|
|
1715
1718
|
width: s,
|
|
1716
1719
|
gap: p,
|
|
1717
1720
|
background: d,
|
|
1718
|
-
borderRadius:
|
|
1719
|
-
border:
|
|
1721
|
+
borderRadius: h,
|
|
1722
|
+
border: g,
|
|
1720
1723
|
margin: f = "0px",
|
|
1721
1724
|
padding: m = "0px",
|
|
1722
|
-
boxSizing:
|
|
1723
|
-
scroll:
|
|
1725
|
+
boxSizing: v,
|
|
1726
|
+
scroll: x = !1
|
|
1724
1727
|
} = e;
|
|
1725
1728
|
return /* @__PURE__ */ a(
|
|
1726
1729
|
Ho,
|
|
@@ -1735,29 +1738,29 @@ const Ao = D.div`
|
|
|
1735
1738
|
wrap: r,
|
|
1736
1739
|
$gap: p,
|
|
1737
1740
|
$background: d,
|
|
1738
|
-
$border:
|
|
1741
|
+
$border: g,
|
|
1739
1742
|
$margin: f,
|
|
1740
1743
|
$padding: m,
|
|
1741
|
-
$borderRadius:
|
|
1742
|
-
$boxSizing:
|
|
1743
|
-
$scroll:
|
|
1744
|
+
$borderRadius: h,
|
|
1745
|
+
$boxSizing: v,
|
|
1746
|
+
$scroll: x,
|
|
1744
1747
|
children: n
|
|
1745
1748
|
}
|
|
1746
1749
|
);
|
|
1747
1750
|
}
|
|
1748
1751
|
);
|
|
1749
|
-
|
|
1750
|
-
|
|
1752
|
+
pe.displayName = "BorderStack";
|
|
1753
|
+
N.div`
|
|
1751
1754
|
& > div {
|
|
1752
1755
|
border-radius: 8px;
|
|
1753
1756
|
border: 1px solid
|
|
1754
1757
|
${({ theme: e }) => {
|
|
1755
1758
|
var t, n;
|
|
1756
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
1759
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
1757
1760
|
}};
|
|
1758
1761
|
}
|
|
1759
1762
|
`;
|
|
1760
|
-
|
|
1763
|
+
N.div`
|
|
1761
1764
|
width: 100%;
|
|
1762
1765
|
height: 100%;
|
|
1763
1766
|
overflow-y: auto;
|
|
@@ -1776,19 +1779,19 @@ D.div`
|
|
|
1776
1779
|
border-radius: 8px;
|
|
1777
1780
|
}
|
|
1778
1781
|
`;
|
|
1779
|
-
const Bo =
|
|
1782
|
+
const Bo = N.div`
|
|
1780
1783
|
cursor: pointer;
|
|
1781
|
-
`, qo =
|
|
1784
|
+
`, qo = N.div`
|
|
1782
1785
|
& > div > div > div > p {
|
|
1783
1786
|
text-wrap-mode: nowrap;
|
|
1784
1787
|
}
|
|
1785
|
-
`, Wo =
|
|
1788
|
+
`, Wo = N.div`
|
|
1786
1789
|
& > div {
|
|
1787
1790
|
justify-content: auto;
|
|
1788
1791
|
gap: 8px;
|
|
1789
1792
|
}
|
|
1790
1793
|
`;
|
|
1791
|
-
var
|
|
1794
|
+
var oe = /* @__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))(oe || {});
|
|
1792
1795
|
const Yo = (e) => {
|
|
1793
1796
|
const {
|
|
1794
1797
|
controls: t,
|
|
@@ -1802,25 +1805,25 @@ const Yo = (e) => {
|
|
|
1802
1805
|
onToggle: s,
|
|
1803
1806
|
hasEffectiveFrom: p,
|
|
1804
1807
|
hasValidUntil: d,
|
|
1805
|
-
effectiveFromRenderer:
|
|
1806
|
-
validUntilRenderer:
|
|
1808
|
+
effectiveFromRenderer: h,
|
|
1809
|
+
validUntilRenderer: g,
|
|
1807
1810
|
onEdit: f,
|
|
1808
1811
|
onDelete: m,
|
|
1809
|
-
tabs:
|
|
1810
|
-
selectedTab:
|
|
1812
|
+
tabs: v,
|
|
1813
|
+
selectedTab: x,
|
|
1811
1814
|
onTabChange: w,
|
|
1812
1815
|
currentConditions: S,
|
|
1813
|
-
hasMultipleGroups:
|
|
1816
|
+
hasMultipleGroups: D,
|
|
1814
1817
|
editionMode: C = "versioned"
|
|
1815
1818
|
} = e;
|
|
1816
|
-
return i ? /* @__PURE__ */
|
|
1817
|
-
/* @__PURE__ */ a(Bo, { onClick: s, children: /* @__PURE__ */
|
|
1818
|
-
|
|
1819
|
+
return i ? /* @__PURE__ */ b(T, { direction: "column", gap: "16px", children: [
|
|
1820
|
+
/* @__PURE__ */ a(Bo, { onClick: s, children: /* @__PURE__ */ b(
|
|
1821
|
+
T,
|
|
1819
1822
|
{
|
|
1820
1823
|
alignItems: "start",
|
|
1821
1824
|
justifyContent: "space-between",
|
|
1822
1825
|
children: [
|
|
1823
|
-
/* @__PURE__ */
|
|
1826
|
+
/* @__PURE__ */ b(T, { gap: "12px", children: [
|
|
1824
1827
|
/* @__PURE__ */ a(qo, { children: /* @__PURE__ */ a(
|
|
1825
1828
|
He,
|
|
1826
1829
|
{
|
|
@@ -1842,8 +1845,8 @@ const Yo = (e) => {
|
|
|
1842
1845
|
}
|
|
1843
1846
|
) })
|
|
1844
1847
|
] }),
|
|
1845
|
-
/* @__PURE__ */
|
|
1846
|
-
t && /* @__PURE__ */
|
|
1848
|
+
/* @__PURE__ */ b(T, { gap: "12px", children: [
|
|
1849
|
+
t && /* @__PURE__ */ b(V, { children: [
|
|
1847
1850
|
/* @__PURE__ */ a(
|
|
1848
1851
|
B,
|
|
1849
1852
|
{
|
|
@@ -1851,8 +1854,8 @@ const Yo = (e) => {
|
|
|
1851
1854
|
icon: /* @__PURE__ */ a(lr, {}),
|
|
1852
1855
|
size: "24px",
|
|
1853
1856
|
cursorHover: !0,
|
|
1854
|
-
onClick: (
|
|
1855
|
-
|
|
1857
|
+
onClick: (k) => {
|
|
1858
|
+
k.stopPropagation(), f == null || f();
|
|
1856
1859
|
}
|
|
1857
1860
|
}
|
|
1858
1861
|
),
|
|
@@ -1863,8 +1866,8 @@ const Yo = (e) => {
|
|
|
1863
1866
|
icon: /* @__PURE__ */ a(yt, {}),
|
|
1864
1867
|
size: "24px",
|
|
1865
1868
|
cursorHover: !0,
|
|
1866
|
-
onClick: (
|
|
1867
|
-
|
|
1869
|
+
onClick: (k) => {
|
|
1870
|
+
k.stopPropagation(), m == null || m();
|
|
1868
1871
|
}
|
|
1869
1872
|
}
|
|
1870
1873
|
)
|
|
@@ -1883,13 +1886,13 @@ const Yo = (e) => {
|
|
|
1883
1886
|
},
|
|
1884
1887
|
r.ruleName
|
|
1885
1888
|
) }),
|
|
1886
|
-
l && /* @__PURE__ */
|
|
1889
|
+
l && /* @__PURE__ */ b(V, { children: [
|
|
1887
1890
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
1888
|
-
|
|
1891
|
+
D ? /* @__PURE__ */ a(
|
|
1889
1892
|
Vn,
|
|
1890
1893
|
{
|
|
1891
|
-
tabs:
|
|
1892
|
-
selectedTab:
|
|
1894
|
+
tabs: v,
|
|
1895
|
+
selectedTab: x,
|
|
1893
1896
|
onChange: w
|
|
1894
1897
|
}
|
|
1895
1898
|
) : /* @__PURE__ */ a(
|
|
@@ -1904,15 +1907,15 @@ const Yo = (e) => {
|
|
|
1904
1907
|
children: c.factsThatConditionIt
|
|
1905
1908
|
}
|
|
1906
1909
|
),
|
|
1907
|
-
/* @__PURE__ */ a(
|
|
1908
|
-
|
|
1910
|
+
/* @__PURE__ */ a(T, { direction: "column", gap: "20px", children: /* @__PURE__ */ b(
|
|
1911
|
+
T,
|
|
1909
1912
|
{
|
|
1910
1913
|
direction: "column",
|
|
1911
1914
|
gap: "8px",
|
|
1912
1915
|
justifyContent: n,
|
|
1913
1916
|
children: [
|
|
1914
|
-
S.map((
|
|
1915
|
-
|
|
1917
|
+
S.map((k) => /* @__PURE__ */ a(
|
|
1918
|
+
pe,
|
|
1916
1919
|
{
|
|
1917
1920
|
direction: "column",
|
|
1918
1921
|
padding: "6px 12px",
|
|
@@ -1922,21 +1925,21 @@ const Yo = (e) => {
|
|
|
1922
1925
|
st,
|
|
1923
1926
|
{
|
|
1924
1927
|
element: {
|
|
1925
|
-
...
|
|
1926
|
-
value:
|
|
1927
|
-
howToSetTheCondition:
|
|
1928
|
+
...k,
|
|
1929
|
+
value: k.value,
|
|
1930
|
+
howToSetTheCondition: k.howToSetTheCondition === oe.LIST_OF_VALUES ? oe.LIST_OF_VALUES_MULTI : k.howToSetTheCondition
|
|
1928
1931
|
},
|
|
1929
1932
|
valueData: Xe(
|
|
1930
|
-
|
|
1933
|
+
k
|
|
1931
1934
|
),
|
|
1932
1935
|
editionMode: C
|
|
1933
1936
|
}
|
|
1934
1937
|
)
|
|
1935
1938
|
},
|
|
1936
|
-
|
|
1939
|
+
k.conditionName
|
|
1937
1940
|
)),
|
|
1938
|
-
p &&
|
|
1939
|
-
|
|
1941
|
+
p && h && /* @__PURE__ */ a(
|
|
1942
|
+
pe,
|
|
1940
1943
|
{
|
|
1941
1944
|
direction: "column",
|
|
1942
1945
|
padding: "6px 12px",
|
|
@@ -1945,16 +1948,16 @@ const Yo = (e) => {
|
|
|
1945
1948
|
children: /* @__PURE__ */ a(
|
|
1946
1949
|
st,
|
|
1947
1950
|
{
|
|
1948
|
-
element:
|
|
1949
|
-
valueData:
|
|
1951
|
+
element: h.element,
|
|
1952
|
+
valueData: h.valueData,
|
|
1950
1953
|
editionMode: C
|
|
1951
1954
|
},
|
|
1952
1955
|
"effectiveFrom"
|
|
1953
1956
|
)
|
|
1954
1957
|
}
|
|
1955
1958
|
),
|
|
1956
|
-
d &&
|
|
1957
|
-
|
|
1959
|
+
d && g && /* @__PURE__ */ a(
|
|
1960
|
+
pe,
|
|
1958
1961
|
{
|
|
1959
1962
|
direction: "column",
|
|
1960
1963
|
padding: "6px 12px",
|
|
@@ -1963,8 +1966,8 @@ const Yo = (e) => {
|
|
|
1963
1966
|
children: /* @__PURE__ */ a(
|
|
1964
1967
|
st,
|
|
1965
1968
|
{
|
|
1966
|
-
element:
|
|
1967
|
-
valueData:
|
|
1969
|
+
element: g.element,
|
|
1970
|
+
valueData: g.valueData,
|
|
1968
1971
|
editionMode: C
|
|
1969
1972
|
},
|
|
1970
1973
|
"validUntil"
|
|
@@ -1975,42 +1978,42 @@ const Yo = (e) => {
|
|
|
1975
1978
|
}
|
|
1976
1979
|
) })
|
|
1977
1980
|
] })
|
|
1978
|
-
] }) : /* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */ a(
|
|
1981
|
-
/* @__PURE__ */ a(
|
|
1981
|
+
] }) : /* @__PURE__ */ b(T, { justifyContent: "space-between", children: [
|
|
1982
|
+
/* @__PURE__ */ b(T, { alignItems: "center", gap: "8px", children: [
|
|
1983
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "150px" }),
|
|
1984
|
+
/* @__PURE__ */ a(ie, { animated: !0, width: "70px" })
|
|
1982
1985
|
] }),
|
|
1983
|
-
/* @__PURE__ */
|
|
1984
|
-
/* @__PURE__ */ a(
|
|
1986
|
+
/* @__PURE__ */ b(T, { alignItems: "center", gap: "8px", children: [
|
|
1987
|
+
/* @__PURE__ */ a(ie, { 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), gt = (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
|
+
}, xe = (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, gt(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
|
+
gt(
|
|
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, gt(n)])
|
|
2014
2017
|
) : {};
|
|
2015
2018
|
}, Bn = (e, t) => Object.fromEntries(
|
|
2016
2019
|
Object.entries(e).map(([n, r]) => [n, r.filter(t)])
|
|
@@ -2055,9 +2058,9 @@ const Yo = (e) => {
|
|
|
2055
2058
|
"Dic"
|
|
2056
2059
|
], n = typeof e == "string" && /^(\d{4})-(\d{2})-(\d{2})/.exec(e);
|
|
2057
2060
|
if (n) {
|
|
2058
|
-
const [, s, p, d] = n,
|
|
2059
|
-
if (isFinite(
|
|
2060
|
-
return `${String(f).padStart(2, "0")}/${t[
|
|
2061
|
+
const [, s, p, d] = n, h = Number(s), g = Number(p) - 1, f = Number(d);
|
|
2062
|
+
if (isFinite(h) && g >= 0 && g < 12 && isFinite(f))
|
|
2063
|
+
return `${String(f).padStart(2, "0")}/${t[g]}/${h}`;
|
|
2061
2064
|
}
|
|
2062
2065
|
const r = e instanceof Date ? e : typeof e == "number" ? new Date(e) : new Date(e);
|
|
2063
2066
|
if (isNaN(r.getTime())) return "";
|
|
@@ -2096,7 +2099,7 @@ const Yo = (e) => {
|
|
|
2096
2099
|
onDelete: s,
|
|
2097
2100
|
controls: p = !0,
|
|
2098
2101
|
editionMode: d = "versioned"
|
|
2099
|
-
} = e,
|
|
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
2105
|
value: dt(n.effectiveFrom),
|
|
@@ -2109,7 +2112,7 @@ const Yo = (e) => {
|
|
|
2109
2112
|
howToSetTheDecision: P.EQUAL,
|
|
2110
2113
|
decisionDataType: H.DATE
|
|
2111
2114
|
})
|
|
2112
|
-
} : null, m =
|
|
2115
|
+
} : null, m = g ? {
|
|
2113
2116
|
element: {
|
|
2114
2117
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2115
2118
|
value: dt(n.validUntil),
|
|
@@ -2122,24 +2125,24 @@ const Yo = (e) => {
|
|
|
2122
2125
|
howToSetTheDecision: P.EQUAL,
|
|
2123
2126
|
decisionDataType: H.DATE
|
|
2124
2127
|
})
|
|
2125
|
-
} : null,
|
|
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)), S = n ? {
|
|
2126
2129
|
labelName: t && n.labelName || "",
|
|
2127
2130
|
decisionDataType: n.decisionDataType || H.ALPHABETICAL,
|
|
2128
2131
|
value: w,
|
|
2129
|
-
howToSetTheDecision: n.i18nValue ? P.EQUAL :
|
|
2132
|
+
howToSetTheDecision: n.i18nValue ? P.EQUAL : v,
|
|
2130
2133
|
validUntil: n.validUntil
|
|
2131
|
-
} : null,
|
|
2132
|
-
() => n ?
|
|
2134
|
+
} : null, D = _.useMemo(
|
|
2135
|
+
() => n ? xe(n) : {},
|
|
2133
2136
|
[n]
|
|
2134
|
-
), C = (($t = (At = n == null ? void 0 : n.conditionGroups) == null ? void 0 : At.map((M) => M == null ? void 0 : M.ConditionGroupId)) == null ? void 0 : $t.filter(Boolean)) || Object.keys(
|
|
2135
|
-
const M = {}, $ =
|
|
2136
|
-
M["group-primary"] =
|
|
2137
|
+
), C = (($t = (At = n == null ? void 0 : n.conditionGroups) == null ? void 0 : At.map((M) => M == null ? void 0 : M.ConditionGroupId)) == null ? void 0 : $t.filter(Boolean)) || Object.keys(D), k = C[0] || "group-primary", L = _.useMemo(() => {
|
|
2138
|
+
const M = {}, $ = D[k] || [], O = D["group-primary"] || [];
|
|
2139
|
+
M["group-primary"] = k === "group-primary" ? O : [...$, ...O];
|
|
2137
2140
|
for (const E of C)
|
|
2138
|
-
!E || E ===
|
|
2139
|
-
for (const E of Object.keys(
|
|
2140
|
-
E === "group-primary" || E ===
|
|
2141
|
+
!E || E === k || E !== "group-primary" && D[E] && (M[E] = D[E]);
|
|
2142
|
+
for (const E of Object.keys(D))
|
|
2143
|
+
E === "group-primary" || E === k || E in M || (M[E] = D[E]);
|
|
2141
2144
|
return M;
|
|
2142
|
-
}, [
|
|
2145
|
+
}, [D, k, C]), F = _.useMemo(() => {
|
|
2143
2146
|
const M = {};
|
|
2144
2147
|
return Object.keys(L).forEach(($) => {
|
|
2145
2148
|
const O = L[$];
|
|
@@ -2157,22 +2160,22 @@ const Yo = (e) => {
|
|
|
2157
2160
|
};
|
|
2158
2161
|
}) : M[$] = O;
|
|
2159
2162
|
}), M;
|
|
2160
|
-
}, [L]),
|
|
2163
|
+
}, [L]), se = Bn(
|
|
2161
2164
|
F,
|
|
2162
2165
|
(M) => !M.hidden
|
|
2163
|
-
),
|
|
2164
|
-
const M = Object.entries(
|
|
2166
|
+
), ee = _.useMemo(() => {
|
|
2167
|
+
const M = Object.entries(se).map(
|
|
2165
2168
|
([O, E]) => [O, E.filter(Jo)]
|
|
2166
2169
|
), $ = {};
|
|
2167
2170
|
for (const [O, E] of M)
|
|
2168
2171
|
E.length > 0 && ($[O] = E);
|
|
2169
2172
|
return $;
|
|
2170
|
-
}, [
|
|
2171
|
-
const M = Object.keys(
|
|
2173
|
+
}, [se]), de = _.useMemo(() => {
|
|
2174
|
+
const M = Object.keys(ee);
|
|
2172
2175
|
return M.includes("group-primary") ? ["group-primary", ...M.filter(($) => $ !== "group-primary")] : M;
|
|
2173
|
-
}, [
|
|
2176
|
+
}, [ee]), Ie = {};
|
|
2174
2177
|
let Dt = 1;
|
|
2175
|
-
const nt =
|
|
2178
|
+
const nt = de.map((M) => {
|
|
2176
2179
|
const $ = M === "group-primary" ? "mainCondition" : `alternateCondition-${Dt++}`;
|
|
2177
2180
|
return Ie[$] = M, {
|
|
2178
2181
|
id: $,
|
|
@@ -2181,7 +2184,7 @@ const Yo = (e) => {
|
|
|
2181
2184
|
};
|
|
2182
2185
|
}), [_e, Nt] = _.useState(
|
|
2183
2186
|
((Pe = nt[0]) == null ? void 0 : Pe.id) ?? "mainCondition"
|
|
2184
|
-
), Et = (M) => Nt(M), rt = Ie[_e] ??
|
|
2187
|
+
), Et = (M) => Nt(M), rt = Ie[_e] ?? de[0] ?? "group-primary", ot = ee[rt] ?? [], it = de.length > 1, kt = Array.from({ length: 5 }), Ve = !!(!r && n && o && S), dn = ot.length < 2 ? "start" : "space-between", cn = `N° ${String((i ?? 0) + 1).padStart(2, "0")}`;
|
|
2185
2188
|
return /* @__PURE__ */ a(
|
|
2186
2189
|
Yo,
|
|
2187
2190
|
{
|
|
@@ -2195,8 +2198,8 @@ const Yo = (e) => {
|
|
|
2195
2198
|
tagLabel: cn,
|
|
2196
2199
|
isOpen: c,
|
|
2197
2200
|
onToggle: u,
|
|
2198
|
-
hasEffectiveFrom:
|
|
2199
|
-
hasValidUntil:
|
|
2201
|
+
hasEffectiveFrom: h,
|
|
2202
|
+
hasValidUntil: g,
|
|
2200
2203
|
effectiveFromRenderer: f,
|
|
2201
2204
|
validUntilRenderer: m,
|
|
2202
2205
|
onEdit: l,
|
|
@@ -2219,12 +2222,12 @@ const Yo = (e) => {
|
|
|
2219
2222
|
transform: translateY(0);
|
|
2220
2223
|
}
|
|
2221
2224
|
`;
|
|
2222
|
-
|
|
2225
|
+
N.div`
|
|
2223
2226
|
border-radius: 8px;
|
|
2224
2227
|
border: 1px solid
|
|
2225
2228
|
${({ theme: e }) => {
|
|
2226
2229
|
var t, n;
|
|
2227
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
2230
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
2228
2231
|
}};
|
|
2229
2232
|
box-sizing: border-box;
|
|
2230
2233
|
display: flex;
|
|
@@ -2233,37 +2236,37 @@ D.div`
|
|
|
2233
2236
|
height: 100%;
|
|
2234
2237
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
2235
2238
|
`;
|
|
2236
|
-
|
|
2239
|
+
N.div`
|
|
2237
2240
|
& > div {
|
|
2238
2241
|
border-radius: 8px;
|
|
2239
2242
|
border: 1px solid
|
|
2240
2243
|
${({ theme: e }) => {
|
|
2241
2244
|
var t, n;
|
|
2242
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
2245
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
2243
2246
|
}};
|
|
2244
2247
|
}
|
|
2245
2248
|
`;
|
|
2246
|
-
const ei =
|
|
2249
|
+
const ei = N.div`
|
|
2247
2250
|
& > div {
|
|
2248
2251
|
box-shadow: 0px 2px 3px 0px
|
|
2249
2252
|
${({ theme: e }) => {
|
|
2250
2253
|
var t, n;
|
|
2251
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutralAlpha) == null ? void 0 : n.N30A) ||
|
|
2254
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutralAlpha) == null ? void 0 : n.N30A) || A.palette.neutralAlpha.N30A;
|
|
2252
2255
|
}};
|
|
2253
2256
|
cursor: pointer;
|
|
2254
2257
|
}
|
|
2255
|
-
`, ti =
|
|
2258
|
+
`, ti = N.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 = N.div`
|
|
2262
2265
|
& > div > div {
|
|
2263
2266
|
border-radius: 8px;
|
|
2264
2267
|
box-sizing: border-box;
|
|
2265
2268
|
}
|
|
2266
|
-
`, ri =
|
|
2269
|
+
`, ri = N.div`
|
|
2267
2270
|
& > div {
|
|
2268
2271
|
width: 100%;
|
|
2269
2272
|
height: 100%;
|
|
@@ -2310,7 +2313,7 @@ const ei = D.div`
|
|
|
2310
2313
|
onToggle: s,
|
|
2311
2314
|
editionMode: p
|
|
2312
2315
|
} = e;
|
|
2313
|
-
return n ? /* @__PURE__ */ a(tt, { children: /* @__PURE__ */ a(
|
|
2316
|
+
return n ? /* @__PURE__ */ a(tt, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ a(
|
|
2314
2317
|
Hn,
|
|
2315
2318
|
{
|
|
2316
2319
|
id: n.decisionId,
|
|
@@ -2345,7 +2348,7 @@ const ei = D.div`
|
|
|
2345
2348
|
{
|
|
2346
2349
|
onClick: () => r ? r() : null,
|
|
2347
2350
|
children: /* @__PURE__ */ a(
|
|
2348
|
-
|
|
2351
|
+
pe,
|
|
2349
2352
|
{
|
|
2350
2353
|
direction: "column",
|
|
2351
2354
|
gap: "4px",
|
|
@@ -2353,8 +2356,8 @@ const ei = D.div`
|
|
|
2353
2356
|
height: "100%",
|
|
2354
2357
|
background: !0,
|
|
2355
2358
|
borderRadius: "8px",
|
|
2356
|
-
children: /* @__PURE__ */
|
|
2357
|
-
|
|
2359
|
+
children: /* @__PURE__ */ b(
|
|
2360
|
+
T,
|
|
2358
2361
|
{
|
|
2359
2362
|
justifyContent: "space-between",
|
|
2360
2363
|
alignItems: "center",
|
|
@@ -2397,7 +2400,7 @@ const ei = D.div`
|
|
|
2397
2400
|
isOpenFor: s,
|
|
2398
2401
|
toggleAt: p,
|
|
2399
2402
|
editionMode: d
|
|
2400
|
-
} = e,
|
|
2403
|
+
} = e, h = i ? Array.from({ length: 3 }).map(
|
|
2401
2404
|
(f, m) => zt({
|
|
2402
2405
|
type: "loading",
|
|
2403
2406
|
index: m,
|
|
@@ -2425,18 +2428,18 @@ const ei = D.div`
|
|
|
2425
2428
|
onToggle: p ? () => p(m) : void 0,
|
|
2426
2429
|
editionMode: d
|
|
2427
2430
|
})
|
|
2428
|
-
),
|
|
2429
|
-
return { renderedCards:
|
|
2430
|
-
}, di =
|
|
2431
|
+
), g = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !i && n;
|
|
2432
|
+
return { renderedCards: h, shouldRenderAddCard: g };
|
|
2433
|
+
}, di = N.div`
|
|
2431
2434
|
position: relative;
|
|
2432
2435
|
& > div {
|
|
2433
2436
|
padding: 24px 16px;
|
|
2434
2437
|
place-items: unset;
|
|
2435
2438
|
}
|
|
2436
|
-
`, ci =
|
|
2439
|
+
`, ci = N.div`
|
|
2437
2440
|
background-color: ${({ theme: e }) => {
|
|
2438
2441
|
var t, n;
|
|
2439
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) ||
|
|
2442
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N0) || A.palette.neutral.N0;
|
|
2440
2443
|
}};
|
|
2441
2444
|
max-height: 90vh;
|
|
2442
2445
|
width: 100%;
|
|
@@ -2471,12 +2474,12 @@ const ei = D.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 =
|
|
2477
|
+
const u = ae("(max-width: 400px)");
|
|
2475
2478
|
return en(
|
|
2476
|
-
/* @__PURE__ */ a(di, { smallScreen: u, children: /* @__PURE__ */ a(Jt, { children: /* @__PURE__ */ a(ci, { children: /* @__PURE__ */
|
|
2477
|
-
/* @__PURE__ */
|
|
2478
|
-
/* @__PURE__ */
|
|
2479
|
-
/* @__PURE__ */
|
|
2479
|
+
/* @__PURE__ */ a(di, { smallScreen: u, children: /* @__PURE__ */ a(Jt, { children: /* @__PURE__ */ a(ci, { children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
2480
|
+
/* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
2481
|
+
/* @__PURE__ */ b(T, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2482
|
+
/* @__PURE__ */ b(T, { direction: "column", gap: "8px", children: [
|
|
2480
2483
|
/* @__PURE__ */ a(
|
|
2481
2484
|
R,
|
|
2482
2485
|
{
|
|
@@ -2504,8 +2507,8 @@ const ei = D.div`
|
|
|
2504
2507
|
(t) => t != null && t.trim() !== ""
|
|
2505
2508
|
),
|
|
2506
2509
|
value: e
|
|
2507
|
-
}),
|
|
2508
|
-
schema:
|
|
2510
|
+
}), hi = (e) => ({
|
|
2511
|
+
schema: we().test(
|
|
2509
2512
|
"isArrayOrString",
|
|
2510
2513
|
"Por favor selecciona una opcion",
|
|
2511
2514
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -2513,8 +2516,8 @@ const ei = D.div`
|
|
|
2513
2516
|
) : typeof t == "string"
|
|
2514
2517
|
),
|
|
2515
2518
|
value: e
|
|
2516
|
-
}),
|
|
2517
|
-
schema:
|
|
2519
|
+
}), gi = (e) => ({
|
|
2520
|
+
schema: we().test(
|
|
2518
2521
|
"isArrayOrString",
|
|
2519
2522
|
"Por favor selecciona al menos una opcion",
|
|
2520
2523
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -2528,12 +2531,12 @@ const ei = D.div`
|
|
|
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:
|
|
2534
|
+
schema: Q({
|
|
2535
|
+
from: ge().transform(yn).typeError(ct).required(ct).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:
|
|
2539
|
+
to: ge().transform(yn).typeError(ct).required(ct).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
|
})
|
|
@@ -2543,7 +2546,7 @@ const ei = D.div`
|
|
|
2543
2546
|
}, Tn = (e) => e && typeof e == "object" && !Array.isArray(e) && "value" in e && e.value !== "" && e.value != null, Ot = (e, t) => {
|
|
2544
2547
|
if (Tn(e))
|
|
2545
2548
|
return {
|
|
2546
|
-
schema:
|
|
2549
|
+
schema: we().test(
|
|
2547
2550
|
"required-option",
|
|
2548
2551
|
"Por favor selecciona una opcion",
|
|
2549
2552
|
(n) => Tn(n)
|
|
@@ -2553,13 +2556,13 @@ const ei = D.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:
|
|
2557
|
-
from:
|
|
2558
|
-
to:
|
|
2559
|
+
schema: Q({
|
|
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"),
|
|
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:
|
|
2565
|
+
schema: Q({
|
|
2563
2566
|
from: be().required("Requerido"),
|
|
2564
2567
|
to: be().required("Requerido")
|
|
2565
2568
|
}),
|
|
@@ -2567,15 +2570,15 @@ const ei = D.div`
|
|
|
2567
2570
|
};
|
|
2568
2571
|
}
|
|
2569
2572
|
return t === H.PERCENTAGE ? {
|
|
2570
|
-
schema:
|
|
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: we().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
|
-
[I.LIST_OF_VALUES]:
|
|
2578
|
-
[I.LIST_OF_VALUES_MULTI]:
|
|
2580
|
+
[I.LIST_OF_VALUES]: hi,
|
|
2581
|
+
[I.LIST_OF_VALUES_MULTI]: gi,
|
|
2579
2582
|
[I.RANGE]: bi,
|
|
2580
2583
|
[I.GREATER_THAN]: Ot,
|
|
2581
2584
|
[I.LESS_THAN]: Ot,
|
|
@@ -2583,7 +2586,7 @@ const ei = D.div`
|
|
|
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
|
-
}, Ht =
|
|
2589
|
+
}, Ht = we().test(
|
|
2587
2590
|
"required-option",
|
|
2588
2591
|
"Por favor selecciona una opcion",
|
|
2589
2592
|
(e) => {
|
|
@@ -2594,7 +2597,7 @@ const ei = D.div`
|
|
|
2594
2597
|
}
|
|
2595
2598
|
return typeof e == "string" ? e.trim().length > 0 : typeof e == "number" ? !Number.isNaN(e) : !1;
|
|
2596
2599
|
}
|
|
2597
|
-
), yi =
|
|
2600
|
+
), yi = Q({
|
|
2598
2601
|
from: Ht,
|
|
2599
2602
|
to: Ht
|
|
2600
2603
|
}), Bt = (e) => e && typeof e == "object" && "value" in e ? e.value : e, Sn = (e) => {
|
|
@@ -2606,30 +2609,30 @@ function Ti({
|
|
|
2606
2609
|
onSubmitEvent: t,
|
|
2607
2610
|
textValues: n
|
|
2608
2611
|
}) {
|
|
2609
|
-
const r =
|
|
2610
|
-
([
|
|
2612
|
+
const r = xe(e) || {}, o = () => Object.entries(r).flatMap(
|
|
2613
|
+
([h, g]) => g.map((f) => ({ group: h, cond: f }))
|
|
2611
2614
|
), i = Object.fromEntries(
|
|
2612
|
-
Object.entries(r).map(([
|
|
2615
|
+
Object.entries(r).map(([h, g]) => {
|
|
2613
2616
|
const f = {};
|
|
2614
|
-
return
|
|
2615
|
-
const
|
|
2616
|
-
f[
|
|
2617
|
+
return g.forEach((m) => {
|
|
2618
|
+
const v = m.conditionName, x = m.value !== void 0 && m.value !== null && m.value !== "", w = m.howToSetTheCondition === oe.LIST_OF_VALUES_MULTI ? [] : "";
|
|
2619
|
+
f[v] = {
|
|
2617
2620
|
...m,
|
|
2618
|
-
value:
|
|
2621
|
+
value: x ? m.value : w
|
|
2619
2622
|
};
|
|
2620
|
-
}), [
|
|
2623
|
+
}), [h, f];
|
|
2621
2624
|
})
|
|
2622
2625
|
), c = Object.entries(r).map(
|
|
2623
|
-
([
|
|
2624
|
-
const f = i[
|
|
2625
|
-
const
|
|
2626
|
+
([h, g]) => {
|
|
2627
|
+
const f = i[h] || {}, m = g.map((v) => {
|
|
2628
|
+
const x = v.conditionName, w = f[x], S = w && typeof w == "object" && "value" in w ? w.value : v.value;
|
|
2626
2629
|
return {
|
|
2627
|
-
...
|
|
2630
|
+
...v,
|
|
2628
2631
|
value: S
|
|
2629
2632
|
};
|
|
2630
2633
|
});
|
|
2631
2634
|
return {
|
|
2632
|
-
ConditionGroupId:
|
|
2635
|
+
ConditionGroupId: h,
|
|
2633
2636
|
conditionsThatEstablishesTheDecision: m
|
|
2634
2637
|
};
|
|
2635
2638
|
}
|
|
@@ -2650,38 +2653,41 @@ function Ti({
|
|
|
2650
2653
|
const s = {
|
|
2651
2654
|
ruleName: be().required("El nombre de la decision es requerido"),
|
|
2652
2655
|
value: Qe(() => {
|
|
2653
|
-
const
|
|
2654
|
-
return
|
|
2656
|
+
const h = l.values.howToSetTheDecision;
|
|
2657
|
+
return h === oe.RANGE && wn(e) ? yi : wn(e) ? Ht : xn(h)(
|
|
2655
2658
|
l.values.value,
|
|
2656
2659
|
l.values.decisionDataType
|
|
2657
2660
|
).schema;
|
|
2658
2661
|
}),
|
|
2659
|
-
conditionsThatEstablishesTheDecision: Qe((
|
|
2660
|
-
const f =
|
|
2661
|
-
if ((
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2662
|
+
conditionsThatEstablishesTheDecision: Qe((h, { parent: g }) => {
|
|
2663
|
+
const f = xe(e) || {};
|
|
2664
|
+
if (!(Object.keys(f).length > 0))
|
|
2665
|
+
return Q().shape({});
|
|
2666
|
+
const v = g && g.conditionsThatEstablishesTheDecision && typeof g.conditionsThatEstablishesTheDecision == "object" && Object.keys(g.conditionsThatEstablishesTheDecision).length > 0;
|
|
2667
|
+
if ((g == null ? void 0 : g.toggleNone) && v) return Q().shape({});
|
|
2668
|
+
const w = {};
|
|
2669
|
+
for (const [S, D] of Object.entries(f)) {
|
|
2670
|
+
const C = {};
|
|
2671
|
+
D.forEach((k) => {
|
|
2672
|
+
var se, ee;
|
|
2673
|
+
const L = (ee = (se = g == null ? void 0 : g.conditionsThatEstablishesTheDecision) == null ? void 0 : se[S]) == null ? void 0 : ee[k.conditionName], F = Bt(L);
|
|
2674
|
+
if (F !== void 0) {
|
|
2675
|
+
const de = xn(
|
|
2676
|
+
k.howToSetTheCondition
|
|
2671
2677
|
);
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2678
|
+
C[k.conditionName] = de(
|
|
2679
|
+
F,
|
|
2680
|
+
k.conditionDataType
|
|
2675
2681
|
).schema;
|
|
2676
2682
|
}
|
|
2677
|
-
}),
|
|
2683
|
+
}), w[S] = Q(C);
|
|
2678
2684
|
}
|
|
2679
|
-
return
|
|
2685
|
+
return Q(w).test(
|
|
2680
2686
|
"at-least-one-condition",
|
|
2681
2687
|
"Debe existir al menos una condición para que la decisión se valide correctamente.",
|
|
2682
|
-
(
|
|
2683
|
-
(
|
|
2684
|
-
(
|
|
2688
|
+
(S) => !S || typeof S != "object" ? !1 : Object.values(S).some(
|
|
2689
|
+
(D) => D && typeof D == "object" && Object.values(D).some(
|
|
2690
|
+
(C) => Sn(C)
|
|
2685
2691
|
)
|
|
2686
2692
|
)
|
|
2687
2693
|
);
|
|
@@ -2691,57 +2697,57 @@ function Ti({
|
|
|
2691
2697
|
"Se requiere la fecha de vigencia desde"
|
|
2692
2698
|
), s.validUntil = Le().when(
|
|
2693
2699
|
"checkClosed",
|
|
2694
|
-
(
|
|
2700
|
+
(h, g, { parent: f }) => (f == null ? void 0 : f.checkClosed) ? g.required("Se requiere la fecha de vigencia hasta").test(
|
|
2695
2701
|
"is-after-startDate",
|
|
2696
2702
|
"La fecha válida para la vigencia hasta debe ser mayor o igual a la fecha de inicio",
|
|
2697
|
-
function(
|
|
2698
|
-
const
|
|
2699
|
-
return !
|
|
2703
|
+
function(v) {
|
|
2704
|
+
const x = this.parent.effectiveFrom;
|
|
2705
|
+
return !x || !v ? !0 : new Date(v) >= new Date(x);
|
|
2700
2706
|
}
|
|
2701
|
-
) :
|
|
2707
|
+
) : g.notRequired()
|
|
2702
2708
|
));
|
|
2703
|
-
const p =
|
|
2709
|
+
const p = Q(s);
|
|
2704
2710
|
return l = tn({
|
|
2705
2711
|
initialValues: u,
|
|
2706
2712
|
validationSchema: p,
|
|
2707
2713
|
validateOnBlur: !0,
|
|
2708
|
-
onSubmit: (
|
|
2709
|
-
const
|
|
2710
|
-
Object.entries(r).map(([m,
|
|
2714
|
+
onSubmit: (h) => {
|
|
2715
|
+
const g = Object.fromEntries(
|
|
2716
|
+
Object.entries(r).map(([m, v]) => {
|
|
2711
2717
|
var S;
|
|
2712
|
-
const
|
|
2713
|
-
const C =
|
|
2718
|
+
const x = ((S = h.conditionsThatEstablishesTheDecision) == null ? void 0 : S[m]) || {}, w = v.map((D) => {
|
|
2719
|
+
const C = D.conditionName, k = x[C], L = Bt(k);
|
|
2714
2720
|
return {
|
|
2715
|
-
...
|
|
2721
|
+
...D,
|
|
2716
2722
|
value: L
|
|
2717
2723
|
};
|
|
2718
|
-
}).filter((
|
|
2724
|
+
}).filter((D) => Sn(D.value));
|
|
2719
2725
|
return [m, w];
|
|
2720
2726
|
})
|
|
2721
2727
|
), f = {
|
|
2722
2728
|
...e,
|
|
2723
|
-
ruleName:
|
|
2724
|
-
decisionDataType:
|
|
2725
|
-
howToSetTheDecision:
|
|
2726
|
-
value:
|
|
2727
|
-
effectiveFrom:
|
|
2728
|
-
validUntil:
|
|
2729
|
-
conditionsThatEstablishesTheDecision:
|
|
2729
|
+
ruleName: h.ruleName,
|
|
2730
|
+
decisionDataType: h.decisionDataType,
|
|
2731
|
+
howToSetTheDecision: h.howToSetTheDecision,
|
|
2732
|
+
value: h.value,
|
|
2733
|
+
effectiveFrom: h.effectiveFrom,
|
|
2734
|
+
validUntil: h.validUntil,
|
|
2735
|
+
conditionsThatEstablishesTheDecision: g
|
|
2730
2736
|
};
|
|
2731
2737
|
t(f);
|
|
2732
2738
|
}
|
|
2733
|
-
}), { formik: l, handleToggleNoneChange: (
|
|
2734
|
-
l.setFieldValue("toggleNone",
|
|
2735
|
-
const m = `conditionsThatEstablishesTheDecision.${
|
|
2736
|
-
if (
|
|
2739
|
+
}), { formik: l, handleToggleNoneChange: (h) => {
|
|
2740
|
+
l.setFieldValue("toggleNone", h), o().forEach(({ group: g, cond: f }) => {
|
|
2741
|
+
const m = `conditionsThatEstablishesTheDecision.${g}.${f.conditionName}`;
|
|
2742
|
+
if (h)
|
|
2737
2743
|
l.setFieldValue(m, void 0);
|
|
2738
2744
|
else {
|
|
2739
|
-
const
|
|
2745
|
+
const v = f.howToSetTheCondition === oe.LIST_OF_VALUES_MULTI ? [] : "";
|
|
2740
2746
|
l.setFieldValue(
|
|
2741
2747
|
m,
|
|
2742
2748
|
{
|
|
2743
2749
|
...f,
|
|
2744
|
-
value:
|
|
2750
|
+
value: v
|
|
2745
2751
|
},
|
|
2746
2752
|
!1
|
|
2747
2753
|
);
|
|
@@ -2749,17 +2755,17 @@ function Ti({
|
|
|
2749
2755
|
});
|
|
2750
2756
|
} };
|
|
2751
2757
|
}
|
|
2752
|
-
|
|
2758
|
+
N.div`
|
|
2753
2759
|
& > div {
|
|
2754
2760
|
border-radius: 8px;
|
|
2755
2761
|
border: 1px solid
|
|
2756
2762
|
${({ theme: e }) => {
|
|
2757
2763
|
var t, n;
|
|
2758
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
2764
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
2759
2765
|
}};
|
|
2760
2766
|
}
|
|
2761
2767
|
`;
|
|
2762
|
-
|
|
2768
|
+
N.div`
|
|
2763
2769
|
width: 100%;
|
|
2764
2770
|
height: 100%;
|
|
2765
2771
|
overflow-y: auto;
|
|
@@ -2777,7 +2783,7 @@ D.div`
|
|
|
2777
2783
|
border-radius: 8px;
|
|
2778
2784
|
}
|
|
2779
2785
|
`;
|
|
2780
|
-
const xi =
|
|
2786
|
+
const xi = N.div`
|
|
2781
2787
|
display: flex;
|
|
2782
2788
|
width: -webkit-fill-available;
|
|
2783
2789
|
align-items: center;
|
|
@@ -2800,30 +2806,30 @@ const xi = D.div`
|
|
|
2800
2806
|
valueEnd: s = "",
|
|
2801
2807
|
messageStart: p = "",
|
|
2802
2808
|
messageEnd: d = "",
|
|
2803
|
-
statusStart:
|
|
2804
|
-
statusEnd:
|
|
2805
|
-
} = e, [f, m] = q(c), [
|
|
2809
|
+
statusStart: h = "pending",
|
|
2810
|
+
statusEnd: g = "pending"
|
|
2811
|
+
} = e, [f, m] = q(c), [v, x] = q(l), [w, S] = q(s), D = ({ target: F }) => {
|
|
2806
2812
|
m(F.checked), r && r(F.checked);
|
|
2807
2813
|
}, C = (F) => {
|
|
2808
|
-
|
|
2809
|
-
},
|
|
2814
|
+
x(F.target.value), t(F);
|
|
2815
|
+
}, k = (F) => {
|
|
2810
2816
|
S(F.target.value), n(F);
|
|
2811
|
-
}, L =
|
|
2812
|
-
return /* @__PURE__ */
|
|
2813
|
-
/* @__PURE__ */
|
|
2817
|
+
}, L = ae("(max-width: 400px)");
|
|
2818
|
+
return /* @__PURE__ */ b(T, { direction: "column", width: "100%", gap: "20px", children: [
|
|
2819
|
+
/* @__PURE__ */ b(T, { justifyContent: "space-between", children: [
|
|
2814
2820
|
/* @__PURE__ */ a(R, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
2815
2821
|
/* @__PURE__ */ a(
|
|
2816
2822
|
Zt,
|
|
2817
2823
|
{
|
|
2818
2824
|
label: "Cerrada",
|
|
2819
|
-
onChange:
|
|
2825
|
+
onChange: D,
|
|
2820
2826
|
checked: f,
|
|
2821
2827
|
value: ""
|
|
2822
2828
|
}
|
|
2823
2829
|
)
|
|
2824
2830
|
] }),
|
|
2825
|
-
/* @__PURE__ */
|
|
2826
|
-
|
|
2831
|
+
/* @__PURE__ */ b(
|
|
2832
|
+
T,
|
|
2827
2833
|
{
|
|
2828
2834
|
direction: L ? "column" : "row",
|
|
2829
2835
|
justifyContent: "space-between",
|
|
@@ -2835,10 +2841,10 @@ const xi = D.div`
|
|
|
2835
2841
|
id: "dateStart",
|
|
2836
2842
|
label: o,
|
|
2837
2843
|
onChange: C,
|
|
2838
|
-
value:
|
|
2844
|
+
value: v,
|
|
2839
2845
|
required: u,
|
|
2840
2846
|
size: "compact",
|
|
2841
|
-
status:
|
|
2847
|
+
status: h,
|
|
2842
2848
|
message: p,
|
|
2843
2849
|
fullwidth: !0
|
|
2844
2850
|
}
|
|
@@ -2848,11 +2854,11 @@ const xi = D.div`
|
|
|
2848
2854
|
{
|
|
2849
2855
|
id: "dateEnd",
|
|
2850
2856
|
label: i,
|
|
2851
|
-
onChange:
|
|
2857
|
+
onChange: k,
|
|
2852
2858
|
value: w,
|
|
2853
2859
|
required: u,
|
|
2854
2860
|
size: "compact",
|
|
2855
|
-
status:
|
|
2861
|
+
status: g,
|
|
2856
2862
|
message: d,
|
|
2857
2863
|
fullwidth: !0
|
|
2858
2864
|
}
|
|
@@ -2874,18 +2880,18 @@ const xi = D.div`
|
|
|
2874
2880
|
showConditionsError: s,
|
|
2875
2881
|
tabs: p,
|
|
2876
2882
|
termEndStatus: d,
|
|
2877
|
-
termStartStatus:
|
|
2878
|
-
textValues:
|
|
2883
|
+
termStartStatus: h,
|
|
2884
|
+
textValues: g,
|
|
2879
2885
|
portalId: f,
|
|
2880
2886
|
showRedefineConfirm: m,
|
|
2881
|
-
onOpenRedefineConfirm:
|
|
2882
|
-
onCloseRedefineConfirm:
|
|
2887
|
+
onOpenRedefineConfirm: v,
|
|
2888
|
+
onCloseRedefineConfirm: x,
|
|
2883
2889
|
onConfirmRedefine: w
|
|
2884
2890
|
} = e;
|
|
2885
|
-
return /* @__PURE__ */
|
|
2886
|
-
/* @__PURE__ */ a("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */
|
|
2887
|
-
/* @__PURE__ */ a(Be, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */
|
|
2888
|
-
|
|
2891
|
+
return /* @__PURE__ */ b(V, { children: [
|
|
2892
|
+
/* @__PURE__ */ a("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2893
|
+
/* @__PURE__ */ a(Be, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ b(
|
|
2894
|
+
T,
|
|
2889
2895
|
{
|
|
2890
2896
|
justifyContent: "center",
|
|
2891
2897
|
width: "-webkit-fill-available",
|
|
@@ -2900,7 +2906,7 @@ const xi = D.div`
|
|
|
2900
2906
|
]
|
|
2901
2907
|
}
|
|
2902
2908
|
) }),
|
|
2903
|
-
r && r.length > 0 && /* @__PURE__ */ a(Be, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */
|
|
2909
|
+
r && r.length > 0 && /* @__PURE__ */ a(Be, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ b(T, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2904
2910
|
/* @__PURE__ */ a(
|
|
2905
2911
|
Vn,
|
|
2906
2912
|
{
|
|
@@ -2909,13 +2915,13 @@ const xi = D.div`
|
|
|
2909
2915
|
selectedTab: t
|
|
2910
2916
|
}
|
|
2911
2917
|
),
|
|
2912
|
-
/* @__PURE__ */
|
|
2918
|
+
/* @__PURE__ */ b(T, { justifyContent: "flex-end", alignItems: "center", children: [
|
|
2913
2919
|
/* @__PURE__ */ a(
|
|
2914
2920
|
B,
|
|
2915
2921
|
{
|
|
2916
2922
|
icon: /* @__PURE__ */ a(dr, {}),
|
|
2917
2923
|
appearance: "help",
|
|
2918
|
-
onClick:
|
|
2924
|
+
onClick: v,
|
|
2919
2925
|
cursorHover: !0
|
|
2920
2926
|
}
|
|
2921
2927
|
),
|
|
@@ -2926,16 +2932,16 @@ const xi = D.div`
|
|
|
2926
2932
|
iconBefore: /* @__PURE__ */ a(cr, {}),
|
|
2927
2933
|
variant: "none",
|
|
2928
2934
|
appearance: "gray",
|
|
2929
|
-
onClick:
|
|
2935
|
+
onClick: v,
|
|
2930
2936
|
cursorHover: !0,
|
|
2931
2937
|
children: "Redefinir la condición"
|
|
2932
2938
|
}
|
|
2933
2939
|
)
|
|
2934
2940
|
] }),
|
|
2935
|
-
/* @__PURE__ */ a(
|
|
2936
|
-
const
|
|
2937
|
-
return /* @__PURE__ */
|
|
2938
|
-
/* @__PURE__ */
|
|
2941
|
+
/* @__PURE__ */ a(T, { direction: "column", gap: "20px", children: r == null ? void 0 : r.map((S) => {
|
|
2942
|
+
const D = S.__scopedName ?? `${S.groupKey}.${S.conditionName}`;
|
|
2943
|
+
return /* @__PURE__ */ b(T, { gap: "16px", alignItems: "center", children: [
|
|
2944
|
+
/* @__PURE__ */ b(xi, { children: [
|
|
2939
2945
|
/* @__PURE__ */ a(
|
|
2940
2946
|
pn,
|
|
2941
2947
|
{
|
|
@@ -2951,23 +2957,23 @@ const xi = D.div`
|
|
|
2951
2957
|
icon: /* @__PURE__ */ a(yt, {}),
|
|
2952
2958
|
appearance: "danger",
|
|
2953
2959
|
cursorHover: !0,
|
|
2954
|
-
onClick: () => u(
|
|
2960
|
+
onClick: () => u(D)
|
|
2955
2961
|
}
|
|
2956
2962
|
)
|
|
2957
|
-
] },
|
|
2963
|
+
] }, D);
|
|
2958
2964
|
}) }),
|
|
2959
2965
|
s && /* @__PURE__ */ a(R, { type: "label", size: "medium", appearance: "danger", children: n ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2960
2966
|
] }) }),
|
|
2961
|
-
/* @__PURE__ */ a(Be, { legend: "Vigencia", spacing: "wide", children:
|
|
2967
|
+
/* @__PURE__ */ a(Be, { legend: "Vigencia", spacing: "wide", children: g.terms && /* @__PURE__ */ a(
|
|
2962
2968
|
wi,
|
|
2963
2969
|
{
|
|
2964
|
-
labelStart:
|
|
2965
|
-
labelEnd:
|
|
2970
|
+
labelStart: g.termStart,
|
|
2971
|
+
labelEnd: g.termEnd,
|
|
2966
2972
|
valueStart: o.values.effectiveFrom,
|
|
2967
2973
|
valueEnd: o.values.validUntil,
|
|
2968
2974
|
messageStart: o.errors.effectiveFrom,
|
|
2969
2975
|
messageEnd: o.errors.validUntil,
|
|
2970
|
-
statusStart:
|
|
2976
|
+
statusStart: h,
|
|
2971
2977
|
statusEnd: d,
|
|
2972
2978
|
onHandleStartChange: (S) => o.setFieldValue("effectiveFrom", S.target.value),
|
|
2973
2979
|
onHandleEndChange: (S) => o.setFieldValue("validUntil", S.target.value),
|
|
@@ -2977,9 +2983,9 @@ const xi = D.div`
|
|
|
2977
2983
|
checkedClosed: o.values.checkClosed
|
|
2978
2984
|
}
|
|
2979
2985
|
) }),
|
|
2980
|
-
/* @__PURE__ */
|
|
2981
|
-
/* @__PURE__ */ a(Y, { appearance: "gray", onClick: c, variant: "outlined", children:
|
|
2982
|
-
/* @__PURE__ */ a(Y, { type: "submit", children:
|
|
2986
|
+
/* @__PURE__ */ b(T, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
2987
|
+
/* @__PURE__ */ a(Y, { appearance: "gray", onClick: c, variant: "outlined", children: g.cancel }),
|
|
2988
|
+
/* @__PURE__ */ a(Y, { type: "submit", children: g.confirm })
|
|
2983
2989
|
] })
|
|
2984
2990
|
] }) }),
|
|
2985
2991
|
m && f && /* @__PURE__ */ a(
|
|
@@ -2987,17 +2993,17 @@ const xi = D.div`
|
|
|
2987
2993
|
{
|
|
2988
2994
|
portalId: f,
|
|
2989
2995
|
title: "Redefinir la condición",
|
|
2990
|
-
onCloseModal:
|
|
2991
|
-
children: /* @__PURE__ */
|
|
2996
|
+
onCloseModal: x,
|
|
2997
|
+
children: /* @__PURE__ */ b(T, { direction: "column", gap: "16px", children: [
|
|
2992
2998
|
/* @__PURE__ */ a(R, { type: "body", size: "large", appearance: "gray", children: "¿Estás seguro? Se perderá todo lo que tienes actualmente definido y deberás reescribir completamente la condición, de esta manera podrás usar las últimas variables condicionales que están definidas en la actualidad para esta decisión ." }),
|
|
2993
|
-
/* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ b(T, { justifyContent: "end", gap: "12px", children: [
|
|
2994
3000
|
/* @__PURE__ */ a(
|
|
2995
3001
|
Y,
|
|
2996
3002
|
{
|
|
2997
3003
|
type: "button",
|
|
2998
3004
|
appearance: "gray",
|
|
2999
3005
|
variant: "outlined",
|
|
3000
|
-
onClick:
|
|
3006
|
+
onClick: x,
|
|
3001
3007
|
cursorHover: !0,
|
|
3002
3008
|
children: "Cancelar"
|
|
3003
3009
|
}
|
|
@@ -3065,15 +3071,15 @@ function Ri(e) {
|
|
|
3065
3071
|
const Ue = (e) => {
|
|
3066
3072
|
if (typeof e == "string") {
|
|
3067
3073
|
const t = e.toLowerCase();
|
|
3068
|
-
if (t.includes("equal")) return
|
|
3069
|
-
if (t.includes("greater")) return
|
|
3070
|
-
if (t.includes("less")) return
|
|
3071
|
-
if (t.includes("range") || t.includes("between")) return
|
|
3072
|
-
if (t.includes("multi")) return
|
|
3074
|
+
if (t.includes("equal")) return oe.EQUAL;
|
|
3075
|
+
if (t.includes("greater")) return oe.GREATER_THAN;
|
|
3076
|
+
if (t.includes("less")) return oe.LESS_THAN;
|
|
3077
|
+
if (t.includes("range") || t.includes("between")) return oe.RANGE;
|
|
3078
|
+
if (t.includes("multi")) return oe.LIST_OF_VALUES_MULTI;
|
|
3073
3079
|
if (t.includes("list_of_values") || t.includes("among") || t.includes("in"))
|
|
3074
|
-
return
|
|
3080
|
+
return oe.LIST_OF_VALUES;
|
|
3075
3081
|
}
|
|
3076
|
-
return e ??
|
|
3082
|
+
return e ?? oe.EQUAL;
|
|
3077
3083
|
}, Ge = (e) => {
|
|
3078
3084
|
switch (e) {
|
|
3079
3085
|
case P.LIST_OF_VALUES_MULTI:
|
|
@@ -3113,24 +3119,24 @@ const Ue = (e) => {
|
|
|
3113
3119
|
decision: t,
|
|
3114
3120
|
onSubmitEvent: n,
|
|
3115
3121
|
textValues: r
|
|
3116
|
-
}), p = u ?? t, d =
|
|
3117
|
-
|
|
3122
|
+
}), p = u ?? t, d = xe(p), h = xe(t), g = Bn(
|
|
3123
|
+
h,
|
|
3118
3124
|
($) => !$.hidden
|
|
3119
|
-
), f = Object.keys(
|
|
3125
|
+
), f = Object.keys(g), m = [
|
|
3120
3126
|
...f.filter(($) => $ === "group-primary"),
|
|
3121
3127
|
...f.filter(($) => $ !== "group-primary")
|
|
3122
|
-
],
|
|
3123
|
-
let
|
|
3128
|
+
], v = {};
|
|
3129
|
+
let x = 1;
|
|
3124
3130
|
const w = m.map(($) => {
|
|
3125
|
-
const O = $ === "group-primary" ? "mainCondition" : `alternateCondition-${
|
|
3126
|
-
return
|
|
3131
|
+
const O = $ === "group-primary" ? "mainCondition" : `alternateCondition-${x++}`;
|
|
3132
|
+
return v[O] = $, {
|
|
3127
3133
|
id: O,
|
|
3128
3134
|
label: $ === "group-primary" ? mt($, 0) : mt($, Number(O.split("-").at(-1))),
|
|
3129
3135
|
isDisabled: !1
|
|
3130
3136
|
};
|
|
3131
|
-
}), [S,
|
|
3137
|
+
}), [S, D] = _.useState(
|
|
3132
3138
|
((Pe = w[0]) == null ? void 0 : Pe.id) ?? "mainCondition"
|
|
3133
|
-
), C = ($) =>
|
|
3139
|
+
), C = ($) => D($), k = v[S] ?? "group-primary";
|
|
3134
3140
|
_.useEffect(() => {
|
|
3135
3141
|
var U;
|
|
3136
3142
|
const $ = (U = l.values) == null ? void 0 : U.conditionsThatEstablishesTheDecision;
|
|
@@ -3138,15 +3144,15 @@ const Ue = (e) => {
|
|
|
3138
3144
|
if ($ && typeof $ == "object" && (O = Object.values($).some(
|
|
3139
3145
|
(X) => X && typeof X == "object" && Object.keys(X).length > 0
|
|
3140
3146
|
)), O) return;
|
|
3141
|
-
const E =
|
|
3147
|
+
const E = xe(t);
|
|
3142
3148
|
if (!E || Object.keys(E).length === 0)
|
|
3143
3149
|
return;
|
|
3144
3150
|
const j = Object.fromEntries(
|
|
3145
3151
|
Object.entries(E).map(([X, G]) => {
|
|
3146
3152
|
const ye = Object.fromEntries(
|
|
3147
|
-
G.map((
|
|
3148
|
-
const fe = Ue(
|
|
3149
|
-
return [
|
|
3153
|
+
G.map((ce) => {
|
|
3154
|
+
const fe = Ue(ce.howToSetTheCondition), Ce = ce.value ?? Ge(fe);
|
|
3155
|
+
return [ce.conditionName, Ce];
|
|
3150
3156
|
})
|
|
3151
3157
|
);
|
|
3152
3158
|
return [X, ye];
|
|
@@ -3161,14 +3167,14 @@ const Ue = (e) => {
|
|
|
3161
3167
|
var G;
|
|
3162
3168
|
const $ = (G = l.values) == null ? void 0 : G.conditionsThatEstablishesTheDecision;
|
|
3163
3169
|
if (!$ || typeof $ != "object") return;
|
|
3164
|
-
const O =
|
|
3165
|
-
([ye,
|
|
3166
|
-
const fe = O[ye] || [],
|
|
3167
|
-
const z =
|
|
3168
|
-
|
|
3169
|
-
), at =
|
|
3170
|
+
const O = xe(p), E = Object.entries($).map(
|
|
3171
|
+
([ye, ce]) => {
|
|
3172
|
+
const fe = O[ye] || [], Ce = Object.keys(ce).map((Te) => {
|
|
3173
|
+
const z = ce[Te], te = fe.find((ar) => ar.conditionName === Te) || {}, It = Ue(
|
|
3174
|
+
te.howToSetTheCondition ?? (z == null ? void 0 : z.howToSetTheCondition)
|
|
3175
|
+
), at = te.value ?? Ge(It), lt = z && typeof z == "object" && "value" in z ? z.value : z;
|
|
3170
3176
|
return {
|
|
3171
|
-
...
|
|
3177
|
+
...te,
|
|
3172
3178
|
...typeof z == "object" && !Array.isArray(z) ? z : {},
|
|
3173
3179
|
conditionName: Te,
|
|
3174
3180
|
value: lt !== void 0 ? lt : at
|
|
@@ -3176,7 +3182,7 @@ const Ue = (e) => {
|
|
|
3176
3182
|
});
|
|
3177
3183
|
return {
|
|
3178
3184
|
ConditionGroupId: ye,
|
|
3179
|
-
conditionsThatEstablishesTheDecision:
|
|
3185
|
+
conditionsThatEstablishesTheDecision: Ce
|
|
3180
3186
|
};
|
|
3181
3187
|
}
|
|
3182
3188
|
), j = l.values.conditionGroups, U = JSON.stringify(E), X = JSON.stringify(j ?? []);
|
|
@@ -3184,23 +3190,23 @@ const Ue = (e) => {
|
|
|
3184
3190
|
}, [(M = l.values) == null ? void 0 : M.conditionsThatEstablishesTheDecision, p]);
|
|
3185
3191
|
const L = _.useMemo(() => {
|
|
3186
3192
|
const $ = [
|
|
3187
|
-
...Object.keys(
|
|
3193
|
+
...Object.keys(g).filter(
|
|
3188
3194
|
(j) => j === "group-primary"
|
|
3189
3195
|
),
|
|
3190
|
-
...Object.keys(
|
|
3196
|
+
...Object.keys(g).filter(
|
|
3191
3197
|
(j) => j !== "group-primary"
|
|
3192
3198
|
)
|
|
3193
3199
|
];
|
|
3194
3200
|
let O = !1;
|
|
3195
3201
|
const E = $.map((j) => {
|
|
3196
|
-
const X = (
|
|
3197
|
-
const
|
|
3198
|
-
|
|
3199
|
-
const fe = Ue(G.howToSetTheCondition),
|
|
3202
|
+
const X = (g[j] ?? []).map((G, ye) => {
|
|
3203
|
+
const ce = !O && j === "group-primary" && ye === 0;
|
|
3204
|
+
ce && (O = !0);
|
|
3205
|
+
const fe = Ue(G.howToSetTheCondition), Ce = Ci({
|
|
3200
3206
|
label: G.labelName || "",
|
|
3201
3207
|
howToSet: fe,
|
|
3202
|
-
isFirst:
|
|
3203
|
-
}), Te = G.timeUnit ? Ut("", G.timeUnit, !0).trim() : "", z = `${j}.${G.conditionName}`,
|
|
3208
|
+
isFirst: ce
|
|
3209
|
+
}), Te = G.timeUnit ? Ut("", G.timeUnit, !0).trim() : "", z = `${j}.${G.conditionName}`, te = Oi(
|
|
3204
3210
|
l.values,
|
|
3205
3211
|
j,
|
|
3206
3212
|
G.conditionName
|
|
@@ -3208,7 +3214,7 @@ const Ue = (e) => {
|
|
|
3208
3214
|
l.values,
|
|
3209
3215
|
j,
|
|
3210
3216
|
G.conditionName
|
|
3211
|
-
), at =
|
|
3217
|
+
), at = te !== void 0 ? te : It, lt = at !== void 0 ? at : Ge(fe);
|
|
3212
3218
|
return {
|
|
3213
3219
|
...G,
|
|
3214
3220
|
__originalConditionName: G.conditionName,
|
|
@@ -3217,7 +3223,7 @@ const Ue = (e) => {
|
|
|
3217
3223
|
__scopedName: z,
|
|
3218
3224
|
conditionName: G.conditionName,
|
|
3219
3225
|
groupKey: j,
|
|
3220
|
-
labelName:
|
|
3226
|
+
labelName: Ce,
|
|
3221
3227
|
__unitAfterInput: Te,
|
|
3222
3228
|
value: lt
|
|
3223
3229
|
};
|
|
@@ -3225,14 +3231,14 @@ const Ue = (e) => {
|
|
|
3225
3231
|
return [j, X];
|
|
3226
3232
|
});
|
|
3227
3233
|
return Object.fromEntries(E);
|
|
3228
|
-
}, [
|
|
3234
|
+
}, [g, l.values]), F = L[k] ?? [], se = L["group-primary"] ?? [], ee = {
|
|
3229
3235
|
decisionDataType: t.decisionDataType,
|
|
3230
3236
|
howToSetTheCondition: t.howToSetTheDecision,
|
|
3231
3237
|
labelName: t.labelName,
|
|
3232
3238
|
listOfPossibleValues: t.listOfPossibleValues,
|
|
3233
3239
|
ruleName: t.ruleName,
|
|
3234
3240
|
timeUnit: t.timeUnit ? Ut("", t.timeUnit, !0).trim() : ""
|
|
3235
|
-
},
|
|
3241
|
+
}, de = l.submitCount > 0 || !!l.touched.effectiveFrom, Ie = l.submitCount > 0 || !!l.touched.validUntil, Dt = de ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, nt = Ie ? l.errors.validUntil ? "invalid" : "valid" : void 0, _e = _.useMemo(() => {
|
|
3236
3242
|
const $ = l.errors.conditionsThatEstablishesTheDecision;
|
|
3237
3243
|
if (!$) return;
|
|
3238
3244
|
if (typeof $ == "string") return $;
|
|
@@ -3256,19 +3262,19 @@ const Ue = (e) => {
|
|
|
3256
3262
|
const O = ($ == null ? void 0 : $.__howToSet) ?? Ue($ == null ? void 0 : $.howToSetTheCondition);
|
|
3257
3263
|
return Ge(O);
|
|
3258
3264
|
}, rt = ($, O, E) => {
|
|
3259
|
-
var G, ye,
|
|
3260
|
-
const j = `conditionsThatEstablishesTheDecision.${$}.${O}`, U = (
|
|
3265
|
+
var G, ye, ce, fe, Ce;
|
|
3266
|
+
const j = `conditionsThatEstablishesTheDecision.${$}.${O}`, U = (ce = (ye = (G = l.values) == null ? void 0 : G.conditionsThatEstablishesTheDecision) == null ? void 0 : ye[$]) == null ? void 0 : ce[O];
|
|
3261
3267
|
U && typeof U == "object" && !Array.isArray(U) ? l.setFieldValue(`${j}.value`, E, !1) : l.setFieldValue(j, E, !1);
|
|
3262
3268
|
const X = (fe = l.values) == null ? void 0 : fe.conditionGroups;
|
|
3263
3269
|
if (Array.isArray(X)) {
|
|
3264
3270
|
const Te = X.findIndex((z) => (z == null ? void 0 : z.ConditionGroupId) === $);
|
|
3265
3271
|
if (Te >= 0) {
|
|
3266
|
-
const z = (
|
|
3267
|
-
(
|
|
3272
|
+
const z = (Ce = X[Te].conditionsThatEstablishesTheDecision) == null ? void 0 : Ce.findIndex(
|
|
3273
|
+
(te) => (te == null ? void 0 : te.conditionName) === O
|
|
3268
3274
|
);
|
|
3269
3275
|
if (z >= 0) {
|
|
3270
|
-
const
|
|
3271
|
-
|
|
3276
|
+
const te = JSON.parse(JSON.stringify(X));
|
|
3277
|
+
te[Te].conditionsThatEstablishesTheDecision[z].value = E, l.setFieldValue("conditionGroups", te, !1);
|
|
3272
3278
|
}
|
|
3273
3279
|
}
|
|
3274
3280
|
}
|
|
@@ -3280,9 +3286,9 @@ const Ue = (e) => {
|
|
|
3280
3286
|
!1
|
|
3281
3287
|
);
|
|
3282
3288
|
}, it = () => {
|
|
3283
|
-
(d[
|
|
3289
|
+
(d[k] ?? []).forEach((O) => {
|
|
3284
3290
|
const E = Ue(O == null ? void 0 : O.howToSetTheCondition), j = Ge(E);
|
|
3285
|
-
rt(
|
|
3291
|
+
rt(k, O.conditionName, j);
|
|
3286
3292
|
});
|
|
3287
3293
|
}, [kt, Ve] = _.useState(!1);
|
|
3288
3294
|
return /* @__PURE__ */ a(
|
|
@@ -3293,7 +3299,7 @@ const Ue = (e) => {
|
|
|
3293
3299
|
currentConditions: F,
|
|
3294
3300
|
decision: t,
|
|
3295
3301
|
formik: l,
|
|
3296
|
-
normalizedDecision:
|
|
3302
|
+
normalizedDecision: ee,
|
|
3297
3303
|
onCancel: o,
|
|
3298
3304
|
onRedefineCurrentTab: it,
|
|
3299
3305
|
onTabChange: C,
|
|
@@ -3305,7 +3311,7 @@ const Ue = (e) => {
|
|
|
3305
3311
|
termEndStatus: nt,
|
|
3306
3312
|
termStartStatus: Dt,
|
|
3307
3313
|
textValues: r,
|
|
3308
|
-
visibleConditions:
|
|
3314
|
+
visibleConditions: se,
|
|
3309
3315
|
visibleConditionsByGroup: L,
|
|
3310
3316
|
handleToggleNoneChange: s,
|
|
3311
3317
|
portalId: "redefine-confirm-portal",
|
|
@@ -3314,14 +3320,14 @@ const Ue = (e) => {
|
|
|
3314
3320
|
onCloseRedefineConfirm: () => Ve(!1),
|
|
3315
3321
|
onConfirmRedefine: () => {
|
|
3316
3322
|
it();
|
|
3317
|
-
const $ = (d[
|
|
3318
|
-
(O) => `${
|
|
3323
|
+
const $ = (d[k] ?? []).map(
|
|
3324
|
+
(O) => `${k}.${O.conditionName}`
|
|
3319
3325
|
);
|
|
3320
3326
|
c == null || c($), Ve(!1);
|
|
3321
3327
|
}
|
|
3322
3328
|
}
|
|
3323
3329
|
);
|
|
3324
|
-
},
|
|
3330
|
+
}, gs = (e) => {
|
|
3325
3331
|
const {
|
|
3326
3332
|
cardTitle: t = !0,
|
|
3327
3333
|
controls: n = !0,
|
|
@@ -3334,31 +3340,31 @@ const Ue = (e) => {
|
|
|
3334
3340
|
isModalOpen: s,
|
|
3335
3341
|
selectedDecision: p,
|
|
3336
3342
|
loading: d,
|
|
3337
|
-
handleOpenModal:
|
|
3338
|
-
handleCloseModal:
|
|
3343
|
+
handleOpenModal: h,
|
|
3344
|
+
handleCloseModal: g,
|
|
3339
3345
|
handleSubmitForm: f,
|
|
3340
3346
|
handleDelete: m,
|
|
3341
|
-
terms:
|
|
3342
|
-
onRemoveCondition:
|
|
3347
|
+
terms: v = !0,
|
|
3348
|
+
onRemoveCondition: x,
|
|
3343
3349
|
onRestoreConditions: w,
|
|
3344
3350
|
baseDecisionTemplate: S,
|
|
3345
|
-
shouldRenderEmptyMessage:
|
|
3346
|
-
} = e, [C,
|
|
3351
|
+
shouldRenderEmptyMessage: D = !0
|
|
3352
|
+
} = e, [C, k] = q(null), L = ae("(max-width: 681px)"), { renderedCards: F, shouldRenderAddCard: se } = si({
|
|
3347
3353
|
cardTitle: t,
|
|
3348
3354
|
controls: n,
|
|
3349
3355
|
customTitleContentAddCard: r,
|
|
3350
3356
|
decisions: i,
|
|
3351
3357
|
loading: d,
|
|
3352
|
-
handleOpenModal:
|
|
3358
|
+
handleOpenModal: h,
|
|
3353
3359
|
handleDelete: m,
|
|
3354
3360
|
textValues: c,
|
|
3355
|
-
isOpenFor: (
|
|
3356
|
-
toggleAt: (
|
|
3361
|
+
isOpenFor: (de) => C === de,
|
|
3362
|
+
toggleAt: (de) => k((Ie) => Ie === de ? null : de),
|
|
3357
3363
|
editionMode: l
|
|
3358
|
-
}),
|
|
3359
|
-
return /* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */ a(ni, { children: /* @__PURE__ */ a(ri, { children: /* @__PURE__ */ a(
|
|
3361
|
-
|
|
3364
|
+
}), ee = (i == null ? void 0 : i.length) === 0 && !d;
|
|
3365
|
+
return /* @__PURE__ */ b(V, { children: [
|
|
3366
|
+
/* @__PURE__ */ a(ni, { children: /* @__PURE__ */ a(ri, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children: D && (ee ? /* @__PURE__ */ a(Be, { legend: "Decisiones", children: /* @__PURE__ */ b(
|
|
3367
|
+
T,
|
|
3362
3368
|
{
|
|
3363
3369
|
direction: "column",
|
|
3364
3370
|
gap: "16px",
|
|
@@ -3384,14 +3390,14 @@ const Ue = (e) => {
|
|
|
3384
3390
|
children: "Sin decisiones"
|
|
3385
3391
|
}
|
|
3386
3392
|
),
|
|
3387
|
-
/* @__PURE__ */ a(R, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */
|
|
3393
|
+
/* @__PURE__ */ a(R, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */ b(V, { children: [
|
|
3388
3394
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
3389
3395
|
r || ' "Agregar decisión"'
|
|
3390
3396
|
] }) })
|
|
3391
3397
|
]
|
|
3392
3398
|
}
|
|
3393
|
-
) }) : /* @__PURE__ */
|
|
3394
|
-
|
|
3399
|
+
) }) : /* @__PURE__ */ b(
|
|
3400
|
+
Se,
|
|
3395
3401
|
{
|
|
3396
3402
|
templateColumns: "1fr",
|
|
3397
3403
|
autoFlow: "row dense",
|
|
@@ -3404,18 +3410,18 @@ const Ue = (e) => {
|
|
|
3404
3410
|
height: L ? "auto" : "484px",
|
|
3405
3411
|
children: [
|
|
3406
3412
|
F,
|
|
3407
|
-
|
|
3413
|
+
se && zt({
|
|
3408
3414
|
type: "add",
|
|
3409
3415
|
index: i == null ? void 0 : i.length,
|
|
3410
3416
|
controls: n,
|
|
3411
3417
|
customTitleContentAddCard: r,
|
|
3412
3418
|
customMessageEmptyDecisions: o,
|
|
3413
3419
|
loading: d,
|
|
3414
|
-
handleOpenModal:
|
|
3420
|
+
handleOpenModal: h,
|
|
3415
3421
|
handleDelete: m,
|
|
3416
3422
|
textValues: c,
|
|
3417
|
-
shouldRenderEmptyMessage:
|
|
3418
|
-
terms:
|
|
3423
|
+
shouldRenderEmptyMessage: D,
|
|
3424
|
+
terms: v,
|
|
3419
3425
|
editionMode: l
|
|
3420
3426
|
})
|
|
3421
3427
|
]
|
|
@@ -3425,7 +3431,7 @@ const Ue = (e) => {
|
|
|
3425
3431
|
ui,
|
|
3426
3432
|
{
|
|
3427
3433
|
portalId: "modal-portal",
|
|
3428
|
-
onCloseModal:
|
|
3434
|
+
onCloseModal: g,
|
|
3429
3435
|
title: p ? "Editar Decisión" : "Configurar Decisión",
|
|
3430
3436
|
description: "Diligencia los campos para configurar tu decisión.",
|
|
3431
3437
|
children: /* @__PURE__ */ a(
|
|
@@ -3435,9 +3441,9 @@ const Ue = (e) => {
|
|
|
3435
3441
|
fullTemplate: S ?? u,
|
|
3436
3442
|
onSubmitEvent: f,
|
|
3437
3443
|
textValues: c,
|
|
3438
|
-
onCancel: () =>
|
|
3444
|
+
onCancel: () => g ? g() : () => {
|
|
3439
3445
|
},
|
|
3440
|
-
onRemoveCondition:
|
|
3446
|
+
onRemoveCondition: x,
|
|
3441
3447
|
onRestoreConditions: w
|
|
3442
3448
|
}
|
|
3443
3449
|
)
|
|
@@ -3446,9 +3452,9 @@ const Ue = (e) => {
|
|
|
3446
3452
|
] });
|
|
3447
3453
|
}, Mi = {
|
|
3448
3454
|
border: {
|
|
3449
|
-
color:
|
|
3455
|
+
color: A.palette.neutral.N40
|
|
3450
3456
|
}
|
|
3451
|
-
}, ji =
|
|
3457
|
+
}, ji = N.div`
|
|
3452
3458
|
border-width: 1px;
|
|
3453
3459
|
border-style: solid;
|
|
3454
3460
|
border-color: ${({ theme: e }) => {
|
|
@@ -3489,65 +3495,65 @@ const Vi = (e, t) => {
|
|
|
3489
3495
|
if (!e.current || !l.current) return;
|
|
3490
3496
|
const s = e.current, p = l.current, d = () => {
|
|
3491
3497
|
var S;
|
|
3492
|
-
const
|
|
3498
|
+
const g = s.clientWidth, f = Array.from(
|
|
3493
3499
|
p.querySelectorAll('[data-filter-tag="true"]')
|
|
3494
3500
|
), m = 48;
|
|
3495
|
-
let
|
|
3496
|
-
const
|
|
3497
|
-
for (let
|
|
3498
|
-
const C = ((S = f[
|
|
3499
|
-
|
|
3501
|
+
let v = 0;
|
|
3502
|
+
const x = [], w = [];
|
|
3503
|
+
for (let D = 0; D < t.length; D++) {
|
|
3504
|
+
const C = ((S = f[D]) == null ? void 0 : S.offsetWidth) ?? 0;
|
|
3505
|
+
v + C + m <= g ? (x.push(t[D]), v += C) : w.push(t[D]);
|
|
3500
3506
|
}
|
|
3501
|
-
r(
|
|
3502
|
-
},
|
|
3507
|
+
r(x), i(w), u(w.length > 0);
|
|
3508
|
+
}, h = new ResizeObserver(() => {
|
|
3503
3509
|
requestAnimationFrame(d);
|
|
3504
3510
|
});
|
|
3505
|
-
return
|
|
3511
|
+
return h.observe(s), () => h.disconnect();
|
|
3506
3512
|
}, [t, e]), { visible: n, hidden: o, showOverflowIndicator: c, measurementRef: l };
|
|
3507
3513
|
};
|
|
3508
|
-
|
|
3514
|
+
N.div`
|
|
3509
3515
|
& > div {
|
|
3510
3516
|
width: 100%;
|
|
3511
3517
|
}
|
|
3512
3518
|
`;
|
|
3513
|
-
const Pi =
|
|
3519
|
+
const Pi = N.div`
|
|
3514
3520
|
position: absolute;
|
|
3515
3521
|
top: calc(100% + 4px);
|
|
3516
3522
|
right: 0;
|
|
3517
3523
|
z-index: 1000;
|
|
3518
3524
|
width: 170px;
|
|
3519
|
-
`, Ui =
|
|
3525
|
+
`, Ui = N.div`
|
|
3520
3526
|
position: absolute;
|
|
3521
3527
|
visibility: hidden;
|
|
3522
3528
|
pointer-events: none;
|
|
3523
3529
|
height: 0;
|
|
3524
3530
|
overflow: hidden;
|
|
3525
|
-
`, Gi =
|
|
3531
|
+
`, Gi = N.div`
|
|
3526
3532
|
cursor: pointer;
|
|
3527
3533
|
`, qt = {
|
|
3528
3534
|
border: {
|
|
3529
3535
|
color: {
|
|
3530
|
-
regular:
|
|
3531
|
-
disabled:
|
|
3532
|
-
focus:
|
|
3533
|
-
invalid:
|
|
3536
|
+
regular: A.palette.neutral.N40,
|
|
3537
|
+
disabled: A.palette.neutral.N40,
|
|
3538
|
+
focus: A.palette.blue.B300,
|
|
3539
|
+
invalid: A.palette.red.R400
|
|
3534
3540
|
}
|
|
3535
3541
|
},
|
|
3536
3542
|
background: {
|
|
3537
3543
|
color: {
|
|
3538
|
-
regular:
|
|
3539
|
-
disabled:
|
|
3544
|
+
regular: A.palette.neutral.N0,
|
|
3545
|
+
disabled: A.palette.neutral.N10
|
|
3540
3546
|
}
|
|
3541
3547
|
},
|
|
3542
3548
|
content: {
|
|
3543
3549
|
color: {
|
|
3544
|
-
regular:
|
|
3545
|
-
disabled:
|
|
3550
|
+
regular: A.palette.neutral.N900,
|
|
3551
|
+
disabled: A.palette.neutral.N70
|
|
3546
3552
|
}
|
|
3547
3553
|
},
|
|
3548
3554
|
placeholder: {
|
|
3549
3555
|
color: {
|
|
3550
|
-
regular:
|
|
3556
|
+
regular: A.palette.neutral.N300
|
|
3551
3557
|
}
|
|
3552
3558
|
},
|
|
3553
3559
|
option: {
|
|
@@ -3556,11 +3562,11 @@ const Pi = D.div`
|
|
|
3556
3562
|
hover: "primary"
|
|
3557
3563
|
},
|
|
3558
3564
|
background: {
|
|
3559
|
-
regular:
|
|
3560
|
-
hover:
|
|
3565
|
+
regular: A.palette.neutral.N0,
|
|
3566
|
+
hover: A.palette.neutral.N30
|
|
3561
3567
|
}
|
|
3562
3568
|
}
|
|
3563
|
-
}, zi =
|
|
3569
|
+
}, zi = N.li`
|
|
3564
3570
|
display: flex;
|
|
3565
3571
|
align-items: center;
|
|
3566
3572
|
align-self: stretch;
|
|
@@ -3579,8 +3585,8 @@ const Pi = D.div`
|
|
|
3579
3585
|
}};
|
|
3580
3586
|
}
|
|
3581
3587
|
`, Hi = (e) => {
|
|
3582
|
-
var
|
|
3583
|
-
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 = (
|
|
3588
|
+
var h, g, f, m, v, x;
|
|
3589
|
+
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) ?? qt.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) ?? qt.option.appearance.regular;
|
|
3584
3590
|
return /* @__PURE__ */ a(
|
|
3585
3591
|
zi,
|
|
3586
3592
|
{
|
|
@@ -3590,8 +3596,8 @@ const Pi = D.div`
|
|
|
3590
3596
|
onClick: (w) => {
|
|
3591
3597
|
w.stopPropagation();
|
|
3592
3598
|
},
|
|
3593
|
-
children: /* @__PURE__ */
|
|
3594
|
-
|
|
3599
|
+
children: /* @__PURE__ */ b(
|
|
3600
|
+
Se,
|
|
3595
3601
|
{
|
|
3596
3602
|
alignItems: "center",
|
|
3597
3603
|
gap: "8px",
|
|
@@ -3643,30 +3649,30 @@ const Pi = D.div`
|
|
|
3643
3649
|
} = e, u = qe(null), l = qe(null), s = qe(null), {
|
|
3644
3650
|
visible: p,
|
|
3645
3651
|
hidden: d,
|
|
3646
|
-
showOverflowIndicator:
|
|
3647
|
-
measurementRef:
|
|
3648
|
-
} = Vi(u, t), [f, m] = q(!1),
|
|
3649
|
-
C.stopPropagation(), m((
|
|
3652
|
+
showOverflowIndicator: h,
|
|
3653
|
+
measurementRef: g
|
|
3654
|
+
} = Vi(u, t), [f, m] = q(!1), v = (C) => {
|
|
3655
|
+
C.stopPropagation(), m((k) => !k);
|
|
3650
3656
|
};
|
|
3651
3657
|
Je(() => {
|
|
3652
|
-
const C = (
|
|
3653
|
-
var
|
|
3654
|
-
const L =
|
|
3655
|
-
!((
|
|
3658
|
+
const C = (k) => {
|
|
3659
|
+
var se, ee;
|
|
3660
|
+
const L = k.target;
|
|
3661
|
+
!((se = l.current) != null && se.contains(L)) && !((ee = s.current) != null && ee.contains(L)) && m(!1);
|
|
3656
3662
|
};
|
|
3657
3663
|
return f && window.addEventListener("mousedown", C), () => window.removeEventListener("mousedown", C);
|
|
3658
3664
|
}, [f]);
|
|
3659
|
-
const
|
|
3665
|
+
const x = t.length === 0, w = f && d.length > 0, S = d.map((C) => ({
|
|
3660
3666
|
id: C.label,
|
|
3661
3667
|
value: C.label,
|
|
3662
3668
|
label: C.label,
|
|
3663
3669
|
icon: C.icon
|
|
3664
|
-
})),
|
|
3665
|
-
var
|
|
3666
|
-
(L = (
|
|
3670
|
+
})), D = (C) => {
|
|
3671
|
+
var k, L;
|
|
3672
|
+
(L = (k = d.find((F) => F.label === C)) == null ? void 0 : k.onClose) == null || L.call(k), m(!1);
|
|
3667
3673
|
};
|
|
3668
|
-
return /* @__PURE__ */
|
|
3669
|
-
/* @__PURE__ */ a(Ui, { ref:
|
|
3674
|
+
return /* @__PURE__ */ b(_i, { borderRadius: "8px", width: "100%", children: [
|
|
3675
|
+
/* @__PURE__ */ a(Ui, { ref: g, children: t.map((C) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
|
|
3670
3676
|
He,
|
|
3671
3677
|
{
|
|
3672
3678
|
appearance: "primary",
|
|
@@ -3677,9 +3683,9 @@ const Pi = D.div`
|
|
|
3677
3683
|
onClose: C.onClose
|
|
3678
3684
|
}
|
|
3679
3685
|
) }, C.label)) }),
|
|
3680
|
-
/* @__PURE__ */
|
|
3686
|
+
/* @__PURE__ */ b(Se, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
3681
3687
|
/* @__PURE__ */ a(
|
|
3682
|
-
|
|
3688
|
+
pe,
|
|
3683
3689
|
{
|
|
3684
3690
|
ref: u,
|
|
3685
3691
|
background: !0,
|
|
@@ -3690,7 +3696,7 @@ const Pi = D.div`
|
|
|
3690
3696
|
alignItems: "center",
|
|
3691
3697
|
padding: "0px 8px",
|
|
3692
3698
|
border: !0,
|
|
3693
|
-
children:
|
|
3699
|
+
children: x ? /* @__PURE__ */ a(R, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ b(V, { children: [
|
|
3694
3700
|
p.map((C) => /* @__PURE__ */ a(
|
|
3695
3701
|
He,
|
|
3696
3702
|
{
|
|
@@ -3704,13 +3710,13 @@ const Pi = D.div`
|
|
|
3704
3710
|
},
|
|
3705
3711
|
C.label
|
|
3706
3712
|
)),
|
|
3707
|
-
|
|
3713
|
+
h && /* @__PURE__ */ b(
|
|
3708
3714
|
"div",
|
|
3709
3715
|
{
|
|
3710
3716
|
ref: s,
|
|
3711
3717
|
style: { position: "relative", display: "inline-block" },
|
|
3712
3718
|
children: [
|
|
3713
|
-
/* @__PURE__ */ a(Gi, { onClick:
|
|
3719
|
+
/* @__PURE__ */ a(Gi, { onClick: v, children: /* @__PURE__ */ a(
|
|
3714
3720
|
He,
|
|
3715
3721
|
{
|
|
3716
3722
|
appearance: "primary",
|
|
@@ -3721,7 +3727,7 @@ const Pi = D.div`
|
|
|
3721
3727
|
wr,
|
|
3722
3728
|
{
|
|
3723
3729
|
options: S,
|
|
3724
|
-
onOptionClick:
|
|
3730
|
+
onOptionClick: D,
|
|
3725
3731
|
children: d.map((C) => /* @__PURE__ */ a(
|
|
3726
3732
|
Hi,
|
|
3727
3733
|
{
|
|
@@ -3729,8 +3735,8 @@ const Pi = D.div`
|
|
|
3729
3735
|
label: C.label,
|
|
3730
3736
|
leadingIcon: C.icon,
|
|
3731
3737
|
onClose: () => {
|
|
3732
|
-
var
|
|
3733
|
-
(
|
|
3738
|
+
var k;
|
|
3739
|
+
(k = C.onClose) == null || k.call(C), m(!1);
|
|
3734
3740
|
}
|
|
3735
3741
|
},
|
|
3736
3742
|
C.label
|
|
@@ -3747,8 +3753,8 @@ const Pi = D.div`
|
|
|
3747
3753
|
Y,
|
|
3748
3754
|
{
|
|
3749
3755
|
cursorHover: !0,
|
|
3750
|
-
disabled:
|
|
3751
|
-
iconBefore: /* @__PURE__ */ a(
|
|
3756
|
+
disabled: x,
|
|
3757
|
+
iconBefore: /* @__PURE__ */ a(hr, {}),
|
|
3752
3758
|
onClick: n,
|
|
3753
3759
|
variant: "outlined",
|
|
3754
3760
|
children: i
|
|
@@ -3767,13 +3773,13 @@ const Pi = D.div`
|
|
|
3767
3773
|
] })
|
|
3768
3774
|
] });
|
|
3769
3775
|
}, ms = (e) => {
|
|
3770
|
-
const { appliedFilters: t, fields: n, onChange: r, noFiltersLabel: o } = e, i =
|
|
3771
|
-
return /* @__PURE__ */
|
|
3772
|
-
i && /* @__PURE__ */
|
|
3773
|
-
/* @__PURE__ */
|
|
3776
|
+
const { appliedFilters: t, fields: n, onChange: r, noFiltersLabel: o } = e, i = ae("(max-width: 768px)"), c = !t || t.length === 0;
|
|
3777
|
+
return /* @__PURE__ */ b(T, { direction: "column", gap: "16px", children: [
|
|
3778
|
+
i && /* @__PURE__ */ b(V, { children: [
|
|
3779
|
+
/* @__PURE__ */ b(T, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
3774
3780
|
/* @__PURE__ */ a(B, { appearance: "gray", icon: /* @__PURE__ */ a(_n, {}) }),
|
|
3775
3781
|
/* @__PURE__ */ a(
|
|
3776
|
-
|
|
3782
|
+
pe,
|
|
3777
3783
|
{
|
|
3778
3784
|
background: !0,
|
|
3779
3785
|
borderRadius: "8px",
|
|
@@ -3801,8 +3807,8 @@ const Pi = D.div`
|
|
|
3801
3807
|
] }),
|
|
3802
3808
|
/* @__PURE__ */ a(W, { dashed: !0 })
|
|
3803
3809
|
] }),
|
|
3804
|
-
n.map((u) => /* @__PURE__ */
|
|
3805
|
-
/* @__PURE__ */ a(
|
|
3810
|
+
n.map((u) => /* @__PURE__ */ b(T, { gap: "6px", alignItems: "center", children: [
|
|
3811
|
+
/* @__PURE__ */ a(T, { padding: "22px 0 0 0", children: /* @__PURE__ */ a(B, { appearance: "primary", icon: u.icon }) }),
|
|
3806
3812
|
/* @__PURE__ */ a(
|
|
3807
3813
|
Sr,
|
|
3808
3814
|
{
|
|
@@ -3898,7 +3904,7 @@ const Pi = D.div`
|
|
|
3898
3904
|
),
|
|
3899
3905
|
value: e
|
|
3900
3906
|
}), Wi = (e) => ({
|
|
3901
|
-
schema:
|
|
3907
|
+
schema: we().test(
|
|
3902
3908
|
"isArrayOrString",
|
|
3903
3909
|
"Debe ser un array de strings/numbers o un solo string",
|
|
3904
3910
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -3907,7 +3913,7 @@ const Pi = D.div`
|
|
|
3907
3913
|
),
|
|
3908
3914
|
value: e
|
|
3909
3915
|
}), Yi = (e) => ({
|
|
3910
|
-
schema:
|
|
3916
|
+
schema: we().test(
|
|
3911
3917
|
"isArrayOrString",
|
|
3912
3918
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
3913
3919
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -3918,9 +3924,9 @@ const Pi = D.div`
|
|
|
3918
3924
|
}), Xi = (e) => {
|
|
3919
3925
|
const t = (e == null ? void 0 : e.from) ?? 0, n = (e == null ? void 0 : e.to) ?? 0;
|
|
3920
3926
|
return {
|
|
3921
|
-
schema:
|
|
3922
|
-
from:
|
|
3923
|
-
to:
|
|
3927
|
+
schema: Q({
|
|
3928
|
+
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"),
|
|
3929
|
+
to: ge().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
|
|
3924
3930
|
"is-greater",
|
|
3925
3931
|
"El campo 'Rango hasta' debe ser mayor que 'Rango desde'",
|
|
3926
3932
|
function(r) {
|
|
@@ -3932,7 +3938,7 @@ const Pi = D.div`
|
|
|
3932
3938
|
value: { from: t, to: n }
|
|
3933
3939
|
};
|
|
3934
3940
|
}, Ft = (e, t) => t === H.PERCENTAGE ? {
|
|
3935
|
-
schema:
|
|
3941
|
+
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"),
|
|
3936
3942
|
value: e
|
|
3937
3943
|
} : {
|
|
3938
3944
|
schema: be().required("Requerido"),
|
|
@@ -4009,24 +4015,24 @@ function Ji({
|
|
|
4009
4015
|
// );
|
|
4010
4016
|
// }),
|
|
4011
4017
|
conditionsThatEstablishesTheDecision: Qe((l, { parent: s }) => {
|
|
4012
|
-
var
|
|
4013
|
-
if ((s == null ? void 0 : s.toggleNone) && Object.keys(s.conditionsThatEstablishesTheDecision || {}).length > 0) return
|
|
4014
|
-
const d = ((
|
|
4015
|
-
(
|
|
4018
|
+
var h;
|
|
4019
|
+
if ((s == null ? void 0 : s.toggleNone) && Object.keys(s.conditionsThatEstablishesTheDecision || {}).length > 0) return Q().shape({});
|
|
4020
|
+
const d = ((h = e.conditionsThatEstablishesTheDecision) == null ? void 0 : h.reduce(
|
|
4021
|
+
(g, f) => {
|
|
4016
4022
|
if (o.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
|
|
4017
|
-
const
|
|
4023
|
+
const v = Cn(
|
|
4018
4024
|
f.howToSetTheCondition
|
|
4019
4025
|
);
|
|
4020
|
-
|
|
4026
|
+
g[f.conditionName] = v(
|
|
4021
4027
|
f.value,
|
|
4022
4028
|
f.conditionDataType
|
|
4023
4029
|
).schema;
|
|
4024
4030
|
}
|
|
4025
|
-
return
|
|
4031
|
+
return g;
|
|
4026
4032
|
},
|
|
4027
4033
|
{}
|
|
4028
4034
|
)) ?? {};
|
|
4029
|
-
return
|
|
4035
|
+
return Q(d);
|
|
4030
4036
|
})
|
|
4031
4037
|
};
|
|
4032
4038
|
n.terms && (i.effectiveFrom = Le().required(
|
|
@@ -4036,13 +4042,13 @@ function Ji({
|
|
|
4036
4042
|
(l, s, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? s.required("La fecha de finalización es requerida").test(
|
|
4037
4043
|
"is-after-startDate",
|
|
4038
4044
|
"La fecha de finalización debe ser mayor o igual a la fecha de inicio",
|
|
4039
|
-
function(
|
|
4040
|
-
const
|
|
4041
|
-
return !
|
|
4045
|
+
function(h) {
|
|
4046
|
+
const g = this.parent.effectiveFrom;
|
|
4047
|
+
return !g || !h ? !0 : new Date(h) >= new Date(g);
|
|
4042
4048
|
}
|
|
4043
4049
|
) : s.notRequired()
|
|
4044
4050
|
));
|
|
4045
|
-
const c =
|
|
4051
|
+
const c = Q(i);
|
|
4046
4052
|
return o = tn({
|
|
4047
4053
|
initialValues: r,
|
|
4048
4054
|
validationSchema: c,
|
|
@@ -4058,8 +4064,8 @@ function Ji({
|
|
|
4058
4064
|
effectiveFrom: l.effectiveFrom,
|
|
4059
4065
|
validUntil: l.validUntil,
|
|
4060
4066
|
conditionsThatEstablishesTheDecision: (p = e.conditionsThatEstablishesTheDecision) == null ? void 0 : p.filter((d) => {
|
|
4061
|
-
const
|
|
4062
|
-
return
|
|
4067
|
+
const h = l.conditionsThatEstablishesTheDecision[d.conditionName];
|
|
4068
|
+
return h != null && h !== "";
|
|
4063
4069
|
}).map((d) => ({
|
|
4064
4070
|
...d,
|
|
4065
4071
|
value: l.conditionsThatEstablishesTheDecision[d.conditionName]
|
|
@@ -4085,16 +4091,16 @@ function Ji({
|
|
|
4085
4091
|
});
|
|
4086
4092
|
} };
|
|
4087
4093
|
}
|
|
4088
|
-
const Zi =
|
|
4094
|
+
const Zi = N.div`
|
|
4089
4095
|
& > div {
|
|
4090
4096
|
border-radius: 8px;
|
|
4091
4097
|
border: 1px solid
|
|
4092
4098
|
${({ theme: e }) => {
|
|
4093
4099
|
var t, n;
|
|
4094
|
-
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) ||
|
|
4100
|
+
return ((n = (t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N30) || A.palette.neutral.N30;
|
|
4095
4101
|
}};
|
|
4096
4102
|
}
|
|
4097
|
-
`, Ki =
|
|
4103
|
+
`, Ki = N.div`
|
|
4098
4104
|
width: 100%;
|
|
4099
4105
|
height: 100%;
|
|
4100
4106
|
overflow-y: auto;
|
|
@@ -4125,8 +4131,8 @@ const Zi = D.div`
|
|
|
4125
4131
|
};
|
|
4126
4132
|
return Je(() => {
|
|
4127
4133
|
s(t);
|
|
4128
|
-
}, [t]), /* @__PURE__ */
|
|
4129
|
-
/* @__PURE__ */ a(
|
|
4134
|
+
}, [t]), /* @__PURE__ */ b(V, { children: [
|
|
4135
|
+
/* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(
|
|
4130
4136
|
Tt,
|
|
4131
4137
|
{
|
|
4132
4138
|
checked: l,
|
|
@@ -4153,17 +4159,17 @@ const Zi = D.div`
|
|
|
4153
4159
|
valueEnd: s = "",
|
|
4154
4160
|
messageStart: p = "",
|
|
4155
4161
|
messageEnd: d = "",
|
|
4156
|
-
statusStart:
|
|
4157
|
-
statusEnd:
|
|
4158
|
-
} = e, [f, m] = q(c), [
|
|
4162
|
+
statusStart: h = "pending",
|
|
4163
|
+
statusEnd: g = "pending"
|
|
4164
|
+
} = e, [f, m] = q(c), [v, x] = q(l), [w, S] = q(s), D = ({ target: F }) => {
|
|
4159
4165
|
m(F.checked), r && r(F.checked);
|
|
4160
4166
|
}, C = (F) => {
|
|
4161
|
-
|
|
4162
|
-
},
|
|
4167
|
+
x(F.target.value), t(F);
|
|
4168
|
+
}, k = (F) => {
|
|
4163
4169
|
S(F.target.value), n(F);
|
|
4164
|
-
}, L =
|
|
4165
|
-
return /* @__PURE__ */
|
|
4166
|
-
/* @__PURE__ */
|
|
4170
|
+
}, L = ae("(max-width: 400px)");
|
|
4171
|
+
return /* @__PURE__ */ b(V, { children: [
|
|
4172
|
+
/* @__PURE__ */ b(T, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
4167
4173
|
/* @__PURE__ */ a(
|
|
4168
4174
|
R,
|
|
4169
4175
|
{
|
|
@@ -4176,7 +4182,7 @@ const Zi = D.div`
|
|
|
4176
4182
|
}
|
|
4177
4183
|
),
|
|
4178
4184
|
/* @__PURE__ */ a(
|
|
4179
|
-
|
|
4185
|
+
T,
|
|
4180
4186
|
{
|
|
4181
4187
|
alignContent: "center",
|
|
4182
4188
|
justifyContent: "center",
|
|
@@ -4186,7 +4192,7 @@ const Zi = D.div`
|
|
|
4186
4192
|
Zt,
|
|
4187
4193
|
{
|
|
4188
4194
|
label: "Cerrada",
|
|
4189
|
-
onChange:
|
|
4195
|
+
onChange: D,
|
|
4190
4196
|
checked: f,
|
|
4191
4197
|
value: ""
|
|
4192
4198
|
}
|
|
@@ -4194,8 +4200,8 @@ const Zi = D.div`
|
|
|
4194
4200
|
}
|
|
4195
4201
|
)
|
|
4196
4202
|
] }),
|
|
4197
|
-
/* @__PURE__ */
|
|
4198
|
-
|
|
4203
|
+
/* @__PURE__ */ b(
|
|
4204
|
+
T,
|
|
4199
4205
|
{
|
|
4200
4206
|
direction: L ? "column" : "row",
|
|
4201
4207
|
justifyContent: "space-between",
|
|
@@ -4207,10 +4213,10 @@ const Zi = D.div`
|
|
|
4207
4213
|
id: "dateStart",
|
|
4208
4214
|
label: o,
|
|
4209
4215
|
onChange: C,
|
|
4210
|
-
value:
|
|
4216
|
+
value: v,
|
|
4211
4217
|
required: u,
|
|
4212
4218
|
size: "compact",
|
|
4213
|
-
status:
|
|
4219
|
+
status: h,
|
|
4214
4220
|
message: p
|
|
4215
4221
|
}
|
|
4216
4222
|
),
|
|
@@ -4219,11 +4225,11 @@ const Zi = D.div`
|
|
|
4219
4225
|
{
|
|
4220
4226
|
id: "dateEnd",
|
|
4221
4227
|
label: i,
|
|
4222
|
-
onChange:
|
|
4228
|
+
onChange: k,
|
|
4223
4229
|
value: w,
|
|
4224
4230
|
required: u,
|
|
4225
4231
|
size: "compact",
|
|
4226
|
-
status:
|
|
4232
|
+
status: g,
|
|
4227
4233
|
message: d
|
|
4228
4234
|
}
|
|
4229
4235
|
)
|
|
@@ -4244,23 +4250,23 @@ const Zi = D.div`
|
|
|
4244
4250
|
termStartStatus: s,
|
|
4245
4251
|
termEndStatus: p
|
|
4246
4252
|
} = e;
|
|
4247
|
-
return /* @__PURE__ */ a("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */
|
|
4253
|
+
return /* @__PURE__ */ a("form", { onSubmit: t.handleSubmit, children: /* @__PURE__ */ b(T, { direction: "column", gap: "24px", children: [
|
|
4248
4254
|
ft({
|
|
4249
4255
|
condition: i,
|
|
4250
4256
|
formik: t,
|
|
4251
4257
|
isDecision: !0
|
|
4252
4258
|
}),
|
|
4253
4259
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
4254
|
-
/* @__PURE__ */ a(Zi, { children: /* @__PURE__ */ a(Ki, { children: /* @__PURE__ */
|
|
4255
|
-
|
|
4260
|
+
/* @__PURE__ */ a(Zi, { children: /* @__PURE__ */ a(Ki, { children: /* @__PURE__ */ b(
|
|
4261
|
+
T,
|
|
4256
4262
|
{
|
|
4257
4263
|
direction: "column",
|
|
4258
4264
|
padding: "6px 12px",
|
|
4259
4265
|
gap: "16px",
|
|
4260
4266
|
height: "272px",
|
|
4261
4267
|
children: [
|
|
4262
|
-
/* @__PURE__ */
|
|
4263
|
-
|
|
4268
|
+
/* @__PURE__ */ b(
|
|
4269
|
+
T,
|
|
4264
4270
|
{
|
|
4265
4271
|
justifyContent: "space-between",
|
|
4266
4272
|
alignItems: "center",
|
|
@@ -4280,17 +4286,17 @@ const Zi = D.div`
|
|
|
4280
4286
|
]
|
|
4281
4287
|
}
|
|
4282
4288
|
),
|
|
4283
|
-
/* @__PURE__ */ a(
|
|
4289
|
+
/* @__PURE__ */ a(T, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((d) => /* @__PURE__ */ a(
|
|
4284
4290
|
ea,
|
|
4285
4291
|
{
|
|
4286
4292
|
id: `toggle-${d.conditionName}`,
|
|
4287
4293
|
name: `toggle.${d.conditionName}`,
|
|
4288
4294
|
labelToggle: d.labelName,
|
|
4289
4295
|
checked: !t.values.toggleNone && t.values.conditionsThatEstablishesTheDecision[d.conditionName] !== void 0,
|
|
4290
|
-
handleToggleChange: (
|
|
4296
|
+
handleToggleChange: (h) => u(
|
|
4291
4297
|
d.conditionName,
|
|
4292
4298
|
d.howToSetTheCondition === I.LIST_OF_VALUES_MULTI
|
|
4293
|
-
)(
|
|
4299
|
+
)(h.target.checked),
|
|
4294
4300
|
children: ft({ condition: d, formik: t })
|
|
4295
4301
|
},
|
|
4296
4302
|
d.conditionName
|
|
@@ -4298,7 +4304,7 @@ const Zi = D.div`
|
|
|
4298
4304
|
]
|
|
4299
4305
|
}
|
|
4300
4306
|
) }) }),
|
|
4301
|
-
n.terms && /* @__PURE__ */
|
|
4307
|
+
n.terms && /* @__PURE__ */ b(V, { children: [
|
|
4302
4308
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
4303
4309
|
/* @__PURE__ */ a(
|
|
4304
4310
|
ta,
|
|
@@ -4322,13 +4328,13 @@ const Zi = D.div`
|
|
|
4322
4328
|
] }),
|
|
4323
4329
|
/* @__PURE__ */ a(W, {}),
|
|
4324
4330
|
l && /* @__PURE__ */ a(R, { type: "label", size: "medium", appearance: "danger", children: typeof t.errors.conditionsThatEstablishesTheDecision == "string" ? t.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
4325
|
-
/* @__PURE__ */
|
|
4331
|
+
/* @__PURE__ */ b(T, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
4326
4332
|
/* @__PURE__ */ a(Y, { appearance: "gray", onClick: r, children: n.cancel }),
|
|
4327
4333
|
/* @__PURE__ */ a(Y, { type: "submit", children: n.confirm })
|
|
4328
4334
|
] })
|
|
4329
4335
|
] }) });
|
|
4330
4336
|
}, ra = (e) => {
|
|
4331
|
-
var
|
|
4337
|
+
var g;
|
|
4332
4338
|
const { decision: t, onSubmitEvent: n, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: c } = Ji({
|
|
4333
4339
|
decision: t,
|
|
4334
4340
|
onSubmitEvent: n,
|
|
@@ -4339,7 +4345,7 @@ const Zi = D.div`
|
|
|
4339
4345
|
howToSetTheCondition: t.howToSetTheDecision,
|
|
4340
4346
|
decisionDataType: t.decisionDataType,
|
|
4341
4347
|
listOfPossibleValues: t.listOfPossibleValues
|
|
4342
|
-
}, l = ((
|
|
4348
|
+
}, l = ((g = t.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter(
|
|
4343
4349
|
(f) => !f.hidden
|
|
4344
4350
|
)) || [], s = !!i.errors.conditionsThatEstablishesTheDecision && i.submitCount > 0, p = i.touched.effectiveFrom ? i.errors.effectiveFrom ? "invalid" : "valid" : void 0, d = i.touched.validUntil ? i.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
4345
4351
|
return /* @__PURE__ */ a(
|
|
@@ -4352,8 +4358,8 @@ const Zi = D.div`
|
|
|
4352
4358
|
visibleConditions: l,
|
|
4353
4359
|
normalizedDecision: u,
|
|
4354
4360
|
handleToggleNoneChange: c,
|
|
4355
|
-
handleConditionToggleChange: (f, m) => (
|
|
4356
|
-
if (!
|
|
4361
|
+
handleConditionToggleChange: (f, m) => (v) => {
|
|
4362
|
+
if (!v)
|
|
4357
4363
|
i.setFieldValue(
|
|
4358
4364
|
`conditionsThatEstablishesTheDecision.${f}`,
|
|
4359
4365
|
void 0
|
|
@@ -4363,10 +4369,10 @@ const Zi = D.div`
|
|
|
4363
4369
|
!1
|
|
4364
4370
|
);
|
|
4365
4371
|
else {
|
|
4366
|
-
const
|
|
4372
|
+
const x = m ? [] : "";
|
|
4367
4373
|
i.setFieldValue(
|
|
4368
4374
|
`conditionsThatEstablishesTheDecision.${f}`,
|
|
4369
|
-
|
|
4375
|
+
x
|
|
4370
4376
|
);
|
|
4371
4377
|
}
|
|
4372
4378
|
},
|
|
@@ -4413,21 +4419,21 @@ const Zi = D.div`
|
|
|
4413
4419
|
}, De = {
|
|
4414
4420
|
item: {
|
|
4415
4421
|
background: {
|
|
4416
|
-
active:
|
|
4417
|
-
inactive:
|
|
4418
|
-
hover:
|
|
4419
|
-
disabled:
|
|
4422
|
+
active: A.palette.blue.B50,
|
|
4423
|
+
inactive: A.palette.neutral.N0,
|
|
4424
|
+
hover: A.palette.neutral.N20,
|
|
4425
|
+
disabled: A.palette.neutral.N20
|
|
4420
4426
|
}
|
|
4421
4427
|
},
|
|
4422
4428
|
border: {
|
|
4423
4429
|
expanded: {
|
|
4424
|
-
color:
|
|
4430
|
+
color: A.palette.blue.B400
|
|
4425
4431
|
},
|
|
4426
4432
|
contracted: {
|
|
4427
|
-
color:
|
|
4433
|
+
color: A.palette.neutral.N0
|
|
4428
4434
|
}
|
|
4429
4435
|
}
|
|
4430
|
-
}, oa =
|
|
4436
|
+
}, oa = N.div`
|
|
4431
4437
|
& > div {
|
|
4432
4438
|
border: 1px solid
|
|
4433
4439
|
${({ theme: e, $active: t }) => {
|
|
@@ -4443,27 +4449,27 @@ const Zi = D.div`
|
|
|
4443
4449
|
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;
|
|
4444
4450
|
}};
|
|
4445
4451
|
}
|
|
4446
|
-
`, Dn =
|
|
4452
|
+
`, Dn = N.div`
|
|
4447
4453
|
display: flex;
|
|
4448
4454
|
align-items: center;
|
|
4449
4455
|
gap: 12px;
|
|
4450
4456
|
width: 100%;
|
|
4451
4457
|
outline: none;
|
|
4452
4458
|
cursor: pointer;
|
|
4453
|
-
`, ia =
|
|
4459
|
+
`, ia = N.div`
|
|
4454
4460
|
display: flex;
|
|
4455
4461
|
align-items: center;
|
|
4456
4462
|
outline: none;
|
|
4457
4463
|
cursor: pointer;
|
|
4458
|
-
`, aa =
|
|
4464
|
+
`, aa = N(Un)`
|
|
4459
4465
|
display: flex;
|
|
4460
4466
|
align-items: center;
|
|
4461
4467
|
text-decoration: none;
|
|
4462
|
-
`, la =
|
|
4468
|
+
`, la = N(Un)`
|
|
4463
4469
|
display: block;
|
|
4464
4470
|
text-decoration: none;
|
|
4465
4471
|
color: inherit;
|
|
4466
|
-
`, sa =
|
|
4472
|
+
`, sa = N.div`
|
|
4467
4473
|
& > div {
|
|
4468
4474
|
border-bottom: 1px solid
|
|
4469
4475
|
${({ theme: e, $active: t }) => {
|
|
@@ -4472,7 +4478,7 @@ const Zi = D.div`
|
|
|
4472
4478
|
}};
|
|
4473
4479
|
border-radius: 8px 8px 0 0;
|
|
4474
4480
|
}
|
|
4475
|
-
`, Wn =
|
|
4481
|
+
`, Wn = N.div`
|
|
4476
4482
|
display: block;
|
|
4477
4483
|
text-decoration: none;
|
|
4478
4484
|
background-color: ${({ theme: e, $active: t }) => {
|
|
@@ -4490,7 +4496,7 @@ const Zi = D.div`
|
|
|
4490
4496
|
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;
|
|
4491
4497
|
}};
|
|
4492
4498
|
}
|
|
4493
|
-
`, da =
|
|
4499
|
+
`, da = N.div`
|
|
4494
4500
|
display: flex;
|
|
4495
4501
|
flex-direction: column;
|
|
4496
4502
|
|
|
@@ -4498,35 +4504,35 @@ const Zi = D.div`
|
|
|
4498
4504
|
border-radius: 0 0 8px 8px;
|
|
4499
4505
|
}
|
|
4500
4506
|
`, ca = (e) => {
|
|
4501
|
-
const { isOpen: t, links: n, onClick: r, title: o, activeId: i, headerPath: c, headerActive: u, onBeforeNavigate: l } = e, s = Nr(), p = (
|
|
4502
|
-
(
|
|
4503
|
-
}, d = (
|
|
4504
|
-
|
|
4505
|
-
},
|
|
4506
|
-
(
|
|
4507
|
-
},
|
|
4508
|
-
async (
|
|
4509
|
-
l && !await l(
|
|
4507
|
+
const { isOpen: t, links: n, onClick: r, title: o, activeId: i, headerPath: c, headerActive: u, onBeforeNavigate: l } = e, s = Nr(), p = (x) => {
|
|
4508
|
+
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), r());
|
|
4509
|
+
}, d = (x) => {
|
|
4510
|
+
x.preventDefault(), x.stopPropagation(), r();
|
|
4511
|
+
}, h = (x) => {
|
|
4512
|
+
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), x.stopPropagation(), r());
|
|
4513
|
+
}, g = _.useCallback(
|
|
4514
|
+
async (x, w) => {
|
|
4515
|
+
l && !await l(x, w) || s(x);
|
|
4510
4516
|
},
|
|
4511
4517
|
[s, l]
|
|
4512
|
-
), f = t || u ? "primary" : "dark", m = t || u ? "bold" : "normal",
|
|
4513
|
-
return /* @__PURE__ */ a(oa, { $active: t, children: /* @__PURE__ */
|
|
4518
|
+
), f = t || u ? "primary" : "dark", m = t || u ? "bold" : "normal", v = _.useId();
|
|
4519
|
+
return /* @__PURE__ */ a(oa, { $active: t, children: /* @__PURE__ */ b(pe, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
4514
4520
|
/* @__PURE__ */ a(
|
|
4515
4521
|
sa,
|
|
4516
4522
|
{
|
|
4517
4523
|
$active: t && n.length > 0,
|
|
4518
|
-
"aria-controls":
|
|
4524
|
+
"aria-controls": v,
|
|
4519
4525
|
"aria-expanded": t,
|
|
4520
4526
|
onClick: d,
|
|
4521
|
-
onKeyDown:
|
|
4522
|
-
children: c ? /* @__PURE__ */ a(aa, { to: c, onClick: async (
|
|
4523
|
-
|
|
4527
|
+
onKeyDown: h,
|
|
4528
|
+
children: c ? /* @__PURE__ */ a(aa, { to: c, onClick: async (x) => {
|
|
4529
|
+
x.preventDefault(), x.stopPropagation(), await g(c, {
|
|
4524
4530
|
id: c,
|
|
4525
4531
|
path: c,
|
|
4526
4532
|
label: o
|
|
4527
4533
|
});
|
|
4528
|
-
}, children: /* @__PURE__ */
|
|
4529
|
-
|
|
4534
|
+
}, children: /* @__PURE__ */ b(
|
|
4535
|
+
pe,
|
|
4530
4536
|
{
|
|
4531
4537
|
alignItems: "center",
|
|
4532
4538
|
borderRadius: "8px",
|
|
@@ -4555,8 +4561,8 @@ const Zi = D.div`
|
|
|
4555
4561
|
) })
|
|
4556
4562
|
]
|
|
4557
4563
|
}
|
|
4558
|
-
) }) : /* @__PURE__ */
|
|
4559
|
-
|
|
4564
|
+
) }) : /* @__PURE__ */ b(
|
|
4565
|
+
pe,
|
|
4560
4566
|
{
|
|
4561
4567
|
alignItems: "center",
|
|
4562
4568
|
borderRadius: "8px",
|
|
@@ -4575,7 +4581,7 @@ const Zi = D.div`
|
|
|
4575
4581
|
/* @__PURE__ */ a(Dn, { children: /* @__PURE__ */ a(
|
|
4576
4582
|
ia,
|
|
4577
4583
|
{
|
|
4578
|
-
"aria-controls":
|
|
4584
|
+
"aria-controls": v,
|
|
4579
4585
|
"aria-expanded": t,
|
|
4580
4586
|
onClick: r,
|
|
4581
4587
|
onKeyDown: p,
|
|
@@ -4598,19 +4604,19 @@ const Zi = D.div`
|
|
|
4598
4604
|
)
|
|
4599
4605
|
}
|
|
4600
4606
|
),
|
|
4601
|
-
t && n.length > 0 && /* @__PURE__ */ a(da, { id:
|
|
4602
|
-
const w =
|
|
4603
|
-
return /* @__PURE__ */ a(la, { to:
|
|
4604
|
-
S.preventDefault(), S.stopPropagation(), await
|
|
4605
|
-
}, children: /* @__PURE__ */ a(Wn, { $active: w, children: /* @__PURE__ */
|
|
4606
|
-
|
|
4607
|
+
t && n.length > 0 && /* @__PURE__ */ a(da, { id: v, children: n.map((x) => {
|
|
4608
|
+
const w = x.id === i;
|
|
4609
|
+
return /* @__PURE__ */ a(la, { to: x.path, onClick: async (S) => {
|
|
4610
|
+
S.preventDefault(), S.stopPropagation(), await g(x.path, x);
|
|
4611
|
+
}, children: /* @__PURE__ */ a(Wn, { $active: w, children: /* @__PURE__ */ b(
|
|
4612
|
+
T,
|
|
4607
4613
|
{
|
|
4608
4614
|
alignItems: "center",
|
|
4609
4615
|
direction: "row",
|
|
4610
4616
|
gap: "8px",
|
|
4611
4617
|
padding: w ? "8px 4px" : "8px 32px",
|
|
4612
4618
|
children: [
|
|
4613
|
-
w && /* @__PURE__ */ a(B, { appearance: "primary", icon: /* @__PURE__ */ a(
|
|
4619
|
+
w && /* @__PURE__ */ a(B, { appearance: "primary", icon: /* @__PURE__ */ a(gr, {}) }),
|
|
4614
4620
|
/* @__PURE__ */ a(
|
|
4615
4621
|
R,
|
|
4616
4622
|
{
|
|
@@ -4618,19 +4624,19 @@ const Zi = D.div`
|
|
|
4618
4624
|
size: "small",
|
|
4619
4625
|
type: "title",
|
|
4620
4626
|
weight: w ? "bold" : "normal",
|
|
4621
|
-
children:
|
|
4627
|
+
children: x.label
|
|
4622
4628
|
}
|
|
4623
4629
|
)
|
|
4624
4630
|
]
|
|
4625
4631
|
}
|
|
4626
|
-
) }) },
|
|
4632
|
+
) }) }, x.id);
|
|
4627
4633
|
}) })
|
|
4628
4634
|
] }) });
|
|
4629
|
-
}, ua =
|
|
4635
|
+
}, ua = N.div`
|
|
4630
4636
|
& > div {
|
|
4631
4637
|
background: ${({ $background: e, theme: t }) => {
|
|
4632
4638
|
var n, r, o, i;
|
|
4633
|
-
return e ? `${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N20) ||
|
|
4639
|
+
return e ? `${((r = (n = t == null ? void 0 : t.palette) == null ? void 0 : n.neutral) == null ? void 0 : r.N20) || A.palette.neutral.N20}` : `${((i = (o = t == null ? void 0 : t.palette) == null ? void 0 : o.neutral) == null ? void 0 : i.N0) || A.palette.neutral.N0}`;
|
|
4634
4640
|
}};
|
|
4635
4641
|
}
|
|
4636
4642
|
height: 90vh;
|
|
@@ -4642,8 +4648,8 @@ const Zi = D.div`
|
|
|
4642
4648
|
}, Ss = (e) => {
|
|
4643
4649
|
const { collapseOnNavigate: t = !1, defaultOpenId: n = null, groups: r, onBeforeNavigate: o } = e, i = Er(), [c, u] = _.useState(n), l = _.useRef(i.pathname), s = _.useCallback(
|
|
4644
4650
|
(d) => {
|
|
4645
|
-
var
|
|
4646
|
-
return (
|
|
4651
|
+
var h;
|
|
4652
|
+
return (h = d.find((g) => g.path === i.pathname)) == null ? void 0 : h.id;
|
|
4647
4653
|
},
|
|
4648
4654
|
[i.pathname]
|
|
4649
4655
|
), p = _.useCallback(
|
|
@@ -4656,13 +4662,13 @@ const Zi = D.div`
|
|
|
4656
4662
|
u(null);
|
|
4657
4663
|
return;
|
|
4658
4664
|
}
|
|
4659
|
-
const
|
|
4660
|
-
if (
|
|
4661
|
-
u(
|
|
4665
|
+
const h = pa(i.pathname, r);
|
|
4666
|
+
if (h) {
|
|
4667
|
+
u(h);
|
|
4662
4668
|
return;
|
|
4663
4669
|
}
|
|
4664
4670
|
n && u(n);
|
|
4665
|
-
}, [t, n, r, i.pathname]), /* @__PURE__ */ a(ua, { $background: !0, children: /* @__PURE__ */ a(
|
|
4671
|
+
}, [t, n, r, i.pathname]), /* @__PURE__ */ a(ua, { $background: !0, children: /* @__PURE__ */ a(T, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((d) => /* @__PURE__ */ a(
|
|
4666
4672
|
ca,
|
|
4667
4673
|
{
|
|
4668
4674
|
activeId: s(d.links),
|
|
@@ -4670,7 +4676,7 @@ const Zi = D.div`
|
|
|
4670
4676
|
headerActive: p(d.path),
|
|
4671
4677
|
isOpen: c === d.id,
|
|
4672
4678
|
links: d.links,
|
|
4673
|
-
onClick: () => u((
|
|
4679
|
+
onClick: () => u((h) => h === d.id ? null : d.id),
|
|
4674
4680
|
title: d.title,
|
|
4675
4681
|
onBeforeNavigate: o
|
|
4676
4682
|
},
|
|
@@ -4695,7 +4701,7 @@ function Yn() {
|
|
|
4695
4701
|
}];
|
|
4696
4702
|
}
|
|
4697
4703
|
var [Xn, Qn] = Yn();
|
|
4698
|
-
function
|
|
4704
|
+
function ha(e, t) {
|
|
4699
4705
|
return e.source === t.source && e.flags.split("").sort().join("") === t.flags.split("").sort().join("");
|
|
4700
4706
|
}
|
|
4701
4707
|
function Ze(e, t, n = !0, r = ["__key"]) {
|
|
@@ -4705,7 +4711,7 @@ function Ze(e, t, n = !0, r = ["__key"]) {
|
|
|
4705
4711
|
if (e instanceof Date && t instanceof Date)
|
|
4706
4712
|
return e.getTime() === t.getTime();
|
|
4707
4713
|
if (e instanceof RegExp && t instanceof RegExp)
|
|
4708
|
-
return
|
|
4714
|
+
return ha(e, t);
|
|
4709
4715
|
if (e === null || t === null) return !1;
|
|
4710
4716
|
const o = e, i = t;
|
|
4711
4717
|
if (Object.keys(o).length !== Object.keys(i).length) return !1;
|
|
@@ -4724,7 +4730,7 @@ function je(e) {
|
|
|
4724
4730
|
return { x: e.clientX, y: e.clientY };
|
|
4725
4731
|
}
|
|
4726
4732
|
Array();
|
|
4727
|
-
var on = typeof window < "u",
|
|
4733
|
+
var on = typeof window < "u", J = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap();
|
|
4728
4734
|
function Zn() {
|
|
4729
4735
|
if (!on) return !1;
|
|
4730
4736
|
if ("userAgentData" in navigator)
|
|
@@ -4732,7 +4738,7 @@ function Zn() {
|
|
|
4732
4738
|
const e = navigator.userAgent, t = /android|iphone|ipod/i.test(e), n = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
4733
4739
|
return t || n;
|
|
4734
4740
|
}
|
|
4735
|
-
var
|
|
4741
|
+
var ga = {
|
|
4736
4742
|
affectedNodes: [],
|
|
4737
4743
|
coordinates: {
|
|
4738
4744
|
x: 0,
|
|
@@ -4766,9 +4772,9 @@ var ha = {
|
|
|
4766
4772
|
scrollDebounceTimeout: void 0,
|
|
4767
4773
|
frameIdX: void 0,
|
|
4768
4774
|
frameIdY: void 0
|
|
4769
|
-
},
|
|
4775
|
+
}, y = ga, Ee = !1, Nn, Lt;
|
|
4770
4776
|
function fa() {
|
|
4771
|
-
|
|
4777
|
+
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 = { ...{
|
|
4772
4778
|
affectedNodes: [],
|
|
4773
4779
|
coordinates: {
|
|
4774
4780
|
x: 0,
|
|
@@ -4809,49 +4815,49 @@ function fa() {
|
|
|
4809
4815
|
} };
|
|
4810
4816
|
}
|
|
4811
4817
|
function Kn(e) {
|
|
4812
|
-
return Object.assign(
|
|
4818
|
+
return Object.assign(y, e), e.initialParent.data.emit("dragStarted", y), Ee = !1, y.emit("dragStarted", y), y;
|
|
4813
4819
|
}
|
|
4814
4820
|
function ma() {
|
|
4815
|
-
|
|
4821
|
+
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;
|
|
4816
4822
|
}
|
|
4817
4823
|
function ba() {
|
|
4818
|
-
if (
|
|
4819
|
-
const e =
|
|
4820
|
-
|
|
4824
|
+
if (y.pointerDown && (y.pointerDown.node.el.draggable = !0), y.pointerDown = void 0, !le(y)) return;
|
|
4825
|
+
const e = y.currentParent.data.config;
|
|
4826
|
+
le(y) && e.handleEnd(y);
|
|
4821
4827
|
}
|
|
4822
4828
|
function va(e) {
|
|
4823
|
-
e.key === "Escape" && (
|
|
4829
|
+
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);
|
|
4824
4830
|
}
|
|
4825
4831
|
function ya(e) {
|
|
4826
|
-
if (!K(
|
|
4832
|
+
if (!K(y)) return;
|
|
4827
4833
|
Ee = !0;
|
|
4828
|
-
const t =
|
|
4829
|
-
t(
|
|
4834
|
+
const t = y.initialParent.data.config.handleEnd;
|
|
4835
|
+
t(y);
|
|
4830
4836
|
}
|
|
4831
4837
|
function Ta(e) {
|
|
4832
|
-
if (!K(
|
|
4838
|
+
if (!K(y)) return;
|
|
4833
4839
|
Z(e);
|
|
4834
4840
|
const { x: t, y: n } = je(e);
|
|
4835
|
-
K(
|
|
4841
|
+
K(y) && St({ x: t, y: n }, e, y);
|
|
4836
4842
|
}
|
|
4837
4843
|
function xa(e) {
|
|
4838
|
-
if (!
|
|
4839
|
-
const t =
|
|
4844
|
+
if (!y.pointerDown || !y.pointerDown.validated) return;
|
|
4845
|
+
const t = y.pointerDown.parent.data.config;
|
|
4840
4846
|
if (!(e.pointerType === "mouse" && !Zn()))
|
|
4841
|
-
if (
|
|
4842
|
-
|
|
4847
|
+
if (le(y))
|
|
4848
|
+
le(y) && En(e, y);
|
|
4843
4849
|
else {
|
|
4844
|
-
if (Z(e), t.longPress && !
|
|
4845
|
-
clearTimeout(
|
|
4850
|
+
if (Z(e), t.longPress && !y.longPress) {
|
|
4851
|
+
clearTimeout(y.longPressTimeout), y.longPress = !1;
|
|
4846
4852
|
return;
|
|
4847
4853
|
}
|
|
4848
|
-
const n = t.draggedNodes(
|
|
4849
|
-
t.dragstartClasses(
|
|
4850
|
-
const r =
|
|
4851
|
-
|
|
4852
|
-
|
|
4854
|
+
const n = t.draggedNodes(y.pointerDown);
|
|
4855
|
+
t.dragstartClasses(y.pointerDown.node, n, t, !0);
|
|
4856
|
+
const r = y.pointerDown.node.el.getBoundingClientRect(), o = Qa(
|
|
4857
|
+
y.pointerDown.node,
|
|
4858
|
+
y.pointerDown.parent,
|
|
4853
4859
|
e,
|
|
4854
|
-
|
|
4860
|
+
y,
|
|
4855
4861
|
n,
|
|
4856
4862
|
r
|
|
4857
4863
|
);
|
|
@@ -4873,12 +4879,12 @@ function wa({
|
|
|
4873
4879
|
keydown: va,
|
|
4874
4880
|
drop: ya,
|
|
4875
4881
|
pointermove: xa,
|
|
4876
|
-
pointercancel:
|
|
4882
|
+
pointercancel: ne(r.handlePointercancel),
|
|
4877
4883
|
touchmove: (d) => {
|
|
4878
|
-
K(
|
|
4884
|
+
K(y) && d.cancelable && Z(d);
|
|
4879
4885
|
},
|
|
4880
4886
|
contextmenu: (d) => {
|
|
4881
|
-
|
|
4887
|
+
le(y) && Z(d);
|
|
4882
4888
|
}
|
|
4883
4889
|
})), tr(e);
|
|
4884
4890
|
const [o, i] = Yn(), c = {
|
|
@@ -4931,15 +4937,15 @@ function wa({
|
|
|
4931
4937
|
on: i,
|
|
4932
4938
|
emit: o
|
|
4933
4939
|
};
|
|
4934
|
-
new MutationObserver(Ra).observe(e, { childList: !0 }),
|
|
4935
|
-
var
|
|
4936
|
-
(
|
|
4940
|
+
new MutationObserver(Ra).observe(e, { childList: !0 }), J.set(e, c), (l = r.plugins) == null || l.forEach((d) => {
|
|
4941
|
+
var h, g;
|
|
4942
|
+
(g = (h = d(e)) == null ? void 0 : h.tearDown) == null || g.call(h);
|
|
4937
4943
|
}), (s = r.plugins) == null || s.forEach((d) => {
|
|
4938
|
-
var
|
|
4939
|
-
(
|
|
4944
|
+
var h, g;
|
|
4945
|
+
(g = (h = d(e)) == null ? void 0 : h.tearDown) == null || g.call(h);
|
|
4940
4946
|
}), (p = r.plugins) == null || p.forEach((d) => {
|
|
4941
|
-
var
|
|
4942
|
-
(
|
|
4947
|
+
var h, g;
|
|
4948
|
+
(g = (h = d(e)) == null ? void 0 : h.setup) == null || g.call(h);
|
|
4943
4949
|
}), Ea(e, c), xt(e, !0);
|
|
4944
4950
|
}
|
|
4945
4951
|
function er(e, t, n, r, o, i) {
|
|
@@ -4986,7 +4992,7 @@ function Sa({
|
|
|
4986
4992
|
const r = t.map((l) => l.data.value), o = Me(e.el, e.data), i = t[0].data.index, c = [...e.data.enabledNodes], u = [
|
|
4987
4993
|
...o.filter((l) => !r.some((s) => Ze(l, s)))
|
|
4988
4994
|
];
|
|
4989
|
-
u.splice(n[0].data.index, 0, ...r), "draggedNode" in
|
|
4995
|
+
u.splice(n[0].data.index, 0, ...r), "draggedNode" in y && (y.currentTargetValue = n[0].data.value), Wt(e.el, e.data, [...u]), e.data.config.onSort && e.data.config.onSort({
|
|
4990
4996
|
parent: {
|
|
4991
4997
|
el: e.el,
|
|
4992
4998
|
data: e.data
|
|
@@ -4999,7 +5005,7 @@ function Sa({
|
|
|
4999
5005
|
previousPosition: i,
|
|
5000
5006
|
position: n[0].data.index,
|
|
5001
5007
|
targetNodes: n,
|
|
5002
|
-
state:
|
|
5008
|
+
state: y
|
|
5003
5009
|
});
|
|
5004
5010
|
}
|
|
5005
5011
|
function $e(e, t, n) {
|
|
@@ -5049,9 +5055,9 @@ function Da({
|
|
|
5049
5055
|
state: c
|
|
5050
5056
|
}) {
|
|
5051
5057
|
xt(n.el);
|
|
5052
|
-
const u = r.map((
|
|
5058
|
+
const u = r.map((h) => h.data.value), l = [
|
|
5053
5059
|
...Me(e.el, e.data).filter(
|
|
5054
|
-
(
|
|
5060
|
+
(h) => !u.some((g) => Ze(h, g))
|
|
5055
5061
|
)
|
|
5056
5062
|
], s = Me(t.el, t.data), p = n.el === t.el && t.data.config.sortable === !1;
|
|
5057
5063
|
let d;
|
|
@@ -5085,13 +5091,13 @@ function Na(e, t) {
|
|
|
5085
5091
|
n(t);
|
|
5086
5092
|
}
|
|
5087
5093
|
function tr(e) {
|
|
5088
|
-
const t =
|
|
5094
|
+
const t = J.get(e);
|
|
5089
5095
|
t && t.abortControllers.mainParent && t.abortControllers.mainParent.abort();
|
|
5090
5096
|
}
|
|
5091
5097
|
function K(e) {
|
|
5092
5098
|
return "draggedNode" in e && !!e.draggedNode;
|
|
5093
5099
|
}
|
|
5094
|
-
function
|
|
5100
|
+
function le(e) {
|
|
5095
5101
|
return "synthDragging" in e && !!e.synthDragging;
|
|
5096
5102
|
}
|
|
5097
5103
|
function Ea(e, t) {
|
|
@@ -5101,7 +5107,7 @@ function Ea(e, t) {
|
|
|
5101
5107
|
scroll: pt(t.config.handleParentScroll),
|
|
5102
5108
|
drop: pt(t.config.handleParentDrop),
|
|
5103
5109
|
hasNestedParent: (n) => {
|
|
5104
|
-
const r =
|
|
5110
|
+
const r = J.get(n.target);
|
|
5105
5111
|
r && (r.nestedParent = n.detail.parent);
|
|
5106
5112
|
},
|
|
5107
5113
|
focus: pt(t.config.handleParentFocus)
|
|
@@ -5122,8 +5128,8 @@ function Ea(e, t) {
|
|
|
5122
5128
|
if (!o) return;
|
|
5123
5129
|
const i = r.parentNode;
|
|
5124
5130
|
if (!(i instanceof HTMLElement)) return;
|
|
5125
|
-
const c =
|
|
5126
|
-
c && (
|
|
5131
|
+
const c = J.get(i);
|
|
5132
|
+
c && (y.pointerDown = {
|
|
5127
5133
|
parent: {
|
|
5128
5134
|
el: i,
|
|
5129
5135
|
data: c
|
|
@@ -5142,24 +5148,24 @@ function ka(e) {
|
|
|
5142
5148
|
var n;
|
|
5143
5149
|
const t = e.parent.data.config;
|
|
5144
5150
|
e.node.data.abortControllers.mainNode = bt(e.node.el, {
|
|
5145
|
-
keydown:
|
|
5146
|
-
dragstart:
|
|
5147
|
-
dragover:
|
|
5148
|
-
dragenter:
|
|
5149
|
-
dragleave:
|
|
5150
|
-
dragend:
|
|
5151
|
-
drop:
|
|
5152
|
-
focus:
|
|
5153
|
-
blur:
|
|
5154
|
-
pointerup:
|
|
5155
|
-
pointercancel:
|
|
5156
|
-
pointerdown:
|
|
5151
|
+
keydown: ne(t.handleNodeKeydown),
|
|
5152
|
+
dragstart: ne(t.handleDragstart),
|
|
5153
|
+
dragover: ne(t.handleNodeDragover),
|
|
5154
|
+
dragenter: ne(t.handleNodeDragenter),
|
|
5155
|
+
dragleave: ne(t.handleNodeDragleave),
|
|
5156
|
+
dragend: ne(t.handleDragend),
|
|
5157
|
+
drop: ne(t.handleNodeDrop),
|
|
5158
|
+
focus: ne(t.handleNodeFocus),
|
|
5159
|
+
blur: ne(t.handleNodeBlur),
|
|
5160
|
+
pointerup: ne(t.handleNodePointerup),
|
|
5161
|
+
pointercancel: ne(t.handlePointercancel),
|
|
5162
|
+
pointerdown: ne(t.handleNodePointerdown),
|
|
5157
5163
|
handleNodePointerover: t.handleNodePointerover,
|
|
5158
5164
|
touchmove: (r) => {
|
|
5159
|
-
K(
|
|
5165
|
+
K(y) && r.cancelable && Z(r);
|
|
5160
5166
|
},
|
|
5161
5167
|
contextmenu: (r) => {
|
|
5162
|
-
|
|
5168
|
+
le(y) && Z(r);
|
|
5163
5169
|
}
|
|
5164
5170
|
}), e.node.el.draggable = !0, t.reapplyDragClasses(e.node.el, e.parent.data), (n = e.parent.data.config.plugins) == null || n.forEach((r) => {
|
|
5165
5171
|
var o, i;
|
|
@@ -5174,9 +5180,9 @@ function nr(e) {
|
|
|
5174
5180
|
});
|
|
5175
5181
|
}
|
|
5176
5182
|
function Aa(e, t) {
|
|
5177
|
-
if (!K(
|
|
5178
|
-
const n =
|
|
5179
|
-
|
|
5183
|
+
if (!K(y)) return;
|
|
5184
|
+
const n = le(y) ? t.config.synthDropZoneClass : t.config.dropZoneClass;
|
|
5185
|
+
y.draggedNode.el === e && Oe([e], n, !0);
|
|
5180
5186
|
}
|
|
5181
5187
|
function $a(e) {
|
|
5182
5188
|
var t;
|
|
@@ -5196,11 +5202,11 @@ function Ra(e) {
|
|
|
5196
5202
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
5197
5203
|
return;
|
|
5198
5204
|
const t = e[0].target;
|
|
5199
|
-
!(t instanceof HTMLElement) || !
|
|
5205
|
+
!(t instanceof HTMLElement) || !J.get(t) || xt(t);
|
|
5200
5206
|
}
|
|
5201
5207
|
function xt(e, t) {
|
|
5202
5208
|
var u;
|
|
5203
|
-
const n =
|
|
5209
|
+
const n = J.get(e);
|
|
5204
5210
|
if (!n) return;
|
|
5205
5211
|
n.privateClasses = Array.from(e.classList);
|
|
5206
5212
|
const r = [], o = n.config;
|
|
@@ -5239,7 +5245,7 @@ function xt(e, t) {
|
|
|
5239
5245
|
index: l
|
|
5240
5246
|
}
|
|
5241
5247
|
);
|
|
5242
|
-
if (!K(
|
|
5248
|
+
if (!K(y) && y.activeState && Ze(y.activeState.node.data.value, d.value) && $e(
|
|
5243
5249
|
{
|
|
5244
5250
|
data: n,
|
|
5245
5251
|
el: e
|
|
@@ -5248,13 +5254,13 @@ function xt(e, t) {
|
|
|
5248
5254
|
el: s,
|
|
5249
5255
|
data: d
|
|
5250
5256
|
},
|
|
5251
|
-
|
|
5252
|
-
), K(
|
|
5253
|
-
|
|
5254
|
-
const
|
|
5255
|
-
(
|
|
5257
|
+
y
|
|
5258
|
+
), K(y) && Ze(y.draggedNode.data.value, d.value)) {
|
|
5259
|
+
y.draggedNode.data = d, y.draggedNode.el = s;
|
|
5260
|
+
const h = y.draggedNodes.find(
|
|
5261
|
+
(g) => g.data.value === d.value
|
|
5256
5262
|
);
|
|
5257
|
-
|
|
5263
|
+
h && (h.el = s);
|
|
5258
5264
|
}
|
|
5259
5265
|
c.push({
|
|
5260
5266
|
el: s,
|
|
@@ -5279,13 +5285,13 @@ function xt(e, t) {
|
|
|
5279
5285
|
}
|
|
5280
5286
|
});
|
|
5281
5287
|
}
|
|
5282
|
-
|
|
5288
|
+
J.set(e, { ...n, enabledNodes: c }), o.remapFinished(n), (u = n.config.plugins) == null || u.forEach((l) => {
|
|
5283
5289
|
var s, p;
|
|
5284
5290
|
(p = (s = l(e)) == null ? void 0 : s.remapFinished) == null || p.call(s);
|
|
5285
5291
|
});
|
|
5286
5292
|
}
|
|
5287
5293
|
function Oa() {
|
|
5288
|
-
|
|
5294
|
+
y.remapJustFinished = !0, "draggedNode" in y && (y.affectedNodes = []);
|
|
5289
5295
|
}
|
|
5290
5296
|
function Fa(e) {
|
|
5291
5297
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
@@ -5293,10 +5299,10 @@ function Fa(e) {
|
|
|
5293
5299
|
function La(e) {
|
|
5294
5300
|
var t;
|
|
5295
5301
|
if (e.parent.data.config.multiDrag) {
|
|
5296
|
-
if (
|
|
5302
|
+
if (y.selectedState)
|
|
5297
5303
|
return [
|
|
5298
5304
|
e.node,
|
|
5299
|
-
...(t =
|
|
5305
|
+
...(t = y.selectedState) == null ? void 0 : t.nodes.filter(
|
|
5300
5306
|
(n) => n.el !== e.node.el
|
|
5301
5307
|
)
|
|
5302
5308
|
];
|
|
@@ -5304,8 +5310,8 @@ function La(e) {
|
|
|
5304
5310
|
return [];
|
|
5305
5311
|
}
|
|
5306
5312
|
function Ma(e) {
|
|
5307
|
-
K(
|
|
5308
|
-
|
|
5313
|
+
K(y) && (y.emit("scrollStarted", y), !le(y) && (y.preventEnter = !0, Lt && clearTimeout(Lt), Lt = setTimeout(() => {
|
|
5314
|
+
y.preventEnter = !1, y.emit("scrollEnded", y);
|
|
5309
5315
|
}, 100)));
|
|
5310
5316
|
}
|
|
5311
5317
|
function ja(e, t) {
|
|
@@ -5517,10 +5523,10 @@ function za(e, t) {
|
|
|
5517
5523
|
n.nativeDrag && (ke(e.e), Ee = !0, n.handleEnd(t));
|
|
5518
5524
|
}
|
|
5519
5525
|
function Ha(e) {
|
|
5520
|
-
e.e.target !== e.e.currentTarget &&
|
|
5526
|
+
e.e.target !== e.e.currentTarget && y.pointerDown && (y.pointerDown.node.el.draggable = !1);
|
|
5521
5527
|
}
|
|
5522
5528
|
function Ba(e) {
|
|
5523
|
-
e.e.target !== e.e.currentTarget &&
|
|
5529
|
+
e.e.target !== e.e.currentTarget && y.pointerDown && (y.pointerDown.node.el.draggable = !0);
|
|
5524
5530
|
}
|
|
5525
5531
|
function qa(e, t) {
|
|
5526
5532
|
const n = e.targetData.parent.data.config;
|
|
@@ -5534,12 +5540,12 @@ function qa(e, t) {
|
|
|
5534
5540
|
}
|
|
5535
5541
|
function Wa(e, t) {
|
|
5536
5542
|
var r;
|
|
5537
|
-
if (!
|
|
5543
|
+
if (!le(t)) return;
|
|
5538
5544
|
if (Z(e.e), Ee) {
|
|
5539
5545
|
Ee = !1;
|
|
5540
5546
|
return;
|
|
5541
5547
|
}
|
|
5542
|
-
const n = (r =
|
|
5548
|
+
const n = (r = J.get(t.initialParent.el)) == null ? void 0 : r.config;
|
|
5543
5549
|
n != null && n.onDragend && n.onDragend({
|
|
5544
5550
|
parent: t.currentParent,
|
|
5545
5551
|
values: Me(t.currentParent.el, t.currentParent.data),
|
|
@@ -5549,10 +5555,10 @@ function Wa(e, t) {
|
|
|
5549
5555
|
}), n == null || n.handleEnd(t);
|
|
5550
5556
|
}
|
|
5551
5557
|
function Ya(e) {
|
|
5552
|
-
var p, d,
|
|
5558
|
+
var p, d, h, g, f;
|
|
5553
5559
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
5554
|
-
const t = e.draggedNodes.map((m) => m.el), n = e.initialParent.data, r =
|
|
5555
|
-
|
|
5560
|
+
const t = e.draggedNodes.map((m) => m.el), n = e.initialParent.data, r = le(e), o = (p = J.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;
|
|
5561
|
+
le(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Yt(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(() => {
|
|
5556
5562
|
Ne(t, i), Ne(t, c), Ne(t, u);
|
|
5557
5563
|
}), Ae(e.draggedNodes, e.currentParent, e), $e(e.currentParent, void 0, e);
|
|
5558
5564
|
const s = { ...e };
|
|
@@ -5607,13 +5613,13 @@ function Qa(e, t, n, r, o, i) {
|
|
|
5607
5613
|
"height",
|
|
5608
5614
|
"boxSizing",
|
|
5609
5615
|
"overflow"
|
|
5610
|
-
], p = (
|
|
5611
|
-
const w = window.getComputedStyle(
|
|
5616
|
+
], p = (v, x) => {
|
|
5617
|
+
const w = window.getComputedStyle(v);
|
|
5612
5618
|
s.forEach((S) => {
|
|
5613
|
-
|
|
5619
|
+
x.style[S] = w[S];
|
|
5614
5620
|
});
|
|
5615
|
-
}, d = (
|
|
5616
|
-
Object.assign(
|
|
5621
|
+
}, d = (v, x = {}) => {
|
|
5622
|
+
Object.assign(v.style, {
|
|
5617
5623
|
position: "absolute",
|
|
5618
5624
|
zIndex: "9999",
|
|
5619
5625
|
pointerEvents: "none",
|
|
@@ -5623,7 +5629,7 @@ function Qa(e, t, n, r, o, i) {
|
|
|
5623
5629
|
overflow: "hidden",
|
|
5624
5630
|
width: `${i.width}px`,
|
|
5625
5631
|
height: `${i.height}px`,
|
|
5626
|
-
...
|
|
5632
|
+
...x
|
|
5627
5633
|
});
|
|
5628
5634
|
};
|
|
5629
5635
|
if (c.synthDragImage)
|
|
@@ -5631,14 +5637,14 @@ function Qa(e, t, n, r, o, i) {
|
|
|
5631
5637
|
else if (!c.multiDrag || o.length === 1)
|
|
5632
5638
|
u = e.el.cloneNode(!0), p(e.el, u), u.setAttribute("popover", "manual"), d(u);
|
|
5633
5639
|
else {
|
|
5634
|
-
const
|
|
5635
|
-
|
|
5636
|
-
const w =
|
|
5637
|
-
p(
|
|
5638
|
-
}),
|
|
5640
|
+
const v = document.createElement("div");
|
|
5641
|
+
v.setAttribute("popover", "manual"), o.forEach((x) => {
|
|
5642
|
+
const w = x.el.cloneNode(!0);
|
|
5643
|
+
p(x.el, w), w.style.pointerEvents = "none", w.style.margin = "0", v.append(w);
|
|
5644
|
+
}), v.style.display = "flex", v.style.flexDirection = "column", v.style.padding = "0", v.style.margin = "0", v.style.position = "absolute", v.style.zIndex = "9999", v.style.pointerEvents = "none", u = v;
|
|
5639
5645
|
}
|
|
5640
5646
|
u.id = "dnd-dragged-node-clone", t.el.appendChild(u), u.showPopover();
|
|
5641
|
-
const
|
|
5647
|
+
const h = {
|
|
5642
5648
|
clonedDraggedEls: [],
|
|
5643
5649
|
clonedDraggedNode: u,
|
|
5644
5650
|
synthDragScrolling: !1,
|
|
@@ -5655,7 +5661,7 @@ function Qa(e, t, n, r, o, i) {
|
|
|
5655
5661
|
l == null ? void 0 : l.offsetX,
|
|
5656
5662
|
l == null ? void 0 : l.offsetY
|
|
5657
5663
|
),
|
|
5658
|
-
...
|
|
5664
|
+
...h
|
|
5659
5665
|
});
|
|
5660
5666
|
}
|
|
5661
5667
|
function Ja(e, t, n) {
|
|
@@ -5678,7 +5684,7 @@ function or(e, t = !1) {
|
|
|
5678
5684
|
function En(e, t, n = !1) {
|
|
5679
5685
|
const r = je(e);
|
|
5680
5686
|
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(() => {
|
|
5681
|
-
|
|
5687
|
+
le(t) && St(t.coordinates, e, t);
|
|
5682
5688
|
}, 16);
|
|
5683
5689
|
const o = ll(r);
|
|
5684
5690
|
if (!o) {
|
|
@@ -5793,11 +5799,11 @@ function ir(e, t) {
|
|
|
5793
5799
|
targetNodes: [e.targetData.node]
|
|
5794
5800
|
});
|
|
5795
5801
|
}
|
|
5796
|
-
function
|
|
5802
|
+
function ne(e) {
|
|
5797
5803
|
function t(n) {
|
|
5798
5804
|
const r = ve.get(n);
|
|
5799
5805
|
if (!r) return;
|
|
5800
|
-
const o =
|
|
5806
|
+
const o = J.get(n.parentNode);
|
|
5801
5807
|
if (o)
|
|
5802
5808
|
return {
|
|
5803
5809
|
node: {
|
|
@@ -5818,7 +5824,7 @@ function te(e) {
|
|
|
5818
5824
|
e: n,
|
|
5819
5825
|
targetData: r
|
|
5820
5826
|
},
|
|
5821
|
-
|
|
5827
|
+
y
|
|
5822
5828
|
);
|
|
5823
5829
|
};
|
|
5824
5830
|
}
|
|
@@ -5841,7 +5847,7 @@ function wt(e, t) {
|
|
|
5841
5847
|
}
|
|
5842
5848
|
function pt(e) {
|
|
5843
5849
|
function t(n) {
|
|
5844
|
-
const r =
|
|
5850
|
+
const r = J.get(n);
|
|
5845
5851
|
if (r)
|
|
5846
5852
|
return {
|
|
5847
5853
|
parent: {
|
|
@@ -5858,7 +5864,7 @@ function pt(e) {
|
|
|
5858
5864
|
e: n,
|
|
5859
5865
|
targetData: r
|
|
5860
5866
|
},
|
|
5861
|
-
|
|
5867
|
+
y
|
|
5862
5868
|
);
|
|
5863
5869
|
};
|
|
5864
5870
|
}
|
|
@@ -5897,32 +5903,32 @@ function Ne(e, t) {
|
|
|
5897
5903
|
r.classList.remove(...n);
|
|
5898
5904
|
continue;
|
|
5899
5905
|
}
|
|
5900
|
-
const o = ve.get(r) ||
|
|
5906
|
+
const o = ve.get(r) || J.get(r);
|
|
5901
5907
|
if (o)
|
|
5902
5908
|
for (const i of n)
|
|
5903
5909
|
o.privateClasses.includes(i) || r.classList.remove(i);
|
|
5904
5910
|
}
|
|
5905
5911
|
}
|
|
5906
5912
|
function kn(e, t, n, r, o) {
|
|
5907
|
-
const c = o.axis === "x", u = e === document.scrollingElement, l = c ? "scrollLeft" : "scrollTop", s = c ? "clientWidth" : "clientHeight", p = c ? "offsetWidth" : "offsetHeight", d = c ? "scrollWidth" : "scrollHeight",
|
|
5913
|
+
const c = o.axis === "x", u = e === document.scrollingElement, l = c ? "scrollLeft" : "scrollTop", s = c ? "clientWidth" : "clientHeight", p = c ? "offsetWidth" : "offsetHeight", d = c ? "scrollWidth" : "scrollHeight", h = c ? t.clientX : t.clientY, g = c ? r.left : r.top, f = c ? n.overflowX : n.overflowY;
|
|
5908
5914
|
if (u) {
|
|
5909
|
-
const m = e[l],
|
|
5915
|
+
const m = e[l], v = e[s], x = m > 0, w = m + v < (c ? o.state.rootScrollWidth || 0 : e[d]);
|
|
5910
5916
|
return c ? {
|
|
5911
|
-
left:
|
|
5912
|
-
right: w &&
|
|
5917
|
+
left: x && h < v * 0.075,
|
|
5918
|
+
right: w && h > v * (1 - 0.075)
|
|
5913
5919
|
} : {
|
|
5914
|
-
up:
|
|
5915
|
-
down: w &&
|
|
5920
|
+
up: x && h < v * 0.075,
|
|
5921
|
+
down: w && h > v * (1 - 0.075)
|
|
5916
5922
|
};
|
|
5917
5923
|
}
|
|
5918
5924
|
if ((f === "auto" || f === "scroll") && e !== document.body && e !== document.documentElement) {
|
|
5919
|
-
const m = e[d],
|
|
5925
|
+
const m = e[d], v = e[p], x = e[l], w = x > 0, S = x < m - v;
|
|
5920
5926
|
return c ? {
|
|
5921
|
-
left: w &&
|
|
5922
|
-
right: S &&
|
|
5927
|
+
left: w && h < g + v * 0.075,
|
|
5928
|
+
right: S && h > g + v * (1 - 0.075)
|
|
5923
5929
|
} : {
|
|
5924
|
-
up: w &&
|
|
5925
|
-
down: S &&
|
|
5930
|
+
up: w && h < g + v * 0.075,
|
|
5931
|
+
down: S && h > g + v * (1 - 0.075)
|
|
5926
5932
|
};
|
|
5927
5933
|
}
|
|
5928
5934
|
return c ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
@@ -5938,12 +5944,12 @@ function al(e, t, n, r) {
|
|
|
5938
5944
|
n[l] !== void 0 && (cancelAnimationFrame(n[l]), n[l] = void 0);
|
|
5939
5945
|
return;
|
|
5940
5946
|
}
|
|
5941
|
-
const p = o ? "scrollLeft" : "scrollTop", d = o ? "clientWidth" : "clientHeight",
|
|
5942
|
-
if (!(i > 0 ?
|
|
5947
|
+
const p = o ? "scrollLeft" : "scrollTop", d = o ? "clientWidth" : "clientHeight", h = o ? "scrollWidth" : "scrollHeight", g = e[p], f = e[d], m = e[h];
|
|
5948
|
+
if (!(i > 0 ? g + f < m : g > 0)) {
|
|
5943
5949
|
n[l] = void 0, n[u] = void 0;
|
|
5944
5950
|
return;
|
|
5945
5951
|
}
|
|
5946
|
-
e[p] += c * i,
|
|
5952
|
+
e[p] += c * i, le(n) && or(n), n[l] = requestAnimationFrame(s);
|
|
5947
5953
|
};
|
|
5948
5954
|
n[l] = requestAnimationFrame(s);
|
|
5949
5955
|
}
|
|
@@ -5963,8 +5969,8 @@ function St(e, t, n) {
|
|
|
5963
5969
|
const s = window.getComputedStyle(l), p = l.getBoundingClientRect(), d = kn(l, t, s, p, {
|
|
5964
5970
|
axis: "x",
|
|
5965
5971
|
state: n
|
|
5966
|
-
}),
|
|
5967
|
-
(d.left || d.right) && (n.lastScrollContainerX = l, c("x", d.right ? "positive" : "negative", l)), (
|
|
5972
|
+
}), h = kn(l, t, s, p, { axis: "y" });
|
|
5973
|
+
(d.left || d.right) && (n.lastScrollContainerX = l, c("x", d.right ? "positive" : "negative", l)), (h.up || h.down) && (n.lastScrollContainerY = l, c("y", h.down ? "positive" : "negative", l));
|
|
5968
5974
|
};
|
|
5969
5975
|
if (n.lastScrollContainerX && An(n.lastScrollContainerX, r, o) && u(n.lastScrollContainerX), !i && n.lastScrollContainerY && An(n.lastScrollContainerY, r, o) && u(n.lastScrollContainerY), !i) {
|
|
5970
5976
|
let l = document.elementFromPoint(r, o);
|
|
@@ -5982,14 +5988,14 @@ function ll(e) {
|
|
|
5982
5988
|
if (!Ct(t)) return;
|
|
5983
5989
|
let n, r = !0;
|
|
5984
5990
|
for (; t && r; ) {
|
|
5985
|
-
if (ve.has(t) ||
|
|
5986
|
-
r = !1, n =
|
|
5991
|
+
if (ve.has(t) || J.has(t)) {
|
|
5992
|
+
r = !1, n = J.has(t);
|
|
5987
5993
|
break;
|
|
5988
5994
|
}
|
|
5989
5995
|
t = t.parentNode;
|
|
5990
5996
|
}
|
|
5991
5997
|
if (n) {
|
|
5992
|
-
const o =
|
|
5998
|
+
const o = J.get(t);
|
|
5993
5999
|
return o ? {
|
|
5994
6000
|
parent: {
|
|
5995
6001
|
el: t,
|
|
@@ -5999,7 +6005,7 @@ function ll(e) {
|
|
|
5999
6005
|
} else {
|
|
6000
6006
|
const o = ve.get(t);
|
|
6001
6007
|
if (!o) return;
|
|
6002
|
-
const i =
|
|
6008
|
+
const i = J.get(t.parentNode);
|
|
6003
6009
|
return i ? {
|
|
6004
6010
|
node: {
|
|
6005
6011
|
el: t,
|
|
@@ -6057,7 +6063,7 @@ function $n(e) {
|
|
|
6057
6063
|
dl(n, pl(o, r));
|
|
6058
6064
|
}));
|
|
6059
6065
|
}
|
|
6060
|
-
function
|
|
6066
|
+
function hl(e, t = {}) {
|
|
6061
6067
|
const n = qe(null), [r, o] = q(e);
|
|
6062
6068
|
function i(c = {}) {
|
|
6063
6069
|
$n({ parent: n, state: [r, o], ...c });
|
|
@@ -6071,13 +6077,13 @@ function gl(e, t = {}) {
|
|
|
6071
6077
|
const In = {
|
|
6072
6078
|
border: {
|
|
6073
6079
|
selected: {
|
|
6074
|
-
color:
|
|
6080
|
+
color: A.palette.blue.B400
|
|
6075
6081
|
},
|
|
6076
6082
|
clear: {
|
|
6077
|
-
color:
|
|
6083
|
+
color: A.palette.neutral.N40
|
|
6078
6084
|
}
|
|
6079
6085
|
}
|
|
6080
|
-
},
|
|
6086
|
+
}, gl = N.ul`
|
|
6081
6087
|
list-style: none;
|
|
6082
6088
|
padding: 0;
|
|
6083
6089
|
margin: 0;
|
|
@@ -6086,7 +6092,7 @@ const In = {
|
|
|
6086
6092
|
gap: 12px;
|
|
6087
6093
|
width: 100%;
|
|
6088
6094
|
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
6089
|
-
`, fl =
|
|
6095
|
+
`, fl = N.li`
|
|
6090
6096
|
& > div {
|
|
6091
6097
|
border: 1px solid
|
|
6092
6098
|
${({ theme: e, $active: t }) => {
|
|
@@ -6104,48 +6110,48 @@ const In = {
|
|
|
6104
6110
|
highlightFirst: c,
|
|
6105
6111
|
onMove: u,
|
|
6106
6112
|
locked: l = !1
|
|
6107
|
-
} = e, s = _.useRef(null), p = l ? [s, i] :
|
|
6113
|
+
} = e, s = _.useRef(null), p = l ? [s, i] : hl(i, { group: r }), [d, h] = p, [g, f] = _.useState(
|
|
6108
6114
|
null
|
|
6109
6115
|
), m = _.useRef(i);
|
|
6110
6116
|
_.useEffect(() => {
|
|
6111
6117
|
if (l) return;
|
|
6112
|
-
const
|
|
6113
|
-
const
|
|
6114
|
-
f(
|
|
6118
|
+
const D = (C) => {
|
|
6119
|
+
const k = C.detail ?? null;
|
|
6120
|
+
f(k);
|
|
6115
6121
|
};
|
|
6116
|
-
return window.addEventListener(Mt,
|
|
6122
|
+
return window.addEventListener(Mt, D), () => window.removeEventListener(Mt, D);
|
|
6117
6123
|
}, [l]);
|
|
6118
|
-
const
|
|
6124
|
+
const v = _.useCallback((D) => {
|
|
6119
6125
|
l || window.dispatchEvent(
|
|
6120
|
-
new CustomEvent(Mt, { detail:
|
|
6126
|
+
new CustomEvent(Mt, { detail: D })
|
|
6121
6127
|
);
|
|
6122
|
-
}, [l]),
|
|
6128
|
+
}, [l]), x = (D) => {
|
|
6123
6129
|
var F;
|
|
6124
6130
|
if (l) return;
|
|
6125
|
-
const C =
|
|
6126
|
-
L && (f(L),
|
|
6131
|
+
const C = D.target, k = (F = C == null ? void 0 : C.closest) == null ? void 0 : F.call(C, "li.dnd-item"), L = (k == null ? void 0 : k.getAttribute("data-label")) || null;
|
|
6132
|
+
L && (f(L), v(L));
|
|
6127
6133
|
}, w = _.useCallback(() => {
|
|
6128
|
-
l || (f(null),
|
|
6129
|
-
}, [
|
|
6134
|
+
l || (f(null), v(null));
|
|
6135
|
+
}, [v, l]);
|
|
6130
6136
|
_.useEffect(() => {
|
|
6131
6137
|
if (l) return;
|
|
6132
|
-
const
|
|
6133
|
-
return window.addEventListener("pointerup",
|
|
6134
|
-
window.removeEventListener("pointerup",
|
|
6138
|
+
const D = () => w();
|
|
6139
|
+
return window.addEventListener("pointerup", D), window.addEventListener("blur", D), () => {
|
|
6140
|
+
window.removeEventListener("pointerup", D), window.removeEventListener("blur", D);
|
|
6135
6141
|
};
|
|
6136
6142
|
}, [w, l]), _.useEffect(() => {
|
|
6137
6143
|
if (l) return;
|
|
6138
|
-
const
|
|
6139
|
-
if (
|
|
6140
|
-
const C = new Set(
|
|
6141
|
-
if (
|
|
6144
|
+
const D = m.current;
|
|
6145
|
+
if (h.length !== D.length && h.length === D.length + 1) {
|
|
6146
|
+
const C = new Set(D), k = h.find((L) => !C.has(L)) || null;
|
|
6147
|
+
if (k) {
|
|
6142
6148
|
const L = n === "left" ? "right" : "left";
|
|
6143
|
-
u == null || u({ item:
|
|
6149
|
+
u == null || u({ item: k, from: L, to: n });
|
|
6144
6150
|
}
|
|
6145
6151
|
}
|
|
6146
|
-
m.current =
|
|
6147
|
-
}, [
|
|
6148
|
-
const S =
|
|
6152
|
+
m.current = h;
|
|
6153
|
+
}, [h, n, u, l]);
|
|
6154
|
+
const S = h.length === 0;
|
|
6149
6155
|
return /* @__PURE__ */ a(
|
|
6150
6156
|
Be,
|
|
6151
6157
|
{
|
|
@@ -6154,10 +6160,10 @@ const In = {
|
|
|
6154
6160
|
height: "-webkit-fill-available",
|
|
6155
6161
|
spacing: "wide",
|
|
6156
6162
|
children: /* @__PURE__ */ a(
|
|
6157
|
-
|
|
6163
|
+
gl,
|
|
6158
6164
|
{
|
|
6159
6165
|
ref: d,
|
|
6160
|
-
onPointerDownCapture: l ? void 0 :
|
|
6166
|
+
onPointerDownCapture: l ? void 0 : x,
|
|
6161
6167
|
onPointerUpCapture: l ? void 0 : w,
|
|
6162
6168
|
onPointerCancelCapture: l ? void 0 : w,
|
|
6163
6169
|
$isEmpty: S,
|
|
@@ -6165,7 +6171,7 @@ const In = {
|
|
|
6165
6171
|
"aria-disabled": l,
|
|
6166
6172
|
"data-locked": l || void 0,
|
|
6167
6173
|
children: S ? /* @__PURE__ */ a(
|
|
6168
|
-
|
|
6174
|
+
pe,
|
|
6169
6175
|
{
|
|
6170
6176
|
background: !0,
|
|
6171
6177
|
borderRadius: "8px",
|
|
@@ -6174,28 +6180,28 @@ const In = {
|
|
|
6174
6180
|
justifyContent: "center",
|
|
6175
6181
|
children: /* @__PURE__ */ a(R, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: t || "No hay elementos en esta lista" })
|
|
6176
6182
|
}
|
|
6177
|
-
) :
|
|
6178
|
-
const
|
|
6183
|
+
) : h.map((D, C) => {
|
|
6184
|
+
const k = !l && g === D;
|
|
6179
6185
|
return /* @__PURE__ */ a(
|
|
6180
6186
|
fl,
|
|
6181
6187
|
{
|
|
6182
|
-
className: `dnd-item${
|
|
6183
|
-
"data-label":
|
|
6188
|
+
className: `dnd-item${k ? " is-dragging" : ""}`,
|
|
6189
|
+
"data-label": D,
|
|
6184
6190
|
"data-first": !!(c && C === 0) || void 0,
|
|
6185
|
-
$active:
|
|
6186
|
-
children: /* @__PURE__ */ a(
|
|
6191
|
+
$active: k,
|
|
6192
|
+
children: /* @__PURE__ */ a(pe, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ a(
|
|
6187
6193
|
R,
|
|
6188
6194
|
{
|
|
6189
6195
|
type: "title",
|
|
6190
|
-
appearance:
|
|
6191
|
-
weight:
|
|
6196
|
+
appearance: k ? "primary" : "dark",
|
|
6197
|
+
weight: k ? "bold" : "normal",
|
|
6192
6198
|
size: "medium",
|
|
6193
6199
|
padding: "6px 12px",
|
|
6194
|
-
children:
|
|
6200
|
+
children: D
|
|
6195
6201
|
}
|
|
6196
6202
|
) })
|
|
6197
6203
|
},
|
|
6198
|
-
|
|
6204
|
+
D
|
|
6199
6205
|
);
|
|
6200
6206
|
})
|
|
6201
6207
|
}
|
|
@@ -6206,8 +6212,8 @@ const In = {
|
|
|
6206
6212
|
const { group: t = "clients", left: n, right: r, onMove: o, locked: i = !1 } = e, c = (u) => {
|
|
6207
6213
|
i || o == null || o(u);
|
|
6208
6214
|
};
|
|
6209
|
-
return /* @__PURE__ */
|
|
6210
|
-
|
|
6215
|
+
return /* @__PURE__ */ b(
|
|
6216
|
+
T,
|
|
6211
6217
|
{
|
|
6212
6218
|
justifyContent: "space-between",
|
|
6213
6219
|
alignItems: "start",
|
|
@@ -6243,7 +6249,7 @@ const In = {
|
|
|
6243
6249
|
]
|
|
6244
6250
|
}
|
|
6245
6251
|
);
|
|
6246
|
-
}, ml =
|
|
6252
|
+
}, ml = N.div`
|
|
6247
6253
|
& > button {
|
|
6248
6254
|
height: 66px;
|
|
6249
6255
|
min-width: 66px;
|
|
@@ -6261,7 +6267,7 @@ const In = {
|
|
|
6261
6267
|
}
|
|
6262
6268
|
}
|
|
6263
6269
|
}
|
|
6264
|
-
`, Ds = (e) => /* @__PURE__ */ a(ml, { children: /* @__PURE__ */ a(Y, { ...e }) }), bl =
|
|
6270
|
+
`, Ds = (e) => /* @__PURE__ */ a(ml, { children: /* @__PURE__ */ a(Y, { ...e }) }), bl = N.div`
|
|
6265
6271
|
display: flex;
|
|
6266
6272
|
justify-content: space-between;
|
|
6267
6273
|
align-items: center;
|
|
@@ -6292,7 +6298,7 @@ const In = {
|
|
|
6292
6298
|
}
|
|
6293
6299
|
`, Ns = (e) => {
|
|
6294
6300
|
const { handleBack: t, handleNext: n, disabledBack: r, disabledNext: o, textValues: i } = e;
|
|
6295
|
-
return /* @__PURE__ */
|
|
6301
|
+
return /* @__PURE__ */ b(bl, { children: [
|
|
6296
6302
|
/* @__PURE__ */ a(
|
|
6297
6303
|
Y,
|
|
6298
6304
|
{
|
|
@@ -6317,15 +6323,15 @@ const In = {
|
|
|
6317
6323
|
)
|
|
6318
6324
|
] });
|
|
6319
6325
|
}, Es = (e) => Object.values(e).flat(), ks = (e, t) => {
|
|
6320
|
-
const n =
|
|
6326
|
+
const n = xe(e);
|
|
6321
6327
|
return Object.fromEntries(
|
|
6322
6328
|
Object.entries(n).map(([r, o]) => [r, o.map(t)])
|
|
6323
6329
|
);
|
|
6324
6330
|
}, vl = (e) => Object.entries(e).map(([t, n]) => ({
|
|
6325
6331
|
ConditionGroupId: t,
|
|
6326
|
-
conditionsThatEstablishesTheDecision:
|
|
6332
|
+
conditionsThatEstablishesTheDecision: gt(n)
|
|
6327
6333
|
})), As = (e) => {
|
|
6328
|
-
const t =
|
|
6334
|
+
const t = xe(e);
|
|
6329
6335
|
return {
|
|
6330
6336
|
...e,
|
|
6331
6337
|
conditionGroups: vl(t),
|
|
@@ -6408,7 +6414,7 @@ function an(e, t) {
|
|
|
6408
6414
|
const El = {
|
|
6409
6415
|
1: "1fr",
|
|
6410
6416
|
2: "1fr 1fr"
|
|
6411
|
-
}, 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 =
|
|
6417
|
+
}, 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 = N.div`
|
|
6412
6418
|
display: flex;
|
|
6413
6419
|
align-items: center;
|
|
6414
6420
|
padding: 0px 4px 0px 2px;
|
|
@@ -6416,21 +6422,21 @@ const El = {
|
|
|
6416
6422
|
border-radius: 4px;
|
|
6417
6423
|
background-color: ${({ theme: e }) => {
|
|
6418
6424
|
var t;
|
|
6419
|
-
return ((t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral.N30) ??
|
|
6425
|
+
return ((t = e == null ? void 0 : e.palette) == null ? void 0 : t.neutral.N30) ?? A.palette.neutral.N30;
|
|
6420
6426
|
}};
|
|
6421
6427
|
cursor: pointer;
|
|
6422
6428
|
`;
|
|
6423
|
-
var
|
|
6429
|
+
var he = /* @__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))(he || {});
|
|
6424
6430
|
const Il = (e) => {
|
|
6425
6431
|
const { onClick: t, icon: n, value: r } = e;
|
|
6426
|
-
return /* @__PURE__ */
|
|
6432
|
+
return /* @__PURE__ */ b($l, { onClick: t, children: [
|
|
6427
6433
|
n && /* @__PURE__ */ a(
|
|
6428
|
-
|
|
6434
|
+
T,
|
|
6429
6435
|
{
|
|
6430
6436
|
justifyContent: "center",
|
|
6431
6437
|
alignItems: "center",
|
|
6432
6438
|
padding: "2px",
|
|
6433
|
-
children: /* @__PURE__ */ a(B, { icon: n, appearance:
|
|
6439
|
+
children: /* @__PURE__ */ a(B, { icon: n, appearance: he.DARK })
|
|
6434
6440
|
}
|
|
6435
6441
|
),
|
|
6436
6442
|
/* @__PURE__ */ a(R, { size: "small", as: "span", children: r })
|
|
@@ -6473,7 +6479,7 @@ const Fl = (e) => {
|
|
|
6473
6479
|
R,
|
|
6474
6480
|
{
|
|
6475
6481
|
size: c,
|
|
6476
|
-
appearance:
|
|
6482
|
+
appearance: he.GRAY,
|
|
6477
6483
|
textAlign: u,
|
|
6478
6484
|
as: "span",
|
|
6479
6485
|
children: l
|
|
@@ -6482,71 +6488,71 @@ const Fl = (e) => {
|
|
|
6482
6488
|
}, jt = {
|
|
6483
6489
|
light: {
|
|
6484
6490
|
border: {
|
|
6485
|
-
color:
|
|
6491
|
+
color: A.palette.neutral.N0
|
|
6486
6492
|
},
|
|
6487
6493
|
background: {
|
|
6488
|
-
color:
|
|
6494
|
+
color: A.palette.neutral.N0
|
|
6489
6495
|
},
|
|
6490
6496
|
boxShadow: {
|
|
6491
|
-
color:
|
|
6497
|
+
color: A.palette.neutral.N0
|
|
6492
6498
|
}
|
|
6493
6499
|
},
|
|
6494
6500
|
gray: {
|
|
6495
6501
|
border: {
|
|
6496
|
-
color:
|
|
6502
|
+
color: A.palette.neutral.N10
|
|
6497
6503
|
},
|
|
6498
6504
|
background: {
|
|
6499
|
-
color:
|
|
6505
|
+
color: A.palette.neutral.N10
|
|
6500
6506
|
},
|
|
6501
6507
|
boxShadow: {
|
|
6502
|
-
color:
|
|
6508
|
+
color: A.palette.neutral.N10
|
|
6503
6509
|
}
|
|
6504
6510
|
},
|
|
6505
6511
|
dark: {
|
|
6506
6512
|
border: {
|
|
6507
|
-
color:
|
|
6513
|
+
color: A.palette.neutral.N40
|
|
6508
6514
|
},
|
|
6509
6515
|
background: {
|
|
6510
|
-
color:
|
|
6516
|
+
color: A.palette.neutral.N20
|
|
6511
6517
|
},
|
|
6512
6518
|
boxShadow: {
|
|
6513
|
-
color:
|
|
6519
|
+
color: A.palette.neutral.N40
|
|
6514
6520
|
}
|
|
6515
6521
|
},
|
|
6516
6522
|
help: {
|
|
6517
6523
|
border: {
|
|
6518
|
-
color:
|
|
6524
|
+
color: A.palette.purple.P50
|
|
6519
6525
|
},
|
|
6520
6526
|
background: {
|
|
6521
|
-
color:
|
|
6527
|
+
color: A.palette.purple.P50
|
|
6522
6528
|
},
|
|
6523
6529
|
boxShadow: {
|
|
6524
|
-
color:
|
|
6530
|
+
color: A.palette.purple.P50
|
|
6525
6531
|
}
|
|
6526
6532
|
},
|
|
6527
6533
|
warning: {
|
|
6528
6534
|
border: {
|
|
6529
|
-
color:
|
|
6535
|
+
color: A.palette.yellow.Y50
|
|
6530
6536
|
},
|
|
6531
6537
|
background: {
|
|
6532
|
-
color:
|
|
6538
|
+
color: A.palette.yellow.Y50
|
|
6533
6539
|
},
|
|
6534
6540
|
boxShadow: {
|
|
6535
|
-
color:
|
|
6541
|
+
color: A.palette.yellow.Y50
|
|
6536
6542
|
}
|
|
6537
6543
|
},
|
|
6538
6544
|
danger: {
|
|
6539
6545
|
border: {
|
|
6540
|
-
color:
|
|
6546
|
+
color: A.palette.red.R400
|
|
6541
6547
|
},
|
|
6542
6548
|
background: {
|
|
6543
|
-
color:
|
|
6549
|
+
color: A.palette.red.R50
|
|
6544
6550
|
},
|
|
6545
6551
|
boxShadow: {
|
|
6546
|
-
color:
|
|
6552
|
+
color: A.palette.red.R50
|
|
6547
6553
|
}
|
|
6548
6554
|
}
|
|
6549
|
-
}, Ll =
|
|
6555
|
+
}, Ll = N.div`
|
|
6550
6556
|
display: flex;
|
|
6551
6557
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
6552
6558
|
align-items: ${({ $alignItems: e }) => e};
|
|
@@ -6591,17 +6597,17 @@ const Fl = (e) => {
|
|
|
6591
6597
|
borderRadius: s,
|
|
6592
6598
|
gap: p,
|
|
6593
6599
|
margin: d = "0px",
|
|
6594
|
-
padding:
|
|
6595
|
-
backgroundColor:
|
|
6600
|
+
padding: h = "0px",
|
|
6601
|
+
backgroundColor: g = he.LIGHT,
|
|
6596
6602
|
boxSizing: f,
|
|
6597
|
-
borderColor: m =
|
|
6598
|
-
overflowY:
|
|
6599
|
-
overflowX:
|
|
6603
|
+
borderColor: m = he.LIGHT,
|
|
6604
|
+
overflowY: v,
|
|
6605
|
+
overflowX: x,
|
|
6600
6606
|
boxShadow: w,
|
|
6601
6607
|
minHeight: S,
|
|
6602
|
-
maxHeight:
|
|
6608
|
+
maxHeight: D,
|
|
6603
6609
|
maxWidth: C,
|
|
6604
|
-
minWidth:
|
|
6610
|
+
minWidth: k
|
|
6605
6611
|
} = e;
|
|
6606
6612
|
return /* @__PURE__ */ a(
|
|
6607
6613
|
Ll,
|
|
@@ -6615,18 +6621,18 @@ const Fl = (e) => {
|
|
|
6615
6621
|
$wrap: n,
|
|
6616
6622
|
$gap: p,
|
|
6617
6623
|
$margin: d,
|
|
6618
|
-
$padding:
|
|
6619
|
-
$backgroundColor:
|
|
6624
|
+
$padding: h,
|
|
6625
|
+
$backgroundColor: g,
|
|
6620
6626
|
$boxSizing: f,
|
|
6621
6627
|
$borderColor: m,
|
|
6622
6628
|
$borderRadius: s,
|
|
6623
|
-
$overflowY:
|
|
6624
|
-
$overflowX:
|
|
6629
|
+
$overflowY: v,
|
|
6630
|
+
$overflowX: x,
|
|
6625
6631
|
$boxShadow: w,
|
|
6626
6632
|
$minHeight: S,
|
|
6627
|
-
$maxHeight:
|
|
6633
|
+
$maxHeight: D,
|
|
6628
6634
|
$maxWidth: C,
|
|
6629
|
-
$minWidth:
|
|
6635
|
+
$minWidth: k,
|
|
6630
6636
|
children: t
|
|
6631
6637
|
}
|
|
6632
6638
|
);
|
|
@@ -6641,7 +6647,7 @@ const Fl = (e) => {
|
|
|
6641
6647
|
onClickButton: u,
|
|
6642
6648
|
withTag: l,
|
|
6643
6649
|
children: s
|
|
6644
|
-
} = e, p =
|
|
6650
|
+
} = e, p = ae("(max-width: 1281px)");
|
|
6645
6651
|
return /* @__PURE__ */ a(
|
|
6646
6652
|
ln,
|
|
6647
6653
|
{
|
|
@@ -6649,9 +6655,9 @@ const Fl = (e) => {
|
|
|
6649
6655
|
borderRadius: "8px",
|
|
6650
6656
|
padding: p ? "8px" : "6px 16px",
|
|
6651
6657
|
boxSizing: "border-box",
|
|
6652
|
-
backgroundColor:
|
|
6653
|
-
children: /* @__PURE__ */
|
|
6654
|
-
|
|
6658
|
+
backgroundColor: he.GRAY,
|
|
6659
|
+
children: /* @__PURE__ */ b(
|
|
6660
|
+
Se,
|
|
6655
6661
|
{
|
|
6656
6662
|
templateColumns: c === "column" ? "1fr" : "auto 1fr",
|
|
6657
6663
|
templateRows: "auto auto",
|
|
@@ -6666,14 +6672,14 @@ const Fl = (e) => {
|
|
|
6666
6672
|
{
|
|
6667
6673
|
type: "label",
|
|
6668
6674
|
size: p ? "small" : "medium",
|
|
6669
|
-
appearance:
|
|
6675
|
+
appearance: he.DARK,
|
|
6670
6676
|
weight: "bold",
|
|
6671
6677
|
as: "span",
|
|
6672
6678
|
children: t
|
|
6673
6679
|
}
|
|
6674
6680
|
),
|
|
6675
6681
|
/* @__PURE__ */ a(
|
|
6676
|
-
|
|
6682
|
+
T,
|
|
6677
6683
|
{
|
|
6678
6684
|
alignItems: "center",
|
|
6679
6685
|
justifyContent: c === "column" ? "flex-start" : "flex-end",
|
|
@@ -6709,7 +6715,7 @@ function jl(e) {
|
|
|
6709
6715
|
const { ctx: t, node: n } = e, r = n.layout ?? {}, o = an(n.entries, t.data);
|
|
6710
6716
|
if (!o || o.length === 0) return null;
|
|
6711
6717
|
const i = /* @__PURE__ */ a(
|
|
6712
|
-
|
|
6718
|
+
Se,
|
|
6713
6719
|
{
|
|
6714
6720
|
width: "100%",
|
|
6715
6721
|
height: "auto",
|
|
@@ -6738,7 +6744,7 @@ function jl(e) {
|
|
|
6738
6744
|
direction: "column",
|
|
6739
6745
|
borderRadius: "8px",
|
|
6740
6746
|
width: "100%",
|
|
6741
|
-
backgroundColor:
|
|
6747
|
+
backgroundColor: he.LIGHT,
|
|
6742
6748
|
boxSizing: "initial",
|
|
6743
6749
|
children: i
|
|
6744
6750
|
}
|
|
@@ -6746,7 +6752,7 @@ function jl(e) {
|
|
|
6746
6752
|
}
|
|
6747
6753
|
function _l(e) {
|
|
6748
6754
|
const { ctx: t, node: n, renderNode: r } = e, { children: o } = n;
|
|
6749
|
-
return /* @__PURE__ */ a(
|
|
6755
|
+
return /* @__PURE__ */ a(T, { direction: "column", width: "100%", gap: "16px", children: o.map((i) => r(i, t)) });
|
|
6750
6756
|
}
|
|
6751
6757
|
function Vl(e) {
|
|
6752
6758
|
const n = (e.split(".").pop() ?? e).replace(/([A-Z])/g, " $1").trim();
|
|
@@ -6794,9 +6800,9 @@ function Gl(e, t) {
|
|
|
6794
6800
|
if (!(p && u(s))) {
|
|
6795
6801
|
if (Array.isArray(s)) {
|
|
6796
6802
|
if (s.length === 0) return;
|
|
6797
|
-
const
|
|
6798
|
-
if (!
|
|
6799
|
-
c(p,
|
|
6803
|
+
const h = Pl(s);
|
|
6804
|
+
if (!h) return;
|
|
6805
|
+
c(p, h);
|
|
6800
6806
|
return;
|
|
6801
6807
|
}
|
|
6802
6808
|
if (me(s)) {
|
|
@@ -6805,16 +6811,16 @@ function Gl(e, t) {
|
|
|
6805
6811
|
return;
|
|
6806
6812
|
}
|
|
6807
6813
|
i.add(s);
|
|
6808
|
-
const
|
|
6809
|
-
if (
|
|
6814
|
+
const h = Object.entries(s);
|
|
6815
|
+
if (h.length === 0) {
|
|
6810
6816
|
p || c(p, "");
|
|
6811
6817
|
return;
|
|
6812
6818
|
}
|
|
6813
|
-
for (const [
|
|
6819
|
+
for (const [g, f] of h) {
|
|
6814
6820
|
if (!me(f) && !Array.isArray(f) && u(f))
|
|
6815
6821
|
continue;
|
|
6816
|
-
const m = n.has(
|
|
6817
|
-
me(f) || Array.isArray(f) ? l(f, m, d + 1) : c(m ||
|
|
6822
|
+
const m = n.has(g) ? p : Ul(p, g);
|
|
6823
|
+
me(f) || Array.isArray(f) ? l(f, m, d + 1) : c(m || g, f);
|
|
6818
6824
|
}
|
|
6819
6825
|
return;
|
|
6820
6826
|
}
|
|
@@ -6841,7 +6847,7 @@ function Ln(e, t = 2) {
|
|
|
6841
6847
|
return String(e);
|
|
6842
6848
|
}
|
|
6843
6849
|
}
|
|
6844
|
-
function
|
|
6850
|
+
function ue(e) {
|
|
6845
6851
|
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);
|
|
6846
6852
|
}
|
|
6847
6853
|
function Xt(e) {
|
|
@@ -6849,12 +6855,12 @@ function Xt(e) {
|
|
|
6849
6855
|
skipKeys: ["values"],
|
|
6850
6856
|
maxDepth: 4
|
|
6851
6857
|
}), o = n || r.length === 1 ? "1fr" : "repeat(2, 1fr)";
|
|
6852
|
-
return /* @__PURE__ */ a(
|
|
6858
|
+
return /* @__PURE__ */ a(Se, { width: "100%", templateColumns: o, gap: "8px", autoRows: "unset", children: r.map((i) => /* @__PURE__ */ a(
|
|
6853
6859
|
sn,
|
|
6854
6860
|
{
|
|
6855
6861
|
direction: "column",
|
|
6856
6862
|
label: i.label,
|
|
6857
|
-
value:
|
|
6863
|
+
value: ue(i.value)
|
|
6858
6864
|
},
|
|
6859
6865
|
i.id
|
|
6860
6866
|
)) });
|
|
@@ -6872,23 +6878,23 @@ function Bl(e) {
|
|
|
6872
6878
|
const d = an(p.value, t.data);
|
|
6873
6879
|
if (Hl(d))
|
|
6874
6880
|
return null;
|
|
6875
|
-
const
|
|
6881
|
+
const h = p.render ? p.render(d, t) : String(d ?? ""), g = !!p.withTag;
|
|
6876
6882
|
return {
|
|
6877
6883
|
item: p,
|
|
6878
|
-
valueNode:
|
|
6879
|
-
shouldUseChildren:
|
|
6884
|
+
valueNode: h,
|
|
6885
|
+
shouldUseChildren: g
|
|
6880
6886
|
};
|
|
6881
6887
|
}).filter(Boolean);
|
|
6882
6888
|
if (o.length === 0)
|
|
6883
6889
|
return null;
|
|
6884
|
-
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(
|
|
6890
|
+
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(Se, { width: "100%", templateColumns: c, gap: "8px 16px", autoRows: "unset", children: o.map(({ item: p, valueNode: d, shouldUseChildren: h }) => /* @__PURE__ */ a(
|
|
6885
6891
|
sn,
|
|
6886
6892
|
{
|
|
6887
6893
|
direction: "column",
|
|
6888
6894
|
label: p.label,
|
|
6889
|
-
value:
|
|
6895
|
+
value: h ? "" : d,
|
|
6890
6896
|
withTag: p.withTag,
|
|
6891
|
-
children:
|
|
6897
|
+
children: h ? d : null
|
|
6892
6898
|
},
|
|
6893
6899
|
p.id
|
|
6894
6900
|
)) });
|
|
@@ -6898,7 +6904,7 @@ function Bl(e) {
|
|
|
6898
6904
|
direction: "column",
|
|
6899
6905
|
borderRadius: "8px",
|
|
6900
6906
|
width: "100%",
|
|
6901
|
-
backgroundColor:
|
|
6907
|
+
backgroundColor: he.LIGHT,
|
|
6902
6908
|
boxSizing: "initial",
|
|
6903
6909
|
children: u
|
|
6904
6910
|
}
|
|
@@ -6922,7 +6928,7 @@ function Mn(e, t, n) {
|
|
|
6922
6928
|
const r = n[e.type];
|
|
6923
6929
|
return r ? /* @__PURE__ */ a(_.Fragment, { children: r(e, t) }, e.id) : /* @__PURE__ */ a(Xt, { value: e }, e.id);
|
|
6924
6930
|
}
|
|
6925
|
-
const Yl =
|
|
6931
|
+
const Yl = N.div`
|
|
6926
6932
|
display: flex;
|
|
6927
6933
|
padding: 12px 8px;
|
|
6928
6934
|
flex-direction: column;
|
|
@@ -6935,9 +6941,9 @@ const Yl = D.div`
|
|
|
6935
6941
|
border: 1px solid
|
|
6936
6942
|
${({ theme: e }) => {
|
|
6937
6943
|
var t, n;
|
|
6938
|
-
return ((n = (t = e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N40) ??
|
|
6944
|
+
return ((n = (t = e.palette) == null ? void 0 : t.neutral) == null ? void 0 : n.N40) ?? A.palette.neutral.N40;
|
|
6939
6945
|
}};
|
|
6940
|
-
`, Xl =
|
|
6946
|
+
`, Xl = N.div`
|
|
6941
6947
|
display: flex;
|
|
6942
6948
|
justify-content: space-between;
|
|
6943
6949
|
align-items: center;
|
|
@@ -6945,8 +6951,8 @@ const Yl = D.div`
|
|
|
6945
6951
|
cursor: pointer;
|
|
6946
6952
|
`, Ql = (e) => {
|
|
6947
6953
|
const { title: t, defaultOpen: n = !0, children: r } = e, [o, i] = q(n);
|
|
6948
|
-
return /* @__PURE__ */
|
|
6949
|
-
/* @__PURE__ */
|
|
6954
|
+
return /* @__PURE__ */ b(Yl, { children: [
|
|
6955
|
+
/* @__PURE__ */ b(Xl, { onClick: () => {
|
|
6950
6956
|
i(!o);
|
|
6951
6957
|
}, children: [
|
|
6952
6958
|
/* @__PURE__ */ a(
|
|
@@ -6954,7 +6960,7 @@ const Yl = D.div`
|
|
|
6954
6960
|
{
|
|
6955
6961
|
type: "label",
|
|
6956
6962
|
size: "large",
|
|
6957
|
-
appearance:
|
|
6963
|
+
appearance: he.DARK,
|
|
6958
6964
|
weight: "bold",
|
|
6959
6965
|
ellipsis: !0,
|
|
6960
6966
|
children: t
|
|
@@ -6964,29 +6970,29 @@ const Yl = D.div`
|
|
|
6964
6970
|
B,
|
|
6965
6971
|
{
|
|
6966
6972
|
icon: o ? /* @__PURE__ */ a(br, {}) : /* @__PURE__ */ a(vr, {}),
|
|
6967
|
-
appearance:
|
|
6973
|
+
appearance: he.DARK,
|
|
6968
6974
|
spacing: "compact",
|
|
6969
6975
|
cursorHover: !0,
|
|
6970
6976
|
size: "24px"
|
|
6971
6977
|
}
|
|
6972
6978
|
)
|
|
6973
6979
|
] }),
|
|
6974
|
-
o && /* @__PURE__ */
|
|
6980
|
+
o && /* @__PURE__ */ b(V, { children: [
|
|
6975
6981
|
/* @__PURE__ */ a(W, { dashed: !0 }),
|
|
6976
6982
|
r
|
|
6977
6983
|
] })
|
|
6978
6984
|
] });
|
|
6979
6985
|
};
|
|
6980
|
-
function
|
|
6986
|
+
function re(e) {
|
|
6981
6987
|
const t = e.replace(/([A-Z])/g, " $1").trim();
|
|
6982
6988
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
6983
6989
|
}
|
|
6984
6990
|
function jn(e, t) {
|
|
6985
6991
|
return Object.keys(t).map((r) => ({
|
|
6986
6992
|
id: `${e}.${r}`,
|
|
6987
|
-
label:
|
|
6993
|
+
label: re(r),
|
|
6988
6994
|
value: `${e}.${r}`,
|
|
6989
|
-
render: (o) =>
|
|
6995
|
+
render: (o) => ue(o)
|
|
6990
6996
|
}));
|
|
6991
6997
|
}
|
|
6992
6998
|
function Jl(e) {
|
|
@@ -7009,7 +7015,7 @@ function Jl(e) {
|
|
|
7009
7015
|
id: "value",
|
|
7010
7016
|
label: "Valor",
|
|
7011
7017
|
value: () => e,
|
|
7012
|
-
render: (o) =>
|
|
7018
|
+
render: (o) => ue(o)
|
|
7013
7019
|
}
|
|
7014
7020
|
]
|
|
7015
7021
|
},
|
|
@@ -7036,7 +7042,7 @@ function Jl(e) {
|
|
|
7036
7042
|
entries: () => e,
|
|
7037
7043
|
keyOf: (o, i) => String(i ?? Math.random()),
|
|
7038
7044
|
labelOf: (o, i) => `Item ${i ?? ""}`,
|
|
7039
|
-
valueOf: (o) =>
|
|
7045
|
+
valueOf: (o) => ue(o)
|
|
7040
7046
|
},
|
|
7041
7047
|
{
|
|
7042
7048
|
id: "json-fallback",
|
|
@@ -7053,7 +7059,7 @@ function Jl(e) {
|
|
|
7053
7059
|
if (!me(u) && !Array.isArray(u))
|
|
7054
7060
|
return {
|
|
7055
7061
|
id: c,
|
|
7056
|
-
name:
|
|
7062
|
+
name: re(o),
|
|
7057
7063
|
nodes: [
|
|
7058
7064
|
{
|
|
7059
7065
|
id: `${o}-primitive`,
|
|
@@ -7065,9 +7071,9 @@ function Jl(e) {
|
|
|
7065
7071
|
items: [
|
|
7066
7072
|
{
|
|
7067
7073
|
id: `${o}.value`,
|
|
7068
|
-
label:
|
|
7074
|
+
label: re(o),
|
|
7069
7075
|
value: (l) => l == null ? void 0 : l[o],
|
|
7070
|
-
render: (l) =>
|
|
7076
|
+
render: (l) => ue(l)
|
|
7071
7077
|
}
|
|
7072
7078
|
]
|
|
7073
7079
|
}
|
|
@@ -7076,9 +7082,9 @@ function Jl(e) {
|
|
|
7076
7082
|
if (Array.isArray(u))
|
|
7077
7083
|
return u.some((s) => me(s)) ? {
|
|
7078
7084
|
id: c,
|
|
7079
|
-
name:
|
|
7085
|
+
name: re(o),
|
|
7080
7086
|
nodes: u.map((s, p) => {
|
|
7081
|
-
const
|
|
7087
|
+
const h = Object.keys(s);
|
|
7082
7088
|
return {
|
|
7083
7089
|
id: `${o}-item-${p}`,
|
|
7084
7090
|
type: "attributesGrid",
|
|
@@ -7086,20 +7092,20 @@ function Jl(e) {
|
|
|
7086
7092
|
variant: "lightCard",
|
|
7087
7093
|
columns: { mobile: "1fr", desktop: "repeat(2, 1fr)" }
|
|
7088
7094
|
},
|
|
7089
|
-
items:
|
|
7090
|
-
id: `${o}[${p}].${
|
|
7091
|
-
label:
|
|
7095
|
+
items: h.map((g) => ({
|
|
7096
|
+
id: `${o}[${p}].${g}`,
|
|
7097
|
+
label: re(g),
|
|
7092
7098
|
value: (f) => {
|
|
7093
|
-
var m,
|
|
7094
|
-
return (
|
|
7099
|
+
var m, v;
|
|
7100
|
+
return (v = (m = f == null ? void 0 : f[o]) == null ? void 0 : m[p]) == null ? void 0 : v[g];
|
|
7095
7101
|
},
|
|
7096
|
-
render: (f) =>
|
|
7102
|
+
render: (f) => ue(f)
|
|
7097
7103
|
}))
|
|
7098
7104
|
};
|
|
7099
7105
|
})
|
|
7100
7106
|
} : {
|
|
7101
7107
|
id: c,
|
|
7102
|
-
name:
|
|
7108
|
+
name: re(o),
|
|
7103
7109
|
nodes: [
|
|
7104
7110
|
{
|
|
7105
7111
|
id: `${o}-entries`,
|
|
@@ -7109,7 +7115,7 @@ function Jl(e) {
|
|
|
7109
7115
|
entries: (s) => s == null ? void 0 : s[o],
|
|
7110
7116
|
keyOf: (s, p) => (s == null ? void 0 : s.id) ?? (s == null ? void 0 : s.businessRuleId) ?? String(p ?? Math.random()),
|
|
7111
7117
|
labelOf: (s, p) => (s == null ? void 0 : s.decisionId) ?? (s == null ? void 0 : s.label) ?? `Item ${p ?? ""}`,
|
|
7112
|
-
valueOf: (s) =>
|
|
7118
|
+
valueOf: (s) => ue((s == null ? void 0 : s.value) ?? s)
|
|
7113
7119
|
}
|
|
7114
7120
|
]
|
|
7115
7121
|
};
|
|
@@ -7117,66 +7123,66 @@ function Jl(e) {
|
|
|
7117
7123
|
const l = u.values;
|
|
7118
7124
|
return Array.isArray(l) ? l.length > 0 && l.every((d) => me(d) && "labelName" in d && "value" in d) ? {
|
|
7119
7125
|
id: c,
|
|
7120
|
-
name:
|
|
7126
|
+
name: re(o),
|
|
7121
7127
|
nodes: [
|
|
7122
7128
|
{
|
|
7123
7129
|
id: `${o}-values`,
|
|
7124
7130
|
type: "entriesGrid",
|
|
7125
7131
|
layout: { variant: "lightCard" },
|
|
7126
7132
|
when: (d) => {
|
|
7127
|
-
var
|
|
7128
|
-
return Array.isArray((
|
|
7133
|
+
var h;
|
|
7134
|
+
return Array.isArray((h = d == null ? void 0 : d[o]) == null ? void 0 : h.values) && d[o].values.length > 0;
|
|
7129
7135
|
},
|
|
7130
7136
|
entries: `${o}.values`,
|
|
7131
|
-
keyOf: (d,
|
|
7137
|
+
keyOf: (d, h) => (d == null ? void 0 : d.businessRuleId) ?? (d == null ? void 0 : d.id) ?? String(h ?? Math.random()),
|
|
7132
7138
|
labelOf: (d) => (d == null ? void 0 : d.decisionId) ?? (d == null ? void 0 : d.labelName) ?? "",
|
|
7133
|
-
valueOf: (d) => "labelName" in (d ?? {}) && "value" in (d ?? {}) ? `${String(d.labelName)}: ${
|
|
7139
|
+
valueOf: (d) => "labelName" in (d ?? {}) && "value" in (d ?? {}) ? `${String(d.labelName)}: ${ue(d.value)}` : ue(d)
|
|
7134
7140
|
}
|
|
7135
7141
|
]
|
|
7136
7142
|
} : l.some((d) => me(d)) ? {
|
|
7137
7143
|
id: c,
|
|
7138
|
-
name:
|
|
7139
|
-
nodes: l.map((d,
|
|
7144
|
+
name: re(o),
|
|
7145
|
+
nodes: l.map((d, h) => {
|
|
7140
7146
|
const f = Object.keys(d);
|
|
7141
7147
|
return {
|
|
7142
|
-
id: `${o}-values-item-${
|
|
7148
|
+
id: `${o}-values-item-${h}`,
|
|
7143
7149
|
type: "attributesGrid",
|
|
7144
7150
|
layout: {
|
|
7145
7151
|
variant: "lightCard",
|
|
7146
7152
|
columns: { mobile: "1fr", desktop: "repeat(2, 1fr)" }
|
|
7147
7153
|
},
|
|
7148
7154
|
items: f.map((m) => ({
|
|
7149
|
-
id: `${o}.values[${
|
|
7150
|
-
label:
|
|
7151
|
-
value: (
|
|
7152
|
-
var
|
|
7153
|
-
return (S = (w = (
|
|
7155
|
+
id: `${o}.values[${h}].${m}`,
|
|
7156
|
+
label: re(m),
|
|
7157
|
+
value: (v) => {
|
|
7158
|
+
var x, w, S;
|
|
7159
|
+
return (S = (w = (x = v == null ? void 0 : v[o]) == null ? void 0 : x.values) == null ? void 0 : w[h]) == null ? void 0 : S[m];
|
|
7154
7160
|
},
|
|
7155
|
-
render: (
|
|
7161
|
+
render: (v) => ue(v)
|
|
7156
7162
|
}))
|
|
7157
7163
|
};
|
|
7158
7164
|
})
|
|
7159
7165
|
} : {
|
|
7160
7166
|
id: c,
|
|
7161
|
-
name:
|
|
7167
|
+
name: re(o),
|
|
7162
7168
|
nodes: [
|
|
7163
7169
|
{
|
|
7164
7170
|
id: `${o}-values`,
|
|
7165
7171
|
type: "entriesGrid",
|
|
7166
7172
|
layout: { variant: "lightCard" },
|
|
7167
7173
|
when: (d) => {
|
|
7168
|
-
var
|
|
7169
|
-
return Array.isArray((
|
|
7174
|
+
var h;
|
|
7175
|
+
return Array.isArray((h = d == null ? void 0 : d[o]) == null ? void 0 : h.values) && d[o].values.length > 0;
|
|
7170
7176
|
},
|
|
7171
7177
|
entries: `${o}.values`,
|
|
7172
|
-
keyOf: (d,
|
|
7173
|
-
labelOf: (d,
|
|
7174
|
-
valueOf: (d) =>
|
|
7178
|
+
keyOf: (d, h) => String(h ?? Math.random()),
|
|
7179
|
+
labelOf: (d, h) => `Item ${h ?? ""}`,
|
|
7180
|
+
valueOf: (d) => ue(d)
|
|
7175
7181
|
}
|
|
7176
7182
|
]
|
|
7177
7183
|
} : me(l) ? {
|
|
7178
7184
|
id: c,
|
|
7179
|
-
name:
|
|
7185
|
+
name: re(o),
|
|
7180
7186
|
nodes: [
|
|
7181
7187
|
{
|
|
7182
7188
|
id: `${o}-values`,
|
|
@@ -7197,7 +7203,7 @@ function Jl(e) {
|
|
|
7197
7203
|
]
|
|
7198
7204
|
} : {
|
|
7199
7205
|
id: c,
|
|
7200
|
-
name:
|
|
7206
|
+
name: re(o),
|
|
7201
7207
|
nodes: [
|
|
7202
7208
|
{
|
|
7203
7209
|
id: `${o}-values`,
|
|
@@ -7215,7 +7221,7 @@ function Jl(e) {
|
|
|
7215
7221
|
id: `${o}.values`,
|
|
7216
7222
|
label: "values",
|
|
7217
7223
|
value: `${o}.values`,
|
|
7218
|
-
render: (s) =>
|
|
7224
|
+
render: (s) => ue(s)
|
|
7219
7225
|
}
|
|
7220
7226
|
]
|
|
7221
7227
|
}
|
|
@@ -7224,7 +7230,7 @@ function Jl(e) {
|
|
|
7224
7230
|
}
|
|
7225
7231
|
return {
|
|
7226
7232
|
id: c,
|
|
7227
|
-
name:
|
|
7233
|
+
name: re(o),
|
|
7228
7234
|
nodes: [
|
|
7229
7235
|
{
|
|
7230
7236
|
id: `${o}-object`,
|
|
@@ -7245,27 +7251,27 @@ function Zl(e, t) {
|
|
|
7245
7251
|
}
|
|
7246
7252
|
function $s(e) {
|
|
7247
7253
|
const { data: t, isMobile: n, isTablet: r, onBackStep: o, schema: i } = e, c = Zl(t, i), u = { data: t, isMobile: n, isTablet: r }, l = Pn(() => ql(Mn), []), s = c.steps.map((p) => {
|
|
7248
|
-
const d = p.nodes.map((
|
|
7254
|
+
const d = p.nodes.map((h) => Mn(h, u, l)).filter((h) => h != null && h !== !1);
|
|
7249
7255
|
return {
|
|
7250
7256
|
...p,
|
|
7251
7257
|
renderedNodes: d
|
|
7252
7258
|
};
|
|
7253
7259
|
}).filter((p) => p.renderedNodes.length > 0);
|
|
7254
|
-
return /* @__PURE__ */ a(
|
|
7255
|
-
|
|
7260
|
+
return /* @__PURE__ */ a(T, { direction: "column", width: "100%", gap: "24px", children: s.map((p) => /* @__PURE__ */ a(Ql, { title: p.name, children: /* @__PURE__ */ b(
|
|
7261
|
+
T,
|
|
7256
7262
|
{
|
|
7257
7263
|
direction: "column",
|
|
7258
7264
|
width: "100%",
|
|
7259
7265
|
alignItems: "flex-end",
|
|
7260
7266
|
gap: r ? "12px" : "16px",
|
|
7261
7267
|
children: [
|
|
7262
|
-
/* @__PURE__ */ a(
|
|
7268
|
+
/* @__PURE__ */ a(T, { direction: "column", width: "100%", gap: "8px", children: p.renderedNodes }),
|
|
7263
7269
|
/* @__PURE__ */ a(
|
|
7264
7270
|
Y,
|
|
7265
7271
|
{
|
|
7266
7272
|
iconBefore: /* @__PURE__ */ a(yr, {}),
|
|
7267
7273
|
onClick: () => p.onBack ? p.onBack({ stepId: p.id }) : o == null ? void 0 : o(Number(p.id)),
|
|
7268
|
-
appearance:
|
|
7274
|
+
appearance: he.DARK,
|
|
7269
7275
|
variant: "none",
|
|
7270
7276
|
children: "Regresar a este paso"
|
|
7271
7277
|
}
|
|
@@ -7281,13 +7287,13 @@ export {
|
|
|
7281
7287
|
nn as BusinessRuleView,
|
|
7282
7288
|
qn as BusinessRuleViewNew,
|
|
7283
7289
|
ps as BusinessRules,
|
|
7284
|
-
|
|
7285
|
-
|
|
7290
|
+
gs as BusinessRulesNew,
|
|
7291
|
+
hs as BusinessRulesWithGroup,
|
|
7286
7292
|
Cs as DragAndDropBoxes,
|
|
7287
7293
|
Rn as DraggableList,
|
|
7288
7294
|
ca as DropdownMenu,
|
|
7289
7295
|
Ss as DropdownMenuContainer,
|
|
7290
|
-
|
|
7296
|
+
oe as EValueHowToSetUp,
|
|
7291
7297
|
fs as Filter,
|
|
7292
7298
|
ms as FormFilter,
|
|
7293
7299
|
Gn as ModalRules,
|
|
@@ -7299,7 +7305,7 @@ export {
|
|
|
7299
7305
|
Bn as filterByGroup,
|
|
7300
7306
|
Es as flatFromGroups,
|
|
7301
7307
|
bs as formatDecisionForBackend,
|
|
7302
|
-
|
|
7308
|
+
xe as getConditionsByGroupNew,
|
|
7303
7309
|
vl as groupsRecordToArrayNew,
|
|
7304
7310
|
ks as mapByGroupNew,
|
|
7305
7311
|
As as normalizeDecisionToNewShape,
|