react-ecosistema-unp 1.7.0-pre.1 → 1.7.0-pre.4
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/Encabezado.css +1 -1
- package/dist/assets/Tabla.css +1 -1
- package/dist/lib/auth/contexts/AuthContex.d.ts +0 -3
- package/dist/lib/utils/fetch-data/useFetchData.d.ts +1 -1
- package/dist/lib/utils/websocket-manager/useWebSocket.d.ts +1 -1
- package/dist/tables/tabla-registros/modal/Modal.js +13 -13
- package/dist/utils/websocket-manager/useWebSocket.js +12 -11
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.title-container{display:flex;gap:1rem;align-items:center;align-content:center}.logo-subtitle-container{height:100%;display:flex;gap:.66rem;align-items:center}.red-section{height:60px;width:10px;background-color:#d13c47;border-top-right-radius:7px;border-bottom-right-radius:7px}.img-logo{height:52px;object-fit:cover}.title{font-weight:500;font-size:1.55rem;color:#232323}.subtitle{font-size:1.05rem;color:#3f3f3f}.subtitle-container{display:flex;flex-direction:column}
|
|
1
|
+
.title-container{display:flex;gap:1rem;align-items:center;align-content:center}.logo-subtitle-container{height:100%;display:flex;gap:.66rem;align-items:center}.red-section{height:60px;width:10px;background-color:#d13c47;border-top-right-radius:7px;border-bottom-right-radius:7px}.img-logo{height:52px;object-fit:cover}.title{font-weight:500;font-size:1.55rem;color:#232323}.subtitle{font-size:1.05rem;color:#3f3f3f}.title{font-weight:500;font-size:clamp(1rem,2.5vw,1.55rem);color:#232323}.subtitle{font-size:clamp(.8rem,2vw,1.05rem);color:#3f3f3f}.subtitle-container{display:flex;flex-direction:column}
|
package/dist/assets/Tabla.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.table_container{display:flex;flex-direction:column;gap:1.5rem;text-align:center
|
|
1
|
+
.table_container{display:flex;flex-direction:column;gap:1.5rem;text-align:center}.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}@media (max-height: 780px){.table-scroll{max-height:65vh!important}}@media (max-height: 670px){.table-scroll{max-height:60vh!important}}@media (max-height: 590px){.table-scroll{max-height:55vh!important}}@media (max-height: 520px){.table-scroll{max-height:50vh!important}}@media (max-height: 470px){.table-scroll{max-height:40vh!important}}.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:16px}.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:#3c2970;color:#fff;font-weight:600;cursor:pointer}
|
|
@@ -4,8 +4,5 @@ declare const AuthContext: React.Context<AuthContextType | undefined>;
|
|
|
4
4
|
interface AuthProviderProps {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated since version 1.7.x
|
|
9
|
-
*/
|
|
10
7
|
declare const AuthProvider: React.FC<AuthProviderProps>;
|
|
11
8
|
export { AuthContext, AuthProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useWebSocket: (url: string, onMessage
|
|
1
|
+
export declare const useWebSocket: (url: string, onMessage?: (data: any) => void) => void;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as d, useEffect as u } from "react";
|
|
3
3
|
import '../../../assets/Modal.css';/* empty css */
|
|
4
4
|
const f = ({
|
|
5
5
|
show: o,
|
|
6
|
-
onHide:
|
|
6
|
+
onHide: t,
|
|
7
7
|
title: c,
|
|
8
8
|
children: r,
|
|
9
9
|
closeModalOut: m
|
|
10
10
|
}) => {
|
|
11
|
-
const [l,
|
|
12
|
-
return
|
|
13
|
-
o ?
|
|
14
|
-
|
|
11
|
+
const [l, a] = d(!1), [i, s] = d(!1);
|
|
12
|
+
return u(() => {
|
|
13
|
+
o ? a(!0) : (s(!0), setTimeout(() => {
|
|
14
|
+
a(!1), s(!1);
|
|
15
15
|
}, 200));
|
|
16
16
|
}, [o]), /* @__PURE__ */ e(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
|
-
className: `modal-overlay ${l ? "show" : ""} ${
|
|
19
|
+
className: `modal-overlay ${l ? "show" : ""} ${i ? "hide" : ""}`,
|
|
20
20
|
onClick: () => {
|
|
21
21
|
m && (s(!0), setTimeout(() => {
|
|
22
|
-
|
|
22
|
+
t(), s(!1);
|
|
23
23
|
}, 200));
|
|
24
24
|
},
|
|
25
25
|
children: /* @__PURE__ */ n(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
|
-
className: `modal-container ${l ? "show" : ""} ${
|
|
29
|
-
onClick: (
|
|
28
|
+
className: `modal-container ${l ? "show" : ""} ${i ? "hide" : ""}`,
|
|
29
|
+
onClick: (h) => h.stopPropagation(),
|
|
30
30
|
children: [
|
|
31
31
|
/* @__PURE__ */ n("div", { className: "modal_header", children: [
|
|
32
32
|
/* @__PURE__ */ e("span", { children: c }),
|
|
33
|
-
/* @__PURE__ */ e("button", { className: "close_button", onClick:
|
|
33
|
+
/* @__PURE__ */ e("button", { className: "close_button", onClick: t, type: "button", children: "×" })
|
|
34
34
|
] }),
|
|
35
35
|
/* @__PURE__ */ e("div", { className: "modal_body", children: r })
|
|
36
36
|
]
|
|
@@ -38,8 +38,8 @@ const f = ({
|
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
|
-
},
|
|
41
|
+
}, b = (o) => /* @__PURE__ */ e(f, { ...o });
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
b as CustomModal,
|
|
44
44
|
f as EcoModal
|
|
45
45
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { useEffect as b } from "react";
|
|
2
|
-
import { webSocketService as
|
|
3
|
-
const
|
|
2
|
+
import { webSocketService as c } from "./websocket.js";
|
|
3
|
+
const u = (t, e) => {
|
|
4
4
|
b(() => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
if (c.connect(t), e) {
|
|
6
|
+
const r = (s) => {
|
|
7
|
+
e(s);
|
|
8
|
+
}, o = c.subscribe(r);
|
|
9
|
+
return () => {
|
|
10
|
+
o(), c.unsubscribe(r);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}, [t, e]);
|
|
13
14
|
};
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
u as useWebSocket
|
|
16
17
|
};
|