@topconsultnpm/sdkui-react-beta 6.13.93 → 6.13.94

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.
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ type TMResizableMenuProps = {
3
+ isVisible: boolean;
4
+ top?: number;
5
+ left?: number;
6
+ bottom?: number;
7
+ right?: number;
8
+ maxWidth?: number;
9
+ maxHeight?: number;
10
+ minWidth?: number;
11
+ minHeight?: number;
12
+ children?: React.ReactNode;
13
+ resizable?: boolean;
14
+ ignoreRefs?: React.RefObject<HTMLElement>[];
15
+ onClose?: () => void;
16
+ onResizeing?: (isResizing: boolean) => void;
17
+ };
18
+ export declare const TMResizableMenu: React.ForwardRefExoticComponent<TMResizableMenuProps & React.RefAttributes<HTMLDivElement>>;
19
+ export default TMResizableMenu;
@@ -0,0 +1,99 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState, useRef, useEffect, useImperativeHandle, forwardRef } from 'react';
3
+ import styled from 'styled-components';
4
+ import { createPortal } from 'react-dom';
5
+ const DEFAULT_WIDTH = 550;
6
+ const DEFAULT_HEIGHT = window.innerHeight - 150;
7
+ export const TMResizableMenu = forwardRef(({ isVisible, onClose, top, left, bottom, right, maxWidth, maxHeight, children, minHeight, minWidth, resizable = true, onResizeing, ignoreRefs = [], }, ref) => {
8
+ const [width, setWidth] = useState(minWidth ?? DEFAULT_WIDTH);
9
+ const [height, setHeight] = useState(minHeight ?? DEFAULT_HEIGHT);
10
+ const [isResizing, setIsResizing] = useState(false);
11
+ const isResizingRef = useRef(false);
12
+ const menuRef = useRef(null);
13
+ // Find or create a portal root
14
+ const portalRoot = document.getElementById('portal-root') || (() => {
15
+ const el = document.createElement('div');
16
+ el.id = 'portal-root';
17
+ document.body.appendChild(el);
18
+ return el;
19
+ })();
20
+ useImperativeHandle(ref, () => menuRef.current);
21
+ useEffect(() => {
22
+ const handleMouseMove = (e) => {
23
+ if (!isResizingRef.current || !menuRef.current)
24
+ return;
25
+ const rect = menuRef.current.getBoundingClientRect();
26
+ const newWidth = Math.min(e.clientX - rect.left, maxWidth ?? Infinity);
27
+ const newHeight = Math.min(e.clientY - rect.top, maxHeight ?? Infinity);
28
+ setWidth(Math.max(150, newWidth));
29
+ setHeight(Math.max(150, newHeight));
30
+ };
31
+ const handleMouseUp = () => {
32
+ isResizingRef.current = false;
33
+ setIsResizing(false);
34
+ onResizeing?.(false);
35
+ document.body.style.pointerEvents = 'auto';
36
+ };
37
+ document.addEventListener('mousemove', handleMouseMove);
38
+ document.addEventListener('mouseup', handleMouseUp);
39
+ return () => {
40
+ document.removeEventListener('mousemove', handleMouseMove);
41
+ document.removeEventListener('mouseup', handleMouseUp);
42
+ };
43
+ }, [maxWidth, maxHeight]);
44
+ useEffect(() => {
45
+ const handleClickOutside = (e) => {
46
+ if (isResizing)
47
+ return;
48
+ const insideMenu = menuRef.current && menuRef.current.contains(e.target); //nosonar
49
+ const insideIgnored = ignoreRefs?.some(ref => ref.current && ref.current.contains(e.target)); //nosonar
50
+ if (!insideMenu && !insideIgnored) {
51
+ onClose?.();
52
+ }
53
+ };
54
+ document.addEventListener('mousedown', handleClickOutside);
55
+ return () => {
56
+ document.removeEventListener('mousedown', handleClickOutside);
57
+ };
58
+ }, [onClose]);
59
+ const menuContent = (_jsxs(_Fragment, { children: [_jsxs(MenuContainer, { ref: menuRef, "$display": isVisible ? 'block' : 'none', style: { top, left, bottom, right, width, height, position: 'fixed' }, "$maxWidth": maxWidth, "$maxHeight": maxHeight, "$minHeight": minHeight, "$minWidth": minWidth, children: [children, resizable && _jsx(ResizeHandle, { onMouseDown: (e) => {
60
+ e.preventDefault();
61
+ document.body.style.pointerEvents = 'none';
62
+ isResizingRef.current = true;
63
+ setIsResizing(true);
64
+ onResizeing?.(true);
65
+ } })] }), isResizing && _jsx(ResizeOverlay, {})] }));
66
+ return createPortal(menuContent, portalRoot);
67
+ });
68
+ export default TMResizableMenu;
69
+ const MenuContainer = styled.div `
70
+ position: absolute;
71
+ display: ${({ $display }) => $display};
72
+ background-color: white;
73
+ border: 1px solid #ccc;
74
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
75
+ overflow: auto;
76
+ max-width: ${({ $maxWidth }) => ($maxWidth ? `${$maxWidth}px` : 'none')};
77
+ max-height: ${({ $maxHeight }) => ($maxHeight ? `${$maxHeight}px` : 'none')};
78
+ border-radius: 6px;
79
+ padding: 16px;
80
+ z-index: 1532;
81
+ min-width: ${({ $minWidth }) => `${$minWidth ?? 350}px`};
82
+ min-height: ${({ $minHeight }) => `${$minHeight ?? 500}px`};
83
+ `;
84
+ const ResizeHandle = styled.div `
85
+ position: absolute;
86
+ width: 16px;
87
+ height: 16px;
88
+ right: 0;
89
+ bottom: 0;
90
+ cursor: se-resize;
91
+ background: linear-gradient(135deg, transparent 40%, #ccc 40%, #ccc 60%, transparent 60%);
92
+ `;
93
+ const ResizeOverlay = styled.div `
94
+ position: fixed;
95
+ inset: 0;
96
+ z-index: 1531;
97
+ pointer-events: all;
98
+ cursor: se-resize;
99
+ `;
@@ -13,9 +13,10 @@ interface ITMHeader {
13
13
  clearSearchJobValue?: boolean;
14
14
  clearSearchQEValue?: boolean;
15
15
  searchContext?: TMSearchContext;
16
+ settingsMenuContext?: React.ReactNode;
17
+ onMenusOpen?: VoidFunction;
16
18
  onChangePassword?: VoidFunction;
17
19
  onLogout?: VoidFunction;
18
- settingsMenuContext?: React.ReactNode;
19
20
  onSeacrhJobslistValueChange?: (e: string) => void;
20
21
  onSeacrhJobsValueChange?: (e: string) => void;
21
22
  onSeacrhProcessValueChange?: (e: string) => void;
@@ -1,13 +1,15 @@
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 { IconBxInfo, IconCloseOutline, IconLogout, IconPassword, IconSearch, IconSettings, IconUserProfile, SDKUI_Localizator } from '../../helper';
4
+ import { IconBxInfo, IconCloseOutline, IconLogout, IconPassword, IconSearch, IconSettings, IconUserProfile, openApps, SDKUI_Localizator } from '../../helper';
5
5
  import styled from 'styled-components';
6
- import { SDK_Globals, AuthenticationModes, AppModules } from '@topconsultnpm/sdk-ts-beta';
6
+ import { SDK_Globals, AuthenticationModes, AppModules, UserLevels } from '@topconsultnpm/sdk-ts-beta';
7
7
  import { FontSize, TMColors } from '../../utils/theme';
8
8
  import { ButtonNames, TMMessageBoxManager } from '../base/TMPopUp';
9
9
  import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
10
10
  import { TMAboutApp } from './TMAboutApp';
11
+ import ShowAlert from '../base/TMAlert';
12
+ import TMResizableMenu from '../base/TMResizableMenu';
11
13
  export var TMSearchContext;
12
14
  (function (TMSearchContext) {
13
15
  TMSearchContext["JOBS"] = "jobs";
@@ -26,10 +28,12 @@ const StyledSearchBar = styled.input ` background: #FFFFFF 0% 0% no-repeat paddi
26
28
  const StyledHeaderAppText = styled.h2 ` text-align: left; letter-spacing: 0px; color: ${TMColors.primary}; opacity: 1; `;
27
29
  export const TMSearchBar = ({ searchValue, onSearchValueChanged, maxWidth, marginLeft }) => {
28
30
  const deviceType = useDeviceType();
29
- return (_jsxs(StyledSearchBarContainer, { style: { maxWidth: maxWidth ? maxWidth : deviceType === DeviceType.MOBILE ? '65%' : '650px', marginLeft: marginLeft ? marginLeft : deviceType === DeviceType.MOBILE ? '10px' : '20px' }, "$isMobile": deviceType === DeviceType.MOBILE, children: [_jsx(IconSearch, { fontSize: 12, color: '#00000060', style: { position: 'absolute', width: '20px', height: '20px', left: '5px', top: '5px', zIndex: 1 } }), _jsx(StyledSearchBar, { placeholder: SDKUI_Localizator.Search + '...', type: "text", value: searchValue, onChange: (e) => onSearchValueChanged(e.target.value) }), searchValue.length > 0 && _jsx(IconCloseOutline, { onClick: () => onSearchValueChanged(''), color: '#00000060', style: { cursor: 'pointer', position: 'absolute', width: '20px', height: '20px', right: '5px', top: '5px', zIndex: 1 } })] }));
31
+ return (_jsxs(StyledSearchBarContainer, { style: { maxWidth: maxWidth ? maxWidth : deviceType === DeviceType.MOBILE ? '65%' : '650px', marginLeft: marginLeft ? marginLeft : deviceType === DeviceType.MOBILE ? '10px' : '20px' }, "$isMobile": deviceType === DeviceType.MOBILE, children: [" ", _jsx(IconSearch, { fontSize: 12, color: '#00000060', style: { position: 'absolute', width: '20px', height: '20px', left: '5px', top: '5px', zIndex: 1 } }), _jsx(StyledSearchBar, { placeholder: SDKUI_Localizator.Search + '...', type: "text", value: searchValue, onChange: (e) => onSearchValueChanged(e.target.value) }), searchValue.length > 0 && _jsx(IconCloseOutline, { onClick: () => onSearchValueChanged(''), color: '#00000060', style: { cursor: 'pointer', position: 'absolute', width: '20px', height: '20px', right: '5px', top: '5px', zIndex: 1 } })] }));
30
32
  };
31
- const TMHeader = ({ showSettingsMenu = true, showSearchBar = true, clearSearchJobValue, clearSearchQEValue, searchContext = TMSearchContext.JOBS, onChangePassword, onLogout, settingsMenuContext, onSeacrhJobsValueChange, onSeacrhJobslistValueChange, onSeacrhProcessMonitorValueChange, onSeacrhProcessValueChange, onSeacrhPlatformValueChange, onSeacrhQEValueChange, onSettingsClick }) => {
33
+ const TMHeader = ({ onMenusOpen, showSettingsMenu = true, showSearchBar = true, clearSearchJobValue, clearSearchQEValue, searchContext = TMSearchContext.JOBS, onChangePassword, onLogout, settingsMenuContext, onSeacrhJobsValueChange, onSeacrhJobslistValueChange, onSeacrhProcessMonitorValueChange, onSeacrhProcessValueChange, onSeacrhPlatformValueChange, onSeacrhQEValueChange, onSettingsClick }) => {
34
+ const [appRoutes, setAppRoutes] = useState();
32
35
  const [menuStatus, setMenuStatus] = useState(false);
36
+ const [showAppMenu, setShowAppMenu] = useState(false);
33
37
  const [searchJobListValue, setSearchJobListValue] = useState('');
34
38
  const [searchJobsValue, setSearchJobsValue] = useState('');
35
39
  const [searchProcessesValue, setSearchProcessesValue] = useState('');
@@ -38,6 +42,8 @@ const TMHeader = ({ showSettingsMenu = true, showSearchBar = true, clearSearchJo
38
42
  const [searchQEValue, setSearchQEValue] = useState('');
39
43
  const menuRef = useRef(null);
40
44
  const userIcon = useRef(null);
45
+ const logoRef = useRef(null);
46
+ const appMenuRef = useRef(null);
41
47
  const headerAppName = useMemo(() => {
42
48
  switch (SDK_Globals.appModule) {
43
49
  case AppModules.ORCHESTRATOR: return AppModules.ORCHESTRATOR;
@@ -45,6 +51,7 @@ const TMHeader = ({ showSettingsMenu = true, showSearchBar = true, clearSearchJo
45
51
  default: return AppModules.SURFER;
46
52
  }
47
53
  }, [SDK_Globals.appModule]);
54
+ const tmSession = SDK_Globals.tmSession;
48
55
  const deviceType = useDeviceType();
49
56
  let isMobile = deviceType == DeviceType.MOBILE;
50
57
  useEffect(() => { clearSearchJobValue && setSearchJobsValue(''); }, [clearSearchJobValue]);
@@ -71,6 +78,7 @@ const TMHeader = ({ showSettingsMenu = true, showSearchBar = true, clearSearchJo
71
78
  break;
72
79
  }
73
80
  }, [searchContext, searchJobListValue, searchJobsValue, searchProcessMonitorValue, searchProcessesValue, searchPlatformValue, searchQEValue]);
81
+ const openMenuTimer = useRef(null);
74
82
  useEffect(() => {
75
83
  function handleClickOutside(event) {
76
84
  if (menuRef.current && !menuRef.current.contains(event.target) && !userIcon.current?.contains(event.target)) {
@@ -82,6 +90,108 @@ const TMHeader = ({ showSettingsMenu = true, showSearchBar = true, clearSearchJo
82
90
  document.addEventListener('click', handleClickOutside);
83
91
  return () => document.removeEventListener('click', handleClickOutside);
84
92
  }, [menuRef, userIcon, menuStatus]);
85
- return (_jsxs(StyledHeaderContainer, { "$appName": SDK_Globals.appModule, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', width: '100%' }, children: [_jsxs("div", { style: { height: '50px', display: 'flex', alignItems: 'center', gap: 10, justifyContent: 'center' }, children: [_jsx("img", { src: six, height: isMobile ? 35 : 40, alt: "" }), !isMobile && _jsx(StyledHeaderAppText, { children: headerAppName })] }), showSearchBar && _jsxs(_Fragment, { children: [searchContext === TMSearchContext.JOBS_LIST && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobListValue(e), searchValue: searchJobListValue }), searchContext === TMSearchContext.JOBS && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobsValue(e), searchValue: searchJobsValue }), searchContext === TMSearchContext.PROCESSES && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessesValue(e), searchValue: searchProcessesValue }), searchContext === TMSearchContext.PROCESS_MONITOR && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessMonitorValue(e), searchValue: searchProcessMonitorValue }), searchContext === TMSearchContext.PLATFORM && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchPlatformValue(e), searchValue: searchPlatformValue }), searchContext === TMSearchContext.QE && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchQEValue(e), searchValue: searchQEValue })] })] }), showSettingsMenu && _jsxs(StyledHeaderIcon, { onClick: () => onSettingsClick?.(), children: [" ", _jsx(IconSettings, { fontSize: 20 }), " "] }), _jsxs(StyledHeaderIcon, { "$isSelected": menuStatus, ref: userIcon, onClick: () => setMenuStatus(!menuStatus), children: [" ", _jsx(IconUserProfile, { fontSize: 20 }), " "] }), menuStatus && _jsxs(StyledMenu, { ref: menuRef, children: [SDK_Globals.tmSession?.SessionDescr?.authenticationMode === AuthenticationModes.TopMedia && _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); onChangePassword && onChangePassword(); }, style: { fontSize: FontSize.defaultFontSize }, children: [" ", _jsx("span", { children: _jsx(IconPassword, {}) }), " ", _jsx("span", { children: SDKUI_Localizator.ChangePassword }), " "] }), _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); onLogout && onLogout(); }, children: [_jsx("span", { children: _jsx(IconLogout, {}) }), " ", _jsx("span", { children: "Logout" }), " "] }), _jsx("div", { style: { width: '100%', height: '1px', backgroundColor: 'gray' } }), _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); TMMessageBoxManager.show({ buttons: [ButtonNames.OK], title: `About. ${SDK_Globals.appModule}`, message: _jsx(TMAboutApp, { app: true, skdui: true, sdk: true, websdk: true }) }); }, style: { fontSize: FontSize.defaultFontSize }, children: [" ", _jsx("span", { children: _jsx(IconBxInfo, {}) }), " ", _jsx("span", { children: "About" }), " "] })] })] }));
93
+ useEffect(() => {
94
+ fetch('../appConfig.json')
95
+ .then(res => res.json())
96
+ .then(json => setAppRoutes(Object.values(json.appRoutes)));
97
+ }, []);
98
+ useEffect(() => {
99
+ return () => {
100
+ if (openMenuTimer.current)
101
+ clearTimeout(openMenuTimer.current);
102
+ };
103
+ }, []);
104
+ useEffect(() => {
105
+ if (!showAppMenu)
106
+ return;
107
+ const safe = 20;
108
+ const handleMouseMove = (e) => {
109
+ const logoRect = logoRef.current?.getBoundingClientRect();
110
+ const menuRect = appMenuRef.current?.getBoundingClientRect();
111
+ const insideLogo = logoRect &&
112
+ e.clientX >= logoRect.left - safe &&
113
+ e.clientX <= logoRect.right + safe &&
114
+ e.clientY >= logoRect.top - safe &&
115
+ e.clientY <= logoRect.bottom + safe;
116
+ const insideMenu = menuRect &&
117
+ e.clientX >= menuRect.left - safe &&
118
+ e.clientX <= menuRect.right + safe &&
119
+ e.clientY >= menuRect.top - safe &&
120
+ e.clientY <= menuRect.bottom + safe;
121
+ if (!insideLogo && !insideMenu) {
122
+ setShowAppMenu(false);
123
+ }
124
+ };
125
+ window.addEventListener('mousemove', handleMouseMove);
126
+ return () => window.removeEventListener('mousemove', handleMouseMove);
127
+ }, [showAppMenu]);
128
+ const hasAdministrativeLevel = (sd) => {
129
+ if (sd.userLevel == UserLevels.SystemAdministrator)
130
+ return true;
131
+ if (sd.userLevel == UserLevels.Administrator)
132
+ return true;
133
+ if (sd.userLevel == UserLevels.AutonomousAdministrator)
134
+ return true;
135
+ return false;
136
+ };
137
+ const isAdministrativeLevel = useMemo(() => {
138
+ return hasAdministrativeLevel(tmSession?.SessionDescr);
139
+ }, [tmSession?.SessionDescr]);
140
+ const openAppsHandler = (appName, session, appRoutes) => {
141
+ if (!appRoutes) {
142
+ ShowAlert({ message: `App routes are not defined`, mode: 'error', title: appName, duration: 3000 });
143
+ return;
144
+ }
145
+ const route = appRoutes.find(route => route.appName === appName);
146
+ if (route) {
147
+ openApps(appName, session, appRoutes);
148
+ }
149
+ else {
150
+ ShowAlert({ message: `Route is not found`, mode: 'info', title: appName, duration: 3000 });
151
+ }
152
+ setShowAppMenu(false);
153
+ };
154
+ const isTopMediaAuth = useMemo(() => {
155
+ return tmSession?.SessionDescr?.authenticationMode === AuthenticationModes.TopMedia;
156
+ }, [tmSession]);
157
+ return (_jsxs(StyledHeaderContainer, { "$appName": SDK_Globals.appModule, children: [isAdministrativeLevel &&
158
+ _jsx(TMResizableMenu, { ref: appMenuRef, isVisible: showAppMenu, top: 58, left: 10, resizable: false, maxWidth: 215, minWidth: 215, maxHeight: 180, minHeight: 180, onClose: () => { }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: [_jsx("h5", { style: { color: TMColors.primary }, children: "Accessi ad altre applicazioni " }), _jsx("hr", {}), _jsxs("div", { style: { display: 'flex', gap: '10px', alignItems: 'center', width: '100%' }, children: [_jsxs(AppMenuButton, { onClick: () => openAppsHandler(AppModules.DESIGNER, tmSession, appRoutes), "$bgColor": '#482234', children: [_jsx("img", { src: six, alt: "designer", width: 30, height: 30 }), " ", "Designer"] }), _jsxs(AppMenuButton, { onClick: () => openAppsHandler(AppModules.ORCHESTRATOR, tmSession, appRoutes), "$bgColor": '#1d6f42', children: [_jsx("img", { src: six, alt: "Orchestrator", width: 30, height: 30 }), " ", "Orchestrator"] })] })] }) }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', width: '100%', gap: isMobile ? 5 : 15 }, children: [_jsxs("div", { style: { height: '50px', display: 'flex', alignItems: 'center', gap: 20, justifyContent: 'center' }, children: [_jsx(StyledLogo, { ref: logoRef, style: { cursor: isAdministrativeLevel ? 'pointer' : 'default' }, onMouseEnter: () => {
159
+ if (openMenuTimer.current)
160
+ clearTimeout(openMenuTimer.current);
161
+ openMenuTimer.current = setTimeout(() => { setShowAppMenu(true); onMenusOpen?.(); }, 200);
162
+ }, onMouseLeave: () => {
163
+ if (openMenuTimer.current)
164
+ clearTimeout(openMenuTimer.current);
165
+ }, src: six, height: isMobile ? 35 : 40, alt: "" }), !isMobile && _jsx(StyledHeaderAppText, { children: headerAppName })] }), showSearchBar && _jsxs(_Fragment, { children: [searchContext === TMSearchContext.JOBS_LIST && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobListValue(e), searchValue: searchJobListValue }), searchContext === TMSearchContext.JOBS && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobsValue(e), searchValue: searchJobsValue }), searchContext === TMSearchContext.PROCESSES && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessesValue(e), searchValue: searchProcessesValue }), searchContext === TMSearchContext.PROCESS_MONITOR && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessMonitorValue(e), searchValue: searchProcessMonitorValue }), searchContext === TMSearchContext.PLATFORM && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchPlatformValue(e), searchValue: searchPlatformValue }), searchContext === TMSearchContext.QE && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchQEValue(e), searchValue: searchQEValue })] })] }), showSettingsMenu && _jsxs(StyledHeaderIcon, { onClick: () => onSettingsClick?.(), children: [" ", _jsx(IconSettings, { fontSize: 20 }), " "] }), _jsxs(StyledHeaderIcon, { "$isSelected": menuStatus, ref: userIcon, onClick: () => setMenuStatus(!menuStatus), children: [" ", _jsx(IconUserProfile, { fontSize: 20 }), " "] }), menuStatus &&
166
+ _jsx(TMResizableMenu, { ref: menuRef, isVisible: menuStatus, top: 60, right: 0, resizable: false, maxWidth: 175, minWidth: 175, maxHeight: isTopMediaAuth ? 130 : 100, minHeight: isTopMediaAuth ? 130 : 100, onClose: () => setMenuStatus(false), children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: [isTopMediaAuth && _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); onChangePassword && onChangePassword(); }, style: { fontSize: FontSize.defaultFontSize }, children: [" ", _jsx("span", { children: _jsx(IconPassword, {}) }), " ", _jsx("span", { children: SDKUI_Localizator.ChangePassword }), " "] }), _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); onLogout && onLogout(); }, children: [_jsx("span", { children: _jsx(IconLogout, {}) }), " ", _jsx("span", { children: "Logout" }), " "] }), _jsx("div", { style: { width: '100%', height: '1px', backgroundColor: 'gray' } }), _jsxs(StyledMenuItem, { "$fontSize": FontSize.defaultFontSize, onClick: () => { setMenuStatus(false); TMMessageBoxManager.show({ buttons: [ButtonNames.OK], title: `About. ${SDK_Globals.appModule}`, message: _jsx(TMAboutApp, { app: true, skdui: true, sdk: true, websdk: true }) }); }, style: { fontSize: FontSize.defaultFontSize }, children: [" ", _jsx("span", { children: _jsx(IconBxInfo, {}) }), " ", _jsx("span", { children: "About" }), " "] })] }) })] }));
86
167
  };
168
+ const StyledLogo = styled.img `
169
+ image-rendering: auto;
170
+ shape-rendering: auto;
171
+ `;
172
+ const AppMenuButton = styled.div `
173
+ width: 90px;
174
+ height: 90px;
175
+ display: flex;
176
+ flex-direction: column;
177
+ align-items: center;
178
+ justify-content: center;
179
+ background: white;
180
+ color: #2459A4;
181
+ font-size: 0.8rem;
182
+ text-transform: uppercase;
183
+ border-radius: 10px;
184
+ margin: 8px 0;
185
+ cursor: pointer;
186
+ box-shadow: 0 2px 8px #2459a41a;
187
+ user-select: none;
188
+ gap: 5px;
189
+ transition:
190
+ transform 0.18s cubic-bezier(.4,0,.2,1),
191
+ box-shadow 0.18s cubic-bezier(.4,0,.2,1);
192
+ &:hover {
193
+ transform: translateY(-2px) scale(1.06);
194
+ box-shadow: 0 6px 18px #2459a433;
195
+ }
196
+ `;
87
197
  export default TMHeader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.13.93",
3
+ "version": "6.13.94",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",