tycho-components 0.23.6 → 0.23.8
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.
|
@@ -12,7 +12,7 @@ export default function HeaderUser({ navigateLogout, navigateNotLogged, }) {
|
|
|
12
12
|
setOpen(false);
|
|
13
13
|
window.open(import.meta.env.VITE_APP_RESERVED_URL, '_blank');
|
|
14
14
|
};
|
|
15
|
-
return (_jsxs("div", { className: "profile-container", children: [isLogged() ? (_jsx("div", { onClick: () => setOpen(!open), children: _jsx(Avatar, { size: "small", src: getLogged()?.picture, title: getLogged()?.name || getLogged()?.sub }) })) : (_jsx(Button, { text: t('button.sign.in'), size: "small", onClick: navigateNotLogged })), open && isLogged() && (_jsxs("div", { className: "ds-dropdown-list", children: [_jsx("div", { className: "ds-dropdown-itemlist", children: _jsx("span", { className: "label", children: `${t('profile.label.hello')} ${getLogged()?.name || getLogged()?.sub}` }) }), _jsxs("div", { className: "ds-dropdown-itemlist d-none", children: [_jsx(Icon, { name: "colors", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.theme') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", onClick: handleProfile, children: [_jsx(Icon, { name: "person", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.home') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", children: [_jsx(Icon, { name: "live_help", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.help') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", onClick: () => {
|
|
15
|
+
return (_jsxs("div", { className: "profile-container", "data-tour": "header-user", children: [isLogged() ? (_jsx("div", { onClick: () => setOpen(!open), children: _jsx(Avatar, { size: "small", src: getLogged()?.picture, title: getLogged()?.name || getLogged()?.sub }) })) : (_jsx(Button, { text: t('button.sign.in'), size: "small", onClick: navigateNotLogged })), open && isLogged() && (_jsxs("div", { className: "ds-dropdown-list", children: [_jsx("div", { className: "ds-dropdown-itemlist", children: _jsx("span", { className: "label", children: `${t('profile.label.hello')} ${getLogged()?.name || getLogged()?.sub}` }) }), _jsxs("div", { className: "ds-dropdown-itemlist d-none", children: [_jsx(Icon, { name: "colors", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.theme') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", onClick: handleProfile, children: [_jsx(Icon, { name: "person", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.home') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", children: [_jsx(Icon, { name: "live_help", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.help') })] }), _jsxs("div", { className: "ds-dropdown-itemlist", onClick: () => {
|
|
16
16
|
setOpen(false);
|
|
17
17
|
navigateLogout && navigateLogout();
|
|
18
18
|
}, children: [_jsx(Icon, { name: "logout", size: "x-small" }), _jsx("span", { className: "label", children: t('profile.label.logout') })] })] }))] }));
|
|
@@ -6,5 +6,5 @@ import HelpModal from './HelpModal';
|
|
|
6
6
|
export default function HelpButton({ helpActions, mobile }) {
|
|
7
7
|
const { t } = useTranslation('header');
|
|
8
8
|
const [open, setOpen] = useState(false);
|
|
9
|
-
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { name: "live_help", size: "large", title: t('tooltip.tutorials'), onClick: () => setOpen(true), mode: mobile ? 'outlined' : 'filled' }), open && (_jsx(HelpModal, { onClose: () => setOpen(false), helpActions: helpActions }))] }));
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, { name: "live_help", size: "large", title: t('tooltip.tutorials'), onClick: () => setOpen(true), mode: mobile ? 'outlined' : 'filled', "data-tour": "help-button" }), open && (_jsx(HelpModal, { onClose: () => setOpen(false), helpActions: helpActions }))] }));
|
|
10
10
|
}
|
|
@@ -48,5 +48,5 @@ export default function LanguageSelector({ className, color = 'primary', size =
|
|
|
48
48
|
}, []);
|
|
49
49
|
if (!language)
|
|
50
50
|
return null;
|
|
51
|
-
return (_jsx("div", { className: getClassNames, children: _jsxs("div", { className: "ds-dropdown-container", children: [_jsxs("div", { className: getClassNamesDropdown, onClick: () => setOpen(!open), children: [_jsx("span", { className: "label", children: showFullLanguageLabel ? language.name : language.value }), _jsx(Icon, { name: "arrow_drop_down", className: "icon-arrow" })] }), open && (_jsx("div", { className: "ds-dropdown-list", children: AvailableLanguages.map((item, idx) => (_jsxs("div", { className: "ds-dropdown-itemlist", onClick: () => changeLanguageHandler(item), children: [_jsx("span", { className: "label", children: item.name }), _jsx("span", { className: "sublabel", children: item.value }), item.value === language.value && (_jsx(Icon, { name: "check", size: "x-small", className: "icon-check" }))] }, idx.valueOf()))) }))] }) }));
|
|
51
|
+
return (_jsx("div", { className: getClassNames, "data-tour": "language-selector", children: _jsxs("div", { className: "ds-dropdown-container", children: [_jsxs("div", { className: getClassNamesDropdown, onClick: () => setOpen(!open), children: [_jsx("span", { className: "label", children: showFullLanguageLabel ? language.name : language.value }), _jsx(Icon, { name: "arrow_drop_down", className: "icon-arrow" })] }), open && (_jsx("div", { className: "ds-dropdown-list", children: AvailableLanguages.map((item, idx) => (_jsxs("div", { className: "ds-dropdown-itemlist", onClick: () => changeLanguageHandler(item), children: [_jsx("span", { className: "label", children: item.name }), _jsx("span", { className: "sublabel", children: item.value }), item.value === language.value && (_jsx(Icon, { name: "check", size: "x-small", className: "icon-check" }))] }, idx.valueOf()))) }))] }) }));
|
|
52
52
|
}
|