@topconsultnpm/sdkui-react 6.21.0-t2 → 6.21.0-t4

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 (165) hide show
  1. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +28 -2
  2. package/lib/components/NewComponents/ContextMenu/styles.d.ts +4 -4
  3. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +6 -6
  4. package/lib/components/base/Styled.d.ts +1 -1
  5. package/lib/components/base/TMAreaManager.js +11 -0
  6. package/lib/components/base/TMCounterBar.d.ts +2 -2
  7. package/lib/components/base/TMCounterContainer.d.ts +2 -1
  8. package/lib/components/base/TMCustomButton.d.ts +1 -1
  9. package/lib/components/base/TMDataGrid.js +12 -2
  10. package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
  11. package/lib/components/base/TMDataGridExportForm.js +19 -8
  12. package/lib/components/base/TMFileManager.d.ts +2 -1
  13. package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
  14. package/lib/components/base/TMFileManagerDataGridView.js +4 -4
  15. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
  16. package/lib/components/base/TMFileManagerThumbnailItems.js +3 -3
  17. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
  18. package/lib/components/base/TMFileManagerUtils.d.ts +7 -0
  19. package/lib/components/base/TMFileManagerUtils.js +14 -1
  20. package/lib/components/base/TMLayout.d.ts +4 -4
  21. package/lib/components/base/TMList.d.ts +2 -1
  22. package/lib/components/base/TMListView.d.ts +1 -1
  23. package/lib/components/base/TMModal.js +2 -2
  24. package/lib/components/base/TMPopUp.d.ts +1 -0
  25. package/lib/components/base/TMPopUp.js +59 -2
  26. package/lib/components/base/TMSpinner.d.ts +5 -2
  27. package/lib/components/base/TMSpinner.js +33 -6
  28. package/lib/components/base/TMTab.d.ts +4 -3
  29. package/lib/components/base/TMTooltip.d.ts +1 -1
  30. package/lib/components/base/TMTreeView.d.ts +16 -13
  31. package/lib/components/base/TMTreeView.js +242 -79
  32. package/lib/components/base/TMUserAvatar.d.ts +2 -1
  33. package/lib/components/base/TMVilViewer.d.ts +2 -1
  34. package/lib/components/base/TMWaitPanel.d.ts +5 -2
  35. package/lib/components/base/TMWaitPanel.js +8 -6
  36. package/lib/components/choosers/TMDistinctValues.js +1 -1
  37. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
  38. package/lib/components/choosers/TMDynDataListItemChooser.js +6 -1
  39. package/lib/components/choosers/TMGroupChooser.js +1 -1
  40. package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +2 -1
  41. package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +2 -1
  42. package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
  43. package/lib/components/choosers/TMUserChooser.d.ts +2 -2
  44. package/lib/components/editors/TMEditorStyled.d.ts +6 -6
  45. package/lib/components/editors/TMFormulaEditor.d.ts +2 -1
  46. package/lib/components/editors/TMFormulaEditor.js +98 -49
  47. package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
  48. package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
  49. package/lib/components/editors/TMMetadataEditor.js +6 -2
  50. package/lib/components/editors/TMMetadataValues.js +23 -6
  51. package/lib/components/editors/TMTextBox.d.ts +1 -0
  52. package/lib/components/editors/TMTextBox.js +2 -1
  53. package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
  54. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
  55. package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
  56. package/lib/components/features/blog/TMBlogCommentForm.js +5 -2
  57. package/lib/components/features/documents/TMCopyToFolderForm.js +46 -24
  58. package/lib/components/features/documents/TMDcmtForm.d.ts +2 -0
  59. package/lib/components/features/documents/TMDcmtForm.js +21 -10
  60. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
  61. package/lib/components/features/documents/TMDcmtIcon.d.ts +4 -1
  62. package/lib/components/features/documents/TMDcmtIcon.js +6 -33
  63. package/lib/components/features/documents/TMDcmtPreview.d.ts +1 -1
  64. package/lib/components/features/documents/TMDcmtTasks.d.ts +2 -1
  65. package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
  66. package/lib/components/features/documents/TMFileUploader.js +1 -1
  67. package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -2
  68. package/lib/components/features/documents/TMMasterDetailDcmts.js +55 -16
  69. package/lib/components/features/documents/TMMergeToPdfForm.d.ts +2 -3
  70. package/lib/components/features/documents/TMMergeToPdfForm.js +115 -56
  71. package/lib/components/features/documents/TMRelationViewer.d.ts +12 -10
  72. package/lib/components/features/documents/TMRelationViewer.js +405 -95
  73. package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +4 -16
  74. package/lib/components/features/documents/copyAndMergeDcmtsShared.js +47 -61
  75. package/lib/components/features/documents/mergePdfUtils.d.ts +52 -0
  76. package/lib/components/features/documents/mergePdfUtils.js +268 -0
  77. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
  78. package/lib/components/features/search/TMMetadataOutputForm.d.ts +18 -0
  79. package/lib/components/features/search/TMMetadataOutputForm.js +225 -0
  80. package/lib/components/features/search/TMMetadataSorterForm.d.ts +18 -0
  81. package/lib/components/features/search/TMMetadataSorterForm.js +243 -0
  82. package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
  83. package/lib/components/features/search/TMSearch.d.ts +2 -2
  84. package/lib/components/features/search/TMSearch.js +2 -2
  85. package/lib/components/features/search/TMSearchQueryEditor.js +14 -8
  86. package/lib/components/features/search/TMSearchQueryPanel.js +249 -58
  87. package/lib/components/features/search/TMSearchResult.d.ts +3 -2
  88. package/lib/components/features/search/TMSearchResult.js +94 -25
  89. package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
  90. package/lib/components/features/search/TMSignatureInfoContent.d.ts +2 -1
  91. package/lib/components/features/search/TMViewHistoryDcmt.d.ts +2 -1
  92. package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
  93. package/lib/components/features/search/metadataFormHelper.d.ts +16 -0
  94. package/lib/components/features/search/metadataFormHelper.js +77 -0
  95. package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
  96. package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
  97. package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
  98. package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
  99. package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
  100. package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
  101. package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
  102. package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
  103. package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
  104. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +8 -7
  105. package/lib/components/forms/Login/Chooser.d.ts +2 -2
  106. package/lib/components/forms/Login/TMLoginForm.js +15 -3
  107. package/lib/components/forms/TMChooserForm.d.ts +2 -1
  108. package/lib/components/forms/TMSaveForm.d.ts +4 -4
  109. package/lib/components/grids/TMBlogAttachments.d.ts +2 -1
  110. package/lib/components/grids/TMBlogAttachments.js +2 -2
  111. package/lib/components/grids/TMBlogHeader.d.ts +1 -1
  112. package/lib/components/grids/TMBlogsPost.d.ts +1 -1
  113. package/lib/components/grids/TMBlogsPost.js +5 -3
  114. package/lib/components/grids/TMBlogsPostUtils.d.ts +10 -9
  115. package/lib/components/grids/TMBlogsPostUtils.js +3 -1
  116. package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
  117. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +2 -1
  118. package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
  119. package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +1 -1
  120. package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
  121. package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
  122. package/lib/components/pages/TMPage.d.ts +1 -1
  123. package/lib/components/settings/SettingsAppearance.d.ts +2 -1
  124. package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
  125. package/lib/components/sidebar/TMHeader.d.ts +3 -3
  126. package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
  127. package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
  128. package/lib/components/viewers/TMMidViewer.d.ts +2 -2
  129. package/lib/components/viewers/TMTidViewer.d.ts +2 -2
  130. package/lib/components/viewers/TMTidViewer.js +14 -2
  131. package/lib/components/wizard/TMWizard.d.ts +1 -0
  132. package/lib/components/wizard/TMWizard.js +5 -3
  133. package/lib/helper/Enum_Localizator.js +2 -0
  134. package/lib/helper/MergePdfManager.d.ts +45 -0
  135. package/lib/helper/MergePdfManager.js +148 -0
  136. package/lib/helper/SDKUI_Globals.d.ts +1 -0
  137. package/lib/helper/SDKUI_Globals.js +3 -1
  138. package/lib/helper/SDKUI_Localizator.d.ts +40 -0
  139. package/lib/helper/SDKUI_Localizator.js +412 -12
  140. package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
  141. package/lib/helper/TMIcons.d.ts +278 -278
  142. package/lib/helper/TMPdfViewer.d.ts +2 -1
  143. package/lib/helper/TMToppyMessage.d.ts +2 -2
  144. package/lib/helper/TMUtils.d.ts +57 -21
  145. package/lib/helper/TMUtils.js +159 -1
  146. package/lib/helper/certificateImportHelper.d.ts +43 -0
  147. package/lib/helper/certificateImportHelper.js +403 -0
  148. package/lib/helper/checkinCheckoutManager.d.ts +4 -3
  149. package/lib/helper/checkinCheckoutManager.js +29 -11
  150. package/lib/helper/helpers.d.ts +3 -2
  151. package/lib/helper/helpers.js +10 -0
  152. package/lib/helper/index.d.ts +1 -0
  153. package/lib/helper/index.js +1 -0
  154. package/lib/hooks/useCheckInOutOperations.d.ts +4 -3
  155. package/lib/hooks/useDataUserIdItem.js +1 -1
  156. package/lib/hooks/useDcmtOperations.d.ts +20 -2
  157. package/lib/hooks/useDcmtOperations.js +244 -25
  158. package/lib/hooks/useDocumentOperations.d.ts +2 -2
  159. package/lib/hooks/useDocumentOperations.js +52 -13
  160. package/lib/hooks/useInputDialog.d.ts +2 -1
  161. package/lib/hooks/useRelatedDocuments.js +4 -4
  162. package/lib/services/platform_services.d.ts +7 -6
  163. package/lib/ts/types.d.ts +3 -1
  164. package/lib/ts/types.js +2 -0
  165. package/package.json +15 -7
@@ -15,6 +15,8 @@ import { TMNothingToShow } from "../features/documents/TMDcmtPreview";
15
15
  import TMAccordion from "../base/TMAccordion";
16
16
  import TabPanel, { Item } from 'devextreme-react/tab-panel';
17
17
  import { TMExceptionBoxManager } from "../base/TMPopUp";
18
+ // Costante per la minWidth degli elementi - garantisce coerenza tra layout orizzontale e verticale
19
+ const ITEM_MIN_WIDTH = 200;
18
20
  export var ShowCheckBoxesMode;
19
21
  (function (ShowCheckBoxesMode) {
20
22
  ShowCheckBoxesMode[ShowCheckBoxesMode["Never"] = 0] = "Never";
@@ -47,8 +49,12 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
47
49
  let dynDLToBeRefreshed = dynDataListsToBeRefreshed.find(o => o.midStarter === mid);
48
50
  while (dynDLToBeRefreshed != undefined) {
49
51
  const item = newValues.find(value => value.mid === dynDLToBeRefreshed?.mid);
50
- if (item)
52
+ if (item) {
51
53
  item.value = newValue;
54
+ if (showCheckBoxes !== ShowCheckBoxesMode.Never) {
55
+ item.isSelected = false;
56
+ }
57
+ }
52
58
  dynDLToBeRefreshed = dynDataListsToBeRefreshed.find(o => o.midStarter === item?.mid);
53
59
  }
54
60
  }
@@ -287,8 +293,12 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
287
293
  let newMetadata = structuredClone(metadataValues);
288
294
  for (const item of midsToBeUpdated) {
289
295
  const mdItem = newMetadata.find(value => value.mid === item.mid);
290
- if (mdItem)
296
+ if (mdItem) {
291
297
  mdItem.value = item.value;
298
+ if (showCheckBoxes !== ShowCheckBoxesMode.Never) {
299
+ mdItem.isSelected = !stringIsNullOrEmpty(item.value);
300
+ }
301
+ }
292
302
  }
293
303
  onValueChanged?.(newMetadata);
294
304
  }, updateIsModalOpen: updateIsModalOpen }), FormulaHelper.isFormula(item.value)
@@ -579,7 +589,7 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
579
589
  else if (layoutItem.type === LayoutItemTypes.LayoutGroup && layoutItem.lgd) {
580
590
  const children = getChildren(layoutItem.layoutItemID);
581
591
  const groupDescriptor = layoutItem.lgd;
582
- const groupTitle = groupDescriptor.caption || `Group ${layoutItem.layoutItemID}`;
592
+ const groupTitle = (groupDescriptor.showCaption ? groupDescriptor.caption || `Group ${layoutItem.layoutItemID}` : '');
583
593
  const groupIsNoBorder = groupDescriptor.borderStyle == undefined || groupDescriptor.borderStyle == LayoutGroupBorderStyles.NoBorder || groupDescriptor.borderStyle == LayoutGroupBorderStyles.None;
584
594
  const isCollapsed = false; // LayoutGroupDescriptor doesn't have collapsed property
585
595
  const isVertical = groupDescriptor.orientation === LayoutGroupOrientations.Vertical;
@@ -608,7 +618,7 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
608
618
  }
609
619
  // Orizzontale con bordo, children e titolo
610
620
  if (!groupIsNoBorder && isHorizontal && children.length > 0 && groupTitle.length > 0) {
611
- return (_jsxs("div", { style: borderedGroupStyle('row'), children: [groupTitleElement, renderChildren(layoutItem, nextDepth)] }, `group-horizontal-${layoutItem.layoutItemID}`));
621
+ return (_jsxs("div", { style: { position: 'relative', border: '2px solid #CAD9EB', borderRadius: '3px', padding: '12px 6px 6px', margin: '10px' }, children: [groupTitleElement, _jsx("div", { style: { display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', gap: '8px', overflowX: 'auto', overflowY: 'hidden', paddingBottom: '8px' }, children: children.map(child => (_jsx("div", { style: { flex: `1 1 ${ITEM_MIN_WIDTH}px`, minWidth: `${ITEM_MIN_WIDTH}px` }, children: renderLayoutItem(child, nextDepth, visited) }, child.layoutItemID))) })] }, `group-horizontal-${layoutItem.layoutItemID}`));
612
622
  }
613
623
  // Verticale senza bordo
614
624
  if (groupIsNoBorder && isVertical) {
@@ -625,8 +635,14 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
625
635
  }
626
636
  // Orizzontale
627
637
  if (isHorizontal) {
628
- const renderHorizontalChildren = () => children.map(child => (_jsx("div", { style: { flex: '1 1 0', minWidth: 0 }, children: renderLayoutItem(child, nextDepth, visited) }, child.layoutItemID)));
629
- return (_jsx("div", { style: { display: 'flex', flexDirection: 'row', flexWrap: 'wrap', gap: '3px' }, children: groupDescriptor.borderStyle === LayoutGroupBorderStyles.GroupBox || groupDescriptor.borderStyle === LayoutGroupBorderStyles.Tabbed ? (_jsx(TMAccordion, { title: groupTitle, titleSize: "Small", children: renderChildren(layoutItem, nextDepth) })) : groupDescriptor.borderStyle === LayoutGroupBorderStyles.Group ? (_jsxs("div", { style: borderedGroupStyle('column'), children: [groupTitleElement, renderHorizontalChildren()] })) : (renderHorizontalChildren()) }, `group-horizontal-${layoutItem.layoutItemID}`));
638
+ const renderHorizontalChildren = () => (_jsx("div", { style: { display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', gap: '8px', overflowX: 'auto', overflowY: 'hidden', paddingBottom: '8px' }, children: children.map(child => (_jsx("div", { style: { flex: `1 1 ${ITEM_MIN_WIDTH}px`, minWidth: `${ITEM_MIN_WIDTH}px` }, children: renderLayoutItem(child, nextDepth, visited) }, child.layoutItemID))) }));
639
+ if (groupDescriptor.borderStyle === LayoutGroupBorderStyles.GroupBox || groupDescriptor.borderStyle === LayoutGroupBorderStyles.Tabbed) {
640
+ return (_jsx(TMAccordion, { title: groupTitle, titleSize: "Small", children: renderHorizontalChildren() }, `group-horizontal-${layoutItem.layoutItemID}`));
641
+ }
642
+ if (groupDescriptor.borderStyle === LayoutGroupBorderStyles.Group) {
643
+ return (_jsxs("div", { style: { position: 'relative', border: '2px solid #CAD9EB', borderRadius: '3px', padding: '12px 6px 6px', margin: '10px' }, children: [groupTitleElement, renderHorizontalChildren()] }, `group-horizontal-${layoutItem.layoutItemID}`));
644
+ }
645
+ return (_jsx("div", { children: renderHorizontalChildren() }, `group-horizontal-${layoutItem.layoutItemID}`));
630
646
  }
631
647
  // Fallback: gruppo con accordion e indentazione
632
648
  const indentationPx = depth > 0 ? depth * 10 : 0;
@@ -709,6 +725,7 @@ const StyledRow = styled.div `
709
725
  display: flex;
710
726
  flex-direction: row;
711
727
  width: 100%;
728
+ min-width: ${ITEM_MIN_WIDTH}px;
712
729
  gap: 5px;
713
730
  `;
714
731
  const StyledSeparator = styled.hr `
@@ -17,6 +17,7 @@ export interface ITMTextBox extends ITMEditorBase {
17
17
  onClick?: () => void;
18
18
  onValueChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
19
19
  onBlur?: (value: string | undefined) => void;
20
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
20
21
  }
21
22
  declare const TMTextBox: React.FunctionComponent<ITMTextBox>;
22
23
  export default TMTextBox;
@@ -34,7 +34,7 @@ const StyledTextBoxEditorButton = styled.div `
34
34
  border-bottom-color: ${TMColors.primary};
35
35
  }
36
36
  `;
37
- const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, precision, fromModal = false, scale, showClearButton, validationItems = [], label = '', readOnly = false, formulaItems = [], buttons = [], isModifiedWhen, placeHolder, elementStyle, width = '100%', maxValue, minValue, fontSize = FontSize.defaultFontSize, icon, labelPosition = 'left', value, disabled = false, type = 'text', onClick, onValueChanged, onBlur, borderRadius, allowedPattern }) => {
37
+ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, precision, fromModal = false, scale, showClearButton, validationItems = [], label = '', readOnly = false, formulaItems = [], buttons = [], isModifiedWhen, placeHolder, elementStyle, width = '100%', maxValue, minValue, fontSize = FontSize.defaultFontSize, icon, labelPosition = 'left', value, disabled = false, type = 'text', onClick, onValueChanged, onBlur, onKeyDown, borderRadius, allowedPattern }) => {
38
38
  const [initialType, setInitialType] = useState(type);
39
39
  const [currentType, setCurrentType] = useState(type);
40
40
  const [currentValue, setCurrentValue] = useState(value);
@@ -283,6 +283,7 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
283
283
  if (!scale && (e.key == "." || e.key == ","))
284
284
  e.preventDefault();
285
285
  }
286
+ onKeyDown?.(e);
286
287
  }, "$isMobile": deviceType === DeviceType.MOBILE, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$maxValue": maxValue, "$width": width, "$type": currentType, "$borderRadius": borderRadius, style: { paddingRight: `${calculateRightPadding()}px`, cursor: onClick ? 'pointer' : undefined } }), (initialType === 'password' || initialType === 'secureText') && _jsx(StyledShowPasswordIcon, { onClick: toggleShowPassword, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: showPasswordIcon() }), initialType !== 'password' &&
287
288
  _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'absolute', right: type === 'number' ? '25px' : '6px', top: label.length > 0 ? '20px' : '3px', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [formulaItems.length > 0 &&
288
289
  _jsx(StyledTextBoxEditorButton, { onClick: () => {
@@ -14,5 +14,5 @@ interface TMTreeDropDownProps {
14
14
  isValidKey?: (key: number) => boolean;
15
15
  elementStyle?: React.CSSProperties;
16
16
  }
17
- declare const TMTreeDropDown: (props: TMTreeDropDownProps) => import("react/jsx-runtime").JSX.Element;
17
+ declare const TMTreeDropDown: (props: TMTreeDropDownProps) => React.JSX.Element;
18
18
  export default TMTreeDropDown;
@@ -11,5 +11,5 @@ interface TMToppyDraggableHelpCenterProps {
11
11
  /** Callback chiamato quando si clicca sull'immagine di Toppy */
12
12
  onToppyImageClick?: () => void;
13
13
  }
14
- declare const TMToppyDraggableHelpCenter: (props: TMToppyDraggableHelpCenterProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const TMToppyDraggableHelpCenter: (props: TMToppyDraggableHelpCenterProps) => React.JSX.Element;
15
15
  export default TMToppyDraggableHelpCenter;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { BlogPost, UserDescriptor } from "@topconsultnpm/sdk-ts";
2
3
  import { FileItem } from '../../base/TMFileManagerUtils';
3
4
  import { TMBlogContextDescriptor } from '../../grids/TMBlogsPostUtils';
@@ -18,5 +19,5 @@ interface TMBlogCommentFormProps {
18
19
  /** External save handler - when provided, bypasses internal engine logic */
19
20
  onCustomSave?: (blogPost: BlogPost) => Promise<void>;
20
21
  }
21
- declare const TMBlogCommentForm: (props: TMBlogCommentFormProps) => import("react/jsx-runtime").JSX.Element;
22
+ declare const TMBlogCommentForm: (props: TMBlogCommentFormProps) => React.JSX.Element;
22
23
  export default TMBlogCommentForm;
@@ -246,7 +246,7 @@ const TMBlogCommentForm = (props) => {
246
246
  alignItems: 'center',
247
247
  padding: '0 8px',
248
248
  }, children: currentDraftAttachments.length > 0 ? (currentDraftAttachments.map(draft => {
249
- const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", draft.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", draft.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", draft.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(draft.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(draft.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(draft.lastUpdateTime)] })] }));
249
+ const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", draft.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", draft.updaterName ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Extension, ":"] }), " ", draft.ext ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", draft.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(draft.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(draft.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(draft.lastUpdateTime)] })] }));
250
250
  return _jsxs("div", { style: {
251
251
  display: 'inline-flex',
252
252
  alignItems: 'center',
@@ -264,7 +264,7 @@ const TMBlogCommentForm = (props) => {
264
264
  }, onMouseLeave: (e) => {
265
265
  e.currentTarget.style.boxShadow = '0 2px 4px rgba(0, 0, 0, 0.1)';
266
266
  e.currentTarget.style.backgroundColor = '#fff';
267
- }, children: [draft.ext ? (_jsx("span", { style: { marginRight: '10px', display: 'flex', alignItems: 'center' }, children: getFileIcon(draft.ext, undefined, tooltipContent) })) : (_jsx(IconAttachment, { style: { marginRight: '5px' } })), _jsx("span", { style: { marginRight: '8px', display: 'flex', alignItems: 'center' }, children: draft.name }), draft.version && (_jsx("span", { style: {
267
+ }, children: [draft.ext ? (_jsxs("span", { style: { marginRight: '10px', display: 'flex', alignItems: 'center', position: 'relative', width: draft.isSigned ? '30px' : undefined }, children: [getFileIcon(draft.ext, undefined, tooltipContent), draft.isSigned == 1 && _jsx("div", { style: { position: 'absolute', bottom: '-4px', right: '-7px' }, children: _jsx(TMTooltip, { content: "Documento firmato", children: _jsx(IconSignature, { fontSize: 28 }) }) })] })) : (_jsx(IconAttachment, { style: { marginRight: '5px' } })), _jsx("span", { style: { marginRight: '8px', display: 'flex', alignItems: 'center' }, children: draft.name }), draft.version && (_jsx("span", { style: {
268
268
  display: 'inline-flex',
269
269
  width: '20px',
270
270
  height: '20px',
@@ -349,3 +349,6 @@ const TMAttachmentsView = (props) => {
349
349
  }, []);
350
350
  return _jsx(TMChooserForm, { title: SDKUI_Localizator.Attachments, allowMultipleSelection: true, allowApplyWithZeroSelection: true, startWithShowOnlySelectedItems: true, hasShowOnlySelectedItems: false, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: "500px", manageUseLocalizedName: false, columns: dataColumns, showDefaultColumns: false, selectedIDs: selectedIDs, dataSource: dataSource, hasShowId: true, hideRefresh: false, onClose: onClose, onChoose: onChoose });
351
351
  };
352
+ function IconSignature(props) {
353
+ return (_jsx("svg", { height: "1em", viewBox: "0 0 450 450", width: "1em", fill: "currentColor", ...props, children: _jsx("g", { children: _jsx("g", { children: _jsxs("g", { clipRule: "evenodd", fill: "rgb(0,0,0)", fillRule: "evenodd", children: [_jsx("path", { d: "m366.6 67.8 1.1-4c.4-1.5.6-3 .6-4.5 0-8.1-5.5-15.2-13.3-17.3-9.5-2.5-19.3 3.2-21.8 12.8l-20.4 77.9 34.6 9z" }), _jsx("path", { d: "m234.9 198.9h148.6v35.7h-148.6z", transform: "matrix(.253 -.968 .968 .253 21.311 461.088)" }), _jsx("path", { d: "m292.8 316 8.4 2.2 4.5-17.3-34.6-9.1-4.5 17.4 8.3 2.2z" }), _jsx("path", { d: "m275.3 319.7-12.7 14.7 5.4 40.3 24.4-32.5-3.9-19.1zm6.5 23.3c-.8 2.9-3.7 4.6-6.6 3.9s-4.6-3.7-3.9-6.6 3.7-4.6 6.6-3.9 4.6 3.7 3.9 6.6z" }), _jsx("path", { d: "m395.6 71.5-20.3-5.5-2 7.7 16.5 4.4-24.8 95c-.6 2.1.7 4.3 2.8 4.8.3.1.7.1 1 .1 1.8 0 3.4-1.2 3.8-3l25.8-98.8c.6-2-.7-4.2-2.8-4.7z" }), _jsx("path", { d: "" }), _jsx("path", { d: "m243.4 379.8c-1.8-1.2-4.3-.8-5.5 1.1-9.6 14.1-29.9 19.6-45.3 12.2-.5-.2-.9-.5-1.4-.7-3.5-1.8-7.9-4-12.8-2.7-2.7.7-4.7 2.3-6.5 3.6-1.5 1.2-2.8 2.2-3.9 2.2-2 .1-4-3-5-5.9-.2-.5-.4-1-.5-1.5-1.4-4.1-3.1-9.1-7.8-11.8-5.8-3.3-12.9-.9-17.4 3-2.4 2-4.2 4.4-6 6.7-1.2 1.5-2.3 2.9-3.4 4.1-7.5 7.9-20.3 10-30.2 5.6 7.6-6.9 13-15.5 15.4-24.9s1-21.1-7.8-25.8c-4.5-2.4-9.9-2.4-15.2.2-4.4 2.2-8.4 5.9-10.9 10.3-3.9 7-5.1 15.4-3.3 23.8 1.4 6.3 4.3 12 8.4 16.5-8.4 4.9-18.2 7.3-27.8 6.1-2.2-.3-4.2 1.2-4.5 3.4s1.2 4.2 3.4 4.5c2.1.3 4.1.4 6.2.4 10 0 20.1-3.1 29.1-9 6.1 3.7 13.5 5.4 21.1 4.7 8.5-.8 16.3-4.4 21.8-10.2 1.5-1.5 2.7-3.1 3.9-4.7 1.6-2.1 3.1-4 4.9-5.6 2.4-2 6-3.4 8.3-2.1 2.1 1.2 3.1 4.2 4.2 7.5.2.5.4 1.1.6 1.6 2.5 7 7.1 11.1 12.4 11.1h.6c3.6-.2 6.2-2.2 8.3-3.9 1.3-1 2.5-2 3.6-2.2 2-.5 4.5.8 7.2 2.1.5.3 1 .5 1.5.7 5.7 2.7 11.9 4 18.2 4 14.4 0 29-6.9 37.1-18.9 1.3-1.8.9-4.3-1-5.5zm-152.6 11.3c-8.1-8-10.4-21.8-4.8-31.7 2.5-4.5 7.5-8.2 12-8.2 1.2 0 2.3.3 3.4.8 5 2.7 5.5 10.6 3.9 16.8-2.2 8.7-7.5 16.5-14.5 22.3z" })] }) }) }) }));
354
+ }
@@ -32,6 +32,11 @@ const TMCopyToFolderForm = ({ mode, selectedDcmtInfos, onClose, showTMRelationVi
32
32
  // ---- Stato dei settings ----
33
33
  const [settings, setSettings] = useState(() => buildInitialDownloadSettings(SDKUI_Globals.userSettings.documentDownloadSettings, SDKUI_Globals.userSettings.searchSettings.invoiceRetrieveFormat, SDKUI_Globals.userSettings.searchSettings.orderRetrieveFormat));
34
34
  const [selectedItemsRelationViewer, setSelectedItemsRelationViewer] = useState([]);
35
+ // ---- Stato per la creazione ZIP (spinner separato) ----
36
+ const [isCreatingZip, setIsCreatingZip] = useState(false);
37
+ const [zipProgressText, setZipProgressText] = useState('');
38
+ const [zipProgressValue, setZipProgressValue] = useState(0);
39
+ const [zipProgressMax, setZipProgressMax] = useState(0);
35
40
  const [hasSavedLayout, setHasSavedLayout] = useState(() => {
36
41
  const saved = SDKUI_Globals.userSettings.documentDownloadSettings;
37
42
  const defaults = new DocumentDownloadSettings();
@@ -171,7 +176,7 @@ const TMCopyToFolderForm = ({ mode, selectedDcmtInfos, onClose, showTMRelationVi
171
176
  retrieveOptions.invoiceRetrieveFormat = settings.invoiceFormat ?? SDKUI_Globals.userSettings.searchSettings.invoiceRetrieveFormat;
172
177
  retrieveOptions.orderRetrieveFormat = settings.orderFormat ?? SDKUI_Globals.userSettings.searchSettings.orderRetrieveFormat;
173
178
  if (settings.exportMode === 'copy') {
174
- await downloadDcmtsAsync(dcmtInfosToDownload, DownloadTypes.Dcmt, 'download', writeFileToFolder, undefined, true, retrieveOptions, false);
179
+ await downloadDcmtsAsync({ inputDcmts: dcmtInfosToDownload, downloadType: DownloadTypes.Dcmt, downloadMode: 'download', onFileDownloaded: writeFileToFolder, skipConfirmation: true, retrieveOptions, useCache: false });
175
180
  }
176
181
  else if (settings.exportMode === 'zip') {
177
182
  const zipEntries = [];
@@ -194,38 +199,55 @@ const TMCopyToFolderForm = ({ mode, selectedDcmtInfos, onClose, showTMRelationVi
194
199
  });
195
200
  zipEntries.push({ filename: getUniqueZipFileName(targetFileName), data: file });
196
201
  };
197
- await downloadDcmtsAsync(dcmtInfosToDownload, DownloadTypes.Dcmt, 'download', collectFileForZip, undefined, true, retrieveOptions, false);
202
+ await downloadDcmtsAsync({ inputDcmts: dcmtInfosToDownload, downloadType: DownloadTypes.Dcmt, downloadMode: 'download', onFileDownloaded: collectFileForZip, skipConfirmation: true, retrieveOptions, useCache: false });
198
203
  if (zipEntries.length > 0) {
199
204
  const zipFileName = settings.zipFileName.trim().toLowerCase().endsWith('.zip')
200
205
  ? settings.zipFileName.trim()
201
206
  : settings.zipFileName.trim() + '.zip';
202
207
  // Crea il blob ZIP
203
- const zipBlob = await ZipManager.createZip(zipEntries, {
204
- compressionLevel: 6,
205
- password: settings.zipPassword.trim() || undefined,
206
- });
207
- // Se c'è un handle della cartella: salva direttamente nella cartella selezionata
208
- if (folderHandleRef.current) {
209
- try {
210
- // Per lo ZIP usa sempre rename automatico (come fa il browser)
211
- const finalZipFileName = await generateUniqueFileName(folderHandleRef.current, zipFileName);
212
- const fileHandle = await folderHandleRef.current.getFileHandle(finalZipFileName, { create: true });
213
- const writable = await fileHandle.createWritable();
214
- await writable.write(zipBlob);
215
- await writable.close();
216
- ShowAlert({ message: SDKUI_Localizator.ZipCreatedSavedInFolder.replaceParams(finalZipFileName, folderHandleRef.current.name), mode: 'success', duration: 5000, title: SDKUI_Localizator.CompressToZipFile });
208
+ setIsCreatingZip(true);
209
+ setZipProgressMax(zipEntries.length);
210
+ setZipProgressValue(0);
211
+ setZipProgressText(SDKUI_Localizator.CompressToZipFile);
212
+ try {
213
+ const zipBlob = await ZipManager.createZip(zipEntries, {
214
+ compressionLevel: 6,
215
+ password: settings.zipPassword.trim() || undefined,
216
+ onProgress: (current, total, filename) => {
217
+ setZipProgressValue(current);
218
+ setZipProgressText(`${SDKUI_Localizator.CompressToZipFile}: ${filename}`);
219
+ },
220
+ });
221
+ // Se c'è un handle della cartella: salva direttamente nella cartella selezionata
222
+ if (folderHandleRef.current) {
223
+ try {
224
+ // Per lo ZIP usa sempre rename automatico (come fa il browser)
225
+ const finalZipFileName = await generateUniqueFileName(folderHandleRef.current, zipFileName);
226
+ const fileHandle = await folderHandleRef.current.getFileHandle(finalZipFileName, { create: true });
227
+ const writable = await fileHandle.createWritable();
228
+ await writable.write(zipBlob);
229
+ await writable.close();
230
+ ShowAlert({ message: SDKUI_Localizator.ZipCreatedSavedInFolder.replaceParams(finalZipFileName, folderHandleRef.current.name), mode: 'success', duration: 5000, title: SDKUI_Localizator.CompressToZipFile });
231
+ }
232
+ catch (err) {
233
+ console.error('Error saving ZIP to folder, fallback to standard download:', err);
234
+ // Fallback: download standard del browser
235
+ ZipManager.downloadBlob(zipBlob, zipFileName);
236
+ ShowAlert({ message: SDKUI_Localizator.ZipCreatedSavedInFolder.replaceParams(zipFileName, "Download"), mode: 'success', duration: 5000, title: SDKUI_Localizator.CompressToZipFile });
237
+ }
217
238
  }
218
- catch (err) {
219
- console.error('Error saving ZIP to folder, fallback to standard download:', err);
220
- // Fallback: download standard del browser
239
+ else {
240
+ // Se non c'è un handle della cartella: download zip standard del browser
221
241
  ZipManager.downloadBlob(zipBlob, zipFileName);
222
242
  ShowAlert({ message: SDKUI_Localizator.ZipCreatedSavedInFolder.replaceParams(zipFileName, "Download"), mode: 'success', duration: 5000, title: SDKUI_Localizator.CompressToZipFile });
223
243
  }
224
244
  }
225
- else {
226
- // Se non c'è un handle della cartella: download zip standard del browser
227
- ZipManager.downloadBlob(zipBlob, zipFileName);
228
- ShowAlert({ message: SDKUI_Localizator.ZipCreatedSavedInFolder.replaceParams(zipFileName, "Download"), mode: 'success', duration: 5000, title: SDKUI_Localizator.CompressToZipFile });
245
+ catch (err) {
246
+ console.error('Error creating ZIP:', err);
247
+ ShowAlert({ message: SDKUI_Localizator.Error, mode: 'error', duration: 5000, title: SDKUI_Localizator.CompressToZipFile });
248
+ }
249
+ finally {
250
+ setIsCreatingZip(false);
229
251
  }
230
252
  }
231
253
  }
@@ -355,7 +377,7 @@ const TMCopyToFolderForm = ({ mode, selectedDcmtInfos, onClose, showTMRelationVi
355
377
  { value: 'skip', display: SDKUI_Localizator.DoNotCopy },
356
378
  { value: 'rename', display: SDKUI_Localizator.CopyButRename },
357
379
  ], value: isUsingDefaultDownloads ? 'rename' : settings.fileExistsMode, direction: "row", disabled: isUsingDefaultDownloads, onValueChanged: (value) => updateSettings('fileExistsMode', value), fontSize: '0.9rem' }) }), isUsingDefaultDownloads && (_jsx("span", { style: { fontSize: '0.8rem', color: '#888', fontStyle: 'italic', marginTop: '4px', display: 'block' }, children: SDKUI_Localizator.BrowserAutoRenamesDuplicateFilesInDownloadsFolder }))] }) }), fileNamingRow, formatSelectorsRow] })), settings.exportMode === 'zip' && (_jsxs("div", { style: { display: 'flex', flexWrap: 'wrap', columnGap: '10px' }, children: [_jsxs("div", { style: { display: 'flex', flexWrap: 'wrap', columnGap: '10px', width: '100%' }, children: [folderSelector, _jsx("div", { style: { flex: '1 1 280px', minWidth: '280px' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.ZipFileName, value: settings.zipFileName, validationItems: zipValidationItems, autoComplete: "one-time-code", onValueChanged: (e) => updateSettings('zipFileName', e.target.value) }) }), _jsx("div", { style: { flex: '1 1 280px', minWidth: '280px' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.ProtectWithPasswordOptional, value: settings.zipPassword, type: "password", autoComplete: "one-time-code", onValueChanged: (e) => updateSettings('zipPassword', e.target.value) }) })] }), fileNamingRow, formatSelectorsRow] }))] })] }));
358
- return (_jsx(TMModal, { width: calcResponsiveSizes(deviceType, showTMRelationViewer ? '95%' : '950px', '95%', '95%'), height: showTMRelationViewer ? '95%' : 'auto', title: getTitle(), onClose: onClose, showCloseButton: true, 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: _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { display: 'flex', flexDirection: 'column', padding: '4px 4px 16px 4px', width: '100%', height: '100%', boxSizing: 'border-box', overflow: 'hidden' }, children: [showTMRelationViewer ? (_jsx("div", { style: { flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column' }, children: _jsxs(TMSplitterLayout, { direction: 'vertical', showSeparator: true, separatorSize: 8, separatorColor: 'transparent', separatorActiveColor: 'transparent', overflow: 'hidden', min: ["50", "50"], start: ['65%', '35%'], children: [_jsx(TMDownloadRelationViewerSection, { selectedDcmtInfos: selectedDcmtInfos, onSelectionChanged: setSelectedItemsRelationViewer, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), configSection] }, "TMCopyToFolder-relation-config") })) : (configSection), _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: 0, marginTop: '12px' }, children: _jsxs("button", { disabled: !isFormValid() || (showTMRelationViewer && selectedItemsRelationViewer.filter(i => i.isDcmt).length === 0), onClick: run, style: {
380
+ return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel || isCreatingZip, showWaitPanelPrimary: isCreatingZip ? true : showPrimary, showWaitPanelSecondary: isCreatingZip ? false : showSecondary, waitPanelTitle: isCreatingZip ? SDKUI_Localizator.CompressToZipFile : waitPanelTitle, waitPanelTextPrimary: isCreatingZip ? zipProgressText : waitPanelTextPrimary, waitPanelValuePrimary: isCreatingZip ? zipProgressValue : waitPanelValuePrimary, waitPanelMaxValuePrimary: isCreatingZip ? zipProgressMax : waitPanelMaxValuePrimary, waitPanelTextSecondary: isCreatingZip ? '' : waitPanelTextSecondary, waitPanelValueSecondary: isCreatingZip ? 0 : waitPanelValueSecondary, waitPanelMaxValueSecondary: isCreatingZip ? 0 : waitPanelMaxValueSecondary, isCancelable: !isCreatingZip, abortController: abortController, usePortal: true, children: _jsx(TMModal, { width: calcResponsiveSizes(deviceType, showTMRelationViewer ? '95%' : '950px', '95%', '95%'), height: showTMRelationViewer ? '95%' : 'auto', title: getTitle(), onClose: onClose, showCloseButton: true, children: _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { display: 'flex', flexDirection: 'column', padding: '4px 4px 16px 4px', width: '100%', height: '100%', boxSizing: 'border-box', overflow: 'hidden' }, children: [showTMRelationViewer ? (_jsx("div", { style: { flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column' }, children: _jsxs(TMSplitterLayout, { direction: 'vertical', showSeparator: true, separatorSize: 8, separatorColor: 'transparent', separatorActiveColor: 'transparent', overflow: 'hidden', min: ["50", "50"], start: ['65%', '35%'], children: [_jsx(TMDownloadRelationViewerSection, { selectedDcmtInfos: selectedDcmtInfos, onSelectionChanged: setSelectedItemsRelationViewer, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), configSection] }, "TMCopyToFolder-relation-config") })) : (configSection), _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: 0, marginTop: '12px' }, children: _jsxs("button", { disabled: !isFormValid() || (showTMRelationViewer && selectedItemsRelationViewer.filter(i => i.isDcmt).length === 0), onClick: run, style: {
359
381
  display: 'flex',
360
382
  alignItems: 'center',
361
383
  justifyContent: 'center',
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DcmtTypeDescriptor, HomeBlogPost, LayoutModes, ObjectRef, SearchResultDescriptor, TaskDescriptor, ValidationItem } from '@topconsultnpm/sdk-ts';
3
3
  import { DcmtInfo, FormModes, MetadataValueDescriptorEx, TaskContext } from '../../../ts';
4
+ import { IntesiCertificateData } from '../../../helper';
4
5
  /**
5
6
  * Definisce il contesto da cui è stato invocato il TMDcmtForm.
6
7
  * Permette di gestire logiche diverse in base alla provenienza.
@@ -75,6 +76,7 @@ interface ITMDcmtFormProps {
75
76
  mid: number;
76
77
  value: string;
77
78
  }>, tid?: number) => void;
79
+ fetchRemoteCertificates?: (email: string) => Promise<IntesiCertificateData[]>;
78
80
  datagridUtility?: {
79
81
  onRefreshSearchAsyncDatagrid?: () => Promise<void>;
80
82
  onRefreshDataRowsAsync?: (() => Promise<void>);
@@ -57,7 +57,7 @@ export var InvocationContext;
57
57
  let abortControllerLocal = new AbortController();
58
58
  ;
59
59
  //#endregion
60
- const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMode = FormModes.Update, invocationContext = InvocationContext.Default, showHeader = true, showBackButton = true, showDcmtFormSidebar = true, isClosable = false, showTodoDcmtForm = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, isModal = false, titleModal, widthModal = "100%", heightModal = "100%", allowNavigation = true, canNext, canPrev, count, itemIndex, onNext, onPrev, inputFile = null, inputMids = [], connectorFileSave = undefined, isSharedDcmt = false, sharedSourceTID, sharedSourceDID, allowRelations = true, allowButtonsRefs = false, openS4TViewer = false, enableDragDropOverlay = false, onClose, onSavedAsyncCallback, onSaveRecents, onWFOperationCompleted, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, onTaskCompleted, onTaskCreateRequest, moreInfoTasks, taskFormDialogComponent, handleNavigateToWGs, handleNavigateToDossiers, onReferenceClick, onOpenS4TViewerRequest, onOpenPdfEditorRequest, openFileUploaderPdfEditor, s4TViewerDialogComponent, onScanRequest, passToSearch, datagridUtility }) => {
60
+ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMode = FormModes.Update, invocationContext = InvocationContext.Default, showHeader = true, showBackButton = true, showDcmtFormSidebar = true, isClosable = false, showTodoDcmtForm = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, isModal = false, titleModal, widthModal = "100%", heightModal = "100%", allowNavigation = true, canNext, canPrev, count, itemIndex, onNext, onPrev, inputFile = null, inputMids = [], connectorFileSave = undefined, isSharedDcmt = false, sharedSourceTID, sharedSourceDID, allowRelations = true, allowButtonsRefs = false, openS4TViewer = false, enableDragDropOverlay = false, onClose, onSavedAsyncCallback, onSaveRecents, onWFOperationCompleted, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, onTaskCompleted, onTaskCreateRequest, moreInfoTasks, taskFormDialogComponent, handleNavigateToWGs, handleNavigateToDossiers, onReferenceClick, onOpenS4TViewerRequest, onOpenPdfEditorRequest, openFileUploaderPdfEditor, s4TViewerDialogComponent, onScanRequest, passToSearch, fetchRemoteCertificates, datagridUtility }) => {
61
61
  const { onRefreshSearchAsyncDatagrid, onRefreshBlogDatagrid, onRefreshPreviewDatagrid } = datagridUtility || {};
62
62
  const floatingBarContainerRef = useRef(null);
63
63
  const [id, setID] = useState('');
@@ -395,6 +395,7 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
395
395
  currentSearchResults,
396
396
  currentMetadataValues: formData,
397
397
  allUsers,
398
+ fetchRemoteCertificates,
398
399
  datagridUtility: {
399
400
  onRefreshBlogDatagrid,
400
401
  onRefreshPreviewDatagrid,
@@ -922,9 +923,14 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
922
923
  setWaitPanelValueSecondaryLocal(pd.ProgressBarValue);
923
924
  setWaitPanelTextSecondaryLocal(`${SDKUI_Localizator.Archiving}... ${Globalization.getNumberDisplayValue(pd.ProgressBarValue, true)} / ${Globalization.getNumberDisplayValue(maxFileSize, true)}`);
924
925
  if (pd.ProgressBarValue === pd.ProgressBarMaximum) {
925
- setWaitPanelMaxValueSecondaryLocal(0);
926
- setWaitPanelValueSecondaryLocal(0);
927
- setWaitPanelTextSecondaryLocal('');
926
+ // Cambia subito il titolo alla fase 2 quando l'upload termina
927
+ // e mostra la progress bar primaria con valore iniziale 20%
928
+ setWaitPanelTitleLocal(SDKUI_Localizator.ArchivingCompletionInProgress);
929
+ setShowSecondaryLocal(false);
930
+ setShowPrimaryLocal(true);
931
+ setWaitPanelMaxValuePrimaryLocal(3);
932
+ setWaitPanelValuePrimaryLocal(0.6); // 20% di 3
933
+ setWaitPanelTextPrimaryLocal(SDKUI_Localizator.ArchivingCompletionInProgress);
928
934
  firstBlock = true;
929
935
  }
930
936
  });
@@ -933,11 +939,22 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
933
939
  const savedFormData = structuredClone(formDataRef.current);
934
940
  setFormDataOrig(savedFormData);
935
941
  formDataOrigRef.current = savedFormData;
942
+ // Fase 2: Completamento archiviazione (la progress bar primaria è già visibile dal callback)
943
+ // Imposta il titolo anche qui per sicurezza, nel caso il callback non venga eseguito
944
+ setWaitPanelTitleLocal(SDKUI_Localizator.ArchivingCompletionInProgress);
945
+ // Step 1/3: Aggiornamento griglia di ricerca
946
+ setWaitPanelValuePrimaryLocal(1);
936
947
  await onRefreshSearchAsyncDatagrid?.();
948
+ // Step 2/3: Callback di salvataggio
949
+ setWaitPanelValuePrimaryLocal(2);
937
950
  await onSavedAsyncCallback?.(ae.TID, newDID);
951
+ // Step 3/3: Aggiornamento lista metadati
952
+ setWaitPanelValuePrimaryLocal(3);
938
953
  // Usa fromDTDRef.current invece di fromDTD per evitare stale closure,
939
954
  // garantendo di avere il descrittore del tipo documento corrente.
940
955
  await setMetadataList(fromDTDRef.current?.metadata ?? [], undefined, true, newDID);
956
+ // Breve pausa per mostrare il completamento al 100%
957
+ await new Promise(resolve => setTimeout(resolve, 200));
941
958
  handleReset();
942
959
  let newMruTIDS = updateMruTids(SDKUI_Globals.userSettings.archivingSettings.mruTIDs, TID);
943
960
  SDKUI_Globals.userSettings.archivingSettings.mruTIDs = newMruTIDS;
@@ -951,12 +968,6 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
951
968
  TMExceptionBoxManager.show({ exception: err });
952
969
  }
953
970
  finally {
954
- setWaitPanelTextPrimaryLocal('');
955
- setWaitPanelMaxValuePrimaryLocal(0);
956
- setWaitPanelValuePrimaryLocal(0);
957
- setWaitPanelTextSecondaryLocal('');
958
- setWaitPanelMaxValueSecondaryLocal(0);
959
- setWaitPanelValueSecondaryLocal(0);
960
971
  setShowWaitPanelLocal(false);
961
972
  setUseWaitPanelLocalState(false);
962
973
  }
@@ -30,5 +30,5 @@ interface TMDcmtFormActionButtonsProps {
30
30
  setShowMoreInfoTaskPopup: React.Dispatch<React.SetStateAction<boolean>>;
31
31
  setShowMoreInfoTaskTask: React.Dispatch<React.SetStateAction<TaskDescriptor | undefined>>;
32
32
  }
33
- declare const TMDcmtFormActionButtons: (props: TMDcmtFormActionButtonsProps) => import("react/jsx-runtime").JSX.Element;
33
+ declare const TMDcmtFormActionButtons: (props: TMDcmtFormActionButtonsProps) => React.JSX.Element;
34
34
  export default TMDcmtFormActionButtons;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { DcmtInfo, DownloadModes, DownloadTypes } from '../../../ts';
2
3
  import { FileDescriptor } from '@topconsultnpm/sdk-ts';
3
4
  interface ITMDcmtIconProps {
@@ -13,6 +14,8 @@ interface ITMDcmtIconProps {
13
14
  tooltipContent?: JSX.Element | string;
14
15
  openInOffice?: (selectedDcmtsOrFocused: Array<DcmtInfo>) => Promise<void>;
15
16
  onDownloadDcmtsAsync?: (inputDcmts: DcmtInfo[] | undefined, downloadType: DownloadTypes, downloadMode: DownloadModes, onFileDownloaded?: (dcmtFile: File | undefined) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>) => Promise<void>;
17
+ /** Se true, renderizza il wait panel nel body tramite Portal (centrato a schermo intero) */
18
+ usePortal?: boolean;
16
19
  }
17
- declare const TMDcmtIcon: ({ fileExtension, fileCount, isLexProt, isSigned, isMail, isShared, tid, did, downloadMode, tooltipContent, openInOffice, onDownloadDcmtsAsync }: ITMDcmtIconProps) => import("react/jsx-runtime").JSX.Element;
20
+ declare const TMDcmtIcon: ({ fileExtension, fileCount, isLexProt, isSigned, isMail, isShared, tid, did, downloadMode, tooltipContent, openInOffice, onDownloadDcmtsAsync, usePortal }: ITMDcmtIconProps) => React.JSX.Element;
18
21
  export default TMDcmtIcon;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useMemo } from 'react';
3
+ import { createPortal } from 'react-dom';
3
4
  import styled from 'styled-components';
4
5
  import { getFileIcon } from '../../../helper';
5
6
  import TMTooltip from '../../base/TMTooltip';
@@ -15,7 +16,7 @@ const StyledCellRenderDcmtIcon = styled.div `
15
16
  overflow: visible;
16
17
  position: relative;
17
18
  `;
18
- const TMDcmtIcon = ({ fileExtension, fileCount, isLexProt, isSigned, isMail, isShared, tid, did, downloadMode = "none", tooltipContent, openInOffice, onDownloadDcmtsAsync }) => {
19
+ const TMDcmtIcon = ({ fileExtension, fileCount, isLexProt, isSigned, isMail, isShared, tid, did, downloadMode = "none", tooltipContent, openInOffice, onDownloadDcmtsAsync, usePortal = false }) => {
19
20
  const { downloadDcmtsAsync, showWaitPanel, waitPanelTitle, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, abortController } = useDcmtOperations();
20
21
  const deviceType = useDeviceType();
21
22
  let isMobile = useMemo(() => { return deviceType === DeviceType.MOBILE; }, [deviceType]);
@@ -41,7 +42,7 @@ const TMDcmtIcon = ({ fileExtension, fileCount, isLexProt, isSigned, isMail, isS
41
42
  await onDownloadDcmtsAsync?.(dcmt, DownloadTypes.Dcmt, effectiveDownloadMode);
42
43
  }
43
44
  else {
44
- await downloadDcmtsAsync(dcmt, DownloadTypes.Dcmt, effectiveDownloadMode);
45
+ await downloadDcmtsAsync({ inputDcmts: dcmt, downloadType: DownloadTypes.Dcmt, downloadMode: effectiveDownloadMode });
45
46
  }
46
47
  }
47
48
  }, [tid, did, fileExtension, downloadMode, openInOffice, onDownloadDcmtsAsync, downloadDcmtsAsync]);
@@ -56,43 +57,15 @@ const TMDcmtIcon = ({ fileExtension, fileCount, isLexProt, isSigned, isMail, isS
56
57
  }, ...(deviceType === DeviceType.MOBILE
57
58
  ? { onClick: handleDownloadAction } // Su mobile, un singolo click sull'icona avvia il download
58
59
  : { onDoubleClick: handleDownloadAction } // Su desktop, un doppio click sull'icona avvia il download
59
- ), children: [icon, isLexProt == 1 && _jsx("div", { style: { position: 'absolute', left: '-7px', top: isShared ? undefined : '2px' }, children: _jsx(TMTooltip, { content: "Protezione LEX", children: _jsx(IconLexProtLock, { color: 'blue', fontSize: 13 }) }) }), isShared == 1 && _jsx("div", { style: { position: 'absolute', top: '-7px', left: '-5px' }, children: _jsx(TMTooltip, { content: "Documento condiviso", children: _jsx(IconShared, { fontSize: 16 }) }) }), isSigned == 1 && _jsx("div", { style: { position: 'absolute', bottom: '-4px', right: '-7px' }, children: _jsx(TMTooltip, { content: "Documento firmato", children: _jsx(IconSignature, { fontSize: 28 }) }) }), showWaitPanel &&
60
- _jsx(TMWaitPanel, { title: waitPanelTitle, showSecondary: showSecondary, textSecondary: waitPanelTextSecondary, valueSecondary: waitPanelValueSecondary, maxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, onAbortClick: (abortController) => { setTimeout(() => { abortController?.abort(); }, 1000); } })] }));
60
+ ), children: [icon, isLexProt == 1 && _jsx("div", { style: { position: 'absolute', left: '-7px', top: isShared ? undefined : '2px' }, children: _jsx(TMTooltip, { content: "Protezione LEX", children: _jsx(IconLexProtLock, { color: 'blue', fontSize: 13 }) }) }), isShared == 1 && _jsx("div", { style: { position: 'absolute', top: '-7px', left: '-5px' }, children: _jsx(TMTooltip, { content: "Documento condiviso", children: _jsx(IconShared, { fontSize: 16 }) }) }), isSigned == 1 && _jsx("div", { style: { position: 'absolute', bottom: '-4px', right: '-7px' }, children: _jsx(TMTooltip, { content: "Documento firmato", children: _jsx(IconSignature, { fontSize: 28 }) }) }), showWaitPanel && (usePortal ? createPortal(_jsx(TMWaitPanel, { title: waitPanelTitle, showSecondary: showSecondary, textSecondary: waitPanelTextSecondary, valueSecondary: waitPanelValueSecondary, maxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, onAbortClick: (abortController) => { setTimeout(() => { abortController?.abort(); }, 1000); }, useHighZIndex: true }), document.body) : (_jsx(TMWaitPanel, { title: waitPanelTitle, showSecondary: showSecondary, textSecondary: waitPanelTextSecondary, valueSecondary: waitPanelValueSecondary, maxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, onAbortClick: (abortController) => { setTimeout(() => { abortController?.abort(); }, 1000); } })))] }));
61
61
  };
62
62
  export default TMDcmtIcon;
63
63
  function IconLexProtLock(props) {
64
- return (_jsxs("svg", { viewBox: "0 0 512 512", height: "1em", width: "1em", ...props, children: [_jsx("path", { fill: "#455A64", d: "M256,0c-76.544,0.094-138.573,62.122-138.667,138.667V224c0,5.891,4.776,10.667,10.667,10.667h42.667\r\n c5.891,0,10.667-4.776,10.667-10.667v-85.333C181.333,97.429,214.763,64,256,64s74.667,33.429,74.667,74.667V224\r\n c0,5.891,4.776,10.667,10.667,10.667H384c5.891,0,10.667-4.776,10.667-10.667v-85.333C394.573,62.122,332.544,0.094,256,0z" }), _jsx("path", { fill: "#FFC107", d: "M128,213.333h256c29.455,0,53.333,23.878,53.333,53.333v192C437.333,488.122,413.455,512,384,512H128\r\n c-29.455,0-53.333-23.878-53.333-53.333v-192C74.667,237.211,98.545,213.333,128,213.333z" }), _jsx("path", { fill: "#455A64", d: "M309.333,330.667c0.124-29.455-23.653-53.434-53.108-53.558\r\n c-29.455-0.124-53.434,23.653-53.558,53.108c-0.086,20.36,11.427,38.992,29.674,48.023l-8.235,57.6\r\n c-0.825,5.833,3.235,11.23,9.068,12.055c0.494,0.07,0.993,0.105,1.492,0.105h42.667c5.891,0.06,10.715-4.667,10.774-10.558\r\n c0.005-0.543-0.03-1.086-0.108-1.623l-8.235-57.6C297.788,369.199,309.216,350.82,309.333,330.667z" }), _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " })] })
65
- // <svg
66
- // viewBox="0 0 24 24"
67
- // fill="currentColor"
68
- // height="1em"
69
- // width="1em"
70
- // {...props}
71
- // >
72
- // <path d="M12 2C9.243 2 7 4.243 7 7v3H6a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2v-8a2 2 0 00-2-2h-1V7c0-2.757-2.243-5-5-5zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v3H9V7zm4 10.723V20h-2v-2.277a1.993 1.993 0 01.567-3.677A2.001 2.001 0 0114 16a1.99 1.99 0 01-1 1.723z" />
73
- // </svg>
74
- );
64
+ return (_jsxs("svg", { viewBox: "0 0 512 512", height: "1em", width: "1em", ...props, children: [_jsx("path", { fill: "#455A64", d: "M256,0c-76.544,0.094-138.573,62.122-138.667,138.667V224c0,5.891,4.776,10.667,10.667,10.667h42.667\r\n c5.891,0,10.667-4.776,10.667-10.667v-85.333C181.333,97.429,214.763,64,256,64s74.667,33.429,74.667,74.667V224\r\n c0,5.891,4.776,10.667,10.667,10.667H384c5.891,0,10.667-4.776,10.667-10.667v-85.333C394.573,62.122,332.544,0.094,256,0z" }), _jsx("path", { fill: "#FFC107", d: "M128,213.333h256c29.455,0,53.333,23.878,53.333,53.333v192C437.333,488.122,413.455,512,384,512H128\r\n c-29.455,0-53.333-23.878-53.333-53.333v-192C74.667,237.211,98.545,213.333,128,213.333z" }), _jsx("path", { fill: "#455A64", d: "M309.333,330.667c0.124-29.455-23.653-53.434-53.108-53.558\r\n c-29.455-0.124-53.434,23.653-53.558,53.108c-0.086,20.36,11.427,38.992,29.674,48.023l-8.235,57.6\r\n c-0.825,5.833,3.235,11.23,9.068,12.055c0.494,0.07,0.993,0.105,1.492,0.105h42.667c5.891,0.06,10.715-4.667,10.774-10.558\r\n c0.005-0.543-0.03-1.086-0.108-1.623l-8.235-57.6C297.788,369.199,309.216,350.82,309.333,330.667z" }), _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " }), " ", _jsx("g", { children: " " })] }));
75
65
  }
76
66
  function IconShared(props) {
77
67
  return (_jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", height: "1em", width: "1em", ...props, children: _jsx("path", { d: "M11 9V5l7 7-7 7v-4.1c-5 0-8.5 1.6-11 5.1 1-5 4-10 11-11m6-1V5l7 7-7 7v-3l4-4-4-4z" }) }));
78
68
  }
79
69
  function IconSignature(props) {
80
- return (
81
- // <svg viewBox="0 0 128 128" fill="currentColor"
82
- // height="1em"
83
- // width="1em"
84
- // {...props}>
85
- // <g><path d="m128 82.7c0-.3-.1-.6-.2-.8l-6.4-10.9c-2.2-3.7-4.8-7.1-7.9-10.2l-39.8-39.8c-2.7-2.7-7-2.7-9.7 0s-2.7 7 0 9.7l39.8 39.8c3.1 3.1 6.5 5.7 10.2 7.9l8.3 4.8c-.3.2-.7.5-1 .7-1.4 1-2.9 2-4.3 3.1-1.2.9-2.3 1.9-3.3 2.9-2.5 2.2-4.8 4.3-7.8 5.6-3.5 1.5-8.9 2.2-12.6-.9-.7-.6-1.4-1.4-2.2-2.2-2-2.2-4.3-4.7-7.8-4.6-2.9.1-4.9 2-6.7 3.7-.8.8-1.6 1.5-2.4 2-1 .6-2.1.9-3.2.9 1.9-3.5 2.5-7.1 1.7-10.5-.6-2.4-3.1-8.7-7.7-8.5-1.8.1-3.3 1-4.3 2.6-2.2 3.5-1.4 9.7-.4 12.2 1 2.4 2.6 4.4 4.5 5.9-3.9 4.3-9.6 7.4-15.9 8.6-6.4 1.2-12.9-.7-18.2-4.8 4.7-2 9.1-5.2 12.7-9.4 5.7-6.8 8-14.5 6.1-21.1-1.2-4.1-3.8-7.2-7.8-8.9-4.7-2-10.7-1.6-15.6 1.1-11.1 6.1-12.2 20.3-6.8 30.6 1.1 2.1 2.3 4 3.7 5.7-.5.1-1 .1-1.4.1-4.5.1-8.3-1.4-11.4-4.7-9.8-10.2-7-27.9 1.1-38.5 8.4-11 23.5-14.9 35.1-9.1 1 .5 2.2.1 2.7-.9s.1-2.2-.9-2.7c-13.2-6.6-30.4-2.2-40 10.2-9.2 12-12.2 32-.9 43.7 3.9 4 8.9 6.1 14.4 5.9 1.5 0 3-.3 4.5-.6 5.3 4.9 11.9 7.7 18.7 7.7 1.5 0 3-.1 4.6-.4 7.7-1.4 14.4-5.2 18.9-10.6 2.7.8 5.4.4 7.8-1.1 1.1-.7 2.1-1.6 3-2.5 1.4-1.4 2.7-2.5 4-2.6 1.6 0 2.8 1.2 4.7 3.3.8.9 1.6 1.8 2.6 2.6 4.2 3.5 10.8 4.1 16.8 1.5 3.6-1.6 6.3-4 8.9-6.3 1-.9 2.1-1.9 3.2-2.7 1.3-1 2.6-1.9 4-2.9 1.2-.8 2.5-1.7 3.7-2.6.7-.6 1-1.3.9-2zm-12-7.8c-3.4-2-6.5-4.4-9.4-7.2l-39.8-39.8c-1.1-1.1-1.1-2.9 0-4 .6-.6 1.3-.8 2-.8s1.5.3 2 .8l39.8 39.8c2.8 2.8 5.3 6 7.2 9.4l2.7 4.6zm-93.1 15.4c-4.5-8.5-3.8-20.3 5.2-25.2 2.2-1.2 4.8-1.8 7.3-1.8 1.7 0 3.4.3 4.9.9 1.9.8 4.4 2.6 5.5 6.3 2.1 7.6-3 14.7-5.3 17.4-3.5 4.2-8.2 7.4-12.9 9-1.9-2-3.4-4.2-4.7-6.6zm44.3 2.6c-1.4-1-2.5-2.5-3.2-4.2-.7-1.8-1.2-6.5.1-8.6.3-.5.6-.7 1.1-.7 1.2 0 3 3 3.5 5.4.8 3.2-.3 6.1-1.5 8.1z"></path></g>
86
- // </svg>
87
- _jsx("svg", { height: "1em", viewBox: "0 0 450 450", width: "1em", fill: "currentColor", ...props, children: _jsx("g", { children: _jsx("g", { children: _jsxs("g", { clipRule: "evenodd", fill: "rgb(0,0,0)", fillRule: "evenodd", children: [_jsx("path", { d: "m366.6 67.8 1.1-4c.4-1.5.6-3 .6-4.5 0-8.1-5.5-15.2-13.3-17.3-9.5-2.5-19.3 3.2-21.8 12.8l-20.4 77.9 34.6 9z" }), _jsx("path", { d: "m234.9 198.9h148.6v35.7h-148.6z", transform: "matrix(.253 -.968 .968 .253 21.311 461.088)" }), _jsx("path", { d: "m292.8 316 8.4 2.2 4.5-17.3-34.6-9.1-4.5 17.4 8.3 2.2z" }), _jsx("path", { d: "m275.3 319.7-12.7 14.7 5.4 40.3 24.4-32.5-3.9-19.1zm6.5 23.3c-.8 2.9-3.7 4.6-6.6 3.9s-4.6-3.7-3.9-6.6 3.7-4.6 6.6-3.9 4.6 3.7 3.9 6.6z" }), _jsx("path", { d: "m395.6 71.5-20.3-5.5-2 7.7 16.5 4.4-24.8 95c-.6 2.1.7 4.3 2.8 4.8.3.1.7.1 1 .1 1.8 0 3.4-1.2 3.8-3l25.8-98.8c.6-2-.7-4.2-2.8-4.7z" }), _jsx("path", { d: "" }), _jsx("path", { d: "m243.4 379.8c-1.8-1.2-4.3-.8-5.5 1.1-9.6 14.1-29.9 19.6-45.3 12.2-.5-.2-.9-.5-1.4-.7-3.5-1.8-7.9-4-12.8-2.7-2.7.7-4.7 2.3-6.5 3.6-1.5 1.2-2.8 2.2-3.9 2.2-2 .1-4-3-5-5.9-.2-.5-.4-1-.5-1.5-1.4-4.1-3.1-9.1-7.8-11.8-5.8-3.3-12.9-.9-17.4 3-2.4 2-4.2 4.4-6 6.7-1.2 1.5-2.3 2.9-3.4 4.1-7.5 7.9-20.3 10-30.2 5.6 7.6-6.9 13-15.5 15.4-24.9s1-21.1-7.8-25.8c-4.5-2.4-9.9-2.4-15.2.2-4.4 2.2-8.4 5.9-10.9 10.3-3.9 7-5.1 15.4-3.3 23.8 1.4 6.3 4.3 12 8.4 16.5-8.4 4.9-18.2 7.3-27.8 6.1-2.2-.3-4.2 1.2-4.5 3.4s1.2 4.2 3.4 4.5c2.1.3 4.1.4 6.2.4 10 0 20.1-3.1 29.1-9 6.1 3.7 13.5 5.4 21.1 4.7 8.5-.8 16.3-4.4 21.8-10.2 1.5-1.5 2.7-3.1 3.9-4.7 1.6-2.1 3.1-4 4.9-5.6 2.4-2 6-3.4 8.3-2.1 2.1 1.2 3.1 4.2 4.2 7.5.2.5.4 1.1.6 1.6 2.5 7 7.1 11.1 12.4 11.1h.6c3.6-.2 6.2-2.2 8.3-3.9 1.3-1 2.5-2 3.6-2.2 2-.5 4.5.8 7.2 2.1.5.3 1 .5 1.5.7 5.7 2.7 11.9 4 18.2 4 14.4 0 29-6.9 37.1-18.9 1.3-1.8.9-4.3-1-5.5zm-152.6 11.3c-8.1-8-10.4-21.8-4.8-31.7 2.5-4.5 7.5-8.2 12-8.2 1.2 0 2.3.3 3.4.8 5 2.7 5.5 10.6 3.9 16.8-2.2 8.7-7.5 16.5-14.5 22.3z" })] }) }) }) })
88
- // <svg
89
- // viewBox="0 0 24 24"
90
- // fill="currentColor"
91
- // height="1em"
92
- // width="1em"
93
- // {...props}
94
- // >
95
- // <path d="M22 22H2v-2h20v2M2.26 16.83L5.09 14l-2.83-2.83 1.41-1.41 2.83 2.83 2.83-2.83 1.41 1.41L7.91 14l2.83 2.83-1.41 1.41-2.83-2.83-2.83 2.83-1.41-1.41z" />
96
- // </svg>
97
- );
70
+ return (_jsx("svg", { height: "1em", viewBox: "0 0 450 450", width: "1em", fill: "currentColor", ...props, children: _jsx("g", { children: _jsx("g", { children: _jsxs("g", { clipRule: "evenodd", fill: "rgb(0,0,0)", fillRule: "evenodd", children: [_jsx("path", { d: "m366.6 67.8 1.1-4c.4-1.5.6-3 .6-4.5 0-8.1-5.5-15.2-13.3-17.3-9.5-2.5-19.3 3.2-21.8 12.8l-20.4 77.9 34.6 9z" }), _jsx("path", { d: "m234.9 198.9h148.6v35.7h-148.6z", transform: "matrix(.253 -.968 .968 .253 21.311 461.088)" }), _jsx("path", { d: "m292.8 316 8.4 2.2 4.5-17.3-34.6-9.1-4.5 17.4 8.3 2.2z" }), _jsx("path", { d: "m275.3 319.7-12.7 14.7 5.4 40.3 24.4-32.5-3.9-19.1zm6.5 23.3c-.8 2.9-3.7 4.6-6.6 3.9s-4.6-3.7-3.9-6.6 3.7-4.6 6.6-3.9 4.6 3.7 3.9 6.6z" }), _jsx("path", { d: "m395.6 71.5-20.3-5.5-2 7.7 16.5 4.4-24.8 95c-.6 2.1.7 4.3 2.8 4.8.3.1.7.1 1 .1 1.8 0 3.4-1.2 3.8-3l25.8-98.8c.6-2-.7-4.2-2.8-4.7z" }), _jsx("path", { d: "" }), _jsx("path", { d: "m243.4 379.8c-1.8-1.2-4.3-.8-5.5 1.1-9.6 14.1-29.9 19.6-45.3 12.2-.5-.2-.9-.5-1.4-.7-3.5-1.8-7.9-4-12.8-2.7-2.7.7-4.7 2.3-6.5 3.6-1.5 1.2-2.8 2.2-3.9 2.2-2 .1-4-3-5-5.9-.2-.5-.4-1-.5-1.5-1.4-4.1-3.1-9.1-7.8-11.8-5.8-3.3-12.9-.9-17.4 3-2.4 2-4.2 4.4-6 6.7-1.2 1.5-2.3 2.9-3.4 4.1-7.5 7.9-20.3 10-30.2 5.6 7.6-6.9 13-15.5 15.4-24.9s1-21.1-7.8-25.8c-4.5-2.4-9.9-2.4-15.2.2-4.4 2.2-8.4 5.9-10.9 10.3-3.9 7-5.1 15.4-3.3 23.8 1.4 6.3 4.3 12 8.4 16.5-8.4 4.9-18.2 7.3-27.8 6.1-2.2-.3-4.2 1.2-4.5 3.4s1.2 4.2 3.4 4.5c2.1.3 4.1.4 6.2.4 10 0 20.1-3.1 29.1-9 6.1 3.7 13.5 5.4 21.1 4.7 8.5-.8 16.3-4.4 21.8-10.2 1.5-1.5 2.7-3.1 3.9-4.7 1.6-2.1 3.1-4 4.9-5.6 2.4-2 6-3.4 8.3-2.1 2.1 1.2 3.1 4.2 4.2 7.5.2.5.4 1.1.6 1.6 2.5 7 7.1 11.1 12.4 11.1h.6c3.6-.2 6.2-2.2 8.3-3.9 1.3-1 2.5-2 3.6-2.2 2-.5 4.5.8 7.2 2.1.5.3 1 .5 1.5.7 5.7 2.7 11.9 4 18.2 4 14.4 0 29-6.9 37.1-18.9 1.3-1.8.9-4.3-1-5.5zm-152.6 11.3c-8.1-8-10.4-21.8-4.8-31.7 2.5-4.5 7.5-8.2 12-8.2 1.2 0 2.3.3 3.4.8 5 2.7 5.5 10.6 3.9 16.8-2.2 8.7-7.5 16.5-14.5 22.3z" })] }) }) }) }));
98
71
  }
@@ -25,7 +25,7 @@ export declare const TMNothingToShow: ({ text, secondText, fileExt, icon }: {
25
25
  secondText?: any;
26
26
  fileExt?: string;
27
27
  icon?: any;
28
- }) => import("react/jsx-runtime").JSX.Element;
28
+ }) => React.JSX.Element;
29
29
  export declare const StyledHeaderIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color"> & {
30
30
  $color: string;
31
31
  }, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color"> & {
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { FormModes, TaskContext } from "../../../ts";
2
3
  import { HomeBlogPost, TaskDescriptor } from "@topconsultnpm/sdk-ts";
3
4
  interface TMDcmtTasksProps {
@@ -12,5 +13,5 @@ interface TMDcmtTasksProps {
12
13
  handleNavigateToDossiers?: (value: HomeBlogPost | number) => Promise<void>;
13
14
  onBack?: () => void;
14
15
  }
15
- declare const TMDcmtTasks: (props: TMDcmtTasksProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const TMDcmtTasks: (props: TMDcmtTasksProps) => React.JSX.Element;
16
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-runtime").JSX.Element;
5
+ declare const TMDragDropOverlay: (props: TMDragDropOverlayProps) => import("react").JSX.Element;
6
6
  export default TMDragDropOverlay;
@@ -99,7 +99,7 @@ const TMFileUploader = ({ fromDTD, deviceType = DeviceType.DESKTOP, onClose, onF
99
99
  let content = !uploadedFile ?
100
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, " "] })] })] }) :
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
- _jsx("div", { style: { backgroundColor: '#f6dbdb', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.error }, children: _jsxs("div", { children: [" ", 'Anteprima non disponibile.', fileExt && _jsx("b", { children: ` (*.${fileExt})` })] }) })] });
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] }));
104
104
  const toolbar = useMemo(() => {
105
105
  return (_jsxs(_Fragment, { children: [(isPdfEditorAvailable(fromDTD, fileExt) && openFileUploaderPdfEditor) && (_jsx(TMCommandsContextMenu, { target: "#TMPanel-FileUploader-Commands-Header", menuItems: [
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { HomeBlogPost, SearchResultDescriptor, TaskDescriptor } from '@topconsultnpm/sdk-ts';
3
3
  import { RelationTreeItem } from './TMRelationViewer';
4
- import { MergePdfManagerType } from '../../../helper';
4
+ import { IntesiCertificateData } from '../../../helper';
5
5
  import { DcmtInfo, TaskContext, MetadataValueDescriptorEx } from '../../../ts';
6
6
  import { DeviceContextProps } from '../../base/TMDeviceProvider';
7
7
  export type IRelatedDcmt = RelationTreeItem;
@@ -29,7 +29,7 @@ interface ITMMasterDetailDcmtsProps extends DeviceContextProps {
29
29
  openS4TViewer?: boolean;
30
30
  onOpenS4TViewerRequest?: (dcmtInfo: Array<DcmtInfo>, refreshDocumentPreview?: (() => Promise<void>)) => void;
31
31
  onOpenPdfEditorRequest?: ((dcmtInfo: Array<DcmtInfo>, refreshDocumentPreview?: () => Promise<void>) => void);
32
- mergePdfManager?: MergePdfManagerType;
32
+ fetchRemoteCertificates?: (email: string) => Promise<IntesiCertificateData[]>;
33
33
  datagridUtility?: {
34
34
  onRefreshSearchAsyncDatagrid?: () => Promise<void>;
35
35
  onRefreshDataRowsAsync?: (() => Promise<void>);