@topconsultnpm/sdkui-react 6.20.0-dev1.13 → 6.20.0-dev1.130

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 (202) hide show
  1. package/lib/assets/Toppy-help-center.png +0 -0
  2. package/lib/assets/headergradient.svg +87 -0
  3. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +322 -30
  4. package/lib/components/NewComponents/ContextMenu/hooks.d.ts +8 -1
  5. package/lib/components/NewComponents/ContextMenu/hooks.js +80 -8
  6. package/lib/components/NewComponents/ContextMenu/index.d.ts +3 -0
  7. package/lib/components/NewComponents/ContextMenu/index.js +2 -0
  8. package/lib/components/NewComponents/ContextMenu/styles.d.ts +9 -1
  9. package/lib/components/NewComponents/ContextMenu/styles.js +146 -47
  10. package/lib/components/NewComponents/ContextMenu/types.d.ts +22 -3
  11. package/lib/components/NewComponents/ContextMenu/useLongPress.d.ts +21 -0
  12. package/lib/components/NewComponents/ContextMenu/useLongPress.js +112 -0
  13. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +620 -125
  14. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +25 -5
  15. package/lib/components/NewComponents/FloatingMenuBar/styles.js +215 -59
  16. package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +12 -3
  17. package/lib/components/base/TMAccordionNew.js +35 -14
  18. package/lib/components/base/TMButton.js +6 -0
  19. package/lib/components/base/TMClosableList.js +4 -0
  20. package/lib/components/base/TMCustomButton.js +61 -17
  21. package/lib/components/base/TMDataGrid.d.ts +7 -4
  22. package/lib/components/base/TMDataGrid.js +153 -11
  23. package/lib/components/base/TMDropDownMenu.js +21 -18
  24. package/lib/components/base/TMFileManager.d.ts +4 -3
  25. package/lib/components/base/TMFileManager.js +32 -24
  26. package/lib/components/base/TMFileManagerDataGridView.d.ts +3 -2
  27. package/lib/components/base/TMFileManagerDataGridView.js +1 -11
  28. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +7 -1
  29. package/lib/components/base/TMFileManagerThumbnailItems.js +5 -2
  30. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +17 -4
  31. package/lib/components/base/TMFileManagerThumbnailsView.js +18 -6
  32. package/lib/components/base/TMFileManagerUtils.d.ts +0 -12
  33. package/lib/components/base/TMListView.js +33 -15
  34. package/lib/components/base/TMPanel.d.ts +1 -1
  35. package/lib/components/base/TMPanel.js +4 -2
  36. package/lib/components/base/TMPopUp.js +6 -0
  37. package/lib/components/base/TMToolbarCard.js +2 -0
  38. package/lib/components/base/TMTreeView.d.ts +2 -1
  39. package/lib/components/base/TMTreeView.js +33 -26
  40. package/lib/components/choosers/TMDataListItemChooser.d.ts +2 -0
  41. package/lib/components/choosers/TMDataListItemChooser.js +8 -2
  42. package/lib/components/choosers/TMDcmtTypeChooser.d.ts +1 -0
  43. package/lib/components/choosers/TMDcmtTypeChooser.js +11 -3
  44. package/lib/components/choosers/TMDistinctValues.js +2 -2
  45. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +2 -0
  46. package/lib/components/choosers/TMDynDataListItemChooser.js +8 -2
  47. package/lib/components/choosers/TMInvoiceRetrieveFormats.js +1 -1
  48. package/lib/components/choosers/TMMetadataChooser.d.ts +2 -0
  49. package/lib/components/choosers/TMMetadataChooser.js +19 -4
  50. package/lib/components/choosers/TMOrderRetrieveFormats.js +1 -1
  51. package/lib/components/choosers/TMUserChooser.d.ts +2 -5
  52. package/lib/components/choosers/TMUserChooser.js +33 -47
  53. package/lib/components/editors/TMCheckBox.js +2 -0
  54. package/lib/components/editors/TMDateBox.js +18 -9
  55. package/lib/components/editors/TMEditorStyled.js +7 -0
  56. package/lib/components/editors/TMLocalizedTextBox.d.ts +3 -1
  57. package/lib/components/editors/TMLocalizedTextBox.js +16 -14
  58. package/lib/components/editors/TMMetadataEditor.d.ts +1 -0
  59. package/lib/components/editors/TMMetadataEditor.js +4 -4
  60. package/lib/components/editors/TMMetadataTextBox.d.ts +9 -0
  61. package/lib/components/editors/TMMetadataTextBox.js +92 -0
  62. package/lib/components/editors/TMMetadataValues.d.ts +2 -0
  63. package/lib/components/editors/TMMetadataValues.js +26 -8
  64. package/lib/components/editors/TMRadioButton.js +2 -0
  65. package/lib/components/editors/TMTextArea.js +18 -30
  66. package/lib/components/editors/TMTextBox.d.ts +1 -1
  67. package/lib/components/editors/TMTextBox.js +29 -4
  68. package/lib/components/editors/TMTextExpression.js +6 -91
  69. package/lib/components/features/archive/TMArchive.js +2 -2
  70. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +15 -0
  71. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +462 -0
  72. package/lib/components/features/assistant/TMToppySpeechBubble.d.ts +11 -0
  73. package/lib/components/features/assistant/TMToppySpeechBubble.js +126 -0
  74. package/lib/components/features/documents/TMDcmtBlog.js +1 -1
  75. package/lib/components/features/documents/TMDcmtForm.d.ts +14 -2
  76. package/lib/components/features/documents/TMDcmtForm.js +576 -292
  77. package/lib/components/features/documents/TMDcmtPreview.js +42 -155
  78. package/lib/components/features/documents/TMDcmtTasks.js +9 -9
  79. package/lib/components/features/documents/TMMasterDetailDcmts.js +38 -53
  80. package/lib/components/features/documents/TMRelationViewer.d.ts +1 -1
  81. package/lib/components/features/documents/TMRelationViewer.js +2 -2
  82. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
  83. package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +2 -2
  84. package/lib/components/features/search/TMSavedQuerySelector.js +72 -67
  85. package/lib/components/features/search/TMSearch.d.ts +3 -0
  86. package/lib/components/features/search/TMSearch.js +50 -11
  87. package/lib/components/features/search/TMSearchQueryEditor.d.ts +1 -0
  88. package/lib/components/features/search/TMSearchQueryEditor.js +10 -10
  89. package/lib/components/features/search/TMSearchQueryPanel.d.ts +1 -0
  90. package/lib/components/features/search/TMSearchQueryPanel.js +40 -25
  91. package/lib/components/features/search/TMSearchResult.d.ts +3 -0
  92. package/lib/components/features/search/TMSearchResult.js +370 -252
  93. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -3
  94. package/lib/components/features/search/TMSearchResultsMenuItems.js +227 -171
  95. package/lib/components/features/search/TMSignSettingsForm.js +1 -1
  96. package/lib/components/features/search/TMSignatureInfoContent.d.ts +6 -0
  97. package/lib/components/features/search/TMSignatureInfoContent.js +140 -0
  98. package/lib/components/features/search/TMViewHistoryDcmt.js +47 -52
  99. package/lib/components/features/tasks/TMTaskForm.js +75 -25
  100. package/lib/components/features/tasks/TMTasksAgenda.d.ts +3 -1
  101. package/lib/components/features/tasks/TMTasksAgenda.js +48 -9
  102. package/lib/components/features/tasks/TMTasksCalendar.d.ts +2 -0
  103. package/lib/components/features/tasks/TMTasksCalendar.js +19 -7
  104. package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -2
  105. package/lib/components/features/tasks/TMTasksUtils.js +57 -37
  106. package/lib/components/features/tasks/TMTasksView.js +28 -19
  107. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +33 -2
  108. package/lib/components/features/workflow/TMWorkflowPopup.js +140 -34
  109. package/lib/components/features/workflow/diagram/DiagramItemComponent.d.ts +2 -0
  110. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +14 -7
  111. package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
  112. package/lib/components/features/workflow/diagram/RecipientList.js +3 -2
  113. package/lib/components/features/workflow/diagram/WFDiagram.d.ts +4 -0
  114. package/lib/components/features/workflow/diagram/WFDiagram.js +164 -13
  115. package/lib/components/forms/Login/LoginValidatorService.d.ts +2 -0
  116. package/lib/components/forms/Login/LoginValidatorService.js +7 -2
  117. package/lib/components/forms/Login/TMLoginForm.js +35 -7
  118. package/lib/components/forms/TMChooserForm.js +1 -1
  119. package/lib/components/grids/TMBlogsPost.js +56 -31
  120. package/lib/components/grids/TMRecentsManager.js +20 -10
  121. package/lib/components/grids/TMValidationItemsList.js +6 -0
  122. package/lib/components/index.d.ts +6 -3
  123. package/lib/components/index.js +6 -3
  124. package/lib/components/layout/panelManager/TMPanelManagerContext.js +13 -5
  125. package/lib/components/query/TMQueryEditor.d.ts +6 -1
  126. package/lib/components/query/TMQueryEditor.js +105 -101
  127. package/lib/components/settings/SettingsAppearance.d.ts +2 -1
  128. package/lib/components/settings/SettingsAppearance.js +99 -30
  129. package/lib/components/sidebar/TMHeader.js +11 -7
  130. package/lib/components/sidebar/TMSidebar.d.ts +0 -1
  131. package/lib/components/sidebar/TMSidebar.js +16 -44
  132. package/lib/components/sidebar/TMSidebarItem.js +36 -17
  133. package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -1
  134. package/lib/components/viewers/TMDataListItemViewer.js +35 -71
  135. package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +8 -0
  136. package/lib/components/viewers/TMDataUserIdItemViewer.js +39 -0
  137. package/lib/css/tm-sdkui.css +1 -1
  138. package/lib/helper/SDKUI_Globals.d.ts +22 -0
  139. package/lib/helper/SDKUI_Globals.js +10 -1
  140. package/lib/helper/SDKUI_Localizator.d.ts +21 -3
  141. package/lib/helper/SDKUI_Localizator.js +196 -10
  142. package/lib/helper/TMCommandsContextMenu.d.ts +4 -2
  143. package/lib/helper/TMCommandsContextMenu.js +15 -4
  144. package/lib/helper/TMIcons.d.ts +4 -0
  145. package/lib/helper/TMIcons.js +13 -3
  146. package/lib/helper/TMPdfViewer.d.ts +8 -0
  147. package/lib/helper/TMPdfViewer.js +373 -0
  148. package/lib/helper/TMToppyMessage.js +4 -0
  149. package/lib/helper/checkinCheckoutManager.d.ts +31 -1
  150. package/lib/helper/checkinCheckoutManager.js +112 -30
  151. package/lib/helper/devextremeCustomMessages.d.ts +30 -0
  152. package/lib/helper/devextremeCustomMessages.js +30 -0
  153. package/lib/helper/helpers.d.ts +30 -2
  154. package/lib/helper/helpers.js +132 -4
  155. package/lib/helper/index.d.ts +2 -0
  156. package/lib/helper/index.js +2 -0
  157. package/lib/helper/queryHelper.d.ts +2 -2
  158. package/lib/helper/queryHelper.js +80 -24
  159. package/lib/helper/workItemsHelper.d.ts +6 -0
  160. package/lib/helper/workItemsHelper.js +230 -0
  161. package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
  162. package/lib/hooks/useCheckInOutOperations.js +223 -0
  163. package/lib/hooks/useDataListItem.d.ts +12 -0
  164. package/lib/hooks/useDataListItem.js +132 -0
  165. package/lib/hooks/useDataUserIdItem.d.ts +10 -0
  166. package/lib/hooks/useDataUserIdItem.js +96 -0
  167. package/lib/hooks/useFloatingBarPinnedItems.d.ts +11 -0
  168. package/lib/hooks/useFloatingBarPinnedItems.js +54 -0
  169. package/lib/hooks/useMetadataExpression.d.ts +19 -0
  170. package/lib/hooks/useMetadataExpression.js +99 -0
  171. package/lib/hooks/useSettingsFeedback.d.ts +11 -0
  172. package/lib/hooks/useSettingsFeedback.js +38 -0
  173. package/lib/hooks/useWorkflowApprove.d.ts +4 -0
  174. package/lib/hooks/useWorkflowApprove.js +14 -1
  175. package/lib/index.d.ts +1 -0
  176. package/lib/index.js +3 -2
  177. package/lib/services/platform_services.d.ts +3 -3
  178. package/lib/ts/types.d.ts +61 -1
  179. package/lib/utils/theme.d.ts +1 -1
  180. package/lib/utils/theme.js +1 -1
  181. package/package.json +6 -5
  182. package/lib/components/NewComponents/Notification/Notification.d.ts +0 -4
  183. package/lib/components/NewComponents/Notification/Notification.js +0 -60
  184. package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +0 -8
  185. package/lib/components/NewComponents/Notification/NotificationContainer.js +0 -33
  186. package/lib/components/NewComponents/Notification/index.d.ts +0 -2
  187. package/lib/components/NewComponents/Notification/index.js +0 -2
  188. package/lib/components/NewComponents/Notification/styles.d.ts +0 -21
  189. package/lib/components/NewComponents/Notification/styles.js +0 -180
  190. package/lib/components/NewComponents/Notification/types.d.ts +0 -18
  191. package/lib/components/NewComponents/Notification/types.js +0 -1
  192. package/lib/components/base/TMContextMenu.d.ts +0 -25
  193. package/lib/components/base/TMContextMenu.js +0 -109
  194. package/lib/components/base/TMContextMenuOLD.d.ts +0 -26
  195. package/lib/components/base/TMContextMenuOLD.js +0 -56
  196. package/lib/components/base/TMFloatingToolbar.d.ts +0 -9
  197. package/lib/components/base/TMFloatingToolbar.js +0 -101
  198. package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +0 -30
  199. package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +0 -482
  200. package/lib/components/features/assistant/ToppySpeechBubble.d.ts +0 -9
  201. package/lib/components/features/assistant/ToppySpeechBubble.js +0 -117
  202. package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
@@ -7,32 +7,52 @@ export declare const FloatingContainer: import("styled-components/dist/types").I
7
7
  $x: number;
8
8
  $y: number;
9
9
  $orientation: "horizontal" | "vertical";
10
+ $verticalDirection: "down" | "up";
10
11
  $isDragging: boolean;
11
12
  $isConfigMode: boolean;
12
13
  $isConstrained?: boolean;
14
+ $isHidden?: boolean;
15
+ $bgColor?: string;
13
16
  }>, {
14
17
  $x: number;
15
18
  $y: number;
16
19
  $orientation: "horizontal" | "vertical";
20
+ $verticalDirection: "down" | "up";
17
21
  $isDragging: boolean;
18
22
  $isConfigMode: boolean;
19
23
  $isConstrained?: boolean;
24
+ $isHidden?: boolean;
25
+ $bgColor?: string;
20
26
  }>> & string;
21
27
  export declare const GripHandle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
22
28
  $orientation: "horizontal" | "vertical";
23
29
  }>> & string;
30
+ export declare const Separator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
31
+ $orientation: "horizontal" | "vertical";
32
+ }>> & string;
33
+ export declare const ItemSeparator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
34
+ $orientation: "horizontal" | "vertical";
35
+ $isConfigMode: boolean;
36
+ }>> & string;
24
37
  export declare const MenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
25
38
  $isActive?: boolean;
26
39
  }>> & string;
27
- export declare const ConfigButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
40
+ export declare const ConfigButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
41
+ export declare const ApplyButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
42
+ export declare const CloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
43
+ export declare const ContextMenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$isActive"> & {
28
44
  $isActive?: boolean;
29
- }>> & string;
45
+ }, "ref"> & {
46
+ ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
47
+ }, never>> & string;
48
+ export declare const AddButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
30
49
  export declare const RemoveButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
31
- export declare const OrientationToggle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
32
- $orientation: "horizontal" | "vertical";
33
- }>> & string;
50
+ export declare const UndoButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
34
51
  export declare const DraggableItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
35
52
  $isDragging: boolean;
36
53
  $isDragOver: boolean;
37
54
  }>> & string;
38
55
  export declare const ContextMenuWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
56
+ export declare const ButtonGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
57
+ $orientation: "horizontal" | "vertical";
58
+ }>> & string;
@@ -37,38 +37,39 @@ export const FloatingContainer = styled.div.attrs(props => ({
37
37
  },
38
38
  })) `
39
39
  position: ${props => props.$isConstrained ? 'absolute' : 'fixed'};
40
- z-index: ${props => props.$isConfigMode ? 9999 : 10000};
40
+ z-index: ${props => props.$isConfigMode ? 9999 : 1500};
41
41
  display: flex;
42
- flex-direction: ${props => props.$orientation === 'horizontal' ? 'row' : 'column'};
42
+ opacity: ${props => props.$isHidden ? 0 : 1};
43
+ pointer-events: ${props => props.$isHidden ? 'none' : 'auto'};
44
+ flex-direction: ${props => props.$orientation === 'horizontal' ? 'row' : (props.$verticalDirection === 'up' ? 'column-reverse' : 'column')};
43
45
  align-items: center;
44
- background: ${props => props.$isDragging || props.$isConfigMode
45
- ? 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)'
46
- : 'rgba(102, 126, 234, 0.9)'};
47
- border: 1px solid rgba(255, 255, 255, 0.2);
46
+ background: ${props => props.$bgColor || 'linear-gradient(135deg, #0071BC 0%, #1B1464 100%)'};
47
+ border: 1px solid #667eea;
48
48
  border-radius: 14px;
49
49
  padding: 6px;
50
50
  gap: 3px;
51
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
51
+ box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3),
52
+ 0 6px 16px rgba(0, 0, 0, 0.2);
52
53
  cursor: ${props => props.$isDragging ? 'grabbing' : 'default'};
53
54
  user-select: none;
55
+ -webkit-touch-callout: none;
56
+ -webkit-user-select: none;
54
57
  animation: ${props => props.$isConfigMode && css `${shake} 0.3s ease-in-out`};
55
58
  transition: none;
56
59
 
57
60
  &:hover {
58
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
61
+ background: ${props => props.$bgColor || 'linear-gradient(135deg, #0071BC 0%, #1B1464 100%)'};
59
62
  border: 1px solid #667eea;
60
63
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3),
61
64
  0 6px 16px rgba(0, 0, 0, 0.2);
62
65
  }
63
66
 
64
67
  [data-theme='dark'] & {
65
- background: ${props => props.$isDragging || props.$isConfigMode
66
- ? 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)'
67
- : 'rgba(26, 26, 46, 0.9)'};
68
- border-color: rgba(255, 255, 255, 0.1);
68
+ background: ${props => props.$bgColor || 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)'};
69
+ border: 1px solid #1a1a2e;
69
70
 
70
71
  &:hover {
71
- background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
72
+ background: ${props => props.$bgColor || 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)'};
72
73
  border: 1px solid #1a1a2e;
73
74
  }
74
75
  }
@@ -77,7 +78,7 @@ export const GripHandle = styled.div `
77
78
  display: flex;
78
79
  align-items: center;
79
80
  justify-content: center;
80
- padding: ${props => props.$orientation === 'horizontal' ? '10px 6px' : '6px 10px'};
81
+ padding: ${props => props.$orientation === 'horizontal' ? '6px 4px' : '4px 6px'};
81
82
  cursor: grab;
82
83
  color: rgba(255, 255, 255, 0.7);
83
84
  transition: all 0.2s ease;
@@ -98,35 +99,79 @@ export const GripHandle = styled.div `
98
99
  height: 14px;
99
100
  }
100
101
  `;
102
+ export const Separator = styled.div `
103
+ background: rgba(255, 255, 255, 0.25);
104
+ width: ${props => props.$orientation === 'horizontal' ? '1px' : '100%'};
105
+ height: ${props => props.$orientation === 'horizontal' ? '20px' : '1px'};
106
+ margin: ${props => props.$orientation === 'horizontal' ? '0 4px' : '4px 0'};
107
+ flex-shrink: 0;
108
+ `;
109
+ export const ItemSeparator = styled.div `
110
+ flex-shrink: 0;
111
+ transition: all 0.2s ease;
112
+
113
+ ${props => props.$isConfigMode ? `
114
+ /* Edit mode: look exactly like MenuButton */
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ width: 30px;
119
+ height: 30px;
120
+ background: transparent;
121
+ border-radius: 8px;
122
+ cursor: grab;
123
+ position: relative;
124
+
125
+ &::before {
126
+ content: '';
127
+ background: rgba(255, 255, 255, 0.25);
128
+ width: ${props.$orientation === 'horizontal' ? '2px' : '100%'};
129
+ height: ${props.$orientation === 'horizontal' ? '18px' : '2px'};
130
+ border-radius: 1px;
131
+ }
132
+
133
+ &:hover {
134
+ background: rgba(255, 255, 255, 0.2);
135
+ }
136
+
137
+ &:active {
138
+ opacity: 0.8;
139
+ }
140
+ ` : `
141
+ /* Normal mode: simple line with tight spacing */
142
+ background: rgba(255, 255, 255, 0.25);
143
+ width: ${props.$orientation === 'horizontal' ? '1px' : '20px'};
144
+ height: ${props.$orientation === 'horizontal' ? '20px' : '1px'};
145
+ margin: ${props.$orientation === 'horizontal' ? '0 2px' : '2px 0'};
146
+ `}
147
+ `;
101
148
  export const MenuButton = styled.button `
102
149
  display: flex;
103
150
  align-items: center;
104
151
  justify-content: center;
105
- width: 34px;
106
- height: 34px;
107
- background: transparent;
152
+ width: 30px;
153
+ height: 30px;
154
+ background: ${props => props.$isActive ? 'rgba(102, 179, 255, 0.3)' : 'transparent'};
108
155
  border: none;
109
156
  border-radius: 8px;
110
157
  color: white;
111
158
  font-size: 16px;
112
159
  cursor: pointer;
113
- transition: all 0.2s ease;
160
+ transition: background 0.2s ease;
114
161
  position: relative;
115
162
 
116
163
  &:hover:not(:disabled) {
117
- background: rgba(255, 255, 255, 0.2);
118
- transform: scale(1.1);
164
+ background: ${props => props.$isActive ? 'rgba(102, 179, 255, 0.4)' : 'rgba(255, 255, 255, 0.2)'};
119
165
  }
120
166
 
121
167
  &:active:not(:disabled) {
122
- transform: scale(0.95);
168
+ opacity: 0.8;
123
169
  }
124
170
 
125
171
  &:disabled {
126
- opacity: 0.3;
127
- cursor: not-allowed;
128
- background: rgba(255, 255, 255, 0.05);
129
- color: rgba(255, 255, 255, 0.4);
172
+ opacity: 0.5;
173
+ cursor: default;
174
+ color: rgba(255, 255, 255, 0.6);
130
175
  }
131
176
 
132
177
  svg {
@@ -138,37 +183,137 @@ export const ConfigButton = styled.button `
138
183
  display: flex;
139
184
  align-items: center;
140
185
  justify-content: center;
141
- width: 34px;
142
- height: 34px;
143
- background: ${props => props.$isActive
144
- ? 'rgba(0, 0, 0, 0.2)'
145
- : 'rgba(0, 0, 0, 0.1)'};
146
- border: 1px solid ${props => props.$isActive
147
- ? 'rgba(255, 255, 255, 0.3)'
148
- : 'rgba(255, 255, 255, 0.15)'};
186
+ width: 21px;
187
+ height: 21px;
188
+ background: transparent;
189
+ border: none;
190
+ border-radius: 4px;
191
+ color: rgba(255, 255, 255, 0.5);
192
+ font-size: 10px;
193
+ cursor: pointer;
194
+ transition: all 0.2s ease;
195
+ padding: 4px;
196
+
197
+ &:hover:not(:disabled) {
198
+ background: rgba(255, 255, 255, 0.1);
199
+ color: rgba(255, 255, 255, 0.8);
200
+ }
201
+
202
+ &:active:not(:disabled) {
203
+ transform: scale(0.9);
204
+ }
205
+
206
+ &:disabled {
207
+ opacity: 0.3;
208
+ cursor: not-allowed;
209
+ }
210
+
211
+ svg {
212
+ width: 16px;
213
+ height: 16px;
214
+ }
215
+ `;
216
+ export const ApplyButton = styled.button `
217
+ display: flex;
218
+ align-items: center;
219
+ justify-content: center;
220
+ width: 24px;
221
+ height: 24px;
222
+ background: transparent;
223
+ border: none;
224
+ border-radius: 4px;
225
+ color: rgba(34, 197, 94, 1);
226
+ font-size: 10px;
227
+ cursor: pointer;
228
+ transition: all 0.2s ease;
229
+ padding: 3px;
230
+
231
+ &:hover:not(:disabled) {
232
+ background: rgba(255, 255, 255, 0.1);
233
+ color: rgba(34, 197, 94, 1);
234
+ }
235
+
236
+ &:active:not(:disabled) {
237
+ transform: scale(0.9);
238
+ }
239
+
240
+ &:disabled {
241
+ opacity: 0.3;
242
+ cursor: default;
243
+ }
244
+
245
+ svg {
246
+ width: 20px;
247
+ height: 20px;
248
+ }
249
+ `;
250
+ export const CloseButton = styled.button `
251
+ display: flex;
252
+ align-items: center;
253
+ justify-content: center;
254
+ width: 24px;
255
+ height: 24px;
256
+ background: transparent;
257
+ border: none;
258
+ border-radius: 4px;
259
+ color: rgba(239, 68, 68, 1);
260
+ font-size: 10px;
261
+ cursor: pointer;
262
+ transition: all 0.2s ease;
263
+ padding: 3px;
264
+
265
+ &:hover:not(:disabled) {
266
+ background: rgba(255, 255, 255, 0.1);
267
+ color: rgba(239, 68, 68, 1);
268
+ }
269
+
270
+ &:active:not(:disabled) {
271
+ transform: scale(0.9);
272
+ }
273
+
274
+ &:disabled {
275
+ opacity: 0.3;
276
+ cursor: default;
277
+ }
278
+
279
+ svg {
280
+ width: 20px;
281
+ height: 20px;
282
+ }
283
+ `;
284
+ export const ContextMenuButton = styled(MenuButton) `
285
+ svg {
286
+ transform: translateY(0);
287
+ }
288
+ `;
289
+ export const AddButton = styled.button `
290
+ display: flex;
291
+ align-items: center;
292
+ justify-content: center;
293
+ width: 26px;
294
+ height: 26px;
295
+ background: rgba(255, 255, 255, 0.15);
296
+ border: 1px dashed rgba(255, 255, 255, 0.4);
149
297
  border-radius: 8px;
150
298
  color: white;
151
- font-size: 16px;
299
+ font-size: 18px;
300
+ font-weight: bold;
301
+ line-height: 0;
152
302
  cursor: pointer;
153
303
  transition: all 0.2s ease;
154
304
  position: relative;
305
+ margin-right: 6px;
306
+ margin-left: 8px;
307
+ padding: 0;
155
308
 
156
309
  &:hover {
157
- background: ${props => props.$isActive
158
- ? 'rgba(0, 0, 0, 0.25)'
159
- : 'rgba(0, 0, 0, 0.15)'};
160
- border-color: rgba(255, 255, 255, 0.35);
161
- transform: scale(1.05);
310
+ background: rgba(255, 255, 255, 0.25);
311
+ border-color: rgba(255, 255, 255, 0.6);
162
312
  }
163
313
 
164
314
  &:active {
165
315
  transform: scale(0.95);
166
316
  }
167
-
168
- svg {
169
- width: 20px;
170
- height: 20px;
171
- }
172
317
  `;
173
318
  export const RemoveButton = styled.button `
174
319
  position: absolute;
@@ -177,55 +322,60 @@ export const RemoveButton = styled.button `
177
322
  width: 20px;
178
323
  height: 20px;
179
324
  background: #ef4444;
180
- border: 2px solid white;
325
+ border: none;
181
326
  border-radius: 50%;
182
327
  color: white;
183
- font-size: 12px;
328
+ font-size: 14px;
184
329
  font-weight: bold;
330
+ line-height: 0;
185
331
  cursor: pointer;
186
332
  display: flex;
187
333
  align-items: center;
188
334
  justify-content: center;
335
+ padding: 0;
189
336
  transition: all 0.2s ease;
190
337
  z-index: 1;
191
338
 
192
339
  &:hover {
193
340
  background: #dc2626;
194
- transform: scale(1.15);
195
341
  }
196
342
 
197
343
  &:active {
198
- transform: scale(0.9);
344
+ background: #b91c1c;
199
345
  }
200
346
  `;
201
- export const OrientationToggle = styled.button `
347
+ export const UndoButton = styled.button `
202
348
  display: flex;
203
349
  align-items: center;
204
350
  justify-content: center;
205
- width: 20px;
206
- height: 20px;
351
+ width: 24px;
352
+ height: 24px;
207
353
  background: transparent;
208
354
  border: none;
209
355
  border-radius: 4px;
210
- color: rgba(255, 255, 255, 0.5);
356
+ color: rgba(249, 115, 22, 1);
211
357
  font-size: 10px;
212
358
  cursor: pointer;
213
359
  transition: all 0.2s ease;
214
360
  padding: 2px;
215
- transform: ${props => props.$orientation === 'vertical' ? 'rotate(90deg)' : 'rotate(0deg)'};
216
361
 
217
- &:hover {
362
+ &:hover:not(:disabled) {
218
363
  background: rgba(255, 255, 255, 0.1);
219
- color: rgba(255, 255, 255, 0.8);
364
+ color: rgba(249, 115, 22, 1);
220
365
  }
221
366
 
222
- &:active {
223
- transform: ${props => props.$orientation === 'vertical' ? 'rotate(90deg) scale(0.9)' : 'scale(0.9)'};
367
+ &:active:not(:disabled) {
368
+ transform: scale(0.9);
369
+ }
370
+
371
+ &:disabled {
372
+ opacity: 0.3;
373
+ cursor: default;
224
374
  }
225
375
 
226
376
  svg {
227
- width: 10px;
228
- height: 10px;
377
+ width: 16px;
378
+ height: 16px;
229
379
  }
230
380
  `;
231
381
  export const DraggableItem = styled.div `
@@ -265,3 +415,9 @@ export const ContextMenuWrapper = styled.div `
265
415
  position: static;
266
416
  display: contents;
267
417
  `;
418
+ export const ButtonGroup = styled.div `
419
+ display: flex;
420
+ flex-direction: ${props => props.$orientation === 'vertical' ? 'column' : 'row'};
421
+ align-items: center;
422
+ gap: 0;
423
+ `;
@@ -6,15 +6,24 @@ export interface TMFloatingMenuItem {
6
6
  onClick: () => void;
7
7
  disabled?: boolean;
8
8
  isPinned?: boolean;
9
- originalMenuItem?: TMContextMenuItemProps;
9
+ isSeparator?: boolean;
10
+ isToggle?: boolean;
11
+ staticItem?: React.ReactNode;
10
12
  }
11
13
  export interface TMFloatingMenuBarProps {
12
14
  containerRef: React.RefObject<HTMLElement | null>;
13
15
  contextMenuItems?: TMContextMenuItemProps[];
14
- storageKey?: string;
15
16
  isConstrained?: boolean;
16
17
  defaultPosition?: Position;
17
18
  maxItems?: number;
19
+ defaultPinnedItems?: string[];
20
+ defaultOrientation?: 'horizontal' | 'vertical';
21
+ fixedItems?: TMFloatingMenuItem[];
22
+ enableConfigMode?: boolean;
23
+ bgColor?: string;
24
+ hasContextMenu?: boolean;
25
+ pinnedItemIds?: string[];
26
+ onPinChange?: (pinnedIds: string[]) => void;
18
27
  }
19
28
  export interface Position {
20
29
  x: number;
@@ -23,8 +32,8 @@ export interface Position {
23
32
  export interface TMFloatingMenuBarState {
24
33
  position: Position;
25
34
  isDragging: boolean;
26
- isConfigMode: boolean;
27
35
  orientation: 'horizontal' | 'vertical';
36
+ verticalDirection: 'down' | 'up';
28
37
  items: TMFloatingMenuItem[];
29
38
  draggedItemIndex: number | null;
30
39
  }
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useCallback } from 'react';
3
3
  import styled from 'styled-components';
4
- import { ContextMenu, LoadIndicator } from 'devextreme-react';
4
+ import { LoadIndicator } from 'devextreme-react';
5
5
  import { LocalStorageService } from '@topconsultnpm/sdk-ts';
6
6
  import TMTooltip from './TMTooltip';
7
+ import TMContextMenu from '../NewComponents/ContextMenu/TMContextMenu';
7
8
  const Container = styled.div `
8
9
  width: 100%;
9
10
  height: 100%;
@@ -154,12 +155,15 @@ const DEFAULT_COLORS = ['#339af0', '#fa5252', '#40c057', '#f59f00', '#e64980', '
154
155
  const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChange }) => {
155
156
  const [openAccordions, setOpenAccordions] = useState({});
156
157
  const [isInitialized, setIsInitialized] = useState(false);
157
- const [anchorEl, setAnchorEl] = useState(null);
158
- const [contextMenuItems, setContextMenuItems] = useState([]);
159
158
  const [focusedItem, setFocusedItem] = useState(undefined);
159
+ // Item context menu state
160
+ const [itemContextMenuVisible, setItemContextMenuVisible] = useState(false);
161
+ const [itemContextMenuPosition, setItemContextMenuPosition] = useState({ x: 0, y: 0 });
162
+ const [itemContextMenuItems, setItemContextMenuItems] = useState([]);
163
+ // Header context menu state
160
164
  const [headerContextGroupId, setHeaderContextGroupId] = useState(null);
161
165
  const [headerContextVisible, setHeaderContextVisible] = useState(false);
162
- const [headerContextPosition, setHeaderContextPosition] = useState(null);
166
+ const [headerContextPosition, setHeaderContextPosition] = useState({ x: 0, y: 0 });
163
167
  useEffect(() => {
164
168
  const initialState = {};
165
169
  if (!groups || groups.length === 0) {
@@ -240,11 +244,21 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
240
244
  if (menuItems.length === 0) {
241
245
  return;
242
246
  }
243
- setAnchorEl(event.currentTarget);
244
- setContextMenuItems(menuItems);
247
+ // Convert to TMContextMenuItemProps format
248
+ const convertedItems = menuItems.map((mi) => ({
249
+ name: mi.text || mi.name || '',
250
+ // Only pass icon if it's a React element, not a string (DevExtreme used string icons)
251
+ icon: typeof mi.icon === 'string' ? undefined : mi.icon,
252
+ disabled: mi.disabled,
253
+ onClick: mi.onClick,
254
+ submenu: mi.items || mi.submenu,
255
+ }));
256
+ setItemContextMenuPosition({ x: event.clientX, y: event.clientY });
257
+ setItemContextMenuItems(convertedItems);
258
+ setItemContextMenuVisible(true);
245
259
  };
246
260
  const closeContextMenu = useCallback(() => {
247
- setAnchorEl(null);
261
+ setItemContextMenuVisible(false);
248
262
  }, []);
249
263
  const handleHeaderContextMenu = (event, groupId) => {
250
264
  event.preventDefault();
@@ -260,12 +274,11 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
260
274
  };
261
275
  const closeHeaderContextMenu = useCallback(() => {
262
276
  setHeaderContextVisible(false);
263
- setHeaderContextPosition(null);
264
277
  setHeaderContextGroupId(null);
265
278
  }, []);
266
279
  const headerContextMenuItems = headerContextGroupId ? [
267
280
  {
268
- text: openAccordions[headerContextGroupId] ? 'Collassa' : 'Espandi',
281
+ name: openAccordions[headerContextGroupId] ? 'Collassa' : 'Espandi',
269
282
  onClick: () => {
270
283
  toggleAccordion(headerContextGroupId);
271
284
  closeHeaderContextMenu();
@@ -295,19 +308,19 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
295
308
  const color = getGroupColor(group, index);
296
309
  const isOpen = openAccordions[group.id] ?? true;
297
310
  if (group.customComponent) {
298
- return (_jsxs(AccordionItem, { children: [_jsxs(AccordionHeader, { "$color": color, "$isOpen": isOpen, onClick: (e) => handleHeaderClick(e, group.id), onContextMenu: (e) => handleHeaderContextMenu(e, group.id), children: [_jsxs(AccordionTitle, { children: [group.icon, _jsx(TitleText, { children: group.title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [renderBadges(group, color), _jsx(ToggleIcon, { "$isOpen": isOpen, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M4 6L8 10L12 6", stroke: "#495057", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }), isOpen && (_jsx(CustomComponentContainer, { children: group.customComponent }))] }, group.id));
311
+ return (_jsxs(AccordionItem, { children: [_jsxs(AccordionHeader, { id: `accordion-header-${group.id}`, "$color": color, "$isOpen": isOpen, onClick: (e) => handleHeaderClick(e, group.id), onContextMenu: (e) => handleHeaderContextMenu(e, group.id), children: [_jsxs(AccordionTitle, { children: [group.icon, _jsx(TitleText, { children: group.title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [renderBadges(group, color), _jsx(ToggleIcon, { "$isOpen": isOpen, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M4 6L8 10L12 6", stroke: "#495057", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }), isOpen && (_jsx(CustomComponentContainer, { children: group.customComponent }))] }, group.id));
299
312
  }
300
313
  if (!group.dataSource || group.dataSource.length === 0)
301
314
  return null;
302
315
  if (!group.renderItem) {
303
- return (_jsxs(AccordionItem, { children: [_jsxs(AccordionHeader, { "$color": color, "$isOpen": isOpen, onClick: (e) => handleHeaderClick(e, group.id), onContextMenu: (e) => handleHeaderContextMenu(e, group.id), children: [_jsxs(AccordionTitle, { children: [group.icon, _jsx(TitleText, { children: group.title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [renderBadges(group, color), _jsx(ToggleIcon, { "$isOpen": isOpen, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M4 6L8 10L12 6", stroke: "#495057", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }), _jsx(AccordionContent, { "$isOpen": isOpen, "$maxHeight": 100, children: _jsxs(ErrorMessage, { children: ["\u26A0\uFE0F renderItem function is required for \"", group.title, "\" group"] }) })] }, group.id));
316
+ return (_jsxs(AccordionItem, { children: [_jsxs(AccordionHeader, { id: `accordion-header-${group.id}`, "$color": color, "$isOpen": isOpen, onClick: (e) => handleHeaderClick(e, group.id), onContextMenu: (e) => handleHeaderContextMenu(e, group.id), children: [_jsxs(AccordionTitle, { children: [group.icon, _jsx(TitleText, { children: group.title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [renderBadges(group, color), _jsx(ToggleIcon, { "$isOpen": isOpen, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M4 6L8 10L12 6", stroke: "#495057", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }), _jsx(AccordionContent, { "$isOpen": isOpen, "$maxHeight": 100, children: _jsxs(ErrorMessage, { children: ["\u26A0\uFE0F renderItem function is required for \"", group.title, "\" group"] }) })] }, group.id));
304
317
  }
305
318
  const itemHeight = group.itemHeight || 80;
306
319
  const maxHeight = group.dataSource.length * itemHeight + 20;
307
- return (_jsxs(AccordionItem, { children: [_jsxs(AccordionHeader, { "$color": color, "$isOpen": isOpen, onClick: (e) => handleHeaderClick(e, group.id), onContextMenu: (e) => handleHeaderContextMenu(e, group.id), children: [_jsxs(AccordionTitle, { children: [group.icon, _jsx(TitleText, { children: group.title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [renderBadges(group, color), _jsx(ToggleIcon, { "$isOpen": isOpen, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M4 6L8 10L12 6", stroke: "#495057", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }), _jsx(AccordionContent, { "$isOpen": isOpen, "$maxHeight": maxHeight, children: _jsx(ItemsList, { children: group.dataSource.map((item, itemIndex) => {
320
+ return (_jsxs(AccordionItem, { children: [_jsxs(AccordionHeader, { id: `accordion-header-${group.id}`, "$color": color, "$isOpen": isOpen, onClick: (e) => handleHeaderClick(e, group.id), onContextMenu: (e) => handleHeaderContextMenu(e, group.id), children: [_jsxs(AccordionTitle, { children: [group.icon, _jsx(TitleText, { children: group.title })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [renderBadges(group, color), _jsx(ToggleIcon, { "$isOpen": isOpen, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "M4 6L8 10L12 6", stroke: "#495057", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] }), _jsx(AccordionContent, { "$isOpen": isOpen, "$maxHeight": maxHeight, children: _jsx(ItemsList, { children: group.dataSource.map((item, itemIndex) => {
308
321
  const isSelected = selectedItem === item;
309
322
  const isFocused = focusedItem === item;
310
- return (_jsx(ListItem, { "$isSelected": isSelected, "$color": color, onClick: () => handleItemClick(item, group), onDoubleClick: () => handleItemDoubleClick(item, group), onMouseEnter: () => setFocusedItem(item), onMouseLeave: () => setFocusedItem(undefined), onContextMenu: (e) => handleContextMenu(e, item, group), children: group.renderItem(item, isSelected, isFocused, color) }, itemIndex * 2));
323
+ return (_jsx(ListItem, { id: `accordion-item-${group.id}-${itemIndex}`, className: "tm-accordion-list-item", "$isSelected": isSelected, "$color": color, onClick: () => handleItemClick(item, group), onDoubleClick: () => handleItemDoubleClick(item, group), onMouseEnter: () => setFocusedItem(item), onMouseLeave: () => setFocusedItem(undefined), onContextMenu: (e) => handleContextMenu(e, item, group), children: group.renderItem(item, isSelected, isFocused, color) }, itemIndex * 2));
311
324
  }) }) })] }, group.id));
312
325
  };
313
326
  if (!isInitialized) {
@@ -321,6 +334,14 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
321
334
  event.preventDefault();
322
335
  }
323
336
  };
324
- return (_jsxs(_Fragment, { children: [_jsx(Container, { onContextMenu: handleContainerContextMenu, children: groups.map((group, index) => renderAccordion(group, index)) }), anchorEl && contextMenuItems.length > 0 && (_jsx(ContextMenu, { dataSource: contextMenuItems, target: anchorEl, onHiding: closeContextMenu })), headerContextPosition && headerContextMenuItems.length > 0 && (_jsx(ContextMenu, { dataSource: headerContextMenuItems, visible: headerContextVisible, position: { my: 'left top', at: 'left top', offset: `${headerContextPosition.x} ${headerContextPosition.y}` }, onHiding: closeHeaderContextMenu }))] }));
337
+ return (_jsxs(_Fragment, { children: [_jsx(Container, { onContextMenu: handleContainerContextMenu, children: groups.map((group, index) => renderAccordion(group, index)) }), _jsx(TMContextMenu, { items: itemContextMenuItems, target: ".tm-accordion-list-item", externalControl: {
338
+ visible: itemContextMenuVisible,
339
+ position: itemContextMenuPosition,
340
+ onClose: closeContextMenu
341
+ } }), _jsx(TMContextMenu, { items: headerContextMenuItems, target: "[id^='accordion-header-']", externalControl: {
342
+ visible: headerContextVisible,
343
+ position: headerContextPosition,
344
+ onClose: closeHeaderContextMenu
345
+ } })] }));
325
346
  };
326
347
  export default TMAccordion;
@@ -61,6 +61,8 @@ const StyledIconButton = styled.button.withConfig({ shouldForwardProp: prop => !
61
61
  background-color: transparent;
62
62
  color: ${props => !props.disabled ? getColor(props.color) : 'rgb(180, 180, 180)'};
63
63
  user-select: none;
64
+ -webkit-touch-callout: none;
65
+ -webkit-user-select: none;
64
66
  `;
65
67
  const StyledTextButton = styled.button.withConfig({ shouldForwardProp: prop => !['text'].includes(prop) }) `
66
68
  font-size: ${props => props.fontSize};
@@ -79,6 +81,8 @@ const StyledTextButton = styled.button.withConfig({ shouldForwardProp: prop => !
79
81
  background-color: transparent;
80
82
  color: ${props => !props.disabled ? getColor(props.color) : 'rgb(231, 231, 231)'};
81
83
  user-select: none;
84
+ -webkit-touch-callout: none;
85
+ -webkit-user-select: none;
82
86
  transition: ease 200ms;
83
87
  &:hover {
84
88
  background-color: rgb(241, 241, 241);
@@ -118,6 +122,8 @@ const StyledAdvancedButton = styled.button `
118
122
  overflow: hidden;
119
123
  color: ${({ $isPrimaryOutline }) => $isPrimaryOutline ? TMColors.primaryColor : 'white'};
120
124
  user-select: none;
125
+ -webkit-touch-callout: none;
126
+ -webkit-user-select: none;
121
127
  border: ${({ $isPrimaryOutline }) => $isPrimaryOutline ? `1px solid ${TMColors.primaryColor}` : 'none'};
122
128
  background: ${({ $isPrimaryOutline }) => $isPrimaryOutline ? 'white' : 'unset'};
123
129
  `;
@@ -49,6 +49,8 @@ const StyledClosabelIcon = styled.div `
49
49
  justify-content: flex-start;
50
50
  padding: 2px;
51
51
  user-select: none;
52
+ -webkit-touch-callout: none;
53
+ -webkit-user-select: none;
52
54
  `;
53
55
  const StyledClosableItemsCount = styled.div `
54
56
  /* color: ${Colors.primary}; */
@@ -56,6 +58,8 @@ const StyledClosableItemsCount = styled.div `
56
58
  cursor: pointer;
57
59
  margin-right: 5px;
58
60
  user-select: none;
61
+ -webkit-touch-callout: none;
62
+ -webkit-user-select: none;
59
63
  `;
60
64
  const TMClosableList = ({ dataSource, visibility = false, label, inline = false, hasPadding = true }) => {
61
65
  const [status, setStatus] = useState(visibility);