react-ecosistema-unp 1.7.0 → 1.7.1-8.pre-1
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/dist/TabPane-BiwPZSbT.js +752 -0
- package/dist/assets/ContenedorVentana.css +1 -1
- package/dist/assets/EcoModalStyles.css +1 -0
- package/dist/assets/Modal.css +1 -1
- package/dist/assets/TabVentana.css +1 -1
- package/dist/assets/Tabla.css +1 -1
- package/dist/assets/Tarjeta.css +1 -1
- package/dist/cards/tarjeta/Tarjeta.js +37 -34
- package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +1 -1
- package/dist/cards/tarjeta-info/TarjetaInfo.js +1 -1
- package/dist/data/tarjeta-datos/TarjetaDatos.js +1 -1
- package/dist/index-BrykDZgK.js +390 -0
- package/dist/{index-CgSyrJ_X.js → index-D3WseyJh.js} +18 -14
- package/dist/{index-Cpp73e44.js → index-DDjnZyBf.js} +31 -19
- package/dist/lib/auth/contexts/AuthContex.d.ts +3 -0
- package/dist/lib/cards/tarjeta/Tarjeta.d.ts +1 -0
- package/dist/lib/tables/tabla-registros/TablaRegistros.d.ts +8 -0
- package/dist/lib/tables/tabla-registros/modal/Modal.d.ts +2 -3
- package/dist/lib/tables/tabla-registros/modal-v2/EcoModal.d.ts +22 -0
- package/dist/lib/tables/tabla-registros/tabla/Tabla.d.ts +7 -1
- package/dist/lib/ui/items-modal/ItemsModal.d.ts +1 -0
- package/dist/lib/ui/paginador/Paginador.d.ts +3 -0
- package/dist/lib/ui.d.ts +1 -1
- package/dist/lib/utils/eco-provider/EcoContext.d.ts +4 -0
- package/dist/lib/utils/fetch-interceptor/fetchInterceptor.d.ts +7 -0
- package/dist/lib/utils/websocket-manager/WebSocketContext.d.ts +3 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/shared/app-list/AppList.js +2 -2
- package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
- package/dist/shared/menu-lateral/MenuLateral.js +6 -4
- package/dist/shared/notificacion-usuario/NotificacionUsuario.js +3 -3
- package/dist/shared/tab-ventana/TabVentana.js +1 -1
- package/dist/shared/ventana-tabs/VentanaTabs.js +1 -1
- package/dist/tables/tabla-registros/TablaRegistros.js +499 -492
- package/dist/tables/tabla-registros/buscador/Buscador.js +1 -1
- package/dist/tables/tabla-registros/encabezado-tabla/EncabezadoTabla.js +12 -9
- package/dist/tables/tabla-registros/modal/Modal.js +23 -23
- package/dist/tables/tabla-registros/modal-v2/EcoModal.js +118 -0
- package/dist/tables/tabla-registros/tabla/Tabla.js +187 -127
- package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
- package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
- package/dist/ui/icono-tooltip/IconoTooltip.js +1 -1
- package/dist/ui/items-modal/ItemsModal.js +16 -13
- package/dist/ui/paginador/Paginador.js +27 -16
- package/dist/ui.js +9 -8
- package/dist/utils/components/ProtectedRoute.js +57 -30
- package/dist/utils/components/UserRoute.js +45 -22
- package/dist/utils/eco-provider/EcoContext.js +31 -0
- package/dist/utils/fetch-interceptor/fetchInterceptor.js +56 -0
- package/dist/utils/unp-historico/UnpHistorico.js +6 -4
- package/dist/utils.js +17 -15
- package/package.json +4 -2
- package/dist/TabPane-DtFCEmIj.js +0 -1136
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { x as s } from "../../../index-DDjnZyBf.js";
|
|
3
3
|
import { F as i, a as l } from "../../../FormGroup-BLpFcIN5.js";
|
|
4
4
|
import '../../../assets/Buscador.css';const d = ({ onSearch: r }) => {
|
|
5
5
|
const n = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { Encabezado as
|
|
2
|
+
import { Encabezado as a } from "../../../ui/encabezado/Encabezado.js";
|
|
3
3
|
import "../../../ui/subtitulo/Subtitulo.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import '../../../assets/Modal.css';import '../../../assets/ContenedorVentana.css';import '../../../assets/IconoTooltip.css';import '../../../assets/ItemsModal.css';import '../../../assets/Logo.css';import '../../../assets/Bootstrap.css';import '../../../assets/Paginador.css';import '../../../assets/ContenidoModal.css';/* empty css */
|
|
5
|
+
import '../../../assets/EcoModalStyles.css';import '../../../assets/Modal.css';import '../../../assets/ContenedorVentana.css';import '../../../assets/IconoTooltip.css';import '../../../assets/ItemsModal.css';import '../../../assets/Logo.css';import '../../../assets/Bootstrap.css';import '../../../assets/Paginador.css';import '../../../assets/ContenidoModal.css';/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
@@ -11,22 +11,25 @@ import "react-router-dom";
|
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
|
+
import "../../../index-BrykDZgK.js";
|
|
15
|
+
/* empty css */
|
|
14
16
|
import "../../../Animacion-ThNL9iiY.js";
|
|
15
|
-
import { BusquedaInput as
|
|
16
|
-
const
|
|
17
|
+
import { BusquedaInput as e } from "../buscador/Buscador.js";
|
|
18
|
+
const B = ({
|
|
17
19
|
title: m,
|
|
18
20
|
subtitle: t,
|
|
19
21
|
data: p,
|
|
20
22
|
setSearchTerm: n,
|
|
21
|
-
extraInput: o
|
|
22
|
-
enableColumnSearch
|
|
23
|
+
extraInput: o
|
|
24
|
+
// enableColumnSearch
|
|
23
25
|
}) => /* @__PURE__ */ i("div", { className: "unp-row", children: [
|
|
24
|
-
/* @__PURE__ */ r(
|
|
26
|
+
/* @__PURE__ */ r(a, { title: m, subtitle: t }),
|
|
25
27
|
/* @__PURE__ */ i("div", { className: "inputs-container", children: [
|
|
26
|
-
p.length > 0 &&
|
|
28
|
+
p.length > 0 && // && !enableColumnSearch
|
|
29
|
+
/* @__PURE__ */ r(e, { onSearch: n }),
|
|
27
30
|
o && /* @__PURE__ */ r("div", { children: o })
|
|
28
31
|
] })
|
|
29
32
|
] });
|
|
30
33
|
export {
|
|
31
|
-
|
|
34
|
+
B as EncabezadoTabla
|
|
32
35
|
};
|
|
@@ -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,118 @@
|
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useRef as I, useEffect as u } from "react";
|
|
3
|
+
import { R as M } from "../../../index-BrykDZgK.js";
|
|
4
|
+
import { q as A, r as B } from "../../../index-DDjnZyBf.js";
|
|
5
|
+
import '../../../assets/EcoModalStyles.css';/* empty css */
|
|
6
|
+
const X = ({
|
|
7
|
+
show: r,
|
|
8
|
+
onHide: f,
|
|
9
|
+
title: N,
|
|
10
|
+
children: S,
|
|
11
|
+
closeModalOut: k,
|
|
12
|
+
isMaximized: l,
|
|
13
|
+
onToggleMaximize: p,
|
|
14
|
+
showMaximizeButton: E = !1,
|
|
15
|
+
modalType: o = "primary",
|
|
16
|
+
primaryPosition: s = "right",
|
|
17
|
+
disableClose: h = !1,
|
|
18
|
+
hasSecondaryModalOpen: R = !1,
|
|
19
|
+
otherModalOpen: n = !1,
|
|
20
|
+
widthPercent: y,
|
|
21
|
+
headerBgColor: j = "#303D50",
|
|
22
|
+
hasBody: D = !0,
|
|
23
|
+
showOverlay: $ = !0
|
|
24
|
+
}) => {
|
|
25
|
+
const [b, v] = m(!1), [c, _] = m(!1), [g, w] = m(!1), a = I(null);
|
|
26
|
+
u(() => (w(!0), o === "secondary" && !a.current && (a.current = document.createElement("div"), a.current.className = "modal_portal_container", document.body.appendChild(a.current)), () => {
|
|
27
|
+
w(!1), a.current && (document.body.removeChild(a.current), a.current = null);
|
|
28
|
+
}), [o]), u(() => {
|
|
29
|
+
const e = document.body;
|
|
30
|
+
return r ? (v(!0), e.classList.add("eco_modal_open")) : (_(!0), setTimeout(() => {
|
|
31
|
+
g && (v(!1), _(!1)), e.classList.remove("eco_modal_open");
|
|
32
|
+
}, 200)), () => {
|
|
33
|
+
e.classList.remove("eco_modal_open");
|
|
34
|
+
};
|
|
35
|
+
}, [r, g]), u(() => {
|
|
36
|
+
const e = document.body;
|
|
37
|
+
o === "primary" && (e.classList.remove("eco_modal_primary_right", "eco_modal_primary_left"), e.classList.add(
|
|
38
|
+
s === "left" ? "eco_modal_primary_left" : "eco_modal_primary_right"
|
|
39
|
+
));
|
|
40
|
+
const d = () => {
|
|
41
|
+
if (!(r && n && !l)) {
|
|
42
|
+
e.classList.remove("eco_modal_two_modals_50", "eco_modal_two_modals_large");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
window.innerWidth >= 1200 ? (e.classList.add("eco_modal_two_modals_large"), e.classList.remove("eco_modal_two_modals_50")) : (e.classList.add("eco_modal_two_modals_50"), e.classList.remove("eco_modal_two_modals_large"));
|
|
46
|
+
};
|
|
47
|
+
return d(), window.addEventListener("resize", d), () => {
|
|
48
|
+
o === "primary" && e.classList.remove("eco_modal_primary_right", "eco_modal_primary_left"), e.classList.remove("eco_modal_two_modals_50", "eco_modal_two_modals_large"), window.removeEventListener("resize", d);
|
|
49
|
+
};
|
|
50
|
+
}, [o, s, r, n, l]);
|
|
51
|
+
const x = () => o === "primary" ? s === "center" ? "eco_modal_primary_center" : `eco_modal_primary_${s}` : `eco_modal_secondary_${s === "left" ? "right" : "left"}`, W = () => {
|
|
52
|
+
const e = ["eco_modal_overlay"];
|
|
53
|
+
return $ && e.push("eco_modal_overlay_bg"), o === "primary" ? e.push(`eco_modal_primary_${s}`) : e.push("eco_modal_secondary_overlay"), b && !c && e.push("eco_modal_show"), c && e.push("eco_modal_hide"), e.join(" ");
|
|
54
|
+
}, z = () => {
|
|
55
|
+
const e = ["eco_modal_container", o, x()];
|
|
56
|
+
return b && !c && e.push("eco_modal_show"), c && e.push("eco_modal_hide"), l && e.push("eco_modal_maximized"), s === "center" && e.push("eco_modal_centered"), e.join(" ");
|
|
57
|
+
}, C = o === "primary" ? h || R : h, F = o === "primary" && r && n, O = () => {
|
|
58
|
+
!C && o === "primary" && k && (_(!0), setTimeout(() => {
|
|
59
|
+
f(), _(!1);
|
|
60
|
+
}, 200));
|
|
61
|
+
}, q = () => {
|
|
62
|
+
const e = {};
|
|
63
|
+
return o === "primary" && !l && y && (e["--modal-primary-width"] = `${y}%`), e;
|
|
64
|
+
}, L = /* @__PURE__ */ t("div", { className: W(), onClick: O, children: /* @__PURE__ */ i(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: z(),
|
|
68
|
+
style: q(),
|
|
69
|
+
onClick: (e) => e.stopPropagation(),
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ i(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
className: "eco_modal_header",
|
|
75
|
+
style: { backgroundColor: j },
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ t("span", { children: N }),
|
|
78
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", gap: 10 }, children: [
|
|
79
|
+
E && p && /* @__PURE__ */ t(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
className: "eco_modal_max_button",
|
|
83
|
+
onClick: p,
|
|
84
|
+
type: "button",
|
|
85
|
+
disabled: F,
|
|
86
|
+
children: l ? /* @__PURE__ */ t(A, { size: 14, className: "eco_modal_icon_header" }) : /* @__PURE__ */ t(B, { size: 14, className: "eco_modal_icon_header" })
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ t(
|
|
90
|
+
"button",
|
|
91
|
+
{
|
|
92
|
+
className: "eco_modal_close_button",
|
|
93
|
+
onClick: f,
|
|
94
|
+
type: "button",
|
|
95
|
+
disabled: C,
|
|
96
|
+
children: "×"
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ t(
|
|
104
|
+
"div",
|
|
105
|
+
{
|
|
106
|
+
className: "eco_modal_body",
|
|
107
|
+
style: { padding: D ? "1rem" : "0rem" },
|
|
108
|
+
children: S
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
) });
|
|
114
|
+
return o === "secondary" && a.current ? M.createPortal(L, a.current) : L;
|
|
115
|
+
};
|
|
116
|
+
export {
|
|
117
|
+
X as EcoModal
|
|
118
|
+
};
|
|
@@ -1,158 +1,218 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import { T as
|
|
6
|
-
import { F as
|
|
7
|
-
import { B as
|
|
8
|
-
import '../../../assets/Tabla.css';const
|
|
9
|
-
columns:
|
|
10
|
-
displayedData:
|
|
1
|
+
import { jsx as s, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import L, { useState as m, useEffect as Q } from "react";
|
|
3
|
+
import { v as S, w as X } from "../../../index-DDjnZyBf.js";
|
|
4
|
+
import { a as Y, b as Z, c as w, d as ee } from "../../../index-D3WseyJh.js";
|
|
5
|
+
import { T as te } from "../../../Table-C5ydZooy.js";
|
|
6
|
+
import { F as re, a as se } from "../../../FormGroup-BLpFcIN5.js";
|
|
7
|
+
import { B as oe } from "../../../Button-B87TJYml.js";
|
|
8
|
+
import '../../../assets/Tabla.css';const pe = ({
|
|
9
|
+
columns: u,
|
|
10
|
+
displayedData: f,
|
|
11
11
|
// tableData,
|
|
12
|
-
hasMoreData:
|
|
13
|
-
setHasMoreData:
|
|
14
|
-
visibleData:
|
|
15
|
-
setVisibleData:
|
|
16
|
-
handleCellClick:
|
|
17
|
-
totalDias:
|
|
18
|
-
isShared:
|
|
12
|
+
hasMoreData: x,
|
|
13
|
+
setHasMoreData: z,
|
|
14
|
+
visibleData: I,
|
|
15
|
+
setVisibleData: D,
|
|
16
|
+
handleCellClick: O,
|
|
17
|
+
totalDias: v,
|
|
18
|
+
isShared: b,
|
|
19
19
|
//
|
|
20
|
-
enableColumnSearch:
|
|
21
|
-
columnSearch:
|
|
22
|
-
handleColumnSearch:
|
|
23
|
-
enableColumnSorter:
|
|
20
|
+
enableColumnSearch: N,
|
|
21
|
+
columnSearch: R,
|
|
22
|
+
handleColumnSearch: M,
|
|
23
|
+
enableColumnSorter: T,
|
|
24
|
+
//
|
|
25
|
+
onSelectionChange: C,
|
|
26
|
+
enableRowSelection: h = !1
|
|
24
27
|
}) => {
|
|
25
|
-
const [
|
|
28
|
+
const [l, P] = m({
|
|
26
29
|
key: null,
|
|
27
30
|
direction: null
|
|
28
|
-
}),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
}), [c, U] = m([]), [y, _] = m(null), [k, B] = m(null);
|
|
32
|
+
Q(() => {
|
|
33
|
+
C == null || C(c);
|
|
34
|
+
}, [c]);
|
|
35
|
+
const V = (e, o) => {
|
|
36
|
+
const r = k || H, i = r.findIndex((p) => p.numeroRegistro === e);
|
|
37
|
+
if (i === -1) return;
|
|
38
|
+
const n = r[i], t = c.includes(e);
|
|
39
|
+
let a = [];
|
|
40
|
+
if (t)
|
|
41
|
+
a = c.filter((p) => p !== e), a.length === 0 && (B(null), _(null));
|
|
42
|
+
else if (c.length === 0) {
|
|
43
|
+
a = [e], _(n.tipoMesa);
|
|
44
|
+
const p = n.tipoMesa, q = r.filter((g) => g.tipoMesa === p && g.numeroRegistro !== e), j = r.filter((g) => g.tipoMesa !== p), E = r.findIndex((g) => g.numeroRegistro === e), J = j.slice(0, E), K = j.slice(E);
|
|
45
|
+
B([...J, n, ...q, ...K]);
|
|
46
|
+
} else {
|
|
47
|
+
if (y && n.tipoMesa !== y) return;
|
|
48
|
+
a = [...c, e];
|
|
49
|
+
}
|
|
50
|
+
U(a);
|
|
51
|
+
}, A = { i: 0 }, G = (e) => {
|
|
52
|
+
if (v) {
|
|
53
|
+
const o = e / v * 100;
|
|
31
54
|
return o <= 25 ? { backgroundColor: "#3AB34A", color: "#FFFFFF" } : o <= 50 ? { backgroundColor: "#F8EB10", color: "#000000" } : o <= 75 ? { backgroundColor: "#F79122", color: "#000000" } : { backgroundColor: "#E91720", color: "#FFFFFF" };
|
|
32
55
|
}
|
|
33
56
|
return { backgroundColor: "transparent", color: "inherit" };
|
|
34
|
-
},
|
|
35
|
-
const { scrollTop: o, clientHeight:
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
return
|
|
57
|
+
}, W = (e) => {
|
|
58
|
+
const { scrollTop: o, clientHeight: r, scrollHeight: i } = e.currentTarget;
|
|
59
|
+
i - o <= r + 50 && x && D((n) => {
|
|
60
|
+
const t = n + 5;
|
|
61
|
+
return t >= f.length && z(!1), Math.min(t, f.length);
|
|
39
62
|
});
|
|
40
|
-
},
|
|
41
|
-
|
|
63
|
+
}, $ = (e) => {
|
|
64
|
+
P((o) => ({
|
|
42
65
|
key: e,
|
|
43
66
|
direction: o.key === e && o.direction === "asc" ? "desc" : "asc"
|
|
44
67
|
}));
|
|
45
68
|
}, H = (() => {
|
|
46
|
-
if (!
|
|
47
|
-
if (
|
|
48
|
-
const [e, o] =
|
|
49
|
-
(
|
|
69
|
+
if (!l.key) return f;
|
|
70
|
+
if (b) {
|
|
71
|
+
const [e, o] = f.reduce(
|
|
72
|
+
(i, n) => (i[n.estadoRegistro === "en_gestion" ? 0 : 1].push(n), i),
|
|
50
73
|
[[], []]
|
|
51
74
|
);
|
|
52
|
-
return [...[...e].sort((
|
|
53
|
-
const
|
|
54
|
-
return typeof
|
|
75
|
+
return [...[...e].sort((i, n) => {
|
|
76
|
+
const t = i[l.key], a = n[l.key];
|
|
77
|
+
return typeof t == "number" && typeof a == "number" ? l.direction === "asc" ? t - a : a - t : typeof t == "string" && typeof a == "string" ? l.direction === "asc" ? t.localeCompare(a) : a.localeCompare(t) : 0;
|
|
55
78
|
}), ...o];
|
|
56
79
|
}
|
|
57
|
-
return [...
|
|
58
|
-
const
|
|
59
|
-
return typeof
|
|
80
|
+
return [...f].sort((e, o) => {
|
|
81
|
+
const r = e[l.key], i = o[l.key];
|
|
82
|
+
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;
|
|
60
83
|
});
|
|
61
|
-
})(),
|
|
62
|
-
return /* @__PURE__ */
|
|
84
|
+
})(), 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: W, children: /* @__PURE__ */ d(te, { striped: !0, hover: !0, children: [
|
|
63
86
|
/* @__PURE__ */ d("thead", { children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
"th",
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
onClick: () => (e.sorter || C) && S(e.key),
|
|
69
|
-
style: { cursor: k ? "pointer" : "default" },
|
|
70
|
-
children: [
|
|
71
|
-
e.label,
|
|
72
|
-
" ",
|
|
73
|
-
e.sorter || C ? i.key === e.key ? i.direction === "asc" ? /* @__PURE__ */ r(G, {}) : /* @__PURE__ */ r(R, {}) : /* @__PURE__ */ r(E, {}) : null
|
|
74
|
-
]
|
|
75
|
-
},
|
|
76
|
-
o
|
|
77
|
-
)) }),
|
|
78
|
-
k && /* @__PURE__ */ r("tr", { children: p.map((e, o) => /* @__PURE__ */ r("th", { children: /* @__PURE__ */ d(M, { className: "mx-1 position-relative", children: [
|
|
79
|
-
/* @__PURE__ */ r(
|
|
80
|
-
O,
|
|
81
|
-
{
|
|
82
|
-
type: "text",
|
|
83
|
-
placeholder: `Buscar ${e.label}`,
|
|
84
|
-
value: u[e.key] || "",
|
|
85
|
-
onChange: (t) => b(e.key, t.target.value),
|
|
86
|
-
className: "pe-4 search-column-input"
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
u[e.key] && /* @__PURE__ */ r(
|
|
90
|
-
U,
|
|
87
|
+
/* @__PURE__ */ d("tr", { children: [
|
|
88
|
+
h && /* @__PURE__ */ s("th", { className: "table-header-unp" }),
|
|
89
|
+
u.map((e, o) => /* @__PURE__ */ d(
|
|
90
|
+
"th",
|
|
91
91
|
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
className: "table-header-unp",
|
|
93
|
+
onClick: () => (e.sorter || T) && $(e.key),
|
|
94
|
+
style: { cursor: N ? "pointer" : "default" },
|
|
95
|
+
children: [
|
|
96
|
+
e.label,
|
|
97
|
+
" ",
|
|
98
|
+
c.length == 0 && (e.sorter || T) ? l.key === e.key ? l.direction === "asc" ? /* @__PURE__ */ s(Y, {}) : /* @__PURE__ */ s(Z, {}) : /* @__PURE__ */ s(w, {}) : null
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
o
|
|
102
|
+
))
|
|
103
|
+
] }),
|
|
104
|
+
c.length == 0 && N && /* @__PURE__ */ d("tr", { children: [
|
|
105
|
+
h && /* @__PURE__ */ s("th", { className: "table-header-unp" }),
|
|
106
|
+
u.map((e, o) => /* @__PURE__ */ s("th", { children: /* @__PURE__ */ d(re, { className: "mx-1 position-relative", children: [
|
|
107
|
+
/* @__PURE__ */ s(
|
|
108
|
+
se,
|
|
109
|
+
{
|
|
110
|
+
type: "text",
|
|
111
|
+
placeholder: `Buscar ${e.label}`,
|
|
112
|
+
value: R[e.key] || "",
|
|
113
|
+
onChange: (r) => M(e.key, r.target.value),
|
|
114
|
+
className: "search-column-input"
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
R[e.key] && /* @__PURE__ */ s(
|
|
118
|
+
oe,
|
|
119
|
+
{
|
|
120
|
+
variant: "link",
|
|
121
|
+
size: "sm",
|
|
122
|
+
className: "position-absolute end-0 top-50 translate-middle-y me-2 p-0",
|
|
123
|
+
onClick: () => M(e.key, ""),
|
|
124
|
+
style: { textDecoration: "none", color: "gray" },
|
|
125
|
+
children: "✖"
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
] }) }, o))
|
|
129
|
+
] })
|
|
101
130
|
] }),
|
|
102
131
|
/* @__PURE__ */ d("tbody", { children: [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
display: "flex",
|
|
117
|
-
justifyContent: "center"
|
|
118
|
-
},
|
|
119
|
-
children: /* @__PURE__ */ r(
|
|
120
|
-
"div",
|
|
132
|
+
F.slice(0, I).map((e, o) => {
|
|
133
|
+
let r = !1;
|
|
134
|
+
b ? e.estadoRegistro === "en_gestion" ? r = !0 : e.estadoRegistro === "por_gestionar" && A.i < 5 && (r = !0, A.i++) : r = !0;
|
|
135
|
+
const i = h && y != null && e.tipoMesa !== y, n = c.includes(e.numeroRegistro);
|
|
136
|
+
return /* @__PURE__ */ d(L.Fragment, { children: [
|
|
137
|
+
/* @__PURE__ */ d(
|
|
138
|
+
"tr",
|
|
139
|
+
{
|
|
140
|
+
className: h && n ? "row-selected" : "",
|
|
141
|
+
style: i && !n ? { opacity: 0.5 } : void 0,
|
|
142
|
+
children: [
|
|
143
|
+
h && /* @__PURE__ */ s(
|
|
144
|
+
"td",
|
|
121
145
|
{
|
|
146
|
+
className: "selection-cell",
|
|
122
147
|
style: {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
e.diasHabiles
|
|
128
|
-
).backgroundColor,
|
|
129
|
-
color: F(
|
|
130
|
-
e.diasHabiles
|
|
131
|
-
).color
|
|
148
|
+
width: 36,
|
|
149
|
+
textAlign: "center",
|
|
150
|
+
padding: 4,
|
|
151
|
+
cursor: i ? "not-allowed" : "pointer"
|
|
132
152
|
},
|
|
133
|
-
|
|
153
|
+
onClick: (t) => {
|
|
154
|
+
t.stopPropagation(), i || V(e.numeroRegistro);
|
|
155
|
+
},
|
|
156
|
+
children: n ? /* @__PURE__ */ s(ee, { size: 18, style: { color: "#505050ff" } }) : /* @__PURE__ */ s(S, { size: 18, style: { color: "#505050ff" } })
|
|
134
157
|
}
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
158
|
+
),
|
|
159
|
+
u.map((t, a) => /* @__PURE__ */ s(
|
|
160
|
+
"td",
|
|
161
|
+
{
|
|
162
|
+
onClick: () => r ? O(t, e) : {},
|
|
163
|
+
style: {
|
|
164
|
+
cursor: (t.hasModal || t.redirectTo) && r ? "pointer" : "default"
|
|
165
|
+
},
|
|
166
|
+
className: r ? t.redirectTo ? "cell-redirect" : t.hasModal ? "cell-with-modal" : "" : "",
|
|
167
|
+
children: t.key === "diasHabiles" ? /* @__PURE__ */ s(
|
|
168
|
+
"div",
|
|
169
|
+
{
|
|
170
|
+
style: {
|
|
171
|
+
display: "flex",
|
|
172
|
+
justifyContent: "center"
|
|
173
|
+
},
|
|
174
|
+
children: /* @__PURE__ */ s(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
style: {
|
|
178
|
+
padding: "8px",
|
|
179
|
+
borderRadius: "100px",
|
|
180
|
+
width: "40px",
|
|
181
|
+
backgroundColor: G(
|
|
182
|
+
e.diasHabiles
|
|
183
|
+
).backgroundColor,
|
|
184
|
+
color: G(
|
|
185
|
+
e.diasHabiles
|
|
186
|
+
).color
|
|
187
|
+
},
|
|
188
|
+
children: /* @__PURE__ */ s("span", { children: e.diasHabiles })
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
) : t.renderComponent ? t.renderComponent(e) : /* @__PURE__ */ s("div", { children: t.truncateText && (typeof e[t.key] == "string" || e[t.key] instanceof String) && e[t.key].length > 26 ? e[t.key].slice(0, 26) + "..." : e[t.key] })
|
|
193
|
+
},
|
|
194
|
+
a
|
|
195
|
+
))
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
e.numeroRegistro
|
|
199
|
+
),
|
|
200
|
+
b && e.estadoRegistro === "en_gestion" && !F.some((t) => t.estadoRegistro === "en_gestion" && F.indexOf(t) > o) && /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: u.length, className: "text-center", style: { padding: "0 0 0 0" }, children: /* @__PURE__ */ s("div", { style: {
|
|
201
|
+
height: "2rem",
|
|
202
|
+
display: "flex",
|
|
203
|
+
flexDirection: "row",
|
|
204
|
+
justifyContent: "center",
|
|
205
|
+
alignItems: "center",
|
|
206
|
+
fontWeight: "600",
|
|
207
|
+
color: o % 2 === 0 ? "#365072" : "#303D50",
|
|
208
|
+
backgroundColor: o % 2 === 0 ? "#fefefe" : "#f9fafa"
|
|
209
|
+
}, children: /* @__PURE__ */ s(X, { style: { fontSize: "1.3rem" } }) }) }) })
|
|
210
|
+
] }, o);
|
|
211
|
+
}),
|
|
212
|
+
x && /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: u.length, className: "text-center", children: "Cargando más datos..." }) })
|
|
153
213
|
] })
|
|
154
214
|
] }) }) });
|
|
155
215
|
};
|
|
156
216
|
export {
|
|
157
|
-
|
|
217
|
+
pe as Tabla
|
|
158
218
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as s, Fragment as N, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import p, { useState as o } from "react";
|
|
3
|
-
import { n as v } from "../../index-
|
|
3
|
+
import { n as v } from "../../index-DDjnZyBf.js";
|
|
4
4
|
import '../../assets/ContenidoModal.css';/* empty css */
|
|
5
5
|
const x = ({ title: u, modalContent: i, children: d }) => {
|
|
6
6
|
const [a, l] = o(0), [m, c] = o(!0), [r, n] = o(!1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, Fragment as N, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m, useEffect as p } from "react";
|
|
3
|
-
import { n as v } from "../../index-
|
|
3
|
+
import { n as v } from "../../index-DDjnZyBf.js";
|
|
4
4
|
import '../../assets/ContenidoModal.css';/* empty css */
|
|
5
5
|
const y = ({ title: d, children: h, buttons: s, isShowing: i, setIsShowing: u = () => {
|
|
6
6
|
} }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as L, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { useState as M } from "react";
|
|
3
|
-
import { F as A, a as U, b as j, c as B, d as J, e as W, f as z, g as P, h as Y, i as q, j as g, k as h, l as G, m as H } from "../../index-
|
|
3
|
+
import { F as A, a as U, b as j, c as B, d as J, e as W, f as z, g as P, h as Y, i as q, j as g, k as h, l as G, m as H } from "../../index-DDjnZyBf.js";
|
|
4
4
|
import '../../assets/IconoTooltip.css';/* empty css */
|
|
5
5
|
const _ = ({ recordType: x, taken: o = !0, customIcon: l }) => {
|
|
6
6
|
const [a, b] = M(!1);
|