@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, useState } from "react";
|
|
3
3
|
import { SDK_Globals, RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { IconCopy, IconDownload, IconWarning, IconCheck, getExceptionMessage, SDKUI_Localizator, IconCircleInfo, IconRefresh } from "../../../helper";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { DcmtTypeListCacheService, LayoutModes, SDK_Localizator, TreeCacheService, TreeItemTypes } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { TreeList, Column, Scrolling, Selection } from 'devextreme-react/tree-list';
|
|
5
5
|
import { DropDownBox } from 'devextreme-react';
|
|
@@ -13,89 +13,100 @@ import { TMColors } from '../../../utils/theme';
|
|
|
13
13
|
import styled from 'styled-components';
|
|
14
14
|
import { useOutsideClick } from '../../../hooks/useOutsideClick';
|
|
15
15
|
import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
|
16
|
+
const TMTreeDcmtTypeCell = ({ tid, isMobile }) => {
|
|
17
|
+
const [dtd, setDtd] = useState();
|
|
18
|
+
const loadDTD = useCallback(async () => {
|
|
19
|
+
if (isMobile || dtd || !tid)
|
|
20
|
+
return;
|
|
21
|
+
setDtd(await DcmtTypeListCacheService.GetAsync(tid));
|
|
22
|
+
}, [isMobile, dtd, tid]);
|
|
23
|
+
return (_jsxs(StyledTreeDcmtTypeRow, { onMouseEnter: loadDTD, children: [_jsx("span", { style: { cursor: 'pointer', flex: 1, minWidth: 0 }, children: _jsx(TMTidViewer, { tid: tid, showIcon: false }) }), !isMobile && (_jsx("span", { className: 'info-icon', children: _jsx(TMDcmtTypeTooltip, { dtd: dtd, children: _jsx(IconInfo, { color: TMColors.info }) }) }))] }));
|
|
24
|
+
};
|
|
25
|
+
// La ricerca e l'archiviazione hanno ciascuna il proprio albero predefinito: il contesto lo decide il layoutMode
|
|
26
|
+
const getDefaultTreeId = (layoutMode) => layoutMode == LayoutModes.Update
|
|
27
|
+
? SDKUI_Globals.userSettings.searchSettings.defaultTree
|
|
28
|
+
: SDKUI_Globals.userSettings.archivingSettings.defaultTree;
|
|
16
29
|
const TMTreeSelector = ({ layoutMode = LayoutModes.Update, isVisible, onSelectedTIDChanged, onClosePanel, allowMaximize = true, onMaximizePanel }) => {
|
|
17
30
|
const [trees, setTrees] = useState([]);
|
|
18
|
-
const [treeItems, setTreeItems] = useState([]);
|
|
19
31
|
const [selectedTreeId, setSelectedTreeId] = useState(0);
|
|
20
32
|
const [infoDTD, setInfoDTD] = useState();
|
|
21
33
|
// State to store selected row keys
|
|
22
34
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
|
23
35
|
// State hook to store the currently focused row key, initially set to undefined
|
|
24
36
|
const [focusedRowKey, setFocusedRowKey] = useState(undefined);
|
|
25
|
-
|
|
26
|
-
const [
|
|
37
|
+
// Elemento selezionato nell'albero: dopo un refresh va riproposto se esiste ancora
|
|
38
|
+
const [selectedTreeItemKey, setSelectedTreeItemKey] = useState(undefined);
|
|
39
|
+
const selectedTreeItemKeys = useMemo(() => selectedTreeItemKey !== undefined ? [selectedTreeItemKey] : [], [selectedTreeItemKey]);
|
|
40
|
+
// Finche' gli alberi non sono arrivati il pannello mostra il loader invece della lista vuota
|
|
41
|
+
const [isLoadingTrees, setIsLoadingTrees] = useState(true);
|
|
42
|
+
const [defaultTreeId, setDefaultTreeId] = useState(() => getDefaultTreeId(layoutMode));
|
|
43
|
+
const dropDownBoxRef = useRef(null);
|
|
44
|
+
const closeDropDown = useCallback(() => { dropDownBoxRef.current?.instance()?.option('opened', false); }, []);
|
|
27
45
|
const deviceType = useDeviceType();
|
|
28
46
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
29
47
|
const panelRef = useOutsideClick(() => setInfoDTD(undefined));
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
// Tiene traccia dell'albero selezionato senza far dipendere loadTreesAsync da selectedTreeId:
|
|
49
|
+
// così il refresh può riproporre la selezione corrente senza ricaricare a ogni cambio di albero
|
|
50
|
+
const selectedTreeIdRef = useRef(selectedTreeId);
|
|
51
|
+
useEffect(() => { selectedTreeIdRef.current = selectedTreeId; }, [selectedTreeId]);
|
|
52
|
+
// Carica tutti gli alberi del contesto corrente (ricerca o archiviazione).
|
|
53
|
+
// Con forceRefresh la cache viene invalidata, altrimenti GetAll* restituirebbe gli alberi già in memoria.
|
|
54
|
+
const loadTreesAsync = useCallback(async (forceRefresh = false) => {
|
|
55
|
+
const isSearchContext = layoutMode == LayoutModes.Update;
|
|
56
|
+
if (forceRefresh) {
|
|
57
|
+
// Gli alberi arrivano dal server filtrati sui tipi documento della sessione: senza rileggerli
|
|
58
|
+
// prima (RetrieveAll con refreshCache rigenera anche la cache lato server) un tipo documento
|
|
59
|
+
// appena creato da Designer non comparirebbe tra gli elementi dell'albero
|
|
60
|
+
DcmtTypeListCacheService.RemoveAllWithoutMetadata();
|
|
61
|
+
await DcmtTypeListCacheService.GetAllWithoutMetadataAsync();
|
|
62
|
+
if (isSearchContext)
|
|
63
|
+
TreeCacheService.RemoveAllSearch();
|
|
64
|
+
else
|
|
65
|
+
TreeCacheService.RemoveAllArchive();
|
|
66
|
+
}
|
|
67
|
+
const result = isSearchContext
|
|
68
|
+
? await TreeCacheService.GetAllSearchAsync()
|
|
69
|
+
: await TreeCacheService.GetAllArchiveAsync();
|
|
70
|
+
if (!result || result.length === 0) {
|
|
71
|
+
// Sul refresh gli alberi possono essere spariti lato server: allinea anche lo stato vuoto
|
|
72
|
+
if (forceRefresh) {
|
|
73
|
+
setTrees([]);
|
|
74
|
+
setSelectedTreeId(0);
|
|
75
|
+
setSelectedRowKeys([]);
|
|
54
76
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
setTrees(result);
|
|
80
|
+
// Dopo un refresh mantiene l'albero corrente, se ancora presente
|
|
81
|
+
const currentTreeId = selectedTreeIdRef.current;
|
|
82
|
+
if (forceRefresh && result.some(o => o.id == currentTreeId)) {
|
|
83
|
+
setSelectedTreeId(currentTreeId);
|
|
84
|
+
setSelectedRowKeys([currentTreeId]);
|
|
85
|
+
return;
|
|
58
86
|
}
|
|
59
|
-
|
|
60
|
-
|
|
87
|
+
// Il predefinito puo' non essere piu' tra gli alberi del contesto (cancellato, o permessi cambiati): si ripiega sul primo
|
|
88
|
+
const defaultTree = getDefaultTreeId(layoutMode);
|
|
89
|
+
const treeToSelect = (defaultTree > 0 ? result.find(o => o.id == defaultTree) : undefined) ?? result[0];
|
|
90
|
+
setSelectedTreeId(treeToSelect?.id ?? 0);
|
|
91
|
+
if (treeToSelect?.id) {
|
|
92
|
+
setSelectedRowKeys([treeToSelect.id]);
|
|
61
93
|
}
|
|
62
94
|
}, [layoutMode]);
|
|
63
95
|
useEffect(() => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, [
|
|
96
|
+
setIsLoadingTrees(true);
|
|
97
|
+
loadTreesAsync().finally(() => setIsLoadingTrees(false));
|
|
98
|
+
}, [loadTreesAsync]);
|
|
99
|
+
// Derivato nello stesso render degli alberi: con uno state la TreeList mostrerebbe "Nessun dato" per un frame
|
|
100
|
+
const treeItems = useMemo(() => trees.find(o => o.id == selectedTreeId)?.items ?? [], [trees, selectedTreeId]);
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
// Mantiene la selezione dopo il refresh solo se l'elemento e' ancora presente (al cambio albero si azzera)
|
|
103
|
+
setSelectedTreeItemKey(prev => prev !== undefined && treeItems.some(o => o.id == prev) ? prev : undefined);
|
|
104
|
+
}, [treeItems]);
|
|
67
105
|
const renderCell = useCallback((data) => {
|
|
68
106
|
const treeItem = data.data;
|
|
69
|
-
const [showInfo, setShowInfo] = useState(false);
|
|
70
107
|
// Documento (DcmtType)
|
|
71
108
|
if (treeItem.type === TreeItemTypes.DcmtType) {
|
|
72
|
-
return (
|
|
73
|
-
alignItems: 'center',
|
|
74
|
-
minWidth: 0,
|
|
75
|
-
width: '100%',
|
|
76
|
-
gap: 2,
|
|
77
|
-
position: 'relative'
|
|
78
|
-
}, onMouseEnter: async () => {
|
|
79
|
-
if (!isMobile) {
|
|
80
|
-
setShowInfo(true);
|
|
81
|
-
let dtd = await DcmtTypeListCacheService.GetAsync(treeItem.tid);
|
|
82
|
-
setInfoDTD(dtd);
|
|
83
|
-
}
|
|
84
|
-
}, onMouseLeave: () => {
|
|
85
|
-
if (!isMobile) {
|
|
86
|
-
setShowInfo(false);
|
|
87
|
-
setInfoDTD(undefined);
|
|
88
|
-
}
|
|
89
|
-
}, children: [_jsx("span", { style: { cursor: 'pointer', flex: 1, minWidth: 0 }, children: _jsx(TMTidViewer, { tid: treeItem.tid, showIcon: false }) }), !isMobile && (_jsx("span", { style: {
|
|
90
|
-
opacity: showInfo ? 1 : 0,
|
|
91
|
-
transition: 'opacity 0.2s',
|
|
92
|
-
pointerEvents: showInfo ? 'auto' : 'none',
|
|
93
|
-
cursor: 'pointer',
|
|
94
|
-
display: 'flex',
|
|
95
|
-
alignItems: 'center',
|
|
96
|
-
marginLeft: 'auto',
|
|
97
|
-
zIndex: 2
|
|
98
|
-
}, children: _jsx(TMDcmtTypeTooltip, { dtd: infoDTD, children: _jsx(IconInfo, { color: TMColors.info }) }) }))] }));
|
|
109
|
+
return _jsx(TMTreeDcmtTypeCell, { tid: treeItem.tid, isMobile: isMobile });
|
|
99
110
|
}
|
|
100
111
|
// Folder (altri tipi)
|
|
101
112
|
return (_jsxs(StyledDivHorizontal, { style: { gap: 5, alignItems: 'center', minWidth: 0 }, children: [_jsx("span", { style: {
|
|
@@ -113,7 +124,7 @@ const TMTreeSelector = ({ layoutMode = LayoutModes.Update, isVisible, onSelected
|
|
|
113
124
|
whiteSpace: 'nowrap',
|
|
114
125
|
flex: 1,
|
|
115
126
|
}, children: treeItem.nameLoc })] }));
|
|
116
|
-
}, [isMobile
|
|
127
|
+
}, [isMobile]);
|
|
117
128
|
// Handles selection change in the data grid
|
|
118
129
|
const onSelectionChanged = useCallback((e) => {
|
|
119
130
|
const selectedKeys = e.component.getSelectedRowKeys() ?? [];
|
|
@@ -124,8 +135,18 @@ const TMTreeSelector = ({ layoutMode = LayoutModes.Update, isVisible, onSelected
|
|
|
124
135
|
if (selectedKeys.length > 0)
|
|
125
136
|
setSelectedTreeId(selectedKeys[0]);
|
|
126
137
|
setSelectedRowKeys(selectedKeys);
|
|
127
|
-
|
|
128
|
-
}, []);
|
|
138
|
+
closeDropDown();
|
|
139
|
+
}, [closeDropDown]);
|
|
140
|
+
// Handles click on a tree row in the trees data grid: clicking the already selected tree
|
|
141
|
+
// does not raise onSelectionChanged, so the drop down must be closed here as well
|
|
142
|
+
const onRowClickTrees = useCallback((e) => {
|
|
143
|
+
const tree = e.data;
|
|
144
|
+
if (tree?.id === undefined)
|
|
145
|
+
return;
|
|
146
|
+
setSelectedTreeId(tree.id);
|
|
147
|
+
setSelectedRowKeys([tree.id]);
|
|
148
|
+
closeDropDown();
|
|
149
|
+
}, [closeDropDown]);
|
|
129
150
|
// Handles focus change in the data grid
|
|
130
151
|
const onFocusedRowChanged = useCallback((e) => {
|
|
131
152
|
setFocusedRowKey(e.row?.key);
|
|
@@ -135,12 +156,6 @@ const TMTreeSelector = ({ layoutMode = LayoutModes.Update, isVisible, onSelected
|
|
|
135
156
|
if (treeItemDescriptor?.id)
|
|
136
157
|
setSelectedRowKeys([treeItemDescriptor.id]);
|
|
137
158
|
}, []);
|
|
138
|
-
const onGridBoxOpened = useCallback((e) => {
|
|
139
|
-
if (e.name === 'opened') {
|
|
140
|
-
setIsGridBoxOpened(e.value);
|
|
141
|
-
}
|
|
142
|
-
;
|
|
143
|
-
}, []);
|
|
144
159
|
// Callback function to handle double-click events on a tree view cell
|
|
145
160
|
const onCellDblClickTreeView = useCallback((e) => {
|
|
146
161
|
// Extract the data from the clicked cell and cast it to the TreeItemDescriptor type
|
|
@@ -161,7 +176,18 @@ const TMTreeSelector = ({ layoutMode = LayoutModes.Update, isVisible, onSelected
|
|
|
161
176
|
}
|
|
162
177
|
}
|
|
163
178
|
}, []);
|
|
164
|
-
|
|
179
|
+
// Callback function to handle click events on a tree view row.
|
|
180
|
+
const onRowClickTreeView = useCallback((e) => {
|
|
181
|
+
const treeItem = e.data;
|
|
182
|
+
if (treeItem?.type === TreeItemTypes.DcmtType) {
|
|
183
|
+
onSelectedTIDChanged?.(treeItem.tid, selectedTreeId);
|
|
184
|
+
}
|
|
185
|
+
}, [onSelectedTIDChanged, selectedTreeId]);
|
|
186
|
+
// La selezione la decide il widget (click, ctrl+click che deseleziona, barra spaziatrice): qui si allinea solo lo stato
|
|
187
|
+
const onSelectionChangedTreeView = useCallback((e) => {
|
|
188
|
+
setSelectedTreeItemKey(e.selectedRowKeys?.[0]);
|
|
189
|
+
}, []);
|
|
190
|
+
return (_jsx(TMPanel, { title: SDK_Localizator.Trees, isVisible: isVisible, totalItems: trees.length, onClose: onClosePanel, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, onRefresh: () => loadTreesAsync(true), isRefreshing: isLoadingTrees, toolbar: _jsx(TMButton, { btnStyle: 'icon', caption: defaultTreeId == selectedTreeId ? SDKUI_Localizator.TreeRemoveDefault : SDKUI_Localizator.SetAsDefault, icon: defaultTreeId == selectedTreeId ? _jsx(IconStarRemove, { color: 'rgb(243, 114, 92)' }) : _jsx(IconStar, { color: 'rgb(248, 215, 117)' }), onClick: () => {
|
|
165
191
|
if (defaultTreeId == selectedTreeId) {
|
|
166
192
|
if (layoutMode == LayoutModes.Update)
|
|
167
193
|
SDKUI_Globals.userSettings.searchSettings.defaultTree = -1;
|
|
@@ -185,22 +211,43 @@ const TMTreeSelector = ({ layoutMode = LayoutModes.Update, isVisible, onSelected
|
|
|
185
211
|
width: '100%',
|
|
186
212
|
boxSizing: 'border-box',
|
|
187
213
|
minHeight: 0,
|
|
188
|
-
}, children: [_jsx("div", { style: { padding: '10px' }, children: _jsx(DropDownBox, { dropDownOptions: {
|
|
214
|
+
}, children: [_jsx("div", { style: { padding: '10px' }, children: _jsx(DropDownBox, { ref: dropDownBoxRef, dropDownOptions: {
|
|
189
215
|
resizeEnabled: true,
|
|
190
216
|
minWidth: "100%",
|
|
191
217
|
height: trees.length <= 10 ? 300 : 500,
|
|
192
218
|
maxWidth: "100%"
|
|
193
|
-
}, value: selectedTreeId,
|
|
219
|
+
}, value: selectedTreeId, valueExpr: "id", displayExpr: "nameLoc", deferRendering: false, dataSource: trees, onValueChanged: syncDataGridSelection, style: { height: 30 }, children: _jsx(TMDataGrid, { height: "100%", width: "100%", dataSource: trees, dataColumns: [
|
|
194
220
|
{ dataField: 'nameLoc', caption: SDKUI_Localizator.Name, width: 'auto' },
|
|
195
221
|
{ dataField: 'description', caption: SDKUI_Localizator.Description, width: 'auto' },
|
|
196
|
-
], selection: { mode: 'single', showCheckBoxesMode: "none" }, showHeaderFilter: false, selectedRowKeys: selectedRowKeys, onSelectionChanged: onSelectionChanged, focusedRowKey: focusedRowKey, onFocusedRowChanged: onFocusedRowChanged }) }) }), _jsxs(StyledTreeListWrapper, { children: [_jsxs(TreeList, { height: "100%", dataSource: treeItems, showRowLines: false, showColumnLines: false, showBorders: false, columnAutoWidth: false, keyExpr: "id", parentIdExpr: "parentID", dataStructure: "plain", showColumnHeaders: false,
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}, children: [_jsx(Column, { dataField: "nameLoc", caption: SDKUI_Localizator.Name, cellRender: renderCell, width: "100%" }), _jsx(Scrolling, { mode: "virtual", useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 }), _jsx(Selection, { mode: "single" })] }), _jsxs(StyledOffCanvasPanel, { ref: panelRef, "$isOpen": isMobile && infoDTD !== undefined, children: [_jsxs(StyledDivHorizontal, { style: { gap: 10, padding: '10px 8px', width: '100%', alignItems: 'center' }, children: [_jsx("p", { style: { fontSize: '1.1rem', fontWeight: 'bold' }, children: `${SDKUI_Localizator.DcmtType} - ${SDKUI_Localizator.About}` }), _jsx(IconCloseOutline, { style: { marginLeft: 'auto', cursor: 'pointer' }, onClick: () => setInfoDTD(undefined) })] }), renderDTDTooltipContent(infoDTD)] })] })] })
|
|
201
|
-
: _jsx("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%', width: '100%', fontSize: '1.5rem' }, children: SDKUI_Localizator.TreesNoAvailable }) }));
|
|
222
|
+
], selection: { mode: 'single', showCheckBoxesMode: "none" }, showHeaderFilter: false, selectedRowKeys: selectedRowKeys, onSelectionChanged: onSelectionChanged, onRowClick: onRowClickTrees, focusedRowKey: focusedRowKey, onFocusedRowChanged: onFocusedRowChanged }) }) }), _jsxs(StyledTreeListWrapper, { children: [_jsxs(TreeList, { height: "100%", dataSource: treeItems, showRowLines: false, showColumnLines: false, showBorders: false, columnAutoWidth: false, keyExpr: "id", parentIdExpr: "parentID", dataStructure: "plain", showColumnHeaders: false, selectedRowKeys: selectedTreeItemKeys, onSelectionChanged: onSelectionChangedTreeView, onCellDblClick: onCellDblClickTreeView, onRowClick: onRowClickTreeView, children: [_jsx(Column, { dataField: "nameLoc", caption: SDKUI_Localizator.Name, cellRender: renderCell, width: "100%" }), _jsx(Scrolling, { mode: "standard", useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 }), _jsx(Selection, { mode: "single" })] }), _jsxs(StyledOffCanvasPanel, { ref: panelRef, $isOpen: isMobile && infoDTD !== undefined, children: [_jsxs(StyledDivHorizontal, { style: { gap: 10, padding: '10px 8px', width: '100%', alignItems: 'center' }, children: [_jsx("p", { style: { fontSize: '1.1rem', fontWeight: 'bold' }, children: `${SDKUI_Localizator.DcmtType} - ${SDKUI_Localizator.About}` }), _jsx(IconCloseOutline, { style: { marginLeft: 'auto', cursor: 'pointer' }, onClick: () => setInfoDTD(undefined) })] }), renderDTDTooltipContent(infoDTD)] })] })] })
|
|
223
|
+
: isLoadingTrees
|
|
224
|
+
? _jsx(_Fragment, {})
|
|
225
|
+
: _jsx("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%', width: '100%', fontSize: '1.5rem' }, children: SDKUI_Localizator.TreesNoAvailable }) }));
|
|
202
226
|
};
|
|
203
227
|
export default TMTreeSelector;
|
|
228
|
+
const StyledTreeDcmtTypeRow = styled(StyledDivHorizontal) `
|
|
229
|
+
align-items: center;
|
|
230
|
+
min-width: 0;
|
|
231
|
+
width: 100%;
|
|
232
|
+
gap: 2px;
|
|
233
|
+
position: relative;
|
|
234
|
+
|
|
235
|
+
.info-icon {
|
|
236
|
+
display: flex;
|
|
237
|
+
align-items: center;
|
|
238
|
+
margin-left: auto;
|
|
239
|
+
z-index: 2;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
opacity: 0;
|
|
242
|
+
pointer-events: none;
|
|
243
|
+
transition: opacity 0.2s;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&:hover .info-icon {
|
|
247
|
+
opacity: 1;
|
|
248
|
+
pointer-events: auto;
|
|
249
|
+
}
|
|
250
|
+
`;
|
|
204
251
|
const StyledTreeListWrapper = styled.div `
|
|
205
252
|
width: 100%;
|
|
206
253
|
height: 100%;
|
|
@@ -10,12 +10,13 @@ import TMDcmtIcon from "../documents/TMDcmtIcon";
|
|
|
10
10
|
import TMDataGrid from "../../base/TMDataGrid";
|
|
11
11
|
import TMDcmtForm from "../documents/TMDcmtForm";
|
|
12
12
|
import { useDcmtOperations } from "../../../hooks/useDcmtOperations";
|
|
13
|
-
import
|
|
13
|
+
import TMLayoutContainer from "../../base/TMLayout";
|
|
14
|
+
import TMWaitPanelManager from "../../base/waitPanel/TMWaitPanelManager";
|
|
14
15
|
import { TMResultManager } from "../../forms/TMResultDialog";
|
|
15
16
|
let abortLocalController = new AbortController();
|
|
16
17
|
const TMViewHistoryDcmt = (props) => {
|
|
17
18
|
const { deviceType, inputDcmt, onClose, fromDTD, allTasks, getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers } = props;
|
|
18
|
-
const {
|
|
19
|
+
const { downloadDcmtsAsync } = useDcmtOperations();
|
|
19
20
|
const [dcmtHistory, setDcmtHistory] = useState([]);
|
|
20
21
|
// showId is a state variable that determines whether an ID-related component or feature should be displayed
|
|
21
22
|
const [showId, setShowId] = useState(false);
|
|
@@ -33,18 +34,6 @@ const TMViewHistoryDcmt = (props) => {
|
|
|
33
34
|
const [showDcmtForm, setShowDcmtForm] = useState(false);
|
|
34
35
|
// Memoized value to get the selected draft based on the focused row key
|
|
35
36
|
const selectedDcmt = useMemo(() => dcmtHistory.find(dcmt => dcmt.id === focusedRowKey), [focusedRowKey, dcmtHistory]);
|
|
36
|
-
// State variable to control the visibility of the wait panel.
|
|
37
|
-
const [showLocalWaitPanel, setShowLocalWaitPanel] = useState(false);
|
|
38
|
-
// State variable to store the title of the wait panel.
|
|
39
|
-
const [waitLocalPanelTitle, setWaitLocalPanelTitle] = useState('');
|
|
40
|
-
// State variable to control the visibility of the primary section of the wait panel.
|
|
41
|
-
const [showLocalPrimary, setShowLocalPrimary] = useState(false);
|
|
42
|
-
// State variable to store the primary text of the wait panel.
|
|
43
|
-
const [waitLocalPanelTextPrimary, setWaitLocalPanelTextPrimary] = useState('');
|
|
44
|
-
// State variable to track the current value of the primary progress indicator in the wait panel.
|
|
45
|
-
const [waitLocalPanelValuePrimary, setWaitLocalPanelValuePrimary] = useState(0);
|
|
46
|
-
// State variable to define the maximum value for the primary progress indicator in the wait panel.
|
|
47
|
-
const [waitLocalPanelMaxValuePrimary, setWaitLocalPanelMaxValuePrimary] = useState(0);
|
|
48
37
|
const getParticipantById = (id, users) => {
|
|
49
38
|
if (users.length === 0)
|
|
50
39
|
return null;
|
|
@@ -155,18 +144,21 @@ const TMViewHistoryDcmt = (props) => {
|
|
|
155
144
|
onButtonClick: async (e) => {
|
|
156
145
|
if (e !== ButtonNames.YES)
|
|
157
146
|
return;
|
|
158
|
-
setWaitLocalPanelTitle(SDKUI_Localizator.Delete);
|
|
159
|
-
setShowLocalWaitPanel(true);
|
|
160
|
-
setShowLocalPrimary(true);
|
|
161
147
|
abortLocalController = new AbortController();
|
|
148
|
+
const panel = TMWaitPanelManager.show({
|
|
149
|
+
title: SDKUI_Localizator.Delete,
|
|
150
|
+
max: 1,
|
|
151
|
+
showCounters: false,
|
|
152
|
+
cancelable: true,
|
|
153
|
+
onAbort: () => abortLocalController.abort(),
|
|
154
|
+
});
|
|
162
155
|
let result = [];
|
|
163
156
|
let i = 0;
|
|
164
|
-
setWaitLocalPanelMaxValuePrimary(1);
|
|
165
157
|
if (abortLocalController.signal.aborted) {
|
|
166
158
|
result.push({ rowIndex: i, id1: currentDcmt.id, id2: currentDcmt.id, resultType: ResultTypes.WARNING, description: `Operazione interrotta. Elaborate ${i}` });
|
|
167
159
|
}
|
|
168
160
|
else {
|
|
169
|
-
|
|
161
|
+
panel.setSubtitle(SDKUI_Localizator.Delete);
|
|
170
162
|
const deleteEngine = new DeleteEngine(SDK_Globals.tmSession);
|
|
171
163
|
await deleteEngine.PhysDeleteByIDAsync(Number(currentDcmt.TID), Number(currentDcmt.DID), false)
|
|
172
164
|
.then(async () => {
|
|
@@ -178,10 +170,7 @@ const TMViewHistoryDcmt = (props) => {
|
|
|
178
170
|
});
|
|
179
171
|
}
|
|
180
172
|
setFocusedRowKey(undefined);
|
|
181
|
-
|
|
182
|
-
setWaitLocalPanelMaxValuePrimary(0);
|
|
183
|
-
setWaitLocalPanelValuePrimary(0);
|
|
184
|
-
setShowLocalWaitPanel(false);
|
|
173
|
+
panel.close();
|
|
185
174
|
TMResultManager.show(result, SDKUI_Localizator.Delete, "ID", undefined);
|
|
186
175
|
}
|
|
187
176
|
});
|
|
@@ -279,7 +268,7 @@ const TMViewHistoryDcmt = (props) => {
|
|
|
279
268
|
{ dataField: "LastUpdateTime", caption: SDKUI_Localizator.LastUpdateTime, dataType: 'datetime', format: 'dd/MM/yyyy HH:mm:ss', },
|
|
280
269
|
]);
|
|
281
270
|
}, [showId]);
|
|
282
|
-
return _jsx(TMModal, { title: `${SDKUI_Localizator.SearchResult} \u2014 ${SDKUI_Localizator.History + ": " + (fromDTD.nameLoc ?? SDKUI_Localizator.Document) + " (DID:" + inputDcmt.DID})`, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '80%', '80%', '95%'), onClose: onClose, children:
|
|
283
|
-
|
|
271
|
+
return _jsx(TMModal, { title: `${SDKUI_Localizator.SearchResult} \u2014 ${SDKUI_Localizator.History + ": " + (fromDTD.nameLoc ?? SDKUI_Localizator.Document) + " (DID:" + inputDcmt.DID})`, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '80%', '80%', '95%'), onClose: onClose, children: _jsxs(TMLayoutContainer, { direction: 'vertical', children: [_jsx(TMDataGrid, { dataSource: dcmtHistory, dataColumns: dataColumns, focusedRowKey: focusedRowKey, selection: selection, customContextMenuItems: customContextMenuItems, onFocusedRowChanged: onFocusedRowChanged, onCellDblClick: onCellDblClick, noDataText: SDKUI_Localizator.NoDataToDisplay, showSearchPanel: showSearch }), (showDcmtForm && selectedDcmt !== undefined) &&
|
|
272
|
+
_jsx(TMDcmtForm, { TID: Number(selectedDcmt.TID), DID: Number(selectedDcmt.DID), formMode: FormModes.ReadOnly, isModal: true, widthModal: "95%", heightModal: "95%", titleModal: fromDTD.name ?? SDKUI_Localizator.SearchResult, allowNavigation: dcmtHistory.length > 0, itemIndex: selectedIndex + 1, count: dcmtHistory.length, onClose: () => { setShowDcmtForm(false); }, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks ?? [], Number(selectedDcmt.TID), Number(selectedDcmt.DID)) })] }) });
|
|
284
273
|
};
|
|
285
274
|
export default TMViewHistoryDcmt;
|
|
@@ -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 { ObjectClasses, TaskDescriptor, PdGs, UserListCacheService, SDK_Localizator } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { gotoPDGExtendedLabel, taskValidatorAsync } from './TMTasksUtils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { PdGs, Priorities, SDK_Globals, Task_States } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { FormModes } from "../../../ts";
|
|
@@ -358,7 +358,7 @@ const TaskFormResponseComment = (props) => {
|
|
|
358
358
|
}, children: currentResponse && currentResponse.length > 0
|
|
359
359
|
? _jsx(TMHtmlContentDisplay, { markup: currentResponse ?? '-', isSelected: false })
|
|
360
360
|
: _jsx("span", { style: { color: '#6c757d', fontStyle: 'italic' }, children: SDKUI_Localizator.NoAnswerProvided }) }) }))] })
|
|
361
|
-
: (_jsxs(ResponseCommentWrapper, { children: [_jsx(ResponseCommentTextArea, { id: "responseId", name: "response",
|
|
361
|
+
: (_jsxs(ResponseCommentWrapper, { children: [_jsx(ResponseCommentTextArea, { id: "responseId", name: "response", $isValid: true, value: currentResponse ?? '', onChange: onAnswerChange ? onAnswerChange : undefined }), _jsx(ResponseCommentLabel, { htmlFor: "responseId", children: SDKUI_Localizator.Answer }), _jsx(ResponseCommentCharacterCounter, { children: `${500 - (currentResponse ?? '').length} ${SDKUI_Localizator.CharactersRemaining}` })] })) }));
|
|
362
362
|
};
|
|
363
363
|
// Stile comune per i container dei campi
|
|
364
364
|
const fieldContainerStyle = { width: '100%' };
|
|
@@ -423,7 +423,7 @@ export const RenderTaskFormStateField = (props) => {
|
|
|
423
423
|
// Non renderizzare nulla finché i dati non sono pronti
|
|
424
424
|
if (!formDataOrig)
|
|
425
425
|
return null;
|
|
426
|
-
return (_jsx("div", { style: { width: '100%', marginTop: 15 }, children: _jsxs(FloatingLabelFieldCard, {
|
|
426
|
+
return (_jsx("div", { style: { width: '100%', marginTop: 15 }, children: _jsxs(FloatingLabelFieldCard, { $isModifiedWhen: formDataOrig?.state !== formData?.state, style: { display: 'flex', flexDirection: 'column', gap: 10 }, children: [_jsx(FloatingFieldLabel, { $isModifiedWhen: formDataOrig?.state !== formData?.state, children: SDKUI_Localizator.StatusAndAnswer }), _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', width: '100%' }, children: [_jsx(StatusFieldLabel, { children: _jsxs(StatusValue, { $isModifiedWhen: formDataOrig?.state !== formData?.state, children: [_jsx("span", { style: { display: 'flex', alignItems: 'center' }, children: taskStateIconMap(20).get(formData?.state ?? Task_States.None) }), getStatusLocalizatorValue(formData?.state ?? Task_States.None)] }) }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' }, children: [showModifyButton && (_jsxs("div", { onClick: () => handleShowChangeStateForm(true), style: {
|
|
427
427
|
backgroundColor: "#d17800",
|
|
428
428
|
color: "#fff",
|
|
429
429
|
padding: "10px 16px",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import ArrayStore from "devextreme/data/array_store";
|
|
4
4
|
import Scheduler from "devextreme-react/scheduler";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import ArrayStore from 'devextreme/data/array_store';
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { Priorities, Task_States } from "@topconsultnpm/sdk-ts";
|
|
@@ -28,7 +28,7 @@ const TMTasksHeader = (props) => {
|
|
|
28
28
|
const isValidKey = (key) => {
|
|
29
29
|
return key !== FilterCategoryId.AllStates && key !== FilterCategoryId.AllPriorities;
|
|
30
30
|
};
|
|
31
|
-
return (_jsx(StyledListHeader, { ref: containerRef,
|
|
31
|
+
return (_jsx(StyledListHeader, { ref: containerRef, $color: color ?? 'black', $height: height ?? '100%', onContextMenu: handleContextMenu, children: _jsx(ScrollView, { width: "100%", height: "100%", direction: "horizontal", useNative: true, children: _jsxs(StyledViewChangerContainer, { children: [_jsx(TMTooltip, { content: SDKUI_Localizator.SelectViewMode, showEvent: "mouseenter", hideEvent: "mouseleave", position: "top", children: _jsx(TMDropDown, { elementStyle: { minWidth: "120px", width: "120px", height: "29px" }, dataSource: [
|
|
32
32
|
{ value: TaskView.AGENDA_TASK, display: "Agenda", icon: 'clock' },
|
|
33
33
|
{ value: TaskView.CALENDAR_TASK, display: SDKUI_Localizator.Calendar, icon: 'event' },
|
|
34
34
|
{ value: TaskView.LIST_TASK, display: SDKUI_Localizator.List, icon: 'fields' },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { PdGs, Priorities, SDK_Globals, Task_States } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { Extended_Task_States, FilterCategoryId, filterTreeTask, gotoPDGExtendedLabel, prioritiesResourceData, taskIsExpiringSoon } from "./TMTasksUtils";
|