react-ecosistema-unp 1.7.2-pre.0 → 1.7.2
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/README.md +61 -61
- package/dist/assets/EcoModalStyles.css +1 -1
- package/dist/assets/Modal.css +1 -1
- package/dist/lib/assets/animations/noData.json.d.ts +5866 -5866
- package/dist/lib/assets/animations/noInfo.json.d.ts +2981 -2981
- package/dist/lib/tables/tabla-registros/modal/Modal.d.ts +2 -3
- package/dist/lib/tables/tabla-registros/{modal-test → modal-v2}/EcoModal.d.ts +2 -0
- package/dist/lib/ui.d.ts +1 -2
- package/dist/lib/utils/websocket-manager/websocket.d.ts +1 -1
- package/dist/shared/menu-lateral/MenuLateral.js +9 -9
- package/dist/tables/tabla-registros/TablaRegistros.js +2 -1
- package/dist/tables/tabla-registros/modal/Modal.js +23 -23
- package/dist/tables/tabla-registros/modal-v2/EcoModal.js +117 -0
- package/dist/ui/logo/Logo.js +6 -6
- package/dist/ui.js +12 -13
- package/dist/utils/websocket-manager/useWebSocket.js +10 -10
- package/package.json +111 -111
- package/dist/tables/tabla-registros/modal-test/EcoModal.js +0 -101
|
@@ -6,9 +6,8 @@ interface CustomModalProps {
|
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
closeModalOut: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare const EcoModal: React.FC<CustomModalProps>;
|
|
10
9
|
/**
|
|
11
10
|
* @deprecated since version 1.7.x — use `EcoModal` instead.
|
|
12
11
|
*/
|
|
13
|
-
|
|
14
|
-
export {
|
|
12
|
+
declare const CustomModal: React.FC<CustomModalProps>;
|
|
13
|
+
export { CustomModal };
|
package/dist/lib/ui.d.ts
CHANGED
|
@@ -7,6 +7,5 @@ export { ItemsModal } from './ui/items-modal/ItemsModal.js';
|
|
|
7
7
|
export { IconoTooltip } from './ui/icono-tooltip/IconoTooltip.js';
|
|
8
8
|
export { ContenedorVentana } from './ui/contenedor-ventana/ContenedorVentana.js';
|
|
9
9
|
export { CustomModal } from './tables/tabla-registros/modal/Modal.js';
|
|
10
|
-
export { EcoModal } from './tables/tabla-registros/modal/
|
|
11
|
-
export { EcoModal as EcoModalTest } from './tables/tabla-registros/modal-test/EcoModal.js';
|
|
10
|
+
export { EcoModal } from './tables/tabla-registros/modal-v2/EcoModal.js';
|
|
12
11
|
export { Animacion } from './ui/animacion/Animacion.js';
|
|
@@ -270,15 +270,15 @@ const z1 = ({ onToggle: t, isOpen: c, showConnectionStatus: x }) => {
|
|
|
270
270
|
{
|
|
271
271
|
className: "gear__path",
|
|
272
272
|
fill: "none",
|
|
273
|
-
d: `M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z
|
|
274
|
-
M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65
|
|
275
|
-
1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09a1.65 1.65
|
|
276
|
-
0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65
|
|
277
|
-
1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09a1.65 1.65 0 0 0
|
|
278
|
-
1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65
|
|
279
|
-
0 0 0 1.82.33h.09a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0
|
|
280
|
-
1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65
|
|
281
|
-
0 0 0-.33 1.82v.09a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0
|
|
273
|
+
d: `M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z
|
|
274
|
+
M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65
|
|
275
|
+
1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09a1.65 1.65
|
|
276
|
+
0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65
|
|
277
|
+
1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09a1.65 1.65 0 0 0
|
|
278
|
+
1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65
|
|
279
|
+
0 0 0 1.82.33h.09a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0
|
|
280
|
+
1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65
|
|
281
|
+
0 0 0-.33 1.82v.09a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0
|
|
282
282
|
0-1.51 1z`
|
|
283
283
|
}
|
|
284
284
|
)
|
|
@@ -2,7 +2,7 @@ import { jsxs as I, Fragment as Ze, jsx as B } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as D, useEffect as yn } from "react";
|
|
3
3
|
import { L as Ee, i as vn, n as kn, a as xn } from "../../isLoading-B9qN9mny.js";
|
|
4
4
|
import { Tabla as Cn } from "./tabla/Tabla.js";
|
|
5
|
-
import { EcoModal as An } from "./modal/
|
|
5
|
+
import { EcoModal as An } from "./modal-v2/EcoModal.js";
|
|
6
6
|
import { EncabezadoTabla as En } from "./encabezado-tabla/EncabezadoTabla.js";
|
|
7
7
|
import { useNavigate as Bn } from "react-router-dom";
|
|
8
8
|
import '../../assets/TablaRegistros.css';/*!
|
|
@@ -1726,6 +1726,7 @@ const gi = () => (/* @__PURE__ */ new Date()).getFullYear(), ct = (e) => e.norma
|
|
|
1726
1726
|
onHide: () => re(!1),
|
|
1727
1727
|
title: `${ie.column.label}`,
|
|
1728
1728
|
closeModalOut: sn,
|
|
1729
|
+
modalType: "primary",
|
|
1729
1730
|
children: n(
|
|
1730
1731
|
ie.row,
|
|
1731
1732
|
ie.column,
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as n, useEffect as h } from "react";
|
|
3
3
|
import '../../../assets/Modal.css';/* empty css */
|
|
4
|
-
const
|
|
5
|
-
show:
|
|
6
|
-
onHide:
|
|
4
|
+
const M = ({
|
|
5
|
+
show: l,
|
|
6
|
+
onHide: s,
|
|
7
7
|
title: c,
|
|
8
8
|
children: r,
|
|
9
9
|
closeModalOut: m
|
|
10
10
|
}) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
console.warn("react-ecosistema-unp - [CustomModal] is deprecated. Please use [EcoModal] instead.");
|
|
12
|
+
const [a, d] = n(!1), [t, e] = n(!1);
|
|
13
|
+
return h(() => {
|
|
14
|
+
l ? d(!0) : (e(!0), setTimeout(() => {
|
|
15
|
+
d(!1), e(!1);
|
|
15
16
|
}, 200));
|
|
16
|
-
}, [
|
|
17
|
+
}, [l]), /* @__PURE__ */ o(
|
|
17
18
|
"div",
|
|
18
19
|
{
|
|
19
|
-
className: `modal-overlay ${
|
|
20
|
+
className: `modal-overlay-old ${a ? "show-old" : ""} ${t ? "hide-old" : ""}`,
|
|
20
21
|
onClick: () => {
|
|
21
|
-
m && (
|
|
22
|
-
|
|
22
|
+
m && (e(!0), setTimeout(() => {
|
|
23
|
+
s(), e(!1);
|
|
23
24
|
}, 200));
|
|
24
25
|
},
|
|
25
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ i(
|
|
26
27
|
"div",
|
|
27
28
|
{
|
|
28
|
-
className: `modal-container ${
|
|
29
|
-
onClick: (
|
|
29
|
+
className: `modal-container-old ${a ? "show-old" : ""} ${t ? "hide-old" : ""}`,
|
|
30
|
+
onClick: (u) => u.stopPropagation(),
|
|
30
31
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ i("div", { className: "modal_header-old", children: [
|
|
33
|
+
/* @__PURE__ */ o("span", { children: c }),
|
|
34
|
+
/* @__PURE__ */ o("button", { className: "close_button_old", onClick: s, type: "button", children: "×" })
|
|
34
35
|
] }),
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ o("div", { className: "modal_body_old", children: r })
|
|
36
37
|
]
|
|
37
38
|
}
|
|
38
39
|
)
|
|
39
40
|
}
|
|
40
41
|
);
|
|
41
|
-
}
|
|
42
|
+
};
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
-
f as EcoModal
|
|
44
|
+
M as CustomModal
|
|
45
45
|
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsx as a, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useRef as q, useEffect as f } from "react";
|
|
3
|
+
import { R as I } from "../../../index-BrykDZgK.js";
|
|
4
|
+
import { q as M, r as A } from "../../../index-069JzHFQ.js";
|
|
5
|
+
import '../../../assets/EcoModalStyles.css';/* empty css */
|
|
6
|
+
const V = ({
|
|
7
|
+
show: n,
|
|
8
|
+
onHide: p,
|
|
9
|
+
title: S,
|
|
10
|
+
children: k,
|
|
11
|
+
closeModalOut: E,
|
|
12
|
+
isMaximized: o,
|
|
13
|
+
onToggleMaximize: h,
|
|
14
|
+
showMaximizeButton: R = !1,
|
|
15
|
+
modalType: s = "primary",
|
|
16
|
+
primaryPosition: r = "right",
|
|
17
|
+
disableClose: y = !1,
|
|
18
|
+
hasSecondaryModalOpen: j = !1,
|
|
19
|
+
otherModalOpen: c = !1,
|
|
20
|
+
widthPercent: b,
|
|
21
|
+
headerBgColor: D = "#303D50",
|
|
22
|
+
hasBody: _ = !0
|
|
23
|
+
}) => {
|
|
24
|
+
const [v, g] = m(!1), [l, i] = m(!1), [w, C] = m(!1), t = q(null);
|
|
25
|
+
f(() => (C(!0), s === "secondary" && !t.current && (t.current = document.createElement("div"), t.current.className = "modal-portal-container", document.body.appendChild(t.current)), () => {
|
|
26
|
+
C(!1), t.current && (document.body.removeChild(t.current), t.current = null);
|
|
27
|
+
}), [s]), f(() => {
|
|
28
|
+
const e = document.body;
|
|
29
|
+
return n ? (g(!0), e.classList.add("modal-open")) : (i(!0), setTimeout(() => {
|
|
30
|
+
w && (g(!1), i(!1)), e.classList.remove("modal-open");
|
|
31
|
+
}, 200)), () => {
|
|
32
|
+
e.classList.remove("modal-open");
|
|
33
|
+
};
|
|
34
|
+
}, [n, w]), f(() => {
|
|
35
|
+
const e = document.body;
|
|
36
|
+
s === "primary" && (e.classList.remove("primary-right", "primary-left"), e.classList.add(
|
|
37
|
+
r === "left" ? "primary-left" : "primary-right"
|
|
38
|
+
));
|
|
39
|
+
const d = () => {
|
|
40
|
+
if (!(n && c && !o)) {
|
|
41
|
+
e.classList.remove("two-modals-50", "two-modals-large");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
window.innerWidth >= 1200 ? (e.classList.add("two-modals-large"), e.classList.remove("two-modals-50")) : (e.classList.add("two-modals-50"), e.classList.remove("two-modals-large"));
|
|
45
|
+
};
|
|
46
|
+
return d(), window.addEventListener("resize", d), () => {
|
|
47
|
+
s === "primary" && e.classList.remove("primary-right", "primary-left"), e.classList.remove("two-modals-50", "two-modals-large"), window.removeEventListener("resize", d);
|
|
48
|
+
};
|
|
49
|
+
}, [s, r, n, c, o]);
|
|
50
|
+
const $ = () => s === "primary" ? r === "center" ? "primary-center" : `primary-${r}` : `secondary-${r === "left" ? "right" : "left"}`, x = () => {
|
|
51
|
+
const e = ["modal-overlay"];
|
|
52
|
+
return s === "primary" ? e.push(`primary-${r}`) : e.push("secondary-overlay"), v && !l && e.push("show"), l && e.push("hide"), e.join(" ");
|
|
53
|
+
}, W = () => {
|
|
54
|
+
const e = ["modal-container", s, $()];
|
|
55
|
+
return v && !l && e.push("show"), l && e.push("hide"), o && e.push("maximized"), r === "center" && e.push("centered"), e.join(" ");
|
|
56
|
+
}, L = s === "primary" ? y || j : y, z = s === "primary" && n && c, F = () => {
|
|
57
|
+
!L && s === "primary" && E && (i(!0), setTimeout(() => {
|
|
58
|
+
p(), i(!1);
|
|
59
|
+
}, 200));
|
|
60
|
+
}, O = () => {
|
|
61
|
+
const e = {};
|
|
62
|
+
return s === "primary" && !o && b && (e["--modal-primary-width"] = `${b}%`), e;
|
|
63
|
+
}, N = /* @__PURE__ */ a("div", { className: x(), onClick: F, children: /* @__PURE__ */ u(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
className: W(),
|
|
67
|
+
style: O(),
|
|
68
|
+
onClick: (e) => e.stopPropagation(),
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ u(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
className: "modal_header",
|
|
74
|
+
style: { backgroundColor: D },
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ a("span", { children: S }),
|
|
77
|
+
/* @__PURE__ */ u("div", { style: { display: "flex", gap: 10 }, children: [
|
|
78
|
+
R && h && /* @__PURE__ */ a(
|
|
79
|
+
"button",
|
|
80
|
+
{
|
|
81
|
+
className: "max_button",
|
|
82
|
+
onClick: h,
|
|
83
|
+
type: "button",
|
|
84
|
+
disabled: z,
|
|
85
|
+
children: o ? /* @__PURE__ */ a(M, { size: 14, className: "icon-header" }) : /* @__PURE__ */ a(A, { size: 14, className: "icon-header" })
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ a(
|
|
89
|
+
"button",
|
|
90
|
+
{
|
|
91
|
+
className: "close_button",
|
|
92
|
+
onClick: p,
|
|
93
|
+
type: "button",
|
|
94
|
+
disabled: L,
|
|
95
|
+
children: "×"
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] })
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
/* @__PURE__ */ a(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
className: "modal_body",
|
|
106
|
+
style: { padding: _ ? "1rem" : "0rem" },
|
|
107
|
+
children: k
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
) });
|
|
113
|
+
return s === "secondary" && t.current ? I.createPortal(N, t.current) : N;
|
|
114
|
+
};
|
|
115
|
+
export {
|
|
116
|
+
V as EcoModal
|
|
117
|
+
};
|