@topconsultnpm/sdkui-react-beta 6.14.63 → 6.14.65

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.
@@ -4,7 +4,7 @@ import styled from 'styled-components';
4
4
  import { createPortal } from 'react-dom';
5
5
  const DEFAULT_WIDTH = 550;
6
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) => {
7
+ export const TMResizableMenu = forwardRef(({ isVisible, onClose, top, left, bottom, right, maxWidth, maxHeight, padding = 16, children, minHeight, minWidth, resizable = true, ignoreRefs = [], onResizeing, }, ref) => {
8
8
  const [width, setWidth] = useState(minWidth ?? DEFAULT_WIDTH);
9
9
  const [height, setHeight] = useState(minHeight ?? DEFAULT_HEIGHT);
10
10
  const [isResizing, setIsResizing] = useState(false);
@@ -55,7 +55,7 @@ export const TMResizableMenu = forwardRef(({ isVisible, onClose, top, left, bott
55
55
  document.removeEventListener('mousedown', handleClickOutside);
56
56
  };
57
57
  }, [onClose]);
58
- 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) => {
58
+ 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, "$padding": padding, children: [children, resizable && _jsx(ResizeHandle, { onMouseDown: (e) => {
59
59
  e.preventDefault();
60
60
  document.body.style.pointerEvents = 'none';
61
61
  isResizingRef.current = true;
@@ -75,7 +75,7 @@ const MenuContainer = styled.div `
75
75
  max-width: ${({ $maxWidth }) => ($maxWidth ? `${$maxWidth}px` : 'none')};
76
76
  max-height: ${({ $maxHeight }) => ($maxHeight ? `${$maxHeight}px` : 'none')};
77
77
  border-radius: 6px;
78
- padding: 16px;
78
+ padding: ${({ $padding }) => ($padding ? `${$padding}px` : '16px')};
79
79
  z-index: 1532;
80
80
  min-width: ${({ $minWidth }) => `${$minWidth ?? 350}px`};
81
81
  min-height: ${({ $minHeight }) => `${$minHeight ?? 500}px`};
@@ -73,7 +73,9 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
73
73
  const fetchData = async () => {
74
74
  try {
75
75
  TMSpinner.show({ description: 'Loading Metadata...' });
76
- let getMetadataResult = await SDK_Globals.tmSession?.NewSearchEngine().GetMetadataAsync(TID, DID, true);
76
+ let getMetadataResult;
77
+ if (layoutMode === LayoutModes.Update)
78
+ await SDK_Globals.tmSession?.NewSearchEngine().GetMetadataAsync(TID, DID, true);
77
79
  let dtd = await DcmtTypeListCacheService.GetWithNotGrantedAsync(TID, DID, getMetadataResult);
78
80
  setFromDTD(dtd);
79
81
  if (layoutMode === LayoutModes.Update || (layoutMode === LayoutModes.Ark && DID)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.14.63",
3
+ "version": "6.14.65",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",