react-ecosistema-unp 2.0.0 → 2.1.0
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/assets/EcoModalStyles.css +1 -1
- package/dist/assets/SileoNotifications.css +1 -1
- package/dist/auth/services/User.js +14 -9
- package/dist/{SileoNotifications-BESOBARG.js → index-C1R4rkuA.js} +1 -1
- package/dist/lib/auth/services/User.d.ts +8 -1
- package/dist/lib/tables/custom-data-table-split/CustomDataTableSplit.d.ts +5 -3
- package/dist/lib/utils/eco-provider/EcoContext.d.ts +4 -2
- package/dist/lib/utils/notifications/EcoToaster.d.ts +18 -0
- package/dist/lib/utils/notifications/SileoNotifications.d.ts +23 -7
- package/dist/lib/utils.d.ts +1 -1
- package/dist/shared/menu-lateral/MenuLateral.js +5 -4
- package/dist/shared/notificacion-usuario/NotificacionUsuario.js +59 -58
- package/dist/tables/custom-data-table/CustomDataTable.js +5 -4
- package/dist/tables/custom-data-table-split/CustomDataTableSplit.js +182 -172
- package/dist/utils/eco-provider/EcoContext.js +10 -8
- package/dist/utils/notifications/EcoToaster.js +47 -0
- package/dist/utils/notifications/SileoNotifications.js +62 -55
- package/dist/utils/websocket-manager/websocket.js +22 -18
- package/dist/utils.js +30 -27
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as e, jsxs as l, Fragment as
|
|
2
|
-
import { useState as C, useRef as
|
|
3
|
-
import '../../assets/Trazabilidad.css';import '../../assets/TarjetaInfo.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/SmartTextArea.css';import '../../assets/EcoFooter.css';import '../../assets/ResumenEvaluacion.css';import '../../assets/AlertaFormulario.css';import '../../assets/SeccionFormulario.css';import '../../assets/NotificacionPopoverV2.css';import '../../assets/CardGestionLateral.css';import '../../assets/NavFormulariosLateral.css';import '../../assets/DatosBasicosCard.css';import '../../assets/StatusFilterBar.css';import '../../assets/StatusSemaphore.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/TarjetaLectura.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/StepperV2.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModalV2.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/Logo.css';import '../../assets/CustomDataTableSplit.css';/* empty css */
|
|
1
|
+
import { jsx as e, jsxs as l, Fragment as G } from "react/jsx-runtime";
|
|
2
|
+
import { useState as C, useRef as re, useCallback as oe, useMemo as W, useEffect as le } from "react";
|
|
3
|
+
import '../../assets/SileoNotifications.css';import '../../assets/Trazabilidad.css';import '../../assets/TarjetaInfo.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/SmartTextArea.css';import '../../assets/EcoFooter.css';import '../../assets/ResumenEvaluacion.css';import '../../assets/AlertaFormulario.css';import '../../assets/SeccionFormulario.css';import '../../assets/NotificacionPopoverV2.css';import '../../assets/CardGestionLateral.css';import '../../assets/NavFormulariosLateral.css';import '../../assets/DatosBasicosCard.css';import '../../assets/StatusFilterBar.css';import '../../assets/StatusSemaphore.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/TarjetaLectura.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/StepperV2.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModalV2.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/Logo.css';import '../../assets/CustomDataTableSplit.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "../../ui/subtitulo/Subtitulo.js";
|
|
6
6
|
/* empty css */
|
|
@@ -12,16 +12,16 @@ import "react-router-dom";
|
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { EcoModal as
|
|
15
|
+
import { EcoModal as xe } from "../tabla-registros/modal-v2/EcoModal.js";
|
|
16
16
|
import "../../ui/animacion/Animacion.js";
|
|
17
17
|
/* empty css */
|
|
18
18
|
/* empty css */
|
|
19
19
|
import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
|
|
20
20
|
/* empty css */
|
|
21
21
|
/* empty css */
|
|
22
|
-
import { TableSkeleton as
|
|
22
|
+
import { TableSkeleton as Me } from "../../ui/table-skeleton/TableSkeleton.js";
|
|
23
23
|
/* empty css */
|
|
24
|
-
import { PaginadorV2 as
|
|
24
|
+
import { PaginadorV2 as ce } from "../../ui/paginador-v2/PaginadorV2.js";
|
|
25
25
|
/* empty css */
|
|
26
26
|
/* empty css */
|
|
27
27
|
/* empty css */
|
|
@@ -32,229 +32,239 @@ import { PaginadorV2 as oe } from "../../ui/paginador-v2/PaginadorV2.js";
|
|
|
32
32
|
/* empty css */
|
|
33
33
|
/* empty css */
|
|
34
34
|
/* empty css */
|
|
35
|
-
import { formatDate as
|
|
35
|
+
import { formatDate as J } from "../../utils/formatters/dateFormatter.js";
|
|
36
36
|
import "../../index-Cy8qF6oY.js";
|
|
37
37
|
import "../../utils/websocket-manager/WebSocketContext.js";
|
|
38
38
|
/* empty css */
|
|
39
39
|
/* empty css */
|
|
40
40
|
/* empty css */
|
|
41
|
-
|
|
41
|
+
/* empty css */
|
|
42
|
+
import "../../index-C1R4rkuA.js";
|
|
42
43
|
import "../../auth/contexts/AuthContex.js";
|
|
43
44
|
/* empty css */
|
|
44
|
-
import { T as
|
|
45
|
-
function P(
|
|
46
|
-
return
|
|
45
|
+
import { T as be } from "../../Table-cUZFLrPi.js";
|
|
46
|
+
function P(r, n) {
|
|
47
|
+
return r[n];
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
const c =
|
|
50
|
-
return
|
|
49
|
+
function ke(r, n) {
|
|
50
|
+
const c = r, u = c.uuid ?? c.id ?? c.numeroRegistro;
|
|
51
|
+
return u != null ? String(u) : n;
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
return P(
|
|
53
|
+
function j(r, n, c) {
|
|
54
|
+
return P(r, n) === c;
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
-
if (
|
|
57
|
-
const c = P(
|
|
58
|
-
return c == null ? "" :
|
|
56
|
+
function Ce(r, n) {
|
|
57
|
+
if (n.filterValue) return n.filterValue(r);
|
|
58
|
+
const c = P(r, n.key);
|
|
59
|
+
return c == null ? "" : n.isDate ? J(String(c)) : String(c);
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
-
columns:
|
|
62
|
-
data:
|
|
61
|
+
function ft({
|
|
62
|
+
columns: r,
|
|
63
|
+
data: n,
|
|
63
64
|
isShared: c = !1,
|
|
64
|
-
splitField:
|
|
65
|
+
splitField: u = "estadoRegistro",
|
|
65
66
|
firstSectionValue: y = "en_gestion",
|
|
66
67
|
sectionLabels: T = ["", "Por gestionar"],
|
|
67
|
-
renderModalContent:
|
|
68
|
+
renderModalContent: O,
|
|
68
69
|
title: g,
|
|
69
70
|
subtitle: f,
|
|
70
|
-
isLoading:
|
|
71
|
-
headerActions:
|
|
72
|
-
getRowStyle:
|
|
71
|
+
isLoading: ie,
|
|
72
|
+
headerActions: R,
|
|
73
|
+
getRowStyle: _,
|
|
73
74
|
pageSize: N = 10,
|
|
74
|
-
getRowKey:
|
|
75
|
-
rowSelection:
|
|
76
|
-
infiniteScroll:
|
|
75
|
+
getRowKey: E = ke,
|
|
76
|
+
rowSelection: d,
|
|
77
|
+
infiniteScroll: m,
|
|
77
78
|
enableColumnFilters: v = !1,
|
|
78
|
-
stickyHeader:
|
|
79
|
-
toolbar:
|
|
79
|
+
stickyHeader: K = !0,
|
|
80
|
+
toolbar: h,
|
|
81
|
+
onRowClick: $
|
|
80
82
|
}) {
|
|
81
|
-
var
|
|
82
|
-
const [
|
|
83
|
-
(
|
|
84
|
-
[
|
|
85
|
-
), o =
|
|
86
|
-
if (!v) return
|
|
87
|
-
const
|
|
88
|
-
return
|
|
89
|
-
(
|
|
90
|
-
const
|
|
91
|
-
if (!
|
|
92
|
-
const I =
|
|
93
|
-
return
|
|
83
|
+
var ne;
|
|
84
|
+
const [de, Q] = C(!1), [U, me] = C(null), [X, pe] = C(null), [he, Y] = C(!1), [q, F] = C(1), [x, ue] = C({}), Z = re(null), H = re(null), D = r.length + (d ? 1 : 0), V = oe(
|
|
85
|
+
(a, t) => ((d == null ? void 0 : d.getRowKey) ?? E)(a, t),
|
|
86
|
+
[d, E]
|
|
87
|
+
), o = W(() => {
|
|
88
|
+
if (!v) return n;
|
|
89
|
+
const a = Object.entries(x).filter(([, t]) => t.trim());
|
|
90
|
+
return a.length === 0 ? n : n.filter(
|
|
91
|
+
(t) => a.every(([i, p]) => {
|
|
92
|
+
const k = r.find((L) => L.key === i);
|
|
93
|
+
if (!k || k.filterable === !1) return !0;
|
|
94
|
+
const I = p.trim().toLowerCase();
|
|
95
|
+
return Ce(t, k).toLowerCase().includes(I);
|
|
94
96
|
})
|
|
95
97
|
);
|
|
96
|
-
}, [
|
|
97
|
-
() => v && Object.values(x).some((
|
|
98
|
+
}, [n, x, v, r]), A = W(
|
|
99
|
+
() => v && Object.values(x).some((a) => a.trim()),
|
|
98
100
|
[v, x]
|
|
99
101
|
);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}, [
|
|
103
|
-
const
|
|
104
|
-
() => o.slice(
|
|
105
|
-
[o,
|
|
106
|
-
),
|
|
107
|
-
|
|
108
|
-
if (!
|
|
109
|
-
const
|
|
110
|
-
if (!
|
|
111
|
-
const
|
|
112
|
-
(
|
|
113
|
-
|
|
102
|
+
le(() => {
|
|
103
|
+
F(1);
|
|
104
|
+
}, [n, x]);
|
|
105
|
+
const w = Math.max(1, Math.ceil(o.length / N)), z = (q - 1) * N, M = !!m, ge = W(
|
|
106
|
+
() => o.slice(z, z + N),
|
|
107
|
+
[o, z, N]
|
|
108
|
+
), S = M ? o : ge, b = M ? 0 : z;
|
|
109
|
+
le(() => {
|
|
110
|
+
if (!m) return;
|
|
111
|
+
const a = Z.current, t = H.current;
|
|
112
|
+
if (!a || !t) return;
|
|
113
|
+
const i = new IntersectionObserver(
|
|
114
|
+
(p) => {
|
|
115
|
+
p.some((I) => I.isIntersecting) && m.hasMore && !m.isLoadingMore && m.onLoadMore();
|
|
114
116
|
},
|
|
115
|
-
{ root:
|
|
117
|
+
{ root: a, rootMargin: "160px 0px", threshold: 0 }
|
|
116
118
|
);
|
|
117
|
-
return
|
|
118
|
-
}, [
|
|
119
|
-
const
|
|
120
|
-
(t,
|
|
121
|
-
|
|
119
|
+
return i.observe(t), () => i.disconnect();
|
|
120
|
+
}, [m, n.length]);
|
|
121
|
+
const ee = oe(
|
|
122
|
+
(a, t, i) => {
|
|
123
|
+
const p = typeof t.hasModal == "function" ? t.hasModal(a) : !!t.hasModal;
|
|
124
|
+
!O || !p || (i == null || i.stopPropagation(), me(a), pe(t), Q(!0));
|
|
122
125
|
},
|
|
123
|
-
[
|
|
124
|
-
),
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
const
|
|
128
|
-
if (c &&
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
/* @__PURE__ */ e("tr", { className: "eco-split-section-row", children: /* @__PURE__ */ e("td", { colSpan: D, className: "eco-split-section-cell", children: /* @__PURE__ */ e("div", { className: "eco-split-section-bar", children: T[1] }) }) }, `split-top-${
|
|
126
|
+
[O]
|
|
127
|
+
), te = () => {
|
|
128
|
+
Q(!1), Y(!1);
|
|
129
|
+
}, ae = W(() => {
|
|
130
|
+
const a = [];
|
|
131
|
+
if (c && b > 0) {
|
|
132
|
+
const t = o[b - 1], i = o[b];
|
|
133
|
+
t && i && j(t, u, y) && !j(i, u, y) && a.push(
|
|
134
|
+
/* @__PURE__ */ e("tr", { className: "eco-split-section-row", children: /* @__PURE__ */ e("td", { colSpan: D, className: "eco-split-section-cell", children: /* @__PURE__ */ e("div", { className: "eco-split-section-bar", children: T[1] }) }) }, `split-top-${b}`)
|
|
132
135
|
);
|
|
133
136
|
}
|
|
134
|
-
return
|
|
135
|
-
const
|
|
136
|
-
if (c &&
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
/* @__PURE__ */ e("tr", { className: "eco-split-section-row", children: /* @__PURE__ */ e("td", { colSpan: D, className: "eco-split-section-cell", children: /* @__PURE__ */ e("div", { className: "eco-split-section-bar", children: T[1] }) }) }, `split-${
|
|
137
|
+
return S.forEach((t, i) => {
|
|
138
|
+
const p = b + i;
|
|
139
|
+
if (c && p > 0) {
|
|
140
|
+
const s = o[p - 1], B = o[p];
|
|
141
|
+
s && j(s, u, y) && !j(B, u, y) && a.push(
|
|
142
|
+
/* @__PURE__ */ e("tr", { className: "eco-split-section-row", children: /* @__PURE__ */ e("td", { colSpan: D, className: "eco-split-section-cell", children: /* @__PURE__ */ e("div", { className: "eco-split-section-bar", children: T[1] }) }) }, `split-${p}`)
|
|
140
143
|
);
|
|
141
144
|
}
|
|
142
|
-
const
|
|
143
|
-
|
|
145
|
+
const k = E(t, p), I = d ? V(t, p) : null, L = d != null && d.selectedKey != null && String(d.selectedKey) === String(I);
|
|
146
|
+
a.push(
|
|
144
147
|
/* @__PURE__ */ l(
|
|
145
148
|
"tr",
|
|
146
149
|
{
|
|
147
|
-
className:
|
|
148
|
-
style:
|
|
150
|
+
className: `${L ? "eco-row-selected" : ""} ${$ ? "eco-row-clickable" : ""}`,
|
|
151
|
+
style: {
|
|
152
|
+
cursor: $ ? "pointer" : void 0,
|
|
153
|
+
..._ ? _(t) : {}
|
|
154
|
+
},
|
|
155
|
+
onClick: () => $ == null ? void 0 : $(t),
|
|
149
156
|
children: [
|
|
150
|
-
|
|
157
|
+
d ? /* @__PURE__ */ e(
|
|
151
158
|
"td",
|
|
152
159
|
{
|
|
153
160
|
className: "eco-select-cell",
|
|
154
|
-
onClick: (
|
|
155
|
-
onKeyDown: (
|
|
161
|
+
onClick: (s) => s.stopPropagation(),
|
|
162
|
+
onKeyDown: (s) => s.stopPropagation(),
|
|
156
163
|
children: /* @__PURE__ */ e(
|
|
157
164
|
"input",
|
|
158
165
|
{
|
|
159
166
|
type: "radio",
|
|
160
167
|
name: "eco-table-row-selection",
|
|
161
|
-
checked:
|
|
162
|
-
onChange: () =>
|
|
168
|
+
checked: L === !0,
|
|
169
|
+
onChange: () => d.onSelect(t),
|
|
163
170
|
"aria-label": "Seleccionar fila para exportar"
|
|
164
171
|
}
|
|
165
172
|
)
|
|
166
173
|
}
|
|
167
174
|
) : null,
|
|
168
|
-
|
|
169
|
-
"
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
175
|
+
r.map((s) => {
|
|
176
|
+
const B = typeof s.hasModal == "function" ? s.hasModal(t) : !!s.hasModal;
|
|
177
|
+
return /* @__PURE__ */ e(
|
|
178
|
+
"td",
|
|
179
|
+
{
|
|
180
|
+
onClick: (ve) => ee(t, s, ve),
|
|
181
|
+
style: B ? { cursor: "pointer" } : void 0,
|
|
182
|
+
className: `
|
|
183
|
+
${B ? "eco-has-modal-cell" : ""}
|
|
184
|
+
${s.noPadding ? "eco-no-padding-cell" : ""}
|
|
185
|
+
`,
|
|
186
|
+
children: B ? /* @__PURE__ */ e("div", { className: "eco-cell-modal-trigger", children: s.renderComponent ? s.renderComponent(t) : s.isDate ? J(String(P(t, s.key) ?? "")) : String(P(t, s.key) ?? "—") }) : s.renderComponent ? s.renderComponent(t) : s.isDate ? J(String(P(t, s.key) ?? "")) : String(P(t, s.key) ?? "—")
|
|
187
|
+
},
|
|
188
|
+
s.key
|
|
189
|
+
);
|
|
190
|
+
})
|
|
181
191
|
]
|
|
182
192
|
},
|
|
183
|
-
|
|
193
|
+
k
|
|
184
194
|
)
|
|
185
195
|
);
|
|
186
|
-
}),
|
|
196
|
+
}), a;
|
|
187
197
|
}, [
|
|
188
|
-
|
|
198
|
+
S,
|
|
189
199
|
o,
|
|
190
|
-
|
|
191
|
-
|
|
200
|
+
b,
|
|
201
|
+
r,
|
|
192
202
|
c,
|
|
193
|
-
|
|
203
|
+
u,
|
|
194
204
|
y,
|
|
195
205
|
T,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
206
|
+
E,
|
|
207
|
+
_,
|
|
208
|
+
ee,
|
|
209
|
+
d,
|
|
210
|
+
V,
|
|
201
211
|
D
|
|
202
|
-
]),
|
|
212
|
+
]), fe = /* @__PURE__ */ l("thead", { children: [
|
|
203
213
|
/* @__PURE__ */ l("tr", { children: [
|
|
204
|
-
|
|
205
|
-
|
|
214
|
+
d ? /* @__PURE__ */ e("th", { scope: "col", className: "eco-select-cell", "aria-label": "Selección", children: "Sel." }) : null,
|
|
215
|
+
r.map((a) => /* @__PURE__ */ e("th", { children: a.label }, a.key))
|
|
206
216
|
] }),
|
|
207
217
|
v ? /* @__PURE__ */ l("tr", { className: "eco-column-filter-row", children: [
|
|
208
|
-
|
|
209
|
-
|
|
218
|
+
d ? /* @__PURE__ */ e("th", { scope: "col", className: "eco-column-filter-cell" }) : null,
|
|
219
|
+
r.map((a) => /* @__PURE__ */ e("th", { scope: "col", className: "eco-column-filter-cell", children: a.filterable === !1 ? null : /* @__PURE__ */ e(
|
|
210
220
|
"input",
|
|
211
221
|
{
|
|
212
222
|
type: "search",
|
|
213
223
|
className: "eco-column-filter-input",
|
|
214
224
|
placeholder: "Filtrar…",
|
|
215
|
-
value: x[
|
|
216
|
-
onChange: (
|
|
217
|
-
"aria-label": `Filtrar ${
|
|
225
|
+
value: x[a.key] ?? "",
|
|
226
|
+
onChange: (t) => ue((i) => ({ ...i, [a.key]: t.target.value })),
|
|
227
|
+
"aria-label": `Filtrar ${a.label}`
|
|
218
228
|
}
|
|
219
|
-
) }, `filter-${
|
|
229
|
+
) }, `filter-${a.key}`))
|
|
220
230
|
] }) : null
|
|
221
|
-
] }),
|
|
231
|
+
] }), ye = /* @__PURE__ */ e("tbody", { children: ae.length > 0 ? ae : /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: D, className: "text-center py-5 text-muted", children: "No se encontraron registros para mostrar." }) }) }), se = A && o.length !== n.length ? /* @__PURE__ */ l(G, { children: [
|
|
222
232
|
"Mostrando ",
|
|
223
233
|
/* @__PURE__ */ e("strong", { children: o.length }),
|
|
224
234
|
" de ",
|
|
225
|
-
/* @__PURE__ */ e("strong", { children:
|
|
235
|
+
/* @__PURE__ */ e("strong", { children: n.length }),
|
|
226
236
|
" registros"
|
|
227
|
-
] }) : /* @__PURE__ */ l(
|
|
237
|
+
] }) : /* @__PURE__ */ l(G, { children: [
|
|
228
238
|
"Total de registros: ",
|
|
229
239
|
/* @__PURE__ */ e("strong", { children: o.length })
|
|
230
|
-
] }),
|
|
231
|
-
/* @__PURE__ */ e("span", { className: "eco-pagination-info", children:
|
|
232
|
-
|
|
233
|
-
|
|
240
|
+
] }), Ne = K ? /* @__PURE__ */ l("div", { className: "eco-custom-pagination eco-table-footer", "aria-live": "polite", children: [
|
|
241
|
+
/* @__PURE__ */ e("span", { className: "eco-pagination-info", children: se }),
|
|
242
|
+
M ? null : /* @__PURE__ */ e("div", { className: "eco-table-footer-pagination", children: /* @__PURE__ */ e(
|
|
243
|
+
ce,
|
|
234
244
|
{
|
|
235
|
-
currentPage:
|
|
236
|
-
totalPages:
|
|
237
|
-
onPageChange:
|
|
245
|
+
currentPage: q,
|
|
246
|
+
totalPages: w,
|
|
247
|
+
onPageChange: F,
|
|
238
248
|
totalRecords: o.length,
|
|
239
249
|
pageSize: N
|
|
240
250
|
}
|
|
241
251
|
) })
|
|
242
|
-
] }) :
|
|
243
|
-
|
|
252
|
+
] }) : M ? /* @__PURE__ */ e("div", { className: "eco-custom-pagination eco-table-infinite-total", "aria-live": "polite", children: /* @__PURE__ */ e("span", { className: "eco-pagination-info", children: se }) }) : /* @__PURE__ */ e(
|
|
253
|
+
ce,
|
|
244
254
|
{
|
|
245
|
-
currentPage:
|
|
246
|
-
totalPages:
|
|
247
|
-
onPageChange:
|
|
255
|
+
currentPage: q,
|
|
256
|
+
totalPages: w,
|
|
257
|
+
onPageChange: F,
|
|
248
258
|
totalRecords: o.length,
|
|
249
259
|
pageSize: N
|
|
250
260
|
}
|
|
251
261
|
);
|
|
252
|
-
return
|
|
262
|
+
return ie ? /* @__PURE__ */ e(Me, { columns: D }) : /* @__PURE__ */ l(
|
|
253
263
|
"div",
|
|
254
264
|
{
|
|
255
|
-
className: `eco-custom-data-table-wrapper custom-data-table-split${
|
|
265
|
+
className: `eco-custom-data-table-wrapper custom-data-table-split${K ? " custom-data-table-split--sticky" : ""}`,
|
|
256
266
|
children: [
|
|
257
|
-
g ?? f ??
|
|
267
|
+
g ?? f ?? R ?? h ? /* @__PURE__ */ l(
|
|
258
268
|
"div",
|
|
259
269
|
{
|
|
260
270
|
className: `eco-custom-data-table-header ${!g && !f ? "compact" : ""}`,
|
|
@@ -273,66 +283,66 @@ function ht({
|
|
|
273
283
|
g ? /* @__PURE__ */ e("h2", { style: { fontSize: "1.5rem", fontWeight: 700, color: "#1a202c", marginBottom: "4px" }, children: g }) : null,
|
|
274
284
|
f ? /* @__PURE__ */ e("p", { style: { fontSize: "0.9rem", color: "#718096", margin: 0 }, children: f }) : null
|
|
275
285
|
] }),
|
|
276
|
-
|
|
277
|
-
|
|
286
|
+
h || R ? /* @__PURE__ */ l("div", { className: "eco-custom-data-table-toolbar-actions", children: [
|
|
287
|
+
h != null && h.onSearch ? /* @__PURE__ */ l("div", { className: "eco-custom-data-table-search-wrapper", children: [
|
|
278
288
|
/* @__PURE__ */ e(
|
|
279
289
|
"input",
|
|
280
290
|
{
|
|
281
291
|
type: "search",
|
|
282
292
|
className: "eco-custom-data-table-search-input",
|
|
283
|
-
placeholder:
|
|
284
|
-
value:
|
|
285
|
-
onChange: (
|
|
286
|
-
var
|
|
287
|
-
return (
|
|
293
|
+
placeholder: h.searchPlaceholder ?? "Buscar…",
|
|
294
|
+
value: h.searchTerm ?? "",
|
|
295
|
+
onChange: (a) => {
|
|
296
|
+
var t;
|
|
297
|
+
return (t = h.onSearch) == null ? void 0 : t.call(h, a.target.value);
|
|
288
298
|
},
|
|
289
|
-
"aria-label":
|
|
299
|
+
"aria-label": h.searchPlaceholder ?? "Buscar en la tabla"
|
|
290
300
|
}
|
|
291
301
|
),
|
|
292
302
|
/* @__PURE__ */ e("span", { className: "eco-search-icon-inside", "aria-hidden": "true", children: "⌕" })
|
|
293
303
|
] }) : null,
|
|
294
|
-
v &&
|
|
304
|
+
v && A ? /* @__PURE__ */ l("span", { className: "eco-table-count-badge", children: [
|
|
295
305
|
o.length,
|
|
296
306
|
" de ",
|
|
297
|
-
|
|
307
|
+
n.length
|
|
298
308
|
] }) : null,
|
|
299
|
-
|
|
309
|
+
R ? /* @__PURE__ */ e("div", { className: "eco-table-actions-wrap", style: { display: "flex", alignItems: "center", flexShrink: 0 }, children: R }) : null
|
|
300
310
|
] }) : null
|
|
301
311
|
]
|
|
302
312
|
}
|
|
303
313
|
) : null,
|
|
304
|
-
c && o.some((
|
|
314
|
+
c && o.some((a) => j(a, u, y)) && ((ne = T[0]) != null && ne.trim()) ? /* @__PURE__ */ e("div", { className: "eco-split-section-caption", children: T[0] }) : null,
|
|
305
315
|
/* @__PURE__ */ l(
|
|
306
316
|
"div",
|
|
307
317
|
{
|
|
308
|
-
ref:
|
|
309
|
-
className: `eco-custom-data-table-container${
|
|
318
|
+
ref: Z,
|
|
319
|
+
className: `eco-custom-data-table-container${K ? " eco-table-sticky-header" : ""}${!K && M ? " eco-table-infinite-scroll" : ""}`,
|
|
310
320
|
children: [
|
|
311
|
-
/* @__PURE__ */ l(
|
|
312
|
-
|
|
313
|
-
|
|
321
|
+
/* @__PURE__ */ l(be, { className: "eco-custom-data-table", borderless: !0, children: [
|
|
322
|
+
fe,
|
|
323
|
+
ye
|
|
314
324
|
] }),
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
/* @__PURE__ */ e("div", { ref:
|
|
325
|
+
M && (m != null && m.hasMore) ? /* @__PURE__ */ l(G, { children: [
|
|
326
|
+
m != null && m.isLoadingMore ? /* @__PURE__ */ e("div", { className: "eco-infinite-loading text-muted small py-2 text-center", children: "Cargando más solicitudes…" }) : null,
|
|
327
|
+
/* @__PURE__ */ e("div", { ref: H, className: "eco-infinite-sentinel", "aria-hidden": !0 })
|
|
318
328
|
] }) : null
|
|
319
329
|
]
|
|
320
330
|
}
|
|
321
331
|
),
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
332
|
+
Ne,
|
|
333
|
+
O ? /* @__PURE__ */ e(
|
|
334
|
+
xe,
|
|
325
335
|
{
|
|
326
|
-
show:
|
|
327
|
-
onHide:
|
|
336
|
+
show: de,
|
|
337
|
+
onHide: te,
|
|
328
338
|
closeModalOut: !0,
|
|
329
339
|
title: "",
|
|
330
340
|
modalType: "primary",
|
|
331
341
|
showMaximizeButton: !0,
|
|
332
|
-
isMaximized:
|
|
333
|
-
onToggleMaximize: () =>
|
|
342
|
+
isMaximized: he,
|
|
343
|
+
onToggleMaximize: () => Y((a) => !a),
|
|
334
344
|
hasBody: !0,
|
|
335
|
-
children:
|
|
345
|
+
children: U && X ? O(U, X, te) : /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e("p", { children: "No hay contenido disponible para este modal." }) })
|
|
336
346
|
}
|
|
337
347
|
) : null
|
|
338
348
|
]
|
|
@@ -340,5 +350,5 @@ function ht({
|
|
|
340
350
|
);
|
|
341
351
|
}
|
|
342
352
|
export {
|
|
343
|
-
|
|
353
|
+
ft as CustomDataTableSplit
|
|
344
354
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { AuthProvider as
|
|
1
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { AuthProvider as m } from "../../auth/contexts/AuthContex.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../index-Cy8qF6oY.js";
|
|
5
|
-
import { WebSocketProvider as
|
|
6
|
-
import '../../assets/Trazabilidad.css';import '../../assets/TarjetaInfo.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/SmartTextArea.css';import '../../assets/EcoFooter.css';import '../../assets/ResumenEvaluacion.css';import '../../assets/AlertaFormulario.css';import '../../assets/SeccionFormulario.css';import '../../assets/NotificacionPopoverV2.css';import '../../assets/CardGestionLateral.css';import '../../assets/NavFormulariosLateral.css';import '../../assets/DatosBasicosCard.css';import '../../assets/StatusFilterBar.css';import '../../assets/PaginadorV2.css';import '../../assets/StatusSemaphore.css';import '../../assets/TableSkeleton.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/TarjetaLectura.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/EcoModalStyles.css';import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/StepperV2.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModalV2.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/Logo.css';/* empty css */
|
|
5
|
+
import { WebSocketProvider as p } from "../websocket-manager/WebSocketContext.js";
|
|
6
|
+
import '../../assets/SileoNotifications.css';import '../../assets/Trazabilidad.css';import '../../assets/TarjetaInfo.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/SmartTextArea.css';import '../../assets/EcoFooter.css';import '../../assets/ResumenEvaluacion.css';import '../../assets/AlertaFormulario.css';import '../../assets/SeccionFormulario.css';import '../../assets/NotificacionPopoverV2.css';import '../../assets/CardGestionLateral.css';import '../../assets/NavFormulariosLateral.css';import '../../assets/DatosBasicosCard.css';import '../../assets/StatusFilterBar.css';import '../../assets/PaginadorV2.css';import '../../assets/StatusSemaphore.css';import '../../assets/TableSkeleton.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/TarjetaLectura.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/EcoModalStyles.css';import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/StepperV2.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModalV2.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/Logo.css';/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import "../../ui/subtitulo/Subtitulo.js";
|
|
9
9
|
/* empty css */
|
|
@@ -39,12 +39,14 @@ import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
|
|
|
39
39
|
/* empty css */
|
|
40
40
|
/* empty css */
|
|
41
41
|
/* empty css */
|
|
42
|
-
|
|
42
|
+
/* empty css */
|
|
43
|
+
import "../../index-C1R4rkuA.js";
|
|
44
|
+
import { Toaster as e } from "../notifications/EcoToaster.js";
|
|
43
45
|
/* empty css */
|
|
44
|
-
const
|
|
45
|
-
/* @__PURE__ */ r(
|
|
46
|
+
const _ = ({ children: o, showToaster: t = !0 }) => /* @__PURE__ */ r(m, { children: /* @__PURE__ */ i(p, { children: [
|
|
47
|
+
t && /* @__PURE__ */ r(e, { isDefault: !0 }),
|
|
46
48
|
o
|
|
47
49
|
] }) });
|
|
48
50
|
export {
|
|
49
|
-
|
|
51
|
+
_ as EcoProvider
|
|
50
52
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useId as d, useSyncExternalStore as l, useEffect as c } from "react";
|
|
3
|
+
import { T as a } from "../../index-C1R4rkuA.js";
|
|
4
|
+
const i = [], s = /* @__PURE__ */ new Set();
|
|
5
|
+
function o() {
|
|
6
|
+
s.forEach((e) => {
|
|
7
|
+
try {
|
|
8
|
+
e();
|
|
9
|
+
} catch {
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function g(e, t, n) {
|
|
14
|
+
const r = i.find((f) => f.id === e);
|
|
15
|
+
r ? (r.isDefault = t, r.props = n) : i.push({ id: e, isDefault: t, props: n }), o();
|
|
16
|
+
}
|
|
17
|
+
function h(e) {
|
|
18
|
+
const t = i.findIndex((n) => n.id === e);
|
|
19
|
+
t !== -1 && (i.splice(t, 1), o());
|
|
20
|
+
}
|
|
21
|
+
function m(e, t) {
|
|
22
|
+
const n = i.find((r) => r.id === e);
|
|
23
|
+
n && (n.props = t, o());
|
|
24
|
+
}
|
|
25
|
+
function x() {
|
|
26
|
+
if (i.length === 0) return null;
|
|
27
|
+
const e = i.filter((t) => !t.isDefault);
|
|
28
|
+
return e.length > 0 ? e[e.length - 1].id : i[0].id;
|
|
29
|
+
}
|
|
30
|
+
const E = ({ isDefault: e = !1, ...t }) => {
|
|
31
|
+
const n = d(), r = l(
|
|
32
|
+
(f) => (s.add(f), () => {
|
|
33
|
+
s.delete(f);
|
|
34
|
+
}),
|
|
35
|
+
() => x(),
|
|
36
|
+
() => null
|
|
37
|
+
);
|
|
38
|
+
return c(() => (g(n, e, t), () => {
|
|
39
|
+
h(n);
|
|
40
|
+
}), [n, e]), c(() => {
|
|
41
|
+
m(n, t);
|
|
42
|
+
}, [n, t.theme, t.position, JSON.stringify(t.offset), JSON.stringify(t.options)]), r !== n ? null : /* @__PURE__ */ u(a, { ...t });
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
E as Toaster,
|
|
46
|
+
E as default
|
|
47
|
+
};
|