tycho-components 0.2.2-SNAPSHOT-2 → 0.2.2-SNAPSHOT-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.
- package/dist/Base/ErrorFound.d.ts +2 -0
- package/dist/Base/ErrorFound.js +16 -0
- package/dist/Base/NotFound.js +3 -6
- package/dist/configs/Localization.d.ts +6 -3
- package/dist/configs/localization/BaseTexts.d.ts +6 -3
- package/dist/configs/localization/BaseTexts.js +6 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import logo from './logo.png';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { useNavigate, useRouteError } from 'react-router-dom';
|
|
6
|
+
import './style.scss';
|
|
7
|
+
export default function ErrorFound() {
|
|
8
|
+
const navigate = useNavigate();
|
|
9
|
+
const { t } = useTranslation('base');
|
|
10
|
+
const error = useRouteError();
|
|
11
|
+
const [show, setShow] = useState(false);
|
|
12
|
+
const handleRedirect = () => {
|
|
13
|
+
navigate(`${import.meta.env.VITE_APP_PUBLIC_URL}`, { replace: true });
|
|
14
|
+
};
|
|
15
|
+
return (_jsxs("div", { className: "box-container", children: [_jsxs("div", { className: "box", children: [_jsx("img", { src: logo }), _jsx("div", { className: "title", children: t('label.error.found') }), _jsx("div", { className: "subtitle", onClick: handleRedirect, children: t('label.redirect') }), _jsx("div", { className: "divider", children: t('label.divider') }), _jsx("div", { className: "error-details", onClick: () => setShow((prevState) => !prevState), children: t('label.error.details') })] }), show && (_jsx("pre", { className: "error-stack", children: JSON.stringify(error, null, 2) }))] }));
|
|
16
|
+
}
|
package/dist/Base/NotFound.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import logo from './logo.png';
|
|
3
|
-
import { useState } from 'react';
|
|
4
2
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { useNavigate
|
|
3
|
+
import { useNavigate } from 'react-router-dom';
|
|
4
|
+
import logo from './logo.png';
|
|
6
5
|
import './style.scss';
|
|
7
6
|
export default function NotFound() {
|
|
8
7
|
const navigate = useNavigate();
|
|
9
8
|
const { t } = useTranslation('base');
|
|
10
|
-
const error = useRouteError();
|
|
11
|
-
const [show, setShow] = useState(false);
|
|
12
9
|
const handleRedirect = () => {
|
|
13
10
|
navigate(`${import.meta.env.VITE_APP_PUBLIC_URL}`, { replace: true });
|
|
14
11
|
};
|
|
15
|
-
return (
|
|
12
|
+
return (_jsx("div", { className: "box-container", children: _jsxs("div", { className: "box", children: [_jsx("img", { src: logo }), _jsx("div", { className: "title", children: t('notfound.label.disclaimer') }), _jsx("div", { className: "subtitle", onClick: handleRedirect, children: t('label.redirect') })] }) }));
|
|
16
13
|
}
|
|
@@ -9,7 +9,8 @@ export declare const commonResources: {
|
|
|
9
9
|
'unauthorized.label.disclaimer': string;
|
|
10
10
|
'unauthorized.label.redirect': string;
|
|
11
11
|
'notfound.label.disclaimer': string;
|
|
12
|
-
'
|
|
12
|
+
'label.redirect': string;
|
|
13
|
+
'label.error.found': string;
|
|
13
14
|
'label.error.details': string;
|
|
14
15
|
'label.divider': string;
|
|
15
16
|
};
|
|
@@ -187,8 +188,9 @@ export declare const commonResources: {
|
|
|
187
188
|
'unauthorized.label.disclaimer': string;
|
|
188
189
|
'unauthorized.label.redirect': string;
|
|
189
190
|
'notfound.label.disclaimer': string;
|
|
190
|
-
'
|
|
191
|
+
'label.redirect': string;
|
|
191
192
|
'label.error.details': string;
|
|
193
|
+
'label.error.found': string;
|
|
192
194
|
'label.divider': string;
|
|
193
195
|
};
|
|
194
196
|
comments: {
|
|
@@ -363,8 +365,9 @@ export declare const commonResources: {
|
|
|
363
365
|
'unauthorized.label.disclaimer': string;
|
|
364
366
|
'unauthorized.label.redirect': string;
|
|
365
367
|
'notfound.label.disclaimer': string;
|
|
366
|
-
'
|
|
368
|
+
'label.redirect': string;
|
|
367
369
|
'label.error.details': string;
|
|
370
|
+
'label.error.found': string;
|
|
368
371
|
'label.divider': string;
|
|
369
372
|
};
|
|
370
373
|
comments: {
|
|
@@ -8,7 +8,8 @@ export declare const BaseTexts: {
|
|
|
8
8
|
'unauthorized.label.disclaimer': string;
|
|
9
9
|
'unauthorized.label.redirect': string;
|
|
10
10
|
'notfound.label.disclaimer': string;
|
|
11
|
-
'
|
|
11
|
+
'label.redirect': string;
|
|
12
|
+
'label.error.found': string;
|
|
12
13
|
'label.error.details': string;
|
|
13
14
|
'label.divider': string;
|
|
14
15
|
};
|
|
@@ -21,8 +22,9 @@ export declare const BaseTexts: {
|
|
|
21
22
|
'unauthorized.label.disclaimer': string;
|
|
22
23
|
'unauthorized.label.redirect': string;
|
|
23
24
|
'notfound.label.disclaimer': string;
|
|
24
|
-
'
|
|
25
|
+
'label.redirect': string;
|
|
25
26
|
'label.error.details': string;
|
|
27
|
+
'label.error.found': string;
|
|
26
28
|
'label.divider': string;
|
|
27
29
|
};
|
|
28
30
|
it: {
|
|
@@ -34,8 +36,9 @@ export declare const BaseTexts: {
|
|
|
34
36
|
'unauthorized.label.disclaimer': string;
|
|
35
37
|
'unauthorized.label.redirect': string;
|
|
36
38
|
'notfound.label.disclaimer': string;
|
|
37
|
-
'
|
|
39
|
+
'label.redirect': string;
|
|
38
40
|
'label.error.details': string;
|
|
41
|
+
'label.error.found': string;
|
|
39
42
|
'label.divider': string;
|
|
40
43
|
};
|
|
41
44
|
};
|
|
@@ -8,7 +8,8 @@ export const BaseTexts = {
|
|
|
8
8
|
'unauthorized.label.disclaimer': 'You are not authorized to access this content.',
|
|
9
9
|
'unauthorized.label.redirect': 'Click here to be redirected to the login page',
|
|
10
10
|
'notfound.label.disclaimer': 'Ops, page not found.',
|
|
11
|
-
'
|
|
11
|
+
'label.redirect': 'Click here to be redirected to the login page',
|
|
12
|
+
'label.error.found': 'Ops, an error has occurred.',
|
|
12
13
|
'label.error.details': 'Click here for error details',
|
|
13
14
|
'label.divider': '-- or --',
|
|
14
15
|
},
|
|
@@ -21,8 +22,9 @@ export const BaseTexts = {
|
|
|
21
22
|
'unauthorized.label.disclaimer': 'Você não está autorizado a acessar este conteúdo.',
|
|
22
23
|
'unauthorized.label.redirect': 'Clique aqui para ser redirecionado para a página de login',
|
|
23
24
|
'notfound.label.disclaimer': 'Ops, página não encontrada.',
|
|
24
|
-
'
|
|
25
|
+
'label.redirect': 'Clique aqui para ser redirecionado para a página de login',
|
|
25
26
|
'label.error.details': 'Clique aqui para ver os detalhes do erro',
|
|
27
|
+
'label.error.found': 'Ops, ocorreu um erro.',
|
|
26
28
|
'label.divider': '-- ou --',
|
|
27
29
|
},
|
|
28
30
|
it: {
|
|
@@ -34,8 +36,9 @@ export const BaseTexts = {
|
|
|
34
36
|
'unauthorized.label.disclaimer': 'Non sei autorizzato a accedere a questo contenuto.',
|
|
35
37
|
'unauthorized.label.redirect': 'Clicca qui per essere reindirizzato alla pagina di accesso',
|
|
36
38
|
'notfound.label.disclaimer': 'Ops, pagina non trovata.',
|
|
37
|
-
'
|
|
39
|
+
'label.redirect': 'Clicca qui per essere reindirizzato alla pagina di accesso',
|
|
38
40
|
'label.error.details': "Clicca qui per i dettagli dell'errore",
|
|
41
|
+
'label.error.found': 'Ops, si è verificato un errore.',
|
|
39
42
|
'label.divider': '-- o --',
|
|
40
43
|
},
|
|
41
44
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export { default as VirtualKeyboard } from './VirtualKeyboard';
|
|
|
61
61
|
export { KeyboardCustomLayouts } from './VirtualKeyboard/KeyboardCustomLayout';
|
|
62
62
|
export type { KeyboardLayout } from './VirtualKeyboard/KeyboardCustomLayout';
|
|
63
63
|
export { default as CytoscapeTreeConverter } from './TreeView/cytoscape/CytoscapeTreeConverter';
|
|
64
|
+
export { default as ErrorFound } from './Base/ErrorFound';
|
|
64
65
|
export { default as Login } from './Base/Login';
|
|
65
66
|
export { default as Logout } from './Base/Logout';
|
|
66
67
|
export { default as Unauthorized } from './Base/Unauthorized';
|
package/dist/index.js
CHANGED
|
@@ -46,6 +46,7 @@ export { default as SyntreesCytoscape } from './TreeView/cytoscape/SyntreesCytos
|
|
|
46
46
|
export { default as VirtualKeyboard } from './VirtualKeyboard';
|
|
47
47
|
export { KeyboardCustomLayouts } from './VirtualKeyboard/KeyboardCustomLayout';
|
|
48
48
|
export { default as CytoscapeTreeConverter } from './TreeView/cytoscape/CytoscapeTreeConverter';
|
|
49
|
+
export { default as ErrorFound } from './Base/ErrorFound';
|
|
49
50
|
export { default as Login } from './Base/Login';
|
|
50
51
|
export { default as Logout } from './Base/Logout';
|
|
51
52
|
export { default as Unauthorized } from './Base/Unauthorized';
|