@topconsultnpm/sdkui-react-beta 6.13.78 → 6.13.79
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.
|
@@ -46,16 +46,14 @@ const TMPanelWrapper = (props) => {
|
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
48
48
|
// Clona il child e passa una prop 'isVisible'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return child;
|
|
54
|
-
});
|
|
49
|
+
let childWithProps = children;
|
|
50
|
+
if (React.isValidElement(children) && typeof children.type === 'function') {
|
|
51
|
+
childWithProps = React.cloneElement(children, { isVisible: isCurrentlyVisible });
|
|
52
|
+
}
|
|
55
53
|
return (_jsx("div", { "data-panel-id": panel.id, style: panelStyles, children: panel.contentOptions?.panelContainer ?
|
|
56
|
-
_jsxs(TMPanel, { ...panel.contentOptions.panelContainer, allowMaximize: !isMobile, onHeaderDoubleClick: isMaximizable ? () => toggleMaximize(panel.id) : undefined, onMaximize: isMaximizable ? () => toggleMaximize(panel.id) : undefined, onClose: isClosable ? () => togglePanelVisibility(panel.id) : undefined, children: [
|
|
54
|
+
_jsxs(TMPanel, { ...panel.contentOptions.panelContainer, allowMaximize: !isMobile, onHeaderDoubleClick: isMaximizable ? () => toggleMaximize(panel.id) : undefined, onMaximize: isMaximizable ? () => toggleMaximize(panel.id) : undefined, onClose: isClosable ? () => togglePanelVisibility(panel.id) : undefined, children: [childWithProps, " "] })
|
|
57
55
|
:
|
|
58
|
-
|
|
56
|
+
childWithProps // Usa i children clonati
|
|
59
57
|
}));
|
|
60
58
|
};
|
|
61
59
|
export default TMPanelWrapper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react-beta",
|
|
3
|
-
"version": "6.13.
|
|
3
|
+
"version": "6.13.79",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"lib"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@topconsultnpm/sdk-ts-beta": "
|
|
45
|
+
"@topconsultnpm/sdk-ts-beta": "file:../tm-sdk-ts",
|
|
46
46
|
"buffer": "^6.0.3",
|
|
47
47
|
"devextreme": "24.2.6",
|
|
48
48
|
"devextreme-react": "24.2.6",
|