@topconsultnpm/sdkui-react-beta 6.16.77 → 6.16.79
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.
|
@@ -8,10 +8,10 @@ import { DownloadTypes, FormModes } from '../../../ts';
|
|
|
8
8
|
import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
|
9
9
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
10
10
|
import { getWorkItemSetIDAsync, handleArchiveVisibility, searchResultToMetadataValues } from '../../../helper/queryHelper';
|
|
11
|
-
import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, svgToString, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow
|
|
11
|
+
import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, svgToString, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow } from '../../../helper';
|
|
12
12
|
import { hasDetailRelations, hasMasterRelations, isXMLFileExt } from '../../../helper/dcmtsHelper';
|
|
13
13
|
import { Gutters, TMColors } from '../../../utils/theme';
|
|
14
|
-
import {
|
|
14
|
+
import { StyledFormButtonsContainer, StyledLoadingContainer, StyledModalContainer, StyledSpinner, StyledToolbarCardContainer } from '../../base/Styled';
|
|
15
15
|
import ShowAlert from '../../base/TMAlert';
|
|
16
16
|
import TMButton from '../../base/TMButton';
|
|
17
17
|
import { TMExceptionBoxManager, TMMessageBoxManager, ButtonNames } from '../../base/TMPopUp';
|
|
@@ -74,7 +74,6 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
74
74
|
const [workItems, setWorkItems] = useState([]);
|
|
75
75
|
const [workflows, setWorkflows] = useState([]);
|
|
76
76
|
const [showCommentForm, setShowCommentForm] = useState(false);
|
|
77
|
-
const [zoomLevel, setZoomLevel] = useState(1);
|
|
78
77
|
const { openConfirmAttachmentsDialog, ConfirmAttachmentsDialog } = useInputAttachmentsDialog();
|
|
79
78
|
const { abortController, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync } = useDcmtOperations();
|
|
80
79
|
// Custom hook to manage workflow approval data
|
|
@@ -155,9 +154,6 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
155
154
|
TMSpinner.hide();
|
|
156
155
|
}
|
|
157
156
|
};
|
|
158
|
-
const handleZoomIn = () => setZoomLevel(z => Math.min(z + 0.2, 2));
|
|
159
|
-
const handleZoomOut = () => setZoomLevel(z => Math.max(z - 0.2, 0.4));
|
|
160
|
-
const formattedZoomLevel = `${Math.round(zoomLevel * 100)}%`;
|
|
161
157
|
useEffect(() => { setID(genUniqueId()); }, []);
|
|
162
158
|
useEffect(() => {
|
|
163
159
|
if (!inputFile || inputFile === null)
|
|
@@ -437,6 +433,9 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
437
433
|
SDKUI_Globals.userSettings.archivingSettings.mruTIDs = newMruTIDS;
|
|
438
434
|
onSaveRecents?.(newMruTIDS);
|
|
439
435
|
ShowAlert({ mode: 'success', title: 'Archiviazione', message: 'Il documento è stato archiviato con successo', duration: 3000 });
|
|
436
|
+
const isDuplication = layoutMode === LayoutModes.Ark && DID;
|
|
437
|
+
if (isDuplication)
|
|
438
|
+
onClose?.();
|
|
440
439
|
}
|
|
441
440
|
catch (err) {
|
|
442
441
|
TMExceptionBoxManager.show({ exception: err });
|
|
@@ -555,7 +554,7 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
555
554
|
}, children: _jsxs(StyledLoadingContainer, { children: [_jsx(StyledSpinner, {}), _jsx("span", { children: `${'Caricamento dati workflow'}...` })] }) }));
|
|
556
555
|
}
|
|
557
556
|
return (_jsxs("div", { style: { position: 'relative', width: '100%', height: '100%', display: 'flex', flexDirection: 'column', gap: 3 }, children: [workItems.length > 0
|
|
558
|
-
? _jsx(WFDiagram, { xmlDiagramString: workflows?.[0]?.diagram || '', currentSetID: workitemSetID })
|
|
557
|
+
? _jsx(WFDiagram, { xmlDiagramString: workflows?.[0]?.diagram || '', allowEdit: false, currentSetID: workitemSetID })
|
|
559
558
|
: _jsx("div", { style: {
|
|
560
559
|
position: 'absolute',
|
|
561
560
|
top: '50%',
|
|
@@ -564,35 +563,13 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
564
563
|
fontSize: '1.1rem',
|
|
565
564
|
color: TMColors.primaryColor,
|
|
566
565
|
textAlign: 'center',
|
|
567
|
-
}, children: SDKUI_Localizator.WorkitemsToApproveNone }), workItems.length > 0 &&
|
|
568
|
-
position: 'absolute',
|
|
569
|
-
left: 16,
|
|
570
|
-
bottom: workitemSetID || workItems.length <= 0 ? 16 : 64,
|
|
571
|
-
display: 'flex',
|
|
572
|
-
flexDirection: 'row',
|
|
573
|
-
background: 'transparent linear-gradient(180deg, #E03A8B 9%, #C2388B 34%, #A63B8D 60%, #943C8D 83%, #8F3C8D 100%) 0% 0% no-repeat padding-box',
|
|
574
|
-
gap: 5,
|
|
575
|
-
padding: 5,
|
|
576
|
-
borderRadius: 8,
|
|
577
|
-
color: 'white',
|
|
578
|
-
zIndex: 10,
|
|
579
|
-
alignItems: 'center'
|
|
580
|
-
}, children: [_jsx(StyledClickableIconWrapper, { onClick: handleZoomIn, "$disabled": zoomLevel >= 2, children: _jsx(IconZoomIn, { fontSize: 22 }) }), _jsx(StyledClickableIconWrapper, { onClick: handleZoomOut, "$disabled": zoomLevel <= 0.4, children: _jsx(IconZoomOut, { fontSize: 22 }) }), _jsx("span", { style: {
|
|
581
|
-
backgroundColor: 'white',
|
|
582
|
-
color: '#555',
|
|
583
|
-
fontSize: '0.9rem',
|
|
584
|
-
height: 32,
|
|
585
|
-
display: 'flex',
|
|
586
|
-
alignItems: 'center',
|
|
587
|
-
padding: '0 8px',
|
|
588
|
-
borderRadius: 4
|
|
589
|
-
}, children: formattedZoomLevel })] }), !workitemSetID && workItems.length > 0 &&
|
|
566
|
+
}, children: SDKUI_Localizator.WorkitemsToApproveNone }), !workitemSetID && workItems.length > 0 &&
|
|
590
567
|
_jsx("div", { style: {
|
|
591
568
|
padding: 5,
|
|
592
569
|
backgroundColor: 'khaki',
|
|
593
570
|
borderRadius: 8
|
|
594
571
|
}, children: SDKUI_Localizator.WorkItemTechnicalNote_SetID })] }));
|
|
595
|
-
}, [workflows, formData, workitemSetID, workItems,
|
|
572
|
+
}, [workflows, formData, workitemSetID, workItems, isWFDataLoading]);
|
|
596
573
|
const normalizedTID = TID !== undefined ? Number(TID) : undefined;
|
|
597
574
|
const defaultPanelDimensions = {
|
|
598
575
|
'tmDcmtForm': { width: '20%', height: '100%' },
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
|
3
3
|
import { DiagramItemTypes, ArrowSymbol } from './interfaces';
|
|
4
4
|
import { parseWfDiagramXml, serializeWfDiagramToXml } from './xmlParser';
|
|
5
|
-
import styled from 'styled-components';
|
|
5
|
+
import styled, { keyframes } from 'styled-components';
|
|
6
6
|
import { CultureIDs, SearchEngine, WFAppTypes, WorkItemStatus } from "@topconsultnpm/sdk-ts-beta";
|
|
7
7
|
import ConnectionComponent from './ConnectionComponent';
|
|
8
8
|
import DiagramItemComponent from './DiagramItemComponent';
|
|
@@ -80,6 +80,17 @@ const CanvasContainer = styled.div `
|
|
|
80
80
|
display: flex;
|
|
81
81
|
overflow: hidden; /* Ensure content doesn't overflow when panels are collapsed */
|
|
82
82
|
`;
|
|
83
|
+
const pulse = keyframes `
|
|
84
|
+
0% {
|
|
85
|
+
box-shadow: 0 0 0 0px rgba(0, 123, 255, 0.7); /* Colore #007bff */
|
|
86
|
+
}
|
|
87
|
+
70% {
|
|
88
|
+
box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
|
|
89
|
+
}
|
|
90
|
+
100% {
|
|
91
|
+
box-shadow: 0 0 0 0px rgba(0, 123, 255, 0);
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
83
94
|
const ToolbarContainer = styled.div `
|
|
84
95
|
display: flex;
|
|
85
96
|
gap: 5px;
|
|
@@ -108,6 +119,8 @@ const ToolbarContainer = styled.div `
|
|
|
108
119
|
overflow-y: auto;
|
|
109
120
|
|
|
110
121
|
button {
|
|
122
|
+
|
|
123
|
+
|
|
111
124
|
background: none;
|
|
112
125
|
border: none;
|
|
113
126
|
cursor: pointer;
|
|
@@ -116,6 +129,8 @@ const ToolbarContainer = styled.div `
|
|
|
116
129
|
align-items: center;
|
|
117
130
|
justify-content: ${props => props.$isCollapsed || props.$isFloating ? 'center' : 'flex-start'}; // Centra icone in entrambe le modalità
|
|
118
131
|
white-space: nowrap;
|
|
132
|
+
position: relative;
|
|
133
|
+
transition: background-color 0.3s, box-shadow 0.3s;
|
|
119
134
|
|
|
120
135
|
svg {
|
|
121
136
|
color: white;
|
|
@@ -266,7 +281,7 @@ const DiagramMessage = styled.div `
|
|
|
266
281
|
color: #555;
|
|
267
282
|
text-align: center;
|
|
268
283
|
`;
|
|
269
|
-
const WFDiagram = ({ xmlDiagramString, currentSetID, onDiagramChange }) => {
|
|
284
|
+
const WFDiagram = ({ xmlDiagramString, currentSetID, allowEdit = true, onDiagramChange }) => {
|
|
270
285
|
const [isReadOnly, setIsReadOnly] = useState(true);
|
|
271
286
|
const [isFullScreen, setIsFullScreen] = useState(false);
|
|
272
287
|
const [zoomLevel, setZoomLevel] = useState(1);
|
|
@@ -1548,7 +1563,7 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, onDiagramChange }) => {
|
|
|
1548
1563
|
}
|
|
1549
1564
|
}, [wfDiagram]);
|
|
1550
1565
|
const diagramContent = (_jsxs(CanvasContainer, { children: [_jsx("input", { ref: fileInputRef, type: "file", accept: ".xml" // Filtra per file XML
|
|
1551
|
-
, onChange: handleFileChange, style: { display: 'none' } }), _jsxs(ToolbarContainer, { "$isCollapsed": isToolbarCollapsed, "$isFloating": isToolbarFloating, "$isToolboxVisible": isToolboxVisible, "$isReadOnly": isReadOnly, children: [_jsx(ButtonGroup, { "$isFloating": isToolbarFloating, children: _jsxs("button", { onClick: toggleReadOnlyMode, title: "Progettazione", children: [isReadOnly ? _jsx(IconPencil, {}) : _jsx(IconLock, {}), !isToolbarCollapsed && _jsx("span", { children: isReadOnly ? 'Progettazione' : 'Sola lettura' })] }) }), _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [!isReadOnly && _jsxs("button", { onClick: handleToggleToolboxVisibility, title: "Show toolbox", children: [_jsx(IconFlowChart, {}), !isToolbarCollapsed && _jsx("span", { children: "Mostra/nascondi toolbox" })] }), _jsxs("button", { onClick: toggleFullScreenMode, title: "Show full screen", children: [_jsx(IconWindowMaximize, {}), !isToolbarCollapsed && _jsx("span", { children: "Mostra tutto schermo" })] })] }), _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [_jsxs("button", { onClick: handleZoomIn, title: "Zoom in", children: [_jsx(IconZoomIn, {}), !isToolbarCollapsed && _jsx("span", { children: "Zoom in" })] }), _jsxs("button", { onClick: handleZoomOut, title: "Zoom out", children: [_jsx(IconZoomOut, {}), !isToolbarCollapsed && _jsx("span", { children: "Zoom out" })] }), _jsx(ZoomLevelText, { "$isFloating": isToolbarFloating, "$isCollapsed": isToolbarCollapsed, children: formattedZoomLevel })] }), !isReadOnly && _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [_jsxs("button", { onClick: handleUndo, disabled: historyIndex === 0, title: "Undo", children: [_jsx(IconUndo, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Undo" })] }), _jsxs("button", { onClick: handleRedo, disabled: historyIndex === wfDiagramHistory.length - 1, title: "Redo", children: [_jsx(IconUndo, { style: { transform: 'scaleX(-1)' } }), " ", !isToolbarCollapsed && _jsx("span", { children: "Redo" })] }), _jsxs("button", { onClick: handleRestore, title: "Restore", children: [_jsx(IconRestore, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Restore" })] }), _jsxs("button", { onClick: handleNew, title: "New diagram", disabled: isReadOnly, children: [_jsx(IconNew, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "New" })] }), _jsxs("button", { onClick: handleExportDiagram, disabled: isReadOnly || !wfDiagram, title: SDKUI_Localizator.Export || 'Export Diagram', children: [_jsx(IconExport, {}), _jsx("span", { children: SDKUI_Localizator.Export || 'Export' })] }), _jsxs("button", { onClick: handleImportDiagramClick, disabled: isReadOnly, title: SDKUI_Localizator.Import || 'Import Diagram', children: [_jsx(IconImport, {}), _jsx("span", { children: SDKUI_Localizator.Import || 'Import' })] })] }), !isReadOnly && _jsx(ButtonGroup, { "$isFloating": isToolbarFloating, children: _jsxs("button", { onClick: handleAutoAdjust, title: "Auto adjust", children: [_jsx(IconAdjust, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Auto Adjust" })] }) }), !isReadOnly && _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [_jsxs("button", { onClick: handleCopy, disabled: selectedItems.size === 0, title: "Copy", children: [_jsx(IconCopy, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Copy" })] }), _jsxs("button", { onClick: handleCut, disabled: selectedItems.size === 0, title: "Cut", children: [_jsx(IconCut, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Cut" })] }), _jsxs("button", { onClick: handlePaste, disabled: copiedItems.length === 0 && copiedConnections.length === 0, title: "Paste", children: [_jsx(IconPaste, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Paste" })] })] }), _jsxs("button", { onClick: handleToggleToolbarMode, title: isToolbarFloating ? "Dock Toolbar" : "Float Toolbar", children: [isToolbarFloating ? _jsx(IconPin, {}) : _jsx(IconUnpin, {}), !isToolbarCollapsed && !isToolbarFloating && _jsx("span", { children: "Toggle Mode" })] }), !isToolbarFloating && _jsx(ToolbarToggle, { onClick: () => setIsToolbarCollapsed(!isToolbarCollapsed), title: isToolbarCollapsed ? "Expand Toolbar" : "Collapse Toolbar", children: isToolbarCollapsed ? _jsx(IconChevronRight, {}) : _jsx(IconCloseOutline, {}) })] }), !isReadOnly && (_jsx(ToolboxContainer, { "$isVisible": isToolboxVisible, children: isToolboxVisible && availableItemTypes.map(type => (_jsxs(ToolboxItem, { draggable: true, onDragStart: (e) => handleToolboxDragStart(e, type), onDragEnd: handleToolboxDragEnd, children: [_jsx(DiagramItemSvgContent, { itemType: type, width: 40, height: 40, isToolboxPreview: true }), _jsx("span", { children: DiagramItemTypes[type] })] }, type))) })), _jsx(SvgScrollContainer, { children: isLoading ?
|
|
1566
|
+
, onChange: handleFileChange, style: { display: 'none' } }), _jsxs(ToolbarContainer, { "$isCollapsed": isToolbarCollapsed, "$isFloating": isToolbarFloating, "$isToolboxVisible": isToolboxVisible, "$isReadOnly": isReadOnly, children: [allowEdit && _jsx(ButtonGroup, { "$isFloating": isToolbarFloating, children: _jsxs("button", { onClick: toggleReadOnlyMode, title: "Progettazione", children: [isReadOnly ? _jsx(IconPencil, {}) : _jsx(IconLock, {}), !isToolbarCollapsed && _jsx("span", { children: isReadOnly ? 'Progettazione' : 'Sola lettura' })] }) }), allowEdit && _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [!isReadOnly && _jsxs("button", { onClick: handleToggleToolboxVisibility, title: "Show toolbox", children: [_jsx(IconFlowChart, {}), !isToolbarCollapsed && _jsx("span", { children: "Mostra/nascondi toolbox" })] }), _jsxs("button", { onClick: toggleFullScreenMode, title: "Show full screen", children: [_jsx(IconWindowMaximize, {}), !isToolbarCollapsed && _jsx("span", { children: "Mostra tutto schermo" })] })] }), _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [_jsxs("button", { onClick: handleZoomIn, title: "Zoom in", children: [_jsx(IconZoomIn, {}), !isToolbarCollapsed && _jsx("span", { children: "Zoom in" })] }), _jsxs("button", { onClick: handleZoomOut, title: "Zoom out", children: [_jsx(IconZoomOut, {}), !isToolbarCollapsed && _jsx("span", { children: "Zoom out" })] }), _jsx(ZoomLevelText, { "$isFloating": isToolbarFloating, "$isCollapsed": isToolbarCollapsed, children: formattedZoomLevel })] }), !isReadOnly && _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [_jsxs("button", { onClick: handleUndo, disabled: historyIndex === 0, title: "Undo", children: [_jsx(IconUndo, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Undo" })] }), _jsxs("button", { onClick: handleRedo, disabled: historyIndex === wfDiagramHistory.length - 1, title: "Redo", children: [_jsx(IconUndo, { style: { transform: 'scaleX(-1)' } }), " ", !isToolbarCollapsed && _jsx("span", { children: "Redo" })] }), _jsxs("button", { onClick: handleRestore, title: "Restore", children: [_jsx(IconRestore, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Restore" })] }), _jsxs("button", { onClick: handleNew, title: "New diagram", disabled: isReadOnly, children: [_jsx(IconNew, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "New" })] }), _jsxs("button", { onClick: handleExportDiagram, disabled: isReadOnly || !wfDiagram, title: SDKUI_Localizator.Export || 'Export Diagram', children: [_jsx(IconExport, {}), _jsx("span", { children: SDKUI_Localizator.Export || 'Export' })] }), _jsxs("button", { onClick: handleImportDiagramClick, disabled: isReadOnly, title: SDKUI_Localizator.Import || 'Import Diagram', children: [_jsx(IconImport, {}), _jsx("span", { children: SDKUI_Localizator.Import || 'Import' })] })] }), !isReadOnly && _jsx(ButtonGroup, { "$isFloating": isToolbarFloating, children: _jsxs("button", { onClick: handleAutoAdjust, title: "Auto adjust", children: [_jsx(IconAdjust, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Auto Adjust" })] }) }), !isReadOnly && _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [_jsxs("button", { onClick: handleCopy, disabled: selectedItems.size === 0, title: "Copy", children: [_jsx(IconCopy, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Copy" })] }), _jsxs("button", { onClick: handleCut, disabled: selectedItems.size === 0, title: "Cut", children: [_jsx(IconCut, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Cut" })] }), _jsxs("button", { onClick: handlePaste, disabled: copiedItems.length === 0 && copiedConnections.length === 0, title: "Paste", children: [_jsx(IconPaste, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Paste" })] })] }), allowEdit && _jsxs("button", { onClick: handleToggleToolbarMode, title: isToolbarFloating ? "Dock Toolbar" : "Float Toolbar", children: [isToolbarFloating ? _jsx(IconPin, {}) : _jsx(IconUnpin, {}), !isToolbarCollapsed && !isToolbarFloating && _jsx("span", { children: "Toggle Mode" })] }), !isToolbarFloating && _jsx(ToolbarToggle, { onClick: () => setIsToolbarCollapsed(!isToolbarCollapsed), title: isToolbarCollapsed ? "Expand Toolbar" : "Collapse Toolbar", children: isToolbarCollapsed ? _jsx(IconChevronRight, {}) : _jsx(IconCloseOutline, {}) })] }), !isReadOnly && (_jsx(ToolboxContainer, { "$isVisible": isToolboxVisible, children: isToolboxVisible && availableItemTypes.map(type => (_jsxs(ToolboxItem, { draggable: true, onDragStart: (e) => handleToolboxDragStart(e, type), onDragEnd: handleToolboxDragEnd, children: [_jsx(DiagramItemSvgContent, { itemType: type, width: 40, height: 40, isToolboxPreview: true }), _jsx("span", { children: DiagramItemTypes[type] })] }, type))) })), _jsx(SvgScrollContainer, { children: isLoading ?
|
|
1552
1567
|
(_jsxs(StyledLoadingContainer, { children: [_jsx(StyledSpinner, {}), _jsx("span", { children: `${'Caricamento diagramma'}...` })] })) : wfDiagram ? (_jsx(StyledSvg, { ref: svgRef, tabIndex: 0, onKeyDownCapture: handleKeyDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseDown: handleMouseDown, onDrop: handleDropOnCanvas, onDragOver: handleDragOver, width: svgWidth, height: svgHeight, children: _jsxs(ScalableGroup, { "$scale": zoomLevel, "$translateX": translateX, "$translateY": translateY, children: [wfDiagram?.DiagramItems.map(item => (_jsx(DiagramItemComponent, { wf: wfDiagram?.Info, readOnly: isReadOnly, item: item, isSelected: selectedItems.has(item.ID), isCurrent: item.ID === currentSetID, onClick: handleDiagramItemClick, onDrag: handleDrag, onDragEnd: handleDragEnd, onConnectorMouseDown: handleConnectorMouseDown, onConnectorMouseUp: handleConnectorMouseUp, onDimensionsChange: handleItemDimensionsChange, onDoubleClick: handleDoubleClickItem }, item.ID))), calculatedConnections.map(connection => {
|
|
1553
1568
|
const sourceItem = wfDiagram?.DiagramItems.find(item => item.ID === connection.Source.ParentDiagramItem.ID);
|
|
1554
1569
|
const sinkItem = wfDiagram?.DiagramItems.find(item => item.ID === connection.Sink.ParentDiagramItem.ID);
|