react-ecosistema-unp 1.7.16 → 1.7.18
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/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/TablaRegistros.d.ts +1 -0
- package/dist/lib/tables/tabla-registros/tabla/Tabla.d.ts +1 -0
- package/dist/lib/ui/items-modal/ItemsModal.d.ts +1 -0
- package/dist/shared/menu-lateral/MenuLateral.js +9 -9
- package/dist/tables/tabla-registros/TablaRegistros.js +263 -261
- package/dist/tables/tabla-registros/tabla/Tabla.js +32 -30
- package/dist/ui/items-modal/ItemsModal.js +11 -8
- package/dist/ui/logo/Logo.js +6 -6
- package/package.json +113 -113
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { v as
|
|
4
|
-
import { a as
|
|
5
|
-
import { T as
|
|
6
|
-
import { F as
|
|
7
|
-
import { B as
|
|
8
|
-
import '../../../assets/Tabla.css';const
|
|
2
|
+
import Q, { useState as m, useEffect as S } from "react";
|
|
3
|
+
import { v as X, w as Y } from "../../../index-DDjnZyBf.js";
|
|
4
|
+
import { a as Z, b as w, c as ee, d as te } from "../../../index-D3WseyJh.js";
|
|
5
|
+
import { T as re } from "../../../Table-C5ydZooy.js";
|
|
6
|
+
import { F as se, a as oe } from "../../../FormGroup-BLpFcIN5.js";
|
|
7
|
+
import { B as ie } from "../../../Button-B87TJYml.js";
|
|
8
|
+
import '../../../assets/Tabla.css';const ge = ({
|
|
9
9
|
columns: u,
|
|
10
10
|
displayedData: f,
|
|
11
11
|
// tableData,
|
|
@@ -23,16 +23,18 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
23
23
|
enableColumnSorter: T,
|
|
24
24
|
//
|
|
25
25
|
onSelectionChange: C,
|
|
26
|
-
enableRowSelection: h = !1
|
|
26
|
+
enableRowSelection: h = !1,
|
|
27
|
+
// Indicador para aumentar la selección de casos por gestionar
|
|
28
|
+
extendedSelection: P
|
|
27
29
|
}) => {
|
|
28
|
-
const [l,
|
|
30
|
+
const [l, U] = m({
|
|
29
31
|
key: null,
|
|
30
32
|
direction: null
|
|
31
|
-
}), [c,
|
|
32
|
-
|
|
33
|
+
}), [c, V] = m([]), [y, _] = m(null), [k, B] = m(null);
|
|
34
|
+
S(() => {
|
|
33
35
|
C == null || C(c);
|
|
34
36
|
}, [c]);
|
|
35
|
-
const
|
|
37
|
+
const W = (e, o) => {
|
|
36
38
|
const r = k || H, i = r.findIndex((p) => p.numeroRegistro === e);
|
|
37
39
|
if (i === -1) return;
|
|
38
40
|
const n = r[i], t = c.includes(e);
|
|
@@ -41,27 +43,27 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
41
43
|
a = c.filter((p) => p !== e), a.length === 0 && (B(null), _(null));
|
|
42
44
|
else if (c.length === 0) {
|
|
43
45
|
a = [e], _(n.tipoMesa);
|
|
44
|
-
const p = n.tipoMesa,
|
|
45
|
-
B([...
|
|
46
|
+
const p = n.tipoMesa, J = r.filter((g) => g.tipoMesa === p && g.numeroRegistro !== e), j = r.filter((g) => g.tipoMesa !== p), E = r.findIndex((g) => g.numeroRegistro === e), K = j.slice(0, E), L = j.slice(E);
|
|
47
|
+
B([...K, n, ...J, ...L]);
|
|
46
48
|
} else {
|
|
47
49
|
if (y && n.tipoMesa !== y) return;
|
|
48
50
|
a = [...c, e];
|
|
49
51
|
}
|
|
50
|
-
|
|
52
|
+
V(a);
|
|
51
53
|
}, A = { i: 0 }, G = (e) => {
|
|
52
54
|
if (v) {
|
|
53
55
|
const o = e / v * 100;
|
|
54
56
|
return o <= 25 ? { backgroundColor: "#3AB34A", color: "#FFFFFF" } : o <= 50 ? { backgroundColor: "#F8EB10", color: "#000000" } : o <= 75 ? { backgroundColor: "#F79122", color: "#000000" } : { backgroundColor: "#E91720", color: "#FFFFFF" };
|
|
55
57
|
}
|
|
56
58
|
return { backgroundColor: "transparent", color: "inherit" };
|
|
57
|
-
},
|
|
59
|
+
}, $ = (e) => {
|
|
58
60
|
const { scrollTop: o, clientHeight: r, scrollHeight: i } = e.currentTarget;
|
|
59
61
|
i - o <= r + 50 && x && D((n) => {
|
|
60
62
|
const t = n + 5;
|
|
61
63
|
return t >= f.length && z(!1), Math.min(t, f.length);
|
|
62
64
|
});
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
+
}, q = (e) => {
|
|
66
|
+
U((o) => ({
|
|
65
67
|
key: e,
|
|
66
68
|
direction: o.key === e && o.direction === "asc" ? "desc" : "asc"
|
|
67
69
|
}));
|
|
@@ -82,7 +84,7 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
82
84
|
return typeof r == "number" && typeof i == "number" ? l.direction === "asc" ? r - i : i - r : typeof r == "string" && typeof i == "string" ? l.direction === "asc" ? r.localeCompare(i) : i.localeCompare(r) : 0;
|
|
83
85
|
});
|
|
84
86
|
})(), F = k || (l.direction === "asc" || l.direction === "desc" ? H : f);
|
|
85
|
-
return /* @__PURE__ */ s("div", { className: "table_container", children: /* @__PURE__ */ s("div", { className: "table-scroll", onScroll:
|
|
87
|
+
return /* @__PURE__ */ s("div", { className: "table_container", children: /* @__PURE__ */ s("div", { className: "table-scroll", onScroll: $, children: /* @__PURE__ */ d(re, { striped: !0, hover: !0, children: [
|
|
86
88
|
/* @__PURE__ */ d("thead", { children: [
|
|
87
89
|
/* @__PURE__ */ d("tr", { children: [
|
|
88
90
|
h && /* @__PURE__ */ s("th", { className: "table-header-unp" }),
|
|
@@ -90,12 +92,12 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
90
92
|
"th",
|
|
91
93
|
{
|
|
92
94
|
className: "table-header-unp",
|
|
93
|
-
onClick: () => (e.sorter || T) &&
|
|
95
|
+
onClick: () => (e.sorter || T) && q(e.key),
|
|
94
96
|
style: { cursor: N ? "pointer" : "default" },
|
|
95
97
|
children: [
|
|
96
98
|
e.label,
|
|
97
99
|
" ",
|
|
98
|
-
c.length == 0 && (e.sorter || T) ? l.key === e.key ? l.direction === "asc" ? /* @__PURE__ */ s(
|
|
100
|
+
c.length == 0 && (e.sorter || T) ? l.key === e.key ? l.direction === "asc" ? /* @__PURE__ */ s(Z, {}) : /* @__PURE__ */ s(w, {}) : /* @__PURE__ */ s(ee, {}) : null
|
|
99
101
|
]
|
|
100
102
|
},
|
|
101
103
|
o
|
|
@@ -103,9 +105,9 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
103
105
|
] }),
|
|
104
106
|
c.length == 0 && N && /* @__PURE__ */ d("tr", { children: [
|
|
105
107
|
h && /* @__PURE__ */ s("th", { className: "table-header-unp" }),
|
|
106
|
-
u.map((e, o) => /* @__PURE__ */ s("th", { children: /* @__PURE__ */ d(
|
|
108
|
+
u.map((e, o) => /* @__PURE__ */ s("th", { children: /* @__PURE__ */ d(se, { className: "mx-1 position-relative", children: [
|
|
107
109
|
/* @__PURE__ */ s(
|
|
108
|
-
|
|
110
|
+
oe,
|
|
109
111
|
{
|
|
110
112
|
type: "text",
|
|
111
113
|
placeholder: `Buscar ${e.label}`,
|
|
@@ -115,7 +117,7 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
115
117
|
}
|
|
116
118
|
),
|
|
117
119
|
R[e.key] && /* @__PURE__ */ s(
|
|
118
|
-
|
|
120
|
+
ie,
|
|
119
121
|
{
|
|
120
122
|
variant: "link",
|
|
121
123
|
size: "sm",
|
|
@@ -131,9 +133,9 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
131
133
|
/* @__PURE__ */ d("tbody", { children: [
|
|
132
134
|
F.slice(0, I).map((e, o) => {
|
|
133
135
|
let r = !1;
|
|
134
|
-
b ? e.estadoRegistro === "en_gestion" ? r = !0 : e.estadoRegistro === "por_gestionar" && A.i < 5 && (r = !0, A.i++) : r = !0;
|
|
136
|
+
b ? e.estadoRegistro === "en_gestion" ? r = !0 : e.estadoRegistro === "por_gestionar" && A.i < (P ? 15 : 5) && (r = !0, A.i++) : r = !0;
|
|
135
137
|
const i = h && y != null && e.tipoMesa !== y, n = c.includes(e.numeroRegistro);
|
|
136
|
-
return /* @__PURE__ */ d(
|
|
138
|
+
return /* @__PURE__ */ d(Q.Fragment, { children: [
|
|
137
139
|
/* @__PURE__ */ d(
|
|
138
140
|
"tr",
|
|
139
141
|
{
|
|
@@ -151,9 +153,9 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
151
153
|
cursor: i ? "not-allowed" : "pointer"
|
|
152
154
|
},
|
|
153
155
|
onClick: (t) => {
|
|
154
|
-
t.stopPropagation(), i ||
|
|
156
|
+
t.stopPropagation(), i || W(e.numeroRegistro);
|
|
155
157
|
},
|
|
156
|
-
children: n ? /* @__PURE__ */ s(
|
|
158
|
+
children: n ? /* @__PURE__ */ s(te, { size: 18, style: { color: "#505050ff" } }) : /* @__PURE__ */ s(X, { size: 18, style: { color: "#505050ff" } })
|
|
157
159
|
}
|
|
158
160
|
),
|
|
159
161
|
u.map((t, a) => /* @__PURE__ */ s(
|
|
@@ -206,7 +208,7 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
206
208
|
fontWeight: "600",
|
|
207
209
|
color: o % 2 === 0 ? "#365072" : "#303D50",
|
|
208
210
|
backgroundColor: o % 2 === 0 ? "#fefefe" : "#f9fafa"
|
|
209
|
-
}, children: /* @__PURE__ */ s(
|
|
211
|
+
}, children: /* @__PURE__ */ s(Y, { style: { fontSize: "1.3rem" } }) }) }) })
|
|
210
212
|
] }, o);
|
|
211
213
|
}),
|
|
212
214
|
x && /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: u.length, className: "text-center", children: "Cargando más datos..." }) })
|
|
@@ -214,5 +216,5 @@ import '../../../assets/Tabla.css';const pe = ({
|
|
|
214
216
|
] }) }) });
|
|
215
217
|
};
|
|
216
218
|
export {
|
|
217
|
-
|
|
219
|
+
ge as Tabla
|
|
218
220
|
};
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { useNavigate as s } from "react-router-dom";
|
|
3
3
|
import { t as i, u as n } from "../../index-DDjnZyBf.js";
|
|
4
4
|
import { G as c } from "../../iconBase-LROS5hdG.js";
|
|
5
5
|
import '../../assets/ItemsModal.css';/* empty css */
|
|
6
|
-
function m(
|
|
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: [] }] })(
|
|
6
|
+
function m(o) {
|
|
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: [] }] })(o);
|
|
8
8
|
}
|
|
9
|
-
const N = ({ sections:
|
|
9
|
+
const N = ({ sections: o }) => {
|
|
10
10
|
const e = s();
|
|
11
|
-
return /* @__PURE__ */ t("div", { className: "listado-tarjetas", children:
|
|
12
|
-
/* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ t("div", { className: "listado-tarjetas", children: o.map((a, r) => /* @__PURE__ */ l("div", { className: "tarjeta-listado-row", children: [
|
|
12
|
+
/* @__PURE__ */ l(
|
|
13
13
|
"div",
|
|
14
14
|
{
|
|
15
15
|
className: "tarjeta-listado-container",
|
|
16
16
|
onClick: () => e(a.route, { state: a.state }),
|
|
17
17
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ l("div", { className: "tarjeta-listado-label-container", children: [
|
|
19
19
|
/* @__PURE__ */ t(a.icon, { className: "tarjeta-listado-process-menu" }),
|
|
20
20
|
/* @__PURE__ */ t("span", { children: a.label })
|
|
21
21
|
] }),
|
|
22
|
-
"closed" in a && /* @__PURE__ */
|
|
22
|
+
"closed" in a && /* @__PURE__ */ l("div", { className: "tarjeta-listado-state-container", children: [
|
|
23
|
+
a.extraItem && a.extraItem,
|
|
24
|
+
a.closed ? /* @__PURE__ */ t(i, { style: { color: "#3AB34A" } }) : /* @__PURE__ */ t(n, { style: { color: "#E2E2E2" } })
|
|
25
|
+
] })
|
|
23
26
|
]
|
|
24
27
|
}
|
|
25
28
|
),
|