@isettingkit/business-rules 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.d.ts +1 -0
- package/dist/index.es.js +306 -305
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import { MdOutlineDelete as ft, MdClear as Gt, MdAdd as
|
|
3
|
-
import { inube as $, Stack as T, Divider as Y, Icon as B, Text as
|
|
2
|
+
import { MdOutlineDelete as ft, MdClear as Gt, MdAdd as Qe, MdOutlineCreate as zn, MdExpandLess as Hn, MdExpandMore as Lt, MdInfo as Gn, MdCached as Bn, MdOutlineInfo as qn, MdClose as Wn, MdOutlineFilterAltOff as Yn, MdOutlineFilterAlt as Tn, MdChevronRight as Kt, MdArrowRight as Xn, MdOutlineArrowCircleLeft as Qn, MdOutlineArrowCircleRight as Jn } from "react-icons/md";
|
|
3
|
+
import { inube as $, Stack as T, Divider as Y, Icon as B, Text as F, SkeletonLine as re, useMediaQuery as ue, Blanket as Bt, Button as Q, Grid as Je, Toggle as mt, Checkbox as qt, Date as $e, Box as Zn, Tag as Ue, Tabs as xn, SkeletonIcon as Kn, Fieldset as ze, OptionList as eo, Checkpicker as to } from "@inubekit/inubekit";
|
|
4
4
|
import S, { keyframes as Wt, ThemeContext as no } from "styled-components";
|
|
5
5
|
import { ValueDataType as H, ValueHowToSetUp as G, DecisionConditionRender as ut, DecisionConditionRenderNew as en } from "@isettingkit/input";
|
|
6
|
-
import { DecisionViewConditionRenderer as
|
|
6
|
+
import { DecisionViewConditionRenderer as Ae, DecisionViewConditionRendererNew as it } from "@isettingkit/view";
|
|
7
7
|
import { createPortal as Yt } from "react-dom";
|
|
8
8
|
import { useFormik as Xt } from "formik";
|
|
9
|
-
import { string as pe, mixed as
|
|
10
|
-
import _, { useState as q, useRef as
|
|
9
|
+
import { string as pe, mixed as Le, object as te, number as he, lazy as We, date as Fe } from "yup";
|
|
10
|
+
import _, { useState as q, useRef as He, useEffect as Ye, useContext as oo } from "react";
|
|
11
11
|
import { Link as Dn, useLocation as ro } from "react-router-dom";
|
|
12
12
|
import io from "axios";
|
|
13
13
|
import { franc as ao } from "franc-min";
|
|
@@ -46,7 +46,7 @@ S.div`
|
|
|
46
46
|
border-radius: 8px;
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
|
-
const
|
|
49
|
+
const Ze = (e) => {
|
|
50
50
|
const { children: t, controls: n = !0, handleDelete: o, id: r } = e;
|
|
51
51
|
return /* @__PURE__ */ a(lo, { children: /* @__PURE__ */ m(T, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
52
52
|
t,
|
|
@@ -78,7 +78,7 @@ const mo = {
|
|
|
78
78
|
[k.GREATER_THAN]: ho,
|
|
79
79
|
[k.LESS_THAN]: go,
|
|
80
80
|
[k.EQUAL]: fo
|
|
81
|
-
},
|
|
81
|
+
}, Ge = (e) => {
|
|
82
82
|
const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), o = mo[e == null ? void 0 : e.howToSetTheDecision] || so;
|
|
83
83
|
return n && o(t) || t || void 0;
|
|
84
84
|
}, tn = S.div`
|
|
@@ -122,10 +122,10 @@ const mo = {
|
|
|
122
122
|
} = e;
|
|
123
123
|
return i ? /* @__PURE__ */ m(T, { direction: "column", gap: "12px", children: [
|
|
124
124
|
/* @__PURE__ */ a(T, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
|
|
125
|
-
|
|
125
|
+
Ae,
|
|
126
126
|
{
|
|
127
127
|
element: r,
|
|
128
|
-
valueData:
|
|
128
|
+
valueData: Ge(
|
|
129
129
|
r
|
|
130
130
|
),
|
|
131
131
|
type: "decision"
|
|
@@ -141,7 +141,7 @@ const mo = {
|
|
|
141
141
|
height: "203px",
|
|
142
142
|
children: [
|
|
143
143
|
u.length > 0 && /* @__PURE__ */ a(
|
|
144
|
-
|
|
144
|
+
F,
|
|
145
145
|
{
|
|
146
146
|
type: "label",
|
|
147
147
|
size: "large",
|
|
@@ -152,17 +152,17 @@ const mo = {
|
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
154
|
u.length > 0 && u.map((p) => /* @__PURE__ */ a(tn, { children: /* @__PURE__ */ a(T, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
|
|
155
|
-
|
|
155
|
+
Ae,
|
|
156
156
|
{
|
|
157
157
|
element: { ...p, value: p.value },
|
|
158
|
-
valueData:
|
|
158
|
+
valueData: Ge(
|
|
159
159
|
p
|
|
160
160
|
)
|
|
161
161
|
}
|
|
162
162
|
) }) }, p.conditionName)),
|
|
163
163
|
u.length > 0 && /* @__PURE__ */ a(Y, { dashed: !0 }),
|
|
164
164
|
d && /* @__PURE__ */ a(j, { children: o && /* @__PURE__ */ a(
|
|
165
|
-
|
|
165
|
+
Ae,
|
|
166
166
|
{
|
|
167
167
|
element: o.element,
|
|
168
168
|
valueData: o.valueData,
|
|
@@ -175,12 +175,12 @@ const mo = {
|
|
|
175
175
|
) })
|
|
176
176
|
] }) : /* @__PURE__ */ m(T, { direction: "column", gap: "12px", children: [
|
|
177
177
|
/* @__PURE__ */ m(T, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
178
|
-
/* @__PURE__ */ a(
|
|
179
|
-
/* @__PURE__ */ a(
|
|
178
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "180px" }),
|
|
179
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "85px" })
|
|
180
180
|
] }, "loading"),
|
|
181
181
|
/* @__PURE__ */ m(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
182
182
|
/* @__PURE__ */ a(Y, { dashed: !0 }),
|
|
183
|
-
/* @__PURE__ */ a(
|
|
183
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "150px" })
|
|
184
184
|
] }),
|
|
185
185
|
/* @__PURE__ */ a(nn, { children: /* @__PURE__ */ a(
|
|
186
186
|
T,
|
|
@@ -197,8 +197,8 @@ const mo = {
|
|
|
197
197
|
alignItems: "start",
|
|
198
198
|
padding: "8px",
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */ a(
|
|
201
|
-
/* @__PURE__ */ a(
|
|
200
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "180px" }),
|
|
201
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "85px" })
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
204
|
) }, `condition-${c}`))
|
|
@@ -214,7 +214,7 @@ const mo = {
|
|
|
214
214
|
howToSetTheDecision: G.RANGE,
|
|
215
215
|
decisionDataType: H.DATE
|
|
216
216
|
},
|
|
217
|
-
valueData:
|
|
217
|
+
valueData: Ge({
|
|
218
218
|
labelName: o == null ? void 0 : o.terms,
|
|
219
219
|
value: {
|
|
220
220
|
from: String(t.effectiveFrom),
|
|
@@ -230,7 +230,7 @@ const mo = {
|
|
|
230
230
|
howToSetTheDecision: G.EQUAL,
|
|
231
231
|
decisionDataType: H.DATE
|
|
232
232
|
},
|
|
233
|
-
valueData:
|
|
233
|
+
valueData: Ge({
|
|
234
234
|
labelName: o == null ? void 0 : o.terms,
|
|
235
235
|
value: String(t.effectiveFrom),
|
|
236
236
|
howToSetTheDecision: G.EQUAL,
|
|
@@ -239,7 +239,7 @@ const mo = {
|
|
|
239
239
|
} : null, d = t ? {
|
|
240
240
|
labelName: t.labelName || "",
|
|
241
241
|
decisionDataType: t.decisionDataType || "alphabetical",
|
|
242
|
-
value:
|
|
242
|
+
value: Ge(t),
|
|
243
243
|
howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
|
|
244
244
|
} : null, l = ((h = t == null ? void 0 : t.conditionsThatEstablishesTheDecision) == null ? void 0 : h.filter(
|
|
245
245
|
(g) => !g.hidden
|
|
@@ -304,7 +304,7 @@ const mo = {
|
|
|
304
304
|
return Yt(
|
|
305
305
|
/* @__PURE__ */ a(vo, { smallScreen: s, children: /* @__PURE__ */ a(Bt, { children: /* @__PURE__ */ a(yo, { children: /* @__PURE__ */ m(T, { direction: "column", gap: "24px", children: [
|
|
306
306
|
/* @__PURE__ */ a(T, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(T, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
|
-
/* @__PURE__ */ a(
|
|
307
|
+
/* @__PURE__ */ a(F, { type: "title", size: "large", appearance: "dark", weight: "bold", children: r }),
|
|
308
308
|
/* @__PURE__ */ a(Gt, { size: "24px", cursor: "pointer", onClick: o })
|
|
309
309
|
] }) }),
|
|
310
310
|
t
|
|
@@ -358,7 +358,7 @@ const Cn = S.div`
|
|
|
358
358
|
height: 100%;
|
|
359
359
|
padding-bottom: 12px;
|
|
360
360
|
cursor: pointer;
|
|
361
|
-
`,
|
|
361
|
+
`, Ke = S.div`
|
|
362
362
|
width: 100%;
|
|
363
363
|
height: 100%;
|
|
364
364
|
& > div {
|
|
@@ -392,7 +392,7 @@ const Cn = S.div`
|
|
|
392
392
|
`, wo = (e) => {
|
|
393
393
|
const { index: t, handleOpenModal: n } = e;
|
|
394
394
|
return /* @__PURE__ */ a(
|
|
395
|
-
|
|
395
|
+
Ze,
|
|
396
396
|
{
|
|
397
397
|
id: `loading-card-${t}`,
|
|
398
398
|
handleDelete: () => {
|
|
@@ -405,10 +405,10 @@ const Cn = S.div`
|
|
|
405
405
|
);
|
|
406
406
|
}, Co = (e) => {
|
|
407
407
|
const { decision: t, controls: n, handleOpenModal: o, handleDelete: r, textValues: i } = e;
|
|
408
|
-
return t ? /* @__PURE__ */ a(
|
|
409
|
-
/* @__PURE__ */ a(
|
|
408
|
+
return t ? /* @__PURE__ */ a(Ke, { children: /* @__PURE__ */ m(T, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
409
|
+
/* @__PURE__ */ a(F, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
|
|
410
410
|
/* @__PURE__ */ a(
|
|
411
|
-
|
|
411
|
+
Ze,
|
|
412
412
|
{
|
|
413
413
|
id: t.decisionId,
|
|
414
414
|
handleDelete: () => r ? r(t.decisionId) : null,
|
|
@@ -425,14 +425,14 @@ const Cn = S.div`
|
|
|
425
425
|
handleOpenModal: o,
|
|
426
426
|
shouldRenderEmptyMessage: r
|
|
427
427
|
} = e, i = t || "Agregar decisión";
|
|
428
|
-
return /* @__PURE__ */ a(
|
|
429
|
-
/* @__PURE__ */ a(
|
|
428
|
+
return /* @__PURE__ */ a(Ke, { children: r ? null : /* @__PURE__ */ m(T, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
429
|
+
/* @__PURE__ */ a(F, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
430
430
|
/* @__PURE__ */ a(
|
|
431
431
|
Cn,
|
|
432
432
|
{
|
|
433
433
|
onClick: () => o ? o() : null,
|
|
434
434
|
children: /* @__PURE__ */ a(
|
|
435
|
-
|
|
435
|
+
Ze,
|
|
436
436
|
{
|
|
437
437
|
id: `add-decision-${n}`,
|
|
438
438
|
handleDelete: () => {
|
|
@@ -440,8 +440,8 @@ const Cn = S.div`
|
|
|
440
440
|
handleView: () => o ? o() : null,
|
|
441
441
|
controls: !1,
|
|
442
442
|
children: /* @__PURE__ */ m(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
443
|
-
/* @__PURE__ */ a(B, { appearance: "gray", icon: /* @__PURE__ */ a(
|
|
444
|
-
/* @__PURE__ */ a(
|
|
443
|
+
/* @__PURE__ */ a(B, { appearance: "gray", icon: /* @__PURE__ */ a(Qe, {}), size: "35px" }),
|
|
444
|
+
/* @__PURE__ */ a(F, { appearance: "gray", type: "body", size: "large", children: i })
|
|
445
445
|
] })
|
|
446
446
|
}
|
|
447
447
|
)
|
|
@@ -524,10 +524,10 @@ const Cn = S.div`
|
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ a(
|
|
527
|
+
/* @__PURE__ */ a(F, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ m(j, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
529
|
/* @__PURE__ */ m(
|
|
530
|
-
|
|
530
|
+
F,
|
|
531
531
|
{
|
|
532
532
|
as: "span",
|
|
533
533
|
type: "label",
|
|
@@ -546,7 +546,7 @@ const Cn = S.div`
|
|
|
546
546
|
/* @__PURE__ */ a(
|
|
547
547
|
Q,
|
|
548
548
|
{
|
|
549
|
-
iconBefore: /* @__PURE__ */ a(
|
|
549
|
+
iconBefore: /* @__PURE__ */ a(Qe, {}),
|
|
550
550
|
onClick: () => p ? p() : null,
|
|
551
551
|
children: n || "Agregar decisión"
|
|
552
552
|
}
|
|
@@ -554,7 +554,7 @@ const Cn = S.div`
|
|
|
554
554
|
]
|
|
555
555
|
}
|
|
556
556
|
) : /* @__PURE__ */ m(
|
|
557
|
-
|
|
557
|
+
Je,
|
|
558
558
|
{
|
|
559
559
|
templateColumns: v ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
560
560
|
autoFlow: "row dense",
|
|
@@ -648,7 +648,7 @@ const Cn = S.div`
|
|
|
648
648
|
return Yt(
|
|
649
649
|
/* @__PURE__ */ a(ko, { $smallScreen: s, children: /* @__PURE__ */ a(Bt, { children: /* @__PURE__ */ a(Ao, { children: /* @__PURE__ */ m(T, { direction: "column", gap: "24px", children: [
|
|
650
650
|
/* @__PURE__ */ a(T, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(T, { alignItems: "center", justifyContent: "space-between", children: [
|
|
651
|
-
/* @__PURE__ */ a(
|
|
651
|
+
/* @__PURE__ */ a(F, { type: "title", size: "large", appearance: "dark", weight: "bold", children: r }),
|
|
652
652
|
/* @__PURE__ */ a(Gt, { size: "24px", cursor: "pointer", onClick: o })
|
|
653
653
|
] }) }),
|
|
654
654
|
t
|
|
@@ -738,7 +738,7 @@ const Fo = S.div`
|
|
|
738
738
|
`, Lo = (e) => {
|
|
739
739
|
const { index: t, handleOpenModal: n } = e;
|
|
740
740
|
return /* @__PURE__ */ a(
|
|
741
|
-
|
|
741
|
+
Ze,
|
|
742
742
|
{
|
|
743
743
|
id: `loading-card-${t}`,
|
|
744
744
|
handleDelete: () => {
|
|
@@ -759,7 +759,7 @@ const Fo = S.div`
|
|
|
759
759
|
[k.GREATER_THAN]: Vo,
|
|
760
760
|
[k.LESS_THAN]: jo,
|
|
761
761
|
[k.EQUAL]: Uo
|
|
762
|
-
},
|
|
762
|
+
}, Be = (e) => {
|
|
763
763
|
const t = e == null ? void 0 : e.value, n = typeof t == "object" && t !== null && !Array.isArray(t), o = zo[e == null ? void 0 : e.howToSetTheDecision] || Oo;
|
|
764
764
|
return n && o(t) || t || void 0;
|
|
765
765
|
}, on = S.div`
|
|
@@ -803,10 +803,10 @@ const Fo = S.div`
|
|
|
803
803
|
} = e;
|
|
804
804
|
return i ? /* @__PURE__ */ m(T, { direction: "column", gap: "12px", children: [
|
|
805
805
|
/* @__PURE__ */ a(T, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
|
|
806
|
-
|
|
806
|
+
Ae,
|
|
807
807
|
{
|
|
808
808
|
element: r,
|
|
809
|
-
valueData:
|
|
809
|
+
valueData: Be(
|
|
810
810
|
r
|
|
811
811
|
),
|
|
812
812
|
type: "decision"
|
|
@@ -822,7 +822,7 @@ const Fo = S.div`
|
|
|
822
822
|
height: "203px",
|
|
823
823
|
children: [
|
|
824
824
|
u.length > 0 && /* @__PURE__ */ a(
|
|
825
|
-
|
|
825
|
+
F,
|
|
826
826
|
{
|
|
827
827
|
type: "label",
|
|
828
828
|
size: "large",
|
|
@@ -833,17 +833,17 @@ const Fo = S.div`
|
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
835
|
u.length > 0 && u.map((p) => /* @__PURE__ */ a(on, { children: /* @__PURE__ */ a(T, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
|
|
836
|
-
|
|
836
|
+
Ae,
|
|
837
837
|
{
|
|
838
838
|
element: { ...p, value: p.value },
|
|
839
|
-
valueData:
|
|
839
|
+
valueData: Be(
|
|
840
840
|
p
|
|
841
841
|
)
|
|
842
842
|
}
|
|
843
843
|
) }) }, p.conditionName)),
|
|
844
844
|
u.length > 0 && /* @__PURE__ */ a(Y, { dashed: !0 }),
|
|
845
845
|
d && /* @__PURE__ */ a(j, { children: o && /* @__PURE__ */ a(
|
|
846
|
-
|
|
846
|
+
Ae,
|
|
847
847
|
{
|
|
848
848
|
element: o.element,
|
|
849
849
|
valueData: o.valueData,
|
|
@@ -856,12 +856,12 @@ const Fo = S.div`
|
|
|
856
856
|
) })
|
|
857
857
|
] }) : /* @__PURE__ */ m(T, { direction: "column", gap: "12px", children: [
|
|
858
858
|
/* @__PURE__ */ m(T, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
859
|
-
/* @__PURE__ */ a(
|
|
860
|
-
/* @__PURE__ */ a(
|
|
859
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "180px" }),
|
|
860
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "85px" })
|
|
861
861
|
] }, "loading"),
|
|
862
862
|
/* @__PURE__ */ m(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
863
863
|
/* @__PURE__ */ a(Y, { dashed: !0 }),
|
|
864
|
-
/* @__PURE__ */ a(
|
|
864
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "150px" })
|
|
865
865
|
] }),
|
|
866
866
|
/* @__PURE__ */ a(rn, { children: /* @__PURE__ */ a(
|
|
867
867
|
T,
|
|
@@ -878,8 +878,8 @@ const Fo = S.div`
|
|
|
878
878
|
alignItems: "start",
|
|
879
879
|
padding: "8px",
|
|
880
880
|
children: [
|
|
881
|
-
/* @__PURE__ */ a(
|
|
882
|
-
/* @__PURE__ */ a(
|
|
881
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "180px" }),
|
|
882
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "85px" })
|
|
883
883
|
]
|
|
884
884
|
}
|
|
885
885
|
) }, `condition-${c}`))
|
|
@@ -897,7 +897,7 @@ const Fo = S.div`
|
|
|
897
897
|
howToSetTheDecision: G.RANGE,
|
|
898
898
|
decisionDataType: H.DATE
|
|
899
899
|
},
|
|
900
|
-
valueData:
|
|
900
|
+
valueData: Be({
|
|
901
901
|
labelName: o == null ? void 0 : o.terms,
|
|
902
902
|
value: {
|
|
903
903
|
from: String(t.effectiveFrom),
|
|
@@ -913,7 +913,7 @@ const Fo = S.div`
|
|
|
913
913
|
howToSetTheDecision: G.EQUAL,
|
|
914
914
|
decisionDataType: H.DATE
|
|
915
915
|
},
|
|
916
|
-
valueData:
|
|
916
|
+
valueData: Be({
|
|
917
917
|
labelName: o == null ? void 0 : o.terms,
|
|
918
918
|
value: String(t.effectiveFrom),
|
|
919
919
|
howToSetTheDecision: G.EQUAL,
|
|
@@ -922,7 +922,7 @@ const Fo = S.div`
|
|
|
922
922
|
} : null, d = t ? {
|
|
923
923
|
labelName: t.labelName || "",
|
|
924
924
|
decisionDataType: t.decisionDataType || "alphabetical",
|
|
925
|
-
value:
|
|
925
|
+
value: Be(t),
|
|
926
926
|
howToSetTheDecision: t.howToSetTheDecision || "EqualTo"
|
|
927
927
|
} : null, l = Bo(t).filter((h) => !(h != null && h.hidden)), u = Array.from({ length: 5 }), p = !!(!n && t && o && d), c = l.length < 2 ? "start" : "space-between";
|
|
928
928
|
return /* @__PURE__ */ a(
|
|
@@ -996,8 +996,8 @@ const Yo = (e) => {
|
|
|
996
996
|
] }) });
|
|
997
997
|
}, Xo = (e) => {
|
|
998
998
|
const { decision: t, controls: n, handleOpenModal: o, handleDelete: r, textValues: i } = e;
|
|
999
|
-
return t ? /* @__PURE__ */ a(
|
|
1000
|
-
/* @__PURE__ */ a(
|
|
999
|
+
return t ? /* @__PURE__ */ a(Ke, { children: /* @__PURE__ */ m(T, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
1000
|
+
/* @__PURE__ */ a(F, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: t.decisionId }),
|
|
1001
1001
|
/* @__PURE__ */ a(
|
|
1002
1002
|
Yo,
|
|
1003
1003
|
{
|
|
@@ -1022,14 +1022,14 @@ const Yo = (e) => {
|
|
|
1022
1022
|
handleOpenModal: o,
|
|
1023
1023
|
shouldRenderEmptyMessage: r
|
|
1024
1024
|
} = e, i = t || "Agregar decisión";
|
|
1025
|
-
return /* @__PURE__ */ a(
|
|
1026
|
-
/* @__PURE__ */ a(
|
|
1025
|
+
return /* @__PURE__ */ a(Ke, { children: r ? null : /* @__PURE__ */ m(T, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
1026
|
+
/* @__PURE__ */ a(F, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
1027
1027
|
/* @__PURE__ */ a(
|
|
1028
1028
|
Cn,
|
|
1029
1029
|
{
|
|
1030
1030
|
onClick: () => o ? o() : null,
|
|
1031
1031
|
children: /* @__PURE__ */ a(
|
|
1032
|
-
|
|
1032
|
+
Ze,
|
|
1033
1033
|
{
|
|
1034
1034
|
id: `add-decision-${n}`,
|
|
1035
1035
|
handleDelete: () => {
|
|
@@ -1037,8 +1037,8 @@ const Yo = (e) => {
|
|
|
1037
1037
|
handleView: () => o ? o() : null,
|
|
1038
1038
|
controls: !1,
|
|
1039
1039
|
children: /* @__PURE__ */ m(T, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
1040
|
-
/* @__PURE__ */ a(B, { appearance: "gray", icon: /* @__PURE__ */ a(
|
|
1041
|
-
/* @__PURE__ */ a(
|
|
1040
|
+
/* @__PURE__ */ a(B, { appearance: "gray", icon: /* @__PURE__ */ a(Qe, {}), size: "35px" }),
|
|
1041
|
+
/* @__PURE__ */ a(F, { appearance: "gray", type: "body", size: "large", children: i })
|
|
1042
1042
|
] })
|
|
1043
1043
|
}
|
|
1044
1044
|
)
|
|
@@ -1060,7 +1060,7 @@ const Yo = (e) => {
|
|
|
1060
1060
|
),
|
|
1061
1061
|
value: e
|
|
1062
1062
|
}), Ko = (e) => ({
|
|
1063
|
-
schema:
|
|
1063
|
+
schema: Le().test(
|
|
1064
1064
|
"isArrayOrString",
|
|
1065
1065
|
"Debe ser un array de strings/numbers o un solo string",
|
|
1066
1066
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -1069,7 +1069,7 @@ const Yo = (e) => {
|
|
|
1069
1069
|
),
|
|
1070
1070
|
value: e
|
|
1071
1071
|
}), er = (e) => ({
|
|
1072
|
-
schema:
|
|
1072
|
+
schema: Le().test(
|
|
1073
1073
|
"isArrayOrString",
|
|
1074
1074
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
1075
1075
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -1152,7 +1152,7 @@ function ir({
|
|
|
1152
1152
|
let d;
|
|
1153
1153
|
const l = {
|
|
1154
1154
|
ruleName: pe().required("El nombre de la regla es requerido"),
|
|
1155
|
-
value:
|
|
1155
|
+
value: We(() => or(
|
|
1156
1156
|
d.values.howToSetTheDecision
|
|
1157
1157
|
)(
|
|
1158
1158
|
d.values.value,
|
|
@@ -1160,7 +1160,7 @@ function ir({
|
|
|
1160
1160
|
).schema),
|
|
1161
1161
|
conditionsThatEstablishesTheDecision: te().shape({})
|
|
1162
1162
|
};
|
|
1163
|
-
n.terms && (l.effectiveFrom =
|
|
1163
|
+
n.terms && (l.effectiveFrom = Fe().required("La fecha de inicio es requerida"), l.validUntil = Fe().when(
|
|
1164
1164
|
"checkClosed",
|
|
1165
1165
|
(g, f, { parent: y }) => (y == null ? void 0 : y.checkClosed) ? f.required("La fecha de finalización es requerida").test(
|
|
1166
1166
|
"is-after-startDate",
|
|
@@ -1258,7 +1258,7 @@ const ar = S.div`
|
|
|
1258
1258
|
},
|
|
1259
1259
|
size: "small",
|
|
1260
1260
|
value: d,
|
|
1261
|
-
children: /* @__PURE__ */ a(
|
|
1261
|
+
children: /* @__PURE__ */ a(F, { size: "medium", type: "label", weight: "bold", as: "span", children: i })
|
|
1262
1262
|
}
|
|
1263
1263
|
) }),
|
|
1264
1264
|
l && /* @__PURE__ */ a(j, { children: n })
|
|
@@ -1278,17 +1278,17 @@ const ar = S.div`
|
|
|
1278
1278
|
messageEnd: c = "",
|
|
1279
1279
|
statusStart: h = "pending",
|
|
1280
1280
|
statusEnd: g = "pending"
|
|
1281
|
-
} = e, [f, y] = q(s), [v, x] = q(l), [D, C] = q(u), E = ({ target:
|
|
1282
|
-
y(
|
|
1283
|
-
}, w = (
|
|
1284
|
-
x(
|
|
1285
|
-
}, A = (
|
|
1286
|
-
C(
|
|
1281
|
+
} = e, [f, y] = q(s), [v, x] = q(l), [D, C] = q(u), E = ({ target: R }) => {
|
|
1282
|
+
y(R.checked), o && o(R.checked);
|
|
1283
|
+
}, w = (R) => {
|
|
1284
|
+
x(R.target.value), t(R);
|
|
1285
|
+
}, A = (R) => {
|
|
1286
|
+
C(R.target.value), n(R);
|
|
1287
1287
|
}, L = ue("(max-width: 400px)");
|
|
1288
1288
|
return /* @__PURE__ */ m(j, { children: [
|
|
1289
1289
|
/* @__PURE__ */ m(T, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
1290
1290
|
/* @__PURE__ */ a(
|
|
1291
|
-
|
|
1291
|
+
F,
|
|
1292
1292
|
{
|
|
1293
1293
|
appearance: "gray",
|
|
1294
1294
|
margin: "10px 0",
|
|
@@ -1325,7 +1325,7 @@ const ar = S.div`
|
|
|
1325
1325
|
gap: "24px",
|
|
1326
1326
|
children: [
|
|
1327
1327
|
/* @__PURE__ */ a(
|
|
1328
|
-
|
|
1328
|
+
$e,
|
|
1329
1329
|
{
|
|
1330
1330
|
id: "dateStart",
|
|
1331
1331
|
label: r,
|
|
@@ -1338,7 +1338,7 @@ const ar = S.div`
|
|
|
1338
1338
|
}
|
|
1339
1339
|
),
|
|
1340
1340
|
f && /* @__PURE__ */ a(
|
|
1341
|
-
|
|
1341
|
+
$e,
|
|
1342
1342
|
{
|
|
1343
1343
|
id: "dateEnd",
|
|
1344
1344
|
label: i,
|
|
@@ -1389,7 +1389,7 @@ const ar = S.div`
|
|
|
1389
1389
|
alignItems: "center",
|
|
1390
1390
|
gap: "64px",
|
|
1391
1391
|
children: [
|
|
1392
|
-
/* @__PURE__ */ a(
|
|
1392
|
+
/* @__PURE__ */ a(F, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
|
|
1393
1393
|
/* @__PURE__ */ a(
|
|
1394
1394
|
mt,
|
|
1395
1395
|
{
|
|
@@ -1397,7 +1397,7 @@ const ar = S.div`
|
|
|
1397
1397
|
onChange: () => s(!t.values.toggleNone),
|
|
1398
1398
|
checked: t.values.toggleNone,
|
|
1399
1399
|
size: "small",
|
|
1400
|
-
children: /* @__PURE__ */ a(
|
|
1400
|
+
children: /* @__PURE__ */ a(F, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
|
|
1401
1401
|
}
|
|
1402
1402
|
)
|
|
1403
1403
|
]
|
|
@@ -1447,7 +1447,7 @@ const ar = S.div`
|
|
|
1447
1447
|
)
|
|
1448
1448
|
] }),
|
|
1449
1449
|
/* @__PURE__ */ a(Y, {}),
|
|
1450
|
-
l && /* @__PURE__ */ a(
|
|
1450
|
+
l && /* @__PURE__ */ a(F, { type: "label", size: "medium", appearance: "danger", children: typeof t.errors.conditionsThatEstablishesTheDecision == "string" ? t.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
1451
1451
|
/* @__PURE__ */ m(T, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
1452
1452
|
/* @__PURE__ */ a(Q, { appearance: "gray", onClick: o, children: n.cancel }),
|
|
1453
1453
|
/* @__PURE__ */ a(Q, { type: "submit", children: n.confirm })
|
|
@@ -1570,10 +1570,10 @@ const ar = S.div`
|
|
|
1570
1570
|
justifyContent: "center",
|
|
1571
1571
|
alignItems: "center",
|
|
1572
1572
|
children: [
|
|
1573
|
-
/* @__PURE__ */ a(
|
|
1573
|
+
/* @__PURE__ */ a(F, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ m(j, { children: [
|
|
1574
1574
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1575
1575
|
/* @__PURE__ */ m(
|
|
1576
|
-
|
|
1576
|
+
F,
|
|
1577
1577
|
{
|
|
1578
1578
|
as: "span",
|
|
1579
1579
|
type: "label",
|
|
@@ -1592,7 +1592,7 @@ const ar = S.div`
|
|
|
1592
1592
|
/* @__PURE__ */ a(
|
|
1593
1593
|
Q,
|
|
1594
1594
|
{
|
|
1595
|
-
iconBefore: /* @__PURE__ */ a(
|
|
1595
|
+
iconBefore: /* @__PURE__ */ a(Qe, {}),
|
|
1596
1596
|
onClick: () => p ? p() : null,
|
|
1597
1597
|
children: n || "Agregar decisión"
|
|
1598
1598
|
}
|
|
@@ -1600,7 +1600,7 @@ const ar = S.div`
|
|
|
1600
1600
|
]
|
|
1601
1601
|
}
|
|
1602
1602
|
) : /* @__PURE__ */ m(
|
|
1603
|
-
|
|
1603
|
+
Je,
|
|
1604
1604
|
{
|
|
1605
1605
|
templateColumns: v ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
1606
1606
|
autoFlow: "row dense",
|
|
@@ -1661,7 +1661,7 @@ const ar = S.div`
|
|
|
1661
1661
|
[k.GREATER_THAN]: br,
|
|
1662
1662
|
[k.LESS_THAN]: vr,
|
|
1663
1663
|
[k.EQUAL]: yr
|
|
1664
|
-
},
|
|
1664
|
+
}, qe = (e) => {
|
|
1665
1665
|
const t = e == null ? void 0 : e.value;
|
|
1666
1666
|
if (typeof t == "string" && t.includes(" a ")) {
|
|
1667
1667
|
const n = [
|
|
@@ -1821,7 +1821,7 @@ const Sr = (e) => {
|
|
|
1821
1821
|
children: [
|
|
1822
1822
|
/* @__PURE__ */ m(T, { gap: "12px", children: [
|
|
1823
1823
|
/* @__PURE__ */ a(wr, { children: /* @__PURE__ */ a(
|
|
1824
|
-
|
|
1824
|
+
Ue,
|
|
1825
1825
|
{
|
|
1826
1826
|
id: "tag",
|
|
1827
1827
|
appearance: "gray",
|
|
@@ -1833,7 +1833,7 @@ const Sr = (e) => {
|
|
|
1833
1833
|
it,
|
|
1834
1834
|
{
|
|
1835
1835
|
element: r,
|
|
1836
|
-
valueData:
|
|
1836
|
+
valueData: qe(
|
|
1837
1837
|
r
|
|
1838
1838
|
),
|
|
1839
1839
|
type: "decision"
|
|
@@ -1891,7 +1891,7 @@ const Sr = (e) => {
|
|
|
1891
1891
|
onChange: D
|
|
1892
1892
|
}
|
|
1893
1893
|
) : /* @__PURE__ */ a(
|
|
1894
|
-
|
|
1894
|
+
F,
|
|
1895
1895
|
{
|
|
1896
1896
|
type: "label",
|
|
1897
1897
|
size: "large",
|
|
@@ -1924,7 +1924,7 @@ const Sr = (e) => {
|
|
|
1924
1924
|
value: w.value,
|
|
1925
1925
|
howToSetTheCondition: w.howToSetTheCondition === de.LIST_OF_VALUES ? de.LIST_OF_VALUES_MULTI : w.howToSetTheCondition
|
|
1926
1926
|
},
|
|
1927
|
-
valueData:
|
|
1927
|
+
valueData: qe(
|
|
1928
1928
|
w
|
|
1929
1929
|
)
|
|
1930
1930
|
}
|
|
@@ -1972,11 +1972,11 @@ const Sr = (e) => {
|
|
|
1972
1972
|
] })
|
|
1973
1973
|
] }) : /* @__PURE__ */ m(T, { justifyContent: "space-between", children: [
|
|
1974
1974
|
/* @__PURE__ */ m(T, { alignItems: "center", gap: "8px", children: [
|
|
1975
|
-
/* @__PURE__ */ a(
|
|
1976
|
-
/* @__PURE__ */ a(
|
|
1975
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "150px" }),
|
|
1976
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "70px" })
|
|
1977
1977
|
] }),
|
|
1978
1978
|
/* @__PURE__ */ m(T, { alignItems: "center", gap: "8px", children: [
|
|
1979
|
-
/* @__PURE__ */ a(
|
|
1979
|
+
/* @__PURE__ */ a(re, { animated: !0, width: "50px" }),
|
|
1980
1980
|
/* @__PURE__ */ a(Kn, { animated: !0 })
|
|
1981
1981
|
] })
|
|
1982
1982
|
] });
|
|
@@ -2070,7 +2070,7 @@ const Sr = (e) => {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
return !1;
|
|
2072
2072
|
}, kr = (e) => _t(e == null ? void 0 : e.value), pt = (e, t) => e === "group-primary" ? "Condición principal" : `Condición alterna N° ${String(t).padStart(2, "0")}`, Nn = (e) => {
|
|
2073
|
-
var nt,
|
|
2073
|
+
var nt, ke, Nt;
|
|
2074
2074
|
const {
|
|
2075
2075
|
cardTitle: t = !0,
|
|
2076
2076
|
decision: n,
|
|
@@ -2089,7 +2089,7 @@ const Sr = (e) => {
|
|
|
2089
2089
|
howToSetTheDecision: G.EQUAL,
|
|
2090
2090
|
decisionDataType: H.DATE
|
|
2091
2091
|
},
|
|
2092
|
-
valueData:
|
|
2092
|
+
valueData: qe({
|
|
2093
2093
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
2094
2094
|
value: at(n.effectiveFrom),
|
|
2095
2095
|
howToSetTheDecision: G.EQUAL,
|
|
@@ -2102,7 +2102,7 @@ const Sr = (e) => {
|
|
|
2102
2102
|
howToSetTheDecision: G.EQUAL,
|
|
2103
2103
|
decisionDataType: H.DATE
|
|
2104
2104
|
},
|
|
2105
|
-
valueData:
|
|
2105
|
+
valueData: qe({
|
|
2106
2106
|
labelName: r == null ? void 0 : r.validUntil,
|
|
2107
2107
|
value: at(n.validUntil),
|
|
2108
2108
|
howToSetTheDecision: G.EQUAL,
|
|
@@ -2111,13 +2111,13 @@ const Sr = (e) => {
|
|
|
2111
2111
|
} : null, y = n ? {
|
|
2112
2112
|
labelName: t && n.labelName || "",
|
|
2113
2113
|
decisionDataType: n.decisionDataType || H.ALPHABETICAL,
|
|
2114
|
-
value:
|
|
2114
|
+
value: qe(n),
|
|
2115
2115
|
howToSetTheDecision: n.howToSetTheDecision || G.EQUAL,
|
|
2116
2116
|
validUntil: n.validUntil
|
|
2117
2117
|
} : null, v = _.useMemo(
|
|
2118
2118
|
() => n ? Te(n) : {},
|
|
2119
2119
|
[n]
|
|
2120
|
-
), x = ((
|
|
2120
|
+
), x = ((ke = (nt = n == null ? void 0 : n.conditionGroups) == null ? void 0 : nt.map((M) => M == null ? void 0 : M.ConditionGroupId)) == null ? void 0 : ke.filter(Boolean)) || Object.keys(v), D = x[0] || "group-primary", C = _.useMemo(() => {
|
|
2121
2121
|
const M = {}, Z = v[D] || [], le = v["group-primary"] || [];
|
|
2122
2122
|
M["group-primary"] = D === "group-primary" ? le : [...Z, ...le];
|
|
2123
2123
|
for (const I of x)
|
|
@@ -2130,15 +2130,15 @@ const Sr = (e) => {
|
|
|
2130
2130
|
return Object.keys(C).forEach((Z) => {
|
|
2131
2131
|
const le = C[Z];
|
|
2132
2132
|
le && Array.isArray(le) ? M[Z] = le.map((I) => {
|
|
2133
|
-
let
|
|
2134
|
-
I.timeUnit && I.labelName && (
|
|
2133
|
+
let Pe = I.labelName;
|
|
2134
|
+
I.timeUnit && I.labelName && (Pe = Pt(I.labelName, I.timeUnit));
|
|
2135
2135
|
let N = I.value;
|
|
2136
2136
|
return (I == null ? void 0 : I.howToSetTheCondition) !== void 0 && (I == null ? void 0 : I.howToSetTheCondition) !== null && (I == null ? void 0 : I.value) !== void 0 && (I == null ? void 0 : I.value) !== null && (I == null ? void 0 : I.value) !== "" && (N = Nr(
|
|
2137
2137
|
I.value,
|
|
2138
2138
|
I.howToSetTheCondition
|
|
2139
2139
|
)), {
|
|
2140
2140
|
...I,
|
|
2141
|
-
labelName:
|
|
2141
|
+
labelName: Pe,
|
|
2142
2142
|
value: N
|
|
2143
2143
|
};
|
|
2144
2144
|
}) : M[Z] = le;
|
|
@@ -2156,18 +2156,18 @@ const Sr = (e) => {
|
|
|
2156
2156
|
}, [w]), L = _.useMemo(() => {
|
|
2157
2157
|
const M = Object.keys(A);
|
|
2158
2158
|
return M.includes("group-primary") ? ["group-primary", ...M.filter((Z) => Z !== "group-primary")] : M;
|
|
2159
|
-
}, [A]),
|
|
2160
|
-
let
|
|
2161
|
-
const
|
|
2162
|
-
const Z = M === "group-primary" ? "mainCondition" : `alternateCondition-${
|
|
2163
|
-
return
|
|
2159
|
+
}, [A]), R = {};
|
|
2160
|
+
let ge = 1;
|
|
2161
|
+
const ae = L.map((M) => {
|
|
2162
|
+
const Z = M === "group-primary" ? "mainCondition" : `alternateCondition-${ge++}`;
|
|
2163
|
+
return R[Z] = M, {
|
|
2164
2164
|
id: Z,
|
|
2165
2165
|
label: M === "group-primary" ? pt(M, 0) : pt(M, Number(Z.split("-").at(-1))),
|
|
2166
2166
|
isDisabled: !1
|
|
2167
2167
|
};
|
|
2168
|
-
}), [
|
|
2169
|
-
((Nt =
|
|
2170
|
-
), Dt = (M) => xt(M), wt =
|
|
2168
|
+
}), [Ne, xt] = _.useState(
|
|
2169
|
+
((Nt = ae[0]) == null ? void 0 : Nt.id) ?? "mainCondition"
|
|
2170
|
+
), Dt = (M) => xt(M), wt = R[Ne] ?? L[0] ?? "group-primary", Me = A[wt] ?? [], Ct = L.length > 1, St = Array.from({ length: 5 }), et = !!(!o && n && r && y), Et = Me.length < 2 ? "start" : "space-between", tt = `N° ${String((i ?? 0) + 1).padStart(2, "0")}`;
|
|
2171
2171
|
return /* @__PURE__ */ a(
|
|
2172
2172
|
Sr,
|
|
2173
2173
|
{
|
|
@@ -2187,10 +2187,10 @@ const Sr = (e) => {
|
|
|
2187
2187
|
validUntilRenderer: f,
|
|
2188
2188
|
onEdit: l,
|
|
2189
2189
|
onDelete: u,
|
|
2190
|
-
tabs:
|
|
2191
|
-
selectedTab:
|
|
2190
|
+
tabs: ae,
|
|
2191
|
+
selectedTab: Ne,
|
|
2192
2192
|
onTabChange: Dt,
|
|
2193
|
-
currentConditions:
|
|
2193
|
+
currentConditions: Me,
|
|
2194
2194
|
hasMultipleGroups: Ct
|
|
2195
2195
|
}
|
|
2196
2196
|
);
|
|
@@ -2294,7 +2294,7 @@ const Ir = S.div`
|
|
|
2294
2294
|
isOpen: l,
|
|
2295
2295
|
onToggle: u
|
|
2296
2296
|
} = e;
|
|
2297
|
-
return n ? /* @__PURE__ */ a(
|
|
2297
|
+
return n ? /* @__PURE__ */ a(Ke, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ a(
|
|
2298
2298
|
Sn,
|
|
2299
2299
|
{
|
|
2300
2300
|
id: n.decisionId,
|
|
@@ -2343,12 +2343,12 @@ const Ir = S.div`
|
|
|
2343
2343
|
alignItems: "center",
|
|
2344
2344
|
padding: "16px",
|
|
2345
2345
|
children: [
|
|
2346
|
-
/* @__PURE__ */ a(
|
|
2346
|
+
/* @__PURE__ */ a(F, { appearance: "gray", type: "label", size: "large", weight: "bold", children: t || "Agregar decisión" }),
|
|
2347
2347
|
/* @__PURE__ */ a(
|
|
2348
2348
|
B,
|
|
2349
2349
|
{
|
|
2350
2350
|
appearance: "gray",
|
|
2351
|
-
icon: /* @__PURE__ */ a(
|
|
2351
|
+
icon: /* @__PURE__ */ a(Qe, {}),
|
|
2352
2352
|
size: "24px",
|
|
2353
2353
|
cursorHover: !0
|
|
2354
2354
|
}
|
|
@@ -2458,7 +2458,7 @@ const Ir = S.div`
|
|
|
2458
2458
|
/* @__PURE__ */ m(T, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2459
2459
|
/* @__PURE__ */ m(T, { direction: "column", gap: "8px", children: [
|
|
2460
2460
|
/* @__PURE__ */ a(
|
|
2461
|
-
|
|
2461
|
+
F,
|
|
2462
2462
|
{
|
|
2463
2463
|
type: "title",
|
|
2464
2464
|
size: "medium",
|
|
@@ -2467,7 +2467,7 @@ const Ir = S.div`
|
|
|
2467
2467
|
children: i
|
|
2468
2468
|
}
|
|
2469
2469
|
),
|
|
2470
|
-
/* @__PURE__ */ a(
|
|
2470
|
+
/* @__PURE__ */ a(F, { size: "medium", appearance: "gray", children: n })
|
|
2471
2471
|
] }),
|
|
2472
2472
|
/* @__PURE__ */ a(Gt, { size: "24px", cursor: "pointer", onClick: r })
|
|
2473
2473
|
] }),
|
|
@@ -2485,7 +2485,7 @@ const Ir = S.div`
|
|
|
2485
2485
|
),
|
|
2486
2486
|
value: e
|
|
2487
2487
|
}), Hr = (e) => ({
|
|
2488
|
-
schema:
|
|
2488
|
+
schema: Le().test(
|
|
2489
2489
|
"isArrayOrString",
|
|
2490
2490
|
"Por favor selecciona una opcion",
|
|
2491
2491
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -2494,7 +2494,7 @@ const Ir = S.div`
|
|
|
2494
2494
|
),
|
|
2495
2495
|
value: e
|
|
2496
2496
|
}), Gr = (e) => ({
|
|
2497
|
-
schema:
|
|
2497
|
+
schema: Le().test(
|
|
2498
2498
|
"isArrayOrString",
|
|
2499
2499
|
"Por favor selecciona al menos una opcion",
|
|
2500
2500
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -2601,26 +2601,26 @@ function Wr({
|
|
|
2601
2601
|
let l;
|
|
2602
2602
|
const u = {
|
|
2603
2603
|
ruleName: pe().required("El nombre de la decision es requerido"),
|
|
2604
|
-
value:
|
|
2604
|
+
value: We(() => ln(
|
|
2605
2605
|
l.values.howToSetTheDecision
|
|
2606
2606
|
)(
|
|
2607
2607
|
l.values.value,
|
|
2608
2608
|
l.values.decisionDataType
|
|
2609
2609
|
).schema),
|
|
2610
|
-
conditionsThatEstablishesTheDecision:
|
|
2610
|
+
conditionsThatEstablishesTheDecision: We((h, { parent: g }) => {
|
|
2611
2611
|
const f = g && g.conditionsThatEstablishesTheDecision && typeof g.conditionsThatEstablishesTheDecision == "object" && Object.keys(g.conditionsThatEstablishesTheDecision).length > 0;
|
|
2612
2612
|
if ((g == null ? void 0 : g.toggleNone) && f) return te().shape({});
|
|
2613
2613
|
const v = {};
|
|
2614
2614
|
for (const [x, D] of Object.entries(o)) {
|
|
2615
2615
|
const C = {};
|
|
2616
2616
|
D.forEach((E) => {
|
|
2617
|
-
var L,
|
|
2618
|
-
const w = (
|
|
2617
|
+
var L, R;
|
|
2618
|
+
const w = (R = (L = g == null ? void 0 : g.conditionsThatEstablishesTheDecision) == null ? void 0 : L[x]) == null ? void 0 : R[E.conditionName], A = jt(w);
|
|
2619
2619
|
if (A !== void 0) {
|
|
2620
|
-
const
|
|
2620
|
+
const ge = ln(
|
|
2621
2621
|
E.howToSetTheCondition
|
|
2622
2622
|
);
|
|
2623
|
-
C[E.conditionName] =
|
|
2623
|
+
C[E.conditionName] = ge(
|
|
2624
2624
|
A,
|
|
2625
2625
|
E.conditionDataType
|
|
2626
2626
|
).schema;
|
|
@@ -2638,9 +2638,9 @@ function Wr({
|
|
|
2638
2638
|
);
|
|
2639
2639
|
})
|
|
2640
2640
|
};
|
|
2641
|
-
n.terms && (u.effectiveFrom =
|
|
2641
|
+
n.terms && (u.effectiveFrom = Fe().required(
|
|
2642
2642
|
"Se requiere la fecha de vigencia desde"
|
|
2643
|
-
), u.validUntil =
|
|
2643
|
+
), u.validUntil = Fe().when(
|
|
2644
2644
|
"checkClosed",
|
|
2645
2645
|
(h, g, { parent: f }) => (f == null ? void 0 : f.checkClosed) ? g.required("Se requiere la fecha de vigencia hasta").test(
|
|
2646
2646
|
"is-after-startDate",
|
|
@@ -2753,16 +2753,16 @@ const Yr = S.div`
|
|
|
2753
2753
|
messageEnd: c = "",
|
|
2754
2754
|
statusStart: h = "pending",
|
|
2755
2755
|
statusEnd: g = "pending"
|
|
2756
|
-
} = e, [f, y] = q(s), [v, x] = q(l), [D, C] = q(u), E = ({ target:
|
|
2757
|
-
y(
|
|
2758
|
-
}, w = (
|
|
2759
|
-
x(
|
|
2760
|
-
}, A = (
|
|
2761
|
-
C(
|
|
2756
|
+
} = e, [f, y] = q(s), [v, x] = q(l), [D, C] = q(u), E = ({ target: R }) => {
|
|
2757
|
+
y(R.checked), o && o(R.checked);
|
|
2758
|
+
}, w = (R) => {
|
|
2759
|
+
x(R.target.value), t(R);
|
|
2760
|
+
}, A = (R) => {
|
|
2761
|
+
C(R.target.value), n(R);
|
|
2762
2762
|
}, L = ue("(max-width: 400px)");
|
|
2763
2763
|
return /* @__PURE__ */ m(T, { direction: "column", width: "100%", gap: "20px", children: [
|
|
2764
2764
|
/* @__PURE__ */ m(T, { justifyContent: "space-between", children: [
|
|
2765
|
-
/* @__PURE__ */ a(
|
|
2765
|
+
/* @__PURE__ */ a(F, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
2766
2766
|
/* @__PURE__ */ a(
|
|
2767
2767
|
qt,
|
|
2768
2768
|
{
|
|
@@ -2781,7 +2781,7 @@ const Yr = S.div`
|
|
|
2781
2781
|
gap: "24px",
|
|
2782
2782
|
children: [
|
|
2783
2783
|
/* @__PURE__ */ a(
|
|
2784
|
-
|
|
2784
|
+
$e,
|
|
2785
2785
|
{
|
|
2786
2786
|
id: "dateStart",
|
|
2787
2787
|
label: r,
|
|
@@ -2795,7 +2795,7 @@ const Yr = S.div`
|
|
|
2795
2795
|
}
|
|
2796
2796
|
),
|
|
2797
2797
|
f && /* @__PURE__ */ a(
|
|
2798
|
-
|
|
2798
|
+
$e,
|
|
2799
2799
|
{
|
|
2800
2800
|
id: "dateEnd",
|
|
2801
2801
|
label: i,
|
|
@@ -2835,7 +2835,7 @@ const Yr = S.div`
|
|
|
2835
2835
|
} = e;
|
|
2836
2836
|
return /* @__PURE__ */ m(j, { children: [
|
|
2837
2837
|
/* @__PURE__ */ a("form", { onSubmit: r.handleSubmit, children: /* @__PURE__ */ m(T, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2838
|
-
/* @__PURE__ */ a(
|
|
2838
|
+
/* @__PURE__ */ a(ze, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ m(
|
|
2839
2839
|
T,
|
|
2840
2840
|
{
|
|
2841
2841
|
justifyContent: "center",
|
|
@@ -2847,11 +2847,11 @@ const Yr = S.div`
|
|
|
2847
2847
|
formik: r,
|
|
2848
2848
|
isDecision: !0
|
|
2849
2849
|
}),
|
|
2850
|
-
i.timeUnit && /* @__PURE__ */ a(
|
|
2850
|
+
i.timeUnit && /* @__PURE__ */ a(F, { as: "span", size: "medium", padding: "0 0 0 16px", children: i.timeUnit })
|
|
2851
2851
|
]
|
|
2852
2852
|
}
|
|
2853
2853
|
) }),
|
|
2854
|
-
/* @__PURE__ */ a(
|
|
2854
|
+
/* @__PURE__ */ a(ze, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(T, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2855
2855
|
/* @__PURE__ */ a(
|
|
2856
2856
|
xn,
|
|
2857
2857
|
{
|
|
@@ -2899,7 +2899,7 @@ const Yr = S.div`
|
|
|
2899
2899
|
formik: r
|
|
2900
2900
|
}
|
|
2901
2901
|
),
|
|
2902
|
-
C.timeUnit && /* @__PURE__ */ a(
|
|
2902
|
+
C.timeUnit && /* @__PURE__ */ a(F, { as: "span", size: "medium", padding: "0 0 0 16px", children: C.__unitAfterInput })
|
|
2903
2903
|
] }),
|
|
2904
2904
|
/* @__PURE__ */ a(
|
|
2905
2905
|
B,
|
|
@@ -2915,9 +2915,9 @@ const Yr = S.div`
|
|
|
2915
2915
|
E
|
|
2916
2916
|
);
|
|
2917
2917
|
}) }),
|
|
2918
|
-
u && /* @__PURE__ */ a(
|
|
2918
|
+
u && /* @__PURE__ */ a(F, { type: "label", size: "medium", appearance: "danger", children: n ?? "Existen errores en el formulario, por favor revísalos." })
|
|
2919
2919
|
] }) }),
|
|
2920
|
-
/* @__PURE__ */ a(
|
|
2920
|
+
/* @__PURE__ */ a(ze, { legend: "Vigencia", spacing: "wide", children: g.terms && /* @__PURE__ */ a(
|
|
2921
2921
|
Xr,
|
|
2922
2922
|
{
|
|
2923
2923
|
labelStart: g.termStart,
|
|
@@ -2948,7 +2948,7 @@ const Yr = S.div`
|
|
|
2948
2948
|
title: "Redefinir la condición",
|
|
2949
2949
|
onCloseModal: x,
|
|
2950
2950
|
children: /* @__PURE__ */ m(T, { direction: "column", gap: "16px", children: [
|
|
2951
|
-
/* @__PURE__ */ a(
|
|
2951
|
+
/* @__PURE__ */ a(F, { 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 ." }),
|
|
2952
2952
|
/* @__PURE__ */ m(T, { justifyContent: "end", gap: "12px", children: [
|
|
2953
2953
|
/* @__PURE__ */ a(
|
|
2954
2954
|
Q,
|
|
@@ -3021,7 +3021,7 @@ function ii(e) {
|
|
|
3021
3021
|
return "sea";
|
|
3022
3022
|
}
|
|
3023
3023
|
}
|
|
3024
|
-
const
|
|
3024
|
+
const _e = (e) => {
|
|
3025
3025
|
if (typeof e == "string") {
|
|
3026
3026
|
const t = e.toLowerCase();
|
|
3027
3027
|
if (t.includes("equal")) return de.EQUAL;
|
|
@@ -3033,7 +3033,7 @@ const Pe = (e) => {
|
|
|
3033
3033
|
return de.LIST_OF_VALUES;
|
|
3034
3034
|
}
|
|
3035
3035
|
return e ?? de.EQUAL;
|
|
3036
|
-
},
|
|
3036
|
+
}, Ve = (e) => {
|
|
3037
3037
|
switch (e) {
|
|
3038
3038
|
case G.LIST_OF_VALUES_MULTI:
|
|
3039
3039
|
return [];
|
|
@@ -3059,7 +3059,7 @@ const Pe = (e) => {
|
|
|
3059
3059
|
var o, r;
|
|
3060
3060
|
return (r = (o = e == null ? void 0 : e.conditionsThatEstablishesTheDecision) == null ? void 0 : o[t]) == null ? void 0 : r[n];
|
|
3061
3061
|
}, si = (e) => {
|
|
3062
|
-
var I,
|
|
3062
|
+
var I, Pe;
|
|
3063
3063
|
const {
|
|
3064
3064
|
decision: t,
|
|
3065
3065
|
onSubmitEvent: n,
|
|
@@ -3104,7 +3104,7 @@ const Pe = (e) => {
|
|
|
3104
3104
|
Object.entries(V).map(([X, U]) => {
|
|
3105
3105
|
const be = Object.fromEntries(
|
|
3106
3106
|
U.map((se) => {
|
|
3107
|
-
const
|
|
3107
|
+
const fe = _e(se.howToSetTheCondition), ye = se.value ?? Ve(fe);
|
|
3108
3108
|
return [se.conditionName, ye];
|
|
3109
3109
|
})
|
|
3110
3110
|
);
|
|
@@ -3122,13 +3122,13 @@ const Pe = (e) => {
|
|
|
3122
3122
|
if (!N || typeof N != "object") return;
|
|
3123
3123
|
const O = Te(p), V = Object.entries(N).map(
|
|
3124
3124
|
([be, se]) => {
|
|
3125
|
-
const
|
|
3126
|
-
const z = se[ve],
|
|
3127
|
-
|
|
3128
|
-
), ot =
|
|
3125
|
+
const fe = O[be] || [], ye = Object.keys(se).map((ve) => {
|
|
3126
|
+
const z = se[ve], ne = fe.find((Un) => Un.conditionName === ve) || {}, kt = _e(
|
|
3127
|
+
ne.howToSetTheCondition ?? (z == null ? void 0 : z.howToSetTheCondition)
|
|
3128
|
+
), ot = ne.value ?? Ve(kt), rt = z && typeof z == "object" && "value" in z ? z.value : z;
|
|
3129
3129
|
return {
|
|
3130
3130
|
// meta (labelName, descriptionUse, timeUnit, etc.)
|
|
3131
|
-
...
|
|
3131
|
+
...ne,
|
|
3132
3132
|
// any extra fields that might live in the wrapper
|
|
3133
3133
|
...typeof z == "object" && !Array.isArray(z) ? z : {},
|
|
3134
3134
|
conditionName: ve,
|
|
@@ -3142,7 +3142,7 @@ const Pe = (e) => {
|
|
|
3142
3142
|
}
|
|
3143
3143
|
), P = l.values.conditionGroups, W = JSON.stringify(V), X = JSON.stringify(P ?? []);
|
|
3144
3144
|
W !== X && l.setFieldValue("conditionGroups", V, !1);
|
|
3145
|
-
}, [(
|
|
3145
|
+
}, [(Pe = l.values) == null ? void 0 : Pe.conditionsThatEstablishesTheDecision, p]);
|
|
3146
3146
|
const L = _.useMemo(() => {
|
|
3147
3147
|
const N = [
|
|
3148
3148
|
...Object.keys(g).filter(
|
|
@@ -3157,11 +3157,11 @@ const Pe = (e) => {
|
|
|
3157
3157
|
const X = (g[P] ?? []).map((U, be) => {
|
|
3158
3158
|
const se = !O && P === "group-primary" && be === 0;
|
|
3159
3159
|
se && (O = !0);
|
|
3160
|
-
const
|
|
3160
|
+
const fe = _e(U.howToSetTheCondition), ye = Jr({
|
|
3161
3161
|
label: U.labelName || "",
|
|
3162
|
-
howToSet:
|
|
3162
|
+
howToSet: fe,
|
|
3163
3163
|
isFirst: se
|
|
3164
|
-
}), ve = U.timeUnit ? Pt("", U.timeUnit, !0).trim() : "", z = `${P}.${U.conditionName}`,
|
|
3164
|
+
}), ve = U.timeUnit ? Pt("", U.timeUnit, !0).trim() : "", z = `${P}.${U.conditionName}`, ne = ai(
|
|
3165
3165
|
l.values,
|
|
3166
3166
|
P,
|
|
3167
3167
|
U.conditionName
|
|
@@ -3169,12 +3169,12 @@ const Pe = (e) => {
|
|
|
3169
3169
|
l.values,
|
|
3170
3170
|
P,
|
|
3171
3171
|
U.conditionName
|
|
3172
|
-
), ot =
|
|
3172
|
+
), ot = ne !== void 0 ? ne : kt, rt = ot !== void 0 ? ot : Ve(fe);
|
|
3173
3173
|
return {
|
|
3174
3174
|
...U,
|
|
3175
3175
|
__originalConditionName: U.conditionName,
|
|
3176
3176
|
__groupKey: P,
|
|
3177
|
-
__howToSet:
|
|
3177
|
+
__howToSet: fe,
|
|
3178
3178
|
__scopedName: z,
|
|
3179
3179
|
// what the renderer uses:
|
|
3180
3180
|
conditionName: U.conditionName,
|
|
@@ -3187,14 +3187,14 @@ const Pe = (e) => {
|
|
|
3187
3187
|
return [P, X];
|
|
3188
3188
|
});
|
|
3189
3189
|
return Object.fromEntries(V);
|
|
3190
|
-
}, [g, l.values]),
|
|
3190
|
+
}, [g, l.values]), R = L[A] ?? [], ge = L["group-primary"] ?? [], ae = {
|
|
3191
3191
|
decisionDataType: t.decisionDataType,
|
|
3192
3192
|
howToSetTheCondition: t.howToSetTheDecision,
|
|
3193
3193
|
labelName: t.labelName,
|
|
3194
3194
|
listOfPossibleValues: t.listOfPossibleValues,
|
|
3195
3195
|
ruleName: t.ruleName,
|
|
3196
3196
|
timeUnit: t.timeUnit ? Pt("", t.timeUnit, !0).trim() : ""
|
|
3197
|
-
},
|
|
3197
|
+
}, Ne = l.submitCount > 0 || !!l.touched.effectiveFrom, xt = l.submitCount > 0 || !!l.touched.validUntil, Dt = Ne ? l.errors.effectiveFrom ? "invalid" : "valid" : void 0, wt = xt ? l.errors.validUntil ? "invalid" : "valid" : void 0, Me = _.useMemo(() => {
|
|
3198
3198
|
const N = l.errors.conditionsThatEstablishesTheDecision;
|
|
3199
3199
|
if (!N) return;
|
|
3200
3200
|
if (typeof N == "string") return N;
|
|
@@ -3214,23 +3214,23 @@ const Pe = (e) => {
|
|
|
3214
3214
|
}
|
|
3215
3215
|
};
|
|
3216
3216
|
return O(N);
|
|
3217
|
-
}, [l.errors.conditionsThatEstablishesTheDecision]), Ct = l.submitCount > 0 && !!
|
|
3218
|
-
const O = (N == null ? void 0 : N.__howToSet) ??
|
|
3219
|
-
return
|
|
3217
|
+
}, [l.errors.conditionsThatEstablishesTheDecision]), Ct = l.submitCount > 0 && !!Me, St = (N) => {
|
|
3218
|
+
const O = (N == null ? void 0 : N.__howToSet) ?? _e(N == null ? void 0 : N.howToSetTheCondition);
|
|
3219
|
+
return Ve(O);
|
|
3220
3220
|
}, et = (N, O, V) => {
|
|
3221
|
-
var U, be, se,
|
|
3221
|
+
var U, be, se, fe, ye;
|
|
3222
3222
|
const P = `conditionsThatEstablishesTheDecision.${N}.${O}`, W = (se = (be = (U = l.values) == null ? void 0 : U.conditionsThatEstablishesTheDecision) == null ? void 0 : be[N]) == null ? void 0 : se[O];
|
|
3223
3223
|
W && typeof W == "object" && !Array.isArray(W) ? l.setFieldValue(`${P}.value`, V, !1) : l.setFieldValue(P, V, !1);
|
|
3224
|
-
const X = (
|
|
3224
|
+
const X = (fe = l.values) == null ? void 0 : fe.conditionGroups;
|
|
3225
3225
|
if (Array.isArray(X)) {
|
|
3226
3226
|
const ve = X.findIndex((z) => (z == null ? void 0 : z.ConditionGroupId) === N);
|
|
3227
3227
|
if (ve >= 0) {
|
|
3228
3228
|
const z = (ye = X[ve].conditionsThatEstablishesTheDecision) == null ? void 0 : ye.findIndex(
|
|
3229
|
-
(
|
|
3229
|
+
(ne) => (ne == null ? void 0 : ne.conditionName) === O
|
|
3230
3230
|
);
|
|
3231
3231
|
if (z >= 0) {
|
|
3232
|
-
const
|
|
3233
|
-
|
|
3232
|
+
const ne = JSON.parse(JSON.stringify(X));
|
|
3233
|
+
ne[ve].conditionsThatEstablishesTheDecision[z].value = V, l.setFieldValue("conditionGroups", ne, !1);
|
|
3234
3234
|
}
|
|
3235
3235
|
}
|
|
3236
3236
|
}
|
|
@@ -3243,19 +3243,19 @@ const Pe = (e) => {
|
|
|
3243
3243
|
);
|
|
3244
3244
|
}, tt = () => {
|
|
3245
3245
|
(c[A] ?? []).forEach((O) => {
|
|
3246
|
-
const V =
|
|
3246
|
+
const V = _e(O == null ? void 0 : O.howToSetTheCondition), P = Ve(V);
|
|
3247
3247
|
et(A, O.conditionName, P);
|
|
3248
3248
|
});
|
|
3249
|
-
}, [nt,
|
|
3249
|
+
}, [nt, ke] = _.useState(!1);
|
|
3250
3250
|
return /* @__PURE__ */ a(
|
|
3251
3251
|
Qr,
|
|
3252
3252
|
{
|
|
3253
3253
|
activeTab: C,
|
|
3254
|
-
conditionsErrorText:
|
|
3255
|
-
currentConditions:
|
|
3254
|
+
conditionsErrorText: Me,
|
|
3255
|
+
currentConditions: R,
|
|
3256
3256
|
decision: t,
|
|
3257
3257
|
formik: l,
|
|
3258
|
-
normalizedDecision:
|
|
3258
|
+
normalizedDecision: ae,
|
|
3259
3259
|
onCancel: r,
|
|
3260
3260
|
onRedefineCurrentTab: tt,
|
|
3261
3261
|
onTabChange: w,
|
|
@@ -3267,19 +3267,19 @@ const Pe = (e) => {
|
|
|
3267
3267
|
termEndStatus: wt,
|
|
3268
3268
|
termStartStatus: Dt,
|
|
3269
3269
|
textValues: o,
|
|
3270
|
-
visibleConditions:
|
|
3270
|
+
visibleConditions: ge,
|
|
3271
3271
|
visibleConditionsByGroup: L,
|
|
3272
3272
|
handleToggleNoneChange: u,
|
|
3273
3273
|
portalId: "redefine-confirm-portal",
|
|
3274
3274
|
showRedefineConfirm: nt,
|
|
3275
|
-
onOpenRedefineConfirm: () =>
|
|
3276
|
-
onCloseRedefineConfirm: () =>
|
|
3275
|
+
onOpenRedefineConfirm: () => ke(!0),
|
|
3276
|
+
onCloseRedefineConfirm: () => ke(!1),
|
|
3277
3277
|
onConfirmRedefine: () => {
|
|
3278
3278
|
tt();
|
|
3279
3279
|
const N = (c[A] ?? []).map(
|
|
3280
3280
|
(O) => `${A}.${O.conditionName}`
|
|
3281
3281
|
);
|
|
3282
|
-
s == null || s(N),
|
|
3282
|
+
s == null || s(N), ke(!1);
|
|
3283
3283
|
}
|
|
3284
3284
|
}
|
|
3285
3285
|
);
|
|
@@ -3302,8 +3302,9 @@ const Pe = (e) => {
|
|
|
3302
3302
|
terms: y = !0,
|
|
3303
3303
|
onRemoveCondition: v,
|
|
3304
3304
|
onRestoreConditions: x,
|
|
3305
|
-
baseDecisionTemplate: D
|
|
3306
|
-
|
|
3305
|
+
baseDecisionTemplate: D,
|
|
3306
|
+
shouldRenderEmptyMessage: C = !0
|
|
3307
|
+
} = e, [E, w] = q(null), A = ue("(max-width: 681px)"), { renderedCards: L, shouldRenderAddCard: R } = _r({
|
|
3307
3308
|
cardTitle: t,
|
|
3308
3309
|
controls: n,
|
|
3309
3310
|
customTitleContentAddCard: o,
|
|
@@ -3312,11 +3313,11 @@ const Pe = (e) => {
|
|
|
3312
3313
|
handleOpenModal: c,
|
|
3313
3314
|
handleDelete: f,
|
|
3314
3315
|
textValues: s,
|
|
3315
|
-
isOpenFor: (
|
|
3316
|
-
toggleAt: (
|
|
3317
|
-
}),
|
|
3316
|
+
isOpenFor: (ae) => E === ae,
|
|
3317
|
+
toggleAt: (ae) => w((Ne) => Ne === ae ? null : ae)
|
|
3318
|
+
}), ge = (i == null ? void 0 : i.length) === 0 && !p;
|
|
3318
3319
|
return /* @__PURE__ */ m(j, { children: [
|
|
3319
|
-
/* @__PURE__ */ a(Fr, { children: /* @__PURE__ */ a(Rr, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children:
|
|
3320
|
+
/* @__PURE__ */ a(Fr, { children: /* @__PURE__ */ a(Rr, { children: /* @__PURE__ */ a(T, { direction: "column", gap: "16px", padding: "6px", children: C && (ge ? /* @__PURE__ */ a(ze, { legend: "Decisiones", children: /* @__PURE__ */ m(
|
|
3320
3321
|
T,
|
|
3321
3322
|
{
|
|
3322
3323
|
direction: "column",
|
|
@@ -3334,7 +3335,7 @@ const Pe = (e) => {
|
|
|
3334
3335
|
}
|
|
3335
3336
|
),
|
|
3336
3337
|
/* @__PURE__ */ a(
|
|
3337
|
-
|
|
3338
|
+
F,
|
|
3338
3339
|
{
|
|
3339
3340
|
type: "title",
|
|
3340
3341
|
size: "medium",
|
|
@@ -3343,14 +3344,14 @@ const Pe = (e) => {
|
|
|
3343
3344
|
children: "Sin decisiones"
|
|
3344
3345
|
}
|
|
3345
3346
|
),
|
|
3346
|
-
/* @__PURE__ */ a(
|
|
3347
|
+
/* @__PURE__ */ a(F, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ m(j, { children: [
|
|
3347
3348
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
3348
3349
|
o || ' "Agregar decisión"'
|
|
3349
3350
|
] }) })
|
|
3350
3351
|
]
|
|
3351
3352
|
}
|
|
3352
3353
|
) }) : /* @__PURE__ */ m(
|
|
3353
|
-
|
|
3354
|
+
Je,
|
|
3354
3355
|
{
|
|
3355
3356
|
templateColumns: "1fr",
|
|
3356
3357
|
autoFlow: "row dense",
|
|
@@ -3360,10 +3361,10 @@ const Pe = (e) => {
|
|
|
3360
3361
|
autoRows: "auto",
|
|
3361
3362
|
justifyItems: "center",
|
|
3362
3363
|
padding: "6px",
|
|
3363
|
-
height:
|
|
3364
|
+
height: A ? "auto" : "484px",
|
|
3364
3365
|
children: [
|
|
3365
|
-
|
|
3366
|
-
|
|
3366
|
+
L,
|
|
3367
|
+
R && Vt({
|
|
3367
3368
|
type: "add",
|
|
3368
3369
|
index: i == null ? void 0 : i.length,
|
|
3369
3370
|
controls: n,
|
|
@@ -3373,12 +3374,12 @@ const Pe = (e) => {
|
|
|
3373
3374
|
handleOpenModal: c,
|
|
3374
3375
|
handleDelete: f,
|
|
3375
3376
|
textValues: s,
|
|
3376
|
-
shouldRenderEmptyMessage:
|
|
3377
|
+
shouldRenderEmptyMessage: C,
|
|
3377
3378
|
terms: y
|
|
3378
3379
|
})
|
|
3379
3380
|
]
|
|
3380
3381
|
}
|
|
3381
|
-
) }) }) }),
|
|
3382
|
+
)) }) }) }),
|
|
3382
3383
|
l && /* @__PURE__ */ a(
|
|
3383
3384
|
Ur,
|
|
3384
3385
|
{
|
|
@@ -3442,8 +3443,8 @@ function ui(e) {
|
|
|
3442
3443
|
);
|
|
3443
3444
|
}
|
|
3444
3445
|
const pi = (e, t) => {
|
|
3445
|
-
const [n, o] = q([]), [r, i] = q([]), [s, d] = q(!1), l =
|
|
3446
|
-
return
|
|
3446
|
+
const [n, o] = q([]), [r, i] = q([]), [s, d] = q(!1), l = He(null);
|
|
3447
|
+
return Ye(() => {
|
|
3447
3448
|
if (!e.current || !l.current) return;
|
|
3448
3449
|
const u = e.current, p = l.current, c = () => {
|
|
3449
3450
|
var C;
|
|
@@ -3549,7 +3550,7 @@ const hi = S.div`
|
|
|
3549
3550
|
D.stopPropagation();
|
|
3550
3551
|
},
|
|
3551
3552
|
children: /* @__PURE__ */ m(
|
|
3552
|
-
|
|
3553
|
+
Je,
|
|
3553
3554
|
{
|
|
3554
3555
|
alignItems: "center",
|
|
3555
3556
|
gap: "8px",
|
|
@@ -3565,7 +3566,7 @@ const hi = S.div`
|
|
|
3565
3566
|
}
|
|
3566
3567
|
),
|
|
3567
3568
|
/* @__PURE__ */ a(
|
|
3568
|
-
|
|
3569
|
+
F,
|
|
3569
3570
|
{
|
|
3570
3571
|
textAlign: "start",
|
|
3571
3572
|
size: "medium",
|
|
@@ -3598,7 +3599,7 @@ const hi = S.div`
|
|
|
3598
3599
|
noFiltersLabel: r,
|
|
3599
3600
|
titleClearFilter: i,
|
|
3600
3601
|
titleFilter: s
|
|
3601
|
-
} = e, d =
|
|
3602
|
+
} = e, d = He(null), l = He(null), u = He(null), {
|
|
3602
3603
|
visible: p,
|
|
3603
3604
|
hidden: c,
|
|
3604
3605
|
showOverflowIndicator: h,
|
|
@@ -3606,11 +3607,11 @@ const hi = S.div`
|
|
|
3606
3607
|
} = pi(d, t), [f, y] = q(!1), v = (w) => {
|
|
3607
3608
|
w.stopPropagation(), y((A) => !A);
|
|
3608
3609
|
};
|
|
3609
|
-
|
|
3610
|
+
Ye(() => {
|
|
3610
3611
|
const w = (A) => {
|
|
3611
|
-
var
|
|
3612
|
+
var ge, ae;
|
|
3612
3613
|
const L = A.target;
|
|
3613
|
-
!((
|
|
3614
|
+
!((ge = l.current) != null && ge.contains(L)) && !((ae = u.current) != null && ae.contains(L)) && y(!1);
|
|
3614
3615
|
};
|
|
3615
3616
|
return f && window.addEventListener("mousedown", w), () => window.removeEventListener("mousedown", w);
|
|
3616
3617
|
}, [f]);
|
|
@@ -3621,11 +3622,11 @@ const hi = S.div`
|
|
|
3621
3622
|
icon: w.icon
|
|
3622
3623
|
})), E = (w) => {
|
|
3623
3624
|
var A, L;
|
|
3624
|
-
(L = (A = c.find((
|
|
3625
|
+
(L = (A = c.find((R) => R.label === w)) == null ? void 0 : A.onClose) == null || L.call(A), y(!1);
|
|
3625
3626
|
};
|
|
3626
3627
|
return /* @__PURE__ */ m(ui, { borderRadius: "8px", width: "100%", children: [
|
|
3627
3628
|
/* @__PURE__ */ a(gi, { ref: g, children: t.map((w) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
|
|
3628
|
-
|
|
3629
|
+
Ue,
|
|
3629
3630
|
{
|
|
3630
3631
|
appearance: "primary",
|
|
3631
3632
|
displayIcon: !0,
|
|
@@ -3635,7 +3636,7 @@ const hi = S.div`
|
|
|
3635
3636
|
onClose: w.onClose
|
|
3636
3637
|
}
|
|
3637
3638
|
) }, w.label)) }),
|
|
3638
|
-
/* @__PURE__ */ m(
|
|
3639
|
+
/* @__PURE__ */ m(Je, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
3639
3640
|
/* @__PURE__ */ a(
|
|
3640
3641
|
ce,
|
|
3641
3642
|
{
|
|
@@ -3648,9 +3649,9 @@ const hi = S.div`
|
|
|
3648
3649
|
alignItems: "center",
|
|
3649
3650
|
padding: "0px 8px",
|
|
3650
3651
|
border: !0,
|
|
3651
|
-
children: x ? /* @__PURE__ */ a(
|
|
3652
|
+
children: x ? /* @__PURE__ */ a(F, { size: "small", type: "label", appearance: "gray", children: r }) : /* @__PURE__ */ m(j, { children: [
|
|
3652
3653
|
p.map((w) => /* @__PURE__ */ a(
|
|
3653
|
-
|
|
3654
|
+
Ue,
|
|
3654
3655
|
{
|
|
3655
3656
|
"data-filter-tag": "true",
|
|
3656
3657
|
appearance: "primary",
|
|
@@ -3669,7 +3670,7 @@ const hi = S.div`
|
|
|
3669
3670
|
style: { position: "relative", display: "inline-block" },
|
|
3670
3671
|
children: [
|
|
3671
3672
|
/* @__PURE__ */ a(fi, { onClick: v, children: /* @__PURE__ */ a(
|
|
3672
|
-
|
|
3673
|
+
Ue,
|
|
3673
3674
|
{
|
|
3674
3675
|
appearance: "primary",
|
|
3675
3676
|
label: `+${c.length}`
|
|
@@ -3742,8 +3743,8 @@ const hi = S.div`
|
|
|
3742
3743
|
border: !0,
|
|
3743
3744
|
width: "100%",
|
|
3744
3745
|
height: "36px",
|
|
3745
|
-
children: s ? /* @__PURE__ */ a(
|
|
3746
|
-
|
|
3746
|
+
children: s ? /* @__PURE__ */ a(F, { size: "small", type: "label", appearance: "gray", children: r }) : t == null ? void 0 : t.map((d) => /* @__PURE__ */ a(
|
|
3747
|
+
Ue,
|
|
3747
3748
|
{
|
|
3748
3749
|
appearance: "primary",
|
|
3749
3750
|
displayIcon: !0,
|
|
@@ -3856,7 +3857,7 @@ const hi = S.div`
|
|
|
3856
3857
|
),
|
|
3857
3858
|
value: e
|
|
3858
3859
|
}), Ti = (e) => ({
|
|
3859
|
-
schema:
|
|
3860
|
+
schema: Le().test(
|
|
3860
3861
|
"isArrayOrString",
|
|
3861
3862
|
"Debe ser un array de strings/numbers o un solo string",
|
|
3862
3863
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -3865,7 +3866,7 @@ const hi = S.div`
|
|
|
3865
3866
|
),
|
|
3866
3867
|
value: e
|
|
3867
3868
|
}), xi = (e) => ({
|
|
3868
|
-
schema:
|
|
3869
|
+
schema: Le().test(
|
|
3869
3870
|
"isArrayOrString",
|
|
3870
3871
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
3871
3872
|
(t) => Array.isArray(t) ? t.every(
|
|
@@ -3923,7 +3924,7 @@ function Ci({
|
|
|
3923
3924
|
let r;
|
|
3924
3925
|
const i = {
|
|
3925
3926
|
ruleName: pe().required("El nombre de la regla es requerido"),
|
|
3926
|
-
value:
|
|
3927
|
+
value: We(() => dn(
|
|
3927
3928
|
r.values.howToSetTheDecision
|
|
3928
3929
|
)(
|
|
3929
3930
|
r.values.value,
|
|
@@ -3966,7 +3967,7 @@ function Ci({
|
|
|
3966
3967
|
// },
|
|
3967
3968
|
// );
|
|
3968
3969
|
// }),
|
|
3969
|
-
conditionsThatEstablishesTheDecision:
|
|
3970
|
+
conditionsThatEstablishesTheDecision: We((l, { parent: u }) => {
|
|
3970
3971
|
var h;
|
|
3971
3972
|
if ((u == null ? void 0 : u.toggleNone) && Object.keys(u.conditionsThatEstablishesTheDecision || {}).length > 0) return te().shape({});
|
|
3972
3973
|
const c = ((h = e.conditionsThatEstablishesTheDecision) == null ? void 0 : h.reduce(
|
|
@@ -3987,9 +3988,9 @@ function Ci({
|
|
|
3987
3988
|
return te(c);
|
|
3988
3989
|
})
|
|
3989
3990
|
};
|
|
3990
|
-
n.terms && (i.effectiveFrom =
|
|
3991
|
+
n.terms && (i.effectiveFrom = Fe().required(
|
|
3991
3992
|
"La fecha de inicio es requerida"
|
|
3992
|
-
), i.validUntil =
|
|
3993
|
+
), i.validUntil = Fe().when(
|
|
3993
3994
|
"checkClosed",
|
|
3994
3995
|
(l, u, { parent: p }) => (p == null ? void 0 : p.checkClosed) ? u.required("La fecha de finalización es requerida").test(
|
|
3995
3996
|
"is-after-startDate",
|
|
@@ -4081,7 +4082,7 @@ const Si = S.div`
|
|
|
4081
4082
|
} = e, [l, u] = q(t), p = (c) => {
|
|
4082
4083
|
u(c.target.checked), o(c);
|
|
4083
4084
|
};
|
|
4084
|
-
return
|
|
4085
|
+
return Ye(() => {
|
|
4085
4086
|
u(t);
|
|
4086
4087
|
}, [t]), /* @__PURE__ */ m(j, { children: [
|
|
4087
4088
|
/* @__PURE__ */ a(T, { children: /* @__PURE__ */ a(
|
|
@@ -4093,7 +4094,7 @@ const Si = S.div`
|
|
|
4093
4094
|
onChange: p,
|
|
4094
4095
|
size: "small",
|
|
4095
4096
|
value: d,
|
|
4096
|
-
children: /* @__PURE__ */ a(
|
|
4097
|
+
children: /* @__PURE__ */ a(F, { size: "medium", type: "label", weight: "bold", children: i })
|
|
4097
4098
|
}
|
|
4098
4099
|
) }),
|
|
4099
4100
|
l && /* @__PURE__ */ a(j, { children: n })
|
|
@@ -4113,17 +4114,17 @@ const Si = S.div`
|
|
|
4113
4114
|
messageEnd: c = "",
|
|
4114
4115
|
statusStart: h = "pending",
|
|
4115
4116
|
statusEnd: g = "pending"
|
|
4116
|
-
} = e, [f, y] = q(s), [v, x] = q(l), [D, C] = q(u), E = ({ target:
|
|
4117
|
-
y(
|
|
4118
|
-
}, w = (
|
|
4119
|
-
x(
|
|
4120
|
-
}, A = (
|
|
4121
|
-
C(
|
|
4117
|
+
} = e, [f, y] = q(s), [v, x] = q(l), [D, C] = q(u), E = ({ target: R }) => {
|
|
4118
|
+
y(R.checked), o && o(R.checked);
|
|
4119
|
+
}, w = (R) => {
|
|
4120
|
+
x(R.target.value), t(R);
|
|
4121
|
+
}, A = (R) => {
|
|
4122
|
+
C(R.target.value), n(R);
|
|
4122
4123
|
}, L = ue("(max-width: 400px)");
|
|
4123
4124
|
return /* @__PURE__ */ m(j, { children: [
|
|
4124
4125
|
/* @__PURE__ */ m(T, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
4125
4126
|
/* @__PURE__ */ a(
|
|
4126
|
-
|
|
4127
|
+
F,
|
|
4127
4128
|
{
|
|
4128
4129
|
appearance: "gray",
|
|
4129
4130
|
margin: "10px 0",
|
|
@@ -4160,7 +4161,7 @@ const Si = S.div`
|
|
|
4160
4161
|
gap: "24px",
|
|
4161
4162
|
children: [
|
|
4162
4163
|
/* @__PURE__ */ a(
|
|
4163
|
-
|
|
4164
|
+
$e,
|
|
4164
4165
|
{
|
|
4165
4166
|
id: "dateStart",
|
|
4166
4167
|
label: r,
|
|
@@ -4173,7 +4174,7 @@ const Si = S.div`
|
|
|
4173
4174
|
}
|
|
4174
4175
|
),
|
|
4175
4176
|
f && /* @__PURE__ */ a(
|
|
4176
|
-
|
|
4177
|
+
$e,
|
|
4177
4178
|
{
|
|
4178
4179
|
id: "dateEnd",
|
|
4179
4180
|
label: i,
|
|
@@ -4224,7 +4225,7 @@ const Si = S.div`
|
|
|
4224
4225
|
alignItems: "center",
|
|
4225
4226
|
gap: "64px",
|
|
4226
4227
|
children: [
|
|
4227
|
-
/* @__PURE__ */ a(
|
|
4228
|
+
/* @__PURE__ */ a(F, { type: "title", size: "small", weight: "bold", appearance: "gray", children: n.factsThatConditionIt }),
|
|
4228
4229
|
/* @__PURE__ */ a(
|
|
4229
4230
|
mt,
|
|
4230
4231
|
{
|
|
@@ -4232,7 +4233,7 @@ const Si = S.div`
|
|
|
4232
4233
|
onChange: () => s(!t.values.toggleNone),
|
|
4233
4234
|
checked: t.values.toggleNone,
|
|
4234
4235
|
size: "small",
|
|
4235
|
-
children: /* @__PURE__ */ a(
|
|
4236
|
+
children: /* @__PURE__ */ a(F, { as: "span", size: "medium", type: "label", weight: "bold", children: n.none })
|
|
4236
4237
|
}
|
|
4237
4238
|
)
|
|
4238
4239
|
]
|
|
@@ -4279,7 +4280,7 @@ const Si = S.div`
|
|
|
4279
4280
|
)
|
|
4280
4281
|
] }),
|
|
4281
4282
|
/* @__PURE__ */ a(Y, {}),
|
|
4282
|
-
l && /* @__PURE__ */ a(
|
|
4283
|
+
l && /* @__PURE__ */ a(F, { type: "label", size: "medium", appearance: "danger", children: typeof t.errors.conditionsThatEstablishesTheDecision == "string" ? t.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
4283
4284
|
/* @__PURE__ */ m(T, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
4284
4285
|
/* @__PURE__ */ a(Q, { appearance: "gray", onClick: o, children: n.cancel }),
|
|
4285
4286
|
/* @__PURE__ */ a(Q, { type: "submit", children: n.confirm })
|
|
@@ -4490,7 +4491,7 @@ const Si = S.div`
|
|
|
4490
4491
|
}
|
|
4491
4492
|
),
|
|
4492
4493
|
/* @__PURE__ */ a(cn, { children: /* @__PURE__ */ a(
|
|
4493
|
-
|
|
4494
|
+
F,
|
|
4494
4495
|
{
|
|
4495
4496
|
appearance: c,
|
|
4496
4497
|
cursorHover: !0,
|
|
@@ -4527,7 +4528,7 @@ const Si = S.div`
|
|
|
4527
4528
|
onClick: o,
|
|
4528
4529
|
onKeyDown: l,
|
|
4529
4530
|
children: /* @__PURE__ */ a(
|
|
4530
|
-
|
|
4531
|
+
F,
|
|
4531
4532
|
{
|
|
4532
4533
|
appearance: c,
|
|
4533
4534
|
cursorHover: !0,
|
|
@@ -4557,7 +4558,7 @@ const Si = S.div`
|
|
|
4557
4558
|
children: [
|
|
4558
4559
|
y && /* @__PURE__ */ a(B, { appearance: "primary", icon: /* @__PURE__ */ a(Xn, {}) }),
|
|
4559
4560
|
/* @__PURE__ */ a(
|
|
4560
|
-
|
|
4561
|
+
F,
|
|
4561
4562
|
{
|
|
4562
4563
|
appearance: y ? "primary" : "dark",
|
|
4563
4564
|
size: "small",
|
|
@@ -4642,7 +4643,7 @@ var [In, $n] = An();
|
|
|
4642
4643
|
function ji(e, t) {
|
|
4643
4644
|
return e.source === t.source && e.flags.split("").sort().join("") === t.flags.split("").sort().join("");
|
|
4644
4645
|
}
|
|
4645
|
-
function
|
|
4646
|
+
function Xe(e, t, n = !0, o = ["__key"]) {
|
|
4646
4647
|
if (e === t) return !0;
|
|
4647
4648
|
if (typeof t == "object" && typeof e == "object" && e !== null && t !== null) {
|
|
4648
4649
|
if (e instanceof Map || e instanceof Set) return !1;
|
|
@@ -4656,7 +4657,7 @@ function Ye(e, t, n = !0, o = ["__key"]) {
|
|
|
4656
4657
|
for (const s of o)
|
|
4657
4658
|
if ((s in r || s in i) && r[s] !== i[s]) return !1;
|
|
4658
4659
|
for (const s in r)
|
|
4659
|
-
if (!(s in i) || r[s] !== i[s] && !n || n && !
|
|
4660
|
+
if (!(s in i) || r[s] !== i[s] && !n || n && !Xe(r[s], i[s], n, o)) return !1;
|
|
4660
4661
|
return !0;
|
|
4661
4662
|
}
|
|
4662
4663
|
return !1;
|
|
@@ -4664,11 +4665,11 @@ function Ye(e, t, n = !0, o = ["__key"]) {
|
|
|
4664
4665
|
function Fn(e) {
|
|
4665
4666
|
return e.split(" ").filter((t) => t);
|
|
4666
4667
|
}
|
|
4667
|
-
function
|
|
4668
|
+
function Oe(e) {
|
|
4668
4669
|
return { x: e.clientX, y: e.clientY };
|
|
4669
4670
|
}
|
|
4670
4671
|
Array();
|
|
4671
|
-
var Zt = typeof window < "u", J = /* @__PURE__ */ new WeakMap(),
|
|
4672
|
+
var Zt = typeof window < "u", J = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap();
|
|
4672
4673
|
function Rn() {
|
|
4673
4674
|
if (!Zt) return !1;
|
|
4674
4675
|
if ("userAgentData" in navigator)
|
|
@@ -4759,9 +4760,9 @@ function Hi() {
|
|
|
4759
4760
|
b.activeState && Ee(b.activeState.parent, void 0, b), b.selectedState && Se(b.selectedState.nodes, b.selectedState.parent, b), b.selectedState = b.activeState = void 0;
|
|
4760
4761
|
}
|
|
4761
4762
|
function Gi() {
|
|
4762
|
-
if (b.pointerDown && (b.pointerDown.node.el.draggable = !0), b.pointerDown = void 0, !
|
|
4763
|
+
if (b.pointerDown && (b.pointerDown.node.el.draggable = !0), b.pointerDown = void 0, !ie(b)) return;
|
|
4763
4764
|
const e = b.currentParent.data.config;
|
|
4764
|
-
|
|
4765
|
+
ie(b) && e.handleEnd(b);
|
|
4765
4766
|
}
|
|
4766
4767
|
function Bi(e) {
|
|
4767
4768
|
e.key === "Escape" && (b.selectedState && Se(b.selectedState.nodes, b.selectedState.parent, b), b.activeState && Ee(b.activeState.parent, void 0, b), b.selectedState = b.activeState = void 0);
|
|
@@ -4775,15 +4776,15 @@ function qi(e) {
|
|
|
4775
4776
|
function Wi(e) {
|
|
4776
4777
|
if (!ee(b)) return;
|
|
4777
4778
|
K(e);
|
|
4778
|
-
const { x: t, y: n } =
|
|
4779
|
+
const { x: t, y: n } = Oe(e);
|
|
4779
4780
|
ee(b) && yt({ x: t, y: n }, e, b);
|
|
4780
4781
|
}
|
|
4781
4782
|
function Yi(e) {
|
|
4782
4783
|
if (!b.pointerDown || !b.pointerDown.validated) return;
|
|
4783
4784
|
const t = b.pointerDown.parent.data.config;
|
|
4784
4785
|
if (!(e.pointerType === "mouse" && !Rn()))
|
|
4785
|
-
if (
|
|
4786
|
-
|
|
4786
|
+
if (ie(b))
|
|
4787
|
+
ie(b) && pn(e, b);
|
|
4787
4788
|
else {
|
|
4788
4789
|
if (K(e), t.longPress && !b.longPress) {
|
|
4789
4790
|
clearTimeout(b.longPressTimeout), b.longPress = !1;
|
|
@@ -4817,12 +4818,12 @@ function Xi({
|
|
|
4817
4818
|
keydown: Bi,
|
|
4818
4819
|
drop: qi,
|
|
4819
4820
|
pointermove: Yi,
|
|
4820
|
-
pointercancel:
|
|
4821
|
+
pointercancel: oe(o.handlePointercancel),
|
|
4821
4822
|
touchmove: (c) => {
|
|
4822
4823
|
ee(b) && c.cancelable && K(c);
|
|
4823
4824
|
},
|
|
4824
4825
|
contextmenu: (c) => {
|
|
4825
|
-
|
|
4826
|
+
ie(b) && K(c);
|
|
4826
4827
|
}
|
|
4827
4828
|
})), Mn(e);
|
|
4828
4829
|
const [r, i] = An(), s = {
|
|
@@ -4887,7 +4888,7 @@ function Xi({
|
|
|
4887
4888
|
}), ea(e, s), bt(e, !0);
|
|
4888
4889
|
}
|
|
4889
4890
|
function On(e, t, n, o, r, i) {
|
|
4890
|
-
const { x: s, y: d } =
|
|
4891
|
+
const { x: s, y: d } = Oe(n), l = e.el.getBoundingClientRect();
|
|
4891
4892
|
return {
|
|
4892
4893
|
affectedNodes: [],
|
|
4893
4894
|
ascendingDirection: !1,
|
|
@@ -4927,8 +4928,8 @@ function Qi({
|
|
|
4927
4928
|
targetNodes: n
|
|
4928
4929
|
}) {
|
|
4929
4930
|
bt(e.el);
|
|
4930
|
-
const o = t.map((l) => l.data.value), r =
|
|
4931
|
-
...r.filter((l) => !o.some((u) =>
|
|
4931
|
+
const o = t.map((l) => l.data.value), r = Re(e.el, e.data), i = t[0].data.index, s = [...e.data.enabledNodes], d = [
|
|
4932
|
+
...r.filter((l) => !o.some((u) => Xe(l, u)))
|
|
4932
4933
|
];
|
|
4933
4934
|
d.splice(n[0].data.index, 0, ...o), "draggedNode" in b && (b.currentTargetValue = n[0].data.value), zt(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
|
|
4934
4935
|
parent: {
|
|
@@ -4973,7 +4974,7 @@ function Se(e, t, n) {
|
|
|
4973
4974
|
function lt(e, t, n, o, r = !1) {
|
|
4974
4975
|
o.pointerSelection = r;
|
|
4975
4976
|
for (const i of t)
|
|
4976
|
-
i.el.setAttribute("aria-selected", "true"),
|
|
4977
|
+
i.el.setAttribute("aria-selected", "true"), Ie([i.el], e.data.config.selectedClass, !0);
|
|
4977
4978
|
o.selectedState = {
|
|
4978
4979
|
nodes: t,
|
|
4979
4980
|
parent: e
|
|
@@ -4994,10 +4995,10 @@ function Zi({
|
|
|
4994
4995
|
}) {
|
|
4995
4996
|
bt(n.el);
|
|
4996
4997
|
const d = o.map((h) => h.data.value), l = [
|
|
4997
|
-
...
|
|
4998
|
-
(h) => !d.some((g) =>
|
|
4998
|
+
...Re(e.el, e.data).filter(
|
|
4999
|
+
(h) => !d.some((g) => Xe(h, g))
|
|
4999
5000
|
)
|
|
5000
|
-
], u =
|
|
5001
|
+
], u = Re(t.el, t.data), p = n.el === t.el && t.data.config.sortable === !1;
|
|
5001
5002
|
let c;
|
|
5002
5003
|
i.length ? (p ? c = r : t.data.config.sortable === !1 ? c = t.data.enabledNodes.length : c = i[0].data.index, u.splice(c, 0, ...d)) : (c = p ? r : t.data.enabledNodes.length, u.splice(c, 0, ...d)), zt(e.el, e.data, l), zt(t.el, t.data, u), t.data.config.onTransfer && t.data.config.onTransfer({
|
|
5003
5004
|
sourceParent: e,
|
|
@@ -5017,7 +5018,7 @@ function Zi({
|
|
|
5017
5018
|
targetNodes: i || []
|
|
5018
5019
|
});
|
|
5019
5020
|
}
|
|
5020
|
-
function
|
|
5021
|
+
function Re(e, t) {
|
|
5021
5022
|
return [...t.getValues(e)];
|
|
5022
5023
|
}
|
|
5023
5024
|
function zt(e, t, n) {
|
|
@@ -5035,7 +5036,7 @@ function Mn(e) {
|
|
|
5035
5036
|
function ee(e) {
|
|
5036
5037
|
return "draggedNode" in e && !!e.draggedNode;
|
|
5037
5038
|
}
|
|
5038
|
-
function
|
|
5039
|
+
function ie(e) {
|
|
5039
5040
|
return "synthDragging" in e && !!e.synthDragging;
|
|
5040
5041
|
}
|
|
5041
5042
|
function ea(e, t) {
|
|
@@ -5062,7 +5063,7 @@ function ea(e, t) {
|
|
|
5062
5063
|
);
|
|
5063
5064
|
return;
|
|
5064
5065
|
}
|
|
5065
|
-
const r =
|
|
5066
|
+
const r = me.get(o);
|
|
5066
5067
|
if (!r) return;
|
|
5067
5068
|
const i = o.parentNode;
|
|
5068
5069
|
if (!(i instanceof HTMLElement)) return;
|
|
@@ -5086,24 +5087,24 @@ function ta(e) {
|
|
|
5086
5087
|
var n;
|
|
5087
5088
|
const t = e.parent.data.config;
|
|
5088
5089
|
e.node.data.abortControllers.mainNode = ht(e.node.el, {
|
|
5089
|
-
keydown:
|
|
5090
|
-
dragstart:
|
|
5091
|
-
dragover:
|
|
5092
|
-
dragenter:
|
|
5093
|
-
dragleave:
|
|
5094
|
-
dragend:
|
|
5095
|
-
drop:
|
|
5096
|
-
focus:
|
|
5097
|
-
blur:
|
|
5098
|
-
pointerup:
|
|
5099
|
-
pointercancel:
|
|
5100
|
-
pointerdown:
|
|
5090
|
+
keydown: oe(t.handleNodeKeydown),
|
|
5091
|
+
dragstart: oe(t.handleDragstart),
|
|
5092
|
+
dragover: oe(t.handleNodeDragover),
|
|
5093
|
+
dragenter: oe(t.handleNodeDragenter),
|
|
5094
|
+
dragleave: oe(t.handleNodeDragleave),
|
|
5095
|
+
dragend: oe(t.handleDragend),
|
|
5096
|
+
drop: oe(t.handleNodeDrop),
|
|
5097
|
+
focus: oe(t.handleNodeFocus),
|
|
5098
|
+
blur: oe(t.handleNodeBlur),
|
|
5099
|
+
pointerup: oe(t.handleNodePointerup),
|
|
5100
|
+
pointercancel: oe(t.handlePointercancel),
|
|
5101
|
+
pointerdown: oe(t.handleNodePointerdown),
|
|
5101
5102
|
handleNodePointerover: t.handleNodePointerover,
|
|
5102
5103
|
touchmove: (o) => {
|
|
5103
5104
|
ee(b) && o.cancelable && K(o);
|
|
5104
5105
|
},
|
|
5105
5106
|
contextmenu: (o) => {
|
|
5106
|
-
|
|
5107
|
+
ie(b) && K(o);
|
|
5107
5108
|
}
|
|
5108
5109
|
}), e.node.el.draggable = !0, t.reapplyDragClasses(e.node.el, e.parent.data), (n = e.parent.data.config.plugins) == null || n.forEach((o) => {
|
|
5109
5110
|
var r, i;
|
|
@@ -5112,15 +5113,15 @@ function ta(e) {
|
|
|
5112
5113
|
}
|
|
5113
5114
|
function Pn(e) {
|
|
5114
5115
|
var t;
|
|
5115
|
-
|
|
5116
|
+
me.set(e.node.el, e.node.data), (t = e.parent.data.config.plugins) == null || t.forEach((n) => {
|
|
5116
5117
|
var o, r;
|
|
5117
5118
|
(r = (o = n(e.parent.el)) == null ? void 0 : o.setupNodeRemap) == null || r.call(o, e);
|
|
5118
5119
|
});
|
|
5119
5120
|
}
|
|
5120
5121
|
function na(e, t) {
|
|
5121
5122
|
if (!ee(b)) return;
|
|
5122
|
-
const n =
|
|
5123
|
-
b.draggedNode.el === e &&
|
|
5123
|
+
const n = ie(b) ? t.config.synthDropZoneClass : t.config.dropZoneClass;
|
|
5124
|
+
b.draggedNode.el === e && Ie([e], n, !0);
|
|
5124
5125
|
}
|
|
5125
5126
|
function oa(e) {
|
|
5126
5127
|
var t;
|
|
@@ -5151,7 +5152,7 @@ function bt(e, t) {
|
|
|
5151
5152
|
for (let l = 0; l < e.children.length; l++) {
|
|
5152
5153
|
const u = e.children[l];
|
|
5153
5154
|
if (!Tt(u) || u.id === "dnd-dragged-node-clone") continue;
|
|
5154
|
-
const p =
|
|
5155
|
+
const p = me.get(u);
|
|
5155
5156
|
(t || !p) && r.tearDownNode({
|
|
5156
5157
|
parent: {
|
|
5157
5158
|
el: e,
|
|
@@ -5171,7 +5172,7 @@ function bt(e, t) {
|
|
|
5171
5172
|
}
|
|
5172
5173
|
const i = n.getValues(e), s = [];
|
|
5173
5174
|
for (let l = 0; l < o.length; l++) {
|
|
5174
|
-
const u = o[l], p =
|
|
5175
|
+
const u = o[l], p = me.get(u);
|
|
5175
5176
|
if (r.draggableValue && !r.draggableValue(i[l])) continue;
|
|
5176
5177
|
const c = Object.assign(
|
|
5177
5178
|
p ?? {
|
|
@@ -5183,7 +5184,7 @@ function bt(e, t) {
|
|
|
5183
5184
|
index: l
|
|
5184
5185
|
}
|
|
5185
5186
|
);
|
|
5186
|
-
if (!ee(b) && b.activeState &&
|
|
5187
|
+
if (!ee(b) && b.activeState && Xe(b.activeState.node.data.value, c.value) && Ee(
|
|
5187
5188
|
{
|
|
5188
5189
|
data: n,
|
|
5189
5190
|
el: e
|
|
@@ -5193,7 +5194,7 @@ function bt(e, t) {
|
|
|
5193
5194
|
data: c
|
|
5194
5195
|
},
|
|
5195
5196
|
b
|
|
5196
|
-
), ee(b) &&
|
|
5197
|
+
), ee(b) && Xe(b.draggedNode.data.value, c.value)) {
|
|
5197
5198
|
b.draggedNode.data = c, b.draggedNode.el = u;
|
|
5198
5199
|
const h = b.draggedNodes.find(
|
|
5199
5200
|
(g) => g.data.value === c.value
|
|
@@ -5248,7 +5249,7 @@ function sa(e) {
|
|
|
5248
5249
|
return [];
|
|
5249
5250
|
}
|
|
5250
5251
|
function da(e) {
|
|
5251
|
-
ee(b) && (b.emit("scrollStarted", b), !
|
|
5252
|
+
ee(b) && (b.emit("scrollStarted", b), !ie(b) && (b.preventEnter = !0, Ft && clearTimeout(Ft), Ft = setTimeout(() => {
|
|
5252
5253
|
b.preventEnter = !1, b.emit("scrollEnded", b);
|
|
5253
5254
|
}, 100)));
|
|
5254
5255
|
}
|
|
@@ -5272,7 +5273,7 @@ function ca(e, t) {
|
|
|
5272
5273
|
if (n.onDragstart) {
|
|
5273
5274
|
const i = {
|
|
5274
5275
|
parent: e.targetData.parent,
|
|
5275
|
-
values:
|
|
5276
|
+
values: Re(
|
|
5276
5277
|
e.targetData.parent.el,
|
|
5277
5278
|
e.targetData.parent.data
|
|
5278
5279
|
),
|
|
@@ -5361,17 +5362,17 @@ function ua(e, t) {
|
|
|
5361
5362
|
);
|
|
5362
5363
|
}
|
|
5363
5364
|
function pa(e, t, n, o = !1) {
|
|
5364
|
-
|
|
5365
|
+
Ie(
|
|
5365
5366
|
t.map((r) => r.el),
|
|
5366
5367
|
o ? n.synthDraggingClass : n.draggingClass
|
|
5367
5368
|
), setTimeout(() => {
|
|
5368
5369
|
De(
|
|
5369
5370
|
t.map((r) => r.el),
|
|
5370
5371
|
o ? n.synthDraggingClass : n.draggingClass
|
|
5371
|
-
),
|
|
5372
|
+
), Ie(
|
|
5372
5373
|
t.map((r) => r.el),
|
|
5373
5374
|
o ? n.synthDragPlaceholderClass : n.dragPlaceholderClass
|
|
5374
|
-
),
|
|
5375
|
+
), Ie(
|
|
5375
5376
|
t.map((r) => r.el),
|
|
5376
5377
|
o ? n.synthDropZoneClass : n.dropZoneClass
|
|
5377
5378
|
), De(
|
|
@@ -5478,7 +5479,7 @@ function ya(e, t) {
|
|
|
5478
5479
|
}
|
|
5479
5480
|
function Ta(e, t) {
|
|
5480
5481
|
var o;
|
|
5481
|
-
if (!
|
|
5482
|
+
if (!ie(t)) return;
|
|
5482
5483
|
if (K(e.e), we) {
|
|
5483
5484
|
we = !1;
|
|
5484
5485
|
return;
|
|
@@ -5486,7 +5487,7 @@ function Ta(e, t) {
|
|
|
5486
5487
|
const n = (o = J.get(t.initialParent.el)) == null ? void 0 : o.config;
|
|
5487
5488
|
n != null && n.onDragend && n.onDragend({
|
|
5488
5489
|
parent: t.currentParent,
|
|
5489
|
-
values:
|
|
5490
|
+
values: Re(t.currentParent.el, t.currentParent.data),
|
|
5490
5491
|
draggedNode: t.draggedNode,
|
|
5491
5492
|
draggedNodes: t.draggedNodes,
|
|
5492
5493
|
state: t
|
|
@@ -5495,14 +5496,14 @@ function Ta(e, t) {
|
|
|
5495
5496
|
function xa(e) {
|
|
5496
5497
|
var p, c, h, g, f;
|
|
5497
5498
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
5498
|
-
const t = e.draggedNodes.map((y) => y.el), n = e.initialParent.data, o =
|
|
5499
|
-
|
|
5499
|
+
const t = e.draggedNodes.map((y) => y.el), n = e.initialParent.data, o = ie(e), r = (p = J.get(e.initialParent.el)) == null ? void 0 : p.config, i = o ? r == null ? void 0 : r.synthDropZoneClass : r == null ? void 0 : r.dropZoneClass, s = (c = n == null ? void 0 : n.config) == null ? void 0 : c.longPressClass, d = o ? (h = n == null ? void 0 : n.config) == null ? void 0 : h.synthDragPlaceholderClass : (g = n == null ? void 0 : n.config) == null ? void 0 : g.dragPlaceholderClass, l = e.originalZIndex;
|
|
5500
|
+
ie(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Ht(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(() => {
|
|
5500
5501
|
De(t, i), De(t, s), De(t, d);
|
|
5501
5502
|
}), Se(e.draggedNodes, e.currentParent, e), Ee(e.currentParent, void 0, e);
|
|
5502
5503
|
const u = { ...e };
|
|
5503
5504
|
(f = r == null ? void 0 : r.onDragend) == null || f.call(r, {
|
|
5504
5505
|
parent: u.currentParent,
|
|
5505
|
-
values:
|
|
5506
|
+
values: Re(
|
|
5506
5507
|
u.currentParent.el,
|
|
5507
5508
|
u.currentParent.data
|
|
5508
5509
|
),
|
|
@@ -5605,7 +5606,7 @@ function wa(e, t, n, o, r, i) {
|
|
|
5605
5606
|
function Ca(e, t, n) {
|
|
5606
5607
|
const o = e.targetData.parent.data.config;
|
|
5607
5608
|
t.longPressTimeout = setTimeout(() => {
|
|
5608
|
-
t && (t.longPress = !0, o.longPressClass && e.e.cancelable &&
|
|
5609
|
+
t && (t.longPress = !0, o.longPressClass && e.e.cancelable && Ie([n.el], o.longPressClass), K(e.e));
|
|
5609
5610
|
}, o.longPressDuration || 1e3);
|
|
5610
5611
|
}
|
|
5611
5612
|
function Ht(e, t = !0, n = !0) {
|
|
@@ -5620,9 +5621,9 @@ function Vn(e, t = !1) {
|
|
|
5620
5621
|
));
|
|
5621
5622
|
}
|
|
5622
5623
|
function pn(e, t, n = !1) {
|
|
5623
|
-
const o =
|
|
5624
|
+
const o = Oe(e);
|
|
5624
5625
|
t.coordinates.x = o.x, t.coordinates.y = o.y, Vn(t, n), t.scrollDebounceTimeout && (clearTimeout(t.scrollDebounceTimeout), t.scrollDebounceTimeout = void 0), t.scrollDebounceTimeout = setTimeout(() => {
|
|
5625
|
-
|
|
5626
|
+
ie(t) && yt(t.coordinates, e, t);
|
|
5626
5627
|
}, 16);
|
|
5627
5628
|
const r = La(o);
|
|
5628
5629
|
if (!r) {
|
|
@@ -5654,13 +5655,13 @@ function pn(e, t, n = !1) {
|
|
|
5654
5655
|
function Sa(e, t) {
|
|
5655
5656
|
var i;
|
|
5656
5657
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5657
|
-
const { x: o, y: r } =
|
|
5658
|
+
const { x: o, y: r } = Oe(e.e);
|
|
5658
5659
|
t.coordinates.y = r, t.coordinates.x = o, K(e.e), Ce(e.e), ee(t) && yt({ x: o, y: r }, e.e, t), e.targetData.parent.el === ((i = t.currentParent) == null ? void 0 : i.el) ? jn(e, t) : vt(e, t);
|
|
5659
5660
|
}
|
|
5660
5661
|
function Ea(e, t) {
|
|
5661
5662
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
5662
5663
|
K(e.e), Ce(e.e);
|
|
5663
|
-
const { x: o, y: r } =
|
|
5664
|
+
const { x: o, y: r } = Oe(e.e);
|
|
5664
5665
|
ee(t) && yt({ x: o, y: r }, e.e, t), vt(e, t);
|
|
5665
5666
|
}
|
|
5666
5667
|
function Na(e) {
|
|
@@ -5725,7 +5726,7 @@ function $a(e, t, n, o) {
|
|
|
5725
5726
|
return !1;
|
|
5726
5727
|
}
|
|
5727
5728
|
function jn(e, t) {
|
|
5728
|
-
const { x: n, y: o } =
|
|
5729
|
+
const { x: n, y: o } = Oe(e.e);
|
|
5729
5730
|
if (!$a(e, t, n, o))
|
|
5730
5731
|
return;
|
|
5731
5732
|
const r = t.draggedNode.data.index > e.targetData.node.data.index ? [e.targetData.node.data.index, t.draggedNode.data.index] : [t.draggedNode.data.index, e.targetData.node.data.index];
|
|
@@ -5737,9 +5738,9 @@ function jn(e, t) {
|
|
|
5737
5738
|
targetNodes: [e.targetData.node]
|
|
5738
5739
|
});
|
|
5739
5740
|
}
|
|
5740
|
-
function
|
|
5741
|
+
function oe(e) {
|
|
5741
5742
|
function t(n) {
|
|
5742
|
-
const o =
|
|
5743
|
+
const o = me.get(n);
|
|
5743
5744
|
if (!o) return;
|
|
5744
5745
|
const r = J.get(n.parentNode);
|
|
5745
5746
|
if (r)
|
|
@@ -5806,12 +5807,12 @@ function st(e) {
|
|
|
5806
5807
|
);
|
|
5807
5808
|
};
|
|
5808
5809
|
}
|
|
5809
|
-
function
|
|
5810
|
+
function Ie(e, t, n = !1) {
|
|
5810
5811
|
function o(r, i) {
|
|
5811
|
-
|
|
5812
|
+
me.set(r, i);
|
|
5812
5813
|
}
|
|
5813
5814
|
for (const r of e) {
|
|
5814
|
-
const i =
|
|
5815
|
+
const i = me.get(r), s = Fa(r, t, i, n);
|
|
5815
5816
|
s && o(r, s);
|
|
5816
5817
|
}
|
|
5817
5818
|
}
|
|
@@ -5841,7 +5842,7 @@ function De(e, t) {
|
|
|
5841
5842
|
o.classList.remove(...n);
|
|
5842
5843
|
continue;
|
|
5843
5844
|
}
|
|
5844
|
-
const r =
|
|
5845
|
+
const r = me.get(o) || J.get(o);
|
|
5845
5846
|
if (r)
|
|
5846
5847
|
for (const i of n)
|
|
5847
5848
|
r.privateClasses.includes(i) || o.classList.remove(i);
|
|
@@ -5887,7 +5888,7 @@ function Ra(e, t, n, o) {
|
|
|
5887
5888
|
n[l] = void 0, n[d] = void 0;
|
|
5888
5889
|
return;
|
|
5889
5890
|
}
|
|
5890
|
-
e[p] += s * i,
|
|
5891
|
+
e[p] += s * i, ie(n) && Vn(n), n[l] = requestAnimationFrame(u);
|
|
5891
5892
|
};
|
|
5892
5893
|
n[l] = requestAnimationFrame(u);
|
|
5893
5894
|
}
|
|
@@ -5926,7 +5927,7 @@ function La(e) {
|
|
|
5926
5927
|
if (!Tt(t)) return;
|
|
5927
5928
|
let n, o = !0;
|
|
5928
5929
|
for (; t && o; ) {
|
|
5929
|
-
if (
|
|
5930
|
+
if (me.has(t) || J.has(t)) {
|
|
5930
5931
|
o = !1, n = J.has(t);
|
|
5931
5932
|
break;
|
|
5932
5933
|
}
|
|
@@ -5941,7 +5942,7 @@ function La(e) {
|
|
|
5941
5942
|
}
|
|
5942
5943
|
} : void 0;
|
|
5943
5944
|
} else {
|
|
5944
|
-
const r =
|
|
5945
|
+
const r = me.get(t);
|
|
5945
5946
|
if (!r) return;
|
|
5946
5947
|
const i = J.get(t.parentNode);
|
|
5947
5948
|
return i ? {
|
|
@@ -6002,13 +6003,13 @@ function fn(e) {
|
|
|
6002
6003
|
}));
|
|
6003
6004
|
}
|
|
6004
6005
|
function ja(e, t = {}) {
|
|
6005
|
-
const n =
|
|
6006
|
+
const n = He(null), [o, r] = q(e);
|
|
6006
6007
|
function i(s = {}) {
|
|
6007
6008
|
fn({ parent: n, state: [o, r], ...s });
|
|
6008
6009
|
}
|
|
6009
|
-
return
|
|
6010
|
+
return Ye(() => {
|
|
6010
6011
|
fn({ parent: n, state: [o, r], ...t });
|
|
6011
|
-
}, [o]),
|
|
6012
|
+
}, [o]), Ye(() => () => {
|
|
6012
6013
|
n.current && Mn(n.current);
|
|
6013
6014
|
}, []), [n, o, r, i];
|
|
6014
6015
|
}
|
|
@@ -6064,9 +6065,9 @@ const mn = {
|
|
|
6064
6065
|
new CustomEvent(Rt, { detail: E })
|
|
6065
6066
|
);
|
|
6066
6067
|
}, [l]), x = (E) => {
|
|
6067
|
-
var
|
|
6068
|
+
var R;
|
|
6068
6069
|
if (l) return;
|
|
6069
|
-
const w = E.target, A = (
|
|
6070
|
+
const w = E.target, A = (R = w == null ? void 0 : w.closest) == null ? void 0 : R.call(w, "li.dnd-item"), L = (A == null ? void 0 : A.getAttribute("data-label")) || null;
|
|
6070
6071
|
L && (f(L), v(L));
|
|
6071
6072
|
}, D = _.useCallback(() => {
|
|
6072
6073
|
l || (f(null), v(null));
|
|
@@ -6091,7 +6092,7 @@ const mn = {
|
|
|
6091
6092
|
}, [h, n, d, l]);
|
|
6092
6093
|
const C = h.length === 0;
|
|
6093
6094
|
return /* @__PURE__ */ a(
|
|
6094
|
-
|
|
6095
|
+
ze,
|
|
6095
6096
|
{
|
|
6096
6097
|
legend: r,
|
|
6097
6098
|
width: "100%",
|
|
@@ -6116,7 +6117,7 @@ const mn = {
|
|
|
6116
6117
|
width: "100%",
|
|
6117
6118
|
alignItems: "center",
|
|
6118
6119
|
justifyContent: "center",
|
|
6119
|
-
children: /* @__PURE__ */ a(
|
|
6120
|
+
children: /* @__PURE__ */ a(F, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: t || "No hay elementos en esta lista" })
|
|
6120
6121
|
}
|
|
6121
6122
|
) : h.map((E, w) => {
|
|
6122
6123
|
const A = !l && g === E;
|
|
@@ -6128,7 +6129,7 @@ const mn = {
|
|
|
6128
6129
|
"data-first": !!(s && w === 0) || void 0,
|
|
6129
6130
|
$active: A,
|
|
6130
6131
|
children: /* @__PURE__ */ a(ce, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ a(
|
|
6131
|
-
|
|
6132
|
+
F,
|
|
6132
6133
|
{
|
|
6133
6134
|
type: "title",
|
|
6134
6135
|
appearance: A ? "primary" : "dark",
|
|
@@ -6277,11 +6278,11 @@ const mn = {
|
|
|
6277
6278
|
conditionsThatEstablishesTheDecision: t
|
|
6278
6279
|
// preserve full structure
|
|
6279
6280
|
};
|
|
6280
|
-
},
|
|
6281
|
+
}, je = /* @__PURE__ */ new Map(), qa = (e, t) => je.get(`${t}:${e}`), Wa = (e, t, n) => {
|
|
6281
6282
|
const o = `${t}:${e}`;
|
|
6282
|
-
if (
|
|
6283
|
-
const r =
|
|
6284
|
-
r !== void 0 &&
|
|
6283
|
+
if (je.set(o, n), je.size > 1e3) {
|
|
6284
|
+
const r = je.keys().next().value;
|
|
6285
|
+
r !== void 0 && je.delete(r);
|
|
6285
6286
|
}
|
|
6286
6287
|
}, vn = /* @__PURE__ */ new Map(), Ya = 1e3, Xa = (e) => {
|
|
6287
6288
|
const t = Date.now(), n = vn.get(e) || 0;
|
|
@@ -6345,7 +6346,7 @@ const mn = {
|
|
|
6345
6346
|
};
|
|
6346
6347
|
export {
|
|
6347
6348
|
El as BackAndNextButton,
|
|
6348
|
-
|
|
6349
|
+
Ze as BusinessRuleCard,
|
|
6349
6350
|
Sn as BusinessRuleCardNew,
|
|
6350
6351
|
Qt as BusinessRuleView,
|
|
6351
6352
|
Nn as BusinessRuleViewNew,
|