react-ecosistema-unp 0.1.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.
@@ -0,0 +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: #2e465f}*{padding:0%;margin:0%;box-sizing:border-box;font-family:roboto,sans-serif}body{min-height:calc(100vh - 8px)}.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;width:30px;object-fit:cover;border-radius:50%;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:7px;margin-left:88px;margin-right:10px;transition:margin-left .5s ease;z-index:1;height:calc(100vh - 17px)}.menu-open .main-section{margin-left:290px;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%)}}
@@ -0,0 +1,22 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { createContext as c, useState as o, useEffect as l } from "react";
3
+ const u = c(void 0), g = ({ children: r }) => {
4
+ const [e, s] = o(
5
+ localStorage.getItem("access_token")
6
+ ), [t, a] = o(
7
+ localStorage.getItem("user_token")
8
+ );
9
+ return l(() => {
10
+ e && t ? (localStorage.setItem("access_token", e), localStorage.setItem("user_token", t)) : (localStorage.removeItem("access_token"), localStorage.removeItem("user_token"));
11
+ }, [e, t]), /* @__PURE__ */ n(
12
+ u.Provider,
13
+ {
14
+ value: { authToken: e, setAuthToken: s, userToken: t, setUserToken: a },
15
+ children: r
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ u as AuthContext,
21
+ g as AuthProvider
22
+ };
@@ -0,0 +1,11 @@
1
+ import e from "react";
2
+ import { AuthContext as o } from "../contexts/AuthContex.js";
3
+ const n = () => {
4
+ const t = e.useContext(o);
5
+ if (!t)
6
+ throw new Error("useAuthId must be used within an AuthProvider");
7
+ return t;
8
+ };
9
+ export {
10
+ n as useAuthId
11
+ };
@@ -0,0 +1,6 @@
1
+ import { a as e } from "../../FinSesionHook-CqFXvTMK.js";
2
+ import "./AuthHook.js";
3
+ import "../services/FinSesionService.js";
4
+ export {
5
+ e as useFinalizarSesion
6
+ };
@@ -0,0 +1,20 @@
1
+ import { urlRequest as t } from "../../utils/Url.js";
2
+ const a = async (e) => {
3
+ try {
4
+ const r = await fetch(`${t}/inicio/salida/`, {
5
+ method: "POST",
6
+ headers: {
7
+ Authorization: `Bearer ${e}`,
8
+ "Content-Type": "application/json"
9
+ }
10
+ }), o = await r.json();
11
+ if (!r.ok)
12
+ throw console.log(o.error), new Error(o.error);
13
+ return o;
14
+ } catch (r) {
15
+ throw new Error(r.message);
16
+ }
17
+ };
18
+ export {
19
+ a as FinSesionService
20
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,8 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { AuthContextType } from '../types/AuthTypes';
3
+ declare const AuthContext: React.Context<AuthContextType | undefined>;
4
+ interface AuthProviderProps {
5
+ children: ReactNode;
6
+ }
7
+ declare const AuthProvider: React.FC<AuthProviderProps>;
8
+ export { AuthContext, AuthProvider };
@@ -0,0 +1,2 @@
1
+ declare const useAuthId: () => import('../types/AuthTypes').AuthContextType;
2
+ export { useAuthId };
@@ -0,0 +1,3 @@
1
+ export declare const useFinalizarSesion: () => {
2
+ FinSesion: () => void;
3
+ };
@@ -0,0 +1 @@
1
+ export declare const FinSesionService: (accessToken: string) => Promise<any>;
@@ -0,0 +1,6 @@
1
+ export interface AuthContextType {
2
+ authToken: string | null;
3
+ userToken: string | null;
4
+ setAuthToken: React.Dispatch<React.SetStateAction<string | null>>;
5
+ setUserToken: React.Dispatch<React.SetStateAction<string | null>>;
6
+ }
@@ -0,0 +1 @@
1
+ export { MenuLateral } from './shared/components/MenuLateral';
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface MenuLateralProps {
3
+ onToggle: () => void;
4
+ isOpen: boolean;
5
+ }
6
+ declare const MenuLateral: React.FC<MenuLateralProps>;
7
+ export { MenuLateral };
@@ -0,0 +1,7 @@
1
+ export declare const urlBase = "https://ecosistemapruebas.unp.gov.co";
2
+ export declare const urlRequest = "https://ecosistemapruebas.unp.gov.co/api-eiunp";
3
+ export declare const urlMedidasEmergencia = "/sistema/medidas-emergencia";
4
+ export declare const urlActaReunion = "/sistema/acta-reunion";
5
+ export declare const urlSolicitudViatico = "/sistema/solicitud-viaticos";
6
+ export declare const urlCertificadoLaboral = "/sg/gc/certificados-contratos-ops";
7
+ export declare const urlHome = "/sitema/inicio";
package/dist/main.js ADDED
@@ -0,0 +1,4 @@
1
+ import { MenuLateral as a } from "./shared/components/MenuLateral.js";
2
+ export {
3
+ a as MenuLateral
4
+ };
@@ -0,0 +1,353 @@
1
+ import { jsx as a, Fragment as O, jsxs as n } from "react/jsx-runtime";
2
+ import d, { useState as b, useEffect as N } from "react";
3
+ import { u as C, a as B } from "../../FinSesionHook-CqFXvTMK.js";
4
+ import { urlBase as P, urlCertificadoLaboral as S } from "../../utils/Url.js";
5
+ import '../../assets/MenuLateral.css';class h extends Error {
6
+ }
7
+ h.prototype.name = "InvalidTokenError";
8
+ function j(e) {
9
+ return decodeURIComponent(atob(e).replace(/(.)/g, (t, r) => {
10
+ let i = r.charCodeAt(0).toString(16).toUpperCase();
11
+ return i.length < 2 && (i = "0" + i), "%" + i;
12
+ }));
13
+ }
14
+ function H(e) {
15
+ let t = e.replace(/-/g, "+").replace(/_/g, "/");
16
+ switch (t.length % 4) {
17
+ case 0:
18
+ break;
19
+ case 2:
20
+ t += "==";
21
+ break;
22
+ case 3:
23
+ t += "=";
24
+ break;
25
+ default:
26
+ throw new Error("base64 string is not of the correct length");
27
+ }
28
+ try {
29
+ return j(t);
30
+ } catch {
31
+ return atob(t);
32
+ }
33
+ }
34
+ function x(e, t) {
35
+ if (typeof e != "string")
36
+ throw new h("Invalid token specified: must be a string");
37
+ t || (t = {});
38
+ const r = t.header === !0 ? 0 : 1, i = e.split(".")[r];
39
+ if (typeof i != "string")
40
+ throw new h(`Invalid token specified: missing part #${r + 1}`);
41
+ let c;
42
+ try {
43
+ c = H(i);
44
+ } catch (s) {
45
+ throw new h(`Invalid token specified: invalid base64 for part #${r + 1} (${s.message})`);
46
+ }
47
+ try {
48
+ return JSON.parse(c);
49
+ } catch (s) {
50
+ throw new h(`Invalid token specified: invalid json for part #${r + 1} (${s.message})`);
51
+ }
52
+ }
53
+ var k = {
54
+ color: void 0,
55
+ size: void 0,
56
+ className: void 0,
57
+ style: void 0,
58
+ attr: void 0
59
+ }, w = d.createContext && /* @__PURE__ */ d.createContext(k), E = ["attr", "size", "title"];
60
+ function A(e, t) {
61
+ if (e == null) return {};
62
+ var r = I(e, t), i, c;
63
+ if (Object.getOwnPropertySymbols) {
64
+ var s = Object.getOwnPropertySymbols(e);
65
+ for (c = 0; c < s.length; c++)
66
+ i = s[c], !(t.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(e, i) && (r[i] = e[i]);
67
+ }
68
+ return r;
69
+ }
70
+ function I(e, t) {
71
+ if (e == null) return {};
72
+ var r = {};
73
+ for (var i in e)
74
+ if (Object.prototype.hasOwnProperty.call(e, i)) {
75
+ if (t.indexOf(i) >= 0) continue;
76
+ r[i] = e[i];
77
+ }
78
+ return r;
79
+ }
80
+ function f() {
81
+ return f = Object.assign ? Object.assign.bind() : function(e) {
82
+ for (var t = 1; t < arguments.length; t++) {
83
+ var r = arguments[t];
84
+ for (var i in r)
85
+ Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
86
+ }
87
+ return e;
88
+ }, f.apply(this, arguments);
89
+ }
90
+ function z(e, t) {
91
+ var r = Object.keys(e);
92
+ if (Object.getOwnPropertySymbols) {
93
+ var i = Object.getOwnPropertySymbols(e);
94
+ t && (i = i.filter(function(c) {
95
+ return Object.getOwnPropertyDescriptor(e, c).enumerable;
96
+ })), r.push.apply(r, i);
97
+ }
98
+ return r;
99
+ }
100
+ function g(e) {
101
+ for (var t = 1; t < arguments.length; t++) {
102
+ var r = arguments[t] != null ? arguments[t] : {};
103
+ t % 2 ? z(Object(r), !0).forEach(function(i) {
104
+ V(e, i, r[i]);
105
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : z(Object(r)).forEach(function(i) {
106
+ Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(r, i));
107
+ });
108
+ }
109
+ return e;
110
+ }
111
+ function V(e, t, r) {
112
+ return t = L(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
113
+ }
114
+ function L(e) {
115
+ var t = T(e, "string");
116
+ return typeof t == "symbol" ? t : t + "";
117
+ }
118
+ function T(e, t) {
119
+ if (typeof e != "object" || !e) return e;
120
+ var r = e[Symbol.toPrimitive];
121
+ if (r !== void 0) {
122
+ var i = r.call(e, t || "default");
123
+ if (typeof i != "object") return i;
124
+ throw new TypeError("@@toPrimitive must return a primitive value.");
125
+ }
126
+ return (t === "string" ? String : Number)(e);
127
+ }
128
+ function y(e) {
129
+ return e && e.map((t, r) => /* @__PURE__ */ d.createElement(t.tag, g({
130
+ key: r
131
+ }, t.attr), y(t.child)));
132
+ }
133
+ function l(e) {
134
+ return (t) => /* @__PURE__ */ d.createElement(D, f({
135
+ attr: g({}, e.attr)
136
+ }, t), y(e.child));
137
+ }
138
+ function D(e) {
139
+ var t = (r) => {
140
+ var {
141
+ attr: i,
142
+ size: c,
143
+ title: s
144
+ } = e, v = A(e, E), u = c || r.size || "1em", o;
145
+ return r.className && (o = r.className), e.className && (o = (o ? o + " " : "") + e.className), /* @__PURE__ */ d.createElement("svg", f({
146
+ stroke: "currentColor",
147
+ fill: "currentColor",
148
+ strokeWidth: "0"
149
+ }, r.attr, i, v, {
150
+ className: o,
151
+ style: g(g({
152
+ color: e.color || r.color
153
+ }, r.style), e.style),
154
+ height: u,
155
+ width: u,
156
+ xmlns: "http://www.w3.org/2000/svg"
157
+ }), s && /* @__PURE__ */ d.createElement("title", null, s), e.children);
158
+ };
159
+ return w !== void 0 ? /* @__PURE__ */ d.createElement(w.Consumer, null, (r) => t(r)) : t(k);
160
+ }
161
+ function U(e) {
162
+ return l({ 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);
163
+ }
164
+ function R(e) {
165
+ return l({ 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);
166
+ }
167
+ function $(e) {
168
+ return l({ 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);
169
+ }
170
+ function F(e) {
171
+ return l({ 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);
172
+ }
173
+ function q(e) {
174
+ return l({ 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);
175
+ }
176
+ function G(e) {
177
+ return l({ 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);
178
+ }
179
+ function Q(e) {
180
+ return l({ 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);
181
+ }
182
+ function W(e) {
183
+ return l({ 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);
184
+ }
185
+ function X(e) {
186
+ return l({ 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);
187
+ }
188
+ function J(e) {
189
+ return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h16v2H4zm4 5h12v2H8zm5 5h7v2h-7z" }, child: [] }] })(e);
190
+ }
191
+ function K(e) {
192
+ return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, child: [] }] })(e);
193
+ }
194
+ function Y(e) {
195
+ return l({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M11.63 21.91A.9.9 0 0 0 12 22a1 1 0 0 0 .41-.09C22 17.67 21 7 21 6.9a1 1 0 0 0-.55-.79l-8-4a1 1 0 0 0-.9 0l-8 4A1 1 0 0 0 3 6.9c0 .1-.92 10.77 8.63 15.01zM5 7.63l7-3.51 7 3.51c.05 2-.27 9-7 12.27C5.26 16.63 4.94 9.64 5 7.63z" }, child: [] }, { tag: "path", attr: { d: "M11.06 16h2v-3h3.01v-2h-3.01V8h-2v3h-3v2h3v3z" }, child: [] }] })(e);
196
+ }
197
+ function Z(e) {
198
+ return l({ 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);
199
+ }
200
+ function ee(e) {
201
+ return l({ 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);
202
+ }
203
+ const ne = ({ onToggle: e, isOpen: t }) => {
204
+ const [r, i] = b(!0), [c, s] = b(null), v = t ? "sidebar-bar-panel open" : "sidebar-bar-panel", u = C(), { FinSesion: o } = B();
205
+ if (N(() => {
206
+ const m = localStorage.getItem("user_token");
207
+ if (m) {
208
+ const p = x(m);
209
+ s(p);
210
+ }
211
+ i(!1);
212
+ }, []), N(() => {
213
+ const m = setTimeout(() => {
214
+ const p = localStorage.getItem("user_token");
215
+ if (p) {
216
+ const M = x(p);
217
+ s(M);
218
+ }
219
+ }, 2e3);
220
+ return () => clearTimeout(m);
221
+ }, []), r)
222
+ return /* @__PURE__ */ a(O, {});
223
+ const _ = () => {
224
+ u("/sistema/usuario");
225
+ };
226
+ return /* @__PURE__ */ a("div", { className: `container-fluid ${t ? "menu-open" : ""}`, children: /* @__PURE__ */ n("div", { className: v, children: [
227
+ /* @__PURE__ */ n("div", { className: "logo_details", children: [
228
+ /* @__PURE__ */ a(
229
+ "img",
230
+ {
231
+ src: "/logo-unp-gris.png",
232
+ alt: "Logo",
233
+ className: "icon logo-image"
234
+ }
235
+ ),
236
+ /* @__PURE__ */ a("div", { className: "logo-name", children: "EI-UNP" }),
237
+ t ? /* @__PURE__ */ a(
238
+ J,
239
+ {
240
+ className: "bx bx-menu i",
241
+ id: "btn",
242
+ onClick: e
243
+ }
244
+ ) : /* @__PURE__ */ a(K, { className: "bx bx-menu i", id: "btn", onClick: e })
245
+ ] }),
246
+ /* @__PURE__ */ n("ul", { className: "nav-list-panel", children: [
247
+ /* @__PURE__ */ n("li", { children: [
248
+ /* @__PURE__ */ n("a", { href: "", children: [
249
+ /* @__PURE__ */ a(G, { className: "bx bx-home i2" }),
250
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Inicio" })
251
+ ] }),
252
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Inicio" })
253
+ ] }),
254
+ /* @__PURE__ */ n("li", { children: [
255
+ /* @__PURE__ */ n("a", { href: "", children: [
256
+ /* @__PURE__ */ a(X, { className: "bx bx-map-pin i2" }),
257
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Mapa del proceso" })
258
+ ] }),
259
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Mapa del proceso" })
260
+ ] }),
261
+ /* @__PURE__ */ n("li", { children: [
262
+ /* @__PURE__ */ n("a", { href: "", children: [
263
+ /* @__PURE__ */ a(R, { className: "bx bx-book-alt i2" }),
264
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Manuales de usuario" })
265
+ ] }),
266
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Manual de usuario" })
267
+ ] }),
268
+ /* @__PURE__ */ a("div", { style: { paddingLeft: "15px", paddingRight: "15px" }, children: /* @__PURE__ */ a("hr", { style: { borderTop: "1px solid white" } }) }),
269
+ /* @__PURE__ */ n("li", { children: [
270
+ /* @__PURE__ */ n("a", { href: "https://www.unp.gov.co/", target: "_blank", children: [
271
+ /* @__PURE__ */ a(Q, { className: "bx bx-link-alt i2" }),
272
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Portal UNP" })
273
+ ] }),
274
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Portal UNP" })
275
+ ] }),
276
+ /* @__PURE__ */ n("li", { children: [
277
+ /* @__PURE__ */ n(
278
+ "a",
279
+ {
280
+ href: "https://login.microsoftonline.com/common/oauth2/authorize?client_id=00000002-0000-0ff1-ce00-000000000000&redirect_uri=https%3a%2f%2foutlook.office365.com%2fowa%2f&resource=00000002-0000-0ff1-ce00-000000000000&response_mode=form_post&response_type=code+id_token&scope=openid&msafed=1&msaredir=1&client-request-id=f8488f2f-33b7-d769-3dc8-fe71d263f531&protectedtoken=true&claims=%7b%22id_token%22%3a%7b%22xms_cc%22%3a%7b%22values%22%3a%5b%22CP1%22%5d%7d%7d%7d&nonce=638372347486593361.36439678-d731-49f6-a49f-cc0594f2abb0&state=Dcs7EoAgDEVR0HE5kc8LCVkO4NBaun1T3NPdGEI4vcOL2Qkq6NAKVu7SDJByQxgm2ulRFGLbQsOltXIz3nXMmaO_V3q_kX4",
281
+ target: "_blank",
282
+ children: [
283
+ /* @__PURE__ */ a($, { className: "bx bx-envelope i2" }),
284
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Correo institucional" })
285
+ ]
286
+ }
287
+ ),
288
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Correo institucional" })
289
+ ] }),
290
+ /* @__PURE__ */ n("li", { children: [
291
+ /* @__PURE__ */ n("a", { href: "http://intranet.unp.gov.co/", target: "_blank", children: [
292
+ /* @__PURE__ */ a(ee, { className: "bx bxl-redux i2" }),
293
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Acceso directo a Intranet" })
294
+ ] }),
295
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Acceso directo a Intranet" })
296
+ ] }),
297
+ /* @__PURE__ */ n("li", { children: [
298
+ /* @__PURE__ */ n("a", { href: "https://mesadeservicios.unp.gov.co/HEAT/", target: "_blank", children: [
299
+ /* @__PURE__ */ a(F, { className: "bx bx-error-circle i2" }),
300
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Mesa de servicios" })
301
+ ] }),
302
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Mesa de servicios" })
303
+ ] }),
304
+ /* @__PURE__ */ a("div", { style: { paddingLeft: "15px", paddingRight: "15px" }, children: /* @__PURE__ */ a("hr", { style: { borderTop: "1px solid white" } }) }),
305
+ /* @__PURE__ */ n("li", { children: [
306
+ /* @__PURE__ */ n("a", { href: "", children: [
307
+ /* @__PURE__ */ a(Y, { className: "bx i2" }),
308
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Medida de emergencia" })
309
+ ] }),
310
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Medida de emergencia" })
311
+ ] }),
312
+ /* @__PURE__ */ n("li", { children: [
313
+ /* @__PURE__ */ n("a", { href: "", children: [
314
+ /* @__PURE__ */ a(U, { className: "bx i2" }),
315
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Acta de reunión" })
316
+ ] }),
317
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Acta de reunión" })
318
+ ] }),
319
+ /* @__PURE__ */ n("li", { children: [
320
+ /* @__PURE__ */ n("a", { href: "", children: [
321
+ /* @__PURE__ */ a(Z, { className: "bx i2" }),
322
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Solicitud de viáticos" })
323
+ ] }),
324
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Solicitud de viáticos" })
325
+ ] }),
326
+ /* @__PURE__ */ n("li", { children: [
327
+ /* @__PURE__ */ n("a", { href: `${P}${S}`, children: [
328
+ /* @__PURE__ */ a(q, { className: "bx i2" }),
329
+ /* @__PURE__ */ a("span", { className: "link_name", children: "Certificados laborales (OPS)" })
330
+ ] }),
331
+ /* @__PURE__ */ a("span", { className: "tooltip", children: "Certificados laborales (OPS)" })
332
+ ] })
333
+ ] }),
334
+ /* @__PURE__ */ a("div", { className: "profile-content", children: /* @__PURE__ */ n("div", { className: "profile", children: [
335
+ /* @__PURE__ */ a(
336
+ "div",
337
+ {
338
+ className: "profile-detail",
339
+ onClick: _,
340
+ style: { cursor: "pointer" },
341
+ children: c && /* @__PURE__ */ n("div", { className: "name-job", style: { marginTop: "3px" }, children: [
342
+ /* @__PURE__ */ a("div", { className: "name", children: c.access_nuser }),
343
+ /* @__PURE__ */ a("div", { className: "job", children: c.acces_linker })
344
+ ] })
345
+ }
346
+ ),
347
+ /* @__PURE__ */ a(W, { className: "icon", onClick: o })
348
+ ] }) })
349
+ ] }) });
350
+ };
351
+ export {
352
+ ne as MenuLateral
353
+ };
@@ -0,0 +1,10 @@
1
+ const s = "https://ecosistemapruebas.unp.gov.co", i = "https://ecosistemapruebas.unp.gov.co/api-eiunp", t = "/sistema/medidas-emergencia", o = "/sistema/acta-reunion", e = "/sistema/solicitud-viaticos", c = "/sg/gc/certificados-contratos-ops", a = "/sitema/inicio";
2
+ export {
3
+ o as urlActaReunion,
4
+ s as urlBase,
5
+ c as urlCertificadoLaboral,
6
+ a as urlHome,
7
+ t as urlMedidasEmergencia,
8
+ i as urlRequest,
9
+ e as urlSolicitudViatico
10
+ };
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "react-ecosistema-unp",
3
+ "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
+ "private": false,
5
+ "version": "0.1.0",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/lib/main.d.ts",
10
+ "default": "./dist/main.js"
11
+ }
12
+ },
13
+ "files": ["dist"],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/EcosistemaUNP/react-ecosistema-unp"
17
+ },
18
+ "sideEffects": [
19
+ "**/*.css"
20
+ ],
21
+ "scripts": {
22
+ "dev": "vite",
23
+ "build": "tsc -b ./tsconfig.lib.json && vite build",
24
+ "prepublishOnly": "npm run build",
25
+ "lint": "eslint .",
26
+ "preview": "vite preview"
27
+ },
28
+ "peerDependencies": {
29
+ "@types/node": "^22.10.10",
30
+ "bootstrap": "^5.3.3",
31
+ "jwt-decode": "^4.0.0",
32
+ "lottie-react": "^2.4.1",
33
+ "react": "^18.3.1",
34
+ "react-bootstrap": "^2.10.9",
35
+ "react-dom": "^18.3.1",
36
+ "react-icons": "^5.4.0",
37
+ "react-router": "^7.1.5",
38
+ "react-toastify": "^11.0.3",
39
+ "vite-plugin-dts": "^4.5.0"
40
+ },
41
+ "devDependencies": {
42
+ "@eslint/js": "^9.17.0",
43
+ "@types/react": "^18.3.18",
44
+ "@types/react-dom": "^18.3.5",
45
+ "@vitejs/plugin-react": "^4.3.4",
46
+ "eslint": "^9.17.0",
47
+ "eslint-plugin-react-hooks": "^5.0.0",
48
+ "eslint-plugin-react-refresh": "^0.4.16",
49
+ "glob": "^11.0.1",
50
+ "globals": "^15.14.0",
51
+ "typescript": "~5.6.2",
52
+ "typescript-eslint": "^8.18.2",
53
+ "vite": "^6.0.5",
54
+ "vite-plugin-lib-inject-css": "^2.2.1"
55
+ }
56
+ }