react-ecosistema-unp 1.7.22 → 1.7.24-pre.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.
@@ -1,13 +1,22 @@
1
- async function o(t, c, r) {
2
- r(!0);
3
- const n = t + "consulta-cedula/" + c;
1
+ async function c(e, t) {
2
+ t(!0);
3
+ const o = "https://tu-api-intermedia.com/historico-ser", n = {
4
+ identificacion: e,
5
+ tipo: "nuip"
6
+ };
4
7
  try {
5
- const e = await (await fetch(n)).json();
6
- return e ? (r(!1), e) : (r(!1), []);
7
- } catch {
8
- return r(!1), [];
8
+ const r = await fetch(o, {
9
+ method: "POST",
10
+ headers: {
11
+ "Content-Type": "application/json"
12
+ },
13
+ body: JSON.stringify(n)
14
+ }), i = await r.json();
15
+ return r.ok ? (t(!1), i) : (t(!1), []);
16
+ } catch (r) {
17
+ return console.error("Error fetching data:", r), t(!1), [];
9
18
  }
10
19
  }
11
20
  export {
12
- o as fetchHistorico
21
+ c as fetchHistorico
13
22
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as t, Fragment as s, jsxs as a } from "react/jsx-runtime";
2
- import { useState as l, useEffect as N } from "react";
2
+ import { useState as l, useEffect as x } from "react";
3
3
  import '../../assets/EcoModalStyles.css';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
4
  /* empty css */
5
5
  /* empty css */
@@ -8,9 +8,9 @@ import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
- import { TarjetaInfo as b } from "../../cards/tarjeta-info/TarjetaInfo.js";
12
- import { F as u } from "../../index-D3WseyJh.js";
13
- import { fetchHistorico as f } from "./FetchHistorico.js";
11
+ import { TarjetaInfo as N } from "../../cards/tarjeta-info/TarjetaInfo.js";
12
+ import { F as b } from "../../index-D3WseyJh.js";
13
+ import { fetchHistorico as u } from "./FetchHistorico.js";
14
14
  /* empty css */
15
15
  import "../../ui/subtitulo/Subtitulo.js";
16
16
  /* empty css */
@@ -22,24 +22,24 @@ import "react-router-dom";
22
22
  /* empty css */
23
23
  import "../../index-BrykDZgK.js";
24
24
  /* empty css */
25
- import { Animacion as v } from "../../ui/animacion/Animacion.js";
26
- import { T as g } from "../../Table-C5ydZooy.js";
27
- const K = ({ endpoint: h, nuip: r }) => {
28
- const [c, m] = l({
25
+ import { Animacion as f } from "../../ui/animacion/Animacion.js";
26
+ import { T as v } from "../../Table-C5ydZooy.js";
27
+ const J = ({ nuip: r }) => {
28
+ const [c, h] = l({
29
29
  sintesisHechos1: !1,
30
30
  sintesisHehcos2: !1
31
- }), [d, p] = l([]), [o, x] = l(!1), n = (e) => {
32
- m((i) => ({
31
+ }), [d, m] = l([]), [o, p] = l(!1), n = (e) => {
32
+ h((i) => ({
33
33
  ...i,
34
34
  [e]: !i[e]
35
35
  }));
36
36
  };
37
- return N(() => {
37
+ return x(() => {
38
38
  (async () => {
39
- const i = await f(h, r, x);
40
- p(i);
39
+ const i = await u(r, p);
40
+ m(i);
41
41
  })();
42
- }, [r]), /* @__PURE__ */ t(s, { children: d && d.length > 0 && !o ? /* @__PURE__ */ t(s, { children: d.sort((e, i) => e.ordenTrabajo < i.ordenTrabajo ? 1 : -1).map((e, i) => /* @__PURE__ */ t(b, { icon: u, label: `OT ${e.ordenTrabajo} • ${e.tipoEstudio}`, children: /* @__PURE__ */ t(g, { striped: !0, bordered: !0, children: /* @__PURE__ */ a("tbody", { children: [
42
+ }, [r]), /* @__PURE__ */ t(s, { children: d && d.length > 0 && !o ? /* @__PURE__ */ t(s, { children: d.sort((e, i) => e.ordenTrabajo < i.ordenTrabajo ? 1 : -1).map((e, i) => /* @__PURE__ */ t(N, { icon: b, label: `OT ${e.ordenTrabajo} • ${e.tipoEstudio}`, children: /* @__PURE__ */ t(v, { striped: !0, bordered: !0, children: /* @__PURE__ */ a("tbody", { children: [
43
43
  /* @__PURE__ */ a("tr", { children: [
44
44
  /* @__PURE__ */ t("td", { className: "text-start", children: /* @__PURE__ */ t("b", { children: "Evaluado" }) }),
45
45
  /* @__PURE__ */ t("td", { className: "text-start", children: e.nombreCompleto && e.nombreCompleto })
@@ -151,12 +151,12 @@ const K = ({ endpoint: h, nuip: r }) => {
151
151
  /* @__PURE__ */ t("td", { className: "text-start", children: /* @__PURE__ */ t("b", { children: "Tipo de anulación" }) }),
152
152
  /* @__PURE__ */ t("td", { className: "text-start", children: e.tipoAnulacion && e.tipoAnulacion })
153
153
  ] })
154
- ] }) }) }, i)) }) : o ? /* @__PURE__ */ t(v, { type: "loading_parrot", width: 200 }) : /* @__PURE__ */ a(s, { children: [
154
+ ] }) }) }, i)) }) : o ? /* @__PURE__ */ t(f, { type: "loading_parrot", width: 200 }) : /* @__PURE__ */ a(s, { children: [
155
155
  "No hay información disponible para la identificación ",
156
156
  r,
157
157
  "."
158
158
  ] }) });
159
159
  };
160
160
  export {
161
- K as UnpHistorico
161
+ J as UnpHistorico
162
162
  };
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.22",
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.24-pre.0",
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
+ }