@isettingkit/business-rules 2.1.15 → 2.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +981 -930
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as i, jsxs as m, Fragment as
|
|
2
|
-
import { MdOutlineDelete as sn, MdClear as dn, MdAdd as We, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as wn, MdInfo as Ot, MdCached as
|
|
3
|
-
import { inube as E, Stack as y, Divider as
|
|
1
|
+
import { jsx as i, jsxs as m, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { MdOutlineDelete as sn, MdClear as dn, MdAdd as We, MdOutlineCreate as Ft, MdExpandLess as Lt, MdExpandMore as wn, MdInfo as Ot, MdCached as Mt, MdOutlineInfo as Pt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as _t, MdOutlineArrowCircleRight as Ut, MdOutlineChevronRight as jt, MdOutlineError as Ht } from "react-icons/md";
|
|
3
|
+
import { inube as E, Stack as y, Divider as G, Icon as j, Text as R, SkeletonLine as ee, useMediaQuery as re, Blanket as cn, Button as B, Grid as Xe, Toggle as un, Checkbox as An, Date as Oe, Box as qt, Tag as ke, 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
4
|
import C, { keyframes as $n, ThemeContext as In } from "styled-components";
|
|
5
|
-
import { ValueDataType as
|
|
6
|
-
import { DecisionViewConditionRenderer as
|
|
5
|
+
import { ValueDataType as q, ValueHowToSetUp as ne, DecisionConditionRender as on, DecisionConditionRenderNew as Vn } from "@isettingkit/input";
|
|
6
|
+
import { DecisionViewConditionRenderer as Re, DecisionViewConditionRendererNew as Je } from "@isettingkit/view";
|
|
7
7
|
import { createPortal as pn } from "react-dom";
|
|
8
8
|
import { useFormik as Rn } from "formik";
|
|
9
|
-
import { string as de, mixed as
|
|
10
|
-
import
|
|
11
|
-
import { Link as ct, useLocation as
|
|
9
|
+
import { string as de, mixed as Ve, object as te, number as ce, lazy as Ge, date as Me } from "yup";
|
|
10
|
+
import P, { useState as H, useRef as Fe, useEffect as $e, useContext as Fn, forwardRef as Qt, useMemo as dt, useCallback as Zt } from "react";
|
|
11
|
+
import { Link as ct, useLocation as Kt } from "react-router-dom";
|
|
12
12
|
import Jt from "axios";
|
|
13
13
|
import { franc as er } from "franc-min";
|
|
14
14
|
const nr = C.div`
|
|
@@ -50,10 +50,10 @@ const Qe = (e) => {
|
|
|
50
50
|
const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
|
|
51
51
|
return /* @__PURE__ */ i(nr, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
52
52
|
n,
|
|
53
|
-
t && /* @__PURE__ */ m(
|
|
54
|
-
/* @__PURE__ */ i(
|
|
53
|
+
t && /* @__PURE__ */ m(z, { children: [
|
|
54
|
+
/* @__PURE__ */ i(G, {}),
|
|
55
55
|
/* @__PURE__ */ i(y, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
|
|
56
|
-
|
|
56
|
+
j,
|
|
57
57
|
{
|
|
58
58
|
cursorHover: !0,
|
|
59
59
|
appearance: "danger",
|
|
@@ -81,7 +81,7 @@ const dr = {
|
|
|
81
81
|
}, He = (e) => {
|
|
82
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
|
+
}, _n = C.div`
|
|
85
85
|
& > div {
|
|
86
86
|
border-radius: 8px;
|
|
87
87
|
border: 1px solid
|
|
@@ -90,7 +90,7 @@ const dr = {
|
|
|
90
90
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
|
|
91
91
|
}};
|
|
92
92
|
}
|
|
93
|
-
`,
|
|
93
|
+
`, Un = C.div`
|
|
94
94
|
width: 100%;
|
|
95
95
|
height: 100%;
|
|
96
96
|
overflow-y: auto;
|
|
@@ -122,7 +122,7 @@ const dr = {
|
|
|
122
122
|
} = e;
|
|
123
123
|
return a ? /* @__PURE__ */ m(y, { direction: "column", gap: "12px", children: [
|
|
124
124
|
/* @__PURE__ */ i(y, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
|
|
125
|
-
|
|
125
|
+
Re,
|
|
126
126
|
{
|
|
127
127
|
element: o,
|
|
128
128
|
valueData: He(
|
|
@@ -131,8 +131,8 @@ const dr = {
|
|
|
131
131
|
type: "decision"
|
|
132
132
|
}
|
|
133
133
|
) }, t.ruleName),
|
|
134
|
-
/* @__PURE__ */ i(
|
|
135
|
-
/* @__PURE__ */ i(
|
|
134
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
135
|
+
/* @__PURE__ */ i(Un, { children: /* @__PURE__ */ m(
|
|
136
136
|
y,
|
|
137
137
|
{
|
|
138
138
|
direction: "column",
|
|
@@ -141,7 +141,7 @@ const dr = {
|
|
|
141
141
|
height: "203px",
|
|
142
142
|
children: [
|
|
143
143
|
p.length > 0 && /* @__PURE__ */ i(
|
|
144
|
-
|
|
144
|
+
R,
|
|
145
145
|
{
|
|
146
146
|
type: "label",
|
|
147
147
|
size: "large",
|
|
@@ -151,8 +151,8 @@ const dr = {
|
|
|
151
151
|
children: l.factsThatConditionIt
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
p.length > 0 && p.map((u) => /* @__PURE__ */ i(
|
|
155
|
-
|
|
154
|
+
p.length > 0 && p.map((u) => /* @__PURE__ */ i(_n, { children: /* @__PURE__ */ i(y, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
155
|
+
Re,
|
|
156
156
|
{
|
|
157
157
|
element: { ...u, value: u.value },
|
|
158
158
|
valueData: He(
|
|
@@ -160,9 +160,9 @@ const dr = {
|
|
|
160
160
|
)
|
|
161
161
|
}
|
|
162
162
|
) }) }, u.conditionName)),
|
|
163
|
-
p.length > 0 && /* @__PURE__ */ i(
|
|
164
|
-
d && /* @__PURE__ */ i(
|
|
165
|
-
|
|
163
|
+
p.length > 0 && /* @__PURE__ */ i(G, { dashed: !0 }),
|
|
164
|
+
d && /* @__PURE__ */ i(z, { children: r && /* @__PURE__ */ i(
|
|
165
|
+
Re,
|
|
166
166
|
{
|
|
167
167
|
element: r.element,
|
|
168
168
|
valueData: r.valueData,
|
|
@@ -175,21 +175,21 @@ const dr = {
|
|
|
175
175
|
) })
|
|
176
176
|
] }) : /* @__PURE__ */ m(y, { direction: "column", gap: "12px", children: [
|
|
177
177
|
/* @__PURE__ */ m(y, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
178
|
-
/* @__PURE__ */ i(
|
|
179
|
-
/* @__PURE__ */ i(
|
|
178
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "180px" }),
|
|
179
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "85px" })
|
|
180
180
|
] }, "loading"),
|
|
181
181
|
/* @__PURE__ */ m(y, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
182
|
-
/* @__PURE__ */ i(
|
|
183
|
-
/* @__PURE__ */ i(
|
|
182
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
183
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "150px" })
|
|
184
184
|
] }),
|
|
185
|
-
/* @__PURE__ */ i(
|
|
185
|
+
/* @__PURE__ */ i(Un, { children: /* @__PURE__ */ i(
|
|
186
186
|
y,
|
|
187
187
|
{
|
|
188
188
|
direction: "column",
|
|
189
189
|
gap: "12px",
|
|
190
190
|
justifyContent: "space-between",
|
|
191
191
|
height: "203px",
|
|
192
|
-
children: s.map((u, c) => /* @__PURE__ */ i(
|
|
192
|
+
children: s.map((u, c) => /* @__PURE__ */ i(_n, { children: /* @__PURE__ */ m(
|
|
193
193
|
y,
|
|
194
194
|
{
|
|
195
195
|
direction: "column",
|
|
@@ -197,8 +197,8 @@ const dr = {
|
|
|
197
197
|
alignItems: "start",
|
|
198
198
|
padding: "8px",
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */ i(
|
|
201
|
-
/* @__PURE__ */ i(
|
|
200
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "180px" }),
|
|
201
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "85px" })
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
204
|
) }, `condition-${c}`))
|
|
@@ -211,8 +211,8 @@ const dr = {
|
|
|
211
211
|
element: {
|
|
212
212
|
labelName: r == null ? void 0 : r.terms,
|
|
213
213
|
value: String(n.effectiveFrom),
|
|
214
|
-
howToSetTheDecision:
|
|
215
|
-
decisionDataType:
|
|
214
|
+
howToSetTheDecision: ne.RANGE,
|
|
215
|
+
decisionDataType: q.DATE
|
|
216
216
|
},
|
|
217
217
|
valueData: He({
|
|
218
218
|
labelName: r == null ? void 0 : r.terms,
|
|
@@ -220,21 +220,21 @@ const dr = {
|
|
|
220
220
|
from: String(n.effectiveFrom),
|
|
221
221
|
to: String(n.validUntil)
|
|
222
222
|
},
|
|
223
|
-
howToSetTheDecision:
|
|
224
|
-
decisionDataType:
|
|
223
|
+
howToSetTheDecision: ne.RANGE,
|
|
224
|
+
decisionDataType: q.DATE
|
|
225
225
|
})
|
|
226
226
|
} : o && !a ? {
|
|
227
227
|
element: {
|
|
228
228
|
labelName: r == null ? void 0 : r.terms,
|
|
229
229
|
value: String(n.effectiveFrom),
|
|
230
|
-
howToSetTheDecision:
|
|
231
|
-
decisionDataType:
|
|
230
|
+
howToSetTheDecision: ne.EQUAL,
|
|
231
|
+
decisionDataType: q.DATE
|
|
232
232
|
},
|
|
233
233
|
valueData: He({
|
|
234
234
|
labelName: r == null ? void 0 : r.terms,
|
|
235
235
|
value: String(n.effectiveFrom),
|
|
236
|
-
howToSetTheDecision:
|
|
237
|
-
decisionDataType:
|
|
236
|
+
howToSetTheDecision: ne.EQUAL,
|
|
237
|
+
decisionDataType: q.DATE
|
|
238
238
|
})
|
|
239
239
|
} : null, d = n ? {
|
|
240
240
|
labelName: n.labelName || "",
|
|
@@ -300,11 +300,11 @@ const dr = {
|
|
|
300
300
|
throw new Error(
|
|
301
301
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
302
302
|
);
|
|
303
|
-
const s =
|
|
303
|
+
const s = re("(max-width: 400px)");
|
|
304
304
|
return pn(
|
|
305
305
|
/* @__PURE__ */ i(ur, { smallScreen: s, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(pr, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
306
306
|
/* @__PURE__ */ i(y, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(y, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
|
-
/* @__PURE__ */ i(
|
|
307
|
+
/* @__PURE__ */ i(R, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
308
308
|
/* @__PURE__ */ i(dn, { size: "24px", cursor: "pointer", onClick: r })
|
|
309
309
|
] }) }),
|
|
310
310
|
n
|
|
@@ -358,7 +358,7 @@ const pt = C.div`
|
|
|
358
358
|
height: 100%;
|
|
359
359
|
padding-bottom: 12px;
|
|
360
360
|
cursor: pointer;
|
|
361
|
-
`,
|
|
361
|
+
`, Ze = C.div`
|
|
362
362
|
width: 100%;
|
|
363
363
|
height: 100%;
|
|
364
364
|
& > div {
|
|
@@ -405,8 +405,8 @@ const pt = C.div`
|
|
|
405
405
|
);
|
|
406
406
|
}, br = (e) => {
|
|
407
407
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: a } = e;
|
|
408
|
-
return n ? /* @__PURE__ */ i(
|
|
409
|
-
/* @__PURE__ */ i(
|
|
408
|
+
return n ? /* @__PURE__ */ i(Ze, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
409
|
+
/* @__PURE__ */ i(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
410
410
|
/* @__PURE__ */ i(
|
|
411
411
|
Qe,
|
|
412
412
|
{
|
|
@@ -425,8 +425,8 @@ const pt = C.div`
|
|
|
425
425
|
handleOpenModal: r,
|
|
426
426
|
shouldRenderEmptyMessage: o
|
|
427
427
|
} = e, a = n || "Agregar decisión";
|
|
428
|
-
return /* @__PURE__ */ i(
|
|
429
|
-
/* @__PURE__ */ i(
|
|
428
|
+
return /* @__PURE__ */ i(Ze, { children: o ? null : /* @__PURE__ */ m(y, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
429
|
+
/* @__PURE__ */ i(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
430
430
|
/* @__PURE__ */ i(
|
|
431
431
|
pt,
|
|
432
432
|
{
|
|
@@ -440,8 +440,8 @@ const pt = C.div`
|
|
|
440
440
|
handleView: () => r ? r() : null,
|
|
441
441
|
controls: !1,
|
|
442
442
|
children: /* @__PURE__ */ m(y, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
443
|
-
/* @__PURE__ */ i(
|
|
444
|
-
/* @__PURE__ */ i(
|
|
443
|
+
/* @__PURE__ */ i(j, { appearance: "gray", icon: /* @__PURE__ */ i(We, {}), size: "35px" }),
|
|
444
|
+
/* @__PURE__ */ i(R, { appearance: "gray", type: "body", size: "large", children: a })
|
|
445
445
|
] })
|
|
446
446
|
}
|
|
447
447
|
)
|
|
@@ -488,7 +488,7 @@ const pt = C.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
|
+
}, ml = (e) => {
|
|
492
492
|
const {
|
|
493
493
|
controls: n = !0,
|
|
494
494
|
customTitleContentAddCard: t,
|
|
@@ -504,7 +504,7 @@ const pt = C.div`
|
|
|
504
504
|
handleSubmitForm: g,
|
|
505
505
|
handleDelete: f,
|
|
506
506
|
terms: h = !0
|
|
507
|
-
} = e, x =
|
|
507
|
+
} = e, x = re("(max-width: 681px)"), b = re("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = xr({
|
|
508
508
|
controls: n,
|
|
509
509
|
customTitleContentAddCard: t,
|
|
510
510
|
decisions: o,
|
|
@@ -513,7 +513,7 @@ const pt = C.div`
|
|
|
513
513
|
handleDelete: f,
|
|
514
514
|
textValues: a
|
|
515
515
|
}), S = (o == null ? void 0 : o.length) === 0 && !p;
|
|
516
|
-
return /* @__PURE__ */ m(
|
|
516
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
517
517
|
/* @__PURE__ */ i(hr, { children: /* @__PURE__ */ i(fr, { children: /* @__PURE__ */ i(y, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
|
|
518
518
|
y,
|
|
519
519
|
{
|
|
@@ -524,10 +524,10 @@ const pt = C.div`
|
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ i(
|
|
527
|
+
/* @__PURE__ */ i(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(z, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
529
|
/* @__PURE__ */ m(
|
|
530
|
-
|
|
530
|
+
R,
|
|
531
531
|
{
|
|
532
532
|
as: "span",
|
|
533
533
|
type: "label",
|
|
@@ -544,7 +544,7 @@ const pt = C.div`
|
|
|
544
544
|
"para empezar."
|
|
545
545
|
] }) }),
|
|
546
546
|
/* @__PURE__ */ i(
|
|
547
|
-
|
|
547
|
+
B,
|
|
548
548
|
{
|
|
549
549
|
iconBefore: /* @__PURE__ */ i(We, {}),
|
|
550
550
|
onClick: () => u ? u() : null,
|
|
@@ -590,7 +590,7 @@ const pt = C.div`
|
|
|
590
590
|
onCloseModal: c,
|
|
591
591
|
title: l ? "Editar Decisión" : "Nueva decisión",
|
|
592
592
|
children: /* @__PURE__ */ i(
|
|
593
|
-
|
|
593
|
+
Ca,
|
|
594
594
|
{
|
|
595
595
|
decision: l || s,
|
|
596
596
|
onSubmitEvent: g,
|
|
@@ -644,11 +644,11 @@ const pt = C.div`
|
|
|
644
644
|
throw new Error(
|
|
645
645
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
646
646
|
);
|
|
647
|
-
const s =
|
|
647
|
+
const s = re("(max-width: 400px)");
|
|
648
648
|
return pn(
|
|
649
649
|
/* @__PURE__ */ i(Tr, { $smallScreen: s, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(wr, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
650
650
|
/* @__PURE__ */ i(y, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(y, { alignItems: "center", justifyContent: "space-between", children: [
|
|
651
|
-
/* @__PURE__ */ i(
|
|
651
|
+
/* @__PURE__ */ i(R, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
652
652
|
/* @__PURE__ */ i(dn, { size: "24px", cursor: "pointer", onClick: r })
|
|
653
653
|
] }) }),
|
|
654
654
|
n
|
|
@@ -762,7 +762,7 @@ const Sr = C.div`
|
|
|
762
762
|
}, qe = (e) => {
|
|
763
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
|
+
}, jn = C.div`
|
|
766
766
|
& > div {
|
|
767
767
|
border-radius: 8px;
|
|
768
768
|
border: 1px solid
|
|
@@ -789,7 +789,7 @@ const Sr = C.div`
|
|
|
789
789
|
background-color: #ebecf0;
|
|
790
790
|
border-radius: 8px;
|
|
791
791
|
}
|
|
792
|
-
`,
|
|
792
|
+
`, Mr = (e) => {
|
|
793
793
|
const {
|
|
794
794
|
conditionsAlignment: n,
|
|
795
795
|
decision: t,
|
|
@@ -803,7 +803,7 @@ const Sr = C.div`
|
|
|
803
803
|
} = e;
|
|
804
804
|
return a ? /* @__PURE__ */ m(y, { direction: "column", gap: "12px", children: [
|
|
805
805
|
/* @__PURE__ */ i(y, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
|
|
806
|
-
|
|
806
|
+
Re,
|
|
807
807
|
{
|
|
808
808
|
element: o,
|
|
809
809
|
valueData: qe(
|
|
@@ -812,7 +812,7 @@ const Sr = C.div`
|
|
|
812
812
|
type: "decision"
|
|
813
813
|
}
|
|
814
814
|
) }, t.ruleName),
|
|
815
|
-
/* @__PURE__ */ i(
|
|
815
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
816
816
|
/* @__PURE__ */ i(Hn, { children: /* @__PURE__ */ m(
|
|
817
817
|
y,
|
|
818
818
|
{
|
|
@@ -822,7 +822,7 @@ const Sr = C.div`
|
|
|
822
822
|
height: "203px",
|
|
823
823
|
children: [
|
|
824
824
|
p.length > 0 && /* @__PURE__ */ i(
|
|
825
|
-
|
|
825
|
+
R,
|
|
826
826
|
{
|
|
827
827
|
type: "label",
|
|
828
828
|
size: "large",
|
|
@@ -832,8 +832,8 @@ const Sr = C.div`
|
|
|
832
832
|
children: l.factsThatConditionIt
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
|
-
p.length > 0 && p.map((u) => /* @__PURE__ */ i(
|
|
836
|
-
|
|
835
|
+
p.length > 0 && p.map((u) => /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ i(y, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
836
|
+
Re,
|
|
837
837
|
{
|
|
838
838
|
element: { ...u, value: u.value },
|
|
839
839
|
valueData: qe(
|
|
@@ -841,9 +841,9 @@ const Sr = C.div`
|
|
|
841
841
|
)
|
|
842
842
|
}
|
|
843
843
|
) }) }, u.conditionName)),
|
|
844
|
-
p.length > 0 && /* @__PURE__ */ i(
|
|
845
|
-
d && /* @__PURE__ */ i(
|
|
846
|
-
|
|
844
|
+
p.length > 0 && /* @__PURE__ */ i(G, { dashed: !0 }),
|
|
845
|
+
d && /* @__PURE__ */ i(z, { children: r && /* @__PURE__ */ i(
|
|
846
|
+
Re,
|
|
847
847
|
{
|
|
848
848
|
element: r.element,
|
|
849
849
|
valueData: r.valueData,
|
|
@@ -856,12 +856,12 @@ const Sr = C.div`
|
|
|
856
856
|
) })
|
|
857
857
|
] }) : /* @__PURE__ */ m(y, { direction: "column", gap: "12px", children: [
|
|
858
858
|
/* @__PURE__ */ m(y, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
859
|
-
/* @__PURE__ */ i(
|
|
860
|
-
/* @__PURE__ */ i(
|
|
859
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "180px" }),
|
|
860
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "85px" })
|
|
861
861
|
] }, "loading"),
|
|
862
862
|
/* @__PURE__ */ m(y, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
863
|
-
/* @__PURE__ */ i(
|
|
864
|
-
/* @__PURE__ */ i(
|
|
863
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
864
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "150px" })
|
|
865
865
|
] }),
|
|
866
866
|
/* @__PURE__ */ i(Hn, { children: /* @__PURE__ */ i(
|
|
867
867
|
y,
|
|
@@ -870,7 +870,7 @@ const Sr = C.div`
|
|
|
870
870
|
gap: "12px",
|
|
871
871
|
justifyContent: "space-between",
|
|
872
872
|
height: "203px",
|
|
873
|
-
children: s.map((u, c) => /* @__PURE__ */ i(
|
|
873
|
+
children: s.map((u, c) => /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ m(
|
|
874
874
|
y,
|
|
875
875
|
{
|
|
876
876
|
direction: "column",
|
|
@@ -878,24 +878,24 @@ const Sr = C.div`
|
|
|
878
878
|
alignItems: "start",
|
|
879
879
|
padding: "8px",
|
|
880
880
|
children: [
|
|
881
|
-
/* @__PURE__ */ i(
|
|
882
|
-
/* @__PURE__ */ i(
|
|
881
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "180px" }),
|
|
882
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "85px" })
|
|
883
883
|
]
|
|
884
884
|
}
|
|
885
885
|
) }, `condition-${c}`))
|
|
886
886
|
}
|
|
887
887
|
) })
|
|
888
888
|
] });
|
|
889
|
-
},
|
|
889
|
+
}, Pr = (e) => Array.isArray(e) ? e[0] : e ?? null, zr = (e) => {
|
|
890
890
|
var n;
|
|
891
|
-
return ((n =
|
|
891
|
+
return ((n = Pr(e == null ? void 0 : e.conditionGroups)) == null ? void 0 : n.conditionsThatEstablishesTheDecision) ?? [];
|
|
892
892
|
}, Vr = (e) => {
|
|
893
893
|
const { decision: n, loading: t = !1, textValues: r } = e, o = !!(n != null && n.effectiveFrom), a = !!(n != null && n.validUntil), s = o && a ? {
|
|
894
894
|
element: {
|
|
895
895
|
labelName: r == null ? void 0 : r.terms,
|
|
896
896
|
value: String(n.effectiveFrom),
|
|
897
|
-
howToSetTheDecision:
|
|
898
|
-
decisionDataType:
|
|
897
|
+
howToSetTheDecision: ne.RANGE,
|
|
898
|
+
decisionDataType: q.DATE
|
|
899
899
|
},
|
|
900
900
|
valueData: qe({
|
|
901
901
|
labelName: r == null ? void 0 : r.terms,
|
|
@@ -903,21 +903,21 @@ const Sr = C.div`
|
|
|
903
903
|
from: String(n.effectiveFrom),
|
|
904
904
|
to: String(n.validUntil)
|
|
905
905
|
},
|
|
906
|
-
howToSetTheDecision:
|
|
907
|
-
decisionDataType:
|
|
906
|
+
howToSetTheDecision: ne.RANGE,
|
|
907
|
+
decisionDataType: q.DATE
|
|
908
908
|
})
|
|
909
909
|
} : o && !a ? {
|
|
910
910
|
element: {
|
|
911
911
|
labelName: r == null ? void 0 : r.terms,
|
|
912
912
|
value: String(n.effectiveFrom),
|
|
913
|
-
howToSetTheDecision:
|
|
914
|
-
decisionDataType:
|
|
913
|
+
howToSetTheDecision: ne.EQUAL,
|
|
914
|
+
decisionDataType: q.DATE
|
|
915
915
|
},
|
|
916
916
|
valueData: qe({
|
|
917
917
|
labelName: r == null ? void 0 : r.terms,
|
|
918
918
|
value: String(n.effectiveFrom),
|
|
919
|
-
howToSetTheDecision:
|
|
920
|
-
decisionDataType:
|
|
919
|
+
howToSetTheDecision: ne.EQUAL,
|
|
920
|
+
decisionDataType: q.DATE
|
|
921
921
|
})
|
|
922
922
|
} : null, d = n ? {
|
|
923
923
|
labelName: n.labelName || "",
|
|
@@ -926,7 +926,7 @@ const Sr = C.div`
|
|
|
926
926
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
927
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__ */ i(
|
|
929
|
-
|
|
929
|
+
Mr,
|
|
930
930
|
{
|
|
931
931
|
conditionsAlignment: c,
|
|
932
932
|
decision: n,
|
|
@@ -939,7 +939,7 @@ const Sr = C.div`
|
|
|
939
939
|
visibleConditions: l
|
|
940
940
|
}
|
|
941
941
|
);
|
|
942
|
-
},
|
|
942
|
+
}, _r = C.div`
|
|
943
943
|
border-radius: 8px;
|
|
944
944
|
border: 1px solid
|
|
945
945
|
${({ theme: e }) => {
|
|
@@ -974,14 +974,14 @@ C.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__ */ i(
|
|
979
|
+
return /* @__PURE__ */ i(_r, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
980
980
|
n,
|
|
981
|
-
t && /* @__PURE__ */ m(
|
|
982
|
-
/* @__PURE__ */ i(
|
|
981
|
+
t && /* @__PURE__ */ m(z, { children: [
|
|
982
|
+
/* @__PURE__ */ i(G, {}),
|
|
983
983
|
/* @__PURE__ */ i(y, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
|
|
984
|
-
|
|
984
|
+
j,
|
|
985
985
|
{
|
|
986
986
|
cursorHover: !0,
|
|
987
987
|
appearance: "danger",
|
|
@@ -994,12 +994,12 @@ const _r = (e) => {
|
|
|
994
994
|
) })
|
|
995
995
|
] })
|
|
996
996
|
] }) });
|
|
997
|
-
},
|
|
997
|
+
}, jr = (e) => {
|
|
998
998
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: a } = e;
|
|
999
|
-
return n ? /* @__PURE__ */ i(
|
|
1000
|
-
/* @__PURE__ */ i(
|
|
999
|
+
return n ? /* @__PURE__ */ i(Ze, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
1000
|
+
/* @__PURE__ */ i(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
1001
1001
|
/* @__PURE__ */ i(
|
|
1002
|
-
|
|
1002
|
+
Ur,
|
|
1003
1003
|
{
|
|
1004
1004
|
id: n.decisionId,
|
|
1005
1005
|
handleDelete: () => o ? o(n.decisionId) : null,
|
|
@@ -1022,8 +1022,8 @@ const _r = (e) => {
|
|
|
1022
1022
|
handleOpenModal: r,
|
|
1023
1023
|
shouldRenderEmptyMessage: o
|
|
1024
1024
|
} = e, a = n || "Agregar decisión";
|
|
1025
|
-
return /* @__PURE__ */ i(
|
|
1026
|
-
/* @__PURE__ */ i(
|
|
1025
|
+
return /* @__PURE__ */ i(Ze, { children: o ? null : /* @__PURE__ */ m(y, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
1026
|
+
/* @__PURE__ */ i(R, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
1027
1027
|
/* @__PURE__ */ i(
|
|
1028
1028
|
pt,
|
|
1029
1029
|
{
|
|
@@ -1037,8 +1037,8 @@ const _r = (e) => {
|
|
|
1037
1037
|
handleView: () => r ? r() : null,
|
|
1038
1038
|
controls: !1,
|
|
1039
1039
|
children: /* @__PURE__ */ m(y, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
1040
|
-
/* @__PURE__ */ i(
|
|
1041
|
-
/* @__PURE__ */ i(
|
|
1040
|
+
/* @__PURE__ */ i(j, { appearance: "gray", icon: /* @__PURE__ */ i(We, {}), size: "35px" }),
|
|
1041
|
+
/* @__PURE__ */ i(R, { appearance: "gray", type: "body", size: "large", children: a })
|
|
1042
1042
|
] })
|
|
1043
1043
|
}
|
|
1044
1044
|
)
|
|
@@ -1047,7 +1047,7 @@ const _r = (e) => {
|
|
|
1047
1047
|
] }) }, `add-decision-${t}`);
|
|
1048
1048
|
}, qr = {
|
|
1049
1049
|
loading: Nr,
|
|
1050
|
-
decision:
|
|
1050
|
+
decision: jr,
|
|
1051
1051
|
add: Hr
|
|
1052
1052
|
}, Dn = (e) => {
|
|
1053
1053
|
const { type: n } = e, t = qr[n];
|
|
@@ -1060,7 +1060,7 @@ const _r = (e) => {
|
|
|
1060
1060
|
),
|
|
1061
1061
|
value: e
|
|
1062
1062
|
}), Gr = (e) => ({
|
|
1063
|
-
schema:
|
|
1063
|
+
schema: Ve().test(
|
|
1064
1064
|
"isArrayOrString",
|
|
1065
1065
|
"Debe ser un array de strings/numbers o un solo string",
|
|
1066
1066
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -1069,7 +1069,7 @@ const _r = (e) => {
|
|
|
1069
1069
|
),
|
|
1070
1070
|
value: e
|
|
1071
1071
|
}), Yr = (e) => ({
|
|
1072
|
-
schema:
|
|
1072
|
+
schema: Ve().test(
|
|
1073
1073
|
"isArrayOrString",
|
|
1074
1074
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
1075
1075
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -1080,7 +1080,7 @@ const _r = (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
|
-
schema:
|
|
1083
|
+
schema: te({
|
|
1084
1084
|
from: ce().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
|
|
1085
1085
|
to: ce().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
|
|
1086
1086
|
"is-greater",
|
|
@@ -1093,7 +1093,7 @@ const _r = (e) => {
|
|
|
1093
1093
|
}),
|
|
1094
1094
|
value: { from: n, to: t }
|
|
1095
1095
|
};
|
|
1096
|
-
}, bn = (e, n) => n ===
|
|
1096
|
+
}, bn = (e, n) => n === q.PERCENTAGE ? {
|
|
1097
1097
|
schema: ce().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
|
} : {
|
|
@@ -1108,7 +1108,7 @@ const _r = (e) => {
|
|
|
1108
1108
|
[A.EQUAL]: bn
|
|
1109
1109
|
}, Qr = (e) => Xr[e] || Br;
|
|
1110
1110
|
var On = /* @__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))(On || {});
|
|
1111
|
-
const tn = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0),
|
|
1111
|
+
const tn = (e) => e != null && (typeof e != "string" || e.trim() !== "") && (!Array.isArray(e) || e.length > 0), Zr = (e, n) => {
|
|
1112
1112
|
var d;
|
|
1113
1113
|
const t = Object.entries((e == null ? void 0 : e.conditionsThatEstablishesTheDecision) ?? {}).filter(([, l]) => tn(l)).map(([l, p]) => ({ conditionName: l, value: p }));
|
|
1114
1114
|
let r = [];
|
|
@@ -1127,7 +1127,7 @@ const tn = (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
|
|
@@ -1135,7 +1135,7 @@ function Zr({
|
|
|
1135
1135
|
var c, g;
|
|
1136
1136
|
const r = ((c = e.conditionGroups[0]) == null ? void 0 : c.conditionsThatEstablishesTheDecision) ?? [], o = r.reduce((f, h) => (tn(h.value) && (f[h.conditionName] = h.value), f), {}), a = Object.keys(o).length > 0, s = {
|
|
1137
1137
|
ruleName: e.ruleName || "",
|
|
1138
|
-
decisionDataType: e.decisionDataType ||
|
|
1138
|
+
decisionDataType: e.decisionDataType || q.ALPHABETICAL,
|
|
1139
1139
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
1140
1140
|
value: e.value ?? "",
|
|
1141
1141
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -1158,9 +1158,9 @@ function Zr({
|
|
|
1158
1158
|
d.values.value,
|
|
1159
1159
|
d.values.decisionDataType
|
|
1160
1160
|
).schema),
|
|
1161
|
-
conditionsThatEstablishesTheDecision:
|
|
1161
|
+
conditionsThatEstablishesTheDecision: te().shape({})
|
|
1162
1162
|
};
|
|
1163
|
-
t.terms && (l.effectiveFrom =
|
|
1163
|
+
t.terms && (l.effectiveFrom = Me().required("La fecha de inicio es requerida"), l.validUntil = Me().when(
|
|
1164
1164
|
"checkClosed",
|
|
1165
1165
|
(f, h, { parent: x }) => (x == null ? void 0 : x.checkClosed) ? h.required("La fecha de finalización es requerida").test(
|
|
1166
1166
|
"is-after-startDate",
|
|
@@ -1171,14 +1171,14 @@ function Zr({
|
|
|
1171
1171
|
}
|
|
1172
1172
|
) : h.notRequired()
|
|
1173
1173
|
));
|
|
1174
|
-
const p =
|
|
1174
|
+
const p = te(l);
|
|
1175
1175
|
return d = Rn({
|
|
1176
1176
|
initialValues: s,
|
|
1177
1177
|
validationSchema: p,
|
|
1178
1178
|
validateOnBlur: !0,
|
|
1179
1179
|
onSubmit: (f) => {
|
|
1180
1180
|
var D;
|
|
1181
|
-
const h = ((D = e.conditionGroups) == null ? void 0 : D.ConditionGroupId) ?? "group-primary", x = f.toggleNone ? [] :
|
|
1181
|
+
const h = ((D = e.conditionGroups) == null ? void 0 : D.ConditionGroupId) ?? "group-primary", x = f.toggleNone ? [] : Zr(f, r), b = {
|
|
1182
1182
|
...e,
|
|
1183
1183
|
ruleName: f.ruleName,
|
|
1184
1184
|
decisionDataType: f.decisionDataType,
|
|
@@ -1245,8 +1245,8 @@ const Jr = C.div`
|
|
|
1245
1245
|
labelToggle: a,
|
|
1246
1246
|
name: s,
|
|
1247
1247
|
valueToggle: d = ""
|
|
1248
|
-
} = e, [l, p] =
|
|
1249
|
-
return /* @__PURE__ */ m(
|
|
1248
|
+
} = e, [l, p] = H(n);
|
|
1249
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
1250
1250
|
/* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(
|
|
1251
1251
|
un,
|
|
1252
1252
|
{
|
|
@@ -1258,10 +1258,10 @@ const Jr = C.div`
|
|
|
1258
1258
|
},
|
|
1259
1259
|
size: "small",
|
|
1260
1260
|
value: d,
|
|
1261
|
-
children: /* @__PURE__ */ i(
|
|
1261
|
+
children: /* @__PURE__ */ i(R, { size: "medium", type: "label", weight: "bold", as: "span", children: a })
|
|
1262
1262
|
}
|
|
1263
1263
|
) }),
|
|
1264
|
-
l && /* @__PURE__ */ i(
|
|
1264
|
+
l && /* @__PURE__ */ i(z, { children: t })
|
|
1265
1265
|
] });
|
|
1266
1266
|
}, to = (e) => {
|
|
1267
1267
|
const {
|
|
@@ -1278,17 +1278,17 @@ const Jr = C.div`
|
|
|
1278
1278
|
messageEnd: c = "",
|
|
1279
1279
|
statusStart: g = "pending",
|
|
1280
1280
|
statusEnd: f = "pending"
|
|
1281
|
-
} = e, [h, x] =
|
|
1282
|
-
x(
|
|
1283
|
-
}, w = (
|
|
1284
|
-
D(
|
|
1285
|
-
},
|
|
1286
|
-
S(
|
|
1287
|
-
},
|
|
1288
|
-
return /* @__PURE__ */ m(
|
|
1281
|
+
} = e, [h, x] = H(s), [b, D] = H(l), [T, S] = H(p), N = ({ target: $ }) => {
|
|
1282
|
+
x($.checked), r && r($.checked);
|
|
1283
|
+
}, w = ($) => {
|
|
1284
|
+
D($.target.value), n($);
|
|
1285
|
+
}, F = ($) => {
|
|
1286
|
+
S($.target.value), t($);
|
|
1287
|
+
}, O = re("(max-width: 400px)");
|
|
1288
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
1289
1289
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
1290
1290
|
/* @__PURE__ */ i(
|
|
1291
|
-
|
|
1291
|
+
R,
|
|
1292
1292
|
{
|
|
1293
1293
|
appearance: "gray",
|
|
1294
1294
|
margin: "10px 0",
|
|
@@ -1320,12 +1320,12 @@ const Jr = C.div`
|
|
|
1320
1320
|
/* @__PURE__ */ m(
|
|
1321
1321
|
y,
|
|
1322
1322
|
{
|
|
1323
|
-
direction:
|
|
1323
|
+
direction: O ? "column" : "row",
|
|
1324
1324
|
justifyContent: "space-between",
|
|
1325
1325
|
gap: "24px",
|
|
1326
1326
|
children: [
|
|
1327
1327
|
/* @__PURE__ */ i(
|
|
1328
|
-
|
|
1328
|
+
Oe,
|
|
1329
1329
|
{
|
|
1330
1330
|
id: "dateStart",
|
|
1331
1331
|
label: o,
|
|
@@ -1338,11 +1338,11 @@ const Jr = C.div`
|
|
|
1338
1338
|
}
|
|
1339
1339
|
),
|
|
1340
1340
|
h && /* @__PURE__ */ i(
|
|
1341
|
-
|
|
1341
|
+
Oe,
|
|
1342
1342
|
{
|
|
1343
1343
|
id: "dateEnd",
|
|
1344
1344
|
label: a,
|
|
1345
|
-
onChange:
|
|
1345
|
+
onChange: F,
|
|
1346
1346
|
value: T,
|
|
1347
1347
|
required: d,
|
|
1348
1348
|
size: "compact",
|
|
@@ -1373,7 +1373,7 @@ const Jr = C.div`
|
|
|
1373
1373
|
formik: n,
|
|
1374
1374
|
isDecision: !0
|
|
1375
1375
|
}),
|
|
1376
|
-
/* @__PURE__ */ i(
|
|
1376
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
1377
1377
|
/* @__PURE__ */ i(Jr, { children: /* @__PURE__ */ i(eo, { children: /* @__PURE__ */ m(
|
|
1378
1378
|
y,
|
|
1379
1379
|
{
|
|
@@ -1389,7 +1389,7 @@ const Jr = C.div`
|
|
|
1389
1389
|
alignItems: "center",
|
|
1390
1390
|
gap: "64px",
|
|
1391
1391
|
children: [
|
|
1392
|
-
/* @__PURE__ */ i(
|
|
1392
|
+
/* @__PURE__ */ i(R, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
1393
1393
|
/* @__PURE__ */ i(
|
|
1394
1394
|
un,
|
|
1395
1395
|
{
|
|
@@ -1397,7 +1397,7 @@ const Jr = C.div`
|
|
|
1397
1397
|
onChange: () => s(!n.values.toggleNone),
|
|
1398
1398
|
checked: n.values.toggleNone,
|
|
1399
1399
|
size: "small",
|
|
1400
|
-
children: /* @__PURE__ */ i(
|
|
1400
|
+
children: /* @__PURE__ */ i(R, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
1401
1401
|
}
|
|
1402
1402
|
)
|
|
1403
1403
|
]
|
|
@@ -1424,8 +1424,8 @@ const Jr = C.div`
|
|
|
1424
1424
|
]
|
|
1425
1425
|
}
|
|
1426
1426
|
) }) }),
|
|
1427
|
-
t.terms && /* @__PURE__ */ m(
|
|
1428
|
-
/* @__PURE__ */ i(
|
|
1427
|
+
t.terms && /* @__PURE__ */ m(z, { children: [
|
|
1428
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
1429
1429
|
/* @__PURE__ */ i(
|
|
1430
1430
|
to,
|
|
1431
1431
|
{
|
|
@@ -1446,16 +1446,16 @@ const Jr = C.div`
|
|
|
1446
1446
|
}
|
|
1447
1447
|
)
|
|
1448
1448
|
] }),
|
|
1449
|
-
/* @__PURE__ */ i(
|
|
1450
|
-
l && /* @__PURE__ */ i(
|
|
1449
|
+
/* @__PURE__ */ i(G, {}),
|
|
1450
|
+
l && /* @__PURE__ */ i(R, { 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(y, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
1452
|
-
/* @__PURE__ */ i(
|
|
1453
|
-
/* @__PURE__ */ i(
|
|
1452
|
+
/* @__PURE__ */ i(B, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
1453
|
+
/* @__PURE__ */ i(B, { type: "submit", children: t.confirm })
|
|
1454
1454
|
] })
|
|
1455
1455
|
] }) });
|
|
1456
1456
|
}, oo = (e) => {
|
|
1457
1457
|
var f, h;
|
|
1458
|
-
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } =
|
|
1458
|
+
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } = Kr({
|
|
1459
1459
|
decision: n,
|
|
1460
1460
|
onSubmitEvent: t,
|
|
1461
1461
|
textValues: r
|
|
@@ -1534,7 +1534,7 @@ const Jr = C.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
|
+
}, bl = (e) => {
|
|
1538
1538
|
const {
|
|
1539
1539
|
controls: n = !0,
|
|
1540
1540
|
customTitleContentAddCard: t,
|
|
@@ -1550,7 +1550,7 @@ const Jr = C.div`
|
|
|
1550
1550
|
handleSubmitForm: g,
|
|
1551
1551
|
handleDelete: f,
|
|
1552
1552
|
terms: h = !0
|
|
1553
|
-
} = e, x =
|
|
1553
|
+
} = e, x = re("(max-width: 681px)"), b = re("(max-width: 400px)"), { renderedCards: D, shouldRenderAddCard: T } = ao({
|
|
1554
1554
|
controls: n,
|
|
1555
1555
|
customTitleContentAddCard: t,
|
|
1556
1556
|
decisions: o,
|
|
@@ -1559,7 +1559,7 @@ const Jr = C.div`
|
|
|
1559
1559
|
handleDelete: f,
|
|
1560
1560
|
textValues: a
|
|
1561
1561
|
}), S = (o == null ? void 0 : o.length) === 0 && !p;
|
|
1562
|
-
return /* @__PURE__ */ m(
|
|
1562
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
1563
1563
|
/* @__PURE__ */ i(Sr, { children: /* @__PURE__ */ i(Er, { children: /* @__PURE__ */ i(y, { direction: "column", gap: "16px", padding: "6px", children: S ? /* @__PURE__ */ m(
|
|
1564
1564
|
y,
|
|
1565
1565
|
{
|
|
@@ -1570,10 +1570,10 @@ const Jr = C.div`
|
|
|
1570
1570
|
justifyContent: "center",
|
|
1571
1571
|
alignItems: "center",
|
|
1572
1572
|
children: [
|
|
1573
|
-
/* @__PURE__ */ i(
|
|
1573
|
+
/* @__PURE__ */ i(R, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ m(z, { children: [
|
|
1574
1574
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1575
1575
|
/* @__PURE__ */ m(
|
|
1576
|
-
|
|
1576
|
+
R,
|
|
1577
1577
|
{
|
|
1578
1578
|
as: "span",
|
|
1579
1579
|
type: "label",
|
|
@@ -1590,7 +1590,7 @@ const Jr = C.div`
|
|
|
1590
1590
|
"para empezar."
|
|
1591
1591
|
] }) }),
|
|
1592
1592
|
/* @__PURE__ */ i(
|
|
1593
|
-
|
|
1593
|
+
B,
|
|
1594
1594
|
{
|
|
1595
1595
|
iconBefore: /* @__PURE__ */ i(We, {}),
|
|
1596
1596
|
onClick: () => u ? u() : null,
|
|
@@ -1702,7 +1702,7 @@ const Jr = C.div`
|
|
|
1702
1702
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
1703
1703
|
box-sizing: ${({ $boxSizing: e }) => e};
|
|
1704
1704
|
overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
|
|
1705
|
-
`,
|
|
1705
|
+
`, ie = P.forwardRef(
|
|
1706
1706
|
(e, n) => {
|
|
1707
1707
|
const {
|
|
1708
1708
|
children: t,
|
|
@@ -1746,7 +1746,7 @@ const Jr = C.div`
|
|
|
1746
1746
|
);
|
|
1747
1747
|
}
|
|
1748
1748
|
);
|
|
1749
|
-
|
|
1749
|
+
ie.displayName = "BorderStack";
|
|
1750
1750
|
C.div`
|
|
1751
1751
|
& > div {
|
|
1752
1752
|
border-radius: 8px;
|
|
@@ -1821,7 +1821,7 @@ const yo = (e) => {
|
|
|
1821
1821
|
children: [
|
|
1822
1822
|
/* @__PURE__ */ m(y, { gap: "12px", children: [
|
|
1823
1823
|
/* @__PURE__ */ i(bo, { children: /* @__PURE__ */ i(
|
|
1824
|
-
|
|
1824
|
+
ke,
|
|
1825
1825
|
{
|
|
1826
1826
|
id: "tag",
|
|
1827
1827
|
appearance: "gray",
|
|
@@ -1841,9 +1841,9 @@ const yo = (e) => {
|
|
|
1841
1841
|
) })
|
|
1842
1842
|
] }),
|
|
1843
1843
|
/* @__PURE__ */ m(y, { gap: "12px", children: [
|
|
1844
|
-
n && /* @__PURE__ */ m(
|
|
1844
|
+
n && /* @__PURE__ */ m(z, { children: [
|
|
1845
1845
|
/* @__PURE__ */ i(
|
|
1846
|
-
|
|
1846
|
+
j,
|
|
1847
1847
|
{
|
|
1848
1848
|
appearance: "primary",
|
|
1849
1849
|
icon: /* @__PURE__ */ i(Ft, {}),
|
|
@@ -1855,7 +1855,7 @@ const yo = (e) => {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
),
|
|
1857
1857
|
/* @__PURE__ */ i(
|
|
1858
|
-
|
|
1858
|
+
j,
|
|
1859
1859
|
{
|
|
1860
1860
|
appearance: "danger",
|
|
1861
1861
|
icon: /* @__PURE__ */ i(sn, {}),
|
|
@@ -1868,7 +1868,7 @@ const yo = (e) => {
|
|
|
1868
1868
|
)
|
|
1869
1869
|
] }),
|
|
1870
1870
|
/* @__PURE__ */ i(
|
|
1871
|
-
|
|
1871
|
+
j,
|
|
1872
1872
|
{
|
|
1873
1873
|
appearance: "dark",
|
|
1874
1874
|
icon: l ? /* @__PURE__ */ i(Lt, {}) : /* @__PURE__ */ i(wn, {}),
|
|
@@ -1881,10 +1881,10 @@ const yo = (e) => {
|
|
|
1881
1881
|
},
|
|
1882
1882
|
r.ruleName
|
|
1883
1883
|
) }),
|
|
1884
|
-
l && /* @__PURE__ */ m(
|
|
1885
|
-
/* @__PURE__ */ i(
|
|
1884
|
+
l && /* @__PURE__ */ m(z, { children: [
|
|
1885
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
1886
1886
|
N ? /* @__PURE__ */ i(st, { tabs: b, selectedTab: D, onChange: T }) : /* @__PURE__ */ i(
|
|
1887
|
-
|
|
1887
|
+
R,
|
|
1888
1888
|
{
|
|
1889
1889
|
type: "label",
|
|
1890
1890
|
size: "large",
|
|
@@ -1903,7 +1903,7 @@ const yo = (e) => {
|
|
|
1903
1903
|
justifyContent: t,
|
|
1904
1904
|
children: [
|
|
1905
1905
|
S.map((w) => /* @__PURE__ */ i(
|
|
1906
|
-
|
|
1906
|
+
ie,
|
|
1907
1907
|
{
|
|
1908
1908
|
direction: "column",
|
|
1909
1909
|
padding: "6px 12px",
|
|
@@ -1922,7 +1922,7 @@ const yo = (e) => {
|
|
|
1922
1922
|
w.conditionName
|
|
1923
1923
|
)),
|
|
1924
1924
|
u && g && /* @__PURE__ */ i(
|
|
1925
|
-
|
|
1925
|
+
ie,
|
|
1926
1926
|
{
|
|
1927
1927
|
direction: "column",
|
|
1928
1928
|
padding: "6px 12px",
|
|
@@ -1939,7 +1939,7 @@ const yo = (e) => {
|
|
|
1939
1939
|
}
|
|
1940
1940
|
),
|
|
1941
1941
|
c && f && /* @__PURE__ */ i(
|
|
1942
|
-
|
|
1942
|
+
ie,
|
|
1943
1943
|
{
|
|
1944
1944
|
direction: "column",
|
|
1945
1945
|
padding: "6px 12px",
|
|
@@ -1961,11 +1961,11 @@ const yo = (e) => {
|
|
|
1961
1961
|
] })
|
|
1962
1962
|
] }) : /* @__PURE__ */ m(y, { justifyContent: "space-between", children: [
|
|
1963
1963
|
/* @__PURE__ */ m(y, { alignItems: "center", gap: "8px", children: [
|
|
1964
|
-
/* @__PURE__ */ i(
|
|
1965
|
-
/* @__PURE__ */ i(
|
|
1964
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "150px" }),
|
|
1965
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "70px" })
|
|
1966
1966
|
] }),
|
|
1967
1967
|
/* @__PURE__ */ m(y, { alignItems: "center", gap: "8px", children: [
|
|
1968
|
-
/* @__PURE__ */ i(
|
|
1968
|
+
/* @__PURE__ */ i(ee, { animated: !0, width: "50px" }),
|
|
1969
1969
|
/* @__PURE__ */ i(Bt, { animated: !0 })
|
|
1970
1970
|
] })
|
|
1971
1971
|
] });
|
|
@@ -1998,8 +1998,34 @@ const yo = (e) => {
|
|
|
1998
1998
|
) : {};
|
|
1999
1999
|
}, ht = (e, n) => Object.fromEntries(
|
|
2000
2000
|
Object.entries(e).map(([t, r]) => [t, r.filter(n)])
|
|
2001
|
-
),
|
|
2002
|
-
|
|
2001
|
+
), xo = (e, n) => {
|
|
2002
|
+
switch (n) {
|
|
2003
|
+
case "Year":
|
|
2004
|
+
return `${e} en años`;
|
|
2005
|
+
case "Month":
|
|
2006
|
+
return `${e} en meses`;
|
|
2007
|
+
case "Day":
|
|
2008
|
+
return `${e} en días`;
|
|
2009
|
+
default:
|
|
2010
|
+
return `${e}`;
|
|
2011
|
+
}
|
|
2012
|
+
}, To = (e, n) => {
|
|
2013
|
+
if (e == null) return "";
|
|
2014
|
+
const t = Array.isArray(e) ? e.join(", ") : typeof e == "object" && e !== null ? JSON.stringify(e) : String(e ?? "");
|
|
2015
|
+
switch (n) {
|
|
2016
|
+
case A.LESS_THAN:
|
|
2017
|
+
return `Menor a ${t}`;
|
|
2018
|
+
case A.GREATER_THAN:
|
|
2019
|
+
return `Mayor a ${t}`;
|
|
2020
|
+
case A.LIST_OF_VALUES:
|
|
2021
|
+
return e;
|
|
2022
|
+
case A.LIST_OF_VALUES_MULTI:
|
|
2023
|
+
return e;
|
|
2024
|
+
default:
|
|
2025
|
+
return String(t);
|
|
2026
|
+
}
|
|
2027
|
+
}, Bn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ft = (e) => {
|
|
2028
|
+
var me, le, _;
|
|
2003
2029
|
const {
|
|
2004
2030
|
cardTitle: n = !0,
|
|
2005
2031
|
decision: t,
|
|
@@ -2015,69 +2041,94 @@ const yo = (e) => {
|
|
|
2015
2041
|
element: {
|
|
2016
2042
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2017
2043
|
value: String(t.effectiveFrom),
|
|
2018
|
-
howToSetTheDecision:
|
|
2019
|
-
decisionDataType:
|
|
2044
|
+
howToSetTheDecision: ne.EQUAL,
|
|
2045
|
+
decisionDataType: q.DATE
|
|
2020
2046
|
},
|
|
2021
2047
|
valueData: Be({
|
|
2022
2048
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2023
2049
|
value: String(t.effectiveFrom),
|
|
2024
|
-
howToSetTheDecision:
|
|
2025
|
-
decisionDataType:
|
|
2050
|
+
howToSetTheDecision: ne.EQUAL,
|
|
2051
|
+
decisionDataType: q.DATE
|
|
2026
2052
|
})
|
|
2027
2053
|
} : null, h = g ? {
|
|
2028
2054
|
element: {
|
|
2029
2055
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2030
2056
|
value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
|
|
2031
|
-
howToSetTheDecision:
|
|
2032
|
-
decisionDataType:
|
|
2057
|
+
howToSetTheDecision: ne.EQUAL,
|
|
2058
|
+
decisionDataType: q.DATE
|
|
2033
2059
|
},
|
|
2034
2060
|
valueData: Be({
|
|
2035
2061
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2036
2062
|
value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
|
|
2037
|
-
howToSetTheDecision:
|
|
2038
|
-
decisionDataType:
|
|
2063
|
+
howToSetTheDecision: ne.EQUAL,
|
|
2064
|
+
decisionDataType: q.DATE
|
|
2039
2065
|
})
|
|
2040
2066
|
} : null, x = t ? {
|
|
2041
2067
|
labelName: n && t.labelName || "",
|
|
2042
|
-
decisionDataType: t.decisionDataType ||
|
|
2068
|
+
decisionDataType: t.decisionDataType || q.ALPHABETICAL,
|
|
2043
2069
|
value: Be(t),
|
|
2044
|
-
howToSetTheDecision: t.howToSetTheDecision ||
|
|
2045
|
-
} : null, b =
|
|
2046
|
-
(
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2070
|
+
howToSetTheDecision: t.howToSetTheDecision || ne.EQUAL
|
|
2071
|
+
} : null, b = P.useMemo(
|
|
2072
|
+
() => t ? Pe(t) : {},
|
|
2073
|
+
[t]
|
|
2074
|
+
), D = ((le = (me = t == null ? void 0 : t.conditionGroups) == null ? void 0 : me.map((k) => k == null ? void 0 : k.ConditionGroupId)) == null ? void 0 : le.filter(Boolean)) || Object.keys(b), T = D[0] || "group-primary", S = P.useMemo(() => {
|
|
2075
|
+
const k = {}, M = b[T] || [], pe = b["group-primary"] || [];
|
|
2076
|
+
k["group-primary"] = T === "group-primary" ? pe : [...M, ...pe];
|
|
2077
|
+
for (const L of D)
|
|
2078
|
+
!L || L === T || L !== "group-primary" && b[L] && (k[L] = b[L]);
|
|
2079
|
+
for (const L of Object.keys(b))
|
|
2080
|
+
L === "group-primary" || L === T || L in k || (k[L] = b[L]);
|
|
2081
|
+
return k;
|
|
2082
|
+
}, [b, T, D]), N = P.useMemo(() => {
|
|
2083
|
+
const k = [
|
|
2084
|
+
"group-primary",
|
|
2085
|
+
...Object.keys(S).filter((M) => M !== "group-primary")
|
|
2086
|
+
];
|
|
2087
|
+
return Array.from(new Set(k));
|
|
2088
|
+
}, [S]), w = P.useMemo(() => {
|
|
2089
|
+
const k = {};
|
|
2090
|
+
return Object.keys(S).forEach((M) => {
|
|
2091
|
+
const pe = S[M];
|
|
2092
|
+
pe && Array.isArray(pe) ? k[M] = pe.map((L) => {
|
|
2093
|
+
let I = L.labelName;
|
|
2094
|
+
L.TimeUnit && L.labelName && (I = xo(L.labelName, L.TimeUnit));
|
|
2095
|
+
let U = L.value;
|
|
2096
|
+
return (L == null ? void 0 : L.howToSetTheCondition) !== void 0 && (L == null ? void 0 : L.howToSetTheCondition) !== null && (L == null ? void 0 : L.value) !== void 0 && (L == null ? void 0 : L.value) !== null && (U = To(
|
|
2097
|
+
L.value,
|
|
2098
|
+
L.howToSetTheCondition
|
|
2099
|
+
)), {
|
|
2100
|
+
...L,
|
|
2101
|
+
labelName: I,
|
|
2102
|
+
value: U
|
|
2103
|
+
};
|
|
2104
|
+
}) : k[M] = pe;
|
|
2105
|
+
}), k;
|
|
2106
|
+
}, [S]), F = ht(
|
|
2107
|
+
w,
|
|
2108
|
+
(k) => !k.hidden
|
|
2109
|
+
), O = {};
|
|
2110
|
+
let $ = 1;
|
|
2111
|
+
const V = N.map((k) => {
|
|
2112
|
+
const M = k === "group-primary" ? "mainCondition" : `alternateCondition-${$++}`;
|
|
2113
|
+
return O[M] = k, {
|
|
2114
|
+
id: M,
|
|
2115
|
+
label: k === "group-primary" ? Bn(k, 0) : Bn(k, Number(M.split("-").at(-1))),
|
|
2065
2116
|
isDisabled: !1
|
|
2066
2117
|
};
|
|
2067
|
-
}), [
|
|
2068
|
-
((
|
|
2069
|
-
),
|
|
2118
|
+
}), [Z, be] = P.useState(
|
|
2119
|
+
((_ = V[0]) == null ? void 0 : _.id) ?? "mainCondition"
|
|
2120
|
+
), ve = (k) => be(k), fe = O[Z] ?? "group-primary", ae = F[fe] ?? [], ye = N.length > 1, Ne = Array.from({ length: 5 }), ue = !!(!r && t && o && x), xe = ae.length < 2 ? "start" : "space-between", Te = `N° ${String((a ?? 0) + 1).padStart(2, "0")}`;
|
|
2070
2121
|
return /* @__PURE__ */ i(
|
|
2071
2122
|
yo,
|
|
2072
2123
|
{
|
|
2073
|
-
conditionsAlignment:
|
|
2124
|
+
conditionsAlignment: xe,
|
|
2074
2125
|
controls: u,
|
|
2075
2126
|
decision: t,
|
|
2076
2127
|
decisionMapper: x,
|
|
2077
|
-
loading:
|
|
2078
|
-
skeleton:
|
|
2128
|
+
loading: ue,
|
|
2129
|
+
skeleton: Ne,
|
|
2079
2130
|
textValues: o,
|
|
2080
|
-
tagLabel:
|
|
2131
|
+
tagLabel: Te,
|
|
2081
2132
|
isOpen: s,
|
|
2082
2133
|
onToggle: d,
|
|
2083
2134
|
hasEffectiveFrom: c,
|
|
@@ -2086,14 +2137,14 @@ const yo = (e) => {
|
|
|
2086
2137
|
validUntilRenderer: h,
|
|
2087
2138
|
onEdit: l,
|
|
2088
2139
|
onDelete: p,
|
|
2089
|
-
tabs:
|
|
2090
|
-
selectedTab:
|
|
2091
|
-
onTabChange:
|
|
2092
|
-
currentConditions:
|
|
2093
|
-
hasMultipleGroups:
|
|
2140
|
+
tabs: V,
|
|
2141
|
+
selectedTab: Z,
|
|
2142
|
+
onTabChange: ve,
|
|
2143
|
+
currentConditions: ae,
|
|
2144
|
+
hasMultipleGroups: ye
|
|
2094
2145
|
}
|
|
2095
2146
|
);
|
|
2096
|
-
},
|
|
2147
|
+
}, wo = $n`
|
|
2097
2148
|
from {
|
|
2098
2149
|
opacity: 0;
|
|
2099
2150
|
transform: translateY(20px);
|
|
@@ -2127,7 +2178,7 @@ C.div`
|
|
|
2127
2178
|
}};
|
|
2128
2179
|
}
|
|
2129
2180
|
`;
|
|
2130
|
-
const
|
|
2181
|
+
const Co = C.div`
|
|
2131
2182
|
& > div {
|
|
2132
2183
|
box-shadow: 0px 2px 3px 0px
|
|
2133
2184
|
${({ theme: e }) => {
|
|
@@ -2136,18 +2187,18 @@ const To = C.div`
|
|
|
2136
2187
|
}};
|
|
2137
2188
|
cursor: pointer;
|
|
2138
2189
|
}
|
|
2139
|
-
`,
|
|
2190
|
+
`, Do = C.div`
|
|
2140
2191
|
width: 100%;
|
|
2141
2192
|
height: 100%;
|
|
2142
2193
|
& > div {
|
|
2143
|
-
animation: ${
|
|
2194
|
+
animation: ${wo} 600ms ease-out;
|
|
2144
2195
|
}
|
|
2145
|
-
`,
|
|
2196
|
+
`, So = C.div`
|
|
2146
2197
|
& > div > div {
|
|
2147
2198
|
border-radius: 8px;
|
|
2148
2199
|
box-sizing: border-box;
|
|
2149
2200
|
}
|
|
2150
|
-
`,
|
|
2201
|
+
`, Eo = C.div`
|
|
2151
2202
|
& > div {
|
|
2152
2203
|
width: 100%;
|
|
2153
2204
|
height: 100%;
|
|
@@ -2167,7 +2218,7 @@ const To = C.div`
|
|
|
2167
2218
|
border-radius: 8px;
|
|
2168
2219
|
}
|
|
2169
2220
|
}
|
|
2170
|
-
`,
|
|
2221
|
+
`, No = (e) => {
|
|
2171
2222
|
const { index: n, handleOpenModal: t } = e;
|
|
2172
2223
|
return /* @__PURE__ */ i(
|
|
2173
2224
|
gt,
|
|
@@ -2181,7 +2232,7 @@ const To = C.div`
|
|
|
2181
2232
|
},
|
|
2182
2233
|
`loading-card-${n}`
|
|
2183
2234
|
);
|
|
2184
|
-
},
|
|
2235
|
+
}, ko = (e) => {
|
|
2185
2236
|
const {
|
|
2186
2237
|
cardTitle: n,
|
|
2187
2238
|
decision: t,
|
|
@@ -2193,7 +2244,7 @@ const To = C.div`
|
|
|
2193
2244
|
isOpen: l,
|
|
2194
2245
|
onToggle: p
|
|
2195
2246
|
} = e;
|
|
2196
|
-
return t ? /* @__PURE__ */ i(
|
|
2247
|
+
return t ? /* @__PURE__ */ i(Ze, { children: /* @__PURE__ */ i(y, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
|
|
2197
2248
|
gt,
|
|
2198
2249
|
{
|
|
2199
2250
|
id: t.decisionId,
|
|
@@ -2215,19 +2266,19 @@ const To = C.div`
|
|
|
2215
2266
|
)
|
|
2216
2267
|
}
|
|
2217
2268
|
) }) }, t.decisionId) : null;
|
|
2218
|
-
},
|
|
2269
|
+
}, Ao = (e) => {
|
|
2219
2270
|
const {
|
|
2220
2271
|
customTitleContentAddCard: n,
|
|
2221
2272
|
index: t,
|
|
2222
2273
|
handleOpenModal: r,
|
|
2223
2274
|
shouldRenderEmptyMessage: o
|
|
2224
2275
|
} = e;
|
|
2225
|
-
return /* @__PURE__ */ i(
|
|
2226
|
-
|
|
2276
|
+
return /* @__PURE__ */ i(Do, { children: o ? null : /* @__PURE__ */ i(
|
|
2277
|
+
Co,
|
|
2227
2278
|
{
|
|
2228
2279
|
onClick: () => r ? r() : null,
|
|
2229
2280
|
children: /* @__PURE__ */ i(
|
|
2230
|
-
|
|
2281
|
+
ie,
|
|
2231
2282
|
{
|
|
2232
2283
|
direction: "column",
|
|
2233
2284
|
gap: "4px",
|
|
@@ -2242,9 +2293,9 @@ const To = C.div`
|
|
|
2242
2293
|
alignItems: "center",
|
|
2243
2294
|
padding: "16px",
|
|
2244
2295
|
children: [
|
|
2245
|
-
/* @__PURE__ */ i(
|
|
2296
|
+
/* @__PURE__ */ i(R, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
|
|
2246
2297
|
/* @__PURE__ */ i(
|
|
2247
|
-
|
|
2298
|
+
j,
|
|
2248
2299
|
{
|
|
2249
2300
|
appearance: "gray",
|
|
2250
2301
|
icon: /* @__PURE__ */ i(We, {}),
|
|
@@ -2259,14 +2310,14 @@ const To = C.div`
|
|
|
2259
2310
|
)
|
|
2260
2311
|
}
|
|
2261
2312
|
) }, `add-decision-${t}`);
|
|
2262
|
-
},
|
|
2263
|
-
loading:
|
|
2264
|
-
decision:
|
|
2265
|
-
add:
|
|
2313
|
+
}, $o = {
|
|
2314
|
+
loading: No,
|
|
2315
|
+
decision: ko,
|
|
2316
|
+
add: Ao
|
|
2266
2317
|
}, Sn = (e) => {
|
|
2267
|
-
const { type: n } = e, t =
|
|
2318
|
+
const { type: n } = e, t = $o[n];
|
|
2268
2319
|
return t ? t(e) : null;
|
|
2269
|
-
},
|
|
2320
|
+
}, Io = (e) => {
|
|
2270
2321
|
const {
|
|
2271
2322
|
cardTitle: n,
|
|
2272
2323
|
controls: t,
|
|
@@ -2306,13 +2357,13 @@ const To = C.div`
|
|
|
2306
2357
|
})
|
|
2307
2358
|
), g = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !a && t;
|
|
2308
2359
|
return { renderedCards: c, shouldRenderAddCard: g };
|
|
2309
|
-
},
|
|
2360
|
+
}, Ro = C.div`
|
|
2310
2361
|
position: relative;
|
|
2311
2362
|
& > div {
|
|
2312
2363
|
padding: 24px 16px;
|
|
2313
2364
|
place-items: unset;
|
|
2314
2365
|
}
|
|
2315
|
-
`,
|
|
2366
|
+
`, Fo = C.div`
|
|
2316
2367
|
background-color: ${({ theme: e }) => {
|
|
2317
2368
|
var n, t;
|
|
2318
2369
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || E.palette.neutral.N0;
|
|
@@ -2344,20 +2395,20 @@ const To = C.div`
|
|
|
2344
2395
|
background-color: #ebecf0;
|
|
2345
2396
|
border-radius: 8px;
|
|
2346
2397
|
}
|
|
2347
|
-
`,
|
|
2398
|
+
`, Lo = (e) => {
|
|
2348
2399
|
const { children: n, description: t, portalId: r, onCloseModal: o, title: a } = e, s = document.getElementById(r);
|
|
2349
2400
|
if (!s)
|
|
2350
2401
|
throw new Error(
|
|
2351
2402
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
2352
2403
|
);
|
|
2353
|
-
const d =
|
|
2404
|
+
const d = re("(max-width: 400px)");
|
|
2354
2405
|
return pn(
|
|
2355
|
-
/* @__PURE__ */ i(
|
|
2406
|
+
/* @__PURE__ */ i(Ro, { smallScreen: d, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(Fo, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
2356
2407
|
/* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
2357
2408
|
/* @__PURE__ */ m(y, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2358
2409
|
/* @__PURE__ */ m(y, { direction: "column", gap: "8px", children: [
|
|
2359
2410
|
/* @__PURE__ */ i(
|
|
2360
|
-
|
|
2411
|
+
R,
|
|
2361
2412
|
{
|
|
2362
2413
|
type: "title",
|
|
2363
2414
|
size: "medium",
|
|
@@ -2366,25 +2417,25 @@ const To = C.div`
|
|
|
2366
2417
|
children: a
|
|
2367
2418
|
}
|
|
2368
2419
|
),
|
|
2369
|
-
/* @__PURE__ */ i(
|
|
2420
|
+
/* @__PURE__ */ i(R, { size: "medium", appearance: "gray", children: t })
|
|
2370
2421
|
] }),
|
|
2371
2422
|
/* @__PURE__ */ i(dn, { size: "24px", cursor: "pointer", onClick: o })
|
|
2372
2423
|
] }),
|
|
2373
|
-
/* @__PURE__ */ i(
|
|
2424
|
+
/* @__PURE__ */ i(G, { dashed: !0 })
|
|
2374
2425
|
] }),
|
|
2375
2426
|
n
|
|
2376
2427
|
] }) }) }) }),
|
|
2377
2428
|
s
|
|
2378
2429
|
);
|
|
2379
|
-
},
|
|
2430
|
+
}, Oo = (e) => ({
|
|
2380
2431
|
schema: de().required("Requerido").test(
|
|
2381
2432
|
"non-empty",
|
|
2382
2433
|
"El valor no puede estar vacío",
|
|
2383
2434
|
(n) => n != null && n.trim() !== ""
|
|
2384
2435
|
),
|
|
2385
2436
|
value: e
|
|
2386
|
-
}),
|
|
2387
|
-
schema:
|
|
2437
|
+
}), Mo = (e) => ({
|
|
2438
|
+
schema: Ve().test(
|
|
2388
2439
|
"isArrayOrString",
|
|
2389
2440
|
"Por favor selecciona una opcion",
|
|
2390
2441
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -2392,8 +2443,8 @@ const To = C.div`
|
|
|
2392
2443
|
) : typeof n == "string"
|
|
2393
2444
|
),
|
|
2394
2445
|
value: e
|
|
2395
|
-
}),
|
|
2396
|
-
schema:
|
|
2446
|
+
}), Po = (e) => ({
|
|
2447
|
+
schema: Ve().test(
|
|
2397
2448
|
"isArrayOrString",
|
|
2398
2449
|
"Por favor selecciona al menos una opcion",
|
|
2399
2450
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -2401,10 +2452,10 @@ const To = C.div`
|
|
|
2401
2452
|
) : typeof n == "string"
|
|
2402
2453
|
),
|
|
2403
2454
|
value: e
|
|
2404
|
-
}),
|
|
2455
|
+
}), zo = (e) => {
|
|
2405
2456
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
2406
2457
|
return {
|
|
2407
|
-
schema:
|
|
2458
|
+
schema: te({
|
|
2408
2459
|
from: ce().required("El campo de tipo rango es requerido").max(t, "El rango desde no puede ser mayor al rango hasta").min(0, "El rango desde no puede ser menor a 0"),
|
|
2409
2460
|
to: ce().min(0, "El rengo hasta debe ser mayor o igual a 0").required("El rango hasta es requerido").test(
|
|
2410
2461
|
"is-greater",
|
|
@@ -2420,43 +2471,43 @@ const To = C.div`
|
|
|
2420
2471
|
}, vn = (e, n) => {
|
|
2421
2472
|
if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
|
|
2422
2473
|
const t = e;
|
|
2423
|
-
return n ===
|
|
2424
|
-
schema:
|
|
2474
|
+
return n === q.PERCENTAGE ? {
|
|
2475
|
+
schema: te({
|
|
2425
2476
|
from: ce().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"),
|
|
2426
2477
|
to: ce().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")
|
|
2427
2478
|
}),
|
|
2428
2479
|
value: t
|
|
2429
2480
|
} : {
|
|
2430
|
-
schema:
|
|
2481
|
+
schema: te({
|
|
2431
2482
|
from: de().required("Requerido"),
|
|
2432
2483
|
to: de().required("Requerido")
|
|
2433
2484
|
}),
|
|
2434
2485
|
value: t
|
|
2435
2486
|
};
|
|
2436
2487
|
}
|
|
2437
|
-
return n ===
|
|
2488
|
+
return n === q.PERCENTAGE ? {
|
|
2438
2489
|
schema: ce().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"),
|
|
2439
2490
|
value: e
|
|
2440
2491
|
} : {
|
|
2441
2492
|
schema: de().required("Requerido"),
|
|
2442
2493
|
value: e
|
|
2443
2494
|
};
|
|
2444
|
-
},
|
|
2445
|
-
[A.LIST_OF_VALUES]:
|
|
2446
|
-
[A.LIST_OF_VALUES_MULTI]:
|
|
2447
|
-
[A.RANGE]:
|
|
2495
|
+
}, Vo = {
|
|
2496
|
+
[A.LIST_OF_VALUES]: Mo,
|
|
2497
|
+
[A.LIST_OF_VALUES_MULTI]: Po,
|
|
2498
|
+
[A.RANGE]: zo,
|
|
2448
2499
|
[A.GREATER_THAN]: vn,
|
|
2449
2500
|
[A.LESS_THAN]: vn,
|
|
2450
2501
|
[A.EQUAL]: vn
|
|
2451
|
-
}, Gn = (e) =>
|
|
2452
|
-
function
|
|
2502
|
+
}, Gn = (e) => Vo[e] || Oo;
|
|
2503
|
+
function _o({
|
|
2453
2504
|
decision: e,
|
|
2454
2505
|
onSubmitEvent: n,
|
|
2455
2506
|
textValues: t
|
|
2456
2507
|
}) {
|
|
2457
2508
|
const r = Pe(e) || {}, o = () => Object.values(r).flat(), a = {
|
|
2458
2509
|
ruleName: e.ruleName || "",
|
|
2459
|
-
decisionDataType: e.decisionDataType ||
|
|
2510
|
+
decisionDataType: e.decisionDataType || q.ALPHABETICAL,
|
|
2460
2511
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
2461
2512
|
value: e.value || "",
|
|
2462
2513
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -2476,7 +2527,7 @@ function zo({
|
|
|
2476
2527
|
s.values.decisionDataType
|
|
2477
2528
|
).schema),
|
|
2478
2529
|
conditionsThatEstablishesTheDecision: Ge((u, { parent: c }) => {
|
|
2479
|
-
if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return
|
|
2530
|
+
if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return te().shape({});
|
|
2480
2531
|
const h = o().reduce(
|
|
2481
2532
|
(x, b) => {
|
|
2482
2533
|
var T;
|
|
@@ -2493,7 +2544,7 @@ function zo({
|
|
|
2493
2544
|
},
|
|
2494
2545
|
{}
|
|
2495
2546
|
);
|
|
2496
|
-
return
|
|
2547
|
+
return te(h).test(
|
|
2497
2548
|
"at-least-one-condition",
|
|
2498
2549
|
"Debe existir al menos una condición para que la decisión se valide correctamente.",
|
|
2499
2550
|
(x) => x ? Object.values(x).some(
|
|
@@ -2502,9 +2553,9 @@ function zo({
|
|
|
2502
2553
|
);
|
|
2503
2554
|
})
|
|
2504
2555
|
};
|
|
2505
|
-
t.terms && (d.effectiveFrom =
|
|
2556
|
+
t.terms && (d.effectiveFrom = Me().required(
|
|
2506
2557
|
"Se requiere la fecha de vigencia desde"
|
|
2507
|
-
), d.validUntil =
|
|
2558
|
+
), d.validUntil = Me().when(
|
|
2508
2559
|
"checkClosed",
|
|
2509
2560
|
(u, c, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? c.required("Se requiere la fecha de vigencia hasta").test(
|
|
2510
2561
|
"is-after-startDate",
|
|
@@ -2515,7 +2566,7 @@ function zo({
|
|
|
2515
2566
|
}
|
|
2516
2567
|
) : c.notRequired()
|
|
2517
2568
|
));
|
|
2518
|
-
const l =
|
|
2569
|
+
const l = te(d);
|
|
2519
2570
|
return s = Rn({
|
|
2520
2571
|
initialValues: a,
|
|
2521
2572
|
validationSchema: l,
|
|
@@ -2593,7 +2644,7 @@ C.div`
|
|
|
2593
2644
|
border-radius: 8px;
|
|
2594
2645
|
}
|
|
2595
2646
|
`;
|
|
2596
|
-
const
|
|
2647
|
+
const Uo = C.div`
|
|
2597
2648
|
display: flex;
|
|
2598
2649
|
width: -webkit-fill-available;
|
|
2599
2650
|
& > div {
|
|
@@ -2617,16 +2668,16 @@ const Vo = C.div`
|
|
|
2617
2668
|
messageEnd: c = "",
|
|
2618
2669
|
statusStart: g = "pending",
|
|
2619
2670
|
statusEnd: f = "pending"
|
|
2620
|
-
} = e, [h, x] =
|
|
2621
|
-
x(
|
|
2622
|
-
}, w = (
|
|
2623
|
-
D(
|
|
2624
|
-
},
|
|
2625
|
-
S(
|
|
2626
|
-
},
|
|
2671
|
+
} = e, [h, x] = H(s), [b, D] = H(l), [T, S] = H(p), N = ({ target: $ }) => {
|
|
2672
|
+
x($.checked), r && r($.checked);
|
|
2673
|
+
}, w = ($) => {
|
|
2674
|
+
D($.target.value), n($);
|
|
2675
|
+
}, F = ($) => {
|
|
2676
|
+
S($.target.value), t($);
|
|
2677
|
+
}, O = re("(max-width: 400px)");
|
|
2627
2678
|
return /* @__PURE__ */ m(y, { direction: "column", width: "100%", gap: "20px", children: [
|
|
2628
2679
|
/* @__PURE__ */ m(y, { justifyContent: "space-between", children: [
|
|
2629
|
-
/* @__PURE__ */ i(
|
|
2680
|
+
/* @__PURE__ */ i(R, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
2630
2681
|
/* @__PURE__ */ i(
|
|
2631
2682
|
An,
|
|
2632
2683
|
{
|
|
@@ -2640,12 +2691,12 @@ const Vo = C.div`
|
|
|
2640
2691
|
/* @__PURE__ */ m(
|
|
2641
2692
|
y,
|
|
2642
2693
|
{
|
|
2643
|
-
direction:
|
|
2694
|
+
direction: O ? "column" : "row",
|
|
2644
2695
|
justifyContent: "space-between",
|
|
2645
2696
|
gap: "24px",
|
|
2646
2697
|
children: [
|
|
2647
2698
|
/* @__PURE__ */ i(
|
|
2648
|
-
|
|
2699
|
+
Oe,
|
|
2649
2700
|
{
|
|
2650
2701
|
id: "dateStart",
|
|
2651
2702
|
label: o,
|
|
@@ -2659,11 +2710,11 @@ const Vo = C.div`
|
|
|
2659
2710
|
}
|
|
2660
2711
|
),
|
|
2661
2712
|
h && /* @__PURE__ */ i(
|
|
2662
|
-
|
|
2713
|
+
Oe,
|
|
2663
2714
|
{
|
|
2664
2715
|
id: "dateEnd",
|
|
2665
2716
|
label: a,
|
|
2666
|
-
onChange:
|
|
2717
|
+
onChange: F,
|
|
2667
2718
|
value: T,
|
|
2668
2719
|
required: d,
|
|
2669
2720
|
size: "compact",
|
|
@@ -2676,7 +2727,7 @@ const Vo = C.div`
|
|
|
2676
2727
|
}
|
|
2677
2728
|
)
|
|
2678
2729
|
] });
|
|
2679
|
-
},
|
|
2730
|
+
}, Ho = (e) => {
|
|
2680
2731
|
const {
|
|
2681
2732
|
activeTab: n,
|
|
2682
2733
|
conditionsErrorText: t,
|
|
@@ -2697,14 +2748,14 @@ const Vo = C.div`
|
|
|
2697
2748
|
onCloseRedefineConfirm: D,
|
|
2698
2749
|
onConfirmRedefine: T
|
|
2699
2750
|
} = e;
|
|
2700
|
-
return /* @__PURE__ */ m(
|
|
2751
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
2701
2752
|
/* @__PURE__ */ i("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2702
|
-
/* @__PURE__ */ i(
|
|
2753
|
+
/* @__PURE__ */ i(je, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ i(y, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
|
|
2703
2754
|
condition: a,
|
|
2704
2755
|
formik: o,
|
|
2705
2756
|
isDecision: !0
|
|
2706
2757
|
}) }) }),
|
|
2707
|
-
/* @__PURE__ */ i(
|
|
2758
|
+
/* @__PURE__ */ i(je, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(y, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2708
2759
|
/* @__PURE__ */ i(
|
|
2709
2760
|
st,
|
|
2710
2761
|
{
|
|
@@ -2715,7 +2766,7 @@ const Vo = C.div`
|
|
|
2715
2766
|
),
|
|
2716
2767
|
/* @__PURE__ */ m(y, { justifyContent: "flex-end", alignItems: "center", children: [
|
|
2717
2768
|
/* @__PURE__ */ i(
|
|
2718
|
-
|
|
2769
|
+
j,
|
|
2719
2770
|
{
|
|
2720
2771
|
icon: /* @__PURE__ */ i(Ot, {}),
|
|
2721
2772
|
appearance: "help",
|
|
@@ -2724,10 +2775,10 @@ const Vo = C.div`
|
|
|
2724
2775
|
}
|
|
2725
2776
|
),
|
|
2726
2777
|
/* @__PURE__ */ i(
|
|
2727
|
-
|
|
2778
|
+
B,
|
|
2728
2779
|
{
|
|
2729
2780
|
type: "button",
|
|
2730
|
-
iconBefore: /* @__PURE__ */ i(
|
|
2781
|
+
iconBefore: /* @__PURE__ */ i(Mt, {}),
|
|
2731
2782
|
variant: "none",
|
|
2732
2783
|
appearance: "gray",
|
|
2733
2784
|
onClick: b,
|
|
@@ -2742,7 +2793,7 @@ const Vo = C.div`
|
|
|
2742
2793
|
gap: "16px",
|
|
2743
2794
|
alignItems: "center",
|
|
2744
2795
|
children: [
|
|
2745
|
-
/* @__PURE__ */ i(
|
|
2796
|
+
/* @__PURE__ */ i(Uo, { children: /* @__PURE__ */ i(
|
|
2746
2797
|
Vn,
|
|
2747
2798
|
{
|
|
2748
2799
|
condition: S,
|
|
@@ -2750,7 +2801,7 @@ const Vo = C.div`
|
|
|
2750
2801
|
}
|
|
2751
2802
|
) }),
|
|
2752
2803
|
/* @__PURE__ */ i(
|
|
2753
|
-
|
|
2804
|
+
j,
|
|
2754
2805
|
{
|
|
2755
2806
|
icon: /* @__PURE__ */ i(sn, {}),
|
|
2756
2807
|
appearance: "danger",
|
|
@@ -2762,9 +2813,9 @@ const Vo = C.div`
|
|
|
2762
2813
|
},
|
|
2763
2814
|
S.conditionName
|
|
2764
2815
|
)) }),
|
|
2765
|
-
p && /* @__PURE__ */ i(
|
|
2816
|
+
p && /* @__PURE__ */ i(R, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2766
2817
|
] }) }),
|
|
2767
|
-
/* @__PURE__ */ i(
|
|
2818
|
+
/* @__PURE__ */ i(je, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
|
|
2768
2819
|
jo,
|
|
2769
2820
|
{
|
|
2770
2821
|
labelStart: f.termStart,
|
|
@@ -2784,8 +2835,8 @@ const Vo = C.div`
|
|
|
2784
2835
|
}
|
|
2785
2836
|
) }),
|
|
2786
2837
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
2787
|
-
/* @__PURE__ */ i(
|
|
2788
|
-
/* @__PURE__ */ i(
|
|
2838
|
+
/* @__PURE__ */ i(B, { appearance: "gray", onClick: s, variant: "outlined", children: f.cancel }),
|
|
2839
|
+
/* @__PURE__ */ i(B, { type: "submit", children: f.confirm })
|
|
2789
2840
|
] })
|
|
2790
2841
|
] }) }),
|
|
2791
2842
|
x && h && /* @__PURE__ */ i(
|
|
@@ -2795,10 +2846,10 @@ const Vo = C.div`
|
|
|
2795
2846
|
title: "Redefinir la condición",
|
|
2796
2847
|
onCloseModal: D,
|
|
2797
2848
|
children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
2798
|
-
/* @__PURE__ */ i(
|
|
2849
|
+
/* @__PURE__ */ i(R, { type: "body", size: "large", appearance: "gray", children: "¿Estás seguro? Se perderá todo lo que tienes actualmente definido y deberás reescribir completamente la condición, de esta manera podrás usar las últimas variables condicionales que están definidas en la actualidad para esta decisión ." }),
|
|
2799
2850
|
/* @__PURE__ */ m(y, { justifyContent: "end", gap: "12px", children: [
|
|
2800
2851
|
/* @__PURE__ */ i(
|
|
2801
|
-
|
|
2852
|
+
B,
|
|
2802
2853
|
{
|
|
2803
2854
|
type: "button",
|
|
2804
2855
|
appearance: "gray",
|
|
@@ -2808,24 +2859,24 @@ const Vo = C.div`
|
|
|
2808
2859
|
children: "Cancelar"
|
|
2809
2860
|
}
|
|
2810
2861
|
),
|
|
2811
|
-
/* @__PURE__ */ i(
|
|
2862
|
+
/* @__PURE__ */ i(B, { type: "button", onClick: T, cursorHover: !0, children: "Confirmar" })
|
|
2812
2863
|
] })
|
|
2813
2864
|
] })
|
|
2814
2865
|
}
|
|
2815
2866
|
)
|
|
2816
2867
|
] });
|
|
2817
|
-
},
|
|
2818
|
-
const { label: n, howToSet: t, isFirst: r = !1 } = e, o =
|
|
2868
|
+
}, qo = (e) => {
|
|
2869
|
+
const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Yo(n), a = Go(o), s = r ? "Que" : "Y que", d = a ? o : `${Wo(o)} ${o}`, l = Ko(t);
|
|
2819
2870
|
return `${s} ${d} ${l}`;
|
|
2820
|
-
},
|
|
2821
|
-
function
|
|
2822
|
-
return
|
|
2871
|
+
}, Bo = /^(el|la|los|las)\s/i;
|
|
2872
|
+
function Go(e) {
|
|
2873
|
+
return Bo.test(e);
|
|
2823
2874
|
}
|
|
2824
|
-
function
|
|
2875
|
+
function Yo(e) {
|
|
2825
2876
|
return e.replace(/\s+/g, " ").trim();
|
|
2826
2877
|
}
|
|
2827
|
-
function
|
|
2828
|
-
const n =
|
|
2878
|
+
function Wo(e) {
|
|
2879
|
+
const n = Xo(e).toLowerCase(), t = /\b(s|es)\b/.test(Qo(e).toLowerCase()) && !n.endsWith("és");
|
|
2829
2880
|
return ({
|
|
2830
2881
|
mano: "f",
|
|
2831
2882
|
día: "m",
|
|
@@ -2837,21 +2888,21 @@ function Go(e) {
|
|
|
2837
2888
|
antigüedad: "f",
|
|
2838
2889
|
antiguedad: "f",
|
|
2839
2890
|
puntaje: "m"
|
|
2840
|
-
}[n] ??
|
|
2891
|
+
}[n] ?? Zo(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
|
|
2841
2892
|
}
|
|
2842
|
-
function
|
|
2893
|
+
function Xo(e) {
|
|
2843
2894
|
return (e.toLowerCase().split(
|
|
2844
2895
|
/\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
|
|
2845
2896
|
)[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
|
|
2846
2897
|
}
|
|
2847
|
-
function
|
|
2898
|
+
function Qo(e) {
|
|
2848
2899
|
const n = e.trim().split(/\s+/);
|
|
2849
2900
|
return n[n.length - 1] || "";
|
|
2850
2901
|
}
|
|
2851
|
-
function
|
|
2902
|
+
function Zo(e) {
|
|
2852
2903
|
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";
|
|
2853
2904
|
}
|
|
2854
|
-
function
|
|
2905
|
+
function Ko(e) {
|
|
2855
2906
|
switch (e) {
|
|
2856
2907
|
case A.EQUAL:
|
|
2857
2908
|
case A.GREATER_THAN:
|
|
@@ -2866,7 +2917,7 @@ function Qo(e) {
|
|
|
2866
2917
|
return "sea";
|
|
2867
2918
|
}
|
|
2868
2919
|
}
|
|
2869
|
-
const
|
|
2920
|
+
const Jo = (e) => {
|
|
2870
2921
|
if (typeof e == "string") {
|
|
2871
2922
|
const n = e.toLowerCase();
|
|
2872
2923
|
if (n.includes("equal")) return se.EQUAL;
|
|
@@ -2878,8 +2929,8 @@ const Ko = (e) => {
|
|
|
2878
2929
|
return se.LIST_OF_VALUES;
|
|
2879
2930
|
}
|
|
2880
2931
|
return e ?? se.EQUAL;
|
|
2881
|
-
}, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`,
|
|
2882
|
-
var
|
|
2932
|
+
}, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ea = (e) => {
|
|
2933
|
+
var L;
|
|
2883
2934
|
const {
|
|
2884
2935
|
decision: n,
|
|
2885
2936
|
onSubmitEvent: t,
|
|
@@ -2888,126 +2939,126 @@ const Ko = (e) => {
|
|
|
2888
2939
|
onRemoveCondition: a,
|
|
2889
2940
|
onRestoreConditions: s,
|
|
2890
2941
|
fullTemplate: d
|
|
2891
|
-
} = e, { formik: l, handleToggleNoneChange: p } =
|
|
2942
|
+
} = e, { formik: l, handleToggleNoneChange: p } = _o({
|
|
2892
2943
|
decision: n,
|
|
2893
2944
|
onSubmitEvent: t,
|
|
2894
2945
|
textValues: r
|
|
2895
2946
|
}), c = Pe(d ?? n), g = Pe(n), f = ht(
|
|
2896
2947
|
g,
|
|
2897
|
-
(
|
|
2948
|
+
(I) => !I.hidden
|
|
2898
2949
|
), h = Object.keys(f), x = [
|
|
2899
|
-
...h.filter((
|
|
2900
|
-
...h.filter((
|
|
2950
|
+
...h.filter((I) => I === "group-primary"),
|
|
2951
|
+
...h.filter((I) => I !== "group-primary")
|
|
2901
2952
|
], b = {};
|
|
2902
2953
|
let D = 1;
|
|
2903
|
-
const T = x.map((
|
|
2904
|
-
const U =
|
|
2905
|
-
return b[U] =
|
|
2954
|
+
const T = x.map((I) => {
|
|
2955
|
+
const U = I === "group-primary" ? "mainCondition" : `alternateCondition-${D++}`;
|
|
2956
|
+
return b[U] = I, {
|
|
2906
2957
|
id: U,
|
|
2907
|
-
label:
|
|
2958
|
+
label: I === "group-primary" ? Yn(I, 0) : Yn(I, Number(U.split("-").at(-1))),
|
|
2908
2959
|
isDisabled: !1
|
|
2909
2960
|
};
|
|
2910
|
-
}), [S, N] =
|
|
2911
|
-
((
|
|
2912
|
-
), w = (
|
|
2913
|
-
const
|
|
2961
|
+
}), [S, N] = P.useState(
|
|
2962
|
+
((L = T[0]) == null ? void 0 : L.id) ?? "mainCondition"
|
|
2963
|
+
), w = (I) => N(I), F = b[S] ?? "group-primary", O = P.useMemo(() => {
|
|
2964
|
+
const I = [
|
|
2914
2965
|
...Object.keys(f).filter((K) => K === "group-primary"),
|
|
2915
2966
|
...Object.keys(f).filter((K) => K !== "group-primary")
|
|
2916
2967
|
];
|
|
2917
2968
|
let U = !1;
|
|
2918
|
-
const Q =
|
|
2919
|
-
const At = (f[K] ?? []).map((
|
|
2920
|
-
const
|
|
2921
|
-
|
|
2922
|
-
const It =
|
|
2923
|
-
label:
|
|
2969
|
+
const Q = I.map((K) => {
|
|
2970
|
+
const At = (f[K] ?? []).map((Ke, $t) => {
|
|
2971
|
+
const Pn = !U && K === "group-primary" && $t === 0;
|
|
2972
|
+
Pn && (U = !0);
|
|
2973
|
+
const It = Jo(Ke.howToSetTheCondition ?? Ke.valueUse), Rt = qo({
|
|
2974
|
+
label: Ke.labelName || "",
|
|
2924
2975
|
howToSet: It,
|
|
2925
|
-
isFirst:
|
|
2976
|
+
isFirst: Pn
|
|
2926
2977
|
});
|
|
2927
|
-
return { ...
|
|
2978
|
+
return { ...Ke, labelName: Rt };
|
|
2928
2979
|
});
|
|
2929
2980
|
return [K, At];
|
|
2930
2981
|
});
|
|
2931
2982
|
return Object.fromEntries(Q);
|
|
2932
|
-
}, [f]),
|
|
2983
|
+
}, [f]), $ = O[F] ?? [], V = O["group-primary"] ?? [], Z = {
|
|
2933
2984
|
decisionDataType: n.decisionDataType,
|
|
2934
2985
|
howToSetTheCondition: n.howToSetTheDecision,
|
|
2935
2986
|
labelName: n.labelName,
|
|
2936
2987
|
listOfPossibleValues: n.listOfPossibleValues,
|
|
2937
2988
|
ruleName: n.ruleName
|
|
2938
|
-
}, be = l.submitCount > 0 || !!l.touched.effectiveFrom, ve = l.submitCount > 0 || !!l.touched.validUntil,
|
|
2939
|
-
const
|
|
2940
|
-
if (!
|
|
2941
|
-
if (typeof
|
|
2989
|
+
}, be = l.submitCount > 0 || !!l.touched.effectiveFrom, ve = l.submitCount > 0 || !!l.touched.validUntil, fe = be ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, ae = ve ? l.errors.validUntil ? "invalid" : "valid" : void 0, ye = P.useMemo(() => {
|
|
2990
|
+
const I = l.errors.conditionsThatEstablishesTheDecision;
|
|
2991
|
+
if (!I) return;
|
|
2992
|
+
if (typeof I == "string") return I;
|
|
2942
2993
|
const U = (Q) => {
|
|
2943
2994
|
if (Q) {
|
|
2944
2995
|
if (typeof Q == "string") return Q;
|
|
2945
2996
|
if (Array.isArray(Q))
|
|
2946
2997
|
for (const K of Q) {
|
|
2947
|
-
const
|
|
2948
|
-
if (
|
|
2998
|
+
const we = U(K);
|
|
2999
|
+
if (we) return we;
|
|
2949
3000
|
}
|
|
2950
3001
|
else if (typeof Q == "object")
|
|
2951
3002
|
for (const K of Object.values(Q)) {
|
|
2952
|
-
const
|
|
2953
|
-
if (
|
|
3003
|
+
const we = U(K);
|
|
3004
|
+
if (we) return we;
|
|
2954
3005
|
}
|
|
2955
3006
|
}
|
|
2956
3007
|
};
|
|
2957
|
-
return U(
|
|
2958
|
-
}, [l.errors.conditionsThatEstablishesTheDecision]),
|
|
2959
|
-
const Q = Object.values(c).flat().find((
|
|
3008
|
+
return U(I);
|
|
3009
|
+
}, [l.errors.conditionsThatEstablishesTheDecision]), Ne = l.submitCount > 0 && !!ye, ue = (I) => I != null && I.isMulti || I != null && I.multiple || (I == null ? void 0 : I.valueUse) === "Among" ? [] : "", xe = (I) => {
|
|
3010
|
+
const Q = Object.values(c).flat().find((we) => we.conditionName === I), K = ue(Q);
|
|
2960
3011
|
l.setFieldValue(
|
|
2961
|
-
`conditionsThatEstablishesTheDecision.${
|
|
3012
|
+
`conditionsThatEstablishesTheDecision.${I}`,
|
|
2962
3013
|
K
|
|
2963
3014
|
), l.setFieldTouched(
|
|
2964
|
-
`conditionsThatEstablishesTheDecision.${
|
|
3015
|
+
`conditionsThatEstablishesTheDecision.${I}`,
|
|
2965
3016
|
!1,
|
|
2966
3017
|
!1
|
|
2967
3018
|
);
|
|
2968
|
-
},
|
|
2969
|
-
(c[
|
|
3019
|
+
}, Te = () => {
|
|
3020
|
+
(c[F] ?? []).forEach((U) => {
|
|
2970
3021
|
const Q = `conditionsThatEstablishesTheDecision.${U.conditionName}`;
|
|
2971
|
-
l.setFieldValue(Q,
|
|
3022
|
+
l.setFieldValue(Q, ue(U)), l.setFieldTouched(Q, !1, !1);
|
|
2972
3023
|
});
|
|
2973
|
-
}, [me, le] =
|
|
3024
|
+
}, [me, le] = P.useState(!1);
|
|
2974
3025
|
return /* @__PURE__ */ i(
|
|
2975
|
-
|
|
3026
|
+
Ho,
|
|
2976
3027
|
{
|
|
2977
3028
|
activeTab: S,
|
|
2978
3029
|
conditionsErrorText: ye,
|
|
2979
|
-
currentConditions:
|
|
3030
|
+
currentConditions: $,
|
|
2980
3031
|
decision: n,
|
|
2981
3032
|
formik: l,
|
|
2982
|
-
normalizedDecision:
|
|
3033
|
+
normalizedDecision: Z,
|
|
2983
3034
|
onCancel: o,
|
|
2984
|
-
onRedefineCurrentTab:
|
|
3035
|
+
onRedefineCurrentTab: Te,
|
|
2985
3036
|
onTabChange: w,
|
|
2986
|
-
onClearCondition: (
|
|
2987
|
-
xe(
|
|
3037
|
+
onClearCondition: (I) => {
|
|
3038
|
+
xe(I), a == null || a(I);
|
|
2988
3039
|
},
|
|
2989
|
-
showConditionsError:
|
|
3040
|
+
showConditionsError: Ne,
|
|
2990
3041
|
tabs: T,
|
|
2991
|
-
termEndStatus:
|
|
2992
|
-
termStartStatus:
|
|
3042
|
+
termEndStatus: ae,
|
|
3043
|
+
termStartStatus: fe,
|
|
2993
3044
|
textValues: r,
|
|
2994
|
-
visibleConditions:
|
|
2995
|
-
visibleConditionsByGroup:
|
|
3045
|
+
visibleConditions: V,
|
|
3046
|
+
visibleConditionsByGroup: O,
|
|
2996
3047
|
handleToggleNoneChange: p,
|
|
2997
3048
|
portalId: "redefine-confirm-portal",
|
|
2998
3049
|
showRedefineConfirm: me,
|
|
2999
3050
|
onOpenRedefineConfirm: () => le(!0),
|
|
3000
3051
|
onCloseRedefineConfirm: () => le(!1),
|
|
3001
3052
|
onConfirmRedefine: () => {
|
|
3002
|
-
|
|
3003
|
-
const
|
|
3053
|
+
Te();
|
|
3054
|
+
const I = (c[F] ?? []).map(
|
|
3004
3055
|
(U) => U.conditionName
|
|
3005
3056
|
);
|
|
3006
|
-
s == null || s(
|
|
3057
|
+
s == null || s(I), le(!1);
|
|
3007
3058
|
}
|
|
3008
3059
|
}
|
|
3009
3060
|
);
|
|
3010
|
-
},
|
|
3061
|
+
}, vl = (e) => {
|
|
3011
3062
|
const {
|
|
3012
3063
|
cardTitle: n = !0,
|
|
3013
3064
|
controls: t = !0,
|
|
@@ -3027,7 +3078,7 @@ const Ko = (e) => {
|
|
|
3027
3078
|
onRemoveCondition: b,
|
|
3028
3079
|
onRestoreConditions: D,
|
|
3029
3080
|
baseDecisionTemplate: T
|
|
3030
|
-
} = e, [S, N] =
|
|
3081
|
+
} = e, [S, N] = H(null), w = re("(max-width: 681px)"), { renderedCards: F, shouldRenderAddCard: O } = Io({
|
|
3031
3082
|
cardTitle: n,
|
|
3032
3083
|
controls: t,
|
|
3033
3084
|
customTitleContentAddCard: r,
|
|
@@ -3036,11 +3087,11 @@ const Ko = (e) => {
|
|
|
3036
3087
|
handleOpenModal: c,
|
|
3037
3088
|
handleDelete: h,
|
|
3038
3089
|
textValues: s,
|
|
3039
|
-
isOpenFor: (
|
|
3040
|
-
toggleAt: (
|
|
3041
|
-
}),
|
|
3042
|
-
return /* @__PURE__ */ m(
|
|
3043
|
-
/* @__PURE__ */ i(
|
|
3090
|
+
isOpenFor: (V) => S === V,
|
|
3091
|
+
toggleAt: (V) => N((Z) => Z === V ? null : V)
|
|
3092
|
+
}), $ = (a == null ? void 0 : a.length) === 0 && !u;
|
|
3093
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
3094
|
+
/* @__PURE__ */ i(So, { children: /* @__PURE__ */ i(Eo, { children: /* @__PURE__ */ i(y, { direction: "column", gap: "16px", padding: "6px", children: $ ? /* @__PURE__ */ i(je, { legend: "Decisiones", children: /* @__PURE__ */ m(
|
|
3044
3095
|
y,
|
|
3045
3096
|
{
|
|
3046
3097
|
direction: "column",
|
|
@@ -3050,15 +3101,15 @@ const Ko = (e) => {
|
|
|
3050
3101
|
alignItems: "center",
|
|
3051
3102
|
children: [
|
|
3052
3103
|
/* @__PURE__ */ i(
|
|
3053
|
-
|
|
3104
|
+
j,
|
|
3054
3105
|
{
|
|
3055
3106
|
appearance: "help",
|
|
3056
|
-
icon: /* @__PURE__ */ i(
|
|
3107
|
+
icon: /* @__PURE__ */ i(Pt, {}),
|
|
3057
3108
|
size: "40px"
|
|
3058
3109
|
}
|
|
3059
3110
|
),
|
|
3060
3111
|
/* @__PURE__ */ i(
|
|
3061
|
-
|
|
3112
|
+
R,
|
|
3062
3113
|
{
|
|
3063
3114
|
type: "title",
|
|
3064
3115
|
size: "medium",
|
|
@@ -3067,7 +3118,7 @@ const Ko = (e) => {
|
|
|
3067
3118
|
children: "Sin decisiones"
|
|
3068
3119
|
}
|
|
3069
3120
|
),
|
|
3070
|
-
/* @__PURE__ */ i(
|
|
3121
|
+
/* @__PURE__ */ i(R, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */ m(z, { children: [
|
|
3071
3122
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
3072
3123
|
r || ' "Agregar decisión"'
|
|
3073
3124
|
] }) })
|
|
@@ -3086,8 +3137,8 @@ const Ko = (e) => {
|
|
|
3086
3137
|
padding: "6px",
|
|
3087
3138
|
height: w ? "auto" : "484px",
|
|
3088
3139
|
children: [
|
|
3089
|
-
|
|
3090
|
-
|
|
3140
|
+
F,
|
|
3141
|
+
O && Sn({
|
|
3091
3142
|
type: "add",
|
|
3092
3143
|
index: a == null ? void 0 : a.length,
|
|
3093
3144
|
controls: t,
|
|
@@ -3097,21 +3148,21 @@ const Ko = (e) => {
|
|
|
3097
3148
|
handleOpenModal: c,
|
|
3098
3149
|
handleDelete: h,
|
|
3099
3150
|
textValues: s,
|
|
3100
|
-
shouldRenderEmptyMessage:
|
|
3151
|
+
shouldRenderEmptyMessage: $,
|
|
3101
3152
|
terms: x
|
|
3102
3153
|
})
|
|
3103
3154
|
]
|
|
3104
3155
|
}
|
|
3105
3156
|
) }) }) }),
|
|
3106
3157
|
l && /* @__PURE__ */ i(
|
|
3107
|
-
|
|
3158
|
+
Lo,
|
|
3108
3159
|
{
|
|
3109
3160
|
portalId: "modal-portal",
|
|
3110
3161
|
onCloseModal: g,
|
|
3111
3162
|
title: p ? "Editar Decisión" : "Configurar Decisión",
|
|
3112
3163
|
description: "Diligencia los campos para configurar tu decisión.",
|
|
3113
3164
|
children: /* @__PURE__ */ i(
|
|
3114
|
-
|
|
3165
|
+
ea,
|
|
3115
3166
|
{
|
|
3116
3167
|
decision: p || d,
|
|
3117
3168
|
fullTemplate: T ?? d,
|
|
@@ -3126,16 +3177,16 @@ const Ko = (e) => {
|
|
|
3126
3177
|
}
|
|
3127
3178
|
)
|
|
3128
3179
|
] });
|
|
3129
|
-
},
|
|
3180
|
+
}, na = {
|
|
3130
3181
|
border: {
|
|
3131
3182
|
color: E.palette.neutral.N40
|
|
3132
3183
|
}
|
|
3133
|
-
},
|
|
3184
|
+
}, ta = C.div`
|
|
3134
3185
|
border-width: 1px;
|
|
3135
3186
|
border-style: solid;
|
|
3136
3187
|
border-color: ${({ theme: e }) => {
|
|
3137
3188
|
var n, t;
|
|
3138
|
-
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) ||
|
|
3189
|
+
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || na.border.color;
|
|
3139
3190
|
}};
|
|
3140
3191
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
3141
3192
|
margin: ${({ $margin: e }) => e};
|
|
@@ -3144,7 +3195,7 @@ const Ko = (e) => {
|
|
|
3144
3195
|
height: ${({ $height: e }) => e};
|
|
3145
3196
|
box-sizing: border-box;
|
|
3146
3197
|
`;
|
|
3147
|
-
function
|
|
3198
|
+
function ra(e) {
|
|
3148
3199
|
const {
|
|
3149
3200
|
children: n,
|
|
3150
3201
|
padding: t = "16px",
|
|
@@ -3154,7 +3205,7 @@ function na(e) {
|
|
|
3154
3205
|
height: s
|
|
3155
3206
|
} = e;
|
|
3156
3207
|
return /* @__PURE__ */ i(
|
|
3157
|
-
|
|
3208
|
+
ta,
|
|
3158
3209
|
{
|
|
3159
3210
|
$padding: t,
|
|
3160
3211
|
$margin: r,
|
|
@@ -3165,9 +3216,9 @@ function na(e) {
|
|
|
3165
3216
|
}
|
|
3166
3217
|
);
|
|
3167
3218
|
}
|
|
3168
|
-
const
|
|
3169
|
-
const [t, r] =
|
|
3170
|
-
return
|
|
3219
|
+
const oa = (e, n) => {
|
|
3220
|
+
const [t, r] = H([]), [o, a] = H([]), [s, d] = H(!1), l = Fe(null);
|
|
3221
|
+
return $e(() => {
|
|
3171
3222
|
if (!e.current || !l.current) return;
|
|
3172
3223
|
const p = e.current, u = l.current, c = () => {
|
|
3173
3224
|
var S;
|
|
@@ -3192,19 +3243,19 @@ C.div`
|
|
|
3192
3243
|
width: 100%;
|
|
3193
3244
|
}
|
|
3194
3245
|
`;
|
|
3195
|
-
const
|
|
3246
|
+
const aa = C.div`
|
|
3196
3247
|
position: absolute;
|
|
3197
3248
|
top: calc(100% + 4px);
|
|
3198
3249
|
right: 0;
|
|
3199
3250
|
z-index: 1000;
|
|
3200
3251
|
width: 170px;
|
|
3201
|
-
`,
|
|
3252
|
+
`, ia = C.div`
|
|
3202
3253
|
position: absolute;
|
|
3203
3254
|
visibility: hidden;
|
|
3204
3255
|
pointer-events: none;
|
|
3205
3256
|
height: 0;
|
|
3206
3257
|
overflow: hidden;
|
|
3207
|
-
`,
|
|
3258
|
+
`, la = C.div`
|
|
3208
3259
|
cursor: pointer;
|
|
3209
3260
|
`, En = {
|
|
3210
3261
|
border: {
|
|
@@ -3242,7 +3293,7 @@ const ra = C.div`
|
|
|
3242
3293
|
hover: E.palette.neutral.N30
|
|
3243
3294
|
}
|
|
3244
3295
|
}
|
|
3245
|
-
},
|
|
3296
|
+
}, sa = C.li`
|
|
3246
3297
|
display: flex;
|
|
3247
3298
|
align-items: center;
|
|
3248
3299
|
align-self: stretch;
|
|
@@ -3260,11 +3311,11 @@ const ra = C.div`
|
|
|
3260
3311
|
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) || En.background.color.regular;
|
|
3261
3312
|
}};
|
|
3262
3313
|
}
|
|
3263
|
-
`,
|
|
3314
|
+
`, da = (e) => {
|
|
3264
3315
|
var g, f, h, x, b, D;
|
|
3265
|
-
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, s] =
|
|
3316
|
+
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, s] = H(!1), d = () => s(!0), l = () => s(!1), p = Fn(In), u = ((h = (f = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : h.hover) ?? En.option.appearance.hover, c = ((D = (b = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : b.appearance) == null ? void 0 : D.regular) ?? En.option.appearance.regular;
|
|
3266
3317
|
return /* @__PURE__ */ i(
|
|
3267
|
-
|
|
3318
|
+
sa,
|
|
3268
3319
|
{
|
|
3269
3320
|
id: n,
|
|
3270
3321
|
onMouseEnter: d,
|
|
@@ -3281,7 +3332,7 @@ const ra = C.div`
|
|
|
3281
3332
|
width: "100%",
|
|
3282
3333
|
children: [
|
|
3283
3334
|
r && /* @__PURE__ */ i(
|
|
3284
|
-
|
|
3335
|
+
j,
|
|
3285
3336
|
{
|
|
3286
3337
|
icon: r,
|
|
3287
3338
|
size: "medium",
|
|
@@ -3289,7 +3340,7 @@ const ra = C.div`
|
|
|
3289
3340
|
}
|
|
3290
3341
|
),
|
|
3291
3342
|
/* @__PURE__ */ i(
|
|
3292
|
-
|
|
3343
|
+
R,
|
|
3293
3344
|
{
|
|
3294
3345
|
textAlign: "start",
|
|
3295
3346
|
size: "medium",
|
|
@@ -3298,7 +3349,7 @@ const ra = C.div`
|
|
|
3298
3349
|
}
|
|
3299
3350
|
),
|
|
3300
3351
|
/* @__PURE__ */ i(
|
|
3301
|
-
|
|
3352
|
+
j,
|
|
3302
3353
|
{
|
|
3303
3354
|
icon: /* @__PURE__ */ i(zt, {}),
|
|
3304
3355
|
size: "small",
|
|
@@ -3314,7 +3365,7 @@ const ra = C.div`
|
|
|
3314
3365
|
)
|
|
3315
3366
|
}
|
|
3316
3367
|
);
|
|
3317
|
-
},
|
|
3368
|
+
}, yl = (e) => {
|
|
3318
3369
|
const {
|
|
3319
3370
|
appliedFilters: n = [],
|
|
3320
3371
|
onClear: t,
|
|
@@ -3322,19 +3373,19 @@ const ra = C.div`
|
|
|
3322
3373
|
noFiltersLabel: o,
|
|
3323
3374
|
titleClearFilter: a,
|
|
3324
3375
|
titleFilter: s
|
|
3325
|
-
} = e, d =
|
|
3376
|
+
} = e, d = Fe(null), l = Fe(null), p = Fe(null), {
|
|
3326
3377
|
visible: u,
|
|
3327
3378
|
hidden: c,
|
|
3328
3379
|
showOverflowIndicator: g,
|
|
3329
3380
|
measurementRef: f
|
|
3330
|
-
} =
|
|
3331
|
-
w.stopPropagation(), x((
|
|
3381
|
+
} = oa(d, n), [h, x] = H(!1), b = (w) => {
|
|
3382
|
+
w.stopPropagation(), x((F) => !F);
|
|
3332
3383
|
};
|
|
3333
|
-
|
|
3334
|
-
const w = (
|
|
3335
|
-
var
|
|
3336
|
-
const
|
|
3337
|
-
!((
|
|
3384
|
+
$e(() => {
|
|
3385
|
+
const w = (F) => {
|
|
3386
|
+
var V, Z;
|
|
3387
|
+
const O = F.target;
|
|
3388
|
+
!((V = l.current) != null && V.contains(O)) && !((Z = p.current) != null && Z.contains(O)) && x(!1);
|
|
3338
3389
|
};
|
|
3339
3390
|
return h && window.addEventListener("mousedown", w), () => window.removeEventListener("mousedown", w);
|
|
3340
3391
|
}, [h]);
|
|
@@ -3344,12 +3395,12 @@ const ra = C.div`
|
|
|
3344
3395
|
label: w.label,
|
|
3345
3396
|
icon: w.icon
|
|
3346
3397
|
})), N = (w) => {
|
|
3347
|
-
var
|
|
3348
|
-
(
|
|
3398
|
+
var F, O;
|
|
3399
|
+
(O = (F = c.find(($) => $.label === w)) == null ? void 0 : F.onClose) == null || O.call(F), x(!1);
|
|
3349
3400
|
};
|
|
3350
|
-
return /* @__PURE__ */ m(
|
|
3351
|
-
/* @__PURE__ */ i(
|
|
3352
|
-
|
|
3401
|
+
return /* @__PURE__ */ m(ra, { borderRadius: "8px", width: "100%", children: [
|
|
3402
|
+
/* @__PURE__ */ i(ia, { ref: f, children: n.map((w) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
|
|
3403
|
+
ke,
|
|
3353
3404
|
{
|
|
3354
3405
|
appearance: "primary",
|
|
3355
3406
|
displayIcon: !0,
|
|
@@ -3361,7 +3412,7 @@ const ra = C.div`
|
|
|
3361
3412
|
) }, w.label)) }),
|
|
3362
3413
|
/* @__PURE__ */ m(Xe, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
3363
3414
|
/* @__PURE__ */ i(
|
|
3364
|
-
|
|
3415
|
+
ie,
|
|
3365
3416
|
{
|
|
3366
3417
|
ref: d,
|
|
3367
3418
|
background: !0,
|
|
@@ -3372,9 +3423,9 @@ const ra = C.div`
|
|
|
3372
3423
|
alignItems: "center",
|
|
3373
3424
|
padding: "0px 8px",
|
|
3374
3425
|
border: !0,
|
|
3375
|
-
children: D ? /* @__PURE__ */ i(
|
|
3426
|
+
children: D ? /* @__PURE__ */ i(R, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(z, { children: [
|
|
3376
3427
|
u.map((w) => /* @__PURE__ */ i(
|
|
3377
|
-
|
|
3428
|
+
ke,
|
|
3378
3429
|
{
|
|
3379
3430
|
"data-filter-tag": "true",
|
|
3380
3431
|
appearance: "primary",
|
|
@@ -3392,27 +3443,27 @@ const ra = C.div`
|
|
|
3392
3443
|
ref: p,
|
|
3393
3444
|
style: { position: "relative", display: "inline-block" },
|
|
3394
3445
|
children: [
|
|
3395
|
-
/* @__PURE__ */ i(
|
|
3396
|
-
|
|
3446
|
+
/* @__PURE__ */ i(la, { onClick: b, children: /* @__PURE__ */ i(
|
|
3447
|
+
ke,
|
|
3397
3448
|
{
|
|
3398
3449
|
appearance: "primary",
|
|
3399
3450
|
label: `+${c.length}`
|
|
3400
3451
|
}
|
|
3401
3452
|
) }),
|
|
3402
|
-
T && /* @__PURE__ */ i(
|
|
3453
|
+
T && /* @__PURE__ */ i(aa, { ref: l, children: /* @__PURE__ */ i(
|
|
3403
3454
|
Gt,
|
|
3404
3455
|
{
|
|
3405
3456
|
options: S,
|
|
3406
3457
|
onOptionClick: N,
|
|
3407
3458
|
children: c.map((w) => /* @__PURE__ */ i(
|
|
3408
|
-
|
|
3459
|
+
da,
|
|
3409
3460
|
{
|
|
3410
3461
|
id: w.label,
|
|
3411
3462
|
label: w.label,
|
|
3412
3463
|
leadingIcon: w.icon,
|
|
3413
3464
|
onClose: () => {
|
|
3414
|
-
var
|
|
3415
|
-
(
|
|
3465
|
+
var F;
|
|
3466
|
+
(F = w.onClose) == null || F.call(w), x(!1);
|
|
3416
3467
|
}
|
|
3417
3468
|
},
|
|
3418
3469
|
w.label
|
|
@@ -3426,7 +3477,7 @@ const ra = C.div`
|
|
|
3426
3477
|
}
|
|
3427
3478
|
),
|
|
3428
3479
|
/* @__PURE__ */ i(
|
|
3429
|
-
|
|
3480
|
+
B,
|
|
3430
3481
|
{
|
|
3431
3482
|
cursorHover: !0,
|
|
3432
3483
|
disabled: D,
|
|
@@ -3437,7 +3488,7 @@ const ra = C.div`
|
|
|
3437
3488
|
}
|
|
3438
3489
|
),
|
|
3439
3490
|
/* @__PURE__ */ i(
|
|
3440
|
-
|
|
3491
|
+
B,
|
|
3441
3492
|
{
|
|
3442
3493
|
cursorHover: !0,
|
|
3443
3494
|
iconBefore: /* @__PURE__ */ i(lt, {}),
|
|
@@ -3448,7 +3499,7 @@ const ra = C.div`
|
|
|
3448
3499
|
)
|
|
3449
3500
|
] })
|
|
3450
3501
|
] });
|
|
3451
|
-
},
|
|
3502
|
+
}, ca = C.div`
|
|
3452
3503
|
display: flex;
|
|
3453
3504
|
flex-direction: column;
|
|
3454
3505
|
background-color: ${({ theme: e }) => {
|
|
@@ -3461,7 +3512,7 @@ const ra = C.div`
|
|
|
3461
3512
|
padding: 24px;
|
|
3462
3513
|
gap: 24px;
|
|
3463
3514
|
box-sizing: border-box;
|
|
3464
|
-
`,
|
|
3515
|
+
`, xl = (e) => {
|
|
3465
3516
|
const {
|
|
3466
3517
|
actionButtonLabel: n,
|
|
3467
3518
|
cancelButtonLabel: t,
|
|
@@ -3471,20 +3522,20 @@ const ra = C.div`
|
|
|
3471
3522
|
onCloseModal: s,
|
|
3472
3523
|
portalId: d,
|
|
3473
3524
|
title: l
|
|
3474
|
-
} = e, p =
|
|
3525
|
+
} = e, p = re("(max-width: 768px)"), u = document.getElementById(d);
|
|
3475
3526
|
if (!u)
|
|
3476
3527
|
throw new Error(
|
|
3477
3528
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
3478
3529
|
);
|
|
3479
3530
|
return pn(
|
|
3480
|
-
/* @__PURE__ */ i(cn, { children: /* @__PURE__ */ m(
|
|
3531
|
+
/* @__PURE__ */ i(cn, { children: /* @__PURE__ */ m(ca, { $smallScreen: p, children: [
|
|
3481
3532
|
/* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
3482
3533
|
/* @__PURE__ */ m(y, { alignContent: "center", justifyContent: "space-between", children: [
|
|
3483
|
-
/* @__PURE__ */ i(
|
|
3534
|
+
/* @__PURE__ */ i(R, { appearance: "dark", size: "small", type: "headline", children: l }),
|
|
3484
3535
|
/* @__PURE__ */ m(y, { alignItems: "center", children: [
|
|
3485
|
-
/* @__PURE__ */ i(
|
|
3536
|
+
/* @__PURE__ */ i(R, { children: "Cerrar" }),
|
|
3486
3537
|
/* @__PURE__ */ i(
|
|
3487
|
-
|
|
3538
|
+
j,
|
|
3488
3539
|
{
|
|
3489
3540
|
appearance: "dark",
|
|
3490
3541
|
icon: /* @__PURE__ */ i(dn, {}),
|
|
@@ -3494,12 +3545,12 @@ const ra = C.div`
|
|
|
3494
3545
|
)
|
|
3495
3546
|
] })
|
|
3496
3547
|
] }),
|
|
3497
|
-
/* @__PURE__ */ i(
|
|
3548
|
+
/* @__PURE__ */ i(G, {})
|
|
3498
3549
|
] }),
|
|
3499
3550
|
r,
|
|
3500
3551
|
/* @__PURE__ */ m(y, { gap: "20px", justifyContent: "flex-end", children: [
|
|
3501
3552
|
/* @__PURE__ */ i(
|
|
3502
|
-
|
|
3553
|
+
B,
|
|
3503
3554
|
{
|
|
3504
3555
|
appearance: "gray",
|
|
3505
3556
|
onClick: s,
|
|
@@ -3510,7 +3561,7 @@ const ra = C.div`
|
|
|
3510
3561
|
}
|
|
3511
3562
|
),
|
|
3512
3563
|
/* @__PURE__ */ i(
|
|
3513
|
-
|
|
3564
|
+
B,
|
|
3514
3565
|
{
|
|
3515
3566
|
appearance: "primary",
|
|
3516
3567
|
loading: o,
|
|
@@ -3524,14 +3575,14 @@ const ra = C.div`
|
|
|
3524
3575
|
] }) }),
|
|
3525
3576
|
u
|
|
3526
3577
|
);
|
|
3527
|
-
},
|
|
3528
|
-
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a =
|
|
3578
|
+
}, Tl = (e) => {
|
|
3579
|
+
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a = re("(max-width: 768px)"), s = !n || n.length === 0;
|
|
3529
3580
|
return /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
3530
|
-
a && /* @__PURE__ */ m(
|
|
3581
|
+
a && /* @__PURE__ */ m(z, { children: [
|
|
3531
3582
|
/* @__PURE__ */ m(y, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
3532
|
-
/* @__PURE__ */ i(
|
|
3583
|
+
/* @__PURE__ */ i(j, { appearance: "gray", icon: /* @__PURE__ */ i(lt, {}) }),
|
|
3533
3584
|
/* @__PURE__ */ i(
|
|
3534
|
-
|
|
3585
|
+
ie,
|
|
3535
3586
|
{
|
|
3536
3587
|
background: !0,
|
|
3537
3588
|
borderRadius: "8px",
|
|
@@ -3542,8 +3593,8 @@ const ra = C.div`
|
|
|
3542
3593
|
border: !0,
|
|
3543
3594
|
width: "100%",
|
|
3544
3595
|
height: "36px",
|
|
3545
|
-
children: s ? /* @__PURE__ */ i(
|
|
3546
|
-
|
|
3596
|
+
children: s ? /* @__PURE__ */ i(R, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ i(
|
|
3597
|
+
ke,
|
|
3547
3598
|
{
|
|
3548
3599
|
appearance: "primary",
|
|
3549
3600
|
displayIcon: !0,
|
|
@@ -3557,10 +3608,10 @@ const ra = C.div`
|
|
|
3557
3608
|
}
|
|
3558
3609
|
)
|
|
3559
3610
|
] }),
|
|
3560
|
-
/* @__PURE__ */ i(
|
|
3611
|
+
/* @__PURE__ */ i(G, { dashed: !0 })
|
|
3561
3612
|
] }),
|
|
3562
3613
|
t.map((d) => /* @__PURE__ */ m(y, { gap: "6px", alignItems: "center", children: [
|
|
3563
|
-
/* @__PURE__ */ i(y, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(
|
|
3614
|
+
/* @__PURE__ */ i(y, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(j, { appearance: "primary", icon: d.icon }) }),
|
|
3564
3615
|
/* @__PURE__ */ i(
|
|
3565
3616
|
Yt,
|
|
3566
3617
|
{
|
|
@@ -3580,12 +3631,12 @@ const ra = C.div`
|
|
|
3580
3631
|
)
|
|
3581
3632
|
] }, d.name))
|
|
3582
3633
|
] });
|
|
3583
|
-
},
|
|
3634
|
+
}, ua = (e) => {
|
|
3584
3635
|
const n = [];
|
|
3585
3636
|
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(";");
|
|
3586
|
-
},
|
|
3637
|
+
}, wl = (e) => {
|
|
3587
3638
|
var s;
|
|
3588
|
-
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ?
|
|
3639
|
+
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? ua(d) : d, a = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
|
|
3589
3640
|
var c;
|
|
3590
3641
|
const p = d == null ? void 0 : d.value;
|
|
3591
3642
|
return p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0 ? null : {
|
|
@@ -3601,7 +3652,7 @@ const ra = C.div`
|
|
|
3601
3652
|
value: o(n.value),
|
|
3602
3653
|
conditionsThatEstablishesTheDecision: a
|
|
3603
3654
|
};
|
|
3604
|
-
},
|
|
3655
|
+
}, Cl = (e) => {
|
|
3605
3656
|
if (typeof e != "string") return e;
|
|
3606
3657
|
const n = e.split(";").map((r) => r.trim()), t = {};
|
|
3607
3658
|
for (const r of n)
|
|
@@ -3613,7 +3664,7 @@ const ra = C.div`
|
|
|
3613
3664
|
isNaN(o) || (t.to = o);
|
|
3614
3665
|
}
|
|
3615
3666
|
return t.from !== void 0 || t.to !== void 0 ? t : e;
|
|
3616
|
-
},
|
|
3667
|
+
}, Dl = (e) => {
|
|
3617
3668
|
const { dataDecision: n, originalDecision: t } = e, r = {
|
|
3618
3669
|
conditionName: n.ruleName || "",
|
|
3619
3670
|
labelName: n.labelName || "",
|
|
@@ -3629,7 +3680,7 @@ const ra = C.div`
|
|
|
3629
3680
|
(o) => o.hidden ? { ...r } : o
|
|
3630
3681
|
)
|
|
3631
3682
|
};
|
|
3632
|
-
},
|
|
3683
|
+
}, Sl = (e) => {
|
|
3633
3684
|
const { decisions: n } = e;
|
|
3634
3685
|
return n == null ? void 0 : n.map((t) => {
|
|
3635
3686
|
var o;
|
|
@@ -3648,15 +3699,15 @@ const ra = C.div`
|
|
|
3648
3699
|
)
|
|
3649
3700
|
} : t;
|
|
3650
3701
|
});
|
|
3651
|
-
},
|
|
3702
|
+
}, pa = (e) => ({
|
|
3652
3703
|
schema: de().required("Requerido").test(
|
|
3653
3704
|
"non-empty",
|
|
3654
3705
|
"El valor no puede estar vacío",
|
|
3655
3706
|
(n) => n != null && n.trim() !== ""
|
|
3656
3707
|
),
|
|
3657
3708
|
value: e
|
|
3658
|
-
}),
|
|
3659
|
-
schema:
|
|
3709
|
+
}), ga = (e) => ({
|
|
3710
|
+
schema: Ve().test(
|
|
3660
3711
|
"isArrayOrString",
|
|
3661
3712
|
"Debe ser un array de strings/numbers o un solo string",
|
|
3662
3713
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -3664,8 +3715,8 @@ const ra = C.div`
|
|
|
3664
3715
|
) : typeof n == "string"
|
|
3665
3716
|
),
|
|
3666
3717
|
value: e
|
|
3667
|
-
}),
|
|
3668
|
-
schema:
|
|
3718
|
+
}), ha = (e) => ({
|
|
3719
|
+
schema: Ve().test(
|
|
3669
3720
|
"isArrayOrString",
|
|
3670
3721
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
3671
3722
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -3673,10 +3724,10 @@ const ra = C.div`
|
|
|
3673
3724
|
) : typeof n == "string"
|
|
3674
3725
|
),
|
|
3675
3726
|
value: e
|
|
3676
|
-
}),
|
|
3727
|
+
}), fa = (e) => {
|
|
3677
3728
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
3678
3729
|
return {
|
|
3679
|
-
schema:
|
|
3730
|
+
schema: te({
|
|
3680
3731
|
from: ce().required("El campo 'Rango desde' es requerido").max(t, "'Rango desde' no puede ser mayor que 'Rango hasta'").min(0, "'Rango desde' no puede ser menor que 0"),
|
|
3681
3732
|
to: ce().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
|
|
3682
3733
|
"is-greater",
|
|
@@ -3689,28 +3740,28 @@ const ra = C.div`
|
|
|
3689
3740
|
}),
|
|
3690
3741
|
value: { from: n, to: t }
|
|
3691
3742
|
};
|
|
3692
|
-
}, yn = (e, n) => n ===
|
|
3743
|
+
}, yn = (e, n) => n === q.PERCENTAGE ? {
|
|
3693
3744
|
schema: ce().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"),
|
|
3694
3745
|
value: e
|
|
3695
3746
|
} : {
|
|
3696
3747
|
schema: de().required("Requerido"),
|
|
3697
3748
|
value: e
|
|
3698
|
-
},
|
|
3699
|
-
[A.LIST_OF_VALUES]:
|
|
3700
|
-
[A.LIST_OF_VALUES_MULTI]:
|
|
3701
|
-
[A.RANGE]:
|
|
3749
|
+
}, ma = {
|
|
3750
|
+
[A.LIST_OF_VALUES]: ga,
|
|
3751
|
+
[A.LIST_OF_VALUES_MULTI]: ha,
|
|
3752
|
+
[A.RANGE]: fa,
|
|
3702
3753
|
[A.GREATER_THAN]: yn,
|
|
3703
3754
|
[A.LESS_THAN]: yn,
|
|
3704
3755
|
[A.EQUAL]: yn
|
|
3705
|
-
}, Wn = (e) =>
|
|
3706
|
-
function
|
|
3756
|
+
}, Wn = (e) => ma[e] || pa;
|
|
3757
|
+
function ba({
|
|
3707
3758
|
decision: e,
|
|
3708
3759
|
onSubmitEvent: n,
|
|
3709
3760
|
textValues: t
|
|
3710
3761
|
}) {
|
|
3711
3762
|
const r = {
|
|
3712
3763
|
ruleName: e.ruleName || "",
|
|
3713
|
-
decisionDataType: e.decisionDataType ||
|
|
3764
|
+
decisionDataType: e.decisionDataType || q.ALPHABETICAL,
|
|
3714
3765
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
3715
3766
|
value: e.value || "",
|
|
3716
3767
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -3768,7 +3819,7 @@ function fa({
|
|
|
3768
3819
|
// }),
|
|
3769
3820
|
conditionsThatEstablishesTheDecision: Ge((l, { parent: p }) => {
|
|
3770
3821
|
var g;
|
|
3771
|
-
if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return
|
|
3822
|
+
if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return te().shape({});
|
|
3772
3823
|
const c = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
|
|
3773
3824
|
(f, h) => {
|
|
3774
3825
|
if (o.values.conditionsThatEstablishesTheDecision[h.conditionName] !== void 0) {
|
|
@@ -3784,12 +3835,12 @@ function fa({
|
|
|
3784
3835
|
},
|
|
3785
3836
|
{}
|
|
3786
3837
|
)) ?? {};
|
|
3787
|
-
return
|
|
3838
|
+
return te(c);
|
|
3788
3839
|
})
|
|
3789
3840
|
};
|
|
3790
|
-
t.terms && (a.effectiveFrom =
|
|
3841
|
+
t.terms && (a.effectiveFrom = Me().required(
|
|
3791
3842
|
"La fecha de inicio es requerida"
|
|
3792
|
-
), a.validUntil =
|
|
3843
|
+
), a.validUntil = Me().when(
|
|
3793
3844
|
"checkClosed",
|
|
3794
3845
|
(l, p, { parent: u }) => (u == null ? void 0 : u.checkClosed) ? p.required("La fecha de finalización es requerida").test(
|
|
3795
3846
|
"is-after-startDate",
|
|
@@ -3800,7 +3851,7 @@ function fa({
|
|
|
3800
3851
|
}
|
|
3801
3852
|
) : p.notRequired()
|
|
3802
3853
|
));
|
|
3803
|
-
const s =
|
|
3854
|
+
const s = te(a);
|
|
3804
3855
|
return o = Rn({
|
|
3805
3856
|
initialValues: r,
|
|
3806
3857
|
validationSchema: s,
|
|
@@ -3843,7 +3894,7 @@ function fa({
|
|
|
3843
3894
|
});
|
|
3844
3895
|
} };
|
|
3845
3896
|
}
|
|
3846
|
-
const
|
|
3897
|
+
const va = C.div`
|
|
3847
3898
|
& > div {
|
|
3848
3899
|
border-radius: 8px;
|
|
3849
3900
|
border: 1px solid
|
|
@@ -3852,7 +3903,7 @@ const ma = C.div`
|
|
|
3852
3903
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
|
|
3853
3904
|
}};
|
|
3854
3905
|
}
|
|
3855
|
-
`,
|
|
3906
|
+
`, ya = C.div`
|
|
3856
3907
|
width: 100%;
|
|
3857
3908
|
height: 100%;
|
|
3858
3909
|
overflow-y: auto;
|
|
@@ -3869,7 +3920,7 @@ const ma = C.div`
|
|
|
3869
3920
|
background-color: #ebecf0;
|
|
3870
3921
|
border-radius: 8px;
|
|
3871
3922
|
}
|
|
3872
|
-
`,
|
|
3923
|
+
`, xa = (e) => {
|
|
3873
3924
|
const {
|
|
3874
3925
|
checked: n,
|
|
3875
3926
|
children: t,
|
|
@@ -3878,12 +3929,12 @@ const ma = C.div`
|
|
|
3878
3929
|
labelToggle: a,
|
|
3879
3930
|
name: s,
|
|
3880
3931
|
valueToggle: d = ""
|
|
3881
|
-
} = e, [l, p] =
|
|
3932
|
+
} = e, [l, p] = H(n), u = (c) => {
|
|
3882
3933
|
p(c.target.checked), r(c);
|
|
3883
3934
|
};
|
|
3884
|
-
return
|
|
3935
|
+
return $e(() => {
|
|
3885
3936
|
p(n);
|
|
3886
|
-
}, [n]), /* @__PURE__ */ m(
|
|
3937
|
+
}, [n]), /* @__PURE__ */ m(z, { children: [
|
|
3887
3938
|
/* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(
|
|
3888
3939
|
un,
|
|
3889
3940
|
{
|
|
@@ -3893,12 +3944,12 @@ const ma = C.div`
|
|
|
3893
3944
|
onChange: u,
|
|
3894
3945
|
size: "small",
|
|
3895
3946
|
value: d,
|
|
3896
|
-
children: /* @__PURE__ */ i(
|
|
3947
|
+
children: /* @__PURE__ */ i(R, { size: "medium", type: "label", weight: "bold", children: a })
|
|
3897
3948
|
}
|
|
3898
3949
|
) }),
|
|
3899
|
-
l && /* @__PURE__ */ i(
|
|
3950
|
+
l && /* @__PURE__ */ i(z, { children: t })
|
|
3900
3951
|
] });
|
|
3901
|
-
},
|
|
3952
|
+
}, Ta = (e) => {
|
|
3902
3953
|
const {
|
|
3903
3954
|
onHandleStartChange: n,
|
|
3904
3955
|
onHandleEndChange: t,
|
|
@@ -3913,17 +3964,17 @@ const ma = C.div`
|
|
|
3913
3964
|
messageEnd: c = "",
|
|
3914
3965
|
statusStart: g = "pending",
|
|
3915
3966
|
statusEnd: f = "pending"
|
|
3916
|
-
} = e, [h, x] =
|
|
3917
|
-
x(
|
|
3918
|
-
}, w = (
|
|
3919
|
-
D(
|
|
3920
|
-
},
|
|
3921
|
-
S(
|
|
3922
|
-
},
|
|
3923
|
-
return /* @__PURE__ */ m(
|
|
3967
|
+
} = e, [h, x] = H(s), [b, D] = H(l), [T, S] = H(p), N = ({ target: $ }) => {
|
|
3968
|
+
x($.checked), r && r($.checked);
|
|
3969
|
+
}, w = ($) => {
|
|
3970
|
+
D($.target.value), n($);
|
|
3971
|
+
}, F = ($) => {
|
|
3972
|
+
S($.target.value), t($);
|
|
3973
|
+
}, O = re("(max-width: 400px)");
|
|
3974
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
3924
3975
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
3925
3976
|
/* @__PURE__ */ i(
|
|
3926
|
-
|
|
3977
|
+
R,
|
|
3927
3978
|
{
|
|
3928
3979
|
appearance: "gray",
|
|
3929
3980
|
margin: "10px 0",
|
|
@@ -3955,12 +4006,12 @@ const ma = C.div`
|
|
|
3955
4006
|
/* @__PURE__ */ m(
|
|
3956
4007
|
y,
|
|
3957
4008
|
{
|
|
3958
|
-
direction:
|
|
4009
|
+
direction: O ? "column" : "row",
|
|
3959
4010
|
justifyContent: "space-between",
|
|
3960
4011
|
gap: "24px",
|
|
3961
4012
|
children: [
|
|
3962
4013
|
/* @__PURE__ */ i(
|
|
3963
|
-
|
|
4014
|
+
Oe,
|
|
3964
4015
|
{
|
|
3965
4016
|
id: "dateStart",
|
|
3966
4017
|
label: o,
|
|
@@ -3973,11 +4024,11 @@ const ma = C.div`
|
|
|
3973
4024
|
}
|
|
3974
4025
|
),
|
|
3975
4026
|
h && /* @__PURE__ */ i(
|
|
3976
|
-
|
|
4027
|
+
Oe,
|
|
3977
4028
|
{
|
|
3978
4029
|
id: "dateEnd",
|
|
3979
4030
|
label: a,
|
|
3980
|
-
onChange:
|
|
4031
|
+
onChange: F,
|
|
3981
4032
|
value: T,
|
|
3982
4033
|
required: d,
|
|
3983
4034
|
size: "compact",
|
|
@@ -3989,7 +4040,7 @@ const ma = C.div`
|
|
|
3989
4040
|
}
|
|
3990
4041
|
)
|
|
3991
4042
|
] });
|
|
3992
|
-
},
|
|
4043
|
+
}, wa = (e) => {
|
|
3993
4044
|
const {
|
|
3994
4045
|
formik: n,
|
|
3995
4046
|
textValues: t,
|
|
@@ -4008,8 +4059,8 @@ const ma = C.div`
|
|
|
4008
4059
|
formik: n,
|
|
4009
4060
|
isDecision: !0
|
|
4010
4061
|
}),
|
|
4011
|
-
/* @__PURE__ */ i(
|
|
4012
|
-
/* @__PURE__ */ i(
|
|
4062
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
4063
|
+
/* @__PURE__ */ i(va, { children: /* @__PURE__ */ i(ya, { children: /* @__PURE__ */ m(
|
|
4013
4064
|
y,
|
|
4014
4065
|
{
|
|
4015
4066
|
direction: "column",
|
|
@@ -4024,7 +4075,7 @@ const ma = C.div`
|
|
|
4024
4075
|
alignItems: "center",
|
|
4025
4076
|
gap: "64px",
|
|
4026
4077
|
children: [
|
|
4027
|
-
/* @__PURE__ */ i(
|
|
4078
|
+
/* @__PURE__ */ i(R, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
4028
4079
|
/* @__PURE__ */ i(
|
|
4029
4080
|
un,
|
|
4030
4081
|
{
|
|
@@ -4032,14 +4083,14 @@ const ma = C.div`
|
|
|
4032
4083
|
onChange: () => s(!n.values.toggleNone),
|
|
4033
4084
|
checked: n.values.toggleNone,
|
|
4034
4085
|
size: "small",
|
|
4035
|
-
children: /* @__PURE__ */ i(
|
|
4086
|
+
children: /* @__PURE__ */ i(R, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
4036
4087
|
}
|
|
4037
4088
|
)
|
|
4038
4089
|
]
|
|
4039
4090
|
}
|
|
4040
4091
|
),
|
|
4041
4092
|
/* @__PURE__ */ i(y, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => /* @__PURE__ */ i(
|
|
4042
|
-
|
|
4093
|
+
xa,
|
|
4043
4094
|
{
|
|
4044
4095
|
id: `toggle-${c.conditionName}`,
|
|
4045
4096
|
name: `toggle.${c.conditionName}`,
|
|
@@ -4056,10 +4107,10 @@ const ma = C.div`
|
|
|
4056
4107
|
]
|
|
4057
4108
|
}
|
|
4058
4109
|
) }) }),
|
|
4059
|
-
t.terms && /* @__PURE__ */ m(
|
|
4060
|
-
/* @__PURE__ */ i(
|
|
4110
|
+
t.terms && /* @__PURE__ */ m(z, { children: [
|
|
4111
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
4061
4112
|
/* @__PURE__ */ i(
|
|
4062
|
-
|
|
4113
|
+
Ta,
|
|
4063
4114
|
{
|
|
4064
4115
|
labelStart: t.termStart,
|
|
4065
4116
|
labelEnd: t.termEnd,
|
|
@@ -4078,16 +4129,16 @@ const ma = C.div`
|
|
|
4078
4129
|
}
|
|
4079
4130
|
)
|
|
4080
4131
|
] }),
|
|
4081
|
-
/* @__PURE__ */ i(
|
|
4082
|
-
l && /* @__PURE__ */ i(
|
|
4132
|
+
/* @__PURE__ */ i(G, {}),
|
|
4133
|
+
l && /* @__PURE__ */ i(R, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
4083
4134
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
4084
|
-
/* @__PURE__ */ i(
|
|
4085
|
-
/* @__PURE__ */ i(
|
|
4135
|
+
/* @__PURE__ */ i(B, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
4136
|
+
/* @__PURE__ */ i(B, { type: "submit", children: t.confirm })
|
|
4086
4137
|
] })
|
|
4087
4138
|
] }) });
|
|
4088
|
-
},
|
|
4139
|
+
}, Ca = (e) => {
|
|
4089
4140
|
var f;
|
|
4090
|
-
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } =
|
|
4141
|
+
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } = ba({
|
|
4091
4142
|
decision: n,
|
|
4092
4143
|
onSubmitEvent: t,
|
|
4093
4144
|
textValues: r
|
|
@@ -4101,7 +4152,7 @@ const ma = C.div`
|
|
|
4101
4152
|
(h) => !h.hidden
|
|
4102
4153
|
)) || [], p = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, u = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0, c = a.touched.validUntil ? a.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
4103
4154
|
return /* @__PURE__ */ i(
|
|
4104
|
-
|
|
4155
|
+
wa,
|
|
4105
4156
|
{
|
|
4106
4157
|
formik: a,
|
|
4107
4158
|
onCancel: o,
|
|
@@ -4133,7 +4184,7 @@ const ma = C.div`
|
|
|
4133
4184
|
termEndStatus: c
|
|
4134
4185
|
}
|
|
4135
4186
|
);
|
|
4136
|
-
},
|
|
4187
|
+
}, El = (e) => {
|
|
4137
4188
|
var o;
|
|
4138
4189
|
const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
|
|
4139
4190
|
(a) => a.switchPlaces
|
|
@@ -4149,7 +4200,7 @@ const ma = C.div`
|
|
|
4149
4200
|
(a) => a.conditionName === r.conditionName ? { ...a, hidden: !0 } : a
|
|
4150
4201
|
)
|
|
4151
4202
|
} : t;
|
|
4152
|
-
},
|
|
4203
|
+
}, Nl = (e) => {
|
|
4153
4204
|
const { decisions: n } = e;
|
|
4154
4205
|
return n == null ? void 0 : n.map((t) => {
|
|
4155
4206
|
var o;
|
|
@@ -4168,7 +4219,7 @@ const ma = C.div`
|
|
|
4168
4219
|
)
|
|
4169
4220
|
} : t;
|
|
4170
4221
|
});
|
|
4171
|
-
},
|
|
4222
|
+
}, Ce = {
|
|
4172
4223
|
item: {
|
|
4173
4224
|
background: {
|
|
4174
4225
|
active: E.palette.blue.B50,
|
|
@@ -4185,12 +4236,12 @@ const ma = C.div`
|
|
|
4185
4236
|
color: E.palette.neutral.N0
|
|
4186
4237
|
}
|
|
4187
4238
|
}
|
|
4188
|
-
},
|
|
4239
|
+
}, Da = C.div`
|
|
4189
4240
|
& > div {
|
|
4190
4241
|
border: 1px solid
|
|
4191
4242
|
${({ theme: e, $active: n }) => {
|
|
4192
4243
|
var t, r, o, a;
|
|
4193
|
-
return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) ||
|
|
4244
|
+
return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || Ce.border.expanded.color : ((a = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : a.color) || Ce.border.contracted.color;
|
|
4194
4245
|
}};
|
|
4195
4246
|
}
|
|
4196
4247
|
&:hover {
|
|
@@ -4198,7 +4249,7 @@ const ma = C.div`
|
|
|
4198
4249
|
background-color: ${({ theme: e, $disabled: n }) => {
|
|
4199
4250
|
var t, r, o;
|
|
4200
4251
|
if (!n)
|
|
4201
|
-
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) ||
|
|
4252
|
+
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) || Ce.item.background.hover;
|
|
4202
4253
|
}};
|
|
4203
4254
|
}
|
|
4204
4255
|
`, Xn = C.div`
|
|
@@ -4208,25 +4259,25 @@ const ma = C.div`
|
|
|
4208
4259
|
width: 100%;
|
|
4209
4260
|
outline: none;
|
|
4210
4261
|
cursor: pointer;
|
|
4211
|
-
`,
|
|
4262
|
+
`, Sa = C.div`
|
|
4212
4263
|
display: flex;
|
|
4213
4264
|
align-items: center;
|
|
4214
4265
|
outline: none;
|
|
4215
4266
|
cursor: pointer;
|
|
4216
|
-
`,
|
|
4267
|
+
`, Ea = C(ct)`
|
|
4217
4268
|
display: flex;
|
|
4218
4269
|
align-items: center;
|
|
4219
4270
|
text-decoration: none;
|
|
4220
|
-
`,
|
|
4271
|
+
`, Na = C(ct)`
|
|
4221
4272
|
display: block;
|
|
4222
4273
|
text-decoration: none;
|
|
4223
4274
|
color: inherit;
|
|
4224
|
-
`,
|
|
4275
|
+
`, ka = C.div`
|
|
4225
4276
|
& > div {
|
|
4226
4277
|
border-bottom: 1px solid
|
|
4227
4278
|
${({ theme: e, $active: n }) => {
|
|
4228
4279
|
var t, r, o, a;
|
|
4229
|
-
return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) ||
|
|
4280
|
+
return n ? ((r = (t = e == null ? void 0 : e.border) == null ? void 0 : t.expanded) == null ? void 0 : r.color) || Ce.border.expanded.color : ((a = (o = e == null ? void 0 : e.border) == null ? void 0 : o.contracted) == null ? void 0 : a.color) || Ce.border.contracted.color;
|
|
4230
4281
|
}};
|
|
4231
4282
|
border-radius: 8px 8px 0 0;
|
|
4232
4283
|
}
|
|
@@ -4235,7 +4286,7 @@ const ma = C.div`
|
|
|
4235
4286
|
text-decoration: none;
|
|
4236
4287
|
background-color: ${({ theme: e, $active: n }) => {
|
|
4237
4288
|
var t, r, o, a, s, d;
|
|
4238
|
-
return n ? ((o = (r = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : r.background) == null ? void 0 : o.active) ||
|
|
4289
|
+
return n ? ((o = (r = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : r.background) == null ? void 0 : o.active) || Ce.item.background.active : ((d = (s = (a = e == null ? void 0 : e.menu) == null ? void 0 : a.item) == null ? void 0 : s.background) == null ? void 0 : d.inactive) || Ce.item.background.inactive;
|
|
4239
4290
|
}};
|
|
4240
4291
|
&:last-child {
|
|
4241
4292
|
border-radius: 0 0 8px 8px;
|
|
@@ -4245,35 +4296,35 @@ const ma = C.div`
|
|
|
4245
4296
|
background-color: ${({ $active: e, theme: n, $disabled: t }) => {
|
|
4246
4297
|
var r, o, a;
|
|
4247
4298
|
if (!t && !e)
|
|
4248
|
-
return ((a = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : a.hover) ||
|
|
4299
|
+
return ((a = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : a.hover) || Ce.item.background.hover;
|
|
4249
4300
|
}};
|
|
4250
4301
|
}
|
|
4251
|
-
`,
|
|
4302
|
+
`, Aa = C.div`
|
|
4252
4303
|
display: flex;
|
|
4253
4304
|
flex-direction: column;
|
|
4254
4305
|
|
|
4255
4306
|
& > a:last-child ${mt} {
|
|
4256
4307
|
border-radius: 0 0 8px 8px;
|
|
4257
4308
|
}
|
|
4258
|
-
`,
|
|
4309
|
+
`, $a = (e) => {
|
|
4259
4310
|
const { isOpen: n, links: t, onClick: r, title: o, activeId: a, headerPath: s, headerActive: d } = e, l = (h) => {
|
|
4260
4311
|
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), r());
|
|
4261
4312
|
}, p = (h) => {
|
|
4262
4313
|
h.preventDefault(), h.stopPropagation(), r();
|
|
4263
4314
|
}, u = (h) => {
|
|
4264
4315
|
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), h.stopPropagation(), r());
|
|
4265
|
-
}, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f =
|
|
4266
|
-
return /* @__PURE__ */ i(
|
|
4316
|
+
}, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f = P.useId();
|
|
4317
|
+
return /* @__PURE__ */ i(Da, { $active: n, children: /* @__PURE__ */ m(ie, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
4267
4318
|
/* @__PURE__ */ i(
|
|
4268
|
-
|
|
4319
|
+
ka,
|
|
4269
4320
|
{
|
|
4270
4321
|
$active: n && t.length > 0,
|
|
4271
4322
|
"aria-controls": f,
|
|
4272
4323
|
"aria-expanded": n,
|
|
4273
4324
|
onClick: p,
|
|
4274
4325
|
onKeyDown: u,
|
|
4275
|
-
children: s ? /* @__PURE__ */ i(
|
|
4276
|
-
|
|
4326
|
+
children: s ? /* @__PURE__ */ i(Ea, { to: s, children: /* @__PURE__ */ m(
|
|
4327
|
+
ie,
|
|
4277
4328
|
{
|
|
4278
4329
|
alignItems: "center",
|
|
4279
4330
|
borderRadius: "8px",
|
|
@@ -4282,7 +4333,7 @@ const ma = C.div`
|
|
|
4282
4333
|
padding: "12px 8px",
|
|
4283
4334
|
children: [
|
|
4284
4335
|
/* @__PURE__ */ i(
|
|
4285
|
-
|
|
4336
|
+
j,
|
|
4286
4337
|
{
|
|
4287
4338
|
appearance: c,
|
|
4288
4339
|
cursorHover: !0,
|
|
@@ -4290,7 +4341,7 @@ const ma = C.div`
|
|
|
4290
4341
|
}
|
|
4291
4342
|
),
|
|
4292
4343
|
/* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(
|
|
4293
|
-
|
|
4344
|
+
R,
|
|
4294
4345
|
{
|
|
4295
4346
|
appearance: c,
|
|
4296
4347
|
cursorHover: !0,
|
|
@@ -4303,7 +4354,7 @@ const ma = C.div`
|
|
|
4303
4354
|
]
|
|
4304
4355
|
}
|
|
4305
4356
|
) }) : /* @__PURE__ */ m(
|
|
4306
|
-
|
|
4357
|
+
ie,
|
|
4307
4358
|
{
|
|
4308
4359
|
alignItems: "center",
|
|
4309
4360
|
borderRadius: "8px",
|
|
@@ -4312,7 +4363,7 @@ const ma = C.div`
|
|
|
4312
4363
|
padding: "12px 8px",
|
|
4313
4364
|
children: [
|
|
4314
4365
|
/* @__PURE__ */ i(
|
|
4315
|
-
|
|
4366
|
+
j,
|
|
4316
4367
|
{
|
|
4317
4368
|
appearance: c,
|
|
4318
4369
|
cursorHover: !0,
|
|
@@ -4320,14 +4371,14 @@ const ma = C.div`
|
|
|
4320
4371
|
}
|
|
4321
4372
|
),
|
|
4322
4373
|
/* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(
|
|
4323
|
-
|
|
4374
|
+
Sa,
|
|
4324
4375
|
{
|
|
4325
4376
|
"aria-controls": f,
|
|
4326
4377
|
"aria-expanded": n,
|
|
4327
4378
|
onClick: r,
|
|
4328
4379
|
onKeyDown: l,
|
|
4329
4380
|
children: /* @__PURE__ */ i(
|
|
4330
|
-
|
|
4381
|
+
R,
|
|
4331
4382
|
{
|
|
4332
4383
|
appearance: c,
|
|
4333
4384
|
cursorHover: !0,
|
|
@@ -4345,9 +4396,9 @@ const ma = C.div`
|
|
|
4345
4396
|
)
|
|
4346
4397
|
}
|
|
4347
4398
|
),
|
|
4348
|
-
n && t.length > 0 && /* @__PURE__ */ i(
|
|
4399
|
+
n && t.length > 0 && /* @__PURE__ */ i(Aa, { id: f, children: t.map((h) => {
|
|
4349
4400
|
const x = h.id === a;
|
|
4350
|
-
return /* @__PURE__ */ i(
|
|
4401
|
+
return /* @__PURE__ */ i(Na, { to: h.path, children: /* @__PURE__ */ i(mt, { $active: x, children: /* @__PURE__ */ m(
|
|
4351
4402
|
y,
|
|
4352
4403
|
{
|
|
4353
4404
|
alignItems: "center",
|
|
@@ -4355,9 +4406,9 @@ const ma = C.div`
|
|
|
4355
4406
|
gap: "8px",
|
|
4356
4407
|
padding: x ? "8px 4px" : "8px 32px",
|
|
4357
4408
|
children: [
|
|
4358
|
-
x && /* @__PURE__ */ i(
|
|
4409
|
+
x && /* @__PURE__ */ i(j, { appearance: "primary", icon: /* @__PURE__ */ i(Vt, {}) }),
|
|
4359
4410
|
/* @__PURE__ */ i(
|
|
4360
|
-
|
|
4411
|
+
R,
|
|
4361
4412
|
{
|
|
4362
4413
|
appearance: x ? "primary" : "dark",
|
|
4363
4414
|
size: "small",
|
|
@@ -4371,7 +4422,7 @@ const ma = C.div`
|
|
|
4371
4422
|
) }) }, h.id);
|
|
4372
4423
|
}) })
|
|
4373
4424
|
] }) });
|
|
4374
|
-
},
|
|
4425
|
+
}, Ia = C.div`
|
|
4375
4426
|
& > div {
|
|
4376
4427
|
background: ${({ $background: e, theme: n }) => {
|
|
4377
4428
|
var t, r, o, a;
|
|
@@ -4379,36 +4430,36 @@ const ma = C.div`
|
|
|
4379
4430
|
}};
|
|
4380
4431
|
}
|
|
4381
4432
|
height: 90vh;
|
|
4382
|
-
`,
|
|
4433
|
+
`, Ra = (e, n) => {
|
|
4383
4434
|
var t;
|
|
4384
4435
|
for (const r of n)
|
|
4385
4436
|
if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
|
|
4386
4437
|
return null;
|
|
4387
|
-
},
|
|
4388
|
-
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o =
|
|
4438
|
+
}, kl = (e) => {
|
|
4439
|
+
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Kt(), [a, s] = P.useState(t), d = P.useRef(o.pathname), l = P.useCallback(
|
|
4389
4440
|
(u) => {
|
|
4390
4441
|
var c;
|
|
4391
4442
|
return (c = u.find((g) => g.path === o.pathname)) == null ? void 0 : c.id;
|
|
4392
4443
|
},
|
|
4393
4444
|
[o.pathname]
|
|
4394
|
-
), p =
|
|
4445
|
+
), p = P.useCallback(
|
|
4395
4446
|
(u) => !!u && (o.pathname === u || o.pathname.startsWith(u + "/")),
|
|
4396
4447
|
[o.pathname]
|
|
4397
4448
|
);
|
|
4398
|
-
return
|
|
4449
|
+
return P.useEffect(() => {
|
|
4399
4450
|
if (!(d.current !== o.pathname)) return;
|
|
4400
4451
|
if (d.current = o.pathname, n) {
|
|
4401
4452
|
s(null);
|
|
4402
4453
|
return;
|
|
4403
4454
|
}
|
|
4404
|
-
const c =
|
|
4455
|
+
const c = Ra(o.pathname, r);
|
|
4405
4456
|
if (c) {
|
|
4406
4457
|
s(c);
|
|
4407
4458
|
return;
|
|
4408
4459
|
}
|
|
4409
4460
|
t && s(t);
|
|
4410
|
-
}, [n, t, r, o.pathname]), /* @__PURE__ */ i(
|
|
4411
|
-
|
|
4461
|
+
}, [n, t, r, o.pathname]), /* @__PURE__ */ i(Ia, { $background: !0, children: /* @__PURE__ */ i(y, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((u) => /* @__PURE__ */ i(
|
|
4462
|
+
$a,
|
|
4412
4463
|
{
|
|
4413
4464
|
activeId: l(u.links),
|
|
4414
4465
|
headerPath: u.path,
|
|
@@ -4424,7 +4475,7 @@ const ma = C.div`
|
|
|
4424
4475
|
function W(e) {
|
|
4425
4476
|
e.preventDefault();
|
|
4426
4477
|
}
|
|
4427
|
-
function
|
|
4478
|
+
function Ee(e) {
|
|
4428
4479
|
e.stopPropagation();
|
|
4429
4480
|
}
|
|
4430
4481
|
function bt() {
|
|
@@ -4439,7 +4490,7 @@ function bt() {
|
|
|
4439
4490
|
}];
|
|
4440
4491
|
}
|
|
4441
4492
|
var [vt, yt] = bt();
|
|
4442
|
-
function
|
|
4493
|
+
function Fa(e, n) {
|
|
4443
4494
|
return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
|
|
4444
4495
|
}
|
|
4445
4496
|
function Ye(e, n, t = !0, r = ["__key"]) {
|
|
@@ -4449,7 +4500,7 @@ function Ye(e, n, t = !0, r = ["__key"]) {
|
|
|
4449
4500
|
if (e instanceof Date && n instanceof Date)
|
|
4450
4501
|
return e.getTime() === n.getTime();
|
|
4451
4502
|
if (e instanceof RegExp && n instanceof RegExp)
|
|
4452
|
-
return
|
|
4503
|
+
return Fa(e, n);
|
|
4453
4504
|
if (e === null || n === null) return !1;
|
|
4454
4505
|
const o = e, a = n;
|
|
4455
4506
|
if (Object.keys(o).length !== Object.keys(a).length) return !1;
|
|
@@ -4464,19 +4515,19 @@ function Ye(e, n, t = !0, r = ["__key"]) {
|
|
|
4464
4515
|
function xt(e) {
|
|
4465
4516
|
return e.split(" ").filter((n) => n);
|
|
4466
4517
|
}
|
|
4467
|
-
function
|
|
4518
|
+
function _e(e) {
|
|
4468
4519
|
return { x: e.clientX, y: e.clientY };
|
|
4469
4520
|
}
|
|
4470
4521
|
Array();
|
|
4471
|
-
var
|
|
4522
|
+
var Mn = typeof window < "u", Y = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap();
|
|
4472
4523
|
function Tt() {
|
|
4473
|
-
if (!
|
|
4524
|
+
if (!Mn) return !1;
|
|
4474
4525
|
if ("userAgentData" in navigator)
|
|
4475
4526
|
return navigator.userAgentData.mobile === !0;
|
|
4476
4527
|
const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
4477
4528
|
return n || t;
|
|
4478
4529
|
}
|
|
4479
|
-
var
|
|
4530
|
+
var La = {
|
|
4480
4531
|
affectedNodes: [],
|
|
4481
4532
|
coordinates: {
|
|
4482
4533
|
x: 0,
|
|
@@ -4510,8 +4561,8 @@ var Ra = {
|
|
|
4510
4561
|
scrollDebounceTimeout: void 0,
|
|
4511
4562
|
frameIdX: void 0,
|
|
4512
4563
|
frameIdY: void 0
|
|
4513
|
-
}, v =
|
|
4514
|
-
function
|
|
4564
|
+
}, v = La, Se = !1, Qn, xn;
|
|
4565
|
+
function Oa() {
|
|
4515
4566
|
v.scrollDebounceTimeout && clearTimeout(v.scrollDebounceTimeout), v.longPressTimeout && clearTimeout(v.longPressTimeout), v.frameIdX !== void 0 && cancelAnimationFrame(v.frameIdX), v.frameIdY !== void 0 && cancelAnimationFrame(v.frameIdY), v = { ...{
|
|
4516
4567
|
affectedNodes: [],
|
|
4517
4568
|
coordinates: {
|
|
@@ -4553,37 +4604,37 @@ function Fa() {
|
|
|
4553
4604
|
} };
|
|
4554
4605
|
}
|
|
4555
4606
|
function wt(e) {
|
|
4556
|
-
return Object.assign(v, e), e.initialParent.data.emit("dragStarted", v),
|
|
4607
|
+
return Object.assign(v, e), e.initialParent.data.emit("dragStarted", v), Se = !1, v.emit("dragStarted", v), v;
|
|
4557
4608
|
}
|
|
4558
|
-
function
|
|
4559
|
-
v.activeState &&
|
|
4609
|
+
function Ma() {
|
|
4610
|
+
v.activeState && Ie(v.activeState.parent, void 0, v), v.selectedState && Ae(v.selectedState.nodes, v.selectedState.parent, v), v.selectedState = v.activeState = void 0;
|
|
4560
4611
|
}
|
|
4561
|
-
function
|
|
4562
|
-
if (v.pointerDown && (v.pointerDown.node.el.draggable = !0), v.pointerDown = void 0, !
|
|
4612
|
+
function Pa() {
|
|
4613
|
+
if (v.pointerDown && (v.pointerDown.node.el.draggable = !0), v.pointerDown = void 0, !oe(v)) return;
|
|
4563
4614
|
const e = v.currentParent.data.config;
|
|
4564
|
-
|
|
4615
|
+
oe(v) && e.handleEnd(v);
|
|
4565
4616
|
}
|
|
4566
|
-
function
|
|
4567
|
-
e.key === "Escape" && (v.selectedState &&
|
|
4617
|
+
function za(e) {
|
|
4618
|
+
e.key === "Escape" && (v.selectedState && Ae(v.selectedState.nodes, v.selectedState.parent, v), v.activeState && Ie(v.activeState.parent, void 0, v), v.selectedState = v.activeState = void 0);
|
|
4568
4619
|
}
|
|
4569
|
-
function
|
|
4620
|
+
function Va(e) {
|
|
4570
4621
|
if (!X(v)) return;
|
|
4571
|
-
|
|
4622
|
+
Se = !0;
|
|
4572
4623
|
const n = v.initialParent.data.config.handleEnd;
|
|
4573
4624
|
n(v);
|
|
4574
4625
|
}
|
|
4575
|
-
function
|
|
4626
|
+
function _a(e) {
|
|
4576
4627
|
if (!X(v)) return;
|
|
4577
4628
|
W(e);
|
|
4578
|
-
const { x: n, y: t } =
|
|
4629
|
+
const { x: n, y: t } = _e(e);
|
|
4579
4630
|
X(v) && fn({ x: n, y: t }, e, v);
|
|
4580
4631
|
}
|
|
4581
|
-
function
|
|
4632
|
+
function Ua(e) {
|
|
4582
4633
|
if (!v.pointerDown || !v.pointerDown.validated) return;
|
|
4583
4634
|
const n = v.pointerDown.parent.data.config;
|
|
4584
4635
|
if (!(e.pointerType === "mouse" && !Tt()))
|
|
4585
|
-
if (
|
|
4586
|
-
|
|
4636
|
+
if (oe(v))
|
|
4637
|
+
oe(v) && Zn(e, v);
|
|
4587
4638
|
else {
|
|
4588
4639
|
if (W(e), n.longPress && !v.longPress) {
|
|
4589
4640
|
clearTimeout(v.longPressTimeout), v.longPress = !1;
|
|
@@ -4591,7 +4642,7 @@ function Va(e) {
|
|
|
4591
4642
|
}
|
|
4592
4643
|
const t = n.draggedNodes(v.pointerDown);
|
|
4593
4644
|
n.dragstartClasses(v.pointerDown.node, t, n, !0);
|
|
4594
|
-
const r = v.pointerDown.node.el.getBoundingClientRect(), o =
|
|
4645
|
+
const r = v.pointerDown.node.el.getBoundingClientRect(), o = mi(
|
|
4595
4646
|
v.pointerDown.node,
|
|
4596
4647
|
v.pointerDown.parent,
|
|
4597
4648
|
e,
|
|
@@ -4599,7 +4650,7 @@ function Va(e) {
|
|
|
4599
4650
|
t,
|
|
4600
4651
|
r
|
|
4601
4652
|
);
|
|
4602
|
-
|
|
4653
|
+
Zn(e, o, !0);
|
|
4603
4654
|
}
|
|
4604
4655
|
}
|
|
4605
4656
|
function ja({
|
|
@@ -4609,20 +4660,20 @@ function ja({
|
|
|
4609
4660
|
config: r = {}
|
|
4610
4661
|
}) {
|
|
4611
4662
|
var l, p, u;
|
|
4612
|
-
if (!
|
|
4663
|
+
if (!Mn) return;
|
|
4613
4664
|
Qn || (Qn = an(document, {
|
|
4614
|
-
dragover:
|
|
4615
|
-
pointerdown:
|
|
4616
|
-
pointerup:
|
|
4617
|
-
keydown:
|
|
4618
|
-
drop:
|
|
4619
|
-
pointermove:
|
|
4620
|
-
pointercancel:
|
|
4665
|
+
dragover: _a,
|
|
4666
|
+
pointerdown: Ma,
|
|
4667
|
+
pointerup: Pa,
|
|
4668
|
+
keydown: za,
|
|
4669
|
+
drop: Va,
|
|
4670
|
+
pointermove: Ua,
|
|
4671
|
+
pointercancel: J(r.handlePointercancel),
|
|
4621
4672
|
touchmove: (c) => {
|
|
4622
4673
|
X(v) && c.cancelable && W(c);
|
|
4623
4674
|
},
|
|
4624
4675
|
contextmenu: (c) => {
|
|
4625
|
-
|
|
4676
|
+
oe(v) && W(c);
|
|
4626
4677
|
}
|
|
4627
4678
|
})), Dt(e);
|
|
4628
4679
|
const [o, a] = bt(), s = {
|
|
@@ -4631,38 +4682,38 @@ function ja({
|
|
|
4631
4682
|
config: {
|
|
4632
4683
|
dragDropEffect: r.dragDropEffect ?? "move",
|
|
4633
4684
|
dragEffectAllowed: r.dragEffectAllowed ?? "move",
|
|
4634
|
-
draggedNodes:
|
|
4635
|
-
dragstartClasses:
|
|
4636
|
-
handleNodeKeydown:
|
|
4637
|
-
handleDragstart:
|
|
4638
|
-
handleNodeDragover:
|
|
4639
|
-
handleParentDragover:
|
|
4640
|
-
handleNodeDrop:
|
|
4641
|
-
handleNodeFocus:
|
|
4642
|
-
handleNodeBlur:
|
|
4643
|
-
handlePointercancel:
|
|
4644
|
-
handleEnd:
|
|
4645
|
-
handleDragend:
|
|
4646
|
-
handleParentFocus:
|
|
4647
|
-
handleNodePointerup:
|
|
4648
|
-
handleNodePointerover:
|
|
4649
|
-
handleParentPointerover:
|
|
4650
|
-
handleParentScroll:
|
|
4651
|
-
handleNodePointerdown:
|
|
4652
|
-
handleNodeDragenter:
|
|
4653
|
-
handleNodeDragleave:
|
|
4654
|
-
handleParentDrop:
|
|
4685
|
+
draggedNodes: ni,
|
|
4686
|
+
dragstartClasses: ai,
|
|
4687
|
+
handleNodeKeydown: li,
|
|
4688
|
+
handleDragstart: ri,
|
|
4689
|
+
handleNodeDragover: vi,
|
|
4690
|
+
handleParentDragover: yi,
|
|
4691
|
+
handleNodeDrop: di,
|
|
4692
|
+
handleNodeFocus: ci,
|
|
4693
|
+
handleNodeBlur: ui,
|
|
4694
|
+
handlePointercancel: gi,
|
|
4695
|
+
handleEnd: hi,
|
|
4696
|
+
handleDragend: pi,
|
|
4697
|
+
handleParentFocus: qa,
|
|
4698
|
+
handleNodePointerup: fi,
|
|
4699
|
+
handleNodePointerover: si,
|
|
4700
|
+
handleParentPointerover: xi,
|
|
4701
|
+
handleParentScroll: ti,
|
|
4702
|
+
handleNodePointerdown: oi,
|
|
4703
|
+
handleNodeDragenter: wi,
|
|
4704
|
+
handleNodeDragleave: Ci,
|
|
4705
|
+
handleParentDrop: Ga,
|
|
4655
4706
|
multiDrag: r.multiDrag ?? !1,
|
|
4656
4707
|
nativeDrag: r.nativeDrag ?? !0,
|
|
4657
|
-
performSort:
|
|
4658
|
-
performTransfer:
|
|
4708
|
+
performSort: Ha,
|
|
4709
|
+
performTransfer: Ba,
|
|
4659
4710
|
root: r.root ?? document,
|
|
4660
|
-
setupNode:
|
|
4711
|
+
setupNode: Wa,
|
|
4661
4712
|
setupNodeRemap: St,
|
|
4662
|
-
reapplyDragClasses:
|
|
4663
|
-
tearDownNode:
|
|
4664
|
-
tearDownNodeRemap:
|
|
4665
|
-
remapFinished:
|
|
4713
|
+
reapplyDragClasses: Xa,
|
|
4714
|
+
tearDownNode: Za,
|
|
4715
|
+
tearDownNodeRemap: Qa,
|
|
4716
|
+
remapFinished: Ja,
|
|
4666
4717
|
threshold: {
|
|
4667
4718
|
horizontal: 0,
|
|
4668
4719
|
vertical: 0
|
|
@@ -4675,7 +4726,7 @@ function ja({
|
|
|
4675
4726
|
on: a,
|
|
4676
4727
|
emit: o
|
|
4677
4728
|
};
|
|
4678
|
-
new MutationObserver(
|
|
4729
|
+
new MutationObserver(Ka).observe(e, { childList: !0 }), Y.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
|
|
4679
4730
|
var g, f;
|
|
4680
4731
|
(f = (g = c(e)) == null ? void 0 : g.tearDown) == null || f.call(g);
|
|
4681
4732
|
}), (p = r.plugins) == null || p.forEach((c) => {
|
|
@@ -4684,10 +4735,10 @@ function ja({
|
|
|
4684
4735
|
}), (u = r.plugins) == null || u.forEach((c) => {
|
|
4685
4736
|
var g, f;
|
|
4686
4737
|
(f = (g = c(e)) == null ? void 0 : g.setup) == null || f.call(g);
|
|
4687
|
-
}),
|
|
4738
|
+
}), Ya(e, s), gn(e, !0);
|
|
4688
4739
|
}
|
|
4689
4740
|
function Ct(e, n, t, r, o, a) {
|
|
4690
|
-
const { x: s, y: d } =
|
|
4741
|
+
const { x: s, y: d } = _e(t), l = e.el.getBoundingClientRect();
|
|
4691
4742
|
return {
|
|
4692
4743
|
affectedNodes: [],
|
|
4693
4744
|
ascendingDirection: !1,
|
|
@@ -4721,13 +4772,13 @@ function Ct(e, n, t, r, o, a) {
|
|
|
4721
4772
|
transferred: !1
|
|
4722
4773
|
};
|
|
4723
4774
|
}
|
|
4724
|
-
function
|
|
4775
|
+
function Ha({
|
|
4725
4776
|
parent: e,
|
|
4726
4777
|
draggedNodes: n,
|
|
4727
4778
|
targetNodes: t
|
|
4728
4779
|
}) {
|
|
4729
4780
|
gn(e.el);
|
|
4730
|
-
const r = n.map((l) => l.data.value), o =
|
|
4781
|
+
const r = n.map((l) => l.data.value), o = ze(e.el, e.data), a = n[0].data.index, s = [...e.data.enabledNodes], d = [
|
|
4731
4782
|
...o.filter((l) => !r.some((p) => Ye(l, p)))
|
|
4732
4783
|
];
|
|
4733
4784
|
d.splice(t[0].data.index, 0, ...r), "draggedNode" in v && (v.currentTargetValue = t[0].data.value), Nn(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
|
|
@@ -4746,7 +4797,7 @@ function _a({
|
|
|
4746
4797
|
state: v
|
|
4747
4798
|
});
|
|
4748
4799
|
}
|
|
4749
|
-
function
|
|
4800
|
+
function Ie(e, n, t) {
|
|
4750
4801
|
if (!n) {
|
|
4751
4802
|
t.activeState = void 0;
|
|
4752
4803
|
return;
|
|
@@ -4756,11 +4807,11 @@ function $e(e, n, t) {
|
|
|
4756
4807
|
parent: e
|
|
4757
4808
|
};
|
|
4758
4809
|
}
|
|
4759
|
-
function
|
|
4810
|
+
function Ae(e, n, t) {
|
|
4760
4811
|
const r = n.data.config.selectedClass;
|
|
4761
4812
|
if (!t.selectedState) return;
|
|
4762
4813
|
const o = Array.from(e);
|
|
4763
|
-
|
|
4814
|
+
De(
|
|
4764
4815
|
e.map((a) => a.el),
|
|
4765
4816
|
r
|
|
4766
4817
|
);
|
|
@@ -4773,17 +4824,17 @@ function ke(e, n, t) {
|
|
|
4773
4824
|
function en(e, n, t, r, o = !1) {
|
|
4774
4825
|
r.pointerSelection = o;
|
|
4775
4826
|
for (const a of n)
|
|
4776
|
-
a.el.setAttribute("aria-selected", "true"),
|
|
4827
|
+
a.el.setAttribute("aria-selected", "true"), Le([a.el], e.data.config.selectedClass, !0);
|
|
4777
4828
|
r.selectedState = {
|
|
4778
4829
|
nodes: n,
|
|
4779
4830
|
parent: e
|
|
4780
|
-
},
|
|
4831
|
+
}, Ie(e, t, r);
|
|
4781
4832
|
}
|
|
4782
|
-
function
|
|
4833
|
+
function qa(e, n) {
|
|
4783
4834
|
const t = e.targetData.parent.data.enabledNodes[0];
|
|
4784
|
-
t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ?
|
|
4835
|
+
t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? Ie(e.targetData.parent, t, n) : n.selectedState || Ie(e.targetData.parent, t, n));
|
|
4785
4836
|
}
|
|
4786
|
-
function
|
|
4837
|
+
function Ba({
|
|
4787
4838
|
currentParent: e,
|
|
4788
4839
|
targetParent: n,
|
|
4789
4840
|
initialParent: t,
|
|
@@ -4794,10 +4845,10 @@ function Ha({
|
|
|
4794
4845
|
}) {
|
|
4795
4846
|
gn(t.el);
|
|
4796
4847
|
const d = r.map((g) => g.data.value), l = [
|
|
4797
|
-
...
|
|
4848
|
+
...ze(e.el, e.data).filter(
|
|
4798
4849
|
(g) => !d.some((f) => Ye(g, f))
|
|
4799
4850
|
)
|
|
4800
|
-
], p =
|
|
4851
|
+
], p = ze(n.el, n.data), u = t.el === n.el && n.data.config.sortable === !1;
|
|
4801
4852
|
let c;
|
|
4802
4853
|
a.length ? (u ? c = o : n.data.config.sortable === !1 ? c = n.data.enabledNodes.length : c = a[0].data.index, p.splice(c, 0, ...d)) : (c = u ? o : n.data.enabledNodes.length, p.splice(c, 0, ...d)), Nn(e.el, e.data, l), Nn(n.el, n.data, p), n.data.config.onTransfer && n.data.config.onTransfer({
|
|
4803
4854
|
sourceParent: e,
|
|
@@ -4817,35 +4868,35 @@ function Ha({
|
|
|
4817
4868
|
targetNodes: a || []
|
|
4818
4869
|
});
|
|
4819
4870
|
}
|
|
4820
|
-
function
|
|
4871
|
+
function ze(e, n) {
|
|
4821
4872
|
return [...n.getValues(e)];
|
|
4822
4873
|
}
|
|
4823
4874
|
function Nn(e, n, t) {
|
|
4824
4875
|
n.setValues(t, e);
|
|
4825
4876
|
}
|
|
4826
|
-
function
|
|
4827
|
-
|
|
4877
|
+
function Ga(e, n) {
|
|
4878
|
+
Ee(e.e), Se = !0;
|
|
4828
4879
|
const t = n.initialParent.data.config.handleEnd;
|
|
4829
4880
|
t(n);
|
|
4830
4881
|
}
|
|
4831
4882
|
function Dt(e) {
|
|
4832
|
-
const n =
|
|
4883
|
+
const n = Y.get(e);
|
|
4833
4884
|
n && n.abortControllers.mainParent && n.abortControllers.mainParent.abort();
|
|
4834
4885
|
}
|
|
4835
4886
|
function X(e) {
|
|
4836
4887
|
return "draggedNode" in e && !!e.draggedNode;
|
|
4837
4888
|
}
|
|
4838
|
-
function
|
|
4889
|
+
function oe(e) {
|
|
4839
4890
|
return "synthDragging" in e && !!e.synthDragging;
|
|
4840
4891
|
}
|
|
4841
|
-
function
|
|
4892
|
+
function Ya(e, n) {
|
|
4842
4893
|
n.abortControllers.mainParent = an(e, {
|
|
4843
4894
|
dragover: nn(n.config.handleParentDragover),
|
|
4844
4895
|
handleParentPointerover: n.config.handleParentPointerover,
|
|
4845
4896
|
scroll: nn(n.config.handleParentScroll),
|
|
4846
4897
|
drop: nn(n.config.handleParentDrop),
|
|
4847
4898
|
hasNestedParent: (t) => {
|
|
4848
|
-
const r =
|
|
4899
|
+
const r = Y.get(t.target);
|
|
4849
4900
|
r && (r.nestedParent = t.detail.parent);
|
|
4850
4901
|
},
|
|
4851
4902
|
focus: nn(n.config.handleParentFocus)
|
|
@@ -4866,7 +4917,7 @@ function Ba(e, n) {
|
|
|
4866
4917
|
if (!o) return;
|
|
4867
4918
|
const a = r.parentNode;
|
|
4868
4919
|
if (!(a instanceof HTMLElement)) return;
|
|
4869
|
-
const s =
|
|
4920
|
+
const s = Y.get(a);
|
|
4870
4921
|
s && (v.pointerDown = {
|
|
4871
4922
|
parent: {
|
|
4872
4923
|
el: a,
|
|
@@ -4882,28 +4933,28 @@ function Ba(e, n) {
|
|
|
4882
4933
|
}
|
|
4883
4934
|
));
|
|
4884
4935
|
}
|
|
4885
|
-
function
|
|
4936
|
+
function Wa(e) {
|
|
4886
4937
|
var t;
|
|
4887
4938
|
const n = e.parent.data.config;
|
|
4888
4939
|
e.node.data.abortControllers.mainNode = an(e.node.el, {
|
|
4889
|
-
keydown:
|
|
4890
|
-
dragstart:
|
|
4891
|
-
dragover:
|
|
4892
|
-
dragenter:
|
|
4893
|
-
dragleave:
|
|
4894
|
-
dragend:
|
|
4895
|
-
drop:
|
|
4896
|
-
focus:
|
|
4897
|
-
blur:
|
|
4898
|
-
pointerup:
|
|
4899
|
-
pointercancel:
|
|
4900
|
-
pointerdown:
|
|
4940
|
+
keydown: J(n.handleNodeKeydown),
|
|
4941
|
+
dragstart: J(n.handleDragstart),
|
|
4942
|
+
dragover: J(n.handleNodeDragover),
|
|
4943
|
+
dragenter: J(n.handleNodeDragenter),
|
|
4944
|
+
dragleave: J(n.handleNodeDragleave),
|
|
4945
|
+
dragend: J(n.handleDragend),
|
|
4946
|
+
drop: J(n.handleNodeDrop),
|
|
4947
|
+
focus: J(n.handleNodeFocus),
|
|
4948
|
+
blur: J(n.handleNodeBlur),
|
|
4949
|
+
pointerup: J(n.handleNodePointerup),
|
|
4950
|
+
pointercancel: J(n.handlePointercancel),
|
|
4951
|
+
pointerdown: J(n.handleNodePointerdown),
|
|
4901
4952
|
handleNodePointerover: n.handleNodePointerover,
|
|
4902
4953
|
touchmove: (r) => {
|
|
4903
4954
|
X(v) && r.cancelable && W(r);
|
|
4904
4955
|
},
|
|
4905
4956
|
contextmenu: (r) => {
|
|
4906
|
-
|
|
4957
|
+
oe(v) && W(r);
|
|
4907
4958
|
}
|
|
4908
4959
|
}), e.node.el.draggable = !0, n.reapplyDragClasses(e.node.el, e.parent.data), (t = e.parent.data.config.plugins) == null || t.forEach((r) => {
|
|
4909
4960
|
var o, a;
|
|
@@ -4917,34 +4968,34 @@ function St(e) {
|
|
|
4917
4968
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
|
|
4918
4969
|
});
|
|
4919
4970
|
}
|
|
4920
|
-
function
|
|
4971
|
+
function Xa(e, n) {
|
|
4921
4972
|
if (!X(v)) return;
|
|
4922
|
-
const t =
|
|
4923
|
-
v.draggedNode.el === e &&
|
|
4973
|
+
const t = oe(v) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
|
|
4974
|
+
v.draggedNode.el === e && Le([e], t, !0);
|
|
4924
4975
|
}
|
|
4925
|
-
function
|
|
4976
|
+
function Qa(e) {
|
|
4926
4977
|
var n;
|
|
4927
4978
|
(n = e.parent.data.config.plugins) == null || n.forEach((t) => {
|
|
4928
4979
|
var r, o;
|
|
4929
4980
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.tearDownNodeRemap) == null || o.call(r, e);
|
|
4930
4981
|
});
|
|
4931
4982
|
}
|
|
4932
|
-
function
|
|
4983
|
+
function Za(e) {
|
|
4933
4984
|
var n, t, r, o, a;
|
|
4934
4985
|
(n = e.parent.data.config.plugins) == null || n.forEach((s) => {
|
|
4935
4986
|
var d, l;
|
|
4936
4987
|
(l = (d = s(e.parent.el)) == null ? void 0 : d.tearDownNode) == null || l.call(d, e);
|
|
4937
4988
|
}), e.node.el.draggable = !1, (r = (t = e.node.data) == null ? void 0 : t.abortControllers) != null && r.mainNode && ((a = (o = e.node.data) == null ? void 0 : o.abortControllers) == null || a.mainNode.abort());
|
|
4938
4989
|
}
|
|
4939
|
-
function
|
|
4990
|
+
function Ka(e) {
|
|
4940
4991
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
4941
4992
|
return;
|
|
4942
4993
|
const n = e[0].target;
|
|
4943
|
-
!(n instanceof HTMLElement) || !
|
|
4994
|
+
!(n instanceof HTMLElement) || !Y.get(n) || gn(n);
|
|
4944
4995
|
}
|
|
4945
4996
|
function gn(e, n) {
|
|
4946
4997
|
var d;
|
|
4947
|
-
const t =
|
|
4998
|
+
const t = Y.get(e);
|
|
4948
4999
|
if (!t) return;
|
|
4949
5000
|
t.privateClasses = Array.from(e.classList);
|
|
4950
5001
|
const r = [], o = t.config;
|
|
@@ -4983,7 +5034,7 @@ function gn(e, n) {
|
|
|
4983
5034
|
index: l
|
|
4984
5035
|
}
|
|
4985
5036
|
);
|
|
4986
|
-
if (!X(v) && v.activeState && Ye(v.activeState.node.data.value, c.value) &&
|
|
5037
|
+
if (!X(v) && v.activeState && Ye(v.activeState.node.data.value, c.value) && Ie(
|
|
4987
5038
|
{
|
|
4988
5039
|
data: t,
|
|
4989
5040
|
el: e
|
|
@@ -5023,18 +5074,18 @@ function gn(e, n) {
|
|
|
5023
5074
|
}
|
|
5024
5075
|
});
|
|
5025
5076
|
}
|
|
5026
|
-
|
|
5077
|
+
Y.set(e, { ...t, enabledNodes: s }), o.remapFinished(t), (d = t.config.plugins) == null || d.forEach((l) => {
|
|
5027
5078
|
var p, u;
|
|
5028
5079
|
(u = (p = l(e)) == null ? void 0 : p.remapFinished) == null || u.call(p);
|
|
5029
5080
|
});
|
|
5030
5081
|
}
|
|
5031
|
-
function
|
|
5082
|
+
function Ja() {
|
|
5032
5083
|
v.remapJustFinished = !0, "draggedNode" in v && (v.affectedNodes = []);
|
|
5033
5084
|
}
|
|
5034
|
-
function
|
|
5085
|
+
function ei(e) {
|
|
5035
5086
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
5036
5087
|
}
|
|
5037
|
-
function
|
|
5088
|
+
function ni(e) {
|
|
5038
5089
|
var n;
|
|
5039
5090
|
if (e.parent.data.config.multiDrag) {
|
|
5040
5091
|
if (v.selectedState)
|
|
@@ -5047,14 +5098,14 @@ function Ja(e) {
|
|
|
5047
5098
|
} else return [e.node];
|
|
5048
5099
|
return [];
|
|
5049
5100
|
}
|
|
5050
|
-
function
|
|
5051
|
-
X(v) && (v.emit("scrollStarted", v), !
|
|
5101
|
+
function ti(e) {
|
|
5102
|
+
X(v) && (v.emit("scrollStarted", v), !oe(v) && (v.preventEnter = !0, xn && clearTimeout(xn), xn = setTimeout(() => {
|
|
5052
5103
|
v.preventEnter = !1, v.emit("scrollEnded", v);
|
|
5053
5104
|
}, 100)));
|
|
5054
5105
|
}
|
|
5055
|
-
function
|
|
5106
|
+
function ri(e, n) {
|
|
5056
5107
|
const t = e.targetData.parent.data.config;
|
|
5057
|
-
if (!t.nativeDrag || !
|
|
5108
|
+
if (!t.nativeDrag || !ei(e) || !Et({
|
|
5058
5109
|
x: e.e.clientX,
|
|
5059
5110
|
y: e.e.clientY,
|
|
5060
5111
|
node: e.targetData.node,
|
|
@@ -5068,11 +5119,11 @@ function ni(e, n) {
|
|
|
5068
5119
|
node: e.targetData.node
|
|
5069
5120
|
});
|
|
5070
5121
|
r.length === 0 && (r = [e.targetData.node]), t.dragstartClasses(e.targetData.node, r, t);
|
|
5071
|
-
const o =
|
|
5122
|
+
const o = ii(e, r);
|
|
5072
5123
|
if (t.onDragstart) {
|
|
5073
5124
|
const a = {
|
|
5074
5125
|
parent: e.targetData.parent,
|
|
5075
|
-
values:
|
|
5126
|
+
values: ze(
|
|
5076
5127
|
e.targetData.parent.el,
|
|
5077
5128
|
e.targetData.parent.data
|
|
5078
5129
|
),
|
|
@@ -5084,9 +5135,9 @@ function ni(e, n) {
|
|
|
5084
5135
|
t.onDragstart(a);
|
|
5085
5136
|
}
|
|
5086
5137
|
}
|
|
5087
|
-
function
|
|
5138
|
+
function oi(e, n) {
|
|
5088
5139
|
var d, l;
|
|
5089
|
-
if (
|
|
5140
|
+
if (Ee(e.e), n.pointerDown = {
|
|
5090
5141
|
parent: e.targetData.parent,
|
|
5091
5142
|
node: e.targetData.node,
|
|
5092
5143
|
validated: !1
|
|
@@ -5097,7 +5148,7 @@ function ti(e, n) {
|
|
|
5097
5148
|
config: e.targetData.parent.data.config
|
|
5098
5149
|
}))
|
|
5099
5150
|
return;
|
|
5100
|
-
n.pointerDown.validated = !0,
|
|
5151
|
+
n.pointerDown.validated = !0, bi(e, n, e.targetData.node);
|
|
5101
5152
|
const t = e.targetData.parent.data;
|
|
5102
5153
|
let r = [e.targetData.node];
|
|
5103
5154
|
const o = e.e.ctrlKey || e.e.metaKey, a = e.e.shiftKey, s = e.targetData.node;
|
|
@@ -5119,7 +5170,7 @@ function ti(e, n) {
|
|
|
5119
5170
|
const p = e.targetData.parent.data.enabledNodes;
|
|
5120
5171
|
if (n.selectedState && n.activeState)
|
|
5121
5172
|
if (n.selectedState.parent.el !== e.targetData.parent.el) {
|
|
5122
|
-
|
|
5173
|
+
Ae(n.selectedState.nodes, n.selectedState.parent, n), n.selectedState = void 0;
|
|
5123
5174
|
for (let u = 0; u <= s.data.index; u++)
|
|
5124
5175
|
r.push(p[u]);
|
|
5125
5176
|
} else {
|
|
@@ -5146,7 +5197,7 @@ function ti(e, n) {
|
|
|
5146
5197
|
}
|
|
5147
5198
|
(l = (d = n.selectedState) == null ? void 0 : d.nodes) != null && l.length ? n.selectedState.nodes.findIndex(
|
|
5148
5199
|
(u) => u.el === e.targetData.node.el
|
|
5149
|
-
) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ?
|
|
5200
|
+
) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? Ae(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && Tt() ? r.push(...n.selectedState.nodes) : Ae(n.selectedState.nodes, e.targetData.parent, n), en(
|
|
5150
5201
|
e.targetData.parent,
|
|
5151
5202
|
r,
|
|
5152
5203
|
e.targetData.node,
|
|
@@ -5160,28 +5211,28 @@ function ti(e, n) {
|
|
|
5160
5211
|
!0
|
|
5161
5212
|
);
|
|
5162
5213
|
}
|
|
5163
|
-
function
|
|
5164
|
-
|
|
5214
|
+
function ai(e, n, t, r = !1) {
|
|
5215
|
+
Le(
|
|
5165
5216
|
n.map((o) => o.el),
|
|
5166
5217
|
r ? t.synthDraggingClass : t.draggingClass
|
|
5167
5218
|
), setTimeout(() => {
|
|
5168
|
-
|
|
5219
|
+
De(
|
|
5169
5220
|
n.map((o) => o.el),
|
|
5170
5221
|
r ? t.synthDraggingClass : t.draggingClass
|
|
5171
|
-
),
|
|
5222
|
+
), Le(
|
|
5172
5223
|
n.map((o) => o.el),
|
|
5173
5224
|
r ? t.synthDragPlaceholderClass : t.dragPlaceholderClass
|
|
5174
|
-
),
|
|
5225
|
+
), Le(
|
|
5175
5226
|
n.map((o) => o.el),
|
|
5176
5227
|
r ? t.synthDropZoneClass : t.dropZoneClass
|
|
5177
|
-
),
|
|
5228
|
+
), De(
|
|
5178
5229
|
n.map((o) => o.el),
|
|
5179
5230
|
t.selectedClass
|
|
5180
5231
|
);
|
|
5181
5232
|
});
|
|
5182
5233
|
}
|
|
5183
|
-
function
|
|
5184
|
-
|
|
5234
|
+
function ii(e, n) {
|
|
5235
|
+
Ee(e.e);
|
|
5185
5236
|
const t = wt(
|
|
5186
5237
|
Ct(
|
|
5187
5238
|
e.targetData.node,
|
|
@@ -5251,75 +5302,75 @@ function Et({
|
|
|
5251
5302
|
if (a === s || s.contains(a)) return !0;
|
|
5252
5303
|
return !1;
|
|
5253
5304
|
}
|
|
5254
|
-
function
|
|
5305
|
+
function li(e) {
|
|
5255
5306
|
}
|
|
5256
|
-
function
|
|
5307
|
+
function si(e) {
|
|
5257
5308
|
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) : hn(e.detail, e.detail.state);
|
|
5258
5309
|
}
|
|
5259
|
-
function
|
|
5310
|
+
function di(e, n) {
|
|
5260
5311
|
const t = e.targetData.parent.data.config;
|
|
5261
|
-
t.nativeDrag && (
|
|
5312
|
+
t.nativeDrag && (Ee(e.e), Se = !0, t.handleEnd(n));
|
|
5262
5313
|
}
|
|
5263
|
-
function
|
|
5314
|
+
function ci(e) {
|
|
5264
5315
|
e.e.target !== e.e.currentTarget && v.pointerDown && (v.pointerDown.node.el.draggable = !1);
|
|
5265
5316
|
}
|
|
5266
|
-
function
|
|
5317
|
+
function ui(e) {
|
|
5267
5318
|
e.e.target !== e.e.currentTarget && v.pointerDown && (v.pointerDown.node.el.draggable = !0);
|
|
5268
5319
|
}
|
|
5269
|
-
function
|
|
5320
|
+
function pi(e, n) {
|
|
5270
5321
|
const t = e.targetData.parent.data.config;
|
|
5271
5322
|
if (t.nativeDrag) {
|
|
5272
|
-
if (W(e.e),
|
|
5273
|
-
|
|
5323
|
+
if (W(e.e), Ee(e.e), Se) {
|
|
5324
|
+
Se = !1;
|
|
5274
5325
|
return;
|
|
5275
5326
|
}
|
|
5276
5327
|
t.handleEnd(n);
|
|
5277
5328
|
}
|
|
5278
5329
|
}
|
|
5279
|
-
function
|
|
5330
|
+
function gi(e, n) {
|
|
5280
5331
|
var r;
|
|
5281
|
-
if (!
|
|
5282
|
-
if (W(e.e),
|
|
5283
|
-
|
|
5332
|
+
if (!oe(n)) return;
|
|
5333
|
+
if (W(e.e), Se) {
|
|
5334
|
+
Se = !1;
|
|
5284
5335
|
return;
|
|
5285
5336
|
}
|
|
5286
|
-
const t = (r =
|
|
5337
|
+
const t = (r = Y.get(n.initialParent.el)) == null ? void 0 : r.config;
|
|
5287
5338
|
t != null && t.onDragend && t.onDragend({
|
|
5288
5339
|
parent: n.currentParent,
|
|
5289
|
-
values:
|
|
5340
|
+
values: ze(n.currentParent.el, n.currentParent.data),
|
|
5290
5341
|
draggedNode: n.draggedNode,
|
|
5291
5342
|
draggedNodes: n.draggedNodes,
|
|
5292
5343
|
state: n
|
|
5293
5344
|
}), t == null || t.handleEnd(n);
|
|
5294
5345
|
}
|
|
5295
|
-
function
|
|
5346
|
+
function hi(e) {
|
|
5296
5347
|
var u, c, g, f, h;
|
|
5297
5348
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
5298
|
-
const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r =
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
}),
|
|
5349
|
+
const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = oe(e), o = (u = Y.get(e.initialParent.el)) == null ? void 0 : u.config, a = 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 : (f = t == null ? void 0 : t.config) == null ? void 0 : f.dragPlaceholderClass, l = e.originalZIndex;
|
|
5350
|
+
oe(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), kn(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(() => {
|
|
5351
|
+
De(n, a), De(n, s), De(n, d);
|
|
5352
|
+
}), Ae(e.draggedNodes, e.currentParent, e), Ie(e.currentParent, void 0, e);
|
|
5302
5353
|
const p = { ...e };
|
|
5303
5354
|
(h = o == null ? void 0 : o.onDragend) == null || h.call(o, {
|
|
5304
5355
|
parent: p.currentParent,
|
|
5305
|
-
values:
|
|
5356
|
+
values: ze(
|
|
5306
5357
|
p.currentParent.el,
|
|
5307
5358
|
p.currentParent.data
|
|
5308
5359
|
),
|
|
5309
5360
|
draggedNode: p.draggedNode,
|
|
5310
5361
|
draggedNodes: p.draggedNodes,
|
|
5311
5362
|
state: p
|
|
5312
|
-
}), e.emit("dragEnded", p),
|
|
5363
|
+
}), e.emit("dragEnded", p), Oa();
|
|
5313
5364
|
}
|
|
5314
|
-
function
|
|
5315
|
-
|
|
5365
|
+
function fi(e, n) {
|
|
5366
|
+
Ee(e.e), !n.pointerSelection && n.selectedState && Ae(n.selectedState.nodes, e.targetData.parent, n);
|
|
5316
5367
|
const t = e.targetData.parent.data.config;
|
|
5317
|
-
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1,
|
|
5368
|
+
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, De(
|
|
5318
5369
|
e.targetData.parent.data.enabledNodes.map((r) => r.el),
|
|
5319
5370
|
t.longPressClass
|
|
5320
5371
|
), X(n) && t.handleEnd(n);
|
|
5321
5372
|
}
|
|
5322
|
-
function
|
|
5373
|
+
function mi(e, n, t, r, o, a) {
|
|
5323
5374
|
var h, x;
|
|
5324
5375
|
const s = n.data.config;
|
|
5325
5376
|
let d, l;
|
|
@@ -5402,10 +5453,10 @@ function hi(e, n, t, r, o, a) {
|
|
|
5402
5453
|
...g
|
|
5403
5454
|
});
|
|
5404
5455
|
}
|
|
5405
|
-
function
|
|
5456
|
+
function bi(e, n, t) {
|
|
5406
5457
|
const r = e.targetData.parent.data.config;
|
|
5407
5458
|
n.longPressTimeout = setTimeout(() => {
|
|
5408
|
-
n && (n.longPress = !0, r.longPressClass && e.e.cancelable &&
|
|
5459
|
+
n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Le([t.el], r.longPressClass), W(e.e));
|
|
5409
5460
|
}, r.longPressDuration || 1e3);
|
|
5410
5461
|
}
|
|
5411
5462
|
function kn(e, n = !0, t = !0) {
|
|
@@ -5414,17 +5465,17 @@ function kn(e, n = !0, t = !0) {
|
|
|
5414
5465
|
function Nt(e, n = !1) {
|
|
5415
5466
|
var u;
|
|
5416
5467
|
const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, a = e.startTop ?? 0, s = window.scrollX ?? 0, d = window.scrollY ?? 0, l = t - o + s, p = r - a + d;
|
|
5417
|
-
e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${p}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1",
|
|
5468
|
+
e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${p}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", De(
|
|
5418
5469
|
e.draggedNodes.map((c) => c.el),
|
|
5419
5470
|
(u = e.initialParent.data.config) == null ? void 0 : u.longPressClass
|
|
5420
5471
|
));
|
|
5421
5472
|
}
|
|
5422
|
-
function
|
|
5423
|
-
const r =
|
|
5473
|
+
function Zn(e, n, t = !1) {
|
|
5474
|
+
const r = _e(e);
|
|
5424
5475
|
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(() => {
|
|
5425
|
-
|
|
5476
|
+
oe(n) && fn(n.coordinates, e, n);
|
|
5426
5477
|
}, 16);
|
|
5427
|
-
const o =
|
|
5478
|
+
const o = Ni(r);
|
|
5428
5479
|
if (!o) {
|
|
5429
5480
|
document.dispatchEvent(
|
|
5430
5481
|
new CustomEvent("handleRootPointerover", {
|
|
@@ -5451,22 +5502,22 @@ function Kn(e, n, t = !1) {
|
|
|
5451
5502
|
})
|
|
5452
5503
|
);
|
|
5453
5504
|
}
|
|
5454
|
-
function
|
|
5505
|
+
function vi(e, n) {
|
|
5455
5506
|
var a;
|
|
5456
5507
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5457
|
-
const { x: r, y: o } =
|
|
5458
|
-
n.coordinates.y = o, n.coordinates.x = r, W(e.e),
|
|
5508
|
+
const { x: r, y: o } = _e(e.e);
|
|
5509
|
+
n.coordinates.y = o, n.coordinates.x = r, W(e.e), Ee(e.e), X(n) && fn({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((a = n.currentParent) == null ? void 0 : a.el) ? kt(e, n) : hn(e, n);
|
|
5459
5510
|
}
|
|
5460
|
-
function
|
|
5511
|
+
function yi(e, n) {
|
|
5461
5512
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5462
|
-
W(e.e),
|
|
5463
|
-
const { x: r, y: o } =
|
|
5513
|
+
W(e.e), Ee(e.e);
|
|
5514
|
+
const { x: r, y: o } = _e(e.e);
|
|
5464
5515
|
X(n) && fn({ x: r, y: o }, e.e, n), hn(e, n);
|
|
5465
5516
|
}
|
|
5466
|
-
function
|
|
5517
|
+
function xi(e) {
|
|
5467
5518
|
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && hn(e.detail, e.detail.state);
|
|
5468
5519
|
}
|
|
5469
|
-
function
|
|
5520
|
+
function Ti({
|
|
5470
5521
|
currentParent: e,
|
|
5471
5522
|
targetParent: n,
|
|
5472
5523
|
initialParent: t,
|
|
@@ -5484,13 +5535,13 @@ function yi({
|
|
|
5484
5535
|
o
|
|
5485
5536
|
) : !(!a.group || a.group !== s.group);
|
|
5486
5537
|
}
|
|
5487
|
-
function
|
|
5538
|
+
function wi(e, n) {
|
|
5488
5539
|
W(e.e);
|
|
5489
5540
|
}
|
|
5490
|
-
function
|
|
5541
|
+
function Ci(e, n) {
|
|
5491
5542
|
W(e.e);
|
|
5492
5543
|
}
|
|
5493
|
-
function
|
|
5544
|
+
function Di(e, n, t, r) {
|
|
5494
5545
|
var u;
|
|
5495
5546
|
if (n.affectedNodes.map((c) => c.data.value).includes(e.targetData.node.data.value))
|
|
5496
5547
|
return !1;
|
|
@@ -5525,8 +5576,8 @@ function wi(e, n, t, r) {
|
|
|
5525
5576
|
return !1;
|
|
5526
5577
|
}
|
|
5527
5578
|
function kt(e, n) {
|
|
5528
|
-
const { x: t, y: r } =
|
|
5529
|
-
if (!
|
|
5579
|
+
const { x: t, y: r } = _e(e.e);
|
|
5580
|
+
if (!Di(e, n, t, r))
|
|
5530
5581
|
return;
|
|
5531
5582
|
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];
|
|
5532
5583
|
n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
|
|
@@ -5537,11 +5588,11 @@ function kt(e, n) {
|
|
|
5537
5588
|
targetNodes: [e.targetData.node]
|
|
5538
5589
|
});
|
|
5539
5590
|
}
|
|
5540
|
-
function
|
|
5591
|
+
function J(e) {
|
|
5541
5592
|
function n(t) {
|
|
5542
5593
|
const r = he.get(t);
|
|
5543
5594
|
if (!r) return;
|
|
5544
|
-
const o =
|
|
5595
|
+
const o = Y.get(t.parentNode);
|
|
5545
5596
|
if (o)
|
|
5546
5597
|
return {
|
|
5547
5598
|
node: {
|
|
@@ -5567,7 +5618,7 @@ function Z(e) {
|
|
|
5567
5618
|
};
|
|
5568
5619
|
}
|
|
5569
5620
|
function hn(e, n) {
|
|
5570
|
-
W(e.e),
|
|
5621
|
+
W(e.e), Ti({
|
|
5571
5622
|
currentParent: n.currentParent,
|
|
5572
5623
|
targetParent: e.targetData.parent,
|
|
5573
5624
|
initialParent: n.initialParent,
|
|
@@ -5585,7 +5636,7 @@ function hn(e, n) {
|
|
|
5585
5636
|
}
|
|
5586
5637
|
function nn(e) {
|
|
5587
5638
|
function n(t) {
|
|
5588
|
-
const r =
|
|
5639
|
+
const r = Y.get(t);
|
|
5589
5640
|
if (r)
|
|
5590
5641
|
return {
|
|
5591
5642
|
parent: {
|
|
@@ -5606,16 +5657,16 @@ function nn(e) {
|
|
|
5606
5657
|
);
|
|
5607
5658
|
};
|
|
5608
5659
|
}
|
|
5609
|
-
function
|
|
5660
|
+
function Le(e, n, t = !1) {
|
|
5610
5661
|
function r(o, a) {
|
|
5611
5662
|
he.set(o, a);
|
|
5612
5663
|
}
|
|
5613
5664
|
for (const o of e) {
|
|
5614
|
-
const a = he.get(o), s =
|
|
5665
|
+
const a = he.get(o), s = Si(o, n, a, t);
|
|
5615
5666
|
s && r(o, s);
|
|
5616
5667
|
}
|
|
5617
5668
|
}
|
|
5618
|
-
function
|
|
5669
|
+
function Si(e, n, t, r = !1) {
|
|
5619
5670
|
if (!n) return;
|
|
5620
5671
|
const o = xt(n);
|
|
5621
5672
|
if (!o.length) return;
|
|
@@ -5632,7 +5683,7 @@ function Ci(e, n, t, r = !1) {
|
|
|
5632
5683
|
) : e.classList.add(s);
|
|
5633
5684
|
return t.privateClasses = a, t;
|
|
5634
5685
|
}
|
|
5635
|
-
function
|
|
5686
|
+
function De(e, n) {
|
|
5636
5687
|
if (!n) return;
|
|
5637
5688
|
const t = xt(n);
|
|
5638
5689
|
if (t.length)
|
|
@@ -5641,13 +5692,13 @@ function Ce(e, n) {
|
|
|
5641
5692
|
r.classList.remove(...t);
|
|
5642
5693
|
continue;
|
|
5643
5694
|
}
|
|
5644
|
-
const o = he.get(r) ||
|
|
5695
|
+
const o = he.get(r) || Y.get(r);
|
|
5645
5696
|
if (o)
|
|
5646
5697
|
for (const a of t)
|
|
5647
5698
|
o.privateClasses.includes(a) || r.classList.remove(a);
|
|
5648
5699
|
}
|
|
5649
5700
|
}
|
|
5650
|
-
function
|
|
5701
|
+
function Kn(e, n, t, r, o) {
|
|
5651
5702
|
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, f = s ? r.left : r.top, h = s ? t.overflowX : t.overflowY;
|
|
5652
5703
|
if (d) {
|
|
5653
5704
|
const x = e[l], b = e[p], D = x > 0, T = x + b < (s ? o.state.rootScrollWidth || 0 : e[c]);
|
|
@@ -5671,7 +5722,7 @@ function Zn(e, n, t, r, o) {
|
|
|
5671
5722
|
}
|
|
5672
5723
|
return s ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
5673
5724
|
}
|
|
5674
|
-
function
|
|
5725
|
+
function Ei(e, n, t, r) {
|
|
5675
5726
|
if (!X(t) || !t.draggedNode)
|
|
5676
5727
|
return;
|
|
5677
5728
|
t.preventEnter = !0;
|
|
@@ -5687,7 +5738,7 @@ function Di(e, n, t, r) {
|
|
|
5687
5738
|
t[l] = void 0, t[d] = void 0;
|
|
5688
5739
|
return;
|
|
5689
5740
|
}
|
|
5690
|
-
e[u] += s * a,
|
|
5741
|
+
e[u] += s * a, oe(t) && Nt(t), t[l] = requestAnimationFrame(p);
|
|
5691
5742
|
};
|
|
5692
5743
|
t[l] = requestAnimationFrame(p);
|
|
5693
5744
|
}
|
|
@@ -5702,12 +5753,12 @@ function fn(e, n, t) {
|
|
|
5702
5753
|
const { x: r, y: o } = e;
|
|
5703
5754
|
let a = !1;
|
|
5704
5755
|
const s = (l, p, u) => {
|
|
5705
|
-
|
|
5756
|
+
Ei(u, n, t, { axis: l, direction: p }), a = !0;
|
|
5706
5757
|
}, d = (l) => {
|
|
5707
|
-
const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c =
|
|
5758
|
+
const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Kn(l, n, p, u, {
|
|
5708
5759
|
axis: "x",
|
|
5709
5760
|
state: t
|
|
5710
|
-
}), g =
|
|
5761
|
+
}), g = Kn(l, n, p, u, { axis: "y" });
|
|
5711
5762
|
(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));
|
|
5712
5763
|
};
|
|
5713
5764
|
if (t.lastScrollContainerX && Jn(t.lastScrollContainerX, r, o) && d(t.lastScrollContainerX), !a && t.lastScrollContainerY && Jn(t.lastScrollContainerY, r, o) && d(t.lastScrollContainerY), !a) {
|
|
@@ -5721,19 +5772,19 @@ function fn(e, n, t) {
|
|
|
5721
5772
|
}
|
|
5722
5773
|
a || kn(t);
|
|
5723
5774
|
}
|
|
5724
|
-
function
|
|
5775
|
+
function Ni(e) {
|
|
5725
5776
|
let n = document.elementFromPoint(e.x, e.y);
|
|
5726
5777
|
if (!mn(n)) return;
|
|
5727
5778
|
let t, r = !0;
|
|
5728
5779
|
for (; n && r; ) {
|
|
5729
|
-
if (he.has(n) ||
|
|
5730
|
-
r = !1, t =
|
|
5780
|
+
if (he.has(n) || Y.has(n)) {
|
|
5781
|
+
r = !1, t = Y.has(n);
|
|
5731
5782
|
break;
|
|
5732
5783
|
}
|
|
5733
5784
|
n = n.parentNode;
|
|
5734
5785
|
}
|
|
5735
5786
|
if (t) {
|
|
5736
|
-
const o =
|
|
5787
|
+
const o = Y.get(n);
|
|
5737
5788
|
return o ? {
|
|
5738
5789
|
parent: {
|
|
5739
5790
|
el: n,
|
|
@@ -5743,7 +5794,7 @@ function Si(e) {
|
|
|
5743
5794
|
} else {
|
|
5744
5795
|
const o = he.get(n);
|
|
5745
5796
|
if (!o) return;
|
|
5746
|
-
const a =
|
|
5797
|
+
const a = Y.get(n.parentNode);
|
|
5747
5798
|
return a ? {
|
|
5748
5799
|
node: {
|
|
5749
5800
|
el: n,
|
|
@@ -5771,44 +5822,44 @@ function an(e, n) {
|
|
|
5771
5822
|
}
|
|
5772
5823
|
return t;
|
|
5773
5824
|
}
|
|
5774
|
-
function
|
|
5825
|
+
function ki(e) {
|
|
5775
5826
|
if (e instanceof HTMLElement) return e;
|
|
5776
5827
|
if ("current" in e && e.current instanceof HTMLElement)
|
|
5777
5828
|
return e.current;
|
|
5778
5829
|
console.warn("Invalid parent element", e);
|
|
5779
5830
|
}
|
|
5780
|
-
function
|
|
5781
|
-
const t =
|
|
5831
|
+
function Ai(e, n) {
|
|
5832
|
+
const t = ki(e);
|
|
5782
5833
|
t && n(t);
|
|
5783
5834
|
}
|
|
5784
5835
|
var ln = /* @__PURE__ */ new WeakMap();
|
|
5785
|
-
function
|
|
5836
|
+
function $i(e) {
|
|
5786
5837
|
const n = ln.get(e);
|
|
5787
5838
|
return n ? n[0] : (console.warn("No values found for parent element"), []);
|
|
5788
5839
|
}
|
|
5789
|
-
function
|
|
5840
|
+
function Ii(e, n) {
|
|
5790
5841
|
const t = ln.get(n);
|
|
5791
5842
|
t && t[1](e), ln.set(n, [e, t[1]]);
|
|
5792
5843
|
}
|
|
5793
|
-
function
|
|
5844
|
+
function Ri(e, n) {
|
|
5794
5845
|
return (t) => {
|
|
5795
|
-
ln.set(t, n), ja({ parent: t, getValues:
|
|
5846
|
+
ln.set(t, n), ja({ parent: t, getValues: $i, setValues: Ii, config: e });
|
|
5796
5847
|
};
|
|
5797
5848
|
}
|
|
5798
5849
|
function et(e) {
|
|
5799
|
-
|
|
5850
|
+
Mn && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
|
|
5800
5851
|
const { parent: t, state: r, ...o } = n;
|
|
5801
|
-
|
|
5852
|
+
Ai(t, Ri(o, r));
|
|
5802
5853
|
}));
|
|
5803
5854
|
}
|
|
5804
|
-
function
|
|
5805
|
-
const t =
|
|
5855
|
+
function Fi(e, n = {}) {
|
|
5856
|
+
const t = Fe(null), [r, o] = H(e);
|
|
5806
5857
|
function a(s = {}) {
|
|
5807
5858
|
et({ parent: t, state: [r, o], ...s });
|
|
5808
5859
|
}
|
|
5809
|
-
return
|
|
5860
|
+
return $e(() => {
|
|
5810
5861
|
et({ parent: t, state: [r, o], ...n });
|
|
5811
|
-
}, [r]),
|
|
5862
|
+
}, [r]), $e(() => () => {
|
|
5812
5863
|
t.current && Dt(t.current);
|
|
5813
5864
|
}, []), [t, r, o, a];
|
|
5814
5865
|
}
|
|
@@ -5821,7 +5872,7 @@ const nt = {
|
|
|
5821
5872
|
color: E.palette.neutral.N40
|
|
5822
5873
|
}
|
|
5823
5874
|
}
|
|
5824
|
-
},
|
|
5875
|
+
}, Li = C.ul`
|
|
5825
5876
|
list-style: none;
|
|
5826
5877
|
padding: 0;
|
|
5827
5878
|
margin: 0;
|
|
@@ -5830,7 +5881,7 @@ const nt = {
|
|
|
5830
5881
|
gap: 12px;
|
|
5831
5882
|
width: 100%;
|
|
5832
5883
|
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
5833
|
-
`,
|
|
5884
|
+
`, Oi = C.li`
|
|
5834
5885
|
& > div {
|
|
5835
5886
|
border: 1px solid
|
|
5836
5887
|
${({ theme: e, $active: n }) => {
|
|
@@ -5848,57 +5899,57 @@ const nt = {
|
|
|
5848
5899
|
highlightFirst: s,
|
|
5849
5900
|
onMove: d,
|
|
5850
5901
|
locked: l = !1
|
|
5851
|
-
} = e, p =
|
|
5902
|
+
} = e, p = P.useRef(null), u = l ? [p, a] : Fi(a, { group: r }), [c, g] = u, [f, h] = P.useState(
|
|
5852
5903
|
null
|
|
5853
|
-
), x =
|
|
5854
|
-
|
|
5904
|
+
), x = P.useRef(a);
|
|
5905
|
+
P.useEffect(() => {
|
|
5855
5906
|
if (l) return;
|
|
5856
5907
|
const N = (w) => {
|
|
5857
|
-
const
|
|
5858
|
-
h(
|
|
5908
|
+
const F = w.detail ?? null;
|
|
5909
|
+
h(F);
|
|
5859
5910
|
};
|
|
5860
5911
|
return window.addEventListener(Tn, N), () => window.removeEventListener(Tn, N);
|
|
5861
5912
|
}, [l]);
|
|
5862
|
-
const b =
|
|
5913
|
+
const b = P.useCallback((N) => {
|
|
5863
5914
|
l || window.dispatchEvent(
|
|
5864
5915
|
new CustomEvent(Tn, { detail: N })
|
|
5865
5916
|
);
|
|
5866
5917
|
}, [l]), D = (N) => {
|
|
5867
|
-
var
|
|
5918
|
+
var $;
|
|
5868
5919
|
if (l) return;
|
|
5869
|
-
const w = N.target,
|
|
5870
|
-
|
|
5871
|
-
}, T =
|
|
5920
|
+
const w = N.target, F = ($ = w == null ? void 0 : w.closest) == null ? void 0 : $.call(w, "li.dnd-item"), O = (F == null ? void 0 : F.getAttribute("data-label")) || null;
|
|
5921
|
+
O && (h(O), b(O));
|
|
5922
|
+
}, T = P.useCallback(() => {
|
|
5872
5923
|
l || (h(null), b(null));
|
|
5873
5924
|
}, [b, l]);
|
|
5874
|
-
|
|
5925
|
+
P.useEffect(() => {
|
|
5875
5926
|
if (l) return;
|
|
5876
5927
|
const N = () => T();
|
|
5877
5928
|
return window.addEventListener("pointerup", N), window.addEventListener("blur", N), () => {
|
|
5878
5929
|
window.removeEventListener("pointerup", N), window.removeEventListener("blur", N);
|
|
5879
5930
|
};
|
|
5880
|
-
}, [T, l]),
|
|
5931
|
+
}, [T, l]), P.useEffect(() => {
|
|
5881
5932
|
if (l) return;
|
|
5882
5933
|
const N = x.current;
|
|
5883
5934
|
if (g.length !== N.length && g.length === N.length + 1) {
|
|
5884
|
-
const w = new Set(N),
|
|
5885
|
-
if (
|
|
5886
|
-
const
|
|
5887
|
-
d == null || d({ item:
|
|
5935
|
+
const w = new Set(N), F = g.find((O) => !w.has(O)) || null;
|
|
5936
|
+
if (F) {
|
|
5937
|
+
const O = t === "left" ? "right" : "left";
|
|
5938
|
+
d == null || d({ item: F, from: O, to: t });
|
|
5888
5939
|
}
|
|
5889
5940
|
}
|
|
5890
5941
|
x.current = g;
|
|
5891
5942
|
}, [g, t, d, l]);
|
|
5892
5943
|
const S = g.length === 0;
|
|
5893
5944
|
return /* @__PURE__ */ i(
|
|
5894
|
-
|
|
5945
|
+
je,
|
|
5895
5946
|
{
|
|
5896
5947
|
legend: o,
|
|
5897
5948
|
width: "100%",
|
|
5898
5949
|
height: "-webkit-fill-available",
|
|
5899
5950
|
spacing: "wide",
|
|
5900
5951
|
children: /* @__PURE__ */ i(
|
|
5901
|
-
|
|
5952
|
+
Li,
|
|
5902
5953
|
{
|
|
5903
5954
|
ref: c,
|
|
5904
5955
|
onPointerDownCapture: l ? void 0 : D,
|
|
@@ -5909,30 +5960,30 @@ const nt = {
|
|
|
5909
5960
|
"aria-disabled": l,
|
|
5910
5961
|
"data-locked": l || void 0,
|
|
5911
5962
|
children: S ? /* @__PURE__ */ i(
|
|
5912
|
-
|
|
5963
|
+
ie,
|
|
5913
5964
|
{
|
|
5914
5965
|
background: !0,
|
|
5915
5966
|
borderRadius: "8px",
|
|
5916
5967
|
width: "100%",
|
|
5917
5968
|
alignItems: "center",
|
|
5918
5969
|
justifyContent: "center",
|
|
5919
|
-
children: /* @__PURE__ */ i(
|
|
5970
|
+
children: /* @__PURE__ */ i(R, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
|
|
5920
5971
|
}
|
|
5921
5972
|
) : g.map((N, w) => {
|
|
5922
|
-
const
|
|
5973
|
+
const F = !l && f === N;
|
|
5923
5974
|
return /* @__PURE__ */ i(
|
|
5924
|
-
|
|
5975
|
+
Oi,
|
|
5925
5976
|
{
|
|
5926
|
-
className: `dnd-item${
|
|
5977
|
+
className: `dnd-item${F ? " is-dragging" : ""}`,
|
|
5927
5978
|
"data-label": N,
|
|
5928
5979
|
"data-first": !!(s && w === 0) || void 0,
|
|
5929
|
-
$active:
|
|
5930
|
-
children: /* @__PURE__ */ i(
|
|
5931
|
-
|
|
5980
|
+
$active: F,
|
|
5981
|
+
children: /* @__PURE__ */ i(ie, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
|
|
5982
|
+
R,
|
|
5932
5983
|
{
|
|
5933
5984
|
type: "title",
|
|
5934
|
-
appearance:
|
|
5935
|
-
weight:
|
|
5985
|
+
appearance: F ? "primary" : "dark",
|
|
5986
|
+
weight: F ? "bold" : "normal",
|
|
5936
5987
|
size: "medium",
|
|
5937
5988
|
padding: "6px 12px",
|
|
5938
5989
|
children: N
|
|
@@ -5946,7 +5997,7 @@ const nt = {
|
|
|
5946
5997
|
)
|
|
5947
5998
|
}
|
|
5948
5999
|
);
|
|
5949
|
-
},
|
|
6000
|
+
}, Al = (e) => {
|
|
5950
6001
|
const { group: n = "clients", left: t, right: r, onMove: o, locked: a = !1 } = e, s = (d) => {
|
|
5951
6002
|
a || o == null || o(d);
|
|
5952
6003
|
};
|
|
@@ -5987,7 +6038,7 @@ const nt = {
|
|
|
5987
6038
|
]
|
|
5988
6039
|
}
|
|
5989
6040
|
);
|
|
5990
|
-
},
|
|
6041
|
+
}, Mi = C.div`
|
|
5991
6042
|
& > button {
|
|
5992
6043
|
height: 66px;
|
|
5993
6044
|
min-width: 66px;
|
|
@@ -6005,7 +6056,7 @@ const nt = {
|
|
|
6005
6056
|
}
|
|
6006
6057
|
}
|
|
6007
6058
|
}
|
|
6008
|
-
`,
|
|
6059
|
+
`, $l = (e) => /* @__PURE__ */ i(Mi, { children: /* @__PURE__ */ i(B, { ...e }) }), Pi = C.div`
|
|
6009
6060
|
display: flex;
|
|
6010
6061
|
justify-content: space-between;
|
|
6011
6062
|
align-items: center;
|
|
@@ -6034,14 +6085,14 @@ const nt = {
|
|
|
6034
6085
|
}
|
|
6035
6086
|
}
|
|
6036
6087
|
}
|
|
6037
|
-
`,
|
|
6088
|
+
`, Il = (e) => {
|
|
6038
6089
|
const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: a } = e;
|
|
6039
|
-
return /* @__PURE__ */ m(
|
|
6090
|
+
return /* @__PURE__ */ m(Pi, { children: [
|
|
6040
6091
|
/* @__PURE__ */ i(
|
|
6041
|
-
|
|
6092
|
+
B,
|
|
6042
6093
|
{
|
|
6043
6094
|
...e,
|
|
6044
|
-
iconBefore: /* @__PURE__ */ i(
|
|
6095
|
+
iconBefore: /* @__PURE__ */ i(_t, {}),
|
|
6045
6096
|
variant: "none",
|
|
6046
6097
|
onClick: n,
|
|
6047
6098
|
children: a.back,
|
|
@@ -6049,10 +6100,10 @@ const nt = {
|
|
|
6049
6100
|
}
|
|
6050
6101
|
),
|
|
6051
6102
|
/* @__PURE__ */ i(
|
|
6052
|
-
|
|
6103
|
+
B,
|
|
6053
6104
|
{
|
|
6054
6105
|
...e,
|
|
6055
|
-
iconBefore: /* @__PURE__ */ i(
|
|
6106
|
+
iconBefore: /* @__PURE__ */ i(Ut, {}),
|
|
6056
6107
|
variant: "none",
|
|
6057
6108
|
onClick: t,
|
|
6058
6109
|
children: a.next,
|
|
@@ -6098,7 +6149,7 @@ const nt = {
|
|
|
6098
6149
|
hover: E.palette.neutral.N30
|
|
6099
6150
|
}
|
|
6100
6151
|
}
|
|
6101
|
-
},
|
|
6152
|
+
}, zi = C.ul`
|
|
6102
6153
|
display: flex;
|
|
6103
6154
|
flex-direction: column;
|
|
6104
6155
|
padding: 4px 0px;
|
|
@@ -6149,7 +6200,7 @@ const nt = {
|
|
|
6149
6200
|
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) || ge.option.background.hover;
|
|
6150
6201
|
}};
|
|
6151
6202
|
}
|
|
6152
|
-
`,
|
|
6203
|
+
`, Vi = (e) => {
|
|
6153
6204
|
const { children: n, onOptionClick: t, options: r, maxItems: o } = e, a = (s) => {
|
|
6154
6205
|
try {
|
|
6155
6206
|
if (s.target.closest('input[type="checkbox"]'))
|
|
@@ -6166,7 +6217,7 @@ const nt = {
|
|
|
6166
6217
|
}
|
|
6167
6218
|
};
|
|
6168
6219
|
return /* @__PURE__ */ i(
|
|
6169
|
-
|
|
6220
|
+
zi,
|
|
6170
6221
|
{
|
|
6171
6222
|
$maxItems: o,
|
|
6172
6223
|
$totalOptions: r == null ? void 0 : r.length,
|
|
@@ -6174,11 +6225,11 @@ const nt = {
|
|
|
6174
6225
|
children: n
|
|
6175
6226
|
}
|
|
6176
6227
|
);
|
|
6177
|
-
},
|
|
6228
|
+
}, _i = C.div`
|
|
6178
6229
|
cursor: ${({ $disabled: e }) => e && "not-allowed"};
|
|
6179
6230
|
width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
|
|
6180
6231
|
position: relative;
|
|
6181
|
-
`,
|
|
6232
|
+
`, Ui = C.div`
|
|
6182
6233
|
display: flex;
|
|
6183
6234
|
align-items: center;
|
|
6184
6235
|
margin-bottom: 4px;
|
|
@@ -6208,7 +6259,7 @@ const nt = {
|
|
|
6208
6259
|
const o = ((s = (a = r == null ? void 0 : r.input) == null ? void 0 : a.border) == null ? void 0 : s.color) || ge.border.color;
|
|
6209
6260
|
return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
|
|
6210
6261
|
}};
|
|
6211
|
-
`,
|
|
6262
|
+
`, Hi = C.input`
|
|
6212
6263
|
display: ${({ $inputWithData: e }) => e ? "none" : "block"};
|
|
6213
6264
|
outline: none;
|
|
6214
6265
|
padding: 0;
|
|
@@ -6266,23 +6317,23 @@ const nt = {
|
|
|
6266
6317
|
&:-webkit-autofill {
|
|
6267
6318
|
-webkit-background-clip: text;
|
|
6268
6319
|
}
|
|
6269
|
-
`,
|
|
6320
|
+
`, qi = C.div`
|
|
6270
6321
|
display: flex;
|
|
6271
6322
|
justify-content: flex-end;
|
|
6272
6323
|
transition: ease;
|
|
6273
6324
|
transition-duration: 500ms;
|
|
6274
6325
|
transform: ${({ $displayList: e }) => e ? "rotate(-90deg)" : "rotate(90deg)"};
|
|
6275
|
-
`,
|
|
6326
|
+
`, Bi = (e) => e === "compact" ? "medium" : "large";
|
|
6276
6327
|
function rt(e, n) {
|
|
6277
6328
|
const t = e.find((r) => r.value === n);
|
|
6278
6329
|
return t ? t.label : n;
|
|
6279
6330
|
}
|
|
6280
|
-
const
|
|
6331
|
+
const Gi = (e) => {
|
|
6281
6332
|
var o, a;
|
|
6282
6333
|
const { message: n } = e, t = Fn(In), r = ((a = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : a.appearance) || ge.message.appearance;
|
|
6283
6334
|
return /* @__PURE__ */ m(y, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
|
|
6284
6335
|
/* @__PURE__ */ i(
|
|
6285
|
-
|
|
6336
|
+
j,
|
|
6286
6337
|
{
|
|
6287
6338
|
appearance: r,
|
|
6288
6339
|
icon: /* @__PURE__ */ i(Ht, {}),
|
|
@@ -6290,7 +6341,7 @@ const qi = (e) => {
|
|
|
6290
6341
|
}
|
|
6291
6342
|
),
|
|
6292
6343
|
/* @__PURE__ */ i(
|
|
6293
|
-
|
|
6344
|
+
R,
|
|
6294
6345
|
{
|
|
6295
6346
|
type: "body",
|
|
6296
6347
|
size: "small",
|
|
@@ -6300,7 +6351,7 @@ const qi = (e) => {
|
|
|
6300
6351
|
}
|
|
6301
6352
|
)
|
|
6302
6353
|
] });
|
|
6303
|
-
},
|
|
6354
|
+
}, Yi = Qt((e, n) => {
|
|
6304
6355
|
var me, le;
|
|
6305
6356
|
const {
|
|
6306
6357
|
displayList: t,
|
|
@@ -6323,25 +6374,25 @@ const qi = (e) => {
|
|
|
6323
6374
|
checkedItems: S,
|
|
6324
6375
|
editable: N = !1,
|
|
6325
6376
|
clearable: w,
|
|
6326
|
-
onKeyUp:
|
|
6327
|
-
onBlur:
|
|
6328
|
-
onChange:
|
|
6329
|
-
onClick:
|
|
6330
|
-
onFocus:
|
|
6377
|
+
onKeyUp: F,
|
|
6378
|
+
onBlur: O,
|
|
6379
|
+
onChange: $,
|
|
6380
|
+
onClick: V,
|
|
6381
|
+
onFocus: Z,
|
|
6331
6382
|
onOptionClick: be,
|
|
6332
6383
|
onCheckboxChange: ve,
|
|
6333
|
-
handleClear:
|
|
6334
|
-
} = e,
|
|
6335
|
-
() => g.filter((
|
|
6384
|
+
handleClear: fe
|
|
6385
|
+
} = e, ae = Fn(In), ye = ((le = (me = ae == null ? void 0 : ae.input) == null ? void 0 : me.required) == null ? void 0 : le.appearance) || ge.required.appearance, Ne = h && !r, ue = D || b === "" ? "" : rt(g, b), xe = dt(
|
|
6386
|
+
() => g.filter((_) => S.includes(_.id)),
|
|
6336
6387
|
[g, S]
|
|
6337
|
-
),
|
|
6338
|
-
|
|
6339
|
-
target: { checked: !1, value:
|
|
6388
|
+
), Te = (_, k) => {
|
|
6389
|
+
_.stopPropagation(), ve({
|
|
6390
|
+
target: { checked: !1, value: k }
|
|
6340
6391
|
});
|
|
6341
6392
|
};
|
|
6342
|
-
return /* @__PURE__ */ m(
|
|
6393
|
+
return /* @__PURE__ */ m(_i, { $fullwidth: a, $disabled: r, ref: n, children: [
|
|
6343
6394
|
l && /* @__PURE__ */ m(
|
|
6344
|
-
|
|
6395
|
+
Ui,
|
|
6345
6396
|
{
|
|
6346
6397
|
$alignItems: "center",
|
|
6347
6398
|
$disabled: r,
|
|
@@ -6354,12 +6405,12 @@ const qi = (e) => {
|
|
|
6354
6405
|
focused: o,
|
|
6355
6406
|
invalid: d,
|
|
6356
6407
|
margin: "0px 0px 0px 16px",
|
|
6357
|
-
size:
|
|
6408
|
+
size: Bi(x),
|
|
6358
6409
|
disabled: r,
|
|
6359
6410
|
children: l
|
|
6360
6411
|
}
|
|
6361
6412
|
),
|
|
6362
|
-
|
|
6413
|
+
Ne && /* @__PURE__ */ i(R, { appearance: ye, size: "small", type: "body", children: "(Requerido)" })
|
|
6363
6414
|
]
|
|
6364
6415
|
}
|
|
6365
6416
|
),
|
|
@@ -6369,16 +6420,16 @@ const qi = (e) => {
|
|
|
6369
6420
|
$disabled: r,
|
|
6370
6421
|
$focused: o,
|
|
6371
6422
|
$invalid: d,
|
|
6372
|
-
onClick: N ? void 0 :
|
|
6423
|
+
onClick: N ? void 0 : V,
|
|
6373
6424
|
$value: b,
|
|
6374
6425
|
$size: x,
|
|
6375
6426
|
children: [
|
|
6376
6427
|
/* @__PURE__ */ i(
|
|
6377
|
-
|
|
6428
|
+
Hi,
|
|
6378
6429
|
{
|
|
6379
6430
|
$inputWithData: !!b,
|
|
6380
6431
|
autoComplete: "off",
|
|
6381
|
-
value:
|
|
6432
|
+
value: ue,
|
|
6382
6433
|
name: c,
|
|
6383
6434
|
id: s,
|
|
6384
6435
|
placeholder: f,
|
|
@@ -6388,11 +6439,11 @@ const qi = (e) => {
|
|
|
6388
6439
|
$fullwidth: a,
|
|
6389
6440
|
$focused: o,
|
|
6390
6441
|
readOnly: !N,
|
|
6391
|
-
onFocus:
|
|
6392
|
-
onBlur:
|
|
6393
|
-
onChange: (
|
|
6394
|
-
onClick: N ?
|
|
6395
|
-
onKeyUp:
|
|
6442
|
+
onFocus: Z,
|
|
6443
|
+
onBlur: O,
|
|
6444
|
+
onChange: (_) => $(c, _.target.value),
|
|
6445
|
+
onClick: N ? V : void 0,
|
|
6446
|
+
onKeyUp: F
|
|
6396
6447
|
}
|
|
6397
6448
|
),
|
|
6398
6449
|
/* @__PURE__ */ m(
|
|
@@ -6403,33 +6454,33 @@ const qi = (e) => {
|
|
|
6403
6454
|
alignItems: "center",
|
|
6404
6455
|
justifyContent: "space-between",
|
|
6405
6456
|
children: [
|
|
6406
|
-
/* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: w && !r && (D ? xe.map((
|
|
6407
|
-
|
|
6457
|
+
/* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: w && !r && (D ? xe.map((_) => /* @__PURE__ */ i(
|
|
6458
|
+
ke,
|
|
6408
6459
|
{
|
|
6409
6460
|
appearance: "gray",
|
|
6410
|
-
label:
|
|
6461
|
+
label: _.label,
|
|
6411
6462
|
removable: !0,
|
|
6412
6463
|
displayIcon: !1,
|
|
6413
|
-
onClose: (
|
|
6464
|
+
onClose: (k) => Te(k, _.id)
|
|
6414
6465
|
},
|
|
6415
|
-
|
|
6466
|
+
_.id
|
|
6416
6467
|
)) : (b ?? "") !== "" && /* @__PURE__ */ i(
|
|
6417
|
-
|
|
6468
|
+
ke,
|
|
6418
6469
|
{
|
|
6419
6470
|
appearance: "gray",
|
|
6420
6471
|
label: rt(g, b),
|
|
6421
6472
|
removable: !0,
|
|
6422
6473
|
displayIcon: !1,
|
|
6423
|
-
onClose: (
|
|
6424
|
-
|
|
6474
|
+
onClose: (_) => {
|
|
6475
|
+
_.stopPropagation(), fe();
|
|
6425
6476
|
}
|
|
6426
6477
|
}
|
|
6427
6478
|
)) }),
|
|
6428
|
-
T && /* @__PURE__ */ i(
|
|
6429
|
-
|
|
6479
|
+
T && /* @__PURE__ */ i(qi, { $displayList: t, children: /* @__PURE__ */ i(
|
|
6480
|
+
j,
|
|
6430
6481
|
{
|
|
6431
6482
|
appearance: "dark",
|
|
6432
|
-
icon: /* @__PURE__ */ i(
|
|
6483
|
+
icon: /* @__PURE__ */ i(jt, {}),
|
|
6433
6484
|
spacing: "narrow",
|
|
6434
6485
|
disabled: r
|
|
6435
6486
|
}
|
|
@@ -6440,28 +6491,28 @@ const qi = (e) => {
|
|
|
6440
6491
|
]
|
|
6441
6492
|
}
|
|
6442
6493
|
),
|
|
6443
|
-
d && /* @__PURE__ */ i(
|
|
6494
|
+
d && /* @__PURE__ */ i(Gi, { message: u }),
|
|
6444
6495
|
t && !r && /* @__PURE__ */ i(
|
|
6445
|
-
|
|
6496
|
+
Vi,
|
|
6446
6497
|
{
|
|
6447
6498
|
maxItems: p,
|
|
6448
6499
|
onOptionClick: be,
|
|
6449
6500
|
options: g,
|
|
6450
|
-
children: g.map((
|
|
6501
|
+
children: g.map((_) => /* @__PURE__ */ i(
|
|
6451
6502
|
Xt,
|
|
6452
6503
|
{
|
|
6453
|
-
id:
|
|
6454
|
-
label:
|
|
6455
|
-
checked: S.includes(
|
|
6504
|
+
id: _.id,
|
|
6505
|
+
label: _.label,
|
|
6506
|
+
checked: S.includes(_.id),
|
|
6456
6507
|
onCheckboxChange: ve,
|
|
6457
6508
|
picker: D
|
|
6458
6509
|
},
|
|
6459
|
-
|
|
6510
|
+
_.id
|
|
6460
6511
|
))
|
|
6461
6512
|
}
|
|
6462
6513
|
)
|
|
6463
6514
|
] });
|
|
6464
|
-
}),
|
|
6515
|
+
}), Wi = (e) => {
|
|
6465
6516
|
const {
|
|
6466
6517
|
disabled: n = !1,
|
|
6467
6518
|
fullwidth: t = !1,
|
|
@@ -6484,72 +6535,72 @@ const qi = (e) => {
|
|
|
6484
6535
|
showOptions: S = !1,
|
|
6485
6536
|
picker: N = !1,
|
|
6486
6537
|
showChevron: w = !0,
|
|
6487
|
-
editable:
|
|
6488
|
-
clearable:
|
|
6489
|
-
} = e, [
|
|
6490
|
-
|
|
6538
|
+
editable: F = !1,
|
|
6539
|
+
clearable: O = !0
|
|
6540
|
+
} = e, [$, V] = H(!1), [Z, be] = H(!1), [ve, fe] = H([]), ae = Fe(null);
|
|
6541
|
+
$e(() => {
|
|
6491
6542
|
if (N) {
|
|
6492
|
-
const
|
|
6493
|
-
|
|
6543
|
+
const k = T ? T.split(",").map((M) => M.trim()) : [];
|
|
6544
|
+
fe(k);
|
|
6494
6545
|
}
|
|
6495
6546
|
}, [T, N]);
|
|
6496
6547
|
function ye() {
|
|
6497
|
-
u(l, ""),
|
|
6548
|
+
u(l, ""), fe([]), V(!1);
|
|
6498
6549
|
}
|
|
6499
|
-
function
|
|
6550
|
+
function Ne(k) {
|
|
6500
6551
|
if (!n) {
|
|
6501
|
-
|
|
6552
|
+
V(!$);
|
|
6502
6553
|
try {
|
|
6503
|
-
c && c(
|
|
6504
|
-
} catch (
|
|
6505
|
-
console.error(`Error when clicking over select. ${
|
|
6554
|
+
c && c(k);
|
|
6555
|
+
} catch (M) {
|
|
6556
|
+
console.error(`Error when clicking over select. ${M}`);
|
|
6506
6557
|
}
|
|
6507
6558
|
}
|
|
6508
6559
|
}
|
|
6509
|
-
const
|
|
6510
|
-
|
|
6560
|
+
const ue = Zt((k) => {
|
|
6561
|
+
ae.current && k.target && !ae.current.contains(k.target) && V(!1);
|
|
6511
6562
|
}, []);
|
|
6512
|
-
function xe(
|
|
6563
|
+
function xe(k) {
|
|
6513
6564
|
try {
|
|
6514
|
-
|
|
6515
|
-
} catch (
|
|
6516
|
-
console.error(`Error executing focus/blur callback. ${
|
|
6565
|
+
k.type === "focus" && (be(!0), g && g(k)), k.type === "blur" && (be(!1), p && p(k));
|
|
6566
|
+
} catch (M) {
|
|
6567
|
+
console.error(`Error executing focus/blur callback. ${M}`);
|
|
6517
6568
|
}
|
|
6518
6569
|
}
|
|
6519
|
-
function
|
|
6520
|
-
|
|
6570
|
+
function Te(k) {
|
|
6571
|
+
V(!1);
|
|
6521
6572
|
try {
|
|
6522
|
-
u && u(l,
|
|
6523
|
-
} catch (
|
|
6524
|
-
console.error(`Error when changing value using callback. ${
|
|
6573
|
+
u && u(l, k);
|
|
6574
|
+
} catch (M) {
|
|
6575
|
+
console.error(`Error when changing value using callback. ${M}`);
|
|
6525
6576
|
}
|
|
6526
6577
|
}
|
|
6527
|
-
function me(
|
|
6528
|
-
|
|
6578
|
+
function me(k) {
|
|
6579
|
+
k.key === "Escape" && V(!1), V(!$);
|
|
6529
6580
|
try {
|
|
6530
|
-
f && f(
|
|
6531
|
-
} catch (
|
|
6532
|
-
console.error(`Error when clicking over select. ${
|
|
6581
|
+
f && f(k);
|
|
6582
|
+
} catch (M) {
|
|
6583
|
+
console.error(`Error when clicking over select. ${M}`);
|
|
6533
6584
|
}
|
|
6534
6585
|
}
|
|
6535
|
-
function le(
|
|
6536
|
-
const { value:
|
|
6537
|
-
|
|
6538
|
-
const
|
|
6539
|
-
return u(l,
|
|
6586
|
+
function le(k) {
|
|
6587
|
+
const { value: M, checked: pe } = k.target;
|
|
6588
|
+
fe((L) => {
|
|
6589
|
+
const I = pe ? [...L, M] : L.filter((U) => U !== M);
|
|
6590
|
+
return u(l, I.join(",")), I;
|
|
6540
6591
|
});
|
|
6541
6592
|
}
|
|
6542
|
-
|
|
6543
|
-
document.removeEventListener("click",
|
|
6544
|
-
}), [
|
|
6545
|
-
const
|
|
6593
|
+
$e(() => (document.addEventListener("click", ue), () => {
|
|
6594
|
+
document.removeEventListener("click", ue);
|
|
6595
|
+
}), [ue]);
|
|
6596
|
+
const _ = dt(() => O || N ? h : [{ id: "empty-option", label: "", value: "" }, ...h], [h, O, N]);
|
|
6546
6597
|
return /* @__PURE__ */ i(
|
|
6547
|
-
|
|
6598
|
+
Yi,
|
|
6548
6599
|
{
|
|
6549
|
-
ref:
|
|
6600
|
+
ref: ae,
|
|
6550
6601
|
disabled: n,
|
|
6551
|
-
displayList:
|
|
6552
|
-
focused:
|
|
6602
|
+
displayList: $ || S,
|
|
6603
|
+
focused: Z,
|
|
6553
6604
|
fullwidth: t,
|
|
6554
6605
|
id: r,
|
|
6555
6606
|
invalid: o,
|
|
@@ -6557,7 +6608,7 @@ const qi = (e) => {
|
|
|
6557
6608
|
maxItems: s,
|
|
6558
6609
|
message: d,
|
|
6559
6610
|
name: l,
|
|
6560
|
-
options:
|
|
6611
|
+
options: _,
|
|
6561
6612
|
placeholder: x,
|
|
6562
6613
|
required: b,
|
|
6563
6614
|
size: D,
|
|
@@ -6565,19 +6616,19 @@ const qi = (e) => {
|
|
|
6565
6616
|
picker: N,
|
|
6566
6617
|
showChevron: w,
|
|
6567
6618
|
checkedItems: ve,
|
|
6568
|
-
editable:
|
|
6569
|
-
clearable:
|
|
6619
|
+
editable: F,
|
|
6620
|
+
clearable: O,
|
|
6570
6621
|
handleClear: ye,
|
|
6571
6622
|
onBlur: xe,
|
|
6572
6623
|
onChange: u,
|
|
6573
|
-
onClick:
|
|
6624
|
+
onClick: Ne,
|
|
6574
6625
|
onFocus: xe,
|
|
6575
|
-
onOptionClick:
|
|
6626
|
+
onOptionClick: Te,
|
|
6576
6627
|
onKeyUp: me,
|
|
6577
6628
|
onCheckboxChange: le
|
|
6578
6629
|
}
|
|
6579
6630
|
);
|
|
6580
|
-
},
|
|
6631
|
+
}, Rl = (e) => {
|
|
6581
6632
|
const {
|
|
6582
6633
|
disabled: n = !1,
|
|
6583
6634
|
fullwidth: t = !1,
|
|
@@ -6595,7 +6646,7 @@ const qi = (e) => {
|
|
|
6595
6646
|
values: h
|
|
6596
6647
|
} = e;
|
|
6597
6648
|
return /* @__PURE__ */ i(
|
|
6598
|
-
|
|
6649
|
+
Wi,
|
|
6599
6650
|
{
|
|
6600
6651
|
disabled: n,
|
|
6601
6652
|
fullwidth: t,
|
|
@@ -6614,30 +6665,30 @@ const qi = (e) => {
|
|
|
6614
6665
|
picker: !0
|
|
6615
6666
|
}
|
|
6616
6667
|
);
|
|
6617
|
-
},
|
|
6668
|
+
}, Fl = (e) => Object.values(e).flat(), Ll = (e, n) => {
|
|
6618
6669
|
const t = Pe(e);
|
|
6619
6670
|
return Object.fromEntries(
|
|
6620
6671
|
Object.entries(t).map(([r, o]) => [r, o.map(n)])
|
|
6621
6672
|
);
|
|
6622
|
-
},
|
|
6673
|
+
}, Xi = (e) => Object.entries(e).map(([n, t]) => ({
|
|
6623
6674
|
ConditionGroupId: n,
|
|
6624
6675
|
conditionsThatEstablishesTheDecision: rn(t)
|
|
6625
|
-
})),
|
|
6676
|
+
})), Ol = (e) => {
|
|
6626
6677
|
const n = Pe(e), t = {
|
|
6627
6678
|
...e,
|
|
6628
|
-
conditionGroups:
|
|
6679
|
+
conditionGroups: Xi(n)
|
|
6629
6680
|
};
|
|
6630
6681
|
return delete t.conditionsThatEstablishesTheDecision, t;
|
|
6631
|
-
},
|
|
6682
|
+
}, Ue = /* @__PURE__ */ new Map(), Qi = (e, n) => Ue.get(`${n}:${e}`), Zi = (e, n, t) => {
|
|
6632
6683
|
const r = `${n}:${e}`;
|
|
6633
|
-
if (
|
|
6634
|
-
const o =
|
|
6635
|
-
o !== void 0 &&
|
|
6684
|
+
if (Ue.set(r, t), Ue.size > 1e3) {
|
|
6685
|
+
const o = Ue.keys().next().value;
|
|
6686
|
+
o !== void 0 && Ue.delete(o);
|
|
6636
6687
|
}
|
|
6637
|
-
}, ot = /* @__PURE__ */ new Map(),
|
|
6688
|
+
}, ot = /* @__PURE__ */ new Map(), Ki = 1e3, Ji = (e) => {
|
|
6638
6689
|
const n = Date.now(), t = ot.get(e) || 0;
|
|
6639
|
-
return n - t <
|
|
6640
|
-
},
|
|
6690
|
+
return n - t < Ki ? !0 : (ot.set(e, n), !1);
|
|
6691
|
+
}, el = (e) => {
|
|
6641
6692
|
const n = er(e);
|
|
6642
6693
|
return {
|
|
6643
6694
|
spa: "es",
|
|
@@ -6647,12 +6698,12 @@ const qi = (e) => {
|
|
|
6647
6698
|
ita: "it",
|
|
6648
6699
|
por: "pt"
|
|
6649
6700
|
}[n] || "en";
|
|
6650
|
-
},
|
|
6651
|
-
const o = `${n}:${e}`, a =
|
|
6701
|
+
}, nl = async (e, n, { url: t, apiKey: r }) => {
|
|
6702
|
+
const o = `${n}:${e}`, a = Qi(e, n);
|
|
6652
6703
|
if (a) return a;
|
|
6653
|
-
if (
|
|
6704
|
+
if (Ji(o))
|
|
6654
6705
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
6655
|
-
const s =
|
|
6706
|
+
const s = el(e);
|
|
6656
6707
|
try {
|
|
6657
6708
|
const { data: d } = await Jt.post(
|
|
6658
6709
|
t,
|
|
@@ -6668,15 +6719,15 @@ const qi = (e) => {
|
|
|
6668
6719
|
}
|
|
6669
6720
|
}
|
|
6670
6721
|
), l = (d == null ? void 0 : d.translatedText) || e;
|
|
6671
|
-
return
|
|
6722
|
+
return Zi(e, n, l), l;
|
|
6672
6723
|
} catch (d) {
|
|
6673
6724
|
return console.warn(`[Translation] Failed for: "${e}"`, d), e;
|
|
6674
6725
|
}
|
|
6675
|
-
},
|
|
6726
|
+
}, tl = (e) => typeof e == "string" && e.trim().length > 0, at = async (e, n, t) => {
|
|
6676
6727
|
const r = await Promise.all(
|
|
6677
6728
|
Object.entries(e).map(async ([o, a]) => {
|
|
6678
|
-
if (
|
|
6679
|
-
const s = await
|
|
6729
|
+
if (tl(a)) {
|
|
6730
|
+
const s = await nl(a, n, t);
|
|
6680
6731
|
return [o, s];
|
|
6681
6732
|
} else if (Array.isArray(a)) {
|
|
6682
6733
|
const s = await Promise.all(
|
|
@@ -6695,40 +6746,40 @@ const qi = (e) => {
|
|
|
6695
6746
|
return Object.fromEntries(r);
|
|
6696
6747
|
};
|
|
6697
6748
|
export {
|
|
6698
|
-
|
|
6749
|
+
Il as BackAndNextButton,
|
|
6699
6750
|
Qe as BusinessRuleCard,
|
|
6700
6751
|
gt as BusinessRuleCardNew,
|
|
6701
6752
|
Ln as BusinessRuleView,
|
|
6702
6753
|
ft as BusinessRuleViewNew,
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6754
|
+
ml as BusinessRules,
|
|
6755
|
+
vl as BusinessRulesNew,
|
|
6756
|
+
bl as BusinessRulesWithGroup,
|
|
6757
|
+
Rl as Checkpicker,
|
|
6758
|
+
Al as DragAndDropBoxes,
|
|
6708
6759
|
tt as DraggableList,
|
|
6709
|
-
|
|
6710
|
-
|
|
6760
|
+
$a as DropdownMenu,
|
|
6761
|
+
kl as DropdownMenuContainer,
|
|
6711
6762
|
se as EValueHowToSetUp,
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6763
|
+
yl as Filter,
|
|
6764
|
+
xl as FilterModal,
|
|
6765
|
+
Tl as FormFilter,
|
|
6715
6766
|
ut as ModalRules,
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6767
|
+
Ca as RulesForm,
|
|
6768
|
+
$l as SendButton,
|
|
6769
|
+
qo as buildEsConditionSentence,
|
|
6770
|
+
ua as convertRangeToString,
|
|
6720
6771
|
ht as filterByGroup,
|
|
6721
|
-
|
|
6722
|
-
|
|
6772
|
+
Fl as flatFromGroups,
|
|
6773
|
+
wl as formatDecisionForBackend,
|
|
6723
6774
|
Pe as getConditionsByGroupNew,
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6775
|
+
Xi as groupsRecordToArrayNew,
|
|
6776
|
+
Ll as mapByGroupNew,
|
|
6777
|
+
Ol as normalizeDecisionToNewShape,
|
|
6778
|
+
Cl as parseRangeFromString,
|
|
6779
|
+
Dl as revertSortedDataSampleSwitchPlaces,
|
|
6780
|
+
Sl as revertSortedDataSwitchPlaces,
|
|
6781
|
+
El as sortDisplayDataSampleSwitchPlaces,
|
|
6782
|
+
Nl as sortDisplayDataSwitchPlaces,
|
|
6732
6783
|
at as translateObject,
|
|
6733
|
-
|
|
6784
|
+
nl as translateText
|
|
6734
6785
|
};
|