react-ecosistema-unp 0.8.1 → 0.9.0
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/Anchor-D8f6vg0T.js +40 -0
- package/dist/Bootstrap-yLMFDuQq.js +1136 -0
- package/dist/Button-DD8y8HBa.js +78 -0
- package/dist/Button-DMwpnJlD.js +33 -0
- package/dist/{Card-aTqC9rSK.js → Card-BXqmurzN.js} +2 -2
- package/dist/{CardBody-B9vvCH8g.js → CardBody-RoDe1y90.js} +1 -1
- package/dist/{NotificacionUsuario-DRuxRQ6q.js → NotificacionUsuario-WGsdHnu2.js} +372 -402
- package/dist/TabContext-CdjYJzMB.js +125 -0
- package/dist/ThemeProvider-CFCmmLJC.js +69 -0
- package/dist/accessibility/barra-accesibilidad/BarraAccesibilidad.js +13 -13
- package/dist/assets/BarraAccesibilidad.css +1 -1
- package/dist/assets/Breadcrumb.css +1 -0
- package/dist/assets/MenuLateral.css +1 -1
- package/dist/assets/NotificacionUsuario.css +1 -1
- package/dist/assets/SeccionTarjeta.css +1 -1
- package/dist/assets/SeccionTarjetaLectura.css +1 -1
- package/dist/assets/Subtitulo.css +1 -0
- package/dist/assets/TabVentana.css +1 -1
- package/dist/assets/TarjetaLectura.css +1 -1
- package/dist/assets/VentanaLienzo.css +1 -0
- package/dist/auth/hooks/useFinalizarSesion.js +7 -7
- package/dist/{index-B-HWDQSx.js → index-Bk5C3cP1.js} +1 -1
- package/dist/{index-PYPwtOs4.js → index-DAgOFOds.js} +18 -14
- package/dist/lib/shared/breadcrumb/Breadcrumb.d.ts +11 -0
- package/dist/lib/shared/ventana-lienzo/VentanaLienzo.d.ts +3 -0
- package/dist/lib/shared.d.ts +1 -1
- package/dist/lib/tables/tabla-registros/TablaRegistros.d.ts +2 -2
- package/dist/lib/tables/tabla-registros/{encabezado → encabezado-tabla}/EncabezadoTabla.d.ts +3 -4
- package/dist/lib/tables.d.ts +0 -1
- package/dist/lib/ui/encabezado/Encabezado.d.ts +2 -2
- package/dist/lib/ui/icono-tooltip/IconoTooltip.d.ts +18 -0
- package/dist/lib/ui/{tarjeta-listado/TarjetaListado.d.ts → items-modal/ItemsModal.d.ts} +4 -4
- package/dist/lib/ui/paginador/Paginador.d.ts +1 -1
- package/dist/lib/ui/subtitulo/Subtitulo.d.ts +3 -2
- package/dist/lib/ui/tarjeta/Tarjeta.d.ts +1 -3
- package/dist/lib/ui/tarjeta/nuevo-elemento/NuevoElemento.d.ts +9 -0
- package/dist/lib/ui/tarjeta/seccion-tarjeta/SeccionTarjeta.d.ts +1 -1
- package/dist/lib/ui.d.ts +4 -3
- package/dist/shared/breadcrumb/Breadcrumb.js +79 -0
- package/dist/shared/menu-lateral/MenuLateral.js +127 -127
- package/dist/shared/notificacion-usuario/NotificacionUsuario.js +1 -1
- package/dist/shared/{ventana-tabs → tab-ventana}/TabVentana.js +2 -2
- package/dist/shared/ventana-lienzo/VentanaLienzo.js +17 -11
- package/dist/shared/ventana-tabs/VentanaTabs.js +23 -23
- package/dist/shared.js +1 -1
- package/dist/tables/tabla-registros/TablaRegistros.js +5485 -3869
- package/dist/tables/tabla-registros/buscador/Buscador.js +4 -4
- package/dist/tables/tabla-registros/encabezado-tabla/EncabezadoTabla.js +32 -0
- package/dist/tables/tabla-registros/tabla/Tabla.js +5 -5
- package/dist/tables.js +0 -2
- package/dist/{tables/tabla-registros → ui}/contenido-modal/ContenidoModal.js +2 -2
- package/dist/{tables/tabla-registros → ui}/contenido-modal/ContenidoModalv0.1.js +2 -2
- package/dist/ui/encabezado/Encabezado.js +1 -1
- package/dist/ui/icono-tooltip/IconoTooltip.js +95 -0
- package/dist/ui/items-modal/ItemsModal.js +40 -0
- package/dist/ui/logo/Logo.js +5 -9
- package/dist/ui/paginador/Paginador.js +16 -19
- package/dist/ui/subtitulo/Subtitulo.js +14 -24
- package/dist/ui/tarjeta/Tarjeta.js +28 -65
- package/dist/ui/tarjeta/{tarjeta-agregar/TarjetaAgregar.js → nuevo-elemento/NuevoElemento.js} +9 -8
- package/dist/ui/tarjeta/seccion-tarjeta/SeccionTarjeta.js +11 -5
- package/dist/ui/tarjeta-info/TarjetaInfo.js +1 -1
- package/dist/ui/tarjeta-lectura/TarjetaLectura.js +26 -27
- package/dist/ui/tarjeta-lectura/seccion-tarjeta-lectura/SeccionTarjetaLectura.js +10 -6
- package/dist/ui.js +20 -18
- package/dist/useEventCallback-Bfo0-hwZ.js +16 -0
- package/dist/utils/components/ProtectedRoute.js +6 -6
- package/dist/utils/components/UserRoute.js +4 -4
- package/dist/{warning-b8Ghk8WQ.js → warning-BMiIoRBk.js} +1 -1
- package/package.json +15 -16
- package/dist/Bootstrap-alDYHlwa.js +0 -19871
- package/dist/Button-Gn1tKaoW.js +0 -106
- package/dist/TabContext-BvNFEruk.js +0 -138
- package/dist/ThemeProvider-DwZMEupk.js +0 -83
- package/dist/lib/tables/tabla-registros/icono-tabla/IconoTabla.d.ts +0 -14
- package/dist/lib/ui/tarjeta/tarjeta-agregar/TarjetaAgregar.d.ts +0 -9
- package/dist/logo_escudo_blanco-DaOI8SGq.js +0 -4
- package/dist/tables/tabla-registros/encabezado/EncabezadoTabla.js +0 -30
- package/dist/tables/tabla-registros/icono-tabla/IconoTabla.js +0 -68
- package/dist/ui/tarjeta-listado/TarjetaListado.js +0 -40
- /package/dist/assets/{IconoTabla.css → IconoTooltip.css} +0 -0
- /package/dist/assets/{TarjetaListado.css → ItemsModal.css} +0 -0
- /package/dist/lib/shared/{ventana-tabs → tab-ventana}/TabVentana.d.ts +0 -0
- /package/dist/lib/{tables/tabla-registros → ui}/contenido-modal/ContenidoModal.d.ts +0 -0
- /package/dist/lib/{tables/tabla-registros → ui}/contenido-modal/ContenidoModalv0.1.d.ts +0 -0
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { jsxs as t, Fragment as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as f, useRef as u, useEffect as h } from "react";
|
|
3
3
|
import '../../assets/Paginador.css';/* empty css */
|
|
4
|
-
import { C as p } from "../../Card-
|
|
5
|
-
import { B as c } from "../../Button-
|
|
6
|
-
const
|
|
7
|
-
const [r, l] =
|
|
4
|
+
import { C as p } from "../../Card-BXqmurzN.js";
|
|
5
|
+
import { B as c } from "../../Button-DMwpnJlD.js";
|
|
6
|
+
const b = ({ stepContent: a, onSubmit: s, canJump: o = !0 }) => {
|
|
7
|
+
const [r, l] = f(0), n = u(null);
|
|
8
8
|
return h(() => {
|
|
9
|
-
n.current && n.current.scrollIntoView({
|
|
10
|
-
behavior: "smooth"
|
|
11
|
-
block: "start"
|
|
9
|
+
n.current && r > 0 && n.current.scrollIntoView({
|
|
10
|
+
behavior: "smooth"
|
|
12
11
|
});
|
|
13
12
|
}, [r]), /* @__PURE__ */ t(m, { children: [
|
|
14
|
-
/* @__PURE__ */ e(p, { ref: n, className: "border-0 paginador-card", children: /* @__PURE__ */ e("ul", { id: "progressbar", children: a.map((
|
|
13
|
+
/* @__PURE__ */ e(p, { ref: n, className: "border-0 paginador-card", children: /* @__PURE__ */ e("ul", { id: "progressbar", children: a.map((d, i) => /* @__PURE__ */ t(
|
|
15
14
|
"li",
|
|
16
15
|
{
|
|
17
16
|
className: i <= r ? "active" : "",
|
|
18
17
|
onClick: () => {
|
|
19
|
-
|
|
18
|
+
o ? o && l(i) : (i === r + 1 || i < r) && l(i);
|
|
20
19
|
},
|
|
21
20
|
children: [
|
|
22
|
-
/* @__PURE__ */ e("div", { className: `step ${i <= r ? "active" : ""}`, children: /* @__PURE__ */ e(
|
|
23
|
-
/* @__PURE__ */ e("strong", { children:
|
|
21
|
+
/* @__PURE__ */ e("div", { className: `step ${i <= r ? "active" : ""}`, children: /* @__PURE__ */ e(d.icon, { size: 18 }) }),
|
|
22
|
+
/* @__PURE__ */ e("strong", { children: d.label })
|
|
24
23
|
]
|
|
25
24
|
},
|
|
26
25
|
i
|
|
@@ -32,9 +31,6 @@ const N = ({ stepContent: a, onSubmit: d, canJump: s = !0 }) => {
|
|
|
32
31
|
{
|
|
33
32
|
variant: "unp_secondary",
|
|
34
33
|
onClick: () => l(r - 1),
|
|
35
|
-
style: {
|
|
36
|
-
marginRight: "1rem"
|
|
37
|
-
},
|
|
38
34
|
children: "Anterior"
|
|
39
35
|
}
|
|
40
36
|
),
|
|
@@ -42,19 +38,20 @@ const N = ({ stepContent: a, onSubmit: d, canJump: s = !0 }) => {
|
|
|
42
38
|
c,
|
|
43
39
|
{
|
|
44
40
|
variant: "unp_primary",
|
|
45
|
-
style: { justifySelf: "end" },
|
|
41
|
+
style: { justifySelf: "end", marginLeft: "1rem" },
|
|
46
42
|
onClick: () => {
|
|
47
43
|
a[r].handleNextClick && a[r].handleNextClick(), l(r + 1);
|
|
48
44
|
},
|
|
49
45
|
children: "Siguiente"
|
|
50
46
|
}
|
|
51
47
|
),
|
|
52
|
-
r === a.length - 1 && /* @__PURE__ */ e(
|
|
48
|
+
r === a.length - 1 && s && /* @__PURE__ */ e(
|
|
53
49
|
c,
|
|
54
50
|
{
|
|
55
51
|
type: "submit",
|
|
56
52
|
variant: "unp_send",
|
|
57
|
-
onClick:
|
|
53
|
+
onClick: s,
|
|
54
|
+
style: { marginLeft: "1rem" },
|
|
58
55
|
children: "Enviar"
|
|
59
56
|
}
|
|
60
57
|
)
|
|
@@ -62,5 +59,5 @@ const N = ({ stepContent: a, onSubmit: d, canJump: s = !0 }) => {
|
|
|
62
59
|
] });
|
|
63
60
|
};
|
|
64
61
|
export {
|
|
65
|
-
|
|
62
|
+
b as Paginador
|
|
66
63
|
};
|
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, s = {
|
|
15
|
-
fontSize: "1.25rem",
|
|
16
|
-
color: "#303d50"
|
|
17
|
-
}, c = ({
|
|
18
|
-
subtitulo: e,
|
|
19
|
-
icon: o
|
|
20
|
-
}) => /* @__PURE__ */ t(n, { children: /* @__PURE__ */ r("div", { style: i, children: [
|
|
21
|
-
/* @__PURE__ */ t(o, { style: s }),
|
|
22
|
-
/* @__PURE__ */ t("span", { style: l, children: e })
|
|
23
|
-
] }) });
|
|
1
|
+
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/Subtitulo.css';const o = ({
|
|
3
|
+
subtitle: l,
|
|
4
|
+
icon: t,
|
|
5
|
+
extraInput: e
|
|
6
|
+
}) => /* @__PURE__ */ s("div", { className: "subtitulo-contenedor-fila", children: [
|
|
7
|
+
/* @__PURE__ */ s("div", { className: "subtitulo-contenedor-icon-subtitle", children: [
|
|
8
|
+
t && /* @__PURE__ */ i(t, { className: "subtitulo-icon" }),
|
|
9
|
+
/* @__PURE__ */ i("span", { className: "subtitulo-subtitle", children: l })
|
|
10
|
+
] }),
|
|
11
|
+
e
|
|
12
|
+
] });
|
|
13
|
+
o.displayName = "Subtitulo";
|
|
24
14
|
export {
|
|
25
|
-
|
|
15
|
+
o as Subtitulo
|
|
26
16
|
};
|
|
@@ -1,69 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as l, Fragment as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import e from "react";
|
|
2
3
|
import '../../assets/Tarjeta.css';/* empty css */
|
|
3
|
-
import {
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { B as p } from "../../Button-Gn1tKaoW.js";
|
|
9
|
-
const d = /* @__PURE__ */ v.forwardRef(({
|
|
10
|
-
bsPrefix: c,
|
|
11
|
-
className: r,
|
|
12
|
-
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
13
|
-
as: t = "div",
|
|
14
|
-
...a
|
|
15
|
-
}, l) => {
|
|
16
|
-
const s = C(c, "row"), x = E(), h = T(), y = `${s}-cols`, f = [];
|
|
17
|
-
return x.forEach((o) => {
|
|
18
|
-
const n = a[o];
|
|
19
|
-
delete a[o];
|
|
20
|
-
let i;
|
|
21
|
-
n != null && typeof n == "object" ? {
|
|
22
|
-
cols: i
|
|
23
|
-
} = n : i = n;
|
|
24
|
-
const B = o !== h ? `-${o}` : "";
|
|
25
|
-
i != null && f.push(`${y}${B}-${i}`);
|
|
26
|
-
}), /* @__PURE__ */ e(t, {
|
|
27
|
-
ref: l,
|
|
28
|
-
...a,
|
|
29
|
-
className: $(r, s, ...f)
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
d.displayName = "Row";
|
|
33
|
-
const u = {
|
|
34
|
-
color: "#f3f3f3",
|
|
35
|
-
backgroundColor: "#38a729",
|
|
36
|
-
borderColor: "#33a024",
|
|
37
|
-
marginTop: "20px",
|
|
38
|
-
marginBottom: "15px",
|
|
4
|
+
import { C as f, a as C } from "../../Card-BXqmurzN.js";
|
|
5
|
+
import { C as j } from "../../CardBody-RoDe1y90.js";
|
|
6
|
+
import { B as S } from "../../Button-DMwpnJlD.js";
|
|
7
|
+
const b = {
|
|
8
|
+
marginBottom: "20px",
|
|
39
9
|
width: "100px"
|
|
40
|
-
},
|
|
41
|
-
title:
|
|
42
|
-
children:
|
|
43
|
-
method:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
] }) : /* @__PURE__ */ m(j, { children: [
|
|
61
|
-
r,
|
|
62
|
-
t !== "GET" && /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(d, { className: "d-flex justify-content-end me-0", children: /* @__PURE__ */ e(p, { style: u, type: "submit", children: "Enviar" }) }) })
|
|
63
|
-
] })
|
|
64
|
-
}
|
|
65
|
-
)
|
|
66
|
-
] });
|
|
10
|
+
}, B = ({
|
|
11
|
+
title: p,
|
|
12
|
+
children: s,
|
|
13
|
+
method: n,
|
|
14
|
+
onSubmit: m
|
|
15
|
+
}) => {
|
|
16
|
+
const a = e.Children.toArray(s), c = a[0] && e.isValidElement(a[0]) && a[0].type.displayName === "Subtitulo", i = a.filter(
|
|
17
|
+
(t) => e.isValidElement(t) && t.type.displayName === "SeccionTarjeta"
|
|
18
|
+
), d = i.length > 0, y = e.Children.map(s, (t, o) => e.isValidElement(t) && t.type.displayName === "SeccionTarjeta" ? e.cloneElement(t, {
|
|
19
|
+
isGray: t.props.isGray ?? o % 2 === 1,
|
|
20
|
+
isLast: t.props.isLast ?? o === i.length - 1
|
|
21
|
+
}) : t);
|
|
22
|
+
return /* @__PURE__ */ l(u, { children: [
|
|
23
|
+
/* @__PURE__ */ l(f, { className: "border-0 mb-4 tarjeta-unp", children: [
|
|
24
|
+
/* @__PURE__ */ r(C, { className: "d-flex justify-content-between align-items-center bg-unp text-light py-3 tarjeta-header-unp", children: p }),
|
|
25
|
+
d ? y : /* @__PURE__ */ r(j, { className: `${c ? "pt-0" : ""}`, children: s })
|
|
26
|
+
] }),
|
|
27
|
+
n === "POST" || n === "post" && /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "end" }, children: /* @__PURE__ */ r(S, { variant: "unp_send", style: b, onClick: m, children: "Enviar" }) })
|
|
28
|
+
] });
|
|
29
|
+
};
|
|
67
30
|
export {
|
|
68
|
-
|
|
31
|
+
B as Tarjeta
|
|
69
32
|
};
|
package/dist/ui/tarjeta/{tarjeta-agregar/TarjetaAgregar.js → nuevo-elemento/NuevoElemento.js}
RENAMED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { b as
|
|
3
|
-
import { B as
|
|
2
|
+
import { b as s } from "../../../index-DAgOFOds.js";
|
|
3
|
+
import { B as a } from "../../../Button-DMwpnJlD.js";
|
|
4
4
|
const d = {
|
|
5
5
|
fontColor: "#303d50s",
|
|
6
6
|
fontSize: "1.1rem",
|
|
7
7
|
fontWeight: "700",
|
|
8
8
|
// marginBottom: '6.66rem',
|
|
9
9
|
color: "#303d50"
|
|
10
|
-
}, p = ({
|
|
10
|
+
}, p = ({ label: o, children: e, onClose: t, isGray: n = !1 }) => /* @__PURE__ */ i(
|
|
11
11
|
"div",
|
|
12
12
|
{
|
|
13
|
-
className: "border border-gray-300
|
|
13
|
+
className: "border border-gray-300",
|
|
14
14
|
style: {
|
|
15
15
|
position: "relative",
|
|
16
16
|
padding: "1rem",
|
|
17
17
|
marginTop: "0.5rem",
|
|
18
18
|
marginBottom: "0.5rem",
|
|
19
|
-
background: n ? "#f7f7f7" : "#ffffff"
|
|
19
|
+
background: n ? "#f7f7f7" : "#ffffff",
|
|
20
|
+
borderRadius: "10px"
|
|
20
21
|
},
|
|
21
22
|
children: [
|
|
22
23
|
/* @__PURE__ */ r(
|
|
23
|
-
|
|
24
|
+
a,
|
|
24
25
|
{
|
|
25
26
|
variant: "link",
|
|
26
27
|
onClick: t,
|
|
@@ -32,7 +33,7 @@ const d = {
|
|
|
32
33
|
background: "transparent",
|
|
33
34
|
border: "none"
|
|
34
35
|
},
|
|
35
|
-
children: /* @__PURE__ */ r(
|
|
36
|
+
children: /* @__PURE__ */ r(s, { size: 16, color: "red" })
|
|
36
37
|
}
|
|
37
38
|
),
|
|
38
39
|
o && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("span", { style: d, children: o }) }),
|
|
@@ -41,5 +42,5 @@ const d = {
|
|
|
41
42
|
}
|
|
42
43
|
);
|
|
43
44
|
export {
|
|
44
|
-
p as
|
|
45
|
+
p as NuevoElemento
|
|
45
46
|
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { C as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import e from "react";
|
|
3
|
+
import { C as l } from "../../../CardBody-RoDe1y90.js";
|
|
4
|
+
import '../../../assets/SeccionTarjeta.css';const n = ({ isGray: r = !1, children: a, isLast: o = !1 }) => {
|
|
5
|
+
const t = e.Children.toArray(a), i = t[0] && e.isValidElement(t[0]) && t[0].type.displayName === "Subtitulo";
|
|
6
|
+
return /* @__PURE__ */ s(l, { className: `${r ? "tarjeta-container-section" : ""}
|
|
7
|
+
${o ? "tarjeta-container-last" : ""}
|
|
8
|
+
${i ? "pt-0" : ""}`, children: a });
|
|
9
|
+
};
|
|
10
|
+
n.displayName = "SeccionTarjeta";
|
|
5
11
|
export {
|
|
6
|
-
|
|
12
|
+
n as SeccionTarjeta
|
|
7
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as s, useRef as m, useEffect as d } from "react";
|
|
3
|
-
import { F as j, a as u } from "../../index-
|
|
3
|
+
import { F as j, a as u } from "../../index-DAgOFOds.js";
|
|
4
4
|
import '../../assets/TarjetaInfo.css';/* empty css */
|
|
5
5
|
const C = ({ icon: r, label: c, show: l = !1, children: h }) => {
|
|
6
6
|
const [t, o] = s(l), [f, i] = s(0), a = m(null);
|
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
import { jsxs as i, Fragment as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as i, Fragment as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useRef as d, useEffect as y } from "react";
|
|
3
3
|
import '../../assets/TarjetaLectura.css';/* empty css */
|
|
4
|
-
import { Logo as
|
|
5
|
-
import { SeccionTarjetaLectura as
|
|
6
|
-
import { B as
|
|
7
|
-
const k = ({ title:
|
|
8
|
-
const [r,
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
behavior: "smooth"
|
|
12
|
-
block: "start"
|
|
4
|
+
import { Logo as _ } from "../logo/Logo.js";
|
|
5
|
+
import { SeccionTarjetaLectura as g } from "./seccion-tarjeta-lectura/SeccionTarjetaLectura.js";
|
|
6
|
+
import { B as h } from "../../Button-DMwpnJlD.js";
|
|
7
|
+
const k = ({ title: m, subtitle: u, headerContent: f, stepContent: n, children: o }) => {
|
|
8
|
+
const [r, t] = v(0), p = d(null), c = d(null);
|
|
9
|
+
return y(() => {
|
|
10
|
+
c.current && r > 0 && c.current.scrollIntoView({
|
|
11
|
+
behavior: "smooth"
|
|
13
12
|
});
|
|
14
|
-
}, [r]), /* @__PURE__ */ i(
|
|
15
|
-
/* @__PURE__ */ i("form", { className: "form_qy", children: [
|
|
13
|
+
}, [r]), /* @__PURE__ */ i(l, { children: [
|
|
14
|
+
/* @__PURE__ */ i("form", { ref: p, className: "form_qy", children: [
|
|
16
15
|
/* @__PURE__ */ i("div", { className: "main_title_container_qy", children: [
|
|
17
16
|
/* @__PURE__ */ i("div", { className: "subtitle_container_qy", children: [
|
|
18
|
-
/* @__PURE__ */ e("h3", { children:
|
|
19
|
-
/* @__PURE__ */ e("h5", { children:
|
|
17
|
+
/* @__PURE__ */ e("h3", { children: m }),
|
|
18
|
+
/* @__PURE__ */ e("h5", { children: u })
|
|
20
19
|
] }),
|
|
21
|
-
/* @__PURE__ */ e("div", { className: "logo_container_qy", children: /* @__PURE__ */ e(
|
|
20
|
+
/* @__PURE__ */ e("div", { className: "logo_container_qy", children: /* @__PURE__ */ e(_, { type: "entidad", variant: "unidad", color: "rojo", height: "80px" }) })
|
|
22
21
|
] }),
|
|
23
|
-
/* @__PURE__ */ e("div", { className: "section_header_container_qy", children:
|
|
24
|
-
n ? /* @__PURE__ */ i(
|
|
25
|
-
/* @__PURE__ */ e(
|
|
22
|
+
/* @__PURE__ */ e("div", { className: "section_header_container_qy", children: f }),
|
|
23
|
+
n ? /* @__PURE__ */ i("div", { ref: c, children: [
|
|
24
|
+
/* @__PURE__ */ e(g, { title: "Secciones", children: /* @__PURE__ */ e("ul", { id: "paginador-tarjeta-lectura", children: n.map((s, a) => /* @__PURE__ */ i(
|
|
26
25
|
"li",
|
|
27
26
|
{
|
|
28
27
|
className: a <= r ? "active" : "",
|
|
29
|
-
onClick: () =>
|
|
28
|
+
onClick: () => t(a),
|
|
30
29
|
children: [
|
|
31
|
-
/* @__PURE__ */ e("div", { className: `step ${a <= r ? "active" : ""}`, children: /* @__PURE__ */ e(s.icon, {}) }),
|
|
30
|
+
/* @__PURE__ */ e("div", { className: `step ${a <= r ? "active" : ""}`, children: /* @__PURE__ */ e(s.icon, { size: 18 }) }),
|
|
32
31
|
/* @__PURE__ */ e("strong", { children: s.label })
|
|
33
32
|
]
|
|
34
33
|
},
|
|
35
34
|
a
|
|
36
35
|
)) }) }),
|
|
37
36
|
/* @__PURE__ */ e("div", { children: n[r].content })
|
|
38
|
-
] }) : o && /* @__PURE__ */ e(
|
|
37
|
+
] }) : o && /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e("div", { children: o }) })
|
|
39
38
|
] }),
|
|
40
|
-
n && /* @__PURE__ */ e(
|
|
39
|
+
n && /* @__PURE__ */ e(l, { children: /* @__PURE__ */ i("div", { className: "paginador-buttons", style: { display: "flex", justifyContent: "end" }, children: [
|
|
41
40
|
r > 0 && /* @__PURE__ */ e(
|
|
42
|
-
|
|
41
|
+
h,
|
|
43
42
|
{
|
|
44
43
|
variant: "unp_secondary",
|
|
45
|
-
onClick: () =>
|
|
44
|
+
onClick: () => t(r - 1),
|
|
46
45
|
style: {
|
|
47
46
|
marginRight: "1rem"
|
|
48
47
|
},
|
|
@@ -50,11 +49,11 @@ const k = ({ title: h, subtitle: m, headerContent: u, stepContent: n, children:
|
|
|
50
49
|
}
|
|
51
50
|
),
|
|
52
51
|
r < n.length - 1 && /* @__PURE__ */ e(
|
|
53
|
-
|
|
52
|
+
h,
|
|
54
53
|
{
|
|
55
54
|
variant: "unp_primary",
|
|
56
55
|
style: { justifySelf: "end" },
|
|
57
|
-
onClick: () =>
|
|
56
|
+
onClick: () => t(r + 1),
|
|
58
57
|
children: "Siguiente"
|
|
59
58
|
}
|
|
60
59
|
)
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as m, Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import i from "react";
|
|
2
3
|
import '../../../assets/SeccionTarjetaLectura.css';/* empty css */
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
|
|
4
|
+
const c = ({ title: a, children: t }) => {
|
|
5
|
+
const e = i.Children.toArray(t), s = e[0] && i.isValidElement(e[0]) && e[0].type.displayName === "Subtitulo";
|
|
6
|
+
return /* @__PURE__ */ m(n, { children: [
|
|
7
|
+
/* @__PURE__ */ r("div", { className: "section_header_qy", children: /* @__PURE__ */ r("span", { children: a }) }),
|
|
8
|
+
/* @__PURE__ */ r("div", { style: { padding: `${s ? "0rem" : "1.25rem"} 1.25rem 1.25rem 1.25rem` }, children: t })
|
|
9
|
+
] });
|
|
10
|
+
};
|
|
7
11
|
export {
|
|
8
|
-
|
|
12
|
+
c as SeccionTarjetaLectura
|
|
9
13
|
};
|
package/dist/ui.js
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { Encabezado as e } from "./ui/encabezado/Encabezado.js";
|
|
2
2
|
import { Subtitulo as a } from "./ui/subtitulo/Subtitulo.js";
|
|
3
|
-
import { ContenidoModal as
|
|
3
|
+
import { ContenidoModal as f } from "./ui/contenido-modal/ContenidoModal.js";
|
|
4
4
|
import { Tarjeta as x } from "./ui/tarjeta/Tarjeta.js";
|
|
5
|
-
import { SeccionTarjeta as
|
|
6
|
-
import {
|
|
7
|
-
import { ContenedorTarjeta as
|
|
5
|
+
import { SeccionTarjeta as c } from "./ui/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
|
|
6
|
+
import { NuevoElemento as d } from "./ui/tarjeta/nuevo-elemento/NuevoElemento.js";
|
|
7
|
+
import { ContenedorTarjeta as j } from "./ui/tarjeta/contenedor-tarjeta/ContenedorTarjeta.js";
|
|
8
8
|
import { Paginador as u } from "./ui/paginador/Paginador.js";
|
|
9
|
-
import { Logo as
|
|
10
|
-
import { TarjetaLectura as
|
|
11
|
-
import { SeccionTarjetaLectura as
|
|
12
|
-
import {
|
|
13
|
-
import { TarjetaInfo as
|
|
9
|
+
import { Logo as L } from "./ui/logo/Logo.js";
|
|
10
|
+
import { TarjetaLectura as b } from "./ui/tarjeta-lectura/TarjetaLectura.js";
|
|
11
|
+
import { SeccionTarjetaLectura as C } from "./ui/tarjeta-lectura/seccion-tarjeta-lectura/SeccionTarjetaLectura.js";
|
|
12
|
+
import { ItemsModal as M } from "./ui/items-modal/ItemsModal.js";
|
|
13
|
+
import { TarjetaInfo as v } from "./ui/tarjeta-info/TarjetaInfo.js";
|
|
14
|
+
import { IconoTooltip as N } from "./ui/icono-tooltip/IconoTooltip.js";
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
j as ContenedorTarjeta,
|
|
17
|
+
f as ContenidoModal,
|
|
17
18
|
e as Encabezado,
|
|
18
|
-
|
|
19
|
+
N as IconoTooltip,
|
|
20
|
+
M as ItemsModal,
|
|
21
|
+
L as Logo,
|
|
22
|
+
d as NuevoElemento,
|
|
19
23
|
u as Paginador,
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
c as SeccionTarjeta,
|
|
25
|
+
C as SeccionTarjetaLectura,
|
|
22
26
|
a as Subtitulo,
|
|
23
27
|
x as Tarjeta,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
l as TarjetaLectura,
|
|
27
|
-
A as TarjetaListado
|
|
28
|
+
v as TarjetaInfo,
|
|
29
|
+
b as TarjetaLectura
|
|
28
30
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRef as n, useEffect as u, useCallback as c } from "react";
|
|
2
|
+
function f(r) {
|
|
3
|
+
const e = n(r);
|
|
4
|
+
return u(() => {
|
|
5
|
+
e.current = r;
|
|
6
|
+
}, [r]), e;
|
|
7
|
+
}
|
|
8
|
+
function s(r) {
|
|
9
|
+
const e = f(r);
|
|
10
|
+
return c(function(...t) {
|
|
11
|
+
return e.current && e.current(...t);
|
|
12
|
+
}, [e]);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
s as u
|
|
16
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useAuthId as d } from "../../auth/hooks/AuthHook.js";
|
|
3
|
+
import { j as p } from "../../index-CuHybtft.js";
|
|
4
|
+
import { u as f, N as r, O as h } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
|
|
5
5
|
const T = () => {
|
|
6
|
-
const { authToken: c, userToken: n } =
|
|
6
|
+
const { authToken: c, userToken: n } = d(), i = f(), a = n || localStorage.getItem("user_token");
|
|
7
7
|
if (!(c || localStorage.getItem("access_token")) || !a)
|
|
8
8
|
return /* @__PURE__ */ e(r, { to: "/", replace: !0 });
|
|
9
9
|
let s;
|
|
10
10
|
try {
|
|
11
|
-
s =
|
|
11
|
+
s = p(a);
|
|
12
12
|
} catch (t) {
|
|
13
13
|
return console.error("Error decoding token:", t), /* @__PURE__ */ e(r, { to: "/", replace: !0 });
|
|
14
14
|
}
|
|
15
15
|
const u = s.access_url, o = i.pathname, l = u.map(
|
|
16
16
|
(t) => t.startsWith("/") ? t : `/${t}`
|
|
17
17
|
), m = o.startsWith("/") ? o : `/${o}`;
|
|
18
|
-
return l.includes(m) ? /* @__PURE__ */ e(
|
|
18
|
+
return l.includes(m) ? /* @__PURE__ */ e(h, {}) : /* @__PURE__ */ e(r, { to: "/sistema/pagina-no-permitida", replace: !0 });
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
21
21
|
T as ProtectedRoute
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useAuthId as a } from "../../auth/hooks/AuthHook.js";
|
|
3
|
+
import { N as s, O as n } from "../../chunk-IR6S3I6Y-Dvzk3EbC.js";
|
|
4
4
|
const p = () => {
|
|
5
|
-
const { authToken: e, userToken: o } =
|
|
6
|
-
return !(e || localStorage.getItem("access_token")) || !r ? /* @__PURE__ */ t(
|
|
5
|
+
const { authToken: e, userToken: o } = a(), r = o || localStorage.getItem("user_token");
|
|
6
|
+
return !(e || localStorage.getItem("access_token")) || !r ? /* @__PURE__ */ t(s, { to: "/sistema/pagina-no-permitida", replace: !0 }) : /* @__PURE__ */ t(n, {});
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
9
|
p as UserRoute
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "react-ecosistema-unp",
|
|
3
3
|
"author": "Ecosistema de Información - Unidad Nacional de Protección",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.9.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -52,30 +52,29 @@
|
|
|
52
52
|
"deploy:storybook": "gh-pages -d .storybook-build -b gh-pages -t"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"react": "
|
|
56
|
-
"react-dom": "
|
|
55
|
+
"react": "19.0.0",
|
|
56
|
+
"react-dom": "19.0.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"bootstrap": "^5.3.3",
|
|
60
60
|
"jwt-decode": "^4.0.0",
|
|
61
61
|
"lottie-react": "^2.4.1",
|
|
62
|
-
"react": "^18.3.1",
|
|
63
62
|
"react-bootstrap": "^2.10.9",
|
|
64
|
-
"react-dom": "^18.3.1",
|
|
65
63
|
"react-icons": "^5.4.0",
|
|
66
|
-
"react-router": "^7.1.5",
|
|
67
|
-
"react-toastify": "^11.0.3"
|
|
64
|
+
"react-router-dom": "^7.1.5",
|
|
65
|
+
"react-toastify": "^11.0.3",
|
|
66
|
+
"sweetalert2": "^11.16.1"
|
|
68
67
|
},
|
|
69
68
|
"devDependencies": {
|
|
70
69
|
"@chromatic-com/storybook": "^3.2.4",
|
|
71
70
|
"@eslint/js": "^9.17.0",
|
|
72
|
-
"@storybook/addon-essentials": "^8.5.
|
|
73
|
-
"@storybook/addon-interactions": "^8.5.
|
|
74
|
-
"@storybook/addon-onboarding": "^8.5.
|
|
75
|
-
"@storybook/blocks": "^8.5.
|
|
76
|
-
"@storybook/react": "^8.5.
|
|
77
|
-
"@storybook/react-vite": "^8.5.
|
|
78
|
-
"@storybook/test": "^8.5.
|
|
71
|
+
"@storybook/addon-essentials": "^8.5.5",
|
|
72
|
+
"@storybook/addon-interactions": "^8.5.5",
|
|
73
|
+
"@storybook/addon-onboarding": "^8.5.5",
|
|
74
|
+
"@storybook/blocks": "^8.5.5",
|
|
75
|
+
"@storybook/react": "^8.5.5",
|
|
76
|
+
"@storybook/react-vite": "^8.5.5",
|
|
77
|
+
"@storybook/test": "^8.5.5",
|
|
79
78
|
"@types/node": "^22.10.10",
|
|
80
79
|
"@types/react": "^18.3.18",
|
|
81
80
|
"@types/react-dom": "^18.3.5",
|
|
@@ -87,10 +86,10 @@
|
|
|
87
86
|
"gh-pages": "^6.3.0",
|
|
88
87
|
"glob": "^11.0.1",
|
|
89
88
|
"globals": "^15.14.0",
|
|
90
|
-
"storybook": "^8.5.
|
|
89
|
+
"storybook": "^8.5.5",
|
|
91
90
|
"typescript": "~5.6.2",
|
|
92
91
|
"typescript-eslint": "^8.18.2",
|
|
93
|
-
"vite": "^6.0
|
|
92
|
+
"vite": "^6.1.0",
|
|
94
93
|
"vite-plugin-dts": "^4.5.0",
|
|
95
94
|
"vite-plugin-lib-inject-css": "^2.2.1"
|
|
96
95
|
},
|