react-ecosistema-unp 1.6.9 → 1.6.10-pre.1
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/Tabla.css +1 -1
- package/dist/lib/tables/tabla-registros/tabla/Tabla.d.ts +1 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/tables/tabla-registros/tabla/Tabla.js +5 -5
- package/dist/utils/components/ProtectedRoute.js +7 -6
- package/dist/utils/components/UserRoute.js +6 -5
- package/dist/utils.js +11 -9
- package/package.json +1 -1
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}
|
|
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:#ee8f22;color:#fff;font-weight:600}
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ 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 { default as fetchInterceptor } from './utils/components/fetchInterceptor.js';
|
|
@@ -31,13 +31,13 @@ import '../../../assets/Tabla.css';const L = ({
|
|
|
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
|
+
}, T = (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
38
|
return s >= a.length && F(!1), Math.min(s, a.length);
|
|
39
39
|
});
|
|
40
|
-
},
|
|
40
|
+
}, S = (e) => {
|
|
41
41
|
B((o) => ({
|
|
42
42
|
key: e,
|
|
43
43
|
direction: o.key === e && o.direction === "asc" ? "desc" : "asc"
|
|
@@ -59,13 +59,13 @@ 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: T, 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 || m) &&
|
|
68
|
+
onClick: () => (e.sorter || m) && S(e.key),
|
|
69
69
|
style: { cursor: k ? "pointer" : "default" },
|
|
70
70
|
children: [
|
|
71
71
|
e.label,
|
|
@@ -108,7 +108,7 @@ import '../../../assets/Tabla.css';const L = ({
|
|
|
108
108
|
style: {
|
|
109
109
|
cursor: t.hasModal ? "pointer" : "default"
|
|
110
110
|
},
|
|
111
|
-
className: t.hasModal ? "cell-with-modal" : "",
|
|
111
|
+
className: t.redirectTo ? "cell-redirect" : t.hasModal ? "cell-with-modal" : "",
|
|
112
112
|
children: t.key === "diasHabiles" ? /* @__PURE__ */ r(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useEffect as p } from "react";
|
|
3
3
|
import { useNavigate as w, useLocation as u, Outlet as k } from "react-router-dom";
|
|
4
4
|
import { j as v } from "../../index-CuHybtft.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import "./fetchInterceptor.js";
|
|
6
|
+
const W = () => {
|
|
7
|
+
const [i, e] = h(!1), r = w(), c = u(), o = `${window.location.protocol}//${window.location.host}/`;
|
|
7
8
|
return p(() => {
|
|
8
9
|
(async () => {
|
|
9
10
|
try {
|
|
@@ -34,8 +35,8 @@ const V = () => {
|
|
|
34
35
|
} finally {
|
|
35
36
|
}
|
|
36
37
|
})();
|
|
37
|
-
}, [r]), i ? /* @__PURE__ */
|
|
38
|
+
}, [r]), i ? /* @__PURE__ */ m(k, {}) : null;
|
|
38
39
|
};
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
W as ProtectedRoute
|
|
41
42
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as i, useEffect as s } from "react";
|
|
3
3
|
import { useNavigate as l, Outlet as c } from "react-router-dom";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import "./fetchInterceptor.js";
|
|
5
|
+
const w = () => {
|
|
6
|
+
const [e, r] = i(!1), n = l(), o = `${window.location.protocol}//${window.location.host}/`;
|
|
6
7
|
return s(() => {
|
|
7
8
|
(async () => {
|
|
8
9
|
try {
|
|
@@ -16,7 +17,7 @@ const h = () => {
|
|
|
16
17
|
credentials: "include"
|
|
17
18
|
}
|
|
18
19
|
)).ok)
|
|
19
|
-
|
|
20
|
+
r(!0);
|
|
20
21
|
else
|
|
21
22
|
return window.location.href = o;
|
|
22
23
|
} catch (t) {
|
|
@@ -24,8 +25,8 @@ const h = () => {
|
|
|
24
25
|
} finally {
|
|
25
26
|
}
|
|
26
27
|
})();
|
|
27
|
-
}, [
|
|
28
|
+
}, [n]), e ? /* @__PURE__ */ a(c, {}) : null;
|
|
28
29
|
};
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
w as UserRoute
|
|
31
32
|
};
|
package/dist/utils.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { AuthProvider as t } from "./auth/contexts/AuthContex.js";
|
|
2
|
-
import { ProtectedRoute as
|
|
3
|
-
import { UserRoute as
|
|
4
|
-
import { UnpHistorico as
|
|
5
|
-
import { IsInvalidStyles as
|
|
2
|
+
import { ProtectedRoute as p } from "./utils/components/ProtectedRoute.js";
|
|
3
|
+
import { UserRoute as f } from "./utils/components/UserRoute.js";
|
|
4
|
+
import { UnpHistorico as s } from "./utils/unp-historico/UnpHistorico.js";
|
|
5
|
+
import { IsInvalidStyles as c, useFormValidation as i } from "./utils/validations/useFormValidation.js";
|
|
6
6
|
import { CaptchaEcosistema as d } from "./utils/captcha/CaptchaEcosistema.js";
|
|
7
7
|
import { useFetchData as l } from "./utils/fetch-data/useFetchData.js";
|
|
8
|
+
import { default as I } from "./utils/components/fetchInterceptor.js";
|
|
8
9
|
export {
|
|
9
10
|
t as AuthProvider,
|
|
10
11
|
d as CaptchaEcosistema,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
c as IsInvalidStyles,
|
|
13
|
+
p as ProtectedRoute,
|
|
14
|
+
s as UnpHistorico,
|
|
15
|
+
f as UserRoute,
|
|
16
|
+
I as fetchInterceptor,
|
|
15
17
|
l as useFetchData,
|
|
16
|
-
|
|
18
|
+
i as useFormValidation
|
|
17
19
|
};
|