react-ecosistema-unp 1.7.2-pre.0 → 1.7.2

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/ui.js CHANGED
@@ -1,25 +1,24 @@
1
1
  import { Encabezado as t } from "./ui/encabezado/Encabezado.js";
2
- import { Subtitulo as a } from "./ui/subtitulo/Subtitulo.js";
3
- import { ContenidoModal as p } from "./ui/contenido-modal/ContenidoModal.js";
2
+ import { Subtitulo as m } from "./ui/subtitulo/Subtitulo.js";
3
+ import { ContenidoModal as a } from "./ui/contenido-modal/ContenidoModal.js";
4
4
  import { Paginador as n } from "./ui/paginador/Paginador.js";
5
5
  import { Logo as d } from "./ui/logo/Logo.js";
6
- import { ItemsModal as c } from "./ui/items-modal/ItemsModal.js";
6
+ import { ItemsModal as l } from "./ui/items-modal/ItemsModal.js";
7
7
  import { IconoTooltip as M } from "./ui/icono-tooltip/IconoTooltip.js";
8
- import { ContenedorVentana as E } from "./ui/contenedor-ventana/ContenedorVentana.js";
9
- import { CustomModal as C, EcoModal as b } from "./tables/tabla-registros/modal/Modal.js";
10
- import { EcoModal as I } from "./tables/tabla-registros/modal-test/EcoModal.js";
8
+ import { ContenedorVentana as C } from "./ui/contenedor-ventana/ContenedorVentana.js";
9
+ import { CustomModal as g } from "./tables/tabla-registros/modal/Modal.js";
10
+ import { EcoModal as E } from "./tables/tabla-registros/modal-v2/EcoModal.js";
11
11
  import { Animacion as z } from "./ui/animacion/Animacion.js";
12
12
  export {
13
13
  z as Animacion,
14
- E as ContenedorVentana,
15
- p as ContenidoModal,
16
- C as CustomModal,
17
- b as EcoModal,
18
- I as EcoModalTest,
14
+ C as ContenedorVentana,
15
+ a as ContenidoModal,
16
+ g as CustomModal,
17
+ E as EcoModal,
19
18
  t as Encabezado,
20
19
  M as IconoTooltip,
21
- c as ItemsModal,
20
+ l as ItemsModal,
22
21
  d as Logo,
23
22
  n as Paginador,
24
- a as Subtitulo
23
+ m as Subtitulo
25
24
  };
@@ -1,16 +1,16 @@
1
- import { useEffect as n } from "react";
2
- import { webSocketService as e } from "./websocket.js";
3
- const u = (t, c) => {
4
- n(() => {
5
- if (e.connect(t), c) {
6
- const o = (s) => {
7
- c(s);
8
- }, r = e.subscribe(o);
1
+ import { useEffect as b } from "react";
2
+ import { webSocketService as c } from "./websocket.js";
3
+ const u = (t, e) => {
4
+ b(() => {
5
+ if (c.connect(t), e) {
6
+ const r = (s) => {
7
+ e(s);
8
+ }, o = c.subscribe(r);
9
9
  return () => {
10
- r(), e.unsubscribe(o), e.disconnect();
10
+ o(), c.unsubscribe(r);
11
11
  };
12
12
  }
13
- }, [t, c]);
13
+ }, [t, e]);
14
14
  };
15
15
  export {
16
16
  u as useWebSocket
package/package.json CHANGED
@@ -1,111 +1,111 @@
1
- {
2
- "name": "react-ecosistema-unp",
3
- "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
- "private": false,
5
- "version": "1.7.2-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
- },
41
- "files": [
42
- "dist"
43
- ],
44
- "repository": {
45
- "type": "git",
46
- "url": "https://github.com/EcosistemaUNP/react-ecosistema-unp"
47
- },
48
- "sideEffects": [
49
- "**/*.css"
50
- ],
51
- "scripts": {
52
- "dev": "vite",
53
- "build": "tsc -b ./tsconfig.lib.json && vite build",
54
- "prepublishOnly": "npm run build",
55
- "lint": "eslint .",
56
- "preview": "vite preview",
57
- "storybook": "storybook dev -p 6006",
58
- "build-storybook": "storybook build --output-dir .storybook/.storybook-build",
59
- "predeploy": "npm run build-storybook",
60
- "deploy:storybook": "gh-pages -d .storybook-build -b gh-pages -t"
61
- },
62
- "peerDependencies": {
63
- "react": ">=18.0.0 <=20.0.0",
64
- "react-dom": ">=18.0.0 <=20.0.0",
65
- "react-router-dom": ">=6.0.0 <=8.0.0"
66
- },
67
- "dependencies": {
68
- "@marsidev/react-turnstile": "^1.1.0",
69
- "bootstrap": "^5.3.3",
70
- "jwt-decode": "^4.0.0",
71
- "lottie-react": "^2.4.1",
72
- "react-bootstrap": "^2.10.9",
73
- "react-icons": "^5.4.0",
74
- "react-select": "^5.10.1",
75
- "react-toastify": "^11.0.3",
76
- "sweetalert2": "^11.16.1"
77
- },
78
- "devDependencies": {
79
- "@chromatic-com/storybook": "^3.2.4",
80
- "@eslint/js": "^9.17.0",
81
- "@storybook/addon-essentials": "^8.5.5",
82
- "@storybook/addon-interactions": "^8.5.5",
83
- "@storybook/addon-onboarding": "^8.5.5",
84
- "@storybook/blocks": "^8.5.5",
85
- "@storybook/react": "^8.5.5",
86
- "@storybook/react-vite": "^8.5.5",
87
- "@storybook/test": "^8.5.5",
88
- "@types/node": "^22.10.10",
89
- "@types/react": "^18.3.18",
90
- "@types/react-dom": "^18.3.5",
91
- "@vitejs/plugin-react": "^4.3.4",
92
- "eslint": "^9.17.0",
93
- "eslint-plugin-react-hooks": "^5.0.0",
94
- "eslint-plugin-react-refresh": "^0.4.16",
95
- "eslint-plugin-storybook": "^0.11.2",
96
- "gh-pages": "^6.3.0",
97
- "glob": "^11.0.1",
98
- "globals": "^15.14.0",
99
- "storybook": "^8.5.5",
100
- "typescript": "~5.6.2",
101
- "typescript-eslint": "^8.18.2",
102
- "vite": "^6.1.0",
103
- "vite-plugin-dts": "^4.5.0",
104
- "vite-plugin-lib-inject-css": "^2.2.1"
105
- },
106
- "eslintConfig": {
107
- "extends": [
108
- "plugin:storybook/recommended"
109
- ]
110
- }
111
- }
1
+ {
2
+ "name": "react-ecosistema-unp",
3
+ "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
+ "private": false,
5
+ "version": "1.7.2",
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
+ },
41
+ "files": [
42
+ "dist"
43
+ ],
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "https://github.com/EcosistemaUNP/react-ecosistema-unp"
47
+ },
48
+ "sideEffects": [
49
+ "**/*.css"
50
+ ],
51
+ "scripts": {
52
+ "dev": "vite",
53
+ "build": "tsc -b ./tsconfig.lib.json && vite build",
54
+ "prepublishOnly": "npm run build",
55
+ "lint": "eslint .",
56
+ "preview": "vite preview",
57
+ "storybook": "storybook dev -p 6006",
58
+ "build-storybook": "storybook build --output-dir .storybook/.storybook-build",
59
+ "predeploy": "npm run build-storybook",
60
+ "deploy:storybook": "gh-pages -d .storybook-build -b gh-pages -t"
61
+ },
62
+ "peerDependencies": {
63
+ "react": ">=18.0.0 <=20.0.0",
64
+ "react-dom": ">=18.0.0 <=20.0.0",
65
+ "react-router-dom": ">=6.0.0 <=8.0.0"
66
+ },
67
+ "dependencies": {
68
+ "@marsidev/react-turnstile": "^1.1.0",
69
+ "bootstrap": "^5.3.3",
70
+ "jwt-decode": "^4.0.0",
71
+ "lottie-react": "^2.4.1",
72
+ "react-bootstrap": "^2.10.9",
73
+ "react-icons": "^5.4.0",
74
+ "react-select": "^5.10.1",
75
+ "react-toastify": "^11.0.3",
76
+ "sweetalert2": "^11.16.1"
77
+ },
78
+ "devDependencies": {
79
+ "@chromatic-com/storybook": "^3.2.4",
80
+ "@eslint/js": "^9.17.0",
81
+ "@storybook/addon-essentials": "^8.5.5",
82
+ "@storybook/addon-interactions": "^8.5.5",
83
+ "@storybook/addon-onboarding": "^8.5.5",
84
+ "@storybook/blocks": "^8.5.5",
85
+ "@storybook/react": "^8.5.5",
86
+ "@storybook/react-vite": "^8.5.5",
87
+ "@storybook/test": "^8.5.5",
88
+ "@types/node": "^22.10.10",
89
+ "@types/react": "^18.3.18",
90
+ "@types/react-dom": "^18.3.5",
91
+ "@vitejs/plugin-react": "^4.3.4",
92
+ "eslint": "^9.17.0",
93
+ "eslint-plugin-react-hooks": "^5.0.0",
94
+ "eslint-plugin-react-refresh": "^0.4.16",
95
+ "eslint-plugin-storybook": "^0.11.2",
96
+ "gh-pages": "^6.3.0",
97
+ "glob": "^11.0.1",
98
+ "globals": "^15.14.0",
99
+ "storybook": "^8.5.5",
100
+ "typescript": "~5.6.2",
101
+ "typescript-eslint": "^8.18.2",
102
+ "vite": "^6.1.0",
103
+ "vite-plugin-dts": "^4.5.0",
104
+ "vite-plugin-lib-inject-css": "^2.2.1"
105
+ },
106
+ "eslintConfig": {
107
+ "extends": [
108
+ "plugin:storybook/recommended"
109
+ ]
110
+ }
111
+ }
@@ -1,101 +0,0 @@
1
- import { jsx as a, jsxs as u } from "react/jsx-runtime";
2
- import { useState as m, useRef as F, useEffect as f } from "react";
3
- import { R as O } from "../../../index-BrykDZgK.js";
4
- import { q, r as I } from "../../../index-069JzHFQ.js";
5
- import '../../../assets/EcoModalStyles.css';/* empty css */
6
- const Q = ({
7
- show: n,
8
- onHide: p,
9
- title: S,
10
- children: E,
11
- closeModalOut: R,
12
- isMaximized: o,
13
- onToggleMaximize: h,
14
- showMaximizeButton: j = !1,
15
- modalType: s = "primary",
16
- primaryPosition: r = "right",
17
- disableClose: y = !1,
18
- hasSecondaryModalOpen: k = !1,
19
- otherModalOpen: c = !1,
20
- widthPercent: v
21
- }) => {
22
- const [b, g] = m(!1), [l, i] = m(!1), [w, C] = m(!1), t = F(null);
23
- f(() => (C(!0), s === "secondary" && !t.current && (t.current = document.createElement("div"), t.current.className = "modal-portal-container", document.body.appendChild(t.current)), () => {
24
- C(!1), t.current && (document.body.removeChild(t.current), t.current = null);
25
- }), [s]), f(() => {
26
- const e = document.body;
27
- return n ? (g(!0), e.classList.add("modal-open")) : (i(!0), setTimeout(() => {
28
- w && (g(!1), i(!1)), e.classList.remove("modal-open");
29
- }, 200)), () => {
30
- e.classList.remove("modal-open");
31
- };
32
- }, [n, w]), f(() => {
33
- const e = document.body;
34
- s === "primary" && (e.classList.remove("primary-right", "primary-left"), e.classList.add(
35
- r === "left" ? "primary-left" : "primary-right"
36
- ));
37
- const d = () => {
38
- if (!(n && c && !o)) {
39
- e.classList.remove("two-modals-50", "two-modals-large");
40
- return;
41
- }
42
- window.innerWidth >= 1200 ? (e.classList.add("two-modals-large"), e.classList.remove("two-modals-50")) : (e.classList.add("two-modals-50"), e.classList.remove("two-modals-large"));
43
- };
44
- return d(), window.addEventListener("resize", d), () => {
45
- s === "primary" && e.classList.remove("primary-right", "primary-left"), e.classList.remove("two-modals-50", "two-modals-large"), window.removeEventListener("resize", d);
46
- };
47
- }, [s, r, n, c, o]);
48
- const _ = () => s === "primary" ? r === "center" ? "primary-center" : `primary-${r}` : `secondary-${r === "left" ? "right" : "left"}`, $ = () => {
49
- const e = ["modal-overlay"];
50
- return s === "primary" ? e.push(`primary-${r}`) : e.push("secondary-overlay"), b && !l && e.push("show"), l && e.push("hide"), e.join(" ");
51
- }, x = () => {
52
- const e = ["modal-container", s, _()];
53
- return b && !l && e.push("show"), l && e.push("hide"), o && e.push("maximized"), r === "center" && e.push("centered"), e.join(" ");
54
- }, L = s === "primary" ? y || k : y, D = s === "primary" && n && c, W = () => {
55
- !L && s === "primary" && R && (i(!0), setTimeout(() => {
56
- p(), i(!1);
57
- }, 200));
58
- }, z = () => {
59
- const e = {};
60
- return s === "primary" && !o && v && (e["--modal-primary-width"] = `${v}%`), e;
61
- }, N = /* @__PURE__ */ a("div", { className: $(), onClick: W, children: /* @__PURE__ */ u(
62
- "div",
63
- {
64
- className: x(),
65
- style: z(),
66
- onClick: (e) => e.stopPropagation(),
67
- children: [
68
- /* @__PURE__ */ u("div", { className: "modal_header", children: [
69
- /* @__PURE__ */ a("span", { children: S }),
70
- /* @__PURE__ */ u("div", { style: { display: "flex", gap: 5 }, children: [
71
- j && h && /* @__PURE__ */ a(
72
- "button",
73
- {
74
- className: "max_button",
75
- onClick: h,
76
- type: "button",
77
- disabled: D,
78
- children: o ? /* @__PURE__ */ a(q, { size: 14, className: "icon-header" }) : /* @__PURE__ */ a(I, { size: 14, className: "icon-header" })
79
- }
80
- ),
81
- /* @__PURE__ */ a(
82
- "button",
83
- {
84
- className: "close_button",
85
- onClick: p,
86
- type: "button",
87
- disabled: L,
88
- children: "×"
89
- }
90
- )
91
- ] })
92
- ] }),
93
- /* @__PURE__ */ a("div", { className: "modal_body", children: E })
94
- ]
95
- }
96
- ) });
97
- return s === "secondary" && t.current ? O.createPortal(N, t.current) : N;
98
- };
99
- export {
100
- Q as EcoModal
101
- };