react-ecosistema-unp 2.1.0 → 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 (62) 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/SileoNotifications.css +1 -1
  6. package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +1 -1
  7. package/dist/cards/tarjeta-info/TarjetaInfo.js +1 -1
  8. package/dist/data/tarjeta-datos/TarjetaDatos.js +1 -1
  9. package/dist/{index-C4MBu_wk.js → index-B96iRUpt.js} +38 -34
  10. package/dist/{index-h-TtOxhs.js → index-BqaJxgOF.js} +182 -170
  11. package/dist/lib/tables/custom-data-table/CustomDataTable.d.ts +2 -0
  12. package/dist/lib/tables/custom-data-table-split/CustomDataTableSplit.d.ts +3 -1
  13. package/dist/lib/tables/eco-data-table/components/EcoDataTable/EcoDataTable.d.ts +1 -1
  14. package/dist/lib/tables/eco-data-table/components/EcoDataTableBandejaFooter.d.ts +8 -1
  15. package/dist/lib/tables/eco-data-table/hooks/useEcoTableSelection.d.ts +1 -0
  16. package/dist/lib/tables/eco-data-table/types.d.ts +7 -0
  17. package/dist/lib/ui/animacion/Animacion.d.ts +1 -0
  18. package/dist/lib/ui.d.ts +1 -0
  19. package/dist/lib/utils/modal-radicados/DocumentoVisorEstado.d.ts +18 -0
  20. package/dist/lib/utils/modal-radicados/ModalDocumento.d.ts +26 -0
  21. package/dist/lib/utils/modal-radicados/VisorDocumento.d.ts +8 -0
  22. package/dist/lib/utils.d.ts +1 -0
  23. package/dist/shared/app-list/AppList.js +2 -2
  24. package/dist/shared/iconos-sistema/IconosSistema.js +1 -1
  25. package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
  26. package/dist/shared/menu-lateral/MenuLateral.js +4 -3
  27. package/dist/shared/notificacion-usuario/NotificacionUsuario.js +6 -5
  28. package/dist/shared/ventana-tabs/VentanaTabs.js +1 -1
  29. package/dist/tables/custom-data-table/CustomDataTable.js +549 -547
  30. package/dist/tables/custom-data-table-split/CustomDataTableSplit.js +68 -65
  31. package/dist/tables/custom-table-toolbar/CustomTableToolbar.js +1 -1
  32. package/dist/tables/eco-data-table/components/EcoDataTable/EcoDataTable.js +190 -149
  33. package/dist/tables/eco-data-table/components/EcoDataTableBandejaFooter.js +36 -26
  34. package/dist/tables/eco-data-table/hooks/useEcoTableSelection.js +9 -8
  35. package/dist/tables/tabla-registros/buscador/Buscador.js +1 -1
  36. package/dist/tables/tabla-registros/modal-v2/EcoModal.js +11 -11
  37. package/dist/tables/tabla-registros/tabla/Tabla.js +22 -22
  38. package/dist/ui/alertas/AlertaFormulario.js +1 -1
  39. package/dist/ui/card-gestion-lateral/CardGestionLateral.js +1 -1
  40. package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
  41. package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
  42. package/dist/ui/contenido-modal-v2/ContenidoModalV2.js +1 -1
  43. package/dist/ui/contenido-modal-v2/ModalV2Menu.js +1 -1
  44. package/dist/ui/datos-basicos-card/DatosBasicosCard.js +1 -1
  45. package/dist/ui/icono-tooltip/IconoTooltip.js +10 -10
  46. package/dist/ui/items-modal/ItemsModal.js +1 -1
  47. package/dist/ui/nav-formularios-lateral/NavFormulariosLateral.js +1 -1
  48. package/dist/ui/notificacion-popover-v2/NotificacionPopoverV2.js +50 -50
  49. package/dist/ui/resumen-evaluacion/ResumenEvaluacion.js +5 -5
  50. package/dist/ui/status-filter-bar/StatusFilterBar.js +8 -8
  51. package/dist/ui/status-semaphore/StatusSemaphore.js +1 -1
  52. package/dist/ui/stepper-v2/StepperV2.js +1 -1
  53. package/dist/utils/eco-provider/EcoContext.js +4 -3
  54. package/dist/utils/modal-radicados/AuxRadicadosComponents/TarjetaRadicado.js +12 -12
  55. package/dist/utils/modal-radicados/DocumentoVisorEstado.js +125 -0
  56. package/dist/utils/modal-radicados/ModalDocumento.js +155 -170
  57. package/dist/utils/modal-radicados/ModalRadicado.js +34 -34
  58. package/dist/utils/modal-radicados/VisorDocumento.js +61 -61
  59. package/dist/utils/notifications/EcoToaster.js +26 -25
  60. package/dist/utils/unp-historico/UnpHistorico.js +1 -1
  61. package/dist/utils.js +29 -27
  62. 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
  };
@@ -1,9 +1,10 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { useId as d, useSyncExternalStore as l, useEffect as c } from "react";
3
- import { T as a } from "../../index-C1R4rkuA.js";
4
- const i = [], s = /* @__PURE__ */ new Set();
5
- function o() {
6
- s.forEach((e) => {
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) => {
7
8
  try {
8
9
  e();
9
10
  } catch {
@@ -11,37 +12,37 @@ function o() {
11
12
  });
12
13
  }
13
14
  function g(e, t, n) {
14
- const r = i.find((f) => f.id === e);
15
- r ? (r.isDefault = t, r.props = n) : i.push({ id: e, isDefault: t, props: n }), o();
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();
16
17
  }
17
- function h(e) {
18
+ function y(e) {
18
19
  const t = i.findIndex((n) => n.id === e);
19
- t !== -1 && (i.splice(t, 1), o());
20
+ t !== -1 && (i.splice(t, 1), s());
20
21
  }
21
- function m(e, t) {
22
+ function x(e, t) {
22
23
  const n = i.find((r) => r.id === e);
23
- n && (n.props = t, o());
24
+ n && (n.props = t, s());
24
25
  }
25
- function x() {
26
+ function h() {
26
27
  if (i.length === 0) return null;
27
28
  const e = i.filter((t) => !t.isDefault);
28
29
  return e.length > 0 ? e[e.length - 1].id : i[0].id;
29
30
  }
30
- const E = ({ isDefault: e = !1, ...t }) => {
31
- const n = d(), r = l(
32
- (f) => (s.add(f), () => {
33
- s.delete(f);
31
+ const b = ({ isDefault: e = !1, ...t }) => {
32
+ const n = l(), r = a(
33
+ (o) => (f.add(o), () => {
34
+ f.delete(o);
34
35
  }),
35
- () => x(),
36
+ () => h(),
36
37
  () => null
37
38
  );
38
- return c(() => (g(n, e, t), () => {
39
- h(n);
40
- }), [n, e]), c(() => {
41
- m(n, t);
42
- }, [n, t.theme, t.position, JSON.stringify(t.offset), JSON.stringify(t.options)]), r !== n ? null : /* @__PURE__ */ u(a, { ...t });
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 });
43
44
  };
44
45
  export {
45
- E as Toaster,
46
- E as default
46
+ b as Toaster,
47
+ b as default
47
48
  };
@@ -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";
package/dist/utils.js CHANGED
@@ -1,41 +1,43 @@
1
- import { formatDate as e } from "./utils/formatters/dateFormatter.js";
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
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
7
  import { ModalRadicado as S } from "./utils/modal-radicados/ModalRadicado.js";
8
- import { ModalDocumento as v } from "./utils/modal-radicados/ModalDocumento.js";
9
- import { COLOR_FILLS as D, cerrarNotificacion as E, limpiarNotificaciones as R, notificarAccion as b, notificarAviso as k, notificarCargando as F, notificarError as L, notificarExito as P, notificarInfo as W, setSileoZIndex as h } from "./utils/notifications/SileoNotifications.js";
10
- import { Toaster as M } from "./utils/notifications/EcoToaster.js";
11
- import { EcoProvider as O } from "./utils/eco-provider/EcoContext.js";
12
- import { ProtectedRoute as V } from "./utils/components/ProtectedRoute.js";
13
- import { UserRoute as y } from "./utils/components/UserRoute.js";
14
- import { UnpHistorico as T } from "./utils/unp-historico/UnpHistorico.js";
15
- import { VisorDocumento as _ } from "./utils/modal-radicados/VisorDocumento.js";
8
+ import { ModalDocumento as E } from "./utils/modal-radicados/ModalDocumento.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
- D as COLOR_FILLS,
18
+ R as COLOR_FILLS,
18
19
  f as CaptchaEcosistema,
19
- O as EcoProvider,
20
+ v as DocumentoVisorEstado,
21
+ U as EcoProvider,
20
22
  i as IsInvalidStyles,
21
- v as ModalDocumento,
23
+ E as ModalDocumento,
22
24
  S as ModalRadicado,
23
- V as ProtectedRoute,
24
- M as Toaster,
25
- T as UnpHistorico,
26
- y as UserRoute,
27
- _ as VisorDocumento,
25
+ y as ProtectedRoute,
26
+ N as Toaster,
27
+ _ as UnpHistorico,
28
+ T as UserRoute,
29
+ q as VisorDocumento,
28
30
  x as WebSocketProvider,
29
- E as cerrarNotificacion,
30
- e as formatDate,
31
- R as limpiarNotificaciones,
32
- b as notificarAccion,
33
- k as notificarAviso,
34
- F as notificarCargando,
35
- L as notificarError,
36
- P as notificarExito,
37
- W as notificarInfo,
38
- h as setSileoZIndex,
31
+ b as cerrarNotificacion,
32
+ t as formatDate,
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,
39
41
  n as useFetchData,
40
42
  a as useFormValidation,
41
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.1.0",
5
+ "version": "2.2.0",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {