react-ecosistema-unp 2.1.0 → 2.2.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.
Files changed (62) hide show
  1. package/dist/{AppList-BshxZhoN.js → AppList-DORGpC4I.js} +84 -84
  2. package/dist/assets/DocumentoVisorEstado.css +1 -0
  3. package/dist/assets/EcoDataTable.css +1 -1
  4. package/dist/assets/EcoDataTableBandejaFooter.css +1 -1
  5. package/dist/assets/SileoNotifications.css +1 -1
  6. package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +1 -1
  7. package/dist/cards/tarjeta-info/TarjetaInfo.js +1 -1
  8. package/dist/data/tarjeta-datos/TarjetaDatos.js +1 -1
  9. package/dist/{index-C4MBu_wk.js → index-B96iRUpt.js} +38 -34
  10. package/dist/{index-h-TtOxhs.js → index-BqaJxgOF.js} +182 -170
  11. package/dist/lib/tables/custom-data-table/CustomDataTable.d.ts +2 -0
  12. package/dist/lib/tables/custom-data-table-split/CustomDataTableSplit.d.ts +3 -1
  13. package/dist/lib/tables/eco-data-table/components/EcoDataTable/EcoDataTable.d.ts +1 -1
  14. package/dist/lib/tables/eco-data-table/components/EcoDataTableBandejaFooter.d.ts +8 -1
  15. package/dist/lib/tables/eco-data-table/hooks/useEcoTableSelection.d.ts +1 -0
  16. package/dist/lib/tables/eco-data-table/types.d.ts +7 -0
  17. package/dist/lib/ui/animacion/Animacion.d.ts +1 -0
  18. package/dist/lib/ui.d.ts +1 -0
  19. package/dist/lib/utils/modal-radicados/DocumentoVisorEstado.d.ts +18 -0
  20. package/dist/lib/utils/modal-radicados/ModalDocumento.d.ts +26 -0
  21. package/dist/lib/utils/modal-radicados/VisorDocumento.d.ts +8 -0
  22. package/dist/lib/utils.d.ts +1 -0
  23. package/dist/shared/app-list/AppList.js +2 -2
  24. package/dist/shared/iconos-sistema/IconosSistema.js +1 -1
  25. package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
  26. package/dist/shared/menu-lateral/MenuLateral.js +4 -3
  27. package/dist/shared/notificacion-usuario/NotificacionUsuario.js +6 -5
  28. package/dist/shared/ventana-tabs/VentanaTabs.js +1 -1
  29. package/dist/tables/custom-data-table/CustomDataTable.js +549 -547
  30. package/dist/tables/custom-data-table-split/CustomDataTableSplit.js +68 -65
  31. package/dist/tables/custom-table-toolbar/CustomTableToolbar.js +1 -1
  32. package/dist/tables/eco-data-table/components/EcoDataTable/EcoDataTable.js +190 -149
  33. package/dist/tables/eco-data-table/components/EcoDataTableBandejaFooter.js +36 -26
  34. package/dist/tables/eco-data-table/hooks/useEcoTableSelection.js +9 -8
  35. package/dist/tables/tabla-registros/buscador/Buscador.js +1 -1
  36. package/dist/tables/tabla-registros/modal-v2/EcoModal.js +11 -11
  37. package/dist/tables/tabla-registros/tabla/Tabla.js +22 -22
  38. package/dist/ui/alertas/AlertaFormulario.js +1 -1
  39. package/dist/ui/card-gestion-lateral/CardGestionLateral.js +1 -1
  40. package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
  41. package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
  42. package/dist/ui/contenido-modal-v2/ContenidoModalV2.js +1 -1
  43. package/dist/ui/contenido-modal-v2/ModalV2Menu.js +1 -1
  44. package/dist/ui/datos-basicos-card/DatosBasicosCard.js +1 -1
  45. package/dist/ui/icono-tooltip/IconoTooltip.js +10 -10
  46. package/dist/ui/items-modal/ItemsModal.js +1 -1
  47. package/dist/ui/nav-formularios-lateral/NavFormulariosLateral.js +1 -1
  48. package/dist/ui/notificacion-popover-v2/NotificacionPopoverV2.js +50 -50
  49. package/dist/ui/resumen-evaluacion/ResumenEvaluacion.js +5 -5
  50. package/dist/ui/status-filter-bar/StatusFilterBar.js +8 -8
  51. package/dist/ui/status-semaphore/StatusSemaphore.js +1 -1
  52. package/dist/ui/stepper-v2/StepperV2.js +1 -1
  53. package/dist/utils/eco-provider/EcoContext.js +4 -3
  54. package/dist/utils/modal-radicados/AuxRadicadosComponents/TarjetaRadicado.js +12 -12
  55. package/dist/utils/modal-radicados/DocumentoVisorEstado.js +125 -0
  56. package/dist/utils/modal-radicados/ModalDocumento.js +155 -170
  57. package/dist/utils/modal-radicados/ModalRadicado.js +34 -34
  58. package/dist/utils/modal-radicados/VisorDocumento.js +61 -61
  59. package/dist/utils/notifications/EcoToaster.js +26 -25
  60. package/dist/utils/unp-historico/UnpHistorico.js +1 -1
  61. package/dist/utils.js +29 -27
  62. package/package.json +1 -1
@@ -1,230 +1,271 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { useRef as de, useState as M, useLayoutEffect as be, useMemo as me, useCallback as he } from "react";
3
- import { j as pe, k as fe, l as ue } from "../../../../index-C4MBu_wk.js";
4
- import { U as ye } from "../../../../index-h-TtOxhs.js";
5
- import { useNavigate as ve } from "react-router-dom";
6
- import { useEcoTablePagination as ge } from "../../hooks/useEcoTablePagination.js";
7
- import { useEcoTableReorder as Ce } from "../../hooks/useEcoTableReorder.js";
8
- import { useEcoTableSelection as Ne } from "../../hooks/useEcoTableSelection.js";
9
- import { defaultRowKey as ke, resolveSelectionKey as Se } from "../../utils/defaultRowKey.js";
10
- import { formatCellValue as Te } from "../../utils/formatCellValue.js";
11
- import { formatEcoDate as Pe } from "../../utils/formatEcoDate.js";
12
- import { EcoDataTableBandejaFooter as Ee } from "../EcoDataTableBandejaFooter.js";
13
- import { EcoDataTableLoading as H } from "../EcoDataTableLoading.js";
14
- import { EcoDataTableSelectionToolbar as De } from "../EcoDataTableSelectionToolbar.js";
15
- import { T as we } from "../../../../Table-cUZFLrPi.js";
16
- import '../../../../assets/EcoDataTable.css';function I(b, s) {
17
- const h = b[s.key];
18
- return s.renderComponent ? s.renderComponent(b) : s.isDate ? Pe(h) : Te(h);
1
+ import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
+ import { useRef as ke, useState as U, useLayoutEffect as Te, useMemo as W, useCallback as X } from "react";
3
+ import { j as q, k as Pe, l as Ee, m as we } from "../../../../index-B96iRUpt.js";
4
+ import { X as G } from "../../../../index-BqaJxgOF.js";
5
+ import { useNavigate as Ke } from "react-router-dom";
6
+ import { useEcoTablePagination as Be } from "../../hooks/useEcoTablePagination.js";
7
+ import { useEcoTableReorder as De } from "../../hooks/useEcoTableReorder.js";
8
+ import { useEcoTableSelection as je } from "../../hooks/useEcoTableSelection.js";
9
+ import { resolveSelectionKey as J, defaultRowKey as Le } from "../../utils/defaultRowKey.js";
10
+ import { formatCellValue as Me } from "../../utils/formatCellValue.js";
11
+ import { formatEcoDate as Re } from "../../utils/formatEcoDate.js";
12
+ import { EcoDataTableBandejaFooter as _e } from "../EcoDataTableBandejaFooter.js";
13
+ import { EcoDataTableLoading as Q } from "../EcoDataTableLoading.js";
14
+ import { EcoDataTableSelectionToolbar as xe } from "../EcoDataTableSelectionToolbar.js";
15
+ import { T as ze } from "../../../../Table-cUZFLrPi.js";
16
+ import '../../../../assets/EcoDataTable.css';function Y(h, c) {
17
+ const u = h[c.key];
18
+ return c.renderComponent ? c.renderComponent(h) : c.isDate ? Re(u) : Me(u);
19
19
  }
20
- function $e({
21
- columns: b,
22
- data: s,
23
- isLoading: h = !1,
24
- isFetching: S = !1,
25
- stickyHeader: T = !0,
26
- className: O = "",
27
- pageSize: U = 10,
28
- getRowStyle: P,
29
- getRowKey: V = ke,
30
- pagination: c,
31
- selection: $,
32
- reorder: A,
33
- selectionActions: E,
34
- onRowClick: f
20
+ function Ze({
21
+ columns: h,
22
+ data: c,
23
+ isLoading: u = !1,
24
+ isFetching: D = !1,
25
+ stickyHeader: j = !0,
26
+ className: Z = "",
27
+ pageSize: ee = 10,
28
+ getRowStyle: L,
29
+ getRowKey: te = Le,
30
+ pagination: n,
31
+ selection: ae,
32
+ reorder: le,
33
+ selectionActions: M,
34
+ onRowClick: v,
35
+ footerOrgLines: re,
36
+ footerMetaShort: oe
35
37
  }) {
36
- const v = ve(), D = (c == null ? void 0 : c.pageSize) ?? U, w = de(null), [B, W] = M(0), [q, G] = M(0);
37
- be(() => {
38
- const t = w.current;
39
- if (!t) return;
40
- const o = () => {
41
- W(t.clientHeight), G(t.scrollTop);
38
+ const T = Ke(), R = (n == null ? void 0 : n.pageSize) ?? ee, _ = ke(null), [x, se] = U(0), [ce, ne] = U(0);
39
+ Te(() => {
40
+ const e = _.current;
41
+ if (!e) return;
42
+ const l = () => {
43
+ se(e.clientHeight), ne(e.scrollTop);
42
44
  };
43
- o();
44
- const r = new ResizeObserver(o);
45
- return r.observe(t), t.addEventListener("scroll", o, { passive: !0 }), () => {
46
- r.disconnect(), t.removeEventListener("scroll", o);
45
+ l();
46
+ const o = new ResizeObserver(l);
47
+ return o.observe(e), e.addEventListener("scroll", l, { passive: !0 }), () => {
48
+ o.disconnect(), e.removeEventListener("scroll", l);
47
49
  };
48
- }, [h, S]);
50
+ }, [u, D]);
49
51
  const {
50
- selectionKey: K,
51
- selectedKeys: J,
52
- toggleKey: j,
53
- isSelected: Q,
54
- hasSelection: u
55
- } = Ne({ data: s, selection: $ }), { enabled: R, priorityKey: X, orderedData: Y, moveSelected: _ } = Ce({
56
- data: s,
57
- reorder: A,
58
- selectionKey: K,
59
- selectedKeys: J
60
- }), p = R ? Y : s, {
61
- currentPage: Z,
62
- totalPages: ee,
63
- effectiveTotal: te,
64
- isLastPage: ae,
65
- paginatedData: n,
66
- handlePageChange: re,
67
- serverMode: g
68
- } = ge({
69
- dataLength: p.length,
70
- pageSize: D,
71
- pagination: c
72
- }), C = me(() => g || !n ? p : p.slice(n.start, n.end), [p, n, g]), oe = u && !!E, N = R, x = b.length + (u ? 1 : 0) + (N ? 1 : 0), le = ae && C.length > 0, se = he(
73
- (t, o) => {
74
- if (!o.redirectTo) return;
75
- const r = o.redirectTo(t);
76
- typeof r == "string" ? v(r) : v(r.pathname, { state: r.state });
52
+ mode: P,
53
+ selectionKey: S,
54
+ selectedKeys: C,
55
+ toggleKey: z,
56
+ setSelectedKeys: E,
57
+ isSelected: w,
58
+ hasSelection: N
59
+ } = je({ data: c, selection: ae }), { enabled: F, priorityKey: ie, orderedData: de, moveSelected: V } = De({
60
+ data: c,
61
+ reorder: le,
62
+ selectionKey: S,
63
+ selectedKeys: C
64
+ }), f = F ? de : c, {
65
+ currentPage: be,
66
+ totalPages: me,
67
+ effectiveTotal: he,
68
+ isLastPage: pe,
69
+ paginatedData: r,
70
+ handlePageChange: ue,
71
+ serverMode: y
72
+ } = Be({
73
+ dataLength: f.length,
74
+ pageSize: R,
75
+ pagination: n
76
+ }), g = W(() => y || !r ? f : f.slice(r.start, r.end), [f, r, y]), i = W(
77
+ () => g.map((e, l) => {
78
+ const o = y ? l : ((r == null ? void 0 : r.start) ?? 0) + l;
79
+ return J(e, o, S);
80
+ }),
81
+ [r == null ? void 0 : r.start, g, S, y]
82
+ ), d = i.length > 0 && i.every((e) => w(e)), $ = i.some((e) => w(e)), fe = X(() => {
83
+ if (!(P !== "multi" || i.length === 0)) {
84
+ if (d) {
85
+ const e = new Set(i);
86
+ E(C.filter((l) => !e.has(l)));
87
+ return;
88
+ }
89
+ E(Array.from(/* @__PURE__ */ new Set([...C, ...i])));
90
+ }
91
+ }, [
92
+ d,
93
+ C,
94
+ P,
95
+ E,
96
+ i
97
+ ]), ye = N && !!M, K = F, A = h.length + (N ? 1 : 0) + (K ? 1 : 0), ge = pe && g.length > 0, ve = X(
98
+ (e, l) => {
99
+ if (!l.redirectTo) return;
100
+ const o = l.redirectTo(e);
101
+ typeof o == "string" ? T(o) : T(o.pathname, { state: o.state });
77
102
  },
78
- [v]
103
+ [T]
79
104
  );
80
- if (h)
81
- return /* @__PURE__ */ e(H, {});
82
- const ce = [
105
+ if (u)
106
+ return /* @__PURE__ */ t(Q, {});
107
+ const Se = [
83
108
  "eco-data-table",
84
- T ? "eco-data-table--sticky" : "",
85
- O
109
+ j ? "eco-data-table--sticky" : "",
110
+ Z
86
111
  ].filter(Boolean).join(" ");
87
- return /* @__PURE__ */ d("div", { className: ce, children: [
88
- oe && /* @__PURE__ */ e(De, { children: E }),
89
- /* @__PURE__ */ e(
112
+ return /* @__PURE__ */ m("div", { className: Se, children: [
113
+ ye && /* @__PURE__ */ t(xe, { children: M }),
114
+ /* @__PURE__ */ t(
90
115
  "div",
91
116
  {
92
- ref: w,
93
- className: `eco-data-table-body-wrap${T ? " eco-data-table-body-wrap--sticky" : ""}`,
94
- children: /* @__PURE__ */ d("div", { className: "eco-data-table-body-content", children: [
95
- S && /* @__PURE__ */ e("div", { className: "eco-data-table-fetching-overlay", "aria-hidden": "true", children: /* @__PURE__ */ e(
117
+ ref: _,
118
+ className: `eco-data-table-body-wrap${j ? " eco-data-table-body-wrap--sticky" : ""}`,
119
+ children: /* @__PURE__ */ m("div", { className: "eco-data-table-body-content", children: [
120
+ D && /* @__PURE__ */ t("div", { className: "eco-data-table-fetching-overlay", "aria-hidden": "true", children: /* @__PURE__ */ t(
96
121
  "div",
97
122
  {
98
123
  className: "eco-data-table-fetching-overlay__message",
99
- style: B > 0 ? { top: q, height: B } : void 0,
100
- children: /* @__PURE__ */ e(H, { label: "Cargando registros…", overlay: !0 })
124
+ style: x > 0 ? { top: ce, height: x } : void 0,
125
+ children: /* @__PURE__ */ t(Q, { label: "Cargando registros…", overlay: !0 })
101
126
  }
102
127
  ) }),
103
- /* @__PURE__ */ d(we, { className: "eco-data-table-grid", borderless: !0, hover: !0, children: [
104
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ d("tr", { children: [
105
- u && /* @__PURE__ */ e("th", { className: "eco-data-table-select-cell", "aria-label": "Selección" }),
106
- N && /* @__PURE__ */ e("th", { className: "eco-data-table-priority-cell", children: "Prioridad" }),
107
- b.map((t) => /* @__PURE__ */ e("th", { children: t.label }, t.key))
128
+ /* @__PURE__ */ m(ze, { className: "eco-data-table-grid", borderless: !0, hover: !0, children: [
129
+ /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ m("tr", { children: [
130
+ N && /* @__PURE__ */ t("th", { className: "eco-data-table-select-cell", "aria-label": "Selección", children: P === "multi" ? /* @__PURE__ */ t(
131
+ "button",
132
+ {
133
+ type: "button",
134
+ className: `eco-data-table-select-btn eco-data-table-select-all-btn${d ? " is-selected" : ""}${$ && !d ? " is-partial" : ""}`,
135
+ onClick: (e) => {
136
+ e.stopPropagation(), fe();
137
+ },
138
+ disabled: i.length === 0,
139
+ "aria-pressed": d,
140
+ "aria-label": d ? "Deseleccionar todos los de esta página" : "Seleccionar todos los de esta página",
141
+ title: d ? "Deseleccionar página" : "Seleccionar todos",
142
+ children: d ? /* @__PURE__ */ t(q, {}) : $ ? /* @__PURE__ */ t(Pe, {}) : /* @__PURE__ */ t(G, {})
143
+ }
144
+ ) : null }),
145
+ K && /* @__PURE__ */ t("th", { className: "eco-data-table-priority-cell", children: "Prioridad" }),
146
+ h.map((e) => /* @__PURE__ */ t("th", { children: e.label }, e.key))
108
147
  ] }) }),
109
- /* @__PURE__ */ d("tbody", { children: [
110
- C.length > 0 ? C.map((t, o) => {
111
- const r = g ? o : ((n == null ? void 0 : n.start) ?? 0) + o, ne = V(t, r), k = Se(t, r, K), i = Q(k), ie = {
112
- ...P ? P(t) : {}
113
- }, z = !!f;
114
- return /* @__PURE__ */ d(
148
+ /* @__PURE__ */ m("tbody", { children: [
149
+ g.length > 0 ? g.map((e, l) => {
150
+ const o = y ? l : ((r == null ? void 0 : r.start) ?? 0) + l, Ce = te(e, o), B = J(e, o, S), b = w(B), Ne = {
151
+ ...L ? L(e) : {}
152
+ }, H = !!v;
153
+ return /* @__PURE__ */ m(
115
154
  "tr",
116
155
  {
117
156
  className: [
118
- i ? "eco-data-table-row--selected" : "",
119
- z ? "eco-data-table-row--clickable" : ""
157
+ b ? "eco-data-table-row--selected" : "",
158
+ H ? "eco-data-table-row--clickable" : ""
120
159
  ].filter(Boolean).join(" ") || void 0,
121
- style: ie,
122
- onClick: z ? (a) => {
123
- a.target.closest("button, a, [role='link']") || f == null || f(t);
160
+ style: Ne,
161
+ onClick: H ? (a) => {
162
+ a.target.closest("button, a, [role='link']") || v == null || v(e);
124
163
  } : void 0,
125
164
  children: [
126
- u && /* @__PURE__ */ e(
165
+ N && /* @__PURE__ */ t(
127
166
  "td",
128
167
  {
129
168
  className: "eco-data-table-select-cell",
130
169
  onClick: (a) => {
131
- a.stopPropagation(), j(k);
170
+ a.stopPropagation(), z(B);
132
171
  },
133
- children: /* @__PURE__ */ e(
172
+ children: /* @__PURE__ */ t(
134
173
  "button",
135
174
  {
136
175
  type: "button",
137
- className: `eco-data-table-select-btn${i ? " is-selected" : ""}`,
176
+ className: `eco-data-table-select-btn${b ? " is-selected" : ""}`,
138
177
  onClick: (a) => {
139
- a.stopPropagation(), j(k);
178
+ a.stopPropagation(), z(B);
140
179
  },
141
- "aria-pressed": i,
142
- "aria-label": i ? "Deseleccionar fila" : "Seleccionar fila",
143
- children: i ? /* @__PURE__ */ e(pe, {}) : /* @__PURE__ */ e(ye, {})
180
+ "aria-pressed": b,
181
+ "aria-label": b ? "Deseleccionar fila" : "Seleccionar fila",
182
+ children: b ? /* @__PURE__ */ t(q, {}) : /* @__PURE__ */ t(G, {})
144
183
  }
145
184
  )
146
185
  }
147
186
  ),
148
- N && /* @__PURE__ */ e("td", { className: "eco-data-table-priority-cell", children: /* @__PURE__ */ d("div", { className: "eco-data-table-priority-actions", children: [
149
- /* @__PURE__ */ e("span", { children: String(t[X] ?? r + 1) }),
150
- /* @__PURE__ */ e(
187
+ K && /* @__PURE__ */ t("td", { className: "eco-data-table-priority-cell", children: /* @__PURE__ */ m("div", { className: "eco-data-table-priority-actions", children: [
188
+ /* @__PURE__ */ t("span", { children: String(e[ie] ?? o + 1) }),
189
+ /* @__PURE__ */ t(
151
190
  "button",
152
191
  {
153
192
  type: "button",
154
193
  className: "eco-data-table-priority-btn",
155
- disabled: !i,
156
- onClick: () => _("up"),
194
+ disabled: !b,
195
+ onClick: () => V("up"),
157
196
  "aria-label": "Subir prioridad",
158
- children: /* @__PURE__ */ e(fe, {})
197
+ children: /* @__PURE__ */ t(Ee, {})
159
198
  }
160
199
  ),
161
- /* @__PURE__ */ e(
200
+ /* @__PURE__ */ t(
162
201
  "button",
163
202
  {
164
203
  type: "button",
165
204
  className: "eco-data-table-priority-btn",
166
- disabled: !i,
167
- onClick: () => _("down"),
205
+ disabled: !b,
206
+ onClick: () => V("down"),
168
207
  "aria-label": "Bajar prioridad",
169
- children: /* @__PURE__ */ e(ue, {})
208
+ children: /* @__PURE__ */ t(we, {})
170
209
  }
171
210
  )
172
211
  ] }) }),
173
- b.map((a) => {
174
- const y = !!a.redirectTo, L = !!a.onCellClick, m = y || L, F = () => {
175
- var l;
176
- if (L) {
177
- (l = a.onCellClick) == null || l.call(a, t);
212
+ h.map((a) => {
213
+ const k = !!a.redirectTo, I = !!a.onCellClick, p = k || I, O = () => {
214
+ var s;
215
+ if (I) {
216
+ (s = a.onCellClick) == null || s.call(a, e);
178
217
  return;
179
218
  }
180
- y && se(t, a);
219
+ k && ve(e, a);
181
220
  };
182
- return /* @__PURE__ */ e(
221
+ return /* @__PURE__ */ t(
183
222
  "td",
184
223
  {
185
224
  className: [
186
225
  a.noPadding ? "eco-data-table-cell--no-padding" : "",
187
- m ? "eco-data-table-cell--interactive" : "",
188
- y ? "eco-data-table-cell--link" : ""
226
+ p ? "eco-data-table-cell--interactive" : "",
227
+ k ? "eco-data-table-cell--link" : ""
189
228
  ].filter(Boolean).join(" "),
190
- onClick: m ? (l) => {
191
- l.stopPropagation(), F();
229
+ onClick: p ? (s) => {
230
+ s.stopPropagation(), O();
192
231
  } : void 0,
193
- role: m ? "link" : void 0,
194
- tabIndex: m ? 0 : void 0,
195
- onKeyDown: m ? (l) => {
196
- (l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.stopPropagation(), F());
232
+ role: p ? "link" : void 0,
233
+ tabIndex: p ? 0 : void 0,
234
+ onKeyDown: p ? (s) => {
235
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), s.stopPropagation(), O());
197
236
  } : void 0,
198
- children: m ? /* @__PURE__ */ e("span", { className: "eco-data-table-cell__link-text", children: I(t, a) }) : I(t, a)
237
+ children: p ? /* @__PURE__ */ t("span", { className: "eco-data-table-cell__link-text", children: Y(e, a) }) : Y(e, a)
199
238
  },
200
239
  a.key
201
240
  );
202
241
  })
203
242
  ]
204
243
  },
205
- ne
244
+ Ce
206
245
  );
207
- }) : /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: x, className: "eco-data-table-empty", children: "No se encontraron registros para mostrar." }) }),
208
- le ? /* @__PURE__ */ e("tr", { className: "eco-data-table-end-row", children: /* @__PURE__ */ e("td", { colSpan: x, className: "eco-data-table-end-row__cell", role: "status", children: "No hay más registros" }) }) : null
246
+ }) : /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: A, className: "eco-data-table-empty", children: "No se encontraron registros para mostrar." }) }),
247
+ ge ? /* @__PURE__ */ t("tr", { className: "eco-data-table-end-row", children: /* @__PURE__ */ t("td", { colSpan: A, className: "eco-data-table-end-row__cell", role: "status", children: "No hay más registros" }) }) : null
209
248
  ] })
210
249
  ] })
211
250
  ] })
212
251
  }
213
252
  ),
214
- /* @__PURE__ */ e(
215
- Ee,
253
+ /* @__PURE__ */ t(
254
+ _e,
216
255
  {
217
- currentPage: Z,
218
- totalPages: ee,
219
- onPageChange: re,
220
- totalRecords: te,
221
- pageSize: D,
222
- hasMore: c == null ? void 0 : c.hasMore,
223
- showPagination: !!c
256
+ currentPage: be,
257
+ totalPages: me,
258
+ onPageChange: ue,
259
+ totalRecords: he,
260
+ pageSize: R,
261
+ hasMore: n == null ? void 0 : n.hasMore,
262
+ showPagination: !!n,
263
+ orgLines: re,
264
+ metaShort: oe
224
265
  }
225
266
  )
226
267
  ] });
227
268
  }
228
269
  export {
229
- $e as EcoDataTable
270
+ Ze as EcoDataTable
230
271
  };
@@ -1,42 +1,52 @@
1
- import { jsxs as e, jsx as a } from "react/jsx-runtime";
2
- import { EcoDataTablePaginator as b } from "./EcoDataTablePaginator.js";
3
- import '../../../assets/EcoDataTableBandejaFooter.css';const m = [
1
+ import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
+ import { EcoDataTablePaginator as f } from "./EcoDataTablePaginator.js";
3
+ import '../../../assets/EcoDataTableBandejaFooter.css';const h = [
4
4
  "Unidad Nacional de Protección · UNP",
5
5
  "Subdirección especializada de seguridad y protección · SESP",
6
6
  "Grupo de Recepción, Análisis, Evaluación de Riesgos y Recomendaciones · GRAERR"
7
- ];
8
- function _({
9
- currentPage: n,
10
- totalPages: t,
11
- onPageChange: c,
12
- totalRecords: i,
13
- pageSize: d = 10,
14
- hasMore: r,
7
+ ], p = "EI UNP";
8
+ function u(e) {
9
+ const o = e.split("·");
10
+ return (o[o.length - 1] ?? e).trim() || e;
11
+ }
12
+ function g({
13
+ currentPage: e,
14
+ totalPages: o,
15
+ onPageChange: r,
16
+ totalRecords: c,
17
+ pageSize: s = 10,
18
+ hasMore: d,
15
19
  showPagination: l = !0,
16
- year: s = (/* @__PURE__ */ new Date()).getFullYear()
20
+ year: i = (/* @__PURE__ */ new Date()).getFullYear(),
21
+ orgLines: b = h,
22
+ metaShort: m = p
17
23
  }) {
18
- return /* @__PURE__ */ e("footer", { className: "eco-data-table-bandeja-footer", role: "contentinfo", children: [
24
+ const _ = `${i} · Ecosistema de Información · EI`;
25
+ return /* @__PURE__ */ t("footer", { className: "eco-data-table-bandeja-footer", role: "contentinfo", children: [
19
26
  l ? /* @__PURE__ */ a("div", { className: "eco-data-table-bandeja-footer__pagination", children: /* @__PURE__ */ a(
20
- b,
27
+ f,
21
28
  {
22
- currentPage: n,
23
- totalPages: t,
24
- onPageChange: c,
25
- totalRecords: i,
26
- pageSize: d,
27
- hasMore: r,
29
+ currentPage: e,
30
+ totalPages: o,
31
+ onPageChange: r,
32
+ totalRecords: c,
33
+ pageSize: s,
34
+ hasMore: d,
28
35
  alwaysVisible: !0
29
36
  }
30
37
  ) }) : null,
31
- /* @__PURE__ */ e("div", { className: "eco-data-table-bandeja-footer__branding", children: [
32
- /* @__PURE__ */ a("div", { className: "eco-data-table-bandeja-footer__orgs", "aria-label": "Dependencias", children: m.map((o) => /* @__PURE__ */ a("span", { className: "eco-data-table-bandeja-footer__org-line", children: o }, o)) }),
33
- /* @__PURE__ */ e("span", { className: "eco-data-table-bandeja-footer__meta", children: [
34
- s,
35
- " · Ecosistema de Información · EI"
38
+ /* @__PURE__ */ t("div", { className: "eco-data-table-bandeja-footer__branding", children: [
39
+ /* @__PURE__ */ a("div", { className: "eco-data-table-bandeja-footer__orgs", "aria-label": "Dependencias", children: b.map((n) => /* @__PURE__ */ t("span", { className: "eco-data-table-bandeja-footer__org-line", children: [
40
+ /* @__PURE__ */ a("span", { className: "eco-data-table-bandeja-footer__org-full", children: n }),
41
+ /* @__PURE__ */ a("span", { className: "eco-data-table-bandeja-footer__org-short", "aria-hidden": "true", children: u(n) })
42
+ ] }, n)) }),
43
+ /* @__PURE__ */ t("span", { className: "eco-data-table-bandeja-footer__meta", children: [
44
+ /* @__PURE__ */ a("span", { className: "eco-data-table-bandeja-footer__meta-full", children: _ }),
45
+ /* @__PURE__ */ a("span", { className: "eco-data-table-bandeja-footer__meta-short", "aria-hidden": "true", children: m })
36
46
  ] })
37
47
  ] })
38
48
  ] });
39
49
  }
40
50
  export {
41
- _ as EcoDataTableBandejaFooter
51
+ g as EcoDataTableBandejaFooter
42
52
  };
@@ -4,22 +4,22 @@ function j({
4
4
  data: v,
5
5
  selection: r
6
6
  }) {
7
- const u = (r == null ? void 0 : r.mode) ?? "none", m = r == null ? void 0 : r.selectionKey, y = r == null ? void 0 : r.maxSelection, [p, h] = E([]), K = (r == null ? void 0 : r.selectedKeys) !== void 0 ? r.selectedKeys : p, S = g(
7
+ const u = (r == null ? void 0 : r.mode) ?? "none", y = r == null ? void 0 : r.selectionKey, S = r == null ? void 0 : r.maxSelection, [p, h] = E([]), K = (r == null ? void 0 : r.selectedKeys) !== void 0 ? r.selectedKeys : p, m = g(
8
8
  (d) => {
9
9
  var f;
10
10
  (r == null ? void 0 : r.selectedKeys) === void 0 && h(d);
11
11
  const x = v.filter(
12
- (a, C) => d.includes(w(a, C, m))
12
+ (a, C) => d.includes(w(a, C, y))
13
13
  );
14
14
  (f = r == null ? void 0 : r.onChange) == null || f.call(r, x, d);
15
15
  },
16
- [v, r, m]
16
+ [v, r, y]
17
17
  ), t = g(
18
18
  (d) => {
19
19
  if (u === "none") return;
20
20
  if (u === "single") {
21
21
  const a = K.includes(d) ? [] : [d];
22
- S(a);
22
+ m(a);
23
23
  return;
24
24
  }
25
25
  const x = K.includes(d);
@@ -27,13 +27,13 @@ function j({
27
27
  if (x)
28
28
  f = K.filter((a) => a !== d);
29
29
  else {
30
- if (y && K.length >= y)
30
+ if (S && K.length >= S)
31
31
  return;
32
32
  f = [...K, d];
33
33
  }
34
- S(f);
34
+ m(f);
35
35
  },
36
- [u, y, K, S]
36
+ [u, S, K, m]
37
37
  ), b = g(
38
38
  (d) => K.includes(d),
39
39
  [K]
@@ -42,9 +42,10 @@ function j({
42
42
  (r == null ? void 0 : r.selectedKeys) !== void 0 && h(r.selectedKeys);
43
43
  }, [r == null ? void 0 : r.selectedKeys]), {
44
44
  mode: u,
45
- selectionKey: m,
45
+ selectionKey: y,
46
46
  selectedKeys: K,
47
47
  toggleKey: t,
48
+ setSelectedKeys: m,
48
49
  isSelected: b,
49
50
  hasSelection: u !== "none"
50
51
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
2
  import { useState as s, useEffect as f } from "react";
3
- import { W as d } from "../../../index-h-TtOxhs.js";
3
+ import { Z as d } from "../../../index-BqaJxgOF.js";
4
4
  import { b as g } from "../../../FormGroup-B8RAswur.js";
5
5
  import { F as x } from "../../../FormControl-DshWdHuR.js";
6
6
  import { S as h } from "../../../Spinner-D69BfVXa.js";