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.
@@ -1,6 +1,6 @@
1
- import { jsx as e, jsxs as l, Fragment as q } from "react/jsx-runtime";
2
- import { useState as C, useRef as ne, useCallback as re, useMemo as z, useEffect as se } from "react";
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 Ne } from "../tabla-registros/modal-v2/EcoModal.js";
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 ve } from "../../ui/table-skeleton/TableSkeleton.js";
22
+ import { TableSkeleton as Me } from "../../ui/table-skeleton/TableSkeleton.js";
23
23
  /* empty css */
24
- import { PaginadorV2 as oe } from "../../ui/paginador-v2/PaginadorV2.js";
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 G } from "../../utils/formatters/dateFormatter.js";
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
- import "../../SileoNotifications-BESOBARG.js";
41
+ /* empty css */
42
+ import "../../index-C1R4rkuA.js";
42
43
  import "../../auth/contexts/AuthContex.js";
43
44
  /* empty css */
44
- import { T as xe } from "../../Table-cUZFLrPi.js";
45
- function P(s, r) {
46
- return s[r];
45
+ import { T as be } from "../../Table-cUZFLrPi.js";
46
+ function P(r, n) {
47
+ return r[n];
47
48
  }
48
- function be(s, r) {
49
- const c = s, h = c.uuid ?? c.id ?? c.numeroRegistro;
50
- return h != null ? String(h) : r;
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 $(s, r, c) {
53
- return P(s, r) === c;
53
+ function j(r, n, c) {
54
+ return P(r, n) === c;
54
55
  }
55
- function ke(s, r) {
56
- if (r.filterValue) return r.filterValue(s);
57
- const c = P(s, r.key);
58
- return c == null ? "" : r.isDate ? G(String(c)) : String(c);
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 ht({
61
- columns: s,
62
- data: r,
61
+ function ft({
62
+ columns: r,
63
+ data: n,
63
64
  isShared: c = !1,
64
- splitField: h = "estadoRegistro",
65
+ splitField: u = "estadoRegistro",
65
66
  firstSectionValue: y = "en_gestion",
66
67
  sectionLabels: T = ["", "Por gestionar"],
67
- renderModalContent: R,
68
+ renderModalContent: O,
68
69
  title: g,
69
70
  subtitle: f,
70
- isLoading: le,
71
- headerActions: B,
72
- getRowStyle: L,
71
+ isLoading: ie,
72
+ headerActions: R,
73
+ getRowStyle: _,
73
74
  pageSize: N = 10,
74
- getRowKey: j = be,
75
- rowSelection: i,
76
- infiniteScroll: d,
75
+ getRowKey: E = ke,
76
+ rowSelection: d,
77
+ infiniteScroll: m,
77
78
  enableColumnFilters: v = !1,
78
- stickyHeader: O = !0,
79
- toolbar: m
79
+ stickyHeader: K = !0,
80
+ toolbar: h,
81
+ onRowClick: $
80
82
  }) {
81
- var ae;
82
- const [ce, J] = C(!1), [Q, ie] = C(null), [U, de] = C(null), [me, X] = C(!1), [W, _] = C(1), [x, pe] = C({}), Y = ne(null), Z = ne(null), D = s.length + (i ? 1 : 0), F = re(
83
- (t, a) => ((i == null ? void 0 : i.getRowKey) ?? j)(t, a),
84
- [i, j]
85
- ), o = z(() => {
86
- if (!v) return r;
87
- const t = Object.entries(x).filter(([, a]) => a.trim());
88
- return t.length === 0 ? r : r.filter(
89
- (a) => t.every(([p, u]) => {
90
- const M = s.find((K) => K.key === p);
91
- if (!M || M.filterable === !1) return !0;
92
- const I = u.trim().toLowerCase();
93
- return ke(a, M).toLowerCase().includes(I);
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
- }, [r, x, v, s]), V = z(
97
- () => v && Object.values(x).some((t) => t.trim()),
98
+ }, [n, x, v, r]), A = W(
99
+ () => v && Object.values(x).some((a) => a.trim()),
98
100
  [v, x]
99
101
  );
100
- se(() => {
101
- _(1);
102
- }, [r, x]);
103
- const H = Math.max(1, Math.ceil(o.length / N)), E = (W - 1) * N, b = !!d, he = z(
104
- () => o.slice(E, E + N),
105
- [o, E, N]
106
- ), A = b ? o : he, k = b ? 0 : E;
107
- se(() => {
108
- if (!d) return;
109
- const t = Y.current, a = Z.current;
110
- if (!t || !a) return;
111
- const p = new IntersectionObserver(
112
- (u) => {
113
- u.some((I) => I.isIntersecting) && d.hasMore && !d.isLoadingMore && d.onLoadMore();
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: t, rootMargin: "160px 0px", threshold: 0 }
117
+ { root: a, rootMargin: "160px 0px", threshold: 0 }
116
118
  );
117
- return p.observe(a), () => p.disconnect();
118
- }, [d, r.length]);
119
- const w = re(
120
- (t, a) => {
121
- !R || !a.hasModal || (ie(t), de(a), J(!0));
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
- [R]
124
- ), S = () => {
125
- J(!1), X(!1);
126
- }, ee = z(() => {
127
- const t = [];
128
- if (c && k > 0) {
129
- const a = o[k - 1], p = o[k];
130
- a && p && $(a, h, y) && !$(p, h, y) && t.push(
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-${k}`)
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 A.forEach((a, p) => {
135
- const u = k + p;
136
- if (c && u > 0) {
137
- const n = o[u - 1], ye = o[u];
138
- n && $(n, h, y) && !$(ye, h, y) && t.push(
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-${u}`)
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 M = j(a, u), I = i ? F(a, u) : null, K = i != null && i.selectedKey != null && String(i.selectedKey) === String(I);
143
- t.push(
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: K ? "eco-row-selected" : void 0,
148
- style: L ? L(a) : void 0,
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
- i ? /* @__PURE__ */ e(
157
+ d ? /* @__PURE__ */ e(
151
158
  "td",
152
159
  {
153
160
  className: "eco-select-cell",
154
- onClick: (n) => n.stopPropagation(),
155
- onKeyDown: (n) => n.stopPropagation(),
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: K === !0,
162
- onChange: () => i.onSelect(a),
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
- s.map((n) => /* @__PURE__ */ e(
169
- "td",
170
- {
171
- onClick: () => w(a, n),
172
- style: n.hasModal ? { cursor: "pointer" } : void 0,
173
- className: `
174
- ${n.hasModal ? "eco-has-modal-cell" : ""}
175
- ${n.noPadding ? "eco-no-padding-cell" : ""}
176
- `,
177
- children: n.hasModal ? /* @__PURE__ */ e("div", { className: "eco-cell-modal-trigger", children: n.renderComponent ? n.renderComponent(a) : n.isDate ? G(String(P(a, n.key) ?? "")) : String(P(a, n.key) ?? "—") }) : n.renderComponent ? n.renderComponent(a) : n.isDate ? G(String(P(a, n.key) ?? "")) : String(P(a, n.key) ?? "—")
178
- },
179
- n.key
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
- M
193
+ k
184
194
  )
185
195
  );
186
- }), t;
196
+ }), a;
187
197
  }, [
188
- A,
198
+ S,
189
199
  o,
190
- k,
191
- s,
200
+ b,
201
+ r,
192
202
  c,
193
- h,
203
+ u,
194
204
  y,
195
205
  T,
196
- j,
197
- L,
198
- w,
199
- i,
200
- F,
206
+ E,
207
+ _,
208
+ ee,
209
+ d,
210
+ V,
201
211
  D
202
- ]), ue = /* @__PURE__ */ l("thead", { children: [
212
+ ]), fe = /* @__PURE__ */ l("thead", { children: [
203
213
  /* @__PURE__ */ l("tr", { children: [
204
- i ? /* @__PURE__ */ e("th", { scope: "col", className: "eco-select-cell", "aria-label": "Selección", children: "Sel." }) : null,
205
- s.map((t) => /* @__PURE__ */ e("th", { children: t.label }, t.key))
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
- i ? /* @__PURE__ */ e("th", { scope: "col", className: "eco-column-filter-cell" }) : null,
209
- s.map((t) => /* @__PURE__ */ e("th", { scope: "col", className: "eco-column-filter-cell", children: t.filterable === !1 ? null : /* @__PURE__ */ e(
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[t.key] ?? "",
216
- onChange: (a) => pe((p) => ({ ...p, [t.key]: a.target.value })),
217
- "aria-label": `Filtrar ${t.label}`
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-${t.key}`))
229
+ ) }, `filter-${a.key}`))
220
230
  ] }) : null
221
- ] }), ge = /* @__PURE__ */ e("tbody", { children: ee.length > 0 ? ee : /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: D, className: "text-center py-5 text-muted", children: "No se encontraron registros para mostrar." }) }) }), te = V && o.length !== r.length ? /* @__PURE__ */ l(q, { children: [
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: r.length }),
235
+ /* @__PURE__ */ e("strong", { children: n.length }),
226
236
  " registros"
227
- ] }) : /* @__PURE__ */ l(q, { children: [
237
+ ] }) : /* @__PURE__ */ l(G, { children: [
228
238
  "Total de registros: ",
229
239
  /* @__PURE__ */ e("strong", { children: o.length })
230
- ] }), fe = O ? /* @__PURE__ */ l("div", { className: "eco-custom-pagination eco-table-footer", "aria-live": "polite", children: [
231
- /* @__PURE__ */ e("span", { className: "eco-pagination-info", children: te }),
232
- b ? null : /* @__PURE__ */ e("div", { className: "eco-table-footer-pagination", children: /* @__PURE__ */ e(
233
- oe,
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: W,
236
- totalPages: H,
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
- ] }) : b ? /* @__PURE__ */ e("div", { className: "eco-custom-pagination eco-table-infinite-total", "aria-live": "polite", children: /* @__PURE__ */ e("span", { className: "eco-pagination-info", children: te }) }) : /* @__PURE__ */ e(
243
- oe,
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: W,
246
- totalPages: H,
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 le ? /* @__PURE__ */ e(ve, { columns: D }) : /* @__PURE__ */ l(
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${O ? " custom-data-table-split--sticky" : ""}`,
265
+ className: `eco-custom-data-table-wrapper custom-data-table-split${K ? " custom-data-table-split--sticky" : ""}`,
256
266
  children: [
257
- g ?? f ?? B ?? m ? /* @__PURE__ */ l(
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
- m || B ? /* @__PURE__ */ l("div", { className: "eco-custom-data-table-toolbar-actions", children: [
277
- m != null && m.onSearch ? /* @__PURE__ */ l("div", { className: "eco-custom-data-table-search-wrapper", children: [
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: m.searchPlaceholder ?? "Buscar…",
284
- value: m.searchTerm ?? "",
285
- onChange: (t) => {
286
- var a;
287
- return (a = m.onSearch) == null ? void 0 : a.call(m, t.target.value);
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": m.searchPlaceholder ?? "Buscar en la tabla"
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 && V ? /* @__PURE__ */ l("span", { className: "eco-table-count-badge", children: [
304
+ v && A ? /* @__PURE__ */ l("span", { className: "eco-table-count-badge", children: [
295
305
  o.length,
296
306
  " de ",
297
- r.length
307
+ n.length
298
308
  ] }) : null,
299
- B ? /* @__PURE__ */ e("div", { className: "eco-table-actions-wrap", style: { display: "flex", alignItems: "center", flexShrink: 0 }, children: B }) : null
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((t) => $(t, h, y)) && ((ae = T[0]) != null && ae.trim()) ? /* @__PURE__ */ e("div", { className: "eco-split-section-caption", children: T[0] }) : null,
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: Y,
309
- className: `eco-custom-data-table-container${O ? " eco-table-sticky-header" : ""}${!O && b ? " eco-table-infinite-scroll" : ""}`,
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(xe, { className: "eco-custom-data-table", borderless: !0, children: [
312
- ue,
313
- ge
321
+ /* @__PURE__ */ l(be, { className: "eco-custom-data-table", borderless: !0, children: [
322
+ fe,
323
+ ye
314
324
  ] }),
315
- b && (d != null && d.hasMore) ? /* @__PURE__ */ l(q, { children: [
316
- d != null && d.isLoadingMore ? /* @__PURE__ */ e("div", { className: "eco-infinite-loading text-muted small py-2 text-center", children: "Cargando más solicitudes…" }) : null,
317
- /* @__PURE__ */ e("div", { ref: Z, className: "eco-infinite-sentinel", "aria-hidden": !0 })
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
- fe,
323
- R ? /* @__PURE__ */ e(
324
- Ne,
332
+ Ne,
333
+ O ? /* @__PURE__ */ e(
334
+ xe,
325
335
  {
326
- show: ce,
327
- onHide: S,
336
+ show: de,
337
+ onHide: te,
328
338
  closeModalOut: !0,
329
339
  title: "",
330
340
  modalType: "primary",
331
341
  showMaximizeButton: !0,
332
- isMaximized: me,
333
- onToggleMaximize: () => X((t) => !t),
342
+ isMaximized: he,
343
+ onToggleMaximize: () => Y((a) => !a),
334
344
  hasBody: !0,
335
- children: Q && U ? R(Q, U, S) : /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e("p", { children: "No hay contenido disponible para este modal." }) })
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
- ht as CustomDataTableSplit
353
+ ft as CustomDataTableSplit
344
354
  };
@@ -1,9 +1,9 @@
1
- import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
- import { AuthProvider as i } from "../../auth/contexts/AuthContex.js";
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 m } from "../websocket-manager/WebSocketContext.js";
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
- import { T as p } from "../../SileoNotifications-BESOBARG.js";
42
+ /* empty css */
43
+ import "../../index-C1R4rkuA.js";
44
+ import { Toaster as e } from "../notifications/EcoToaster.js";
43
45
  /* empty css */
44
- const X = ({ children: o }) => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ t(m, { children: [
45
- /* @__PURE__ */ r(p, {}),
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
- X as EcoProvider
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
+ };