react-ecosistema-unp 1.6.10 → 1.6.14

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 +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}.cell-redirect:hover{background-color:#ee8f22;color:#fff;font-weight:600}
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:#303d50;color:#fff;font-weight:600;cursor:pointer}
@@ -10,7 +10,7 @@ import '../../../assets/Tabla.css';const L = ({
10
10
  displayedData: a,
11
11
  // tableData,
12
12
  hasMoreData: h,
13
- setHasMoreData: F,
13
+ setHasMoreData: m,
14
14
  visibleData: v,
15
15
  setVisibleData: x,
16
16
  handleCellClick: N,
@@ -20,25 +20,25 @@ import '../../../assets/Tabla.css';const L = ({
20
20
  enableColumnSearch: k,
21
21
  columnSearch: u,
22
22
  handleColumnSearch: b,
23
- enableColumnSorter: m
23
+ enableColumnSorter: C
24
24
  }) => {
25
- const [i, B] = j({
25
+ const [i, T] = j({
26
26
  key: null,
27
27
  direction: null
28
- }), C = (e) => {
28
+ }), F = (e) => {
29
29
  if (g) {
30
30
  const o = e / g * 100;
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
- }, T = (e) => {
34
+ }, B = (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
- return s >= a.length && F(!1), Math.min(s, a.length);
38
+ return s >= a.length && m(!1), Math.min(s, a.length);
39
39
  });
40
40
  }, S = (e) => {
41
- B((o) => ({
41
+ T((o) => ({
42
42
  key: e,
43
43
  direction: o.key === e && o.direction === "asc" ? "desc" : "asc"
44
44
  }));
@@ -59,18 +59,18 @@ 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: T, children: /* @__PURE__ */ d(z, { striped: !0, hover: !0, children: [
62
+ return /* @__PURE__ */ r("div", { className: "table_container", children: /* @__PURE__ */ r("div", { className: "table-scroll", onScroll: B, 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) && S(e.key),
68
+ onClick: () => (e.sorter || C) && S(e.key),
69
69
  style: { cursor: k ? "pointer" : "default" },
70
70
  children: [
71
71
  e.label,
72
72
  " ",
73
- e.sorter || m ? i.key === e.key ? i.direction === "asc" ? /* @__PURE__ */ r(G, {}) : /* @__PURE__ */ r(R, {}) : /* @__PURE__ */ r(E, {}) : null
73
+ e.sorter || C ? i.key === e.key ? i.direction === "asc" ? /* @__PURE__ */ r(G, {}) : /* @__PURE__ */ r(R, {}) : /* @__PURE__ */ r(E, {}) : null
74
74
  ]
75
75
  },
76
76
  o
@@ -106,7 +106,7 @@ import '../../../assets/Tabla.css';const L = ({
106
106
  {
107
107
  onClick: () => N(t, e),
108
108
  style: {
109
- cursor: t.hasModal ? "pointer" : "default"
109
+ cursor: t.hasModal || t.redirectTo ? "pointer" : "default"
110
110
  },
111
111
  className: t.redirectTo ? "cell-redirect" : t.hasModal ? "cell-with-modal" : "",
112
112
  children: t.key === "diasHabiles" ? /* @__PURE__ */ r(
@@ -123,10 +123,10 @@ import '../../../assets/Tabla.css';const L = ({
123
123
  padding: "8px",
124
124
  borderRadius: "100px",
125
125
  width: "40px",
126
- backgroundColor: C(
126
+ backgroundColor: F(
127
127
  e.diasHabiles
128
128
  ).backgroundColor,
129
- color: C(
129
+ color: F(
130
130
  e.diasHabiles
131
131
  ).color
132
132
  },
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.6.10",
5
+ "version": "1.6.14",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {