@topconsultnpm/sdkui-react-beta 6.16.57 → 6.16.59

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.
@@ -229,9 +229,9 @@ const TMWGsCopyMoveForm = (props) => {
229
229
  if (isDisabled)
230
230
  return;
231
231
  try {
232
- const currentWorkingGroupDescriptor = currentWg ?? selectedWg;
232
+ const targetWorkingGroup = currentWg ?? selectedWg;
233
233
  const isWgFolderRequired = mode !== 'copyToWgArchivedDoc';
234
- const missingWgOrFolder = isWgFolderRequired ? (!currentWorkingGroupDescriptor || !selectedFolder) : !currentWorkingGroupDescriptor;
234
+ const missingWgOrFolder = isWgFolderRequired ? (!targetWorkingGroup || !selectedFolder) : !targetWorkingGroup;
235
235
  if (missingWgOrFolder) {
236
236
  return Promise.resolve();
237
237
  }
@@ -261,31 +261,34 @@ const TMWGsCopyMoveForm = (props) => {
261
261
  setWaitPanelTextPrimary(`${i + 1}/${totalDrafts}`);
262
262
  const item = context.selectedDrafts[i];
263
263
  try {
264
- if (isWgEngine && currentWorkingGroupDescriptor?.id && currentWorkingGroupDescriptor && currentWorkingGroupDescriptor.id && selectedFolder && item.did) {
264
+ if (isWgEngine && targetWorkingGroup && targetWorkingGroup.id && currentWorkingGroupDescriptor && currentWorkingGroupDescriptor.id && selectedFolder && item.did) {
265
265
  const draft = item;
266
266
  const did = draft.did ?? 0;
267
267
  if (mode === 'copy') {
268
- await workingGroupEngine.DraftsCopyAsync(currentWorkingGroupDescriptor.id, did, currentWorkingGroupDescriptor.id, selectedFolderId);
269
- if (fetchTreeFileSystemForWorkingGroup)
270
- fetchTreeFileSystemForWorkingGroup(currentWorkingGroupDescriptor.id);
268
+ await workingGroupEngine.DraftsCopyAsync(currentWorkingGroupDescriptor.id, did, targetWorkingGroup.id, selectedFolderId);
269
+ if (fetchTreeFileSystemForWorkingGroup) {
270
+ await fetchTreeFileSystemForWorkingGroup(targetWorkingGroup.id);
271
+ }
271
272
  }
272
273
  else if (mode === 'move') {
273
- await workingGroupEngine.DraftsMoveAsync(currentWorkingGroupDescriptor.id, did, currentWorkingGroupDescriptor.id, selectedFolderId);
274
- if (fetchTreeFileSystemForWorkingGroup)
275
- fetchTreeFileSystemForWorkingGroup(currentWorkingGroupDescriptor.id);
274
+ await workingGroupEngine.DraftsMoveAsync(currentWorkingGroupDescriptor.id, did, targetWorkingGroup.id, selectedFolderId);
275
+ if (fetchTreeFileSystemForWorkingGroup) {
276
+ await fetchTreeFileSystemForWorkingGroup(targetWorkingGroup.id);
277
+ await fetchTreeFileSystemForWorkingGroup(currentWorkingGroupDescriptor.id);
278
+ }
276
279
  }
277
280
  }
278
281
  else if (isSearchEngine) {
279
- if (mode === 'copyToWgDraft' && selectedWg && selectedWg.id && selectedFolder && currentDcmtTypeDescriptor) {
282
+ if (mode === 'copyToWgDraft' && targetWorkingGroup && targetWorkingGroup.id && selectedFolder && currentDcmtTypeDescriptor) {
280
283
  const documentDisplayInfo = getDocumentDisplayInfo(currentDcmtTypeDescriptor, item);
281
- await workingGroupEngine.DraftsAddByIDAsync(selectedWg.id, selectedFolderId, documentDisplayInfo.name, documentDisplayInfo.description, item.TID, item.DID);
284
+ await workingGroupEngine.DraftsAddByIDAsync(targetWorkingGroup.id, selectedFolderId, documentDisplayInfo.name, documentDisplayInfo.description, item.TID, item.DID);
282
285
  if (fetchTreeFileSystemForWorkingGroup)
283
- fetchTreeFileSystemForWorkingGroup(selectedWg.id);
286
+ await fetchTreeFileSystemForWorkingGroup(targetWorkingGroup.id);
284
287
  }
285
- else if (mode === 'copyToWgArchivedDoc' && selectedWg && selectedWg.id) {
286
- await workingGroupEngine.DcmtsAddOrRemoveAsync(selectedWg.id, item.TID, item.DID, false);
288
+ else if (mode === 'copyToWgArchivedDoc' && targetWorkingGroup && targetWorkingGroup.id) {
289
+ await workingGroupEngine.DcmtsAddOrRemoveAsync(targetWorkingGroup.id, item.TID, item.DID, false);
287
290
  if (fetchArchivedDocumentsForWorkingGroup)
288
- await fetchArchivedDocumentsForWorkingGroup(selectedWg.id);
291
+ await fetchArchivedDocumentsForWorkingGroup(targetWorkingGroup.id);
289
292
  }
290
293
  }
291
294
  result.push({
@@ -29,7 +29,7 @@ const Badge = styled.span `
29
29
  position: absolute;
30
30
  top: 2px;
31
31
  right: 2px;
32
- background: #ff5252;
32
+ background: ${(props) => props.$background || "#ff5252"};
33
33
  color: white;
34
34
  font-size: 10px;
35
35
  min-width: 14px;
@@ -76,7 +76,7 @@ const TMPanelManagerToolbar = (props) => {
76
76
  const isActive = panelVisibility[visibleLeafPanel.id];
77
77
  const isDisabled = toolbarButtonsDisabled[visibleLeafPanel.id];
78
78
  const count = visibleLeafPanel.toolbarOptions?.count ?? 0;
79
- return _jsx(TMTooltip, { content: visibleLeafPanel.name + (count > 0 ? ": " + count : ''), position: isMobile ? 'top' : 'left', children: _jsxs(StyledToolbarButton, { disabled: isDisabled, "$isDisabled": isDisabled, onClick: () => onClickCallback(visibleLeafPanel.id, isActive), "$isActive": isActive || visibleLeafPanel.toolbarOptions?.alwaysActiveColor, children: [typeof visibleLeafPanel.toolbarOptions?.icon === 'string' ? (_jsx("i", { className: `dx-icon dx-icon-${visibleLeafPanel.toolbarOptions?.icon}` })) : (visibleLeafPanel.toolbarOptions?.icon), (!isActive && count > 0) && _jsxs(Badge, { children: [" ", formatCount(count), " "] })] }, visibleLeafPanel.id) }, visibleLeafPanel.id);
79
+ return _jsx(TMTooltip, { content: visibleLeafPanel.name + (count > 0 ? ": " + count : ''), position: isMobile ? 'top' : 'left', children: _jsxs(StyledToolbarButton, { disabled: isDisabled, "$isDisabled": isDisabled, onClick: () => onClickCallback(visibleLeafPanel.id, isActive), "$isActive": isActive || visibleLeafPanel.toolbarOptions?.alwaysActiveColor, children: [typeof visibleLeafPanel.toolbarOptions?.icon === 'string' ? (_jsx("i", { className: `dx-icon dx-icon-${visibleLeafPanel.toolbarOptions?.icon}` })) : (visibleLeafPanel.toolbarOptions?.icon), (!isActive && count > 0) && _jsxs(Badge, { "$background": visibleLeafPanel.toolbarOptions?.countBackgroundColor, children: [" ", formatCount(count), " "] })] }, visibleLeafPanel.id) }, visibleLeafPanel.id);
80
80
  }) }));
81
81
  };
82
82
  export default TMPanelManagerToolbar;
@@ -22,6 +22,7 @@ export interface TMPanelDefinition {
22
22
  beginGroup?: boolean;
23
23
  alwaysActiveColor?: boolean;
24
24
  count?: number;
25
+ countBackgroundColor?: string;
25
26
  };
26
27
  }
27
28
  export interface TMPanelHierarchyInfo {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.16.57",
3
+ "version": "6.16.59",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -39,7 +39,7 @@
39
39
  "lib"
40
40
  ],
41
41
  "dependencies": {
42
- "@topconsultnpm/sdk-ts-beta": "6.16.11",
42
+ "@topconsultnpm/sdk-ts-beta": "6.16.12",
43
43
  "buffer": "^6.0.3",
44
44
  "devextreme": "25.1.4",
45
45
  "devextreme-react": "25.1.4",