@topconsultnpm/sdkui-react 6.22.0-dev3.3 → 6.22.0-dev3.31
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/styles.d.ts +45 -43
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +67 -60
- package/lib/components/base/Styled.d.ts +93 -77
- package/lib/components/base/Styled.js +7 -5
- package/lib/components/base/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- package/lib/components/base/TMCounterBar.d.ts +2 -2
- package/lib/components/base/TMCounterContainer.d.ts +2 -1
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.js +2 -2
- package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
- package/lib/components/base/TMFileManager.d.ts +2 -1
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
- package/lib/components/base/TMFileManagerUtils.d.ts +4 -6
- package/lib/components/base/TMLayout.d.ts +4 -4
- package/lib/components/base/TMList.d.ts +2 -1
- package/lib/components/base/TMListView.d.ts +1 -1
- package/lib/components/base/TMPanel.js +2 -2
- package/lib/components/base/TMSpinner.d.ts +4 -2
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTab.d.ts +4 -3
- package/lib/components/base/TMTabControl.d.ts +106 -0
- package/lib/components/base/TMTabControl.js +664 -0
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +14 -8
- package/lib/components/base/TMTreeView.js +33 -1
- package/lib/components/base/TMUserAvatar.d.ts +2 -1
- package/lib/components/base/TMVilViewer.d.ts +2 -1
- package/lib/components/base/TMWaitPanel.d.ts +3 -2
- 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 +169 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +320 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +53 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +274 -0
- package/lib/components/base/waitPanel/index.d.ts +1 -0
- package/lib/components/base/waitPanel/index.js +1 -0
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/choosers/TMQuickSearchInfo.d.ts +2 -1
- package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
- package/lib/components/choosers/TMUserChooser.d.ts +2 -2
- package/lib/components/editors/TMEditorStyled.d.ts +20 -42
- package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
- package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
- package/lib/components/editors/TMMetadataValues.js +5 -5
- package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
- 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 +888 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
- package/lib/components/features/documents/TMBatchUpdateForm.js +3 -4
- package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
- package/lib/components/features/documents/TMDcmtForm.js +51 -62
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtIcon.d.ts +2 -3
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.d.ts +8 -6
- package/lib/components/features/documents/TMDcmtPreview.js +5 -3
- package/lib/components/features/documents/TMDcmtTasks.d.ts +2 -1
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
- 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 +54 -129
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +2 -1
- package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +2 -1
- package/lib/components/features/documents/TMMergeToPdfForm.js +56 -54
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +2 -1
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +2 -5
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +5 -5
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +3 -3
- package/lib/components/features/documents/TMRelationViewer.d.ts +16 -9
- package/lib/components/features/documents/TMRelationViewer.js +238 -166
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +2 -1
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +2 -1
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
- package/lib/components/features/search/TMSearch.d.ts +1 -1
- package/lib/components/features/search/TMSearch.js +68 -9
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +9 -3
- package/lib/components/features/search/TMSearchResult.d.ts +5 -0
- package/lib/components/features/search/TMSearchResult.js +19 -12
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +2 -1
- package/lib/components/features/search/TMTreeSelector.js +38 -36
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +2 -1
- package/lib/components/features/search/TMViewHistoryDcmt.js +14 -25
- package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
- package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksView.js +96 -101
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +91 -91
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +8 -7
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +3 -1
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +3 -1
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/TMChooserForm.d.ts +2 -1
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +2 -1
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.js +92 -96
- package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
- package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.js +5 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +5 -6
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
- package/lib/components/pages/TMPage.d.ts +1 -1
- package/lib/components/pages/TMPage.js +29 -31
- package/lib/components/query/TMQueryEditor.d.ts +17 -10
- package/lib/components/query/TMQueryEditor.js +2 -1
- package/lib/components/settings/SettingsAppearance.d.ts +2 -1
- package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
- package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
- package/lib/components/sidebar/TMHeader.d.ts +4 -3
- package/lib/components/sidebar/TMHeader.js +2 -2
- package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMMidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.d.ts +2 -2
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/SDKUI_Localizator.d.ts +24 -0
- package/lib/helper/SDKUI_Localizator.js +240 -0
- package/lib/helper/TMAppUpdatedModal.d.ts +2 -1
- package/lib/helper/TMAppUpdatedModal.js +93 -93
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +280 -280
- package/lib/helper/TMPdfViewer.d.ts +2 -1
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +10 -4
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/dcmtsHelper.d.ts +2 -0
- package/lib/helper/dcmtsHelper.js +3 -1
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +14 -34
- package/lib/hooks/useDcmtOperations.d.ts +3 -12
- package/lib/hooks/useDcmtOperations.js +187 -179
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +14 -25
- package/lib/hooks/useInputDialog.d.ts +2 -1
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +0 -15
- package/lib/hooks/useMultiMasterDetailDcmts.js +65 -67
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/services/caseflow/CaseFlowService.d.ts +36 -6
- package/lib/services/caseflow/CaseFlowService.js +55 -14
- package/lib/services/platform_services.d.ts +3 -2
- package/package.json +71 -71
|
@@ -9,7 +9,7 @@ import { TMColors } from '../../../utils/theme';
|
|
|
9
9
|
import ShowAlert from '../../base/TMAlert';
|
|
10
10
|
import TMButton from '../../base/TMButton';
|
|
11
11
|
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
12
|
-
import
|
|
12
|
+
import TMLayoutContainer from '../../base/TMLayout';
|
|
13
13
|
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext } from '../../forms/TMSaveForm';
|
|
14
14
|
import { StyledAnimatedComponentOpacity } from '../../base/Styled';
|
|
15
15
|
import TMPanel from '../../base/TMPanel';
|
|
@@ -28,7 +28,7 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
|
|
|
28
28
|
const [isFromCache, setIsFromCache] = useState(false);
|
|
29
29
|
const [error, setError] = useState('');
|
|
30
30
|
const [isAbortError, setIsAbortError] = useState(false);
|
|
31
|
-
const {
|
|
31
|
+
const { getDcmtFileAsync, clearDcmtsFileCache, removeDcmtsFileCache, isDcmtFileInCache } = useDcmtOperations();
|
|
32
32
|
const isBasketMode = !!(dcmtData?.btid !== undefined && dcmtData?.bid !== undefined && dcmtData?.bfid !== undefined);
|
|
33
33
|
const getCacheKey = () => {
|
|
34
34
|
if (!dcmtData)
|
|
@@ -80,6 +80,8 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
|
|
|
80
80
|
setLastLoadedDid(currentCacheKey);
|
|
81
81
|
}, [dcmtData?.tid, dcmtData?.did, isVisible, hasLoadedDataOnce, lastLoadedDid]);
|
|
82
82
|
const loadBasketFile = async () => {
|
|
83
|
+
// Il recupero dal basket non passa da useDcmtOperations: ha il suo AbortController.
|
|
84
|
+
const abortController = new AbortController();
|
|
83
85
|
try {
|
|
84
86
|
// Check cache first
|
|
85
87
|
if (dcmtsFileCachePreview.has(cacheKey)) {
|
|
@@ -187,7 +189,7 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
|
|
|
187
189
|
{ icon: _jsx(IconCloseCircle, {}), name: SDKUI_Localizator.RemoveFromCache, onClick: () => { removeDcmtsFileCache(cacheKey); setIsFromCache(false); } },
|
|
188
190
|
{ icon: _jsx(IconClear, {}), name: SDKUI_Localizator.ClearCache, onClick: () => { clearDcmtsFileCache(); setIsFromCache(false); } },
|
|
189
191
|
], [cacheKey, removeDcmtsFileCache, clearDcmtsFileCache, setIsFromCache]);
|
|
190
|
-
return (_jsx(
|
|
192
|
+
return (_jsx(TMLayoutContainer, { direction: 'vertical', children: _jsx(TMPanel, { padding: '0', title: titleHandler(), onClose: onClosePanel, onBack: onBack, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, toolbar: _jsxs("div", { style: { width: 'max-content', display: 'flex', alignItems: 'center', gap: '10px' }, children: [onPrev && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), onNext && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(StyledHeaderIcon, { $color: TMColors.primaryColor, children: _jsx(ContextMenu, { items: cacheMenuItems, trigger: "left", children: _jsx(IconMenuVertical, {}) }) }), _jsx(StyledHeaderIcon, { onClick: reOpenDcmt, $color: TMColors.primaryColor, children: _jsx(TMTooltip, { content: SDKUI_Localizator.ReopenDocument, children: _jsx(IconRefresh, {}) }) })] }), children: error
|
|
191
193
|
? _jsx(ErrorContent, { error: error, isAbortError: isAbortError, onRetry: reOpenDcmt })
|
|
192
194
|
: renderedPreview(dcmtData?.tid, dcmtData?.did, dcmtData?.fileExt, dcmtData?.fileSize, dcmtData?.fileCount, extensionHandler(dcmtData?.fileExt), showPreview, isResizingActive, () => { isBasketMode ? loadBasketFile() : loadDocumentWithCache(); setShowPreview(true); }, dcmtBlob, isBasketMode) }) }));
|
|
193
195
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { FormModes, TaskContext } from "../../../ts";
|
|
2
3
|
import { HomeBlogPost, TaskDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
4
|
interface TMDcmtTasksProps {
|
|
@@ -12,5 +13,5 @@ interface TMDcmtTasksProps {
|
|
|
12
13
|
handleNavigateToDossiers?: (value: HomeBlogPost | number) => Promise<void>;
|
|
13
14
|
onBack?: () => void;
|
|
14
15
|
}
|
|
15
|
-
declare const TMDcmtTasks: (props: TMDcmtTasksProps) =>
|
|
16
|
+
declare const TMDcmtTasks: (props: TMDcmtTasksProps) => React.JSX.Element;
|
|
16
17
|
export default TMDcmtTasks;
|
|
@@ -2,5 +2,5 @@ interface TMDragDropOverlayProps {
|
|
|
2
2
|
handleFile: (file: File) => void;
|
|
3
3
|
refocusAfterFileInput: () => void;
|
|
4
4
|
}
|
|
5
|
-
declare const TMDragDropOverlay: (props: TMDragDropOverlayProps) => import("react
|
|
5
|
+
declare const TMDragDropOverlay: (props: TMDragDropOverlayProps) => import("react").JSX.Element;
|
|
6
6
|
export default TMDragDropOverlay;
|
|
@@ -29,6 +29,7 @@ const TMFileUploader = ({ fromDTD, deviceType = DeviceType.DESKTOP, onClose, onF
|
|
|
29
29
|
const [fileSize, setFileSize] = useState(undefined);
|
|
30
30
|
const [fileExt, setFileExt] = useState(undefined);
|
|
31
31
|
const uploaderRef = useRef(null);
|
|
32
|
+
const fileInputRef = useRef(null);
|
|
32
33
|
// Ref al TMPanel per chiamare focusPanel()
|
|
33
34
|
const fileUploaderPanelRef = useRef(null);
|
|
34
35
|
usePreventFileDrop([uploaderRef]);
|
|
@@ -85,19 +86,18 @@ const TMFileUploader = ({ fromDTD, deviceType = DeviceType.DESKTOP, onClose, onF
|
|
|
85
86
|
setFileSize(undefined);
|
|
86
87
|
setFileExt(undefined);
|
|
87
88
|
onFileUpload?.(null);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
fileInput.value = '';
|
|
89
|
+
if (fileInputRef.current) {
|
|
90
|
+
fileInputRef.current.value = '';
|
|
91
91
|
}
|
|
92
92
|
//Rifocalizza dopo la cancellazione del file
|
|
93
93
|
if (refocus)
|
|
94
94
|
refocusAfterFileInput();
|
|
95
95
|
}, [onFileUpload, refocusAfterFileInput]);
|
|
96
96
|
const browseHandler = useCallback(() => {
|
|
97
|
-
|
|
97
|
+
fileInputRef.current?.click();
|
|
98
98
|
}, []);
|
|
99
99
|
let content = !uploadedFile ?
|
|
100
|
-
_jsxs("div", { style: { display: 'flex', gap: 10, width: '100%', height: '100%' }, children: [_jsx(HiddenInput, {
|
|
100
|
+
_jsxs("div", { style: { display: 'flex', gap: 10, width: '100%', height: '100%' }, children: [_jsx(HiddenInput, { ref: fileInputRef, type: "file", onChange: handleInputChange }), _jsxs(UploadContainer, { ref: uploaderRef, tabIndex: 0, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, style: { backgroundColor: dragOver ? '#76b1e6' : 'white' }, onDoubleClick: browseHandler, $isRequired: isRequired, children: [_jsxs("div", { style: { display: 'flex', gap: '10px', flexDirection: 'column', position: 'absolute', right: 5, top: 5 }, children: [_jsx(TMButton, { btnStyle: 'icon', caption: 'Sfoglia', color: isRequired && !uploadedFile ? 'error' : 'primary', onClick: browseHandler, icon: _jsx(IconFolderOpen, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { onScanRequest((file) => { onFileUpload?.(file); }); }, icon: _jsx(IconScanner, { fontSize: 22 }) }), showScannerIcon && isScannerLicenseConfigured() && !onScanRequest && _jsx(TMButton, { btnStyle: 'icon', caption: 'Scanner', color: 'primary', onClick: () => { ShowAlert({ message: SDKUI_Localizator.ScanFeatureUnavailableInThisContext, mode: 'info', duration: 3000, title: 'Scanner' }); }, icon: _jsx(IconScanner, { fontSize: 22 }) })] }), _jsx("p", { style: { fontSize: '1.2rem', fontWeight: 'bold' }, children: deviceType === DeviceType.MOBILE ? SDKUI_Localizator.ClickToBrowseFile : SDKUI_Localizator.DragOrDoubleClickToBrowseFile }), isRequired && _jsxs("p", { style: { fontWeight: 'bold' }, children: [" ", SDKUI_Localizator.RequiredField, " "] })] })] }) :
|
|
101
101
|
_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 10, width: '100%', height: '100%' }, children: [_jsxs("div", { style: { backgroundColor: 'white', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.primaryColor }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 5 }, children: [_jsx("p", { children: "File name:" }), _jsxs("div", { style: { fontWeight: 'bold' }, children: [fileName, " ", _jsxs("span", { children: [" ", ` (${formatBytes(fileSize)})`, " "] })] })] }), uploadedFile && _jsx(TMButton, { btnStyle: 'icon', color: 'error', caption: 'Pulisci', onClick: () => clearFile(true), icon: _jsx(IconClear, { fontSize: 22 }) })] }), extensionHandler(fileExt) === FileExtensionHandler.READY_TO_SHOW ? _jsx(TMFileViewer, { fileBlob: uploadedFile, isResizingActive: isResizingActive }) :
|
|
102
102
|
_jsx("div", { style: { backgroundColor: '#f6dbdb', padding: '5px 10px', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'space-between', color: TMColors.error }, children: _jsxs("div", { children: [" ", SDKUI_Localizator.PreviewNotAvailable, fileExt && _jsx("b", { children: ` (*.${fileExt})` })] }) })] });
|
|
103
103
|
const innerContent = (_jsxs("div", { style: { width: '100%', height: '100%', padding: '2px', display: 'flex', flexDirection: 'column', gap: 10 }, children: [enableDragDropOverlay && _jsx(TMDragDropOverlay, { handleFile: handleFile, refocusAfterFileInput: refocusAfterFileInput }), content] }));
|
|
@@ -112,27 +112,27 @@ const TMFileUploader = ({ fromDTD, deviceType = DeviceType.DESKTOP, onClose, onF
|
|
|
112
112
|
}, [deviceType, fromDTD, onClose]);
|
|
113
113
|
return showTMPanel ? (_jsx(TMPanel, { ref: fileUploaderPanelRef, panelID: 'file-uploader-panel', title: SDKUI_Localizator.FileUpload, onBack: deviceType === DeviceType.MOBILE ? () => onClose?.() : undefined, toolbar: toolbar, children: innerContent })) : (innerContent);
|
|
114
114
|
};
|
|
115
|
-
const UploadContainer = styled.div `
|
|
116
|
-
position: relative;
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
justify-content: center;
|
|
120
|
-
flex-direction: column;
|
|
121
|
-
gap: 5px;
|
|
122
|
-
border: 2px dashed ${props => props.$isRequired ? () => TMColors.error : () => TMColors.primaryColor};
|
|
123
|
-
/* max-height: 100px; */
|
|
124
|
-
width: 100%;
|
|
125
|
-
height: 100%;
|
|
126
|
-
border-radius: 8px;
|
|
127
|
-
padding: 30px;
|
|
128
|
-
text-align: center;
|
|
129
|
-
color: ${props => props.$isRequired ? () => TMColors.error : () => TMColors.primaryColor};
|
|
130
|
-
transition: background-color 0.3s;
|
|
131
|
-
&:hover {
|
|
132
|
-
background-color: #658cab;
|
|
133
|
-
}
|
|
115
|
+
const UploadContainer = styled.div `
|
|
116
|
+
position: relative;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
gap: 5px;
|
|
122
|
+
border: 2px dashed ${props => props.$isRequired ? () => TMColors.error : () => TMColors.primaryColor};
|
|
123
|
+
/* max-height: 100px; */
|
|
124
|
+
width: 100%;
|
|
125
|
+
height: 100%;
|
|
126
|
+
border-radius: 8px;
|
|
127
|
+
padding: 30px;
|
|
128
|
+
text-align: center;
|
|
129
|
+
color: ${props => props.$isRequired ? () => TMColors.error : () => TMColors.primaryColor};
|
|
130
|
+
transition: background-color 0.3s;
|
|
131
|
+
&:hover {
|
|
132
|
+
background-color: #658cab;
|
|
133
|
+
}
|
|
134
134
|
`;
|
|
135
|
-
const HiddenInput = styled.input `
|
|
136
|
-
display: none;
|
|
135
|
+
const HiddenInput = styled.input `
|
|
136
|
+
display: none;
|
|
137
137
|
`;
|
|
138
138
|
export default TMFileUploader;
|
|
@@ -22,6 +22,8 @@ interface ITMMasterDetailDcmtsProps extends DeviceContextProps {
|
|
|
22
22
|
onNext?: () => void;
|
|
23
23
|
onPrev?: () => void;
|
|
24
24
|
onBack?: () => void;
|
|
25
|
+
/** Invocato quando il calcolo iniziale delle correlazioni è finito */
|
|
26
|
+
onFirstLoadCompleted?: () => void;
|
|
25
27
|
appendMasterDcmts?: (tid: number | undefined, did: number | undefined) => void;
|
|
26
28
|
onTaskCreateRequest?: (taskContext: TaskContext, onTaskCreated?: (task?: TaskDescriptor) => void) => void;
|
|
27
29
|
onRefreshAfterAddDcmtToFavs?: () => void;
|
|
@@ -14,12 +14,13 @@ import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/p
|
|
|
14
14
|
import TMSearchResult from '../search/TMSearchResult';
|
|
15
15
|
import TMDcmtForm from './TMDcmtForm';
|
|
16
16
|
import { TMNothingToShow } from './TMDcmtPreview';
|
|
17
|
-
import { TMButton
|
|
17
|
+
import { TMButton } from '../..';
|
|
18
|
+
import TMLayoutContainer from '../../base/TMLayout';
|
|
18
19
|
import { useDocumentOperations } from '../../../hooks/useDocumentOperations';
|
|
19
20
|
import TMToppyMessage from '../../../helper/TMToppyMessage';
|
|
20
21
|
import TMPanel from '../../base/TMPanel';
|
|
21
|
-
import
|
|
22
|
-
const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, deviceType, inputDcmts, isForMaster, showCurrentDcmtIndicator = true, allowNavigation, canNext, canPrev, onNext, onPrev, onBack, appendMasterDcmts, onTaskCreateRequest, onRefreshAfterAddDcmtToFavs, editPdfForm, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, datagridUtility, dcmtUtility, fetchRemoteCertificates }) => {
|
|
22
|
+
import TMSpinner from '../../base/TMSpinner';
|
|
23
|
+
const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, deviceType, inputDcmts, isForMaster, showCurrentDcmtIndicator = true, allowNavigation, canNext, canPrev, onNext, onPrev, onBack, onFirstLoadCompleted, appendMasterDcmts, onTaskCreateRequest, onRefreshAfterAddDcmtToFavs, editPdfForm, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, datagridUtility, dcmtUtility, fetchRemoteCertificates }) => {
|
|
23
24
|
const floatingBarContainerRef = useRef(null);
|
|
24
25
|
const [focusedItem, setFocusedItem] = useState();
|
|
25
26
|
const [selectedItems, setSelectedItems] = useState([]);
|
|
@@ -45,6 +46,13 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
45
46
|
const [refreshKey, setRefreshKey] = useState(0);
|
|
46
47
|
// Separate refresh key for TMFormOrResultWrapper only (doesn't affect tmTreeView)
|
|
47
48
|
const [refreshKeyFormOrResult, setRefreshKeyFormOrResult] = useState(0);
|
|
49
|
+
// Stato dell'albero conservato qui perché il bump di refreshKey rimonta TMRelationViewer:
|
|
50
|
+
// una ref interna al viewer non sopravvivrebbe. Riletto dal useMemo di tmTreeView,
|
|
51
|
+
// che si ricalcola proprio al refresh.
|
|
52
|
+
const treeStateRef = useRef(undefined);
|
|
53
|
+
const handleTreeStateChange = useCallback((state) => {
|
|
54
|
+
treeStateRef.current = state;
|
|
55
|
+
}, []);
|
|
48
56
|
/** State for transformed focusedItem metadata values (similar to formData in TMDcmtForm) */
|
|
49
57
|
const [focusedItemFormData, setFocusedItemFormData] = useState([]);
|
|
50
58
|
// Trigger operationItems refresh (after file substitution, etc.)
|
|
@@ -64,6 +72,24 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
64
72
|
setIsCheckingFirstLoad(false);
|
|
65
73
|
}
|
|
66
74
|
}, [isRelationViewerLoading, isCheckingFirstLoad]);
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if (!isCheckingFirstLoad)
|
|
77
|
+
onFirstLoadCompleted?.();
|
|
78
|
+
}, [isCheckingFirstLoad, onFirstLoadCompleted]);
|
|
79
|
+
// Dal montaggio fino all'apertura del wait panel del viewer (il tempo di caricare i
|
|
80
|
+
// tipi documento) la pagina resta nascosta: senza spinner non si vedrebbe nulla.
|
|
81
|
+
const [waitingFirstLoad, setWaitingFirstLoad] = useState(true);
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (!waitingFirstLoad)
|
|
84
|
+
return;
|
|
85
|
+
// Da qui in avanti e' il wait panel a dare riscontro
|
|
86
|
+
if (isRelationViewerLoading) {
|
|
87
|
+
setWaitingFirstLoad(false);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
TMSpinner.show({ description: SDKUI_Localizator.Loading });
|
|
91
|
+
return () => TMSpinner.hide();
|
|
92
|
+
}, [waitingFirstLoad, isRelationViewerLoading]);
|
|
67
93
|
// Increments trigger counter to force operationItems to re-calculate
|
|
68
94
|
const onRefreshOperationsDatagrid = useCallback(async () => {
|
|
69
95
|
setRefreshOperationsTrigger(prev => prev + 1);
|
|
@@ -72,12 +98,6 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
72
98
|
const handleStopCalculationReady = useCallback((stopCalculation) => {
|
|
73
99
|
stopRelationsCalculationRef.current = stopCalculation;
|
|
74
100
|
}, []);
|
|
75
|
-
// Interrompe il calcolo delle correlazioni: mostra subito quelle già calcolate
|
|
76
|
-
// senza attendere le restanti chiamate GetMetadata
|
|
77
|
-
const handleStopRelationsCalculation = useCallback(() => {
|
|
78
|
-
stopRelationsCalculationRef.current?.();
|
|
79
|
-
setIsCheckingFirstLoad(false); // Nasconde l'overlay e mostra l'albero (parziale)
|
|
80
|
-
}, []);
|
|
81
101
|
// Esce dalla maschera interrompendo anche le chiamate GetMetadata ancora in coda:
|
|
82
102
|
// l'interruzione è invocata in modo sincrono perché onBack può smontare il componente
|
|
83
103
|
// (un effect non farebbe in tempo a propagare l'interruzione)
|
|
@@ -86,18 +106,30 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
86
106
|
stopRelationsCalculationRef.current?.();
|
|
87
107
|
onBack?.();
|
|
88
108
|
}, [onBack]);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
// Notifica all'utente che i dati mostrati sono parziali
|
|
94
|
-
const handleRelationsCalculationStopped = useCallback(() => {
|
|
109
|
+
// Letta da handleRelationsCalculationStopped, che deve restare stabile: arriva fino
|
|
110
|
+
// alle dipendenze di loadData nel viewer, dove un cambio farebbe ripartire il calcolo
|
|
111
|
+
const handleBackRef = useRef(handleBack);
|
|
112
|
+
handleBackRef.current = handleBack;
|
|
113
|
+
// Notifica all'utente che i dati mostrati sono parziali
|
|
114
|
+
const handleRelationsCalculationStopped = useCallback((loadedCount, totalCount) => {
|
|
95
115
|
if (isLeavingRef.current)
|
|
96
116
|
return;
|
|
117
|
+
// Interrotto prima di calcolare qualcosa: non c'è nulla da mostrare, si torna indietro
|
|
118
|
+
if (loadedCount === 0) {
|
|
119
|
+
ShowAlert({
|
|
120
|
+
message: SDKUI_Localizator.RelationsCalculationStoppedEmpty,
|
|
121
|
+
title: SDKUI_Localizator.Attention,
|
|
122
|
+
duration: 6000,
|
|
123
|
+
mode: 'warning',
|
|
124
|
+
});
|
|
125
|
+
handleBackRef.current();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
// Testo breve: il box di ShowAlert ha altezza fissa e taglia oltre le due righe
|
|
97
129
|
ShowAlert({
|
|
98
|
-
message: SDKUI_Localizator.
|
|
130
|
+
message: SDKUI_Localizator.RelationsCalculationStoppedProgress.replaceParams(loadedCount.toString(), totalCount.toString()),
|
|
99
131
|
title: SDKUI_Localizator.Attention,
|
|
100
|
-
duration:
|
|
132
|
+
duration: 6000,
|
|
101
133
|
mode: 'info',
|
|
102
134
|
});
|
|
103
135
|
}, []);
|
|
@@ -275,7 +307,6 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
275
307
|
onRefreshAfterAddDcmtToFavs,
|
|
276
308
|
},
|
|
277
309
|
});
|
|
278
|
-
const { dcmtOperations: { abortController, showWaitPanel, showPrimary, waitPanelTitle, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, }, } = features;
|
|
279
310
|
// Nuovi documenti in input: il componente non sta più uscendo dalla maschera
|
|
280
311
|
// (chiave stabile: l'array inputDcmts può essere ricreato a ogni render)
|
|
281
312
|
const inputDcmtsKey = useMemo(() => (inputDcmts ?? []).map(d => `${d.TID}-${d.DID}`).join('|'), [inputDcmts]);
|
|
@@ -379,11 +410,11 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
379
410
|
setContextMenuVisible(true);
|
|
380
411
|
}, children: [_jsx(TMRelationViewerWrapper, { refreshKey: refreshKey, inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, showZeroDcmts: showZeroDcmts,
|
|
381
412
|
// customItemRender={customItemRender}
|
|
382
|
-
allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: handleSelectedItemsChanged, onNoRelationsFound: handleNoRelationsFound, onItemContextMenu: isRelationViewerLoading ? undefined : onItemContextMenu,
|
|
413
|
+
allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: handleSelectedItemsChanged, onNoRelationsFound: handleNoRelationsFound, onItemContextMenu: isRelationViewerLoading ? undefined : onItemContextMenu, onLoadingStateChanged: setIsRelationViewerLoading, onStopCalculationReady: handleStopCalculationReady, onCalculationStopped: handleRelationsCalculationStopped, initialTreeState: treeStateRef.current, onTreeStateChange: handleTreeStateChange }), _jsx(TMContextMenu, { items: operationItems, externalControl: {
|
|
383
414
|
visible: contextMenuVisible,
|
|
384
415
|
position: contextMenuPosition,
|
|
385
416
|
onClose: () => setContextMenuVisible(false)
|
|
386
|
-
} })] }) }), [inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, allowMultipleSelection, focusedItem, selectedItems, handleFocusedItemChanged, handleSelectedItemsChanged, handleNoRelationsFound, onItemContextMenu, contextMenuVisible, contextMenuPosition, refreshKey, focusedItemFormData, isRelationViewerLoading, handleStopCalculationReady, handleRelationsCalculationStopped]);
|
|
417
|
+
} })] }) }), [inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, allowMultipleSelection, focusedItem, selectedItems, handleFocusedItemChanged, handleSelectedItemsChanged, handleNoRelationsFound, onItemContextMenu, contextMenuVisible, contextMenuPosition, refreshKey, focusedItemFormData, isRelationViewerLoading, handleStopCalculationReady, handleRelationsCalculationStopped, handleTreeStateChange]);
|
|
387
418
|
const tmFormOrResult = useMemo(() => _jsx(TMFormOrResultWrapper, { refreshKey: refreshKeyFormOrResult, deviceType: deviceType, focusedItem: focusedItem, onTaskCreateRequest: onTaskCreateRequest, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, handleNavigateToReference: handleNavigateToReference, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, editPdfForm: editPdfForm, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, onRefreshSearchResults: onRefreshAllPanels }), [focusedItem, deviceType, allTasks, handleNavigateToWGs, handleNavigateToDossiers, handleNavigateToReference, editPdfForm, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, onRefreshAfterAddDcmtToFavs, refreshKeyFormOrResult]);
|
|
388
419
|
const initialPanelDimensions = {
|
|
389
420
|
'tmTreeView': { width: '50%', height: '100%' },
|
|
@@ -463,7 +494,7 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
463
494
|
toolbarOptions: { icon: _jsx(IconSearchCheck, { fontSize: 24 }), visible: false, orderNumber: 2, isActive: allInitialPanelVisibility['tmFormOrResult'] }
|
|
464
495
|
}
|
|
465
496
|
], [tmTreeView, tmFormOrResult, focusedItem?.isDcmt, dtdMaster]);
|
|
466
|
-
return (
|
|
497
|
+
return (_jsx("div", { style: { width: '100%', height: '100%', position: 'relative' }, children: _jsxs("div", { style: isCheckingFirstLoad ? { position: 'absolute', width: 0, height: 0, overflow: 'hidden', opacity: 0, pointerEvents: 'none' } : { width: '100%', height: '100%' }, children: [_jsx(TMLayoutContainer, { direction: 'vertical', children: _jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmTreeView', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true }) }) }), renderDcmtOperations, renderFloatingBar] }) }));
|
|
467
498
|
};
|
|
468
499
|
export default TMMasterDetailDcmts;
|
|
469
500
|
/**
|
|
@@ -472,7 +503,7 @@ export default TMMasterDetailDcmts;
|
|
|
472
503
|
* - Panel visibility toggling
|
|
473
504
|
* - Focus delay handling
|
|
474
505
|
*/
|
|
475
|
-
const TMRelationViewerWrapper = ({ refreshKey, inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, customItemRender, allowMultipleSelection, focusedItem, selectedItems, onFocusedItemChanged, onSelectedItemsChanged, onNoRelationsFound, onItemContextMenu,
|
|
506
|
+
const TMRelationViewerWrapper = ({ refreshKey, inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, customItemRender, allowMultipleSelection, focusedItem, selectedItems, onFocusedItemChanged, onSelectedItemsChanged, onNoRelationsFound, onItemContextMenu, onLoadingStateChanged, onStopCalculationReady, onCalculationStopped, initialTreeState, onTreeStateChange }) => {
|
|
476
507
|
const { setPanelVisibilityById, setToolbarButtonVisibility } = useTMPanelManagerContext();
|
|
477
508
|
// Monitor device type changes to restore panel visibility when switching from mobile to desktop
|
|
478
509
|
const deviceType = useDeviceType();
|
|
@@ -532,7 +563,7 @@ const TMRelationViewerWrapper = ({ refreshKey, inputDcmts, isForMaster, showCurr
|
|
|
532
563
|
onItemContextMenu?.(item, e);
|
|
533
564
|
}, 100);
|
|
534
565
|
}, [onItemContextMenu, handleFocusedItemChanged]);
|
|
535
|
-
return (_jsx(TMRelationViewer, { inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, initialShowZeroDcmts: showZeroDcmts, customItemRender: customItemRender, allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: onSelectedItemsChanged, maxDepthLevel: 1, invertMasterNavigation: false, showExpandAllButton: true, onNoRelationsFound: onNoRelationsFound, onItemContextMenu: onContextMenu,
|
|
566
|
+
return (_jsx(TMRelationViewer, { inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, initialShowZeroDcmts: showZeroDcmts, customItemRender: customItemRender, allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: onSelectedItemsChanged, maxDepthLevel: 1, invertMasterNavigation: false, showExpandAllButton: true, onNoRelationsFound: onNoRelationsFound, onItemContextMenu: onContextMenu, onLoadingStateChanged: onLoadingStateChanged, onStopCalculationReady: onStopCalculationReady, onCalculationStopped: onCalculationStopped, initialTreeState: initialTreeState, onTreeStateChange: onTreeStateChange }, refreshKey));
|
|
536
567
|
};
|
|
537
568
|
const TMFormOrResultWrapper = ({ refreshKey, deviceType, focusedItem, onTaskCreateRequest, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, onRefreshAfterAddDcmtToFavs, editPdfForm, openS4TViewer, onOpenS4TViewerRequest, onOpenPdfEditorRequest, onRefreshSearchAsyncDatagrid, onRefreshSearchResults, handleNavigateToReference, fetchRemoteCertificates }) => {
|
|
538
569
|
const { setPanelVisibilityById } = useTMPanelManagerContext();
|
|
@@ -542,109 +573,3 @@ const TMFormOrResultWrapper = ({ refreshKey, deviceType, focusedItem, onTaskCrea
|
|
|
542
573
|
}, fetchRemoteCertificates: fetchRemoteCertificates }, refreshKey) :
|
|
543
574
|
focusedItem?.searchResult === undefined ? (_jsx(TMPanel, { title: SDKUI_Localizator.SearchResult, children: _jsx(TMToppyMessage, { message: SDKUI_Localizator.SelectDocumentToViewSearchResults }) })) : (_jsx(TMSearchResult, { groupId: 'tmFormOrResult', isClosable: deviceType !== DeviceType.MOBILE, context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, allowRelations: false, openDcmtFormAsModal: true, searchResults: focusedItem?.searchResult ?? [], showSearchResultSidebar: false, showDcmtFormSidebar: false, autoFocusFirstRow: false, onTaskCreateRequest: onTaskCreateRequest, onClose: () => { setPanelVisibilityById('tmTreeView', true); }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, editPdfForm: editPdfForm, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, enablePinIcons: false, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, showBackButton: false, onRefreshSearchAsyncDatagrid: onRefreshSearchResults, onReferenceClick: handleNavigateToReference, fetchRemoteCertificates: fetchRemoteCertificates }, refreshKey)) }));
|
|
544
575
|
};
|
|
545
|
-
const TMLoadingOverlay = ({ onCancel, onStop, description, cancelText, stopText }) => {
|
|
546
|
-
return (_jsx("div", { style: {
|
|
547
|
-
position: 'absolute',
|
|
548
|
-
top: 0,
|
|
549
|
-
left: 0,
|
|
550
|
-
width: '100%',
|
|
551
|
-
height: '100%',
|
|
552
|
-
backgroundColor: 'rgba(248, 250, 252, 0.92)',
|
|
553
|
-
zIndex: 1000,
|
|
554
|
-
display: 'flex',
|
|
555
|
-
justifyContent: 'center',
|
|
556
|
-
alignItems: 'center',
|
|
557
|
-
}, children: _jsxs("div", { style: {
|
|
558
|
-
display: 'flex',
|
|
559
|
-
flexDirection: 'column',
|
|
560
|
-
alignItems: 'center',
|
|
561
|
-
gap: '16px',
|
|
562
|
-
padding: '24px 32px',
|
|
563
|
-
background: '#fcfcfc',
|
|
564
|
-
borderRadius: '8px',
|
|
565
|
-
boxShadow: '0 4px 16px rgba(0, 0, 0, 0.1)',
|
|
566
|
-
}, children: [_jsxs("div", { style: { position: 'relative', width: '80px', height: '80px' }, children: [_jsx("img", { style: {
|
|
567
|
-
position: 'absolute',
|
|
568
|
-
top: '50%',
|
|
569
|
-
left: '50%',
|
|
570
|
-
transform: 'translate(-54%, -54%)'
|
|
571
|
-
}, src: sixLogo, width: 35, alt: "" }), _jsx("style", { children: `
|
|
572
|
-
@keyframes tmSpinnerRotate {
|
|
573
|
-
0% { transform: rotate(0deg); }
|
|
574
|
-
100% { transform: rotate(360deg); }
|
|
575
|
-
}
|
|
576
|
-
.tm-spinner-animation {
|
|
577
|
-
display: inline-block;
|
|
578
|
-
width: 80px;
|
|
579
|
-
height: 80px;
|
|
580
|
-
position: absolute;
|
|
581
|
-
top: 50%;
|
|
582
|
-
left: 50%;
|
|
583
|
-
transform: translate(-50%, -50%);
|
|
584
|
-
}
|
|
585
|
-
.tm-spinner-animation div {
|
|
586
|
-
animation: tmSpinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
587
|
-
transform-origin: 40px 40px;
|
|
588
|
-
}
|
|
589
|
-
.tm-spinner-animation div:after {
|
|
590
|
-
content: " ";
|
|
591
|
-
display: block;
|
|
592
|
-
position: absolute;
|
|
593
|
-
width: 7px;
|
|
594
|
-
height: 7px;
|
|
595
|
-
border-radius: 50%;
|
|
596
|
-
background: #0c448e;
|
|
597
|
-
margin: -4px 0 0 -4px;
|
|
598
|
-
}
|
|
599
|
-
.tm-spinner-animation div:nth-child(1) { animation-delay: -0.036s; }
|
|
600
|
-
.tm-spinner-animation div:nth-child(1):after { top: 63px; left: 63px; background: #f7a51f; }
|
|
601
|
-
.tm-spinner-animation div:nth-child(2) { animation-delay: -0.072s; }
|
|
602
|
-
.tm-spinner-animation div:nth-child(2):after { top: 68px; left: 56px; background: #f7a51f; }
|
|
603
|
-
.tm-spinner-animation div:nth-child(3) { animation-delay: -0.108s; }
|
|
604
|
-
.tm-spinner-animation div:nth-child(3):after { top: 71px; left: 48px; background: #d3237b; }
|
|
605
|
-
.tm-spinner-animation div:nth-child(4) { animation-delay: -0.144s; }
|
|
606
|
-
.tm-spinner-animation div:nth-child(4):after { top: 72px; left: 40px; background: #d3237b; }
|
|
607
|
-
.tm-spinner-animation div:nth-child(5) { animation-delay: -0.18s; }
|
|
608
|
-
.tm-spinner-animation div:nth-child(5):after { top: 71px; left: 32px; background: #d12a1c; }
|
|
609
|
-
.tm-spinner-animation div:nth-child(6) { animation-delay: -0.216s; }
|
|
610
|
-
.tm-spinner-animation div:nth-child(6):after { top: 68px; left: 24px; background: #d12a1c; }
|
|
611
|
-
.tm-spinner-animation div:nth-child(7) { animation-delay: -0.252s; }
|
|
612
|
-
.tm-spinner-animation div:nth-child(7):after { top: 63px; left: 17px; background: #782b7d; }
|
|
613
|
-
.tm-spinner-animation div:nth-child(8) { animation-delay: -0.288s; }
|
|
614
|
-
.tm-spinner-animation div:nth-child(8):after { top: 56px; left: 12px; background: #782b7d; }
|
|
615
|
-
` }), _jsxs("div", { className: "tm-spinner-animation", children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }), _jsx("span", { style: { fontSize: '14px', color: '#334155', textAlign: 'center' }, children: description ?? SDKUI_Localizator.Loading }), (onStop || onCancel) && (_jsxs("div", { style: { marginTop: '4px', display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap', gap: '10px' }, children: [onStop && (_jsx("button", { onClick: onStop, title: SDKUI_Localizator.StopRelationsCalculation, style: {
|
|
616
|
-
padding: '8px 24px',
|
|
617
|
-
fontSize: '13px',
|
|
618
|
-
fontWeight: 500,
|
|
619
|
-
color: 'white',
|
|
620
|
-
background: '#0c448e',
|
|
621
|
-
border: '1.5px solid #0c448e',
|
|
622
|
-
borderRadius: '6px',
|
|
623
|
-
cursor: 'pointer',
|
|
624
|
-
transition: 'all 0.2s ease',
|
|
625
|
-
}, onMouseEnter: (e) => {
|
|
626
|
-
e.currentTarget.style.background = '#0a3872';
|
|
627
|
-
e.currentTarget.style.borderColor = '#0a3872';
|
|
628
|
-
}, onMouseLeave: (e) => {
|
|
629
|
-
e.currentTarget.style.background = '#0c448e';
|
|
630
|
-
e.currentTarget.style.borderColor = '#0c448e';
|
|
631
|
-
}, children: stopText ?? SDKUI_Localizator.ShowPartialResults })), onCancel && (_jsx("button", { onClick: onCancel, style: {
|
|
632
|
-
padding: '8px 24px',
|
|
633
|
-
fontSize: '13px',
|
|
634
|
-
fontWeight: 500,
|
|
635
|
-
color: '#64748b',
|
|
636
|
-
background: 'transparent',
|
|
637
|
-
border: '1.5px solid #cbd5e1',
|
|
638
|
-
borderRadius: '6px',
|
|
639
|
-
cursor: 'pointer',
|
|
640
|
-
transition: 'all 0.2s ease',
|
|
641
|
-
}, onMouseEnter: (e) => {
|
|
642
|
-
e.currentTarget.style.background = '#f1f5f9';
|
|
643
|
-
e.currentTarget.style.borderColor = '#94a3b8';
|
|
644
|
-
e.currentTarget.style.color = '#475569';
|
|
645
|
-
}, onMouseLeave: (e) => {
|
|
646
|
-
e.currentTarget.style.background = 'transparent';
|
|
647
|
-
e.currentTarget.style.borderColor = '#cbd5e1';
|
|
648
|
-
e.currentTarget.style.color = '#64748b';
|
|
649
|
-
}, children: cancelText ?? SDKUI_Localizator.Back }))] }))] }) }));
|
|
650
|
-
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { DcmtTypeDescriptor } from '@topconsultnpm/sdk-ts';
|
|
2
3
|
import { DcmtInfo } from '../../../ts';
|
|
3
4
|
interface TMMasterInfoFieldsProps {
|
|
@@ -15,5 +16,5 @@ interface TMMasterInfoFieldsProps {
|
|
|
15
16
|
*/
|
|
16
17
|
isExpandedView?: boolean;
|
|
17
18
|
}
|
|
18
|
-
declare const TMMasterInfoFields: ({ dtd, dcmt, getValuesByMidAsync, reloadToken, isExpandedView }: TMMasterInfoFieldsProps) =>
|
|
19
|
+
declare const TMMasterInfoFields: ({ dtd, dcmt, getValuesByMidAsync, reloadToken, isExpandedView }: TMMasterInfoFieldsProps) => React.JSX.Element;
|
|
19
20
|
export default TMMasterInfoFields;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { DataListViewModes, MetadataDataDomains, SDK_Globals } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { hoverStyle, IconChevronDown, IconClearButton, IconCopy, IconSearch, IconSuccess, SDKUI_Localizator } from '../../../helper';
|
|
5
|
-
import { formatScalarValue, getUserMetadataSorted } from '../../../helper/dcmtsHelper';
|
|
5
|
+
import { canViewMetadata, formatScalarValue, getUserMetadataSorted } from '../../../helper/dcmtsHelper';
|
|
6
6
|
import { useDataListItem } from '../../../hooks/useDataListItem';
|
|
7
7
|
import { TMColors } from '../../../utils/theme';
|
|
8
8
|
import ShowAlert from '../../base/TMAlert';
|
|
@@ -84,7 +84,8 @@ const TMMasterInfoFields = ({ dtd, dcmt, getValuesByMidAsync, reloadToken, isExp
|
|
|
84
84
|
setRows([]);
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
// I metadati che l'utente non può vedere non si mostrano, come nel risultato di ricerca
|
|
88
|
+
const metadata = getUserMetadataSorted(dtd).filter(canViewMetadata);
|
|
88
89
|
// Precarica le liste dati referenziate dai metadati, così le card mostrano subito il valore leggibile
|
|
89
90
|
const dataListIDs = new Set();
|
|
90
91
|
metadata.forEach(md => { if (md.dataDomain === MetadataDataDomains.DataList && md.dataListID)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { DcmtInfo } from '../../../ts';
|
|
2
3
|
import { HomeBlogPost, TaskDescriptor } from '@topconsultnpm/sdk-ts';
|
|
3
4
|
import { TMCopyToFolderMode } from '../../../hooks/useDocumentOperations';
|
|
@@ -19,5 +20,5 @@ interface ITMMergeToPdfFormProps {
|
|
|
19
20
|
* Form per l'unione di più documenti PDF in un singolo file.
|
|
20
21
|
* Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared con TMCopyToFolderForm.
|
|
21
22
|
*/
|
|
22
|
-
declare const TMMergeToPdfForm: (props: ITMMergeToPdfFormProps) =>
|
|
23
|
+
declare const TMMergeToPdfForm: (props: ITMMergeToPdfFormProps) => React.JSX.Element;
|
|
23
24
|
export default TMMergeToPdfForm;
|