@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
|
@@ -12,79 +12,79 @@ export const editorColorManager = (validationItems) => {
|
|
|
12
12
|
return TMColors.info;
|
|
13
13
|
return '';
|
|
14
14
|
};
|
|
15
|
-
export const StyledEditorContainer = styled.div `
|
|
16
|
-
width: ${props => props.$width};
|
|
17
|
-
position: relative;
|
|
15
|
+
export const StyledEditorContainer = styled.div `
|
|
16
|
+
width: ${props => props.$width};
|
|
17
|
+
position: relative;
|
|
18
18
|
`;
|
|
19
|
-
export const StyledEditor = styled.input `
|
|
20
|
-
width: ${props => props.$width};
|
|
21
|
-
padding: ${props => props.$type === 'password' ? '4px 10px 4px 13px' : props.$type === 'number' ? '4px 4px 5px 13px' : '4px 10px 4px 13px'};
|
|
22
|
-
border: 1px solid;
|
|
23
|
-
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
24
|
-
border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid ;
|
|
25
|
-
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
26
|
-
color: ${props => props.readOnly ? '#525252' : !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
27
|
-
border-radius: ${props => props.$borderRadius ?? TMEditorsDefaultBorderRadius};
|
|
28
|
-
min-width: ${props => props.$isMobile && '70px'};
|
|
29
|
-
background: ${props => props.readOnly ? 'linear-gradient(white 20%, #d6d6d6 80%)' : 'white'};
|
|
30
|
-
&:focus{
|
|
31
|
-
outline: none;
|
|
32
|
-
background-image: linear-gradient(white, #E4E9F7);
|
|
33
|
-
border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
34
|
-
border-bottom: 2px solid ;
|
|
35
|
-
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
font-size: ${props => props.$fontSize};
|
|
39
|
-
&::placeholder {
|
|
40
|
-
/* color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)}; */
|
|
41
|
-
font-size: ${props => props.$fontSize};
|
|
42
|
-
}
|
|
19
|
+
export const StyledEditor = styled.input `
|
|
20
|
+
width: ${props => props.$width};
|
|
21
|
+
padding: ${props => props.$type === 'password' ? '4px 10px 4px 13px' : props.$type === 'number' ? '4px 4px 5px 13px' : '4px 10px 4px 13px'};
|
|
22
|
+
border: 1px solid;
|
|
23
|
+
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
24
|
+
border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid ;
|
|
25
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
26
|
+
color: ${props => props.readOnly ? '#525252' : !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
27
|
+
border-radius: ${props => props.$borderRadius ?? TMEditorsDefaultBorderRadius};
|
|
28
|
+
min-width: ${props => props.$isMobile && '70px'};
|
|
29
|
+
background: ${props => props.readOnly ? 'linear-gradient(white 20%, #d6d6d6 80%)' : 'white'};
|
|
30
|
+
&:focus{
|
|
31
|
+
outline: none;
|
|
32
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
33
|
+
border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
34
|
+
border-bottom: 2px solid ;
|
|
35
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
font-size: ${props => props.$fontSize};
|
|
39
|
+
&::placeholder {
|
|
40
|
+
/* color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)}; */
|
|
41
|
+
font-size: ${props => props.$fontSize};
|
|
42
|
+
}
|
|
43
43
|
`;
|
|
44
|
-
export const StyledEditorIcon = styled.div `
|
|
45
|
-
color: ${props => !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'rgb(80,80,80)' : TMColors.tertiary : editorColorManager(props.$vil) : 'rgb(180,180,180)'};
|
|
46
|
-
width: 25px;
|
|
47
|
-
height: 25px;
|
|
48
|
-
margin-right: 2px;
|
|
49
|
-
font-size: 18px;
|
|
50
|
-
user-select: none;
|
|
51
|
-
transform: translateY(18px);
|
|
44
|
+
export const StyledEditorIcon = styled.div `
|
|
45
|
+
color: ${props => !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'rgb(80,80,80)' : TMColors.tertiary : editorColorManager(props.$vil) : 'rgb(180,180,180)'};
|
|
46
|
+
width: 25px;
|
|
47
|
+
height: 25px;
|
|
48
|
+
margin-right: 2px;
|
|
49
|
+
font-size: 18px;
|
|
50
|
+
user-select: none;
|
|
51
|
+
transform: translateY(18px);
|
|
52
52
|
`;
|
|
53
|
-
export const StyledEditorLabel = styled.div `
|
|
54
|
-
font-size: ${props => props.$fontSize ?? TMEditorsDefaultLabelFontSize} ;
|
|
55
|
-
color:${props => !props.$disabled ? props.$isFocused ? TMColors.primary : props.$color ? props.$color : TMColors.label_normal : TMColors.disabled};
|
|
56
|
-
padding: 0 3px;
|
|
57
|
-
user-select: none;
|
|
58
|
-
transform: ${props => props.$labelPosition === 'left' && 'translateY(5px)'};
|
|
59
|
-
width: max-content;
|
|
60
|
-
transform: translate(10px, 6px);
|
|
61
|
-
background-color: ${TMColors.default_background};
|
|
62
|
-
position: relative;
|
|
63
|
-
z-index: 1;
|
|
53
|
+
export const StyledEditorLabel = styled.div `
|
|
54
|
+
font-size: ${props => props.$fontSize ?? TMEditorsDefaultLabelFontSize} ;
|
|
55
|
+
color:${props => !props.$disabled ? props.$isFocused ? TMColors.primary : props.$color ? props.$color : TMColors.label_normal : TMColors.disabled};
|
|
56
|
+
padding: 0 3px;
|
|
57
|
+
user-select: none;
|
|
58
|
+
transform: ${props => props.$labelPosition === 'left' && 'translateY(5px)'};
|
|
59
|
+
width: max-content;
|
|
60
|
+
transform: translate(10px, 6px);
|
|
61
|
+
background-color: ${TMColors.default_background};
|
|
62
|
+
position: relative;
|
|
63
|
+
z-index: 1;
|
|
64
64
|
`;
|
|
65
|
-
export const StyledTextareaEditor = styled.textarea `
|
|
66
|
-
width: ${props => props.$width};
|
|
67
|
-
padding: 4px 5px 4px 13px;
|
|
68
|
-
border: 1px solid;
|
|
69
|
-
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
70
|
-
border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid;
|
|
71
|
-
border-bottom-color: ${props => props.$vil.length === 0 ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
72
|
-
color: ${props => props.readOnly ? '#525252' : !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
73
|
-
background: ${props => props.readOnly ? 'linear-gradient(white 20%, #d6d6d6 80%)' : 'white'};
|
|
74
|
-
border-radius: ${props => props.$borderRadius ?? TMEditorsDefaultBorderRadius}; /* Slightly increased radius for smoother corners */
|
|
75
|
-
min-width: ${props => (props.$isMobile ? '70px' : '100%')}; /* Adjust for mobile */
|
|
76
|
-
max-height: ${props => props.$maxHeight ?? 'auto'};
|
|
77
|
-
resize: ${props => (props.$resize === false ? 'none' : 'both')};
|
|
78
|
-
&:focus {
|
|
79
|
-
outline: none;
|
|
80
|
-
background-image: linear-gradient(white, #E4E9F7);
|
|
81
|
-
border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
82
|
-
border-bottom: 2px solid;
|
|
83
|
-
border-bottom-color: ${props => props.$vil.length === 0 ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
84
|
-
}
|
|
85
|
-
font-size: ${props => props.$fontSize};
|
|
86
|
-
&::placeholder {
|
|
87
|
-
color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)};
|
|
88
|
-
font-size: ${props => props.$fontSize};
|
|
89
|
-
}
|
|
65
|
+
export const StyledTextareaEditor = styled.textarea `
|
|
66
|
+
width: ${props => props.$width};
|
|
67
|
+
padding: 4px 5px 4px 13px;
|
|
68
|
+
border: 1px solid;
|
|
69
|
+
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
70
|
+
border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid;
|
|
71
|
+
border-bottom-color: ${props => props.$vil.length === 0 ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
72
|
+
color: ${props => props.readOnly ? '#525252' : !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
73
|
+
background: ${props => props.readOnly ? 'linear-gradient(white 20%, #d6d6d6 80%)' : 'white'};
|
|
74
|
+
border-radius: ${props => props.$borderRadius ?? TMEditorsDefaultBorderRadius}; /* Slightly increased radius for smoother corners */
|
|
75
|
+
min-width: ${props => (props.$isMobile ? '70px' : '100%')}; /* Adjust for mobile */
|
|
76
|
+
max-height: ${props => props.$maxHeight ?? 'auto'};
|
|
77
|
+
resize: ${props => (props.$resize === false ? 'none' : 'both')};
|
|
78
|
+
&:focus {
|
|
79
|
+
outline: none;
|
|
80
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
81
|
+
border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
82
|
+
border-bottom: 2px solid;
|
|
83
|
+
border-bottom-color: ${props => props.$vil.length === 0 ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
84
|
+
}
|
|
85
|
+
font-size: ${props => props.$fontSize};
|
|
86
|
+
&::placeholder {
|
|
87
|
+
color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)};
|
|
88
|
+
font-size: ${props => props.$fontSize};
|
|
89
|
+
}
|
|
90
90
|
`;
|
|
@@ -3,22 +3,22 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { UserListCacheService } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { TMColors } from '../../utils/theme';
|
|
6
|
-
const Wrapper = styled.div `
|
|
7
|
-
* {
|
|
8
|
-
color: ${(props) => props.$isSelected && '#fff !important'};
|
|
9
|
-
}
|
|
10
|
-
ul li {
|
|
11
|
-
list-style-position: inside;
|
|
12
|
-
}
|
|
13
|
-
ol li {
|
|
14
|
-
list-style-position: inside;
|
|
15
|
-
}
|
|
16
|
-
.highlight {
|
|
17
|
-
background-color: ${(props) => props.$isSelected ? '#6c9023' : 'yellow'};
|
|
18
|
-
}
|
|
19
|
-
a {
|
|
20
|
-
color: ${(props) => (props.$isSelected ? '#fff' : 'rgb(26, 13, 171)')};
|
|
21
|
-
}
|
|
6
|
+
const Wrapper = styled.div `
|
|
7
|
+
* {
|
|
8
|
+
color: ${(props) => props.$isSelected && '#fff !important'};
|
|
9
|
+
}
|
|
10
|
+
ul li {
|
|
11
|
+
list-style-position: inside;
|
|
12
|
+
}
|
|
13
|
+
ol li {
|
|
14
|
+
list-style-position: inside;
|
|
15
|
+
}
|
|
16
|
+
.highlight {
|
|
17
|
+
background-color: ${(props) => props.$isSelected ? '#6c9023' : 'yellow'};
|
|
18
|
+
}
|
|
19
|
+
a {
|
|
20
|
+
color: ${(props) => (props.$isSelected ? '#fff' : 'rgb(26, 13, 171)')};
|
|
21
|
+
}
|
|
22
22
|
`;
|
|
23
23
|
const convertLinksToAnchors = (markup) => {
|
|
24
24
|
const urlRegex = /(?<!href=["'])(https?:\/\/[^\s"'<>]+[^\s"'<>.,;:!?)])/g;
|
|
@@ -26,40 +26,40 @@ const Portal = ({ children, popoverRef }) => {
|
|
|
26
26
|
}, [popoverRef]);
|
|
27
27
|
return createPortal(children, elRef.current);
|
|
28
28
|
};
|
|
29
|
-
const LocalizedContainer = styled.div `
|
|
30
|
-
position: relative;
|
|
31
|
-
width: 100%;
|
|
29
|
+
const LocalizedContainer = styled.div `
|
|
30
|
+
position: relative;
|
|
31
|
+
width: 100%;
|
|
32
32
|
`;
|
|
33
|
-
const Popover = styled.div `
|
|
34
|
-
display: ${props => props.$isVisible ? 'flex' : 'none'};
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
position: fixed; /* Usa 'fixed' o 'absolute' a seconda del comportamento desiderato */
|
|
37
|
-
top: ${props => props.$top}px;
|
|
38
|
-
left: ${props => props.$left}px;
|
|
39
|
-
width: ${props => props.$width}px;
|
|
40
|
-
border: 1px solid #ccc;
|
|
41
|
-
border-radius: 4px;
|
|
42
|
-
background-color: #fff;
|
|
43
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
44
|
-
z-index: 2000;
|
|
45
|
-
padding: 8px;
|
|
33
|
+
const Popover = styled.div `
|
|
34
|
+
display: ${props => props.$isVisible ? 'flex' : 'none'};
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
position: fixed; /* Usa 'fixed' o 'absolute' a seconda del comportamento desiderato */
|
|
37
|
+
top: ${props => props.$top}px;
|
|
38
|
+
left: ${props => props.$left}px;
|
|
39
|
+
width: ${props => props.$width}px;
|
|
40
|
+
border: 1px solid #ccc;
|
|
41
|
+
border-radius: 4px;
|
|
42
|
+
background-color: #fff;
|
|
43
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
44
|
+
z-index: 2000;
|
|
45
|
+
padding: 8px;
|
|
46
46
|
`;
|
|
47
|
-
const Badge = styled.span `
|
|
48
|
-
position: absolute;
|
|
49
|
-
top: -8px;
|
|
50
|
-
right: -8px;
|
|
51
|
-
background-color: #ff9800;
|
|
52
|
-
color: white;
|
|
53
|
-
border-radius: 50%;
|
|
54
|
-
padding: 2px 6px;
|
|
55
|
-
font-size: 10px;
|
|
56
|
-
font-weight: bold;
|
|
57
|
-
pointer-events: none;
|
|
47
|
+
const Badge = styled.span `
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: -8px;
|
|
50
|
+
right: -8px;
|
|
51
|
+
background-color: #ff9800;
|
|
52
|
+
color: white;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
padding: 2px 6px;
|
|
55
|
+
font-size: 10px;
|
|
56
|
+
font-weight: bold;
|
|
57
|
+
pointer-events: none;
|
|
58
58
|
`;
|
|
59
|
-
const IconContainer = styled.div `
|
|
60
|
-
position: relative;
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
59
|
+
const IconContainer = styled.div `
|
|
60
|
+
position: relative;
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
63
|
`;
|
|
64
64
|
// Helper function to get image path
|
|
65
65
|
export const getCultureIDImg = (cultureID) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import styled from "styled-components";
|
|
4
|
-
import { AccessLevels, DcmtTypeListCacheService, LayoutItemTypes, LayoutModes, MetadataDataDomains, MetadataDataTypes, SDK_Globals, SystemMIDsAsNumber, SystemTIDs, TemplateTIDs, WorkItemMetadataNames } from '@topconsultnpm/sdk-ts';
|
|
4
|
+
import { AccessLevels, DcmtTypeListCacheService, LayoutGroupBorderStyles, LayoutGroupOrientations, LayoutItemTypes, LayoutModes, MetadataDataDomains, MetadataDataTypes, SDK_Globals, SystemMIDsAsNumber, SystemTIDs, TemplateTIDs, WorkItemMetadataNames } from '@topconsultnpm/sdk-ts';
|
|
5
5
|
import { IconUndo, IconPencil, IconFunction, IconMenuVertical, IconDataList, SDKUI_Localizator, IconNull, stringIsNullOrEmpty, deepCompare, SDKUI_Globals, IconDcmtTypeSys } from "../../helper";
|
|
6
6
|
import { TMColors } from "../../utils/theme";
|
|
7
7
|
import TMButton from "../base/TMButton";
|
|
@@ -13,6 +13,7 @@ import { FormulaHelper } from "./TMFormulaEditor";
|
|
|
13
13
|
import { DraftsMIDs, DSAttachsMIDs } from "../../ts";
|
|
14
14
|
import { TMNothingToShow } from "../features/documents/TMDcmtPreview";
|
|
15
15
|
import TMAccordion from "../base/TMAccordion";
|
|
16
|
+
import TabPanel, { Item } from 'devextreme-react/tab-panel';
|
|
16
17
|
export var ShowCheckBoxesMode;
|
|
17
18
|
(function (ShowCheckBoxesMode) {
|
|
18
19
|
ShowCheckBoxesMode[ShowCheckBoxesMode["Never"] = 0] = "Never";
|
|
@@ -33,6 +34,7 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
33
34
|
const [selectedItem, setSelectedItem] = useState(undefined);
|
|
34
35
|
const [prevMetadataValues, setPrevMetadataValues] = useState([]);
|
|
35
36
|
const [inputMidsApplied, setInputMidsApplied] = useState(false);
|
|
37
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
36
38
|
const onChangeHandler = useCallback((newValue, mid) => {
|
|
37
39
|
let newValues = structuredClone(metadataValues);
|
|
38
40
|
const item = newValues.find(value => value.mid === mid);
|
|
@@ -440,17 +442,49 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
440
442
|
// Check if this is a LayoutRoot - just render its children
|
|
441
443
|
if (layoutItem.type === LayoutItemTypes.LayoutRoot) {
|
|
442
444
|
const children = getChildren(layoutItem.layoutItemID);
|
|
443
|
-
|
|
445
|
+
if (layout.showTab) {
|
|
446
|
+
return (_jsx(React.Fragment, { children: _jsx(TabPanel, { width: "100%", height: "100%", children: children.map(child => renderLayoutItem(child, depth, visited)) }) }, `root-${layoutItem.layoutItemID}`));
|
|
447
|
+
}
|
|
448
|
+
else {
|
|
449
|
+
return (_jsx(React.Fragment, { children: children.map(child => renderLayoutItem(child, depth, visited)) }, `root-${layoutItem.layoutItemID}`));
|
|
450
|
+
}
|
|
444
451
|
}
|
|
445
452
|
// Check if this is a LayoutGroup
|
|
446
453
|
else if (layoutItem.type === LayoutItemTypes.LayoutGroup && layoutItem.lgd) {
|
|
447
454
|
const children = getChildren(layoutItem.layoutItemID);
|
|
448
455
|
const groupDescriptor = layoutItem.lgd;
|
|
449
456
|
const groupTitle = groupDescriptor.caption || `Group ${layoutItem.layoutItemID}`;
|
|
457
|
+
const groupIsNoBorder = groupDescriptor.borderStyle == undefined || groupDescriptor.borderStyle == LayoutGroupBorderStyles.NoBorder || groupDescriptor.borderStyle == LayoutGroupBorderStyles.None;
|
|
450
458
|
const isCollapsed = false; // LayoutGroupDescriptor doesn't have collapsed property
|
|
459
|
+
//Layout Grou da trasformare in tab
|
|
460
|
+
if (groupDescriptor.orientation == LayoutGroupOrientations.Vertical && layout.showTab && layoutItem.parentID === 0) {
|
|
461
|
+
return (_jsx(Item, { title: groupTitle, children: _jsx("div", { style: { width: '100%' }, children: children.map(child => renderLayoutItem(child, depth + 1, visited)) }) }, `group-tab-${layoutItem.layoutItemID}`));
|
|
462
|
+
}
|
|
463
|
+
if (groupIsNoBorder && groupDescriptor.orientation !== LayoutGroupOrientations.Horizontal && children.length == 0) {
|
|
464
|
+
return (_jsx("br", {}));
|
|
465
|
+
}
|
|
466
|
+
if (groupIsNoBorder && groupDescriptor.orientation === LayoutGroupOrientations.Vertical) {
|
|
467
|
+
return (_jsx("div", { style: { width: '100%', border: 'none', padding: 0 }, children: children.map(child => renderLayoutItem(child, depth + 1, visited)) }));
|
|
468
|
+
}
|
|
469
|
+
if (!groupIsNoBorder && groupDescriptor.orientation === LayoutGroupOrientations.Vertical) {
|
|
470
|
+
if (groupDescriptor.borderStyle == LayoutGroupBorderStyles.Group) {
|
|
471
|
+
return (_jsxs("div", { style: { position: 'relative', border: '2px solid #CAD9EB', borderRadius: '3px', padding: '12px 6px 6px', margin: '10px', display: 'flex', flexDirection: 'column', flexWrap: 'wrap', gap: '3px', }, children: [_jsx("div", { style: { position: 'absolute', top: '-10px', left: '10px', padding: '0 8px', backgroundColor: '#fff', fontWeight: 600, fontSize: '1rem', color: TMColors.primaryColor, }, children: groupTitle }), children.map(child => renderLayoutItem(child, depth + 1, visited))] }));
|
|
472
|
+
}
|
|
473
|
+
if (groupDescriptor.borderStyle == LayoutGroupBorderStyles.GroupBox || groupDescriptor.borderStyle == LayoutGroupBorderStyles.Tabbed) {
|
|
474
|
+
return (_jsx(TMAccordion, { title: groupTitle, titleSize: "Small", children: children.map(child => renderLayoutItem(child, depth + 1, visited)) }));
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
if (groupDescriptor.orientation === LayoutGroupOrientations.Horizontal) {
|
|
478
|
+
return (_jsx("div", { style: { display: 'flex', flexDirection: 'row', flexWrap: 'wrap', gap: '3px' }, children: groupDescriptor.borderStyle == LayoutGroupBorderStyles.GroupBox || groupDescriptor.borderStyle == LayoutGroupBorderStyles.Tabbed ?
|
|
479
|
+
_jsx(TMAccordion, { title: groupTitle, titleSize: "Small", children: children.map(child => renderLayoutItem(child, depth + 1, visited)) }) :
|
|
480
|
+
groupDescriptor.borderStyle == LayoutGroupBorderStyles.Group ?
|
|
481
|
+
_jsxs("div", { style: { position: 'relative', border: '2px solid #CAD9EB', borderRadius: '3px', padding: '12px 6px 6px', margin: '10px', display: 'flex', flexDirection: 'column', flexWrap: 'wrap', gap: '3px', }, children: [_jsx("div", { style: { position: 'absolute', top: '-10px', left: '10px', padding: '0 8px', backgroundColor: '#fff', fontWeight: 600, fontSize: '1rem', color: TMColors.primaryColor, }, children: groupTitle }), children.map(child => (_jsx("div", { style: { flex: '1 1 0', minWidth: 0 }, children: renderLayoutItem(child, depth + 1, visited) }, child.layoutItemID)))] })
|
|
482
|
+
:
|
|
483
|
+
children.map(child => (_jsx("div", { style: { flex: '1 1 0', minWidth: 0 }, children: renderLayoutItem(child, depth + 1, visited) }, child.layoutItemID))) }, `group-horizontal-${layoutItem.layoutItemID}`));
|
|
484
|
+
}
|
|
451
485
|
// Apply indentation only to subgroups (depth > 0), not to root groups
|
|
452
486
|
const indentationPx = depth > 0 ? depth * 10 : 0;
|
|
453
|
-
return (_jsx("div", { style: { paddingLeft: `${indentationPx}px` }, children: _jsx(TMAccordion, { title: groupTitle, defaultCollapsed: isCollapsed, children: children.map(child => renderLayoutItem(child, depth + 1, visited)) }) }, `group-wrapper-${layoutItem.layoutItemID}`));
|
|
487
|
+
return (_jsx("div", { style: { paddingLeft: `${indentationPx}px` }, children: _jsx(TMAccordion, { title: groupTitle, defaultCollapsed: isCollapsed, titleSize: "Small", children: children.map(child => renderLayoutItem(child, depth + 1, visited)) }) }, `group-wrapper-${layoutItem.layoutItemID}`));
|
|
454
488
|
}
|
|
455
489
|
// Check if this is a LayoutControlItem (metadata field)
|
|
456
490
|
else if (layoutItem.type === LayoutItemTypes.LayoutControlItem && layoutItem.lcid) {
|
|
@@ -458,12 +492,19 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
458
492
|
const mid = controlDescriptor.mid;
|
|
459
493
|
if (!mid)
|
|
460
494
|
return null;
|
|
495
|
+
let isAccordion = true;
|
|
496
|
+
const parent = layout.items?.filter(p => p.layoutItemID === layoutItem.parentID);
|
|
497
|
+
if (parent && parent.length > 0 && parent[0].type === LayoutItemTypes.LayoutGroup && parent[0].lgd) {
|
|
498
|
+
const groupDescriptor = parent[0].lgd;
|
|
499
|
+
if (groupDescriptor.borderStyle == LayoutGroupBorderStyles.Group)
|
|
500
|
+
isAccordion = false;
|
|
501
|
+
}
|
|
461
502
|
// Find the metadata value for this MID
|
|
462
503
|
const metadataItem = metadataValues.find(m => m.mid === mid);
|
|
463
504
|
if (!metadataItem)
|
|
464
505
|
return null;
|
|
465
506
|
// Indent control items based on depth so they align under groups
|
|
466
|
-
const controlIndentPx = depth > 0 ? depth * 10 : 15;
|
|
507
|
+
const controlIndentPx = !isAccordion ? 3 : isAccordion && depth > 0 ? depth * 10 : 15;
|
|
467
508
|
return (_jsx("div", { style: { paddingLeft: `${controlIndentPx}px` }, children: renderMetadataItem(metadataItem) }, `control-${layoutItem.layoutItemID}`));
|
|
468
509
|
}
|
|
469
510
|
// Check if this is a SeparatorItem (horizontal line)
|
|
@@ -508,23 +549,23 @@ const TMMetadataValues = ({ showCheckBoxes = ShowCheckBoxesMode.Never, checkPerm
|
|
|
508
549
|
};
|
|
509
550
|
export default TMMetadataValues;
|
|
510
551
|
//#region Styled Components
|
|
511
|
-
const StyledMetadataValuesContainer = styled.div `
|
|
512
|
-
display: flex;
|
|
513
|
-
flex-direction: column;
|
|
514
|
-
width: 100%;
|
|
515
|
-
height: 100%;
|
|
516
|
-
overflow: auto;
|
|
517
|
-
padding: 0 10px 10px 10px;
|
|
552
|
+
const StyledMetadataValuesContainer = styled.div `
|
|
553
|
+
display: flex;
|
|
554
|
+
flex-direction: column;
|
|
555
|
+
width: 100%;
|
|
556
|
+
height: 100%;
|
|
557
|
+
overflow: auto;
|
|
558
|
+
padding: 0 10px 10px 10px;
|
|
518
559
|
`;
|
|
519
|
-
const StyledRow = styled.div `
|
|
520
|
-
display: flex;
|
|
521
|
-
flex-direction: row;
|
|
522
|
-
width: 100%;
|
|
523
|
-
gap: 5px;
|
|
560
|
+
const StyledRow = styled.div `
|
|
561
|
+
display: flex;
|
|
562
|
+
flex-direction: row;
|
|
563
|
+
width: 100%;
|
|
564
|
+
gap: 5px;
|
|
524
565
|
`;
|
|
525
|
-
const StyledSeparator = styled.hr `
|
|
526
|
-
width: 100%;
|
|
527
|
-
margin: 10px 0;
|
|
528
|
-
border: none;
|
|
529
|
-
border-top: 1px solid #e0e0e0;
|
|
566
|
+
const StyledSeparator = styled.hr `
|
|
567
|
+
width: 100%;
|
|
568
|
+
margin: 10px 0;
|
|
569
|
+
border: none;
|
|
570
|
+
border-top: 1px solid #e0e0e0;
|
|
530
571
|
`;
|
|
@@ -2,51 +2,51 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { FontSize, TMColors } from '../../utils/theme';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { makeID } from '../../helper/helpers';
|
|
5
|
-
const StyledWrapper = styled.label `
|
|
6
|
-
color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.text_normal : TMColors.disabled};
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: ${props => props.$direction};
|
|
9
|
-
align-items: ${props => props.$direction === 'row' ? 'center' : 'flex-start'};
|
|
10
|
-
font-size: ${props => props.$fontSize};
|
|
11
|
-
gap: ${props => props.$direction === 'row' ? '20px' : "10px"};
|
|
5
|
+
const StyledWrapper = styled.label `
|
|
6
|
+
color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.text_normal : TMColors.disabled};
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: ${props => props.$direction};
|
|
9
|
+
align-items: ${props => props.$direction === 'row' ? 'center' : 'flex-start'};
|
|
10
|
+
font-size: ${props => props.$fontSize};
|
|
11
|
+
gap: ${props => props.$direction === 'row' ? '20px' : "10px"};
|
|
12
12
|
`;
|
|
13
|
-
const StyledRadioGroupLabel = styled.div `
|
|
14
|
-
flex: ${props => props.$flexBase};
|
|
13
|
+
const StyledRadioGroupLabel = styled.div `
|
|
14
|
+
flex: ${props => props.$flexBase};
|
|
15
15
|
`;
|
|
16
|
-
const StyledRadioGroupContainer = styled.div `
|
|
17
|
-
flex: ${props => 10 - props.$flexBase};
|
|
16
|
+
const StyledRadioGroupContainer = styled.div `
|
|
17
|
+
flex: ${props => 10 - props.$flexBase};
|
|
18
18
|
`;
|
|
19
|
-
const StyledRadioButtonWrapper = styled.div `
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: ${props => props.$direction};
|
|
22
|
-
align-items: ${props => props.$direction === 'row' ? 'center' : 'flex-start'};
|
|
23
|
-
justify-content: flex-start;
|
|
24
|
-
gap: ${props => props.$direction === 'row' ? '10px' : '5px'};
|
|
19
|
+
const StyledRadioButtonWrapper = styled.div `
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: ${props => props.$direction};
|
|
22
|
+
align-items: ${props => props.$direction === 'row' ? 'center' : 'flex-start'};
|
|
23
|
+
justify-content: flex-start;
|
|
24
|
+
gap: ${props => props.$direction === 'row' ? '10px' : '5px'};
|
|
25
25
|
`;
|
|
26
|
-
const StyledRadioButtoncontainer = styled.div `
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: row;
|
|
29
|
-
align-items: center;
|
|
30
|
-
justify-content: flex-start;
|
|
31
|
-
gap: 5px;
|
|
32
|
-
height: 18px;
|
|
26
|
+
const StyledRadioButtoncontainer = styled.div `
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: flex-start;
|
|
31
|
+
gap: 5px;
|
|
32
|
+
height: 18px;
|
|
33
33
|
`;
|
|
34
|
-
const StyledRadioButton = styled.input `
|
|
35
|
-
accent-color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.primary : TMColors.disabled};
|
|
36
|
-
cursor: ${props => !props.$disabled && 'pointer'};
|
|
34
|
+
const StyledRadioButton = styled.input `
|
|
35
|
+
accent-color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.primary : TMColors.disabled};
|
|
36
|
+
cursor: ${props => !props.$disabled && 'pointer'};
|
|
37
37
|
`;
|
|
38
|
-
const StyledradioButtonLabel = styled.label `
|
|
39
|
-
font-size: ${props => props.$fontSize};
|
|
40
|
-
color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.text_normal : TMColors.disabled};
|
|
41
|
-
user-select: none;
|
|
42
|
-
width: 100%;
|
|
43
|
-
cursor: ${props => !props.$disabled && 'pointer'};
|
|
44
|
-
&:focus{
|
|
45
|
-
outline: none;
|
|
46
|
-
background-image: linear-gradient(white, #E4E9F7);
|
|
47
|
-
border-bottom: 2px solid ;
|
|
48
|
-
border-bottom-color: ${props => !props.$isModifiedWhen ? TMColors.primary : TMColors.isModified};
|
|
49
|
-
}
|
|
38
|
+
const StyledradioButtonLabel = styled.label `
|
|
39
|
+
font-size: ${props => props.$fontSize};
|
|
40
|
+
color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.text_normal : TMColors.disabled};
|
|
41
|
+
user-select: none;
|
|
42
|
+
width: 100%;
|
|
43
|
+
cursor: ${props => !props.$disabled && 'pointer'};
|
|
44
|
+
&:focus{
|
|
45
|
+
outline: none;
|
|
46
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
47
|
+
border-bottom: 2px solid ;
|
|
48
|
+
border-bottom-color: ${props => !props.$isModifiedWhen ? TMColors.primary : TMColors.isModified};
|
|
49
|
+
}
|
|
50
50
|
`;
|
|
51
51
|
const TMRadioButton = ({ isModifiedWhen, flexBase = 1, elementStyle, label, value, fontSize = FontSize.defaultFontSize, dataSource = [], direction = 'row', onValueChanged, disabled = false }) => {
|
|
52
52
|
const renderedRadioButtons = () => {
|
|
@@ -7,46 +7,46 @@ import { IconClearButton, IconPencil, SDKUI_Localizator } from '../../helper';
|
|
|
7
7
|
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
|
8
8
|
import TMVilViewer from '../base/TMVilViewer';
|
|
9
9
|
import TMTooltip from '../base/TMTooltip';
|
|
10
|
-
const StyledSummaryTemplateInput = styled.div `
|
|
11
|
-
width: ${props => props.$width};
|
|
12
|
-
height: ${props => props.$height};
|
|
13
|
-
padding: ${props => !props.$showBorder ? '4px 5px' : '5px 5px 5px 13px'};
|
|
14
|
-
border: ${props => !props.$showBorder ? '' : '1px solid'};
|
|
15
|
-
background: ${props => props.$readOnly ? 'linear-gradient(white 20%, #d6d6d6 80%)' : props.$backgroundColor};
|
|
16
|
-
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
17
|
-
border-bottom: ${props => !props.$showBorder ? '' : (props.$vil.length > 0) ? '3px solid' : '1px solid'} ;
|
|
18
|
-
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
19
|
-
color: ${props => props.$readOnly ? '#525252' : !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
20
|
-
border-radius: ${props => !props.$showBorder ? props.$borderRadius : TMEditorsDefaultBorderRadius};
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
|
|
25
|
-
&:focus{
|
|
26
|
-
outline: none;
|
|
27
|
-
background-image: ${props => !props.$showBorder ? '' : 'linear-gradient(white, #E4E9F7)'};
|
|
28
|
-
border: ${props => !props.$showBorder ? '' : props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
29
|
-
border-bottom: ${props => !props.$showBorder ? '' : '2px solid'};
|
|
30
|
-
border-bottom-color: ${props => !props.$showBorder ? '' : (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
31
|
-
}
|
|
32
|
-
font-size: ${props => props.$fontSize};
|
|
33
|
-
&::placeholder {
|
|
34
|
-
/* color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)}; */
|
|
35
|
-
font-size: ${props => props.$fontSize};
|
|
36
|
-
}
|
|
10
|
+
const StyledSummaryTemplateInput = styled.div `
|
|
11
|
+
width: ${props => props.$width};
|
|
12
|
+
height: ${props => props.$height};
|
|
13
|
+
padding: ${props => !props.$showBorder ? '4px 5px' : '5px 5px 5px 13px'};
|
|
14
|
+
border: ${props => !props.$showBorder ? '' : '1px solid'};
|
|
15
|
+
background: ${props => props.$readOnly ? 'linear-gradient(white 20%, #d6d6d6 80%)' : props.$backgroundColor};
|
|
16
|
+
border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
|
|
17
|
+
border-bottom: ${props => !props.$showBorder ? '' : (props.$vil.length > 0) ? '3px solid' : '1px solid'} ;
|
|
18
|
+
border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
|
|
19
|
+
color: ${props => props.$readOnly ? '#525252' : !props.$disabled ? (props.$vil.length === 0) ? !props.$isModified ? 'black' : TMColors.isModified : editorColorManager(props.$vil) : TMColors.disabled};
|
|
20
|
+
border-radius: ${props => !props.$showBorder ? props.$borderRadius : TMEditorsDefaultBorderRadius};
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
|
|
25
|
+
&:focus{
|
|
26
|
+
outline: none;
|
|
27
|
+
background-image: ${props => !props.$showBorder ? '' : 'linear-gradient(white, #E4E9F7)'};
|
|
28
|
+
border: ${props => !props.$showBorder ? '' : props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
|
|
29
|
+
border-bottom: ${props => !props.$showBorder ? '' : '2px solid'};
|
|
30
|
+
border-bottom-color: ${props => !props.$showBorder ? '' : (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
|
|
31
|
+
}
|
|
32
|
+
font-size: ${props => props.$fontSize};
|
|
33
|
+
&::placeholder {
|
|
34
|
+
/* color: ${props => (props.$vil.length === 0) ? 'gray' : editorColorManager(props.$vil)}; */
|
|
35
|
+
font-size: ${props => props.$fontSize};
|
|
36
|
+
}
|
|
37
37
|
`;
|
|
38
|
-
const StyledEditorButtonIcon2 = styled.div `
|
|
39
|
-
color: ${TMColors.button_icon};
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
position: relative;
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
&:focus{
|
|
45
|
-
outline: none;
|
|
46
|
-
background-image: linear-gradient(white, #E4E9F7);
|
|
47
|
-
border-bottom: 2px solid;
|
|
48
|
-
border-bottom-color: ${TMColors.primary};
|
|
49
|
-
}
|
|
38
|
+
const StyledEditorButtonIcon2 = styled.div `
|
|
39
|
+
color: ${TMColors.button_icon};
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
position: relative;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
&:focus{
|
|
45
|
+
outline: none;
|
|
46
|
+
background-image: linear-gradient(white, #E4E9F7);
|
|
47
|
+
border-bottom: 2px solid;
|
|
48
|
+
border-bottom-color: ${TMColors.primary};
|
|
49
|
+
}
|
|
50
50
|
`;
|
|
51
51
|
const TMSummary = forwardRef(({ placeHolder, readOnly, labelColor, hasValue, borderRadius = '4px', validationItems = [], buttons = [], label = '', onClearClick, openEditorOnSummaryClick = true, onEditorClick, backgroundColor = 'transparent', showBorder = true, isModifiedWhen, elementStyle, width = '100%', height = '100%', fontSize = FontSize.defaultFontSize, icon, showEditButton = true, showClearButton, iconEditButton, iconeEditTooltip, labelPosition = 'left', template, disabled = false, onValueChanged }, ref) => {
|
|
52
52
|
const summaryElementRef = useRef(null); // Ref all'elemento DOM div principale
|