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.
- package/dist/{AppList-BshxZhoN.js → AppList-DORGpC4I.js} +84 -84
- package/dist/assets/DocumentoVisorEstado.css +1 -0
- package/dist/assets/EcoDataTable.css +1 -1
- package/dist/assets/EcoDataTableBandejaFooter.css +1 -1
- package/dist/assets/SileoNotifications.css +1 -1
- 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-C4MBu_wk.js → index-B96iRUpt.js} +38 -34
- package/dist/{index-h-TtOxhs.js → index-BqaJxgOF.js} +182 -170
- package/dist/lib/tables/custom-data-table/CustomDataTable.d.ts +2 -0
- package/dist/lib/tables/custom-data-table-split/CustomDataTableSplit.d.ts +3 -1
- package/dist/lib/tables/eco-data-table/components/EcoDataTable/EcoDataTable.d.ts +1 -1
- package/dist/lib/tables/eco-data-table/components/EcoDataTableBandejaFooter.d.ts +8 -1
- package/dist/lib/tables/eco-data-table/hooks/useEcoTableSelection.d.ts +1 -0
- package/dist/lib/tables/eco-data-table/types.d.ts +7 -0
- package/dist/lib/ui/animacion/Animacion.d.ts +1 -0
- package/dist/lib/ui.d.ts +1 -0
- package/dist/lib/utils/modal-radicados/DocumentoVisorEstado.d.ts +18 -0
- package/dist/lib/utils/modal-radicados/ModalDocumento.d.ts +26 -0
- package/dist/lib/utils/modal-radicados/VisorDocumento.d.ts +8 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/shared/app-list/AppList.js +2 -2
- package/dist/shared/iconos-sistema/IconosSistema.js +1 -1
- package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
- package/dist/shared/menu-lateral/MenuLateral.js +4 -3
- package/dist/shared/notificacion-usuario/NotificacionUsuario.js +6 -5
- package/dist/shared/ventana-tabs/VentanaTabs.js +1 -1
- package/dist/tables/custom-data-table/CustomDataTable.js +549 -547
- package/dist/tables/custom-data-table-split/CustomDataTableSplit.js +68 -65
- package/dist/tables/custom-table-toolbar/CustomTableToolbar.js +1 -1
- package/dist/tables/eco-data-table/components/EcoDataTable/EcoDataTable.js +190 -149
- package/dist/tables/eco-data-table/components/EcoDataTableBandejaFooter.js +36 -26
- package/dist/tables/eco-data-table/hooks/useEcoTableSelection.js +9 -8
- package/dist/tables/tabla-registros/buscador/Buscador.js +1 -1
- package/dist/tables/tabla-registros/modal-v2/EcoModal.js +11 -11
- package/dist/tables/tabla-registros/tabla/Tabla.js +22 -22
- package/dist/ui/alertas/AlertaFormulario.js +1 -1
- package/dist/ui/card-gestion-lateral/CardGestionLateral.js +1 -1
- package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
- package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
- package/dist/ui/contenido-modal-v2/ContenidoModalV2.js +1 -1
- package/dist/ui/contenido-modal-v2/ModalV2Menu.js +1 -1
- package/dist/ui/datos-basicos-card/DatosBasicosCard.js +1 -1
- package/dist/ui/icono-tooltip/IconoTooltip.js +10 -10
- package/dist/ui/items-modal/ItemsModal.js +1 -1
- package/dist/ui/nav-formularios-lateral/NavFormulariosLateral.js +1 -1
- package/dist/ui/notificacion-popover-v2/NotificacionPopoverV2.js +50 -50
- package/dist/ui/resumen-evaluacion/ResumenEvaluacion.js +5 -5
- package/dist/ui/status-filter-bar/StatusFilterBar.js +8 -8
- package/dist/ui/status-semaphore/StatusSemaphore.js +1 -1
- package/dist/ui/stepper-v2/StepperV2.js +1 -1
- package/dist/utils/eco-provider/EcoContext.js +4 -3
- package/dist/utils/modal-radicados/AuxRadicadosComponents/TarjetaRadicado.js +12 -12
- package/dist/utils/modal-radicados/DocumentoVisorEstado.js +125 -0
- package/dist/utils/modal-radicados/ModalDocumento.js +155 -170
- package/dist/utils/modal-radicados/ModalRadicado.js +34 -34
- package/dist/utils/modal-radicados/VisorDocumento.js +61 -61
- package/dist/utils/notifications/EcoToaster.js +26 -25
- package/dist/utils/unp-historico/UnpHistorico.js +1 -1
- package/dist/utils.js +29 -27
- package/package.json +1 -1
|
@@ -1,230 +1,271 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { j as
|
|
4
|
-
import {
|
|
5
|
-
import { useNavigate as
|
|
6
|
-
import { useEcoTablePagination as
|
|
7
|
-
import { useEcoTableReorder as
|
|
8
|
-
import { useEcoTableSelection as
|
|
9
|
-
import {
|
|
10
|
-
import { formatCellValue as
|
|
11
|
-
import { formatEcoDate as
|
|
12
|
-
import { EcoDataTableBandejaFooter as
|
|
13
|
-
import { EcoDataTableLoading as
|
|
14
|
-
import { EcoDataTableSelectionToolbar as
|
|
15
|
-
import { T as
|
|
16
|
-
import '../../../../assets/EcoDataTable.css';function
|
|
17
|
-
const
|
|
18
|
-
return
|
|
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
|
|
21
|
-
columns:
|
|
22
|
-
data:
|
|
23
|
-
isLoading:
|
|
24
|
-
isFetching:
|
|
25
|
-
stickyHeader:
|
|
26
|
-
className:
|
|
27
|
-
pageSize:
|
|
28
|
-
getRowStyle:
|
|
29
|
-
getRowKey:
|
|
30
|
-
pagination:
|
|
31
|
-
selection:
|
|
32
|
-
reorder:
|
|
33
|
-
selectionActions:
|
|
34
|
-
onRowClick:
|
|
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
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
40
|
-
const
|
|
41
|
-
|
|
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
|
-
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
|
|
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
|
-
}, [
|
|
50
|
+
}, [u, D]);
|
|
49
51
|
const {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
[
|
|
103
|
+
[T]
|
|
79
104
|
);
|
|
80
|
-
if (
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
const
|
|
105
|
+
if (u)
|
|
106
|
+
return /* @__PURE__ */ t(Q, {});
|
|
107
|
+
const Se = [
|
|
83
108
|
"eco-data-table",
|
|
84
|
-
|
|
85
|
-
|
|
109
|
+
j ? "eco-data-table--sticky" : "",
|
|
110
|
+
Z
|
|
86
111
|
].filter(Boolean).join(" ");
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */
|
|
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:
|
|
93
|
-
className: `eco-data-table-body-wrap${
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
-
|
|
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:
|
|
100
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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__ */
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
...
|
|
113
|
-
},
|
|
114
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
119
|
-
|
|
157
|
+
b ? "eco-data-table-row--selected" : "",
|
|
158
|
+
H ? "eco-data-table-row--clickable" : ""
|
|
120
159
|
].filter(Boolean).join(" ") || void 0,
|
|
121
|
-
style:
|
|
122
|
-
onClick:
|
|
123
|
-
a.target.closest("button, a, [role='link']") ||
|
|
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
|
-
|
|
165
|
+
N && /* @__PURE__ */ t(
|
|
127
166
|
"td",
|
|
128
167
|
{
|
|
129
168
|
className: "eco-data-table-select-cell",
|
|
130
169
|
onClick: (a) => {
|
|
131
|
-
a.stopPropagation(),
|
|
170
|
+
a.stopPropagation(), z(B);
|
|
132
171
|
},
|
|
133
|
-
children: /* @__PURE__ */
|
|
172
|
+
children: /* @__PURE__ */ t(
|
|
134
173
|
"button",
|
|
135
174
|
{
|
|
136
175
|
type: "button",
|
|
137
|
-
className: `eco-data-table-select-btn${
|
|
176
|
+
className: `eco-data-table-select-btn${b ? " is-selected" : ""}`,
|
|
138
177
|
onClick: (a) => {
|
|
139
|
-
a.stopPropagation(),
|
|
178
|
+
a.stopPropagation(), z(B);
|
|
140
179
|
},
|
|
141
|
-
"aria-pressed":
|
|
142
|
-
"aria-label":
|
|
143
|
-
children:
|
|
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
|
-
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */
|
|
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: !
|
|
156
|
-
onClick: () =>
|
|
194
|
+
disabled: !b,
|
|
195
|
+
onClick: () => V("up"),
|
|
157
196
|
"aria-label": "Subir prioridad",
|
|
158
|
-
children: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ t(Ee, {})
|
|
159
198
|
}
|
|
160
199
|
),
|
|
161
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ t(
|
|
162
201
|
"button",
|
|
163
202
|
{
|
|
164
203
|
type: "button",
|
|
165
204
|
className: "eco-data-table-priority-btn",
|
|
166
|
-
disabled: !
|
|
167
|
-
onClick: () =>
|
|
205
|
+
disabled: !b,
|
|
206
|
+
onClick: () => V("down"),
|
|
168
207
|
"aria-label": "Bajar prioridad",
|
|
169
|
-
children: /* @__PURE__ */
|
|
208
|
+
children: /* @__PURE__ */ t(we, {})
|
|
170
209
|
}
|
|
171
210
|
)
|
|
172
211
|
] }) }),
|
|
173
|
-
|
|
174
|
-
const
|
|
175
|
-
var
|
|
176
|
-
if (
|
|
177
|
-
(
|
|
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
|
-
|
|
219
|
+
k && ve(e, a);
|
|
181
220
|
};
|
|
182
|
-
return /* @__PURE__ */
|
|
221
|
+
return /* @__PURE__ */ t(
|
|
183
222
|
"td",
|
|
184
223
|
{
|
|
185
224
|
className: [
|
|
186
225
|
a.noPadding ? "eco-data-table-cell--no-padding" : "",
|
|
187
|
-
|
|
188
|
-
|
|
226
|
+
p ? "eco-data-table-cell--interactive" : "",
|
|
227
|
+
k ? "eco-data-table-cell--link" : ""
|
|
189
228
|
].filter(Boolean).join(" "),
|
|
190
|
-
onClick:
|
|
191
|
-
|
|
229
|
+
onClick: p ? (s) => {
|
|
230
|
+
s.stopPropagation(), O();
|
|
192
231
|
} : void 0,
|
|
193
|
-
role:
|
|
194
|
-
tabIndex:
|
|
195
|
-
onKeyDown:
|
|
196
|
-
(
|
|
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:
|
|
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
|
-
|
|
244
|
+
Ce
|
|
206
245
|
);
|
|
207
|
-
}) : /* @__PURE__ */
|
|
208
|
-
|
|
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__ */
|
|
215
|
-
|
|
253
|
+
/* @__PURE__ */ t(
|
|
254
|
+
_e,
|
|
216
255
|
{
|
|
217
|
-
currentPage:
|
|
218
|
-
totalPages:
|
|
219
|
-
onPageChange:
|
|
220
|
-
totalRecords:
|
|
221
|
-
pageSize:
|
|
222
|
-
hasMore:
|
|
223
|
-
showPagination: !!
|
|
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
|
-
|
|
270
|
+
Ze as EcoDataTable
|
|
230
271
|
};
|
|
@@ -1,42 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { EcoDataTablePaginator as
|
|
3
|
-
import '../../../assets/EcoDataTableBandejaFooter.css';const
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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:
|
|
20
|
+
year: i = (/* @__PURE__ */ new Date()).getFullYear(),
|
|
21
|
+
orgLines: b = h,
|
|
22
|
+
metaShort: m = p
|
|
17
23
|
}) {
|
|
18
|
-
|
|
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
|
-
|
|
27
|
+
f,
|
|
21
28
|
{
|
|
22
|
-
currentPage:
|
|
23
|
-
totalPages:
|
|
24
|
-
onPageChange:
|
|
25
|
-
totalRecords:
|
|
26
|
-
pageSize:
|
|
27
|
-
hasMore:
|
|
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__ */
|
|
32
|
-
/* @__PURE__ */ a("div", { className: "eco-data-table-bandeja-footer__orgs", "aria-label": "Dependencias", children:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
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",
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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 (
|
|
30
|
+
if (S && K.length >= S)
|
|
31
31
|
return;
|
|
32
32
|
f = [...K, d];
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
m(f);
|
|
35
35
|
},
|
|
36
|
-
[u,
|
|
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:
|
|
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 {
|
|
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";
|