react-ecosistema-unp 2.0.1 → 2.2.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.
Files changed (69) hide show
  1. package/dist/{AppList-BshxZhoN.js → AppList-DORGpC4I.js} +84 -84
  2. package/dist/assets/DocumentoVisorEstado.css +1 -0
  3. package/dist/assets/EcoDataTable.css +1 -1
  4. package/dist/assets/EcoDataTableBandejaFooter.css +1 -1
  5. package/dist/assets/EcoModalStyles.css +1 -1
  6. package/dist/assets/SileoNotifications.css +1 -1
  7. package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +1 -1
  8. package/dist/cards/tarjeta-info/TarjetaInfo.js +1 -1
  9. package/dist/data/tarjeta-datos/TarjetaDatos.js +1 -1
  10. package/dist/{index-C4MBu_wk.js → index-B96iRUpt.js} +38 -34
  11. package/dist/{index-h-TtOxhs.js → index-BqaJxgOF.js} +182 -170
  12. package/dist/{SileoNotifications-BESOBARG.js → index-C1R4rkuA.js} +1 -1
  13. package/dist/lib/tables/custom-data-table/CustomDataTable.d.ts +2 -0
  14. package/dist/lib/tables/custom-data-table-split/CustomDataTableSplit.d.ts +7 -3
  15. package/dist/lib/tables/eco-data-table/components/EcoDataTable/EcoDataTable.d.ts +1 -1
  16. package/dist/lib/tables/eco-data-table/components/EcoDataTableBandejaFooter.d.ts +8 -1
  17. package/dist/lib/tables/eco-data-table/hooks/useEcoTableSelection.d.ts +1 -0
  18. package/dist/lib/tables/eco-data-table/types.d.ts +7 -0
  19. package/dist/lib/ui/animacion/Animacion.d.ts +1 -0
  20. package/dist/lib/ui.d.ts +1 -0
  21. package/dist/lib/utils/eco-provider/EcoContext.d.ts +4 -2
  22. package/dist/lib/utils/modal-radicados/DocumentoVisorEstado.d.ts +18 -0
  23. package/dist/lib/utils/modal-radicados/ModalDocumento.d.ts +26 -0
  24. package/dist/lib/utils/modal-radicados/VisorDocumento.d.ts +8 -0
  25. package/dist/lib/utils/notifications/EcoToaster.d.ts +18 -0
  26. package/dist/lib/utils/notifications/SileoNotifications.d.ts +23 -7
  27. package/dist/lib/utils.d.ts +2 -1
  28. package/dist/shared/app-list/AppList.js +2 -2
  29. package/dist/shared/iconos-sistema/IconosSistema.js +1 -1
  30. package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
  31. package/dist/shared/menu-lateral/MenuLateral.js +6 -4
  32. package/dist/shared/notificacion-usuario/NotificacionUsuario.js +61 -59
  33. package/dist/shared/ventana-tabs/VentanaTabs.js +1 -1
  34. package/dist/tables/custom-data-table/CustomDataTable.js +551 -548
  35. package/dist/tables/custom-data-table-split/CustomDataTableSplit.js +186 -173
  36. package/dist/tables/custom-table-toolbar/CustomTableToolbar.js +1 -1
  37. package/dist/tables/eco-data-table/components/EcoDataTable/EcoDataTable.js +190 -149
  38. package/dist/tables/eco-data-table/components/EcoDataTableBandejaFooter.js +36 -26
  39. package/dist/tables/eco-data-table/hooks/useEcoTableSelection.js +9 -8
  40. package/dist/tables/tabla-registros/buscador/Buscador.js +1 -1
  41. package/dist/tables/tabla-registros/modal-v2/EcoModal.js +11 -11
  42. package/dist/tables/tabla-registros/tabla/Tabla.js +22 -22
  43. package/dist/ui/alertas/AlertaFormulario.js +1 -1
  44. package/dist/ui/card-gestion-lateral/CardGestionLateral.js +1 -1
  45. package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
  46. package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
  47. package/dist/ui/contenido-modal-v2/ContenidoModalV2.js +1 -1
  48. package/dist/ui/contenido-modal-v2/ModalV2Menu.js +1 -1
  49. package/dist/ui/datos-basicos-card/DatosBasicosCard.js +1 -1
  50. package/dist/ui/icono-tooltip/IconoTooltip.js +10 -10
  51. package/dist/ui/items-modal/ItemsModal.js +1 -1
  52. package/dist/ui/nav-formularios-lateral/NavFormulariosLateral.js +1 -1
  53. package/dist/ui/notificacion-popover-v2/NotificacionPopoverV2.js +50 -50
  54. package/dist/ui/resumen-evaluacion/ResumenEvaluacion.js +5 -5
  55. package/dist/ui/status-filter-bar/StatusFilterBar.js +8 -8
  56. package/dist/ui/status-semaphore/StatusSemaphore.js +1 -1
  57. package/dist/ui/stepper-v2/StepperV2.js +1 -1
  58. package/dist/utils/eco-provider/EcoContext.js +11 -8
  59. package/dist/utils/modal-radicados/AuxRadicadosComponents/TarjetaRadicado.js +12 -12
  60. package/dist/utils/modal-radicados/DocumentoVisorEstado.js +125 -0
  61. package/dist/utils/modal-radicados/ModalDocumento.js +155 -170
  62. package/dist/utils/modal-radicados/ModalRadicado.js +34 -34
  63. package/dist/utils/modal-radicados/VisorDocumento.js +61 -61
  64. package/dist/utils/notifications/EcoToaster.js +48 -0
  65. package/dist/utils/notifications/SileoNotifications.js +62 -55
  66. package/dist/utils/unp-historico/UnpHistorico.js +1 -1
  67. package/dist/utils/websocket-manager/websocket.js +22 -18
  68. package/dist/utils.js +29 -24
  69. package/package.json +1 -1
@@ -1,79 +1,79 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { useState as i, useEffect as w } from "react";
3
- import { ModalDocumento as U } from "./ModalDocumento.js";
4
- import '../../assets/SmartTextArea.css';import '../../assets/EcoFooter.css';import '../../assets/ResumenEvaluacion.css';import '../../assets/AlertaFormulario.css';import '../../assets/SeccionFormulario.css';import '../../assets/NotificacionPopoverV2.css';import '../../assets/CardGestionLateral.css';import '../../assets/NavFormulariosLateral.css';import '../../assets/DatosBasicosCard.css';import '../../assets/StatusFilterBar.css';import '../../assets/PaginadorV2.css';import '../../assets/StatusSemaphore.css';import '../../assets/TableSkeleton.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/TarjetaLectura.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/EcoModalStyles.css';import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/StepperV2.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModalV2.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/Logo.css';/* empty css */
5
- /* empty css */
6
- import "../../ui/subtitulo/Subtitulo.js";
7
- /* empty css */
8
- /* empty css */
9
- /* empty css */
10
- /* empty css */
11
- import "react-router-dom";
12
- /* empty css */
13
- /* empty css */
14
- /* empty css */
15
- /* empty css */
16
- import "../../index-DdZBtIJj.js";
17
- /* empty css */
18
- import { Animacion as y } from "../../ui/animacion/Animacion.js";
19
- /* empty css */
20
- /* empty css */
21
- import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
22
- /* empty css */
23
- /* empty css */
24
- /* empty css */
25
- /* empty css */
26
- /* empty css */
27
- /* empty css */
28
- /* empty css */
29
- /* empty css */
30
- /* empty css */
31
- /* empty css */
32
- /* empty css */
33
- /* empty css */
34
- /* empty css */
35
- /* empty css */
36
- /* empty css */
37
- import { getUserToken as L } from "../../auth/services/User.js";
38
- const no = ({
39
- idDocumento: t,
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { useState as r, useCallback as T, useEffect as j } from "react";
3
+ import { ModalDocumento as i } from "./ModalDocumento.js";
4
+ import { getUserToken as E } from "../../auth/services/User.js";
5
+ const S = ({
6
+ idDocumento: o,
40
7
  nombre: s,
41
- allowDownloadButton: u = !0
8
+ allowDownloadButton: b = !0,
9
+ viewOnly: a = !1,
10
+ animationType: c = "loading_duck"
42
11
  }) => {
43
- const [n, p] = i(null), [f, d] = i(""), [b, a] = i(!1), [c, l] = i(null);
44
- return w(() => {
45
- if (!t) return;
46
- let r = null;
47
- return a(!0), l(null), p(null), (async () => {
12
+ const [f, d] = r(null), [U, g] = r(""), [h, m] = r(!1), [p, w] = r(null), [R, k] = r(0), L = T(() => {
13
+ k((e) => e + 1);
14
+ }, []);
15
+ return j(() => {
16
+ if (!o) return;
17
+ let e = null, n = !1;
18
+ return m(!0), w(null), d(null), (async () => {
48
19
  try {
49
- const o = `${window.location.protocol}//${window.location.host}/api-gateway/documento/descargar-anexo/${encodeURIComponent(t)}`, e = await fetch(o, {
20
+ const t = `${window.location.protocol}//${window.location.host}/api-gateway/documento/descargar-anexo/${encodeURIComponent(o)}`, l = await fetch(t, {
50
21
  headers: {
51
- Authorization: `Bearer ${L()}`,
22
+ Authorization: `Bearer ${E()}`,
52
23
  "BK-Service": "api-doc"
53
24
  }
54
25
  });
55
- if (!e.ok) throw new Error(`Error al obtener el documento: ${e.status}`);
56
- const g = e.headers.get("Content-Type") || "", h = await e.blob();
57
- r = URL.createObjectURL(h), d(g), p(r);
58
- } catch (o) {
59
- l((o == null ? void 0 : o.message) ?? "No se pudo cargar el documento.");
26
+ if (!l.ok) throw new Error(`Error al obtener el documento: ${l.status}`);
27
+ const y = l.headers.get("Content-Type") || "", B = await l.blob();
28
+ if (e = URL.createObjectURL(B), n) {
29
+ URL.revokeObjectURL(e);
30
+ return;
31
+ }
32
+ g(y), d(e);
33
+ } catch (t) {
34
+ n || w((t == null ? void 0 : t.message) ?? "No se pudo cargar el documento.");
60
35
  } finally {
61
- a(!1);
36
+ n || m(!1);
62
37
  }
63
38
  })(), () => {
64
- r && URL.revokeObjectURL(r);
39
+ n = !0, e && URL.revokeObjectURL(e);
65
40
  };
66
- }, [t]), b ? /* @__PURE__ */ m(y, { type: "loading_duck" }) : c ? /* @__PURE__ */ m("p", { className: "text-danger mb-0", children: c }) : n ? /* @__PURE__ */ m(
67
- U,
41
+ }, [o, R]), h ? /* @__PURE__ */ u(
42
+ i,
68
43
  {
69
44
  data: "",
70
- mimeType: f,
71
- name: s ?? t,
72
- blobUrl: n,
73
- allowDownloadButton: u
45
+ mimeType: "",
46
+ name: s ?? o,
47
+ isLoading: !0,
48
+ allowDownloadButton: !1,
49
+ viewOnly: a,
50
+ animationType: c
51
+ }
52
+ ) : p ? /* @__PURE__ */ u(
53
+ i,
54
+ {
55
+ data: "",
56
+ mimeType: "",
57
+ name: s ?? o,
58
+ loadError: p,
59
+ onRetry: L,
60
+ allowDownloadButton: !1,
61
+ viewOnly: a,
62
+ animationType: c
63
+ }
64
+ ) : f ? /* @__PURE__ */ u(
65
+ i,
66
+ {
67
+ data: "",
68
+ mimeType: U,
69
+ name: s ?? o,
70
+ blobUrl: f,
71
+ allowDownloadButton: b && !a,
72
+ viewOnly: a,
73
+ animationType: c
74
74
  }
75
75
  ) : null;
76
76
  };
77
77
  export {
78
- no as VisorDocumento
78
+ S as VisorDocumento
79
79
  };
@@ -0,0 +1,48 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { useId as l, useSyncExternalStore as a, useEffect as u } from "react";
3
+ import { r as m } from "../../index-DdZBtIJj.js";
4
+ import { T as d } from "../../index-C1R4rkuA.js";
5
+ const i = [], f = /* @__PURE__ */ new Set();
6
+ function s() {
7
+ f.forEach((e) => {
8
+ try {
9
+ e();
10
+ } catch {
11
+ }
12
+ });
13
+ }
14
+ function g(e, t, n) {
15
+ const r = i.find((o) => o.id === e);
16
+ r ? (r.isDefault = t, r.props = n) : i.push({ id: e, isDefault: t, props: n }), s();
17
+ }
18
+ function y(e) {
19
+ const t = i.findIndex((n) => n.id === e);
20
+ t !== -1 && (i.splice(t, 1), s());
21
+ }
22
+ function x(e, t) {
23
+ const n = i.find((r) => r.id === e);
24
+ n && (n.props = t, s());
25
+ }
26
+ function h() {
27
+ if (i.length === 0) return null;
28
+ const e = i.filter((t) => !t.isDefault);
29
+ return e.length > 0 ? e[e.length - 1].id : i[0].id;
30
+ }
31
+ const b = ({ isDefault: e = !1, ...t }) => {
32
+ const n = l(), r = a(
33
+ (o) => (f.add(o), () => {
34
+ f.delete(o);
35
+ }),
36
+ () => h(),
37
+ () => null
38
+ );
39
+ return u(() => (g(n, e, t), () => {
40
+ y(n);
41
+ }), [n, e]), u(() => {
42
+ x(n, t);
43
+ }, [n, t.theme, t.position, JSON.stringify(t.offset), JSON.stringify(t.options)]), r !== n ? null : typeof document < "u" ? m.createPortal(/* @__PURE__ */ c(d, { ...t }), document.body) : /* @__PURE__ */ c(d, { ...t });
44
+ };
45
+ export {
46
+ b as Toaster,
47
+ b as default
48
+ };
@@ -1,71 +1,78 @@
1
- import { jsxs as b, jsx as r } from "react/jsx-runtime";
2
- import { s as n } from "../../SileoNotifications-BESOBARG.js";
3
- const s = (o) => {
4
- const t = o ? o.toString() : "2147483647";
5
- document.documentElement.style.setProperty("--sileo-z-index", t);
6
- }, g = (o, t = "Éxito", i) => {
7
- s(i), n.success({ title: t, description: o, position: "top-right" });
8
- }, E = (o, t = "Error", i) => {
9
- s(i), n.error({ title: t, description: o, position: "bottom-center" });
10
- }, N = (o, t = "Procesando...", i) => (s(i), n.show({
11
- title: t,
1
+ import { jsxs as _, jsx as u } from "react/jsx-runtime";
2
+ import '../../assets/SileoNotifications.css';/* empty css */
3
+ import { s as i } from "../../index-C1R4rkuA.js";
4
+ const g = 2147483647, m = 3500, A = 6e3, x = 150, l = {
5
+ exito: "#F0FDF4",
6
+ // Fondo Éxito (Verde Pastel)
7
+ error: "#FEF2F2",
8
+ // Fondo Error (Rojo Pastel)
9
+ aviso: "#FFFBEB",
10
+ // Fondo Advertencia (Ámbar Pastel)
11
+ info: "#EFF6FF",
12
+ // Fondo Información (Azul Pastel)
13
+ cargando: "#F9FAFB",
14
+ // Fondo Neutral / Cargando (Gris Pastel)
15
+ accion: "#F5F3FF"
16
+ // Fondo Acción (Morado Pastel)
17
+ }, a = (o) => {
18
+ const e = (o ?? g).toString();
19
+ document.documentElement.style.setProperty("--sileo-z-index", e);
20
+ }, h = (o, e = "Éxito", t) => (a(t), i.success({ title: e, description: o, position: "top-right", duration: m, fill: l.exito })), T = (o, e = "Error", t) => (a(t), i.error({ title: e, description: o, position: "bottom-center", fill: l.error })), y = (o, e = "Procesando...", t) => (a(t), i.show({
21
+ type: "loading",
22
+ title: e,
12
23
  description: o,
13
- icon: /* @__PURE__ */ r("div", { className: "eco-sileo-loading-spinner" }),
24
+ icon: /* @__PURE__ */ u("div", { className: "sileo-loading-spinner eco-sileo-loading-spinner" }),
14
25
  position: "bottom-center",
15
- duration: 0
16
- })), j = (o, t = "Atención", i, e) => {
17
- s(e), n.warning({ title: t, description: o, position: "top-center", duration: i });
18
- }, w = (o, t = "Información", i, e) => {
19
- s(e), n.info({ title: t, description: o, position: "top-center", duration: i });
20
- }, y = () => {
21
- n.clear();
22
- }, A = (o, t, i = {}, e) => {
23
- let c = {};
24
- typeof i == "function" ? c = { onConfirm: i, onCancel: e, showCancel: !!e } : c = i;
25
- const {
26
- labelConfirm: d = "Enviar",
27
- labelCancel: p = "Ajustar",
28
- onConfirm: f = () => {
29
- },
30
- onCancel: m = () => {
31
- },
32
- showCancel: u = !0,
33
- zIndex: C,
34
- position: x = "top-center"
35
- } = c;
36
- s(C);
37
- const a = n.action({
26
+ duration: 0,
27
+ fill: l.cargando
28
+ })), w = (o, e = "Atención", t = A, n) => (a(n), i.warning({ title: e, description: o, position: "top-center", duration: t, fill: l.aviso })), U = (o, e = "Información", t = A, n) => (a(n), i.info({ title: e, description: o, position: "top-center", duration: t, fill: l.info })), j = () => {
29
+ i.clear();
30
+ }, b = (o) => {
31
+ typeof i.dismiss == "function" ? i.dismiss(o) : i.clear();
32
+ }, z = (o, e, t, n, I, v, D) => {
33
+ let r = () => {
34
+ }, d = () => {
35
+ }, f = I || "Si, tomar caso", C = v || "Cancelar", F = !0, p = D, E = "top-center";
36
+ typeof t == "function" ? (r = t, n && (d = n)) : t && typeof t == "object" && (t.onConfirm && (r = t.onConfirm), t.onCancel && (d = t.onCancel), t.labelConfirm && (f = t.labelConfirm), t.labelCancel && (C = t.labelCancel), t.showCancel !== void 0 && (F = t.showCancel), t.zIndex !== void 0 && (p = t.zIndex), t.position && (E = t.position)), a(p);
37
+ let s;
38
+ return s = i.action({
38
39
  title: o,
39
- description: /* @__PURE__ */ b("div", { className: "eco-sileo-action-stack", children: [
40
- /* @__PURE__ */ r("p", { className: "eco-sileo-action-text", children: t }),
41
- u && /* @__PURE__ */ r(
42
- "div",
40
+ fill: l.accion,
41
+ description: /* @__PURE__ */ _("div", { className: "sileo-action-stack eco-sileo-action-stack", children: [
42
+ e ? /* @__PURE__ */ u("div", { className: "sileo-action-text eco-sileo-action-text", children: e }) : null,
43
+ F && /* @__PURE__ */ u(
44
+ "button",
43
45
  {
44
- className: "eco-sileo-btn-ajustar",
45
- role: "button",
46
- onClick: (l) => {
47
- l.preventDefault(), l.stopPropagation(), typeof n.dismiss == "function" ? n.dismiss(a) : n.clear(), setTimeout(() => m(), 150);
46
+ type: "button",
47
+ className: "sileo-btn-ajustar eco-sileo-btn-ajustar",
48
+ style: { pointerEvents: "auto", position: "relative", zIndex: 50 },
49
+ onPointerDown: (c) => c.stopPropagation(),
50
+ onClick: (c) => {
51
+ c.preventDefault(), c.stopPropagation(), b(s), setTimeout(() => d(), x);
48
52
  },
49
- children: p
53
+ children: C
50
54
  }
51
55
  )
52
56
  ] }),
53
- position: x,
57
+ position: E,
54
58
  duration: null,
55
59
  button: {
56
- title: d,
60
+ title: f,
57
61
  onClick: () => {
58
- typeof n.dismiss == "function" ? n.dismiss(a) : n.clear(), setTimeout(() => f(), 150);
62
+ b(s), setTimeout(() => r(), x);
59
63
  }
60
64
  }
61
- });
65
+ }), s;
62
66
  };
63
67
  export {
64
- y as limpiarNotificaciones,
65
- A as notificarAccion,
66
- j as notificarAviso,
67
- N as notificarCargando,
68
- E as notificarError,
69
- g as notificarExito,
70
- w as notificarInfo
68
+ l as COLOR_FILLS,
69
+ b as cerrarNotificacion,
70
+ j as limpiarNotificaciones,
71
+ z as notificarAccion,
72
+ w as notificarAviso,
73
+ y as notificarCargando,
74
+ T as notificarError,
75
+ h as notificarExito,
76
+ U as notificarInfo,
77
+ a as setSileoZIndex
71
78
  };
@@ -9,7 +9,7 @@ import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import { TarjetaInfo as b } from "../../cards/tarjeta-info/TarjetaInfo.js";
12
- import { F as u } from "../../index-C4MBu_wk.js";
12
+ import { F as u } from "../../index-B96iRUpt.js";
13
13
  import { fetchHistorico as f } from "./FetchHistorico.js";
14
14
  /* empty css */
15
15
  import "../../ui/subtitulo/Subtitulo.js";
@@ -1,8 +1,8 @@
1
1
  var u = Object.defineProperty;
2
- var k = (n, t, e) => t in n ? u(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var r = (n, t, e) => k(n, typeof t != "symbol" ? t + "" : t, e);
4
- const i = [3e3, 3e4, 18e4];
5
- class S {
2
+ var S = (c, t, e) => t in c ? u(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
3
+ var r = (c, t, e) => S(c, typeof t != "symbol" ? t + "" : t, e);
4
+ const a = [3e3, 3e4, 18e4];
5
+ class d {
6
6
  constructor() {
7
7
  r(this, "sockets", /* @__PURE__ */ new Map());
8
8
  r(this, "statusCallbacks", []);
@@ -43,10 +43,10 @@ class S {
43
43
  const s = new WebSocket(t);
44
44
  e.socket = s, s.onopen = () => {
45
45
  console.log(`✅ WebSocket conectado a ${t}`), this.setSocketStatus(t, "connected"), e.reconnectTimer && clearTimeout(e.reconnectTimer), e.reconnectTimer = null, e.retryCount = 0;
46
- }, s.onmessage = (c) => {
46
+ }, s.onmessage = (n) => {
47
47
  try {
48
- const o = JSON.parse(c.data);
49
- e == null || e.messageHandlers.forEach((a) => a(o));
48
+ const o = JSON.parse(n.data);
49
+ e == null || e.messageHandlers.forEach((i) => i(o));
50
50
  } catch (o) {
51
51
  console.error("❌ Error parseando mensaje WebSocket", o);
52
52
  }
@@ -55,16 +55,20 @@ class S {
55
55
  this.setSocketStatus(t, "disconnected");
56
56
  return;
57
57
  }
58
- if (e.retryCount >= i.length) {
58
+ if (typeof document < "u" && document.hidden) {
59
+ console.warn(`🔌 WebSocket: la pestaña está inactiva. Se pausan reintentos para ${t}`), this.setSocketStatus(t, "disconnected");
60
+ return;
61
+ }
62
+ if (e.retryCount >= a.length) {
59
63
  console.warn(`🔌 WebSocket: se agotaron los reintentos para ${t}`), e.shouldReconnect = !1, this.setSocketStatus(t, "disconnected");
60
64
  return;
61
65
  }
62
- const c = i[e.retryCount];
63
- e.retryCount++, console.warn(`🔌 WebSocket cerrado para ${t}. Reintentando en ${c / 1e3}s (intento ${e.retryCount}/${i.length})...`), this.setSocketStatus(t, "connecting"), e.reconnectTimer || (e.reconnectTimer = setTimeout(() => {
66
+ const n = a[e.retryCount];
67
+ e.retryCount++, console.warn(`🔌 WebSocket cerrado para ${t}. Reintentando en ${n / 1e3}s (intento ${e.retryCount}/${a.length})...`), this.setSocketStatus(t, "connecting"), e.reconnectTimer || (e.reconnectTimer = setTimeout(() => {
64
68
  e.reconnectTimer = null, e.shouldReconnect && this.connect(t);
65
- }, c));
66
- }, s.onerror = (c) => {
67
- console.error("⚠️ WebSocket error:", c), this.setSocketStatus(t, "disconnected"), s.close();
69
+ }, n));
70
+ }, s.onerror = (n) => {
71
+ console.error("⚠️ WebSocket error:", n), this.setSocketStatus(t, "disconnected"), s.close();
68
72
  };
69
73
  }
70
74
  disconnect(t) {
@@ -79,13 +83,13 @@ class S {
79
83
  send(t, e) {
80
84
  var s;
81
85
  if (e) {
82
- const c = this.sockets.get(e);
83
- ((s = c == null ? void 0 : c.socket) == null ? void 0 : s.readyState) === WebSocket.OPEN && c.socket.send(JSON.stringify(t));
86
+ const n = this.sockets.get(e);
87
+ ((s = n == null ? void 0 : n.socket) == null ? void 0 : s.readyState) === WebSocket.OPEN && n.socket.send(JSON.stringify(t));
84
88
  return;
85
89
  }
86
- this.sockets.forEach((c) => {
90
+ this.sockets.forEach((n) => {
87
91
  var o;
88
- ((o = c.socket) == null ? void 0 : o.readyState) === WebSocket.OPEN && c.socket.send(JSON.stringify(t));
92
+ ((o = n.socket) == null ? void 0 : o.readyState) === WebSocket.OPEN && n.socket.send(JSON.stringify(t));
89
93
  });
90
94
  }
91
95
  subscribe(t, e) {
@@ -96,7 +100,7 @@ class S {
96
100
  s == null || s.messageHandlers.delete(e);
97
101
  }
98
102
  }
99
- const h = new S();
103
+ const h = new d();
100
104
  export {
101
105
  h as webSocketService
102
106
  };
package/dist/utils.js CHANGED
@@ -1,38 +1,43 @@
1
1
  import { formatDate as t } from "./utils/formatters/dateFormatter.js";
2
2
  import { IsInvalidStyles as i, useFormValidation as a } from "./utils/validations/useFormValidation.js";
3
- import { CaptchaEcosistema as c } from "./utils/captcha/CaptchaEcosistema.js";
3
+ import { CaptchaEcosistema as f } from "./utils/captcha/CaptchaEcosistema.js";
4
4
  import { useFetchData as n } from "./utils/fetch-data/useFetchData.js";
5
5
  import { WebSocketProvider as x, useWebSocketConnection as s } from "./utils/websocket-manager/WebSocketContext.js";
6
6
  import { useWebSocket as u } from "./utils/websocket-manager/useWebSocket.js";
7
- import { ModalRadicado as v } from "./utils/modal-radicados/ModalRadicado.js";
7
+ import { ModalRadicado as S } from "./utils/modal-radicados/ModalRadicado.js";
8
8
  import { ModalDocumento as E } from "./utils/modal-radicados/ModalDocumento.js";
9
- import { limpiarNotificaciones as b, notificarAccion as k, notificarAviso as C, notificarCargando as I, notificarError as P, notificarExito as R, notificarInfo as W } from "./utils/notifications/SileoNotifications.js";
10
- import { T as A } from "./SileoNotifications-BESOBARG.js";
11
- import { EcoProvider as M } from "./utils/eco-provider/EcoContext.js";
12
- import { ProtectedRoute as U } from "./utils/components/ProtectedRoute.js";
13
- import { UserRoute as g } from "./utils/components/UserRoute.js";
14
- import { UnpHistorico as H } from "./utils/unp-historico/UnpHistorico.js";
15
- import { VisorDocumento as j } from "./utils/modal-radicados/VisorDocumento.js";
9
+ import { DocumentoVisorEstado as v } from "./utils/modal-radicados/DocumentoVisorEstado.js";
10
+ import { COLOR_FILLS as R, cerrarNotificacion as b, limpiarNotificaciones as k, notificarAccion as F, notificarAviso as L, notificarCargando as P, notificarError as V, notificarExito as W, notificarInfo as h, setSileoZIndex as A } from "./utils/notifications/SileoNotifications.js";
11
+ import { Toaster as N } from "./utils/notifications/EcoToaster.js";
12
+ import { EcoProvider as U } from "./utils/eco-provider/EcoContext.js";
13
+ import { ProtectedRoute as y } from "./utils/components/ProtectedRoute.js";
14
+ import { UserRoute as T } from "./utils/components/UserRoute.js";
15
+ import { UnpHistorico as _ } from "./utils/unp-historico/UnpHistorico.js";
16
+ import { VisorDocumento as q } from "./utils/modal-radicados/VisorDocumento.js";
16
17
  export {
17
- c as CaptchaEcosistema,
18
- M as EcoProvider,
18
+ R as COLOR_FILLS,
19
+ f as CaptchaEcosistema,
20
+ v as DocumentoVisorEstado,
21
+ U as EcoProvider,
19
22
  i as IsInvalidStyles,
20
23
  E as ModalDocumento,
21
- v as ModalRadicado,
22
- U as ProtectedRoute,
23
- A as Toaster,
24
- H as UnpHistorico,
25
- g as UserRoute,
26
- j as VisorDocumento,
24
+ S as ModalRadicado,
25
+ y as ProtectedRoute,
26
+ N as Toaster,
27
+ _ as UnpHistorico,
28
+ T as UserRoute,
29
+ q as VisorDocumento,
27
30
  x as WebSocketProvider,
31
+ b as cerrarNotificacion,
28
32
  t as formatDate,
29
- b as limpiarNotificaciones,
30
- k as notificarAccion,
31
- C as notificarAviso,
32
- I as notificarCargando,
33
- P as notificarError,
34
- R as notificarExito,
35
- W as notificarInfo,
33
+ k as limpiarNotificaciones,
34
+ F as notificarAccion,
35
+ L as notificarAviso,
36
+ P as notificarCargando,
37
+ V as notificarError,
38
+ W as notificarExito,
39
+ h as notificarInfo,
40
+ A as setSileoZIndex,
36
41
  n as useFetchData,
37
42
  a as useFormValidation,
38
43
  u as useWebSocket,
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": "2.0.1",
5
+ "version": "2.2.0",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {