@isettingkit/business-rules 2.1.9 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.d.ts +5 -2
- package/dist/index.es.js +853 -826
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m, Fragment as O } from "react/jsx-runtime";
|
|
2
|
-
import { MdOutlineDelete as an, MdClear as ln, MdAdd as
|
|
3
|
-
import { inube as E, Stack as v, Divider as B, Icon as M, Text as
|
|
4
|
-
import w, { keyframes as
|
|
5
|
-
import { ValueDataType as
|
|
6
|
-
import { DecisionViewConditionRenderer as
|
|
2
|
+
import { MdOutlineDelete as an, MdClear as ln, MdAdd as Ye, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as Tn, MdInfo as Ot, MdCached as Pt, MdOutlineInfo as Mt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as jt, MdOutlineArrowCircleRight as Ut, MdOutlineChevronRight as _t, MdOutlineError as Ht } from "react-icons/md";
|
|
3
|
+
import { inube as E, Stack as v, Divider as B, Icon as M, Text as $, SkeletonLine as J, useMediaQuery as te, Blanket as sn, Button as q, Grid as We, Toggle as dn, Checkbox as kn, Date as Fe, Box as qt, Tag as De, Tabs as st, SkeletonIcon as Bt, Fieldset as je, OptionList as Gt, Checkpicker as Yt, Label as Wt, OptionItem as Xt } from "@inubekit/inubekit";
|
|
4
|
+
import w, { keyframes as An, ThemeContext as $n } from "styled-components";
|
|
5
|
+
import { ValueDataType as j, ValueHowToSetUp as ee, DecisionConditionRender as tn, DecisionConditionRenderNew as Vn } from "@isettingkit/input";
|
|
6
|
+
import { DecisionViewConditionRenderer as $e, DecisionViewConditionRendererNew as Ke } from "@isettingkit/view";
|
|
7
7
|
import { createPortal as cn } from "react-dom";
|
|
8
|
-
import { useFormik as
|
|
8
|
+
import { useFormik as In } from "formik";
|
|
9
9
|
import { string as le, mixed as Pe, object as ne, number as se, lazy as qe, date as Le } from "yup";
|
|
10
|
-
import V, { useState as z, useRef as Ie, useEffect as Ee, useContext as
|
|
11
|
-
import { Link as
|
|
12
|
-
import
|
|
13
|
-
import { franc as
|
|
14
|
-
const
|
|
10
|
+
import V, { useState as z, useRef as Ie, useEffect as Ee, useContext as Rn, forwardRef as Qt, useMemo as dt, useCallback as Zt } from "react";
|
|
11
|
+
import { Link as ct, useLocation as Kt } from "react-router-dom";
|
|
12
|
+
import Jt from "axios";
|
|
13
|
+
import { franc as er } from "franc-min";
|
|
14
|
+
const nr = w.div`
|
|
15
15
|
border-radius: 8px;
|
|
16
16
|
border: 1px solid
|
|
17
17
|
${({ theme: e }) => {
|
|
@@ -46,9 +46,9 @@ w.div`
|
|
|
46
46
|
border-radius: 8px;
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
|
-
const
|
|
49
|
+
const Xe = (e) => {
|
|
50
50
|
const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
|
|
51
|
-
return /* @__PURE__ */ a(
|
|
51
|
+
return /* @__PURE__ */ a(nr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
52
52
|
n,
|
|
53
53
|
t && /* @__PURE__ */ m(O, { children: [
|
|
54
54
|
/* @__PURE__ */ a(B, {}),
|
|
@@ -66,22 +66,22 @@ const We = (e) => {
|
|
|
66
66
|
) })
|
|
67
67
|
] })
|
|
68
68
|
] }) });
|
|
69
|
-
},
|
|
69
|
+
}, tr = (e) => e.value, rr = (e) => e.value, or = (e) => e.value, ar = (e) => ({
|
|
70
70
|
from: e.from ?? "",
|
|
71
71
|
to: e.to ?? ""
|
|
72
|
-
}),
|
|
73
|
-
var
|
|
74
|
-
const
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
},
|
|
82
|
-
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r =
|
|
72
|
+
}), ir = (e) => e.value, lr = (e) => e.value, sr = (e) => e.value;
|
|
73
|
+
var A = /* @__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))(A || {});
|
|
74
|
+
const dr = {
|
|
75
|
+
[A.LIST_OF_VALUES]: rr,
|
|
76
|
+
[A.LIST_OF_VALUES_MULTI]: or,
|
|
77
|
+
[A.RANGE]: ar,
|
|
78
|
+
[A.GREATER_THAN]: ir,
|
|
79
|
+
[A.LESS_THAN]: lr,
|
|
80
|
+
[A.EQUAL]: sr
|
|
81
|
+
}, Ue = (e) => {
|
|
82
|
+
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = dr[e == null ? void 0 : e.howToSetTheDecision] || tr;
|
|
83
83
|
return t && r(n) || n || void 0;
|
|
84
|
-
},
|
|
84
|
+
}, jn = w.div`
|
|
85
85
|
& > div {
|
|
86
86
|
border-radius: 8px;
|
|
87
87
|
border: 1px solid
|
|
@@ -108,7 +108,7 @@ const lr = {
|
|
|
108
108
|
background-color: #ebecf0;
|
|
109
109
|
border-radius: 8px;
|
|
110
110
|
}
|
|
111
|
-
`,
|
|
111
|
+
`, cr = (e) => {
|
|
112
112
|
const {
|
|
113
113
|
conditionsAlignment: n,
|
|
114
114
|
decision: t,
|
|
@@ -122,10 +122,10 @@ const lr = {
|
|
|
122
122
|
} = e;
|
|
123
123
|
return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
|
|
124
124
|
/* @__PURE__ */ a(v, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
|
|
125
|
-
|
|
125
|
+
$e,
|
|
126
126
|
{
|
|
127
127
|
element: o,
|
|
128
|
-
valueData:
|
|
128
|
+
valueData: Ue(
|
|
129
129
|
o
|
|
130
130
|
),
|
|
131
131
|
type: "decision"
|
|
@@ -141,7 +141,7 @@ const lr = {
|
|
|
141
141
|
height: "203px",
|
|
142
142
|
children: [
|
|
143
143
|
p.length > 0 && /* @__PURE__ */ a(
|
|
144
|
-
|
|
144
|
+
$,
|
|
145
145
|
{
|
|
146
146
|
type: "label",
|
|
147
147
|
size: "large",
|
|
@@ -151,18 +151,18 @@ const lr = {
|
|
|
151
151
|
children: l.factsThatConditionIt
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
p.length > 0 && p.map((u) => /* @__PURE__ */ a(
|
|
155
|
-
|
|
154
|
+
p.length > 0 && p.map((u) => /* @__PURE__ */ a(jn, { children: /* @__PURE__ */ a(v, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
|
|
155
|
+
$e,
|
|
156
156
|
{
|
|
157
157
|
element: { ...u, value: u.value },
|
|
158
|
-
valueData:
|
|
158
|
+
valueData: Ue(
|
|
159
159
|
u
|
|
160
160
|
)
|
|
161
161
|
}
|
|
162
162
|
) }) }, u.conditionName)),
|
|
163
163
|
p.length > 0 && /* @__PURE__ */ a(B, { dashed: !0 }),
|
|
164
164
|
d && /* @__PURE__ */ a(O, { children: r && /* @__PURE__ */ a(
|
|
165
|
-
|
|
165
|
+
$e,
|
|
166
166
|
{
|
|
167
167
|
element: r.element,
|
|
168
168
|
valueData: r.valueData,
|
|
@@ -189,7 +189,7 @@ const lr = {
|
|
|
189
189
|
gap: "12px",
|
|
190
190
|
justifyContent: "space-between",
|
|
191
191
|
height: "203px",
|
|
192
|
-
children: s.map((u, c) => /* @__PURE__ */ a(
|
|
192
|
+
children: s.map((u, c) => /* @__PURE__ */ a(jn, { children: /* @__PURE__ */ m(
|
|
193
193
|
v,
|
|
194
194
|
{
|
|
195
195
|
direction: "column",
|
|
@@ -205,47 +205,47 @@ const lr = {
|
|
|
205
205
|
}
|
|
206
206
|
) })
|
|
207
207
|
] });
|
|
208
|
-
},
|
|
208
|
+
}, Fn = (e) => {
|
|
209
209
|
var g;
|
|
210
210
|
const { decision: n, loading: t = !1, textValues: r } = e, o = !!(n != null && n.effectiveFrom), i = !!(n != null && n.validUntil), s = o && i ? {
|
|
211
211
|
element: {
|
|
212
212
|
labelName: r == null ? void 0 : r.terms,
|
|
213
213
|
value: String(n.effectiveFrom),
|
|
214
214
|
howToSetTheDecision: ee.RANGE,
|
|
215
|
-
decisionDataType:
|
|
215
|
+
decisionDataType: j.DATE
|
|
216
216
|
},
|
|
217
|
-
valueData:
|
|
217
|
+
valueData: Ue({
|
|
218
218
|
labelName: r == null ? void 0 : r.terms,
|
|
219
219
|
value: {
|
|
220
220
|
from: String(n.effectiveFrom),
|
|
221
221
|
to: String(n.validUntil)
|
|
222
222
|
},
|
|
223
223
|
howToSetTheDecision: ee.RANGE,
|
|
224
|
-
decisionDataType:
|
|
224
|
+
decisionDataType: j.DATE
|
|
225
225
|
})
|
|
226
226
|
} : o && !i ? {
|
|
227
227
|
element: {
|
|
228
228
|
labelName: r == null ? void 0 : r.terms,
|
|
229
229
|
value: String(n.effectiveFrom),
|
|
230
230
|
howToSetTheDecision: ee.EQUAL,
|
|
231
|
-
decisionDataType:
|
|
231
|
+
decisionDataType: j.DATE
|
|
232
232
|
},
|
|
233
|
-
valueData:
|
|
233
|
+
valueData: Ue({
|
|
234
234
|
labelName: r == null ? void 0 : r.terms,
|
|
235
235
|
value: String(n.effectiveFrom),
|
|
236
236
|
howToSetTheDecision: ee.EQUAL,
|
|
237
|
-
decisionDataType:
|
|
237
|
+
decisionDataType: j.DATE
|
|
238
238
|
})
|
|
239
239
|
} : null, d = n ? {
|
|
240
240
|
labelName: n.labelName || "",
|
|
241
241
|
decisionDataType: n.decisionDataType || "alphabetical",
|
|
242
|
-
value:
|
|
242
|
+
value: Ue(n),
|
|
243
243
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
244
244
|
} : null, l = ((g = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter(
|
|
245
245
|
(h) => !h.hidden
|
|
246
246
|
)) || [], p = Array.from({ length: 5 }), u = !!(!t && n && r && d), c = l.length < 2 ? "start" : "space-between";
|
|
247
247
|
return /* @__PURE__ */ a(
|
|
248
|
-
|
|
248
|
+
cr,
|
|
249
249
|
{
|
|
250
250
|
conditionsAlignment: c,
|
|
251
251
|
decision: n,
|
|
@@ -258,12 +258,12 @@ const lr = {
|
|
|
258
258
|
visibleConditions: l
|
|
259
259
|
}
|
|
260
260
|
);
|
|
261
|
-
},
|
|
261
|
+
}, ur = w.div`
|
|
262
262
|
position: relative;
|
|
263
263
|
& > div {
|
|
264
264
|
padding: 24px 16px;
|
|
265
265
|
}
|
|
266
|
-
`,
|
|
266
|
+
`, pr = w.div`
|
|
267
267
|
background-color: ${({ theme: e }) => {
|
|
268
268
|
var n, t;
|
|
269
269
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
|
|
@@ -294,7 +294,7 @@ const lr = {
|
|
|
294
294
|
background-color: #ebecf0;
|
|
295
295
|
border-radius: 8px;
|
|
296
296
|
}
|
|
297
|
-
`,
|
|
297
|
+
`, ut = (e) => {
|
|
298
298
|
const { children: n, portalId: t, onCloseModal: r, title: o } = e, i = document.getElementById(t);
|
|
299
299
|
if (!i)
|
|
300
300
|
throw new Error(
|
|
@@ -302,16 +302,16 @@ const lr = {
|
|
|
302
302
|
);
|
|
303
303
|
const s = te("(max-width: 400px)");
|
|
304
304
|
return cn(
|
|
305
|
-
/* @__PURE__ */ a(
|
|
305
|
+
/* @__PURE__ */ a(ur, { smallScreen: s, children: /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
306
306
|
/* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
|
-
/* @__PURE__ */ a(
|
|
307
|
+
/* @__PURE__ */ a($, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
308
308
|
/* @__PURE__ */ a(ln, { size: "24px", cursor: "pointer", onClick: r })
|
|
309
309
|
] }) }),
|
|
310
310
|
n
|
|
311
311
|
] }) }) }) }),
|
|
312
312
|
i
|
|
313
313
|
);
|
|
314
|
-
},
|
|
314
|
+
}, gr = An`
|
|
315
315
|
from {
|
|
316
316
|
opacity: 0;
|
|
317
317
|
transform: translateY(20px);
|
|
@@ -345,7 +345,7 @@ w.div`
|
|
|
345
345
|
}};
|
|
346
346
|
}
|
|
347
347
|
`;
|
|
348
|
-
const
|
|
348
|
+
const pt = w.div`
|
|
349
349
|
& > div {
|
|
350
350
|
background-color: ${({ theme: e }) => {
|
|
351
351
|
var n, t;
|
|
@@ -358,18 +358,18 @@ const ct = w.div`
|
|
|
358
358
|
height: 100%;
|
|
359
359
|
padding-bottom: 12px;
|
|
360
360
|
cursor: pointer;
|
|
361
|
-
`,
|
|
361
|
+
`, Qe = w.div`
|
|
362
362
|
width: 100%;
|
|
363
363
|
height: 100%;
|
|
364
364
|
& > div {
|
|
365
|
-
animation: ${
|
|
365
|
+
animation: ${gr} 600ms ease-out;
|
|
366
366
|
}
|
|
367
|
-
`,
|
|
367
|
+
`, hr = w.div`
|
|
368
368
|
& > div > div {
|
|
369
369
|
border-radius: 8px;
|
|
370
370
|
box-sizing: border-box;
|
|
371
371
|
}
|
|
372
|
-
`,
|
|
372
|
+
`, fr = w.div`
|
|
373
373
|
& > div {
|
|
374
374
|
width: 100%;
|
|
375
375
|
height: 100%;
|
|
@@ -389,50 +389,50 @@ const ct = w.div`
|
|
|
389
389
|
border-radius: 8px;
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
`,
|
|
392
|
+
`, mr = (e) => {
|
|
393
393
|
const { index: n, handleOpenModal: t } = e;
|
|
394
394
|
return /* @__PURE__ */ a(
|
|
395
|
-
|
|
395
|
+
Xe,
|
|
396
396
|
{
|
|
397
397
|
id: `loading-card-${n}`,
|
|
398
398
|
handleDelete: () => {
|
|
399
399
|
},
|
|
400
400
|
handleView: () => t ? t() : null,
|
|
401
401
|
controls: !1,
|
|
402
|
-
children: /* @__PURE__ */ a(
|
|
402
|
+
children: /* @__PURE__ */ a(Fn, { loading: !0 })
|
|
403
403
|
},
|
|
404
404
|
`loading-card-${n}`
|
|
405
405
|
);
|
|
406
|
-
},
|
|
406
|
+
}, br = (e) => {
|
|
407
407
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: i } = e;
|
|
408
|
-
return n ? /* @__PURE__ */ a(
|
|
409
|
-
/* @__PURE__ */ a(
|
|
408
|
+
return n ? /* @__PURE__ */ a(Qe, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
409
|
+
/* @__PURE__ */ a($, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
410
410
|
/* @__PURE__ */ a(
|
|
411
|
-
|
|
411
|
+
Xe,
|
|
412
412
|
{
|
|
413
413
|
id: n.decisionId,
|
|
414
414
|
handleDelete: () => o ? o(n.decisionId) : null,
|
|
415
415
|
handleView: () => r ? r(n) : null,
|
|
416
416
|
controls: t,
|
|
417
|
-
children: /* @__PURE__ */ a(
|
|
417
|
+
children: /* @__PURE__ */ a(Fn, { decision: n, textValues: i })
|
|
418
418
|
}
|
|
419
419
|
)
|
|
420
420
|
] }) }, n.decisionId) : null;
|
|
421
|
-
},
|
|
421
|
+
}, vr = (e) => {
|
|
422
422
|
const {
|
|
423
423
|
customTitleContentAddCard: n,
|
|
424
424
|
index: t,
|
|
425
425
|
handleOpenModal: r,
|
|
426
426
|
shouldRenderEmptyMessage: o
|
|
427
427
|
} = e, i = n || "Agregar decisión";
|
|
428
|
-
return /* @__PURE__ */ a(
|
|
429
|
-
/* @__PURE__ */ a(
|
|
428
|
+
return /* @__PURE__ */ a(Qe, { children: o ? null : /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
429
|
+
/* @__PURE__ */ a($, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
430
430
|
/* @__PURE__ */ a(
|
|
431
|
-
|
|
431
|
+
pt,
|
|
432
432
|
{
|
|
433
433
|
onClick: () => r ? r() : null,
|
|
434
434
|
children: /* @__PURE__ */ a(
|
|
435
|
-
|
|
435
|
+
Xe,
|
|
436
436
|
{
|
|
437
437
|
id: `add-decision-${t}`,
|
|
438
438
|
handleDelete: () => {
|
|
@@ -440,22 +440,22 @@ const ct = w.div`
|
|
|
440
440
|
handleView: () => r ? r() : null,
|
|
441
441
|
controls: !1,
|
|
442
442
|
children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
443
|
-
/* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(
|
|
444
|
-
/* @__PURE__ */ a(
|
|
443
|
+
/* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(Ye, {}), size: "35px" }),
|
|
444
|
+
/* @__PURE__ */ a($, { appearance: "gray", type: "body", size: "large", children: i })
|
|
445
445
|
] })
|
|
446
446
|
}
|
|
447
447
|
)
|
|
448
448
|
}
|
|
449
449
|
)
|
|
450
450
|
] }) }, `add-decision-${t}`);
|
|
451
|
-
},
|
|
452
|
-
loading:
|
|
453
|
-
decision:
|
|
454
|
-
add:
|
|
455
|
-
},
|
|
456
|
-
const { type: n } = e, t =
|
|
451
|
+
}, yr = {
|
|
452
|
+
loading: mr,
|
|
453
|
+
decision: br,
|
|
454
|
+
add: vr
|
|
455
|
+
}, wn = (e) => {
|
|
456
|
+
const { type: n } = e, t = yr[n];
|
|
457
457
|
return t ? t(e) : null;
|
|
458
|
-
},
|
|
458
|
+
}, xr = (e) => {
|
|
459
459
|
const {
|
|
460
460
|
controls: n,
|
|
461
461
|
customTitleContentAddCard: t,
|
|
@@ -465,7 +465,7 @@ const ct = w.div`
|
|
|
465
465
|
handleDelete: s,
|
|
466
466
|
textValues: d
|
|
467
467
|
} = e, l = o ? Array.from({ length: 3 }).map(
|
|
468
|
-
(u, c) =>
|
|
468
|
+
(u, c) => wn({
|
|
469
469
|
type: "loading",
|
|
470
470
|
index: c,
|
|
471
471
|
controls: n,
|
|
@@ -476,7 +476,7 @@ const ct = w.div`
|
|
|
476
476
|
textValues: d
|
|
477
477
|
})
|
|
478
478
|
) : r == null ? void 0 : r.map(
|
|
479
|
-
(u) =>
|
|
479
|
+
(u) => wn({
|
|
480
480
|
type: "decision",
|
|
481
481
|
decision: u,
|
|
482
482
|
controls: n,
|
|
@@ -488,7 +488,7 @@ const ct = w.div`
|
|
|
488
488
|
})
|
|
489
489
|
), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
490
490
|
return { renderedCards: l, shouldRenderAddCard: p };
|
|
491
|
-
},
|
|
491
|
+
}, gl = (e) => {
|
|
492
492
|
const {
|
|
493
493
|
controls: n = !0,
|
|
494
494
|
customTitleContentAddCard: t,
|
|
@@ -504,7 +504,7 @@ const ct = w.div`
|
|
|
504
504
|
handleSubmitForm: g,
|
|
505
505
|
handleDelete: h,
|
|
506
506
|
terms: f = !0
|
|
507
|
-
} = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } =
|
|
507
|
+
} = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = xr({
|
|
508
508
|
controls: n,
|
|
509
509
|
customTitleContentAddCard: t,
|
|
510
510
|
decisions: o,
|
|
@@ -514,7 +514,7 @@ const ct = w.div`
|
|
|
514
514
|
textValues: i
|
|
515
515
|
}), S = (o == null ? void 0 : o.length) === 0 && !p;
|
|
516
516
|
return /* @__PURE__ */ m(O, { children: [
|
|
517
|
-
/* @__PURE__ */ a(
|
|
517
|
+
/* @__PURE__ */ a(hr, { children: /* @__PURE__ */ a(fr, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
|
|
518
518
|
v,
|
|
519
519
|
{
|
|
520
520
|
direction: "column",
|
|
@@ -524,10 +524,10 @@ const ct = w.div`
|
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ a(
|
|
527
|
+
/* @__PURE__ */ a($, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
529
|
/* @__PURE__ */ m(
|
|
530
|
-
|
|
530
|
+
$,
|
|
531
531
|
{
|
|
532
532
|
as: "span",
|
|
533
533
|
type: "label",
|
|
@@ -546,7 +546,7 @@ const ct = w.div`
|
|
|
546
546
|
/* @__PURE__ */ a(
|
|
547
547
|
q,
|
|
548
548
|
{
|
|
549
|
-
iconBefore: /* @__PURE__ */ a(
|
|
549
|
+
iconBefore: /* @__PURE__ */ a(Ye, {}),
|
|
550
550
|
onClick: () => u ? u() : null,
|
|
551
551
|
children: t || "Agregar decisión"
|
|
552
552
|
}
|
|
@@ -554,7 +554,7 @@ const ct = w.div`
|
|
|
554
554
|
]
|
|
555
555
|
}
|
|
556
556
|
) : /* @__PURE__ */ m(
|
|
557
|
-
|
|
557
|
+
We,
|
|
558
558
|
{
|
|
559
559
|
templateColumns: y ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
560
560
|
autoFlow: "row dense",
|
|
@@ -567,7 +567,7 @@ const ct = w.div`
|
|
|
567
567
|
height: x ? "auto" : "484px",
|
|
568
568
|
children: [
|
|
569
569
|
D,
|
|
570
|
-
T &&
|
|
570
|
+
T && wn({
|
|
571
571
|
type: "add",
|
|
572
572
|
index: o == null ? void 0 : o.length,
|
|
573
573
|
controls: n,
|
|
@@ -584,13 +584,13 @@ const ct = w.div`
|
|
|
584
584
|
}
|
|
585
585
|
) }) }) }),
|
|
586
586
|
d && /* @__PURE__ */ a(
|
|
587
|
-
|
|
587
|
+
ut,
|
|
588
588
|
{
|
|
589
589
|
portalId: "modal-portal",
|
|
590
590
|
onCloseModal: c,
|
|
591
591
|
title: l ? "Editar Decisión" : "Nueva decisión",
|
|
592
592
|
children: /* @__PURE__ */ a(
|
|
593
|
-
|
|
593
|
+
Ta,
|
|
594
594
|
{
|
|
595
595
|
decision: l || s,
|
|
596
596
|
onSubmitEvent: g,
|
|
@@ -602,12 +602,12 @@ const ct = w.div`
|
|
|
602
602
|
}
|
|
603
603
|
)
|
|
604
604
|
] });
|
|
605
|
-
},
|
|
605
|
+
}, Tr = w.div`
|
|
606
606
|
position: relative;
|
|
607
607
|
& > div {
|
|
608
608
|
padding: 24px 16px;
|
|
609
609
|
}
|
|
610
|
-
`,
|
|
610
|
+
`, wr = w.div`
|
|
611
611
|
background-color: ${({ theme: e }) => {
|
|
612
612
|
var n, t;
|
|
613
613
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
|
|
@@ -638,7 +638,7 @@ const ct = w.div`
|
|
|
638
638
|
background-color: #ebecf0;
|
|
639
639
|
border-radius: 8px;
|
|
640
640
|
}
|
|
641
|
-
`,
|
|
641
|
+
`, Cr = (e) => {
|
|
642
642
|
const { children: n, portalId: t, onCloseModal: r, title: o } = e, i = document.getElementById(t);
|
|
643
643
|
if (!i)
|
|
644
644
|
throw new Error(
|
|
@@ -646,16 +646,16 @@ const ct = w.div`
|
|
|
646
646
|
);
|
|
647
647
|
const s = te("(max-width: 400px)");
|
|
648
648
|
return cn(
|
|
649
|
-
/* @__PURE__ */ a(
|
|
649
|
+
/* @__PURE__ */ a(Tr, { $smallScreen: s, children: /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ a(wr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
650
650
|
/* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
651
|
-
/* @__PURE__ */ a(
|
|
651
|
+
/* @__PURE__ */ a($, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
652
652
|
/* @__PURE__ */ a(ln, { size: "24px", cursor: "pointer", onClick: r })
|
|
653
653
|
] }) }),
|
|
654
654
|
n
|
|
655
655
|
] }) }) }) }),
|
|
656
656
|
i
|
|
657
657
|
);
|
|
658
|
-
},
|
|
658
|
+
}, Dr = An`
|
|
659
659
|
from {
|
|
660
660
|
opacity: 0;
|
|
661
661
|
transform: translateY(20px);
|
|
@@ -707,15 +707,15 @@ w.div`
|
|
|
707
707
|
width: 100%;
|
|
708
708
|
height: 100%;
|
|
709
709
|
& > div {
|
|
710
|
-
animation: ${
|
|
710
|
+
animation: ${Dr} 600ms ease-out;
|
|
711
711
|
}
|
|
712
712
|
`;
|
|
713
|
-
const
|
|
713
|
+
const Sr = w.div`
|
|
714
714
|
& > div > div {
|
|
715
715
|
border-radius: 8px;
|
|
716
716
|
box-sizing: border-box;
|
|
717
717
|
}
|
|
718
|
-
`,
|
|
718
|
+
`, Er = w.div`
|
|
719
719
|
& > div {
|
|
720
720
|
width: 100%;
|
|
721
721
|
height: 100%;
|
|
@@ -735,32 +735,32 @@ const Cr = w.div`
|
|
|
735
735
|
border-radius: 8px;
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
`,
|
|
738
|
+
`, Nr = (e) => {
|
|
739
739
|
const { index: n, handleOpenModal: t } = e;
|
|
740
740
|
return /* @__PURE__ */ a(
|
|
741
|
-
|
|
741
|
+
Xe,
|
|
742
742
|
{
|
|
743
743
|
id: `loading-card-${n}`,
|
|
744
744
|
handleDelete: () => {
|
|
745
745
|
},
|
|
746
746
|
handleView: () => t ? t() : null,
|
|
747
747
|
controls: !1,
|
|
748
|
-
children: /* @__PURE__ */ a(
|
|
748
|
+
children: /* @__PURE__ */ a(Fn, { loading: !0 })
|
|
749
749
|
},
|
|
750
750
|
`loading-card-${n}`
|
|
751
751
|
);
|
|
752
|
-
},
|
|
752
|
+
}, kr = (e) => e.value, Ar = (e) => e.value, $r = (e) => e.value, Ir = (e) => ({
|
|
753
753
|
from: e.from ?? "",
|
|
754
754
|
to: e.to ?? ""
|
|
755
|
-
}),
|
|
756
|
-
[
|
|
757
|
-
[
|
|
758
|
-
[
|
|
759
|
-
[
|
|
760
|
-
[
|
|
761
|
-
[
|
|
762
|
-
},
|
|
763
|
-
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r =
|
|
755
|
+
}), Rr = (e) => e.value, Fr = (e) => e.value, Lr = (e) => e.value, Or = {
|
|
756
|
+
[A.LIST_OF_VALUES]: Ar,
|
|
757
|
+
[A.LIST_OF_VALUES_MULTI]: $r,
|
|
758
|
+
[A.RANGE]: Ir,
|
|
759
|
+
[A.GREATER_THAN]: Rr,
|
|
760
|
+
[A.LESS_THAN]: Fr,
|
|
761
|
+
[A.EQUAL]: Lr
|
|
762
|
+
}, _e = (e) => {
|
|
763
|
+
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = Or[e == null ? void 0 : e.howToSetTheDecision] || kr;
|
|
764
764
|
return t && r(n) || n || void 0;
|
|
765
765
|
}, _n = w.div`
|
|
766
766
|
& > div {
|
|
@@ -789,7 +789,7 @@ const Cr = w.div`
|
|
|
789
789
|
background-color: #ebecf0;
|
|
790
790
|
border-radius: 8px;
|
|
791
791
|
}
|
|
792
|
-
`,
|
|
792
|
+
`, Pr = (e) => {
|
|
793
793
|
const {
|
|
794
794
|
conditionsAlignment: n,
|
|
795
795
|
decision: t,
|
|
@@ -803,10 +803,10 @@ const Cr = w.div`
|
|
|
803
803
|
} = e;
|
|
804
804
|
return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
|
|
805
805
|
/* @__PURE__ */ a(v, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
|
|
806
|
-
|
|
806
|
+
$e,
|
|
807
807
|
{
|
|
808
808
|
element: o,
|
|
809
|
-
valueData:
|
|
809
|
+
valueData: _e(
|
|
810
810
|
o
|
|
811
811
|
),
|
|
812
812
|
type: "decision"
|
|
@@ -822,7 +822,7 @@ const Cr = w.div`
|
|
|
822
822
|
height: "203px",
|
|
823
823
|
children: [
|
|
824
824
|
p.length > 0 && /* @__PURE__ */ a(
|
|
825
|
-
|
|
825
|
+
$,
|
|
826
826
|
{
|
|
827
827
|
type: "label",
|
|
828
828
|
size: "large",
|
|
@@ -833,17 +833,17 @@ const Cr = w.div`
|
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
835
|
p.length > 0 && p.map((u) => /* @__PURE__ */ a(_n, { children: /* @__PURE__ */ a(v, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
|
|
836
|
-
|
|
836
|
+
$e,
|
|
837
837
|
{
|
|
838
838
|
element: { ...u, value: u.value },
|
|
839
|
-
valueData:
|
|
839
|
+
valueData: _e(
|
|
840
840
|
u
|
|
841
841
|
)
|
|
842
842
|
}
|
|
843
843
|
) }) }, u.conditionName)),
|
|
844
844
|
p.length > 0 && /* @__PURE__ */ a(B, { dashed: !0 }),
|
|
845
845
|
d && /* @__PURE__ */ a(O, { children: r && /* @__PURE__ */ a(
|
|
846
|
-
|
|
846
|
+
$e,
|
|
847
847
|
{
|
|
848
848
|
element: r.element,
|
|
849
849
|
valueData: r.valueData,
|
|
@@ -886,47 +886,47 @@ const Cr = w.div`
|
|
|
886
886
|
}
|
|
887
887
|
) })
|
|
888
888
|
] });
|
|
889
|
-
},
|
|
889
|
+
}, Mr = (e) => Array.isArray(e) ? e[0] : e ?? null, zr = (e) => {
|
|
890
890
|
var n;
|
|
891
|
-
return ((n =
|
|
892
|
-
},
|
|
891
|
+
return ((n = Mr(e == null ? void 0 : e.conditionGroups)) == null ? void 0 : n.conditionsThatEstablishesTheDecision) ?? [];
|
|
892
|
+
}, Vr = (e) => {
|
|
893
893
|
const { decision: n, loading: t = !1, textValues: r } = e, o = !!(n != null && n.effectiveFrom), i = !!(n != null && n.validUntil), s = o && i ? {
|
|
894
894
|
element: {
|
|
895
895
|
labelName: r == null ? void 0 : r.terms,
|
|
896
896
|
value: String(n.effectiveFrom),
|
|
897
897
|
howToSetTheDecision: ee.RANGE,
|
|
898
|
-
decisionDataType:
|
|
898
|
+
decisionDataType: j.DATE
|
|
899
899
|
},
|
|
900
|
-
valueData:
|
|
900
|
+
valueData: _e({
|
|
901
901
|
labelName: r == null ? void 0 : r.terms,
|
|
902
902
|
value: {
|
|
903
903
|
from: String(n.effectiveFrom),
|
|
904
904
|
to: String(n.validUntil)
|
|
905
905
|
},
|
|
906
906
|
howToSetTheDecision: ee.RANGE,
|
|
907
|
-
decisionDataType:
|
|
907
|
+
decisionDataType: j.DATE
|
|
908
908
|
})
|
|
909
909
|
} : o && !i ? {
|
|
910
910
|
element: {
|
|
911
911
|
labelName: r == null ? void 0 : r.terms,
|
|
912
912
|
value: String(n.effectiveFrom),
|
|
913
913
|
howToSetTheDecision: ee.EQUAL,
|
|
914
|
-
decisionDataType:
|
|
914
|
+
decisionDataType: j.DATE
|
|
915
915
|
},
|
|
916
|
-
valueData:
|
|
916
|
+
valueData: _e({
|
|
917
917
|
labelName: r == null ? void 0 : r.terms,
|
|
918
918
|
value: String(n.effectiveFrom),
|
|
919
919
|
howToSetTheDecision: ee.EQUAL,
|
|
920
|
-
decisionDataType:
|
|
920
|
+
decisionDataType: j.DATE
|
|
921
921
|
})
|
|
922
922
|
} : null, d = n ? {
|
|
923
923
|
labelName: n.labelName || "",
|
|
924
924
|
decisionDataType: n.decisionDataType || "alphabetical",
|
|
925
|
-
value:
|
|
925
|
+
value: _e(n),
|
|
926
926
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
927
|
-
} : null, l =
|
|
927
|
+
} : null, l = zr(n).filter((g) => !(g != null && g.hidden)), p = Array.from({ length: 5 }), u = !!(!t && n && r && d), c = l.length < 2 ? "start" : "space-between";
|
|
928
928
|
return /* @__PURE__ */ a(
|
|
929
|
-
|
|
929
|
+
Pr,
|
|
930
930
|
{
|
|
931
931
|
conditionsAlignment: c,
|
|
932
932
|
decision: n,
|
|
@@ -939,7 +939,7 @@ const Cr = w.div`
|
|
|
939
939
|
visibleConditions: l
|
|
940
940
|
}
|
|
941
941
|
);
|
|
942
|
-
},
|
|
942
|
+
}, jr = w.div`
|
|
943
943
|
border-radius: 8px;
|
|
944
944
|
border: 1px solid
|
|
945
945
|
${({ theme: e }) => {
|
|
@@ -974,9 +974,9 @@ w.div`
|
|
|
974
974
|
border-radius: 8px;
|
|
975
975
|
}
|
|
976
976
|
`;
|
|
977
|
-
const
|
|
977
|
+
const Ur = (e) => {
|
|
978
978
|
const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
|
|
979
|
-
return /* @__PURE__ */ a(
|
|
979
|
+
return /* @__PURE__ */ a(jr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
980
980
|
n,
|
|
981
981
|
t && /* @__PURE__ */ m(O, { children: [
|
|
982
982
|
/* @__PURE__ */ a(B, {}),
|
|
@@ -994,19 +994,19 @@ const Vr = (e) => {
|
|
|
994
994
|
) })
|
|
995
995
|
] })
|
|
996
996
|
] }) });
|
|
997
|
-
},
|
|
997
|
+
}, _r = (e) => {
|
|
998
998
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: i } = e;
|
|
999
|
-
return n ? /* @__PURE__ */ a(
|
|
1000
|
-
/* @__PURE__ */ a(
|
|
999
|
+
return n ? /* @__PURE__ */ a(Qe, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
1000
|
+
/* @__PURE__ */ a($, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
1001
1001
|
/* @__PURE__ */ a(
|
|
1002
|
-
|
|
1002
|
+
Ur,
|
|
1003
1003
|
{
|
|
1004
1004
|
id: n.decisionId,
|
|
1005
1005
|
handleDelete: () => o ? o(n.decisionId) : null,
|
|
1006
1006
|
handleView: () => r ? r(n) : null,
|
|
1007
1007
|
controls: t,
|
|
1008
1008
|
children: /* @__PURE__ */ a(
|
|
1009
|
-
|
|
1009
|
+
Vr,
|
|
1010
1010
|
{
|
|
1011
1011
|
decision: n,
|
|
1012
1012
|
textValues: i
|
|
@@ -1015,21 +1015,21 @@ const Vr = (e) => {
|
|
|
1015
1015
|
}
|
|
1016
1016
|
)
|
|
1017
1017
|
] }) }, n.decisionId) : null;
|
|
1018
|
-
},
|
|
1018
|
+
}, Hr = (e) => {
|
|
1019
1019
|
const {
|
|
1020
1020
|
customTitleContentAddCard: n,
|
|
1021
1021
|
index: t,
|
|
1022
1022
|
handleOpenModal: r,
|
|
1023
1023
|
shouldRenderEmptyMessage: o
|
|
1024
1024
|
} = e, i = n || "Agregar decisión";
|
|
1025
|
-
return /* @__PURE__ */ a(
|
|
1026
|
-
/* @__PURE__ */ a(
|
|
1025
|
+
return /* @__PURE__ */ a(Qe, { children: o ? null : /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
1026
|
+
/* @__PURE__ */ a($, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
1027
1027
|
/* @__PURE__ */ a(
|
|
1028
|
-
|
|
1028
|
+
pt,
|
|
1029
1029
|
{
|
|
1030
1030
|
onClick: () => r ? r() : null,
|
|
1031
1031
|
children: /* @__PURE__ */ a(
|
|
1032
|
-
|
|
1032
|
+
Xe,
|
|
1033
1033
|
{
|
|
1034
1034
|
id: `add-decision-${t}`,
|
|
1035
1035
|
handleDelete: () => {
|
|
@@ -1037,29 +1037,29 @@ const Vr = (e) => {
|
|
|
1037
1037
|
handleView: () => r ? r() : null,
|
|
1038
1038
|
controls: !1,
|
|
1039
1039
|
children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
1040
|
-
/* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(
|
|
1041
|
-
/* @__PURE__ */ a(
|
|
1040
|
+
/* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(Ye, {}), size: "35px" }),
|
|
1041
|
+
/* @__PURE__ */ a($, { appearance: "gray", type: "body", size: "large", children: i })
|
|
1042
1042
|
] })
|
|
1043
1043
|
}
|
|
1044
1044
|
)
|
|
1045
1045
|
}
|
|
1046
1046
|
)
|
|
1047
1047
|
] }) }, `add-decision-${t}`);
|
|
1048
|
-
},
|
|
1049
|
-
loading:
|
|
1050
|
-
decision:
|
|
1051
|
-
add:
|
|
1052
|
-
},
|
|
1053
|
-
const { type: n } = e, t =
|
|
1048
|
+
}, qr = {
|
|
1049
|
+
loading: Nr,
|
|
1050
|
+
decision: _r,
|
|
1051
|
+
add: Hr
|
|
1052
|
+
}, Cn = (e) => {
|
|
1053
|
+
const { type: n } = e, t = qr[n];
|
|
1054
1054
|
return t ? t(e) : null;
|
|
1055
|
-
},
|
|
1055
|
+
}, Br = (e) => ({
|
|
1056
1056
|
schema: le().required("Requerido").test(
|
|
1057
1057
|
"non-empty",
|
|
1058
1058
|
"El valor no puede estar vacío",
|
|
1059
1059
|
(n) => n != null && n.trim() !== ""
|
|
1060
1060
|
),
|
|
1061
1061
|
value: e
|
|
1062
|
-
}),
|
|
1062
|
+
}), Gr = (e) => ({
|
|
1063
1063
|
schema: Pe().test(
|
|
1064
1064
|
"isArrayOrString",
|
|
1065
1065
|
"Debe ser un array de strings/numbers o un solo string",
|
|
@@ -1068,7 +1068,7 @@ const Vr = (e) => {
|
|
|
1068
1068
|
) : typeof n == "string"
|
|
1069
1069
|
),
|
|
1070
1070
|
value: e
|
|
1071
|
-
}),
|
|
1071
|
+
}), Yr = (e) => ({
|
|
1072
1072
|
schema: Pe().test(
|
|
1073
1073
|
"isArrayOrString",
|
|
1074
1074
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
@@ -1077,7 +1077,7 @@ const Vr = (e) => {
|
|
|
1077
1077
|
) : typeof n == "string"
|
|
1078
1078
|
),
|
|
1079
1079
|
value: e
|
|
1080
|
-
}),
|
|
1080
|
+
}), Wr = (e) => {
|
|
1081
1081
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
1082
1082
|
return {
|
|
1083
1083
|
schema: ne({
|
|
@@ -1093,27 +1093,27 @@ const Vr = (e) => {
|
|
|
1093
1093
|
}),
|
|
1094
1094
|
value: { from: n, to: t }
|
|
1095
1095
|
};
|
|
1096
|
-
}, fn = (e, n) => n ===
|
|
1096
|
+
}, fn = (e, n) => n === j.PERCENTAGE ? {
|
|
1097
1097
|
schema: se().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
|
|
1098
1098
|
value: e
|
|
1099
1099
|
} : {
|
|
1100
1100
|
schema: le().required("Requerido"),
|
|
1101
1101
|
value: e
|
|
1102
|
-
},
|
|
1103
|
-
[
|
|
1104
|
-
[
|
|
1105
|
-
[
|
|
1106
|
-
[
|
|
1107
|
-
[
|
|
1108
|
-
[
|
|
1109
|
-
},
|
|
1110
|
-
var
|
|
1111
|
-
const
|
|
1102
|
+
}, Xr = {
|
|
1103
|
+
[A.LIST_OF_VALUES]: Gr,
|
|
1104
|
+
[A.LIST_OF_VALUES_MULTI]: Yr,
|
|
1105
|
+
[A.RANGE]: Wr,
|
|
1106
|
+
[A.GREATER_THAN]: fn,
|
|
1107
|
+
[A.LESS_THAN]: fn,
|
|
1108
|
+
[A.EQUAL]: fn
|
|
1109
|
+
}, Qr = (e) => Xr[e] || Br;
|
|
1110
|
+
var Ln = /* @__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))(Ln || {});
|
|
1111
|
+
const nn = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Zr = (e, n) => {
|
|
1112
1112
|
var d;
|
|
1113
|
-
const t = Object.entries((e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}).filter(([, l]) =>
|
|
1113
|
+
const t = Object.entries((e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}).filter(([, l]) => nn(l)).map(([l, p]) => ({ conditionName: l, value: p }));
|
|
1114
1114
|
let r = [];
|
|
1115
1115
|
const o = (d = e == null ? void 0 : e.conditionGroups) == null ? void 0 : d.conditionsThatEstablishesTheDecision;
|
|
1116
|
-
Array.isArray(o) ? r = o.filter((l) =>
|
|
1116
|
+
Array.isArray(o) ? r = o.filter((l) => nn(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]) => nn(l)).map(([l, p]) => ({ conditionName: l, value: p })));
|
|
1117
1117
|
const i = t.length ? t : r, s = new Map(
|
|
1118
1118
|
(n ?? []).map((l) => [l == null ? void 0 : l.conditionName, l])
|
|
1119
1119
|
);
|
|
@@ -1127,15 +1127,15 @@ const en = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Ar
|
|
|
1127
1127
|
};
|
|
1128
1128
|
});
|
|
1129
1129
|
};
|
|
1130
|
-
function
|
|
1130
|
+
function Kr({
|
|
1131
1131
|
decision: e,
|
|
1132
1132
|
onSubmitEvent: n,
|
|
1133
1133
|
textValues: t
|
|
1134
1134
|
}) {
|
|
1135
1135
|
var c, g;
|
|
1136
|
-
const r = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((h, f) => (
|
|
1136
|
+
const r = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((h, f) => (nn(f.value) && (h[f.conditionName] = f.value), h), {}), i = Object.keys(o).length > 0, s = {
|
|
1137
1137
|
ruleName: e.ruleName || "",
|
|
1138
|
-
decisionDataType: e.decisionDataType ||
|
|
1138
|
+
decisionDataType: e.decisionDataType || j.ALPHABETICAL,
|
|
1139
1139
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
1140
1140
|
value: e.value ?? "",
|
|
1141
1141
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -1152,7 +1152,7 @@ function Qr({
|
|
|
1152
1152
|
let d;
|
|
1153
1153
|
const l = {
|
|
1154
1154
|
ruleName: le().required("El nombre de la regla es requerido"),
|
|
1155
|
-
value: qe(() =>
|
|
1155
|
+
value: qe(() => Qr(
|
|
1156
1156
|
d.values.howToSetTheDecision
|
|
1157
1157
|
)(
|
|
1158
1158
|
d.values.value,
|
|
@@ -1172,13 +1172,13 @@ function Qr({
|
|
|
1172
1172
|
) : f.notRequired()
|
|
1173
1173
|
));
|
|
1174
1174
|
const p = ne(l);
|
|
1175
|
-
return d =
|
|
1175
|
+
return d = In({
|
|
1176
1176
|
initialValues: s,
|
|
1177
1177
|
validationSchema: p,
|
|
1178
1178
|
validateOnBlur: !0,
|
|
1179
1179
|
onSubmit: (h) => {
|
|
1180
1180
|
var D;
|
|
1181
|
-
const f = ((D = e.conditionGroups) == null ? void 0 : D.ConditionGroupId) ?? "group-primary", x = h.toggleNone ? [] :
|
|
1181
|
+
const f = ((D = e.conditionGroups) == null ? void 0 : D.ConditionGroupId) ?? "group-primary", x = h.toggleNone ? [] : Zr(h, r), y = {
|
|
1182
1182
|
...e,
|
|
1183
1183
|
ruleName: h.ruleName,
|
|
1184
1184
|
decisionDataType: h.decisionDataType,
|
|
@@ -1201,7 +1201,7 @@ function Qr({
|
|
|
1201
1201
|
void 0
|
|
1202
1202
|
);
|
|
1203
1203
|
else if (d.values.conditionsThatEstablishesTheDecision[f.conditionName] === void 0) {
|
|
1204
|
-
const y = f.howToSetTheCondition ===
|
|
1204
|
+
const y = f.howToSetTheCondition === Ln.LIST_OF_VALUES_MULTI ? [] : "";
|
|
1205
1205
|
d.setFieldValue(
|
|
1206
1206
|
`conditionsThatEstablishesTheDecision.${f.conditionName}`,
|
|
1207
1207
|
y
|
|
@@ -1210,7 +1210,7 @@ function Qr({
|
|
|
1210
1210
|
});
|
|
1211
1211
|
} };
|
|
1212
1212
|
}
|
|
1213
|
-
const
|
|
1213
|
+
const Jr = w.div`
|
|
1214
1214
|
& > div {
|
|
1215
1215
|
border-radius: 8px;
|
|
1216
1216
|
border: 1px solid
|
|
@@ -1219,7 +1219,7 @@ const Zr = w.div`
|
|
|
1219
1219
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
|
|
1220
1220
|
}};
|
|
1221
1221
|
}
|
|
1222
|
-
`,
|
|
1222
|
+
`, eo = w.div`
|
|
1223
1223
|
width: 100%;
|
|
1224
1224
|
height: 100%;
|
|
1225
1225
|
overflow-y: auto;
|
|
@@ -1236,7 +1236,7 @@ const Zr = w.div`
|
|
|
1236
1236
|
background-color: #ebecf0;
|
|
1237
1237
|
border-radius: 8px;
|
|
1238
1238
|
}
|
|
1239
|
-
`,
|
|
1239
|
+
`, no = (e) => {
|
|
1240
1240
|
const {
|
|
1241
1241
|
checked: n,
|
|
1242
1242
|
children: t,
|
|
@@ -1258,12 +1258,12 @@ const Zr = w.div`
|
|
|
1258
1258
|
},
|
|
1259
1259
|
size: "small",
|
|
1260
1260
|
value: d,
|
|
1261
|
-
children: /* @__PURE__ */ a(
|
|
1261
|
+
children: /* @__PURE__ */ a($, { size: "medium", type: "label", weight: "bold", as: "span", children: i })
|
|
1262
1262
|
}
|
|
1263
1263
|
) }),
|
|
1264
1264
|
l && /* @__PURE__ */ a(O, { children: t })
|
|
1265
1265
|
] });
|
|
1266
|
-
},
|
|
1266
|
+
}, to = (e) => {
|
|
1267
1267
|
const {
|
|
1268
1268
|
onHandleStartChange: n,
|
|
1269
1269
|
onHandleEndChange: t,
|
|
@@ -1288,7 +1288,7 @@ const Zr = w.div`
|
|
|
1288
1288
|
return /* @__PURE__ */ m(O, { children: [
|
|
1289
1289
|
/* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
1290
1290
|
/* @__PURE__ */ a(
|
|
1291
|
-
|
|
1291
|
+
$,
|
|
1292
1292
|
{
|
|
1293
1293
|
appearance: "gray",
|
|
1294
1294
|
margin: "10px 0",
|
|
@@ -1306,7 +1306,7 @@ const Zr = w.div`
|
|
|
1306
1306
|
wrap: "wrap",
|
|
1307
1307
|
gap: "4px",
|
|
1308
1308
|
children: /* @__PURE__ */ a(
|
|
1309
|
-
|
|
1309
|
+
kn,
|
|
1310
1310
|
{
|
|
1311
1311
|
label: "Cerrada",
|
|
1312
1312
|
onChange: N,
|
|
@@ -1354,7 +1354,7 @@ const Zr = w.div`
|
|
|
1354
1354
|
}
|
|
1355
1355
|
)
|
|
1356
1356
|
] });
|
|
1357
|
-
},
|
|
1357
|
+
}, ro = (e) => {
|
|
1358
1358
|
const {
|
|
1359
1359
|
formik: n,
|
|
1360
1360
|
textValues: t,
|
|
@@ -1368,13 +1368,13 @@ const Zr = w.div`
|
|
|
1368
1368
|
termEndStatus: u
|
|
1369
1369
|
} = e;
|
|
1370
1370
|
return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
1371
|
-
|
|
1371
|
+
tn({
|
|
1372
1372
|
condition: i,
|
|
1373
1373
|
formik: n,
|
|
1374
1374
|
isDecision: !0
|
|
1375
1375
|
}),
|
|
1376
1376
|
/* @__PURE__ */ a(B, { dashed: !0 }),
|
|
1377
|
-
/* @__PURE__ */ a(
|
|
1377
|
+
/* @__PURE__ */ a(Jr, { children: /* @__PURE__ */ a(eo, { children: /* @__PURE__ */ m(
|
|
1378
1378
|
v,
|
|
1379
1379
|
{
|
|
1380
1380
|
direction: "column",
|
|
@@ -1389,7 +1389,7 @@ const Zr = w.div`
|
|
|
1389
1389
|
alignItems: "center",
|
|
1390
1390
|
gap: "64px",
|
|
1391
1391
|
children: [
|
|
1392
|
-
/* @__PURE__ */ a(
|
|
1392
|
+
/* @__PURE__ */ a($, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
1393
1393
|
/* @__PURE__ */ a(
|
|
1394
1394
|
dn,
|
|
1395
1395
|
{
|
|
@@ -1397,7 +1397,7 @@ const Zr = w.div`
|
|
|
1397
1397
|
onChange: () => s(!n.values.toggleNone),
|
|
1398
1398
|
checked: n.values.toggleNone,
|
|
1399
1399
|
size: "small",
|
|
1400
|
-
children: /* @__PURE__ */ a(
|
|
1400
|
+
children: /* @__PURE__ */ a($, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
1401
1401
|
}
|
|
1402
1402
|
)
|
|
1403
1403
|
]
|
|
@@ -1406,7 +1406,7 @@ const Zr = w.div`
|
|
|
1406
1406
|
/* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => {
|
|
1407
1407
|
var g;
|
|
1408
1408
|
return /* @__PURE__ */ a(
|
|
1409
|
-
|
|
1409
|
+
no,
|
|
1410
1410
|
{
|
|
1411
1411
|
id: `toggle-${c.conditionName}`,
|
|
1412
1412
|
name: `toggle.${c.conditionName}`,
|
|
@@ -1414,9 +1414,9 @@ const Zr = w.div`
|
|
|
1414
1414
|
checked: !n.values.toggleNone && ((g = n.values.conditionsThatEstablishesTheDecision) == null ? void 0 : g[c.conditionName]) !== void 0,
|
|
1415
1415
|
handleToggleChange: (h) => d(
|
|
1416
1416
|
c.conditionName,
|
|
1417
|
-
c.howToSetTheCondition ===
|
|
1417
|
+
c.howToSetTheCondition === Ln.LIST_OF_VALUES_MULTI
|
|
1418
1418
|
)(h.target.checked),
|
|
1419
|
-
children:
|
|
1419
|
+
children: tn({ condition: c, formik: n })
|
|
1420
1420
|
},
|
|
1421
1421
|
c.conditionName
|
|
1422
1422
|
);
|
|
@@ -1427,7 +1427,7 @@ const Zr = w.div`
|
|
|
1427
1427
|
t.terms && /* @__PURE__ */ m(O, { children: [
|
|
1428
1428
|
/* @__PURE__ */ a(B, { dashed: !0 }),
|
|
1429
1429
|
/* @__PURE__ */ a(
|
|
1430
|
-
|
|
1430
|
+
to,
|
|
1431
1431
|
{
|
|
1432
1432
|
labelStart: t.termStart,
|
|
1433
1433
|
labelEnd: t.termEnd,
|
|
@@ -1447,15 +1447,15 @@ const Zr = w.div`
|
|
|
1447
1447
|
)
|
|
1448
1448
|
] }),
|
|
1449
1449
|
/* @__PURE__ */ a(B, {}),
|
|
1450
|
-
l && /* @__PURE__ */ a(
|
|
1450
|
+
l && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
1451
1451
|
/* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
1452
1452
|
/* @__PURE__ */ a(q, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
1453
1453
|
/* @__PURE__ */ a(q, { type: "submit", children: t.confirm })
|
|
1454
1454
|
] })
|
|
1455
1455
|
] }) });
|
|
1456
|
-
},
|
|
1456
|
+
}, oo = (e) => {
|
|
1457
1457
|
var h, f;
|
|
1458
|
-
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } =
|
|
1458
|
+
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = Kr({
|
|
1459
1459
|
decision: n,
|
|
1460
1460
|
onSubmitEvent: t,
|
|
1461
1461
|
textValues: r
|
|
@@ -1469,7 +1469,7 @@ const Zr = w.div`
|
|
|
1469
1469
|
(x) => !x.hidden
|
|
1470
1470
|
)) || [], p = !!i.errors.conditionsThatEstablishesTheDecision && i.submitCount > 0, u = i.touched.effectiveFrom ? i.errors.effectiveFrom ? "invalid" : "valid" : void 0, c = i.touched.validUntil ? i.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
1471
1471
|
return /* @__PURE__ */ a(
|
|
1472
|
-
|
|
1472
|
+
ro,
|
|
1473
1473
|
{
|
|
1474
1474
|
formik: i,
|
|
1475
1475
|
onCancel: o,
|
|
@@ -1501,7 +1501,7 @@ const Zr = w.div`
|
|
|
1501
1501
|
termEndStatus: c
|
|
1502
1502
|
}
|
|
1503
1503
|
);
|
|
1504
|
-
},
|
|
1504
|
+
}, ao = (e) => {
|
|
1505
1505
|
const {
|
|
1506
1506
|
controls: n,
|
|
1507
1507
|
customTitleContentAddCard: t,
|
|
@@ -1511,7 +1511,7 @@ const Zr = w.div`
|
|
|
1511
1511
|
handleDelete: s,
|
|
1512
1512
|
textValues: d
|
|
1513
1513
|
} = e, l = o ? Array.from({ length: 3 }).map(
|
|
1514
|
-
(u, c) =>
|
|
1514
|
+
(u, c) => Cn({
|
|
1515
1515
|
type: "loading",
|
|
1516
1516
|
index: c,
|
|
1517
1517
|
controls: n,
|
|
@@ -1522,7 +1522,7 @@ const Zr = w.div`
|
|
|
1522
1522
|
textValues: d
|
|
1523
1523
|
})
|
|
1524
1524
|
) : r == null ? void 0 : r.map(
|
|
1525
|
-
(u) =>
|
|
1525
|
+
(u) => Cn({
|
|
1526
1526
|
type: "decision",
|
|
1527
1527
|
decision: u,
|
|
1528
1528
|
controls: n,
|
|
@@ -1534,7 +1534,7 @@ const Zr = w.div`
|
|
|
1534
1534
|
})
|
|
1535
1535
|
), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
1536
1536
|
return { renderedCards: l, shouldRenderAddCard: p };
|
|
1537
|
-
},
|
|
1537
|
+
}, hl = (e) => {
|
|
1538
1538
|
const {
|
|
1539
1539
|
controls: n = !0,
|
|
1540
1540
|
customTitleContentAddCard: t,
|
|
@@ -1550,7 +1550,7 @@ const Zr = w.div`
|
|
|
1550
1550
|
handleSubmitForm: g,
|
|
1551
1551
|
handleDelete: h,
|
|
1552
1552
|
terms: f = !0
|
|
1553
|
-
} = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } =
|
|
1553
|
+
} = e, x = te("(max-width: 681px)"), y = te("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = ao({
|
|
1554
1554
|
controls: n,
|
|
1555
1555
|
customTitleContentAddCard: t,
|
|
1556
1556
|
decisions: o,
|
|
@@ -1560,7 +1560,7 @@ const Zr = w.div`
|
|
|
1560
1560
|
textValues: i
|
|
1561
1561
|
}), S = (o == null ? void 0 : o.length) === 0 && !p;
|
|
1562
1562
|
return /* @__PURE__ */ m(O, { children: [
|
|
1563
|
-
/* @__PURE__ */ a(
|
|
1563
|
+
/* @__PURE__ */ a(Sr, { children: /* @__PURE__ */ a(Er, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
|
|
1564
1564
|
v,
|
|
1565
1565
|
{
|
|
1566
1566
|
direction: "column",
|
|
@@ -1570,10 +1570,10 @@ const Zr = w.div`
|
|
|
1570
1570
|
justifyContent: "center",
|
|
1571
1571
|
alignItems: "center",
|
|
1572
1572
|
children: [
|
|
1573
|
-
/* @__PURE__ */ a(
|
|
1573
|
+
/* @__PURE__ */ a($, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
|
|
1574
1574
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1575
1575
|
/* @__PURE__ */ m(
|
|
1576
|
-
|
|
1576
|
+
$,
|
|
1577
1577
|
{
|
|
1578
1578
|
as: "span",
|
|
1579
1579
|
type: "label",
|
|
@@ -1592,7 +1592,7 @@ const Zr = w.div`
|
|
|
1592
1592
|
/* @__PURE__ */ a(
|
|
1593
1593
|
q,
|
|
1594
1594
|
{
|
|
1595
|
-
iconBefore: /* @__PURE__ */ a(
|
|
1595
|
+
iconBefore: /* @__PURE__ */ a(Ye, {}),
|
|
1596
1596
|
onClick: () => u ? u() : null,
|
|
1597
1597
|
children: t || "Agregar decisión"
|
|
1598
1598
|
}
|
|
@@ -1600,7 +1600,7 @@ const Zr = w.div`
|
|
|
1600
1600
|
]
|
|
1601
1601
|
}
|
|
1602
1602
|
) : /* @__PURE__ */ m(
|
|
1603
|
-
|
|
1603
|
+
We,
|
|
1604
1604
|
{
|
|
1605
1605
|
templateColumns: y ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
1606
1606
|
autoFlow: "row dense",
|
|
@@ -1613,7 +1613,7 @@ const Zr = w.div`
|
|
|
1613
1613
|
height: x ? "auto" : "484px",
|
|
1614
1614
|
children: [
|
|
1615
1615
|
D,
|
|
1616
|
-
T &&
|
|
1616
|
+
T && Cn({
|
|
1617
1617
|
type: "add",
|
|
1618
1618
|
index: o == null ? void 0 : o.length,
|
|
1619
1619
|
controls: n,
|
|
@@ -1630,13 +1630,13 @@ const Zr = w.div`
|
|
|
1630
1630
|
}
|
|
1631
1631
|
) }) }) }),
|
|
1632
1632
|
d && /* @__PURE__ */ a(
|
|
1633
|
-
|
|
1633
|
+
Cr,
|
|
1634
1634
|
{
|
|
1635
1635
|
portalId: "modal-portal",
|
|
1636
1636
|
onCloseModal: c,
|
|
1637
1637
|
title: l ? "Editar Decisión" : "Nueva decisión",
|
|
1638
1638
|
children: /* @__PURE__ */ a(
|
|
1639
|
-
|
|
1639
|
+
oo,
|
|
1640
1640
|
{
|
|
1641
1641
|
decision: l || s,
|
|
1642
1642
|
onSubmitEvent: g,
|
|
@@ -1648,20 +1648,20 @@ const Zr = w.div`
|
|
|
1648
1648
|
}
|
|
1649
1649
|
)
|
|
1650
1650
|
] });
|
|
1651
|
-
},
|
|
1651
|
+
}, gt = (e) => {
|
|
1652
1652
|
const { children: n } = e;
|
|
1653
|
-
return /* @__PURE__ */ a(
|
|
1654
|
-
},
|
|
1653
|
+
return /* @__PURE__ */ a(qt, { width: "100%", children: n });
|
|
1654
|
+
}, io = (e) => e.value, lo = (e) => e.value, so = (e) => e.value, co = (e) => ({
|
|
1655
1655
|
from: e.from ?? "",
|
|
1656
1656
|
to: e.to ?? ""
|
|
1657
|
-
}),
|
|
1658
|
-
[
|
|
1659
|
-
[
|
|
1660
|
-
[
|
|
1661
|
-
[
|
|
1662
|
-
[
|
|
1663
|
-
[
|
|
1664
|
-
},
|
|
1657
|
+
}), uo = (e) => e.value, po = (e) => e.value, go = (e) => e.value, ho = {
|
|
1658
|
+
[A.LIST_OF_VALUES]: lo,
|
|
1659
|
+
[A.LIST_OF_VALUES_MULTI]: so,
|
|
1660
|
+
[A.RANGE]: co,
|
|
1661
|
+
[A.GREATER_THAN]: uo,
|
|
1662
|
+
[A.LESS_THAN]: po,
|
|
1663
|
+
[A.EQUAL]: go
|
|
1664
|
+
}, He = (e) => {
|
|
1665
1665
|
const n = e == null ? void 0 : e.value;
|
|
1666
1666
|
if (typeof n == "string" && n.includes(" a ")) {
|
|
1667
1667
|
const t = [
|
|
@@ -1678,8 +1678,8 @@ const Zr = w.div`
|
|
|
1678
1678
|
}
|
|
1679
1679
|
return n;
|
|
1680
1680
|
}
|
|
1681
|
-
return typeof n == "object" && n !== null && !Array.isArray(n) ? (
|
|
1682
|
-
},
|
|
1681
|
+
return typeof n == "object" && n !== null && !Array.isArray(n) ? (ho[e == null ? void 0 : e.howToSetTheDecision] || io)(n) : n || void 0;
|
|
1682
|
+
}, fo = w.div`
|
|
1683
1683
|
display: flex;
|
|
1684
1684
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
1685
1685
|
align-items: ${({ $alignItems: e }) => e};
|
|
@@ -1723,7 +1723,7 @@ const Zr = w.div`
|
|
|
1723
1723
|
scroll: D = !1
|
|
1724
1724
|
} = e;
|
|
1725
1725
|
return /* @__PURE__ */ a(
|
|
1726
|
-
|
|
1726
|
+
fo,
|
|
1727
1727
|
{
|
|
1728
1728
|
ref: n,
|
|
1729
1729
|
direction: o,
|
|
@@ -1776,18 +1776,18 @@ w.div`
|
|
|
1776
1776
|
border-radius: 8px;
|
|
1777
1777
|
}
|
|
1778
1778
|
`;
|
|
1779
|
-
const
|
|
1779
|
+
const mo = w.div`
|
|
1780
1780
|
cursor: pointer;
|
|
1781
|
-
`,
|
|
1781
|
+
`, bo = w.div`
|
|
1782
1782
|
& > div > div > div > p {
|
|
1783
1783
|
text-wrap-mode: nowrap;
|
|
1784
1784
|
}
|
|
1785
|
-
`,
|
|
1785
|
+
`, vo = w.div`
|
|
1786
1786
|
& > div {
|
|
1787
1787
|
justify-content: auto;
|
|
1788
1788
|
gap: 8px;
|
|
1789
1789
|
}
|
|
1790
|
-
`,
|
|
1790
|
+
`, yo = (e) => {
|
|
1791
1791
|
const {
|
|
1792
1792
|
controls: n,
|
|
1793
1793
|
conditionsAlignment: t,
|
|
@@ -1811,14 +1811,14 @@ const ho = w.div`
|
|
|
1811
1811
|
hasMultipleGroups: N
|
|
1812
1812
|
} = e;
|
|
1813
1813
|
return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
1814
|
-
/* @__PURE__ */ a(
|
|
1814
|
+
/* @__PURE__ */ a(mo, { onClick: p, children: /* @__PURE__ */ m(
|
|
1815
1815
|
v,
|
|
1816
1816
|
{
|
|
1817
1817
|
alignItems: "start",
|
|
1818
1818
|
justifyContent: "space-between",
|
|
1819
1819
|
children: [
|
|
1820
1820
|
/* @__PURE__ */ m(v, { gap: "12px", children: [
|
|
1821
|
-
/* @__PURE__ */ a(
|
|
1821
|
+
/* @__PURE__ */ a(bo, { children: /* @__PURE__ */ a(
|
|
1822
1822
|
De,
|
|
1823
1823
|
{
|
|
1824
1824
|
id: "tag",
|
|
@@ -1827,11 +1827,11 @@ const ho = w.div`
|
|
|
1827
1827
|
displayIcon: !1
|
|
1828
1828
|
}
|
|
1829
1829
|
) }),
|
|
1830
|
-
/* @__PURE__ */ a(
|
|
1831
|
-
|
|
1830
|
+
/* @__PURE__ */ a(vo, { children: /* @__PURE__ */ a(
|
|
1831
|
+
Ke,
|
|
1832
1832
|
{
|
|
1833
1833
|
element: o,
|
|
1834
|
-
valueData:
|
|
1834
|
+
valueData: He(
|
|
1835
1835
|
o
|
|
1836
1836
|
),
|
|
1837
1837
|
type: "decision"
|
|
@@ -1844,7 +1844,7 @@ const ho = w.div`
|
|
|
1844
1844
|
M,
|
|
1845
1845
|
{
|
|
1846
1846
|
appearance: "primary",
|
|
1847
|
-
icon: /* @__PURE__ */ a(
|
|
1847
|
+
icon: /* @__PURE__ */ a(Ft, {}),
|
|
1848
1848
|
size: "24px",
|
|
1849
1849
|
cursorHover: !0,
|
|
1850
1850
|
onClick: (C) => {
|
|
@@ -1869,7 +1869,7 @@ const ho = w.div`
|
|
|
1869
1869
|
M,
|
|
1870
1870
|
{
|
|
1871
1871
|
appearance: "dark",
|
|
1872
|
-
icon: l ? /* @__PURE__ */ a(
|
|
1872
|
+
icon: l ? /* @__PURE__ */ a(Lt, {}) : /* @__PURE__ */ a(Tn, {}),
|
|
1873
1873
|
size: "24px",
|
|
1874
1874
|
cursorHover: !0
|
|
1875
1875
|
}
|
|
@@ -1881,8 +1881,8 @@ const ho = w.div`
|
|
|
1881
1881
|
) }),
|
|
1882
1882
|
l && /* @__PURE__ */ m(O, { children: [
|
|
1883
1883
|
/* @__PURE__ */ a(B, { dashed: !0 }),
|
|
1884
|
-
N ? /* @__PURE__ */ a(
|
|
1885
|
-
|
|
1884
|
+
N ? /* @__PURE__ */ a(st, { tabs: y, selectedTab: D, onChange: T }) : /* @__PURE__ */ a(
|
|
1885
|
+
$,
|
|
1886
1886
|
{
|
|
1887
1887
|
type: "label",
|
|
1888
1888
|
size: "large",
|
|
@@ -1908,10 +1908,10 @@ const ho = w.div`
|
|
|
1908
1908
|
borderRadius: "8px",
|
|
1909
1909
|
background: !0,
|
|
1910
1910
|
children: /* @__PURE__ */ a(
|
|
1911
|
-
|
|
1911
|
+
Ke,
|
|
1912
1912
|
{
|
|
1913
1913
|
element: { ...C, value: C.value },
|
|
1914
|
-
valueData:
|
|
1914
|
+
valueData: He(
|
|
1915
1915
|
C
|
|
1916
1916
|
)
|
|
1917
1917
|
}
|
|
@@ -1927,7 +1927,7 @@ const ho = w.div`
|
|
|
1927
1927
|
borderRadius: "8px",
|
|
1928
1928
|
background: !0,
|
|
1929
1929
|
children: /* @__PURE__ */ a(
|
|
1930
|
-
|
|
1930
|
+
Ke,
|
|
1931
1931
|
{
|
|
1932
1932
|
element: g.element,
|
|
1933
1933
|
valueData: g.valueData
|
|
@@ -1944,7 +1944,7 @@ const ho = w.div`
|
|
|
1944
1944
|
borderRadius: "8px",
|
|
1945
1945
|
background: !0,
|
|
1946
1946
|
children: /* @__PURE__ */ a(
|
|
1947
|
-
|
|
1947
|
+
Ke,
|
|
1948
1948
|
{
|
|
1949
1949
|
element: h.element,
|
|
1950
1950
|
valueData: h.valueData
|
|
@@ -1964,12 +1964,39 @@ const ho = w.div`
|
|
|
1964
1964
|
] }),
|
|
1965
1965
|
/* @__PURE__ */ m(v, { alignItems: "center", gap: "8px", children: [
|
|
1966
1966
|
/* @__PURE__ */ a(J, { animated: !0, width: "50px" }),
|
|
1967
|
-
/* @__PURE__ */ a(
|
|
1967
|
+
/* @__PURE__ */ a(Bt, { animated: !0 })
|
|
1968
1968
|
] })
|
|
1969
1969
|
] });
|
|
1970
|
-
},
|
|
1970
|
+
}, qn = (e) => !!e && typeof e == "object" && !Array.isArray(e) && Object.values(e).every(Array.isArray), mn = (e) => {
|
|
1971
|
+
const n = /* @__PURE__ */ new Set(), t = [];
|
|
1972
|
+
for (const r of e) {
|
|
1973
|
+
const o = String((r == null ? void 0 : r.conditionName) ?? "");
|
|
1974
|
+
n.has(o) || (n.add(o), t.push(r));
|
|
1975
|
+
}
|
|
1976
|
+
return t;
|
|
1977
|
+
}, Be = (e) => {
|
|
1978
|
+
if (!e) return {};
|
|
1979
|
+
if (Array.isArray(e.conditionGroups)) {
|
|
1980
|
+
const n = e.conditionGroups.map((t) => [
|
|
1981
|
+
t.ConditionGroupId,
|
|
1982
|
+
mn(
|
|
1983
|
+
Array.isArray(t.conditionsThatEstablishesTheDecision) ? t.conditionsThatEstablishesTheDecision : []
|
|
1984
|
+
)
|
|
1985
|
+
]);
|
|
1986
|
+
return Object.fromEntries(n);
|
|
1987
|
+
}
|
|
1988
|
+
if (qn(e.conditionsThatEstablishesTheDecision)) {
|
|
1989
|
+
const n = e.conditionsThatEstablishesTheDecision;
|
|
1990
|
+
return Object.fromEntries(
|
|
1991
|
+
Object.entries(n).map(([t, r]) => [t, mn(r)])
|
|
1992
|
+
);
|
|
1993
|
+
}
|
|
1994
|
+
return qn(e) ? Object.fromEntries(
|
|
1995
|
+
Object.entries(e).map(([n, t]) => [n, mn(t)])
|
|
1996
|
+
) : {};
|
|
1997
|
+
}, ht = (e, n) => Object.fromEntries(
|
|
1971
1998
|
Object.entries(e).map(([t, r]) => [t, r.filter(n)])
|
|
1972
|
-
),
|
|
1999
|
+
), Bn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ft = (e) => {
|
|
1973
2000
|
var be;
|
|
1974
2001
|
const {
|
|
1975
2002
|
decision: n,
|
|
@@ -1986,33 +2013,33 @@ const ho = w.div`
|
|
|
1986
2013
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
1987
2014
|
value: String(n.effectiveFrom),
|
|
1988
2015
|
howToSetTheDecision: ee.EQUAL,
|
|
1989
|
-
decisionDataType:
|
|
2016
|
+
decisionDataType: j.DATE
|
|
1990
2017
|
},
|
|
1991
|
-
valueData:
|
|
2018
|
+
valueData: He({
|
|
1992
2019
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
1993
2020
|
value: String(n.effectiveFrom),
|
|
1994
2021
|
howToSetTheDecision: ee.EQUAL,
|
|
1995
|
-
decisionDataType:
|
|
2022
|
+
decisionDataType: j.DATE
|
|
1996
2023
|
})
|
|
1997
2024
|
} : null, h = c ? {
|
|
1998
2025
|
element: {
|
|
1999
2026
|
labelName: r == null ? void 0 : r.validUntil,
|
|
2000
2027
|
value: n.validUntil instanceof Date ? n.validUntil.toISOString() : n.validUntil,
|
|
2001
2028
|
howToSetTheDecision: ee.EQUAL,
|
|
2002
|
-
decisionDataType:
|
|
2029
|
+
decisionDataType: j.DATE
|
|
2003
2030
|
},
|
|
2004
|
-
valueData:
|
|
2031
|
+
valueData: He({
|
|
2005
2032
|
labelName: r == null ? void 0 : r.validUntil,
|
|
2006
2033
|
value: n.validUntil instanceof Date ? n.validUntil.toISOString() : n.validUntil,
|
|
2007
2034
|
howToSetTheDecision: ee.EQUAL,
|
|
2008
|
-
decisionDataType:
|
|
2035
|
+
decisionDataType: j.DATE
|
|
2009
2036
|
})
|
|
2010
2037
|
} : null, f = n ? {
|
|
2011
2038
|
labelName: n.labelName || "",
|
|
2012
|
-
decisionDataType: n.decisionDataType ||
|
|
2013
|
-
value:
|
|
2039
|
+
decisionDataType: n.decisionDataType || j.ALPHABETICAL,
|
|
2040
|
+
value: He(n),
|
|
2014
2041
|
howToSetTheDecision: n.howToSetTheDecision || ee.EQUAL
|
|
2015
|
-
} : null, x = n ?
|
|
2042
|
+
} : null, x = n ? Be(n) : {}, y = ht(x, (P) => !P.hidden), D = Object.keys(y), T = [
|
|
2016
2043
|
...D.filter((P) => P === "group-primary"),
|
|
2017
2044
|
...D.filter((P) => P !== "group-primary")
|
|
2018
2045
|
], S = {};
|
|
@@ -2021,14 +2048,14 @@ const ho = w.div`
|
|
|
2021
2048
|
const de = P === "group-primary" ? "mainCondition" : `alternateCondition-${N++}`;
|
|
2022
2049
|
return S[de] = P, {
|
|
2023
2050
|
id: de,
|
|
2024
|
-
label: P === "group-primary" ?
|
|
2051
|
+
label: P === "group-primary" ? Bn(P, 0) : Bn(P, Number(de.split("-").at(-1))),
|
|
2025
2052
|
isDisabled: !1
|
|
2026
2053
|
};
|
|
2027
2054
|
}), [I, F] = V.useState(
|
|
2028
2055
|
((be = C[0]) == null ? void 0 : be.id) ?? "mainCondition"
|
|
2029
|
-
), k = (P) => F(P),
|
|
2056
|
+
), k = (P) => F(P), _ = S[I] ?? "group-primary", ae = y[_] ?? [], he = T.length > 1, fe = Array.from({ length: 5 }), pe = !!(!t && n && r && f), ie = ae.length < 2 ? "start" : "space-between", me = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
|
|
2030
2057
|
return /* @__PURE__ */ a(
|
|
2031
|
-
|
|
2058
|
+
yo,
|
|
2032
2059
|
{
|
|
2033
2060
|
conditionsAlignment: ie,
|
|
2034
2061
|
controls: p,
|
|
@@ -2053,7 +2080,7 @@ const ho = w.div`
|
|
|
2053
2080
|
hasMultipleGroups: he
|
|
2054
2081
|
}
|
|
2055
2082
|
);
|
|
2056
|
-
},
|
|
2083
|
+
}, xo = An`
|
|
2057
2084
|
from {
|
|
2058
2085
|
opacity: 0;
|
|
2059
2086
|
transform: translateY(20px);
|
|
@@ -2087,7 +2114,7 @@ w.div`
|
|
|
2087
2114
|
}};
|
|
2088
2115
|
}
|
|
2089
2116
|
`;
|
|
2090
|
-
const
|
|
2117
|
+
const To = w.div`
|
|
2091
2118
|
& > div {
|
|
2092
2119
|
box-shadow: 0px 2px 3px 0px
|
|
2093
2120
|
${({ theme: e }) => {
|
|
@@ -2096,18 +2123,18 @@ const yo = w.div`
|
|
|
2096
2123
|
}};
|
|
2097
2124
|
cursor: pointer;
|
|
2098
2125
|
}
|
|
2099
|
-
`,
|
|
2126
|
+
`, wo = w.div`
|
|
2100
2127
|
width: 100%;
|
|
2101
2128
|
height: 100%;
|
|
2102
2129
|
& > div {
|
|
2103
|
-
animation: ${
|
|
2130
|
+
animation: ${xo} 600ms ease-out;
|
|
2104
2131
|
}
|
|
2105
|
-
`,
|
|
2132
|
+
`, Co = w.div`
|
|
2106
2133
|
& > div > div {
|
|
2107
2134
|
border-radius: 8px;
|
|
2108
2135
|
box-sizing: border-box;
|
|
2109
2136
|
}
|
|
2110
|
-
`,
|
|
2137
|
+
`, Do = w.div`
|
|
2111
2138
|
& > div {
|
|
2112
2139
|
width: 100%;
|
|
2113
2140
|
height: 100%;
|
|
@@ -2127,21 +2154,21 @@ const yo = w.div`
|
|
|
2127
2154
|
border-radius: 8px;
|
|
2128
2155
|
}
|
|
2129
2156
|
}
|
|
2130
|
-
`,
|
|
2157
|
+
`, So = (e) => {
|
|
2131
2158
|
const { index: n, handleOpenModal: t } = e;
|
|
2132
2159
|
return /* @__PURE__ */ a(
|
|
2133
|
-
|
|
2160
|
+
gt,
|
|
2134
2161
|
{
|
|
2135
2162
|
id: `loading-card-${n}`,
|
|
2136
2163
|
handleDelete: () => {
|
|
2137
2164
|
},
|
|
2138
2165
|
handleView: () => t ? t() : null,
|
|
2139
2166
|
controls: !1,
|
|
2140
|
-
children: /* @__PURE__ */ a(
|
|
2167
|
+
children: /* @__PURE__ */ a(ft, { loading: !0 })
|
|
2141
2168
|
},
|
|
2142
2169
|
`loading-card-${n}`
|
|
2143
2170
|
);
|
|
2144
|
-
},
|
|
2171
|
+
}, Eo = (e) => {
|
|
2145
2172
|
const {
|
|
2146
2173
|
decision: n,
|
|
2147
2174
|
controls: t,
|
|
@@ -2152,14 +2179,14 @@ const yo = w.div`
|
|
|
2152
2179
|
isOpen: d,
|
|
2153
2180
|
onToggle: l
|
|
2154
2181
|
} = e;
|
|
2155
|
-
return n ? /* @__PURE__ */ a(
|
|
2156
|
-
|
|
2182
|
+
return n ? /* @__PURE__ */ a(Qe, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ a(
|
|
2183
|
+
gt,
|
|
2157
2184
|
{
|
|
2158
2185
|
id: n.decisionId,
|
|
2159
2186
|
handleDelete: () => o ? o(n.decisionId) : null,
|
|
2160
2187
|
handleView: () => r ? r(n) : null,
|
|
2161
2188
|
children: /* @__PURE__ */ a(
|
|
2162
|
-
|
|
2189
|
+
ft,
|
|
2163
2190
|
{
|
|
2164
2191
|
controls: t,
|
|
2165
2192
|
decision: n,
|
|
@@ -2173,15 +2200,15 @@ const yo = w.div`
|
|
|
2173
2200
|
)
|
|
2174
2201
|
}
|
|
2175
2202
|
) }) }, n.decisionId) : null;
|
|
2176
|
-
},
|
|
2203
|
+
}, No = (e) => {
|
|
2177
2204
|
const {
|
|
2178
2205
|
customTitleContentAddCard: n,
|
|
2179
2206
|
index: t,
|
|
2180
2207
|
handleOpenModal: r,
|
|
2181
2208
|
shouldRenderEmptyMessage: o
|
|
2182
2209
|
} = e;
|
|
2183
|
-
return /* @__PURE__ */ a(
|
|
2184
|
-
|
|
2210
|
+
return /* @__PURE__ */ a(wo, { children: o ? null : /* @__PURE__ */ a(
|
|
2211
|
+
To,
|
|
2185
2212
|
{
|
|
2186
2213
|
onClick: () => r ? r() : null,
|
|
2187
2214
|
children: /* @__PURE__ */ a(
|
|
@@ -2200,12 +2227,12 @@ const yo = w.div`
|
|
|
2200
2227
|
alignItems: "center",
|
|
2201
2228
|
padding: "16px",
|
|
2202
2229
|
children: [
|
|
2203
|
-
/* @__PURE__ */ a(
|
|
2230
|
+
/* @__PURE__ */ a($, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
|
|
2204
2231
|
/* @__PURE__ */ a(
|
|
2205
2232
|
M,
|
|
2206
2233
|
{
|
|
2207
2234
|
appearance: "gray",
|
|
2208
|
-
icon: /* @__PURE__ */ a(
|
|
2235
|
+
icon: /* @__PURE__ */ a(Ye, {}),
|
|
2209
2236
|
size: "24px",
|
|
2210
2237
|
cursorHover: !0
|
|
2211
2238
|
}
|
|
@@ -2217,14 +2244,14 @@ const yo = w.div`
|
|
|
2217
2244
|
)
|
|
2218
2245
|
}
|
|
2219
2246
|
) }, `add-decision-${t}`);
|
|
2220
|
-
},
|
|
2221
|
-
loading:
|
|
2222
|
-
decision:
|
|
2223
|
-
add:
|
|
2224
|
-
},
|
|
2225
|
-
const { type: n } = e, t =
|
|
2247
|
+
}, ko = {
|
|
2248
|
+
loading: So,
|
|
2249
|
+
decision: Eo,
|
|
2250
|
+
add: No
|
|
2251
|
+
}, Dn = (e) => {
|
|
2252
|
+
const { type: n } = e, t = ko[n];
|
|
2226
2253
|
return t ? t(e) : null;
|
|
2227
|
-
},
|
|
2254
|
+
}, Ao = (e) => {
|
|
2228
2255
|
const {
|
|
2229
2256
|
controls: n,
|
|
2230
2257
|
customTitleContentAddCard: t,
|
|
@@ -2236,7 +2263,7 @@ const yo = w.div`
|
|
|
2236
2263
|
isOpenFor: l,
|
|
2237
2264
|
toggleAt: p
|
|
2238
2265
|
} = e, u = o ? Array.from({ length: 3 }).map(
|
|
2239
|
-
(g, h) =>
|
|
2266
|
+
(g, h) => Dn({
|
|
2240
2267
|
type: "loading",
|
|
2241
2268
|
index: h,
|
|
2242
2269
|
controls: n,
|
|
@@ -2247,7 +2274,7 @@ const yo = w.div`
|
|
|
2247
2274
|
textValues: d
|
|
2248
2275
|
})
|
|
2249
2276
|
) : r == null ? void 0 : r.map(
|
|
2250
|
-
(g, h) =>
|
|
2277
|
+
(g, h) => Dn({
|
|
2251
2278
|
type: "decision",
|
|
2252
2279
|
decision: g,
|
|
2253
2280
|
controls: n,
|
|
@@ -2262,13 +2289,13 @@ const yo = w.div`
|
|
|
2262
2289
|
})
|
|
2263
2290
|
), c = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
2264
2291
|
return { renderedCards: u, shouldRenderAddCard: c };
|
|
2265
|
-
},
|
|
2292
|
+
}, $o = w.div`
|
|
2266
2293
|
position: relative;
|
|
2267
2294
|
& > div {
|
|
2268
2295
|
padding: 24px 16px;
|
|
2269
2296
|
place-items: unset;
|
|
2270
2297
|
}
|
|
2271
|
-
`,
|
|
2298
|
+
`, Io = w.div`
|
|
2272
2299
|
background-color: ${({ theme: e }) => {
|
|
2273
2300
|
var n, t;
|
|
2274
2301
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
|
|
@@ -2300,7 +2327,7 @@ const yo = w.div`
|
|
|
2300
2327
|
background-color: #ebecf0;
|
|
2301
2328
|
border-radius: 8px;
|
|
2302
2329
|
}
|
|
2303
|
-
`,
|
|
2330
|
+
`, Ro = (e) => {
|
|
2304
2331
|
const { children: n, description: t, portalId: r, onCloseModal: o, title: i } = e, s = document.getElementById(r);
|
|
2305
2332
|
if (!s)
|
|
2306
2333
|
throw new Error(
|
|
@@ -2308,12 +2335,12 @@ const yo = w.div`
|
|
|
2308
2335
|
);
|
|
2309
2336
|
const d = te("(max-width: 400px)");
|
|
2310
2337
|
return cn(
|
|
2311
|
-
/* @__PURE__ */ a(
|
|
2338
|
+
/* @__PURE__ */ a($o, { smallScreen: d, children: /* @__PURE__ */ a(sn, { children: /* @__PURE__ */ a(Io, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
2312
2339
|
/* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
2313
2340
|
/* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2314
2341
|
/* @__PURE__ */ m(v, { direction: "column", gap: "8px", children: [
|
|
2315
2342
|
/* @__PURE__ */ a(
|
|
2316
|
-
|
|
2343
|
+
$,
|
|
2317
2344
|
{
|
|
2318
2345
|
type: "title",
|
|
2319
2346
|
size: "medium",
|
|
@@ -2322,7 +2349,7 @@ const yo = w.div`
|
|
|
2322
2349
|
children: i
|
|
2323
2350
|
}
|
|
2324
2351
|
),
|
|
2325
|
-
/* @__PURE__ */ a(
|
|
2352
|
+
/* @__PURE__ */ a($, { size: "medium", appearance: "gray", children: t })
|
|
2326
2353
|
] }),
|
|
2327
2354
|
/* @__PURE__ */ a(ln, { size: "24px", cursor: "pointer", onClick: o })
|
|
2328
2355
|
] }),
|
|
@@ -2332,14 +2359,14 @@ const yo = w.div`
|
|
|
2332
2359
|
] }) }) }) }),
|
|
2333
2360
|
s
|
|
2334
2361
|
);
|
|
2335
|
-
},
|
|
2362
|
+
}, Fo = (e) => ({
|
|
2336
2363
|
schema: le().required("Requerido").test(
|
|
2337
2364
|
"non-empty",
|
|
2338
2365
|
"El valor no puede estar vacío",
|
|
2339
2366
|
(n) => n != null && n.trim() !== ""
|
|
2340
2367
|
),
|
|
2341
2368
|
value: e
|
|
2342
|
-
}),
|
|
2369
|
+
}), Lo = (e) => ({
|
|
2343
2370
|
schema: Pe().test(
|
|
2344
2371
|
"isArrayOrString",
|
|
2345
2372
|
"Por favor selecciona una opcion",
|
|
@@ -2348,7 +2375,7 @@ const yo = w.div`
|
|
|
2348
2375
|
) : typeof n == "string"
|
|
2349
2376
|
),
|
|
2350
2377
|
value: e
|
|
2351
|
-
}),
|
|
2378
|
+
}), Oo = (e) => ({
|
|
2352
2379
|
schema: Pe().test(
|
|
2353
2380
|
"isArrayOrString",
|
|
2354
2381
|
"Por favor selecciona al menos una opcion",
|
|
@@ -2357,7 +2384,7 @@ const yo = w.div`
|
|
|
2357
2384
|
) : typeof n == "string"
|
|
2358
2385
|
),
|
|
2359
2386
|
value: e
|
|
2360
|
-
}),
|
|
2387
|
+
}), Po = (e) => {
|
|
2361
2388
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
2362
2389
|
return {
|
|
2363
2390
|
schema: ne({
|
|
@@ -2373,10 +2400,10 @@ const yo = w.div`
|
|
|
2373
2400
|
}),
|
|
2374
2401
|
value: { from: n, to: t }
|
|
2375
2402
|
};
|
|
2376
|
-
},
|
|
2403
|
+
}, bn = (e, n) => {
|
|
2377
2404
|
if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
|
|
2378
2405
|
const t = e;
|
|
2379
|
-
return n ===
|
|
2406
|
+
return n === j.PERCENTAGE ? {
|
|
2380
2407
|
schema: ne({
|
|
2381
2408
|
from: se().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"),
|
|
2382
2409
|
to: se().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")
|
|
@@ -2390,30 +2417,30 @@ const yo = w.div`
|
|
|
2390
2417
|
value: t
|
|
2391
2418
|
};
|
|
2392
2419
|
}
|
|
2393
|
-
return n ===
|
|
2420
|
+
return n === j.PERCENTAGE ? {
|
|
2394
2421
|
schema: se().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"),
|
|
2395
2422
|
value: e
|
|
2396
2423
|
} : {
|
|
2397
2424
|
schema: le().required("Requerido"),
|
|
2398
2425
|
value: e
|
|
2399
2426
|
};
|
|
2400
|
-
},
|
|
2401
|
-
[
|
|
2402
|
-
[
|
|
2403
|
-
[
|
|
2404
|
-
[
|
|
2405
|
-
[
|
|
2406
|
-
[
|
|
2407
|
-
},
|
|
2427
|
+
}, Mo = {
|
|
2428
|
+
[A.LIST_OF_VALUES]: Lo,
|
|
2429
|
+
[A.LIST_OF_VALUES_MULTI]: Oo,
|
|
2430
|
+
[A.RANGE]: Po,
|
|
2431
|
+
[A.GREATER_THAN]: bn,
|
|
2432
|
+
[A.LESS_THAN]: bn,
|
|
2433
|
+
[A.EQUAL]: bn
|
|
2434
|
+
}, Gn = (e) => Mo[e] || Fo;
|
|
2408
2435
|
var ge = /* @__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))(ge || {});
|
|
2409
|
-
function
|
|
2436
|
+
function zo({
|
|
2410
2437
|
decision: e,
|
|
2411
2438
|
onSubmitEvent: n,
|
|
2412
2439
|
textValues: t
|
|
2413
2440
|
}) {
|
|
2414
|
-
const r =
|
|
2441
|
+
const r = Be(e) || {}, o = () => Object.values(r).flat(), i = {
|
|
2415
2442
|
ruleName: e.ruleName || "",
|
|
2416
|
-
decisionDataType: e.decisionDataType ||
|
|
2443
|
+
decisionDataType: e.decisionDataType || j.ALPHABETICAL,
|
|
2417
2444
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
2418
2445
|
value: e.value || "",
|
|
2419
2446
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -2427,7 +2454,7 @@ function Po({
|
|
|
2427
2454
|
let s;
|
|
2428
2455
|
const d = {
|
|
2429
2456
|
ruleName: le().required("El nombre de la decision es requerido"),
|
|
2430
|
-
value: qe(() =>
|
|
2457
|
+
value: qe(() => Gn(
|
|
2431
2458
|
s.values.howToSetTheDecision
|
|
2432
2459
|
)(
|
|
2433
2460
|
s.values.value,
|
|
@@ -2439,7 +2466,7 @@ function Po({
|
|
|
2439
2466
|
(x, y) => {
|
|
2440
2467
|
var T;
|
|
2441
2468
|
if (((T = s.values.conditionsThatEstablishesTheDecision) == null ? void 0 : T[y.conditionName]) !== void 0) {
|
|
2442
|
-
const S =
|
|
2469
|
+
const S = Gn(
|
|
2443
2470
|
y.howToSetTheCondition
|
|
2444
2471
|
);
|
|
2445
2472
|
x[y.conditionName] = S(
|
|
@@ -2474,7 +2501,7 @@ function Po({
|
|
|
2474
2501
|
) : c.notRequired()
|
|
2475
2502
|
));
|
|
2476
2503
|
const l = ne(d);
|
|
2477
|
-
return s =
|
|
2504
|
+
return s = In({
|
|
2478
2505
|
initialValues: i,
|
|
2479
2506
|
validationSchema: l,
|
|
2480
2507
|
validateOnBlur: !0,
|
|
@@ -2551,7 +2578,7 @@ w.div`
|
|
|
2551
2578
|
border-radius: 8px;
|
|
2552
2579
|
}
|
|
2553
2580
|
`;
|
|
2554
|
-
const
|
|
2581
|
+
const Vo = w.div`
|
|
2555
2582
|
display: flex;
|
|
2556
2583
|
width: -webkit-fill-available;
|
|
2557
2584
|
& > div {
|
|
@@ -2560,7 +2587,7 @@ const Mo = w.div`
|
|
|
2560
2587
|
gap: 16px;
|
|
2561
2588
|
width: -webkit-fill-available;
|
|
2562
2589
|
}
|
|
2563
|
-
`,
|
|
2590
|
+
`, jo = (e) => {
|
|
2564
2591
|
const {
|
|
2565
2592
|
onHandleStartChange: n,
|
|
2566
2593
|
onHandleEndChange: t,
|
|
@@ -2584,9 +2611,9 @@ const Mo = w.div`
|
|
|
2584
2611
|
}, F = te("(max-width: 400px)");
|
|
2585
2612
|
return /* @__PURE__ */ m(v, { direction: "column", width: "100%", gap: "20px", children: [
|
|
2586
2613
|
/* @__PURE__ */ m(v, { justifyContent: "space-between", children: [
|
|
2587
|
-
/* @__PURE__ */ a(
|
|
2614
|
+
/* @__PURE__ */ a($, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
2588
2615
|
/* @__PURE__ */ a(
|
|
2589
|
-
|
|
2616
|
+
kn,
|
|
2590
2617
|
{
|
|
2591
2618
|
label: "Cerrada",
|
|
2592
2619
|
onChange: N,
|
|
@@ -2634,7 +2661,7 @@ const Mo = w.div`
|
|
|
2634
2661
|
}
|
|
2635
2662
|
)
|
|
2636
2663
|
] });
|
|
2637
|
-
},
|
|
2664
|
+
}, Uo = (e) => {
|
|
2638
2665
|
const {
|
|
2639
2666
|
activeTab: n,
|
|
2640
2667
|
conditionsErrorText: t,
|
|
@@ -2657,14 +2684,14 @@ const Mo = w.div`
|
|
|
2657
2684
|
} = e;
|
|
2658
2685
|
return /* @__PURE__ */ m(O, { children: [
|
|
2659
2686
|
/* @__PURE__ */ a("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2660
|
-
/* @__PURE__ */ a(
|
|
2687
|
+
/* @__PURE__ */ a(je, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ a(v, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
|
|
2661
2688
|
condition: i,
|
|
2662
2689
|
formik: o,
|
|
2663
2690
|
isDecision: !0
|
|
2664
2691
|
}) }) }),
|
|
2665
|
-
/* @__PURE__ */ a(
|
|
2692
|
+
/* @__PURE__ */ a(je, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(v, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2666
2693
|
/* @__PURE__ */ a(
|
|
2667
|
-
|
|
2694
|
+
st,
|
|
2668
2695
|
{
|
|
2669
2696
|
onChange: l,
|
|
2670
2697
|
tabs: u,
|
|
@@ -2675,7 +2702,7 @@ const Mo = w.div`
|
|
|
2675
2702
|
/* @__PURE__ */ a(
|
|
2676
2703
|
M,
|
|
2677
2704
|
{
|
|
2678
|
-
icon: /* @__PURE__ */ a(
|
|
2705
|
+
icon: /* @__PURE__ */ a(Ot, {}),
|
|
2679
2706
|
appearance: "help",
|
|
2680
2707
|
onClick: y,
|
|
2681
2708
|
cursorHover: !0
|
|
@@ -2685,7 +2712,7 @@ const Mo = w.div`
|
|
|
2685
2712
|
q,
|
|
2686
2713
|
{
|
|
2687
2714
|
type: "button",
|
|
2688
|
-
iconBefore: /* @__PURE__ */ a(
|
|
2715
|
+
iconBefore: /* @__PURE__ */ a(Pt, {}),
|
|
2689
2716
|
variant: "none",
|
|
2690
2717
|
appearance: "gray",
|
|
2691
2718
|
onClick: y,
|
|
@@ -2700,8 +2727,8 @@ const Mo = w.div`
|
|
|
2700
2727
|
gap: "16px",
|
|
2701
2728
|
alignItems: "center",
|
|
2702
2729
|
children: [
|
|
2703
|
-
/* @__PURE__ */ a(
|
|
2704
|
-
|
|
2730
|
+
/* @__PURE__ */ a(Vo, { children: /* @__PURE__ */ a(
|
|
2731
|
+
Vn,
|
|
2705
2732
|
{
|
|
2706
2733
|
condition: S,
|
|
2707
2734
|
formik: o
|
|
@@ -2720,10 +2747,10 @@ const Mo = w.div`
|
|
|
2720
2747
|
},
|
|
2721
2748
|
S.conditionName
|
|
2722
2749
|
)) }),
|
|
2723
|
-
p && /* @__PURE__ */ a(
|
|
2750
|
+
p && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2724
2751
|
] }) }),
|
|
2725
|
-
/* @__PURE__ */ a(
|
|
2726
|
-
|
|
2752
|
+
/* @__PURE__ */ a(je, { legend: "Vigencia", spacing: "wide", children: h.terms && /* @__PURE__ */ a(
|
|
2753
|
+
jo,
|
|
2727
2754
|
{
|
|
2728
2755
|
labelStart: h.termStart,
|
|
2729
2756
|
labelEnd: h.termEnd,
|
|
@@ -2747,13 +2774,13 @@ const Mo = w.div`
|
|
|
2747
2774
|
] })
|
|
2748
2775
|
] }) }),
|
|
2749
2776
|
x && f && /* @__PURE__ */ a(
|
|
2750
|
-
|
|
2777
|
+
ut,
|
|
2751
2778
|
{
|
|
2752
2779
|
portalId: f,
|
|
2753
2780
|
title: "Redefinir la condición",
|
|
2754
2781
|
onCloseModal: D,
|
|
2755
2782
|
children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
2756
|
-
/* @__PURE__ */ a(
|
|
2783
|
+
/* @__PURE__ */ a($, { 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 ." }),
|
|
2757
2784
|
/* @__PURE__ */ m(v, { justifyContent: "end", gap: "12px", children: [
|
|
2758
2785
|
/* @__PURE__ */ a(
|
|
2759
2786
|
q,
|
|
@@ -2772,18 +2799,18 @@ const Mo = w.div`
|
|
|
2772
2799
|
}
|
|
2773
2800
|
)
|
|
2774
2801
|
] });
|
|
2775
|
-
},
|
|
2776
|
-
const { label: n, howToSet: t, isFirst: r = !1 } = e, o =
|
|
2802
|
+
}, _o = (e) => {
|
|
2803
|
+
const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Bo(n), i = qo(o), s = r ? "Que" : "Y que", d = i ? o : `${Go(o)} ${o}`, l = Qo(t);
|
|
2777
2804
|
return `${s} ${d} ${l}`;
|
|
2778
|
-
},
|
|
2779
|
-
function
|
|
2780
|
-
return
|
|
2805
|
+
}, Ho = /^(el|la|los|las)\s/i;
|
|
2806
|
+
function qo(e) {
|
|
2807
|
+
return Ho.test(e);
|
|
2781
2808
|
}
|
|
2782
|
-
function
|
|
2809
|
+
function Bo(e) {
|
|
2783
2810
|
return e.replace(/\s+/g, " ").trim();
|
|
2784
2811
|
}
|
|
2785
|
-
function
|
|
2786
|
-
const n =
|
|
2812
|
+
function Go(e) {
|
|
2813
|
+
const n = Yo(e).toLowerCase(), t = /\b(s|es)\b/.test(Wo(e).toLowerCase()) && !n.endsWith("és");
|
|
2787
2814
|
return ({
|
|
2788
2815
|
mano: "f",
|
|
2789
2816
|
día: "m",
|
|
@@ -2795,36 +2822,36 @@ function qo(e) {
|
|
|
2795
2822
|
antigüedad: "f",
|
|
2796
2823
|
antiguedad: "f",
|
|
2797
2824
|
puntaje: "m"
|
|
2798
|
-
}[n] ??
|
|
2825
|
+
}[n] ?? Xo(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
|
|
2799
2826
|
}
|
|
2800
|
-
function
|
|
2827
|
+
function Yo(e) {
|
|
2801
2828
|
return (e.toLowerCase().split(
|
|
2802
2829
|
/\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
|
|
2803
2830
|
)[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
|
|
2804
2831
|
}
|
|
2805
|
-
function
|
|
2832
|
+
function Wo(e) {
|
|
2806
2833
|
const n = e.trim().split(/\s+/);
|
|
2807
2834
|
return n[n.length - 1] || "";
|
|
2808
2835
|
}
|
|
2809
|
-
function
|
|
2836
|
+
function Xo(e) {
|
|
2810
2837
|
return /(?:dad|tad|tud|umbre|ción|sión|ie|sis|itis)$/.test(e) || e.endsWith("ez") || e.endsWith("eza") ? "f" : /(?:aje|or|án|ambre)$/.test(e) ? "m" : e.endsWith("a") ? "f" : "m";
|
|
2811
2838
|
}
|
|
2812
|
-
function
|
|
2839
|
+
function Qo(e) {
|
|
2813
2840
|
switch (e) {
|
|
2814
|
-
case
|
|
2815
|
-
case
|
|
2816
|
-
case
|
|
2841
|
+
case A.EQUAL:
|
|
2842
|
+
case A.GREATER_THAN:
|
|
2843
|
+
case A.LESS_THAN:
|
|
2817
2844
|
return "sea";
|
|
2818
|
-
case
|
|
2845
|
+
case A.RANGE:
|
|
2819
2846
|
return "esté entre";
|
|
2820
|
-
case
|
|
2821
|
-
case
|
|
2847
|
+
case A.LIST_OF_VALUES:
|
|
2848
|
+
case A.LIST_OF_VALUES_MULTI:
|
|
2822
2849
|
return "esté en";
|
|
2823
2850
|
default:
|
|
2824
2851
|
return "sea";
|
|
2825
2852
|
}
|
|
2826
2853
|
}
|
|
2827
|
-
const
|
|
2854
|
+
const Zo = (e) => {
|
|
2828
2855
|
if (typeof e == "string") {
|
|
2829
2856
|
const n = e.toLowerCase();
|
|
2830
2857
|
if (n.includes("equal")) return ge.EQUAL;
|
|
@@ -2836,7 +2863,7 @@ const Xo = (e) => {
|
|
|
2836
2863
|
return ge.LIST_OF_VALUES;
|
|
2837
2864
|
}
|
|
2838
2865
|
return e ?? ge.EQUAL;
|
|
2839
|
-
},
|
|
2866
|
+
}, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Ko = (e) => {
|
|
2840
2867
|
var ze;
|
|
2841
2868
|
const {
|
|
2842
2869
|
decision: n,
|
|
@@ -2846,11 +2873,11 @@ const Xo = (e) => {
|
|
|
2846
2873
|
onRemoveCondition: i,
|
|
2847
2874
|
onRestoreConditions: s,
|
|
2848
2875
|
fullTemplate: d
|
|
2849
|
-
} = e, { formik: l, handleToggleNoneChange: p } =
|
|
2876
|
+
} = e, { formik: l, handleToggleNoneChange: p } = zo({
|
|
2850
2877
|
decision: n,
|
|
2851
2878
|
onSubmitEvent: t,
|
|
2852
2879
|
textValues: r
|
|
2853
|
-
}), c =
|
|
2880
|
+
}), c = Be(d ?? n), g = Be(n), h = ht(
|
|
2854
2881
|
g,
|
|
2855
2882
|
(R) => !R.hidden
|
|
2856
2883
|
), f = Object.keys(h), x = [
|
|
@@ -2859,10 +2886,10 @@ const Xo = (e) => {
|
|
|
2859
2886
|
], y = {};
|
|
2860
2887
|
let D = 1;
|
|
2861
2888
|
const T = x.map((R) => {
|
|
2862
|
-
const
|
|
2863
|
-
return y[
|
|
2864
|
-
id:
|
|
2865
|
-
label: R === "group-primary" ?
|
|
2889
|
+
const H = R === "group-primary" ? "mainCondition" : `alternateCondition-${D++}`;
|
|
2890
|
+
return y[H] = R, {
|
|
2891
|
+
id: H,
|
|
2892
|
+
label: R === "group-primary" ? Yn(R, 0) : Yn(R, Number(H.split("-").at(-1))),
|
|
2866
2893
|
isDisabled: !1
|
|
2867
2894
|
};
|
|
2868
2895
|
}), [S, N] = V.useState(
|
|
@@ -2872,22 +2899,22 @@ const Xo = (e) => {
|
|
|
2872
2899
|
...Object.keys(h).filter((Z) => Z === "group-primary"),
|
|
2873
2900
|
...Object.keys(h).filter((Z) => Z !== "group-primary")
|
|
2874
2901
|
];
|
|
2875
|
-
let
|
|
2902
|
+
let H = !1;
|
|
2876
2903
|
const Q = R.map((Z) => {
|
|
2877
|
-
const
|
|
2878
|
-
const
|
|
2879
|
-
|
|
2880
|
-
const
|
|
2881
|
-
label:
|
|
2882
|
-
howToSet:
|
|
2883
|
-
isFirst:
|
|
2904
|
+
const At = (h[Z] ?? []).map((Ze, $t) => {
|
|
2905
|
+
const Mn = !H && Z === "group-primary" && $t === 0;
|
|
2906
|
+
Mn && (H = !0);
|
|
2907
|
+
const It = Zo(Ze.howToSetTheCondition ?? Ze.valueUse), Rt = _o({
|
|
2908
|
+
label: Ze.labelName || "",
|
|
2909
|
+
howToSet: It,
|
|
2910
|
+
isFirst: Mn
|
|
2884
2911
|
});
|
|
2885
|
-
return { ...
|
|
2912
|
+
return { ...Ze, labelName: Rt };
|
|
2886
2913
|
});
|
|
2887
|
-
return [Z,
|
|
2914
|
+
return [Z, At];
|
|
2888
2915
|
});
|
|
2889
2916
|
return Object.fromEntries(Q);
|
|
2890
|
-
}, [h]), k = F[I] ?? [],
|
|
2917
|
+
}, [h]), k = F[I] ?? [], _ = F["group-primary"] ?? [], ae = {
|
|
2891
2918
|
decisionDataType: n.decisionDataType,
|
|
2892
2919
|
howToSetTheCondition: n.howToSetTheDecision,
|
|
2893
2920
|
labelName: n.labelName,
|
|
@@ -2897,22 +2924,22 @@ const Xo = (e) => {
|
|
|
2897
2924
|
const R = l.errors.conditionsThatEstablishesTheDecision;
|
|
2898
2925
|
if (!R) return;
|
|
2899
2926
|
if (typeof R == "string") return R;
|
|
2900
|
-
const
|
|
2927
|
+
const H = (Q) => {
|
|
2901
2928
|
if (Q) {
|
|
2902
2929
|
if (typeof Q == "string") return Q;
|
|
2903
2930
|
if (Array.isArray(Q))
|
|
2904
2931
|
for (const Z of Q) {
|
|
2905
|
-
const ye =
|
|
2932
|
+
const ye = H(Z);
|
|
2906
2933
|
if (ye) return ye;
|
|
2907
2934
|
}
|
|
2908
2935
|
else if (typeof Q == "object")
|
|
2909
2936
|
for (const Z of Object.values(Q)) {
|
|
2910
|
-
const ye =
|
|
2937
|
+
const ye = H(Z);
|
|
2911
2938
|
if (ye) return ye;
|
|
2912
2939
|
}
|
|
2913
2940
|
}
|
|
2914
2941
|
};
|
|
2915
|
-
return
|
|
2942
|
+
return H(R);
|
|
2916
2943
|
}, [l.errors.conditionsThatEstablishesTheDecision]), be = l.submitCount > 0 && !!me, P = (R) => R != null && R.isMulti || R != null && R.multiple || (R == null ? void 0 : R.valueUse) === "Among" ? [] : "", de = (R) => {
|
|
2917
2944
|
const Q = Object.values(c).flat().find((ye) => ye.conditionName === R), Z = P(Q);
|
|
2918
2945
|
l.setFieldValue(
|
|
@@ -2924,13 +2951,13 @@ const Xo = (e) => {
|
|
|
2924
2951
|
!1
|
|
2925
2952
|
);
|
|
2926
2953
|
}, ke = () => {
|
|
2927
|
-
(c[I] ?? []).forEach((
|
|
2928
|
-
const Q = `conditionsThatEstablishesTheDecision.${
|
|
2929
|
-
l.setFieldValue(Q, P(
|
|
2954
|
+
(c[I] ?? []).forEach((H) => {
|
|
2955
|
+
const Q = `conditionsThatEstablishesTheDecision.${H.conditionName}`;
|
|
2956
|
+
l.setFieldValue(Q, P(H)), l.setFieldTouched(Q, !1, !1);
|
|
2930
2957
|
});
|
|
2931
|
-
}, [
|
|
2958
|
+
}, [Ae, ve] = V.useState(!1);
|
|
2932
2959
|
return /* @__PURE__ */ a(
|
|
2933
|
-
|
|
2960
|
+
Uo,
|
|
2934
2961
|
{
|
|
2935
2962
|
activeTab: S,
|
|
2936
2963
|
conditionsErrorText: me,
|
|
@@ -2949,23 +2976,23 @@ const Xo = (e) => {
|
|
|
2949
2976
|
termEndStatus: ie,
|
|
2950
2977
|
termStartStatus: pe,
|
|
2951
2978
|
textValues: r,
|
|
2952
|
-
visibleConditions:
|
|
2979
|
+
visibleConditions: _,
|
|
2953
2980
|
visibleConditionsByGroup: F,
|
|
2954
2981
|
handleToggleNoneChange: p,
|
|
2955
2982
|
portalId: "redefine-confirm-portal",
|
|
2956
|
-
showRedefineConfirm:
|
|
2983
|
+
showRedefineConfirm: Ae,
|
|
2957
2984
|
onOpenRedefineConfirm: () => ve(!0),
|
|
2958
2985
|
onCloseRedefineConfirm: () => ve(!1),
|
|
2959
2986
|
onConfirmRedefine: () => {
|
|
2960
2987
|
ke();
|
|
2961
2988
|
const R = (c[I] ?? []).map(
|
|
2962
|
-
(
|
|
2989
|
+
(H) => H.conditionName
|
|
2963
2990
|
);
|
|
2964
2991
|
s == null || s(R), ve(!1);
|
|
2965
2992
|
}
|
|
2966
2993
|
}
|
|
2967
2994
|
);
|
|
2968
|
-
},
|
|
2995
|
+
}, fl = (e) => {
|
|
2969
2996
|
const {
|
|
2970
2997
|
controls: n = !0,
|
|
2971
2998
|
customTitleContentAddCard: t,
|
|
@@ -2984,7 +3011,7 @@ const Xo = (e) => {
|
|
|
2984
3011
|
onRemoveCondition: x,
|
|
2985
3012
|
onRestoreConditions: y,
|
|
2986
3013
|
baseDecisionTemplate: D
|
|
2987
|
-
} = e, [T, S] = z(null), N = te("(max-width: 681px)"), { renderedCards: C, shouldRenderAddCard: I } =
|
|
3014
|
+
} = e, [T, S] = z(null), N = te("(max-width: 681px)"), { renderedCards: C, shouldRenderAddCard: I } = Ao({
|
|
2988
3015
|
controls: n,
|
|
2989
3016
|
customTitleContentAddCard: t,
|
|
2990
3017
|
decisions: o,
|
|
@@ -2993,10 +3020,10 @@ const Xo = (e) => {
|
|
|
2993
3020
|
handleDelete: h,
|
|
2994
3021
|
textValues: i,
|
|
2995
3022
|
isOpenFor: (k) => T === k,
|
|
2996
|
-
toggleAt: (k) => S((
|
|
3023
|
+
toggleAt: (k) => S((_) => _ === k ? null : k)
|
|
2997
3024
|
}), F = (o == null ? void 0 : o.length) === 0 && !p;
|
|
2998
3025
|
return /* @__PURE__ */ m(O, { children: [
|
|
2999
|
-
/* @__PURE__ */ a(
|
|
3026
|
+
/* @__PURE__ */ a(Co, { children: /* @__PURE__ */ a(Do, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: F ? /* @__PURE__ */ a(je, { legend: "Decisiones", children: /* @__PURE__ */ m(
|
|
3000
3027
|
v,
|
|
3001
3028
|
{
|
|
3002
3029
|
direction: "column",
|
|
@@ -3009,12 +3036,12 @@ const Xo = (e) => {
|
|
|
3009
3036
|
M,
|
|
3010
3037
|
{
|
|
3011
3038
|
appearance: "help",
|
|
3012
|
-
icon: /* @__PURE__ */ a(
|
|
3039
|
+
icon: /* @__PURE__ */ a(Mt, {}),
|
|
3013
3040
|
size: "40px"
|
|
3014
3041
|
}
|
|
3015
3042
|
),
|
|
3016
3043
|
/* @__PURE__ */ a(
|
|
3017
|
-
|
|
3044
|
+
$,
|
|
3018
3045
|
{
|
|
3019
3046
|
type: "title",
|
|
3020
3047
|
size: "medium",
|
|
@@ -3023,14 +3050,14 @@ const Xo = (e) => {
|
|
|
3023
3050
|
children: "Sin decisiones"
|
|
3024
3051
|
}
|
|
3025
3052
|
),
|
|
3026
|
-
/* @__PURE__ */ a(
|
|
3053
|
+
/* @__PURE__ */ a($, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ m(O, { children: [
|
|
3027
3054
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
3028
3055
|
t || ' "Agregar decisión"'
|
|
3029
3056
|
] }) })
|
|
3030
3057
|
]
|
|
3031
3058
|
}
|
|
3032
3059
|
) }) : /* @__PURE__ */ m(
|
|
3033
|
-
|
|
3060
|
+
We,
|
|
3034
3061
|
{
|
|
3035
3062
|
templateColumns: "1fr",
|
|
3036
3063
|
autoFlow: "row dense",
|
|
@@ -3043,7 +3070,7 @@ const Xo = (e) => {
|
|
|
3043
3070
|
height: N ? "auto" : "484px",
|
|
3044
3071
|
children: [
|
|
3045
3072
|
C,
|
|
3046
|
-
I &&
|
|
3073
|
+
I && Dn({
|
|
3047
3074
|
type: "add",
|
|
3048
3075
|
index: o == null ? void 0 : o.length,
|
|
3049
3076
|
controls: n,
|
|
@@ -3060,14 +3087,14 @@ const Xo = (e) => {
|
|
|
3060
3087
|
}
|
|
3061
3088
|
) }) }) }),
|
|
3062
3089
|
d && /* @__PURE__ */ a(
|
|
3063
|
-
|
|
3090
|
+
Ro,
|
|
3064
3091
|
{
|
|
3065
3092
|
portalId: "modal-portal",
|
|
3066
3093
|
onCloseModal: c,
|
|
3067
3094
|
title: l ? "Editar Decisión" : "Configurar Decisión",
|
|
3068
3095
|
description: "Diligencia los campos para configurar tu decisión.",
|
|
3069
3096
|
children: /* @__PURE__ */ a(
|
|
3070
|
-
|
|
3097
|
+
Ko,
|
|
3071
3098
|
{
|
|
3072
3099
|
decision: l || s,
|
|
3073
3100
|
fullTemplate: D ?? s,
|
|
@@ -3082,16 +3109,16 @@ const Xo = (e) => {
|
|
|
3082
3109
|
}
|
|
3083
3110
|
)
|
|
3084
3111
|
] });
|
|
3085
|
-
},
|
|
3112
|
+
}, Jo = {
|
|
3086
3113
|
border: {
|
|
3087
3114
|
color: E.palette.neutral.N40
|
|
3088
3115
|
}
|
|
3089
|
-
},
|
|
3116
|
+
}, ea = w.div`
|
|
3090
3117
|
border-width: 1px;
|
|
3091
3118
|
border-style: solid;
|
|
3092
3119
|
border-color: ${({ theme: e }) => {
|
|
3093
3120
|
var n, t;
|
|
3094
|
-
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) ||
|
|
3121
|
+
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || Jo.border.color;
|
|
3095
3122
|
}};
|
|
3096
3123
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
3097
3124
|
margin: ${({ $margin: e }) => e};
|
|
@@ -3100,7 +3127,7 @@ const Xo = (e) => {
|
|
|
3100
3127
|
height: ${({ $height: e }) => e};
|
|
3101
3128
|
box-sizing: border-box;
|
|
3102
3129
|
`;
|
|
3103
|
-
function
|
|
3130
|
+
function na(e) {
|
|
3104
3131
|
const {
|
|
3105
3132
|
children: n,
|
|
3106
3133
|
padding: t = "16px",
|
|
@@ -3110,7 +3137,7 @@ function Jo(e) {
|
|
|
3110
3137
|
height: s
|
|
3111
3138
|
} = e;
|
|
3112
3139
|
return /* @__PURE__ */ a(
|
|
3113
|
-
|
|
3140
|
+
ea,
|
|
3114
3141
|
{
|
|
3115
3142
|
$padding: t,
|
|
3116
3143
|
$margin: r,
|
|
@@ -3121,7 +3148,7 @@ function Jo(e) {
|
|
|
3121
3148
|
}
|
|
3122
3149
|
);
|
|
3123
3150
|
}
|
|
3124
|
-
const
|
|
3151
|
+
const ta = (e, n) => {
|
|
3125
3152
|
const [t, r] = z([]), [o, i] = z([]), [s, d] = z(!1), l = Ie(null);
|
|
3126
3153
|
return Ee(() => {
|
|
3127
3154
|
if (!e.current || !l.current) return;
|
|
@@ -3148,21 +3175,21 @@ w.div`
|
|
|
3148
3175
|
width: 100%;
|
|
3149
3176
|
}
|
|
3150
3177
|
`;
|
|
3151
|
-
const
|
|
3178
|
+
const ra = w.div`
|
|
3152
3179
|
position: absolute;
|
|
3153
3180
|
top: calc(100% + 4px);
|
|
3154
3181
|
right: 0;
|
|
3155
3182
|
z-index: 1000;
|
|
3156
3183
|
width: 170px;
|
|
3157
|
-
`,
|
|
3184
|
+
`, oa = w.div`
|
|
3158
3185
|
position: absolute;
|
|
3159
3186
|
visibility: hidden;
|
|
3160
3187
|
pointer-events: none;
|
|
3161
3188
|
height: 0;
|
|
3162
3189
|
overflow: hidden;
|
|
3163
|
-
`,
|
|
3190
|
+
`, aa = w.div`
|
|
3164
3191
|
cursor: pointer;
|
|
3165
|
-
`,
|
|
3192
|
+
`, Sn = {
|
|
3166
3193
|
border: {
|
|
3167
3194
|
color: {
|
|
3168
3195
|
regular: E.palette.neutral.N40,
|
|
@@ -3198,7 +3225,7 @@ const na = w.div`
|
|
|
3198
3225
|
hover: E.palette.neutral.N30
|
|
3199
3226
|
}
|
|
3200
3227
|
}
|
|
3201
|
-
},
|
|
3228
|
+
}, ia = w.li`
|
|
3202
3229
|
display: flex;
|
|
3203
3230
|
align-items: center;
|
|
3204
3231
|
align-self: stretch;
|
|
@@ -3213,14 +3240,14 @@ const na = w.div`
|
|
|
3213
3240
|
&:hover {
|
|
3214
3241
|
background-color: ${({ theme: e }) => {
|
|
3215
3242
|
var n, t, r;
|
|
3216
|
-
return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : r.regular) ||
|
|
3243
|
+
return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : r.regular) || Sn.background.color.regular;
|
|
3217
3244
|
}};
|
|
3218
3245
|
}
|
|
3219
|
-
`,
|
|
3246
|
+
`, la = (e) => {
|
|
3220
3247
|
var g, h, f, x, y, D;
|
|
3221
|
-
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [i, s] = z(!1), d = () => s(!0), l = () => s(!1), p =
|
|
3248
|
+
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [i, s] = z(!1), d = () => s(!0), l = () => s(!1), p = Rn($n), u = ((f = (h = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Sn.option.appearance.hover, c = ((D = (y = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : y.appearance) == null ? void 0 : D.regular) ?? Sn.option.appearance.regular;
|
|
3222
3249
|
return /* @__PURE__ */ a(
|
|
3223
|
-
|
|
3250
|
+
ia,
|
|
3224
3251
|
{
|
|
3225
3252
|
id: n,
|
|
3226
3253
|
onMouseEnter: d,
|
|
@@ -3229,7 +3256,7 @@ const na = w.div`
|
|
|
3229
3256
|
T.stopPropagation();
|
|
3230
3257
|
},
|
|
3231
3258
|
children: /* @__PURE__ */ m(
|
|
3232
|
-
|
|
3259
|
+
We,
|
|
3233
3260
|
{
|
|
3234
3261
|
alignItems: "center",
|
|
3235
3262
|
gap: "8px",
|
|
@@ -3245,7 +3272,7 @@ const na = w.div`
|
|
|
3245
3272
|
}
|
|
3246
3273
|
),
|
|
3247
3274
|
/* @__PURE__ */ a(
|
|
3248
|
-
|
|
3275
|
+
$,
|
|
3249
3276
|
{
|
|
3250
3277
|
textAlign: "start",
|
|
3251
3278
|
size: "medium",
|
|
@@ -3256,7 +3283,7 @@ const na = w.div`
|
|
|
3256
3283
|
/* @__PURE__ */ a(
|
|
3257
3284
|
M,
|
|
3258
3285
|
{
|
|
3259
|
-
icon: /* @__PURE__ */ a(
|
|
3286
|
+
icon: /* @__PURE__ */ a(zt, {}),
|
|
3260
3287
|
size: "small",
|
|
3261
3288
|
onClick: (T) => {
|
|
3262
3289
|
T.stopPropagation(), o == null || o();
|
|
@@ -3270,7 +3297,7 @@ const na = w.div`
|
|
|
3270
3297
|
)
|
|
3271
3298
|
}
|
|
3272
3299
|
);
|
|
3273
|
-
},
|
|
3300
|
+
}, ml = (e) => {
|
|
3274
3301
|
const {
|
|
3275
3302
|
appliedFilters: n = [],
|
|
3276
3303
|
onClear: t,
|
|
@@ -3283,14 +3310,14 @@ const na = w.div`
|
|
|
3283
3310
|
hidden: c,
|
|
3284
3311
|
showOverflowIndicator: g,
|
|
3285
3312
|
measurementRef: h
|
|
3286
|
-
} =
|
|
3313
|
+
} = ta(d, n), [f, x] = z(!1), y = (C) => {
|
|
3287
3314
|
C.stopPropagation(), x((I) => !I);
|
|
3288
3315
|
};
|
|
3289
3316
|
Ee(() => {
|
|
3290
3317
|
const C = (I) => {
|
|
3291
|
-
var
|
|
3318
|
+
var _, ae;
|
|
3292
3319
|
const F = I.target;
|
|
3293
|
-
!((
|
|
3320
|
+
!((_ = l.current) != null && _.contains(F)) && !((ae = p.current) != null && ae.contains(F)) && x(!1);
|
|
3294
3321
|
};
|
|
3295
3322
|
return f && window.addEventListener("mousedown", C), () => window.removeEventListener("mousedown", C);
|
|
3296
3323
|
}, [f]);
|
|
@@ -3303,8 +3330,8 @@ const na = w.div`
|
|
|
3303
3330
|
var I, F;
|
|
3304
3331
|
(F = (I = c.find((k) => k.label === C)) == null ? void 0 : I.onClose) == null || F.call(I), x(!1);
|
|
3305
3332
|
};
|
|
3306
|
-
return /* @__PURE__ */ m(
|
|
3307
|
-
/* @__PURE__ */ a(
|
|
3333
|
+
return /* @__PURE__ */ m(na, { borderRadius: "8px", width: "100%", children: [
|
|
3334
|
+
/* @__PURE__ */ a(oa, { ref: h, children: n.map((C) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
|
|
3308
3335
|
De,
|
|
3309
3336
|
{
|
|
3310
3337
|
appearance: "primary",
|
|
@@ -3315,7 +3342,7 @@ const na = w.div`
|
|
|
3315
3342
|
onClose: C.onClose
|
|
3316
3343
|
}
|
|
3317
3344
|
) }, C.label)) }),
|
|
3318
|
-
/* @__PURE__ */ m(
|
|
3345
|
+
/* @__PURE__ */ m(We, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
3319
3346
|
/* @__PURE__ */ a(
|
|
3320
3347
|
oe,
|
|
3321
3348
|
{
|
|
@@ -3328,7 +3355,7 @@ const na = w.div`
|
|
|
3328
3355
|
alignItems: "center",
|
|
3329
3356
|
padding: "0px 8px",
|
|
3330
3357
|
border: !0,
|
|
3331
|
-
children: D ? /* @__PURE__ */ a(
|
|
3358
|
+
children: D ? /* @__PURE__ */ a($, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(O, { children: [
|
|
3332
3359
|
u.map((C) => /* @__PURE__ */ a(
|
|
3333
3360
|
De,
|
|
3334
3361
|
{
|
|
@@ -3348,20 +3375,20 @@ const na = w.div`
|
|
|
3348
3375
|
ref: p,
|
|
3349
3376
|
style: { position: "relative", display: "inline-block" },
|
|
3350
3377
|
children: [
|
|
3351
|
-
/* @__PURE__ */ a(
|
|
3378
|
+
/* @__PURE__ */ a(aa, { onClick: y, children: /* @__PURE__ */ a(
|
|
3352
3379
|
De,
|
|
3353
3380
|
{
|
|
3354
3381
|
appearance: "primary",
|
|
3355
3382
|
label: `+${c.length}`
|
|
3356
3383
|
}
|
|
3357
3384
|
) }),
|
|
3358
|
-
T && /* @__PURE__ */ a(
|
|
3359
|
-
|
|
3385
|
+
T && /* @__PURE__ */ a(ra, { ref: l, children: /* @__PURE__ */ a(
|
|
3386
|
+
Gt,
|
|
3360
3387
|
{
|
|
3361
3388
|
options: S,
|
|
3362
3389
|
onOptionClick: N,
|
|
3363
3390
|
children: c.map((C) => /* @__PURE__ */ a(
|
|
3364
|
-
|
|
3391
|
+
la,
|
|
3365
3392
|
{
|
|
3366
3393
|
id: C.label,
|
|
3367
3394
|
label: C.label,
|
|
@@ -3386,7 +3413,7 @@ const na = w.div`
|
|
|
3386
3413
|
{
|
|
3387
3414
|
cursorHover: !0,
|
|
3388
3415
|
disabled: D,
|
|
3389
|
-
iconBefore: /* @__PURE__ */ a(
|
|
3416
|
+
iconBefore: /* @__PURE__ */ a(it, {}),
|
|
3390
3417
|
onClick: t,
|
|
3391
3418
|
variant: "outlined",
|
|
3392
3419
|
children: i
|
|
@@ -3396,7 +3423,7 @@ const na = w.div`
|
|
|
3396
3423
|
q,
|
|
3397
3424
|
{
|
|
3398
3425
|
cursorHover: !0,
|
|
3399
|
-
iconBefore: /* @__PURE__ */ a(
|
|
3426
|
+
iconBefore: /* @__PURE__ */ a(lt, {}),
|
|
3400
3427
|
onClick: r,
|
|
3401
3428
|
variant: "outlined",
|
|
3402
3429
|
children: s
|
|
@@ -3404,7 +3431,7 @@ const na = w.div`
|
|
|
3404
3431
|
)
|
|
3405
3432
|
] })
|
|
3406
3433
|
] });
|
|
3407
|
-
},
|
|
3434
|
+
}, sa = w.div`
|
|
3408
3435
|
display: flex;
|
|
3409
3436
|
flex-direction: column;
|
|
3410
3437
|
background-color: ${({ theme: e }) => {
|
|
@@ -3417,7 +3444,7 @@ const na = w.div`
|
|
|
3417
3444
|
padding: 24px;
|
|
3418
3445
|
gap: 24px;
|
|
3419
3446
|
box-sizing: border-box;
|
|
3420
|
-
`,
|
|
3447
|
+
`, bl = (e) => {
|
|
3421
3448
|
const {
|
|
3422
3449
|
actionButtonLabel: n,
|
|
3423
3450
|
cancelButtonLabel: t,
|
|
@@ -3433,12 +3460,12 @@ const na = w.div`
|
|
|
3433
3460
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
3434
3461
|
);
|
|
3435
3462
|
return cn(
|
|
3436
|
-
/* @__PURE__ */ a(sn, { children: /* @__PURE__ */ m(
|
|
3463
|
+
/* @__PURE__ */ a(sn, { children: /* @__PURE__ */ m(sa, { $smallScreen: p, children: [
|
|
3437
3464
|
/* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
3438
3465
|
/* @__PURE__ */ m(v, { alignContent: "center", justifyContent: "space-between", children: [
|
|
3439
|
-
/* @__PURE__ */ a(
|
|
3466
|
+
/* @__PURE__ */ a($, { appearance: "dark", size: "small", type: "headline", children: l }),
|
|
3440
3467
|
/* @__PURE__ */ m(v, { alignItems: "center", children: [
|
|
3441
|
-
/* @__PURE__ */ a(
|
|
3468
|
+
/* @__PURE__ */ a($, { children: "Cerrar" }),
|
|
3442
3469
|
/* @__PURE__ */ a(
|
|
3443
3470
|
M,
|
|
3444
3471
|
{
|
|
@@ -3459,7 +3486,7 @@ const na = w.div`
|
|
|
3459
3486
|
{
|
|
3460
3487
|
appearance: "gray",
|
|
3461
3488
|
onClick: s,
|
|
3462
|
-
iconBefore: /* @__PURE__ */ a(
|
|
3489
|
+
iconBefore: /* @__PURE__ */ a(it, {}),
|
|
3463
3490
|
spacing: "wide",
|
|
3464
3491
|
variant: "outlined",
|
|
3465
3492
|
children: t
|
|
@@ -3480,12 +3507,12 @@ const na = w.div`
|
|
|
3480
3507
|
] }) }),
|
|
3481
3508
|
u
|
|
3482
3509
|
);
|
|
3483
|
-
},
|
|
3510
|
+
}, vl = (e) => {
|
|
3484
3511
|
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, i = te("(max-width: 768px)"), s = !n || n.length === 0;
|
|
3485
3512
|
return /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
3486
3513
|
i && /* @__PURE__ */ m(O, { children: [
|
|
3487
3514
|
/* @__PURE__ */ m(v, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
3488
|
-
/* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(
|
|
3515
|
+
/* @__PURE__ */ a(M, { appearance: "gray", icon: /* @__PURE__ */ a(lt, {}) }),
|
|
3489
3516
|
/* @__PURE__ */ a(
|
|
3490
3517
|
oe,
|
|
3491
3518
|
{
|
|
@@ -3498,7 +3525,7 @@ const na = w.div`
|
|
|
3498
3525
|
border: !0,
|
|
3499
3526
|
width: "100%",
|
|
3500
3527
|
height: "36px",
|
|
3501
|
-
children: s ? /* @__PURE__ */ a(
|
|
3528
|
+
children: s ? /* @__PURE__ */ a($, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ a(
|
|
3502
3529
|
De,
|
|
3503
3530
|
{
|
|
3504
3531
|
appearance: "primary",
|
|
@@ -3518,7 +3545,7 @@ const na = w.div`
|
|
|
3518
3545
|
t.map((d) => /* @__PURE__ */ m(v, { gap: "6px", alignItems: "center", children: [
|
|
3519
3546
|
/* @__PURE__ */ a(v, { padding: "22px 0 0 0", children: /* @__PURE__ */ a(M, { appearance: "primary", icon: d.icon }) }),
|
|
3520
3547
|
/* @__PURE__ */ a(
|
|
3521
|
-
|
|
3548
|
+
Yt,
|
|
3522
3549
|
{
|
|
3523
3550
|
disabled: d.disabled,
|
|
3524
3551
|
invalid: d.invalid,
|
|
@@ -3536,12 +3563,12 @@ const na = w.div`
|
|
|
3536
3563
|
)
|
|
3537
3564
|
] }, d.name))
|
|
3538
3565
|
] });
|
|
3539
|
-
},
|
|
3566
|
+
}, da = (e) => {
|
|
3540
3567
|
const n = [];
|
|
3541
3568
|
return e.from !== void 0 && e.from !== null && n.push(`>${e.from}`), e.to !== void 0 && e.to !== null && n.push(`<${e.to}`), n.join(";");
|
|
3542
|
-
},
|
|
3569
|
+
}, yl = (e) => {
|
|
3543
3570
|
var s;
|
|
3544
|
-
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ?
|
|
3571
|
+
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? da(d) : d, i = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
|
|
3545
3572
|
var c;
|
|
3546
3573
|
const p = d == null ? void 0 : d.value;
|
|
3547
3574
|
return p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0 ? null : {
|
|
@@ -3557,7 +3584,7 @@ const na = w.div`
|
|
|
3557
3584
|
value: o(n.value),
|
|
3558
3585
|
conditionsThatEstablishesTheDecision: i
|
|
3559
3586
|
};
|
|
3560
|
-
},
|
|
3587
|
+
}, xl = (e) => {
|
|
3561
3588
|
if (typeof e != "string") return e;
|
|
3562
3589
|
const n = e.split(";").map((r) => r.trim()), t = {};
|
|
3563
3590
|
for (const r of n)
|
|
@@ -3569,7 +3596,7 @@ const na = w.div`
|
|
|
3569
3596
|
isNaN(o) || (t.to = o);
|
|
3570
3597
|
}
|
|
3571
3598
|
return t.from !== void 0 || t.to !== void 0 ? t : e;
|
|
3572
|
-
},
|
|
3599
|
+
}, Tl = (e) => {
|
|
3573
3600
|
const { dataDecision: n, originalDecision: t } = e, r = {
|
|
3574
3601
|
conditionName: n.ruleName || "",
|
|
3575
3602
|
labelName: n.labelName || "",
|
|
@@ -3585,7 +3612,7 @@ const na = w.div`
|
|
|
3585
3612
|
(o) => o.hidden ? { ...r } : o
|
|
3586
3613
|
)
|
|
3587
3614
|
};
|
|
3588
|
-
},
|
|
3615
|
+
}, wl = (e) => {
|
|
3589
3616
|
const { decisions: n } = e;
|
|
3590
3617
|
return n == null ? void 0 : n.map((t) => {
|
|
3591
3618
|
var o;
|
|
@@ -3604,14 +3631,14 @@ const na = w.div`
|
|
|
3604
3631
|
)
|
|
3605
3632
|
} : t;
|
|
3606
3633
|
});
|
|
3607
|
-
},
|
|
3634
|
+
}, ca = (e) => ({
|
|
3608
3635
|
schema: le().required("Requerido").test(
|
|
3609
3636
|
"non-empty",
|
|
3610
3637
|
"El valor no puede estar vacío",
|
|
3611
3638
|
(n) => n != null && n.trim() !== ""
|
|
3612
3639
|
),
|
|
3613
3640
|
value: e
|
|
3614
|
-
}),
|
|
3641
|
+
}), ua = (e) => ({
|
|
3615
3642
|
schema: Pe().test(
|
|
3616
3643
|
"isArrayOrString",
|
|
3617
3644
|
"Debe ser un array de strings/numbers o un solo string",
|
|
@@ -3620,7 +3647,7 @@ const na = w.div`
|
|
|
3620
3647
|
) : typeof n == "string"
|
|
3621
3648
|
),
|
|
3622
3649
|
value: e
|
|
3623
|
-
}),
|
|
3650
|
+
}), pa = (e) => ({
|
|
3624
3651
|
schema: Pe().test(
|
|
3625
3652
|
"isArrayOrString",
|
|
3626
3653
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
@@ -3629,7 +3656,7 @@ const na = w.div`
|
|
|
3629
3656
|
) : typeof n == "string"
|
|
3630
3657
|
),
|
|
3631
3658
|
value: e
|
|
3632
|
-
}),
|
|
3659
|
+
}), ga = (e) => {
|
|
3633
3660
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
3634
3661
|
return {
|
|
3635
3662
|
schema: ne({
|
|
@@ -3645,28 +3672,28 @@ const na = w.div`
|
|
|
3645
3672
|
}),
|
|
3646
3673
|
value: { from: n, to: t }
|
|
3647
3674
|
};
|
|
3648
|
-
},
|
|
3675
|
+
}, vn = (e, n) => n === j.PERCENTAGE ? {
|
|
3649
3676
|
schema: se().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"),
|
|
3650
3677
|
value: e
|
|
3651
3678
|
} : {
|
|
3652
3679
|
schema: le().required("Requerido"),
|
|
3653
3680
|
value: e
|
|
3654
|
-
},
|
|
3655
|
-
[
|
|
3656
|
-
[
|
|
3657
|
-
[
|
|
3658
|
-
[
|
|
3659
|
-
[
|
|
3660
|
-
[
|
|
3661
|
-
},
|
|
3662
|
-
function
|
|
3681
|
+
}, ha = {
|
|
3682
|
+
[A.LIST_OF_VALUES]: ua,
|
|
3683
|
+
[A.LIST_OF_VALUES_MULTI]: pa,
|
|
3684
|
+
[A.RANGE]: ga,
|
|
3685
|
+
[A.GREATER_THAN]: vn,
|
|
3686
|
+
[A.LESS_THAN]: vn,
|
|
3687
|
+
[A.EQUAL]: vn
|
|
3688
|
+
}, Wn = (e) => ha[e] || ca;
|
|
3689
|
+
function fa({
|
|
3663
3690
|
decision: e,
|
|
3664
3691
|
onSubmitEvent: n,
|
|
3665
3692
|
textValues: t
|
|
3666
3693
|
}) {
|
|
3667
3694
|
const r = {
|
|
3668
3695
|
ruleName: e.ruleName || "",
|
|
3669
|
-
decisionDataType: e.decisionDataType ||
|
|
3696
|
+
decisionDataType: e.decisionDataType || j.ALPHABETICAL,
|
|
3670
3697
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
3671
3698
|
value: e.value || "",
|
|
3672
3699
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -3679,7 +3706,7 @@ function ga({
|
|
|
3679
3706
|
let o;
|
|
3680
3707
|
const i = {
|
|
3681
3708
|
ruleName: le().required("El nombre de la regla es requerido"),
|
|
3682
|
-
value: qe(() =>
|
|
3709
|
+
value: qe(() => Wn(
|
|
3683
3710
|
o.values.howToSetTheDecision
|
|
3684
3711
|
)(
|
|
3685
3712
|
o.values.value,
|
|
@@ -3728,7 +3755,7 @@ function ga({
|
|
|
3728
3755
|
const c = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
|
|
3729
3756
|
(h, f) => {
|
|
3730
3757
|
if (o.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
|
|
3731
|
-
const y =
|
|
3758
|
+
const y = Wn(
|
|
3732
3759
|
f.howToSetTheCondition
|
|
3733
3760
|
);
|
|
3734
3761
|
h[f.conditionName] = y(
|
|
@@ -3757,7 +3784,7 @@ function ga({
|
|
|
3757
3784
|
) : p.notRequired()
|
|
3758
3785
|
));
|
|
3759
3786
|
const s = ne(i);
|
|
3760
|
-
return o =
|
|
3787
|
+
return o = In({
|
|
3761
3788
|
initialValues: r,
|
|
3762
3789
|
validationSchema: s,
|
|
3763
3790
|
validateOnBlur: !0,
|
|
@@ -3790,7 +3817,7 @@ function ga({
|
|
|
3790
3817
|
void 0
|
|
3791
3818
|
);
|
|
3792
3819
|
else {
|
|
3793
|
-
const c = u.howToSetTheCondition ===
|
|
3820
|
+
const c = u.howToSetTheCondition === A.LIST_OF_VALUES_MULTI ? [] : "";
|
|
3794
3821
|
o.setFieldValue(
|
|
3795
3822
|
`conditionsThatEstablishesTheDecision.${u.conditionName}`,
|
|
3796
3823
|
c
|
|
@@ -3799,7 +3826,7 @@ function ga({
|
|
|
3799
3826
|
});
|
|
3800
3827
|
} };
|
|
3801
3828
|
}
|
|
3802
|
-
const
|
|
3829
|
+
const ma = w.div`
|
|
3803
3830
|
& > div {
|
|
3804
3831
|
border-radius: 8px;
|
|
3805
3832
|
border: 1px solid
|
|
@@ -3808,7 +3835,7 @@ const ha = w.div`
|
|
|
3808
3835
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
|
|
3809
3836
|
}};
|
|
3810
3837
|
}
|
|
3811
|
-
`,
|
|
3838
|
+
`, ba = w.div`
|
|
3812
3839
|
width: 100%;
|
|
3813
3840
|
height: 100%;
|
|
3814
3841
|
overflow-y: auto;
|
|
@@ -3825,7 +3852,7 @@ const ha = w.div`
|
|
|
3825
3852
|
background-color: #ebecf0;
|
|
3826
3853
|
border-radius: 8px;
|
|
3827
3854
|
}
|
|
3828
|
-
`,
|
|
3855
|
+
`, va = (e) => {
|
|
3829
3856
|
const {
|
|
3830
3857
|
checked: n,
|
|
3831
3858
|
children: t,
|
|
@@ -3849,12 +3876,12 @@ const ha = w.div`
|
|
|
3849
3876
|
onChange: u,
|
|
3850
3877
|
size: "small",
|
|
3851
3878
|
value: d,
|
|
3852
|
-
children: /* @__PURE__ */ a(
|
|
3879
|
+
children: /* @__PURE__ */ a($, { size: "medium", type: "label", weight: "bold", children: i })
|
|
3853
3880
|
}
|
|
3854
3881
|
) }),
|
|
3855
3882
|
l && /* @__PURE__ */ a(O, { children: t })
|
|
3856
3883
|
] });
|
|
3857
|
-
},
|
|
3884
|
+
}, ya = (e) => {
|
|
3858
3885
|
const {
|
|
3859
3886
|
onHandleStartChange: n,
|
|
3860
3887
|
onHandleEndChange: t,
|
|
@@ -3879,7 +3906,7 @@ const ha = w.div`
|
|
|
3879
3906
|
return /* @__PURE__ */ m(O, { children: [
|
|
3880
3907
|
/* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
3881
3908
|
/* @__PURE__ */ a(
|
|
3882
|
-
|
|
3909
|
+
$,
|
|
3883
3910
|
{
|
|
3884
3911
|
appearance: "gray",
|
|
3885
3912
|
margin: "10px 0",
|
|
@@ -3897,7 +3924,7 @@ const ha = w.div`
|
|
|
3897
3924
|
wrap: "wrap",
|
|
3898
3925
|
gap: "4px",
|
|
3899
3926
|
children: /* @__PURE__ */ a(
|
|
3900
|
-
|
|
3927
|
+
kn,
|
|
3901
3928
|
{
|
|
3902
3929
|
label: "Cerrada",
|
|
3903
3930
|
onChange: N,
|
|
@@ -3945,7 +3972,7 @@ const ha = w.div`
|
|
|
3945
3972
|
}
|
|
3946
3973
|
)
|
|
3947
3974
|
] });
|
|
3948
|
-
},
|
|
3975
|
+
}, xa = (e) => {
|
|
3949
3976
|
const {
|
|
3950
3977
|
formik: n,
|
|
3951
3978
|
textValues: t,
|
|
@@ -3959,13 +3986,13 @@ const ha = w.div`
|
|
|
3959
3986
|
termEndStatus: u
|
|
3960
3987
|
} = e;
|
|
3961
3988
|
return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
3962
|
-
|
|
3989
|
+
tn({
|
|
3963
3990
|
condition: i,
|
|
3964
3991
|
formik: n,
|
|
3965
3992
|
isDecision: !0
|
|
3966
3993
|
}),
|
|
3967
3994
|
/* @__PURE__ */ a(B, { dashed: !0 }),
|
|
3968
|
-
/* @__PURE__ */ a(
|
|
3995
|
+
/* @__PURE__ */ a(ma, { children: /* @__PURE__ */ a(ba, { children: /* @__PURE__ */ m(
|
|
3969
3996
|
v,
|
|
3970
3997
|
{
|
|
3971
3998
|
direction: "column",
|
|
@@ -3980,7 +4007,7 @@ const ha = w.div`
|
|
|
3980
4007
|
alignItems: "center",
|
|
3981
4008
|
gap: "64px",
|
|
3982
4009
|
children: [
|
|
3983
|
-
/* @__PURE__ */ a(
|
|
4010
|
+
/* @__PURE__ */ a($, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
3984
4011
|
/* @__PURE__ */ a(
|
|
3985
4012
|
dn,
|
|
3986
4013
|
{
|
|
@@ -3988,14 +4015,14 @@ const ha = w.div`
|
|
|
3988
4015
|
onChange: () => s(!n.values.toggleNone),
|
|
3989
4016
|
checked: n.values.toggleNone,
|
|
3990
4017
|
size: "small",
|
|
3991
|
-
children: /* @__PURE__ */ a(
|
|
4018
|
+
children: /* @__PURE__ */ a($, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
3992
4019
|
}
|
|
3993
4020
|
)
|
|
3994
4021
|
]
|
|
3995
4022
|
}
|
|
3996
4023
|
),
|
|
3997
4024
|
/* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => /* @__PURE__ */ a(
|
|
3998
|
-
|
|
4025
|
+
va,
|
|
3999
4026
|
{
|
|
4000
4027
|
id: `toggle-${c.conditionName}`,
|
|
4001
4028
|
name: `toggle.${c.conditionName}`,
|
|
@@ -4003,9 +4030,9 @@ const ha = w.div`
|
|
|
4003
4030
|
checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[c.conditionName] !== void 0,
|
|
4004
4031
|
handleToggleChange: (g) => d(
|
|
4005
4032
|
c.conditionName,
|
|
4006
|
-
c.howToSetTheCondition ===
|
|
4033
|
+
c.howToSetTheCondition === A.LIST_OF_VALUES_MULTI
|
|
4007
4034
|
)(g.target.checked),
|
|
4008
|
-
children:
|
|
4035
|
+
children: tn({ condition: c, formik: n })
|
|
4009
4036
|
},
|
|
4010
4037
|
c.conditionName
|
|
4011
4038
|
)) })
|
|
@@ -4015,7 +4042,7 @@ const ha = w.div`
|
|
|
4015
4042
|
t.terms && /* @__PURE__ */ m(O, { children: [
|
|
4016
4043
|
/* @__PURE__ */ a(B, { dashed: !0 }),
|
|
4017
4044
|
/* @__PURE__ */ a(
|
|
4018
|
-
|
|
4045
|
+
ya,
|
|
4019
4046
|
{
|
|
4020
4047
|
labelStart: t.termStart,
|
|
4021
4048
|
labelEnd: t.termEnd,
|
|
@@ -4035,15 +4062,15 @@ const ha = w.div`
|
|
|
4035
4062
|
)
|
|
4036
4063
|
] }),
|
|
4037
4064
|
/* @__PURE__ */ a(B, {}),
|
|
4038
|
-
l && /* @__PURE__ */ a(
|
|
4065
|
+
l && /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
4039
4066
|
/* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
4040
4067
|
/* @__PURE__ */ a(q, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
4041
4068
|
/* @__PURE__ */ a(q, { type: "submit", children: t.confirm })
|
|
4042
4069
|
] })
|
|
4043
4070
|
] }) });
|
|
4044
|
-
},
|
|
4071
|
+
}, Ta = (e) => {
|
|
4045
4072
|
var h;
|
|
4046
|
-
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } =
|
|
4073
|
+
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: i, handleToggleNoneChange: s } = fa({
|
|
4047
4074
|
decision: n,
|
|
4048
4075
|
onSubmitEvent: t,
|
|
4049
4076
|
textValues: r
|
|
@@ -4057,7 +4084,7 @@ const ha = w.div`
|
|
|
4057
4084
|
(f) => !f.hidden
|
|
4058
4085
|
)) || [], p = !!i.errors.conditionsThatEstablishesTheDecision && i.submitCount > 0, u = i.touched.effectiveFrom ? i.errors.effectiveFrom ? "invalid" : "valid" : void 0, c = i.touched.validUntil ? i.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
4059
4086
|
return /* @__PURE__ */ a(
|
|
4060
|
-
|
|
4087
|
+
xa,
|
|
4061
4088
|
{
|
|
4062
4089
|
formik: i,
|
|
4063
4090
|
onCancel: o,
|
|
@@ -4089,7 +4116,7 @@ const ha = w.div`
|
|
|
4089
4116
|
termEndStatus: c
|
|
4090
4117
|
}
|
|
4091
4118
|
);
|
|
4092
|
-
},
|
|
4119
|
+
}, Cl = (e) => {
|
|
4093
4120
|
var o;
|
|
4094
4121
|
const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
|
|
4095
4122
|
(i) => i.switchPlaces
|
|
@@ -4105,7 +4132,7 @@ const ha = w.div`
|
|
|
4105
4132
|
(i) => i.conditionName === r.conditionName ? { ...i, hidden: !0 } : i
|
|
4106
4133
|
)
|
|
4107
4134
|
} : t;
|
|
4108
|
-
},
|
|
4135
|
+
}, Dl = (e) => {
|
|
4109
4136
|
const { decisions: n } = e;
|
|
4110
4137
|
return n == null ? void 0 : n.map((t) => {
|
|
4111
4138
|
var o;
|
|
@@ -4141,7 +4168,7 @@ const ha = w.div`
|
|
|
4141
4168
|
color: E.palette.neutral.N0
|
|
4142
4169
|
}
|
|
4143
4170
|
}
|
|
4144
|
-
},
|
|
4171
|
+
}, wa = w.div`
|
|
4145
4172
|
& > div {
|
|
4146
4173
|
border: 1px solid
|
|
4147
4174
|
${({ theme: e, $active: n }) => {
|
|
@@ -4157,27 +4184,27 @@ const ha = w.div`
|
|
|
4157
4184
|
return ((o = (r = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : r.background) == null ? void 0 : o.hover) || xe.item.background.hover;
|
|
4158
4185
|
}};
|
|
4159
4186
|
}
|
|
4160
|
-
`,
|
|
4187
|
+
`, Xn = w.div`
|
|
4161
4188
|
display: flex;
|
|
4162
4189
|
align-items: center;
|
|
4163
4190
|
gap: 12px;
|
|
4164
4191
|
width: 100%;
|
|
4165
4192
|
outline: none;
|
|
4166
4193
|
cursor: pointer;
|
|
4167
|
-
`,
|
|
4194
|
+
`, Ca = w.div`
|
|
4168
4195
|
display: flex;
|
|
4169
4196
|
align-items: center;
|
|
4170
4197
|
outline: none;
|
|
4171
4198
|
cursor: pointer;
|
|
4172
|
-
`,
|
|
4199
|
+
`, Da = w(ct)`
|
|
4173
4200
|
display: flex;
|
|
4174
4201
|
align-items: center;
|
|
4175
4202
|
text-decoration: none;
|
|
4176
|
-
`,
|
|
4203
|
+
`, Sa = w(ct)`
|
|
4177
4204
|
display: block;
|
|
4178
4205
|
text-decoration: none;
|
|
4179
4206
|
color: inherit;
|
|
4180
|
-
`,
|
|
4207
|
+
`, Ea = w.div`
|
|
4181
4208
|
& > div {
|
|
4182
4209
|
border-bottom: 1px solid
|
|
4183
4210
|
${({ theme: e, $active: n }) => {
|
|
@@ -4186,7 +4213,7 @@ const ha = w.div`
|
|
|
4186
4213
|
}};
|
|
4187
4214
|
border-radius: 8px 8px 0 0;
|
|
4188
4215
|
}
|
|
4189
|
-
`,
|
|
4216
|
+
`, mt = w.div`
|
|
4190
4217
|
display: block;
|
|
4191
4218
|
text-decoration: none;
|
|
4192
4219
|
background-color: ${({ theme: e, $active: n }) => {
|
|
@@ -4204,14 +4231,14 @@ const ha = w.div`
|
|
|
4204
4231
|
return ((i = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : i.hover) || xe.item.background.hover;
|
|
4205
4232
|
}};
|
|
4206
4233
|
}
|
|
4207
|
-
`,
|
|
4234
|
+
`, Na = w.div`
|
|
4208
4235
|
display: flex;
|
|
4209
4236
|
flex-direction: column;
|
|
4210
4237
|
|
|
4211
|
-
& > a:last-child ${
|
|
4238
|
+
& > a:last-child ${mt} {
|
|
4212
4239
|
border-radius: 0 0 8px 8px;
|
|
4213
4240
|
}
|
|
4214
|
-
`,
|
|
4241
|
+
`, ka = (e) => {
|
|
4215
4242
|
const { isOpen: n, links: t, onClick: r, title: o, activeId: i, headerPath: s, headerActive: d } = e, l = (f) => {
|
|
4216
4243
|
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), r());
|
|
4217
4244
|
}, p = (f) => {
|
|
@@ -4219,16 +4246,16 @@ const ha = w.div`
|
|
|
4219
4246
|
}, u = (f) => {
|
|
4220
4247
|
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), f.stopPropagation(), r());
|
|
4221
4248
|
}, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", h = V.useId();
|
|
4222
|
-
return /* @__PURE__ */ a(
|
|
4249
|
+
return /* @__PURE__ */ a(wa, { $active: n, children: /* @__PURE__ */ m(oe, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
4223
4250
|
/* @__PURE__ */ a(
|
|
4224
|
-
|
|
4251
|
+
Ea,
|
|
4225
4252
|
{
|
|
4226
4253
|
$active: n && t.length > 0,
|
|
4227
4254
|
"aria-controls": h,
|
|
4228
4255
|
"aria-expanded": n,
|
|
4229
4256
|
onClick: p,
|
|
4230
4257
|
onKeyDown: u,
|
|
4231
|
-
children: s ? /* @__PURE__ */ a(
|
|
4258
|
+
children: s ? /* @__PURE__ */ a(Da, { to: s, children: /* @__PURE__ */ m(
|
|
4232
4259
|
oe,
|
|
4233
4260
|
{
|
|
4234
4261
|
alignItems: "center",
|
|
@@ -4242,11 +4269,11 @@ const ha = w.div`
|
|
|
4242
4269
|
{
|
|
4243
4270
|
appearance: c,
|
|
4244
4271
|
cursorHover: !0,
|
|
4245
|
-
icon: n && t.length > 0 ? /* @__PURE__ */ a(
|
|
4272
|
+
icon: n && t.length > 0 ? /* @__PURE__ */ a(Tn, {}) : /* @__PURE__ */ a(zn, {})
|
|
4246
4273
|
}
|
|
4247
4274
|
),
|
|
4248
|
-
/* @__PURE__ */ a(
|
|
4249
|
-
|
|
4275
|
+
/* @__PURE__ */ a(Xn, { children: /* @__PURE__ */ a(
|
|
4276
|
+
$,
|
|
4250
4277
|
{
|
|
4251
4278
|
appearance: c,
|
|
4252
4279
|
cursorHover: !0,
|
|
@@ -4272,18 +4299,18 @@ const ha = w.div`
|
|
|
4272
4299
|
{
|
|
4273
4300
|
appearance: c,
|
|
4274
4301
|
cursorHover: !0,
|
|
4275
|
-
icon: n && t.length > 0 ? /* @__PURE__ */ a(
|
|
4302
|
+
icon: n && t.length > 0 ? /* @__PURE__ */ a(Tn, {}) : /* @__PURE__ */ a(zn, {})
|
|
4276
4303
|
}
|
|
4277
4304
|
),
|
|
4278
|
-
/* @__PURE__ */ a(
|
|
4279
|
-
|
|
4305
|
+
/* @__PURE__ */ a(Xn, { children: /* @__PURE__ */ a(
|
|
4306
|
+
Ca,
|
|
4280
4307
|
{
|
|
4281
4308
|
"aria-controls": h,
|
|
4282
4309
|
"aria-expanded": n,
|
|
4283
4310
|
onClick: r,
|
|
4284
4311
|
onKeyDown: l,
|
|
4285
4312
|
children: /* @__PURE__ */ a(
|
|
4286
|
-
|
|
4313
|
+
$,
|
|
4287
4314
|
{
|
|
4288
4315
|
appearance: c,
|
|
4289
4316
|
cursorHover: !0,
|
|
@@ -4301,9 +4328,9 @@ const ha = w.div`
|
|
|
4301
4328
|
)
|
|
4302
4329
|
}
|
|
4303
4330
|
),
|
|
4304
|
-
n && t.length > 0 && /* @__PURE__ */ a(
|
|
4331
|
+
n && t.length > 0 && /* @__PURE__ */ a(Na, { id: h, children: t.map((f) => {
|
|
4305
4332
|
const x = f.id === i;
|
|
4306
|
-
return /* @__PURE__ */ a(
|
|
4333
|
+
return /* @__PURE__ */ a(Sa, { to: f.path, children: /* @__PURE__ */ a(mt, { $active: x, children: /* @__PURE__ */ m(
|
|
4307
4334
|
v,
|
|
4308
4335
|
{
|
|
4309
4336
|
alignItems: "center",
|
|
@@ -4311,9 +4338,9 @@ const ha = w.div`
|
|
|
4311
4338
|
gap: "8px",
|
|
4312
4339
|
padding: x ? "8px 4px" : "8px 32px",
|
|
4313
4340
|
children: [
|
|
4314
|
-
x && /* @__PURE__ */ a(M, { appearance: "primary", icon: /* @__PURE__ */ a(
|
|
4341
|
+
x && /* @__PURE__ */ a(M, { appearance: "primary", icon: /* @__PURE__ */ a(Vt, {}) }),
|
|
4315
4342
|
/* @__PURE__ */ a(
|
|
4316
|
-
|
|
4343
|
+
$,
|
|
4317
4344
|
{
|
|
4318
4345
|
appearance: x ? "primary" : "dark",
|
|
4319
4346
|
size: "small",
|
|
@@ -4327,7 +4354,7 @@ const ha = w.div`
|
|
|
4327
4354
|
) }) }, f.id);
|
|
4328
4355
|
}) })
|
|
4329
4356
|
] }) });
|
|
4330
|
-
},
|
|
4357
|
+
}, Aa = w.div`
|
|
4331
4358
|
& > div {
|
|
4332
4359
|
background: ${({ $background: e, theme: n }) => {
|
|
4333
4360
|
var t, r, o, i;
|
|
@@ -4335,13 +4362,13 @@ const ha = w.div`
|
|
|
4335
4362
|
}};
|
|
4336
4363
|
}
|
|
4337
4364
|
height: 90vh;
|
|
4338
|
-
`,
|
|
4365
|
+
`, $a = (e, n) => {
|
|
4339
4366
|
var t;
|
|
4340
4367
|
for (const r of n)
|
|
4341
4368
|
if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
|
|
4342
4369
|
return null;
|
|
4343
|
-
},
|
|
4344
|
-
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o =
|
|
4370
|
+
}, Sl = (e) => {
|
|
4371
|
+
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Kt(), [i, s] = V.useState(t), d = V.useRef(o.pathname), l = V.useCallback(
|
|
4345
4372
|
(u) => {
|
|
4346
4373
|
var c;
|
|
4347
4374
|
return (c = u.find((g) => g.path === o.pathname)) == null ? void 0 : c.id;
|
|
@@ -4357,14 +4384,14 @@ const ha = w.div`
|
|
|
4357
4384
|
s(null);
|
|
4358
4385
|
return;
|
|
4359
4386
|
}
|
|
4360
|
-
const c =
|
|
4387
|
+
const c = $a(o.pathname, r);
|
|
4361
4388
|
if (c) {
|
|
4362
4389
|
s(c);
|
|
4363
4390
|
return;
|
|
4364
4391
|
}
|
|
4365
4392
|
t && s(t);
|
|
4366
|
-
}, [n, t, r, o.pathname]), /* @__PURE__ */ a(
|
|
4367
|
-
|
|
4393
|
+
}, [n, t, r, o.pathname]), /* @__PURE__ */ a(Aa, { $background: !0, children: /* @__PURE__ */ a(v, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((u) => /* @__PURE__ */ a(
|
|
4394
|
+
ka,
|
|
4368
4395
|
{
|
|
4369
4396
|
activeId: l(u.links),
|
|
4370
4397
|
headerPath: u.path,
|
|
@@ -4383,7 +4410,7 @@ function Y(e) {
|
|
|
4383
4410
|
function Ce(e) {
|
|
4384
4411
|
e.stopPropagation();
|
|
4385
4412
|
}
|
|
4386
|
-
function
|
|
4413
|
+
function bt() {
|
|
4387
4414
|
const e = /* @__PURE__ */ new Map();
|
|
4388
4415
|
return [function(r, o) {
|
|
4389
4416
|
e.get(r) && e.get(r).forEach((i) => {
|
|
@@ -4394,53 +4421,53 @@ function ft() {
|
|
|
4394
4421
|
i.push(o), e.set(r, i);
|
|
4395
4422
|
}];
|
|
4396
4423
|
}
|
|
4397
|
-
var [
|
|
4398
|
-
function
|
|
4424
|
+
var [vt, yt] = bt();
|
|
4425
|
+
function Ia(e, n) {
|
|
4399
4426
|
return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
|
|
4400
4427
|
}
|
|
4401
|
-
function
|
|
4428
|
+
function Ge(e, n, t = !0, r = ["__key"]) {
|
|
4402
4429
|
if (e === n) return !0;
|
|
4403
4430
|
if (typeof n == "object" && typeof e == "object" && e !== null && n !== null) {
|
|
4404
4431
|
if (e instanceof Map || e instanceof Set) return !1;
|
|
4405
4432
|
if (e instanceof Date && n instanceof Date)
|
|
4406
4433
|
return e.getTime() === n.getTime();
|
|
4407
4434
|
if (e instanceof RegExp && n instanceof RegExp)
|
|
4408
|
-
return
|
|
4435
|
+
return Ia(e, n);
|
|
4409
4436
|
if (e === null || n === null) return !1;
|
|
4410
4437
|
const o = e, i = n;
|
|
4411
4438
|
if (Object.keys(o).length !== Object.keys(i).length) return !1;
|
|
4412
4439
|
for (const s of r)
|
|
4413
4440
|
if ((s in o || s in i) && o[s] !== i[s]) return !1;
|
|
4414
4441
|
for (const s in o)
|
|
4415
|
-
if (!(s in i) || o[s] !== i[s] && !t || t && !
|
|
4442
|
+
if (!(s in i) || o[s] !== i[s] && !t || t && !Ge(o[s], i[s], t, r)) return !1;
|
|
4416
4443
|
return !0;
|
|
4417
4444
|
}
|
|
4418
4445
|
return !1;
|
|
4419
4446
|
}
|
|
4420
|
-
function
|
|
4447
|
+
function xt(e) {
|
|
4421
4448
|
return e.split(" ").filter((n) => n);
|
|
4422
4449
|
}
|
|
4423
4450
|
function Me(e) {
|
|
4424
4451
|
return { x: e.clientX, y: e.clientY };
|
|
4425
4452
|
}
|
|
4426
4453
|
Array();
|
|
4427
|
-
var
|
|
4428
|
-
function
|
|
4429
|
-
if (!
|
|
4454
|
+
var On = typeof window < "u", G = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap();
|
|
4455
|
+
function Tt() {
|
|
4456
|
+
if (!On) return !1;
|
|
4430
4457
|
if ("userAgentData" in navigator)
|
|
4431
4458
|
return navigator.userAgentData.mobile === !0;
|
|
4432
4459
|
const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
4433
4460
|
return n || t;
|
|
4434
4461
|
}
|
|
4435
|
-
var
|
|
4462
|
+
var Ra = {
|
|
4436
4463
|
affectedNodes: [],
|
|
4437
4464
|
coordinates: {
|
|
4438
4465
|
x: 0,
|
|
4439
4466
|
y: 0
|
|
4440
4467
|
},
|
|
4441
4468
|
currentTargetValue: void 0,
|
|
4442
|
-
on:
|
|
4443
|
-
emit:
|
|
4469
|
+
on: yt,
|
|
4470
|
+
emit: vt,
|
|
4444
4471
|
originalZIndex: void 0,
|
|
4445
4472
|
pointerSelection: !1,
|
|
4446
4473
|
preventEnter: !1,
|
|
@@ -4466,16 +4493,16 @@ var Aa = {
|
|
|
4466
4493
|
scrollDebounceTimeout: void 0,
|
|
4467
4494
|
frameIdX: void 0,
|
|
4468
4495
|
frameIdY: void 0
|
|
4469
|
-
}, b =
|
|
4470
|
-
function
|
|
4496
|
+
}, b = Ra, we = !1, Qn, yn;
|
|
4497
|
+
function Fa() {
|
|
4471
4498
|
b.scrollDebounceTimeout && clearTimeout(b.scrollDebounceTimeout), b.longPressTimeout && clearTimeout(b.longPressTimeout), b.frameIdX !== void 0 && cancelAnimationFrame(b.frameIdX), b.frameIdY !== void 0 && cancelAnimationFrame(b.frameIdY), b = { ...{
|
|
4472
4499
|
affectedNodes: [],
|
|
4473
4500
|
coordinates: {
|
|
4474
4501
|
x: 0,
|
|
4475
4502
|
y: 0
|
|
4476
4503
|
},
|
|
4477
|
-
on:
|
|
4478
|
-
emit:
|
|
4504
|
+
on: yt,
|
|
4505
|
+
emit: vt,
|
|
4479
4506
|
currentTargetValue: void 0,
|
|
4480
4507
|
originalZIndex: void 0,
|
|
4481
4508
|
pointerId: void 0,
|
|
@@ -4508,38 +4535,38 @@ function Ia() {
|
|
|
4508
4535
|
frameIdY: void 0
|
|
4509
4536
|
} };
|
|
4510
4537
|
}
|
|
4511
|
-
function
|
|
4538
|
+
function wt(e) {
|
|
4512
4539
|
return Object.assign(b, e), e.initialParent.data.emit("dragStarted", b), we = !1, b.emit("dragStarted", b), b;
|
|
4513
4540
|
}
|
|
4514
|
-
function
|
|
4541
|
+
function La() {
|
|
4515
4542
|
b.activeState && Ne(b.activeState.parent, void 0, b), b.selectedState && Se(b.selectedState.nodes, b.selectedState.parent, b), b.selectedState = b.activeState = void 0;
|
|
4516
4543
|
}
|
|
4517
|
-
function
|
|
4544
|
+
function Oa() {
|
|
4518
4545
|
if (b.pointerDown && (b.pointerDown.node.el.draggable = !0), b.pointerDown = void 0, !re(b)) return;
|
|
4519
4546
|
const e = b.currentParent.data.config;
|
|
4520
4547
|
re(b) && e.handleEnd(b);
|
|
4521
4548
|
}
|
|
4522
|
-
function
|
|
4549
|
+
function Pa(e) {
|
|
4523
4550
|
e.key === "Escape" && (b.selectedState && Se(b.selectedState.nodes, b.selectedState.parent, b), b.activeState && Ne(b.activeState.parent, void 0, b), b.selectedState = b.activeState = void 0);
|
|
4524
4551
|
}
|
|
4525
|
-
function
|
|
4552
|
+
function Ma(e) {
|
|
4526
4553
|
if (!W(b)) return;
|
|
4527
4554
|
we = !0;
|
|
4528
4555
|
const n = b.initialParent.data.config.handleEnd;
|
|
4529
4556
|
n(b);
|
|
4530
4557
|
}
|
|
4531
|
-
function
|
|
4558
|
+
function za(e) {
|
|
4532
4559
|
if (!W(b)) return;
|
|
4533
4560
|
Y(e);
|
|
4534
4561
|
const { x: n, y: t } = Me(e);
|
|
4535
4562
|
W(b) && gn({ x: n, y: t }, e, b);
|
|
4536
4563
|
}
|
|
4537
|
-
function
|
|
4564
|
+
function Va(e) {
|
|
4538
4565
|
if (!b.pointerDown || !b.pointerDown.validated) return;
|
|
4539
4566
|
const n = b.pointerDown.parent.data.config;
|
|
4540
|
-
if (!(e.pointerType === "mouse" && !
|
|
4567
|
+
if (!(e.pointerType === "mouse" && !Tt()))
|
|
4541
4568
|
if (re(b))
|
|
4542
|
-
re(b) &&
|
|
4569
|
+
re(b) && Zn(e, b);
|
|
4543
4570
|
else {
|
|
4544
4571
|
if (Y(e), n.longPress && !b.longPress) {
|
|
4545
4572
|
clearTimeout(b.longPressTimeout), b.longPress = !1;
|
|
@@ -4547,7 +4574,7 @@ function Ma(e) {
|
|
|
4547
4574
|
}
|
|
4548
4575
|
const t = n.draggedNodes(b.pointerDown);
|
|
4549
4576
|
n.dragstartClasses(b.pointerDown.node, t, n, !0);
|
|
4550
|
-
const r = b.pointerDown.node.el.getBoundingClientRect(), o =
|
|
4577
|
+
const r = b.pointerDown.node.el.getBoundingClientRect(), o = hi(
|
|
4551
4578
|
b.pointerDown.node,
|
|
4552
4579
|
b.pointerDown.parent,
|
|
4553
4580
|
e,
|
|
@@ -4555,24 +4582,24 @@ function Ma(e) {
|
|
|
4555
4582
|
t,
|
|
4556
4583
|
r
|
|
4557
4584
|
);
|
|
4558
|
-
|
|
4585
|
+
Zn(e, o, !0);
|
|
4559
4586
|
}
|
|
4560
4587
|
}
|
|
4561
|
-
function
|
|
4588
|
+
function ja({
|
|
4562
4589
|
parent: e,
|
|
4563
4590
|
getValues: n,
|
|
4564
4591
|
setValues: t,
|
|
4565
4592
|
config: r = {}
|
|
4566
4593
|
}) {
|
|
4567
4594
|
var l, p, u;
|
|
4568
|
-
if (!
|
|
4569
|
-
|
|
4570
|
-
dragover:
|
|
4571
|
-
pointerdown:
|
|
4572
|
-
pointerup:
|
|
4573
|
-
keydown:
|
|
4574
|
-
drop:
|
|
4575
|
-
pointermove:
|
|
4595
|
+
if (!On) return;
|
|
4596
|
+
Qn || (Qn = rn(document, {
|
|
4597
|
+
dragover: za,
|
|
4598
|
+
pointerdown: La,
|
|
4599
|
+
pointerup: Oa,
|
|
4600
|
+
keydown: Pa,
|
|
4601
|
+
drop: Ma,
|
|
4602
|
+
pointermove: Va,
|
|
4576
4603
|
pointercancel: K(r.handlePointercancel),
|
|
4577
4604
|
touchmove: (c) => {
|
|
4578
4605
|
W(b) && c.cancelable && Y(c);
|
|
@@ -4580,45 +4607,45 @@ function za({
|
|
|
4580
4607
|
contextmenu: (c) => {
|
|
4581
4608
|
re(b) && Y(c);
|
|
4582
4609
|
}
|
|
4583
|
-
})),
|
|
4584
|
-
const [o, i] =
|
|
4610
|
+
})), Dt(e);
|
|
4611
|
+
const [o, i] = bt(), s = {
|
|
4585
4612
|
getValues: n,
|
|
4586
4613
|
setValues: t,
|
|
4587
4614
|
config: {
|
|
4588
4615
|
dragDropEffect: r.dragDropEffect ?? "move",
|
|
4589
4616
|
dragEffectAllowed: r.dragEffectAllowed ?? "move",
|
|
4590
|
-
draggedNodes:
|
|
4591
|
-
dragstartClasses:
|
|
4592
|
-
handleNodeKeydown:
|
|
4593
|
-
handleDragstart:
|
|
4594
|
-
handleNodeDragover:
|
|
4595
|
-
handleParentDragover:
|
|
4596
|
-
handleNodeDrop:
|
|
4597
|
-
handleNodeFocus:
|
|
4598
|
-
handleNodeBlur:
|
|
4599
|
-
handlePointercancel:
|
|
4600
|
-
handleEnd:
|
|
4601
|
-
handleDragend:
|
|
4602
|
-
handleParentFocus:
|
|
4603
|
-
handleNodePointerup:
|
|
4604
|
-
handleNodePointerover:
|
|
4605
|
-
handleParentPointerover:
|
|
4606
|
-
handleParentScroll:
|
|
4607
|
-
handleNodePointerdown:
|
|
4608
|
-
handleNodeDragenter:
|
|
4609
|
-
handleNodeDragleave:
|
|
4610
|
-
handleParentDrop:
|
|
4617
|
+
draggedNodes: Ja,
|
|
4618
|
+
dragstartClasses: ri,
|
|
4619
|
+
handleNodeKeydown: ai,
|
|
4620
|
+
handleDragstart: ni,
|
|
4621
|
+
handleNodeDragover: mi,
|
|
4622
|
+
handleParentDragover: bi,
|
|
4623
|
+
handleNodeDrop: li,
|
|
4624
|
+
handleNodeFocus: si,
|
|
4625
|
+
handleNodeBlur: di,
|
|
4626
|
+
handlePointercancel: ui,
|
|
4627
|
+
handleEnd: pi,
|
|
4628
|
+
handleDragend: ci,
|
|
4629
|
+
handleParentFocus: _a,
|
|
4630
|
+
handleNodePointerup: gi,
|
|
4631
|
+
handleNodePointerover: ii,
|
|
4632
|
+
handleParentPointerover: vi,
|
|
4633
|
+
handleParentScroll: ei,
|
|
4634
|
+
handleNodePointerdown: ti,
|
|
4635
|
+
handleNodeDragenter: xi,
|
|
4636
|
+
handleNodeDragleave: Ti,
|
|
4637
|
+
handleParentDrop: qa,
|
|
4611
4638
|
multiDrag: r.multiDrag ?? !1,
|
|
4612
4639
|
nativeDrag: r.nativeDrag ?? !0,
|
|
4613
|
-
performSort:
|
|
4614
|
-
performTransfer:
|
|
4640
|
+
performSort: Ua,
|
|
4641
|
+
performTransfer: Ha,
|
|
4615
4642
|
root: r.root ?? document,
|
|
4616
|
-
setupNode:
|
|
4617
|
-
setupNodeRemap:
|
|
4618
|
-
reapplyDragClasses:
|
|
4619
|
-
tearDownNode:
|
|
4620
|
-
tearDownNodeRemap:
|
|
4621
|
-
remapFinished:
|
|
4643
|
+
setupNode: Ga,
|
|
4644
|
+
setupNodeRemap: St,
|
|
4645
|
+
reapplyDragClasses: Ya,
|
|
4646
|
+
tearDownNode: Xa,
|
|
4647
|
+
tearDownNodeRemap: Wa,
|
|
4648
|
+
remapFinished: Za,
|
|
4622
4649
|
threshold: {
|
|
4623
4650
|
horizontal: 0,
|
|
4624
4651
|
vertical: 0
|
|
@@ -4631,7 +4658,7 @@ function za({
|
|
|
4631
4658
|
on: i,
|
|
4632
4659
|
emit: o
|
|
4633
4660
|
};
|
|
4634
|
-
new MutationObserver(
|
|
4661
|
+
new MutationObserver(Qa).observe(e, { childList: !0 }), G.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
|
|
4635
4662
|
var g, h;
|
|
4636
4663
|
(h = (g = c(e)) == null ? void 0 : g.tearDown) == null || h.call(g);
|
|
4637
4664
|
}), (p = r.plugins) == null || p.forEach((c) => {
|
|
@@ -4640,9 +4667,9 @@ function za({
|
|
|
4640
4667
|
}), (u = r.plugins) == null || u.forEach((c) => {
|
|
4641
4668
|
var g, h;
|
|
4642
4669
|
(h = (g = c(e)) == null ? void 0 : g.setup) == null || h.call(g);
|
|
4643
|
-
}),
|
|
4670
|
+
}), Ba(e, s), un(e, !0);
|
|
4644
4671
|
}
|
|
4645
|
-
function
|
|
4672
|
+
function Ct(e, n, t, r, o, i) {
|
|
4646
4673
|
const { x: s, y: d } = Me(t), l = e.el.getBoundingClientRect();
|
|
4647
4674
|
return {
|
|
4648
4675
|
affectedNodes: [],
|
|
@@ -4677,16 +4704,16 @@ function Tt(e, n, t, r, o, i) {
|
|
|
4677
4704
|
transferred: !1
|
|
4678
4705
|
};
|
|
4679
4706
|
}
|
|
4680
|
-
function
|
|
4707
|
+
function Ua({
|
|
4681
4708
|
parent: e,
|
|
4682
4709
|
draggedNodes: n,
|
|
4683
4710
|
targetNodes: t
|
|
4684
4711
|
}) {
|
|
4685
4712
|
un(e.el);
|
|
4686
4713
|
const r = n.map((l) => l.data.value), o = Oe(e.el, e.data), i = n[0].data.index, s = [...e.data.enabledNodes], d = [
|
|
4687
|
-
...o.filter((l) => !r.some((p) =>
|
|
4714
|
+
...o.filter((l) => !r.some((p) => Ge(l, p)))
|
|
4688
4715
|
];
|
|
4689
|
-
d.splice(t[0].data.index, 0, ...r), "draggedNode" in b && (b.currentTargetValue = t[0].data.value),
|
|
4716
|
+
d.splice(t[0].data.index, 0, ...r), "draggedNode" in b && (b.currentTargetValue = t[0].data.value), En(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
|
|
4690
4717
|
parent: {
|
|
4691
4718
|
el: e.el,
|
|
4692
4719
|
data: e.data
|
|
@@ -4726,7 +4753,7 @@ function Se(e, n, t) {
|
|
|
4726
4753
|
s !== -1 && t.selectedState.nodes.splice(s, 1);
|
|
4727
4754
|
}
|
|
4728
4755
|
}
|
|
4729
|
-
function
|
|
4756
|
+
function Je(e, n, t, r, o = !1) {
|
|
4730
4757
|
r.pointerSelection = o;
|
|
4731
4758
|
for (const i of n)
|
|
4732
4759
|
i.el.setAttribute("aria-selected", "true"), Re([i.el], e.data.config.selectedClass, !0);
|
|
@@ -4735,11 +4762,11 @@ function Ke(e, n, t, r, o = !1) {
|
|
|
4735
4762
|
parent: e
|
|
4736
4763
|
}, Ne(e, t, r);
|
|
4737
4764
|
}
|
|
4738
|
-
function
|
|
4765
|
+
function _a(e, n) {
|
|
4739
4766
|
const t = e.targetData.parent.data.enabledNodes[0];
|
|
4740
4767
|
t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? Ne(e.targetData.parent, t, n) : n.selectedState || Ne(e.targetData.parent, t, n));
|
|
4741
4768
|
}
|
|
4742
|
-
function
|
|
4769
|
+
function Ha({
|
|
4743
4770
|
currentParent: e,
|
|
4744
4771
|
targetParent: n,
|
|
4745
4772
|
initialParent: t,
|
|
@@ -4751,11 +4778,11 @@ function _a({
|
|
|
4751
4778
|
un(t.el);
|
|
4752
4779
|
const d = r.map((g) => g.data.value), l = [
|
|
4753
4780
|
...Oe(e.el, e.data).filter(
|
|
4754
|
-
(g) => !d.some((h) =>
|
|
4781
|
+
(g) => !d.some((h) => Ge(g, h))
|
|
4755
4782
|
)
|
|
4756
4783
|
], p = Oe(n.el, n.data), u = t.el === n.el && n.data.config.sortable === !1;
|
|
4757
4784
|
let c;
|
|
4758
|
-
i.length ? (u ? c = o : n.data.config.sortable === !1 ? c = n.data.enabledNodes.length : c = i[0].data.index, p.splice(c, 0, ...d)) : (c = u ? o : n.data.enabledNodes.length, p.splice(c, 0, ...d)),
|
|
4785
|
+
i.length ? (u ? c = o : n.data.config.sortable === !1 ? c = n.data.enabledNodes.length : c = i[0].data.index, p.splice(c, 0, ...d)) : (c = u ? o : n.data.enabledNodes.length, p.splice(c, 0, ...d)), En(e.el, e.data, l), En(n.el, n.data, p), n.data.config.onTransfer && n.data.config.onTransfer({
|
|
4759
4786
|
sourceParent: e,
|
|
4760
4787
|
targetParent: n,
|
|
4761
4788
|
initialParent: t,
|
|
@@ -4776,15 +4803,15 @@ function _a({
|
|
|
4776
4803
|
function Oe(e, n) {
|
|
4777
4804
|
return [...n.getValues(e)];
|
|
4778
4805
|
}
|
|
4779
|
-
function
|
|
4806
|
+
function En(e, n, t) {
|
|
4780
4807
|
n.setValues(t, e);
|
|
4781
4808
|
}
|
|
4782
|
-
function
|
|
4809
|
+
function qa(e, n) {
|
|
4783
4810
|
Ce(e.e), we = !0;
|
|
4784
4811
|
const t = n.initialParent.data.config.handleEnd;
|
|
4785
4812
|
t(n);
|
|
4786
4813
|
}
|
|
4787
|
-
function
|
|
4814
|
+
function Dt(e) {
|
|
4788
4815
|
const n = G.get(e);
|
|
4789
4816
|
n && n.abortControllers.mainParent && n.abortControllers.mainParent.abort();
|
|
4790
4817
|
}
|
|
@@ -4794,17 +4821,17 @@ function W(e) {
|
|
|
4794
4821
|
function re(e) {
|
|
4795
4822
|
return "synthDragging" in e && !!e.synthDragging;
|
|
4796
4823
|
}
|
|
4797
|
-
function
|
|
4824
|
+
function Ba(e, n) {
|
|
4798
4825
|
n.abortControllers.mainParent = rn(e, {
|
|
4799
|
-
dragover:
|
|
4826
|
+
dragover: en(n.config.handleParentDragover),
|
|
4800
4827
|
handleParentPointerover: n.config.handleParentPointerover,
|
|
4801
|
-
scroll:
|
|
4802
|
-
drop:
|
|
4828
|
+
scroll: en(n.config.handleParentScroll),
|
|
4829
|
+
drop: en(n.config.handleParentDrop),
|
|
4803
4830
|
hasNestedParent: (t) => {
|
|
4804
4831
|
const r = G.get(t.target);
|
|
4805
4832
|
r && (r.nestedParent = t.detail.parent);
|
|
4806
4833
|
},
|
|
4807
|
-
focus:
|
|
4834
|
+
focus: en(n.config.handleParentFocus)
|
|
4808
4835
|
}), n.config.externalDragHandle && n.config.externalDragHandle.el && n.config.externalDragHandle.callback && (n.abortControllers.externalDragHandle = rn(
|
|
4809
4836
|
n.config.externalDragHandle.el,
|
|
4810
4837
|
{
|
|
@@ -4838,7 +4865,7 @@ function ja(e, n) {
|
|
|
4838
4865
|
}
|
|
4839
4866
|
));
|
|
4840
4867
|
}
|
|
4841
|
-
function
|
|
4868
|
+
function Ga(e) {
|
|
4842
4869
|
var t;
|
|
4843
4870
|
const n = e.parent.data.config;
|
|
4844
4871
|
e.node.data.abortControllers.mainNode = rn(e.node.el, {
|
|
@@ -4866,33 +4893,33 @@ function qa(e) {
|
|
|
4866
4893
|
(i = (o = r(e.parent.el)) == null ? void 0 : o.setupNode) == null || i.call(o, e);
|
|
4867
4894
|
});
|
|
4868
4895
|
}
|
|
4869
|
-
function
|
|
4896
|
+
function St(e) {
|
|
4870
4897
|
var n;
|
|
4871
4898
|
ue.set(e.node.el, e.node.data), (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
|
|
4872
4899
|
var r, o;
|
|
4873
4900
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
|
|
4874
4901
|
});
|
|
4875
4902
|
}
|
|
4876
|
-
function
|
|
4903
|
+
function Ya(e, n) {
|
|
4877
4904
|
if (!W(b)) return;
|
|
4878
4905
|
const t = re(b) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
|
|
4879
4906
|
b.draggedNode.el === e && Re([e], t, !0);
|
|
4880
4907
|
}
|
|
4881
|
-
function
|
|
4908
|
+
function Wa(e) {
|
|
4882
4909
|
var n;
|
|
4883
4910
|
(n = e.parent.data.config.plugins) == null || n.forEach((t) => {
|
|
4884
4911
|
var r, o;
|
|
4885
4912
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.tearDownNodeRemap) == null || o.call(r, e);
|
|
4886
4913
|
});
|
|
4887
4914
|
}
|
|
4888
|
-
function
|
|
4915
|
+
function Xa(e) {
|
|
4889
4916
|
var n, t, r, o, i;
|
|
4890
4917
|
(n = e.parent.data.config.plugins) == null || n.forEach((s) => {
|
|
4891
4918
|
var d, l;
|
|
4892
4919
|
(l = (d = s(e.parent.el)) == null ? void 0 : d.tearDownNode) == null || l.call(d, e);
|
|
4893
4920
|
}), e.node.el.draggable = !1, (r = (t = e.node.data) == null ? void 0 : t.abortControllers) != null && r.mainNode && ((i = (o = e.node.data) == null ? void 0 : o.abortControllers) == null || i.mainNode.abort());
|
|
4894
4921
|
}
|
|
4895
|
-
function
|
|
4922
|
+
function Qa(e) {
|
|
4896
4923
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
4897
4924
|
return;
|
|
4898
4925
|
const n = e[0].target;
|
|
@@ -4939,7 +4966,7 @@ function un(e, n) {
|
|
|
4939
4966
|
index: l
|
|
4940
4967
|
}
|
|
4941
4968
|
);
|
|
4942
|
-
if (!W(b) && b.activeState &&
|
|
4969
|
+
if (!W(b) && b.activeState && Ge(b.activeState.node.data.value, c.value) && Ne(
|
|
4943
4970
|
{
|
|
4944
4971
|
data: t,
|
|
4945
4972
|
el: e
|
|
@@ -4949,7 +4976,7 @@ function un(e, n) {
|
|
|
4949
4976
|
data: c
|
|
4950
4977
|
},
|
|
4951
4978
|
b
|
|
4952
|
-
), W(b) &&
|
|
4979
|
+
), W(b) && Ge(b.draggedNode.data.value, c.value)) {
|
|
4953
4980
|
b.draggedNode.data = c, b.draggedNode.el = p;
|
|
4954
4981
|
const g = b.draggedNodes.find(
|
|
4955
4982
|
(h) => h.data.value === c.value
|
|
@@ -4968,7 +4995,7 @@ function un(e, n) {
|
|
|
4968
4995
|
el: p,
|
|
4969
4996
|
data: c
|
|
4970
4997
|
}
|
|
4971
|
-
}),
|
|
4998
|
+
}), St({
|
|
4972
4999
|
parent: {
|
|
4973
5000
|
el: e,
|
|
4974
5001
|
data: t
|
|
@@ -4984,13 +5011,13 @@ function un(e, n) {
|
|
|
4984
5011
|
(u = (p = l(e)) == null ? void 0 : p.remapFinished) == null || u.call(p);
|
|
4985
5012
|
});
|
|
4986
5013
|
}
|
|
4987
|
-
function
|
|
5014
|
+
function Za() {
|
|
4988
5015
|
b.remapJustFinished = !0, "draggedNode" in b && (b.affectedNodes = []);
|
|
4989
5016
|
}
|
|
4990
|
-
function
|
|
5017
|
+
function Ka(e) {
|
|
4991
5018
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
4992
5019
|
}
|
|
4993
|
-
function
|
|
5020
|
+
function Ja(e) {
|
|
4994
5021
|
var n;
|
|
4995
5022
|
if (e.parent.data.config.multiDrag) {
|
|
4996
5023
|
if (b.selectedState)
|
|
@@ -5003,14 +5030,14 @@ function Za(e) {
|
|
|
5003
5030
|
} else return [e.node];
|
|
5004
5031
|
return [];
|
|
5005
5032
|
}
|
|
5006
|
-
function
|
|
5007
|
-
W(b) && (b.emit("scrollStarted", b), !re(b) && (b.preventEnter = !0,
|
|
5033
|
+
function ei(e) {
|
|
5034
|
+
W(b) && (b.emit("scrollStarted", b), !re(b) && (b.preventEnter = !0, yn && clearTimeout(yn), yn = setTimeout(() => {
|
|
5008
5035
|
b.preventEnter = !1, b.emit("scrollEnded", b);
|
|
5009
5036
|
}, 100)));
|
|
5010
5037
|
}
|
|
5011
|
-
function
|
|
5038
|
+
function ni(e, n) {
|
|
5012
5039
|
const t = e.targetData.parent.data.config;
|
|
5013
|
-
if (!t.nativeDrag || !
|
|
5040
|
+
if (!t.nativeDrag || !Ka(e) || !Et({
|
|
5014
5041
|
x: e.e.clientX,
|
|
5015
5042
|
y: e.e.clientY,
|
|
5016
5043
|
node: e.targetData.node,
|
|
@@ -5024,7 +5051,7 @@ function Ja(e, n) {
|
|
|
5024
5051
|
node: e.targetData.node
|
|
5025
5052
|
});
|
|
5026
5053
|
r.length === 0 && (r = [e.targetData.node]), t.dragstartClasses(e.targetData.node, r, t);
|
|
5027
|
-
const o =
|
|
5054
|
+
const o = oi(e, r);
|
|
5028
5055
|
if (t.onDragstart) {
|
|
5029
5056
|
const i = {
|
|
5030
5057
|
parent: e.targetData.parent,
|
|
@@ -5040,20 +5067,20 @@ function Ja(e, n) {
|
|
|
5040
5067
|
t.onDragstart(i);
|
|
5041
5068
|
}
|
|
5042
5069
|
}
|
|
5043
|
-
function
|
|
5070
|
+
function ti(e, n) {
|
|
5044
5071
|
var d, l;
|
|
5045
5072
|
if (Ce(e.e), n.pointerDown = {
|
|
5046
5073
|
parent: e.targetData.parent,
|
|
5047
5074
|
node: e.targetData.node,
|
|
5048
5075
|
validated: !1
|
|
5049
|
-
}, !
|
|
5076
|
+
}, !Et({
|
|
5050
5077
|
x: e.e.clientX,
|
|
5051
5078
|
y: e.e.clientY,
|
|
5052
5079
|
node: e.targetData.node,
|
|
5053
5080
|
config: e.targetData.parent.data.config
|
|
5054
5081
|
}))
|
|
5055
5082
|
return;
|
|
5056
|
-
n.pointerDown.validated = !0,
|
|
5083
|
+
n.pointerDown.validated = !0, fi(e, n, e.targetData.node);
|
|
5057
5084
|
const t = e.targetData.parent.data;
|
|
5058
5085
|
let r = [e.targetData.node];
|
|
5059
5086
|
const o = e.e.ctrlKey || e.e.metaKey, i = e.e.shiftKey, s = e.targetData.node;
|
|
@@ -5062,7 +5089,7 @@ function ei(e, n) {
|
|
|
5062
5089
|
(u) => u.el === s.el
|
|
5063
5090
|
) === -1 ? r = [...n.selectedState.nodes, s] : r = n.selectedState.nodes.filter(
|
|
5064
5091
|
(u) => u.el !== s.el
|
|
5065
|
-
) : r = [s],
|
|
5092
|
+
) : r = [s], Je(
|
|
5066
5093
|
e.targetData.parent,
|
|
5067
5094
|
r,
|
|
5068
5095
|
e.targetData.node,
|
|
@@ -5091,7 +5118,7 @@ function ei(e, n) {
|
|
|
5091
5118
|
else
|
|
5092
5119
|
for (let u = 0; u <= s.data.index; u++)
|
|
5093
5120
|
r.push(p[u]);
|
|
5094
|
-
|
|
5121
|
+
Je(
|
|
5095
5122
|
e.targetData.parent,
|
|
5096
5123
|
r,
|
|
5097
5124
|
e.targetData.node,
|
|
@@ -5102,13 +5129,13 @@ function ei(e, n) {
|
|
|
5102
5129
|
}
|
|
5103
5130
|
(l = (d = n.selectedState) == null ? void 0 : d.nodes) != null && l.length ? n.selectedState.nodes.findIndex(
|
|
5104
5131
|
(u) => u.el === e.targetData.node.el
|
|
5105
|
-
) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? Se(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag &&
|
|
5132
|
+
) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? Se(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && Tt() ? r.push(...n.selectedState.nodes) : Se(n.selectedState.nodes, e.targetData.parent, n), Je(
|
|
5106
5133
|
e.targetData.parent,
|
|
5107
5134
|
r,
|
|
5108
5135
|
e.targetData.node,
|
|
5109
5136
|
n,
|
|
5110
5137
|
!0
|
|
5111
|
-
)) :
|
|
5138
|
+
)) : Je(
|
|
5112
5139
|
e.targetData.parent,
|
|
5113
5140
|
[e.targetData.node],
|
|
5114
5141
|
e.targetData.node,
|
|
@@ -5116,7 +5143,7 @@ function ei(e, n) {
|
|
|
5116
5143
|
!0
|
|
5117
5144
|
);
|
|
5118
5145
|
}
|
|
5119
|
-
function
|
|
5146
|
+
function ri(e, n, t, r = !1) {
|
|
5120
5147
|
Re(
|
|
5121
5148
|
n.map((o) => o.el),
|
|
5122
5149
|
r ? t.synthDraggingClass : t.draggingClass
|
|
@@ -5136,10 +5163,10 @@ function ni(e, n, t, r = !1) {
|
|
|
5136
5163
|
);
|
|
5137
5164
|
});
|
|
5138
5165
|
}
|
|
5139
|
-
function
|
|
5166
|
+
function oi(e, n) {
|
|
5140
5167
|
Ce(e.e);
|
|
5141
|
-
const t =
|
|
5142
|
-
|
|
5168
|
+
const t = wt(
|
|
5169
|
+
Ct(
|
|
5143
5170
|
e.targetData.node,
|
|
5144
5171
|
e.targetData.parent,
|
|
5145
5172
|
e.e,
|
|
@@ -5191,7 +5218,7 @@ function ti(e, n) {
|
|
|
5191
5218
|
}
|
|
5192
5219
|
return t;
|
|
5193
5220
|
}
|
|
5194
|
-
function
|
|
5221
|
+
function Et({
|
|
5195
5222
|
x: e,
|
|
5196
5223
|
y: n,
|
|
5197
5224
|
node: t,
|
|
@@ -5207,22 +5234,22 @@ function Dt({
|
|
|
5207
5234
|
if (i === s || s.contains(i)) return !0;
|
|
5208
5235
|
return !1;
|
|
5209
5236
|
}
|
|
5210
|
-
function
|
|
5237
|
+
function ai(e) {
|
|
5211
5238
|
}
|
|
5212
|
-
function
|
|
5213
|
-
e.detail.targetData.parent.el === e.detail.state.currentParent.el ?
|
|
5239
|
+
function ii(e) {
|
|
5240
|
+
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) : pn(e.detail, e.detail.state);
|
|
5214
5241
|
}
|
|
5215
|
-
function
|
|
5242
|
+
function li(e, n) {
|
|
5216
5243
|
const t = e.targetData.parent.data.config;
|
|
5217
5244
|
t.nativeDrag && (Ce(e.e), we = !0, t.handleEnd(n));
|
|
5218
5245
|
}
|
|
5219
|
-
function
|
|
5246
|
+
function si(e) {
|
|
5220
5247
|
e.e.target !== e.e.currentTarget && b.pointerDown && (b.pointerDown.node.el.draggable = !1);
|
|
5221
5248
|
}
|
|
5222
|
-
function
|
|
5249
|
+
function di(e) {
|
|
5223
5250
|
e.e.target !== e.e.currentTarget && b.pointerDown && (b.pointerDown.node.el.draggable = !0);
|
|
5224
5251
|
}
|
|
5225
|
-
function
|
|
5252
|
+
function ci(e, n) {
|
|
5226
5253
|
const t = e.targetData.parent.data.config;
|
|
5227
5254
|
if (t.nativeDrag) {
|
|
5228
5255
|
if (Y(e.e), Ce(e.e), we) {
|
|
@@ -5232,7 +5259,7 @@ function si(e, n) {
|
|
|
5232
5259
|
t.handleEnd(n);
|
|
5233
5260
|
}
|
|
5234
5261
|
}
|
|
5235
|
-
function
|
|
5262
|
+
function ui(e, n) {
|
|
5236
5263
|
var r;
|
|
5237
5264
|
if (!re(n)) return;
|
|
5238
5265
|
if (Y(e.e), we) {
|
|
@@ -5248,11 +5275,11 @@ function di(e, n) {
|
|
|
5248
5275
|
state: n
|
|
5249
5276
|
}), t == null || t.handleEnd(n);
|
|
5250
5277
|
}
|
|
5251
|
-
function
|
|
5278
|
+
function pi(e) {
|
|
5252
5279
|
var u, c, g, h, f;
|
|
5253
5280
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
5254
5281
|
const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = re(e), o = (u = G.get(e.initialParent.el)) == null ? void 0 : u.config, i = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, s = (c = t == null ? void 0 : t.config) == null ? void 0 : c.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (h = t == null ? void 0 : t.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
|
|
5255
|
-
re(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)),
|
|
5282
|
+
re(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Nn(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(() => {
|
|
5256
5283
|
Te(n, i), Te(n, s), Te(n, d);
|
|
5257
5284
|
}), Se(e.draggedNodes, e.currentParent, e), Ne(e.currentParent, void 0, e);
|
|
5258
5285
|
const p = { ...e };
|
|
@@ -5265,9 +5292,9 @@ function ci(e) {
|
|
|
5265
5292
|
draggedNode: p.draggedNode,
|
|
5266
5293
|
draggedNodes: p.draggedNodes,
|
|
5267
5294
|
state: p
|
|
5268
|
-
}), e.emit("dragEnded", p),
|
|
5295
|
+
}), e.emit("dragEnded", p), Fa();
|
|
5269
5296
|
}
|
|
5270
|
-
function
|
|
5297
|
+
function gi(e, n) {
|
|
5271
5298
|
Ce(e.e), !n.pointerSelection && n.selectedState && Se(n.selectedState.nodes, e.targetData.parent, n);
|
|
5272
5299
|
const t = e.targetData.parent.data.config;
|
|
5273
5300
|
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, Te(
|
|
@@ -5275,7 +5302,7 @@ function ui(e, n) {
|
|
|
5275
5302
|
t.longPressClass
|
|
5276
5303
|
), W(n) && t.handleEnd(n);
|
|
5277
5304
|
}
|
|
5278
|
-
function
|
|
5305
|
+
function hi(e, n, t, r, o, i) {
|
|
5279
5306
|
var f, x;
|
|
5280
5307
|
const s = n.data.config;
|
|
5281
5308
|
let d, l;
|
|
@@ -5346,8 +5373,8 @@ function pi(e, n, t, r, o, i) {
|
|
|
5346
5373
|
rootScrollWidth: (f = document.scrollingElement) == null ? void 0 : f.scrollWidth,
|
|
5347
5374
|
rootScrollHeight: (x = document.scrollingElement) == null ? void 0 : x.scrollHeight
|
|
5348
5375
|
};
|
|
5349
|
-
return
|
|
5350
|
-
...
|
|
5376
|
+
return wt({
|
|
5377
|
+
...Ct(
|
|
5351
5378
|
e,
|
|
5352
5379
|
n,
|
|
5353
5380
|
t,
|
|
@@ -5358,16 +5385,16 @@ function pi(e, n, t, r, o, i) {
|
|
|
5358
5385
|
...g
|
|
5359
5386
|
});
|
|
5360
5387
|
}
|
|
5361
|
-
function
|
|
5388
|
+
function fi(e, n, t) {
|
|
5362
5389
|
const r = e.targetData.parent.data.config;
|
|
5363
5390
|
n.longPressTimeout = setTimeout(() => {
|
|
5364
5391
|
n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Re([t.el], r.longPressClass), Y(e.e));
|
|
5365
5392
|
}, r.longPressDuration || 1e3);
|
|
5366
5393
|
}
|
|
5367
|
-
function
|
|
5394
|
+
function Nn(e, n = !0, t = !0) {
|
|
5368
5395
|
n && (e.frameIdX !== void 0 && (cancelAnimationFrame(e.frameIdX), e.frameIdX = void 0), e.lastScrollDirectionX = void 0), t && (e.frameIdY !== void 0 && (cancelAnimationFrame(e.frameIdY), e.frameIdY = void 0), e.lastScrollDirectionY = void 0), !e.frameIdX && !e.frameIdY && (e.preventEnter = !1);
|
|
5369
5396
|
}
|
|
5370
|
-
function
|
|
5397
|
+
function Nt(e, n = !1) {
|
|
5371
5398
|
var u;
|
|
5372
5399
|
const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, i = e.startTop ?? 0, s = window.scrollX ?? 0, d = window.scrollY ?? 0, l = t - o + s, p = r - i + d;
|
|
5373
5400
|
e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${p}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", Te(
|
|
@@ -5375,12 +5402,12 @@ function St(e, n = !1) {
|
|
|
5375
5402
|
(u = e.initialParent.data.config) == null ? void 0 : u.longPressClass
|
|
5376
5403
|
));
|
|
5377
5404
|
}
|
|
5378
|
-
function
|
|
5405
|
+
function Zn(e, n, t = !1) {
|
|
5379
5406
|
const r = Me(e);
|
|
5380
|
-
n.coordinates.x = r.x, n.coordinates.y = r.y,
|
|
5407
|
+
n.coordinates.x = r.x, n.coordinates.y = r.y, Nt(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
|
|
5381
5408
|
re(n) && gn(n.coordinates, e, n);
|
|
5382
5409
|
}, 16);
|
|
5383
|
-
const o =
|
|
5410
|
+
const o = Si(r);
|
|
5384
5411
|
if (!o) {
|
|
5385
5412
|
document.dispatchEvent(
|
|
5386
5413
|
new CustomEvent("handleRootPointerover", {
|
|
@@ -5407,22 +5434,22 @@ function Xn(e, n, t = !1) {
|
|
|
5407
5434
|
})
|
|
5408
5435
|
);
|
|
5409
5436
|
}
|
|
5410
|
-
function
|
|
5437
|
+
function mi(e, n) {
|
|
5411
5438
|
var i;
|
|
5412
5439
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5413
5440
|
const { x: r, y: o } = Me(e.e);
|
|
5414
|
-
n.coordinates.y = o, n.coordinates.x = r, Y(e.e), Ce(e.e), W(n) && gn({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((i = n.currentParent) == null ? void 0 : i.el) ?
|
|
5441
|
+
n.coordinates.y = o, n.coordinates.x = r, Y(e.e), Ce(e.e), W(n) && gn({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((i = n.currentParent) == null ? void 0 : i.el) ? kt(e, n) : pn(e, n);
|
|
5415
5442
|
}
|
|
5416
|
-
function
|
|
5443
|
+
function bi(e, n) {
|
|
5417
5444
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5418
5445
|
Y(e.e), Ce(e.e);
|
|
5419
5446
|
const { x: r, y: o } = Me(e.e);
|
|
5420
5447
|
W(n) && gn({ x: r, y: o }, e.e, n), pn(e, n);
|
|
5421
5448
|
}
|
|
5422
|
-
function
|
|
5449
|
+
function vi(e) {
|
|
5423
5450
|
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && pn(e.detail, e.detail.state);
|
|
5424
5451
|
}
|
|
5425
|
-
function
|
|
5452
|
+
function yi({
|
|
5426
5453
|
currentParent: e,
|
|
5427
5454
|
targetParent: n,
|
|
5428
5455
|
initialParent: t,
|
|
@@ -5440,13 +5467,13 @@ function bi({
|
|
|
5440
5467
|
o
|
|
5441
5468
|
) : !(!i.group || i.group !== s.group);
|
|
5442
5469
|
}
|
|
5443
|
-
function
|
|
5470
|
+
function xi(e, n) {
|
|
5444
5471
|
Y(e.e);
|
|
5445
5472
|
}
|
|
5446
|
-
function
|
|
5473
|
+
function Ti(e, n) {
|
|
5447
5474
|
Y(e.e);
|
|
5448
5475
|
}
|
|
5449
|
-
function
|
|
5476
|
+
function wi(e, n, t, r) {
|
|
5450
5477
|
var u;
|
|
5451
5478
|
if (n.affectedNodes.map((c) => c.data.value).includes(e.targetData.node.data.value))
|
|
5452
5479
|
return !1;
|
|
@@ -5480,9 +5507,9 @@ function xi(e, n, t, r) {
|
|
|
5480
5507
|
}
|
|
5481
5508
|
return !1;
|
|
5482
5509
|
}
|
|
5483
|
-
function
|
|
5510
|
+
function kt(e, n) {
|
|
5484
5511
|
const { x: t, y: r } = Me(e.e);
|
|
5485
|
-
if (!
|
|
5512
|
+
if (!wi(e, n, t, r))
|
|
5486
5513
|
return;
|
|
5487
5514
|
const o = n.draggedNode.data.index > e.targetData.node.data.index ? [e.targetData.node.data.index, n.draggedNode.data.index] : [n.draggedNode.data.index, e.targetData.node.data.index];
|
|
5488
5515
|
n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
|
|
@@ -5523,7 +5550,7 @@ function K(e) {
|
|
|
5523
5550
|
};
|
|
5524
5551
|
}
|
|
5525
5552
|
function pn(e, n) {
|
|
5526
|
-
Y(e.e),
|
|
5553
|
+
Y(e.e), yi({
|
|
5527
5554
|
currentParent: n.currentParent,
|
|
5528
5555
|
targetParent: e.targetData.parent,
|
|
5529
5556
|
initialParent: n.initialParent,
|
|
@@ -5539,7 +5566,7 @@ function pn(e, n) {
|
|
|
5539
5566
|
targetNodes: "node" in e.targetData ? [e.targetData.node] : []
|
|
5540
5567
|
}), n.currentParent = e.targetData.parent, n.transferred = !0);
|
|
5541
5568
|
}
|
|
5542
|
-
function
|
|
5569
|
+
function en(e) {
|
|
5543
5570
|
function n(t) {
|
|
5544
5571
|
const r = G.get(t);
|
|
5545
5572
|
if (r)
|
|
@@ -5567,13 +5594,13 @@ function Re(e, n, t = !1) {
|
|
|
5567
5594
|
ue.set(o, i);
|
|
5568
5595
|
}
|
|
5569
5596
|
for (const o of e) {
|
|
5570
|
-
const i = ue.get(o), s =
|
|
5597
|
+
const i = ue.get(o), s = Ci(o, n, i, t);
|
|
5571
5598
|
s && r(o, s);
|
|
5572
5599
|
}
|
|
5573
5600
|
}
|
|
5574
|
-
function
|
|
5601
|
+
function Ci(e, n, t, r = !1) {
|
|
5575
5602
|
if (!n) return;
|
|
5576
|
-
const o =
|
|
5603
|
+
const o = xt(n);
|
|
5577
5604
|
if (!o.length) return;
|
|
5578
5605
|
if (!t) {
|
|
5579
5606
|
e.classList.add(...o);
|
|
@@ -5590,7 +5617,7 @@ function Ti(e, n, t, r = !1) {
|
|
|
5590
5617
|
}
|
|
5591
5618
|
function Te(e, n) {
|
|
5592
5619
|
if (!n) return;
|
|
5593
|
-
const t =
|
|
5620
|
+
const t = xt(n);
|
|
5594
5621
|
if (t.length)
|
|
5595
5622
|
for (const r of e) {
|
|
5596
5623
|
if (!hn(r)) {
|
|
@@ -5603,7 +5630,7 @@ function Te(e, n) {
|
|
|
5603
5630
|
o.privateClasses.includes(i) || r.classList.remove(i);
|
|
5604
5631
|
}
|
|
5605
5632
|
}
|
|
5606
|
-
function
|
|
5633
|
+
function Kn(e, n, t, r, o) {
|
|
5607
5634
|
const s = o.axis === "x", d = e === document.scrollingElement, l = s ? "scrollLeft" : "scrollTop", p = s ? "clientWidth" : "clientHeight", u = s ? "offsetWidth" : "offsetHeight", c = s ? "scrollWidth" : "scrollHeight", g = s ? n.clientX : n.clientY, h = s ? r.left : r.top, f = s ? t.overflowX : t.overflowY;
|
|
5608
5635
|
if (d) {
|
|
5609
5636
|
const x = e[l], y = e[p], D = x > 0, T = x + y < (s ? o.state.rootScrollWidth || 0 : e[c]);
|
|
@@ -5627,7 +5654,7 @@ function Qn(e, n, t, r, o) {
|
|
|
5627
5654
|
}
|
|
5628
5655
|
return s ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
5629
5656
|
}
|
|
5630
|
-
function
|
|
5657
|
+
function Di(e, n, t, r) {
|
|
5631
5658
|
if (!W(t) || !t.draggedNode)
|
|
5632
5659
|
return;
|
|
5633
5660
|
t.preventEnter = !0;
|
|
@@ -5643,30 +5670,30 @@ function wi(e, n, t, r) {
|
|
|
5643
5670
|
t[l] = void 0, t[d] = void 0;
|
|
5644
5671
|
return;
|
|
5645
5672
|
}
|
|
5646
|
-
e[u] += s * i, re(t) &&
|
|
5673
|
+
e[u] += s * i, re(t) && Nt(t), t[l] = requestAnimationFrame(p);
|
|
5647
5674
|
};
|
|
5648
5675
|
t[l] = requestAnimationFrame(p);
|
|
5649
5676
|
}
|
|
5650
|
-
function
|
|
5677
|
+
function Jn(e, n, t) {
|
|
5651
5678
|
const r = e.getBoundingClientRect();
|
|
5652
5679
|
return n >= r.left && n <= r.right && t >= r.top && t <= r.bottom;
|
|
5653
5680
|
}
|
|
5654
5681
|
function gn(e, n, t) {
|
|
5655
5682
|
if (!W(t) || !t.draggedNode)
|
|
5656
5683
|
return;
|
|
5657
|
-
|
|
5684
|
+
Nn(t);
|
|
5658
5685
|
const { x: r, y: o } = e;
|
|
5659
5686
|
let i = !1;
|
|
5660
5687
|
const s = (l, p, u) => {
|
|
5661
|
-
|
|
5688
|
+
Di(u, n, t, { axis: l, direction: p }), i = !0;
|
|
5662
5689
|
}, d = (l) => {
|
|
5663
|
-
const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c =
|
|
5690
|
+
const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Kn(l, n, p, u, {
|
|
5664
5691
|
axis: "x",
|
|
5665
5692
|
state: t
|
|
5666
|
-
}), g =
|
|
5693
|
+
}), g = Kn(l, n, p, u, { axis: "y" });
|
|
5667
5694
|
(c.left || c.right) && (t.lastScrollContainerX = l, s("x", c.right ? "positive" : "negative", l)), (g.up || g.down) && (t.lastScrollContainerY = l, s("y", g.down ? "positive" : "negative", l));
|
|
5668
5695
|
};
|
|
5669
|
-
if (t.lastScrollContainerX &&
|
|
5696
|
+
if (t.lastScrollContainerX && Jn(t.lastScrollContainerX, r, o) && d(t.lastScrollContainerX), !i && t.lastScrollContainerY && Jn(t.lastScrollContainerY, r, o) && d(t.lastScrollContainerY), !i) {
|
|
5670
5697
|
let l = document.elementFromPoint(r, o);
|
|
5671
5698
|
for (; l && !(i && t.lastScrollContainerX && t.lastScrollContainerY); )
|
|
5672
5699
|
l instanceof HTMLElement && d(l), l = l.parentElement;
|
|
@@ -5675,9 +5702,9 @@ function gn(e, n, t) {
|
|
|
5675
5702
|
const l = document.scrollingElement;
|
|
5676
5703
|
l instanceof HTMLElement && d(l);
|
|
5677
5704
|
}
|
|
5678
|
-
i ||
|
|
5705
|
+
i || Nn(t);
|
|
5679
5706
|
}
|
|
5680
|
-
function
|
|
5707
|
+
function Si(e) {
|
|
5681
5708
|
let n = document.elementFromPoint(e.x, e.y);
|
|
5682
5709
|
if (!hn(n)) return;
|
|
5683
5710
|
let t, r = !0;
|
|
@@ -5727,48 +5754,48 @@ function rn(e, n) {
|
|
|
5727
5754
|
}
|
|
5728
5755
|
return t;
|
|
5729
5756
|
}
|
|
5730
|
-
function
|
|
5757
|
+
function Ei(e) {
|
|
5731
5758
|
if (e instanceof HTMLElement) return e;
|
|
5732
5759
|
if ("current" in e && e.current instanceof HTMLElement)
|
|
5733
5760
|
return e.current;
|
|
5734
5761
|
console.warn("Invalid parent element", e);
|
|
5735
5762
|
}
|
|
5736
|
-
function
|
|
5737
|
-
const t =
|
|
5763
|
+
function Ni(e, n) {
|
|
5764
|
+
const t = Ei(e);
|
|
5738
5765
|
t && n(t);
|
|
5739
5766
|
}
|
|
5740
5767
|
var on = /* @__PURE__ */ new WeakMap();
|
|
5741
|
-
function
|
|
5768
|
+
function ki(e) {
|
|
5742
5769
|
const n = on.get(e);
|
|
5743
5770
|
return n ? n[0] : (console.warn("No values found for parent element"), []);
|
|
5744
5771
|
}
|
|
5745
|
-
function
|
|
5772
|
+
function Ai(e, n) {
|
|
5746
5773
|
const t = on.get(n);
|
|
5747
5774
|
t && t[1](e), on.set(n, [e, t[1]]);
|
|
5748
5775
|
}
|
|
5749
|
-
function
|
|
5776
|
+
function $i(e, n) {
|
|
5750
5777
|
return (t) => {
|
|
5751
|
-
on.set(t, n),
|
|
5778
|
+
on.set(t, n), ja({ parent: t, getValues: ki, setValues: Ai, config: e });
|
|
5752
5779
|
};
|
|
5753
5780
|
}
|
|
5754
|
-
function
|
|
5755
|
-
|
|
5781
|
+
function et(e) {
|
|
5782
|
+
On && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
|
|
5756
5783
|
const { parent: t, state: r, ...o } = n;
|
|
5757
|
-
|
|
5784
|
+
Ni(t, $i(o, r));
|
|
5758
5785
|
}));
|
|
5759
5786
|
}
|
|
5760
|
-
function
|
|
5787
|
+
function Ii(e, n = {}) {
|
|
5761
5788
|
const t = Ie(null), [r, o] = z(e);
|
|
5762
5789
|
function i(s = {}) {
|
|
5763
|
-
|
|
5790
|
+
et({ parent: t, state: [r, o], ...s });
|
|
5764
5791
|
}
|
|
5765
5792
|
return Ee(() => {
|
|
5766
|
-
|
|
5793
|
+
et({ parent: t, state: [r, o], ...n });
|
|
5767
5794
|
}, [r]), Ee(() => () => {
|
|
5768
|
-
t.current &&
|
|
5795
|
+
t.current && Dt(t.current);
|
|
5769
5796
|
}, []), [t, r, o, i];
|
|
5770
5797
|
}
|
|
5771
|
-
const
|
|
5798
|
+
const nt = {
|
|
5772
5799
|
border: {
|
|
5773
5800
|
selected: {
|
|
5774
5801
|
color: E.palette.blue.B400
|
|
@@ -5777,7 +5804,7 @@ const Jn = {
|
|
|
5777
5804
|
color: E.palette.neutral.N40
|
|
5778
5805
|
}
|
|
5779
5806
|
}
|
|
5780
|
-
},
|
|
5807
|
+
}, Ri = w.ul`
|
|
5781
5808
|
list-style: none;
|
|
5782
5809
|
padding: 0;
|
|
5783
5810
|
margin: 0;
|
|
@@ -5786,15 +5813,15 @@ const Jn = {
|
|
|
5786
5813
|
gap: 12px;
|
|
5787
5814
|
width: 100%;
|
|
5788
5815
|
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
5789
|
-
`,
|
|
5816
|
+
`, Fi = w.li`
|
|
5790
5817
|
& > div {
|
|
5791
5818
|
border: 1px solid
|
|
5792
5819
|
${({ theme: e, $active: n }) => {
|
|
5793
5820
|
var t, r, o, i;
|
|
5794
|
-
return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.selected) == null ? void 0 : r.color) ||
|
|
5821
|
+
return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.selected) == null ? void 0 : r.color) || nt.border.selected.color : ((i = (o = e == null ? void 0 : e.border) == null ? void 0 : o.clear) == null ? void 0 : i.color) || nt.border.clear.color;
|
|
5795
5822
|
}};
|
|
5796
5823
|
}
|
|
5797
|
-
`,
|
|
5824
|
+
`, xn = "dnd:draggingLabel", tt = (e) => {
|
|
5798
5825
|
const {
|
|
5799
5826
|
emptyMessage: n,
|
|
5800
5827
|
id: t,
|
|
@@ -5804,7 +5831,7 @@ const Jn = {
|
|
|
5804
5831
|
highlightFirst: s,
|
|
5805
5832
|
onMove: d,
|
|
5806
5833
|
locked: l = !1
|
|
5807
|
-
} = e, p = V.useRef(null), u = l ? [p, i] :
|
|
5834
|
+
} = e, p = V.useRef(null), u = l ? [p, i] : Ii(i, { group: r }), [c, g] = u, [h, f] = V.useState(
|
|
5808
5835
|
null
|
|
5809
5836
|
), x = V.useRef(i);
|
|
5810
5837
|
V.useEffect(() => {
|
|
@@ -5813,11 +5840,11 @@ const Jn = {
|
|
|
5813
5840
|
const I = C.detail ?? null;
|
|
5814
5841
|
f(I);
|
|
5815
5842
|
};
|
|
5816
|
-
return window.addEventListener(
|
|
5843
|
+
return window.addEventListener(xn, N), () => window.removeEventListener(xn, N);
|
|
5817
5844
|
}, [l]);
|
|
5818
5845
|
const y = V.useCallback((N) => {
|
|
5819
5846
|
l || window.dispatchEvent(
|
|
5820
|
-
new CustomEvent(
|
|
5847
|
+
new CustomEvent(xn, { detail: N })
|
|
5821
5848
|
);
|
|
5822
5849
|
}, [l]), D = (N) => {
|
|
5823
5850
|
var k;
|
|
@@ -5847,14 +5874,14 @@ const Jn = {
|
|
|
5847
5874
|
}, [g, t, d, l]);
|
|
5848
5875
|
const S = g.length === 0;
|
|
5849
5876
|
return /* @__PURE__ */ a(
|
|
5850
|
-
|
|
5877
|
+
je,
|
|
5851
5878
|
{
|
|
5852
5879
|
legend: o,
|
|
5853
5880
|
width: "100%",
|
|
5854
5881
|
height: "-webkit-fill-available",
|
|
5855
5882
|
spacing: "wide",
|
|
5856
5883
|
children: /* @__PURE__ */ a(
|
|
5857
|
-
|
|
5884
|
+
Ri,
|
|
5858
5885
|
{
|
|
5859
5886
|
ref: c,
|
|
5860
5887
|
onPointerDownCapture: l ? void 0 : D,
|
|
@@ -5872,19 +5899,19 @@ const Jn = {
|
|
|
5872
5899
|
width: "100%",
|
|
5873
5900
|
alignItems: "center",
|
|
5874
5901
|
justifyContent: "center",
|
|
5875
|
-
children: /* @__PURE__ */ a(
|
|
5902
|
+
children: /* @__PURE__ */ a($, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
|
|
5876
5903
|
}
|
|
5877
5904
|
) : g.map((N, C) => {
|
|
5878
5905
|
const I = !l && h === N;
|
|
5879
5906
|
return /* @__PURE__ */ a(
|
|
5880
|
-
|
|
5907
|
+
Fi,
|
|
5881
5908
|
{
|
|
5882
5909
|
className: `dnd-item${I ? " is-dragging" : ""}`,
|
|
5883
5910
|
"data-label": N,
|
|
5884
5911
|
"data-first": !!(s && C === 0) || void 0,
|
|
5885
5912
|
$active: I,
|
|
5886
5913
|
children: /* @__PURE__ */ a(oe, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ a(
|
|
5887
|
-
|
|
5914
|
+
$,
|
|
5888
5915
|
{
|
|
5889
5916
|
type: "title",
|
|
5890
5917
|
appearance: I ? "primary" : "dark",
|
|
@@ -5902,7 +5929,7 @@ const Jn = {
|
|
|
5902
5929
|
)
|
|
5903
5930
|
}
|
|
5904
5931
|
);
|
|
5905
|
-
},
|
|
5932
|
+
}, El = (e) => {
|
|
5906
5933
|
const { group: n = "clients", left: t, right: r, onMove: o, locked: i = !1 } = e, s = (d) => {
|
|
5907
5934
|
i || o == null || o(d);
|
|
5908
5935
|
};
|
|
@@ -5915,7 +5942,7 @@ const Jn = {
|
|
|
5915
5942
|
gap: "40px",
|
|
5916
5943
|
children: [
|
|
5917
5944
|
/* @__PURE__ */ a(
|
|
5918
|
-
|
|
5945
|
+
tt,
|
|
5919
5946
|
{
|
|
5920
5947
|
group: n,
|
|
5921
5948
|
highlightFirst: t.highlightFirst,
|
|
@@ -5928,7 +5955,7 @@ const Jn = {
|
|
|
5928
5955
|
}
|
|
5929
5956
|
),
|
|
5930
5957
|
/* @__PURE__ */ a(
|
|
5931
|
-
|
|
5958
|
+
tt,
|
|
5932
5959
|
{
|
|
5933
5960
|
group: n,
|
|
5934
5961
|
highlightFirst: r.highlightFirst,
|
|
@@ -5943,7 +5970,7 @@ const Jn = {
|
|
|
5943
5970
|
]
|
|
5944
5971
|
}
|
|
5945
5972
|
);
|
|
5946
|
-
},
|
|
5973
|
+
}, Li = w.div`
|
|
5947
5974
|
& > button {
|
|
5948
5975
|
height: 66px;
|
|
5949
5976
|
min-width: 66px;
|
|
@@ -5961,7 +5988,7 @@ const Jn = {
|
|
|
5961
5988
|
}
|
|
5962
5989
|
}
|
|
5963
5990
|
}
|
|
5964
|
-
`,
|
|
5991
|
+
`, Nl = (e) => /* @__PURE__ */ a(Li, { children: /* @__PURE__ */ a(q, { ...e }) }), Oi = w.div`
|
|
5965
5992
|
display: flex;
|
|
5966
5993
|
justify-content: space-between;
|
|
5967
5994
|
align-items: center;
|
|
@@ -5990,14 +6017,14 @@ const Jn = {
|
|
|
5990
6017
|
}
|
|
5991
6018
|
}
|
|
5992
6019
|
}
|
|
5993
|
-
`,
|
|
6020
|
+
`, kl = (e) => {
|
|
5994
6021
|
const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: i } = e;
|
|
5995
|
-
return /* @__PURE__ */ m(
|
|
6022
|
+
return /* @__PURE__ */ m(Oi, { children: [
|
|
5996
6023
|
/* @__PURE__ */ a(
|
|
5997
6024
|
q,
|
|
5998
6025
|
{
|
|
5999
6026
|
...e,
|
|
6000
|
-
iconBefore: /* @__PURE__ */ a(
|
|
6027
|
+
iconBefore: /* @__PURE__ */ a(jt, {}),
|
|
6001
6028
|
variant: "none",
|
|
6002
6029
|
onClick: n,
|
|
6003
6030
|
children: i.back,
|
|
@@ -6008,7 +6035,7 @@ const Jn = {
|
|
|
6008
6035
|
q,
|
|
6009
6036
|
{
|
|
6010
6037
|
...e,
|
|
6011
|
-
iconBefore: /* @__PURE__ */ a(
|
|
6038
|
+
iconBefore: /* @__PURE__ */ a(Ut, {}),
|
|
6012
6039
|
variant: "none",
|
|
6013
6040
|
onClick: t,
|
|
6014
6041
|
children: i.next,
|
|
@@ -6054,7 +6081,7 @@ const Jn = {
|
|
|
6054
6081
|
hover: E.palette.neutral.N30
|
|
6055
6082
|
}
|
|
6056
6083
|
}
|
|
6057
|
-
},
|
|
6084
|
+
}, Pi = w.ul`
|
|
6058
6085
|
display: flex;
|
|
6059
6086
|
flex-direction: column;
|
|
6060
6087
|
padding: 4px 0px;
|
|
@@ -6105,7 +6132,7 @@ const Jn = {
|
|
|
6105
6132
|
return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.hover) || ce.option.background.hover;
|
|
6106
6133
|
}};
|
|
6107
6134
|
}
|
|
6108
|
-
`,
|
|
6135
|
+
`, Mi = (e) => {
|
|
6109
6136
|
const { children: n, onOptionClick: t, options: r, maxItems: o } = e, i = (s) => {
|
|
6110
6137
|
try {
|
|
6111
6138
|
if (s.target.closest('input[type="checkbox"]'))
|
|
@@ -6122,7 +6149,7 @@ const Jn = {
|
|
|
6122
6149
|
}
|
|
6123
6150
|
};
|
|
6124
6151
|
return /* @__PURE__ */ a(
|
|
6125
|
-
|
|
6152
|
+
Pi,
|
|
6126
6153
|
{
|
|
6127
6154
|
$maxItems: o,
|
|
6128
6155
|
$totalOptions: r == null ? void 0 : r.length,
|
|
@@ -6130,17 +6157,17 @@ const Jn = {
|
|
|
6130
6157
|
children: n
|
|
6131
6158
|
}
|
|
6132
6159
|
);
|
|
6133
|
-
},
|
|
6160
|
+
}, zi = w.div`
|
|
6134
6161
|
cursor: ${({ $disabled: e }) => e && "not-allowed"};
|
|
6135
6162
|
width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
|
|
6136
6163
|
position: relative;
|
|
6137
|
-
`,
|
|
6164
|
+
`, Vi = w.div`
|
|
6138
6165
|
display: flex;
|
|
6139
6166
|
align-items: center;
|
|
6140
6167
|
margin-bottom: 4px;
|
|
6141
6168
|
gap: 4px;
|
|
6142
6169
|
pointer-events: ${({ $disabled: e }) => e && "none"};
|
|
6143
|
-
`,
|
|
6170
|
+
`, ji = w.div`
|
|
6144
6171
|
display: grid;
|
|
6145
6172
|
height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
|
|
6146
6173
|
padding: 8px 16px;
|
|
@@ -6164,7 +6191,7 @@ const Jn = {
|
|
|
6164
6191
|
const o = ((s = (i = r == null ? void 0 : r.input) == null ? void 0 : i.border) == null ? void 0 : s.color) || ce.border.color;
|
|
6165
6192
|
return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
|
|
6166
6193
|
}};
|
|
6167
|
-
`,
|
|
6194
|
+
`, Ui = w.input`
|
|
6168
6195
|
display: ${({ $inputWithData: e }) => e ? "none" : "block"};
|
|
6169
6196
|
outline: none;
|
|
6170
6197
|
padding: 0;
|
|
@@ -6222,31 +6249,31 @@ const Jn = {
|
|
|
6222
6249
|
&:-webkit-autofill {
|
|
6223
6250
|
-webkit-background-clip: text;
|
|
6224
6251
|
}
|
|
6225
|
-
`,
|
|
6252
|
+
`, _i = w.div`
|
|
6226
6253
|
display: flex;
|
|
6227
6254
|
justify-content: flex-end;
|
|
6228
6255
|
transition: ease;
|
|
6229
6256
|
transition-duration: 500ms;
|
|
6230
6257
|
transform: ${({ $displayList: e }) => e ? "rotate(-90deg)" : "rotate(90deg)"};
|
|
6231
|
-
`,
|
|
6232
|
-
function
|
|
6258
|
+
`, Hi = (e) => e === "compact" ? "medium" : "large";
|
|
6259
|
+
function rt(e, n) {
|
|
6233
6260
|
const t = e.find((r) => r.value === n);
|
|
6234
6261
|
return t ? t.label : n;
|
|
6235
6262
|
}
|
|
6236
|
-
const
|
|
6263
|
+
const qi = (e) => {
|
|
6237
6264
|
var o, i;
|
|
6238
|
-
const { message: n } = e, t =
|
|
6265
|
+
const { message: n } = e, t = Rn($n), r = ((i = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : i.appearance) || ce.message.appearance;
|
|
6239
6266
|
return /* @__PURE__ */ m(v, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
|
|
6240
6267
|
/* @__PURE__ */ a(
|
|
6241
6268
|
M,
|
|
6242
6269
|
{
|
|
6243
6270
|
appearance: r,
|
|
6244
|
-
icon: /* @__PURE__ */ a(
|
|
6271
|
+
icon: /* @__PURE__ */ a(Ht, {}),
|
|
6245
6272
|
size: "14px"
|
|
6246
6273
|
}
|
|
6247
6274
|
),
|
|
6248
6275
|
/* @__PURE__ */ a(
|
|
6249
|
-
|
|
6276
|
+
$,
|
|
6250
6277
|
{
|
|
6251
6278
|
type: "body",
|
|
6252
6279
|
size: "small",
|
|
@@ -6256,8 +6283,8 @@ const Hi = (e) => {
|
|
|
6256
6283
|
}
|
|
6257
6284
|
)
|
|
6258
6285
|
] });
|
|
6259
|
-
},
|
|
6260
|
-
var
|
|
6286
|
+
}, Bi = Qt((e, n) => {
|
|
6287
|
+
var Ae, ve;
|
|
6261
6288
|
const {
|
|
6262
6289
|
displayList: t,
|
|
6263
6290
|
disabled: r,
|
|
@@ -6282,55 +6309,55 @@ const Hi = (e) => {
|
|
|
6282
6309
|
onKeyUp: I,
|
|
6283
6310
|
onBlur: F,
|
|
6284
6311
|
onChange: k,
|
|
6285
|
-
onClick:
|
|
6312
|
+
onClick: _,
|
|
6286
6313
|
onFocus: ae,
|
|
6287
6314
|
onOptionClick: he,
|
|
6288
6315
|
onCheckboxChange: fe,
|
|
6289
6316
|
handleClear: pe
|
|
6290
|
-
} = e, ie =
|
|
6291
|
-
() => g.filter((
|
|
6317
|
+
} = e, ie = Rn($n), me = ((ve = (Ae = ie == null ? void 0 : ie.input) == null ? void 0 : Ae.required) == null ? void 0 : ve.appearance) || ce.required.appearance, be = f && !r, P = D || y === "" ? "" : rt(g, y), de = dt(
|
|
6318
|
+
() => g.filter((U) => S.includes(U.id)),
|
|
6292
6319
|
[g, S]
|
|
6293
|
-
), ke = (
|
|
6294
|
-
|
|
6320
|
+
), ke = (U, L) => {
|
|
6321
|
+
U.stopPropagation(), fe({
|
|
6295
6322
|
target: { checked: !1, value: L }
|
|
6296
6323
|
});
|
|
6297
6324
|
};
|
|
6298
|
-
return /* @__PURE__ */ m(
|
|
6325
|
+
return /* @__PURE__ */ m(zi, { $fullwidth: i, $disabled: r, ref: n, children: [
|
|
6299
6326
|
l && /* @__PURE__ */ m(
|
|
6300
|
-
|
|
6327
|
+
Vi,
|
|
6301
6328
|
{
|
|
6302
6329
|
$alignItems: "center",
|
|
6303
6330
|
$disabled: r,
|
|
6304
6331
|
$wrap: "wrap",
|
|
6305
6332
|
children: [
|
|
6306
6333
|
/* @__PURE__ */ a(
|
|
6307
|
-
|
|
6334
|
+
Wt,
|
|
6308
6335
|
{
|
|
6309
6336
|
htmlFor: s,
|
|
6310
6337
|
focused: o,
|
|
6311
6338
|
invalid: d,
|
|
6312
6339
|
margin: "0px 0px 0px 16px",
|
|
6313
|
-
size:
|
|
6340
|
+
size: Hi(x),
|
|
6314
6341
|
disabled: r,
|
|
6315
6342
|
children: l
|
|
6316
6343
|
}
|
|
6317
6344
|
),
|
|
6318
|
-
be && /* @__PURE__ */ a(
|
|
6345
|
+
be && /* @__PURE__ */ a($, { appearance: me, size: "small", type: "body", children: "(Requerido)" })
|
|
6319
6346
|
]
|
|
6320
6347
|
}
|
|
6321
6348
|
),
|
|
6322
6349
|
/* @__PURE__ */ m(
|
|
6323
|
-
|
|
6350
|
+
ji,
|
|
6324
6351
|
{
|
|
6325
6352
|
$disabled: r,
|
|
6326
6353
|
$focused: o,
|
|
6327
6354
|
$invalid: d,
|
|
6328
|
-
onClick: N ? void 0 :
|
|
6355
|
+
onClick: N ? void 0 : _,
|
|
6329
6356
|
$value: y,
|
|
6330
6357
|
$size: x,
|
|
6331
6358
|
children: [
|
|
6332
6359
|
/* @__PURE__ */ a(
|
|
6333
|
-
|
|
6360
|
+
Ui,
|
|
6334
6361
|
{
|
|
6335
6362
|
$inputWithData: !!y,
|
|
6336
6363
|
autoComplete: "off",
|
|
@@ -6346,8 +6373,8 @@ const Hi = (e) => {
|
|
|
6346
6373
|
readOnly: !N,
|
|
6347
6374
|
onFocus: ae,
|
|
6348
6375
|
onBlur: F,
|
|
6349
|
-
onChange: (
|
|
6350
|
-
onClick: N ?
|
|
6376
|
+
onChange: (U) => k(c, U.target.value),
|
|
6377
|
+
onClick: N ? _ : void 0,
|
|
6351
6378
|
onKeyUp: I
|
|
6352
6379
|
}
|
|
6353
6380
|
),
|
|
@@ -6359,33 +6386,33 @@ const Hi = (e) => {
|
|
|
6359
6386
|
alignItems: "center",
|
|
6360
6387
|
justifyContent: "space-between",
|
|
6361
6388
|
children: [
|
|
6362
|
-
/* @__PURE__ */ a(v, { gap: "8px", alignItems: "center", wrap: "wrap", children: C && !r && (D ? de.map((
|
|
6389
|
+
/* @__PURE__ */ a(v, { gap: "8px", alignItems: "center", wrap: "wrap", children: C && !r && (D ? de.map((U) => /* @__PURE__ */ a(
|
|
6363
6390
|
De,
|
|
6364
6391
|
{
|
|
6365
6392
|
appearance: "gray",
|
|
6366
|
-
label:
|
|
6393
|
+
label: U.label,
|
|
6367
6394
|
removable: !0,
|
|
6368
6395
|
displayIcon: !1,
|
|
6369
|
-
onClose: (L) => ke(L,
|
|
6396
|
+
onClose: (L) => ke(L, U.id)
|
|
6370
6397
|
},
|
|
6371
|
-
|
|
6398
|
+
U.id
|
|
6372
6399
|
)) : (y ?? "") !== "" && /* @__PURE__ */ a(
|
|
6373
6400
|
De,
|
|
6374
6401
|
{
|
|
6375
6402
|
appearance: "gray",
|
|
6376
|
-
label:
|
|
6403
|
+
label: rt(g, y),
|
|
6377
6404
|
removable: !0,
|
|
6378
6405
|
displayIcon: !1,
|
|
6379
|
-
onClose: (
|
|
6380
|
-
|
|
6406
|
+
onClose: (U) => {
|
|
6407
|
+
U.stopPropagation(), pe();
|
|
6381
6408
|
}
|
|
6382
6409
|
}
|
|
6383
6410
|
)) }),
|
|
6384
|
-
T && /* @__PURE__ */ a(
|
|
6411
|
+
T && /* @__PURE__ */ a(_i, { $displayList: t, children: /* @__PURE__ */ a(
|
|
6385
6412
|
M,
|
|
6386
6413
|
{
|
|
6387
6414
|
appearance: "dark",
|
|
6388
|
-
icon: /* @__PURE__ */ a(
|
|
6415
|
+
icon: /* @__PURE__ */ a(_t, {}),
|
|
6389
6416
|
spacing: "narrow",
|
|
6390
6417
|
disabled: r
|
|
6391
6418
|
}
|
|
@@ -6396,28 +6423,28 @@ const Hi = (e) => {
|
|
|
6396
6423
|
]
|
|
6397
6424
|
}
|
|
6398
6425
|
),
|
|
6399
|
-
d && /* @__PURE__ */ a(
|
|
6426
|
+
d && /* @__PURE__ */ a(qi, { message: u }),
|
|
6400
6427
|
t && !r && /* @__PURE__ */ a(
|
|
6401
|
-
|
|
6428
|
+
Mi,
|
|
6402
6429
|
{
|
|
6403
6430
|
maxItems: p,
|
|
6404
6431
|
onOptionClick: he,
|
|
6405
6432
|
options: g,
|
|
6406
|
-
children: g.map((
|
|
6407
|
-
|
|
6433
|
+
children: g.map((U) => /* @__PURE__ */ a(
|
|
6434
|
+
Xt,
|
|
6408
6435
|
{
|
|
6409
|
-
id:
|
|
6410
|
-
label:
|
|
6411
|
-
checked: S.includes(
|
|
6436
|
+
id: U.id,
|
|
6437
|
+
label: U.label,
|
|
6438
|
+
checked: S.includes(U.id),
|
|
6412
6439
|
onCheckboxChange: fe,
|
|
6413
6440
|
picker: D
|
|
6414
6441
|
},
|
|
6415
|
-
|
|
6442
|
+
U.id
|
|
6416
6443
|
))
|
|
6417
6444
|
}
|
|
6418
6445
|
)
|
|
6419
6446
|
] });
|
|
6420
|
-
}),
|
|
6447
|
+
}), Gi = (e) => {
|
|
6421
6448
|
const {
|
|
6422
6449
|
disabled: n = !1,
|
|
6423
6450
|
fullwidth: t = !1,
|
|
@@ -6442,7 +6469,7 @@ const Hi = (e) => {
|
|
|
6442
6469
|
showChevron: C = !0,
|
|
6443
6470
|
editable: I = !1,
|
|
6444
6471
|
clearable: F = !0
|
|
6445
|
-
} = e, [k,
|
|
6472
|
+
} = e, [k, _] = z(!1), [ae, he] = z(!1), [fe, pe] = z([]), ie = Ie(null);
|
|
6446
6473
|
Ee(() => {
|
|
6447
6474
|
if (N) {
|
|
6448
6475
|
const L = T ? T.split(",").map((X) => X.trim()) : [];
|
|
@@ -6450,11 +6477,11 @@ const Hi = (e) => {
|
|
|
6450
6477
|
}
|
|
6451
6478
|
}, [T, N]);
|
|
6452
6479
|
function me() {
|
|
6453
|
-
u(l, ""), pe([]),
|
|
6480
|
+
u(l, ""), pe([]), _(!1);
|
|
6454
6481
|
}
|
|
6455
6482
|
function be(L) {
|
|
6456
6483
|
if (!n) {
|
|
6457
|
-
|
|
6484
|
+
_(!k);
|
|
6458
6485
|
try {
|
|
6459
6486
|
c && c(L);
|
|
6460
6487
|
} catch (X) {
|
|
@@ -6462,8 +6489,8 @@ const Hi = (e) => {
|
|
|
6462
6489
|
}
|
|
6463
6490
|
}
|
|
6464
6491
|
}
|
|
6465
|
-
const P =
|
|
6466
|
-
ie.current && L.target && !ie.current.contains(L.target) &&
|
|
6492
|
+
const P = Zt((L) => {
|
|
6493
|
+
ie.current && L.target && !ie.current.contains(L.target) && _(!1);
|
|
6467
6494
|
}, []);
|
|
6468
6495
|
function de(L) {
|
|
6469
6496
|
try {
|
|
@@ -6473,15 +6500,15 @@ const Hi = (e) => {
|
|
|
6473
6500
|
}
|
|
6474
6501
|
}
|
|
6475
6502
|
function ke(L) {
|
|
6476
|
-
|
|
6503
|
+
_(!1);
|
|
6477
6504
|
try {
|
|
6478
6505
|
u && u(l, L);
|
|
6479
6506
|
} catch (X) {
|
|
6480
6507
|
console.error(`Error when changing value using callback. ${X}`);
|
|
6481
6508
|
}
|
|
6482
6509
|
}
|
|
6483
|
-
function
|
|
6484
|
-
L.key === "Escape" &&
|
|
6510
|
+
function Ae(L) {
|
|
6511
|
+
L.key === "Escape" && _(!1), _(!k);
|
|
6485
6512
|
try {
|
|
6486
6513
|
h && h(L);
|
|
6487
6514
|
} catch (X) {
|
|
@@ -6489,18 +6516,18 @@ const Hi = (e) => {
|
|
|
6489
6516
|
}
|
|
6490
6517
|
}
|
|
6491
6518
|
function ve(L) {
|
|
6492
|
-
const { value: X, checked:
|
|
6519
|
+
const { value: X, checked: Pn } = L.target;
|
|
6493
6520
|
pe((ze) => {
|
|
6494
|
-
const R =
|
|
6521
|
+
const R = Pn ? [...ze, X] : ze.filter((H) => H !== X);
|
|
6495
6522
|
return u(l, R.join(",")), R;
|
|
6496
6523
|
});
|
|
6497
6524
|
}
|
|
6498
6525
|
Ee(() => (document.addEventListener("click", P), () => {
|
|
6499
6526
|
document.removeEventListener("click", P);
|
|
6500
6527
|
}), [P]);
|
|
6501
|
-
const
|
|
6528
|
+
const U = dt(() => F || N ? f : [{ id: "empty-option", label: "", value: "" }, ...f], [f, F, N]);
|
|
6502
6529
|
return /* @__PURE__ */ a(
|
|
6503
|
-
|
|
6530
|
+
Bi,
|
|
6504
6531
|
{
|
|
6505
6532
|
ref: ie,
|
|
6506
6533
|
disabled: n,
|
|
@@ -6513,7 +6540,7 @@ const Hi = (e) => {
|
|
|
6513
6540
|
maxItems: s,
|
|
6514
6541
|
message: d,
|
|
6515
6542
|
name: l,
|
|
6516
|
-
options:
|
|
6543
|
+
options: U,
|
|
6517
6544
|
placeholder: x,
|
|
6518
6545
|
required: y,
|
|
6519
6546
|
size: D,
|
|
@@ -6529,11 +6556,11 @@ const Hi = (e) => {
|
|
|
6529
6556
|
onClick: be,
|
|
6530
6557
|
onFocus: de,
|
|
6531
6558
|
onOptionClick: ke,
|
|
6532
|
-
onKeyUp:
|
|
6559
|
+
onKeyUp: Ae,
|
|
6533
6560
|
onCheckboxChange: ve
|
|
6534
6561
|
}
|
|
6535
6562
|
);
|
|
6536
|
-
},
|
|
6563
|
+
}, Al = (e) => {
|
|
6537
6564
|
const {
|
|
6538
6565
|
disabled: n = !1,
|
|
6539
6566
|
fullwidth: t = !1,
|
|
@@ -6551,7 +6578,7 @@ const Hi = (e) => {
|
|
|
6551
6578
|
values: f
|
|
6552
6579
|
} = e;
|
|
6553
6580
|
return /* @__PURE__ */ a(
|
|
6554
|
-
|
|
6581
|
+
Gi,
|
|
6555
6582
|
{
|
|
6556
6583
|
disabled: n,
|
|
6557
6584
|
fullwidth: t,
|
|
@@ -6570,22 +6597,22 @@ const Hi = (e) => {
|
|
|
6570
6597
|
picker: !0
|
|
6571
6598
|
}
|
|
6572
6599
|
);
|
|
6573
|
-
},
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6600
|
+
}, $l = (e) => Object.values(e).flat(), Il = (e, n) => {
|
|
6601
|
+
const t = Be(e);
|
|
6602
|
+
return Object.fromEntries(
|
|
6603
|
+
Object.entries(t).map(([r, o]) => [r, o.map(n)])
|
|
6604
|
+
);
|
|
6605
|
+
}, Ve = /* @__PURE__ */ new Map(), Yi = (e, n) => Ve.get(`${n}:${e}`), Wi = (e, n, t) => {
|
|
6579
6606
|
const r = `${n}:${e}`;
|
|
6580
6607
|
if (Ve.set(r, t), Ve.size > 1e3) {
|
|
6581
6608
|
const o = Ve.keys().next().value;
|
|
6582
6609
|
o !== void 0 && Ve.delete(o);
|
|
6583
6610
|
}
|
|
6584
|
-
},
|
|
6585
|
-
const n = Date.now(), t =
|
|
6586
|
-
return n - t <
|
|
6587
|
-
},
|
|
6588
|
-
const n =
|
|
6611
|
+
}, ot = /* @__PURE__ */ new Map(), Xi = 1e3, Qi = (e) => {
|
|
6612
|
+
const n = Date.now(), t = ot.get(e) || 0;
|
|
6613
|
+
return n - t < Xi ? !0 : (ot.set(e, n), !1);
|
|
6614
|
+
}, Zi = (e) => {
|
|
6615
|
+
const n = er(e);
|
|
6589
6616
|
return {
|
|
6590
6617
|
spa: "es",
|
|
6591
6618
|
eng: "en",
|
|
@@ -6594,14 +6621,14 @@ const Hi = (e) => {
|
|
|
6594
6621
|
ita: "it",
|
|
6595
6622
|
por: "pt"
|
|
6596
6623
|
}[n] || "en";
|
|
6597
|
-
},
|
|
6598
|
-
const o = `${n}:${e}`, i =
|
|
6624
|
+
}, Ki = async (e, n, { url: t, apiKey: r }) => {
|
|
6625
|
+
const o = `${n}:${e}`, i = Yi(e, n);
|
|
6599
6626
|
if (i) return i;
|
|
6600
|
-
if (
|
|
6627
|
+
if (Qi(o))
|
|
6601
6628
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
6602
|
-
const s =
|
|
6629
|
+
const s = Zi(e);
|
|
6603
6630
|
try {
|
|
6604
|
-
const { data: d } = await
|
|
6631
|
+
const { data: d } = await Jt.post(
|
|
6605
6632
|
t,
|
|
6606
6633
|
{
|
|
6607
6634
|
q: e,
|
|
@@ -6615,25 +6642,25 @@ const Hi = (e) => {
|
|
|
6615
6642
|
}
|
|
6616
6643
|
}
|
|
6617
6644
|
), l = (d == null ? void 0 : d.translatedText) || e;
|
|
6618
|
-
return
|
|
6645
|
+
return Wi(e, n, l), l;
|
|
6619
6646
|
} catch (d) {
|
|
6620
6647
|
return console.warn(`[Translation] Failed for: "${e}"`, d), e;
|
|
6621
6648
|
}
|
|
6622
|
-
},
|
|
6649
|
+
}, Ji = (e) => typeof e == "string" && e.trim().length > 0, at = async (e, n, t) => {
|
|
6623
6650
|
const r = await Promise.all(
|
|
6624
6651
|
Object.entries(e).map(async ([o, i]) => {
|
|
6625
|
-
if (
|
|
6626
|
-
const s = await
|
|
6652
|
+
if (Ji(i)) {
|
|
6653
|
+
const s = await Ki(i, n, t);
|
|
6627
6654
|
return [o, s];
|
|
6628
6655
|
} else if (Array.isArray(i)) {
|
|
6629
6656
|
const s = await Promise.all(
|
|
6630
6657
|
i.map(
|
|
6631
|
-
async (d) => typeof d == "object" && d !== null ? await
|
|
6658
|
+
async (d) => typeof d == "object" && d !== null ? await at(d, n, t) : d
|
|
6632
6659
|
)
|
|
6633
6660
|
);
|
|
6634
6661
|
return [o, s];
|
|
6635
6662
|
} else if (typeof i == "object" && i !== null) {
|
|
6636
|
-
const s = await
|
|
6663
|
+
const s = await at(i, n, t);
|
|
6637
6664
|
return [o, s];
|
|
6638
6665
|
} else
|
|
6639
6666
|
return [o, i];
|
|
@@ -6642,38 +6669,38 @@ const Hi = (e) => {
|
|
|
6642
6669
|
return Object.fromEntries(r);
|
|
6643
6670
|
};
|
|
6644
6671
|
export {
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6672
|
+
kl as BackAndNextButton,
|
|
6673
|
+
Xe as BusinessRuleCard,
|
|
6674
|
+
gt as BusinessRuleCardNew,
|
|
6675
|
+
Fn as BusinessRuleView,
|
|
6676
|
+
ft as BusinessRuleViewNew,
|
|
6677
|
+
gl as BusinessRules,
|
|
6678
|
+
fl as BusinessRulesNew,
|
|
6679
|
+
hl as BusinessRulesWithGroup,
|
|
6680
|
+
Al as Checkpicker,
|
|
6681
|
+
El as DragAndDropBoxes,
|
|
6682
|
+
tt as DraggableList,
|
|
6683
|
+
ka as DropdownMenu,
|
|
6684
|
+
Sl as DropdownMenuContainer,
|
|
6658
6685
|
ge as EValueHowToSetUp,
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6686
|
+
ml as Filter,
|
|
6687
|
+
bl as FilterModal,
|
|
6688
|
+
vl as FormFilter,
|
|
6689
|
+
ut as ModalRules,
|
|
6690
|
+
Ta as RulesForm,
|
|
6691
|
+
Nl as SendButton,
|
|
6692
|
+
_o as buildEsConditionSentence,
|
|
6693
|
+
da as convertRangeToString,
|
|
6694
|
+
ht as filterByGroup,
|
|
6695
|
+
$l as flatFromGroups,
|
|
6696
|
+
yl as formatDecisionForBackend,
|
|
6697
|
+
Be as getConditionsByGroup,
|
|
6698
|
+
Il as mapByGroup,
|
|
6699
|
+
xl as parseRangeFromString,
|
|
6700
|
+
Tl as revertSortedDataSampleSwitchPlaces,
|
|
6701
|
+
wl as revertSortedDataSwitchPlaces,
|
|
6702
|
+
Cl as sortDisplayDataSampleSwitchPlaces,
|
|
6703
|
+
Dl as sortDisplayDataSwitchPlaces,
|
|
6704
|
+
at as translateObject,
|
|
6705
|
+
Ki as translateText
|
|
6679
6706
|
};
|