@isettingkit/business-rules 1.0.25 → 1.0.26
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 -1
- package/dist/index.es.js +605 -555
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as i, jsxs as b, Fragment as
|
|
2
|
-
import { MdOutlineDelete as an, MdClear as ln, MdAdd as ve, MdExpandLess as Rn, MdExpandMore as ke, MdClose as
|
|
3
|
-
import { inube as
|
|
4
|
-
import
|
|
5
|
-
import { ValueDataType as
|
|
1
|
+
import { jsx as i, jsxs as b, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { MdOutlineDelete as an, MdClear as ln, MdAdd as ve, MdExpandLess as Rn, MdExpandMore as ke, MdClose as Mn, MdOutlineFilterAltOff as dn, MdOutlineFilterAlt as sn, MdChevronRight as je, MdArrowRight as Ln } from "react-icons/md";
|
|
3
|
+
import { inube as C, Stack as x, Divider as U, Icon as H, Text as E, SkeletonLine as X, useMediaQuery as ee, Blanket as cn, Button as Y, Grid as De, Box as On, Tag as ie, SkeletonIcon as Hn, OptionList as zn, Checkpicker as Vn, Toggle as un, Checkbox as jn, Date as Be, Fieldset as Bn } from "@inubekit/inubekit";
|
|
4
|
+
import T, { keyframes as gn, ThemeContext as Un } from "styled-components";
|
|
5
|
+
import { ValueDataType as B, ValueHowToSetUp as W, DecisionConditionRender as Ue } from "@isettingkit/input";
|
|
6
6
|
import { DecisionViewConditionRenderer as Se, DecisionViewConditionRendererNew as ge } from "@isettingkit/view";
|
|
7
7
|
import { createPortal as pn } from "react-dom";
|
|
8
|
-
import
|
|
8
|
+
import L, { useState as j, useRef as le, useEffect as ce, useContext as _n } from "react";
|
|
9
9
|
import { useFormik as qn } from "formik";
|
|
10
|
-
import { string as
|
|
10
|
+
import { string as Me, mixed as fn, object as he, number as Ie, lazy as _e, date as qe } from "yup";
|
|
11
11
|
import { Link as hn, useLocation as Yn } from "react-router-dom";
|
|
12
12
|
import Xn from "axios";
|
|
13
13
|
import { franc as Wn } from "franc-min";
|
|
14
|
-
const Gn =
|
|
14
|
+
const Gn = T.div`
|
|
15
15
|
border-radius: 8px;
|
|
16
16
|
border: 1px solid
|
|
17
17
|
${({ theme: e }) => {
|
|
18
18
|
var n, t;
|
|
19
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) ||
|
|
19
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || C.palette.neutral.N30;
|
|
20
20
|
}};
|
|
21
21
|
box-sizing: border-box;
|
|
22
22
|
display: flex;
|
|
@@ -27,7 +27,7 @@ const Gn = y.div`
|
|
|
27
27
|
height: 100%;
|
|
28
28
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
29
29
|
`;
|
|
30
|
-
|
|
30
|
+
T.div`
|
|
31
31
|
width: 100%;
|
|
32
32
|
height: 100%;
|
|
33
33
|
overflow-y: auto;
|
|
@@ -46,14 +46,14 @@ y.div`
|
|
|
46
46
|
border-radius: 8px;
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
|
-
const
|
|
49
|
+
const Le = (e) => {
|
|
50
50
|
const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
|
|
51
|
-
return /* @__PURE__ */ i(Gn, { children: /* @__PURE__ */ b(
|
|
51
|
+
return /* @__PURE__ */ i(Gn, { 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(U, {}),
|
|
55
|
-
/* @__PURE__ */ i(
|
|
56
|
-
|
|
55
|
+
/* @__PURE__ */ i(x, { gap: "16px", justifyContent: "end", children: /* @__PURE__ */ i(
|
|
56
|
+
H,
|
|
57
57
|
{
|
|
58
58
|
cursorHover: !0,
|
|
59
59
|
appearance: "danger",
|
|
@@ -70,27 +70,27 @@ const Me = (e) => {
|
|
|
70
70
|
from: e.from ?? "",
|
|
71
71
|
to: e.to ?? ""
|
|
72
72
|
}), et = (e) => e.value, nt = (e) => e.value, tt = (e) => e.value;
|
|
73
|
-
var
|
|
73
|
+
var I = /* @__PURE__ */ ((e) => (e.EQUAL = "EqualTo", e.GREATER_THAN = "GreaterThan", e.LESS_THAN = "LessThan", e.LIST_OF_VALUES = "ListOfValues", e.LIST_OF_VALUES_MULTI = "ListOfValuesMulti", e.RANGE = "Range", e))(I || {});
|
|
74
74
|
const rt = {
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
75
|
+
[I.LIST_OF_VALUES]: Kn,
|
|
76
|
+
[I.LIST_OF_VALUES_MULTI]: Qn,
|
|
77
|
+
[I.RANGE]: Jn,
|
|
78
|
+
[I.GREATER_THAN]: et,
|
|
79
|
+
[I.LESS_THAN]: nt,
|
|
80
|
+
[I.EQUAL]: tt
|
|
81
81
|
}, de = (e) => {
|
|
82
82
|
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = rt[e == null ? void 0 : e.howToSetTheDecision] || Zn;
|
|
83
83
|
return t && r(n) || n || void 0;
|
|
84
|
-
}, Ye =
|
|
84
|
+
}, Ye = T.div`
|
|
85
85
|
& > div {
|
|
86
86
|
border-radius: 8px;
|
|
87
87
|
border: 1px solid
|
|
88
88
|
${({ theme: e }) => {
|
|
89
89
|
var n, t;
|
|
90
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) ||
|
|
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
|
-
`, Xe =
|
|
93
|
+
`, Xe = T.div`
|
|
94
94
|
width: 100%;
|
|
95
95
|
height: 100%;
|
|
96
96
|
overflow-y: auto;
|
|
@@ -120,8 +120,8 @@ const rt = {
|
|
|
120
120
|
textValues: l,
|
|
121
121
|
visibleConditions: c
|
|
122
122
|
} = e;
|
|
123
|
-
return a ? /* @__PURE__ */ b(
|
|
124
|
-
/* @__PURE__ */ i(
|
|
123
|
+
return a ? /* @__PURE__ */ b(x, { direction: "column", gap: "12px", children: [
|
|
124
|
+
/* @__PURE__ */ i(x, { direction: "column", alignItems: "center", children: /* @__PURE__ */ i(
|
|
125
125
|
Se,
|
|
126
126
|
{
|
|
127
127
|
element: o,
|
|
@@ -133,7 +133,7 @@ const rt = {
|
|
|
133
133
|
) }, t.ruleName),
|
|
134
134
|
/* @__PURE__ */ i(U, { dashed: !0 }),
|
|
135
135
|
/* @__PURE__ */ i(Xe, { children: /* @__PURE__ */ b(
|
|
136
|
-
|
|
136
|
+
x,
|
|
137
137
|
{
|
|
138
138
|
direction: "column",
|
|
139
139
|
gap: "12px",
|
|
@@ -141,7 +141,7 @@ const rt = {
|
|
|
141
141
|
height: "203px",
|
|
142
142
|
children: [
|
|
143
143
|
/* @__PURE__ */ i(
|
|
144
|
-
|
|
144
|
+
E,
|
|
145
145
|
{
|
|
146
146
|
type: "label",
|
|
147
147
|
size: "large",
|
|
@@ -151,7 +151,7 @@ const rt = {
|
|
|
151
151
|
children: l.factsThatConditionIt
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
c.map((g) => /* @__PURE__ */ i(Ye, { children: /* @__PURE__ */ i(
|
|
154
|
+
c.map((g) => /* @__PURE__ */ i(Ye, { children: /* @__PURE__ */ i(x, { direction: "column", padding: "8px", children: /* @__PURE__ */ i(
|
|
155
155
|
Se,
|
|
156
156
|
{
|
|
157
157
|
element: { ...g, value: g.value },
|
|
@@ -160,7 +160,7 @@ const rt = {
|
|
|
160
160
|
)
|
|
161
161
|
}
|
|
162
162
|
) }) }, g.conditionName)),
|
|
163
|
-
s && /* @__PURE__ */ b(
|
|
163
|
+
s && /* @__PURE__ */ b(R, { children: [
|
|
164
164
|
/* @__PURE__ */ i(U, { dashed: !0 }),
|
|
165
165
|
r && /* @__PURE__ */ i(
|
|
166
166
|
Se,
|
|
@@ -175,24 +175,24 @@ const rt = {
|
|
|
175
175
|
]
|
|
176
176
|
}
|
|
177
177
|
) })
|
|
178
|
-
] }) : /* @__PURE__ */ b(
|
|
179
|
-
/* @__PURE__ */ b(
|
|
178
|
+
] }) : /* @__PURE__ */ b(x, { direction: "column", gap: "12px", children: [
|
|
179
|
+
/* @__PURE__ */ b(x, { direction: "column", alignItems: "center", gap: "4px", children: [
|
|
180
180
|
/* @__PURE__ */ i(X, { animated: !0, width: "180px" }),
|
|
181
181
|
/* @__PURE__ */ i(X, { animated: !0, width: "85px" })
|
|
182
182
|
] }, "loading"),
|
|
183
|
-
/* @__PURE__ */ b(
|
|
183
|
+
/* @__PURE__ */ b(x, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
184
184
|
/* @__PURE__ */ i(U, { dashed: !0 }),
|
|
185
185
|
/* @__PURE__ */ i(X, { animated: !0, width: "150px" })
|
|
186
186
|
] }),
|
|
187
187
|
/* @__PURE__ */ i(Xe, { children: /* @__PURE__ */ i(
|
|
188
|
-
|
|
188
|
+
x,
|
|
189
189
|
{
|
|
190
190
|
direction: "column",
|
|
191
191
|
gap: "12px",
|
|
192
192
|
justifyContent: "space-between",
|
|
193
193
|
height: "203px",
|
|
194
194
|
children: d.map((g, u) => /* @__PURE__ */ i(Ye, { children: /* @__PURE__ */ b(
|
|
195
|
-
|
|
195
|
+
x,
|
|
196
196
|
{
|
|
197
197
|
direction: "column",
|
|
198
198
|
gap: "12px",
|
|
@@ -208,13 +208,13 @@ const rt = {
|
|
|
208
208
|
) })
|
|
209
209
|
] });
|
|
210
210
|
}, mn = (e) => {
|
|
211
|
-
var
|
|
211
|
+
var f;
|
|
212
212
|
const { decision: n, loading: t = !1, textValues: r } = e, o = !!(n != null && n.effectiveFrom), a = !!(n != null && n.validUntil), d = o && a ? {
|
|
213
213
|
element: {
|
|
214
214
|
labelName: r == null ? void 0 : r.terms,
|
|
215
215
|
value: String(n.effectiveFrom),
|
|
216
216
|
howToSetTheDecision: W.RANGE,
|
|
217
|
-
decisionDataType:
|
|
217
|
+
decisionDataType: B.DATE
|
|
218
218
|
},
|
|
219
219
|
valueData: de({
|
|
220
220
|
labelName: r == null ? void 0 : r.terms,
|
|
@@ -223,27 +223,27 @@ const rt = {
|
|
|
223
223
|
to: String(n.validUntil)
|
|
224
224
|
},
|
|
225
225
|
howToSetTheDecision: W.RANGE,
|
|
226
|
-
decisionDataType:
|
|
226
|
+
decisionDataType: B.DATE
|
|
227
227
|
})
|
|
228
228
|
} : o && !a ? {
|
|
229
229
|
element: {
|
|
230
230
|
labelName: r == null ? void 0 : r.terms,
|
|
231
231
|
value: String(n.effectiveFrom),
|
|
232
232
|
howToSetTheDecision: W.EQUAL,
|
|
233
|
-
decisionDataType:
|
|
233
|
+
decisionDataType: B.DATE
|
|
234
234
|
},
|
|
235
235
|
valueData: de({
|
|
236
236
|
labelName: r == null ? void 0 : r.terms,
|
|
237
237
|
value: String(n.effectiveFrom),
|
|
238
238
|
howToSetTheDecision: W.EQUAL,
|
|
239
|
-
decisionDataType:
|
|
239
|
+
decisionDataType: B.DATE
|
|
240
240
|
})
|
|
241
241
|
} : null, s = n ? {
|
|
242
242
|
labelName: n.labelName || "",
|
|
243
243
|
decisionDataType: n.decisionDataType || "alphabetical",
|
|
244
244
|
value: de(n),
|
|
245
245
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
246
|
-
} : null, l = ((
|
|
246
|
+
} : null, l = ((f = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : f.filter(
|
|
247
247
|
(h) => !h.hidden
|
|
248
248
|
)) || [], c = Array.from({ length: 5 }), g = !!(!t && n && r && s), u = l.length < 2 ? "start" : "space-between";
|
|
249
249
|
return /* @__PURE__ */ i(
|
|
@@ -260,15 +260,15 @@ const rt = {
|
|
|
260
260
|
visibleConditions: l
|
|
261
261
|
}
|
|
262
262
|
);
|
|
263
|
-
}, at =
|
|
263
|
+
}, at = T.div`
|
|
264
264
|
position: relative;
|
|
265
265
|
& > div {
|
|
266
266
|
padding: 24px 16px;
|
|
267
267
|
}
|
|
268
|
-
`, it =
|
|
268
|
+
`, it = T.div`
|
|
269
269
|
background-color: ${({ theme: e }) => {
|
|
270
270
|
var n, t;
|
|
271
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) ||
|
|
271
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || C.palette.neutral.N0;
|
|
272
272
|
}};
|
|
273
273
|
max-width: 450px;
|
|
274
274
|
max-height: 90vh;
|
|
@@ -304,9 +304,9 @@ const rt = {
|
|
|
304
304
|
);
|
|
305
305
|
const d = ee("(max-width: 400px)");
|
|
306
306
|
return pn(
|
|
307
|
-
/* @__PURE__ */ i(at, { smallScreen: d, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(it, { children: /* @__PURE__ */ b(
|
|
308
|
-
/* @__PURE__ */ i(
|
|
309
|
-
/* @__PURE__ */ i(
|
|
307
|
+
/* @__PURE__ */ i(at, { smallScreen: d, children: /* @__PURE__ */ i(cn, { children: /* @__PURE__ */ i(it, { children: /* @__PURE__ */ b(x, { direction: "column", gap: "24px", children: [
|
|
308
|
+
/* @__PURE__ */ i(x, { direction: "column", gap: "24px", children: /* @__PURE__ */ b(x, { alignItems: "center", justifyContent: "space-between", children: [
|
|
309
|
+
/* @__PURE__ */ i(E, { type: "title", size: "large", appearance: "dark", weight: "bold", children: o }),
|
|
310
310
|
/* @__PURE__ */ i(ln, { size: "24px", cursor: "pointer", onClick: r })
|
|
311
311
|
] }) }),
|
|
312
312
|
n
|
|
@@ -323,12 +323,12 @@ const rt = {
|
|
|
323
323
|
transform: translateY(0);
|
|
324
324
|
}
|
|
325
325
|
`;
|
|
326
|
-
|
|
326
|
+
T.div`
|
|
327
327
|
border-radius: 8px;
|
|
328
328
|
border: 1px solid
|
|
329
329
|
${({ theme: e }) => {
|
|
330
330
|
var n, t;
|
|
331
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) ||
|
|
331
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || C.palette.neutral.N30;
|
|
332
332
|
}};
|
|
333
333
|
box-sizing: border-box;
|
|
334
334
|
display: flex;
|
|
@@ -337,21 +337,21 @@ y.div`
|
|
|
337
337
|
height: 100%;
|
|
338
338
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
339
339
|
`;
|
|
340
|
-
|
|
340
|
+
T.div`
|
|
341
341
|
& > div {
|
|
342
342
|
border-radius: 8px;
|
|
343
343
|
border: 1px solid
|
|
344
344
|
${({ theme: e }) => {
|
|
345
345
|
var n, t;
|
|
346
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) ||
|
|
346
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || C.palette.neutral.N30;
|
|
347
347
|
}};
|
|
348
348
|
}
|
|
349
349
|
`;
|
|
350
|
-
const dt =
|
|
350
|
+
const dt = T.div`
|
|
351
351
|
& > div {
|
|
352
352
|
background-color: ${({ theme: e }) => {
|
|
353
353
|
var n, t;
|
|
354
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N10) ||
|
|
354
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N10) || C.palette.neutral.N10;
|
|
355
355
|
}};
|
|
356
356
|
justify-content: center;
|
|
357
357
|
}
|
|
@@ -360,18 +360,18 @@ const dt = y.div`
|
|
|
360
360
|
height: 100%;
|
|
361
361
|
padding-bottom: 12px;
|
|
362
362
|
cursor: pointer;
|
|
363
|
-
`, Oe =
|
|
363
|
+
`, Oe = T.div`
|
|
364
364
|
width: 100%;
|
|
365
365
|
height: 100%;
|
|
366
366
|
& > div {
|
|
367
367
|
animation: ${lt} 600ms ease-out;
|
|
368
368
|
}
|
|
369
|
-
`, st =
|
|
369
|
+
`, st = T.div`
|
|
370
370
|
& > div > div {
|
|
371
371
|
border-radius: 8px;
|
|
372
372
|
box-sizing: border-box;
|
|
373
373
|
}
|
|
374
|
-
`, ct =
|
|
374
|
+
`, ct = T.div`
|
|
375
375
|
& > div {
|
|
376
376
|
width: 100%;
|
|
377
377
|
height: 100%;
|
|
@@ -394,7 +394,7 @@ const dt = y.div`
|
|
|
394
394
|
`, ut = (e) => {
|
|
395
395
|
const { index: n, handleOpenModal: t } = e;
|
|
396
396
|
return /* @__PURE__ */ i(
|
|
397
|
-
|
|
397
|
+
Le,
|
|
398
398
|
{
|
|
399
399
|
id: `loading-card-${n}`,
|
|
400
400
|
handleDelete: () => {
|
|
@@ -407,10 +407,10 @@ const dt = y.div`
|
|
|
407
407
|
);
|
|
408
408
|
}, gt = (e) => {
|
|
409
409
|
const { decision: n, controls: t, handleOpenModal: r, handleDelete: o, textValues: a } = e;
|
|
410
|
-
return n ? /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ b(
|
|
411
|
-
/* @__PURE__ */ i(
|
|
410
|
+
return n ? /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ b(x, { direction: "column", gap: "4px", width: "100%", padding: "0 0 12px 0", children: [
|
|
411
|
+
/* @__PURE__ */ i(E, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: n.decisionId }),
|
|
412
412
|
/* @__PURE__ */ i(
|
|
413
|
-
|
|
413
|
+
Le,
|
|
414
414
|
{
|
|
415
415
|
id: n.decisionId,
|
|
416
416
|
handleDelete: () => o ? o(n.decisionId) : null,
|
|
@@ -427,23 +427,23 @@ const dt = y.div`
|
|
|
427
427
|
handleOpenModal: r,
|
|
428
428
|
shouldRenderEmptyMessage: o
|
|
429
429
|
} = e, a = n || "Agregar decisión";
|
|
430
|
-
return /* @__PURE__ */ i(Oe, { children: o ? null : /* @__PURE__ */ b(
|
|
431
|
-
/* @__PURE__ */ i(
|
|
430
|
+
return /* @__PURE__ */ i(Oe, { children: o ? null : /* @__PURE__ */ b(x, { direction: "column", gap: "4px", width: "100%", height: "100%", children: [
|
|
431
|
+
/* @__PURE__ */ i(E, { type: "title", size: "medium", appearance: "gray", weight: "bold", children: "Nueva decisión" }),
|
|
432
432
|
/* @__PURE__ */ i(
|
|
433
433
|
dt,
|
|
434
434
|
{
|
|
435
435
|
onClick: () => r ? r() : null,
|
|
436
436
|
children: /* @__PURE__ */ i(
|
|
437
|
-
|
|
437
|
+
Le,
|
|
438
438
|
{
|
|
439
439
|
id: `add-decision-${t}`,
|
|
440
440
|
handleDelete: () => {
|
|
441
441
|
},
|
|
442
442
|
handleView: () => r ? r() : null,
|
|
443
443
|
controls: !1,
|
|
444
|
-
children: /* @__PURE__ */ b(
|
|
445
|
-
/* @__PURE__ */ i(
|
|
446
|
-
/* @__PURE__ */ i(
|
|
444
|
+
children: /* @__PURE__ */ b(x, { direction: "column", gap: "12px", alignItems: "center", children: [
|
|
445
|
+
/* @__PURE__ */ i(H, { appearance: "gray", icon: /* @__PURE__ */ i(ve, {}), size: "35px" }),
|
|
446
|
+
/* @__PURE__ */ i(E, { appearance: "gray", type: "body", size: "large", children: a })
|
|
447
447
|
] })
|
|
448
448
|
}
|
|
449
449
|
)
|
|
@@ -490,7 +490,7 @@ const dt = y.div`
|
|
|
490
490
|
})
|
|
491
491
|
), c = ((r == null ? void 0 : r.length) === 0 || r.length < Math.floor(window.innerWidth / 300)) && !o && n;
|
|
492
492
|
return { renderedCards: l, shouldRenderAddCard: c };
|
|
493
|
-
},
|
|
493
|
+
}, Lo = (e) => {
|
|
494
494
|
const {
|
|
495
495
|
controls: n = !0,
|
|
496
496
|
customTitleContentAddCard: t,
|
|
@@ -503,10 +503,10 @@ const dt = y.div`
|
|
|
503
503
|
loading: c,
|
|
504
504
|
handleOpenModal: g,
|
|
505
505
|
handleCloseModal: u,
|
|
506
|
-
handleSubmitForm:
|
|
506
|
+
handleSubmitForm: f,
|
|
507
507
|
handleDelete: h,
|
|
508
508
|
terms: m = !0
|
|
509
|
-
} = e,
|
|
509
|
+
} = e, y = ee("(max-width: 681px)"), D = ee("(max-width: 400px)"), { renderedCards: v, shouldRenderAddCard: w } = ht({
|
|
510
510
|
controls: n,
|
|
511
511
|
customTitleContentAddCard: t,
|
|
512
512
|
decisions: o,
|
|
@@ -514,22 +514,22 @@ const dt = y.div`
|
|
|
514
514
|
handleOpenModal: g,
|
|
515
515
|
handleDelete: h,
|
|
516
516
|
textValues: a
|
|
517
|
-
}),
|
|
518
|
-
return /* @__PURE__ */ b(
|
|
519
|
-
/* @__PURE__ */ i(st, { children: /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(
|
|
520
|
-
|
|
517
|
+
}), N = (o == null ? void 0 : o.length) === 0 && !c;
|
|
518
|
+
return /* @__PURE__ */ b(R, { children: [
|
|
519
|
+
/* @__PURE__ */ i(st, { children: /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i(x, { direction: "column", gap: "16px", padding: "6px", children: N ? /* @__PURE__ */ b(
|
|
520
|
+
x,
|
|
521
521
|
{
|
|
522
522
|
direction: "column",
|
|
523
523
|
gap: "28px",
|
|
524
524
|
width: "100%",
|
|
525
|
-
height:
|
|
525
|
+
height: y ? "auto" : "435px",
|
|
526
526
|
justifyContent: "center",
|
|
527
527
|
alignItems: "center",
|
|
528
528
|
children: [
|
|
529
|
-
/* @__PURE__ */ i(
|
|
529
|
+
/* @__PURE__ */ i(E, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ b(R, { children: [
|
|
530
530
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
531
531
|
/* @__PURE__ */ b(
|
|
532
|
-
|
|
532
|
+
E,
|
|
533
533
|
{
|
|
534
534
|
as: "span",
|
|
535
535
|
type: "label",
|
|
@@ -566,10 +566,10 @@ const dt = y.div`
|
|
|
566
566
|
autoRows: "1fr",
|
|
567
567
|
justifyItems: "center",
|
|
568
568
|
padding: "6px",
|
|
569
|
-
height:
|
|
569
|
+
height: y ? "auto" : "484px",
|
|
570
570
|
children: [
|
|
571
|
-
|
|
572
|
-
|
|
571
|
+
v,
|
|
572
|
+
w && Ae({
|
|
573
573
|
type: "add",
|
|
574
574
|
index: o == null ? void 0 : o.length,
|
|
575
575
|
controls: n,
|
|
@@ -579,7 +579,7 @@ const dt = y.div`
|
|
|
579
579
|
handleOpenModal: g,
|
|
580
580
|
handleDelete: h,
|
|
581
581
|
textValues: a,
|
|
582
|
-
shouldRenderEmptyMessage:
|
|
582
|
+
shouldRenderEmptyMessage: N,
|
|
583
583
|
terms: m
|
|
584
584
|
})
|
|
585
585
|
]
|
|
@@ -595,7 +595,7 @@ const dt = y.div`
|
|
|
595
595
|
xn,
|
|
596
596
|
{
|
|
597
597
|
decision: l || d,
|
|
598
|
-
onSubmitEvent:
|
|
598
|
+
onSubmitEvent: f,
|
|
599
599
|
textValues: a,
|
|
600
600
|
onCancel: () => u ? u() : () => {
|
|
601
601
|
}
|
|
@@ -608,7 +608,7 @@ const dt = y.div`
|
|
|
608
608
|
const { children: n, controls: t = !0, handleDelete: r, id: o } = e;
|
|
609
609
|
return /* @__PURE__ */ b(On, { width: "100%", children: [
|
|
610
610
|
n,
|
|
611
|
-
t && /* @__PURE__ */ i(
|
|
611
|
+
t && /* @__PURE__ */ i(R, { children: /* @__PURE__ */ i(x, { gap: "16px", justifyContent: "end", margin: "16px 0 0 0", children: /* @__PURE__ */ i(
|
|
612
612
|
Y,
|
|
613
613
|
{
|
|
614
614
|
cursorHover: !0,
|
|
@@ -627,16 +627,16 @@ const dt = y.div`
|
|
|
627
627
|
from: e.from ?? "",
|
|
628
628
|
to: e.to ?? ""
|
|
629
629
|
}), xt = (e) => e.value, yt = (e) => e.value, wt = (e) => e.value, Tt = {
|
|
630
|
-
[
|
|
631
|
-
[
|
|
632
|
-
[
|
|
633
|
-
[
|
|
634
|
-
[
|
|
635
|
-
[
|
|
630
|
+
[I.LIST_OF_VALUES]: bt,
|
|
631
|
+
[I.LIST_OF_VALUES_MULTI]: vt,
|
|
632
|
+
[I.RANGE]: Dt,
|
|
633
|
+
[I.GREATER_THAN]: xt,
|
|
634
|
+
[I.LESS_THAN]: yt,
|
|
635
|
+
[I.EQUAL]: wt
|
|
636
636
|
}, se = (e) => {
|
|
637
637
|
const n = e == null ? void 0 : e.value, t = typeof n == "object" && n !== null && !Array.isArray(n), r = Tt[e == null ? void 0 : e.howToSetTheDecision] || mt;
|
|
638
638
|
return t && r(n) || n || void 0;
|
|
639
|
-
}, St =
|
|
639
|
+
}, St = T.div`
|
|
640
640
|
display: flex;
|
|
641
641
|
justify-content: ${({ $justifyContent: e }) => e};
|
|
642
642
|
align-items: ${({ $alignItems: e }) => e};
|
|
@@ -650,16 +650,16 @@ const dt = y.div`
|
|
|
650
650
|
padding: ${({ $padding: e }) => e};
|
|
651
651
|
background: ${({ $background: e, theme: n }) => {
|
|
652
652
|
var t, r, o, a;
|
|
653
|
-
return e ? `${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N10) ||
|
|
653
|
+
return e ? `${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N10) || C.palette.neutral.N10}` : `${((a = (o = n == null ? void 0 : n.palette) == null ? void 0 : o.neutral) == null ? void 0 : a.N0) || C.palette.neutral.N0}`;
|
|
654
654
|
}};
|
|
655
655
|
border: ${({ $border: e, theme: n }) => {
|
|
656
656
|
var t, r;
|
|
657
|
-
return e ? `1px solid ${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N40) ||
|
|
657
|
+
return e ? `1px solid ${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N40) || C.palette.neutral.N40}` : "none";
|
|
658
658
|
}};
|
|
659
659
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
660
660
|
box-sizing: ${({ $boxSizing: e }) => e};
|
|
661
661
|
overflow-y: ${({ $scroll: e }) => e ? "scroll" : "none"};
|
|
662
|
-
`,
|
|
662
|
+
`, z = L.forwardRef(
|
|
663
663
|
(e, n) => {
|
|
664
664
|
const {
|
|
665
665
|
children: t,
|
|
@@ -672,12 +672,12 @@ const dt = y.div`
|
|
|
672
672
|
width: c,
|
|
673
673
|
gap: g,
|
|
674
674
|
background: u,
|
|
675
|
-
borderRadius:
|
|
675
|
+
borderRadius: f,
|
|
676
676
|
border: h,
|
|
677
677
|
margin: m = "0px",
|
|
678
|
-
padding:
|
|
678
|
+
padding: y = "0px",
|
|
679
679
|
boxSizing: D,
|
|
680
|
-
scroll:
|
|
680
|
+
scroll: v = !1
|
|
681
681
|
} = e;
|
|
682
682
|
return /* @__PURE__ */ i(
|
|
683
683
|
St,
|
|
@@ -694,16 +694,16 @@ const dt = y.div`
|
|
|
694
694
|
$background: u,
|
|
695
695
|
$border: h,
|
|
696
696
|
$margin: m,
|
|
697
|
-
$padding:
|
|
698
|
-
$borderRadius:
|
|
697
|
+
$padding: y,
|
|
698
|
+
$borderRadius: f,
|
|
699
699
|
$boxSizing: D,
|
|
700
|
-
$scroll:
|
|
700
|
+
$scroll: v,
|
|
701
701
|
children: t
|
|
702
702
|
}
|
|
703
703
|
);
|
|
704
704
|
}
|
|
705
705
|
);
|
|
706
|
-
|
|
706
|
+
z.displayName = "BorderStack";
|
|
707
707
|
const Ct = (e) => {
|
|
708
708
|
const {
|
|
709
709
|
conditionsAlignment: n,
|
|
@@ -717,12 +717,12 @@ const Ct = (e) => {
|
|
|
717
717
|
onToggle: c,
|
|
718
718
|
hasEffectiveFrom: g,
|
|
719
719
|
hasValidUntil: u,
|
|
720
|
-
effectiveFromRenderer:
|
|
720
|
+
effectiveFromRenderer: f,
|
|
721
721
|
validUntilRenderer: h
|
|
722
722
|
} = e;
|
|
723
|
-
return o ? /* @__PURE__ */ b(
|
|
723
|
+
return o ? /* @__PURE__ */ b(x, { direction: "column", gap: "16px", children: [
|
|
724
724
|
/* @__PURE__ */ b(
|
|
725
|
-
|
|
725
|
+
x,
|
|
726
726
|
{
|
|
727
727
|
alignItems: "start",
|
|
728
728
|
justifyContent: "space-between",
|
|
@@ -737,10 +737,10 @@ const Ct = (e) => {
|
|
|
737
737
|
type: "decision"
|
|
738
738
|
}
|
|
739
739
|
),
|
|
740
|
-
/* @__PURE__ */ b(
|
|
740
|
+
/* @__PURE__ */ b(x, { gap: "8px", children: [
|
|
741
741
|
/* @__PURE__ */ i(ie, { appearance: "gray", label: s, displayIcon: !1 }),
|
|
742
742
|
/* @__PURE__ */ i(
|
|
743
|
-
|
|
743
|
+
H,
|
|
744
744
|
{
|
|
745
745
|
appearance: "dark",
|
|
746
746
|
icon: l ? /* @__PURE__ */ i(Rn, {}) : /* @__PURE__ */ i(ke, {}),
|
|
@@ -754,11 +754,11 @@ const Ct = (e) => {
|
|
|
754
754
|
},
|
|
755
755
|
t.ruleName
|
|
756
756
|
),
|
|
757
|
-
l && /* @__PURE__ */ b(
|
|
757
|
+
l && /* @__PURE__ */ b(R, { children: [
|
|
758
758
|
/* @__PURE__ */ i(U, { dashed: !0 }),
|
|
759
|
-
/* @__PURE__ */ b(
|
|
759
|
+
/* @__PURE__ */ b(x, { direction: "column", gap: "12px", children: [
|
|
760
760
|
/* @__PURE__ */ i(
|
|
761
|
-
|
|
761
|
+
E,
|
|
762
762
|
{
|
|
763
763
|
type: "label",
|
|
764
764
|
size: "large",
|
|
@@ -770,14 +770,14 @@ const Ct = (e) => {
|
|
|
770
770
|
}
|
|
771
771
|
),
|
|
772
772
|
/* @__PURE__ */ b(
|
|
773
|
-
|
|
773
|
+
x,
|
|
774
774
|
{
|
|
775
775
|
direction: "column",
|
|
776
776
|
gap: "8px",
|
|
777
777
|
justifyContent: n,
|
|
778
778
|
children: [
|
|
779
779
|
d.map((m) => /* @__PURE__ */ i(
|
|
780
|
-
|
|
780
|
+
z,
|
|
781
781
|
{
|
|
782
782
|
direction: "column",
|
|
783
783
|
padding: "6px 12px",
|
|
@@ -795,8 +795,8 @@ const Ct = (e) => {
|
|
|
795
795
|
},
|
|
796
796
|
m.conditionName
|
|
797
797
|
)),
|
|
798
|
-
g &&
|
|
799
|
-
|
|
798
|
+
g && f && /* @__PURE__ */ i(
|
|
799
|
+
z,
|
|
800
800
|
{
|
|
801
801
|
direction: "column",
|
|
802
802
|
padding: "6px 12px",
|
|
@@ -805,15 +805,15 @@ const Ct = (e) => {
|
|
|
805
805
|
children: /* @__PURE__ */ i(
|
|
806
806
|
ge,
|
|
807
807
|
{
|
|
808
|
-
element:
|
|
809
|
-
valueData:
|
|
808
|
+
element: f.element,
|
|
809
|
+
valueData: f.valueData
|
|
810
810
|
},
|
|
811
811
|
"effectiveFrom"
|
|
812
812
|
)
|
|
813
813
|
}
|
|
814
814
|
),
|
|
815
815
|
u && h && /* @__PURE__ */ i(
|
|
816
|
-
|
|
816
|
+
z,
|
|
817
817
|
{
|
|
818
818
|
direction: "column",
|
|
819
819
|
padding: "6px 12px",
|
|
@@ -834,18 +834,18 @@ const Ct = (e) => {
|
|
|
834
834
|
)
|
|
835
835
|
] })
|
|
836
836
|
] })
|
|
837
|
-
] }) : /* @__PURE__ */ b(
|
|
838
|
-
/* @__PURE__ */ b(
|
|
837
|
+
] }) : /* @__PURE__ */ b(x, { justifyContent: "space-between", children: [
|
|
838
|
+
/* @__PURE__ */ b(x, { alignItems: "center", gap: "8px", children: [
|
|
839
839
|
/* @__PURE__ */ i(X, { animated: !0, width: "150px" }),
|
|
840
840
|
/* @__PURE__ */ i(X, { animated: !0, width: "70px" })
|
|
841
841
|
] }),
|
|
842
|
-
/* @__PURE__ */ b(
|
|
842
|
+
/* @__PURE__ */ b(x, { alignItems: "center", gap: "8px", children: [
|
|
843
843
|
/* @__PURE__ */ i(X, { animated: !0, width: "50px" }),
|
|
844
844
|
/* @__PURE__ */ i(Hn, { animated: !0 })
|
|
845
845
|
] })
|
|
846
846
|
] });
|
|
847
847
|
}, Dn = (e) => {
|
|
848
|
-
var
|
|
848
|
+
var v;
|
|
849
849
|
const {
|
|
850
850
|
decision: n,
|
|
851
851
|
loading: t = !1,
|
|
@@ -858,45 +858,45 @@ const Ct = (e) => {
|
|
|
858
858
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
859
859
|
value: String(n.effectiveFrom),
|
|
860
860
|
howToSetTheDecision: W.EQUAL,
|
|
861
|
-
decisionDataType:
|
|
861
|
+
decisionDataType: B.DATE
|
|
862
862
|
},
|
|
863
863
|
valueData: se({
|
|
864
864
|
labelName: r == null ? void 0 : r.effectiveFrom,
|
|
865
865
|
value: String(n.effectiveFrom),
|
|
866
866
|
howToSetTheDecision: W.EQUAL,
|
|
867
|
-
decisionDataType:
|
|
867
|
+
decisionDataType: B.DATE
|
|
868
868
|
})
|
|
869
869
|
} : null, g = l ? {
|
|
870
870
|
element: {
|
|
871
871
|
labelName: r == null ? void 0 : r.validUntil,
|
|
872
872
|
value: String(n.validUntil),
|
|
873
873
|
howToSetTheDecision: W.EQUAL,
|
|
874
|
-
decisionDataType:
|
|
874
|
+
decisionDataType: B.DATE
|
|
875
875
|
},
|
|
876
876
|
valueData: se({
|
|
877
877
|
labelName: r == null ? void 0 : r.validUntil,
|
|
878
878
|
value: String(n.validUntil),
|
|
879
879
|
howToSetTheDecision: W.EQUAL,
|
|
880
|
-
decisionDataType:
|
|
880
|
+
decisionDataType: B.DATE
|
|
881
881
|
})
|
|
882
882
|
} : null, u = n ? {
|
|
883
883
|
labelName: n.labelName || "",
|
|
884
884
|
decisionDataType: n.decisionDataType || "alphabetical",
|
|
885
885
|
value: se(n),
|
|
886
886
|
howToSetTheDecision: n.howToSetTheDecision || "EqualTo"
|
|
887
|
-
} : null,
|
|
888
|
-
(
|
|
889
|
-
)) || [], h = Array.from({ length: 5 }), m = !!(!t && n && r && u),
|
|
887
|
+
} : null, f = ((v = n == null ? void 0 : n.conditionsThatEstablishesTheDecision) == null ? void 0 : v.filter(
|
|
888
|
+
(w) => !w.hidden
|
|
889
|
+
)) || [], h = Array.from({ length: 5 }), m = !!(!t && n && r && u), y = f.length < 2 ? "start" : "space-between", D = `N° ${String((o ?? 0) + 1).padStart(2, "0")}`;
|
|
890
890
|
return /* @__PURE__ */ i(
|
|
891
891
|
Ct,
|
|
892
892
|
{
|
|
893
|
-
conditionsAlignment:
|
|
893
|
+
conditionsAlignment: y,
|
|
894
894
|
decision: n,
|
|
895
895
|
decisionMapper: u,
|
|
896
896
|
loading: m,
|
|
897
897
|
skeleton: h,
|
|
898
898
|
textValues: r,
|
|
899
|
-
visibleConditions:
|
|
899
|
+
visibleConditions: f,
|
|
900
900
|
tagLabel: D,
|
|
901
901
|
isOpen: a,
|
|
902
902
|
onToggle: d,
|
|
@@ -916,12 +916,12 @@ const Ct = (e) => {
|
|
|
916
916
|
transform: translateY(0);
|
|
917
917
|
}
|
|
918
918
|
`;
|
|
919
|
-
|
|
919
|
+
T.div`
|
|
920
920
|
border-radius: 8px;
|
|
921
921
|
border: 1px solid
|
|
922
922
|
${({ theme: e }) => {
|
|
923
923
|
var n, t;
|
|
924
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) ||
|
|
924
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || C.palette.neutral.N30;
|
|
925
925
|
}};
|
|
926
926
|
box-sizing: border-box;
|
|
927
927
|
display: flex;
|
|
@@ -930,37 +930,37 @@ y.div`
|
|
|
930
930
|
height: 100%;
|
|
931
931
|
box-shadow: 0px 4px 8px 3px rgba(0, 0, 0, 0.1);
|
|
932
932
|
`;
|
|
933
|
-
|
|
933
|
+
T.div`
|
|
934
934
|
& > div {
|
|
935
935
|
border-radius: 8px;
|
|
936
936
|
border: 1px solid
|
|
937
937
|
${({ theme: e }) => {
|
|
938
938
|
var n, t;
|
|
939
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) ||
|
|
939
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || C.palette.neutral.N30;
|
|
940
940
|
}};
|
|
941
941
|
}
|
|
942
942
|
`;
|
|
943
|
-
const Et =
|
|
943
|
+
const Et = T.div`
|
|
944
944
|
& > div {
|
|
945
945
|
box-shadow: 0px 2px 3px 0px
|
|
946
946
|
${({ theme: e }) => {
|
|
947
947
|
var n, t;
|
|
948
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutralAlpha) == null ? void 0 : t.N30A) ||
|
|
948
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutralAlpha) == null ? void 0 : t.N30A) || C.palette.neutralAlpha.N30A;
|
|
949
949
|
}};
|
|
950
950
|
cursor: pointer;
|
|
951
951
|
}
|
|
952
|
-
`, kt =
|
|
952
|
+
`, kt = T.div`
|
|
953
953
|
width: 100%;
|
|
954
954
|
height: 100%;
|
|
955
955
|
& > div {
|
|
956
956
|
animation: ${Nt} 600ms ease-out;
|
|
957
957
|
}
|
|
958
|
-
`, It =
|
|
958
|
+
`, It = T.div`
|
|
959
959
|
& > div > div {
|
|
960
960
|
border-radius: 8px;
|
|
961
961
|
box-sizing: border-box;
|
|
962
962
|
}
|
|
963
|
-
`, At =
|
|
963
|
+
`, At = T.div`
|
|
964
964
|
& > div {
|
|
965
965
|
width: 100%;
|
|
966
966
|
height: 100%;
|
|
@@ -1005,7 +1005,7 @@ const Et = y.div`
|
|
|
1005
1005
|
isOpen: s,
|
|
1006
1006
|
onToggle: l
|
|
1007
1007
|
} = e;
|
|
1008
|
-
return n ? /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(
|
|
1008
|
+
return n ? /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(x, { direction: "column", gap: "4px", width: "100%", children: /* @__PURE__ */ i(
|
|
1009
1009
|
vn,
|
|
1010
1010
|
{
|
|
1011
1011
|
id: n.decisionId,
|
|
@@ -1036,7 +1036,7 @@ const Et = y.div`
|
|
|
1036
1036
|
{
|
|
1037
1037
|
onClick: () => r ? r() : null,
|
|
1038
1038
|
children: /* @__PURE__ */ i(
|
|
1039
|
-
|
|
1039
|
+
z,
|
|
1040
1040
|
{
|
|
1041
1041
|
direction: "column",
|
|
1042
1042
|
gap: "4px",
|
|
@@ -1045,15 +1045,15 @@ const Et = y.div`
|
|
|
1045
1045
|
background: !0,
|
|
1046
1046
|
borderRadius: "8px",
|
|
1047
1047
|
children: /* @__PURE__ */ b(
|
|
1048
|
-
|
|
1048
|
+
x,
|
|
1049
1049
|
{
|
|
1050
1050
|
justifyContent: "space-between",
|
|
1051
1051
|
alignItems: "center",
|
|
1052
1052
|
padding: "16px",
|
|
1053
1053
|
children: [
|
|
1054
|
-
/* @__PURE__ */ i(
|
|
1054
|
+
/* @__PURE__ */ i(E, { appearance: "gray", type: "label", size: "large", weight: "bold", children: n || "Agregar decisión" }),
|
|
1055
1055
|
/* @__PURE__ */ i(
|
|
1056
|
-
|
|
1056
|
+
H,
|
|
1057
1057
|
{
|
|
1058
1058
|
appearance: "gray",
|
|
1059
1059
|
icon: /* @__PURE__ */ i(ve, {}),
|
|
@@ -1075,7 +1075,7 @@ const Et = y.div`
|
|
|
1075
1075
|
}, Pe = (e) => {
|
|
1076
1076
|
const { type: n } = e, t = Rt[n];
|
|
1077
1077
|
return t ? t(e) : null;
|
|
1078
|
-
},
|
|
1078
|
+
}, Mt = (e) => {
|
|
1079
1079
|
const {
|
|
1080
1080
|
controls: n,
|
|
1081
1081
|
customTitleContentAddCard: t,
|
|
@@ -1087,7 +1087,7 @@ const Et = y.div`
|
|
|
1087
1087
|
isOpenFor: l,
|
|
1088
1088
|
toggleAt: c
|
|
1089
1089
|
} = e, g = o ? Array.from({ length: 3 }).map(
|
|
1090
|
-
(
|
|
1090
|
+
(f, h) => Pe({
|
|
1091
1091
|
type: "loading",
|
|
1092
1092
|
index: h,
|
|
1093
1093
|
controls: n,
|
|
@@ -1098,9 +1098,9 @@ const Et = y.div`
|
|
|
1098
1098
|
textValues: s
|
|
1099
1099
|
})
|
|
1100
1100
|
) : r == null ? void 0 : r.map(
|
|
1101
|
-
(
|
|
1101
|
+
(f, h) => Pe({
|
|
1102
1102
|
type: "decision",
|
|
1103
|
-
decision:
|
|
1103
|
+
decision: f,
|
|
1104
1104
|
controls: l ? l(h) : !1,
|
|
1105
1105
|
customTitleContentAddCard: t,
|
|
1106
1106
|
loading: o,
|
|
@@ -1126,10 +1126,10 @@ const Et = y.div`
|
|
|
1126
1126
|
loading: c,
|
|
1127
1127
|
handleOpenModal: g,
|
|
1128
1128
|
handleCloseModal: u,
|
|
1129
|
-
handleSubmitForm:
|
|
1129
|
+
handleSubmitForm: f,
|
|
1130
1130
|
handleDelete: h,
|
|
1131
1131
|
terms: m = !0
|
|
1132
|
-
} = e, [
|
|
1132
|
+
} = e, [y, D] = j(null), v = ee("(max-width: 681px)"), { renderedCards: w, shouldRenderAddCard: N } = Mt({
|
|
1133
1133
|
controls: n,
|
|
1134
1134
|
customTitleContentAddCard: t,
|
|
1135
1135
|
decisions: o,
|
|
@@ -1137,24 +1137,24 @@ const Et = y.div`
|
|
|
1137
1137
|
handleOpenModal: g,
|
|
1138
1138
|
handleDelete: h,
|
|
1139
1139
|
textValues: a,
|
|
1140
|
-
isOpenFor: (
|
|
1141
|
-
toggleAt: (
|
|
1142
|
-
}),
|
|
1143
|
-
return /* @__PURE__ */ b(
|
|
1144
|
-
/* @__PURE__ */ i(It, { children: /* @__PURE__ */ i(At, { children: /* @__PURE__ */ i(
|
|
1145
|
-
|
|
1140
|
+
isOpenFor: (A) => y === A,
|
|
1141
|
+
toggleAt: (A) => D((q) => q === A ? null : A)
|
|
1142
|
+
}), k = (o == null ? void 0 : o.length) === 0 && !c;
|
|
1143
|
+
return /* @__PURE__ */ b(R, { children: [
|
|
1144
|
+
/* @__PURE__ */ i(It, { children: /* @__PURE__ */ i(At, { children: /* @__PURE__ */ i(x, { direction: "column", gap: "16px", padding: "6px", children: k ? /* @__PURE__ */ b(
|
|
1145
|
+
x,
|
|
1146
1146
|
{
|
|
1147
1147
|
direction: "column",
|
|
1148
1148
|
gap: "28px",
|
|
1149
1149
|
width: "100%",
|
|
1150
|
-
height:
|
|
1150
|
+
height: v ? "auto" : "435px",
|
|
1151
1151
|
justifyContent: "center",
|
|
1152
1152
|
alignItems: "center",
|
|
1153
1153
|
children: [
|
|
1154
|
-
/* @__PURE__ */ i(
|
|
1154
|
+
/* @__PURE__ */ i(E, { as: "span", type: "label", size: "large", appearance: "gray", children: r || /* @__PURE__ */ b(R, { children: [
|
|
1155
1155
|
"Aún NO tienes definidas tasas de interés efectivas . Presiona",
|
|
1156
1156
|
/* @__PURE__ */ b(
|
|
1157
|
-
|
|
1157
|
+
E,
|
|
1158
1158
|
{
|
|
1159
1159
|
as: "span",
|
|
1160
1160
|
type: "label",
|
|
@@ -1191,10 +1191,10 @@ const Et = y.div`
|
|
|
1191
1191
|
autoRows: "auto",
|
|
1192
1192
|
justifyItems: "center",
|
|
1193
1193
|
padding: "6px",
|
|
1194
|
-
height:
|
|
1194
|
+
height: v ? "auto" : "484px",
|
|
1195
1195
|
children: [
|
|
1196
|
-
|
|
1197
|
-
|
|
1196
|
+
w,
|
|
1197
|
+
N && Pe({
|
|
1198
1198
|
type: "add",
|
|
1199
1199
|
index: o == null ? void 0 : o.length,
|
|
1200
1200
|
controls: n,
|
|
@@ -1204,7 +1204,7 @@ const Et = y.div`
|
|
|
1204
1204
|
handleOpenModal: g,
|
|
1205
1205
|
handleDelete: h,
|
|
1206
1206
|
textValues: a,
|
|
1207
|
-
shouldRenderEmptyMessage:
|
|
1207
|
+
shouldRenderEmptyMessage: k,
|
|
1208
1208
|
terms: m
|
|
1209
1209
|
})
|
|
1210
1210
|
]
|
|
@@ -1220,7 +1220,7 @@ const Et = y.div`
|
|
|
1220
1220
|
xn,
|
|
1221
1221
|
{
|
|
1222
1222
|
decision: l || d,
|
|
1223
|
-
onSubmitEvent:
|
|
1223
|
+
onSubmitEvent: f,
|
|
1224
1224
|
textValues: a,
|
|
1225
1225
|
onCancel: () => u ? u() : () => {
|
|
1226
1226
|
}
|
|
@@ -1229,16 +1229,16 @@ const Et = y.div`
|
|
|
1229
1229
|
}
|
|
1230
1230
|
)
|
|
1231
1231
|
] });
|
|
1232
|
-
},
|
|
1232
|
+
}, Lt = {
|
|
1233
1233
|
border: {
|
|
1234
|
-
color:
|
|
1234
|
+
color: C.palette.neutral.N40
|
|
1235
1235
|
}
|
|
1236
|
-
}, Ot =
|
|
1236
|
+
}, Ot = T.div`
|
|
1237
1237
|
border-width: 1px;
|
|
1238
1238
|
border-style: solid;
|
|
1239
1239
|
border-color: ${({ theme: e }) => {
|
|
1240
1240
|
var n, t;
|
|
1241
|
-
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) ||
|
|
1241
|
+
return ((t = (n = e == null ? void 0 : e.box) == null ? void 0 : n.border) == null ? void 0 : t.color) || Lt.border.color;
|
|
1242
1242
|
}};
|
|
1243
1243
|
border-radius: ${({ $borderRadius: e }) => e};
|
|
1244
1244
|
margin: ${({ $margin: e }) => e};
|
|
@@ -1269,70 +1269,70 @@ function Ht(e) {
|
|
|
1269
1269
|
);
|
|
1270
1270
|
}
|
|
1271
1271
|
const zt = (e, n) => {
|
|
1272
|
-
const [t, r] =
|
|
1272
|
+
const [t, r] = j([]), [o, a] = j([]), [d, s] = j(!1), l = le(null);
|
|
1273
1273
|
return ce(() => {
|
|
1274
1274
|
if (!e.current || !l.current) return;
|
|
1275
1275
|
const c = e.current, g = l.current, u = () => {
|
|
1276
|
-
var
|
|
1276
|
+
var N;
|
|
1277
1277
|
const h = c.clientWidth, m = Array.from(
|
|
1278
1278
|
g.querySelectorAll('[data-filter-tag="true"]')
|
|
1279
|
-
),
|
|
1279
|
+
), y = 48;
|
|
1280
1280
|
let D = 0;
|
|
1281
|
-
const
|
|
1282
|
-
for (let
|
|
1283
|
-
const S = ((
|
|
1284
|
-
D + S +
|
|
1281
|
+
const v = [], w = [];
|
|
1282
|
+
for (let k = 0; k < n.length; k++) {
|
|
1283
|
+
const S = ((N = m[k]) == null ? void 0 : N.offsetWidth) ?? 0;
|
|
1284
|
+
D + S + y <= h ? (v.push(n[k]), D += S) : w.push(n[k]);
|
|
1285
1285
|
}
|
|
1286
|
-
r(
|
|
1287
|
-
},
|
|
1286
|
+
r(v), a(w), s(w.length > 0);
|
|
1287
|
+
}, f = new ResizeObserver(() => {
|
|
1288
1288
|
requestAnimationFrame(u);
|
|
1289
1289
|
});
|
|
1290
|
-
return
|
|
1290
|
+
return f.observe(c), () => f.disconnect();
|
|
1291
1291
|
}, [n, e]), { visible: t, hidden: o, showOverflowIndicator: d, measurementRef: l };
|
|
1292
1292
|
};
|
|
1293
|
-
|
|
1293
|
+
T.div`
|
|
1294
1294
|
& > div {
|
|
1295
1295
|
width: 100%;
|
|
1296
1296
|
}
|
|
1297
1297
|
`;
|
|
1298
|
-
const Vt =
|
|
1298
|
+
const Vt = T.div`
|
|
1299
1299
|
position: absolute;
|
|
1300
1300
|
top: calc(100% + 4px);
|
|
1301
1301
|
right: 0;
|
|
1302
1302
|
z-index: 1000;
|
|
1303
1303
|
width: 170px;
|
|
1304
|
-
`,
|
|
1304
|
+
`, jt = T.div`
|
|
1305
1305
|
position: absolute;
|
|
1306
1306
|
visibility: hidden;
|
|
1307
1307
|
pointer-events: none;
|
|
1308
1308
|
height: 0;
|
|
1309
1309
|
overflow: hidden;
|
|
1310
|
-
`,
|
|
1310
|
+
`, Bt = T.div`
|
|
1311
1311
|
cursor: pointer;
|
|
1312
1312
|
`, $e = {
|
|
1313
1313
|
border: {
|
|
1314
1314
|
color: {
|
|
1315
|
-
regular:
|
|
1316
|
-
disabled:
|
|
1317
|
-
focus:
|
|
1318
|
-
invalid:
|
|
1315
|
+
regular: C.palette.neutral.N40,
|
|
1316
|
+
disabled: C.palette.neutral.N40,
|
|
1317
|
+
focus: C.palette.blue.B300,
|
|
1318
|
+
invalid: C.palette.red.R400
|
|
1319
1319
|
}
|
|
1320
1320
|
},
|
|
1321
1321
|
background: {
|
|
1322
1322
|
color: {
|
|
1323
|
-
regular:
|
|
1324
|
-
disabled:
|
|
1323
|
+
regular: C.palette.neutral.N0,
|
|
1324
|
+
disabled: C.palette.neutral.N10
|
|
1325
1325
|
}
|
|
1326
1326
|
},
|
|
1327
1327
|
content: {
|
|
1328
1328
|
color: {
|
|
1329
|
-
regular:
|
|
1330
|
-
disabled:
|
|
1329
|
+
regular: C.palette.neutral.N900,
|
|
1330
|
+
disabled: C.palette.neutral.N70
|
|
1331
1331
|
}
|
|
1332
1332
|
},
|
|
1333
1333
|
placeholder: {
|
|
1334
1334
|
color: {
|
|
1335
|
-
regular:
|
|
1335
|
+
regular: C.palette.neutral.N300
|
|
1336
1336
|
}
|
|
1337
1337
|
},
|
|
1338
1338
|
option: {
|
|
@@ -1341,11 +1341,11 @@ const Vt = y.div`
|
|
|
1341
1341
|
hover: "primary"
|
|
1342
1342
|
},
|
|
1343
1343
|
background: {
|
|
1344
|
-
regular:
|
|
1345
|
-
hover:
|
|
1344
|
+
regular: C.palette.neutral.N0,
|
|
1345
|
+
hover: C.palette.neutral.N30
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
|
-
}, Ut =
|
|
1348
|
+
}, Ut = T.li`
|
|
1349
1349
|
display: flex;
|
|
1350
1350
|
align-items: center;
|
|
1351
1351
|
align-self: stretch;
|
|
@@ -1364,16 +1364,16 @@ const Vt = y.div`
|
|
|
1364
1364
|
}};
|
|
1365
1365
|
}
|
|
1366
1366
|
`, _t = (e) => {
|
|
1367
|
-
var
|
|
1368
|
-
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, d] =
|
|
1367
|
+
var f, h, m, y, D, v;
|
|
1368
|
+
const { id: n, label: t, leadingIcon: r, onClose: o } = e, [a, d] = j(!1), s = () => d(!0), l = () => d(!1), c = _n(Un), g = ((m = (h = (f = c == null ? void 0 : c.input) == null ? void 0 : f.option) == null ? void 0 : h.appearance) == null ? void 0 : m.hover) ?? $e.option.appearance.hover, u = ((v = (D = (y = c == null ? void 0 : c.input) == null ? void 0 : y.option) == null ? void 0 : D.appearance) == null ? void 0 : v.regular) ?? $e.option.appearance.regular;
|
|
1369
1369
|
return /* @__PURE__ */ i(
|
|
1370
1370
|
Ut,
|
|
1371
1371
|
{
|
|
1372
1372
|
id: n,
|
|
1373
1373
|
onMouseEnter: s,
|
|
1374
1374
|
onMouseLeave: l,
|
|
1375
|
-
onClick: (
|
|
1376
|
-
|
|
1375
|
+
onClick: (w) => {
|
|
1376
|
+
w.stopPropagation();
|
|
1377
1377
|
},
|
|
1378
1378
|
children: /* @__PURE__ */ b(
|
|
1379
1379
|
De,
|
|
@@ -1384,7 +1384,7 @@ const Vt = y.div`
|
|
|
1384
1384
|
width: "100%",
|
|
1385
1385
|
children: [
|
|
1386
1386
|
r && /* @__PURE__ */ i(
|
|
1387
|
-
|
|
1387
|
+
H,
|
|
1388
1388
|
{
|
|
1389
1389
|
icon: r,
|
|
1390
1390
|
size: "medium",
|
|
@@ -1392,7 +1392,7 @@ const Vt = y.div`
|
|
|
1392
1392
|
}
|
|
1393
1393
|
),
|
|
1394
1394
|
/* @__PURE__ */ i(
|
|
1395
|
-
|
|
1395
|
+
E,
|
|
1396
1396
|
{
|
|
1397
1397
|
textAlign: "start",
|
|
1398
1398
|
size: "medium",
|
|
@@ -1401,12 +1401,12 @@ const Vt = y.div`
|
|
|
1401
1401
|
}
|
|
1402
1402
|
),
|
|
1403
1403
|
/* @__PURE__ */ i(
|
|
1404
|
-
|
|
1404
|
+
H,
|
|
1405
1405
|
{
|
|
1406
|
-
icon: /* @__PURE__ */ i(
|
|
1406
|
+
icon: /* @__PURE__ */ i(Mn, {}),
|
|
1407
1407
|
size: "small",
|
|
1408
|
-
onClick: (
|
|
1409
|
-
|
|
1408
|
+
onClick: (w) => {
|
|
1409
|
+
w.stopPropagation(), o == null || o();
|
|
1410
1410
|
},
|
|
1411
1411
|
appearance: a ? g : u,
|
|
1412
1412
|
cursorHover: !0
|
|
@@ -1428,30 +1428,30 @@ const Vt = y.div`
|
|
|
1428
1428
|
} = e, s = le(null), l = le(null), c = le(null), {
|
|
1429
1429
|
visible: g,
|
|
1430
1430
|
hidden: u,
|
|
1431
|
-
showOverflowIndicator:
|
|
1431
|
+
showOverflowIndicator: f,
|
|
1432
1432
|
measurementRef: h
|
|
1433
|
-
} = zt(s, n), [m,
|
|
1434
|
-
S.stopPropagation(),
|
|
1433
|
+
} = zt(s, n), [m, y] = j(!1), D = (S) => {
|
|
1434
|
+
S.stopPropagation(), y((A) => !A);
|
|
1435
1435
|
};
|
|
1436
1436
|
ce(() => {
|
|
1437
|
-
const S = (
|
|
1437
|
+
const S = (A) => {
|
|
1438
1438
|
var ze, Ve;
|
|
1439
|
-
const q =
|
|
1440
|
-
!((ze = l.current) != null && ze.contains(q)) && !((Ve = c.current) != null && Ve.contains(q)) &&
|
|
1439
|
+
const q = A.target;
|
|
1440
|
+
!((ze = l.current) != null && ze.contains(q)) && !((Ve = c.current) != null && Ve.contains(q)) && y(!1);
|
|
1441
1441
|
};
|
|
1442
1442
|
return m && window.addEventListener("mousedown", S), () => window.removeEventListener("mousedown", S);
|
|
1443
1443
|
}, [m]);
|
|
1444
|
-
const
|
|
1444
|
+
const v = n.length === 0, w = m && u.length > 0, N = u.map((S) => ({
|
|
1445
1445
|
id: S.label,
|
|
1446
1446
|
value: S.label,
|
|
1447
1447
|
label: S.label,
|
|
1448
1448
|
icon: S.icon
|
|
1449
|
-
})),
|
|
1450
|
-
var
|
|
1451
|
-
(q = (
|
|
1449
|
+
})), k = (S) => {
|
|
1450
|
+
var A, q;
|
|
1451
|
+
(q = (A = u.find((V) => V.label === S)) == null ? void 0 : A.onClose) == null || q.call(A), y(!1);
|
|
1452
1452
|
};
|
|
1453
1453
|
return /* @__PURE__ */ b(Ht, { borderRadius: "8px", width: "100%", children: [
|
|
1454
|
-
/* @__PURE__ */ i(
|
|
1454
|
+
/* @__PURE__ */ i(jt, { ref: h, children: n.map((S) => /* @__PURE__ */ i("div", { "data-filter-tag": "true", children: /* @__PURE__ */ i(
|
|
1455
1455
|
ie,
|
|
1456
1456
|
{
|
|
1457
1457
|
appearance: "primary",
|
|
@@ -1464,7 +1464,7 @@ const Vt = y.div`
|
|
|
1464
1464
|
) }, S.label)) }),
|
|
1465
1465
|
/* @__PURE__ */ b(De, { gap: "12px", templateColumns: "1fr auto auto", width: "100%", children: [
|
|
1466
1466
|
/* @__PURE__ */ i(
|
|
1467
|
-
|
|
1467
|
+
z,
|
|
1468
1468
|
{
|
|
1469
1469
|
ref: s,
|
|
1470
1470
|
background: !0,
|
|
@@ -1475,7 +1475,7 @@ const Vt = y.div`
|
|
|
1475
1475
|
alignItems: "center",
|
|
1476
1476
|
padding: "0px 8px",
|
|
1477
1477
|
border: !0,
|
|
1478
|
-
children:
|
|
1478
|
+
children: v ? /* @__PURE__ */ i(E, { size: "small", type: "label", appearance: "gray", children: o }) : /* @__PURE__ */ b(R, { children: [
|
|
1479
1479
|
g.map((S) => /* @__PURE__ */ i(
|
|
1480
1480
|
ie,
|
|
1481
1481
|
{
|
|
@@ -1489,24 +1489,24 @@ const Vt = y.div`
|
|
|
1489
1489
|
},
|
|
1490
1490
|
S.label
|
|
1491
1491
|
)),
|
|
1492
|
-
|
|
1492
|
+
f && /* @__PURE__ */ b(
|
|
1493
1493
|
"div",
|
|
1494
1494
|
{
|
|
1495
1495
|
ref: c,
|
|
1496
1496
|
style: { position: "relative", display: "inline-block" },
|
|
1497
1497
|
children: [
|
|
1498
|
-
/* @__PURE__ */ i(
|
|
1498
|
+
/* @__PURE__ */ i(Bt, { onClick: D, children: /* @__PURE__ */ i(
|
|
1499
1499
|
ie,
|
|
1500
1500
|
{
|
|
1501
1501
|
appearance: "primary",
|
|
1502
1502
|
label: `+${u.length}`
|
|
1503
1503
|
}
|
|
1504
1504
|
) }),
|
|
1505
|
-
|
|
1505
|
+
w && /* @__PURE__ */ i(Vt, { ref: l, children: /* @__PURE__ */ i(
|
|
1506
1506
|
zn,
|
|
1507
1507
|
{
|
|
1508
|
-
options:
|
|
1509
|
-
onOptionClick:
|
|
1508
|
+
options: N,
|
|
1509
|
+
onOptionClick: k,
|
|
1510
1510
|
children: u.map((S) => /* @__PURE__ */ i(
|
|
1511
1511
|
_t,
|
|
1512
1512
|
{
|
|
@@ -1514,8 +1514,8 @@ const Vt = y.div`
|
|
|
1514
1514
|
label: S.label,
|
|
1515
1515
|
leadingIcon: S.icon,
|
|
1516
1516
|
onClose: () => {
|
|
1517
|
-
var
|
|
1518
|
-
(
|
|
1517
|
+
var A;
|
|
1518
|
+
(A = S.onClose) == null || A.call(S), y(!1);
|
|
1519
1519
|
}
|
|
1520
1520
|
},
|
|
1521
1521
|
S.label
|
|
@@ -1532,7 +1532,7 @@ const Vt = y.div`
|
|
|
1532
1532
|
Y,
|
|
1533
1533
|
{
|
|
1534
1534
|
cursorHover: !0,
|
|
1535
|
-
disabled:
|
|
1535
|
+
disabled: v,
|
|
1536
1536
|
iconBefore: /* @__PURE__ */ i(dn, {}),
|
|
1537
1537
|
onClick: t,
|
|
1538
1538
|
variant: "outlined",
|
|
@@ -1551,12 +1551,12 @@ const Vt = y.div`
|
|
|
1551
1551
|
)
|
|
1552
1552
|
] })
|
|
1553
1553
|
] });
|
|
1554
|
-
}, qt =
|
|
1554
|
+
}, qt = T.div`
|
|
1555
1555
|
display: flex;
|
|
1556
1556
|
flex-direction: column;
|
|
1557
1557
|
background-color: ${({ theme: e }) => {
|
|
1558
1558
|
var n, t;
|
|
1559
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) ||
|
|
1559
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N0) || C.palette.neutral.N0;
|
|
1560
1560
|
}};
|
|
1561
1561
|
width: ${({ $smallScreen: e }) => e ? "auto" : "450px"};
|
|
1562
1562
|
height: auto;
|
|
@@ -1581,13 +1581,13 @@ const Vt = y.div`
|
|
|
1581
1581
|
);
|
|
1582
1582
|
return pn(
|
|
1583
1583
|
/* @__PURE__ */ i(cn, { children: /* @__PURE__ */ b(qt, { $smallScreen: c, children: [
|
|
1584
|
-
/* @__PURE__ */ b(
|
|
1585
|
-
/* @__PURE__ */ b(
|
|
1586
|
-
/* @__PURE__ */ i(
|
|
1587
|
-
/* @__PURE__ */ b(
|
|
1588
|
-
/* @__PURE__ */ i(
|
|
1584
|
+
/* @__PURE__ */ b(x, { direction: "column", gap: "16px", children: [
|
|
1585
|
+
/* @__PURE__ */ b(x, { alignContent: "center", justifyContent: "space-between", children: [
|
|
1586
|
+
/* @__PURE__ */ i(E, { appearance: "dark", size: "small", type: "headline", children: l }),
|
|
1587
|
+
/* @__PURE__ */ b(x, { alignItems: "center", children: [
|
|
1588
|
+
/* @__PURE__ */ i(E, { children: "Cerrar" }),
|
|
1589
1589
|
/* @__PURE__ */ i(
|
|
1590
|
-
|
|
1590
|
+
H,
|
|
1591
1591
|
{
|
|
1592
1592
|
appearance: "dark",
|
|
1593
1593
|
icon: /* @__PURE__ */ i(ln, {}),
|
|
@@ -1600,7 +1600,7 @@ const Vt = y.div`
|
|
|
1600
1600
|
/* @__PURE__ */ i(U, {})
|
|
1601
1601
|
] }),
|
|
1602
1602
|
r,
|
|
1603
|
-
/* @__PURE__ */ b(
|
|
1603
|
+
/* @__PURE__ */ b(x, { gap: "20px", justifyContent: "flex-end", children: [
|
|
1604
1604
|
/* @__PURE__ */ i(
|
|
1605
1605
|
Y,
|
|
1606
1606
|
{
|
|
@@ -1629,12 +1629,12 @@ const Vt = y.div`
|
|
|
1629
1629
|
);
|
|
1630
1630
|
}, Vo = (e) => {
|
|
1631
1631
|
const { appliedFilters: n, fields: t, onChange: r, noFiltersLabel: o } = e, a = ee("(max-width: 768px)"), d = !n || n.length === 0;
|
|
1632
|
-
return /* @__PURE__ */ b(
|
|
1633
|
-
a && /* @__PURE__ */ b(
|
|
1634
|
-
/* @__PURE__ */ b(
|
|
1635
|
-
/* @__PURE__ */ i(
|
|
1632
|
+
return /* @__PURE__ */ b(x, { direction: "column", gap: "16px", children: [
|
|
1633
|
+
a && /* @__PURE__ */ b(R, { children: [
|
|
1634
|
+
/* @__PURE__ */ b(x, { gap: "6px", width: "100%", alignItems: "center", children: [
|
|
1635
|
+
/* @__PURE__ */ i(H, { appearance: "gray", icon: /* @__PURE__ */ i(sn, {}) }),
|
|
1636
1636
|
/* @__PURE__ */ i(
|
|
1637
|
-
|
|
1637
|
+
z,
|
|
1638
1638
|
{
|
|
1639
1639
|
background: !0,
|
|
1640
1640
|
borderRadius: "8px",
|
|
@@ -1645,7 +1645,7 @@ const Vt = y.div`
|
|
|
1645
1645
|
border: !0,
|
|
1646
1646
|
width: "100%",
|
|
1647
1647
|
height: "36px",
|
|
1648
|
-
children: d ? /* @__PURE__ */ i(
|
|
1648
|
+
children: d ? /* @__PURE__ */ i(E, { size: "small", type: "label", appearance: "gray", children: o }) : n == null ? void 0 : n.map((s) => /* @__PURE__ */ i(
|
|
1649
1649
|
ie,
|
|
1650
1650
|
{
|
|
1651
1651
|
appearance: "primary",
|
|
@@ -1662,8 +1662,8 @@ const Vt = y.div`
|
|
|
1662
1662
|
] }),
|
|
1663
1663
|
/* @__PURE__ */ i(U, { dashed: !0 })
|
|
1664
1664
|
] }),
|
|
1665
|
-
t.map((s) => /* @__PURE__ */ b(
|
|
1666
|
-
/* @__PURE__ */ i(
|
|
1665
|
+
t.map((s) => /* @__PURE__ */ b(x, { gap: "6px", alignItems: "center", children: [
|
|
1666
|
+
/* @__PURE__ */ i(x, { padding: "22px 0 0 0", children: /* @__PURE__ */ i(H, { appearance: "primary", icon: s.icon }) }),
|
|
1667
1667
|
/* @__PURE__ */ i(
|
|
1668
1668
|
Vn,
|
|
1669
1669
|
{
|
|
@@ -1686,7 +1686,7 @@ const Vt = y.div`
|
|
|
1686
1686
|
}, Yt = (e) => {
|
|
1687
1687
|
const n = [];
|
|
1688
1688
|
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(";");
|
|
1689
|
-
},
|
|
1689
|
+
}, jo = (e) => {
|
|
1690
1690
|
var d;
|
|
1691
1691
|
const { decision: n, fallbackId: t, template: r } = e, o = (s) => typeof s == "object" && s !== null && "from" in s && "to" in s ? Yt(s) : s, a = ((d = n.conditionsThatEstablishesTheDecision) == null ? void 0 : d.map((s, l) => {
|
|
1692
1692
|
var u;
|
|
@@ -1704,7 +1704,7 @@ const Vt = y.div`
|
|
|
1704
1704
|
value: o(n.value),
|
|
1705
1705
|
conditionsThatEstablishesTheDecision: a
|
|
1706
1706
|
};
|
|
1707
|
-
},
|
|
1707
|
+
}, Bo = (e) => {
|
|
1708
1708
|
if (typeof e != "string") return e;
|
|
1709
1709
|
const n = e.split(";").map((r) => r.trim()), t = {};
|
|
1710
1710
|
for (const r of n)
|
|
@@ -1752,7 +1752,7 @@ const Vt = y.div`
|
|
|
1752
1752
|
} : t;
|
|
1753
1753
|
});
|
|
1754
1754
|
}, Xt = (e) => ({
|
|
1755
|
-
schema:
|
|
1755
|
+
schema: Me().required("Required").test(
|
|
1756
1756
|
"non-empty",
|
|
1757
1757
|
"Value cannot be empty",
|
|
1758
1758
|
(n) => n != null && n.trim() !== ""
|
|
@@ -1792,19 +1792,19 @@ const Vt = y.div`
|
|
|
1792
1792
|
}),
|
|
1793
1793
|
value: { from: n, to: t }
|
|
1794
1794
|
};
|
|
1795
|
-
}, Ce = (e, n) => n ===
|
|
1795
|
+
}, Ce = (e, n) => n === B.PERCENTAGE ? {
|
|
1796
1796
|
schema: Ie().required("Percentage is required").min(0, "Percentage cannot be less than 0").max(100, "Percentage cannot be greater than 100"),
|
|
1797
1797
|
value: e
|
|
1798
1798
|
} : {
|
|
1799
|
-
schema:
|
|
1799
|
+
schema: Me().required("Required"),
|
|
1800
1800
|
value: e
|
|
1801
1801
|
}, Kt = {
|
|
1802
|
-
[
|
|
1803
|
-
[
|
|
1804
|
-
[
|
|
1805
|
-
[
|
|
1806
|
-
[
|
|
1807
|
-
[
|
|
1802
|
+
[I.LIST_OF_VALUES]: Wt,
|
|
1803
|
+
[I.LIST_OF_VALUES_MULTI]: Gt,
|
|
1804
|
+
[I.RANGE]: Zt,
|
|
1805
|
+
[I.GREATER_THAN]: Ce,
|
|
1806
|
+
[I.LESS_THAN]: Ce,
|
|
1807
|
+
[I.EQUAL]: Ce
|
|
1808
1808
|
}, We = (e) => Kt[e] || Xt;
|
|
1809
1809
|
function Qt({
|
|
1810
1810
|
decision: e,
|
|
@@ -1813,7 +1813,7 @@ function Qt({
|
|
|
1813
1813
|
}) {
|
|
1814
1814
|
const r = {
|
|
1815
1815
|
ruleName: e.ruleName || "",
|
|
1816
|
-
decisionDataType: e.decisionDataType ||
|
|
1816
|
+
decisionDataType: e.decisionDataType || B.ALPHABETICAL,
|
|
1817
1817
|
howToSetTheDecision: e.howToSetTheDecision || "",
|
|
1818
1818
|
value: e.value || "",
|
|
1819
1819
|
effectiveFrom: e.effectiveFrom || "",
|
|
@@ -1825,7 +1825,7 @@ function Qt({
|
|
|
1825
1825
|
};
|
|
1826
1826
|
let o;
|
|
1827
1827
|
const a = {
|
|
1828
|
-
ruleName:
|
|
1828
|
+
ruleName: Me().required("Name is required"),
|
|
1829
1829
|
value: _e(() => We(
|
|
1830
1830
|
o.values.howToSetTheDecision
|
|
1831
1831
|
)(
|
|
@@ -1833,9 +1833,9 @@ function Qt({
|
|
|
1833
1833
|
o.values.decisionDataType
|
|
1834
1834
|
).schema),
|
|
1835
1835
|
conditionsThatEstablishesTheDecision: _e((l, { parent: c }) => {
|
|
1836
|
-
var
|
|
1836
|
+
var f;
|
|
1837
1837
|
if ((c == null ? void 0 : c.toggleNone) && Object.keys(c.conditionsThatEstablishesTheDecision || {}).length > 0) return he().shape({});
|
|
1838
|
-
const u = (
|
|
1838
|
+
const u = (f = e.conditionsThatEstablishesTheDecision) == null ? void 0 : f.reduce(
|
|
1839
1839
|
(h, m) => {
|
|
1840
1840
|
if (o.values.conditionsThatEstablishesTheDecision[m.conditionName] !== void 0) {
|
|
1841
1841
|
const D = We(
|
|
@@ -1866,9 +1866,9 @@ function Qt({
|
|
|
1866
1866
|
(l, c, { parent: g }) => (g == null ? void 0 : g.checkClosed) ? c.required("valid Until date is required").test(
|
|
1867
1867
|
"is-after-startDate",
|
|
1868
1868
|
"valid Until date must be greater than or equal to Start date",
|
|
1869
|
-
function(
|
|
1869
|
+
function(f) {
|
|
1870
1870
|
const h = this.parent.effectiveFrom;
|
|
1871
|
-
return !h || !
|
|
1871
|
+
return !h || !f ? !0 : new Date(f) >= new Date(h);
|
|
1872
1872
|
}
|
|
1873
1873
|
) : c.notRequired()
|
|
1874
1874
|
));
|
|
@@ -1888,8 +1888,8 @@ function Qt({
|
|
|
1888
1888
|
effectiveFrom: l.effectiveFrom,
|
|
1889
1889
|
validUntil: l.validUntil,
|
|
1890
1890
|
conditionsThatEstablishesTheDecision: (g = e.conditionsThatEstablishesTheDecision) == null ? void 0 : g.filter((u) => {
|
|
1891
|
-
const
|
|
1892
|
-
return
|
|
1891
|
+
const f = l.conditionsThatEstablishesTheDecision[u.conditionName];
|
|
1892
|
+
return f != null && f !== "";
|
|
1893
1893
|
}).map((u) => ({
|
|
1894
1894
|
...u,
|
|
1895
1895
|
value: l.conditionsThatEstablishesTheDecision[u.conditionName]
|
|
@@ -1906,7 +1906,7 @@ function Qt({
|
|
|
1906
1906
|
void 0
|
|
1907
1907
|
);
|
|
1908
1908
|
else {
|
|
1909
|
-
const u = g.howToSetTheCondition ===
|
|
1909
|
+
const u = g.howToSetTheCondition === I.LIST_OF_VALUES_MULTI ? [] : "";
|
|
1910
1910
|
o.setFieldValue(
|
|
1911
1911
|
`conditionsThatEstablishesTheDecision.${g.conditionName}`,
|
|
1912
1912
|
u
|
|
@@ -1915,16 +1915,16 @@ function Qt({
|
|
|
1915
1915
|
});
|
|
1916
1916
|
} };
|
|
1917
1917
|
}
|
|
1918
|
-
const Jt =
|
|
1918
|
+
const Jt = T.div`
|
|
1919
1919
|
& > div {
|
|
1920
1920
|
border-radius: 8px;
|
|
1921
1921
|
border: 1px solid
|
|
1922
1922
|
${({ theme: e }) => {
|
|
1923
1923
|
var n, t;
|
|
1924
|
-
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) ||
|
|
1924
|
+
return ((t = (n = e == null ? void 0 : e.palette) == null ? void 0 : n.neutral) == null ? void 0 : t.N30) || C.palette.neutral.N30;
|
|
1925
1925
|
}};
|
|
1926
1926
|
}
|
|
1927
|
-
`, er =
|
|
1927
|
+
`, er = T.div`
|
|
1928
1928
|
width: 100%;
|
|
1929
1929
|
height: 100%;
|
|
1930
1930
|
overflow-y: auto;
|
|
@@ -1950,13 +1950,13 @@ const Jt = y.div`
|
|
|
1950
1950
|
labelToggle: a,
|
|
1951
1951
|
name: d,
|
|
1952
1952
|
valueToggle: s = ""
|
|
1953
|
-
} = e, [l, c] =
|
|
1953
|
+
} = e, [l, c] = j(n), g = (u) => {
|
|
1954
1954
|
c(u.target.checked), r(u);
|
|
1955
1955
|
};
|
|
1956
1956
|
return ce(() => {
|
|
1957
1957
|
c(n);
|
|
1958
|
-
}, [n]), /* @__PURE__ */ b(
|
|
1959
|
-
/* @__PURE__ */ i(
|
|
1958
|
+
}, [n]), /* @__PURE__ */ b(R, { children: [
|
|
1959
|
+
/* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(
|
|
1960
1960
|
un,
|
|
1961
1961
|
{
|
|
1962
1962
|
checked: l,
|
|
@@ -1965,10 +1965,10 @@ const Jt = y.div`
|
|
|
1965
1965
|
onChange: g,
|
|
1966
1966
|
size: "small",
|
|
1967
1967
|
value: s,
|
|
1968
|
-
children: /* @__PURE__ */ i(
|
|
1968
|
+
children: /* @__PURE__ */ i(E, { size: "medium", type: "label", weight: "bold", children: a })
|
|
1969
1969
|
}
|
|
1970
1970
|
) }),
|
|
1971
|
-
l && /* @__PURE__ */ i(
|
|
1971
|
+
l && /* @__PURE__ */ i(R, { children: t })
|
|
1972
1972
|
] });
|
|
1973
1973
|
}, tr = (e) => {
|
|
1974
1974
|
const {
|
|
@@ -1983,19 +1983,19 @@ const Jt = y.div`
|
|
|
1983
1983
|
valueEnd: c = "",
|
|
1984
1984
|
messageStart: g = "",
|
|
1985
1985
|
messageEnd: u = "",
|
|
1986
|
-
statusStart:
|
|
1986
|
+
statusStart: f = "pending",
|
|
1987
1987
|
statusEnd: h = "pending"
|
|
1988
|
-
} = e, [m,
|
|
1989
|
-
|
|
1990
|
-
}, S = (
|
|
1991
|
-
|
|
1992
|
-
},
|
|
1993
|
-
|
|
1988
|
+
} = e, [m, y] = j(d), [D, v] = j(l), [w, N] = j(c), k = ({ target: V }) => {
|
|
1989
|
+
y(V.checked), r && r(V.checked);
|
|
1990
|
+
}, S = (V) => {
|
|
1991
|
+
v(V.target.value), n(V);
|
|
1992
|
+
}, A = (V) => {
|
|
1993
|
+
N(V.target.value), t(V);
|
|
1994
1994
|
}, q = ee("(max-width: 400px)");
|
|
1995
|
-
return /* @__PURE__ */ b(
|
|
1996
|
-
/* @__PURE__ */ b(
|
|
1995
|
+
return /* @__PURE__ */ b(R, { children: [
|
|
1996
|
+
/* @__PURE__ */ b(x, { direction: "row", justifyContent: "space-between", margin: "10px 0", children: [
|
|
1997
1997
|
/* @__PURE__ */ i(
|
|
1998
|
-
|
|
1998
|
+
E,
|
|
1999
1999
|
{
|
|
2000
2000
|
appearance: "gray",
|
|
2001
2001
|
margin: "10px 0",
|
|
@@ -2006,17 +2006,17 @@ const Jt = y.div`
|
|
|
2006
2006
|
}
|
|
2007
2007
|
),
|
|
2008
2008
|
/* @__PURE__ */ i(
|
|
2009
|
-
|
|
2009
|
+
x,
|
|
2010
2010
|
{
|
|
2011
2011
|
alignContent: "center",
|
|
2012
2012
|
justifyContent: "center",
|
|
2013
2013
|
wrap: "wrap",
|
|
2014
2014
|
gap: "4px",
|
|
2015
2015
|
children: /* @__PURE__ */ i(
|
|
2016
|
-
|
|
2016
|
+
jn,
|
|
2017
2017
|
{
|
|
2018
2018
|
label: "Cerrada",
|
|
2019
|
-
onChange:
|
|
2019
|
+
onChange: k,
|
|
2020
2020
|
checked: m,
|
|
2021
2021
|
value: ""
|
|
2022
2022
|
}
|
|
@@ -2025,14 +2025,14 @@ const Jt = y.div`
|
|
|
2025
2025
|
)
|
|
2026
2026
|
] }),
|
|
2027
2027
|
/* @__PURE__ */ b(
|
|
2028
|
-
|
|
2028
|
+
x,
|
|
2029
2029
|
{
|
|
2030
2030
|
direction: q ? "column" : "row",
|
|
2031
2031
|
justifyContent: "space-between",
|
|
2032
2032
|
gap: "24px",
|
|
2033
2033
|
children: [
|
|
2034
2034
|
/* @__PURE__ */ i(
|
|
2035
|
-
|
|
2035
|
+
Be,
|
|
2036
2036
|
{
|
|
2037
2037
|
id: "dateStart",
|
|
2038
2038
|
label: o,
|
|
@@ -2040,17 +2040,17 @@ const Jt = y.div`
|
|
|
2040
2040
|
value: D,
|
|
2041
2041
|
required: s,
|
|
2042
2042
|
size: "compact",
|
|
2043
|
-
status:
|
|
2043
|
+
status: f,
|
|
2044
2044
|
message: g
|
|
2045
2045
|
}
|
|
2046
2046
|
),
|
|
2047
2047
|
m && /* @__PURE__ */ i(
|
|
2048
|
-
|
|
2048
|
+
Be,
|
|
2049
2049
|
{
|
|
2050
2050
|
id: "dateEnd",
|
|
2051
2051
|
label: a,
|
|
2052
|
-
onChange:
|
|
2053
|
-
value:
|
|
2052
|
+
onChange: A,
|
|
2053
|
+
value: w,
|
|
2054
2054
|
required: s,
|
|
2055
2055
|
size: "compact",
|
|
2056
2056
|
status: h,
|
|
@@ -2074,7 +2074,7 @@ const Jt = y.div`
|
|
|
2074
2074
|
termStartStatus: c,
|
|
2075
2075
|
termEndStatus: g
|
|
2076
2076
|
} = e;
|
|
2077
|
-
return /* @__PURE__ */ i("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ b(
|
|
2077
|
+
return /* @__PURE__ */ i("form", { onSubmit: n.handleSubmit, children: /* @__PURE__ */ b(x, { direction: "column", gap: "24px", children: [
|
|
2078
2078
|
Ue({
|
|
2079
2079
|
condition: a,
|
|
2080
2080
|
formik: n,
|
|
@@ -2082,7 +2082,7 @@ const Jt = y.div`
|
|
|
2082
2082
|
}),
|
|
2083
2083
|
/* @__PURE__ */ i(U, { dashed: !0 }),
|
|
2084
2084
|
/* @__PURE__ */ i(Jt, { children: /* @__PURE__ */ i(er, { children: /* @__PURE__ */ b(
|
|
2085
|
-
|
|
2085
|
+
x,
|
|
2086
2086
|
{
|
|
2087
2087
|
direction: "column",
|
|
2088
2088
|
padding: "6px 12px",
|
|
@@ -2090,13 +2090,13 @@ const Jt = y.div`
|
|
|
2090
2090
|
height: "272px",
|
|
2091
2091
|
children: [
|
|
2092
2092
|
/* @__PURE__ */ b(
|
|
2093
|
-
|
|
2093
|
+
x,
|
|
2094
2094
|
{
|
|
2095
2095
|
justifyContent: "space-between",
|
|
2096
2096
|
alignItems: "center",
|
|
2097
2097
|
gap: "64px",
|
|
2098
2098
|
children: [
|
|
2099
|
-
/* @__PURE__ */ i(
|
|
2099
|
+
/* @__PURE__ */ i(E, { type: "title", size: "small", weight: "bold", appearance: "gray", children: t.factsThatConditionIt }),
|
|
2100
2100
|
/* @__PURE__ */ i(
|
|
2101
2101
|
un,
|
|
2102
2102
|
{
|
|
@@ -2104,23 +2104,23 @@ const Jt = y.div`
|
|
|
2104
2104
|
onChange: () => d(!n.values.toggleNone),
|
|
2105
2105
|
checked: n.values.toggleNone,
|
|
2106
2106
|
size: "small",
|
|
2107
|
-
children: /* @__PURE__ */ i(
|
|
2107
|
+
children: /* @__PURE__ */ i(E, { as: "span", size: "medium", type: "label", weight: "bold", children: t.none })
|
|
2108
2108
|
}
|
|
2109
2109
|
)
|
|
2110
2110
|
]
|
|
2111
2111
|
}
|
|
2112
2112
|
),
|
|
2113
|
-
/* @__PURE__ */ i(
|
|
2113
|
+
/* @__PURE__ */ i(x, { direction: "column", gap: "20px", children: o == null ? void 0 : o.map((u) => /* @__PURE__ */ i(
|
|
2114
2114
|
nr,
|
|
2115
2115
|
{
|
|
2116
2116
|
id: `toggle-${u.conditionName}`,
|
|
2117
2117
|
name: `toggle.${u.conditionName}`,
|
|
2118
2118
|
labelToggle: u.labelName,
|
|
2119
2119
|
checked: !n.values.toggleNone && n.values.conditionsThatEstablishesTheDecision[u.conditionName] !== void 0,
|
|
2120
|
-
handleToggleChange: (
|
|
2120
|
+
handleToggleChange: (f) => s(
|
|
2121
2121
|
u.conditionName,
|
|
2122
|
-
u.howToSetTheCondition ===
|
|
2123
|
-
)(
|
|
2122
|
+
u.howToSetTheCondition === I.LIST_OF_VALUES_MULTI
|
|
2123
|
+
)(f.target.checked),
|
|
2124
2124
|
children: Ue({ condition: u, formik: n })
|
|
2125
2125
|
},
|
|
2126
2126
|
u.conditionName
|
|
@@ -2128,7 +2128,7 @@ const Jt = y.div`
|
|
|
2128
2128
|
]
|
|
2129
2129
|
}
|
|
2130
2130
|
) }) }),
|
|
2131
|
-
t.terms && /* @__PURE__ */ b(
|
|
2131
|
+
t.terms && /* @__PURE__ */ b(R, { children: [
|
|
2132
2132
|
/* @__PURE__ */ i(U, { dashed: !0 }),
|
|
2133
2133
|
/* @__PURE__ */ i(
|
|
2134
2134
|
tr,
|
|
@@ -2151,8 +2151,8 @@ const Jt = y.div`
|
|
|
2151
2151
|
)
|
|
2152
2152
|
] }),
|
|
2153
2153
|
/* @__PURE__ */ i(U, {}),
|
|
2154
|
-
l && /* @__PURE__ */ i(
|
|
2155
|
-
/* @__PURE__ */ b(
|
|
2154
|
+
l && /* @__PURE__ */ i(E, { type: "label", size: "medium", appearance: "danger", children: String(n.errors.conditionsThatEstablishesTheDecision) }),
|
|
2155
|
+
/* @__PURE__ */ b(x, { direction: "row", justifyContent: "end", gap: "16px", children: [
|
|
2156
2156
|
/* @__PURE__ */ i(Y, { appearance: "gray", onClick: r, children: t.cancel }),
|
|
2157
2157
|
/* @__PURE__ */ i(Y, { type: "submit", children: t.confirm })
|
|
2158
2158
|
] })
|
|
@@ -2182,7 +2182,7 @@ const Jt = y.div`
|
|
|
2182
2182
|
visibleConditions: l,
|
|
2183
2183
|
normalizedDecision: s,
|
|
2184
2184
|
handleToggleNoneChange: d,
|
|
2185
|
-
handleConditionToggleChange: (m,
|
|
2185
|
+
handleConditionToggleChange: (m, y) => (D) => {
|
|
2186
2186
|
if (!D)
|
|
2187
2187
|
a.setFieldValue(
|
|
2188
2188
|
`conditionsThatEstablishesTheDecision.${m}`,
|
|
@@ -2193,10 +2193,10 @@ const Jt = y.div`
|
|
|
2193
2193
|
!1
|
|
2194
2194
|
);
|
|
2195
2195
|
else {
|
|
2196
|
-
const
|
|
2196
|
+
const v = y ? [] : "";
|
|
2197
2197
|
a.setFieldValue(
|
|
2198
2198
|
`conditionsThatEstablishesTheDecision.${m}`,
|
|
2199
|
-
|
|
2199
|
+
v
|
|
2200
2200
|
);
|
|
2201
2201
|
}
|
|
2202
2202
|
},
|
|
@@ -2243,21 +2243,21 @@ const Jt = y.div`
|
|
|
2243
2243
|
}, G = {
|
|
2244
2244
|
item: {
|
|
2245
2245
|
background: {
|
|
2246
|
-
active:
|
|
2247
|
-
inactive:
|
|
2248
|
-
hover:
|
|
2249
|
-
disabled:
|
|
2246
|
+
active: C.palette.blue.B50,
|
|
2247
|
+
inactive: C.palette.neutral.N0,
|
|
2248
|
+
hover: C.palette.neutral.N20,
|
|
2249
|
+
disabled: C.palette.neutral.N20
|
|
2250
2250
|
}
|
|
2251
2251
|
},
|
|
2252
2252
|
border: {
|
|
2253
2253
|
expanded: {
|
|
2254
|
-
color:
|
|
2254
|
+
color: C.palette.blue.B400
|
|
2255
2255
|
},
|
|
2256
2256
|
contracted: {
|
|
2257
|
-
color:
|
|
2257
|
+
color: C.palette.neutral.N0
|
|
2258
2258
|
}
|
|
2259
2259
|
}
|
|
2260
|
-
}, or =
|
|
2260
|
+
}, or = T.div`
|
|
2261
2261
|
& > div {
|
|
2262
2262
|
border: 1px solid
|
|
2263
2263
|
${({ theme: e, $active: n }) => {
|
|
@@ -2273,27 +2273,27 @@ const Jt = y.div`
|
|
|
2273
2273
|
return ((o = (r = (t = e == null ? void 0 : e.menu) == null ? void 0 : t.item) == null ? void 0 : r.background) == null ? void 0 : o.hover) || G.item.background.hover;
|
|
2274
2274
|
}};
|
|
2275
2275
|
}
|
|
2276
|
-
`, Ge =
|
|
2276
|
+
`, Ge = T.div`
|
|
2277
2277
|
display: flex;
|
|
2278
2278
|
align-items: center;
|
|
2279
2279
|
gap: 12px;
|
|
2280
2280
|
width: 100%;
|
|
2281
2281
|
outline: none;
|
|
2282
2282
|
cursor: pointer;
|
|
2283
|
-
`, ar =
|
|
2283
|
+
`, ar = T.div`
|
|
2284
2284
|
display: flex;
|
|
2285
2285
|
align-items: center;
|
|
2286
2286
|
outline: none;
|
|
2287
2287
|
cursor: pointer;
|
|
2288
|
-
`, ir =
|
|
2288
|
+
`, ir = T(hn)`
|
|
2289
2289
|
display: flex;
|
|
2290
2290
|
align-items: center;
|
|
2291
2291
|
text-decoration: none;
|
|
2292
|
-
`, lr =
|
|
2292
|
+
`, lr = T(hn)`
|
|
2293
2293
|
display: block;
|
|
2294
2294
|
text-decoration: none;
|
|
2295
2295
|
color: inherit;
|
|
2296
|
-
`, dr =
|
|
2296
|
+
`, dr = T.div`
|
|
2297
2297
|
& > div {
|
|
2298
2298
|
border-bottom: 1px solid
|
|
2299
2299
|
${({ theme: e, $active: n }) => {
|
|
@@ -2302,7 +2302,7 @@ const Jt = y.div`
|
|
|
2302
2302
|
}};
|
|
2303
2303
|
border-radius: 8px 8px 0 0;
|
|
2304
2304
|
}
|
|
2305
|
-
`, yn =
|
|
2305
|
+
`, yn = T.div`
|
|
2306
2306
|
display: block;
|
|
2307
2307
|
text-decoration: none;
|
|
2308
2308
|
background-color: ${({ theme: e, $active: n }) => {
|
|
@@ -2320,7 +2320,7 @@ const Jt = y.div`
|
|
|
2320
2320
|
return ((a = (o = (r = n == null ? void 0 : n.menu) == null ? void 0 : r.item) == null ? void 0 : o.background) == null ? void 0 : a.hover) || G.item.background.hover;
|
|
2321
2321
|
}};
|
|
2322
2322
|
}
|
|
2323
|
-
`, sr =
|
|
2323
|
+
`, sr = T.div`
|
|
2324
2324
|
display: flex;
|
|
2325
2325
|
flex-direction: column;
|
|
2326
2326
|
|
|
@@ -2334,8 +2334,8 @@ const Jt = y.div`
|
|
|
2334
2334
|
m.preventDefault(), m.stopPropagation(), r();
|
|
2335
2335
|
}, g = (m) => {
|
|
2336
2336
|
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), m.stopPropagation(), r());
|
|
2337
|
-
}, u = n || s ? "primary" : "dark",
|
|
2338
|
-
return /* @__PURE__ */ i(or, { $active: n, children: /* @__PURE__ */ b(
|
|
2337
|
+
}, u = n || s ? "primary" : "dark", f = n || s ? "bold" : "normal", h = L.useId();
|
|
2338
|
+
return /* @__PURE__ */ i(or, { $active: n, children: /* @__PURE__ */ b(z, { border: !0, borderRadius: "8px", width: "100%", children: [
|
|
2339
2339
|
/* @__PURE__ */ i(
|
|
2340
2340
|
dr,
|
|
2341
2341
|
{
|
|
@@ -2345,7 +2345,7 @@ const Jt = y.div`
|
|
|
2345
2345
|
onClick: c,
|
|
2346
2346
|
onKeyDown: g,
|
|
2347
2347
|
children: d ? /* @__PURE__ */ i(ir, { to: d, children: /* @__PURE__ */ b(
|
|
2348
|
-
|
|
2348
|
+
z,
|
|
2349
2349
|
{
|
|
2350
2350
|
alignItems: "center",
|
|
2351
2351
|
borderRadius: "8px",
|
|
@@ -2354,28 +2354,28 @@ const Jt = y.div`
|
|
|
2354
2354
|
padding: "12px 8px",
|
|
2355
2355
|
children: [
|
|
2356
2356
|
/* @__PURE__ */ i(
|
|
2357
|
-
|
|
2357
|
+
H,
|
|
2358
2358
|
{
|
|
2359
2359
|
appearance: u,
|
|
2360
2360
|
cursorHover: !0,
|
|
2361
|
-
icon: n && t.length > 0 ? /* @__PURE__ */ i(ke, {}) : /* @__PURE__ */ i(
|
|
2361
|
+
icon: n && t.length > 0 ? /* @__PURE__ */ i(ke, {}) : /* @__PURE__ */ i(je, {})
|
|
2362
2362
|
}
|
|
2363
2363
|
),
|
|
2364
2364
|
/* @__PURE__ */ i(Ge, { children: /* @__PURE__ */ i(
|
|
2365
|
-
|
|
2365
|
+
E,
|
|
2366
2366
|
{
|
|
2367
2367
|
appearance: u,
|
|
2368
2368
|
cursorHover: !0,
|
|
2369
2369
|
size: "small",
|
|
2370
2370
|
type: "title",
|
|
2371
|
-
weight:
|
|
2371
|
+
weight: f,
|
|
2372
2372
|
children: o
|
|
2373
2373
|
}
|
|
2374
2374
|
) })
|
|
2375
2375
|
]
|
|
2376
2376
|
}
|
|
2377
2377
|
) }) : /* @__PURE__ */ b(
|
|
2378
|
-
|
|
2378
|
+
z,
|
|
2379
2379
|
{
|
|
2380
2380
|
alignItems: "center",
|
|
2381
2381
|
borderRadius: "8px",
|
|
@@ -2384,11 +2384,11 @@ const Jt = y.div`
|
|
|
2384
2384
|
padding: "12px 8px",
|
|
2385
2385
|
children: [
|
|
2386
2386
|
/* @__PURE__ */ i(
|
|
2387
|
-
|
|
2387
|
+
H,
|
|
2388
2388
|
{
|
|
2389
2389
|
appearance: u,
|
|
2390
2390
|
cursorHover: !0,
|
|
2391
|
-
icon: n && t.length > 0 ? /* @__PURE__ */ i(ke, {}) : /* @__PURE__ */ i(
|
|
2391
|
+
icon: n && t.length > 0 ? /* @__PURE__ */ i(ke, {}) : /* @__PURE__ */ i(je, {})
|
|
2392
2392
|
}
|
|
2393
2393
|
),
|
|
2394
2394
|
/* @__PURE__ */ i(Ge, { children: /* @__PURE__ */ i(
|
|
@@ -2399,13 +2399,13 @@ const Jt = y.div`
|
|
|
2399
2399
|
onClick: r,
|
|
2400
2400
|
onKeyDown: l,
|
|
2401
2401
|
children: /* @__PURE__ */ i(
|
|
2402
|
-
|
|
2402
|
+
E,
|
|
2403
2403
|
{
|
|
2404
2404
|
appearance: u,
|
|
2405
2405
|
cursorHover: !0,
|
|
2406
2406
|
size: "small",
|
|
2407
2407
|
type: "title",
|
|
2408
|
-
weight:
|
|
2408
|
+
weight: f,
|
|
2409
2409
|
children: o
|
|
2410
2410
|
}
|
|
2411
2411
|
)
|
|
@@ -2417,23 +2417,23 @@ const Jt = y.div`
|
|
|
2417
2417
|
}
|
|
2418
2418
|
),
|
|
2419
2419
|
n && t.length > 0 && /* @__PURE__ */ i(sr, { id: h, children: t.map((m) => {
|
|
2420
|
-
const
|
|
2421
|
-
return /* @__PURE__ */ i(lr, { to: m.path, children: /* @__PURE__ */ i(yn, { $active:
|
|
2422
|
-
|
|
2420
|
+
const y = m.id === a;
|
|
2421
|
+
return /* @__PURE__ */ i(lr, { to: m.path, children: /* @__PURE__ */ i(yn, { $active: y, children: /* @__PURE__ */ b(
|
|
2422
|
+
x,
|
|
2423
2423
|
{
|
|
2424
2424
|
alignItems: "center",
|
|
2425
2425
|
direction: "row",
|
|
2426
2426
|
gap: "8px",
|
|
2427
|
-
padding:
|
|
2427
|
+
padding: y ? "8px 4px" : "8px 32px",
|
|
2428
2428
|
children: [
|
|
2429
|
-
|
|
2429
|
+
y && /* @__PURE__ */ i(H, { appearance: "primary", icon: /* @__PURE__ */ i(Ln, {}) }),
|
|
2430
2430
|
/* @__PURE__ */ i(
|
|
2431
|
-
|
|
2431
|
+
E,
|
|
2432
2432
|
{
|
|
2433
|
-
appearance:
|
|
2433
|
+
appearance: y ? "primary" : "dark",
|
|
2434
2434
|
size: "small",
|
|
2435
2435
|
type: "title",
|
|
2436
|
-
weight:
|
|
2436
|
+
weight: y ? "bold" : "normal",
|
|
2437
2437
|
children: m.label
|
|
2438
2438
|
}
|
|
2439
2439
|
)
|
|
@@ -2442,30 +2442,30 @@ const Jt = y.div`
|
|
|
2442
2442
|
) }) }, m.id);
|
|
2443
2443
|
}) })
|
|
2444
2444
|
] }) });
|
|
2445
|
-
}, ur =
|
|
2445
|
+
}, ur = T.div`
|
|
2446
2446
|
& > div {
|
|
2447
2447
|
background: ${({ $background: e, theme: n }) => {
|
|
2448
2448
|
var t, r, o, a;
|
|
2449
|
-
return e ? `${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N20) ||
|
|
2449
|
+
return e ? `${((r = (t = n == null ? void 0 : n.palette) == null ? void 0 : t.neutral) == null ? void 0 : r.N20) || C.palette.neutral.N20}` : `${((a = (o = n == null ? void 0 : n.palette) == null ? void 0 : o.neutral) == null ? void 0 : a.N0) || C.palette.neutral.N0}`;
|
|
2450
2450
|
}};
|
|
2451
2451
|
}
|
|
2452
2452
|
height: 90vh;
|
|
2453
2453
|
`, Xo = (e) => {
|
|
2454
|
-
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, [o, a] =
|
|
2455
|
-
|
|
2454
|
+
const { collapseOnNavigate: n = !1, defaultOpenId: t = null, groups: r } = e, [o, a] = L.useState(t), d = Yn();
|
|
2455
|
+
L.useEffect(() => {
|
|
2456
2456
|
n && a(null);
|
|
2457
2457
|
}, [n, d.pathname]);
|
|
2458
|
-
const s =
|
|
2458
|
+
const s = L.useCallback(
|
|
2459
2459
|
(c) => {
|
|
2460
2460
|
var g;
|
|
2461
2461
|
return (g = c.find((u) => u.path === d.pathname)) == null ? void 0 : g.id;
|
|
2462
2462
|
},
|
|
2463
2463
|
[d.pathname]
|
|
2464
|
-
), l =
|
|
2464
|
+
), l = L.useCallback(
|
|
2465
2465
|
(c) => c ? d.pathname === c || d.pathname.startsWith(c + "/") : !1,
|
|
2466
2466
|
[d.pathname]
|
|
2467
2467
|
);
|
|
2468
|
-
return /* @__PURE__ */ i(ur, { $background: !0, children: /* @__PURE__ */ i(
|
|
2468
|
+
return /* @__PURE__ */ i(ur, { $background: !0, children: /* @__PURE__ */ i(x, { direction: "column", gap: "8px", padding: "12px", height: "100%", children: r.map((c) => /* @__PURE__ */ i(
|
|
2469
2469
|
cr,
|
|
2470
2470
|
{
|
|
2471
2471
|
activeId: s(c.links),
|
|
@@ -2479,7 +2479,7 @@ const Jt = y.div`
|
|
|
2479
2479
|
c.id
|
|
2480
2480
|
)) }) });
|
|
2481
2481
|
};
|
|
2482
|
-
function
|
|
2482
|
+
function $(e) {
|
|
2483
2483
|
e.preventDefault();
|
|
2484
2484
|
}
|
|
2485
2485
|
function Q(e) {
|
|
@@ -2526,7 +2526,7 @@ function oe(e) {
|
|
|
2526
2526
|
return { x: e.clientX, y: e.clientY };
|
|
2527
2527
|
}
|
|
2528
2528
|
Array();
|
|
2529
|
-
var He = typeof window < "u",
|
|
2529
|
+
var He = typeof window < "u", P = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap();
|
|
2530
2530
|
function Nn() {
|
|
2531
2531
|
if (!He) return !1;
|
|
2532
2532
|
if ("userAgentData" in navigator)
|
|
@@ -2568,9 +2568,9 @@ var pr = {
|
|
|
2568
2568
|
scrollDebounceTimeout: void 0,
|
|
2569
2569
|
frameIdX: void 0,
|
|
2570
2570
|
frameIdY: void 0
|
|
2571
|
-
},
|
|
2571
|
+
}, p = pr, K = !1, Ze, Ne;
|
|
2572
2572
|
function fr() {
|
|
2573
|
-
|
|
2573
|
+
p.scrollDebounceTimeout && clearTimeout(p.scrollDebounceTimeout), p.longPressTimeout && clearTimeout(p.longPressTimeout), p.frameIdX !== void 0 && cancelAnimationFrame(p.frameIdX), p.frameIdY !== void 0 && cancelAnimationFrame(p.frameIdY), p = { ...{
|
|
2574
2574
|
affectedNodes: [],
|
|
2575
2575
|
coordinates: {
|
|
2576
2576
|
x: 0,
|
|
@@ -2611,49 +2611,49 @@ function fr() {
|
|
|
2611
2611
|
} };
|
|
2612
2612
|
}
|
|
2613
2613
|
function En(e) {
|
|
2614
|
-
return Object.assign(
|
|
2614
|
+
return Object.assign(p, e), e.initialParent.data.emit("dragStarted", p), K = !1, p.emit("dragStarted", p), p;
|
|
2615
2615
|
}
|
|
2616
2616
|
function hr() {
|
|
2617
|
-
|
|
2617
|
+
p.activeState && ne(p.activeState.parent, void 0, p), p.selectedState && J(p.selectedState.nodes, p.selectedState.parent, p), p.selectedState = p.activeState = void 0;
|
|
2618
2618
|
}
|
|
2619
2619
|
function mr() {
|
|
2620
|
-
if (
|
|
2621
|
-
const e =
|
|
2622
|
-
|
|
2620
|
+
if (p.pointerDown && (p.pointerDown.node.el.draggable = !0), p.pointerDown = void 0, !O(p)) return;
|
|
2621
|
+
const e = p.currentParent.data.config;
|
|
2622
|
+
O(p) && e.handleEnd(p);
|
|
2623
2623
|
}
|
|
2624
2624
|
function br(e) {
|
|
2625
|
-
e.key === "Escape" && (
|
|
2625
|
+
e.key === "Escape" && (p.selectedState && J(p.selectedState.nodes, p.selectedState.parent, p), p.activeState && ne(p.activeState.parent, void 0, p), p.selectedState = p.activeState = void 0);
|
|
2626
2626
|
}
|
|
2627
2627
|
function vr(e) {
|
|
2628
|
-
if (
|
|
2628
|
+
if (!F(p)) return;
|
|
2629
2629
|
K = !0;
|
|
2630
|
-
const n =
|
|
2631
|
-
n(
|
|
2630
|
+
const n = p.initialParent.data.config.handleEnd;
|
|
2631
|
+
n(p);
|
|
2632
2632
|
}
|
|
2633
2633
|
function Dr(e) {
|
|
2634
|
-
if (
|
|
2635
|
-
|
|
2634
|
+
if (!F(p)) return;
|
|
2635
|
+
$(e);
|
|
2636
2636
|
const { x: n, y: t } = oe(e);
|
|
2637
|
-
|
|
2637
|
+
F(p) && we({ x: n, y: t }, e, p);
|
|
2638
2638
|
}
|
|
2639
2639
|
function xr(e) {
|
|
2640
|
-
if (!
|
|
2641
|
-
const n =
|
|
2640
|
+
if (!p.pointerDown || !p.pointerDown.validated) return;
|
|
2641
|
+
const n = p.pointerDown.parent.data.config;
|
|
2642
2642
|
if (!(e.pointerType === "mouse" && !Nn()))
|
|
2643
|
-
if (
|
|
2644
|
-
|
|
2643
|
+
if (O(p))
|
|
2644
|
+
O(p) && Ke(e, p);
|
|
2645
2645
|
else {
|
|
2646
|
-
if (
|
|
2647
|
-
clearTimeout(
|
|
2646
|
+
if ($(e), n.longPress && !p.longPress) {
|
|
2647
|
+
clearTimeout(p.longPressTimeout), p.longPress = !1;
|
|
2648
2648
|
return;
|
|
2649
2649
|
}
|
|
2650
|
-
const t = n.draggedNodes(
|
|
2651
|
-
n.dragstartClasses(
|
|
2652
|
-
const r =
|
|
2653
|
-
|
|
2654
|
-
|
|
2650
|
+
const t = n.draggedNodes(p.pointerDown);
|
|
2651
|
+
n.dragstartClasses(p.pointerDown.node, t, n, !0);
|
|
2652
|
+
const r = p.pointerDown.node.el.getBoundingClientRect(), o = Gr(
|
|
2653
|
+
p.pointerDown.node,
|
|
2654
|
+
p.pointerDown.parent,
|
|
2655
2655
|
e,
|
|
2656
|
-
|
|
2656
|
+
p,
|
|
2657
2657
|
t,
|
|
2658
2658
|
r
|
|
2659
2659
|
);
|
|
@@ -2675,12 +2675,12 @@ function yr({
|
|
|
2675
2675
|
keydown: br,
|
|
2676
2676
|
drop: vr,
|
|
2677
2677
|
pointermove: xr,
|
|
2678
|
-
pointercancel:
|
|
2678
|
+
pointercancel: M(r.handlePointercancel),
|
|
2679
2679
|
touchmove: (u) => {
|
|
2680
|
-
|
|
2680
|
+
F(p) && u.cancelable && $(u);
|
|
2681
2681
|
},
|
|
2682
2682
|
contextmenu: (u) => {
|
|
2683
|
-
|
|
2683
|
+
O(p) && $(u);
|
|
2684
2684
|
}
|
|
2685
2685
|
})), In(e);
|
|
2686
2686
|
const [o, a] = wn(), d = {
|
|
@@ -2692,10 +2692,10 @@ function yr({
|
|
|
2692
2692
|
draggedNodes: Rr,
|
|
2693
2693
|
dragstartClasses: Hr,
|
|
2694
2694
|
handleNodeKeydown: Vr,
|
|
2695
|
-
handleDragstart:
|
|
2695
|
+
handleDragstart: Lr,
|
|
2696
2696
|
handleNodeDragover: Kr,
|
|
2697
2697
|
handleParentDragover: Qr,
|
|
2698
|
-
handleNodeDrop:
|
|
2698
|
+
handleNodeDrop: Br,
|
|
2699
2699
|
handleNodeFocus: Ur,
|
|
2700
2700
|
handleNodeBlur: _r,
|
|
2701
2701
|
handlePointercancel: Yr,
|
|
@@ -2703,9 +2703,9 @@ function yr({
|
|
|
2703
2703
|
handleDragend: qr,
|
|
2704
2704
|
handleParentFocus: Tr,
|
|
2705
2705
|
handleNodePointerup: Wr,
|
|
2706
|
-
handleNodePointerover:
|
|
2706
|
+
handleNodePointerover: jr,
|
|
2707
2707
|
handleParentPointerover: Jr,
|
|
2708
|
-
handleParentScroll:
|
|
2708
|
+
handleParentScroll: Mr,
|
|
2709
2709
|
handleNodePointerdown: Or,
|
|
2710
2710
|
handleNodeDragenter: no,
|
|
2711
2711
|
handleNodeDragleave: to,
|
|
@@ -2733,15 +2733,15 @@ function yr({
|
|
|
2733
2733
|
on: a,
|
|
2734
2734
|
emit: o
|
|
2735
2735
|
};
|
|
2736
|
-
new MutationObserver(Pr).observe(e, { childList: !0 }),
|
|
2737
|
-
var
|
|
2738
|
-
(h = (
|
|
2736
|
+
new MutationObserver(Pr).observe(e, { childList: !0 }), P.set(e, d), (l = r.plugins) == null || l.forEach((u) => {
|
|
2737
|
+
var f, h;
|
|
2738
|
+
(h = (f = u(e)) == null ? void 0 : f.tearDown) == null || h.call(f);
|
|
2739
2739
|
}), (c = r.plugins) == null || c.forEach((u) => {
|
|
2740
|
-
var
|
|
2741
|
-
(h = (
|
|
2740
|
+
var f, h;
|
|
2741
|
+
(h = (f = u(e)) == null ? void 0 : f.tearDown) == null || h.call(f);
|
|
2742
2742
|
}), (g = r.plugins) == null || g.forEach((u) => {
|
|
2743
|
-
var
|
|
2744
|
-
(h = (
|
|
2743
|
+
var f, h;
|
|
2744
|
+
(h = (f = u(e)) == null ? void 0 : f.setup) == null || h.call(f);
|
|
2745
2745
|
}), Nr(e, d), xe(e, !0);
|
|
2746
2746
|
}
|
|
2747
2747
|
function kn(e, n, t, r, o, a) {
|
|
@@ -2788,7 +2788,7 @@ function wr({
|
|
|
2788
2788
|
const r = n.map((l) => l.data.value), o = re(e.el, e.data), a = n[0].data.index, d = [...e.data.enabledNodes], s = [
|
|
2789
2789
|
...o.filter((l) => !r.some((c) => ue(l, c)))
|
|
2790
2790
|
];
|
|
2791
|
-
s.splice(t[0].data.index, 0, ...r), "draggedNode" in
|
|
2791
|
+
s.splice(t[0].data.index, 0, ...r), "draggedNode" in p && (p.currentTargetValue = t[0].data.value), Fe(e.el, e.data, [...s]), e.data.config.onSort && e.data.config.onSort({
|
|
2792
2792
|
parent: {
|
|
2793
2793
|
el: e.el,
|
|
2794
2794
|
data: e.data
|
|
@@ -2801,7 +2801,7 @@ function wr({
|
|
|
2801
2801
|
previousPosition: a,
|
|
2802
2802
|
position: t[0].data.index,
|
|
2803
2803
|
targetNodes: t,
|
|
2804
|
-
state:
|
|
2804
|
+
state: p
|
|
2805
2805
|
});
|
|
2806
2806
|
}
|
|
2807
2807
|
function ne(e, n, t) {
|
|
@@ -2851,9 +2851,9 @@ function Sr({
|
|
|
2851
2851
|
state: d
|
|
2852
2852
|
}) {
|
|
2853
2853
|
xe(t.el);
|
|
2854
|
-
const s = r.map((
|
|
2854
|
+
const s = r.map((f) => f.data.value), l = [
|
|
2855
2855
|
...re(e.el, e.data).filter(
|
|
2856
|
-
(
|
|
2856
|
+
(f) => !s.some((h) => ue(f, h))
|
|
2857
2857
|
)
|
|
2858
2858
|
], c = re(n.el, n.data), g = t.el === n.el && n.data.config.sortable === !1;
|
|
2859
2859
|
let u;
|
|
@@ -2887,13 +2887,13 @@ function Cr(e, n) {
|
|
|
2887
2887
|
t(n);
|
|
2888
2888
|
}
|
|
2889
2889
|
function In(e) {
|
|
2890
|
-
const n =
|
|
2890
|
+
const n = P.get(e);
|
|
2891
2891
|
n && n.abortControllers.mainParent && n.abortControllers.mainParent.abort();
|
|
2892
2892
|
}
|
|
2893
|
-
function
|
|
2893
|
+
function F(e) {
|
|
2894
2894
|
return "draggedNode" in e && !!e.draggedNode;
|
|
2895
2895
|
}
|
|
2896
|
-
function
|
|
2896
|
+
function O(e) {
|
|
2897
2897
|
return "synthDragging" in e && !!e.synthDragging;
|
|
2898
2898
|
}
|
|
2899
2899
|
function Nr(e, n) {
|
|
@@ -2903,7 +2903,7 @@ function Nr(e, n) {
|
|
|
2903
2903
|
scroll: fe(n.config.handleParentScroll),
|
|
2904
2904
|
drop: fe(n.config.handleParentDrop),
|
|
2905
2905
|
hasNestedParent: (t) => {
|
|
2906
|
-
const r =
|
|
2906
|
+
const r = P.get(t.target);
|
|
2907
2907
|
r && (r.nestedParent = t.detail.parent);
|
|
2908
2908
|
},
|
|
2909
2909
|
focus: fe(n.config.handleParentFocus)
|
|
@@ -2924,8 +2924,8 @@ function Nr(e, n) {
|
|
|
2924
2924
|
if (!o) return;
|
|
2925
2925
|
const a = r.parentNode;
|
|
2926
2926
|
if (!(a instanceof HTMLElement)) return;
|
|
2927
|
-
const d =
|
|
2928
|
-
d && (
|
|
2927
|
+
const d = P.get(a);
|
|
2928
|
+
d && (p.pointerDown = {
|
|
2929
2929
|
parent: {
|
|
2930
2930
|
el: a,
|
|
2931
2931
|
data: d
|
|
@@ -2944,24 +2944,24 @@ function Er(e) {
|
|
|
2944
2944
|
var t;
|
|
2945
2945
|
const n = e.parent.data.config;
|
|
2946
2946
|
e.node.data.abortControllers.mainNode = me(e.node.el, {
|
|
2947
|
-
keydown:
|
|
2948
|
-
dragstart:
|
|
2949
|
-
dragover:
|
|
2950
|
-
dragenter:
|
|
2951
|
-
dragleave:
|
|
2952
|
-
dragend:
|
|
2953
|
-
drop:
|
|
2954
|
-
focus:
|
|
2955
|
-
blur:
|
|
2956
|
-
pointerup:
|
|
2957
|
-
pointercancel:
|
|
2958
|
-
pointerdown:
|
|
2947
|
+
keydown: M(n.handleNodeKeydown),
|
|
2948
|
+
dragstart: M(n.handleDragstart),
|
|
2949
|
+
dragover: M(n.handleNodeDragover),
|
|
2950
|
+
dragenter: M(n.handleNodeDragenter),
|
|
2951
|
+
dragleave: M(n.handleNodeDragleave),
|
|
2952
|
+
dragend: M(n.handleDragend),
|
|
2953
|
+
drop: M(n.handleNodeDrop),
|
|
2954
|
+
focus: M(n.handleNodeFocus),
|
|
2955
|
+
blur: M(n.handleNodeBlur),
|
|
2956
|
+
pointerup: M(n.handleNodePointerup),
|
|
2957
|
+
pointercancel: M(n.handlePointercancel),
|
|
2958
|
+
pointerdown: M(n.handleNodePointerdown),
|
|
2959
2959
|
handleNodePointerover: n.handleNodePointerover,
|
|
2960
2960
|
touchmove: (r) => {
|
|
2961
|
-
|
|
2961
|
+
F(p) && r.cancelable && $(r);
|
|
2962
2962
|
},
|
|
2963
2963
|
contextmenu: (r) => {
|
|
2964
|
-
|
|
2964
|
+
O(p) && $(r);
|
|
2965
2965
|
}
|
|
2966
2966
|
}), e.node.el.draggable = !0, n.reapplyDragClasses(e.node.el, e.parent.data), (t = e.parent.data.config.plugins) == null || t.forEach((r) => {
|
|
2967
2967
|
var o, a;
|
|
@@ -2976,9 +2976,9 @@ function An(e) {
|
|
|
2976
2976
|
});
|
|
2977
2977
|
}
|
|
2978
2978
|
function kr(e, n) {
|
|
2979
|
-
if (
|
|
2980
|
-
const t =
|
|
2981
|
-
|
|
2979
|
+
if (!F(p)) return;
|
|
2980
|
+
const t = O(p) ? n.config.synthDropZoneClass : n.config.dropZoneClass;
|
|
2981
|
+
p.draggedNode.el === e && te([e], t, !0);
|
|
2982
2982
|
}
|
|
2983
2983
|
function Ir(e) {
|
|
2984
2984
|
var n;
|
|
@@ -2998,11 +2998,11 @@ function Pr(e) {
|
|
|
2998
2998
|
if (e.length === 1 && e[0].addedNodes.length === 1 && !(e[0].addedNodes[0] instanceof HTMLElement))
|
|
2999
2999
|
return;
|
|
3000
3000
|
const n = e[0].target;
|
|
3001
|
-
!(n instanceof HTMLElement) || !
|
|
3001
|
+
!(n instanceof HTMLElement) || !P.get(n) || xe(n);
|
|
3002
3002
|
}
|
|
3003
3003
|
function xe(e, n) {
|
|
3004
3004
|
var s;
|
|
3005
|
-
const t =
|
|
3005
|
+
const t = P.get(e);
|
|
3006
3006
|
if (!t) return;
|
|
3007
3007
|
t.privateClasses = Array.from(e.classList);
|
|
3008
3008
|
const r = [], o = t.config;
|
|
@@ -3041,7 +3041,7 @@ function xe(e, n) {
|
|
|
3041
3041
|
index: l
|
|
3042
3042
|
}
|
|
3043
3043
|
);
|
|
3044
|
-
if (
|
|
3044
|
+
if (!F(p) && p.activeState && ue(p.activeState.node.data.value, u.value) && ne(
|
|
3045
3045
|
{
|
|
3046
3046
|
data: t,
|
|
3047
3047
|
el: e
|
|
@@ -3050,13 +3050,13 @@ function xe(e, n) {
|
|
|
3050
3050
|
el: c,
|
|
3051
3051
|
data: u
|
|
3052
3052
|
},
|
|
3053
|
-
|
|
3054
|
-
),
|
|
3055
|
-
|
|
3056
|
-
const
|
|
3053
|
+
p
|
|
3054
|
+
), F(p) && ue(p.draggedNode.data.value, u.value)) {
|
|
3055
|
+
p.draggedNode.data = u, p.draggedNode.el = c;
|
|
3056
|
+
const f = p.draggedNodes.find(
|
|
3057
3057
|
(h) => h.data.value === u.value
|
|
3058
3058
|
);
|
|
3059
|
-
|
|
3059
|
+
f && (f.el = c);
|
|
3060
3060
|
}
|
|
3061
3061
|
d.push({
|
|
3062
3062
|
el: c,
|
|
@@ -3081,13 +3081,13 @@ function xe(e, n) {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
});
|
|
3083
3083
|
}
|
|
3084
|
-
|
|
3084
|
+
P.set(e, { ...t, enabledNodes: d }), o.remapFinished(t), (s = t.config.plugins) == null || s.forEach((l) => {
|
|
3085
3085
|
var c, g;
|
|
3086
3086
|
(g = (c = l(e)) == null ? void 0 : c.remapFinished) == null || g.call(c);
|
|
3087
3087
|
});
|
|
3088
3088
|
}
|
|
3089
3089
|
function $r() {
|
|
3090
|
-
|
|
3090
|
+
p.remapJustFinished = !0, "draggedNode" in p && (p.affectedNodes = []);
|
|
3091
3091
|
}
|
|
3092
3092
|
function Fr(e) {
|
|
3093
3093
|
return !!e.targetData.parent.data.config.nativeDrag;
|
|
@@ -3095,22 +3095,22 @@ function Fr(e) {
|
|
|
3095
3095
|
function Rr(e) {
|
|
3096
3096
|
var n;
|
|
3097
3097
|
if (e.parent.data.config.multiDrag) {
|
|
3098
|
-
if (
|
|
3098
|
+
if (p.selectedState)
|
|
3099
3099
|
return [
|
|
3100
3100
|
e.node,
|
|
3101
|
-
...(n =
|
|
3101
|
+
...(n = p.selectedState) == null ? void 0 : n.nodes.filter(
|
|
3102
3102
|
(t) => t.el !== e.node.el
|
|
3103
3103
|
)
|
|
3104
3104
|
];
|
|
3105
3105
|
} else return [e.node];
|
|
3106
3106
|
return [];
|
|
3107
3107
|
}
|
|
3108
|
-
function
|
|
3109
|
-
|
|
3110
|
-
|
|
3108
|
+
function Mr(e) {
|
|
3109
|
+
F(p) && (p.emit("scrollStarted", p), !O(p) && (p.preventEnter = !0, Ne && clearTimeout(Ne), Ne = setTimeout(() => {
|
|
3110
|
+
p.preventEnter = !1, p.emit("scrollEnded", p);
|
|
3111
3111
|
}, 100)));
|
|
3112
3112
|
}
|
|
3113
|
-
function
|
|
3113
|
+
function Lr(e, n) {
|
|
3114
3114
|
const t = e.targetData.parent.data.config;
|
|
3115
3115
|
if (!t.nativeDrag || !Fr(e) || !Pn({
|
|
3116
3116
|
x: e.e.clientX,
|
|
@@ -3118,7 +3118,7 @@ function Mr(e, n) {
|
|
|
3118
3118
|
node: e.targetData.node,
|
|
3119
3119
|
config: t
|
|
3120
3120
|
})) {
|
|
3121
|
-
|
|
3121
|
+
$(e.e);
|
|
3122
3122
|
return;
|
|
3123
3123
|
}
|
|
3124
3124
|
let r = t.draggedNodes({
|
|
@@ -3311,23 +3311,23 @@ function Pn({
|
|
|
3311
3311
|
}
|
|
3312
3312
|
function Vr(e) {
|
|
3313
3313
|
}
|
|
3314
|
-
function
|
|
3314
|
+
function jr(e) {
|
|
3315
3315
|
e.detail.targetData.parent.el === e.detail.state.currentParent.el ? Fn(e.detail, e.detail.state) : ye(e.detail, e.detail.state);
|
|
3316
3316
|
}
|
|
3317
|
-
function
|
|
3317
|
+
function Br(e, n) {
|
|
3318
3318
|
const t = e.targetData.parent.data.config;
|
|
3319
3319
|
t.nativeDrag && (Q(e.e), K = !0, t.handleEnd(n));
|
|
3320
3320
|
}
|
|
3321
3321
|
function Ur(e) {
|
|
3322
|
-
e.e.target !== e.e.currentTarget &&
|
|
3322
|
+
e.e.target !== e.e.currentTarget && p.pointerDown && (p.pointerDown.node.el.draggable = !1);
|
|
3323
3323
|
}
|
|
3324
3324
|
function _r(e) {
|
|
3325
|
-
e.e.target !== e.e.currentTarget &&
|
|
3325
|
+
e.e.target !== e.e.currentTarget && p.pointerDown && (p.pointerDown.node.el.draggable = !0);
|
|
3326
3326
|
}
|
|
3327
3327
|
function qr(e, n) {
|
|
3328
3328
|
const t = e.targetData.parent.data.config;
|
|
3329
3329
|
if (t.nativeDrag) {
|
|
3330
|
-
if (
|
|
3330
|
+
if ($(e.e), Q(e.e), K) {
|
|
3331
3331
|
K = !1;
|
|
3332
3332
|
return;
|
|
3333
3333
|
}
|
|
@@ -3336,12 +3336,12 @@ function qr(e, n) {
|
|
|
3336
3336
|
}
|
|
3337
3337
|
function Yr(e, n) {
|
|
3338
3338
|
var r;
|
|
3339
|
-
if (!
|
|
3340
|
-
if (
|
|
3339
|
+
if (!O(n)) return;
|
|
3340
|
+
if ($(e.e), K) {
|
|
3341
3341
|
K = !1;
|
|
3342
3342
|
return;
|
|
3343
3343
|
}
|
|
3344
|
-
const t = (r =
|
|
3344
|
+
const t = (r = P.get(n.initialParent.el)) == null ? void 0 : r.config;
|
|
3345
3345
|
t != null && t.onDragend && t.onDragend({
|
|
3346
3346
|
parent: n.currentParent,
|
|
3347
3347
|
values: re(n.currentParent.el, n.currentParent.data),
|
|
@@ -3351,10 +3351,10 @@ function Yr(e, n) {
|
|
|
3351
3351
|
}), t == null || t.handleEnd(n);
|
|
3352
3352
|
}
|
|
3353
3353
|
function Xr(e) {
|
|
3354
|
-
var g, u,
|
|
3354
|
+
var g, u, f, h, m;
|
|
3355
3355
|
e.draggedNode && (e.draggedNode.el.draggable = !0);
|
|
3356
|
-
const n = e.draggedNodes.map((
|
|
3357
|
-
|
|
3356
|
+
const n = e.draggedNodes.map((y) => y.el), t = e.initialParent.data, r = O(e), o = (g = P.get(e.initialParent.el)) == null ? void 0 : g.config, a = r ? o == null ? void 0 : o.synthDropZoneClass : o == null ? void 0 : o.dropZoneClass, d = (u = t == null ? void 0 : t.config) == null ? void 0 : u.longPressClass, s = r ? (f = t == null ? void 0 : t.config) == null ? void 0 : f.synthDragPlaceholderClass : (h = t == null ? void 0 : t.config) == null ? void 0 : h.dragPlaceholderClass, l = e.originalZIndex;
|
|
3357
|
+
O(e) && (e.clonedDraggedNode && e.clonedDraggedNode.remove(), e.longPressTimeout && clearTimeout(e.longPressTimeout)), Re(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(() => {
|
|
3358
3358
|
Z(n, a), Z(n, d), Z(n, s);
|
|
3359
3359
|
}), J(e.draggedNodes, e.currentParent, e), ne(e.currentParent, void 0, e);
|
|
3360
3360
|
const c = { ...e };
|
|
@@ -3375,10 +3375,10 @@ function Wr(e, n) {
|
|
|
3375
3375
|
n.pointerSelection = !1, "longPressTimeout" in n && n.longPressTimeout && clearTimeout(n.longPressTimeout), n.longPress = !1, Z(
|
|
3376
3376
|
e.targetData.parent.data.enabledNodes.map((r) => r.el),
|
|
3377
3377
|
t.longPressClass
|
|
3378
|
-
),
|
|
3378
|
+
), F(n) && t.handleEnd(n);
|
|
3379
3379
|
}
|
|
3380
3380
|
function Gr(e, n, t, r, o, a) {
|
|
3381
|
-
var m,
|
|
3381
|
+
var m, y;
|
|
3382
3382
|
const d = n.data.config;
|
|
3383
3383
|
let s, l;
|
|
3384
3384
|
const c = [
|
|
@@ -3409,12 +3409,12 @@ function Gr(e, n, t, r, o, a) {
|
|
|
3409
3409
|
"height",
|
|
3410
3410
|
"boxSizing",
|
|
3411
3411
|
"overflow"
|
|
3412
|
-
], g = (D,
|
|
3413
|
-
const
|
|
3414
|
-
c.forEach((
|
|
3415
|
-
|
|
3412
|
+
], g = (D, v) => {
|
|
3413
|
+
const w = window.getComputedStyle(D);
|
|
3414
|
+
c.forEach((N) => {
|
|
3415
|
+
v.style[N] = w[N];
|
|
3416
3416
|
});
|
|
3417
|
-
}, u = (D,
|
|
3417
|
+
}, u = (D, v = {}) => {
|
|
3418
3418
|
Object.assign(D.style, {
|
|
3419
3419
|
position: "absolute",
|
|
3420
3420
|
zIndex: "9999",
|
|
@@ -3425,7 +3425,7 @@ function Gr(e, n, t, r, o, a) {
|
|
|
3425
3425
|
overflow: "hidden",
|
|
3426
3426
|
width: `${a.width}px`,
|
|
3427
3427
|
height: `${a.height}px`,
|
|
3428
|
-
...
|
|
3428
|
+
...v
|
|
3429
3429
|
});
|
|
3430
3430
|
};
|
|
3431
3431
|
if (d.synthDragImage)
|
|
@@ -3434,19 +3434,19 @@ function Gr(e, n, t, r, o, a) {
|
|
|
3434
3434
|
s = e.el.cloneNode(!0), g(e.el, s), s.setAttribute("popover", "manual"), u(s);
|
|
3435
3435
|
else {
|
|
3436
3436
|
const D = document.createElement("div");
|
|
3437
|
-
D.setAttribute("popover", "manual"), o.forEach((
|
|
3438
|
-
const
|
|
3439
|
-
g(
|
|
3437
|
+
D.setAttribute("popover", "manual"), o.forEach((v) => {
|
|
3438
|
+
const w = v.el.cloneNode(!0);
|
|
3439
|
+
g(v.el, w), w.style.pointerEvents = "none", w.style.margin = "0", D.append(w);
|
|
3440
3440
|
}), 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", s = D;
|
|
3441
3441
|
}
|
|
3442
3442
|
s.id = "dnd-dragged-node-clone", n.el.appendChild(s), s.showPopover();
|
|
3443
|
-
const
|
|
3443
|
+
const f = {
|
|
3444
3444
|
clonedDraggedEls: [],
|
|
3445
3445
|
clonedDraggedNode: s,
|
|
3446
3446
|
synthDragScrolling: !1,
|
|
3447
3447
|
synthDragging: !0,
|
|
3448
3448
|
rootScrollWidth: (m = document.scrollingElement) == null ? void 0 : m.scrollWidth,
|
|
3449
|
-
rootScrollHeight: (
|
|
3449
|
+
rootScrollHeight: (y = document.scrollingElement) == null ? void 0 : y.scrollHeight
|
|
3450
3450
|
};
|
|
3451
3451
|
return En({
|
|
3452
3452
|
...kn(
|
|
@@ -3457,13 +3457,13 @@ function Gr(e, n, t, r, o, a) {
|
|
|
3457
3457
|
l == null ? void 0 : l.offsetX,
|
|
3458
3458
|
l == null ? void 0 : l.offsetY
|
|
3459
3459
|
),
|
|
3460
|
-
...
|
|
3460
|
+
...f
|
|
3461
3461
|
});
|
|
3462
3462
|
}
|
|
3463
3463
|
function Zr(e, n, t) {
|
|
3464
3464
|
const r = e.targetData.parent.data.config;
|
|
3465
3465
|
n.longPressTimeout = setTimeout(() => {
|
|
3466
|
-
n && (n.longPress = !0, r.longPressClass && e.e.cancelable && te([t.el], r.longPressClass),
|
|
3466
|
+
n && (n.longPress = !0, r.longPressClass && e.e.cancelable && te([t.el], r.longPressClass), $(e.e));
|
|
3467
3467
|
}, r.longPressDuration || 1e3);
|
|
3468
3468
|
}
|
|
3469
3469
|
function Re(e, n = !0, t = !0) {
|
|
@@ -3480,7 +3480,7 @@ function $n(e, n = !1) {
|
|
|
3480
3480
|
function Ke(e, n, t = !1) {
|
|
3481
3481
|
const r = oe(e);
|
|
3482
3482
|
n.coordinates.x = r.x, n.coordinates.y = r.y, $n(n, t), n.scrollDebounceTimeout && (clearTimeout(n.scrollDebounceTimeout), n.scrollDebounceTimeout = void 0), n.scrollDebounceTimeout = setTimeout(() => {
|
|
3483
|
-
|
|
3483
|
+
O(n) && we(n.coordinates, e, n);
|
|
3484
3484
|
}, 16);
|
|
3485
3485
|
const o = io(r);
|
|
3486
3486
|
if (!o) {
|
|
@@ -3513,13 +3513,13 @@ function Kr(e, n) {
|
|
|
3513
3513
|
var a;
|
|
3514
3514
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
3515
3515
|
const { x: r, y: o } = oe(e.e);
|
|
3516
|
-
n.coordinates.y = o, n.coordinates.x = r,
|
|
3516
|
+
n.coordinates.y = o, n.coordinates.x = r, $(e.e), Q(e.e), F(n) && we({ x: r, y: o }, e.e, n), e.targetData.parent.el === ((a = n.currentParent) == null ? void 0 : a.el) ? Fn(e, n) : ye(e, n);
|
|
3517
3517
|
}
|
|
3518
3518
|
function Qr(e, n) {
|
|
3519
3519
|
if (!e.targetData.parent.data.config.nativeDrag) return;
|
|
3520
|
-
|
|
3520
|
+
$(e.e), Q(e.e);
|
|
3521
3521
|
const { x: r, y: o } = oe(e.e);
|
|
3522
|
-
|
|
3522
|
+
F(n) && we({ x: r, y: o }, e.e, n), ye(e, n);
|
|
3523
3523
|
}
|
|
3524
3524
|
function Jr(e) {
|
|
3525
3525
|
e.detail.targetData.parent.el !== e.detail.state.currentParent.el && ye(e.detail, e.detail.state);
|
|
@@ -3543,10 +3543,10 @@ function eo({
|
|
|
3543
3543
|
) : !(!a.group || a.group !== d.group);
|
|
3544
3544
|
}
|
|
3545
3545
|
function no(e, n) {
|
|
3546
|
-
|
|
3546
|
+
$(e.e);
|
|
3547
3547
|
}
|
|
3548
3548
|
function to(e, n) {
|
|
3549
|
-
|
|
3549
|
+
$(e.e);
|
|
3550
3550
|
}
|
|
3551
3551
|
function ro(e, n, t, r) {
|
|
3552
3552
|
var g;
|
|
@@ -3595,11 +3595,11 @@ function Fn(e, n) {
|
|
|
3595
3595
|
targetNodes: [e.targetData.node]
|
|
3596
3596
|
});
|
|
3597
3597
|
}
|
|
3598
|
-
function
|
|
3598
|
+
function M(e) {
|
|
3599
3599
|
function n(t) {
|
|
3600
3600
|
const r = _.get(t);
|
|
3601
3601
|
if (!r) return;
|
|
3602
|
-
const o =
|
|
3602
|
+
const o = P.get(t.parentNode);
|
|
3603
3603
|
if (o)
|
|
3604
3604
|
return {
|
|
3605
3605
|
node: {
|
|
@@ -3620,12 +3620,12 @@ function L(e) {
|
|
|
3620
3620
|
e: t,
|
|
3621
3621
|
targetData: r
|
|
3622
3622
|
},
|
|
3623
|
-
|
|
3623
|
+
p
|
|
3624
3624
|
);
|
|
3625
3625
|
};
|
|
3626
3626
|
}
|
|
3627
3627
|
function ye(e, n) {
|
|
3628
|
-
|
|
3628
|
+
$(e.e), eo({
|
|
3629
3629
|
currentParent: n.currentParent,
|
|
3630
3630
|
targetParent: e.targetData.parent,
|
|
3631
3631
|
initialParent: n.initialParent,
|
|
@@ -3643,7 +3643,7 @@ function ye(e, n) {
|
|
|
3643
3643
|
}
|
|
3644
3644
|
function fe(e) {
|
|
3645
3645
|
function n(t) {
|
|
3646
|
-
const r =
|
|
3646
|
+
const r = P.get(t);
|
|
3647
3647
|
if (r)
|
|
3648
3648
|
return {
|
|
3649
3649
|
parent: {
|
|
@@ -3660,7 +3660,7 @@ function fe(e) {
|
|
|
3660
3660
|
e: t,
|
|
3661
3661
|
targetData: r
|
|
3662
3662
|
},
|
|
3663
|
-
|
|
3663
|
+
p
|
|
3664
3664
|
);
|
|
3665
3665
|
};
|
|
3666
3666
|
}
|
|
@@ -3699,53 +3699,53 @@ function Z(e, n) {
|
|
|
3699
3699
|
r.classList.remove(...t);
|
|
3700
3700
|
continue;
|
|
3701
3701
|
}
|
|
3702
|
-
const o = _.get(r) ||
|
|
3702
|
+
const o = _.get(r) || P.get(r);
|
|
3703
3703
|
if (o)
|
|
3704
3704
|
for (const a of t)
|
|
3705
3705
|
o.privateClasses.includes(a) || r.classList.remove(a);
|
|
3706
3706
|
}
|
|
3707
3707
|
}
|
|
3708
3708
|
function Qe(e, n, t, r, o) {
|
|
3709
|
-
const d = o.axis === "x", s = e === document.scrollingElement, l = d ? "scrollLeft" : "scrollTop", c = d ? "clientWidth" : "clientHeight", g = d ? "offsetWidth" : "offsetHeight", u = d ? "scrollWidth" : "scrollHeight",
|
|
3709
|
+
const d = o.axis === "x", s = e === document.scrollingElement, l = d ? "scrollLeft" : "scrollTop", c = d ? "clientWidth" : "clientHeight", g = d ? "offsetWidth" : "offsetHeight", u = d ? "scrollWidth" : "scrollHeight", f = d ? n.clientX : n.clientY, h = d ? r.left : r.top, m = d ? t.overflowX : t.overflowY;
|
|
3710
3710
|
if (s) {
|
|
3711
|
-
const
|
|
3711
|
+
const y = e[l], D = e[c], v = y > 0, w = y + D < (d ? o.state.rootScrollWidth || 0 : e[u]);
|
|
3712
3712
|
return d ? {
|
|
3713
|
-
left:
|
|
3714
|
-
right:
|
|
3713
|
+
left: v && f < D * 0.075,
|
|
3714
|
+
right: w && f > D * (1 - 0.075)
|
|
3715
3715
|
} : {
|
|
3716
|
-
up:
|
|
3717
|
-
down:
|
|
3716
|
+
up: v && f < D * 0.075,
|
|
3717
|
+
down: w && f > D * (1 - 0.075)
|
|
3718
3718
|
};
|
|
3719
3719
|
}
|
|
3720
3720
|
if ((m === "auto" || m === "scroll") && e !== document.body && e !== document.documentElement) {
|
|
3721
|
-
const
|
|
3721
|
+
const y = e[u], D = e[g], v = e[l], w = v > 0, N = v < y - D;
|
|
3722
3722
|
return d ? {
|
|
3723
|
-
left:
|
|
3724
|
-
right:
|
|
3723
|
+
left: w && f < h + D * 0.075,
|
|
3724
|
+
right: N && f > h + D * (1 - 0.075)
|
|
3725
3725
|
} : {
|
|
3726
|
-
up:
|
|
3727
|
-
down:
|
|
3726
|
+
up: w && f < h + D * 0.075,
|
|
3727
|
+
down: N && f > h + D * (1 - 0.075)
|
|
3728
3728
|
};
|
|
3729
3729
|
}
|
|
3730
3730
|
return d ? { left: !1, right: !1 } : { up: !1, down: !1 };
|
|
3731
3731
|
}
|
|
3732
3732
|
function ao(e, n, t, r) {
|
|
3733
|
-
if (
|
|
3733
|
+
if (!F(t) || !t.draggedNode)
|
|
3734
3734
|
return;
|
|
3735
3735
|
t.preventEnter = !0;
|
|
3736
3736
|
const o = r.axis === "x", a = r.direction === "positive" ? 1 : -1, d = 20, s = o ? "lastScrollDirectionX" : "lastScrollDirectionY", l = o ? "frameIdX" : "frameIdY";
|
|
3737
3737
|
t[l] !== void 0 && (cancelAnimationFrame(t[l]), t[l] = void 0), t[s] = r.direction;
|
|
3738
3738
|
const c = () => {
|
|
3739
|
-
if (
|
|
3739
|
+
if (!F(t) || !t.draggedNode) {
|
|
3740
3740
|
t[l] !== void 0 && (cancelAnimationFrame(t[l]), t[l] = void 0);
|
|
3741
3741
|
return;
|
|
3742
3742
|
}
|
|
3743
|
-
const g = o ? "scrollLeft" : "scrollTop", u = o ? "clientWidth" : "clientHeight",
|
|
3744
|
-
if (!(a > 0 ? h + m <
|
|
3743
|
+
const g = o ? "scrollLeft" : "scrollTop", u = o ? "clientWidth" : "clientHeight", f = o ? "scrollWidth" : "scrollHeight", h = e[g], m = e[u], y = e[f];
|
|
3744
|
+
if (!(a > 0 ? h + m < y : h > 0)) {
|
|
3745
3745
|
t[l] = void 0, t[s] = void 0;
|
|
3746
3746
|
return;
|
|
3747
3747
|
}
|
|
3748
|
-
e[g] += d * a,
|
|
3748
|
+
e[g] += d * a, O(t) && $n(t), t[l] = requestAnimationFrame(c);
|
|
3749
3749
|
};
|
|
3750
3750
|
t[l] = requestAnimationFrame(c);
|
|
3751
3751
|
}
|
|
@@ -3754,7 +3754,7 @@ function Je(e, n, t) {
|
|
|
3754
3754
|
return n >= r.left && n <= r.right && t >= r.top && t <= r.bottom;
|
|
3755
3755
|
}
|
|
3756
3756
|
function we(e, n, t) {
|
|
3757
|
-
if (
|
|
3757
|
+
if (!F(t) || !t.draggedNode)
|
|
3758
3758
|
return;
|
|
3759
3759
|
Re(t);
|
|
3760
3760
|
const { x: r, y: o } = e;
|
|
@@ -3765,8 +3765,8 @@ function we(e, n, t) {
|
|
|
3765
3765
|
const c = window.getComputedStyle(l), g = l.getBoundingClientRect(), u = Qe(l, n, c, g, {
|
|
3766
3766
|
axis: "x",
|
|
3767
3767
|
state: t
|
|
3768
|
-
}),
|
|
3769
|
-
(u.left || u.right) && (t.lastScrollContainerX = l, d("x", u.right ? "positive" : "negative", l)), (
|
|
3768
|
+
}), f = Qe(l, n, c, g, { axis: "y" });
|
|
3769
|
+
(u.left || u.right) && (t.lastScrollContainerX = l, d("x", u.right ? "positive" : "negative", l)), (f.up || f.down) && (t.lastScrollContainerY = l, d("y", f.down ? "positive" : "negative", l));
|
|
3770
3770
|
};
|
|
3771
3771
|
if (t.lastScrollContainerX && Je(t.lastScrollContainerX, r, o) && s(t.lastScrollContainerX), !a && t.lastScrollContainerY && Je(t.lastScrollContainerY, r, o) && s(t.lastScrollContainerY), !a) {
|
|
3772
3772
|
let l = document.elementFromPoint(r, o);
|
|
@@ -3784,14 +3784,14 @@ function io(e) {
|
|
|
3784
3784
|
if (!Te(n)) return;
|
|
3785
3785
|
let t, r = !0;
|
|
3786
3786
|
for (; n && r; ) {
|
|
3787
|
-
if (_.has(n) ||
|
|
3788
|
-
r = !1, t =
|
|
3787
|
+
if (_.has(n) || P.has(n)) {
|
|
3788
|
+
r = !1, t = P.has(n);
|
|
3789
3789
|
break;
|
|
3790
3790
|
}
|
|
3791
3791
|
n = n.parentNode;
|
|
3792
3792
|
}
|
|
3793
3793
|
if (t) {
|
|
3794
|
-
const o =
|
|
3794
|
+
const o = P.get(n);
|
|
3795
3795
|
return o ? {
|
|
3796
3796
|
parent: {
|
|
3797
3797
|
el: n,
|
|
@@ -3801,7 +3801,7 @@ function io(e) {
|
|
|
3801
3801
|
} else {
|
|
3802
3802
|
const o = _.get(n);
|
|
3803
3803
|
if (!o) return;
|
|
3804
|
-
const a =
|
|
3804
|
+
const a = P.get(n.parentNode);
|
|
3805
3805
|
return a ? {
|
|
3806
3806
|
node: {
|
|
3807
3807
|
el: n,
|
|
@@ -3860,7 +3860,7 @@ function en(e) {
|
|
|
3860
3860
|
}));
|
|
3861
3861
|
}
|
|
3862
3862
|
function po(e, n = {}) {
|
|
3863
|
-
const t = le(null), [r, o] =
|
|
3863
|
+
const t = le(null), [r, o] = j(e);
|
|
3864
3864
|
function a(d = {}) {
|
|
3865
3865
|
en({ parent: t, state: [r, o], ...d });
|
|
3866
3866
|
}
|
|
@@ -3873,13 +3873,13 @@ function po(e, n = {}) {
|
|
|
3873
3873
|
const nn = {
|
|
3874
3874
|
border: {
|
|
3875
3875
|
selected: {
|
|
3876
|
-
color:
|
|
3876
|
+
color: C.palette.blue.B400
|
|
3877
3877
|
},
|
|
3878
3878
|
clear: {
|
|
3879
|
-
color:
|
|
3879
|
+
color: C.palette.neutral.N40
|
|
3880
3880
|
}
|
|
3881
3881
|
}
|
|
3882
|
-
}, fo =
|
|
3882
|
+
}, fo = T.ul`
|
|
3883
3883
|
list-style: none;
|
|
3884
3884
|
padding: 0;
|
|
3885
3885
|
margin: 0;
|
|
@@ -3887,7 +3887,8 @@ const nn = {
|
|
|
3887
3887
|
flex-direction: column;
|
|
3888
3888
|
gap: 12px;
|
|
3889
3889
|
width: 100%;
|
|
3890
|
-
|
|
3890
|
+
justify-content: ${({ $isEmpty: e }) => e ? "center" : "flex-start"};
|
|
3891
|
+
`, ho = T.li`
|
|
3891
3892
|
& > div {
|
|
3892
3893
|
border: 1px solid
|
|
3893
3894
|
${({ theme: e, $active: n }) => {
|
|
@@ -3896,71 +3897,114 @@ const nn = {
|
|
|
3896
3897
|
}};
|
|
3897
3898
|
}
|
|
3898
3899
|
`, Ee = "dnd:draggingLabel", tn = (e) => {
|
|
3899
|
-
const {
|
|
3900
|
-
|
|
3900
|
+
const {
|
|
3901
|
+
emptyMessage: n,
|
|
3902
|
+
id: t,
|
|
3903
|
+
group: r,
|
|
3904
|
+
legend: o,
|
|
3905
|
+
initialItems: a,
|
|
3906
|
+
highlightFirst: d,
|
|
3907
|
+
onMove: s
|
|
3908
|
+
} = e, [l, c] = po(
|
|
3909
|
+
a,
|
|
3901
3910
|
{ group: r }
|
|
3902
|
-
), [
|
|
3911
|
+
), [g, u] = L.useState(
|
|
3903
3912
|
null
|
|
3904
|
-
);
|
|
3905
|
-
|
|
3906
|
-
const
|
|
3907
|
-
const
|
|
3908
|
-
|
|
3913
|
+
), f = L.useRef(a);
|
|
3914
|
+
L.useEffect(() => {
|
|
3915
|
+
const v = (w) => {
|
|
3916
|
+
const N = w.detail ?? null;
|
|
3917
|
+
u(N);
|
|
3909
3918
|
};
|
|
3910
|
-
return window.addEventListener(Ee,
|
|
3919
|
+
return window.addEventListener(Ee, v), () => window.removeEventListener(Ee, v);
|
|
3911
3920
|
}, []);
|
|
3912
|
-
const
|
|
3921
|
+
const h = L.useCallback((v) => {
|
|
3913
3922
|
window.dispatchEvent(
|
|
3914
|
-
new CustomEvent(Ee, { detail:
|
|
3923
|
+
new CustomEvent(Ee, { detail: v })
|
|
3915
3924
|
);
|
|
3916
|
-
}, []),
|
|
3917
|
-
var
|
|
3918
|
-
const
|
|
3919
|
-
|
|
3920
|
-
},
|
|
3921
|
-
|
|
3922
|
-
}, [
|
|
3923
|
-
|
|
3924
|
-
const
|
|
3925
|
-
return window.addEventListener("pointerup",
|
|
3926
|
-
window.removeEventListener("pointerup",
|
|
3925
|
+
}, []), m = (v) => {
|
|
3926
|
+
var S;
|
|
3927
|
+
const w = v.target, N = (S = w == null ? void 0 : w.closest) == null ? void 0 : S.call(w, "li.dnd-item"), k = (N == null ? void 0 : N.getAttribute("data-label")) || null;
|
|
3928
|
+
k && (u(k), h(k));
|
|
3929
|
+
}, y = L.useCallback(() => {
|
|
3930
|
+
u(null), h(null);
|
|
3931
|
+
}, [h]);
|
|
3932
|
+
L.useEffect(() => {
|
|
3933
|
+
const v = () => y();
|
|
3934
|
+
return window.addEventListener("pointerup", v), window.addEventListener("blur", v), () => {
|
|
3935
|
+
window.removeEventListener("pointerup", v), window.removeEventListener("blur", v);
|
|
3927
3936
|
};
|
|
3928
|
-
}, [
|
|
3929
|
-
|
|
3937
|
+
}, [y]), L.useEffect(() => {
|
|
3938
|
+
const v = f.current;
|
|
3939
|
+
if (c.length !== v.length && c.length === v.length + 1) {
|
|
3940
|
+
const w = new Set(v), N = c.find((k) => !w.has(k)) || null;
|
|
3941
|
+
if (N) {
|
|
3942
|
+
const k = t === "left" ? "right" : "left";
|
|
3943
|
+
s == null || s({ item: N, from: k, to: t });
|
|
3944
|
+
}
|
|
3945
|
+
}
|
|
3946
|
+
f.current = c;
|
|
3947
|
+
}, [c, t, s]);
|
|
3948
|
+
const D = c.length === 0;
|
|
3949
|
+
return /* @__PURE__ */ i(
|
|
3950
|
+
Bn,
|
|
3930
3951
|
{
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
children:
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3952
|
+
legend: o,
|
|
3953
|
+
width: "100%",
|
|
3954
|
+
height: "-webkit-fill-available",
|
|
3955
|
+
spacing: "wide",
|
|
3956
|
+
children: /* @__PURE__ */ i(
|
|
3957
|
+
fo,
|
|
3958
|
+
{
|
|
3959
|
+
ref: l,
|
|
3960
|
+
onPointerDownCapture: m,
|
|
3961
|
+
onPointerUpCapture: y,
|
|
3962
|
+
onPointerCancelCapture: y,
|
|
3963
|
+
$isEmpty: D,
|
|
3964
|
+
children: D ? /* @__PURE__ */ i(
|
|
3965
|
+
z,
|
|
3966
|
+
{
|
|
3967
|
+
background: !0,
|
|
3968
|
+
borderRadius: "8px",
|
|
3969
|
+
width: "100%",
|
|
3970
|
+
alignItems: "center",
|
|
3971
|
+
justifyContent: "center",
|
|
3972
|
+
children: /* @__PURE__ */ i(E, { type: "label", size: "medium", appearance: "gray", padding: "12px", children: n || "No hay elementos en esta lista" })
|
|
3973
|
+
}
|
|
3974
|
+
) : c.map((v, w) => {
|
|
3975
|
+
const N = g === v;
|
|
3976
|
+
return /* @__PURE__ */ i(
|
|
3977
|
+
ho,
|
|
3945
3978
|
{
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3979
|
+
className: `dnd-item${N ? " is-dragging" : ""}`,
|
|
3980
|
+
"data-label": v,
|
|
3981
|
+
"data-first": !!(d && w === 0) || void 0,
|
|
3982
|
+
$active: N,
|
|
3983
|
+
children: /* @__PURE__ */ i(z, { border: !0, borderRadius: "8px", width: "100%", children: /* @__PURE__ */ i(
|
|
3984
|
+
E,
|
|
3985
|
+
{
|
|
3986
|
+
type: "title",
|
|
3987
|
+
appearance: N ? "primary" : "dark",
|
|
3988
|
+
weight: N ? "bold" : "normal",
|
|
3989
|
+
size: "medium",
|
|
3990
|
+
padding: "6px 12px",
|
|
3991
|
+
children: v
|
|
3992
|
+
}
|
|
3993
|
+
) })
|
|
3994
|
+
},
|
|
3995
|
+
v
|
|
3996
|
+
);
|
|
3997
|
+
})
|
|
3998
|
+
}
|
|
3999
|
+
)
|
|
3958
4000
|
}
|
|
3959
|
-
)
|
|
4001
|
+
);
|
|
3960
4002
|
}, Wo = (e) => {
|
|
3961
|
-
const { group: n = "clients", left: t, right: r } = e
|
|
4003
|
+
const { group: n = "clients", left: t, right: r, onMove: o } = e, a = (d) => {
|
|
4004
|
+
o == null || o(d);
|
|
4005
|
+
};
|
|
3962
4006
|
return /* @__PURE__ */ b(
|
|
3963
|
-
|
|
4007
|
+
x,
|
|
3964
4008
|
{
|
|
3965
4009
|
justifyContent: "space-between",
|
|
3966
4010
|
alignItems: "start",
|
|
@@ -3972,8 +4016,11 @@ const nn = {
|
|
|
3972
4016
|
{
|
|
3973
4017
|
group: n,
|
|
3974
4018
|
highlightFirst: t.highlightFirst,
|
|
4019
|
+
id: "left",
|
|
3975
4020
|
initialItems: t.items,
|
|
3976
|
-
legend: t.legend
|
|
4021
|
+
legend: t.legend,
|
|
4022
|
+
onMove: a,
|
|
4023
|
+
emptyMessage: t.emptyMessage
|
|
3977
4024
|
}
|
|
3978
4025
|
),
|
|
3979
4026
|
/* @__PURE__ */ i(
|
|
@@ -3981,8 +4028,11 @@ const nn = {
|
|
|
3981
4028
|
{
|
|
3982
4029
|
group: n,
|
|
3983
4030
|
highlightFirst: r.highlightFirst,
|
|
4031
|
+
id: "right",
|
|
3984
4032
|
initialItems: r.items,
|
|
3985
|
-
legend: r.legend
|
|
4033
|
+
legend: r.legend,
|
|
4034
|
+
onMove: a,
|
|
4035
|
+
emptyMessage: r.emptyMessage
|
|
3986
4036
|
}
|
|
3987
4037
|
)
|
|
3988
4038
|
]
|
|
@@ -4055,11 +4105,11 @@ const nn = {
|
|
|
4055
4105
|
return Object.fromEntries(r);
|
|
4056
4106
|
};
|
|
4057
4107
|
export {
|
|
4058
|
-
|
|
4108
|
+
Le as BusinessRuleCard,
|
|
4059
4109
|
vn as BusinessRuleCardNew,
|
|
4060
4110
|
mn as BusinessRuleView,
|
|
4061
4111
|
Dn as BusinessRuleViewNew,
|
|
4062
|
-
|
|
4112
|
+
Lo as BusinessRules,
|
|
4063
4113
|
Oo as BusinessRulesNew,
|
|
4064
4114
|
Wo as DragAndDropBoxes,
|
|
4065
4115
|
tn as DraggableList,
|
|
@@ -4071,8 +4121,8 @@ export {
|
|
|
4071
4121
|
bn as ModalRules,
|
|
4072
4122
|
xn as RulesForm,
|
|
4073
4123
|
Yt as convertRangeToString,
|
|
4074
|
-
|
|
4075
|
-
|
|
4124
|
+
jo as formatDecisionForBackend,
|
|
4125
|
+
Bo as parseRangeFromString,
|
|
4076
4126
|
Uo as revertSortedDataSampleSwitchPlaces,
|
|
4077
4127
|
_o as revertSortedDataSwitchPlaces,
|
|
4078
4128
|
qo as sortDisplayDataSampleSwitchPlaces,
|