@isettingkit/business-rules 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.d.ts +16 -0
- package/dist/index.es.js +1126 -1041
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as i, jsxs as b, Fragment as
|
|
2
|
-
import { MdOutlineDelete as
|
|
3
|
-
import { inube as C, Stack as
|
|
4
|
-
import T, { keyframes as Dn, ThemeContext as
|
|
5
|
-
import { ValueDataType as
|
|
6
|
-
import { DecisionViewConditionRenderer as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import z, { useState as P, useEffect as
|
|
1
|
+
import { jsx as i, jsxs as b, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { MdOutlineDelete as mn, MdClear as qe, MdAdd as Ce, MdOutlineCreate as zn, MdExpandLess as Hn, MdExpandMore as ze, MdClose as _n, MdOutlineFilterAltOff as bn, MdOutlineFilterAlt as vn, MdChevronRight as en, MdArrowRight as Un, MdOutlineArrowCircleLeft as jn, MdOutlineArrowCircleRight as Bn } from "react-icons/md";
|
|
3
|
+
import { inube as C, Stack as x, Divider as q, Icon as O, Text as E, SkeletonLine as W, useMediaQuery as X, Blanket as Ye, Button as H, Grid as Ne, Box as qn, Tag as ce, SkeletonIcon as Yn, Toggle as Ee, Checkbox as xn, Date as xe, Fieldset as ve, Tabs as Xn, OptionList as Wn, Checkpicker as Gn } from "@inubekit/inubekit";
|
|
4
|
+
import T, { keyframes as Dn, ThemeContext as Zn } from "styled-components";
|
|
5
|
+
import { ValueDataType as U, ValueHowToSetUp as G, DecisionConditionRender as De } from "@isettingkit/input";
|
|
6
|
+
import { DecisionViewConditionRenderer as Pe, DecisionViewConditionRendererNew as fe } from "@isettingkit/view";
|
|
7
|
+
import { createPortal as Xe } from "react-dom";
|
|
8
|
+
import z, { useState as P, useEffect as te, useRef as ue, useContext as Qn } from "react";
|
|
9
9
|
import { useFormik as yn } from "formik";
|
|
10
|
-
import { string as le, mixed as ke, object as Z, number as ae, lazy as
|
|
11
|
-
import { Link as
|
|
12
|
-
import
|
|
13
|
-
import { franc as
|
|
14
|
-
const
|
|
10
|
+
import { string as le, mixed as ke, object as Z, number as ae, lazy as ye, date as Te } from "yup";
|
|
11
|
+
import { Link as Tn, useLocation as Kn } from "react-router-dom";
|
|
12
|
+
import Jn from "axios";
|
|
13
|
+
import { franc as et } from "franc-min";
|
|
14
|
+
const nt = T.div`
|
|
15
15
|
border-radius: 8px;
|
|
16
16
|
border: 1px solid
|
|
17
17
|
${({ theme: e }) => {
|
|
@@ -46,19 +46,19 @@ T.div`
|
|
|
46
46
|
border-radius: 8px;
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
|
-
const
|
|
49
|
+
const We = (e) => {
|
|
50
50
|
const { children: n, controls: t = !0, handleDelete: o, id: r } = e;
|
|
51
|
-
return /* @__PURE__ */ i(
|
|
51
|
+
return /* @__PURE__ */ i(nt, { children: /* @__PURE__ */ b(x, { direction: "column", gap: "16px", padding: "12px 16px", children: [
|
|
52
52
|
n,
|
|
53
|
-
t && /* @__PURE__ */ b(
|
|
53
|
+
t && /* @__PURE__ */ b(R, { children: [
|
|
54
54
|
/* @__PURE__ */ i(q, {}),
|
|
55
|
-
/* @__PURE__ */ i(
|
|
55
|
+
/* @__PURE__ */ i(x, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
|
|
56
56
|
O,
|
|
57
57
|
{
|
|
58
58
|
cursorHover: !0,
|
|
59
59
|
appearance: "danger",
|
|
60
60
|
size: "24px",
|
|
61
|
-
icon: /* @__PURE__ */ i(
|
|
61
|
+
icon: /* @__PURE__ */ i(mn, {}),
|
|
62
62
|
onClick: () => {
|
|
63
63
|
o(r);
|
|
64
64
|
}
|
|
@@ -66,22 +66,22 @@ const Xe = (e) => {
|
|
|
66
66
|
) })
|
|
67
67
|
] })
|
|
68
68
|
] }) });
|
|
69
|
-
},
|
|
69
|
+
}, tt = (e) => e.value, ot = (e) => e.value, rt = (e) => e.value, at = (e) => ({
|
|
70
70
|
from: e.from ?? "",
|
|
71
71
|
to: e.to ?? ""
|
|
72
|
-
}),
|
|
72
|
+
}), it = (e) => e.value, lt = (e) => e.value, dt = (e) => e.value;
|
|
73
73
|
var k = /* @__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))(k || {});
|
|
74
|
-
const
|
|
75
|
-
[k.LIST_OF_VALUES]:
|
|
76
|
-
[k.LIST_OF_VALUES_MULTI]:
|
|
77
|
-
[k.RANGE]:
|
|
78
|
-
[k.GREATER_THAN]:
|
|
79
|
-
[k.LESS_THAN]:
|
|
80
|
-
[k.EQUAL]:
|
|
74
|
+
const st = {
|
|
75
|
+
[k.LIST_OF_VALUES]: ot,
|
|
76
|
+
[k.LIST_OF_VALUES_MULTI]: rt,
|
|
77
|
+
[k.RANGE]: at,
|
|
78
|
+
[k.GREATER_THAN]: it,
|
|
79
|
+
[k.LESS_THAN]: lt,
|
|
80
|
+
[k.EQUAL]: dt
|
|
81
81
|
}, ge = (e) => {
|
|
82
|
-
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), o =
|
|
82
|
+
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), o = st[e == null ? void 0 : e.howToSetTheDecision] || tt;
|
|
83
83
|
return t && o(n) || n || void 0;
|
|
84
|
-
},
|
|
84
|
+
}, nn = T.div`
|
|
85
85
|
& > div {
|
|
86
86
|
border-radius: 8px;
|
|
87
87
|
border: 1px solid
|
|
@@ -90,7 +90,7 @@ const at = {
|
|
|
90
90
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || C.palette.neutral.N30;
|
|
91
91
|
}};
|
|
92
92
|
}
|
|
93
|
-
`,
|
|
93
|
+
`, tn = T.div`
|
|
94
94
|
width: 100%;
|
|
95
95
|
height: 100%;
|
|
96
96
|
overflow-y: auto;
|
|
@@ -108,7 +108,7 @@ const at = {
|
|
|
108
108
|
background-color: #ebecf0;
|
|
109
109
|
border-radius: 8px;
|
|
110
110
|
}
|
|
111
|
-
`,
|
|
111
|
+
`, ct = (e) => {
|
|
112
112
|
const {
|
|
113
113
|
conditionsAlignment: n,
|
|
114
114
|
decision: t,
|
|
@@ -116,13 +116,13 @@ const at = {
|
|
|
116
116
|
decisionMapper: r,
|
|
117
117
|
loading: a,
|
|
118
118
|
skeleton: s,
|
|
119
|
-
terms:
|
|
119
|
+
terms: c,
|
|
120
120
|
textValues: l,
|
|
121
121
|
visibleConditions: d
|
|
122
122
|
} = e;
|
|
123
|
-
return a ? /* @__PURE__ */ b(
|
|
124
|
-
/* @__PURE__ */ i(
|
|
125
|
-
|
|
123
|
+
return a ? /* @__PURE__ */ b(x, { direction: "column", gap: "12px", children: [
|
|
124
|
+
/* @__PURE__ */ i(x, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
|
|
125
|
+
Pe,
|
|
126
126
|
{
|
|
127
127
|
element: r,
|
|
128
128
|
valueData: ge(
|
|
@@ -132,8 +132,8 @@ const at = {
|
|
|
132
132
|
}
|
|
133
133
|
) }, t.ruleName),
|
|
134
134
|
/* @__PURE__ */ i(q, { dashed: !0 }),
|
|
135
|
-
/* @__PURE__ */ i(
|
|
136
|
-
|
|
135
|
+
/* @__PURE__ */ i(tn, { children: /* @__PURE__ */ b(
|
|
136
|
+
x,
|
|
137
137
|
{
|
|
138
138
|
direction: "column",
|
|
139
139
|
gap: "12px",
|
|
@@ -151,8 +151,8 @@ const at = {
|
|
|
151
151
|
children: l.factsThatConditionIt
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
d.length > 0 && d.map((g) => /* @__PURE__ */ i(
|
|
155
|
-
|
|
154
|
+
d.length > 0 && d.map((g) => /* @__PURE__ */ i(nn, { children: /* @__PURE__ */ i(x, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
155
|
+
Pe,
|
|
156
156
|
{
|
|
157
157
|
element: { ...g, value: g.value },
|
|
158
158
|
valueData: ge(
|
|
@@ -161,8 +161,8 @@ const at = {
|
|
|
161
161
|
}
|
|
162
162
|
) }) }, g.conditionName)),
|
|
163
163
|
d.length > 0 && /* @__PURE__ */ i(q, { dashed: !0 }),
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
c && /* @__PURE__ */ i(R, { children: o && /* @__PURE__ */ i(
|
|
165
|
+
Pe,
|
|
166
166
|
{
|
|
167
167
|
element: o.element,
|
|
168
168
|
valueData: o.valueData,
|
|
@@ -173,24 +173,24 @@ const at = {
|
|
|
173
173
|
]
|
|
174
174
|
}
|
|
175
175
|
) })
|
|
176
|
-
] }) : /* @__PURE__ */ b(
|
|
177
|
-
/* @__PURE__ */ b(
|
|
176
|
+
] }) : /* @__PURE__ */ b(x, { direction: "column", gap: "12px", children: [
|
|
177
|
+
/* @__PURE__ */ b(x, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
178
178
|
/* @__PURE__ */ i(W, { animated: !0, width: "180px" }),
|
|
179
179
|
/* @__PURE__ */ i(W, { animated: !0, width: "85px" })
|
|
180
180
|
] }, "loading"),
|
|
181
|
-
/* @__PURE__ */ b(
|
|
181
|
+
/* @__PURE__ */ b(x, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
182
182
|
/* @__PURE__ */ i(q, { dashed: !0 }),
|
|
183
183
|
/* @__PURE__ */ i(W, { animated: !0, width: "150px" })
|
|
184
184
|
] }),
|
|
185
|
-
/* @__PURE__ */ i(
|
|
186
|
-
|
|
185
|
+
/* @__PURE__ */ i(tn, { children: /* @__PURE__ */ i(
|
|
186
|
+
x,
|
|
187
187
|
{
|
|
188
188
|
direction: "column",
|
|
189
189
|
gap: "12px",
|
|
190
190
|
justifyContent: "space-between",
|
|
191
191
|
height: "203px",
|
|
192
|
-
children: s.map((g,
|
|
193
|
-
|
|
192
|
+
children: s.map((g, u) => /* @__PURE__ */ i(nn, { children: /* @__PURE__ */ b(
|
|
193
|
+
x,
|
|
194
194
|
{
|
|
195
195
|
direction: "column",
|
|
196
196
|
gap: "12px",
|
|
@@ -201,18 +201,18 @@ const at = {
|
|
|
201
201
|
/* @__PURE__ */ i(W, { animated: !0, width: "85px" })
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
|
-
) }, `condition-${
|
|
204
|
+
) }, `condition-${u}`))
|
|
205
205
|
}
|
|
206
206
|
) })
|
|
207
207
|
] });
|
|
208
|
-
},
|
|
208
|
+
}, wn = (e) => {
|
|
209
209
|
var p;
|
|
210
210
|
const { decision: n, loading: t = !1, textValues: o } = e, r = !!(n != null && n.effectiveFrom), a = !!(n != null && n.validUntil), s = r && a ? {
|
|
211
211
|
element: {
|
|
212
212
|
labelName: o == null ? void 0 : o.terms,
|
|
213
213
|
value: String(n.effectiveFrom),
|
|
214
214
|
howToSetTheDecision: G.RANGE,
|
|
215
|
-
decisionDataType:
|
|
215
|
+
decisionDataType: U.DATE
|
|
216
216
|
},
|
|
217
217
|
valueData: ge({
|
|
218
218
|
labelName: o == null ? void 0 : o.terms,
|
|
@@ -221,36 +221,36 @@ const at = {
|
|
|
221
221
|
to: String(n.validUntil)
|
|
222
222
|
},
|
|
223
223
|
howToSetTheDecision: G.RANGE,
|
|
224
|
-
decisionDataType:
|
|
224
|
+
decisionDataType: U.DATE
|
|
225
225
|
})
|
|
226
226
|
} : r && !a ? {
|
|
227
227
|
element: {
|
|
228
228
|
labelName: o == null ? void 0 : o.terms,
|
|
229
229
|
value: String(n.effectiveFrom),
|
|
230
230
|
howToSetTheDecision: G.EQUAL,
|
|
231
|
-
decisionDataType:
|
|
231
|
+
decisionDataType: U.DATE
|
|
232
232
|
},
|
|
233
233
|
valueData: ge({
|
|
234
234
|
labelName: o == null ? void 0 : o.terms,
|
|
235
235
|
value: String(n.effectiveFrom),
|
|
236
236
|
howToSetTheDecision: G.EQUAL,
|
|
237
|
-
decisionDataType:
|
|
237
|
+
decisionDataType: U.DATE
|
|
238
238
|
})
|
|
239
|
-
} : null,
|
|
239
|
+
} : null, c = n ? {
|
|
240
240
|
labelName: n.labelName || "",
|
|
241
241
|
decisionDataType: n.decisionDataType || "alphabetical",
|
|
242
242
|
value: ge(n),
|
|
243
243
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
244
244
|
} : null, l = ((p = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : p.filter(
|
|
245
245
|
(f) => !f.hidden
|
|
246
|
-
)) || [], d = Array.from({ length: 5 }), g = !!(!t && n && o &&
|
|
246
|
+
)) || [], d = Array.from({ length: 5 }), g = !!(!t && n && o && c), u = l.length < 2 ? "start" : "space-between";
|
|
247
247
|
return /* @__PURE__ */ i(
|
|
248
|
-
|
|
248
|
+
ct,
|
|
249
249
|
{
|
|
250
|
-
conditionsAlignment:
|
|
250
|
+
conditionsAlignment: u,
|
|
251
251
|
decision: n,
|
|
252
252
|
decisionDateElement: s,
|
|
253
|
-
decisionMapper:
|
|
253
|
+
decisionMapper: c,
|
|
254
254
|
loading: g,
|
|
255
255
|
skeleton: d,
|
|
256
256
|
terms: !!(o != null && o.terms),
|
|
@@ -258,12 +258,12 @@ const at = {
|
|
|
258
258
|
visibleConditions: l
|
|
259
259
|
}
|
|
260
260
|
);
|
|
261
|
-
},
|
|
261
|
+
}, ut = T.div`
|
|
262
262
|
position: relative;
|
|
263
263
|
& > div {
|
|
264
264
|
padding: 24px 16px;
|
|
265
265
|
}
|
|
266
|
-
`,
|
|
266
|
+
`, gt = T.div`
|
|
267
267
|
background-color: ${({ theme: e }) => {
|
|
268
268
|
var n, t;
|
|
269
269
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || C.palette.neutral.N0;
|
|
@@ -294,16 +294,16 @@ const at = {
|
|
|
294
294
|
background-color: #ebecf0;
|
|
295
295
|
border-radius: 8px;
|
|
296
296
|
}
|
|
297
|
-
`,
|
|
297
|
+
`, pt = (e) => {
|
|
298
298
|
const { children: n, portalId: t, onCloseModal: o, title: r } = e, a = document.getElementById(t);
|
|
299
299
|
if (!a)
|
|
300
300
|
throw new Error(
|
|
301
301
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
302
302
|
);
|
|
303
303
|
const s = X("(max-width: 400px)");
|
|
304
|
-
return
|
|
305
|
-
/* @__PURE__ */ i(
|
|
306
|
-
/* @__PURE__ */ i(
|
|
304
|
+
return Xe(
|
|
305
|
+
/* @__PURE__ */ i(ut, { smallScreen: s, children: /* @__PURE__ */ i(Ye, { children: /* @__PURE__ */ i(gt, { children: /* @__PURE__ */ b(x, { direction: "column", gap: "24px", children: [
|
|
306
|
+
/* @__PURE__ */ i(x, { direction: "column", gap: "24px", children: /* @__PURE__ */ b(x, { alignItems: "center", justifyContent: "space-between", children: [
|
|
307
307
|
/* @__PURE__ */ i(E, { type: "title", size: "large", appearance: "dark", weight: "bold", children: r }),
|
|
308
308
|
/* @__PURE__ */ i(qe, { size: "24px", cursor: "pointer", onClick: o })
|
|
309
309
|
] }) }),
|
|
@@ -311,7 +311,7 @@ const at = {
|
|
|
311
311
|
] }) }) }) }),
|
|
312
312
|
a
|
|
313
313
|
);
|
|
314
|
-
},
|
|
314
|
+
}, ht = Dn`
|
|
315
315
|
from {
|
|
316
316
|
opacity: 0;
|
|
317
317
|
transform: translateY(20px);
|
|
@@ -345,7 +345,7 @@ T.div`
|
|
|
345
345
|
}};
|
|
346
346
|
}
|
|
347
347
|
`;
|
|
348
|
-
const
|
|
348
|
+
const ft = T.div`
|
|
349
349
|
& > div {
|
|
350
350
|
background-color: ${({ theme: e }) => {
|
|
351
351
|
var n, t;
|
|
@@ -358,18 +358,18 @@ const ut = T.div`
|
|
|
358
358
|
height: 100%;
|
|
359
359
|
padding-bottom: 12px;
|
|
360
360
|
cursor: pointer;
|
|
361
|
-
`,
|
|
361
|
+
`, Ge = T.div`
|
|
362
362
|
width: 100%;
|
|
363
363
|
height: 100%;
|
|
364
364
|
& > div {
|
|
365
|
-
animation: ${
|
|
365
|
+
animation: ${ht} 600ms ease-out;
|
|
366
366
|
}
|
|
367
|
-
`,
|
|
367
|
+
`, mt = T.div`
|
|
368
368
|
& > div > div {
|
|
369
369
|
border-radius: 8px;
|
|
370
370
|
box-sizing: border-box;
|
|
371
371
|
}
|
|
372
|
-
`,
|
|
372
|
+
`, bt = T.div`
|
|
373
373
|
& > div {
|
|
374
374
|
width: 100%;
|
|
375
375
|
height: 100%;
|
|
@@ -389,57 +389,57 @@ const ut = T.div`
|
|
|
389
389
|
border-radius: 8px;
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
`,
|
|
392
|
+
`, vt = (e) => {
|
|
393
393
|
const { index: n, handleOpenModal: t } = e;
|
|
394
394
|
return /* @__PURE__ */ i(
|
|
395
|
-
|
|
395
|
+
We,
|
|
396
396
|
{
|
|
397
397
|
id: `loading-card-${n}`,
|
|
398
398
|
handleDelete: () => {
|
|
399
399
|
},
|
|
400
400
|
handleView: () => t ? t() : null,
|
|
401
401
|
controls: !1,
|
|
402
|
-
children: /* @__PURE__ */ i(
|
|
402
|
+
children: /* @__PURE__ */ i(wn, { loading: !0 })
|
|
403
403
|
},
|
|
404
404
|
`loading-card-${n}`
|
|
405
405
|
);
|
|
406
|
-
},
|
|
406
|
+
}, xt = (e) => {
|
|
407
407
|
const { decision: n, controls: t, handleOpenModal: o, handleDelete: r, textValues: a } = e;
|
|
408
|
-
return n ? /* @__PURE__ */ i(
|
|
408
|
+
return n ? /* @__PURE__ */ i(Ge, { children: /* @__PURE__ */ b(x, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
409
409
|
/* @__PURE__ */ i(E, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
410
410
|
/* @__PURE__ */ i(
|
|
411
|
-
|
|
411
|
+
We,
|
|
412
412
|
{
|
|
413
413
|
id: n.decisionId,
|
|
414
414
|
handleDelete: () => r ? r(n.decisionId) : null,
|
|
415
415
|
handleView: () => o ? o(n) : null,
|
|
416
416
|
controls: t,
|
|
417
|
-
children: /* @__PURE__ */ i(
|
|
417
|
+
children: /* @__PURE__ */ i(wn, { decision: n, textValues: a })
|
|
418
418
|
}
|
|
419
419
|
)
|
|
420
420
|
] }) }, n.decisionId) : null;
|
|
421
|
-
},
|
|
421
|
+
}, Dt = (e) => {
|
|
422
422
|
const {
|
|
423
423
|
customTitleContentAddCard: n,
|
|
424
424
|
index: t,
|
|
425
425
|
handleOpenModal: o,
|
|
426
426
|
shouldRenderEmptyMessage: r
|
|
427
427
|
} = e, a = n || "Agregar decisión";
|
|
428
|
-
return /* @__PURE__ */ i(
|
|
428
|
+
return /* @__PURE__ */ i(Ge, { children: r ? null : /* @__PURE__ */ b(x, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
429
429
|
/* @__PURE__ */ i(E, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
430
430
|
/* @__PURE__ */ i(
|
|
431
|
-
|
|
431
|
+
ft,
|
|
432
432
|
{
|
|
433
433
|
onClick: () => o ? o() : null,
|
|
434
434
|
children: /* @__PURE__ */ i(
|
|
435
|
-
|
|
435
|
+
We,
|
|
436
436
|
{
|
|
437
437
|
id: `add-decision-${t}`,
|
|
438
438
|
handleDelete: () => {
|
|
439
439
|
},
|
|
440
440
|
handleView: () => o ? o() : null,
|
|
441
441
|
controls: !1,
|
|
442
|
-
children: /* @__PURE__ */ b(
|
|
442
|
+
children: /* @__PURE__ */ b(x, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
443
443
|
/* @__PURE__ */ i(O, { appearance: "gray", icon: /* @__PURE__ */ i(Ce, {}), size: "35px" }),
|
|
444
444
|
/* @__PURE__ */ i(E, { appearance: "gray", type: "body", size: "large", children: a })
|
|
445
445
|
] })
|
|
@@ -448,14 +448,14 @@ const ut = T.div`
|
|
|
448
448
|
}
|
|
449
449
|
)
|
|
450
450
|
] }) }, `add-decision-${t}`);
|
|
451
|
-
},
|
|
452
|
-
loading:
|
|
453
|
-
decision:
|
|
454
|
-
add:
|
|
455
|
-
},
|
|
456
|
-
const { type: n } = e, t =
|
|
451
|
+
}, yt = {
|
|
452
|
+
loading: vt,
|
|
453
|
+
decision: xt,
|
|
454
|
+
add: Dt
|
|
455
|
+
}, He = (e) => {
|
|
456
|
+
const { type: n } = e, t = yt[n];
|
|
457
457
|
return t ? t(e) : null;
|
|
458
|
-
},
|
|
458
|
+
}, Tt = (e) => {
|
|
459
459
|
const {
|
|
460
460
|
controls: n,
|
|
461
461
|
customTitleContentAddCard: t,
|
|
@@ -463,20 +463,20 @@ const ut = T.div`
|
|
|
463
463
|
loading: r,
|
|
464
464
|
handleOpenModal: a,
|
|
465
465
|
handleDelete: s,
|
|
466
|
-
textValues:
|
|
466
|
+
textValues: c
|
|
467
467
|
} = e, l = r ? Array.from({ length: 3 }).map(
|
|
468
|
-
(g,
|
|
468
|
+
(g, u) => He({
|
|
469
469
|
type: "loading",
|
|
470
|
-
index:
|
|
470
|
+
index: u,
|
|
471
471
|
controls: n,
|
|
472
472
|
customTitleContentAddCard: t,
|
|
473
473
|
loading: r,
|
|
474
474
|
handleOpenModal: a,
|
|
475
475
|
handleDelete: s,
|
|
476
|
-
textValues:
|
|
476
|
+
textValues: c
|
|
477
477
|
})
|
|
478
478
|
) : o == null ? void 0 : o.map(
|
|
479
|
-
(g) =>
|
|
479
|
+
(g) => He({
|
|
480
480
|
type: "decision",
|
|
481
481
|
decision: g,
|
|
482
482
|
controls: n,
|
|
@@ -484,11 +484,11 @@ const ut = T.div`
|
|
|
484
484
|
loading: r,
|
|
485
485
|
handleOpenModal: a,
|
|
486
486
|
handleDelete: s,
|
|
487
|
-
textValues:
|
|
487
|
+
textValues: c
|
|
488
488
|
})
|
|
489
489
|
), d = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !r && n;
|
|
490
490
|
return { renderedCards: l, shouldRenderAddCard: d };
|
|
491
|
-
},
|
|
491
|
+
}, da = (e) => {
|
|
492
492
|
const {
|
|
493
493
|
controls: n = !0,
|
|
494
494
|
customTitleContentAddCard: t,
|
|
@@ -496,15 +496,15 @@ const ut = T.div`
|
|
|
496
496
|
decisions: r,
|
|
497
497
|
textValues: a,
|
|
498
498
|
decisionTemplate: s,
|
|
499
|
-
isModalOpen:
|
|
499
|
+
isModalOpen: c,
|
|
500
500
|
selectedDecision: l,
|
|
501
501
|
loading: d,
|
|
502
502
|
handleOpenModal: g,
|
|
503
|
-
handleCloseModal:
|
|
503
|
+
handleCloseModal: u,
|
|
504
504
|
handleSubmitForm: p,
|
|
505
505
|
handleDelete: f,
|
|
506
506
|
terms: m = !0
|
|
507
|
-
} = e,
|
|
507
|
+
} = e, v = X("(max-width: 681px)"), D = X("(max-width: 400px)"), { renderedCards: y, shouldRenderAddCard: w } = Tt({
|
|
508
508
|
controls: n,
|
|
509
509
|
customTitleContentAddCard: t,
|
|
510
510
|
decisions: r,
|
|
@@ -513,18 +513,18 @@ const ut = T.div`
|
|
|
513
513
|
handleDelete: f,
|
|
514
514
|
textValues: a
|
|
515
515
|
}), N = (r == null ? void 0 : r.length) === 0 && !d;
|
|
516
|
-
return /* @__PURE__ */ b(
|
|
517
|
-
/* @__PURE__ */ i(
|
|
518
|
-
|
|
516
|
+
return /* @__PURE__ */ b(R, { children: [
|
|
517
|
+
/* @__PURE__ */ i(mt, { children: /* @__PURE__ */ i(bt, { children: /* @__PURE__ */ i(x, { direction: "column", gap: "16px", padding: "6px", children: N ? /* @__PURE__ */ b(
|
|
518
|
+
x,
|
|
519
519
|
{
|
|
520
520
|
direction: "column",
|
|
521
521
|
gap: "28px",
|
|
522
522
|
width: "100%",
|
|
523
|
-
height:
|
|
523
|
+
height: v ? "auto" : "435px",
|
|
524
524
|
justifyContent: "center",
|
|
525
525
|
alignItems: "center",
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ i(E, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ b(
|
|
527
|
+
/* @__PURE__ */ i(E, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ b(R, { children: [
|
|
528
528
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
529
529
|
/* @__PURE__ */ b(
|
|
530
530
|
E,
|
|
@@ -544,7 +544,7 @@ const ut = T.div`
|
|
|
544
544
|
"para empezar."
|
|
545
545
|
] }) }),
|
|
546
546
|
/* @__PURE__ */ i(
|
|
547
|
-
|
|
547
|
+
H,
|
|
548
548
|
{
|
|
549
549
|
iconBefore: /* @__PURE__ */ i(Ce, {}),
|
|
550
550
|
onClick: () => g ? g() : null,
|
|
@@ -556,7 +556,7 @@ const ut = T.div`
|
|
|
556
556
|
) : /* @__PURE__ */ b(
|
|
557
557
|
Ne,
|
|
558
558
|
{
|
|
559
|
-
templateColumns:
|
|
559
|
+
templateColumns: D ? "repeat(auto-fill, minmax(200px, 1fr))" : "repeat(auto-fill, minmax(300px, 1fr))",
|
|
560
560
|
autoFlow: "row dense",
|
|
561
561
|
gap: "24px",
|
|
562
562
|
alignItems: "start",
|
|
@@ -564,10 +564,10 @@ const ut = T.div`
|
|
|
564
564
|
autoRows: "1fr",
|
|
565
565
|
justifyItems: "center",
|
|
566
566
|
padding: "6px",
|
|
567
|
-
height:
|
|
567
|
+
height: v ? "auto" : "484px",
|
|
568
568
|
children: [
|
|
569
|
-
|
|
570
|
-
w &&
|
|
569
|
+
y,
|
|
570
|
+
w && He({
|
|
571
571
|
type: "add",
|
|
572
572
|
index: r == null ? void 0 : r.length,
|
|
573
573
|
controls: n,
|
|
@@ -583,42 +583,42 @@ const ut = T.div`
|
|
|
583
583
|
]
|
|
584
584
|
}
|
|
585
585
|
) }) }) }),
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
c && /* @__PURE__ */ i(
|
|
587
|
+
pt,
|
|
588
588
|
{
|
|
589
589
|
portalId: "modal-portal",
|
|
590
|
-
onCloseModal:
|
|
590
|
+
onCloseModal: u,
|
|
591
591
|
title: l ? "Editar Decisión" : "Nueva decisión",
|
|
592
592
|
children: /* @__PURE__ */ i(
|
|
593
|
-
|
|
593
|
+
ko,
|
|
594
594
|
{
|
|
595
595
|
decision: l || s,
|
|
596
596
|
onSubmitEvent: p,
|
|
597
597
|
textValues: a,
|
|
598
|
-
onCancel: () =>
|
|
598
|
+
onCancel: () => u ? u() : () => {
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
)
|
|
602
602
|
}
|
|
603
603
|
)
|
|
604
604
|
] });
|
|
605
|
-
},
|
|
605
|
+
}, Sn = (e) => {
|
|
606
606
|
const { children: n } = e;
|
|
607
|
-
return /* @__PURE__ */ i(
|
|
608
|
-
},
|
|
607
|
+
return /* @__PURE__ */ i(qn, { width: "100%", children: n });
|
|
608
|
+
}, wt = (e) => e.value, St = (e) => e.value, Ct = (e) => e.value, Nt = (e) => ({
|
|
609
609
|
from: e.from ?? "",
|
|
610
610
|
to: e.to ?? ""
|
|
611
|
-
}),
|
|
612
|
-
[k.LIST_OF_VALUES]:
|
|
613
|
-
[k.LIST_OF_VALUES_MULTI]:
|
|
614
|
-
[k.RANGE]:
|
|
615
|
-
[k.GREATER_THAN]:
|
|
616
|
-
[k.LESS_THAN]:
|
|
617
|
-
[k.EQUAL]:
|
|
611
|
+
}), Et = (e) => e.value, kt = (e) => e.value, At = (e) => e.value, It = {
|
|
612
|
+
[k.LIST_OF_VALUES]: St,
|
|
613
|
+
[k.LIST_OF_VALUES_MULTI]: Ct,
|
|
614
|
+
[k.RANGE]: Nt,
|
|
615
|
+
[k.GREATER_THAN]: Et,
|
|
616
|
+
[k.LESS_THAN]: kt,
|
|
617
|
+
[k.EQUAL]: At
|
|
618
618
|
}, pe = (e) => {
|
|
619
|
-
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), o =
|
|
619
|
+
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), o = It[e == null ? void 0 : e.howToSetTheDecision] || wt;
|
|
620
620
|
return t && o(n) || n || void 0;
|
|
621
|
-
},
|
|
621
|
+
}, $t = T.div`
|
|
622
622
|
display: flex;
|
|
623
623
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
624
624
|
align-items: ${({ $alignItems: e }) => e};
|
|
@@ -641,7 +641,7 @@ const ut = 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
|
-
`,
|
|
644
|
+
`, j = z.forwardRef(
|
|
645
645
|
(e, n) => {
|
|
646
646
|
const {
|
|
647
647
|
children: t,
|
|
@@ -649,43 +649,43 @@ const ut = T.div`
|
|
|
649
649
|
direction: r = "column",
|
|
650
650
|
justifyContent: a,
|
|
651
651
|
alignItems: s,
|
|
652
|
-
alignContent:
|
|
652
|
+
alignContent: c,
|
|
653
653
|
height: l,
|
|
654
654
|
width: d,
|
|
655
655
|
gap: g,
|
|
656
|
-
background:
|
|
656
|
+
background: u,
|
|
657
657
|
borderRadius: p,
|
|
658
658
|
border: f,
|
|
659
659
|
margin: m = "0px",
|
|
660
|
-
padding:
|
|
661
|
-
boxSizing:
|
|
662
|
-
scroll:
|
|
660
|
+
padding: v = "0px",
|
|
661
|
+
boxSizing: D,
|
|
662
|
+
scroll: y = !1
|
|
663
663
|
} = e;
|
|
664
664
|
return /* @__PURE__ */ i(
|
|
665
|
-
|
|
665
|
+
$t,
|
|
666
666
|
{
|
|
667
667
|
ref: n,
|
|
668
668
|
direction: r,
|
|
669
669
|
$justifyContent: a,
|
|
670
670
|
$alignItems: s,
|
|
671
|
-
$alignContent:
|
|
671
|
+
$alignContent: c,
|
|
672
672
|
height: l,
|
|
673
673
|
width: d,
|
|
674
674
|
wrap: o,
|
|
675
675
|
$gap: g,
|
|
676
|
-
$background:
|
|
676
|
+
$background: u,
|
|
677
677
|
$border: f,
|
|
678
678
|
$margin: m,
|
|
679
|
-
$padding:
|
|
679
|
+
$padding: v,
|
|
680
680
|
$borderRadius: p,
|
|
681
|
-
$boxSizing:
|
|
682
|
-
$scroll:
|
|
681
|
+
$boxSizing: D,
|
|
682
|
+
$scroll: y,
|
|
683
683
|
children: t
|
|
684
684
|
}
|
|
685
685
|
);
|
|
686
686
|
}
|
|
687
687
|
);
|
|
688
|
-
|
|
688
|
+
j.displayName = "BorderStack";
|
|
689
689
|
T.div`
|
|
690
690
|
& > div {
|
|
691
691
|
border-radius: 8px;
|
|
@@ -715,9 +715,9 @@ T.div`
|
|
|
715
715
|
border-radius: 8px;
|
|
716
716
|
}
|
|
717
717
|
`;
|
|
718
|
-
const
|
|
718
|
+
const Ft = T.div`
|
|
719
719
|
cursor: pointer;
|
|
720
|
-
`,
|
|
720
|
+
`, Pt = (e) => {
|
|
721
721
|
const {
|
|
722
722
|
conditionsAlignment: n,
|
|
723
723
|
decision: t,
|
|
@@ -725,23 +725,23 @@ const kt = T.div`
|
|
|
725
725
|
loading: r,
|
|
726
726
|
textValues: a,
|
|
727
727
|
visibleConditions: s,
|
|
728
|
-
tagLabel:
|
|
728
|
+
tagLabel: c,
|
|
729
729
|
isOpen: l,
|
|
730
730
|
onToggle: d,
|
|
731
731
|
hasEffectiveFrom: g,
|
|
732
|
-
hasValidUntil:
|
|
732
|
+
hasValidUntil: u,
|
|
733
733
|
effectiveFromRenderer: p,
|
|
734
734
|
validUntilRenderer: f
|
|
735
735
|
} = e;
|
|
736
|
-
return r ? /* @__PURE__ */ b(
|
|
737
|
-
/* @__PURE__ */ i(
|
|
738
|
-
|
|
736
|
+
return r ? /* @__PURE__ */ b(x, { direction: "column", gap: "16px", children: [
|
|
737
|
+
/* @__PURE__ */ i(Ft, { onClick: d, children: /* @__PURE__ */ b(
|
|
738
|
+
x,
|
|
739
739
|
{
|
|
740
740
|
alignItems: "start",
|
|
741
741
|
justifyContent: "space-between",
|
|
742
742
|
children: [
|
|
743
|
-
/* @__PURE__ */ b(
|
|
744
|
-
/* @__PURE__ */ i(ce, { appearance: "gray", label:
|
|
743
|
+
/* @__PURE__ */ b(x, { gap: "12px", children: [
|
|
744
|
+
/* @__PURE__ */ i(ce, { appearance: "gray", label: c, displayIcon: !1 }),
|
|
745
745
|
/* @__PURE__ */ i(
|
|
746
746
|
fe,
|
|
747
747
|
{
|
|
@@ -753,12 +753,12 @@ const kt = T.div`
|
|
|
753
753
|
}
|
|
754
754
|
)
|
|
755
755
|
] }),
|
|
756
|
-
/* @__PURE__ */ b(
|
|
756
|
+
/* @__PURE__ */ b(x, { gap: "12px", children: [
|
|
757
757
|
/* @__PURE__ */ i(
|
|
758
758
|
O,
|
|
759
759
|
{
|
|
760
760
|
appearance: "primary",
|
|
761
|
-
icon: /* @__PURE__ */ i(
|
|
761
|
+
icon: /* @__PURE__ */ i(zn, {}),
|
|
762
762
|
size: "24px",
|
|
763
763
|
cursorHover: !0
|
|
764
764
|
}
|
|
@@ -767,7 +767,7 @@ const kt = T.div`
|
|
|
767
767
|
O,
|
|
768
768
|
{
|
|
769
769
|
appearance: "danger",
|
|
770
|
-
icon: /* @__PURE__ */ i(
|
|
770
|
+
icon: /* @__PURE__ */ i(mn, {}),
|
|
771
771
|
size: "24px",
|
|
772
772
|
cursorHover: !0
|
|
773
773
|
}
|
|
@@ -776,7 +776,7 @@ const kt = T.div`
|
|
|
776
776
|
O,
|
|
777
777
|
{
|
|
778
778
|
appearance: "dark",
|
|
779
|
-
icon: l ? /* @__PURE__ */ i(
|
|
779
|
+
icon: l ? /* @__PURE__ */ i(Hn, {}) : /* @__PURE__ */ i(ze, {}),
|
|
780
780
|
size: "24px",
|
|
781
781
|
cursorHover: !0
|
|
782
782
|
}
|
|
@@ -786,9 +786,9 @@ const kt = T.div`
|
|
|
786
786
|
},
|
|
787
787
|
t.ruleName
|
|
788
788
|
) }),
|
|
789
|
-
l && /* @__PURE__ */ b(
|
|
789
|
+
l && /* @__PURE__ */ b(R, { children: [
|
|
790
790
|
/* @__PURE__ */ i(q, { dashed: !0 }),
|
|
791
|
-
/* @__PURE__ */ b(
|
|
791
|
+
/* @__PURE__ */ b(x, { direction: "column", gap: "12px", children: [
|
|
792
792
|
/* @__PURE__ */ i(
|
|
793
793
|
E,
|
|
794
794
|
{
|
|
@@ -802,14 +802,14 @@ const kt = T.div`
|
|
|
802
802
|
}
|
|
803
803
|
),
|
|
804
804
|
/* @__PURE__ */ b(
|
|
805
|
-
|
|
805
|
+
x,
|
|
806
806
|
{
|
|
807
807
|
direction: "column",
|
|
808
808
|
gap: "8px",
|
|
809
809
|
justifyContent: n,
|
|
810
810
|
children: [
|
|
811
811
|
s.map((m) => /* @__PURE__ */ i(
|
|
812
|
-
|
|
812
|
+
j,
|
|
813
813
|
{
|
|
814
814
|
direction: "column",
|
|
815
815
|
padding: "6px 12px",
|
|
@@ -828,7 +828,7 @@ const kt = T.div`
|
|
|
828
828
|
m.conditionName
|
|
829
829
|
)),
|
|
830
830
|
g && p && /* @__PURE__ */ i(
|
|
831
|
-
|
|
831
|
+
j,
|
|
832
832
|
{
|
|
833
833
|
direction: "column",
|
|
834
834
|
padding: "6px 12px",
|
|
@@ -844,8 +844,8 @@ const kt = T.div`
|
|
|
844
844
|
)
|
|
845
845
|
}
|
|
846
846
|
),
|
|
847
|
-
|
|
848
|
-
|
|
847
|
+
u && f && /* @__PURE__ */ i(
|
|
848
|
+
j,
|
|
849
849
|
{
|
|
850
850
|
direction: "column",
|
|
851
851
|
padding: "6px 12px",
|
|
@@ -866,18 +866,18 @@ const kt = T.div`
|
|
|
866
866
|
)
|
|
867
867
|
] })
|
|
868
868
|
] })
|
|
869
|
-
] }) : /* @__PURE__ */ b(
|
|
870
|
-
/* @__PURE__ */ b(
|
|
869
|
+
] }) : /* @__PURE__ */ b(x, { justifyContent: "space-between", children: [
|
|
870
|
+
/* @__PURE__ */ b(x, { alignItems: "center", gap: "8px", children: [
|
|
871
871
|
/* @__PURE__ */ i(W, { animated: !0, width: "150px" }),
|
|
872
872
|
/* @__PURE__ */ i(W, { animated: !0, width: "70px" })
|
|
873
873
|
] }),
|
|
874
|
-
/* @__PURE__ */ b(
|
|
874
|
+
/* @__PURE__ */ b(x, { alignItems: "center", gap: "8px", children: [
|
|
875
875
|
/* @__PURE__ */ i(W, { animated: !0, width: "50px" }),
|
|
876
|
-
/* @__PURE__ */ i(
|
|
876
|
+
/* @__PURE__ */ i(Yn, { animated: !0 })
|
|
877
877
|
] })
|
|
878
878
|
] });
|
|
879
|
-
},
|
|
880
|
-
var
|
|
879
|
+
}, Cn = (e) => {
|
|
880
|
+
var y;
|
|
881
881
|
const {
|
|
882
882
|
decision: n,
|
|
883
883
|
loading: t = !1,
|
|
@@ -885,60 +885,60 @@ const kt = T.div`
|
|
|
885
885
|
position: r,
|
|
886
886
|
isOpen: a = !1,
|
|
887
887
|
onToggle: s
|
|
888
|
-
} = e,
|
|
888
|
+
} = e, c = !!(n != null && n.effectiveFrom), l = !!(n != null && n.validUntil), d = c ? {
|
|
889
889
|
element: {
|
|
890
890
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
891
891
|
value: String(n.effectiveFrom),
|
|
892
892
|
howToSetTheDecision: G.EQUAL,
|
|
893
|
-
decisionDataType:
|
|
893
|
+
decisionDataType: U.DATE
|
|
894
894
|
},
|
|
895
895
|
valueData: pe({
|
|
896
896
|
labelName: o == null ? void 0 : o.effectiveFrom,
|
|
897
897
|
value: String(n.effectiveFrom),
|
|
898
898
|
howToSetTheDecision: G.EQUAL,
|
|
899
|
-
decisionDataType:
|
|
899
|
+
decisionDataType: U.DATE
|
|
900
900
|
})
|
|
901
901
|
} : null, g = l ? {
|
|
902
902
|
element: {
|
|
903
903
|
labelName: o == null ? void 0 : o.validUntil,
|
|
904
904
|
value: String(n.validUntil),
|
|
905
905
|
howToSetTheDecision: G.EQUAL,
|
|
906
|
-
decisionDataType:
|
|
906
|
+
decisionDataType: U.DATE
|
|
907
907
|
},
|
|
908
908
|
valueData: pe({
|
|
909
909
|
labelName: o == null ? void 0 : o.validUntil,
|
|
910
910
|
value: String(n.validUntil),
|
|
911
911
|
howToSetTheDecision: G.EQUAL,
|
|
912
|
-
decisionDataType:
|
|
912
|
+
decisionDataType: U.DATE
|
|
913
913
|
})
|
|
914
|
-
} : null,
|
|
914
|
+
} : null, u = n ? {
|
|
915
915
|
labelName: n.labelName || "",
|
|
916
916
|
decisionDataType: n.decisionDataType || "alphabetical",
|
|
917
917
|
value: pe(n),
|
|
918
918
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
919
|
-
} : null, p = ((
|
|
919
|
+
} : null, p = ((y = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : y.filter(
|
|
920
920
|
(w) => !w.hidden
|
|
921
|
-
)) || [], f = Array.from({ length: 5 }), m = !!(!t && n && o &&
|
|
921
|
+
)) || [], f = Array.from({ length: 5 }), m = !!(!t && n && o && u), v = p.length < 2 ? "start" : "space-between", D = `N° ${String((r ?? 0) + 1).padStart(2, "0")}`;
|
|
922
922
|
return /* @__PURE__ */ i(
|
|
923
|
-
|
|
923
|
+
Pt,
|
|
924
924
|
{
|
|
925
|
-
conditionsAlignment:
|
|
925
|
+
conditionsAlignment: v,
|
|
926
926
|
decision: n,
|
|
927
|
-
decisionMapper:
|
|
927
|
+
decisionMapper: u,
|
|
928
928
|
loading: m,
|
|
929
929
|
skeleton: f,
|
|
930
930
|
textValues: o,
|
|
931
931
|
visibleConditions: p,
|
|
932
|
-
tagLabel:
|
|
932
|
+
tagLabel: D,
|
|
933
933
|
isOpen: a,
|
|
934
934
|
onToggle: s,
|
|
935
|
-
hasEffectiveFrom:
|
|
935
|
+
hasEffectiveFrom: c,
|
|
936
936
|
hasValidUntil: l,
|
|
937
937
|
effectiveFromRenderer: d,
|
|
938
938
|
validUntilRenderer: g
|
|
939
939
|
}
|
|
940
940
|
);
|
|
941
|
-
},
|
|
941
|
+
}, Rt = Dn`
|
|
942
942
|
from {
|
|
943
943
|
opacity: 0;
|
|
944
944
|
transform: translateY(20px);
|
|
@@ -972,7 +972,7 @@ T.div`
|
|
|
972
972
|
}};
|
|
973
973
|
}
|
|
974
974
|
`;
|
|
975
|
-
const
|
|
975
|
+
const Lt = T.div`
|
|
976
976
|
& > div {
|
|
977
977
|
box-shadow: 0px 2px 3px 0px
|
|
978
978
|
${({ theme: e }) => {
|
|
@@ -981,18 +981,18 @@ const $t = T.div`
|
|
|
981
981
|
}};
|
|
982
982
|
cursor: pointer;
|
|
983
983
|
}
|
|
984
|
-
`,
|
|
984
|
+
`, Mt = T.div`
|
|
985
985
|
width: 100%;
|
|
986
986
|
height: 100%;
|
|
987
987
|
& > div {
|
|
988
|
-
animation: ${
|
|
988
|
+
animation: ${Rt} 600ms ease-out;
|
|
989
989
|
}
|
|
990
|
-
`,
|
|
990
|
+
`, Ot = T.div`
|
|
991
991
|
& > div > div {
|
|
992
992
|
border-radius: 8px;
|
|
993
993
|
box-sizing: border-box;
|
|
994
994
|
}
|
|
995
|
-
`,
|
|
995
|
+
`, Vt = T.div`
|
|
996
996
|
& > div {
|
|
997
997
|
width: 100%;
|
|
998
998
|
height: 100%;
|
|
@@ -1012,21 +1012,21 @@ const $t = T.div`
|
|
|
1012
1012
|
border-radius: 8px;
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
|
-
`,
|
|
1015
|
+
`, zt = (e) => {
|
|
1016
1016
|
const { index: n, handleOpenModal: t } = e;
|
|
1017
1017
|
return /* @__PURE__ */ i(
|
|
1018
|
-
|
|
1018
|
+
Sn,
|
|
1019
1019
|
{
|
|
1020
1020
|
id: `loading-card-${n}`,
|
|
1021
1021
|
handleDelete: () => {
|
|
1022
1022
|
},
|
|
1023
1023
|
handleView: () => t ? t() : null,
|
|
1024
1024
|
controls: !1,
|
|
1025
|
-
children: /* @__PURE__ */ i(
|
|
1025
|
+
children: /* @__PURE__ */ i(Cn, { loading: !0 })
|
|
1026
1026
|
},
|
|
1027
1027
|
`loading-card-${n}`
|
|
1028
1028
|
);
|
|
1029
|
-
},
|
|
1029
|
+
}, Ht = (e) => {
|
|
1030
1030
|
const {
|
|
1031
1031
|
decision: n,
|
|
1032
1032
|
controls: t,
|
|
@@ -1034,41 +1034,41 @@ const $t = T.div`
|
|
|
1034
1034
|
handleDelete: r,
|
|
1035
1035
|
textValues: a,
|
|
1036
1036
|
index: s,
|
|
1037
|
-
isOpen:
|
|
1037
|
+
isOpen: c,
|
|
1038
1038
|
onToggle: l
|
|
1039
1039
|
} = e;
|
|
1040
|
-
return n ? /* @__PURE__ */ i(
|
|
1041
|
-
|
|
1040
|
+
return n ? /* @__PURE__ */ i(Ge, { children: /* @__PURE__ */ i(x, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
|
|
1041
|
+
Sn,
|
|
1042
1042
|
{
|
|
1043
1043
|
id: n.decisionId,
|
|
1044
1044
|
handleDelete: () => r ? r(n.decisionId) : null,
|
|
1045
1045
|
handleView: () => o ? o(n) : null,
|
|
1046
1046
|
controls: t,
|
|
1047
1047
|
children: /* @__PURE__ */ i(
|
|
1048
|
-
|
|
1048
|
+
Cn,
|
|
1049
1049
|
{
|
|
1050
1050
|
decision: n,
|
|
1051
1051
|
textValues: a,
|
|
1052
1052
|
position: s,
|
|
1053
|
-
isOpen: !!
|
|
1054
|
-
onToggle: () => l == null ? void 0 : l(!
|
|
1053
|
+
isOpen: !!c,
|
|
1054
|
+
onToggle: () => l == null ? void 0 : l(!c)
|
|
1055
1055
|
}
|
|
1056
1056
|
)
|
|
1057
1057
|
}
|
|
1058
1058
|
) }) }, n.decisionId) : null;
|
|
1059
|
-
},
|
|
1059
|
+
}, _t = (e) => {
|
|
1060
1060
|
const {
|
|
1061
1061
|
customTitleContentAddCard: n,
|
|
1062
1062
|
index: t,
|
|
1063
1063
|
handleOpenModal: o,
|
|
1064
1064
|
shouldRenderEmptyMessage: r
|
|
1065
1065
|
} = e;
|
|
1066
|
-
return /* @__PURE__ */ i(
|
|
1067
|
-
|
|
1066
|
+
return /* @__PURE__ */ i(Mt, { children: r ? null : /* @__PURE__ */ i(
|
|
1067
|
+
Lt,
|
|
1068
1068
|
{
|
|
1069
1069
|
onClick: () => o ? o() : null,
|
|
1070
1070
|
children: /* @__PURE__ */ i(
|
|
1071
|
-
|
|
1071
|
+
j,
|
|
1072
1072
|
{
|
|
1073
1073
|
direction: "column",
|
|
1074
1074
|
gap: "4px",
|
|
@@ -1077,7 +1077,7 @@ const $t = T.div`
|
|
|
1077
1077
|
background: !0,
|
|
1078
1078
|
borderRadius: "8px",
|
|
1079
1079
|
children: /* @__PURE__ */ b(
|
|
1080
|
-
|
|
1080
|
+
x,
|
|
1081
1081
|
{
|
|
1082
1082
|
justifyContent: "space-between",
|
|
1083
1083
|
alignItems: "center",
|
|
@@ -1100,14 +1100,14 @@ const $t = T.div`
|
|
|
1100
1100
|
)
|
|
1101
1101
|
}
|
|
1102
1102
|
) }, `add-decision-${t}`);
|
|
1103
|
-
},
|
|
1104
|
-
loading:
|
|
1105
|
-
decision:
|
|
1106
|
-
add:
|
|
1107
|
-
},
|
|
1108
|
-
const { type: n } = e, t =
|
|
1103
|
+
}, Ut = {
|
|
1104
|
+
loading: zt,
|
|
1105
|
+
decision: Ht,
|
|
1106
|
+
add: _t
|
|
1107
|
+
}, _e = (e) => {
|
|
1108
|
+
const { type: n } = e, t = Ut[n];
|
|
1109
1109
|
return t ? t(e) : null;
|
|
1110
|
-
},
|
|
1110
|
+
}, jt = (e) => {
|
|
1111
1111
|
const {
|
|
1112
1112
|
controls: n,
|
|
1113
1113
|
customTitleContentAddCard: t,
|
|
@@ -1115,11 +1115,11 @@ const $t = T.div`
|
|
|
1115
1115
|
loading: r,
|
|
1116
1116
|
handleOpenModal: a,
|
|
1117
1117
|
handleDelete: s,
|
|
1118
|
-
textValues:
|
|
1118
|
+
textValues: c,
|
|
1119
1119
|
isOpenFor: l,
|
|
1120
1120
|
toggleAt: d
|
|
1121
1121
|
} = e, g = r ? Array.from({ length: 3 }).map(
|
|
1122
|
-
(p, f) =>
|
|
1122
|
+
(p, f) => _e({
|
|
1123
1123
|
type: "loading",
|
|
1124
1124
|
index: f,
|
|
1125
1125
|
controls: n,
|
|
@@ -1127,10 +1127,10 @@ const $t = T.div`
|
|
|
1127
1127
|
loading: r,
|
|
1128
1128
|
handleOpenModal: a,
|
|
1129
1129
|
handleDelete: s,
|
|
1130
|
-
textValues:
|
|
1130
|
+
textValues: c
|
|
1131
1131
|
})
|
|
1132
1132
|
) : o == null ? void 0 : o.map(
|
|
1133
|
-
(p, f) =>
|
|
1133
|
+
(p, f) => _e({
|
|
1134
1134
|
type: "decision",
|
|
1135
1135
|
decision: p,
|
|
1136
1136
|
controls: l ? l(f) : !1,
|
|
@@ -1138,19 +1138,20 @@ const $t = T.div`
|
|
|
1138
1138
|
loading: r,
|
|
1139
1139
|
handleOpenModal: a,
|
|
1140
1140
|
handleDelete: s,
|
|
1141
|
-
textValues:
|
|
1141
|
+
textValues: c,
|
|
1142
1142
|
index: f,
|
|
1143
1143
|
isOpen: l ? l(f) : !1,
|
|
1144
1144
|
onToggle: d ? () => d(f) : void 0
|
|
1145
1145
|
})
|
|
1146
|
-
),
|
|
1147
|
-
return { renderedCards: g, shouldRenderAddCard:
|
|
1148
|
-
},
|
|
1146
|
+
), u = ((o == null ? void 0 : o.length) === 0 || o.length < Math.floor(window.innerWidth / 300)) && !r && n;
|
|
1147
|
+
return { renderedCards: g, shouldRenderAddCard: u };
|
|
1148
|
+
}, Bt = T.div`
|
|
1149
1149
|
position: relative;
|
|
1150
1150
|
& > div {
|
|
1151
1151
|
padding: 24px 16px;
|
|
1152
|
+
place-items: unset;
|
|
1152
1153
|
}
|
|
1153
|
-
`,
|
|
1154
|
+
`, qt = T.div`
|
|
1154
1155
|
background-color: ${({ theme: e }) => {
|
|
1155
1156
|
var n, t;
|
|
1156
1157
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || C.palette.neutral.N0;
|
|
@@ -1182,18 +1183,18 @@ const $t = T.div`
|
|
|
1182
1183
|
background-color: #ebecf0;
|
|
1183
1184
|
border-radius: 8px;
|
|
1184
1185
|
}
|
|
1185
|
-
`,
|
|
1186
|
+
`, Yt = (e) => {
|
|
1186
1187
|
const { children: n, description: t, portalId: o, onCloseModal: r, title: a } = e, s = document.getElementById(o);
|
|
1187
1188
|
if (!s)
|
|
1188
1189
|
throw new Error(
|
|
1189
1190
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
1190
1191
|
);
|
|
1191
|
-
const
|
|
1192
|
-
return
|
|
1193
|
-
/* @__PURE__ */ i(
|
|
1194
|
-
/* @__PURE__ */ b(
|
|
1195
|
-
/* @__PURE__ */ b(
|
|
1196
|
-
/* @__PURE__ */ b(
|
|
1192
|
+
const c = X("(max-width: 400px)");
|
|
1193
|
+
return Xe(
|
|
1194
|
+
/* @__PURE__ */ i(Bt, { smallScreen: c, children: /* @__PURE__ */ i(Ye, { children: /* @__PURE__ */ i(qt, { children: /* @__PURE__ */ b(x, { direction: "column", gap: "24px", children: [
|
|
1195
|
+
/* @__PURE__ */ b(x, { direction: "column", gap: "24px", children: [
|
|
1196
|
+
/* @__PURE__ */ b(x, { alignItems: "center", justifyContent: "space-between", children: [
|
|
1197
|
+
/* @__PURE__ */ b(x, { direction: "column", gap: "8px", children: [
|
|
1197
1198
|
/* @__PURE__ */ i(
|
|
1198
1199
|
E,
|
|
1199
1200
|
{
|
|
@@ -1214,39 +1215,39 @@ const $t = T.div`
|
|
|
1214
1215
|
] }) }) }) }),
|
|
1215
1216
|
s
|
|
1216
1217
|
);
|
|
1217
|
-
},
|
|
1218
|
+
}, Xt = (e) => ({
|
|
1218
1219
|
schema: le().required("Requerido").test(
|
|
1219
1220
|
"non-empty",
|
|
1220
1221
|
"El valor no puede estar vacío",
|
|
1221
1222
|
(n) => n != null && n.trim() !== ""
|
|
1222
1223
|
),
|
|
1223
1224
|
value: e
|
|
1224
|
-
}),
|
|
1225
|
+
}), Wt = (e) => ({
|
|
1225
1226
|
schema: ke().test(
|
|
1226
1227
|
"isArrayOrString",
|
|
1227
|
-
"
|
|
1228
|
+
"Por favor selecciona una opcion",
|
|
1228
1229
|
(n) => Array.isArray(n) ? n.every(
|
|
1229
1230
|
(t) => typeof t == "string" || typeof t == "number"
|
|
1230
1231
|
) : typeof n == "string"
|
|
1231
1232
|
),
|
|
1232
1233
|
value: e
|
|
1233
|
-
}),
|
|
1234
|
+
}), Gt = (e) => ({
|
|
1234
1235
|
schema: ke().test(
|
|
1235
1236
|
"isArrayOrString",
|
|
1236
|
-
"
|
|
1237
|
+
"Por favor selecciona al menos una opcion",
|
|
1237
1238
|
(n) => Array.isArray(n) ? n.every(
|
|
1238
1239
|
(t) => typeof t == "string" || typeof t == "number"
|
|
1239
1240
|
) : typeof n == "string"
|
|
1240
1241
|
),
|
|
1241
1242
|
value: e
|
|
1242
|
-
}),
|
|
1243
|
+
}), Zt = (e) => {
|
|
1243
1244
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
1244
1245
|
return {
|
|
1245
1246
|
schema: Z({
|
|
1246
|
-
from: ae().required("
|
|
1247
|
-
to: ae().min(0, "
|
|
1247
|
+
from: ae().required("El campo de tipo rango es requerido").max(t, "El rango desde no puede ser mayor al rango hasta").min(0, "El rango desde no puede ser menor a 0"),
|
|
1248
|
+
to: ae().min(0, "El rengo hasta debe ser mayor o igual a 0").required("El rango hasta es requerido").test(
|
|
1248
1249
|
"is-greater",
|
|
1249
|
-
"
|
|
1250
|
+
"El rengo hasta debe ser mayor a el rango desde",
|
|
1250
1251
|
function(o) {
|
|
1251
1252
|
const { from: r } = this.parent;
|
|
1252
1253
|
return o > r;
|
|
@@ -1255,29 +1256,29 @@ const $t = T.div`
|
|
|
1255
1256
|
}),
|
|
1256
1257
|
value: { from: n, to: t }
|
|
1257
1258
|
};
|
|
1258
|
-
},
|
|
1259
|
-
schema: ae().required("
|
|
1259
|
+
}, Re = (e, n) => n === U.PERCENTAGE ? {
|
|
1260
|
+
schema: ae().required("El campo porcentaje es requerido").min(0, "El porcentaje no puede ser menor a 0").max(100, "El porcentaje no puede ser mayor a 100"),
|
|
1260
1261
|
value: e
|
|
1261
1262
|
} : {
|
|
1262
|
-
schema: le().required("
|
|
1263
|
+
schema: le().required("Requerido"),
|
|
1263
1264
|
value: e
|
|
1264
|
-
},
|
|
1265
|
-
[k.LIST_OF_VALUES]:
|
|
1266
|
-
[k.LIST_OF_VALUES_MULTI]:
|
|
1267
|
-
[k.RANGE]:
|
|
1268
|
-
[k.GREATER_THAN]:
|
|
1269
|
-
[k.LESS_THAN]:
|
|
1270
|
-
[k.EQUAL]:
|
|
1271
|
-
},
|
|
1272
|
-
var
|
|
1273
|
-
function
|
|
1265
|
+
}, Qt = {
|
|
1266
|
+
[k.LIST_OF_VALUES]: Wt,
|
|
1267
|
+
[k.LIST_OF_VALUES_MULTI]: Gt,
|
|
1268
|
+
[k.RANGE]: Zt,
|
|
1269
|
+
[k.GREATER_THAN]: Re,
|
|
1270
|
+
[k.LESS_THAN]: Re,
|
|
1271
|
+
[k.EQUAL]: Re
|
|
1272
|
+
}, on = (e) => Qt[e] || Xt;
|
|
1273
|
+
var Ze = /* @__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))(Ze || {});
|
|
1274
|
+
function Kt({
|
|
1274
1275
|
decision: e,
|
|
1275
1276
|
onSubmitEvent: n,
|
|
1276
1277
|
textValues: t
|
|
1277
1278
|
}) {
|
|
1278
1279
|
const o = {
|
|
1279
1280
|
ruleName: e.ruleName || "",
|
|
1280
|
-
decisionDataType: e.decisionDataType ||
|
|
1281
|
+
decisionDataType: e.decisionDataType || U.ALPHABETICAL,
|
|
1281
1282
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
1282
1283
|
value: e.value || "",
|
|
1283
1284
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -1289,23 +1290,23 @@ function Wt({
|
|
|
1289
1290
|
};
|
|
1290
1291
|
let r;
|
|
1291
1292
|
const a = {
|
|
1292
|
-
ruleName: le().required("
|
|
1293
|
-
value:
|
|
1293
|
+
ruleName: le().required("El nombre de la decision es requerido"),
|
|
1294
|
+
value: ye(() => on(
|
|
1294
1295
|
r.values.howToSetTheDecision
|
|
1295
1296
|
)(
|
|
1296
1297
|
r.values.value,
|
|
1297
1298
|
r.values.decisionDataType
|
|
1298
1299
|
).schema),
|
|
1299
|
-
conditionsThatEstablishesTheDecision:
|
|
1300
|
+
conditionsThatEstablishesTheDecision: ye((l, { parent: d }) => {
|
|
1300
1301
|
var p;
|
|
1301
1302
|
if ((d == null ? void 0 : d.toggleNone) && Object.keys(d.conditionsThatEstablishesTheDecision || {}).length > 0) return Z().shape({});
|
|
1302
|
-
const
|
|
1303
|
+
const u = (p = e.conditionsThatEstablishesTheDecision) == null ? void 0 : p.reduce(
|
|
1303
1304
|
(f, m) => {
|
|
1304
1305
|
if (r.values.conditionsThatEstablishesTheDecision[m.conditionName] !== void 0) {
|
|
1305
|
-
const
|
|
1306
|
+
const D = on(
|
|
1306
1307
|
m.howToSetTheCondition
|
|
1307
1308
|
);
|
|
1308
|
-
f[m.conditionName] =
|
|
1309
|
+
f[m.conditionName] = D(
|
|
1309
1310
|
m.value,
|
|
1310
1311
|
m.conditionDataType
|
|
1311
1312
|
).schema;
|
|
@@ -1314,7 +1315,7 @@ function Wt({
|
|
|
1314
1315
|
},
|
|
1315
1316
|
{}
|
|
1316
1317
|
);
|
|
1317
|
-
return Z(
|
|
1318
|
+
return Z(u).test(
|
|
1318
1319
|
"at-least-one-condition",
|
|
1319
1320
|
"Debe existir al menos una condición para que la decisión se valide correctamente.",
|
|
1320
1321
|
(f) => f ? Object.values(f).some(
|
|
@@ -1324,12 +1325,12 @@ function Wt({
|
|
|
1324
1325
|
})
|
|
1325
1326
|
};
|
|
1326
1327
|
t.terms && (a.effectiveFrom = Te().required(
|
|
1327
|
-
"
|
|
1328
|
+
"Se requiere la fecha de vigencia desde"
|
|
1328
1329
|
), a.validUntil = Te().when(
|
|
1329
1330
|
"checkClosed",
|
|
1330
|
-
(l, d, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? d.required("
|
|
1331
|
+
(l, d, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? d.required("Se requiere la fecha de vigencia hasta").test(
|
|
1331
1332
|
"is-after-startDate",
|
|
1332
|
-
"
|
|
1333
|
+
"La fecha válida para la vigencia hasta debe ser mayor o igual a la fecha de inicio",
|
|
1333
1334
|
function(p) {
|
|
1334
1335
|
const f = this.parent.effectiveFrom;
|
|
1335
1336
|
return !f || !p ? !0 : new Date(p) >= new Date(f);
|
|
@@ -1351,12 +1352,12 @@ function Wt({
|
|
|
1351
1352
|
value: l.value,
|
|
1352
1353
|
effectiveFrom: l.effectiveFrom,
|
|
1353
1354
|
validUntil: l.validUntil,
|
|
1354
|
-
conditionsThatEstablishesTheDecision: (g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter((
|
|
1355
|
-
const p = l.conditionsThatEstablishesTheDecision[
|
|
1355
|
+
conditionsThatEstablishesTheDecision: (g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter((u) => {
|
|
1356
|
+
const p = l.conditionsThatEstablishesTheDecision[u.conditionName];
|
|
1356
1357
|
return p != null && p !== "";
|
|
1357
|
-
}).map((
|
|
1358
|
-
...
|
|
1359
|
-
value: l.conditionsThatEstablishesTheDecision[
|
|
1358
|
+
}).map((u) => ({
|
|
1359
|
+
...u,
|
|
1360
|
+
value: l.conditionsThatEstablishesTheDecision[u.conditionName]
|
|
1360
1361
|
}))
|
|
1361
1362
|
};
|
|
1362
1363
|
n(d);
|
|
@@ -1370,16 +1371,16 @@ function Wt({
|
|
|
1370
1371
|
void 0
|
|
1371
1372
|
);
|
|
1372
1373
|
else {
|
|
1373
|
-
const
|
|
1374
|
+
const u = g.howToSetTheCondition === Ze.LIST_OF_VALUES_MULTI ? [] : "";
|
|
1374
1375
|
r.setFieldValue(
|
|
1375
1376
|
`conditionsThatEstablishesTheDecision.${g.conditionName}`,
|
|
1376
|
-
|
|
1377
|
+
u
|
|
1377
1378
|
);
|
|
1378
1379
|
}
|
|
1379
1380
|
});
|
|
1380
1381
|
} };
|
|
1381
1382
|
}
|
|
1382
|
-
const
|
|
1383
|
+
const Jt = T.div`
|
|
1383
1384
|
& > div {
|
|
1384
1385
|
border-radius: 8px;
|
|
1385
1386
|
border: 1px solid
|
|
@@ -1388,7 +1389,7 @@ const Gt = T.div`
|
|
|
1388
1389
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || C.palette.neutral.N30;
|
|
1389
1390
|
}};
|
|
1390
1391
|
}
|
|
1391
|
-
`,
|
|
1392
|
+
`, eo = T.div`
|
|
1392
1393
|
width: 100%;
|
|
1393
1394
|
height: 100%;
|
|
1394
1395
|
overflow-y: auto;
|
|
@@ -1405,7 +1406,7 @@ const Gt = T.div`
|
|
|
1405
1406
|
background-color: #ebecf0;
|
|
1406
1407
|
border-radius: 8px;
|
|
1407
1408
|
}
|
|
1408
|
-
`,
|
|
1409
|
+
`, no = (e) => {
|
|
1409
1410
|
const {
|
|
1410
1411
|
checked: n,
|
|
1411
1412
|
children: t,
|
|
@@ -1413,14 +1414,14 @@ const Gt = T.div`
|
|
|
1413
1414
|
id: r,
|
|
1414
1415
|
labelToggle: a,
|
|
1415
1416
|
name: s,
|
|
1416
|
-
valueToggle:
|
|
1417
|
-
} = e, [l, d] = P(n), g = (
|
|
1418
|
-
d(
|
|
1417
|
+
valueToggle: c = ""
|
|
1418
|
+
} = e, [l, d] = P(n), g = (u) => {
|
|
1419
|
+
d(u.target.checked), o(u);
|
|
1419
1420
|
};
|
|
1420
|
-
return
|
|
1421
|
+
return te(() => {
|
|
1421
1422
|
d(n);
|
|
1422
|
-
}, [n]), /* @__PURE__ */ b(
|
|
1423
|
-
/* @__PURE__ */ i(
|
|
1423
|
+
}, [n]), /* @__PURE__ */ b(R, { children: [
|
|
1424
|
+
/* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(
|
|
1424
1425
|
Ee,
|
|
1425
1426
|
{
|
|
1426
1427
|
checked: l,
|
|
@@ -1428,13 +1429,13 @@ const Gt = T.div`
|
|
|
1428
1429
|
name: s,
|
|
1429
1430
|
onChange: g,
|
|
1430
1431
|
size: "small",
|
|
1431
|
-
value:
|
|
1432
|
+
value: c,
|
|
1432
1433
|
children: /* @__PURE__ */ i(E, { size: "medium", type: "label", weight: "bold", children: a })
|
|
1433
1434
|
}
|
|
1434
1435
|
) }),
|
|
1435
|
-
l && /* @__PURE__ */ i(
|
|
1436
|
+
l && /* @__PURE__ */ i(R, { children: t })
|
|
1436
1437
|
] });
|
|
1437
|
-
},
|
|
1438
|
+
}, to = (e) => {
|
|
1438
1439
|
const {
|
|
1439
1440
|
onHandleStartChange: n,
|
|
1440
1441
|
onHandleEndChange: t,
|
|
@@ -1442,90 +1443,89 @@ const Gt = T.div`
|
|
|
1442
1443
|
labelStart: r,
|
|
1443
1444
|
labelEnd: a,
|
|
1444
1445
|
checkedClosed: s = !1,
|
|
1445
|
-
required:
|
|
1446
|
+
required: c = !1,
|
|
1446
1447
|
valueStart: l = "",
|
|
1447
1448
|
valueEnd: d = "",
|
|
1448
1449
|
messageStart: g = "",
|
|
1449
|
-
messageEnd:
|
|
1450
|
+
messageEnd: u = "",
|
|
1450
1451
|
statusStart: p = "pending",
|
|
1451
1452
|
statusEnd: f = "pending"
|
|
1452
|
-
} = e, [m,
|
|
1453
|
-
|
|
1453
|
+
} = e, [m, v] = P(s), [D, y] = P(l), [w, N] = P(d), A = ({ target: $ }) => {
|
|
1454
|
+
v($.checked), o && o($.checked);
|
|
1454
1455
|
}, S = ($) => {
|
|
1455
|
-
|
|
1456
|
+
y($.target.value), n($);
|
|
1456
1457
|
}, I = ($) => {
|
|
1457
1458
|
N($.target.value), t($);
|
|
1458
|
-
},
|
|
1459
|
-
return /* @__PURE__ */ b(
|
|
1460
|
-
/* @__PURE__ */ b(
|
|
1459
|
+
}, B = X("(max-width: 400px)");
|
|
1460
|
+
return /* @__PURE__ */ b(x, { direction: "column", width: "100%", gap: "20px", children: [
|
|
1461
|
+
/* @__PURE__ */ b(x, { justifyContent: "space-between", children: [
|
|
1462
|
+
/* @__PURE__ */ i(E, { appearance: "dark", size: "large", type: "label", children: "¿La vigencia para este decisión es cerrada?" }),
|
|
1461
1463
|
/* @__PURE__ */ i(
|
|
1462
|
-
|
|
1464
|
+
xn,
|
|
1463
1465
|
{
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
weight: "bold",
|
|
1469
|
-
children: "Vigencia"
|
|
1470
|
-
}
|
|
1471
|
-
),
|
|
1472
|
-
/* @__PURE__ */ i(
|
|
1473
|
-
v,
|
|
1474
|
-
{
|
|
1475
|
-
alignContent: "center",
|
|
1476
|
-
justifyContent: "center",
|
|
1477
|
-
wrap: "wrap",
|
|
1478
|
-
gap: "4px",
|
|
1479
|
-
children: /* @__PURE__ */ i(
|
|
1480
|
-
vn,
|
|
1481
|
-
{
|
|
1482
|
-
label: "Cerrada",
|
|
1483
|
-
onChange: A,
|
|
1484
|
-
checked: m,
|
|
1485
|
-
value: ""
|
|
1486
|
-
}
|
|
1487
|
-
)
|
|
1466
|
+
label: "Cerrada",
|
|
1467
|
+
onChange: A,
|
|
1468
|
+
checked: m,
|
|
1469
|
+
value: ""
|
|
1488
1470
|
}
|
|
1489
1471
|
)
|
|
1490
1472
|
] }),
|
|
1491
1473
|
/* @__PURE__ */ b(
|
|
1492
|
-
|
|
1474
|
+
x,
|
|
1493
1475
|
{
|
|
1494
|
-
direction:
|
|
1476
|
+
direction: B ? "column" : "row",
|
|
1495
1477
|
justifyContent: "space-between",
|
|
1496
1478
|
gap: "24px",
|
|
1497
1479
|
children: [
|
|
1498
1480
|
/* @__PURE__ */ i(
|
|
1499
|
-
|
|
1481
|
+
xe,
|
|
1500
1482
|
{
|
|
1501
1483
|
id: "dateStart",
|
|
1502
1484
|
label: r,
|
|
1503
1485
|
onChange: S,
|
|
1504
|
-
value:
|
|
1505
|
-
required:
|
|
1486
|
+
value: D,
|
|
1487
|
+
required: c,
|
|
1506
1488
|
size: "compact",
|
|
1507
1489
|
status: p,
|
|
1508
|
-
message: g
|
|
1490
|
+
message: g,
|
|
1491
|
+
fullwidth: !0
|
|
1509
1492
|
}
|
|
1510
1493
|
),
|
|
1511
1494
|
m && /* @__PURE__ */ i(
|
|
1512
|
-
|
|
1495
|
+
xe,
|
|
1513
1496
|
{
|
|
1514
1497
|
id: "dateEnd",
|
|
1515
1498
|
label: a,
|
|
1516
1499
|
onChange: I,
|
|
1517
1500
|
value: w,
|
|
1518
|
-
required:
|
|
1501
|
+
required: c,
|
|
1519
1502
|
size: "compact",
|
|
1520
1503
|
status: f,
|
|
1521
|
-
message:
|
|
1504
|
+
message: u,
|
|
1505
|
+
fullwidth: !0
|
|
1522
1506
|
}
|
|
1523
1507
|
)
|
|
1524
1508
|
]
|
|
1525
1509
|
}
|
|
1526
1510
|
)
|
|
1527
1511
|
] });
|
|
1528
|
-
},
|
|
1512
|
+
}, Le = [
|
|
1513
|
+
{
|
|
1514
|
+
id: "mainCondition",
|
|
1515
|
+
label: "Condición principal",
|
|
1516
|
+
isDisabled: !1
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
id: "alternateCondition-1",
|
|
1520
|
+
label: "Condición alterna N° 01",
|
|
1521
|
+
isDisabled: !1
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
id: "alternateCondition-2",
|
|
1525
|
+
label: "Condición alterna N° 02",
|
|
1526
|
+
isDisabled: !1
|
|
1527
|
+
}
|
|
1528
|
+
], oo = (e) => {
|
|
1529
1529
|
const {
|
|
1530
1530
|
formik: n,
|
|
1531
1531
|
textValues: t,
|
|
@@ -1533,75 +1533,87 @@ const Gt = T.div`
|
|
|
1533
1533
|
visibleConditions: r,
|
|
1534
1534
|
normalizedDecision: a,
|
|
1535
1535
|
handleToggleNoneChange: s,
|
|
1536
|
-
handleConditionToggleChange:
|
|
1536
|
+
handleConditionToggleChange: c,
|
|
1537
1537
|
showConditionsError: l,
|
|
1538
1538
|
termStartStatus: d,
|
|
1539
1539
|
termEndStatus: g
|
|
1540
|
-
} = e;
|
|
1541
|
-
return
|
|
1542
|
-
|
|
1540
|
+
} = e, [u, p] = P(Le[0].id), f = (v) => p(v), m = location.pathname.split("/").pop();
|
|
1541
|
+
return te(() => {
|
|
1542
|
+
p(Le[0].id);
|
|
1543
|
+
}, [m]), /* @__PURE__ */ i("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ b(x, { direction: "column", gap: "24px", width: "100%", children: [
|
|
1544
|
+
/* @__PURE__ */ i(ve, { legend: "Decisión N° 01", spacing: "wide", children: De({
|
|
1543
1545
|
condition: a,
|
|
1544
1546
|
formik: n,
|
|
1545
1547
|
isDecision: !0
|
|
1546
1548
|
}) }),
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1549
|
+
/* @__PURE__ */ b(ve, { legend: "Condiciones a evaluar", spacing: "wide", children: [
|
|
1550
|
+
/* @__PURE__ */ i(
|
|
1551
|
+
Xn,
|
|
1552
|
+
{
|
|
1553
|
+
onChange: f,
|
|
1554
|
+
tabs: Le,
|
|
1555
|
+
selectedTab: u
|
|
1556
|
+
}
|
|
1557
|
+
),
|
|
1558
|
+
/* @__PURE__ */ i(Jt, { children: /* @__PURE__ */ i(eo, { children: /* @__PURE__ */ b(
|
|
1559
|
+
x,
|
|
1560
|
+
{
|
|
1561
|
+
direction: "column",
|
|
1562
|
+
padding: "6px 12px",
|
|
1563
|
+
gap: "16px",
|
|
1564
|
+
height: "272px",
|
|
1565
|
+
children: [
|
|
1566
|
+
/* @__PURE__ */ b(
|
|
1567
|
+
x,
|
|
1568
|
+
{
|
|
1569
|
+
justifyContent: "space-between",
|
|
1570
|
+
alignItems: "center",
|
|
1571
|
+
gap: "64px",
|
|
1572
|
+
children: [
|
|
1573
|
+
/* @__PURE__ */ i(
|
|
1574
|
+
E,
|
|
1575
|
+
{
|
|
1576
|
+
type: "title",
|
|
1577
|
+
size: "small",
|
|
1578
|
+
weight: "bold",
|
|
1579
|
+
appearance: "gray",
|
|
1580
|
+
children: t.factsThatConditionIt
|
|
1581
|
+
}
|
|
1582
|
+
),
|
|
1583
|
+
/* @__PURE__ */ i(
|
|
1584
|
+
Ee,
|
|
1585
|
+
{
|
|
1586
|
+
id: "toggleNone",
|
|
1587
|
+
onChange: () => s(!n.values.toggleNone),
|
|
1588
|
+
checked: n.values.toggleNone,
|
|
1589
|
+
size: "small",
|
|
1590
|
+
children: /* @__PURE__ */ i(E, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
1591
|
+
}
|
|
1592
|
+
)
|
|
1593
|
+
]
|
|
1594
|
+
}
|
|
1595
|
+
),
|
|
1596
|
+
/* @__PURE__ */ i(x, { direction: "column", gap: "20px", children: r == null ? void 0 : r.map((v) => /* @__PURE__ */ i(
|
|
1597
|
+
no,
|
|
1598
|
+
{
|
|
1599
|
+
id: `toggle-${v.conditionName}`,
|
|
1600
|
+
name: `toggle.${v.conditionName}`,
|
|
1601
|
+
labelToggle: v.labelName,
|
|
1602
|
+
checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[v.conditionName] !== void 0,
|
|
1603
|
+
handleToggleChange: (D) => c(
|
|
1604
|
+
v.conditionName,
|
|
1605
|
+
v.howToSetTheCondition === Ze.LIST_OF_VALUES_MULTI
|
|
1606
|
+
)(D.target.checked),
|
|
1607
|
+
children: De({ condition: v, formik: n })
|
|
1608
|
+
},
|
|
1609
|
+
v.conditionName
|
|
1610
|
+
)) })
|
|
1611
|
+
]
|
|
1612
|
+
}
|
|
1613
|
+
) }) })
|
|
1614
|
+
] }),
|
|
1615
|
+
/* @__PURE__ */ i(ve, { legend: "Vigencia", spacing: "wide", children: t.terms && /* @__PURE__ */ i(R, { children: /* @__PURE__ */ i(
|
|
1616
|
+
to,
|
|
1605
1617
|
{
|
|
1606
1618
|
labelStart: t.termStart,
|
|
1607
1619
|
labelEnd: t.termEnd,
|
|
@@ -1611,27 +1623,27 @@ const Gt = T.div`
|
|
|
1611
1623
|
messageEnd: n.errors.validUntil,
|
|
1612
1624
|
statusStart: d,
|
|
1613
1625
|
statusEnd: g,
|
|
1614
|
-
onHandleStartChange: (
|
|
1615
|
-
onHandleEndChange: (
|
|
1616
|
-
onCheckClosedChange: (
|
|
1617
|
-
n.setFieldValue("checkClosed",
|
|
1626
|
+
onHandleStartChange: (v) => n.setFieldValue("effectiveFrom", v.target.value),
|
|
1627
|
+
onHandleEndChange: (v) => n.setFieldValue("validUntil", v.target.value),
|
|
1628
|
+
onCheckClosedChange: (v) => {
|
|
1629
|
+
n.setFieldValue("checkClosed", v), v && n.setFieldValue("validUntil", "");
|
|
1618
1630
|
},
|
|
1619
1631
|
checkedClosed: n.values.checkClosed
|
|
1620
1632
|
}
|
|
1621
1633
|
) }) }),
|
|
1622
|
-
l && /* @__PURE__ */ i(E, { type: "label", size: "medium", appearance: "danger", children:
|
|
1623
|
-
/* @__PURE__ */ b(
|
|
1624
|
-
/* @__PURE__ */ i(
|
|
1625
|
-
/* @__PURE__ */ i(
|
|
1634
|
+
l && /* @__PURE__ */ i(E, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
1635
|
+
/* @__PURE__ */ b(x, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
1636
|
+
/* @__PURE__ */ i(H, { appearance: "gray", onClick: o, variant: "outlined", children: t.cancel }),
|
|
1637
|
+
/* @__PURE__ */ i(H, { type: "submit", children: t.confirm })
|
|
1626
1638
|
] })
|
|
1627
1639
|
] }) });
|
|
1628
|
-
},
|
|
1640
|
+
}, ro = (e) => {
|
|
1629
1641
|
var f;
|
|
1630
|
-
const { decision: n, onSubmitEvent: t, textValues: o, onCancel: r } = e, { formik: a, handleToggleNoneChange: s } =
|
|
1642
|
+
const { decision: n, onSubmitEvent: t, textValues: o, onCancel: r } = e, { formik: a, handleToggleNoneChange: s } = Kt({
|
|
1631
1643
|
decision: n,
|
|
1632
1644
|
onSubmitEvent: t,
|
|
1633
1645
|
textValues: o
|
|
1634
|
-
}),
|
|
1646
|
+
}), c = {
|
|
1635
1647
|
ruleName: n.ruleName,
|
|
1636
1648
|
labelName: n.labelName,
|
|
1637
1649
|
howToSetTheCondition: n.howToSetTheDecision,
|
|
@@ -1639,19 +1651,19 @@ const Gt = T.div`
|
|
|
1639
1651
|
listOfPossibleValues: n.listOfPossibleValues
|
|
1640
1652
|
}, l = ((f = n.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
|
|
1641
1653
|
(m) => !m.hidden
|
|
1642
|
-
)) || [], d = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, g = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0,
|
|
1654
|
+
)) || [], d = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, g = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0, u = a.touched.validUntil ? a.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
1643
1655
|
return /* @__PURE__ */ i(
|
|
1644
|
-
|
|
1656
|
+
oo,
|
|
1645
1657
|
{
|
|
1646
1658
|
formik: a,
|
|
1647
1659
|
onCancel: r,
|
|
1648
1660
|
textValues: o,
|
|
1649
1661
|
decision: n,
|
|
1650
1662
|
visibleConditions: l,
|
|
1651
|
-
normalizedDecision:
|
|
1663
|
+
normalizedDecision: c,
|
|
1652
1664
|
handleToggleNoneChange: s,
|
|
1653
|
-
handleConditionToggleChange: (m,
|
|
1654
|
-
if (!
|
|
1665
|
+
handleConditionToggleChange: (m, v) => (D) => {
|
|
1666
|
+
if (!D)
|
|
1655
1667
|
a.setFieldValue(
|
|
1656
1668
|
`conditionsThatEstablishesTheDecision.${m}`,
|
|
1657
1669
|
void 0
|
|
@@ -1661,19 +1673,19 @@ const Gt = T.div`
|
|
|
1661
1673
|
!1
|
|
1662
1674
|
);
|
|
1663
1675
|
else {
|
|
1664
|
-
const
|
|
1676
|
+
const y = v ? [] : "";
|
|
1665
1677
|
a.setFieldValue(
|
|
1666
1678
|
`conditionsThatEstablishesTheDecision.${m}`,
|
|
1667
|
-
|
|
1679
|
+
y
|
|
1668
1680
|
);
|
|
1669
1681
|
}
|
|
1670
1682
|
},
|
|
1671
1683
|
showConditionsError: d,
|
|
1672
1684
|
termStartStatus: g,
|
|
1673
|
-
termEndStatus:
|
|
1685
|
+
termEndStatus: u
|
|
1674
1686
|
}
|
|
1675
1687
|
);
|
|
1676
|
-
},
|
|
1688
|
+
}, sa = (e) => {
|
|
1677
1689
|
const {
|
|
1678
1690
|
controls: n = !0,
|
|
1679
1691
|
customTitleContentAddCard: t,
|
|
@@ -1681,15 +1693,15 @@ const Gt = T.div`
|
|
|
1681
1693
|
decisions: r,
|
|
1682
1694
|
textValues: a,
|
|
1683
1695
|
decisionTemplate: s,
|
|
1684
|
-
isModalOpen:
|
|
1696
|
+
isModalOpen: c,
|
|
1685
1697
|
selectedDecision: l,
|
|
1686
1698
|
loading: d,
|
|
1687
1699
|
handleOpenModal: g,
|
|
1688
|
-
handleCloseModal:
|
|
1700
|
+
handleCloseModal: u,
|
|
1689
1701
|
handleSubmitForm: p,
|
|
1690
1702
|
handleDelete: f,
|
|
1691
1703
|
terms: m = !0
|
|
1692
|
-
} = e, [
|
|
1704
|
+
} = e, [v, D] = P(null), y = X("(max-width: 681px)"), { renderedCards: w, shouldRenderAddCard: N } = jt({
|
|
1693
1705
|
controls: n,
|
|
1694
1706
|
customTitleContentAddCard: t,
|
|
1695
1707
|
decisions: r,
|
|
@@ -1697,21 +1709,21 @@ const Gt = T.div`
|
|
|
1697
1709
|
handleOpenModal: g,
|
|
1698
1710
|
handleDelete: f,
|
|
1699
1711
|
textValues: a,
|
|
1700
|
-
isOpenFor: (I) =>
|
|
1701
|
-
toggleAt: (I) =>
|
|
1712
|
+
isOpenFor: (I) => v === I,
|
|
1713
|
+
toggleAt: (I) => D((B) => B === I ? null : I)
|
|
1702
1714
|
}), A = (r == null ? void 0 : r.length) === 0 && !d;
|
|
1703
|
-
return /* @__PURE__ */ b(
|
|
1704
|
-
/* @__PURE__ */ i(
|
|
1705
|
-
|
|
1715
|
+
return /* @__PURE__ */ b(R, { children: [
|
|
1716
|
+
/* @__PURE__ */ i(Ot, { children: /* @__PURE__ */ i(Vt, { children: /* @__PURE__ */ i(x, { direction: "column", gap: "16px", padding: "6px", children: A ? /* @__PURE__ */ b(
|
|
1717
|
+
x,
|
|
1706
1718
|
{
|
|
1707
1719
|
direction: "column",
|
|
1708
1720
|
gap: "28px",
|
|
1709
1721
|
width: "100%",
|
|
1710
|
-
height:
|
|
1722
|
+
height: y ? "auto" : "435px",
|
|
1711
1723
|
justifyContent: "center",
|
|
1712
1724
|
alignItems: "center",
|
|
1713
1725
|
children: [
|
|
1714
|
-
/* @__PURE__ */ i(E, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ b(
|
|
1726
|
+
/* @__PURE__ */ i(E, { as: "span", type: "label", size: "large", appearance: "gray", children: o || /* @__PURE__ */ b(R, { children: [
|
|
1715
1727
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1716
1728
|
/* @__PURE__ */ b(
|
|
1717
1729
|
E,
|
|
@@ -1731,7 +1743,7 @@ const Gt = T.div`
|
|
|
1731
1743
|
"para empezar."
|
|
1732
1744
|
] }) }),
|
|
1733
1745
|
/* @__PURE__ */ i(
|
|
1734
|
-
|
|
1746
|
+
H,
|
|
1735
1747
|
{
|
|
1736
1748
|
iconBefore: /* @__PURE__ */ i(Ce, {}),
|
|
1737
1749
|
onClick: () => g ? g() : null,
|
|
@@ -1751,10 +1763,10 @@ const Gt = T.div`
|
|
|
1751
1763
|
autoRows: "auto",
|
|
1752
1764
|
justifyItems: "center",
|
|
1753
1765
|
padding: "6px",
|
|
1754
|
-
height:
|
|
1766
|
+
height: y ? "auto" : "484px",
|
|
1755
1767
|
children: [
|
|
1756
1768
|
w,
|
|
1757
|
-
N &&
|
|
1769
|
+
N && _e({
|
|
1758
1770
|
type: "add",
|
|
1759
1771
|
index: r == null ? void 0 : r.length,
|
|
1760
1772
|
controls: n,
|
|
@@ -1770,36 +1782,36 @@ const Gt = T.div`
|
|
|
1770
1782
|
]
|
|
1771
1783
|
}
|
|
1772
1784
|
) }) }) }),
|
|
1773
|
-
|
|
1774
|
-
|
|
1785
|
+
c && /* @__PURE__ */ i(
|
|
1786
|
+
Yt,
|
|
1775
1787
|
{
|
|
1776
1788
|
portalId: "modal-portal",
|
|
1777
|
-
onCloseModal:
|
|
1789
|
+
onCloseModal: u,
|
|
1778
1790
|
title: l ? "Editar Decisión" : "Configurar Decisión",
|
|
1779
1791
|
description: "Diligencia los campos para configurar tu decisión.",
|
|
1780
1792
|
children: /* @__PURE__ */ i(
|
|
1781
|
-
|
|
1793
|
+
ro,
|
|
1782
1794
|
{
|
|
1783
1795
|
decision: l || s,
|
|
1784
1796
|
onSubmitEvent: p,
|
|
1785
1797
|
textValues: a,
|
|
1786
|
-
onCancel: () =>
|
|
1798
|
+
onCancel: () => u ? u() : () => {
|
|
1787
1799
|
}
|
|
1788
1800
|
}
|
|
1789
1801
|
)
|
|
1790
1802
|
}
|
|
1791
1803
|
)
|
|
1792
1804
|
] });
|
|
1793
|
-
},
|
|
1805
|
+
}, ao = {
|
|
1794
1806
|
border: {
|
|
1795
1807
|
color: C.palette.neutral.N40
|
|
1796
1808
|
}
|
|
1797
|
-
},
|
|
1809
|
+
}, io = T.div`
|
|
1798
1810
|
border-width: 1px;
|
|
1799
1811
|
border-style: solid;
|
|
1800
1812
|
border-color: ${({ theme: e }) => {
|
|
1801
1813
|
var n, t;
|
|
1802
|
-
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) ||
|
|
1814
|
+
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || ao.border.color;
|
|
1803
1815
|
}};
|
|
1804
1816
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
1805
1817
|
margin: ${({ $margin: e }) => e};
|
|
@@ -1808,7 +1820,7 @@ const Gt = T.div`
|
|
|
1808
1820
|
height: ${({ $height: e }) => e};
|
|
1809
1821
|
box-sizing: border-box;
|
|
1810
1822
|
`;
|
|
1811
|
-
function
|
|
1823
|
+
function lo(e) {
|
|
1812
1824
|
const {
|
|
1813
1825
|
children: n,
|
|
1814
1826
|
padding: t = "16px",
|
|
@@ -1818,7 +1830,7 @@ function oo(e) {
|
|
|
1818
1830
|
height: s
|
|
1819
1831
|
} = e;
|
|
1820
1832
|
return /* @__PURE__ */ i(
|
|
1821
|
-
|
|
1833
|
+
io,
|
|
1822
1834
|
{
|
|
1823
1835
|
$padding: t,
|
|
1824
1836
|
$margin: o,
|
|
@@ -1829,24 +1841,24 @@ function oo(e) {
|
|
|
1829
1841
|
}
|
|
1830
1842
|
);
|
|
1831
1843
|
}
|
|
1832
|
-
const
|
|
1833
|
-
const [t, o] = P([]), [r, a] = P([]), [s,
|
|
1834
|
-
return
|
|
1844
|
+
const so = (e, n) => {
|
|
1845
|
+
const [t, o] = P([]), [r, a] = P([]), [s, c] = P(!1), l = ue(null);
|
|
1846
|
+
return te(() => {
|
|
1835
1847
|
if (!e.current || !l.current) return;
|
|
1836
|
-
const d = e.current, g = l.current,
|
|
1848
|
+
const d = e.current, g = l.current, u = () => {
|
|
1837
1849
|
var N;
|
|
1838
1850
|
const f = d.clientWidth, m = Array.from(
|
|
1839
1851
|
g.querySelectorAll('[data-filter-tag="true"]')
|
|
1840
|
-
),
|
|
1841
|
-
let
|
|
1842
|
-
const
|
|
1852
|
+
), v = 48;
|
|
1853
|
+
let D = 0;
|
|
1854
|
+
const y = [], w = [];
|
|
1843
1855
|
for (let A = 0; A < n.length; A++) {
|
|
1844
1856
|
const S = ((N = m[A]) == null ? void 0 : N.offsetWidth) ?? 0;
|
|
1845
|
-
|
|
1857
|
+
D + S + v <= f ? (y.push(n[A]), D += S) : w.push(n[A]);
|
|
1846
1858
|
}
|
|
1847
|
-
o(
|
|
1859
|
+
o(y), a(w), c(w.length > 0);
|
|
1848
1860
|
}, p = new ResizeObserver(() => {
|
|
1849
|
-
requestAnimationFrame(
|
|
1861
|
+
requestAnimationFrame(u);
|
|
1850
1862
|
});
|
|
1851
1863
|
return p.observe(d), () => p.disconnect();
|
|
1852
1864
|
}, [n, e]), { visible: t, hidden: r, showOverflowIndicator: s, measurementRef: l };
|
|
@@ -1856,21 +1868,21 @@ T.div`
|
|
|
1856
1868
|
width: 100%;
|
|
1857
1869
|
}
|
|
1858
1870
|
`;
|
|
1859
|
-
const
|
|
1871
|
+
const co = T.div`
|
|
1860
1872
|
position: absolute;
|
|
1861
1873
|
top: calc(100% + 4px);
|
|
1862
1874
|
right: 0;
|
|
1863
1875
|
z-index: 1000;
|
|
1864
1876
|
width: 170px;
|
|
1865
|
-
`,
|
|
1877
|
+
`, uo = T.div`
|
|
1866
1878
|
position: absolute;
|
|
1867
1879
|
visibility: hidden;
|
|
1868
1880
|
pointer-events: none;
|
|
1869
1881
|
height: 0;
|
|
1870
1882
|
overflow: hidden;
|
|
1871
|
-
`,
|
|
1883
|
+
`, go = T.div`
|
|
1872
1884
|
cursor: pointer;
|
|
1873
|
-
`,
|
|
1885
|
+
`, Ue = {
|
|
1874
1886
|
border: {
|
|
1875
1887
|
color: {
|
|
1876
1888
|
regular: C.palette.neutral.N40,
|
|
@@ -1906,7 +1918,7 @@ const ao = T.div`
|
|
|
1906
1918
|
hover: C.palette.neutral.N30
|
|
1907
1919
|
}
|
|
1908
1920
|
}
|
|
1909
|
-
},
|
|
1921
|
+
}, po = T.li`
|
|
1910
1922
|
display: flex;
|
|
1911
1923
|
align-items: center;
|
|
1912
1924
|
align-self: stretch;
|
|
@@ -1921,17 +1933,17 @@ const ao = T.div`
|
|
|
1921
1933
|
&:hover {
|
|
1922
1934
|
background-color: ${({ theme: e }) => {
|
|
1923
1935
|
var n, t, o;
|
|
1924
|
-
return ((o = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : o.regular) ||
|
|
1936
|
+
return ((o = (t = (n = e == null ? void 0 : e.input) == null ? void 0 : n.background) == null ? void 0 : t.color) == null ? void 0 : o.regular) || Ue.background.color.regular;
|
|
1925
1937
|
}};
|
|
1926
1938
|
}
|
|
1927
|
-
`,
|
|
1928
|
-
var p, f, m,
|
|
1929
|
-
const { id: n, label: t, leadingIcon: o, onClose: r } = e, [a, s] = P(!1),
|
|
1939
|
+
`, ho = (e) => {
|
|
1940
|
+
var p, f, m, v, D, y;
|
|
1941
|
+
const { id: n, label: t, leadingIcon: o, onClose: r } = e, [a, s] = P(!1), c = () => s(!0), l = () => s(!1), d = Qn(Zn), g = ((m = (f = (p = d == null ? void 0 : d.input) == null ? void 0 : p.option) == null ? void 0 : f.appearance) == null ? void 0 : m.hover) ?? Ue.option.appearance.hover, u = ((y = (D = (v = d == null ? void 0 : d.input) == null ? void 0 : v.option) == null ? void 0 : D.appearance) == null ? void 0 : y.regular) ?? Ue.option.appearance.regular;
|
|
1930
1942
|
return /* @__PURE__ */ i(
|
|
1931
|
-
|
|
1943
|
+
po,
|
|
1932
1944
|
{
|
|
1933
1945
|
id: n,
|
|
1934
|
-
onMouseEnter:
|
|
1946
|
+
onMouseEnter: c,
|
|
1935
1947
|
onMouseLeave: l,
|
|
1936
1948
|
onClick: (w) => {
|
|
1937
1949
|
w.stopPropagation();
|
|
@@ -1949,7 +1961,7 @@ const ao = T.div`
|
|
|
1949
1961
|
{
|
|
1950
1962
|
icon: o,
|
|
1951
1963
|
size: "medium",
|
|
1952
|
-
appearance: a ? g :
|
|
1964
|
+
appearance: a ? g : u
|
|
1953
1965
|
}
|
|
1954
1966
|
),
|
|
1955
1967
|
/* @__PURE__ */ i(
|
|
@@ -1957,19 +1969,19 @@ const ao = T.div`
|
|
|
1957
1969
|
{
|
|
1958
1970
|
textAlign: "start",
|
|
1959
1971
|
size: "medium",
|
|
1960
|
-
appearance: a ? g :
|
|
1972
|
+
appearance: a ? g : u,
|
|
1961
1973
|
children: t
|
|
1962
1974
|
}
|
|
1963
1975
|
),
|
|
1964
1976
|
/* @__PURE__ */ i(
|
|
1965
1977
|
O,
|
|
1966
1978
|
{
|
|
1967
|
-
icon: /* @__PURE__ */ i(
|
|
1979
|
+
icon: /* @__PURE__ */ i(_n, {}),
|
|
1968
1980
|
size: "small",
|
|
1969
1981
|
onClick: (w) => {
|
|
1970
1982
|
w.stopPropagation(), r == null || r();
|
|
1971
1983
|
},
|
|
1972
|
-
appearance: a ? g :
|
|
1984
|
+
appearance: a ? g : u,
|
|
1973
1985
|
cursorHover: !0
|
|
1974
1986
|
}
|
|
1975
1987
|
)
|
|
@@ -1978,7 +1990,7 @@ const ao = T.div`
|
|
|
1978
1990
|
)
|
|
1979
1991
|
}
|
|
1980
1992
|
);
|
|
1981
|
-
},
|
|
1993
|
+
}, ca = (e) => {
|
|
1982
1994
|
const {
|
|
1983
1995
|
appliedFilters: n = [],
|
|
1984
1996
|
onClear: t,
|
|
@@ -1986,33 +1998,33 @@ const ao = T.div`
|
|
|
1986
1998
|
noFiltersLabel: r,
|
|
1987
1999
|
titleClearFilter: a,
|
|
1988
2000
|
titleFilter: s
|
|
1989
|
-
} = e,
|
|
2001
|
+
} = e, c = ue(null), l = ue(null), d = ue(null), {
|
|
1990
2002
|
visible: g,
|
|
1991
|
-
hidden:
|
|
2003
|
+
hidden: u,
|
|
1992
2004
|
showOverflowIndicator: p,
|
|
1993
2005
|
measurementRef: f
|
|
1994
|
-
} =
|
|
1995
|
-
S.stopPropagation(),
|
|
2006
|
+
} = so(c, n), [m, v] = P(!1), D = (S) => {
|
|
2007
|
+
S.stopPropagation(), v((I) => !I);
|
|
1996
2008
|
};
|
|
1997
|
-
|
|
2009
|
+
te(() => {
|
|
1998
2010
|
const S = (I) => {
|
|
1999
|
-
var
|
|
2000
|
-
const
|
|
2001
|
-
!((
|
|
2011
|
+
var Ke, Je;
|
|
2012
|
+
const B = I.target;
|
|
2013
|
+
!((Ke = l.current) != null && Ke.contains(B)) && !((Je = d.current) != null && Je.contains(B)) && v(!1);
|
|
2002
2014
|
};
|
|
2003
2015
|
return m && window.addEventListener("mousedown", S), () => window.removeEventListener("mousedown", S);
|
|
2004
2016
|
}, [m]);
|
|
2005
|
-
const
|
|
2017
|
+
const y = n.length === 0, w = m && u.length > 0, N = u.map((S) => ({
|
|
2006
2018
|
id: S.label,
|
|
2007
2019
|
value: S.label,
|
|
2008
2020
|
label: S.label,
|
|
2009
2021
|
icon: S.icon
|
|
2010
2022
|
})), A = (S) => {
|
|
2011
|
-
var I,
|
|
2012
|
-
(
|
|
2023
|
+
var I, B;
|
|
2024
|
+
(B = (I = u.find(($) => $.label === S)) == null ? void 0 : I.onClose) == null || B.call(I), v(!1);
|
|
2013
2025
|
};
|
|
2014
|
-
return /* @__PURE__ */ b(
|
|
2015
|
-
/* @__PURE__ */ i(
|
|
2026
|
+
return /* @__PURE__ */ b(lo, { borderRadius: "8px", width: "100%", children: [
|
|
2027
|
+
/* @__PURE__ */ i(uo, { ref: f, children: n.map((S) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
|
|
2016
2028
|
ce,
|
|
2017
2029
|
{
|
|
2018
2030
|
appearance: "primary",
|
|
@@ -2025,9 +2037,9 @@ const ao = T.div`
|
|
|
2025
2037
|
) }, S.label)) }),
|
|
2026
2038
|
/* @__PURE__ */ b(Ne, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
2027
2039
|
/* @__PURE__ */ i(
|
|
2028
|
-
|
|
2040
|
+
j,
|
|
2029
2041
|
{
|
|
2030
|
-
ref:
|
|
2042
|
+
ref: c,
|
|
2031
2043
|
background: !0,
|
|
2032
2044
|
borderRadius: "8px",
|
|
2033
2045
|
height: "100%",
|
|
@@ -2036,7 +2048,7 @@ const ao = T.div`
|
|
|
2036
2048
|
alignItems: "center",
|
|
2037
2049
|
padding: "0px 8px",
|
|
2038
2050
|
border: !0,
|
|
2039
|
-
children:
|
|
2051
|
+
children: y ? /* @__PURE__ */ i(E, { size: "small", type: "label", appearance: "gray", children: r }) : /* @__PURE__ */ b(R, { children: [
|
|
2040
2052
|
g.map((S) => /* @__PURE__ */ i(
|
|
2041
2053
|
ce,
|
|
2042
2054
|
{
|
|
@@ -2056,27 +2068,27 @@ const ao = T.div`
|
|
|
2056
2068
|
ref: d,
|
|
2057
2069
|
style: { position: "relative", display: "inline-block" },
|
|
2058
2070
|
children: [
|
|
2059
|
-
/* @__PURE__ */ i(
|
|
2071
|
+
/* @__PURE__ */ i(go, { onClick: D, children: /* @__PURE__ */ i(
|
|
2060
2072
|
ce,
|
|
2061
2073
|
{
|
|
2062
2074
|
appearance: "primary",
|
|
2063
|
-
label: `+${
|
|
2075
|
+
label: `+${u.length}`
|
|
2064
2076
|
}
|
|
2065
2077
|
) }),
|
|
2066
|
-
w && /* @__PURE__ */ i(
|
|
2067
|
-
|
|
2078
|
+
w && /* @__PURE__ */ i(co, { ref: l, children: /* @__PURE__ */ i(
|
|
2079
|
+
Wn,
|
|
2068
2080
|
{
|
|
2069
2081
|
options: N,
|
|
2070
2082
|
onOptionClick: A,
|
|
2071
|
-
children:
|
|
2072
|
-
|
|
2083
|
+
children: u.map((S) => /* @__PURE__ */ i(
|
|
2084
|
+
ho,
|
|
2073
2085
|
{
|
|
2074
2086
|
id: S.label,
|
|
2075
2087
|
label: S.label,
|
|
2076
2088
|
leadingIcon: S.icon,
|
|
2077
2089
|
onClose: () => {
|
|
2078
2090
|
var I;
|
|
2079
|
-
(I = S.onClose) == null || I.call(S),
|
|
2091
|
+
(I = S.onClose) == null || I.call(S), v(!1);
|
|
2080
2092
|
}
|
|
2081
2093
|
},
|
|
2082
2094
|
S.label
|
|
@@ -2090,21 +2102,21 @@ const ao = T.div`
|
|
|
2090
2102
|
}
|
|
2091
2103
|
),
|
|
2092
2104
|
/* @__PURE__ */ i(
|
|
2093
|
-
|
|
2105
|
+
H,
|
|
2094
2106
|
{
|
|
2095
2107
|
cursorHover: !0,
|
|
2096
|
-
disabled:
|
|
2097
|
-
iconBefore: /* @__PURE__ */ i(
|
|
2108
|
+
disabled: y,
|
|
2109
|
+
iconBefore: /* @__PURE__ */ i(bn, {}),
|
|
2098
2110
|
onClick: t,
|
|
2099
2111
|
variant: "outlined",
|
|
2100
2112
|
children: a
|
|
2101
2113
|
}
|
|
2102
2114
|
),
|
|
2103
2115
|
/* @__PURE__ */ i(
|
|
2104
|
-
|
|
2116
|
+
H,
|
|
2105
2117
|
{
|
|
2106
2118
|
cursorHover: !0,
|
|
2107
|
-
iconBefore: /* @__PURE__ */ i(
|
|
2119
|
+
iconBefore: /* @__PURE__ */ i(vn, {}),
|
|
2108
2120
|
onClick: o,
|
|
2109
2121
|
variant: "outlined",
|
|
2110
2122
|
children: s
|
|
@@ -2112,7 +2124,7 @@ const ao = T.div`
|
|
|
2112
2124
|
)
|
|
2113
2125
|
] })
|
|
2114
2126
|
] });
|
|
2115
|
-
},
|
|
2127
|
+
}, fo = T.div`
|
|
2116
2128
|
display: flex;
|
|
2117
2129
|
flex-direction: column;
|
|
2118
2130
|
background-color: ${({ theme: e }) => {
|
|
@@ -2125,7 +2137,7 @@ const ao = T.div`
|
|
|
2125
2137
|
padding: 24px;
|
|
2126
2138
|
gap: 24px;
|
|
2127
2139
|
box-sizing: border-box;
|
|
2128
|
-
`,
|
|
2140
|
+
`, ua = (e) => {
|
|
2129
2141
|
const {
|
|
2130
2142
|
actionButtonLabel: n,
|
|
2131
2143
|
cancelButtonLabel: t,
|
|
@@ -2133,19 +2145,19 @@ const ao = T.div`
|
|
|
2133
2145
|
loading: r,
|
|
2134
2146
|
onClick: a,
|
|
2135
2147
|
onCloseModal: s,
|
|
2136
|
-
portalId:
|
|
2148
|
+
portalId: c,
|
|
2137
2149
|
title: l
|
|
2138
|
-
} = e, d = X("(max-width: 768px)"), g = document.getElementById(
|
|
2150
|
+
} = e, d = X("(max-width: 768px)"), g = document.getElementById(c);
|
|
2139
2151
|
if (!g)
|
|
2140
2152
|
throw new Error(
|
|
2141
2153
|
"The portal node is not defined. This can occur when the specific node used to render the portal has not been defined correctly."
|
|
2142
2154
|
);
|
|
2143
|
-
return
|
|
2144
|
-
/* @__PURE__ */ i(
|
|
2145
|
-
/* @__PURE__ */ b(
|
|
2146
|
-
/* @__PURE__ */ b(
|
|
2155
|
+
return Xe(
|
|
2156
|
+
/* @__PURE__ */ i(Ye, { children: /* @__PURE__ */ b(fo, { $smallScreen: d, children: [
|
|
2157
|
+
/* @__PURE__ */ b(x, { direction: "column", gap: "16px", children: [
|
|
2158
|
+
/* @__PURE__ */ b(x, { alignContent: "center", justifyContent: "space-between", children: [
|
|
2147
2159
|
/* @__PURE__ */ i(E, { appearance: "dark", size: "small", type: "headline", children: l }),
|
|
2148
|
-
/* @__PURE__ */ b(
|
|
2160
|
+
/* @__PURE__ */ b(x, { alignItems: "center", children: [
|
|
2149
2161
|
/* @__PURE__ */ i(E, { children: "Cerrar" }),
|
|
2150
2162
|
/* @__PURE__ */ i(
|
|
2151
2163
|
O,
|
|
@@ -2161,20 +2173,20 @@ const ao = T.div`
|
|
|
2161
2173
|
/* @__PURE__ */ i(q, {})
|
|
2162
2174
|
] }),
|
|
2163
2175
|
o,
|
|
2164
|
-
/* @__PURE__ */ b(
|
|
2176
|
+
/* @__PURE__ */ b(x, { gap: "20px", justifyContent: "flex-end", children: [
|
|
2165
2177
|
/* @__PURE__ */ i(
|
|
2166
|
-
|
|
2178
|
+
H,
|
|
2167
2179
|
{
|
|
2168
2180
|
appearance: "gray",
|
|
2169
2181
|
onClick: s,
|
|
2170
|
-
iconBefore: /* @__PURE__ */ i(
|
|
2182
|
+
iconBefore: /* @__PURE__ */ i(bn, {}),
|
|
2171
2183
|
spacing: "wide",
|
|
2172
2184
|
variant: "outlined",
|
|
2173
2185
|
children: t
|
|
2174
2186
|
}
|
|
2175
2187
|
),
|
|
2176
2188
|
/* @__PURE__ */ i(
|
|
2177
|
-
|
|
2189
|
+
H,
|
|
2178
2190
|
{
|
|
2179
2191
|
appearance: "primary",
|
|
2180
2192
|
loading: r,
|
|
@@ -2188,14 +2200,14 @@ const ao = T.div`
|
|
|
2188
2200
|
] }) }),
|
|
2189
2201
|
g
|
|
2190
2202
|
);
|
|
2191
|
-
},
|
|
2203
|
+
}, ga = (e) => {
|
|
2192
2204
|
const { appliedFilters: n, fields: t, onChange: o, noFiltersLabel: r } = e, a = X("(max-width: 768px)"), s = !n || n.length === 0;
|
|
2193
|
-
return /* @__PURE__ */ b(
|
|
2194
|
-
a && /* @__PURE__ */ b(
|
|
2195
|
-
/* @__PURE__ */ b(
|
|
2196
|
-
/* @__PURE__ */ i(O, { appearance: "gray", icon: /* @__PURE__ */ i(
|
|
2205
|
+
return /* @__PURE__ */ b(x, { direction: "column", gap: "16px", children: [
|
|
2206
|
+
a && /* @__PURE__ */ b(R, { children: [
|
|
2207
|
+
/* @__PURE__ */ b(x, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
2208
|
+
/* @__PURE__ */ i(O, { appearance: "gray", icon: /* @__PURE__ */ i(vn, {}) }),
|
|
2197
2209
|
/* @__PURE__ */ i(
|
|
2198
|
-
|
|
2210
|
+
j,
|
|
2199
2211
|
{
|
|
2200
2212
|
background: !0,
|
|
2201
2213
|
borderRadius: "8px",
|
|
@@ -2206,55 +2218,55 @@ const ao = T.div`
|
|
|
2206
2218
|
border: !0,
|
|
2207
2219
|
width: "100%",
|
|
2208
2220
|
height: "36px",
|
|
2209
|
-
children: s ? /* @__PURE__ */ i(E, { size: "small", type: "label", appearance: "gray", children: r }) : n == null ? void 0 : n.map((
|
|
2221
|
+
children: s ? /* @__PURE__ */ i(E, { size: "small", type: "label", appearance: "gray", children: r }) : n == null ? void 0 : n.map((c) => /* @__PURE__ */ i(
|
|
2210
2222
|
ce,
|
|
2211
2223
|
{
|
|
2212
2224
|
appearance: "primary",
|
|
2213
2225
|
displayIcon: !0,
|
|
2214
|
-
icon:
|
|
2215
|
-
label:
|
|
2216
|
-
onClose:
|
|
2226
|
+
icon: c.icon,
|
|
2227
|
+
label: c.label,
|
|
2228
|
+
onClose: c.onClose,
|
|
2217
2229
|
removable: !0
|
|
2218
2230
|
},
|
|
2219
|
-
|
|
2231
|
+
c.label
|
|
2220
2232
|
))
|
|
2221
2233
|
}
|
|
2222
2234
|
)
|
|
2223
2235
|
] }),
|
|
2224
2236
|
/* @__PURE__ */ i(q, { dashed: !0 })
|
|
2225
2237
|
] }),
|
|
2226
|
-
t.map((
|
|
2227
|
-
/* @__PURE__ */ i(
|
|
2238
|
+
t.map((c) => /* @__PURE__ */ b(x, { gap: "6px", alignItems: "center", children: [
|
|
2239
|
+
/* @__PURE__ */ i(x, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(O, { appearance: "primary", icon: c.icon }) }),
|
|
2228
2240
|
/* @__PURE__ */ i(
|
|
2229
|
-
|
|
2241
|
+
Gn,
|
|
2230
2242
|
{
|
|
2231
|
-
disabled:
|
|
2232
|
-
invalid:
|
|
2233
|
-
label:
|
|
2234
|
-
message:
|
|
2235
|
-
name:
|
|
2243
|
+
disabled: c.disabled,
|
|
2244
|
+
invalid: c.invalid,
|
|
2245
|
+
label: c.label,
|
|
2246
|
+
message: c.message,
|
|
2247
|
+
name: c.name,
|
|
2236
2248
|
onChange: o,
|
|
2237
|
-
options:
|
|
2238
|
-
placeholder:
|
|
2239
|
-
required:
|
|
2240
|
-
values:
|
|
2249
|
+
options: c.options,
|
|
2250
|
+
placeholder: c.placeholder,
|
|
2251
|
+
required: c.required,
|
|
2252
|
+
values: c.values,
|
|
2241
2253
|
fullwidth: !0
|
|
2242
2254
|
},
|
|
2243
|
-
|
|
2255
|
+
c.name
|
|
2244
2256
|
)
|
|
2245
|
-
] },
|
|
2257
|
+
] }, c.name))
|
|
2246
2258
|
] });
|
|
2247
|
-
},
|
|
2259
|
+
}, mo = (e) => {
|
|
2248
2260
|
const n = [];
|
|
2249
2261
|
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(";");
|
|
2250
|
-
},
|
|
2262
|
+
}, pa = (e) => {
|
|
2251
2263
|
var s;
|
|
2252
|
-
const { decision: n, fallbackId: t, template: o } = e, r = (
|
|
2253
|
-
var
|
|
2254
|
-
const d =
|
|
2264
|
+
const { decision: n, fallbackId: t, template: o } = e, r = (c) => typeof c == "object" && c !== null && "from" in c && "to" in c ? mo(c) : c, a = ((s = n.conditionsThatEstablishesTheDecision) == null ? void 0 : s.map((c, l) => {
|
|
2265
|
+
var u;
|
|
2266
|
+
const d = c == null ? void 0 : c.value;
|
|
2255
2267
|
return d == null || typeof d == "string" && d.trim() === "" || Array.isArray(d) && d.length === 0 ? null : {
|
|
2256
|
-
...(
|
|
2257
|
-
...
|
|
2268
|
+
...(u = o.conditionsThatEstablishesTheDecision) == null ? void 0 : u[l],
|
|
2269
|
+
...c,
|
|
2258
2270
|
value: r(d)
|
|
2259
2271
|
};
|
|
2260
2272
|
}).filter(Boolean)) ?? [];
|
|
@@ -2265,7 +2277,7 @@ const ao = T.div`
|
|
|
2265
2277
|
value: r(n.value),
|
|
2266
2278
|
conditionsThatEstablishesTheDecision: a
|
|
2267
2279
|
};
|
|
2268
|
-
},
|
|
2280
|
+
}, ha = (e) => {
|
|
2269
2281
|
if (typeof e != "string") return e;
|
|
2270
2282
|
const n = e.split(";").map((o) => o.trim()), t = {};
|
|
2271
2283
|
for (const o of n)
|
|
@@ -2277,7 +2289,7 @@ const ao = T.div`
|
|
|
2277
2289
|
isNaN(r) || (t.to = r);
|
|
2278
2290
|
}
|
|
2279
2291
|
return t.from !== void 0 || t.to !== void 0 ? t : e;
|
|
2280
|
-
},
|
|
2292
|
+
}, fa = (e) => {
|
|
2281
2293
|
const { dataDecision: n, originalDecision: t } = e, o = {
|
|
2282
2294
|
conditionName: n.ruleName || "",
|
|
2283
2295
|
labelName: n.labelName || "",
|
|
@@ -2293,7 +2305,7 @@ const ao = T.div`
|
|
|
2293
2305
|
(r) => r.hidden ? { ...o } : r
|
|
2294
2306
|
)
|
|
2295
2307
|
};
|
|
2296
|
-
},
|
|
2308
|
+
}, ma = (e) => {
|
|
2297
2309
|
const { decisions: n } = e;
|
|
2298
2310
|
return n == null ? void 0 : n.map((t) => {
|
|
2299
2311
|
var r;
|
|
@@ -2312,14 +2324,14 @@ const ao = T.div`
|
|
|
2312
2324
|
)
|
|
2313
2325
|
} : t;
|
|
2314
2326
|
});
|
|
2315
|
-
},
|
|
2327
|
+
}, bo = (e) => ({
|
|
2316
2328
|
schema: le().required("Requerido").test(
|
|
2317
2329
|
"non-empty",
|
|
2318
2330
|
"El valor no puede estar vacío",
|
|
2319
2331
|
(n) => n != null && n.trim() !== ""
|
|
2320
2332
|
),
|
|
2321
2333
|
value: e
|
|
2322
|
-
}),
|
|
2334
|
+
}), vo = (e) => ({
|
|
2323
2335
|
schema: ke().test(
|
|
2324
2336
|
"isArrayOrString",
|
|
2325
2337
|
"Debe ser un array de strings/numbers o un solo string",
|
|
@@ -2328,7 +2340,7 @@ const ao = T.div`
|
|
|
2328
2340
|
) : typeof n == "string"
|
|
2329
2341
|
),
|
|
2330
2342
|
value: e
|
|
2331
|
-
}),
|
|
2343
|
+
}), xo = (e) => ({
|
|
2332
2344
|
schema: ke().test(
|
|
2333
2345
|
"isArrayOrString",
|
|
2334
2346
|
"Debe ser un array de strings/numbers o un solo string ",
|
|
@@ -2337,7 +2349,7 @@ const ao = T.div`
|
|
|
2337
2349
|
) : typeof n == "string"
|
|
2338
2350
|
),
|
|
2339
2351
|
value: e
|
|
2340
|
-
}),
|
|
2352
|
+
}), Do = (e) => {
|
|
2341
2353
|
const n = (e == null ? void 0 : e.from) ?? 0, t = (e == null ? void 0 : e.to) ?? 0;
|
|
2342
2354
|
return {
|
|
2343
2355
|
schema: Z({
|
|
@@ -2353,28 +2365,28 @@ const ao = T.div`
|
|
|
2353
2365
|
}),
|
|
2354
2366
|
value: { from: n, to: t }
|
|
2355
2367
|
};
|
|
2356
|
-
},
|
|
2368
|
+
}, Me = (e, n) => n === U.PERCENTAGE ? {
|
|
2357
2369
|
schema: ae().required("El campo tipo porcentaje es requerido").min(0, "El campo tipo porcentaje no puede ser menor que 0").max(100, "El campo tipo porcentaje no puede ser mayor que 100"),
|
|
2358
2370
|
value: e
|
|
2359
2371
|
} : {
|
|
2360
2372
|
schema: le().required("Requerido"),
|
|
2361
2373
|
value: e
|
|
2362
|
-
},
|
|
2363
|
-
[k.LIST_OF_VALUES]:
|
|
2364
|
-
[k.LIST_OF_VALUES_MULTI]:
|
|
2365
|
-
[k.RANGE]:
|
|
2366
|
-
[k.GREATER_THAN]:
|
|
2367
|
-
[k.LESS_THAN]:
|
|
2368
|
-
[k.EQUAL]:
|
|
2369
|
-
},
|
|
2370
|
-
function
|
|
2374
|
+
}, yo = {
|
|
2375
|
+
[k.LIST_OF_VALUES]: vo,
|
|
2376
|
+
[k.LIST_OF_VALUES_MULTI]: xo,
|
|
2377
|
+
[k.RANGE]: Do,
|
|
2378
|
+
[k.GREATER_THAN]: Me,
|
|
2379
|
+
[k.LESS_THAN]: Me,
|
|
2380
|
+
[k.EQUAL]: Me
|
|
2381
|
+
}, rn = (e) => yo[e] || bo;
|
|
2382
|
+
function To({
|
|
2371
2383
|
decision: e,
|
|
2372
2384
|
onSubmitEvent: n,
|
|
2373
2385
|
textValues: t
|
|
2374
2386
|
}) {
|
|
2375
2387
|
const o = {
|
|
2376
2388
|
ruleName: e.ruleName || "",
|
|
2377
|
-
decisionDataType: e.decisionDataType ||
|
|
2389
|
+
decisionDataType: e.decisionDataType || U.ALPHABETICAL,
|
|
2378
2390
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
2379
2391
|
value: e.value || "",
|
|
2380
2392
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -2387,7 +2399,7 @@ function vo({
|
|
|
2387
2399
|
let r;
|
|
2388
2400
|
const a = {
|
|
2389
2401
|
ruleName: le().required("El nombre de la regla es requerido"),
|
|
2390
|
-
value:
|
|
2402
|
+
value: ye(() => rn(
|
|
2391
2403
|
r.values.howToSetTheDecision
|
|
2392
2404
|
)(
|
|
2393
2405
|
r.values.value,
|
|
@@ -2430,16 +2442,16 @@ function vo({
|
|
|
2430
2442
|
// },
|
|
2431
2443
|
// );
|
|
2432
2444
|
// }),
|
|
2433
|
-
conditionsThatEstablishesTheDecision:
|
|
2445
|
+
conditionsThatEstablishesTheDecision: ye((l, { parent: d }) => {
|
|
2434
2446
|
var p;
|
|
2435
2447
|
if ((d == null ? void 0 : d.toggleNone) && Object.keys(d.conditionsThatEstablishesTheDecision || {}).length > 0) return Z().shape({});
|
|
2436
|
-
const
|
|
2448
|
+
const u = ((p = e.conditionsThatEstablishesTheDecision) == null ? void 0 : p.reduce(
|
|
2437
2449
|
(f, m) => {
|
|
2438
2450
|
if (r.values.conditionsThatEstablishesTheDecision[m.conditionName] !== void 0) {
|
|
2439
|
-
const
|
|
2451
|
+
const D = rn(
|
|
2440
2452
|
m.howToSetTheCondition
|
|
2441
2453
|
);
|
|
2442
|
-
f[m.conditionName] =
|
|
2454
|
+
f[m.conditionName] = D(
|
|
2443
2455
|
m.value,
|
|
2444
2456
|
m.conditionDataType
|
|
2445
2457
|
).schema;
|
|
@@ -2448,7 +2460,7 @@ function vo({
|
|
|
2448
2460
|
},
|
|
2449
2461
|
{}
|
|
2450
2462
|
)) ?? {};
|
|
2451
|
-
return Z(
|
|
2463
|
+
return Z(u);
|
|
2452
2464
|
})
|
|
2453
2465
|
};
|
|
2454
2466
|
t.terms && (a.effectiveFrom = Te().required(
|
|
@@ -2479,12 +2491,12 @@ function vo({
|
|
|
2479
2491
|
value: l.value,
|
|
2480
2492
|
effectiveFrom: l.effectiveFrom,
|
|
2481
2493
|
validUntil: l.validUntil,
|
|
2482
|
-
conditionsThatEstablishesTheDecision: (g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter((
|
|
2483
|
-
const p = l.conditionsThatEstablishesTheDecision[
|
|
2494
|
+
conditionsThatEstablishesTheDecision: (g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter((u) => {
|
|
2495
|
+
const p = l.conditionsThatEstablishesTheDecision[u.conditionName];
|
|
2484
2496
|
return p != null && p !== "";
|
|
2485
|
-
}).map((
|
|
2486
|
-
...
|
|
2487
|
-
value: l.conditionsThatEstablishesTheDecision[
|
|
2497
|
+
}).map((u) => ({
|
|
2498
|
+
...u,
|
|
2499
|
+
value: l.conditionsThatEstablishesTheDecision[u.conditionName]
|
|
2488
2500
|
}))
|
|
2489
2501
|
};
|
|
2490
2502
|
n(d);
|
|
@@ -2498,16 +2510,16 @@ function vo({
|
|
|
2498
2510
|
void 0
|
|
2499
2511
|
);
|
|
2500
2512
|
else {
|
|
2501
|
-
const
|
|
2513
|
+
const u = g.howToSetTheCondition === k.LIST_OF_VALUES_MULTI ? [] : "";
|
|
2502
2514
|
r.setFieldValue(
|
|
2503
2515
|
`conditionsThatEstablishesTheDecision.${g.conditionName}`,
|
|
2504
|
-
|
|
2516
|
+
u
|
|
2505
2517
|
);
|
|
2506
2518
|
}
|
|
2507
2519
|
});
|
|
2508
2520
|
} };
|
|
2509
2521
|
}
|
|
2510
|
-
const
|
|
2522
|
+
const wo = T.div`
|
|
2511
2523
|
& > div {
|
|
2512
2524
|
border-radius: 8px;
|
|
2513
2525
|
border: 1px solid
|
|
@@ -2516,7 +2528,7 @@ const Do = T.div`
|
|
|
2516
2528
|
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || C.palette.neutral.N30;
|
|
2517
2529
|
}};
|
|
2518
2530
|
}
|
|
2519
|
-
`,
|
|
2531
|
+
`, So = T.div`
|
|
2520
2532
|
width: 100%;
|
|
2521
2533
|
height: 100%;
|
|
2522
2534
|
overflow-y: auto;
|
|
@@ -2533,7 +2545,7 @@ const Do = T.div`
|
|
|
2533
2545
|
background-color: #ebecf0;
|
|
2534
2546
|
border-radius: 8px;
|
|
2535
2547
|
}
|
|
2536
|
-
`,
|
|
2548
|
+
`, Co = (e) => {
|
|
2537
2549
|
const {
|
|
2538
2550
|
checked: n,
|
|
2539
2551
|
children: t,
|
|
@@ -2541,14 +2553,14 @@ const Do = T.div`
|
|
|
2541
2553
|
id: r,
|
|
2542
2554
|
labelToggle: a,
|
|
2543
2555
|
name: s,
|
|
2544
|
-
valueToggle:
|
|
2545
|
-
} = e, [l, d] = P(n), g = (
|
|
2546
|
-
d(
|
|
2556
|
+
valueToggle: c = ""
|
|
2557
|
+
} = e, [l, d] = P(n), g = (u) => {
|
|
2558
|
+
d(u.target.checked), o(u);
|
|
2547
2559
|
};
|
|
2548
|
-
return
|
|
2560
|
+
return te(() => {
|
|
2549
2561
|
d(n);
|
|
2550
|
-
}, [n]), /* @__PURE__ */ b(
|
|
2551
|
-
/* @__PURE__ */ i(
|
|
2562
|
+
}, [n]), /* @__PURE__ */ b(R, { children: [
|
|
2563
|
+
/* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(
|
|
2552
2564
|
Ee,
|
|
2553
2565
|
{
|
|
2554
2566
|
checked: l,
|
|
@@ -2556,13 +2568,13 @@ const Do = T.div`
|
|
|
2556
2568
|
name: s,
|
|
2557
2569
|
onChange: g,
|
|
2558
2570
|
size: "small",
|
|
2559
|
-
value:
|
|
2571
|
+
value: c,
|
|
2560
2572
|
children: /* @__PURE__ */ i(E, { size: "medium", type: "label", weight: "bold", children: a })
|
|
2561
2573
|
}
|
|
2562
2574
|
) }),
|
|
2563
|
-
l && /* @__PURE__ */ i(
|
|
2575
|
+
l && /* @__PURE__ */ i(R, { children: t })
|
|
2564
2576
|
] });
|
|
2565
|
-
},
|
|
2577
|
+
}, No = (e) => {
|
|
2566
2578
|
const {
|
|
2567
2579
|
onHandleStartChange: n,
|
|
2568
2580
|
onHandleEndChange: t,
|
|
@@ -2570,22 +2582,22 @@ const Do = T.div`
|
|
|
2570
2582
|
labelStart: r,
|
|
2571
2583
|
labelEnd: a,
|
|
2572
2584
|
checkedClosed: s = !1,
|
|
2573
|
-
required:
|
|
2585
|
+
required: c = !1,
|
|
2574
2586
|
valueStart: l = "",
|
|
2575
2587
|
valueEnd: d = "",
|
|
2576
2588
|
messageStart: g = "",
|
|
2577
|
-
messageEnd:
|
|
2589
|
+
messageEnd: u = "",
|
|
2578
2590
|
statusStart: p = "pending",
|
|
2579
2591
|
statusEnd: f = "pending"
|
|
2580
|
-
} = e, [m,
|
|
2581
|
-
|
|
2592
|
+
} = e, [m, v] = P(s), [D, y] = P(l), [w, N] = P(d), A = ({ target: $ }) => {
|
|
2593
|
+
v($.checked), o && o($.checked);
|
|
2582
2594
|
}, S = ($) => {
|
|
2583
|
-
|
|
2595
|
+
y($.target.value), n($);
|
|
2584
2596
|
}, I = ($) => {
|
|
2585
2597
|
N($.target.value), t($);
|
|
2586
|
-
},
|
|
2587
|
-
return /* @__PURE__ */ b(
|
|
2588
|
-
/* @__PURE__ */ b(
|
|
2598
|
+
}, B = X("(max-width: 400px)");
|
|
2599
|
+
return /* @__PURE__ */ b(R, { children: [
|
|
2600
|
+
/* @__PURE__ */ b(x, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
2589
2601
|
/* @__PURE__ */ i(
|
|
2590
2602
|
E,
|
|
2591
2603
|
{
|
|
@@ -2598,14 +2610,14 @@ const Do = T.div`
|
|
|
2598
2610
|
}
|
|
2599
2611
|
),
|
|
2600
2612
|
/* @__PURE__ */ i(
|
|
2601
|
-
|
|
2613
|
+
x,
|
|
2602
2614
|
{
|
|
2603
2615
|
alignContent: "center",
|
|
2604
2616
|
justifyContent: "center",
|
|
2605
2617
|
wrap: "wrap",
|
|
2606
2618
|
gap: "4px",
|
|
2607
2619
|
children: /* @__PURE__ */ i(
|
|
2608
|
-
|
|
2620
|
+
xn,
|
|
2609
2621
|
{
|
|
2610
2622
|
label: "Cerrada",
|
|
2611
2623
|
onChange: A,
|
|
@@ -2617,43 +2629,43 @@ const Do = T.div`
|
|
|
2617
2629
|
)
|
|
2618
2630
|
] }),
|
|
2619
2631
|
/* @__PURE__ */ b(
|
|
2620
|
-
|
|
2632
|
+
x,
|
|
2621
2633
|
{
|
|
2622
|
-
direction:
|
|
2634
|
+
direction: B ? "column" : "row",
|
|
2623
2635
|
justifyContent: "space-between",
|
|
2624
2636
|
gap: "24px",
|
|
2625
2637
|
children: [
|
|
2626
2638
|
/* @__PURE__ */ i(
|
|
2627
|
-
|
|
2639
|
+
xe,
|
|
2628
2640
|
{
|
|
2629
2641
|
id: "dateStart",
|
|
2630
2642
|
label: r,
|
|
2631
2643
|
onChange: S,
|
|
2632
|
-
value:
|
|
2633
|
-
required:
|
|
2644
|
+
value: D,
|
|
2645
|
+
required: c,
|
|
2634
2646
|
size: "compact",
|
|
2635
2647
|
status: p,
|
|
2636
2648
|
message: g
|
|
2637
2649
|
}
|
|
2638
2650
|
),
|
|
2639
2651
|
m && /* @__PURE__ */ i(
|
|
2640
|
-
|
|
2652
|
+
xe,
|
|
2641
2653
|
{
|
|
2642
2654
|
id: "dateEnd",
|
|
2643
2655
|
label: a,
|
|
2644
2656
|
onChange: I,
|
|
2645
2657
|
value: w,
|
|
2646
|
-
required:
|
|
2658
|
+
required: c,
|
|
2647
2659
|
size: "compact",
|
|
2648
2660
|
status: f,
|
|
2649
|
-
message:
|
|
2661
|
+
message: u
|
|
2650
2662
|
}
|
|
2651
2663
|
)
|
|
2652
2664
|
]
|
|
2653
2665
|
}
|
|
2654
2666
|
)
|
|
2655
2667
|
] });
|
|
2656
|
-
},
|
|
2668
|
+
}, Eo = (e) => {
|
|
2657
2669
|
const {
|
|
2658
2670
|
formik: n,
|
|
2659
2671
|
textValues: t,
|
|
@@ -2661,20 +2673,20 @@ const Do = T.div`
|
|
|
2661
2673
|
visibleConditions: r,
|
|
2662
2674
|
normalizedDecision: a,
|
|
2663
2675
|
handleToggleNoneChange: s,
|
|
2664
|
-
handleConditionToggleChange:
|
|
2676
|
+
handleConditionToggleChange: c,
|
|
2665
2677
|
showConditionsError: l,
|
|
2666
2678
|
termStartStatus: d,
|
|
2667
2679
|
termEndStatus: g
|
|
2668
2680
|
} = e;
|
|
2669
|
-
return /* @__PURE__ */ i("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ b(
|
|
2670
|
-
|
|
2681
|
+
return /* @__PURE__ */ i("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ b(x, { direction: "column", gap: "24px", children: [
|
|
2682
|
+
De({
|
|
2671
2683
|
condition: a,
|
|
2672
2684
|
formik: n,
|
|
2673
2685
|
isDecision: !0
|
|
2674
2686
|
}),
|
|
2675
2687
|
/* @__PURE__ */ i(q, { dashed: !0 }),
|
|
2676
|
-
/* @__PURE__ */ i(
|
|
2677
|
-
|
|
2688
|
+
/* @__PURE__ */ i(wo, { children: /* @__PURE__ */ i(So, { children: /* @__PURE__ */ b(
|
|
2689
|
+
x,
|
|
2678
2690
|
{
|
|
2679
2691
|
direction: "column",
|
|
2680
2692
|
padding: "6px 12px",
|
|
@@ -2682,7 +2694,7 @@ const Do = T.div`
|
|
|
2682
2694
|
height: "272px",
|
|
2683
2695
|
children: [
|
|
2684
2696
|
/* @__PURE__ */ b(
|
|
2685
|
-
|
|
2697
|
+
x,
|
|
2686
2698
|
{
|
|
2687
2699
|
justifyContent: "space-between",
|
|
2688
2700
|
alignItems: "center",
|
|
@@ -2702,28 +2714,28 @@ const Do = T.div`
|
|
|
2702
2714
|
]
|
|
2703
2715
|
}
|
|
2704
2716
|
),
|
|
2705
|
-
/* @__PURE__ */ i(
|
|
2706
|
-
|
|
2717
|
+
/* @__PURE__ */ i(x, { direction: "column", gap: "20px", children: r == null ? void 0 : r.map((u) => /* @__PURE__ */ i(
|
|
2718
|
+
Co,
|
|
2707
2719
|
{
|
|
2708
|
-
id: `toggle-${
|
|
2709
|
-
name: `toggle.${
|
|
2710
|
-
labelToggle:
|
|
2711
|
-
checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[
|
|
2712
|
-
handleToggleChange: (p) =>
|
|
2713
|
-
|
|
2714
|
-
|
|
2720
|
+
id: `toggle-${u.conditionName}`,
|
|
2721
|
+
name: `toggle.${u.conditionName}`,
|
|
2722
|
+
labelToggle: u.labelName,
|
|
2723
|
+
checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[u.conditionName] !== void 0,
|
|
2724
|
+
handleToggleChange: (p) => c(
|
|
2725
|
+
u.conditionName,
|
|
2726
|
+
u.howToSetTheCondition === k.LIST_OF_VALUES_MULTI
|
|
2715
2727
|
)(p.target.checked),
|
|
2716
|
-
children:
|
|
2728
|
+
children: De({ condition: u, formik: n })
|
|
2717
2729
|
},
|
|
2718
|
-
|
|
2730
|
+
u.conditionName
|
|
2719
2731
|
)) })
|
|
2720
2732
|
]
|
|
2721
2733
|
}
|
|
2722
2734
|
) }) }),
|
|
2723
|
-
t.terms && /* @__PURE__ */ b(
|
|
2735
|
+
t.terms && /* @__PURE__ */ b(R, { children: [
|
|
2724
2736
|
/* @__PURE__ */ i(q, { dashed: !0 }),
|
|
2725
2737
|
/* @__PURE__ */ i(
|
|
2726
|
-
|
|
2738
|
+
No,
|
|
2727
2739
|
{
|
|
2728
2740
|
labelStart: t.termStart,
|
|
2729
2741
|
labelEnd: t.termEnd,
|
|
@@ -2733,10 +2745,10 @@ const Do = T.div`
|
|
|
2733
2745
|
messageEnd: n.errors.validUntil,
|
|
2734
2746
|
statusStart: d,
|
|
2735
2747
|
statusEnd: g,
|
|
2736
|
-
onHandleStartChange: (
|
|
2737
|
-
onHandleEndChange: (
|
|
2738
|
-
onCheckClosedChange: (
|
|
2739
|
-
n.setFieldValue("checkClosed",
|
|
2748
|
+
onHandleStartChange: (u) => n.setFieldValue("effectiveFrom", u.target.value),
|
|
2749
|
+
onHandleEndChange: (u) => n.setFieldValue("validUntil", u.target.value),
|
|
2750
|
+
onCheckClosedChange: (u) => {
|
|
2751
|
+
n.setFieldValue("checkClosed", u), u && n.setFieldValue("validUntil", "");
|
|
2740
2752
|
},
|
|
2741
2753
|
checkedClosed: n.values.checkClosed
|
|
2742
2754
|
}
|
|
@@ -2744,18 +2756,18 @@ const Do = T.div`
|
|
|
2744
2756
|
] }),
|
|
2745
2757
|
/* @__PURE__ */ i(q, {}),
|
|
2746
2758
|
l && /* @__PURE__ */ i(E, { type: "label", size: "medium", appearance: "danger", children: typeof n.errors.conditionsThatEstablishesTheDecision == "string" ? n.errors.conditionsThatEstablishesTheDecision : "Existen errores en el formulario, por favor revísalos." }),
|
|
2747
|
-
/* @__PURE__ */ b(
|
|
2748
|
-
/* @__PURE__ */ i(
|
|
2749
|
-
/* @__PURE__ */ i(
|
|
2759
|
+
/* @__PURE__ */ b(x, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
2760
|
+
/* @__PURE__ */ i(H, { appearance: "gray", onClick: o, children: t.cancel }),
|
|
2761
|
+
/* @__PURE__ */ i(H, { type: "submit", children: t.confirm })
|
|
2750
2762
|
] })
|
|
2751
2763
|
] }) });
|
|
2752
|
-
},
|
|
2764
|
+
}, ko = (e) => {
|
|
2753
2765
|
var f;
|
|
2754
|
-
const { decision: n, onSubmitEvent: t, textValues: o, onCancel: r } = e, { formik: a, handleToggleNoneChange: s } =
|
|
2766
|
+
const { decision: n, onSubmitEvent: t, textValues: o, onCancel: r } = e, { formik: a, handleToggleNoneChange: s } = To({
|
|
2755
2767
|
decision: n,
|
|
2756
2768
|
onSubmitEvent: t,
|
|
2757
2769
|
textValues: o
|
|
2758
|
-
}),
|
|
2770
|
+
}), c = {
|
|
2759
2771
|
ruleName: n.ruleName,
|
|
2760
2772
|
labelName: n.labelName,
|
|
2761
2773
|
howToSetTheCondition: n.howToSetTheDecision,
|
|
@@ -2763,19 +2775,19 @@ const Do = T.div`
|
|
|
2763
2775
|
listOfPossibleValues: n.listOfPossibleValues
|
|
2764
2776
|
}, l = ((f = n.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
|
|
2765
2777
|
(m) => !m.hidden
|
|
2766
|
-
)) || [], d = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, g = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0,
|
|
2778
|
+
)) || [], d = !!a.errors.conditionsThatEstablishesTheDecision && a.submitCount > 0, g = a.touched.effectiveFrom ? a.errors.effectiveFrom ? "invalid" : "valid" : void 0, u = a.touched.validUntil ? a.errors.validUntil ? "invalid" : "valid" : void 0;
|
|
2767
2779
|
return /* @__PURE__ */ i(
|
|
2768
|
-
|
|
2780
|
+
Eo,
|
|
2769
2781
|
{
|
|
2770
2782
|
formik: a,
|
|
2771
2783
|
onCancel: r,
|
|
2772
2784
|
textValues: o,
|
|
2773
2785
|
decision: n,
|
|
2774
2786
|
visibleConditions: l,
|
|
2775
|
-
normalizedDecision:
|
|
2787
|
+
normalizedDecision: c,
|
|
2776
2788
|
handleToggleNoneChange: s,
|
|
2777
|
-
handleConditionToggleChange: (m,
|
|
2778
|
-
if (!
|
|
2789
|
+
handleConditionToggleChange: (m, v) => (D) => {
|
|
2790
|
+
if (!D)
|
|
2779
2791
|
a.setFieldValue(
|
|
2780
2792
|
`conditionsThatEstablishesTheDecision.${m}`,
|
|
2781
2793
|
void 0
|
|
@@ -2785,19 +2797,19 @@ const Do = T.div`
|
|
|
2785
2797
|
!1
|
|
2786
2798
|
);
|
|
2787
2799
|
else {
|
|
2788
|
-
const
|
|
2800
|
+
const y = v ? [] : "";
|
|
2789
2801
|
a.setFieldValue(
|
|
2790
2802
|
`conditionsThatEstablishesTheDecision.${m}`,
|
|
2791
|
-
|
|
2803
|
+
y
|
|
2792
2804
|
);
|
|
2793
2805
|
}
|
|
2794
2806
|
},
|
|
2795
2807
|
showConditionsError: d,
|
|
2796
2808
|
termStartStatus: g,
|
|
2797
|
-
termEndStatus:
|
|
2809
|
+
termEndStatus: u
|
|
2798
2810
|
}
|
|
2799
2811
|
);
|
|
2800
|
-
},
|
|
2812
|
+
}, ba = (e) => {
|
|
2801
2813
|
var r;
|
|
2802
2814
|
const { decisionTemplate: n } = e, t = { ...n }, o = (r = t.conditionsThatEstablishesTheDecision) == null ? void 0 : r.find(
|
|
2803
2815
|
(a) => a.switchPlaces
|
|
@@ -2813,7 +2825,7 @@ const Do = T.div`
|
|
|
2813
2825
|
(a) => a.conditionName === o.conditionName ? { ...a, hidden: !0 } : a
|
|
2814
2826
|
)
|
|
2815
2827
|
} : t;
|
|
2816
|
-
},
|
|
2828
|
+
}, va = (e) => {
|
|
2817
2829
|
const { decisions: n } = e;
|
|
2818
2830
|
return n == null ? void 0 : n.map((t) => {
|
|
2819
2831
|
var r;
|
|
@@ -2849,7 +2861,7 @@ const Do = T.div`
|
|
|
2849
2861
|
color: C.palette.neutral.N0
|
|
2850
2862
|
}
|
|
2851
2863
|
}
|
|
2852
|
-
},
|
|
2864
|
+
}, Ao = T.div`
|
|
2853
2865
|
& > div {
|
|
2854
2866
|
border: 1px solid
|
|
2855
2867
|
${({ theme: e, $active: n }) => {
|
|
@@ -2865,27 +2877,27 @@ const Do = T.div`
|
|
|
2865
2877
|
return ((r = (o = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : o.background) == null ? void 0 : r.hover) || Q.item.background.hover;
|
|
2866
2878
|
}};
|
|
2867
2879
|
}
|
|
2868
|
-
`,
|
|
2880
|
+
`, an = T.div`
|
|
2869
2881
|
display: flex;
|
|
2870
2882
|
align-items: center;
|
|
2871
2883
|
gap: 12px;
|
|
2872
2884
|
width: 100%;
|
|
2873
2885
|
outline: none;
|
|
2874
2886
|
cursor: pointer;
|
|
2875
|
-
`,
|
|
2887
|
+
`, Io = T.div`
|
|
2876
2888
|
display: flex;
|
|
2877
2889
|
align-items: center;
|
|
2878
2890
|
outline: none;
|
|
2879
2891
|
cursor: pointer;
|
|
2880
|
-
`,
|
|
2892
|
+
`, $o = T(Tn)`
|
|
2881
2893
|
display: flex;
|
|
2882
2894
|
align-items: center;
|
|
2883
2895
|
text-decoration: none;
|
|
2884
|
-
`,
|
|
2896
|
+
`, Fo = T(Tn)`
|
|
2885
2897
|
display: block;
|
|
2886
2898
|
text-decoration: none;
|
|
2887
2899
|
color: inherit;
|
|
2888
|
-
`,
|
|
2900
|
+
`, Po = T.div`
|
|
2889
2901
|
& > div {
|
|
2890
2902
|
border-bottom: 1px solid
|
|
2891
2903
|
${({ theme: e, $active: n }) => {
|
|
@@ -2894,12 +2906,12 @@ const Do = T.div`
|
|
|
2894
2906
|
}};
|
|
2895
2907
|
border-radius: 8px 8px 0 0;
|
|
2896
2908
|
}
|
|
2897
|
-
`,
|
|
2909
|
+
`, Nn = T.div`
|
|
2898
2910
|
display: block;
|
|
2899
2911
|
text-decoration: none;
|
|
2900
2912
|
background-color: ${({ theme: e, $active: n }) => {
|
|
2901
|
-
var t, o, r, a, s,
|
|
2902
|
-
return n ? ((r = (o = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : o.background) == null ? void 0 : r.active) || Q.item.background.active : ((
|
|
2913
|
+
var t, o, r, a, s, c;
|
|
2914
|
+
return n ? ((r = (o = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : o.background) == null ? void 0 : r.active) || Q.item.background.active : ((c = (s = (a = e == null ? void 0 : e.menu) == null ? void 0 : a.item) == null ? void 0 : s.background) == null ? void 0 : c.inactive) || Q.item.background.inactive;
|
|
2903
2915
|
}};
|
|
2904
2916
|
&:last-child {
|
|
2905
2917
|
border-radius: 0 0 8px 8px;
|
|
@@ -2912,32 +2924,32 @@ const Do = T.div`
|
|
|
2912
2924
|
return ((a = (r = (o = n == null ? void 0 : n.menu) == null ? void 0 : o.item) == null ? void 0 : r.background) == null ? void 0 : a.hover) || Q.item.background.hover;
|
|
2913
2925
|
}};
|
|
2914
2926
|
}
|
|
2915
|
-
`,
|
|
2927
|
+
`, Ro = T.div`
|
|
2916
2928
|
display: flex;
|
|
2917
2929
|
flex-direction: column;
|
|
2918
2930
|
|
|
2919
|
-
& > a:last-child ${
|
|
2931
|
+
& > a:last-child ${Nn} {
|
|
2920
2932
|
border-radius: 0 0 8px 8px;
|
|
2921
2933
|
}
|
|
2922
|
-
`,
|
|
2923
|
-
const { isOpen: n, links: t, onClick: o, title: r, activeId: a, headerPath: s, headerActive:
|
|
2934
|
+
`, Lo = (e) => {
|
|
2935
|
+
const { isOpen: n, links: t, onClick: o, title: r, activeId: a, headerPath: s, headerActive: c } = e, l = (m) => {
|
|
2924
2936
|
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), o());
|
|
2925
2937
|
}, d = (m) => {
|
|
2926
2938
|
m.preventDefault(), m.stopPropagation(), o();
|
|
2927
2939
|
}, g = (m) => {
|
|
2928
2940
|
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), m.stopPropagation(), o());
|
|
2929
|
-
},
|
|
2930
|
-
return /* @__PURE__ */ i(
|
|
2941
|
+
}, u = n || c ? "primary" : "dark", p = n || c ? "bold" : "normal", f = z.useId();
|
|
2942
|
+
return /* @__PURE__ */ i(Ao, { $active: n, children: /* @__PURE__ */ b(j, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
2931
2943
|
/* @__PURE__ */ i(
|
|
2932
|
-
|
|
2944
|
+
Po,
|
|
2933
2945
|
{
|
|
2934
2946
|
$active: n && t.length > 0,
|
|
2935
2947
|
"aria-controls": f,
|
|
2936
2948
|
"aria-expanded": n,
|
|
2937
2949
|
onClick: d,
|
|
2938
2950
|
onKeyDown: g,
|
|
2939
|
-
children: s ? /* @__PURE__ */ i(
|
|
2940
|
-
|
|
2951
|
+
children: s ? /* @__PURE__ */ i($o, { to: s, children: /* @__PURE__ */ b(
|
|
2952
|
+
j,
|
|
2941
2953
|
{
|
|
2942
2954
|
alignItems: "center",
|
|
2943
2955
|
borderRadius: "8px",
|
|
@@ -2948,15 +2960,15 @@ const Do = T.div`
|
|
|
2948
2960
|
/* @__PURE__ */ i(
|
|
2949
2961
|
O,
|
|
2950
2962
|
{
|
|
2951
|
-
appearance:
|
|
2963
|
+
appearance: u,
|
|
2952
2964
|
cursorHover: !0,
|
|
2953
|
-
icon: n && t.length > 0 ? /* @__PURE__ */ i(
|
|
2965
|
+
icon: n && t.length > 0 ? /* @__PURE__ */ i(ze, {}) : /* @__PURE__ */ i(en, {})
|
|
2954
2966
|
}
|
|
2955
2967
|
),
|
|
2956
|
-
/* @__PURE__ */ i(
|
|
2968
|
+
/* @__PURE__ */ i(an, { children: /* @__PURE__ */ i(
|
|
2957
2969
|
E,
|
|
2958
2970
|
{
|
|
2959
|
-
appearance:
|
|
2971
|
+
appearance: u,
|
|
2960
2972
|
cursorHover: !0,
|
|
2961
2973
|
size: "small",
|
|
2962
2974
|
type: "title",
|
|
@@ -2967,7 +2979,7 @@ const Do = T.div`
|
|
|
2967
2979
|
]
|
|
2968
2980
|
}
|
|
2969
2981
|
) }) : /* @__PURE__ */ b(
|
|
2970
|
-
|
|
2982
|
+
j,
|
|
2971
2983
|
{
|
|
2972
2984
|
alignItems: "center",
|
|
2973
2985
|
borderRadius: "8px",
|
|
@@ -2978,13 +2990,13 @@ const Do = T.div`
|
|
|
2978
2990
|
/* @__PURE__ */ i(
|
|
2979
2991
|
O,
|
|
2980
2992
|
{
|
|
2981
|
-
appearance:
|
|
2993
|
+
appearance: u,
|
|
2982
2994
|
cursorHover: !0,
|
|
2983
|
-
icon: n && t.length > 0 ? /* @__PURE__ */ i(
|
|
2995
|
+
icon: n && t.length > 0 ? /* @__PURE__ */ i(ze, {}) : /* @__PURE__ */ i(en, {})
|
|
2984
2996
|
}
|
|
2985
2997
|
),
|
|
2986
|
-
/* @__PURE__ */ i(
|
|
2987
|
-
|
|
2998
|
+
/* @__PURE__ */ i(an, { children: /* @__PURE__ */ i(
|
|
2999
|
+
Io,
|
|
2988
3000
|
{
|
|
2989
3001
|
"aria-controls": f,
|
|
2990
3002
|
"aria-expanded": n,
|
|
@@ -2993,7 +3005,7 @@ const Do = T.div`
|
|
|
2993
3005
|
children: /* @__PURE__ */ i(
|
|
2994
3006
|
E,
|
|
2995
3007
|
{
|
|
2996
|
-
appearance:
|
|
3008
|
+
appearance: u,
|
|
2997
3009
|
cursorHover: !0,
|
|
2998
3010
|
size: "small",
|
|
2999
3011
|
type: "title",
|
|
@@ -3008,24 +3020,24 @@ const Do = T.div`
|
|
|
3008
3020
|
)
|
|
3009
3021
|
}
|
|
3010
3022
|
),
|
|
3011
|
-
n && t.length > 0 && /* @__PURE__ */ i(
|
|
3012
|
-
const
|
|
3013
|
-
return /* @__PURE__ */ i(
|
|
3014
|
-
|
|
3023
|
+
n && t.length > 0 && /* @__PURE__ */ i(Ro, { id: f, children: t.map((m) => {
|
|
3024
|
+
const v = m.id === a;
|
|
3025
|
+
return /* @__PURE__ */ i(Fo, { to: m.path, children: /* @__PURE__ */ i(Nn, { $active: v, children: /* @__PURE__ */ b(
|
|
3026
|
+
x,
|
|
3015
3027
|
{
|
|
3016
3028
|
alignItems: "center",
|
|
3017
3029
|
direction: "row",
|
|
3018
3030
|
gap: "8px",
|
|
3019
|
-
padding:
|
|
3031
|
+
padding: v ? "8px 4px" : "8px 32px",
|
|
3020
3032
|
children: [
|
|
3021
|
-
|
|
3033
|
+
v && /* @__PURE__ */ i(O, { appearance: "primary", icon: /* @__PURE__ */ i(Un, {}) }),
|
|
3022
3034
|
/* @__PURE__ */ i(
|
|
3023
3035
|
E,
|
|
3024
3036
|
{
|
|
3025
|
-
appearance:
|
|
3037
|
+
appearance: v ? "primary" : "dark",
|
|
3026
3038
|
size: "small",
|
|
3027
3039
|
type: "title",
|
|
3028
|
-
weight:
|
|
3040
|
+
weight: v ? "bold" : "normal",
|
|
3029
3041
|
children: m.label
|
|
3030
3042
|
}
|
|
3031
3043
|
)
|
|
@@ -3034,7 +3046,7 @@ const Do = T.div`
|
|
|
3034
3046
|
) }) }, m.id);
|
|
3035
3047
|
}) })
|
|
3036
3048
|
] }) });
|
|
3037
|
-
},
|
|
3049
|
+
}, Mo = T.div`
|
|
3038
3050
|
& > div {
|
|
3039
3051
|
background: ${({ $background: e, theme: n }) => {
|
|
3040
3052
|
var t, o, r, a;
|
|
@@ -3042,25 +3054,25 @@ const Do = T.div`
|
|
|
3042
3054
|
}};
|
|
3043
3055
|
}
|
|
3044
3056
|
height: 90vh;
|
|
3045
|
-
`,
|
|
3046
|
-
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: o } = e, [r, a] = z.useState(t), s =
|
|
3057
|
+
`, xa = (e) => {
|
|
3058
|
+
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: o } = e, [r, a] = z.useState(t), s = Kn();
|
|
3047
3059
|
z.useEffect(() => {
|
|
3048
3060
|
n && a(null);
|
|
3049
3061
|
}, [n, s.pathname]);
|
|
3050
|
-
const
|
|
3062
|
+
const c = z.useCallback(
|
|
3051
3063
|
(d) => {
|
|
3052
3064
|
var g;
|
|
3053
|
-
return (g = d.find((
|
|
3065
|
+
return (g = d.find((u) => u.path === s.pathname)) == null ? void 0 : g.id;
|
|
3054
3066
|
},
|
|
3055
3067
|
[s.pathname]
|
|
3056
3068
|
), l = z.useCallback(
|
|
3057
3069
|
(d) => d ? s.pathname === d || s.pathname.startsWith(d + "/") : !1,
|
|
3058
3070
|
[s.pathname]
|
|
3059
3071
|
);
|
|
3060
|
-
return /* @__PURE__ */ i(
|
|
3061
|
-
|
|
3072
|
+
return /* @__PURE__ */ i(Mo, { $background: !0, children: /* @__PURE__ */ i(x, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: o.map((d) => /* @__PURE__ */ i(
|
|
3073
|
+
Lo,
|
|
3062
3074
|
{
|
|
3063
|
-
activeId:
|
|
3075
|
+
activeId: c(d.links),
|
|
3064
3076
|
headerPath: d.path,
|
|
3065
3077
|
headerActive: l(d.path),
|
|
3066
3078
|
isOpen: r === d.id,
|
|
@@ -3077,7 +3089,7 @@ function L(e) {
|
|
|
3077
3089
|
function ee(e) {
|
|
3078
3090
|
e.stopPropagation();
|
|
3079
3091
|
}
|
|
3080
|
-
function
|
|
3092
|
+
function En() {
|
|
3081
3093
|
const e = /* @__PURE__ */ new Map();
|
|
3082
3094
|
return [function(o, r) {
|
|
3083
3095
|
e.get(o) && e.get(o).forEach((a) => {
|
|
@@ -3088,8 +3100,8 @@ function Nn() {
|
|
|
3088
3100
|
a.push(r), e.set(o, a);
|
|
3089
3101
|
}];
|
|
3090
3102
|
}
|
|
3091
|
-
var [
|
|
3092
|
-
function
|
|
3103
|
+
var [kn, An] = En();
|
|
3104
|
+
function Oo(e, n) {
|
|
3093
3105
|
return e.source === n.source && e.flags.split("").sort().join("") === n.flags.split("").sort().join("");
|
|
3094
3106
|
}
|
|
3095
3107
|
function he(e, n, t = !0, o = ["__key"]) {
|
|
@@ -3099,7 +3111,7 @@ function he(e, n, t = !0, o = ["__key"]) {
|
|
|
3099
3111
|
if (e instanceof Date && n instanceof Date)
|
|
3100
3112
|
return e.getTime() === n.getTime();
|
|
3101
3113
|
if (e instanceof RegExp && n instanceof RegExp)
|
|
3102
|
-
return
|
|
3114
|
+
return Oo(e, n);
|
|
3103
3115
|
if (e === null || n === null) return !1;
|
|
3104
3116
|
const r = e, a = n;
|
|
3105
3117
|
if (Object.keys(r).length !== Object.keys(a).length) return !1;
|
|
@@ -3111,30 +3123,30 @@ function he(e, n, t = !0, o = ["__key"]) {
|
|
|
3111
3123
|
}
|
|
3112
3124
|
return !1;
|
|
3113
3125
|
}
|
|
3114
|
-
function
|
|
3126
|
+
function In(e) {
|
|
3115
3127
|
return e.split(" ").filter((n) => n);
|
|
3116
3128
|
}
|
|
3117
3129
|
function de(e) {
|
|
3118
3130
|
return { x: e.clientX, y: e.clientY };
|
|
3119
3131
|
}
|
|
3120
3132
|
Array();
|
|
3121
|
-
var
|
|
3122
|
-
function
|
|
3123
|
-
if (!
|
|
3133
|
+
var Qe = typeof window < "u", F = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
|
|
3134
|
+
function $n() {
|
|
3135
|
+
if (!Qe) return !1;
|
|
3124
3136
|
if ("userAgentData" in navigator)
|
|
3125
3137
|
return navigator.userAgentData.mobile === !0;
|
|
3126
3138
|
const e = navigator.userAgent, n = /android|iphone|ipod/i.test(e), t = /iPad/.test(e) || e.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
3127
3139
|
return n || t;
|
|
3128
3140
|
}
|
|
3129
|
-
var
|
|
3141
|
+
var Vo = {
|
|
3130
3142
|
affectedNodes: [],
|
|
3131
3143
|
coordinates: {
|
|
3132
3144
|
x: 0,
|
|
3133
3145
|
y: 0
|
|
3134
3146
|
},
|
|
3135
3147
|
currentTargetValue: void 0,
|
|
3136
|
-
on:
|
|
3137
|
-
emit:
|
|
3148
|
+
on: An,
|
|
3149
|
+
emit: kn,
|
|
3138
3150
|
originalZIndex: void 0,
|
|
3139
3151
|
pointerSelection: !1,
|
|
3140
3152
|
preventEnter: !1,
|
|
@@ -3160,16 +3172,16 @@ var Po = {
|
|
|
3160
3172
|
scrollDebounceTimeout: void 0,
|
|
3161
3173
|
frameIdX: void 0,
|
|
3162
3174
|
frameIdY: void 0
|
|
3163
|
-
}, h =
|
|
3164
|
-
function
|
|
3175
|
+
}, h = Vo, J = !1, ln, Oe;
|
|
3176
|
+
function zo() {
|
|
3165
3177
|
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 = { ...{
|
|
3166
3178
|
affectedNodes: [],
|
|
3167
3179
|
coordinates: {
|
|
3168
3180
|
x: 0,
|
|
3169
3181
|
y: 0
|
|
3170
3182
|
},
|
|
3171
|
-
on:
|
|
3172
|
-
emit:
|
|
3183
|
+
on: An,
|
|
3184
|
+
emit: kn,
|
|
3173
3185
|
currentTargetValue: void 0,
|
|
3174
3186
|
originalZIndex: void 0,
|
|
3175
3187
|
pointerId: void 0,
|
|
@@ -3202,38 +3214,38 @@ function Lo() {
|
|
|
3202
3214
|
frameIdY: void 0
|
|
3203
3215
|
} };
|
|
3204
3216
|
}
|
|
3205
|
-
function
|
|
3217
|
+
function Fn(e) {
|
|
3206
3218
|
return Object.assign(h, e), e.initialParent.data.emit("dragStarted", h), J = !1, h.emit("dragStarted", h), h;
|
|
3207
3219
|
}
|
|
3208
|
-
function
|
|
3209
|
-
h.activeState &&
|
|
3220
|
+
function Ho() {
|
|
3221
|
+
h.activeState && oe(h.activeState.parent, void 0, h), h.selectedState && ne(h.selectedState.nodes, h.selectedState.parent, h), h.selectedState = h.activeState = void 0;
|
|
3210
3222
|
}
|
|
3211
|
-
function
|
|
3212
|
-
if (h.pointerDown && (h.pointerDown.node.el.draggable = !0), h.pointerDown = void 0, !
|
|
3223
|
+
function _o() {
|
|
3224
|
+
if (h.pointerDown && (h.pointerDown.node.el.draggable = !0), h.pointerDown = void 0, !_(h)) return;
|
|
3213
3225
|
const e = h.currentParent.data.config;
|
|
3214
|
-
|
|
3226
|
+
_(h) && e.handleEnd(h);
|
|
3215
3227
|
}
|
|
3216
|
-
function
|
|
3217
|
-
e.key === "Escape" && (h.selectedState && ne(h.selectedState.nodes, h.selectedState.parent, h), h.activeState &&
|
|
3228
|
+
function Uo(e) {
|
|
3229
|
+
e.key === "Escape" && (h.selectedState && ne(h.selectedState.nodes, h.selectedState.parent, h), h.activeState && oe(h.activeState.parent, void 0, h), h.selectedState = h.activeState = void 0);
|
|
3218
3230
|
}
|
|
3219
|
-
function
|
|
3231
|
+
function jo(e) {
|
|
3220
3232
|
if (!M(h)) return;
|
|
3221
3233
|
J = !0;
|
|
3222
3234
|
const n = h.initialParent.data.config.handleEnd;
|
|
3223
3235
|
n(h);
|
|
3224
3236
|
}
|
|
3225
|
-
function
|
|
3237
|
+
function Bo(e) {
|
|
3226
3238
|
if (!M(h)) return;
|
|
3227
3239
|
L(e);
|
|
3228
3240
|
const { x: n, y: t } = de(e);
|
|
3229
3241
|
M(h) && $e({ x: n, y: t }, e, h);
|
|
3230
3242
|
}
|
|
3231
|
-
function
|
|
3243
|
+
function qo(e) {
|
|
3232
3244
|
if (!h.pointerDown || !h.pointerDown.validated) return;
|
|
3233
3245
|
const n = h.pointerDown.parent.data.config;
|
|
3234
|
-
if (!(e.pointerType === "mouse" &&
|
|
3235
|
-
if (
|
|
3236
|
-
|
|
3246
|
+
if (!(e.pointerType === "mouse" && !$n()))
|
|
3247
|
+
if (_(h))
|
|
3248
|
+
_(h) && dn(e, h);
|
|
3237
3249
|
else {
|
|
3238
3250
|
if (L(e), n.longPress && !h.longPress) {
|
|
3239
3251
|
clearTimeout(h.longPressTimeout), h.longPress = !1;
|
|
@@ -3241,7 +3253,7 @@ function _o(e) {
|
|
|
3241
3253
|
}
|
|
3242
3254
|
const t = n.draggedNodes(h.pointerDown);
|
|
3243
3255
|
n.dragstartClasses(h.pointerDown.node, t, n, !0);
|
|
3244
|
-
const o = h.pointerDown.node.el.getBoundingClientRect(), r =
|
|
3256
|
+
const o = h.pointerDown.node.el.getBoundingClientRect(), r = Dr(
|
|
3245
3257
|
h.pointerDown.node,
|
|
3246
3258
|
h.pointerDown.parent,
|
|
3247
3259
|
e,
|
|
@@ -3249,70 +3261,70 @@ function _o(e) {
|
|
|
3249
3261
|
t,
|
|
3250
3262
|
o
|
|
3251
3263
|
);
|
|
3252
|
-
|
|
3264
|
+
dn(e, r, !0);
|
|
3253
3265
|
}
|
|
3254
3266
|
}
|
|
3255
|
-
function
|
|
3267
|
+
function Yo({
|
|
3256
3268
|
parent: e,
|
|
3257
3269
|
getValues: n,
|
|
3258
3270
|
setValues: t,
|
|
3259
3271
|
config: o = {}
|
|
3260
3272
|
}) {
|
|
3261
3273
|
var l, d, g;
|
|
3262
|
-
if (!
|
|
3263
|
-
|
|
3264
|
-
dragover:
|
|
3265
|
-
pointerdown:
|
|
3266
|
-
pointerup:
|
|
3267
|
-
keydown:
|
|
3268
|
-
drop:
|
|
3269
|
-
pointermove:
|
|
3274
|
+
if (!Qe) return;
|
|
3275
|
+
ln || (ln = we(document, {
|
|
3276
|
+
dragover: Bo,
|
|
3277
|
+
pointerdown: Ho,
|
|
3278
|
+
pointerup: _o,
|
|
3279
|
+
keydown: Uo,
|
|
3280
|
+
drop: jo,
|
|
3281
|
+
pointermove: qo,
|
|
3270
3282
|
pointercancel: V(o.handlePointercancel),
|
|
3271
|
-
touchmove: (
|
|
3272
|
-
M(h) &&
|
|
3283
|
+
touchmove: (u) => {
|
|
3284
|
+
M(h) && u.cancelable && L(u);
|
|
3273
3285
|
},
|
|
3274
|
-
contextmenu: (
|
|
3275
|
-
|
|
3286
|
+
contextmenu: (u) => {
|
|
3287
|
+
_(h) && L(u);
|
|
3276
3288
|
}
|
|
3277
3289
|
})), Rn(e);
|
|
3278
|
-
const [r, a] =
|
|
3290
|
+
const [r, a] = En(), s = {
|
|
3279
3291
|
getValues: n,
|
|
3280
3292
|
setValues: t,
|
|
3281
3293
|
config: {
|
|
3282
3294
|
dragDropEffect: o.dragDropEffect ?? "move",
|
|
3283
3295
|
dragEffectAllowed: o.dragEffectAllowed ?? "move",
|
|
3284
|
-
draggedNodes:
|
|
3285
|
-
dragstartClasses:
|
|
3286
|
-
handleNodeKeydown:
|
|
3287
|
-
handleDragstart:
|
|
3288
|
-
handleNodeDragover:
|
|
3289
|
-
handleParentDragover:
|
|
3290
|
-
handleNodeDrop:
|
|
3291
|
-
handleNodeFocus:
|
|
3292
|
-
handleNodeBlur:
|
|
3293
|
-
handlePointercancel:
|
|
3294
|
-
handleEnd:
|
|
3295
|
-
handleDragend:
|
|
3296
|
-
handleParentFocus:
|
|
3297
|
-
handleNodePointerup:
|
|
3298
|
-
handleNodePointerover:
|
|
3299
|
-
handleParentPointerover:
|
|
3300
|
-
handleParentScroll:
|
|
3301
|
-
handleNodePointerdown:
|
|
3302
|
-
handleNodeDragenter:
|
|
3303
|
-
handleNodeDragleave:
|
|
3304
|
-
handleParentDrop:
|
|
3296
|
+
draggedNodes: ar,
|
|
3297
|
+
dragstartClasses: sr,
|
|
3298
|
+
handleNodeKeydown: ur,
|
|
3299
|
+
handleDragstart: lr,
|
|
3300
|
+
handleNodeDragover: Tr,
|
|
3301
|
+
handleParentDragover: wr,
|
|
3302
|
+
handleNodeDrop: pr,
|
|
3303
|
+
handleNodeFocus: hr,
|
|
3304
|
+
handleNodeBlur: fr,
|
|
3305
|
+
handlePointercancel: br,
|
|
3306
|
+
handleEnd: vr,
|
|
3307
|
+
handleDragend: mr,
|
|
3308
|
+
handleParentFocus: Wo,
|
|
3309
|
+
handleNodePointerup: xr,
|
|
3310
|
+
handleNodePointerover: gr,
|
|
3311
|
+
handleParentPointerover: Sr,
|
|
3312
|
+
handleParentScroll: ir,
|
|
3313
|
+
handleNodePointerdown: dr,
|
|
3314
|
+
handleNodeDragenter: Nr,
|
|
3315
|
+
handleNodeDragleave: Er,
|
|
3316
|
+
handleParentDrop: Zo,
|
|
3305
3317
|
multiDrag: o.multiDrag ?? !1,
|
|
3306
3318
|
nativeDrag: o.nativeDrag ?? !0,
|
|
3307
|
-
performSort:
|
|
3308
|
-
performTransfer:
|
|
3319
|
+
performSort: Xo,
|
|
3320
|
+
performTransfer: Go,
|
|
3309
3321
|
root: o.root ?? document,
|
|
3310
|
-
setupNode:
|
|
3311
|
-
setupNodeRemap:
|
|
3312
|
-
reapplyDragClasses:
|
|
3313
|
-
tearDownNode:
|
|
3314
|
-
tearDownNodeRemap:
|
|
3315
|
-
remapFinished:
|
|
3322
|
+
setupNode: Ko,
|
|
3323
|
+
setupNodeRemap: Ln,
|
|
3324
|
+
reapplyDragClasses: Jo,
|
|
3325
|
+
tearDownNode: nr,
|
|
3326
|
+
tearDownNodeRemap: er,
|
|
3327
|
+
remapFinished: or,
|
|
3316
3328
|
threshold: {
|
|
3317
3329
|
horizontal: 0,
|
|
3318
3330
|
vertical: 0
|
|
@@ -3325,26 +3337,26 @@ function Uo({
|
|
|
3325
3337
|
on: a,
|
|
3326
3338
|
emit: r
|
|
3327
3339
|
};
|
|
3328
|
-
new MutationObserver(
|
|
3340
|
+
new MutationObserver(tr).observe(e, { childList: !0 }), F.set(e, s), (l = o.plugins) == null || l.forEach((u) => {
|
|
3329
3341
|
var p, f;
|
|
3330
|
-
(f = (p =
|
|
3331
|
-
}), (d = o.plugins) == null || d.forEach((
|
|
3342
|
+
(f = (p = u(e)) == null ? void 0 : p.tearDown) == null || f.call(p);
|
|
3343
|
+
}), (d = o.plugins) == null || d.forEach((u) => {
|
|
3332
3344
|
var p, f;
|
|
3333
|
-
(f = (p =
|
|
3334
|
-
}), (g = o.plugins) == null || g.forEach((
|
|
3345
|
+
(f = (p = u(e)) == null ? void 0 : p.tearDown) == null || f.call(p);
|
|
3346
|
+
}), (g = o.plugins) == null || g.forEach((u) => {
|
|
3335
3347
|
var p, f;
|
|
3336
|
-
(f = (p =
|
|
3337
|
-
}),
|
|
3348
|
+
(f = (p = u(e)) == null ? void 0 : p.setup) == null || f.call(p);
|
|
3349
|
+
}), Qo(e, s), Ae(e, !0);
|
|
3338
3350
|
}
|
|
3339
|
-
function
|
|
3340
|
-
const { x: s, y:
|
|
3351
|
+
function Pn(e, n, t, o, r, a) {
|
|
3352
|
+
const { x: s, y: c } = de(t), l = e.el.getBoundingClientRect();
|
|
3341
3353
|
return {
|
|
3342
3354
|
affectedNodes: [],
|
|
3343
3355
|
ascendingDirection: !1,
|
|
3344
3356
|
clonedDraggedEls: [],
|
|
3345
3357
|
coordinates: {
|
|
3346
3358
|
x: s,
|
|
3347
|
-
y:
|
|
3359
|
+
y: c
|
|
3348
3360
|
},
|
|
3349
3361
|
draggedNode: {
|
|
3350
3362
|
el: e.el,
|
|
@@ -3366,21 +3378,21 @@ function Fn(e, n, t, o, r, a) {
|
|
|
3366
3378
|
currentTargetValue: e.data.value,
|
|
3367
3379
|
scrollEls: [],
|
|
3368
3380
|
startLeft: r || s - ((l == null ? void 0 : l.left) ?? 0),
|
|
3369
|
-
startTop: a ||
|
|
3381
|
+
startTop: a || c - ((l == null ? void 0 : l.top) ?? 0),
|
|
3370
3382
|
targetIndex: e.data.index,
|
|
3371
3383
|
transferred: !1
|
|
3372
3384
|
};
|
|
3373
3385
|
}
|
|
3374
|
-
function
|
|
3386
|
+
function Xo({
|
|
3375
3387
|
parent: e,
|
|
3376
3388
|
draggedNodes: n,
|
|
3377
3389
|
targetNodes: t
|
|
3378
3390
|
}) {
|
|
3379
3391
|
Ae(e.el);
|
|
3380
|
-
const o = n.map((l) => l.data.value), r = ie(e.el, e.data), a = n[0].data.index, s = [...e.data.enabledNodes],
|
|
3392
|
+
const o = n.map((l) => l.data.value), r = ie(e.el, e.data), a = n[0].data.index, s = [...e.data.enabledNodes], c = [
|
|
3381
3393
|
...r.filter((l) => !o.some((d) => he(l, d)))
|
|
3382
3394
|
];
|
|
3383
|
-
|
|
3395
|
+
c.splice(t[0].data.index, 0, ...o), "draggedNode" in h && (h.currentTargetValue = t[0].data.value), je(e.el, e.data, [...c]), e.data.config.onSort && e.data.config.onSort({
|
|
3384
3396
|
parent: {
|
|
3385
3397
|
el: e.el,
|
|
3386
3398
|
data: e.data
|
|
@@ -3388,7 +3400,7 @@ function jo({
|
|
|
3388
3400
|
previousValues: [...r],
|
|
3389
3401
|
previousNodes: [...s],
|
|
3390
3402
|
nodes: [...e.data.enabledNodes],
|
|
3391
|
-
values: [...
|
|
3403
|
+
values: [...c],
|
|
3392
3404
|
draggedNodes: n,
|
|
3393
3405
|
previousPosition: a,
|
|
3394
3406
|
position: t[0].data.index,
|
|
@@ -3396,7 +3408,7 @@ function jo({
|
|
|
3396
3408
|
state: h
|
|
3397
3409
|
});
|
|
3398
3410
|
}
|
|
3399
|
-
function
|
|
3411
|
+
function oe(e, n, t) {
|
|
3400
3412
|
if (!n) {
|
|
3401
3413
|
t.activeState = void 0;
|
|
3402
3414
|
return;
|
|
@@ -3416,24 +3428,24 @@ function ne(e, n, t) {
|
|
|
3416
3428
|
);
|
|
3417
3429
|
for (const a of r) {
|
|
3418
3430
|
a.el.setAttribute("aria-selected", "false");
|
|
3419
|
-
const s = t.selectedState.nodes.findIndex((
|
|
3431
|
+
const s = t.selectedState.nodes.findIndex((c) => c.el === a.el);
|
|
3420
3432
|
s !== -1 && t.selectedState.nodes.splice(s, 1);
|
|
3421
3433
|
}
|
|
3422
3434
|
}
|
|
3423
3435
|
function me(e, n, t, o, r = !1) {
|
|
3424
3436
|
o.pointerSelection = r;
|
|
3425
3437
|
for (const a of n)
|
|
3426
|
-
a.el.setAttribute("aria-selected", "true"),
|
|
3438
|
+
a.el.setAttribute("aria-selected", "true"), re([a.el], e.data.config.selectedClass, !0);
|
|
3427
3439
|
o.selectedState = {
|
|
3428
3440
|
nodes: n,
|
|
3429
3441
|
parent: e
|
|
3430
|
-
},
|
|
3442
|
+
}, oe(e, t, o);
|
|
3431
3443
|
}
|
|
3432
|
-
function
|
|
3444
|
+
function Wo(e, n) {
|
|
3433
3445
|
const t = e.targetData.parent.data.enabledNodes[0];
|
|
3434
|
-
t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ?
|
|
3446
|
+
t && (n.selectedState && n.selectedState.parent.el !== e.targetData.parent.el ? oe(e.targetData.parent, t, n) : n.selectedState || oe(e.targetData.parent, t, n));
|
|
3435
3447
|
}
|
|
3436
|
-
function
|
|
3448
|
+
function Go({
|
|
3437
3449
|
currentParent: e,
|
|
3438
3450
|
targetParent: n,
|
|
3439
3451
|
initialParent: t,
|
|
@@ -3443,18 +3455,18 @@ function Bo({
|
|
|
3443
3455
|
state: s
|
|
3444
3456
|
}) {
|
|
3445
3457
|
Ae(t.el);
|
|
3446
|
-
const
|
|
3458
|
+
const c = o.map((p) => p.data.value), l = [
|
|
3447
3459
|
...ie(e.el, e.data).filter(
|
|
3448
|
-
(p) => !
|
|
3460
|
+
(p) => !c.some((f) => he(p, f))
|
|
3449
3461
|
)
|
|
3450
3462
|
], d = ie(n.el, n.data), g = t.el === n.el && n.data.config.sortable === !1;
|
|
3451
|
-
let
|
|
3452
|
-
a.length ? (g ?
|
|
3463
|
+
let u;
|
|
3464
|
+
a.length ? (g ? u = r : n.data.config.sortable === !1 ? u = n.data.enabledNodes.length : u = a[0].data.index, d.splice(u, 0, ...c)) : (u = g ? r : n.data.enabledNodes.length, d.splice(u, 0, ...c)), je(e.el, e.data, l), je(n.el, n.data, d), n.data.config.onTransfer && n.data.config.onTransfer({
|
|
3453
3465
|
sourceParent: e,
|
|
3454
3466
|
targetParent: n,
|
|
3455
3467
|
initialParent: t,
|
|
3456
3468
|
draggedNodes: o,
|
|
3457
|
-
targetIndex:
|
|
3469
|
+
targetIndex: u,
|
|
3458
3470
|
state: s,
|
|
3459
3471
|
targetNodes: a
|
|
3460
3472
|
}), e.data.config.onTransfer && e.data.config.onTransfer({
|
|
@@ -3462,7 +3474,7 @@ function Bo({
|
|
|
3462
3474
|
targetParent: n,
|
|
3463
3475
|
initialParent: t,
|
|
3464
3476
|
draggedNodes: o,
|
|
3465
|
-
targetIndex:
|
|
3477
|
+
targetIndex: u,
|
|
3466
3478
|
state: s,
|
|
3467
3479
|
targetNodes: a || []
|
|
3468
3480
|
});
|
|
@@ -3470,32 +3482,32 @@ function Bo({
|
|
|
3470
3482
|
function ie(e, n) {
|
|
3471
3483
|
return [...n.getValues(e)];
|
|
3472
3484
|
}
|
|
3473
|
-
function
|
|
3485
|
+
function je(e, n, t) {
|
|
3474
3486
|
n.setValues(t, e);
|
|
3475
3487
|
}
|
|
3476
|
-
function
|
|
3488
|
+
function Zo(e, n) {
|
|
3477
3489
|
ee(e.e), J = !0;
|
|
3478
3490
|
const t = n.initialParent.data.config.handleEnd;
|
|
3479
3491
|
t(n);
|
|
3480
3492
|
}
|
|
3481
3493
|
function Rn(e) {
|
|
3482
|
-
const n =
|
|
3494
|
+
const n = F.get(e);
|
|
3483
3495
|
n && n.abortControllers.mainParent && n.abortControllers.mainParent.abort();
|
|
3484
3496
|
}
|
|
3485
3497
|
function M(e) {
|
|
3486
3498
|
return "draggedNode" in e && !!e.draggedNode;
|
|
3487
3499
|
}
|
|
3488
|
-
function
|
|
3500
|
+
function _(e) {
|
|
3489
3501
|
return "synthDragging" in e && !!e.synthDragging;
|
|
3490
3502
|
}
|
|
3491
|
-
function
|
|
3503
|
+
function Qo(e, n) {
|
|
3492
3504
|
n.abortControllers.mainParent = we(e, {
|
|
3493
3505
|
dragover: be(n.config.handleParentDragover),
|
|
3494
3506
|
handleParentPointerover: n.config.handleParentPointerover,
|
|
3495
3507
|
scroll: be(n.config.handleParentScroll),
|
|
3496
3508
|
drop: be(n.config.handleParentDrop),
|
|
3497
3509
|
hasNestedParent: (t) => {
|
|
3498
|
-
const o =
|
|
3510
|
+
const o = F.get(t.target);
|
|
3499
3511
|
o && (o.nestedParent = t.detail.parent);
|
|
3500
3512
|
},
|
|
3501
3513
|
focus: be(n.config.handleParentFocus)
|
|
@@ -3516,7 +3528,7 @@ function Xo(e, n) {
|
|
|
3516
3528
|
if (!r) return;
|
|
3517
3529
|
const a = o.parentNode;
|
|
3518
3530
|
if (!(a instanceof HTMLElement)) return;
|
|
3519
|
-
const s =
|
|
3531
|
+
const s = F.get(a);
|
|
3520
3532
|
s && (h.pointerDown = {
|
|
3521
3533
|
parent: {
|
|
3522
3534
|
el: a,
|
|
@@ -3532,7 +3544,7 @@ function Xo(e, n) {
|
|
|
3532
3544
|
}
|
|
3533
3545
|
));
|
|
3534
3546
|
}
|
|
3535
|
-
function
|
|
3547
|
+
function Ko(e) {
|
|
3536
3548
|
var t;
|
|
3537
3549
|
const n = e.parent.data.config;
|
|
3538
3550
|
e.node.data.abortControllers.mainNode = we(e.node.el, {
|
|
@@ -3553,48 +3565,48 @@ function Wo(e) {
|
|
|
3553
3565
|
M(h) && o.cancelable && L(o);
|
|
3554
3566
|
},
|
|
3555
3567
|
contextmenu: (o) => {
|
|
3556
|
-
|
|
3568
|
+
_(h) && L(o);
|
|
3557
3569
|
}
|
|
3558
3570
|
}), e.node.el.draggable = !0, n.reapplyDragClasses(e.node.el, e.parent.data), (t = e.parent.data.config.plugins) == null || t.forEach((o) => {
|
|
3559
3571
|
var r, a;
|
|
3560
3572
|
(a = (r = o(e.parent.el)) == null ? void 0 : r.setupNode) == null || a.call(r, e);
|
|
3561
3573
|
});
|
|
3562
3574
|
}
|
|
3563
|
-
function
|
|
3575
|
+
function Ln(e) {
|
|
3564
3576
|
var n;
|
|
3565
3577
|
Y.set(e.node.el, e.node.data), (n = e.parent.data.config.plugins) == null || n.forEach((t) => {
|
|
3566
3578
|
var o, r;
|
|
3567
3579
|
(r = (o = t(e.parent.el)) == null ? void 0 : o.setupNodeRemap) == null || r.call(o, e);
|
|
3568
3580
|
});
|
|
3569
3581
|
}
|
|
3570
|
-
function
|
|
3582
|
+
function Jo(e, n) {
|
|
3571
3583
|
if (!M(h)) return;
|
|
3572
|
-
const t =
|
|
3573
|
-
h.draggedNode.el === e &&
|
|
3584
|
+
const t = _(h) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
|
|
3585
|
+
h.draggedNode.el === e && re([e], t, !0);
|
|
3574
3586
|
}
|
|
3575
|
-
function
|
|
3587
|
+
function er(e) {
|
|
3576
3588
|
var n;
|
|
3577
3589
|
(n = e.parent.data.config.plugins) == null || n.forEach((t) => {
|
|
3578
3590
|
var o, r;
|
|
3579
3591
|
(r = (o = t(e.parent.el)) == null ? void 0 : o.tearDownNodeRemap) == null || r.call(o, e);
|
|
3580
3592
|
});
|
|
3581
3593
|
}
|
|
3582
|
-
function
|
|
3594
|
+
function nr(e) {
|
|
3583
3595
|
var n, t, o, r, a;
|
|
3584
3596
|
(n = e.parent.data.config.plugins) == null || n.forEach((s) => {
|
|
3585
|
-
var
|
|
3586
|
-
(l = (
|
|
3597
|
+
var c, l;
|
|
3598
|
+
(l = (c = s(e.parent.el)) == null ? void 0 : c.tearDownNode) == null || l.call(c, e);
|
|
3587
3599
|
}), e.node.el.draggable = !1, (o = (t = e.node.data) == null ? void 0 : t.abortControllers) != null && o.mainNode && ((a = (r = e.node.data) == null ? void 0 : r.abortControllers) == null || a.mainNode.abort());
|
|
3588
3600
|
}
|
|
3589
|
-
function
|
|
3601
|
+
function tr(e) {
|
|
3590
3602
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
3591
3603
|
return;
|
|
3592
3604
|
const n = e[0].target;
|
|
3593
|
-
!(n instanceof HTMLElement) || !
|
|
3605
|
+
!(n instanceof HTMLElement) || !F.get(n) || Ae(n);
|
|
3594
3606
|
}
|
|
3595
3607
|
function Ae(e, n) {
|
|
3596
|
-
var
|
|
3597
|
-
const t =
|
|
3608
|
+
var c;
|
|
3609
|
+
const t = F.get(e);
|
|
3598
3610
|
if (!t) return;
|
|
3599
3611
|
t.privateClasses = Array.from(e.classList);
|
|
3600
3612
|
const o = [], r = t.config;
|
|
@@ -3623,7 +3635,7 @@ function Ae(e, n) {
|
|
|
3623
3635
|
for (let l = 0; l < o.length; l++) {
|
|
3624
3636
|
const d = o[l], g = Y.get(d);
|
|
3625
3637
|
if (r.draggableValue && !r.draggableValue(a[l])) continue;
|
|
3626
|
-
const
|
|
3638
|
+
const u = Object.assign(
|
|
3627
3639
|
g ?? {
|
|
3628
3640
|
privateClasses: [],
|
|
3629
3641
|
abortControllers: {}
|
|
@@ -3633,26 +3645,26 @@ function Ae(e, n) {
|
|
|
3633
3645
|
index: l
|
|
3634
3646
|
}
|
|
3635
3647
|
);
|
|
3636
|
-
if (!M(h) && h.activeState && he(h.activeState.node.data.value,
|
|
3648
|
+
if (!M(h) && h.activeState && he(h.activeState.node.data.value, u.value) && oe(
|
|
3637
3649
|
{
|
|
3638
3650
|
data: t,
|
|
3639
3651
|
el: e
|
|
3640
3652
|
},
|
|
3641
3653
|
{
|
|
3642
3654
|
el: d,
|
|
3643
|
-
data:
|
|
3655
|
+
data: u
|
|
3644
3656
|
},
|
|
3645
3657
|
h
|
|
3646
|
-
), M(h) && he(h.draggedNode.data.value,
|
|
3647
|
-
h.draggedNode.data =
|
|
3658
|
+
), M(h) && he(h.draggedNode.data.value, u.value)) {
|
|
3659
|
+
h.draggedNode.data = u, h.draggedNode.el = d;
|
|
3648
3660
|
const p = h.draggedNodes.find(
|
|
3649
|
-
(f) => f.data.value ===
|
|
3661
|
+
(f) => f.data.value === u.value
|
|
3650
3662
|
);
|
|
3651
3663
|
p && (p.el = d);
|
|
3652
3664
|
}
|
|
3653
3665
|
s.push({
|
|
3654
3666
|
el: d,
|
|
3655
|
-
data:
|
|
3667
|
+
data: u
|
|
3656
3668
|
}), (n || !g) && r.setupNode({
|
|
3657
3669
|
parent: {
|
|
3658
3670
|
el: e,
|
|
@@ -3660,31 +3672,31 @@ function Ae(e, n) {
|
|
|
3660
3672
|
},
|
|
3661
3673
|
node: {
|
|
3662
3674
|
el: d,
|
|
3663
|
-
data:
|
|
3675
|
+
data: u
|
|
3664
3676
|
}
|
|
3665
|
-
}),
|
|
3677
|
+
}), Ln({
|
|
3666
3678
|
parent: {
|
|
3667
3679
|
el: e,
|
|
3668
3680
|
data: t
|
|
3669
3681
|
},
|
|
3670
3682
|
node: {
|
|
3671
3683
|
el: d,
|
|
3672
|
-
data:
|
|
3684
|
+
data: u
|
|
3673
3685
|
}
|
|
3674
3686
|
});
|
|
3675
3687
|
}
|
|
3676
|
-
|
|
3688
|
+
F.set(e, { ...t, enabledNodes: s }), r.remapFinished(t), (c = t.config.plugins) == null || c.forEach((l) => {
|
|
3677
3689
|
var d, g;
|
|
3678
3690
|
(g = (d = l(e)) == null ? void 0 : d.remapFinished) == null || g.call(d);
|
|
3679
3691
|
});
|
|
3680
3692
|
}
|
|
3681
|
-
function
|
|
3693
|
+
function or() {
|
|
3682
3694
|
h.remapJustFinished = !0, "draggedNode" in h && (h.affectedNodes = []);
|
|
3683
3695
|
}
|
|
3684
|
-
function
|
|
3696
|
+
function rr(e) {
|
|
3685
3697
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
3686
3698
|
}
|
|
3687
|
-
function
|
|
3699
|
+
function ar(e) {
|
|
3688
3700
|
var n;
|
|
3689
3701
|
if (e.parent.data.config.multiDrag) {
|
|
3690
3702
|
if (h.selectedState)
|
|
@@ -3697,14 +3709,14 @@ function nr(e) {
|
|
|
3697
3709
|
} else return [e.node];
|
|
3698
3710
|
return [];
|
|
3699
3711
|
}
|
|
3700
|
-
function
|
|
3701
|
-
M(h) && (h.emit("scrollStarted", h), !
|
|
3712
|
+
function ir(e) {
|
|
3713
|
+
M(h) && (h.emit("scrollStarted", h), !_(h) && (h.preventEnter = !0, Oe && clearTimeout(Oe), Oe = setTimeout(() => {
|
|
3702
3714
|
h.preventEnter = !1, h.emit("scrollEnded", h);
|
|
3703
3715
|
}, 100)));
|
|
3704
3716
|
}
|
|
3705
|
-
function
|
|
3717
|
+
function lr(e, n) {
|
|
3706
3718
|
const t = e.targetData.parent.data.config;
|
|
3707
|
-
if (!t.nativeDrag || !
|
|
3719
|
+
if (!t.nativeDrag || !rr(e) || !Mn({
|
|
3708
3720
|
x: e.e.clientX,
|
|
3709
3721
|
y: e.e.clientY,
|
|
3710
3722
|
node: e.targetData.node,
|
|
@@ -3718,7 +3730,7 @@ function or(e, n) {
|
|
|
3718
3730
|
node: e.targetData.node
|
|
3719
3731
|
});
|
|
3720
3732
|
o.length === 0 && (o = [e.targetData.node]), t.dragstartClasses(e.targetData.node, o, t);
|
|
3721
|
-
const r =
|
|
3733
|
+
const r = cr(e, o);
|
|
3722
3734
|
if (t.onDragstart) {
|
|
3723
3735
|
const a = {
|
|
3724
3736
|
parent: e.targetData.parent,
|
|
@@ -3734,20 +3746,20 @@ function or(e, n) {
|
|
|
3734
3746
|
t.onDragstart(a);
|
|
3735
3747
|
}
|
|
3736
3748
|
}
|
|
3737
|
-
function
|
|
3738
|
-
var
|
|
3749
|
+
function dr(e, n) {
|
|
3750
|
+
var c, l;
|
|
3739
3751
|
if (ee(e.e), n.pointerDown = {
|
|
3740
3752
|
parent: e.targetData.parent,
|
|
3741
3753
|
node: e.targetData.node,
|
|
3742
3754
|
validated: !1
|
|
3743
|
-
}, !
|
|
3755
|
+
}, !Mn({
|
|
3744
3756
|
x: e.e.clientX,
|
|
3745
3757
|
y: e.e.clientY,
|
|
3746
3758
|
node: e.targetData.node,
|
|
3747
3759
|
config: e.targetData.parent.data.config
|
|
3748
3760
|
}))
|
|
3749
3761
|
return;
|
|
3750
|
-
n.pointerDown.validated = !0,
|
|
3762
|
+
n.pointerDown.validated = !0, yr(e, n, e.targetData.node);
|
|
3751
3763
|
const t = e.targetData.parent.data;
|
|
3752
3764
|
let o = [e.targetData.node];
|
|
3753
3765
|
const r = e.e.ctrlKey || e.e.metaKey, a = e.e.shiftKey, s = e.targetData.node;
|
|
@@ -3773,14 +3785,14 @@ function rr(e, n) {
|
|
|
3773
3785
|
for (let g = 0; g <= s.data.index; g++)
|
|
3774
3786
|
o.push(d[g]);
|
|
3775
3787
|
} else {
|
|
3776
|
-
const [g,
|
|
3788
|
+
const [g, u] = n.activeState.node.data.index < e.targetData.node.data.index ? [
|
|
3777
3789
|
n.activeState.node.data.index,
|
|
3778
3790
|
e.targetData.node.data.index
|
|
3779
3791
|
] : [
|
|
3780
3792
|
e.targetData.node.data.index,
|
|
3781
3793
|
n.activeState.node.data.index
|
|
3782
3794
|
];
|
|
3783
|
-
o = d.slice(g,
|
|
3795
|
+
o = d.slice(g, u + 1);
|
|
3784
3796
|
}
|
|
3785
3797
|
else
|
|
3786
3798
|
for (let g = 0; g <= s.data.index; g++)
|
|
@@ -3794,9 +3806,9 @@ function rr(e, n) {
|
|
|
3794
3806
|
);
|
|
3795
3807
|
return;
|
|
3796
3808
|
}
|
|
3797
|
-
(l = (
|
|
3809
|
+
(l = (c = n.selectedState) == null ? void 0 : c.nodes) != null && l.length ? n.selectedState.nodes.findIndex(
|
|
3798
3810
|
(g) => g.el === e.targetData.node.el
|
|
3799
|
-
) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? ne(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag &&
|
|
3811
|
+
) === -1 && (n.selectedState.parent.el !== e.targetData.parent.el ? ne(n.selectedState.nodes, e.targetData.parent, n) : t.config.multiDrag && $n() ? o.push(...n.selectedState.nodes) : ne(n.selectedState.nodes, e.targetData.parent, n), me(
|
|
3800
3812
|
e.targetData.parent,
|
|
3801
3813
|
o,
|
|
3802
3814
|
e.targetData.node,
|
|
@@ -3810,18 +3822,18 @@ function rr(e, n) {
|
|
|
3810
3822
|
!0
|
|
3811
3823
|
);
|
|
3812
3824
|
}
|
|
3813
|
-
function
|
|
3814
|
-
|
|
3825
|
+
function sr(e, n, t, o = !1) {
|
|
3826
|
+
re(
|
|
3815
3827
|
n.map((r) => r.el),
|
|
3816
3828
|
o ? t.synthDraggingClass : t.draggingClass
|
|
3817
3829
|
), setTimeout(() => {
|
|
3818
3830
|
K(
|
|
3819
3831
|
n.map((r) => r.el),
|
|
3820
3832
|
o ? t.synthDraggingClass : t.draggingClass
|
|
3821
|
-
),
|
|
3833
|
+
), re(
|
|
3822
3834
|
n.map((r) => r.el),
|
|
3823
3835
|
o ? t.synthDragPlaceholderClass : t.dragPlaceholderClass
|
|
3824
|
-
),
|
|
3836
|
+
), re(
|
|
3825
3837
|
n.map((r) => r.el),
|
|
3826
3838
|
o ? t.synthDropZoneClass : t.dropZoneClass
|
|
3827
3839
|
), K(
|
|
@@ -3830,10 +3842,10 @@ function ar(e, n, t, o = !1) {
|
|
|
3830
3842
|
);
|
|
3831
3843
|
});
|
|
3832
3844
|
}
|
|
3833
|
-
function
|
|
3845
|
+
function cr(e, n) {
|
|
3834
3846
|
ee(e.e);
|
|
3835
|
-
const t =
|
|
3836
|
-
|
|
3847
|
+
const t = Fn(
|
|
3848
|
+
Pn(
|
|
3837
3849
|
e.targetData.node,
|
|
3838
3850
|
e.targetData.parent,
|
|
3839
3851
|
e.e,
|
|
@@ -3856,9 +3868,9 @@ function ir(e, n) {
|
|
|
3856
3868
|
{
|
|
3857
3869
|
const a = document.createElement("div");
|
|
3858
3870
|
a.setAttribute("id", "dnd-dragged-node-clone"), a.setAttribute("popover", "manual");
|
|
3859
|
-
for (const
|
|
3860
|
-
const l =
|
|
3861
|
-
l.id =
|
|
3871
|
+
for (const c of n) {
|
|
3872
|
+
const l = c.el.cloneNode(!0);
|
|
3873
|
+
l.id = c.el.id + "-clone", l.style.pointerEvents = "none", a.appendChild(l);
|
|
3862
3874
|
}
|
|
3863
3875
|
const { width: s } = n[0].el.getBoundingClientRect();
|
|
3864
3876
|
Object.assign(a.style, {
|
|
@@ -3885,7 +3897,7 @@ function ir(e, n) {
|
|
|
3885
3897
|
}
|
|
3886
3898
|
return t;
|
|
3887
3899
|
}
|
|
3888
|
-
function
|
|
3900
|
+
function Mn({
|
|
3889
3901
|
x: e,
|
|
3890
3902
|
y: n,
|
|
3891
3903
|
node: t,
|
|
@@ -3901,22 +3913,22 @@ function Ln({
|
|
|
3901
3913
|
if (a === s || s.contains(a)) return !0;
|
|
3902
3914
|
return !1;
|
|
3903
3915
|
}
|
|
3904
|
-
function
|
|
3916
|
+
function ur(e) {
|
|
3905
3917
|
}
|
|
3906
|
-
function
|
|
3907
|
-
e.detail.targetData.parent.el === e.detail.state.currentParent.el ?
|
|
3918
|
+
function gr(e) {
|
|
3919
|
+
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? Vn(e.detail, e.detail.state) : Ie(e.detail, e.detail.state);
|
|
3908
3920
|
}
|
|
3909
|
-
function
|
|
3921
|
+
function pr(e, n) {
|
|
3910
3922
|
const t = e.targetData.parent.data.config;
|
|
3911
3923
|
t.nativeDrag && (ee(e.e), J = !0, t.handleEnd(n));
|
|
3912
3924
|
}
|
|
3913
|
-
function
|
|
3925
|
+
function hr(e) {
|
|
3914
3926
|
e.e.target !== e.e.currentTarget && h.pointerDown && (h.pointerDown.node.el.draggable = !1);
|
|
3915
3927
|
}
|
|
3916
|
-
function
|
|
3928
|
+
function fr(e) {
|
|
3917
3929
|
e.e.target !== e.e.currentTarget && h.pointerDown && (h.pointerDown.node.el.draggable = !0);
|
|
3918
3930
|
}
|
|
3919
|
-
function
|
|
3931
|
+
function mr(e, n) {
|
|
3920
3932
|
const t = e.targetData.parent.data.config;
|
|
3921
3933
|
if (t.nativeDrag) {
|
|
3922
3934
|
if (L(e.e), ee(e.e), J) {
|
|
@@ -3926,14 +3938,14 @@ function gr(e, n) {
|
|
|
3926
3938
|
t.handleEnd(n);
|
|
3927
3939
|
}
|
|
3928
3940
|
}
|
|
3929
|
-
function
|
|
3941
|
+
function br(e, n) {
|
|
3930
3942
|
var o;
|
|
3931
|
-
if (!
|
|
3943
|
+
if (!_(n)) return;
|
|
3932
3944
|
if (L(e.e), J) {
|
|
3933
3945
|
J = !1;
|
|
3934
3946
|
return;
|
|
3935
3947
|
}
|
|
3936
|
-
const t = (o =
|
|
3948
|
+
const t = (o = F.get(n.initialParent.el)) == null ? void 0 : o.config;
|
|
3937
3949
|
t != null && t.onDragend && t.onDragend({
|
|
3938
3950
|
parent: n.currentParent,
|
|
3939
3951
|
values: ie(n.currentParent.el, n.currentParent.data),
|
|
@@ -3942,13 +3954,13 @@ function pr(e, n) {
|
|
|
3942
3954
|
state: n
|
|
3943
3955
|
}), t == null || t.handleEnd(n);
|
|
3944
3956
|
}
|
|
3945
|
-
function
|
|
3946
|
-
var g,
|
|
3957
|
+
function vr(e) {
|
|
3958
|
+
var g, u, p, f, m;
|
|
3947
3959
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
3948
|
-
const n = e.draggedNodes.map((
|
|
3949
|
-
|
|
3950
|
-
K(n, a), K(n, s), K(n,
|
|
3951
|
-
}), ne(e.draggedNodes, e.currentParent, e),
|
|
3960
|
+
const n = e.draggedNodes.map((v) => v.el), t = e.initialParent.data, o = _(e), r = (g = F.get(e.initialParent.el)) == null ? void 0 : g.config, a = o ? r == null ? void 0 : r.synthDropZoneClass : r == null ? void 0 : r.dropZoneClass, s = (u = t == null ? void 0 : t.config) == null ? void 0 : u.longPressClass, c = o ? (p = t == null ? void 0 : t.config) == null ? void 0 : p.synthDragPlaceholderClass : (f = t == null ? void 0 : t.config) == null ? void 0 : f.dragPlaceholderClass, l = e.originalZIndex;
|
|
3961
|
+
_(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Be(e), e.lastScrollDirectionX = void 0, e.lastScrollDirectionY = void 0, e.preventEnter = !1, e.scrollDebounceTimeout && (clearTimeout(e.scrollDebounceTimeout), e.scrollDebounceTimeout = void 0), l !== void 0 && e.draggedNode && (e.draggedNode.el.style.zIndex = l), requestAnimationFrame(() => {
|
|
3962
|
+
K(n, a), K(n, s), K(n, c);
|
|
3963
|
+
}), ne(e.draggedNodes, e.currentParent, e), oe(e.currentParent, void 0, e);
|
|
3952
3964
|
const d = { ...e };
|
|
3953
3965
|
(m = r == null ? void 0 : r.onDragend) == null || m.call(r, {
|
|
3954
3966
|
parent: d.currentParent,
|
|
@@ -3959,9 +3971,9 @@ function hr(e) {
|
|
|
3959
3971
|
draggedNode: d.draggedNode,
|
|
3960
3972
|
draggedNodes: d.draggedNodes,
|
|
3961
3973
|
state: d
|
|
3962
|
-
}), e.emit("dragEnded", d),
|
|
3974
|
+
}), e.emit("dragEnded", d), zo();
|
|
3963
3975
|
}
|
|
3964
|
-
function
|
|
3976
|
+
function xr(e, n) {
|
|
3965
3977
|
ee(e.e), !n.pointerSelection && n.selectedState && ne(n.selectedState.nodes, e.targetData.parent, n);
|
|
3966
3978
|
const t = e.targetData.parent.data.config;
|
|
3967
3979
|
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, K(
|
|
@@ -3969,10 +3981,10 @@ function fr(e, n) {
|
|
|
3969
3981
|
t.longPressClass
|
|
3970
3982
|
), M(n) && t.handleEnd(n);
|
|
3971
3983
|
}
|
|
3972
|
-
function
|
|
3973
|
-
var m,
|
|
3984
|
+
function Dr(e, n, t, o, r, a) {
|
|
3985
|
+
var m, v;
|
|
3974
3986
|
const s = n.data.config;
|
|
3975
|
-
let
|
|
3987
|
+
let c, l;
|
|
3976
3988
|
const d = [
|
|
3977
3989
|
"display",
|
|
3978
3990
|
"flexDirection",
|
|
@@ -4001,13 +4013,13 @@ function mr(e, n, t, o, r, a) {
|
|
|
4001
4013
|
"height",
|
|
4002
4014
|
"boxSizing",
|
|
4003
4015
|
"overflow"
|
|
4004
|
-
], g = (
|
|
4005
|
-
const w = window.getComputedStyle(
|
|
4016
|
+
], g = (D, y) => {
|
|
4017
|
+
const w = window.getComputedStyle(D);
|
|
4006
4018
|
d.forEach((N) => {
|
|
4007
|
-
|
|
4019
|
+
y.style[N] = w[N];
|
|
4008
4020
|
});
|
|
4009
|
-
},
|
|
4010
|
-
Object.assign(
|
|
4021
|
+
}, u = (D, y = {}) => {
|
|
4022
|
+
Object.assign(D.style, {
|
|
4011
4023
|
position: "absolute",
|
|
4012
4024
|
zIndex: "9999",
|
|
4013
4025
|
pointerEvents: "none",
|
|
@@ -4017,31 +4029,31 @@ function mr(e, n, t, o, r, a) {
|
|
|
4017
4029
|
overflow: "hidden",
|
|
4018
4030
|
width: `${a.width}px`,
|
|
4019
4031
|
height: `${a.height}px`,
|
|
4020
|
-
...
|
|
4032
|
+
...y
|
|
4021
4033
|
});
|
|
4022
4034
|
};
|
|
4023
4035
|
if (s.synthDragImage)
|
|
4024
|
-
l = s.synthDragImage(e, n, t, r),
|
|
4036
|
+
l = s.synthDragImage(e, n, t, r), c = l.dragImage, c.setAttribute("popover", "manual"), u(c);
|
|
4025
4037
|
else if (!s.multiDrag || r.length === 1)
|
|
4026
|
-
|
|
4038
|
+
c = e.el.cloneNode(!0), g(e.el, c), c.setAttribute("popover", "manual"), u(c);
|
|
4027
4039
|
else {
|
|
4028
|
-
const
|
|
4029
|
-
|
|
4030
|
-
const w =
|
|
4031
|
-
g(
|
|
4032
|
-
}),
|
|
4040
|
+
const D = document.createElement("div");
|
|
4041
|
+
D.setAttribute("popover", "manual"), r.forEach((y) => {
|
|
4042
|
+
const w = y.el.cloneNode(!0);
|
|
4043
|
+
g(y.el, w), w.style.pointerEvents = "none", w.style.margin = "0", D.append(w);
|
|
4044
|
+
}), D.style.display = "flex", D.style.flexDirection = "column", D.style.padding = "0", D.style.margin = "0", D.style.position = "absolute", D.style.zIndex = "9999", D.style.pointerEvents = "none", c = D;
|
|
4033
4045
|
}
|
|
4034
|
-
|
|
4046
|
+
c.id = "dnd-dragged-node-clone", n.el.appendChild(c), c.showPopover();
|
|
4035
4047
|
const p = {
|
|
4036
4048
|
clonedDraggedEls: [],
|
|
4037
|
-
clonedDraggedNode:
|
|
4049
|
+
clonedDraggedNode: c,
|
|
4038
4050
|
synthDragScrolling: !1,
|
|
4039
4051
|
synthDragging: !0,
|
|
4040
4052
|
rootScrollWidth: (m = document.scrollingElement) == null ? void 0 : m.scrollWidth,
|
|
4041
|
-
rootScrollHeight: (
|
|
4053
|
+
rootScrollHeight: (v = document.scrollingElement) == null ? void 0 : v.scrollHeight
|
|
4042
4054
|
};
|
|
4043
|
-
return
|
|
4044
|
-
...
|
|
4055
|
+
return Fn({
|
|
4056
|
+
...Pn(
|
|
4045
4057
|
e,
|
|
4046
4058
|
n,
|
|
4047
4059
|
t,
|
|
@@ -4052,29 +4064,29 @@ function mr(e, n, t, o, r, a) {
|
|
|
4052
4064
|
...p
|
|
4053
4065
|
});
|
|
4054
4066
|
}
|
|
4055
|
-
function
|
|
4067
|
+
function yr(e, n, t) {
|
|
4056
4068
|
const o = e.targetData.parent.data.config;
|
|
4057
4069
|
n.longPressTimeout = setTimeout(() => {
|
|
4058
|
-
n && (n.longPress = !0, o.longPressClass && e.e.cancelable &&
|
|
4070
|
+
n && (n.longPress = !0, o.longPressClass && e.e.cancelable && re([t.el], o.longPressClass), L(e.e));
|
|
4059
4071
|
}, o.longPressDuration || 1e3);
|
|
4060
4072
|
}
|
|
4061
|
-
function
|
|
4073
|
+
function Be(e, n = !0, t = !0) {
|
|
4062
4074
|
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);
|
|
4063
4075
|
}
|
|
4064
|
-
function
|
|
4076
|
+
function On(e, n = !1) {
|
|
4065
4077
|
var g;
|
|
4066
|
-
const { x: t, y: o } = e.coordinates, r = e.startLeft ?? 0, a = e.startTop ?? 0, s = window.scrollX ?? 0,
|
|
4078
|
+
const { x: t, y: o } = e.coordinates, r = e.startLeft ?? 0, a = e.startTop ?? 0, s = window.scrollX ?? 0, c = window.scrollY ?? 0, l = t - r + s, d = o - a + c;
|
|
4067
4079
|
e.clonedDraggedNode.style.transform = `translate3d(${l}px, ${d}px, 0px)`, n && (e.clonedDraggedNode.style.opacity = "1", K(
|
|
4068
|
-
e.draggedNodes.map((
|
|
4080
|
+
e.draggedNodes.map((u) => u.el),
|
|
4069
4081
|
(g = e.initialParent.data.config) == null ? void 0 : g.longPressClass
|
|
4070
4082
|
));
|
|
4071
4083
|
}
|
|
4072
|
-
function
|
|
4084
|
+
function dn(e, n, t = !1) {
|
|
4073
4085
|
const o = de(e);
|
|
4074
|
-
n.coordinates.x = o.x, n.coordinates.y = o.y,
|
|
4075
|
-
|
|
4086
|
+
n.coordinates.x = o.x, n.coordinates.y = o.y, On(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
|
|
4087
|
+
_(n) && $e(n.coordinates, e, n);
|
|
4076
4088
|
}, 16);
|
|
4077
|
-
const r =
|
|
4089
|
+
const r = $r(o);
|
|
4078
4090
|
if (!r) {
|
|
4079
4091
|
document.dispatchEvent(
|
|
4080
4092
|
new CustomEvent("handleRootPointerover", {
|
|
@@ -4101,22 +4113,22 @@ function ln(e, n, t = !1) {
|
|
|
4101
4113
|
})
|
|
4102
4114
|
);
|
|
4103
4115
|
}
|
|
4104
|
-
function
|
|
4116
|
+
function Tr(e, n) {
|
|
4105
4117
|
var a;
|
|
4106
4118
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
4107
4119
|
const { x: o, y: r } = de(e.e);
|
|
4108
|
-
n.coordinates.y = r, n.coordinates.x = o, L(e.e), ee(e.e), M(n) && $e({ x: o, y: r }, e.e, n), e.targetData.parent.el === ((a = n.currentParent) == null ? void 0 : a.el) ?
|
|
4120
|
+
n.coordinates.y = r, n.coordinates.x = o, L(e.e), ee(e.e), M(n) && $e({ x: o, y: r }, e.e, n), e.targetData.parent.el === ((a = n.currentParent) == null ? void 0 : a.el) ? Vn(e, n) : Ie(e, n);
|
|
4109
4121
|
}
|
|
4110
|
-
function
|
|
4122
|
+
function wr(e, n) {
|
|
4111
4123
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
4112
4124
|
L(e.e), ee(e.e);
|
|
4113
4125
|
const { x: o, y: r } = de(e.e);
|
|
4114
4126
|
M(n) && $e({ x: o, y: r }, e.e, n), Ie(e, n);
|
|
4115
4127
|
}
|
|
4116
|
-
function
|
|
4128
|
+
function Sr(e) {
|
|
4117
4129
|
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && Ie(e.detail, e.detail.state);
|
|
4118
4130
|
}
|
|
4119
|
-
function
|
|
4131
|
+
function Cr({
|
|
4120
4132
|
currentParent: e,
|
|
4121
4133
|
targetParent: n,
|
|
4122
4134
|
initialParent: t,
|
|
@@ -4134,25 +4146,25 @@ function xr({
|
|
|
4134
4146
|
r
|
|
4135
4147
|
) : !(!a.group || a.group !== s.group);
|
|
4136
4148
|
}
|
|
4137
|
-
function
|
|
4149
|
+
function Nr(e, n) {
|
|
4138
4150
|
L(e.e);
|
|
4139
4151
|
}
|
|
4140
|
-
function
|
|
4152
|
+
function Er(e, n) {
|
|
4141
4153
|
L(e.e);
|
|
4142
4154
|
}
|
|
4143
|
-
function
|
|
4155
|
+
function kr(e, n, t, o) {
|
|
4144
4156
|
var g;
|
|
4145
|
-
if (n.affectedNodes.map((
|
|
4157
|
+
if (n.affectedNodes.map((u) => u.data.value).includes(e.targetData.node.data.value))
|
|
4146
4158
|
return !1;
|
|
4147
4159
|
if (n.remapJustFinished)
|
|
4148
|
-
return n.remapJustFinished = !1, (e.targetData.node.data.value === n.currentTargetValue || n.draggedNodes.map((
|
|
4160
|
+
return n.remapJustFinished = !1, (e.targetData.node.data.value === n.currentTargetValue || n.draggedNodes.map((u) => u.el).includes(e.targetData.node.el)) && (n.currentTargetValue = e.targetData.node.data.value), !1;
|
|
4149
4161
|
if (n.preventEnter) return !1;
|
|
4150
|
-
if (n.draggedNodes.map((
|
|
4162
|
+
if (n.draggedNodes.map((u) => u.el).includes(e.targetData.node.el))
|
|
4151
4163
|
return n.currentTargetValue = void 0, !1;
|
|
4152
4164
|
if (e.targetData.node.data.value === n.currentTargetValue || e.targetData.parent.el !== ((g = n.currentParent) == null ? void 0 : g.el) || e.targetData.parent.data.config.sortable === !1 || e.targetData.node.el.contains(n.draggedNodes[0].el)) return !1;
|
|
4153
|
-
const r = e.targetData.node.el.getBoundingClientRect(), a = n.draggedNode.el.getBoundingClientRect(), s = r.y - a.y,
|
|
4165
|
+
const r = e.targetData.node.el.getBoundingClientRect(), a = n.draggedNode.el.getBoundingClientRect(), s = r.y - a.y, c = r.x - a.x;
|
|
4154
4166
|
let l;
|
|
4155
|
-
Math.abs(s) > Math.abs(
|
|
4167
|
+
Math.abs(s) > Math.abs(c) ? l = s > 0 ? "above" : "below" : l = c > 0 ? "left" : "right";
|
|
4156
4168
|
const d = n.currentParent.data.config.threshold;
|
|
4157
4169
|
switch (l) {
|
|
4158
4170
|
case "left":
|
|
@@ -4174,9 +4186,9 @@ function Sr(e, n, t, o) {
|
|
|
4174
4186
|
}
|
|
4175
4187
|
return !1;
|
|
4176
4188
|
}
|
|
4177
|
-
function
|
|
4189
|
+
function Vn(e, n) {
|
|
4178
4190
|
const { x: t, y: o } = de(e.e);
|
|
4179
|
-
if (!
|
|
4191
|
+
if (!kr(e, n, t, o))
|
|
4180
4192
|
return;
|
|
4181
4193
|
const r = 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];
|
|
4182
4194
|
n.targetIndex = e.targetData.node.data.index, n.affectedNodes = e.targetData.parent.data.enabledNodes.filter(
|
|
@@ -4191,7 +4203,7 @@ function V(e) {
|
|
|
4191
4203
|
function n(t) {
|
|
4192
4204
|
const o = Y.get(t);
|
|
4193
4205
|
if (!o) return;
|
|
4194
|
-
const r =
|
|
4206
|
+
const r = F.get(t.parentNode);
|
|
4195
4207
|
if (r)
|
|
4196
4208
|
return {
|
|
4197
4209
|
node: {
|
|
@@ -4217,7 +4229,7 @@ function V(e) {
|
|
|
4217
4229
|
};
|
|
4218
4230
|
}
|
|
4219
4231
|
function Ie(e, n) {
|
|
4220
|
-
L(e.e),
|
|
4232
|
+
L(e.e), Cr({
|
|
4221
4233
|
currentParent: n.currentParent,
|
|
4222
4234
|
targetParent: e.targetData.parent,
|
|
4223
4235
|
initialParent: n.initialParent,
|
|
@@ -4235,7 +4247,7 @@ function Ie(e, n) {
|
|
|
4235
4247
|
}
|
|
4236
4248
|
function be(e) {
|
|
4237
4249
|
function n(t) {
|
|
4238
|
-
const o =
|
|
4250
|
+
const o = F.get(t);
|
|
4239
4251
|
if (o)
|
|
4240
4252
|
return {
|
|
4241
4253
|
parent: {
|
|
@@ -4256,18 +4268,18 @@ function be(e) {
|
|
|
4256
4268
|
);
|
|
4257
4269
|
};
|
|
4258
4270
|
}
|
|
4259
|
-
function
|
|
4271
|
+
function re(e, n, t = !1) {
|
|
4260
4272
|
function o(r, a) {
|
|
4261
4273
|
Y.set(r, a);
|
|
4262
4274
|
}
|
|
4263
4275
|
for (const r of e) {
|
|
4264
|
-
const a = Y.get(r), s =
|
|
4276
|
+
const a = Y.get(r), s = Ar(r, n, a, t);
|
|
4265
4277
|
s && o(r, s);
|
|
4266
4278
|
}
|
|
4267
4279
|
}
|
|
4268
|
-
function
|
|
4280
|
+
function Ar(e, n, t, o = !1) {
|
|
4269
4281
|
if (!n) return;
|
|
4270
|
-
const r =
|
|
4282
|
+
const r = In(n);
|
|
4271
4283
|
if (!r.length) return;
|
|
4272
4284
|
if (!t) {
|
|
4273
4285
|
e.classList.add(...r);
|
|
@@ -4284,106 +4296,106 @@ function Cr(e, n, t, o = !1) {
|
|
|
4284
4296
|
}
|
|
4285
4297
|
function K(e, n) {
|
|
4286
4298
|
if (!n) return;
|
|
4287
|
-
const t =
|
|
4299
|
+
const t = In(n);
|
|
4288
4300
|
if (t.length)
|
|
4289
4301
|
for (const o of e) {
|
|
4290
4302
|
if (!Fe(o)) {
|
|
4291
4303
|
o.classList.remove(...t);
|
|
4292
4304
|
continue;
|
|
4293
4305
|
}
|
|
4294
|
-
const r = Y.get(o) ||
|
|
4306
|
+
const r = Y.get(o) || F.get(o);
|
|
4295
4307
|
if (r)
|
|
4296
4308
|
for (const a of t)
|
|
4297
4309
|
r.privateClasses.includes(a) || o.classList.remove(a);
|
|
4298
4310
|
}
|
|
4299
4311
|
}
|
|
4300
|
-
function
|
|
4301
|
-
const s = r.axis === "x",
|
|
4302
|
-
if (
|
|
4303
|
-
const
|
|
4312
|
+
function sn(e, n, t, o, r) {
|
|
4313
|
+
const s = r.axis === "x", c = e === document.scrollingElement, l = s ? "scrollLeft" : "scrollTop", d = s ? "clientWidth" : "clientHeight", g = s ? "offsetWidth" : "offsetHeight", u = s ? "scrollWidth" : "scrollHeight", p = s ? n.clientX : n.clientY, f = s ? o.left : o.top, m = s ? t.overflowX : t.overflowY;
|
|
4314
|
+
if (c) {
|
|
4315
|
+
const v = e[l], D = e[d], y = v > 0, w = v + D < (s ? r.state.rootScrollWidth || 0 : e[u]);
|
|
4304
4316
|
return s ? {
|
|
4305
|
-
left:
|
|
4306
|
-
right: w && p >
|
|
4317
|
+
left: y && p < D * 0.075,
|
|
4318
|
+
right: w && p > D * (1 - 0.075)
|
|
4307
4319
|
} : {
|
|
4308
|
-
up:
|
|
4309
|
-
down: w && p >
|
|
4320
|
+
up: y && p < D * 0.075,
|
|
4321
|
+
down: w && p > D * (1 - 0.075)
|
|
4310
4322
|
};
|
|
4311
4323
|
}
|
|
4312
4324
|
if ((m === "auto" || m === "scroll") && e !== document.body && e !== document.documentElement) {
|
|
4313
|
-
const
|
|
4325
|
+
const v = e[u], D = e[g], y = e[l], w = y > 0, N = y < v - D;
|
|
4314
4326
|
return s ? {
|
|
4315
|
-
left: w && p < f +
|
|
4316
|
-
right: N && p > f +
|
|
4327
|
+
left: w && p < f + D * 0.075,
|
|
4328
|
+
right: N && p > f + D * (1 - 0.075)
|
|
4317
4329
|
} : {
|
|
4318
|
-
up: w && p < f +
|
|
4319
|
-
down: N && p > f +
|
|
4330
|
+
up: w && p < f + D * 0.075,
|
|
4331
|
+
down: N && p > f + D * (1 - 0.075)
|
|
4320
4332
|
};
|
|
4321
4333
|
}
|
|
4322
4334
|
return s ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
4323
4335
|
}
|
|
4324
|
-
function
|
|
4336
|
+
function Ir(e, n, t, o) {
|
|
4325
4337
|
if (!M(t) || !t.draggedNode)
|
|
4326
4338
|
return;
|
|
4327
4339
|
t.preventEnter = !0;
|
|
4328
|
-
const r = o.axis === "x", a = o.direction === "positive" ? 1 : -1, s = 20,
|
|
4329
|
-
t[l] !== void 0 && (cancelAnimationFrame(t[l]), t[l] = void 0), t[
|
|
4340
|
+
const r = o.axis === "x", a = o.direction === "positive" ? 1 : -1, s = 20, c = r ? "lastScrollDirectionX" : "lastScrollDirectionY", l = r ? "frameIdX" : "frameIdY";
|
|
4341
|
+
t[l] !== void 0 && (cancelAnimationFrame(t[l]), t[l] = void 0), t[c] = o.direction;
|
|
4330
4342
|
const d = () => {
|
|
4331
4343
|
if (!M(t) || !t.draggedNode) {
|
|
4332
4344
|
t[l] !== void 0 && (cancelAnimationFrame(t[l]), t[l] = void 0);
|
|
4333
4345
|
return;
|
|
4334
4346
|
}
|
|
4335
|
-
const g = r ? "scrollLeft" : "scrollTop",
|
|
4336
|
-
if (!(a > 0 ? f + m <
|
|
4337
|
-
t[l] = void 0, t[
|
|
4347
|
+
const g = r ? "scrollLeft" : "scrollTop", u = r ? "clientWidth" : "clientHeight", p = r ? "scrollWidth" : "scrollHeight", f = e[g], m = e[u], v = e[p];
|
|
4348
|
+
if (!(a > 0 ? f + m < v : f > 0)) {
|
|
4349
|
+
t[l] = void 0, t[c] = void 0;
|
|
4338
4350
|
return;
|
|
4339
4351
|
}
|
|
4340
|
-
e[g] += s * a,
|
|
4352
|
+
e[g] += s * a, _(t) && On(t), t[l] = requestAnimationFrame(d);
|
|
4341
4353
|
};
|
|
4342
4354
|
t[l] = requestAnimationFrame(d);
|
|
4343
4355
|
}
|
|
4344
|
-
function
|
|
4356
|
+
function cn(e, n, t) {
|
|
4345
4357
|
const o = e.getBoundingClientRect();
|
|
4346
4358
|
return n >= o.left && n <= o.right && t >= o.top && t <= o.bottom;
|
|
4347
4359
|
}
|
|
4348
4360
|
function $e(e, n, t) {
|
|
4349
4361
|
if (!M(t) || !t.draggedNode)
|
|
4350
4362
|
return;
|
|
4351
|
-
|
|
4363
|
+
Be(t);
|
|
4352
4364
|
const { x: o, y: r } = e;
|
|
4353
4365
|
let a = !1;
|
|
4354
4366
|
const s = (l, d, g) => {
|
|
4355
|
-
|
|
4356
|
-
},
|
|
4357
|
-
const d = window.getComputedStyle(l), g = l.getBoundingClientRect(),
|
|
4367
|
+
Ir(g, n, t, { axis: l, direction: d }), a = !0;
|
|
4368
|
+
}, c = (l) => {
|
|
4369
|
+
const d = window.getComputedStyle(l), g = l.getBoundingClientRect(), u = sn(l, n, d, g, {
|
|
4358
4370
|
axis: "x",
|
|
4359
4371
|
state: t
|
|
4360
|
-
}), p =
|
|
4361
|
-
(
|
|
4372
|
+
}), p = sn(l, n, d, g, { axis: "y" });
|
|
4373
|
+
(u.left || u.right) && (t.lastScrollContainerX = l, s("x", u.right ? "positive" : "negative", l)), (p.up || p.down) && (t.lastScrollContainerY = l, s("y", p.down ? "positive" : "negative", l));
|
|
4362
4374
|
};
|
|
4363
|
-
if (t.lastScrollContainerX &&
|
|
4375
|
+
if (t.lastScrollContainerX && cn(t.lastScrollContainerX, o, r) && c(t.lastScrollContainerX), !a && t.lastScrollContainerY && cn(t.lastScrollContainerY, o, r) && c(t.lastScrollContainerY), !a) {
|
|
4364
4376
|
let l = document.elementFromPoint(o, r);
|
|
4365
4377
|
for (; l && !(a && t.lastScrollContainerX && t.lastScrollContainerY); )
|
|
4366
|
-
l instanceof HTMLElement &&
|
|
4378
|
+
l instanceof HTMLElement && c(l), l = l.parentElement;
|
|
4367
4379
|
}
|
|
4368
4380
|
if (!a) {
|
|
4369
4381
|
const l = document.scrollingElement;
|
|
4370
|
-
l instanceof HTMLElement &&
|
|
4382
|
+
l instanceof HTMLElement && c(l);
|
|
4371
4383
|
}
|
|
4372
|
-
a ||
|
|
4384
|
+
a || Be(t);
|
|
4373
4385
|
}
|
|
4374
|
-
function
|
|
4386
|
+
function $r(e) {
|
|
4375
4387
|
let n = document.elementFromPoint(e.x, e.y);
|
|
4376
4388
|
if (!Fe(n)) return;
|
|
4377
4389
|
let t, o = !0;
|
|
4378
4390
|
for (; n && o; ) {
|
|
4379
|
-
if (Y.has(n) ||
|
|
4380
|
-
o = !1, t =
|
|
4391
|
+
if (Y.has(n) || F.has(n)) {
|
|
4392
|
+
o = !1, t = F.has(n);
|
|
4381
4393
|
break;
|
|
4382
4394
|
}
|
|
4383
4395
|
n = n.parentNode;
|
|
4384
4396
|
}
|
|
4385
4397
|
if (t) {
|
|
4386
|
-
const r =
|
|
4398
|
+
const r = F.get(n);
|
|
4387
4399
|
return r ? {
|
|
4388
4400
|
parent: {
|
|
4389
4401
|
el: n,
|
|
@@ -4393,7 +4405,7 @@ function Er(e) {
|
|
|
4393
4405
|
} else {
|
|
4394
4406
|
const r = Y.get(n);
|
|
4395
4407
|
if (!r) return;
|
|
4396
|
-
const a =
|
|
4408
|
+
const a = F.get(n.parentNode);
|
|
4397
4409
|
return a ? {
|
|
4398
4410
|
node: {
|
|
4399
4411
|
el: n,
|
|
@@ -4421,48 +4433,48 @@ function we(e, n) {
|
|
|
4421
4433
|
}
|
|
4422
4434
|
return t;
|
|
4423
4435
|
}
|
|
4424
|
-
function
|
|
4436
|
+
function Fr(e) {
|
|
4425
4437
|
if (e instanceof HTMLElement) return e;
|
|
4426
4438
|
if ("current" in e && e.current instanceof HTMLElement)
|
|
4427
4439
|
return e.current;
|
|
4428
4440
|
console.warn("Invalid parent element", e);
|
|
4429
4441
|
}
|
|
4430
|
-
function
|
|
4431
|
-
const t =
|
|
4442
|
+
function Pr(e, n) {
|
|
4443
|
+
const t = Fr(e);
|
|
4432
4444
|
t && n(t);
|
|
4433
4445
|
}
|
|
4434
4446
|
var Se = /* @__PURE__ */ new WeakMap();
|
|
4435
|
-
function
|
|
4447
|
+
function Rr(e) {
|
|
4436
4448
|
const n = Se.get(e);
|
|
4437
4449
|
return n ? n[0] : (console.warn("No values found for parent element"), []);
|
|
4438
4450
|
}
|
|
4439
|
-
function
|
|
4451
|
+
function Lr(e, n) {
|
|
4440
4452
|
const t = Se.get(n);
|
|
4441
4453
|
t && t[1](e), Se.set(n, [e, t[1]]);
|
|
4442
4454
|
}
|
|
4443
|
-
function
|
|
4455
|
+
function Mr(e, n) {
|
|
4444
4456
|
return (t) => {
|
|
4445
|
-
Se.set(t, n),
|
|
4457
|
+
Se.set(t, n), Yo({ parent: t, getValues: Rr, setValues: Lr, config: e });
|
|
4446
4458
|
};
|
|
4447
4459
|
}
|
|
4448
|
-
function
|
|
4449
|
-
|
|
4460
|
+
function un(e) {
|
|
4461
|
+
Qe && (Array.isArray(e) || (e = [e]), e.forEach((n) => {
|
|
4450
4462
|
const { parent: t, state: o, ...r } = n;
|
|
4451
|
-
|
|
4463
|
+
Pr(t, Mr(r, o));
|
|
4452
4464
|
}));
|
|
4453
4465
|
}
|
|
4454
|
-
function
|
|
4466
|
+
function Or(e, n = {}) {
|
|
4455
4467
|
const t = ue(null), [o, r] = P(e);
|
|
4456
4468
|
function a(s = {}) {
|
|
4457
|
-
|
|
4469
|
+
un({ parent: t, state: [o, r], ...s });
|
|
4458
4470
|
}
|
|
4459
|
-
return
|
|
4460
|
-
|
|
4461
|
-
}, [o]),
|
|
4471
|
+
return te(() => {
|
|
4472
|
+
un({ parent: t, state: [o, r], ...n });
|
|
4473
|
+
}, [o]), te(() => () => {
|
|
4462
4474
|
t.current && Rn(t.current);
|
|
4463
4475
|
}, []), [t, o, r, a];
|
|
4464
4476
|
}
|
|
4465
|
-
const
|
|
4477
|
+
const gn = {
|
|
4466
4478
|
border: {
|
|
4467
4479
|
selected: {
|
|
4468
4480
|
color: C.palette.blue.B400
|
|
@@ -4471,7 +4483,7 @@ const un = {
|
|
|
4471
4483
|
color: C.palette.neutral.N40
|
|
4472
4484
|
}
|
|
4473
4485
|
}
|
|
4474
|
-
},
|
|
4486
|
+
}, Vr = T.ul`
|
|
4475
4487
|
list-style: none;
|
|
4476
4488
|
padding: 0;
|
|
4477
4489
|
margin: 0;
|
|
@@ -4480,15 +4492,15 @@ const un = {
|
|
|
4480
4492
|
gap: 12px;
|
|
4481
4493
|
width: 100%;
|
|
4482
4494
|
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
4483
|
-
`,
|
|
4495
|
+
`, zr = T.li`
|
|
4484
4496
|
& > div {
|
|
4485
4497
|
border: 1px solid
|
|
4486
4498
|
${({ theme: e, $active: n }) => {
|
|
4487
4499
|
var t, o, r, a;
|
|
4488
|
-
return n ? ((o = (t = e == null ? void 0 : e.border) == null ? void 0 : t.selected) == null ? void 0 : o.color) ||
|
|
4500
|
+
return n ? ((o = (t = e == null ? void 0 : e.border) == null ? void 0 : t.selected) == null ? void 0 : o.color) || gn.border.selected.color : ((a = (r = e == null ? void 0 : e.border) == null ? void 0 : r.clear) == null ? void 0 : a.color) || gn.border.clear.color;
|
|
4489
4501
|
}};
|
|
4490
4502
|
}
|
|
4491
|
-
`,
|
|
4503
|
+
`, Ve = "dnd:draggingLabel", pn = (e) => {
|
|
4492
4504
|
const {
|
|
4493
4505
|
emptyMessage: n,
|
|
4494
4506
|
id: t,
|
|
@@ -4496,48 +4508,48 @@ const un = {
|
|
|
4496
4508
|
legend: r,
|
|
4497
4509
|
initialItems: a,
|
|
4498
4510
|
highlightFirst: s,
|
|
4499
|
-
onMove:
|
|
4500
|
-
} = e, [l, d] =
|
|
4511
|
+
onMove: c
|
|
4512
|
+
} = e, [l, d] = Or(
|
|
4501
4513
|
a,
|
|
4502
4514
|
{ group: o }
|
|
4503
|
-
), [g,
|
|
4515
|
+
), [g, u] = z.useState(
|
|
4504
4516
|
null
|
|
4505
4517
|
), p = z.useRef(a);
|
|
4506
4518
|
z.useEffect(() => {
|
|
4507
|
-
const
|
|
4519
|
+
const y = (w) => {
|
|
4508
4520
|
const N = w.detail ?? null;
|
|
4509
|
-
|
|
4521
|
+
u(N);
|
|
4510
4522
|
};
|
|
4511
|
-
return window.addEventListener(
|
|
4523
|
+
return window.addEventListener(Ve, y), () => window.removeEventListener(Ve, y);
|
|
4512
4524
|
}, []);
|
|
4513
|
-
const f = z.useCallback((
|
|
4525
|
+
const f = z.useCallback((y) => {
|
|
4514
4526
|
window.dispatchEvent(
|
|
4515
|
-
new CustomEvent(
|
|
4527
|
+
new CustomEvent(Ve, { detail: y })
|
|
4516
4528
|
);
|
|
4517
|
-
}, []), m = (
|
|
4529
|
+
}, []), m = (y) => {
|
|
4518
4530
|
var S;
|
|
4519
|
-
const w =
|
|
4520
|
-
A && (
|
|
4521
|
-
},
|
|
4522
|
-
|
|
4531
|
+
const w = y.target, N = (S = w == null ? void 0 : w.closest) == null ? void 0 : S.call(w, "li.dnd-item"), A = (N == null ? void 0 : N.getAttribute("data-label")) || null;
|
|
4532
|
+
A && (u(A), f(A));
|
|
4533
|
+
}, v = z.useCallback(() => {
|
|
4534
|
+
u(null), f(null);
|
|
4523
4535
|
}, [f]);
|
|
4524
4536
|
z.useEffect(() => {
|
|
4525
|
-
const
|
|
4526
|
-
return window.addEventListener("pointerup",
|
|
4527
|
-
window.removeEventListener("pointerup",
|
|
4537
|
+
const y = () => v();
|
|
4538
|
+
return window.addEventListener("pointerup", y), window.addEventListener("blur", y), () => {
|
|
4539
|
+
window.removeEventListener("pointerup", y), window.removeEventListener("blur", y);
|
|
4528
4540
|
};
|
|
4529
|
-
}, [
|
|
4530
|
-
const
|
|
4531
|
-
if (d.length !==
|
|
4532
|
-
const w = new Set(
|
|
4541
|
+
}, [v]), z.useEffect(() => {
|
|
4542
|
+
const y = p.current;
|
|
4543
|
+
if (d.length !== y.length && d.length === y.length + 1) {
|
|
4544
|
+
const w = new Set(y), N = d.find((A) => !w.has(A)) || null;
|
|
4533
4545
|
if (N) {
|
|
4534
4546
|
const A = t === "left" ? "right" : "left";
|
|
4535
|
-
|
|
4547
|
+
c == null || c({ item: N, from: A, to: t });
|
|
4536
4548
|
}
|
|
4537
4549
|
}
|
|
4538
4550
|
p.current = d;
|
|
4539
|
-
}, [d, t,
|
|
4540
|
-
const
|
|
4551
|
+
}, [d, t, c]);
|
|
4552
|
+
const D = d.length === 0;
|
|
4541
4553
|
return /* @__PURE__ */ i(
|
|
4542
4554
|
ve,
|
|
4543
4555
|
{
|
|
@@ -4546,15 +4558,15 @@ const un = {
|
|
|
4546
4558
|
height: "-webkit-fill-available",
|
|
4547
4559
|
spacing: "wide",
|
|
4548
4560
|
children: /* @__PURE__ */ i(
|
|
4549
|
-
|
|
4561
|
+
Vr,
|
|
4550
4562
|
{
|
|
4551
4563
|
ref: l,
|
|
4552
4564
|
onPointerDownCapture: m,
|
|
4553
|
-
onPointerUpCapture:
|
|
4554
|
-
onPointerCancelCapture:
|
|
4555
|
-
$isEmpty:
|
|
4556
|
-
children:
|
|
4557
|
-
|
|
4565
|
+
onPointerUpCapture: v,
|
|
4566
|
+
onPointerCancelCapture: v,
|
|
4567
|
+
$isEmpty: D,
|
|
4568
|
+
children: D ? /* @__PURE__ */ i(
|
|
4569
|
+
j,
|
|
4558
4570
|
{
|
|
4559
4571
|
background: !0,
|
|
4560
4572
|
borderRadius: "8px",
|
|
@@ -4563,16 +4575,16 @@ const un = {
|
|
|
4563
4575
|
justifyContent: "center",
|
|
4564
4576
|
children: /* @__PURE__ */ i(E, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
|
|
4565
4577
|
}
|
|
4566
|
-
) : d.map((
|
|
4567
|
-
const N = g ===
|
|
4578
|
+
) : d.map((y, w) => {
|
|
4579
|
+
const N = g === y;
|
|
4568
4580
|
return /* @__PURE__ */ i(
|
|
4569
|
-
|
|
4581
|
+
zr,
|
|
4570
4582
|
{
|
|
4571
4583
|
className: `dnd-item${N ? " is-dragging" : ""}`,
|
|
4572
|
-
"data-label":
|
|
4584
|
+
"data-label": y,
|
|
4573
4585
|
"data-first": !!(s && w === 0) || void 0,
|
|
4574
4586
|
$active: N,
|
|
4575
|
-
children: /* @__PURE__ */ i(
|
|
4587
|
+
children: /* @__PURE__ */ i(j, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
|
|
4576
4588
|
E,
|
|
4577
4589
|
{
|
|
4578
4590
|
type: "title",
|
|
@@ -4580,23 +4592,23 @@ const un = {
|
|
|
4580
4592
|
weight: N ? "bold" : "normal",
|
|
4581
4593
|
size: "medium",
|
|
4582
4594
|
padding: "6px 12px",
|
|
4583
|
-
children:
|
|
4595
|
+
children: y
|
|
4584
4596
|
}
|
|
4585
4597
|
) })
|
|
4586
4598
|
},
|
|
4587
|
-
|
|
4599
|
+
y
|
|
4588
4600
|
);
|
|
4589
4601
|
})
|
|
4590
4602
|
}
|
|
4591
4603
|
)
|
|
4592
4604
|
}
|
|
4593
4605
|
);
|
|
4594
|
-
},
|
|
4606
|
+
}, Da = (e) => {
|
|
4595
4607
|
const { group: n = "clients", left: t, right: o, onMove: r } = e, a = (s) => {
|
|
4596
4608
|
r == null || r(s);
|
|
4597
4609
|
};
|
|
4598
4610
|
return /* @__PURE__ */ b(
|
|
4599
|
-
|
|
4611
|
+
x,
|
|
4600
4612
|
{
|
|
4601
4613
|
justifyContent: "space-between",
|
|
4602
4614
|
alignItems: "start",
|
|
@@ -4604,7 +4616,7 @@ const un = {
|
|
|
4604
4616
|
gap: "40px",
|
|
4605
4617
|
children: [
|
|
4606
4618
|
/* @__PURE__ */ i(
|
|
4607
|
-
|
|
4619
|
+
pn,
|
|
4608
4620
|
{
|
|
4609
4621
|
group: n,
|
|
4610
4622
|
highlightFirst: t.highlightFirst,
|
|
@@ -4616,7 +4628,7 @@ const un = {
|
|
|
4616
4628
|
}
|
|
4617
4629
|
),
|
|
4618
4630
|
/* @__PURE__ */ i(
|
|
4619
|
-
|
|
4631
|
+
pn,
|
|
4620
4632
|
{
|
|
4621
4633
|
group: n,
|
|
4622
4634
|
highlightFirst: o.highlightFirst,
|
|
@@ -4630,17 +4642,88 @@ const un = {
|
|
|
4630
4642
|
]
|
|
4631
4643
|
}
|
|
4632
4644
|
);
|
|
4633
|
-
},
|
|
4645
|
+
}, Hr = T.div`
|
|
4646
|
+
& > button {
|
|
4647
|
+
height: 66px;
|
|
4648
|
+
min-width: 66px;
|
|
4649
|
+
border-radius: 16px;
|
|
4650
|
+
padding: 12px 16px;
|
|
4651
|
+
|
|
4652
|
+
& > div > div {
|
|
4653
|
+
flex-direction: column;
|
|
4654
|
+
& > figure > svg {
|
|
4655
|
+
width: 20px;
|
|
4656
|
+
height: 20px;
|
|
4657
|
+
}
|
|
4658
|
+
& > p {
|
|
4659
|
+
font-weight: 400;
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4662
|
+
}
|
|
4663
|
+
`, ya = (e) => /* @__PURE__ */ i(Hr, { children: /* @__PURE__ */ i(H, { ...e }) }), _r = T.div`
|
|
4664
|
+
display: flex;
|
|
4665
|
+
justify-content: space-between;
|
|
4666
|
+
align-items: center;
|
|
4667
|
+
box-sizing: border-box;
|
|
4668
|
+
border-radius: 16px;
|
|
4669
|
+
background-color: white;
|
|
4670
|
+
box-shadow:
|
|
4671
|
+
0px 1px 3px 1px rgba(0, 0, 0, 0.15),
|
|
4672
|
+
0px 1px 2px 0px rgba(0, 0, 0, 0.3);
|
|
4673
|
+
max-width: 140px;
|
|
4674
|
+
width: 100%;
|
|
4675
|
+
& > button {
|
|
4676
|
+
height: 66px;
|
|
4677
|
+
min-width: 66px;
|
|
4678
|
+
border-radius: 16px;
|
|
4679
|
+
padding: 12px 16px;
|
|
4680
|
+
|
|
4681
|
+
& > div > div {
|
|
4682
|
+
flex-direction: column;
|
|
4683
|
+
& > figure > svg {
|
|
4684
|
+
width: 20px;
|
|
4685
|
+
height: 20px;
|
|
4686
|
+
}
|
|
4687
|
+
& > p {
|
|
4688
|
+
font-weight: 400;
|
|
4689
|
+
}
|
|
4690
|
+
}
|
|
4691
|
+
}
|
|
4692
|
+
`, Ta = (e) => {
|
|
4693
|
+
const { handleBack: n, handleNext: t, textValues: o } = e;
|
|
4694
|
+
return /* @__PURE__ */ b(_r, { children: [
|
|
4695
|
+
/* @__PURE__ */ i(
|
|
4696
|
+
H,
|
|
4697
|
+
{
|
|
4698
|
+
...e,
|
|
4699
|
+
iconBefore: /* @__PURE__ */ i(jn, {}),
|
|
4700
|
+
variant: "none",
|
|
4701
|
+
onClick: n,
|
|
4702
|
+
children: o.back
|
|
4703
|
+
}
|
|
4704
|
+
),
|
|
4705
|
+
/* @__PURE__ */ i(
|
|
4706
|
+
H,
|
|
4707
|
+
{
|
|
4708
|
+
...e,
|
|
4709
|
+
iconBefore: /* @__PURE__ */ i(Bn, {}),
|
|
4710
|
+
variant: "none",
|
|
4711
|
+
onClick: t,
|
|
4712
|
+
children: o.next
|
|
4713
|
+
}
|
|
4714
|
+
)
|
|
4715
|
+
] });
|
|
4716
|
+
}, se = /* @__PURE__ */ new Map(), Ur = (e, n) => se.get(`${n}:${e}`), jr = (e, n, t) => {
|
|
4634
4717
|
const o = `${n}:${e}`;
|
|
4635
4718
|
if (se.set(o, t), se.size > 1e3) {
|
|
4636
4719
|
const r = se.keys().next().value;
|
|
4637
4720
|
r !== void 0 && se.delete(r);
|
|
4638
4721
|
}
|
|
4639
|
-
},
|
|
4640
|
-
const n = Date.now(), t =
|
|
4641
|
-
return n - t <
|
|
4642
|
-
},
|
|
4643
|
-
const n =
|
|
4722
|
+
}, hn = /* @__PURE__ */ new Map(), Br = 1e3, qr = (e) => {
|
|
4723
|
+
const n = Date.now(), t = hn.get(e) || 0;
|
|
4724
|
+
return n - t < Br ? !0 : (hn.set(e, n), !1);
|
|
4725
|
+
}, Yr = (e) => {
|
|
4726
|
+
const n = et(e);
|
|
4644
4727
|
return {
|
|
4645
4728
|
spa: "es",
|
|
4646
4729
|
eng: "en",
|
|
@@ -4649,14 +4732,14 @@ const un = {
|
|
|
4649
4732
|
ita: "it",
|
|
4650
4733
|
por: "pt"
|
|
4651
4734
|
}[n] || "en";
|
|
4652
|
-
},
|
|
4653
|
-
const r = `${n}:${e}`, a =
|
|
4735
|
+
}, Xr = async (e, n, { url: t, apiKey: o }) => {
|
|
4736
|
+
const r = `${n}:${e}`, a = Ur(e, n);
|
|
4654
4737
|
if (a) return a;
|
|
4655
|
-
if (
|
|
4738
|
+
if (qr(r))
|
|
4656
4739
|
return console.warn(`[Throttle] Skipped translation for: "${e}"`), e;
|
|
4657
|
-
const s =
|
|
4740
|
+
const s = Yr(e);
|
|
4658
4741
|
try {
|
|
4659
|
-
const { data:
|
|
4742
|
+
const { data: c } = await Jn.post(
|
|
4660
4743
|
t,
|
|
4661
4744
|
{
|
|
4662
4745
|
q: e,
|
|
@@ -4669,26 +4752,26 @@ const un = {
|
|
|
4669
4752
|
"Content-Type": "application/json"
|
|
4670
4753
|
}
|
|
4671
4754
|
}
|
|
4672
|
-
), l = (
|
|
4673
|
-
return
|
|
4674
|
-
} catch (
|
|
4675
|
-
return console.warn(`[Translation] Failed for: "${e}"`,
|
|
4755
|
+
), l = (c == null ? void 0 : c.translatedText) || e;
|
|
4756
|
+
return jr(e, n, l), l;
|
|
4757
|
+
} catch (c) {
|
|
4758
|
+
return console.warn(`[Translation] Failed for: "${e}"`, c), e;
|
|
4676
4759
|
}
|
|
4677
|
-
},
|
|
4760
|
+
}, Wr = (e) => typeof e == "string" && e.trim().length > 0, fn = async (e, n, t) => {
|
|
4678
4761
|
const o = await Promise.all(
|
|
4679
4762
|
Object.entries(e).map(async ([r, a]) => {
|
|
4680
|
-
if (
|
|
4681
|
-
const s = await
|
|
4763
|
+
if (Wr(a)) {
|
|
4764
|
+
const s = await Xr(a, n, t);
|
|
4682
4765
|
return [r, s];
|
|
4683
4766
|
} else if (Array.isArray(a)) {
|
|
4684
4767
|
const s = await Promise.all(
|
|
4685
4768
|
a.map(
|
|
4686
|
-
async (
|
|
4769
|
+
async (c) => typeof c == "object" && c !== null ? await fn(c, n, t) : c
|
|
4687
4770
|
)
|
|
4688
4771
|
);
|
|
4689
4772
|
return [r, s];
|
|
4690
4773
|
} else if (typeof a == "object" && a !== null) {
|
|
4691
|
-
const s = await
|
|
4774
|
+
const s = await fn(a, n, t);
|
|
4692
4775
|
return [r, s];
|
|
4693
4776
|
} else
|
|
4694
4777
|
return [r, a];
|
|
@@ -4697,28 +4780,30 @@ const un = {
|
|
|
4697
4780
|
return Object.fromEntries(o);
|
|
4698
4781
|
};
|
|
4699
4782
|
export {
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4783
|
+
Ta as BackAndNextButton,
|
|
4784
|
+
We as BusinessRuleCard,
|
|
4785
|
+
Sn as BusinessRuleCardNew,
|
|
4786
|
+
wn as BusinessRuleView,
|
|
4787
|
+
Cn as BusinessRuleViewNew,
|
|
4788
|
+
da as BusinessRules,
|
|
4789
|
+
sa as BusinessRulesNew,
|
|
4790
|
+
Da as DragAndDropBoxes,
|
|
4791
|
+
pn as DraggableList,
|
|
4792
|
+
Lo as DropdownMenu,
|
|
4793
|
+
xa as DropdownMenuContainer,
|
|
4794
|
+
ca as Filter,
|
|
4795
|
+
ua as FilterModal,
|
|
4796
|
+
ga as FormFilter,
|
|
4797
|
+
pt as ModalRules,
|
|
4798
|
+
ko as RulesForm,
|
|
4799
|
+
ya as SendButton,
|
|
4800
|
+
mo as convertRangeToString,
|
|
4801
|
+
pa as formatDecisionForBackend,
|
|
4802
|
+
ha as parseRangeFromString,
|
|
4803
|
+
fa as revertSortedDataSampleSwitchPlaces,
|
|
4804
|
+
ma as revertSortedDataSwitchPlaces,
|
|
4805
|
+
ba as sortDisplayDataSampleSwitchPlaces,
|
|
4806
|
+
va as sortDisplayDataSwitchPlaces,
|
|
4807
|
+
fn as translateObject,
|
|
4808
|
+
Xr as translateText
|
|
4724
4809
|
};
|