@topconsultnpm/sdkui-react-beta 6.15.94 → 6.15.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.
@@ -13,7 +13,7 @@ import TMPanel from '../../base/TMPanel';
13
13
  import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/panelManager/TMPanelManagerContext';
14
14
  import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
15
15
  const TMArchive = ({ inputTID, inputFile = null, connectorFileSave = undefined, onSavedAsyncCallback, inputMids = [], onCurrentTIDChanged }) => {
16
- const [currentTID, setCurrentTID] = useState(0);
16
+ const [currentTID, setCurrentTID] = useState(inputTID ?? 0);
17
17
  const [mruTIDs, setMruTIDs] = useState([]);
18
18
  const [currentMruTID, setCurrentMruTID] = useState(0);
19
19
  const [fromDTD, setFromDTD] = useState();
@@ -44,8 +44,8 @@ const TMArchive = ({ inputTID, inputFile = null, connectorFileSave = undefined,
44
44
  setCurrentMruTID(tid);
45
45
  else
46
46
  setCurrentMruTID(0);
47
- } }), [isMobile]);
48
- const tmRecentsManagerElement = useMemo(() => _jsx(TMRecentsManagerWrapper, { mruTIDs: mruTIDs, currentMruTID: currentMruTID, deviceType: deviceType, onSelectedTID: (tid) => {
47
+ } }), [isMobile, currentTID]);
48
+ const tmRecentsManagerElement = useMemo(() => _jsx(TMRecentsManagerWrapper, { mruTIDs: mruTIDs, currentTID: currentTID, currentMruTID: currentMruTID, deviceType: deviceType, onSelectedTID: (tid) => {
49
49
  setCurrentMruTID(tid);
50
50
  setCurrentTID(tid);
51
51
  }, onDeletedTID: (tid) => {
@@ -125,7 +125,7 @@ const TMTreeSelectorWrapper = ({ isMobile, onSelectedTIDChanged }) => {
125
125
  return (_jsx(TMTreeSelector, { layoutMode: LayoutModes.Ark, onClosePanel: !isMobile && countVisibleLeafPanels() > 1 ? () => setPanelVisibilityById('tmTreeSelector', false) : undefined, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: !isMobile && countVisibleLeafPanels() > 1 ? () => toggleMaximize("tmTreeSelector") : undefined, onSelectedTIDChanged: (tid) => {
126
126
  onSelectedTIDChanged?.(tid);
127
127
  if (isMobile)
128
- setPanelVisibilityById('tmForm', true);
128
+ setPanelVisibilityById('tmDcmtForm', true);
129
129
  else {
130
130
  setPanelVisibilityById('tmDcmtForm', true);
131
131
  setPanelVisibilityById('tmDcmtPreview', true);
@@ -134,8 +134,15 @@ const TMTreeSelectorWrapper = ({ isMobile, onSelectedTIDChanged }) => {
134
134
  setToolbarButtonVisibility('tmDcmtForm', true);
135
135
  } }));
136
136
  };
137
- const TMRecentsManagerWrapper = ({ mruTIDs, currentMruTID, deviceType, onSelectedTID, onDeletedTID }) => {
137
+ const TMRecentsManagerWrapper = ({ mruTIDs, currentTID, currentMruTID, deviceType, onSelectedTID, onDeletedTID }) => {
138
138
  const { setPanelVisibilityById, setToolbarButtonVisibility } = useTMPanelManagerContext();
139
+ useEffect(() => {
140
+ if (currentTID) {
141
+ setPanelVisibilityById('tmDcmtForm', true);
142
+ setToolbarButtonVisibility('tmDcmtPreview', true);
143
+ setToolbarButtonVisibility('tmDcmtForm', true);
144
+ }
145
+ }, [currentTID]);
139
146
  return (_jsx(TMRecentsManager, { mruTIDs: mruTIDs, currentMruTID: currentMruTID, deviceType: deviceType, onSelectedTID: (tid) => {
140
147
  onSelectedTID?.(tid);
141
148
  if (deviceType === DeviceType.MOBILE) {
@@ -86,8 +86,8 @@ const TMChooserForm = ({ children, title, allowMultipleSelection = false, allowA
86
86
  ...summaryItems ?? {}
87
87
  });
88
88
  }, [manageUseLocalizedName, summaryItems]);
89
- return (_jsx(TMModal, { title: renderTitle(), width: width ?? '550px', height: height ?? '600px', toolbar: _jsx(ToolbarButtons, {}), onClose: onClose, children: children ??
90
- filteredItems.length > 0
89
+ return (_jsx(TMModal, { title: renderTitle(), width: width ?? '550px', height: height ?? '600px', toolbar: _jsx(ToolbarButtons, {}), onClose: onClose, children: (children ??
90
+ filteredItems.length > 0)
91
91
  ? _jsx(TMDataGrid, { dataSource: filteredItems, keyExpr: keyName, dataColumns: dataColumns, focusedRowKey: focusedRowKey, selectedRowKeys: selectedRowKeys, headerFilter: { visible: true }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single', showCheckBoxesMode: 'always', selectAllMode: 'allPages' }, grouping: allowGrouping ? { autoExpandAll: false, expandMode: 'rowClick' } : undefined, summary: customSummary, onFocusedRowChanged: handleFocusedRowChange, onSelectionChanged: handleSelectionChanged, onRowDblClick: handleRowDoubleClick })
92
92
  : _jsx(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: _jsx(TMLayoutItem, { children: _jsx("p", { style: { height: "100%", color: TMColors.primaryColor, fontSize: "1.5rem", display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: SDKUI_Localizator.NoDataToDisplay }) }) }) }));
93
93
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.15.94",
3
+ "version": "6.15.96",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",