@topconsultnpm/sdkui-react 6.21.0-dev1.5 → 6.21.0-dev1.50
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/NewComponents/ContextMenu/TMContextMenu.js +2 -2
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +1 -1
- package/lib/components/base/TMAreaManager.js +28 -11
- package/lib/components/base/TMFileManagerDataGridView.js +2 -2
- package/lib/components/base/TMPanel.js +1 -0
- package/lib/components/choosers/TMDataListItemChooser.js +25 -2
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMDynDataListItemChooser.js +50 -23
- package/lib/components/choosers/TMUserChooser.js +3 -1
- package/lib/components/editors/TMFormulaEditor.js +15 -3
- package/lib/components/editors/TMMetadataEditor.js +4 -3
- package/lib/components/editors/TMMetadataValues.js +1 -1
- package/lib/components/features/archive/TMArchive.js +1 -1
- package/lib/components/features/documents/TMDcmtBlog.d.ts +1 -0
- package/lib/components/features/documents/TMDcmtBlog.js +2 -2
- package/lib/components/features/documents/TMDcmtForm.js +11 -7
- package/lib/components/features/documents/TMDragDropOverlay.js +7 -2
- package/lib/components/features/documents/TMFileUploader.js +5 -4
- package/lib/components/features/documents/TMMasterDetailDcmts.js +74 -21
- package/lib/components/features/documents/TMRelationViewer.d.ts +6 -1
- package/lib/components/features/documents/TMRelationViewer.js +44 -7
- package/lib/components/features/search/TMSavedQuerySelector.js +1 -1
- package/lib/components/features/search/TMSearch.js +2 -0
- package/lib/components/features/search/TMSearchQueryEditor.js +13 -1
- package/lib/components/features/search/TMSearchResult.js +16 -3
- package/lib/components/features/search/TMViewHistoryDcmt.js +6 -0
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +5 -1
- package/lib/components/features/workflow/diagram/WFDiagram.js +7 -1
- package/lib/components/features/workflow/diagram/xmlParser.js +13 -14
- package/lib/components/forms/Login/TMLoginForm.js +15 -5
- package/lib/components/forms/TMChooserForm.js +25 -2
- package/lib/components/grids/TMBlogsPost.js +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/pages/TMPage.js +4 -2
- package/lib/components/query/TMQueryCountButton.d.ts +11 -0
- package/lib/components/query/TMQueryCountButton.js +32 -0
- package/lib/components/query/TMQueryEditor.js +41 -4
- package/lib/components/query/TMQuerySummary.js +3 -2
- package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -1
- package/lib/components/viewers/TMDataListItemViewer.js +2 -2
- package/lib/helper/SDKUI_Globals.d.ts +2 -0
- package/lib/helper/SDKUI_Localizator.d.ts +1 -0
- package/lib/helper/SDKUI_Localizator.js +10 -0
- package/lib/helper/TMPdfViewer.js +143 -86
- package/lib/helper/TMUtils.d.ts +1 -0
- package/lib/helper/TMUtils.js +12 -0
- package/lib/helper/checkinCheckoutManager.d.ts +7 -2
- package/lib/helper/checkinCheckoutManager.js +220 -11
- package/lib/hooks/useCheckInOutOperations.d.ts +1 -1
- package/lib/hooks/useCheckInOutOperations.js +9 -4
- package/lib/hooks/useDcmtOperations.d.ts +1 -0
- package/lib/hooks/useDcmtOperations.js +74 -4
- package/lib/hooks/useDocumentOperations.js +20 -6
- package/lib/hooks/useForm.js +20 -14
- package/lib/hooks/useInputDialog.d.ts +2 -0
- package/lib/hooks/useInputDialog.js +37 -0
- package/lib/hooks/useQueryParametersDialog.js +5 -5
- package/lib/services/platform_services.d.ts +1 -1
- package/lib/services/platform_services.js +8 -0
- package/package.json +54 -55
|
@@ -1,28 +1,63 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState, useRef, useCallback } from "react";
|
|
2
|
+
import { useEffect, useState, useRef, useCallback, Component } from "react";
|
|
3
3
|
import styled from "styled-components";
|
|
4
4
|
import { LoadIndicator } from 'devextreme-react/load-indicator';
|
|
5
5
|
import { IconCloseOutline } from "./TMIcons";
|
|
6
6
|
import { SDKUI_Localizator } from "./SDKUI_Localizator";
|
|
7
7
|
import { TMColors } from "../utils/theme";
|
|
8
8
|
import { TMMessageBoxManager, ButtonNames } from "../components/base/TMPopUp";
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
import { Document, Page, pdfjs } from "react-pdf";
|
|
10
|
+
let workerStatus = 'pending';
|
|
11
|
+
let workerCheckPromise = null;
|
|
12
|
+
/**
|
|
13
|
+
* Verifica se il worker PDF.js è disponibile e lo configura.
|
|
14
|
+
* La Promise viene creata una sola volta e riutilizzata per tutte le istanze.
|
|
15
|
+
*/
|
|
16
|
+
const checkAndConfigureWorker = () => {
|
|
17
|
+
if (workerCheckPromise) {
|
|
18
|
+
return workerCheckPromise;
|
|
19
|
+
}
|
|
20
|
+
workerCheckPromise = new Promise((resolve) => {
|
|
21
|
+
const workerUrl = window.location.origin + "/assets/pdfjs-dist/pdf.worker.min.mjs";
|
|
22
|
+
fetch(workerUrl, { method: 'HEAD' })
|
|
23
|
+
.then(response => {
|
|
24
|
+
if (response.ok) {
|
|
25
|
+
pdfjs.GlobalWorkerOptions.workerSrc = workerUrl;
|
|
26
|
+
workerStatus = 'available';
|
|
27
|
+
resolve(true);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.warn('PDF.js worker not found at:', workerUrl);
|
|
31
|
+
workerStatus = 'unavailable';
|
|
32
|
+
resolve(false);
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
.catch(error => {
|
|
36
|
+
console.warn('PDF.js worker check failed:', error);
|
|
37
|
+
workerStatus = 'unavailable';
|
|
38
|
+
resolve(false);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
return workerCheckPromise;
|
|
42
|
+
};
|
|
43
|
+
class PdfErrorBoundary extends Component {
|
|
44
|
+
constructor(props) {
|
|
45
|
+
super(props);
|
|
46
|
+
this.state = { hasError: false };
|
|
47
|
+
}
|
|
48
|
+
static getDerivedStateFromError(_) {
|
|
49
|
+
return { hasError: true };
|
|
50
|
+
}
|
|
51
|
+
componentDidCatch(error, errorInfo) {
|
|
52
|
+
console.warn('PDF rendering error, switching to iframe fallback:', error.message);
|
|
53
|
+
this.props.onError();
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
if (this.state.hasError) {
|
|
57
|
+
return this.props.fallback;
|
|
58
|
+
}
|
|
59
|
+
return this.props.children;
|
|
60
|
+
}
|
|
26
61
|
}
|
|
27
62
|
const PDFViewerContainer = styled.div `
|
|
28
63
|
width: 100%;
|
|
@@ -73,6 +108,24 @@ const TMPdfViewer = (props) => {
|
|
|
73
108
|
const [isCheckingPdf, setIsCheckingPdf] = useState(true);
|
|
74
109
|
const [jsMatches, setJsMatches] = useState([]);
|
|
75
110
|
const observerRef = useRef(null);
|
|
111
|
+
// Stati per gestione worker PDF.js
|
|
112
|
+
const [workerChecked, setWorkerChecked] = useState(workerStatus !== 'pending');
|
|
113
|
+
const [useIframeFallback, setUseIframeFallback] = useState(workerStatus === 'unavailable');
|
|
114
|
+
// Verifica il worker PDF.js - la Promise è condivisa, quindi la fetch avviene una sola volta
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (workerStatus === 'pending') {
|
|
117
|
+
checkAndConfigureWorker().then(available => {
|
|
118
|
+
setWorkerChecked(true);
|
|
119
|
+
if (!available) {
|
|
120
|
+
setUseIframeFallback(true);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}, []);
|
|
125
|
+
// Handler per errori di react-pdf - fallback su iframe
|
|
126
|
+
const handlePdfError = useCallback(() => {
|
|
127
|
+
setUseIframeFallback(true);
|
|
128
|
+
}, []);
|
|
76
129
|
useEffect(() => {
|
|
77
130
|
const checkIsMobile = () => {
|
|
78
131
|
try {
|
|
@@ -269,8 +322,8 @@ const TMPdfViewer = (props) => {
|
|
|
269
322
|
}, children: highlightMatch(match.context, match.match) }) })] }, index)))) : (_jsx("div", { style: { textAlign: 'center', padding: '20px', color: '#999' }, children: "Nessun dettaglio disponibile" }))] }))
|
|
270
323
|
});
|
|
271
324
|
};
|
|
272
|
-
// Mostra loading durante la validazione
|
|
273
|
-
if (isCheckingPdf) {
|
|
325
|
+
// Mostra loading durante la validazione del PDF e verifica worker
|
|
326
|
+
if (isCheckingPdf || !workerChecked) {
|
|
274
327
|
return (_jsx(PDFViewerContainer, { children: _jsxs("div", { style: {
|
|
275
328
|
display: 'flex',
|
|
276
329
|
justifyContent: 'center',
|
|
@@ -280,22 +333,24 @@ const TMPdfViewer = (props) => {
|
|
|
280
333
|
gap: '10px'
|
|
281
334
|
}, children: [_jsx(LoadIndicator, { height: 60, width: 60 }), _jsx("div", { children: "Validazione PDF in corso..." })] }) }));
|
|
282
335
|
}
|
|
336
|
+
// Componente iframe per fallback
|
|
337
|
+
const IframeViewer = (_jsx(PDFViewerContainer, { children: _jsx("iframe", { src: `${pdfUrl}#${enableFitToWidth ? 'view=FitH&' : ''}scrollbar=1`, title: title, style: {
|
|
338
|
+
width: '100%',
|
|
339
|
+
height: '100%',
|
|
340
|
+
border: 'none',
|
|
341
|
+
zIndex: 0,
|
|
342
|
+
pointerEvents: isResizingActive === true ? "none" : "auto"
|
|
343
|
+
} }, pdfUrl) }));
|
|
283
344
|
/**
|
|
284
345
|
* Usa <iframe> nei seguenti casi:
|
|
285
|
-
* 1.
|
|
346
|
+
* 1. Worker PDF.js non disponibile o in errore (fallback)
|
|
286
347
|
* 2. Desktop E nessun contenuto JavaScript rilevato (visualizzazione nativa del browser più performante)
|
|
287
348
|
*
|
|
288
349
|
* L'iframe sfrutta il visualizzatore PDF nativo del browser, ma non può prevenire
|
|
289
350
|
* l'esecuzione di JavaScript embedded nel PDF.
|
|
290
351
|
*/
|
|
291
|
-
if (
|
|
292
|
-
return
|
|
293
|
-
width: '100%',
|
|
294
|
-
height: '100%',
|
|
295
|
-
border: 'none',
|
|
296
|
-
zIndex: 0,
|
|
297
|
-
pointerEvents: isResizingActive === true ? "none" : "auto"
|
|
298
|
-
} }, pdfUrl) }));
|
|
352
|
+
if (useIframeFallback || (!isMobile && !hasUnsafeContent && pdfUrl)) {
|
|
353
|
+
return IframeViewer;
|
|
299
354
|
}
|
|
300
355
|
/**
|
|
301
356
|
* Usa react-pdf nei seguenti casi:
|
|
@@ -304,70 +359,72 @@ const TMPdfViewer = (props) => {
|
|
|
304
359
|
*
|
|
305
360
|
* react-pdf renderizza il PDF come canvas, prevenendo l'esecuzione di JavaScript embedded,
|
|
306
361
|
* ma è meno performante dell'iframe nativo su desktop.
|
|
362
|
+
*
|
|
363
|
+
* ErrorBoundary garantisce fallback su iframe in caso di qualsiasi errore runtime.
|
|
307
364
|
*/
|
|
308
|
-
return _jsxs(PDFViewerContainer, { style: { display: 'flex', flexDirection: 'column' }, children: [loadedPagesNumber === 0 && totalPagesNumber > 0 && _jsx(LoadingOverlay, { children: _jsxs("div", { style: {
|
|
309
|
-
display: 'flex',
|
|
310
|
-
justifyContent: 'center',
|
|
311
|
-
alignItems: 'center',
|
|
312
|
-
flexDirection: 'column',
|
|
313
|
-
gap: '10px'
|
|
314
|
-
}, children: [_jsx(LoadIndicator, { height: 60, width: 60 }), _jsxs("div", { children: [SDKUI_Localizator.Loading, "..."] })] }) }), _jsx("div", { style: {
|
|
315
|
-
display: loadedPagesNumber > 0 && totalPagesNumber > 0 ? 'block' : 'none',
|
|
316
|
-
flex: 1,
|
|
317
|
-
overflow: 'auto'
|
|
318
|
-
}, children: _jsx(Document, { file: pdfBlob, onLoadSuccess: ({ numPages }) => {
|
|
319
|
-
setTotalPagesNumber(numPages);
|
|
320
|
-
setLoadedPagesNumber(0);
|
|
321
|
-
}, loading: _jsxs("div", { style: {
|
|
322
|
-
display: 'flex',
|
|
323
|
-
justifyContent: 'center',
|
|
324
|
-
alignItems: 'center',
|
|
325
|
-
height: '100%',
|
|
326
|
-
flexDirection: 'column',
|
|
327
|
-
gap: '10px'
|
|
328
|
-
}, children: [_jsx(LoadIndicator, { height: 60, width: 60 }), _jsxs("div", { children: [SDKUI_Localizator.Loading, "..."] })] }), error: _jsxs("div", { style: {
|
|
365
|
+
return (_jsx(PdfErrorBoundary, { onError: handlePdfError, fallback: IframeViewer, children: _jsxs(PDFViewerContainer, { style: { display: 'flex', flexDirection: 'column' }, children: [loadedPagesNumber === 0 && totalPagesNumber > 0 && _jsx(LoadingOverlay, { children: _jsxs("div", { style: {
|
|
329
366
|
display: 'flex',
|
|
330
367
|
justifyContent: 'center',
|
|
331
368
|
alignItems: 'center',
|
|
332
|
-
height: '100%',
|
|
333
369
|
flexDirection: 'column',
|
|
334
370
|
gap: '10px'
|
|
335
|
-
}, children: [_jsx(
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
minHeight: shouldRender ? 'auto' : '1000px',
|
|
371
|
+
}, children: [_jsx(LoadIndicator, { height: 60, width: 60 }), _jsxs("div", { children: [SDKUI_Localizator.Loading, "..."] })] }) }), _jsx("div", { style: {
|
|
372
|
+
display: loadedPagesNumber > 0 && totalPagesNumber > 0 ? 'block' : 'none',
|
|
373
|
+
flex: 1,
|
|
374
|
+
overflow: 'auto'
|
|
375
|
+
}, children: _jsx(Document, { file: pdfBlob, onLoadSuccess: ({ numPages }) => {
|
|
376
|
+
setTotalPagesNumber(numPages);
|
|
377
|
+
setLoadedPagesNumber(0);
|
|
378
|
+
}, onLoadError: handlePdfError, loading: _jsxs("div", { style: {
|
|
344
379
|
display: 'flex',
|
|
345
380
|
justifyContent: 'center',
|
|
346
|
-
alignItems: 'center'
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
381
|
+
alignItems: 'center',
|
|
382
|
+
height: '100%',
|
|
383
|
+
flexDirection: 'column',
|
|
384
|
+
gap: '10px'
|
|
385
|
+
}, children: [_jsx(LoadIndicator, { height: 60, width: 60 }), _jsxs("div", { children: [SDKUI_Localizator.Loading, "..."] })] }), error: _jsxs("div", { style: {
|
|
386
|
+
display: 'flex',
|
|
387
|
+
justifyContent: 'center',
|
|
388
|
+
alignItems: 'center',
|
|
389
|
+
height: '100%',
|
|
390
|
+
flexDirection: 'column',
|
|
391
|
+
gap: '10px'
|
|
392
|
+
}, children: [_jsx(IconCloseOutline, { fontSize: 64, color: TMColors.error }), _jsx("div", { children: "Errore nel caricamento del PDF" })] }), children: Array.from(new Array(totalPagesNumber), (el, index) => {
|
|
393
|
+
const pageNumber = index + 1;
|
|
394
|
+
const shouldRender = visiblePages.has(pageNumber);
|
|
395
|
+
return (_jsx("div", { "data-page-number": pageNumber, ref: (el) => {
|
|
396
|
+
if (el && observerRef.current) {
|
|
397
|
+
observerRef.current.observe(el);
|
|
398
|
+
}
|
|
399
|
+
}, style: {
|
|
400
|
+
minHeight: shouldRender ? 'auto' : '1000px',
|
|
401
|
+
display: 'flex',
|
|
402
|
+
justifyContent: 'center',
|
|
403
|
+
alignItems: 'center'
|
|
404
|
+
}, children: shouldRender && (_jsx(Page, { pageNumber: pageNumber, renderTextLayer: false, renderAnnotationLayer: false, width: Math.min(window.innerWidth - 40, 1200), loading: _jsx("div", { style: { padding: '20px' }, children: _jsx(LoadIndicator, { height: 40, width: 40 }) }), onLoadSuccess: () => {
|
|
405
|
+
setLoadedPagesNumber(prev => prev + 1);
|
|
406
|
+
} })) }, `page_${pageNumber}`));
|
|
407
|
+
}) }) }), hasUnsafeContent && (_jsxs("div", { style: {
|
|
408
|
+
display: 'flex',
|
|
409
|
+
justifyContent: 'center',
|
|
410
|
+
alignItems: 'center',
|
|
411
|
+
padding: '12px 20px',
|
|
412
|
+
background: '#fff3cd',
|
|
413
|
+
borderTop: '2px solid #ffc107',
|
|
414
|
+
gap: '8px',
|
|
415
|
+
flexShrink: 0
|
|
416
|
+
}, children: [_jsxs("span", { style: {
|
|
417
|
+
color: '#856404',
|
|
418
|
+
whiteSpace: 'nowrap',
|
|
419
|
+
overflow: 'hidden',
|
|
420
|
+
textOverflow: 'ellipsis',
|
|
421
|
+
flex: 1
|
|
422
|
+
}, children: [_jsx("strong", { children: "Attenzione:" }), " Questo documento contiene contenuti potenzialmente non sicuri."] }), jsMatches.length > 0 && (_jsx("span", { className: "dx-icon-info", style: {
|
|
423
|
+
fontSize: '20px',
|
|
424
|
+
color: '#d32f2f',
|
|
425
|
+
cursor: 'pointer',
|
|
426
|
+
transition: 'color 0.2s',
|
|
427
|
+
marginLeft: '4px'
|
|
428
|
+
}, onClick: showMatchDetails, title: "Clicca per vedere i dettagli", onMouseEnter: (e) => e.currentTarget.style.color = '#b71c1c', onMouseLeave: (e) => e.currentTarget.style.color = '#d32f2f' }))] }))] }) }));
|
|
372
429
|
};
|
|
373
430
|
export default TMPdfViewer;
|
package/lib/helper/TMUtils.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export declare const parseSignatureConfiguration: (did: number, informationSign:
|
|
|
41
41
|
export declare const convertSearchResultDescriptorToFileItems: (documents: Array<SearchResultDescriptor>) => Array<FileItem>;
|
|
42
42
|
export declare const getAppModuleGradient: (appModuleID: AppModules) => string;
|
|
43
43
|
export declare const getPanelManagerToolbarColor: (appModuleID: AppModules) => string;
|
|
44
|
+
export declare const getFileManagerFolderColor: (appModuleID: AppModules) => string;
|
|
44
45
|
type SearchToolbarVisibility = {
|
|
45
46
|
tmSearchResult: boolean;
|
|
46
47
|
tmBlog: boolean;
|
package/lib/helper/TMUtils.js
CHANGED
|
@@ -374,6 +374,18 @@ export const getPanelManagerToolbarColor = (appModuleID) => {
|
|
|
374
374
|
return 'transparent linear-gradient(90deg, #CCE0F4 0%, #7EC1E7 14%, #39A6DB 28%, #1E9CD7 35%, #0075BE 78%, #005B97 99%) 0% 0% no-repeat padding-box';
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
|
+
export const getFileManagerFolderColor = (appModuleID) => {
|
|
378
|
+
switch (appModuleID) {
|
|
379
|
+
case AppModules.SURFER:
|
|
380
|
+
return '#2559a5';
|
|
381
|
+
case AppModules.DESIGNER:
|
|
382
|
+
return '#482234';
|
|
383
|
+
case AppModules.ORCHESTRATOR:
|
|
384
|
+
return '#1d6f42';
|
|
385
|
+
default:
|
|
386
|
+
return '#2559a5';
|
|
387
|
+
}
|
|
388
|
+
};
|
|
377
389
|
export const getSearchToolbarVisibility = (appModuleID) => {
|
|
378
390
|
switch (appModuleID) {
|
|
379
391
|
case AppModules.SURFER:
|
|
@@ -22,12 +22,16 @@ export interface CheckoutInfo {
|
|
|
22
22
|
checkoutFolder: string;
|
|
23
23
|
checkoutName: string;
|
|
24
24
|
}
|
|
25
|
-
interface CheckoutStatusResult {
|
|
25
|
+
export interface CheckoutStatusResult {
|
|
26
26
|
isCheckedOut: boolean;
|
|
27
27
|
mode: 'editMode' | 'lockMode' | '';
|
|
28
28
|
version: number;
|
|
29
29
|
icon: React.ReactNode | null;
|
|
30
30
|
editLockTooltipText: React.ReactNode | null;
|
|
31
|
+
checkoutUserId: number | undefined;
|
|
32
|
+
checkoutDate: any;
|
|
33
|
+
fileExt: string | null;
|
|
34
|
+
isMetadata: boolean;
|
|
31
35
|
}
|
|
32
36
|
export type DownloadSource = {
|
|
33
37
|
type: 'fileItem';
|
|
@@ -40,7 +44,7 @@ export type DownloadSource = {
|
|
|
40
44
|
export declare const getCicoDownloadFileName: (source: DownloadSource, checkout: boolean, withTimestampAndExt: boolean) => string;
|
|
41
45
|
export declare const cicoDownloadFilesCallback: (sources: Array<DownloadSource>, checkout: boolean, downloadDcmtsAsync: (inputDcmts: Array<DcmtInfo> | undefined, downloadType?: DownloadTypes, downloadMode?: DownloadModes, onFileDownloaded?: (dcmtFile: File) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>, skipConfirmation?: boolean) => Promise<void>) => Promise<void>;
|
|
42
46
|
export declare const updateCicoCheckoutStorageItem: (item: CheckoutInfo, type: "fileItem" | "dcmtInfo", action?: "addOrUpdate" | "remove") => void;
|
|
43
|
-
export declare const validateCicoFileName: (source: DownloadSource, fileName: string) => FileNameValidation;
|
|
47
|
+
export declare const validateCicoFileName: (source: DownloadSource, fileName: string, checkoutDate?: string | null) => FileNameValidation;
|
|
44
48
|
type ValidationResult = {
|
|
45
49
|
expected: string | number | undefined;
|
|
46
50
|
current: string | number | undefined;
|
|
@@ -52,6 +56,7 @@ type FileNameValidationItems = {
|
|
|
52
56
|
did: ValidationResult;
|
|
53
57
|
tid: ValidationResult;
|
|
54
58
|
fileExtension: ValidationResult;
|
|
59
|
+
checkoutDate?: ValidationResult;
|
|
55
60
|
};
|
|
56
61
|
type FileNameValidation = {
|
|
57
62
|
isValid: boolean;
|