@topconsultnpm/sdkui-react 6.22.0-dev3.9 → 6.22.0-dev4.11
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.
- package/lib/components/base/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- package/lib/components/base/TMButton.js +4 -2
- package/lib/components/base/TMCounterContainer.d.ts +3 -1
- package/lib/components/base/TMCounterContainer.js +16 -1
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.js +24 -4
- package/lib/components/base/TMPanel.js +173 -170
- package/lib/components/base/TMSpinner.d.ts +2 -1
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTabControl.d.ts +5 -0
- package/lib/components/base/TMTabControl.js +18 -7
- package/lib/components/base/TMTreeView.js +20 -0
- package/lib/components/base/TMWaitPanel.js +1 -1
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +179 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +373 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +58 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +346 -0
- package/lib/components/base/waitPanel/index.d.ts +1 -0
- package/lib/components/base/waitPanel/index.js +1 -0
- package/lib/components/choosers/TMDistinctValues.js +3 -3
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/editors/TMTextBox.d.ts +4 -0
- package/lib/components/editors/TMTextBox.js +99 -11
- package/lib/components/features/archive/TMArchive.js +7 -2
- package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +28 -0
- package/lib/components/features/assistant/TMHelpOnLineChat.js +1231 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
- package/lib/components/features/documents/TMBatchUpdateForm.js +3 -4
- package/lib/components/features/documents/TMCopyToFolderForm.js +53 -84
- package/lib/components/features/documents/TMDcmtForm.js +50 -61
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -3
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.js +5 -3
- package/lib/components/features/documents/TMDcmtTasks.js +2 -9
- package/lib/components/features/documents/TMFileUploader.js +26 -26
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +53 -148
- package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +52 -56
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +14 -15
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +1 -1
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +3 -3
- package/lib/components/features/documents/TMRelationViewer.d.ts +13 -14
- package/lib/components/features/documents/TMRelationViewer.js +206 -143
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMSearch.js +3 -4
- package/lib/components/features/search/TMSearchQueryPanel.js +0 -4
- package/lib/components/features/search/TMSearchResult.d.ts +5 -0
- package/lib/components/features/search/TMSearchResult.js +51 -24
- package/lib/components/features/search/TMTreeSelector.js +23 -27
- package/lib/components/features/search/TMViewHistoryDcmt.js +15 -26
- package/lib/components/features/tasks/TMTasksView.js +97 -90
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +104 -100
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/grids/TMBlogsPost.js +93 -97
- package/lib/components/index.d.ts +5 -1
- package/lib/components/index.js +4 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +16 -15
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +5 -1
- package/lib/components/layout/panelManager/TMPanelManagerLoader.d.ts +6 -0
- package/lib/components/layout/panelManager/TMPanelManagerLoader.js +18 -0
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +4 -8
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +1 -1
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +2 -1
- package/lib/components/pages/TMPage.js +32 -31
- package/lib/components/query/TMQueryEditor.d.ts +3 -0
- package/lib/components/query/TMQueryEditor.js +2 -1
- package/lib/components/sidebar/TMHeader.d.ts +1 -0
- package/lib/components/sidebar/TMHeader.js +2 -2
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/SDKUI_Globals.d.ts +7 -2
- package/lib/helper/SDKUI_Globals.js +7 -2
- package/lib/helper/SDKUI_Localizator.d.ts +31 -6
- package/lib/helper/SDKUI_Localizator.js +301 -51
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/checkinCheckoutManager.js +2 -3
- package/lib/helper/dcmtsHelper.d.ts +2 -0
- package/lib/helper/dcmtsHelper.js +3 -1
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +16 -37
- package/lib/hooks/useDcmtOperations.d.ts +3 -19
- package/lib/hooks/useDcmtOperations.js +175 -229
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +16 -29
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +0 -15
- package/lib/hooks/useMultiMasterDetailDcmts.js +70 -68
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/services/caseflow/CaseFlowService.d.ts +69 -9
- package/lib/services/caseflow/CaseFlowService.js +126 -58
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
-
import { cicoDownloadFilesCallback,
|
|
3
|
-
import { ButtonNames, DeviceType, ShowAlert, TMMessageBoxManager, TMResultManager, useDeviceType } from '../components';
|
|
2
|
+
import { cicoDownloadFilesCallback, getCicoDownloadFileName, getExceptionMessage, removeDcmtsFileCache, renderCicoCheckInContent, SDKUI_Globals, SDKUI_Localizator, updateCicoCheckoutStorageItem, validateCicoFileName } from '../helper';
|
|
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
|
-
//
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
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) {
|
|
@@ -177,8 +166,7 @@ export const useCheckInOutOperations = (props) => {
|
|
|
177
166
|
await onRefreshAsync?.(dcmt.TID, dcmt.DID, true);
|
|
178
167
|
// remove file from preview cache to force refresh with the new checked-in file
|
|
179
168
|
const cacheKey = `${dcmt.TID}-${dcmt.DID}`;
|
|
180
|
-
|
|
181
|
-
removeDcmtsFileCache(cacheKey);
|
|
169
|
+
removeDcmtsFileCache(cacheKey);
|
|
182
170
|
await onRefreshPreview();
|
|
183
171
|
triggerCommentOnFileAdd([dcmt.DID]);
|
|
184
172
|
}
|
|
@@ -187,10 +175,7 @@ export const useCheckInOutOperations = (props) => {
|
|
|
187
175
|
result.push({ rowIndex: i, id1: i, id2: i, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
188
176
|
}
|
|
189
177
|
finally {
|
|
190
|
-
|
|
191
|
-
setCicoPrimaryProgressMax(0);
|
|
192
|
-
setCicoPrimaryProgressValue(0);
|
|
193
|
-
setShowCicoWaitPanel(false);
|
|
178
|
+
panel.close();
|
|
194
179
|
TMResultManager.show(result, 'Check in', "ID", undefined, SDKUI_Localizator.CheckInSuccessMessage, 6000);
|
|
195
180
|
}
|
|
196
181
|
}
|
|
@@ -211,11 +196,5 @@ export const useCheckInOutOperations = (props) => {
|
|
|
211
196
|
copyCheckoutPathToClipboardCallback,
|
|
212
197
|
handleCheckOutCallback,
|
|
213
198
|
handleCheckInCallback,
|
|
214
|
-
showCicoWaitPanel,
|
|
215
|
-
cicoWaitPanelTitle,
|
|
216
|
-
showCicoPrimaryProgress,
|
|
217
|
-
cicoPrimaryProgressText,
|
|
218
|
-
cicoPrimaryProgressValue,
|
|
219
|
-
cicoPrimaryProgressMax,
|
|
220
199
|
};
|
|
221
200
|
};
|
|
@@ -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,
|
|
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>;
|