@topconsultnpm/sdkui-react 6.22.0-dev2.9 → 6.22.0-dev3.3
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 +14 -14
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +6 -6
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +31 -31
- package/lib/components/base/Styled.d.ts +4 -4
- package/lib/components/base/TMAccordionNew.js +7 -7
- package/lib/components/base/TMAlert.d.ts +32 -32
- package/lib/components/base/TMAreaManager.js +1 -1
- package/lib/components/base/TMButton.js +4 -4
- package/lib/components/base/TMClosableList.js +3 -3
- package/lib/components/base/TMCustomButton.js +1 -1
- package/lib/components/base/TMDataGrid.d.ts +4 -0
- package/lib/components/base/TMDataGrid.js +290 -10
- 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 +4 -2
- 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.js +2 -2
- package/lib/components/base/TMTab.js +2 -2
- 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.js +110 -69
- package/lib/components/base/TMWaitPanel.js +2 -2
- 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/TMQuickSearchInfo.d.ts +12 -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/TMDropDown.d.ts +3 -0
- package/lib/components/editors/TMDropDown.js +197 -5
- package/lib/components/editors/TMEditorStyled.d.ts +10 -10
- 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/TMMetadataValues.js +2 -2
- package/lib/components/editors/TMRadioButton.js +2 -2
- package/lib/components/editors/TMSummary.js +3 -3
- package/lib/components/editors/TMTextArea.js +3 -3
- package/lib/components/editors/TMTextBox.js +3 -3
- package/lib/components/editors/TMTextExpression.js +1 -1
- package/lib/components/features/archive/TMArchive.js +17 -3
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
- package/lib/components/features/assistant/TMToppySpeechBubble.js +1 -1
- package/lib/components/features/documents/TMBatchUpdateForm.js +20 -6
- 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 +180 -53
- 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.js +5 -3
- package/lib/components/features/documents/TMDcmtPreview.js +12 -8
- package/lib/components/features/documents/TMDownloadRelationViewerSection.js +1 -1
- package/lib/components/features/documents/TMFileUploader.js +3 -3
- package/lib/components/features/documents/TMMasterDetailDcmts.js +96 -34
- package/lib/components/features/documents/TMMasterInfoFields.d.ts +19 -0
- package/lib/components/features/documents/TMMasterInfoFields.js +184 -0
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +30 -5
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +45 -0
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +323 -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 +14 -1
- package/lib/components/features/documents/TMRelationViewer.js +71 -22
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +1 -1
- 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.js +78 -12
- package/lib/components/features/search/TMSearchQueryEditor.js +7 -5
- package/lib/components/features/search/TMSearchQueryPanel.d.ts +4 -0
- package/lib/components/features/search/TMSearchQueryPanel.js +142 -68
- package/lib/components/features/search/TMSearchResult.d.ts +16 -0
- package/lib/components/features/search/TMSearchResult.js +431 -110
- package/lib/components/features/search/TMSignatureInfoContent.js +1 -1
- package/lib/components/features/search/TMTreeSelector.js +109 -64
- 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 +4 -4
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +1 -1
- 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/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/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 +31 -4
- 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/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 +2 -2
- 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 +1 -1
- package/lib/components/query/TMQueryCountButton.js +1 -1
- package/lib/components/query/TMQueryEditor.js +7 -7
- package/lib/components/sidebar/TMCommandsPanel.js +1 -1
- package/lib/components/sidebar/TMHeader.js +36 -26
- 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/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 +731 -687
- package/lib/helper/SDKUI_Localizator.js +440 -0
- package/lib/helper/TMAppUpdatedModal.d.ts +1 -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 +13 -0
- package/lib/helper/TMUtils.js +25 -3
- 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 +20 -0
- package/lib/helper/dcmtsHelper.js +58 -1
- package/lib/helper/helpers.d.ts +12 -1
- package/lib/helper/helpers.js +27 -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/useDataUserIdItem.d.ts +1 -0
- package/lib/hooks/useDataUserIdItem.js +1 -0
- package/lib/hooks/useDocumentOperations.d.ts +4 -0
- package/lib/hooks/useDocumentOperations.js +53 -11
- package/lib/hooks/useInputDialog.js +1 -1
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +113 -0
- package/lib/hooks/useMultiMasterDetailDcmts.js +760 -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/index.d.ts +2 -0
- package/lib/index.js +5 -2
- package/lib/services/caseflow/CaseFlowService.d.ts +247 -0
- package/lib/services/caseflow/CaseFlowService.js +720 -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 +71 -68
|
@@ -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 [];
|
|
@@ -116,7 +117,7 @@ export const useDocumentOperations = (props) => {
|
|
|
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,6 +177,7 @@ 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);
|
|
180
|
+
const [isOpenMultiDetailModal, setIsOpenMultiDetailModal] = useState(false);
|
|
172
181
|
const openDetailDcmtsFormHandler = (value) => { setIsOpenDetails(value); };
|
|
173
182
|
const openMasterDcmtsFormHandler = (value) => { setIsOpenMaster(value); };
|
|
174
183
|
const openDetailDcmtsModalHandler = (value) => { setIsOpenDetailsModal(value); };
|
|
@@ -755,6 +764,7 @@ export const useDocumentOperations = (props) => {
|
|
|
755
764
|
id: 'cico',
|
|
756
765
|
icon: _jsx(IconFileDots, {}),
|
|
757
766
|
name: "Check in/Check out",
|
|
767
|
+
visible: !isDraftsDTD(dtd), // Non disponibile per le bozze dei gruppi di lavoro
|
|
758
768
|
disabled: dcmt === undefined || isDisabledForSingleRow(),
|
|
759
769
|
submenu: [
|
|
760
770
|
{
|
|
@@ -877,6 +887,7 @@ export const useDocumentOperations = (props) => {
|
|
|
877
887
|
name: SDKUI_Localizator.Relations,
|
|
878
888
|
operationType: 'multiRow',
|
|
879
889
|
disabled: isDisabledForMultiRow(),
|
|
890
|
+
visible: !isDraftsDTD(dtd), // Non disponibile per le bozze dei gruppi di lavoro
|
|
880
891
|
submenu: [
|
|
881
892
|
{
|
|
882
893
|
id: 'rel-pair',
|
|
@@ -907,10 +918,18 @@ export const useDocumentOperations = (props) => {
|
|
|
907
918
|
id: 'rel-ark-det',
|
|
908
919
|
icon: _jsx(IconArchiveDetail, {}),
|
|
909
920
|
name: SDKUI_Localizator.ArchiveDetailDocument,
|
|
910
|
-
operationType: '
|
|
911
|
-
disabled: canArchiveDetailRelation !== true,
|
|
921
|
+
operationType: 'singleRow',
|
|
922
|
+
disabled: canArchiveDetailRelation !== true || isDisabledForMultiRow(),
|
|
912
923
|
onClick: async () => await archiveDetailDocuments(selectedDcmtInfos?.[0]?.TID)
|
|
913
924
|
},
|
|
925
|
+
{
|
|
926
|
+
id: 'multi-detail',
|
|
927
|
+
icon: _jsx(IconArchiveMultipleDetailDocuments, {}),
|
|
928
|
+
name: SDKUI_Localizator.ArchiveMultipleDetailDocuments,
|
|
929
|
+
operationType: 'singleRow',
|
|
930
|
+
disabled: canArchiveDetailRelation !== true || isDisabledForMultiRow(),
|
|
931
|
+
onClick: () => setIsOpenMultiDetailModal(true),
|
|
932
|
+
},
|
|
914
933
|
{
|
|
915
934
|
id: 'rel-mst',
|
|
916
935
|
icon: _jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' }),
|
|
@@ -1054,6 +1073,7 @@ export const useDocumentOperations = (props) => {
|
|
|
1054
1073
|
]
|
|
1055
1074
|
};
|
|
1056
1075
|
};
|
|
1076
|
+
const canToggleDcmtTypesSelection = !isMobile && context === SearchResultContext.WORKFLOW_APPROVE;
|
|
1057
1077
|
const otherOperationsMenuItem = () => {
|
|
1058
1078
|
return {
|
|
1059
1079
|
id: 'oth',
|
|
@@ -1085,7 +1105,15 @@ export const useDocumentOperations = (props) => {
|
|
|
1085
1105
|
disabled: false,
|
|
1086
1106
|
onClick: () => setShowFloatingBar(prev => !prev)
|
|
1087
1107
|
}]
|
|
1088
|
-
: [])
|
|
1108
|
+
: []),
|
|
1109
|
+
{
|
|
1110
|
+
id: 'oth-dcmt-types',
|
|
1111
|
+
icon: showDcmtTypesSelection ? _jsx(IconHide, {}) : _jsx(IconShow, {}),
|
|
1112
|
+
name: showDcmtTypesSelection ? SDKUI_Localizator.HideDcmtTypes : SDKUI_Localizator.ShowDcmtTypes,
|
|
1113
|
+
visible: canToggleDcmtTypesSelection,
|
|
1114
|
+
disabled: false,
|
|
1115
|
+
onClick: () => setShowDcmtTypesSelection(prev => !prev)
|
|
1116
|
+
}
|
|
1089
1117
|
]
|
|
1090
1118
|
};
|
|
1091
1119
|
};
|
|
@@ -1345,6 +1373,10 @@ export const useDocumentOperations = (props) => {
|
|
|
1345
1373
|
dcmtUtility,
|
|
1346
1374
|
fetchRemoteCertificates
|
|
1347
1375
|
};
|
|
1376
|
+
// Navigazione del master nell'archiviazione multipla dei dettagli: il modale prende il documento
|
|
1377
|
+
// con il focus, quindi le frecce hanno senso solo senza selezione a checkbox, che ha la precedenza
|
|
1378
|
+
// sul focus e terrebbe il master fermo (vedi getSelectedDcmtsOrFocused)
|
|
1379
|
+
const canNavigateMultiDetailMaster = !!canNavigateHandler && !!onNavigateHandler && selectedItems.length === 0 && selectedDcmtInfos.length === 1;
|
|
1348
1380
|
const masterDetailMasterCommonProps = {
|
|
1349
1381
|
deviceType,
|
|
1350
1382
|
isForMaster: true,
|
|
@@ -1373,15 +1405,16 @@ export const useDocumentOperations = (props) => {
|
|
|
1373
1405
|
dcmtUtility,
|
|
1374
1406
|
fetchRemoteCertificates
|
|
1375
1407
|
};
|
|
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:
|
|
1408
|
+
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) &&
|
|
1409
|
+
_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
1410
|
onRefreshSearchAsyncDatagrid,
|
|
1379
1411
|
onRefreshDataRowsAsync,
|
|
1380
1412
|
refreshFocusedDataRowAsync,
|
|
1381
1413
|
onRefreshBlogDatagrid,
|
|
1382
1414
|
onRefreshPreviewDatagrid
|
|
1383
1415
|
}, 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, {
|
|
1416
|
+
_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: isOpenDetails && _jsx(TMMasterDetailDcmts, { ...masterDetailDetailsCommonProps, onBack: () => setIsOpenDetails(false) }) }), (isOpenMultiDetailModal && dtd) &&
|
|
1417
|
+
_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: [isOpenMaster && _jsx(TMMasterDetailDcmts, { ...masterDetailMasterCommonProps, onBack: () => setIsOpenMaster(false) }), secondaryMasterDcmts.length > 0 && secondaryMasterDcmts.map((dcmt, index) => {
|
|
1385
1418
|
return (_jsx(StyledModalContainer, { style: { backgroundColor: 'white' }, children: _jsx(TMMasterDetailDcmts, { ...masterDetailMasterCommonProps, inputDcmts: [dcmt], allowNavigation: false, onBack: () => handleRemoveItem(dcmt.TID, dcmt.DID) }) }, `${index}-${dcmt.DID}`));
|
|
1386
1419
|
})] }), 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
1420
|
setIsOpenArchiveRelationForm(false);
|
|
@@ -1389,10 +1422,15 @@ export const useDocumentOperations = (props) => {
|
|
|
1389
1422
|
setArchiveRelatedDcmtFormTID(undefined);
|
|
1390
1423
|
setArchiveRelatedDcmtFormMids([]);
|
|
1391
1424
|
}, onSavedAsyncCallback: async (tid, did, metadataResult) => {
|
|
1425
|
+
const originDcmt = selectedDcmtInfos?.[0];
|
|
1392
1426
|
setIsOpenArchiveRelationForm(false);
|
|
1393
1427
|
setArchiveType(undefined);
|
|
1394
1428
|
setArchiveRelatedDcmtFormTID(undefined);
|
|
1395
1429
|
setArchiveRelatedDcmtFormMids([]);
|
|
1430
|
+
if (refreshFocusedDataRowAsync && originDcmt?.TID && originDcmt?.DID) {
|
|
1431
|
+
await refreshFocusedDataRowAsync(originDcmt.TID, originDcmt.DID, true);
|
|
1432
|
+
return;
|
|
1433
|
+
}
|
|
1396
1434
|
await onRefreshSearchAsyncDatagrid?.();
|
|
1397
1435
|
}, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, showDcmtFormSidebar: showDcmtFormSidebar, openFileUploaderPdfEditor: openFileUploaderPdfEditor, showTodoDcmtForm: showTodoDcmtForm, graphometricManager: graphometricManager }), showRelatedDcmtsChooser &&
|
|
1398
1436
|
_jsx(TMChooserForm, { dataSource: relatedDcmtsChooserDataSource, onChoose: async (selectedRelation) => {
|
|
@@ -1427,8 +1465,8 @@ export const useDocumentOperations = (props) => {
|
|
|
1427
1465
|
TMSpinner.hide();
|
|
1428
1466
|
}
|
|
1429
1467
|
}, onClose: () => setShowManyToManyChooser(false), manageUseLocalizedName: false }), showPairDcmtsModal &&
|
|
1430
|
-
_jsx(TMModal, { title:
|
|
1431
|
-
_jsx(TMModal, { title:
|
|
1468
|
+
_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 &&
|
|
1469
|
+
_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
1470
|
setIsOpenSharedArchive(false);
|
|
1433
1471
|
}, 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
1472
|
setIsOpenSharedArchive(false);
|
|
@@ -1446,14 +1484,17 @@ export const useDocumentOperations = (props) => {
|
|
|
1446
1484
|
} }))] }));
|
|
1447
1485
|
return {
|
|
1448
1486
|
operationItems: operationItems(),
|
|
1487
|
+
selectedDcmtInfos,
|
|
1449
1488
|
renderFloatingBar,
|
|
1450
1489
|
renderDcmtOperations,
|
|
1451
1490
|
features: {
|
|
1452
1491
|
isOpenDcmtForm,
|
|
1492
|
+
isDcmtFormModal,
|
|
1453
1493
|
openFormHandler,
|
|
1454
1494
|
dcmtFormLayoutMode,
|
|
1455
1495
|
onDcmtFormOpenChange,
|
|
1456
1496
|
showSearchTMDatagrid,
|
|
1497
|
+
showDcmtTypesSelection,
|
|
1457
1498
|
showExportForm,
|
|
1458
1499
|
isOpenBatchUpdate,
|
|
1459
1500
|
isModifiedBatchUpdate,
|
|
@@ -1521,6 +1562,7 @@ export const useDocumentOperations = (props) => {
|
|
|
1521
1562
|
canArchiveDetailRelation,
|
|
1522
1563
|
hasManyToManyRelation,
|
|
1523
1564
|
showPairDcmtsModal,
|
|
1565
|
+
backToPairSearchModal,
|
|
1524
1566
|
// Pair search modal state
|
|
1525
1567
|
pairSearchModalTargetTID,
|
|
1526
1568
|
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,113 @@
|
|
|
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
|
+
/** Stato del wait panel: le chiavi sono quelle dei props di TMLayoutWaitingContainer */
|
|
20
|
+
export type WaitPanelState = {
|
|
21
|
+
showWaitPanel: boolean;
|
|
22
|
+
waitPanelTitle: string;
|
|
23
|
+
showWaitPanelPrimary: boolean;
|
|
24
|
+
waitPanelTextPrimary: string;
|
|
25
|
+
waitPanelValuePrimary: number;
|
|
26
|
+
waitPanelMaxValuePrimary: number;
|
|
27
|
+
showWaitPanelSecondary: boolean;
|
|
28
|
+
waitPanelTextSecondary: string;
|
|
29
|
+
waitPanelValueSecondary: number;
|
|
30
|
+
waitPanelMaxValueSecondary: number;
|
|
31
|
+
};
|
|
32
|
+
interface UseMultiMasterDetailDcmtsParams {
|
|
33
|
+
/** Tipo documento del master */
|
|
34
|
+
dtd: DcmtTypeDescriptor;
|
|
35
|
+
/** Documento master da cui parte l'archiviazione dei dettagli */
|
|
36
|
+
masterDcmt: DcmtInfo;
|
|
37
|
+
/** Chiusura del modale */
|
|
38
|
+
onClose: () => void;
|
|
39
|
+
/** true se nella lista di provenienza c'è un documento precedente/successivo su cui spostare il master */
|
|
40
|
+
canNavigateMaster?: (dir: 'next' | 'prev') => boolean;
|
|
41
|
+
/** Sposta il focus della lista di provenienza: il master arriva da lì e cambia da sé (vedi masterDcmt) */
|
|
42
|
+
onNavigateMaster?: (dir: 'next' | 'prev') => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Logica dell'archiviazione multipla dei dettagli: relazioni, sezioni, righe del riepilogo e
|
|
46
|
+
* archiviazione. Il rendering sta in TMMultiMasterDetailDcmtsForm
|
|
47
|
+
*/
|
|
48
|
+
export declare const useMultiMasterDetailDcmts: ({ dtd, masterDcmt, onClose, canNavigateMaster, onNavigateMaster }: UseMultiMasterDetailDcmtsParams) => {
|
|
49
|
+
isLoading: boolean;
|
|
50
|
+
isSummaryReady: boolean;
|
|
51
|
+
phase: MultiDetailArchivePhase;
|
|
52
|
+
setPhase: import("react").Dispatch<import("react").SetStateAction<MultiDetailArchivePhase>>;
|
|
53
|
+
detailRelationItems: DetailRelationItem[];
|
|
54
|
+
selectedRelation: RelationDescriptor | undefined;
|
|
55
|
+
selectedItem: DetailRelationItem | undefined;
|
|
56
|
+
hasMultipleTypes: boolean;
|
|
57
|
+
selectRelation: (item: DetailRelationItem) => void;
|
|
58
|
+
backToTypeSelection: () => void;
|
|
59
|
+
isBackLocked: boolean;
|
|
60
|
+
closeModal: () => void;
|
|
61
|
+
isMasterNavigationEnabled: boolean;
|
|
62
|
+
canNavigateMasterPrev: boolean;
|
|
63
|
+
canNavigateMasterNext: boolean;
|
|
64
|
+
navigateMaster: (dir: 'next' | 'prev') => void;
|
|
65
|
+
sectionsOpen: Record<AccordionSection, boolean>;
|
|
66
|
+
setSectionOpen: (section: AccordionSection, isOpen: boolean) => void;
|
|
67
|
+
openAllSections: () => void;
|
|
68
|
+
clearLayout: () => void;
|
|
69
|
+
layoutResetToken: number;
|
|
70
|
+
hasSavedLayout: boolean;
|
|
71
|
+
setHasSavedLayout: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
72
|
+
canUpdateMaster: boolean;
|
|
73
|
+
masterFieldsCount: number;
|
|
74
|
+
getMasterMetadataAsync: () => Promise<Map<number, MetadataScalarValue>>;
|
|
75
|
+
masterInfoReloadToken: number;
|
|
76
|
+
isOpenMasterForm: boolean;
|
|
77
|
+
setIsOpenMasterForm: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
78
|
+
handleMasterSavedAsync: () => Promise<void>;
|
|
79
|
+
archivedDetailResults: SearchResultDescriptor[];
|
|
80
|
+
archivedDetailsCount: number;
|
|
81
|
+
isLoadingArchivedDetails: boolean;
|
|
82
|
+
refreshArchivedDetailsAsync: () => Promise<void>;
|
|
83
|
+
detailColumns: IColumnProps[];
|
|
84
|
+
detailSupportsFile: boolean;
|
|
85
|
+
archiveRows: ArchiveRow[];
|
|
86
|
+
currentRows: ArchiveRow[];
|
|
87
|
+
focusedRowKey: number | undefined;
|
|
88
|
+
setFocusedRowKey: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
|
|
89
|
+
selectedRowKeys: number[];
|
|
90
|
+
setSelectedRowKeys: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
91
|
+
isOpenAddForm: boolean;
|
|
92
|
+
editingRowId: number | undefined;
|
|
93
|
+
editingRow: ArchiveRow | undefined;
|
|
94
|
+
formInputMids: MidValue[];
|
|
95
|
+
openAddForm: () => void;
|
|
96
|
+
openEditForm: (row: ArchiveRow | undefined) => void;
|
|
97
|
+
closeAddForm: () => void;
|
|
98
|
+
deleteRow: (row: ArchiveRow | undefined) => void;
|
|
99
|
+
duplicateRow: (row: ArchiveRow | undefined) => void;
|
|
100
|
+
upsertRow: (values: Array<MetadataValueDescriptorEx>, file: File | undefined) => void;
|
|
101
|
+
updateRowValues: (rowId: number, changes: ArchiveRowChanges) => void;
|
|
102
|
+
copyArchivedDetailToRows: (dcmt: {
|
|
103
|
+
TID?: number | string;
|
|
104
|
+
DID?: number | string;
|
|
105
|
+
FILEEXT?: string;
|
|
106
|
+
} | undefined) => Promise<void>;
|
|
107
|
+
stopOnFirstError: boolean;
|
|
108
|
+
setStopOnFirstError: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
109
|
+
isArchiving: boolean;
|
|
110
|
+
archiveAllAsync: () => Promise<void>;
|
|
111
|
+
waitPanel: WaitPanelState;
|
|
112
|
+
abortController: AbortController | undefined;
|
|
113
|
+
};
|