react-ecosistema-unp 1.6.10 → 1.7.0-pre.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/assets/MenuLateral.css +1 -1
- package/dist/assets/Tabla.css +1 -1
- package/dist/auth/contexts/AuthContex.js +10 -10
- package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +1 -1
- package/dist/cards/tarjeta-info/TarjetaInfo.js +5 -4
- package/dist/data/tarjeta-datos/TarjetaDatos.js +1 -1
- package/dist/{index-BpmHFDVa.js → index-Cpp73e44.js} +7 -7
- package/dist/lib/utils/websocket-manager/WebSocketContext.d.ts +13 -0
- package/dist/lib/utils/websocket-manager/useWebSocket.d.ts +1 -0
- package/dist/lib/utils/websocket-manager/websocket.d.ts +19 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/shared/app-list/AppList.js +1 -1
- package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
- package/dist/shared/menu-lateral/MenuLateral.js +179 -97
- package/dist/tables/tabla-registros/buscador/Buscador.js +4 -4
- package/dist/tables/tabla-registros/tabla/Tabla.js +14 -14
- package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
- package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
- package/dist/ui/icono-tooltip/IconoTooltip.js +1 -1
- package/dist/ui/items-modal/ItemsModal.js +5 -5
- package/dist/utils/unp-historico/UnpHistorico.js +4 -3
- package/dist/utils/websocket-manager/WebSocketContext.js +23 -0
- package/dist/utils/websocket-manager/useWebSocket.js +16 -0
- package/dist/utils/websocket-manager/websocket.js +62 -0
- package/dist/utils.js +15 -10
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Domine:wght@400;500;600;700&family=Noto+Sans:wght@300;600&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;1,100;1,300;1,400;1,500&display=swap";:root{--color-default: #303d50;--color-white: #fff;--color-body: #ffffff;--color-light: #e0e0e0;--Color-complementario: #2e4b6b}*{padding:0%;margin:0%;box-sizing:border-box;font-family:roboto,sans-serif}body{min-height:calc(100vh - .5rem)}.sidebar-bar-panel{min-height:100vh;width:78px;padding:6px 14px;background-color:var(--color-default);transition:all .5s ease;position:fixed;top:0;left:0;z-index:0}.sidebar-bar-panel.open{width:280px;z-index:0}.sidebar-bar-panel .logo_details{height:60px;display:flex;align-items:center;position:relative}.logo-image{height:30px;max-width:30px;min-width:0px;object-fit:contain;margin-right:10px;margin-left:4px}.sidebar-bar-panel .logo_details .icon{opacity:0;transition:all .5s ease}.sidebar-bar-panel .logo_details .logo-name{color:var(--color-white);font-size:18px;font-weight:600;padding-left:0;max-width:180px;min-width:0px;opacity:0;transition:all .5s ease;z-index:0}.sidebar-bar-panel.open .logo_details .icon,.sidebar-bar-panel.open .logo_details .logo-name{opacity:1}.sidebar-bar-panel .logo_details #btn{position:absolute;top:50%;right:0;transform:translateY(-50%);font-size:23px;text-align:center;cursor:pointer;transition:all .5s ease}.sidebar-bar-panel.open .logo_details #btn{text-align:right;left:84.5%}.sidebar-bar-panel .i{color:var(--color-white);height:30px;line-height:60px;min-width:50px;font-size:25px;text-align:center;font-weight:400}.sidebar-bar-panel .i2{color:var(--color-white);height:20px;line-height:60px;min-width:50px;font-size:25px;text-align:center;font-weight:300}.sidebar-bar-panel .nav-list-panel{margin-top:20px;height:100%;padding:0}.sidebar-bar-panel li{position:relative;margin:20px 0;list-style:none}.sidebar-bar-panel li .tooltip{position:absolute;top:-20px;left:calc(100% + 15px);z-index:9000!important;background-color:var(--color-white);box-shadow:0 5px 10px #0000004d;padding:6px 14px;font-size:15px;font-weight:500;border-radius:5px;white-space:nowrap;opacity:0;pointer-events:none}.sidebar-bar-panel li:hover .tooltip{opacity:1;pointer-events:auto;transition:all .4s ease;top:50%;transform:translateY(-50%)}.sidebar-bar-panel.open li .tooltip{display:none}.sidebar-bar-panel li a{display:flex;height:100%;width:100%;align-items:center;text-decoration:none;background-color:var(--color-default);position:relative;transition:all .5s ease;z-index:12}.sidebar-bar-panel li a:after{content:"";position:absolute;width:100%;height:35px;transform:scaleX(0);background-color:var(--color-white);border-radius:5px;transition:transform .3s ease-in-out;transform-origin:left;z-index:-2}.sidebar-bar-panel li a:hover:after{transform:scaleX(1);color:var(--color-default);height:35px}.sidebar-bar-panel li a .link_name{color:var(--color-white);font-size:15px;font-weight:500;white-space:nowrap;pointer-events:auto;transition:all .4s ease;pointer-events:none;opacity:0}.sidebar-bar-panel li a:hover .link_name,.sidebar-bar-panel li a:hover .i{transition:all .5s ease;color:var(--color-default)}.sidebar-bar-panel li a:hover .bx{color:var(--color-default)}.sidebar-bar-panel.open li a .link_name{opacity:1;pointer-events:auto}.sidebar-bar-panel .profile-content{position:absolute;color:var(--color-white);bottom:0;left:0;width:100%}.sidebar-bar-panel .profile-content .profile{position:relative;padding:18px;height:75px;background:none;transition:all .5s ease}.sidebar-bar-panel .profile-content .profile a{text-decoration:none;color:var(--color-white)}.sidebar-bar-panel.open .profile-content .profile{background-color:var(--Color-complementario)}.profile-content .profile .profile-detail{display:flex;align-items:center;opacity:0;pointer-events:auto;white-space:nowrap}.sidebar-bar-panel.open .profile .profile-detail{opacity:1;pointer-events:auto}.sidebar-bar-panel.open .profile .icon{left:90%;background:none}.sidebar-bar-panel .profile .icon:hover{cursor:pointer}.profile .profile-detail .name-job{margin-left:10px}.profile .profile-detail .name{font-size:15px;font-weight:600}.profile .profile-detail .job{font-size:12px;font-weight:400}.profile .icon{position:absolute;left:50%;bottom:23%;transform:translate(-50%);min-width:40px;line-height:60px;height:38px;text-align:center;transition:all .5s ease;background:var(--Color-complementario);padding:7px;border-radius:7px}.main-section{margin-top:0;margin-left:78px;margin-right:0;transition:margin-left .5s ease;z-index:1}.menu-open .main-section{margin-left:280px;z-index:1}.bg-custom{background-color:#303d50;border:#ffffff}.bg-custom:hover{background-color:#2e465f}.custom-collapse{animation:slideFromRight .5s ease forwards}.custom-collapse-reverse{animation:slideToRight .5s ease forwards}@keyframes slideFromRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideToRight{0%{transform:translate(0)}to{transform:translate(100%)}}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Domine:wght@400;500;600;700&family=Noto+Sans:wght@300;600&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;1,100;1,300;1,400;1,500&display=swap";:root{--color-default: #303d50;--color-white: #fff;--color-body: #ffffff;--color-light: #e0e0e0;--Color-complementario: #2e4b6b}*{padding:0%;margin:0%;box-sizing:border-box;font-family:roboto,sans-serif}body{min-height:calc(100vh - .5rem)}.sidebar-bar-panel{min-height:100vh;width:78px;padding:6px 14px;background-color:var(--color-default);transition:all .5s ease;position:fixed;top:0;left:0;z-index:0}.sidebar-bar-panel.open{width:280px;z-index:0}.sidebar-bar-panel .logo_details{height:60px;display:flex;align-items:center;position:relative}.logo-image{height:30px;max-width:30px;min-width:0px;object-fit:contain;margin-right:10px;margin-left:4px}.sidebar-bar-panel .logo_details .icon{opacity:0;transition:all .5s ease}.sidebar-bar-panel .logo_details .logo-name{color:var(--color-white);font-size:18px;font-weight:600;padding-left:0;max-width:180px;min-width:0px;opacity:0;transition:all .5s ease;z-index:0}.sidebar-bar-panel.open .logo_details .icon,.sidebar-bar-panel.open .logo_details .logo-name{opacity:1}.sidebar-bar-panel .logo_details #btn{position:absolute;top:50%;right:0;transform:translateY(-50%);font-size:23px;text-align:center;cursor:pointer;transition:all .5s ease}.sidebar-bar-panel.open .logo_details #btn{text-align:right;left:84.5%}.sidebar-bar-panel .i{color:var(--color-white);height:30px;line-height:60px;min-width:50px;font-size:25px;text-align:center;font-weight:400}.sidebar-bar-panel .i2{color:var(--color-white);height:20px;line-height:60px;min-width:50px;font-size:25px;text-align:center;font-weight:300}.sidebar-bar-panel .nav-list-panel{margin-top:20px;height:100%;padding:0}.sidebar-bar-panel li{position:relative;margin:20px 0;list-style:none}.sidebar-bar-panel li .tooltip{position:absolute;top:-20px;left:calc(100% + 15px);z-index:9000!important;background-color:var(--color-white);box-shadow:0 5px 10px #0000004d;padding:6px 14px;font-size:15px;font-weight:500;border-radius:5px;white-space:nowrap;opacity:0;pointer-events:none}.sidebar-bar-panel li:hover .tooltip{opacity:1;pointer-events:auto;transition:all .4s ease;top:50%;transform:translateY(-50%)}.sidebar-bar-panel.open li .tooltip{display:none}.sidebar-bar-panel li a{display:flex;height:100%;width:100%;align-items:center;text-decoration:none;background-color:var(--color-default);position:relative;transition:all .5s ease;z-index:12}.sidebar-bar-panel li a:after{content:"";position:absolute;width:100%;height:35px;transform:scaleX(0);background-color:var(--color-white);border-radius:5px;transition:transform .3s ease-in-out;transform-origin:left;z-index:-2}.sidebar-bar-panel li a:hover:after{transform:scaleX(1);color:var(--color-default);height:35px}.sidebar-bar-panel li a .link_name{color:var(--color-white);font-size:15px;font-weight:500;white-space:nowrap;pointer-events:auto;transition:all .4s ease;pointer-events:none;opacity:0}.sidebar-bar-panel li a:hover .link_name,.sidebar-bar-panel li a:hover .i{transition:all .5s ease;color:var(--color-default)}.sidebar-bar-panel li a:hover .bx{color:var(--color-default)}.sidebar-bar-panel.open li a .link_name{opacity:1;pointer-events:auto}.sidebar-bar-panel .profile-content{position:absolute;color:var(--color-white);bottom:0;left:0;width:100%}.sidebar-bar-panel .profile-content .profile{position:relative;padding:18px;height:75px;background:none;transition:all .5s ease}.sidebar-bar-panel .profile-content .profile a{text-decoration:none;color:var(--color-white)}.sidebar-bar-panel.open .profile-content .profile{background-color:var(--Color-complementario)}.profile-content .profile .profile-detail{display:flex;align-items:center;opacity:0;pointer-events:auto;white-space:nowrap}.sidebar-bar-panel.open .profile .profile-detail{opacity:1;pointer-events:auto}.sidebar-bar-panel.open .profile .icon{left:90%;background:none}.sidebar-bar-panel .profile .icon:hover{cursor:pointer}.profile .profile-detail .name-job{margin-left:10px}.profile .profile-detail .name{font-size:15px;font-weight:600}.profile .profile-detail .job{font-size:12px;font-weight:400}.profile .icon{position:absolute;left:50%;bottom:23%;transform:translate(-50%);min-width:40px;line-height:60px;height:38px;text-align:center;transition:all .5s ease;background:var(--Color-complementario);padding:7px;border-radius:7px}.main-section{margin-top:0;margin-left:78px;margin-right:0;transition:margin-left .5s ease;z-index:1}.menu-open .main-section{margin-left:280px;z-index:1}.bg-custom{background-color:#303d50;border:#ffffff}.bg-custom:hover{background-color:#2e465f}.custom-collapse{animation:slideFromRight .5s ease forwards}.custom-collapse-reverse{animation:slideToRight .5s ease forwards}@keyframes slideFromRight{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slideToRight{0%{transform:translate(0)}to{transform:translate(100%)}}.checkmark__circle{stroke-dasharray:166;stroke-dashoffset:166;stroke-width:2;stroke-miterlimit:10;stroke:#7ac142;fill:none;animation:stroke-check .6s cubic-bezier(.65,0,.45,1) forwards}.checkmark{width:20px;height:20px;border-radius:50%;display:block;stroke-width:3;stroke:#fff;stroke-miterlimit:10;margin:10% auto;box-shadow:inset 0 0 #7ac142;animation:fill-check .4s ease-in-out .4s forwards,scale-check .3s ease-in-out .9s both}.checkmark__check{transform-origin:50% 50%;stroke-dasharray:48;stroke-dashoffset:48;animation:stroke-check .3s cubic-bezier(.65,0,.45,1) .8s forwards}@keyframes stroke-check{to{stroke-dashoffset:0}}@keyframes scale-check{0%,to{transform:none}50%{transform:scale3d(1.1,1.1,1)}}@keyframes fill-check{to{box-shadow:inset 0 0 0 30px #98e2609a}}.x-checkmark{width:20px;height:20px;border-radius:50%;display:block;stroke-width:3;stroke:#fff;stroke-miterlimit:10;margin:10% auto;box-shadow:inset 0 0 #c14242;animation:fill-x .4s ease-in-out .4s forwards,scale-x .3s ease-in-out .9s both}.x-checkmark_circle{stroke-dasharray:166;stroke-dashoffset:166;stroke-width:2;stroke-miterlimit:10;stroke:#c14242;fill:none;animation:stroke-x .6s cubic-bezier(.65,0,.45,1) forwards}.x-checkmark_check{transform-origin:50% 50%;stroke-dasharray:48;stroke-dashoffset:48;animation:stroke-x .3s cubic-bezier(.65,0,.45,1) .8s forwards}@keyframes stroke-x{to{stroke-dashoffset:0}}@keyframes scale-x{0%,to{transform:none}50%{transform:scale3d(1.1,1.1,1)}}@keyframes fill-x{to{box-shadow:inset 0 0 0 30px #e260609a}}.ripplemark{width:20px;height:20px;display:block;margin:10% auto;background-color:#60c4e29a;border-radius:50%;overflow:visible}.ripplemark__wave{fill:none;stroke:#fff;stroke-width:5;opacity:.8;transform-origin:center;animation:ripple-wave 1.5s ease-out infinite}@keyframes ripple-wave{0%{r:0;opacity:.8}70%{r:20;opacity:.2}to{r:25;opacity:0}}
|
package/dist/assets/Tabla.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.table_container{display:flex;flex-direction:column;gap:1.5rem;text-align:center;margin-top:.75rem}.table-scroll{position:relative;max-height:70vh;overflow-y:auto;overflow-x:auto;margin-right:5px;margin-left:5px;border-radius:10px;box-shadow:0 2px 12px #00000016;background:#f9fafa}.table-scroll th,.table-scroll td{white-space:nowrap;word-wrap:normal;min-width:100px;padding-left:15px;padding-right:15px}.table-scroll::-webkit-scrollbar{width:20px}.table-scroll::-webkit-scrollbar-track{background:linear-gradient(to bottom right,#f9fafa,#f9fafa,#fff);border-top-right-radius:10px;border-bottom-right-radius:10px}.table-scroll::-webkit-scrollbar-thumb{background-color:#303d50;border-radius:10px;border:6px solid transparent;background-clip:padding-box}thead tr th{background-color:#fff!important;border-bottom:1px solid #DEE2E6!important;position:sticky;top:0;z-index:2}.table td,.table th{text-align:center;vertical-align:middle}.table{margin-bottom:0!important}.table-header-unp{background-color:#f9fafa!important;color:#2c2c2c!important;font-weight:600;font-size:1.1rem;padding:1.25rem 0!important}.cell-with-modal{transition:background-color .3s ease}.cell-with-modal:hover{background-color:#303d50!important;color:#fff;font-weight:600}.data-count,.data-unp{font-weight:500;font-size:.85rem;margin-top:1rem;margin-left:5px;margin-right:5px;color:#8c8c8f}.animation-container{gap:2rem;height:73vh;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#919191}@media (min-width: 1800px){.table-scroll{max-height:75vh}}.search-column-input{border-radius:11px!important;padding-right:40px!important;box-shadow:0 1px 6px #00000012!important}.cell-redirect:hover{background-color:#
|
|
1
|
+
.table_container{display:flex;flex-direction:column;gap:1.5rem;text-align:center;margin-top:.75rem}.table-scroll{position:relative;max-height:70vh;overflow-y:auto;overflow-x:auto;margin-right:5px;margin-left:5px;border-radius:10px;box-shadow:0 2px 12px #00000016;background:#f9fafa}.table-scroll th,.table-scroll td{white-space:nowrap;word-wrap:normal;min-width:100px;padding-left:15px;padding-right:15px}.table-scroll::-webkit-scrollbar{width:20px}.table-scroll::-webkit-scrollbar-track{background:linear-gradient(to bottom right,#f9fafa,#f9fafa,#fff);border-top-right-radius:10px;border-bottom-right-radius:10px}.table-scroll::-webkit-scrollbar-thumb{background-color:#303d50;border-radius:10px;border:6px solid transparent;background-clip:padding-box}thead tr th{background-color:#fff!important;border-bottom:1px solid #DEE2E6!important;position:sticky;top:0;z-index:2}.table td,.table th{text-align:center;vertical-align:middle}.table{margin-bottom:0!important}.table-header-unp{background-color:#f9fafa!important;color:#2c2c2c!important;font-weight:600;font-size:1.1rem;padding:1.25rem 0!important}.cell-with-modal{transition:background-color .3s ease}.cell-with-modal:hover{background-color:#303d50!important;color:#fff;font-weight:600}.data-count,.data-unp{font-weight:500;font-size:.85rem;margin-top:1rem;margin-left:5px;margin-right:5px;color:#8c8c8f}.animation-container{gap:2rem;height:73vh;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#919191}@media (min-width: 1800px){.table-scroll{max-height:75vh}}.search-column-input{border-radius:11px!important;padding-right:40px!important;box-shadow:0 1px 6px #00000012!important}.cell-redirect:hover{background-color:#303d50;color:#fff;font-weight:600;cursor:pointer}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as c, useState as
|
|
3
|
-
const
|
|
4
|
-
const [o,
|
|
2
|
+
import { createContext as c, useState as e } from "react";
|
|
3
|
+
const i = c(void 0), h = ({ children: t }) => {
|
|
4
|
+
const [o, r] = e(
|
|
5
5
|
// localStorage.getItem("access_token")
|
|
6
6
|
""
|
|
7
|
-
), [
|
|
7
|
+
), [n, s] = e(
|
|
8
8
|
// localStorage.getItem("user_token")
|
|
9
9
|
""
|
|
10
10
|
);
|
|
11
|
-
return
|
|
12
|
-
|
|
11
|
+
return /* @__PURE__ */ u(
|
|
12
|
+
i.Provider,
|
|
13
13
|
{
|
|
14
|
-
value: { authToken: o, setAuthToken:
|
|
15
|
-
children:
|
|
14
|
+
value: { authToken: o, setAuthToken: r, userToken: n, setUserToken: s },
|
|
15
|
+
children: t
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
i as AuthContext,
|
|
21
|
+
h as AuthProvider
|
|
22
22
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { q as s } from "../../../index-Cpp73e44.js";
|
|
3
3
|
import '../../../assets/Bootstrap.css';/* empty css */
|
|
4
4
|
import { B as a } from "../../../Button-B87TJYml.js";
|
|
5
5
|
const d = {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as r, useRef as d, useEffect as u } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import '../../assets/UnpHistorico.css'
|
|
3
|
+
import { o as j, p } from "../../index-Cpp73e44.js";
|
|
4
|
+
import '../../assets/UnpHistorico.css';/* empty css */
|
|
5
|
+
const x = ({ icon: c, label: l, show: h = !1, children: o }) => {
|
|
5
6
|
const [e, i] = r(h), [f, s] = r(0), a = d(null);
|
|
6
7
|
return u(() => {
|
|
7
8
|
if (!a.current) return;
|
|
@@ -22,7 +23,7 @@ import '../../assets/UnpHistorico.css';const C = ({ icon: c, label: l, show: h =
|
|
|
22
23
|
onClick: () => i(!e)
|
|
23
24
|
}
|
|
24
25
|
) : /* @__PURE__ */ t(
|
|
25
|
-
|
|
26
|
+
p,
|
|
26
27
|
{
|
|
27
28
|
className: "tarjeta-info-show-button",
|
|
28
29
|
onClick: () => i(!e)
|
|
@@ -40,5 +41,5 @@ import '../../assets/UnpHistorico.css';const C = ({ icon: c, label: l, show: h =
|
|
|
40
41
|
] });
|
|
41
42
|
};
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
x as TarjetaInfo
|
|
44
45
|
};
|
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
|
|
6
|
-
import { m as t } from "../../index-
|
|
6
|
+
import { m as t } from "../../index-Cpp73e44.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
export type ConnectionStatus = 'connected' | 'connecting' | 'disconnected';
|
|
3
|
+
interface WebSocketContextType {
|
|
4
|
+
connectionStatus: ConnectionStatus;
|
|
5
|
+
connectWebSocket: (url: string) => void;
|
|
6
|
+
disconnectWebSocket: () => void;
|
|
7
|
+
sendWebSocketMessage: (data: any) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const WebSocketProvider: React.FC<{
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const useWebSocketConnection: () => WebSocketContextType;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useWebSocket: (url: string, onMessage: (data: any) => void) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type MessageHandler = (data: any) => void;
|
|
2
|
+
type ConnectionStatus = 'connected' | 'connecting' | 'disconnected';
|
|
3
|
+
declare class WebSocketService {
|
|
4
|
+
private socket;
|
|
5
|
+
private messageHandlers;
|
|
6
|
+
private statusCallbacks;
|
|
7
|
+
private url;
|
|
8
|
+
private reconnectTimer;
|
|
9
|
+
private reconnectionAttempts;
|
|
10
|
+
private setStatus;
|
|
11
|
+
subscribeToStatus(callback: (status: ConnectionStatus) => void): () => void;
|
|
12
|
+
connect(url: string): void;
|
|
13
|
+
disconnect(): void;
|
|
14
|
+
send(data: any): void;
|
|
15
|
+
subscribe(handler: MessageHandler): () => void;
|
|
16
|
+
unsubscribe(handler: MessageHandler): void;
|
|
17
|
+
}
|
|
18
|
+
export declare const webSocketService: WebSocketService;
|
|
19
|
+
export {};
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -6,3 +6,5 @@ export { useFormValidation } from './utils/validations/useFormValidation.js';
|
|
|
6
6
|
export { IsInvalidStyles } from './utils/validations/useFormValidation.js';
|
|
7
7
|
export { CaptchaEcosistema } from './utils/captcha/CaptchaEcosistema.js';
|
|
8
8
|
export { useFetchData } from './utils/fetch-data/useFetchData.js';
|
|
9
|
+
export { WebSocketProvider, useWebSocketConnection } from './utils/websocket-manager/WebSocketContext.js';
|
|
10
|
+
export { useWebSocket } from './utils/websocket-manager/useWebSocket.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useEffect as h } from "react";
|
|
3
3
|
import { F as t, e as u, f, g as v, h as z } from "../../index-CgSyrJ_X.js";
|
|
4
|
-
import { w as N } from "../../index-
|
|
4
|
+
import { w as N } from "../../index-Cpp73e44.js";
|
|
5
5
|
import { G as g } from "../../iconBase-LROS5hdG.js";
|
|
6
6
|
import { j as w } from "../../index-CuHybtft.js";
|
|
7
7
|
import { N as b } from "../../NavDropdown-ei8eIwIE.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useFinalizarSesion as t } from "../../../auth/hooks/useFinalizarSesion.js";
|
|
3
|
-
import { v as i } from "../../../index-
|
|
3
|
+
import { v as i } from "../../../index-Cpp73e44.js";
|
|
4
4
|
import '../../../assets/LogoutButton.css';const a = () => {
|
|
5
5
|
const { FinSesion: o } = t();
|
|
6
6
|
return /* @__PURE__ */ r(i, { className: "icono-logout", onClick: o });
|
|
@@ -1,75 +1,96 @@
|
|
|
1
|
-
import { jsx as a, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useNavigate as
|
|
4
|
-
import { j as
|
|
5
|
-
import { useFinalizarSesion as
|
|
6
|
-
import { urlBase as
|
|
1
|
+
import { jsx as a, Fragment as h, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useEffect as m } from "react";
|
|
3
|
+
import { useNavigate as b } from "react-router-dom";
|
|
4
|
+
import { j as p } from "../../index-CuHybtft.js";
|
|
5
|
+
import { useFinalizarSesion as z } from "../../auth/hooks/useFinalizarSesion.js";
|
|
6
|
+
import { urlBase as w, urlCertificadoLaboral as M } from "../../utils/Url.js";
|
|
7
|
+
import "../../auth/contexts/AuthContex.js";
|
|
8
|
+
import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/UnpHistorico.css';import '../../assets/MenuLateral.css';/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
|
|
12
|
+
/* empty css */
|
|
13
|
+
/* empty css */
|
|
7
14
|
import { l as B } from "../../logo_escudo_blanco-DaOI8SGq.js";
|
|
15
|
+
/* empty css */
|
|
16
|
+
/* empty css */
|
|
17
|
+
/* empty css */
|
|
18
|
+
/* empty css */
|
|
19
|
+
import "../../ui/subtitulo/Subtitulo.js";
|
|
20
|
+
/* empty css */
|
|
21
|
+
/* empty css */
|
|
22
|
+
/* empty css */
|
|
23
|
+
/* empty css */
|
|
24
|
+
/* empty css */
|
|
25
|
+
/* empty css */
|
|
26
|
+
import "../../Animacion-ThNL9iiY.js";
|
|
27
|
+
import "../../index-BUe3EJDH.js";
|
|
28
|
+
import { useWebSocketConnection as _ } from "../../utils/websocket-manager/WebSocketContext.js";
|
|
8
29
|
import { G as i } from "../../iconBase-LROS5hdG.js";
|
|
9
|
-
|
|
10
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M2 12h2a7.986 7.986 0 0 1 2.337-5.663 7.91 7.91 0 0 1 2.542-1.71 8.12 8.12 0 0 1 6.13-.041A2.488 2.488 0 0 0 17.5 7C18.886 7 20 5.886 20 4.5S18.886 2 17.5 2c-.689 0-1.312.276-1.763.725-2.431-.973-5.223-.958-7.635.059a9.928 9.928 0 0 0-3.18 2.139 9.92 9.92 0 0 0-2.14 3.179A10.005 10.005 0 0 0 2 12zm17.373 3.122c-.401.952-.977 1.808-1.71 2.541s-1.589 1.309-2.542 1.71a8.12 8.12 0 0 1-6.13.041A2.488 2.488 0 0 0 6.5 17C5.114 17 4 18.114 4 19.5S5.114 22 6.5 22c.689 0 1.312-.276 1.763-.725A9.965 9.965 0 0 0 12 22a9.983 9.983 0 0 0 9.217-6.102A9.992 9.992 0 0 0 22 12h-2a7.993 7.993 0 0 1-.627 3.122z" }, child: [] }, { tag: "path", attr: { d: "M12 7.462c-2.502 0-4.538 2.036-4.538 4.538S9.498 16.538 12 16.538s4.538-2.036 4.538-4.538S14.502 7.462 12 7.462zm0 7.076c-1.399 0-2.538-1.139-2.538-2.538S10.601 9.462 12 9.462s2.538 1.139 2.538 2.538-1.139 2.538-2.538 2.538z" }, child: [] }] })(
|
|
30
|
+
function H(e) {
|
|
31
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M2 12h2a7.986 7.986 0 0 1 2.337-5.663 7.91 7.91 0 0 1 2.542-1.71 8.12 8.12 0 0 1 6.13-.041A2.488 2.488 0 0 0 17.5 7C18.886 7 20 5.886 20 4.5S18.886 2 17.5 2c-.689 0-1.312.276-1.763.725-2.431-.973-5.223-.958-7.635.059a9.928 9.928 0 0 0-3.18 2.139 9.92 9.92 0 0 0-2.14 3.179A10.005 10.005 0 0 0 2 12zm17.373 3.122c-.401.952-.977 1.808-1.71 2.541s-1.589 1.309-2.542 1.71a8.12 8.12 0 0 1-6.13.041A2.488 2.488 0 0 0 6.5 17C5.114 17 4 18.114 4 19.5S5.114 22 6.5 22c.689 0 1.312-.276 1.763-.725A9.965 9.965 0 0 0 12 22a9.983 9.983 0 0 0 9.217-6.102A9.992 9.992 0 0 0 22 12h-2a7.993 7.993 0 0 1-.627 3.122z" }, child: [] }, { tag: "path", attr: { d: "M12 7.462c-2.502 0-4.538 2.036-4.538 4.538S9.498 16.538 12 16.538s4.538-2.036 4.538-4.538S14.502 7.462 12 7.462zm0 7.076c-1.399 0-2.538-1.139-2.538-2.538S10.601 9.462 12 9.462s2.538 1.139 2.538 2.538-1.139 2.538-2.538 2.538z" }, child: [] }] })(e);
|
|
11
32
|
}
|
|
12
|
-
function
|
|
13
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19 2H6c-1.206 0-3 .799-3 3v14c0 2.201 1.794 3 3 3h15v-2H6.012C5.55 19.988 5 19.806 5 19s.55-.988 1.012-1H21V4c0-1.103-.897-2-2-2zm0 14H5V5c0-.806.55-.988 1-1h13v12z" }, child: [] }] })(
|
|
33
|
+
function C(e) {
|
|
34
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19 2H6c-1.206 0-3 .799-3 3v14c0 2.201 1.794 3 3 3h15v-2H6.012C5.55 19.988 5 19.806 5 19s.55-.988 1.012-1H21V4c0-1.103-.897-2-2-2zm0 14H5V5c0-.806.55-.988 1-1h13v12z" }, child: [] }] })(e);
|
|
14
35
|
}
|
|
15
|
-
function
|
|
16
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 4H4c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2zm0 2v.511l-8 6.223-8-6.222V6h16zM4 18V9.044l7.386 5.745a.994.994 0 0 0 1.228 0L20 9.044 20.002 18H4z" }, child: [] }] })(
|
|
36
|
+
function S(e) {
|
|
37
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 4H4c-1.103 0-2 .897-2 2v12c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2zm0 2v.511l-8 6.223-8-6.222V6h16zM4 18V9.044l7.386 5.745a.994.994 0 0 0 1.228 0L20 9.044 20.002 18H4z" }, child: [] }] })(e);
|
|
17
38
|
}
|
|
18
|
-
function
|
|
19
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M11.953 2C6.465 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.493 2 11.953 2zM12 20c-4.411 0-8-3.589-8-8s3.567-8 7.953-8C16.391 4 20 7.589 20 12s-3.589 8-8 8z" }, child: [] }, { tag: "path", attr: { d: "M11 7h2v7h-2zm0 8h2v2h-2z" }, child: [] }] })(
|
|
39
|
+
function A(e) {
|
|
40
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M11.953 2C6.465 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.493 2 11.953 2zM12 20c-4.411 0-8-3.589-8-8s3.567-8 7.953-8C16.391 4 20 7.589 20 12s-3.589 8-8 8z" }, child: [] }, { tag: "path", attr: { d: "M11 7h2v7h-2zm0 8h2v2h-2z" }, child: [] }] })(e);
|
|
20
41
|
}
|
|
21
|
-
function
|
|
22
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19.903 8.586a.997.997 0 0 0-.196-.293l-6-6a.997.997 0 0 0-.293-.196c-.03-.014-.062-.022-.094-.033a.991.991 0 0 0-.259-.051C13.04 2.011 13.021 2 13 2H6c-1.103 0-2 .897-2 2v16c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V9c0-.021-.011-.04-.013-.062a.952.952 0 0 0-.051-.259c-.01-.032-.019-.063-.033-.093zM16.586 8H14V5.414L16.586 8zM6 20V4h6v5a1 1 0 0 0 1 1h5l.002 10H6z" }, child: [] }, { tag: "path", attr: { d: "M8 12h8v2H8zm0 4h8v2H8zm0-8h2v2H8z" }, child: [] }] })(
|
|
42
|
+
function y(e) {
|
|
43
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19.903 8.586a.997.997 0 0 0-.196-.293l-6-6a.997.997 0 0 0-.293-.196c-.03-.014-.062-.022-.094-.033a.991.991 0 0 0-.259-.051C13.04 2.011 13.021 2 13 2H6c-1.103 0-2 .897-2 2v16c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V9c0-.021-.011-.04-.013-.062a.952.952 0 0 0-.051-.259c-.01-.032-.019-.063-.033-.093zM16.586 8H14V5.414L16.586 8zM6 20V4h6v5a1 1 0 0 0 1 1h5l.002 10H6z" }, child: [] }, { tag: "path", attr: { d: "M8 12h8v2H8zm0 4h8v2H8zm0-8h2v2H8z" }, child: [] }] })(e);
|
|
23
44
|
}
|
|
24
|
-
function
|
|
25
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 0 0 .707-1.707l-9-9a.999.999 0 0 0-1.414 0l-9 9A1 1 0 0 0 3 13zm7 7v-5h4v5h-4zm2-15.586 6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z" }, child: [] }] })(
|
|
45
|
+
function L(e) {
|
|
46
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 0 0 .707-1.707l-9-9a.999.999 0 0 0-1.414 0l-9 9A1 1 0 0 0 3 13zm7 7v-5h4v5h-4zm2-15.586 6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z" }, child: [] }] })(e);
|
|
26
47
|
}
|
|
27
|
-
function
|
|
28
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4.222 19.778a4.983 4.983 0 0 0 3.535 1.462 4.986 4.986 0 0 0 3.536-1.462l2.828-2.829-1.414-1.414-2.828 2.829a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.829-2.828-1.414-1.414-2.829 2.828a5.006 5.006 0 0 0 0 7.071zm15.556-8.485a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0L9.879 7.051l1.414 1.414 2.828-2.829a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.829 2.828 1.414 1.414 2.829-2.828z" }, child: [] }, { tag: "path", attr: { d: "m8.464 16.95-1.415-1.414 8.487-8.486 1.414 1.415z" }, child: [] }] })(
|
|
48
|
+
function V(e) {
|
|
49
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4.222 19.778a4.983 4.983 0 0 0 3.535 1.462 4.986 4.986 0 0 0 3.536-1.462l2.828-2.829-1.414-1.414-2.828 2.829a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.829-2.828-1.414-1.414-2.829 2.828a5.006 5.006 0 0 0 0 7.071zm15.556-8.485a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0L9.879 7.051l1.414 1.414 2.828-2.829a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.829 2.828 1.414 1.414 2.829-2.828z" }, child: [] }, { tag: "path", attr: { d: "m8.464 16.95-1.415-1.414 8.487-8.486 1.414 1.415z" }, child: [] }] })(e);
|
|
29
50
|
}
|
|
30
|
-
function
|
|
31
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M16 13v-2H7V8l-5 4 5 4v-3z" }, child: [] }, { tag: "path", attr: { d: "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" }, child: [] }] })(
|
|
51
|
+
function T(e) {
|
|
52
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M16 13v-2H7V8l-5 4 5 4v-3z" }, child: [] }, { tag: "path", attr: { d: "M20 3h-9c-1.103 0-2 .897-2 2v4h2V5h9v14h-9v-4H9v4c0 1.103.897 2 2 2h9c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2z" }, child: [] }] })(e);
|
|
32
53
|
}
|
|
33
|
-
function
|
|
34
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "m12 17 1-2V9.858c1.721-.447 3-2 3-3.858 0-2.206-1.794-4-4-4S8 3.794 8 6c0 1.858 1.279 3.411 3 3.858V15l1 2zM10 6c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2-2-.897-2-2z" }, child: [] }, { tag: "path", attr: { d: "m16.267 10.563-.533 1.928C18.325 13.207 20 14.584 20 16c0 1.892-3.285 4-8 4s-8-2.108-8-4c0-1.416 1.675-2.793 4.267-3.51l-.533-1.928C4.197 11.54 2 13.623 2 16c0 3.364 4.393 6 10 6s10-2.636 10-6c0-2.377-2.197-4.46-5.733-5.437z" }, child: [] }] })(
|
|
54
|
+
function I(e) {
|
|
55
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "m12 17 1-2V9.858c1.721-.447 3-2 3-3.858 0-2.206-1.794-4-4-4S8 3.794 8 6c0 1.858 1.279 3.411 3 3.858V15l1 2zM10 6c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2-2-.897-2-2z" }, child: [] }, { tag: "path", attr: { d: "m16.267 10.563-.533 1.928C18.325 13.207 20 14.584 20 16c0 1.892-3.285 4-8 4s-8-2.108-8-4c0-1.416 1.675-2.793 4.267-3.51l-.533-1.928C4.197 11.54 2 13.623 2 16c0 3.364 4.393 6 10 6s10-2.636 10-6c0-2.377-2.197-4.46-5.733-5.437z" }, child: [] }] })(e);
|
|
35
56
|
}
|
|
36
|
-
function
|
|
37
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h16v2H4zm4 5h12v2H8zm5 5h7v2h-7z" }, child: [] }] })(
|
|
57
|
+
function P(e) {
|
|
58
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h16v2H4zm4 5h12v2H8zm5 5h7v2h-7z" }, child: [] }] })(e);
|
|
38
59
|
}
|
|
39
|
-
function
|
|
40
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, child: [] }] })(
|
|
60
|
+
function j(e) {
|
|
61
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, child: [] }] })(e);
|
|
41
62
|
}
|
|
42
|
-
function
|
|
43
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M3.414 13.778 2 15.192l4.949 2.121 2.122 4.95 1.414-1.414-.707-3.536L13.091 14l3.61 7.704 1.339-1.339-1.19-10.123 2.828-2.829a2 2 0 1 0-2.828-2.828l-2.903 2.903L3.824 6.297 2.559 7.563l7.644 3.67-3.253 3.253-3.536-.708z" }, child: [] }] })(
|
|
63
|
+
function E(e) {
|
|
64
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M3.414 13.778 2 15.192l4.949 2.121 2.122 4.95 1.414-1.414-.707-3.536L13.091 14l3.61 7.704 1.339-1.339-1.19-10.123 2.828-2.829a2 2 0 1 0-2.828-2.828l-2.903 2.903L3.824 6.297 2.559 7.563l7.644 3.67-3.253 3.253-3.536-.708z" }, child: [] }] })(e);
|
|
44
65
|
}
|
|
45
|
-
function
|
|
46
|
-
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M15.661 15.549a1.315 1.315 0 0 0 1.185-1.386 1.363 1.363 0 0 0-1.35-1.302h-.048a1.352 1.352 0 0 0-1.303 1.397c.024.379.179.687.391.911-.827 1.609-2.07 2.794-3.954 3.788-1.266.663-2.604.912-3.905.734-1.089-.153-1.94-.64-2.463-1.421-.78-1.185-.852-2.462-.201-3.74a5.597 5.597 0 0 1 1.658-1.931 7.88 7.88 0 0 1-.331-1.218c-3.506 2.51-3.148 5.942-2.084 7.564.794 1.184 2.415 1.941 4.19 1.941.474 0 .972-.035 1.457-.154 3.077-.592 5.409-2.438 6.747-5.16l.011-.023z" }, child: [] }, { tag: "path", attr: { d: "M19.887 12.589c-1.834-2.154-4.533-3.337-7.611-3.337h-.403c-.2-.438-.661-.711-1.183-.711h-.036c-.744 0-1.325.64-1.301 1.385.023.71.627 1.302 1.35 1.302h.059a1.332 1.332 0 0 0 1.183-.828h.439c1.824 0 3.551.532 5.126 1.574 1.206.792 2.072 1.834 2.557 3.077.425 1.019.402 2.013-.035 2.843-.675 1.302-1.812 1.988-3.314 1.988-.947 0-1.871-.296-2.345-.509-.283.235-.758.626-1.102.863 1.042.473 2.096.746 3.113.746 2.309 0 4.023-1.302 4.676-2.557.709-1.422.651-3.813-1.161-5.859l-.012.023z" }, child: [] }, { tag: "path", attr: { d: "M7.647 15.975c.023.71.626 1.302 1.35 1.302h.048a1.334 1.334 0 0 0 1.302-1.397c0-.71-.616-1.301-1.338-1.301h-.048c-.048 0-.118 0-.178.022-.982-1.657-1.397-3.434-1.242-5.349.094-1.445.567-2.7 1.42-3.742.71-.888 2.048-1.326 2.96-1.35 2.556-.048 3.622 3.138 3.704 4.404l1.184.354C16.536 5.036 14.122 3 11.813 3 9.647 3 7.647 4.574 6.842 6.884c-1.102 3.077-.379 6.036.971 8.404-.118.154-.189.426-.166.687z" }, child: [] }] })(
|
|
66
|
+
function U(e) {
|
|
67
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M15.661 15.549a1.315 1.315 0 0 0 1.185-1.386 1.363 1.363 0 0 0-1.35-1.302h-.048a1.352 1.352 0 0 0-1.303 1.397c.024.379.179.687.391.911-.827 1.609-2.07 2.794-3.954 3.788-1.266.663-2.604.912-3.905.734-1.089-.153-1.94-.64-2.463-1.421-.78-1.185-.852-2.462-.201-3.74a5.597 5.597 0 0 1 1.658-1.931 7.88 7.88 0 0 1-.331-1.218c-3.506 2.51-3.148 5.942-2.084 7.564.794 1.184 2.415 1.941 4.19 1.941.474 0 .972-.035 1.457-.154 3.077-.592 5.409-2.438 6.747-5.16l.011-.023z" }, child: [] }, { tag: "path", attr: { d: "M19.887 12.589c-1.834-2.154-4.533-3.337-7.611-3.337h-.403c-.2-.438-.661-.711-1.183-.711h-.036c-.744 0-1.325.64-1.301 1.385.023.71.627 1.302 1.35 1.302h.059a1.332 1.332 0 0 0 1.183-.828h.439c1.824 0 3.551.532 5.126 1.574 1.206.792 2.072 1.834 2.557 3.077.425 1.019.402 2.013-.035 2.843-.675 1.302-1.812 1.988-3.314 1.988-.947 0-1.871-.296-2.345-.509-.283.235-.758.626-1.102.863 1.042.473 2.096.746 3.113.746 2.309 0 4.023-1.302 4.676-2.557.709-1.422.651-3.813-1.161-5.859l-.012.023z" }, child: [] }, { tag: "path", attr: { d: "M7.647 15.975c.023.71.626 1.302 1.35 1.302h.048a1.334 1.334 0 0 0 1.302-1.397c0-.71-.616-1.301-1.338-1.301h-.048c-.048 0-.118 0-.178.022-.982-1.657-1.397-3.434-1.242-5.349.094-1.445.567-2.7 1.42-3.742.71-.888 2.048-1.326 2.96-1.35 2.556-.048 3.622 3.138 3.704 4.404l1.184.354C16.536 5.036 14.122 3 11.813 3 9.647 3 7.647 4.574 6.842 6.884c-1.102 3.077-.379 6.036.971 8.404-.118.154-.189.426-.166.687z" }, child: [] }] })(e);
|
|
47
68
|
}
|
|
48
|
-
const
|
|
49
|
-
const [
|
|
50
|
-
if (
|
|
69
|
+
const g1 = ({ onToggle: e, isOpen: c }) => {
|
|
70
|
+
const [v, g] = d(!0), [n, s] = d(null), u = c ? "sidebar-bar-panel open" : "sidebar-bar-panel", x = b(), { FinSesion: N } = z(), { connectionStatus: o } = _();
|
|
71
|
+
if (m(() => {
|
|
51
72
|
const l = sessionStorage.getItem("user_token");
|
|
52
73
|
if (l) {
|
|
53
|
-
const
|
|
54
|
-
r
|
|
74
|
+
const r = p(l);
|
|
75
|
+
s(r);
|
|
55
76
|
}
|
|
56
|
-
|
|
57
|
-
}, []),
|
|
77
|
+
g(!1);
|
|
78
|
+
}, []), m(() => {
|
|
58
79
|
const l = setTimeout(() => {
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
const
|
|
62
|
-
|
|
80
|
+
const r = sessionStorage.getItem("user_token");
|
|
81
|
+
if (r) {
|
|
82
|
+
const k = p(r);
|
|
83
|
+
s(k);
|
|
63
84
|
}
|
|
64
85
|
}, 2e3);
|
|
65
86
|
return () => clearTimeout(l);
|
|
66
|
-
}, []),
|
|
67
|
-
return /* @__PURE__ */ a(
|
|
68
|
-
const
|
|
69
|
-
|
|
87
|
+
}, []), v)
|
|
88
|
+
return /* @__PURE__ */ a(h, {});
|
|
89
|
+
const f = () => {
|
|
90
|
+
x("/unp/ecosistema/usuario");
|
|
70
91
|
};
|
|
71
|
-
return /* @__PURE__ */ a("div", { className: `container-fluid ${
|
|
72
|
-
/* @__PURE__ */
|
|
92
|
+
return /* @__PURE__ */ a("div", { className: `container-fluid ${c ? "menu-open" : ""}`, children: /* @__PURE__ */ t("div", { className: u, children: [
|
|
93
|
+
/* @__PURE__ */ t("div", { className: "logo_details", children: [
|
|
73
94
|
/* @__PURE__ */ a(
|
|
74
95
|
"img",
|
|
75
96
|
{
|
|
@@ -79,113 +100,174 @@ const J = ({ onToggle: t, isOpen: n }) => {
|
|
|
79
100
|
}
|
|
80
101
|
),
|
|
81
102
|
/* @__PURE__ */ a("div", { className: "logo-name", children: "EI - UNP" }),
|
|
82
|
-
|
|
83
|
-
|
|
103
|
+
c ? /* @__PURE__ */ a(
|
|
104
|
+
P,
|
|
84
105
|
{
|
|
85
106
|
className: "bx bx-menu i",
|
|
86
107
|
id: "btn",
|
|
87
|
-
onClick:
|
|
108
|
+
onClick: e
|
|
88
109
|
}
|
|
89
|
-
) : /* @__PURE__ */ a(
|
|
110
|
+
) : /* @__PURE__ */ a(j, { className: "bx bx-menu i", id: "btn", onClick: e })
|
|
90
111
|
] }),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */ a(
|
|
112
|
+
/* @__PURE__ */ t("ul", { className: "nav-list-panel", children: [
|
|
113
|
+
/* @__PURE__ */ t("li", { children: [
|
|
114
|
+
/* @__PURE__ */ t("a", { href: "", children: [
|
|
115
|
+
/* @__PURE__ */ a(L, { className: "bx bx-home i2" }),
|
|
95
116
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Inicio" })
|
|
96
117
|
] }),
|
|
97
118
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Inicio" })
|
|
98
119
|
] }),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */ a(
|
|
120
|
+
/* @__PURE__ */ t("li", { children: [
|
|
121
|
+
/* @__PURE__ */ t("a", { href: "", children: [
|
|
122
|
+
/* @__PURE__ */ a(I, { className: "bx bx-map-pin i2" }),
|
|
102
123
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Mapa del proceso" })
|
|
103
124
|
] }),
|
|
104
125
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Mapa del proceso" })
|
|
105
126
|
] }),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */ a(
|
|
127
|
+
/* @__PURE__ */ t("li", { children: [
|
|
128
|
+
/* @__PURE__ */ t("a", { href: "", children: [
|
|
129
|
+
/* @__PURE__ */ a(C, { className: "bx bx-book-alt i2" }),
|
|
109
130
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Manuales de usuario" })
|
|
110
131
|
] }),
|
|
111
132
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Manual de usuario" })
|
|
112
133
|
] }),
|
|
113
134
|
/* @__PURE__ */ a("div", { style: { paddingLeft: "15px", paddingRight: "15px" }, children: /* @__PURE__ */ a("hr", { style: { borderTop: "1px solid white" } }) }),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */ a(
|
|
135
|
+
/* @__PURE__ */ t("li", { children: [
|
|
136
|
+
/* @__PURE__ */ t("a", { href: "https://www.unp.gov.co/", target: "_blank", children: [
|
|
137
|
+
/* @__PURE__ */ a(V, { className: "bx bx-link-alt i2" }),
|
|
117
138
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Portal UNP" })
|
|
118
139
|
] }),
|
|
119
140
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Portal UNP" })
|
|
120
141
|
] }),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ t("li", { children: [
|
|
143
|
+
/* @__PURE__ */ t(
|
|
123
144
|
"a",
|
|
124
145
|
{
|
|
125
146
|
href: "https://login.microsoftonline.com/common/oauth2/authorize?client_id=00000002-0000-0ff1-ce00-000000000000",
|
|
126
147
|
target: "_blank",
|
|
127
148
|
children: [
|
|
128
|
-
/* @__PURE__ */ a(
|
|
149
|
+
/* @__PURE__ */ a(S, { className: "bx bx-envelope i2" }),
|
|
129
150
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Correo institucional" })
|
|
130
151
|
]
|
|
131
152
|
}
|
|
132
153
|
),
|
|
133
154
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Correo institucional" })
|
|
134
155
|
] }),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */ a(
|
|
156
|
+
/* @__PURE__ */ t("li", { children: [
|
|
157
|
+
/* @__PURE__ */ t("a", { href: "http://intranet.unp.gov.co/", target: "_blank", children: [
|
|
158
|
+
/* @__PURE__ */ a(U, { className: "bx bxl-redux i2" }),
|
|
138
159
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Acceso directo a Intranet" })
|
|
139
160
|
] }),
|
|
140
161
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Acceso directo a Intranet" })
|
|
141
162
|
] }),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */ a(
|
|
163
|
+
/* @__PURE__ */ t("li", { children: [
|
|
164
|
+
/* @__PURE__ */ t("a", { href: "https://mesadeservicios.unp.gov.co/HEAT/", target: "_blank", children: [
|
|
165
|
+
/* @__PURE__ */ a(A, { className: "bx bx-error-circle i2" }),
|
|
145
166
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Mesa de servicios" })
|
|
146
167
|
] }),
|
|
147
168
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Mesa de servicios" })
|
|
148
169
|
] }),
|
|
149
170
|
/* @__PURE__ */ a("div", { style: { paddingLeft: "15px", paddingRight: "15px" }, children: /* @__PURE__ */ a("hr", { style: { borderTop: "1px solid white" } }) }),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ t("li", { children: [
|
|
172
|
+
/* @__PURE__ */ t("a", { href: "", children: [
|
|
152
173
|
/* @__PURE__ */ a(H, { className: "bx i2" }),
|
|
153
174
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Acta de reunión" })
|
|
154
175
|
] }),
|
|
155
176
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Acta de reunión" })
|
|
156
177
|
] }),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */ a(
|
|
178
|
+
/* @__PURE__ */ t("li", { children: [
|
|
179
|
+
/* @__PURE__ */ t("a", { href: "", children: [
|
|
180
|
+
/* @__PURE__ */ a(E, { className: "bx i2" }),
|
|
160
181
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Solicitud de viáticos" })
|
|
161
182
|
] }),
|
|
162
183
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Solicitud de viáticos" })
|
|
163
184
|
] }),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */ a(
|
|
185
|
+
/* @__PURE__ */ t("li", { children: [
|
|
186
|
+
/* @__PURE__ */ t("a", { href: `${w}${M}`, target: "_blank", children: [
|
|
187
|
+
/* @__PURE__ */ a(y, { className: "bx i2" }),
|
|
167
188
|
/* @__PURE__ */ a("span", { className: "link_name", children: "Certificados contratistas" })
|
|
168
189
|
] }),
|
|
169
190
|
/* @__PURE__ */ a("span", { className: "tooltip", children: "Certificados contratistas" })
|
|
170
191
|
] })
|
|
171
192
|
] }),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */ a(
|
|
174
|
-
"
|
|
193
|
+
/* @__PURE__ */ t("div", { className: "profile-content", children: [
|
|
194
|
+
!c && /* @__PURE__ */ a(h, { children: o === "connected" ? /* @__PURE__ */ t(
|
|
195
|
+
"svg",
|
|
175
196
|
{
|
|
176
|
-
className: "
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
children:
|
|
180
|
-
/* @__PURE__ */ a(
|
|
181
|
-
|
|
182
|
-
|
|
197
|
+
className: "checkmark",
|
|
198
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
199
|
+
viewBox: "0 0 52 52",
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ a(
|
|
202
|
+
"circle",
|
|
203
|
+
{
|
|
204
|
+
className: "checkmark__circle",
|
|
205
|
+
cx: "26",
|
|
206
|
+
cy: "26",
|
|
207
|
+
r: "25",
|
|
208
|
+
fill: "none"
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ a("path", { className: "checkmark__check", fill: "none", d: "M14.1 27.2l7.1 7.2 16.7-16.8" })
|
|
212
|
+
]
|
|
183
213
|
}
|
|
184
|
-
)
|
|
185
|
-
|
|
186
|
-
|
|
214
|
+
) : o === "connecting" ? /* @__PURE__ */ t(
|
|
215
|
+
"svg",
|
|
216
|
+
{
|
|
217
|
+
className: "ripplemark",
|
|
218
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
219
|
+
viewBox: "0 0 52 52",
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ a("circle", { className: "ripplemark__wave", cx: "26", cy: "26", r: "0" }),
|
|
222
|
+
/* @__PURE__ */ a("circle", { className: "ripplemark__wave", cx: "26", cy: "26", r: "0", style: { animationDelay: "0.75s" } })
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
) : /* @__PURE__ */ t(
|
|
226
|
+
"svg",
|
|
227
|
+
{
|
|
228
|
+
className: "x-checkmark",
|
|
229
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
230
|
+
viewBox: "0 0 52 52",
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ a(
|
|
233
|
+
"circle",
|
|
234
|
+
{
|
|
235
|
+
className: "x-checkmark_circle",
|
|
236
|
+
cx: "26",
|
|
237
|
+
cy: "26",
|
|
238
|
+
r: "25",
|
|
239
|
+
fill: "none"
|
|
240
|
+
}
|
|
241
|
+
),
|
|
242
|
+
/* @__PURE__ */ a(
|
|
243
|
+
"path",
|
|
244
|
+
{
|
|
245
|
+
className: "x-checkmark_check",
|
|
246
|
+
fill: "none",
|
|
247
|
+
d: "M14.1 14.1l23.8 23.8 m0,-23.8 l-23.8,23.8"
|
|
248
|
+
}
|
|
249
|
+
)
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
) }),
|
|
253
|
+
/* @__PURE__ */ t("div", { className: "profile", children: [
|
|
254
|
+
/* @__PURE__ */ a(
|
|
255
|
+
"div",
|
|
256
|
+
{
|
|
257
|
+
className: "profile-detail",
|
|
258
|
+
onClick: f,
|
|
259
|
+
style: { cursor: "pointer" },
|
|
260
|
+
children: n && /* @__PURE__ */ t("div", { className: "name-job", style: { marginTop: "3px" }, children: [
|
|
261
|
+
/* @__PURE__ */ a("div", { className: "name text-truncate", style: { width: "200px" }, children: n.datos_basicos.nombre }),
|
|
262
|
+
/* @__PURE__ */ a("div", { className: "job" })
|
|
263
|
+
] })
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
/* @__PURE__ */ a(T, { className: "icon", onClick: N })
|
|
267
|
+
] })
|
|
268
|
+
] })
|
|
187
269
|
] }) });
|
|
188
270
|
};
|
|
189
271
|
export {
|
|
190
|
-
|
|
272
|
+
g1 as MenuLateral
|
|
191
273
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { u as s } from "../../../index-Cpp73e44.js";
|
|
3
3
|
import { F as i, a as l } from "../../../FormGroup-BLpFcIN5.js";
|
|
4
4
|
import '../../../assets/Buscador.css';const d = ({ onSearch: r }) => {
|
|
5
5
|
const n = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
6
|
-
return /* @__PURE__ */ a("div", { className: "search-container", children: /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ a("div", { className: "search-container", children: /* @__PURE__ */ t(i, { className: "d-flex align-items-center mx-1 position-relative", children: [
|
|
7
7
|
/* @__PURE__ */ a(
|
|
8
8
|
l,
|
|
9
9
|
{
|
|
@@ -16,7 +16,7 @@ import '../../../assets/Buscador.css';const d = ({ onSearch: r }) => {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
),
|
|
19
|
-
/* @__PURE__ */ a(
|
|
19
|
+
/* @__PURE__ */ a(s, { className: "input-icon" })
|
|
20
20
|
] }) });
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import _, { useState as j } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { t as A } from "../../../index-Cpp73e44.js";
|
|
4
4
|
import { a as G, b as R, c as E } from "../../../index-CgSyrJ_X.js";
|
|
5
5
|
import { T as z } from "../../../Table-C5ydZooy.js";
|
|
6
6
|
import { F as M, a as O } from "../../../FormGroup-BLpFcIN5.js";
|
|
@@ -10,7 +10,7 @@ import '../../../assets/Tabla.css';const L = ({
|
|
|
10
10
|
displayedData: a,
|
|
11
11
|
// tableData,
|
|
12
12
|
hasMoreData: h,
|
|
13
|
-
setHasMoreData:
|
|
13
|
+
setHasMoreData: m,
|
|
14
14
|
visibleData: v,
|
|
15
15
|
setVisibleData: x,
|
|
16
16
|
handleCellClick: N,
|
|
@@ -20,25 +20,25 @@ import '../../../assets/Tabla.css';const L = ({
|
|
|
20
20
|
enableColumnSearch: k,
|
|
21
21
|
columnSearch: u,
|
|
22
22
|
handleColumnSearch: b,
|
|
23
|
-
enableColumnSorter:
|
|
23
|
+
enableColumnSorter: C
|
|
24
24
|
}) => {
|
|
25
|
-
const [i,
|
|
25
|
+
const [i, T] = j({
|
|
26
26
|
key: null,
|
|
27
27
|
direction: null
|
|
28
|
-
}),
|
|
28
|
+
}), F = (e) => {
|
|
29
29
|
if (g) {
|
|
30
30
|
const o = e / g * 100;
|
|
31
31
|
return o <= 25 ? { backgroundColor: "#3AB34A", color: "#FFFFFF" } : o <= 50 ? { backgroundColor: "#F8EB10", color: "#000000" } : o <= 75 ? { backgroundColor: "#F79122", color: "#000000" } : { backgroundColor: "#E91720", color: "#FFFFFF" };
|
|
32
32
|
}
|
|
33
33
|
return { backgroundColor: "transparent", color: "inherit" };
|
|
34
|
-
},
|
|
34
|
+
}, B = (e) => {
|
|
35
35
|
const { scrollTop: o, clientHeight: t, scrollHeight: n } = e.currentTarget;
|
|
36
36
|
n - o <= t + 50 && h && x((l) => {
|
|
37
37
|
const s = l + 5;
|
|
38
|
-
return s >= a.length &&
|
|
38
|
+
return s >= a.length && m(!1), Math.min(s, a.length);
|
|
39
39
|
});
|
|
40
40
|
}, S = (e) => {
|
|
41
|
-
|
|
41
|
+
T((o) => ({
|
|
42
42
|
key: e,
|
|
43
43
|
direction: o.key === e && o.direction === "asc" ? "desc" : "asc"
|
|
44
44
|
}));
|
|
@@ -59,18 +59,18 @@ import '../../../assets/Tabla.css';const L = ({
|
|
|
59
59
|
return typeof t == "number" && typeof n == "number" ? i.direction === "asc" ? t - n : n - t : typeof t == "string" && typeof n == "string" ? i.direction === "asc" ? t.localeCompare(n) : n.localeCompare(t) : 0;
|
|
60
60
|
});
|
|
61
61
|
})(), f = i.direction === "asc" || i.direction === "desc" ? H : a;
|
|
62
|
-
return /* @__PURE__ */ r("div", { className: "table_container", children: /* @__PURE__ */ r("div", { className: "table-scroll", onScroll:
|
|
62
|
+
return /* @__PURE__ */ r("div", { className: "table_container", children: /* @__PURE__ */ r("div", { className: "table-scroll", onScroll: B, children: /* @__PURE__ */ d(z, { striped: !0, hover: !0, children: [
|
|
63
63
|
/* @__PURE__ */ d("thead", { children: [
|
|
64
64
|
/* @__PURE__ */ r("tr", { children: p.map((e, o) => /* @__PURE__ */ d(
|
|
65
65
|
"th",
|
|
66
66
|
{
|
|
67
67
|
className: "table-header-unp",
|
|
68
|
-
onClick: () => (e.sorter ||
|
|
68
|
+
onClick: () => (e.sorter || C) && S(e.key),
|
|
69
69
|
style: { cursor: k ? "pointer" : "default" },
|
|
70
70
|
children: [
|
|
71
71
|
e.label,
|
|
72
72
|
" ",
|
|
73
|
-
e.sorter ||
|
|
73
|
+
e.sorter || C ? i.key === e.key ? i.direction === "asc" ? /* @__PURE__ */ r(G, {}) : /* @__PURE__ */ r(R, {}) : /* @__PURE__ */ r(E, {}) : null
|
|
74
74
|
]
|
|
75
75
|
},
|
|
76
76
|
o
|
|
@@ -106,7 +106,7 @@ import '../../../assets/Tabla.css';const L = ({
|
|
|
106
106
|
{
|
|
107
107
|
onClick: () => N(t, e),
|
|
108
108
|
style: {
|
|
109
|
-
cursor: t.hasModal ? "pointer" : "default"
|
|
109
|
+
cursor: t.hasModal || t.redirectTo ? "pointer" : "default"
|
|
110
110
|
},
|
|
111
111
|
className: t.redirectTo ? "cell-redirect" : t.hasModal ? "cell-with-modal" : "",
|
|
112
112
|
children: t.key === "diasHabiles" ? /* @__PURE__ */ r(
|
|
@@ -123,10 +123,10 @@ import '../../../assets/Tabla.css';const L = ({
|
|
|
123
123
|
padding: "8px",
|
|
124
124
|
borderRadius: "100px",
|
|
125
125
|
width: "40px",
|
|
126
|
-
backgroundColor:
|
|
126
|
+
backgroundColor: F(
|
|
127
127
|
e.diasHabiles
|
|
128
128
|
).backgroundColor,
|
|
129
|
-
color:
|
|
129
|
+
color: F(
|
|
130
130
|
e.diasHabiles
|
|
131
131
|
).color
|
|
132
132
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as s, Fragment as N, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import p, { useState as o } from "react";
|
|
3
|
-
import { n as v } from "../../index-
|
|
3
|
+
import { n as v } from "../../index-Cpp73e44.js";
|
|
4
4
|
import '../../assets/ContenidoModal.css';/* empty css */
|
|
5
5
|
const x = ({ title: u, modalContent: i, children: d }) => {
|
|
6
6
|
const [a, l] = o(0), [m, c] = o(!0), [r, n] = o(!1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, Fragment as N, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m, useEffect as p } from "react";
|
|
3
|
-
import { n as v } from "../../index-
|
|
3
|
+
import { n as v } from "../../index-Cpp73e44.js";
|
|
4
4
|
import '../../assets/ContenidoModal.css';/* empty css */
|
|
5
5
|
const y = ({ title: d, children: h, buttons: s, isShowing: i, setIsShowing: u = () => {
|
|
6
6
|
} }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as L, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { useState as M } from "react";
|
|
3
|
-
import { F as A, a as U, b as j, c as B, d as J, e as W, f as z, g as P, h as Y, i as q, j as g, k as h, l as G, m as H } from "../../index-
|
|
3
|
+
import { F as A, a as U, b as j, c as B, d as J, e as W, f as z, g as P, h as Y, i as q, j as g, k as h, l as G, m as H } from "../../index-Cpp73e44.js";
|
|
4
4
|
import '../../assets/IconoTooltip.css';/* empty css */
|
|
5
5
|
const _ = ({ recordType: x, taken: o = !0, customIcon: l }) => {
|
|
6
6
|
const [a, b] = M(!1);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { useNavigate as
|
|
3
|
-
import {
|
|
2
|
+
import { useNavigate as d } from "react-router-dom";
|
|
3
|
+
import { r as i, s as n } from "../../index-Cpp73e44.js";
|
|
4
4
|
import { G as c } from "../../iconBase-LROS5hdG.js";
|
|
5
5
|
import '../../assets/ItemsModal.css';/* empty css */
|
|
6
6
|
function m(l) {
|
|
7
7
|
return c({ tag: "svg", attr: { viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M 15 4 L 15 20.5625 L 9.71875 15.28125 L 8.28125 16.71875 L 15.28125 23.71875 L 16 24.40625 L 16.71875 23.71875 L 23.71875 16.71875 L 22.28125 15.28125 L 17 20.5625 L 17 4 Z M 7 26 L 7 28 L 25 28 L 25 26 Z" }, child: [] }] })(l);
|
|
8
8
|
}
|
|
9
9
|
const N = ({ sections: l }) => {
|
|
10
|
-
const e =
|
|
10
|
+
const e = d();
|
|
11
11
|
return /* @__PURE__ */ t("div", { className: "listado-tarjetas", children: l.map((a, r) => /* @__PURE__ */ o("div", { className: "tarjeta-listado-row", children: [
|
|
12
12
|
/* @__PURE__ */ o(
|
|
13
13
|
"div",
|
|
@@ -27,8 +27,8 @@ const N = ({ sections: l }) => {
|
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
29
|
className: "tarjeta-listado-download-container",
|
|
30
|
-
onClick: (
|
|
31
|
-
|
|
30
|
+
onClick: (s) => {
|
|
31
|
+
s.stopPropagation(), a.handleDownload && a.handleDownload();
|
|
32
32
|
},
|
|
33
33
|
children: /* @__PURE__ */ t(m, { className: "tarjeta-listado-download-icon" })
|
|
34
34
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as t, Fragment as s, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as l, useEffect as N } from "react";
|
|
3
|
-
import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/UnpHistorico.css';/* empty css
|
|
3
|
+
import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/UnpHistorico.css';/* empty css */
|
|
4
|
+
/* empty css */
|
|
4
5
|
/* empty css */
|
|
5
6
|
import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
|
|
6
7
|
/* empty css */
|
|
@@ -21,7 +22,7 @@ import "react-router-dom";
|
|
|
21
22
|
/* empty css */
|
|
22
23
|
import { Animacion as v } from "../../ui/animacion/Animacion.js";
|
|
23
24
|
import { T as g } from "../../Table-C5ydZooy.js";
|
|
24
|
-
const
|
|
25
|
+
const G = ({ endpoint: h, nuip: r }) => {
|
|
25
26
|
const [c, m] = l({
|
|
26
27
|
sintesisHechos1: !1,
|
|
27
28
|
sintesisHehcos2: !1
|
|
@@ -155,5 +156,5 @@ const B = ({ endpoint: h, nuip: r }) => {
|
|
|
155
156
|
] }) });
|
|
156
157
|
};
|
|
157
158
|
export {
|
|
158
|
-
|
|
159
|
+
G as UnpHistorico
|
|
159
160
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as u, useState as i, useEffect as b, useMemo as d, useContext as S } from "react";
|
|
3
|
+
import { webSocketService as t } from "./websocket.js";
|
|
4
|
+
const n = u(void 0), m = ({ children: e }) => {
|
|
5
|
+
const [o, c] = i("disconnected");
|
|
6
|
+
b(() => t.subscribeToStatus(c), []);
|
|
7
|
+
const s = d(() => ({
|
|
8
|
+
connectionStatus: o,
|
|
9
|
+
connectWebSocket: t.connect,
|
|
10
|
+
disconnectWebSocket: t.disconnect,
|
|
11
|
+
sendWebSocketMessage: t.send
|
|
12
|
+
}), [o]);
|
|
13
|
+
return /* @__PURE__ */ r(n.Provider, { value: s, children: e });
|
|
14
|
+
}, x = () => {
|
|
15
|
+
const e = S(n);
|
|
16
|
+
if (e === void 0)
|
|
17
|
+
throw new Error("useWebSocket debe usarse dentro de un WebSocketProvider");
|
|
18
|
+
return e;
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
m as WebSocketProvider,
|
|
22
|
+
x as useWebSocketConnection
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useEffect as b } from "react";
|
|
2
|
+
import { webSocketService as e } from "./websocket.js";
|
|
3
|
+
const i = (c, s) => {
|
|
4
|
+
b(() => {
|
|
5
|
+
e.connect(c);
|
|
6
|
+
const t = (r) => {
|
|
7
|
+
s(r);
|
|
8
|
+
}, o = e.subscribe(t);
|
|
9
|
+
return () => {
|
|
10
|
+
o(), e.unsubscribe(t);
|
|
11
|
+
};
|
|
12
|
+
}, [c, s]);
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
i as useWebSocket
|
|
16
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var r = (c, t, e) => t in c ? i(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
|
|
3
|
+
var s = (c, t, e) => r(c, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
class a {
|
|
5
|
+
constructor() {
|
|
6
|
+
s(this, "socket", null);
|
|
7
|
+
s(this, "messageHandlers", /* @__PURE__ */ new Set());
|
|
8
|
+
s(this, "statusCallbacks", []);
|
|
9
|
+
s(this, "url", null);
|
|
10
|
+
s(this, "reconnectTimer", null);
|
|
11
|
+
s(this, "reconnectionAttempts", 0);
|
|
12
|
+
}
|
|
13
|
+
// Método para actualizar estado y notificar a los suscriptores
|
|
14
|
+
setStatus(t) {
|
|
15
|
+
this.statusCallbacks.forEach((e) => e(t));
|
|
16
|
+
}
|
|
17
|
+
// Permite suscribirse a cambios de estado
|
|
18
|
+
subscribeToStatus(t) {
|
|
19
|
+
return this.statusCallbacks.push(t), () => {
|
|
20
|
+
this.statusCallbacks = this.statusCallbacks.filter((e) => e !== t);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
connect(t) {
|
|
24
|
+
this.socket || (this.url = t, this.setStatus("connecting"), this.socket = new WebSocket(t), this.socket.onopen = () => {
|
|
25
|
+
console.log(`✅ WebSocket conectado a ${t}`), this.setStatus("connected"), this.reconnectionAttempts = 0, this.reconnectTimer && clearTimeout(this.reconnectTimer), this.reconnectTimer = null;
|
|
26
|
+
}, this.socket.onmessage = (e) => {
|
|
27
|
+
try {
|
|
28
|
+
const n = JSON.parse(e.data);
|
|
29
|
+
this.messageHandlers.forEach((o) => o(n));
|
|
30
|
+
} catch (n) {
|
|
31
|
+
console.error("❌ Error parseando mensaje WebSocket", n);
|
|
32
|
+
}
|
|
33
|
+
}, this.socket.onclose = () => {
|
|
34
|
+
if (console.warn("🔌 WebSocket cerrado. Reintentando..."), this.socket = null, !this.reconnectTimer) {
|
|
35
|
+
let e = 3e3;
|
|
36
|
+
this.setStatus("connecting"), this.reconnectionAttempts > 5 && (e = 3e4, this.reconnectionAttempts = 0, this.setStatus("disconnected")), this.reconnectTimer = setTimeout(() => {
|
|
37
|
+
this.reconnectTimer = null, this.url && (this.reconnectionAttempts++, this.connect(this.url));
|
|
38
|
+
}, e);
|
|
39
|
+
}
|
|
40
|
+
}, this.socket.onerror = (e) => {
|
|
41
|
+
var n;
|
|
42
|
+
console.error("⚠️ WebSocket error:", e), this.setStatus("disconnected"), (n = this.socket) == null || n.close();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
disconnect() {
|
|
46
|
+
this.socket && (this.socket.close(), this.socket = null), this.setStatus("disconnected");
|
|
47
|
+
}
|
|
48
|
+
send(t) {
|
|
49
|
+
var e;
|
|
50
|
+
((e = this.socket) == null ? void 0 : e.readyState) === WebSocket.OPEN && this.socket.send(JSON.stringify(t));
|
|
51
|
+
}
|
|
52
|
+
subscribe(t) {
|
|
53
|
+
return this.messageHandlers.add(t), () => this.unsubscribe(t);
|
|
54
|
+
}
|
|
55
|
+
unsubscribe(t) {
|
|
56
|
+
this.messageHandlers.delete(t);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const l = new a();
|
|
60
|
+
export {
|
|
61
|
+
l as webSocketService
|
|
62
|
+
};
|
package/dist/utils.js
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { AuthProvider as
|
|
1
|
+
import { AuthProvider as r } from "./auth/contexts/AuthContex.js";
|
|
2
2
|
import { ProtectedRoute as m } from "./utils/components/ProtectedRoute.js";
|
|
3
|
-
import { UserRoute as
|
|
3
|
+
import { UserRoute as s } from "./utils/components/UserRoute.js";
|
|
4
4
|
import { UnpHistorico as f } from "./utils/unp-historico/UnpHistorico.js";
|
|
5
|
-
import { IsInvalidStyles as x, useFormValidation as
|
|
6
|
-
import { CaptchaEcosistema as
|
|
7
|
-
import { useFetchData as
|
|
5
|
+
import { IsInvalidStyles as x, useFormValidation as a } from "./utils/validations/useFormValidation.js";
|
|
6
|
+
import { CaptchaEcosistema as n } from "./utils/captcha/CaptchaEcosistema.js";
|
|
7
|
+
import { useFetchData as S } from "./utils/fetch-data/useFetchData.js";
|
|
8
|
+
import { WebSocketProvider as h, useWebSocketConnection as k } from "./utils/websocket-manager/WebSocketContext.js";
|
|
9
|
+
import { useWebSocket as v } from "./utils/websocket-manager/useWebSocket.js";
|
|
8
10
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
r as AuthProvider,
|
|
12
|
+
n as CaptchaEcosistema,
|
|
11
13
|
x as IsInvalidStyles,
|
|
12
14
|
m as ProtectedRoute,
|
|
13
15
|
f as UnpHistorico,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
s as UserRoute,
|
|
17
|
+
h as WebSocketProvider,
|
|
18
|
+
S as useFetchData,
|
|
19
|
+
a as useFormValidation,
|
|
20
|
+
v as useWebSocket,
|
|
21
|
+
k as useWebSocketConnection
|
|
17
22
|
};
|