@topconsultnpm/sdkui-react 6.22.0-dev3.9 → 6.22.0-dev4.3

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 (96) hide show
  1. package/lib/components/base/TMAlert.js +6 -8
  2. package/lib/components/base/TMAreaManager.js +53 -55
  3. package/lib/components/base/TMButton.js +4 -2
  4. package/lib/components/base/TMCustomButton.js +40 -48
  5. package/lib/components/base/TMDataGrid.js +219 -219
  6. package/lib/components/base/TMPanel.js +173 -170
  7. package/lib/components/base/TMSpinner.d.ts +2 -1
  8. package/lib/components/base/TMSpinner.js +9 -7
  9. package/lib/components/base/TMTabControl.d.ts +5 -0
  10. package/lib/components/base/TMTabControl.js +18 -7
  11. package/lib/components/base/TMTreeView.js +20 -0
  12. package/lib/components/base/TMWaitPanel.js +1 -1
  13. package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
  14. package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
  15. package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +169 -0
  16. package/lib/components/base/waitPanel/TMWaitPanelManager.js +320 -0
  17. package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +53 -0
  18. package/lib/components/base/waitPanel/TMWaitPanelView.js +274 -0
  19. package/lib/components/base/waitPanel/index.d.ts +1 -0
  20. package/lib/components/base/waitPanel/index.js +1 -0
  21. package/lib/components/choosers/TMPathChooser.js +17 -34
  22. package/lib/components/editors/TMTextBox.d.ts +4 -0
  23. package/lib/components/editors/TMTextBox.js +99 -11
  24. package/lib/components/features/archive/TMArchive.js +7 -2
  25. package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +29 -0
  26. package/lib/components/features/assistant/TMHelpOnLineChat.js +1384 -0
  27. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
  28. package/lib/components/features/assistant/dataset/Designer-Suggested-Questions.json +102 -0
  29. package/lib/components/features/assistant/dataset/Login-Suggested-Questions.json +32 -0
  30. package/lib/components/features/assistant/dataset/Surfer-Suggested-Questions.json +102 -0
  31. package/lib/components/features/documents/TMBatchUpdateForm.js +3 -4
  32. package/lib/components/features/documents/TMCopyToFolderForm.js +53 -84
  33. package/lib/components/features/documents/TMDcmtForm.js +50 -61
  34. package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -3
  35. package/lib/components/features/documents/TMDcmtIcon.js +3 -5
  36. package/lib/components/features/documents/TMDcmtPreview.js +5 -3
  37. package/lib/components/features/documents/TMDcmtTasks.js +2 -9
  38. package/lib/components/features/documents/TMFileUploader.js +26 -26
  39. package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
  40. package/lib/components/features/documents/TMMasterDetailDcmts.js +53 -148
  41. package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
  42. package/lib/components/features/documents/TMMergeToPdfForm.js +49 -54
  43. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +14 -15
  44. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +1 -1
  45. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +3 -3
  46. package/lib/components/features/documents/TMRelationViewer.d.ts +13 -14
  47. package/lib/components/features/documents/TMRelationViewer.js +206 -143
  48. package/lib/components/features/documents/relationTreeState.d.ts +32 -0
  49. package/lib/components/features/documents/relationTreeState.js +89 -0
  50. package/lib/components/features/search/TMSearch.js +3 -4
  51. package/lib/components/features/search/TMSearchQueryPanel.js +0 -4
  52. package/lib/components/features/search/TMSearchResult.d.ts +5 -0
  53. package/lib/components/features/search/TMSearchResult.js +39 -19
  54. package/lib/components/features/search/TMTreeSelector.js +23 -27
  55. package/lib/components/features/search/TMViewHistoryDcmt.js +14 -25
  56. package/lib/components/features/tasks/TMTasksView.js +91 -90
  57. package/lib/components/features/wg/TMWGsCopyMoveForm.js +91 -91
  58. package/lib/components/forms/TMResultDialog.js +1 -1
  59. package/lib/components/grids/TMBlogsPost.js +92 -96
  60. package/lib/components/index.d.ts +5 -1
  61. package/lib/components/index.js +4 -1
  62. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +16 -15
  63. package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +1 -0
  64. package/lib/components/layout/panelManager/TMPanelManagerContext.js +5 -1
  65. package/lib/components/layout/panelManager/TMPanelManagerLoader.d.ts +6 -0
  66. package/lib/components/layout/panelManager/TMPanelManagerLoader.js +18 -0
  67. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +4 -8
  68. package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +1 -1
  69. package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +2 -1
  70. package/lib/components/pages/TMPage.js +29 -31
  71. package/lib/components/query/TMQueryEditor.d.ts +3 -0
  72. package/lib/components/query/TMQueryEditor.js +2 -1
  73. package/lib/components/sidebar/TMHeader.d.ts +1 -0
  74. package/lib/components/sidebar/TMHeader.js +2 -2
  75. package/lib/helper/Enum_Localizator.js +1 -0
  76. package/lib/helper/SDKUI_Globals.d.ts +3 -0
  77. package/lib/helper/SDKUI_Globals.js +3 -0
  78. package/lib/helper/SDKUI_Localizator.d.ts +21 -0
  79. package/lib/helper/SDKUI_Localizator.js +210 -0
  80. package/lib/helper/ZipManager.d.ts +1 -1
  81. package/lib/helper/ZipManager.js +2 -1
  82. package/lib/helper/dcmtsHelper.d.ts +2 -0
  83. package/lib/helper/dcmtsHelper.js +3 -1
  84. package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
  85. package/lib/hooks/useCheckInOutOperations.js +14 -34
  86. package/lib/hooks/useDcmtOperations.d.ts +3 -19
  87. package/lib/hooks/useDcmtOperations.js +160 -222
  88. package/lib/hooks/useDocumentOperations.d.ts +1 -0
  89. package/lib/hooks/useDocumentOperations.js +14 -25
  90. package/lib/hooks/useMultiMasterDetailDcmts.d.ts +0 -15
  91. package/lib/hooks/useMultiMasterDetailDcmts.js +65 -67
  92. package/lib/hooks/usePreventFileDrop.js +9 -0
  93. package/lib/hooks/useWorkflowApprove.js +33 -17
  94. package/lib/services/caseflow/CaseFlowService.d.ts +36 -6
  95. package/lib/services/caseflow/CaseFlowService.js +55 -14
  96. package/package.json +69 -69
@@ -1,6 +1,6 @@
1
1
  import { useCallback, useMemo, useState } from 'react';
2
2
  import { cicoDownloadFilesCallback, dcmtsFileCachePreview, getCicoDownloadFileName, getExceptionMessage, removeDcmtsFileCache, renderCicoCheckInContent, SDKUI_Globals, SDKUI_Localizator, updateCicoCheckoutStorageItem, validateCicoFileName } from '../helper';
3
- import { ButtonNames, DeviceType, ShowAlert, TMMessageBoxManager, TMResultManager, useDeviceType } from '../components';
3
+ import { ButtonNames, DeviceType, ShowAlert, TMMessageBoxManager, TMResultManager, TMWaitPanelManager, useDeviceType } from '../components';
4
4
  import { ResultTypes, SDK_Globals } from '@topconsultnpm/sdk-ts';
5
5
  let abortController = new AbortController();
6
6
  export const useCheckInOutOperations = (props) => {
@@ -18,18 +18,13 @@ export const useCheckInOutOperations = (props) => {
18
18
  const deviceType = useDeviceType();
19
19
  // This avoids unnecessary re-renders by only recalculating when deviceType changes.
20
20
  let isMobile = useMemo(() => { return deviceType === DeviceType.MOBILE; }, [deviceType]);
21
- // State variable to control the visibility of the wait panel
22
- const [showCicoWaitPanel, setShowCicoWaitPanel] = useState(false);
23
- // State variable to store the title of the wait panel
24
- const [cicoWaitPanelTitle, setCicoWaitPanelTitle] = useState('');
25
- // State variable to control the visibility of the primary section of the wait panel
26
- const [showCicoPrimaryProgress, setShowCicoPrimaryProgress] = useState(false);
27
- // State variable to store the primary text of the wait panel
28
- const [cicoPrimaryProgressText, setCicoPrimaryProgressText] = useState('');
29
- // State variable to track the current value of the primary progress indicator in the wait panel
30
- const [cicoPrimaryProgressValue, setCicoPrimaryProgressValue] = useState(0);
31
- // State variable to define the maximum value for the primary progress indicator in the wait panel
32
- const [cicoPrimaryProgressMax, setCicoPrimaryProgressMax] = useState(0);
21
+ // Check in e check out non riportano avanzamento: il pannello e' solo il "sto lavorando".
22
+ const showCicoWaitPanel = (title) => TMWaitPanelManager.show({
23
+ title,
24
+ showCounters: false,
25
+ cancelable: true,
26
+ onAbort: () => abortController.abort(),
27
+ });
33
28
  const showHistoryCallback = useCallback(() => {
34
29
  setShowHistory(true);
35
30
  }, []);
@@ -73,11 +68,9 @@ export const useCheckInOutOperations = (props) => {
73
68
  if (e !== ButtonNames.YES)
74
69
  return;
75
70
  let result = [];
71
+ abortController = new AbortController();
72
+ const panel = showCicoWaitPanel(title);
76
73
  try {
77
- setCicoWaitPanelTitle(title);
78
- setShowCicoWaitPanel(true);
79
- setShowCicoPrimaryProgress(true);
80
- abortController = new AbortController();
81
74
  const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
82
75
  if (!ue)
83
76
  throw new Error("Update Engine not available");
@@ -113,10 +106,7 @@ export const useCheckInOutOperations = (props) => {
113
106
  result.push({ rowIndex: 1, id1: dcmt.TID, id2: dcmt.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
114
107
  }
115
108
  finally {
116
- setCicoPrimaryProgressText('');
117
- setCicoPrimaryProgressMax(0);
118
- setCicoPrimaryProgressValue(0);
119
- setShowCicoWaitPanel(false);
109
+ panel.close();
120
110
  TMResultManager.show(result, title, "ID", undefined);
121
111
  }
122
112
  }
@@ -158,13 +148,12 @@ export const useCheckInOutOperations = (props) => {
158
148
  onButtonClick: async (e) => {
159
149
  if (e !== ButtonNames.YES)
160
150
  return;
161
- setCicoWaitPanelTitle('Check in');
162
- setShowCicoWaitPanel(true);
163
- setShowCicoPrimaryProgress(true);
164
151
  abortController = new AbortController();
165
152
  let result = [];
166
153
  let i = 0;
167
154
  if (dcmt.TID && dcmt.DID) {
155
+ // Aperto qui e non prima: fuori da questo ramo nessuno lo chiuderebbe.
156
+ const panel = showCicoWaitPanel('Check in');
168
157
  try {
169
158
  const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
170
159
  if (ue) {
@@ -187,10 +176,7 @@ export const useCheckInOutOperations = (props) => {
187
176
  result.push({ rowIndex: i, id1: i, id2: i, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
188
177
  }
189
178
  finally {
190
- setCicoPrimaryProgressText('');
191
- setCicoPrimaryProgressMax(0);
192
- setCicoPrimaryProgressValue(0);
193
- setShowCicoWaitPanel(false);
179
+ panel.close();
194
180
  TMResultManager.show(result, 'Check in', "ID", undefined, SDKUI_Localizator.CheckInSuccessMessage, 6000);
195
181
  }
196
182
  }
@@ -211,11 +197,5 @@ export const useCheckInOutOperations = (props) => {
211
197
  copyCheckoutPathToClipboardCallback,
212
198
  handleCheckOutCallback,
213
199
  handleCheckInCallback,
214
- showCicoWaitPanel,
215
- cicoWaitPanelTitle,
216
- showCicoPrimaryProgress,
217
- cicoPrimaryProgressText,
218
- cicoPrimaryProgressValue,
219
- cicoPrimaryProgressMax,
220
200
  };
221
201
  };
@@ -24,28 +24,12 @@ export interface DownloadDcmtsAsyncParams {
24
24
  * - false (default): usa il nome file recuperato dal backend (file.name) come priorità
25
25
  */
26
26
  useInputFileName?: boolean;
27
- /**
28
- * Numero di download eseguiti in parallelo (default 1 = sequenziale, comportamento preesistente).
29
- * Valori > 1 vanno usati solo quando il chiamante consuma i file via
30
- * `onFileDownloaded`: nel percorso senza callback ogni file genera un click su un
31
- * tag <a download>, e più click ravvicinati vengono bloccati dal browser.
32
- */
33
- downloadConcurrency?: number;
34
27
  }
35
28
  export interface UseDcmtOperationsReturn {
36
- abortController: AbortController;
37
- showWaitPanel: boolean;
38
- showPrimary: boolean;
39
- waitPanelTitle: string;
40
- waitPanelTextPrimary: string;
41
- waitPanelValuePrimary: number;
42
- waitPanelMaxValuePrimary: number;
43
- showSecondary: boolean;
44
- waitPanelTextSecondary: string;
45
- waitPanelValueSecondary: number;
46
- waitPanelMaxValueSecondary: number;
47
29
  downloadDcmtsAsync: (params: DownloadDcmtsAsyncParams) => Promise<void>;
48
- getDcmtFileAsync: (inputDcmt: DcmtInfo | undefined, rfo: RetrieveFileOptions, operationTitle: string, keepWaitPanelPrimary: boolean, bypassCache?: boolean) => Promise<{
30
+ getDcmtFileAsync: (inputDcmt: DcmtInfo | undefined, rfo: RetrieveFileOptions, operationTitle: string,
31
+ /** Ignorato: con un file solo il pannello ha una barra sola, quella dei byte. */
32
+ keepWaitPanelPrimary: boolean, bypassCache?: boolean) => Promise<{
49
33
  file: File | undefined;
50
34
  isFromCache: boolean;
51
35
  } | undefined>;