@topconsultnpm/sdkui-react 6.22.0-dev3.8 → 6.22.0-dev4.10
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 +43 -45
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +60 -67
- package/lib/components/base/Styled.d.ts +77 -93
- 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/TMCounterBar.d.ts +2 -2
- package/lib/components/base/TMCounterContainer.d.ts +4 -3
- package/lib/components/base/TMCounterContainer.js +16 -1
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.js +243 -223
- package/lib/components/base/TMDataGridExportForm.d.ts +1 -2
- package/lib/components/base/TMFileManager.d.ts +1 -2
- package/lib/components/base/TMFileManagerDataGridView.d.ts +1 -2
- 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 +6 -4
- package/lib/components/base/TMLayout.d.ts +4 -4
- package/lib/components/base/TMList.d.ts +1 -2
- package/lib/components/base/TMListView.d.ts +1 -1
- package/lib/components/base/TMPanel.js +173 -170
- package/lib/components/base/TMSpinner.d.ts +3 -3
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTab.d.ts +3 -4
- package/lib/components/base/TMTabControl.d.ts +7 -0
- package/lib/components/base/TMTabControl.js +225 -213
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +8 -14
- package/lib/components/base/TMTreeView.js +20 -0
- package/lib/components/base/TMUserAvatar.d.ts +1 -2
- package/lib/components/base/TMVilViewer.d.ts +1 -2
- package/lib/components/base/TMWaitPanel.d.ts +2 -3
- 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 +57 -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/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +1 -2
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +1 -2
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/choosers/TMQuickSearchInfo.d.ts +1 -2
- 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 +42 -20
- package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +1 -2
- package/lib/components/editors/TMHtmlEditor.d.ts +1 -2
- package/lib/components/editors/TMTextBox.d.ts +4 -0
- package/lib/components/editors/TMTextBox.js +99 -11
- 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 +1231 -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 +1 -2
- 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 +50 -61
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -4
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.d.ts +6 -8
- package/lib/components/features/documents/TMDcmtPreview.js +5 -3
- package/lib/components/features/documents/TMDcmtTasks.d.ts +1 -2
- package/lib/components/features/documents/TMDcmtTasks.js +2 -9
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
- package/lib/components/features/documents/TMFileUploader.js +5 -5
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +53 -141
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +1 -2
- package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +59 -56
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +1 -2
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +14 -15
- 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 +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/TMDcmtCheckoutInfoForm.d.ts +1 -2
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +1 -2
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +1 -2
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
- package/lib/components/features/search/TMSearch.d.ts +1 -2
- package/lib/components/features/search/TMSearch.js +3 -4
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +3 -9
- 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 +129 -102
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +1 -2
- package/lib/components/features/search/TMTreeSelector.js +23 -27
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +1 -2
- package/lib/components/features/search/TMViewHistoryDcmt.js +15 -26
- 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 +97 -90
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +2 -3
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +95 -91
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +7 -8
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -3
- package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -3
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/TMChooserForm.d.ts +1 -2
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +1 -2
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.js +93 -97
- package/lib/components/grids/TMBlogsPostUtils.d.ts +9 -9
- package/lib/components/grids/TMValidationItemsList.d.ts +1 -2
- package/lib/components/index.d.ts +5 -1
- package/lib/components/index.js +4 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -2
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +4 -3
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +3 -2
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +5 -1
- package/lib/components/layout/panelManager/TMPanelManagerLoader.d.ts +5 -0
- package/lib/components/layout/panelManager/TMPanelManagerLoader.js +18 -0
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +6 -5
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +4 -8
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +2 -1
- 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 +32 -31
- package/lib/components/query/TMQueryEditor.d.ts +13 -14
- package/lib/components/query/TMQueryEditor.js +2 -1
- package/lib/components/settings/SettingsAppearance.d.ts +1 -2
- package/lib/components/sidebar/TMAboutApp.d.ts +1 -2
- 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 +2 -3
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +2 -3
- 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_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/TMAppUpdatedModal.d.ts +1 -2
- 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 +1 -2
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +4 -10
- 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 +201 -184
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +14 -25
- package/lib/hooks/useInputDialog.d.ts +1 -2
- 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/lib/services/platform_services.d.ts +2 -3
- package/package.json +2 -2
|
@@ -2,14 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef, useState } from 'react';
|
|
3
3
|
import { DownloadTypes } from '../../../ts';
|
|
4
4
|
import { calcResponsiveSizes, getExceptionMessage, IconFolderOpen, IconPlay, IconUndo, SDKUI_Globals, SDKUI_Localizator, } from '../../../helper';
|
|
5
|
-
import { DcmtOpers, FileFormats, GeneralRetrieveFormats, InvoiceRetrieveFormats, OrderRetrieveFormats, ResultTypes,
|
|
5
|
+
import { DcmtOpers, FileFormats, GeneralRetrieveFormats, InvoiceRetrieveFormats, OrderRetrieveFormats, ResultTypes, ValidationItem, } from '@topconsultnpm/sdk-ts';
|
|
6
6
|
import TMModal from '../../base/TMModal';
|
|
7
7
|
import { useDeviceType } from '../../base/TMDeviceProvider';
|
|
8
8
|
import TMTextBox from '../../editors/TMTextBox';
|
|
9
9
|
import { ButtonNames, TMMessageBoxManager } from '../../base/TMPopUp';
|
|
10
10
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
11
|
-
import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
|
|
12
11
|
import { TMSplitterLayout } from '../../base/TMLayout';
|
|
12
|
+
import TMWaitPanelManager from '../../base/waitPanel/TMWaitPanelManager';
|
|
13
13
|
import { TMColors } from '../../../utils/theme';
|
|
14
14
|
import TMDownloadRelationViewerSection from './TMDownloadRelationViewerSection';
|
|
15
15
|
import { getDcmtInfosToDownload, getFloatingLabelStyle, isDirectoryPickerSupported, MIN_PDF_FOR_MERGE, } from './copyAndMergeDcmtsShared';
|
|
@@ -50,16 +50,12 @@ const toPdfOrderRetrieveFormat = (format) => {
|
|
|
50
50
|
*/
|
|
51
51
|
const TMMergeToPdfForm = (props) => {
|
|
52
52
|
const { mode, selectedDcmtInfos, selectedItemsFull, onClose, showTMRelationViewer, allTasks, getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers } = props;
|
|
53
|
-
|
|
53
|
+
// Il wait panel del download lo apre e lo aggiorna l'hook: qui serve solo la funzione.
|
|
54
|
+
const { downloadDcmtsAsync } = useDcmtOperations();
|
|
54
55
|
const deviceType = useDeviceType();
|
|
55
56
|
const [pdfFileName, setPdfFileName] = useState(`${SDKUI_Localizator.Result.toLowerCase()}.pdf`);
|
|
56
57
|
const [destinationFolder, setDestinationFolder] = useState('Download');
|
|
57
58
|
const [selectedItemsRelationViewer, setSelectedItemsRelationViewer] = useState([]);
|
|
58
|
-
// ---- Stato per il merge PDF (progress bar) ----
|
|
59
|
-
const [isMergingPdf, setIsMergingPdf] = useState(false);
|
|
60
|
-
const [mergeProgressText, setMergeProgressText] = useState('');
|
|
61
|
-
const [mergeProgressValue, setMergeProgressValue] = useState(0);
|
|
62
|
-
const [mergeProgressMax, setMergeProgressMax] = useState(0);
|
|
63
59
|
// ---- Ref per la selezione cartella (File System Access API) ----
|
|
64
60
|
const folderHandleRef = useRef(null);
|
|
65
61
|
const skipSelectFolderRef = useRef(false);
|
|
@@ -156,32 +152,37 @@ const TMMergeToPdfForm = (props) => {
|
|
|
156
152
|
// Raccoglie gli errori come downloadDcmtsAsync
|
|
157
153
|
const metadataConversionResults = [];
|
|
158
154
|
if (metadataOnlyDcmts.length > 0) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
155
|
+
const metadataPanel = TMWaitPanelManager.show({
|
|
156
|
+
title: SDKUI_Localizator.MergeToPdf,
|
|
157
|
+
subtitle: 'Creazione PDF metadati...',
|
|
158
|
+
max: metadataOnlyDcmts.length,
|
|
159
|
+
});
|
|
163
160
|
for (let i = 0; i < metadataOnlyDcmts.length; i++) {
|
|
164
161
|
const dcmt = metadataOnlyDcmts[i];
|
|
165
162
|
try {
|
|
166
|
-
|
|
167
|
-
setMergeProgressText(`Creazione PDF metadati... (${i + 1}/${metadataOnlyDcmts.length})`);
|
|
163
|
+
metadataPanel.setSubtitle(`Creazione PDF metadati... (${i + 1}/${metadataOnlyDcmts.length})`);
|
|
168
164
|
const conversionResult = await createMetadataPdfFromDocument(dcmt);
|
|
169
165
|
if (conversionResult) {
|
|
170
166
|
pdfFilesMap.set(`${dcmt.TID}_${dcmt.DID}`, conversionResult.file);
|
|
171
167
|
metadataConversionResults.push({ rowIndex: i, id1: dcmt.TID, id2: dcmt.DID, resultType: ResultTypes.SUCCESS });
|
|
168
|
+
metadataPanel.ok();
|
|
172
169
|
}
|
|
173
170
|
else {
|
|
174
171
|
// createMetadataPdfFromDocument ha restituito null (errore interno loggato)
|
|
175
|
-
metadataConversionResults.push({ rowIndex: i, id1: dcmt.TID, id2: dcmt.DID, resultType: ResultTypes.ERROR, description:
|
|
172
|
+
metadataConversionResults.push({ rowIndex: i, id1: dcmt.TID, id2: dcmt.DID, resultType: ResultTypes.ERROR, description: SDKUI_Localizator.MetadataPdfCreationFailed });
|
|
173
|
+
metadataPanel.error(1, `DID ${dcmt.DID}: ${SDKUI_Localizator.MetadataPdfCreationFailed}`);
|
|
176
174
|
}
|
|
177
175
|
}
|
|
178
176
|
catch (error) {
|
|
179
177
|
console.error(`Errore creazione PDF metadati per TID=${dcmt.TID}, DID=${dcmt.DID}`, error);
|
|
180
|
-
|
|
178
|
+
const description = getExceptionMessage(error);
|
|
179
|
+
metadataConversionResults.push({ rowIndex: i, id1: dcmt.TID, id2: dcmt.DID, resultType: ResultTypes.ERROR, description });
|
|
180
|
+
metadataPanel.error(1, `DID ${dcmt.DID}: ${description}`);
|
|
181
181
|
}
|
|
182
|
+
// Avanza a conversione conclusa: con un solo documento la barra non parte dal 100%
|
|
183
|
+
await metadataPanel.step();
|
|
182
184
|
}
|
|
183
|
-
|
|
184
|
-
setIsMergingPdf(false);
|
|
185
|
+
metadataPanel.close();
|
|
185
186
|
// Mostra riepilogo errori se presenti (come downloadDcmtsAsync)
|
|
186
187
|
const hasErrors = metadataConversionResults.some(r => r.resultType === ResultTypes.ERROR);
|
|
187
188
|
if (hasErrors) {
|
|
@@ -190,12 +191,13 @@ const TMMergeToPdfForm = (props) => {
|
|
|
190
191
|
}
|
|
191
192
|
// Per i documenti con file, usa il download normale
|
|
192
193
|
if (dcmtsWithFile.length > 0) {
|
|
193
|
-
const rfo =
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
194
|
+
const rfo = {
|
|
195
|
+
retrieveReason: DcmtOpers.None,
|
|
196
|
+
generalRetrieveFormat: GeneralRetrieveFormats.OriginalUnsigned,
|
|
197
|
+
cvtFormat: FileFormats.PDF,
|
|
198
|
+
invoiceRetrieveFormat: toPdfInvoiceRetrieveFormat(SDKUI_Globals.userSettings?.searchSettings.invoiceRetrieveFormat),
|
|
199
|
+
orderRetrieveFormat: toPdfOrderRetrieveFormat(SDKUI_Globals.userSettings?.searchSettings.orderRetrieveFormat),
|
|
200
|
+
};
|
|
199
201
|
const collectFileForMerge = async (file, dcmtInfo) => {
|
|
200
202
|
pdfFilesMap.set(`${dcmtInfo.TID}_${dcmtInfo.DID}`, file);
|
|
201
203
|
};
|
|
@@ -226,16 +228,17 @@ const TMMergeToPdfForm = (props) => {
|
|
|
226
228
|
if (!pdfFiles)
|
|
227
229
|
return;
|
|
228
230
|
const finalName = pdfFileName.trim().toLowerCase().endsWith('.pdf') ? pdfFileName.trim() : pdfFileName.trim() + '.pdf';
|
|
229
|
-
//
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
// Il merge non e' interrompibile: pannello senza Interrompi.
|
|
232
|
+
const mergePanel = TMWaitPanelManager.show({
|
|
233
|
+
title: SDKUI_Localizator.MergeToPdf,
|
|
234
|
+
subtitle: SDKUI_Localizator.MergeToPdf,
|
|
235
|
+
max: pdfFiles.length,
|
|
236
|
+
showCounters: false,
|
|
237
|
+
});
|
|
234
238
|
try {
|
|
235
239
|
const mergeOptions = {
|
|
236
240
|
onProgress: (current, total, file) => {
|
|
237
|
-
|
|
238
|
-
setMergeProgressText(`${SDKUI_Localizator.MergeToPdf}: ${file.name}`);
|
|
241
|
+
mergePanel.update({ value: current, subtitle: `${SDKUI_Localizator.MergeToPdf}: ${file.name}` });
|
|
239
242
|
}
|
|
240
243
|
};
|
|
241
244
|
// Se c'è una cartella selezionata (non Download di default), salva direttamente nella cartella
|
|
@@ -259,7 +262,7 @@ const TMMergeToPdfForm = (props) => {
|
|
|
259
262
|
return;
|
|
260
263
|
}
|
|
261
264
|
finally {
|
|
262
|
-
|
|
265
|
+
mergePanel.close();
|
|
263
266
|
}
|
|
264
267
|
onClose();
|
|
265
268
|
};
|
|
@@ -360,29 +363,29 @@ const TMMergeToPdfForm = (props) => {
|
|
|
360
363
|
? SDKUI_Localizator.FileNotPdfWillBeExcluded.replaceParams(extLabel)
|
|
361
364
|
: SDKUI_Localizator.FilesNotPdfWillBeExcluded.replaceParams(nonPdfSelectedItems.length.toString(), extLabel);
|
|
362
365
|
})() }))] })] }))] })] }));
|
|
363
|
-
return (_jsx(
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
366
|
+
return (_jsx(TMModal, { width: calcResponsiveSizes(deviceType, showTMRelationViewer ? '90%' : '500px', showTMRelationViewer ? '90%' : '500px', '95%'), height: showTMRelationViewer ? '95%' : 'auto', title: getTitle(), onClose: onClose, showCloseButton: true, children: _jsxs("div", { onContextMenu: (e) => e.preventDefault(), style: { display: 'flex', flexDirection: 'column', gap: '16px', padding: '16px', width: '100%', height: '100%', boxSizing: 'border-box', overflow: 'hidden' }, children: [showTMRelationViewer ? (_jsx("div", { style: { flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column' }, children: _jsxs(TMSplitterLayout, { direction: 'vertical', showSeparator: true, separatorSize: 8, separatorColor: 'transparent', separatorActiveColor: 'transparent', overflow: 'hidden', min: ["50", "50"], start: ["70%", "30%"], children: [_jsx(TMDownloadRelationViewerSection, { selectedDcmtInfos: selectedDcmtInfos, onSelectionChanged: setSelectedItemsRelationViewer, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), configSection] }, "TMMergeToPdf-relation-config") })) : (configSection), _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: 0, marginTop: '12px' }, children: _jsxs("button", { disabled: !isFormValid() || (showTMRelationViewer && selectedItemsRelationViewer.filter(i => i.isDcmt).length === 0) || !hasEnoughPdfForMerge, onClick: run, style: {
|
|
367
|
+
display: 'flex',
|
|
368
|
+
alignItems: 'center',
|
|
369
|
+
justifyContent: 'center',
|
|
370
|
+
gap: '6px',
|
|
371
|
+
padding: '8px 20px',
|
|
372
|
+
fontSize: '0.95rem',
|
|
373
|
+
fontWeight: 600,
|
|
374
|
+
color: '#fff',
|
|
375
|
+
background: (!isFormValid() || (showTMRelationViewer && selectedItemsRelationViewer.filter(i => i.isDcmt).length === 0) || !hasEnoughPdfForMerge)
|
|
376
|
+
? '#b0b0b0'
|
|
377
|
+
: 'linear-gradient(135deg, #28a745 0%, #218838 100%)',
|
|
378
|
+
border: 'none',
|
|
379
|
+
borderRadius: '6px',
|
|
380
|
+
cursor: (!isFormValid() || (showTMRelationViewer && selectedItemsRelationViewer.filter(i => i.isDcmt).length === 0) || !hasEnoughPdfForMerge) ? 'not-allowed' : 'pointer',
|
|
381
|
+
boxShadow: (!isFormValid() || (showTMRelationViewer && selectedItemsRelationViewer.filter(i => i.isDcmt).length === 0) || !hasEnoughPdfForMerge)
|
|
382
|
+
? 'none'
|
|
383
|
+
: '0 2px 8px rgba(40, 167, 69, 0.35)',
|
|
384
|
+
transition: 'all 0.2s ease',
|
|
385
|
+
}, children: [_jsx(IconPlay, {}), _jsx("span", { children: mergeableSelectedCount === 0
|
|
386
|
+
? SDKUI_Localizator.MergeToPdf
|
|
387
|
+
: mergeableSelectedCount > 999
|
|
388
|
+
? _jsx(TMTooltip, { content: mergeableSelectedCount.toString(), children: SDKUI_Localizator.MergeFilesToPdf.replaceParams('999+') })
|
|
389
|
+
: SDKUI_Localizator.MergeFilesToPdf.replaceParams(mergeableSelectedCount.toString()) })] }) })] }) }));
|
|
387
390
|
};
|
|
388
391
|
export default TMMergeToPdfForm;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { DcmtTypeDescriptor, HomeBlogPost, ObjectRef, TaskDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
2
|
import { DcmtInfo, IGraphometricManagerProp, TaskContext } from "../../../ts";
|
|
4
3
|
import { IntesiCertificateData } from "../../../helper";
|
|
@@ -42,5 +41,5 @@ interface TMMultiMasterDetailDcmtsFormProps {
|
|
|
42
41
|
}>, tid?: number) => void;
|
|
43
42
|
openWGsCopyMoveForm?: (mode: "copyToWgDraft" | "copyToWgArchivedDoc", dcmtTypeDescriptor: DcmtTypeDescriptor, documents: Array<DcmtInfo>) => void;
|
|
44
43
|
}
|
|
45
|
-
declare const TMMultiMasterDetailDcmtsForm: (props: TMMultiMasterDetailDcmtsFormProps) =>
|
|
44
|
+
declare const TMMultiMasterDetailDcmtsForm: (props: TMMultiMasterDetailDcmtsFormProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
46
45
|
export default TMMultiMasterDetailDcmtsForm;
|
|
@@ -6,7 +6,6 @@ import { SearchResultContext } from "../../../ts";
|
|
|
6
6
|
import { getFullFileExtension, getMultiDetailModalSize, getMultiDetailPanelStates, hasMultiDetailPanelStates, hoverStyle, IconArchive, IconArrowDown, IconArrowUp, IconDelete, IconDuplicate, IconEdit, IconEraser, IconInfo, IconMenuVertical, IconRefresh, IconSearch, IconSearchCheck, saveMultiDetailModalSize, saveMultiDetailPanelStates, SDKUI_Localizator } from "../../../helper";
|
|
7
7
|
import { TMColors } from "../../../utils/theme";
|
|
8
8
|
import { DeviceType, useDeviceType } from "../../base/TMDeviceProvider";
|
|
9
|
-
import { TMLayoutWaitingContainer } from "../../base/TMWaitPanel";
|
|
10
9
|
import TMModal from "../../base/TMModal";
|
|
11
10
|
import TMDataGrid from "../../base/TMDataGrid";
|
|
12
11
|
import TMTooltip from "../../base/TMTooltip";
|
|
@@ -48,7 +47,7 @@ const styles = {
|
|
|
48
47
|
const MOBILE_SECTION = 'archiveList';
|
|
49
48
|
const TMMultiMasterDetailDcmtsForm = (props) => {
|
|
50
49
|
const { dtd, masterDcmt, onClose, canNavigateMaster, onNavigateMaster, allTasks, getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, showDcmtFormSidebar, showTodoDcmtForm, openFileUploaderPdfEditor, graphometricManager, editPdfForm, openS4TViewer, showToppyDraggableHelpCenter, toppyHelpCenterUsePortal, fetchRemoteCertificates, onOpenS4TViewerRequest, onOpenPdfEditorRequest, onReferenceClick, onTaskCreateRequest, onRefreshAfterAddDcmtToFavs, onFileOpened, passToArchiveCallback, openWGsCopyMoveForm } = props;
|
|
51
|
-
const { isLoading, isSummaryReady, phase, setPhase, detailRelationItems, selectedRelation, selectedItem, hasMultipleTypes, selectRelation, backToTypeSelection, isBackLocked, closeModal, isMasterNavigationEnabled, canNavigateMasterPrev, canNavigateMasterNext, navigateMaster, sectionsOpen, setSectionOpen, openAllSections, clearLayout, layoutResetToken, hasSavedLayout, setHasSavedLayout, canUpdateMaster, masterFieldsCount, getMasterMetadataAsync, masterInfoReloadToken, isOpenMasterForm, setIsOpenMasterForm, handleMasterSavedAsync, archivedDetailResults, archivedDetailsCount, isLoadingArchivedDetails, refreshArchivedDetailsAsync, detailColumns, detailSupportsFile, archiveRows, currentRows, focusedRowKey, setFocusedRowKey, selectedRowKeys, setSelectedRowKeys, isOpenAddForm, editingRowId, editingRow, formInputMids, openAddForm, openEditForm, closeAddForm, deleteRow, duplicateRow, upsertRow, updateRowValues, copyArchivedDetailToRows, stopOnFirstError, setStopOnFirstError, isArchiving, archiveAllAsync,
|
|
50
|
+
const { isLoading, isSummaryReady, phase, setPhase, detailRelationItems, selectedRelation, selectedItem, hasMultipleTypes, selectRelation, backToTypeSelection, isBackLocked, closeModal, isMasterNavigationEnabled, canNavigateMasterPrev, canNavigateMasterNext, navigateMaster, sectionsOpen, setSectionOpen, openAllSections, clearLayout, layoutResetToken, hasSavedLayout, setHasSavedLayout, canUpdateMaster, masterFieldsCount, getMasterMetadataAsync, masterInfoReloadToken, isOpenMasterForm, setIsOpenMasterForm, handleMasterSavedAsync, archivedDetailResults, archivedDetailsCount, isLoadingArchivedDetails, refreshArchivedDetailsAsync, detailColumns, detailSupportsFile, archiveRows, currentRows, focusedRowKey, setFocusedRowKey, selectedRowKeys, setSelectedRowKeys, isOpenAddForm, editingRowId, editingRow, formInputMids, openAddForm, openEditForm, closeAddForm, deleteRow, duplicateRow, upsertRow, updateRowValues, copyArchivedDetailToRows, stopOnFirstError, setStopOnFirstError, isArchiving, archiveAllAsync, } = useMultiMasterDetailDcmts({ dtd, masterDcmt, onClose, canNavigateMaster, onNavigateMaster });
|
|
52
51
|
const deviceType = useDeviceType();
|
|
53
52
|
// Su mobile il panel manager mostra un pannello alla volta: le sezioni si raggiungono dalla sua barra
|
|
54
53
|
const isMobile = useMemo(() => deviceType === DeviceType.MOBILE, [deviceType]);
|
|
@@ -301,19 +300,19 @@ const TMMultiMasterDetailDcmtsForm = (props) => {
|
|
|
301
300
|
// ----- Render principale --------------------------------------------------------------------
|
|
302
301
|
if (isLoading)
|
|
303
302
|
return null;
|
|
304
|
-
return _jsxs(_Fragment, { children: [_jsx("div", { style: { width: 0, height: 0 }, children: _jsx(
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
303
|
+
return _jsxs(_Fragment, { children: [_jsx("div", { style: { width: 0, height: 0 }, children: _jsx(TMModal, { width: modalSize.width, height: modalSize.height, onClose: closeModal, onResized: persistModalSize, sizeResetToken: layoutResetToken, title: modalTitle, hidePopup: false, askClosingConfirm: archiveRows.length > 0, recenterOnResize: true, titleActions: renderTitleActions(), children: _jsxs("div", { style: styles.content, children: [hasMultipleTypes && _jsx("div", { style: styles.header, children: renderStepper({
|
|
304
|
+
steps,
|
|
305
|
+
phase,
|
|
306
|
+
hasMultipleTypes,
|
|
307
|
+
isBackLocked,
|
|
308
|
+
showBackArrow: isSummaryPhase,
|
|
309
|
+
onBack: backToTypeSelection,
|
|
310
|
+
onStepClick: (stepPhase) => (stepPhase === MultiDetailArchivePhase.SelectDcmtType ? backToTypeSelection() : setPhase(stepPhase)),
|
|
311
|
+
}) }), !isSummaryPhase
|
|
312
|
+
? renderSelectDcmtType({ detailRelationItems, selectedRelation, onSelectRelation: selectRelation })
|
|
313
|
+
: (isSummaryReady
|
|
314
|
+
? renderArchiveSummary()
|
|
315
|
+
: _jsx("div", { style: styles.loader, children: _jsx(LoadIndicator, { height: 40, width: 40 }) }))] }) }) }), isOpenAddForm && selectedRelation?.detailTID && (_jsx(TMDcmtForm, { isModal: true, titleModal: getDtdDisplayName(selectedItem?.detailDtd), TID: selectedRelation.detailTID, layoutMode: LayoutModes.Ark, showBackButton: false, allowButtonsRefs: false, inputMids: formInputMids, inputFile: editingRow?.__file ?? null, archiveListMode: {
|
|
317
316
|
isEditingRow: editingRowId !== undefined,
|
|
318
317
|
onUpsertRow: (values, file) => upsertRow(values, file),
|
|
319
318
|
}, onClose: closeAddForm, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, showDcmtFormSidebar: showDcmtFormSidebar, showTodoDcmtForm: showTodoDcmtForm, openFileUploaderPdfEditor: openFileUploaderPdfEditor, graphometricManager: graphometricManager })), isOpenMasterForm && masterDcmt?.TID !== undefined && masterDcmt?.DID !== undefined && (_jsx(TMDcmtForm, { isModal: true, titleModal: `${SDKUI_Localizator.Update}: ${getDtdDisplayName(dtd)}`, TID: masterDcmt.TID, DID: masterDcmt.DID, layoutMode: LayoutModes.Update, showBackButton: false, allowRelations: false, allowButtonsRefs: false, onSavedAsyncCallback: handleMasterSavedAsync, onClose: () => setIsOpenMasterForm(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, onTaskCreateRequest: onTaskCreateRequest, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, showDcmtFormSidebar: showDcmtFormSidebar, showTodoDcmtForm: showTodoDcmtForm, openFileUploaderPdfEditor: openFileUploaderPdfEditor, graphometricManager: graphometricManager, editPdfForm: editPdfForm, openS4TViewer: openS4TViewer, fetchRemoteCertificates: fetchRemoteCertificates, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, onReferenceClick: onReferenceClick }))] });
|
|
@@ -87,7 +87,7 @@ export declare const toGridNumber: (value: unknown) => number | undefined;
|
|
|
87
87
|
* si rilegge nel form, si mostra in griglia e si archivia come una riga compilata a mano
|
|
88
88
|
*/
|
|
89
89
|
export declare const toArchiveRowValue: (value: MetadataScalarValue, dataType: MetadataDataTypes | undefined) => string;
|
|
90
|
-
/** Colonne della griglia di riepilogo dai metadati (utente) del tipo documento */
|
|
90
|
+
/** Colonne della griglia di riepilogo dai metadati (utente) del tipo documento, esclusi quelli che l'utente non può vedere */
|
|
91
91
|
export declare const buildColumnsFromDtd: (dtd: DcmtTypeDescriptor | undefined, renderDataListCell: (value: string | Date | number | undefined, dataListID: number, viewMode: DataListViewModes) => React.ReactElement) => Array<IColumnProps>;
|
|
92
92
|
export declare const getDetailDtdAsync: (detailTID: number | undefined) => Promise<DcmtTypeDescriptor | undefined>;
|
|
93
93
|
/** Nome visualizzato del tipo documento (localizzato se richiesto) */
|
|
@@ -312,7 +312,7 @@ export interface RenderStepperParams {
|
|
|
312
312
|
/** Click su uno step completato: riceve la fase di destinazione */
|
|
313
313
|
onStepClick: (phase: number) => void;
|
|
314
314
|
}
|
|
315
|
-
export declare const renderStepper: ({ steps, phase, hasMultipleTypes, isBackLocked, showBackArrow, onBack, onStepClick }: RenderStepperParams) =>
|
|
315
|
+
export declare const renderStepper: ({ steps, phase, hasMultipleTypes, isBackLocked, showBackArrow, onBack, onStepClick }: RenderStepperParams) => import("react/jsx-runtime").JSX.Element;
|
|
316
316
|
export interface RenderSelectDcmtTypeParams {
|
|
317
317
|
/** Relazioni di dettaglio fra cui scegliere */
|
|
318
318
|
detailRelationItems: Array<DetailRelationItem>;
|
|
@@ -321,7 +321,7 @@ export interface RenderSelectDcmtTypeParams {
|
|
|
321
321
|
/** Selezione di una relazione */
|
|
322
322
|
onSelectRelation: (item: DetailRelationItem) => void;
|
|
323
323
|
}
|
|
324
|
-
export declare const renderSelectDcmtType: ({ detailRelationItems, selectedRelation, onSelectRelation }: RenderSelectDcmtTypeParams) =>
|
|
324
|
+
export declare const renderSelectDcmtType: ({ detailRelationItems, selectedRelation, onSelectRelation }: RenderSelectDcmtTypeParams) => import("react/jsx-runtime").JSX.Element;
|
|
325
325
|
export interface RenderAccordionHeaderParams {
|
|
326
326
|
/** Sezione a cui appartiene la testata */
|
|
327
327
|
section: AccordionSection;
|
|
@@ -340,7 +340,7 @@ export interface RenderAccordionHeaderParams {
|
|
|
340
340
|
/** Apre/chiude la sezione */
|
|
341
341
|
onToggleOpen: (section: AccordionSection, isOpen: boolean) => void;
|
|
342
342
|
}
|
|
343
|
-
export declare const renderAccordionHeader: ({ section, isOpen, tooltip, count, title, actions, panel, onToggleOpen }: RenderAccordionHeaderParams) =>
|
|
343
|
+
export declare const renderAccordionHeader: ({ section, isOpen, tooltip, count, title, actions, panel, onToggleOpen }: RenderAccordionHeaderParams) => import("react/jsx-runtime").JSX.Element;
|
|
344
344
|
/**
|
|
345
345
|
* Contenuto di un pannello: il contesto del panel manager è leggibile solo dentro l'albero del
|
|
346
346
|
* provider, quindi è qui che si prende lo stato di ingrandimento da passare alla sezione
|
|
@@ -349,7 +349,7 @@ export declare const TMSummarySectionSlot: ({ section, render, onBeforeMaximize
|
|
|
349
349
|
section: AccordionSection;
|
|
350
350
|
render: (panel: SectionPanelState) => React.ReactNode;
|
|
351
351
|
onBeforeMaximize?: (section: AccordionSection) => void;
|
|
352
|
-
}) =>
|
|
352
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
353
353
|
/**
|
|
354
354
|
* Segnala che l'utente ha spostato un separatore: è l'unico caso in cui le altezze dei pannelli sono
|
|
355
355
|
* una sua scelta, quindi la sola da salvare. Le quote calcolate all'apertura del riepilogo o al
|
|
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import React, { useEffect, useRef } from 'react';
|
|
3
3
|
import { AccessLevelsEx, DataListViewModes, DcmtTypeListCacheService, MetadataDataDomains, MetadataDataTypes, SDK_Globals } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { hoverStyle, IconChevronRight, IconWindowMaximize, IconWindowMinimize, SDKUI_Localizator } from '../../../helper';
|
|
5
|
-
import { formatScalarValue, getUserMetadataSorted } from '../../../helper/dcmtsHelper';
|
|
5
|
+
import { canViewMetadata, formatScalarValue, getUserMetadataSorted } from '../../../helper/dcmtsHelper';
|
|
6
6
|
import { TMColors } from '../../../utils/theme';
|
|
7
7
|
import { TMDcmtTypeIcon } from '../../viewers/TMTidViewer';
|
|
8
8
|
import TMTooltip from '../../base/TMTooltip';
|
|
@@ -71,8 +71,8 @@ export const toArchiveRowValue = (value, dataType) => {
|
|
|
71
71
|
}
|
|
72
72
|
return String(value);
|
|
73
73
|
};
|
|
74
|
-
/** Colonne della griglia di riepilogo dai metadati (utente) del tipo documento */
|
|
75
|
-
export const buildColumnsFromDtd = (dtd, renderDataListCell) => getUserMetadataSorted(dtd).map(md => {
|
|
74
|
+
/** Colonne della griglia di riepilogo dai metadati (utente) del tipo documento, esclusi quelli che l'utente non può vedere */
|
|
75
|
+
export const buildColumnsFromDtd = (dtd, renderDataListCell) => getUserMetadataSorted(dtd).filter(canViewMetadata).map(md => {
|
|
76
76
|
const dataListID = md.dataListID ?? 0;
|
|
77
77
|
const isDataList = md.dataDomain === MetadataDataDomains.DataList && dataListID > 0;
|
|
78
78
|
const viewMode = md.dataListViewMode ?? DataListViewModes.None;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DcmtTypeDescriptor, SearchResultDescriptor, DataColumnDescriptor } from "@topconsultnpm/sdk-ts";
|
|
3
3
|
import { DcmtMetadataMap } from '../../../helper';
|
|
4
|
-
import { DcmtInfo
|
|
4
|
+
import { DcmtInfo } from '../../../ts';
|
|
5
5
|
import { ITMTreeItem } from '../../base/TMTreeView';
|
|
6
|
+
import { RelationTreeState } from './relationTreeState';
|
|
6
7
|
/**
|
|
7
8
|
* Tree item structure for relations
|
|
8
9
|
*/
|
|
@@ -26,6 +27,7 @@ export interface RelationTreeItem extends ITMTreeItem {
|
|
|
26
27
|
fileExt?: string;
|
|
27
28
|
fileCount?: number;
|
|
28
29
|
}
|
|
30
|
+
export type { RelationTreeState } from './relationTreeState';
|
|
29
31
|
/**
|
|
30
32
|
* Props for TMRelationViewer component
|
|
31
33
|
*/
|
|
@@ -111,11 +113,6 @@ export interface TMRelationViewerProps {
|
|
|
111
113
|
* Use to show a context menu.
|
|
112
114
|
*/
|
|
113
115
|
onItemContextMenu?: (item: RelationTreeItem, e: React.MouseEvent) => void;
|
|
114
|
-
/**
|
|
115
|
-
* Metadata values for the focused item
|
|
116
|
-
* (used in master-detail context)
|
|
117
|
-
*/
|
|
118
|
-
focusedItemFormData?: MetadataValueDescriptorEx[];
|
|
119
116
|
/**
|
|
120
117
|
* If true, shows a toolbar button to expand/collapse all tree nodes.
|
|
121
118
|
* Default: false
|
|
@@ -132,11 +129,6 @@ export interface TMRelationViewerProps {
|
|
|
132
129
|
* Useful to disable interactions (like context menu) during loading.
|
|
133
130
|
*/
|
|
134
131
|
onLoadingStateChanged?: (isLoading: boolean) => void;
|
|
135
|
-
/**
|
|
136
|
-
* Invoked while the initial correlations load progresses, with how many input
|
|
137
|
-
* documents have been processed out of the total.
|
|
138
|
-
*/
|
|
139
|
-
onLoadingProgress?: (value: number, max: number) => void;
|
|
140
132
|
/**
|
|
141
133
|
* Invoked on mount to hand over a function that stops the ongoing correlations
|
|
142
134
|
* calculation: no further GetMetadata calls are performed and only the
|
|
@@ -151,6 +143,14 @@ export interface TMRelationViewerProps {
|
|
|
151
143
|
* Riceve quanti documenti di input sono stati completati sul totale.
|
|
152
144
|
*/
|
|
153
145
|
onCalculationStopped?: (loadedCount: number, totalCount: number) => void;
|
|
146
|
+
/**
|
|
147
|
+
* Stato dell'albero da ripristinare al primo caricamento, al posto dell'espansione
|
|
148
|
+
* iniziale predefinita: permette al padre di rimontare il viewer dopo un'operazione
|
|
149
|
+
* senza che l'albero torni allo stato di partenza. Se assente vale il default.
|
|
150
|
+
*/
|
|
151
|
+
initialTreeState?: RelationTreeState;
|
|
152
|
+
/** Notifica lo stato dell'albero, da restituire come `initialTreeState` dopo un refresh. */
|
|
153
|
+
onTreeStateChange?: (state: RelationTreeState) => void;
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
156
|
* Check if document type has detail relations
|
|
@@ -166,10 +166,9 @@ export declare const hasMasterRelations: (dTID: number | undefined) => Promise<b
|
|
|
166
166
|
export declare const getDisplayValueByColumn: (col: DataColumnDescriptor | undefined, value: any) => any;
|
|
167
167
|
/**
|
|
168
168
|
* Convert SearchResultDescriptor to structured data source with metadata
|
|
169
|
-
* I valori dei documenti sono
|
|
169
|
+
* I valori dei documenti sono già presenti nelle righe restituite dalla ricerca:
|
|
170
170
|
* qui vengono solo abbinati ai rispettivi MetadataDescriptor (perm,
|
|
171
|
-
* isSpecialSearchOutput, ...), risolti
|
|
172
|
-
* Nessuna chiamata al server per riga.
|
|
171
|
+
* isSpecialSearchOutput, ...), risolti una sola volta per tipo documento.
|
|
173
172
|
*/
|
|
174
173
|
export declare const searchResultToDataSource: (searchResult: SearchResultDescriptor | undefined, hideSysMetadata?: boolean, signal?: AbortSignal) => Promise<any[]>;
|
|
175
174
|
export declare const DEFAULT_RELATION_EXPAND_LEVEL = 4;
|