react-ecosistema-unp 1.2.6 → 1.2.8
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,76 +1,93 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as c, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { useNavigate as g } from "react-router-dom";
|
|
2
3
|
import { u as o, c as u } from "../../ThemeProvider-Bs1j1Nwi.js";
|
|
3
4
|
import * as b from "react";
|
|
4
|
-
import { A as
|
|
5
|
+
import { A as k } from "../../Anchor-D8f6vg0T.js";
|
|
5
6
|
import '../../assets/Breadcrumb.css';const i = /* @__PURE__ */ b.forwardRef(({
|
|
6
|
-
bsPrefix:
|
|
7
|
-
active:
|
|
8
|
-
children:
|
|
7
|
+
bsPrefix: e,
|
|
8
|
+
active: a = !1,
|
|
9
|
+
children: r,
|
|
9
10
|
className: n,
|
|
10
11
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
11
12
|
as: s = "li",
|
|
12
|
-
linkAs:
|
|
13
|
+
linkAs: l = k,
|
|
13
14
|
linkProps: m = {},
|
|
14
|
-
href:
|
|
15
|
+
href: d,
|
|
15
16
|
title: t,
|
|
16
17
|
target: p,
|
|
17
|
-
...
|
|
18
|
-
},
|
|
19
|
-
const B = o(
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
ref:
|
|
22
|
-
...
|
|
18
|
+
...N
|
|
19
|
+
}, h) => {
|
|
20
|
+
const B = o(e, "breadcrumb-item");
|
|
21
|
+
return /* @__PURE__ */ c(s, {
|
|
22
|
+
ref: h,
|
|
23
|
+
...N,
|
|
23
24
|
className: u(B, n, {
|
|
24
|
-
active:
|
|
25
|
+
active: a
|
|
25
26
|
}),
|
|
26
|
-
"aria-current":
|
|
27
|
-
children:
|
|
27
|
+
"aria-current": a ? "page" : void 0,
|
|
28
|
+
children: a ? r : /* @__PURE__ */ c(l, {
|
|
28
29
|
...m,
|
|
29
|
-
href:
|
|
30
|
+
href: d,
|
|
30
31
|
title: t,
|
|
31
32
|
target: p,
|
|
32
|
-
children:
|
|
33
|
+
children: r
|
|
33
34
|
})
|
|
34
35
|
});
|
|
35
36
|
});
|
|
36
37
|
i.displayName = "BreadcrumbItem";
|
|
37
38
|
const f = /* @__PURE__ */ b.forwardRef(({
|
|
38
|
-
bsPrefix:
|
|
39
|
-
className:
|
|
40
|
-
listProps:
|
|
39
|
+
bsPrefix: e,
|
|
40
|
+
className: a,
|
|
41
|
+
listProps: r = {},
|
|
41
42
|
children: n,
|
|
42
43
|
label: s = "breadcrumb",
|
|
43
44
|
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
44
|
-
as:
|
|
45
|
+
as: l = "nav",
|
|
45
46
|
...m
|
|
46
|
-
},
|
|
47
|
-
const t = o(
|
|
48
|
-
return /* @__PURE__ */
|
|
47
|
+
}, d) => {
|
|
48
|
+
const t = o(e, "breadcrumb");
|
|
49
|
+
return /* @__PURE__ */ c(l, {
|
|
49
50
|
"aria-label": s,
|
|
50
|
-
className:
|
|
51
|
-
ref:
|
|
51
|
+
className: a,
|
|
52
|
+
ref: d,
|
|
52
53
|
...m,
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
-
...
|
|
55
|
-
className: u(t,
|
|
54
|
+
children: /* @__PURE__ */ c("ol", {
|
|
55
|
+
...r,
|
|
56
|
+
className: u(t, r == null ? void 0 : r.className),
|
|
56
57
|
children: n
|
|
57
58
|
})
|
|
58
59
|
});
|
|
59
60
|
});
|
|
60
61
|
f.displayName = "Breadcrumb";
|
|
61
|
-
const
|
|
62
|
+
const v = Object.assign(f, {
|
|
62
63
|
Item: i
|
|
63
|
-
}),
|
|
64
|
-
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
)
|
|
64
|
+
}), I = ({ items: e }) => {
|
|
65
|
+
const a = g();
|
|
66
|
+
return /* @__PURE__ */ c("div", { className: "breadcrumb-container", children: /* @__PURE__ */ c(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: "breadcrumb-wrapper",
|
|
70
|
+
style: {
|
|
71
|
+
// Ajusta la posición de los elementos si se proporcionan links y hay un input extra
|
|
72
|
+
justifyContent: e ? "space-between" : "end"
|
|
73
|
+
},
|
|
74
|
+
children: e && /* @__PURE__ */ c(v, { children: e.map((r, n) => /* @__PURE__ */ x(
|
|
75
|
+
i,
|
|
76
|
+
{
|
|
77
|
+
active: !r.link,
|
|
78
|
+
...r.link && {
|
|
79
|
+
onClick: () => a(r.link)
|
|
80
|
+
},
|
|
81
|
+
children: [
|
|
82
|
+
" ",
|
|
83
|
+
r.label
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
n
|
|
87
|
+
)) })
|
|
88
|
+
}
|
|
89
|
+
) });
|
|
90
|
+
};
|
|
74
91
|
export {
|
|
75
|
-
|
|
92
|
+
I as BreadcrumbNav
|
|
76
93
|
};
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import C from "react";
|
|
3
|
-
import { p as
|
|
4
|
-
import { T as
|
|
3
|
+
import { p as m } from "../../../index-CcQhl4DX.js";
|
|
4
|
+
import { T as u } from "../../../Table-C5ydZooy.js";
|
|
5
5
|
import '../../../assets/Tabla.css';const T = ({
|
|
6
6
|
columns: n,
|
|
7
|
-
filteredData:
|
|
7
|
+
filteredData: i,
|
|
8
8
|
tableData: g,
|
|
9
|
-
hasMoreData:
|
|
9
|
+
hasMoreData: d,
|
|
10
10
|
setHasMoreData: p,
|
|
11
11
|
visibleData: f,
|
|
12
12
|
setVisibleData: b,
|
|
13
|
-
handleCellClick:
|
|
14
|
-
totalDias:
|
|
15
|
-
isShared:
|
|
13
|
+
handleCellClick: y,
|
|
14
|
+
totalDias: s,
|
|
15
|
+
isShared: k
|
|
16
16
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
const
|
|
20
|
-
return
|
|
17
|
+
const c = (e) => {
|
|
18
|
+
if (s) {
|
|
19
|
+
const l = e / s * 100;
|
|
20
|
+
return l <= 25 ? { backgroundColor: "#3AB34A", color: "#FFFFFF" } : l <= 50 ? { backgroundColor: "#F8EB10", color: "#000000" } : l <= 75 ? { backgroundColor: "#F79122", color: "#000000" } : { backgroundColor: "#E91720", color: "#FFFFFF" };
|
|
21
21
|
}
|
|
22
22
|
return { backgroundColor: "transparent", color: "inherit" };
|
|
23
23
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
const { scrollTop:
|
|
26
|
-
|
|
24
|
+
return /* @__PURE__ */ t("div", { className: "table_container", children: /* @__PURE__ */ t("div", { className: "table-scroll", onScroll: (e) => {
|
|
25
|
+
const { scrollTop: l, clientHeight: r, scrollHeight: a } = e.currentTarget;
|
|
26
|
+
a - l <= r + 50 && d && b((F) => {
|
|
27
27
|
const h = F + 5;
|
|
28
|
-
return h >=
|
|
28
|
+
return h >= i.length && p(!1), Math.min(h, i.length);
|
|
29
29
|
});
|
|
30
|
-
}, children: /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
g.slice(0, f).map((
|
|
34
|
-
/* @__PURE__ */
|
|
30
|
+
}, children: /* @__PURE__ */ o(u, { striped: !0, hover: !0, children: [
|
|
31
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: n.map((e, l) => /* @__PURE__ */ t("th", { className: "table-header-unp", children: e.label }, l)) }) }),
|
|
32
|
+
/* @__PURE__ */ o("tbody", { children: [
|
|
33
|
+
g.slice(0, f).map((e, l) => /* @__PURE__ */ o(C.Fragment, { children: [
|
|
34
|
+
/* @__PURE__ */ t("tr", { children: n.map((r, a) => /* @__PURE__ */ t(
|
|
35
35
|
"td",
|
|
36
36
|
{
|
|
37
|
-
onClick: () =>
|
|
37
|
+
onClick: () => y(r, e),
|
|
38
38
|
style: {
|
|
39
|
-
cursor:
|
|
39
|
+
cursor: r.hasModal ? "pointer" : "default"
|
|
40
40
|
},
|
|
41
|
-
className:
|
|
42
|
-
children:
|
|
41
|
+
className: r.hasModal ? "cell-with-modal" : "",
|
|
42
|
+
children: r.key === "diasHabiles" ? /* @__PURE__ */ t(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
45
|
style: {
|
|
46
46
|
display: "flex",
|
|
47
47
|
justifyContent: "center"
|
|
48
48
|
},
|
|
49
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ t(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
52
|
style: {
|
|
53
53
|
padding: "8px",
|
|
54
54
|
borderRadius: "100px",
|
|
55
55
|
width: "40px",
|
|
56
|
-
backgroundColor:
|
|
57
|
-
|
|
56
|
+
backgroundColor: c(
|
|
57
|
+
e.diasHabiles
|
|
58
58
|
).backgroundColor,
|
|
59
|
-
color:
|
|
60
|
-
|
|
59
|
+
color: c(
|
|
60
|
+
e.diasHabiles
|
|
61
61
|
).color
|
|
62
62
|
},
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ t("span", { children: e.diasHabiles })
|
|
64
64
|
}
|
|
65
65
|
)
|
|
66
66
|
}
|
|
67
|
-
) :
|
|
67
|
+
) : r.renderComponent ? r.renderComponent(e) : /* @__PURE__ */ t("div", { children: (typeof e[r.key] == "string" || e[r.key] instanceof String) && e[r.key].length > 39 ? e[r.key].slice(0, 39) + "..." : e[r.key] })
|
|
68
68
|
},
|
|
69
|
-
|
|
69
|
+
a
|
|
70
70
|
)) }),
|
|
71
|
-
|
|
71
|
+
k && e.estadoRegistro === "en_gestion" && !i.some((r) => r.estadoRegistro === "en_gestion" && i.indexOf(r) > l) && /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: n.length, className: "text-center", style: { padding: "0 0 0 0" }, children: /* @__PURE__ */ t("div", { style: {
|
|
72
72
|
height: "2rem",
|
|
73
73
|
display: "flex",
|
|
74
74
|
flexDirection: "row",
|
|
75
75
|
justifyContent: "center",
|
|
76
76
|
alignItems: "center",
|
|
77
77
|
fontWeight: "600",
|
|
78
|
-
color:
|
|
79
|
-
backgroundColor:
|
|
80
|
-
}, children: /* @__PURE__ */
|
|
81
|
-
] },
|
|
82
|
-
|
|
78
|
+
color: l % 2 === 0 ? "#365072" : "#303D50",
|
|
79
|
+
backgroundColor: l % 2 === 0 ? "#fefefe" : "#f9fafa"
|
|
80
|
+
}, children: /* @__PURE__ */ t(m, { style: { fontSize: "1.3rem" } }) }) }) })
|
|
81
|
+
] }, l)),
|
|
82
|
+
d && /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: n.length, className: "text-center", children: "Cargando más datos..." }) })
|
|
83
83
|
] })
|
|
84
84
|
] }) }) });
|
|
85
85
|
};
|