@topconsultnpm/sdkui-react-beta 6.14.43 → 6.14.45

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.
@@ -630,7 +630,7 @@ const ToppyImage = styled.img `
630
630
  cursor: ${props => props.$isMobile ? 'pointer' : 'default'};
631
631
  `;
632
632
  export const ToppyHelpCenter = ({ content, onClick, deviceType, top = -200 }) => {
633
- return (_jsxs(ToppyContainer, { children: [_jsx(ToppyImage, { "$isMobile": deviceType === DeviceType.MOBILE, onClick: onClick, src: toppy, alt: "Toppy" }), _jsx("div", { style: { top: deviceType === DeviceType.MOBILE ? -180 : top, right: deviceType === DeviceType.MOBILE ? 20 : 1, transform: 'rotate(20deg)', position: 'absolute', width: 'max-content', height: 'max-content' }, children: content })] }));
633
+ return (_jsxs(ToppyContainer, { children: [_jsx(ToppyImage, { "$isMobile": deviceType === DeviceType.MOBILE, onClick: onClick, src: toppy, alt: "Toppy" }), _jsx("div", { style: { top: deviceType === DeviceType.MOBILE ? -80 : top, right: deviceType === DeviceType.MOBILE ? 40 : 1, transform: 'rotate(20deg)', position: 'absolute', width: 'max-content', height: 'max-content' }, children: content })] }));
634
634
  };
635
635
  const TMDcmtPreviewWrapper = ({ currentDcmt, layoutMode, fromDTD, dcmtFile, deviceType, isVisible, onFileUpload }) => {
636
636
  const { setPanelVisibilityById, toggleMaximize, isResizingActive, countVisibleLeafPanels } = useTMPanelManagerContext();
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
3
- import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, TemplateTIDs, DcmtTypeListCacheService, AccessLevels, SystemMIDsAsNumber, UserListCacheService, WorkflowCacheService } from '@topconsultnpm/sdk-ts-beta';
3
+ import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, TemplateTIDs, DcmtTypeListCacheService, AccessLevels, SystemMIDsAsNumber } from '@topconsultnpm/sdk-ts-beta';
4
4
  import styled from 'styled-components';
5
5
  import { getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
6
6
  import { ContextMenu } from 'devextreme-react';
@@ -15,7 +15,7 @@ import TMDataGrid, { TMDataGridPageSize } from '../../base/TMDataGrid';
15
15
  import { useDeviceType, DeviceType } from '../../base/TMDeviceProvider';
16
16
  import { TMSplitterLayout, TMLayoutItem } from '../../base/TMLayout';
17
17
  import { CustomListViewHeader } from '../../base/TMListView';
18
- import { TMMessageBoxManager, ButtonNames } from '../../base/TMPopUp';
18
+ import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../base/TMPopUp';
19
19
  import TMTooltip from '../../base/TMTooltip';
20
20
  import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
21
21
  import { TMUserIdViewer } from '../../choosers/TMUserChooser';
@@ -137,18 +137,18 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
137
137
  if (dtd) {
138
138
  const isWorkItem = dtd?.templateTID === TemplateTIDs.WF_WIApprView;
139
139
  const name = `${dtd.name ?? '-'} (DID: ${item.DID})`;
140
- let participantUsers = [];
141
- if (isWorkItem) {
142
- // Recupera info workflow
143
- const wf = await WorkflowCacheService.GetWFInfoAsync(dtd.id);
144
- // Recupera tutti gli utenti
145
- const allUsers = await UserListCacheService.GetAllAsync();
146
- // Filtra utenti partecipanti
147
- const participantIds = wf?.participants?.map(p => p.userID);
148
- participantUsers = allUsers.filter(u => participantIds?.includes(u.id) && u.id !== SDK_Globals.tmSession?.SessionDescr?.userID);
149
- }
140
+ // let participantUsers: UserDescriptor[] | undefined = [];
141
+ // if (isWorkItem) {
142
+ // // Recupera info workflow
143
+ // const wf = await WorkflowCacheService.GetWFInfoAsync(dtd.id);
144
+ // // Recupera tutti gli utenti
145
+ // const allUsers = await UserListCacheService.GetAllAsync();
146
+ // // Filtra utenti partecipanti
147
+ // const participantIds = wf?.participants?.map(p => p.userID);
148
+ // participantUsers = allUsers.filter(u => participantIds?.includes(u.id) && u.id !== SDK_Globals.tmSession?.SessionDescr?.userID);
149
+ // }
150
150
  onTaskCreateRequest?.(isWorkItem
151
- ? { workItem: { tid: item.TID, did: item.DID, name, wfParticipants: participantUsers } }
151
+ ? { workItem: { tid: item.TID, did: item.DID, name } }
152
152
  : { document: { tid: item.TID, did: item.DID, name } }, onTaskCreated);
153
153
  }
154
154
  }
@@ -365,8 +365,8 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
365
365
  const vid = focusedItem ? focusedItem?.TID : selectedItems[0]?.TID;
366
366
  const did = focusedItem ? focusedItem?.DID : selectedItems[0]?.DID;
367
367
  openTaskFormHandler((task) => {
368
- task?.id &&
369
- SDK_Globals.tmSession?.NewWorkflowEngine().WorkItem_MoreInfoAsync(vid, did, task.id);
368
+ SDK_Globals.tmSession?.NewWorkflowEngine().WorkItem_MoreInfoAsync(vid, did, task?.id ?? 0)
369
+ .catch(err => TMExceptionBoxManager.show({ exception: err }));
370
370
  });
371
371
  }, approveDisable: disable, rejectDisable: disable, reassignDisable: disable, infoDisable: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length !== 1 }) }) })] }), _jsx(ConfirmFormatDialog, {}), _jsx(ConfirmAttachmentsDialog, {})] }), [
372
372
  searchResults,
@@ -62,7 +62,7 @@ const TMTreeSelector = ({ layoutMode = LayoutModes.Update, isVisible, onSelected
62
62
  if (treeItem.type == TreeItemTypes.DcmtType)
63
63
  return (_jsx(TMTidViewer, { tid: treeItem.tid, color: TMColors.primaryColor, showIcon: false }));
64
64
  else
65
- return (_jsxs(StyledDivHorizontal, { style: { gap: 5 }, children: [_jsx(IconFolder, { fontSize: 18 }), _jsx("p", { style: { color: TMColors.primaryColor }, children: treeItem.nameLoc })] }));
65
+ return (_jsxs(StyledDivHorizontal, { style: { gap: 5 }, children: [_jsx(IconFolder, { fontSize: 18, color: '#9fc6e7' }), _jsx("p", { style: { color: TMColors.primaryColor }, children: treeItem.nameLoc })] }));
66
66
  };
67
67
  // Handles selection change in the data grid
68
68
  const onSelectionChanged = useCallback((e) => {
@@ -119,5 +119,7 @@ const TMTreeSelector = ({ layoutMode = LayoutModes.Update, isVisible, onSelected
119
119
  };
120
120
  export default TMTreeSelector;
121
121
  function IconFolder(props) {
122
- return (_jsx("svg", { viewBox: "0 0 512 512", height: "1em", width: "1em", ...props, children: _jsx("g", { id: "Icon", children: _jsx("g", { id: "_10", children: _jsxs("g", { id: "Folder", children: [_jsx("path", { d: "m214.2 107-40.2-29.9c-9.5-7-20.9-10.8-32.7-10.8h-110.2c-16.6 0-30 13.4-30 30v349.5h404.1c15.2 0 27.4-12.3 27.4-27.4v-270.6c0-16.6-13.4-30-30-30h-155.6c-11.8 0-23.3-3.8-32.8-10.8z", fill: "#f6c012" }), _jsxs("g", { children: [_jsx("path", { d: "m76.9 143.7h300c8.3 0 15 6.7 15 15v200c0 8.3-6.7 15-15 15h-300c-8.3 0-15-6.7-15-15v-200c0-8.3 6.7-15 15-15z", fill: "#ffeac5" }), _jsx("path", { d: "m56.9 163.7h300c8.3 0 15 6.7 15 15v200c0 8.3-6.7 15-15 15h-300c-8.3 0-15-6.7-15-15v-200c0-8.3 6.7-15 15-15z", fill: "#fff7e6" })] }), _jsx("path", { d: "m85.2 220.1-84.1 225.6h410.8c12.5 0 23.7-7.8 28.1-19.5l69-185.2c7.3-19.6-7.2-40.5-28.1-40.5h-367.6c-12.5.1-23.7 7.8-28.1 19.6z", fill: "#fbd87c" })] }) }) }) }));
122
+ return (
123
+ // <svg focusable="false" viewBox="0 0 24 24" height="24px" width="24px" {...props} fill="currentColor"><g><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"></path><path d="M0 0h24v24H0z" fill="none"></path></g></svg>
124
+ _jsx("svg", { viewBox: "0 0 512 512", height: "1em", width: "1em", ...props, children: _jsx("g", { id: "Icon", children: _jsx("g", { id: "_10", children: _jsxs("g", { id: "Folder", children: [_jsx("path", { d: "m214.2 107-40.2-29.9c-9.5-7-20.9-10.8-32.7-10.8h-110.2c-16.6 0-30 13.4-30 30v349.5h404.1c15.2 0 27.4-12.3 27.4-27.4v-270.6c0-16.6-13.4-30-30-30h-155.6c-11.8 0-23.3-3.8-32.8-10.8z", fill: "#f6c012" }), _jsxs("g", { children: [_jsx("path", { d: "m76.9 143.7h300c8.3 0 15 6.7 15 15v200c0 8.3-6.7 15-15 15h-300c-8.3 0-15-6.7-15-15v-200c0-8.3 6.7-15 15-15z", fill: "#ffeac5" }), _jsx("path", { d: "m56.9 163.7h300c8.3 0 15 6.7 15 15v200c0 8.3-6.7 15-15 15h-300c-8.3 0-15-6.7-15-15v-200c0-8.3 6.7-15 15-15z", fill: "#fff7e6" })] }), _jsx("path", { d: "m85.2 220.1-84.1 225.6h410.8c12.5 0 23.7-7.8 28.1-19.5l69-185.2c7.3-19.6-7.2-40.5-28.1-40.5h-367.6c-12.5.1-23.7 7.8-28.1 19.6z", fill: "#fbd87c" })] }) }) }) }));
123
125
  }
@@ -57,6 +57,7 @@ export * from './features/documents/TMDcmtPreview';
57
57
  export * from './features/archive/TMArchive';
58
58
  export * from './features/search/TMSearch';
59
59
  export * from './features/search/TMSearchResult';
60
+ export { default as TMWGsCopyMoveForm } from './features/wg/TMWGsCopyMoveForm';
60
61
  export * from './base/TMTab';
61
62
  export { default as TMHeader } from "./sidebar/TMHeader";
62
63
  export { default as TMSidebar } from "./sidebar/TMSidebar";
@@ -65,6 +65,8 @@ export * from './features/archive/TMArchive';
65
65
  //search
66
66
  export * from './features/search/TMSearch';
67
67
  export * from './features/search/TMSearchResult';
68
+ // wg
69
+ export { default as TMWGsCopyMoveForm } from './features/wg/TMWGsCopyMoveForm';
68
70
  //tab
69
71
  export * from './base/TMTab';
70
72
  // others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.14.43",
3
+ "version": "6.14.45",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",