@topconsultnpm/sdkui-react-beta 6.15.92 → 6.15.94
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/base/Styled.d.ts +2 -0
- package/lib/components/base/Styled.js +24 -0
- package/lib/components/features/documents/TMDcmtForm.js +44 -12
- package/lib/components/features/workflow/diagram/WFDiagram.js +31 -14
- package/lib/components/forms/TMChooserForm.js +2 -2
- package/lib/helper/SDKUI_Localizator.d.ts +3 -0
- package/lib/helper/SDKUI_Localizator.js +30 -0
- package/package.json +1 -1
|
@@ -51,6 +51,8 @@ export declare const StyledBtnLoadChart: import("styled-components/dist/types").
|
|
|
51
51
|
}>> & string;
|
|
52
52
|
export declare const StyledFormButtonsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
53
53
|
export declare const StyledToolbarCardContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
54
|
+
export declare const StyledSpinner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
55
|
+
export declare const StyledLoadingContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
54
56
|
export declare const StyledAnimatedComponentScaleColor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
55
57
|
$delay?: string;
|
|
56
58
|
$scale?: number;
|
|
@@ -252,6 +252,30 @@ export const StyledToolbarCardContainer = styled.div `
|
|
|
252
252
|
flex-direction: column;
|
|
253
253
|
gap: 10px;
|
|
254
254
|
`;
|
|
255
|
+
const spinAnimation = keyframes `
|
|
256
|
+
0% { transform: rotate(0deg); }
|
|
257
|
+
100% { transform: rotate(360deg); }
|
|
258
|
+
`;
|
|
259
|
+
export const StyledSpinner = styled.div `
|
|
260
|
+
border: 4px solid #f3f3f3; /* Light grey */
|
|
261
|
+
border-top: 4px solid #C2388B; /* Colore primario della toolbar */
|
|
262
|
+
border-radius: 50%;
|
|
263
|
+
width: 40px;
|
|
264
|
+
height: 40px;
|
|
265
|
+
animation: ${spinAnimation} 1s linear infinite;
|
|
266
|
+
`;
|
|
267
|
+
export const StyledLoadingContainer = styled.div `
|
|
268
|
+
position: absolute;
|
|
269
|
+
top: 50%;
|
|
270
|
+
left: 50%;
|
|
271
|
+
transform: translate(-50%, -50%);
|
|
272
|
+
display: flex;
|
|
273
|
+
flex-direction: column;
|
|
274
|
+
align-items: center;
|
|
275
|
+
gap: 15px;
|
|
276
|
+
font-size: 1rem;
|
|
277
|
+
color: #555;
|
|
278
|
+
`;
|
|
255
279
|
//#region Animations
|
|
256
280
|
const scaleAndColorChange = (scaleValue) => keyframes `
|
|
257
281
|
0% { transform: scale(1); color: white; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import TMDcmtPreview from './TMDcmtPreview';
|
|
4
|
-
import { AccessLevels, ArchiveConstraints, ArchiveEngineByID, DcmtTypeListCacheService, LayoutModes, MetadataDataTypes, ResultTypes, SDK_Globals, SDK_Localizator, SystemMIDsAsNumber, SystemTIDs, Task_States, TemplateTIDs,
|
|
4
|
+
import { AccessLevels, ArchiveConstraints, ArchiveEngineByID, DcmtTypeListCacheService, LayoutModes, MetadataDataTypes, ResultTypes, SDK_Globals, SDK_Localizator, SystemMIDsAsNumber, SystemTIDs, Task_States, TemplateTIDs, UpdateEngineByID, ValidationItem, WorkflowCacheService, WorkItemMetadataNames } from '@topconsultnpm/sdk-ts-beta';
|
|
5
5
|
import { ContextMenu } from 'devextreme-react';
|
|
6
6
|
import { WorkFlowApproveRejectPopUp, WorkFlowMoreInfoPopUp, WorkFlowOperationButtons, WorkFlowReAssignPopUp } from '../workflow/TMWorkflowPopup';
|
|
7
7
|
import { DownloadTypes, FormModes } from '../../../ts';
|
|
@@ -11,7 +11,7 @@ import { handleArchiveVisibility, searchResultToMetadataValues } from '../../../
|
|
|
11
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, IconZoomIn, IconZoomOut } from '../../../helper';
|
|
12
12
|
import { hasDetailRelations, hasMasterRelations, isXMLFileExt } from '../../../helper/dcmtsHelper';
|
|
13
13
|
import { Gutters, TMColors } from '../../../utils/theme';
|
|
14
|
-
import { StyledClickableIconWrapper, StyledFormButtonsContainer, StyledModalContainer, StyledToolbarCardContainer } from '../../base/Styled';
|
|
14
|
+
import { StyledClickableIconWrapper, 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';
|
|
@@ -70,6 +70,7 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
70
70
|
const [focusedMetadataValue, setFocusedMetadataValue] = useState();
|
|
71
71
|
const [showAll, setShowAll] = useState(layoutMode === LayoutModes.Ark);
|
|
72
72
|
const [fetchError, setFetchError] = useState(false);
|
|
73
|
+
const [isWFDataLoading, setIsWFDataLoading] = useState(false);
|
|
73
74
|
const [workItems, setWorkItems] = useState([]);
|
|
74
75
|
const [workflows, setWorkflows] = useState([]);
|
|
75
76
|
const [showCommentForm, setShowCommentForm] = useState(false);
|
|
@@ -210,27 +211,32 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
210
211
|
return;
|
|
211
212
|
if (!DID) {
|
|
212
213
|
setWorkItems([]);
|
|
214
|
+
setWorkflows([]); // Assicurati di pulire anche i workflows
|
|
213
215
|
return;
|
|
214
216
|
}
|
|
217
|
+
setIsWFDataLoading(true);
|
|
215
218
|
let items = [];
|
|
216
|
-
// Cerchiamo tutti i workitem(S) associati al DID corrente
|
|
219
|
+
// Cerchiamo tutti i workitem(S) associati al DID corrente...
|
|
217
220
|
for (const workflow of workflowApproveData) {
|
|
218
221
|
for (const dataRow of workflow.dtdResult?.rows ?? []) {
|
|
219
222
|
let did = Number(dataRow?.[1]);
|
|
220
223
|
if (did === Number(DID)) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
w
|
|
224
|
+
const index = workflow.dtdResult?.columns?.findIndex(o => o.caption === WorkItemMetadataNames.WI_SetID);
|
|
225
|
+
const setID = (index && index >= 0) ? dataRow[index] : undefined;
|
|
226
|
+
let w = { tid: Number(dataRow?.[0]), did: did, setID: setID };
|
|
224
227
|
items.push(w);
|
|
225
228
|
}
|
|
226
229
|
}
|
|
227
230
|
}
|
|
228
|
-
|
|
229
|
-
// Attendi tutte le chiamate async e aggiorna lo stato solo quando tutte sono terminate
|
|
231
|
+
// Attendi tutte le chiamate async...
|
|
230
232
|
Promise.all(items.map(item => WorkflowCacheService.GetWFInfoAsync(item.tid)))
|
|
231
233
|
.then(results => {
|
|
232
234
|
// Filtra solo i workflow validi
|
|
233
235
|
setWorkflows(results.filter(Boolean));
|
|
236
|
+
})
|
|
237
|
+
.finally(() => {
|
|
238
|
+
setWorkItems(items);
|
|
239
|
+
setIsWFDataLoading(false);
|
|
234
240
|
});
|
|
235
241
|
}, [workflowApproveData, DID, layoutMode]);
|
|
236
242
|
const getSelectionDcmtInfo = () => {
|
|
@@ -480,6 +486,7 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
480
486
|
};
|
|
481
487
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
482
488
|
const isApprView = fromDTD?.templateTID === TemplateTIDs.WF_WIApprView;
|
|
489
|
+
const WIsetIdValue = workItems.find(o => o.did === Number(DID))?.setID || formData.find(o => o.md?.name === WorkItemMetadataNames.WI_SetID)?.value;
|
|
483
490
|
useEffect(() => {
|
|
484
491
|
if ((isApprView || TID === SystemTIDs.Drafts) && !showAll)
|
|
485
492
|
setShowAll(true);
|
|
@@ -507,10 +514,30 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
507
514
|
setDcmtFile(setFile);
|
|
508
515
|
} }), [currentDcmt, dcmtFile, deviceType, fromDTD, layoutMode, inputFile]);
|
|
509
516
|
const tmWF = useMemo(() => {
|
|
510
|
-
|
|
517
|
+
if (isWFDataLoading) {
|
|
518
|
+
return (_jsx("div", { style: {
|
|
519
|
+
display: 'flex',
|
|
520
|
+
alignItems: 'center',
|
|
521
|
+
justifyContent: 'center',
|
|
522
|
+
width: '100%',
|
|
523
|
+
height: '100%',
|
|
524
|
+
minHeight: '200px' // Evita salti nel layout
|
|
525
|
+
}, children: _jsxs(StyledLoadingContainer, { children: [_jsx(StyledSpinner, {}), _jsx("span", { children: `${'Caricamento dati workflow'}...` })] }) }));
|
|
526
|
+
}
|
|
527
|
+
return (_jsxs("div", { style: { position: 'relative', width: '100%', height: '100%', display: 'flex', flexDirection: 'column', gap: 3 }, children: [workItems.length > 0
|
|
528
|
+
? _jsx(WFDiagram, { xmlDiagramString: workflows?.[0]?.diagram || '', currentSetID: WIsetIdValue, readOnly: true, zoomLevel: zoomLevel, translateX: 0, translateY: 0 })
|
|
529
|
+
: _jsx("div", { style: {
|
|
530
|
+
position: 'absolute',
|
|
531
|
+
top: '50%',
|
|
532
|
+
left: '50%',
|
|
533
|
+
transform: 'translate(-50%, -50%)',
|
|
534
|
+
fontSize: '1.1rem',
|
|
535
|
+
color: TMColors.primaryColor,
|
|
536
|
+
textAlign: 'center',
|
|
537
|
+
}, children: SDKUI_Localizator.WorkflowNoInstances }), workItems.length > 0 && _jsxs("div", { style: {
|
|
511
538
|
position: 'absolute',
|
|
512
539
|
left: 16,
|
|
513
|
-
bottom: 16,
|
|
540
|
+
bottom: WIsetIdValue || workItems.length <= 0 ? 16 : 64,
|
|
514
541
|
display: 'flex',
|
|
515
542
|
flexDirection: 'row',
|
|
516
543
|
background: 'transparent linear-gradient(180deg, #E03A8B 9%, #C2388B 34%, #A63B8D 60%, #943C8D 83%, #8F3C8D 100%) 0% 0% no-repeat padding-box',
|
|
@@ -529,8 +556,13 @@ const TMDcmtForm = ({ showHeader = true, onSaveRecents, layoutMode = LayoutModes
|
|
|
529
556
|
alignItems: 'center',
|
|
530
557
|
padding: '0 8px',
|
|
531
558
|
borderRadius: 4
|
|
532
|
-
}, children: formattedZoomLevel })] })
|
|
533
|
-
|
|
559
|
+
}, children: formattedZoomLevel })] }), !WIsetIdValue && workItems.length > 0 &&
|
|
560
|
+
_jsx("div", { style: {
|
|
561
|
+
padding: 5,
|
|
562
|
+
backgroundColor: 'khaki',
|
|
563
|
+
borderRadius: 8
|
|
564
|
+
}, children: SDKUI_Localizator.WorkItemTechnicalNote_SetID })] }));
|
|
565
|
+
}, [workflows, formData, WIsetIdValue, workItems, zoomLevel, handleZoomIn, handleZoomOut]);
|
|
534
566
|
const normalizedTID = TID !== undefined ? Number(TID) : undefined;
|
|
535
567
|
const defaultPanelDimensions = {
|
|
536
568
|
'tmDcmtForm': { width: '20%', height: '100%' },
|
|
@@ -8,9 +8,10 @@ import ConnectionComponent from './ConnectionComponent';
|
|
|
8
8
|
import DiagramItemComponent from './DiagramItemComponent';
|
|
9
9
|
import DiagramItemSvgContent from './DiagramItemSvgContent';
|
|
10
10
|
import { calculateArrowAngle, getConnectionPoint, isConnectionNonLinear, validateDiagram } from './workflowHelpers';
|
|
11
|
-
import { IconFlowChart, IconUndo, IconRestore, IconAdjust, IconCopy, IconCut, IconPaste, IconPin, IconUnpin, IconChevronRight, IconCloseOutline, IconNew } from '../../../../helper';
|
|
11
|
+
import { IconFlowChart, IconUndo, IconRestore, IconAdjust, IconCopy, IconCut, IconPaste, IconPin, IconUnpin, IconChevronRight, IconCloseOutline, IconNew, SDKUI_Localizator } from '../../../../helper';
|
|
12
12
|
import TMModal from '../../../base/TMModal';
|
|
13
13
|
import { TMExceptionBoxManager } from '../../../base/TMPopUp';
|
|
14
|
+
import { StyledLoadingContainer, StyledSpinner } from '../../../base/Styled';
|
|
14
15
|
const CanvasContainer = styled.div `
|
|
15
16
|
position: relative;
|
|
16
17
|
width: 100%;
|
|
@@ -201,6 +202,7 @@ const DiagramMessage = styled.div `
|
|
|
201
202
|
text-align: center;
|
|
202
203
|
`;
|
|
203
204
|
const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel = 1, translateX = 0, translateY = 0 }) => {
|
|
205
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
204
206
|
const [wfDiagram, setWfDiagram] = useState(null);
|
|
205
207
|
const [selectedItems, setSelectedItems] = useState(new Set());
|
|
206
208
|
const [selectedConnections, setSelectedConnections] = useState(new Set());
|
|
@@ -265,18 +267,33 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel
|
|
|
265
267
|
return { svgWidth: Math.max(0, totalWidth * zoomLevel), svgHeight: Math.max(0, totalHeight * zoomLevel) };
|
|
266
268
|
}, [wfDiagram, zoomLevel]);
|
|
267
269
|
useEffect(() => {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
setIsLoading(true); // Imposta il caricamento all'avvio dell'effetto
|
|
271
|
+
const processDiagram = () => {
|
|
272
|
+
try {
|
|
273
|
+
let newDiagram = null;
|
|
274
|
+
if (xmlDiagramString) {
|
|
275
|
+
newDiagram = parseWfDiagramXml(xmlDiagramString);
|
|
276
|
+
if (newDiagram) {
|
|
277
|
+
newDiagram = autoAdjustDiagram(newDiagram);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
setWfDiagram(newDiagram);
|
|
281
|
+
initialDiagramRef.current = newDiagram;
|
|
282
|
+
setWfDiagramHistory(newDiagram ? [newDiagram] : []);
|
|
283
|
+
setHistoryIndex(newDiagram ? 0 : -1);
|
|
274
284
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
285
|
+
catch (error) {
|
|
286
|
+
console.error("Errore durante l'elaborazione del diagramma:", error);
|
|
287
|
+
setWfDiagram(null); // Assicurati che il diagramma sia nullo in caso di errore
|
|
288
|
+
}
|
|
289
|
+
finally {
|
|
290
|
+
setIsLoading(false); // Termina il caricamento, sia in caso di successo che di errore
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
// Utilizziamo un timeout di 0ms per consentire a React di renderizzare lo stato di caricamento
|
|
294
|
+
// prima di eseguire il calcolo potenzialmente pesante, evitando che il browser si blocchi.
|
|
295
|
+
const timerId = setTimeout(processDiagram, 0);
|
|
296
|
+
return () => clearTimeout(timerId); // Pulisce il timeout se il componente viene smontato
|
|
280
297
|
}, [xmlDiagramString]);
|
|
281
298
|
useEffect(() => {
|
|
282
299
|
if (isUndoingRedoing.current) {
|
|
@@ -1322,7 +1339,7 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel
|
|
|
1322
1339
|
// DiagramItemTypes.SignAndTimeStamp
|
|
1323
1340
|
];
|
|
1324
1341
|
}, []);
|
|
1325
|
-
return (_jsxs(CanvasContainer, { children: [!readOnly && (_jsxs(ToolbarContainer, { "$isCollapsed": isToolbarCollapsed, "$isFloating": isToolbarFloating, "$isToolboxVisible": isToolboxVisible, children: [_jsx(ButtonGroup, { "$isFloating": isToolbarFloating, children: _jsxs("button", { onClick: handleToggleToolboxVisibility, title: "Show toolbox", children: [_jsx(IconFlowChart, {}), !isToolbarCollapsed && _jsx("span", { children: "Mostra/nascondi toolbox" })] }) }), _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: readOnly, children: [_jsx(IconNew, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "New" })] })] }), _jsx(ButtonGroup, { "$isFloating": isToolbarFloating, children: _jsxs("button", { onClick: handleAutoAdjust, title: "Auto adjust", children: [_jsx(IconAdjust, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Auto Adjust" })] }) }), _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, {}) })] })), !readOnly && (_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: wfDiagram ? (_jsx(StyledSvg, { ref: svgRef, 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, { readOnly: readOnly, 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 => {
|
|
1342
|
+
return (_jsxs(CanvasContainer, { children: [!readOnly && (_jsxs(ToolbarContainer, { "$isCollapsed": isToolbarCollapsed, "$isFloating": isToolbarFloating, "$isToolboxVisible": isToolboxVisible, children: [_jsx(ButtonGroup, { "$isFloating": isToolbarFloating, children: _jsxs("button", { onClick: handleToggleToolboxVisibility, title: "Show toolbox", children: [_jsx(IconFlowChart, {}), !isToolbarCollapsed && _jsx("span", { children: "Mostra/nascondi toolbox" })] }) }), _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: readOnly, children: [_jsx(IconNew, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "New" })] })] }), _jsx(ButtonGroup, { "$isFloating": isToolbarFloating, children: _jsxs("button", { onClick: handleAutoAdjust, title: "Auto adjust", children: [_jsx(IconAdjust, {}), " ", !isToolbarCollapsed && _jsx("span", { children: "Auto Adjust" })] }) }), _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, {}) })] })), !readOnly && (_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 ? (_jsxs(StyledLoadingContainer, { children: [_jsx(StyledSpinner, {}), _jsx("span", { children: `${'Caricamento diagramma'}...` })] })) : wfDiagram ? (_jsx(StyledSvg, { ref: svgRef, 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, { readOnly: readOnly, 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 => {
|
|
1326
1343
|
const sourceItem = wfDiagram?.DiagramItems.find(item => item.ID === connection.Source.ParentDiagramItem.ID);
|
|
1327
1344
|
const sinkItem = wfDiagram?.DiagramItems.find(item => item.ID === connection.Sink.ParentDiagramItem.ID);
|
|
1328
1345
|
if (!sourceItem || !sinkItem)
|
|
@@ -1334,6 +1351,6 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, readOnly = false, zoomLevel
|
|
|
1334
1351
|
const isThisConnectionBeingDragged = isDraggingExistingConnectionEndpoint && draggingConnectionId === connection.ID;
|
|
1335
1352
|
return (_jsx(ConnectionComponent, { connection: connection, isSelected: selectedConnections.has(connection.ID), sourcePoint: sourcePoint, sinkPoint: sinkPoint, isTemporary: isThisConnectionBeingDragged, onClick: handleConnectionClick, onConnectionEndpointMouseDown: handleConnectionEndpointMouseDown }, connection.ID));
|
|
1336
1353
|
}), isDrawingConnection && tempConnectionPathData && (_jsx(TempConnectionPath, { d: tempConnectionPathData })), isDraggingExistingConnectionEndpoint && tempConnectionPathData && (_jsx(TempConnectionPath, { d: tempConnectionPathData })), isDrawingSelectionRect && currentSelectionRect && (_jsx(SelectionRect, { x: currentSelectionRect.x, y: currentSelectionRect.y, width: currentSelectionRect.width, height: currentSelectionRect.height }))] }) }))
|
|
1337
|
-
: (_jsx(DiagramMessage, { children:
|
|
1354
|
+
: (_jsx(DiagramMessage, { children: `${SDKUI_Localizator.WorkflowDiagramMissingOrInvalid} ...` })) }), isModalOpen && itemToEdit && (_jsx(TMModal, { title: DiagramItemTypes[itemToEdit.Type].toString(), onClose: handleCloseModal, isModal: true, width: '50%', height: '50%', children: _jsx("div", { children: itemToEdit.ItemName }) }))] }));
|
|
1338
1355
|
};
|
|
1339
1356
|
export default WFDiagram;
|
|
@@ -86,8 +86,8 @@ const TMChooserForm = ({ children, title, allowMultipleSelection = false, allowA
|
|
|
86
86
|
...summaryItems ?? {}
|
|
87
87
|
});
|
|
88
88
|
}, [manageUseLocalizedName, summaryItems]);
|
|
89
|
-
return (_jsx(TMModal, { title: renderTitle(), width: width ?? '550px', height: height ?? '600px', toolbar: _jsx(ToolbarButtons, {}), onClose: onClose, children:
|
|
90
|
-
filteredItems.length > 0
|
|
89
|
+
return (_jsx(TMModal, { title: renderTitle(), width: width ?? '550px', height: height ?? '600px', toolbar: _jsx(ToolbarButtons, {}), onClose: onClose, children: children ??
|
|
90
|
+
filteredItems.length > 0
|
|
91
91
|
? _jsx(TMDataGrid, { dataSource: filteredItems, keyExpr: keyName, dataColumns: dataColumns, focusedRowKey: focusedRowKey, selectedRowKeys: selectedRowKeys, headerFilter: { visible: true }, selection: { mode: allowMultipleSelection ? 'multiple' : 'single', showCheckBoxesMode: 'always', selectAllMode: 'allPages' }, grouping: allowGrouping ? { autoExpandAll: false, expandMode: 'rowClick' } : undefined, summary: customSummary, onFocusedRowChanged: handleFocusedRowChange, onSelectionChanged: handleSelectionChanged, onRowDblClick: handleRowDoubleClick })
|
|
92
92
|
: _jsx(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', children: _jsx(TMLayoutItem, { children: _jsx("p", { style: { height: "100%", color: TMColors.primaryColor, fontSize: "1.5rem", display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: SDKUI_Localizator.NoDataToDisplay }) }) }) }));
|
|
93
93
|
};
|
|
@@ -518,11 +518,14 @@ export declare class SDKUI_Localizator {
|
|
|
518
518
|
static get Warning(): "Warnung" | "Warning" | "advertencia" | "avertissement" | "aviso" | "Avviso";
|
|
519
519
|
static get WelcomeTo(): "Willkommen bei {{0}}" | "Welcome to {{0}}" | "Bienvenido a {{0}}" | "Bienvenue sur {{0}}" | "Bem-vindo à {{0}}" | "Benvenuto su {{0}}";
|
|
520
520
|
static get WorkflowApproval(): "Workflow-Genehmigung" | "Workflow approval" | "Aprobación de flujo de trabajo" | "Approbation de workflow" | "Aprovação de fluxo de trabalho" | "Approvazione workflow";
|
|
521
|
+
static get WorkflowDiagramMissingOrInvalid(): "Diagramm fehlt oder ist ungültig" | "Diagram missing or invalid" | "Diagrama no presente o no válido" | "Schéma manquant ou invalide" | "Diagrama ausente ou inválido" | "Diagramma non presente o non valido";
|
|
522
|
+
static get WorkflowNoInstances(): "Keine Instanzen aktiv" | "No running instances" | "Ninguna instancia en curso" | "Aucune instance en cours" | "Nenhuma instância em execução" | "Nessuna istanza in corso";
|
|
521
523
|
static get WorkGroup(): "Arbeitsgruppe" | "Work Group" | "Grupo de Trabajo" | "Groupe de travail" | "Grupo de Trabalho" | "Gruppo di lavoro";
|
|
522
524
|
static get WorkgroupOperations(): string;
|
|
523
525
|
static get WorkingGroups(): "Arbeitsgruppen" | "Work groups" | "Grupos de trabajo" | "Groupes de travail" | "Grupos de trabalho" | "Gruppi di lavoro";
|
|
524
526
|
static get WorkItemData(): string;
|
|
525
527
|
static get WorkItemTechnicalData(): string;
|
|
528
|
+
static get WorkItemTechnicalNote_SetID(): "Um den Standort des Prozesses zu erfahren, fügen Sie das technische Metadatum \"SetID\" zur Freigabeansicht hinzu." | "To find the location of the process, add the technical metadata \"SetID\" to the approval view." | "Para conocer la ubicación del proceso, añada el metadato técnico \"SetID\" a la vista de aprobación." | "Pour connaître l'emplacement du processus, ajoutez la métadonnée technique \"SetID\" à la vue d'approbation." | "Para saber a localização do processo, adicione o metadado técnico \"SetID\" à vista de aprovação." | "Per conoscere il punto in cui si trova il processo, aggiungere il metadato tecnico \"SetID\" alla vista approvativa.";
|
|
526
529
|
static get WorkitemApprove(): string;
|
|
527
530
|
static get WorkitemReject(): string;
|
|
528
531
|
static get WorkitemReassign(): string;
|
|
@@ -5145,6 +5145,26 @@ export class SDKUI_Localizator {
|
|
|
5145
5145
|
default: return "Approvazione workflow";
|
|
5146
5146
|
}
|
|
5147
5147
|
}
|
|
5148
|
+
static get WorkflowDiagramMissingOrInvalid() {
|
|
5149
|
+
switch (this._cultureID) {
|
|
5150
|
+
case CultureIDs.De_DE: return "Diagramm fehlt oder ist ungültig";
|
|
5151
|
+
case CultureIDs.En_US: return "Diagram missing or invalid";
|
|
5152
|
+
case CultureIDs.Es_ES: return "Diagrama no presente o no válido";
|
|
5153
|
+
case CultureIDs.Fr_FR: return "Schéma manquant ou invalide";
|
|
5154
|
+
case CultureIDs.Pt_PT: return "Diagrama ausente ou inválido";
|
|
5155
|
+
default: return "Diagramma non presente o non valido";
|
|
5156
|
+
}
|
|
5157
|
+
}
|
|
5158
|
+
static get WorkflowNoInstances() {
|
|
5159
|
+
switch (this._cultureID) {
|
|
5160
|
+
case CultureIDs.De_DE: return "Keine Instanzen aktiv";
|
|
5161
|
+
case CultureIDs.En_US: return "No running instances";
|
|
5162
|
+
case CultureIDs.Es_ES: return "Ninguna instancia en curso";
|
|
5163
|
+
case CultureIDs.Fr_FR: return "Aucune instance en cours";
|
|
5164
|
+
case CultureIDs.Pt_PT: return "Nenhuma instância em execução";
|
|
5165
|
+
default: return "Nessuna istanza in corso";
|
|
5166
|
+
}
|
|
5167
|
+
}
|
|
5148
5168
|
static get WorkGroup() {
|
|
5149
5169
|
switch (this._cultureID) {
|
|
5150
5170
|
case CultureIDs.De_DE: return "Arbeitsgruppe";
|
|
@@ -5195,6 +5215,16 @@ export class SDKUI_Localizator {
|
|
|
5195
5215
|
default: return "Dati tecnici del WorkItem"; // Italian (default)
|
|
5196
5216
|
}
|
|
5197
5217
|
}
|
|
5218
|
+
static get WorkItemTechnicalNote_SetID() {
|
|
5219
|
+
switch (this._cultureID) {
|
|
5220
|
+
case CultureIDs.De_DE: return "Um den Standort des Prozesses zu erfahren, fügen Sie das technische Metadatum \"SetID\" zur Freigabeansicht hinzu.";
|
|
5221
|
+
case CultureIDs.En_US: return "To find the location of the process, add the technical metadata \"SetID\" to the approval view.";
|
|
5222
|
+
case CultureIDs.Es_ES: return "Para conocer la ubicación del proceso, añada el metadato técnico \"SetID\" a la vista de aprobación.";
|
|
5223
|
+
case CultureIDs.Fr_FR: return "Pour connaître l'emplacement du processus, ajoutez la métadonnée technique \"SetID\" à la vue d'approbation.";
|
|
5224
|
+
case CultureIDs.Pt_PT: return "Para saber a localização do processo, adicione o metadado técnico \"SetID\" à vista de aprovação.";
|
|
5225
|
+
default: return "Per conoscere il punto in cui si trova il processo, aggiungere il metadato tecnico \"SetID\" alla vista approvativa.";
|
|
5226
|
+
}
|
|
5227
|
+
}
|
|
5198
5228
|
static get WorkitemApprove() {
|
|
5199
5229
|
switch (this._cultureID) {
|
|
5200
5230
|
case CultureIDs.De_DE: return "Arbeitselement genehmigen";
|