@topconsultnpm/sdkui-react-beta 6.17.0 → 6.17.2

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.
Files changed (127) hide show
  1. package/lib/assets/IconsS4t/add.svg +12 -12
  2. package/lib/assets/IconsS4t/aggiorna.svg +18 -18
  3. package/lib/assets/IconsS4t/bookmark.svg +42 -42
  4. package/lib/assets/IconsS4t/cancella.svg +15 -15
  5. package/lib/assets/IconsS4t/check-box.svg +19 -19
  6. package/lib/assets/IconsS4t/down-arrow-signBook.svg +40 -40
  7. package/lib/assets/IconsS4t/down.svg +28 -28
  8. package/lib/assets/IconsS4t/edit-file.svg +19 -19
  9. package/lib/assets/IconsS4t/edita.svg +32 -32
  10. package/lib/assets/IconsS4t/firma.svg +19 -19
  11. package/lib/assets/IconsS4t/icona_download.svg +16 -16
  12. package/lib/assets/IconsS4t/info.svg +51 -51
  13. package/lib/assets/IconsS4t/left.svg +20 -20
  14. package/lib/assets/IconsS4t/line.svg +40 -40
  15. package/lib/assets/IconsS4t/more.svg +19 -19
  16. package/lib/assets/IconsS4t/plus.svg +23 -23
  17. package/lib/assets/IconsS4t/printer.svg +49 -49
  18. package/lib/assets/IconsS4t/radio-on-button.svg +25 -25
  19. package/lib/assets/IconsS4t/rectangle.svg +41 -41
  20. package/lib/assets/IconsS4t/redo.svg +19 -19
  21. package/lib/assets/IconsS4t/right-arrow-signBook-finish.svg +40 -40
  22. package/lib/assets/IconsS4t/right-arrow-signBook.svg +40 -40
  23. package/lib/assets/IconsS4t/right.svg +22 -22
  24. package/lib/assets/IconsS4t/searchbar.svg +21 -21
  25. package/lib/assets/IconsS4t/text-box.svg +36 -36
  26. package/lib/assets/IconsS4t/tick.svg +8 -8
  27. package/lib/assets/IconsS4t/trash-white.svg +10 -10
  28. package/lib/assets/IconsS4t/undo.svg +19 -19
  29. package/lib/assets/IconsS4t/up.svg +32 -32
  30. package/lib/assets/IconsS4t/video-streaming.svg +2 -2
  31. package/lib/assets/IconsS4t/zoom-in.svg +58 -58
  32. package/lib/assets/IconsS4t/zoom-out.svg +56 -56
  33. package/lib/assets/six.svg +3 -3
  34. package/lib/assets/thumbnails/index.ts +38 -38
  35. package/lib/components/base/Styled.js +263 -263
  36. package/lib/components/base/TMAccordion.js +43 -43
  37. package/lib/components/base/TMAreaManager.js +23 -23
  38. package/lib/components/base/TMButton.js +130 -130
  39. package/lib/components/base/TMClosableList.js +46 -46
  40. package/lib/components/base/TMConfirm.js +20 -20
  41. package/lib/components/base/TMContextMenu.js +4 -4
  42. package/lib/components/base/TMContextMenuOLD.js +25 -25
  43. package/lib/components/base/TMCounterBar.js +32 -32
  44. package/lib/components/base/TMCounterContainer.js +30 -30
  45. package/lib/components/base/TMDropDownMenu.js +24 -24
  46. package/lib/components/base/TMFileManagerUtils.js +19 -19
  47. package/lib/components/base/TMFloatingToolbar.js +34 -34
  48. package/lib/components/base/TMLayout.js +44 -44
  49. package/lib/components/base/TMList.js +34 -34
  50. package/lib/components/base/TMModal.js +31 -31
  51. package/lib/components/base/TMPanel.js +57 -57
  52. package/lib/components/base/TMPopUp.js +131 -131
  53. package/lib/components/base/TMProgressBar.js +20 -20
  54. package/lib/components/base/TMResizableMenu.js +28 -28
  55. package/lib/components/base/TMRightSidebar.js +40 -40
  56. package/lib/components/base/TMTab.js +11 -11
  57. package/lib/components/base/TMToggleButton.js +36 -36
  58. package/lib/components/base/TMToolbarCard.js +35 -35
  59. package/lib/components/base/TMTreeView.js +12 -12
  60. package/lib/components/base/TMUserAvatar.js +7 -7
  61. package/lib/components/base/TMWaitPanel.js +22 -22
  62. package/lib/components/choosers/TMCultureIDPicker.js +35 -35
  63. package/lib/components/choosers/TMDataListItemPicker.js +54 -54
  64. package/lib/components/editors/TMCheckBox.js +24 -24
  65. package/lib/components/editors/TMDropDown.js +43 -43
  66. package/lib/components/editors/TMEditorStyled.js +71 -71
  67. package/lib/components/editors/TMHtmlContentDisplay.js +16 -16
  68. package/lib/components/editors/TMLocalizedTextBox.js +31 -31
  69. package/lib/components/editors/TMMetadataValues.js +12 -12
  70. package/lib/components/editors/TMRadioButton.js +39 -39
  71. package/lib/components/editors/TMSummary.js +39 -39
  72. package/lib/components/editors/TMTextArea.js +12 -12
  73. package/lib/components/editors/TMTextBox.js +19 -19
  74. package/lib/components/features/archive/TMArchive.js +1 -0
  75. package/lib/components/features/assistant/ToppyHelpCenter.js +114 -114
  76. package/lib/components/features/blog/TMBlogCommentForm.js +3 -3
  77. package/lib/components/features/documents/TMDcmtIcon.js +8 -8
  78. package/lib/components/features/documents/TMDcmtPreview.js +30 -30
  79. package/lib/components/features/documents/TMFileUploader.js +21 -21
  80. package/lib/components/features/search/TMSavedQuerySelector.js +51 -51
  81. package/lib/components/features/search/TMSearch.d.ts +2 -0
  82. package/lib/components/features/search/TMSearch.js +11 -6
  83. package/lib/components/features/search/TMSearchQueryEditor.js +13 -13
  84. package/lib/components/features/search/TMSearchQueryPanel.d.ts +1 -0
  85. package/lib/components/features/search/TMSearchQueryPanel.js +33 -32
  86. package/lib/components/features/search/TMSearchResult.d.ts +1 -0
  87. package/lib/components/features/search/TMSearchResult.js +7 -7
  88. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
  89. package/lib/components/features/search/TMSearchResultsMenuItems.js +12 -2
  90. package/lib/components/features/search/TMTreeSelector.js +66 -66
  91. package/lib/components/features/wg/TMWGsCopyMoveForm.js +9 -9
  92. package/lib/components/features/workflow/TMWorkflowPopup.js +41 -41
  93. package/lib/components/features/workflow/diagram/ConnectionComponent.js +29 -29
  94. package/lib/components/features/workflow/diagram/ConnectionForm.js +10 -10
  95. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +57 -57
  96. package/lib/components/features/workflow/diagram/DiagramItemForm.js +29 -29
  97. package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +12 -12
  98. package/lib/components/features/workflow/diagram/RecipientList.js +40 -40
  99. package/lib/components/features/workflow/diagram/WFDiagram.js +279 -279
  100. package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.js +4 -4
  101. package/lib/components/features/workflow/diagram/workflowHelpers.js +1 -1
  102. package/lib/components/forms/Login/Chooser.js +35 -35
  103. package/lib/components/forms/Login/Menu.js +22 -22
  104. package/lib/components/forms/Login/SelectBox.js +46 -46
  105. package/lib/components/forms/Login/TMLoginForm.js +4 -4
  106. package/lib/components/forms/Login/TextBox.js +57 -57
  107. package/lib/components/grids/TMBlogsUtils.js +25 -25
  108. package/lib/components/grids/TMRecentsManager.js +50 -50
  109. package/lib/components/grids/TMValidationItemsList.js +48 -48
  110. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +12 -12
  111. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +34 -34
  112. package/lib/components/query/TMQueryEditor.js +17 -17
  113. package/lib/components/query/TMQuerySummary.js +12 -12
  114. package/lib/components/sidebar/TMCommandsPanel.js +10 -10
  115. package/lib/components/sidebar/TMHeader.js +307 -307
  116. package/lib/components/sidebar/TMSidebar.js +24 -24
  117. package/lib/components/sidebar/TMSidebarItem.js +21 -21
  118. package/lib/helper/SDKUI_Localizator.d.ts +1 -0
  119. package/lib/helper/SDKUI_Localizator.js +10 -0
  120. package/lib/helper/TMUtils.js +19 -19
  121. package/lib/hooks/useForm.d.ts +1 -1
  122. package/lib/hooks/useForm.js +4 -4
  123. package/lib/services/platform_services.d.ts +1 -1
  124. package/lib/services/platform_services.js +2 -2
  125. package/lib/stories/TMHtmlContentDisplay.stories.js +16 -16
  126. package/lib/stories/TMHtmlEditor.stories.js +3 -3
  127. package/package.json +1 -1
@@ -5,46 +5,46 @@ import { getColor } from '../../helper';
5
5
  import styled from 'styled-components';
6
6
  import TMTooltip from './TMTooltip';
7
7
  // #region Style
8
- const StyledToggleButtonWrapper = styled.div `
9
- display: flex;
10
- flex-direction: row;
11
- justify-content: flex-start;
12
- align-items: center;
13
- width: 100%;
8
+ const StyledToggleButtonWrapper = styled.div `
9
+ display: flex;
10
+ flex-direction: row;
11
+ justify-content: flex-start;
12
+ align-items: center;
13
+ width: 100%;
14
14
  `;
15
- const StyledToggleButtonContainer = styled.div `
16
- width: 36px;
17
- height: 20px;
18
- background-color: ${props => !props.$value ? 'rgb(194, 194, 194)' : getColor(props.$color)};
19
- border-radius: 3px;
20
- transition: all 100ms ease;
21
- padding: 3px;
22
- cursor: pointer;
23
- position: relative;
15
+ const StyledToggleButtonContainer = styled.div `
16
+ width: 36px;
17
+ height: 20px;
18
+ background-color: ${props => !props.$value ? 'rgb(194, 194, 194)' : getColor(props.$color)};
19
+ border-radius: 3px;
20
+ transition: all 100ms ease;
21
+ padding: 3px;
22
+ cursor: pointer;
23
+ position: relative;
24
24
  `;
25
- const StyledToggleButtonSwitch = styled.div `
26
- width: 50%;
27
- height: 100%;
28
- border-radius: 2px;
29
- background-color: white;
30
- display: flex;
31
- align-items: center;
32
- justify-content: center;
33
- float: right;
34
- transition: all 100ms ease;
35
- z-index: 100;
36
- ${props => props.$value ? '' : 'float: left;'}
25
+ const StyledToggleButtonSwitch = styled.div `
26
+ width: 50%;
27
+ height: 100%;
28
+ border-radius: 2px;
29
+ background-color: white;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ float: right;
34
+ transition: all 100ms ease;
35
+ z-index: 100;
36
+ ${props => props.$value ? '' : 'float: left;'}
37
37
  `;
38
- const StyledToggleValue = styled.p `
39
- font-size: 0.5rem;
40
- color: black;
41
- font-weight: bold;
38
+ const StyledToggleValue = styled.p `
39
+ font-size: 0.5rem;
40
+ color: black;
41
+ font-weight: bold;
42
42
  `;
43
- const StyledToggleButtonLabel = styled.div `
44
- font-size: ${FontSize.defaultFontSize};
45
- margin-left: 5px;
46
- width: max-content;
47
- color: ${props => getColor(props.$color)};
43
+ const StyledToggleButtonLabel = styled.div `
44
+ font-size: ${FontSize.defaultFontSize};
45
+ margin-left: 5px;
46
+ width: max-content;
47
+ color: ${props => getColor(props.$color)};
48
48
  `;
49
49
  const TMToggleButton = ({ color = 'primary', value, label, elementStyle, fontSize = FontSize.defaultFontSize, isModifiedWhen, showTooltip = false, onValueChanged }) => {
50
50
  const [currentColor, setCurrentColor] = useState(color);
@@ -5,43 +5,43 @@ import { IconArrowLeft, SDKUI_Localizator } from '../../helper';
5
5
  import { TMColors } from '../../utils/theme';
6
6
  import { StyledBadge } from './Styled';
7
7
  import TMButton from './TMButton';
8
- const StyledSearchCard = styled.div `
9
- width: 100%;
10
- height: 100%;
11
- font-size: 1rem;
12
- border-radius: 12px;
13
- border: 1px solid ${() => TMColors.primaryColor}50 ;
8
+ const StyledSearchCard = styled.div `
9
+ width: 100%;
10
+ height: 100%;
11
+ font-size: 1rem;
12
+ border-radius: 12px;
13
+ border: 1px solid ${() => TMColors.primaryColor}50 ;
14
14
  `;
15
- const StyledSearchCardHeader = styled.div `
16
- width:100% ;
17
- display: flex;
18
- flex-direction: row;
19
- align-items: center;
20
- justify-content: flex-start;
21
- padding: 4px 10px;
22
- background-color: ${props => props.$backgroundColor ?? TMColors.backgroundColorHeader};
23
- color: ${props => props.$color ?? TMColors.colorHeader};
24
- border-top-right-radius: 10px;
25
- border-top-left-radius: 10px;
26
- overflow: hidden;
27
- position: sticky;
28
- top: 0;
29
- font-weight: 600;
30
- height: 35px;
15
+ const StyledSearchCardHeader = styled.div `
16
+ width:100% ;
17
+ display: flex;
18
+ flex-direction: row;
19
+ align-items: center;
20
+ justify-content: flex-start;
21
+ padding: 4px 10px;
22
+ background-color: ${props => props.$backgroundColor ?? TMColors.backgroundColorHeader};
23
+ color: ${props => props.$color ?? TMColors.colorHeader};
24
+ border-top-right-radius: 10px;
25
+ border-top-left-radius: 10px;
26
+ overflow: hidden;
27
+ position: sticky;
28
+ top: 0;
29
+ font-weight: 600;
30
+ height: 35px;
31
31
  `;
32
- const StyledSearchCardContent = styled.div `
33
- width: 100%;
34
- height: ${props => props.$height};
35
- overflow: hidden;
36
- background-color: ${props => props.$backgroundColor};
37
- border-bottom-right-radius: 10px;
38
- border-bottom-left-radius: 10px;
39
- padding: ${props => props.$padding};
40
- display: flex;
41
- justify-content: space-between;
42
-
43
- position: relative;
44
- user-select: none;
32
+ const StyledSearchCardContent = styled.div `
33
+ width: 100%;
34
+ height: ${props => props.$height};
35
+ overflow: hidden;
36
+ background-color: ${props => props.$backgroundColor};
37
+ border-bottom-right-radius: 10px;
38
+ border-bottom-left-radius: 10px;
39
+ padding: ${props => props.$padding};
40
+ display: flex;
41
+ justify-content: space-between;
42
+
43
+ position: relative;
44
+ user-select: none;
45
45
  `;
46
46
  const TMToolbarCard = ({ items = [], onItemClick, selectedItem, showPanel, color = TMColors.colorHeader, backgroundColor = TMColors.backgroundColorHeader, backgroundColorContainer, children, showHeader = true, title, totalItems, displayedItemsCount, toolbar, padding = '3px', onBack, onClose, onHeaderDoubleClick }) => {
47
47
  return (_jsxs(StyledSearchCard, { children: [showHeader && _jsx(StyledSearchCardHeader, { "$backgroundColor": backgroundColor, "$color": color, onDoubleClick: () => { if (onHeaderDoubleClick)
@@ -227,16 +227,16 @@ const TMTreeView = ({ dataSource = [], focusedItem, selectedItems = [], allowMul
227
227
  return (_jsx("div", { style: { height: '100%', width: '100%', overflowY: 'auto', padding: '2px 5px 2px 2px' }, children: renderTree(dataSource) }));
228
228
  };
229
229
  export default TMTreeView;
230
- export const StyledTreeNode = styled.div `
231
- display: flex;
232
- flex-direction: row;
233
- width: 100%;
234
- height: 25px;
235
- gap: 5px;
236
- align-items: center;
237
- background: ${(props) => props.$isSelected ? 'oklch(from var(--dx-color-primary) l c h / .2) !important' : 'transparent'};
238
-
239
- /* &:hover {
240
- background: ${() => `${TMColors.primaryColor}33`};
241
- } */
230
+ export const StyledTreeNode = styled.div `
231
+ display: flex;
232
+ flex-direction: row;
233
+ width: 100%;
234
+ height: 25px;
235
+ gap: 5px;
236
+ align-items: center;
237
+ background: ${(props) => props.$isSelected ? 'oklch(from var(--dx-color-primary) l c h / .2) !important' : 'transparent'};
238
+
239
+ /* &:hover {
240
+ background: ${() => `${TMColors.primaryColor}33`};
241
+ } */
242
242
  `;
@@ -6,13 +6,13 @@ const TMUserAvatar = (props) => {
6
6
  const initials = extractInitialsFromName(displayName ?? '-');
7
7
  const bgColor = getAvatarColor(nameForColorCalculation ?? '-');
8
8
  if (returnType === 'svg') {
9
- return `
10
- <svg width="30" height="30" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
11
- <circle cx="20" cy="20" r="20" fill="${bgColor}" />
12
- <text x="50%" y="50%" text-anchor="middle" dominant-baseline="middle" fill="#fff" font-size="14" font-weight="bold" font-family="sans-serif">
13
- ${initials}
14
- </text>
15
- </svg>
9
+ return `
10
+ <svg width="30" height="30" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
11
+ <circle cx="20" cy="20" r="20" fill="${bgColor}" />
12
+ <text x="50%" y="50%" text-anchor="middle" dominant-baseline="middle" fill="#fff" font-size="14" font-weight="bold" font-family="sans-serif">
13
+ ${initials}
14
+ </text>
15
+ </svg>
16
16
  `.trim();
17
17
  }
18
18
  return (_jsx(TMTooltip, { content: tooltipName ?? displayName, children: _jsx("div", { style: {
@@ -2,29 +2,29 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from 'styled-components';
3
3
  import TMLayoutContainer from './TMLayout';
4
4
  import { SDKUI_Localizator } from '../../helper';
5
- const StyledWaitPanelOverlay = styled.div `
6
- width: 100%;
7
- height: 100%;
8
- position: fixed;
9
- top: 0;
10
- left: 0;
11
- z-index: 1501;
12
- transition: all;
13
- overflow: visible;
14
- background-color: rgba(0, 0, 0, 0.4);
5
+ const StyledWaitPanelOverlay = styled.div `
6
+ width: 100%;
7
+ height: 100%;
8
+ position: fixed;
9
+ top: 0;
10
+ left: 0;
11
+ z-index: 1501;
12
+ transition: all;
13
+ overflow: visible;
14
+ background-color: rgba(0, 0, 0, 0.4);
15
15
  `;
16
- const StyledWaitPanel = styled.div `
17
- position: absolute;
18
- top: 50%;
19
- left: 50%;
20
- transform: translate(-50%, -50%);
21
- width: 300px;
22
- height: ${(props) => props.$height};
23
- background: white;
24
- border-radius: 8px;
25
- padding: 10px;
26
- text-align: center;
27
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
16
+ const StyledWaitPanel = styled.div `
17
+ position: absolute;
18
+ top: 50%;
19
+ left: 50%;
20
+ transform: translate(-50%, -50%);
21
+ width: 300px;
22
+ height: ${(props) => props.$height};
23
+ background: white;
24
+ border-radius: 8px;
25
+ padding: 10px;
26
+ text-align: center;
27
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
28
28
  `;
29
29
  const StyledTitle = styled.h2 ` margin: 0; font-size: 1.5em; color: #333; `;
30
30
  const StyledProgressBarContainer = styled.div ` width: 100%; height: 20px; background: #e0e0e0; border-radius: 10px; overflow: hidden; margin: 20px 0; `;
@@ -15,44 +15,44 @@ const CULTUREIDs_DATASOURCE = [
15
15
  { value: CultureIDs.Es_ES, display: "Español", icon: _jsx("img", { src: getCultureIDImg(CultureIDs.Es_ES), alt: "Lang", width: 16, height: 16 }) },
16
16
  { value: CultureIDs.De_DE, display: "Deutsch", icon: _jsx("img", { src: getCultureIDImg(CultureIDs.De_DE), alt: "Lang", width: 16, height: 16 }) },
17
17
  ];
18
- const PickerContainer = styled.div `
19
- display: flex;
20
- flex-direction: column;
21
- gap: 10px;
22
- padding: 20px;
18
+ const PickerContainer = styled.div `
19
+ display: flex;
20
+ flex-direction: column;
21
+ gap: 10px;
22
+ padding: 20px;
23
23
  `;
24
- const ItemsContainer = styled.div `
25
- display: flex;
26
- flex-wrap: wrap;
27
- gap: 15px;
28
- justify-content: center;
24
+ const ItemsContainer = styled.div `
25
+ display: flex;
26
+ flex-wrap: wrap;
27
+ gap: 15px;
28
+ justify-content: center;
29
29
  `;
30
- const CultureItem = styled.div `
31
- display: flex;
32
- flex-direction: column;
33
- align-items: center;
34
- justify-content: center;
35
- cursor: pointer;
36
- text-align: center;
37
- font-size: 0.9em;
38
- padding: 10px 15px;
39
- border-radius: 8px;
40
- border: 2px solid transparent;
41
- transition: all 0.2s ease-in-out;
42
- width: 120px;
43
-
44
- &:hover {
45
- background-color: #f0f0f0;
46
- }
47
-
48
- ${props => props.$isSelected && `
49
- border-color: #007bff;
50
- background-color: #e6f2ff;
51
- `}
30
+ const CultureItem = styled.div `
31
+ display: flex;
32
+ flex-direction: column;
33
+ align-items: center;
34
+ justify-content: center;
35
+ cursor: pointer;
36
+ text-align: center;
37
+ font-size: 0.9em;
38
+ padding: 10px 15px;
39
+ border-radius: 8px;
40
+ border: 2px solid transparent;
41
+ transition: all 0.2s ease-in-out;
42
+ width: 120px;
43
+
44
+ &:hover {
45
+ background-color: #f0f0f0;
46
+ }
47
+
48
+ ${props => props.$isSelected && `
49
+ border-color: #007bff;
50
+ background-color: #e6f2ff;
51
+ `}
52
52
  `;
53
- const FlagIcon = styled.div `
54
- margin-bottom: 5px;
55
- font-size: 2em;
53
+ const FlagIcon = styled.div `
54
+ margin-bottom: 5px;
55
+ font-size: 2em;
56
56
  `;
57
57
  const TMCultureIDPicker = ({ selectedValue, onSelectCultureID, placeHolder, width = '100%', icon, backgroundColor, readOnly = false, openChooserBySingleClick = false, buttons = [], elementStyle, isModifiedWhen, label, showClearButton = false, validationItems = [], onValueChanged }) => {
58
58
  const [showPicker, setShowPicker] = useState(false);
@@ -3,64 +3,64 @@ import { useEffect, useState } from 'react';
3
3
  import styled, { keyframes } from 'styled-components';
4
4
  import { DataListCacheService, SDK_Localizator } from '@topconsultnpm/sdk-ts-beta';
5
5
  import { SDKUI_Localizator, TMImageLibrary } from '../../helper';
6
- const PickerContainer = styled.div `
7
- display: flex;
8
- flex-direction: column;
9
- gap: 10px;
10
- padding: 5px;
11
- border: 1px solid #ccc;
12
- border-radius: 4px;
6
+ const PickerContainer = styled.div `
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: 10px;
10
+ padding: 5px;
11
+ border: 1px solid #ccc;
12
+ border-radius: 4px;
13
13
  `;
14
- const ItemsContainer = styled.div `
15
- display: flex;
16
- flex-direction: row;
17
- flex-wrap: nowrap;
18
- gap: 3px;
19
- align-items: center;
20
- overflow-x: auto;
21
- padding: 10px;
14
+ const ItemsContainer = styled.div `
15
+ display: flex;
16
+ flex-direction: row;
17
+ flex-wrap: nowrap;
18
+ gap: 3px;
19
+ align-items: center;
20
+ overflow-x: auto;
21
+ padding: 10px;
22
22
  `;
23
- const slideIn = keyframes `
24
- from {
25
- opacity: 0;
26
- transform: translateX(-50px);
27
- }
28
- to {
29
- opacity: 1;
30
- transform: translateX(0);
31
- }
23
+ const slideIn = keyframes `
24
+ from {
25
+ opacity: 0;
26
+ transform: translateX(-50px);
27
+ }
28
+ to {
29
+ opacity: 1;
30
+ transform: translateX(0);
31
+ }
32
32
  `;
33
- const StatusItem = styled.div `
34
- display: flex;
35
- flex-direction: column;
36
- align-items: center;
37
- justify-content: center;
38
- cursor: pointer;
39
- text-align: center;
40
- font-size: 0.8em;
41
- padding: 5px 10px;
42
- border-radius: 8px;
43
- border: 2px solid transparent;
44
- transition: all 0.2s ease-in-out;
45
- flex-shrink: 0;
46
-
47
- // Aggiungi l'animazione con un ritardo basato sull'indice
48
- animation: ${slideIn} 0.5s ease-out forwards;
49
- animation-delay: ${props => props.$index * 0.1}s;
50
- opacity: 0; // Inizialmente l'elemento è invisibile
51
-
52
- &:hover {
53
- background-color: #f0f0f0;
54
- }
55
-
56
- ${props => props.$isSelected && `
57
- border-color: #007bff;
58
- background-color: #e6f2ff;
59
- `}
33
+ const StatusItem = styled.div `
34
+ display: flex;
35
+ flex-direction: column;
36
+ align-items: center;
37
+ justify-content: center;
38
+ cursor: pointer;
39
+ text-align: center;
40
+ font-size: 0.8em;
41
+ padding: 5px 10px;
42
+ border-radius: 8px;
43
+ border: 2px solid transparent;
44
+ transition: all 0.2s ease-in-out;
45
+ flex-shrink: 0;
46
+
47
+ // Aggiungi l'animazione con un ritardo basato sull'indice
48
+ animation: ${slideIn} 0.5s ease-out forwards;
49
+ animation-delay: ${props => props.$index * 0.1}s;
50
+ opacity: 0; // Inizialmente l'elemento è invisibile
51
+
52
+ &:hover {
53
+ background-color: #f0f0f0;
54
+ }
55
+
56
+ ${props => props.$isSelected && `
57
+ border-color: #007bff;
58
+ background-color: #e6f2ff;
59
+ `}
60
60
  `;
61
- const Label = styled.div `
62
- font-weight: bold;
63
- margin-bottom: 5px;
61
+ const Label = styled.div `
62
+ font-weight: bold;
63
+ margin-bottom: 5px;
64
64
  `;
65
65
  const TMDataListItemPicker = ({ dataListID, selectedValue, onItemSelect }) => {
66
66
  const [dataList, setDataList] = useState(undefined);
@@ -2,32 +2,32 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
3
  import { FontSize, TMColors } from '../../utils/theme';
4
4
  import styled from 'styled-components';
5
- const StyledCheckBoxContainer = styled.div `
6
- display: flex;
7
- flex-direction: ${props => props.$labelPosition === 'right' ? 'row-reverse' : 'row'} ;
8
- justify-content: flex-start;
9
- align-items: center;
10
- width: fit-content;
11
- cursor: ${props => !props.$disabled && 'pointer'};
5
+ const StyledCheckBoxContainer = styled.div `
6
+ display: flex;
7
+ flex-direction: ${props => props.$labelPosition === 'right' ? 'row-reverse' : 'row'} ;
8
+ justify-content: flex-start;
9
+ align-items: center;
10
+ width: fit-content;
11
+ cursor: ${props => !props.$disabled && 'pointer'};
12
12
  `;
13
- const StyledCheckBoxLabel = styled.div `
14
- margin-right: ${props => props.$labelPosition === 'left' ? '5px' : '0'};
15
- margin-left: ${props => props.$labelPosition === 'right' ? '5px' : '0'};
16
- color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : props.$labelColor ? props.$labelColor : TMColors.text_normal : TMColors.disabled};
17
- font-size: ${props => props.$fontSize};
18
- user-select: none;
19
- &:focus{
20
- outline: none;
21
- background-image: linear-gradient(white, #E4E9F7);
22
- border-bottom: 2px solid;
23
- border-bottom-color: ${props => !props.$isModifiedWhen ? TMColors.primary : TMColors.isModified};
24
- }
13
+ const StyledCheckBoxLabel = styled.div `
14
+ margin-right: ${props => props.$labelPosition === 'left' ? '5px' : '0'};
15
+ margin-left: ${props => props.$labelPosition === 'right' ? '5px' : '0'};
16
+ color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : props.$labelColor ? props.$labelColor : TMColors.text_normal : TMColors.disabled};
17
+ font-size: ${props => props.$fontSize};
18
+ user-select: none;
19
+ &:focus{
20
+ outline: none;
21
+ background-image: linear-gradient(white, #E4E9F7);
22
+ border-bottom: 2px solid;
23
+ border-bottom-color: ${props => !props.$isModifiedWhen ? TMColors.primary : TMColors.isModified};
24
+ }
25
25
  `;
26
- const StyledCheckbox = styled.input `
27
- accent-color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.primary : TMColors.disabled};
28
- width: 14px;
29
- height: 14px;
30
- cursor: ${props => !props.$disabled && 'pointer'};
26
+ const StyledCheckbox = styled.input `
27
+ accent-color: ${props => !props.$disabled ? props.$isModifiedWhen ? TMColors.isModified : TMColors.primary : TMColors.disabled};
28
+ width: 14px;
29
+ height: 14px;
30
+ cursor: ${props => !props.$disabled && 'pointer'};
31
31
  `;
32
32
  const TMCheckBox = ({ labelColor, isModifiedWhen, elementStyle, disabled = false, label, value, labelPosition = 'right', fontSize = FontSize.defaultFontSize, onValueChanged }) => {
33
33
  const [initialValue, setInitialValue] = useState(value);
@@ -6,53 +6,53 @@ import { StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, TMEditorsDe
6
6
  import TMLayoutContainer, { TMLayoutItem } from "../base/TMLayout";
7
7
  import TMVilViewer from "../base/TMVilViewer";
8
8
  import TMTooltip from "../base/TMTooltip";
9
- const StyledDropDownWrapper = styled.div `
10
- position: relative;
11
- width: ${props => props.$width};
12
- display: flex;
13
- align-items: center;
9
+ const StyledDropDownWrapper = styled.div `
10
+ position: relative;
11
+ width: ${props => props.$width};
12
+ display: flex;
13
+ align-items: center;
14
14
  `;
15
- const StyledDropDown = styled.select `
16
- width: 100%;
17
- padding: 5px 35px 3px 9px; /* padding-right leaves space for buttons + custom arrow */
18
- border: 1px solid;
19
- border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
20
- border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid;
21
- border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
22
- color: ${props => !props.$disabled ? (props.$vil.length === 0 ? (!props.$isModified ? TMColors.text_normal : TMColors.isModified) : editorColorManager(props.$vil)) : TMColors.disabled};
23
- border-radius: ${props => props.$borderRadius ?? TMEditorsDefaultBorderRadius};
24
- font-size: ${props => props.$fontSize};
25
- appearance: none; /* remove native arrow */
26
- background-color: white;
27
-
28
- &:focus {
29
- outline: none;
30
- background-image: linear-gradient(white, #E4E9F7);
31
- border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
32
- border-bottom: 2px solid;
33
- border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
34
- }
15
+ const StyledDropDown = styled.select `
16
+ width: 100%;
17
+ padding: 5px 35px 3px 9px; /* padding-right leaves space for buttons + custom arrow */
18
+ border: 1px solid;
19
+ border-color: ${props => props.$isModified ? TMColors.isModified : TMColors.border_normal};
20
+ border-bottom: ${props => (props.$vil.length > 0) ? '3px' : '1px'} solid;
21
+ border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.border_normal : TMColors.isModified : editorColorManager(props.$vil)};
22
+ color: ${props => !props.$disabled ? (props.$vil.length === 0 ? (!props.$isModified ? TMColors.text_normal : TMColors.isModified) : editorColorManager(props.$vil)) : TMColors.disabled};
23
+ border-radius: ${props => props.$borderRadius ?? TMEditorsDefaultBorderRadius};
24
+ font-size: ${props => props.$fontSize};
25
+ appearance: none; /* remove native arrow */
26
+ background-color: white;
27
+
28
+ &:focus {
29
+ outline: none;
30
+ background-image: linear-gradient(white, #E4E9F7);
31
+ border: ${props => props.$isModified ? `1px solid ${TMColors.isModified}` : '1px solid rgb(180,180,180)'};
32
+ border-bottom: 2px solid;
33
+ border-bottom-color: ${props => (props.$vil.length === 0) ? !props.$isModified ? TMColors.primary : TMColors.isModified : editorColorManager(props.$vil)};
34
+ }
35
35
  `;
36
- const ButtonsContainer = styled.div `
37
- position: absolute;
38
- right: 20px; /* adjust depending on arrow size */
39
- display: flex;
40
- align-items: center;
41
- gap: 5px; /* spacing between buttons */
36
+ const ButtonsContainer = styled.div `
37
+ position: absolute;
38
+ right: 20px; /* adjust depending on arrow size */
39
+ display: flex;
40
+ align-items: center;
41
+ gap: 5px; /* spacing between buttons */
42
42
  `;
43
- const CustomArrow = styled.div `
44
- position: absolute;
45
- right: 5px;
46
- pointer-events: none;
47
- border-left: 5px solid transparent;
48
- border-right: 5px solid transparent;
49
- border-top: 5px solid ${TMColors.text_normal};
43
+ const CustomArrow = styled.div `
44
+ position: absolute;
45
+ right: 5px;
46
+ pointer-events: none;
47
+ border-left: 5px solid transparent;
48
+ border-right: 5px solid transparent;
49
+ border-top: 5px solid ${TMColors.text_normal};
50
50
  `;
51
- const StyledDropDownEditorButton = styled.div `
52
- color: ${TMColors.button_icon};
53
- display: flex;
54
- align-items: center;
55
- cursor: pointer;
51
+ const StyledDropDownEditorButton = styled.div `
52
+ color: ${TMColors.button_icon};
53
+ display: flex;
54
+ align-items: center;
55
+ cursor: pointer;
56
56
  `;
57
57
  const TMDropDown = ({ validationItems = [], disabled = false, elementStyle, isModifiedWhen, labelPosition = 'left', label, icon, width = '100%', fontSize = FontSize.defaultFontSize, dataSource, value, onValueChanged, buttons = [], }) => {
58
58
  const [isFocused, setIsFocused] = useState(false);