@topconsultnpm/sdkui-react 6.22.0-dev2.40 → 6.22.0-dev2.42
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/features/documents/TMMergeToPdfForm.d.ts +1 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +30 -5
- package/lib/components/features/search/TMSearchResult.js +78 -78
- package/lib/devextreme-license.d.ts +1 -1
- package/lib/devextreme-license.js +1 -1
- package/lib/hooks/useDocumentOperations.js +5 -0
- package/package.json +1 -1
|
@@ -17,8 +17,7 @@ interface ITMMergeToPdfFormProps {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Form per l'unione di più documenti PDF in un singolo file.
|
|
20
|
-
* Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared
|
|
21
|
-
* con TMCopyToFolderForm.
|
|
20
|
+
* Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared con TMCopyToFolderForm.
|
|
22
21
|
*/
|
|
23
22
|
declare const TMMergeToPdfForm: (props: ITMMergeToPdfFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
23
|
export default TMMergeToPdfForm;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef, useState } from 'react';
|
|
3
3
|
import { DownloadTypes } from '../../../ts';
|
|
4
4
|
import { calcResponsiveSizes, getExceptionMessage, IconFolderOpen, IconPlay, IconUndo, SDKUI_Globals, SDKUI_Localizator, } from '../../../helper';
|
|
5
|
-
import { DcmtOpers, FileFormats, GeneralRetrieveFormats, ResultTypes, RetrieveFileOptions, ValidationItem, } from '@topconsultnpm/sdk-ts';
|
|
5
|
+
import { DcmtOpers, FileFormats, GeneralRetrieveFormats, InvoiceRetrieveFormats, OrderRetrieveFormats, ResultTypes, RetrieveFileOptions, ValidationItem, } from '@topconsultnpm/sdk-ts';
|
|
6
6
|
import TMModal from '../../base/TMModal';
|
|
7
7
|
import { useDeviceType } from '../../base/TMDeviceProvider';
|
|
8
8
|
import TMTextBox from '../../editors/TMTextBox';
|
|
@@ -18,10 +18,35 @@ import ShowAlert from '../../base/TMAlert';
|
|
|
18
18
|
import TMTooltip from '../../base/TMTooltip';
|
|
19
19
|
import MergePdfManager from '../../../helper/MergePdfManager';
|
|
20
20
|
import { TMResultManager } from '../../forms/TMResultDialog';
|
|
21
|
+
/**
|
|
22
|
+
* Converte il formato di visualizzazione fatture impostato dall'utente nel corrispondente formato PDF:
|
|
23
|
+
* il foglio di stile SDI resta SDI, in tutti gli altri casi si usa ASW.
|
|
24
|
+
*/
|
|
25
|
+
const toPdfInvoiceRetrieveFormat = (format) => {
|
|
26
|
+
switch (format) {
|
|
27
|
+
case InvoiceRetrieveFormats.SDI_HTML:
|
|
28
|
+
case InvoiceRetrieveFormats.SDI_PDF:
|
|
29
|
+
return InvoiceRetrieveFormats.SDI_PDF;
|
|
30
|
+
default:
|
|
31
|
+
return InvoiceRetrieveFormats.ASW_PDF;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Converte il formato di visualizzazione ordini impostato dall'utente nel corrispondente formato PDF:
|
|
36
|
+
* il foglio di stile NSO resta NSO, in tutti gli altri casi si usa ER.
|
|
37
|
+
*/
|
|
38
|
+
const toPdfOrderRetrieveFormat = (format) => {
|
|
39
|
+
switch (format) {
|
|
40
|
+
case OrderRetrieveFormats.NSO_HTML:
|
|
41
|
+
case OrderRetrieveFormats.NSO_PDF:
|
|
42
|
+
return OrderRetrieveFormats.NSO_PDF;
|
|
43
|
+
default:
|
|
44
|
+
return OrderRetrieveFormats.ER_PDF;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
21
47
|
/**
|
|
22
48
|
* Form per l'unione di più documenti PDF in un singolo file.
|
|
23
|
-
* Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared
|
|
24
|
-
* con TMCopyToFolderForm.
|
|
49
|
+
* Condivide TMDownloadRelationViewerSection e gli helper in copyAndMergeDcmtsShared con TMCopyToFolderForm.
|
|
25
50
|
*/
|
|
26
51
|
const TMMergeToPdfForm = (props) => {
|
|
27
52
|
const { mode, selectedDcmtInfos, selectedItemsFull, onClose, showTMRelationViewer, allTasks, getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers } = props;
|
|
@@ -169,8 +194,8 @@ const TMMergeToPdfForm = (props) => {
|
|
|
169
194
|
rfo.retrieveReason = DcmtOpers.None;
|
|
170
195
|
rfo.generalRetrieveFormat = GeneralRetrieveFormats.OriginalUnsigned;
|
|
171
196
|
rfo.cvtFormat = FileFormats.PDF;
|
|
172
|
-
rfo.invoiceRetrieveFormat = SDKUI_Globals.userSettings?.searchSettings.invoiceRetrieveFormat;
|
|
173
|
-
rfo.orderRetrieveFormat = SDKUI_Globals.userSettings?.searchSettings.orderRetrieveFormat;
|
|
197
|
+
rfo.invoiceRetrieveFormat = toPdfInvoiceRetrieveFormat(SDKUI_Globals.userSettings?.searchSettings.invoiceRetrieveFormat);
|
|
198
|
+
rfo.orderRetrieveFormat = toPdfOrderRetrieveFormat(SDKUI_Globals.userSettings?.searchSettings.orderRetrieveFormat);
|
|
174
199
|
const collectFileForMerge = async (file, dcmtInfo) => {
|
|
175
200
|
pdfFilesMap.set(`${dcmtInfo.TID}_${dcmtInfo.DID}`, file);
|
|
176
201
|
};
|
|
@@ -1510,9 +1510,9 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, operationItems, allUsers, i
|
|
|
1510
1510
|
return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [!isDataGridReady && (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%', width: '100%', gap: '10px' }, children: [_jsx(LoadIndicator, { height: 60, width: 60 }), _jsx("div", { children: SDKUI_Localizator.Loading })] })), isDataGridReady && _jsx(TMDataGrid, { ref: dataGridRef, id: "tm-search-result", keyExpr: "rowIndex", dataColumns: dataColumns, dataSource: dataSource, customizeColumns: customizeColumns, repaintChangesOnly: true, selectedRowKeys: selectedRowKeys, focusedRowKey: disableAutoFocus ? undefined : Number(focusedItem?.rowIndex ?? 0), showSearchPanel: showSearchTMDatagrid, showFilterPanel: true, sorting: { mode: "multiple" }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single' }, pageSize: pageSize, compactPager: compactPager, onSelectionChanged: handleSelectionChange, onFocusedRowChanged: handleFocusedRowChange, onRowDblClick: onRowDblClick, onContentReady: onContentReady, showHeaderColumnChooser: true, onKeyDown: onKeyDown, customContextMenuItems: operationItems, counterConfig: gridCounterConfig })] });
|
|
1511
1511
|
};
|
|
1512
1512
|
//#region TMSearchResultSelector
|
|
1513
|
-
const StyledItemTemplate = styled.div `
|
|
1514
|
-
background: ${(props) => props.$isSelected ? 'oklch(from var(--dx-color-primary) l c h / .2) !important' : 'transparent'};
|
|
1515
|
-
cursor: pointer;
|
|
1513
|
+
const StyledItemTemplate = styled.div `
|
|
1514
|
+
background: ${(props) => props.$isSelected ? 'oklch(from var(--dx-color-primary) l c h / .2) !important' : 'transparent'};
|
|
1515
|
+
cursor: pointer;
|
|
1516
1516
|
`;
|
|
1517
1517
|
const MemoizedStyledItemTemplate = React.memo(StyledItemTemplate);
|
|
1518
1518
|
const TMSearchResultSelector = ({ searchResults = [], disableAccordionIfSingleCategory = false, selectedTID, selectedSearchResult, autoSelectFirst = true, onSelectionChanged }) => {
|
|
@@ -1719,85 +1719,85 @@ const TMDcmtPreviewWrapper = ({ refreshPreviewTrigger, currentDcmt, isVisible, i
|
|
|
1719
1719
|
return (_jsx(TMDcmtPreview, { dcmtData: currentDcmt, onClosePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => setPanelVisibilityById('tmDcmtPreview', false) : undefined, onBack: onBack, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onMaximizePanel: (!isMobile && countVisibleLeafPanels() > 1) ? () => toggleMaximize("tmDcmtPreview") : undefined, isResizingActive: isResizingActive, isVisible: isVisible && isPageVisible }, refreshPreviewTrigger));
|
|
1720
1720
|
};
|
|
1721
1721
|
// Styled Components
|
|
1722
|
-
const StyledPlaceholder = styled.div `
|
|
1723
|
-
padding: 20px;
|
|
1724
|
-
text-align: center;
|
|
1725
|
-
color: #888;
|
|
1722
|
+
const StyledPlaceholder = styled.div `
|
|
1723
|
+
padding: 20px;
|
|
1724
|
+
text-align: center;
|
|
1725
|
+
color: #888;
|
|
1726
1726
|
`;
|
|
1727
|
-
const StyledIndexingInfoSection = styled.div `
|
|
1728
|
-
padding: 15px;
|
|
1729
|
-
border-top: 1px solid #e0e0e0;
|
|
1730
|
-
background: linear-gradient(to bottom, #f9f9f9, #f5f5f5);
|
|
1731
|
-
display: flex;
|
|
1732
|
-
flex-direction: column;
|
|
1733
|
-
gap: 10px;
|
|
1727
|
+
const StyledIndexingInfoSection = styled.div `
|
|
1728
|
+
padding: 15px;
|
|
1729
|
+
border-top: 1px solid #e0e0e0;
|
|
1730
|
+
background: linear-gradient(to bottom, #f9f9f9, #f5f5f5);
|
|
1731
|
+
display: flex;
|
|
1732
|
+
flex-direction: column;
|
|
1733
|
+
gap: 10px;
|
|
1734
1734
|
`;
|
|
1735
|
-
const StyledIndexingToggle = styled.button `
|
|
1736
|
-
display: flex;
|
|
1737
|
-
align-items: center;
|
|
1738
|
-
justify-content: space-between;
|
|
1739
|
-
width: 100%;
|
|
1740
|
-
padding: 10px 16px;
|
|
1741
|
-
background: white;
|
|
1742
|
-
border: 1px solid #d0d0d0;
|
|
1743
|
-
border-radius: 6px;
|
|
1744
|
-
cursor: ${props => props.disabled ? 'not-allowed' : 'pointer'};
|
|
1745
|
-
transition: all 0.2s ease;
|
|
1746
|
-
font-size: 14px;
|
|
1747
|
-
font-weight: 500;
|
|
1748
|
-
color: #333;
|
|
1749
|
-
opacity: ${props => props.disabled ? 0.6 : 1};
|
|
1750
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
1751
|
-
|
|
1752
|
-
&:hover:not(:disabled) {
|
|
1753
|
-
background: #f8f8f8;
|
|
1754
|
-
border-color: #2196F3;
|
|
1755
|
-
box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
&:active:not(:disabled) {
|
|
1759
|
-
transform: translateY(1px);
|
|
1760
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
1761
|
-
}
|
|
1735
|
+
const StyledIndexingToggle = styled.button `
|
|
1736
|
+
display: flex;
|
|
1737
|
+
align-items: center;
|
|
1738
|
+
justify-content: space-between;
|
|
1739
|
+
width: 100%;
|
|
1740
|
+
padding: 10px 16px;
|
|
1741
|
+
background: white;
|
|
1742
|
+
border: 1px solid #d0d0d0;
|
|
1743
|
+
border-radius: 6px;
|
|
1744
|
+
cursor: ${props => props.disabled ? 'not-allowed' : 'pointer'};
|
|
1745
|
+
transition: all 0.2s ease;
|
|
1746
|
+
font-size: 14px;
|
|
1747
|
+
font-weight: 500;
|
|
1748
|
+
color: #333;
|
|
1749
|
+
opacity: ${props => props.disabled ? 0.6 : 1};
|
|
1750
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
1751
|
+
|
|
1752
|
+
&:hover:not(:disabled) {
|
|
1753
|
+
background: #f8f8f8;
|
|
1754
|
+
border-color: #2196F3;
|
|
1755
|
+
box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
&:active:not(:disabled) {
|
|
1759
|
+
transform: translateY(1px);
|
|
1760
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
1761
|
+
}
|
|
1762
1762
|
`;
|
|
1763
|
-
const StyledLeftContent = styled.div `
|
|
1764
|
-
display: flex;
|
|
1765
|
-
align-items: center;
|
|
1766
|
-
gap: 8px;
|
|
1763
|
+
const StyledLeftContent = styled.div `
|
|
1764
|
+
display: flex;
|
|
1765
|
+
align-items: center;
|
|
1766
|
+
gap: 8px;
|
|
1767
1767
|
`;
|
|
1768
|
-
const StyledRightContent = styled.div `
|
|
1769
|
-
display: flex;
|
|
1770
|
-
align-items: center;
|
|
1771
|
-
gap: 8px;
|
|
1768
|
+
const StyledRightContent = styled.div `
|
|
1769
|
+
display: flex;
|
|
1770
|
+
align-items: center;
|
|
1771
|
+
gap: 8px;
|
|
1772
1772
|
`;
|
|
1773
|
-
const StyledChevron = styled.span `
|
|
1774
|
-
transition: transform 0.2s ease;
|
|
1775
|
-
transform: ${props => props.$isOpen ? 'rotate(180deg)' : 'rotate(0deg)'};
|
|
1776
|
-
color: #666;
|
|
1777
|
-
font-size: 12px;
|
|
1773
|
+
const StyledChevron = styled.span `
|
|
1774
|
+
transition: transform 0.2s ease;
|
|
1775
|
+
transform: ${props => props.$isOpen ? 'rotate(180deg)' : 'rotate(0deg)'};
|
|
1776
|
+
color: #666;
|
|
1777
|
+
font-size: 12px;
|
|
1778
1778
|
`;
|
|
1779
|
-
const StyledIndexingInfoBox = styled.div `
|
|
1780
|
-
position: relative;
|
|
1781
|
-
background: white;
|
|
1782
|
-
border: 1px solid #e0e0e0;
|
|
1783
|
-
border-radius: 6px;
|
|
1784
|
-
padding: 12px;
|
|
1785
|
-
max-height: 200px;
|
|
1786
|
-
overflow: auto;
|
|
1787
|
-
font-family: 'Courier New', monospace;
|
|
1788
|
-
font-size: 12px;
|
|
1789
|
-
color: #333;
|
|
1790
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
1791
|
-
animation: slideDown 0.2s ease;
|
|
1792
|
-
|
|
1793
|
-
@keyframes slideDown {
|
|
1794
|
-
from {
|
|
1795
|
-
opacity: 0;
|
|
1796
|
-
transform: translateY(-10px);
|
|
1797
|
-
}
|
|
1798
|
-
to {
|
|
1799
|
-
opacity: 1;
|
|
1800
|
-
transform: translateY(0);
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1779
|
+
const StyledIndexingInfoBox = styled.div `
|
|
1780
|
+
position: relative;
|
|
1781
|
+
background: white;
|
|
1782
|
+
border: 1px solid #e0e0e0;
|
|
1783
|
+
border-radius: 6px;
|
|
1784
|
+
padding: 12px;
|
|
1785
|
+
max-height: 200px;
|
|
1786
|
+
overflow: auto;
|
|
1787
|
+
font-family: 'Courier New', monospace;
|
|
1788
|
+
font-size: 12px;
|
|
1789
|
+
color: #333;
|
|
1790
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
1791
|
+
animation: slideDown 0.2s ease;
|
|
1792
|
+
|
|
1793
|
+
@keyframes slideDown {
|
|
1794
|
+
from {
|
|
1795
|
+
opacity: 0;
|
|
1796
|
+
transform: translateY(-10px);
|
|
1797
|
+
}
|
|
1798
|
+
to {
|
|
1799
|
+
opacity: 1;
|
|
1800
|
+
transform: translateY(0);
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
1803
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const licenseKey = "LCPv1
|
|
1
|
+
export declare const licenseKey = "LCPv1(%@j2<F<eQy:2N+f,7R@!i)BcQ,N374Qe%m;9etySj@gGntp77@@:<VJ77@j!_t<%yd-Siei,7FYV%!G>7a(cj%z3Ltv!ot1SeaicLr[3o,6>H:1(e,jSQt$3bREp%tv%H+4InRJ3J88Gn+aIidEee--SQVb,yVH7QRgSpm:2be9I%,;Z+Qmk%!<9jyG6%!6pLdQ6Lt<!N-Q%iR)6%fBIR+:2<)<!Qr->%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Auto-generated by devextreme-license.
|
|
2
2
|
// Do not commit this file to source control.
|
|
3
|
-
export const licenseKey = 'LCPv1
|
|
3
|
+
export const licenseKey = 'LCPv1(%@j2<F<eQy:2N+f,7R@!i)BcQ,N374Qe%m;9etySj@gGntp77@@:<VJ77@j!_t<%yd-Siei,7FYV%!G>7a(cj%z3Ltv!ot1SeaicLr[3o,6>H:1(e,jSQt$3bREp%tv%H+4InRJ3J88Gn+aIidEee--SQVb,yVH7QRgSpm:2be9I%,;Z+Qmk%!<9jyG6%!6pLdQ6Lt<!N-Q%iR)6%fBIR+:2<)<!Qr->%X<2p@62%!F2bR62<-$2i-)2i-FI%d@G<-@!jy$2iRQ6b-v!jyvIg!:ajzvaj@Fpg!$2b-FIp9;9K-:>Q4:G_@@9Qdv6<!F6<dFI7yFI7yFI7Ll';
|
|
@@ -1420,10 +1420,15 @@ export const useDocumentOperations = (props) => {
|
|
|
1420
1420
|
setArchiveRelatedDcmtFormTID(undefined);
|
|
1421
1421
|
setArchiveRelatedDcmtFormMids([]);
|
|
1422
1422
|
}, onSavedAsyncCallback: async (tid, did, metadataResult) => {
|
|
1423
|
+
const originDcmt = selectedDcmtInfos?.[0];
|
|
1423
1424
|
setIsOpenArchiveRelationForm(false);
|
|
1424
1425
|
setArchiveType(undefined);
|
|
1425
1426
|
setArchiveRelatedDcmtFormTID(undefined);
|
|
1426
1427
|
setArchiveRelatedDcmtFormMids([]);
|
|
1428
|
+
if (refreshFocusedDataRowAsync && originDcmt?.TID && originDcmt?.DID) {
|
|
1429
|
+
await refreshFocusedDataRowAsync(originDcmt.TID, originDcmt.DID, true);
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1427
1432
|
await onRefreshSearchAsyncDatagrid?.();
|
|
1428
1433
|
}, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, showDcmtFormSidebar: showDcmtFormSidebar, openFileUploaderPdfEditor: openFileUploaderPdfEditor, showTodoDcmtForm: showTodoDcmtForm, graphometricManager: graphometricManager }), showRelatedDcmtsChooser &&
|
|
1429
1434
|
_jsx(TMChooserForm, { dataSource: relatedDcmtsChooserDataSource, onChoose: async (selectedRelation) => {
|