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

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 +1 @@
1
- .title-container{display:flex;gap:1rem;align-items:center;align-content:center}.logo-subtitle-container{height:100%;display:flex;gap:.66rem;align-items:center}.red-section{height:60px;width:10px;background-color:#d13c47;border-top-right-radius:7px;border-bottom-right-radius:7px}.img-logo{height:52px;object-fit:cover}.title{font-weight:500;font-size:1.55rem;color:#232323}.subtitle{font-size:1.05rem;color:#3f3f3f}.subtitle-container{display:flex;flex-direction:column}
1
+ .title-container{display:flex;gap:1rem;align-items:center;align-content:center}.logo-subtitle-container{height:100%;display:flex;gap:.66rem;align-items:center}.red-section{height:60px;width:10px;background-color:#d13c47;border-top-right-radius:7px;border-bottom-right-radius:7px}.img-logo{height:52px;object-fit:cover}.title{font-weight:500;font-size:1.55rem;color:#232323}.subtitle{font-size:1.05rem;color:#3f3f3f}.title{font-weight:500;font-size:clamp(1rem,2.5vw,1.55rem);color:#232323}.subtitle{font-size:clamp(.8rem,2vw,1.05rem);color:#3f3f3f}.subtitle-container{display:flex;flex-direction:column}
@@ -1 +1 @@
1
- .table_container{display:flex;flex-direction:column;gap:1.5rem;text-align:center;margin-top:.75rem}.table-scroll{position:relative;max-height:70vh;overflow-y:auto;overflow-x:auto;margin-right:5px;margin-left:5px;border-radius:10px;box-shadow:0 2px 12px #00000016;background:#f9fafa}.table-scroll th,.table-scroll td{white-space:nowrap;word-wrap:normal;min-width:100px;padding-left:15px;padding-right:15px}.table-scroll::-webkit-scrollbar{width:20px}.table-scroll::-webkit-scrollbar-track{background:linear-gradient(to bottom right,#f9fafa,#f9fafa,#fff);border-top-right-radius:10px;border-bottom-right-radius:10px}.table-scroll::-webkit-scrollbar-thumb{background-color:#303d50;border-radius:10px;border:6px solid transparent;background-clip:padding-box}thead tr th{background-color:#fff!important;border-bottom:1px solid #DEE2E6!important;position:sticky;top:0;z-index:2}.table td,.table th{text-align:center;vertical-align:middle}.table{margin-bottom:0!important}.table-header-unp{background-color:#f9fafa!important;color:#2c2c2c!important;font-weight:600;font-size:1.1rem;padding:1.25rem 0!important}.cell-with-modal{transition:background-color .3s ease}.cell-with-modal:hover{background-color:#303d50!important;color:#fff;font-weight:600}.data-count,.data-unp{font-weight:500;font-size:.85rem;margin-top:1rem;margin-left:5px;margin-right:5px;color:#8c8c8f}.animation-container{gap:2rem;height:73vh;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#919191}@media (min-width: 1800px){.table-scroll{max-height:75vh}}.search-column-input{border-radius:11px!important;padding-right:40px!important;box-shadow:0 1px 6px #00000012!important}.cell-redirect:hover{background-color:#303d50;color:#fff;font-weight:600;cursor:pointer}
1
+ .table_container{display:flex;flex-direction:column;gap:1.5rem;text-align:center}.table-scroll{position:relative;max-height:70vh;overflow-y:auto;overflow-x:auto;margin-right:5px;margin-left:5px;border-radius:10px;box-shadow:0 2px 12px #00000016;background:#f9fafa}@media (max-height: 780px){.table-scroll{max-height:65vh!important}}@media (max-height: 670px){.table-scroll{max-height:60vh!important}}@media (max-height: 590px){.table-scroll{max-height:55vh!important}}@media (max-height: 520px){.table-scroll{max-height:50vh!important}}@media (max-height: 470px){.table-scroll{max-height:40vh!important}}.table-scroll th,.table-scroll td{white-space:nowrap;word-wrap:normal;min-width:100px;padding-left:15px;padding-right:15px}.table-scroll::-webkit-scrollbar{width:16px}.table-scroll::-webkit-scrollbar-track{background:linear-gradient(to bottom right,#f9fafa,#f9fafa,#fff);border-top-right-radius:10px;border-bottom-right-radius:10px}.table-scroll::-webkit-scrollbar-thumb{background-color:#303d50;border-radius:10px;border:6px solid transparent;background-clip:padding-box}thead tr th{background-color:#fff!important;border-bottom:1px solid #DEE2E6!important;position:sticky;top:0;z-index:2}.table td,.table th{text-align:center;vertical-align:middle}.table{margin-bottom:0!important}.table-header-unp{background-color:#f9fafa!important;color:#2c2c2c!important;font-weight:600;font-size:1.1rem;padding:1.25rem 0!important}.cell-with-modal{transition:background-color .3s ease}.cell-with-modal:hover{background-color:#303d50!important;color:#fff;font-weight:600}.data-count,.data-unp{font-weight:500;font-size:.85rem;margin-top:1rem;margin-left:5px;margin-right:5px;color:#8c8c8f}.animation-container{gap:2rem;height:73vh;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#919191}@media (min-width: 1800px){.table-scroll{max-height:75vh}}.search-column-input{border-radius:11px!important;padding-right:40px!important;box-shadow:0 1px 6px #00000012!important}.cell-redirect:hover{background-color:#3c2970;color:#fff;font-weight:600;cursor:pointer}
@@ -4,8 +4,5 @@ declare const AuthContext: React.Context<AuthContextType | undefined>;
4
4
  interface AuthProviderProps {
5
5
  children: ReactNode;
6
6
  }
7
- /**
8
- * @deprecated since version 1.7.x
9
- */
10
7
  declare const AuthProvider: React.FC<AuthProviderProps>;
11
8
  export { AuthContext, AuthProvider };
@@ -2,7 +2,7 @@ interface UseFetchGenericoParams<T> {
2
2
  endpoint: string;
3
3
  localJsonPath?: string;
4
4
  label?: string;
5
- dependencia?: number | null;
5
+ dependencia?: number | string | null;
6
6
  queryParamKey?: string;
7
7
  all?: boolean;
8
8
  filtrarResultados?: (item: T) => boolean;
@@ -1 +1 @@
1
- export declare const useWebSocket: (url: string, onMessage: (data: any) => void) => void;
1
+ export declare const useWebSocket: (url: string, onMessage?: (data: any) => void) => void;
@@ -1,36 +1,36 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { useState as i, useEffect as h } from "react";
2
+ import { useState as d, useEffect as u } from "react";
3
3
  import '../../../assets/Modal.css';/* empty css */
4
4
  const f = ({
5
5
  show: o,
6
- onHide: a,
6
+ onHide: t,
7
7
  title: c,
8
8
  children: r,
9
9
  closeModalOut: m
10
10
  }) => {
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);
11
+ const [l, a] = d(!1), [i, s] = d(!1);
12
+ return u(() => {
13
+ o ? a(!0) : (s(!0), setTimeout(() => {
14
+ a(!1), s(!1);
15
15
  }, 200));
16
16
  }, [o]), /* @__PURE__ */ e(
17
17
  "div",
18
18
  {
19
- className: `modal-overlay ${l ? "show" : ""} ${d ? "hide" : ""}`,
19
+ className: `modal-overlay ${l ? "show" : ""} ${i ? "hide" : ""}`,
20
20
  onClick: () => {
21
21
  m && (s(!0), setTimeout(() => {
22
- a(), s(!1);
22
+ t(), s(!1);
23
23
  }, 200));
24
24
  },
25
25
  children: /* @__PURE__ */ n(
26
26
  "div",
27
27
  {
28
- className: `modal-container ${l ? "show" : ""} ${d ? "hide" : ""}`,
29
- onClick: (u) => u.stopPropagation(),
28
+ className: `modal-container ${l ? "show" : ""} ${i ? "hide" : ""}`,
29
+ onClick: (h) => h.stopPropagation(),
30
30
  children: [
31
31
  /* @__PURE__ */ n("div", { className: "modal_header", children: [
32
32
  /* @__PURE__ */ e("span", { children: c }),
33
- /* @__PURE__ */ e("button", { className: "close_button", onClick: a, type: "button", children: "×" })
33
+ /* @__PURE__ */ e("button", { className: "close_button", onClick: t, type: "button", children: "×" })
34
34
  ] }),
35
35
  /* @__PURE__ */ e("div", { className: "modal_body", children: r })
36
36
  ]
@@ -38,8 +38,8 @@ const f = ({
38
38
  )
39
39
  }
40
40
  );
41
- }, M = (o) => (process.env.NODE_ENV === "development" && console.warn("[CustomModal] is deprecated. Please use [EcoModal] instead."), /* @__PURE__ */ e(f, { ...o }));
41
+ }, b = (o) => /* @__PURE__ */ e(f, { ...o });
42
42
  export {
43
- M as CustomModal,
43
+ b as CustomModal,
44
44
  f as EcoModal
45
45
  };
@@ -1,16 +1,17 @@
1
1
  import { useEffect as b } from "react";
2
- import { webSocketService as e } from "./websocket.js";
3
- const i = (c, s) => {
2
+ import { webSocketService as c } from "./websocket.js";
3
+ const u = (t, e) => {
4
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]);
5
+ if (c.connect(t), e) {
6
+ const r = (s) => {
7
+ e(s);
8
+ }, o = c.subscribe(r);
9
+ return () => {
10
+ o(), c.unsubscribe(r);
11
+ };
12
+ }
13
+ }, [t, e]);
13
14
  };
14
15
  export {
15
- i as useWebSocket
16
+ u as useWebSocket
16
17
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-ecosistema-unp",
3
3
  "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
4
  "private": false,
5
- "version": "1.7.0-pre.1",
5
+ "version": "1.7.0-pre.4",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {