@topconsultnpm/sdkui-react 6.21.0-dev5.4 → 6.21.0-dev5.5

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.
@@ -100,7 +100,8 @@ const TMMergeToPdfForm = (props) => {
100
100
  });
101
101
  return null;
102
102
  }
103
- if (pdfDcmtInfosToDownload.length < MIN_PDF_FOR_MERGE) {
103
+ // Permetti merge anche con 1 solo file se convertibile o metadata-only
104
+ if (!hasEnoughPdfForMerge) {
104
105
  TMMessageBoxManager.show({
105
106
  message: SDKUI_Localizator.OnlyOnePdfOrConvertibleFileMergeBlocked.replaceParams(MIN_PDF_FOR_MERGE.toString()),
106
107
  buttons: [ButtonNames.OK]
@@ -68,7 +68,9 @@ export const getMergePdfSelectionStats = (selectedDcmtInfos, selectedItemsFull,
68
68
  metadataOnlySelectedItems,
69
69
  hasMetadataOnlySelected: metadataOnlySelectedItems.length > 0,
70
70
  mergeableSelectedCount,
71
- hasEnoughPdfForMerge: mergeableSelectedCount >= MIN_PDF_FOR_MERGE,
71
+ // Merge possibile se: >= 2 file unibili OPPURE >= 1 file convertibile/metadata-only (verrà trasformato in PDF)
72
+ hasEnoughPdfForMerge: mergeableSelectedCount >= MIN_PDF_FOR_MERGE ||
73
+ (mergeableSelectedCount >= 1 && (convertibleSelectedItems.length > 0 || metadataOnlySelectedItems.length > 0)),
72
74
  };
73
75
  };
74
76
  // LAZY LOADING pdf-lib
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.21.0-dev5.4",
3
+ "version": "6.21.0-dev5.5",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",