react-ecosistema-unp 1.7.24 → 1.7.26

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as s, jsxs as d } from "react/jsx-runtime";
2
- import S, { useState as m, useEffect as X } from "react";
3
- import { v as Y, w as Z } from "../../../index-DDjnZyBf.js";
2
+ import X, { useState as m, useEffect as Y } from "react";
3
+ import { v as Z, w as S } from "../../../index-DDjnZyBf.js";
4
4
  import { a as w, b as ee, c as te, d as re } from "../../../index-D3WseyJh.js";
5
5
  import { T as se } from "../../../Table-C5ydZooy.js";
6
6
  import { F as oe, a as ie } from "../../../FormGroup-BLpFcIN5.js";
@@ -10,10 +10,10 @@ import '../../../assets/Tabla.css';const ue = ({
10
10
  displayedData: f,
11
11
  // tableData,
12
12
  hasMoreData: x,
13
- setHasMoreData: z,
14
- visibleData: I,
15
- setVisibleData: D,
16
- handleCellClick: O,
13
+ setHasMoreData: I,
14
+ visibleData: D,
15
+ setVisibleData: O,
16
+ handleCellClick: P,
17
17
  totalDias: v,
18
18
  isShared: b,
19
19
  //
@@ -25,33 +25,33 @@ import '../../../assets/Tabla.css';const ue = ({
25
25
  onSelectionChange: C,
26
26
  enableRowSelection: h = !1,
27
27
  // Indicador para aumentar la selección de casos por gestionar
28
- extendedSelection: P,
28
+ extendedSelection: _,
29
29
  cellSelectionColor: U
30
30
  }) => {
31
31
  const [l, V] = m({
32
32
  key: null,
33
33
  direction: null
34
- }), [c, W] = m([]), [y, _] = m(null), [k, B] = m(null);
35
- X(() => {
34
+ }), [c, W] = m([]), [y, B] = m(null), [k, A] = m(null);
35
+ Y(() => {
36
36
  C == null || C(c);
37
37
  }, [c]);
38
38
  const $ = (e, o) => {
39
- const r = k || H, i = r.findIndex((p) => p.numeroRegistro === e);
39
+ const r = k || j, i = r.findIndex((p) => p.numeroRegistro === e);
40
40
  if (i === -1) return;
41
41
  const n = r[i], t = c.includes(e);
42
42
  let a = [];
43
43
  if (t)
44
- a = c.filter((p) => p !== e), a.length === 0 && (B(null), _(null));
44
+ a = c.filter((p) => p !== e), a.length === 0 && (A(null), B(null));
45
45
  else if (c.length === 0) {
46
- a = [e], _(n.tipoMesa);
47
- const p = n.tipoMesa, K = r.filter((g) => g.tipoMesa === p && g.numeroRegistro !== e), j = r.filter((g) => g.tipoMesa !== p), E = r.findIndex((g) => g.numeroRegistro === e), L = j.slice(0, E), Q = j.slice(E);
48
- B([...L, n, ...K, ...Q]);
46
+ a = [e], B(n.tipoMesa);
47
+ const p = n.tipoMesa, K = r.filter((g) => g.tipoMesa === p && g.numeroRegistro !== e), E = r.filter((g) => g.tipoMesa !== p), z = r.findIndex((g) => g.numeroRegistro === e), L = E.slice(0, z), Q = E.slice(z);
48
+ A([...L, n, ...K, ...Q]);
49
49
  } else {
50
50
  if (y && n.tipoMesa !== y) return;
51
51
  a = [...c, e];
52
52
  }
53
53
  W(a);
54
- }, A = { i: 0 }, G = (e) => {
54
+ }, G = { i: 0 }, H = (e) => {
55
55
  if (v) {
56
56
  const o = e / v * 100;
57
57
  return o <= 25 ? { backgroundColor: "#3AB34A", color: "#FFFFFF" } : o <= 50 ? { backgroundColor: "#F8EB10", color: "#000000" } : o <= 75 ? { backgroundColor: "#F79122", color: "#000000" } : { backgroundColor: "#E91720", color: "#FFFFFF" };
@@ -59,16 +59,16 @@ import '../../../assets/Tabla.css';const ue = ({
59
59
  return { backgroundColor: "transparent", color: "inherit" };
60
60
  }, q = (e) => {
61
61
  const { scrollTop: o, clientHeight: r, scrollHeight: i } = e.currentTarget;
62
- i - o <= r + 50 && x && D((n) => {
62
+ i - o <= r + 50 && x && O((n) => {
63
63
  const t = n + 5;
64
- return t >= f.length && z(!1), Math.min(t, f.length);
64
+ return t >= f.length && I(!1), Math.min(t, f.length);
65
65
  });
66
66
  }, J = (e) => {
67
67
  V((o) => ({
68
68
  key: e,
69
69
  direction: o.key === e && o.direction === "asc" ? "desc" : "asc"
70
70
  }));
71
- }, H = (() => {
71
+ }, j = (() => {
72
72
  if (!l.key) return f;
73
73
  if (b) {
74
74
  const [e, o] = f.reduce(
@@ -84,7 +84,7 @@ import '../../../assets/Tabla.css';const ue = ({
84
84
  const r = e[l.key], i = o[l.key];
85
85
  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;
86
86
  });
87
- })(), F = k || (l.direction === "asc" || l.direction === "desc" ? H : f);
87
+ })(), F = k || (l.direction === "asc" || l.direction === "desc" ? j : f);
88
88
  return /* @__PURE__ */ s("div", { className: "table_container", children: /* @__PURE__ */ s("div", { className: "table-scroll", onScroll: q, children: /* @__PURE__ */ d(se, { striped: !0, hover: !0, children: [
89
89
  /* @__PURE__ */ d("thead", { children: [
90
90
  /* @__PURE__ */ d("tr", { children: [
@@ -132,11 +132,11 @@ import '../../../assets/Tabla.css';const ue = ({
132
132
  ] })
133
133
  ] }),
134
134
  /* @__PURE__ */ d("tbody", { children: [
135
- F.slice(0, I).map((e, o) => {
135
+ F.slice(0, D).map((e, o) => {
136
136
  let r = !1;
137
- b ? e.estadoRegistro === "en_gestion" ? r = !0 : e.estadoRegistro === "por_gestionar" && A.i < (P ? 15 : 5) && (r = !0, A.i++) : r = !0;
137
+ b ? e.estadoRegistro === "en_gestion" ? r = !0 : e.estadoRegistro === "por_gestionar" && (!_ && G.i < 60 ? (r = !0, G.i++) : _ && (r = !0)) : r = !0;
138
138
  const i = h && y != null && e.tipoMesa !== y, n = c.includes(e.numeroRegistro);
139
- return /* @__PURE__ */ d(S.Fragment, { children: [
139
+ return /* @__PURE__ */ d(X.Fragment, { children: [
140
140
  /* @__PURE__ */ d(
141
141
  "tr",
142
142
  {
@@ -156,13 +156,13 @@ import '../../../assets/Tabla.css';const ue = ({
156
156
  onClick: (t) => {
157
157
  t.stopPropagation(), i || $(e.numeroRegistro);
158
158
  },
159
- children: n ? /* @__PURE__ */ s(re, { size: 18, style: { color: "#505050ff" } }) : /* @__PURE__ */ s(Y, { size: 18, style: { color: "#505050ff" } })
159
+ children: n ? /* @__PURE__ */ s(re, { size: 18, style: { color: "#505050ff" } }) : /* @__PURE__ */ s(Z, { size: 18, style: { color: "#505050ff" } })
160
160
  }
161
161
  ),
162
162
  u.map((t, a) => /* @__PURE__ */ s(
163
163
  "td",
164
164
  {
165
- onClick: () => r ? O(t, e) : {},
165
+ onClick: () => r ? P(t, e) : {},
166
166
  style: {
167
167
  cursor: (t.hasModal || t.redirectTo) && r ? "pointer" : "default",
168
168
  "--cell-selection-bg-color": U || void 0
@@ -182,10 +182,10 @@ import '../../../assets/Tabla.css';const ue = ({
182
182
  padding: "8px",
183
183
  borderRadius: "100px",
184
184
  width: "40px",
185
- backgroundColor: G(
185
+ backgroundColor: H(
186
186
  e.diasHabiles
187
187
  ).backgroundColor,
188
- color: G(
188
+ color: H(
189
189
  e.diasHabiles
190
190
  ).color
191
191
  },
@@ -210,7 +210,7 @@ import '../../../assets/Tabla.css';const ue = ({
210
210
  fontWeight: "600",
211
211
  color: o % 2 === 0 ? "#365072" : "#303D50",
212
212
  backgroundColor: o % 2 === 0 ? "#fefefe" : "#f9fafa"
213
- }, children: /* @__PURE__ */ s(Z, { style: { fontSize: "1.3rem" } }) }) }) })
213
+ }, children: /* @__PURE__ */ s(S, { style: { fontSize: "1.3rem" } }) }) }) })
214
214
  ] }, o);
215
215
  }),
216
216
  x && /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: u.length, className: "text-center", children: "Cargando más datos..." }) })
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-ecosistema-unp",
3
3
  "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
4
  "private": false,
5
- "version": "1.7.24",
5
+ "version": "1.7.26",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {