@zauru-sdk/components 2.0.146 → 2.0.148

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.148](https://github.com/intuitiva/zauru-typescript-sdk/compare/v2.0.147...v2.0.148) (2025-02-17)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/components
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.0.147](https://github.com/intuitiva/zauru-typescript-sdk/compare/v2.0.146...v2.0.147) (2025-02-12)
15
+
16
+ **Note:** Version bump only for package @zauru-sdk/components
17
+
18
+
19
+
20
+
21
+
6
22
  ## [2.0.146](https://github.com/intuitiva/zauru-typescript-sdk/compare/v2.0.145...v2.0.146) (2025-02-12)
7
23
 
8
24
  **Note:** Version bump only for package @zauru-sdk/components
@@ -6,10 +6,12 @@ export const ErrorLayout = ({ from, isRootLevel = true, error: parentError, }) =
6
6
  const error = useRouteError();
7
7
  const [showDetails, setShowDetails] = useState(!!parentError);
8
8
  const baseError = (_jsxs("div", { className: "min-h-screen flex flex-col items-center justify-center p-4", children: [_jsx("img", { src: "/logo.png", alt: "Zauru Logo", className: "mb-8 h-20" }), _jsx("h1", { className: "text-5xl font-extrabold text-red-500 mb-6", children: "\u00A1Ups!" }), _jsxs("div", { className: "w-full max-w-2xl flex flex-col items-center", children: [_jsx("p", { className: "text-2xl text-gray-300 mb-8 text-center", children: isRouteErrorResponse(error)
9
- ? `Error ${error.status}: ${error.statusText}`
9
+ ? `Error en request: ${error.status}: ${error.statusText} - PATH: ${error.data.path} - MESSAGE: ${error.data.message}`
10
10
  : error instanceof Error
11
- ? error.message
12
- : "Ha ocurrido un error inesperado" }), from && (_jsxs("p", { className: "text-lg text-gray-400 mb-4 text-center", children: ["Error lanzado desde: ", from] })), parentError && (_jsxs("div", { className: "mb-4 text-center", children: [_jsx("button", { onClick: () => setShowDetails(!showDetails), className: "text-blue-400 hover:text-blue-300 transition duration-300", children: showDetails ? "Ocultar detalles" : "Ver más detalles" }), showDetails && (_jsx("p", { className: "mt-2 text-gray-400 text-sm", children: parentError instanceof Error
11
+ ? `Error: ${error.message} - NAME: ${error.name} - STACK: ${error.stack?.slice(0, 100)} - CAUSE: ${error.cause}`
12
+ : `Ha ocurrido un error inesperado: ${error}` }), from && (_jsxs("p", { className: "text-lg text-gray-400 mb-4 text-center", children: [isRootLevel
13
+ ? "(*) Error lanzado desde: "
14
+ : "Error lanzado desde: ", from] })), parentError && (_jsxs("div", { className: "mb-4 text-center", children: [_jsx("button", { onClick: () => setShowDetails(!showDetails), className: "text-blue-400 hover:text-blue-300 transition duration-300", children: showDetails ? "Ocultar detalles" : "Ver más detalles" }), showDetails && (_jsx("p", { className: "mt-2 text-gray-400 text-sm", children: parentError instanceof Error
13
15
  ? parentError.message
14
16
  : String(parentError) }))] }))] }), _jsx(Link, { to: "/", className: "bg-blue-600 text-white py-3 px-8 rounded-full text-lg font-semibold hover:bg-blue-700 transition duration-300 transform hover:scale-105", children: "Regresar al inicio" }), _jsx("div", { className: "mt-12 text-gray-500 text-center", children: _jsx("p", { children: "Si el problema persiste, por favor contacta a soporte." }) })] }));
15
17
  if (!isRootLevel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/components",
3
- "version": "2.0.146",
3
+ "version": "2.0.148",
4
4
  "description": "Componentes reutilizables en las WebApps de Zauru.",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -37,7 +37,7 @@
37
37
  "@zauru-sdk/hooks": "^2.0.123",
38
38
  "@zauru-sdk/icons": "^2.0.99",
39
39
  "@zauru-sdk/types": "^2.0.109",
40
- "@zauru-sdk/utils": "^2.0.146",
40
+ "@zauru-sdk/utils": "^2.0.148",
41
41
  "framer-motion": "^11.7.0",
42
42
  "jsonwebtoken": "^9.0.2",
43
43
  "react": "^18.2.0",
@@ -49,5 +49,5 @@
49
49
  "styled-components": "^5.3.5",
50
50
  "zod": "^3.23.8"
51
51
  },
52
- "gitHead": "1c5bd079b50eecb99c9f29029fa7f9376c082d0b"
52
+ "gitHead": "b2598726a30e877d4af78777934c69045b7a81a8"
53
53
  }
@@ -28,14 +28,21 @@ export const ErrorLayout = ({
28
28
  <div className="w-full max-w-2xl flex flex-col items-center">
29
29
  <p className="text-2xl text-gray-300 mb-8 text-center">
30
30
  {isRouteErrorResponse(error)
31
- ? `Error ${error.status}: ${error.statusText}`
31
+ ? `Error en request: ${error.status}: ${error.statusText} - PATH: ${error.data.path} - MESSAGE: ${error.data.message}`
32
32
  : error instanceof Error
33
- ? error.message
34
- : "Ha ocurrido un error inesperado"}
33
+ ? `Error: ${error.message} - NAME: ${
34
+ error.name
35
+ } - STACK: ${error.stack?.slice(0, 100)} - CAUSE: ${
36
+ error.cause
37
+ }`
38
+ : `Ha ocurrido un error inesperado: ${error}`}
35
39
  </p>
36
40
  {from && (
37
41
  <p className="text-lg text-gray-400 mb-4 text-center">
38
- Error lanzado desde: {from}
42
+ {isRootLevel
43
+ ? "(*) Error lanzado desde: "
44
+ : "Error lanzado desde: "}
45
+ {from}
39
46
  </p>
40
47
  )}
41
48
  {parentError && (