@isettingkit/business-rules 2.1.15 → 2.1.16
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 +977 -947
- 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 Pt, MdOutlineInfo as Mt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as jt, MdOutlineArrowCircleRight 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 Pt, MdOutlineInfo as Mt, MdClose as zt, MdOutlineFilterAltOff as it, MdOutlineFilterAlt as lt, MdChevronRight as zn, MdArrowRight as Vt, MdOutlineArrowCircleLeft as jt, MdOutlineArrowCircleRight as Ut, MdOutlineChevronRight as _t, MdOutlineError as Ht } from "react-icons/md";
|
|
3
|
+
import { inube as E, Stack as y, Divider as G, Icon as U, Text as I, 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 _e, 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 H, 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 Pe } from "yup";
|
|
10
|
+
import M, { useState as _, 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
|
+
U,
|
|
57
57
|
{
|
|
58
58
|
cursorHover: !0,
|
|
59
59
|
appearance: "danger",
|
|
@@ -70,14 +70,14 @@ const Qe = (e) => {
|
|
|
70
70
|
from: e.from ?? "",
|
|
71
71
|
to: e.to ?? ""
|
|
72
72
|
}), ir = (e) => e.value, lr = (e) => e.value, sr = (e) => e.value;
|
|
73
|
-
var
|
|
73
|
+
var $ = /* @__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))($ || {});
|
|
74
74
|
const dr = {
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
75
|
+
[$.LIST_OF_VALUES]: rr,
|
|
76
|
+
[$.LIST_OF_VALUES_MULTI]: or,
|
|
77
|
+
[$.RANGE]: ar,
|
|
78
|
+
[$.GREATER_THAN]: ir,
|
|
79
|
+
[$.LESS_THAN]: lr,
|
|
80
|
+
[$.EQUAL]: sr
|
|
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;
|
|
@@ -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
|
+
I,
|
|
145
145
|
{
|
|
146
146
|
type: "label",
|
|
147
147
|
size: "large",
|
|
@@ -152,7 +152,7 @@ const dr = {
|
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
154
|
p.length > 0 && p.map((u) => /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ i(y, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
155
|
-
|
|
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,14 +175,14 @@ 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",
|
|
@@ -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: H.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: H.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: H.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: H.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(I, { 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(I, { 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(I, { 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(U, { appearance: "gray", icon: /* @__PURE__ */ i(We, {}), size: "35px" }),
|
|
444
|
+
/* @__PURE__ */ i(I, { 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
|
+
}, fl = (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(I, { 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
|
+
I,
|
|
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
|
+
wa,
|
|
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(I, { 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
|
|
@@ -753,16 +753,16 @@ const Sr = C.div`
|
|
|
753
753
|
from: e.from ?? "",
|
|
754
754
|
to: e.to ?? ""
|
|
755
755
|
}), Rr = (e) => e.value, Fr = (e) => e.value, Lr = (e) => e.value, Or = {
|
|
756
|
-
[
|
|
757
|
-
[
|
|
758
|
-
[
|
|
759
|
-
[
|
|
760
|
-
[
|
|
761
|
-
[
|
|
756
|
+
[$.LIST_OF_VALUES]: Ar,
|
|
757
|
+
[$.LIST_OF_VALUES_MULTI]: $r,
|
|
758
|
+
[$.RANGE]: Ir,
|
|
759
|
+
[$.GREATER_THAN]: Rr,
|
|
760
|
+
[$.LESS_THAN]: Fr,
|
|
761
|
+
[$.EQUAL]: Lr
|
|
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
|
+
}, _n = C.div`
|
|
766
766
|
& > div {
|
|
767
767
|
border-radius: 8px;
|
|
768
768
|
border: 1px solid
|
|
@@ -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
|
+
I,
|
|
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(_n, { 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(_n, { children: /* @__PURE__ */ m(
|
|
874
874
|
y,
|
|
875
875
|
{
|
|
876
876
|
direction: "column",
|
|
@@ -878,8 +878,8 @@ 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}`))
|
|
@@ -894,8 +894,8 @@ const Sr = C.div`
|
|
|
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: H.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: H.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: H.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: H.DATE
|
|
921
921
|
})
|
|
922
922
|
} : null, d = n ? {
|
|
923
923
|
labelName: n.labelName || "",
|
|
@@ -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
979
|
return /* @__PURE__ */ i(jr, { 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
|
+
U,
|
|
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
|
+
}, _r = (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(I, { 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(I, { 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(U, { appearance: "gray", icon: /* @__PURE__ */ i(We, {}), size: "35px" }),
|
|
1041
|
+
/* @__PURE__ */ i(I, { 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: _r,
|
|
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,22 +1093,22 @@ const _r = (e) => {
|
|
|
1093
1093
|
}),
|
|
1094
1094
|
value: { from: n, to: t }
|
|
1095
1095
|
};
|
|
1096
|
-
}, bn = (e, n) => n ===
|
|
1096
|
+
}, bn = (e, n) => n === H.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
|
} : {
|
|
1100
1100
|
schema: de().required("Requerido"),
|
|
1101
1101
|
value: e
|
|
1102
1102
|
}, Xr = {
|
|
1103
|
-
[
|
|
1104
|
-
[
|
|
1105
|
-
[
|
|
1106
|
-
[
|
|
1107
|
-
[
|
|
1108
|
-
[
|
|
1103
|
+
[$.LIST_OF_VALUES]: Gr,
|
|
1104
|
+
[$.LIST_OF_VALUES_MULTI]: Yr,
|
|
1105
|
+
[$.RANGE]: Wr,
|
|
1106
|
+
[$.GREATER_THAN]: bn,
|
|
1107
|
+
[$.LESS_THAN]: bn,
|
|
1108
|
+
[$.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 || H.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 = Pe().required("La fecha de inicio es requerida"), l.validUntil = Pe().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] = _(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(I, { 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
|
-
}, L =
|
|
1288
|
-
return /* @__PURE__ */ m(
|
|
1281
|
+
} = e, [h, x] = _(s), [b, D] = _(l), [T, S] = _(p), N = ({ target: A }) => {
|
|
1282
|
+
x(A.checked), r && r(A.checked);
|
|
1283
|
+
}, w = (A) => {
|
|
1284
|
+
D(A.target.value), n(A);
|
|
1285
|
+
}, R = (A) => {
|
|
1286
|
+
S(A.target.value), t(A);
|
|
1287
|
+
}, L = 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
|
+
I,
|
|
1292
1292
|
{
|
|
1293
1293
|
appearance: "gray",
|
|
1294
1294
|
margin: "10px 0",
|
|
@@ -1325,7 +1325,7 @@ const Jr = C.div`
|
|
|
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: R,
|
|
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(I, { 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(I, { 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(I, { 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
|
+
}, ml = (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(I, { 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
|
+
I,
|
|
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,
|
|
@@ -1655,12 +1655,12 @@ const Jr = C.div`
|
|
|
1655
1655
|
from: e.from ?? "",
|
|
1656
1656
|
to: e.to ?? ""
|
|
1657
1657
|
}), uo = (e) => e.value, po = (e) => e.value, go = (e) => e.value, ho = {
|
|
1658
|
-
[
|
|
1659
|
-
[
|
|
1660
|
-
[
|
|
1661
|
-
[
|
|
1662
|
-
[
|
|
1663
|
-
[
|
|
1658
|
+
[$.LIST_OF_VALUES]: lo,
|
|
1659
|
+
[$.LIST_OF_VALUES_MULTI]: so,
|
|
1660
|
+
[$.RANGE]: co,
|
|
1661
|
+
[$.GREATER_THAN]: uo,
|
|
1662
|
+
[$.LESS_THAN]: po,
|
|
1663
|
+
[$.EQUAL]: go
|
|
1664
1664
|
}, Be = (e) => {
|
|
1665
1665
|
const n = e == null ? void 0 : e.value;
|
|
1666
1666
|
if (typeof n == "string" && n.includes(" a ")) {
|
|
@@ -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 = M.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
|
+
U,
|
|
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
|
+
U,
|
|
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
|
+
U,
|
|
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
|
+
I,
|
|
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
|
] });
|
|
@@ -1976,7 +1976,7 @@ const yo = (e) => {
|
|
|
1976
1976
|
n.has(o) || (n.add(o), t.push(r));
|
|
1977
1977
|
}
|
|
1978
1978
|
return t;
|
|
1979
|
-
},
|
|
1979
|
+
}, Me = (e) => {
|
|
1980
1980
|
if (!e) return {};
|
|
1981
1981
|
if (Array.isArray(e.conditionGroups)) {
|
|
1982
1982
|
const n = e.conditionGroups.map((t) => [
|
|
@@ -1998,8 +1998,19 @@ 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
|
+
}, Bn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, ft = (e) => {
|
|
2013
|
+
var me, le, j;
|
|
2003
2014
|
const {
|
|
2004
2015
|
cardTitle: n = !0,
|
|
2005
2016
|
decision: t,
|
|
@@ -2015,69 +2026,88 @@ const yo = (e) => {
|
|
|
2015
2026
|
element: {
|
|
2016
2027
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2017
2028
|
value: String(t.effectiveFrom),
|
|
2018
|
-
howToSetTheDecision:
|
|
2019
|
-
decisionDataType:
|
|
2029
|
+
howToSetTheDecision: ne.EQUAL,
|
|
2030
|
+
decisionDataType: H.DATE
|
|
2020
2031
|
},
|
|
2021
2032
|
valueData: Be({
|
|
2022
2033
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
2023
2034
|
value: String(t.effectiveFrom),
|
|
2024
|
-
howToSetTheDecision:
|
|
2025
|
-
decisionDataType:
|
|
2035
|
+
howToSetTheDecision: ne.EQUAL,
|
|
2036
|
+
decisionDataType: H.DATE
|
|
2026
2037
|
})
|
|
2027
2038
|
} : null, h = g ? {
|
|
2028
2039
|
element: {
|
|
2029
2040
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2030
2041
|
value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
|
|
2031
|
-
howToSetTheDecision:
|
|
2032
|
-
decisionDataType:
|
|
2042
|
+
howToSetTheDecision: ne.EQUAL,
|
|
2043
|
+
decisionDataType: H.DATE
|
|
2033
2044
|
},
|
|
2034
2045
|
valueData: Be({
|
|
2035
2046
|
labelName: o == null ? void 0 : o.validUntil,
|
|
2036
2047
|
value: t.validUntil instanceof Date ? t.validUntil.toISOString() : t.validUntil,
|
|
2037
|
-
howToSetTheDecision:
|
|
2038
|
-
decisionDataType:
|
|
2048
|
+
howToSetTheDecision: ne.EQUAL,
|
|
2049
|
+
decisionDataType: H.DATE
|
|
2039
2050
|
})
|
|
2040
2051
|
} : null, x = t ? {
|
|
2041
2052
|
labelName: n && t.labelName || "",
|
|
2042
|
-
decisionDataType: t.decisionDataType ||
|
|
2053
|
+
decisionDataType: t.decisionDataType || H.ALPHABETICAL,
|
|
2043
2054
|
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
|
-
|
|
2055
|
+
howToSetTheDecision: t.howToSetTheDecision || ne.EQUAL
|
|
2056
|
+
} : null, b = M.useMemo(
|
|
2057
|
+
() => t ? Me(t) : {},
|
|
2058
|
+
[t]
|
|
2059
|
+
), 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 = M.useMemo(() => {
|
|
2060
|
+
const k = {}, O = b[T] || [], pe = b["group-primary"] || [];
|
|
2061
|
+
k["group-primary"] = T === "group-primary" ? pe : [...O, ...pe];
|
|
2062
|
+
for (const P of D)
|
|
2063
|
+
!P || P === T || P !== "group-primary" && b[P] && (k[P] = b[P]);
|
|
2064
|
+
for (const P of Object.keys(b))
|
|
2065
|
+
P === "group-primary" || P === T || P in k || (k[P] = b[P]);
|
|
2066
|
+
return k;
|
|
2067
|
+
}, [b, T, D]), N = M.useMemo(() => {
|
|
2068
|
+
const k = [
|
|
2069
|
+
"group-primary",
|
|
2070
|
+
...Object.keys(S).filter((O) => O !== "group-primary")
|
|
2071
|
+
];
|
|
2072
|
+
return Array.from(new Set(k));
|
|
2073
|
+
}, [S]), w = M.useMemo(() => {
|
|
2074
|
+
const k = {};
|
|
2075
|
+
return Object.keys(S).forEach((O) => {
|
|
2076
|
+
const pe = S[O];
|
|
2077
|
+
pe && Array.isArray(pe) ? k[O] = pe.map((P) => P.TimeUnit && P.labelName ? {
|
|
2078
|
+
...P,
|
|
2079
|
+
labelName: xo(
|
|
2080
|
+
P.labelName,
|
|
2081
|
+
P.TimeUnit
|
|
2082
|
+
)
|
|
2083
|
+
} : P) : k[O] = pe;
|
|
2084
|
+
}), k;
|
|
2085
|
+
}, [S]), R = ht(
|
|
2086
|
+
w,
|
|
2087
|
+
(k) => !k.hidden
|
|
2088
|
+
), L = {};
|
|
2089
|
+
let A = 1;
|
|
2090
|
+
const V = N.map((k) => {
|
|
2091
|
+
const O = k === "group-primary" ? "mainCondition" : `alternateCondition-${A++}`;
|
|
2092
|
+
return L[O] = k, {
|
|
2063
2093
|
id: O,
|
|
2064
|
-
label:
|
|
2094
|
+
label: k === "group-primary" ? Bn(k, 0) : Bn(k, Number(O.split("-").at(-1))),
|
|
2065
2095
|
isDisabled: !1
|
|
2066
2096
|
};
|
|
2067
|
-
}), [
|
|
2068
|
-
((
|
|
2069
|
-
),
|
|
2097
|
+
}), [Z, be] = M.useState(
|
|
2098
|
+
((j = V[0]) == null ? void 0 : j.id) ?? "mainCondition"
|
|
2099
|
+
), ve = (k) => be(k), fe = L[Z] ?? "group-primary", ae = R[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
2100
|
return /* @__PURE__ */ i(
|
|
2071
2101
|
yo,
|
|
2072
2102
|
{
|
|
2073
|
-
conditionsAlignment:
|
|
2103
|
+
conditionsAlignment: xe,
|
|
2074
2104
|
controls: u,
|
|
2075
2105
|
decision: t,
|
|
2076
2106
|
decisionMapper: x,
|
|
2077
|
-
loading:
|
|
2078
|
-
skeleton:
|
|
2107
|
+
loading: ue,
|
|
2108
|
+
skeleton: Ne,
|
|
2079
2109
|
textValues: o,
|
|
2080
|
-
tagLabel:
|
|
2110
|
+
tagLabel: Te,
|
|
2081
2111
|
isOpen: s,
|
|
2082
2112
|
onToggle: d,
|
|
2083
2113
|
hasEffectiveFrom: c,
|
|
@@ -2086,14 +2116,14 @@ const yo = (e) => {
|
|
|
2086
2116
|
validUntilRenderer: h,
|
|
2087
2117
|
onEdit: l,
|
|
2088
2118
|
onDelete: p,
|
|
2089
|
-
tabs:
|
|
2090
|
-
selectedTab:
|
|
2091
|
-
onTabChange:
|
|
2092
|
-
currentConditions:
|
|
2093
|
-
hasMultipleGroups:
|
|
2119
|
+
tabs: V,
|
|
2120
|
+
selectedTab: Z,
|
|
2121
|
+
onTabChange: ve,
|
|
2122
|
+
currentConditions: ae,
|
|
2123
|
+
hasMultipleGroups: ye
|
|
2094
2124
|
}
|
|
2095
2125
|
);
|
|
2096
|
-
},
|
|
2126
|
+
}, To = $n`
|
|
2097
2127
|
from {
|
|
2098
2128
|
opacity: 0;
|
|
2099
2129
|
transform: translateY(20px);
|
|
@@ -2127,7 +2157,7 @@ C.div`
|
|
|
2127
2157
|
}};
|
|
2128
2158
|
}
|
|
2129
2159
|
`;
|
|
2130
|
-
const
|
|
2160
|
+
const wo = C.div`
|
|
2131
2161
|
& > div {
|
|
2132
2162
|
box-shadow: 0px 2px 3px 0px
|
|
2133
2163
|
${({ theme: e }) => {
|
|
@@ -2136,18 +2166,18 @@ const To = C.div`
|
|
|
2136
2166
|
}};
|
|
2137
2167
|
cursor: pointer;
|
|
2138
2168
|
}
|
|
2139
|
-
`,
|
|
2169
|
+
`, Co = C.div`
|
|
2140
2170
|
width: 100%;
|
|
2141
2171
|
height: 100%;
|
|
2142
2172
|
& > div {
|
|
2143
|
-
animation: ${
|
|
2173
|
+
animation: ${To} 600ms ease-out;
|
|
2144
2174
|
}
|
|
2145
|
-
`,
|
|
2175
|
+
`, Do = C.div`
|
|
2146
2176
|
& > div > div {
|
|
2147
2177
|
border-radius: 8px;
|
|
2148
2178
|
box-sizing: border-box;
|
|
2149
2179
|
}
|
|
2150
|
-
`,
|
|
2180
|
+
`, So = C.div`
|
|
2151
2181
|
& > div {
|
|
2152
2182
|
width: 100%;
|
|
2153
2183
|
height: 100%;
|
|
@@ -2167,7 +2197,7 @@ const To = C.div`
|
|
|
2167
2197
|
border-radius: 8px;
|
|
2168
2198
|
}
|
|
2169
2199
|
}
|
|
2170
|
-
`,
|
|
2200
|
+
`, Eo = (e) => {
|
|
2171
2201
|
const { index: n, handleOpenModal: t } = e;
|
|
2172
2202
|
return /* @__PURE__ */ i(
|
|
2173
2203
|
gt,
|
|
@@ -2181,7 +2211,7 @@ const To = C.div`
|
|
|
2181
2211
|
},
|
|
2182
2212
|
`loading-card-${n}`
|
|
2183
2213
|
);
|
|
2184
|
-
},
|
|
2214
|
+
}, No = (e) => {
|
|
2185
2215
|
const {
|
|
2186
2216
|
cardTitle: n,
|
|
2187
2217
|
decision: t,
|
|
@@ -2193,7 +2223,7 @@ const To = C.div`
|
|
|
2193
2223
|
isOpen: l,
|
|
2194
2224
|
onToggle: p
|
|
2195
2225
|
} = e;
|
|
2196
|
-
return t ? /* @__PURE__ */ i(
|
|
2226
|
+
return t ? /* @__PURE__ */ i(Ze, { children: /* @__PURE__ */ i(y, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
|
|
2197
2227
|
gt,
|
|
2198
2228
|
{
|
|
2199
2229
|
id: t.decisionId,
|
|
@@ -2215,19 +2245,19 @@ const To = C.div`
|
|
|
2215
2245
|
)
|
|
2216
2246
|
}
|
|
2217
2247
|
) }) }, t.decisionId) : null;
|
|
2218
|
-
},
|
|
2248
|
+
}, ko = (e) => {
|
|
2219
2249
|
const {
|
|
2220
2250
|
customTitleContentAddCard: n,
|
|
2221
2251
|
index: t,
|
|
2222
2252
|
handleOpenModal: r,
|
|
2223
2253
|
shouldRenderEmptyMessage: o
|
|
2224
2254
|
} = e;
|
|
2225
|
-
return /* @__PURE__ */ i(
|
|
2226
|
-
|
|
2255
|
+
return /* @__PURE__ */ i(Co, { children: o ? null : /* @__PURE__ */ i(
|
|
2256
|
+
wo,
|
|
2227
2257
|
{
|
|
2228
2258
|
onClick: () => r ? r() : null,
|
|
2229
2259
|
children: /* @__PURE__ */ i(
|
|
2230
|
-
|
|
2260
|
+
ie,
|
|
2231
2261
|
{
|
|
2232
2262
|
direction: "column",
|
|
2233
2263
|
gap: "4px",
|
|
@@ -2242,9 +2272,9 @@ const To = C.div`
|
|
|
2242
2272
|
alignItems: "center",
|
|
2243
2273
|
padding: "16px",
|
|
2244
2274
|
children: [
|
|
2245
|
-
/* @__PURE__ */ i(
|
|
2275
|
+
/* @__PURE__ */ i(I, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
|
|
2246
2276
|
/* @__PURE__ */ i(
|
|
2247
|
-
|
|
2277
|
+
U,
|
|
2248
2278
|
{
|
|
2249
2279
|
appearance: "gray",
|
|
2250
2280
|
icon: /* @__PURE__ */ i(We, {}),
|
|
@@ -2259,14 +2289,14 @@ const To = C.div`
|
|
|
2259
2289
|
)
|
|
2260
2290
|
}
|
|
2261
2291
|
) }, `add-decision-${t}`);
|
|
2262
|
-
},
|
|
2263
|
-
loading:
|
|
2264
|
-
decision:
|
|
2265
|
-
add:
|
|
2292
|
+
}, Ao = {
|
|
2293
|
+
loading: Eo,
|
|
2294
|
+
decision: No,
|
|
2295
|
+
add: ko
|
|
2266
2296
|
}, Sn = (e) => {
|
|
2267
|
-
const { type: n } = e, t =
|
|
2297
|
+
const { type: n } = e, t = Ao[n];
|
|
2268
2298
|
return t ? t(e) : null;
|
|
2269
|
-
},
|
|
2299
|
+
}, $o = (e) => {
|
|
2270
2300
|
const {
|
|
2271
2301
|
cardTitle: n,
|
|
2272
2302
|
controls: t,
|
|
@@ -2306,13 +2336,13 @@ const To = C.div`
|
|
|
2306
2336
|
})
|
|
2307
2337
|
), g = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !a && t;
|
|
2308
2338
|
return { renderedCards: c, shouldRenderAddCard: g };
|
|
2309
|
-
},
|
|
2339
|
+
}, Io = C.div`
|
|
2310
2340
|
position: relative;
|
|
2311
2341
|
& > div {
|
|
2312
2342
|
padding: 24px 16px;
|
|
2313
2343
|
place-items: unset;
|
|
2314
2344
|
}
|
|
2315
|
-
`,
|
|
2345
|
+
`, Ro = C.div`
|
|
2316
2346
|
background-color: ${({ theme: e }) => {
|
|
2317
2347
|
var n, t;
|
|
2318
2348
|
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 +2374,20 @@ const To = C.div`
|
|
|
2344
2374
|
background-color: #ebecf0;
|
|
2345
2375
|
border-radius: 8px;
|
|
2346
2376
|
}
|
|
2347
|
-
`,
|
|
2377
|
+
`, Fo = (e) => {
|
|
2348
2378
|
const { children: n, description: t, portalId: r, onCloseModal: o, title: a } = e, s = document.getElementById(r);
|
|
2349
2379
|
if (!s)
|
|
2350
2380
|
throw new Error(
|
|
2351
2381
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
2352
2382
|
);
|
|
2353
|
-
const d =
|
|
2383
|
+
const d = re("(max-width: 400px)");
|
|
2354
2384
|
return pn(
|
|
2355
|
-
/* @__PURE__ */ i(
|
|
2385
|
+
/* @__PURE__ */ i(Io, { smallScreen: d, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(Ro, { children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
2356
2386
|
/* @__PURE__ */ m(y, { direction: "column", gap: "24px", children: [
|
|
2357
2387
|
/* @__PURE__ */ m(y, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2358
2388
|
/* @__PURE__ */ m(y, { direction: "column", gap: "8px", children: [
|
|
2359
2389
|
/* @__PURE__ */ i(
|
|
2360
|
-
|
|
2390
|
+
I,
|
|
2361
2391
|
{
|
|
2362
2392
|
type: "title",
|
|
2363
2393
|
size: "medium",
|
|
@@ -2366,25 +2396,25 @@ const To = C.div`
|
|
|
2366
2396
|
children: a
|
|
2367
2397
|
}
|
|
2368
2398
|
),
|
|
2369
|
-
/* @__PURE__ */ i(
|
|
2399
|
+
/* @__PURE__ */ i(I, { size: "medium", appearance: "gray", children: t })
|
|
2370
2400
|
] }),
|
|
2371
2401
|
/* @__PURE__ */ i(dn, { size: "24px", cursor: "pointer", onClick: o })
|
|
2372
2402
|
] }),
|
|
2373
|
-
/* @__PURE__ */ i(
|
|
2403
|
+
/* @__PURE__ */ i(G, { dashed: !0 })
|
|
2374
2404
|
] }),
|
|
2375
2405
|
n
|
|
2376
2406
|
] }) }) }) }),
|
|
2377
2407
|
s
|
|
2378
2408
|
);
|
|
2379
|
-
},
|
|
2409
|
+
}, Lo = (e) => ({
|
|
2380
2410
|
schema: de().required("Requerido").test(
|
|
2381
2411
|
"non-empty",
|
|
2382
2412
|
"El valor no puede estar vacío",
|
|
2383
2413
|
(n) => n != null && n.trim() !== ""
|
|
2384
2414
|
),
|
|
2385
2415
|
value: e
|
|
2386
|
-
}),
|
|
2387
|
-
schema:
|
|
2416
|
+
}), Oo = (e) => ({
|
|
2417
|
+
schema: Ve().test(
|
|
2388
2418
|
"isArrayOrString",
|
|
2389
2419
|
"Por favor selecciona una opcion",
|
|
2390
2420
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -2392,8 +2422,8 @@ const To = C.div`
|
|
|
2392
2422
|
) : typeof n == "string"
|
|
2393
2423
|
),
|
|
2394
2424
|
value: e
|
|
2395
|
-
}),
|
|
2396
|
-
schema:
|
|
2425
|
+
}), Po = (e) => ({
|
|
2426
|
+
schema: Ve().test(
|
|
2397
2427
|
"isArrayOrString",
|
|
2398
2428
|
"Por favor selecciona al menos una opcion",
|
|
2399
2429
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -2401,10 +2431,10 @@ const To = C.div`
|
|
|
2401
2431
|
) : typeof n == "string"
|
|
2402
2432
|
),
|
|
2403
2433
|
value: e
|
|
2404
|
-
}),
|
|
2434
|
+
}), Mo = (e) => {
|
|
2405
2435
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
2406
2436
|
return {
|
|
2407
|
-
schema:
|
|
2437
|
+
schema: te({
|
|
2408
2438
|
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
2439
|
to: ce().min(0, "El rengo hasta debe ser mayor o igual a 0").required("El rango hasta es requerido").test(
|
|
2410
2440
|
"is-greater",
|
|
@@ -2420,43 +2450,43 @@ const To = C.div`
|
|
|
2420
2450
|
}, vn = (e, n) => {
|
|
2421
2451
|
if (typeof e == "object" && e !== null && "from" in e && "to" in e) {
|
|
2422
2452
|
const t = e;
|
|
2423
|
-
return n ===
|
|
2424
|
-
schema:
|
|
2453
|
+
return n === H.PERCENTAGE ? {
|
|
2454
|
+
schema: te({
|
|
2425
2455
|
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
2456
|
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
2457
|
}),
|
|
2428
2458
|
value: t
|
|
2429
2459
|
} : {
|
|
2430
|
-
schema:
|
|
2460
|
+
schema: te({
|
|
2431
2461
|
from: de().required("Requerido"),
|
|
2432
2462
|
to: de().required("Requerido")
|
|
2433
2463
|
}),
|
|
2434
2464
|
value: t
|
|
2435
2465
|
};
|
|
2436
2466
|
}
|
|
2437
|
-
return n ===
|
|
2467
|
+
return n === H.PERCENTAGE ? {
|
|
2438
2468
|
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
2469
|
value: e
|
|
2440
2470
|
} : {
|
|
2441
2471
|
schema: de().required("Requerido"),
|
|
2442
2472
|
value: e
|
|
2443
2473
|
};
|
|
2444
|
-
},
|
|
2445
|
-
[
|
|
2446
|
-
[
|
|
2447
|
-
[
|
|
2448
|
-
[
|
|
2449
|
-
[
|
|
2450
|
-
[
|
|
2451
|
-
}, Gn = (e) =>
|
|
2452
|
-
function
|
|
2474
|
+
}, zo = {
|
|
2475
|
+
[$.LIST_OF_VALUES]: Oo,
|
|
2476
|
+
[$.LIST_OF_VALUES_MULTI]: Po,
|
|
2477
|
+
[$.RANGE]: Mo,
|
|
2478
|
+
[$.GREATER_THAN]: vn,
|
|
2479
|
+
[$.LESS_THAN]: vn,
|
|
2480
|
+
[$.EQUAL]: vn
|
|
2481
|
+
}, Gn = (e) => zo[e] || Lo;
|
|
2482
|
+
function Vo({
|
|
2453
2483
|
decision: e,
|
|
2454
2484
|
onSubmitEvent: n,
|
|
2455
2485
|
textValues: t
|
|
2456
2486
|
}) {
|
|
2457
|
-
const r =
|
|
2487
|
+
const r = Me(e) || {}, o = () => Object.values(r).flat(), a = {
|
|
2458
2488
|
ruleName: e.ruleName || "",
|
|
2459
|
-
decisionDataType: e.decisionDataType ||
|
|
2489
|
+
decisionDataType: e.decisionDataType || H.ALPHABETICAL,
|
|
2460
2490
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
2461
2491
|
value: e.value || "",
|
|
2462
2492
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -2476,7 +2506,7 @@ function zo({
|
|
|
2476
2506
|
s.values.decisionDataType
|
|
2477
2507
|
).schema),
|
|
2478
2508
|
conditionsThatEstablishesTheDecision: Ge((u, { parent: c }) => {
|
|
2479
|
-
if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return
|
|
2509
|
+
if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return te().shape({});
|
|
2480
2510
|
const h = o().reduce(
|
|
2481
2511
|
(x, b) => {
|
|
2482
2512
|
var T;
|
|
@@ -2493,7 +2523,7 @@ function zo({
|
|
|
2493
2523
|
},
|
|
2494
2524
|
{}
|
|
2495
2525
|
);
|
|
2496
|
-
return
|
|
2526
|
+
return te(h).test(
|
|
2497
2527
|
"at-least-one-condition",
|
|
2498
2528
|
"Debe existir al menos una condición para que la decisión se valide correctamente.",
|
|
2499
2529
|
(x) => x ? Object.values(x).some(
|
|
@@ -2502,9 +2532,9 @@ function zo({
|
|
|
2502
2532
|
);
|
|
2503
2533
|
})
|
|
2504
2534
|
};
|
|
2505
|
-
t.terms && (d.effectiveFrom =
|
|
2535
|
+
t.terms && (d.effectiveFrom = Pe().required(
|
|
2506
2536
|
"Se requiere la fecha de vigencia desde"
|
|
2507
|
-
), d.validUntil =
|
|
2537
|
+
), d.validUntil = Pe().when(
|
|
2508
2538
|
"checkClosed",
|
|
2509
2539
|
(u, c, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? c.required("Se requiere la fecha de vigencia hasta").test(
|
|
2510
2540
|
"is-after-startDate",
|
|
@@ -2515,7 +2545,7 @@ function zo({
|
|
|
2515
2545
|
}
|
|
2516
2546
|
) : c.notRequired()
|
|
2517
2547
|
));
|
|
2518
|
-
const l =
|
|
2548
|
+
const l = te(d);
|
|
2519
2549
|
return s = Rn({
|
|
2520
2550
|
initialValues: a,
|
|
2521
2551
|
validationSchema: l,
|
|
@@ -2593,7 +2623,7 @@ C.div`
|
|
|
2593
2623
|
border-radius: 8px;
|
|
2594
2624
|
}
|
|
2595
2625
|
`;
|
|
2596
|
-
const
|
|
2626
|
+
const jo = C.div`
|
|
2597
2627
|
display: flex;
|
|
2598
2628
|
width: -webkit-fill-available;
|
|
2599
2629
|
& > div {
|
|
@@ -2602,7 +2632,7 @@ const Vo = C.div`
|
|
|
2602
2632
|
gap: 16px;
|
|
2603
2633
|
width: -webkit-fill-available;
|
|
2604
2634
|
}
|
|
2605
|
-
`,
|
|
2635
|
+
`, Uo = (e) => {
|
|
2606
2636
|
const {
|
|
2607
2637
|
onHandleStartChange: n,
|
|
2608
2638
|
onHandleEndChange: t,
|
|
@@ -2617,16 +2647,16 @@ const Vo = C.div`
|
|
|
2617
2647
|
messageEnd: c = "",
|
|
2618
2648
|
statusStart: g = "pending",
|
|
2619
2649
|
statusEnd: f = "pending"
|
|
2620
|
-
} = e, [h, x] =
|
|
2621
|
-
x(
|
|
2622
|
-
}, w = (
|
|
2623
|
-
D(
|
|
2624
|
-
},
|
|
2625
|
-
S(
|
|
2626
|
-
}, L =
|
|
2650
|
+
} = e, [h, x] = _(s), [b, D] = _(l), [T, S] = _(p), N = ({ target: A }) => {
|
|
2651
|
+
x(A.checked), r && r(A.checked);
|
|
2652
|
+
}, w = (A) => {
|
|
2653
|
+
D(A.target.value), n(A);
|
|
2654
|
+
}, R = (A) => {
|
|
2655
|
+
S(A.target.value), t(A);
|
|
2656
|
+
}, L = re("(max-width: 400px)");
|
|
2627
2657
|
return /* @__PURE__ */ m(y, { direction: "column", width: "100%", gap: "20px", children: [
|
|
2628
2658
|
/* @__PURE__ */ m(y, { justifyContent: "space-between", children: [
|
|
2629
|
-
/* @__PURE__ */ i(
|
|
2659
|
+
/* @__PURE__ */ i(I, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
2630
2660
|
/* @__PURE__ */ i(
|
|
2631
2661
|
An,
|
|
2632
2662
|
{
|
|
@@ -2645,7 +2675,7 @@ const Vo = C.div`
|
|
|
2645
2675
|
gap: "24px",
|
|
2646
2676
|
children: [
|
|
2647
2677
|
/* @__PURE__ */ i(
|
|
2648
|
-
|
|
2678
|
+
Oe,
|
|
2649
2679
|
{
|
|
2650
2680
|
id: "dateStart",
|
|
2651
2681
|
label: o,
|
|
@@ -2659,11 +2689,11 @@ const Vo = C.div`
|
|
|
2659
2689
|
}
|
|
2660
2690
|
),
|
|
2661
2691
|
h && /* @__PURE__ */ i(
|
|
2662
|
-
|
|
2692
|
+
Oe,
|
|
2663
2693
|
{
|
|
2664
2694
|
id: "dateEnd",
|
|
2665
2695
|
label: a,
|
|
2666
|
-
onChange:
|
|
2696
|
+
onChange: R,
|
|
2667
2697
|
value: T,
|
|
2668
2698
|
required: d,
|
|
2669
2699
|
size: "compact",
|
|
@@ -2697,14 +2727,14 @@ const Vo = C.div`
|
|
|
2697
2727
|
onCloseRedefineConfirm: D,
|
|
2698
2728
|
onConfirmRedefine: T
|
|
2699
2729
|
} = e;
|
|
2700
|
-
return /* @__PURE__ */ m(
|
|
2730
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
2701
2731
|
/* @__PURE__ */ i("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(y, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2702
|
-
/* @__PURE__ */ i(
|
|
2732
|
+
/* @__PURE__ */ i(_e, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ i(y, { justifyContent: "center", width: "-webkit-fill-available", children: Vn({
|
|
2703
2733
|
condition: a,
|
|
2704
2734
|
formik: o,
|
|
2705
2735
|
isDecision: !0
|
|
2706
2736
|
}) }) }),
|
|
2707
|
-
/* @__PURE__ */ i(
|
|
2737
|
+
/* @__PURE__ */ i(_e, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(y, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2708
2738
|
/* @__PURE__ */ i(
|
|
2709
2739
|
st,
|
|
2710
2740
|
{
|
|
@@ -2715,7 +2745,7 @@ const Vo = C.div`
|
|
|
2715
2745
|
),
|
|
2716
2746
|
/* @__PURE__ */ m(y, { justifyContent: "flex-end", alignItems: "center", children: [
|
|
2717
2747
|
/* @__PURE__ */ i(
|
|
2718
|
-
|
|
2748
|
+
U,
|
|
2719
2749
|
{
|
|
2720
2750
|
icon: /* @__PURE__ */ i(Ot, {}),
|
|
2721
2751
|
appearance: "help",
|
|
@@ -2724,7 +2754,7 @@ const Vo = C.div`
|
|
|
2724
2754
|
}
|
|
2725
2755
|
),
|
|
2726
2756
|
/* @__PURE__ */ i(
|
|
2727
|
-
|
|
2757
|
+
B,
|
|
2728
2758
|
{
|
|
2729
2759
|
type: "button",
|
|
2730
2760
|
iconBefore: /* @__PURE__ */ i(Pt, {}),
|
|
@@ -2742,7 +2772,7 @@ const Vo = C.div`
|
|
|
2742
2772
|
gap: "16px",
|
|
2743
2773
|
alignItems: "center",
|
|
2744
2774
|
children: [
|
|
2745
|
-
/* @__PURE__ */ i(
|
|
2775
|
+
/* @__PURE__ */ i(jo, { children: /* @__PURE__ */ i(
|
|
2746
2776
|
Vn,
|
|
2747
2777
|
{
|
|
2748
2778
|
condition: S,
|
|
@@ -2750,7 +2780,7 @@ const Vo = C.div`
|
|
|
2750
2780
|
}
|
|
2751
2781
|
) }),
|
|
2752
2782
|
/* @__PURE__ */ i(
|
|
2753
|
-
|
|
2783
|
+
U,
|
|
2754
2784
|
{
|
|
2755
2785
|
icon: /* @__PURE__ */ i(sn, {}),
|
|
2756
2786
|
appearance: "danger",
|
|
@@ -2762,10 +2792,10 @@ const Vo = C.div`
|
|
|
2762
2792
|
},
|
|
2763
2793
|
S.conditionName
|
|
2764
2794
|
)) }),
|
|
2765
|
-
p && /* @__PURE__ */ i(
|
|
2795
|
+
p && /* @__PURE__ */ i(I, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2766
2796
|
] }) }),
|
|
2767
|
-
/* @__PURE__ */ i(
|
|
2768
|
-
|
|
2797
|
+
/* @__PURE__ */ i(_e, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
|
|
2798
|
+
Uo,
|
|
2769
2799
|
{
|
|
2770
2800
|
labelStart: f.termStart,
|
|
2771
2801
|
labelEnd: f.termEnd,
|
|
@@ -2784,8 +2814,8 @@ const Vo = C.div`
|
|
|
2784
2814
|
}
|
|
2785
2815
|
) }),
|
|
2786
2816
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
2787
|
-
/* @__PURE__ */ i(
|
|
2788
|
-
/* @__PURE__ */ i(
|
|
2817
|
+
/* @__PURE__ */ i(B, { appearance: "gray", onClick: s, variant: "outlined", children: f.cancel }),
|
|
2818
|
+
/* @__PURE__ */ i(B, { type: "submit", children: f.confirm })
|
|
2789
2819
|
] })
|
|
2790
2820
|
] }) }),
|
|
2791
2821
|
x && h && /* @__PURE__ */ i(
|
|
@@ -2795,10 +2825,10 @@ const Vo = C.div`
|
|
|
2795
2825
|
title: "Redefinir la condición",
|
|
2796
2826
|
onCloseModal: D,
|
|
2797
2827
|
children: /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
2798
|
-
/* @__PURE__ */ i(
|
|
2828
|
+
/* @__PURE__ */ i(I, { 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
2829
|
/* @__PURE__ */ m(y, { justifyContent: "end", gap: "12px", children: [
|
|
2800
2830
|
/* @__PURE__ */ i(
|
|
2801
|
-
|
|
2831
|
+
B,
|
|
2802
2832
|
{
|
|
2803
2833
|
type: "button",
|
|
2804
2834
|
appearance: "gray",
|
|
@@ -2808,24 +2838,24 @@ const Vo = C.div`
|
|
|
2808
2838
|
children: "Cancelar"
|
|
2809
2839
|
}
|
|
2810
2840
|
),
|
|
2811
|
-
/* @__PURE__ */ i(
|
|
2841
|
+
/* @__PURE__ */ i(B, { type: "button", onClick: T, cursorHover: !0, children: "Confirmar" })
|
|
2812
2842
|
] })
|
|
2813
2843
|
] })
|
|
2814
2844
|
}
|
|
2815
2845
|
)
|
|
2816
2846
|
] });
|
|
2817
|
-
},
|
|
2818
|
-
const { label: n, howToSet: t, isFirst: r = !1 } = e, o =
|
|
2847
|
+
}, Ho = (e) => {
|
|
2848
|
+
const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Go(n), a = Bo(o), s = r ? "Que" : "Y que", d = a ? o : `${Yo(o)} ${o}`, l = Zo(t);
|
|
2819
2849
|
return `${s} ${d} ${l}`;
|
|
2820
|
-
},
|
|
2821
|
-
function qo(e) {
|
|
2822
|
-
return Ho.test(e);
|
|
2823
|
-
}
|
|
2850
|
+
}, qo = /^(el|la|los|las)\s/i;
|
|
2824
2851
|
function Bo(e) {
|
|
2825
|
-
return
|
|
2852
|
+
return qo.test(e);
|
|
2826
2853
|
}
|
|
2827
2854
|
function Go(e) {
|
|
2828
|
-
|
|
2855
|
+
return e.replace(/\s+/g, " ").trim();
|
|
2856
|
+
}
|
|
2857
|
+
function Yo(e) {
|
|
2858
|
+
const n = Wo(e).toLowerCase(), t = /\b(s|es)\b/.test(Xo(e).toLowerCase()) && !n.endsWith("és");
|
|
2829
2859
|
return ({
|
|
2830
2860
|
mano: "f",
|
|
2831
2861
|
día: "m",
|
|
@@ -2837,30 +2867,30 @@ function Go(e) {
|
|
|
2837
2867
|
antigüedad: "f",
|
|
2838
2868
|
antiguedad: "f",
|
|
2839
2869
|
puntaje: "m"
|
|
2840
|
-
}[n] ??
|
|
2870
|
+
}[n] ?? Qo(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
|
|
2841
2871
|
}
|
|
2842
|
-
function
|
|
2872
|
+
function Wo(e) {
|
|
2843
2873
|
return (e.toLowerCase().split(
|
|
2844
2874
|
/\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
|
|
2845
2875
|
)[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
|
|
2846
2876
|
}
|
|
2847
|
-
function
|
|
2877
|
+
function Xo(e) {
|
|
2848
2878
|
const n = e.trim().split(/\s+/);
|
|
2849
2879
|
return n[n.length - 1] || "";
|
|
2850
2880
|
}
|
|
2851
|
-
function
|
|
2881
|
+
function Qo(e) {
|
|
2852
2882
|
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
2883
|
}
|
|
2854
|
-
function
|
|
2884
|
+
function Zo(e) {
|
|
2855
2885
|
switch (e) {
|
|
2856
|
-
case
|
|
2857
|
-
case
|
|
2858
|
-
case
|
|
2886
|
+
case $.EQUAL:
|
|
2887
|
+
case $.GREATER_THAN:
|
|
2888
|
+
case $.LESS_THAN:
|
|
2859
2889
|
return "sea";
|
|
2860
|
-
case
|
|
2890
|
+
case $.RANGE:
|
|
2861
2891
|
return "esté entre";
|
|
2862
|
-
case
|
|
2863
|
-
case
|
|
2892
|
+
case $.LIST_OF_VALUES:
|
|
2893
|
+
case $.LIST_OF_VALUES_MULTI:
|
|
2864
2894
|
return "esté en";
|
|
2865
2895
|
default:
|
|
2866
2896
|
return "sea";
|
|
@@ -2878,8 +2908,8 @@ const Ko = (e) => {
|
|
|
2878
2908
|
return se.LIST_OF_VALUES;
|
|
2879
2909
|
}
|
|
2880
2910
|
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
|
|
2911
|
+
}, Yn = (e, n) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(n).padStart(2, "0")}`, Jo = (e) => {
|
|
2912
|
+
var P;
|
|
2883
2913
|
const {
|
|
2884
2914
|
decision: n,
|
|
2885
2915
|
onSubmitEvent: t,
|
|
@@ -2888,110 +2918,110 @@ const Ko = (e) => {
|
|
|
2888
2918
|
onRemoveCondition: a,
|
|
2889
2919
|
onRestoreConditions: s,
|
|
2890
2920
|
fullTemplate: d
|
|
2891
|
-
} = e, { formik: l, handleToggleNoneChange: p } =
|
|
2921
|
+
} = e, { formik: l, handleToggleNoneChange: p } = Vo({
|
|
2892
2922
|
decision: n,
|
|
2893
2923
|
onSubmitEvent: t,
|
|
2894
2924
|
textValues: r
|
|
2895
|
-
}), c =
|
|
2925
|
+
}), c = Me(d ?? n), g = Me(n), f = ht(
|
|
2896
2926
|
g,
|
|
2897
|
-
(
|
|
2927
|
+
(F) => !F.hidden
|
|
2898
2928
|
), h = Object.keys(f), x = [
|
|
2899
|
-
...h.filter((
|
|
2900
|
-
...h.filter((
|
|
2929
|
+
...h.filter((F) => F === "group-primary"),
|
|
2930
|
+
...h.filter((F) => F !== "group-primary")
|
|
2901
2931
|
], b = {};
|
|
2902
2932
|
let D = 1;
|
|
2903
|
-
const T = x.map((
|
|
2904
|
-
const
|
|
2905
|
-
return b[
|
|
2906
|
-
id:
|
|
2907
|
-
label:
|
|
2933
|
+
const T = x.map((F) => {
|
|
2934
|
+
const q = F === "group-primary" ? "mainCondition" : `alternateCondition-${D++}`;
|
|
2935
|
+
return b[q] = F, {
|
|
2936
|
+
id: q,
|
|
2937
|
+
label: F === "group-primary" ? Yn(F, 0) : Yn(F, Number(q.split("-").at(-1))),
|
|
2908
2938
|
isDisabled: !1
|
|
2909
2939
|
};
|
|
2910
|
-
}), [S, N] =
|
|
2911
|
-
((
|
|
2912
|
-
), w = (
|
|
2913
|
-
const
|
|
2940
|
+
}), [S, N] = M.useState(
|
|
2941
|
+
((P = T[0]) == null ? void 0 : P.id) ?? "mainCondition"
|
|
2942
|
+
), w = (F) => N(F), R = b[S] ?? "group-primary", L = M.useMemo(() => {
|
|
2943
|
+
const F = [
|
|
2914
2944
|
...Object.keys(f).filter((K) => K === "group-primary"),
|
|
2915
2945
|
...Object.keys(f).filter((K) => K !== "group-primary")
|
|
2916
2946
|
];
|
|
2917
|
-
let
|
|
2918
|
-
const Q =
|
|
2919
|
-
const At = (f[K] ?? []).map((
|
|
2920
|
-
const Mn = !
|
|
2921
|
-
Mn && (
|
|
2922
|
-
const It = Ko(
|
|
2923
|
-
label:
|
|
2947
|
+
let q = !1;
|
|
2948
|
+
const Q = F.map((K) => {
|
|
2949
|
+
const At = (f[K] ?? []).map((Ke, $t) => {
|
|
2950
|
+
const Mn = !q && K === "group-primary" && $t === 0;
|
|
2951
|
+
Mn && (q = !0);
|
|
2952
|
+
const It = Ko(Ke.howToSetTheCondition ?? Ke.valueUse), Rt = Ho({
|
|
2953
|
+
label: Ke.labelName || "",
|
|
2924
2954
|
howToSet: It,
|
|
2925
2955
|
isFirst: Mn
|
|
2926
2956
|
});
|
|
2927
|
-
return { ...
|
|
2957
|
+
return { ...Ke, labelName: Rt };
|
|
2928
2958
|
});
|
|
2929
2959
|
return [K, At];
|
|
2930
2960
|
});
|
|
2931
2961
|
return Object.fromEntries(Q);
|
|
2932
|
-
}, [f]),
|
|
2962
|
+
}, [f]), A = L[R] ?? [], V = L["group-primary"] ?? [], Z = {
|
|
2933
2963
|
decisionDataType: n.decisionDataType,
|
|
2934
2964
|
howToSetTheCondition: n.howToSetTheDecision,
|
|
2935
2965
|
labelName: n.labelName,
|
|
2936
2966
|
listOfPossibleValues: n.listOfPossibleValues,
|
|
2937
2967
|
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
|
|
2942
|
-
const
|
|
2968
|
+
}, 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 = M.useMemo(() => {
|
|
2969
|
+
const F = l.errors.conditionsThatEstablishesTheDecision;
|
|
2970
|
+
if (!F) return;
|
|
2971
|
+
if (typeof F == "string") return F;
|
|
2972
|
+
const q = (Q) => {
|
|
2943
2973
|
if (Q) {
|
|
2944
2974
|
if (typeof Q == "string") return Q;
|
|
2945
2975
|
if (Array.isArray(Q))
|
|
2946
2976
|
for (const K of Q) {
|
|
2947
|
-
const
|
|
2948
|
-
if (
|
|
2977
|
+
const we = q(K);
|
|
2978
|
+
if (we) return we;
|
|
2949
2979
|
}
|
|
2950
2980
|
else if (typeof Q == "object")
|
|
2951
2981
|
for (const K of Object.values(Q)) {
|
|
2952
|
-
const
|
|
2953
|
-
if (
|
|
2982
|
+
const we = q(K);
|
|
2983
|
+
if (we) return we;
|
|
2954
2984
|
}
|
|
2955
2985
|
}
|
|
2956
2986
|
};
|
|
2957
|
-
return
|
|
2958
|
-
}, [l.errors.conditionsThatEstablishesTheDecision]),
|
|
2959
|
-
const Q = Object.values(c).flat().find((
|
|
2987
|
+
return q(F);
|
|
2988
|
+
}, [l.errors.conditionsThatEstablishesTheDecision]), Ne = l.submitCount > 0 && !!ye, ue = (F) => F != null && F.isMulti || F != null && F.multiple || (F == null ? void 0 : F.valueUse) === "Among" ? [] : "", xe = (F) => {
|
|
2989
|
+
const Q = Object.values(c).flat().find((we) => we.conditionName === F), K = ue(Q);
|
|
2960
2990
|
l.setFieldValue(
|
|
2961
|
-
`conditionsThatEstablishesTheDecision.${
|
|
2991
|
+
`conditionsThatEstablishesTheDecision.${F}`,
|
|
2962
2992
|
K
|
|
2963
2993
|
), l.setFieldTouched(
|
|
2964
|
-
`conditionsThatEstablishesTheDecision.${
|
|
2994
|
+
`conditionsThatEstablishesTheDecision.${F}`,
|
|
2965
2995
|
!1,
|
|
2966
2996
|
!1
|
|
2967
2997
|
);
|
|
2968
|
-
},
|
|
2969
|
-
(c[
|
|
2970
|
-
const Q = `conditionsThatEstablishesTheDecision.${
|
|
2971
|
-
l.setFieldValue(Q,
|
|
2998
|
+
}, Te = () => {
|
|
2999
|
+
(c[R] ?? []).forEach((q) => {
|
|
3000
|
+
const Q = `conditionsThatEstablishesTheDecision.${q.conditionName}`;
|
|
3001
|
+
l.setFieldValue(Q, ue(q)), l.setFieldTouched(Q, !1, !1);
|
|
2972
3002
|
});
|
|
2973
|
-
}, [me, le] =
|
|
3003
|
+
}, [me, le] = M.useState(!1);
|
|
2974
3004
|
return /* @__PURE__ */ i(
|
|
2975
3005
|
_o,
|
|
2976
3006
|
{
|
|
2977
3007
|
activeTab: S,
|
|
2978
3008
|
conditionsErrorText: ye,
|
|
2979
|
-
currentConditions:
|
|
3009
|
+
currentConditions: A,
|
|
2980
3010
|
decision: n,
|
|
2981
3011
|
formik: l,
|
|
2982
|
-
normalizedDecision:
|
|
3012
|
+
normalizedDecision: Z,
|
|
2983
3013
|
onCancel: o,
|
|
2984
|
-
onRedefineCurrentTab:
|
|
3014
|
+
onRedefineCurrentTab: Te,
|
|
2985
3015
|
onTabChange: w,
|
|
2986
|
-
onClearCondition: (
|
|
2987
|
-
xe(
|
|
3016
|
+
onClearCondition: (F) => {
|
|
3017
|
+
xe(F), a == null || a(F);
|
|
2988
3018
|
},
|
|
2989
|
-
showConditionsError:
|
|
3019
|
+
showConditionsError: Ne,
|
|
2990
3020
|
tabs: T,
|
|
2991
|
-
termEndStatus:
|
|
2992
|
-
termStartStatus:
|
|
3021
|
+
termEndStatus: ae,
|
|
3022
|
+
termStartStatus: fe,
|
|
2993
3023
|
textValues: r,
|
|
2994
|
-
visibleConditions:
|
|
3024
|
+
visibleConditions: V,
|
|
2995
3025
|
visibleConditionsByGroup: L,
|
|
2996
3026
|
handleToggleNoneChange: p,
|
|
2997
3027
|
portalId: "redefine-confirm-portal",
|
|
@@ -2999,15 +3029,15 @@ const Ko = (e) => {
|
|
|
2999
3029
|
onOpenRedefineConfirm: () => le(!0),
|
|
3000
3030
|
onCloseRedefineConfirm: () => le(!1),
|
|
3001
3031
|
onConfirmRedefine: () => {
|
|
3002
|
-
|
|
3003
|
-
const
|
|
3004
|
-
(
|
|
3032
|
+
Te();
|
|
3033
|
+
const F = (c[R] ?? []).map(
|
|
3034
|
+
(q) => q.conditionName
|
|
3005
3035
|
);
|
|
3006
|
-
s == null || s(
|
|
3036
|
+
s == null || s(F), le(!1);
|
|
3007
3037
|
}
|
|
3008
3038
|
}
|
|
3009
3039
|
);
|
|
3010
|
-
},
|
|
3040
|
+
}, bl = (e) => {
|
|
3011
3041
|
const {
|
|
3012
3042
|
cardTitle: n = !0,
|
|
3013
3043
|
controls: t = !0,
|
|
@@ -3027,7 +3057,7 @@ const Ko = (e) => {
|
|
|
3027
3057
|
onRemoveCondition: b,
|
|
3028
3058
|
onRestoreConditions: D,
|
|
3029
3059
|
baseDecisionTemplate: T
|
|
3030
|
-
} = e, [S, N] =
|
|
3060
|
+
} = e, [S, N] = _(null), w = re("(max-width: 681px)"), { renderedCards: R, shouldRenderAddCard: L } = $o({
|
|
3031
3061
|
cardTitle: n,
|
|
3032
3062
|
controls: t,
|
|
3033
3063
|
customTitleContentAddCard: r,
|
|
@@ -3036,11 +3066,11 @@ const Ko = (e) => {
|
|
|
3036
3066
|
handleOpenModal: c,
|
|
3037
3067
|
handleDelete: h,
|
|
3038
3068
|
textValues: s,
|
|
3039
|
-
isOpenFor: (
|
|
3040
|
-
toggleAt: (
|
|
3041
|
-
}),
|
|
3042
|
-
return /* @__PURE__ */ m(
|
|
3043
|
-
/* @__PURE__ */ i(
|
|
3069
|
+
isOpenFor: (V) => S === V,
|
|
3070
|
+
toggleAt: (V) => N((Z) => Z === V ? null : V)
|
|
3071
|
+
}), A = (a == null ? void 0 : a.length) === 0 && !u;
|
|
3072
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
3073
|
+
/* @__PURE__ */ i(Do, { children: /* @__PURE__ */ i(So, { children: /* @__PURE__ */ i(y, { direction: "column", gap: "16px", padding: "6px", children: A ? /* @__PURE__ */ i(_e, { legend: "Decisiones", children: /* @__PURE__ */ m(
|
|
3044
3074
|
y,
|
|
3045
3075
|
{
|
|
3046
3076
|
direction: "column",
|
|
@@ -3050,7 +3080,7 @@ const Ko = (e) => {
|
|
|
3050
3080
|
alignItems: "center",
|
|
3051
3081
|
children: [
|
|
3052
3082
|
/* @__PURE__ */ i(
|
|
3053
|
-
|
|
3083
|
+
U,
|
|
3054
3084
|
{
|
|
3055
3085
|
appearance: "help",
|
|
3056
3086
|
icon: /* @__PURE__ */ i(Mt, {}),
|
|
@@ -3058,7 +3088,7 @@ const Ko = (e) => {
|
|
|
3058
3088
|
}
|
|
3059
3089
|
),
|
|
3060
3090
|
/* @__PURE__ */ i(
|
|
3061
|
-
|
|
3091
|
+
I,
|
|
3062
3092
|
{
|
|
3063
3093
|
type: "title",
|
|
3064
3094
|
size: "medium",
|
|
@@ -3067,7 +3097,7 @@ const Ko = (e) => {
|
|
|
3067
3097
|
children: "Sin decisiones"
|
|
3068
3098
|
}
|
|
3069
3099
|
),
|
|
3070
|
-
/* @__PURE__ */ i(
|
|
3100
|
+
/* @__PURE__ */ i(I, { as: "span", size: "medium", appearance: "gray", children: o || /* @__PURE__ */ m(z, { children: [
|
|
3071
3101
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
3072
3102
|
r || ' "Agregar decisión"'
|
|
3073
3103
|
] }) })
|
|
@@ -3086,7 +3116,7 @@ const Ko = (e) => {
|
|
|
3086
3116
|
padding: "6px",
|
|
3087
3117
|
height: w ? "auto" : "484px",
|
|
3088
3118
|
children: [
|
|
3089
|
-
|
|
3119
|
+
R,
|
|
3090
3120
|
L && Sn({
|
|
3091
3121
|
type: "add",
|
|
3092
3122
|
index: a == null ? void 0 : a.length,
|
|
@@ -3097,21 +3127,21 @@ const Ko = (e) => {
|
|
|
3097
3127
|
handleOpenModal: c,
|
|
3098
3128
|
handleDelete: h,
|
|
3099
3129
|
textValues: s,
|
|
3100
|
-
shouldRenderEmptyMessage:
|
|
3130
|
+
shouldRenderEmptyMessage: A,
|
|
3101
3131
|
terms: x
|
|
3102
3132
|
})
|
|
3103
3133
|
]
|
|
3104
3134
|
}
|
|
3105
3135
|
) }) }) }),
|
|
3106
3136
|
l && /* @__PURE__ */ i(
|
|
3107
|
-
|
|
3137
|
+
Fo,
|
|
3108
3138
|
{
|
|
3109
3139
|
portalId: "modal-portal",
|
|
3110
3140
|
onCloseModal: g,
|
|
3111
3141
|
title: p ? "Editar Decisión" : "Configurar Decisión",
|
|
3112
3142
|
description: "Diligencia los campos para configurar tu decisión.",
|
|
3113
3143
|
children: /* @__PURE__ */ i(
|
|
3114
|
-
|
|
3144
|
+
Jo,
|
|
3115
3145
|
{
|
|
3116
3146
|
decision: p || d,
|
|
3117
3147
|
fullTemplate: T ?? d,
|
|
@@ -3126,16 +3156,16 @@ const Ko = (e) => {
|
|
|
3126
3156
|
}
|
|
3127
3157
|
)
|
|
3128
3158
|
] });
|
|
3129
|
-
},
|
|
3159
|
+
}, ea = {
|
|
3130
3160
|
border: {
|
|
3131
3161
|
color: E.palette.neutral.N40
|
|
3132
3162
|
}
|
|
3133
|
-
},
|
|
3163
|
+
}, na = C.div`
|
|
3134
3164
|
border-width: 1px;
|
|
3135
3165
|
border-style: solid;
|
|
3136
3166
|
border-color: ${({ theme: e }) => {
|
|
3137
3167
|
var n, t;
|
|
3138
|
-
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) ||
|
|
3168
|
+
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || ea.border.color;
|
|
3139
3169
|
}};
|
|
3140
3170
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
3141
3171
|
margin: ${({ $margin: e }) => e};
|
|
@@ -3144,7 +3174,7 @@ const Ko = (e) => {
|
|
|
3144
3174
|
height: ${({ $height: e }) => e};
|
|
3145
3175
|
box-sizing: border-box;
|
|
3146
3176
|
`;
|
|
3147
|
-
function
|
|
3177
|
+
function ta(e) {
|
|
3148
3178
|
const {
|
|
3149
3179
|
children: n,
|
|
3150
3180
|
padding: t = "16px",
|
|
@@ -3154,7 +3184,7 @@ function na(e) {
|
|
|
3154
3184
|
height: s
|
|
3155
3185
|
} = e;
|
|
3156
3186
|
return /* @__PURE__ */ i(
|
|
3157
|
-
|
|
3187
|
+
na,
|
|
3158
3188
|
{
|
|
3159
3189
|
$padding: t,
|
|
3160
3190
|
$margin: r,
|
|
@@ -3165,9 +3195,9 @@ function na(e) {
|
|
|
3165
3195
|
}
|
|
3166
3196
|
);
|
|
3167
3197
|
}
|
|
3168
|
-
const
|
|
3169
|
-
const [t, r] =
|
|
3170
|
-
return
|
|
3198
|
+
const ra = (e, n) => {
|
|
3199
|
+
const [t, r] = _([]), [o, a] = _([]), [s, d] = _(!1), l = Fe(null);
|
|
3200
|
+
return $e(() => {
|
|
3171
3201
|
if (!e.current || !l.current) return;
|
|
3172
3202
|
const p = e.current, u = l.current, c = () => {
|
|
3173
3203
|
var S;
|
|
@@ -3192,19 +3222,19 @@ C.div`
|
|
|
3192
3222
|
width: 100%;
|
|
3193
3223
|
}
|
|
3194
3224
|
`;
|
|
3195
|
-
const
|
|
3225
|
+
const oa = C.div`
|
|
3196
3226
|
position: absolute;
|
|
3197
3227
|
top: calc(100% + 4px);
|
|
3198
3228
|
right: 0;
|
|
3199
3229
|
z-index: 1000;
|
|
3200
3230
|
width: 170px;
|
|
3201
|
-
`,
|
|
3231
|
+
`, aa = C.div`
|
|
3202
3232
|
position: absolute;
|
|
3203
3233
|
visibility: hidden;
|
|
3204
3234
|
pointer-events: none;
|
|
3205
3235
|
height: 0;
|
|
3206
3236
|
overflow: hidden;
|
|
3207
|
-
`,
|
|
3237
|
+
`, ia = C.div`
|
|
3208
3238
|
cursor: pointer;
|
|
3209
3239
|
`, En = {
|
|
3210
3240
|
border: {
|
|
@@ -3242,7 +3272,7 @@ const ra = C.div`
|
|
|
3242
3272
|
hover: E.palette.neutral.N30
|
|
3243
3273
|
}
|
|
3244
3274
|
}
|
|
3245
|
-
},
|
|
3275
|
+
}, la = C.li`
|
|
3246
3276
|
display: flex;
|
|
3247
3277
|
align-items: center;
|
|
3248
3278
|
align-self: stretch;
|
|
@@ -3260,11 +3290,11 @@ const ra = C.div`
|
|
|
3260
3290
|
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
3291
|
}};
|
|
3262
3292
|
}
|
|
3263
|
-
`,
|
|
3293
|
+
`, sa = (e) => {
|
|
3264
3294
|
var g, f, h, x, b, D;
|
|
3265
|
-
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, s] =
|
|
3295
|
+
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, s] = _(!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
3296
|
return /* @__PURE__ */ i(
|
|
3267
|
-
|
|
3297
|
+
la,
|
|
3268
3298
|
{
|
|
3269
3299
|
id: n,
|
|
3270
3300
|
onMouseEnter: d,
|
|
@@ -3281,7 +3311,7 @@ const ra = C.div`
|
|
|
3281
3311
|
width: "100%",
|
|
3282
3312
|
children: [
|
|
3283
3313
|
r && /* @__PURE__ */ i(
|
|
3284
|
-
|
|
3314
|
+
U,
|
|
3285
3315
|
{
|
|
3286
3316
|
icon: r,
|
|
3287
3317
|
size: "medium",
|
|
@@ -3289,7 +3319,7 @@ const ra = C.div`
|
|
|
3289
3319
|
}
|
|
3290
3320
|
),
|
|
3291
3321
|
/* @__PURE__ */ i(
|
|
3292
|
-
|
|
3322
|
+
I,
|
|
3293
3323
|
{
|
|
3294
3324
|
textAlign: "start",
|
|
3295
3325
|
size: "medium",
|
|
@@ -3298,7 +3328,7 @@ const ra = C.div`
|
|
|
3298
3328
|
}
|
|
3299
3329
|
),
|
|
3300
3330
|
/* @__PURE__ */ i(
|
|
3301
|
-
|
|
3331
|
+
U,
|
|
3302
3332
|
{
|
|
3303
3333
|
icon: /* @__PURE__ */ i(zt, {}),
|
|
3304
3334
|
size: "small",
|
|
@@ -3314,7 +3344,7 @@ const ra = C.div`
|
|
|
3314
3344
|
)
|
|
3315
3345
|
}
|
|
3316
3346
|
);
|
|
3317
|
-
},
|
|
3347
|
+
}, vl = (e) => {
|
|
3318
3348
|
const {
|
|
3319
3349
|
appliedFilters: n = [],
|
|
3320
3350
|
onClear: t,
|
|
@@ -3322,19 +3352,19 @@ const ra = C.div`
|
|
|
3322
3352
|
noFiltersLabel: o,
|
|
3323
3353
|
titleClearFilter: a,
|
|
3324
3354
|
titleFilter: s
|
|
3325
|
-
} = e, d =
|
|
3355
|
+
} = e, d = Fe(null), l = Fe(null), p = Fe(null), {
|
|
3326
3356
|
visible: u,
|
|
3327
3357
|
hidden: c,
|
|
3328
3358
|
showOverflowIndicator: g,
|
|
3329
3359
|
measurementRef: f
|
|
3330
|
-
} =
|
|
3331
|
-
w.stopPropagation(), x((
|
|
3360
|
+
} = ra(d, n), [h, x] = _(!1), b = (w) => {
|
|
3361
|
+
w.stopPropagation(), x((R) => !R);
|
|
3332
3362
|
};
|
|
3333
|
-
|
|
3334
|
-
const w = (
|
|
3335
|
-
var
|
|
3336
|
-
const L =
|
|
3337
|
-
!((
|
|
3363
|
+
$e(() => {
|
|
3364
|
+
const w = (R) => {
|
|
3365
|
+
var V, Z;
|
|
3366
|
+
const L = R.target;
|
|
3367
|
+
!((V = l.current) != null && V.contains(L)) && !((Z = p.current) != null && Z.contains(L)) && x(!1);
|
|
3338
3368
|
};
|
|
3339
3369
|
return h && window.addEventListener("mousedown", w), () => window.removeEventListener("mousedown", w);
|
|
3340
3370
|
}, [h]);
|
|
@@ -3344,12 +3374,12 @@ const ra = C.div`
|
|
|
3344
3374
|
label: w.label,
|
|
3345
3375
|
icon: w.icon
|
|
3346
3376
|
})), N = (w) => {
|
|
3347
|
-
var
|
|
3348
|
-
(L = (
|
|
3377
|
+
var R, L;
|
|
3378
|
+
(L = (R = c.find((A) => A.label === w)) == null ? void 0 : R.onClose) == null || L.call(R), x(!1);
|
|
3349
3379
|
};
|
|
3350
|
-
return /* @__PURE__ */ m(
|
|
3351
|
-
/* @__PURE__ */ i(
|
|
3352
|
-
|
|
3380
|
+
return /* @__PURE__ */ m(ta, { borderRadius: "8px", width: "100%", children: [
|
|
3381
|
+
/* @__PURE__ */ i(aa, { ref: f, children: n.map((w) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
|
|
3382
|
+
ke,
|
|
3353
3383
|
{
|
|
3354
3384
|
appearance: "primary",
|
|
3355
3385
|
displayIcon: !0,
|
|
@@ -3361,7 +3391,7 @@ const ra = C.div`
|
|
|
3361
3391
|
) }, w.label)) }),
|
|
3362
3392
|
/* @__PURE__ */ m(Xe, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
3363
3393
|
/* @__PURE__ */ i(
|
|
3364
|
-
|
|
3394
|
+
ie,
|
|
3365
3395
|
{
|
|
3366
3396
|
ref: d,
|
|
3367
3397
|
background: !0,
|
|
@@ -3372,9 +3402,9 @@ const ra = C.div`
|
|
|
3372
3402
|
alignItems: "center",
|
|
3373
3403
|
padding: "0px 8px",
|
|
3374
3404
|
border: !0,
|
|
3375
|
-
children: D ? /* @__PURE__ */ i(
|
|
3405
|
+
children: D ? /* @__PURE__ */ i(I, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(z, { children: [
|
|
3376
3406
|
u.map((w) => /* @__PURE__ */ i(
|
|
3377
|
-
|
|
3407
|
+
ke,
|
|
3378
3408
|
{
|
|
3379
3409
|
"data-filter-tag": "true",
|
|
3380
3410
|
appearance: "primary",
|
|
@@ -3392,27 +3422,27 @@ const ra = C.div`
|
|
|
3392
3422
|
ref: p,
|
|
3393
3423
|
style: { position: "relative", display: "inline-block" },
|
|
3394
3424
|
children: [
|
|
3395
|
-
/* @__PURE__ */ i(
|
|
3396
|
-
|
|
3425
|
+
/* @__PURE__ */ i(ia, { onClick: b, children: /* @__PURE__ */ i(
|
|
3426
|
+
ke,
|
|
3397
3427
|
{
|
|
3398
3428
|
appearance: "primary",
|
|
3399
3429
|
label: `+${c.length}`
|
|
3400
3430
|
}
|
|
3401
3431
|
) }),
|
|
3402
|
-
T && /* @__PURE__ */ i(
|
|
3432
|
+
T && /* @__PURE__ */ i(oa, { ref: l, children: /* @__PURE__ */ i(
|
|
3403
3433
|
Gt,
|
|
3404
3434
|
{
|
|
3405
3435
|
options: S,
|
|
3406
3436
|
onOptionClick: N,
|
|
3407
3437
|
children: c.map((w) => /* @__PURE__ */ i(
|
|
3408
|
-
|
|
3438
|
+
sa,
|
|
3409
3439
|
{
|
|
3410
3440
|
id: w.label,
|
|
3411
3441
|
label: w.label,
|
|
3412
3442
|
leadingIcon: w.icon,
|
|
3413
3443
|
onClose: () => {
|
|
3414
|
-
var
|
|
3415
|
-
(
|
|
3444
|
+
var R;
|
|
3445
|
+
(R = w.onClose) == null || R.call(w), x(!1);
|
|
3416
3446
|
}
|
|
3417
3447
|
},
|
|
3418
3448
|
w.label
|
|
@@ -3426,7 +3456,7 @@ const ra = C.div`
|
|
|
3426
3456
|
}
|
|
3427
3457
|
),
|
|
3428
3458
|
/* @__PURE__ */ i(
|
|
3429
|
-
|
|
3459
|
+
B,
|
|
3430
3460
|
{
|
|
3431
3461
|
cursorHover: !0,
|
|
3432
3462
|
disabled: D,
|
|
@@ -3437,7 +3467,7 @@ const ra = C.div`
|
|
|
3437
3467
|
}
|
|
3438
3468
|
),
|
|
3439
3469
|
/* @__PURE__ */ i(
|
|
3440
|
-
|
|
3470
|
+
B,
|
|
3441
3471
|
{
|
|
3442
3472
|
cursorHover: !0,
|
|
3443
3473
|
iconBefore: /* @__PURE__ */ i(lt, {}),
|
|
@@ -3448,7 +3478,7 @@ const ra = C.div`
|
|
|
3448
3478
|
)
|
|
3449
3479
|
] })
|
|
3450
3480
|
] });
|
|
3451
|
-
},
|
|
3481
|
+
}, da = C.div`
|
|
3452
3482
|
display: flex;
|
|
3453
3483
|
flex-direction: column;
|
|
3454
3484
|
background-color: ${({ theme: e }) => {
|
|
@@ -3461,7 +3491,7 @@ const ra = C.div`
|
|
|
3461
3491
|
padding: 24px;
|
|
3462
3492
|
gap: 24px;
|
|
3463
3493
|
box-sizing: border-box;
|
|
3464
|
-
`,
|
|
3494
|
+
`, yl = (e) => {
|
|
3465
3495
|
const {
|
|
3466
3496
|
actionButtonLabel: n,
|
|
3467
3497
|
cancelButtonLabel: t,
|
|
@@ -3471,20 +3501,20 @@ const ra = C.div`
|
|
|
3471
3501
|
onCloseModal: s,
|
|
3472
3502
|
portalId: d,
|
|
3473
3503
|
title: l
|
|
3474
|
-
} = e, p =
|
|
3504
|
+
} = e, p = re("(max-width: 768px)"), u = document.getElementById(d);
|
|
3475
3505
|
if (!u)
|
|
3476
3506
|
throw new Error(
|
|
3477
3507
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
3478
3508
|
);
|
|
3479
3509
|
return pn(
|
|
3480
|
-
/* @__PURE__ */ i(cn, { children: /* @__PURE__ */ m(
|
|
3510
|
+
/* @__PURE__ */ i(cn, { children: /* @__PURE__ */ m(da, { $smallScreen: p, children: [
|
|
3481
3511
|
/* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
3482
3512
|
/* @__PURE__ */ m(y, { alignContent: "center", justifyContent: "space-between", children: [
|
|
3483
|
-
/* @__PURE__ */ i(
|
|
3513
|
+
/* @__PURE__ */ i(I, { appearance: "dark", size: "small", type: "headline", children: l }),
|
|
3484
3514
|
/* @__PURE__ */ m(y, { alignItems: "center", children: [
|
|
3485
|
-
/* @__PURE__ */ i(
|
|
3515
|
+
/* @__PURE__ */ i(I, { children: "Cerrar" }),
|
|
3486
3516
|
/* @__PURE__ */ i(
|
|
3487
|
-
|
|
3517
|
+
U,
|
|
3488
3518
|
{
|
|
3489
3519
|
appearance: "dark",
|
|
3490
3520
|
icon: /* @__PURE__ */ i(dn, {}),
|
|
@@ -3494,12 +3524,12 @@ const ra = C.div`
|
|
|
3494
3524
|
)
|
|
3495
3525
|
] })
|
|
3496
3526
|
] }),
|
|
3497
|
-
/* @__PURE__ */ i(
|
|
3527
|
+
/* @__PURE__ */ i(G, {})
|
|
3498
3528
|
] }),
|
|
3499
3529
|
r,
|
|
3500
3530
|
/* @__PURE__ */ m(y, { gap: "20px", justifyContent: "flex-end", children: [
|
|
3501
3531
|
/* @__PURE__ */ i(
|
|
3502
|
-
|
|
3532
|
+
B,
|
|
3503
3533
|
{
|
|
3504
3534
|
appearance: "gray",
|
|
3505
3535
|
onClick: s,
|
|
@@ -3510,7 +3540,7 @@ const ra = C.div`
|
|
|
3510
3540
|
}
|
|
3511
3541
|
),
|
|
3512
3542
|
/* @__PURE__ */ i(
|
|
3513
|
-
|
|
3543
|
+
B,
|
|
3514
3544
|
{
|
|
3515
3545
|
appearance: "primary",
|
|
3516
3546
|
loading: o,
|
|
@@ -3524,14 +3554,14 @@ const ra = C.div`
|
|
|
3524
3554
|
] }) }),
|
|
3525
3555
|
u
|
|
3526
3556
|
);
|
|
3527
|
-
},
|
|
3528
|
-
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a =
|
|
3557
|
+
}, xl = (e) => {
|
|
3558
|
+
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a = re("(max-width: 768px)"), s = !n || n.length === 0;
|
|
3529
3559
|
return /* @__PURE__ */ m(y, { direction: "column", gap: "16px", children: [
|
|
3530
|
-
a && /* @__PURE__ */ m(
|
|
3560
|
+
a && /* @__PURE__ */ m(z, { children: [
|
|
3531
3561
|
/* @__PURE__ */ m(y, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
3532
|
-
/* @__PURE__ */ i(
|
|
3562
|
+
/* @__PURE__ */ i(U, { appearance: "gray", icon: /* @__PURE__ */ i(lt, {}) }),
|
|
3533
3563
|
/* @__PURE__ */ i(
|
|
3534
|
-
|
|
3564
|
+
ie,
|
|
3535
3565
|
{
|
|
3536
3566
|
background: !0,
|
|
3537
3567
|
borderRadius: "8px",
|
|
@@ -3542,8 +3572,8 @@ const ra = C.div`
|
|
|
3542
3572
|
border: !0,
|
|
3543
3573
|
width: "100%",
|
|
3544
3574
|
height: "36px",
|
|
3545
|
-
children: s ? /* @__PURE__ */ i(
|
|
3546
|
-
|
|
3575
|
+
children: s ? /* @__PURE__ */ i(I, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ i(
|
|
3576
|
+
ke,
|
|
3547
3577
|
{
|
|
3548
3578
|
appearance: "primary",
|
|
3549
3579
|
displayIcon: !0,
|
|
@@ -3557,10 +3587,10 @@ const ra = C.div`
|
|
|
3557
3587
|
}
|
|
3558
3588
|
)
|
|
3559
3589
|
] }),
|
|
3560
|
-
/* @__PURE__ */ i(
|
|
3590
|
+
/* @__PURE__ */ i(G, { dashed: !0 })
|
|
3561
3591
|
] }),
|
|
3562
3592
|
t.map((d) => /* @__PURE__ */ m(y, { gap: "6px", alignItems: "center", children: [
|
|
3563
|
-
/* @__PURE__ */ i(y, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(
|
|
3593
|
+
/* @__PURE__ */ i(y, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(U, { appearance: "primary", icon: d.icon }) }),
|
|
3564
3594
|
/* @__PURE__ */ i(
|
|
3565
3595
|
Yt,
|
|
3566
3596
|
{
|
|
@@ -3580,12 +3610,12 @@ const ra = C.div`
|
|
|
3580
3610
|
)
|
|
3581
3611
|
] }, d.name))
|
|
3582
3612
|
] });
|
|
3583
|
-
},
|
|
3613
|
+
}, ca = (e) => {
|
|
3584
3614
|
const n = [];
|
|
3585
3615
|
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
|
-
},
|
|
3616
|
+
}, Tl = (e) => {
|
|
3587
3617
|
var s;
|
|
3588
|
-
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ?
|
|
3618
|
+
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? ca(d) : d, a = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((d, l) => {
|
|
3589
3619
|
var c;
|
|
3590
3620
|
const p = d == null ? void 0 : d.value;
|
|
3591
3621
|
return p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0 ? null : {
|
|
@@ -3601,7 +3631,7 @@ const ra = C.div`
|
|
|
3601
3631
|
value: o(n.value),
|
|
3602
3632
|
conditionsThatEstablishesTheDecision: a
|
|
3603
3633
|
};
|
|
3604
|
-
},
|
|
3634
|
+
}, wl = (e) => {
|
|
3605
3635
|
if (typeof e != "string") return e;
|
|
3606
3636
|
const n = e.split(";").map((r) => r.trim()), t = {};
|
|
3607
3637
|
for (const r of n)
|
|
@@ -3613,7 +3643,7 @@ const ra = C.div`
|
|
|
3613
3643
|
isNaN(o) || (t.to = o);
|
|
3614
3644
|
}
|
|
3615
3645
|
return t.from !== void 0 || t.to !== void 0 ? t : e;
|
|
3616
|
-
},
|
|
3646
|
+
}, Cl = (e) => {
|
|
3617
3647
|
const { dataDecision: n, originalDecision: t } = e, r = {
|
|
3618
3648
|
conditionName: n.ruleName || "",
|
|
3619
3649
|
labelName: n.labelName || "",
|
|
@@ -3629,7 +3659,7 @@ const ra = C.div`
|
|
|
3629
3659
|
(o) => o.hidden ? { ...r } : o
|
|
3630
3660
|
)
|
|
3631
3661
|
};
|
|
3632
|
-
},
|
|
3662
|
+
}, Dl = (e) => {
|
|
3633
3663
|
const { decisions: n } = e;
|
|
3634
3664
|
return n == null ? void 0 : n.map((t) => {
|
|
3635
3665
|
var o;
|
|
@@ -3648,15 +3678,15 @@ const ra = C.div`
|
|
|
3648
3678
|
)
|
|
3649
3679
|
} : t;
|
|
3650
3680
|
});
|
|
3651
|
-
},
|
|
3681
|
+
}, ua = (e) => ({
|
|
3652
3682
|
schema: de().required("Requerido").test(
|
|
3653
3683
|
"non-empty",
|
|
3654
3684
|
"El valor no puede estar vacío",
|
|
3655
3685
|
(n) => n != null && n.trim() !== ""
|
|
3656
3686
|
),
|
|
3657
3687
|
value: e
|
|
3658
|
-
}),
|
|
3659
|
-
schema:
|
|
3688
|
+
}), pa = (e) => ({
|
|
3689
|
+
schema: Ve().test(
|
|
3660
3690
|
"isArrayOrString",
|
|
3661
3691
|
"Debe ser un array de strings/numbers o un solo string",
|
|
3662
3692
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -3664,8 +3694,8 @@ const ra = C.div`
|
|
|
3664
3694
|
) : typeof n == "string"
|
|
3665
3695
|
),
|
|
3666
3696
|
value: e
|
|
3667
|
-
}),
|
|
3668
|
-
schema:
|
|
3697
|
+
}), ga = (e) => ({
|
|
3698
|
+
schema: Ve().test(
|
|
3669
3699
|
"isArrayOrString",
|
|
3670
3700
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
3671
3701
|
(n) => Array.isArray(n) ? n.every(
|
|
@@ -3673,10 +3703,10 @@ const ra = C.div`
|
|
|
3673
3703
|
) : typeof n == "string"
|
|
3674
3704
|
),
|
|
3675
3705
|
value: e
|
|
3676
|
-
}),
|
|
3706
|
+
}), ha = (e) => {
|
|
3677
3707
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
3678
3708
|
return {
|
|
3679
|
-
schema:
|
|
3709
|
+
schema: te({
|
|
3680
3710
|
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
3711
|
to: ce().min(0, "El campo 'Rango hasta' debe ser mayor o igual a 0").required("El campo 'Rango hasta' es requerido").test(
|
|
3682
3712
|
"is-greater",
|
|
@@ -3689,28 +3719,28 @@ const ra = C.div`
|
|
|
3689
3719
|
}),
|
|
3690
3720
|
value: { from: n, to: t }
|
|
3691
3721
|
};
|
|
3692
|
-
}, yn = (e, n) => n ===
|
|
3722
|
+
}, yn = (e, n) => n === H.PERCENTAGE ? {
|
|
3693
3723
|
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
3724
|
value: e
|
|
3695
3725
|
} : {
|
|
3696
3726
|
schema: de().required("Requerido"),
|
|
3697
3727
|
value: e
|
|
3698
|
-
},
|
|
3699
|
-
[
|
|
3700
|
-
[
|
|
3701
|
-
[
|
|
3702
|
-
[
|
|
3703
|
-
[
|
|
3704
|
-
[
|
|
3705
|
-
}, Wn = (e) =>
|
|
3706
|
-
function
|
|
3728
|
+
}, fa = {
|
|
3729
|
+
[$.LIST_OF_VALUES]: pa,
|
|
3730
|
+
[$.LIST_OF_VALUES_MULTI]: ga,
|
|
3731
|
+
[$.RANGE]: ha,
|
|
3732
|
+
[$.GREATER_THAN]: yn,
|
|
3733
|
+
[$.LESS_THAN]: yn,
|
|
3734
|
+
[$.EQUAL]: yn
|
|
3735
|
+
}, Wn = (e) => fa[e] || ua;
|
|
3736
|
+
function ma({
|
|
3707
3737
|
decision: e,
|
|
3708
3738
|
onSubmitEvent: n,
|
|
3709
3739
|
textValues: t
|
|
3710
3740
|
}) {
|
|
3711
3741
|
const r = {
|
|
3712
3742
|
ruleName: e.ruleName || "",
|
|
3713
|
-
decisionDataType: e.decisionDataType ||
|
|
3743
|
+
decisionDataType: e.decisionDataType || H.ALPHABETICAL,
|
|
3714
3744
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
3715
3745
|
value: e.value || "",
|
|
3716
3746
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -3768,7 +3798,7 @@ function fa({
|
|
|
3768
3798
|
// }),
|
|
3769
3799
|
conditionsThatEstablishesTheDecision: Ge((l, { parent: p }) => {
|
|
3770
3800
|
var g;
|
|
3771
|
-
if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return
|
|
3801
|
+
if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return te().shape({});
|
|
3772
3802
|
const c = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
|
|
3773
3803
|
(f, h) => {
|
|
3774
3804
|
if (o.values.conditionsThatEstablishesTheDecision[h.conditionName] !== void 0) {
|
|
@@ -3784,12 +3814,12 @@ function fa({
|
|
|
3784
3814
|
},
|
|
3785
3815
|
{}
|
|
3786
3816
|
)) ?? {};
|
|
3787
|
-
return
|
|
3817
|
+
return te(c);
|
|
3788
3818
|
})
|
|
3789
3819
|
};
|
|
3790
|
-
t.terms && (a.effectiveFrom =
|
|
3820
|
+
t.terms && (a.effectiveFrom = Pe().required(
|
|
3791
3821
|
"La fecha de inicio es requerida"
|
|
3792
|
-
), a.validUntil =
|
|
3822
|
+
), a.validUntil = Pe().when(
|
|
3793
3823
|
"checkClosed",
|
|
3794
3824
|
(l, p, { parent: u }) => (u == null ? void 0 : u.checkClosed) ? p.required("La fecha de finalización es requerida").test(
|
|
3795
3825
|
"is-after-startDate",
|
|
@@ -3800,7 +3830,7 @@ function fa({
|
|
|
3800
3830
|
}
|
|
3801
3831
|
) : p.notRequired()
|
|
3802
3832
|
));
|
|
3803
|
-
const s =
|
|
3833
|
+
const s = te(a);
|
|
3804
3834
|
return o = Rn({
|
|
3805
3835
|
initialValues: r,
|
|
3806
3836
|
validationSchema: s,
|
|
@@ -3834,7 +3864,7 @@ function fa({
|
|
|
3834
3864
|
void 0
|
|
3835
3865
|
);
|
|
3836
3866
|
else {
|
|
3837
|
-
const c = u.howToSetTheCondition ===
|
|
3867
|
+
const c = u.howToSetTheCondition === $.LIST_OF_VALUES_MULTI ? [] : "";
|
|
3838
3868
|
o.setFieldValue(
|
|
3839
3869
|
`conditionsThatEstablishesTheDecision.${u.conditionName}`,
|
|
3840
3870
|
c
|
|
@@ -3843,7 +3873,7 @@ function fa({
|
|
|
3843
3873
|
});
|
|
3844
3874
|
} };
|
|
3845
3875
|
}
|
|
3846
|
-
const
|
|
3876
|
+
const ba = C.div`
|
|
3847
3877
|
& > div {
|
|
3848
3878
|
border-radius: 8px;
|
|
3849
3879
|
border: 1px solid
|
|
@@ -3852,7 +3882,7 @@ const ma = C.div`
|
|
|
3852
3882
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || E.palette.neutral.N30;
|
|
3853
3883
|
}};
|
|
3854
3884
|
}
|
|
3855
|
-
`,
|
|
3885
|
+
`, va = C.div`
|
|
3856
3886
|
width: 100%;
|
|
3857
3887
|
height: 100%;
|
|
3858
3888
|
overflow-y: auto;
|
|
@@ -3869,7 +3899,7 @@ const ma = C.div`
|
|
|
3869
3899
|
background-color: #ebecf0;
|
|
3870
3900
|
border-radius: 8px;
|
|
3871
3901
|
}
|
|
3872
|
-
`,
|
|
3902
|
+
`, ya = (e) => {
|
|
3873
3903
|
const {
|
|
3874
3904
|
checked: n,
|
|
3875
3905
|
children: t,
|
|
@@ -3878,12 +3908,12 @@ const ma = C.div`
|
|
|
3878
3908
|
labelToggle: a,
|
|
3879
3909
|
name: s,
|
|
3880
3910
|
valueToggle: d = ""
|
|
3881
|
-
} = e, [l, p] =
|
|
3911
|
+
} = e, [l, p] = _(n), u = (c) => {
|
|
3882
3912
|
p(c.target.checked), r(c);
|
|
3883
3913
|
};
|
|
3884
|
-
return
|
|
3914
|
+
return $e(() => {
|
|
3885
3915
|
p(n);
|
|
3886
|
-
}, [n]), /* @__PURE__ */ m(
|
|
3916
|
+
}, [n]), /* @__PURE__ */ m(z, { children: [
|
|
3887
3917
|
/* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(
|
|
3888
3918
|
un,
|
|
3889
3919
|
{
|
|
@@ -3893,12 +3923,12 @@ const ma = C.div`
|
|
|
3893
3923
|
onChange: u,
|
|
3894
3924
|
size: "small",
|
|
3895
3925
|
value: d,
|
|
3896
|
-
children: /* @__PURE__ */ i(
|
|
3926
|
+
children: /* @__PURE__ */ i(I, { size: "medium", type: "label", weight: "bold", children: a })
|
|
3897
3927
|
}
|
|
3898
3928
|
) }),
|
|
3899
|
-
l && /* @__PURE__ */ i(
|
|
3929
|
+
l && /* @__PURE__ */ i(z, { children: t })
|
|
3900
3930
|
] });
|
|
3901
|
-
},
|
|
3931
|
+
}, xa = (e) => {
|
|
3902
3932
|
const {
|
|
3903
3933
|
onHandleStartChange: n,
|
|
3904
3934
|
onHandleEndChange: t,
|
|
@@ -3913,17 +3943,17 @@ const ma = C.div`
|
|
|
3913
3943
|
messageEnd: c = "",
|
|
3914
3944
|
statusStart: g = "pending",
|
|
3915
3945
|
statusEnd: f = "pending"
|
|
3916
|
-
} = e, [h, x] =
|
|
3917
|
-
x(
|
|
3918
|
-
}, w = (
|
|
3919
|
-
D(
|
|
3920
|
-
},
|
|
3921
|
-
S(
|
|
3922
|
-
}, L =
|
|
3923
|
-
return /* @__PURE__ */ m(
|
|
3946
|
+
} = e, [h, x] = _(s), [b, D] = _(l), [T, S] = _(p), N = ({ target: A }) => {
|
|
3947
|
+
x(A.checked), r && r(A.checked);
|
|
3948
|
+
}, w = (A) => {
|
|
3949
|
+
D(A.target.value), n(A);
|
|
3950
|
+
}, R = (A) => {
|
|
3951
|
+
S(A.target.value), t(A);
|
|
3952
|
+
}, L = re("(max-width: 400px)");
|
|
3953
|
+
return /* @__PURE__ */ m(z, { children: [
|
|
3924
3954
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
3925
3955
|
/* @__PURE__ */ i(
|
|
3926
|
-
|
|
3956
|
+
I,
|
|
3927
3957
|
{
|
|
3928
3958
|
appearance: "gray",
|
|
3929
3959
|
margin: "10px 0",
|
|
@@ -3960,7 +3990,7 @@ const ma = C.div`
|
|
|
3960
3990
|
gap: "24px",
|
|
3961
3991
|
children: [
|
|
3962
3992
|
/* @__PURE__ */ i(
|
|
3963
|
-
|
|
3993
|
+
Oe,
|
|
3964
3994
|
{
|
|
3965
3995
|
id: "dateStart",
|
|
3966
3996
|
label: o,
|
|
@@ -3973,11 +4003,11 @@ const ma = C.div`
|
|
|
3973
4003
|
}
|
|
3974
4004
|
),
|
|
3975
4005
|
h && /* @__PURE__ */ i(
|
|
3976
|
-
|
|
4006
|
+
Oe,
|
|
3977
4007
|
{
|
|
3978
4008
|
id: "dateEnd",
|
|
3979
4009
|
label: a,
|
|
3980
|
-
onChange:
|
|
4010
|
+
onChange: R,
|
|
3981
4011
|
value: T,
|
|
3982
4012
|
required: d,
|
|
3983
4013
|
size: "compact",
|
|
@@ -3989,7 +4019,7 @@ const ma = C.div`
|
|
|
3989
4019
|
}
|
|
3990
4020
|
)
|
|
3991
4021
|
] });
|
|
3992
|
-
},
|
|
4022
|
+
}, Ta = (e) => {
|
|
3993
4023
|
const {
|
|
3994
4024
|
formik: n,
|
|
3995
4025
|
textValues: t,
|
|
@@ -4008,8 +4038,8 @@ const ma = C.div`
|
|
|
4008
4038
|
formik: n,
|
|
4009
4039
|
isDecision: !0
|
|
4010
4040
|
}),
|
|
4011
|
-
/* @__PURE__ */ i(
|
|
4012
|
-
/* @__PURE__ */ i(
|
|
4041
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
4042
|
+
/* @__PURE__ */ i(ba, { children: /* @__PURE__ */ i(va, { children: /* @__PURE__ */ m(
|
|
4013
4043
|
y,
|
|
4014
4044
|
{
|
|
4015
4045
|
direction: "column",
|
|
@@ -4024,7 +4054,7 @@ const ma = C.div`
|
|
|
4024
4054
|
alignItems: "center",
|
|
4025
4055
|
gap: "64px",
|
|
4026
4056
|
children: [
|
|
4027
|
-
/* @__PURE__ */ i(
|
|
4057
|
+
/* @__PURE__ */ i(I, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
4028
4058
|
/* @__PURE__ */ i(
|
|
4029
4059
|
un,
|
|
4030
4060
|
{
|
|
@@ -4032,14 +4062,14 @@ const ma = C.div`
|
|
|
4032
4062
|
onChange: () => s(!n.values.toggleNone),
|
|
4033
4063
|
checked: n.values.toggleNone,
|
|
4034
4064
|
size: "small",
|
|
4035
|
-
children: /* @__PURE__ */ i(
|
|
4065
|
+
children: /* @__PURE__ */ i(I, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
4036
4066
|
}
|
|
4037
4067
|
)
|
|
4038
4068
|
]
|
|
4039
4069
|
}
|
|
4040
4070
|
),
|
|
4041
4071
|
/* @__PURE__ */ i(y, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => /* @__PURE__ */ i(
|
|
4042
|
-
|
|
4072
|
+
ya,
|
|
4043
4073
|
{
|
|
4044
4074
|
id: `toggle-${c.conditionName}`,
|
|
4045
4075
|
name: `toggle.${c.conditionName}`,
|
|
@@ -4047,7 +4077,7 @@ const ma = C.div`
|
|
|
4047
4077
|
checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[c.conditionName] !== void 0,
|
|
4048
4078
|
handleToggleChange: (g) => d(
|
|
4049
4079
|
c.conditionName,
|
|
4050
|
-
c.howToSetTheCondition ===
|
|
4080
|
+
c.howToSetTheCondition === $.LIST_OF_VALUES_MULTI
|
|
4051
4081
|
)(g.target.checked),
|
|
4052
4082
|
children: on({ condition: c, formik: n })
|
|
4053
4083
|
},
|
|
@@ -4056,10 +4086,10 @@ const ma = C.div`
|
|
|
4056
4086
|
]
|
|
4057
4087
|
}
|
|
4058
4088
|
) }) }),
|
|
4059
|
-
t.terms && /* @__PURE__ */ m(
|
|
4060
|
-
/* @__PURE__ */ i(
|
|
4089
|
+
t.terms && /* @__PURE__ */ m(z, { children: [
|
|
4090
|
+
/* @__PURE__ */ i(G, { dashed: !0 }),
|
|
4061
4091
|
/* @__PURE__ */ i(
|
|
4062
|
-
|
|
4092
|
+
xa,
|
|
4063
4093
|
{
|
|
4064
4094
|
labelStart: t.termStart,
|
|
4065
4095
|
labelEnd: t.termEnd,
|
|
@@ -4078,16 +4108,16 @@ const ma = C.div`
|
|
|
4078
4108
|
}
|
|
4079
4109
|
)
|
|
4080
4110
|
] }),
|
|
4081
|
-
/* @__PURE__ */ i(
|
|
4082
|
-
l && /* @__PURE__ */ i(
|
|
4111
|
+
/* @__PURE__ */ i(G, {}),
|
|
4112
|
+
l && /* @__PURE__ */ i(I, { 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
4113
|
/* @__PURE__ */ m(y, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
4084
|
-
/* @__PURE__ */ i(
|
|
4085
|
-
/* @__PURE__ */ i(
|
|
4114
|
+
/* @__PURE__ */ i(B, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
4115
|
+
/* @__PURE__ */ i(B, { type: "submit", children: t.confirm })
|
|
4086
4116
|
] })
|
|
4087
4117
|
] }) });
|
|
4088
|
-
},
|
|
4118
|
+
}, wa = (e) => {
|
|
4089
4119
|
var f;
|
|
4090
|
-
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } =
|
|
4120
|
+
const { decision: n, onSubmitEvent: t, textValues: r, onCancel: o } = e, { formik: a, handleToggleNoneChange: s } = ma({
|
|
4091
4121
|
decision: n,
|
|
4092
4122
|
onSubmitEvent: t,
|
|
4093
4123
|
textValues: r
|
|
@@ -4101,7 +4131,7 @@ const ma = C.div`
|
|
|
4101
4131
|
(h) => !h.hidden
|
|
4102
4132
|
)) || [], 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
4133
|
return /* @__PURE__ */ i(
|
|
4104
|
-
|
|
4134
|
+
Ta,
|
|
4105
4135
|
{
|
|
4106
4136
|
formik: a,
|
|
4107
4137
|
onCancel: o,
|
|
@@ -4133,7 +4163,7 @@ const ma = C.div`
|
|
|
4133
4163
|
termEndStatus: c
|
|
4134
4164
|
}
|
|
4135
4165
|
);
|
|
4136
|
-
},
|
|
4166
|
+
}, Sl = (e) => {
|
|
4137
4167
|
var o;
|
|
4138
4168
|
const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
|
|
4139
4169
|
(a) => a.switchPlaces
|
|
@@ -4149,7 +4179,7 @@ const ma = C.div`
|
|
|
4149
4179
|
(a) => a.conditionName === r.conditionName ? { ...a, hidden: !0 } : a
|
|
4150
4180
|
)
|
|
4151
4181
|
} : t;
|
|
4152
|
-
},
|
|
4182
|
+
}, El = (e) => {
|
|
4153
4183
|
const { decisions: n } = e;
|
|
4154
4184
|
return n == null ? void 0 : n.map((t) => {
|
|
4155
4185
|
var o;
|
|
@@ -4168,7 +4198,7 @@ const ma = C.div`
|
|
|
4168
4198
|
)
|
|
4169
4199
|
} : t;
|
|
4170
4200
|
});
|
|
4171
|
-
},
|
|
4201
|
+
}, Ce = {
|
|
4172
4202
|
item: {
|
|
4173
4203
|
background: {
|
|
4174
4204
|
active: E.palette.blue.B50,
|
|
@@ -4185,12 +4215,12 @@ const ma = C.div`
|
|
|
4185
4215
|
color: E.palette.neutral.N0
|
|
4186
4216
|
}
|
|
4187
4217
|
}
|
|
4188
|
-
},
|
|
4218
|
+
}, Ca = C.div`
|
|
4189
4219
|
& > div {
|
|
4190
4220
|
border: 1px solid
|
|
4191
4221
|
${({ theme: e, $active: n }) => {
|
|
4192
4222
|
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) ||
|
|
4223
|
+
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
4224
|
}};
|
|
4195
4225
|
}
|
|
4196
4226
|
&:hover {
|
|
@@ -4198,7 +4228,7 @@ const ma = C.div`
|
|
|
4198
4228
|
background-color: ${({ theme: e, $disabled: n }) => {
|
|
4199
4229
|
var t, r, o;
|
|
4200
4230
|
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) ||
|
|
4231
|
+
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
4232
|
}};
|
|
4203
4233
|
}
|
|
4204
4234
|
`, Xn = C.div`
|
|
@@ -4208,25 +4238,25 @@ const ma = C.div`
|
|
|
4208
4238
|
width: 100%;
|
|
4209
4239
|
outline: none;
|
|
4210
4240
|
cursor: pointer;
|
|
4211
|
-
`,
|
|
4241
|
+
`, Da = C.div`
|
|
4212
4242
|
display: flex;
|
|
4213
4243
|
align-items: center;
|
|
4214
4244
|
outline: none;
|
|
4215
4245
|
cursor: pointer;
|
|
4216
|
-
`,
|
|
4246
|
+
`, Sa = C(ct)`
|
|
4217
4247
|
display: flex;
|
|
4218
4248
|
align-items: center;
|
|
4219
4249
|
text-decoration: none;
|
|
4220
|
-
`,
|
|
4250
|
+
`, Ea = C(ct)`
|
|
4221
4251
|
display: block;
|
|
4222
4252
|
text-decoration: none;
|
|
4223
4253
|
color: inherit;
|
|
4224
|
-
`,
|
|
4254
|
+
`, Na = C.div`
|
|
4225
4255
|
& > div {
|
|
4226
4256
|
border-bottom: 1px solid
|
|
4227
4257
|
${({ theme: e, $active: n }) => {
|
|
4228
4258
|
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) ||
|
|
4259
|
+
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
4260
|
}};
|
|
4231
4261
|
border-radius: 8px 8px 0 0;
|
|
4232
4262
|
}
|
|
@@ -4235,7 +4265,7 @@ const ma = C.div`
|
|
|
4235
4265
|
text-decoration: none;
|
|
4236
4266
|
background-color: ${({ theme: e, $active: n }) => {
|
|
4237
4267
|
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) ||
|
|
4268
|
+
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
4269
|
}};
|
|
4240
4270
|
&:last-child {
|
|
4241
4271
|
border-radius: 0 0 8px 8px;
|
|
@@ -4245,35 +4275,35 @@ const ma = C.div`
|
|
|
4245
4275
|
background-color: ${({ $active: e, theme: n, $disabled: t }) => {
|
|
4246
4276
|
var r, o, a;
|
|
4247
4277
|
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) ||
|
|
4278
|
+
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
4279
|
}};
|
|
4250
4280
|
}
|
|
4251
|
-
`,
|
|
4281
|
+
`, ka = C.div`
|
|
4252
4282
|
display: flex;
|
|
4253
4283
|
flex-direction: column;
|
|
4254
4284
|
|
|
4255
4285
|
& > a:last-child ${mt} {
|
|
4256
4286
|
border-radius: 0 0 8px 8px;
|
|
4257
4287
|
}
|
|
4258
|
-
`,
|
|
4288
|
+
`, Aa = (e) => {
|
|
4259
4289
|
const { isOpen: n, links: t, onClick: r, title: o, activeId: a, headerPath: s, headerActive: d } = e, l = (h) => {
|
|
4260
4290
|
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), r());
|
|
4261
4291
|
}, p = (h) => {
|
|
4262
4292
|
h.preventDefault(), h.stopPropagation(), r();
|
|
4263
4293
|
}, u = (h) => {
|
|
4264
4294
|
(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(
|
|
4295
|
+
}, c = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f = M.useId();
|
|
4296
|
+
return /* @__PURE__ */ i(Ca, { $active: n, children: /* @__PURE__ */ m(ie, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
4267
4297
|
/* @__PURE__ */ i(
|
|
4268
|
-
|
|
4298
|
+
Na,
|
|
4269
4299
|
{
|
|
4270
4300
|
$active: n && t.length > 0,
|
|
4271
4301
|
"aria-controls": f,
|
|
4272
4302
|
"aria-expanded": n,
|
|
4273
4303
|
onClick: p,
|
|
4274
4304
|
onKeyDown: u,
|
|
4275
|
-
children: s ? /* @__PURE__ */ i(
|
|
4276
|
-
|
|
4305
|
+
children: s ? /* @__PURE__ */ i(Sa, { to: s, children: /* @__PURE__ */ m(
|
|
4306
|
+
ie,
|
|
4277
4307
|
{
|
|
4278
4308
|
alignItems: "center",
|
|
4279
4309
|
borderRadius: "8px",
|
|
@@ -4282,7 +4312,7 @@ const ma = C.div`
|
|
|
4282
4312
|
padding: "12px 8px",
|
|
4283
4313
|
children: [
|
|
4284
4314
|
/* @__PURE__ */ i(
|
|
4285
|
-
|
|
4315
|
+
U,
|
|
4286
4316
|
{
|
|
4287
4317
|
appearance: c,
|
|
4288
4318
|
cursorHover: !0,
|
|
@@ -4290,7 +4320,7 @@ const ma = C.div`
|
|
|
4290
4320
|
}
|
|
4291
4321
|
),
|
|
4292
4322
|
/* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(
|
|
4293
|
-
|
|
4323
|
+
I,
|
|
4294
4324
|
{
|
|
4295
4325
|
appearance: c,
|
|
4296
4326
|
cursorHover: !0,
|
|
@@ -4303,7 +4333,7 @@ const ma = C.div`
|
|
|
4303
4333
|
]
|
|
4304
4334
|
}
|
|
4305
4335
|
) }) : /* @__PURE__ */ m(
|
|
4306
|
-
|
|
4336
|
+
ie,
|
|
4307
4337
|
{
|
|
4308
4338
|
alignItems: "center",
|
|
4309
4339
|
borderRadius: "8px",
|
|
@@ -4312,7 +4342,7 @@ const ma = C.div`
|
|
|
4312
4342
|
padding: "12px 8px",
|
|
4313
4343
|
children: [
|
|
4314
4344
|
/* @__PURE__ */ i(
|
|
4315
|
-
|
|
4345
|
+
U,
|
|
4316
4346
|
{
|
|
4317
4347
|
appearance: c,
|
|
4318
4348
|
cursorHover: !0,
|
|
@@ -4320,14 +4350,14 @@ const ma = C.div`
|
|
|
4320
4350
|
}
|
|
4321
4351
|
),
|
|
4322
4352
|
/* @__PURE__ */ i(Xn, { children: /* @__PURE__ */ i(
|
|
4323
|
-
|
|
4353
|
+
Da,
|
|
4324
4354
|
{
|
|
4325
4355
|
"aria-controls": f,
|
|
4326
4356
|
"aria-expanded": n,
|
|
4327
4357
|
onClick: r,
|
|
4328
4358
|
onKeyDown: l,
|
|
4329
4359
|
children: /* @__PURE__ */ i(
|
|
4330
|
-
|
|
4360
|
+
I,
|
|
4331
4361
|
{
|
|
4332
4362
|
appearance: c,
|
|
4333
4363
|
cursorHover: !0,
|
|
@@ -4345,9 +4375,9 @@ const ma = C.div`
|
|
|
4345
4375
|
)
|
|
4346
4376
|
}
|
|
4347
4377
|
),
|
|
4348
|
-
n && t.length > 0 && /* @__PURE__ */ i(
|
|
4378
|
+
n && t.length > 0 && /* @__PURE__ */ i(ka, { id: f, children: t.map((h) => {
|
|
4349
4379
|
const x = h.id === a;
|
|
4350
|
-
return /* @__PURE__ */ i(
|
|
4380
|
+
return /* @__PURE__ */ i(Ea, { to: h.path, children: /* @__PURE__ */ i(mt, { $active: x, children: /* @__PURE__ */ m(
|
|
4351
4381
|
y,
|
|
4352
4382
|
{
|
|
4353
4383
|
alignItems: "center",
|
|
@@ -4355,9 +4385,9 @@ const ma = C.div`
|
|
|
4355
4385
|
gap: "8px",
|
|
4356
4386
|
padding: x ? "8px 4px" : "8px 32px",
|
|
4357
4387
|
children: [
|
|
4358
|
-
x && /* @__PURE__ */ i(
|
|
4388
|
+
x && /* @__PURE__ */ i(U, { appearance: "primary", icon: /* @__PURE__ */ i(Vt, {}) }),
|
|
4359
4389
|
/* @__PURE__ */ i(
|
|
4360
|
-
|
|
4390
|
+
I,
|
|
4361
4391
|
{
|
|
4362
4392
|
appearance: x ? "primary" : "dark",
|
|
4363
4393
|
size: "small",
|
|
@@ -4371,7 +4401,7 @@ const ma = C.div`
|
|
|
4371
4401
|
) }) }, h.id);
|
|
4372
4402
|
}) })
|
|
4373
4403
|
] }) });
|
|
4374
|
-
},
|
|
4404
|
+
}, $a = C.div`
|
|
4375
4405
|
& > div {
|
|
4376
4406
|
background: ${({ $background: e, theme: n }) => {
|
|
4377
4407
|
var t, r, o, a;
|
|
@@ -4379,36 +4409,36 @@ const ma = C.div`
|
|
|
4379
4409
|
}};
|
|
4380
4410
|
}
|
|
4381
4411
|
height: 90vh;
|
|
4382
|
-
`,
|
|
4412
|
+
`, Ia = (e, n) => {
|
|
4383
4413
|
var t;
|
|
4384
4414
|
for (const r of n)
|
|
4385
4415
|
if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
|
|
4386
4416
|
return null;
|
|
4387
|
-
},
|
|
4388
|
-
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o =
|
|
4417
|
+
}, Nl = (e) => {
|
|
4418
|
+
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Kt(), [a, s] = M.useState(t), d = M.useRef(o.pathname), l = M.useCallback(
|
|
4389
4419
|
(u) => {
|
|
4390
4420
|
var c;
|
|
4391
4421
|
return (c = u.find((g) => g.path === o.pathname)) == null ? void 0 : c.id;
|
|
4392
4422
|
},
|
|
4393
4423
|
[o.pathname]
|
|
4394
|
-
), p =
|
|
4424
|
+
), p = M.useCallback(
|
|
4395
4425
|
(u) => !!u && (o.pathname === u || o.pathname.startsWith(u + "/")),
|
|
4396
4426
|
[o.pathname]
|
|
4397
4427
|
);
|
|
4398
|
-
return
|
|
4428
|
+
return M.useEffect(() => {
|
|
4399
4429
|
if (!(d.current !== o.pathname)) return;
|
|
4400
4430
|
if (d.current = o.pathname, n) {
|
|
4401
4431
|
s(null);
|
|
4402
4432
|
return;
|
|
4403
4433
|
}
|
|
4404
|
-
const c =
|
|
4434
|
+
const c = Ia(o.pathname, r);
|
|
4405
4435
|
if (c) {
|
|
4406
4436
|
s(c);
|
|
4407
4437
|
return;
|
|
4408
4438
|
}
|
|
4409
4439
|
t && s(t);
|
|
4410
|
-
}, [n, t, r, o.pathname]), /* @__PURE__ */ i(
|
|
4411
|
-
|
|
4440
|
+
}, [n, t, r, o.pathname]), /* @__PURE__ */ i($a, { $background: !0, children: /* @__PURE__ */ i(y, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((u) => /* @__PURE__ */ i(
|
|
4441
|
+
Aa,
|
|
4412
4442
|
{
|
|
4413
4443
|
activeId: l(u.links),
|
|
4414
4444
|
headerPath: u.path,
|
|
@@ -4424,7 +4454,7 @@ const ma = C.div`
|
|
|
4424
4454
|
function W(e) {
|
|
4425
4455
|
e.preventDefault();
|
|
4426
4456
|
}
|
|
4427
|
-
function
|
|
4457
|
+
function Ee(e) {
|
|
4428
4458
|
e.stopPropagation();
|
|
4429
4459
|
}
|
|
4430
4460
|
function bt() {
|
|
@@ -4439,7 +4469,7 @@ function bt() {
|
|
|
4439
4469
|
}];
|
|
4440
4470
|
}
|
|
4441
4471
|
var [vt, yt] = bt();
|
|
4442
|
-
function
|
|
4472
|
+
function Ra(e, n) {
|
|
4443
4473
|
return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
|
|
4444
4474
|
}
|
|
4445
4475
|
function Ye(e, n, t = !0, r = ["__key"]) {
|
|
@@ -4449,7 +4479,7 @@ function Ye(e, n, t = !0, r = ["__key"]) {
|
|
|
4449
4479
|
if (e instanceof Date && n instanceof Date)
|
|
4450
4480
|
return e.getTime() === n.getTime();
|
|
4451
4481
|
if (e instanceof RegExp && n instanceof RegExp)
|
|
4452
|
-
return
|
|
4482
|
+
return Ra(e, n);
|
|
4453
4483
|
if (e === null || n === null) return !1;
|
|
4454
4484
|
const o = e, a = n;
|
|
4455
4485
|
if (Object.keys(o).length !== Object.keys(a).length) return !1;
|
|
@@ -4464,11 +4494,11 @@ function Ye(e, n, t = !0, r = ["__key"]) {
|
|
|
4464
4494
|
function xt(e) {
|
|
4465
4495
|
return e.split(" ").filter((n) => n);
|
|
4466
4496
|
}
|
|
4467
|
-
function
|
|
4497
|
+
function je(e) {
|
|
4468
4498
|
return { x: e.clientX, y: e.clientY };
|
|
4469
4499
|
}
|
|
4470
4500
|
Array();
|
|
4471
|
-
var Pn = typeof window < "u",
|
|
4501
|
+
var Pn = typeof window < "u", Y = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap();
|
|
4472
4502
|
function Tt() {
|
|
4473
4503
|
if (!Pn) return !1;
|
|
4474
4504
|
if ("userAgentData" in navigator)
|
|
@@ -4476,7 +4506,7 @@ function Tt() {
|
|
|
4476
4506
|
const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
4477
4507
|
return n || t;
|
|
4478
4508
|
}
|
|
4479
|
-
var
|
|
4509
|
+
var Fa = {
|
|
4480
4510
|
affectedNodes: [],
|
|
4481
4511
|
coordinates: {
|
|
4482
4512
|
x: 0,
|
|
@@ -4510,8 +4540,8 @@ var Ra = {
|
|
|
4510
4540
|
scrollDebounceTimeout: void 0,
|
|
4511
4541
|
frameIdX: void 0,
|
|
4512
4542
|
frameIdY: void 0
|
|
4513
|
-
}, v =
|
|
4514
|
-
function
|
|
4543
|
+
}, v = Fa, Se = !1, Qn, xn;
|
|
4544
|
+
function La() {
|
|
4515
4545
|
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
4546
|
affectedNodes: [],
|
|
4517
4547
|
coordinates: {
|
|
@@ -4553,37 +4583,37 @@ function Fa() {
|
|
|
4553
4583
|
} };
|
|
4554
4584
|
}
|
|
4555
4585
|
function wt(e) {
|
|
4556
|
-
return Object.assign(v, e), e.initialParent.data.emit("dragStarted", v),
|
|
4557
|
-
}
|
|
4558
|
-
function La() {
|
|
4559
|
-
v.activeState && $e(v.activeState.parent, void 0, v), v.selectedState && ke(v.selectedState.nodes, v.selectedState.parent, v), v.selectedState = v.activeState = void 0;
|
|
4586
|
+
return Object.assign(v, e), e.initialParent.data.emit("dragStarted", v), Se = !1, v.emit("dragStarted", v), v;
|
|
4560
4587
|
}
|
|
4561
4588
|
function Oa() {
|
|
4562
|
-
|
|
4563
|
-
const e = v.currentParent.data.config;
|
|
4564
|
-
re(v) && e.handleEnd(v);
|
|
4589
|
+
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;
|
|
4565
4590
|
}
|
|
4566
|
-
function Pa(
|
|
4567
|
-
|
|
4591
|
+
function Pa() {
|
|
4592
|
+
if (v.pointerDown && (v.pointerDown.node.el.draggable = !0), v.pointerDown = void 0, !oe(v)) return;
|
|
4593
|
+
const e = v.currentParent.data.config;
|
|
4594
|
+
oe(v) && e.handleEnd(v);
|
|
4568
4595
|
}
|
|
4569
4596
|
function Ma(e) {
|
|
4597
|
+
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);
|
|
4598
|
+
}
|
|
4599
|
+
function za(e) {
|
|
4570
4600
|
if (!X(v)) return;
|
|
4571
|
-
|
|
4601
|
+
Se = !0;
|
|
4572
4602
|
const n = v.initialParent.data.config.handleEnd;
|
|
4573
4603
|
n(v);
|
|
4574
4604
|
}
|
|
4575
|
-
function
|
|
4605
|
+
function Va(e) {
|
|
4576
4606
|
if (!X(v)) return;
|
|
4577
4607
|
W(e);
|
|
4578
|
-
const { x: n, y: t } =
|
|
4608
|
+
const { x: n, y: t } = je(e);
|
|
4579
4609
|
X(v) && fn({ x: n, y: t }, e, v);
|
|
4580
4610
|
}
|
|
4581
|
-
function
|
|
4611
|
+
function ja(e) {
|
|
4582
4612
|
if (!v.pointerDown || !v.pointerDown.validated) return;
|
|
4583
4613
|
const n = v.pointerDown.parent.data.config;
|
|
4584
4614
|
if (!(e.pointerType === "mouse" && !Tt()))
|
|
4585
|
-
if (
|
|
4586
|
-
|
|
4615
|
+
if (oe(v))
|
|
4616
|
+
oe(v) && Zn(e, v);
|
|
4587
4617
|
else {
|
|
4588
4618
|
if (W(e), n.longPress && !v.longPress) {
|
|
4589
4619
|
clearTimeout(v.longPressTimeout), v.longPress = !1;
|
|
@@ -4591,7 +4621,7 @@ function Va(e) {
|
|
|
4591
4621
|
}
|
|
4592
4622
|
const t = n.draggedNodes(v.pointerDown);
|
|
4593
4623
|
n.dragstartClasses(v.pointerDown.node, t, n, !0);
|
|
4594
|
-
const r = v.pointerDown.node.el.getBoundingClientRect(), o =
|
|
4624
|
+
const r = v.pointerDown.node.el.getBoundingClientRect(), o = fi(
|
|
4595
4625
|
v.pointerDown.node,
|
|
4596
4626
|
v.pointerDown.parent,
|
|
4597
4627
|
e,
|
|
@@ -4599,10 +4629,10 @@ function Va(e) {
|
|
|
4599
4629
|
t,
|
|
4600
4630
|
r
|
|
4601
4631
|
);
|
|
4602
|
-
|
|
4632
|
+
Zn(e, o, !0);
|
|
4603
4633
|
}
|
|
4604
4634
|
}
|
|
4605
|
-
function
|
|
4635
|
+
function Ua({
|
|
4606
4636
|
parent: e,
|
|
4607
4637
|
getValues: n,
|
|
4608
4638
|
setValues: t,
|
|
@@ -4611,18 +4641,18 @@ function ja({
|
|
|
4611
4641
|
var l, p, u;
|
|
4612
4642
|
if (!Pn) return;
|
|
4613
4643
|
Qn || (Qn = an(document, {
|
|
4614
|
-
dragover:
|
|
4615
|
-
pointerdown:
|
|
4616
|
-
pointerup:
|
|
4617
|
-
keydown:
|
|
4618
|
-
drop:
|
|
4619
|
-
pointermove:
|
|
4620
|
-
pointercancel:
|
|
4644
|
+
dragover: Va,
|
|
4645
|
+
pointerdown: Oa,
|
|
4646
|
+
pointerup: Pa,
|
|
4647
|
+
keydown: Ma,
|
|
4648
|
+
drop: za,
|
|
4649
|
+
pointermove: ja,
|
|
4650
|
+
pointercancel: J(r.handlePointercancel),
|
|
4621
4651
|
touchmove: (c) => {
|
|
4622
4652
|
X(v) && c.cancelable && W(c);
|
|
4623
4653
|
},
|
|
4624
4654
|
contextmenu: (c) => {
|
|
4625
|
-
|
|
4655
|
+
oe(v) && W(c);
|
|
4626
4656
|
}
|
|
4627
4657
|
})), Dt(e);
|
|
4628
4658
|
const [o, a] = bt(), s = {
|
|
@@ -4631,37 +4661,37 @@ function ja({
|
|
|
4631
4661
|
config: {
|
|
4632
4662
|
dragDropEffect: r.dragDropEffect ?? "move",
|
|
4633
4663
|
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:
|
|
4664
|
+
draggedNodes: ei,
|
|
4665
|
+
dragstartClasses: oi,
|
|
4666
|
+
handleNodeKeydown: ii,
|
|
4667
|
+
handleDragstart: ti,
|
|
4668
|
+
handleNodeDragover: bi,
|
|
4669
|
+
handleParentDragover: vi,
|
|
4670
|
+
handleNodeDrop: si,
|
|
4671
|
+
handleNodeFocus: di,
|
|
4672
|
+
handleNodeBlur: ci,
|
|
4673
|
+
handlePointercancel: pi,
|
|
4674
|
+
handleEnd: gi,
|
|
4675
|
+
handleDragend: ui,
|
|
4676
|
+
handleParentFocus: Ha,
|
|
4677
|
+
handleNodePointerup: hi,
|
|
4678
|
+
handleNodePointerover: li,
|
|
4679
|
+
handleParentPointerover: yi,
|
|
4680
|
+
handleParentScroll: ni,
|
|
4681
|
+
handleNodePointerdown: ri,
|
|
4682
|
+
handleNodeDragenter: Ti,
|
|
4683
|
+
handleNodeDragleave: wi,
|
|
4684
|
+
handleParentDrop: Ba,
|
|
4655
4685
|
multiDrag: r.multiDrag ?? !1,
|
|
4656
4686
|
nativeDrag: r.nativeDrag ?? !0,
|
|
4657
4687
|
performSort: _a,
|
|
4658
|
-
performTransfer:
|
|
4688
|
+
performTransfer: qa,
|
|
4659
4689
|
root: r.root ?? document,
|
|
4660
|
-
setupNode:
|
|
4690
|
+
setupNode: Ya,
|
|
4661
4691
|
setupNodeRemap: St,
|
|
4662
|
-
reapplyDragClasses:
|
|
4663
|
-
tearDownNode:
|
|
4664
|
-
tearDownNodeRemap:
|
|
4692
|
+
reapplyDragClasses: Wa,
|
|
4693
|
+
tearDownNode: Qa,
|
|
4694
|
+
tearDownNodeRemap: Xa,
|
|
4665
4695
|
remapFinished: Ka,
|
|
4666
4696
|
threshold: {
|
|
4667
4697
|
horizontal: 0,
|
|
@@ -4675,7 +4705,7 @@ function ja({
|
|
|
4675
4705
|
on: a,
|
|
4676
4706
|
emit: o
|
|
4677
4707
|
};
|
|
4678
|
-
new MutationObserver(
|
|
4708
|
+
new MutationObserver(Za).observe(e, { childList: !0 }), Y.set(e, s), (l = r.plugins) == null || l.forEach((c) => {
|
|
4679
4709
|
var g, f;
|
|
4680
4710
|
(f = (g = c(e)) == null ? void 0 : g.tearDown) == null || f.call(g);
|
|
4681
4711
|
}), (p = r.plugins) == null || p.forEach((c) => {
|
|
@@ -4684,10 +4714,10 @@ function ja({
|
|
|
4684
4714
|
}), (u = r.plugins) == null || u.forEach((c) => {
|
|
4685
4715
|
var g, f;
|
|
4686
4716
|
(f = (g = c(e)) == null ? void 0 : g.setup) == null || f.call(g);
|
|
4687
|
-
}),
|
|
4717
|
+
}), Ga(e, s), gn(e, !0);
|
|
4688
4718
|
}
|
|
4689
4719
|
function Ct(e, n, t, r, o, a) {
|
|
4690
|
-
const { x: s, y: d } =
|
|
4720
|
+
const { x: s, y: d } = je(t), l = e.el.getBoundingClientRect();
|
|
4691
4721
|
return {
|
|
4692
4722
|
affectedNodes: [],
|
|
4693
4723
|
ascendingDirection: !1,
|
|
@@ -4727,7 +4757,7 @@ function _a({
|
|
|
4727
4757
|
targetNodes: t
|
|
4728
4758
|
}) {
|
|
4729
4759
|
gn(e.el);
|
|
4730
|
-
const r = n.map((l) => l.data.value), o =
|
|
4760
|
+
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
4761
|
...o.filter((l) => !r.some((p) => Ye(l, p)))
|
|
4732
4762
|
];
|
|
4733
4763
|
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 +4776,7 @@ function _a({
|
|
|
4746
4776
|
state: v
|
|
4747
4777
|
});
|
|
4748
4778
|
}
|
|
4749
|
-
function
|
|
4779
|
+
function Ie(e, n, t) {
|
|
4750
4780
|
if (!n) {
|
|
4751
4781
|
t.activeState = void 0;
|
|
4752
4782
|
return;
|
|
@@ -4756,11 +4786,11 @@ function $e(e, n, t) {
|
|
|
4756
4786
|
parent: e
|
|
4757
4787
|
};
|
|
4758
4788
|
}
|
|
4759
|
-
function
|
|
4789
|
+
function Ae(e, n, t) {
|
|
4760
4790
|
const r = n.data.config.selectedClass;
|
|
4761
4791
|
if (!t.selectedState) return;
|
|
4762
4792
|
const o = Array.from(e);
|
|
4763
|
-
|
|
4793
|
+
De(
|
|
4764
4794
|
e.map((a) => a.el),
|
|
4765
4795
|
r
|
|
4766
4796
|
);
|
|
@@ -4773,17 +4803,17 @@ function ke(e, n, t) {
|
|
|
4773
4803
|
function en(e, n, t, r, o = !1) {
|
|
4774
4804
|
r.pointerSelection = o;
|
|
4775
4805
|
for (const a of n)
|
|
4776
|
-
a.el.setAttribute("aria-selected", "true"),
|
|
4806
|
+
a.el.setAttribute("aria-selected", "true"), Le([a.el], e.data.config.selectedClass, !0);
|
|
4777
4807
|
r.selectedState = {
|
|
4778
4808
|
nodes: n,
|
|
4779
4809
|
parent: e
|
|
4780
|
-
},
|
|
4810
|
+
}, Ie(e, t, r);
|
|
4781
4811
|
}
|
|
4782
|
-
function
|
|
4812
|
+
function Ha(e, n) {
|
|
4783
4813
|
const t = e.targetData.parent.data.enabledNodes[0];
|
|
4784
|
-
t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ?
|
|
4814
|
+
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
4815
|
}
|
|
4786
|
-
function
|
|
4816
|
+
function qa({
|
|
4787
4817
|
currentParent: e,
|
|
4788
4818
|
targetParent: n,
|
|
4789
4819
|
initialParent: t,
|
|
@@ -4794,10 +4824,10 @@ function Ha({
|
|
|
4794
4824
|
}) {
|
|
4795
4825
|
gn(t.el);
|
|
4796
4826
|
const d = r.map((g) => g.data.value), l = [
|
|
4797
|
-
...
|
|
4827
|
+
...ze(e.el, e.data).filter(
|
|
4798
4828
|
(g) => !d.some((f) => Ye(g, f))
|
|
4799
4829
|
)
|
|
4800
|
-
], p =
|
|
4830
|
+
], p = ze(n.el, n.data), u = t.el === n.el && n.data.config.sortable === !1;
|
|
4801
4831
|
let c;
|
|
4802
4832
|
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
4833
|
sourceParent: e,
|
|
@@ -4817,35 +4847,35 @@ function Ha({
|
|
|
4817
4847
|
targetNodes: a || []
|
|
4818
4848
|
});
|
|
4819
4849
|
}
|
|
4820
|
-
function
|
|
4850
|
+
function ze(e, n) {
|
|
4821
4851
|
return [...n.getValues(e)];
|
|
4822
4852
|
}
|
|
4823
4853
|
function Nn(e, n, t) {
|
|
4824
4854
|
n.setValues(t, e);
|
|
4825
4855
|
}
|
|
4826
|
-
function
|
|
4827
|
-
|
|
4856
|
+
function Ba(e, n) {
|
|
4857
|
+
Ee(e.e), Se = !0;
|
|
4828
4858
|
const t = n.initialParent.data.config.handleEnd;
|
|
4829
4859
|
t(n);
|
|
4830
4860
|
}
|
|
4831
4861
|
function Dt(e) {
|
|
4832
|
-
const n =
|
|
4862
|
+
const n = Y.get(e);
|
|
4833
4863
|
n && n.abortControllers.mainParent && n.abortControllers.mainParent.abort();
|
|
4834
4864
|
}
|
|
4835
4865
|
function X(e) {
|
|
4836
4866
|
return "draggedNode" in e && !!e.draggedNode;
|
|
4837
4867
|
}
|
|
4838
|
-
function
|
|
4868
|
+
function oe(e) {
|
|
4839
4869
|
return "synthDragging" in e && !!e.synthDragging;
|
|
4840
4870
|
}
|
|
4841
|
-
function
|
|
4871
|
+
function Ga(e, n) {
|
|
4842
4872
|
n.abortControllers.mainParent = an(e, {
|
|
4843
4873
|
dragover: nn(n.config.handleParentDragover),
|
|
4844
4874
|
handleParentPointerover: n.config.handleParentPointerover,
|
|
4845
4875
|
scroll: nn(n.config.handleParentScroll),
|
|
4846
4876
|
drop: nn(n.config.handleParentDrop),
|
|
4847
4877
|
hasNestedParent: (t) => {
|
|
4848
|
-
const r =
|
|
4878
|
+
const r = Y.get(t.target);
|
|
4849
4879
|
r && (r.nestedParent = t.detail.parent);
|
|
4850
4880
|
},
|
|
4851
4881
|
focus: nn(n.config.handleParentFocus)
|
|
@@ -4866,7 +4896,7 @@ function Ba(e, n) {
|
|
|
4866
4896
|
if (!o) return;
|
|
4867
4897
|
const a = r.parentNode;
|
|
4868
4898
|
if (!(a instanceof HTMLElement)) return;
|
|
4869
|
-
const s =
|
|
4899
|
+
const s = Y.get(a);
|
|
4870
4900
|
s && (v.pointerDown = {
|
|
4871
4901
|
parent: {
|
|
4872
4902
|
el: a,
|
|
@@ -4882,28 +4912,28 @@ function Ba(e, n) {
|
|
|
4882
4912
|
}
|
|
4883
4913
|
));
|
|
4884
4914
|
}
|
|
4885
|
-
function
|
|
4915
|
+
function Ya(e) {
|
|
4886
4916
|
var t;
|
|
4887
4917
|
const n = e.parent.data.config;
|
|
4888
4918
|
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:
|
|
4919
|
+
keydown: J(n.handleNodeKeydown),
|
|
4920
|
+
dragstart: J(n.handleDragstart),
|
|
4921
|
+
dragover: J(n.handleNodeDragover),
|
|
4922
|
+
dragenter: J(n.handleNodeDragenter),
|
|
4923
|
+
dragleave: J(n.handleNodeDragleave),
|
|
4924
|
+
dragend: J(n.handleDragend),
|
|
4925
|
+
drop: J(n.handleNodeDrop),
|
|
4926
|
+
focus: J(n.handleNodeFocus),
|
|
4927
|
+
blur: J(n.handleNodeBlur),
|
|
4928
|
+
pointerup: J(n.handleNodePointerup),
|
|
4929
|
+
pointercancel: J(n.handlePointercancel),
|
|
4930
|
+
pointerdown: J(n.handleNodePointerdown),
|
|
4901
4931
|
handleNodePointerover: n.handleNodePointerover,
|
|
4902
4932
|
touchmove: (r) => {
|
|
4903
4933
|
X(v) && r.cancelable && W(r);
|
|
4904
4934
|
},
|
|
4905
4935
|
contextmenu: (r) => {
|
|
4906
|
-
|
|
4936
|
+
oe(v) && W(r);
|
|
4907
4937
|
}
|
|
4908
4938
|
}), e.node.el.draggable = !0, n.reapplyDragClasses(e.node.el, e.parent.data), (t = e.parent.data.config.plugins) == null || t.forEach((r) => {
|
|
4909
4939
|
var o, a;
|
|
@@ -4917,34 +4947,34 @@ function St(e) {
|
|
|
4917
4947
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
|
|
4918
4948
|
});
|
|
4919
4949
|
}
|
|
4920
|
-
function
|
|
4950
|
+
function Wa(e, n) {
|
|
4921
4951
|
if (!X(v)) return;
|
|
4922
|
-
const t =
|
|
4923
|
-
v.draggedNode.el === e &&
|
|
4952
|
+
const t = oe(v) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
|
|
4953
|
+
v.draggedNode.el === e && Le([e], t, !0);
|
|
4924
4954
|
}
|
|
4925
|
-
function
|
|
4955
|
+
function Xa(e) {
|
|
4926
4956
|
var n;
|
|
4927
4957
|
(n = e.parent.data.config.plugins) == null || n.forEach((t) => {
|
|
4928
4958
|
var r, o;
|
|
4929
4959
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.tearDownNodeRemap) == null || o.call(r, e);
|
|
4930
4960
|
});
|
|
4931
4961
|
}
|
|
4932
|
-
function
|
|
4962
|
+
function Qa(e) {
|
|
4933
4963
|
var n, t, r, o, a;
|
|
4934
4964
|
(n = e.parent.data.config.plugins) == null || n.forEach((s) => {
|
|
4935
4965
|
var d, l;
|
|
4936
4966
|
(l = (d = s(e.parent.el)) == null ? void 0 : d.tearDownNode) == null || l.call(d, e);
|
|
4937
4967
|
}), 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
4968
|
}
|
|
4939
|
-
function
|
|
4969
|
+
function Za(e) {
|
|
4940
4970
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
4941
4971
|
return;
|
|
4942
4972
|
const n = e[0].target;
|
|
4943
|
-
!(n instanceof HTMLElement) || !
|
|
4973
|
+
!(n instanceof HTMLElement) || !Y.get(n) || gn(n);
|
|
4944
4974
|
}
|
|
4945
4975
|
function gn(e, n) {
|
|
4946
4976
|
var d;
|
|
4947
|
-
const t =
|
|
4977
|
+
const t = Y.get(e);
|
|
4948
4978
|
if (!t) return;
|
|
4949
4979
|
t.privateClasses = Array.from(e.classList);
|
|
4950
4980
|
const r = [], o = t.config;
|
|
@@ -4983,7 +5013,7 @@ function gn(e, n) {
|
|
|
4983
5013
|
index: l
|
|
4984
5014
|
}
|
|
4985
5015
|
);
|
|
4986
|
-
if (!X(v) && v.activeState && Ye(v.activeState.node.data.value, c.value) &&
|
|
5016
|
+
if (!X(v) && v.activeState && Ye(v.activeState.node.data.value, c.value) && Ie(
|
|
4987
5017
|
{
|
|
4988
5018
|
data: t,
|
|
4989
5019
|
el: e
|
|
@@ -5023,7 +5053,7 @@ function gn(e, n) {
|
|
|
5023
5053
|
}
|
|
5024
5054
|
});
|
|
5025
5055
|
}
|
|
5026
|
-
|
|
5056
|
+
Y.set(e, { ...t, enabledNodes: s }), o.remapFinished(t), (d = t.config.plugins) == null || d.forEach((l) => {
|
|
5027
5057
|
var p, u;
|
|
5028
5058
|
(u = (p = l(e)) == null ? void 0 : p.remapFinished) == null || u.call(p);
|
|
5029
5059
|
});
|
|
@@ -5031,10 +5061,10 @@ function gn(e, n) {
|
|
|
5031
5061
|
function Ka() {
|
|
5032
5062
|
v.remapJustFinished = !0, "draggedNode" in v && (v.affectedNodes = []);
|
|
5033
5063
|
}
|
|
5034
|
-
function
|
|
5064
|
+
function Ja(e) {
|
|
5035
5065
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
5036
5066
|
}
|
|
5037
|
-
function
|
|
5067
|
+
function ei(e) {
|
|
5038
5068
|
var n;
|
|
5039
5069
|
if (e.parent.data.config.multiDrag) {
|
|
5040
5070
|
if (v.selectedState)
|
|
@@ -5047,14 +5077,14 @@ function Ja(e) {
|
|
|
5047
5077
|
} else return [e.node];
|
|
5048
5078
|
return [];
|
|
5049
5079
|
}
|
|
5050
|
-
function
|
|
5051
|
-
X(v) && (v.emit("scrollStarted", v), !
|
|
5080
|
+
function ni(e) {
|
|
5081
|
+
X(v) && (v.emit("scrollStarted", v), !oe(v) && (v.preventEnter = !0, xn && clearTimeout(xn), xn = setTimeout(() => {
|
|
5052
5082
|
v.preventEnter = !1, v.emit("scrollEnded", v);
|
|
5053
5083
|
}, 100)));
|
|
5054
5084
|
}
|
|
5055
|
-
function
|
|
5085
|
+
function ti(e, n) {
|
|
5056
5086
|
const t = e.targetData.parent.data.config;
|
|
5057
|
-
if (!t.nativeDrag || !
|
|
5087
|
+
if (!t.nativeDrag || !Ja(e) || !Et({
|
|
5058
5088
|
x: e.e.clientX,
|
|
5059
5089
|
y: e.e.clientY,
|
|
5060
5090
|
node: e.targetData.node,
|
|
@@ -5068,11 +5098,11 @@ function ni(e, n) {
|
|
|
5068
5098
|
node: e.targetData.node
|
|
5069
5099
|
});
|
|
5070
5100
|
r.length === 0 && (r = [e.targetData.node]), t.dragstartClasses(e.targetData.node, r, t);
|
|
5071
|
-
const o =
|
|
5101
|
+
const o = ai(e, r);
|
|
5072
5102
|
if (t.onDragstart) {
|
|
5073
5103
|
const a = {
|
|
5074
5104
|
parent: e.targetData.parent,
|
|
5075
|
-
values:
|
|
5105
|
+
values: ze(
|
|
5076
5106
|
e.targetData.parent.el,
|
|
5077
5107
|
e.targetData.parent.data
|
|
5078
5108
|
),
|
|
@@ -5084,9 +5114,9 @@ function ni(e, n) {
|
|
|
5084
5114
|
t.onDragstart(a);
|
|
5085
5115
|
}
|
|
5086
5116
|
}
|
|
5087
|
-
function
|
|
5117
|
+
function ri(e, n) {
|
|
5088
5118
|
var d, l;
|
|
5089
|
-
if (
|
|
5119
|
+
if (Ee(e.e), n.pointerDown = {
|
|
5090
5120
|
parent: e.targetData.parent,
|
|
5091
5121
|
node: e.targetData.node,
|
|
5092
5122
|
validated: !1
|
|
@@ -5097,7 +5127,7 @@ function ti(e, n) {
|
|
|
5097
5127
|
config: e.targetData.parent.data.config
|
|
5098
5128
|
}))
|
|
5099
5129
|
return;
|
|
5100
|
-
n.pointerDown.validated = !0,
|
|
5130
|
+
n.pointerDown.validated = !0, mi(e, n, e.targetData.node);
|
|
5101
5131
|
const t = e.targetData.parent.data;
|
|
5102
5132
|
let r = [e.targetData.node];
|
|
5103
5133
|
const o = e.e.ctrlKey || e.e.metaKey, a = e.e.shiftKey, s = e.targetData.node;
|
|
@@ -5119,7 +5149,7 @@ function ti(e, n) {
|
|
|
5119
5149
|
const p = e.targetData.parent.data.enabledNodes;
|
|
5120
5150
|
if (n.selectedState && n.activeState)
|
|
5121
5151
|
if (n.selectedState.parent.el !== e.targetData.parent.el) {
|
|
5122
|
-
|
|
5152
|
+
Ae(n.selectedState.nodes, n.selectedState.parent, n), n.selectedState = void 0;
|
|
5123
5153
|
for (let u = 0; u <= s.data.index; u++)
|
|
5124
5154
|
r.push(p[u]);
|
|
5125
5155
|
} else {
|
|
@@ -5146,7 +5176,7 @@ function ti(e, n) {
|
|
|
5146
5176
|
}
|
|
5147
5177
|
(l = (d = n.selectedState) == null ? void 0 : d.nodes) != null && l.length ? n.selectedState.nodes.findIndex(
|
|
5148
5178
|
(u) => u.el === e.targetData.node.el
|
|
5149
|
-
) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ?
|
|
5179
|
+
) === -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
5180
|
e.targetData.parent,
|
|
5151
5181
|
r,
|
|
5152
5182
|
e.targetData.node,
|
|
@@ -5160,28 +5190,28 @@ function ti(e, n) {
|
|
|
5160
5190
|
!0
|
|
5161
5191
|
);
|
|
5162
5192
|
}
|
|
5163
|
-
function
|
|
5164
|
-
|
|
5193
|
+
function oi(e, n, t, r = !1) {
|
|
5194
|
+
Le(
|
|
5165
5195
|
n.map((o) => o.el),
|
|
5166
5196
|
r ? t.synthDraggingClass : t.draggingClass
|
|
5167
5197
|
), setTimeout(() => {
|
|
5168
|
-
|
|
5198
|
+
De(
|
|
5169
5199
|
n.map((o) => o.el),
|
|
5170
5200
|
r ? t.synthDraggingClass : t.draggingClass
|
|
5171
|
-
),
|
|
5201
|
+
), Le(
|
|
5172
5202
|
n.map((o) => o.el),
|
|
5173
5203
|
r ? t.synthDragPlaceholderClass : t.dragPlaceholderClass
|
|
5174
|
-
),
|
|
5204
|
+
), Le(
|
|
5175
5205
|
n.map((o) => o.el),
|
|
5176
5206
|
r ? t.synthDropZoneClass : t.dropZoneClass
|
|
5177
|
-
),
|
|
5207
|
+
), De(
|
|
5178
5208
|
n.map((o) => o.el),
|
|
5179
5209
|
t.selectedClass
|
|
5180
5210
|
);
|
|
5181
5211
|
});
|
|
5182
5212
|
}
|
|
5183
|
-
function
|
|
5184
|
-
|
|
5213
|
+
function ai(e, n) {
|
|
5214
|
+
Ee(e.e);
|
|
5185
5215
|
const t = wt(
|
|
5186
5216
|
Ct(
|
|
5187
5217
|
e.targetData.node,
|
|
@@ -5251,75 +5281,75 @@ function Et({
|
|
|
5251
5281
|
if (a === s || s.contains(a)) return !0;
|
|
5252
5282
|
return !1;
|
|
5253
5283
|
}
|
|
5254
|
-
function ai(e) {
|
|
5255
|
-
}
|
|
5256
5284
|
function ii(e) {
|
|
5285
|
+
}
|
|
5286
|
+
function li(e) {
|
|
5257
5287
|
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? kt(e.detail, e.detail.state) : hn(e.detail, e.detail.state);
|
|
5258
5288
|
}
|
|
5259
|
-
function
|
|
5289
|
+
function si(e, n) {
|
|
5260
5290
|
const t = e.targetData.parent.data.config;
|
|
5261
|
-
t.nativeDrag && (
|
|
5291
|
+
t.nativeDrag && (Ee(e.e), Se = !0, t.handleEnd(n));
|
|
5262
5292
|
}
|
|
5263
|
-
function
|
|
5293
|
+
function di(e) {
|
|
5264
5294
|
e.e.target !== e.e.currentTarget && v.pointerDown && (v.pointerDown.node.el.draggable = !1);
|
|
5265
5295
|
}
|
|
5266
|
-
function
|
|
5296
|
+
function ci(e) {
|
|
5267
5297
|
e.e.target !== e.e.currentTarget && v.pointerDown && (v.pointerDown.node.el.draggable = !0);
|
|
5268
5298
|
}
|
|
5269
|
-
function
|
|
5299
|
+
function ui(e, n) {
|
|
5270
5300
|
const t = e.targetData.parent.data.config;
|
|
5271
5301
|
if (t.nativeDrag) {
|
|
5272
|
-
if (W(e.e),
|
|
5273
|
-
|
|
5302
|
+
if (W(e.e), Ee(e.e), Se) {
|
|
5303
|
+
Se = !1;
|
|
5274
5304
|
return;
|
|
5275
5305
|
}
|
|
5276
5306
|
t.handleEnd(n);
|
|
5277
5307
|
}
|
|
5278
5308
|
}
|
|
5279
|
-
function
|
|
5309
|
+
function pi(e, n) {
|
|
5280
5310
|
var r;
|
|
5281
|
-
if (!
|
|
5282
|
-
if (W(e.e),
|
|
5283
|
-
|
|
5311
|
+
if (!oe(n)) return;
|
|
5312
|
+
if (W(e.e), Se) {
|
|
5313
|
+
Se = !1;
|
|
5284
5314
|
return;
|
|
5285
5315
|
}
|
|
5286
|
-
const t = (r =
|
|
5316
|
+
const t = (r = Y.get(n.initialParent.el)) == null ? void 0 : r.config;
|
|
5287
5317
|
t != null && t.onDragend && t.onDragend({
|
|
5288
5318
|
parent: n.currentParent,
|
|
5289
|
-
values:
|
|
5319
|
+
values: ze(n.currentParent.el, n.currentParent.data),
|
|
5290
5320
|
draggedNode: n.draggedNode,
|
|
5291
5321
|
draggedNodes: n.draggedNodes,
|
|
5292
5322
|
state: n
|
|
5293
5323
|
}), t == null || t.handleEnd(n);
|
|
5294
5324
|
}
|
|
5295
|
-
function
|
|
5325
|
+
function gi(e) {
|
|
5296
5326
|
var u, c, g, f, h;
|
|
5297
5327
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
5298
|
-
const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r =
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
}),
|
|
5328
|
+
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;
|
|
5329
|
+
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(() => {
|
|
5330
|
+
De(n, a), De(n, s), De(n, d);
|
|
5331
|
+
}), Ae(e.draggedNodes, e.currentParent, e), Ie(e.currentParent, void 0, e);
|
|
5302
5332
|
const p = { ...e };
|
|
5303
5333
|
(h = o == null ? void 0 : o.onDragend) == null || h.call(o, {
|
|
5304
5334
|
parent: p.currentParent,
|
|
5305
|
-
values:
|
|
5335
|
+
values: ze(
|
|
5306
5336
|
p.currentParent.el,
|
|
5307
5337
|
p.currentParent.data
|
|
5308
5338
|
),
|
|
5309
5339
|
draggedNode: p.draggedNode,
|
|
5310
5340
|
draggedNodes: p.draggedNodes,
|
|
5311
5341
|
state: p
|
|
5312
|
-
}), e.emit("dragEnded", p),
|
|
5342
|
+
}), e.emit("dragEnded", p), La();
|
|
5313
5343
|
}
|
|
5314
|
-
function
|
|
5315
|
-
|
|
5344
|
+
function hi(e, n) {
|
|
5345
|
+
Ee(e.e), !n.pointerSelection && n.selectedState && Ae(n.selectedState.nodes, e.targetData.parent, n);
|
|
5316
5346
|
const t = e.targetData.parent.data.config;
|
|
5317
|
-
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1,
|
|
5347
|
+
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, De(
|
|
5318
5348
|
e.targetData.parent.data.enabledNodes.map((r) => r.el),
|
|
5319
5349
|
t.longPressClass
|
|
5320
5350
|
), X(n) && t.handleEnd(n);
|
|
5321
5351
|
}
|
|
5322
|
-
function
|
|
5352
|
+
function fi(e, n, t, r, o, a) {
|
|
5323
5353
|
var h, x;
|
|
5324
5354
|
const s = n.data.config;
|
|
5325
5355
|
let d, l;
|
|
@@ -5402,10 +5432,10 @@ function hi(e, n, t, r, o, a) {
|
|
|
5402
5432
|
...g
|
|
5403
5433
|
});
|
|
5404
5434
|
}
|
|
5405
|
-
function
|
|
5435
|
+
function mi(e, n, t) {
|
|
5406
5436
|
const r = e.targetData.parent.data.config;
|
|
5407
5437
|
n.longPressTimeout = setTimeout(() => {
|
|
5408
|
-
n && (n.longPress = !0, r.longPressClass && e.e.cancelable &&
|
|
5438
|
+
n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Le([t.el], r.longPressClass), W(e.e));
|
|
5409
5439
|
}, r.longPressDuration || 1e3);
|
|
5410
5440
|
}
|
|
5411
5441
|
function kn(e, n = !0, t = !0) {
|
|
@@ -5414,17 +5444,17 @@ function kn(e, n = !0, t = !0) {
|
|
|
5414
5444
|
function Nt(e, n = !1) {
|
|
5415
5445
|
var u;
|
|
5416
5446
|
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",
|
|
5447
|
+
e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${p}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", De(
|
|
5418
5448
|
e.draggedNodes.map((c) => c.el),
|
|
5419
5449
|
(u = e.initialParent.data.config) == null ? void 0 : u.longPressClass
|
|
5420
5450
|
));
|
|
5421
5451
|
}
|
|
5422
|
-
function
|
|
5423
|
-
const r =
|
|
5452
|
+
function Zn(e, n, t = !1) {
|
|
5453
|
+
const r = je(e);
|
|
5424
5454
|
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
|
-
|
|
5455
|
+
oe(n) && fn(n.coordinates, e, n);
|
|
5426
5456
|
}, 16);
|
|
5427
|
-
const o =
|
|
5457
|
+
const o = Ei(r);
|
|
5428
5458
|
if (!o) {
|
|
5429
5459
|
document.dispatchEvent(
|
|
5430
5460
|
new CustomEvent("handleRootPointerover", {
|
|
@@ -5451,22 +5481,22 @@ function Kn(e, n, t = !1) {
|
|
|
5451
5481
|
})
|
|
5452
5482
|
);
|
|
5453
5483
|
}
|
|
5454
|
-
function
|
|
5484
|
+
function bi(e, n) {
|
|
5455
5485
|
var a;
|
|
5456
5486
|
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),
|
|
5487
|
+
const { x: r, y: o } = je(e.e);
|
|
5488
|
+
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
5489
|
}
|
|
5460
|
-
function
|
|
5490
|
+
function vi(e, n) {
|
|
5461
5491
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5462
|
-
W(e.e),
|
|
5463
|
-
const { x: r, y: o } =
|
|
5492
|
+
W(e.e), Ee(e.e);
|
|
5493
|
+
const { x: r, y: o } = je(e.e);
|
|
5464
5494
|
X(n) && fn({ x: r, y: o }, e.e, n), hn(e, n);
|
|
5465
5495
|
}
|
|
5466
|
-
function
|
|
5496
|
+
function yi(e) {
|
|
5467
5497
|
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && hn(e.detail, e.detail.state);
|
|
5468
5498
|
}
|
|
5469
|
-
function
|
|
5499
|
+
function xi({
|
|
5470
5500
|
currentParent: e,
|
|
5471
5501
|
targetParent: n,
|
|
5472
5502
|
initialParent: t,
|
|
@@ -5484,13 +5514,13 @@ function yi({
|
|
|
5484
5514
|
o
|
|
5485
5515
|
) : !(!a.group || a.group !== s.group);
|
|
5486
5516
|
}
|
|
5487
|
-
function
|
|
5517
|
+
function Ti(e, n) {
|
|
5488
5518
|
W(e.e);
|
|
5489
5519
|
}
|
|
5490
|
-
function
|
|
5520
|
+
function wi(e, n) {
|
|
5491
5521
|
W(e.e);
|
|
5492
5522
|
}
|
|
5493
|
-
function
|
|
5523
|
+
function Ci(e, n, t, r) {
|
|
5494
5524
|
var u;
|
|
5495
5525
|
if (n.affectedNodes.map((c) => c.data.value).includes(e.targetData.node.data.value))
|
|
5496
5526
|
return !1;
|
|
@@ -5525,8 +5555,8 @@ function wi(e, n, t, r) {
|
|
|
5525
5555
|
return !1;
|
|
5526
5556
|
}
|
|
5527
5557
|
function kt(e, n) {
|
|
5528
|
-
const { x: t, y: r } =
|
|
5529
|
-
if (!
|
|
5558
|
+
const { x: t, y: r } = je(e.e);
|
|
5559
|
+
if (!Ci(e, n, t, r))
|
|
5530
5560
|
return;
|
|
5531
5561
|
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
5562
|
n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
|
|
@@ -5537,11 +5567,11 @@ function kt(e, n) {
|
|
|
5537
5567
|
targetNodes: [e.targetData.node]
|
|
5538
5568
|
});
|
|
5539
5569
|
}
|
|
5540
|
-
function
|
|
5570
|
+
function J(e) {
|
|
5541
5571
|
function n(t) {
|
|
5542
5572
|
const r = he.get(t);
|
|
5543
5573
|
if (!r) return;
|
|
5544
|
-
const o =
|
|
5574
|
+
const o = Y.get(t.parentNode);
|
|
5545
5575
|
if (o)
|
|
5546
5576
|
return {
|
|
5547
5577
|
node: {
|
|
@@ -5567,7 +5597,7 @@ function Z(e) {
|
|
|
5567
5597
|
};
|
|
5568
5598
|
}
|
|
5569
5599
|
function hn(e, n) {
|
|
5570
|
-
W(e.e),
|
|
5600
|
+
W(e.e), xi({
|
|
5571
5601
|
currentParent: n.currentParent,
|
|
5572
5602
|
targetParent: e.targetData.parent,
|
|
5573
5603
|
initialParent: n.initialParent,
|
|
@@ -5585,7 +5615,7 @@ function hn(e, n) {
|
|
|
5585
5615
|
}
|
|
5586
5616
|
function nn(e) {
|
|
5587
5617
|
function n(t) {
|
|
5588
|
-
const r =
|
|
5618
|
+
const r = Y.get(t);
|
|
5589
5619
|
if (r)
|
|
5590
5620
|
return {
|
|
5591
5621
|
parent: {
|
|
@@ -5606,16 +5636,16 @@ function nn(e) {
|
|
|
5606
5636
|
);
|
|
5607
5637
|
};
|
|
5608
5638
|
}
|
|
5609
|
-
function
|
|
5639
|
+
function Le(e, n, t = !1) {
|
|
5610
5640
|
function r(o, a) {
|
|
5611
5641
|
he.set(o, a);
|
|
5612
5642
|
}
|
|
5613
5643
|
for (const o of e) {
|
|
5614
|
-
const a = he.get(o), s =
|
|
5644
|
+
const a = he.get(o), s = Di(o, n, a, t);
|
|
5615
5645
|
s && r(o, s);
|
|
5616
5646
|
}
|
|
5617
5647
|
}
|
|
5618
|
-
function
|
|
5648
|
+
function Di(e, n, t, r = !1) {
|
|
5619
5649
|
if (!n) return;
|
|
5620
5650
|
const o = xt(n);
|
|
5621
5651
|
if (!o.length) return;
|
|
@@ -5632,7 +5662,7 @@ function Ci(e, n, t, r = !1) {
|
|
|
5632
5662
|
) : e.classList.add(s);
|
|
5633
5663
|
return t.privateClasses = a, t;
|
|
5634
5664
|
}
|
|
5635
|
-
function
|
|
5665
|
+
function De(e, n) {
|
|
5636
5666
|
if (!n) return;
|
|
5637
5667
|
const t = xt(n);
|
|
5638
5668
|
if (t.length)
|
|
@@ -5641,13 +5671,13 @@ function Ce(e, n) {
|
|
|
5641
5671
|
r.classList.remove(...t);
|
|
5642
5672
|
continue;
|
|
5643
5673
|
}
|
|
5644
|
-
const o = he.get(r) ||
|
|
5674
|
+
const o = he.get(r) || Y.get(r);
|
|
5645
5675
|
if (o)
|
|
5646
5676
|
for (const a of t)
|
|
5647
5677
|
o.privateClasses.includes(a) || r.classList.remove(a);
|
|
5648
5678
|
}
|
|
5649
5679
|
}
|
|
5650
|
-
function
|
|
5680
|
+
function Kn(e, n, t, r, o) {
|
|
5651
5681
|
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
5682
|
if (d) {
|
|
5653
5683
|
const x = e[l], b = e[p], D = x > 0, T = x + b < (s ? o.state.rootScrollWidth || 0 : e[c]);
|
|
@@ -5671,7 +5701,7 @@ function Zn(e, n, t, r, o) {
|
|
|
5671
5701
|
}
|
|
5672
5702
|
return s ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
5673
5703
|
}
|
|
5674
|
-
function
|
|
5704
|
+
function Si(e, n, t, r) {
|
|
5675
5705
|
if (!X(t) || !t.draggedNode)
|
|
5676
5706
|
return;
|
|
5677
5707
|
t.preventEnter = !0;
|
|
@@ -5687,7 +5717,7 @@ function Di(e, n, t, r) {
|
|
|
5687
5717
|
t[l] = void 0, t[d] = void 0;
|
|
5688
5718
|
return;
|
|
5689
5719
|
}
|
|
5690
|
-
e[u] += s * a,
|
|
5720
|
+
e[u] += s * a, oe(t) && Nt(t), t[l] = requestAnimationFrame(p);
|
|
5691
5721
|
};
|
|
5692
5722
|
t[l] = requestAnimationFrame(p);
|
|
5693
5723
|
}
|
|
@@ -5702,12 +5732,12 @@ function fn(e, n, t) {
|
|
|
5702
5732
|
const { x: r, y: o } = e;
|
|
5703
5733
|
let a = !1;
|
|
5704
5734
|
const s = (l, p, u) => {
|
|
5705
|
-
|
|
5735
|
+
Si(u, n, t, { axis: l, direction: p }), a = !0;
|
|
5706
5736
|
}, d = (l) => {
|
|
5707
|
-
const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c =
|
|
5737
|
+
const p = window.getComputedStyle(l), u = l.getBoundingClientRect(), c = Kn(l, n, p, u, {
|
|
5708
5738
|
axis: "x",
|
|
5709
5739
|
state: t
|
|
5710
|
-
}), g =
|
|
5740
|
+
}), g = Kn(l, n, p, u, { axis: "y" });
|
|
5711
5741
|
(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
5742
|
};
|
|
5713
5743
|
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 +5751,19 @@ function fn(e, n, t) {
|
|
|
5721
5751
|
}
|
|
5722
5752
|
a || kn(t);
|
|
5723
5753
|
}
|
|
5724
|
-
function
|
|
5754
|
+
function Ei(e) {
|
|
5725
5755
|
let n = document.elementFromPoint(e.x, e.y);
|
|
5726
5756
|
if (!mn(n)) return;
|
|
5727
5757
|
let t, r = !0;
|
|
5728
5758
|
for (; n && r; ) {
|
|
5729
|
-
if (he.has(n) ||
|
|
5730
|
-
r = !1, t =
|
|
5759
|
+
if (he.has(n) || Y.has(n)) {
|
|
5760
|
+
r = !1, t = Y.has(n);
|
|
5731
5761
|
break;
|
|
5732
5762
|
}
|
|
5733
5763
|
n = n.parentNode;
|
|
5734
5764
|
}
|
|
5735
5765
|
if (t) {
|
|
5736
|
-
const o =
|
|
5766
|
+
const o = Y.get(n);
|
|
5737
5767
|
return o ? {
|
|
5738
5768
|
parent: {
|
|
5739
5769
|
el: n,
|
|
@@ -5743,7 +5773,7 @@ function Si(e) {
|
|
|
5743
5773
|
} else {
|
|
5744
5774
|
const o = he.get(n);
|
|
5745
5775
|
if (!o) return;
|
|
5746
|
-
const a =
|
|
5776
|
+
const a = Y.get(n.parentNode);
|
|
5747
5777
|
return a ? {
|
|
5748
5778
|
node: {
|
|
5749
5779
|
el: n,
|
|
@@ -5771,44 +5801,44 @@ function an(e, n) {
|
|
|
5771
5801
|
}
|
|
5772
5802
|
return t;
|
|
5773
5803
|
}
|
|
5774
|
-
function
|
|
5804
|
+
function Ni(e) {
|
|
5775
5805
|
if (e instanceof HTMLElement) return e;
|
|
5776
5806
|
if ("current" in e && e.current instanceof HTMLElement)
|
|
5777
5807
|
return e.current;
|
|
5778
5808
|
console.warn("Invalid parent element", e);
|
|
5779
5809
|
}
|
|
5780
|
-
function
|
|
5781
|
-
const t =
|
|
5810
|
+
function ki(e, n) {
|
|
5811
|
+
const t = Ni(e);
|
|
5782
5812
|
t && n(t);
|
|
5783
5813
|
}
|
|
5784
5814
|
var ln = /* @__PURE__ */ new WeakMap();
|
|
5785
|
-
function
|
|
5815
|
+
function Ai(e) {
|
|
5786
5816
|
const n = ln.get(e);
|
|
5787
5817
|
return n ? n[0] : (console.warn("No values found for parent element"), []);
|
|
5788
5818
|
}
|
|
5789
|
-
function
|
|
5819
|
+
function $i(e, n) {
|
|
5790
5820
|
const t = ln.get(n);
|
|
5791
5821
|
t && t[1](e), ln.set(n, [e, t[1]]);
|
|
5792
5822
|
}
|
|
5793
|
-
function
|
|
5823
|
+
function Ii(e, n) {
|
|
5794
5824
|
return (t) => {
|
|
5795
|
-
ln.set(t, n),
|
|
5825
|
+
ln.set(t, n), Ua({ parent: t, getValues: Ai, setValues: $i, config: e });
|
|
5796
5826
|
};
|
|
5797
5827
|
}
|
|
5798
5828
|
function et(e) {
|
|
5799
5829
|
Pn && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
|
|
5800
5830
|
const { parent: t, state: r, ...o } = n;
|
|
5801
|
-
|
|
5831
|
+
ki(t, Ii(o, r));
|
|
5802
5832
|
}));
|
|
5803
5833
|
}
|
|
5804
|
-
function
|
|
5805
|
-
const t =
|
|
5834
|
+
function Ri(e, n = {}) {
|
|
5835
|
+
const t = Fe(null), [r, o] = _(e);
|
|
5806
5836
|
function a(s = {}) {
|
|
5807
5837
|
et({ parent: t, state: [r, o], ...s });
|
|
5808
5838
|
}
|
|
5809
|
-
return
|
|
5839
|
+
return $e(() => {
|
|
5810
5840
|
et({ parent: t, state: [r, o], ...n });
|
|
5811
|
-
}, [r]),
|
|
5841
|
+
}, [r]), $e(() => () => {
|
|
5812
5842
|
t.current && Dt(t.current);
|
|
5813
5843
|
}, []), [t, r, o, a];
|
|
5814
5844
|
}
|
|
@@ -5821,7 +5851,7 @@ const nt = {
|
|
|
5821
5851
|
color: E.palette.neutral.N40
|
|
5822
5852
|
}
|
|
5823
5853
|
}
|
|
5824
|
-
},
|
|
5854
|
+
}, Fi = C.ul`
|
|
5825
5855
|
list-style: none;
|
|
5826
5856
|
padding: 0;
|
|
5827
5857
|
margin: 0;
|
|
@@ -5830,7 +5860,7 @@ const nt = {
|
|
|
5830
5860
|
gap: 12px;
|
|
5831
5861
|
width: 100%;
|
|
5832
5862
|
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
5833
|
-
`,
|
|
5863
|
+
`, Li = C.li`
|
|
5834
5864
|
& > div {
|
|
5835
5865
|
border: 1px solid
|
|
5836
5866
|
${({ theme: e, $active: n }) => {
|
|
@@ -5848,57 +5878,57 @@ const nt = {
|
|
|
5848
5878
|
highlightFirst: s,
|
|
5849
5879
|
onMove: d,
|
|
5850
5880
|
locked: l = !1
|
|
5851
|
-
} = e, p =
|
|
5881
|
+
} = e, p = M.useRef(null), u = l ? [p, a] : Ri(a, { group: r }), [c, g] = u, [f, h] = M.useState(
|
|
5852
5882
|
null
|
|
5853
|
-
), x =
|
|
5854
|
-
|
|
5883
|
+
), x = M.useRef(a);
|
|
5884
|
+
M.useEffect(() => {
|
|
5855
5885
|
if (l) return;
|
|
5856
5886
|
const N = (w) => {
|
|
5857
|
-
const
|
|
5858
|
-
h(
|
|
5887
|
+
const R = w.detail ?? null;
|
|
5888
|
+
h(R);
|
|
5859
5889
|
};
|
|
5860
5890
|
return window.addEventListener(Tn, N), () => window.removeEventListener(Tn, N);
|
|
5861
5891
|
}, [l]);
|
|
5862
|
-
const b =
|
|
5892
|
+
const b = M.useCallback((N) => {
|
|
5863
5893
|
l || window.dispatchEvent(
|
|
5864
5894
|
new CustomEvent(Tn, { detail: N })
|
|
5865
5895
|
);
|
|
5866
5896
|
}, [l]), D = (N) => {
|
|
5867
|
-
var
|
|
5897
|
+
var A;
|
|
5868
5898
|
if (l) return;
|
|
5869
|
-
const w = N.target,
|
|
5899
|
+
const w = N.target, R = (A = w == null ? void 0 : w.closest) == null ? void 0 : A.call(w, "li.dnd-item"), L = (R == null ? void 0 : R.getAttribute("data-label")) || null;
|
|
5870
5900
|
L && (h(L), b(L));
|
|
5871
|
-
}, T =
|
|
5901
|
+
}, T = M.useCallback(() => {
|
|
5872
5902
|
l || (h(null), b(null));
|
|
5873
5903
|
}, [b, l]);
|
|
5874
|
-
|
|
5904
|
+
M.useEffect(() => {
|
|
5875
5905
|
if (l) return;
|
|
5876
5906
|
const N = () => T();
|
|
5877
5907
|
return window.addEventListener("pointerup", N), window.addEventListener("blur", N), () => {
|
|
5878
5908
|
window.removeEventListener("pointerup", N), window.removeEventListener("blur", N);
|
|
5879
5909
|
};
|
|
5880
|
-
}, [T, l]),
|
|
5910
|
+
}, [T, l]), M.useEffect(() => {
|
|
5881
5911
|
if (l) return;
|
|
5882
5912
|
const N = x.current;
|
|
5883
5913
|
if (g.length !== N.length && g.length === N.length + 1) {
|
|
5884
|
-
const w = new Set(N),
|
|
5885
|
-
if (
|
|
5914
|
+
const w = new Set(N), R = g.find((L) => !w.has(L)) || null;
|
|
5915
|
+
if (R) {
|
|
5886
5916
|
const L = t === "left" ? "right" : "left";
|
|
5887
|
-
d == null || d({ item:
|
|
5917
|
+
d == null || d({ item: R, from: L, to: t });
|
|
5888
5918
|
}
|
|
5889
5919
|
}
|
|
5890
5920
|
x.current = g;
|
|
5891
5921
|
}, [g, t, d, l]);
|
|
5892
5922
|
const S = g.length === 0;
|
|
5893
5923
|
return /* @__PURE__ */ i(
|
|
5894
|
-
|
|
5924
|
+
_e,
|
|
5895
5925
|
{
|
|
5896
5926
|
legend: o,
|
|
5897
5927
|
width: "100%",
|
|
5898
5928
|
height: "-webkit-fill-available",
|
|
5899
5929
|
spacing: "wide",
|
|
5900
5930
|
children: /* @__PURE__ */ i(
|
|
5901
|
-
|
|
5931
|
+
Fi,
|
|
5902
5932
|
{
|
|
5903
5933
|
ref: c,
|
|
5904
5934
|
onPointerDownCapture: l ? void 0 : D,
|
|
@@ -5909,30 +5939,30 @@ const nt = {
|
|
|
5909
5939
|
"aria-disabled": l,
|
|
5910
5940
|
"data-locked": l || void 0,
|
|
5911
5941
|
children: S ? /* @__PURE__ */ i(
|
|
5912
|
-
|
|
5942
|
+
ie,
|
|
5913
5943
|
{
|
|
5914
5944
|
background: !0,
|
|
5915
5945
|
borderRadius: "8px",
|
|
5916
5946
|
width: "100%",
|
|
5917
5947
|
alignItems: "center",
|
|
5918
5948
|
justifyContent: "center",
|
|
5919
|
-
children: /* @__PURE__ */ i(
|
|
5949
|
+
children: /* @__PURE__ */ i(I, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
|
|
5920
5950
|
}
|
|
5921
5951
|
) : g.map((N, w) => {
|
|
5922
|
-
const
|
|
5952
|
+
const R = !l && f === N;
|
|
5923
5953
|
return /* @__PURE__ */ i(
|
|
5924
|
-
|
|
5954
|
+
Li,
|
|
5925
5955
|
{
|
|
5926
|
-
className: `dnd-item${
|
|
5956
|
+
className: `dnd-item${R ? " is-dragging" : ""}`,
|
|
5927
5957
|
"data-label": N,
|
|
5928
5958
|
"data-first": !!(s && w === 0) || void 0,
|
|
5929
|
-
$active:
|
|
5930
|
-
children: /* @__PURE__ */ i(
|
|
5931
|
-
|
|
5959
|
+
$active: R,
|
|
5960
|
+
children: /* @__PURE__ */ i(ie, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
|
|
5961
|
+
I,
|
|
5932
5962
|
{
|
|
5933
5963
|
type: "title",
|
|
5934
|
-
appearance:
|
|
5935
|
-
weight:
|
|
5964
|
+
appearance: R ? "primary" : "dark",
|
|
5965
|
+
weight: R ? "bold" : "normal",
|
|
5936
5966
|
size: "medium",
|
|
5937
5967
|
padding: "6px 12px",
|
|
5938
5968
|
children: N
|
|
@@ -5946,7 +5976,7 @@ const nt = {
|
|
|
5946
5976
|
)
|
|
5947
5977
|
}
|
|
5948
5978
|
);
|
|
5949
|
-
},
|
|
5979
|
+
}, kl = (e) => {
|
|
5950
5980
|
const { group: n = "clients", left: t, right: r, onMove: o, locked: a = !1 } = e, s = (d) => {
|
|
5951
5981
|
a || o == null || o(d);
|
|
5952
5982
|
};
|
|
@@ -5987,7 +6017,7 @@ const nt = {
|
|
|
5987
6017
|
]
|
|
5988
6018
|
}
|
|
5989
6019
|
);
|
|
5990
|
-
},
|
|
6020
|
+
}, Oi = C.div`
|
|
5991
6021
|
& > button {
|
|
5992
6022
|
height: 66px;
|
|
5993
6023
|
min-width: 66px;
|
|
@@ -6005,7 +6035,7 @@ const nt = {
|
|
|
6005
6035
|
}
|
|
6006
6036
|
}
|
|
6007
6037
|
}
|
|
6008
|
-
`,
|
|
6038
|
+
`, Al = (e) => /* @__PURE__ */ i(Oi, { children: /* @__PURE__ */ i(B, { ...e }) }), Pi = C.div`
|
|
6009
6039
|
display: flex;
|
|
6010
6040
|
justify-content: space-between;
|
|
6011
6041
|
align-items: center;
|
|
@@ -6034,11 +6064,11 @@ const nt = {
|
|
|
6034
6064
|
}
|
|
6035
6065
|
}
|
|
6036
6066
|
}
|
|
6037
|
-
`,
|
|
6067
|
+
`, $l = (e) => {
|
|
6038
6068
|
const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: a } = e;
|
|
6039
|
-
return /* @__PURE__ */ m(
|
|
6069
|
+
return /* @__PURE__ */ m(Pi, { children: [
|
|
6040
6070
|
/* @__PURE__ */ i(
|
|
6041
|
-
|
|
6071
|
+
B,
|
|
6042
6072
|
{
|
|
6043
6073
|
...e,
|
|
6044
6074
|
iconBefore: /* @__PURE__ */ i(jt, {}),
|
|
@@ -6049,10 +6079,10 @@ const nt = {
|
|
|
6049
6079
|
}
|
|
6050
6080
|
),
|
|
6051
6081
|
/* @__PURE__ */ i(
|
|
6052
|
-
|
|
6082
|
+
B,
|
|
6053
6083
|
{
|
|
6054
6084
|
...e,
|
|
6055
|
-
iconBefore: /* @__PURE__ */ i(
|
|
6085
|
+
iconBefore: /* @__PURE__ */ i(Ut, {}),
|
|
6056
6086
|
variant: "none",
|
|
6057
6087
|
onClick: t,
|
|
6058
6088
|
children: a.next,
|
|
@@ -6098,7 +6128,7 @@ const nt = {
|
|
|
6098
6128
|
hover: E.palette.neutral.N30
|
|
6099
6129
|
}
|
|
6100
6130
|
}
|
|
6101
|
-
},
|
|
6131
|
+
}, Mi = C.ul`
|
|
6102
6132
|
display: flex;
|
|
6103
6133
|
flex-direction: column;
|
|
6104
6134
|
padding: 4px 0px;
|
|
@@ -6149,7 +6179,7 @@ const nt = {
|
|
|
6149
6179
|
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
6180
|
}};
|
|
6151
6181
|
}
|
|
6152
|
-
`,
|
|
6182
|
+
`, zi = (e) => {
|
|
6153
6183
|
const { children: n, onOptionClick: t, options: r, maxItems: o } = e, a = (s) => {
|
|
6154
6184
|
try {
|
|
6155
6185
|
if (s.target.closest('input[type="checkbox"]'))
|
|
@@ -6166,7 +6196,7 @@ const nt = {
|
|
|
6166
6196
|
}
|
|
6167
6197
|
};
|
|
6168
6198
|
return /* @__PURE__ */ i(
|
|
6169
|
-
|
|
6199
|
+
Mi,
|
|
6170
6200
|
{
|
|
6171
6201
|
$maxItems: o,
|
|
6172
6202
|
$totalOptions: r == null ? void 0 : r.length,
|
|
@@ -6174,17 +6204,17 @@ const nt = {
|
|
|
6174
6204
|
children: n
|
|
6175
6205
|
}
|
|
6176
6206
|
);
|
|
6177
|
-
},
|
|
6207
|
+
}, Vi = C.div`
|
|
6178
6208
|
cursor: ${({ $disabled: e }) => e && "not-allowed"};
|
|
6179
6209
|
width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
|
|
6180
6210
|
position: relative;
|
|
6181
|
-
`,
|
|
6211
|
+
`, ji = C.div`
|
|
6182
6212
|
display: flex;
|
|
6183
6213
|
align-items: center;
|
|
6184
6214
|
margin-bottom: 4px;
|
|
6185
6215
|
gap: 4px;
|
|
6186
6216
|
pointer-events: ${({ $disabled: e }) => e && "none"};
|
|
6187
|
-
`,
|
|
6217
|
+
`, Ui = C.div`
|
|
6188
6218
|
display: grid;
|
|
6189
6219
|
height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
|
|
6190
6220
|
padding: 8px 16px;
|
|
@@ -6266,23 +6296,23 @@ const nt = {
|
|
|
6266
6296
|
&:-webkit-autofill {
|
|
6267
6297
|
-webkit-background-clip: text;
|
|
6268
6298
|
}
|
|
6269
|
-
`,
|
|
6299
|
+
`, Hi = C.div`
|
|
6270
6300
|
display: flex;
|
|
6271
6301
|
justify-content: flex-end;
|
|
6272
6302
|
transition: ease;
|
|
6273
6303
|
transition-duration: 500ms;
|
|
6274
6304
|
transform: ${({ $displayList: e }) => e ? "rotate(-90deg)" : "rotate(90deg)"};
|
|
6275
|
-
`,
|
|
6305
|
+
`, qi = (e) => e === "compact" ? "medium" : "large";
|
|
6276
6306
|
function rt(e, n) {
|
|
6277
6307
|
const t = e.find((r) => r.value === n);
|
|
6278
6308
|
return t ? t.label : n;
|
|
6279
6309
|
}
|
|
6280
|
-
const
|
|
6310
|
+
const Bi = (e) => {
|
|
6281
6311
|
var o, a;
|
|
6282
6312
|
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
6313
|
return /* @__PURE__ */ m(y, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
|
|
6284
6314
|
/* @__PURE__ */ i(
|
|
6285
|
-
|
|
6315
|
+
U,
|
|
6286
6316
|
{
|
|
6287
6317
|
appearance: r,
|
|
6288
6318
|
icon: /* @__PURE__ */ i(Ht, {}),
|
|
@@ -6290,7 +6320,7 @@ const qi = (e) => {
|
|
|
6290
6320
|
}
|
|
6291
6321
|
),
|
|
6292
6322
|
/* @__PURE__ */ i(
|
|
6293
|
-
|
|
6323
|
+
I,
|
|
6294
6324
|
{
|
|
6295
6325
|
type: "body",
|
|
6296
6326
|
size: "small",
|
|
@@ -6300,7 +6330,7 @@ const qi = (e) => {
|
|
|
6300
6330
|
}
|
|
6301
6331
|
)
|
|
6302
6332
|
] });
|
|
6303
|
-
},
|
|
6333
|
+
}, Gi = Qt((e, n) => {
|
|
6304
6334
|
var me, le;
|
|
6305
6335
|
const {
|
|
6306
6336
|
displayList: t,
|
|
@@ -6323,25 +6353,25 @@ const qi = (e) => {
|
|
|
6323
6353
|
checkedItems: S,
|
|
6324
6354
|
editable: N = !1,
|
|
6325
6355
|
clearable: w,
|
|
6326
|
-
onKeyUp:
|
|
6356
|
+
onKeyUp: R,
|
|
6327
6357
|
onBlur: L,
|
|
6328
|
-
onChange:
|
|
6329
|
-
onClick:
|
|
6330
|
-
onFocus:
|
|
6358
|
+
onChange: A,
|
|
6359
|
+
onClick: V,
|
|
6360
|
+
onFocus: Z,
|
|
6331
6361
|
onOptionClick: be,
|
|
6332
6362
|
onCheckboxChange: ve,
|
|
6333
|
-
handleClear:
|
|
6334
|
-
} = e,
|
|
6335
|
-
() => g.filter((
|
|
6363
|
+
handleClear: fe
|
|
6364
|
+
} = 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(
|
|
6365
|
+
() => g.filter((j) => S.includes(j.id)),
|
|
6336
6366
|
[g, S]
|
|
6337
|
-
),
|
|
6338
|
-
|
|
6339
|
-
target: { checked: !1, value:
|
|
6367
|
+
), Te = (j, k) => {
|
|
6368
|
+
j.stopPropagation(), ve({
|
|
6369
|
+
target: { checked: !1, value: k }
|
|
6340
6370
|
});
|
|
6341
6371
|
};
|
|
6342
|
-
return /* @__PURE__ */ m(
|
|
6372
|
+
return /* @__PURE__ */ m(Vi, { $fullwidth: a, $disabled: r, ref: n, children: [
|
|
6343
6373
|
l && /* @__PURE__ */ m(
|
|
6344
|
-
|
|
6374
|
+
ji,
|
|
6345
6375
|
{
|
|
6346
6376
|
$alignItems: "center",
|
|
6347
6377
|
$disabled: r,
|
|
@@ -6354,22 +6384,22 @@ const qi = (e) => {
|
|
|
6354
6384
|
focused: o,
|
|
6355
6385
|
invalid: d,
|
|
6356
6386
|
margin: "0px 0px 0px 16px",
|
|
6357
|
-
size:
|
|
6387
|
+
size: qi(x),
|
|
6358
6388
|
disabled: r,
|
|
6359
6389
|
children: l
|
|
6360
6390
|
}
|
|
6361
6391
|
),
|
|
6362
|
-
|
|
6392
|
+
Ne && /* @__PURE__ */ i(I, { appearance: ye, size: "small", type: "body", children: "(Requerido)" })
|
|
6363
6393
|
]
|
|
6364
6394
|
}
|
|
6365
6395
|
),
|
|
6366
6396
|
/* @__PURE__ */ m(
|
|
6367
|
-
|
|
6397
|
+
Ui,
|
|
6368
6398
|
{
|
|
6369
6399
|
$disabled: r,
|
|
6370
6400
|
$focused: o,
|
|
6371
6401
|
$invalid: d,
|
|
6372
|
-
onClick: N ? void 0 :
|
|
6402
|
+
onClick: N ? void 0 : V,
|
|
6373
6403
|
$value: b,
|
|
6374
6404
|
$size: x,
|
|
6375
6405
|
children: [
|
|
@@ -6378,7 +6408,7 @@ const qi = (e) => {
|
|
|
6378
6408
|
{
|
|
6379
6409
|
$inputWithData: !!b,
|
|
6380
6410
|
autoComplete: "off",
|
|
6381
|
-
value:
|
|
6411
|
+
value: ue,
|
|
6382
6412
|
name: c,
|
|
6383
6413
|
id: s,
|
|
6384
6414
|
placeholder: f,
|
|
@@ -6388,11 +6418,11 @@ const qi = (e) => {
|
|
|
6388
6418
|
$fullwidth: a,
|
|
6389
6419
|
$focused: o,
|
|
6390
6420
|
readOnly: !N,
|
|
6391
|
-
onFocus:
|
|
6421
|
+
onFocus: Z,
|
|
6392
6422
|
onBlur: L,
|
|
6393
|
-
onChange: (
|
|
6394
|
-
onClick: N ?
|
|
6395
|
-
onKeyUp:
|
|
6423
|
+
onChange: (j) => A(c, j.target.value),
|
|
6424
|
+
onClick: N ? V : void 0,
|
|
6425
|
+
onKeyUp: R
|
|
6396
6426
|
}
|
|
6397
6427
|
),
|
|
6398
6428
|
/* @__PURE__ */ m(
|
|
@@ -6403,33 +6433,33 @@ const qi = (e) => {
|
|
|
6403
6433
|
alignItems: "center",
|
|
6404
6434
|
justifyContent: "space-between",
|
|
6405
6435
|
children: [
|
|
6406
|
-
/* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: w && !r && (D ? xe.map((
|
|
6407
|
-
|
|
6436
|
+
/* @__PURE__ */ i(y, { gap: "8px", alignItems: "center", wrap: "wrap", children: w && !r && (D ? xe.map((j) => /* @__PURE__ */ i(
|
|
6437
|
+
ke,
|
|
6408
6438
|
{
|
|
6409
6439
|
appearance: "gray",
|
|
6410
|
-
label:
|
|
6440
|
+
label: j.label,
|
|
6411
6441
|
removable: !0,
|
|
6412
6442
|
displayIcon: !1,
|
|
6413
|
-
onClose: (
|
|
6443
|
+
onClose: (k) => Te(k, j.id)
|
|
6414
6444
|
},
|
|
6415
|
-
|
|
6445
|
+
j.id
|
|
6416
6446
|
)) : (b ?? "") !== "" && /* @__PURE__ */ i(
|
|
6417
|
-
|
|
6447
|
+
ke,
|
|
6418
6448
|
{
|
|
6419
6449
|
appearance: "gray",
|
|
6420
6450
|
label: rt(g, b),
|
|
6421
6451
|
removable: !0,
|
|
6422
6452
|
displayIcon: !1,
|
|
6423
|
-
onClose: (
|
|
6424
|
-
|
|
6453
|
+
onClose: (j) => {
|
|
6454
|
+
j.stopPropagation(), fe();
|
|
6425
6455
|
}
|
|
6426
6456
|
}
|
|
6427
6457
|
)) }),
|
|
6428
|
-
T && /* @__PURE__ */ i(
|
|
6429
|
-
|
|
6458
|
+
T && /* @__PURE__ */ i(Hi, { $displayList: t, children: /* @__PURE__ */ i(
|
|
6459
|
+
U,
|
|
6430
6460
|
{
|
|
6431
6461
|
appearance: "dark",
|
|
6432
|
-
icon: /* @__PURE__ */ i(
|
|
6462
|
+
icon: /* @__PURE__ */ i(_t, {}),
|
|
6433
6463
|
spacing: "narrow",
|
|
6434
6464
|
disabled: r
|
|
6435
6465
|
}
|
|
@@ -6440,28 +6470,28 @@ const qi = (e) => {
|
|
|
6440
6470
|
]
|
|
6441
6471
|
}
|
|
6442
6472
|
),
|
|
6443
|
-
d && /* @__PURE__ */ i(
|
|
6473
|
+
d && /* @__PURE__ */ i(Bi, { message: u }),
|
|
6444
6474
|
t && !r && /* @__PURE__ */ i(
|
|
6445
|
-
|
|
6475
|
+
zi,
|
|
6446
6476
|
{
|
|
6447
6477
|
maxItems: p,
|
|
6448
6478
|
onOptionClick: be,
|
|
6449
6479
|
options: g,
|
|
6450
|
-
children: g.map((
|
|
6480
|
+
children: g.map((j) => /* @__PURE__ */ i(
|
|
6451
6481
|
Xt,
|
|
6452
6482
|
{
|
|
6453
|
-
id:
|
|
6454
|
-
label:
|
|
6455
|
-
checked: S.includes(
|
|
6483
|
+
id: j.id,
|
|
6484
|
+
label: j.label,
|
|
6485
|
+
checked: S.includes(j.id),
|
|
6456
6486
|
onCheckboxChange: ve,
|
|
6457
6487
|
picker: D
|
|
6458
6488
|
},
|
|
6459
|
-
|
|
6489
|
+
j.id
|
|
6460
6490
|
))
|
|
6461
6491
|
}
|
|
6462
6492
|
)
|
|
6463
6493
|
] });
|
|
6464
|
-
}),
|
|
6494
|
+
}), Yi = (e) => {
|
|
6465
6495
|
const {
|
|
6466
6496
|
disabled: n = !1,
|
|
6467
6497
|
fullwidth: t = !1,
|
|
@@ -6484,72 +6514,72 @@ const qi = (e) => {
|
|
|
6484
6514
|
showOptions: S = !1,
|
|
6485
6515
|
picker: N = !1,
|
|
6486
6516
|
showChevron: w = !0,
|
|
6487
|
-
editable:
|
|
6517
|
+
editable: R = !1,
|
|
6488
6518
|
clearable: L = !0
|
|
6489
|
-
} = e, [
|
|
6490
|
-
|
|
6519
|
+
} = e, [A, V] = _(!1), [Z, be] = _(!1), [ve, fe] = _([]), ae = Fe(null);
|
|
6520
|
+
$e(() => {
|
|
6491
6521
|
if (N) {
|
|
6492
|
-
const
|
|
6493
|
-
|
|
6522
|
+
const k = T ? T.split(",").map((O) => O.trim()) : [];
|
|
6523
|
+
fe(k);
|
|
6494
6524
|
}
|
|
6495
6525
|
}, [T, N]);
|
|
6496
6526
|
function ye() {
|
|
6497
|
-
u(l, ""),
|
|
6527
|
+
u(l, ""), fe([]), V(!1);
|
|
6498
6528
|
}
|
|
6499
|
-
function
|
|
6529
|
+
function Ne(k) {
|
|
6500
6530
|
if (!n) {
|
|
6501
|
-
|
|
6531
|
+
V(!A);
|
|
6502
6532
|
try {
|
|
6503
|
-
c && c(
|
|
6504
|
-
} catch (
|
|
6505
|
-
console.error(`Error when clicking over select. ${
|
|
6533
|
+
c && c(k);
|
|
6534
|
+
} catch (O) {
|
|
6535
|
+
console.error(`Error when clicking over select. ${O}`);
|
|
6506
6536
|
}
|
|
6507
6537
|
}
|
|
6508
6538
|
}
|
|
6509
|
-
const
|
|
6510
|
-
|
|
6539
|
+
const ue = Zt((k) => {
|
|
6540
|
+
ae.current && k.target && !ae.current.contains(k.target) && V(!1);
|
|
6511
6541
|
}, []);
|
|
6512
|
-
function xe(
|
|
6542
|
+
function xe(k) {
|
|
6513
6543
|
try {
|
|
6514
|
-
|
|
6515
|
-
} catch (
|
|
6516
|
-
console.error(`Error executing focus/blur callback. ${
|
|
6544
|
+
k.type === "focus" && (be(!0), g && g(k)), k.type === "blur" && (be(!1), p && p(k));
|
|
6545
|
+
} catch (O) {
|
|
6546
|
+
console.error(`Error executing focus/blur callback. ${O}`);
|
|
6517
6547
|
}
|
|
6518
6548
|
}
|
|
6519
|
-
function
|
|
6520
|
-
|
|
6549
|
+
function Te(k) {
|
|
6550
|
+
V(!1);
|
|
6521
6551
|
try {
|
|
6522
|
-
u && u(l,
|
|
6523
|
-
} catch (
|
|
6524
|
-
console.error(`Error when changing value using callback. ${
|
|
6552
|
+
u && u(l, k);
|
|
6553
|
+
} catch (O) {
|
|
6554
|
+
console.error(`Error when changing value using callback. ${O}`);
|
|
6525
6555
|
}
|
|
6526
6556
|
}
|
|
6527
|
-
function me(
|
|
6528
|
-
|
|
6557
|
+
function me(k) {
|
|
6558
|
+
k.key === "Escape" && V(!1), V(!A);
|
|
6529
6559
|
try {
|
|
6530
|
-
f && f(
|
|
6531
|
-
} catch (
|
|
6532
|
-
console.error(`Error when clicking over select. ${
|
|
6560
|
+
f && f(k);
|
|
6561
|
+
} catch (O) {
|
|
6562
|
+
console.error(`Error when clicking over select. ${O}`);
|
|
6533
6563
|
}
|
|
6534
6564
|
}
|
|
6535
|
-
function le(
|
|
6536
|
-
const { value:
|
|
6537
|
-
|
|
6538
|
-
const
|
|
6539
|
-
return u(l,
|
|
6565
|
+
function le(k) {
|
|
6566
|
+
const { value: O, checked: pe } = k.target;
|
|
6567
|
+
fe((P) => {
|
|
6568
|
+
const F = pe ? [...P, O] : P.filter((q) => q !== O);
|
|
6569
|
+
return u(l, F.join(",")), F;
|
|
6540
6570
|
});
|
|
6541
6571
|
}
|
|
6542
|
-
|
|
6543
|
-
document.removeEventListener("click",
|
|
6544
|
-
}), [
|
|
6545
|
-
const
|
|
6572
|
+
$e(() => (document.addEventListener("click", ue), () => {
|
|
6573
|
+
document.removeEventListener("click", ue);
|
|
6574
|
+
}), [ue]);
|
|
6575
|
+
const j = dt(() => L || N ? h : [{ id: "empty-option", label: "", value: "" }, ...h], [h, L, N]);
|
|
6546
6576
|
return /* @__PURE__ */ i(
|
|
6547
|
-
|
|
6577
|
+
Gi,
|
|
6548
6578
|
{
|
|
6549
|
-
ref:
|
|
6579
|
+
ref: ae,
|
|
6550
6580
|
disabled: n,
|
|
6551
|
-
displayList:
|
|
6552
|
-
focused:
|
|
6581
|
+
displayList: A || S,
|
|
6582
|
+
focused: Z,
|
|
6553
6583
|
fullwidth: t,
|
|
6554
6584
|
id: r,
|
|
6555
6585
|
invalid: o,
|
|
@@ -6557,7 +6587,7 @@ const qi = (e) => {
|
|
|
6557
6587
|
maxItems: s,
|
|
6558
6588
|
message: d,
|
|
6559
6589
|
name: l,
|
|
6560
|
-
options:
|
|
6590
|
+
options: j,
|
|
6561
6591
|
placeholder: x,
|
|
6562
6592
|
required: b,
|
|
6563
6593
|
size: D,
|
|
@@ -6565,19 +6595,19 @@ const qi = (e) => {
|
|
|
6565
6595
|
picker: N,
|
|
6566
6596
|
showChevron: w,
|
|
6567
6597
|
checkedItems: ve,
|
|
6568
|
-
editable:
|
|
6598
|
+
editable: R,
|
|
6569
6599
|
clearable: L,
|
|
6570
6600
|
handleClear: ye,
|
|
6571
6601
|
onBlur: xe,
|
|
6572
6602
|
onChange: u,
|
|
6573
|
-
onClick:
|
|
6603
|
+
onClick: Ne,
|
|
6574
6604
|
onFocus: xe,
|
|
6575
|
-
onOptionClick:
|
|
6605
|
+
onOptionClick: Te,
|
|
6576
6606
|
onKeyUp: me,
|
|
6577
6607
|
onCheckboxChange: le
|
|
6578
6608
|
}
|
|
6579
6609
|
);
|
|
6580
|
-
},
|
|
6610
|
+
}, Il = (e) => {
|
|
6581
6611
|
const {
|
|
6582
6612
|
disabled: n = !1,
|
|
6583
6613
|
fullwidth: t = !1,
|
|
@@ -6595,7 +6625,7 @@ const qi = (e) => {
|
|
|
6595
6625
|
values: h
|
|
6596
6626
|
} = e;
|
|
6597
6627
|
return /* @__PURE__ */ i(
|
|
6598
|
-
|
|
6628
|
+
Yi,
|
|
6599
6629
|
{
|
|
6600
6630
|
disabled: n,
|
|
6601
6631
|
fullwidth: t,
|
|
@@ -6614,30 +6644,30 @@ const qi = (e) => {
|
|
|
6614
6644
|
picker: !0
|
|
6615
6645
|
}
|
|
6616
6646
|
);
|
|
6617
|
-
},
|
|
6618
|
-
const t =
|
|
6647
|
+
}, Rl = (e) => Object.values(e).flat(), Fl = (e, n) => {
|
|
6648
|
+
const t = Me(e);
|
|
6619
6649
|
return Object.fromEntries(
|
|
6620
6650
|
Object.entries(t).map(([r, o]) => [r, o.map(n)])
|
|
6621
6651
|
);
|
|
6622
|
-
},
|
|
6652
|
+
}, Wi = (e) => Object.entries(e).map(([n, t]) => ({
|
|
6623
6653
|
ConditionGroupId: n,
|
|
6624
6654
|
conditionsThatEstablishesTheDecision: rn(t)
|
|
6625
|
-
})),
|
|
6626
|
-
const n =
|
|
6655
|
+
})), Ll = (e) => {
|
|
6656
|
+
const n = Me(e), t = {
|
|
6627
6657
|
...e,
|
|
6628
|
-
conditionGroups:
|
|
6658
|
+
conditionGroups: Wi(n)
|
|
6629
6659
|
};
|
|
6630
6660
|
return delete t.conditionsThatEstablishesTheDecision, t;
|
|
6631
|
-
},
|
|
6661
|
+
}, Ue = /* @__PURE__ */ new Map(), Xi = (e, n) => Ue.get(`${n}:${e}`), Qi = (e, n, t) => {
|
|
6632
6662
|
const r = `${n}:${e}`;
|
|
6633
|
-
if (
|
|
6634
|
-
const o =
|
|
6635
|
-
o !== void 0 &&
|
|
6663
|
+
if (Ue.set(r, t), Ue.size > 1e3) {
|
|
6664
|
+
const o = Ue.keys().next().value;
|
|
6665
|
+
o !== void 0 && Ue.delete(o);
|
|
6636
6666
|
}
|
|
6637
|
-
}, ot = /* @__PURE__ */ new Map(),
|
|
6667
|
+
}, ot = /* @__PURE__ */ new Map(), Zi = 1e3, Ki = (e) => {
|
|
6638
6668
|
const n = Date.now(), t = ot.get(e) || 0;
|
|
6639
|
-
return n - t <
|
|
6640
|
-
},
|
|
6669
|
+
return n - t < Zi ? !0 : (ot.set(e, n), !1);
|
|
6670
|
+
}, Ji = (e) => {
|
|
6641
6671
|
const n = er(e);
|
|
6642
6672
|
return {
|
|
6643
6673
|
spa: "es",
|
|
@@ -6647,12 +6677,12 @@ const qi = (e) => {
|
|
|
6647
6677
|
ita: "it",
|
|
6648
6678
|
por: "pt"
|
|
6649
6679
|
}[n] || "en";
|
|
6650
|
-
},
|
|
6651
|
-
const o = `${n}:${e}`, a =
|
|
6680
|
+
}, el = async (e, n, { url: t, apiKey: r }) => {
|
|
6681
|
+
const o = `${n}:${e}`, a = Xi(e, n);
|
|
6652
6682
|
if (a) return a;
|
|
6653
6683
|
if (Ki(o))
|
|
6654
6684
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
6655
|
-
const s =
|
|
6685
|
+
const s = Ji(e);
|
|
6656
6686
|
try {
|
|
6657
6687
|
const { data: d } = await Jt.post(
|
|
6658
6688
|
t,
|
|
@@ -6668,15 +6698,15 @@ const qi = (e) => {
|
|
|
6668
6698
|
}
|
|
6669
6699
|
}
|
|
6670
6700
|
), l = (d == null ? void 0 : d.translatedText) || e;
|
|
6671
|
-
return
|
|
6701
|
+
return Qi(e, n, l), l;
|
|
6672
6702
|
} catch (d) {
|
|
6673
6703
|
return console.warn(`[Translation] Failed for: "${e}"`, d), e;
|
|
6674
6704
|
}
|
|
6675
|
-
},
|
|
6705
|
+
}, nl = (e) => typeof e == "string" && e.trim().length > 0, at = async (e, n, t) => {
|
|
6676
6706
|
const r = await Promise.all(
|
|
6677
6707
|
Object.entries(e).map(async ([o, a]) => {
|
|
6678
|
-
if (
|
|
6679
|
-
const s = await
|
|
6708
|
+
if (nl(a)) {
|
|
6709
|
+
const s = await el(a, n, t);
|
|
6680
6710
|
return [o, s];
|
|
6681
6711
|
} else if (Array.isArray(a)) {
|
|
6682
6712
|
const s = await Promise.all(
|
|
@@ -6695,40 +6725,40 @@ const qi = (e) => {
|
|
|
6695
6725
|
return Object.fromEntries(r);
|
|
6696
6726
|
};
|
|
6697
6727
|
export {
|
|
6698
|
-
|
|
6728
|
+
$l as BackAndNextButton,
|
|
6699
6729
|
Qe as BusinessRuleCard,
|
|
6700
6730
|
gt as BusinessRuleCardNew,
|
|
6701
6731
|
Ln as BusinessRuleView,
|
|
6702
6732
|
ft as BusinessRuleViewNew,
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6733
|
+
fl as BusinessRules,
|
|
6734
|
+
bl as BusinessRulesNew,
|
|
6735
|
+
ml as BusinessRulesWithGroup,
|
|
6736
|
+
Il as Checkpicker,
|
|
6737
|
+
kl as DragAndDropBoxes,
|
|
6708
6738
|
tt as DraggableList,
|
|
6709
|
-
|
|
6710
|
-
|
|
6739
|
+
Aa as DropdownMenu,
|
|
6740
|
+
Nl as DropdownMenuContainer,
|
|
6711
6741
|
se as EValueHowToSetUp,
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6742
|
+
vl as Filter,
|
|
6743
|
+
yl as FilterModal,
|
|
6744
|
+
xl as FormFilter,
|
|
6715
6745
|
ut as ModalRules,
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6746
|
+
wa as RulesForm,
|
|
6747
|
+
Al as SendButton,
|
|
6748
|
+
Ho as buildEsConditionSentence,
|
|
6749
|
+
ca as convertRangeToString,
|
|
6720
6750
|
ht as filterByGroup,
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6751
|
+
Rl as flatFromGroups,
|
|
6752
|
+
Tl as formatDecisionForBackend,
|
|
6753
|
+
Me as getConditionsByGroupNew,
|
|
6754
|
+
Wi as groupsRecordToArrayNew,
|
|
6755
|
+
Fl as mapByGroupNew,
|
|
6756
|
+
Ll as normalizeDecisionToNewShape,
|
|
6757
|
+
wl as parseRangeFromString,
|
|
6758
|
+
Cl as revertSortedDataSampleSwitchPlaces,
|
|
6759
|
+
Dl as revertSortedDataSwitchPlaces,
|
|
6760
|
+
Sl as sortDisplayDataSampleSwitchPlaces,
|
|
6761
|
+
El as sortDisplayDataSwitchPlaces,
|
|
6732
6762
|
at as translateObject,
|
|
6733
|
-
|
|
6763
|
+
el as translateText
|
|
6734
6764
|
};
|