@isettingkit/business-rules 2.1.0 → 2.1.2
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 +405 -400
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m, Fragment as O } from "react/jsx-runtime";
|
|
2
2
|
import { MdOutlineDelete as rn, MdClear as on, MdAdd as Be, MdOutlineCreate as Tt, MdExpandLess as Ct, MdExpandMore as vn, MdInfo as Dt, MdCached as St, MdOutlineInfo as Et, MdClose as Nt, MdOutlineFilterAltOff as Jn, MdOutlineFilterAlt as et, MdChevronRight as Rn, MdArrowRight as kt, MdOutlineArrowCircleLeft as $t, MdOutlineArrowCircleRight as At, MdOutlineChevronRight as It, MdOutlineError as Ft } from "react-icons/md";
|
|
3
|
-
import { inube as S, Stack as
|
|
3
|
+
import { inube as S, Stack as v, Divider as _, Icon as P, Text as k, SkeletonLine as Q, useMediaQuery as Z, Blanket as an, Button as H, Grid as qe, Toggle as ln, Checkbox as Sn, Date as ke, Box as Rt, Tag as ve, SkeletonIcon as Lt, Fieldset as ze, Tabs as Ot, OptionList as Pt, Checkpicker as Mt, Label as zt, OptionItem as Vt } from "@inubekit/inubekit";
|
|
4
4
|
import C, { keyframes as En, ThemeContext as Nn } from "styled-components";
|
|
5
5
|
import { ValueDataType as V, ValueHowToSetUp as K, DecisionConditionRender as Je, DecisionConditionRenderNew as Ln } from "@isettingkit/input";
|
|
6
6
|
import { DecisionViewConditionRenderer as Se, DecisionViewConditionRendererNew as Xe } from "@isettingkit/view";
|
|
@@ -48,11 +48,11 @@ C.div`
|
|
|
48
48
|
`;
|
|
49
49
|
const Ge = (e) => {
|
|
50
50
|
const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
|
|
51
|
-
return /* @__PURE__ */ a(qt, { children: /* @__PURE__ */ m(
|
|
51
|
+
return /* @__PURE__ */ a(qt, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
52
52
|
n,
|
|
53
53
|
t && /* @__PURE__ */ m(O, { children: [
|
|
54
54
|
/* @__PURE__ */ a(_, {}),
|
|
55
|
-
/* @__PURE__ */ a(
|
|
55
|
+
/* @__PURE__ */ a(v, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
|
|
56
56
|
P,
|
|
57
57
|
{
|
|
58
58
|
cursorHover: !0,
|
|
@@ -120,8 +120,8 @@ const Jt = {
|
|
|
120
120
|
textValues: l,
|
|
121
121
|
visibleConditions: p
|
|
122
122
|
} = e;
|
|
123
|
-
return i ? /* @__PURE__ */ m(
|
|
124
|
-
/* @__PURE__ */ a(
|
|
123
|
+
return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
|
|
124
|
+
/* @__PURE__ */ a(v, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
|
|
125
125
|
Se,
|
|
126
126
|
{
|
|
127
127
|
element: o,
|
|
@@ -133,7 +133,7 @@ const Jt = {
|
|
|
133
133
|
) }, t.ruleName),
|
|
134
134
|
/* @__PURE__ */ a(_, { dashed: !0 }),
|
|
135
135
|
/* @__PURE__ */ a(Pn, { children: /* @__PURE__ */ m(
|
|
136
|
-
|
|
136
|
+
v,
|
|
137
137
|
{
|
|
138
138
|
direction: "column",
|
|
139
139
|
gap: "12px",
|
|
@@ -151,7 +151,7 @@ const Jt = {
|
|
|
151
151
|
children: l.factsThatConditionIt
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
p.length > 0 && p.map((u) => /* @__PURE__ */ a(On, { children: /* @__PURE__ */ a(
|
|
154
|
+
p.length > 0 && p.map((u) => /* @__PURE__ */ a(On, { children: /* @__PURE__ */ a(v, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
|
|
155
155
|
Se,
|
|
156
156
|
{
|
|
157
157
|
element: { ...u, value: u.value },
|
|
@@ -173,24 +173,24 @@ const Jt = {
|
|
|
173
173
|
]
|
|
174
174
|
}
|
|
175
175
|
) })
|
|
176
|
-
] }) : /* @__PURE__ */ m(
|
|
177
|
-
/* @__PURE__ */ m(
|
|
176
|
+
] }) : /* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
|
|
177
|
+
/* @__PURE__ */ m(v, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
178
178
|
/* @__PURE__ */ a(Q, { animated: !0, width: "180px" }),
|
|
179
179
|
/* @__PURE__ */ a(Q, { animated: !0, width: "85px" })
|
|
180
180
|
] }, "loading"),
|
|
181
|
-
/* @__PURE__ */ m(
|
|
181
|
+
/* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
182
182
|
/* @__PURE__ */ a(_, { dashed: !0 }),
|
|
183
183
|
/* @__PURE__ */ a(Q, { animated: !0, width: "150px" })
|
|
184
184
|
] }),
|
|
185
185
|
/* @__PURE__ */ a(Pn, { children: /* @__PURE__ */ a(
|
|
186
|
-
|
|
186
|
+
v,
|
|
187
187
|
{
|
|
188
188
|
direction: "column",
|
|
189
189
|
gap: "12px",
|
|
190
190
|
justifyContent: "space-between",
|
|
191
191
|
height: "203px",
|
|
192
192
|
children: s.map((u, c) => /* @__PURE__ */ a(On, { children: /* @__PURE__ */ m(
|
|
193
|
-
|
|
193
|
+
v,
|
|
194
194
|
{
|
|
195
195
|
direction: "column",
|
|
196
196
|
gap: "12px",
|
|
@@ -302,8 +302,8 @@ const Jt = {
|
|
|
302
302
|
);
|
|
303
303
|
const s = Z("(max-width: 400px)");
|
|
304
304
|
return sn(
|
|
305
|
-
/* @__PURE__ */ a(nr, { smallScreen: s, children: /* @__PURE__ */ a(an, { children: /* @__PURE__ */ a(tr, { children: /* @__PURE__ */ m(
|
|
306
|
-
/* @__PURE__ */ a(
|
|
305
|
+
/* @__PURE__ */ a(nr, { smallScreen: s, children: /* @__PURE__ */ a(an, { children: /* @__PURE__ */ a(tr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
306
|
+
/* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
307
|
/* @__PURE__ */ a(k, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
308
308
|
/* @__PURE__ */ a(on, { size: "24px", cursor: "pointer", onClick: r })
|
|
309
309
|
] }) }),
|
|
@@ -405,7 +405,7 @@ const ot = C.div`
|
|
|
405
405
|
);
|
|
406
406
|
}, lr = (e) => {
|
|
407
407
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: i } = e;
|
|
408
|
-
return n ? /* @__PURE__ */ a(Ye, { children: /* @__PURE__ */ m(
|
|
408
|
+
return n ? /* @__PURE__ */ a(Ye, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
409
409
|
/* @__PURE__ */ a(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
410
410
|
/* @__PURE__ */ a(
|
|
411
411
|
Ge,
|
|
@@ -425,7 +425,7 @@ const ot = C.div`
|
|
|
425
425
|
handleOpenModal: r,
|
|
426
426
|
shouldRenderEmptyMessage: o
|
|
427
427
|
} = e, i = n || "Agregar decisión";
|
|
428
|
-
return /* @__PURE__ */ a(Ye, { children: o ? null : /* @__PURE__ */ m(
|
|
428
|
+
return /* @__PURE__ */ a(Ye, { children: o ? null : /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
429
429
|
/* @__PURE__ */ a(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
430
430
|
/* @__PURE__ */ a(
|
|
431
431
|
ot,
|
|
@@ -439,7 +439,7 @@ const ot = C.div`
|
|
|
439
439
|
},
|
|
440
440
|
handleView: () => r ? r() : null,
|
|
441
441
|
controls: !1,
|
|
442
|
-
children: /* @__PURE__ */ m(
|
|
442
|
+
children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
443
443
|
/* @__PURE__ */ a(P, { appearance: "gray", icon: /* @__PURE__ */ a(Be, {}), size: "35px" }),
|
|
444
444
|
/* @__PURE__ */ a(k, { appearance: "gray", type: "body", size: "large", children: i })
|
|
445
445
|
] })
|
|
@@ -504,7 +504,7 @@ const ot = C.div`
|
|
|
504
504
|
handleSubmitForm: g,
|
|
505
505
|
handleDelete: h,
|
|
506
506
|
terms: f = !0
|
|
507
|
-
} = e,
|
|
507
|
+
} = e, w = Z("(max-width: 681px)"), y = Z("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: T } = cr({
|
|
508
508
|
controls: n,
|
|
509
509
|
customTitleContentAddCard: t,
|
|
510
510
|
decisions: o,
|
|
@@ -514,13 +514,13 @@ const ot = C.div`
|
|
|
514
514
|
textValues: i
|
|
515
515
|
}), D = (o == null ? void 0 : o.length) === 0 && !p;
|
|
516
516
|
return /* @__PURE__ */ m(O, { children: [
|
|
517
|
-
/* @__PURE__ */ a(or, { children: /* @__PURE__ */ a(ar, { children: /* @__PURE__ */ a(
|
|
518
|
-
|
|
517
|
+
/* @__PURE__ */ a(or, { children: /* @__PURE__ */ a(ar, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: D ? /* @__PURE__ */ m(
|
|
518
|
+
v,
|
|
519
519
|
{
|
|
520
520
|
direction: "column",
|
|
521
521
|
gap: "28px",
|
|
522
522
|
width: "100%",
|
|
523
|
-
height:
|
|
523
|
+
height: w ? "auto" : "435px",
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
@@ -556,7 +556,7 @@ const ot = C.div`
|
|
|
556
556
|
) : /* @__PURE__ */ m(
|
|
557
557
|
qe,
|
|
558
558
|
{
|
|
559
|
-
templateColumns:
|
|
559
|
+
templateColumns: y ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
560
560
|
autoFlow: "row dense",
|
|
561
561
|
gap: "24px",
|
|
562
562
|
alignItems: "start",
|
|
@@ -564,9 +564,9 @@ const ot = C.div`
|
|
|
564
564
|
autoRows: "1fr",
|
|
565
565
|
justifyItems: "center",
|
|
566
566
|
padding: "6px",
|
|
567
|
-
height:
|
|
567
|
+
height: w ? "auto" : "484px",
|
|
568
568
|
children: [
|
|
569
|
-
|
|
569
|
+
x,
|
|
570
570
|
T && yn({
|
|
571
571
|
type: "add",
|
|
572
572
|
index: o == null ? void 0 : o.length,
|
|
@@ -646,8 +646,8 @@ const ot = C.div`
|
|
|
646
646
|
);
|
|
647
647
|
const s = Z("(max-width: 400px)");
|
|
648
648
|
return sn(
|
|
649
|
-
/* @__PURE__ */ a(ur, { $smallScreen: s, children: /* @__PURE__ */ a(an, { children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ m(
|
|
650
|
-
/* @__PURE__ */ a(
|
|
649
|
+
/* @__PURE__ */ a(ur, { $smallScreen: s, children: /* @__PURE__ */ a(an, { children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
650
|
+
/* @__PURE__ */ a(v, { direction: "column", gap: "24px", children: /* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
651
651
|
/* @__PURE__ */ a(k, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
652
652
|
/* @__PURE__ */ a(on, { size: "24px", cursor: "pointer", onClick: r })
|
|
653
653
|
] }) }),
|
|
@@ -801,8 +801,8 @@ const fr = C.div`
|
|
|
801
801
|
textValues: l,
|
|
802
802
|
visibleConditions: p
|
|
803
803
|
} = e;
|
|
804
|
-
return i ? /* @__PURE__ */ m(
|
|
805
|
-
/* @__PURE__ */ a(
|
|
804
|
+
return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
|
|
805
|
+
/* @__PURE__ */ a(v, { direction: "column", alignItems: "center", children: /* @__PURE__ */ a(
|
|
806
806
|
Se,
|
|
807
807
|
{
|
|
808
808
|
element: o,
|
|
@@ -814,7 +814,7 @@ const fr = C.div`
|
|
|
814
814
|
) }, t.ruleName),
|
|
815
815
|
/* @__PURE__ */ a(_, { dashed: !0 }),
|
|
816
816
|
/* @__PURE__ */ a(zn, { children: /* @__PURE__ */ m(
|
|
817
|
-
|
|
817
|
+
v,
|
|
818
818
|
{
|
|
819
819
|
direction: "column",
|
|
820
820
|
gap: "12px",
|
|
@@ -832,7 +832,7 @@ const fr = C.div`
|
|
|
832
832
|
children: l.factsThatConditionIt
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
|
-
p.length > 0 && p.map((u) => /* @__PURE__ */ a(Mn, { children: /* @__PURE__ */ a(
|
|
835
|
+
p.length > 0 && p.map((u) => /* @__PURE__ */ a(Mn, { children: /* @__PURE__ */ a(v, { direction: "column", padding: "8px", children: /* @__PURE__ */ a(
|
|
836
836
|
Se,
|
|
837
837
|
{
|
|
838
838
|
element: { ...u, value: u.value },
|
|
@@ -854,24 +854,24 @@ const fr = C.div`
|
|
|
854
854
|
]
|
|
855
855
|
}
|
|
856
856
|
) })
|
|
857
|
-
] }) : /* @__PURE__ */ m(
|
|
858
|
-
/* @__PURE__ */ m(
|
|
857
|
+
] }) : /* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
|
|
858
|
+
/* @__PURE__ */ m(v, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
859
859
|
/* @__PURE__ */ a(Q, { animated: !0, width: "180px" }),
|
|
860
860
|
/* @__PURE__ */ a(Q, { animated: !0, width: "85px" })
|
|
861
861
|
] }, "loading"),
|
|
862
|
-
/* @__PURE__ */ m(
|
|
862
|
+
/* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
863
863
|
/* @__PURE__ */ a(_, { dashed: !0 }),
|
|
864
864
|
/* @__PURE__ */ a(Q, { animated: !0, width: "150px" })
|
|
865
865
|
] }),
|
|
866
866
|
/* @__PURE__ */ a(zn, { children: /* @__PURE__ */ a(
|
|
867
|
-
|
|
867
|
+
v,
|
|
868
868
|
{
|
|
869
869
|
direction: "column",
|
|
870
870
|
gap: "12px",
|
|
871
871
|
justifyContent: "space-between",
|
|
872
872
|
height: "203px",
|
|
873
873
|
children: s.map((u, c) => /* @__PURE__ */ a(Mn, { children: /* @__PURE__ */ m(
|
|
874
|
-
|
|
874
|
+
v,
|
|
875
875
|
{
|
|
876
876
|
direction: "column",
|
|
877
877
|
gap: "12px",
|
|
@@ -976,11 +976,11 @@ C.div`
|
|
|
976
976
|
`;
|
|
977
977
|
const Ir = (e) => {
|
|
978
978
|
const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
|
|
979
|
-
return /* @__PURE__ */ a(Ar, { children: /* @__PURE__ */ m(
|
|
979
|
+
return /* @__PURE__ */ a(Ar, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
980
980
|
n,
|
|
981
981
|
t && /* @__PURE__ */ m(O, { children: [
|
|
982
982
|
/* @__PURE__ */ a(_, {}),
|
|
983
|
-
/* @__PURE__ */ a(
|
|
983
|
+
/* @__PURE__ */ a(v, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ a(
|
|
984
984
|
P,
|
|
985
985
|
{
|
|
986
986
|
cursorHover: !0,
|
|
@@ -996,7 +996,7 @@ const Ir = (e) => {
|
|
|
996
996
|
] }) });
|
|
997
997
|
}, Fr = (e) => {
|
|
998
998
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: i } = e;
|
|
999
|
-
return n ? /* @__PURE__ */ a(Ye, { children: /* @__PURE__ */ m(
|
|
999
|
+
return n ? /* @__PURE__ */ a(Ye, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
1000
1000
|
/* @__PURE__ */ a(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
1001
1001
|
/* @__PURE__ */ a(
|
|
1002
1002
|
Ir,
|
|
@@ -1022,7 +1022,7 @@ const Ir = (e) => {
|
|
|
1022
1022
|
handleOpenModal: r,
|
|
1023
1023
|
shouldRenderEmptyMessage: o
|
|
1024
1024
|
} = e, i = n || "Agregar decisión";
|
|
1025
|
-
return /* @__PURE__ */ a(Ye, { children: o ? null : /* @__PURE__ */ m(
|
|
1025
|
+
return /* @__PURE__ */ a(Ye, { children: o ? null : /* @__PURE__ */ m(v, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
1026
1026
|
/* @__PURE__ */ a(k, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
1027
1027
|
/* @__PURE__ */ a(
|
|
1028
1028
|
ot,
|
|
@@ -1036,7 +1036,7 @@ const Ir = (e) => {
|
|
|
1036
1036
|
},
|
|
1037
1037
|
handleView: () => r ? r() : null,
|
|
1038
1038
|
controls: !1,
|
|
1039
|
-
children: /* @__PURE__ */ m(
|
|
1039
|
+
children: /* @__PURE__ */ m(v, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
1040
1040
|
/* @__PURE__ */ a(P, { appearance: "gray", icon: /* @__PURE__ */ a(Be, {}), size: "35px" }),
|
|
1041
1041
|
/* @__PURE__ */ a(k, { appearance: "gray", type: "body", size: "large", children: i })
|
|
1042
1042
|
] })
|
|
@@ -1162,12 +1162,12 @@ function Ur({
|
|
|
1162
1162
|
};
|
|
1163
1163
|
t.terms && (l.effectiveFrom = $e().required("La fecha de inicio es requerida"), l.validUntil = $e().when(
|
|
1164
1164
|
"checkClosed",
|
|
1165
|
-
(h, f, { parent:
|
|
1165
|
+
(h, f, { parent: w }) => (w == null ? void 0 : w.checkClosed) ? f.required("La fecha de finalización es requerida").test(
|
|
1166
1166
|
"is-after-startDate",
|
|
1167
1167
|
"La fecha de finalización debe ser mayor o igual a la fecha de inicio",
|
|
1168
|
-
function(
|
|
1168
|
+
function(x) {
|
|
1169
1169
|
const T = this.parent.effectiveFrom;
|
|
1170
|
-
return !T || !
|
|
1170
|
+
return !T || !x ? !0 : new Date(x) >= new Date(T);
|
|
1171
1171
|
}
|
|
1172
1172
|
) : f.notRequired()
|
|
1173
1173
|
));
|
|
@@ -1177,8 +1177,8 @@ function Ur({
|
|
|
1177
1177
|
validationSchema: p,
|
|
1178
1178
|
validateOnBlur: !0,
|
|
1179
1179
|
onSubmit: (h) => {
|
|
1180
|
-
var
|
|
1181
|
-
const f = ((
|
|
1180
|
+
var x;
|
|
1181
|
+
const f = ((x = e.conditionGroups) == null ? void 0 : x.ConditionGroupId) ?? "group-primary", w = h.toggleNone ? [] : _r(h, r), y = {
|
|
1182
1182
|
...e,
|
|
1183
1183
|
ruleName: h.ruleName,
|
|
1184
1184
|
decisionDataType: h.decisionDataType,
|
|
@@ -1188,10 +1188,10 @@ function Ur({
|
|
|
1188
1188
|
validUntil: h.validUntil,
|
|
1189
1189
|
conditionGroups: {
|
|
1190
1190
|
ConditionGroupId: f,
|
|
1191
|
-
conditionsThatEstablishesTheDecision:
|
|
1191
|
+
conditionsThatEstablishesTheDecision: w
|
|
1192
1192
|
}
|
|
1193
1193
|
};
|
|
1194
|
-
n(
|
|
1194
|
+
n(y);
|
|
1195
1195
|
}
|
|
1196
1196
|
}), { formik: d, handleToggleNoneChange: (h) => {
|
|
1197
1197
|
d.setFieldValue("toggleNone", h), r.forEach((f) => {
|
|
@@ -1201,10 +1201,10 @@ function Ur({
|
|
|
1201
1201
|
void 0
|
|
1202
1202
|
);
|
|
1203
1203
|
else if (d.values.conditionsThatEstablishesTheDecision[f.conditionName] === void 0) {
|
|
1204
|
-
const
|
|
1204
|
+
const y = f.howToSetTheCondition === In.LIST_OF_VALUES_MULTI ? [] : "";
|
|
1205
1205
|
d.setFieldValue(
|
|
1206
1206
|
`conditionsThatEstablishesTheDecision.${f.conditionName}`,
|
|
1207
|
-
|
|
1207
|
+
y
|
|
1208
1208
|
);
|
|
1209
1209
|
}
|
|
1210
1210
|
});
|
|
@@ -1247,7 +1247,7 @@ const jr = C.div`
|
|
|
1247
1247
|
valueToggle: d = ""
|
|
1248
1248
|
} = e, [l, p] = M(n);
|
|
1249
1249
|
return /* @__PURE__ */ m(O, { children: [
|
|
1250
|
-
/* @__PURE__ */ a(
|
|
1250
|
+
/* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(
|
|
1251
1251
|
ln,
|
|
1252
1252
|
{
|
|
1253
1253
|
checked: l,
|
|
@@ -1278,15 +1278,15 @@ const jr = C.div`
|
|
|
1278
1278
|
messageEnd: c = "",
|
|
1279
1279
|
statusStart: g = "pending",
|
|
1280
1280
|
statusEnd: h = "pending"
|
|
1281
|
-
} = e, [f,
|
|
1282
|
-
|
|
1281
|
+
} = e, [f, w] = M(s), [y, x] = M(l), [T, D] = M(p), I = ({ target: $ }) => {
|
|
1282
|
+
w($.checked), r && r($.checked);
|
|
1283
1283
|
}, E = ($) => {
|
|
1284
|
-
|
|
1284
|
+
x($.target.value), n($);
|
|
1285
1285
|
}, F = ($) => {
|
|
1286
1286
|
D($.target.value), t($);
|
|
1287
1287
|
}, R = Z("(max-width: 400px)");
|
|
1288
1288
|
return /* @__PURE__ */ m(O, { children: [
|
|
1289
|
-
/* @__PURE__ */ m(
|
|
1289
|
+
/* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
1290
1290
|
/* @__PURE__ */ a(
|
|
1291
1291
|
k,
|
|
1292
1292
|
{
|
|
@@ -1299,7 +1299,7 @@ const jr = C.div`
|
|
|
1299
1299
|
}
|
|
1300
1300
|
),
|
|
1301
1301
|
/* @__PURE__ */ a(
|
|
1302
|
-
|
|
1302
|
+
v,
|
|
1303
1303
|
{
|
|
1304
1304
|
alignContent: "center",
|
|
1305
1305
|
justifyContent: "center",
|
|
@@ -1318,7 +1318,7 @@ const jr = C.div`
|
|
|
1318
1318
|
)
|
|
1319
1319
|
] }),
|
|
1320
1320
|
/* @__PURE__ */ m(
|
|
1321
|
-
|
|
1321
|
+
v,
|
|
1322
1322
|
{
|
|
1323
1323
|
direction: R ? "column" : "row",
|
|
1324
1324
|
justifyContent: "space-between",
|
|
@@ -1330,7 +1330,7 @@ const jr = C.div`
|
|
|
1330
1330
|
id: "dateStart",
|
|
1331
1331
|
label: o,
|
|
1332
1332
|
onChange: E,
|
|
1333
|
-
value:
|
|
1333
|
+
value: y,
|
|
1334
1334
|
required: d,
|
|
1335
1335
|
size: "compact",
|
|
1336
1336
|
status: g,
|
|
@@ -1367,7 +1367,7 @@ const jr = C.div`
|
|
|
1367
1367
|
termStartStatus: p,
|
|
1368
1368
|
termEndStatus: u
|
|
1369
1369
|
} = e;
|
|
1370
|
-
return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(
|
|
1370
|
+
return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
1371
1371
|
Je({
|
|
1372
1372
|
condition: i,
|
|
1373
1373
|
formik: n,
|
|
@@ -1375,7 +1375,7 @@ const jr = C.div`
|
|
|
1375
1375
|
}),
|
|
1376
1376
|
/* @__PURE__ */ a(_, { dashed: !0 }),
|
|
1377
1377
|
/* @__PURE__ */ a(jr, { children: /* @__PURE__ */ a(Br, { children: /* @__PURE__ */ m(
|
|
1378
|
-
|
|
1378
|
+
v,
|
|
1379
1379
|
{
|
|
1380
1380
|
direction: "column",
|
|
1381
1381
|
padding: "6px 12px",
|
|
@@ -1383,7 +1383,7 @@ const jr = C.div`
|
|
|
1383
1383
|
height: "272px",
|
|
1384
1384
|
children: [
|
|
1385
1385
|
/* @__PURE__ */ m(
|
|
1386
|
-
|
|
1386
|
+
v,
|
|
1387
1387
|
{
|
|
1388
1388
|
justifyContent: "space-between",
|
|
1389
1389
|
alignItems: "center",
|
|
@@ -1403,7 +1403,7 @@ const jr = C.div`
|
|
|
1403
1403
|
]
|
|
1404
1404
|
}
|
|
1405
1405
|
),
|
|
1406
|
-
/* @__PURE__ */ a(
|
|
1406
|
+
/* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => {
|
|
1407
1407
|
var g;
|
|
1408
1408
|
return /* @__PURE__ */ a(
|
|
1409
1409
|
qr,
|
|
@@ -1448,7 +1448,7 @@ const jr = C.div`
|
|
|
1448
1448
|
] }),
|
|
1449
1449
|
/* @__PURE__ */ a(_, {}),
|
|
1450
1450
|
l && /* @__PURE__ */ a(k, { 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
|
-
/* @__PURE__ */ m(
|
|
1451
|
+
/* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
1452
1452
|
/* @__PURE__ */ a(H, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
1453
1453
|
/* @__PURE__ */ a(H, { type: "submit", children: t.confirm })
|
|
1454
1454
|
] })
|
|
@@ -1466,7 +1466,7 @@ const jr = C.div`
|
|
|
1466
1466
|
decisionDataType: n.decisionDataType,
|
|
1467
1467
|
listOfPossibleValues: n.listOfPossibleValues
|
|
1468
1468
|
}, l = ((f = (h = n.conditionGroups[0]) == null ? void 0 : h.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
|
|
1469
|
-
(
|
|
1469
|
+
(w) => !w.hidden
|
|
1470
1470
|
)) || [], p = !!i.errors.conditionsThatEstablishesTheDecision && i.submitCount > 0, u = i.touched.effectiveFrom ? i.errors.effectiveFrom ? "invalid" : "valid" : void 0, c = i.touched.validUntil ? i.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
1471
1471
|
return /* @__PURE__ */ a(
|
|
1472
1472
|
Yr,
|
|
@@ -1478,20 +1478,20 @@ const jr = C.div`
|
|
|
1478
1478
|
visibleConditions: l,
|
|
1479
1479
|
normalizedDecision: d,
|
|
1480
1480
|
handleToggleNoneChange: s,
|
|
1481
|
-
handleConditionToggleChange: (
|
|
1482
|
-
if (!
|
|
1481
|
+
handleConditionToggleChange: (w, y) => (x) => {
|
|
1482
|
+
if (!x)
|
|
1483
1483
|
i.setFieldValue(
|
|
1484
|
-
`conditionsThatEstablishesTheDecision.${
|
|
1484
|
+
`conditionsThatEstablishesTheDecision.${w}`,
|
|
1485
1485
|
void 0
|
|
1486
1486
|
), i.setFieldTouched(
|
|
1487
|
-
`conditionsThatEstablishesTheDecision.${
|
|
1487
|
+
`conditionsThatEstablishesTheDecision.${w}`,
|
|
1488
1488
|
!1,
|
|
1489
1489
|
!1
|
|
1490
1490
|
), Object.keys(i.touched).filter((D) => D.startsWith("conditionsThatEstablishesTheDecision.")).some((D) => i.touched[D] === !0) || s(!0);
|
|
1491
1491
|
else {
|
|
1492
|
-
const T =
|
|
1492
|
+
const T = y ? [] : "";
|
|
1493
1493
|
s(!1), i.setFieldValue(
|
|
1494
|
-
`conditionsThatEstablishesTheDecision.${
|
|
1494
|
+
`conditionsThatEstablishesTheDecision.${w}`,
|
|
1495
1495
|
T
|
|
1496
1496
|
);
|
|
1497
1497
|
}
|
|
@@ -1550,7 +1550,7 @@ const jr = C.div`
|
|
|
1550
1550
|
handleSubmitForm: g,
|
|
1551
1551
|
handleDelete: h,
|
|
1552
1552
|
terms: f = !0
|
|
1553
|
-
} = e,
|
|
1553
|
+
} = e, w = Z("(max-width: 681px)"), y = Z("(max-width: 400px)"), { renderedCards: x, shouldRenderAddCard: T } = Xr({
|
|
1554
1554
|
controls: n,
|
|
1555
1555
|
customTitleContentAddCard: t,
|
|
1556
1556
|
decisions: o,
|
|
@@ -1560,13 +1560,13 @@ const jr = C.div`
|
|
|
1560
1560
|
textValues: i
|
|
1561
1561
|
}), D = (o == null ? void 0 : o.length) === 0 && !p;
|
|
1562
1562
|
return /* @__PURE__ */ m(O, { children: [
|
|
1563
|
-
/* @__PURE__ */ a(fr, { children: /* @__PURE__ */ a(mr, { children: /* @__PURE__ */ a(
|
|
1564
|
-
|
|
1563
|
+
/* @__PURE__ */ a(fr, { children: /* @__PURE__ */ a(mr, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: D ? /* @__PURE__ */ m(
|
|
1564
|
+
v,
|
|
1565
1565
|
{
|
|
1566
1566
|
direction: "column",
|
|
1567
1567
|
gap: "28px",
|
|
1568
1568
|
width: "100%",
|
|
1569
|
-
height:
|
|
1569
|
+
height: w ? "auto" : "435px",
|
|
1570
1570
|
justifyContent: "center",
|
|
1571
1571
|
alignItems: "center",
|
|
1572
1572
|
children: [
|
|
@@ -1602,7 +1602,7 @@ const jr = C.div`
|
|
|
1602
1602
|
) : /* @__PURE__ */ m(
|
|
1603
1603
|
qe,
|
|
1604
1604
|
{
|
|
1605
|
-
templateColumns:
|
|
1605
|
+
templateColumns: y ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
1606
1606
|
autoFlow: "row dense",
|
|
1607
1607
|
gap: "24px",
|
|
1608
1608
|
alignItems: "start",
|
|
@@ -1610,9 +1610,9 @@ const jr = C.div`
|
|
|
1610
1610
|
autoRows: "1fr",
|
|
1611
1611
|
justifyItems: "center",
|
|
1612
1612
|
padding: "6px",
|
|
1613
|
-
height:
|
|
1613
|
+
height: w ? "auto" : "484px",
|
|
1614
1614
|
children: [
|
|
1615
|
-
|
|
1615
|
+
x,
|
|
1616
1616
|
T && xn({
|
|
1617
1617
|
type: "add",
|
|
1618
1618
|
index: o == null ? void 0 : o.length,
|
|
@@ -1662,8 +1662,8 @@ const jr = C.div`
|
|
|
1662
1662
|
[N.LESS_THAN]: no,
|
|
1663
1663
|
[N.EQUAL]: to
|
|
1664
1664
|
}, _e = (e) => {
|
|
1665
|
-
const n = e == null ? void 0 : e.value
|
|
1666
|
-
return
|
|
1665
|
+
const n = e == null ? void 0 : e.value;
|
|
1666
|
+
return typeof n == "string" && n.startsWith("De ") && n.includes(" a ") ? n : typeof n == "object" && n !== null && !Array.isArray(n) ? (ro[e == null ? void 0 : e.howToSetTheDecision] || Qr)(n) : n || void 0;
|
|
1667
1667
|
}, oo = C.div`
|
|
1668
1668
|
display: flex;
|
|
1669
1669
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
@@ -1703,9 +1703,9 @@ const jr = C.div`
|
|
|
1703
1703
|
borderRadius: g,
|
|
1704
1704
|
border: h,
|
|
1705
1705
|
margin: f = "0px",
|
|
1706
|
-
padding:
|
|
1707
|
-
boxSizing:
|
|
1708
|
-
scroll:
|
|
1706
|
+
padding: w = "0px",
|
|
1707
|
+
boxSizing: y,
|
|
1708
|
+
scroll: x = !1
|
|
1709
1709
|
} = e;
|
|
1710
1710
|
return /* @__PURE__ */ a(
|
|
1711
1711
|
oo,
|
|
@@ -1722,10 +1722,10 @@ const jr = C.div`
|
|
|
1722
1722
|
$background: c,
|
|
1723
1723
|
$border: h,
|
|
1724
1724
|
$margin: f,
|
|
1725
|
-
$padding:
|
|
1725
|
+
$padding: w,
|
|
1726
1726
|
$borderRadius: g,
|
|
1727
|
-
$boxSizing:
|
|
1728
|
-
$scroll:
|
|
1727
|
+
$boxSizing: y,
|
|
1728
|
+
$scroll: x,
|
|
1729
1729
|
children: t
|
|
1730
1730
|
}
|
|
1731
1731
|
);
|
|
@@ -1774,80 +1774,83 @@ const ao = C.div`
|
|
|
1774
1774
|
}
|
|
1775
1775
|
`, so = (e) => {
|
|
1776
1776
|
const {
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1777
|
+
controls: n,
|
|
1778
|
+
conditionsAlignment: t,
|
|
1779
|
+
decision: r,
|
|
1780
|
+
decisionMapper: o,
|
|
1781
|
+
loading: i,
|
|
1782
|
+
textValues: s,
|
|
1783
|
+
visibleConditions: d,
|
|
1784
|
+
tagLabel: l,
|
|
1785
|
+
isOpen: p,
|
|
1786
|
+
onToggle: u,
|
|
1787
|
+
hasEffectiveFrom: c,
|
|
1788
|
+
hasValidUntil: g,
|
|
1789
|
+
effectiveFromRenderer: h,
|
|
1790
|
+
validUntilRenderer: f,
|
|
1791
|
+
onEdit: w,
|
|
1792
|
+
onDelete: y
|
|
1792
1793
|
} = e;
|
|
1793
|
-
return
|
|
1794
|
-
/* @__PURE__ */ a(ao, { onClick:
|
|
1795
|
-
|
|
1794
|
+
return i ? /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
1795
|
+
/* @__PURE__ */ a(ao, { onClick: u, children: /* @__PURE__ */ m(
|
|
1796
|
+
v,
|
|
1796
1797
|
{
|
|
1797
1798
|
alignItems: "start",
|
|
1798
1799
|
justifyContent: "space-between",
|
|
1799
1800
|
children: [
|
|
1800
|
-
/* @__PURE__ */ m(
|
|
1801
|
+
/* @__PURE__ */ m(v, { gap: "12px", children: [
|
|
1801
1802
|
/* @__PURE__ */ a(io, { children: /* @__PURE__ */ a(
|
|
1802
1803
|
ve,
|
|
1803
1804
|
{
|
|
1804
1805
|
id: "tag",
|
|
1805
1806
|
appearance: "gray",
|
|
1806
|
-
label:
|
|
1807
|
+
label: l,
|
|
1807
1808
|
displayIcon: !1
|
|
1808
1809
|
}
|
|
1809
1810
|
) }),
|
|
1810
1811
|
/* @__PURE__ */ a(lo, { children: /* @__PURE__ */ a(
|
|
1811
1812
|
Xe,
|
|
1812
1813
|
{
|
|
1813
|
-
element:
|
|
1814
|
+
element: o,
|
|
1814
1815
|
valueData: _e(
|
|
1815
|
-
|
|
1816
|
+
o
|
|
1816
1817
|
),
|
|
1817
1818
|
type: "decision"
|
|
1818
1819
|
}
|
|
1819
1820
|
) })
|
|
1820
1821
|
] }),
|
|
1821
|
-
/* @__PURE__ */ m(
|
|
1822
|
-
/* @__PURE__ */
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1822
|
+
/* @__PURE__ */ m(v, { gap: "12px", children: [
|
|
1823
|
+
n && /* @__PURE__ */ m(O, { children: [
|
|
1824
|
+
/* @__PURE__ */ a(
|
|
1825
|
+
P,
|
|
1826
|
+
{
|
|
1827
|
+
appearance: "primary",
|
|
1828
|
+
icon: /* @__PURE__ */ a(Tt, {}),
|
|
1829
|
+
size: "24px",
|
|
1830
|
+
cursorHover: !0,
|
|
1831
|
+
onClick: (x) => {
|
|
1832
|
+
x.stopPropagation(), w == null || w();
|
|
1833
|
+
}
|
|
1831
1834
|
}
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1835
|
+
),
|
|
1836
|
+
/* @__PURE__ */ a(
|
|
1837
|
+
P,
|
|
1838
|
+
{
|
|
1839
|
+
appearance: "danger",
|
|
1840
|
+
icon: /* @__PURE__ */ a(rn, {}),
|
|
1841
|
+
size: "24px",
|
|
1842
|
+
cursorHover: !0,
|
|
1843
|
+
onClick: (x) => {
|
|
1844
|
+
x.stopPropagation(), y == null || y();
|
|
1845
|
+
}
|
|
1843
1846
|
}
|
|
1844
|
-
|
|
1845
|
-
),
|
|
1847
|
+
)
|
|
1848
|
+
] }),
|
|
1846
1849
|
/* @__PURE__ */ a(
|
|
1847
1850
|
P,
|
|
1848
1851
|
{
|
|
1849
1852
|
appearance: "dark",
|
|
1850
|
-
icon:
|
|
1853
|
+
icon: p ? /* @__PURE__ */ a(Ct, {}) : /* @__PURE__ */ a(vn, {}),
|
|
1851
1854
|
size: "24px",
|
|
1852
1855
|
cursorHover: !0
|
|
1853
1856
|
}
|
|
@@ -1855,11 +1858,11 @@ const ao = C.div`
|
|
|
1855
1858
|
] })
|
|
1856
1859
|
]
|
|
1857
1860
|
},
|
|
1858
|
-
|
|
1861
|
+
r.ruleName
|
|
1859
1862
|
) }),
|
|
1860
|
-
|
|
1863
|
+
p && /* @__PURE__ */ m(O, { children: [
|
|
1861
1864
|
/* @__PURE__ */ a(_, { dashed: !0 }),
|
|
1862
|
-
/* @__PURE__ */ m(
|
|
1865
|
+
/* @__PURE__ */ m(v, { direction: "column", gap: "12px", children: [
|
|
1863
1866
|
/* @__PURE__ */ a(
|
|
1864
1867
|
k,
|
|
1865
1868
|
{
|
|
@@ -1869,17 +1872,17 @@ const ao = C.div`
|
|
|
1869
1872
|
weight: "bold",
|
|
1870
1873
|
textAlign: "start",
|
|
1871
1874
|
padding: "0 12px",
|
|
1872
|
-
children:
|
|
1875
|
+
children: s.factsThatConditionIt
|
|
1873
1876
|
}
|
|
1874
1877
|
),
|
|
1875
1878
|
/* @__PURE__ */ m(
|
|
1876
|
-
|
|
1879
|
+
v,
|
|
1877
1880
|
{
|
|
1878
1881
|
direction: "column",
|
|
1879
1882
|
gap: "8px",
|
|
1880
|
-
justifyContent:
|
|
1883
|
+
justifyContent: t,
|
|
1881
1884
|
children: [
|
|
1882
|
-
|
|
1885
|
+
d.map((x) => /* @__PURE__ */ a(
|
|
1883
1886
|
ee,
|
|
1884
1887
|
{
|
|
1885
1888
|
direction: "column",
|
|
@@ -1889,16 +1892,16 @@ const ao = C.div`
|
|
|
1889
1892
|
children: /* @__PURE__ */ a(
|
|
1890
1893
|
Xe,
|
|
1891
1894
|
{
|
|
1892
|
-
element: { ...
|
|
1895
|
+
element: { ...x, value: x.value },
|
|
1893
1896
|
valueData: _e(
|
|
1894
|
-
|
|
1897
|
+
x
|
|
1895
1898
|
)
|
|
1896
1899
|
}
|
|
1897
1900
|
)
|
|
1898
1901
|
},
|
|
1899
|
-
|
|
1902
|
+
x.conditionName
|
|
1900
1903
|
)),
|
|
1901
|
-
|
|
1904
|
+
c && h && /* @__PURE__ */ a(
|
|
1902
1905
|
ee,
|
|
1903
1906
|
{
|
|
1904
1907
|
direction: "column",
|
|
@@ -1908,14 +1911,14 @@ const ao = C.div`
|
|
|
1908
1911
|
children: /* @__PURE__ */ a(
|
|
1909
1912
|
Xe,
|
|
1910
1913
|
{
|
|
1911
|
-
element:
|
|
1912
|
-
valueData:
|
|
1914
|
+
element: h.element,
|
|
1915
|
+
valueData: h.valueData
|
|
1913
1916
|
},
|
|
1914
1917
|
"effectiveFrom"
|
|
1915
1918
|
)
|
|
1916
1919
|
}
|
|
1917
1920
|
),
|
|
1918
|
-
|
|
1921
|
+
g && f && /* @__PURE__ */ a(
|
|
1919
1922
|
ee,
|
|
1920
1923
|
{
|
|
1921
1924
|
direction: "column",
|
|
@@ -1925,8 +1928,8 @@ const ao = C.div`
|
|
|
1925
1928
|
children: /* @__PURE__ */ a(
|
|
1926
1929
|
Xe,
|
|
1927
1930
|
{
|
|
1928
|
-
element:
|
|
1929
|
-
valueData:
|
|
1931
|
+
element: f.element,
|
|
1932
|
+
valueData: f.valueData
|
|
1930
1933
|
},
|
|
1931
1934
|
"validUntil"
|
|
1932
1935
|
)
|
|
@@ -1937,12 +1940,12 @@ const ao = C.div`
|
|
|
1937
1940
|
)
|
|
1938
1941
|
] })
|
|
1939
1942
|
] })
|
|
1940
|
-
] }) : /* @__PURE__ */ m(
|
|
1941
|
-
/* @__PURE__ */ m(
|
|
1943
|
+
] }) : /* @__PURE__ */ m(v, { justifyContent: "space-between", children: [
|
|
1944
|
+
/* @__PURE__ */ m(v, { alignItems: "center", gap: "8px", children: [
|
|
1942
1945
|
/* @__PURE__ */ a(Q, { animated: !0, width: "150px" }),
|
|
1943
1946
|
/* @__PURE__ */ a(Q, { animated: !0, width: "70px" })
|
|
1944
1947
|
] }),
|
|
1945
|
-
/* @__PURE__ */ m(
|
|
1948
|
+
/* @__PURE__ */ m(v, { alignItems: "center", gap: "8px", children: [
|
|
1946
1949
|
/* @__PURE__ */ a(Q, { animated: !0, width: "50px" }),
|
|
1947
1950
|
/* @__PURE__ */ a(Lt, { animated: !0 })
|
|
1948
1951
|
] })
|
|
@@ -1958,8 +1961,9 @@ const ao = C.div`
|
|
|
1958
1961
|
isOpen: i = !1,
|
|
1959
1962
|
onToggle: s,
|
|
1960
1963
|
onEdit: d,
|
|
1961
|
-
onDelete: l
|
|
1962
|
-
|
|
1964
|
+
onDelete: l,
|
|
1965
|
+
controls: p = !0
|
|
1966
|
+
} = e, u = !!(n != null && n.effectiveFrom), c = !!(n != null && n.validUntil), g = u ? {
|
|
1963
1967
|
element: {
|
|
1964
1968
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
1965
1969
|
value: String(n.effectiveFrom),
|
|
@@ -1972,7 +1976,7 @@ const ao = C.div`
|
|
|
1972
1976
|
howToSetTheDecision: K.EQUAL,
|
|
1973
1977
|
decisionDataType: V.DATE
|
|
1974
1978
|
})
|
|
1975
|
-
} : null,
|
|
1979
|
+
} : null, h = c ? {
|
|
1976
1980
|
element: {
|
|
1977
1981
|
labelName: r == null ? void 0 : r.validUntil,
|
|
1978
1982
|
value: String(n.validUntil),
|
|
@@ -1985,29 +1989,30 @@ const ao = C.div`
|
|
|
1985
1989
|
howToSetTheDecision: K.EQUAL,
|
|
1986
1990
|
decisionDataType: V.DATE
|
|
1987
1991
|
})
|
|
1988
|
-
} : null,
|
|
1992
|
+
} : null, f = n ? {
|
|
1989
1993
|
labelName: n.labelName || "",
|
|
1990
1994
|
decisionDataType: n.decisionDataType || V.ALPHABETICAL,
|
|
1991
1995
|
value: _e(n),
|
|
1992
1996
|
howToSetTheDecision: n.howToSetTheDecision || K.EQUAL
|
|
1993
|
-
} : null,
|
|
1997
|
+
} : null, w = n ? en(n) : {}, y = it(w, (F) => !F.hidden), x = Object.values(y).flat(), T = Array.from({ length: 5 }), D = !!(!t && n && r && f), I = x.length < 2 ? "start" : "space-between", E = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
|
|
1994
1998
|
return /* @__PURE__ */ a(
|
|
1995
1999
|
so,
|
|
1996
2000
|
{
|
|
1997
|
-
conditionsAlignment:
|
|
2001
|
+
conditionsAlignment: I,
|
|
2002
|
+
controls: p,
|
|
1998
2003
|
decision: n,
|
|
1999
|
-
decisionMapper:
|
|
2000
|
-
loading:
|
|
2001
|
-
skeleton:
|
|
2004
|
+
decisionMapper: f,
|
|
2005
|
+
loading: D,
|
|
2006
|
+
skeleton: T,
|
|
2002
2007
|
textValues: r,
|
|
2003
|
-
visibleConditions:
|
|
2004
|
-
tagLabel:
|
|
2008
|
+
visibleConditions: x,
|
|
2009
|
+
tagLabel: E,
|
|
2005
2010
|
isOpen: i,
|
|
2006
2011
|
onToggle: s,
|
|
2007
|
-
hasEffectiveFrom:
|
|
2008
|
-
hasValidUntil:
|
|
2009
|
-
effectiveFromRenderer:
|
|
2010
|
-
validUntilRenderer:
|
|
2012
|
+
hasEffectiveFrom: u,
|
|
2013
|
+
hasValidUntil: c,
|
|
2014
|
+
effectiveFromRenderer: g,
|
|
2015
|
+
validUntilRenderer: h,
|
|
2011
2016
|
onEdit: d,
|
|
2012
2017
|
onDelete: l
|
|
2013
2018
|
}
|
|
@@ -2111,16 +2116,16 @@ const uo = C.div`
|
|
|
2111
2116
|
isOpen: d,
|
|
2112
2117
|
onToggle: l
|
|
2113
2118
|
} = e;
|
|
2114
|
-
return n ? /* @__PURE__ */ a(Ye, { children: /* @__PURE__ */ a(
|
|
2119
|
+
return n ? /* @__PURE__ */ a(Ye, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ a(
|
|
2115
2120
|
at,
|
|
2116
2121
|
{
|
|
2117
2122
|
id: n.decisionId,
|
|
2118
2123
|
handleDelete: () => o ? o(n.decisionId) : null,
|
|
2119
2124
|
handleView: () => r ? r(n) : null,
|
|
2120
|
-
controls: t,
|
|
2121
2125
|
children: /* @__PURE__ */ a(
|
|
2122
2126
|
lt,
|
|
2123
2127
|
{
|
|
2128
|
+
controls: t,
|
|
2124
2129
|
decision: n,
|
|
2125
2130
|
textValues: i,
|
|
2126
2131
|
position: s,
|
|
@@ -2153,7 +2158,7 @@ const uo = C.div`
|
|
|
2153
2158
|
background: !0,
|
|
2154
2159
|
borderRadius: "8px",
|
|
2155
2160
|
children: /* @__PURE__ */ m(
|
|
2156
|
-
|
|
2161
|
+
v,
|
|
2157
2162
|
{
|
|
2158
2163
|
justifyContent: "space-between",
|
|
2159
2164
|
alignItems: "center",
|
|
@@ -2209,7 +2214,7 @@ const uo = C.div`
|
|
|
2209
2214
|
(g, h) => wn({
|
|
2210
2215
|
type: "decision",
|
|
2211
2216
|
decision: g,
|
|
2212
|
-
controls:
|
|
2217
|
+
controls: n,
|
|
2213
2218
|
customTitleContentAddCard: t,
|
|
2214
2219
|
loading: o,
|
|
2215
2220
|
handleOpenModal: i,
|
|
@@ -2267,10 +2272,10 @@ const uo = C.div`
|
|
|
2267
2272
|
);
|
|
2268
2273
|
const d = Z("(max-width: 400px)");
|
|
2269
2274
|
return sn(
|
|
2270
|
-
/* @__PURE__ */ a(xo, { smallScreen: d, children: /* @__PURE__ */ a(an, { children: /* @__PURE__ */ a(wo, { children: /* @__PURE__ */ m(
|
|
2271
|
-
/* @__PURE__ */ m(
|
|
2272
|
-
/* @__PURE__ */ m(
|
|
2273
|
-
/* @__PURE__ */ m(
|
|
2275
|
+
/* @__PURE__ */ a(xo, { smallScreen: d, children: /* @__PURE__ */ a(an, { children: /* @__PURE__ */ a(wo, { children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
2276
|
+
/* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
2277
|
+
/* @__PURE__ */ m(v, { alignItems: "center", justifyContent: "space-between", children: [
|
|
2278
|
+
/* @__PURE__ */ m(v, { direction: "column", gap: "8px", children: [
|
|
2274
2279
|
/* @__PURE__ */ a(
|
|
2275
2280
|
k,
|
|
2276
2281
|
{
|
|
@@ -2377,26 +2382,26 @@ function ko({
|
|
|
2377
2382
|
conditionsThatEstablishesTheDecision: Ue((u, { parent: c }) => {
|
|
2378
2383
|
if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return te().shape({});
|
|
2379
2384
|
const f = o().reduce(
|
|
2380
|
-
(
|
|
2385
|
+
(w, y) => {
|
|
2381
2386
|
var T;
|
|
2382
|
-
if (((T = s.values.conditionsThatEstablishesTheDecision) == null ? void 0 : T[
|
|
2387
|
+
if (((T = s.values.conditionsThatEstablishesTheDecision) == null ? void 0 : T[y.conditionName]) !== void 0) {
|
|
2383
2388
|
const D = Vn(
|
|
2384
|
-
|
|
2389
|
+
y.howToSetTheCondition
|
|
2385
2390
|
);
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2391
|
+
w[y.conditionName] = D(
|
|
2392
|
+
y.value,
|
|
2393
|
+
y.conditionDataType
|
|
2389
2394
|
).schema;
|
|
2390
2395
|
}
|
|
2391
|
-
return
|
|
2396
|
+
return w;
|
|
2392
2397
|
},
|
|
2393
2398
|
{}
|
|
2394
2399
|
);
|
|
2395
2400
|
return te(f).test(
|
|
2396
2401
|
"at-least-one-condition",
|
|
2397
2402
|
"Debe existir al menos una condición para que la decisión se valide correctamente.",
|
|
2398
|
-
(
|
|
2399
|
-
(
|
|
2403
|
+
(w) => w ? Object.values(w).some(
|
|
2404
|
+
(y) => y != null && y !== ""
|
|
2400
2405
|
) : !1
|
|
2401
2406
|
);
|
|
2402
2407
|
})
|
|
@@ -2409,8 +2414,8 @@ function ko({
|
|
|
2409
2414
|
"is-after-startDate",
|
|
2410
2415
|
"La fecha válida para la vigencia hasta debe ser mayor o igual a la fecha de inicio",
|
|
2411
2416
|
function(f) {
|
|
2412
|
-
const
|
|
2413
|
-
return !
|
|
2417
|
+
const w = this.parent.effectiveFrom;
|
|
2418
|
+
return !w || !f ? !0 : new Date(f) >= new Date(w);
|
|
2414
2419
|
}
|
|
2415
2420
|
) : c.notRequired()
|
|
2416
2421
|
));
|
|
@@ -2422,18 +2427,18 @@ function ko({
|
|
|
2422
2427
|
onSubmit: (u) => {
|
|
2423
2428
|
const c = Object.fromEntries(
|
|
2424
2429
|
Object.entries(r).map(([h, f]) => {
|
|
2425
|
-
const
|
|
2430
|
+
const y = f.filter((x) => {
|
|
2426
2431
|
var D;
|
|
2427
|
-
const T = (D = u.conditionsThatEstablishesTheDecision) == null ? void 0 : D[
|
|
2432
|
+
const T = (D = u.conditionsThatEstablishesTheDecision) == null ? void 0 : D[x.conditionName];
|
|
2428
2433
|
return T != null && T !== "";
|
|
2429
|
-
}).map((
|
|
2434
|
+
}).map((x) => {
|
|
2430
2435
|
var T;
|
|
2431
2436
|
return {
|
|
2432
|
-
...
|
|
2433
|
-
value: (T = u.conditionsThatEstablishesTheDecision) == null ? void 0 : T[
|
|
2437
|
+
...x,
|
|
2438
|
+
value: (T = u.conditionsThatEstablishesTheDecision) == null ? void 0 : T[x.conditionName]
|
|
2434
2439
|
};
|
|
2435
2440
|
});
|
|
2436
|
-
return [h,
|
|
2441
|
+
return [h, y];
|
|
2437
2442
|
})
|
|
2438
2443
|
), g = {
|
|
2439
2444
|
...e,
|
|
@@ -2516,15 +2521,15 @@ const $o = C.div`
|
|
|
2516
2521
|
messageEnd: c = "",
|
|
2517
2522
|
statusStart: g = "pending",
|
|
2518
2523
|
statusEnd: h = "pending"
|
|
2519
|
-
} = e, [f,
|
|
2520
|
-
|
|
2524
|
+
} = e, [f, w] = M(s), [y, x] = M(l), [T, D] = M(p), I = ({ target: $ }) => {
|
|
2525
|
+
w($.checked), r && r($.checked);
|
|
2521
2526
|
}, E = ($) => {
|
|
2522
|
-
|
|
2527
|
+
x($.target.value), n($);
|
|
2523
2528
|
}, F = ($) => {
|
|
2524
2529
|
D($.target.value), t($);
|
|
2525
2530
|
}, R = Z("(max-width: 400px)");
|
|
2526
|
-
return /* @__PURE__ */ m(
|
|
2527
|
-
/* @__PURE__ */ m(
|
|
2531
|
+
return /* @__PURE__ */ m(v, { direction: "column", width: "100%", gap: "20px", children: [
|
|
2532
|
+
/* @__PURE__ */ m(v, { justifyContent: "space-between", children: [
|
|
2528
2533
|
/* @__PURE__ */ a(k, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
2529
2534
|
/* @__PURE__ */ a(
|
|
2530
2535
|
Sn,
|
|
@@ -2537,7 +2542,7 @@ const $o = C.div`
|
|
|
2537
2542
|
)
|
|
2538
2543
|
] }),
|
|
2539
2544
|
/* @__PURE__ */ m(
|
|
2540
|
-
|
|
2545
|
+
v,
|
|
2541
2546
|
{
|
|
2542
2547
|
direction: R ? "column" : "row",
|
|
2543
2548
|
justifyContent: "space-between",
|
|
@@ -2549,7 +2554,7 @@ const $o = C.div`
|
|
|
2549
2554
|
id: "dateStart",
|
|
2550
2555
|
label: o,
|
|
2551
2556
|
onChange: E,
|
|
2552
|
-
value:
|
|
2557
|
+
value: y,
|
|
2553
2558
|
required: d,
|
|
2554
2559
|
size: "compact",
|
|
2555
2560
|
status: g,
|
|
@@ -2591,19 +2596,19 @@ const $o = C.div`
|
|
|
2591
2596
|
termStartStatus: g,
|
|
2592
2597
|
textValues: h,
|
|
2593
2598
|
portalId: f,
|
|
2594
|
-
showRedefineConfirm:
|
|
2595
|
-
onOpenRedefineConfirm:
|
|
2596
|
-
onCloseRedefineConfirm:
|
|
2599
|
+
showRedefineConfirm: w,
|
|
2600
|
+
onOpenRedefineConfirm: y,
|
|
2601
|
+
onCloseRedefineConfirm: x,
|
|
2597
2602
|
onConfirmRedefine: T
|
|
2598
2603
|
} = e;
|
|
2599
2604
|
return /* @__PURE__ */ m(O, { children: [
|
|
2600
|
-
/* @__PURE__ */ a("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(
|
|
2601
|
-
/* @__PURE__ */ a(ze, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ a(
|
|
2605
|
+
/* @__PURE__ */ a("form", { onSubmit: o.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", width: "100%", children: [
|
|
2606
|
+
/* @__PURE__ */ a(ze, { legend: "Decisión N° 01", spacing: "wide", children: /* @__PURE__ */ a(v, { justifyContent: "center", width: "-webkit-fill-available", children: Ln({
|
|
2602
2607
|
condition: i,
|
|
2603
2608
|
formik: o,
|
|
2604
2609
|
isDecision: !0
|
|
2605
2610
|
}) }) }),
|
|
2606
|
-
/* @__PURE__ */ a(ze, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(
|
|
2611
|
+
/* @__PURE__ */ a(ze, { legend: "Condiciones a evaluar", spacing: "wide", children: /* @__PURE__ */ m(v, { direction: "column", gap: "20px", width: "100%", children: [
|
|
2607
2612
|
/* @__PURE__ */ a(
|
|
2608
2613
|
Ot,
|
|
2609
2614
|
{
|
|
@@ -2612,13 +2617,13 @@ const $o = C.div`
|
|
|
2612
2617
|
selectedTab: n
|
|
2613
2618
|
}
|
|
2614
2619
|
),
|
|
2615
|
-
/* @__PURE__ */ m(
|
|
2620
|
+
/* @__PURE__ */ m(v, { justifyContent: "flex-end", alignItems: "center", children: [
|
|
2616
2621
|
/* @__PURE__ */ a(
|
|
2617
2622
|
P,
|
|
2618
2623
|
{
|
|
2619
2624
|
icon: /* @__PURE__ */ a(Dt, {}),
|
|
2620
2625
|
appearance: "help",
|
|
2621
|
-
onClick:
|
|
2626
|
+
onClick: y,
|
|
2622
2627
|
cursorHover: !0
|
|
2623
2628
|
}
|
|
2624
2629
|
),
|
|
@@ -2629,14 +2634,14 @@ const $o = C.div`
|
|
|
2629
2634
|
iconBefore: /* @__PURE__ */ a(St, {}),
|
|
2630
2635
|
variant: "none",
|
|
2631
2636
|
appearance: "gray",
|
|
2632
|
-
onClick:
|
|
2637
|
+
onClick: y,
|
|
2633
2638
|
cursorHover: !0,
|
|
2634
2639
|
children: "Redefinir la condición"
|
|
2635
2640
|
}
|
|
2636
2641
|
)
|
|
2637
2642
|
] }),
|
|
2638
|
-
/* @__PURE__ */ a(
|
|
2639
|
-
|
|
2643
|
+
/* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: r == null ? void 0 : r.map((D) => /* @__PURE__ */ m(
|
|
2644
|
+
v,
|
|
2640
2645
|
{
|
|
2641
2646
|
gap: "16px",
|
|
2642
2647
|
alignItems: "center",
|
|
@@ -2682,27 +2687,27 @@ const $o = C.div`
|
|
|
2682
2687
|
checkedClosed: o.values.checkClosed
|
|
2683
2688
|
}
|
|
2684
2689
|
) }),
|
|
2685
|
-
/* @__PURE__ */ m(
|
|
2690
|
+
/* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
2686
2691
|
/* @__PURE__ */ a(H, { appearance: "gray", onClick: s, variant: "outlined", children: h.cancel }),
|
|
2687
2692
|
/* @__PURE__ */ a(H, { type: "submit", children: h.confirm })
|
|
2688
2693
|
] })
|
|
2689
2694
|
] }) }),
|
|
2690
|
-
|
|
2695
|
+
w && f && /* @__PURE__ */ a(
|
|
2691
2696
|
rt,
|
|
2692
2697
|
{
|
|
2693
2698
|
portalId: f,
|
|
2694
2699
|
title: "Redefinir la condición",
|
|
2695
|
-
onCloseModal:
|
|
2696
|
-
children: /* @__PURE__ */ m(
|
|
2700
|
+
onCloseModal: x,
|
|
2701
|
+
children: /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
2697
2702
|
/* @__PURE__ */ a(k, { 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 ." }),
|
|
2698
|
-
/* @__PURE__ */ m(
|
|
2703
|
+
/* @__PURE__ */ m(v, { justifyContent: "end", gap: "12px", children: [
|
|
2699
2704
|
/* @__PURE__ */ a(
|
|
2700
2705
|
H,
|
|
2701
2706
|
{
|
|
2702
2707
|
type: "button",
|
|
2703
2708
|
appearance: "gray",
|
|
2704
2709
|
variant: "outlined",
|
|
2705
|
-
onClick:
|
|
2710
|
+
onClick: x,
|
|
2706
2711
|
cursorHover: !0,
|
|
2707
2712
|
children: "Cancelar"
|
|
2708
2713
|
}
|
|
@@ -2730,21 +2735,21 @@ const $o = C.div`
|
|
|
2730
2735
|
}), c = en(d ?? n), g = en(n), h = it(
|
|
2731
2736
|
g,
|
|
2732
2737
|
(A) => !A.hidden
|
|
2733
|
-
), f = Object.keys(h),
|
|
2738
|
+
), f = Object.keys(h), w = [
|
|
2734
2739
|
...f.filter((A) => A === "group-primary"),
|
|
2735
2740
|
...f.filter((A) => A !== "group-primary")
|
|
2736
|
-
],
|
|
2737
|
-
let
|
|
2738
|
-
const T =
|
|
2739
|
-
const B = A === "group-primary" ? "mainCondition" : `alternateCondition-${
|
|
2740
|
-
return
|
|
2741
|
+
], y = {};
|
|
2742
|
+
let x = 1;
|
|
2743
|
+
const T = w.map((A) => {
|
|
2744
|
+
const B = A === "group-primary" ? "mainCondition" : `alternateCondition-${x++}`;
|
|
2745
|
+
return y[B] = A, {
|
|
2741
2746
|
id: B,
|
|
2742
2747
|
label: A === "group-primary" ? Hn(A, 0) : Hn(A, Number(B.split("-").at(-1))),
|
|
2743
2748
|
isDisabled: !1
|
|
2744
2749
|
};
|
|
2745
2750
|
}), [D, I] = U.useState(
|
|
2746
2751
|
((We = T[0]) == null ? void 0 : We.id) ?? "mainCondition"
|
|
2747
|
-
), E = (A) => I(A), F =
|
|
2752
|
+
), E = (A) => I(A), F = y[D] ?? "group-primary", R = h[F] ?? [], $ = h["group-primary"] ?? [], j = {
|
|
2748
2753
|
decisionDataType: n.decisionDataType,
|
|
2749
2754
|
howToSetTheCondition: n.howToSetTheDecision,
|
|
2750
2755
|
labelName: n.labelName,
|
|
@@ -2838,9 +2843,9 @@ const $o = C.div`
|
|
|
2838
2843
|
handleSubmitForm: g,
|
|
2839
2844
|
handleDelete: h,
|
|
2840
2845
|
terms: f = !0,
|
|
2841
|
-
onRemoveCondition:
|
|
2842
|
-
onRestoreConditions:
|
|
2843
|
-
baseDecisionTemplate:
|
|
2846
|
+
onRemoveCondition: w,
|
|
2847
|
+
onRestoreConditions: y,
|
|
2848
|
+
baseDecisionTemplate: x
|
|
2844
2849
|
} = e, [T, D] = M(null), I = Z("(max-width: 681px)"), { renderedCards: E, shouldRenderAddCard: F } = yo({
|
|
2845
2850
|
controls: n,
|
|
2846
2851
|
customTitleContentAddCard: t,
|
|
@@ -2853,8 +2858,8 @@ const $o = C.div`
|
|
|
2853
2858
|
toggleAt: ($) => D((j) => j === $ ? null : $)
|
|
2854
2859
|
}), R = (o == null ? void 0 : o.length) === 0 && !p;
|
|
2855
2860
|
return /* @__PURE__ */ m(O, { children: [
|
|
2856
|
-
/* @__PURE__ */ a(go, { children: /* @__PURE__ */ a(ho, { children: /* @__PURE__ */ a(
|
|
2857
|
-
|
|
2861
|
+
/* @__PURE__ */ a(go, { children: /* @__PURE__ */ a(ho, { children: /* @__PURE__ */ a(v, { direction: "column", gap: "16px", padding: "6px", children: R ? /* @__PURE__ */ a(ze, { legend: "Decisiones", children: /* @__PURE__ */ m(
|
|
2862
|
+
v,
|
|
2858
2863
|
{
|
|
2859
2864
|
direction: "column",
|
|
2860
2865
|
gap: "16px",
|
|
@@ -2927,13 +2932,13 @@ const $o = C.div`
|
|
|
2927
2932
|
Fo,
|
|
2928
2933
|
{
|
|
2929
2934
|
decision: l || s,
|
|
2930
|
-
fullTemplate:
|
|
2935
|
+
fullTemplate: x ?? s,
|
|
2931
2936
|
onSubmitEvent: g,
|
|
2932
2937
|
textValues: i,
|
|
2933
2938
|
onCancel: () => c ? c() : () => {
|
|
2934
2939
|
},
|
|
2935
|
-
onRemoveCondition:
|
|
2936
|
-
onRestoreConditions:
|
|
2940
|
+
onRemoveCondition: w,
|
|
2941
|
+
onRestoreConditions: y
|
|
2937
2942
|
}
|
|
2938
2943
|
)
|
|
2939
2944
|
}
|
|
@@ -2986,14 +2991,14 @@ const Po = (e, n) => {
|
|
|
2986
2991
|
var D;
|
|
2987
2992
|
const h = p.clientWidth, f = Array.from(
|
|
2988
2993
|
u.querySelectorAll('[data-filter-tag="true"]')
|
|
2989
|
-
),
|
|
2990
|
-
let
|
|
2991
|
-
const
|
|
2994
|
+
), w = 48;
|
|
2995
|
+
let y = 0;
|
|
2996
|
+
const x = [], T = [];
|
|
2992
2997
|
for (let I = 0; I < n.length; I++) {
|
|
2993
2998
|
const E = ((D = f[I]) == null ? void 0 : D.offsetWidth) ?? 0;
|
|
2994
|
-
|
|
2999
|
+
y + E + w <= h ? (x.push(n[I]), y += E) : T.push(n[I]);
|
|
2995
3000
|
}
|
|
2996
|
-
r(
|
|
3001
|
+
r(x), i(T), d(T.length > 0);
|
|
2997
3002
|
}, g = new ResizeObserver(() => {
|
|
2998
3003
|
requestAnimationFrame(c);
|
|
2999
3004
|
});
|
|
@@ -3074,8 +3079,8 @@ const Mo = C.div`
|
|
|
3074
3079
|
}};
|
|
3075
3080
|
}
|
|
3076
3081
|
`, _o = (e) => {
|
|
3077
|
-
var g, h, f,
|
|
3078
|
-
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [i, s] = M(!1), d = () => s(!0), l = () => s(!1), p = $n(Nn), u = ((f = (h = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Tn.option.appearance.hover, c = ((
|
|
3082
|
+
var g, h, f, w, y, x;
|
|
3083
|
+
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [i, s] = M(!1), d = () => s(!0), l = () => s(!1), p = $n(Nn), u = ((f = (h = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : h.appearance) == null ? void 0 : f.hover) ?? Tn.option.appearance.hover, c = ((x = (y = (w = p == null ? void 0 : p.input) == null ? void 0 : w.option) == null ? void 0 : y.appearance) == null ? void 0 : x.regular) ?? Tn.option.appearance.regular;
|
|
3079
3084
|
return /* @__PURE__ */ a(
|
|
3080
3085
|
Ho,
|
|
3081
3086
|
{
|
|
@@ -3140,25 +3145,25 @@ const Mo = C.div`
|
|
|
3140
3145
|
hidden: c,
|
|
3141
3146
|
showOverflowIndicator: g,
|
|
3142
3147
|
measurementRef: h
|
|
3143
|
-
} = Po(d, n), [f,
|
|
3144
|
-
E.stopPropagation(),
|
|
3148
|
+
} = Po(d, n), [f, w] = M(!1), y = (E) => {
|
|
3149
|
+
E.stopPropagation(), w((F) => !F);
|
|
3145
3150
|
};
|
|
3146
3151
|
xe(() => {
|
|
3147
3152
|
const E = (F) => {
|
|
3148
3153
|
var j, se;
|
|
3149
3154
|
const R = F.target;
|
|
3150
|
-
!((j = l.current) != null && j.contains(R)) && !((se = p.current) != null && se.contains(R)) &&
|
|
3155
|
+
!((j = l.current) != null && j.contains(R)) && !((se = p.current) != null && se.contains(R)) && w(!1);
|
|
3151
3156
|
};
|
|
3152
3157
|
return f && window.addEventListener("mousedown", E), () => window.removeEventListener("mousedown", E);
|
|
3153
3158
|
}, [f]);
|
|
3154
|
-
const
|
|
3159
|
+
const x = n.length === 0, T = f && c.length > 0, D = c.map((E) => ({
|
|
3155
3160
|
id: E.label,
|
|
3156
3161
|
value: E.label,
|
|
3157
3162
|
label: E.label,
|
|
3158
3163
|
icon: E.icon
|
|
3159
3164
|
})), I = (E) => {
|
|
3160
3165
|
var F, R;
|
|
3161
|
-
(R = (F = c.find(($) => $.label === E)) == null ? void 0 : F.onClose) == null || R.call(F),
|
|
3166
|
+
(R = (F = c.find(($) => $.label === E)) == null ? void 0 : F.onClose) == null || R.call(F), w(!1);
|
|
3162
3167
|
};
|
|
3163
3168
|
return /* @__PURE__ */ m(Oo, { borderRadius: "8px", width: "100%", children: [
|
|
3164
3169
|
/* @__PURE__ */ a(zo, { ref: h, children: n.map((E) => /* @__PURE__ */ a("div", { "data-filter-tag": "true", children: /* @__PURE__ */ a(
|
|
@@ -3185,7 +3190,7 @@ const Mo = C.div`
|
|
|
3185
3190
|
alignItems: "center",
|
|
3186
3191
|
padding: "0px 8px",
|
|
3187
3192
|
border: !0,
|
|
3188
|
-
children:
|
|
3193
|
+
children: x ? /* @__PURE__ */ a(k, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ m(O, { children: [
|
|
3189
3194
|
u.map((E) => /* @__PURE__ */ a(
|
|
3190
3195
|
ve,
|
|
3191
3196
|
{
|
|
@@ -3205,7 +3210,7 @@ const Mo = C.div`
|
|
|
3205
3210
|
ref: p,
|
|
3206
3211
|
style: { position: "relative", display: "inline-block" },
|
|
3207
3212
|
children: [
|
|
3208
|
-
/* @__PURE__ */ a(Vo, { onClick:
|
|
3213
|
+
/* @__PURE__ */ a(Vo, { onClick: y, children: /* @__PURE__ */ a(
|
|
3209
3214
|
ve,
|
|
3210
3215
|
{
|
|
3211
3216
|
appearance: "primary",
|
|
@@ -3225,7 +3230,7 @@ const Mo = C.div`
|
|
|
3225
3230
|
leadingIcon: E.icon,
|
|
3226
3231
|
onClose: () => {
|
|
3227
3232
|
var F;
|
|
3228
|
-
(F = E.onClose) == null || F.call(E),
|
|
3233
|
+
(F = E.onClose) == null || F.call(E), w(!1);
|
|
3229
3234
|
}
|
|
3230
3235
|
},
|
|
3231
3236
|
E.label
|
|
@@ -3242,7 +3247,7 @@ const Mo = C.div`
|
|
|
3242
3247
|
H,
|
|
3243
3248
|
{
|
|
3244
3249
|
cursorHover: !0,
|
|
3245
|
-
disabled:
|
|
3250
|
+
disabled: x,
|
|
3246
3251
|
iconBefore: /* @__PURE__ */ a(Jn, {}),
|
|
3247
3252
|
onClick: t,
|
|
3248
3253
|
variant: "outlined",
|
|
@@ -3291,10 +3296,10 @@ const Mo = C.div`
|
|
|
3291
3296
|
);
|
|
3292
3297
|
return sn(
|
|
3293
3298
|
/* @__PURE__ */ a(an, { children: /* @__PURE__ */ m(Uo, { $smallScreen: p, children: [
|
|
3294
|
-
/* @__PURE__ */ m(
|
|
3295
|
-
/* @__PURE__ */ m(
|
|
3299
|
+
/* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
3300
|
+
/* @__PURE__ */ m(v, { alignContent: "center", justifyContent: "space-between", children: [
|
|
3296
3301
|
/* @__PURE__ */ a(k, { appearance: "dark", size: "small", type: "headline", children: l }),
|
|
3297
|
-
/* @__PURE__ */ m(
|
|
3302
|
+
/* @__PURE__ */ m(v, { alignItems: "center", children: [
|
|
3298
3303
|
/* @__PURE__ */ a(k, { children: "Cerrar" }),
|
|
3299
3304
|
/* @__PURE__ */ a(
|
|
3300
3305
|
P,
|
|
@@ -3310,7 +3315,7 @@ const Mo = C.div`
|
|
|
3310
3315
|
/* @__PURE__ */ a(_, {})
|
|
3311
3316
|
] }),
|
|
3312
3317
|
r,
|
|
3313
|
-
/* @__PURE__ */ m(
|
|
3318
|
+
/* @__PURE__ */ m(v, { gap: "20px", justifyContent: "flex-end", children: [
|
|
3314
3319
|
/* @__PURE__ */ a(
|
|
3315
3320
|
H,
|
|
3316
3321
|
{
|
|
@@ -3339,9 +3344,9 @@ const Mo = C.div`
|
|
|
3339
3344
|
);
|
|
3340
3345
|
}, il = (e) => {
|
|
3341
3346
|
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, i = Z("(max-width: 768px)"), s = !n || n.length === 0;
|
|
3342
|
-
return /* @__PURE__ */ m(
|
|
3347
|
+
return /* @__PURE__ */ m(v, { direction: "column", gap: "16px", children: [
|
|
3343
3348
|
i && /* @__PURE__ */ m(O, { children: [
|
|
3344
|
-
/* @__PURE__ */ m(
|
|
3349
|
+
/* @__PURE__ */ m(v, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
3345
3350
|
/* @__PURE__ */ a(P, { appearance: "gray", icon: /* @__PURE__ */ a(et, {}) }),
|
|
3346
3351
|
/* @__PURE__ */ a(
|
|
3347
3352
|
ee,
|
|
@@ -3372,8 +3377,8 @@ const Mo = C.div`
|
|
|
3372
3377
|
] }),
|
|
3373
3378
|
/* @__PURE__ */ a(_, { dashed: !0 })
|
|
3374
3379
|
] }),
|
|
3375
|
-
t.map((d) => /* @__PURE__ */ m(
|
|
3376
|
-
/* @__PURE__ */ a(
|
|
3380
|
+
t.map((d) => /* @__PURE__ */ m(v, { gap: "6px", alignItems: "center", children: [
|
|
3381
|
+
/* @__PURE__ */ a(v, { padding: "22px 0 0 0", children: /* @__PURE__ */ a(P, { appearance: "primary", icon: d.icon }) }),
|
|
3377
3382
|
/* @__PURE__ */ a(
|
|
3378
3383
|
Mt,
|
|
3379
3384
|
{
|
|
@@ -3585,10 +3590,10 @@ function Xo({
|
|
|
3585
3590
|
const c = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
|
|
3586
3591
|
(h, f) => {
|
|
3587
3592
|
if (o.values.conditionsThatEstablishesTheDecision[f.conditionName] !== void 0) {
|
|
3588
|
-
const
|
|
3593
|
+
const y = _n(
|
|
3589
3594
|
f.howToSetTheCondition
|
|
3590
3595
|
);
|
|
3591
|
-
h[f.conditionName] =
|
|
3596
|
+
h[f.conditionName] = y(
|
|
3592
3597
|
f.value,
|
|
3593
3598
|
f.conditionDataType
|
|
3594
3599
|
).schema;
|
|
@@ -3697,7 +3702,7 @@ const Qo = C.div`
|
|
|
3697
3702
|
return xe(() => {
|
|
3698
3703
|
p(n);
|
|
3699
3704
|
}, [n]), /* @__PURE__ */ m(O, { children: [
|
|
3700
|
-
/* @__PURE__ */ a(
|
|
3705
|
+
/* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(
|
|
3701
3706
|
ln,
|
|
3702
3707
|
{
|
|
3703
3708
|
checked: l,
|
|
@@ -3726,15 +3731,15 @@ const Qo = C.div`
|
|
|
3726
3731
|
messageEnd: c = "",
|
|
3727
3732
|
statusStart: g = "pending",
|
|
3728
3733
|
statusEnd: h = "pending"
|
|
3729
|
-
} = e, [f,
|
|
3730
|
-
|
|
3734
|
+
} = e, [f, w] = M(s), [y, x] = M(l), [T, D] = M(p), I = ({ target: $ }) => {
|
|
3735
|
+
w($.checked), r && r($.checked);
|
|
3731
3736
|
}, E = ($) => {
|
|
3732
|
-
|
|
3737
|
+
x($.target.value), n($);
|
|
3733
3738
|
}, F = ($) => {
|
|
3734
3739
|
D($.target.value), t($);
|
|
3735
3740
|
}, R = Z("(max-width: 400px)");
|
|
3736
3741
|
return /* @__PURE__ */ m(O, { children: [
|
|
3737
|
-
/* @__PURE__ */ m(
|
|
3742
|
+
/* @__PURE__ */ m(v, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
3738
3743
|
/* @__PURE__ */ a(
|
|
3739
3744
|
k,
|
|
3740
3745
|
{
|
|
@@ -3747,7 +3752,7 @@ const Qo = C.div`
|
|
|
3747
3752
|
}
|
|
3748
3753
|
),
|
|
3749
3754
|
/* @__PURE__ */ a(
|
|
3750
|
-
|
|
3755
|
+
v,
|
|
3751
3756
|
{
|
|
3752
3757
|
alignContent: "center",
|
|
3753
3758
|
justifyContent: "center",
|
|
@@ -3766,7 +3771,7 @@ const Qo = C.div`
|
|
|
3766
3771
|
)
|
|
3767
3772
|
] }),
|
|
3768
3773
|
/* @__PURE__ */ m(
|
|
3769
|
-
|
|
3774
|
+
v,
|
|
3770
3775
|
{
|
|
3771
3776
|
direction: R ? "column" : "row",
|
|
3772
3777
|
justifyContent: "space-between",
|
|
@@ -3778,7 +3783,7 @@ const Qo = C.div`
|
|
|
3778
3783
|
id: "dateStart",
|
|
3779
3784
|
label: o,
|
|
3780
3785
|
onChange: E,
|
|
3781
|
-
value:
|
|
3786
|
+
value: y,
|
|
3782
3787
|
required: d,
|
|
3783
3788
|
size: "compact",
|
|
3784
3789
|
status: g,
|
|
@@ -3815,7 +3820,7 @@ const Qo = C.div`
|
|
|
3815
3820
|
termStartStatus: p,
|
|
3816
3821
|
termEndStatus: u
|
|
3817
3822
|
} = e;
|
|
3818
|
-
return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(
|
|
3823
|
+
return /* @__PURE__ */ a("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ m(v, { direction: "column", gap: "24px", children: [
|
|
3819
3824
|
Je({
|
|
3820
3825
|
condition: i,
|
|
3821
3826
|
formik: n,
|
|
@@ -3823,7 +3828,7 @@ const Qo = C.div`
|
|
|
3823
3828
|
}),
|
|
3824
3829
|
/* @__PURE__ */ a(_, { dashed: !0 }),
|
|
3825
3830
|
/* @__PURE__ */ a(Qo, { children: /* @__PURE__ */ a(Ko, { children: /* @__PURE__ */ m(
|
|
3826
|
-
|
|
3831
|
+
v,
|
|
3827
3832
|
{
|
|
3828
3833
|
direction: "column",
|
|
3829
3834
|
padding: "6px 12px",
|
|
@@ -3831,7 +3836,7 @@ const Qo = C.div`
|
|
|
3831
3836
|
height: "272px",
|
|
3832
3837
|
children: [
|
|
3833
3838
|
/* @__PURE__ */ m(
|
|
3834
|
-
|
|
3839
|
+
v,
|
|
3835
3840
|
{
|
|
3836
3841
|
justifyContent: "space-between",
|
|
3837
3842
|
alignItems: "center",
|
|
@@ -3851,7 +3856,7 @@ const Qo = C.div`
|
|
|
3851
3856
|
]
|
|
3852
3857
|
}
|
|
3853
3858
|
),
|
|
3854
|
-
/* @__PURE__ */ a(
|
|
3859
|
+
/* @__PURE__ */ a(v, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((c) => /* @__PURE__ */ a(
|
|
3855
3860
|
Zo,
|
|
3856
3861
|
{
|
|
3857
3862
|
id: `toggle-${c.conditionName}`,
|
|
@@ -3893,7 +3898,7 @@ const Qo = C.div`
|
|
|
3893
3898
|
] }),
|
|
3894
3899
|
/* @__PURE__ */ a(_, {}),
|
|
3895
3900
|
l && /* @__PURE__ */ a(k, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
3896
|
-
/* @__PURE__ */ m(
|
|
3901
|
+
/* @__PURE__ */ m(v, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
3897
3902
|
/* @__PURE__ */ a(H, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
3898
3903
|
/* @__PURE__ */ a(H, { type: "submit", children: t.confirm })
|
|
3899
3904
|
] })
|
|
@@ -3923,8 +3928,8 @@ const Qo = C.div`
|
|
|
3923
3928
|
visibleConditions: l,
|
|
3924
3929
|
normalizedDecision: d,
|
|
3925
3930
|
handleToggleNoneChange: s,
|
|
3926
|
-
handleConditionToggleChange: (f,
|
|
3927
|
-
if (!
|
|
3931
|
+
handleConditionToggleChange: (f, w) => (y) => {
|
|
3932
|
+
if (!y)
|
|
3928
3933
|
i.setFieldValue(
|
|
3929
3934
|
`conditionsThatEstablishesTheDecision.${f}`,
|
|
3930
3935
|
void 0
|
|
@@ -3934,10 +3939,10 @@ const Qo = C.div`
|
|
|
3934
3939
|
!1
|
|
3935
3940
|
);
|
|
3936
3941
|
else {
|
|
3937
|
-
const
|
|
3942
|
+
const x = w ? [] : "";
|
|
3938
3943
|
i.setFieldValue(
|
|
3939
3944
|
`conditionsThatEstablishesTheDecision.${f}`,
|
|
3940
|
-
|
|
3945
|
+
x
|
|
3941
3946
|
);
|
|
3942
3947
|
}
|
|
3943
3948
|
},
|
|
@@ -4159,23 +4164,23 @@ const Qo = C.div`
|
|
|
4159
4164
|
}
|
|
4160
4165
|
),
|
|
4161
4166
|
n && t.length > 0 && /* @__PURE__ */ a(la, { id: h, children: t.map((f) => {
|
|
4162
|
-
const
|
|
4163
|
-
return /* @__PURE__ */ a(aa, { to: f.path, children: /* @__PURE__ */ a(dt, { $active:
|
|
4164
|
-
|
|
4167
|
+
const w = f.id === i;
|
|
4168
|
+
return /* @__PURE__ */ a(aa, { to: f.path, children: /* @__PURE__ */ a(dt, { $active: w, children: /* @__PURE__ */ m(
|
|
4169
|
+
v,
|
|
4165
4170
|
{
|
|
4166
4171
|
alignItems: "center",
|
|
4167
4172
|
direction: "row",
|
|
4168
4173
|
gap: "8px",
|
|
4169
|
-
padding:
|
|
4174
|
+
padding: w ? "8px 4px" : "8px 32px",
|
|
4170
4175
|
children: [
|
|
4171
|
-
|
|
4176
|
+
w && /* @__PURE__ */ a(P, { appearance: "primary", icon: /* @__PURE__ */ a(kt, {}) }),
|
|
4172
4177
|
/* @__PURE__ */ a(
|
|
4173
4178
|
k,
|
|
4174
4179
|
{
|
|
4175
|
-
appearance:
|
|
4180
|
+
appearance: w ? "primary" : "dark",
|
|
4176
4181
|
size: "small",
|
|
4177
4182
|
type: "title",
|
|
4178
|
-
weight:
|
|
4183
|
+
weight: w ? "bold" : "normal",
|
|
4179
4184
|
children: f.label
|
|
4180
4185
|
}
|
|
4181
4186
|
)
|
|
@@ -4220,7 +4225,7 @@ const Qo = C.div`
|
|
|
4220
4225
|
return;
|
|
4221
4226
|
}
|
|
4222
4227
|
t && s(t);
|
|
4223
|
-
}, [n, t, r, o.pathname]), /* @__PURE__ */ a(da, { $background: !0, children: /* @__PURE__ */ a(
|
|
4228
|
+
}, [n, t, r, o.pathname]), /* @__PURE__ */ a(da, { $background: !0, children: /* @__PURE__ */ a(v, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((u) => /* @__PURE__ */ a(
|
|
4224
4229
|
sa,
|
|
4225
4230
|
{
|
|
4226
4231
|
activeId: l(u.links),
|
|
@@ -4323,9 +4328,9 @@ var pa = {
|
|
|
4323
4328
|
scrollDebounceTimeout: void 0,
|
|
4324
4329
|
frameIdX: void 0,
|
|
4325
4330
|
frameIdY: void 0
|
|
4326
|
-
},
|
|
4331
|
+
}, b = pa, pe = !1, jn, mn;
|
|
4327
4332
|
function ga() {
|
|
4328
|
-
|
|
4333
|
+
b.scrollDebounceTimeout && clearTimeout(b.scrollDebounceTimeout), b.longPressTimeout && clearTimeout(b.longPressTimeout), b.frameIdX !== void 0 && cancelAnimationFrame(b.frameIdX), b.frameIdY !== void 0 && cancelAnimationFrame(b.frameIdY), b = { ...{
|
|
4329
4334
|
affectedNodes: [],
|
|
4330
4335
|
coordinates: {
|
|
4331
4336
|
x: 0,
|
|
@@ -4366,49 +4371,49 @@ function ga() {
|
|
|
4366
4371
|
} };
|
|
4367
4372
|
}
|
|
4368
4373
|
function ft(e) {
|
|
4369
|
-
return Object.assign(
|
|
4374
|
+
return Object.assign(b, e), e.initialParent.data.emit("dragStarted", b), pe = !1, b.emit("dragStarted", b), b;
|
|
4370
4375
|
}
|
|
4371
4376
|
function ha() {
|
|
4372
|
-
|
|
4377
|
+
b.activeState && we(b.activeState.parent, void 0, b), b.selectedState && ye(b.selectedState.nodes, b.selectedState.parent, b), b.selectedState = b.activeState = void 0;
|
|
4373
4378
|
}
|
|
4374
4379
|
function fa() {
|
|
4375
|
-
if (
|
|
4376
|
-
const e =
|
|
4377
|
-
J(
|
|
4380
|
+
if (b.pointerDown && (b.pointerDown.node.el.draggable = !0), b.pointerDown = void 0, !J(b)) return;
|
|
4381
|
+
const e = b.currentParent.data.config;
|
|
4382
|
+
J(b) && e.handleEnd(b);
|
|
4378
4383
|
}
|
|
4379
4384
|
function ma(e) {
|
|
4380
|
-
e.key === "Escape" && (
|
|
4385
|
+
e.key === "Escape" && (b.selectedState && ye(b.selectedState.nodes, b.selectedState.parent, b), b.activeState && we(b.activeState.parent, void 0, b), b.selectedState = b.activeState = void 0);
|
|
4381
4386
|
}
|
|
4382
4387
|
function ba(e) {
|
|
4383
|
-
if (!Y(
|
|
4388
|
+
if (!Y(b)) return;
|
|
4384
4389
|
pe = !0;
|
|
4385
|
-
const n =
|
|
4386
|
-
n(
|
|
4390
|
+
const n = b.initialParent.data.config.handleEnd;
|
|
4391
|
+
n(b);
|
|
4387
4392
|
}
|
|
4388
4393
|
function va(e) {
|
|
4389
|
-
if (!Y(
|
|
4394
|
+
if (!Y(b)) return;
|
|
4390
4395
|
G(e);
|
|
4391
4396
|
const { x: n, y: t } = Fe(e);
|
|
4392
|
-
Y(
|
|
4397
|
+
Y(b) && un({ x: n, y: t }, e, b);
|
|
4393
4398
|
}
|
|
4394
4399
|
function ya(e) {
|
|
4395
|
-
if (!
|
|
4396
|
-
const n =
|
|
4400
|
+
if (!b.pointerDown || !b.pointerDown.validated) return;
|
|
4401
|
+
const n = b.pointerDown.parent.data.config;
|
|
4397
4402
|
if (!(e.pointerType === "mouse" && !ht()))
|
|
4398
|
-
if (J(
|
|
4399
|
-
J(
|
|
4403
|
+
if (J(b))
|
|
4404
|
+
J(b) && Bn(e, b);
|
|
4400
4405
|
else {
|
|
4401
|
-
if (G(e), n.longPress && !
|
|
4402
|
-
clearTimeout(
|
|
4406
|
+
if (G(e), n.longPress && !b.longPress) {
|
|
4407
|
+
clearTimeout(b.longPressTimeout), b.longPress = !1;
|
|
4403
4408
|
return;
|
|
4404
4409
|
}
|
|
4405
|
-
const t = n.draggedNodes(
|
|
4406
|
-
n.dragstartClasses(
|
|
4407
|
-
const r =
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
+
const t = n.draggedNodes(b.pointerDown);
|
|
4411
|
+
n.dragstartClasses(b.pointerDown.node, t, n, !0);
|
|
4412
|
+
const r = b.pointerDown.node.el.getBoundingClientRect(), o = Wa(
|
|
4413
|
+
b.pointerDown.node,
|
|
4414
|
+
b.pointerDown.parent,
|
|
4410
4415
|
e,
|
|
4411
|
-
|
|
4416
|
+
b,
|
|
4412
4417
|
t,
|
|
4413
4418
|
r
|
|
4414
4419
|
);
|
|
@@ -4432,10 +4437,10 @@ function xa({
|
|
|
4432
4437
|
pointermove: ya,
|
|
4433
4438
|
pointercancel: X(r.handlePointercancel),
|
|
4434
4439
|
touchmove: (c) => {
|
|
4435
|
-
Y(
|
|
4440
|
+
Y(b) && c.cancelable && G(c);
|
|
4436
4441
|
},
|
|
4437
4442
|
contextmenu: (c) => {
|
|
4438
|
-
J(
|
|
4443
|
+
J(b) && G(c);
|
|
4439
4444
|
}
|
|
4440
4445
|
})), bt(e);
|
|
4441
4446
|
const [o, i] = ct(), s = {
|
|
@@ -4543,7 +4548,7 @@ function wa({
|
|
|
4543
4548
|
const r = n.map((l) => l.data.value), o = Ae(e.el, e.data), i = n[0].data.index, s = [...e.data.enabledNodes], d = [
|
|
4544
4549
|
...o.filter((l) => !r.some((p) => je(l, p)))
|
|
4545
4550
|
];
|
|
4546
|
-
d.splice(t[0].data.index, 0, ...r), "draggedNode" in
|
|
4551
|
+
d.splice(t[0].data.index, 0, ...r), "draggedNode" in b && (b.currentTargetValue = t[0].data.value), Cn(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
|
|
4547
4552
|
parent: {
|
|
4548
4553
|
el: e.el,
|
|
4549
4554
|
data: e.data
|
|
@@ -4556,7 +4561,7 @@ function wa({
|
|
|
4556
4561
|
previousPosition: i,
|
|
4557
4562
|
position: t[0].data.index,
|
|
4558
4563
|
targetNodes: t,
|
|
4559
|
-
state:
|
|
4564
|
+
state: b
|
|
4560
4565
|
});
|
|
4561
4566
|
}
|
|
4562
4567
|
function we(e, n, t) {
|
|
@@ -4680,7 +4685,7 @@ function Sa(e, n) {
|
|
|
4680
4685
|
const i = r.parentNode;
|
|
4681
4686
|
if (!(i instanceof HTMLElement)) return;
|
|
4682
4687
|
const s = q.get(i);
|
|
4683
|
-
s && (
|
|
4688
|
+
s && (b.pointerDown = {
|
|
4684
4689
|
parent: {
|
|
4685
4690
|
el: i,
|
|
4686
4691
|
data: s
|
|
@@ -4713,10 +4718,10 @@ function Ea(e) {
|
|
|
4713
4718
|
pointerdown: X(n.handleNodePointerdown),
|
|
4714
4719
|
handleNodePointerover: n.handleNodePointerover,
|
|
4715
4720
|
touchmove: (r) => {
|
|
4716
|
-
Y(
|
|
4721
|
+
Y(b) && r.cancelable && G(r);
|
|
4717
4722
|
},
|
|
4718
4723
|
contextmenu: (r) => {
|
|
4719
|
-
J(
|
|
4724
|
+
J(b) && G(r);
|
|
4720
4725
|
}
|
|
4721
4726
|
}), e.node.el.draggable = !0, n.reapplyDragClasses(e.node.el, e.parent.data), (t = e.parent.data.config.plugins) == null || t.forEach((r) => {
|
|
4722
4727
|
var o, i;
|
|
@@ -4731,9 +4736,9 @@ function vt(e) {
|
|
|
4731
4736
|
});
|
|
4732
4737
|
}
|
|
4733
4738
|
function Na(e, n) {
|
|
4734
|
-
if (!Y(
|
|
4735
|
-
const t = J(
|
|
4736
|
-
|
|
4739
|
+
if (!Y(b)) return;
|
|
4740
|
+
const t = J(b) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
|
|
4741
|
+
b.draggedNode.el === e && Ne([e], t, !0);
|
|
4737
4742
|
}
|
|
4738
4743
|
function ka(e) {
|
|
4739
4744
|
var n;
|
|
@@ -4796,7 +4801,7 @@ function dn(e, n) {
|
|
|
4796
4801
|
index: l
|
|
4797
4802
|
}
|
|
4798
4803
|
);
|
|
4799
|
-
if (!Y(
|
|
4804
|
+
if (!Y(b) && b.activeState && je(b.activeState.node.data.value, c.value) && we(
|
|
4800
4805
|
{
|
|
4801
4806
|
data: t,
|
|
4802
4807
|
el: e
|
|
@@ -4805,10 +4810,10 @@ function dn(e, n) {
|
|
|
4805
4810
|
el: p,
|
|
4806
4811
|
data: c
|
|
4807
4812
|
},
|
|
4808
|
-
|
|
4809
|
-
), Y(
|
|
4810
|
-
|
|
4811
|
-
const g =
|
|
4813
|
+
b
|
|
4814
|
+
), Y(b) && je(b.draggedNode.data.value, c.value)) {
|
|
4815
|
+
b.draggedNode.data = c, b.draggedNode.el = p;
|
|
4816
|
+
const g = b.draggedNodes.find(
|
|
4812
4817
|
(h) => h.data.value === c.value
|
|
4813
4818
|
);
|
|
4814
4819
|
g && (g.el = p);
|
|
@@ -4842,7 +4847,7 @@ function dn(e, n) {
|
|
|
4842
4847
|
});
|
|
4843
4848
|
}
|
|
4844
4849
|
function Ia() {
|
|
4845
|
-
|
|
4850
|
+
b.remapJustFinished = !0, "draggedNode" in b && (b.affectedNodes = []);
|
|
4846
4851
|
}
|
|
4847
4852
|
function Fa(e) {
|
|
4848
4853
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
@@ -4850,10 +4855,10 @@ function Fa(e) {
|
|
|
4850
4855
|
function Ra(e) {
|
|
4851
4856
|
var n;
|
|
4852
4857
|
if (e.parent.data.config.multiDrag) {
|
|
4853
|
-
if (
|
|
4858
|
+
if (b.selectedState)
|
|
4854
4859
|
return [
|
|
4855
4860
|
e.node,
|
|
4856
|
-
...(n =
|
|
4861
|
+
...(n = b.selectedState) == null ? void 0 : n.nodes.filter(
|
|
4857
4862
|
(t) => t.el !== e.node.el
|
|
4858
4863
|
)
|
|
4859
4864
|
];
|
|
@@ -4861,8 +4866,8 @@ function Ra(e) {
|
|
|
4861
4866
|
return [];
|
|
4862
4867
|
}
|
|
4863
4868
|
function La(e) {
|
|
4864
|
-
Y(
|
|
4865
|
-
|
|
4869
|
+
Y(b) && (b.emit("scrollStarted", b), !J(b) && (b.preventEnter = !0, mn && clearTimeout(mn), mn = setTimeout(() => {
|
|
4870
|
+
b.preventEnter = !1, b.emit("scrollEnded", b);
|
|
4866
4871
|
}, 100)));
|
|
4867
4872
|
}
|
|
4868
4873
|
function Oa(e, n) {
|
|
@@ -5074,10 +5079,10 @@ function _a(e, n) {
|
|
|
5074
5079
|
t.nativeDrag && (ge(e.e), pe = !0, t.handleEnd(n));
|
|
5075
5080
|
}
|
|
5076
5081
|
function Ua(e) {
|
|
5077
|
-
e.e.target !== e.e.currentTarget &&
|
|
5082
|
+
e.e.target !== e.e.currentTarget && b.pointerDown && (b.pointerDown.node.el.draggable = !1);
|
|
5078
5083
|
}
|
|
5079
5084
|
function ja(e) {
|
|
5080
|
-
e.e.target !== e.e.currentTarget &&
|
|
5085
|
+
e.e.target !== e.e.currentTarget && b.pointerDown && (b.pointerDown.node.el.draggable = !0);
|
|
5081
5086
|
}
|
|
5082
5087
|
function Ba(e, n) {
|
|
5083
5088
|
const t = e.targetData.parent.data.config;
|
|
@@ -5108,7 +5113,7 @@ function qa(e, n) {
|
|
|
5108
5113
|
function Ga(e) {
|
|
5109
5114
|
var u, c, g, h, f;
|
|
5110
5115
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
5111
|
-
const n = e.draggedNodes.map((
|
|
5116
|
+
const n = e.draggedNodes.map((w) => w.el), t = e.initialParent.data, r = J(e), o = (u = q.get(e.initialParent.el)) == null ? void 0 : u.config, i = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, s = (c = t == null ? void 0 : t.config) == null ? void 0 : c.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (h = t == null ? void 0 : t.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
|
|
5112
5117
|
J(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Dn(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(() => {
|
|
5113
5118
|
ue(n, i), ue(n, s), ue(n, d);
|
|
5114
5119
|
}), ye(e.draggedNodes, e.currentParent, e), we(e.currentParent, void 0, e);
|
|
@@ -5133,7 +5138,7 @@ function Ya(e, n) {
|
|
|
5133
5138
|
), Y(n) && t.handleEnd(n);
|
|
5134
5139
|
}
|
|
5135
5140
|
function Wa(e, n, t, r, o, i) {
|
|
5136
|
-
var f,
|
|
5141
|
+
var f, w;
|
|
5137
5142
|
const s = n.data.config;
|
|
5138
5143
|
let d, l;
|
|
5139
5144
|
const p = [
|
|
@@ -5164,13 +5169,13 @@ function Wa(e, n, t, r, o, i) {
|
|
|
5164
5169
|
"height",
|
|
5165
5170
|
"boxSizing",
|
|
5166
5171
|
"overflow"
|
|
5167
|
-
], u = (
|
|
5168
|
-
const T = window.getComputedStyle(
|
|
5172
|
+
], u = (y, x) => {
|
|
5173
|
+
const T = window.getComputedStyle(y);
|
|
5169
5174
|
p.forEach((D) => {
|
|
5170
|
-
|
|
5175
|
+
x.style[D] = T[D];
|
|
5171
5176
|
});
|
|
5172
|
-
}, c = (
|
|
5173
|
-
Object.assign(
|
|
5177
|
+
}, c = (y, x = {}) => {
|
|
5178
|
+
Object.assign(y.style, {
|
|
5174
5179
|
position: "absolute",
|
|
5175
5180
|
zIndex: "9999",
|
|
5176
5181
|
pointerEvents: "none",
|
|
@@ -5180,7 +5185,7 @@ function Wa(e, n, t, r, o, i) {
|
|
|
5180
5185
|
overflow: "hidden",
|
|
5181
5186
|
width: `${i.width}px`,
|
|
5182
5187
|
height: `${i.height}px`,
|
|
5183
|
-
...
|
|
5188
|
+
...x
|
|
5184
5189
|
});
|
|
5185
5190
|
};
|
|
5186
5191
|
if (s.synthDragImage)
|
|
@@ -5188,11 +5193,11 @@ function Wa(e, n, t, r, o, i) {
|
|
|
5188
5193
|
else if (!s.multiDrag || o.length === 1)
|
|
5189
5194
|
d = e.el.cloneNode(!0), u(e.el, d), d.setAttribute("popover", "manual"), c(d);
|
|
5190
5195
|
else {
|
|
5191
|
-
const
|
|
5192
|
-
|
|
5193
|
-
const T =
|
|
5194
|
-
u(
|
|
5195
|
-
}),
|
|
5196
|
+
const y = document.createElement("div");
|
|
5197
|
+
y.setAttribute("popover", "manual"), o.forEach((x) => {
|
|
5198
|
+
const T = x.el.cloneNode(!0);
|
|
5199
|
+
u(x.el, T), T.style.pointerEvents = "none", T.style.margin = "0", y.append(T);
|
|
5200
|
+
}), y.style.display = "flex", y.style.flexDirection = "column", y.style.padding = "0", y.style.margin = "0", y.style.position = "absolute", y.style.zIndex = "9999", y.style.pointerEvents = "none", d = y;
|
|
5196
5201
|
}
|
|
5197
5202
|
d.id = "dnd-dragged-node-clone", n.el.appendChild(d), d.showPopover();
|
|
5198
5203
|
const g = {
|
|
@@ -5201,7 +5206,7 @@ function Wa(e, n, t, r, o, i) {
|
|
|
5201
5206
|
synthDragScrolling: !1,
|
|
5202
5207
|
synthDragging: !0,
|
|
5203
5208
|
rootScrollWidth: (f = document.scrollingElement) == null ? void 0 : f.scrollWidth,
|
|
5204
|
-
rootScrollHeight: (
|
|
5209
|
+
rootScrollHeight: (w = document.scrollingElement) == null ? void 0 : w.scrollHeight
|
|
5205
5210
|
};
|
|
5206
5211
|
return ft({
|
|
5207
5212
|
...mt(
|
|
@@ -5375,7 +5380,7 @@ function X(e) {
|
|
|
5375
5380
|
e: t,
|
|
5376
5381
|
targetData: r
|
|
5377
5382
|
},
|
|
5378
|
-
|
|
5383
|
+
b
|
|
5379
5384
|
);
|
|
5380
5385
|
};
|
|
5381
5386
|
}
|
|
@@ -5415,7 +5420,7 @@ function Ke(e) {
|
|
|
5415
5420
|
e: t,
|
|
5416
5421
|
targetData: r
|
|
5417
5422
|
},
|
|
5418
|
-
|
|
5423
|
+
b
|
|
5419
5424
|
);
|
|
5420
5425
|
};
|
|
5421
5426
|
}
|
|
@@ -5463,23 +5468,23 @@ function ue(e, n) {
|
|
|
5463
5468
|
function qn(e, n, t, r, o) {
|
|
5464
5469
|
const s = o.axis === "x", d = e === document.scrollingElement, l = s ? "scrollLeft" : "scrollTop", p = s ? "clientWidth" : "clientHeight", u = s ? "offsetWidth" : "offsetHeight", c = s ? "scrollWidth" : "scrollHeight", g = s ? n.clientX : n.clientY, h = s ? r.left : r.top, f = s ? t.overflowX : t.overflowY;
|
|
5465
5470
|
if (d) {
|
|
5466
|
-
const
|
|
5471
|
+
const w = e[l], y = e[p], x = w > 0, T = w + y < (s ? o.state.rootScrollWidth || 0 : e[c]);
|
|
5467
5472
|
return s ? {
|
|
5468
|
-
left:
|
|
5469
|
-
right: T && g >
|
|
5473
|
+
left: x && g < y * 0.075,
|
|
5474
|
+
right: T && g > y * (1 - 0.075)
|
|
5470
5475
|
} : {
|
|
5471
|
-
up:
|
|
5472
|
-
down: T && g >
|
|
5476
|
+
up: x && g < y * 0.075,
|
|
5477
|
+
down: T && g > y * (1 - 0.075)
|
|
5473
5478
|
};
|
|
5474
5479
|
}
|
|
5475
5480
|
if ((f === "auto" || f === "scroll") && e !== document.body && e !== document.documentElement) {
|
|
5476
|
-
const
|
|
5481
|
+
const w = e[c], y = e[u], x = e[l], T = x > 0, D = x < w - y;
|
|
5477
5482
|
return s ? {
|
|
5478
|
-
left: T && g < h +
|
|
5479
|
-
right: D && g > h +
|
|
5483
|
+
left: T && g < h + y * 0.075,
|
|
5484
|
+
right: D && g > h + y * (1 - 0.075)
|
|
5480
5485
|
} : {
|
|
5481
|
-
up: T && g < h +
|
|
5482
|
-
down: D && g > h +
|
|
5486
|
+
up: T && g < h + y * 0.075,
|
|
5487
|
+
down: D && g > h + y * (1 - 0.075)
|
|
5483
5488
|
};
|
|
5484
5489
|
}
|
|
5485
5490
|
return s ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
@@ -5495,8 +5500,8 @@ function oi(e, n, t, r) {
|
|
|
5495
5500
|
t[l] !== void 0 && (cancelAnimationFrame(t[l]), t[l] = void 0);
|
|
5496
5501
|
return;
|
|
5497
5502
|
}
|
|
5498
|
-
const u = o ? "scrollLeft" : "scrollTop", c = o ? "clientWidth" : "clientHeight", g = o ? "scrollWidth" : "scrollHeight", h = e[u], f = e[c],
|
|
5499
|
-
if (!(i > 0 ? h + f <
|
|
5503
|
+
const u = o ? "scrollLeft" : "scrollTop", c = o ? "clientWidth" : "clientHeight", g = o ? "scrollWidth" : "scrollHeight", h = e[u], f = e[c], w = e[g];
|
|
5504
|
+
if (!(i > 0 ? h + f < w : h > 0)) {
|
|
5500
5505
|
t[l] = void 0, t[d] = void 0;
|
|
5501
5506
|
return;
|
|
5502
5507
|
}
|
|
@@ -5667,32 +5672,32 @@ const Wn = {
|
|
|
5667
5672
|
null
|
|
5668
5673
|
), g = U.useRef(i);
|
|
5669
5674
|
U.useEffect(() => {
|
|
5670
|
-
const
|
|
5675
|
+
const x = (T) => {
|
|
5671
5676
|
const D = T.detail ?? null;
|
|
5672
5677
|
c(D);
|
|
5673
5678
|
};
|
|
5674
|
-
return window.addEventListener(bn,
|
|
5679
|
+
return window.addEventListener(bn, x), () => window.removeEventListener(bn, x);
|
|
5675
5680
|
}, []);
|
|
5676
|
-
const h = U.useCallback((
|
|
5681
|
+
const h = U.useCallback((x) => {
|
|
5677
5682
|
window.dispatchEvent(
|
|
5678
|
-
new CustomEvent(bn, { detail:
|
|
5683
|
+
new CustomEvent(bn, { detail: x })
|
|
5679
5684
|
);
|
|
5680
|
-
}, []), f = (
|
|
5685
|
+
}, []), f = (x) => {
|
|
5681
5686
|
var E;
|
|
5682
|
-
const T =
|
|
5687
|
+
const T = x.target, D = (E = T == null ? void 0 : T.closest) == null ? void 0 : E.call(T, "li.dnd-item"), I = (D == null ? void 0 : D.getAttribute("data-label")) || null;
|
|
5683
5688
|
I && (c(I), h(I));
|
|
5684
|
-
},
|
|
5689
|
+
}, w = U.useCallback(() => {
|
|
5685
5690
|
c(null), h(null);
|
|
5686
5691
|
}, [h]);
|
|
5687
5692
|
U.useEffect(() => {
|
|
5688
|
-
const
|
|
5689
|
-
return window.addEventListener("pointerup",
|
|
5690
|
-
window.removeEventListener("pointerup",
|
|
5693
|
+
const x = () => w();
|
|
5694
|
+
return window.addEventListener("pointerup", x), window.addEventListener("blur", x), () => {
|
|
5695
|
+
window.removeEventListener("pointerup", x), window.removeEventListener("blur", x);
|
|
5691
5696
|
};
|
|
5692
|
-
}, [
|
|
5693
|
-
const
|
|
5694
|
-
if (p.length !==
|
|
5695
|
-
const T = new Set(
|
|
5697
|
+
}, [w]), U.useEffect(() => {
|
|
5698
|
+
const x = g.current;
|
|
5699
|
+
if (p.length !== x.length && p.length === x.length + 1) {
|
|
5700
|
+
const T = new Set(x), D = p.find((I) => !T.has(I)) || null;
|
|
5696
5701
|
if (D) {
|
|
5697
5702
|
const I = t === "left" ? "right" : "left";
|
|
5698
5703
|
d == null || d({ item: D, from: I, to: t });
|
|
@@ -5700,7 +5705,7 @@ const Wn = {
|
|
|
5700
5705
|
}
|
|
5701
5706
|
g.current = p;
|
|
5702
5707
|
}, [p, t, d]);
|
|
5703
|
-
const
|
|
5708
|
+
const y = p.length === 0;
|
|
5704
5709
|
return /* @__PURE__ */ a(
|
|
5705
5710
|
ze,
|
|
5706
5711
|
{
|
|
@@ -5713,10 +5718,10 @@ const Wn = {
|
|
|
5713
5718
|
{
|
|
5714
5719
|
ref: l,
|
|
5715
5720
|
onPointerDownCapture: f,
|
|
5716
|
-
onPointerUpCapture:
|
|
5717
|
-
onPointerCancelCapture:
|
|
5718
|
-
$isEmpty:
|
|
5719
|
-
children:
|
|
5721
|
+
onPointerUpCapture: w,
|
|
5722
|
+
onPointerCancelCapture: w,
|
|
5723
|
+
$isEmpty: y,
|
|
5724
|
+
children: y ? /* @__PURE__ */ a(
|
|
5720
5725
|
ee,
|
|
5721
5726
|
{
|
|
5722
5727
|
background: !0,
|
|
@@ -5726,13 +5731,13 @@ const Wn = {
|
|
|
5726
5731
|
justifyContent: "center",
|
|
5727
5732
|
children: /* @__PURE__ */ a(k, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
|
|
5728
5733
|
}
|
|
5729
|
-
) : p.map((
|
|
5730
|
-
const D = u ===
|
|
5734
|
+
) : p.map((x, T) => {
|
|
5735
|
+
const D = u === x;
|
|
5731
5736
|
return /* @__PURE__ */ a(
|
|
5732
5737
|
gi,
|
|
5733
5738
|
{
|
|
5734
5739
|
className: `dnd-item${D ? " is-dragging" : ""}`,
|
|
5735
|
-
"data-label":
|
|
5740
|
+
"data-label": x,
|
|
5736
5741
|
"data-first": !!(s && T === 0) || void 0,
|
|
5737
5742
|
$active: D,
|
|
5738
5743
|
children: /* @__PURE__ */ a(ee, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ a(
|
|
@@ -5743,11 +5748,11 @@ const Wn = {
|
|
|
5743
5748
|
weight: D ? "bold" : "normal",
|
|
5744
5749
|
size: "medium",
|
|
5745
5750
|
padding: "6px 12px",
|
|
5746
|
-
children:
|
|
5751
|
+
children: x
|
|
5747
5752
|
}
|
|
5748
5753
|
) })
|
|
5749
5754
|
},
|
|
5750
|
-
|
|
5755
|
+
x
|
|
5751
5756
|
);
|
|
5752
5757
|
})
|
|
5753
5758
|
}
|
|
@@ -5759,7 +5764,7 @@ const Wn = {
|
|
|
5759
5764
|
o == null || o(s);
|
|
5760
5765
|
};
|
|
5761
5766
|
return /* @__PURE__ */ m(
|
|
5762
|
-
|
|
5767
|
+
v,
|
|
5763
5768
|
{
|
|
5764
5769
|
justifyContent: "space-between",
|
|
5765
5770
|
alignItems: "start",
|
|
@@ -6086,7 +6091,7 @@ function Qn(e, n) {
|
|
|
6086
6091
|
const Di = (e) => {
|
|
6087
6092
|
var o, i;
|
|
6088
6093
|
const { message: n } = e, t = $n(Nn), r = ((i = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : i.appearance) || oe.message.appearance;
|
|
6089
|
-
return /* @__PURE__ */ m(
|
|
6094
|
+
return /* @__PURE__ */ m(v, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
|
|
6090
6095
|
/* @__PURE__ */ a(
|
|
6091
6096
|
P,
|
|
6092
6097
|
{
|
|
@@ -6122,9 +6127,9 @@ const Di = (e) => {
|
|
|
6122
6127
|
options: g,
|
|
6123
6128
|
placeholder: h,
|
|
6124
6129
|
required: f,
|
|
6125
|
-
size:
|
|
6126
|
-
value:
|
|
6127
|
-
picker:
|
|
6130
|
+
size: w,
|
|
6131
|
+
value: y,
|
|
6132
|
+
picker: x,
|
|
6128
6133
|
showChevron: T,
|
|
6129
6134
|
checkedItems: D,
|
|
6130
6135
|
editable: I = !1,
|
|
@@ -6137,7 +6142,7 @@ const Di = (e) => {
|
|
|
6137
6142
|
onOptionClick: Te,
|
|
6138
6143
|
onCheckboxChange: Ce,
|
|
6139
6144
|
handleClear: he
|
|
6140
|
-
} = e, re = $n(Nn), Re = ((Oe = (de = re == null ? void 0 : re.input) == null ? void 0 : de.required) == null ? void 0 : Oe.appearance) || oe.required.appearance, De = f && !r, fe =
|
|
6145
|
+
} = e, re = $n(Nn), Re = ((Oe = (de = re == null ? void 0 : re.input) == null ? void 0 : de.required) == null ? void 0 : Oe.appearance) || oe.required.appearance, De = f && !r, fe = x || y === "" ? "" : Qn(g, y), me = nt(
|
|
6141
6146
|
() => g.filter((z) => D.includes(z.id)),
|
|
6142
6147
|
[g, D]
|
|
6143
6148
|
), Le = (z, L) => {
|
|
@@ -6160,7 +6165,7 @@ const Di = (e) => {
|
|
|
6160
6165
|
focused: o,
|
|
6161
6166
|
invalid: d,
|
|
6162
6167
|
margin: "0px 0px 0px 16px",
|
|
6163
|
-
size: Ci(
|
|
6168
|
+
size: Ci(w),
|
|
6164
6169
|
disabled: r,
|
|
6165
6170
|
children: l
|
|
6166
6171
|
}
|
|
@@ -6176,13 +6181,13 @@ const Di = (e) => {
|
|
|
6176
6181
|
$focused: o,
|
|
6177
6182
|
$invalid: d,
|
|
6178
6183
|
onClick: I ? void 0 : j,
|
|
6179
|
-
$value:
|
|
6180
|
-
$size:
|
|
6184
|
+
$value: y,
|
|
6185
|
+
$size: w,
|
|
6181
6186
|
children: [
|
|
6182
6187
|
/* @__PURE__ */ a(
|
|
6183
6188
|
wi,
|
|
6184
6189
|
{
|
|
6185
|
-
$inputWithData: !!
|
|
6190
|
+
$inputWithData: !!y,
|
|
6186
6191
|
autoComplete: "off",
|
|
6187
6192
|
value: fe,
|
|
6188
6193
|
name: c,
|
|
@@ -6190,7 +6195,7 @@ const Di = (e) => {
|
|
|
6190
6195
|
placeholder: h,
|
|
6191
6196
|
$disabled: r,
|
|
6192
6197
|
required: f,
|
|
6193
|
-
$size:
|
|
6198
|
+
$size: w,
|
|
6194
6199
|
$fullwidth: i,
|
|
6195
6200
|
$focused: o,
|
|
6196
6201
|
readOnly: !I,
|
|
@@ -6202,14 +6207,14 @@ const Di = (e) => {
|
|
|
6202
6207
|
}
|
|
6203
6208
|
),
|
|
6204
6209
|
/* @__PURE__ */ m(
|
|
6205
|
-
|
|
6210
|
+
v,
|
|
6206
6211
|
{
|
|
6207
6212
|
direction: "row",
|
|
6208
6213
|
gap: "8px",
|
|
6209
6214
|
alignItems: "center",
|
|
6210
6215
|
justifyContent: "space-between",
|
|
6211
6216
|
children: [
|
|
6212
|
-
/* @__PURE__ */ a(
|
|
6217
|
+
/* @__PURE__ */ a(v, { gap: "8px", alignItems: "center", wrap: "wrap", children: E && !r && (x ? me.map((z) => /* @__PURE__ */ a(
|
|
6213
6218
|
ve,
|
|
6214
6219
|
{
|
|
6215
6220
|
appearance: "gray",
|
|
@@ -6219,11 +6224,11 @@ const Di = (e) => {
|
|
|
6219
6224
|
onClose: (L) => Le(L, z.id)
|
|
6220
6225
|
},
|
|
6221
6226
|
z.id
|
|
6222
|
-
)) : (
|
|
6227
|
+
)) : (y ?? "") !== "" && /* @__PURE__ */ a(
|
|
6223
6228
|
ve,
|
|
6224
6229
|
{
|
|
6225
6230
|
appearance: "gray",
|
|
6226
|
-
label: Qn(g,
|
|
6231
|
+
label: Qn(g, y),
|
|
6227
6232
|
removable: !0,
|
|
6228
6233
|
displayIcon: !1,
|
|
6229
6234
|
onClose: (z) => {
|
|
@@ -6260,7 +6265,7 @@ const Di = (e) => {
|
|
|
6260
6265
|
label: z.label,
|
|
6261
6266
|
checked: D.includes(z.id),
|
|
6262
6267
|
onCheckboxChange: Ce,
|
|
6263
|
-
picker:
|
|
6268
|
+
picker: x
|
|
6264
6269
|
},
|
|
6265
6270
|
z.id
|
|
6266
6271
|
))
|
|
@@ -6283,9 +6288,9 @@ const Di = (e) => {
|
|
|
6283
6288
|
onFocus: g,
|
|
6284
6289
|
onKeyUp: h,
|
|
6285
6290
|
options: f,
|
|
6286
|
-
placeholder:
|
|
6287
|
-
required:
|
|
6288
|
-
size:
|
|
6291
|
+
placeholder: w,
|
|
6292
|
+
required: y = !1,
|
|
6293
|
+
size: x = "wide",
|
|
6289
6294
|
value: T,
|
|
6290
6295
|
showOptions: D = !1,
|
|
6291
6296
|
picker: I = !1,
|
|
@@ -6364,9 +6369,9 @@ const Di = (e) => {
|
|
|
6364
6369
|
message: d,
|
|
6365
6370
|
name: l,
|
|
6366
6371
|
options: z,
|
|
6367
|
-
placeholder:
|
|
6368
|
-
required:
|
|
6369
|
-
size:
|
|
6372
|
+
placeholder: w,
|
|
6373
|
+
required: y,
|
|
6374
|
+
size: x,
|
|
6370
6375
|
value: T,
|
|
6371
6376
|
picker: I,
|
|
6372
6377
|
showChevron: E,
|