react-ecosistema-unp 1.6.14 → 1.7.0-pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/assets/MenuLateral.css +1 -1
  2. package/dist/auth/contexts/AuthContex.js +10 -10
  3. package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +1 -1
  4. package/dist/cards/tarjeta-info/TarjetaInfo.js +5 -4
  5. package/dist/data/tarjeta-datos/TarjetaDatos.js +1 -1
  6. package/dist/{index-BpmHFDVa.js → index-Cpp73e44.js} +7 -7
  7. package/dist/lib/auth/contexts/AuthContex.d.ts +3 -0
  8. package/dist/lib/shared/menu-lateral/MenuLateral.d.ts +1 -0
  9. package/dist/lib/shared/ventana-lienzo/VentanaLienzo.d.ts +1 -0
  10. package/dist/lib/shared/ventana-tabs/VentanaTabs.d.ts +1 -0
  11. package/dist/lib/tables/tabla-registros/modal/Modal.d.ts +6 -2
  12. package/dist/lib/ui.d.ts +1 -0
  13. package/dist/lib/utils/websocket-manager/WebSocketContext.d.ts +13 -0
  14. package/dist/lib/utils/websocket-manager/useWebSocket.d.ts +1 -0
  15. package/dist/lib/utils/websocket-manager/websocket.d.ts +19 -0
  16. package/dist/lib/utils.d.ts +2 -0
  17. package/dist/shared/app-list/AppList.js +1 -1
  18. package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
  19. package/dist/shared/menu-lateral/MenuLateral.js +181 -99
  20. package/dist/shared/ventana-lienzo/VentanaLienzo.js +13 -13
  21. package/dist/shared/ventana-tabs/VentanaTabs.js +104 -104
  22. package/dist/tables/tabla-registros/TablaRegistros.js +1 -1
  23. package/dist/tables/tabla-registros/buscador/Buscador.js +4 -4
  24. package/dist/tables/tabla-registros/modal/Modal.js +23 -22
  25. package/dist/tables/tabla-registros/tabla/Tabla.js +1 -1
  26. package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
  27. package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
  28. package/dist/ui/icono-tooltip/IconoTooltip.js +1 -1
  29. package/dist/ui/items-modal/ItemsModal.js +5 -5
  30. package/dist/ui.js +8 -7
  31. package/dist/utils/unp-historico/UnpHistorico.js +4 -3
  32. package/dist/utils/websocket-manager/WebSocketContext.js +23 -0
  33. package/dist/utils/websocket-manager/useWebSocket.js +16 -0
  34. package/dist/utils/websocket-manager/websocket.js +62 -0
  35. package/dist/utils.js +15 -10
  36. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as j } from "react/jsx-runtime";
2
- import * as b from "react";
2
+ import * as y from "react";
3
3
  import C, { useRef as O, useContext as S, useEffect as M } from "react";
4
4
  import { MenuLateral as F } from "../menu-lateral/MenuLateral.js";
5
5
  import { IconosSistema as H } from "../iconos-sistema/IconosSistema.js";
@@ -9,90 +9,90 @@ import { u as Z, T as ee, g as te, a as ne, b as ae } from "../../TabPane-DtFCEm
9
9
  import { u as k, c as B } from "../../ThemeProvider-Bs1j1Nwi.js";
10
10
  import { S as I, T as re, m as se } from "../../TabContext-CdjYJzMB.js";
11
11
  import { c as oe } from "../../CardHeaderContext-DVw0yHuy.js";
12
- function P(n, e) {
12
+ function P(n, t) {
13
13
  let a = 0;
14
- return b.Children.map(n, (t) => /* @__PURE__ */ b.isValidElement(t) ? e(t, a++) : t);
14
+ return y.Children.map(n, (e) => /* @__PURE__ */ y.isValidElement(e) ? t(e, a++) : e);
15
15
  }
16
- function le(n, e) {
16
+ function le(n, t) {
17
17
  let a = 0;
18
- b.Children.forEach(n, (t) => {
19
- /* @__PURE__ */ b.isValidElement(t) && e(t, a++);
18
+ y.Children.forEach(n, (e) => {
19
+ /* @__PURE__ */ y.isValidElement(e) && t(e, a++);
20
20
  });
21
21
  }
22
22
  const ie = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
23
- function ce(n, e) {
23
+ function ce(n, t) {
24
24
  if (n == null) return {};
25
25
  var a = {};
26
- for (var t in n) if ({}.hasOwnProperty.call(n, t)) {
27
- if (e.indexOf(t) >= 0) continue;
28
- a[t] = n[t];
26
+ for (var e in n) if ({}.hasOwnProperty.call(n, e)) {
27
+ if (t.indexOf(e) >= 0) continue;
28
+ a[e] = n[e];
29
29
  }
30
30
  return a;
31
31
  }
32
32
  const A = () => {
33
- }, R = G("event-key"), V = /* @__PURE__ */ b.forwardRef((n, e) => {
33
+ }, R = G("event-key"), V = /* @__PURE__ */ y.forwardRef((n, t) => {
34
34
  let {
35
35
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
36
36
  as: a = "div",
37
- onSelect: t,
37
+ onSelect: e,
38
38
  activeKey: s,
39
- role: c,
39
+ role: i,
40
40
  onKeyDown: u
41
- } = n, o = ce(n, ie);
42
- const N = Y(), m = O(!1), y = S(I), l = S(re);
43
- let v, x;
44
- l && (c = c || "tablist", s = l.activeKey, v = l.getControlledId, x = l.getControllerId);
45
- const f = O(null), p = (i) => {
46
- const d = f.current;
41
+ } = n, f = ce(n, ie);
42
+ const c = Y(), v = O(!1), x = S(I), o = S(re);
43
+ let p, N;
44
+ o && (i = i || "tablist", s = o.activeKey, p = o.getControlledId, N = o.getControllerId);
45
+ const m = O(null), b = (l) => {
46
+ const d = m.current;
47
47
  if (!d) return null;
48
48
  const T = Q(d, `[${R}]:not([aria-disabled=true])`), E = d.querySelector("[aria-selected=true]");
49
49
  if (!E || E !== document.activeElement) return null;
50
50
  const w = T.indexOf(E);
51
51
  if (w === -1) return null;
52
- let g = w + i;
52
+ let g = w + l;
53
53
  return g >= T.length && (g = 0), g < 0 && (g = T.length - 1), T[g];
54
- }, h = (i, d) => {
55
- i != null && (t == null || t(i, d), y == null || y(i, d));
56
- }, K = (i) => {
57
- if (u == null || u(i), !l)
54
+ }, h = (l, d) => {
55
+ l != null && (e == null || e(l, d), x == null || x(l, d));
56
+ }, K = (l) => {
57
+ if (u == null || u(l), !o)
58
58
  return;
59
59
  let d;
60
- switch (i.key) {
60
+ switch (l.key) {
61
61
  case "ArrowLeft":
62
62
  case "ArrowUp":
63
- d = p(-1);
63
+ d = b(-1);
64
64
  break;
65
65
  case "ArrowRight":
66
66
  case "ArrowDown":
67
- d = p(1);
67
+ d = b(1);
68
68
  break;
69
69
  default:
70
70
  return;
71
71
  }
72
- d && (i.preventDefault(), h(d.dataset[J("EventKey")] || null, i), m.current = !0, N());
72
+ d && (l.preventDefault(), h(d.dataset[J("EventKey")] || null, l), v.current = !0, c());
73
73
  };
74
74
  M(() => {
75
- if (f.current && m.current) {
76
- const i = f.current.querySelector(`[${R}][aria-selected=true]`);
77
- i == null || i.focus();
75
+ if (m.current && v.current) {
76
+ const l = m.current.querySelector(`[${R}][aria-selected=true]`);
77
+ l == null || l.focus();
78
78
  }
79
- m.current = !1;
79
+ v.current = !1;
80
80
  });
81
- const U = Z(e, f);
81
+ const U = Z(t, m);
82
82
  return /* @__PURE__ */ r(I.Provider, {
83
83
  value: h,
84
84
  children: /* @__PURE__ */ r(z.Provider, {
85
85
  value: {
86
- role: c,
86
+ role: i,
87
87
  // used by NavLink to determine it's role
88
88
  activeKey: se(s),
89
- getControlledId: v || A,
90
- getControllerId: x || A
89
+ getControlledId: p || A,
90
+ getControllerId: N || A
91
91
  },
92
- children: /* @__PURE__ */ r(a, Object.assign({}, o, {
92
+ children: /* @__PURE__ */ r(a, Object.assign({}, f, {
93
93
  onKeyDown: K,
94
94
  ref: U,
95
- role: c
95
+ role: i
96
96
  }))
97
97
  })
98
98
  });
@@ -100,50 +100,50 @@ const A = () => {
100
100
  V.displayName = "Nav";
101
101
  const de = Object.assign(V, {
102
102
  Item: W
103
- }), $ = /* @__PURE__ */ b.forwardRef(({
103
+ }), $ = /* @__PURE__ */ y.forwardRef(({
104
104
  className: n,
105
- bsPrefix: e,
105
+ bsPrefix: t,
106
106
  as: a = "div",
107
- ...t
108
- }, s) => (e = k(e, "nav-item"), /* @__PURE__ */ r(a, {
107
+ ...e
108
+ }, s) => (t = k(t, "nav-item"), /* @__PURE__ */ r(a, {
109
109
  ref: s,
110
- className: B(n, e),
111
- ...t
110
+ className: B(n, t),
111
+ ...e
112
112
  })));
113
113
  $.displayName = "NavItem";
114
- const _ = /* @__PURE__ */ b.forwardRef((n, e) => {
114
+ const _ = /* @__PURE__ */ y.forwardRef((n, t) => {
115
115
  const {
116
116
  as: a = "div",
117
- bsPrefix: t,
117
+ bsPrefix: e,
118
118
  variant: s,
119
- fill: c = !1,
119
+ fill: i = !1,
120
120
  justify: u = !1,
121
- navbar: o,
122
- navbarScroll: N,
123
- className: m,
124
- activeKey: y,
125
- ...l
121
+ navbar: f,
122
+ navbarScroll: c,
123
+ className: v,
124
+ activeKey: x,
125
+ ...o
126
126
  } = L(n, {
127
127
  activeKey: "onSelect"
128
- }), v = k(t, "nav");
129
- let x, f, p = !1;
128
+ }), p = k(e, "nav");
129
+ let N, m, b = !1;
130
130
  const h = S(X), K = S(oe);
131
- return h ? (x = h.bsPrefix, p = o ?? !0) : K && ({
132
- cardHeaderBsPrefix: f
131
+ return h ? (N = h.bsPrefix, b = f ?? !0) : K && ({
132
+ cardHeaderBsPrefix: m
133
133
  } = K), /* @__PURE__ */ r(de, {
134
134
  as: a,
135
- ref: e,
136
- activeKey: y,
137
- className: B(m, {
138
- [v]: !p,
139
- [`${x}-nav`]: p,
140
- [`${x}-nav-scroll`]: p && N,
141
- [`${f}-${s}`]: !!f,
142
- [`${v}-${s}`]: !!s,
143
- [`${v}-fill`]: c,
144
- [`${v}-justified`]: u
135
+ ref: t,
136
+ activeKey: x,
137
+ className: B(v, {
138
+ [p]: !b,
139
+ [`${N}-nav`]: b,
140
+ [`${N}-nav-scroll`]: b && c,
141
+ [`${m}-${s}`]: !!m,
142
+ [`${p}-${s}`]: !!s,
143
+ [`${p}-fill`]: i,
144
+ [`${p}-justified`]: u
145
145
  }),
146
- ...l
146
+ ...o
147
147
  });
148
148
  });
149
149
  _.displayName = "Nav";
@@ -152,90 +152,90 @@ const ue = Object.assign(_, {
152
152
  Link: D
153
153
  });
154
154
  function fe(n) {
155
- let e;
155
+ let t;
156
156
  return le(n, (a) => {
157
- e == null && (e = a.props.eventKey);
158
- }), e;
157
+ t == null && (t = a.props.eventKey);
158
+ }), t;
159
159
  }
160
160
  function me(n) {
161
161
  const {
162
- title: e,
162
+ title: t,
163
163
  eventKey: a,
164
- disabled: t,
164
+ disabled: e,
165
165
  tabClassName: s,
166
- tabAttrs: c,
166
+ tabAttrs: i,
167
167
  id: u
168
168
  } = n.props;
169
- return e == null ? null : /* @__PURE__ */ r($, {
169
+ return t == null ? null : /* @__PURE__ */ r($, {
170
170
  as: "li",
171
171
  role: "presentation",
172
172
  children: /* @__PURE__ */ r(D, {
173
173
  as: "button",
174
174
  type: "button",
175
175
  eventKey: a,
176
- disabled: t,
176
+ disabled: e,
177
177
  id: u,
178
178
  className: s,
179
- ...c,
180
- children: e
179
+ ...i,
180
+ children: t
181
181
  })
182
182
  });
183
183
  }
184
184
  const q = (n) => {
185
185
  const {
186
- id: e,
186
+ id: t,
187
187
  onSelect: a,
188
- transition: t,
188
+ transition: e,
189
189
  mountOnEnter: s = !1,
190
- unmountOnExit: c = !1,
190
+ unmountOnExit: i = !1,
191
191
  variant: u = "tabs",
192
- children: o,
193
- activeKey: N = fe(o),
194
- ...m
192
+ children: f,
193
+ activeKey: c = fe(f),
194
+ ...v
195
195
  } = L(n, {
196
196
  activeKey: "onSelect"
197
197
  });
198
198
  return /* @__PURE__ */ j(ee, {
199
- id: e,
200
- activeKey: N,
199
+ id: t,
200
+ activeKey: c,
201
201
  onSelect: a,
202
- transition: te(t),
202
+ transition: te(e),
203
203
  mountOnEnter: s,
204
- unmountOnExit: c,
204
+ unmountOnExit: i,
205
205
  children: [/* @__PURE__ */ r(ue, {
206
- id: e,
207
- ...m,
206
+ id: t,
207
+ ...v,
208
208
  role: "tablist",
209
209
  as: "ul",
210
210
  variant: u,
211
- children: P(o, me)
211
+ children: P(f, me)
212
212
  }), /* @__PURE__ */ r(ne, {
213
- children: P(o, (y) => {
214
- const l = {
215
- ...y.props
213
+ children: P(f, (x) => {
214
+ const o = {
215
+ ...x.props
216
216
  };
217
- return delete l.title, delete l.disabled, delete l.tabClassName, delete l.tabAttrs, /* @__PURE__ */ r(ae, {
218
- ...l
217
+ return delete o.title, delete o.disabled, delete o.tabClassName, delete o.tabAttrs, /* @__PURE__ */ r(ae, {
218
+ ...o
219
219
  });
220
220
  })
221
221
  })]
222
222
  });
223
223
  };
224
224
  q.displayName = "Tabs";
225
- const Te = ({ children: n, extraInput: e }) => {
226
- const [a, t] = C.useState(!1), [s, c] = C.useState(void 0), u = () => {
227
- t(!a);
225
+ const Te = ({ children: n, extraInput: t, showConnectionStatus: a = !1 }) => {
226
+ const [e, s] = C.useState(!1), [i, u] = C.useState(void 0), f = () => {
227
+ s(!e);
228
228
  };
229
229
  return /* @__PURE__ */ j(C.Fragment, { children: [
230
- /* @__PURE__ */ r(H, { elements: e }),
231
- /* @__PURE__ */ r(F, { onToggle: u, isOpen: a }),
232
- /* @__PURE__ */ r("div", { className: `${a ? "menu-open" : ""}`, children: /* @__PURE__ */ r("div", { className: "main-section", children: /* @__PURE__ */ r(
230
+ /* @__PURE__ */ r(H, { elements: t }),
231
+ /* @__PURE__ */ r(F, { onToggle: f, isOpen: e, showConnectionStatus: a }),
232
+ /* @__PURE__ */ r("div", { className: `${e ? "menu-open" : ""}`, children: /* @__PURE__ */ r("div", { className: "main-section", children: /* @__PURE__ */ r(
233
233
  q,
234
234
  {
235
235
  id: "controlled-tab",
236
- activeKey: s,
237
- onSelect: (o) => c(o !== null ? o : void 0),
238
- children: C.Children.map(n, (o) => C.isValidElement(o) ? o : null)
236
+ activeKey: i,
237
+ onSelect: (c) => u(c !== null ? c : void 0),
238
+ children: C.Children.map(n, (c) => C.isValidElement(c) ? c : null)
239
239
  }
240
240
  ) }) })
241
241
  ] });
@@ -2,7 +2,7 @@ import { jsxs as I, Fragment as Ze, jsx as B } from "react/jsx-runtime";
2
2
  import { useState as D, useEffect as yn } from "react";
3
3
  import { L as Ee, i as vn, n as kn, a as xn } from "../../isLoading-B9qN9mny.js";
4
4
  import { Tabla as Cn } from "./tabla/Tabla.js";
5
- import { CustomModal as An } from "./modal/Modal.js";
5
+ import { EcoModal as An } from "./modal/Modal.js";
6
6
  import { EncabezadoTabla as En } from "./encabezado-tabla/EncabezadoTabla.js";
7
7
  import { useNavigate as Bn } from "react-router-dom";
8
8
  import '../../assets/TablaRegistros.css';/*!
@@ -1,9 +1,9 @@
1
- import { jsx as a, jsxs as s } from "react/jsx-runtime";
2
- import { s as t } from "../../../index-BpmHFDVa.js";
1
+ import { jsx as a, jsxs as t } from "react/jsx-runtime";
2
+ import { u as s } from "../../../index-Cpp73e44.js";
3
3
  import { F as i, a as l } from "../../../FormGroup-BLpFcIN5.js";
4
4
  import '../../../assets/Buscador.css';const d = ({ onSearch: r }) => {
5
5
  const n = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
6
- return /* @__PURE__ */ a("div", { className: "search-container", children: /* @__PURE__ */ s(i, { className: "d-flex align-items-center mx-1 position-relative", children: [
6
+ return /* @__PURE__ */ a("div", { className: "search-container", children: /* @__PURE__ */ t(i, { className: "d-flex align-items-center mx-1 position-relative", children: [
7
7
  /* @__PURE__ */ a(
8
8
  l,
9
9
  {
@@ -16,7 +16,7 @@ import '../../../assets/Buscador.css';const d = ({ onSearch: r }) => {
16
16
  }
17
17
  }
18
18
  ),
19
- /* @__PURE__ */ a(t, { className: "input-icon" })
19
+ /* @__PURE__ */ a(s, { className: "input-icon" })
20
20
  ] }) });
21
21
  };
22
22
  export {
@@ -1,44 +1,45 @@
1
- import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
- import { useState as n, useEffect as u } from "react";
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { useState as i, useEffect as h } from "react";
3
3
  import '../../../assets/Modal.css';/* empty css */
4
- const N = ({
5
- show: s,
6
- onHide: l,
4
+ const f = ({
5
+ show: o,
6
+ onHide: a,
7
7
  title: c,
8
8
  children: r,
9
9
  closeModalOut: m
10
10
  }) => {
11
- const [t, a] = n(!1), [i, e] = n(!1);
12
- return u(() => {
13
- s ? a(!0) : (e(!0), setTimeout(() => {
14
- a(!1), e(!1);
11
+ const [l, t] = i(!1), [d, s] = i(!1);
12
+ return h(() => {
13
+ o ? t(!0) : (s(!0), setTimeout(() => {
14
+ t(!1), s(!1);
15
15
  }, 200));
16
- }, [s]), /* @__PURE__ */ o(
16
+ }, [o]), /* @__PURE__ */ e(
17
17
  "div",
18
18
  {
19
- className: `modal-overlay ${t ? "show" : ""} ${i ? "hide" : ""}`,
19
+ className: `modal-overlay ${l ? "show" : ""} ${d ? "hide" : ""}`,
20
20
  onClick: () => {
21
- m && (e(!0), setTimeout(() => {
22
- l(), e(!1);
21
+ m && (s(!0), setTimeout(() => {
22
+ a(), s(!1);
23
23
  }, 200));
24
24
  },
25
- children: /* @__PURE__ */ d(
25
+ children: /* @__PURE__ */ n(
26
26
  "div",
27
27
  {
28
- className: `modal-container ${t ? "show" : ""} ${i ? "hide" : ""}`,
29
- onClick: (h) => h.stopPropagation(),
28
+ className: `modal-container ${l ? "show" : ""} ${d ? "hide" : ""}`,
29
+ onClick: (u) => u.stopPropagation(),
30
30
  children: [
31
- /* @__PURE__ */ d("div", { className: "modal_header", children: [
32
- /* @__PURE__ */ o("span", { children: c }),
33
- /* @__PURE__ */ o("button", { className: "close_button", onClick: l, type: "button", children: "×" })
31
+ /* @__PURE__ */ n("div", { className: "modal_header", children: [
32
+ /* @__PURE__ */ e("span", { children: c }),
33
+ /* @__PURE__ */ e("button", { className: "close_button", onClick: a, type: "button", children: "×" })
34
34
  ] }),
35
- /* @__PURE__ */ o("div", { className: "modal_body", children: r })
35
+ /* @__PURE__ */ e("div", { className: "modal_body", children: r })
36
36
  ]
37
37
  }
38
38
  )
39
39
  }
40
40
  );
41
- };
41
+ }, M = (o) => (process.env.NODE_ENV === "development" && console.warn("[CustomModal] is deprecated. Please use [EcoModal] instead."), /* @__PURE__ */ e(f, { ...o }));
42
42
  export {
43
- N as CustomModal
43
+ M as CustomModal,
44
+ f as EcoModal
44
45
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
2
  import _, { useState as j } from "react";
3
- import { r as A } from "../../../index-BpmHFDVa.js";
3
+ import { t as A } from "../../../index-Cpp73e44.js";
4
4
  import { a as G, b as R, c as E } from "../../../index-CgSyrJ_X.js";
5
5
  import { T as z } from "../../../Table-C5ydZooy.js";
6
6
  import { F as M, a as O } from "../../../FormGroup-BLpFcIN5.js";
@@ -1,6 +1,6 @@
1
1
  import { jsxs as s, Fragment as N, jsx as e } from "react/jsx-runtime";
2
2
  import p, { useState as o } from "react";
3
- import { n as v } from "../../index-BpmHFDVa.js";
3
+ import { n as v } from "../../index-Cpp73e44.js";
4
4
  import '../../assets/ContenidoModal.css';/* empty css */
5
5
  const x = ({ title: u, modalContent: i, children: d }) => {
6
6
  const [a, l] = o(0), [m, c] = o(!0), [r, n] = o(!1);
@@ -1,6 +1,6 @@
1
1
  import { jsxs as t, Fragment as N, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as m, useEffect as p } from "react";
3
- import { n as v } from "../../index-BpmHFDVa.js";
3
+ import { n as v } from "../../index-Cpp73e44.js";
4
4
  import '../../assets/ContenidoModal.css';/* empty css */
5
5
  const y = ({ title: d, children: h, buttons: s, isShowing: i, setIsShowing: u = () => {
6
6
  } }) => {
@@ -1,6 +1,6 @@
1
1
  import { jsxs as L, jsx as u } from "react/jsx-runtime";
2
2
  import { useState as M } from "react";
3
- import { F as A, a as U, b as j, c as B, d as J, e as W, f as z, g as P, h as Y, i as q, j as g, k as h, l as G, m as H } from "../../index-BpmHFDVa.js";
3
+ import { F as A, a as U, b as j, c as B, d as J, e as W, f as z, g as P, h as Y, i as q, j as g, k as h, l as G, m as H } from "../../index-Cpp73e44.js";
4
4
  import '../../assets/IconoTooltip.css';/* empty css */
5
5
  const _ = ({ recordType: x, taken: o = !0, customIcon: l }) => {
6
6
  const [a, b] = M(!1);
@@ -1,13 +1,13 @@
1
1
  import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
- import { useNavigate as s } from "react-router-dom";
3
- import { p as i, q as n } from "../../index-BpmHFDVa.js";
2
+ import { useNavigate as d } from "react-router-dom";
3
+ import { r as i, s as n } from "../../index-Cpp73e44.js";
4
4
  import { G as c } from "../../iconBase-LROS5hdG.js";
5
5
  import '../../assets/ItemsModal.css';/* empty css */
6
6
  function m(l) {
7
7
  return c({ tag: "svg", attr: { viewBox: "0 0 32 32" }, child: [{ tag: "path", attr: { d: "M 15 4 L 15 20.5625 L 9.71875 15.28125 L 8.28125 16.71875 L 15.28125 23.71875 L 16 24.40625 L 16.71875 23.71875 L 23.71875 16.71875 L 22.28125 15.28125 L 17 20.5625 L 17 4 Z M 7 26 L 7 28 L 25 28 L 25 26 Z" }, child: [] }] })(l);
8
8
  }
9
9
  const N = ({ sections: l }) => {
10
- const e = s();
10
+ const e = d();
11
11
  return /* @__PURE__ */ t("div", { className: "listado-tarjetas", children: l.map((a, r) => /* @__PURE__ */ o("div", { className: "tarjeta-listado-row", children: [
12
12
  /* @__PURE__ */ o(
13
13
  "div",
@@ -27,8 +27,8 @@ const N = ({ sections: l }) => {
27
27
  "div",
28
28
  {
29
29
  className: "tarjeta-listado-download-container",
30
- onClick: (d) => {
31
- d.stopPropagation(), a.handleDownload && a.handleDownload();
30
+ onClick: (s) => {
31
+ s.stopPropagation(), a.handleDownload && a.handleDownload();
32
32
  },
33
33
  children: /* @__PURE__ */ t(m, { className: "tarjeta-listado-download-icon" })
34
34
  }
package/dist/ui.js CHANGED
@@ -1,20 +1,21 @@
1
1
  import { Encabezado as t } from "./ui/encabezado/Encabezado.js";
2
2
  import { Subtitulo as m } from "./ui/subtitulo/Subtitulo.js";
3
- import { ContenidoModal as p } from "./ui/contenido-modal/ContenidoModal.js";
3
+ import { ContenidoModal as n } from "./ui/contenido-modal/ContenidoModal.js";
4
4
  import { Paginador as f } from "./ui/paginador/Paginador.js";
5
5
  import { Logo as d } from "./ui/logo/Logo.js";
6
6
  import { ItemsModal as l } from "./ui/items-modal/ItemsModal.js";
7
- import { IconoTooltip as u } from "./ui/icono-tooltip/IconoTooltip.js";
8
- import { ContenedorVentana as M } from "./ui/contenedor-ventana/ContenedorVentana.js";
9
- import { CustomModal as g } from "./tables/tabla-registros/modal/Modal.js";
7
+ import { IconoTooltip as M } from "./ui/icono-tooltip/IconoTooltip.js";
8
+ import { ContenedorVentana as C } from "./ui/contenedor-ventana/ContenedorVentana.js";
9
+ import { CustomModal as g, EcoModal as s } from "./tables/tabla-registros/modal/Modal.js";
10
10
  import { Animacion as I } from "./ui/animacion/Animacion.js";
11
11
  export {
12
12
  I as Animacion,
13
- M as ContenedorVentana,
14
- p as ContenidoModal,
13
+ C as ContenedorVentana,
14
+ n as ContenidoModal,
15
15
  g as CustomModal,
16
+ s as EcoModal,
16
17
  t as Encabezado,
17
- u as IconoTooltip,
18
+ M as IconoTooltip,
18
19
  l as ItemsModal,
19
20
  d as Logo,
20
21
  f as Paginador,
@@ -1,6 +1,7 @@
1
1
  import { jsx as t, Fragment as s, jsxs as a } from "react/jsx-runtime";
2
2
  import { useState as l, useEffect as N } from "react";
3
- import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/UnpHistorico.css';/* empty css */
3
+ import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/UnpHistorico.css';/* empty css */
4
+ /* empty css */
4
5
  /* empty css */
5
6
  import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
6
7
  /* empty css */
@@ -21,7 +22,7 @@ import "react-router-dom";
21
22
  /* empty css */
22
23
  import { Animacion as v } from "../../ui/animacion/Animacion.js";
23
24
  import { T as g } from "../../Table-C5ydZooy.js";
24
- const B = ({ endpoint: h, nuip: r }) => {
25
+ const G = ({ endpoint: h, nuip: r }) => {
25
26
  const [c, m] = l({
26
27
  sintesisHechos1: !1,
27
28
  sintesisHehcos2: !1
@@ -155,5 +156,5 @@ const B = ({ endpoint: h, nuip: r }) => {
155
156
  ] }) });
156
157
  };
157
158
  export {
158
- B as UnpHistorico
159
+ G as UnpHistorico
159
160
  };
@@ -0,0 +1,23 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { createContext as u, useState as i, useEffect as b, useMemo as d, useContext as S } from "react";
3
+ import { webSocketService as t } from "./websocket.js";
4
+ const n = u(void 0), m = ({ children: e }) => {
5
+ const [o, c] = i("disconnected");
6
+ b(() => t.subscribeToStatus(c), []);
7
+ const s = d(() => ({
8
+ connectionStatus: o,
9
+ connectWebSocket: t.connect,
10
+ disconnectWebSocket: t.disconnect,
11
+ sendWebSocketMessage: t.send
12
+ }), [o]);
13
+ return /* @__PURE__ */ r(n.Provider, { value: s, children: e });
14
+ }, x = () => {
15
+ const e = S(n);
16
+ if (e === void 0)
17
+ throw new Error("useWebSocket debe usarse dentro de un WebSocketProvider");
18
+ return e;
19
+ };
20
+ export {
21
+ m as WebSocketProvider,
22
+ x as useWebSocketConnection
23
+ };
@@ -0,0 +1,16 @@
1
+ import { useEffect as b } from "react";
2
+ import { webSocketService as e } from "./websocket.js";
3
+ const i = (c, s) => {
4
+ b(() => {
5
+ e.connect(c);
6
+ const t = (r) => {
7
+ s(r);
8
+ }, o = e.subscribe(t);
9
+ return () => {
10
+ o(), e.unsubscribe(t);
11
+ };
12
+ }, [c, s]);
13
+ };
14
+ export {
15
+ i as useWebSocket
16
+ };