@topconsultnpm/sdkui-react 6.22.0-dev3.8 → 6.22.0-dev4.10

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.
Files changed (186) hide show
  1. package/lib/components/NewComponents/ContextMenu/styles.d.ts +43 -45
  2. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +60 -67
  3. package/lib/components/base/Styled.d.ts +77 -93
  4. package/lib/components/base/TMAlert.js +6 -8
  5. package/lib/components/base/TMAreaManager.js +53 -55
  6. package/lib/components/base/TMButton.js +4 -2
  7. package/lib/components/base/TMCounterBar.d.ts +2 -2
  8. package/lib/components/base/TMCounterContainer.d.ts +4 -3
  9. package/lib/components/base/TMCounterContainer.js +16 -1
  10. package/lib/components/base/TMCustomButton.d.ts +1 -1
  11. package/lib/components/base/TMCustomButton.js +40 -48
  12. package/lib/components/base/TMDataGrid.js +243 -223
  13. package/lib/components/base/TMDataGridExportForm.d.ts +1 -2
  14. package/lib/components/base/TMFileManager.d.ts +1 -2
  15. package/lib/components/base/TMFileManagerDataGridView.d.ts +1 -2
  16. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
  17. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
  18. package/lib/components/base/TMFileManagerUtils.d.ts +6 -4
  19. package/lib/components/base/TMLayout.d.ts +4 -4
  20. package/lib/components/base/TMList.d.ts +1 -2
  21. package/lib/components/base/TMListView.d.ts +1 -1
  22. package/lib/components/base/TMPanel.js +173 -170
  23. package/lib/components/base/TMSpinner.d.ts +3 -3
  24. package/lib/components/base/TMSpinner.js +9 -7
  25. package/lib/components/base/TMTab.d.ts +3 -4
  26. package/lib/components/base/TMTabControl.d.ts +7 -0
  27. package/lib/components/base/TMTabControl.js +225 -213
  28. package/lib/components/base/TMTooltip.d.ts +1 -1
  29. package/lib/components/base/TMTreeView.d.ts +8 -14
  30. package/lib/components/base/TMTreeView.js +20 -0
  31. package/lib/components/base/TMUserAvatar.d.ts +1 -2
  32. package/lib/components/base/TMVilViewer.d.ts +1 -2
  33. package/lib/components/base/TMWaitPanel.d.ts +2 -3
  34. package/lib/components/base/TMWaitPanel.js +1 -1
  35. package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
  36. package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
  37. package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +179 -0
  38. package/lib/components/base/waitPanel/TMWaitPanelManager.js +373 -0
  39. package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +57 -0
  40. package/lib/components/base/waitPanel/TMWaitPanelView.js +346 -0
  41. package/lib/components/base/waitPanel/index.d.ts +1 -0
  42. package/lib/components/base/waitPanel/index.js +1 -0
  43. package/lib/components/choosers/TMDistinctValues.js +3 -3
  44. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
  45. package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +1 -2
  46. package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +1 -2
  47. package/lib/components/choosers/TMPathChooser.js +17 -34
  48. package/lib/components/choosers/TMQuickSearchInfo.d.ts +1 -2
  49. package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
  50. package/lib/components/choosers/TMUserChooser.d.ts +2 -2
  51. package/lib/components/editors/TMEditorStyled.d.ts +42 -20
  52. package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
  53. package/lib/components/editors/TMHtmlContentDisplay.d.ts +1 -2
  54. package/lib/components/editors/TMHtmlEditor.d.ts +1 -2
  55. package/lib/components/editors/TMTextBox.d.ts +4 -0
  56. package/lib/components/editors/TMTextBox.js +99 -11
  57. package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
  58. package/lib/components/features/archive/TMArchive.js +7 -2
  59. package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +28 -0
  60. package/lib/components/features/assistant/TMHelpOnLineChat.js +1231 -0
  61. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
  62. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
  63. package/lib/components/features/blog/TMBlogCommentForm.d.ts +1 -2
  64. package/lib/components/features/documents/TMBatchUpdateForm.js +3 -4
  65. package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
  66. package/lib/components/features/documents/TMDcmtForm.js +50 -61
  67. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
  68. package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -4
  69. package/lib/components/features/documents/TMDcmtIcon.js +3 -5
  70. package/lib/components/features/documents/TMDcmtPreview.d.ts +6 -8
  71. package/lib/components/features/documents/TMDcmtPreview.js +5 -3
  72. package/lib/components/features/documents/TMDcmtTasks.d.ts +1 -2
  73. package/lib/components/features/documents/TMDcmtTasks.js +2 -9
  74. package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
  75. package/lib/components/features/documents/TMFileUploader.js +5 -5
  76. package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
  77. package/lib/components/features/documents/TMMasterDetailDcmts.js +53 -141
  78. package/lib/components/features/documents/TMMasterInfoFields.d.ts +1 -2
  79. package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
  80. package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
  81. package/lib/components/features/documents/TMMergeToPdfForm.js +59 -56
  82. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +1 -2
  83. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +14 -15
  84. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +5 -5
  85. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +3 -3
  86. package/lib/components/features/documents/TMRelationViewer.d.ts +13 -14
  87. package/lib/components/features/documents/TMRelationViewer.js +206 -143
  88. package/lib/components/features/documents/relationTreeState.d.ts +32 -0
  89. package/lib/components/features/documents/relationTreeState.js +89 -0
  90. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +1 -2
  91. package/lib/components/features/search/TMMetadataOutputForm.d.ts +1 -2
  92. package/lib/components/features/search/TMMetadataSorterForm.d.ts +1 -2
  93. package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
  94. package/lib/components/features/search/TMSearch.d.ts +1 -2
  95. package/lib/components/features/search/TMSearch.js +3 -4
  96. package/lib/components/features/search/TMSearchQueryPanel.d.ts +3 -9
  97. package/lib/components/features/search/TMSearchQueryPanel.js +0 -4
  98. package/lib/components/features/search/TMSearchResult.d.ts +5 -0
  99. package/lib/components/features/search/TMSearchResult.js +129 -102
  100. package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
  101. package/lib/components/features/search/TMSignatureInfoContent.d.ts +1 -2
  102. package/lib/components/features/search/TMTreeSelector.js +23 -27
  103. package/lib/components/features/search/TMViewHistoryDcmt.d.ts +1 -2
  104. package/lib/components/features/search/TMViewHistoryDcmt.js +15 -26
  105. package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
  106. package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
  107. package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
  108. package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
  109. package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
  110. package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
  111. package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
  112. package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
  113. package/lib/components/features/tasks/TMTasksView.js +97 -90
  114. package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +2 -3
  115. package/lib/components/features/wg/TMWGsCopyMoveForm.js +95 -91
  116. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +7 -8
  117. package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -3
  118. package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -3
  119. package/lib/components/forms/Login/Chooser.d.ts +2 -2
  120. package/lib/components/forms/TMChooserForm.d.ts +1 -2
  121. package/lib/components/forms/TMResultDialog.js +1 -1
  122. package/lib/components/forms/TMSaveForm.d.ts +4 -4
  123. package/lib/components/grids/TMBlogAttachments.d.ts +1 -2
  124. package/lib/components/grids/TMBlogHeader.d.ts +1 -1
  125. package/lib/components/grids/TMBlogsPost.d.ts +1 -1
  126. package/lib/components/grids/TMBlogsPost.js +93 -97
  127. package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
  128. package/lib/components/grids/TMValidationItemsList.d.ts +1 -2
  129. package/lib/components/index.d.ts +5 -1
  130. package/lib/components/index.js +4 -1
  131. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -2
  132. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +4 -3
  133. package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +3 -2
  134. package/lib/components/layout/panelManager/TMPanelManagerContext.js +5 -1
  135. package/lib/components/layout/panelManager/TMPanelManagerLoader.d.ts +5 -0
  136. package/lib/components/layout/panelManager/TMPanelManagerLoader.js +18 -0
  137. package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +6 -5
  138. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +4 -8
  139. package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
  140. package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +2 -1
  141. package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
  142. package/lib/components/pages/TMPage.d.ts +1 -1
  143. package/lib/components/pages/TMPage.js +32 -31
  144. package/lib/components/query/TMQueryEditor.d.ts +13 -14
  145. package/lib/components/query/TMQueryEditor.js +2 -1
  146. package/lib/components/settings/SettingsAppearance.d.ts +1 -2
  147. package/lib/components/sidebar/TMAboutApp.d.ts +1 -2
  148. package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
  149. package/lib/components/sidebar/TMHeader.d.ts +4 -3
  150. package/lib/components/sidebar/TMHeader.js +2 -2
  151. package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -3
  152. package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +2 -3
  153. package/lib/components/viewers/TMMidViewer.d.ts +2 -2
  154. package/lib/components/viewers/TMTidViewer.d.ts +2 -2
  155. package/lib/helper/Enum_Localizator.js +1 -0
  156. package/lib/helper/SDKUI_Globals.d.ts +7 -2
  157. package/lib/helper/SDKUI_Globals.js +7 -2
  158. package/lib/helper/SDKUI_Localizator.d.ts +31 -6
  159. package/lib/helper/SDKUI_Localizator.js +301 -51
  160. package/lib/helper/TMAppUpdatedModal.d.ts +1 -2
  161. package/lib/helper/TMAppUpdatedModal.js +93 -93
  162. package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
  163. package/lib/helper/TMIcons.d.ts +280 -280
  164. package/lib/helper/TMPdfViewer.d.ts +1 -2
  165. package/lib/helper/TMToppyMessage.d.ts +2 -2
  166. package/lib/helper/TMUtils.d.ts +4 -10
  167. package/lib/helper/ZipManager.d.ts +1 -1
  168. package/lib/helper/ZipManager.js +2 -1
  169. package/lib/helper/dcmtsHelper.d.ts +2 -0
  170. package/lib/helper/dcmtsHelper.js +3 -1
  171. package/lib/helper/helpers.d.ts +1 -1
  172. package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
  173. package/lib/hooks/useCheckInOutOperations.js +14 -34
  174. package/lib/hooks/useDcmtOperations.d.ts +3 -12
  175. package/lib/hooks/useDcmtOperations.js +201 -184
  176. package/lib/hooks/useDocumentOperations.d.ts +1 -0
  177. package/lib/hooks/useDocumentOperations.js +14 -25
  178. package/lib/hooks/useInputDialog.d.ts +1 -2
  179. package/lib/hooks/useMultiMasterDetailDcmts.d.ts +0 -15
  180. package/lib/hooks/useMultiMasterDetailDcmts.js +70 -68
  181. package/lib/hooks/usePreventFileDrop.js +9 -0
  182. package/lib/hooks/useWorkflowApprove.js +33 -17
  183. package/lib/services/caseflow/CaseFlowService.d.ts +69 -9
  184. package/lib/services/caseflow/CaseFlowService.js +126 -58
  185. package/lib/services/platform_services.d.ts +2 -3
  186. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { FormModes, TaskContext } from "../../../ts";
3
2
  import { HomeBlogPost, TaskDescriptor } from "@topconsultnpm/sdk-ts";
4
3
  interface TMDcmtTasksProps {
@@ -13,5 +12,5 @@ interface TMDcmtTasksProps {
13
12
  handleNavigateToDossiers?: (value: HomeBlogPost | number) => Promise<void>;
14
13
  onBack?: () => void;
15
14
  }
16
- declare const TMDcmtTasks: (props: TMDcmtTasksProps) => React.JSX.Element;
15
+ declare const TMDcmtTasks: (props: TMDcmtTasksProps) => import("react/jsx-runtime").JSX.Element;
17
16
  export default TMDcmtTasks;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
- import { IconMenuVertical, IconRefresh, SDKUI_Localizator, TMCommandsContextMenu } from "../../../helper";
3
+ import { SDKUI_Localizator } from "../../../helper";
4
4
  import { DeviceType, useDeviceType } from "../../base/TMDeviceProvider";
5
5
  import { useTMPanelManagerContext } from "../../layout/panelManager/TMPanelManagerContext";
6
6
  import TMPanel from "../../base/TMPanel";
@@ -12,13 +12,6 @@ const TMDcmtTasks = (props) => {
12
12
  // This avoids unnecessary re-renders by only recalculating when deviceType changes.
13
13
  let isMobile = useMemo(() => { return deviceType === DeviceType.MOBILE; }, [deviceType]);
14
14
  const { togglePanelVisibility, toggleMaximize, countVisibleLeafPanels } = useTMPanelManagerContext();
15
- const toolbar = useMemo(() => _jsx(TMCommandsContextMenu, { target: '#TMTaksPanel-Commands-Header', showEvent: "click", menuItems: [
16
- {
17
- icon: _jsx(IconRefresh, {}),
18
- onClick: async () => await getAllTasks(),
19
- text: SDKUI_Localizator.Refresh,
20
- },
21
- ], children: _jsx(IconMenuVertical, { id: "TMTaksPanel-Commands-Header", color: 'white', cursor: 'pointer' }) }), []);
22
- return _jsx("div", { style: { width: "100%", height: "100%", position: 'relative' }, children: _jsx(TMPanel, { title: SDKUI_Localizator.Widget_Activities, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onClose: countVisibleLeafPanels() > 1 ? () => togglePanelVisibility("tmDcmtTasks") : undefined, onMaximize: countVisibleLeafPanels() > 1 ? () => toggleMaximize("tmDcmtTasks") : undefined, toolbar: toolbar, onBack: onBack, children: _jsx(TMTasksPanelContent, { id: "dcmtTasks", taskContext: taskContext, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs ? handleNavigateToWGs : () => { return Promise.resolve(); }, handleNavigateToDossiers: handleNavigateToDossiers ? handleNavigateToDossiers : () => { return Promise.resolve(); }, afterTaskSaved: afterTaskSaved }) }) });
15
+ return _jsx("div", { style: { width: "100%", height: "100%", position: 'relative' }, children: _jsx(TMPanel, { title: SDKUI_Localizator.Widget_Activities, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onClose: countVisibleLeafPanels() > 1 ? () => togglePanelVisibility("tmDcmtTasks") : undefined, onMaximize: countVisibleLeafPanels() > 1 ? () => toggleMaximize("tmDcmtTasks") : undefined, onRefresh: getAllTasks, onBack: onBack, children: _jsx(TMTasksPanelContent, { id: "dcmtTasks", taskContext: taskContext, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs ? handleNavigateToWGs : () => { return Promise.resolve(); }, handleNavigateToDossiers: handleNavigateToDossiers ? handleNavigateToDossiers : () => { return Promise.resolve(); }, afterTaskSaved: afterTaskSaved }) }) });
23
16
  };
24
17
  export default TMDcmtTasks;
@@ -2,5 +2,5 @@ interface TMDragDropOverlayProps {
2
2
  handleFile: (file: File) => void;
3
3
  refocusAfterFileInput: () => void;
4
4
  }
5
- declare const TMDragDropOverlay: (props: TMDragDropOverlayProps) => import("react").JSX.Element;
5
+ declare const TMDragDropOverlay: (props: TMDragDropOverlayProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export default TMDragDropOverlay;
@@ -29,6 +29,7 @@ const TMFileUploader = ({ fromDTD, deviceType = DeviceType.DESKTOP, onClose, onF
29
29
  const [fileSize, setFileSize] = useState(undefined);
30
30
  const [fileExt, setFileExt] = useState(undefined);
31
31
  const uploaderRef = useRef(null);
32
+ const fileInputRef = useRef(null);
32
33
  // Ref al TMPanel per chiamare focusPanel()
33
34
  const fileUploaderPanelRef = useRef(null);
34
35
  usePreventFileDrop([uploaderRef]);
@@ -85,19 +86,18 @@ const TMFileUploader = ({ fromDTD, deviceType = DeviceType.DESKTOP, onClose, onF
85
86
  setFileSize(undefined);
86
87
  setFileExt(undefined);
87
88
  onFileUpload?.(null);
88
- const fileInput = document.getElementById('fileInput');
89
- if (fileInput) {
90
- fileInput.value = '';
89
+ if (fileInputRef.current) {
90
+ fileInputRef.current.value = '';
91
91
  }
92
92
  //Rifocalizza dopo la cancellazione del file
93
93
  if (refocus)
94
94
  refocusAfterFileInput();
95
95
  }, [onFileUpload, refocusAfterFileInput]);
96
96
  const browseHandler = useCallback(() => {
97
- document.getElementById('fileInput')?.click();
97
+ fileInputRef.current?.click();
98
98
  }, []);
99
99
  let content = !uploadedFile ?
100
- _jsxs("div", { style: { display: 'flex', gap: 10, width: '100%', height: '100%' }, children: [_jsx(HiddenInput, { id: "fileInput", type: "file", onChange: handleInputChange }), _jsxs(UploadContainer, { ref: uploaderRef, tabIndex: 0, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, style: { backgroundColor: dragOver ? '#76b1e6' : 'white' }, onDoubleClick: browseHandler, $isRequired: isRequired, children: [_jsxs("div", { style: { display: 'flex', gap: '10px', flexDirection: 'column', position: 'absolute', right: 5, top: 5 }, children: [_jsx(TMButton, { btnStyle: 'icon', caption: 'Sfoglia', color: isRequired && !uploadedFile ? 'error' : 'primary', onClick: browseHandler, icon: _jsx(IconFolderOpen, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { onScanRequest((file) => { onFileUpload?.(file); }); }, icon: _jsx(IconScanner, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && !onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { ShowAlert({ message: SDKUI_Localizator.ScanFeatureUnavailableInThisContext, mode: 'info', duration: 3000, title: 'Scanner' }); }, icon: _jsx(IconScanner, { fontSize: 22 }) })] }), _jsx("p", { style: { fontSize: '1.2rem', fontWeight: 'bold' }, children: deviceType === DeviceType.MOBILE ? SDKUI_Localizator.ClickToBrowseFile : SDKUI_Localizator.DragOrDoubleClickToBrowseFile }), isRequired && _jsxs("p", { style: { fontWeight: 'bold' }, children: [" ", SDKUI_Localizator.RequiredField, " "] })] })] }) :
100
+ _jsxs("div", { style: { display: 'flex', gap: 10, width: '100%', height: '100%' }, children: [_jsx(HiddenInput, { ref: fileInputRef, type: "file", onChange: handleInputChange }), _jsxs(UploadContainer, { ref: uploaderRef, tabIndex: 0, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, style: { backgroundColor: dragOver ? '#76b1e6' : 'white' }, onDoubleClick: browseHandler, $isRequired: isRequired, children: [_jsxs("div", { style: { display: 'flex', gap: '10px', flexDirection: 'column', position: 'absolute', right: 5, top: 5 }, children: [_jsx(TMButton, { btnStyle: 'icon', caption: 'Sfoglia', color: isRequired && !uploadedFile ? 'error' : 'primary', onClick: browseHandler, icon: _jsx(IconFolderOpen, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { onScanRequest((file) => { onFileUpload?.(file); }); }, icon: _jsx(IconScanner, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && !onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { ShowAlert({ message: SDKUI_Localizator.ScanFeatureUnavailableInThisContext, mode: 'info', duration: 3000, title: 'Scanner' }); }, icon: _jsx(IconScanner, { fontSize: 22 }) })] }), _jsx("p", { style: { fontSize: '1.2rem', fontWeight: 'bold' }, children: deviceType === DeviceType.MOBILE ? SDKUI_Localizator.ClickToBrowseFile : SDKUI_Localizator.DragOrDoubleClickToBrowseFile }), isRequired && _jsxs("p", { style: { fontWeight: 'bold' }, children: [" ", SDKUI_Localizator.RequiredField, " "] })] })] }) :
101
101
  _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 10, width: '100%', height: '100%' }, children: [_jsxs("div", { style: { backgroundColor: 'white', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.primaryColor }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 5 }, children: [_jsx("p", { children: "File name:" }), _jsxs("div", { style: { fontWeight: 'bold' }, children: [fileName, " ", _jsxs("span", { children: [" ", ` (${formatBytes(fileSize)})`, " "] })] })] }), uploadedFile && _jsx(TMButton, { btnStyle: 'icon', color: 'error', caption: 'Pulisci', onClick: () => clearFile(true), icon: _jsx(IconClear, { fontSize: 22 }) })] }), extensionHandler(fileExt) === FileExtensionHandler.READY_TO_SHOW ? _jsx(TMFileViewer, { fileBlob: uploadedFile, isResizingActive: isResizingActive }) :
102
102
  _jsx("div", { style: { backgroundColor: '#f6dbdb', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.error }, children: _jsxs("div", { children: [" ", SDKUI_Localizator.PreviewNotAvailable, fileExt && _jsx("b", { children: ` (*.${fileExt})` })] }) })] });
103
103
  const innerContent = (_jsxs("div", { style: { width: '100%', height: '100%', padding: '2px', display: 'flex', flexDirection: 'column', gap: 10 }, children: [enableDragDropOverlay && _jsx(TMDragDropOverlay, { handleFile: handleFile, refocusAfterFileInput: refocusAfterFileInput }), content] }));
@@ -22,6 +22,8 @@ interface ITMMasterDetailDcmtsProps extends DeviceContextProps {
22
22
  onNext?: () => void;
23
23
  onPrev?: () => void;
24
24
  onBack?: () => void;
25
+ /** Invocato quando il calcolo iniziale delle correlazioni è finito */
26
+ onFirstLoadCompleted?: () => void;
25
27
  appendMasterDcmts?: (tid: number | undefined, did: number | undefined) => void;
26
28
  onTaskCreateRequest?: (taskContext: TaskContext, onTaskCreated?: (task?: TaskDescriptor) => void) => void;
27
29
  onRefreshAfterAddDcmtToFavs?: () => void;
@@ -14,12 +14,13 @@ import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/p
14
14
  import TMSearchResult from '../search/TMSearchResult';
15
15
  import TMDcmtForm from './TMDcmtForm';
16
16
  import { TMNothingToShow } from './TMDcmtPreview';
17
- import { TMButton, TMLayoutWaitingContainer } from '../..';
17
+ import { TMButton } from '../..';
18
+ import TMLayoutContainer from '../../base/TMLayout';
18
19
  import { useDocumentOperations } from '../../../hooks/useDocumentOperations';
19
20
  import TMToppyMessage from '../../../helper/TMToppyMessage';
20
21
  import TMPanel from '../../base/TMPanel';
21
- import sixLogo from '../../../assets/six.png';
22
- const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, deviceType, inputDcmts, isForMaster, showCurrentDcmtIndicator = true, allowNavigation, canNext, canPrev, onNext, onPrev, onBack, appendMasterDcmts, onTaskCreateRequest, onRefreshAfterAddDcmtToFavs, editPdfForm, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, datagridUtility, dcmtUtility, fetchRemoteCertificates }) => {
22
+ import TMSpinner from '../../base/TMSpinner';
23
+ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, deviceType, inputDcmts, isForMaster, showCurrentDcmtIndicator = true, allowNavigation, canNext, canPrev, onNext, onPrev, onBack, onFirstLoadCompleted, appendMasterDcmts, onTaskCreateRequest, onRefreshAfterAddDcmtToFavs, editPdfForm, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, datagridUtility, dcmtUtility, fetchRemoteCertificates }) => {
23
24
  const floatingBarContainerRef = useRef(null);
24
25
  const [focusedItem, setFocusedItem] = useState();
25
26
  const [selectedItems, setSelectedItems] = useState([]);
@@ -45,6 +46,13 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
45
46
  const [refreshKey, setRefreshKey] = useState(0);
46
47
  // Separate refresh key for TMFormOrResultWrapper only (doesn't affect tmTreeView)
47
48
  const [refreshKeyFormOrResult, setRefreshKeyFormOrResult] = useState(0);
49
+ // Stato dell'albero conservato qui perché il bump di refreshKey rimonta TMRelationViewer:
50
+ // una ref interna al viewer non sopravvivrebbe. Riletto dal useMemo di tmTreeView,
51
+ // che si ricalcola proprio al refresh.
52
+ const treeStateRef = useRef(undefined);
53
+ const handleTreeStateChange = useCallback((state) => {
54
+ treeStateRef.current = state;
55
+ }, []);
48
56
  /** State for transformed focusedItem metadata values (similar to formData in TMDcmtForm) */
49
57
  const [focusedItemFormData, setFocusedItemFormData] = useState([]);
50
58
  // Trigger operationItems refresh (after file substitution, etc.)
@@ -64,6 +72,24 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
64
72
  setIsCheckingFirstLoad(false);
65
73
  }
66
74
  }, [isRelationViewerLoading, isCheckingFirstLoad]);
75
+ useEffect(() => {
76
+ if (!isCheckingFirstLoad)
77
+ onFirstLoadCompleted?.();
78
+ }, [isCheckingFirstLoad, onFirstLoadCompleted]);
79
+ // Dal montaggio fino all'apertura del wait panel del viewer (il tempo di caricare i
80
+ // tipi documento) la pagina resta nascosta: senza spinner non si vedrebbe nulla.
81
+ const [waitingFirstLoad, setWaitingFirstLoad] = useState(true);
82
+ useEffect(() => {
83
+ if (!waitingFirstLoad)
84
+ return;
85
+ // Da qui in avanti e' il wait panel a dare riscontro
86
+ if (isRelationViewerLoading) {
87
+ setWaitingFirstLoad(false);
88
+ return;
89
+ }
90
+ TMSpinner.show({ description: SDKUI_Localizator.Loading });
91
+ return () => TMSpinner.hide();
92
+ }, [waitingFirstLoad, isRelationViewerLoading]);
67
93
  // Increments trigger counter to force operationItems to re-calculate
68
94
  const onRefreshOperationsDatagrid = useCallback(async () => {
69
95
  setRefreshOperationsTrigger(prev => prev + 1);
@@ -72,12 +98,6 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
72
98
  const handleStopCalculationReady = useCallback((stopCalculation) => {
73
99
  stopRelationsCalculationRef.current = stopCalculation;
74
100
  }, []);
75
- // Interrompe il calcolo delle correlazioni: mostra subito quelle già calcolate
76
- // senza attendere le restanti chiamate GetMetadata
77
- const handleStopRelationsCalculation = useCallback(() => {
78
- stopRelationsCalculationRef.current?.();
79
- setIsCheckingFirstLoad(false); // Nasconde l'overlay e mostra l'albero (parziale)
80
- }, []);
81
101
  // Esce dalla maschera interrompendo anche le chiamate GetMetadata ancora in coda:
82
102
  // l'interruzione è invocata in modo sincrono perché onBack può smontare il componente
83
103
  // (un effect non farebbe in tempo a propagare l'interruzione)
@@ -86,25 +106,30 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
86
106
  stopRelationsCalculationRef.current?.();
87
107
  onBack?.();
88
108
  }, [onBack]);
89
- const handleCancelFirstLoad = useCallback(() => {
90
- setIsCheckingFirstLoad(false);
91
- handleBack();
92
- }, [handleBack]);
93
- // Avanzamento del calcolo correlazioni, mostrato nell'overlay di primo caricamento
94
- const [relationsProgress, setRelationsProgress] = useState({ value: 0, max: 0 });
95
- const handleRelationsProgress = useCallback((value, max) => {
96
- setRelationsProgress({ value, max });
97
- }, []);
98
- // Notifica all'utente che i dati mostrati sono parziali (non quando si sta uscendo)
109
+ // Letta da handleRelationsCalculationStopped, che deve restare stabile: arriva fino
110
+ // alle dipendenze di loadData nel viewer, dove un cambio farebbe ripartire il calcolo
111
+ const handleBackRef = useRef(handleBack);
112
+ handleBackRef.current = handleBack;
113
+ // Notifica all'utente che i dati mostrati sono parziali
99
114
  const handleRelationsCalculationStopped = useCallback((loadedCount, totalCount) => {
100
115
  if (isLeavingRef.current)
101
116
  return;
102
- // Con piu' documenti in input, indica quanti sono stati completati (es. "3/10")
103
- const progress = totalCount > 1 ? ` (${loadedCount}/${totalCount})` : '';
117
+ // Interrotto prima di calcolare qualcosa: non c'è nulla da mostrare, si torna indietro
118
+ if (loadedCount === 0) {
119
+ ShowAlert({
120
+ message: SDKUI_Localizator.RelationsCalculationStoppedEmpty,
121
+ title: SDKUI_Localizator.Attention,
122
+ duration: 6000,
123
+ mode: 'warning',
124
+ });
125
+ handleBackRef.current();
126
+ return;
127
+ }
128
+ // Testo breve: il box di ShowAlert ha altezza fissa e taglia oltre le due righe
104
129
  ShowAlert({
105
- message: `${SDKUI_Localizator.RelationsCalculationStopped}${progress}`,
130
+ message: SDKUI_Localizator.RelationsCalculationStoppedProgress.replaceParams(loadedCount.toString(), totalCount.toString()),
106
131
  title: SDKUI_Localizator.Attention,
107
- duration: 4000,
132
+ duration: 6000,
108
133
  mode: 'info',
109
134
  });
110
135
  }, []);
@@ -282,7 +307,6 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
282
307
  onRefreshAfterAddDcmtToFavs,
283
308
  },
284
309
  });
285
- const { dcmtOperations: { abortController, showWaitPanel, showPrimary, waitPanelTitle, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, }, } = features;
286
310
  // Nuovi documenti in input: il componente non sta più uscendo dalla maschera
287
311
  // (chiave stabile: l'array inputDcmts può essere ricreato a ogni render)
288
312
  const inputDcmtsKey = useMemo(() => (inputDcmts ?? []).map(d => `${d.TID}-${d.DID}`).join('|'), [inputDcmts]);
@@ -386,11 +410,11 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
386
410
  setContextMenuVisible(true);
387
411
  }, children: [_jsx(TMRelationViewerWrapper, { refreshKey: refreshKey, inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, showZeroDcmts: showZeroDcmts,
388
412
  // customItemRender={customItemRender}
389
- allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: handleSelectedItemsChanged, onNoRelationsFound: handleNoRelationsFound, onItemContextMenu: isRelationViewerLoading ? undefined : onItemContextMenu, focusedItemFormData: focusedItemFormData, onLoadingStateChanged: setIsRelationViewerLoading, onLoadingProgress: handleRelationsProgress, onStopCalculationReady: handleStopCalculationReady, onCalculationStopped: handleRelationsCalculationStopped }), _jsx(TMContextMenu, { items: operationItems, externalControl: {
413
+ allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: handleSelectedItemsChanged, onNoRelationsFound: handleNoRelationsFound, onItemContextMenu: isRelationViewerLoading ? undefined : onItemContextMenu, onLoadingStateChanged: setIsRelationViewerLoading, onStopCalculationReady: handleStopCalculationReady, onCalculationStopped: handleRelationsCalculationStopped, initialTreeState: treeStateRef.current, onTreeStateChange: handleTreeStateChange }), _jsx(TMContextMenu, { items: operationItems, externalControl: {
390
414
  visible: contextMenuVisible,
391
415
  position: contextMenuPosition,
392
416
  onClose: () => setContextMenuVisible(false)
393
- } })] }) }), [inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, allowMultipleSelection, focusedItem, selectedItems, handleFocusedItemChanged, handleSelectedItemsChanged, handleNoRelationsFound, onItemContextMenu, contextMenuVisible, contextMenuPosition, refreshKey, focusedItemFormData, isRelationViewerLoading, handleStopCalculationReady, handleRelationsCalculationStopped]);
417
+ } })] }) }), [inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, allowMultipleSelection, focusedItem, selectedItems, handleFocusedItemChanged, handleSelectedItemsChanged, handleNoRelationsFound, onItemContextMenu, contextMenuVisible, contextMenuPosition, refreshKey, focusedItemFormData, isRelationViewerLoading, handleStopCalculationReady, handleRelationsCalculationStopped, handleTreeStateChange]);
394
418
  const tmFormOrResult = useMemo(() => _jsx(TMFormOrResultWrapper, { refreshKey: refreshKeyFormOrResult, deviceType: deviceType, focusedItem: focusedItem, onTaskCreateRequest: onTaskCreateRequest, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, handleNavigateToReference: handleNavigateToReference, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, editPdfForm: editPdfForm, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, onRefreshSearchResults: onRefreshAllPanels }), [focusedItem, deviceType, allTasks, handleNavigateToWGs, handleNavigateToDossiers, handleNavigateToReference, editPdfForm, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, onRefreshAfterAddDcmtToFavs, refreshKeyFormOrResult]);
395
419
  const initialPanelDimensions = {
396
420
  'tmTreeView': { width: '50%', height: '100%' },
@@ -470,9 +494,7 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
470
494
  toolbarOptions: { icon: _jsx(IconSearchCheck, { fontSize: 24 }), visible: false, orderNumber: 2, isActive: allInitialPanelVisibility['tmFormOrResult'] }
471
495
  }
472
496
  ], [tmTreeView, tmFormOrResult, focusedItem?.isDcmt, dtdMaster]);
473
- return (_jsxs("div", { style: { width: '100%', height: '100%', position: 'relative' }, children: [isCheckingFirstLoad && (_jsx(TMLoadingOverlay, { onCancel: handleCancelFirstLoad, onStop: handleStopRelationsCalculation, description: relationsProgress.max > 1
474
- ? `${isForMaster ? SDKUI_Localizator.LoadingMasterDocuments : SDKUI_Localizator.LoadingDetailDocuments} (${relationsProgress.value}/${relationsProgress.max})`
475
- : undefined, progressValue: relationsProgress.value, progressMax: relationsProgress.max })), _jsxs("div", { style: isCheckingFirstLoad ? { position: 'absolute', width: 0, height: 0, overflow: 'hidden', opacity: 0, pointerEvents: 'none' } : { width: '100%', height: '100%' }, children: [_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmTreeView', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true }) }) }), renderDcmtOperations, renderFloatingBar] })] }));
497
+ return (_jsx("div", { style: { width: '100%', height: '100%', position: 'relative' }, children: _jsxs("div", { style: isCheckingFirstLoad ? { position: 'absolute', width: 0, height: 0, overflow: 'hidden', opacity: 0, pointerEvents: 'none' } : { width: '100%', height: '100%' }, children: [_jsx(TMLayoutContainer, { direction: 'vertical', children: _jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmTreeView', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true }) }) }), renderDcmtOperations, renderFloatingBar] }) }));
476
498
  };
477
499
  export default TMMasterDetailDcmts;
478
500
  /**
@@ -481,7 +503,7 @@ export default TMMasterDetailDcmts;
481
503
  * - Panel visibility toggling
482
504
  * - Focus delay handling
483
505
  */
484
- const TMRelationViewerWrapper = ({ refreshKey, inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, customItemRender, allowMultipleSelection, focusedItem, selectedItems, onFocusedItemChanged, onSelectedItemsChanged, onNoRelationsFound, onItemContextMenu, focusedItemFormData, onLoadingStateChanged, onLoadingProgress, onStopCalculationReady, onCalculationStopped }) => {
506
+ const TMRelationViewerWrapper = ({ refreshKey, inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, customItemRender, allowMultipleSelection, focusedItem, selectedItems, onFocusedItemChanged, onSelectedItemsChanged, onNoRelationsFound, onItemContextMenu, onLoadingStateChanged, onStopCalculationReady, onCalculationStopped, initialTreeState, onTreeStateChange }) => {
485
507
  const { setPanelVisibilityById, setToolbarButtonVisibility } = useTMPanelManagerContext();
486
508
  // Monitor device type changes to restore panel visibility when switching from mobile to desktop
487
509
  const deviceType = useDeviceType();
@@ -541,7 +563,7 @@ const TMRelationViewerWrapper = ({ refreshKey, inputDcmts, isForMaster, showCurr
541
563
  onItemContextMenu?.(item, e);
542
564
  }, 100);
543
565
  }, [onItemContextMenu, handleFocusedItemChanged]);
544
- return (_jsx(TMRelationViewer, { inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, initialShowZeroDcmts: showZeroDcmts, customItemRender: customItemRender, allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: onSelectedItemsChanged, maxDepthLevel: 1, invertMasterNavigation: false, showExpandAllButton: true, onNoRelationsFound: onNoRelationsFound, onItemContextMenu: onContextMenu, focusedItemFormData: focusedItemFormData, onLoadingStateChanged: onLoadingStateChanged, onLoadingProgress: onLoadingProgress, onStopCalculationReady: onStopCalculationReady, onCalculationStopped: onCalculationStopped }, refreshKey));
566
+ return (_jsx(TMRelationViewer, { inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, initialShowZeroDcmts: showZeroDcmts, customItemRender: customItemRender, allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: onSelectedItemsChanged, maxDepthLevel: 1, invertMasterNavigation: false, showExpandAllButton: true, onNoRelationsFound: onNoRelationsFound, onItemContextMenu: onContextMenu, onLoadingStateChanged: onLoadingStateChanged, onStopCalculationReady: onStopCalculationReady, onCalculationStopped: onCalculationStopped, initialTreeState: initialTreeState, onTreeStateChange: onTreeStateChange }, refreshKey));
545
567
  };
546
568
  const TMFormOrResultWrapper = ({ refreshKey, deviceType, focusedItem, onTaskCreateRequest, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, onRefreshAfterAddDcmtToFavs, editPdfForm, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, onRefreshSearchAsyncDatagrid, onRefreshSearchResults, handleNavigateToReference, fetchRemoteCertificates }) => {
547
569
  const { setPanelVisibilityById } = useTMPanelManagerContext();
@@ -551,113 +573,3 @@ const TMFormOrResultWrapper = ({ refreshKey, deviceType, focusedItem, onTaskCrea
551
573
  }, fetchRemoteCertificates: fetchRemoteCertificates }, refreshKey) :
552
574
  focusedItem?.searchResult === undefined ? (_jsx(TMPanel, { title: SDKUI_Localizator.SearchResult, children: _jsx(TMToppyMessage, { message: SDKUI_Localizator.SelectDocumentToViewSearchResults }) })) : (_jsx(TMSearchResult, { groupId: 'tmFormOrResult', isClosable: deviceType !== DeviceType.MOBILE, context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, allowRelations: false, openDcmtFormAsModal: true, searchResults: focusedItem?.searchResult ?? [], showSearchResultSidebar: false, showDcmtFormSidebar: false, autoFocusFirstRow: false, onTaskCreateRequest: onTaskCreateRequest, onClose: () => { setPanelVisibilityById('tmTreeView', true); }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, editPdfForm: editPdfForm, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, enablePinIcons: false, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, showBackButton: false, onRefreshSearchAsyncDatagrid: onRefreshSearchResults, onReferenceClick: handleNavigateToReference, fetchRemoteCertificates: fetchRemoteCertificates }, refreshKey)) }));
553
575
  };
554
- const TMLoadingOverlay = ({ onCancel, onStop, description, cancelText, stopText, progressValue, progressMax }) => {
555
- // Stesso calcolo di TMWaitPanel: 0 quando il massimo non è ancora noto
556
- const progressPercent = (progressMax ?? 0) > 0
557
- ? Math.min(100, ((progressValue ?? 0) / (progressMax ?? 1)) * 100)
558
- : 0;
559
- return (_jsx("div", { style: {
560
- position: 'absolute',
561
- top: 0,
562
- left: 0,
563
- width: '100%',
564
- height: '100%',
565
- backgroundColor: 'rgba(248, 250, 252, 0.92)',
566
- zIndex: 1000,
567
- display: 'flex',
568
- justifyContent: 'center',
569
- alignItems: 'center',
570
- }, children: _jsxs("div", { style: {
571
- display: 'flex',
572
- flexDirection: 'column',
573
- alignItems: 'center',
574
- gap: '16px',
575
- padding: '24px 32px',
576
- background: '#fcfcfc',
577
- borderRadius: '8px',
578
- boxShadow: '0 4px 16px rgba(0, 0, 0, 0.1)',
579
- }, children: [_jsxs("div", { style: { position: 'relative', width: '80px', height: '80px' }, children: [_jsx("img", { style: {
580
- position: 'absolute',
581
- top: '50%',
582
- left: '50%',
583
- transform: 'translate(-54%, -54%)'
584
- }, src: sixLogo, width: 35, alt: "" }), _jsx("style", { children: `
585
- @keyframes tmSpinnerRotate {
586
- 0% { transform: rotate(0deg); }
587
- 100% { transform: rotate(360deg); }
588
- }
589
- .tm-spinner-animation {
590
- display: inline-block;
591
- width: 80px;
592
- height: 80px;
593
- position: absolute;
594
- top: 50%;
595
- left: 50%;
596
- transform: translate(-50%, -50%);
597
- }
598
- .tm-spinner-animation div {
599
- animation: tmSpinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
600
- transform-origin: 40px 40px;
601
- }
602
- .tm-spinner-animation div:after {
603
- content: " ";
604
- display: block;
605
- position: absolute;
606
- width: 7px;
607
- height: 7px;
608
- border-radius: 50%;
609
- background: #0c448e;
610
- margin: -4px 0 0 -4px;
611
- }
612
- .tm-spinner-animation div:nth-child(1) { animation-delay: -0.036s; }
613
- .tm-spinner-animation div:nth-child(1):after { top: 63px; left: 63px; background: #f7a51f; }
614
- .tm-spinner-animation div:nth-child(2) { animation-delay: -0.072s; }
615
- .tm-spinner-animation div:nth-child(2):after { top: 68px; left: 56px; background: #f7a51f; }
616
- .tm-spinner-animation div:nth-child(3) { animation-delay: -0.108s; }
617
- .tm-spinner-animation div:nth-child(3):after { top: 71px; left: 48px; background: #d3237b; }
618
- .tm-spinner-animation div:nth-child(4) { animation-delay: -0.144s; }
619
- .tm-spinner-animation div:nth-child(4):after { top: 72px; left: 40px; background: #d3237b; }
620
- .tm-spinner-animation div:nth-child(5) { animation-delay: -0.18s; }
621
- .tm-spinner-animation div:nth-child(5):after { top: 71px; left: 32px; background: #d12a1c; }
622
- .tm-spinner-animation div:nth-child(6) { animation-delay: -0.216s; }
623
- .tm-spinner-animation div:nth-child(6):after { top: 68px; left: 24px; background: #d12a1c; }
624
- .tm-spinner-animation div:nth-child(7) { animation-delay: -0.252s; }
625
- .tm-spinner-animation div:nth-child(7):after { top: 63px; left: 17px; background: #782b7d; }
626
- .tm-spinner-animation div:nth-child(8) { animation-delay: -0.288s; }
627
- .tm-spinner-animation div:nth-child(8):after { top: 56px; left: 12px; background: #782b7d; }
628
- ` }), _jsxs("div", { className: "tm-spinner-animation", children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }), _jsx("span", { style: { fontSize: '14px', color: '#334155', textAlign: 'center' }, children: description ?? SDKUI_Localizator.Loading }), (progressMax ?? 0) > 1 && (_jsxs("div", { style: { width: '260px' }, children: [_jsx("div", { style: { width: '100%', height: '20px', background: '#e0e0e0', borderRadius: '10px', overflow: 'hidden' }, children: _jsx("div", { style: { width: `${progressPercent.toFixed(2)}%`, height: '100%', background: '#4caf50', transition: 'width 0.3s ease' } }) }), _jsxs("p", { style: { fontWeight: 'bold', color: '#333', margin: '8px 0 0', textAlign: 'center' }, children: [progressPercent.toFixed(2), "%"] })] })), (onStop || onCancel) && (_jsxs("div", { style: { marginTop: '4px', display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap', gap: '10px' }, children: [onStop && (_jsx("button", { onClick: onStop, title: SDKUI_Localizator.StopRelationsCalculation, style: {
629
- padding: '8px 24px',
630
- fontSize: '13px',
631
- fontWeight: 500,
632
- color: 'white',
633
- background: '#0c448e',
634
- border: '1.5px solid #0c448e',
635
- borderRadius: '6px',
636
- cursor: 'pointer',
637
- transition: 'all 0.2s ease',
638
- }, onMouseEnter: (e) => {
639
- e.currentTarget.style.background = '#0a3872';
640
- e.currentTarget.style.borderColor = '#0a3872';
641
- }, onMouseLeave: (e) => {
642
- e.currentTarget.style.background = '#0c448e';
643
- e.currentTarget.style.borderColor = '#0c448e';
644
- }, children: stopText ?? SDKUI_Localizator.ShowPartialResults })), onCancel && (_jsx("button", { onClick: onCancel, style: {
645
- padding: '8px 24px',
646
- fontSize: '13px',
647
- fontWeight: 500,
648
- color: '#64748b',
649
- background: 'transparent',
650
- border: '1.5px solid #cbd5e1',
651
- borderRadius: '6px',
652
- cursor: 'pointer',
653
- transition: 'all 0.2s ease',
654
- }, onMouseEnter: (e) => {
655
- e.currentTarget.style.background = '#f1f5f9';
656
- e.currentTarget.style.borderColor = '#94a3b8';
657
- e.currentTarget.style.color = '#475569';
658
- }, onMouseLeave: (e) => {
659
- e.currentTarget.style.background = 'transparent';
660
- e.currentTarget.style.borderColor = '#cbd5e1';
661
- e.currentTarget.style.color = '#64748b';
662
- }, children: cancelText ?? SDKUI_Localizator.Back }))] }))] }) }));
663
- };
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { DcmtTypeDescriptor } from '@topconsultnpm/sdk-ts';
3
2
  import { DcmtInfo } from '../../../ts';
4
3
  interface TMMasterInfoFieldsProps {
@@ -16,5 +15,5 @@ interface TMMasterInfoFieldsProps {
16
15
  */
17
16
  isExpandedView?: boolean;
18
17
  }
19
- declare const TMMasterInfoFields: ({ dtd, dcmt, getValuesByMidAsync, reloadToken, isExpandedView }: TMMasterInfoFieldsProps) => React.JSX.Element;
18
+ declare const TMMasterInfoFields: ({ dtd, dcmt, getValuesByMidAsync, reloadToken, isExpandedView }: TMMasterInfoFieldsProps) => import("react/jsx-runtime").JSX.Element;
20
19
  export default TMMasterInfoFields;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useState } from 'react';
3
3
  import { DataListViewModes, MetadataDataDomains, SDK_Globals } from '@topconsultnpm/sdk-ts';
4
4
  import { hoverStyle, IconChevronDown, IconClearButton, IconCopy, IconSearch, IconSuccess, SDKUI_Localizator } from '../../../helper';
5
- import { formatScalarValue, getUserMetadataSorted } from '../../../helper/dcmtsHelper';
5
+ import { canViewMetadata, formatScalarValue, getUserMetadataSorted } from '../../../helper/dcmtsHelper';
6
6
  import { useDataListItem } from '../../../hooks/useDataListItem';
7
7
  import { TMColors } from '../../../utils/theme';
8
8
  import ShowAlert from '../../base/TMAlert';
@@ -84,7 +84,8 @@ const TMMasterInfoFields = ({ dtd, dcmt, getValuesByMidAsync, reloadToken, isExp
84
84
  setRows([]);
85
85
  return;
86
86
  }
87
- const metadata = getUserMetadataSorted(dtd);
87
+ // I metadati che l'utente non può vedere non si mostrano, come nel risultato di ricerca
88
+ const metadata = getUserMetadataSorted(dtd).filter(canViewMetadata);
88
89
  // Precarica le liste dati referenziate dai metadati, così le card mostrano subito il valore leggibile
89
90
  const dataListIDs = new Set();
90
91
  metadata.forEach(md => { if (md.dataDomain === MetadataDataDomains.DataList && md.dataListID)
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { DcmtInfo } from '../../../ts';
3
2
  import { HomeBlogPost, TaskDescriptor } from '@topconsultnpm/sdk-ts';
4
3
  import { TMCopyToFolderMode } from '../../../hooks/useDocumentOperations';
@@ -20,5 +19,5 @@ interface ITMMergeToPdfFormProps {
20
19
  * Form per l'unione di più documenti PDF in un singolo file.
21
20
  * Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared con TMCopyToFolderForm.
22
21
  */
23
- declare const TMMergeToPdfForm: (props: ITMMergeToPdfFormProps) => React.JSX.Element;
22
+ declare const TMMergeToPdfForm: (props: ITMMergeToPdfFormProps) => import("react/jsx-runtime").JSX.Element;
24
23
  export default TMMergeToPdfForm;