@topconsultnpm/sdkui-react 6.22.0-t1 → 6.22.0-t3

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 (286) 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 +92 -76
  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/TMAlert.js +6 -8
  11. package/lib/components/base/TMAreaManager.js +53 -55
  12. package/lib/components/base/TMButton.d.ts +13 -0
  13. package/lib/components/base/TMButton.js +139 -7
  14. package/lib/components/base/TMClosableList.js +3 -3
  15. package/lib/components/base/TMCustomButton.js +40 -48
  16. package/lib/components/base/TMDataGrid.d.ts +4 -0
  17. package/lib/components/base/TMDataGrid.js +292 -12
  18. package/lib/components/base/TMDataGridExportForm.js +39 -30
  19. package/lib/components/base/TMDropDownMenu.js +1 -1
  20. package/lib/components/base/TMEditorBase.d.ts +2 -0
  21. package/lib/components/base/TMFileManager.js +5 -3
  22. package/lib/components/base/TMFileManagerDataGridView.js +12 -3
  23. package/lib/components/base/TMFileManagerThumbnailItems.js +20 -10
  24. package/lib/components/base/TMFileManagerUtils.d.ts +6 -6
  25. package/lib/components/base/TMFileManagerUtils.js +37 -1
  26. package/lib/components/base/TMLayout.d.ts +2 -2
  27. package/lib/components/base/TMLayout.js +3 -3
  28. package/lib/components/base/TMList.js +1 -1
  29. package/lib/components/base/TMListView.js +3 -3
  30. package/lib/components/base/TMModal.d.ts +11 -0
  31. package/lib/components/base/TMModal.js +47 -13
  32. package/lib/components/base/TMPanel.d.ts +6 -0
  33. package/lib/components/base/TMPanel.js +141 -28
  34. package/lib/components/base/TMPopUp.js +5 -2
  35. package/lib/components/base/TMResizableMenu.js +2 -2
  36. package/lib/components/base/TMRightSidebar.js +1 -1
  37. package/lib/components/base/TMShowAllOrMaxItemsButton.js +1 -1
  38. package/lib/components/base/TMSpinner.d.ts +2 -1
  39. package/lib/components/base/TMSpinner.js +9 -7
  40. package/lib/components/base/TMTab.js +2 -2
  41. package/lib/components/base/TMTabControl.d.ts +106 -0
  42. package/lib/components/base/TMTabControl.js +664 -0
  43. package/lib/components/base/TMToggleButton.js +2 -2
  44. package/lib/components/base/TMToolbarCard.js +3 -3
  45. package/lib/components/base/TMTooltip.d.ts +2 -1
  46. package/lib/components/base/TMTooltip.js +24 -8
  47. package/lib/components/base/TMTreeView.d.ts +13 -7
  48. package/lib/components/base/TMTreeView.js +143 -70
  49. package/lib/components/base/TMWaitPanel.js +3 -3
  50. package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
  51. package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
  52. package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +169 -0
  53. package/lib/components/base/waitPanel/TMWaitPanelManager.js +320 -0
  54. package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +53 -0
  55. package/lib/components/base/waitPanel/TMWaitPanelView.js +274 -0
  56. package/lib/components/base/waitPanel/index.d.ts +1 -0
  57. package/lib/components/base/waitPanel/index.js +1 -0
  58. package/lib/components/choosers/TMCultureIDPicker.js +2 -2
  59. package/lib/components/choosers/TMDataListItemChooser.js +1 -1
  60. package/lib/components/choosers/TMDataListItemPicker.js +2 -2
  61. package/lib/components/choosers/TMDcmtTypeChooser.js +5 -4
  62. package/lib/components/choosers/TMDiskChooser.js +1 -1
  63. package/lib/components/choosers/TMDistinctValues.d.ts +9 -7
  64. package/lib/components/choosers/TMDistinctValues.js +157 -141
  65. package/lib/components/choosers/TMDynDataListItemChooser.js +1 -1
  66. package/lib/components/choosers/TMImageIDChooser.js +1 -1
  67. package/lib/components/choosers/TMMetadataChooser.js +3 -3
  68. package/lib/components/choosers/TMPathChooser.js +17 -34
  69. package/lib/components/choosers/TMQuickSearchInfo.d.ts +13 -0
  70. package/lib/components/choosers/TMQuickSearchInfo.js +279 -0
  71. package/lib/components/choosers/TMQuickSearchSettingsForm.d.ts +16 -0
  72. package/lib/components/choosers/TMQuickSearchSettingsForm.js +94 -0
  73. package/lib/components/choosers/TMRelationChooser.js +1 -1
  74. package/lib/components/choosers/TMSelectedValuesSummary.d.ts +13 -0
  75. package/lib/components/choosers/TMSelectedValuesSummary.js +89 -0
  76. package/lib/components/choosers/TMUserChooser.js +1 -1
  77. package/lib/components/editors/TMCheckBox.js +1 -1
  78. package/lib/components/editors/TMDateBox.d.ts +16 -1
  79. package/lib/components/editors/TMDateBox.js +90 -22
  80. package/lib/components/editors/TMDropDown.d.ts +3 -0
  81. package/lib/components/editors/TMDropDown.js +197 -5
  82. package/lib/components/editors/TMEditorStyled.d.ts +21 -43
  83. package/lib/components/editors/TMFormulaEditor.js +1 -1
  84. package/lib/components/editors/TMHtmlContentDisplay.js +1 -1
  85. package/lib/components/editors/TMLocalizedTextBox.js +1 -1
  86. package/lib/components/editors/TMMetadataEditor.d.ts +5 -1
  87. package/lib/components/editors/TMMetadataEditor.js +27 -23
  88. package/lib/components/editors/TMMetadataValues.js +6 -6
  89. package/lib/components/editors/TMRadioButton.js +2 -2
  90. package/lib/components/editors/TMSummary.js +3 -3
  91. package/lib/components/editors/TMTextArea.d.ts +1 -0
  92. package/lib/components/editors/TMTextArea.js +25 -17
  93. package/lib/components/editors/TMTextBox.d.ts +2 -0
  94. package/lib/components/editors/TMTextBox.js +32 -21
  95. package/lib/components/editors/TMTextExpression.js +1 -1
  96. package/lib/components/features/archive/TMArchive.js +24 -5
  97. package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +29 -0
  98. package/lib/components/features/assistant/TMHelpOnLineChat.js +1384 -0
  99. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +4 -4
  100. package/lib/components/features/assistant/TMToppySpeechBubble.js +1 -1
  101. package/lib/components/features/assistant/dataset/Designer-Suggested-Questions.json +102 -0
  102. package/lib/components/features/assistant/dataset/Login-Suggested-Questions.json +32 -0
  103. package/lib/components/features/assistant/dataset/Surfer-Suggested-Questions.json +102 -0
  104. package/lib/components/features/documents/TMBatchUpdateForm.js +22 -9
  105. package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
  106. package/lib/components/features/documents/TMDcmtBlog.d.ts +3 -0
  107. package/lib/components/features/documents/TMDcmtBlog.js +4 -4
  108. package/lib/components/features/documents/TMDcmtForm.d.ts +7 -0
  109. package/lib/components/features/documents/TMDcmtForm.js +281 -113
  110. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +11 -0
  111. package/lib/components/features/documents/TMDcmtFormActionButtons.js +79 -9
  112. package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -3
  113. package/lib/components/features/documents/TMDcmtIcon.js +8 -8
  114. package/lib/components/features/documents/TMDcmtPreview.d.ts +7 -5
  115. package/lib/components/features/documents/TMDcmtPreview.js +16 -10
  116. package/lib/components/features/documents/TMDcmtTasks.js +2 -9
  117. package/lib/components/features/documents/TMDownloadRelationViewerSection.js +1 -1
  118. package/lib/components/features/documents/TMFileUploader.js +7 -7
  119. package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
  120. package/lib/components/features/documents/TMMasterDetailDcmts.js +95 -108
  121. package/lib/components/features/documents/TMMasterInfoFields.d.ts +20 -0
  122. package/lib/components/features/documents/TMMasterInfoFields.js +185 -0
  123. package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
  124. package/lib/components/features/documents/TMMergeToPdfForm.js +83 -56
  125. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +46 -0
  126. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +320 -0
  127. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +370 -0
  128. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +283 -0
  129. package/lib/components/features/documents/TMRelationViewer.d.ts +29 -9
  130. package/lib/components/features/documents/TMRelationViewer.js +310 -208
  131. package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +1 -1
  132. package/lib/components/features/documents/relationTreeState.d.ts +32 -0
  133. package/lib/components/features/documents/relationTreeState.js +89 -0
  134. package/lib/components/features/search/TMMetadataOutputForm.js +1 -1
  135. package/lib/components/features/search/TMMetadataSorterForm.js +1 -1
  136. package/lib/components/features/search/TMSavedQuerySelector.js +2 -2
  137. package/lib/components/features/search/TMSearch.d.ts +1 -1
  138. package/lib/components/features/search/TMSearch.js +172 -34
  139. package/lib/components/features/search/TMSearchQueryEditor.js +7 -5
  140. package/lib/components/features/search/TMSearchQueryPanel.d.ts +14 -4
  141. package/lib/components/features/search/TMSearchQueryPanel.js +153 -62
  142. package/lib/components/features/search/TMSearchResult.d.ts +21 -0
  143. package/lib/components/features/search/TMSearchResult.js +461 -152
  144. package/lib/components/features/search/TMSignatureInfoContent.js +1 -1
  145. package/lib/components/features/search/TMTreeSelector.js +130 -83
  146. package/lib/components/features/search/TMViewHistoryDcmt.js +14 -25
  147. package/lib/components/features/tasks/TMTaskForm.js +1 -1
  148. package/lib/components/features/tasks/TMTaskFormUtils.js +3 -3
  149. package/lib/components/features/tasks/TMTasksAgenda.js +1 -1
  150. package/lib/components/features/tasks/TMTasksCalendar.js +1 -1
  151. package/lib/components/features/tasks/TMTasksHeader.js +1 -1
  152. package/lib/components/features/tasks/TMTasksUtilsView.js +1 -1
  153. package/lib/components/features/tasks/TMTasksView.js +97 -102
  154. package/lib/components/features/wg/TMWGsCopyMoveForm.js +92 -92
  155. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +10 -0
  156. package/lib/components/features/workflow/TMWorkflowPopup.js +9 -5
  157. package/lib/components/features/workflow/diagram/ConnectionComponent.js +3 -3
  158. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +3 -3
  159. package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
  160. package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +1 -1
  161. package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
  162. package/lib/components/features/workflow/diagram/WFDiagram.js +4 -4
  163. package/lib/components/features/workflow/diagram/WorkitemRecipientsEditor.d.ts +3 -1
  164. package/lib/components/forms/Login/ChangePasswordInputs.d.ts +3 -1
  165. package/lib/components/forms/Login/Menu.js +1 -1
  166. package/lib/components/forms/Login/OTPReader.js +1 -1
  167. package/lib/components/forms/Login/PasswordStrengthChecker.js +1 -1
  168. package/lib/components/forms/Login/RapidAccessLogin.js +2 -2
  169. package/lib/components/forms/Login/RecoverPasswordFlow.js +2 -2
  170. package/lib/components/forms/Login/SelectBox.js +1 -1
  171. package/lib/components/forms/Login/StepIndicator.js +1 -1
  172. package/lib/components/forms/Login/TMLoginForm.js +7 -7
  173. package/lib/components/forms/Login/TextBox.js +1 -1
  174. package/lib/components/forms/TMApplyForm.js +3 -3
  175. package/lib/components/forms/TMChooserForm.js +1 -1
  176. package/lib/components/forms/TMResultDialog.js +1 -1
  177. package/lib/components/forms/TMSaveForm.js +3 -3
  178. package/lib/components/grids/TMBlogAttachments.js +14 -3
  179. package/lib/components/grids/TMBlogHeader.js +5 -1
  180. package/lib/components/grids/TMBlogsPost.d.ts +2 -0
  181. package/lib/components/grids/TMBlogsPost.js +122 -99
  182. package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
  183. package/lib/components/grids/TMBlogsPostUtils.js +15 -4
  184. package/lib/components/grids/TMRecentsManager.js +4 -4
  185. package/lib/components/grids/TMValidationItemsList.js +1 -1
  186. package/lib/components/index.d.ts +6 -0
  187. package/lib/components/index.js +5 -0
  188. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
  189. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +25 -15
  190. package/lib/components/layout/panelManager/TMPanelManagerContext.js +68 -93
  191. package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +4 -5
  192. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +1 -1
  193. package/lib/components/layout/panelManager/TMPanelWrapper.js +3 -3
  194. package/lib/components/layout/panelManager/types.d.ts +3 -0
  195. package/lib/components/layout/panelManager/utils.js +13 -11
  196. package/lib/components/pages/TMPage.js +30 -32
  197. package/lib/components/query/TMQueryCountButton.js +1 -1
  198. package/lib/components/query/TMQueryEditor.d.ts +17 -10
  199. package/lib/components/query/TMQueryEditor.js +9 -8
  200. package/lib/components/sidebar/TMCommandsPanel.d.ts +4 -4
  201. package/lib/components/sidebar/TMCommandsPanel.js +1 -1
  202. package/lib/components/sidebar/TMHeader.d.ts +1 -0
  203. package/lib/components/sidebar/TMHeader.js +37 -27
  204. package/lib/components/sidebar/TMSidebar.js +1 -1
  205. package/lib/components/sidebar/TMSidebarItem.js +1 -1
  206. package/lib/components/viewers/TMMidViewer.js +6 -3
  207. package/lib/components/viewers/TMTidViewer.js +89 -28
  208. package/lib/components/wizard/TMStepIndicator.js +3 -3
  209. package/lib/css/tm-sdkui.css +1 -1
  210. package/lib/devextreme-license.d.ts +1 -0
  211. package/lib/devextreme-license.js +3 -0
  212. package/lib/helper/Enum_Localizator.d.ts +4 -4
  213. package/lib/helper/Enum_Localizator.js +1 -0
  214. package/lib/helper/Globalization.d.ts +1 -1
  215. package/lib/helper/SDKUI_Globals.d.ts +110 -0
  216. package/lib/helper/SDKUI_Globals.js +151 -0
  217. package/lib/helper/SDKUI_Localizator.d.ts +756 -677
  218. package/lib/helper/SDKUI_Localizator.js +790 -0
  219. package/lib/helper/TMAppUpdatedModal.d.ts +2 -0
  220. package/lib/helper/TMAppUpdatedModal.js +134 -0
  221. package/lib/helper/TMIcons.d.ts +1 -0
  222. package/lib/helper/TMIcons.js +4 -3
  223. package/lib/helper/TMPdfViewer.js +1 -1
  224. package/lib/helper/TMToppyMessage.js +1 -1
  225. package/lib/helper/TMUtils.d.ts +51 -4
  226. package/lib/helper/TMUtils.js +273 -12
  227. package/lib/helper/ZipManager.d.ts +1 -1
  228. package/lib/helper/ZipManager.js +2 -1
  229. package/lib/helper/checkinCheckoutManager.d.ts +1 -1
  230. package/lib/helper/checkinCheckoutManager.js +1 -1
  231. package/lib/helper/dataGridSearchHelper.d.ts +28 -0
  232. package/lib/helper/dataGridSearchHelper.js +51 -0
  233. package/lib/helper/dcmtsHelper.d.ts +22 -0
  234. package/lib/helper/dcmtsHelper.js +60 -1
  235. package/lib/helper/helpers.d.ts +24 -2
  236. package/lib/helper/helpers.js +59 -3
  237. package/lib/helper/index.d.ts +2 -0
  238. package/lib/helper/index.js +2 -0
  239. package/lib/helper/queryHelper.d.ts +6 -1
  240. package/lib/helper/queryHelper.js +8 -3
  241. package/lib/hooks/tmDistinctValuesGridHelper.d.ts +16 -0
  242. package/lib/hooks/tmDistinctValuesGridHelper.js +31 -0
  243. package/lib/hooks/useArchiveListForm.d.ts +39 -0
  244. package/lib/hooks/useArchiveListForm.js +46 -0
  245. package/lib/hooks/useCaseFlowApprove.d.ts +56 -0
  246. package/lib/hooks/useCaseFlowApprove.js +157 -0
  247. package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
  248. package/lib/hooks/useCheckInOutOperations.js +14 -34
  249. package/lib/hooks/useDataUserIdItem.d.ts +1 -0
  250. package/lib/hooks/useDataUserIdItem.js +1 -0
  251. package/lib/hooks/useDcmtOperations.d.ts +3 -12
  252. package/lib/hooks/useDcmtOperations.js +187 -179
  253. package/lib/hooks/useDocumentOperations.d.ts +5 -0
  254. package/lib/hooks/useDocumentOperations.js +64 -33
  255. package/lib/hooks/useInputDialog.js +1 -1
  256. package/lib/hooks/useMultiMasterDetailDcmts.d.ts +98 -0
  257. package/lib/hooks/useMultiMasterDetailDcmts.js +758 -0
  258. package/lib/hooks/usePreventFileDrop.js +9 -0
  259. package/lib/hooks/useQueryParametersDialog.js +1 -1
  260. package/lib/hooks/useRelatedDocuments.d.ts +1 -0
  261. package/lib/hooks/useRelatedDocuments.js +22 -27
  262. package/lib/hooks/useShowDossiersV5.d.ts +12 -0
  263. package/lib/hooks/useShowDossiersV5.js +37 -0
  264. package/lib/hooks/useTMDistinctValuesMetadataDisplay.d.ts +18 -0
  265. package/lib/hooks/useTMDistinctValuesMetadataDisplay.js +103 -0
  266. package/lib/hooks/useTMDistinctValuesQuickSearch.d.ts +49 -0
  267. package/lib/hooks/useTMDistinctValuesQuickSearch.js +307 -0
  268. package/lib/hooks/useTMDistinctValuesSelection.d.ts +42 -0
  269. package/lib/hooks/useTMDistinctValuesSelection.js +103 -0
  270. package/lib/hooks/useTMDistinctValuesSource.d.ts +29 -0
  271. package/lib/hooks/useTMDistinctValuesSource.js +105 -0
  272. package/lib/hooks/useWorkflowApprove.js +33 -17
  273. package/lib/index.d.ts +2 -0
  274. package/lib/index.js +5 -2
  275. package/lib/services/caseflow/CaseFlowService.d.ts +277 -0
  276. package/lib/services/caseflow/CaseFlowService.js +761 -0
  277. package/lib/services/caseflow/CaseFlowTemplateCacheService.d.ts +28 -0
  278. package/lib/services/caseflow/CaseFlowTemplateCacheService.js +121 -0
  279. package/lib/services/caseflow/caseFlowNameCache.d.ts +32 -0
  280. package/lib/services/caseflow/caseFlowNameCache.js +116 -0
  281. package/lib/services/caseflow/caseFlowWorkItemUtils.d.ts +61 -0
  282. package/lib/services/caseflow/caseFlowWorkItemUtils.js +113 -0
  283. package/lib/services/index.d.ts +4 -0
  284. package/lib/services/index.js +4 -0
  285. package/lib/services/platform_services.d.ts +4 -4
  286. package/package.json +16 -13
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const TMAppUpdatedModal: () => React.JSX.Element | null;
@@ -0,0 +1,134 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useState } from 'react';
3
+ import styled from 'styled-components';
4
+ import { AppModules, SDK_Globals } from '@topconsultnpm/sdk-ts';
5
+ import { useDeviceType, TMModal } from '../components';
6
+ import { calcResponsiveSizes, WHATS_NEWS_LINK_URL } from './helpers';
7
+ import { SDKUI_Globals } from './SDKUI_Globals';
8
+ import { SDKUI_Localizator } from './SDKUI_Localizator';
9
+ import { IconUpdate, IconOpenInNew } from './TMIcons';
10
+ import { getAppModuleButtonColors } from './TMUtils';
11
+ const Content = styled.div `
12
+ display: flex;
13
+ flex-direction: column;
14
+ width: 100%;
15
+ background-color: #ffffff;
16
+ `;
17
+ const Header = styled.div `
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ gap: 14px;
22
+ padding: 32px 30px 26px 30px;
23
+ background-color: ${({ $backgroundColor }) => $backgroundColor};
24
+ color: #ffffff;
25
+ text-align: center;
26
+ `;
27
+ const HeaderIcon = styled.div `
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ width: 68px;
32
+ height: 68px;
33
+ border-radius: 50%;
34
+ background-color: rgba(255, 255, 255, 0.18);
35
+ border: 1px solid rgba(255, 255, 255, 0.35);
36
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
37
+ `;
38
+ const HeaderTitle = styled.h2 `
39
+ margin: 0;
40
+ font-size: 22px;
41
+ font-weight: 600;
42
+ letter-spacing: 0.2px;
43
+ `;
44
+ const VersionBadge = styled.span `
45
+ display: inline-block;
46
+ padding: 4px 12px;
47
+ border-radius: 999px;
48
+ background-color: rgba(255, 255, 255, 0.22);
49
+ border: 1px solid rgba(255, 255, 255, 0.4);
50
+ font-size: 13px;
51
+ font-weight: 600;
52
+ letter-spacing: 0.3px;
53
+ `;
54
+ const Body = styled.div `
55
+ display: flex;
56
+ flex-direction: column;
57
+ gap: 10px;
58
+ padding: 26px 30px 22px 30px;
59
+ text-align: center;
60
+ `;
61
+ const Message = styled.p `
62
+ margin: 0;
63
+ font-size: 15px;
64
+ line-height: 1.6;
65
+ color: #242424;
66
+ `;
67
+ const SubMessage = styled.p `
68
+ margin: 0;
69
+ font-size: 13px;
70
+ line-height: 1.6;
71
+ color: #6b6b6b;
72
+ `;
73
+ const Footer = styled.div `
74
+ display: flex;
75
+ flex-direction: row;
76
+ justify-content: center;
77
+ align-items: center;
78
+ flex-wrap: wrap;
79
+ gap: 12px;
80
+ padding: 0 30px 28px 30px;
81
+ `;
82
+ const BaseButton = styled.button `
83
+ display: inline-flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ gap: 8px;
87
+ min-width: 150px;
88
+ padding: 10px 18px;
89
+ border-radius: 8px;
90
+ font-size: 14px;
91
+ font-weight: 600;
92
+ cursor: pointer;
93
+ transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
94
+ `;
95
+ const PrimaryButton = styled(BaseButton) `
96
+ border: 1px solid ${({ $base }) => $base};
97
+ background-color: ${({ $base }) => $base};
98
+ color: #ffffff;
99
+
100
+ &:hover {
101
+ background-color: ${({ $hover }) => $hover};
102
+ border-color: ${({ $hover }) => $hover};
103
+ box-shadow: 0 2px 8px ${({ $shadow }) => $shadow};
104
+ }
105
+ `;
106
+ const SecondaryButton = styled(BaseButton) `
107
+ border: 1px solid #d5d5d5;
108
+ background-color: #ffffff;
109
+ color: #444444;
110
+
111
+ &:hover {
112
+ background-color: #f3f3f3;
113
+ border-color: #bdbdbd;
114
+ }
115
+ `;
116
+ export const TMAppUpdatedModal = () => {
117
+ const deviceType = useDeviceType();
118
+ const currentVersion = SDK_Globals.appVersion ?? '';
119
+ const appModuleID = SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER;
120
+ const appModuleColors = useMemo(() => getAppModuleButtonColors(appModuleID), [appModuleID]);
121
+ const [previousVersion] = useState(() => SDKUI_Globals.userSettings.lastSeenAppVersion ?? '');
122
+ const [isOpen, setIsOpen] = useState(() => currentVersion !== '' && previousVersion !== currentVersion);
123
+ useEffect(() => {
124
+ if (!isOpen)
125
+ return;
126
+ SDKUI_Globals.userSettings.lastSeenAppVersion = currentVersion;
127
+ }, [isOpen, currentVersion]);
128
+ const onClose = () => { setIsOpen(false); };
129
+ if (!isOpen)
130
+ return null;
131
+ return (_jsx(TMModal, { width: calcResponsiveSizes(deviceType, '520px', '520px', '95%'), height: 'auto', showHeader: false, resizable: false, onClose: onClose, children: _jsxs(Content, { children: [_jsxs(Header, { $backgroundColor: appModuleColors.base, children: [_jsx(HeaderIcon, { children: _jsx(IconUpdate, { fontSize: 34 }) }), _jsx(HeaderTitle, { children: SDKUI_Localizator.AppUpdatedTitle }), _jsx(VersionBadge, { children: `${SDK_Globals.appModule} ${currentVersion}` })] }), _jsxs(Body, { children: [_jsx(Message, { children: previousVersion
132
+ ? SDKUI_Localizator.AppUpdatedMessageFromTo.replaceParams(previousVersion, currentVersion)
133
+ : SDKUI_Localizator.AppUpdatedMessage.replaceParams(currentVersion) }), _jsx(SubMessage, { children: SDKUI_Localizator.AppUpdatedSubMessage })] }), _jsxs(Footer, { children: [_jsxs(PrimaryButton, { $base: appModuleColors.base, $hover: appModuleColors.hover, $shadow: appModuleColors.shadow, onClick: () => window.open(WHATS_NEWS_LINK_URL, '_blank', 'noopener,noreferrer'), children: [_jsx(IconOpenInNew, { fontSize: 18 }), SDKUI_Localizator.DiscoverWhatsNew] }), _jsx(SecondaryButton, { onClick: onClose, children: SDKUI_Localizator.Close })] })] }) }));
134
+ };
@@ -271,6 +271,7 @@ export declare function IconWizard4(props: React.SVGProps<SVGSVGElement>): React
271
271
  export declare function IconNew(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
272
272
  export declare function IconFileOpenOutline(props: Readonly<React.SVGProps<SVGSVGElement>>): React.JSX.Element;
273
273
  export declare function IconArchiveDetail(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
274
+ export declare function IconArchiveMultipleDetailDocuments(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
274
275
  export declare function IconArchiveMaster(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
275
276
  export declare function IconPair(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
276
277
  export declare function IconUnpair(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -497,9 +497,7 @@ function IconLock(props) { return (_jsxs("svg", { fontSize: props.fontSize ? pro
497
497
  function IconLockClosed(props) { return (_jsxs("svg", { fontSize: props?.fontSize ? props?.fontSize : FONTSIZE, viewBox: "0 0 24 24", fill: "currentColor", height: "1em", width: "1em", ...props, children: [" ", _jsx("path", { d: "M7 10V7a5 5 0 1110 0v3h2a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2v-8c0-1.1.9-2 2-2h2zm2 0h6V7a3 3 0 00-6 0v3zm-4 2v8h14v-8H5zm7 2a1 1 0 011 1v2a1 1 0 01-2 0v-2a1 1 0 011-1z" }), " "] })); }
498
498
  function IconBxLock(props) { return (_jsxs("svg", { fontSize: props?.fontSize ? props.fontSize : FONTSIZE, viewBox: "0 0 24 24", fill: "currentColor", height: "1em", width: "1em", ...props, children: [" ", _jsx("path", { d: "M12 2C9.243 2 7 4.243 7 7v2H6c-1.103 0-2 .897-2 2v9c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-9c0-1.103-.897-2-2-2h-1V7c0-2.757-2.243-5-5-5zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v2H9V7zm9.002 13H13v-2.278c.595-.347 1-.985 1-1.722 0-1.103-.897-2-2-2s-2 .897-2 2c0 .736.405 1.375 1 1.722V20H6v-9h12l.002 9z" }), " "] })); }
499
499
  function IconFolder(props) {
500
- return (
501
- // <svg fontSize={props?.fontSize ? props?.fontSize : FONTSIZE} viewBox="0 0 1024 1024" fill="currentColor" height="1em" width="1em" {...props} > <path d="M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32z" /> </svg>
502
- _jsx("svg", { focusable: "false", viewBox: "0 0 24 24", height: "1em", width: "1em", ...props, fill: "currentColor", children: _jsxs("g", { children: [_jsx("path", { d: "M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" }), _jsx("path", { d: "M0 0h24v24H0z", fill: "none" })] }) }));
500
+ return (_jsx("svg", { focusable: "false", viewBox: "0 0 24 24", height: "1em", width: "1em", ...props, fill: "currentColor", children: _jsxs("g", { children: [_jsx("path", { d: "M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" }), _jsx("path", { d: "M0 0h24v24H0z", fill: "none" })] }) }));
503
501
  }
504
502
  export function IconFolderForCSS({ fill = "#9fc6e7", ...props }) {
505
503
  return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "20", height: "20", ...props, children: _jsxs("g", { children: [_jsx("path", { d: "M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z", fill: fill }), _jsx("path", { d: "M0 0h24v24H0z", fill: "none" })] }) }));
@@ -673,6 +671,9 @@ export function IconFileOpenOutline(props) {
673
671
  export function IconArchiveDetail(props) {
674
672
  return (_jsxs("svg", { fontSize: props.fontSize ?? FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: [" ", _jsx("path", { fill: "currentColor", d: "m20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27M12 17.5L6.5 12H10v-2h4v2h3.5zM5.12 5l.81-1h12l.94 1z" }), " "] }));
675
673
  }
674
+ export function IconArchiveMultipleDetailDocuments(props) {
675
+ return (_jsxs("svg", { fontSize: props.fontSize ?? FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", width: "1em", height: "1em", ...props, children: [_jsx("path", { fill: "currentColor", d: "M40,35v5H8v-5H4v5c0,2.2,1.8,4,4,4h32c2.2,0,4-1.8,4-4v-5H40z" }), _jsxs("g", { fill: "currentColor", children: [_jsx("polygon", { points: "24,23.4 17,15 31,15" }), _jsx("rect", { x: "22", y: "4", width: "4", height: "14" }), _jsx("path", { d: "M31.5,26.9L30.8,28l3.5,1.9l0.6-1.2c1.6-3,2.6-4.7,3.5-5.2C39.3,23,41,23,44,23v-4C36.3,19,35.6,19.4,31.5,26.9z" }), _jsx("polygon", { points: "38.4,31 29.4,35 28,25" }), _jsx("path", { d: "M16.5,26.9l0.6,1.2L13.6,30L13,28.8c-1.6-3-2.6-4.7-3.5-5.2C8.7,23,7,23,4,23v-4C11.7,19,12.4,19.4,16.5,26.9z" }), _jsx("polygon", { points: "20,25 18.6,35 9.6,31" })] })] }));
676
+ }
676
677
  export function IconArchiveMaster(props) {
677
678
  return (_jsxs("svg", { fontSize: props.fontSize ?? FONTSIZE, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: [" ", _jsx("path", { fill: "currentColor", d: "m20.55 5.22l-1.39-1.68A1.51 1.51 0 0 0 18 3H6c-.47 0-.88.21-1.15.55L3.46 5.22C3.17 5.57 3 6.01 3 6.5V19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6.5c0-.49-.17-.93-.45-1.28M12 9.5l5.5 5.5H14v2h-4v-2H6.5zM5.12 5l.82-1h12l.93 1z" }), " "] }));
678
679
  }
@@ -1,4 +1,4 @@
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 { useEffect, useState, useRef, useCallback, Component } from "react";
3
3
  import styled from "styled-components";
4
4
  import { LoadIndicator } from 'devextreme-react/load-indicator';
@@ -42,6 +42,6 @@ const StyledToppyImage = styled.img `
42
42
  `;
43
43
  const TMToppyMessage = (props) => {
44
44
  const { message, titleTooltip, maxWidth } = props;
45
- return (_jsxs(TMLayoutContainer, { gap: 30, alignItems: "center", justifyContent: "center", onContextMenu: (e) => e.preventDefault(), children: [_jsx(StyledToppyTextContainer, { "$maxWidth": maxWidth, children: _jsx(StyledToppyText, { title: titleTooltip || undefined, children: message }) }), _jsx(StyledToppyImage, { src: Toppy, alt: "Toppy", draggable: false, onMouseDown: (e) => e.stopPropagation() })] }));
45
+ return (_jsxs(TMLayoutContainer, { gap: 30, alignItems: "center", justifyContent: "center", onContextMenu: (e) => e.preventDefault(), children: [_jsx(StyledToppyTextContainer, { $maxWidth: maxWidth, children: _jsx(StyledToppyText, { title: titleTooltip || undefined, children: message }) }), _jsx(StyledToppyImage, { src: Toppy, alt: "Toppy", draggable: false, onMouseDown: (e) => e.stopPropagation() })] }));
46
46
  };
47
47
  export default TMToppyMessage;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FileItem } from '../components';
3
- import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, MetadataDescriptor, PdGs, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
3
+ import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, MetadataDescriptor, MetadataFormats, PdGs, SearchResultDescriptor } from '@topconsultnpm/sdk-ts';
4
4
  /**
5
5
  * Estensioni di firma/marca temporale note che possono avvolgere altre estensioni.
6
6
  * Es: file.pdf.p7m, file.xml.p7m, file.docx.p7m, file.xml.p7m.ts
@@ -42,22 +42,41 @@ export declare const isCreateCertificateEnabled: (widgetsString: string) => bool
42
42
  export declare const isPdfEditorEnabled: (widgetsString: string) => boolean;
43
43
  /** Verifica se l'editor PDF è disponibile: richiede file PDF, licenza attiva e widget abilitato sul tipo documento. */
44
44
  export declare const isPdfEditorAvailable: (fromDTD: DcmtTypeDescriptor | undefined, ext: string | undefined) => boolean;
45
+ /** Verifica se il tipo documento è quello delle bozze dei gruppi di lavoro. */
46
+ export declare const isDraftsDTD: (dtd: DcmtTypeDescriptor | undefined) => boolean;
47
+ /** Verifica se il tipo documento non è autorizzato per l'utente corrente. */
48
+ export declare const isNotGrantedDTD: (dtd: DcmtTypeDescriptor | undefined) => boolean;
49
+ /** Verifica se il tipo documento è quello delle bozze dei gruppi di lavoro non autorizzato, e quindi privo di permessi. */
50
+ export declare const isNotGrantedDraftsDTD: (dtd: DcmtTypeDescriptor | undefined) => boolean;
45
51
  interface TabItemProps {
46
52
  $isSelected: boolean;
47
53
  $activeGradient?: string;
48
54
  }
49
- export declare const StyledTabItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof TabItemProps> & TabItemProps, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof TabItemProps> & TabItemProps, never>>> & string;
50
- export declare const StyledTabIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, keyof TabItemProps> & TabItemProps, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, keyof TabItemProps> & TabItemProps, never>>> & string;
51
- export declare const TMCountBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
55
+ export declare const StyledTabItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
56
+ style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
57
+ }, TabItemProps>> & string;
58
+ export declare const StyledTabIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "style"> & {
59
+ style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
60
+ }, TabItemProps>> & string;
61
+ export declare const TMCountBadge: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
62
+ style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
63
+ }> & string;
52
64
  export declare const PDGS_COLORS: {
53
65
  DOSSIER: string;
54
66
  DOCUMENT: string;
55
67
  WORKING_GROUP: string;
68
+ /** Istanza di CaseFlow: viola, per non confonderla ne' con la pratica (arancio) ne' con il gruppo di lavoro (verde). */
69
+ CASEFLOW: string;
56
70
  };
57
71
  export declare const getPdgsIconMap: (fontSize?: number) => Map<PdGs, JSX.Element>;
58
72
  export declare const convertSearchResultDescriptorToFileItems: (documents: Array<SearchResultDescriptor>) => Array<FileItem>;
59
73
  export declare const getAppModuleGradient: (appModuleID: AppModules) => string;
60
74
  export declare const getPanelManagerToolbarColor: (appModuleID: AppModules) => string;
75
+ export declare const getAppModuleButtonColors: (appModuleID: AppModules) => {
76
+ base: string;
77
+ hover: string;
78
+ shadow: string;
79
+ };
61
80
  export declare const getFileManagerFolderColor: (appModuleID: AppModules) => string;
62
81
  type SearchToolbarVisibility = {
63
82
  tmSearchResult: boolean;
@@ -109,4 +128,32 @@ export declare enum DcmtDisplayNameMethod {
109
128
  * Se i metadati non sono presenti nel dtd, li recupera dalla cache.
110
129
  */
111
130
  export declare const getDTDDisplayNameInfo: (dtd: DcmtTypeDescriptor | undefined) => Promise<string>;
131
+ export declare const getCurrencySymbol: (format: MetadataFormats | undefined) => string | undefined;
132
+ /** Estrae Format e FormatCulture dalle proprietà estese di una colonna. */
133
+ export declare const getColumnFormatInfo: (col: DataColumnDescriptor) => {
134
+ format: MetadataFormats;
135
+ formatCulture: string;
136
+ };
137
+ /**
138
+ * Restituisce il pattern di formato DevExtreme per DateBox basato su MetadataFormats e cultura.
139
+ * Usa la stessa logica di formatDateTimeByMetadataFormat per garantire coerenza.
140
+ * Supporta: IT (it-IT), GB (en-GB), US (en-US), JP (ja-JP)
141
+ */
142
+ export declare const getDevExtremeDateDisplayFormat: (format: MetadataFormats | undefined, formatCulture?: string) => string;
143
+ /** Formatta una data secondo MetadataFormats e cultura. */
144
+ export declare const formatDateTimeByMetadataFormat: (value: Date, format: MetadataFormats | undefined, formatCulture: string | undefined | null) => string;
145
+ /** Formatta un numero secondo MetadataFormats e cultura. Valute con simbolo e 2 decimali (0 per Yen). */
146
+ export declare const formatNumberByMetadataFormat: (value: number | string, format: MetadataFormats | undefined, formatCulture: string) => string;
147
+ /** Converte un valore in data locale. Restituisce il valore originale se il parsing fallisce. */
148
+ export declare const safeParseDateToLocaleString: (value: any) => string;
149
+ /**
150
+ * Trova un DataColumnDescriptor corrispondente a un dataField (formato TID_MID).
151
+ * Cerca prima per MID nelle extendedProperties, poi per caption.
152
+ */
153
+ export declare const findDataColumnByField: (columns: DataColumnDescriptor[], dataField: string | undefined, caption?: string) => DataColumnDescriptor | undefined;
154
+ /**
155
+ * Formatta un valore per l'export in base al tipo di colonna.
156
+ * Gestisce date, numeri e valute secondo il formato definito nella colonna.
157
+ */
158
+ export declare const formatValueForExport: (value: any, dataCol: DataColumnDescriptor | undefined, fallbackDataType?: string) => string;
112
159
  export {};
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from "styled-components";
3
3
  import { TMTooltip } from '../components';
4
4
  import { IconCADossier, IconKey, IconMenuCAWorkingGroups } from './TMIcons';
5
- import { AccessLevels, AppModules, DataListCacheService, DcmtTypeListCacheService, LicenseModuleStatus, MetadataDataDomains, PdGs, SDK_Globals, SystemMIDs } from '@topconsultnpm/sdk-ts';
5
+ import { AccessLevels, AppModules, DataColumnTypes, DataListCacheService, DcmtTypeListCacheService, LicenseModuleStatus, MetadataDataDomains, MetadataFormats, PdGs, SDK_Globals, SystemMIDs, SystemTIDs } from '@topconsultnpm/sdk-ts';
6
6
  import { SDKUI_Localizator } from './SDKUI_Localizator';
7
7
  /**
8
8
  * Estensioni di firma/marca temporale note che possono avvolgere altre estensioni.
@@ -137,7 +137,7 @@ export const getFileIcon = (fileExtension, fileCount, tooltipContent) => {
137
137
  fileBgColor = '#576D7E';
138
138
  break;
139
139
  }
140
- return (_jsx(StyledIconFileContainer, { children: _jsx(StyledIconFileExt, { "$backgroundColor": (fileCount === 0 || !fileExtension) ? "#424040" : fileBgColor, "$color": fileColor, children: (fileCount === 0 || !fileExtOri)
140
+ return (_jsx(StyledIconFileContainer, { children: _jsx(StyledIconFileExt, { $backgroundColor: (fileCount === 0 || !fileExtension) ? "#424040" : fileBgColor, $color: fileColor, children: (fileCount === 0 || !fileExtOri)
141
141
  ? _jsxs(TMTooltip, { content: SDKUI_Localizator.MetadataOnlyDocument, children: [" ", _jsx(IconKey, { fontSize: 17, color: '#f8d775' }), " "] })
142
142
  : _jsx(TMTooltip, { content: tooltipContent ?? fileExtOri, children: fileExtension.toUpperCase() }) }) }));
143
143
  };
@@ -242,6 +242,14 @@ export const isPdfEditorAvailable = (fromDTD, ext) => {
242
242
  const isPdfEditorLicensed = SDK_Globals?.license?.dcmtArchiveLicenses?.[0]?.siX_60007?.status === LicenseModuleStatus.Licensed;
243
243
  return isPdfEditorLicensed && isPdfEditorEnabled(fromDTD.widgets);
244
244
  };
245
+ /** Valore di customData2 con cui il server marca i tipi documento non autorizzati per l'utente corrente. */
246
+ const NOT_GRANTED_DTD = 'NOTGRANTED';
247
+ /** Verifica se il tipo documento è quello delle bozze dei gruppi di lavoro. */
248
+ export const isDraftsDTD = (dtd) => dtd?.id === SystemTIDs.Drafts;
249
+ /** Verifica se il tipo documento non è autorizzato per l'utente corrente. */
250
+ export const isNotGrantedDTD = (dtd) => dtd?.customData2 === NOT_GRANTED_DTD;
251
+ /** Verifica se il tipo documento è quello delle bozze dei gruppi di lavoro non autorizzato, e quindi privo di permessi. */
252
+ export const isNotGrantedDraftsDTD = (dtd) => !!dtd && !dtd.perm && isDraftsDTD(dtd) && isNotGrantedDTD(dtd);
245
253
  export const StyledTabItem = styled.div `
246
254
  display: flex;
247
255
  align-items: center;
@@ -270,6 +278,8 @@ export const PDGS_COLORS = {
270
278
  DOSSIER: '#e65b00',
271
279
  DOCUMENT: '#b38600',
272
280
  WORKING_GROUP: '#009700',
281
+ /** Istanza di CaseFlow: viola, per non confonderla ne' con la pratica (arancio) ne' con il gruppo di lavoro (verde). */
282
+ CASEFLOW: '#6a3fb5',
273
283
  };
274
284
  export const getPdgsIconMap = (fontSize = 20) => {
275
285
  return new Map([
@@ -336,7 +346,7 @@ export const getAppModuleGradient = (appModuleID) => {
336
346
  case AppModules.SURFER:
337
347
  return 'linear-gradient(270deg, #46B5A2 16%, #3BAABC 34%, #3BAABC 34%, #3681AD 54%, #3368A5 72%, #2F549D 88%, #304F99 100%)';
338
348
  case AppModules.DESIGNER:
339
- return 'linear-gradient(270deg, #A06A8E 16%, #885C77 34%, #6F4C5F 54%, #5A3446 72%, #482234 100%);';
349
+ return 'linear-gradient(270deg, #A06A8E 16%, #885C77 34%, #6F4C5F 54%, #5A3446 72%, #482234 100%)';
340
350
  case AppModules.ORCHESTRATOR:
341
351
  return 'linear-gradient(270deg, #46B5A2 16%, #3BAA8A 34%, #2F8F6F 54%, #277A5A 72%, #216948 88%, #1d6f42 100%)';
342
352
  default:
@@ -355,6 +365,18 @@ export const getPanelManagerToolbarColor = (appModuleID) => {
355
365
  return 'transparent linear-gradient(90deg, #CCE0F4 0%, #7EC1E7 14%, #39A6DB 28%, #1E9CD7 35%, #0075BE 78%, #005B97 99%) 0% 0% no-repeat padding-box';
356
366
  }
357
367
  };
368
+ export const getAppModuleButtonColors = (appModuleID) => {
369
+ switch (appModuleID) {
370
+ case AppModules.SURFER:
371
+ return { base: '#2559a5', hover: '#1c4783', shadow: 'rgba(37, 89, 165, 0.35)' };
372
+ case AppModules.DESIGNER:
373
+ return { base: '#482234', hover: '#351826', shadow: 'rgba(72, 34, 52, 0.35)' };
374
+ case AppModules.ORCHESTRATOR:
375
+ return { base: '#1d6f42', hover: '#15532f', shadow: 'rgba(29, 111, 66, 0.35)' };
376
+ default:
377
+ return { base: '#2559a5', hover: '#1c4783', shadow: 'rgba(37, 89, 165, 0.35)' };
378
+ }
379
+ };
358
380
  export const getFileManagerFolderColor = (appModuleID) => {
359
381
  switch (appModuleID) {
360
382
  case AppModules.SURFER:
@@ -439,16 +461,10 @@ export const buildDcmtDisplayName = (obj) => {
439
461
  if (!obj)
440
462
  return [];
441
463
  const sysAbstractKey = Object.keys(obj).find(k => k.toUpperCase() === 'SYS_ABSTRACT');
442
- if (sysAbstractKey) {
443
- if (obj[sysAbstractKey]?.value) {
444
- return [sysAbstractKey];
445
- }
446
- // SYS_Abstract esiste ma è vuoto: usa DID se presente, altrimenti continua con la logica standard
447
- const didKey = Object.keys(obj).find(k => k.toUpperCase() === 'DID');
448
- if (didKey && obj[didKey]?.value) {
449
- return [didKey];
450
- }
464
+ if (sysAbstractKey && obj[sysAbstractKey]?.value) {
465
+ return [sysAbstractKey];
451
466
  }
467
+ // SYS_Abstract esiste ma è vuoto: continua con la logica standard
452
468
  const keys = Object.keys(obj);
453
469
  const sysMIDs = Object.values(SystemMIDs).map(o => o.toUpperCase());
454
470
  const viewableMetadataKeys = keys.filter(k => obj?.[k]?.value &&
@@ -461,6 +477,7 @@ export const buildDcmtDisplayName = (obj) => {
461
477
  if (specialOutputKeys.length > 0) {
462
478
  return specialOutputKeys;
463
479
  }
480
+ // Se non ci sono metadati speciali, restituisci i primi 5 metadati non di sistema con permesso canView
464
481
  if (viewableMetadataKeys.length > 0) {
465
482
  return viewableMetadataKeys.slice(0, 5);
466
483
  }
@@ -533,3 +550,247 @@ export const getDTDDisplayNameInfo = async (dtd) => {
533
550
  return SDKUI_Localizator.DisplayNameMethod_Top5;
534
551
  }
535
552
  };
553
+ export const getCurrencySymbol = (format) => {
554
+ switch (format) {
555
+ case MetadataFormats.CurrencyEuro: return '€';
556
+ case MetadataFormats.CurrencyDollar: return '$';
557
+ case MetadataFormats.CurrencyPound: return '£';
558
+ case MetadataFormats.CurrencyYen: return '¥';
559
+ default: return undefined;
560
+ }
561
+ };
562
+ /** Estrae Format e FormatCulture dalle proprietà estese di una colonna. */
563
+ export const getColumnFormatInfo = (col) => {
564
+ const format = MetadataFormats[(col.extendedProperties?.["Format"] ?? "None")];
565
+ const formatCulture = col.extendedProperties?.["FormatCulture"] ?? window.navigator.language;
566
+ return { format, formatCulture };
567
+ };
568
+ /**
569
+ * Restituisce il pattern di formato DevExtreme per DateBox basato su MetadataFormats e cultura.
570
+ * Usa la stessa logica di formatDateTimeByMetadataFormat per garantire coerenza.
571
+ * Supporta: IT (it-IT), GB (en-GB), US (en-US), JP (ja-JP)
572
+ */
573
+ export const getDevExtremeDateDisplayFormat = (format, formatCulture) => {
574
+ try {
575
+ const culture = (formatCulture ?? window.navigator.language).toLowerCase();
576
+ const isItalian = culture === 'it-it' || culture.startsWith('it');
577
+ const isUS = culture === 'en-us';
578
+ const isGB = culture === 'en-gb';
579
+ const isJP = culture === 'ja-jp' || culture.startsWith('ja');
580
+ // Formati data base per cultura (coerenti con formatDateTimeByMetadataFormat)
581
+ const getShortDate = () => {
582
+ if (isItalian)
583
+ return 'dd/MM/yyyy'; // 17/07/2026
584
+ if (isUS)
585
+ return 'M/d/yyyy'; // 7/17/2026
586
+ if (isGB)
587
+ return 'dd/MM/yyyy'; // 17/07/2026
588
+ if (isJP)
589
+ return 'yyyy/MM/dd'; // 2026/07/17
590
+ return 'dd/MM/yyyy'; // default
591
+ };
592
+ const getLongDate = () => {
593
+ if (isItalian)
594
+ return 'EEEE d MMMM yyyy'; // lunedì 17 luglio 2026
595
+ if (isUS)
596
+ return 'EEEE, MMMM d, yyyy'; // Monday, July 17, 2026
597
+ if (isGB)
598
+ return 'd MMMM yyyy'; // 17 July 2026 (senza weekday)
599
+ if (isJP)
600
+ return 'yyyy年M月d日'; // 2026年7月17日 (senza weekday)
601
+ return 'd MMMM yyyy'; // default (senza weekday)
602
+ };
603
+ // Formati ora per cultura (US usa 12h con AM/PM, altri usano 24h)
604
+ const getShortTime = () => {
605
+ if (isUS)
606
+ return 'h:mm a'; // 3:30 PM
607
+ return 'HH:mm'; // 15:30
608
+ };
609
+ const getLongTime = () => {
610
+ if (isUS)
611
+ return 'h:mm:ss a'; // 3:30:45 PM
612
+ return 'HH:mm:ss'; // 15:30:45
613
+ };
614
+ const shortDate = getShortDate();
615
+ const longDate = getLongDate();
616
+ const shortTime = getShortTime();
617
+ const longTime = getLongTime();
618
+ switch (format) {
619
+ case MetadataFormats.ShortDate:
620
+ return shortDate;
621
+ case MetadataFormats.LongDate:
622
+ return longDate;
623
+ case MetadataFormats.ShortTime:
624
+ return shortTime;
625
+ case MetadataFormats.LongTime:
626
+ return longTime;
627
+ case MetadataFormats.ShortDateShortTime:
628
+ return `${shortDate} ${shortTime}`;
629
+ case MetadataFormats.ShortDateLongTime:
630
+ return `${shortDate} ${longTime}`;
631
+ case MetadataFormats.LongDateShortTime:
632
+ return `${longDate} ${shortTime}`;
633
+ case MetadataFormats.LongDateLongTime:
634
+ return `${longDate} ${longTime}`;
635
+ default:
636
+ return shortDate;
637
+ }
638
+ }
639
+ catch {
640
+ // Fallback: restituisce formato data breve di default
641
+ return 'dd/MM/yyyy';
642
+ }
643
+ };
644
+ /** Formatta una data secondo MetadataFormats e cultura. */
645
+ export const formatDateTimeByMetadataFormat = (value, format, formatCulture) => {
646
+ try {
647
+ // Fallback sicuro per formatCulture
648
+ const safeCulture = (formatCulture && typeof formatCulture === 'string' && formatCulture.trim()) ? formatCulture.trim() : window.navigator.language;
649
+ const culture = safeCulture.toLowerCase();
650
+ // Culture che includono il giorno della settimana nei formati lunghi
651
+ const includeWeekday = culture === 'it-it' || culture === 'en-us';
652
+ // Opzioni per data lunga (con o senza giorno settimana)
653
+ const longDateOptions = includeWeekday
654
+ ? { weekday: "long", year: "numeric", month: "long", day: "numeric" }
655
+ : { year: "numeric", month: "long", day: "numeric" };
656
+ // Opzioni ShortDate: IT usa dd/MM/yyyy, US usa M/d/yyyy (anno a 4 cifre), altri usano dateStyle: 'short'
657
+ const getShortDateOptions = () => {
658
+ if (culture === "it-it")
659
+ return { year: "numeric", month: "2-digit", day: "2-digit" };
660
+ if (culture === "en-us")
661
+ return { year: "numeric", month: "numeric", day: "numeric" };
662
+ return { dateStyle: 'short' };
663
+ };
664
+ switch (format) {
665
+ case MetadataFormats.ShortDate:
666
+ return value.toLocaleString(safeCulture, getShortDateOptions());
667
+ case MetadataFormats.ShortTime:
668
+ return value.toLocaleString(safeCulture, { timeStyle: 'short' });
669
+ case MetadataFormats.ShortDateLongTime:
670
+ if (culture === "it-it")
671
+ return value.toLocaleString(safeCulture, { year: "numeric", month: "2-digit", day: "2-digit", hour: '2-digit', minute: '2-digit', second: '2-digit' }).replace(',', '');
672
+ if (culture === "en-us")
673
+ return value.toLocaleString(safeCulture, { year: "numeric", month: "numeric", day: "numeric", hour: 'numeric', minute: '2-digit', second: '2-digit' }).replace(',', '');
674
+ return value.toLocaleString(safeCulture, { dateStyle: 'short', timeStyle: 'medium' }).replace(',', '');
675
+ case MetadataFormats.ShortDateShortTime:
676
+ if (culture === "it-it")
677
+ return value.toLocaleString(safeCulture, { year: "numeric", month: "2-digit", day: "2-digit", hour: '2-digit', minute: '2-digit' }).replace(',', '');
678
+ if (culture === "en-us")
679
+ return value.toLocaleString(safeCulture, { year: "numeric", month: "numeric", day: "numeric", hour: 'numeric', minute: '2-digit' }).replace(',', '');
680
+ return value.toLocaleString(safeCulture, { dateStyle: 'short', timeStyle: 'short' }).replace(',', '');
681
+ case MetadataFormats.LongDate:
682
+ return value.toLocaleString(safeCulture, longDateOptions);
683
+ case MetadataFormats.LongTime:
684
+ return value.toLocaleString(safeCulture, { timeStyle: 'medium' });
685
+ case MetadataFormats.LongDateLongTime: {
686
+ const datePart = value.toLocaleString(safeCulture, longDateOptions);
687
+ const timePart = value.toLocaleString(safeCulture, culture === "en-us" ? { hour: 'numeric', minute: '2-digit', second: '2-digit' } : { hour: '2-digit', minute: '2-digit', second: '2-digit' });
688
+ return `${datePart} ${timePart}`;
689
+ }
690
+ case MetadataFormats.LongDateShortTime: {
691
+ const datePart = value.toLocaleString(safeCulture, longDateOptions);
692
+ const timePart = value.toLocaleString(safeCulture, culture === "en-us" ? { hour: 'numeric', minute: '2-digit' } : { hour: '2-digit', minute: '2-digit' });
693
+ return `${datePart} ${timePart}`;
694
+ }
695
+ default:
696
+ return value.toLocaleString(safeCulture, getShortDateOptions());
697
+ }
698
+ }
699
+ catch {
700
+ // Fallback: restituisce la data in formato ISO se la conversione fallisce
701
+ return value?.toISOString?.() ?? String(value);
702
+ }
703
+ };
704
+ /** Formatta un numero secondo MetadataFormats e cultura. Valute con simbolo e 2 decimali (0 per Yen). */
705
+ export const formatNumberByMetadataFormat = (value, format, formatCulture) => {
706
+ try {
707
+ const numValue = typeof value === 'number' ? value : Number(value);
708
+ if (isNaN(numValue))
709
+ return String(value);
710
+ const currencySymbol = getCurrencySymbol(format);
711
+ if (currencySymbol) {
712
+ const decimals = format === MetadataFormats.CurrencyYen ? 0 : 2;
713
+ return `${currencySymbol} ${numValue.toLocaleString(formatCulture, { useGrouping: true, minimumFractionDigits: decimals, maximumFractionDigits: decimals })}`;
714
+ }
715
+ return numValue.toLocaleString(formatCulture, { useGrouping: format == MetadataFormats.NumberWithThousandsSeparator });
716
+ }
717
+ catch {
718
+ // Fallback: restituisce il valore come stringa se la conversione fallisce
719
+ return String(value);
720
+ }
721
+ };
722
+ /** Converte un valore in data locale. Restituisce il valore originale se il parsing fallisce. */
723
+ export const safeParseDateToLocaleString = (value) => {
724
+ try {
725
+ if (!value)
726
+ return value ?? '';
727
+ const parsedDate = new Date(value);
728
+ if (!isNaN(parsedDate.getTime())) {
729
+ return parsedDate.toLocaleDateString();
730
+ }
731
+ }
732
+ catch {
733
+ // Keep original value if parsing fails
734
+ }
735
+ return String(value ?? '');
736
+ };
737
+ /**
738
+ * Trova un DataColumnDescriptor corrispondente a un dataField (formato TID_MID).
739
+ * Cerca prima per MID nelle extendedProperties, poi per caption.
740
+ */
741
+ export const findDataColumnByField = (columns, dataField, caption) => {
742
+ // Se l'array di colonne è vuoto/null o il dataField non è definito, ritorna undefined (nessuna corrispondenza possibile)
743
+ if (!columns || !dataField)
744
+ return undefined;
745
+ // Itera sulle colonne cercando la prima che soddisfa i criteri di matching
746
+ return columns.find(c => {
747
+ // Estrae il MID (Metadata ID) dalle proprietà estese della colonna corrente
748
+ const colMid = c.extendedProperties?.["MID"];
749
+ // Se la colonna ha un MID definito, prova a matchare per MID
750
+ if (colMid) {
751
+ // Converte il MID in stringa per il confronto
752
+ const midStr = String(colMid);
753
+ // Verifica se dataField termina con "_MID" (es: "123_456" dove 456 è il MID)
754
+ // oppure se dataField è esattamente uguale al MID (caso in cui dataField contiene solo il MID)
755
+ if (dataField.endsWith(`_${midStr}`) || dataField === midStr)
756
+ return true;
757
+ }
758
+ // Fallback: se il match per MID fallisce, prova a matchare per caption
759
+ // Confronta la caption della colonna con dataField o con il parametro caption opzionale
760
+ return c.caption === dataField || c.caption === caption;
761
+ });
762
+ };
763
+ /**
764
+ * Formatta un valore per l'export in base al tipo di colonna.
765
+ * Gestisce date, numeri e valute secondo il formato definito nella colonna.
766
+ */
767
+ export const formatValueForExport = (value, dataCol, fallbackDataType) => {
768
+ try {
769
+ let result = value;
770
+ if (dataCol) {
771
+ const { format, formatCulture } = getColumnFormatInfo(dataCol);
772
+ // Date: il valore arriva come stringa e va prima convertito in Date
773
+ if (dataCol.dataType === DataColumnTypes.DateTime && result) {
774
+ const parsedDate = new Date(result);
775
+ if (!isNaN(parsedDate.getTime())) {
776
+ result = formatDateTimeByMetadataFormat(parsedDate, format, formatCulture);
777
+ }
778
+ }
779
+ // Numeri (incluse valute)
780
+ if (dataCol.dataType === DataColumnTypes.Number && result !== null && result !== undefined && result !== '') {
781
+ result = formatNumberByMetadataFormat(result, format, formatCulture);
782
+ }
783
+ }
784
+ else {
785
+ // Fallback: formattazione base per date
786
+ if (fallbackDataType === 'datetime' && result) {
787
+ result = safeParseDateToLocaleString(result);
788
+ }
789
+ }
790
+ // Pulisci il valore: rimuovi doppi apici per evitare problemi CSV
791
+ return (result ?? '').toString().replace(/"/g, '');
792
+ }
793
+ catch {
794
+ return String(value ?? '');
795
+ }
796
+ };
@@ -19,7 +19,7 @@ export interface ZipCreateOptions {
19
19
  encryptionStrength?: 1 | 2 | 3;
20
20
  /** Commento globale ZIP */
21
21
  comment?: string;
22
- /** Callback progresso: (indice, totale, nomeFile) */
22
+ /** Callback progresso, invocata a voce conclusa: (voci completate, totale, nomeFile appena aggiunto) */
23
23
  onProgress?: (index: number, total: number, filename: string) => void;
24
24
  /** Callback progresso singolo file: (bytesElaborati, bytesTotali) */
25
25
  onEntryProgress?: (progress: number, total: number) => void;
@@ -50,7 +50,6 @@ export class ZipManager {
50
50
  throw new DOMException("Operazione annullata", "AbortError");
51
51
  }
52
52
  const file = files[i];
53
- onProgress?.(i + 1, total, file.filename);
54
53
  const reader = this.createReader(file.data, { BlobReader, TextReader, Uint8ArrayReader });
55
54
  await zipWriter.add(file.filename, reader, {
56
55
  comment: file.comment,
@@ -60,6 +59,8 @@ export class ZipManager {
60
59
  encryptionStrength,
61
60
  onprogress: onEntryProgress ? (progress, total) => onEntryProgress(progress, total) : undefined
62
61
  });
62
+ // A voce conclusa, non prima: con un solo file la barra partirebbe gia' al 100%.
63
+ onProgress?.(i + 1, total, file.filename);
63
64
  }
64
65
  const commentBytes = comment ? new TextEncoder().encode(comment) : undefined;
65
66
  return await zipWriter.close(commentBytes);