@topconsultnpm/sdkui-react-beta 6.13.38 → 6.13.39

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.
@@ -82,7 +82,7 @@ const TMPanelManager = (props) => {
82
82
  }
83
83
  else if (maximizedPanelPath.length > 0) {
84
84
  // If at least one panel is maximized, collapse all others to zero size
85
- newState.set(panelId, { ...currentPanel, width: '0', height: '0' });
85
+ newState.set(panelId, { ...currentPanel, width: '0%', height: '0%' });
86
86
  }
87
87
  else {
88
88
  // If no panels are maximized, restore their original dimensions
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { TMPanelEntry } from './TMPanelManagerUtils';
2
3
  interface TNPanelManagerToolbarProps {
3
4
  allPanels: Array<TMPanelEntry>;
@@ -15,3 +16,8 @@ interface TNPanelManagerToolbarProps {
15
16
  }
16
17
  declare const TMPanelManagerToolbar: (props: TNPanelManagerToolbarProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export default TMPanelManagerToolbar;
19
+ export declare const StyledToolbarButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
20
+ $toolbarMode?: number;
21
+ $isActive?: boolean;
22
+ $isDisabled?: boolean;
23
+ }>> & string;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useState } from 'react';
3
+ import styled from 'styled-components';
3
4
  import { useDeviceType, DeviceType } from './TMDeviceProvider';
4
5
  import TMTooltip from './TMTooltip';
5
6
  const TMPanelManagerToolbar = (props) => {
@@ -75,37 +76,8 @@ const TMPanelManagerToolbar = (props) => {
75
76
  alignSelf: 'center',
76
77
  } }, `sep-${p.fullId}`)) : null;
77
78
  // Button JSX
78
- const button = (_jsx(TMTooltip, { content: p.config.name, position: isMobile ? 'top' : 'left', children: _jsx("button", { disabled: isToolbarDisabled, onClick: () => { handleTogglePanel(p.fullId); if (handleClick)
79
- handleClick(); }, style: toolbarMode === 0 ? {
80
- display: 'flex',
81
- alignItems: 'center',
82
- justifyContent: 'center',
83
- height: '40px',
84
- width: '40px',
85
- border: 'none',
86
- borderRadius: '10px',
87
- fontSize: '18px',
88
- padding: '8px 10px',
89
- color: '#fff',
90
- transition: 'transform 0.2s ease, box-shadow 0.2s ease',
91
- cursor: isToolbarDisabled ? 'not-allowed' : 'pointer',
92
- opacity: isToolbarDisabled ? 0.6 : 1,
93
- backgroundColor: isActive || p.config.toolbarOptions?.alwaysActiveColor ? '#81c784' : '#e57373',
94
- } : {
95
- display: 'flex',
96
- alignItems: 'center',
97
- justifyContent: 'center',
98
- height: '32px',
99
- width: '32px',
100
- border: 'none',
101
- borderRadius: '10px',
102
- fontSize: '18px',
103
- transition: 'transform 0.2s ease, box-shadow 0.2s ease',
104
- cursor: isToolbarDisabled ? 'not-allowed' : 'pointer',
105
- opacity: isToolbarDisabled ? 0.6 : 1,
106
- color: isActive || p.config.toolbarOptions?.alwaysActiveColor ? '#005B97' : '#FFFFFF',
107
- backgroundColor: isActive || p.config.toolbarOptions?.alwaysActiveColor ? '#FFFFFF' : 'transparent',
108
- }, onMouseEnter: (e) => { if (!isToolbarDisabled) {
79
+ const button = (_jsx(TMTooltip, { content: p.config.name, position: isMobile ? 'top' : 'left', children: _jsx(StyledToolbarButton, { "$toolbarMode": toolbarMode, "$isActive": isActive || p.config.toolbarOptions?.alwaysActiveColor, "$isDisabled": isToolbarDisabled, disabled: isToolbarDisabled, onClick: () => { handleTogglePanel(p.fullId); if (handleClick)
80
+ handleClick(); }, onMouseEnter: (e) => { if (!isToolbarDisabled && toolbarMode === 0) {
109
81
  e.currentTarget.style.transform = 'scale(1.1)';
110
82
  } }, onMouseLeave: (e) => { e.currentTarget.style.transform = 'scale(1)'; }, children: typeof p.config.toolbarOptions?.icon === 'string' ? (_jsx("i", { className: `dx-icon dx-icon-${p.config.toolbarOptions?.icon}` })) : (p.config.toolbarOptions?.icon) }) }, p.fullId));
111
83
  // Return separator first, then button
@@ -113,3 +85,25 @@ const TMPanelManagerToolbar = (props) => {
113
85
  }) }));
114
86
  };
115
87
  export default TMPanelManagerToolbar;
88
+ export const StyledToolbarButton = styled.button `
89
+ display: flex;
90
+ align-items: center;
91
+ justify-content: center;
92
+ height: ${({ $toolbarMode }) => ($toolbarMode === 0 ? '40px' : '32px')};
93
+ width: ${({ $toolbarMode }) => ($toolbarMode === 0 ? '40px' : '32px')};
94
+ border: none;
95
+ border-radius: ${({ $toolbarMode }) => ($toolbarMode === 0 ? '10px' : '8px')};
96
+ font-size: 18px;
97
+ padding: ${({ $toolbarMode }) => ($toolbarMode === 0 ? '8px 10px' : '0px')}; ;
98
+ color: #fff;
99
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
100
+ cursor: ${({ $isDisabled }) => ($isDisabled ? 'not-allowed' : 'pointer')};
101
+ opacity: ${({ $isDisabled }) => ($isDisabled ? 0.6 : 1)};
102
+ background: ${({ $toolbarMode, $isActive }) => $toolbarMode === 0
103
+ ? ($isActive ? '#81c784' : '#e57373')
104
+ : ($isActive ? 'rgba(255,255,255,0.35)' : 'transparent')};
105
+
106
+ &:hover {
107
+ background: ${({ $toolbarMode, $isDisabled }) => $toolbarMode !== 0 && !$isDisabled ? 'rgba(255,255,255,0.35)' : undefined};
108
+ }
109
+ `;
@@ -243,7 +243,7 @@ const TMSearch = ({ inputTID, inputSqdID, isExpertMode = SDKUI_Globals.userSetti
243
243
  },
244
244
  },
245
245
  ];
246
- return (_jsxs(_Fragment, { children: [_jsx(StyledMultiViewPanel, { "$isVisible": currentSearchView === TMSearchViews.Search, children: _jsx(TMPanelManager, { panels: panels, initialMobilePanelId: 'TMTreeSelector', toolbarMode: 1 }) }), searchResult.length > 0 &&
246
+ return (_jsxs(_Fragment, { children: [_jsx(StyledMultiViewPanel, { "$isVisible": currentSearchView === TMSearchViews.Search, children: _jsx(TMPanelManager, { panels: panels, initialMobilePanelId: 'TMRecentsManager', toolbarMode: 1 }) }), searchResult.length > 0 &&
247
247
  _jsx(TMSearchResult, { isVisible: currentSearchView === TMSearchViews.Result, context: SearchResultContext.METADATA_SEARCH, searchResults: searchResult, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onRefreshSearchAsync: async () => {
248
248
  setSearchResult(await refreshLastSearch(lastQdSearched) ?? []);
249
249
  }, onTaskCreateRequest: onTaskCreateRequest, onClose: () => { setCurrentSearchView(TMSearchViews.Search); } })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.13.38",
3
+ "version": "6.13.39",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",