@topconsultnpm/sdkui-react 6.19.0-test.1 → 6.19.0-test2
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/assets/IconsS4t/add.svg +12 -12
- package/lib/assets/IconsS4t/aggiorna.svg +18 -18
- package/lib/assets/IconsS4t/bookmark.svg +42 -42
- package/lib/assets/IconsS4t/cancella.svg +15 -15
- package/lib/assets/IconsS4t/check-box.svg +19 -19
- package/lib/assets/IconsS4t/down-arrow-signBook.svg +40 -40
- package/lib/assets/IconsS4t/down.svg +28 -28
- package/lib/assets/IconsS4t/edit-file.svg +19 -19
- package/lib/assets/IconsS4t/edita.svg +32 -32
- package/lib/assets/IconsS4t/firma.svg +19 -19
- package/lib/assets/IconsS4t/icona_download.svg +16 -16
- package/lib/assets/IconsS4t/info.svg +51 -51
- package/lib/assets/IconsS4t/left.svg +20 -20
- package/lib/assets/IconsS4t/line.svg +40 -40
- package/lib/assets/IconsS4t/more.svg +19 -19
- package/lib/assets/IconsS4t/plus.svg +23 -23
- package/lib/assets/IconsS4t/printer.svg +49 -49
- package/lib/assets/IconsS4t/radio-on-button.svg +25 -25
- package/lib/assets/IconsS4t/rectangle.svg +41 -41
- package/lib/assets/IconsS4t/redo.svg +19 -19
- package/lib/assets/IconsS4t/right-arrow-signBook-finish.svg +40 -40
- package/lib/assets/IconsS4t/right-arrow-signBook.svg +40 -40
- package/lib/assets/IconsS4t/right.svg +22 -22
- package/lib/assets/IconsS4t/searchbar.svg +21 -21
- package/lib/assets/IconsS4t/text-box.svg +36 -36
- package/lib/assets/IconsS4t/tick.svg +8 -8
- package/lib/assets/IconsS4t/trash-white.svg +10 -10
- package/lib/assets/IconsS4t/undo.svg +19 -19
- package/lib/assets/IconsS4t/up.svg +32 -32
- package/lib/assets/IconsS4t/video-streaming.svg +2 -2
- package/lib/assets/IconsS4t/zoom-in.svg +58 -58
- package/lib/assets/IconsS4t/zoom-out.svg +56 -56
- package/lib/assets/icomoon.svg +96 -96
- package/lib/assets/italy.svg +16 -16
- package/lib/assets/six.svg +3 -3
- package/lib/assets/thumbnails/index.ts +39 -39
- package/lib/assets/topmedia-six.svg +65 -65
- package/lib/assets/topmeida-six-bianco.svg +65 -65
- package/lib/components/base/Styled.js +302 -302
- package/lib/components/base/TMAccordion.js +43 -43
- package/lib/components/base/TMAccordionNew.d.ts +28 -0
- package/lib/components/base/TMAccordionNew.js +326 -0
- package/lib/components/base/TMAreaManager.js +23 -23
- package/lib/components/base/TMButton.d.ts +1 -0
- package/lib/components/base/TMButton.js +136 -136
- package/lib/components/base/TMClosableList.js +46 -46
- package/lib/components/base/TMConfirm.js +20 -20
- package/lib/components/base/TMContextMenu.js +4 -4
- package/lib/components/base/TMContextMenuOLD.js +25 -25
- package/lib/components/base/TMCounterBar.js +32 -32
- package/lib/components/base/TMCounterContainer.js +30 -30
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMCustomButton.js +90 -35
- package/lib/components/base/TMDataGridExportForm.d.ts +1 -1
- package/lib/components/base/TMDataGridExportForm.js +9 -3
- package/lib/components/base/TMDropDownMenu.js +24 -24
- package/lib/components/base/TMFileManager.js +12 -3
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -0
- package/lib/components/base/TMFileManagerDataGridView.js +12 -3
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +2 -0
- package/lib/components/base/TMFileManagerThumbnailItems.js +12 -2
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +2 -0
- package/lib/components/base/TMFileManagerThumbnailsView.js +2 -2
- package/lib/components/base/TMFileManagerUtils.js +19 -19
- package/lib/components/base/TMFloatingToolbar.js +34 -34
- package/lib/components/base/TMLayout.js +44 -44
- package/lib/components/base/TMList.js +34 -34
- package/lib/components/base/TMModal.d.ts +2 -0
- package/lib/components/base/TMModal.js +79 -34
- package/lib/components/base/TMPanel.js +57 -57
- package/lib/components/base/TMPopUp.js +186 -117
- package/lib/components/base/TMProgressBar.js +20 -20
- package/lib/components/base/TMResizableMenu.js +28 -28
- package/lib/components/base/TMRightSidebar.js +40 -40
- package/lib/components/base/TMSpinner.js +121 -121
- package/lib/components/base/TMTab.js +11 -11
- package/lib/components/base/TMToggleButton.js +36 -36
- package/lib/components/base/TMToolbarCard.js +35 -35
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTooltip.js +1 -1
- package/lib/components/base/TMTreeView.js +16 -16
- package/lib/components/base/TMUserAvatar.js +7 -7
- package/lib/components/base/TMWaitPanel.js +30 -24
- package/lib/components/choosers/TMCultureIDPicker.js +35 -35
- package/lib/components/choosers/TMDataListItemChooser.js +1 -1
- package/lib/components/choosers/TMDataListItemPicker.js +54 -54
- package/lib/components/choosers/TMDcmtTypeChooser.js +2 -2
- package/lib/components/choosers/TMMetadataChooser.d.ts +4 -1
- package/lib/components/choosers/TMMetadataChooser.js +31 -8
- package/lib/components/choosers/TMUserChooser.d.ts +4 -0
- package/lib/components/choosers/TMUserChooser.js +21 -5
- package/lib/components/editors/TMCheckBox.js +24 -24
- package/lib/components/editors/TMDateBox.d.ts +1 -1
- package/lib/components/editors/TMDropDown.js +43 -43
- package/lib/components/editors/TMEditorStyled.js +71 -71
- package/lib/components/editors/TMHtmlContentDisplay.js +16 -16
- package/lib/components/editors/TMLocalizedTextBox.js +31 -31
- package/lib/components/editors/TMMetadataValues.js +62 -21
- package/lib/components/editors/TMRadioButton.js +39 -39
- package/lib/components/editors/TMSummary.js +39 -39
- package/lib/components/editors/TMTextArea.d.ts +1 -0
- package/lib/components/editors/TMTextArea.js +56 -22
- package/lib/components/editors/TMTextBox.js +53 -23
- package/lib/components/editors/TMTextExpression.js +36 -28
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +30 -0
- package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +471 -0
- package/lib/components/features/assistant/ToppySpeechBubble.d.ts +9 -0
- package/lib/components/features/assistant/ToppySpeechBubble.js +117 -0
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -0
- package/lib/components/features/blog/TMBlogCommentForm.js +21 -9
- package/lib/components/features/documents/TMDcmtBlog.js +1 -1
- package/lib/components/features/documents/TMDcmtForm.js +321 -62
- package/lib/components/features/documents/TMDcmtIcon.js +17 -12
- package/lib/components/features/documents/TMDcmtPreview.js +75 -38
- package/lib/components/features/documents/TMFileUploader.js +21 -21
- package/lib/components/features/documents/TMRelationViewer.js +56 -23
- package/lib/components/features/search/TMSavedQuerySelector.js +52 -52
- package/lib/components/features/search/TMSearch.js +2 -2
- package/lib/components/features/search/TMSearchQueryEditor.js +14 -14
- package/lib/components/features/search/TMSearchQueryPanel.js +40 -58
- package/lib/components/features/search/TMSearchResult.js +160 -35
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +2 -1
- package/lib/components/features/search/TMSearchResultsMenuItems.js +117 -60
- package/lib/components/features/search/TMSignSettingsForm.d.ts +9 -0
- package/lib/components/features/search/TMSignSettingsForm.js +621 -0
- package/lib/components/features/search/TMTreeSelector.js +66 -66
- package/lib/components/features/tasks/TMTaskForm.js +42 -36
- package/lib/components/features/tasks/TMTasksAgenda.js +4 -4
- package/lib/components/features/tasks/TMTasksCalendar.js +2 -2
- package/lib/components/features/tasks/TMTasksHeader.js +1 -1
- package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -1
- package/lib/components/features/tasks/TMTasksUtils.js +18 -3
- package/lib/components/features/tasks/TMTasksUtilsView.js +26 -4
- package/lib/components/features/tasks/TMTasksView.js +12 -6
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +9 -9
- package/lib/components/features/workflow/TMWorkflowPopup.js +44 -44
- package/lib/components/features/workflow/diagram/ConnectionComponent.js +29 -29
- package/lib/components/features/workflow/diagram/ConnectionForm.js +10 -10
- package/lib/components/features/workflow/diagram/DiagramItemComponent.js +57 -57
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +40 -35
- package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +12 -12
- package/lib/components/features/workflow/diagram/RecipientList.js +39 -39
- package/lib/components/features/workflow/diagram/WFDiagram.js +317 -285
- package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.js +4 -4
- package/lib/components/forms/Login/Chooser.js +35 -35
- package/lib/components/forms/Login/Menu.js +22 -22
- package/lib/components/forms/Login/SelectBox.js +46 -46
- package/lib/components/forms/Login/TMLoginForm.js +14 -14
- package/lib/components/forms/Login/TextBox.js +57 -57
- package/lib/components/forms/TMResultDialog.js +8 -2
- package/lib/components/forms/TMSaveForm.js +3 -11
- package/lib/components/grids/TMBlogAttachments.d.ts +0 -14
- package/lib/components/grids/TMBlogAttachments.js +10 -5
- package/lib/components/grids/TMBlogsPost.d.ts +8 -3
- package/lib/components/grids/TMBlogsPost.js +100 -39
- package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
- package/lib/components/grids/TMBlogsPostUtils.js +32 -11
- package/lib/components/grids/TMRecentsManager.js +51 -51
- package/lib/components/grids/TMValidationItemsList.js +48 -48
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +14 -14
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +0 -1
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +36 -35
- package/lib/components/layout/panelManager/types.d.ts +1 -0
- package/lib/components/pages/TMPage.js +1 -1
- package/lib/components/query/TMQueryEditor.js +17 -17
- package/lib/components/query/TMQuerySummary.d.ts +1 -0
- package/lib/components/query/TMQuerySummary.js +15 -15
- package/lib/components/settings/SettingsAppearance.js +9 -1
- package/lib/components/sidebar/TMCommandsPanel.js +10 -10
- package/lib/components/sidebar/TMHeader.js +307 -307
- package/lib/components/sidebar/TMSidebar.js +24 -24
- package/lib/components/sidebar/TMSidebarItem.js +21 -21
- package/lib/components/viewers/TMDataListItemViewer.d.ts +1 -1
- package/lib/components/viewers/TMMidViewer.d.ts +1 -1
- package/lib/components/viewers/TMTidViewer.d.ts +1 -1
- package/lib/components/wizard/TMStepIndicator.js +102 -102
- package/lib/components/wizard/TMWizard.js +29 -29
- package/lib/helper/GlobalStyles.d.ts +2 -0
- package/lib/helper/GlobalStyles.js +10 -0
- package/lib/helper/Globalization.d.ts +1 -0
- package/lib/helper/Globalization.js +30 -0
- package/lib/helper/SDKUI_Globals.d.ts +2 -0
- package/lib/helper/SDKUI_Globals.js +9 -1
- package/lib/helper/SDKUI_Localizator.d.ts +50 -2
- package/lib/helper/SDKUI_Localizator.js +502 -22
- package/lib/helper/TMCustomSearchBar.js +1 -1
- package/lib/helper/TMIcons.d.ts +4 -1
- package/lib/helper/TMIcons.js +14 -2
- package/lib/helper/TMToppyMessage.d.ts +1 -0
- package/lib/helper/TMToppyMessage.js +33 -32
- package/lib/helper/TMUtils.d.ts +42 -4
- package/lib/helper/TMUtils.js +227 -60
- package/lib/helper/dcmtsHelper.d.ts +2 -1
- package/lib/helper/dcmtsHelper.js +56 -17
- package/lib/helper/helpers.d.ts +1 -1
- package/lib/helper/helpers.js +12 -17
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/hooks/useDcmtOperations.d.ts +1 -1
- package/lib/hooks/useDcmtOperations.js +10 -6
- package/lib/hooks/useRelatedDocuments.js +35 -26
- package/lib/ts/types.d.ts +3 -1
- package/package.json +54 -54
- package/lib/components/features/assistant/ToppyHelpCenter.d.ts +0 -12
- package/lib/components/features/assistant/ToppyHelpCenter.js +0 -173
|
@@ -14,308 +14,308 @@ import { StyledLoadingContainer, StyledSpinner } from '../../../base/Styled';
|
|
|
14
14
|
import DiagramItemForm from './DiagramItemForm';
|
|
15
15
|
import ReactDOM from 'react-dom';
|
|
16
16
|
import ConnectionForm from './ConnectionForm';
|
|
17
|
-
const ZoomLevelText = styled.span `
|
|
18
|
-
font-size: 0.9em;
|
|
19
|
-
color: #555;
|
|
20
|
-
white-space: nowrap;
|
|
21
|
-
background-color: white;
|
|
22
|
-
padding: 2px 4px; /* Aggiunto un leggero padding per chiarezza */
|
|
23
|
-
border-radius: 4px;
|
|
24
|
-
|
|
25
|
-
/* A. Modalità Compressa (non Floating & Collapsed) */
|
|
17
|
+
const ZoomLevelText = styled.span `
|
|
18
|
+
font-size: 0.9em;
|
|
19
|
+
color: #555;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
background-color: white;
|
|
22
|
+
padding: 2px 4px; /* Aggiunto un leggero padding per chiarezza */
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
|
|
25
|
+
/* A. Modalità Compressa (non Floating & Collapsed) */
|
|
26
26
|
${props => !props.$isFloating && props.$isCollapsed
|
|
27
|
-
? `
|
|
28
|
-
padding: 0 2px;
|
|
29
|
-
margin: 0;
|
|
30
|
-
display: inline-block;
|
|
31
|
-
line-height: 20px;
|
|
27
|
+
? `
|
|
28
|
+
padding: 0 2px;
|
|
29
|
+
margin: 0;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
line-height: 20px;
|
|
32
32
|
`
|
|
33
33
|
// B. Modalità Flottante (Verticale)
|
|
34
34
|
: props.$isFloating
|
|
35
|
-
? `
|
|
36
|
-
display: block;
|
|
37
|
-
text-align: center;
|
|
38
|
-
margin: 4px 0;
|
|
39
|
-
padding: 2px 4px;
|
|
35
|
+
? `
|
|
36
|
+
display: block;
|
|
37
|
+
text-align: center;
|
|
38
|
+
margin: 4px 0;
|
|
39
|
+
padding: 2px 4px;
|
|
40
40
|
`
|
|
41
41
|
// C. Modalità Standard (Orizzontale & non Collapsed)
|
|
42
|
-
: `
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
margin: 0 8px;
|
|
46
|
-
padding: 2px 4px;
|
|
47
|
-
`}
|
|
42
|
+
: `
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
margin: 0 8px;
|
|
46
|
+
padding: 2px 4px;
|
|
47
|
+
`}
|
|
48
48
|
`;
|
|
49
|
-
const DiagramWrapper = styled.div `
|
|
50
|
-
height: 100%;
|
|
51
|
-
width: 100%;
|
|
52
|
-
border: 1px solid #ddd;
|
|
53
|
-
border-radius: 8px;
|
|
54
|
-
overflow: hidden;
|
|
55
|
-
background-color: white;
|
|
56
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
57
|
-
display: flex;
|
|
58
|
-
flex-direction: column;
|
|
59
|
-
position: relative;
|
|
60
|
-
transition: all 0.3s ease-in-out;
|
|
49
|
+
const DiagramWrapper = styled.div `
|
|
50
|
+
height: 100%;
|
|
51
|
+
width: 100%;
|
|
52
|
+
border: 1px solid #ddd;
|
|
53
|
+
border-radius: 8px;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
background-color: white;
|
|
56
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
position: relative;
|
|
60
|
+
transition: all 0.3s ease-in-out;
|
|
61
61
|
`;
|
|
62
|
-
const FullScreenContainer = styled.div `
|
|
63
|
-
position: fixed;
|
|
64
|
-
top: 0;
|
|
65
|
-
left: 0;
|
|
66
|
-
width: 100vw;
|
|
67
|
-
height: 100vh;
|
|
68
|
-
z-index: 1500;
|
|
69
|
-
background-color: white;
|
|
70
|
-
display: flex;
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
align-items: center;
|
|
62
|
+
const FullScreenContainer = styled.div `
|
|
63
|
+
position: fixed;
|
|
64
|
+
top: 0;
|
|
65
|
+
left: 0;
|
|
66
|
+
width: 100vw;
|
|
67
|
+
height: 100vh;
|
|
68
|
+
z-index: 1500;
|
|
69
|
+
background-color: white;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
align-items: center;
|
|
74
74
|
`;
|
|
75
|
-
const CanvasContainer = styled.div `
|
|
76
|
-
position: relative;
|
|
77
|
-
width: 100%;
|
|
78
|
-
height: 100%;
|
|
79
|
-
border: 1px solid #ccc;
|
|
80
|
-
background-color: #f9f9f9;
|
|
81
|
-
display: flex;
|
|
82
|
-
overflow: hidden; /* Ensure content doesn't overflow when panels are collapsed */
|
|
75
|
+
const CanvasContainer = styled.div `
|
|
76
|
+
position: relative;
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: 100%;
|
|
79
|
+
border: 1px solid #ccc;
|
|
80
|
+
background-color: #f9f9f9;
|
|
81
|
+
display: flex;
|
|
82
|
+
overflow: hidden; /* Ensure content doesn't overflow when panels are collapsed */
|
|
83
83
|
`;
|
|
84
|
-
const pulse = keyframes `
|
|
85
|
-
0% {
|
|
86
|
-
transform: scale(1.0);
|
|
87
|
-
/* 💡 NUOVO: Ombra bianca/chiara per massimo contrasto contro il blu */
|
|
88
|
-
box-shadow: 0 0 0 0px rgba(255, 255, 255, 0.9);
|
|
89
|
-
}
|
|
90
|
-
50% {
|
|
91
|
-
transform: scale(1.3); /* Aumentato a 1.3 per maggiore impatto visivo */
|
|
92
|
-
box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); /* Aumentato lo spread a 12px */
|
|
93
|
-
}
|
|
94
|
-
100% {
|
|
95
|
-
transform: scale(1.0);
|
|
96
|
-
box-shadow: 0 0 0 0px rgba(255, 255, 255, 0);
|
|
97
|
-
}
|
|
84
|
+
const pulse = keyframes `
|
|
85
|
+
0% {
|
|
86
|
+
transform: scale(1.0);
|
|
87
|
+
/* 💡 NUOVO: Ombra bianca/chiara per massimo contrasto contro il blu */
|
|
88
|
+
box-shadow: 0 0 0 0px rgba(255, 255, 255, 0.9);
|
|
89
|
+
}
|
|
90
|
+
50% {
|
|
91
|
+
transform: scale(1.3); /* Aumentato a 1.3 per maggiore impatto visivo */
|
|
92
|
+
box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); /* Aumentato lo spread a 12px */
|
|
93
|
+
}
|
|
94
|
+
100% {
|
|
95
|
+
transform: scale(1.0);
|
|
96
|
+
box-shadow: 0 0 0 0px rgba(255, 255, 255, 0);
|
|
97
|
+
}
|
|
98
98
|
`;
|
|
99
|
-
const ToolbarContainer = styled.div `
|
|
100
|
-
display: flex;
|
|
101
|
-
gap: 5px;
|
|
99
|
+
const ToolbarContainer = styled.div `
|
|
100
|
+
display: flex;
|
|
101
|
+
gap: 5px;
|
|
102
102
|
background: ${props => props.$isReadOnly
|
|
103
103
|
? 'transparent linear-gradient(180deg, #007bff 0%, #1E90FF 45%, #0056b3 100%) 0% 0% no-repeat padding-box'
|
|
104
|
-
: 'transparent linear-gradient(180deg, #E03A8B 9%, #C2388B 34%, #A63B8D 60%, #943C8D 83%, #8F3C8D 100%) 0% 0% no-repeat padding-box'};
|
|
105
|
-
padding: 8px;
|
|
106
|
-
border-radius: 4px;
|
|
107
|
-
z-index: 10;
|
|
108
|
-
flex-shrink: 0;
|
|
109
|
-
transition: all 0.3s ease-in-out;
|
|
110
|
-
|
|
111
|
-
${props => props.$isFloating ? `
|
|
112
|
-
position: absolute;
|
|
113
|
-
bottom: 20px;
|
|
114
|
-
left: ${props.$isReadOnly ? '20px' : props.$isToolboxVisible ? '160px' : '20px'};
|
|
115
|
-
flex-direction: row;
|
|
116
|
-
width: auto;
|
|
117
|
-
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
|
118
|
-
padding: 5px 8px;
|
|
119
|
-
` : `
|
|
120
|
-
position: relative;
|
|
121
|
-
flex-direction: column;
|
|
122
|
-
width: ${props.$isCollapsed ? '40px' : 'auto'};
|
|
123
|
-
`}
|
|
124
|
-
overflow-y: auto;
|
|
125
|
-
|
|
126
|
-
button {
|
|
127
|
-
background: none;
|
|
128
|
-
border: none;
|
|
129
|
-
cursor: pointer;
|
|
130
|
-
padding: 5px;
|
|
131
|
-
display: flex;
|
|
132
|
-
align-items: center;
|
|
133
|
-
justify-content: ${props => props.$isCollapsed || props.$isFloating ? 'center' : 'flex-start'}; // Centra icone in entrambe le modalità
|
|
134
|
-
white-space: nowrap;
|
|
135
|
-
|
|
136
|
-
position: relative;
|
|
137
|
-
overflow: visible;
|
|
138
|
-
transition: background-color 0.3s; /* Aggiunto transform per l'animazione */
|
|
139
|
-
&[title="Progettazione"] {
|
|
140
|
-
${props => props.$isReadOnly && css `
|
|
141
|
-
svg {
|
|
142
|
-
/* Applicazione animazione */
|
|
143
|
-
animation: ${pulse} 2s infinite;
|
|
144
|
-
|
|
145
|
-
/* Assicura che l'animazione sia sopra */
|
|
146
|
-
z-index: 2;
|
|
147
|
-
|
|
148
|
-
/* FIX: box-shadow e transform necessitano di spazio visibile */
|
|
149
|
-
overflow: visible; /* Assicurati che l'SVG non tagli l'ombra */
|
|
150
|
-
position: relative; /* Necessario per z-index in alcuni contesti */
|
|
151
|
-
|
|
152
|
-
/* Assicura una transizione base per trasformazione */
|
|
153
|
-
transition: transform 0.2s;
|
|
154
|
-
}
|
|
155
|
-
`}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
svg {
|
|
159
|
-
color: white;
|
|
160
|
-
font-size: ${props => props.$isFloating ? '20px' : '30px'}; // Icone più piccole in modalità floating
|
|
161
|
-
min-width: ${props => props.$isFloating ? '20px' : '30px'};
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
span {
|
|
165
|
-
display: ${props => (props.$isCollapsed || props.$isFloating) ? 'none' : 'block'}; // Nascondi testo in modalità collapsed e floating
|
|
166
|
-
color: white;
|
|
167
|
-
margin-left: 8px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
&:hover {
|
|
171
|
-
background-color: rgba(255, 255, 255, 0.2);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
&:disabled {
|
|
175
|
-
cursor: not-allowed;
|
|
176
|
-
opacity: 0.5;
|
|
177
|
-
background-color: transparent;
|
|
178
|
-
&:hover {
|
|
179
|
-
background-color: transparent;
|
|
180
|
-
}
|
|
181
|
-
svg {
|
|
182
|
-
color: #cccccc;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
104
|
+
: 'transparent linear-gradient(180deg, #E03A8B 9%, #C2388B 34%, #A63B8D 60%, #943C8D 83%, #8F3C8D 100%) 0% 0% no-repeat padding-box'};
|
|
105
|
+
padding: 8px;
|
|
106
|
+
border-radius: 4px;
|
|
107
|
+
z-index: 10;
|
|
108
|
+
flex-shrink: 0;
|
|
109
|
+
transition: all 0.3s ease-in-out;
|
|
110
|
+
|
|
111
|
+
${props => props.$isFloating ? `
|
|
112
|
+
position: absolute;
|
|
113
|
+
bottom: 20px;
|
|
114
|
+
left: ${props.$isReadOnly ? '20px' : props.$isToolboxVisible ? '160px' : '20px'};
|
|
115
|
+
flex-direction: row;
|
|
116
|
+
width: auto;
|
|
117
|
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
|
|
118
|
+
padding: 5px 8px;
|
|
119
|
+
` : `
|
|
120
|
+
position: relative;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
width: ${props.$isCollapsed ? '40px' : 'auto'};
|
|
123
|
+
`}
|
|
124
|
+
overflow-y: auto;
|
|
125
|
+
|
|
126
|
+
button {
|
|
127
|
+
background: none;
|
|
128
|
+
border: none;
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
padding: 5px;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: ${props => props.$isCollapsed || props.$isFloating ? 'center' : 'flex-start'}; // Centra icone in entrambe le modalità
|
|
134
|
+
white-space: nowrap;
|
|
135
|
+
|
|
136
|
+
position: relative;
|
|
137
|
+
overflow: visible;
|
|
138
|
+
transition: background-color 0.3s; /* Aggiunto transform per l'animazione */
|
|
139
|
+
&[title="Progettazione"] {
|
|
140
|
+
${props => props.$isReadOnly && css `
|
|
141
|
+
svg {
|
|
142
|
+
/* Applicazione animazione */
|
|
143
|
+
animation: ${pulse} 2s infinite;
|
|
144
|
+
|
|
145
|
+
/* Assicura che l'animazione sia sopra */
|
|
146
|
+
z-index: 2;
|
|
147
|
+
|
|
148
|
+
/* FIX: box-shadow e transform necessitano di spazio visibile */
|
|
149
|
+
overflow: visible; /* Assicurati che l'SVG non tagli l'ombra */
|
|
150
|
+
position: relative; /* Necessario per z-index in alcuni contesti */
|
|
151
|
+
|
|
152
|
+
/* Assicura una transizione base per trasformazione */
|
|
153
|
+
transition: transform 0.2s;
|
|
154
|
+
}
|
|
155
|
+
`}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
svg {
|
|
159
|
+
color: white;
|
|
160
|
+
font-size: ${props => props.$isFloating ? '20px' : '30px'}; // Icone più piccole in modalità floating
|
|
161
|
+
min-width: ${props => props.$isFloating ? '20px' : '30px'};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
span {
|
|
165
|
+
display: ${props => (props.$isCollapsed || props.$isFloating) ? 'none' : 'block'}; // Nascondi testo in modalità collapsed e floating
|
|
166
|
+
color: white;
|
|
167
|
+
margin-left: 8px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&:hover {
|
|
171
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&:disabled {
|
|
175
|
+
cursor: not-allowed;
|
|
176
|
+
opacity: 0.5;
|
|
177
|
+
background-color: transparent;
|
|
178
|
+
&:hover {
|
|
179
|
+
background-color: transparent;
|
|
180
|
+
}
|
|
181
|
+
svg {
|
|
182
|
+
color: #cccccc;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
186
|
`;
|
|
187
|
-
const ButtonGroup = styled.div `
|
|
188
|
-
display: flex;
|
|
189
|
-
gap: 5px; // Spazio tra i pulsanti all'interno di un gruppo
|
|
190
|
-
flex-shrink: 0; // Impedisce ai gruppi di restringersi
|
|
191
|
-
|
|
192
|
-
${props => props.$isFloating ? `
|
|
193
|
-
flex-direction: row;
|
|
194
|
-
${!props.$isLast && `
|
|
195
|
-
border-right: 1px solid rgba(255, 255, 255, 0.3);
|
|
196
|
-
padding-right: 5px;
|
|
197
|
-
margin-right: 5px;
|
|
198
|
-
`}
|
|
199
|
-
` : `
|
|
200
|
-
flex-direction: column;
|
|
201
|
-
${!props.$isLast && `
|
|
202
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
|
203
|
-
padding-bottom: 5px;
|
|
204
|
-
margin-bottom: 5px;
|
|
205
|
-
`}
|
|
206
|
-
`}
|
|
187
|
+
const ButtonGroup = styled.div `
|
|
188
|
+
display: flex;
|
|
189
|
+
gap: 5px; // Spazio tra i pulsanti all'interno di un gruppo
|
|
190
|
+
flex-shrink: 0; // Impedisce ai gruppi di restringersi
|
|
191
|
+
|
|
192
|
+
${props => props.$isFloating ? `
|
|
193
|
+
flex-direction: row;
|
|
194
|
+
${!props.$isLast && `
|
|
195
|
+
border-right: 1px solid rgba(255, 255, 255, 0.3);
|
|
196
|
+
padding-right: 5px;
|
|
197
|
+
margin-right: 5px;
|
|
198
|
+
`}
|
|
199
|
+
` : `
|
|
200
|
+
flex-direction: column;
|
|
201
|
+
${!props.$isLast && `
|
|
202
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
|
203
|
+
padding-bottom: 5px;
|
|
204
|
+
margin-bottom: 5px;
|
|
205
|
+
`}
|
|
206
|
+
`}
|
|
207
207
|
`;
|
|
208
|
-
const ToolbarToggle = styled.button `
|
|
209
|
-
background: none;
|
|
210
|
-
border: none;
|
|
211
|
-
cursor: pointer;
|
|
212
|
-
padding: 5px;
|
|
213
|
-
display: flex;
|
|
214
|
-
align-items: center;
|
|
215
|
-
justify-content: center;
|
|
216
|
-
margin-top: auto; /* Push to the bottom */
|
|
217
|
-
|
|
218
|
-
svg {
|
|
219
|
-
/* color: white; */
|
|
220
|
-
font-size: 20px;
|
|
221
|
-
}
|
|
208
|
+
const ToolbarToggle = styled.button `
|
|
209
|
+
background: none;
|
|
210
|
+
border: none;
|
|
211
|
+
cursor: pointer;
|
|
212
|
+
padding: 5px;
|
|
213
|
+
display: flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
justify-content: center;
|
|
216
|
+
margin-top: auto; /* Push to the bottom */
|
|
217
|
+
|
|
218
|
+
svg {
|
|
219
|
+
/* color: white; */
|
|
220
|
+
font-size: 20px;
|
|
221
|
+
}
|
|
222
222
|
`;
|
|
223
|
-
const ToolboxContainer = styled.div `
|
|
224
|
-
display: flex;
|
|
225
|
-
flex-direction: column;
|
|
226
|
-
gap: 5px;
|
|
227
|
-
background-color: #f0f0f0;
|
|
228
|
-
padding: 5px;
|
|
229
|
-
border-radius: 4px;
|
|
230
|
-
z-index: 10;
|
|
231
|
-
flex-shrink: 0;
|
|
232
|
-
border-right: 1px solid #ccc;
|
|
233
|
-
overflow-y: auto;
|
|
234
|
-
transition: width 0.3s ease-in-out, padding 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
|
235
|
-
opacity: ${props => props.$isVisible ? '1' : '0'};
|
|
236
|
-
pointer-events: ${props => props.$isVisible ? 'auto' : 'none'};
|
|
223
|
+
const ToolboxContainer = styled.div `
|
|
224
|
+
display: flex;
|
|
225
|
+
flex-direction: column;
|
|
226
|
+
gap: 5px;
|
|
227
|
+
background-color: #f0f0f0;
|
|
228
|
+
padding: 5px;
|
|
229
|
+
border-radius: 4px;
|
|
230
|
+
z-index: 10;
|
|
231
|
+
flex-shrink: 0;
|
|
232
|
+
border-right: 1px solid #ccc;
|
|
233
|
+
overflow-y: auto;
|
|
234
|
+
transition: width 0.3s ease-in-out, padding 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
|
235
|
+
opacity: ${props => props.$isVisible ? '1' : '0'};
|
|
236
|
+
pointer-events: ${props => props.$isVisible ? 'auto' : 'none'};
|
|
237
237
|
`;
|
|
238
|
-
const ToolboxIconWrapper = styled.div `
|
|
239
|
-
display: flex;
|
|
240
|
-
align-items: center;
|
|
241
|
-
justify-content: center;
|
|
242
|
-
width: 50px;
|
|
243
|
-
height: 50px;
|
|
244
|
-
border-radius: 50%;
|
|
245
|
-
border: 1px solid #ddd;
|
|
246
|
-
background-color: #fff;
|
|
247
|
-
margin-bottom: 5px;
|
|
248
|
-
transition: all 0.2s ease-in-out;
|
|
238
|
+
const ToolboxIconWrapper = styled.div `
|
|
239
|
+
display: flex;
|
|
240
|
+
align-items: center;
|
|
241
|
+
justify-content: center;
|
|
242
|
+
width: 50px;
|
|
243
|
+
height: 50px;
|
|
244
|
+
border-radius: 50%;
|
|
245
|
+
border: 1px solid #ddd;
|
|
246
|
+
background-color: #fff;
|
|
247
|
+
margin-bottom: 5px;
|
|
248
|
+
transition: all 0.2s ease-in-out;
|
|
249
249
|
`;
|
|
250
|
-
const ToolboxItem = styled.div `
|
|
251
|
-
display: flex;
|
|
252
|
-
flex-direction: column;
|
|
253
|
-
align-items: center;
|
|
254
|
-
justify-content: center;
|
|
255
|
-
padding: 2px;
|
|
256
|
-
border-radius: 5px;
|
|
257
|
-
cursor: grab;
|
|
258
|
-
transition: background-color 0.2s ease-in-out;
|
|
259
|
-
min-width: 80px;
|
|
260
|
-
text-align: center;
|
|
261
|
-
|
|
262
|
-
&:hover {
|
|
263
|
-
background-color: #e9e9e9;
|
|
264
|
-
|
|
265
|
-
${ToolboxIconWrapper} {
|
|
266
|
-
background-color: #e0e0e0;
|
|
267
|
-
border-color: #a0a0a0;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
span {
|
|
272
|
-
font-size: 0.8em;
|
|
273
|
-
color: #333;
|
|
274
|
-
word-break: break-word;
|
|
275
|
-
line-height: 1.1;
|
|
276
|
-
max-width: 70px;
|
|
277
|
-
}
|
|
250
|
+
const ToolboxItem = styled.div `
|
|
251
|
+
display: flex;
|
|
252
|
+
flex-direction: column;
|
|
253
|
+
align-items: center;
|
|
254
|
+
justify-content: center;
|
|
255
|
+
padding: 2px;
|
|
256
|
+
border-radius: 5px;
|
|
257
|
+
cursor: grab;
|
|
258
|
+
transition: background-color 0.2s ease-in-out;
|
|
259
|
+
min-width: 80px;
|
|
260
|
+
text-align: center;
|
|
261
|
+
|
|
262
|
+
&:hover {
|
|
263
|
+
background-color: #e9e9e9;
|
|
264
|
+
|
|
265
|
+
${ToolboxIconWrapper} {
|
|
266
|
+
background-color: #e0e0e0;
|
|
267
|
+
border-color: #a0a0a0;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
span {
|
|
272
|
+
font-size: 0.8em;
|
|
273
|
+
color: #333;
|
|
274
|
+
word-break: break-word;
|
|
275
|
+
line-height: 1.1;
|
|
276
|
+
max-width: 70px;
|
|
277
|
+
}
|
|
278
278
|
`;
|
|
279
|
-
const SvgScrollContainer = styled.div `
|
|
280
|
-
flex-grow: 1;
|
|
281
|
-
overflow: auto;
|
|
282
|
-
position: relative;
|
|
279
|
+
const SvgScrollContainer = styled.div `
|
|
280
|
+
flex-grow: 1;
|
|
281
|
+
overflow: auto;
|
|
282
|
+
position: relative;
|
|
283
283
|
`;
|
|
284
|
-
const StyledSvg = styled.svg `
|
|
285
|
-
min-width: calc(100% - 5px);
|
|
286
|
-
min-height: calc(100% - 5px);
|
|
287
|
-
background-color: transparent;
|
|
288
|
-
|
|
289
|
-
&:focus {
|
|
290
|
-
outline: none;
|
|
291
|
-
}
|
|
284
|
+
const StyledSvg = styled.svg `
|
|
285
|
+
min-width: calc(100% - 5px);
|
|
286
|
+
min-height: calc(100% - 5px);
|
|
287
|
+
background-color: transparent;
|
|
288
|
+
|
|
289
|
+
&:focus {
|
|
290
|
+
outline: none;
|
|
291
|
+
}
|
|
292
292
|
`;
|
|
293
|
-
const ScalableGroup = styled.g `
|
|
294
|
-
transform: translate(${props => props.$translateX}px, ${props => props.$translateY}px) scale(${props => props.$scale});
|
|
295
|
-
transform-origin: 0 0;
|
|
293
|
+
const ScalableGroup = styled.g `
|
|
294
|
+
transform: translate(${props => props.$translateX}px, ${props => props.$translateY}px) scale(${props => props.$scale});
|
|
295
|
+
transform-origin: 0 0;
|
|
296
296
|
`;
|
|
297
|
-
const SelectionRect = styled.rect `
|
|
298
|
-
fill: rgba(0, 123, 255, 0.1);
|
|
299
|
-
stroke: #007bff;
|
|
300
|
-
stroke-width: 1;
|
|
301
|
-
stroke-dasharray: 3 3;
|
|
302
|
-
pointer-events: none;
|
|
297
|
+
const SelectionRect = styled.rect `
|
|
298
|
+
fill: rgba(0, 123, 255, 0.1);
|
|
299
|
+
stroke: #007bff;
|
|
300
|
+
stroke-width: 1;
|
|
301
|
+
stroke-dasharray: 3 3;
|
|
302
|
+
pointer-events: none;
|
|
303
303
|
`;
|
|
304
|
-
const TempConnectionPath = styled.path `
|
|
305
|
-
fill: none;
|
|
306
|
-
stroke: #888;
|
|
307
|
-
stroke-width: 2;
|
|
308
|
-
stroke-dasharray: 5 5;
|
|
309
|
-
pointer-events: none;
|
|
304
|
+
const TempConnectionPath = styled.path `
|
|
305
|
+
fill: none;
|
|
306
|
+
stroke: #888;
|
|
307
|
+
stroke-width: 2;
|
|
308
|
+
stroke-dasharray: 5 5;
|
|
309
|
+
pointer-events: none;
|
|
310
310
|
`;
|
|
311
|
-
const DiagramMessage = styled.div `
|
|
312
|
-
position: absolute;
|
|
313
|
-
top: 50%;
|
|
314
|
-
left: 50%;
|
|
315
|
-
transform: translate(-50%, -50%);
|
|
316
|
-
font-size: 1.2em;
|
|
317
|
-
color: #555;
|
|
318
|
-
text-align: center;
|
|
311
|
+
const DiagramMessage = styled.div `
|
|
312
|
+
position: absolute;
|
|
313
|
+
top: 50%;
|
|
314
|
+
left: 50%;
|
|
315
|
+
transform: translate(-50%, -50%);
|
|
316
|
+
font-size: 1.2em;
|
|
317
|
+
color: #555;
|
|
318
|
+
text-align: center;
|
|
319
319
|
`;
|
|
320
320
|
const WFDiagram = ({ xmlDiagramString, currentSetID, allowEdit = true, onDiagramChange }) => {
|
|
321
321
|
const [isReadOnly, setIsReadOnly] = useState(true);
|
|
@@ -981,11 +981,20 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, allowEdit = true, onDiagram
|
|
|
981
981
|
const handleRestore = useCallback(() => {
|
|
982
982
|
if (isReadOnly)
|
|
983
983
|
return;
|
|
984
|
-
if (initialDiagramRef.current)
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
984
|
+
if (!initialDiagramRef.current)
|
|
985
|
+
return;
|
|
986
|
+
TMMessageBoxManager.show({
|
|
987
|
+
title: SDKUI_Localizator.WorkflowRestoreDiagram,
|
|
988
|
+
message: SDKUI_Localizator.WorkflowRestoreDiagramMessage,
|
|
989
|
+
buttons: [ButtonNames.YES, ButtonNames.NO],
|
|
990
|
+
onButtonClick: async (e) => {
|
|
991
|
+
if (e === ButtonNames.YES) {
|
|
992
|
+
setWfDiagram(initialDiagramRef.current);
|
|
993
|
+
setWfDiagramHistory([initialDiagramRef.current]);
|
|
994
|
+
setHistoryIndex(0);
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
});
|
|
989
998
|
}, [isReadOnly]);
|
|
990
999
|
const autoAdjustDiagram = (diagram) => {
|
|
991
1000
|
if (!diagram)
|
|
@@ -1646,7 +1655,30 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, allowEdit = true, onDiagram
|
|
|
1646
1655
|
isUndoingRedoing.current = false;
|
|
1647
1656
|
}
|
|
1648
1657
|
}, [wfDiagram]);
|
|
1649
|
-
const
|
|
1658
|
+
const handleCanvasDoubleClick = useCallback((event) => {
|
|
1659
|
+
if (isReadOnly) {
|
|
1660
|
+
toggleReadOnlyMode();
|
|
1661
|
+
}
|
|
1662
|
+
}, [isReadOnly, toggleReadOnlyMode]);
|
|
1663
|
+
const handleFullScreenKeyDown = useCallback((event) => {
|
|
1664
|
+
if (event.key === 'Escape') {
|
|
1665
|
+
// Blocca sempre la propagazione per evitare che TMSaveForm riceva l'evento
|
|
1666
|
+
event.preventDefault();
|
|
1667
|
+
event.stopPropagation();
|
|
1668
|
+
// Non chiudere il fullscreen se ci sono modal aperti
|
|
1669
|
+
if (isModalOpen || isConnectionModalOpen)
|
|
1670
|
+
return;
|
|
1671
|
+
setIsFullScreen(false);
|
|
1672
|
+
}
|
|
1673
|
+
}, [isModalOpen, isConnectionModalOpen]);
|
|
1674
|
+
const fullScreenRef = useRef(null);
|
|
1675
|
+
// Gestione focus automatico quando si entra in fullscreen
|
|
1676
|
+
useEffect(() => {
|
|
1677
|
+
if (isFullScreen && fullScreenRef.current) {
|
|
1678
|
+
fullScreenRef.current.focus();
|
|
1679
|
+
}
|
|
1680
|
+
}, [isFullScreen]);
|
|
1681
|
+
const diagramContent = (_jsxs(CanvasContainer, { onDoubleClick: handleCanvasDoubleClick, children: [_jsx("input", { ref: fileInputRef, type: "file", accept: ".xml" // Filtra per file XML
|
|
1650
1682
|
, 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: isReadOnly ? SDKUI_Localizator.Design : SDKUI_Localizator.ReadOnly, children: [isReadOnly ? _jsx(IconPencil, {}) : _jsx(IconLock, {}), !isToolbarCollapsed && _jsx("span", { children: isReadOnly ? SDKUI_Localizator.Design : SDKUI_Localizator.ReadOnly })] }) }), allowEdit && _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [!isReadOnly && _jsxs("button", { onClick: handleToggleToolboxVisibility, title: SDKUI_Localizator.ShowToolbox, children: [_jsx(IconFlowChart, {}), !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.ShowToolboxToggle })] }), _jsxs("button", { onClick: toggleFullScreenMode, title: SDKUI_Localizator.ShowFullScreen, children: [isFullScreen ? _jsx(IconWindowMinimize, {}) : _jsx(IconWindowMaximize, {}), !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.ShowFullScreen })] })] }), _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [_jsxs("button", { onClick: handleZoomIn, title: SDKUI_Localizator.ZoomIn, children: [_jsx(IconZoomIn, {}), !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.ZoomIn })] }), _jsxs("button", { onClick: handleZoomOut, title: SDKUI_Localizator.ZoomOut, children: [_jsx(IconZoomOut, {}), !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.ZoomOut })] }), _jsx(ZoomLevelText, { "$isFloating": isToolbarFloating, "$isCollapsed": isToolbarCollapsed, children: formattedZoomLevel })] }), !isReadOnly && _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [_jsxs("button", { onClick: handleUndo, disabled: historyIndex === 0, title: SDKUI_Localizator.Undo, children: [_jsx(IconUndo, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Undo })] }), _jsxs("button", { onClick: handleRedo, disabled: historyIndex === wfDiagramHistory.length - 1, title: SDKUI_Localizator.Redo, children: [_jsx(IconUndo, { style: { transform: 'scaleX(-1)' } }), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Redo })] }), _jsxs("button", { onClick: handleRestore, title: SDKUI_Localizator.Restore, children: [_jsx(IconRestore, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Restore })] }), _jsxs("button", { onClick: handleNew, title: SDKUI_Localizator.DiagramNew, disabled: isReadOnly, children: [_jsx(IconNew, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.DiagramNew })] }), _jsxs("button", { onClick: handleExportDiagram, disabled: isReadOnly || !wfDiagram, title: SDKUI_Localizator.Export, children: [_jsx(IconExport, {}), _jsx("span", { children: SDKUI_Localizator.Export })] }), _jsxs("button", { onClick: handleImportDiagramClick, disabled: isReadOnly, title: SDKUI_Localizator.Import, children: [_jsx(IconImport, {}), _jsx("span", { children: SDKUI_Localizator.Import })] })] }), !isReadOnly && _jsx(ButtonGroup, { "$isFloating": isToolbarFloating, children: _jsxs("button", { onClick: handleAutoAdjust, title: SDKUI_Localizator.AutoAdjust, children: [_jsx(IconAdjust, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.AutoAdjust })] }) }), !isReadOnly && _jsxs(ButtonGroup, { "$isFloating": isToolbarFloating, children: [_jsxs("button", { onClick: handleCopy, disabled: selectedItems.size === 0, title: SDKUI_Localizator.Copy, children: [_jsx(IconCopy, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Copy })] }), _jsxs("button", { onClick: handleCut, disabled: selectedItems.size === 0, title: SDKUI_Localizator.Cut, children: [_jsx(IconCut, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Cut })] }), _jsxs("button", { onClick: handlePaste, disabled: copiedItems.length === 0 && copiedConnections.length === 0, title: SDKUI_Localizator.Paste, children: [_jsx(IconPaste, {}), " ", !isToolbarCollapsed && _jsx("span", { children: SDKUI_Localizator.Paste })] })] }), allowEdit && _jsxs("button", { onClick: handleToggleToolbarMode, title: isToolbarFloating ? SDKUI_Localizator.ToolbarDock : SDKUI_Localizator.ToolbarFloat, children: [isToolbarFloating ? _jsx(IconPin, {}) : _jsx(IconUnpin, {}), !isToolbarCollapsed && !isToolbarFloating && _jsx("span", { children: SDKUI_Localizator.ToggleMode })] }), !isToolbarFloating && _jsx(ToolbarToggle, { onClick: () => setIsToolbarCollapsed(!isToolbarCollapsed), title: isToolbarCollapsed ? SDKUI_Localizator.ToolbarExpand : SDKUI_Localizator.ToolbarCollapse, 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(ToolboxIconWrapper, { children: _jsx(DiagramItemSvgContent, { itemType: type, width: 38, height: 38, isToolboxPreview: true }) }), _jsx("span", { children: LocalizeDiagramItemType(type) })] }, type))) })), _jsx(SvgScrollContainer, { children: isLoading ?
|
|
1651
1683
|
(_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 => {
|
|
1652
1684
|
const sourceItem = wfDiagram?.DiagramItems.find(item => item.ID === connection.Source.ParentDiagramItem.ID);
|
|
@@ -1661,6 +1693,6 @@ const WFDiagram = ({ xmlDiagramString, currentSetID, allowEdit = true, onDiagram
|
|
|
1661
1693
|
return (_jsx(ConnectionComponent, { connection: connection, isSelected: selectedConnections.has(connection.ID), sourcePoint: sourcePoint, sinkPoint: sinkPoint, isTemporary: isThisConnectionBeingDragged, onClick: handleConnectionClick, onDoubleClick: handleDoubleClickConnection, onConnectionEndpointMouseDown: handleConnectionEndpointMouseDown }, connection.ID));
|
|
1662
1694
|
}), 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 }))] }) })) : (_jsx(DiagramMessage, { children: `${SDKUI_Localizator.WorkflowDiagramMissingOrInvalid} ...` })) }), isModalOpen && itemToEdit && (_jsx(DiagramItemForm, { itemToEdit: itemToEdit, wf: wfDiagram?.Info, onClose: handleCloseModal, onApply: handleUpdateDiagramItem })), isConnectionModalOpen && connectionToEdit && (_jsx(ConnectionForm, { connectionToEdit: connectionToEdit, onClose: () => setIsConnectionModalOpen(false), onApply: handleUpdateConnection }))] }));
|
|
1663
1695
|
const diagramRef = useRef(null);
|
|
1664
|
-
return (_jsxs(_Fragment, { children: [!isFullScreen && (_jsx(DiagramWrapper, { ref: diagramRef, children: diagramContent })), isFullScreen && ReactDOM.createPortal(_jsx(FullScreenContainer, { children: diagramContent }), document.body)] }));
|
|
1696
|
+
return (_jsxs(_Fragment, { children: [!isFullScreen && (_jsx(DiagramWrapper, { ref: diagramRef, children: diagramContent })), isFullScreen && ReactDOM.createPortal(_jsx(FullScreenContainer, { ref: fullScreenRef, tabIndex: 0, onKeyDown: handleFullScreenKeyDown, children: diagramContent }), document.body)] }));
|
|
1665
1697
|
};
|
|
1666
1698
|
export default WFDiagram;
|