@topconsultnpm/sdkui-react 6.22.0-dev2.9 → 6.22.0-dev3.11

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 (314) hide show
  1. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +3 -3
  2. package/lib/components/NewComponents/ContextMenu/hooks.d.ts +1 -1
  3. package/lib/components/NewComponents/ContextMenu/styles.d.ts +45 -43
  4. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +6 -6
  5. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +80 -73
  6. package/lib/components/base/Styled.d.ts +93 -77
  7. package/lib/components/base/Styled.js +7 -5
  8. package/lib/components/base/TMAccordionNew.js +7 -7
  9. package/lib/components/base/TMAlert.d.ts +32 -32
  10. package/lib/components/base/TMAreaManager.js +1 -1
  11. package/lib/components/base/TMButton.js +4 -4
  12. package/lib/components/base/TMClosableList.js +3 -3
  13. package/lib/components/base/TMCounterBar.d.ts +2 -2
  14. package/lib/components/base/TMCounterContainer.d.ts +2 -1
  15. package/lib/components/base/TMCustomButton.d.ts +1 -1
  16. package/lib/components/base/TMCustomButton.js +1 -1
  17. package/lib/components/base/TMDataGrid.d.ts +4 -0
  18. package/lib/components/base/TMDataGrid.js +292 -12
  19. package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
  20. package/lib/components/base/TMDropDownMenu.js +1 -1
  21. package/lib/components/base/TMEditorBase.d.ts +2 -0
  22. package/lib/components/base/TMFileManager.d.ts +2 -1
  23. package/lib/components/base/TMFileManager.js +5 -3
  24. package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
  25. package/lib/components/base/TMFileManagerDataGridView.js +12 -3
  26. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
  27. package/lib/components/base/TMFileManagerThumbnailItems.js +20 -10
  28. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
  29. package/lib/components/base/TMFileManagerUtils.d.ts +6 -6
  30. package/lib/components/base/TMFileManagerUtils.js +37 -1
  31. package/lib/components/base/TMLayout.d.ts +6 -6
  32. package/lib/components/base/TMLayout.js +3 -3
  33. package/lib/components/base/TMList.d.ts +2 -1
  34. package/lib/components/base/TMList.js +1 -1
  35. package/lib/components/base/TMListView.d.ts +1 -1
  36. package/lib/components/base/TMListView.js +3 -3
  37. package/lib/components/base/TMModal.d.ts +11 -0
  38. package/lib/components/base/TMModal.js +47 -13
  39. package/lib/components/base/TMPanel.d.ts +6 -0
  40. package/lib/components/base/TMPanel.js +224 -111
  41. package/lib/components/base/TMPopUp.js +5 -2
  42. package/lib/components/base/TMResizableMenu.js +2 -2
  43. package/lib/components/base/TMRightSidebar.js +1 -1
  44. package/lib/components/base/TMShowAllOrMaxItemsButton.js +1 -1
  45. package/lib/components/base/TMSpinner.d.ts +2 -1
  46. package/lib/components/base/TMSpinner.js +2 -2
  47. package/lib/components/base/TMTab.d.ts +4 -3
  48. package/lib/components/base/TMTab.js +2 -2
  49. package/lib/components/base/TMTabControl.d.ts +101 -0
  50. package/lib/components/base/TMTabControl.js +653 -0
  51. package/lib/components/base/TMToggleButton.js +2 -2
  52. package/lib/components/base/TMToolbarCard.js +3 -3
  53. package/lib/components/base/TMTooltip.d.ts +2 -1
  54. package/lib/components/base/TMTooltip.js +24 -8
  55. package/lib/components/base/TMTreeView.d.ts +14 -8
  56. package/lib/components/base/TMTreeView.js +123 -70
  57. package/lib/components/base/TMUserAvatar.d.ts +2 -1
  58. package/lib/components/base/TMVilViewer.d.ts +2 -1
  59. package/lib/components/base/TMWaitPanel.d.ts +3 -2
  60. package/lib/components/base/TMWaitPanel.js +2 -2
  61. package/lib/components/choosers/TMCultureIDPicker.js +2 -2
  62. package/lib/components/choosers/TMDataListItemChooser.js +1 -1
  63. package/lib/components/choosers/TMDataListItemPicker.js +2 -2
  64. package/lib/components/choosers/TMDcmtTypeChooser.js +5 -4
  65. package/lib/components/choosers/TMDiskChooser.js +1 -1
  66. package/lib/components/choosers/TMDistinctValues.d.ts +9 -7
  67. package/lib/components/choosers/TMDistinctValues.js +157 -141
  68. package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
  69. package/lib/components/choosers/TMDynDataListItemChooser.js +1 -1
  70. package/lib/components/choosers/TMImageIDChooser.js +1 -1
  71. package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +2 -1
  72. package/lib/components/choosers/TMMetadataChooser.js +3 -3
  73. package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +2 -1
  74. package/lib/components/choosers/TMQuickSearchInfo.d.ts +13 -0
  75. package/lib/components/choosers/TMQuickSearchInfo.js +279 -0
  76. package/lib/components/choosers/TMQuickSearchSettingsForm.d.ts +16 -0
  77. package/lib/components/choosers/TMQuickSearchSettingsForm.js +94 -0
  78. package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
  79. package/lib/components/choosers/TMRelationChooser.js +1 -1
  80. package/lib/components/choosers/TMSelectedValuesSummary.d.ts +13 -0
  81. package/lib/components/choosers/TMSelectedValuesSummary.js +89 -0
  82. package/lib/components/choosers/TMUserChooser.d.ts +2 -2
  83. package/lib/components/choosers/TMUserChooser.js +1 -1
  84. package/lib/components/editors/TMCheckBox.js +1 -1
  85. package/lib/components/editors/TMDropDown.d.ts +3 -0
  86. package/lib/components/editors/TMDropDown.js +197 -5
  87. package/lib/components/editors/TMEditorStyled.d.ts +21 -43
  88. package/lib/components/editors/TMFormulaEditor.d.ts +1 -1
  89. package/lib/components/editors/TMFormulaEditor.js +1 -1
  90. package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
  91. package/lib/components/editors/TMHtmlContentDisplay.js +1 -1
  92. package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
  93. package/lib/components/editors/TMLocalizedTextBox.js +1 -1
  94. package/lib/components/editors/TMMetadataValues.js +6 -6
  95. package/lib/components/editors/TMRadioButton.js +2 -2
  96. package/lib/components/editors/TMSummary.js +3 -3
  97. package/lib/components/editors/TMTextArea.js +3 -3
  98. package/lib/components/editors/TMTextBox.js +3 -3
  99. package/lib/components/editors/TMTextExpression.js +1 -1
  100. package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
  101. package/lib/components/features/archive/TMArchive.js +17 -3
  102. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
  103. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
  104. package/lib/components/features/assistant/TMToppySpeechBubble.js +1 -1
  105. package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
  106. package/lib/components/features/documents/TMBatchUpdateForm.js +20 -6
  107. package/lib/components/features/documents/TMCopyToFolderForm.js +61 -22
  108. package/lib/components/features/documents/TMDcmtBlog.d.ts +3 -0
  109. package/lib/components/features/documents/TMDcmtBlog.js +4 -4
  110. package/lib/components/features/documents/TMDcmtForm.d.ts +7 -0
  111. package/lib/components/features/documents/TMDcmtForm.js +181 -54
  112. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +12 -1
  113. package/lib/components/features/documents/TMDcmtFormActionButtons.js +79 -9
  114. package/lib/components/features/documents/TMDcmtIcon.d.ts +2 -1
  115. package/lib/components/features/documents/TMDcmtIcon.js +5 -3
  116. package/lib/components/features/documents/TMDcmtPreview.d.ts +8 -6
  117. package/lib/components/features/documents/TMDcmtPreview.js +12 -8
  118. package/lib/components/features/documents/TMDcmtTasks.d.ts +2 -1
  119. package/lib/components/features/documents/TMDownloadRelationViewerSection.js +1 -1
  120. package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
  121. package/lib/components/features/documents/TMFileUploader.js +28 -28
  122. package/lib/components/features/documents/TMMasterDetailDcmts.js +116 -34
  123. package/lib/components/features/documents/TMMasterInfoFields.d.ts +20 -0
  124. package/lib/components/features/documents/TMMasterInfoFields.js +184 -0
  125. package/lib/components/features/documents/TMMergeToPdfForm.d.ts +3 -3
  126. package/lib/components/features/documents/TMMergeToPdfForm.js +42 -10
  127. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +46 -0
  128. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +321 -0
  129. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +370 -0
  130. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +283 -0
  131. package/lib/components/features/documents/TMRelationViewer.d.ts +24 -3
  132. package/lib/components/features/documents/TMRelationViewer.js +110 -52
  133. package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +1 -1
  134. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
  135. package/lib/components/features/search/TMMetadataOutputForm.d.ts +2 -1
  136. package/lib/components/features/search/TMMetadataOutputForm.js +1 -1
  137. package/lib/components/features/search/TMMetadataSorterForm.d.ts +2 -1
  138. package/lib/components/features/search/TMMetadataSorterForm.js +1 -1
  139. package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
  140. package/lib/components/features/search/TMSavedQuerySelector.js +2 -2
  141. package/lib/components/features/search/TMSearch.d.ts +1 -1
  142. package/lib/components/features/search/TMSearch.js +146 -21
  143. package/lib/components/features/search/TMSearchQueryEditor.js +7 -5
  144. package/lib/components/features/search/TMSearchQueryPanel.d.ts +13 -3
  145. package/lib/components/features/search/TMSearchQueryPanel.js +142 -68
  146. package/lib/components/features/search/TMSearchResult.d.ts +16 -0
  147. package/lib/components/features/search/TMSearchResult.js +517 -188
  148. package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
  149. package/lib/components/features/search/TMSignatureInfoContent.d.ts +2 -1
  150. package/lib/components/features/search/TMSignatureInfoContent.js +1 -1
  151. package/lib/components/features/search/TMTreeSelector.js +121 -70
  152. package/lib/components/features/search/TMViewHistoryDcmt.d.ts +2 -1
  153. package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
  154. package/lib/components/features/tasks/TMTaskForm.js +1 -1
  155. package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
  156. package/lib/components/features/tasks/TMTaskFormUtils.js +3 -3
  157. package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
  158. package/lib/components/features/tasks/TMTasksAgenda.js +1 -1
  159. package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
  160. package/lib/components/features/tasks/TMTasksCalendar.js +1 -1
  161. package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
  162. package/lib/components/features/tasks/TMTasksHeader.js +1 -1
  163. package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
  164. package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
  165. package/lib/components/features/tasks/TMTasksUtilsView.js +1 -1
  166. package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
  167. package/lib/components/features/tasks/TMTasksView.js +7 -13
  168. package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
  169. package/lib/components/features/wg/TMWGsCopyMoveForm.js +1 -1
  170. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +18 -7
  171. package/lib/components/features/workflow/TMWorkflowPopup.js +9 -5
  172. package/lib/components/features/workflow/diagram/ConnectionComponent.js +3 -3
  173. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +3 -3
  174. package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
  175. package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +1 -1
  176. package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
  177. package/lib/components/features/workflow/diagram/WFDiagram.js +4 -4
  178. package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +3 -1
  179. package/lib/components/forms/Login/ChangePasswordInputs.d.ts +3 -1
  180. package/lib/components/forms/Login/Chooser.d.ts +2 -2
  181. package/lib/components/forms/Login/Menu.js +1 -1
  182. package/lib/components/forms/Login/OTPReader.js +1 -1
  183. package/lib/components/forms/Login/PasswordStrengthChecker.js +1 -1
  184. package/lib/components/forms/Login/RapidAccessLogin.js +2 -2
  185. package/lib/components/forms/Login/RecoverPasswordFlow.js +2 -2
  186. package/lib/components/forms/Login/SelectBox.js +1 -1
  187. package/lib/components/forms/Login/StepIndicator.js +1 -1
  188. package/lib/components/forms/Login/TMLoginForm.js +7 -7
  189. package/lib/components/forms/Login/TextBox.js +1 -1
  190. package/lib/components/forms/TMApplyForm.js +3 -3
  191. package/lib/components/forms/TMChooserForm.d.ts +2 -1
  192. package/lib/components/forms/TMChooserForm.js +1 -1
  193. package/lib/components/forms/TMSaveForm.d.ts +4 -4
  194. package/lib/components/forms/TMSaveForm.js +3 -3
  195. package/lib/components/grids/TMBlogAttachments.d.ts +2 -1
  196. package/lib/components/grids/TMBlogAttachments.js +14 -3
  197. package/lib/components/grids/TMBlogHeader.d.ts +1 -1
  198. package/lib/components/grids/TMBlogHeader.js +5 -1
  199. package/lib/components/grids/TMBlogsPost.d.ts +3 -1
  200. package/lib/components/grids/TMBlogsPost.js +31 -4
  201. package/lib/components/grids/TMBlogsPostUtils.d.ts +10 -9
  202. package/lib/components/grids/TMBlogsPostUtils.js +15 -4
  203. package/lib/components/grids/TMRecentsManager.js +4 -4
  204. package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
  205. package/lib/components/grids/TMValidationItemsList.js +1 -1
  206. package/lib/components/index.d.ts +2 -0
  207. package/lib/components/index.js +2 -0
  208. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +3 -1
  209. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +25 -15
  210. package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
  211. package/lib/components/layout/panelManager/TMPanelManagerContext.js +68 -93
  212. package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +5 -6
  213. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +1 -1
  214. package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
  215. package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
  216. package/lib/components/layout/panelManager/TMPanelWrapper.js +3 -3
  217. package/lib/components/layout/panelManager/types.d.ts +3 -0
  218. package/lib/components/layout/panelManager/utils.js +13 -11
  219. package/lib/components/pages/TMPage.d.ts +1 -1
  220. package/lib/components/pages/TMPage.js +1 -1
  221. package/lib/components/query/TMQueryCountButton.js +1 -1
  222. package/lib/components/query/TMQueryEditor.d.ts +14 -10
  223. package/lib/components/query/TMQueryEditor.js +7 -7
  224. package/lib/components/settings/SettingsAppearance.d.ts +2 -1
  225. package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
  226. package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
  227. package/lib/components/sidebar/TMCommandsPanel.js +1 -1
  228. package/lib/components/sidebar/TMHeader.d.ts +3 -3
  229. package/lib/components/sidebar/TMHeader.js +36 -26
  230. package/lib/components/sidebar/TMSidebar.js +1 -1
  231. package/lib/components/sidebar/TMSidebarItem.js +1 -1
  232. package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
  233. package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
  234. package/lib/components/viewers/TMMidViewer.d.ts +2 -2
  235. package/lib/components/viewers/TMMidViewer.js +6 -3
  236. package/lib/components/viewers/TMTidViewer.d.ts +2 -2
  237. package/lib/components/viewers/TMTidViewer.js +89 -28
  238. package/lib/components/wizard/TMStepIndicator.js +3 -3
  239. package/lib/css/tm-sdkui.css +1 -1
  240. package/lib/devextreme-license.d.ts +1 -0
  241. package/lib/devextreme-license.js +3 -0
  242. package/lib/helper/Enum_Localizator.d.ts +4 -4
  243. package/lib/helper/Enum_Localizator.js +1 -0
  244. package/lib/helper/Globalization.d.ts +1 -1
  245. package/lib/helper/SDKUI_Globals.d.ts +110 -0
  246. package/lib/helper/SDKUI_Globals.js +151 -0
  247. package/lib/helper/SDKUI_Localizator.d.ts +735 -687
  248. package/lib/helper/SDKUI_Localizator.js +480 -0
  249. package/lib/helper/TMAppUpdatedModal.d.ts +2 -0
  250. package/lib/helper/TMAppUpdatedModal.js +134 -0
  251. package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
  252. package/lib/helper/TMIcons.d.ts +280 -279
  253. package/lib/helper/TMIcons.js +4 -3
  254. package/lib/helper/TMPdfViewer.d.ts +2 -1
  255. package/lib/helper/TMPdfViewer.js +1 -1
  256. package/lib/helper/TMToppyMessage.d.ts +2 -2
  257. package/lib/helper/TMToppyMessage.js +1 -1
  258. package/lib/helper/TMUtils.d.ts +23 -4
  259. package/lib/helper/TMUtils.js +25 -3
  260. package/lib/helper/checkinCheckoutManager.d.ts +1 -1
  261. package/lib/helper/checkinCheckoutManager.js +1 -1
  262. package/lib/helper/dataGridSearchHelper.d.ts +28 -0
  263. package/lib/helper/dataGridSearchHelper.js +51 -0
  264. package/lib/helper/dcmtsHelper.d.ts +20 -0
  265. package/lib/helper/dcmtsHelper.js +58 -1
  266. package/lib/helper/helpers.d.ts +13 -2
  267. package/lib/helper/helpers.js +27 -3
  268. package/lib/helper/index.d.ts +2 -0
  269. package/lib/helper/index.js +2 -0
  270. package/lib/helper/queryHelper.d.ts +6 -1
  271. package/lib/helper/queryHelper.js +8 -3
  272. package/lib/hooks/tmDistinctValuesGridHelper.d.ts +16 -0
  273. package/lib/hooks/tmDistinctValuesGridHelper.js +31 -0
  274. package/lib/hooks/useArchiveListForm.d.ts +39 -0
  275. package/lib/hooks/useArchiveListForm.js +46 -0
  276. package/lib/hooks/useCaseFlowApprove.d.ts +56 -0
  277. package/lib/hooks/useCaseFlowApprove.js +157 -0
  278. package/lib/hooks/useDataUserIdItem.d.ts +1 -0
  279. package/lib/hooks/useDataUserIdItem.js +1 -0
  280. package/lib/hooks/useDcmtOperations.d.ts +7 -0
  281. package/lib/hooks/useDcmtOperations.js +141 -71
  282. package/lib/hooks/useDocumentOperations.d.ts +4 -0
  283. package/lib/hooks/useDocumentOperations.js +53 -11
  284. package/lib/hooks/useInputDialog.d.ts +2 -1
  285. package/lib/hooks/useInputDialog.js +1 -1
  286. package/lib/hooks/useMultiMasterDetailDcmts.d.ts +113 -0
  287. package/lib/hooks/useMultiMasterDetailDcmts.js +760 -0
  288. package/lib/hooks/useQueryParametersDialog.js +1 -1
  289. package/lib/hooks/useRelatedDocuments.d.ts +1 -0
  290. package/lib/hooks/useRelatedDocuments.js +22 -27
  291. package/lib/hooks/useShowDossiersV5.d.ts +12 -0
  292. package/lib/hooks/useShowDossiersV5.js +37 -0
  293. package/lib/hooks/useTMDistinctValuesMetadataDisplay.d.ts +18 -0
  294. package/lib/hooks/useTMDistinctValuesMetadataDisplay.js +103 -0
  295. package/lib/hooks/useTMDistinctValuesQuickSearch.d.ts +49 -0
  296. package/lib/hooks/useTMDistinctValuesQuickSearch.js +307 -0
  297. package/lib/hooks/useTMDistinctValuesSelection.d.ts +42 -0
  298. package/lib/hooks/useTMDistinctValuesSelection.js +103 -0
  299. package/lib/hooks/useTMDistinctValuesSource.d.ts +29 -0
  300. package/lib/hooks/useTMDistinctValuesSource.js +105 -0
  301. package/lib/index.d.ts +2 -0
  302. package/lib/index.js +5 -2
  303. package/lib/services/caseflow/CaseFlowService.d.ts +247 -0
  304. package/lib/services/caseflow/CaseFlowService.js +720 -0
  305. package/lib/services/caseflow/CaseFlowTemplateCacheService.d.ts +28 -0
  306. package/lib/services/caseflow/CaseFlowTemplateCacheService.js +121 -0
  307. package/lib/services/caseflow/caseFlowNameCache.d.ts +32 -0
  308. package/lib/services/caseflow/caseFlowNameCache.js +116 -0
  309. package/lib/services/caseflow/caseFlowWorkItemUtils.d.ts +61 -0
  310. package/lib/services/caseflow/caseFlowWorkItemUtils.js +113 -0
  311. package/lib/services/index.d.ts +4 -0
  312. package/lib/services/index.js +4 -0
  313. package/lib/services/platform_services.d.ts +7 -6
  314. package/package.json +16 -13
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
2
+ import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
3
+ import styled, { createGlobalStyle, css } from 'styled-components';
3
4
  import DataGrid, { Column, HeaderFilter, Selection, Scrolling, LoadPanel, SearchPanel, Pager, Sorting, Paging, FilterPanel, ColumnChooser, Grouping, GroupPanel, Summary, Editing, FilterRow, StateStoring, RowDragging, MasterDetail, Position, ColumnChooserSearch, ColumnChooserSelection } from 'devextreme-react/data-grid';
4
5
  import DataSource from 'devextreme/data/data_source';
5
6
  import { IconAll, IconSelected, IconVisible, SDKUI_Globals, SDKUI_Localizator } from '../../helper';
@@ -18,11 +19,11 @@ const TMDataGrid = React.forwardRef((props, ref) => {
18
19
  // main properties
19
20
  keyExpr = 'id', dataSource, focusedRowEnabled = true, hoverStateEnabled = true, focusedRowKey, selectedRowKeys = [],
20
21
  // custom options
21
- dataColumns = [], pageSize = TMDataGridPageSize.Large, showHeaderFilter = true, showFilterPanel = true, showHeaderColumnChooser = false, showLoadPanel = true, showSearchPanel = true, searchPanelToolbarPosition = 'before', searchPanelFocusTrigger = 0, counterConfig = { show: false, items: new Map() }, onHasFiltersChange, customContextMenuItems,
22
+ dataColumns = [], pageSize = TMDataGridPageSize.Large, showHeaderFilter = true, showFilterPanel = true, showHeaderColumnChooser = false, showLoadPanel = true, showSearchPanel = true, searchPanelToolbarPosition = 'before', searchPanelFocusTrigger = 0, keepSearchPanelFocus = true, counterConfig = { show: false, items: new Map() }, compactPager = false, onHasFiltersChange, customContextMenuItems,
22
23
  // events and callbacks
23
24
  onSelectionChanged, onFocusedRowChanged, onRowDblClick, onRowClick, onCellClick, onCellDblClick, onOptionChanged, onContentReady, onContextMenuPreparing, onInitialized, onEditorPreparing, onCellPrepared, onRowPrepared, onRowUpdating, onRowExpanded, onRowCollapsed, onRowUpdated, onSaved, onEditCanceled, onEditingStart, onEditingChange, customizeColumns, onKeyDown, scrolling = { mode: 'standard', useNative: SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar === 1 }, paging = { enabled: true, pageSize: pageSize }, pager = { visible: true, showInfo: true, showNavigationButtons: true }, selection = { mode: 'multiple', showCheckBoxesMode: "always", selectAllMode: "allPages" }, sorting, summary, stateStoring, grouping, groupPanel, filterRow, headerFilter, editing, rowDragging, masterDetail,
24
25
  // other properties
25
- disabled = false, autoNavigateToFocusedRow = true, columnResizingMode = 'widget', columnHidingEnabled = true, columnAutoWidth = true, allowColumnResizing = true, allowColumnReordering = true, showBorders = true, showRowLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines === 1, showColumnLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines === 1, showColumnHeaders = true, rowAlternationEnabled = false, wordWrapEnabled = false, noDataText, columnMinWidth,
26
+ disabled = false, autoNavigateToFocusedRow = true, columnResizingMode = 'widget', columnHidingEnabled = true, columnAutoWidth = true, allowColumnResizing = true, allowColumnReordering = true, showBorders = true, showRowLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines === 1, showColumnLines = SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines === 1, showColumnHeaders = true, rowAlternationEnabled = false, repaintChangesOnly = false, wordWrapEnabled = false, noDataText, columnMinWidth,
26
27
  // styles
27
28
  id, width = '100%', height = '100%', } = props;
28
29
  const internalRef = React.useRef(null);
@@ -35,9 +36,15 @@ const TMDataGrid = React.forwardRef((props, ref) => {
35
36
  const [customContextMenuVisible, setCustomContextMenuVisible] = useState(false);
36
37
  const [customContextMenuPosition, setCustomContextMenuPosition] = useState({ x: 0, y: 0 });
37
38
  const [customContextMenuRowKey, setCustomContextMenuRowKey] = useState(undefined);
39
+ // true quando il menu contestuale viene aperto su spazio vuoto senza alcuna riga di riferimento:
40
+ // in tal caso i comandi legati alla riga (singleRow/multiRow) devono risultare disabilitati
41
+ const [customContextMenuOnEmptyArea, setCustomContextMenuOnEmptyArea] = useState(false);
38
42
  const gridContainerRef = useRef(null);
39
43
  // Ref per evitare focus ripetuti sulla search panel
40
44
  const searchPanelFocusedRef = useRef(false);
45
+ // true quando il testo è stato confermato mentre si stava scrivendo: il fuoco va rimesso nella casella
46
+ const restoreSearchPanelFocusRef = useRef(false);
47
+ const getSearchPanelInput = useCallback(() => internalRef.current?.instance().element().querySelector('.dx-datagrid-search-panel input'), []);
41
48
  useEffect(() => {
42
49
  const count = getRecordCount(dataSource);
43
50
  setTotalRecordCount(count);
@@ -75,9 +82,17 @@ const TMDataGrid = React.forwardRef((props, ref) => {
75
82
  const rowKey = internalRef.current.instance().getKeyByRowIndex(rowIndex);
76
83
  internalRef.current.instance().option('focusedRowKey', rowKey);
77
84
  setCustomContextMenuRowKey(rowKey);
85
+ setCustomContextMenuOnEmptyArea(false);
78
86
  }
79
87
  else {
80
- setCustomContextMenuRowKey(focusedRowKey);
88
+ // Right-click su spazio vuoto: ricade sulla riga focalizzata solo se esiste ancora.
89
+ // Se non c'è una riga focalizzata (es. primo click dopo l'apertura) o se focusedRowKey punta a
90
+ // una riga non più presente (dopo un'eliminazione), il menu viene comunque mostrato ma senza
91
+ // riga di riferimento: i comandi di riga restano disabilitati, quelli generali utilizzabili
92
+ const grid = internalRef.current?.instance();
93
+ const focusedRowExists = focusedRowKey !== undefined && !!grid && grid.getRowIndexByKey(focusedRowKey) >= 0;
94
+ setCustomContextMenuRowKey(focusedRowExists ? focusedRowKey : undefined);
95
+ setCustomContextMenuOnEmptyArea(!focusedRowExists);
81
96
  }
82
97
  setCustomContextMenuVisible(true);
83
98
  setCustomContextMenuPosition({ x: e.clientX, y: e.clientY });
@@ -114,6 +129,7 @@ const TMDataGrid = React.forwardRef((props, ref) => {
114
129
  setCustomContextMenuVisible(true);
115
130
  setCustomContextMenuPosition({ x: clientX, y: clientY });
116
131
  setCustomContextMenuRowKey(rowKey);
132
+ setCustomContextMenuOnEmptyArea(false);
117
133
  },
118
134
  });
119
135
  // Creating a ref to store the timestamp of the last selection change
@@ -222,7 +238,8 @@ const TMDataGrid = React.forwardRef((props, ref) => {
222
238
  return items.map(item => {
223
239
  let disabled = item.disabled ?? false;
224
240
  let disabledCalculation = false;
225
- const id = focusedRowEnabled ? focusedRowKey : rowID;
241
+ // Menu aperto su spazio vuoto senza riga di riferimento: nessun id, i comandi di riga sono disabilitati
242
+ const id = customContextMenuOnEmptyArea ? undefined : (focusedRowEnabled ? focusedRowKey : rowID);
226
243
  if (item.operationType === 'singleRow') {
227
244
  disabledCalculation = selectedRowKeys.length > 1 || id === undefined;
228
245
  }
@@ -237,7 +254,10 @@ const TMDataGrid = React.forwardRef((props, ref) => {
237
254
  if (item.operationType === 'singleRow' && id !== undefined) {
238
255
  originalOnClick(id);
239
256
  }
240
- else if (item.operationType === 'multiRow' && id !== undefined) {
257
+ else if (item.operationType === 'multiRow' && (selectedRowKeys.length > 0 || id !== undefined)) {
258
+ // Condizione allineata a quella di disabilitazione: con righe selezionate il comando è
259
+ // attivo anche senza riga di riferimento (es. menu aperto su spazio vuoto), quindi qui
260
+ // devono comunque essere passate le chiavi selezionate e non un onClick senza argomenti
241
261
  if (selectedRowKeys.length > 0) {
242
262
  originalOnClick(selectedRowKeys);
243
263
  }
@@ -252,7 +272,7 @@ const TMDataGrid = React.forwardRef((props, ref) => {
252
272
  submenu: item.submenu ? processCustomContextMenuItems(item.submenu, id) : undefined,
253
273
  };
254
274
  });
255
- }, [focusedRowEnabled, focusedRowKey, selectedRowKeys]);
275
+ }, [focusedRowEnabled, focusedRowKey, selectedRowKeys, customContextMenuOnEmptyArea]);
256
276
  // Gestisce la preparazione del menu contestuale della griglia (header e righe)
257
277
  const onContextMenuPreparingCallback = useCallback((e) => {
258
278
  if (e === undefined)
@@ -325,12 +345,33 @@ const TMDataGrid = React.forwardRef((props, ref) => {
325
345
  }
326
346
  }, 100);
327
347
  }
328
- }, [onContentReady, showSearchPanel, searchPanelFocusTrigger]);
348
+ /* Applicando il testo la griglia ricostruisce la propria barra di intestazione, e con essa la casella di
349
+ ricerca: senza rimettere il fuoco si dovrebbe cliccare di nuovo nella casella per continuare a scrivere.
350
+ Il rinvio serve ad agire sulla casella definitiva, non su quella che sta per essere sostituita. */
351
+ if (restoreSearchPanelFocusRef.current) {
352
+ restoreSearchPanelFocusRef.current = false;
353
+ setTimeout(() => {
354
+ const searchInput = getSearchPanelInput();
355
+ if (!searchInput || document.activeElement === searchInput)
356
+ return;
357
+ searchInput.focus();
358
+ // Il cursore va in fondo al testo già digitato: si continua a scrivere da dove si era rimasti
359
+ const caretPosition = searchInput.value.length;
360
+ searchInput.setSelectionRange(caretPosition, caretPosition);
361
+ }, 0);
362
+ }
363
+ }, [onContentReady, showSearchPanel, searchPanelFocusTrigger, getSearchPanelInput]);
329
364
  const onOptionChangedCallback = useCallback((e) => {
330
365
  // Assicurati che component esista
331
366
  const grid = e.component;
332
367
  if (!grid)
333
368
  return;
369
+ // Il testo digitato viene confermato dopo una pausa: se il fuoco è ancora nella casella, va conservato.
370
+ // Senza la casella a video non c'è nulla da riportare a fuoco: il testo può cambiare solo da codice
371
+ if (keepSearchPanelFocus && showSearchPanel && e.fullName === 'searchPanel.text') {
372
+ const searchInput = getSearchPanelInput();
373
+ restoreSearchPanelFocusRef.current = !!searchInput && document.activeElement === searchInput;
374
+ }
334
375
  // Controlla se il cambiamento riguarda i filtri
335
376
  const isFilterChange = e.fullName === 'filterValue' || (e.fullName?.startsWith('columns') && e.fullName.endsWith('filterValues'));
336
377
  if (isFilterChange) {
@@ -357,27 +398,266 @@ const TMDataGrid = React.forwardRef((props, ref) => {
357
398
  }
358
399
  // Propaga l'evento originale
359
400
  onOptionChanged?.(e);
360
- }, [onOptionChanged, onHasFiltersChange]);
361
- return _jsxs("div", { style: { width: "100%", height: "100%" }, children: [_jsx("div", { ref: gridContainerRef, style: { width: "100%", height: counterConfig.show ? "calc(100% - 25px)" : "100%" }, children: _jsxs(DataGrid, { ref: internalRef, id: id, className: `tm-datagrid ${hasFilters ? 'has-filters' : ''}`,
401
+ }, [onOptionChanged, onHasFiltersChange, keepSearchPanelFocus, showSearchPanel, getSearchPanelInput]);
402
+ /* Ricreare questo oggetto a ogni render lo farebbe leggere come un cambiamento da devextreme-react, che confronta
403
+ le opzioni per riferimento: ogni cambio di headerFilter invalida la barra di intestazione della griglia, cioè
404
+ proprio dove sta la casella di ricerca. Tenendolo stabile la barra viene ricostruita solo quando serve davvero. */
405
+ const headerFilterSearch = useMemo(() => ({ enabled: true, ...headerFilter?.search }), [headerFilter?.search]);
406
+ // In modalità compatta il pager usa il displayMode 'compact' di DevExtreme (page numbers sostituiti da "pagina / totale"),
407
+ // salvo displayMode esplicito passato dal chiamante
408
+ const effectivePager = useMemo(() => {
409
+ if (!pager || !compactPager)
410
+ return pager;
411
+ return { ...pager, displayMode: pager.displayMode ?? 'compact' };
412
+ }, [pager, compactPager]);
413
+ return _jsxs(StyledDataGridContainer, { $compactPager: compactPager, style: { width: "100%", height: "100%" }, children: [_jsx(HeaderFilterMenuGlobalStyle, {}), _jsx("div", { ref: gridContainerRef, style: { width: "100%", height: counterConfig.show ? "calc(100% - 25px)" : "100%" }, children: _jsxs(DataGrid, { ref: internalRef, id: id, className: `tm-datagrid ${hasFilters ? 'has-filters' : ''}`,
362
414
  // main properties
363
415
  keyExpr: keyExpr, dataSource: dataSource, selectedRowKeys: selectedRowKeys, focusedRowEnabled: focusedRowEnabled, hoverStateEnabled: hoverStateEnabled,
364
416
  // events and callbacks
365
417
  onSelectionChanged: onSelectionChangedCallback, onRowDblClick: onRowDblClickCallback, onRowPrepared: onRowPrepared, onContextMenuPreparing: onContextMenuPreparingCallback, onToolbarPreparing: onToolbarPreparingCallback, onFocusedRowChanged: onFocusedRowChanged, onRowClick: onRowClick, onCellClick: onCellClick, onCellDblClick: onCellDblClick, onOptionChanged: onOptionChangedCallback, onContentReady: onContentReadyCallback, onInitialized: onInitialized, customizeColumns: customizeColumns, onEditorPreparing: onEditorPreparing, onCellPrepared: onCellPrepared, onRowUpdating: onRowUpdating, onRowExpanded: onRowExpanded, onRowCollapsed: onRowCollapsed, onRowUpdated: onRowUpdated, onSaved: onSaved, onEditCanceled: onEditCanceled, onEditingStart: onEditingStart, onEditingChange: onEditingChange, onKeyDown: onKeyDown,
366
418
  // other properties
367
- disabled: disabled, autoNavigateToFocusedRow: autoNavigateToFocusedRow, focusedRowKey: focusedRowKey, columnHidingEnabled: columnHidingEnabled, columnResizingMode: columnResizingMode, columnAutoWidth: columnAutoWidth, allowColumnResizing: allowColumnResizing, allowColumnReordering: allowColumnReordering, showBorders: showBorders, showRowLines: showRowLines, showColumnLines: showColumnLines, showColumnHeaders: showColumnHeaders, rowAlternationEnabled: rowAlternationEnabled, wordWrapEnabled: wordWrapEnabled, columnMinWidth: columnMinWidth, noDataText: noDataText,
419
+ disabled: disabled, autoNavigateToFocusedRow: autoNavigateToFocusedRow, focusedRowKey: focusedRowKey, columnHidingEnabled: columnHidingEnabled, columnResizingMode: columnResizingMode, columnAutoWidth: columnAutoWidth, allowColumnResizing: allowColumnResizing, allowColumnReordering: allowColumnReordering, showBorders: showBorders, showRowLines: showRowLines, showColumnLines: showColumnLines, showColumnHeaders: showColumnHeaders, rowAlternationEnabled: rowAlternationEnabled, repaintChangesOnly: repaintChangesOnly, wordWrapEnabled: wordWrapEnabled, columnMinWidth: columnMinWidth, noDataText: noDataText,
368
420
  // styles
369
421
  width: width, height: height, style: {
370
422
  userSelect: 'none',
371
423
  // Temporary: iOS-specific styles to prevent default long-press menu and text selection
372
424
  WebkitTouchCallout: 'none',
373
425
  WebkitUserSelect: 'none'
374
- }, children: [dataColumns.map((column, index) => (_jsx(Column, { ...column }, column.caption + index.toString()))), sorting && _jsx(Sorting, { ...sorting }), selection && _jsx(Selection, { ...selection }), scrolling && _jsx(Scrolling, { ...scrolling }), summary && _jsx(Summary, { ...summary }), showHeaderFilter && _jsx(HeaderFilter, { visible: true, ...headerFilter }), rowDragging && _jsx(RowDragging, { ...rowDragging }), filterRow && _jsx(FilterRow, { ...filterRow }), showFilterPanel && _jsx(FilterPanel, { visible: true }), showHeaderColumnChooser && _jsxs(ColumnChooser, { height: "400px", enabled: !showHeaderColumnChooser, mode: "select", children: [_jsx(Position, { my: "center", at: "center", of: window }), _jsx(ColumnChooserSearch, { enabled: true }), _jsx(ColumnChooserSelection, { allowSelectAll: false, selectByClick: true, recursive: true })] }), stateStoring && _jsx(StateStoring, { ...stateStoring }), groupPanel && _jsx(GroupPanel, { ...groupPanel }), _jsx(Grouping, { contextMenuEnabled: true, ...grouping }), _jsx(LoadPanel, { enabled: showLoadPanel }), _jsx(SearchPanel, { visible: showSearchPanel, searchVisibleColumnsOnly: true, highlightSearchText: true }), editing && _jsx(Editing, { ...editing }), paging && _jsx(Paging, { ...paging }), pager && _jsx(Pager, { ...pager, visible: totalRecordCount > pageSize }), masterDetail && _jsx(MasterDetail, { ...masterDetail })] }) }), counterConfig.show && _jsx("div", { style: { width: "100%", height: "25px", display: "flex", alignItems: "center", gap: "15px", backgroundColor: "#e0e0e0" }, children: _jsx(TMCounterContainer, { items: counterValues, bgColorContainer: counterConfig.bgColorContainer, bgColorItem: counterConfig.bgColorItem, hoverColorItem: counterConfig.hoverColorItem, textColorItem: counterConfig.textColorItem }) }), customContextMenuItems && (_jsx(TMContextMenu, { target: ".dx-data-row", items: processCustomContextMenuItems(customContextMenuItems, customContextMenuRowKey), externalControl: {
426
+ }, children: [dataColumns.map((column, index) => (_jsx(Column, { ...column, alignment: column.alignment ?? 'left' }, column.caption + index.toString()))), sorting && _jsx(Sorting, { ...sorting }), selection && _jsx(Selection, { ...selection }), scrolling && _jsx(Scrolling, { ...scrolling }), summary && _jsx(Summary, { ...summary }), showHeaderFilter && _jsx(HeaderFilter, { visible: true, ...headerFilter, search: headerFilterSearch }), rowDragging && _jsx(RowDragging, { ...rowDragging }), filterRow && _jsx(FilterRow, { ...filterRow }), showFilterPanel && _jsx(FilterPanel, { visible: true }), showHeaderColumnChooser && _jsxs(ColumnChooser, { height: "400px", enabled: !showHeaderColumnChooser, mode: "select", children: [_jsx(Position, { my: "center", at: "center", of: window }), _jsx(ColumnChooserSearch, { enabled: true }), _jsx(ColumnChooserSelection, { allowSelectAll: false, selectByClick: true, recursive: true })] }), stateStoring && _jsx(StateStoring, { ...stateStoring }), groupPanel && _jsx(GroupPanel, { ...groupPanel }), _jsx(Grouping, { contextMenuEnabled: true, ...grouping }), _jsx(LoadPanel, { enabled: showLoadPanel }), _jsx(SearchPanel, { visible: showSearchPanel, searchVisibleColumnsOnly: true, highlightSearchText: true }), editing && _jsx(Editing, { ...editing }), paging && _jsx(Paging, { ...paging }), effectivePager && _jsx(Pager, { ...effectivePager, visible: totalRecordCount > pageSize }), masterDetail && _jsx(MasterDetail, { ...masterDetail })] }) }), counterConfig.show && _jsx("div", { style: { width: "100%", height: "25px", display: "flex", alignItems: "center", gap: "15px", backgroundColor: "#e0e0e0" }, children: _jsx(TMCounterContainer, { items: counterValues, bgColorContainer: counterConfig.bgColorContainer, bgColorItem: counterConfig.bgColorItem, hoverColorItem: counterConfig.hoverColorItem, textColorItem: counterConfig.textColorItem }) }), customContextMenuItems && (_jsx(TMContextMenu, { target: ".dx-data-row", items: processCustomContextMenuItems(customContextMenuItems, customContextMenuRowKey), externalControl: {
375
427
  visible: customContextMenuVisible,
376
428
  position: customContextMenuPosition,
377
429
  onClose: () => setCustomContextMenuVisible(false)
378
430
  } }))] });
379
431
  });
380
432
  export default TMDataGrid;
433
+ // Contenitore della griglia: in modalità compatta riduce l'ingombro verticale del pager DevExtreme
434
+ // (padding, altezza minima, font e dimensione dei pulsanti di pagina).
435
+ // Con compactPager = false non emette nessuna regola: width/height restano inline come in precedenza,
436
+ // così il rendering è identico a quello del div originale.
437
+ const StyledDataGridContainer = styled.div `
438
+ ${({ $compactPager }) => $compactPager && css `
439
+ & .dx-datagrid-pager {
440
+ padding: 2px 4px !important;
441
+ min-height: 0 !important;
442
+ font-size: 11px;
443
+ }
444
+
445
+ & .dx-datagrid-pager .dx-page,
446
+ & .dx-datagrid-pager .dx-page-size,
447
+ & .dx-datagrid-pager .dx-selection,
448
+ & .dx-datagrid-pager .dx-navigate-button {
449
+ min-width: 18px !important;
450
+ min-height: 18px !important;
451
+ height: auto !important;
452
+ padding: 1px 5px !important;
453
+ line-height: 16px !important;
454
+ font-size: 11px;
455
+ }
456
+
457
+ & .dx-datagrid-pager .dx-pages,
458
+ & .dx-datagrid-pager .dx-page-sizes,
459
+ & .dx-datagrid-pager .dx-info,
460
+ & .dx-datagrid-pager .dx-page-index,
461
+ & .dx-datagrid-pager .dx-pages .dx-info {
462
+ font-size: 11px;
463
+ margin-top: 0 !important;
464
+ margin-bottom: 0 !important;
465
+ }
466
+
467
+ & .dx-datagrid-pager .dx-info {
468
+ margin-left: 4px !important;
469
+ margin-right: 4px !important;
470
+ }
471
+
472
+ /* Editor del numero di pagina (displayMode compact) */
473
+ & .dx-datagrid-pager .dx-page-index .dx-texteditor-input,
474
+ & .dx-datagrid-pager .dx-page-sizes .dx-texteditor-input {
475
+ min-height: 18px !important;
476
+ height: 18px !important;
477
+ padding: 0 4px !important;
478
+ font-size: 11px;
479
+ }
480
+ `}
481
+ `;
482
+ // Stile del pannello del filtro d'intestazione (ricerca, elenco valori, OK/Annulla).
483
+ // Il popup è in portale sul body, fuori da StyledDataGridContainer: le regole sono globali
484
+ // ma tutte sotto .dx-header-filter-menu, classe che DevExtreme applica solo a questo popup.
485
+ const HeaderFilterMenuGlobalStyle = createGlobalStyle `
486
+ .dx-header-filter-menu {
487
+
488
+ &.dx-popup-wrapper > .dx-overlay-content.dx-popup-normal {
489
+ border: 1px solid #E4E8EE;
490
+ border-radius: 8px;
491
+ box-shadow: 0 2px 6px rgba(18, 44, 76, .08), 0 12px 28px rgba(18, 44, 76, .14);
492
+ overflow: hidden;
493
+ }
494
+
495
+ &.dx-popup-wrapper .dx-popup-content {
496
+ padding: 10px 10px 4px;
497
+ }
498
+
499
+ /* Campo di ricerca: TextBox mode "search" resa da List o da TreeView (filtri gerarchici) */
500
+ .dx-searchbox.dx-list-search,
501
+ .dx-searchbox.dx-treeview-search {
502
+ margin-bottom: 8px;
503
+ border-radius: 6px;
504
+ border: 1px solid #CDD2D8;
505
+ background-color: #F4F6F9;
506
+ box-shadow: none;
507
+ transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
508
+
509
+ /* fluent disegna qui la barretta di focus, sostituita da bordo + alone */
510
+ &::before,
511
+ &::after {
512
+ display: none;
513
+ }
514
+
515
+ &.dx-state-hover:not(.dx-state-focused) {
516
+ border-color: #AEB6C1;
517
+ background-color: #EEF2F7;
518
+ }
519
+
520
+ &.dx-state-focused {
521
+ border-color: #2559A5;
522
+ background-color: #FFFFFF;
523
+ box-shadow: 0 0 0 2px rgba(37, 89, 165, .16);
524
+ }
525
+
526
+ .dx-icon-search {
527
+ width: 28px;
528
+ color: #8A929B;
529
+ transition: color .15s ease;
530
+ }
531
+
532
+ &.dx-state-focused .dx-icon-search {
533
+ color: #2559A5;
534
+ }
535
+
536
+ .dx-texteditor-input {
537
+ min-height: 28px;
538
+ padding-inline-start: 28px;
539
+ padding-inline-end: 8px;
540
+ font-size: 12px;
541
+ background-color: transparent;
542
+ }
543
+
544
+ .dx-placeholder {
545
+ color: #9AA3AD;
546
+ font-size: 12px;
547
+
548
+ &::before {
549
+ padding-inline-start: 28px;
550
+ padding-inline-end: 8px;
551
+ }
552
+ }
553
+
554
+ .dx-clear-button-area .dx-icon-clear {
555
+ color: #8A929B;
556
+ transition: color .15s ease;
557
+ }
558
+
559
+ .dx-clear-button-area:hover .dx-icon-clear {
560
+ color: #2559A5;
561
+ }
562
+ }
563
+
564
+ .dx-list-item {
565
+ border-radius: 4px;
566
+ transition: background-color .12s ease;
567
+ }
568
+
569
+ .dx-list-item-content {
570
+ padding: 4px 6px;
571
+ }
572
+
573
+ .dx-list-item.dx-state-hover,
574
+ .dx-list-item.dx-state-focused {
575
+ background-color: #F1F6FD;
576
+ color: #122C4C;
577
+ }
578
+
579
+ .dx-list-select-all {
580
+ padding: 2px 0 6px;
581
+ margin-bottom: 4px;
582
+ border-bottom: 1px solid #ECEFF3;
583
+ }
584
+
585
+ .dx-list-select-all-label {
586
+ font-weight: 600;
587
+ color: #122C4C;
588
+ }
589
+
590
+ .dx-checkbox-checked .dx-checkbox-icon,
591
+ .dx-checkbox-indeterminate .dx-checkbox-icon {
592
+ border-color: #2559A5;
593
+ background-color: #2559A5;
594
+ }
595
+
596
+ .dx-checkbox.dx-state-hover:not(.dx-checkbox-checked) .dx-checkbox-icon {
597
+ border-color: #2559A5;
598
+ }
599
+
600
+ /* il :not() lascia intatto il fade-out nativo della scrollbar */
601
+ .dx-scrollable-scroll:not(.dx-state-invisible) .dx-scrollable-scroll-content {
602
+ background-color: rgba(18, 44, 76, .28);
603
+ border-radius: 3px;
604
+ }
605
+
606
+ &.dx-popup-wrapper .dx-popup-bottom.dx-toolbar {
607
+ padding: 8px 10px 10px;
608
+ border-top: 1px solid #ECEFF3;
609
+ }
610
+
611
+ .dx-popup-bottom .dx-button {
612
+ border-radius: 5px;
613
+ min-width: 76px;
614
+ margin: 0;
615
+ }
616
+
617
+ .dx-popup-bottom .dx-toolbar-button + .dx-toolbar-button {
618
+ margin-inline-start: 6px;
619
+
620
+ .dx-button {
621
+ margin: 0;
622
+ }
623
+ }
624
+
625
+ /* DevExtreme aggiunge prima OK e poi Annulla: individuarli per posizione li rende indipendenti dalla lingua */
626
+ .dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button:first-child .dx-button {
627
+ border-color: transparent;
628
+ background-color: #2559A5;
629
+
630
+ .dx-button-text {
631
+ color: #FFFFFF;
632
+ }
633
+
634
+ &.dx-state-hover {
635
+ background-color: #1E4A8C;
636
+ }
637
+
638
+ &.dx-state-active {
639
+ background-color: #1A3F78;
640
+ }
641
+ }
642
+
643
+ .dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button + .dx-toolbar-button .dx-button {
644
+ border-color: transparent;
645
+ background-color: transparent;
646
+
647
+ .dx-button-text {
648
+ color: #44506B;
649
+ }
650
+
651
+ &.dx-state-hover {
652
+ background-color: #F0F3F7;
653
+ }
654
+
655
+ &.dx-state-active {
656
+ background-color: #E6EBF2;
657
+ }
658
+ }
659
+ }
660
+ `;
381
661
  const getRecordCount = (dataSource) => {
382
662
  if (Array.isArray(dataSource)) {
383
663
  return dataSource.length; // For array
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { IColumnProps } from 'devextreme-react/data-grid';
2
3
  import { SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
3
4
  export type FormatOption = {
@@ -11,5 +12,5 @@ interface TMDataGridExportFormProps {
11
12
  selectedRowKeys: Array<number>;
12
13
  onCloseExportForm: () => void;
13
14
  }
14
- declare const TMDataGridExportForm: (props: TMDataGridExportFormProps) => import("react/jsx-runtime").JSX.Element;
15
+ declare const TMDataGridExportForm: (props: TMDataGridExportFormProps) => React.JSX.Element;
15
16
  export default TMDataGridExportForm;
@@ -43,6 +43,6 @@ const TMDropDownMenu = forwardRef(({ content, items, disabled = false, color = T
43
43
  submenu: item.items ? convertToContextMenuItems(item.items) : undefined,
44
44
  }));
45
45
  };
46
- return (_jsx(TMContextMenu, { items: convertToContextMenuItems(items), trigger: "left", children: _jsx(StyledContent, { ref: dropDownMenuElementRef, tabIndex: disabled ? -1 : 0, "$disabled": disabled, "$color": color, "$backgroundColor": backgroundColor, "$borderRadius": borderRadius, children: content }) }));
46
+ return (_jsx(TMContextMenu, { items: convertToContextMenuItems(items), trigger: "left", children: _jsx(StyledContent, { ref: dropDownMenuElementRef, tabIndex: disabled ? -1 : 0, $disabled: disabled, $color: color, $backgroundColor: backgroundColor, $borderRadius: borderRadius, children: content }) }));
47
47
  });
48
48
  export default TMDropDownMenu;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { ValidationItem } from "@topconsultnpm/sdk-ts";
2
3
  export type Colors = 'error' | 'warning' | 'success' | 'info' | 'primary' | 'secondary' | 'tertiary' | 'standard';
3
4
  type IconModes = 'outside' | 'inside' | 'none';
@@ -6,6 +7,7 @@ export type Sizes = 'small' | 'medium' | 'large';
6
7
  export type TMEditorButtonData = {
7
8
  icon: any;
8
9
  text?: string;
10
+ tooltipContent?: React.ReactNode;
9
11
  onClick?: () => void;
10
12
  };
11
13
  export interface ITMEditorBase {
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { FileItem } from "./TMFileManagerUtils";
2
3
  import { TMContextMenuItemProps } from '../NewComponents/ContextMenu/types';
3
4
  interface TMFileManagerProps {
@@ -42,5 +43,5 @@ interface TMFileManagerProps {
42
43
  /** Optional: Callback to handle back button */
43
44
  onMaximizePanel?: () => void;
44
45
  }
45
- declare const TMFileManager: (props: TMFileManagerProps) => import("react/jsx-runtime").JSX.Element;
46
+ declare const TMFileManager: (props: TMFileManagerProps) => React.JSX.Element;
46
47
  export default TMFileManager;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useMemo, useState } from "react";
3
- import { extractTextsFromDirectory, findFileItems, setFolderTreeViewItems } from "./TMFileManagerUtils";
3
+ import { extractTextsFromDirectory, findFileItems, resolveFileItemUserNames, setFolderTreeViewItems } from "./TMFileManagerUtils";
4
4
  import { DeviceType, useDeviceType } from "./TMDeviceProvider";
5
5
  import { formatBytes, Globalization, IconDashboard, IconFolder, IconHide, IconList, IconMenuVertical, IconRefresh, IconShow, SDKUI_Globals, SDKUI_Localizator, TMCommandsContextMenu, TMConditionalWrapper } from "../../helper";
6
6
  import TMContextMenu from '../NewComponents/ContextMenu/TMContextMenu';
@@ -91,10 +91,12 @@ const TMFileManager = (props) => {
91
91
  (Globalization.getDateTimeDisplayValue(item.lastUpdateTime)?.toLowerCase().toString().includes(searchText.toLowerCase().trim())) ||
92
92
  (Globalization.getDateTimeDisplayValue(item.creationTime)?.toLowerCase().toString().includes(searchText.toLowerCase().trim())) ||
93
93
  (item.version?.toString().includes(searchText.toLowerCase().trim()))));
94
- setFilteredFileItems(filtered);
94
+ // I nomi utente possono mancare quando la lista viene ricostruita senza i partecipanti
95
+ // (es. refresh dopo la condivisione di un file): vengono risolti qui dagli ID
96
+ setFilteredFileItems(filtered.map(item => resolveFileItemUserNames(item, allUsers)));
95
97
  };
96
98
  filterItems();
97
- }, [searchText, selectedFolder]);
99
+ }, [searchText, selectedFolder, allUsers]);
98
100
  // Callback to handle the "back" action (closing the draft list view)
99
101
  const onBackCallback = useCallback(() => {
100
102
  setOpenDraftList(false);
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { FileItem } from "./TMFileManagerUtils";
2
3
  import { UserDescriptor } from "@topconsultnpm/sdk-ts";
3
4
  import { TMContextMenuItemProps } from "../NewComponents/ContextMenu/types";
@@ -13,5 +14,5 @@ interface TMFileManagerDataGridViewProps {
13
14
  userID?: number;
14
15
  onDoubleClickHandler?: (fileItem: FileItem | undefined) => void;
15
16
  }
16
- declare const TMFileManagerDataGridView: (props: TMFileManagerDataGridViewProps) => import("react/jsx-runtime").JSX.Element;
17
+ declare const TMFileManagerDataGridView: (props: TMFileManagerDataGridViewProps) => React.JSX.Element;
17
18
  export default TMFileManagerDataGridView;
@@ -1,5 +1,6 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useMemo, useState } from "react";
3
+ import { getFileItemLinkUrl } from "./TMFileManagerUtils";
3
4
  import { formatBytes, Globalization, renderHighlightedText, SDKUI_Localizator } from "../../helper";
4
5
  import TMDataGrid from "./TMDataGrid";
5
6
  import TMDcmtIcon from "../features/documents/TMDcmtIcon";
@@ -43,6 +44,12 @@ const TMFileManagerDataGridView = (props) => {
43
44
  }, [handleSelectedFiles]);
44
45
  // Handler for double-click cell event
45
46
  const onCellDblClick = useCallback((e) => {
47
+ // i link non hanno un documento da aprire: il doppio click (anche sull'icona dell'estensione) apre l'url in un nuovo tab
48
+ const linkUrl = getFileItemLinkUrl(e.data);
49
+ if (linkUrl) {
50
+ window.open(linkUrl, '_blank', 'noopener,noreferrer');
51
+ return;
52
+ }
46
53
  if (e.column.dataField === "ext")
47
54
  return;
48
55
  if (onDoubleClickHandler)
@@ -62,8 +69,10 @@ const TMFileManagerDataGridView = (props) => {
62
69
  }, [searchText, findCheckOutUserName]);
63
70
  const cellExtRender = useCallback((cellData) => {
64
71
  const item = cellData.data;
65
- const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Extension, ":"] }), " ", item.ext ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
66
- return _jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent, isSigned: item.isSigned });
72
+ const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Extension, ":"] }), " ", item.ext ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] }), item.description && _jsxs(_Fragment, { children: [_jsx("hr", {}), _jsxs("div", { style: { maxWidth: '400px', overflowWrap: 'anywhere' }, children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Description, ":"] }), " ", item.description] })] })] }));
73
+ // i link non hanno un file associato: l'icona non deve avviare il download
74
+ const isLink = getFileItemLinkUrl(item) !== undefined;
75
+ return _jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: isLink ? 'none' : 'openInNewWindow', tooltipContent: tooltipContent, isSigned: item.isSigned });
67
76
  }, []);
68
77
  const cellDatetimeRender = useCallback((cellData) => {
69
78
  if (!cellData.value)
@@ -20,5 +20,5 @@ export interface TMFileManagerThumbnailItemsProps {
20
20
  onDoubleClick?: (file: FileItem) => void;
21
21
  userID?: number;
22
22
  }
23
- declare const TMFileManagerThumbnailItems: (props: TMFileManagerThumbnailItemsProps) => import("react/jsx-runtime").JSX.Element;
23
+ declare const TMFileManagerThumbnailItems: (props: TMFileManagerThumbnailItemsProps) => React.JSX.Element;
24
24
  export default TMFileManagerThumbnailItems;
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useRef } from 'react';
3
- import { colors, TMFileItemContainer } from './TMFileManagerUtils';
3
+ import { colors, getFileItemLinkUrl, TMFileItemContainer } from './TMFileManagerUtils';
4
4
  import { formatBytes, Globalization, renderHighlightedText, SDKUI_Localizator } from '../../helper';
5
5
  import TMTooltip from './TMTooltip';
6
6
  import TMDcmtIcon from '../features/documents/TMDcmtIcon';
@@ -35,6 +35,16 @@ const TMFileManagerThumbnailItems = (props) => {
35
35
  }
36
36
  }
37
37
  }, [items, lastSelectedIndexRef.current]);
38
+ // Apre l'item: i link non hanno un documento da aprire, si apre direttamente l'url in un nuovo tab
39
+ const openFileItem = useCallback((item) => {
40
+ const linkUrl = getFileItemLinkUrl(item);
41
+ if (linkUrl) {
42
+ window.open(linkUrl, '_blank', 'noopener,noreferrer');
43
+ return;
44
+ }
45
+ if (onDoubleClick)
46
+ onDoubleClick(item);
47
+ }, [onDoubleClick]);
38
48
  const handleKeyDown = useCallback((event) => {
39
49
  event.preventDefault();
40
50
  if (event.key === 'ArrowDown' && lastSelectedIndexRef.current !== null) {
@@ -44,21 +54,21 @@ const TMFileManagerThumbnailItems = (props) => {
44
54
  lastSelectedIndexRef.current = currentIndex;
45
55
  }
46
56
  }
47
- if (event.key === 'Enter' && selectedFiles.length === 1 && onDoubleClick) {
57
+ if (event.key === 'Enter' && selectedFiles.length === 1) {
48
58
  const currentItem = items.find(item => item.id === selectedFiles[0].id);
49
59
  if (currentItem)
50
- onDoubleClick(currentItem);
60
+ openFileItem(currentItem);
51
61
  }
52
- }, [items, lastSelectedIndexRef.current, selectedFiles]);
62
+ }, [items, lastSelectedIndexRef.current, selectedFiles, openFileItem]);
53
63
  // Double click handler with timeout cleanup
54
64
  const onDoubleClickHandler = useCallback((item) => {
55
65
  if (clickTimeoutRef.current) {
56
66
  clearTimeout(clickTimeoutRef.current);
57
67
  clickTimeoutRef.current = null;
58
68
  }
59
- if (onDoubleClick && item)
60
- onDoubleClick(item);
61
- }, [onDoubleClick]);
69
+ if (item)
70
+ openFileItem(item);
71
+ }, [openFileItem]);
62
72
  const onClickHandler = useCallback((e, item) => {
63
73
  // If a click timeout is already running, clear it (distinguish between single and double clicks)
64
74
  if (clickTimeoutRef.current) {
@@ -144,8 +154,8 @@ const TMFileManagerThumbnailItems = (props) => {
144
154
  bgHoverColor = isSelected ? colors.PRIMARY_BLUE : "#fff59d";
145
155
  }
146
156
  const editLockTooltipText = _jsxs(_Fragment, { children: [_jsxs("div", { style: { textAlign: "center" }, children: [editMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-edit" }), SDKUI_Localizator.CurrentUserExtract] })), lockMode && (_jsxs(_Fragment, { children: [_jsx("i", { style: { fontSize: "18px", color: colors.MEDIUM_GREEN, fontWeight: "bold" }, className: "dx-icon-lock" }), SDKUI_Localizator.ExtractedFromOtherUser] }))] }), _jsx("hr", {}), _jsxs("div", { style: { textAlign: "left" }, children: [_jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedBy }), ": ", findCheckOutUserName(item) ?? '-', " (ID: ", item.checkOutUserID, ")"] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.ExtractedOn }), ": ", Globalization.getDateTimeDisplayValue(item.checkoutDate?.toString())] })] }), _jsx("hr", {}), _jsx("ul", { children: _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Version }), ": ", item.version ?? 1] }) }), _jsx("hr", {}), _jsxs("ul", { children: [_jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.Extension }), ": ", item.ext] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.CreationTime }), ": ", Globalization.getDateTimeDisplayValue(item.creationTime?.toString())] }), _jsxs("li", { children: ["- ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDKUI_Localizator.LastUpdateTime }), ": ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime?.toString())] })] })] })] });
147
- const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Extension, ":"] }), " ", item.ext ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] })] }));
148
- return _jsx(TMFileItemContainer, { className: "tm-file-manager-thumbnail-items", ref: containerRef, id: "tm-file-manager-thumbnail-item-" + item.id.toString(), "$backgroundColor": bgColor, "$bgHoverColor": bgHoverColor, "$textColor": textColor, onDoubleClick: () => onDoubleClickHandler(item), onContextMenu: (e) => onContextMenu(e, item), onClick: (e) => onClickHandler(e, item), tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { marginRight: '16px', flexShrink: 0, display: 'flex', flexDirection: 'column', alignItems: 'center' }, children: [_jsx("div", { style: { width: '40px' }, children: _jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent, isSigned: item.isSigned }) }), _jsxs("div", { style: { display: 'flex', justifyContent: 'center', width: '40px' }, children: [editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-lock" }) })] })] }), _jsxs("div", { style: { overflow: 'hidden', minWidth: 0 }, children: [_jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: '1rem', fontWeight: "bold" }, children: _jsx(TMTooltip, { parentStyle: { overflow: 'hidden' }, childStyle: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block' }, children: renderHighlightedText(item.name, searchText, isSelected) }) }), _jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: 'calc(1rem - 1px)' }, children: formatBytes(item.size ?? 0) })] })] }), item.version && (_jsx("div", { style: { flexShrink: 0, marginLeft: '12px', whiteSpace: 'nowrap' }, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: _jsx("div", { style: { border: "2px solid #28a745", backgroundColor: "#28a745", color: "#ffffff", borderRadius: '50%', width: '30px', height: '30px', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '12px', fontWeight: 'bold' }, children: item.version }) }) }))] }) }, "tm-file-manager-thumbnail-item-" + item.id);
157
+ const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", item.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", item.did ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", item.tid ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Name, ":"] }), " ", item.name ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Extension, ":"] }), " ", item.ext ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", item.updaterName ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", item.version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(item.size ?? 0)] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.creationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(item.lastUpdateTime)] }), item.description && _jsxs(_Fragment, { children: [_jsx("hr", {}), _jsxs("div", { style: { maxWidth: '400px', overflowWrap: 'anywhere' }, children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Description, ":"] }), " ", item.description] })] })] }));
158
+ return _jsx(TMFileItemContainer, { className: "tm-file-manager-thumbnail-items", ref: containerRef, id: "tm-file-manager-thumbnail-item-" + item.id.toString(), $backgroundColor: bgColor, $bgHoverColor: bgHoverColor, $textColor: textColor, onDoubleClick: () => onDoubleClickHandler(item), onContextMenu: (e) => onContextMenu(e, item), onClick: (e) => onClickHandler(e, item), tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, children: _jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { marginRight: '16px', flexShrink: 0, display: 'flex', flexDirection: 'column', alignItems: 'center' }, children: [_jsx("div", { style: { width: '40px' }, children: _jsx(TMDcmtIcon, { tid: item.tid, did: item.did, fileExtension: item.ext, downloadMode: getFileItemLinkUrl(item) !== undefined ? 'none' : 'openInNewWindow', tooltipContent: tooltipContent, isSigned: item.isSigned }) }), _jsxs("div", { style: { display: 'flex', justifyContent: 'center', width: '40px' }, children: [editMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-edit" }) }), lockMode && _jsx(TMTooltip, { content: editLockTooltipText, children: _jsx("i", { style: { fontSize: "18px", color: !isSelected ? colors.MEDIUM_GREEN : '#fff', fontWeight: "bold" }, className: "dx-icon-lock" }) })] })] }), _jsxs("div", { style: { overflow: 'hidden', minWidth: 0 }, children: [_jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: '1rem', fontWeight: "bold" }, children: _jsx(TMTooltip, { parentStyle: { overflow: 'hidden' }, childStyle: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block' }, children: renderHighlightedText(item.name, searchText, isSelected) }) }), _jsx("div", { style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '100%', display: 'block', fontSize: 'calc(1rem - 1px)' }, children: formatBytes(item.size ?? 0) })] })] }), item.version && (_jsx("div", { style: { flexShrink: 0, marginLeft: '12px', whiteSpace: 'nowrap' }, children: _jsx(TMTooltip, { content: SDKUI_Localizator.Version, children: _jsx("div", { style: { border: "2px solid #28a745", backgroundColor: "#28a745", color: "#ffffff", borderRadius: '50%', width: '30px', height: '30px', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '12px', fontWeight: 'bold' }, children: item.version }) }) }))] }) }, "tm-file-manager-thumbnail-item-" + item.id);
149
159
  }) });
150
160
  };
151
161
  export default TMFileManagerThumbnailItems;