@topconsultnpm/sdkui-react 6.22.0-dev2.44 → 6.22.0-dev2.45
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,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useRef, useMemo } from 'react';
|
|
3
3
|
import six from '../../assets/six.png';
|
|
4
|
-
import { getAvatarColor, IconCloseOutline, IconCopy, openApps, SDKUI_Localizator } from '../../helper';
|
|
4
|
+
import { getAvatarColor, IconCloseOutline, IconCopy, IconOpenInNew, openApps, SDKUI_Localizator, WHATS_NEWS_LINK_URL } from '../../helper';
|
|
5
5
|
import styled, { keyframes } from 'styled-components';
|
|
6
6
|
import { SDK_Globals, AuthenticationModes, AppModules, UserLevels, CultureIDs } from '@topconsultnpm/sdk-ts';
|
|
7
7
|
import { TMColors } from '../../utils/theme';
|
|
@@ -10,6 +10,7 @@ import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
|
|
|
10
10
|
import { TMAboutApp } from './TMAboutApp';
|
|
11
11
|
import ShowAlert from '../base/TMAlert';
|
|
12
12
|
import TMResizableMenu from '../base/TMResizableMenu';
|
|
13
|
+
import TMTooltip from '../base/TMTooltip';
|
|
13
14
|
import it from '../../assets/italy.svg';
|
|
14
15
|
import de from '../../assets/german.svg';
|
|
15
16
|
import fr from '../../assets/france.svg';
|
|
@@ -253,10 +254,10 @@ const TMHeader = ({ customButtons = _jsx(_Fragment, {}), onMenusOpen, showSettin
|
|
|
253
254
|
e.preventDefault();
|
|
254
255
|
setMenuStatus(prev => !prev);
|
|
255
256
|
}, children: _jsx(UserAvatar, { "$bgColor": avatarColor, children: userInitials }) }), menuStatus &&
|
|
256
|
-
_jsx(TMResizableMenu, { ref: menuRef, isVisible: menuStatus, top: 60, right: 10, resizable: false, maxWidth: 300, minWidth: 300, maxHeight:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
_jsx(TMResizableMenu, { ref: menuRef, isVisible: menuStatus, top: 60, right: 10, resizable: false, maxWidth: 300, minWidth: 300, maxHeight: 188, minHeight: 188, padding: 0, children: _jsxs(MenuContainer, { children: [_jsxs(UserProfileSection, { children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 12, height: 'max-content', flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 12, height: 'max-content' }, children: [_jsx(AvatarContainer, { children: _jsx(UserAvatarLarge, { "$bgColor": avatarColor, children: userInitials }) }), _jsxs(UserInfo, { children: [_jsxs(UserNameContainer, { children: [_jsx(UserName, { children: userName }), _jsx(CultureFlag, { src: cultureFlag, alt: cultureName, title: cultureName })] }), domain && _jsx(SessionInfo, { style: { padding: 0, margin: 0 }, children: `(${domain})` })] })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start', justifyContent: 'center', gap: 5, flex: 1, minWidth: 0 }, children: [_jsx(SessionInfo, { children: endpoint }), _jsx(SessionInfo, { children: archiveId + ' (' + archiveDesc + ')' })] }), _jsxs(HeaderMenuActions, { children: [_jsx(TMTooltip, { content: SDKUI_Localizator.CopyUserInfo, children: _jsx(HeaderMenuActionIcon, { "$color": '#605e5c', onClick: (e) => {
|
|
258
|
+
e.stopPropagation();
|
|
259
|
+
copyUserInfoToClipboard(userName, cultureId, archiveId, archiveDesc, endpoint, domain);
|
|
260
|
+
}, children: _jsx(IconCopy, { fontSize: 14 }) }) }), _jsx(TMTooltip, { content: SDKUI_Localizator.ShowReleaseNotesInfo, children: _jsx(HeaderMenuActionIcon, { as: 'a', "$color": TMColors.primary, href: WHATS_NEWS_LINK_URL, target: '_blank', rel: 'noopener noreferrer', onClick: (e) => e.stopPropagation(), children: _jsx(IconOpenInNew, { fontSize: 14 }) }) })] })] })] }), _jsx(LogoutButton, { onClick: () => {
|
|
260
261
|
setMenuStatus(false);
|
|
261
262
|
onLogout && onLogout();
|
|
262
263
|
}, children: _jsx(LogoutText, { children: SDKUI_Localizator.Logout }) })] }), _jsxs(BottomActionsContainer, { children: [isTopMediaAuth && (_jsx(BottomActionButton, { onClick: () => {
|
|
@@ -468,8 +469,9 @@ const MenuContainer = styled.div `
|
|
|
468
469
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
|
|
469
470
|
`;
|
|
470
471
|
const UserProfileSection = styled.div `
|
|
472
|
+
position: relative;
|
|
471
473
|
display: flex;
|
|
472
|
-
padding: 20px;
|
|
474
|
+
padding: 16px 20px;
|
|
473
475
|
background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
|
|
474
476
|
border-bottom: 1px solid #e1e5e9;
|
|
475
477
|
gap: 12px;
|
|
@@ -515,7 +517,7 @@ const CultureFlag = styled.img `
|
|
|
515
517
|
`;
|
|
516
518
|
const LogoutButton = styled.div `
|
|
517
519
|
position: absolute;
|
|
518
|
-
top:
|
|
520
|
+
top: 16px;
|
|
519
521
|
right: 20px;
|
|
520
522
|
cursor: pointer;
|
|
521
523
|
transition: all 0.2s ease;
|
|
@@ -546,29 +548,37 @@ const AvatarContainer = styled.div `
|
|
|
546
548
|
position: relative;
|
|
547
549
|
flex-shrink: 0;
|
|
548
550
|
`;
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
551
|
+
const HeaderMenuActions = styled.div `
|
|
552
|
+
display: flex;
|
|
553
|
+
flex-direction: column;
|
|
554
|
+
gap: 6px;
|
|
555
|
+
flex-shrink: 0;
|
|
556
|
+
`;
|
|
557
|
+
const HeaderMenuActionIcon = styled.div `
|
|
558
|
+
width: 22px;
|
|
559
|
+
height: 22px;
|
|
555
560
|
background: white;
|
|
556
|
-
border: 1px solid
|
|
561
|
+
border: 1px solid ${props => props.$color}55;
|
|
557
562
|
border-radius: 50%;
|
|
558
563
|
display: flex;
|
|
559
564
|
align-items: center;
|
|
560
565
|
justify-content: center;
|
|
561
566
|
cursor: pointer;
|
|
562
|
-
color: #605e5c;
|
|
563
567
|
transition: all 0.2s ease;
|
|
564
568
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
565
|
-
|
|
566
|
-
opacity: 0.6;
|
|
569
|
+
text-decoration: none;
|
|
567
570
|
|
|
568
|
-
|
|
569
|
-
|
|
571
|
+
/* "&&" alza la specificita': un eventuale "a, a:visited { color: inherit }"
|
|
572
|
+
dell'app ospite vincerebbe sulla singola classe di styled-components */
|
|
573
|
+
&&,
|
|
574
|
+
&&:visited {
|
|
575
|
+
color: ${props => props.$color};
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
&&:hover {
|
|
579
|
+
background: ${props => props.$color};
|
|
580
|
+
border-color: ${props => props.$color};
|
|
570
581
|
color: white;
|
|
571
|
-
opacity: 1;
|
|
572
582
|
}
|
|
573
583
|
|
|
574
584
|
&:active {
|
|
@@ -808,6 +808,7 @@ export declare class SDKUI_Localizator {
|
|
|
808
808
|
static get ShowLeftPanel(): "Linkes Panel anzeigen" | "Show left panel" | "Mostrar panel izquierdo" | "Afficher le panneau de gauche" | "Mostrar painel esquerdo" | "Mostra il pannello sinistro";
|
|
809
809
|
static get ShowMasterInfo(): string;
|
|
810
810
|
static get ShowPartialResults(): string;
|
|
811
|
+
static get ShowReleaseNotesInfo(): string;
|
|
811
812
|
static get ShowSearch(): "Suche anzeigen" | "Show search" | "Mostrar búsqueda" | "Afficher la recherche" | "Mostrar pesquisa" | "Mostra ricerca";
|
|
812
813
|
static get ShowSharedDocuments(): "Gemeinsame Dokumente anzeigen" | "Show shared documents" | "Mostrar documentos compartidos" | "Afficher les documents partagés" | "Mostrar documentos compartilhados" | "Mostra documenti condivisi";
|
|
813
814
|
static get ShowColumnSeparatingLines(): string;
|
|
@@ -8060,6 +8060,16 @@ export class SDKUI_Localizator {
|
|
|
8060
8060
|
default: return "Mostra risultati parziali";
|
|
8061
8061
|
}
|
|
8062
8062
|
}
|
|
8063
|
+
static get ShowReleaseNotesInfo() {
|
|
8064
|
+
switch (this._cultureID) {
|
|
8065
|
+
case CultureIDs.De_DE: return "Informationen zu den Versionshinweisen anzeigen";
|
|
8066
|
+
case CultureIDs.En_US: return "Show release notes information";
|
|
8067
|
+
case CultureIDs.Es_ES: return "Mostrar información sobre las notas de la versión";
|
|
8068
|
+
case CultureIDs.Fr_FR: return "Afficher les informations sur les notes de version";
|
|
8069
|
+
case CultureIDs.Pt_PT: return "Mostrar informações sobre as notas de versão";
|
|
8070
|
+
default: return "Mostra informazioni sulle note di rilascio";
|
|
8071
|
+
}
|
|
8072
|
+
}
|
|
8063
8073
|
static get ShowSearch() {
|
|
8064
8074
|
switch (this._cultureID) {
|
|
8065
8075
|
case CultureIDs.De_DE: return "Suche anzeigen";
|