@topconsultnpm/sdkui-react 6.22.0-t1 → 6.22.0-t3
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 +3 -3
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +1 -1
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +45 -43
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +6 -6
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +80 -73
- package/lib/components/base/Styled.d.ts +92 -76
- package/lib/components/base/Styled.js +7 -5
- package/lib/components/base/TMAccordionNew.js +7 -7
- package/lib/components/base/TMAlert.d.ts +32 -32
- package/lib/components/base/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- package/lib/components/base/TMButton.d.ts +13 -0
- package/lib/components/base/TMButton.js +139 -7
- package/lib/components/base/TMClosableList.js +3 -3
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.d.ts +4 -0
- package/lib/components/base/TMDataGrid.js +292 -12
- package/lib/components/base/TMDataGridExportForm.js +39 -30
- package/lib/components/base/TMDropDownMenu.js +1 -1
- package/lib/components/base/TMEditorBase.d.ts +2 -0
- package/lib/components/base/TMFileManager.js +5 -3
- package/lib/components/base/TMFileManagerDataGridView.js +12 -3
- package/lib/components/base/TMFileManagerThumbnailItems.js +20 -10
- package/lib/components/base/TMFileManagerUtils.d.ts +6 -6
- package/lib/components/base/TMFileManagerUtils.js +37 -1
- package/lib/components/base/TMLayout.d.ts +2 -2
- package/lib/components/base/TMLayout.js +3 -3
- package/lib/components/base/TMList.js +1 -1
- package/lib/components/base/TMListView.js +3 -3
- package/lib/components/base/TMModal.d.ts +11 -0
- package/lib/components/base/TMModal.js +47 -13
- package/lib/components/base/TMPanel.d.ts +6 -0
- package/lib/components/base/TMPanel.js +141 -28
- package/lib/components/base/TMPopUp.js +5 -2
- package/lib/components/base/TMResizableMenu.js +2 -2
- package/lib/components/base/TMRightSidebar.js +1 -1
- package/lib/components/base/TMShowAllOrMaxItemsButton.js +1 -1
- package/lib/components/base/TMSpinner.d.ts +2 -1
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTab.js +2 -2
- package/lib/components/base/TMTabControl.d.ts +106 -0
- package/lib/components/base/TMTabControl.js +664 -0
- package/lib/components/base/TMToggleButton.js +2 -2
- package/lib/components/base/TMToolbarCard.js +3 -3
- package/lib/components/base/TMTooltip.d.ts +2 -1
- package/lib/components/base/TMTooltip.js +24 -8
- package/lib/components/base/TMTreeView.d.ts +13 -7
- package/lib/components/base/TMTreeView.js +143 -70
- package/lib/components/base/TMWaitPanel.js +3 -3
- 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/TMCultureIDPicker.js +2 -2
- package/lib/components/choosers/TMDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMDataListItemPicker.js +2 -2
- package/lib/components/choosers/TMDcmtTypeChooser.js +5 -4
- package/lib/components/choosers/TMDiskChooser.js +1 -1
- package/lib/components/choosers/TMDistinctValues.d.ts +9 -7
- package/lib/components/choosers/TMDistinctValues.js +157 -141
- package/lib/components/choosers/TMDynDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMImageIDChooser.js +1 -1
- package/lib/components/choosers/TMMetadataChooser.js +3 -3
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/choosers/TMQuickSearchInfo.d.ts +13 -0
- package/lib/components/choosers/TMQuickSearchInfo.js +279 -0
- package/lib/components/choosers/TMQuickSearchSettingsForm.d.ts +16 -0
- package/lib/components/choosers/TMQuickSearchSettingsForm.js +94 -0
- package/lib/components/choosers/TMRelationChooser.js +1 -1
- package/lib/components/choosers/TMSelectedValuesSummary.d.ts +13 -0
- package/lib/components/choosers/TMSelectedValuesSummary.js +89 -0
- package/lib/components/choosers/TMUserChooser.js +1 -1
- package/lib/components/editors/TMCheckBox.js +1 -1
- package/lib/components/editors/TMDateBox.d.ts +16 -1
- package/lib/components/editors/TMDateBox.js +90 -22
- package/lib/components/editors/TMDropDown.d.ts +3 -0
- package/lib/components/editors/TMDropDown.js +197 -5
- package/lib/components/editors/TMEditorStyled.d.ts +21 -43
- package/lib/components/editors/TMFormulaEditor.js +1 -1
- package/lib/components/editors/TMHtmlContentDisplay.js +1 -1
- package/lib/components/editors/TMLocalizedTextBox.js +1 -1
- package/lib/components/editors/TMMetadataEditor.d.ts +5 -1
- package/lib/components/editors/TMMetadataEditor.js +27 -23
- package/lib/components/editors/TMMetadataValues.js +6 -6
- package/lib/components/editors/TMRadioButton.js +2 -2
- package/lib/components/editors/TMSummary.js +3 -3
- package/lib/components/editors/TMTextArea.d.ts +1 -0
- package/lib/components/editors/TMTextArea.js +25 -17
- package/lib/components/editors/TMTextBox.d.ts +2 -0
- package/lib/components/editors/TMTextBox.js +32 -21
- package/lib/components/editors/TMTextExpression.js +1 -1
- package/lib/components/features/archive/TMArchive.js +24 -5
- package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +29 -0
- package/lib/components/features/assistant/TMHelpOnLineChat.js +1384 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +4 -4
- package/lib/components/features/assistant/TMToppySpeechBubble.js +1 -1
- package/lib/components/features/assistant/dataset/Designer-Suggested-Questions.json +102 -0
- package/lib/components/features/assistant/dataset/Login-Suggested-Questions.json +32 -0
- package/lib/components/features/assistant/dataset/Surfer-Suggested-Questions.json +102 -0
- package/lib/components/features/documents/TMBatchUpdateForm.js +22 -9
- package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
- package/lib/components/features/documents/TMDcmtBlog.d.ts +3 -0
- package/lib/components/features/documents/TMDcmtBlog.js +4 -4
- package/lib/components/features/documents/TMDcmtForm.d.ts +7 -0
- package/lib/components/features/documents/TMDcmtForm.js +281 -113
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +11 -0
- package/lib/components/features/documents/TMDcmtFormActionButtons.js +79 -9
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -3
- package/lib/components/features/documents/TMDcmtIcon.js +8 -8
- package/lib/components/features/documents/TMDcmtPreview.d.ts +7 -5
- package/lib/components/features/documents/TMDcmtPreview.js +16 -10
- package/lib/components/features/documents/TMDcmtTasks.js +2 -9
- package/lib/components/features/documents/TMDownloadRelationViewerSection.js +1 -1
- package/lib/components/features/documents/TMFileUploader.js +7 -7
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +95 -108
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +20 -0
- package/lib/components/features/documents/TMMasterInfoFields.js +185 -0
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +83 -56
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +46 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +320 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +370 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +283 -0
- package/lib/components/features/documents/TMRelationViewer.d.ts +29 -9
- package/lib/components/features/documents/TMRelationViewer.js +310 -208
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +1 -1
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMMetadataOutputForm.js +1 -1
- package/lib/components/features/search/TMMetadataSorterForm.js +1 -1
- package/lib/components/features/search/TMSavedQuerySelector.js +2 -2
- package/lib/components/features/search/TMSearch.d.ts +1 -1
- package/lib/components/features/search/TMSearch.js +172 -34
- package/lib/components/features/search/TMSearchQueryEditor.js +7 -5
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +14 -4
- package/lib/components/features/search/TMSearchQueryPanel.js +153 -62
- package/lib/components/features/search/TMSearchResult.d.ts +21 -0
- package/lib/components/features/search/TMSearchResult.js +461 -152
- package/lib/components/features/search/TMSignatureInfoContent.js +1 -1
- package/lib/components/features/search/TMTreeSelector.js +130 -83
- package/lib/components/features/search/TMViewHistoryDcmt.js +14 -25
- package/lib/components/features/tasks/TMTaskForm.js +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.js +3 -3
- package/lib/components/features/tasks/TMTasksAgenda.js +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.js +1 -1
- package/lib/components/features/tasks/TMTasksHeader.js +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.js +1 -1
- package/lib/components/features/tasks/TMTasksView.js +97 -102
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +92 -92
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +10 -0
- package/lib/components/features/workflow/TMWorkflowPopup.js +9 -5
- package/lib/components/features/workflow/diagram/ConnectionComponent.js +3 -3
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +3 -3
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +1 -1
- package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
- package/lib/components/features/workflow/diagram/WFDiagram.js +4 -4
- 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/Menu.js +1 -1
- package/lib/components/forms/Login/OTPReader.js +1 -1
- package/lib/components/forms/Login/PasswordStrengthChecker.js +1 -1
- package/lib/components/forms/Login/RapidAccessLogin.js +2 -2
- package/lib/components/forms/Login/RecoverPasswordFlow.js +2 -2
- package/lib/components/forms/Login/SelectBox.js +1 -1
- package/lib/components/forms/Login/StepIndicator.js +1 -1
- package/lib/components/forms/Login/TMLoginForm.js +7 -7
- package/lib/components/forms/Login/TextBox.js +1 -1
- package/lib/components/forms/TMApplyForm.js +3 -3
- package/lib/components/forms/TMChooserForm.js +1 -1
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/forms/TMSaveForm.js +3 -3
- package/lib/components/grids/TMBlogAttachments.js +14 -3
- package/lib/components/grids/TMBlogHeader.js +5 -1
- package/lib/components/grids/TMBlogsPost.d.ts +2 -0
- package/lib/components/grids/TMBlogsPost.js +122 -99
- package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
- package/lib/components/grids/TMBlogsPostUtils.js +15 -4
- package/lib/components/grids/TMRecentsManager.js +4 -4
- package/lib/components/grids/TMValidationItemsList.js +1 -1
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.js +5 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +25 -15
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +68 -93
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +4 -5
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +1 -1
- package/lib/components/layout/panelManager/TMPanelWrapper.js +3 -3
- package/lib/components/layout/panelManager/types.d.ts +3 -0
- package/lib/components/layout/panelManager/utils.js +13 -11
- package/lib/components/pages/TMPage.js +30 -32
- package/lib/components/query/TMQueryCountButton.js +1 -1
- package/lib/components/query/TMQueryEditor.d.ts +17 -10
- package/lib/components/query/TMQueryEditor.js +9 -8
- package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
- package/lib/components/sidebar/TMCommandsPanel.js +1 -1
- package/lib/components/sidebar/TMHeader.d.ts +1 -0
- package/lib/components/sidebar/TMHeader.js +37 -27
- package/lib/components/sidebar/TMSidebar.js +1 -1
- package/lib/components/sidebar/TMSidebarItem.js +1 -1
- package/lib/components/viewers/TMMidViewer.js +6 -3
- package/lib/components/viewers/TMTidViewer.js +89 -28
- package/lib/components/wizard/TMStepIndicator.js +3 -3
- package/lib/css/tm-sdkui.css +1 -1
- package/lib/devextreme-license.d.ts +1 -0
- package/lib/devextreme-license.js +3 -0
- package/lib/helper/Enum_Localizator.d.ts +4 -4
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/Globalization.d.ts +1 -1
- package/lib/helper/SDKUI_Globals.d.ts +110 -0
- package/lib/helper/SDKUI_Globals.js +151 -0
- package/lib/helper/SDKUI_Localizator.d.ts +756 -677
- package/lib/helper/SDKUI_Localizator.js +790 -0
- package/lib/helper/TMAppUpdatedModal.d.ts +2 -0
- package/lib/helper/TMAppUpdatedModal.js +134 -0
- package/lib/helper/TMIcons.d.ts +1 -0
- package/lib/helper/TMIcons.js +4 -3
- package/lib/helper/TMPdfViewer.js +1 -1
- package/lib/helper/TMToppyMessage.js +1 -1
- package/lib/helper/TMUtils.d.ts +51 -4
- package/lib/helper/TMUtils.js +273 -12
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/checkinCheckoutManager.d.ts +1 -1
- package/lib/helper/checkinCheckoutManager.js +1 -1
- package/lib/helper/dataGridSearchHelper.d.ts +28 -0
- package/lib/helper/dataGridSearchHelper.js +51 -0
- package/lib/helper/dcmtsHelper.d.ts +22 -0
- package/lib/helper/dcmtsHelper.js +60 -1
- package/lib/helper/helpers.d.ts +24 -2
- package/lib/helper/helpers.js +59 -3
- package/lib/helper/index.d.ts +2 -0
- package/lib/helper/index.js +2 -0
- package/lib/helper/queryHelper.d.ts +6 -1
- package/lib/helper/queryHelper.js +8 -3
- package/lib/hooks/tmDistinctValuesGridHelper.d.ts +16 -0
- package/lib/hooks/tmDistinctValuesGridHelper.js +31 -0
- package/lib/hooks/useArchiveListForm.d.ts +39 -0
- package/lib/hooks/useArchiveListForm.js +46 -0
- package/lib/hooks/useCaseFlowApprove.d.ts +56 -0
- package/lib/hooks/useCaseFlowApprove.js +157 -0
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +14 -34
- package/lib/hooks/useDataUserIdItem.d.ts +1 -0
- package/lib/hooks/useDataUserIdItem.js +1 -0
- package/lib/hooks/useDcmtOperations.d.ts +3 -12
- package/lib/hooks/useDcmtOperations.js +187 -179
- package/lib/hooks/useDocumentOperations.d.ts +5 -0
- package/lib/hooks/useDocumentOperations.js +64 -33
- package/lib/hooks/useInputDialog.js +1 -1
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +98 -0
- package/lib/hooks/useMultiMasterDetailDcmts.js +758 -0
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useQueryParametersDialog.js +1 -1
- package/lib/hooks/useRelatedDocuments.d.ts +1 -0
- package/lib/hooks/useRelatedDocuments.js +22 -27
- package/lib/hooks/useShowDossiersV5.d.ts +12 -0
- package/lib/hooks/useShowDossiersV5.js +37 -0
- package/lib/hooks/useTMDistinctValuesMetadataDisplay.d.ts +18 -0
- package/lib/hooks/useTMDistinctValuesMetadataDisplay.js +103 -0
- package/lib/hooks/useTMDistinctValuesQuickSearch.d.ts +49 -0
- package/lib/hooks/useTMDistinctValuesQuickSearch.js +307 -0
- package/lib/hooks/useTMDistinctValuesSelection.d.ts +42 -0
- package/lib/hooks/useTMDistinctValuesSelection.js +103 -0
- package/lib/hooks/useTMDistinctValuesSource.d.ts +29 -0
- package/lib/hooks/useTMDistinctValuesSource.js +105 -0
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/index.d.ts +2 -0
- package/lib/index.js +5 -2
- package/lib/services/caseflow/CaseFlowService.d.ts +277 -0
- package/lib/services/caseflow/CaseFlowService.js +761 -0
- package/lib/services/caseflow/CaseFlowTemplateCacheService.d.ts +28 -0
- package/lib/services/caseflow/CaseFlowTemplateCacheService.js +121 -0
- package/lib/services/caseflow/caseFlowNameCache.d.ts +32 -0
- package/lib/services/caseflow/caseFlowNameCache.js +116 -0
- package/lib/services/caseflow/caseFlowWorkItemUtils.d.ts +61 -0
- package/lib/services/caseflow/caseFlowWorkItemUtils.js +113 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.js +4 -0
- package/lib/services/platform_services.d.ts +4 -4
- package/package.json +16 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { AccessLevels, AccessLevelsEx, AppModules, DcmtOpers, DcmtTypeListCacheService, FileFormats, GeneralRetrieveFormats, LayoutModes, RetrieveFileOptions, SDK_Globals } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { DcmtOperationTypes, DownloadTypes, SearchResultContext } from "../ts";
|
|
@@ -21,10 +21,11 @@ import { useDcmtOperations } from "./useDcmtOperations";
|
|
|
21
21
|
import useFloatingBarPinnedItems from "./useFloatingBarPinnedItems";
|
|
22
22
|
import { useInputAttachmentsDialog, useInputCvtFormatDialog } from "./useInputDialog";
|
|
23
23
|
import { useRelatedDocuments } from "./useRelatedDocuments";
|
|
24
|
-
import { convertSearchResultDescriptorToFileItems, dcmtsFileCachePreview, getDcmtCicoStatus, getMoreInfoTasksForDocument, IconActivity, IconArchiveDetail, IconArchiveDoc, IconArchiveMaster, IconBatchUpdate, IconCheck, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconCopy, IconCustom, IconDelete, IconDetailDcmts, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconMoveToFolder, IconPair, IconPin, IconPlatform, IconPreview, IconRelation, IconSearch, IconShare, IconSharedDcmt, IconShow, IconSignaturePencil, IconStar, IconSubstFile, IconUndo, IconUnpair, IconUserGroupOutline, isConvertibleToPdfExt, isPdfEditorAvailable, S4T_USER_REGISTRY_MASTER, SDKUI_Globals, SDKUI_Localizator, searchResultToMetadataValues, TMImageLibrary, IconCertificateBadge } from '../helper';
|
|
24
|
+
import { convertSearchResultDescriptorToFileItems, dcmtsFileCachePreview, getDcmtCicoStatus, getMoreInfoTasksForDocument, IconActivity, IconArchiveDetail, IconArchiveDoc, IconArchiveMaster, IconBatchUpdate, IconCheck, IconCheckFile, IconCheckIn, IconCircleInfo, IconCloseCircle, IconConvertFilePdf, IconCopy, IconCustom, IconDelete, IconDetailDcmts, IconDotsVerticalCircleOutline, IconDownload, IconEdit, IconExportTo, IconFileDots, IconHide, IconInfo, IconMenuCAArchive, IconMoveToFolder, IconPair, IconPin, IconPlatform, IconPreview, IconRelation, IconSearch, IconShare, IconSharedDcmt, IconShow, IconSignaturePencil, IconStar, IconSubstFile, IconUndo, IconUnpair, IconUserGroupOutline, isConvertibleToPdfExt, isPdfEditorAvailable, S4T_USER_REGISTRY_MASTER, SDKUI_Globals, SDKUI_Localizator, searchResultToMetadataValues, TMImageLibrary, IconCertificateBadge, IconArchiveMultipleDetailDocuments, isDraftsDTD } from '../helper';
|
|
25
25
|
import { isXMLFileExt } from "../helper/dcmtsHelper";
|
|
26
26
|
import TMCopyToFolderForm from "../components/features/documents/TMCopyToFolderForm";
|
|
27
27
|
import TMMergeToPdfForm from "../components/features/documents/TMMergeToPdfForm";
|
|
28
|
+
import TMMultiMasterDetailDcmtsForm from "../components/features/documents/TMMultiMasterDetailDcmtsForm";
|
|
28
29
|
export const getSelectedDcmtsOrFocused = (selectedItems, focusedItem, fileFormat) => {
|
|
29
30
|
if (selectedItems.length <= 0 && !focusedItem)
|
|
30
31
|
return [];
|
|
@@ -85,7 +86,7 @@ export const useDocumentOperations = (props) => {
|
|
|
85
86
|
const { dataColumns, dataSource, selectedRowKeys, } = exportData ?? {};
|
|
86
87
|
const { visibleItems = [], onRefreshSearchAsyncDatagrid, onRefreshDataRowsAsync, refreshFocusedDataRowAsync, onRefreshBlogDatagrid, onRefreshPreviewDatagrid, refreshOperationsTrigger = 0, onRefreshOperationsDatagrid, } = datagridUtility ?? {};
|
|
87
88
|
const { approvalVID, dcmtDataRowForCicoStatus, selectedDcmtSearchResultRelations, dcmtTIDHasDetailRelations = false, dcmtTIDHasMasterRelations = false, updateCurrentDcmt, onCloseDcmtForm, onRefreshBlogForm, onRefreshPreviewForm, taskFormDialogComponent, s4TViewerDialogComponent } = dcmtUtility ?? {};
|
|
88
|
-
const { floatingBarContainerRef, customButtonsLayout, workingGroupContext, openS4TViewer = false, openDcmtFormAsModal = false, showDcmtFormSidebar = true, allowFloatingBar = true, enablePinIcons = true, allowRelations = true, showTodoDcmtForm = false, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false, editPdfForm = false, inputDcmtFormLayoutMode = LayoutModes.Update, graphometricManager, } = uiConfig;
|
|
89
|
+
const { floatingBarContainerRef, customButtonsLayout, workingGroupContext, openS4TViewer = false, openDcmtFormAsModal = false, showDcmtFormSidebar = true, allowFloatingBar = true, enablePinIcons = true, allowRelations = true, showTodoDcmtForm = false, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false, editPdfForm = false, inputDcmtFormLayoutMode = LayoutModes.Update, graphometricManager, showSelector = false, } = uiConfig;
|
|
89
90
|
const { allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback } = tasks;
|
|
90
91
|
const {
|
|
91
92
|
// Refresh operations (data consistency)
|
|
@@ -108,15 +109,15 @@ export const useDocumentOperations = (props) => {
|
|
|
108
109
|
// Context helpers
|
|
109
110
|
const isDcmtFormContext = context === SearchResultContext.DCMT_FORM;
|
|
110
111
|
const isMasterDetailContext = context === SearchResultContext.MASTER_DETAIL;
|
|
111
|
-
const { showHistory, showHistoryCallback, hideHistoryCallback, showCheckoutInformationForm, commentFormState, hideCommentFormCallback, showCheckoutInformationFormCallback, hideCheckoutInformationFormCallback, copyCheckoutPathToClipboardCallback, handleCheckOutCallback, handleCheckInCallback,
|
|
112
|
+
const { showHistory, showHistoryCallback, hideHistoryCallback, showCheckoutInformationForm, commentFormState, hideCommentFormCallback, showCheckoutInformationFormCallback, hideCheckoutInformationFormCallback, copyCheckoutPathToClipboardCallback, handleCheckOutCallback, handleCheckInCallback, } = useCheckInOutOperations({
|
|
112
113
|
onRefreshPreview: onRefreshPreviewCallback
|
|
113
114
|
});
|
|
114
|
-
const {
|
|
115
|
+
const { downloadDcmtsAsync, runOperationAsync, getDcmtFileAsync, clearDcmtsFileCache, removeDcmtsFileCache, isDcmtFileInCache, FileSourceDialog } = useDcmtOperations();
|
|
115
116
|
const {
|
|
116
117
|
// Data
|
|
117
118
|
relatedDcmts, pairedSearchResults, manyToManyRelations, selectedManyToManyRelation, manyToManyChooserDataSource, relatedDcmtsChooserDataSource,
|
|
118
119
|
// Flags / State booleans
|
|
119
|
-
showRelatedDcmtsChooser, isOpenDetails, isOpenMaster, isOpenArchiveRelationForm, isPairingManyToMany, showManyToManyChooser, showPairSearchModal, currentTIDHasDetailRelations, currentTIDHasMasterRelations, canArchiveMasterRelation, canArchiveDetailRelation, hasManyToManyRelation, showPairDcmtsModal,
|
|
120
|
+
showRelatedDcmtsChooser, isOpenDetails, isOpenMaster, isOpenArchiveRelationForm, isPairingManyToMany, showManyToManyChooser, showPairSearchModal, currentTIDHasDetailRelations, currentTIDHasMasterRelations, canArchiveMasterRelation, canArchiveDetailRelation, hasManyToManyRelation, showPairDcmtsModal, backToPairSearchModal,
|
|
120
121
|
// Pair search modal state
|
|
121
122
|
pairSearchModalTargetTID, pairSearchModalParentTID, pairSearchModalParentDID, pairSearchModalRelation, pairSearchModalInputMids,
|
|
122
123
|
// Config
|
|
@@ -149,9 +150,16 @@ export const useDocumentOperations = (props) => {
|
|
|
149
150
|
const [showFloatingBar, setShowFloatingBar] = useState(allowFloatingBar);
|
|
150
151
|
const [isOpenDcmtForm, setIsOpenDcmtForm] = useState(false);
|
|
151
152
|
const [dcmtFormLayoutMode, setDcmtFormLayoutMode] = useState(LayoutModes.Update);
|
|
153
|
+
/**
|
|
154
|
+
* Il form del documento è a popup: si sovrappone a chi lo ha aperto, che resta visibile sotto e non
|
|
155
|
+
* va nascosto. Oltre ai contesti che lo chiedono (openDcmtFormAsModal) è il caso della duplicazione,
|
|
156
|
+
* che parte da un documento a video (LayoutModes.Ark con un DID) per proporne uno nuovo da archiviare.
|
|
157
|
+
*/
|
|
158
|
+
const isDcmtFormModal = openDcmtFormAsModal || (dcmtFormLayoutMode === LayoutModes.Ark && focusedItem?.DID !== undefined);
|
|
152
159
|
const [currentCustomButton, setCurrentCustomButton] = useState();
|
|
153
160
|
// State to control the visibility of the details form
|
|
154
161
|
const [showSearchTMDatagrid, setShowSearchTMDatagrid] = useState(false);
|
|
162
|
+
const [showDcmtTypesSelection, setShowDcmtTypesSelection] = useState(false);
|
|
155
163
|
const [secondaryMasterDcmts, setSecondaryMasterDcmts] = useState([]);
|
|
156
164
|
const [isOpenSharedArchive, setIsOpenSharedArchive] = useState(false);
|
|
157
165
|
const [sharedDcmtFile, setSharedDcmtFile] = useState(undefined);
|
|
@@ -169,8 +177,15 @@ export const useDocumentOperations = (props) => {
|
|
|
169
177
|
// State to control modal opening for master/detail documents
|
|
170
178
|
const [isOpenDetailsModal, setIsOpenDetailsModal] = useState(false);
|
|
171
179
|
const [isOpenMasterModal, setIsOpenMasterModal] = useState(false);
|
|
172
|
-
const
|
|
173
|
-
|
|
180
|
+
const [isOpenMultiDetailModal, setIsOpenMultiDetailModal] = useState(false);
|
|
181
|
+
// La maschera delle correlazioni viene montata subito (parte il calcolo, con il wait panel)
|
|
182
|
+
// ma resa visibile (isOpen...) solo a calcolo finito: intanto sotto restano i risultati.
|
|
183
|
+
const [isMountedDetails, setIsMountedDetails] = useState(false);
|
|
184
|
+
const [isMountedMaster, setIsMountedMaster] = useState(false);
|
|
185
|
+
const openDetailDcmtsFormHandler = (value) => { setIsMountedDetails(value); if (!value)
|
|
186
|
+
setIsOpenDetails(false); };
|
|
187
|
+
const openMasterDcmtsFormHandler = (value) => { setIsMountedMaster(value); if (!value)
|
|
188
|
+
setIsOpenMaster(false); };
|
|
174
189
|
const openDetailDcmtsModalHandler = (value) => { setIsOpenDetailsModal(value); };
|
|
175
190
|
const openMasterDcmtsModalHandler = (value) => { setIsOpenMasterModal(value); };
|
|
176
191
|
// State to control whether the export form (for exporting to Excel/CSV/txt and others) should be shown
|
|
@@ -755,6 +770,7 @@ export const useDocumentOperations = (props) => {
|
|
|
755
770
|
id: 'cico',
|
|
756
771
|
icon: _jsx(IconFileDots, {}),
|
|
757
772
|
name: "Check in/Check out",
|
|
773
|
+
visible: !isDraftsDTD(dtd), // Non disponibile per le bozze dei gruppi di lavoro
|
|
758
774
|
disabled: dcmt === undefined || isDisabledForSingleRow(),
|
|
759
775
|
submenu: [
|
|
760
776
|
{
|
|
@@ -877,6 +893,7 @@ export const useDocumentOperations = (props) => {
|
|
|
877
893
|
name: SDKUI_Localizator.Relations,
|
|
878
894
|
operationType: 'multiRow',
|
|
879
895
|
disabled: isDisabledForMultiRow(),
|
|
896
|
+
visible: !isDraftsDTD(dtd), // Non disponibile per le bozze dei gruppi di lavoro
|
|
880
897
|
submenu: [
|
|
881
898
|
{
|
|
882
899
|
id: 'rel-pair',
|
|
@@ -907,10 +924,18 @@ export const useDocumentOperations = (props) => {
|
|
|
907
924
|
id: 'rel-ark-det',
|
|
908
925
|
icon: _jsx(IconArchiveDetail, {}),
|
|
909
926
|
name: SDKUI_Localizator.ArchiveDetailDocument,
|
|
910
|
-
operationType: '
|
|
911
|
-
disabled: canArchiveDetailRelation !== true,
|
|
927
|
+
operationType: 'singleRow',
|
|
928
|
+
disabled: canArchiveDetailRelation !== true || isDisabledForMultiRow(),
|
|
912
929
|
onClick: async () => await archiveDetailDocuments(selectedDcmtInfos?.[0]?.TID)
|
|
913
930
|
},
|
|
931
|
+
{
|
|
932
|
+
id: 'multi-detail',
|
|
933
|
+
icon: _jsx(IconArchiveMultipleDetailDocuments, {}),
|
|
934
|
+
name: SDKUI_Localizator.ArchiveMultipleDetailDocuments,
|
|
935
|
+
operationType: 'singleRow',
|
|
936
|
+
disabled: canArchiveDetailRelation !== true || isDisabledForMultiRow(),
|
|
937
|
+
onClick: () => setIsOpenMultiDetailModal(true),
|
|
938
|
+
},
|
|
914
939
|
{
|
|
915
940
|
id: 'rel-mst',
|
|
916
941
|
icon: _jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' }),
|
|
@@ -1054,6 +1079,7 @@ export const useDocumentOperations = (props) => {
|
|
|
1054
1079
|
]
|
|
1055
1080
|
};
|
|
1056
1081
|
};
|
|
1082
|
+
const canToggleDcmtTypesSelection = !isMobile && showSelector && currentSearchResults?.length === 1;
|
|
1057
1083
|
const otherOperationsMenuItem = () => {
|
|
1058
1084
|
return {
|
|
1059
1085
|
id: 'oth',
|
|
@@ -1085,7 +1111,15 @@ export const useDocumentOperations = (props) => {
|
|
|
1085
1111
|
disabled: false,
|
|
1086
1112
|
onClick: () => setShowFloatingBar(prev => !prev)
|
|
1087
1113
|
}]
|
|
1088
|
-
: [])
|
|
1114
|
+
: []),
|
|
1115
|
+
{
|
|
1116
|
+
id: 'oth-dcmt-types',
|
|
1117
|
+
icon: showDcmtTypesSelection ? _jsx(IconHide, {}) : _jsx(IconShow, {}),
|
|
1118
|
+
name: showDcmtTypesSelection ? SDKUI_Localizator.HideDcmtTypes : SDKUI_Localizator.ShowDcmtTypes,
|
|
1119
|
+
visible: canToggleDcmtTypesSelection,
|
|
1120
|
+
disabled: false,
|
|
1121
|
+
onClick: () => setShowDcmtTypesSelection(prev => !prev)
|
|
1122
|
+
}
|
|
1089
1123
|
]
|
|
1090
1124
|
};
|
|
1091
1125
|
};
|
|
@@ -1345,6 +1379,10 @@ export const useDocumentOperations = (props) => {
|
|
|
1345
1379
|
dcmtUtility,
|
|
1346
1380
|
fetchRemoteCertificates
|
|
1347
1381
|
};
|
|
1382
|
+
// Navigazione del master nell'archiviazione multipla dei dettagli: il modale prende il documento
|
|
1383
|
+
// con il focus, quindi le frecce hanno senso solo senza selezione a checkbox, che ha la precedenza
|
|
1384
|
+
// sul focus e terrebbe il master fermo (vedi getSelectedDcmtsOrFocused)
|
|
1385
|
+
const canNavigateMultiDetailMaster = !!canNavigateHandler && !!onNavigateHandler && selectedItems.length === 0 && selectedDcmtInfos.length === 1;
|
|
1348
1386
|
const masterDetailMasterCommonProps = {
|
|
1349
1387
|
deviceType,
|
|
1350
1388
|
isForMaster: true,
|
|
@@ -1373,15 +1411,16 @@ export const useDocumentOperations = (props) => {
|
|
|
1373
1411
|
dcmtUtility,
|
|
1374
1412
|
fetchRemoteCertificates
|
|
1375
1413
|
};
|
|
1376
|
-
const renderDcmtOperations = (_jsxs(_Fragment, { children: [(showExportForm && searchResult && dataColumns && dataSource && selectedRowKeys) && (_jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: () => setShowExportForm(false), searchResult: searchResult })), _jsx(StyledMultiViewPanel, {
|
|
1377
|
-
_jsx(TMDcmtForm, { isModal:
|
|
1414
|
+
const renderDcmtOperations = (_jsxs(_Fragment, { children: [(showExportForm && searchResult && dataColumns && dataSource && selectedRowKeys) && (_jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: () => setShowExportForm(false), searchResult: searchResult })), _jsx(StyledMultiViewPanel, { $isVisible: isOpenDcmtForm && !isDcmtFormModal, children: ((isOpenDcmtForm && focusedItem?.TID !== undefined && focusedItem?.DID !== undefined) &&
|
|
1415
|
+
_jsx(TMDcmtForm, { isModal: isDcmtFormModal, titleModal: dtd?.name ?? '', TID: focusedItem.TID, DID: focusedItem.DID, allowButtonsRefs: true, showTodoDcmtForm: showTodoDcmtForm, layoutMode: dcmtFormLayoutMode, count: visibleItems?.length, itemIndex: visibleItems ? visibleItems.findIndex(o => o.rowIndex === focusedItem?.rowIndex) + 1 : undefined, canNext: canNavigateHandler ? canNavigateHandler('next') : false, canPrev: canNavigateHandler ? canNavigateHandler('prev') : false, onNext: () => onNavigateHandler && onNavigateHandler('next'), onPrev: () => onNavigateHandler && onNavigateHandler('prev'), onClose: () => { (false); onDcmtFormOpenChange(false, LayoutModes.Update); }, onWFOperationCompleted: onWFOperationCompleted, onTaskCreateRequest: onTaskCreateRequest, onSavedAsyncCallback: onSavedAsyncCallback, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, editPdfForm: editPdfForm, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openFileUploaderPdfEditor: openFileUploaderPdfEditor, onReferenceClick: onReferenceClick, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, focusedItem?.TID, focusedItem?.DID), showDcmtFormSidebar: showDcmtFormSidebar, datagridUtility: {
|
|
1378
1416
|
onRefreshSearchAsyncDatagrid,
|
|
1379
1417
|
onRefreshDataRowsAsync,
|
|
1380
1418
|
refreshFocusedDataRowAsync,
|
|
1381
1419
|
onRefreshBlogDatagrid,
|
|
1382
1420
|
onRefreshPreviewDatagrid
|
|
1383
1421
|
}, fetchRemoteCertificates: fetchRemoteCertificates, graphometricManager: graphometricManager })) }), (showHistory && dtd && selectedDcmtInfos.length > 0) && _jsx(TMViewHistoryDcmt, { fromDTD: dtd, deviceType: deviceType, inputDcmt: selectedDcmtInfos[0], onClose: hideHistoryCallback, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (commentFormState.show && selectedDcmtInfos.length > 0) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid: selectedDcmtInfos[0].TID, did: selectedDcmtInfos[0].DID } }, onClose: hideCommentFormCallback, refreshCallback: onRefreshBlog, participants: [], showAttachmentsSection: true, allArchivedDocumentsFileItems: convertSearchResultDescriptorToFileItems(currentSearchResults ?? []), isCommentRequired: commentFormState.isRequired, removeAndEditAttachment: commentFormState.removeAndEditAttachment, selectedAttachmentDid: [Number(selectedDcmtInfos[0].DID)] }), (showCheckoutInformationForm && dtd && selectedDcmtInfos.length > 0) &&
|
|
1384
|
-
_jsx(TMDcmtCheckoutInfoForm, { dtdName: dtd.name ?? SDKUI_Localizator.SearchResult, selectedDcmtOrFocused: selectedDcmtInfos[0], onClose: hideCheckoutInformationFormCallback }), isOpenDetailsModal && _jsx(TMModal, { width: "95%", height: "95%", onClose: () => setIsOpenDetailsModal(false), title: SDKUI_Localizator.Relations, children: _jsx(TMMasterDetailDcmts, { ...masterDetailDetailsCommonProps, onBack: () => setIsOpenDetailsModal(false) }) }), _jsx(StyledMultiViewPanel, {
|
|
1422
|
+
_jsx(TMDcmtCheckoutInfoForm, { dtdName: dtd.name ?? SDKUI_Localizator.SearchResult, selectedDcmtOrFocused: selectedDcmtInfos[0], onClose: hideCheckoutInformationFormCallback }), isOpenDetailsModal && _jsx(TMModal, { width: "95%", height: "95%", onClose: () => setIsOpenDetailsModal(false), title: SDKUI_Localizator.Relations, children: _jsx(TMMasterDetailDcmts, { ...masterDetailDetailsCommonProps, onBack: () => setIsOpenDetailsModal(false) }) }), _jsx(StyledMultiViewPanel, { $isVisible: isOpenDetails, children: isMountedDetails && _jsx(TMMasterDetailDcmts, { ...masterDetailDetailsCommonProps, onFirstLoadCompleted: () => setIsOpenDetails(true), onBack: () => openDetailDcmtsFormHandler(false) }) }), (isOpenMultiDetailModal && dtd) &&
|
|
1423
|
+
_jsx(TMMultiMasterDetailDcmtsForm, { dtd: dtd, masterDcmt: selectedDcmtInfos[0], onClose: () => setIsOpenMultiDetailModal(false), canNavigateMaster: canNavigateMultiDetailMaster ? canNavigateHandler : undefined, onNavigateMaster: canNavigateMultiDetailMaster ? onNavigateHandler : undefined, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, showDcmtFormSidebar: showDcmtFormSidebar, showTodoDcmtForm: showTodoDcmtForm, openFileUploaderPdfEditor: openFileUploaderPdfEditor, graphometricManager: graphometricManager, editPdfForm: editPdfForm, openS4TViewer: openS4TViewer, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal, fetchRemoteCertificates: fetchRemoteCertificates, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, onReferenceClick: onReferenceClick, onTaskCreateRequest: onTaskCreateRequest, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onFileOpened: onFileOpened, passToArchiveCallback: passToArchiveCallback, openWGsCopyMoveForm: openWGsCopyMoveForm }), isOpenMasterModal && _jsx(TMModal, { width: "95%", height: "95%", onClose: () => setIsOpenMasterModal(false), title: SDKUI_Localizator.Relations, children: _jsx(TMMasterDetailDcmts, { ...masterDetailMasterCommonProps, onBack: () => setIsOpenMasterModal(false) }) }), _jsxs(StyledMultiViewPanel, { $isVisible: isOpenMaster, children: [isMountedMaster && _jsx(TMMasterDetailDcmts, { ...masterDetailMasterCommonProps, onFirstLoadCompleted: () => setIsOpenMaster(true), onBack: () => openMasterDcmtsFormHandler(false) }), secondaryMasterDcmts.length > 0 && secondaryMasterDcmts.map((dcmt, index) => {
|
|
1385
1424
|
return (_jsx(StyledModalContainer, { style: { backgroundColor: 'white' }, children: _jsx(TMMasterDetailDcmts, { ...masterDetailMasterCommonProps, inputDcmts: [dcmt], allowNavigation: false, onBack: () => handleRemoveItem(dcmt.TID, dcmt.DID) }) }, `${index}-${dcmt.DID}`));
|
|
1386
1425
|
})] }), isOpenArchiveRelationForm && _jsx(TMDcmtForm, { isModal: true, titleModal: SDKUI_Localizator.Archive + ' - ' + (archiveType === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster), TID: archiveRelatedDcmtFormTID, layoutMode: LayoutModes.Ark, inputMids: archiveRelatedDcmtFormMids, showBackButton: false, allowButtonsRefs: false, onClose: () => {
|
|
1387
1426
|
setIsOpenArchiveRelationForm(false);
|
|
@@ -1389,10 +1428,15 @@ export const useDocumentOperations = (props) => {
|
|
|
1389
1428
|
setArchiveRelatedDcmtFormTID(undefined);
|
|
1390
1429
|
setArchiveRelatedDcmtFormMids([]);
|
|
1391
1430
|
}, onSavedAsyncCallback: async (tid, did, metadataResult) => {
|
|
1431
|
+
const originDcmt = selectedDcmtInfos?.[0];
|
|
1392
1432
|
setIsOpenArchiveRelationForm(false);
|
|
1393
1433
|
setArchiveType(undefined);
|
|
1394
1434
|
setArchiveRelatedDcmtFormTID(undefined);
|
|
1395
1435
|
setArchiveRelatedDcmtFormMids([]);
|
|
1436
|
+
if (refreshFocusedDataRowAsync && originDcmt?.TID && originDcmt?.DID) {
|
|
1437
|
+
await refreshFocusedDataRowAsync(originDcmt.TID, originDcmt.DID, true);
|
|
1438
|
+
return;
|
|
1439
|
+
}
|
|
1396
1440
|
await onRefreshSearchAsyncDatagrid?.();
|
|
1397
1441
|
}, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, showDcmtFormSidebar: showDcmtFormSidebar, openFileUploaderPdfEditor: openFileUploaderPdfEditor, showTodoDcmtForm: showTodoDcmtForm, graphometricManager: graphometricManager }), showRelatedDcmtsChooser &&
|
|
1398
1442
|
_jsx(TMChooserForm, { dataSource: relatedDcmtsChooserDataSource, onChoose: async (selectedRelation) => {
|
|
@@ -1427,8 +1471,8 @@ export const useDocumentOperations = (props) => {
|
|
|
1427
1471
|
TMSpinner.hide();
|
|
1428
1472
|
}
|
|
1429
1473
|
}, onClose: () => setShowManyToManyChooser(false), manageUseLocalizedName: false }), showPairDcmtsModal &&
|
|
1430
|
-
_jsx(TMModal, { title:
|
|
1431
|
-
_jsx(TMModal, { title:
|
|
1474
|
+
_jsx(TMModal, { title: isPairingManyToMany ? SDKUI_Localizator.MatchDcmts : SDKUI_Localizator.UnmatchDcmts, onClose: () => setShowPairDcmtsModal(false), width: '95%', height: '95%', children: _jsx(TMSearchResult, { searchResults: pairedSearchResults, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onRefreshSearchAsyncDatagrid: onRefreshSearchAsyncDatagrid, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, editPdfForm: editPdfForm, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, passToArchiveCallback: passToArchiveCallback, showTodoDcmtForm: showTodoDcmtForm, allowFloatingBar: false, floatingActionConfig: pairFloatingActionConfig, showBackButton: backToPairSearchModal !== undefined, onClose: backToPairSearchModal, backCaption: SDKUI_Localizator.BackToSearch, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter, fetchRemoteCertificates: fetchRemoteCertificates }) }), showPairSearchModal &&
|
|
1475
|
+
_jsx(TMModal, { title: SDKUI_Localizator.Search_Dcmts, onClose: () => setShowPairSearchModal(false), width: '95%', height: '95%', children: _jsx(TMSearch, { onlyShowSearchQueryPanel: true, inputTID: pairSearchModalTargetTID, inputMids: pairSearchModalInputMids, floatingActionConfig: pairSearchModalFloatingActionConfig, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenSharedArchive && _jsx(TMModal, { title: SDKUI_Localizator.SharedArchiving, onClose: () => {
|
|
1432
1476
|
setIsOpenSharedArchive(false);
|
|
1433
1477
|
}, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMArchive, { inputDID: selectedDcmtInfos?.[0].DID, inputTID: selectedDcmtInfos?.[0].TID, inputMids: currentMetadataValues.filter(md => md.mid && md.mid > 100).map(md => ({ mid: md.mid, value: md.value ?? '' })), isSharedArchive: true, inputFile: sharedDcmtFile, onSavedAsyncCallback: async (tid, did) => {
|
|
1434
1478
|
setIsOpenSharedArchive(false);
|
|
@@ -1446,14 +1490,17 @@ export const useDocumentOperations = (props) => {
|
|
|
1446
1490
|
} }))] }));
|
|
1447
1491
|
return {
|
|
1448
1492
|
operationItems: operationItems(),
|
|
1493
|
+
selectedDcmtInfos,
|
|
1449
1494
|
renderFloatingBar,
|
|
1450
1495
|
renderDcmtOperations,
|
|
1451
1496
|
features: {
|
|
1452
1497
|
isOpenDcmtForm,
|
|
1498
|
+
isDcmtFormModal,
|
|
1453
1499
|
openFormHandler,
|
|
1454
1500
|
dcmtFormLayoutMode,
|
|
1455
1501
|
onDcmtFormOpenChange,
|
|
1456
1502
|
showSearchTMDatagrid,
|
|
1503
|
+
showDcmtTypesSelection,
|
|
1457
1504
|
showExportForm,
|
|
1458
1505
|
isOpenBatchUpdate,
|
|
1459
1506
|
isModifiedBatchUpdate,
|
|
@@ -1472,25 +1519,8 @@ export const useDocumentOperations = (props) => {
|
|
|
1472
1519
|
copyCheckoutPathToClipboardCallback,
|
|
1473
1520
|
handleCheckOutCallback,
|
|
1474
1521
|
handleCheckInCallback,
|
|
1475
|
-
showCicoWaitPanel,
|
|
1476
|
-
cicoWaitPanelTitle,
|
|
1477
|
-
showCicoPrimaryProgress,
|
|
1478
|
-
cicoPrimaryProgressText,
|
|
1479
|
-
cicoPrimaryProgressValue,
|
|
1480
|
-
cicoPrimaryProgressMax,
|
|
1481
1522
|
},
|
|
1482
1523
|
dcmtOperations: {
|
|
1483
|
-
abortController,
|
|
1484
|
-
showWaitPanel,
|
|
1485
|
-
showPrimary,
|
|
1486
|
-
waitPanelTitle,
|
|
1487
|
-
waitPanelTextPrimary,
|
|
1488
|
-
waitPanelValuePrimary,
|
|
1489
|
-
waitPanelMaxValuePrimary,
|
|
1490
|
-
showSecondary,
|
|
1491
|
-
waitPanelTextSecondary,
|
|
1492
|
-
waitPanelValueSecondary,
|
|
1493
|
-
waitPanelMaxValueSecondary,
|
|
1494
1524
|
downloadDcmtsAsync,
|
|
1495
1525
|
getDcmtFileAsync,
|
|
1496
1526
|
clearDcmtsFileCache,
|
|
@@ -1521,6 +1551,7 @@ export const useDocumentOperations = (props) => {
|
|
|
1521
1551
|
canArchiveDetailRelation,
|
|
1522
1552
|
hasManyToManyRelation,
|
|
1523
1553
|
showPairDcmtsModal,
|
|
1554
|
+
backToPairSearchModal,
|
|
1524
1555
|
// Pair search modal state
|
|
1525
1556
|
pairSearchModalTargetTID,
|
|
1526
1557
|
pairSearchModalParentTID,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { FileFormats } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { TMModal, TMRadioButton, TMButton, TMChooserForm } from "../components";
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { DcmtTypeDescriptor, RelationDescriptor, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
|
|
2
|
+
import { IColumnProps } from 'devextreme-react/data-grid';
|
|
3
|
+
import { DcmtInfo, MetadataValueDescriptorEx } from '../ts';
|
|
4
|
+
import { AccordionSection, ArchiveRow, ArchiveRowChanges, DetailRelationItem, MetadataScalarValue } from '../components/features/documents/TMMultiMasterDetailDcmtsUtils';
|
|
5
|
+
/** Fasi del flusso di archiviazione multipla dei dettagli */
|
|
6
|
+
export declare enum MultiDetailArchivePhase {
|
|
7
|
+
/** Scelta del tipo documento */
|
|
8
|
+
SelectDcmtType = 0,
|
|
9
|
+
/** Riepilogo delle archiviazioni */
|
|
10
|
+
ArchiveSummary = 1
|
|
11
|
+
}
|
|
12
|
+
/** Riga di riepilogo: definita con i tipi della feature (vedi TMMultiMasterDetailDcmtsUtils) */
|
|
13
|
+
export type { ArchiveRow };
|
|
14
|
+
/** Coppia mid/valore per pre-compilare il form */
|
|
15
|
+
export type MidValue = {
|
|
16
|
+
mid: number;
|
|
17
|
+
value: string;
|
|
18
|
+
};
|
|
19
|
+
interface UseMultiMasterDetailDcmtsParams {
|
|
20
|
+
/** Tipo documento del master */
|
|
21
|
+
dtd: DcmtTypeDescriptor;
|
|
22
|
+
/** Documento master da cui parte l'archiviazione dei dettagli */
|
|
23
|
+
masterDcmt: DcmtInfo;
|
|
24
|
+
/** Chiusura del modale */
|
|
25
|
+
onClose: () => void;
|
|
26
|
+
/** true se nella lista di provenienza c'è un documento precedente/successivo su cui spostare il master */
|
|
27
|
+
canNavigateMaster?: (dir: 'next' | 'prev') => boolean;
|
|
28
|
+
/** Sposta il focus della lista di provenienza: il master arriva da lì e cambia da sé (vedi masterDcmt) */
|
|
29
|
+
onNavigateMaster?: (dir: 'next' | 'prev') => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Logica dell'archiviazione multipla dei dettagli: relazioni, sezioni, righe del riepilogo e
|
|
33
|
+
* archiviazione. Il rendering sta in TMMultiMasterDetailDcmtsForm
|
|
34
|
+
*/
|
|
35
|
+
export declare const useMultiMasterDetailDcmts: ({ dtd, masterDcmt, onClose, canNavigateMaster, onNavigateMaster }: UseMultiMasterDetailDcmtsParams) => {
|
|
36
|
+
isLoading: boolean;
|
|
37
|
+
isSummaryReady: boolean;
|
|
38
|
+
phase: MultiDetailArchivePhase;
|
|
39
|
+
setPhase: import("react").Dispatch<import("react").SetStateAction<MultiDetailArchivePhase>>;
|
|
40
|
+
detailRelationItems: DetailRelationItem[];
|
|
41
|
+
selectedRelation: RelationDescriptor | undefined;
|
|
42
|
+
selectedItem: DetailRelationItem | undefined;
|
|
43
|
+
hasMultipleTypes: boolean;
|
|
44
|
+
selectRelation: (item: DetailRelationItem) => void;
|
|
45
|
+
backToTypeSelection: () => void;
|
|
46
|
+
isBackLocked: boolean;
|
|
47
|
+
closeModal: () => void;
|
|
48
|
+
isMasterNavigationEnabled: boolean;
|
|
49
|
+
canNavigateMasterPrev: boolean;
|
|
50
|
+
canNavigateMasterNext: boolean;
|
|
51
|
+
navigateMaster: (dir: 'next' | 'prev') => void;
|
|
52
|
+
sectionsOpen: Record<AccordionSection, boolean>;
|
|
53
|
+
setSectionOpen: (section: AccordionSection, isOpen: boolean) => void;
|
|
54
|
+
openAllSections: () => void;
|
|
55
|
+
clearLayout: () => void;
|
|
56
|
+
layoutResetToken: number;
|
|
57
|
+
hasSavedLayout: boolean;
|
|
58
|
+
setHasSavedLayout: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
59
|
+
canUpdateMaster: boolean;
|
|
60
|
+
masterFieldsCount: number;
|
|
61
|
+
getMasterMetadataAsync: () => Promise<Map<number, MetadataScalarValue>>;
|
|
62
|
+
masterInfoReloadToken: number;
|
|
63
|
+
isOpenMasterForm: boolean;
|
|
64
|
+
setIsOpenMasterForm: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
65
|
+
handleMasterSavedAsync: () => Promise<void>;
|
|
66
|
+
archivedDetailResults: SearchResultDescriptor[];
|
|
67
|
+
archivedDetailsCount: number;
|
|
68
|
+
isLoadingArchivedDetails: boolean;
|
|
69
|
+
refreshArchivedDetailsAsync: () => Promise<void>;
|
|
70
|
+
detailColumns: IColumnProps[];
|
|
71
|
+
detailSupportsFile: boolean;
|
|
72
|
+
archiveRows: ArchiveRow[];
|
|
73
|
+
currentRows: ArchiveRow[];
|
|
74
|
+
focusedRowKey: number | undefined;
|
|
75
|
+
setFocusedRowKey: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
|
|
76
|
+
selectedRowKeys: number[];
|
|
77
|
+
setSelectedRowKeys: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
78
|
+
isOpenAddForm: boolean;
|
|
79
|
+
editingRowId: number | undefined;
|
|
80
|
+
editingRow: ArchiveRow | undefined;
|
|
81
|
+
formInputMids: MidValue[];
|
|
82
|
+
openAddForm: () => void;
|
|
83
|
+
openEditForm: (row: ArchiveRow | undefined) => void;
|
|
84
|
+
closeAddForm: () => void;
|
|
85
|
+
deleteRow: (row: ArchiveRow | undefined) => void;
|
|
86
|
+
duplicateRow: (row: ArchiveRow | undefined) => void;
|
|
87
|
+
upsertRow: (values: Array<MetadataValueDescriptorEx>, file: File | undefined) => void;
|
|
88
|
+
updateRowValues: (rowId: number, changes: ArchiveRowChanges) => void;
|
|
89
|
+
copyArchivedDetailToRows: (dcmt: {
|
|
90
|
+
TID?: number | string;
|
|
91
|
+
DID?: number | string;
|
|
92
|
+
FILEEXT?: string;
|
|
93
|
+
} | undefined) => Promise<void>;
|
|
94
|
+
stopOnFirstError: boolean;
|
|
95
|
+
setStopOnFirstError: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
96
|
+
isArchiving: boolean;
|
|
97
|
+
archiveAllAsync: () => Promise<void>;
|
|
98
|
+
};
|