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,6 +1,6 @@
1
1
  import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import x, { useMemo as f, useState as $ } from "react";
3
- import { c as D, p as S } from "../../index-C4MBu_wk.js";
3
+ import { c as D, q as S } from "../../index-B96iRUpt.js";
4
4
  import '../../assets/ResumenEvaluacion.css';/* empty css */
5
5
  import { c as L } from "../../index-ZphT3dr_.js";
6
6
  import { T as j, t as z, g as M, s as g, a as k, E as G, b as B, c as U, d as V } from "../../TransitionWrapper-BCUEVCwA.js";
@@ -23,12 +23,12 @@ function _(c, t) {
23
23
  parseInt(g(t, n[0]), 10) + // @ts-ignore
24
24
  parseInt(g(t, n[1]), 10);
25
25
  }
26
- const P = {
26
+ const q = {
27
27
  [V]: "collapse",
28
28
  [U]: "collapsing",
29
29
  [B]: "collapsing",
30
30
  [G]: "collapse show"
31
- }, W = /* @__PURE__ */ x.forwardRef(({
31
+ }, P = /* @__PURE__ */ x.forwardRef(({
32
32
  onEnter: c,
33
33
  onEntering: t,
34
34
  onEntered: d,
@@ -75,7 +75,7 @@ const P = {
75
75
  appear: y,
76
76
  children: (a, w) => /* @__PURE__ */ x.cloneElement(o, {
77
77
  ...w,
78
- className: L(p, o.props.className, P[a], r === "width" && "collapse-horizontal")
78
+ className: L(p, o.props.className, q[a], r === "width" && "collapse-horizontal")
79
79
  })
80
80
  });
81
81
  }), Y = ({
@@ -114,7 +114,7 @@ const P = {
114
114
  ]
115
115
  }
116
116
  ),
117
- /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: m ? 5 : 4, className: "p-0 border-0", children: /* @__PURE__ */ e(W, { in: n[l.id], children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("table", { className: "w-100", style: { tableLayout: "fixed", borderCollapse: "collapse" }, children: /* @__PURE__ */ e("tbody", { children: l.items.map((s) => {
117
+ /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: m ? 5 : 4, className: "p-0 border-0", children: /* @__PURE__ */ e(P, { in: n[l.id], children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("table", { className: "w-100", style: { tableLayout: "fixed", borderCollapse: "collapse" }, children: /* @__PURE__ */ e("tbody", { children: l.items.map((s) => {
118
118
  var v;
119
119
  return /* @__PURE__ */ i("tr", { children: [
120
120
  /* @__PURE__ */ e("td", { style: { width: "25%" }, children: /* @__PURE__ */ i("div", { className: "item-title-container", children: [
@@ -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
- import { w as N, x as M, d as w, c as O, y as z, z as f, A as b, B as y, C as S, D as V, a as k } from "../../index-C4MBu_wk.js";
4
- import { x as A, a4 as B } from "../../index-h-TtOxhs.js";
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-BqaJxgOF.js";
5
5
  import { G as l } from "../../iconBase-DSKTHwal.js";
6
6
  import '../../assets/StatusFilterBar.css';/* empty css */
7
7
  function F(e) {
@@ -24,11 +24,11 @@ const v = (e, a) => {
24
24
  return a ? { icon: p, color: "#27ae60", tooltipText: "Valido analista" } : { icon: p, color: "#3085d6", tooltipText: "Valido revisor" };
25
25
  switch (e) {
26
26
  case 1:
27
- return { icon: k, color: "#1976d2", tooltipText: "OT para evaluación de riesgo" };
27
+ return { icon: V, color: "#1976d2", tooltipText: "OT para evaluación de riesgo" };
28
28
  case 2:
29
- return { icon: B, color: "#f7b731", tooltipText: "OT con ajustes de calidad" };
29
+ return { icon: A, color: "#f7b731", tooltipText: "OT con ajustes de calidad" };
30
30
  case 3:
31
- return { icon: A, color: "#e74c3c", tooltipText: "OT para inactivación" };
31
+ return { icon: k, color: "#e74c3c", tooltipText: "OT para inactivación" };
32
32
  case 4:
33
33
  return { icon: H, color: "#3cc5e7ff", tooltipText: "OT con recomendación de inactivación" };
34
34
  case 5:
@@ -38,9 +38,9 @@ const v = (e, a) => {
38
38
  case 7:
39
39
  return { icon: Z, color: "#8e44ad", tooltipText: "OT para reasignación" };
40
40
  case 8:
41
- return { icon: V, color: "#0abea0ff", tooltipText: "OT reasignada" };
41
+ return { icon: S, color: "#0abea0ff", tooltipText: "OT reasignada" };
42
42
  case 9:
43
- return { icon: S, color: "#f39c12", tooltipText: "OT con ajustes para inactivación" };
43
+ return { icon: B, color: "#f39c12", tooltipText: "OT con ajustes para inactivación" };
44
44
  case 10:
45
45
  return { icon: y, color: "#7f8c8d", tooltipText: "OT - No procede inactivación" };
46
46
  case 11:
@@ -92,7 +92,7 @@ const v = (e, a) => {
92
92
  }
93
93
  )
94
94
  ] }),
95
- u ? /* @__PURE__ */ o(w, { className: "text-muted", style: { marginLeft: "8px" } }) : /* @__PURE__ */ o(O, { className: "text-muted", style: { marginLeft: "8px" } })
95
+ u ? /* @__PURE__ */ o(O, { className: "text-muted", style: { marginLeft: "8px" } }) : /* @__PURE__ */ o(w, { className: "text-muted", style: { marginLeft: "8px" } })
96
96
  ]
97
97
  }
98
98
  ),
@@ -1,5 +1,5 @@
1
1
  import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import { H as n, I as i, J as l, K as u, L as a } from "../../index-h-TtOxhs.js";
2
+ import { K as n, L as i, M as l, N as u, O as a } from "../../index-BqaJxgOF.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 { r as z } from "../../index-h-TtOxhs.js";
3
+ import { v as z } from "../../index-BqaJxgOF.js";
4
4
  import '../../assets/StepperV2.css';/* empty css */
5
5
  import { B as m } from "../../Button-eLVX04GZ.js";
6
6
  const L = ({
@@ -3,7 +3,7 @@ import { AuthProvider as m } from "../../auth/contexts/AuthContex.js";
3
3
  import "react";
4
4
  import "../../index-Cy8qF6oY.js";
5
5
  import { WebSocketProvider as p } from "../websocket-manager/WebSocketContext.js";
6
- import '../../assets/SileoNotifications.css';import '../../assets/Trazabilidad.css';import '../../assets/TarjetaInfo.css';import '../../assets/ContenedorTarjeta.css';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 */
6
+ import '../../assets/SileoNotifications.css';import '../../assets/Trazabilidad.css';import '../../assets/TarjetaInfo.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/DocumentoVisorEstado.css';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 */
7
7
  /* empty css */
8
8
  import "../../ui/subtitulo/Subtitulo.js";
9
9
  /* empty css */
@@ -36,6 +36,7 @@ import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
36
36
  /* empty css */
37
37
  /* empty css */
38
38
  /* empty css */
39
+ /* empty css */
39
40
  /* empty css */
40
41
  /* empty css */
41
42
  /* empty css */
@@ -43,10 +44,10 @@ import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
43
44
  import "../../index-C1R4rkuA.js";
44
45
  import { Toaster as e } from "../notifications/EcoToaster.js";
45
46
  /* empty css */
46
- const _ = ({ children: o, showToaster: t = !0 }) => /* @__PURE__ */ r(m, { children: /* @__PURE__ */ i(p, { children: [
47
+ const $ = ({ children: o, showToaster: t = !0 }) => /* @__PURE__ */ r(m, { children: /* @__PURE__ */ i(p, { children: [
47
48
  t && /* @__PURE__ */ r(e, { isDefault: !0 }),
48
49
  o
49
50
  ] }) });
50
51
  export {
51
- _ as EcoProvider
52
+ $ as EcoProvider
52
53
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as b } from "react/jsx-runtime";
2
2
  import { useState as c, useEffect as q } from "react";
3
- import { i as A, h as E, j as I, k as P } from "../../../index-h-TtOxhs.js";
3
+ import { m as A, h as E, n as I, o as P } from "../../../index-BqaJxgOF.js";
4
4
  import { fetchDocumentosArrayRadicados as K } from "./fetchDocumentos.js";
5
5
  import { fetchMetadataProtecdoc as S } from "./fetchDocumentosProtecdoc.js";
6
6
  import { fetchTrazabilidad as z } from "./fetchTrazabilidad.js";
@@ -39,18 +39,18 @@ import { Animacion as U } from "../../../ui/animacion/Animacion.js";
39
39
  /* empty css */
40
40
  /* empty css */
41
41
  /* empty css */
42
- const $t = ({ radicado: n, onDocumentoClick: m, setView: N, setTraceData: s, setTraceLoading: l, protecdocVersion: v = "v1" }) => {
43
- const [f, u] = c([]), [p, h] = c(!1), [d, g] = c(!1), [y, x] = c(null), [i, F] = c(!1), w = `${n.numero_radicado} – ${n.fecha_asignacion}`, $ = async () => {
42
+ const $t = ({ radicado: s, onDocumentoClick: m, setView: N, setTraceData: n, setTraceLoading: l, protecdocVersion: v = "v1" }) => {
43
+ const [f, u] = c([]), [p, h] = c(!1), [d, g] = c(!1), [y, x] = c(null), [i, F] = c(!1), w = `${s.numero_radicado} – ${s.fecha_asignacion}`, $ = async () => {
44
44
  if (!(d || p)) {
45
45
  h(!0), x(null);
46
46
  try {
47
47
  try {
48
- const o = (await S(n.numero_radicado, v)).map((_) => ({ fuente: "protecdoc", ..._ }));
48
+ const o = (await S(s.numero_radicado, v)).map((_) => ({ fuente: "protecdoc", ..._ }));
49
49
  u(o), g(!0);
50
50
  return;
51
51
  } catch {
52
52
  }
53
- const t = await K(n.llave_radicado, h), r = (Array.isArray(t) ? t : []).map((a) => ({
53
+ const t = await K(s.llave_radicado, h), r = (Array.isArray(t) ? t : []).map((a) => ({
54
54
  fuente: "legacy",
55
55
  ...a
56
56
  }));
@@ -65,7 +65,7 @@ const $t = ({ radicado: n, onDocumentoClick: m, setView: N, setTraceData: s, set
65
65
  q(() => {
66
66
  i && !d && !p && $();
67
67
  }, [i]);
68
- const j = (t) => t.fuente === "protecdoc" ? t.nombreDocumento : t.nombre, R = (t, r) => t.fuente === "protecdoc" ? `${t.id_documento}-${r}` : `${t.id_docpersona ?? r}-${r}`;
68
+ const R = (t) => t.fuente === "protecdoc" ? t.nombreDocumento : t.nombre, j = (t, r) => t.fuente === "protecdoc" ? `${t.id_documento}-${r}` : `${t.id_docpersona ?? r}-${r}`;
69
69
  return /* @__PURE__ */ e(
70
70
  "div",
71
71
  {
@@ -81,12 +81,12 @@ const $t = ({ radicado: n, onDocumentoClick: m, setView: N, setTraceData: s, set
81
81
  show: i,
82
82
  extraItem: /* @__PURE__ */ e(P, { style: { cursor: "pointer", marginRight: "1rem" }, onClick: async (t) => {
83
83
  var r, a;
84
- if (t.stopPropagation(), s && s(null), l && l(!0), N(1), s)
84
+ if (t.stopPropagation(), n && n(null), l && l(!0), N(1), n)
85
85
  try {
86
- const o = await z(n.numero_radicado), _ = (((r = o == null ? void 0 : o.inProgress) == null ? void 0 : r.length) || 0) + (((a = o == null ? void 0 : o.completed) == null ? void 0 : a.length) || 0) > 0;
87
- s(_ ? o : null);
86
+ const o = await z(s.numero_radicado), _ = (((r = o == null ? void 0 : o.inProgress) == null ? void 0 : r.length) || 0) + (((a = o == null ? void 0 : o.completed) == null ? void 0 : a.length) || 0) > 0;
87
+ n(_ ? o : null);
88
88
  } catch (o) {
89
- console.error(o), s(null);
89
+ console.error(o), n(null);
90
90
  } finally {
91
91
  l && l(!1);
92
92
  }
@@ -105,12 +105,12 @@ const $t = ({ radicado: n, onDocumentoClick: m, setView: N, setTraceData: s, set
105
105
  children: [
106
106
  /* @__PURE__ */ b("div", { className: "icon_name_container_qy", children: [
107
107
  /* @__PURE__ */ e(E, {}),
108
- /* @__PURE__ */ e("span", { children: j(t) ?? "Documento" })
108
+ /* @__PURE__ */ e("span", { children: R(t) ?? "Documento" })
109
109
  ] }),
110
110
  /* @__PURE__ */ e(I, {})
111
111
  ]
112
112
  },
113
- R(t, r)
113
+ j(t, r)
114
114
  )) }),
115
115
  i && d && !p && f.length === 0 && !y && /* @__PURE__ */ e("p", { className: "text-muted mb-0", children: "No hay documentos para este radicado." })
116
116
  ]
@@ -0,0 +1,125 @@
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import { a as f } from "../../index-B96iRUpt.js";
3
+ import { i as _, j as F, k as g, h as x, f as b, e as w, a as $, F as N, g as y, d as z, l as E, b as C, c as W } from "../../index-BqaJxgOF.js";
4
+ import "react";
5
+ import '../../assets/DocumentoVisorEstado.css';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 */
6
+ /* empty css */
7
+ import "../../ui/subtitulo/Subtitulo.js";
8
+ /* empty css */
9
+ /* empty css */
10
+ /* empty css */
11
+ /* empty css */
12
+ import "react-router-dom";
13
+ /* empty css */
14
+ /* empty css */
15
+ /* empty css */
16
+ /* empty css */
17
+ import "../../index-DdZBtIJj.js";
18
+ /* empty css */
19
+ import { Animacion as j } from "../../ui/animacion/Animacion.js";
20
+ /* empty css */
21
+ /* empty css */
22
+ import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
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
+ /* empty css */
38
+ /* empty css */
39
+ function k(t = "", r = "") {
40
+ const o = t.toLowerCase(), i = r.toLowerCase(), n = `${o} ${i}`;
41
+ return o.includes("spreadsheet") || o.includes("excel") || /\.xlsx?$|\.xls$|\.csv$/.test(i) ? "excel" : o.includes("word") || o.includes("msword") || o.includes("wordprocessingml") || /\.docx?$|\.docm$/.test(i) ? "word" : o.includes("presentation") || o.includes("powerpoint") || /\.pptx?$|\.pptm$/.test(i) ? "powerpoint" : o.includes("zip") || o.includes("rar") || o.includes("7z") || o.includes("compressed") || /\.(zip|rar|7z|tar|gz)$/.test(i) ? "zip" : o.includes("outlook") || o.includes("rfc822") || o.includes("ms-tnef") || /\.(msg|eml|tnef)$/.test(i) ? "correo" : o.includes("pdf") || i.endsWith(".pdf") ? "pdf" : o.startsWith("image/") || /\.(png|jpe?g|gif|svg|webp|bmp|tif)$/.test(i) ? "image" : o.startsWith("audio/") || /\.(mp3|wav|ogg|m4a)$/.test(i) ? "audio" : o.startsWith("video/") || /\.(mp4|webm|mov|mkv|avi)$/.test(i) ? "video" : o.startsWith("text/") || /\.(txt|json|xml|html|md)$/.test(i) || n.includes("text/") ? "text" : "generic";
42
+ }
43
+ function D(t) {
44
+ switch (t) {
45
+ case "excel":
46
+ return /* @__PURE__ */ e(W, {});
47
+ case "word":
48
+ return /* @__PURE__ */ e(C, {});
49
+ case "powerpoint":
50
+ return /* @__PURE__ */ e(E, {});
51
+ case "zip":
52
+ return /* @__PURE__ */ e(z, {});
53
+ case "correo":
54
+ return /* @__PURE__ */ e(y, {});
55
+ case "pdf":
56
+ return /* @__PURE__ */ e(N, {});
57
+ case "image":
58
+ return /* @__PURE__ */ e($, {});
59
+ case "audio":
60
+ return /* @__PURE__ */ e(w, {});
61
+ case "video":
62
+ return /* @__PURE__ */ e(b, {});
63
+ case "text":
64
+ return /* @__PURE__ */ e(f, {});
65
+ default:
66
+ return /* @__PURE__ */ e(x, {});
67
+ }
68
+ }
69
+ const _e = ({
70
+ kind: t,
71
+ name: r = "Documento",
72
+ mimeType: o = "",
73
+ detail: i,
74
+ allowDownload: n = !1,
75
+ onDownload: d,
76
+ onRetry: l,
77
+ animationType: m = "loading_duck"
78
+ }) => {
79
+ const s = t === "error", a = t === "loading", p = k(o, r), u = !!r && r !== "Documento", v = a ? "Cargando documento…" : s ? "No se pudo cargar el documento" : "Vista previa no disponible", h = a ? "Espere un momento mientras se prepara la vista previa." : s ? "Hubo un problema al consultar el archivo. Compruebe su conexión e intente de nuevo." : "Este archivo no se puede abrir dentro del navegador. Descargue el archivo para revisarlo en su aplicación habitual.";
80
+ return /* @__PURE__ */ e(
81
+ "div",
82
+ {
83
+ className: `eco-doc-visor-estado eco-doc-visor-estado--${t}`,
84
+ role: "status",
85
+ "aria-busy": a || void 0,
86
+ "aria-live": "polite",
87
+ children: /* @__PURE__ */ c("div", { className: "eco-doc-visor-estado__content", children: [
88
+ /* @__PURE__ */ e("div", { className: "eco-doc-visor-estado__visual", "aria-hidden": !0, children: a ? /* @__PURE__ */ e("div", { className: "eco-doc-visor-estado__animacion", children: /* @__PURE__ */ e(j, { type: m, width: 150 }) }) : s ? /* @__PURE__ */ e("div", { className: "eco-doc-visor-estado__file-icon is-error", children: /* @__PURE__ */ e(_, {}) }) : /* @__PURE__ */ e("div", { className: `eco-doc-visor-estado__file-icon is-${p}`, children: D(p) }) }),
89
+ /* @__PURE__ */ e("h3", { className: "eco-doc-visor-estado__title", children: v }),
90
+ u ? /* @__PURE__ */ e("p", { className: "eco-doc-visor-estado__filename", title: r, children: r }) : null,
91
+ /* @__PURE__ */ e("p", { className: "eco-doc-visor-estado__desc", children: h }),
92
+ s && i ? /* @__PURE__ */ e("p", { className: "eco-doc-visor-estado__detail", children: i }) : null,
93
+ /* @__PURE__ */ c("div", { className: "eco-doc-visor-estado__actions", children: [
94
+ s && l ? /* @__PURE__ */ c(
95
+ "button",
96
+ {
97
+ type: "button",
98
+ className: "eco-doc-visor-estado__btn eco-doc-visor-estado__btn--primary",
99
+ onClick: l,
100
+ children: [
101
+ /* @__PURE__ */ e(F, { "aria-hidden": !0 }),
102
+ "Reintentar"
103
+ ]
104
+ }
105
+ ) : null,
106
+ !s && !a && n && d ? /* @__PURE__ */ c(
107
+ "button",
108
+ {
109
+ type: "button",
110
+ className: "eco-doc-visor-estado__btn eco-doc-visor-estado__btn--primary",
111
+ onClick: d,
112
+ children: [
113
+ /* @__PURE__ */ e(g, { "aria-hidden": !0 }),
114
+ "Descargar archivo"
115
+ ]
116
+ }
117
+ ) : null
118
+ ] })
119
+ ] })
120
+ }
121
+ );
122
+ };
123
+ export {
124
+ _e as DocumentoVisorEstado
125
+ };