react-ecosistema-unp 2.5.0 → 2.6.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/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 -18
- 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,34 +1,35 @@
|
|
|
1
1
|
import { jsx as a, jsxs as N, Fragment as me } from "react/jsx-runtime";
|
|
2
2
|
import * as _ from "react";
|
|
3
3
|
import pe, { useLayoutEffect as ve, useEffect as L, useRef as x, useMemo as ee, useState as j, useCallback as w, cloneElement as z } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { sanitizarHtml as ge } from "../../utils/sanitizar-html/sanitizarHtml.js";
|
|
5
|
+
import { a8 as Ee, T as ye, a9 as we, U as Ne, V as G, W as be } from "../../index-HaNVi1BU.js";
|
|
6
|
+
import { Animacion as Oe } from "../animacion/Animacion.js";
|
|
6
7
|
import '../../assets/NotificacionPopoverV2.css';/* empty css */
|
|
7
8
|
import { c as D } from "../../index-ZphT3dr_.js";
|
|
8
9
|
import { u as S, a as te } from "../../ThemeProvider-Cv61y4Uy.js";
|
|
9
|
-
import { a as
|
|
10
|
-
import { P as
|
|
11
|
-
import { w as
|
|
12
|
-
import { c as
|
|
13
|
-
import { g as A, i as
|
|
14
|
-
import { R as
|
|
15
|
-
import { u as I, N as
|
|
10
|
+
import { a as Te, b as Re, g as xe, c as X, d as Ce, m as Fe, e as _e, f as Pe, h as Le, i as Se } from "../../useIsomorphicEffect-DH-agvLb.js";
|
|
11
|
+
import { P as $e } from "../../index-DNv2B0Nc.js";
|
|
12
|
+
import { w as De } from "../../warning-DfuoVnCC.js";
|
|
13
|
+
import { c as Ue, o as ne, l as je, u as oe } from "../../useMergedRefs-YI9EGKd_.js";
|
|
14
|
+
import { g as A, i as Be, e as V } from "../../TransitionWrapper-BCUEVCwA.js";
|
|
15
|
+
import { R as ke } from "../../index-DdZBtIJj.js";
|
|
16
|
+
import { u as I, N as He, F as Y } from "../../NoopTransition-D8AxBGEr.js";
|
|
16
17
|
import { u as ie } from "../../useEventCallback-Bfo0-hwZ.js";
|
|
17
18
|
const Me = typeof global < "u" && // @ts-ignore
|
|
18
19
|
global.navigator && // @ts-ignore
|
|
19
|
-
global.navigator.product === "ReactNative",
|
|
20
|
-
function
|
|
20
|
+
global.navigator.product === "ReactNative", Ve = typeof document < "u", q = Ve || Me ? ve : L;
|
|
21
|
+
function We() {
|
|
21
22
|
const e = x(!0), t = x(() => e.current);
|
|
22
23
|
return L(() => (e.current = !0, () => {
|
|
23
24
|
e.current = !1;
|
|
24
25
|
}), []), t.current;
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function ze(e) {
|
|
27
28
|
const t = x(e);
|
|
28
29
|
return t.current = e, t;
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
const t =
|
|
31
|
+
function Ae(e) {
|
|
32
|
+
const t = ze(e);
|
|
32
33
|
L(() => () => t.current(), []);
|
|
33
34
|
}
|
|
34
35
|
const W = 2 ** 31 - 1;
|
|
@@ -36,9 +37,9 @@ function re(e, t, n) {
|
|
|
36
37
|
const o = n - Date.now();
|
|
37
38
|
e.current = o <= W ? setTimeout(t, o) : setTimeout(() => re(e, t, n), W);
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
const e =
|
|
41
|
-
return
|
|
40
|
+
function Ie() {
|
|
41
|
+
const e = We(), t = x();
|
|
42
|
+
return Ae(() => clearTimeout(t.current)), ee(() => {
|
|
42
43
|
const n = () => clearTimeout(t.current);
|
|
43
44
|
function o(i, r = 0) {
|
|
44
45
|
e() && (n(), r <= W ? t.current = setTimeout(i, r) : re(t, i, Date.now() + r));
|
|
@@ -50,21 +51,21 @@ function Ae() {
|
|
|
50
51
|
};
|
|
51
52
|
}, []);
|
|
52
53
|
}
|
|
53
|
-
const
|
|
54
|
+
const M = (e, t) => Ue ? e == null ? (t || ne()).body : (typeof e == "function" && (e = e()), e && "current" in e && (e = e.current), e && ("nodeType" in e || e.getBoundingClientRect) ? e : null) : null;
|
|
54
55
|
function J(e, t) {
|
|
55
|
-
const n =
|
|
56
|
+
const n = Te(), [o, i] = j(() => M(e, n == null ? void 0 : n.document));
|
|
56
57
|
if (!o) {
|
|
57
|
-
const r =
|
|
58
|
+
const r = M(e);
|
|
58
59
|
r && i(r);
|
|
59
60
|
}
|
|
60
61
|
return L(() => {
|
|
61
62
|
}, [t, o]), L(() => {
|
|
62
|
-
const r =
|
|
63
|
+
const r = M(e);
|
|
63
64
|
r !== o && i(r);
|
|
64
65
|
}, [e, o]), o;
|
|
65
66
|
}
|
|
66
|
-
const
|
|
67
|
-
function
|
|
67
|
+
const Ke = ["onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "addEndListener", "children"];
|
|
68
|
+
function Ge(e, t) {
|
|
68
69
|
if (e == null) return {};
|
|
69
70
|
var n = {};
|
|
70
71
|
for (var o in e) if ({}.hasOwnProperty.call(e, o)) {
|
|
@@ -73,7 +74,7 @@ function Ke(e, t) {
|
|
|
73
74
|
}
|
|
74
75
|
return n;
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
+
function Xe(e) {
|
|
77
78
|
let {
|
|
78
79
|
onEnter: t,
|
|
79
80
|
onEntering: n,
|
|
@@ -83,7 +84,7 @@ function Ge(e) {
|
|
|
83
84
|
onExited: c,
|
|
84
85
|
addEndListener: u,
|
|
85
86
|
children: d
|
|
86
|
-
} = e, l =
|
|
87
|
+
} = e, l = Ge(e, Ke);
|
|
87
88
|
const h = x(null), p = I(h, A(d)), s = (y) => (T) => {
|
|
88
89
|
y && h.current && y(h.current, T);
|
|
89
90
|
}, v = w(s(t), [t]), g = w(s(n), [n]), b = w(s(o), [o]), f = w(s(i), [i]), E = w(s(r), [r]), m = w(s(c), [c]), O = w(s(u), [u]);
|
|
@@ -114,8 +115,8 @@ function Ge(e) {
|
|
|
114
115
|
})
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
|
-
const
|
|
118
|
-
function
|
|
118
|
+
const Ye = ["component"];
|
|
119
|
+
function qe(e, t) {
|
|
119
120
|
if (e == null) return {};
|
|
120
121
|
var n = {};
|
|
121
122
|
for (var o in e) if ({}.hasOwnProperty.call(e, o)) {
|
|
@@ -124,16 +125,16 @@ function Ye(e, t) {
|
|
|
124
125
|
}
|
|
125
126
|
return n;
|
|
126
127
|
}
|
|
127
|
-
const
|
|
128
|
+
const Je = /* @__PURE__ */ _.forwardRef((e, t) => {
|
|
128
129
|
let {
|
|
129
130
|
component: n
|
|
130
|
-
} = e, o =
|
|
131
|
-
const i =
|
|
131
|
+
} = e, o = qe(e, Ye);
|
|
132
|
+
const i = Xe(o);
|
|
132
133
|
return /* @__PURE__ */ a(n, Object.assign({
|
|
133
134
|
ref: t
|
|
134
135
|
}, i));
|
|
135
136
|
});
|
|
136
|
-
function
|
|
137
|
+
function Qe({
|
|
137
138
|
in: e,
|
|
138
139
|
onTransition: t
|
|
139
140
|
}) {
|
|
@@ -154,7 +155,7 @@ function Je({
|
|
|
154
155
|
o.current = !0;
|
|
155
156
|
}), []), n;
|
|
156
157
|
}
|
|
157
|
-
function
|
|
158
|
+
function Ze({
|
|
158
159
|
children: e,
|
|
159
160
|
in: t,
|
|
160
161
|
onExited: n,
|
|
@@ -163,7 +164,7 @@ function Qe({
|
|
|
163
164
|
}) {
|
|
164
165
|
const [r, c] = j(!t);
|
|
165
166
|
t && r && c(!1);
|
|
166
|
-
const u =
|
|
167
|
+
const u = Qe({
|
|
167
168
|
in: !!t,
|
|
168
169
|
onTransition: (l) => {
|
|
169
170
|
const h = () => {
|
|
@@ -178,35 +179,35 @@ function Qe({
|
|
|
178
179
|
ref: d
|
|
179
180
|
});
|
|
180
181
|
}
|
|
181
|
-
function
|
|
182
|
-
return e ? /* @__PURE__ */ a(
|
|
182
|
+
function et(e, t, n) {
|
|
183
|
+
return e ? /* @__PURE__ */ a(Je, Object.assign({}, n, {
|
|
183
184
|
component: e
|
|
184
|
-
})) : t ? /* @__PURE__ */ a(
|
|
185
|
+
})) : t ? /* @__PURE__ */ a(Ze, Object.assign({}, n, {
|
|
185
186
|
transition: t
|
|
186
|
-
})) : /* @__PURE__ */ a(
|
|
187
|
+
})) : /* @__PURE__ */ a(He, Object.assign({}, n));
|
|
187
188
|
}
|
|
188
189
|
function Q(e, t) {
|
|
189
190
|
return e.classList ? !!t && e.classList.contains(t) : (" " + (e.className.baseVal || e.className) + " ").indexOf(" " + t + " ") !== -1;
|
|
190
191
|
}
|
|
191
|
-
const
|
|
192
|
+
const tt = () => {
|
|
192
193
|
};
|
|
193
|
-
function
|
|
194
|
+
function nt(e, t, {
|
|
194
195
|
disabled: n,
|
|
195
196
|
clickTrigger: o
|
|
196
197
|
} = {}) {
|
|
197
|
-
const i = t ||
|
|
198
|
-
|
|
198
|
+
const i = t || tt;
|
|
199
|
+
Re(e, i, {
|
|
199
200
|
disabled: n,
|
|
200
201
|
clickTrigger: o
|
|
201
202
|
});
|
|
202
203
|
const r = ie((c) => {
|
|
203
|
-
|
|
204
|
+
Be(c) && i(c);
|
|
204
205
|
});
|
|
205
206
|
L(() => {
|
|
206
207
|
if (n || e == null) return;
|
|
207
|
-
const c = ne(
|
|
208
|
+
const c = ne(xe(e));
|
|
208
209
|
let u = (c.defaultView || window).event;
|
|
209
|
-
const d =
|
|
210
|
+
const d = je(c, "keyup", (l) => {
|
|
210
211
|
if (l === u) {
|
|
211
212
|
u = void 0;
|
|
212
213
|
return;
|
|
@@ -227,7 +228,7 @@ const se = /* @__PURE__ */ _.forwardRef((e, t) => {
|
|
|
227
228
|
popperConfig: c = {},
|
|
228
229
|
transition: u,
|
|
229
230
|
runTransition: d
|
|
230
|
-
} = e, [l, h] = X(), [p, s] = X(), v = I(h, t), g = J(e.container), b = J(e.target), [f, E] = j(!e.show), m =
|
|
231
|
+
} = e, [l, h] = X(), [p, s] = X(), v = I(h, t), g = J(e.container), b = J(e.target), [f, E] = j(!e.show), m = Ce(b, l, Fe({
|
|
231
232
|
placement: i,
|
|
232
233
|
enableEvents: !!e.show,
|
|
233
234
|
containerPadding: r || 5,
|
|
@@ -237,10 +238,10 @@ const se = /* @__PURE__ */ _.forwardRef((e, t) => {
|
|
|
237
238
|
popperConfig: c
|
|
238
239
|
}));
|
|
239
240
|
e.show && f && E(!1);
|
|
240
|
-
const O = (...
|
|
241
|
-
E(!0), e.onExited && e.onExited(...
|
|
241
|
+
const O = (...H) => {
|
|
242
|
+
E(!0), e.onExited && e.onExited(...H);
|
|
242
243
|
}, y = e.show || !f;
|
|
243
|
-
if (
|
|
244
|
+
if (nt(l, e.onHide, {
|
|
244
245
|
disabled: !e.rootClose || e.rootCloseDisabled,
|
|
245
246
|
clickTrigger: e.rootCloseEvent
|
|
246
247
|
}), !y)
|
|
@@ -264,7 +265,7 @@ const se = /* @__PURE__ */ _.forwardRef((e, t) => {
|
|
|
264
265
|
ref: s
|
|
265
266
|
})
|
|
266
267
|
});
|
|
267
|
-
return $ =
|
|
268
|
+
return $ = et(u, d, {
|
|
268
269
|
in: !!e.show,
|
|
269
270
|
appear: !0,
|
|
270
271
|
mountOnEnter: !0,
|
|
@@ -276,7 +277,7 @@ const se = /* @__PURE__ */ _.forwardRef((e, t) => {
|
|
|
276
277
|
onEnter: C,
|
|
277
278
|
onEntering: B,
|
|
278
279
|
onEntered: k
|
|
279
|
-
}), g ? /* @__PURE__ */
|
|
280
|
+
}), g ? /* @__PURE__ */ ke.createPortal($, g) : null;
|
|
280
281
|
});
|
|
281
282
|
se.displayName = "Overlay";
|
|
282
283
|
const ae = /* @__PURE__ */ _.forwardRef(({
|
|
@@ -314,7 +315,7 @@ function le(e = "absolute") {
|
|
|
314
315
|
pointerEvents: "none"
|
|
315
316
|
};
|
|
316
317
|
}
|
|
317
|
-
const
|
|
318
|
+
const ot = /* @__PURE__ */ _.forwardRef(({
|
|
318
319
|
bsPrefix: e,
|
|
319
320
|
placement: t = "right",
|
|
320
321
|
className: n,
|
|
@@ -346,7 +347,7 @@ const nt = /* @__PURE__ */ _.forwardRef(({
|
|
|
346
347
|
children: i
|
|
347
348
|
}) : i]
|
|
348
349
|
});
|
|
349
|
-
}), ue = Object.assign(
|
|
350
|
+
}), ue = Object.assign(ot, {
|
|
350
351
|
Header: ae,
|
|
351
352
|
Body: K,
|
|
352
353
|
// Default popover offset.
|
|
@@ -387,12 +388,12 @@ const nt = /* @__PURE__ */ _.forwardRef(({
|
|
|
387
388
|
});
|
|
388
389
|
});
|
|
389
390
|
de.displayName = "Tooltip";
|
|
390
|
-
const
|
|
391
|
+
const it = Object.assign(de, {
|
|
391
392
|
// Default tooltip offset.
|
|
392
393
|
// https://github.com/twbs/bootstrap/blob/beca2a6c7f6bc88b6449339fc76edcda832c59e5/js/src/tooltip.js#L65
|
|
393
394
|
TOOLTIP_OFFSET: [0, 6]
|
|
394
395
|
});
|
|
395
|
-
function
|
|
396
|
+
function rt(e) {
|
|
396
397
|
const t = x(null), n = S(void 0, "popover"), o = S(void 0, "tooltip"), i = ee(() => ({
|
|
397
398
|
name: "offset",
|
|
398
399
|
options: {
|
|
@@ -403,7 +404,7 @@ function it(e) {
|
|
|
403
404
|
if (Q(t.current, n))
|
|
404
405
|
return ue.POPPER_OFFSET;
|
|
405
406
|
if (Q(t.current, o))
|
|
406
|
-
return
|
|
407
|
+
return it.TOOLTIP_OFFSET;
|
|
407
408
|
}
|
|
408
409
|
return [0, 0];
|
|
409
410
|
}
|
|
@@ -411,7 +412,7 @@ function it(e) {
|
|
|
411
412
|
}), [e, n, o]);
|
|
412
413
|
return [t, [i]];
|
|
413
414
|
}
|
|
414
|
-
function
|
|
415
|
+
function st(e, t) {
|
|
415
416
|
const {
|
|
416
417
|
ref: n
|
|
417
418
|
} = e, {
|
|
@@ -428,10 +429,10 @@ const fe = /* @__PURE__ */ _.forwardRef(({
|
|
|
428
429
|
show: r = !1,
|
|
429
430
|
...c
|
|
430
431
|
}, u) => {
|
|
431
|
-
const d = x({}), [l, h] = j(null), [p, s] =
|
|
432
|
+
const d = x({}), [l, h] = j(null), [p, s] = rt(c.offset), v = oe(u, p), g = t === !0 ? Y : t || void 0, b = _e((f) => {
|
|
432
433
|
h(f), n == null || n.onFirstUpdate == null || n.onFirstUpdate(f);
|
|
433
434
|
});
|
|
434
|
-
return
|
|
435
|
+
return Pe(() => {
|
|
435
436
|
l && c.target && (d.current.scheduleUpdate == null || d.current.scheduleUpdate());
|
|
436
437
|
}, [l, c.target]), L(() => {
|
|
437
438
|
r || h(null);
|
|
@@ -453,7 +454,7 @@ const fe = /* @__PURE__ */ _.forwardRef(({
|
|
|
453
454
|
show: O
|
|
454
455
|
}) => {
|
|
455
456
|
var y;
|
|
456
|
-
|
|
457
|
+
st(f, E);
|
|
457
458
|
const T = m == null ? void 0 : m.placement, F = Object.assign(d.current, {
|
|
458
459
|
state: m == null ? void 0 : m.state,
|
|
459
460
|
scheduleUpdate: m == null ? void 0 : m.update,
|
|
@@ -487,7 +488,7 @@ const fe = /* @__PURE__ */ _.forwardRef(({
|
|
|
487
488
|
});
|
|
488
489
|
});
|
|
489
490
|
fe.displayName = "Overlay";
|
|
490
|
-
function
|
|
491
|
+
function at(e) {
|
|
491
492
|
return e && typeof e == "object" ? e : {
|
|
492
493
|
show: e,
|
|
493
494
|
hide: e
|
|
@@ -495,10 +496,10 @@ function st(e) {
|
|
|
495
496
|
}
|
|
496
497
|
function Z(e, t, n) {
|
|
497
498
|
const [o] = t, i = o.currentTarget, r = o.relatedTarget || o.nativeEvent[n];
|
|
498
|
-
(!r || r !== i) && !
|
|
499
|
+
(!r || r !== i) && !Se(i, r) && e(...t);
|
|
499
500
|
}
|
|
500
|
-
|
|
501
|
-
const
|
|
501
|
+
$e.oneOf(["click", "hover", "focus"]);
|
|
502
|
+
const ct = ({
|
|
502
503
|
trigger: e = ["hover", "focus"],
|
|
503
504
|
overlay: t,
|
|
504
505
|
children: n,
|
|
@@ -511,7 +512,7 @@ const at = ({
|
|
|
511
512
|
flip: l = d && d.indexOf("auto") !== -1,
|
|
512
513
|
...h
|
|
513
514
|
}) => {
|
|
514
|
-
const p = x(null), s = oe(p, A(n)), v =
|
|
515
|
+
const p = x(null), s = oe(p, A(n)), v = Ie(), g = x(""), [b, f] = Le(i, r, c), E = at(u), {
|
|
515
516
|
onFocus: m,
|
|
516
517
|
onBlur: O,
|
|
517
518
|
onClick: y
|
|
@@ -539,14 +540,14 @@ const at = ({
|
|
|
539
540
|
C(), O == null || O(...R);
|
|
540
541
|
}, [C, O]), $ = w((...R) => {
|
|
541
542
|
f(!b), y == null || y(...R);
|
|
542
|
-
}, [y, f, b]),
|
|
543
|
+
}, [y, f, b]), H = w((...R) => {
|
|
543
544
|
Z(F, R, "fromElement");
|
|
544
545
|
}, [F]), he = w((...R) => {
|
|
545
546
|
Z(C, R, "toElement");
|
|
546
547
|
}, [C]), U = e == null ? [] : [].concat(e), P = {
|
|
547
548
|
ref: T
|
|
548
549
|
};
|
|
549
|
-
return U.indexOf("click") !== -1 && (P.onClick = $), U.indexOf("focus") !== -1 && (P.onFocus = B, P.onBlur = k), U.indexOf("hover") !== -1 && (process.env.NODE_ENV !== "production" &&
|
|
550
|
+
return U.indexOf("click") !== -1 && (P.onClick = $), U.indexOf("focus") !== -1 && (P.onFocus = B, P.onBlur = k), U.indexOf("hover") !== -1 && (process.env.NODE_ENV !== "production" && De(U.length > 1, '[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'), P.onMouseOver = H, P.onMouseOut = he), /* @__PURE__ */ N(me, {
|
|
550
551
|
children: [typeof n == "function" ? n(P) : /* @__PURE__ */ z(n, P), /* @__PURE__ */ a(fe, {
|
|
551
552
|
...h,
|
|
552
553
|
show: b,
|
|
@@ -558,7 +559,7 @@ const at = ({
|
|
|
558
559
|
children: t
|
|
559
560
|
})]
|
|
560
561
|
});
|
|
561
|
-
},
|
|
562
|
+
}, lt = ({
|
|
562
563
|
notifications: e,
|
|
563
564
|
onMarkAllRead: t,
|
|
564
565
|
onClearRead: n,
|
|
@@ -570,13 +571,13 @@ const at = ({
|
|
|
570
571
|
const [u, d] = pe.useState("unread"), l = (s) => {
|
|
571
572
|
switch (s) {
|
|
572
573
|
case "success":
|
|
573
|
-
return /* @__PURE__ */ a(
|
|
574
|
+
return /* @__PURE__ */ a(be, {});
|
|
574
575
|
case "warning":
|
|
575
576
|
return /* @__PURE__ */ a(G, {});
|
|
576
577
|
case "error":
|
|
577
578
|
return /* @__PURE__ */ a(G, {});
|
|
578
579
|
default:
|
|
579
|
-
return /* @__PURE__ */ a(
|
|
580
|
+
return /* @__PURE__ */ a(Ne, {});
|
|
580
581
|
}
|
|
581
582
|
}, h = e.filter(
|
|
582
583
|
(s) => u === "unread" ? s.unread : !s.unread
|
|
@@ -625,7 +626,7 @@ const at = ({
|
|
|
625
626
|
)
|
|
626
627
|
] }),
|
|
627
628
|
/* @__PURE__ */ a("div", { className: "eco-notif-list", children: h.length === 0 ? /* @__PURE__ */ N("div", { className: "eco-notif-empty", children: [
|
|
628
|
-
/* @__PURE__ */ a("div", { className: "eco-notif-empty-illustration", children: /* @__PURE__ */ a(
|
|
629
|
+
/* @__PURE__ */ a("div", { className: "eco-notif-empty-illustration", children: /* @__PURE__ */ a(Oe, { type: "perro", width: 180 }) }),
|
|
629
630
|
/* @__PURE__ */ a("p", { className: "eco-notif-empty-text", children: u === "unread" ? "No tienes notificaciones pendientes" : "No hay notificaciones leídas" })
|
|
630
631
|
] }) : h.map((s) => /* @__PURE__ */ N(
|
|
631
632
|
"div",
|
|
@@ -638,9 +639,9 @@ const at = ({
|
|
|
638
639
|
/* @__PURE__ */ a("div", { className: `eco-notif-icon-wrap eco-notif-${s.type}`, children: l(s.type) }),
|
|
639
640
|
/* @__PURE__ */ N("div", { className: "eco-notif-content", children: [
|
|
640
641
|
/* @__PURE__ */ a("div", { className: "eco-notif-title", children: s.title }),
|
|
641
|
-
/* @__PURE__ */ a("div", { className: "eco-notif-desc", children: s.description.includes("<") ? /* @__PURE__ */ a("div", { dangerouslySetInnerHTML: { __html: s.description } }) : s.description }),
|
|
642
|
+
/* @__PURE__ */ a("div", { className: "eco-notif-desc", children: s.description.includes("<") ? /* @__PURE__ */ a("div", { dangerouslySetInnerHTML: { __html: ge(s.description) } }) : s.description }),
|
|
642
643
|
/* @__PURE__ */ N("div", { className: "eco-notif-time", children: [
|
|
643
|
-
/* @__PURE__ */ a(
|
|
644
|
+
/* @__PURE__ */ a(ye, { size: 10 }),
|
|
644
645
|
" ",
|
|
645
646
|
s.time
|
|
646
647
|
] })
|
|
@@ -653,7 +654,7 @@ const at = ({
|
|
|
653
654
|
s.unread ? i == null || i(s) : r == null || r(s);
|
|
654
655
|
},
|
|
655
656
|
title: s.unread ? "Mover a leídas" : "Eliminar permanentemente",
|
|
656
|
-
children: /* @__PURE__ */ a(
|
|
657
|
+
children: /* @__PURE__ */ a(we, { size: 12 })
|
|
657
658
|
}
|
|
658
659
|
) })
|
|
659
660
|
]
|
|
@@ -662,27 +663,27 @@ const at = ({
|
|
|
662
663
|
)) }),
|
|
663
664
|
/* @__PURE__ */ a("div", { className: "eco-notif-footer", children: /* @__PURE__ */ a("button", { onClick: c, children: "Ver todas las notificaciones" }) })
|
|
664
665
|
] });
|
|
665
|
-
},
|
|
666
|
+
}, xt = ({
|
|
666
667
|
count: e = 0,
|
|
667
668
|
placement: t = "bottom",
|
|
668
669
|
...n
|
|
669
670
|
}) => {
|
|
670
|
-
const o = /* @__PURE__ */ a(ue, { id: "notification-popover", className: "border-0 bg-transparent shadow-none", children: /* @__PURE__ */ a(
|
|
671
|
+
const o = /* @__PURE__ */ a(ue, { id: "notification-popover", className: "border-0 bg-transparent shadow-none", children: /* @__PURE__ */ a(lt, { ...n }) });
|
|
671
672
|
return /* @__PURE__ */ a(
|
|
672
|
-
|
|
673
|
+
ct,
|
|
673
674
|
{
|
|
674
675
|
trigger: "click",
|
|
675
676
|
rootClose: !0,
|
|
676
677
|
placement: t,
|
|
677
678
|
overlay: o,
|
|
678
679
|
children: /* @__PURE__ */ N("button", { className: "eco-bell-trigger", children: [
|
|
679
|
-
/* @__PURE__ */ a(
|
|
680
|
+
/* @__PURE__ */ a(Ee, { size: 20 }),
|
|
680
681
|
e > 0 && /* @__PURE__ */ a("span", { className: `eco-notif-badge ${e > 0 ? "pulse" : ""}` })
|
|
681
682
|
] })
|
|
682
683
|
}
|
|
683
684
|
);
|
|
684
685
|
};
|
|
685
686
|
export {
|
|
686
|
-
|
|
687
|
-
|
|
687
|
+
xt as NotificacionBellV2,
|
|
688
|
+
xt as default
|
|
688
689
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as C } from "react";
|
|
3
3
|
import { x as N, y as M, d as O, c as w, z, A as f, B as b, C as y, D as B, E as S, a as V } from "../../index-B96iRUpt.js";
|
|
4
|
-
import { B as k, a7 as A } from "../../index-
|
|
4
|
+
import { B as k, a7 as A } from "../../index-HaNVi1BU.js";
|
|
5
5
|
import { G as l } from "../../iconBase-DSKTHwal.js";
|
|
6
6
|
import '../../assets/StatusFilterBar.css';/* empty css */
|
|
7
7
|
function F(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { K as n, L as i, M as l, N as u, O as a } from "../../index-
|
|
2
|
+
import { K as n, L as i, M as l, N as u, O as a } from "../../index-HaNVi1BU.js";
|
|
3
3
|
import '../../assets/StatusSemaphore.css';/* empty css */
|
|
4
4
|
const p = ({ value: c }) => {
|
|
5
5
|
const o = ((e) => e <= 10 ? { color: "#059669", icon: n, label: "Excelente" } : e <= 20 ? { color: "#ca8a04", icon: i, label: "Alerta" } : e <= 25 ? { color: "#d97706", icon: l, label: "Crítico" } : e <= 30 ? { color: "#ea580c", icon: u, label: "Muy Crítico" } : e <= 45 ? { color: "#dc2626", icon: a, label: "Urgente" } : { color: "#991b1b", icon: a, label: "Vencido" })(c), t = o.icon;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useState as w, useEffect as g } from "react";
|
|
3
|
-
import { v as z } from "../../index-
|
|
3
|
+
import { v as z } from "../../index-HaNVi1BU.js";
|
|
4
4
|
import '../../assets/StepperV2.css';/* empty css */
|
|
5
5
|
import { B as m } from "../../Button-eLVX04GZ.js";
|
|
6
6
|
const L = ({
|
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as w, useEffect as
|
|
3
|
-
import { useLocation as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useEffect as v } from "react";
|
|
3
|
+
import { useLocation as I, Outlet as p } from "react-router-dom";
|
|
4
|
+
import { logger as u } from "../logger/logger.js";
|
|
5
5
|
const E = () => {
|
|
6
|
-
const [
|
|
7
|
-
const
|
|
6
|
+
const [g, o] = w(!1), k = I(), s = `${window.location.protocol}//${window.location.host}/`, l = `${window.location.host}`, S = async () => {
|
|
7
|
+
const h = localStorage.getItem("refresh_token"), i = await fetch(`${s}api-auth/auth/refresh_token/`, {
|
|
8
8
|
method: "POST",
|
|
9
9
|
headers: {
|
|
10
10
|
"Content-Type": "application/json",
|
|
11
|
-
Authorization: `Bearer ${localStorage.getItem("access_token")}
|
|
12
|
-
"X-Fingerprint": m
|
|
11
|
+
Authorization: `Bearer ${localStorage.getItem("access_token")}`
|
|
13
12
|
},
|
|
14
13
|
credentials: "include",
|
|
15
14
|
body: JSON.stringify({
|
|
16
15
|
refresh: h
|
|
17
16
|
})
|
|
18
17
|
});
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
21
|
-
return localStorage.setItem("access_token",
|
|
18
|
+
if (i.ok) {
|
|
19
|
+
const r = await i.json(), a = r.access_token, m = r.refresh_token;
|
|
20
|
+
return localStorage.setItem("access_token", a), localStorage.setItem("refresh_token", m), !0;
|
|
22
21
|
} else
|
|
23
22
|
throw new Error("Error al refrescar token de Microsoft");
|
|
24
23
|
};
|
|
25
|
-
return
|
|
26
|
-
const
|
|
24
|
+
return v(() => {
|
|
25
|
+
const h = async () => {
|
|
27
26
|
try {
|
|
28
27
|
if (localStorage.getItem("access_token")) {
|
|
29
28
|
const r = localStorage.getItem("auth_state");
|
|
30
29
|
if (r) {
|
|
31
|
-
const
|
|
30
|
+
const m = JSON.parse(r).user.servicios.map((e) => e.url).filter((e) => !!e), n = k.pathname, c = m.map(
|
|
32
31
|
(e) => e.startsWith("/") ? e : `/${e}`
|
|
33
|
-
), f =
|
|
32
|
+
), f = n.startsWith("/") ? n : `/${n}`;
|
|
34
33
|
c.some(
|
|
35
34
|
(e) => f.startsWith(e)
|
|
36
|
-
) ? o(!0) : (
|
|
35
|
+
) ? o(!0) : (u.warn("No hay match con los roles del usuario"), o(!1), sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href = s);
|
|
37
36
|
} else
|
|
38
|
-
o(!1), sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href =
|
|
37
|
+
o(!1), sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href = s;
|
|
39
38
|
} else
|
|
40
39
|
throw new Error("Token inválido");
|
|
41
40
|
} catch {
|
|
42
41
|
try {
|
|
43
|
-
if (await
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
const
|
|
42
|
+
if (await S()) {
|
|
43
|
+
const a = localStorage.getItem("auth_state");
|
|
44
|
+
if (a) {
|
|
45
|
+
const n = JSON.parse(a).user.servicios.map((t) => t.url).filter((t) => !!t), c = k.pathname, f = n.map(
|
|
47
46
|
(t) => t.startsWith("/") ? t : `/${t}`
|
|
48
47
|
), d = c.startsWith("/") ? c : `/${c}`;
|
|
49
48
|
f.some(
|
|
50
49
|
(t) => d.startsWith(t)
|
|
51
|
-
) ? o(!0) : (o(!1), sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href =
|
|
50
|
+
) ? o(!0) : (o(!1), sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href = s);
|
|
52
51
|
} else
|
|
53
|
-
o(!1), sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href =
|
|
52
|
+
o(!1), sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href = s;
|
|
54
53
|
} else
|
|
55
54
|
throw new Error("No se pudo refrescar el token.");
|
|
56
55
|
} catch {
|
|
57
|
-
sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href =
|
|
56
|
+
sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href = s, o(!1);
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
};
|
|
61
|
-
l.includes("ecosistemadesarrollo") || l.includes("ecosistemapruebas") || l.includes("ecosistemaprov") || l.includes("ecosistema") ?
|
|
62
|
-
}, []),
|
|
60
|
+
l.includes("ecosistemadesarrollo") || l.includes("ecosistemapruebas") || l.includes("ecosistemaprov") || l.includes("ecosistema") ? h() : (u.warn("ProtectedRoute is disabled in the local development environment."), o(!0));
|
|
61
|
+
}, []), g ? /* @__PURE__ */ _(p, {}) : null;
|
|
63
62
|
};
|
|
64
63
|
export {
|
|
65
64
|
E as ProtectedRoute
|
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as h, useEffect as
|
|
3
|
-
import { useNavigate as
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const s = await u.getFingerprint(), r = localStorage.getItem("refresh_token"), o = await fetch(`${t}api-auth/auth/refresh_token/`, {
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useEffect as m } from "react";
|
|
3
|
+
import { useNavigate as k, Outlet as d } from "react-router-dom";
|
|
4
|
+
const S = () => {
|
|
5
|
+
const [n, e] = h(!1), c = k(), t = `${window.location.protocol}//${window.location.host}/`, l = async () => {
|
|
6
|
+
const a = localStorage.getItem("refresh_token"), o = await fetch(`${t}api-auth/auth/refresh_token/`, {
|
|
8
7
|
method: "POST",
|
|
9
8
|
headers: {
|
|
10
|
-
"Content-Type": "application/json"
|
|
11
|
-
"X-Fingerprint": s
|
|
9
|
+
"Content-Type": "application/json"
|
|
12
10
|
},
|
|
13
11
|
credentials: "include",
|
|
14
12
|
body: JSON.stringify({
|
|
15
|
-
refresh:
|
|
13
|
+
refresh: a
|
|
16
14
|
})
|
|
17
15
|
});
|
|
18
16
|
if (o.ok) {
|
|
19
|
-
const
|
|
20
|
-
return localStorage.setItem("access_token",
|
|
17
|
+
const r = await o.json(), s = r.access_token, i = r.refresh_token;
|
|
18
|
+
return localStorage.setItem("access_token", s), localStorage.setItem("refresh_token", i), !0;
|
|
21
19
|
} else
|
|
22
20
|
throw new Error("Error al refrescar token de Microsoft");
|
|
23
21
|
};
|
|
24
|
-
return
|
|
22
|
+
return m(() => {
|
|
25
23
|
(async () => {
|
|
26
24
|
try {
|
|
27
25
|
if (localStorage.getItem("access_token"))
|
|
28
26
|
e(!0);
|
|
29
27
|
else
|
|
30
28
|
try {
|
|
31
|
-
if (await
|
|
29
|
+
if (await l())
|
|
32
30
|
(await fetch(
|
|
33
31
|
`${t}api-auth/auth/validate_jwt/`,
|
|
34
32
|
{
|
|
@@ -48,8 +46,8 @@ const _ = () => {
|
|
|
48
46
|
sessionStorage.removeItem("user_token"), localStorage.removeItem("auth_state"), localStorage.removeItem("access_token"), localStorage.removeItem("refresh_token"), window.location.href = t, e(!1);
|
|
49
47
|
}
|
|
50
48
|
})();
|
|
51
|
-
}, [c]), n ? /* @__PURE__ */
|
|
49
|
+
}, [c]), n ? /* @__PURE__ */ f(d, {}) : null;
|
|
52
50
|
};
|
|
53
51
|
export {
|
|
54
|
-
|
|
52
|
+
S as UserRoute
|
|
55
53
|
};
|