@topconsultnpm/sdkui-react-beta 6.15.47 → 6.15.49
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.
|
@@ -13,7 +13,7 @@ export declare function useDcmtOperations(): {
|
|
|
13
13
|
waitPanelValueSecondary: number;
|
|
14
14
|
waitPanelMaxValueSecondary: number;
|
|
15
15
|
downloadDcmtsAsync: (inputDcmts: DcmtInfo[] | undefined, downloadType?: DownloadTypes, downloadMode?: DownloadModes, onFileDownloaded?: (dcmtFile: File) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>) => Promise<void>;
|
|
16
|
-
getDcmtFileAsync: (inputDcmt: DcmtInfo | undefined, rfo: RetrieveFileOptions, operationTitle: string, keepWaitPanelPrimary: boolean) => Promise<{
|
|
16
|
+
getDcmtFileAsync: (inputDcmt: DcmtInfo | undefined, rfo: RetrieveFileOptions, operationTitle: string, keepWaitPanelPrimary: boolean, bypassCache?: boolean) => Promise<{
|
|
17
17
|
file: File | undefined;
|
|
18
18
|
isFromCache: boolean;
|
|
19
19
|
} | undefined>;
|
|
@@ -257,13 +257,13 @@ export function useDcmtOperations() {
|
|
|
257
257
|
setShowWaitPanel(false);
|
|
258
258
|
TMResultManager.show(result, operationTitle, "TID", "DID");
|
|
259
259
|
};
|
|
260
|
-
const getDcmtFileAsync = async (inputDcmt, rfo, operationTitle, keepWaitPanelPrimary) => {
|
|
260
|
+
const getDcmtFileAsync = async (inputDcmt, rfo, operationTitle, keepWaitPanelPrimary, bypassCache = false) => {
|
|
261
261
|
if (inputDcmt?.TID === undefined)
|
|
262
262
|
return;
|
|
263
263
|
if (inputDcmt?.DID === undefined)
|
|
264
264
|
return;
|
|
265
265
|
const cacheKey = `${inputDcmt.TID}-${inputDcmt.DID}`;
|
|
266
|
-
if (dcmtsFileCachePreview.has(cacheKey))
|
|
266
|
+
if (!bypassCache && dcmtsFileCachePreview.has(cacheKey))
|
|
267
267
|
return { file: dcmtsFileCachePreview.get(cacheKey), isFromCache: true };
|
|
268
268
|
setShowWaitPanel(true);
|
|
269
269
|
setShowPrimary(keepWaitPanelPrimary);
|
|
@@ -293,7 +293,9 @@ export function useDcmtOperations() {
|
|
|
293
293
|
const oldestKey = dcmtsFileCachePreview.keys().next().value;
|
|
294
294
|
dcmtsFileCachePreview.delete(oldestKey);
|
|
295
295
|
}
|
|
296
|
-
|
|
296
|
+
if (!bypassCache) {
|
|
297
|
+
dcmtsFileCachePreview.set(cacheKey, file);
|
|
298
|
+
}
|
|
297
299
|
return { file: file, isFromCache: false };
|
|
298
300
|
}
|
|
299
301
|
finally {
|