react-ecosistema-unp 2.5.0 → 2.6.1
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/README.md +354 -25
- package/dist/{AppList-DORGpC4I.js → AppList-CNtk-CBh.js} +56 -55
- package/dist/auth/hooks/useFinalizarSesion.js +12 -12
- package/dist/auth/services/FinSesionService.js +10 -11
- package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +1 -1
- package/dist/cards/tarjeta-info/TarjetaInfo.js +1 -1
- package/dist/data/tarjeta-datos/TarjetaDatos.js +1 -1
- package/dist/{index-BqaJxgOF.js → index-HaNVi1BU.js} +8 -8
- package/dist/lib/accessibility/barra-accesibilidad/BarraAccesibilidad.d.ts +1 -1
- package/dist/lib/assets/animations/loadingDuck.json.d.ts +1 -1
- package/dist/lib/utils/logger/logger.d.ts +25 -0
- package/dist/lib/utils/modal-radicados/ModalDocumento.d.ts +1 -1
- package/dist/lib/utils/sanitizar-html/sanitizarHtml.d.ts +12 -0
- package/dist/loadingDuck-Deggug5u.js +27 -0
- package/dist/shared/app-list/AppList.js +4 -3
- package/dist/shared/iconos-sistema/IconosSistema.js +1 -1
- package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
- package/dist/shared/menu-lateral/MenuLateral.js +5 -3
- package/dist/shared/notificacion-usuario/NotificacionUsuario.js +194 -745
- package/dist/shared/notificacion-usuario/services/notificacionesService.js +52 -51
- package/dist/shared/user-profile-icon/UserProfileIcon.js +17 -17
- package/dist/shared/ventana-tabs/VentanaTabs.js +1 -1
- package/dist/tables/custom-data-table/CustomDataTable.js +4 -2
- package/dist/tables/custom-data-table-split/CustomDataTableSplit.js +4 -2
- package/dist/tables/eco-data-table/components/EcoBandejaEncabezado.js +3 -2
- package/dist/tables/eco-data-table/components/EcoDataTable/EcoDataTable.js +1 -1
- package/dist/tables/tabla-registros/buscador/Buscador.js +1 -1
- package/dist/tables/tabla-registros/encabezado-tabla/EncabezadoTabla.js +3 -2
- package/dist/tables/tabla-registros/modal-v2/EcoModal.js +1 -1
- package/dist/tables/tabla-registros/tabla/Tabla.js +1 -1
- package/dist/ui/alertas/AlertaFormulario.js +1 -1
- package/dist/ui/animacion/Animacion.js +1 -1
- package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
- package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
- package/dist/ui/contenido-modal-v2/ContenidoModalV2.js +1 -1
- package/dist/ui/contenido-modal-v2/ModalV2Menu.js +1 -1
- package/dist/ui/icono-tooltip/IconoTooltip.js +1 -1
- package/dist/ui/items-modal/ItemsModal.js +1 -1
- package/dist/ui/nav-formularios-lateral/NavFormulariosLateral.js +1 -1
- package/dist/ui/notificacion-popover-v2/NotificacionPopoverV2.js +80 -79
- package/dist/ui/status-filter-bar/StatusFilterBar.js +1 -1
- package/dist/ui/status-semaphore/StatusSemaphore.js +1 -1
- package/dist/ui/stepper-v2/StepperV2.js +1 -1
- package/dist/utils/components/ProtectedRoute.js +25 -26
- package/dist/utils/components/UserRoute.js +14 -16
- package/dist/utils/eco-provider/EcoContext.js +4 -2
- package/dist/utils/fetch-data/useFetchData.js +60 -59
- package/dist/utils/logger/logger.js +20 -0
- package/dist/utils/modal-radicados/AuxRadicadosComponents/TarjetaRadicado.js +20 -18
- package/dist/utils/modal-radicados/DocumentoVisorEstado.js +4 -3
- package/dist/utils/modal-radicados/ModalDocumento.js +1 -1
- package/dist/utils/modal-radicados/ModalRadicado.js +82 -80
- package/dist/utils/sanitizar-html/sanitizarHtml.js +1486 -0
- package/dist/utils/unp-historico/FetchHistorico.js +6 -5
- package/dist/utils/unp-historico/UnpHistorico.js +3 -2
- package/dist/utils/websocket-manager/websocket.js +19 -18
- package/package.json +28 -19
- package/dist/lib/utils/fetch/fetchInterceptor.d.ts +0 -7
- package/dist/lib/utils/fetch/fingerprintService.d.ts +0 -27
- package/dist/loadingDuck-Diu5KD6X.js +0 -27
- package/dist/utils/fetch/fetchInterceptor.js +0 -98
- package/dist/utils/fetch/fingerprintService.js +0 -1749
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
import { jsx as e, Fragment as _e, jsxs as ee } from "react/jsx-runtime";
|
|
2
2
|
import * as C from "react";
|
|
3
3
|
import { useEffect as W, useRef as V, useReducer as Ns, useContext as R, useCallback as J, useMemo as We, useState as gs } from "react";
|
|
4
|
-
import { I as Ae, aa as zs, ab as hs, ac as vs, g as ws, ad as q, m as re, W as Cs, ae as Se, af as Ie, ag as bs, ah as ie, ai as xe, aj as $e, ak as ce, al as le, am as As, an as de, ao as ys, ap as X, aq as ke, ar as Fs, H as ue, as as I, o as Ge, Z as Te, at as Oe, au as me, D as Rs, av as Ds, aw as Z, ax as Me,
|
|
4
|
+
import { I as Ae, aa as zs, ab as hs, ac as vs, g as ws, ad as q, m as re, W as Cs, ae as Se, af as Ie, ag as bs, ah as ie, ai as xe, aj as $e, ak as ce, al as le, am as As, an as de, ao as ys, ap as X, aq as ke, ar as Fs, H as ue, as as I, o as Ge, Z as Te, at as Oe, au as me, D as Rs, av as Ds, aw as Z, ax as Me, a3 as pe, ay as Es, w as Ps, az as Y, aA as fe, a7 as Ne, aB as Ss, aC as ge, aD as Q, aE as Is, aF as k, aG as xs, a8 as ze, E as $s, aH as he, aI as ks, P as Ue, aJ as ve, aK as Gs, aL as we, aM as Ce, aN as B, aO as be, U as Ts } from "./index-HaNVi1BU.js";
|
|
5
5
|
import { G as Os } from "./iconBase-DSKTHwal.js";
|
|
6
|
+
import { logger as Ms } from "./utils/logger/logger.js";
|
|
6
7
|
import { c as G } from "./index-ZphT3dr_.js";
|
|
7
|
-
import { u as T, a as
|
|
8
|
-
import { a as
|
|
9
|
-
import { $ as
|
|
8
|
+
import { u as T, a as Us } from "./ThemeProvider-Cv61y4Uy.js";
|
|
9
|
+
import { a as Ls, u as ye } from "./useMergedRefs-YI9EGKd_.js";
|
|
10
|
+
import { $ as Bs, S as se, m as ae, u as js, T as Hs } from "./TabContext-Du6X9q-A.js";
|
|
10
11
|
import { u as _ } from "./useEventCallback-Bfo0-hwZ.js";
|
|
11
|
-
import { c as
|
|
12
|
+
import { c as _s, d as Ws, m as Vs, b as Js, a as Ks, j as Le, f as qs, u as Xs, e as Zs } from "./useIsomorphicEffect-DH-agvLb.js";
|
|
12
13
|
import { B as Ve } from "./Button-ChyKCwSh.js";
|
|
13
14
|
import { A as Je } from "./Anchor-BfRjyGjE.js";
|
|
14
|
-
import { w as
|
|
15
|
-
import { B as
|
|
16
|
-
import './assets/AppList.css';function
|
|
15
|
+
import { w as Ys } from "./warning-DfuoVnCC.js";
|
|
16
|
+
import { B as Qs } from "./Button-eLVX04GZ.js";
|
|
17
|
+
import './assets/AppList.css';function ea(o, t, n, r = !1) {
|
|
17
18
|
const c = _(n);
|
|
18
19
|
W(() => {
|
|
19
20
|
const i = typeof o == "function" ? o() : o;
|
|
20
21
|
return i.addEventListener(t, c, r), () => i.removeEventListener(t, c, r);
|
|
21
22
|
}, [o]);
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function sa(o) {
|
|
24
25
|
const t = V(null);
|
|
25
26
|
return W(() => {
|
|
26
27
|
t.current = o;
|
|
27
28
|
}), t.current;
|
|
28
29
|
}
|
|
29
|
-
var
|
|
30
|
+
var aa = Function.prototype.bind.call(Function.prototype.call, [].slice);
|
|
30
31
|
function Be(o, t) {
|
|
31
|
-
return
|
|
32
|
+
return aa(o.querySelectorAll(t));
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function oa() {
|
|
34
35
|
const [, o] = Ns((t) => t + 1, 0);
|
|
35
36
|
return o;
|
|
36
37
|
}
|
|
37
|
-
const oe = /* @__PURE__ */ C.createContext(null),
|
|
38
|
-
function
|
|
38
|
+
const oe = /* @__PURE__ */ C.createContext(null), ta = ["children", "usePopper"];
|
|
39
|
+
function na(o, t) {
|
|
39
40
|
if (o == null) return {};
|
|
40
41
|
var n = {};
|
|
41
42
|
for (var r in o) if ({}.hasOwnProperty.call(o, r)) {
|
|
@@ -44,10 +45,10 @@ function ta(o, t) {
|
|
|
44
45
|
}
|
|
45
46
|
return n;
|
|
46
47
|
}
|
|
47
|
-
const
|
|
48
|
+
const ra = () => {
|
|
48
49
|
};
|
|
49
50
|
function Ke(o = {}) {
|
|
50
|
-
const t = R(oe), [n, r] =
|
|
51
|
+
const t = R(oe), [n, r] = _s(), c = V(!1), {
|
|
51
52
|
flip: i,
|
|
52
53
|
offset: l,
|
|
53
54
|
rootCloseEvent: d,
|
|
@@ -65,7 +66,7 @@ function Ke(o = {}) {
|
|
|
65
66
|
setMenu: y,
|
|
66
67
|
menuElement: O,
|
|
67
68
|
toggleElement: P
|
|
68
|
-
} = t || {}, v =
|
|
69
|
+
} = t || {}, v = Ws(P, O, Vs({
|
|
69
70
|
placement: u || E || "bottom-start",
|
|
70
71
|
enabled: z,
|
|
71
72
|
enableEvents: m ?? h,
|
|
@@ -75,7 +76,7 @@ function Ke(o = {}) {
|
|
|
75
76
|
arrowElement: n,
|
|
76
77
|
popperConfig: p
|
|
77
78
|
})), M = Object.assign({
|
|
78
|
-
ref: y ||
|
|
79
|
+
ref: y || ra,
|
|
79
80
|
"aria-labelledby": P == null ? void 0 : P.id
|
|
80
81
|
}, v.attributes.popper, {
|
|
81
82
|
style: v.styles.popper
|
|
@@ -91,7 +92,7 @@ function Ke(o = {}) {
|
|
|
91
92
|
style: v.styles.arrow
|
|
92
93
|
}) : {}
|
|
93
94
|
};
|
|
94
|
-
return
|
|
95
|
+
return Js(O, D, {
|
|
95
96
|
clickTrigger: d,
|
|
96
97
|
disabled: !h
|
|
97
98
|
}), [M, b];
|
|
@@ -100,7 +101,7 @@ function qe(o) {
|
|
|
100
101
|
let {
|
|
101
102
|
children: t,
|
|
102
103
|
usePopper: n = !0
|
|
103
|
-
} = o, r =
|
|
104
|
+
} = o, r = na(o, ta);
|
|
104
105
|
const [c, i] = Ke(Object.assign({}, r, {
|
|
105
106
|
usePopper: n
|
|
106
107
|
}));
|
|
@@ -115,7 +116,7 @@ const Xe = (o) => {
|
|
|
115
116
|
}, je = () => {
|
|
116
117
|
};
|
|
117
118
|
function Ze() {
|
|
118
|
-
const o =
|
|
119
|
+
const o = Bs(), {
|
|
119
120
|
show: t = !1,
|
|
120
121
|
toggle: n = je,
|
|
121
122
|
setToggle: r,
|
|
@@ -144,15 +145,15 @@ function Ye({
|
|
|
144
145
|
Ye.displayName = "DropdownToggle";
|
|
145
146
|
const Fe = /* @__PURE__ */ C.createContext(null);
|
|
146
147
|
Fe.displayName = "NavContext";
|
|
147
|
-
const
|
|
148
|
+
const ia = "data-rr-ui-", ca = "rrUi";
|
|
148
149
|
function te(o) {
|
|
149
|
-
return `${ra}${o}`;
|
|
150
|
-
}
|
|
151
|
-
function Ia(o) {
|
|
152
150
|
return `${ia}${o}`;
|
|
153
151
|
}
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
function $a(o) {
|
|
153
|
+
return `${ca}${o}`;
|
|
154
|
+
}
|
|
155
|
+
const la = ["eventKey", "disabled", "onClick", "active", "as"];
|
|
156
|
+
function da(o, t) {
|
|
156
157
|
if (o == null) return {};
|
|
157
158
|
var n = {};
|
|
158
159
|
for (var r in o) if ({}.hasOwnProperty.call(o, r)) {
|
|
@@ -189,7 +190,7 @@ const es = /* @__PURE__ */ C.forwardRef((o, t) => {
|
|
|
189
190
|
onClick: c,
|
|
190
191
|
active: i,
|
|
191
192
|
as: l = Ve
|
|
192
|
-
} = o, d =
|
|
193
|
+
} = o, d = da(o, la);
|
|
193
194
|
const [f] = Qe({
|
|
194
195
|
key: n,
|
|
195
196
|
href: d.href,
|
|
@@ -203,7 +204,7 @@ const es = /* @__PURE__ */ C.forwardRef((o, t) => {
|
|
|
203
204
|
});
|
|
204
205
|
es.displayName = "DropdownItem";
|
|
205
206
|
function He() {
|
|
206
|
-
const o =
|
|
207
|
+
const o = oa(), t = V(null), n = J((r) => {
|
|
207
208
|
t.current = r, o();
|
|
208
209
|
}, [o]);
|
|
209
210
|
return [t, n];
|
|
@@ -218,7 +219,7 @@ function K({
|
|
|
218
219
|
placement: l = "bottom-start",
|
|
219
220
|
children: d
|
|
220
221
|
}) {
|
|
221
|
-
const f =
|
|
222
|
+
const f = Ks(), [u, p] = js(t, o, r), [m, z] = He(), h = m.current, [D, E] = He(), y = D.current, O = sa(u), P = V(null), v = V(!1), M = R(se), b = J((N, g, A = g == null ? void 0 : g.type) => {
|
|
222
223
|
p(N, {
|
|
223
224
|
originalEvent: g,
|
|
224
225
|
source: A
|
|
@@ -256,7 +257,7 @@ function K({
|
|
|
256
257
|
let $ = A.indexOf(N) + g;
|
|
257
258
|
return $ = Math.max(0, Math.min($, A.length)), A[$];
|
|
258
259
|
};
|
|
259
|
-
return
|
|
260
|
+
return ea(J(() => f.document, [f]), "keydown", (N) => {
|
|
260
261
|
var g, A;
|
|
261
262
|
const {
|
|
262
263
|
key: $
|
|
@@ -283,7 +284,7 @@ function K({
|
|
|
283
284
|
}
|
|
284
285
|
return;
|
|
285
286
|
case "Tab":
|
|
286
|
-
|
|
287
|
+
Ls(L.ownerDocument, "keyup", (S) => {
|
|
287
288
|
var Pe;
|
|
288
289
|
(S.key === "Tab" && !S.target || !((Pe = m.current) != null && Pe.contains(S.target))) && p(!1, ne);
|
|
289
290
|
}, {
|
|
@@ -411,7 +412,7 @@ const cs = /* @__PURE__ */ C.forwardRef(({
|
|
|
411
412
|
if (n)
|
|
412
413
|
if (typeof n == "object") {
|
|
413
414
|
const N = Object.keys(n);
|
|
414
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
415
|
+
if (process.env.NODE_ENV !== "production" && Ys(N.length === 1, "There should only be 1 breakpoint when passing an object to `align`"), N.length) {
|
|
415
416
|
const g = N[0], A = n[g];
|
|
416
417
|
z = A === "start", v.push(`${D}-${g}-${A}`);
|
|
417
418
|
}
|
|
@@ -430,7 +431,7 @@ const cs = /* @__PURE__ */ C.forwardRef(({
|
|
|
430
431
|
popperConfig: f,
|
|
431
432
|
placement: M
|
|
432
433
|
});
|
|
433
|
-
if (b.ref = ye(rs(m, "DropdownMenu"), b.ref),
|
|
434
|
+
if (b.ref = ye(rs(m, "DropdownMenu"), b.ref), qs(() => {
|
|
434
435
|
w && (F == null || F.update());
|
|
435
436
|
}, [w]), !U && !l && !P) return null;
|
|
436
437
|
typeof d != "string" && (b.show = w, b.close = () => x == null ? void 0 : x(!1), b.align = n);
|
|
@@ -455,7 +456,7 @@ const ls = /* @__PURE__ */ C.forwardRef(({
|
|
|
455
456
|
className: n,
|
|
456
457
|
childBsPrefix: r,
|
|
457
458
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
458
|
-
as: c =
|
|
459
|
+
as: c = Qs,
|
|
459
460
|
...i
|
|
460
461
|
}, l) => {
|
|
461
462
|
const d = T(o, "dropdown-toggle"), f = R(oe);
|
|
@@ -483,9 +484,9 @@ const ds = /* @__PURE__ */ C.forwardRef((o, t) => {
|
|
|
483
484
|
navbar: m,
|
|
484
485
|
autoClose: z = !0,
|
|
485
486
|
...h
|
|
486
|
-
} =
|
|
487
|
+
} = Xs(o, {
|
|
487
488
|
show: "onToggle"
|
|
488
|
-
}), D = R(De), E = T(n, "dropdown"), y =
|
|
489
|
+
}), D = R(De), E = T(n, "dropdown"), y = Us(), O = (F) => z === !1 ? F === "click" : z === "inside" ? F !== "rootClose" : z === "outside" ? F !== "select" : !0, P = Zs((F, w) => {
|
|
489
490
|
var x;
|
|
490
491
|
!((x = w.originalEvent) == null || (x = x.target) == null) && x.classList.contains("dropdown-toggle") && w.source === "mousedown" || (w.originalEvent.currentTarget === document && (w.source !== "keydown" || w.originalEvent.key === "Escape") && (w.source = "rootClose"), O(w.source) && (f == null || f(F, w)));
|
|
491
492
|
}), M = is(l === "end", r, y), b = We(() => ({
|
|
@@ -525,8 +526,8 @@ const j = Object.assign(ds, {
|
|
|
525
526
|
ItemText: ts,
|
|
526
527
|
Divider: ss,
|
|
527
528
|
Header: as
|
|
528
|
-
}),
|
|
529
|
-
function
|
|
529
|
+
}), ua = ["as", "active", "eventKey"];
|
|
530
|
+
function ma(o, t) {
|
|
530
531
|
if (o == null) return {};
|
|
531
532
|
var n = {};
|
|
532
533
|
for (var r in o) if ({}.hasOwnProperty.call(o, r)) {
|
|
@@ -543,7 +544,7 @@ function us({
|
|
|
543
544
|
role: c,
|
|
544
545
|
disabled: i
|
|
545
546
|
}) {
|
|
546
|
-
const l = R(se), d = R(Fe), f = R(
|
|
547
|
+
const l = R(se), d = R(Fe), f = R(Hs);
|
|
547
548
|
let u = n;
|
|
548
549
|
const p = {
|
|
549
550
|
role: c
|
|
@@ -559,12 +560,12 @@ function us({
|
|
|
559
560
|
isActive: u
|
|
560
561
|
}];
|
|
561
562
|
}
|
|
562
|
-
const
|
|
563
|
+
const pa = /* @__PURE__ */ C.forwardRef((o, t) => {
|
|
563
564
|
let {
|
|
564
565
|
as: n = Ve,
|
|
565
566
|
active: r,
|
|
566
567
|
eventKey: c
|
|
567
|
-
} = o, i =
|
|
568
|
+
} = o, i = ma(o, ua);
|
|
568
569
|
const [l, d] = us(Object.assign({
|
|
569
570
|
key: ae(c, i.href),
|
|
570
571
|
active: r
|
|
@@ -573,7 +574,7 @@ const ma = /* @__PURE__ */ C.forwardRef((o, t) => {
|
|
|
573
574
|
ref: t
|
|
574
575
|
}));
|
|
575
576
|
});
|
|
576
|
-
|
|
577
|
+
pa.displayName = "NavItem";
|
|
577
578
|
const ms = /* @__PURE__ */ C.forwardRef(({
|
|
578
579
|
bsPrefix: o,
|
|
579
580
|
className: t,
|
|
@@ -636,16 +637,16 @@ const ps = /* @__PURE__ */ C.forwardRef(({
|
|
|
636
637
|
});
|
|
637
638
|
});
|
|
638
639
|
ps.displayName = "NavDropdown";
|
|
639
|
-
const
|
|
640
|
+
const fa = Object.assign(ps, {
|
|
640
641
|
Item: j.Item,
|
|
641
642
|
ItemText: j.ItemText,
|
|
642
643
|
Divider: j.Divider,
|
|
643
644
|
Header: j.Header
|
|
644
645
|
});
|
|
645
|
-
function
|
|
646
|
+
function Na(o) {
|
|
646
647
|
return Os({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M1 2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zM1 7a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zM1 12a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1z" }, child: [] }] })(o);
|
|
647
648
|
}
|
|
648
|
-
const s = 24, a = "icon-app-2",
|
|
649
|
+
const s = 24, a = "icon-app-2", ga = {
|
|
649
650
|
// Usuarios / Perfil
|
|
650
651
|
Usuario: /* @__PURE__ */ e(Ae, { size: s, className: a }),
|
|
651
652
|
Beneficiario: /* @__PURE__ */ e(Ae, { size: s, className: a }),
|
|
@@ -816,7 +817,7 @@ const s = 24, a = "icon-app-2", Na = {
|
|
|
816
817
|
Certificados: /* @__PURE__ */ e(vs, { size: s, className: a }),
|
|
817
818
|
// Noticias
|
|
818
819
|
"Redactor Noticias": /* @__PURE__ */ e(hs, { size: s, className: a })
|
|
819
|
-
},
|
|
820
|
+
}, ka = () => {
|
|
820
821
|
const [o, t] = gs([]), n = location.pathname, r = n.startsWith("/") ? n : `/${n}`;
|
|
821
822
|
W(() => {
|
|
822
823
|
const i = localStorage.getItem("auth_state");
|
|
@@ -825,7 +826,7 @@ const s = 24, a = "icon-app-2", Na = {
|
|
|
825
826
|
const l = JSON.parse(i);
|
|
826
827
|
t(l.user.servicios);
|
|
827
828
|
} catch (l) {
|
|
828
|
-
|
|
829
|
+
Ms.error("Error al decodificar el token:", l);
|
|
829
830
|
}
|
|
830
831
|
}, []);
|
|
831
832
|
const c = (i) => {
|
|
@@ -833,16 +834,16 @@ const s = 24, a = "icon-app-2", Na = {
|
|
|
833
834
|
window.location.href = l;
|
|
834
835
|
};
|
|
835
836
|
return /* @__PURE__ */ e(
|
|
836
|
-
|
|
837
|
+
fa,
|
|
837
838
|
{
|
|
838
|
-
title: /* @__PURE__ */ e(
|
|
839
|
+
title: /* @__PURE__ */ e(Na, { className: "icono-app" }),
|
|
839
840
|
align: "end",
|
|
840
841
|
children: /* @__PURE__ */ e("div", { style: {
|
|
841
842
|
fontWeight: "400",
|
|
842
843
|
padding: "1rem"
|
|
843
844
|
}, children: /* @__PURE__ */ ee("div", { className: "grid-container", children: [
|
|
844
845
|
o.filter((i) => !(i.url === "unp/ecosistema/usuario" && i.rol === "Usuario")).map(({ rol: i, url: l, id_rol: d }) => {
|
|
845
|
-
const f =
|
|
846
|
+
const f = ga[i] || /* @__PURE__ */ e(zs, { size: s, className: a });
|
|
846
847
|
return /* @__PURE__ */ ee(
|
|
847
848
|
"div",
|
|
848
849
|
{
|
|
@@ -873,13 +874,13 @@ const s = 24, a = "icon-app-2", Na = {
|
|
|
873
874
|
);
|
|
874
875
|
};
|
|
875
876
|
export {
|
|
876
|
-
|
|
877
|
-
|
|
877
|
+
ka as A,
|
|
878
|
+
pa as N,
|
|
878
879
|
Fe as a,
|
|
879
|
-
|
|
880
|
+
$a as b,
|
|
880
881
|
ms as c,
|
|
881
882
|
te as d,
|
|
882
883
|
ns as e,
|
|
883
884
|
Be as q,
|
|
884
|
-
|
|
885
|
+
oa as u
|
|
885
886
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { FinSesionService as a } from "../services/FinSesionService.js";
|
|
2
2
|
import { y as e } from "../../index-Cy8qF6oY.js";
|
|
3
|
-
import { useState as
|
|
4
|
-
const
|
|
5
|
-
const [t,
|
|
6
|
-
return
|
|
3
|
+
import { useState as r, useEffect as c } from "react";
|
|
4
|
+
const f = () => {
|
|
5
|
+
const [t, n] = r(null), s = `${window.location.protocol}//${window.location.host}/`;
|
|
6
|
+
return c(() => {
|
|
7
7
|
const o = localStorage.getItem("auth_state");
|
|
8
8
|
if (o) {
|
|
9
|
-
const
|
|
10
|
-
i
|
|
9
|
+
const i = JSON.parse(o);
|
|
10
|
+
n(i);
|
|
11
11
|
}
|
|
12
12
|
}, []), { FinSesion: () => {
|
|
13
|
-
e.info("Finalizando sesión..."), new Promise(async (o
|
|
13
|
+
e.info("Finalizando sesión..."), new Promise(async (o) => {
|
|
14
14
|
try {
|
|
15
|
-
await a((t == null ? void 0 : t.user.username) || "",
|
|
16
|
-
} catch
|
|
17
|
-
e.dismiss(), e.warning("Sesión finalizada")
|
|
15
|
+
await a((t == null ? void 0 : t.user.username) || "", s), e.dismiss(), e.success("Sesión finalizada con éxito"), o(!0);
|
|
16
|
+
} catch {
|
|
17
|
+
e.dismiss(), e.warning("Sesión finalizada");
|
|
18
18
|
} finally {
|
|
19
19
|
sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), setTimeout(() => {
|
|
20
|
-
window.location.href =
|
|
20
|
+
window.location.href = s;
|
|
21
21
|
}, 1e3);
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
} };
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
f as useFinalizarSesion
|
|
28
28
|
};
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import { logger as a } from "../../utils/logger/logger.js";
|
|
2
|
+
const i = async (e, t) => {
|
|
3
3
|
try {
|
|
4
|
-
const r = await
|
|
4
|
+
const r = await fetch(`${t}api-auth/auth/logout/`, {
|
|
5
5
|
method: "POST",
|
|
6
6
|
headers: {
|
|
7
7
|
"Content-Type": "application/json",
|
|
8
|
-
Authorization: `Bearer ${localStorage.getItem("access_token")}
|
|
9
|
-
"X-Fingerprint": r
|
|
8
|
+
Authorization: `Bearer ${localStorage.getItem("access_token")}`
|
|
10
9
|
},
|
|
11
10
|
body: JSON.stringify({
|
|
12
11
|
datosFormulario: {
|
|
13
|
-
username:
|
|
12
|
+
username: e
|
|
14
13
|
}
|
|
15
14
|
}),
|
|
16
15
|
credentials: "include"
|
|
17
|
-
}),
|
|
18
|
-
if (!
|
|
19
|
-
throw
|
|
20
|
-
return
|
|
16
|
+
}), o = await r.json();
|
|
17
|
+
if (!r.ok)
|
|
18
|
+
throw a.log(o.error), new Error(o.error);
|
|
19
|
+
return o;
|
|
21
20
|
} catch (r) {
|
|
22
21
|
throw new Error(r.message);
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
i as FinSesionService
|
|
27
26
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { J as s } from "../../../index-
|
|
2
|
+
import { J as s } from "../../../index-HaNVi1BU.js";
|
|
3
3
|
import '../../../assets/Bootstrap.css';/* empty css */
|
|
4
4
|
import { B as a } from "../../../Button-eLVX04GZ.js";
|
|
5
5
|
const d = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as c, useRef as u, useEffect as j } from "react";
|
|
3
|
-
import { p, q as N } from "../../index-
|
|
3
|
+
import { p, q as N } from "../../index-HaNVi1BU.js";
|
|
4
4
|
import '../../assets/TarjetaInfo.css';/* empty css */
|
|
5
5
|
const b = ({ icon: l, label: h, show: f = !1, children: o, extraItem: i }) => {
|
|
6
6
|
const [e, s] = c(f), [m, r] = c(0), n = u(null);
|
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
|
|
6
|
-
import { I as t } from "../../index-
|
|
6
|
+
import { I as t } from "../../index-HaNVi1BU.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
@@ -315,7 +315,7 @@ function $2(c) {
|
|
|
315
315
|
return l({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z" }, child: [] }] })(c);
|
|
316
316
|
}
|
|
317
317
|
export {
|
|
318
|
-
|
|
318
|
+
X as $,
|
|
319
319
|
a as A,
|
|
320
320
|
n as B,
|
|
321
321
|
E as C,
|
|
@@ -344,13 +344,13 @@ export {
|
|
|
344
344
|
w2 as Z,
|
|
345
345
|
r as _,
|
|
346
346
|
$ as a,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
347
|
+
n2 as a0,
|
|
348
|
+
S2 as a1,
|
|
349
|
+
j2 as a2,
|
|
350
|
+
o as a3,
|
|
351
|
+
F2 as a4,
|
|
352
|
+
L as a5,
|
|
353
|
+
_2 as a6,
|
|
354
354
|
G2 as a7,
|
|
355
355
|
d as a8,
|
|
356
356
|
b2 as a9,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const BarraAccesibilidad: () => import(
|
|
1
|
+
declare const BarraAccesibilidad: () => import('react/jsx-runtime').JSX.Element;
|
|
2
2
|
export { BarraAccesibilidad };
|