@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.
Files changed (208) 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/icomoon.svg +96 -96
  34. package/lib/assets/italy.svg +16 -16
  35. package/lib/assets/six.svg +3 -3
  36. package/lib/assets/thumbnails/index.ts +39 -39
  37. package/lib/assets/topmedia-six.svg +65 -65
  38. package/lib/assets/topmeida-six-bianco.svg +65 -65
  39. package/lib/components/base/Styled.js +302 -302
  40. package/lib/components/base/TMAccordion.js +43 -43
  41. package/lib/components/base/TMAccordionNew.d.ts +28 -0
  42. package/lib/components/base/TMAccordionNew.js +326 -0
  43. package/lib/components/base/TMAreaManager.js +23 -23
  44. package/lib/components/base/TMButton.d.ts +1 -0
  45. package/lib/components/base/TMButton.js +136 -136
  46. package/lib/components/base/TMClosableList.js +46 -46
  47. package/lib/components/base/TMConfirm.js +20 -20
  48. package/lib/components/base/TMContextMenu.js +4 -4
  49. package/lib/components/base/TMContextMenuOLD.js +25 -25
  50. package/lib/components/base/TMCounterBar.js +32 -32
  51. package/lib/components/base/TMCounterContainer.js +30 -30
  52. package/lib/components/base/TMCustomButton.d.ts +1 -1
  53. package/lib/components/base/TMCustomButton.js +90 -35
  54. package/lib/components/base/TMDataGridExportForm.d.ts +1 -1
  55. package/lib/components/base/TMDataGridExportForm.js +9 -3
  56. package/lib/components/base/TMDropDownMenu.js +24 -24
  57. package/lib/components/base/TMFileManager.js +12 -3
  58. package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -0
  59. package/lib/components/base/TMFileManagerDataGridView.js +12 -3
  60. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +2 -0
  61. package/lib/components/base/TMFileManagerThumbnailItems.js +12 -2
  62. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +2 -0
  63. package/lib/components/base/TMFileManagerThumbnailsView.js +2 -2
  64. package/lib/components/base/TMFileManagerUtils.js +19 -19
  65. package/lib/components/base/TMFloatingToolbar.js +34 -34
  66. package/lib/components/base/TMLayout.js +44 -44
  67. package/lib/components/base/TMList.js +34 -34
  68. package/lib/components/base/TMModal.d.ts +2 -0
  69. package/lib/components/base/TMModal.js +79 -34
  70. package/lib/components/base/TMPanel.js +57 -57
  71. package/lib/components/base/TMPopUp.js +186 -117
  72. package/lib/components/base/TMProgressBar.js +20 -20
  73. package/lib/components/base/TMResizableMenu.js +28 -28
  74. package/lib/components/base/TMRightSidebar.js +40 -40
  75. package/lib/components/base/TMSpinner.js +121 -121
  76. package/lib/components/base/TMTab.js +11 -11
  77. package/lib/components/base/TMToggleButton.js +36 -36
  78. package/lib/components/base/TMToolbarCard.js +35 -35
  79. package/lib/components/base/TMTooltip.d.ts +1 -1
  80. package/lib/components/base/TMTooltip.js +1 -1
  81. package/lib/components/base/TMTreeView.js +16 -16
  82. package/lib/components/base/TMUserAvatar.js +7 -7
  83. package/lib/components/base/TMWaitPanel.js +30 -24
  84. package/lib/components/choosers/TMCultureIDPicker.js +35 -35
  85. package/lib/components/choosers/TMDataListItemChooser.js +1 -1
  86. package/lib/components/choosers/TMDataListItemPicker.js +54 -54
  87. package/lib/components/choosers/TMDcmtTypeChooser.js +2 -2
  88. package/lib/components/choosers/TMMetadataChooser.d.ts +4 -1
  89. package/lib/components/choosers/TMMetadataChooser.js +31 -8
  90. package/lib/components/choosers/TMUserChooser.d.ts +4 -0
  91. package/lib/components/choosers/TMUserChooser.js +21 -5
  92. package/lib/components/editors/TMCheckBox.js +24 -24
  93. package/lib/components/editors/TMDateBox.d.ts +1 -1
  94. package/lib/components/editors/TMDropDown.js +43 -43
  95. package/lib/components/editors/TMEditorStyled.js +71 -71
  96. package/lib/components/editors/TMHtmlContentDisplay.js +16 -16
  97. package/lib/components/editors/TMLocalizedTextBox.js +31 -31
  98. package/lib/components/editors/TMMetadataValues.js +62 -21
  99. package/lib/components/editors/TMRadioButton.js +39 -39
  100. package/lib/components/editors/TMSummary.js +39 -39
  101. package/lib/components/editors/TMTextArea.d.ts +1 -0
  102. package/lib/components/editors/TMTextArea.js +56 -22
  103. package/lib/components/editors/TMTextBox.js +53 -23
  104. package/lib/components/editors/TMTextExpression.js +36 -28
  105. package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +30 -0
  106. package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +471 -0
  107. package/lib/components/features/assistant/ToppySpeechBubble.d.ts +9 -0
  108. package/lib/components/features/assistant/ToppySpeechBubble.js +117 -0
  109. package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -0
  110. package/lib/components/features/blog/TMBlogCommentForm.js +21 -9
  111. package/lib/components/features/documents/TMDcmtBlog.js +1 -1
  112. package/lib/components/features/documents/TMDcmtForm.js +321 -62
  113. package/lib/components/features/documents/TMDcmtIcon.js +17 -12
  114. package/lib/components/features/documents/TMDcmtPreview.js +75 -38
  115. package/lib/components/features/documents/TMFileUploader.js +21 -21
  116. package/lib/components/features/documents/TMRelationViewer.js +56 -23
  117. package/lib/components/features/search/TMSavedQuerySelector.js +52 -52
  118. package/lib/components/features/search/TMSearch.js +2 -2
  119. package/lib/components/features/search/TMSearchQueryEditor.js +14 -14
  120. package/lib/components/features/search/TMSearchQueryPanel.js +40 -58
  121. package/lib/components/features/search/TMSearchResult.js +160 -35
  122. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +2 -1
  123. package/lib/components/features/search/TMSearchResultsMenuItems.js +117 -60
  124. package/lib/components/features/search/TMSignSettingsForm.d.ts +9 -0
  125. package/lib/components/features/search/TMSignSettingsForm.js +621 -0
  126. package/lib/components/features/search/TMTreeSelector.js +66 -66
  127. package/lib/components/features/tasks/TMTaskForm.js +42 -36
  128. package/lib/components/features/tasks/TMTasksAgenda.js +4 -4
  129. package/lib/components/features/tasks/TMTasksCalendar.js +2 -2
  130. package/lib/components/features/tasks/TMTasksHeader.js +1 -1
  131. package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -1
  132. package/lib/components/features/tasks/TMTasksUtils.js +18 -3
  133. package/lib/components/features/tasks/TMTasksUtilsView.js +26 -4
  134. package/lib/components/features/tasks/TMTasksView.js +12 -6
  135. package/lib/components/features/wg/TMWGsCopyMoveForm.js +9 -9
  136. package/lib/components/features/workflow/TMWorkflowPopup.js +44 -44
  137. package/lib/components/features/workflow/diagram/ConnectionComponent.js +29 -29
  138. package/lib/components/features/workflow/diagram/ConnectionForm.js +10 -10
  139. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +57 -57
  140. package/lib/components/features/workflow/diagram/DiagramItemForm.js +40 -35
  141. package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +12 -12
  142. package/lib/components/features/workflow/diagram/RecipientList.js +39 -39
  143. package/lib/components/features/workflow/diagram/WFDiagram.js +317 -285
  144. package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.js +4 -4
  145. package/lib/components/forms/Login/Chooser.js +35 -35
  146. package/lib/components/forms/Login/Menu.js +22 -22
  147. package/lib/components/forms/Login/SelectBox.js +46 -46
  148. package/lib/components/forms/Login/TMLoginForm.js +14 -14
  149. package/lib/components/forms/Login/TextBox.js +57 -57
  150. package/lib/components/forms/TMResultDialog.js +8 -2
  151. package/lib/components/forms/TMSaveForm.js +3 -11
  152. package/lib/components/grids/TMBlogAttachments.d.ts +0 -14
  153. package/lib/components/grids/TMBlogAttachments.js +10 -5
  154. package/lib/components/grids/TMBlogsPost.d.ts +8 -3
  155. package/lib/components/grids/TMBlogsPost.js +100 -39
  156. package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
  157. package/lib/components/grids/TMBlogsPostUtils.js +32 -11
  158. package/lib/components/grids/TMRecentsManager.js +51 -51
  159. package/lib/components/grids/TMValidationItemsList.js +48 -48
  160. package/lib/components/index.d.ts +2 -1
  161. package/lib/components/index.js +2 -1
  162. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
  163. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +14 -14
  164. package/lib/components/layout/panelManager/TMPanelManagerContext.js +0 -1
  165. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +36 -35
  166. package/lib/components/layout/panelManager/types.d.ts +1 -0
  167. package/lib/components/pages/TMPage.js +1 -1
  168. package/lib/components/query/TMQueryEditor.js +17 -17
  169. package/lib/components/query/TMQuerySummary.d.ts +1 -0
  170. package/lib/components/query/TMQuerySummary.js +15 -15
  171. package/lib/components/settings/SettingsAppearance.js +9 -1
  172. package/lib/components/sidebar/TMCommandsPanel.js +10 -10
  173. package/lib/components/sidebar/TMHeader.js +307 -307
  174. package/lib/components/sidebar/TMSidebar.js +24 -24
  175. package/lib/components/sidebar/TMSidebarItem.js +21 -21
  176. package/lib/components/viewers/TMDataListItemViewer.d.ts +1 -1
  177. package/lib/components/viewers/TMMidViewer.d.ts +1 -1
  178. package/lib/components/viewers/TMTidViewer.d.ts +1 -1
  179. package/lib/components/wizard/TMStepIndicator.js +102 -102
  180. package/lib/components/wizard/TMWizard.js +29 -29
  181. package/lib/helper/GlobalStyles.d.ts +2 -0
  182. package/lib/helper/GlobalStyles.js +10 -0
  183. package/lib/helper/Globalization.d.ts +1 -0
  184. package/lib/helper/Globalization.js +30 -0
  185. package/lib/helper/SDKUI_Globals.d.ts +2 -0
  186. package/lib/helper/SDKUI_Globals.js +9 -1
  187. package/lib/helper/SDKUI_Localizator.d.ts +50 -2
  188. package/lib/helper/SDKUI_Localizator.js +502 -22
  189. package/lib/helper/TMCustomSearchBar.js +1 -1
  190. package/lib/helper/TMIcons.d.ts +4 -1
  191. package/lib/helper/TMIcons.js +14 -2
  192. package/lib/helper/TMToppyMessage.d.ts +1 -0
  193. package/lib/helper/TMToppyMessage.js +33 -32
  194. package/lib/helper/TMUtils.d.ts +42 -4
  195. package/lib/helper/TMUtils.js +227 -60
  196. package/lib/helper/dcmtsHelper.d.ts +2 -1
  197. package/lib/helper/dcmtsHelper.js +56 -17
  198. package/lib/helper/helpers.d.ts +1 -1
  199. package/lib/helper/helpers.js +12 -17
  200. package/lib/helper/index.d.ts +1 -0
  201. package/lib/helper/index.js +1 -0
  202. package/lib/hooks/useDcmtOperations.d.ts +1 -1
  203. package/lib/hooks/useDcmtOperations.js +10 -6
  204. package/lib/hooks/useRelatedDocuments.js +35 -26
  205. package/lib/ts/types.d.ts +3 -1
  206. package/package.json +54 -54
  207. package/lib/components/features/assistant/ToppyHelpCenter.d.ts +0 -12
  208. package/lib/components/features/assistant/ToppyHelpCenter.js +0 -173
@@ -2,42 +2,42 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { IconDraggabledots } from '../../helper/TMIcons';
5
- const StyledFloatingToolbarContainer = styled.div `
6
- position: absolute;
7
- width: max-content;
8
- height: max-content;
9
- display: flex;
10
- flex-direction: row;
11
- background-color: ${props => `${props.$backgroundColor}a6`};
12
- left: calc(50% - 90px);
13
- top: calc(100% - 40px);
14
- border-radius: 8px;
15
- z-index: 10;
16
- &:hover {
17
- background: ${props => props.$backgroundColor};
18
- }
5
+ const StyledFloatingToolbarContainer = styled.div `
6
+ position: absolute;
7
+ width: max-content;
8
+ height: max-content;
9
+ display: flex;
10
+ flex-direction: row;
11
+ background-color: ${props => `${props.$backgroundColor}a6`};
12
+ left: calc(50% - 90px);
13
+ top: calc(100% - 40px);
14
+ border-radius: 8px;
15
+ z-index: 10;
16
+ &:hover {
17
+ background: ${props => props.$backgroundColor};
18
+ }
19
19
  `;
20
- const StyledFloatingToolbarDraggable = styled.div `
21
- display: flex;
22
- align-items: center;
23
- justify-content: center;
24
- width: 25px;
25
- height: 100%;
26
- background-color: ${props => `${props.$backgroundColor}FF`};
27
- border-top-left-radius: 8px;
28
- border-bottom-left-radius: 8px;
29
- padding: 10px 0px 10px 0px;
30
- &:hover {
31
- cursor: grab;
32
- }
20
+ const StyledFloatingToolbarDraggable = styled.div `
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: center;
24
+ width: 25px;
25
+ height: 100%;
26
+ background-color: ${props => `${props.$backgroundColor}FF`};
27
+ border-top-left-radius: 8px;
28
+ border-bottom-left-radius: 8px;
29
+ padding: 10px 0px 10px 0px;
30
+ &:hover {
31
+ cursor: grab;
32
+ }
33
33
  `;
34
- const StyledFloatingToolbar = styled.div `
35
- width: max-content;
36
- display: flex;
37
- flex-direction: row;
38
- padding: 10px 10px 10px 20px;
39
- gap: 8px;
40
- border-radius: 8px;
34
+ const StyledFloatingToolbar = styled.div `
35
+ width: max-content;
36
+ display: flex;
37
+ flex-direction: row;
38
+ padding: 10px 10px 10px 20px;
39
+ gap: 8px;
40
+ border-radius: 8px;
41
41
  `;
42
42
  const TMFloatingToolbar = ({ children, backgroundColor, initialLeft, initialTop }) => {
43
43
  const boxRef = useRef(null);
@@ -2,53 +2,53 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useEffect, useRef, useState } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { FontSize, TMColors } from '../../utils/theme';
5
- const StyledLayoutContainer = styled.div `
6
- width: 100%;
7
- position: relative;
8
- height: 100%;
9
- /* min-height: max-content; */
10
- /* min-width: max-content; */
11
- display: flex;
12
- flex-direction: ${props => props.$direction === 'horizontal' ? 'row' : 'column'};
13
- justify-content: ${props => props.$justifyContent};
14
- align-items: ${props => props.$alignItems};
15
- /* overflow: ${props => props.$direction === 'horizontal' ? 'auto' : 'hidden'}; */
16
- /* gap: 3px; */
5
+ const StyledLayoutContainer = styled.div `
6
+ width: 100%;
7
+ position: relative;
8
+ height: 100%;
9
+ /* min-height: max-content; */
10
+ /* min-width: max-content; */
11
+ display: flex;
12
+ flex-direction: ${props => props.$direction === 'horizontal' ? 'row' : 'column'};
13
+ justify-content: ${props => props.$justifyContent};
14
+ align-items: ${props => props.$alignItems};
15
+ /* overflow: ${props => props.$direction === 'horizontal' ? 'auto' : 'hidden'}; */
16
+ /* gap: 3px; */
17
17
  `;
18
- const StyledLayoutItem = styled.div `
19
- width: ${props => props.$width};
20
- min-width: ${props => props.$minWidth};
21
- max-width: ${props => props.$maxWidth};
22
- max-height: ${props => props.$maxHeight};
23
- min-height: ${props => props.$minHeight};
24
- height: ${props => props.$height};
25
- position: relative;
18
+ const StyledLayoutItem = styled.div `
19
+ width: ${props => props.$width};
20
+ min-width: ${props => props.$minWidth};
21
+ max-width: ${props => props.$maxWidth};
22
+ max-height: ${props => props.$maxHeight};
23
+ min-height: ${props => props.$minHeight};
24
+ height: ${props => props.$height};
25
+ position: relative;
26
26
  `;
27
- const StyledCardHeader = styled.div `
28
- width:100% ;
29
- display: flex;
30
- flex-direction: row;
31
- align-items: center;
32
- justify-content: flex-start;
33
- padding: 4px 5px;
34
- background-color: ${props => props.$backgroundColor ?? TMColors.backgroundColorHeader};
35
- color: ${props => props.$color ?? TMColors.colorHeader};
36
- border-top-right-radius: ${props => props.$borderRadius && '3px'};
37
- border-top-left-radius: ${props => props.$borderRadius && '3px'};
38
- overflow: hidden;
39
- position: sticky;
40
- top: 0;
41
- font-weight: ${props => props.$fontWeight ?? 'normal'};
27
+ const StyledCardHeader = styled.div `
28
+ width:100% ;
29
+ display: flex;
30
+ flex-direction: row;
31
+ align-items: center;
32
+ justify-content: flex-start;
33
+ padding: 4px 5px;
34
+ background-color: ${props => props.$backgroundColor ?? TMColors.backgroundColorHeader};
35
+ color: ${props => props.$color ?? TMColors.colorHeader};
36
+ border-top-right-radius: ${props => props.$borderRadius && '3px'};
37
+ border-top-left-radius: ${props => props.$borderRadius && '3px'};
38
+ overflow: hidden;
39
+ position: sticky;
40
+ top: 0;
41
+ font-weight: ${props => props.$fontWeight ?? 'normal'};
42
42
  `;
43
- const StyledCardContext = styled.div `
44
- width: 100%;
45
- height: ${props => props.$showHeader ? 'calc(100% - 25px);' : '100%'} ;
46
- overflow: ${props => props.$scroll && 'auto'};
47
- overflow-y: ${props => props.$scrollY && 'auto'};
48
- overflow-x: ${props => props.$scrollX && 'auto'};
49
- background-color: white;
50
- top: 0;
51
- padding: ${props => props.$padding ? '5px' : '0'};
43
+ const StyledCardContext = styled.div `
44
+ width: 100%;
45
+ height: ${props => props.$showHeader ? 'calc(100% - 25px);' : '100%'} ;
46
+ overflow: ${props => props.$scroll && 'auto'};
47
+ overflow-y: ${props => props.$scrollY && 'auto'};
48
+ overflow-x: ${props => props.$scrollX && 'auto'};
49
+ background-color: white;
50
+ top: 0;
51
+ padding: ${props => props.$padding ? '5px' : '0'};
52
52
  `;
53
53
  const TMCard = ({ borderRadius = true, onClick, scrollX = false, scrollY = false, width = '100%', height = '100%', children, title = '', fontSize = FontSize.defaultFontSize, fontWeight, showBorder = true, padding = true, scroll = false, backgroundColor, color }) => {
54
54
  return (_jsxs("div", { onClick: onClick, style: { width: width, height: height, fontSize: fontSize, overflow: 'hidden' }, children: [title.length > 0 && _jsx(StyledCardHeader, { "$borderRadius": borderRadius, "$fontWeight": fontWeight, "$backgroundColor": backgroundColor, "$color": color, children: title }), _jsxs(StyledCardContext, { "$scrollX": scrollX, "$scrollY": scrollY, "$scroll": scroll, "$padding": padding, "$showHeader": title.length > 0, style: { border: showBorder ? '2px solid #CAD9EB' : 'none', borderBottomLeftRadius: showBorder ? '3px' : '0', borderBottomRightRadius: showBorder ? '3px' : '0' }, children: [" ", children, " "] })] }));
@@ -2,42 +2,42 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { TMColors } from '../../utils/theme';
5
- const StyledListItem = styled.li `
6
- display: flex;
7
- flex-direction: row;
8
- align-items: center;
9
- justify-content: flex-start;
10
- gap: 10px;
11
- position: relative;
12
- color: ${TMColors.text_normal};
13
- padding: 4px 5px;
14
- height: 40px;
15
- width: 100%;
16
- font-size: 1rem;
17
- letter-spacing: 0px;
18
- background-color: ${({ $isSelected }) => ($isSelected ? '#d0e5fb' : 'transparent')};
19
-
20
- &:hover {
21
- background-color: ${TMColors.border_normal};
22
- cursor: pointer;
23
- }
5
+ const StyledListItem = styled.li `
6
+ display: flex;
7
+ flex-direction: row;
8
+ align-items: center;
9
+ justify-content: flex-start;
10
+ gap: 10px;
11
+ position: relative;
12
+ color: ${TMColors.text_normal};
13
+ padding: 4px 5px;
14
+ height: 40px;
15
+ width: 100%;
16
+ font-size: 1rem;
17
+ letter-spacing: 0px;
18
+ background-color: ${({ $isSelected }) => ($isSelected ? '#d0e5fb' : 'transparent')};
19
+
20
+ &:hover {
21
+ background-color: ${TMColors.border_normal};
22
+ cursor: pointer;
23
+ }
24
24
  `;
25
- const StyledListContainer = styled.div `
26
- height: 100%;
27
- width: 100%;
28
- background-color: ${TMColors.default_background};
29
- padding: 3px;
30
- border-radius: 2px;
31
- box-shadow: 1px 1px 7px rgba(0,0,0,0.15);
25
+ const StyledListContainer = styled.div `
26
+ height: 100%;
27
+ width: 100%;
28
+ background-color: ${TMColors.default_background};
29
+ padding: 3px;
30
+ border-radius: 2px;
31
+ box-shadow: 1px 1px 7px rgba(0,0,0,0.15);
32
32
  `;
33
- const StyledIconWrapper = styled.span `
34
- display: flex;
35
- align-items: center;
36
- justify-content: center;
37
- width: 24px;
38
- height: 24px;
39
- min-width: 24px;
40
- min-height: 24px;
33
+ const StyledIconWrapper = styled.span `
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ width: 24px;
38
+ height: 24px;
39
+ min-width: 24px;
40
+ min-height: 24px;
41
41
  `;
42
42
  ;
43
43
  const TMList = ({ items }) => {
@@ -8,9 +8,11 @@ interface ITMModal {
8
8
  fontSize?: string;
9
9
  isModal?: boolean;
10
10
  resizable?: boolean;
11
+ expandable?: boolean;
11
12
  onClose?: () => void;
12
13
  hidePopup?: boolean;
13
14
  askClosingConfirm?: boolean;
15
+ showCloseButton?: boolean;
14
16
  }
15
17
  declare const TMModal: React.FC<ITMModal>;
16
18
  export default TMModal;
@@ -1,48 +1,84 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState, useEffect } from 'react';
2
+ import { useState, useEffect, useRef } from 'react';
3
3
  import { Popup } from 'devextreme-react';
4
4
  import styled from 'styled-components';
5
5
  import TMLayoutContainer, { TMCard, TMLayoutItem } from './TMLayout';
6
6
  import { FontSize, TMColors } from '../../utils/theme';
7
- const StyledModal = styled.div `
8
- width: ${props => props.$width};
9
- height: ${props => props.$height};
10
- position: ${props => (props.$isModal ? 'relative' : 'fixed')};
11
- background-color: white;
12
- box-shadow: 2px 2px 10px #939393;
13
- border-radius: 5px;
14
- display: flex;
15
- flex-direction: column;
16
- align-items: flex-start;
17
- justify-content: flex-start;
18
- font-size: ${props => props.$fontSize};
19
- overflow: hidden;
20
- min-height: 33px;
21
- min-width: 250px;
22
- max-width: 95%;
23
- max-height: 95%;
24
- z-index: 2000000000;
7
+ import { IconWindowMaximize, IconWindowMinimize, svgToString } from '../../helper';
8
+ const StyledModal = styled.div `
9
+ width: ${props => props.$width};
10
+ height: ${props => props.$height};
11
+ position: ${props => (props.$isModal ? 'relative' : 'fixed')};
12
+ background-color: white;
13
+ box-shadow: 2px 2px 10px #939393;
14
+ border-radius: 5px;
15
+ display: flex;
16
+ flex-direction: column;
17
+ align-items: flex-start;
18
+ justify-content: flex-start;
19
+ font-size: ${props => props.$fontSize};
20
+ overflow: hidden;
21
+ min-height: 33px;
22
+ min-width: 250px;
23
+ max-width: 95%;
24
+ max-height: 95%;
25
+ z-index: 2000000000;
25
26
  `;
26
- const StyledModalToolbar = styled.div `
27
- width: 100%;
28
- display: flex;
29
- align-items: center;
30
- justify-content: flex-start;
31
- padding: 5px;
32
- flex-direction: row;
33
- background-color: ${TMColors.toolbar_background};
34
- border-bottom: 1px solid gray;
27
+ const StyledModalToolbar = styled.div `
28
+ width: 100%;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: flex-start;
32
+ padding: 5px;
33
+ flex-direction: row;
34
+ background-color: ${TMColors.toolbar_background};
35
+ border-bottom: 1px solid gray;
35
36
  `;
36
- const StyledModalContext = styled.div `
37
- width: 100%;
38
- overflow: auto;
39
- height: 100%;
37
+ const StyledModalContext = styled.div `
38
+ width: 100%;
39
+ overflow: auto;
40
+ height: 100%;
40
41
  `;
41
- const TMModal = ({ resizable = true, isModal = true, title = '', toolbar, onClose, children, width = '100%', height = '100%', fontSize = FontSize.defaultFontSize, hidePopup = true, askClosingConfirm = false }) => {
42
+ const TMModal = ({ resizable = true, expandable = false, isModal = true, title = '', toolbar, onClose, children, width = '100%', height = '100%', fontSize = FontSize.defaultFontSize, hidePopup = true, askClosingConfirm = false, showCloseButton = true }) => {
43
+ const popupRef = useRef(null);
42
44
  const [initialWidth, setInitialWidth] = useState(width);
43
45
  const [initialHeight, setInitialHeight] = useState(height);
44
46
  const [showPopup, setShowPopup] = useState(false);
45
47
  const [isResizing, setIsResizing] = useState(false);
48
+ const [isFullScreen, setIsFullScreen] = useState(false);
49
+ // Dimensioni minime di default per il popup
50
+ const DEFAULT_MIN_WIDTH = 500;
51
+ const DEFAULT_MIN_HEIGHT = 400;
52
+ const [minWidth, setMinWidth] = useState(0);
53
+ const [minHeight, setMinHeight] = useState(0);
54
+ /**
55
+ * Gestore chiamato quando il popup viene mostrato.
56
+ * Calcola e imposta le dimensioni minime del popup in base allo spazio disponibile.
57
+ * Le dimensioni minime sono il valore più piccolo tra le dimensioni effettive del parent e le dimensioni minime di default
58
+ */
59
+ const handleShown = () => {
60
+ // Usa requestAnimationFrame per attendere il completamento del rendering
61
+ requestAnimationFrame(() => {
62
+ if (popupRef.current && popupRef.current.instance) {
63
+ const instance = popupRef.current.instance();
64
+ if (instance) {
65
+ // Ottiene l'elemento content del popup
66
+ const element = instance.content();
67
+ if (element) {
68
+ const parentElement = element.parentElement;
69
+ if (parentElement) {
70
+ // Legge le dimensioni effettive del contenitore parent
71
+ const widthPx = parentElement.offsetWidth;
72
+ const heightPx = parentElement.offsetHeight;
73
+ // Imposta le dimensioni minime usando il valore più piccolo tra le dimensioni disponibili e quelle di default
74
+ setMinWidth(widthPx < DEFAULT_MIN_WIDTH ? widthPx : DEFAULT_MIN_WIDTH);
75
+ setMinHeight(heightPx < DEFAULT_MIN_HEIGHT ? heightPx : DEFAULT_MIN_HEIGHT);
76
+ }
77
+ }
78
+ }
79
+ }
80
+ });
81
+ };
46
82
  useEffect(() => {
47
83
  setShowPopup(isModal);
48
84
  }, [isModal]);
@@ -65,6 +101,15 @@ const TMModal = ({ resizable = true, isModal = true, title = '', toolbar, onClos
65
101
  setShowPopup(false);
66
102
  onClose && onClose();
67
103
  };
68
- return (_jsx(_Fragment, { children: isModal ? (_jsx(Popup, { showCloseButton: true, animation: undefined, maxHeight: '95%', maxWidth: '95%', dragEnabled: !isResizing, resizeEnabled: resizable, width: initialWidth, height: initialHeight, title: title, visible: showPopup, onResizeStart: handleResizeStart, onResizeEnd: handleResizeEnd, onHiding: onHiding, children: _jsxs(TMLayoutContainer, { children: [toolbar && (_jsx(TMLayoutItem, { height: "40px", children: _jsx(StyledModalToolbar, { children: toolbar }) })), _jsx(TMLayoutItem, { height: toolbar ? 'calc(100% - 50px)' : 'calc(100% - 10px)', children: _jsx(TMCard, { showBorder: false, padding: false, scrollY: true, children: children }) })] }) })) : (_jsxs(StyledModal, { "$isModal": isModal, className: "temp-modal", "$fontSize": fontSize, "$width": initialWidth, "$height": initialHeight, children: [toolbar ? _jsx(StyledModalToolbar, { children: toolbar }) : _jsx(_Fragment, {}), _jsx(StyledModalContext, { children: children })] })) }));
104
+ return (_jsx(_Fragment, { children: isModal ? (_jsx(Popup, { ref: popupRef, showCloseButton: showCloseButton, animation: undefined, minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', dragEnabled: !isResizing, resizeEnabled: resizable, width: expandable && isFullScreen ? '95%' : initialWidth, height: expandable && isFullScreen ? '95%' : initialHeight, title: title, visible: showPopup, onShown: handleShown, onResizeStart: handleResizeStart, onResizeEnd: handleResizeEnd, onHiding: onHiding, toolbarItems: expandable ? [
105
+ {
106
+ widget: 'dxButton',
107
+ location: 'after',
108
+ options: {
109
+ icon: isFullScreen ? svgToString(_jsx(IconWindowMinimize, {})) : svgToString(_jsx(IconWindowMaximize, {})),
110
+ onClick: () => setIsFullScreen(!isFullScreen)
111
+ }
112
+ }
113
+ ] : undefined, children: _jsxs(TMLayoutContainer, { children: [toolbar && (_jsx(TMLayoutItem, { height: "40px", children: _jsx(StyledModalToolbar, { children: toolbar }) })), _jsx(TMLayoutItem, { height: toolbar ? 'calc(100% - 40px)' : '100%', children: _jsx(TMCard, { showBorder: false, padding: false, scrollY: true, children: children }) })] }) })) : (_jsxs(StyledModal, { "$isModal": isModal, className: "temp-modal", "$fontSize": fontSize, "$width": initialWidth, "$height": initialHeight, children: [toolbar ? _jsx(StyledModalToolbar, { children: toolbar }) : _jsx(_Fragment, {}), _jsx(StyledModalContext, { children: children })] })) }));
69
114
  };
70
115
  export default TMModal;
@@ -8,67 +8,67 @@ import styled from 'styled-components';
8
8
  import { IconArrowLeft, IconClearButton, IconWindowMaximize, IconWindowMinimize, isPositiveNumber, SDKUI_Localizator } from '../../helper';
9
9
  import TMButton from './TMButton';
10
10
  import { Gutters } from '../../utils/theme';
11
- const StyledPanelContainer = styled.div `
12
- width: 100%;
13
- height: 100%;
14
- font-size: 1rem;
15
- box-shadow: 3px 3px 5px #D3D3D3BF;
16
- border-radius: 10px;
17
- opacity: 1;
18
- background: #FFFFFF;
19
- min-height: 0;
20
- overflow: hidden;
21
- position: ${({ $isMaximized }) => $isMaximized ? 'fixed' : 'relative'};
22
- top: ${({ $isMaximized }) => $isMaximized ? '50px' : 'auto'};
23
- left: ${({ $isMaximized }) => $isMaximized ? '50px' : 'auto'};
24
- width: ${({ $isMaximized }) => $isMaximized ? `calc(100vw - 50px - (${Gutters.getGutters()}px * 2))` : '100%'};
25
- height: ${({ $isMaximized }) => $isMaximized ? `calc(100vh - 50px - (${Gutters.getGutters()}px * 2))` : '100%'};
26
- z-index: ${({ $isMaximized }) => $isMaximized ? 2000 : 'auto'};
27
- margin: ${({ $isMaximized }) => $isMaximized ? `${Gutters.getGutters()}px` : '0'};
28
- /* transition: all 0.2s; */
11
+ const StyledPanelContainer = styled.div `
12
+ width: 100%;
13
+ height: 100%;
14
+ font-size: 1rem;
15
+ box-shadow: 3px 3px 5px #D3D3D3BF;
16
+ border-radius: 10px;
17
+ opacity: 1;
18
+ background: #FFFFFF;
19
+ min-height: 0;
20
+ overflow: hidden;
21
+ position: ${({ $isMaximized }) => $isMaximized ? 'fixed' : 'relative'};
22
+ top: ${({ $isMaximized }) => $isMaximized ? '50px' : 'auto'};
23
+ left: ${({ $isMaximized }) => $isMaximized ? '50px' : 'auto'};
24
+ width: ${({ $isMaximized }) => $isMaximized ? `calc(100vw - 50px - (${Gutters.getGutters()}px * 2))` : '100%'};
25
+ height: ${({ $isMaximized }) => $isMaximized ? `calc(100vh - 50px - (${Gutters.getGutters()}px * 2))` : '100%'};
26
+ z-index: ${({ $isMaximized }) => $isMaximized ? 2000 : 'auto'};
27
+ margin: ${({ $isMaximized }) => $isMaximized ? `${Gutters.getGutters()}px` : '0'};
28
+ /* transition: all 0.2s; */
29
29
  `;
30
- const StyledPanelHeader = styled.div `
31
- width:100% ;
32
- display: flex;
33
- flex-direction: row;
34
- align-items: center;
35
- justify-content: flex-start;
36
- padding: 4px 10px;
30
+ const StyledPanelHeader = styled.div `
31
+ width:100% ;
32
+ display: flex;
33
+ flex-direction: row;
34
+ align-items: center;
35
+ justify-content: flex-start;
36
+ padding: 4px 10px;
37
37
  background: ${({ $isActive, $backgroundColor }) => $isActive
38
38
  ? 'linear-gradient(270deg, #46B5A2 16%, #3BAABC 34%, #3BAABC 34%, #3681AD 54%, #3368A5 72%, #2F549D 88%, #304F99 100%)'
39
- : ($backgroundColor ?? '#F4F4F4')};
40
- box-shadow: 3px 3px 5px #D3D3D3BF;
41
- color: ${({ $isActive, $color }) => $isActive ? '#FFFFFF' : ($color ?? '#2559A5')};
42
- border-top-right-radius: 10px;
43
- border-top-left-radius: 10px;
44
- height: 40px;
45
- font-weight: 600;
46
- outline: none;
47
- &:focus {
48
- outline: none;
49
- }
50
- // Ensure all children inherit the header color
51
- &,
52
- * {
53
- color: ${({ $isActive, $color }) => $isActive ? '#FFFFFF' : ($color ?? '#2559A5')} !important;
54
- }
39
+ : ($backgroundColor ?? '#F4F4F4')};
40
+ box-shadow: 3px 3px 5px #D3D3D3BF;
41
+ color: ${({ $isActive, $color }) => $isActive ? '#FFFFFF' : ($color ?? '#2559A5')};
42
+ border-top-right-radius: 10px;
43
+ border-top-left-radius: 10px;
44
+ height: 40px;
45
+ font-weight: 600;
46
+ outline: none;
47
+ &:focus {
48
+ outline: none;
49
+ }
50
+ // Ensure all children inherit the header color
51
+ &,
52
+ * {
53
+ color: ${({ $isActive, $color }) => $isActive ? '#FFFFFF' : ($color ?? '#2559A5')} !important;
54
+ }
55
55
  `;
56
- const StyledPanelContent = styled.div `
57
- width: 100%;
58
- height: ${props => props.$height};
59
- min-height: 0;
60
- overflow: hidden;
61
- border-bottom-right-radius: 10px;
62
- border-bottom-left-radius: 10px;
63
- padding: ${props => props.$padding};
64
- display: flex;
65
- justify-content: space-between;
66
- position: relative;
67
- user-select: none;
68
- outline: none;
69
- &:focus {
70
- outline: none;
71
- }
56
+ const StyledPanelContent = styled.div `
57
+ width: 100%;
58
+ height: ${props => props.$height};
59
+ min-height: 0;
60
+ overflow: hidden;
61
+ border-bottom-right-radius: 10px;
62
+ border-bottom-left-radius: 10px;
63
+ padding: ${props => props.$padding};
64
+ display: flex;
65
+ justify-content: space-between;
66
+ position: relative;
67
+ user-select: none;
68
+ outline: none;
69
+ &:focus {
70
+ outline: none;
71
+ }
72
72
  `;
73
73
  const TMPanel = forwardRef(({ allowMaximize = true, color, backgroundColor, backgroundColorContainer, children, showHeader = true, title, totalItems, displayedItemsCount, toolbar, padding = '5px', isVisible = true, panelID = 'tmpanel', isActive, // Questa prop determinerà la modalità
74
74
  onActivate, onBack, onClose, onHeaderDoubleClick, onMaximize, onActiveChanged }, ref) => {