@topconsultnpm/sdkui-react-beta 6.13.94 → 6.13.96

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.
@@ -10,7 +10,6 @@ export const TMResizableMenu = forwardRef(({ isVisible, onClose, top, left, bott
10
10
  const [isResizing, setIsResizing] = useState(false);
11
11
  const isResizingRef = useRef(false);
12
12
  const menuRef = useRef(null);
13
- // Find or create a portal root
14
13
  const portalRoot = document.getElementById('portal-root') || (() => {
15
14
  const el = document.createElement('div');
16
15
  el.id = 'portal-root';
@@ -154,8 +154,18 @@ const TMHeader = ({ onMenusOpen, showSettingsMenu = true, showSearchBar = true,
154
154
  const isTopMediaAuth = useMemo(() => {
155
155
  return tmSession?.SessionDescr?.authenticationMode === AuthenticationModes.TopMedia;
156
156
  }, [tmSession]);
157
+ const appModuleHandler = useMemo(() => {
158
+ if (SDK_Globals.appModule === AppModules.ORCHESTRATOR) {
159
+ return { app_1: AppModules.DESIGNER, app_2: AppModules.SURFER };
160
+ }
161
+ if (SDK_Globals.appModule === AppModules.DESIGNER) {
162
+ return { app_1: AppModules.ORCHESTRATOR, app_2: AppModules.SURFER };
163
+ }
164
+ return { app_1: AppModules.DESIGNER, app_2: AppModules.ORCHESTRATOR };
165
+ ;
166
+ }, [SDK_Globals.appModule]);
157
167
  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: () => {
168
+ _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(appModuleHandler.app_1, tmSession, appRoutes), "$bgColor": '#482234', children: [_jsx("img", { src: six, alt: "designer", width: 30, height: 30 }), " ", "Designer"] }), _jsxs(AppMenuButton, { onClick: () => openAppsHandler(appModuleHandler.app_2, 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
169
  if (openMenuTimer.current)
160
170
  clearTimeout(openMenuTimer.current);
161
171
  openMenuTimer.current = setTimeout(() => { setShowAppMenu(true); onMenusOpen?.(); }, 200);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.13.94",
3
+ "version": "6.13.96",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",