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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) 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 +21 -45
  4. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +6 -6
  5. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +37 -89
  6. package/lib/components/base/Styled.d.ts +40 -76
  7. package/lib/components/base/TMAccordionNew.js +7 -7
  8. package/lib/components/base/TMAlert.d.ts +32 -32
  9. package/lib/components/base/TMAreaManager.js +1 -1
  10. package/lib/components/base/TMButton.js +4 -4
  11. package/lib/components/base/TMClosableList.js +3 -3
  12. package/lib/components/base/TMCustomButton.js +1 -1
  13. package/lib/components/base/TMDataGrid.d.ts +2 -0
  14. package/lib/components/base/TMDataGrid.js +260 -8
  15. package/lib/components/base/TMDropDownMenu.js +1 -1
  16. package/lib/components/base/TMEditorBase.d.ts +2 -0
  17. package/lib/components/base/TMFileManager.js +5 -3
  18. package/lib/components/base/TMFileManagerDataGridView.js +12 -3
  19. package/lib/components/base/TMFileManagerThumbnailItems.js +20 -10
  20. package/lib/components/base/TMFileManagerUtils.d.ts +4 -6
  21. package/lib/components/base/TMFileManagerUtils.js +37 -1
  22. package/lib/components/base/TMLayout.d.ts +2 -2
  23. package/lib/components/base/TMLayout.js +3 -3
  24. package/lib/components/base/TMList.js +1 -1
  25. package/lib/components/base/TMListView.js +3 -3
  26. package/lib/components/base/TMModal.d.ts +11 -0
  27. package/lib/components/base/TMModal.js +47 -13
  28. package/lib/components/base/TMPanel.d.ts +6 -0
  29. package/lib/components/base/TMPanel.js +141 -28
  30. package/lib/components/base/TMPopUp.js +5 -2
  31. package/lib/components/base/TMResizableMenu.js +2 -2
  32. package/lib/components/base/TMRightSidebar.js +1 -1
  33. package/lib/components/base/TMShowAllOrMaxItemsButton.js +1 -1
  34. package/lib/components/base/TMSpinner.js +2 -2
  35. package/lib/components/base/TMTab.js +2 -2
  36. package/lib/components/base/TMToggleButton.js +2 -2
  37. package/lib/components/base/TMToolbarCard.js +3 -3
  38. package/lib/components/base/TMTooltip.d.ts +2 -1
  39. package/lib/components/base/TMTooltip.js +24 -8
  40. package/lib/components/base/TMTreeView.d.ts +5 -7
  41. package/lib/components/base/TMTreeView.js +110 -69
  42. package/lib/components/base/TMWaitPanel.js +2 -2
  43. package/lib/components/choosers/TMCultureIDPicker.js +2 -2
  44. package/lib/components/choosers/TMDataListItemChooser.js +1 -1
  45. package/lib/components/choosers/TMDataListItemPicker.js +2 -2
  46. package/lib/components/choosers/TMDcmtTypeChooser.js +5 -4
  47. package/lib/components/choosers/TMDiskChooser.js +1 -1
  48. package/lib/components/choosers/TMDistinctValues.d.ts +9 -7
  49. package/lib/components/choosers/TMDistinctValues.js +150 -143
  50. package/lib/components/choosers/TMDynDataListItemChooser.js +1 -1
  51. package/lib/components/choosers/TMImageIDChooser.js +1 -1
  52. package/lib/components/choosers/TMMetadataChooser.js +3 -3
  53. package/lib/components/choosers/TMQuickSearchInfo.d.ts +12 -0
  54. package/lib/components/choosers/TMQuickSearchInfo.js +279 -0
  55. package/lib/components/choosers/TMQuickSearchSettingsForm.d.ts +16 -0
  56. package/lib/components/choosers/TMQuickSearchSettingsForm.js +94 -0
  57. package/lib/components/choosers/TMRelationChooser.js +1 -1
  58. package/lib/components/choosers/TMSelectedValuesSummary.d.ts +13 -0
  59. package/lib/components/choosers/TMSelectedValuesSummary.js +89 -0
  60. package/lib/components/choosers/TMUserChooser.js +1 -1
  61. package/lib/components/editors/TMCheckBox.js +1 -1
  62. package/lib/components/editors/TMDropDown.d.ts +3 -0
  63. package/lib/components/editors/TMDropDown.js +197 -5
  64. package/lib/components/editors/TMEditorStyled.d.ts +11 -43
  65. package/lib/components/editors/TMFormulaEditor.js +1 -1
  66. package/lib/components/editors/TMHtmlContentDisplay.js +1 -1
  67. package/lib/components/editors/TMLocalizedTextBox.js +1 -1
  68. package/lib/components/editors/TMMetadataValues.js +2 -2
  69. package/lib/components/editors/TMRadioButton.js +2 -2
  70. package/lib/components/editors/TMSummary.js +3 -3
  71. package/lib/components/editors/TMTextArea.js +3 -3
  72. package/lib/components/editors/TMTextBox.js +3 -3
  73. package/lib/components/editors/TMTextExpression.js +1 -1
  74. package/lib/components/features/archive/TMArchive.js +17 -3
  75. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
  76. package/lib/components/features/assistant/TMToppySpeechBubble.js +1 -1
  77. package/lib/components/features/documents/TMBatchUpdateForm.js +20 -6
  78. package/lib/components/features/documents/TMDcmtBlog.d.ts +3 -0
  79. package/lib/components/features/documents/TMDcmtBlog.js +4 -4
  80. package/lib/components/features/documents/TMDcmtForm.d.ts +7 -0
  81. package/lib/components/features/documents/TMDcmtForm.js +180 -53
  82. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +11 -0
  83. package/lib/components/features/documents/TMDcmtFormActionButtons.js +79 -9
  84. package/lib/components/features/documents/TMDcmtIcon.js +5 -3
  85. package/lib/components/features/documents/TMDcmtPreview.d.ts +3 -5
  86. package/lib/components/features/documents/TMDcmtPreview.js +12 -8
  87. package/lib/components/features/documents/TMDownloadRelationViewerSection.js +1 -1
  88. package/lib/components/features/documents/TMFileUploader.js +3 -3
  89. package/lib/components/features/documents/TMMasterDetailDcmts.js +96 -34
  90. package/lib/components/features/documents/TMMasterInfoFields.d.ts +19 -0
  91. package/lib/components/features/documents/TMMasterInfoFields.js +184 -0
  92. package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
  93. package/lib/components/features/documents/TMMergeToPdfForm.js +30 -5
  94. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +45 -0
  95. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +323 -0
  96. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +370 -0
  97. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +283 -0
  98. package/lib/components/features/documents/TMRelationViewer.d.ts +14 -1
  99. package/lib/components/features/documents/TMRelationViewer.js +71 -22
  100. package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +1 -1
  101. package/lib/components/features/search/TMMetadataOutputForm.js +1 -1
  102. package/lib/components/features/search/TMMetadataSorterForm.js +1 -1
  103. package/lib/components/features/search/TMSavedQuerySelector.js +2 -2
  104. package/lib/components/features/search/TMSearch.js +78 -12
  105. package/lib/components/features/search/TMSearchQueryEditor.js +7 -5
  106. package/lib/components/features/search/TMSearchQueryPanel.d.ts +7 -3
  107. package/lib/components/features/search/TMSearchQueryPanel.js +142 -68
  108. package/lib/components/features/search/TMSearchResult.d.ts +16 -0
  109. package/lib/components/features/search/TMSearchResult.js +431 -110
  110. package/lib/components/features/search/TMSignatureInfoContent.js +1 -1
  111. package/lib/components/features/search/TMTreeSelector.js +109 -64
  112. package/lib/components/features/tasks/TMTaskForm.js +1 -1
  113. package/lib/components/features/tasks/TMTaskFormUtils.js +3 -3
  114. package/lib/components/features/tasks/TMTasksAgenda.js +1 -1
  115. package/lib/components/features/tasks/TMTasksCalendar.js +1 -1
  116. package/lib/components/features/tasks/TMTasksHeader.js +1 -1
  117. package/lib/components/features/tasks/TMTasksUtilsView.js +1 -1
  118. package/lib/components/features/tasks/TMTasksView.js +4 -4
  119. package/lib/components/features/wg/TMWGsCopyMoveForm.js +1 -1
  120. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +10 -0
  121. package/lib/components/features/workflow/TMWorkflowPopup.js +9 -5
  122. package/lib/components/features/workflow/diagram/ConnectionComponent.js +3 -3
  123. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +3 -3
  124. package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
  125. package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +1 -1
  126. package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
  127. package/lib/components/features/workflow/diagram/WFDiagram.js +4 -4
  128. package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +1 -1
  129. package/lib/components/forms/Login/ChangePasswordInputs.d.ts +1 -1
  130. package/lib/components/forms/Login/Menu.js +1 -1
  131. package/lib/components/forms/Login/OTPReader.js +1 -1
  132. package/lib/components/forms/Login/PasswordStrengthChecker.js +1 -1
  133. package/lib/components/forms/Login/RapidAccessLogin.js +2 -2
  134. package/lib/components/forms/Login/RecoverPasswordFlow.js +2 -2
  135. package/lib/components/forms/Login/SelectBox.js +1 -1
  136. package/lib/components/forms/Login/StepIndicator.js +1 -1
  137. package/lib/components/forms/Login/TMLoginForm.js +7 -7
  138. package/lib/components/forms/Login/TextBox.js +1 -1
  139. package/lib/components/forms/TMApplyForm.js +3 -3
  140. package/lib/components/forms/TMChooserForm.js +1 -1
  141. package/lib/components/forms/TMSaveForm.js +3 -3
  142. package/lib/components/grids/TMBlogAttachments.js +14 -3
  143. package/lib/components/grids/TMBlogHeader.js +5 -1
  144. package/lib/components/grids/TMBlogsPost.d.ts +2 -0
  145. package/lib/components/grids/TMBlogsPost.js +31 -4
  146. package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
  147. package/lib/components/grids/TMBlogsPostUtils.js +15 -4
  148. package/lib/components/grids/TMRecentsManager.js +4 -4
  149. package/lib/components/grids/TMValidationItemsList.js +1 -1
  150. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
  151. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +25 -15
  152. package/lib/components/layout/panelManager/TMPanelManagerContext.js +68 -93
  153. package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +2 -5
  154. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +1 -1
  155. package/lib/components/layout/panelManager/TMPanelWrapper.js +3 -3
  156. package/lib/components/layout/panelManager/types.d.ts +3 -0
  157. package/lib/components/layout/panelManager/utils.js +13 -11
  158. package/lib/components/pages/TMPage.js +1 -1
  159. package/lib/components/query/TMQueryCountButton.js +1 -1
  160. package/lib/components/query/TMQueryEditor.d.ts +6 -10
  161. package/lib/components/query/TMQueryEditor.js +7 -7
  162. package/lib/components/sidebar/TMCommandsPanel.d.ts +2 -4
  163. package/lib/components/sidebar/TMCommandsPanel.js +1 -1
  164. package/lib/components/sidebar/TMHeader.js +36 -26
  165. package/lib/components/sidebar/TMSidebar.js +1 -1
  166. package/lib/components/sidebar/TMSidebarItem.js +1 -1
  167. package/lib/components/viewers/TMMidViewer.js +6 -3
  168. package/lib/components/viewers/TMTidViewer.js +89 -28
  169. package/lib/components/wizard/TMStepIndicator.js +3 -3
  170. package/lib/css/tm-sdkui.css +1 -1
  171. package/lib/devextreme-license.d.ts +1 -0
  172. package/lib/devextreme-license.js +3 -0
  173. package/lib/helper/Enum_Localizator.d.ts +4 -4
  174. package/lib/helper/Globalization.d.ts +1 -1
  175. package/lib/helper/SDKUI_Globals.d.ts +110 -0
  176. package/lib/helper/SDKUI_Globals.js +151 -0
  177. package/lib/helper/SDKUI_Localizator.d.ts +731 -687
  178. package/lib/helper/SDKUI_Localizator.js +440 -0
  179. package/lib/helper/TMAppUpdatedModal.d.ts +1 -0
  180. package/lib/helper/TMAppUpdatedModal.js +134 -0
  181. package/lib/helper/TMIcons.d.ts +1 -0
  182. package/lib/helper/TMIcons.js +4 -3
  183. package/lib/helper/TMPdfViewer.js +1 -1
  184. package/lib/helper/TMToppyMessage.js +1 -1
  185. package/lib/helper/TMUtils.d.ts +16 -3
  186. package/lib/helper/TMUtils.js +25 -3
  187. package/lib/helper/checkinCheckoutManager.d.ts +1 -1
  188. package/lib/helper/checkinCheckoutManager.js +1 -1
  189. package/lib/helper/dataGridSearchHelper.d.ts +28 -0
  190. package/lib/helper/dataGridSearchHelper.js +51 -0
  191. package/lib/helper/dcmtsHelper.d.ts +20 -0
  192. package/lib/helper/dcmtsHelper.js +58 -1
  193. package/lib/helper/helpers.d.ts +12 -1
  194. package/lib/helper/helpers.js +27 -3
  195. package/lib/helper/index.d.ts +2 -0
  196. package/lib/helper/index.js +2 -0
  197. package/lib/helper/queryHelper.d.ts +6 -1
  198. package/lib/helper/queryHelper.js +8 -3
  199. package/lib/hooks/tmDistinctValuesGridHelper.d.ts +16 -0
  200. package/lib/hooks/tmDistinctValuesGridHelper.js +31 -0
  201. package/lib/hooks/useArchiveListForm.d.ts +39 -0
  202. package/lib/hooks/useArchiveListForm.js +46 -0
  203. package/lib/hooks/useCaseFlowApprove.d.ts +56 -0
  204. package/lib/hooks/useCaseFlowApprove.js +157 -0
  205. package/lib/hooks/useDataUserIdItem.d.ts +1 -0
  206. package/lib/hooks/useDataUserIdItem.js +1 -0
  207. package/lib/hooks/useDocumentOperations.d.ts +4 -0
  208. package/lib/hooks/useDocumentOperations.js +53 -11
  209. package/lib/hooks/useInputDialog.js +1 -1
  210. package/lib/hooks/useMultiMasterDetailDcmts.d.ts +113 -0
  211. package/lib/hooks/useMultiMasterDetailDcmts.js +760 -0
  212. package/lib/hooks/useQueryParametersDialog.js +1 -1
  213. package/lib/hooks/useRelatedDocuments.d.ts +1 -0
  214. package/lib/hooks/useRelatedDocuments.js +22 -27
  215. package/lib/hooks/useShowDossiersV5.d.ts +12 -0
  216. package/lib/hooks/useShowDossiersV5.js +37 -0
  217. package/lib/hooks/useTMDistinctValuesMetadataDisplay.d.ts +18 -0
  218. package/lib/hooks/useTMDistinctValuesMetadataDisplay.js +103 -0
  219. package/lib/hooks/useTMDistinctValuesQuickSearch.d.ts +49 -0
  220. package/lib/hooks/useTMDistinctValuesQuickSearch.js +307 -0
  221. package/lib/hooks/useTMDistinctValuesSelection.d.ts +42 -0
  222. package/lib/hooks/useTMDistinctValuesSelection.js +103 -0
  223. package/lib/hooks/useTMDistinctValuesSource.d.ts +29 -0
  224. package/lib/hooks/useTMDistinctValuesSource.js +105 -0
  225. package/lib/index.d.ts +2 -0
  226. package/lib/index.js +5 -2
  227. package/lib/services/caseflow/CaseFlowService.d.ts +236 -0
  228. package/lib/services/caseflow/CaseFlowService.js +693 -0
  229. package/lib/services/caseflow/CaseFlowTemplateCacheService.d.ts +28 -0
  230. package/lib/services/caseflow/CaseFlowTemplateCacheService.js +121 -0
  231. package/lib/services/caseflow/caseFlowNameCache.d.ts +32 -0
  232. package/lib/services/caseflow/caseFlowNameCache.js +116 -0
  233. package/lib/services/caseflow/caseFlowWorkItemUtils.d.ts +61 -0
  234. package/lib/services/caseflow/caseFlowWorkItemUtils.js +113 -0
  235. package/lib/services/index.d.ts +4 -0
  236. package/lib/services/index.js +4 -0
  237. package/lib/services/platform_services.d.ts +4 -4
  238. package/package.json +29 -26
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useCallback } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { LoadIndicator } from 'devextreme-react';
@@ -293,7 +293,7 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
293
293
  if (group.badges && group.badges.length > 0) {
294
294
  return (_jsx(BadgeContainer, { children: group.badges.map((badgeData, idx) => {
295
295
  const badgeKey = `${group.id}-badge-${badgeData.badge}-${idx}`;
296
- const badge = _jsx(Badge, { "$color": color, children: badgeData.badge });
296
+ const badge = _jsx(Badge, { $color: color, children: badgeData.badge });
297
297
  if (badgeData.tooltip) {
298
298
  return (_jsx(TMTooltip, { content: badgeData.tooltip, children: badge }, badgeKey));
299
299
  }
@@ -301,7 +301,7 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
301
301
  }) }));
302
302
  }
303
303
  if (group.dataSource && group.dataSource.length > 0) {
304
- return _jsx(Badge, { "$color": color, children: group.dataSource.length });
304
+ return _jsx(Badge, { $color: color, children: group.dataSource.length });
305
305
  }
306
306
  return null;
307
307
  };
@@ -309,19 +309,19 @@ const TMAccordion = ({ groups, localStorageKey, selectedItem, onSelectedItemChan
309
309
  const color = getGroupColor(group, index);
310
310
  const isOpen = openAccordions[group.id] ?? true;
311
311
  if (group.customComponent) {
312
- return (_jsxs(AccordionItem, { "$marginBottom": itemMarginBottom, 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));
312
+ return (_jsxs(AccordionItem, { $marginBottom: itemMarginBottom, 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));
313
313
  }
314
314
  if (!group.dataSource || group.dataSource.length === 0)
315
315
  return null;
316
316
  if (!group.renderItem) {
317
- return (_jsxs(AccordionItem, { "$marginBottom": itemMarginBottom, 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));
317
+ return (_jsxs(AccordionItem, { $marginBottom: itemMarginBottom, 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));
318
318
  }
319
319
  const itemHeight = group.itemHeight || 80;
320
320
  const maxHeight = group.dataSource.length * itemHeight + 20;
321
- return (_jsxs(AccordionItem, { "$marginBottom": itemMarginBottom, 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) => {
321
+ return (_jsxs(AccordionItem, { $marginBottom: itemMarginBottom, 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) => {
322
322
  const isSelected = selectedItem === item;
323
323
  const isFocused = focusedItem === item;
324
- 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));
324
+ 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));
325
325
  }) }) })] }, group.id));
326
326
  };
327
327
  if (!isInitialized) {
@@ -13,54 +13,54 @@ interface AlertModes {
13
13
  }
14
14
  declare const TMAlertPosition: {
15
15
  readonly TOP_RIGHT: {
16
- readonly top: "10px";
17
- readonly right: "10px";
18
- readonly position: "absolute";
16
+ readonly top: '10px';
17
+ readonly right: '10px';
18
+ readonly position: 'absolute';
19
19
  };
20
20
  readonly TOP_CENTER: {
21
- readonly top: "10px";
22
- readonly left: "50%";
23
- readonly transform: "translateX(-50%)";
24
- readonly position: "absolute";
21
+ readonly top: '10px';
22
+ readonly left: '50%';
23
+ readonly transform: 'translateX(-50%)';
24
+ readonly position: 'absolute';
25
25
  };
26
26
  readonly TOP_LEFT: {
27
- readonly top: "10px";
28
- readonly left: "10px";
29
- readonly position: "absolute";
27
+ readonly top: '10px';
28
+ readonly left: '10px';
29
+ readonly position: 'absolute';
30
30
  };
31
31
  readonly BOTTOM_RIGHT: {
32
- readonly bottom: "10px";
33
- readonly right: "10px";
34
- readonly position: "absolute";
32
+ readonly bottom: '10px';
33
+ readonly right: '10px';
34
+ readonly position: 'absolute';
35
35
  };
36
36
  readonly BOTTOM_LEFT: {
37
- readonly bottom: "10px";
38
- readonly left: "10px";
39
- readonly position: "absolute";
37
+ readonly bottom: '10px';
38
+ readonly left: '10px';
39
+ readonly position: 'absolute';
40
40
  };
41
41
  readonly BOTTOM_CENTER: {
42
- readonly bottom: "10px";
43
- readonly left: "50%";
44
- readonly transform: "translateX(-50%)";
45
- readonly position: "absolute";
42
+ readonly bottom: '10px';
43
+ readonly left: '50%';
44
+ readonly transform: 'translateX(-50%)';
45
+ readonly position: 'absolute';
46
46
  };
47
47
  readonly CENTER_RIGHT: {
48
- readonly top: "50%";
49
- readonly right: "10px";
50
- readonly transform: "translateY(-50%)";
51
- readonly position: "absolute";
48
+ readonly top: '50%';
49
+ readonly right: '10px';
50
+ readonly transform: 'translateY(-50%)';
51
+ readonly position: 'absolute';
52
52
  };
53
53
  readonly CENTER_LEFT: {
54
- readonly top: "50%";
55
- readonly left: "10px";
56
- readonly transform: "translateY(-50%)";
57
- readonly position: "absolute";
54
+ readonly top: '50%';
55
+ readonly left: '10px';
56
+ readonly transform: 'translateY(-50%)';
57
+ readonly position: 'absolute';
58
58
  };
59
59
  readonly CENTER_CENTER: {
60
- readonly top: "50%";
61
- readonly left: "50%";
62
- readonly transform: "translate(-50%, -50%)";
63
- readonly position: "absolute";
60
+ readonly top: '50%';
61
+ readonly left: '50%';
62
+ readonly transform: 'translate(-50%, -50%)';
63
+ readonly position: 'absolute';
64
64
  };
65
65
  };
66
66
  declare const ShowAlert: ({ mode, message, duration, title, position }: {
@@ -767,7 +767,7 @@ const TMAreaManager = (props = { selectionMode: 'multiple', isPathChooser: false
767
767
  }
768
768
  };
769
769
  const folderColor = getFileManagerFolderColor(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER);
770
- return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsxs(StyledFileManagerWrapper, { "$folderColor": folderColor, style: { width: "100%", height: "100%" }, children: [_jsxs(FileManager, { width: props.width, ref: fileManagerRef, height: `calc(${props.height} - 30px)`, onItemMoving: onItemCopying, onItemCopying: onItemCopying, onFileUploading: onFileUploading, fileSystemProvider: areaProvider, customizeThumbnail: customizeIcon, rootFolderName: SDK_Localizator.Areas, onSelectionChanged: onSelectionChanged, onDirectoryCreating: onDirectoryCreating, onFocusedItemChanged: onFocusedItemChanged, onSelectedFileOpened: onSelectedFileOpened, onContextMenuItemClick: onContextMenuItemClick,
770
+ return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsxs(StyledFileManagerWrapper, { $folderColor: folderColor, style: { width: "100%", height: "100%" }, children: [_jsxs(FileManager, { width: props.width, ref: fileManagerRef, height: `calc(${props.height} - 30px)`, onItemMoving: onItemCopying, onItemCopying: onItemCopying, onFileUploading: onFileUploading, fileSystemProvider: areaProvider, customizeThumbnail: customizeIcon, rootFolderName: SDK_Localizator.Areas, onSelectionChanged: onSelectionChanged, onDirectoryCreating: onDirectoryCreating, onFocusedItemChanged: onFocusedItemChanged, onSelectedFileOpened: onSelectedFileOpened, onContextMenuItemClick: onContextMenuItemClick,
771
771
  /* onItemMoved={() => setCounter(counter => counter + 1)}
772
772
  onItemCopied={() => setCounter(counter => counter + 1)}
773
773
  onItemDeleted={() => setCounter(counter => counter - 1)}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, forwardRef, useRef, useEffect } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import styled from 'styled-components';
@@ -287,7 +287,7 @@ const TMButton = forwardRef((props, ref) => {
287
287
  return (_jsx(StyledIconButton, { ref: ref, color: color, caption: caption, disabled: disabled, fontSize: fontSize, padding: padding, onClick: onClick, onMouseDown: (e) => !disabled && onMouseDown?.(e), children: icon }));
288
288
  }
289
289
  else if (btnStyle === 'advanced') {
290
- return (_jsxs(StyledAdvancedButton, { ref: ref, "$width": width ?? '90px', "$height": height ?? '30px', onMouseOver: () => !disabled && setIsHovered(true), onMouseOut: () => setIsHovered(false), "$isDisabled": disabled, "$isPrimaryOutline": advancedType === 'primary' && (advancedColor === 'primaryOutline' || color === 'primaryOutline'), onClick: () => !disabled && onClick?.(), onMouseDown: (e) => !disabled && onMouseDown?.(e), children: [_jsx(StyledAdvancedButtonIcon, { "$color": advancedColor, "$isVisible": isHovered, "$isDisabled": disabled, "$type": advancedType, children: icon }), _jsx(StyledAdvancedButtonText, { "$color": advancedColor, "$isDisabled": disabled, "$type": advancedType, "$reserveArrow": hasSecondaryActions, children: caption })] }));
290
+ return (_jsxs(StyledAdvancedButton, { ref: ref, $width: width ?? '90px', $height: height ?? '30px', onMouseOver: () => !disabled && setIsHovered(true), onMouseOut: () => setIsHovered(false), $isDisabled: disabled, $isPrimaryOutline: advancedType === 'primary' && (advancedColor === 'primaryOutline' || color === 'primaryOutline'), onClick: () => !disabled && onClick?.(), onMouseDown: (e) => !disabled && onMouseDown?.(e), children: [_jsx(StyledAdvancedButtonIcon, { $color: advancedColor, $isVisible: isHovered, $isDisabled: disabled, $type: advancedType, children: icon }), _jsx(StyledAdvancedButtonText, { $color: advancedColor, $isDisabled: disabled, $type: advancedType, $reserveArrow: hasSecondaryActions, children: caption })] }));
291
291
  }
292
292
  else {
293
293
  return (_jsx(StyledTextButton, { ref: ref, color: color, caption: caption, disabled: disabled, fontSize: fontSize, onClick: onClick, onMouseDown: (e) => !disabled && onMouseDown?.(e), children: caption }));
@@ -296,12 +296,12 @@ const TMButton = forwardRef((props, ref) => {
296
296
  const renderTooltip = () => {
297
297
  return (showTooltip &&
298
298
  _jsxs(_Fragment, { children: [caption &&
299
- _jsx(StyledButtonTooltipHeader, { "$description": description, children: _jsx(StyledButtonTooltipItem, { "$color": color, children: caption }) }), description && _jsx(StyledButtonTooltipItem, { children: description })] }));
299
+ _jsx(StyledButtonTooltipHeader, { $description: description, children: _jsx(StyledButtonTooltipItem, { $color: color, children: caption }) }), description && _jsx(StyledButtonTooltipItem, { children: description })] }));
300
300
  };
301
301
  const buttonWithTooltip = showTooltip
302
302
  ? _jsx(TMTooltip, { hideAfterDelay: true, content: renderTooltip(), children: renderedButton() })
303
303
  : renderedButton();
304
- const renderSplitButton = () => (_jsxs(StyledSplitContainer, { ref: splitContainerRef, children: [buttonWithTooltip, _jsx(StyledSplitArrow, { type: 'button', "$isDisabled": disabled, "$isOpen": isDropdownOpen, "aria-haspopup": 'menu', "aria-expanded": isDropdownOpen, onClick: (e) => { e.stopPropagation(); toggleDropdown(); }, onMouseDown: (e) => e.stopPropagation(), children: _jsx(IconChevronDown, { fontSize: 14 }) }), isDropdownOpen && createPortal(_jsx(StyledDropdown, { ref: dropdownRef, role: 'menu', "$left": dropdownPos.left, "$top": dropdownPos.top, "$minWidth": dropdownPos.minWidth, children: secondaryActions.map((action, idx) => (_jsxs(StyledDropdownItem, { type: 'button', role: 'menuitem', "$disabled": action.disabled, disabled: action.disabled, onClick: () => {
304
+ const renderSplitButton = () => (_jsxs(StyledSplitContainer, { ref: splitContainerRef, children: [buttonWithTooltip, _jsx(StyledSplitArrow, { type: 'button', $isDisabled: disabled, $isOpen: isDropdownOpen, "aria-haspopup": 'menu', "aria-expanded": isDropdownOpen, onClick: (e) => { e.stopPropagation(); toggleDropdown(); }, onMouseDown: (e) => e.stopPropagation(), children: _jsx(IconChevronDown, { fontSize: 14 }) }), isDropdownOpen && createPortal(_jsx(StyledDropdown, { ref: dropdownRef, role: 'menu', $left: dropdownPos.left, $top: dropdownPos.top, $minWidth: dropdownPos.minWidth, children: secondaryActions.map((action, idx) => (_jsxs(StyledDropdownItem, { type: 'button', role: 'menuitem', $disabled: action.disabled, disabled: action.disabled, onClick: () => {
305
305
  if (action.disabled)
306
306
  return;
307
307
  setIsDropdownOpen(false);
@@ -67,8 +67,8 @@ const TMClosableList = ({ dataSource, visibility = false, label, inline = false,
67
67
  const renderedItems = () => {
68
68
  return (dataSource.map((item, index) => (_jsx(StyledClosableItem, { children: item }, index))));
69
69
  };
70
- return (_jsxs(StyledClosableContainer, { "$isMobile": devicrType === DeviceType.TABLET, "$padding": hasPadding ? '5px' : '0', children: [_jsxs(StyledClosableContext, { children: [label && _jsxs(StyledClosableLabel, { "$isMobile": devicrType === DeviceType.MOBILE, "$inline": inline, children: [label, ":"] }), status ?
71
- _jsxs(StyledClosableItems, { "$isMobile": devicrType === DeviceType.MOBILE, "$inline": inline, children: [" ", renderedItems(), " "] }) :
72
- _jsxs(StyledClosableItems, { "$isMobile": devicrType === DeviceType.MOBILE, "$inline": inline, children: [" ", _jsxs(StyledClosableItem, { children: [" ", dataSource[0], " "] }), " "] })] }), dataSource.length > 1 && _jsxs(StyledClosabelIcon, { onClick: () => setStatus(!status), children: [!status && _jsxs(StyledClosableItemsCount, { children: [" (", _jsx("span", { children: "+" }), " ", dataSource.length - 1, " ", dataSource.length === 2 ? SDKUI_Localizator.OneMore : SDKUI_Localizator.More, ") "] }), !status ? _jsx(IconRight, { fontSize: 14 }) : _jsx(IconDown, { fontSize: 14 })] })] }));
70
+ return (_jsxs(StyledClosableContainer, { $isMobile: devicrType === DeviceType.TABLET, $padding: hasPadding ? '5px' : '0', children: [_jsxs(StyledClosableContext, { children: [label && _jsxs(StyledClosableLabel, { $isMobile: devicrType === DeviceType.MOBILE, $inline: inline, children: [label, ":"] }), status ?
71
+ _jsxs(StyledClosableItems, { $isMobile: devicrType === DeviceType.MOBILE, $inline: inline, children: [" ", renderedItems(), " "] }) :
72
+ _jsxs(StyledClosableItems, { $isMobile: devicrType === DeviceType.MOBILE, $inline: inline, children: [" ", _jsxs(StyledClosableItem, { children: [" ", dataSource[0], " "] }), " "] })] }), dataSource.length > 1 && _jsxs(StyledClosabelIcon, { onClick: () => setStatus(!status), children: [!status && _jsxs(StyledClosableItemsCount, { children: [" (", _jsx("span", { children: "+" }), " ", dataSource.length - 1, " ", dataSource.length === 2 ? SDKUI_Localizator.OneMore : SDKUI_Localizator.More, ") "] }), !status ? _jsx(IconRight, { fontSize: 14 }) : _jsx(IconDown, { fontSize: 14 })] })] }));
73
73
  };
74
74
  export default TMClosableList;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState, useMemo } from 'react';
3
3
  import TMModal from './TMModal';
4
4
  import styled from 'styled-components';
@@ -46,6 +46,8 @@ export interface TMDataGridProps<T> extends IDataGridOptions {
46
46
  showSearchPanel?: boolean;
47
47
  /** Show the group panel */
48
48
  showGroupPanel?: boolean;
49
+ /** Rende il paginatore compatto (meno alto, font e pulsanti ridotti, page numbers sostituiti da "pagina / totale"): utile quando la griglia è dentro pannelli bassi */
50
+ compactPager?: boolean;
49
51
  /** Counter configuration */
50
52
  counterConfig?: ITMCounterContainerProps;
51
53
  /** Master Detail */
@@ -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,7 +19,7 @@ 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, 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
@@ -35,6 +36,9 @@ 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);
@@ -75,9 +79,17 @@ const TMDataGrid = React.forwardRef((props, ref) => {
75
79
  const rowKey = internalRef.current.instance().getKeyByRowIndex(rowIndex);
76
80
  internalRef.current.instance().option('focusedRowKey', rowKey);
77
81
  setCustomContextMenuRowKey(rowKey);
82
+ setCustomContextMenuOnEmptyArea(false);
78
83
  }
79
84
  else {
80
- setCustomContextMenuRowKey(focusedRowKey);
85
+ // Right-click su spazio vuoto: ricade sulla riga focalizzata solo se esiste ancora.
86
+ // Se non c'è una riga focalizzata (es. primo click dopo l'apertura) o se focusedRowKey punta a
87
+ // una riga non più presente (dopo un'eliminazione), il menu viene comunque mostrato ma senza
88
+ // riga di riferimento: i comandi di riga restano disabilitati, quelli generali utilizzabili
89
+ const grid = internalRef.current?.instance();
90
+ const focusedRowExists = focusedRowKey !== undefined && !!grid && grid.getRowIndexByKey(focusedRowKey) >= 0;
91
+ setCustomContextMenuRowKey(focusedRowExists ? focusedRowKey : undefined);
92
+ setCustomContextMenuOnEmptyArea(!focusedRowExists);
81
93
  }
82
94
  setCustomContextMenuVisible(true);
83
95
  setCustomContextMenuPosition({ x: e.clientX, y: e.clientY });
@@ -114,6 +126,7 @@ const TMDataGrid = React.forwardRef((props, ref) => {
114
126
  setCustomContextMenuVisible(true);
115
127
  setCustomContextMenuPosition({ x: clientX, y: clientY });
116
128
  setCustomContextMenuRowKey(rowKey);
129
+ setCustomContextMenuOnEmptyArea(false);
117
130
  },
118
131
  });
119
132
  // Creating a ref to store the timestamp of the last selection change
@@ -222,7 +235,8 @@ const TMDataGrid = React.forwardRef((props, ref) => {
222
235
  return items.map(item => {
223
236
  let disabled = item.disabled ?? false;
224
237
  let disabledCalculation = false;
225
- const id = focusedRowEnabled ? focusedRowKey : rowID;
238
+ // Menu aperto su spazio vuoto senza riga di riferimento: nessun id, i comandi di riga sono disabilitati
239
+ const id = customContextMenuOnEmptyArea ? undefined : (focusedRowEnabled ? focusedRowKey : rowID);
226
240
  if (item.operationType === 'singleRow') {
227
241
  disabledCalculation = selectedRowKeys.length > 1 || id === undefined;
228
242
  }
@@ -237,7 +251,10 @@ const TMDataGrid = React.forwardRef((props, ref) => {
237
251
  if (item.operationType === 'singleRow' && id !== undefined) {
238
252
  originalOnClick(id);
239
253
  }
240
- else if (item.operationType === 'multiRow' && id !== undefined) {
254
+ else if (item.operationType === 'multiRow' && (selectedRowKeys.length > 0 || id !== undefined)) {
255
+ // Condizione allineata a quella di disabilitazione: con righe selezionate il comando è
256
+ // attivo anche senza riga di riferimento (es. menu aperto su spazio vuoto), quindi qui
257
+ // devono comunque essere passate le chiavi selezionate e non un onClick senza argomenti
241
258
  if (selectedRowKeys.length > 0) {
242
259
  originalOnClick(selectedRowKeys);
243
260
  }
@@ -252,7 +269,7 @@ const TMDataGrid = React.forwardRef((props, ref) => {
252
269
  submenu: item.submenu ? processCustomContextMenuItems(item.submenu, id) : undefined,
253
270
  };
254
271
  });
255
- }, [focusedRowEnabled, focusedRowKey, selectedRowKeys]);
272
+ }, [focusedRowEnabled, focusedRowKey, selectedRowKeys, customContextMenuOnEmptyArea]);
256
273
  // Gestisce la preparazione del menu contestuale della griglia (header e righe)
257
274
  const onContextMenuPreparingCallback = useCallback((e) => {
258
275
  if (e === undefined)
@@ -358,7 +375,14 @@ const TMDataGrid = React.forwardRef((props, ref) => {
358
375
  // Propaga l'evento originale
359
376
  onOptionChanged?.(e);
360
377
  }, [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' : ''}`,
378
+ // In modalità compatta il pager usa il displayMode 'compact' di DevExtreme (page numbers sostituiti da "pagina / totale"),
379
+ // salvo displayMode esplicito passato dal chiamante
380
+ const effectivePager = useMemo(() => {
381
+ if (!pager || !compactPager)
382
+ return pager;
383
+ return { ...pager, displayMode: pager.displayMode ?? 'compact' };
384
+ }, [pager, compactPager]);
385
+ 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
386
  // main properties
363
387
  keyExpr: keyExpr, dataSource: dataSource, selectedRowKeys: selectedRowKeys, focusedRowEnabled: focusedRowEnabled, hoverStateEnabled: hoverStateEnabled,
364
388
  // events and callbacks
@@ -371,13 +395,241 @@ const TMDataGrid = React.forwardRef((props, ref) => {
371
395
  // Temporary: iOS-specific styles to prevent default long-press menu and text selection
372
396
  WebkitTouchCallout: 'none',
373
397
  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: {
398
+ }, 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: { enabled: true, ...headerFilter?.search } }), 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
399
  visible: customContextMenuVisible,
376
400
  position: customContextMenuPosition,
377
401
  onClose: () => setCustomContextMenuVisible(false)
378
402
  } }))] });
379
403
  });
380
404
  export default TMDataGrid;
405
+ // Contenitore della griglia: in modalità compatta riduce l'ingombro verticale del pager DevExtreme
406
+ // (padding, altezza minima, font e dimensione dei pulsanti di pagina).
407
+ // Con compactPager = false non emette nessuna regola: width/height restano inline come in precedenza,
408
+ // così il rendering è identico a quello del div originale.
409
+ const StyledDataGridContainer = styled.div `
410
+ ${({ $compactPager }) => $compactPager && css `
411
+ & .dx-datagrid-pager {
412
+ padding: 2px 4px !important;
413
+ min-height: 0 !important;
414
+ font-size: 11px;
415
+ }
416
+
417
+ & .dx-datagrid-pager .dx-page,
418
+ & .dx-datagrid-pager .dx-page-size,
419
+ & .dx-datagrid-pager .dx-selection,
420
+ & .dx-datagrid-pager .dx-navigate-button {
421
+ min-width: 18px !important;
422
+ min-height: 18px !important;
423
+ height: auto !important;
424
+ padding: 1px 5px !important;
425
+ line-height: 16px !important;
426
+ font-size: 11px;
427
+ }
428
+
429
+ & .dx-datagrid-pager .dx-pages,
430
+ & .dx-datagrid-pager .dx-page-sizes,
431
+ & .dx-datagrid-pager .dx-info,
432
+ & .dx-datagrid-pager .dx-page-index,
433
+ & .dx-datagrid-pager .dx-pages .dx-info {
434
+ font-size: 11px;
435
+ margin-top: 0 !important;
436
+ margin-bottom: 0 !important;
437
+ }
438
+
439
+ & .dx-datagrid-pager .dx-info {
440
+ margin-left: 4px !important;
441
+ margin-right: 4px !important;
442
+ }
443
+
444
+ /* Editor del numero di pagina (displayMode compact) */
445
+ & .dx-datagrid-pager .dx-page-index .dx-texteditor-input,
446
+ & .dx-datagrid-pager .dx-page-sizes .dx-texteditor-input {
447
+ min-height: 18px !important;
448
+ height: 18px !important;
449
+ padding: 0 4px !important;
450
+ font-size: 11px;
451
+ }
452
+ `}
453
+ `;
454
+ // Stile del pannello del filtro d'intestazione (ricerca, elenco valori, OK/Annulla).
455
+ // Il popup è in portale sul body, fuori da StyledDataGridContainer: le regole sono globali
456
+ // ma tutte sotto .dx-header-filter-menu, classe che DevExtreme applica solo a questo popup.
457
+ const HeaderFilterMenuGlobalStyle = createGlobalStyle `
458
+ .dx-header-filter-menu {
459
+
460
+ &.dx-popup-wrapper > .dx-overlay-content.dx-popup-normal {
461
+ border: 1px solid #E4E8EE;
462
+ border-radius: 8px;
463
+ box-shadow: 0 2px 6px rgba(18, 44, 76, .08), 0 12px 28px rgba(18, 44, 76, .14);
464
+ overflow: hidden;
465
+ }
466
+
467
+ &.dx-popup-wrapper .dx-popup-content {
468
+ padding: 10px 10px 4px;
469
+ }
470
+
471
+ /* Campo di ricerca: TextBox mode "search" resa da List o da TreeView (filtri gerarchici) */
472
+ .dx-searchbox.dx-list-search,
473
+ .dx-searchbox.dx-treeview-search {
474
+ margin-bottom: 8px;
475
+ border-radius: 6px;
476
+ border: 1px solid #CDD2D8;
477
+ background-color: #F4F6F9;
478
+ box-shadow: none;
479
+ transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
480
+
481
+ /* fluent disegna qui la barretta di focus, sostituita da bordo + alone */
482
+ &::before,
483
+ &::after {
484
+ display: none;
485
+ }
486
+
487
+ &.dx-state-hover:not(.dx-state-focused) {
488
+ border-color: #AEB6C1;
489
+ background-color: #EEF2F7;
490
+ }
491
+
492
+ &.dx-state-focused {
493
+ border-color: #2559A5;
494
+ background-color: #FFFFFF;
495
+ box-shadow: 0 0 0 2px rgba(37, 89, 165, .16);
496
+ }
497
+
498
+ .dx-icon-search {
499
+ width: 28px;
500
+ color: #8A929B;
501
+ transition: color .15s ease;
502
+ }
503
+
504
+ &.dx-state-focused .dx-icon-search {
505
+ color: #2559A5;
506
+ }
507
+
508
+ .dx-texteditor-input {
509
+ min-height: 28px;
510
+ padding-inline-start: 28px;
511
+ padding-inline-end: 8px;
512
+ font-size: 12px;
513
+ background-color: transparent;
514
+ }
515
+
516
+ .dx-placeholder {
517
+ color: #9AA3AD;
518
+ font-size: 12px;
519
+
520
+ &::before {
521
+ padding-inline-start: 28px;
522
+ padding-inline-end: 8px;
523
+ }
524
+ }
525
+
526
+ .dx-clear-button-area .dx-icon-clear {
527
+ color: #8A929B;
528
+ transition: color .15s ease;
529
+ }
530
+
531
+ .dx-clear-button-area:hover .dx-icon-clear {
532
+ color: #2559A5;
533
+ }
534
+ }
535
+
536
+ .dx-list-item {
537
+ border-radius: 4px;
538
+ transition: background-color .12s ease;
539
+ }
540
+
541
+ .dx-list-item-content {
542
+ padding: 4px 6px;
543
+ }
544
+
545
+ .dx-list-item.dx-state-hover,
546
+ .dx-list-item.dx-state-focused {
547
+ background-color: #F1F6FD;
548
+ color: #122C4C;
549
+ }
550
+
551
+ .dx-list-select-all {
552
+ padding: 2px 0 6px;
553
+ margin-bottom: 4px;
554
+ border-bottom: 1px solid #ECEFF3;
555
+ }
556
+
557
+ .dx-list-select-all-label {
558
+ font-weight: 600;
559
+ color: #122C4C;
560
+ }
561
+
562
+ .dx-checkbox-checked .dx-checkbox-icon,
563
+ .dx-checkbox-indeterminate .dx-checkbox-icon {
564
+ border-color: #2559A5;
565
+ background-color: #2559A5;
566
+ }
567
+
568
+ .dx-checkbox.dx-state-hover:not(.dx-checkbox-checked) .dx-checkbox-icon {
569
+ border-color: #2559A5;
570
+ }
571
+
572
+ /* il :not() lascia intatto il fade-out nativo della scrollbar */
573
+ .dx-scrollable-scroll:not(.dx-state-invisible) .dx-scrollable-scroll-content {
574
+ background-color: rgba(18, 44, 76, .28);
575
+ border-radius: 3px;
576
+ }
577
+
578
+ &.dx-popup-wrapper .dx-popup-bottom.dx-toolbar {
579
+ padding: 8px 10px 10px;
580
+ border-top: 1px solid #ECEFF3;
581
+ }
582
+
583
+ .dx-popup-bottom .dx-button {
584
+ border-radius: 5px;
585
+ min-width: 76px;
586
+ margin: 0;
587
+ }
588
+
589
+ .dx-popup-bottom .dx-toolbar-button + .dx-toolbar-button {
590
+ margin-inline-start: 6px;
591
+
592
+ .dx-button {
593
+ margin: 0;
594
+ }
595
+ }
596
+
597
+ /* DevExtreme aggiunge prima OK e poi Annulla: individuarli per posizione li rende indipendenti dalla lingua */
598
+ .dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button:first-child .dx-button {
599
+ border-color: transparent;
600
+ background-color: #2559A5;
601
+
602
+ .dx-button-text {
603
+ color: #FFFFFF;
604
+ }
605
+
606
+ &.dx-state-hover {
607
+ background-color: #1E4A8C;
608
+ }
609
+
610
+ &.dx-state-active {
611
+ background-color: #1A3F78;
612
+ }
613
+ }
614
+
615
+ .dx-popup-bottom .dx-toolbar-after > .dx-toolbar-button + .dx-toolbar-button .dx-button {
616
+ border-color: transparent;
617
+ background-color: transparent;
618
+
619
+ .dx-button-text {
620
+ color: #44506B;
621
+ }
622
+
623
+ &.dx-state-hover {
624
+ background-color: #F0F3F7;
625
+ }
626
+
627
+ &.dx-state-active {
628
+ background-color: #E6EBF2;
629
+ }
630
+ }
631
+ }
632
+ `;
381
633
  const getRecordCount = (dataSource) => {
382
634
  if (Array.isArray(dataSource)) {
383
635
  return dataSource.length; // For array
@@ -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,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);