react-ecosistema-unp 1.7.13 → 1.7.15

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 (27) hide show
  1. package/README.md +61 -61
  2. package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +1 -1
  3. package/dist/cards/tarjeta-info/TarjetaInfo.js +1 -1
  4. package/dist/data/tarjeta-datos/TarjetaDatos.js +1 -1
  5. package/dist/{index-CgSyrJ_X.js → index-D3WseyJh.js} +18 -14
  6. package/dist/{index-069JzHFQ.js → index-DDjnZyBf.js} +16 -12
  7. package/dist/lib/assets/animations/noData.json.d.ts +5866 -5866
  8. package/dist/lib/assets/animations/noInfo.json.d.ts +2981 -2981
  9. package/dist/lib/tables/tabla-registros/TablaRegistros.d.ts +2 -0
  10. package/dist/lib/tables/tabla-registros/tabla/Tabla.d.ts +3 -0
  11. package/dist/shared/app-list/AppList.js +2 -2
  12. package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
  13. package/dist/shared/menu-lateral/MenuLateral.js +9 -9
  14. package/dist/shared/notificacion-usuario/NotificacionUsuario.js +3 -3
  15. package/dist/tables/tabla-registros/TablaRegistros.js +268 -264
  16. package/dist/tables/tabla-registros/buscador/Buscador.js +1 -1
  17. package/dist/tables/tabla-registros/encabezado-tabla/EncabezadoTabla.js +9 -8
  18. package/dist/tables/tabla-registros/modal-v2/EcoModal.js +1 -1
  19. package/dist/tables/tabla-registros/tabla/Tabla.js +179 -122
  20. package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
  21. package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
  22. package/dist/ui/icono-tooltip/IconoTooltip.js +1 -1
  23. package/dist/ui/items-modal/ItemsModal.js +1 -1
  24. package/dist/ui/logo/Logo.js +6 -6
  25. package/dist/utils/fetch-interceptor/fetchInterceptor.js +27 -26
  26. package/dist/utils/unp-historico/UnpHistorico.js +1 -1
  27. package/package.json +113 -113
@@ -1,17 +1,18 @@
1
1
  window.originalFetch = window.fetch.bind(window);
2
2
  let l = !1, h = null;
3
- const s = [];
3
+ const c = [];
4
4
  async function k() {
5
- const e = `${`${window.location.protocol}//${window.location.host}/`}api-auth/auth/refresh_token/`, i = await window.originalFetch(e, {
5
+ const e = `${`${window.location.protocol}//${window.location.host}/`}api-auth/auth/refresh_token/`, t = await window.originalFetch(e, {
6
6
  method: "POST",
7
7
  credentials: "include"
8
8
  });
9
- if (!i.ok)
10
- throw new Error("Error al refrescar token, status " + i.status);
11
- return "Token refreshed";
9
+ if (!t.ok)
10
+ throw new Error("Error al refrescar token, status " + t.status);
11
+ return console.warn("Token refrescado"), "Token refreshed";
12
12
  }
13
13
  window.fetch = async function(o, e) {
14
- if ((typeof o == "string" ? o : o.toString()).includes("/api-auth/"))
14
+ const t = typeof o == "string" ? o : o.toString();
15
+ if (console.log("Petición fetchInterceptor Librería:", t), t.includes("/api-auth/"))
15
16
  return window.originalFetch(o, e);
16
17
  e = e || {};
17
18
  const u = sessionStorage.getItem("user_token");
@@ -20,33 +21,33 @@ window.fetch = async function(o, e) {
20
21
  ...u ? { Authorization: u } : {}
21
22
  };
22
23
  try {
23
- const a = `${window.location.protocol}//${window.location.host}/`, t = await window.originalFetch(o, e);
24
- if (t.status !== 401) {
25
- const r = await t.clone().text();
26
- if (!r.includes("Signature has expired"))
27
- return t;
28
- if (r.includes("Invalid or expired token"))
29
- return sessionStorage.removeItem("user_token"), setTimeout(() => {
30
- window.location.href = a;
31
- }, 1e3), t;
24
+ const i = `${window.location.protocol}//${window.location.host}/`, r = await window.originalFetch(o, e);
25
+ if (r.status !== 401) {
26
+ const n = await r.clone().text();
27
+ if (!n.includes("Signature has expired"))
28
+ return r;
29
+ if (n.includes("Invalid or expired token"))
30
+ return console.warn("El token expiró"), sessionStorage.removeItem("user_token"), setTimeout(() => {
31
+ window.location.href = i;
32
+ }, 1e3), r;
32
33
  }
33
- return new Promise((w, r) => {
34
- s.push({ input: o, init: e, resolve: w, reject: r }), l || (l = !0, h = k(), h.then(() => {
35
- s.forEach(({ input: c, init: n, resolve: d, reject: f }) => {
34
+ return new Promise((w, n) => {
35
+ c.push({ input: o, init: e, resolve: w, reject: n }), l || (l = !0, h = k(), h.then(() => {
36
+ c.forEach(({ input: a, init: s, resolve: d, reject: f }) => {
36
37
  const g = {
37
- ...n,
38
- headers: { ...n.headers, Authorization: sessionStorage.getItem("user_token") }
38
+ ...s,
39
+ headers: { ...s.headers, Authorization: sessionStorage.getItem("user_token") }
39
40
  };
40
- window.originalFetch(c, g).then(d).catch(f);
41
+ window.originalFetch(a, g).then(d).catch(f);
41
42
  });
42
- }).catch((c) => {
43
- s.forEach(({ reject: n }) => n(c));
43
+ }).catch((a) => {
44
+ c.forEach(({ reject: s }) => s(a));
44
45
  }).finally(() => {
45
- s.length = 0, l = !1, h = null;
46
+ c.length = 0, l = !1, h = null;
46
47
  }));
47
48
  });
48
- } catch (a) {
49
- return Promise.reject(a);
49
+ } catch (i) {
50
+ return Promise.reject(i);
50
51
  }
51
52
  };
52
53
  const p = {};
@@ -9,7 +9,7 @@ import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import { TarjetaInfo as b } from "../../cards/tarjeta-info/TarjetaInfo.js";
12
- import { F as u } from "../../index-CgSyrJ_X.js";
12
+ import { F as u } from "../../index-D3WseyJh.js";
13
13
  import { fetchHistorico as f } from "./FetchHistorico.js";
14
14
  /* empty css */
15
15
  import "../../ui/subtitulo/Subtitulo.js";
package/package.json CHANGED
@@ -1,113 +1,113 @@
1
- {
2
- "name": "react-ecosistema-unp",
3
- "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
- "private": false,
5
- "version": "1.7.13",
6
- "type": "module",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/lib/main.d.ts",
10
- "default": "./dist/main.js"
11
- },
12
- "./shared": {
13
- "types": "./dist/lib/shared.d.ts",
14
- "default": "./dist/shared.js"
15
- },
16
- "./ui": {
17
- "types": "./dist/lib/ui.d.ts",
18
- "default": "./dist/ui.js"
19
- },
20
- "./cards": {
21
- "types": "./dist/lib/cards.d.ts",
22
- "default": "./dist/cards.js"
23
- },
24
- "./tables": {
25
- "types": "./dist/lib/tables.d.ts",
26
- "default": "./dist/tables.js"
27
- },
28
- "./utils": {
29
- "types": "./dist/lib/utils.d.ts",
30
- "default": "./dist/utils.js"
31
- },
32
- "./accessibility": {
33
- "types": "./dist/lib/accessibility.d.ts",
34
- "default": "./dist/accessibility.js"
35
- },
36
- "./data": {
37
- "types": "./dist/lib/data.d.ts",
38
- "default": "./dist/data.js"
39
- },
40
- "./styles/EcoStyles.css": "./dist/assets/Bootstrap.css",
41
- "./utils/fetchInterceptor.js": "./dist/utils/fetch-interceptor/fetchInterceptor.js"
42
- },
43
- "files": [
44
- "dist"
45
- ],
46
- "repository": {
47
- "type": "git",
48
- "url": "https://github.com/EcosistemaUNP/react-ecosistema-unp"
49
- },
50
- "sideEffects": [
51
- "**/*.css"
52
- ],
53
- "scripts": {
54
- "dev": "vite",
55
- "build": "tsc -b ./tsconfig.lib.json && vite build",
56
- "prepublishOnly": "npm run build",
57
- "lint": "eslint .",
58
- "preview": "vite preview",
59
- "storybook": "storybook dev -p 6006",
60
- "build-storybook": "storybook build --output-dir .storybook/.storybook-build",
61
- "predeploy": "npm run build-storybook",
62
- "deploy:storybook": "gh-pages -d .storybook-build -b gh-pages -t"
63
- },
64
- "peerDependencies": {
65
- "react": ">=18.0.0 <=20.0.0",
66
- "react-dom": ">=18.0.0 <=20.0.0",
67
- "react-router-dom": ">=6.0.0 <=8.0.0"
68
- },
69
- "dependencies": {
70
- "@marsidev/react-turnstile": "^1.1.0",
71
- "bootstrap": "^5.3.3",
72
- "jwt-decode": "^4.0.0",
73
- "lottie-react": "^2.4.1",
74
- "react-bootstrap": "^2.10.9",
75
- "react-icons": "^5.4.0",
76
- "react-select": "^5.10.1",
77
- "react-toastify": "^11.0.3",
78
- "sweetalert2": "^11.16.1"
79
- },
80
- "devDependencies": {
81
- "@chromatic-com/storybook": "^3.2.4",
82
- "@eslint/js": "^9.17.0",
83
- "@storybook/addon-essentials": "^8.5.5",
84
- "@storybook/addon-interactions": "^8.5.5",
85
- "@storybook/addon-onboarding": "^8.5.5",
86
- "@storybook/blocks": "^8.5.5",
87
- "@storybook/react": "^8.5.5",
88
- "@storybook/react-vite": "^8.5.5",
89
- "@storybook/test": "^8.5.5",
90
- "@types/node": "^22.10.10",
91
- "@types/react": "^18.3.18",
92
- "@types/react-dom": "^18.3.5",
93
- "@vitejs/plugin-react": "^4.3.4",
94
- "eslint": "^9.17.0",
95
- "eslint-plugin-react-hooks": "^5.0.0",
96
- "eslint-plugin-react-refresh": "^0.4.16",
97
- "eslint-plugin-storybook": "^0.11.2",
98
- "gh-pages": "^6.3.0",
99
- "glob": "^11.0.1",
100
- "globals": "^15.14.0",
101
- "storybook": "^8.5.5",
102
- "typescript": "~5.6.2",
103
- "typescript-eslint": "^8.18.2",
104
- "vite": "^6.1.0",
105
- "vite-plugin-dts": "^4.5.0",
106
- "vite-plugin-lib-inject-css": "^2.2.1"
107
- },
108
- "eslintConfig": {
109
- "extends": [
110
- "plugin:storybook/recommended"
111
- ]
112
- }
113
- }
1
+ {
2
+ "name": "react-ecosistema-unp",
3
+ "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
+ "private": false,
5
+ "version": "1.7.15",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/lib/main.d.ts",
10
+ "default": "./dist/main.js"
11
+ },
12
+ "./shared": {
13
+ "types": "./dist/lib/shared.d.ts",
14
+ "default": "./dist/shared.js"
15
+ },
16
+ "./ui": {
17
+ "types": "./dist/lib/ui.d.ts",
18
+ "default": "./dist/ui.js"
19
+ },
20
+ "./cards": {
21
+ "types": "./dist/lib/cards.d.ts",
22
+ "default": "./dist/cards.js"
23
+ },
24
+ "./tables": {
25
+ "types": "./dist/lib/tables.d.ts",
26
+ "default": "./dist/tables.js"
27
+ },
28
+ "./utils": {
29
+ "types": "./dist/lib/utils.d.ts",
30
+ "default": "./dist/utils.js"
31
+ },
32
+ "./accessibility": {
33
+ "types": "./dist/lib/accessibility.d.ts",
34
+ "default": "./dist/accessibility.js"
35
+ },
36
+ "./data": {
37
+ "types": "./dist/lib/data.d.ts",
38
+ "default": "./dist/data.js"
39
+ },
40
+ "./styles/EcoStyles.css": "./dist/assets/Bootstrap.css",
41
+ "./utils/fetchInterceptor.js": "./dist/utils/fetch-interceptor/fetchInterceptor.js"
42
+ },
43
+ "files": [
44
+ "dist"
45
+ ],
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/EcosistemaUNP/react-ecosistema-unp"
49
+ },
50
+ "sideEffects": [
51
+ "**/*.css"
52
+ ],
53
+ "scripts": {
54
+ "dev": "vite",
55
+ "build": "tsc -b ./tsconfig.lib.json && vite build",
56
+ "prepublishOnly": "npm run build",
57
+ "lint": "eslint .",
58
+ "preview": "vite preview",
59
+ "storybook": "storybook dev -p 6006",
60
+ "build-storybook": "storybook build --output-dir .storybook/.storybook-build",
61
+ "predeploy": "npm run build-storybook",
62
+ "deploy:storybook": "gh-pages -d .storybook-build -b gh-pages -t"
63
+ },
64
+ "peerDependencies": {
65
+ "react": ">=18.0.0 <=20.0.0",
66
+ "react-dom": ">=18.0.0 <=20.0.0",
67
+ "react-router-dom": ">=6.0.0 <=8.0.0"
68
+ },
69
+ "dependencies": {
70
+ "@marsidev/react-turnstile": "^1.1.0",
71
+ "bootstrap": "^5.3.3",
72
+ "jwt-decode": "^4.0.0",
73
+ "lottie-react": "^2.4.1",
74
+ "react-bootstrap": "^2.10.9",
75
+ "react-icons": "^5.4.0",
76
+ "react-select": "^5.10.1",
77
+ "react-toastify": "^11.0.3",
78
+ "sweetalert2": "^11.16.1"
79
+ },
80
+ "devDependencies": {
81
+ "@chromatic-com/storybook": "^3.2.4",
82
+ "@eslint/js": "^9.17.0",
83
+ "@storybook/addon-essentials": "^8.5.5",
84
+ "@storybook/addon-interactions": "^8.5.5",
85
+ "@storybook/addon-onboarding": "^8.5.5",
86
+ "@storybook/blocks": "^8.5.5",
87
+ "@storybook/react": "^8.5.5",
88
+ "@storybook/react-vite": "^8.5.5",
89
+ "@storybook/test": "^8.5.5",
90
+ "@types/node": "^22.10.10",
91
+ "@types/react": "^18.3.18",
92
+ "@types/react-dom": "^18.3.5",
93
+ "@vitejs/plugin-react": "^4.3.4",
94
+ "eslint": "^9.17.0",
95
+ "eslint-plugin-react-hooks": "^5.0.0",
96
+ "eslint-plugin-react-refresh": "^0.4.16",
97
+ "eslint-plugin-storybook": "^0.11.2",
98
+ "gh-pages": "^6.3.0",
99
+ "glob": "^11.0.1",
100
+ "globals": "^15.14.0",
101
+ "storybook": "^8.5.5",
102
+ "typescript": "~5.6.2",
103
+ "typescript-eslint": "^8.18.2",
104
+ "vite": "^6.1.0",
105
+ "vite-plugin-dts": "^4.5.0",
106
+ "vite-plugin-lib-inject-css": "^2.2.1"
107
+ },
108
+ "eslintConfig": {
109
+ "extends": [
110
+ "plugin:storybook/recommended"
111
+ ]
112
+ }
113
+ }