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.
- package/dist/{AppList-BshxZhoN.js → AppList-DORGpC4I.js} +84 -84
- package/dist/assets/DocumentoVisorEstado.css +1 -0
- package/dist/assets/EcoDataTable.css +1 -1
- package/dist/assets/EcoDataTableBandejaFooter.css +1 -1
- package/dist/assets/SileoNotifications.css +1 -1
- 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-C4MBu_wk.js → index-B96iRUpt.js} +38 -34
- package/dist/{index-h-TtOxhs.js → index-BqaJxgOF.js} +182 -170
- package/dist/lib/tables/custom-data-table/CustomDataTable.d.ts +2 -0
- package/dist/lib/tables/custom-data-table-split/CustomDataTableSplit.d.ts +3 -1
- package/dist/lib/tables/eco-data-table/components/EcoDataTable/EcoDataTable.d.ts +1 -1
- package/dist/lib/tables/eco-data-table/components/EcoDataTableBandejaFooter.d.ts +8 -1
- package/dist/lib/tables/eco-data-table/hooks/useEcoTableSelection.d.ts +1 -0
- package/dist/lib/tables/eco-data-table/types.d.ts +7 -0
- package/dist/lib/ui/animacion/Animacion.d.ts +1 -0
- package/dist/lib/ui.d.ts +1 -0
- package/dist/lib/utils/modal-radicados/DocumentoVisorEstado.d.ts +18 -0
- package/dist/lib/utils/modal-radicados/ModalDocumento.d.ts +26 -0
- package/dist/lib/utils/modal-radicados/VisorDocumento.d.ts +8 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/shared/app-list/AppList.js +2 -2
- 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 +4 -3
- package/dist/shared/notificacion-usuario/NotificacionUsuario.js +6 -5
- package/dist/shared/ventana-tabs/VentanaTabs.js +1 -1
- package/dist/tables/custom-data-table/CustomDataTable.js +549 -547
- package/dist/tables/custom-data-table-split/CustomDataTableSplit.js +68 -65
- package/dist/tables/custom-table-toolbar/CustomTableToolbar.js +1 -1
- package/dist/tables/eco-data-table/components/EcoDataTable/EcoDataTable.js +190 -149
- package/dist/tables/eco-data-table/components/EcoDataTableBandejaFooter.js +36 -26
- package/dist/tables/eco-data-table/hooks/useEcoTableSelection.js +9 -8
- package/dist/tables/tabla-registros/buscador/Buscador.js +1 -1
- package/dist/tables/tabla-registros/modal-v2/EcoModal.js +11 -11
- package/dist/tables/tabla-registros/tabla/Tabla.js +22 -22
- package/dist/ui/alertas/AlertaFormulario.js +1 -1
- package/dist/ui/card-gestion-lateral/CardGestionLateral.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/datos-basicos-card/DatosBasicosCard.js +1 -1
- package/dist/ui/icono-tooltip/IconoTooltip.js +10 -10
- 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 +50 -50
- package/dist/ui/resumen-evaluacion/ResumenEvaluacion.js +5 -5
- package/dist/ui/status-filter-bar/StatusFilterBar.js +8 -8
- package/dist/ui/status-semaphore/StatusSemaphore.js +1 -1
- package/dist/ui/stepper-v2/StepperV2.js +1 -1
- package/dist/utils/eco-provider/EcoContext.js +4 -3
- package/dist/utils/modal-radicados/AuxRadicadosComponents/TarjetaRadicado.js +12 -12
- package/dist/utils/modal-radicados/DocumentoVisorEstado.js +125 -0
- package/dist/utils/modal-radicados/ModalDocumento.js +155 -170
- package/dist/utils/modal-radicados/ModalRadicado.js +34 -34
- package/dist/utils/modal-radicados/VisorDocumento.js +61 -61
- package/dist/utils/notifications/EcoToaster.js +26 -25
- package/dist/utils/unp-historico/UnpHistorico.js +1 -1
- package/dist/utils.js +29 -27
- package/package.json +1 -1
|
@@ -1,45 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
3
|
-
import { a as
|
|
4
|
-
import { F as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
import { C as W } from "../../Card-_JzS9Ssz.js";
|
|
39
|
-
import { B as $ } from "../../Button-eLVX04GZ.js";
|
|
40
|
-
const Ut = ({ data: m, mimeType: t, name: i, base64: u = "", blobUrl: f, allowDownloadButton: h = !0, autoDownloadOnUnsupported: x = !1 }) => {
|
|
41
|
-
const [s, a] = z(!0), E = j(null), A = j(!1), [n, v] = z(), R = (o = "") => {
|
|
42
|
-
const c = (o ?? "").toLowerCase();
|
|
1
|
+
import { jsx as e, jsxs as K, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { useState as E, useRef as A, useEffect as V } from "react";
|
|
3
|
+
import { a as O } from "../../index-B96iRUpt.js";
|
|
4
|
+
import { F as Q, a as X, b as Y, c as T, d as tt, e as et, f as ot, g as it, h as st } from "../../index-BqaJxgOF.js";
|
|
5
|
+
import { DocumentoVisorEstado as p } from "./DocumentoVisorEstado.js";
|
|
6
|
+
function nt(d) {
|
|
7
|
+
return `${d.split("#")[0] ?? d}#toolbar=0&navpanes=0&scrollbar=0`;
|
|
8
|
+
}
|
|
9
|
+
const pt = ({
|
|
10
|
+
data: d,
|
|
11
|
+
mimeType: t,
|
|
12
|
+
name: o,
|
|
13
|
+
base64: f = "",
|
|
14
|
+
blobUrl: g,
|
|
15
|
+
allowDownloadButton: R = !0,
|
|
16
|
+
autoDownloadOnUnsupported: x = !1,
|
|
17
|
+
viewOnly: m = !1,
|
|
18
|
+
loadError: v = null,
|
|
19
|
+
onRetry: S,
|
|
20
|
+
animationType: w = "loading_duck",
|
|
21
|
+
isLoading: M = !1
|
|
22
|
+
}) => {
|
|
23
|
+
const [r, n] = E(!0), N = A(null), P = A(!1), [s, b] = E(), I = (i = "") => {
|
|
24
|
+
const c = (i ?? "").toLowerCase();
|
|
43
25
|
return {
|
|
44
26
|
// Imágenes
|
|
45
27
|
"image/jpeg": "jpg",
|
|
@@ -98,161 +80,164 @@ const Ut = ({ data: m, mimeType: t, name: i, base64: u = "", blobUrl: f, allowDo
|
|
|
98
80
|
"application/gzip": "gz",
|
|
99
81
|
"application/x-gzip": "gz"
|
|
100
82
|
}[c] ?? "bin";
|
|
101
|
-
},
|
|
102
|
-
const
|
|
103
|
-
return `${
|
|
83
|
+
}, U = (i, c) => {
|
|
84
|
+
const l = I(c);
|
|
85
|
+
return `${i}.${l}`;
|
|
104
86
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
|
|
87
|
+
V(() => {
|
|
88
|
+
n(!0);
|
|
89
|
+
const i = (t || "").toLowerCase(), c = i.includes("pdf") || i.startsWith("image/") || i.startsWith("audio/") || i.startsWith("video/") || i.startsWith("text/");
|
|
90
|
+
if (g) {
|
|
91
|
+
b(g), c || n(!1);
|
|
110
92
|
return;
|
|
111
93
|
}
|
|
112
|
-
if (
|
|
113
|
-
const
|
|
114
|
-
for (let
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
return
|
|
94
|
+
if (f) {
|
|
95
|
+
const l = atob(f), j = new Array(l.length);
|
|
96
|
+
for (let u = 0; u < l.length; u++)
|
|
97
|
+
j[u] = l.charCodeAt(u);
|
|
98
|
+
const G = new Uint8Array(j), J = new Blob([G], { type: t }), y = URL.createObjectURL(J);
|
|
99
|
+
return b(y), c || n(!1), () => URL.revokeObjectURL(y);
|
|
100
|
+
}
|
|
101
|
+
}, [f, g, t]);
|
|
102
|
+
const a = (t || "").toLowerCase(), F = a.includes("pdf") || (d || "").startsWith("data:application/pdf"), B = a.startsWith("image/"), H = a.startsWith("audio/"), k = a.startsWith("video/"), q = a.startsWith("text/") || /\.(txt|json|xml|html|md)$/.test((o || "").toLowerCase()), L = /msword|officedocument.wordprocessingml|\.docx?/.test(a + (o || "").toLowerCase()), $ = a === "text/plain" || /\.(txt)$/.test((o || "").toLowerCase()), Z = /msword|officedocument|vnd\.ms|vnd\.oasis|octet-stream|application\/zip|x-7z-compressed|x-rar-compressed|ms-tnef|message\/rfc822/.test(a), z = R && !m, _ = s && F && m ? nt(s) : s;
|
|
103
|
+
V(() => {
|
|
104
|
+
s && x && (L || $) && (P.current || N.current);
|
|
105
|
+
}, [s, x, L, $, o, t]);
|
|
106
|
+
const W = {
|
|
107
|
+
width: "100%",
|
|
108
|
+
height: "100%",
|
|
109
|
+
display: r ? "none" : "flex",
|
|
110
|
+
justifyContent: "center",
|
|
111
|
+
alignItems: "center",
|
|
112
|
+
overflow: "auto",
|
|
113
|
+
backgroundColor: "#e6e6e6"
|
|
114
|
+
}, h = m ? (i) => {
|
|
115
|
+
i.preventDefault();
|
|
116
|
+
} : void 0, C = () => {
|
|
117
|
+
if (!s) return;
|
|
118
|
+
const i = document.createElement("a");
|
|
119
|
+
i.href = s, i.download = U(o, t), i.click();
|
|
120
|
+
};
|
|
121
|
+
return M ? /* @__PURE__ */ e("div", { className: "eco-doc-visor-estado-host", children: /* @__PURE__ */ e(
|
|
122
|
+
p,
|
|
123
|
+
{
|
|
124
|
+
kind: "loading",
|
|
125
|
+
name: o,
|
|
126
|
+
mimeType: t,
|
|
127
|
+
animationType: w
|
|
118
128
|
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
) }) : v ? /* @__PURE__ */ e("div", { className: "eco-doc-visor-estado-host", children: /* @__PURE__ */ e(
|
|
130
|
+
p,
|
|
131
|
+
{
|
|
132
|
+
kind: "error",
|
|
133
|
+
name: o,
|
|
134
|
+
mimeType: t,
|
|
135
|
+
detail: v,
|
|
136
|
+
onRetry: S
|
|
137
|
+
}
|
|
138
|
+
) }) : /* @__PURE__ */ K(D, { children: [
|
|
139
|
+
r && /* @__PURE__ */ e("div", { className: "eco-doc-visor-estado-host", children: /* @__PURE__ */ e(
|
|
140
|
+
p,
|
|
141
|
+
{
|
|
142
|
+
kind: "loading",
|
|
143
|
+
name: o,
|
|
144
|
+
mimeType: t,
|
|
145
|
+
animationType: w
|
|
146
|
+
}
|
|
147
|
+
) }),
|
|
148
|
+
s && /* @__PURE__ */ e(D, { children: F ? /* @__PURE__ */ e(
|
|
126
149
|
"iframe",
|
|
127
150
|
{
|
|
128
|
-
src:
|
|
151
|
+
src: _,
|
|
129
152
|
width: "100%",
|
|
130
153
|
height: "100%",
|
|
131
|
-
style: { border: "none", display:
|
|
132
|
-
onLoad: () =>
|
|
133
|
-
title: `Visor PDF: ${
|
|
154
|
+
style: { border: "none", display: r ? "none" : "block" },
|
|
155
|
+
onLoad: () => n(!1),
|
|
156
|
+
title: `Visor PDF: ${o}`
|
|
134
157
|
}
|
|
135
|
-
) :
|
|
158
|
+
) : q ? /* @__PURE__ */ e(
|
|
136
159
|
"iframe",
|
|
137
160
|
{
|
|
138
|
-
src:
|
|
161
|
+
src: s,
|
|
139
162
|
width: "100%",
|
|
140
163
|
height: "100%",
|
|
141
|
-
style: { border: "none", display:
|
|
142
|
-
onLoad: () =>
|
|
143
|
-
title: `Visor texto: ${
|
|
164
|
+
style: { border: "none", display: r ? "none" : "block" },
|
|
165
|
+
onLoad: () => n(!1),
|
|
166
|
+
title: `Visor texto: ${o}`
|
|
144
167
|
}
|
|
145
|
-
) :
|
|
146
|
-
"
|
|
168
|
+
) : B ? /* @__PURE__ */ e("div", { style: W, children: /* @__PURE__ */ e(
|
|
169
|
+
"img",
|
|
147
170
|
{
|
|
171
|
+
src: s,
|
|
172
|
+
alt: o,
|
|
173
|
+
onLoad: () => n(!1),
|
|
174
|
+
onContextMenu: h,
|
|
148
175
|
style: {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
alignItems: "center",
|
|
154
|
-
overflow: "auto",
|
|
155
|
-
backgroundColor: "#e6e6e6"
|
|
156
|
-
},
|
|
157
|
-
children: /* @__PURE__ */ e(
|
|
158
|
-
"img",
|
|
159
|
-
{
|
|
160
|
-
src: n,
|
|
161
|
-
alt: i,
|
|
162
|
-
onLoad: () => a(!1),
|
|
163
|
-
style: {
|
|
164
|
-
maxWidth: "100%",
|
|
165
|
-
maxHeight: "100%",
|
|
166
|
-
objectFit: "contain"
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
)
|
|
176
|
+
maxWidth: "100%",
|
|
177
|
+
maxHeight: "100%",
|
|
178
|
+
objectFit: "contain"
|
|
179
|
+
}
|
|
170
180
|
}
|
|
171
|
-
) :
|
|
181
|
+
) }) : k || H ? m ? /* @__PURE__ */ e("div", { style: W, children: k ? /* @__PURE__ */ e(
|
|
182
|
+
"video",
|
|
183
|
+
{
|
|
184
|
+
src: s,
|
|
185
|
+
controls: !0,
|
|
186
|
+
controlsList: "nodownload",
|
|
187
|
+
disablePictureInPicture: !0,
|
|
188
|
+
onLoadedData: () => n(!1),
|
|
189
|
+
onContextMenu: h,
|
|
190
|
+
style: { maxWidth: "100%", maxHeight: "100%" },
|
|
191
|
+
title: `Visor video: ${o}`,
|
|
192
|
+
children: "Su navegador no soporta la reproducción de este video."
|
|
193
|
+
}
|
|
194
|
+
) : /* @__PURE__ */ e(
|
|
195
|
+
"audio",
|
|
196
|
+
{
|
|
197
|
+
src: s,
|
|
198
|
+
controls: !0,
|
|
199
|
+
controlsList: "nodownload",
|
|
200
|
+
onLoadedData: () => n(!1),
|
|
201
|
+
onContextMenu: h,
|
|
202
|
+
style: { width: "90%", maxWidth: 480 },
|
|
203
|
+
title: `Visor audio: ${o}`,
|
|
204
|
+
children: "Su navegador no soporta la reproducción de este audio."
|
|
205
|
+
}
|
|
206
|
+
) }) : /* @__PURE__ */ e(
|
|
172
207
|
"iframe",
|
|
173
208
|
{
|
|
174
|
-
src:
|
|
209
|
+
src: s,
|
|
175
210
|
width: "100%",
|
|
176
211
|
height: "100%",
|
|
177
|
-
style: { border: "none", display:
|
|
178
|
-
onLoad: () =>
|
|
179
|
-
title: `Visor multimedia: ${
|
|
212
|
+
style: { border: "none", display: r ? "none" : "block" },
|
|
213
|
+
onLoad: () => n(!1),
|
|
214
|
+
title: `Visor multimedia: ${o}`
|
|
180
215
|
}
|
|
181
|
-
) :
|
|
182
|
-
|
|
216
|
+
) : Z ? /* @__PURE__ */ e("div", { className: "eco-doc-visor-estado-host", style: { display: r ? "none" : "flex" }, children: /* @__PURE__ */ e(
|
|
217
|
+
p,
|
|
183
218
|
{
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
alignItems: "center",
|
|
190
|
-
overflow: "auto",
|
|
191
|
-
backgroundColor: "#e6e6e6"
|
|
192
|
-
},
|
|
193
|
-
children: /* @__PURE__ */ e(W, { children: /* @__PURE__ */ p(W.Body, { style: { textAlign: "center" }, children: [
|
|
194
|
-
/* @__PURE__ */ e(g, { type: "loading_duck" }),
|
|
195
|
-
/* @__PURE__ */ e("br", {}),
|
|
196
|
-
/* @__PURE__ */ p("p", { children: [
|
|
197
|
-
"El documento ",
|
|
198
|
-
i,
|
|
199
|
-
" no se puede visualizar en el navegador."
|
|
200
|
-
] }),
|
|
201
|
-
/* @__PURE__ */ e("br", {}),
|
|
202
|
-
h && /* @__PURE__ */ e(
|
|
203
|
-
$,
|
|
204
|
-
{
|
|
205
|
-
variant: "unp_secondary",
|
|
206
|
-
onClick: () => {
|
|
207
|
-
const o = document.createElement("a");
|
|
208
|
-
o.href = n, o.download = w(i, t), o.click();
|
|
209
|
-
},
|
|
210
|
-
children: "Descargar documento"
|
|
211
|
-
}
|
|
212
|
-
)
|
|
213
|
-
] }) })
|
|
219
|
+
kind: "unsupported",
|
|
220
|
+
name: o,
|
|
221
|
+
mimeType: t,
|
|
222
|
+
allowDownload: z,
|
|
223
|
+
onDownload: C
|
|
214
224
|
}
|
|
215
|
-
) : /* @__PURE__ */
|
|
216
|
-
|
|
225
|
+
) }) : /* @__PURE__ */ e("div", { className: "eco-doc-visor-estado-host", style: { display: r ? "none" : "flex" }, children: /* @__PURE__ */ e(
|
|
226
|
+
p,
|
|
217
227
|
{
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
alignItems: "center",
|
|
224
|
-
overflow: "auto",
|
|
225
|
-
backgroundColor: "#e6e6e6"
|
|
226
|
-
},
|
|
227
|
-
children: [
|
|
228
|
-
/* @__PURE__ */ e(g, { type: "loading_duck" }),
|
|
229
|
-
/* @__PURE__ */ e("br", {}),
|
|
230
|
-
/* @__PURE__ */ p("p", { children: [
|
|
231
|
-
"El documento ",
|
|
232
|
-
i,
|
|
233
|
-
" no puede ser visualizado en este visor."
|
|
234
|
-
] }),
|
|
235
|
-
/* @__PURE__ */ e("br", {}),
|
|
236
|
-
h && /* @__PURE__ */ e(
|
|
237
|
-
$,
|
|
238
|
-
{
|
|
239
|
-
variant: "unp_secondary",
|
|
240
|
-
onClick: () => {
|
|
241
|
-
const o = document.createElement("a");
|
|
242
|
-
o.href = n, o.download = w(i, t), o.click();
|
|
243
|
-
},
|
|
244
|
-
children: "Descargar documento"
|
|
245
|
-
}
|
|
246
|
-
)
|
|
247
|
-
]
|
|
228
|
+
kind: "unsupported",
|
|
229
|
+
name: o,
|
|
230
|
+
mimeType: t,
|
|
231
|
+
allowDownload: z,
|
|
232
|
+
onDownload: C
|
|
248
233
|
}
|
|
249
|
-
) })
|
|
234
|
+
) }) })
|
|
250
235
|
] });
|
|
251
|
-
},
|
|
252
|
-
const t =
|
|
253
|
-
return t.includes("pdf") || t.endsWith(".pdf") ? /* @__PURE__ */ e(
|
|
236
|
+
}, mt = (d = "") => {
|
|
237
|
+
const t = d.toLowerCase();
|
|
238
|
+
return t.includes("pdf") || t.endsWith(".pdf") ? /* @__PURE__ */ e(Q, {}) : t.includes("image") || /\.(png|jpe?g|gif|svg|webp)$/.test(t) ? /* @__PURE__ */ e(X, {}) : t.includes("word") || t.includes("msword") || t.includes("officedocument.wordprocessingml") || /\.(docx?|docm)$/.test(t) ? /* @__PURE__ */ e(Y, {}) : t.includes("excel") || t.includes("spreadsheet") || /\.(xlsx?|xls|csv)$/.test(t) ? /* @__PURE__ */ e(T, {}) : t.includes("zip") || t.includes("rar") || t.includes("7z") || t.includes("compressed") || t.includes("tar") || t.includes("gzip") || /\.(zip|rar|7z|tar|gz)$/.test(t) ? /* @__PURE__ */ e(tt, {}) : t.startsWith("audio") || /\.(mp3|wav|ogg|m4a)$/.test(t) ? /* @__PURE__ */ e(et, {}) : t.startsWith("video") || /\.(mp4|webm|mov|mkv|avi)$/.test(t) ? /* @__PURE__ */ e(ot, {}) : t.startsWith("text") || /\.(txt|json|xml|html|md)$/.test(t) ? /* @__PURE__ */ e(O, {}) : t.includes("vnd.ms-outlook") || t.includes("ms-tnef") || t.includes("message/rfc822") || /\.(msg|eml|tnef)$/.test(t) ? /* @__PURE__ */ e(it, {}) : /* @__PURE__ */ e(st, {});
|
|
254
239
|
};
|
|
255
240
|
export {
|
|
256
|
-
|
|
257
|
-
|
|
241
|
+
pt as ModalDocumento,
|
|
242
|
+
mt as getIconByType
|
|
258
243
|
};
|
|
@@ -3,7 +3,7 @@ import * as w from "react";
|
|
|
3
3
|
import { useContext as V, useMemo as ce, useState as y, useRef as se, useEffect as q } from "react";
|
|
4
4
|
import { ModalDocumento as de, getIconByType as le } from "./ModalDocumento.js";
|
|
5
5
|
import { RadicadosTarjetas as me } from "./AuxRadicadosComponents/RadicadosTarjetas.js";
|
|
6
|
-
import { h as he,
|
|
6
|
+
import { h as he, $ as pe, a0 as W, a1 as ue, a2 as be, a3 as fe, I as ye, a4 as ge, n as ve, a5 as Ne } from "../../index-BqaJxgOF.js";
|
|
7
7
|
import { getUserToken as X } from "../../auth/services/User.js";
|
|
8
8
|
import { fetchDocumentoBinario as xe } from "./AuxRadicadosComponents/fetchDocumentosProtecdoc.js";
|
|
9
9
|
import '../../assets/Trazabilidad.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/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/Encabezado.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';/* empty css */
|
|
@@ -26,7 +26,7 @@ import "react-router-dom";
|
|
|
26
26
|
/* empty css */
|
|
27
27
|
/* empty css */
|
|
28
28
|
import { EcoModal as Fe } from "../../tables/tabla-registros/modal-v2/EcoModal.js";
|
|
29
|
-
import { Animacion as
|
|
29
|
+
import { Animacion as E } from "../../ui/animacion/Animacion.js";
|
|
30
30
|
/* empty css */
|
|
31
31
|
/* empty css */
|
|
32
32
|
/* empty css */
|
|
@@ -42,10 +42,10 @@ import { Animacion as $ } from "../../ui/animacion/Animacion.js";
|
|
|
42
42
|
/* empty css */
|
|
43
43
|
/* empty css */
|
|
44
44
|
import { T as z } from "../../Table-cUZFLrPi.js";
|
|
45
|
-
import { a as M, F as Re, b as
|
|
45
|
+
import { a as M, F as Re, b as Te } from "../../FormGroup-B8RAswur.js";
|
|
46
46
|
import { c as H } from "../../index-ZphT3dr_.js";
|
|
47
47
|
import { u as L } from "../../ThemeProvider-Cv61y4Uy.js";
|
|
48
|
-
import { h as
|
|
48
|
+
import { h as je } from "../../ElementChildren-67NLtZ0A.js";
|
|
49
49
|
const K = /* @__PURE__ */ w.forwardRef(({
|
|
50
50
|
id: r,
|
|
51
51
|
bsPrefix: n,
|
|
@@ -97,42 +97,42 @@ const ee = /* @__PURE__ */ w.forwardRef(({
|
|
|
97
97
|
isInvalid: _ = !1,
|
|
98
98
|
feedbackTooltip: R = !1,
|
|
99
99
|
feedback: b,
|
|
100
|
-
feedbackType:
|
|
100
|
+
feedbackType: T,
|
|
101
101
|
className: G,
|
|
102
102
|
style: O,
|
|
103
103
|
title: P = "",
|
|
104
104
|
type: f = "checkbox",
|
|
105
105
|
label: v,
|
|
106
|
-
children:
|
|
106
|
+
children: j,
|
|
107
107
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
108
|
-
as:
|
|
108
|
+
as: I = "input",
|
|
109
109
|
...k
|
|
110
110
|
}, C) => {
|
|
111
111
|
n = L(n, "form-check"), p = L(p, "form-switch");
|
|
112
112
|
const {
|
|
113
113
|
controlId: D
|
|
114
|
-
} = V(M),
|
|
114
|
+
} = V(M), A = ce(() => ({
|
|
115
115
|
controlId: r || D
|
|
116
|
-
}), [D, r]), N = !
|
|
116
|
+
}), [D, r]), N = !j && v != null && v !== !1 || je(j, U), F = /* @__PURE__ */ e(K, {
|
|
117
117
|
...k,
|
|
118
118
|
type: f === "switch" ? "checkbox" : f,
|
|
119
119
|
ref: C,
|
|
120
120
|
isValid: u,
|
|
121
121
|
isInvalid: _,
|
|
122
122
|
disabled: s,
|
|
123
|
-
as:
|
|
123
|
+
as: I
|
|
124
124
|
});
|
|
125
125
|
return /* @__PURE__ */ e(M.Provider, {
|
|
126
|
-
value:
|
|
126
|
+
value: A,
|
|
127
127
|
children: /* @__PURE__ */ e("div", {
|
|
128
128
|
style: O,
|
|
129
129
|
className: H(G, N && n, g && `${n}-inline`, h && `${n}-reverse`, f === "switch" && p),
|
|
130
|
-
children:
|
|
130
|
+
children: j || /* @__PURE__ */ a(S, {
|
|
131
131
|
children: [F, N && /* @__PURE__ */ e(U, {
|
|
132
132
|
title: P,
|
|
133
133
|
children: v
|
|
134
134
|
}), b && /* @__PURE__ */ e(Re, {
|
|
135
|
-
type:
|
|
135
|
+
type: T,
|
|
136
136
|
tooltip: R,
|
|
137
137
|
children: b
|
|
138
138
|
})]
|
|
@@ -145,8 +145,8 @@ const ke = Object.assign(ee, {
|
|
|
145
145
|
Input: K,
|
|
146
146
|
Label: U
|
|
147
147
|
}), _t = ({ row: r, showGestionCard: n = !1, protecdocVersion: p = "v1" }) => {
|
|
148
|
-
var
|
|
149
|
-
const [g, h] = y(!1), [s, u] = y(null), [_, R] = y(!1), b = se(null), [
|
|
148
|
+
var Y;
|
|
149
|
+
const [g, h] = y(!1), [s, u] = y(null), [_, R] = y(!1), b = se(null), [T, G] = y(null), [O, P] = y(!1), [f, v] = y([]), [j, I] = y(!1), [k, C] = y({}), [D, A] = y({}), N = Array.isArray(r == null ? void 0 : r.radicados) ? r.radicados : [], F = ((Y = r == null ? void 0 : r.registro) == null ? void 0 : Y.numeroRegistro) ?? (r == null ? void 0 : r.numeroRegistro), $ = `${window.location.protocol}//${window.location.host}/api-gateway/`, te = (o) => {
|
|
150
150
|
if (!o) return "";
|
|
151
151
|
const t = new Date(Number(o)), m = t.getFullYear(), c = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0"), d = String(t.getHours()).padStart(2, "0"), l = String(t.getMinutes()).padStart(2, "0");
|
|
152
152
|
return `${m}-${c}-${i} ${d}:${l}`;
|
|
@@ -159,9 +159,9 @@ const ke = Object.assign(ee, {
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
(async () => {
|
|
162
|
-
|
|
162
|
+
I(!0);
|
|
163
163
|
try {
|
|
164
|
-
const t = await fetch(`${
|
|
164
|
+
const t = await fetch(`${$}gsc/gestionap/${F}`, {
|
|
165
165
|
method: "GET",
|
|
166
166
|
headers: {
|
|
167
167
|
Authorization: `Bearer ${X()}`,
|
|
@@ -175,18 +175,18 @@ const ke = Object.assign(ee, {
|
|
|
175
175
|
} catch (t) {
|
|
176
176
|
console.error("Error fetching gestion:", t), v([]);
|
|
177
177
|
} finally {
|
|
178
|
-
|
|
178
|
+
I(!1);
|
|
179
179
|
}
|
|
180
180
|
})();
|
|
181
|
-
}, [n, F,
|
|
181
|
+
}, [n, F, $]), q(() => {
|
|
182
182
|
!n || f.length === 0 || f.forEach((o) => {
|
|
183
183
|
const t = o.id_gestion;
|
|
184
184
|
if (!t || k[t] || D[t])
|
|
185
185
|
return;
|
|
186
186
|
(async () => {
|
|
187
|
-
|
|
187
|
+
A((c) => ({ ...c, [t]: !0 }));
|
|
188
188
|
try {
|
|
189
|
-
const c = await fetch(`${
|
|
189
|
+
const c = await fetch(`${$}usuario/archivo/`, {
|
|
190
190
|
method: "POST",
|
|
191
191
|
headers: {
|
|
192
192
|
"Content-Type": "application/json",
|
|
@@ -206,12 +206,12 @@ const ke = Object.assign(ee, {
|
|
|
206
206
|
} catch (c) {
|
|
207
207
|
console.error("Error al obtener documentos de gestión:", c), C((i) => ({ ...i, [t]: [] }));
|
|
208
208
|
} finally {
|
|
209
|
-
|
|
209
|
+
A((c) => ({ ...c, [t]: !1 }));
|
|
210
210
|
}
|
|
211
211
|
})();
|
|
212
212
|
});
|
|
213
|
-
}, [n, f, k, D,
|
|
214
|
-
const
|
|
213
|
+
}, [n, f, k, D, $]);
|
|
214
|
+
const J = () => {
|
|
215
215
|
b.current && (URL.revokeObjectURL(b.current), b.current = null), h(!1), u(null);
|
|
216
216
|
}, ae = async (o) => {
|
|
217
217
|
if (o.fuente === "legacy") {
|
|
@@ -236,7 +236,7 @@ const ke = Object.assign(ee, {
|
|
|
236
236
|
blobUrl: m
|
|
237
237
|
});
|
|
238
238
|
} catch (t) {
|
|
239
|
-
console.error("Error al descargar documento protecdoc:", t),
|
|
239
|
+
console.error("Error al descargar documento protecdoc:", t), J();
|
|
240
240
|
}
|
|
241
241
|
}, re = (o) => {
|
|
242
242
|
u({
|
|
@@ -254,7 +254,7 @@ const ke = Object.assign(ee, {
|
|
|
254
254
|
Fe,
|
|
255
255
|
{
|
|
256
256
|
show: g,
|
|
257
|
-
onHide:
|
|
257
|
+
onHide: J,
|
|
258
258
|
title: (s == null ? void 0 : s.name) || "",
|
|
259
259
|
modalType: "secondary",
|
|
260
260
|
primaryPosition: "left",
|
|
@@ -265,7 +265,7 @@ const ke = Object.assign(ee, {
|
|
|
265
265
|
otherModalOpen: !0,
|
|
266
266
|
hasBody: !1,
|
|
267
267
|
children: [
|
|
268
|
-
g && !s && /* @__PURE__ */ e(
|
|
268
|
+
g && !s && /* @__PURE__ */ e(E, { type: "loading_duck" }),
|
|
269
269
|
s && /* @__PURE__ */ e(
|
|
270
270
|
de,
|
|
271
271
|
{
|
|
@@ -290,7 +290,7 @@ const ke = Object.assign(ee, {
|
|
|
290
290
|
setTraceLoading: P
|
|
291
291
|
}
|
|
292
292
|
),
|
|
293
|
-
n && /* @__PURE__ */ e(S, { children:
|
|
293
|
+
n && /* @__PURE__ */ e(S, { children: j ? /* @__PURE__ */ e("div", { className: "aux-radicados__loading", children: /* @__PURE__ */ e(E, { type: "loading_duck", width: 200 }) }) : f.length > 0 ? f.map((t, m) => {
|
|
294
294
|
const c = k[t.id_gestion] || [], i = !!D[t.id_gestion];
|
|
295
295
|
return /* @__PURE__ */ a(_e, { label: `Gestión ${t.fecha_gestion}`, icon: pe, children: [
|
|
296
296
|
/* @__PURE__ */ e(x, { icon: W, subtitle: "Documentación del solicitante" }),
|
|
@@ -447,7 +447,7 @@ const ke = Object.assign(ee, {
|
|
|
447
447
|
},
|
|
448
448
|
`${t.id_gestion}-${l}`
|
|
449
449
|
))
|
|
450
|
-
] }) : i ? /* @__PURE__ */ e(
|
|
450
|
+
] }) : i ? /* @__PURE__ */ e(E, { type: "loading_duck", width: 200 }) : null
|
|
451
451
|
] }, t.id_gestion ?? m);
|
|
452
452
|
}) : /* @__PURE__ */ a(S, { children: [
|
|
453
453
|
"No se ha realizado la gestión para el registro No. ",
|
|
@@ -457,11 +457,11 @@ const ke = Object.assign(ee, {
|
|
|
457
457
|
},
|
|
458
458
|
{
|
|
459
459
|
label: "Trazabilidad",
|
|
460
|
-
content: () => /* @__PURE__ */ e(S, { children: O ? /* @__PURE__ */ e("div", { className: "aux-radicados__loading", children: /* @__PURE__ */ e(
|
|
461
|
-
const o = (
|
|
460
|
+
content: () => /* @__PURE__ */ e(S, { children: O ? /* @__PURE__ */ e("div", { className: "aux-radicados__loading", children: /* @__PURE__ */ e(E, { type: "loading_duck", width: 200 }) }) : T ? /* @__PURE__ */ e("div", { className: "vp-trazabilidad-container", children: (() => {
|
|
461
|
+
const o = (T.inProgress || []).map((i) => ({ ...i, _inProgress: !0 })), m = (T.completed || []).map((i) => ({ ...i, _inProgress: !1 })).sort((i, d) => (d.endDate || 0) - (i.endDate || 0)), c = [...o, ...m];
|
|
462
462
|
return /* @__PURE__ */ e("div", { children: c.map((i, d) => {
|
|
463
463
|
var Q;
|
|
464
|
-
const l = i._inProgress ? "En progreso" : ((Q = i.trackState) == null ? void 0 : Q.state) ?? "",
|
|
464
|
+
const l = i._inProgress ? "En progreso" : ((Q = i.trackState) == null ? void 0 : Q.state) ?? "", Z = i.subsectionObject ?? "", ne = i.user ?? "", oe = te(i.endDate);
|
|
465
465
|
return /* @__PURE__ */ a("div", { className: "vp-timeline-event", children: [
|
|
466
466
|
/* @__PURE__ */ a("div", { className: "vp-timeline-left", children: [
|
|
467
467
|
/* @__PURE__ */ e("div", { className: "vp-point-vertical" }),
|
|
@@ -471,7 +471,7 @@ const ke = Object.assign(ee, {
|
|
|
471
471
|
/* @__PURE__ */ e("div", { style: { display: "flex" }, children: /* @__PURE__ */ e("div", { className: "vp-icon-circle", children: /* @__PURE__ */ e(Ne, {}) }) }),
|
|
472
472
|
/* @__PURE__ */ a("div", { className: "vp-event-details", children: [
|
|
473
473
|
/* @__PURE__ */ e("div", { className: "vp-event-estado fw-bold", children: l }),
|
|
474
|
-
|
|
474
|
+
Z && /* @__PURE__ */ e("div", { className: "vp-event-observacion", children: Z }),
|
|
475
475
|
/* @__PURE__ */ e("div", { className: "vp-event-fecha text-muted small", children: ne }),
|
|
476
476
|
/* @__PURE__ */ e("div", { className: "vp-event-fecha text-muted small", children: oe })
|
|
477
477
|
] })
|
|
@@ -494,7 +494,7 @@ const ke = Object.assign(ee, {
|
|
|
494
494
|
" ",
|
|
495
495
|
/* @__PURE__ */ e("span", { className: "text-danger", children: "*" })
|
|
496
496
|
] }),
|
|
497
|
-
/* @__PURE__ */ e(
|
|
497
|
+
/* @__PURE__ */ e(Te, { controlId: "formulario", children: /* @__PURE__ */ e(
|
|
498
498
|
ke,
|
|
499
499
|
{
|
|
500
500
|
type: "switch",
|