@isettingkit/business-rules 2.0.4 → 2.0.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.js +605 -581
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as i, jsxs as v, Fragment as G } from "react/jsx-runtime";
|
|
2
2
|
import { MdOutlineDelete as pn, MdClear as gn, MdAdd as fn, MdOutlineCreate as ft, MdExpandLess as ht, MdExpandMore as an, MdInfo as mt, MdCached as bt, MdOutlineInfo as vt, MdClose as yt, MdOutlineFilterAltOff as jn, MdOutlineFilterAlt as Bn, MdChevronRight as Dn, MdArrowRight as xt, MdOutlineArrowCircleLeft as wt, MdOutlineArrowCircleRight as Dt, MdOutlineChevronRight as Ct, MdOutlineError as Tt } from "react-icons/md";
|
|
3
|
-
import { inube as S, Stack as w, Divider as Z, Icon as O, Text as
|
|
3
|
+
import { inube as S, Stack as w, Divider as Z, Icon as O, Text as A, SkeletonLine as ie, useMediaQuery as re, Blanket as hn, Button as B, Grid as Xe, Box as St, Tag as me, SkeletonIcon as Et, Checkbox as Un, Date as Be, Fieldset as Le, Tabs as Nt, OptionList as kt, Checkpicker as $t, Toggle as _n, Label as It, OptionItem as At } from "@inubekit/inubekit";
|
|
4
4
|
import T, { keyframes as qn, ThemeContext as mn } from "styled-components";
|
|
5
5
|
import { ValueDataType as X, ValueHowToSetUp as te, DecisionConditionRenderNew as Cn, DecisionConditionRender as Tn } from "@isettingkit/input";
|
|
6
6
|
import { DecisionViewConditionRenderer as en, DecisionViewConditionRendererNew as Ve } from "@isettingkit/view";
|
|
7
7
|
import { createPortal as bn } from "react-dom";
|
|
8
|
-
import
|
|
8
|
+
import M, { useState as z, useRef as Ce, useEffect as ve, useContext as vn, forwardRef as Rt, useMemo as Gn, useCallback as Ft } from "react";
|
|
9
9
|
import { useFormik as Yn } from "formik";
|
|
10
10
|
import { string as Ne, mixed as We, object as le, number as Se, lazy as Ue, date as _e } from "yup";
|
|
11
11
|
import { Link as Xn, useLocation as Lt } from "react-router-dom";
|
|
@@ -70,14 +70,14 @@ const yn = (e) => {
|
|
|
70
70
|
from: e.from ?? "",
|
|
71
71
|
to: e.to ?? ""
|
|
72
72
|
}), Bt = (e) => e.value, Ut = (e) => e.value, _t = (e) => e.value;
|
|
73
|
-
var
|
|
73
|
+
var I = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(I || {});
|
|
74
74
|
const qt = {
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
75
|
+
[I.LIST_OF_VALUES]: Vt,
|
|
76
|
+
[I.LIST_OF_VALUES_MULTI]: Ht,
|
|
77
|
+
[I.RANGE]: jt,
|
|
78
|
+
[I.GREATER_THAN]: Bt,
|
|
79
|
+
[I.LESS_THAN]: Ut,
|
|
80
|
+
[I.EQUAL]: _t
|
|
81
81
|
}, Pe = (e) => {
|
|
82
82
|
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = qt[e == null ? void 0 : e.howToSetTheDecision] || zt;
|
|
83
83
|
return t && r(n) || n || void 0;
|
|
@@ -118,7 +118,7 @@ const qt = {
|
|
|
118
118
|
skeleton: l,
|
|
119
119
|
terms: d,
|
|
120
120
|
textValues: s,
|
|
121
|
-
visibleConditions:
|
|
121
|
+
visibleConditions: p
|
|
122
122
|
} = e;
|
|
123
123
|
return a ? /* @__PURE__ */ v(w, { direction: "column", gap: "12px", children: [
|
|
124
124
|
/* @__PURE__ */ i(w, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
|
|
@@ -140,8 +140,8 @@ const qt = {
|
|
|
140
140
|
justifyContent: n,
|
|
141
141
|
height: "203px",
|
|
142
142
|
children: [
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
p.length > 0 && /* @__PURE__ */ i(
|
|
144
|
+
A,
|
|
145
145
|
{
|
|
146
146
|
type: "label",
|
|
147
147
|
size: "large",
|
|
@@ -151,16 +151,16 @@ const qt = {
|
|
|
151
151
|
children: s.factsThatConditionIt
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
|
|
154
|
+
p.length > 0 && p.map((c) => /* @__PURE__ */ i(Sn, { children: /* @__PURE__ */ i(w, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
155
155
|
en,
|
|
156
156
|
{
|
|
157
|
-
element: { ...
|
|
157
|
+
element: { ...c, value: c.value },
|
|
158
158
|
valueData: Pe(
|
|
159
|
-
|
|
159
|
+
c
|
|
160
160
|
)
|
|
161
161
|
}
|
|
162
|
-
) }) },
|
|
163
|
-
|
|
162
|
+
) }) }, c.conditionName)),
|
|
163
|
+
p.length > 0 && /* @__PURE__ */ i(Z, { dashed: !0 }),
|
|
164
164
|
d && /* @__PURE__ */ i(G, { children: r && /* @__PURE__ */ i(
|
|
165
165
|
en,
|
|
166
166
|
{
|
|
@@ -189,7 +189,7 @@ const qt = {
|
|
|
189
189
|
gap: "12px",
|
|
190
190
|
justifyContent: "space-between",
|
|
191
191
|
height: "203px",
|
|
192
|
-
children: l.map((
|
|
192
|
+
children: l.map((c, u) => /* @__PURE__ */ i(Sn, { children: /* @__PURE__ */ v(
|
|
193
193
|
w,
|
|
194
194
|
{
|
|
195
195
|
direction: "column",
|
|
@@ -243,7 +243,7 @@ const qt = {
|
|
|
243
243
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
244
244
|
} : null, s = ((g = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter(
|
|
245
245
|
(f) => !f.hidden
|
|
246
|
-
)) || [],
|
|
246
|
+
)) || [], p = Array.from({ length: 5 }), c = !!(!t && n && r && d), u = s.length < 2 ? "start" : "space-between";
|
|
247
247
|
return /* @__PURE__ */ i(
|
|
248
248
|
Gt,
|
|
249
249
|
{
|
|
@@ -251,8 +251,8 @@ const qt = {
|
|
|
251
251
|
decision: n,
|
|
252
252
|
decisionDateElement: l,
|
|
253
253
|
decisionMapper: d,
|
|
254
|
-
loading:
|
|
255
|
-
skeleton:
|
|
254
|
+
loading: c,
|
|
255
|
+
skeleton: p,
|
|
256
256
|
terms: !!(r != null && r.terms),
|
|
257
257
|
textValues: r,
|
|
258
258
|
visibleConditions: s
|
|
@@ -304,7 +304,7 @@ const qt = {
|
|
|
304
304
|
return bn(
|
|
305
305
|
/* @__PURE__ */ i(Yt, { smallScreen: l, children: /* @__PURE__ */ i(hn, { children: /* @__PURE__ */ i(Xt, { children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", children: [
|
|
306
306
|
/* @__PURE__ */ i(w, { direction: "column", gap: "24px", children: /* @__PURE__ */ v(w, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
|
-
/* @__PURE__ */ i(
|
|
307
|
+
/* @__PURE__ */ i(A, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
308
308
|
/* @__PURE__ */ i(gn, { size: "24px", cursor: "pointer", onClick: r })
|
|
309
309
|
] }) }),
|
|
310
310
|
n
|
|
@@ -406,7 +406,7 @@ const Qt = T.div`
|
|
|
406
406
|
}, er = (e) => {
|
|
407
407
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: a } = e;
|
|
408
408
|
return n ? /* @__PURE__ */ i(xn, { children: /* @__PURE__ */ v(w, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
409
|
-
/* @__PURE__ */ i(
|
|
409
|
+
/* @__PURE__ */ i(A, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
410
410
|
/* @__PURE__ */ i(
|
|
411
411
|
yn,
|
|
412
412
|
{
|
|
@@ -426,7 +426,7 @@ const Qt = T.div`
|
|
|
426
426
|
shouldRenderEmptyMessage: o
|
|
427
427
|
} = e, a = n || "Agregar decisión";
|
|
428
428
|
return /* @__PURE__ */ i(xn, { children: o ? null : /* @__PURE__ */ v(w, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
429
|
-
/* @__PURE__ */ i(
|
|
429
|
+
/* @__PURE__ */ i(A, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
430
430
|
/* @__PURE__ */ i(
|
|
431
431
|
Qt,
|
|
432
432
|
{
|
|
@@ -441,7 +441,7 @@ const Qt = T.div`
|
|
|
441
441
|
controls: !1,
|
|
442
442
|
children: /* @__PURE__ */ v(w, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
443
443
|
/* @__PURE__ */ i(O, { appearance: "gray", icon: /* @__PURE__ */ i(fn, {}), size: "35px" }),
|
|
444
|
-
/* @__PURE__ */ i(
|
|
444
|
+
/* @__PURE__ */ i(A, { appearance: "gray", type: "body", size: "large", children: a })
|
|
445
445
|
] })
|
|
446
446
|
}
|
|
447
447
|
)
|
|
@@ -465,7 +465,7 @@ const Qt = T.div`
|
|
|
465
465
|
handleDelete: l,
|
|
466
466
|
textValues: d
|
|
467
467
|
} = e, s = o ? Array.from({ length: 3 }).map(
|
|
468
|
-
(
|
|
468
|
+
(c, u) => ln({
|
|
469
469
|
type: "loading",
|
|
470
470
|
index: u,
|
|
471
471
|
controls: n,
|
|
@@ -476,9 +476,9 @@ const Qt = T.div`
|
|
|
476
476
|
textValues: d
|
|
477
477
|
})
|
|
478
478
|
) : r == null ? void 0 : r.map(
|
|
479
|
-
(
|
|
479
|
+
(c) => ln({
|
|
480
480
|
type: "decision",
|
|
481
|
-
decision:
|
|
481
|
+
decision: c,
|
|
482
482
|
controls: n,
|
|
483
483
|
customTitleContentAddCard: t,
|
|
484
484
|
loading: o,
|
|
@@ -486,9 +486,9 @@ const Qt = T.div`
|
|
|
486
486
|
handleDelete: l,
|
|
487
487
|
textValues: d
|
|
488
488
|
})
|
|
489
|
-
),
|
|
490
|
-
return { renderedCards: s, shouldRenderAddCard:
|
|
491
|
-
},
|
|
489
|
+
), p = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
490
|
+
return { renderedCards: s, shouldRenderAddCard: p };
|
|
491
|
+
}, di = (e) => {
|
|
492
492
|
const {
|
|
493
493
|
controls: n = !0,
|
|
494
494
|
customTitleContentAddCard: t,
|
|
@@ -498,8 +498,8 @@ const Qt = T.div`
|
|
|
498
498
|
decisionTemplate: l,
|
|
499
499
|
isModalOpen: d,
|
|
500
500
|
selectedDecision: s,
|
|
501
|
-
loading:
|
|
502
|
-
handleOpenModal:
|
|
501
|
+
loading: p,
|
|
502
|
+
handleOpenModal: c,
|
|
503
503
|
handleCloseModal: u,
|
|
504
504
|
handleSubmitForm: g,
|
|
505
505
|
handleDelete: f,
|
|
@@ -508,11 +508,11 @@ const Qt = T.div`
|
|
|
508
508
|
controls: n,
|
|
509
509
|
customTitleContentAddCard: t,
|
|
510
510
|
decisions: o,
|
|
511
|
-
loading:
|
|
512
|
-
handleOpenModal:
|
|
511
|
+
loading: p,
|
|
512
|
+
handleOpenModal: c,
|
|
513
513
|
handleDelete: f,
|
|
514
514
|
textValues: a
|
|
515
|
-
}), C = (o == null ? void 0 : o.length) === 0 && !
|
|
515
|
+
}), C = (o == null ? void 0 : o.length) === 0 && !p;
|
|
516
516
|
return /* @__PURE__ */ v(G, { children: [
|
|
517
517
|
/* @__PURE__ */ i(Kt, { children: /* @__PURE__ */ i(Zt, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: C ? /* @__PURE__ */ v(
|
|
518
518
|
w,
|
|
@@ -524,10 +524,10 @@ const Qt = T.div`
|
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ i(
|
|
527
|
+
/* @__PURE__ */ i(A, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ v(G, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
529
|
/* @__PURE__ */ v(
|
|
530
|
-
|
|
530
|
+
A,
|
|
531
531
|
{
|
|
532
532
|
as: "span",
|
|
533
533
|
type: "label",
|
|
@@ -547,7 +547,7 @@ const Qt = T.div`
|
|
|
547
547
|
B,
|
|
548
548
|
{
|
|
549
549
|
iconBefore: /* @__PURE__ */ i(fn, {}),
|
|
550
|
-
onClick: () =>
|
|
550
|
+
onClick: () => c ? c() : null,
|
|
551
551
|
children: t || "Agregar decisión"
|
|
552
552
|
}
|
|
553
553
|
)
|
|
@@ -573,8 +573,8 @@ const Qt = T.div`
|
|
|
573
573
|
controls: n,
|
|
574
574
|
customTitleContentAddCard: t,
|
|
575
575
|
customMessageEmptyDecisions: r,
|
|
576
|
-
loading:
|
|
577
|
-
handleOpenModal:
|
|
576
|
+
loading: p,
|
|
577
|
+
handleOpenModal: c,
|
|
578
578
|
handleDelete: f,
|
|
579
579
|
textValues: a,
|
|
580
580
|
shouldRenderEmptyMessage: C,
|
|
@@ -609,12 +609,12 @@ const Qt = T.div`
|
|
|
609
609
|
from: e.from ?? "",
|
|
610
610
|
to: e.to ?? ""
|
|
611
611
|
}), sr = (e) => e.value, dr = (e) => e.value, cr = (e) => e.value, ur = {
|
|
612
|
-
[
|
|
613
|
-
[
|
|
614
|
-
[
|
|
615
|
-
[
|
|
616
|
-
[
|
|
617
|
-
[
|
|
612
|
+
[I.LIST_OF_VALUES]: ar,
|
|
613
|
+
[I.LIST_OF_VALUES_MULTI]: ir,
|
|
614
|
+
[I.RANGE]: lr,
|
|
615
|
+
[I.GREATER_THAN]: sr,
|
|
616
|
+
[I.LESS_THAN]: dr,
|
|
617
|
+
[I.EQUAL]: cr
|
|
618
618
|
}, Oe = (e) => {
|
|
619
619
|
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = ur[e == null ? void 0 : e.howToSetTheDecision] || or;
|
|
620
620
|
return t && r(n) || n || void 0;
|
|
@@ -641,7 +641,7 @@ const Qt = T.div`
|
|
|
641
641
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
642
642
|
box-sizing: ${({ $boxSizing: e }) => e};
|
|
643
643
|
overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
|
|
644
|
-
`, Q =
|
|
644
|
+
`, Q = M.forwardRef(
|
|
645
645
|
(e, n) => {
|
|
646
646
|
const {
|
|
647
647
|
children: t,
|
|
@@ -651,8 +651,8 @@ const Qt = T.div`
|
|
|
651
651
|
alignItems: l,
|
|
652
652
|
alignContent: d,
|
|
653
653
|
height: s,
|
|
654
|
-
width:
|
|
655
|
-
gap:
|
|
654
|
+
width: p,
|
|
655
|
+
gap: c,
|
|
656
656
|
background: u,
|
|
657
657
|
borderRadius: g,
|
|
658
658
|
border: f,
|
|
@@ -670,9 +670,9 @@ const Qt = T.div`
|
|
|
670
670
|
$alignItems: l,
|
|
671
671
|
$alignContent: d,
|
|
672
672
|
height: s,
|
|
673
|
-
width:
|
|
673
|
+
width: p,
|
|
674
674
|
wrap: r,
|
|
675
|
-
$gap:
|
|
675
|
+
$gap: c,
|
|
676
676
|
$background: u,
|
|
677
677
|
$border: f,
|
|
678
678
|
$margin: b,
|
|
@@ -736,8 +736,8 @@ const gr = T.div`
|
|
|
736
736
|
visibleConditions: l,
|
|
737
737
|
tagLabel: d,
|
|
738
738
|
isOpen: s,
|
|
739
|
-
onToggle:
|
|
740
|
-
hasEffectiveFrom:
|
|
739
|
+
onToggle: p,
|
|
740
|
+
hasEffectiveFrom: c,
|
|
741
741
|
hasValidUntil: u,
|
|
742
742
|
effectiveFromRenderer: g,
|
|
743
743
|
validUntilRenderer: f,
|
|
@@ -745,7 +745,7 @@ const gr = T.div`
|
|
|
745
745
|
onDelete: x
|
|
746
746
|
} = e;
|
|
747
747
|
return o ? /* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
|
|
748
|
-
/* @__PURE__ */ i(gr, { onClick:
|
|
748
|
+
/* @__PURE__ */ i(gr, { onClick: p, children: /* @__PURE__ */ v(
|
|
749
749
|
w,
|
|
750
750
|
{
|
|
751
751
|
alignItems: "start",
|
|
@@ -815,7 +815,7 @@ const gr = T.div`
|
|
|
815
815
|
/* @__PURE__ */ i(Z, { dashed: !0 }),
|
|
816
816
|
/* @__PURE__ */ v(w, { direction: "column", gap: "12px", children: [
|
|
817
817
|
/* @__PURE__ */ i(
|
|
818
|
-
|
|
818
|
+
A,
|
|
819
819
|
{
|
|
820
820
|
type: "label",
|
|
821
821
|
size: "large",
|
|
@@ -852,7 +852,7 @@ const gr = T.div`
|
|
|
852
852
|
},
|
|
853
853
|
m.conditionName
|
|
854
854
|
)),
|
|
855
|
-
|
|
855
|
+
c && g && /* @__PURE__ */ i(
|
|
856
856
|
Q,
|
|
857
857
|
{
|
|
858
858
|
direction: "column",
|
|
@@ -913,7 +913,7 @@ const gr = T.div`
|
|
|
913
913
|
onToggle: l,
|
|
914
914
|
onEdit: d,
|
|
915
915
|
onDelete: s
|
|
916
|
-
} = e,
|
|
916
|
+
} = e, p = !!(n != null && n.effectiveFrom), c = !!(n != null && n.validUntil), u = p ? {
|
|
917
917
|
element: {
|
|
918
918
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
919
919
|
value: String(n.effectiveFrom),
|
|
@@ -926,7 +926,7 @@ const gr = T.div`
|
|
|
926
926
|
howToSetTheDecision: te.EQUAL,
|
|
927
927
|
decisionDataType: X.DATE
|
|
928
928
|
})
|
|
929
|
-
} : null, g =
|
|
929
|
+
} : null, g = c ? {
|
|
930
930
|
element: {
|
|
931
931
|
labelName: r == null ? void 0 : r.validUntil,
|
|
932
932
|
value: String(n.validUntil),
|
|
@@ -958,8 +958,8 @@ const gr = T.div`
|
|
|
958
958
|
tagLabel: k,
|
|
959
959
|
isOpen: a,
|
|
960
960
|
onToggle: l,
|
|
961
|
-
hasEffectiveFrom:
|
|
962
|
-
hasValidUntil:
|
|
961
|
+
hasEffectiveFrom: p,
|
|
962
|
+
hasValidUntil: c,
|
|
963
963
|
effectiveFromRenderer: u,
|
|
964
964
|
validUntilRenderer: g,
|
|
965
965
|
onEdit: d,
|
|
@@ -1113,7 +1113,7 @@ const vr = T.div`
|
|
|
1113
1113
|
alignItems: "center",
|
|
1114
1114
|
padding: "16px",
|
|
1115
1115
|
children: [
|
|
1116
|
-
/* @__PURE__ */ i(
|
|
1116
|
+
/* @__PURE__ */ i(A, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
|
|
1117
1117
|
/* @__PURE__ */ i(
|
|
1118
1118
|
O,
|
|
1119
1119
|
{
|
|
@@ -1147,8 +1147,8 @@ const vr = T.div`
|
|
|
1147
1147
|
handleDelete: l,
|
|
1148
1148
|
textValues: d,
|
|
1149
1149
|
isOpenFor: s,
|
|
1150
|
-
toggleAt:
|
|
1151
|
-
} = e,
|
|
1150
|
+
toggleAt: p
|
|
1151
|
+
} = e, c = o ? Array.from({ length: 3 }).map(
|
|
1152
1152
|
(g, f) => sn({
|
|
1153
1153
|
type: "loading",
|
|
1154
1154
|
index: f,
|
|
@@ -1171,10 +1171,10 @@ const vr = T.div`
|
|
|
1171
1171
|
textValues: d,
|
|
1172
1172
|
index: f,
|
|
1173
1173
|
isOpen: s ? s(f) : !1,
|
|
1174
|
-
onToggle:
|
|
1174
|
+
onToggle: p ? () => p(f) : void 0
|
|
1175
1175
|
})
|
|
1176
1176
|
), u = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
1177
|
-
return { renderedCards:
|
|
1177
|
+
return { renderedCards: c, shouldRenderAddCard: u };
|
|
1178
1178
|
}, Nr = T.div`
|
|
1179
1179
|
position: relative;
|
|
1180
1180
|
& > div {
|
|
@@ -1226,7 +1226,7 @@ const vr = T.div`
|
|
|
1226
1226
|
/* @__PURE__ */ v(w, { alignItems: "center", justifyContent: "space-between", children: [
|
|
1227
1227
|
/* @__PURE__ */ v(w, { direction: "column", gap: "8px", children: [
|
|
1228
1228
|
/* @__PURE__ */ i(
|
|
1229
|
-
|
|
1229
|
+
A,
|
|
1230
1230
|
{
|
|
1231
1231
|
type: "title",
|
|
1232
1232
|
size: "medium",
|
|
@@ -1235,7 +1235,7 @@ const vr = T.div`
|
|
|
1235
1235
|
children: a
|
|
1236
1236
|
}
|
|
1237
1237
|
),
|
|
1238
|
-
/* @__PURE__ */ i(
|
|
1238
|
+
/* @__PURE__ */ i(A, { size: "medium", appearance: "gray", children: t })
|
|
1239
1239
|
] }),
|
|
1240
1240
|
/* @__PURE__ */ i(gn, { size: "24px", cursor: "pointer", onClick: o })
|
|
1241
1241
|
] }),
|
|
@@ -1245,14 +1245,14 @@ const vr = T.div`
|
|
|
1245
1245
|
] }) }) }) }),
|
|
1246
1246
|
l
|
|
1247
1247
|
);
|
|
1248
|
-
},
|
|
1248
|
+
}, Ir = (e) => ({
|
|
1249
1249
|
schema: Ne().required("Requerido").test(
|
|
1250
1250
|
"non-empty",
|
|
1251
1251
|
"El valor no puede estar vacío",
|
|
1252
1252
|
(n) => n != null && n.trim() !== ""
|
|
1253
1253
|
),
|
|
1254
1254
|
value: e
|
|
1255
|
-
}),
|
|
1255
|
+
}), Ar = (e) => ({
|
|
1256
1256
|
schema: We().test(
|
|
1257
1257
|
"isArrayOrString",
|
|
1258
1258
|
"Por favor selecciona una opcion",
|
|
@@ -1293,13 +1293,13 @@ const vr = T.div`
|
|
|
1293
1293
|
schema: Ne().required("Requerido"),
|
|
1294
1294
|
value: e
|
|
1295
1295
|
}, Lr = {
|
|
1296
|
-
[
|
|
1297
|
-
[
|
|
1298
|
-
[
|
|
1299
|
-
[
|
|
1300
|
-
[
|
|
1301
|
-
[
|
|
1302
|
-
}, Nn = (e) => Lr[e] ||
|
|
1296
|
+
[I.LIST_OF_VALUES]: Ar,
|
|
1297
|
+
[I.LIST_OF_VALUES_MULTI]: Rr,
|
|
1298
|
+
[I.RANGE]: Fr,
|
|
1299
|
+
[I.GREATER_THAN]: nn,
|
|
1300
|
+
[I.LESS_THAN]: nn,
|
|
1301
|
+
[I.EQUAL]: nn
|
|
1302
|
+
}, Nn = (e) => Lr[e] || Ir;
|
|
1303
1303
|
var et = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(et || {});
|
|
1304
1304
|
function Pr({
|
|
1305
1305
|
decision: e,
|
|
@@ -1328,7 +1328,7 @@ function Pr({
|
|
|
1328
1328
|
l.values.value,
|
|
1329
1329
|
l.values.decisionDataType
|
|
1330
1330
|
).schema),
|
|
1331
|
-
conditionsThatEstablishesTheDecision: Ue((
|
|
1331
|
+
conditionsThatEstablishesTheDecision: Ue((c, { parent: u }) => {
|
|
1332
1332
|
if ((u == null ? void 0 : u.toggleNone) && Object.keys(u.conditionsThatEstablishesTheDecision || {}).length > 0) return le().shape({});
|
|
1333
1333
|
const b = o().reduce(
|
|
1334
1334
|
(x, m) => {
|
|
@@ -1359,7 +1359,7 @@ function Pr({
|
|
|
1359
1359
|
"Se requiere la fecha de vigencia desde"
|
|
1360
1360
|
), d.validUntil = _e().when(
|
|
1361
1361
|
"checkClosed",
|
|
1362
|
-
(
|
|
1362
|
+
(c, u, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? u.required("Se requiere la fecha de vigencia hasta").test(
|
|
1363
1363
|
"is-after-startDate",
|
|
1364
1364
|
"La fecha válida para la vigencia hasta debe ser mayor o igual a la fecha de inicio",
|
|
1365
1365
|
function(b) {
|
|
@@ -1373,37 +1373,37 @@ function Pr({
|
|
|
1373
1373
|
initialValues: a,
|
|
1374
1374
|
validationSchema: s,
|
|
1375
1375
|
validateOnBlur: !0,
|
|
1376
|
-
onSubmit: (
|
|
1376
|
+
onSubmit: (c) => {
|
|
1377
1377
|
const u = Object.fromEntries(
|
|
1378
1378
|
Object.entries(r).map(([f, b]) => {
|
|
1379
1379
|
const m = b.filter((y) => {
|
|
1380
1380
|
var C;
|
|
1381
|
-
const D = (C =
|
|
1381
|
+
const D = (C = c.conditionsThatEstablishesTheDecision) == null ? void 0 : C[y.conditionName];
|
|
1382
1382
|
return D != null && D !== "";
|
|
1383
1383
|
}).map((y) => {
|
|
1384
1384
|
var D;
|
|
1385
1385
|
return {
|
|
1386
1386
|
...y,
|
|
1387
|
-
value: (D =
|
|
1387
|
+
value: (D = c.conditionsThatEstablishesTheDecision) == null ? void 0 : D[y.conditionName]
|
|
1388
1388
|
};
|
|
1389
1389
|
});
|
|
1390
1390
|
return [f, m];
|
|
1391
1391
|
})
|
|
1392
1392
|
), g = {
|
|
1393
1393
|
...e,
|
|
1394
|
-
ruleName:
|
|
1395
|
-
decisionDataType:
|
|
1396
|
-
howToSetTheDecision:
|
|
1397
|
-
value:
|
|
1398
|
-
effectiveFrom:
|
|
1399
|
-
validUntil:
|
|
1394
|
+
ruleName: c.ruleName,
|
|
1395
|
+
decisionDataType: c.decisionDataType,
|
|
1396
|
+
howToSetTheDecision: c.howToSetTheDecision,
|
|
1397
|
+
value: c.value,
|
|
1398
|
+
effectiveFrom: c.effectiveFrom,
|
|
1399
|
+
validUntil: c.validUntil,
|
|
1400
1400
|
conditionsThatEstablishesTheDecision: u
|
|
1401
1401
|
};
|
|
1402
1402
|
n(g);
|
|
1403
1403
|
}
|
|
1404
|
-
}), { formik: l, handleToggleNoneChange: (
|
|
1405
|
-
l.setFieldValue("toggleNone",
|
|
1406
|
-
if (
|
|
1404
|
+
}), { formik: l, handleToggleNoneChange: (c) => {
|
|
1405
|
+
l.setFieldValue("toggleNone", c), o().forEach((g) => {
|
|
1406
|
+
if (c)
|
|
1407
1407
|
l.setFieldValue(
|
|
1408
1408
|
`conditionsThatEstablishesTheDecision.${g.conditionName}`,
|
|
1409
1409
|
void 0
|
|
@@ -1465,12 +1465,12 @@ const Or = T.div`
|
|
|
1465
1465
|
checkedClosed: l = !1,
|
|
1466
1466
|
required: d = !1,
|
|
1467
1467
|
valueStart: s = "",
|
|
1468
|
-
valueEnd:
|
|
1469
|
-
messageStart:
|
|
1468
|
+
valueEnd: p = "",
|
|
1469
|
+
messageStart: c = "",
|
|
1470
1470
|
messageEnd: u = "",
|
|
1471
1471
|
statusStart: g = "pending",
|
|
1472
1472
|
statusEnd: f = "pending"
|
|
1473
|
-
} = e, [b, x] =
|
|
1473
|
+
} = e, [b, x] = z(l), [m, y] = z(s), [D, C] = z(p), k = ({ target: $ }) => {
|
|
1474
1474
|
x($.checked), r && r($.checked);
|
|
1475
1475
|
}, E = ($) => {
|
|
1476
1476
|
y($.target.value), n($);
|
|
@@ -1479,7 +1479,7 @@ const Or = T.div`
|
|
|
1479
1479
|
}, L = re("(max-width: 400px)");
|
|
1480
1480
|
return /* @__PURE__ */ v(w, { direction: "column", width: "100%", gap: "20px", children: [
|
|
1481
1481
|
/* @__PURE__ */ v(w, { justifyContent: "space-between", children: [
|
|
1482
|
-
/* @__PURE__ */ i(
|
|
1482
|
+
/* @__PURE__ */ i(A, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
1483
1483
|
/* @__PURE__ */ i(
|
|
1484
1484
|
Un,
|
|
1485
1485
|
{
|
|
@@ -1507,7 +1507,7 @@ const Or = T.div`
|
|
|
1507
1507
|
required: d,
|
|
1508
1508
|
size: "compact",
|
|
1509
1509
|
status: g,
|
|
1510
|
-
message:
|
|
1510
|
+
message: c,
|
|
1511
1511
|
fullwidth: !0
|
|
1512
1512
|
}
|
|
1513
1513
|
),
|
|
@@ -1539,8 +1539,8 @@ const Or = T.div`
|
|
|
1539
1539
|
onCancel: l,
|
|
1540
1540
|
onClearCondition: d,
|
|
1541
1541
|
onTabChange: s,
|
|
1542
|
-
showConditionsError:
|
|
1543
|
-
tabs:
|
|
1542
|
+
showConditionsError: p,
|
|
1543
|
+
tabs: c,
|
|
1544
1544
|
termEndStatus: u,
|
|
1545
1545
|
termStartStatus: g,
|
|
1546
1546
|
textValues: f,
|
|
@@ -1562,7 +1562,7 @@ const Or = T.div`
|
|
|
1562
1562
|
Nt,
|
|
1563
1563
|
{
|
|
1564
1564
|
onChange: s,
|
|
1565
|
-
tabs:
|
|
1565
|
+
tabs: c,
|
|
1566
1566
|
selectedTab: n
|
|
1567
1567
|
}
|
|
1568
1568
|
),
|
|
@@ -1615,7 +1615,7 @@ const Or = T.div`
|
|
|
1615
1615
|
},
|
|
1616
1616
|
C.conditionName
|
|
1617
1617
|
)) }),
|
|
1618
|
-
|
|
1618
|
+
p && /* @__PURE__ */ i(A, { type: "label", size: "medium", appearance: "danger", children: t ?? "Existen errores en el formulario, por favor revísalos." })
|
|
1619
1619
|
] }) }),
|
|
1620
1620
|
/* @__PURE__ */ i(Le, { legend: "Vigencia", spacing: "wide", children: f.terms && /* @__PURE__ */ i(
|
|
1621
1621
|
Mr,
|
|
@@ -1648,7 +1648,7 @@ const Or = T.div`
|
|
|
1648
1648
|
title: "Redefinir la condición",
|
|
1649
1649
|
onCloseModal: y,
|
|
1650
1650
|
children: /* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
|
|
1651
|
-
/* @__PURE__ */ i(
|
|
1651
|
+
/* @__PURE__ */ i(A, { type: "body", size: "large", appearance: "gray", children: "¿Estás seguro? Se perderá todo lo que tienes actualmente definido y deberás reescribir completamente la condición, de esta manera podrás usar las últimas variables condicionales que están definidas en la actualidad para esta decisión ." }),
|
|
1652
1652
|
/* @__PURE__ */ v(w, { justifyContent: "end", gap: "12px", children: [
|
|
1653
1653
|
/* @__PURE__ */ i(
|
|
1654
1654
|
B,
|
|
@@ -1677,7 +1677,7 @@ const Or = T.div`
|
|
|
1677
1677
|
onRemoveCondition: a,
|
|
1678
1678
|
onRestoreConditions: l,
|
|
1679
1679
|
fullTemplate: d
|
|
1680
|
-
} = e, { formik: s, handleToggleNoneChange:
|
|
1680
|
+
} = e, { formik: s, handleToggleNoneChange: p } = Pr({
|
|
1681
1681
|
decision: n,
|
|
1682
1682
|
onSubmitEvent: t,
|
|
1683
1683
|
textValues: r
|
|
@@ -1690,40 +1690,40 @@ const Or = T.div`
|
|
|
1690
1690
|
], m = {};
|
|
1691
1691
|
let y = 1;
|
|
1692
1692
|
const D = x.map((N) => {
|
|
1693
|
-
const
|
|
1694
|
-
return m[
|
|
1695
|
-
id:
|
|
1696
|
-
label: N === "group-primary" ? kn(N, 0) : kn(N, Number(
|
|
1693
|
+
const H = N === "group-primary" ? "mainCondition" : `alternateCondition-${y++}`;
|
|
1694
|
+
return m[H] = N, {
|
|
1695
|
+
id: H,
|
|
1696
|
+
label: N === "group-primary" ? kn(N, 0) : kn(N, Number(H.split("-").at(-1))),
|
|
1697
1697
|
isDisabled: !1
|
|
1698
1698
|
};
|
|
1699
|
-
}), [C, k] =
|
|
1699
|
+
}), [C, k] = M.useState(
|
|
1700
1700
|
((ze = D[0]) == null ? void 0 : ze.id) ?? "mainCondition"
|
|
1701
|
-
), E = (N) => k(N), R = m[C] ?? "group-primary", L = f[R] ?? [], $ = f["group-primary"] ?? [],
|
|
1701
|
+
), E = (N) => k(N), R = m[C] ?? "group-primary", L = f[R] ?? [], $ = f["group-primary"] ?? [], V = {
|
|
1702
1702
|
decisionDataType: n.decisionDataType,
|
|
1703
1703
|
howToSetTheCondition: n.howToSetTheDecision,
|
|
1704
1704
|
labelName: n.labelName,
|
|
1705
1705
|
listOfPossibleValues: n.listOfPossibleValues,
|
|
1706
1706
|
ruleName: n.ruleName
|
|
1707
|
-
}, oe = s.submitCount > 0 || !!s.touched.effectiveFrom, xe = s.submitCount > 0 || !!s.touched.validUntil, we = oe ? s.errors.effectiveFrom ? "invalid" : "valid" : void 0, pe = xe ? s.errors.validUntil ? "invalid" : "valid" : void 0, J =
|
|
1707
|
+
}, oe = s.submitCount > 0 || !!s.touched.effectiveFrom, xe = s.submitCount > 0 || !!s.touched.validUntil, we = oe ? s.errors.effectiveFrom ? "invalid" : "valid" : void 0, pe = xe ? s.errors.validUntil ? "invalid" : "valid" : void 0, J = M.useMemo(() => {
|
|
1708
1708
|
const N = s.errors.conditionsThatEstablishesTheDecision;
|
|
1709
1709
|
if (!N) return;
|
|
1710
1710
|
if (typeof N == "string") return N;
|
|
1711
|
-
const
|
|
1711
|
+
const H = (K) => {
|
|
1712
1712
|
if (K) {
|
|
1713
1713
|
if (typeof K == "string") return K;
|
|
1714
1714
|
if (Array.isArray(K))
|
|
1715
1715
|
for (const Re of K) {
|
|
1716
|
-
const he =
|
|
1716
|
+
const he = H(Re);
|
|
1717
1717
|
if (he) return he;
|
|
1718
1718
|
}
|
|
1719
1719
|
else if (typeof K == "object")
|
|
1720
1720
|
for (const Re of Object.values(K)) {
|
|
1721
|
-
const he =
|
|
1721
|
+
const he = H(Re);
|
|
1722
1722
|
if (he) return he;
|
|
1723
1723
|
}
|
|
1724
1724
|
}
|
|
1725
1725
|
};
|
|
1726
|
-
return
|
|
1726
|
+
return H(N);
|
|
1727
1727
|
}, [s.errors.conditionsThatEstablishesTheDecision]), $e = s.submitCount > 0 && !!J, De = (N) => N != null && N.isMulti || N != null && N.multiple || (N == null ? void 0 : N.valueUse) === "Among" ? [] : "", ge = (N) => {
|
|
1728
1728
|
const K = Object.values(u).flat().find((he) => he.conditionName === N), Re = De(K);
|
|
1729
1729
|
s.setFieldValue(
|
|
@@ -1736,10 +1736,10 @@ const Or = T.div`
|
|
|
1736
1736
|
);
|
|
1737
1737
|
}, fe = () => {
|
|
1738
1738
|
L.forEach((N) => {
|
|
1739
|
-
const
|
|
1740
|
-
s.setFieldValue(
|
|
1739
|
+
const H = `conditionsThatEstablishesTheDecision.${N.conditionName}`;
|
|
1740
|
+
s.setFieldValue(H, De(N)), s.setFieldTouched(H, !1, !1);
|
|
1741
1741
|
});
|
|
1742
|
-
}, [
|
|
1742
|
+
}, [Ie, ae] = M.useState(!1);
|
|
1743
1743
|
return /* @__PURE__ */ i(
|
|
1744
1744
|
zr,
|
|
1745
1745
|
{
|
|
@@ -1748,7 +1748,7 @@ const Or = T.div`
|
|
|
1748
1748
|
currentConditions: L,
|
|
1749
1749
|
decision: n,
|
|
1750
1750
|
formik: s,
|
|
1751
|
-
normalizedDecision:
|
|
1751
|
+
normalizedDecision: V,
|
|
1752
1752
|
onCancel: o,
|
|
1753
1753
|
onRedefineCurrentTab: fe,
|
|
1754
1754
|
onTabChange: E,
|
|
@@ -1762,21 +1762,21 @@ const Or = T.div`
|
|
|
1762
1762
|
textValues: r,
|
|
1763
1763
|
visibleConditions: $,
|
|
1764
1764
|
visibleConditionsByGroup: f,
|
|
1765
|
-
handleToggleNoneChange:
|
|
1765
|
+
handleToggleNoneChange: p,
|
|
1766
1766
|
portalId: "redefine-confirm-portal",
|
|
1767
|
-
showRedefineConfirm:
|
|
1767
|
+
showRedefineConfirm: Ie,
|
|
1768
1768
|
onOpenRedefineConfirm: () => ae(!0),
|
|
1769
1769
|
onCloseRedefineConfirm: () => ae(!1),
|
|
1770
1770
|
onConfirmRedefine: () => {
|
|
1771
1771
|
fe();
|
|
1772
1772
|
const N = (u[R] ?? []).map(
|
|
1773
|
-
(
|
|
1773
|
+
(H) => H.conditionName
|
|
1774
1774
|
);
|
|
1775
1775
|
l == null || l(N), ae(!1);
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
1778
|
);
|
|
1779
|
-
},
|
|
1779
|
+
}, ci = (e) => {
|
|
1780
1780
|
const {
|
|
1781
1781
|
controls: n = !0,
|
|
1782
1782
|
customTitleContentAddCard: t,
|
|
@@ -1786,8 +1786,8 @@ const Or = T.div`
|
|
|
1786
1786
|
decisionTemplate: l,
|
|
1787
1787
|
isModalOpen: d,
|
|
1788
1788
|
selectedDecision: s,
|
|
1789
|
-
loading:
|
|
1790
|
-
handleOpenModal:
|
|
1789
|
+
loading: p,
|
|
1790
|
+
handleOpenModal: c,
|
|
1791
1791
|
handleCloseModal: u,
|
|
1792
1792
|
handleSubmitForm: g,
|
|
1793
1793
|
handleDelete: f,
|
|
@@ -1795,17 +1795,17 @@ const Or = T.div`
|
|
|
1795
1795
|
onRemoveCondition: x,
|
|
1796
1796
|
onRestoreConditions: m,
|
|
1797
1797
|
baseDecisionTemplate: y
|
|
1798
|
-
} = e, [D, C] =
|
|
1798
|
+
} = e, [D, C] = z(null), k = re("(max-width: 681px)"), { renderedCards: E, shouldRenderAddCard: R } = Er({
|
|
1799
1799
|
controls: n,
|
|
1800
1800
|
customTitleContentAddCard: t,
|
|
1801
1801
|
decisions: o,
|
|
1802
|
-
loading:
|
|
1803
|
-
handleOpenModal:
|
|
1802
|
+
loading: p,
|
|
1803
|
+
handleOpenModal: c,
|
|
1804
1804
|
handleDelete: f,
|
|
1805
1805
|
textValues: a,
|
|
1806
1806
|
isOpenFor: ($) => D === $,
|
|
1807
|
-
toggleAt: ($) => C((
|
|
1808
|
-
}), L = (o == null ? void 0 : o.length) === 0 && !
|
|
1807
|
+
toggleAt: ($) => C((V) => V === $ ? null : $)
|
|
1808
|
+
}), L = (o == null ? void 0 : o.length) === 0 && !p;
|
|
1809
1809
|
return /* @__PURE__ */ v(G, { children: [
|
|
1810
1810
|
/* @__PURE__ */ i(xr, { children: /* @__PURE__ */ i(wr, { children: /* @__PURE__ */ i(w, { direction: "column", gap: "16px", padding: "6px", children: L ? /* @__PURE__ */ i(Le, { legend: "Decisiones", children: /* @__PURE__ */ v(
|
|
1811
1811
|
w,
|
|
@@ -1825,7 +1825,7 @@ const Or = T.div`
|
|
|
1825
1825
|
}
|
|
1826
1826
|
),
|
|
1827
1827
|
/* @__PURE__ */ i(
|
|
1828
|
-
|
|
1828
|
+
A,
|
|
1829
1829
|
{
|
|
1830
1830
|
type: "title",
|
|
1831
1831
|
size: "medium",
|
|
@@ -1834,7 +1834,7 @@ const Or = T.div`
|
|
|
1834
1834
|
children: "Sin decisiones"
|
|
1835
1835
|
}
|
|
1836
1836
|
),
|
|
1837
|
-
/* @__PURE__ */ i(
|
|
1837
|
+
/* @__PURE__ */ i(A, { as: "span", size: "medium", appearance: "gray", children: r || /* @__PURE__ */ v(G, { children: [
|
|
1838
1838
|
"Aun no tienes decisiones definidas, para empezar haz clic en",
|
|
1839
1839
|
t || ' "Agregar decisión"'
|
|
1840
1840
|
] }) })
|
|
@@ -1860,8 +1860,8 @@ const Or = T.div`
|
|
|
1860
1860
|
controls: n,
|
|
1861
1861
|
customTitleContentAddCard: t,
|
|
1862
1862
|
customMessageEmptyDecisions: r,
|
|
1863
|
-
loading:
|
|
1864
|
-
handleOpenModal:
|
|
1863
|
+
loading: p,
|
|
1864
|
+
handleOpenModal: c,
|
|
1865
1865
|
handleDelete: f,
|
|
1866
1866
|
textValues: a,
|
|
1867
1867
|
shouldRenderEmptyMessage: L,
|
|
@@ -1933,13 +1933,13 @@ function Br(e) {
|
|
|
1933
1933
|
);
|
|
1934
1934
|
}
|
|
1935
1935
|
const Ur = (e, n) => {
|
|
1936
|
-
const [t, r] =
|
|
1936
|
+
const [t, r] = z([]), [o, a] = z([]), [l, d] = z(!1), s = Ce(null);
|
|
1937
1937
|
return ve(() => {
|
|
1938
1938
|
if (!e.current || !s.current) return;
|
|
1939
|
-
const
|
|
1939
|
+
const p = e.current, c = s.current, u = () => {
|
|
1940
1940
|
var C;
|
|
1941
|
-
const f =
|
|
1942
|
-
|
|
1941
|
+
const f = p.clientWidth, b = Array.from(
|
|
1942
|
+
c.querySelectorAll('[data-filter-tag="true"]')
|
|
1943
1943
|
), x = 48;
|
|
1944
1944
|
let m = 0;
|
|
1945
1945
|
const y = [], D = [];
|
|
@@ -1951,7 +1951,7 @@ const Ur = (e, n) => {
|
|
|
1951
1951
|
}, g = new ResizeObserver(() => {
|
|
1952
1952
|
requestAnimationFrame(u);
|
|
1953
1953
|
});
|
|
1954
|
-
return g.observe(
|
|
1954
|
+
return g.observe(p), () => g.disconnect();
|
|
1955
1955
|
}, [n, e]), { visible: t, hidden: o, showOverflowIndicator: l, measurementRef: s };
|
|
1956
1956
|
};
|
|
1957
1957
|
T.div`
|
|
@@ -2029,7 +2029,7 @@ const _r = T.div`
|
|
|
2029
2029
|
}
|
|
2030
2030
|
`, Xr = (e) => {
|
|
2031
2031
|
var g, f, b, x, m, y;
|
|
2032
|
-
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, l] =
|
|
2032
|
+
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, l] = z(!1), d = () => l(!0), s = () => l(!1), p = vn(mn), c = ((b = (f = (g = p == null ? void 0 : p.input) == null ? void 0 : g.option) == null ? void 0 : f.appearance) == null ? void 0 : b.hover) ?? dn.option.appearance.hover, u = ((y = (m = (x = p == null ? void 0 : p.input) == null ? void 0 : x.option) == null ? void 0 : m.appearance) == null ? void 0 : y.regular) ?? dn.option.appearance.regular;
|
|
2033
2033
|
return /* @__PURE__ */ i(
|
|
2034
2034
|
Yr,
|
|
2035
2035
|
{
|
|
@@ -2052,15 +2052,15 @@ const _r = T.div`
|
|
|
2052
2052
|
{
|
|
2053
2053
|
icon: r,
|
|
2054
2054
|
size: "medium",
|
|
2055
|
-
appearance: a ?
|
|
2055
|
+
appearance: a ? c : u
|
|
2056
2056
|
}
|
|
2057
2057
|
),
|
|
2058
2058
|
/* @__PURE__ */ i(
|
|
2059
|
-
|
|
2059
|
+
A,
|
|
2060
2060
|
{
|
|
2061
2061
|
textAlign: "start",
|
|
2062
2062
|
size: "medium",
|
|
2063
|
-
appearance: a ?
|
|
2063
|
+
appearance: a ? c : u,
|
|
2064
2064
|
children: t
|
|
2065
2065
|
}
|
|
2066
2066
|
),
|
|
@@ -2072,7 +2072,7 @@ const _r = T.div`
|
|
|
2072
2072
|
onClick: (D) => {
|
|
2073
2073
|
D.stopPropagation(), o == null || o();
|
|
2074
2074
|
},
|
|
2075
|
-
appearance: a ?
|
|
2075
|
+
appearance: a ? c : u,
|
|
2076
2076
|
cursorHover: !0
|
|
2077
2077
|
}
|
|
2078
2078
|
)
|
|
@@ -2081,7 +2081,7 @@ const _r = T.div`
|
|
|
2081
2081
|
)
|
|
2082
2082
|
}
|
|
2083
2083
|
);
|
|
2084
|
-
},
|
|
2084
|
+
}, ui = (e) => {
|
|
2085
2085
|
const {
|
|
2086
2086
|
appliedFilters: n = [],
|
|
2087
2087
|
onClear: t,
|
|
@@ -2089,19 +2089,19 @@ const _r = T.div`
|
|
|
2089
2089
|
noFiltersLabel: o,
|
|
2090
2090
|
titleClearFilter: a,
|
|
2091
2091
|
titleFilter: l
|
|
2092
|
-
} = e, d = Ce(null), s = Ce(null),
|
|
2093
|
-
visible:
|
|
2092
|
+
} = e, d = Ce(null), s = Ce(null), p = Ce(null), {
|
|
2093
|
+
visible: c,
|
|
2094
2094
|
hidden: u,
|
|
2095
2095
|
showOverflowIndicator: g,
|
|
2096
2096
|
measurementRef: f
|
|
2097
|
-
} = Ur(d, n), [b, x] =
|
|
2097
|
+
} = Ur(d, n), [b, x] = z(!1), m = (E) => {
|
|
2098
2098
|
E.stopPropagation(), x((R) => !R);
|
|
2099
2099
|
};
|
|
2100
2100
|
ve(() => {
|
|
2101
2101
|
const E = (R) => {
|
|
2102
|
-
var
|
|
2102
|
+
var V, oe;
|
|
2103
2103
|
const L = R.target;
|
|
2104
|
-
!((
|
|
2104
|
+
!((V = s.current) != null && V.contains(L)) && !((oe = p.current) != null && oe.contains(L)) && x(!1);
|
|
2105
2105
|
};
|
|
2106
2106
|
return b && window.addEventListener("mousedown", E), () => window.removeEventListener("mousedown", E);
|
|
2107
2107
|
}, [b]);
|
|
@@ -2139,8 +2139,8 @@ const _r = T.div`
|
|
|
2139
2139
|
alignItems: "center",
|
|
2140
2140
|
padding: "0px 8px",
|
|
2141
2141
|
border: !0,
|
|
2142
|
-
children: y ? /* @__PURE__ */ i(
|
|
2143
|
-
|
|
2142
|
+
children: y ? /* @__PURE__ */ i(A, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ v(G, { children: [
|
|
2143
|
+
c.map((E) => /* @__PURE__ */ i(
|
|
2144
2144
|
me,
|
|
2145
2145
|
{
|
|
2146
2146
|
"data-filter-tag": "true",
|
|
@@ -2156,7 +2156,7 @@ const _r = T.div`
|
|
|
2156
2156
|
g && /* @__PURE__ */ v(
|
|
2157
2157
|
"div",
|
|
2158
2158
|
{
|
|
2159
|
-
ref:
|
|
2159
|
+
ref: p,
|
|
2160
2160
|
style: { position: "relative", display: "inline-block" },
|
|
2161
2161
|
children: [
|
|
2162
2162
|
/* @__PURE__ */ i(Gr, { onClick: m, children: /* @__PURE__ */ i(
|
|
@@ -2228,7 +2228,7 @@ const _r = T.div`
|
|
|
2228
2228
|
padding: 24px;
|
|
2229
2229
|
gap: 24px;
|
|
2230
2230
|
box-sizing: border-box;
|
|
2231
|
-
`,
|
|
2231
|
+
`, pi = (e) => {
|
|
2232
2232
|
const {
|
|
2233
2233
|
actionButtonLabel: n,
|
|
2234
2234
|
cancelButtonLabel: t,
|
|
@@ -2238,18 +2238,18 @@ const _r = T.div`
|
|
|
2238
2238
|
onCloseModal: l,
|
|
2239
2239
|
portalId: d,
|
|
2240
2240
|
title: s
|
|
2241
|
-
} = e,
|
|
2242
|
-
if (!
|
|
2241
|
+
} = e, p = re("(max-width: 768px)"), c = document.getElementById(d);
|
|
2242
|
+
if (!c)
|
|
2243
2243
|
throw new Error(
|
|
2244
2244
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
2245
2245
|
);
|
|
2246
2246
|
return bn(
|
|
2247
|
-
/* @__PURE__ */ i(hn, { children: /* @__PURE__ */ v(Wr, { $smallScreen:
|
|
2247
|
+
/* @__PURE__ */ i(hn, { children: /* @__PURE__ */ v(Wr, { $smallScreen: p, children: [
|
|
2248
2248
|
/* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
|
|
2249
2249
|
/* @__PURE__ */ v(w, { alignContent: "center", justifyContent: "space-between", children: [
|
|
2250
|
-
/* @__PURE__ */ i(
|
|
2250
|
+
/* @__PURE__ */ i(A, { appearance: "dark", size: "small", type: "headline", children: s }),
|
|
2251
2251
|
/* @__PURE__ */ v(w, { alignItems: "center", children: [
|
|
2252
|
-
/* @__PURE__ */ i(
|
|
2252
|
+
/* @__PURE__ */ i(A, { children: "Cerrar" }),
|
|
2253
2253
|
/* @__PURE__ */ i(
|
|
2254
2254
|
O,
|
|
2255
2255
|
{
|
|
@@ -2289,9 +2289,9 @@ const _r = T.div`
|
|
|
2289
2289
|
)
|
|
2290
2290
|
] })
|
|
2291
2291
|
] }) }),
|
|
2292
|
-
|
|
2292
|
+
c
|
|
2293
2293
|
);
|
|
2294
|
-
},
|
|
2294
|
+
}, gi = (e) => {
|
|
2295
2295
|
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a = re("(max-width: 768px)"), l = !n || n.length === 0;
|
|
2296
2296
|
return /* @__PURE__ */ v(w, { direction: "column", gap: "16px", children: [
|
|
2297
2297
|
a && /* @__PURE__ */ v(G, { children: [
|
|
@@ -2309,7 +2309,7 @@ const _r = T.div`
|
|
|
2309
2309
|
border: !0,
|
|
2310
2310
|
width: "100%",
|
|
2311
2311
|
height: "36px",
|
|
2312
|
-
children: l ? /* @__PURE__ */ i(
|
|
2312
|
+
children: l ? /* @__PURE__ */ i(A, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((d) => /* @__PURE__ */ i(
|
|
2313
2313
|
me,
|
|
2314
2314
|
{
|
|
2315
2315
|
appearance: "primary",
|
|
@@ -2350,15 +2350,15 @@ const _r = T.div`
|
|
|
2350
2350
|
}, Qr = (e) => {
|
|
2351
2351
|
const n = [];
|
|
2352
2352
|
return e.from !== void 0 && e.from !== null && n.push(`>${e.from}`), e.to !== void 0 && e.to !== null && n.push(`<${e.to}`), n.join(";");
|
|
2353
|
-
},
|
|
2353
|
+
}, fi = (e) => {
|
|
2354
2354
|
var l;
|
|
2355
2355
|
const { decision: n, fallbackId: t, template: r } = e, o = (d) => typeof d == "object" && d !== null && "from" in d && "to" in d ? Qr(d) : d, a = ((l = n.conditionsThatEstablishesTheDecision) == null ? void 0 : l.map((d, s) => {
|
|
2356
2356
|
var u;
|
|
2357
|
-
const
|
|
2358
|
-
return
|
|
2357
|
+
const p = d == null ? void 0 : d.value;
|
|
2358
|
+
return p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0 ? null : {
|
|
2359
2359
|
...(u = r.conditionsThatEstablishesTheDecision) == null ? void 0 : u[s],
|
|
2360
2360
|
...d,
|
|
2361
|
-
value: o(
|
|
2361
|
+
value: o(p)
|
|
2362
2362
|
};
|
|
2363
2363
|
}).filter(Boolean)) ?? [];
|
|
2364
2364
|
return {
|
|
@@ -2368,7 +2368,7 @@ const _r = T.div`
|
|
|
2368
2368
|
value: o(n.value),
|
|
2369
2369
|
conditionsThatEstablishesTheDecision: a
|
|
2370
2370
|
};
|
|
2371
|
-
},
|
|
2371
|
+
}, hi = (e) => {
|
|
2372
2372
|
if (typeof e != "string") return e;
|
|
2373
2373
|
const n = e.split(";").map((r) => r.trim()), t = {};
|
|
2374
2374
|
for (const r of n)
|
|
@@ -2380,7 +2380,7 @@ const _r = T.div`
|
|
|
2380
2380
|
isNaN(o) || (t.to = o);
|
|
2381
2381
|
}
|
|
2382
2382
|
return t.from !== void 0 || t.to !== void 0 ? t : e;
|
|
2383
|
-
},
|
|
2383
|
+
}, mi = (e) => {
|
|
2384
2384
|
const { dataDecision: n, originalDecision: t } = e, r = {
|
|
2385
2385
|
conditionName: n.ruleName || "",
|
|
2386
2386
|
labelName: n.labelName || "",
|
|
@@ -2396,7 +2396,7 @@ const _r = T.div`
|
|
|
2396
2396
|
(o) => o.hidden ? { ...r } : o
|
|
2397
2397
|
)
|
|
2398
2398
|
};
|
|
2399
|
-
},
|
|
2399
|
+
}, bi = (e) => {
|
|
2400
2400
|
const { decisions: n } = e;
|
|
2401
2401
|
return n == null ? void 0 : n.map((t) => {
|
|
2402
2402
|
var o;
|
|
@@ -2463,12 +2463,12 @@ const _r = T.div`
|
|
|
2463
2463
|
schema: Ne().required("Requerido"),
|
|
2464
2464
|
value: e
|
|
2465
2465
|
}, no = {
|
|
2466
|
-
[
|
|
2467
|
-
[
|
|
2468
|
-
[
|
|
2469
|
-
[
|
|
2470
|
-
[
|
|
2471
|
-
[
|
|
2466
|
+
[I.LIST_OF_VALUES]: Zr,
|
|
2467
|
+
[I.LIST_OF_VALUES_MULTI]: Jr,
|
|
2468
|
+
[I.RANGE]: eo,
|
|
2469
|
+
[I.GREATER_THAN]: tn,
|
|
2470
|
+
[I.LESS_THAN]: tn,
|
|
2471
|
+
[I.EQUAL]: tn
|
|
2472
2472
|
}, $n = (e) => no[e] || Kr;
|
|
2473
2473
|
function to({
|
|
2474
2474
|
decision: e,
|
|
@@ -2533,9 +2533,9 @@ function to({
|
|
|
2533
2533
|
// },
|
|
2534
2534
|
// );
|
|
2535
2535
|
// }),
|
|
2536
|
-
conditionsThatEstablishesTheDecision: Ue((s, { parent:
|
|
2536
|
+
conditionsThatEstablishesTheDecision: Ue((s, { parent: p }) => {
|
|
2537
2537
|
var g;
|
|
2538
|
-
if ((
|
|
2538
|
+
if ((p == null ? void 0 : p.toggleNone) && Object.keys(p.conditionsThatEstablishesTheDecision || {}).length > 0) return le().shape({});
|
|
2539
2539
|
const u = ((g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.reduce(
|
|
2540
2540
|
(f, b) => {
|
|
2541
2541
|
if (o.values.conditionsThatEstablishesTheDecision[b.conditionName] !== void 0) {
|
|
@@ -2558,14 +2558,14 @@ function to({
|
|
|
2558
2558
|
"La fecha de inicio es requerida"
|
|
2559
2559
|
), a.validUntil = _e().when(
|
|
2560
2560
|
"checkClosed",
|
|
2561
|
-
(s,
|
|
2561
|
+
(s, p, { parent: c }) => (c == null ? void 0 : c.checkClosed) ? p.required("La fecha de finalización es requerida").test(
|
|
2562
2562
|
"is-after-startDate",
|
|
2563
2563
|
"La fecha de finalización debe ser mayor o igual a la fecha de inicio",
|
|
2564
2564
|
function(g) {
|
|
2565
2565
|
const f = this.parent.effectiveFrom;
|
|
2566
2566
|
return !f || !g ? !0 : new Date(g) >= new Date(f);
|
|
2567
2567
|
}
|
|
2568
|
-
) :
|
|
2568
|
+
) : p.notRequired()
|
|
2569
2569
|
));
|
|
2570
2570
|
const l = le(a);
|
|
2571
2571
|
return o = Yn({
|
|
@@ -2573,8 +2573,8 @@ function to({
|
|
|
2573
2573
|
validationSchema: l,
|
|
2574
2574
|
validateOnBlur: !0,
|
|
2575
2575
|
onSubmit: (s) => {
|
|
2576
|
-
var
|
|
2577
|
-
const
|
|
2576
|
+
var c;
|
|
2577
|
+
const p = {
|
|
2578
2578
|
...e,
|
|
2579
2579
|
ruleName: s.ruleName,
|
|
2580
2580
|
decisionDataType: s.decisionDataType,
|
|
@@ -2582,7 +2582,7 @@ function to({
|
|
|
2582
2582
|
value: s.value,
|
|
2583
2583
|
effectiveFrom: s.effectiveFrom,
|
|
2584
2584
|
validUntil: s.validUntil,
|
|
2585
|
-
conditionsThatEstablishesTheDecision: (
|
|
2585
|
+
conditionsThatEstablishesTheDecision: (c = e.conditionsThatEstablishesTheDecision) == null ? void 0 : c.filter((u) => {
|
|
2586
2586
|
const g = s.conditionsThatEstablishesTheDecision[u.conditionName];
|
|
2587
2587
|
return g != null && g !== "";
|
|
2588
2588
|
}).map((u) => ({
|
|
@@ -2590,20 +2590,20 @@ function to({
|
|
|
2590
2590
|
value: s.conditionsThatEstablishesTheDecision[u.conditionName]
|
|
2591
2591
|
}))
|
|
2592
2592
|
};
|
|
2593
|
-
n(
|
|
2593
|
+
n(p);
|
|
2594
2594
|
}
|
|
2595
2595
|
}), { formik: o, handleToggleNoneChange: (s) => {
|
|
2596
|
-
var
|
|
2597
|
-
o.setFieldValue("toggleNone", s), (
|
|
2596
|
+
var p;
|
|
2597
|
+
o.setFieldValue("toggleNone", s), (p = e.conditionsThatEstablishesTheDecision) == null || p.forEach((c) => {
|
|
2598
2598
|
if (s)
|
|
2599
2599
|
o.setFieldValue(
|
|
2600
|
-
`conditionsThatEstablishesTheDecision.${
|
|
2600
|
+
`conditionsThatEstablishesTheDecision.${c.conditionName}`,
|
|
2601
2601
|
void 0
|
|
2602
2602
|
);
|
|
2603
2603
|
else {
|
|
2604
|
-
const u =
|
|
2604
|
+
const u = c.howToSetTheCondition === I.LIST_OF_VALUES_MULTI ? [] : "";
|
|
2605
2605
|
o.setFieldValue(
|
|
2606
|
-
`conditionsThatEstablishesTheDecision.${
|
|
2606
|
+
`conditionsThatEstablishesTheDecision.${c.conditionName}`,
|
|
2607
2607
|
u
|
|
2608
2608
|
);
|
|
2609
2609
|
}
|
|
@@ -2645,11 +2645,11 @@ const ro = T.div`
|
|
|
2645
2645
|
labelToggle: a,
|
|
2646
2646
|
name: l,
|
|
2647
2647
|
valueToggle: d = ""
|
|
2648
|
-
} = e, [s,
|
|
2649
|
-
|
|
2648
|
+
} = e, [s, p] = z(n), c = (u) => {
|
|
2649
|
+
p(u.target.checked), r(u);
|
|
2650
2650
|
};
|
|
2651
2651
|
return ve(() => {
|
|
2652
|
-
|
|
2652
|
+
p(n);
|
|
2653
2653
|
}, [n]), /* @__PURE__ */ v(G, { children: [
|
|
2654
2654
|
/* @__PURE__ */ i(w, { children: /* @__PURE__ */ i(
|
|
2655
2655
|
_n,
|
|
@@ -2657,10 +2657,10 @@ const ro = T.div`
|
|
|
2657
2657
|
checked: s,
|
|
2658
2658
|
id: o,
|
|
2659
2659
|
name: l,
|
|
2660
|
-
onChange:
|
|
2660
|
+
onChange: c,
|
|
2661
2661
|
size: "small",
|
|
2662
2662
|
value: d,
|
|
2663
|
-
children: /* @__PURE__ */ i(
|
|
2663
|
+
children: /* @__PURE__ */ i(A, { size: "medium", type: "label", weight: "bold", children: a })
|
|
2664
2664
|
}
|
|
2665
2665
|
) }),
|
|
2666
2666
|
s && /* @__PURE__ */ i(G, { children: t })
|
|
@@ -2675,12 +2675,12 @@ const ro = T.div`
|
|
|
2675
2675
|
checkedClosed: l = !1,
|
|
2676
2676
|
required: d = !1,
|
|
2677
2677
|
valueStart: s = "",
|
|
2678
|
-
valueEnd:
|
|
2679
|
-
messageStart:
|
|
2678
|
+
valueEnd: p = "",
|
|
2679
|
+
messageStart: c = "",
|
|
2680
2680
|
messageEnd: u = "",
|
|
2681
2681
|
statusStart: g = "pending",
|
|
2682
2682
|
statusEnd: f = "pending"
|
|
2683
|
-
} = e, [b, x] =
|
|
2683
|
+
} = e, [b, x] = z(l), [m, y] = z(s), [D, C] = z(p), k = ({ target: $ }) => {
|
|
2684
2684
|
x($.checked), r && r($.checked);
|
|
2685
2685
|
}, E = ($) => {
|
|
2686
2686
|
y($.target.value), n($);
|
|
@@ -2690,7 +2690,7 @@ const ro = T.div`
|
|
|
2690
2690
|
return /* @__PURE__ */ v(G, { children: [
|
|
2691
2691
|
/* @__PURE__ */ v(w, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
2692
2692
|
/* @__PURE__ */ i(
|
|
2693
|
-
|
|
2693
|
+
A,
|
|
2694
2694
|
{
|
|
2695
2695
|
appearance: "gray",
|
|
2696
2696
|
margin: "10px 0",
|
|
@@ -2736,7 +2736,7 @@ const ro = T.div`
|
|
|
2736
2736
|
required: d,
|
|
2737
2737
|
size: "compact",
|
|
2738
2738
|
status: g,
|
|
2739
|
-
message:
|
|
2739
|
+
message: c
|
|
2740
2740
|
}
|
|
2741
2741
|
),
|
|
2742
2742
|
b && /* @__PURE__ */ i(
|
|
@@ -2766,8 +2766,8 @@ const ro = T.div`
|
|
|
2766
2766
|
handleToggleNoneChange: l,
|
|
2767
2767
|
handleConditionToggleChange: d,
|
|
2768
2768
|
showConditionsError: s,
|
|
2769
|
-
termStartStatus:
|
|
2770
|
-
termEndStatus:
|
|
2769
|
+
termStartStatus: p,
|
|
2770
|
+
termEndStatus: c
|
|
2771
2771
|
} = e;
|
|
2772
2772
|
return /* @__PURE__ */ i("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ v(w, { direction: "column", gap: "24px", children: [
|
|
2773
2773
|
Tn({
|
|
@@ -2791,7 +2791,7 @@ const ro = T.div`
|
|
|
2791
2791
|
alignItems: "center",
|
|
2792
2792
|
gap: "64px",
|
|
2793
2793
|
children: [
|
|
2794
|
-
/* @__PURE__ */ i(
|
|
2794
|
+
/* @__PURE__ */ i(A, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
2795
2795
|
/* @__PURE__ */ i(
|
|
2796
2796
|
_n,
|
|
2797
2797
|
{
|
|
@@ -2799,7 +2799,7 @@ const ro = T.div`
|
|
|
2799
2799
|
onChange: () => l(!n.values.toggleNone),
|
|
2800
2800
|
checked: n.values.toggleNone,
|
|
2801
2801
|
size: "small",
|
|
2802
|
-
children: /* @__PURE__ */ i(
|
|
2802
|
+
children: /* @__PURE__ */ i(A, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
2803
2803
|
}
|
|
2804
2804
|
)
|
|
2805
2805
|
]
|
|
@@ -2814,7 +2814,7 @@ const ro = T.div`
|
|
|
2814
2814
|
checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[u.conditionName] !== void 0,
|
|
2815
2815
|
handleToggleChange: (g) => d(
|
|
2816
2816
|
u.conditionName,
|
|
2817
|
-
u.howToSetTheCondition ===
|
|
2817
|
+
u.howToSetTheCondition === I.LIST_OF_VALUES_MULTI
|
|
2818
2818
|
)(g.target.checked),
|
|
2819
2819
|
children: Tn({ condition: u, formik: n })
|
|
2820
2820
|
},
|
|
@@ -2834,8 +2834,8 @@ const ro = T.div`
|
|
|
2834
2834
|
valueEnd: n.values.validUntil,
|
|
2835
2835
|
messageStart: n.errors.effectiveFrom,
|
|
2836
2836
|
messageEnd: n.errors.validUntil,
|
|
2837
|
-
statusStart:
|
|
2838
|
-
statusEnd:
|
|
2837
|
+
statusStart: p,
|
|
2838
|
+
statusEnd: c,
|
|
2839
2839
|
onHandleStartChange: (u) => n.setFieldValue("effectiveFrom", u.target.value),
|
|
2840
2840
|
onHandleEndChange: (u) => n.setFieldValue("validUntil", u.target.value),
|
|
2841
2841
|
onCheckClosedChange: (u) => {
|
|
@@ -2846,7 +2846,7 @@ const ro = T.div`
|
|
|
2846
2846
|
)
|
|
2847
2847
|
] }),
|
|
2848
2848
|
/* @__PURE__ */ i(Z, {}),
|
|
2849
|
-
s && /* @__PURE__ */ i(
|
|
2849
|
+
s && /* @__PURE__ */ i(A, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
2850
2850
|
/* @__PURE__ */ v(w, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
2851
2851
|
/* @__PURE__ */ i(B, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
2852
2852
|
/* @__PURE__ */ i(B, { type: "submit", children: t.confirm })
|
|
@@ -2866,7 +2866,7 @@ const ro = T.div`
|
|
|
2866
2866
|
listOfPossibleValues: n.listOfPossibleValues
|
|
2867
2867
|
}, s = ((f = n.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
|
|
2868
2868
|
(b) => !b.hidden
|
|
2869
|
-
)) || [],
|
|
2869
|
+
)) || [], p = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, c = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0, u = a.touched.validUntil ? a.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
2870
2870
|
return /* @__PURE__ */ i(
|
|
2871
2871
|
lo,
|
|
2872
2872
|
{
|
|
@@ -2895,12 +2895,12 @@ const ro = T.div`
|
|
|
2895
2895
|
);
|
|
2896
2896
|
}
|
|
2897
2897
|
},
|
|
2898
|
-
showConditionsError:
|
|
2899
|
-
termStartStatus:
|
|
2898
|
+
showConditionsError: p,
|
|
2899
|
+
termStartStatus: c,
|
|
2900
2900
|
termEndStatus: u
|
|
2901
2901
|
}
|
|
2902
2902
|
);
|
|
2903
|
-
},
|
|
2903
|
+
}, vi = (e) => {
|
|
2904
2904
|
var o;
|
|
2905
2905
|
const { decisionTemplate: n } = e, t = { ...n }, r = (o = t.conditionsThatEstablishesTheDecision) == null ? void 0 : o.find(
|
|
2906
2906
|
(a) => a.switchPlaces
|
|
@@ -2916,7 +2916,7 @@ const ro = T.div`
|
|
|
2916
2916
|
(a) => a.conditionName === r.conditionName ? { ...a, hidden: !0 } : a
|
|
2917
2917
|
)
|
|
2918
2918
|
} : t;
|
|
2919
|
-
},
|
|
2919
|
+
}, yi = (e) => {
|
|
2920
2920
|
const { decisions: n } = e;
|
|
2921
2921
|
return n == null ? void 0 : n.map((t) => {
|
|
2922
2922
|
var o;
|
|
@@ -2968,7 +2968,7 @@ const ro = T.div`
|
|
|
2968
2968
|
return ((o = (r = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : r.background) == null ? void 0 : o.hover) || se.item.background.hover;
|
|
2969
2969
|
}};
|
|
2970
2970
|
}
|
|
2971
|
-
`,
|
|
2971
|
+
`, In = T.div`
|
|
2972
2972
|
display: flex;
|
|
2973
2973
|
align-items: center;
|
|
2974
2974
|
gap: 12px;
|
|
@@ -3025,11 +3025,11 @@ const ro = T.div`
|
|
|
3025
3025
|
`, mo = (e) => {
|
|
3026
3026
|
const { isOpen: n, links: t, onClick: r, title: o, activeId: a, headerPath: l, headerActive: d } = e, s = (b) => {
|
|
3027
3027
|
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), r());
|
|
3028
|
-
}, c = (b) => {
|
|
3029
|
-
b.preventDefault(), b.stopPropagation(), r();
|
|
3030
3028
|
}, p = (b) => {
|
|
3029
|
+
b.preventDefault(), b.stopPropagation(), r();
|
|
3030
|
+
}, c = (b) => {
|
|
3031
3031
|
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), b.stopPropagation(), r());
|
|
3032
|
-
}, u = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f =
|
|
3032
|
+
}, u = n || d ? "primary" : "dark", g = n || d ? "bold" : "normal", f = M.useId();
|
|
3033
3033
|
return /* @__PURE__ */ i(co, { $active: n, children: /* @__PURE__ */ v(Q, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
3034
3034
|
/* @__PURE__ */ i(
|
|
3035
3035
|
fo,
|
|
@@ -3037,8 +3037,8 @@ const ro = T.div`
|
|
|
3037
3037
|
$active: n && t.length > 0,
|
|
3038
3038
|
"aria-controls": f,
|
|
3039
3039
|
"aria-expanded": n,
|
|
3040
|
-
onClick:
|
|
3041
|
-
onKeyDown:
|
|
3040
|
+
onClick: p,
|
|
3041
|
+
onKeyDown: c,
|
|
3042
3042
|
children: l ? /* @__PURE__ */ i(po, { to: l, children: /* @__PURE__ */ v(
|
|
3043
3043
|
Q,
|
|
3044
3044
|
{
|
|
@@ -3056,8 +3056,8 @@ const ro = T.div`
|
|
|
3056
3056
|
icon: n && t.length > 0 ? /* @__PURE__ */ i(an, {}) : /* @__PURE__ */ i(Dn, {})
|
|
3057
3057
|
}
|
|
3058
3058
|
),
|
|
3059
|
-
/* @__PURE__ */ i(
|
|
3060
|
-
|
|
3059
|
+
/* @__PURE__ */ i(In, { children: /* @__PURE__ */ i(
|
|
3060
|
+
A,
|
|
3061
3061
|
{
|
|
3062
3062
|
appearance: u,
|
|
3063
3063
|
cursorHover: !0,
|
|
@@ -3086,7 +3086,7 @@ const ro = T.div`
|
|
|
3086
3086
|
icon: n && t.length > 0 ? /* @__PURE__ */ i(an, {}) : /* @__PURE__ */ i(Dn, {})
|
|
3087
3087
|
}
|
|
3088
3088
|
),
|
|
3089
|
-
/* @__PURE__ */ i(
|
|
3089
|
+
/* @__PURE__ */ i(In, { children: /* @__PURE__ */ i(
|
|
3090
3090
|
uo,
|
|
3091
3091
|
{
|
|
3092
3092
|
"aria-controls": f,
|
|
@@ -3094,13 +3094,14 @@ const ro = T.div`
|
|
|
3094
3094
|
onClick: r,
|
|
3095
3095
|
onKeyDown: s,
|
|
3096
3096
|
children: /* @__PURE__ */ i(
|
|
3097
|
-
|
|
3097
|
+
A,
|
|
3098
3098
|
{
|
|
3099
3099
|
appearance: u,
|
|
3100
3100
|
cursorHover: !0,
|
|
3101
3101
|
size: "small",
|
|
3102
3102
|
type: "title",
|
|
3103
3103
|
weight: g,
|
|
3104
|
+
onClick: r,
|
|
3104
3105
|
children: o
|
|
3105
3106
|
}
|
|
3106
3107
|
)
|
|
@@ -3123,7 +3124,7 @@ const ro = T.div`
|
|
|
3123
3124
|
children: [
|
|
3124
3125
|
x && /* @__PURE__ */ i(O, { appearance: "primary", icon: /* @__PURE__ */ i(xt, {}) }),
|
|
3125
3126
|
/* @__PURE__ */ i(
|
|
3126
|
-
|
|
3127
|
+
A,
|
|
3127
3128
|
{
|
|
3128
3129
|
appearance: x ? "primary" : "dark",
|
|
3129
3130
|
size: "small",
|
|
@@ -3145,30 +3146,43 @@ const ro = T.div`
|
|
|
3145
3146
|
}};
|
|
3146
3147
|
}
|
|
3147
3148
|
height: 90vh;
|
|
3148
|
-
`,
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3149
|
+
`, vo = (e, n) => {
|
|
3150
|
+
var t;
|
|
3151
|
+
for (const r of n)
|
|
3152
|
+
if (r.path && (e === r.path || e.startsWith(r.path + "/")) || (t = r.links) != null && t.some((o) => o.path === e)) return r.id;
|
|
3153
|
+
return null;
|
|
3154
|
+
}, xi = (e) => {
|
|
3155
|
+
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, o = Lt(), [a, l] = M.useState(t), d = M.useRef(o.pathname), s = M.useCallback(
|
|
3154
3156
|
(c) => {
|
|
3155
|
-
var
|
|
3156
|
-
return (
|
|
3157
|
+
var u;
|
|
3158
|
+
return (u = c.find((g) => g.path === o.pathname)) == null ? void 0 : u.id;
|
|
3157
3159
|
},
|
|
3158
|
-
[
|
|
3159
|
-
),
|
|
3160
|
-
(c) => c
|
|
3161
|
-
[
|
|
3160
|
+
[o.pathname]
|
|
3161
|
+
), p = M.useCallback(
|
|
3162
|
+
(c) => !!c && (o.pathname === c || o.pathname.startsWith(c + "/")),
|
|
3163
|
+
[o.pathname]
|
|
3162
3164
|
);
|
|
3163
|
-
return
|
|
3165
|
+
return M.useEffect(() => {
|
|
3166
|
+
if (!(d.current !== o.pathname)) return;
|
|
3167
|
+
if (d.current = o.pathname, n) {
|
|
3168
|
+
l(null);
|
|
3169
|
+
return;
|
|
3170
|
+
}
|
|
3171
|
+
const u = vo(o.pathname, r);
|
|
3172
|
+
if (u) {
|
|
3173
|
+
l(u);
|
|
3174
|
+
return;
|
|
3175
|
+
}
|
|
3176
|
+
t && l(t);
|
|
3177
|
+
}, [n, t, r, o.pathname]), /* @__PURE__ */ i(bo, { $background: !0, children: /* @__PURE__ */ i(w, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((c) => /* @__PURE__ */ i(
|
|
3164
3178
|
mo,
|
|
3165
3179
|
{
|
|
3166
|
-
activeId:
|
|
3180
|
+
activeId: s(c.links),
|
|
3167
3181
|
headerPath: c.path,
|
|
3168
|
-
headerActive:
|
|
3169
|
-
isOpen:
|
|
3182
|
+
headerActive: p(c.path),
|
|
3183
|
+
isOpen: a === c.id,
|
|
3170
3184
|
links: c.links,
|
|
3171
|
-
onClick: () =>
|
|
3185
|
+
onClick: () => l((u) => u === c.id ? null : c.id),
|
|
3172
3186
|
title: c.title
|
|
3173
3187
|
},
|
|
3174
3188
|
c.id
|
|
@@ -3192,7 +3206,7 @@ function tt() {
|
|
|
3192
3206
|
}];
|
|
3193
3207
|
}
|
|
3194
3208
|
var [rt, ot] = tt();
|
|
3195
|
-
function
|
|
3209
|
+
function yo(e, n) {
|
|
3196
3210
|
return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
|
|
3197
3211
|
}
|
|
3198
3212
|
function Me(e, n, t = !0, r = ["__key"]) {
|
|
@@ -3202,7 +3216,7 @@ function Me(e, n, t = !0, r = ["__key"]) {
|
|
|
3202
3216
|
if (e instanceof Date && n instanceof Date)
|
|
3203
3217
|
return e.getTime() === n.getTime();
|
|
3204
3218
|
if (e instanceof RegExp && n instanceof RegExp)
|
|
3205
|
-
return
|
|
3219
|
+
return yo(e, n);
|
|
3206
3220
|
if (e === null || n === null) return !1;
|
|
3207
3221
|
const o = e, a = n;
|
|
3208
3222
|
if (Object.keys(o).length !== Object.keys(a).length) return !1;
|
|
@@ -3229,7 +3243,7 @@ function it() {
|
|
|
3229
3243
|
const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
3230
3244
|
return n || t;
|
|
3231
3245
|
}
|
|
3232
|
-
var
|
|
3246
|
+
var xo = {
|
|
3233
3247
|
affectedNodes: [],
|
|
3234
3248
|
coordinates: {
|
|
3235
3249
|
x: 0,
|
|
@@ -3263,8 +3277,8 @@ var yo = {
|
|
|
3263
3277
|
scrollDebounceTimeout: void 0,
|
|
3264
3278
|
frameIdX: void 0,
|
|
3265
3279
|
frameIdY: void 0
|
|
3266
|
-
}, h =
|
|
3267
|
-
function
|
|
3280
|
+
}, h = xo, ce = !1, An, rn;
|
|
3281
|
+
function wo() {
|
|
3268
3282
|
h.scrollDebounceTimeout && clearTimeout(h.scrollDebounceTimeout), h.longPressTimeout && clearTimeout(h.longPressTimeout), h.frameIdX !== void 0 && cancelAnimationFrame(h.frameIdX), h.frameIdY !== void 0 && cancelAnimationFrame(h.frameIdY), h = { ...{
|
|
3269
3283
|
affectedNodes: [],
|
|
3270
3284
|
coordinates: {
|
|
@@ -3308,30 +3322,30 @@ function xo() {
|
|
|
3308
3322
|
function lt(e) {
|
|
3309
3323
|
return Object.assign(h, e), e.initialParent.data.emit("dragStarted", h), ce = !1, h.emit("dragStarted", h), h;
|
|
3310
3324
|
}
|
|
3311
|
-
function
|
|
3325
|
+
function Do() {
|
|
3312
3326
|
h.activeState && ye(h.activeState.parent, void 0, h), h.selectedState && be(h.selectedState.nodes, h.selectedState.parent, h), h.selectedState = h.activeState = void 0;
|
|
3313
3327
|
}
|
|
3314
|
-
function
|
|
3328
|
+
function Co() {
|
|
3315
3329
|
if (h.pointerDown && (h.pointerDown.node.el.draggable = !0), h.pointerDown = void 0, !W(h)) return;
|
|
3316
3330
|
const e = h.currentParent.data.config;
|
|
3317
3331
|
W(h) && e.handleEnd(h);
|
|
3318
3332
|
}
|
|
3319
|
-
function
|
|
3333
|
+
function To(e) {
|
|
3320
3334
|
e.key === "Escape" && (h.selectedState && be(h.selectedState.nodes, h.selectedState.parent, h), h.activeState && ye(h.activeState.parent, void 0, h), h.selectedState = h.activeState = void 0);
|
|
3321
3335
|
}
|
|
3322
|
-
function
|
|
3336
|
+
function So(e) {
|
|
3323
3337
|
if (!_(h)) return;
|
|
3324
3338
|
ce = !0;
|
|
3325
3339
|
const n = h.initialParent.data.config.handleEnd;
|
|
3326
3340
|
n(h);
|
|
3327
3341
|
}
|
|
3328
|
-
function
|
|
3342
|
+
function Eo(e) {
|
|
3329
3343
|
if (!_(h)) return;
|
|
3330
3344
|
U(e);
|
|
3331
3345
|
const { x: n, y: t } = ke(e);
|
|
3332
3346
|
_(h) && Ze({ x: n, y: t }, e, h);
|
|
3333
3347
|
}
|
|
3334
|
-
function
|
|
3348
|
+
function No(e) {
|
|
3335
3349
|
if (!h.pointerDown || !h.pointerDown.validated) return;
|
|
3336
3350
|
const n = h.pointerDown.parent.data.config;
|
|
3337
3351
|
if (!(e.pointerType === "mouse" && !it()))
|
|
@@ -3344,7 +3358,7 @@ function Eo(e) {
|
|
|
3344
3358
|
}
|
|
3345
3359
|
const t = n.draggedNodes(h.pointerDown);
|
|
3346
3360
|
n.dragstartClasses(h.pointerDown.node, t, n, !0);
|
|
3347
|
-
const r = h.pointerDown.node.el.getBoundingClientRect(), o =
|
|
3361
|
+
const r = h.pointerDown.node.el.getBoundingClientRect(), o = ta(
|
|
3348
3362
|
h.pointerDown.node,
|
|
3349
3363
|
h.pointerDown.parent,
|
|
3350
3364
|
e,
|
|
@@ -3355,21 +3369,21 @@ function Eo(e) {
|
|
|
3355
3369
|
Rn(e, o, !0);
|
|
3356
3370
|
}
|
|
3357
3371
|
}
|
|
3358
|
-
function
|
|
3372
|
+
function ko({
|
|
3359
3373
|
parent: e,
|
|
3360
3374
|
getValues: n,
|
|
3361
3375
|
setValues: t,
|
|
3362
3376
|
config: r = {}
|
|
3363
3377
|
}) {
|
|
3364
|
-
var s,
|
|
3378
|
+
var s, p, c;
|
|
3365
3379
|
if (!wn) return;
|
|
3366
|
-
|
|
3367
|
-
dragover:
|
|
3368
|
-
pointerdown:
|
|
3369
|
-
pointerup:
|
|
3370
|
-
keydown:
|
|
3371
|
-
drop:
|
|
3372
|
-
pointermove:
|
|
3380
|
+
An || (An = Ge(document, {
|
|
3381
|
+
dragover: Eo,
|
|
3382
|
+
pointerdown: Do,
|
|
3383
|
+
pointerup: Co,
|
|
3384
|
+
keydown: To,
|
|
3385
|
+
drop: So,
|
|
3386
|
+
pointermove: No,
|
|
3373
3387
|
pointercancel: Y(r.handlePointercancel),
|
|
3374
3388
|
touchmove: (u) => {
|
|
3375
3389
|
_(h) && u.cancelable && U(u);
|
|
@@ -3384,38 +3398,38 @@ function No({
|
|
|
3384
3398
|
config: {
|
|
3385
3399
|
dragDropEffect: r.dragDropEffect ?? "move",
|
|
3386
3400
|
dragEffectAllowed: r.dragEffectAllowed ?? "move",
|
|
3387
|
-
draggedNodes:
|
|
3388
|
-
dragstartClasses:
|
|
3389
|
-
handleNodeKeydown:
|
|
3390
|
-
handleDragstart:
|
|
3391
|
-
handleNodeDragover:
|
|
3392
|
-
handleParentDragover:
|
|
3393
|
-
handleNodeDrop:
|
|
3394
|
-
handleNodeFocus:
|
|
3395
|
-
handleNodeBlur:
|
|
3396
|
-
handlePointercancel:
|
|
3397
|
-
handleEnd:
|
|
3398
|
-
handleDragend:
|
|
3399
|
-
handleParentFocus:
|
|
3400
|
-
handleNodePointerup:
|
|
3401
|
-
handleNodePointerover:
|
|
3402
|
-
handleParentPointerover:
|
|
3403
|
-
handleParentScroll:
|
|
3404
|
-
handleNodePointerdown:
|
|
3405
|
-
handleNodeDragenter:
|
|
3406
|
-
handleNodeDragleave:
|
|
3407
|
-
handleParentDrop:
|
|
3401
|
+
draggedNodes: jo,
|
|
3402
|
+
dragstartClasses: qo,
|
|
3403
|
+
handleNodeKeydown: Yo,
|
|
3404
|
+
handleDragstart: Uo,
|
|
3405
|
+
handleNodeDragover: oa,
|
|
3406
|
+
handleParentDragover: aa,
|
|
3407
|
+
handleNodeDrop: Wo,
|
|
3408
|
+
handleNodeFocus: Qo,
|
|
3409
|
+
handleNodeBlur: Ko,
|
|
3410
|
+
handlePointercancel: Jo,
|
|
3411
|
+
handleEnd: ea,
|
|
3412
|
+
handleDragend: Zo,
|
|
3413
|
+
handleParentFocus: Io,
|
|
3414
|
+
handleNodePointerup: na,
|
|
3415
|
+
handleNodePointerover: Xo,
|
|
3416
|
+
handleParentPointerover: ia,
|
|
3417
|
+
handleParentScroll: Bo,
|
|
3418
|
+
handleNodePointerdown: _o,
|
|
3419
|
+
handleNodeDragenter: sa,
|
|
3420
|
+
handleNodeDragleave: da,
|
|
3421
|
+
handleParentDrop: Ro,
|
|
3408
3422
|
multiDrag: r.multiDrag ?? !1,
|
|
3409
3423
|
nativeDrag: r.nativeDrag ?? !0,
|
|
3410
|
-
performSort:
|
|
3424
|
+
performSort: $o,
|
|
3411
3425
|
performTransfer: Ao,
|
|
3412
3426
|
root: r.root ?? document,
|
|
3413
|
-
setupNode:
|
|
3427
|
+
setupNode: Lo,
|
|
3414
3428
|
setupNodeRemap: ct,
|
|
3415
|
-
reapplyDragClasses:
|
|
3416
|
-
tearDownNode:
|
|
3417
|
-
tearDownNodeRemap:
|
|
3418
|
-
remapFinished:
|
|
3429
|
+
reapplyDragClasses: Po,
|
|
3430
|
+
tearDownNode: Mo,
|
|
3431
|
+
tearDownNodeRemap: Oo,
|
|
3432
|
+
remapFinished: Vo,
|
|
3419
3433
|
threshold: {
|
|
3420
3434
|
horizontal: 0,
|
|
3421
3435
|
vertical: 0
|
|
@@ -3428,16 +3442,16 @@ function No({
|
|
|
3428
3442
|
on: a,
|
|
3429
3443
|
emit: o
|
|
3430
3444
|
};
|
|
3431
|
-
new MutationObserver(
|
|
3445
|
+
new MutationObserver(zo).observe(e, { childList: !0 }), j.set(e, l), (s = r.plugins) == null || s.forEach((u) => {
|
|
3432
3446
|
var g, f;
|
|
3433
3447
|
(f = (g = u(e)) == null ? void 0 : g.tearDown) == null || f.call(g);
|
|
3434
|
-
}), (
|
|
3448
|
+
}), (p = r.plugins) == null || p.forEach((u) => {
|
|
3435
3449
|
var g, f;
|
|
3436
3450
|
(f = (g = u(e)) == null ? void 0 : g.tearDown) == null || f.call(g);
|
|
3437
|
-
}), (
|
|
3451
|
+
}), (c = r.plugins) == null || c.forEach((u) => {
|
|
3438
3452
|
var g, f;
|
|
3439
3453
|
(f = (g = u(e)) == null ? void 0 : g.setup) == null || f.call(g);
|
|
3440
|
-
}),
|
|
3454
|
+
}), Fo(e, l), Qe(e, !0);
|
|
3441
3455
|
}
|
|
3442
3456
|
function st(e, n, t, r, o, a) {
|
|
3443
3457
|
const { x: l, y: d } = ke(t), s = e.el.getBoundingClientRect();
|
|
@@ -3474,14 +3488,14 @@ function st(e, n, t, r, o, a) {
|
|
|
3474
3488
|
transferred: !1
|
|
3475
3489
|
};
|
|
3476
3490
|
}
|
|
3477
|
-
function
|
|
3491
|
+
function $o({
|
|
3478
3492
|
parent: e,
|
|
3479
3493
|
draggedNodes: n,
|
|
3480
3494
|
targetNodes: t
|
|
3481
3495
|
}) {
|
|
3482
3496
|
Qe(e.el);
|
|
3483
3497
|
const r = n.map((s) => s.data.value), o = Ee(e.el, e.data), a = n[0].data.index, l = [...e.data.enabledNodes], d = [
|
|
3484
|
-
...o.filter((s) => !r.some((
|
|
3498
|
+
...o.filter((s) => !r.some((p) => Me(s, p)))
|
|
3485
3499
|
];
|
|
3486
3500
|
d.splice(t[0].data.index, 0, ...r), "draggedNode" in h && (h.currentTargetValue = t[0].data.value), cn(e.el, e.data, [...d]), e.data.config.onSort && e.data.config.onSort({
|
|
3487
3501
|
parent: {
|
|
@@ -3532,7 +3546,7 @@ function He(e, n, t, r, o = !1) {
|
|
|
3532
3546
|
parent: e
|
|
3533
3547
|
}, ye(e, t, r);
|
|
3534
3548
|
}
|
|
3535
|
-
function
|
|
3549
|
+
function Io(e, n) {
|
|
3536
3550
|
const t = e.targetData.parent.data.enabledNodes[0];
|
|
3537
3551
|
t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? ye(e.targetData.parent, t, n) : n.selectedState || ye(e.targetData.parent, t, n));
|
|
3538
3552
|
}
|
|
@@ -3550,9 +3564,9 @@ function Ao({
|
|
|
3550
3564
|
...Ee(e.el, e.data).filter(
|
|
3551
3565
|
(g) => !d.some((f) => Me(g, f))
|
|
3552
3566
|
)
|
|
3553
|
-
],
|
|
3567
|
+
], p = Ee(n.el, n.data), c = t.el === n.el && n.data.config.sortable === !1;
|
|
3554
3568
|
let u;
|
|
3555
|
-
a.length ? (
|
|
3569
|
+
a.length ? (c ? u = o : n.data.config.sortable === !1 ? u = n.data.enabledNodes.length : u = a[0].data.index, p.splice(u, 0, ...d)) : (u = c ? o : n.data.enabledNodes.length, p.splice(u, 0, ...d)), cn(e.el, e.data, s), cn(n.el, n.data, p), n.data.config.onTransfer && n.data.config.onTransfer({
|
|
3556
3570
|
sourceParent: e,
|
|
3557
3571
|
targetParent: n,
|
|
3558
3572
|
initialParent: t,
|
|
@@ -3576,7 +3590,7 @@ function Ee(e, n) {
|
|
|
3576
3590
|
function cn(e, n, t) {
|
|
3577
3591
|
n.setValues(t, e);
|
|
3578
3592
|
}
|
|
3579
|
-
function
|
|
3593
|
+
function Ro(e, n) {
|
|
3580
3594
|
ue(e.e), ce = !0;
|
|
3581
3595
|
const t = n.initialParent.data.config.handleEnd;
|
|
3582
3596
|
t(n);
|
|
@@ -3591,7 +3605,7 @@ function _(e) {
|
|
|
3591
3605
|
function W(e) {
|
|
3592
3606
|
return "synthDragging" in e && !!e.synthDragging;
|
|
3593
3607
|
}
|
|
3594
|
-
function
|
|
3608
|
+
function Fo(e, n) {
|
|
3595
3609
|
n.abortControllers.mainParent = Ge(e, {
|
|
3596
3610
|
dragover: je(n.config.handleParentDragover),
|
|
3597
3611
|
handleParentPointerover: n.config.handleParentPointerover,
|
|
@@ -3635,7 +3649,7 @@ function Ro(e, n) {
|
|
|
3635
3649
|
}
|
|
3636
3650
|
));
|
|
3637
3651
|
}
|
|
3638
|
-
function
|
|
3652
|
+
function Lo(e) {
|
|
3639
3653
|
var t;
|
|
3640
3654
|
const n = e.parent.data.config;
|
|
3641
3655
|
e.node.data.abortControllers.mainNode = Ge(e.node.el, {
|
|
@@ -3670,26 +3684,26 @@ function ct(e) {
|
|
|
3670
3684
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.setupNodeRemap) == null || o.call(r, e);
|
|
3671
3685
|
});
|
|
3672
3686
|
}
|
|
3673
|
-
function
|
|
3687
|
+
function Po(e, n) {
|
|
3674
3688
|
if (!_(h)) return;
|
|
3675
3689
|
const t = W(h) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
|
|
3676
3690
|
h.draggedNode.el === e && Te([e], t, !0);
|
|
3677
3691
|
}
|
|
3678
|
-
function
|
|
3692
|
+
function Oo(e) {
|
|
3679
3693
|
var n;
|
|
3680
3694
|
(n = e.parent.data.config.plugins) == null || n.forEach((t) => {
|
|
3681
3695
|
var r, o;
|
|
3682
3696
|
(o = (r = t(e.parent.el)) == null ? void 0 : r.tearDownNodeRemap) == null || o.call(r, e);
|
|
3683
3697
|
});
|
|
3684
3698
|
}
|
|
3685
|
-
function
|
|
3699
|
+
function Mo(e) {
|
|
3686
3700
|
var n, t, r, o, a;
|
|
3687
3701
|
(n = e.parent.data.config.plugins) == null || n.forEach((l) => {
|
|
3688
3702
|
var d, s;
|
|
3689
3703
|
(s = (d = l(e.parent.el)) == null ? void 0 : d.tearDownNode) == null || s.call(d, e);
|
|
3690
3704
|
}), e.node.el.draggable = !1, (r = (t = e.node.data) == null ? void 0 : t.abortControllers) != null && r.mainNode && ((a = (o = e.node.data) == null ? void 0 : o.abortControllers) == null || a.mainNode.abort());
|
|
3691
3705
|
}
|
|
3692
|
-
function
|
|
3706
|
+
function zo(e) {
|
|
3693
3707
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
3694
3708
|
return;
|
|
3695
3709
|
const n = e[0].target;
|
|
@@ -3702,19 +3716,19 @@ function Qe(e, n) {
|
|
|
3702
3716
|
t.privateClasses = Array.from(e.classList);
|
|
3703
3717
|
const r = [], o = t.config;
|
|
3704
3718
|
for (let s = 0; s < e.children.length; s++) {
|
|
3705
|
-
const
|
|
3706
|
-
if (!Je(
|
|
3707
|
-
const
|
|
3708
|
-
(n || !
|
|
3719
|
+
const p = e.children[s];
|
|
3720
|
+
if (!Je(p) || p.id === "dnd-dragged-node-clone") continue;
|
|
3721
|
+
const c = ne.get(p);
|
|
3722
|
+
(n || !c) && o.tearDownNode({
|
|
3709
3723
|
parent: {
|
|
3710
3724
|
el: e,
|
|
3711
3725
|
data: t
|
|
3712
3726
|
},
|
|
3713
3727
|
node: {
|
|
3714
|
-
el:
|
|
3715
|
-
data:
|
|
3728
|
+
el: p,
|
|
3729
|
+
data: c
|
|
3716
3730
|
}
|
|
3717
|
-
}), !o.disabled && (!o.draggable || o.draggable && o.draggable(
|
|
3731
|
+
}), !o.disabled && (!o.draggable || o.draggable && o.draggable(p)) && r.push(p);
|
|
3718
3732
|
}
|
|
3719
3733
|
if (r.length !== t.getValues(e).length && !o.disabled) {
|
|
3720
3734
|
console.warn(
|
|
@@ -3724,10 +3738,10 @@ function Qe(e, n) {
|
|
|
3724
3738
|
}
|
|
3725
3739
|
const a = t.getValues(e), l = [];
|
|
3726
3740
|
for (let s = 0; s < r.length; s++) {
|
|
3727
|
-
const
|
|
3741
|
+
const p = r[s], c = ne.get(p);
|
|
3728
3742
|
if (o.draggableValue && !o.draggableValue(a[s])) continue;
|
|
3729
3743
|
const u = Object.assign(
|
|
3730
|
-
|
|
3744
|
+
c ?? {
|
|
3731
3745
|
privateClasses: [],
|
|
3732
3746
|
abortControllers: {}
|
|
3733
3747
|
},
|
|
@@ -3742,27 +3756,27 @@ function Qe(e, n) {
|
|
|
3742
3756
|
el: e
|
|
3743
3757
|
},
|
|
3744
3758
|
{
|
|
3745
|
-
el:
|
|
3759
|
+
el: p,
|
|
3746
3760
|
data: u
|
|
3747
3761
|
},
|
|
3748
3762
|
h
|
|
3749
3763
|
), _(h) && Me(h.draggedNode.data.value, u.value)) {
|
|
3750
|
-
h.draggedNode.data = u, h.draggedNode.el =
|
|
3764
|
+
h.draggedNode.data = u, h.draggedNode.el = p;
|
|
3751
3765
|
const g = h.draggedNodes.find(
|
|
3752
3766
|
(f) => f.data.value === u.value
|
|
3753
3767
|
);
|
|
3754
|
-
g && (g.el =
|
|
3768
|
+
g && (g.el = p);
|
|
3755
3769
|
}
|
|
3756
3770
|
l.push({
|
|
3757
|
-
el:
|
|
3771
|
+
el: p,
|
|
3758
3772
|
data: u
|
|
3759
|
-
}), (n || !
|
|
3773
|
+
}), (n || !c) && o.setupNode({
|
|
3760
3774
|
parent: {
|
|
3761
3775
|
el: e,
|
|
3762
3776
|
data: t
|
|
3763
3777
|
},
|
|
3764
3778
|
node: {
|
|
3765
|
-
el:
|
|
3779
|
+
el: p,
|
|
3766
3780
|
data: u
|
|
3767
3781
|
}
|
|
3768
3782
|
}), ct({
|
|
@@ -3771,23 +3785,23 @@ function Qe(e, n) {
|
|
|
3771
3785
|
data: t
|
|
3772
3786
|
},
|
|
3773
3787
|
node: {
|
|
3774
|
-
el:
|
|
3788
|
+
el: p,
|
|
3775
3789
|
data: u
|
|
3776
3790
|
}
|
|
3777
3791
|
});
|
|
3778
3792
|
}
|
|
3779
3793
|
j.set(e, { ...t, enabledNodes: l }), o.remapFinished(t), (d = t.config.plugins) == null || d.forEach((s) => {
|
|
3780
|
-
var
|
|
3781
|
-
(
|
|
3794
|
+
var p, c;
|
|
3795
|
+
(c = (p = s(e)) == null ? void 0 : p.remapFinished) == null || c.call(p);
|
|
3782
3796
|
});
|
|
3783
3797
|
}
|
|
3784
|
-
function
|
|
3798
|
+
function Vo() {
|
|
3785
3799
|
h.remapJustFinished = !0, "draggedNode" in h && (h.affectedNodes = []);
|
|
3786
3800
|
}
|
|
3787
|
-
function
|
|
3801
|
+
function Ho(e) {
|
|
3788
3802
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
3789
3803
|
}
|
|
3790
|
-
function
|
|
3804
|
+
function jo(e) {
|
|
3791
3805
|
var n;
|
|
3792
3806
|
if (e.parent.data.config.multiDrag) {
|
|
3793
3807
|
if (h.selectedState)
|
|
@@ -3800,14 +3814,14 @@ function Ho(e) {
|
|
|
3800
3814
|
} else return [e.node];
|
|
3801
3815
|
return [];
|
|
3802
3816
|
}
|
|
3803
|
-
function
|
|
3817
|
+
function Bo(e) {
|
|
3804
3818
|
_(h) && (h.emit("scrollStarted", h), !W(h) && (h.preventEnter = !0, rn && clearTimeout(rn), rn = setTimeout(() => {
|
|
3805
3819
|
h.preventEnter = !1, h.emit("scrollEnded", h);
|
|
3806
3820
|
}, 100)));
|
|
3807
3821
|
}
|
|
3808
|
-
function
|
|
3822
|
+
function Uo(e, n) {
|
|
3809
3823
|
const t = e.targetData.parent.data.config;
|
|
3810
|
-
if (!t.nativeDrag || !
|
|
3824
|
+
if (!t.nativeDrag || !Ho(e) || !ut({
|
|
3811
3825
|
x: e.e.clientX,
|
|
3812
3826
|
y: e.e.clientY,
|
|
3813
3827
|
node: e.targetData.node,
|
|
@@ -3821,7 +3835,7 @@ function Bo(e, n) {
|
|
|
3821
3835
|
node: e.targetData.node
|
|
3822
3836
|
});
|
|
3823
3837
|
r.length === 0 && (r = [e.targetData.node]), t.dragstartClasses(e.targetData.node, r, t);
|
|
3824
|
-
const o =
|
|
3838
|
+
const o = Go(e, r);
|
|
3825
3839
|
if (t.onDragstart) {
|
|
3826
3840
|
const a = {
|
|
3827
3841
|
parent: e.targetData.parent,
|
|
@@ -3837,7 +3851,7 @@ function Bo(e, n) {
|
|
|
3837
3851
|
t.onDragstart(a);
|
|
3838
3852
|
}
|
|
3839
3853
|
}
|
|
3840
|
-
function
|
|
3854
|
+
function _o(e, n) {
|
|
3841
3855
|
var d, s;
|
|
3842
3856
|
if (ue(e.e), n.pointerDown = {
|
|
3843
3857
|
parent: e.targetData.parent,
|
|
@@ -3850,15 +3864,15 @@ function Uo(e, n) {
|
|
|
3850
3864
|
config: e.targetData.parent.data.config
|
|
3851
3865
|
}))
|
|
3852
3866
|
return;
|
|
3853
|
-
n.pointerDown.validated = !0,
|
|
3867
|
+
n.pointerDown.validated = !0, ra(e, n, e.targetData.node);
|
|
3854
3868
|
const t = e.targetData.parent.data;
|
|
3855
3869
|
let r = [e.targetData.node];
|
|
3856
3870
|
const o = e.e.ctrlKey || e.e.metaKey, a = e.e.shiftKey, l = e.targetData.node;
|
|
3857
3871
|
if (o && t.config.multiDrag) {
|
|
3858
3872
|
n.selectedState ? n.selectedState.nodes.findIndex(
|
|
3859
|
-
(
|
|
3873
|
+
(c) => c.el === l.el
|
|
3860
3874
|
) === -1 ? r = [...n.selectedState.nodes, l] : r = n.selectedState.nodes.filter(
|
|
3861
|
-
(
|
|
3875
|
+
(c) => c.el !== l.el
|
|
3862
3876
|
) : r = [l], He(
|
|
3863
3877
|
e.targetData.parent,
|
|
3864
3878
|
r,
|
|
@@ -3869,25 +3883,25 @@ function Uo(e, n) {
|
|
|
3869
3883
|
return;
|
|
3870
3884
|
}
|
|
3871
3885
|
if (a && t.config.multiDrag) {
|
|
3872
|
-
const
|
|
3886
|
+
const p = e.targetData.parent.data.enabledNodes;
|
|
3873
3887
|
if (n.selectedState && n.activeState)
|
|
3874
3888
|
if (n.selectedState.parent.el !== e.targetData.parent.el) {
|
|
3875
3889
|
be(n.selectedState.nodes, n.selectedState.parent, n), n.selectedState = void 0;
|
|
3876
|
-
for (let
|
|
3877
|
-
r.push(c
|
|
3890
|
+
for (let c = 0; c <= l.data.index; c++)
|
|
3891
|
+
r.push(p[c]);
|
|
3878
3892
|
} else {
|
|
3879
|
-
const [
|
|
3893
|
+
const [c, u] = n.activeState.node.data.index < e.targetData.node.data.index ? [
|
|
3880
3894
|
n.activeState.node.data.index,
|
|
3881
3895
|
e.targetData.node.data.index
|
|
3882
3896
|
] : [
|
|
3883
3897
|
e.targetData.node.data.index,
|
|
3884
3898
|
n.activeState.node.data.index
|
|
3885
3899
|
];
|
|
3886
|
-
r =
|
|
3900
|
+
r = p.slice(c, u + 1);
|
|
3887
3901
|
}
|
|
3888
3902
|
else
|
|
3889
|
-
for (let
|
|
3890
|
-
r.push(c
|
|
3903
|
+
for (let c = 0; c <= l.data.index; c++)
|
|
3904
|
+
r.push(p[c]);
|
|
3891
3905
|
He(
|
|
3892
3906
|
e.targetData.parent,
|
|
3893
3907
|
r,
|
|
@@ -3898,7 +3912,7 @@ function Uo(e, n) {
|
|
|
3898
3912
|
return;
|
|
3899
3913
|
}
|
|
3900
3914
|
(s = (d = n.selectedState) == null ? void 0 : d.nodes) != null && s.length ? n.selectedState.nodes.findIndex(
|
|
3901
|
-
(
|
|
3915
|
+
(c) => c.el === e.targetData.node.el
|
|
3902
3916
|
) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? be(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && it() ? r.push(...n.selectedState.nodes) : be(n.selectedState.nodes, e.targetData.parent, n), He(
|
|
3903
3917
|
e.targetData.parent,
|
|
3904
3918
|
r,
|
|
@@ -3913,7 +3927,7 @@ function Uo(e, n) {
|
|
|
3913
3927
|
!0
|
|
3914
3928
|
);
|
|
3915
3929
|
}
|
|
3916
|
-
function
|
|
3930
|
+
function qo(e, n, t, r = !1) {
|
|
3917
3931
|
Te(
|
|
3918
3932
|
n.map((o) => o.el),
|
|
3919
3933
|
r ? t.synthDraggingClass : t.draggingClass
|
|
@@ -3933,7 +3947,7 @@ function _o(e, n, t, r = !1) {
|
|
|
3933
3947
|
);
|
|
3934
3948
|
});
|
|
3935
3949
|
}
|
|
3936
|
-
function
|
|
3950
|
+
function Go(e, n) {
|
|
3937
3951
|
ue(e.e);
|
|
3938
3952
|
const t = lt(
|
|
3939
3953
|
st(
|
|
@@ -4004,22 +4018,22 @@ function ut({
|
|
|
4004
4018
|
if (a === l || l.contains(a)) return !0;
|
|
4005
4019
|
return !1;
|
|
4006
4020
|
}
|
|
4007
|
-
function Go(e) {
|
|
4008
|
-
}
|
|
4009
4021
|
function Yo(e) {
|
|
4022
|
+
}
|
|
4023
|
+
function Xo(e) {
|
|
4010
4024
|
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? gt(e.detail, e.detail.state) : Ke(e.detail, e.detail.state);
|
|
4011
4025
|
}
|
|
4012
|
-
function
|
|
4026
|
+
function Wo(e, n) {
|
|
4013
4027
|
const t = e.targetData.parent.data.config;
|
|
4014
4028
|
t.nativeDrag && (ue(e.e), ce = !0, t.handleEnd(n));
|
|
4015
4029
|
}
|
|
4016
|
-
function
|
|
4030
|
+
function Qo(e) {
|
|
4017
4031
|
e.e.target !== e.e.currentTarget && h.pointerDown && (h.pointerDown.node.el.draggable = !1);
|
|
4018
4032
|
}
|
|
4019
|
-
function
|
|
4033
|
+
function Ko(e) {
|
|
4020
4034
|
e.e.target !== e.e.currentTarget && h.pointerDown && (h.pointerDown.node.el.draggable = !0);
|
|
4021
4035
|
}
|
|
4022
|
-
function
|
|
4036
|
+
function Zo(e, n) {
|
|
4023
4037
|
const t = e.targetData.parent.data.config;
|
|
4024
4038
|
if (t.nativeDrag) {
|
|
4025
4039
|
if (U(e.e), ue(e.e), ce) {
|
|
@@ -4029,7 +4043,7 @@ function Ko(e, n) {
|
|
|
4029
4043
|
t.handleEnd(n);
|
|
4030
4044
|
}
|
|
4031
4045
|
}
|
|
4032
|
-
function
|
|
4046
|
+
function Jo(e, n) {
|
|
4033
4047
|
var r;
|
|
4034
4048
|
if (!W(n)) return;
|
|
4035
4049
|
if (U(e.e), ce) {
|
|
@@ -4045,26 +4059,26 @@ function Zo(e, n) {
|
|
|
4045
4059
|
state: n
|
|
4046
4060
|
}), t == null || t.handleEnd(n);
|
|
4047
4061
|
}
|
|
4048
|
-
function
|
|
4049
|
-
var
|
|
4062
|
+
function ea(e) {
|
|
4063
|
+
var c, u, g, f, b;
|
|
4050
4064
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
4051
|
-
const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = W(e), o = (
|
|
4065
|
+
const n = e.draggedNodes.map((x) => x.el), t = e.initialParent.data, r = W(e), o = (c = j.get(e.initialParent.el)) == null ? void 0 : c.config, a = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, l = (u = t == null ? void 0 : t.config) == null ? void 0 : u.longPressClass, d = r ? (g = t == null ? void 0 : t.config) == null ? void 0 : g.synthDragPlaceholderClass : (f = t == null ? void 0 : t.config) == null ? void 0 : f.dragPlaceholderClass, s = e.originalZIndex;
|
|
4052
4066
|
W(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), un(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), s !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = s), requestAnimationFrame(() => {
|
|
4053
4067
|
de(n, a), de(n, l), de(n, d);
|
|
4054
4068
|
}), be(e.draggedNodes, e.currentParent, e), ye(e.currentParent, void 0, e);
|
|
4055
|
-
const
|
|
4069
|
+
const p = { ...e };
|
|
4056
4070
|
(b = o == null ? void 0 : o.onDragend) == null || b.call(o, {
|
|
4057
|
-
parent:
|
|
4071
|
+
parent: p.currentParent,
|
|
4058
4072
|
values: Ee(
|
|
4059
|
-
|
|
4060
|
-
|
|
4073
|
+
p.currentParent.el,
|
|
4074
|
+
p.currentParent.data
|
|
4061
4075
|
),
|
|
4062
|
-
draggedNode:
|
|
4063
|
-
draggedNodes:
|
|
4064
|
-
state:
|
|
4065
|
-
}), e.emit("dragEnded",
|
|
4076
|
+
draggedNode: p.draggedNode,
|
|
4077
|
+
draggedNodes: p.draggedNodes,
|
|
4078
|
+
state: p
|
|
4079
|
+
}), e.emit("dragEnded", p), wo();
|
|
4066
4080
|
}
|
|
4067
|
-
function
|
|
4081
|
+
function na(e, n) {
|
|
4068
4082
|
ue(e.e), !n.pointerSelection && n.selectedState && be(n.selectedState.nodes, e.targetData.parent, n);
|
|
4069
4083
|
const t = e.targetData.parent.data.config;
|
|
4070
4084
|
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, de(
|
|
@@ -4072,11 +4086,11 @@ function ea(e, n) {
|
|
|
4072
4086
|
t.longPressClass
|
|
4073
4087
|
), _(n) && t.handleEnd(n);
|
|
4074
4088
|
}
|
|
4075
|
-
function
|
|
4089
|
+
function ta(e, n, t, r, o, a) {
|
|
4076
4090
|
var b, x;
|
|
4077
4091
|
const l = n.data.config;
|
|
4078
4092
|
let d, s;
|
|
4079
|
-
const
|
|
4093
|
+
const p = [
|
|
4080
4094
|
"display",
|
|
4081
4095
|
"flexDirection",
|
|
4082
4096
|
"alignItems",
|
|
@@ -4104,9 +4118,9 @@ function na(e, n, t, r, o, a) {
|
|
|
4104
4118
|
"height",
|
|
4105
4119
|
"boxSizing",
|
|
4106
4120
|
"overflow"
|
|
4107
|
-
],
|
|
4121
|
+
], c = (m, y) => {
|
|
4108
4122
|
const D = window.getComputedStyle(m);
|
|
4109
|
-
|
|
4123
|
+
p.forEach((C) => {
|
|
4110
4124
|
y.style[C] = D[C];
|
|
4111
4125
|
});
|
|
4112
4126
|
}, u = (m, y = {}) => {
|
|
@@ -4126,12 +4140,12 @@ function na(e, n, t, r, o, a) {
|
|
|
4126
4140
|
if (l.synthDragImage)
|
|
4127
4141
|
s = l.synthDragImage(e, n, t, o), d = s.dragImage, d.setAttribute("popover", "manual"), u(d);
|
|
4128
4142
|
else if (!l.multiDrag || o.length === 1)
|
|
4129
|
-
d = e.el.cloneNode(!0),
|
|
4143
|
+
d = e.el.cloneNode(!0), c(e.el, d), d.setAttribute("popover", "manual"), u(d);
|
|
4130
4144
|
else {
|
|
4131
4145
|
const m = document.createElement("div");
|
|
4132
4146
|
m.setAttribute("popover", "manual"), o.forEach((y) => {
|
|
4133
4147
|
const D = y.el.cloneNode(!0);
|
|
4134
|
-
|
|
4148
|
+
c(y.el, D), D.style.pointerEvents = "none", D.style.margin = "0", m.append(D);
|
|
4135
4149
|
}), m.style.display = "flex", m.style.flexDirection = "column", m.style.padding = "0", m.style.margin = "0", m.style.position = "absolute", m.style.zIndex = "9999", m.style.pointerEvents = "none", d = m;
|
|
4136
4150
|
}
|
|
4137
4151
|
d.id = "dnd-dragged-node-clone", n.el.appendChild(d), d.showPopover();
|
|
@@ -4155,7 +4169,7 @@ function na(e, n, t, r, o, a) {
|
|
|
4155
4169
|
...g
|
|
4156
4170
|
});
|
|
4157
4171
|
}
|
|
4158
|
-
function
|
|
4172
|
+
function ra(e, n, t) {
|
|
4159
4173
|
const r = e.targetData.parent.data.config;
|
|
4160
4174
|
n.longPressTimeout = setTimeout(() => {
|
|
4161
4175
|
n && (n.longPress = !0, r.longPressClass && e.e.cancelable && Te([t.el], r.longPressClass), U(e.e));
|
|
@@ -4165,11 +4179,11 @@ function un(e, n = !0, t = !0) {
|
|
|
4165
4179
|
n && (e.frameIdX !== void 0 && (cancelAnimationFrame(e.frameIdX), e.frameIdX = void 0), e.lastScrollDirectionX = void 0), t && (e.frameIdY !== void 0 && (cancelAnimationFrame(e.frameIdY), e.frameIdY = void 0), e.lastScrollDirectionY = void 0), !e.frameIdX && !e.frameIdY && (e.preventEnter = !1);
|
|
4166
4180
|
}
|
|
4167
4181
|
function pt(e, n = !1) {
|
|
4168
|
-
var
|
|
4169
|
-
const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, a = e.startTop ?? 0, l = window.scrollX ?? 0, d = window.scrollY ?? 0, s = t - o + l,
|
|
4170
|
-
e.clonedDraggedNode.style.transform = `translate3d(${s}px, ${
|
|
4182
|
+
var c;
|
|
4183
|
+
const { x: t, y: r } = e.coordinates, o = e.startLeft ?? 0, a = e.startTop ?? 0, l = window.scrollX ?? 0, d = window.scrollY ?? 0, s = t - o + l, p = r - a + d;
|
|
4184
|
+
e.clonedDraggedNode.style.transform = `translate3d(${s}px, ${p}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", de(
|
|
4171
4185
|
e.draggedNodes.map((u) => u.el),
|
|
4172
|
-
(
|
|
4186
|
+
(c = e.initialParent.data.config) == null ? void 0 : c.longPressClass
|
|
4173
4187
|
));
|
|
4174
4188
|
}
|
|
4175
4189
|
function Rn(e, n, t = !1) {
|
|
@@ -4177,7 +4191,7 @@ function Rn(e, n, t = !1) {
|
|
|
4177
4191
|
n.coordinates.x = r.x, n.coordinates.y = r.y, pt(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
|
|
4178
4192
|
W(n) && Ze(n.coordinates, e, n);
|
|
4179
4193
|
}, 16);
|
|
4180
|
-
const o =
|
|
4194
|
+
const o = ga(r);
|
|
4181
4195
|
if (!o) {
|
|
4182
4196
|
document.dispatchEvent(
|
|
4183
4197
|
new CustomEvent("handleRootPointerover", {
|
|
@@ -4204,22 +4218,22 @@ function Rn(e, n, t = !1) {
|
|
|
4204
4218
|
})
|
|
4205
4219
|
);
|
|
4206
4220
|
}
|
|
4207
|
-
function
|
|
4221
|
+
function oa(e, n) {
|
|
4208
4222
|
var a;
|
|
4209
4223
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
4210
4224
|
const { x: r, y: o } = ke(e.e);
|
|
4211
4225
|
n.coordinates.y = o, n.coordinates.x = r, U(e.e), ue(e.e), _(n) && Ze({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((a = n.currentParent) == null ? void 0 : a.el) ? gt(e, n) : Ke(e, n);
|
|
4212
4226
|
}
|
|
4213
|
-
function
|
|
4227
|
+
function aa(e, n) {
|
|
4214
4228
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
4215
4229
|
U(e.e), ue(e.e);
|
|
4216
4230
|
const { x: r, y: o } = ke(e.e);
|
|
4217
4231
|
_(n) && Ze({ x: r, y: o }, e.e, n), Ke(e, n);
|
|
4218
4232
|
}
|
|
4219
|
-
function
|
|
4233
|
+
function ia(e) {
|
|
4220
4234
|
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && Ke(e.detail, e.detail.state);
|
|
4221
4235
|
}
|
|
4222
|
-
function
|
|
4236
|
+
function la({
|
|
4223
4237
|
currentParent: e,
|
|
4224
4238
|
targetParent: n,
|
|
4225
4239
|
initialParent: t,
|
|
@@ -4237,14 +4251,14 @@ function ia({
|
|
|
4237
4251
|
o
|
|
4238
4252
|
) : !(!a.group || a.group !== l.group);
|
|
4239
4253
|
}
|
|
4240
|
-
function
|
|
4254
|
+
function sa(e, n) {
|
|
4241
4255
|
U(e.e);
|
|
4242
4256
|
}
|
|
4243
|
-
function
|
|
4257
|
+
function da(e, n) {
|
|
4244
4258
|
U(e.e);
|
|
4245
4259
|
}
|
|
4246
|
-
function
|
|
4247
|
-
var
|
|
4260
|
+
function ca(e, n, t, r) {
|
|
4261
|
+
var c;
|
|
4248
4262
|
if (n.affectedNodes.map((u) => u.data.value).includes(e.targetData.node.data.value))
|
|
4249
4263
|
return !1;
|
|
4250
4264
|
if (n.remapJustFinished)
|
|
@@ -4252,26 +4266,26 @@ function da(e, n, t, r) {
|
|
|
4252
4266
|
if (n.preventEnter) return !1;
|
|
4253
4267
|
if (n.draggedNodes.map((u) => u.el).includes(e.targetData.node.el))
|
|
4254
4268
|
return n.currentTargetValue = void 0, !1;
|
|
4255
|
-
if (e.targetData.node.data.value === n.currentTargetValue || e.targetData.parent.el !== ((
|
|
4269
|
+
if (e.targetData.node.data.value === n.currentTargetValue || e.targetData.parent.el !== ((c = n.currentParent) == null ? void 0 : c.el) || e.targetData.parent.data.config.sortable === !1 || e.targetData.node.el.contains(n.draggedNodes[0].el)) return !1;
|
|
4256
4270
|
const o = e.targetData.node.el.getBoundingClientRect(), a = n.draggedNode.el.getBoundingClientRect(), l = o.y - a.y, d = o.x - a.x;
|
|
4257
4271
|
let s;
|
|
4258
4272
|
Math.abs(l) > Math.abs(d) ? s = l > 0 ? "above" : "below" : s = d > 0 ? "left" : "right";
|
|
4259
|
-
const
|
|
4273
|
+
const p = n.currentParent.data.config.threshold;
|
|
4260
4274
|
switch (s) {
|
|
4261
4275
|
case "left":
|
|
4262
|
-
if (t > o.x + o.width *
|
|
4276
|
+
if (t > o.x + o.width * p.horizontal)
|
|
4263
4277
|
return n.incomingDirection = "left", !0;
|
|
4264
4278
|
break;
|
|
4265
4279
|
case "right":
|
|
4266
|
-
if (t < o.x + o.width * (1 -
|
|
4280
|
+
if (t < o.x + o.width * (1 - p.horizontal))
|
|
4267
4281
|
return n.incomingDirection = "right", !0;
|
|
4268
4282
|
break;
|
|
4269
4283
|
case "above":
|
|
4270
|
-
if (r > o.y + o.height *
|
|
4284
|
+
if (r > o.y + o.height * p.vertical)
|
|
4271
4285
|
return n.incomingDirection = "above", !0;
|
|
4272
4286
|
break;
|
|
4273
4287
|
case "below":
|
|
4274
|
-
if (r < o.y + o.height * (1 -
|
|
4288
|
+
if (r < o.y + o.height * (1 - p.vertical))
|
|
4275
4289
|
return n.incomingDirection = "below", !0;
|
|
4276
4290
|
break;
|
|
4277
4291
|
}
|
|
@@ -4279,7 +4293,7 @@ function da(e, n, t, r) {
|
|
|
4279
4293
|
}
|
|
4280
4294
|
function gt(e, n) {
|
|
4281
4295
|
const { x: t, y: r } = ke(e.e);
|
|
4282
|
-
if (!
|
|
4296
|
+
if (!ca(e, n, t, r))
|
|
4283
4297
|
return;
|
|
4284
4298
|
const o = n.draggedNode.data.index > e.targetData.node.data.index ? [e.targetData.node.data.index, n.draggedNode.data.index] : [n.draggedNode.data.index, e.targetData.node.data.index];
|
|
4285
4299
|
n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
|
|
@@ -4320,7 +4334,7 @@ function Y(e) {
|
|
|
4320
4334
|
};
|
|
4321
4335
|
}
|
|
4322
4336
|
function Ke(e, n) {
|
|
4323
|
-
U(e.e),
|
|
4337
|
+
U(e.e), la({
|
|
4324
4338
|
currentParent: n.currentParent,
|
|
4325
4339
|
targetParent: e.targetData.parent,
|
|
4326
4340
|
initialParent: n.initialParent,
|
|
@@ -4364,11 +4378,11 @@ function Te(e, n, t = !1) {
|
|
|
4364
4378
|
ne.set(o, a);
|
|
4365
4379
|
}
|
|
4366
4380
|
for (const o of e) {
|
|
4367
|
-
const a = ne.get(o), l =
|
|
4381
|
+
const a = ne.get(o), l = ua(o, n, a, t);
|
|
4368
4382
|
l && r(o, l);
|
|
4369
4383
|
}
|
|
4370
4384
|
}
|
|
4371
|
-
function
|
|
4385
|
+
function ua(e, n, t, r = !1) {
|
|
4372
4386
|
if (!n) return;
|
|
4373
4387
|
const o = at(n);
|
|
4374
4388
|
if (!o.length) return;
|
|
@@ -4401,9 +4415,9 @@ function de(e, n) {
|
|
|
4401
4415
|
}
|
|
4402
4416
|
}
|
|
4403
4417
|
function Fn(e, n, t, r, o) {
|
|
4404
|
-
const l = o.axis === "x", d = e === document.scrollingElement, s = l ? "scrollLeft" : "scrollTop",
|
|
4418
|
+
const l = o.axis === "x", d = e === document.scrollingElement, s = l ? "scrollLeft" : "scrollTop", p = l ? "clientWidth" : "clientHeight", c = l ? "offsetWidth" : "offsetHeight", u = l ? "scrollWidth" : "scrollHeight", g = l ? n.clientX : n.clientY, f = l ? r.left : r.top, b = l ? t.overflowX : t.overflowY;
|
|
4405
4419
|
if (d) {
|
|
4406
|
-
const x = e[s], m = e[
|
|
4420
|
+
const x = e[s], m = e[p], y = x > 0, D = x + m < (l ? o.state.rootScrollWidth || 0 : e[u]);
|
|
4407
4421
|
return l ? {
|
|
4408
4422
|
left: y && g < m * 0.075,
|
|
4409
4423
|
right: D && g > m * (1 - 0.075)
|
|
@@ -4413,7 +4427,7 @@ function Fn(e, n, t, r, o) {
|
|
|
4413
4427
|
};
|
|
4414
4428
|
}
|
|
4415
4429
|
if ((b === "auto" || b === "scroll") && e !== document.body && e !== document.documentElement) {
|
|
4416
|
-
const x = e[u], m = e[
|
|
4430
|
+
const x = e[u], m = e[c], y = e[s], D = y > 0, C = y < x - m;
|
|
4417
4431
|
return l ? {
|
|
4418
4432
|
left: D && g < f + m * 0.075,
|
|
4419
4433
|
right: C && g > f + m * (1 - 0.075)
|
|
@@ -4424,25 +4438,25 @@ function Fn(e, n, t, r, o) {
|
|
|
4424
4438
|
}
|
|
4425
4439
|
return l ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
4426
4440
|
}
|
|
4427
|
-
function
|
|
4441
|
+
function pa(e, n, t, r) {
|
|
4428
4442
|
if (!_(t) || !t.draggedNode)
|
|
4429
4443
|
return;
|
|
4430
4444
|
t.preventEnter = !0;
|
|
4431
4445
|
const o = r.axis === "x", a = r.direction === "positive" ? 1 : -1, l = 20, d = o ? "lastScrollDirectionX" : "lastScrollDirectionY", s = o ? "frameIdX" : "frameIdY";
|
|
4432
4446
|
t[s] !== void 0 && (cancelAnimationFrame(t[s]), t[s] = void 0), t[d] = r.direction;
|
|
4433
|
-
const
|
|
4447
|
+
const p = () => {
|
|
4434
4448
|
if (!_(t) || !t.draggedNode) {
|
|
4435
4449
|
t[s] !== void 0 && (cancelAnimationFrame(t[s]), t[s] = void 0);
|
|
4436
4450
|
return;
|
|
4437
4451
|
}
|
|
4438
|
-
const
|
|
4452
|
+
const c = o ? "scrollLeft" : "scrollTop", u = o ? "clientWidth" : "clientHeight", g = o ? "scrollWidth" : "scrollHeight", f = e[c], b = e[u], x = e[g];
|
|
4439
4453
|
if (!(a > 0 ? f + b < x : f > 0)) {
|
|
4440
4454
|
t[s] = void 0, t[d] = void 0;
|
|
4441
4455
|
return;
|
|
4442
4456
|
}
|
|
4443
|
-
e[
|
|
4457
|
+
e[c] += l * a, W(t) && pt(t), t[s] = requestAnimationFrame(p);
|
|
4444
4458
|
};
|
|
4445
|
-
t[s] = requestAnimationFrame(
|
|
4459
|
+
t[s] = requestAnimationFrame(p);
|
|
4446
4460
|
}
|
|
4447
4461
|
function Ln(e, n, t) {
|
|
4448
4462
|
const r = e.getBoundingClientRect();
|
|
@@ -4454,13 +4468,13 @@ function Ze(e, n, t) {
|
|
|
4454
4468
|
un(t);
|
|
4455
4469
|
const { x: r, y: o } = e;
|
|
4456
4470
|
let a = !1;
|
|
4457
|
-
const l = (s,
|
|
4458
|
-
|
|
4471
|
+
const l = (s, p, c) => {
|
|
4472
|
+
pa(c, n, t, { axis: s, direction: p }), a = !0;
|
|
4459
4473
|
}, d = (s) => {
|
|
4460
|
-
const
|
|
4474
|
+
const p = window.getComputedStyle(s), c = s.getBoundingClientRect(), u = Fn(s, n, p, c, {
|
|
4461
4475
|
axis: "x",
|
|
4462
4476
|
state: t
|
|
4463
|
-
}), g = Fn(s, n,
|
|
4477
|
+
}), g = Fn(s, n, p, c, { axis: "y" });
|
|
4464
4478
|
(u.left || u.right) && (t.lastScrollContainerX = s, l("x", u.right ? "positive" : "negative", s)), (g.up || g.down) && (t.lastScrollContainerY = s, l("y", g.down ? "positive" : "negative", s));
|
|
4465
4479
|
};
|
|
4466
4480
|
if (t.lastScrollContainerX && Ln(t.lastScrollContainerX, r, o) && d(t.lastScrollContainerX), !a && t.lastScrollContainerY && Ln(t.lastScrollContainerY, r, o) && d(t.lastScrollContainerY), !a) {
|
|
@@ -4474,7 +4488,7 @@ function Ze(e, n, t) {
|
|
|
4474
4488
|
}
|
|
4475
4489
|
a || un(t);
|
|
4476
4490
|
}
|
|
4477
|
-
function
|
|
4491
|
+
function ga(e) {
|
|
4478
4492
|
let n = document.elementFromPoint(e.x, e.y);
|
|
4479
4493
|
if (!Je(n)) return;
|
|
4480
4494
|
let t, r = !0;
|
|
@@ -4524,38 +4538,38 @@ function Ge(e, n) {
|
|
|
4524
4538
|
}
|
|
4525
4539
|
return t;
|
|
4526
4540
|
}
|
|
4527
|
-
function
|
|
4541
|
+
function fa(e) {
|
|
4528
4542
|
if (e instanceof HTMLElement) return e;
|
|
4529
4543
|
if ("current" in e && e.current instanceof HTMLElement)
|
|
4530
4544
|
return e.current;
|
|
4531
4545
|
console.warn("Invalid parent element", e);
|
|
4532
4546
|
}
|
|
4533
|
-
function
|
|
4534
|
-
const t =
|
|
4547
|
+
function ha(e, n) {
|
|
4548
|
+
const t = fa(e);
|
|
4535
4549
|
t && n(t);
|
|
4536
4550
|
}
|
|
4537
4551
|
var Ye = /* @__PURE__ */ new WeakMap();
|
|
4538
|
-
function
|
|
4552
|
+
function ma(e) {
|
|
4539
4553
|
const n = Ye.get(e);
|
|
4540
4554
|
return n ? n[0] : (console.warn("No values found for parent element"), []);
|
|
4541
4555
|
}
|
|
4542
|
-
function
|
|
4556
|
+
function ba(e, n) {
|
|
4543
4557
|
const t = Ye.get(n);
|
|
4544
4558
|
t && t[1](e), Ye.set(n, [e, t[1]]);
|
|
4545
4559
|
}
|
|
4546
|
-
function
|
|
4560
|
+
function va(e, n) {
|
|
4547
4561
|
return (t) => {
|
|
4548
|
-
Ye.set(t, n),
|
|
4562
|
+
Ye.set(t, n), ko({ parent: t, getValues: ma, setValues: ba, config: e });
|
|
4549
4563
|
};
|
|
4550
4564
|
}
|
|
4551
4565
|
function Pn(e) {
|
|
4552
4566
|
wn && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
|
|
4553
4567
|
const { parent: t, state: r, ...o } = n;
|
|
4554
|
-
|
|
4568
|
+
ha(t, va(o, r));
|
|
4555
4569
|
}));
|
|
4556
4570
|
}
|
|
4557
|
-
function
|
|
4558
|
-
const t = Ce(null), [r, o] =
|
|
4571
|
+
function ya(e, n = {}) {
|
|
4572
|
+
const t = Ce(null), [r, o] = z(e);
|
|
4559
4573
|
function a(l = {}) {
|
|
4560
4574
|
Pn({ parent: t, state: [r, o], ...l });
|
|
4561
4575
|
}
|
|
@@ -4574,7 +4588,7 @@ const On = {
|
|
|
4574
4588
|
color: S.palette.neutral.N40
|
|
4575
4589
|
}
|
|
4576
4590
|
}
|
|
4577
|
-
},
|
|
4591
|
+
}, xa = T.ul`
|
|
4578
4592
|
list-style: none;
|
|
4579
4593
|
padding: 0;
|
|
4580
4594
|
margin: 0;
|
|
@@ -4583,7 +4597,7 @@ const On = {
|
|
|
4583
4597
|
gap: 12px;
|
|
4584
4598
|
width: 100%;
|
|
4585
4599
|
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
4586
|
-
`,
|
|
4600
|
+
`, wa = T.li`
|
|
4587
4601
|
& > div {
|
|
4588
4602
|
border: 1px solid
|
|
4589
4603
|
${({ theme: e, $active: n }) => {
|
|
@@ -4600,20 +4614,20 @@ const On = {
|
|
|
4600
4614
|
initialItems: a,
|
|
4601
4615
|
highlightFirst: l,
|
|
4602
4616
|
onMove: d
|
|
4603
|
-
} = e, [s,
|
|
4617
|
+
} = e, [s, p] = ya(
|
|
4604
4618
|
a,
|
|
4605
4619
|
{ group: r }
|
|
4606
|
-
), [
|
|
4620
|
+
), [c, u] = M.useState(
|
|
4607
4621
|
null
|
|
4608
|
-
), g =
|
|
4609
|
-
|
|
4622
|
+
), g = M.useRef(a);
|
|
4623
|
+
M.useEffect(() => {
|
|
4610
4624
|
const y = (D) => {
|
|
4611
4625
|
const C = D.detail ?? null;
|
|
4612
4626
|
u(C);
|
|
4613
4627
|
};
|
|
4614
4628
|
return window.addEventListener(on, y), () => window.removeEventListener(on, y);
|
|
4615
4629
|
}, []);
|
|
4616
|
-
const f =
|
|
4630
|
+
const f = M.useCallback((y) => {
|
|
4617
4631
|
window.dispatchEvent(
|
|
4618
4632
|
new CustomEvent(on, { detail: y })
|
|
4619
4633
|
);
|
|
@@ -4621,26 +4635,26 @@ const On = {
|
|
|
4621
4635
|
var E;
|
|
4622
4636
|
const D = y.target, C = (E = D == null ? void 0 : D.closest) == null ? void 0 : E.call(D, "li.dnd-item"), k = (C == null ? void 0 : C.getAttribute("data-label")) || null;
|
|
4623
4637
|
k && (u(k), f(k));
|
|
4624
|
-
}, x =
|
|
4638
|
+
}, x = M.useCallback(() => {
|
|
4625
4639
|
u(null), f(null);
|
|
4626
4640
|
}, [f]);
|
|
4627
|
-
|
|
4641
|
+
M.useEffect(() => {
|
|
4628
4642
|
const y = () => x();
|
|
4629
4643
|
return window.addEventListener("pointerup", y), window.addEventListener("blur", y), () => {
|
|
4630
4644
|
window.removeEventListener("pointerup", y), window.removeEventListener("blur", y);
|
|
4631
4645
|
};
|
|
4632
|
-
}, [x]),
|
|
4646
|
+
}, [x]), M.useEffect(() => {
|
|
4633
4647
|
const y = g.current;
|
|
4634
|
-
if (
|
|
4635
|
-
const D = new Set(y), C =
|
|
4648
|
+
if (p.length !== y.length && p.length === y.length + 1) {
|
|
4649
|
+
const D = new Set(y), C = p.find((k) => !D.has(k)) || null;
|
|
4636
4650
|
if (C) {
|
|
4637
4651
|
const k = t === "left" ? "right" : "left";
|
|
4638
4652
|
d == null || d({ item: C, from: k, to: t });
|
|
4639
4653
|
}
|
|
4640
4654
|
}
|
|
4641
|
-
g.current =
|
|
4642
|
-
}, [
|
|
4643
|
-
const m =
|
|
4655
|
+
g.current = p;
|
|
4656
|
+
}, [p, t, d]);
|
|
4657
|
+
const m = p.length === 0;
|
|
4644
4658
|
return /* @__PURE__ */ i(
|
|
4645
4659
|
Le,
|
|
4646
4660
|
{
|
|
@@ -4649,7 +4663,7 @@ const On = {
|
|
|
4649
4663
|
height: "-webkit-fill-available",
|
|
4650
4664
|
spacing: "wide",
|
|
4651
4665
|
children: /* @__PURE__ */ i(
|
|
4652
|
-
|
|
4666
|
+
xa,
|
|
4653
4667
|
{
|
|
4654
4668
|
ref: s,
|
|
4655
4669
|
onPointerDownCapture: b,
|
|
@@ -4664,19 +4678,19 @@ const On = {
|
|
|
4664
4678
|
width: "100%",
|
|
4665
4679
|
alignItems: "center",
|
|
4666
4680
|
justifyContent: "center",
|
|
4667
|
-
children: /* @__PURE__ */ i(
|
|
4681
|
+
children: /* @__PURE__ */ i(A, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
|
|
4668
4682
|
}
|
|
4669
|
-
) :
|
|
4670
|
-
const C =
|
|
4683
|
+
) : p.map((y, D) => {
|
|
4684
|
+
const C = c === y;
|
|
4671
4685
|
return /* @__PURE__ */ i(
|
|
4672
|
-
|
|
4686
|
+
wa,
|
|
4673
4687
|
{
|
|
4674
4688
|
className: `dnd-item${C ? " is-dragging" : ""}`,
|
|
4675
4689
|
"data-label": y,
|
|
4676
4690
|
"data-first": !!(l && D === 0) || void 0,
|
|
4677
4691
|
$active: C,
|
|
4678
4692
|
children: /* @__PURE__ */ i(Q, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
|
|
4679
|
-
|
|
4693
|
+
A,
|
|
4680
4694
|
{
|
|
4681
4695
|
type: "title",
|
|
4682
4696
|
appearance: C ? "primary" : "dark",
|
|
@@ -4694,7 +4708,7 @@ const On = {
|
|
|
4694
4708
|
)
|
|
4695
4709
|
}
|
|
4696
4710
|
);
|
|
4697
|
-
},
|
|
4711
|
+
}, wi = (e) => {
|
|
4698
4712
|
const { group: n = "clients", left: t, right: r, onMove: o } = e, a = (l) => {
|
|
4699
4713
|
o == null || o(l);
|
|
4700
4714
|
};
|
|
@@ -4733,7 +4747,7 @@ const On = {
|
|
|
4733
4747
|
]
|
|
4734
4748
|
}
|
|
4735
4749
|
);
|
|
4736
|
-
},
|
|
4750
|
+
}, Da = T.div`
|
|
4737
4751
|
& > button {
|
|
4738
4752
|
height: 66px;
|
|
4739
4753
|
min-width: 66px;
|
|
@@ -4751,7 +4765,7 @@ const On = {
|
|
|
4751
4765
|
}
|
|
4752
4766
|
}
|
|
4753
4767
|
}
|
|
4754
|
-
`,
|
|
4768
|
+
`, Di = (e) => /* @__PURE__ */ i(Da, { children: /* @__PURE__ */ i(B, { ...e }) }), Ca = T.div`
|
|
4755
4769
|
display: flex;
|
|
4756
4770
|
justify-content: space-between;
|
|
4757
4771
|
align-items: center;
|
|
@@ -4780,9 +4794,9 @@ const On = {
|
|
|
4780
4794
|
}
|
|
4781
4795
|
}
|
|
4782
4796
|
}
|
|
4783
|
-
`,
|
|
4797
|
+
`, Ci = (e) => {
|
|
4784
4798
|
const { handleBack: n, handleNext: t, disabledBack: r, disabledNext: o, textValues: a } = e;
|
|
4785
|
-
return /* @__PURE__ */ v(
|
|
4799
|
+
return /* @__PURE__ */ v(Ca, { children: [
|
|
4786
4800
|
/* @__PURE__ */ i(
|
|
4787
4801
|
B,
|
|
4788
4802
|
{
|
|
@@ -4844,7 +4858,7 @@ const On = {
|
|
|
4844
4858
|
hover: S.palette.neutral.N30
|
|
4845
4859
|
}
|
|
4846
4860
|
}
|
|
4847
|
-
},
|
|
4861
|
+
}, Ta = T.ul`
|
|
4848
4862
|
display: flex;
|
|
4849
4863
|
flex-direction: column;
|
|
4850
4864
|
padding: 4px 0px;
|
|
@@ -4895,15 +4909,15 @@ const On = {
|
|
|
4895
4909
|
return ((r = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.option) == null ? void 0 : t.background) == null ? void 0 : r.hover) || ee.option.background.hover;
|
|
4896
4910
|
}};
|
|
4897
4911
|
}
|
|
4898
|
-
`,
|
|
4912
|
+
`, Sa = (e) => {
|
|
4899
4913
|
const { children: n, onOptionClick: t, options: r, maxItems: o } = e, a = (l) => {
|
|
4900
4914
|
try {
|
|
4901
4915
|
if (l.target.closest('input[type="checkbox"]'))
|
|
4902
4916
|
return;
|
|
4903
4917
|
const s = r == null ? void 0 : r.find(
|
|
4904
|
-
(
|
|
4905
|
-
var
|
|
4906
|
-
return
|
|
4918
|
+
(p) => {
|
|
4919
|
+
var c;
|
|
4920
|
+
return p.id === l.target.id || p.id === ((c = l.target.parentElement) == null ? void 0 : c.id);
|
|
4907
4921
|
}
|
|
4908
4922
|
);
|
|
4909
4923
|
s && t && t(s.value);
|
|
@@ -4912,7 +4926,7 @@ const On = {
|
|
|
4912
4926
|
}
|
|
4913
4927
|
};
|
|
4914
4928
|
return /* @__PURE__ */ i(
|
|
4915
|
-
|
|
4929
|
+
Ta,
|
|
4916
4930
|
{
|
|
4917
4931
|
$maxItems: o,
|
|
4918
4932
|
$totalOptions: r == null ? void 0 : r.length,
|
|
@@ -4920,20 +4934,20 @@ const On = {
|
|
|
4920
4934
|
children: n
|
|
4921
4935
|
}
|
|
4922
4936
|
);
|
|
4923
|
-
},
|
|
4937
|
+
}, Ea = T.div`
|
|
4924
4938
|
cursor: ${({ $disabled: e }) => e && "not-allowed"};
|
|
4925
4939
|
width: ${({ $fullwidth: e }) => e ? "100%" : "fit-content"};
|
|
4926
4940
|
position: relative;
|
|
4927
|
-
`,
|
|
4941
|
+
`, Na = T.div`
|
|
4928
4942
|
display: flex;
|
|
4929
4943
|
align-items: center;
|
|
4930
4944
|
margin-bottom: 4px;
|
|
4931
4945
|
gap: 4px;
|
|
4932
4946
|
pointer-events: ${({ $disabled: e }) => e && "none"};
|
|
4933
|
-
`,
|
|
4947
|
+
`, ka = T.div`
|
|
4934
4948
|
display: grid;
|
|
4935
4949
|
height: ${({ $size: e }) => e === "compact" ? "40px" : "48px"};
|
|
4936
|
-
padding:
|
|
4950
|
+
padding: 8px 16px;
|
|
4937
4951
|
gap: 8px;
|
|
4938
4952
|
align-items: center;
|
|
4939
4953
|
box-sizing: border-box;
|
|
@@ -4941,6 +4955,7 @@ const On = {
|
|
|
4941
4955
|
pointer-events: ${({ $disabled: e }) => e && "none"};
|
|
4942
4956
|
grid-auto-flow: column;
|
|
4943
4957
|
grid-template-columns: 1fr auto;
|
|
4958
|
+
height: -webkit-fill-available;
|
|
4944
4959
|
cursor: ${({ $disabled: e }) => e ? "not-allowed" : "pointer"};
|
|
4945
4960
|
background-color: ${({ $disabled: e, theme: n }) => {
|
|
4946
4961
|
var t, r, o, a, l, d;
|
|
@@ -4953,7 +4968,7 @@ const On = {
|
|
|
4953
4968
|
const o = ((l = (a = r == null ? void 0 : r.input) == null ? void 0 : a.border) == null ? void 0 : l.color) || ee.border.color;
|
|
4954
4969
|
return e ? o.disabled : n ? o.invalid : t ? o.focus : o.regular;
|
|
4955
4970
|
}};
|
|
4956
|
-
`,
|
|
4971
|
+
`, $a = T.input`
|
|
4957
4972
|
display: ${({ $inputWithData: e }) => e ? "none" : "block"};
|
|
4958
4973
|
outline: none;
|
|
4959
4974
|
padding: 0;
|
|
@@ -5011,7 +5026,7 @@ const On = {
|
|
|
5011
5026
|
&:-webkit-autofill {
|
|
5012
5027
|
-webkit-background-clip: text;
|
|
5013
5028
|
}
|
|
5014
|
-
`,
|
|
5029
|
+
`, Ia = T.div`
|
|
5015
5030
|
display: flex;
|
|
5016
5031
|
justify-content: flex-end;
|
|
5017
5032
|
transition: ease;
|
|
@@ -5022,7 +5037,7 @@ function zn(e, n) {
|
|
|
5022
5037
|
const t = e.find((r) => r.value === n);
|
|
5023
5038
|
return t ? t.label : n;
|
|
5024
5039
|
}
|
|
5025
|
-
const
|
|
5040
|
+
const Ra = (e) => {
|
|
5026
5041
|
var o, a;
|
|
5027
5042
|
const { message: n } = e, t = vn(mn), r = ((a = (o = t == null ? void 0 : t.input) == null ? void 0 : o.message) == null ? void 0 : a.appearance) || ee.message.appearance;
|
|
5028
5043
|
return /* @__PURE__ */ v(w, { alignItems: "center", gap: "4px", margin: "4px 0 0 16px", children: [
|
|
@@ -5035,7 +5050,7 @@ const Ia = (e) => {
|
|
|
5035
5050
|
}
|
|
5036
5051
|
),
|
|
5037
5052
|
/* @__PURE__ */ i(
|
|
5038
|
-
|
|
5053
|
+
A,
|
|
5039
5054
|
{
|
|
5040
5055
|
type: "body",
|
|
5041
5056
|
size: "small",
|
|
@@ -5045,8 +5060,8 @@ const Ia = (e) => {
|
|
|
5045
5060
|
}
|
|
5046
5061
|
)
|
|
5047
5062
|
] });
|
|
5048
|
-
},
|
|
5049
|
-
var ae,
|
|
5063
|
+
}, Fa = Rt((e, n) => {
|
|
5064
|
+
var ae, Ae;
|
|
5050
5065
|
const {
|
|
5051
5066
|
displayList: t,
|
|
5052
5067
|
disabled: r,
|
|
@@ -5055,8 +5070,8 @@ const Ia = (e) => {
|
|
|
5055
5070
|
id: l,
|
|
5056
5071
|
invalid: d,
|
|
5057
5072
|
label: s,
|
|
5058
|
-
maxItems:
|
|
5059
|
-
message:
|
|
5073
|
+
maxItems: p,
|
|
5074
|
+
message: c,
|
|
5060
5075
|
name: u,
|
|
5061
5076
|
options: g,
|
|
5062
5077
|
placeholder: f,
|
|
@@ -5071,29 +5086,29 @@ const Ia = (e) => {
|
|
|
5071
5086
|
onKeyUp: R,
|
|
5072
5087
|
onBlur: L,
|
|
5073
5088
|
onChange: $,
|
|
5074
|
-
onClick:
|
|
5089
|
+
onClick: V,
|
|
5075
5090
|
onFocus: oe,
|
|
5076
5091
|
onOptionClick: xe,
|
|
5077
5092
|
onCheckboxChange: we,
|
|
5078
5093
|
handleClear: pe
|
|
5079
|
-
} = e, J = vn(mn), $e = ((
|
|
5094
|
+
} = e, J = vn(mn), $e = ((Ae = (ae = J == null ? void 0 : J.input) == null ? void 0 : ae.required) == null ? void 0 : Ae.appearance) || ee.required.appearance, De = b && !r, ge = y || m === "" ? "" : zn(g, m), fe = Gn(
|
|
5080
5095
|
() => g.filter((P) => C.includes(P.id)),
|
|
5081
5096
|
[g, C]
|
|
5082
|
-
),
|
|
5097
|
+
), Ie = (P, F) => {
|
|
5083
5098
|
P.stopPropagation(), we({
|
|
5084
5099
|
target: { checked: !1, value: F }
|
|
5085
5100
|
});
|
|
5086
5101
|
};
|
|
5087
|
-
return /* @__PURE__ */ v(
|
|
5102
|
+
return /* @__PURE__ */ v(Ea, { $fullwidth: a, $disabled: r, ref: n, children: [
|
|
5088
5103
|
s && /* @__PURE__ */ v(
|
|
5089
|
-
|
|
5104
|
+
Na,
|
|
5090
5105
|
{
|
|
5091
5106
|
$alignItems: "center",
|
|
5092
5107
|
$disabled: r,
|
|
5093
5108
|
$wrap: "wrap",
|
|
5094
5109
|
children: [
|
|
5095
5110
|
/* @__PURE__ */ i(
|
|
5096
|
-
|
|
5111
|
+
It,
|
|
5097
5112
|
{
|
|
5098
5113
|
htmlFor: l,
|
|
5099
5114
|
focused: o,
|
|
@@ -5104,22 +5119,22 @@ const Ia = (e) => {
|
|
|
5104
5119
|
children: s
|
|
5105
5120
|
}
|
|
5106
5121
|
),
|
|
5107
|
-
De && /* @__PURE__ */ i(
|
|
5122
|
+
De && /* @__PURE__ */ i(A, { appearance: $e, size: "small", type: "body", children: "(Requerido)" })
|
|
5108
5123
|
]
|
|
5109
5124
|
}
|
|
5110
5125
|
),
|
|
5111
5126
|
/* @__PURE__ */ v(
|
|
5112
|
-
|
|
5127
|
+
ka,
|
|
5113
5128
|
{
|
|
5114
5129
|
$disabled: r,
|
|
5115
5130
|
$focused: o,
|
|
5116
5131
|
$invalid: d,
|
|
5117
|
-
onClick: k ? void 0 :
|
|
5132
|
+
onClick: k ? void 0 : V,
|
|
5118
5133
|
$value: m,
|
|
5119
5134
|
$size: x,
|
|
5120
5135
|
children: [
|
|
5121
5136
|
/* @__PURE__ */ i(
|
|
5122
|
-
|
|
5137
|
+
$a,
|
|
5123
5138
|
{
|
|
5124
5139
|
$inputWithData: !!m,
|
|
5125
5140
|
autoComplete: "off",
|
|
@@ -5136,55 +5151,64 @@ const Ia = (e) => {
|
|
|
5136
5151
|
onFocus: oe,
|
|
5137
5152
|
onBlur: L,
|
|
5138
5153
|
onChange: (P) => $(u, P.target.value),
|
|
5139
|
-
onClick: k ?
|
|
5154
|
+
onClick: k ? V : void 0,
|
|
5140
5155
|
onKeyUp: R
|
|
5141
5156
|
}
|
|
5142
5157
|
),
|
|
5143
|
-
/* @__PURE__ */ v(
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5158
|
+
/* @__PURE__ */ v(
|
|
5159
|
+
w,
|
|
5160
|
+
{
|
|
5161
|
+
direction: "row",
|
|
5162
|
+
gap: "8px",
|
|
5163
|
+
alignItems: "center",
|
|
5164
|
+
justifyContent: "space-between",
|
|
5165
|
+
children: [
|
|
5166
|
+
/* @__PURE__ */ i(w, { gap: "8px", alignItems: "center", wrap: "wrap", children: E && !r && (y ? fe.map((P) => /* @__PURE__ */ i(
|
|
5167
|
+
me,
|
|
5168
|
+
{
|
|
5169
|
+
appearance: "gray",
|
|
5170
|
+
label: P.label,
|
|
5171
|
+
removable: !0,
|
|
5172
|
+
displayIcon: !1,
|
|
5173
|
+
onClose: (F) => Ie(F, P.id)
|
|
5174
|
+
},
|
|
5175
|
+
P.id
|
|
5176
|
+
)) : (m ?? "") !== "" && /* @__PURE__ */ i(
|
|
5177
|
+
me,
|
|
5178
|
+
{
|
|
5179
|
+
appearance: "gray",
|
|
5180
|
+
label: zn(g, m),
|
|
5181
|
+
removable: !0,
|
|
5182
|
+
displayIcon: !1,
|
|
5183
|
+
onClose: (P) => {
|
|
5184
|
+
P.stopPropagation(), pe();
|
|
5185
|
+
}
|
|
5186
|
+
}
|
|
5187
|
+
)) }),
|
|
5188
|
+
D && /* @__PURE__ */ i(Ia, { $displayList: t, children: /* @__PURE__ */ i(
|
|
5189
|
+
O,
|
|
5190
|
+
{
|
|
5191
|
+
appearance: "dark",
|
|
5192
|
+
icon: /* @__PURE__ */ i(Ct, {}),
|
|
5193
|
+
spacing: "narrow",
|
|
5194
|
+
disabled: r
|
|
5195
|
+
}
|
|
5196
|
+
) })
|
|
5197
|
+
]
|
|
5198
|
+
}
|
|
5199
|
+
)
|
|
5176
5200
|
]
|
|
5177
5201
|
}
|
|
5178
5202
|
),
|
|
5179
|
-
d && /* @__PURE__ */ i(
|
|
5203
|
+
d && /* @__PURE__ */ i(Ra, { message: c }),
|
|
5180
5204
|
t && !r && /* @__PURE__ */ i(
|
|
5181
|
-
|
|
5205
|
+
Sa,
|
|
5182
5206
|
{
|
|
5183
|
-
maxItems:
|
|
5207
|
+
maxItems: p,
|
|
5184
5208
|
onOptionClick: xe,
|
|
5185
5209
|
options: g,
|
|
5186
5210
|
children: g.map((P) => /* @__PURE__ */ i(
|
|
5187
|
-
|
|
5211
|
+
At,
|
|
5188
5212
|
{
|
|
5189
5213
|
id: P.id,
|
|
5190
5214
|
label: P.label,
|
|
@@ -5197,7 +5221,7 @@ const Ia = (e) => {
|
|
|
5197
5221
|
}
|
|
5198
5222
|
)
|
|
5199
5223
|
] });
|
|
5200
|
-
}),
|
|
5224
|
+
}), La = (e) => {
|
|
5201
5225
|
const {
|
|
5202
5226
|
disabled: n = !1,
|
|
5203
5227
|
fullwidth: t = !1,
|
|
@@ -5207,8 +5231,8 @@ const Ia = (e) => {
|
|
|
5207
5231
|
maxItems: l = 5,
|
|
5208
5232
|
message: d,
|
|
5209
5233
|
name: s,
|
|
5210
|
-
onBlur:
|
|
5211
|
-
onChange:
|
|
5234
|
+
onBlur: p,
|
|
5235
|
+
onChange: c,
|
|
5212
5236
|
onClick: u,
|
|
5213
5237
|
onFocus: g,
|
|
5214
5238
|
onKeyUp: f,
|
|
@@ -5222,7 +5246,7 @@ const Ia = (e) => {
|
|
|
5222
5246
|
showChevron: E = !0,
|
|
5223
5247
|
editable: R = !1,
|
|
5224
5248
|
clearable: L = !0
|
|
5225
|
-
} = e, [$,
|
|
5249
|
+
} = e, [$, V] = z(!1), [oe, xe] = z(!1), [we, pe] = z([]), J = Ce(null);
|
|
5226
5250
|
ve(() => {
|
|
5227
5251
|
if (k) {
|
|
5228
5252
|
const F = D ? D.split(",").map((q) => q.trim()) : [];
|
|
@@ -5230,11 +5254,11 @@ const Ia = (e) => {
|
|
|
5230
5254
|
}
|
|
5231
5255
|
}, [D, k]);
|
|
5232
5256
|
function $e() {
|
|
5233
|
-
|
|
5257
|
+
c(s, ""), pe([]), V(!1);
|
|
5234
5258
|
}
|
|
5235
5259
|
function De(F) {
|
|
5236
5260
|
if (!n) {
|
|
5237
|
-
|
|
5261
|
+
V(!$);
|
|
5238
5262
|
try {
|
|
5239
5263
|
u && u(F);
|
|
5240
5264
|
} catch (q) {
|
|
@@ -5243,36 +5267,36 @@ const Ia = (e) => {
|
|
|
5243
5267
|
}
|
|
5244
5268
|
}
|
|
5245
5269
|
const ge = Ft((F) => {
|
|
5246
|
-
J.current && F.target && !J.current.contains(F.target) &&
|
|
5270
|
+
J.current && F.target && !J.current.contains(F.target) && V(!1);
|
|
5247
5271
|
}, []);
|
|
5248
5272
|
function fe(F) {
|
|
5249
5273
|
try {
|
|
5250
|
-
F.type === "focus" && (xe(!0), g && g(F)), F.type === "blur" && (xe(!1),
|
|
5274
|
+
F.type === "focus" && (xe(!0), g && g(F)), F.type === "blur" && (xe(!1), p && p(F));
|
|
5251
5275
|
} catch (q) {
|
|
5252
5276
|
console.error(`Error executing focus/blur callback. ${q}`);
|
|
5253
5277
|
}
|
|
5254
5278
|
}
|
|
5255
|
-
function
|
|
5256
|
-
|
|
5279
|
+
function Ie(F) {
|
|
5280
|
+
V(!1);
|
|
5257
5281
|
try {
|
|
5258
|
-
|
|
5282
|
+
c && c(s, F);
|
|
5259
5283
|
} catch (q) {
|
|
5260
5284
|
console.error(`Error when changing value using callback. ${q}`);
|
|
5261
5285
|
}
|
|
5262
5286
|
}
|
|
5263
5287
|
function ae(F) {
|
|
5264
|
-
F.key === "Escape" &&
|
|
5288
|
+
F.key === "Escape" && V(!1), V(!$);
|
|
5265
5289
|
try {
|
|
5266
5290
|
f && f(F);
|
|
5267
5291
|
} catch (q) {
|
|
5268
5292
|
console.error(`Error when clicking over select. ${q}`);
|
|
5269
5293
|
}
|
|
5270
5294
|
}
|
|
5271
|
-
function
|
|
5295
|
+
function Ae(F) {
|
|
5272
5296
|
const { value: q, checked: ze } = F.target;
|
|
5273
5297
|
pe((N) => {
|
|
5274
|
-
const
|
|
5275
|
-
return
|
|
5298
|
+
const H = ze ? [...N, q] : N.filter((K) => K !== q);
|
|
5299
|
+
return c(s, H.join(",")), H;
|
|
5276
5300
|
});
|
|
5277
5301
|
}
|
|
5278
5302
|
ve(() => (document.addEventListener("click", ge), () => {
|
|
@@ -5280,7 +5304,7 @@ const Ia = (e) => {
|
|
|
5280
5304
|
}), [ge]);
|
|
5281
5305
|
const P = Gn(() => L || k ? b : [{ id: "empty-option", label: "", value: "" }, ...b], [b, L, k]);
|
|
5282
5306
|
return /* @__PURE__ */ i(
|
|
5283
|
-
|
|
5307
|
+
Fa,
|
|
5284
5308
|
{
|
|
5285
5309
|
ref: J,
|
|
5286
5310
|
disabled: n,
|
|
@@ -5305,15 +5329,15 @@ const Ia = (e) => {
|
|
|
5305
5329
|
clearable: L,
|
|
5306
5330
|
handleClear: $e,
|
|
5307
5331
|
onBlur: fe,
|
|
5308
|
-
onChange:
|
|
5332
|
+
onChange: c,
|
|
5309
5333
|
onClick: De,
|
|
5310
5334
|
onFocus: fe,
|
|
5311
|
-
onOptionClick:
|
|
5335
|
+
onOptionClick: Ie,
|
|
5312
5336
|
onKeyUp: ae,
|
|
5313
|
-
onCheckboxChange:
|
|
5337
|
+
onCheckboxChange: Ae
|
|
5314
5338
|
}
|
|
5315
5339
|
);
|
|
5316
|
-
},
|
|
5340
|
+
}, Ti = (e) => {
|
|
5317
5341
|
const {
|
|
5318
5342
|
disabled: n = !1,
|
|
5319
5343
|
fullwidth: t = !1,
|
|
@@ -5323,15 +5347,15 @@ const Ia = (e) => {
|
|
|
5323
5347
|
maxItems: l = 5,
|
|
5324
5348
|
message: d,
|
|
5325
5349
|
name: s,
|
|
5326
|
-
onChange:
|
|
5327
|
-
options:
|
|
5350
|
+
onChange: p,
|
|
5351
|
+
options: c,
|
|
5328
5352
|
placeholder: u,
|
|
5329
5353
|
required: g = !1,
|
|
5330
5354
|
size: f = "wide",
|
|
5331
5355
|
values: b
|
|
5332
5356
|
} = e;
|
|
5333
5357
|
return /* @__PURE__ */ i(
|
|
5334
|
-
|
|
5358
|
+
La,
|
|
5335
5359
|
{
|
|
5336
5360
|
disabled: n,
|
|
5337
5361
|
fullwidth: t,
|
|
@@ -5341,8 +5365,8 @@ const Ia = (e) => {
|
|
|
5341
5365
|
maxItems: l,
|
|
5342
5366
|
message: d,
|
|
5343
5367
|
name: s,
|
|
5344
|
-
onChange:
|
|
5345
|
-
options:
|
|
5368
|
+
onChange: p,
|
|
5369
|
+
options: c,
|
|
5346
5370
|
placeholder: u,
|
|
5347
5371
|
required: g,
|
|
5348
5372
|
size: f,
|
|
@@ -5350,18 +5374,18 @@ const Ia = (e) => {
|
|
|
5350
5374
|
picker: !0
|
|
5351
5375
|
}
|
|
5352
5376
|
);
|
|
5353
|
-
},
|
|
5354
|
-
const { label: n, howToSet: t, isFirst: r = !1 } = e, o =
|
|
5377
|
+
}, Si = (e) => {
|
|
5378
|
+
const { label: n, howToSet: t, isFirst: r = !1 } = e, o = Ma(n), a = Oa(o), l = r ? "Que" : "Y que", d = a ? o : `${za(o)} ${o}`, s = Ba(t);
|
|
5355
5379
|
return `${l} ${d} ${s}`;
|
|
5356
|
-
},
|
|
5357
|
-
function Pa(e) {
|
|
5358
|
-
return La.test(e);
|
|
5359
|
-
}
|
|
5380
|
+
}, Pa = /^(el|la|los|las)\s/i;
|
|
5360
5381
|
function Oa(e) {
|
|
5361
|
-
return
|
|
5382
|
+
return Pa.test(e);
|
|
5362
5383
|
}
|
|
5363
5384
|
function Ma(e) {
|
|
5364
|
-
|
|
5385
|
+
return e.replace(/\s+/g, " ").trim();
|
|
5386
|
+
}
|
|
5387
|
+
function za(e) {
|
|
5388
|
+
const n = Va(e).toLowerCase(), t = /\b(s|es)\b/.test(Ha(e).toLowerCase()) && !n.endsWith("és");
|
|
5365
5389
|
return ({
|
|
5366
5390
|
mano: "f",
|
|
5367
5391
|
día: "m",
|
|
@@ -5373,50 +5397,50 @@ function Ma(e) {
|
|
|
5373
5397
|
antigüedad: "f",
|
|
5374
5398
|
antiguedad: "f",
|
|
5375
5399
|
puntaje: "m"
|
|
5376
|
-
}[n] ??
|
|
5400
|
+
}[n] ?? ja(n)) === "f" ? t ? "las" : "la" : t ? "los" : "el";
|
|
5377
5401
|
}
|
|
5378
|
-
function
|
|
5402
|
+
function Va(e) {
|
|
5379
5403
|
return (e.toLowerCase().split(
|
|
5380
5404
|
/\bdel\b|\bde la\b|\bde los\b|\bde las\b|\bde\b/
|
|
5381
5405
|
)[0].trim().split(/\s+/)[0] ?? "").normalize("NFD").replace(/^[^a-záéíóúüñ]+/i, "");
|
|
5382
5406
|
}
|
|
5383
|
-
function
|
|
5407
|
+
function Ha(e) {
|
|
5384
5408
|
const n = e.trim().split(/\s+/);
|
|
5385
5409
|
return n[n.length - 1] || "";
|
|
5386
5410
|
}
|
|
5387
|
-
function
|
|
5411
|
+
function ja(e) {
|
|
5388
5412
|
return /(?:dad|tad|tud|umbre|ción|sión|ie|sis|itis)$/.test(e) || e.endsWith("ez") || e.endsWith("eza") ? "f" : /(?:aje|or|án|ambre)$/.test(e) ? "m" : e.endsWith("a") ? "f" : "m";
|
|
5389
5413
|
}
|
|
5390
|
-
function
|
|
5414
|
+
function Ba(e) {
|
|
5391
5415
|
switch (e) {
|
|
5392
|
-
case
|
|
5393
|
-
case
|
|
5394
|
-
case
|
|
5416
|
+
case I.EQUAL:
|
|
5417
|
+
case I.GREATER_THAN:
|
|
5418
|
+
case I.LESS_THAN:
|
|
5395
5419
|
return "sea";
|
|
5396
|
-
case
|
|
5420
|
+
case I.RANGE:
|
|
5397
5421
|
return "esté entre";
|
|
5398
|
-
case
|
|
5399
|
-
case
|
|
5422
|
+
case I.LIST_OF_VALUES:
|
|
5423
|
+
case I.LIST_OF_VALUES_MULTI:
|
|
5400
5424
|
return "esté en";
|
|
5401
5425
|
default:
|
|
5402
5426
|
return "sea";
|
|
5403
5427
|
}
|
|
5404
5428
|
}
|
|
5405
|
-
const
|
|
5429
|
+
const Ei = (e) => Object.values(e).flat(), Ni = (e, n) => Object.fromEntries(
|
|
5406
5430
|
Object.entries(e).map(([t, r]) => [
|
|
5407
5431
|
t,
|
|
5408
5432
|
r.map((o, a, l) => n(o, a, l, t))
|
|
5409
5433
|
])
|
|
5410
|
-
), Fe = /* @__PURE__ */ new Map(),
|
|
5434
|
+
), Fe = /* @__PURE__ */ new Map(), Ua = (e, n) => Fe.get(`${n}:${e}`), _a = (e, n, t) => {
|
|
5411
5435
|
const r = `${n}:${e}`;
|
|
5412
5436
|
if (Fe.set(r, t), Fe.size > 1e3) {
|
|
5413
5437
|
const o = Fe.keys().next().value;
|
|
5414
5438
|
o !== void 0 && Fe.delete(o);
|
|
5415
5439
|
}
|
|
5416
|
-
}, Vn = /* @__PURE__ */ new Map(),
|
|
5440
|
+
}, Vn = /* @__PURE__ */ new Map(), qa = 1e3, Ga = (e) => {
|
|
5417
5441
|
const n = Date.now(), t = Vn.get(e) || 0;
|
|
5418
|
-
return n - t <
|
|
5419
|
-
},
|
|
5442
|
+
return n - t < qa ? !0 : (Vn.set(e, n), !1);
|
|
5443
|
+
}, Ya = (e) => {
|
|
5420
5444
|
const n = Ot(e);
|
|
5421
5445
|
return {
|
|
5422
5446
|
spa: "es",
|
|
@@ -5426,12 +5450,12 @@ const Si = (e) => Object.values(e).flat(), Ei = (e, n) => Object.fromEntries(
|
|
|
5426
5450
|
ita: "it",
|
|
5427
5451
|
por: "pt"
|
|
5428
5452
|
}[n] || "en";
|
|
5429
|
-
},
|
|
5430
|
-
const o = `${n}:${e}`, a =
|
|
5453
|
+
}, Xa = async (e, n, { url: t, apiKey: r }) => {
|
|
5454
|
+
const o = `${n}:${e}`, a = Ua(e, n);
|
|
5431
5455
|
if (a) return a;
|
|
5432
|
-
if (
|
|
5456
|
+
if (Ga(o))
|
|
5433
5457
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
5434
|
-
const l =
|
|
5458
|
+
const l = Ya(e);
|
|
5435
5459
|
try {
|
|
5436
5460
|
const { data: d } = await Pt.post(
|
|
5437
5461
|
t,
|
|
@@ -5447,15 +5471,15 @@ const Si = (e) => Object.values(e).flat(), Ei = (e, n) => Object.fromEntries(
|
|
|
5447
5471
|
}
|
|
5448
5472
|
}
|
|
5449
5473
|
), s = (d == null ? void 0 : d.translatedText) || e;
|
|
5450
|
-
return
|
|
5474
|
+
return _a(e, n, s), s;
|
|
5451
5475
|
} catch (d) {
|
|
5452
5476
|
return console.warn(`[Translation] Failed for: "${e}"`, d), e;
|
|
5453
5477
|
}
|
|
5454
|
-
},
|
|
5478
|
+
}, Wa = (e) => typeof e == "string" && e.trim().length > 0, Hn = async (e, n, t) => {
|
|
5455
5479
|
const r = await Promise.all(
|
|
5456
5480
|
Object.entries(e).map(async ([o, a]) => {
|
|
5457
|
-
if (
|
|
5458
|
-
const l = await
|
|
5481
|
+
if (Wa(a)) {
|
|
5482
|
+
const l = await Xa(a, n, t);
|
|
5459
5483
|
return [o, l];
|
|
5460
5484
|
} else if (Array.isArray(a)) {
|
|
5461
5485
|
const l = await Promise.all(
|
|
@@ -5474,37 +5498,37 @@ const Si = (e) => Object.values(e).flat(), Ei = (e, n) => Object.fromEntries(
|
|
|
5474
5498
|
return Object.fromEntries(r);
|
|
5475
5499
|
};
|
|
5476
5500
|
export {
|
|
5477
|
-
|
|
5501
|
+
Ci as BackAndNextButton,
|
|
5478
5502
|
yn as BusinessRuleCard,
|
|
5479
5503
|
Kn as BusinessRuleCardNew,
|
|
5480
5504
|
Wn as BusinessRuleView,
|
|
5481
5505
|
Jn as BusinessRuleViewNew,
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5506
|
+
di as BusinessRules,
|
|
5507
|
+
ci as BusinessRulesNew,
|
|
5508
|
+
Ti as Checkpicker,
|
|
5509
|
+
wi as DragAndDropBoxes,
|
|
5486
5510
|
Mn as DraggableList,
|
|
5487
5511
|
mo as DropdownMenu,
|
|
5488
|
-
|
|
5512
|
+
xi as DropdownMenuContainer,
|
|
5489
5513
|
et as EValueHowToSetUp,
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5514
|
+
ui as Filter,
|
|
5515
|
+
pi as FilterModal,
|
|
5516
|
+
gi as FormFilter,
|
|
5493
5517
|
Qn as ModalRules,
|
|
5494
5518
|
so as RulesForm,
|
|
5495
|
-
|
|
5496
|
-
|
|
5519
|
+
Di as SendButton,
|
|
5520
|
+
Si as buildEsConditionSentence,
|
|
5497
5521
|
Qr as convertRangeToString,
|
|
5498
5522
|
Zn as filterByGroup,
|
|
5499
|
-
|
|
5500
|
-
|
|
5523
|
+
Ei as flatFromGroups,
|
|
5524
|
+
fi as formatDecisionForBackend,
|
|
5501
5525
|
qe as getConditionsByGroup,
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5526
|
+
Ni as mapByGroup,
|
|
5527
|
+
hi as parseRangeFromString,
|
|
5528
|
+
mi as revertSortedDataSampleSwitchPlaces,
|
|
5529
|
+
bi as revertSortedDataSwitchPlaces,
|
|
5530
|
+
vi as sortDisplayDataSampleSwitchPlaces,
|
|
5531
|
+
yi as sortDisplayDataSwitchPlaces,
|
|
5508
5532
|
Hn as translateObject,
|
|
5509
|
-
|
|
5533
|
+
Xa as translateText
|
|
5510
5534
|
};
|