@topconsultnpm/sdkui-react-beta 6.15.123 → 6.15.124

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.
@@ -11,7 +11,7 @@ interface ITMDcmtIconProps {
11
11
  did?: number;
12
12
  downloadMode?: DownloadModes;
13
13
  tooltipContent?: JSX.Element | string;
14
- openInOffice?: (file: File) => void;
14
+ openInOffice?: (selectedDcmtsOrFocused: Array<DcmtInfo>) => Promise<void>;
15
15
  onDownloadDcmtsAsync?: (inputDcmts: DcmtInfo[] | undefined, downloadType: DownloadTypes, downloadMode: DownloadModes, onFileDownloaded?: (dcmtFile: File | undefined) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>) => Promise<void>;
16
16
  }
17
17
  declare const TMDcmtIcon: ({ fileExtension, fileCount, isLexProt, isSigned, isMail, isShared, tid, did, downloadMode, tooltipContent, openInOffice, onDownloadDcmtsAsync }: ITMDcmtIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -30,11 +30,7 @@ const TMDcmtIcon = ({ fileExtension, fileCount, isLexProt, isSigned, isMail, isS
30
30
  let dcmt = [{ TID: tid, DID: did, FILEEXT: fileExtension }];
31
31
  // Usa la funzione passata tramite prop se disponibile, altrimenti usa l'hook interno
32
32
  if (openInOffice) {
33
- const onFileDownloaded = (dcmtFile) => {
34
- if (dcmtFile) {
35
- openInOffice(dcmtFile);
36
- }
37
- };
33
+ await openInOffice(dcmt);
38
34
  }
39
35
  else if (onDownloadDcmtsAsync) {
40
36
  await onDownloadDcmtsAsync?.(dcmt, DownloadTypes.Dcmt, downloadMode);
@@ -15,7 +15,7 @@ interface ITMSearchProps {
15
15
  openS4TViewer?: boolean;
16
16
  onOpenS4TViewerRequest?: (dcmtInfo: Array<DcmtInfo>) => void;
17
17
  showTodoDcmtForm?: boolean;
18
- openInOffice?: (file: File) => void;
18
+ openInOffice?: (selectedDcmtsOrFocused: Array<DcmtInfo>) => Promise<void>;
19
19
  }
20
20
  declare const TMSearch: React.FunctionComponent<ITMSearchProps>;
21
21
  export default TMSearch;
@@ -20,7 +20,7 @@ interface ITMSearchResultProps {
20
20
  workingGroupContext?: WorkingGroupDescriptor;
21
21
  disableAccordionIfSingleCategory?: boolean;
22
22
  floatingActionConfig?: TMSearchResultFloatingActionConfig;
23
- openInOffice?: (file: File) => void;
23
+ openInOffice?: (selectedDcmtsOrFocused: Array<DcmtInfo>) => Promise<void>;
24
24
  onClose?: () => void;
25
25
  onWFOperationCompleted?: () => Promise<void>;
26
26
  onSelectedTIDChanged?: (TID: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react-beta",
3
- "version": "6.15.123",
3
+ "version": "6.15.124",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",