react-ecosistema-unp 1.7.11 → 1.7.13
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/lib/tables/tabla-registros/TablaRegistros.d.ts +4 -1
- package/dist/lib/tables/tabla-registros/tabla/Tabla.d.ts +4 -1
- package/dist/lib/ui/paginador/Paginador.d.ts +3 -0
- package/dist/tables/tabla-registros/TablaRegistros.js +279 -279
- package/dist/ui/paginador/Paginador.js +40 -31
- package/package.json +1 -1
|
@@ -1,80 +1,89 @@
|
|
|
1
|
-
import { jsxs as s, Fragment as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as s, Fragment as g, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useRef as b, useEffect as N } from "react";
|
|
3
3
|
import '../../assets/Bootstrap.css';import '../../assets/Paginador.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { C as
|
|
5
|
+
import { C as k } from "../../Card-DAsInpjB.js";
|
|
6
6
|
import { B as f } from "../../Button-B87TJYml.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const E = ({
|
|
8
|
+
stepContent: a,
|
|
9
|
+
onSubmit: d,
|
|
10
|
+
canJump: c = !0,
|
|
11
|
+
sendButtonLabel: p = "Enviar",
|
|
12
|
+
isSendButtonDisabled: y = !1,
|
|
13
|
+
extraButton: u
|
|
14
|
+
}) => {
|
|
15
|
+
const [e, t] = v(0), o = b(null);
|
|
16
|
+
return N(() => {
|
|
10
17
|
o.current && e > 0 && o.current.scrollIntoView({
|
|
11
18
|
behavior: "smooth"
|
|
12
19
|
});
|
|
13
|
-
}, [e]), /* @__PURE__ */ s(
|
|
14
|
-
/* @__PURE__ */ i(
|
|
20
|
+
}, [e]), /* @__PURE__ */ s(g, { children: [
|
|
21
|
+
/* @__PURE__ */ i(k, { ref: o, className: "border-0 paginador-card", children: /* @__PURE__ */ i("ul", { id: "progressbar", children: a.map((l, r) => /* @__PURE__ */ s(
|
|
15
22
|
"li",
|
|
16
23
|
{
|
|
17
24
|
className: r <= e ? "active" : "",
|
|
18
25
|
onClick: async () => {
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
21
|
-
let
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
typeof
|
|
26
|
+
if (a[e].handleNextClick && !c) {
|
|
27
|
+
const n = a[e].handleNextClick;
|
|
28
|
+
let m = !0;
|
|
29
|
+
if (n) {
|
|
30
|
+
const h = await n();
|
|
31
|
+
typeof h == "boolean" && (m = h);
|
|
25
32
|
}
|
|
26
|
-
|
|
27
|
-
} else c ? c &&
|
|
33
|
+
m && (r >= e + 1 ? t(e + 1) : r < e && t(r));
|
|
34
|
+
} else c ? c && t(r) : (r === e + 1 || r < e) && t(r);
|
|
28
35
|
},
|
|
29
36
|
children: [
|
|
30
|
-
/* @__PURE__ */ i("div", { className: `step ${r <= e ? "active" : ""}`, children: /* @__PURE__ */ i(
|
|
31
|
-
/* @__PURE__ */ i("strong", { children:
|
|
37
|
+
/* @__PURE__ */ i("div", { className: `step ${r <= e ? "active" : ""}`, children: /* @__PURE__ */ i(l.icon, { size: 18 }) }),
|
|
38
|
+
/* @__PURE__ */ i("strong", { children: l.label })
|
|
32
39
|
]
|
|
33
40
|
},
|
|
34
41
|
r
|
|
35
42
|
)) }) }),
|
|
36
|
-
/* @__PURE__ */ i("div", { className: "paginador-content", children:
|
|
43
|
+
/* @__PURE__ */ i("div", { className: "paginador-content", children: a[e].content }),
|
|
37
44
|
/* @__PURE__ */ s("div", { className: "paginador-buttons", style: { display: "flex", justifyContent: "end" }, children: [
|
|
38
45
|
e > 0 && /* @__PURE__ */ i(
|
|
39
46
|
f,
|
|
40
47
|
{
|
|
41
48
|
type: "button",
|
|
42
49
|
variant: "unp_secondary",
|
|
43
|
-
onClick: () =>
|
|
50
|
+
onClick: () => t(e - 1),
|
|
44
51
|
children: "Anterior"
|
|
45
52
|
}
|
|
46
53
|
),
|
|
47
|
-
e <
|
|
54
|
+
e < a.length - 1 && /* @__PURE__ */ i(
|
|
48
55
|
f,
|
|
49
56
|
{
|
|
50
57
|
type: "button",
|
|
51
58
|
variant: "unp_primary",
|
|
52
59
|
style: { justifySelf: "end", marginLeft: "1rem" },
|
|
53
60
|
onClick: async () => {
|
|
54
|
-
const
|
|
61
|
+
const l = a[e].handleNextClick;
|
|
55
62
|
let r = !0;
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
typeof
|
|
63
|
+
if (l) {
|
|
64
|
+
const n = await l();
|
|
65
|
+
typeof n == "boolean" && (r = n);
|
|
59
66
|
}
|
|
60
|
-
r &&
|
|
67
|
+
r && t(e + 1);
|
|
61
68
|
},
|
|
62
69
|
children: "Siguiente"
|
|
63
70
|
}
|
|
64
71
|
),
|
|
65
|
-
e ===
|
|
72
|
+
e === a.length - 1 && d && /* @__PURE__ */ i(
|
|
66
73
|
f,
|
|
67
74
|
{
|
|
68
|
-
type: "
|
|
75
|
+
type: "button",
|
|
69
76
|
variant: "unp_send",
|
|
70
77
|
onClick: d,
|
|
71
78
|
style: { marginLeft: "1rem" },
|
|
72
|
-
|
|
79
|
+
disabled: y,
|
|
80
|
+
children: p
|
|
73
81
|
}
|
|
74
|
-
)
|
|
82
|
+
),
|
|
83
|
+
u && /* @__PURE__ */ i("div", { children: u })
|
|
75
84
|
] })
|
|
76
85
|
] });
|
|
77
86
|
};
|
|
78
87
|
export {
|
|
79
|
-
|
|
88
|
+
E as Paginador
|
|
80
89
|
};
|