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

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 (232) 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 +14 -14
  4. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +6 -6
  5. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +31 -31
  6. package/lib/components/base/Styled.d.ts +4 -4
  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 +4 -0
  14. package/lib/components/base/TMDataGrid.js +290 -10
  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 -2
  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.js +110 -69
  41. package/lib/components/base/TMWaitPanel.js +2 -2
  42. package/lib/components/choosers/TMCultureIDPicker.js +2 -2
  43. package/lib/components/choosers/TMDataListItemChooser.js +1 -1
  44. package/lib/components/choosers/TMDataListItemPicker.js +2 -2
  45. package/lib/components/choosers/TMDcmtTypeChooser.js +5 -4
  46. package/lib/components/choosers/TMDiskChooser.js +1 -1
  47. package/lib/components/choosers/TMDistinctValues.d.ts +9 -7
  48. package/lib/components/choosers/TMDistinctValues.js +157 -141
  49. package/lib/components/choosers/TMDynDataListItemChooser.js +1 -1
  50. package/lib/components/choosers/TMImageIDChooser.js +1 -1
  51. package/lib/components/choosers/TMMetadataChooser.js +3 -3
  52. package/lib/components/choosers/TMQuickSearchInfo.d.ts +12 -0
  53. package/lib/components/choosers/TMQuickSearchInfo.js +279 -0
  54. package/lib/components/choosers/TMQuickSearchSettingsForm.d.ts +16 -0
  55. package/lib/components/choosers/TMQuickSearchSettingsForm.js +94 -0
  56. package/lib/components/choosers/TMRelationChooser.js +1 -1
  57. package/lib/components/choosers/TMSelectedValuesSummary.d.ts +13 -0
  58. package/lib/components/choosers/TMSelectedValuesSummary.js +89 -0
  59. package/lib/components/choosers/TMUserChooser.js +1 -1
  60. package/lib/components/editors/TMCheckBox.js +1 -1
  61. package/lib/components/editors/TMDropDown.d.ts +3 -0
  62. package/lib/components/editors/TMDropDown.js +197 -5
  63. package/lib/components/editors/TMEditorStyled.d.ts +10 -10
  64. package/lib/components/editors/TMFormulaEditor.js +1 -1
  65. package/lib/components/editors/TMHtmlContentDisplay.js +1 -1
  66. package/lib/components/editors/TMLocalizedTextBox.js +1 -1
  67. package/lib/components/editors/TMMetadataValues.js +2 -2
  68. package/lib/components/editors/TMRadioButton.js +2 -2
  69. package/lib/components/editors/TMSummary.js +3 -3
  70. package/lib/components/editors/TMTextArea.js +3 -3
  71. package/lib/components/editors/TMTextBox.js +3 -3
  72. package/lib/components/editors/TMTextExpression.js +1 -1
  73. package/lib/components/features/archive/TMArchive.js +17 -3
  74. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
  75. package/lib/components/features/assistant/TMToppySpeechBubble.js +1 -1
  76. package/lib/components/features/documents/TMBatchUpdateForm.js +20 -6
  77. package/lib/components/features/documents/TMDcmtBlog.d.ts +3 -0
  78. package/lib/components/features/documents/TMDcmtBlog.js +4 -4
  79. package/lib/components/features/documents/TMDcmtForm.d.ts +7 -0
  80. package/lib/components/features/documents/TMDcmtForm.js +180 -53
  81. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +11 -0
  82. package/lib/components/features/documents/TMDcmtFormActionButtons.js +79 -9
  83. package/lib/components/features/documents/TMDcmtIcon.js +5 -3
  84. package/lib/components/features/documents/TMDcmtPreview.js +12 -8
  85. package/lib/components/features/documents/TMDownloadRelationViewerSection.js +1 -1
  86. package/lib/components/features/documents/TMFileUploader.js +3 -3
  87. package/lib/components/features/documents/TMMasterDetailDcmts.js +96 -34
  88. package/lib/components/features/documents/TMMasterInfoFields.d.ts +19 -0
  89. package/lib/components/features/documents/TMMasterInfoFields.js +184 -0
  90. package/lib/components/features/documents/TMMergeToPdfForm.d.ts +1 -2
  91. package/lib/components/features/documents/TMMergeToPdfForm.js +30 -5
  92. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.d.ts +45 -0
  93. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +323 -0
  94. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +370 -0
  95. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +283 -0
  96. package/lib/components/features/documents/TMRelationViewer.d.ts +14 -1
  97. package/lib/components/features/documents/TMRelationViewer.js +71 -22
  98. package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +1 -1
  99. package/lib/components/features/search/TMMetadataOutputForm.js +1 -1
  100. package/lib/components/features/search/TMMetadataSorterForm.js +1 -1
  101. package/lib/components/features/search/TMSavedQuerySelector.js +2 -2
  102. package/lib/components/features/search/TMSearch.js +78 -12
  103. package/lib/components/features/search/TMSearchQueryEditor.js +7 -5
  104. package/lib/components/features/search/TMSearchQueryPanel.d.ts +4 -0
  105. package/lib/components/features/search/TMSearchQueryPanel.js +142 -68
  106. package/lib/components/features/search/TMSearchResult.d.ts +16 -0
  107. package/lib/components/features/search/TMSearchResult.js +431 -110
  108. package/lib/components/features/search/TMSignatureInfoContent.js +1 -1
  109. package/lib/components/features/search/TMTreeSelector.js +109 -64
  110. package/lib/components/features/tasks/TMTaskForm.js +1 -1
  111. package/lib/components/features/tasks/TMTaskFormUtils.js +3 -3
  112. package/lib/components/features/tasks/TMTasksAgenda.js +1 -1
  113. package/lib/components/features/tasks/TMTasksCalendar.js +1 -1
  114. package/lib/components/features/tasks/TMTasksHeader.js +1 -1
  115. package/lib/components/features/tasks/TMTasksUtilsView.js +1 -1
  116. package/lib/components/features/tasks/TMTasksView.js +4 -4
  117. package/lib/components/features/wg/TMWGsCopyMoveForm.js +1 -1
  118. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +10 -0
  119. package/lib/components/features/workflow/TMWorkflowPopup.js +9 -5
  120. package/lib/components/features/workflow/diagram/ConnectionComponent.js +3 -3
  121. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +3 -3
  122. package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
  123. package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +1 -1
  124. package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
  125. package/lib/components/features/workflow/diagram/WFDiagram.js +4 -4
  126. package/lib/components/forms/Login/Menu.js +1 -1
  127. package/lib/components/forms/Login/OTPReader.js +1 -1
  128. package/lib/components/forms/Login/PasswordStrengthChecker.js +1 -1
  129. package/lib/components/forms/Login/RapidAccessLogin.js +2 -2
  130. package/lib/components/forms/Login/RecoverPasswordFlow.js +2 -2
  131. package/lib/components/forms/Login/SelectBox.js +1 -1
  132. package/lib/components/forms/Login/StepIndicator.js +1 -1
  133. package/lib/components/forms/Login/TMLoginForm.js +7 -7
  134. package/lib/components/forms/Login/TextBox.js +1 -1
  135. package/lib/components/forms/TMApplyForm.js +3 -3
  136. package/lib/components/forms/TMChooserForm.js +1 -1
  137. package/lib/components/forms/TMSaveForm.js +3 -3
  138. package/lib/components/grids/TMBlogAttachments.js +14 -3
  139. package/lib/components/grids/TMBlogHeader.js +5 -1
  140. package/lib/components/grids/TMBlogsPost.d.ts +2 -0
  141. package/lib/components/grids/TMBlogsPost.js +31 -4
  142. package/lib/components/grids/TMBlogsPostUtils.d.ts +1 -0
  143. package/lib/components/grids/TMBlogsPostUtils.js +15 -4
  144. package/lib/components/grids/TMRecentsManager.js +4 -4
  145. package/lib/components/grids/TMValidationItemsList.js +1 -1
  146. package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
  147. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +25 -15
  148. package/lib/components/layout/panelManager/TMPanelManagerContext.js +68 -93
  149. package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +2 -2
  150. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +1 -1
  151. package/lib/components/layout/panelManager/TMPanelWrapper.js +3 -3
  152. package/lib/components/layout/panelManager/types.d.ts +3 -0
  153. package/lib/components/layout/panelManager/utils.js +13 -11
  154. package/lib/components/pages/TMPage.js +1 -1
  155. package/lib/components/query/TMQueryCountButton.js +1 -1
  156. package/lib/components/query/TMQueryEditor.js +7 -7
  157. package/lib/components/sidebar/TMCommandsPanel.js +1 -1
  158. package/lib/components/sidebar/TMHeader.js +36 -26
  159. package/lib/components/sidebar/TMSidebar.js +1 -1
  160. package/lib/components/sidebar/TMSidebarItem.js +1 -1
  161. package/lib/components/viewers/TMMidViewer.js +6 -3
  162. package/lib/components/viewers/TMTidViewer.js +89 -28
  163. package/lib/components/wizard/TMStepIndicator.js +3 -3
  164. package/lib/css/tm-sdkui.css +1 -1
  165. package/lib/devextreme-license.d.ts +1 -0
  166. package/lib/devextreme-license.js +3 -0
  167. package/lib/helper/Enum_Localizator.d.ts +4 -4
  168. package/lib/helper/Globalization.d.ts +1 -1
  169. package/lib/helper/SDKUI_Globals.d.ts +110 -0
  170. package/lib/helper/SDKUI_Globals.js +151 -0
  171. package/lib/helper/SDKUI_Localizator.d.ts +731 -687
  172. package/lib/helper/SDKUI_Localizator.js +440 -0
  173. package/lib/helper/TMAppUpdatedModal.d.ts +1 -0
  174. package/lib/helper/TMAppUpdatedModal.js +134 -0
  175. package/lib/helper/TMIcons.d.ts +1 -0
  176. package/lib/helper/TMIcons.js +4 -3
  177. package/lib/helper/TMPdfViewer.js +1 -1
  178. package/lib/helper/TMToppyMessage.js +1 -1
  179. package/lib/helper/TMUtils.d.ts +13 -0
  180. package/lib/helper/TMUtils.js +25 -3
  181. package/lib/helper/checkinCheckoutManager.d.ts +1 -1
  182. package/lib/helper/checkinCheckoutManager.js +1 -1
  183. package/lib/helper/dataGridSearchHelper.d.ts +28 -0
  184. package/lib/helper/dataGridSearchHelper.js +51 -0
  185. package/lib/helper/dcmtsHelper.d.ts +20 -0
  186. package/lib/helper/dcmtsHelper.js +58 -1
  187. package/lib/helper/helpers.d.ts +12 -1
  188. package/lib/helper/helpers.js +27 -3
  189. package/lib/helper/index.d.ts +2 -0
  190. package/lib/helper/index.js +2 -0
  191. package/lib/helper/queryHelper.d.ts +6 -1
  192. package/lib/helper/queryHelper.js +8 -3
  193. package/lib/hooks/tmDistinctValuesGridHelper.d.ts +16 -0
  194. package/lib/hooks/tmDistinctValuesGridHelper.js +31 -0
  195. package/lib/hooks/useArchiveListForm.d.ts +39 -0
  196. package/lib/hooks/useArchiveListForm.js +46 -0
  197. package/lib/hooks/useCaseFlowApprove.d.ts +56 -0
  198. package/lib/hooks/useCaseFlowApprove.js +157 -0
  199. package/lib/hooks/useDataUserIdItem.d.ts +1 -0
  200. package/lib/hooks/useDataUserIdItem.js +1 -0
  201. package/lib/hooks/useDocumentOperations.d.ts +4 -0
  202. package/lib/hooks/useDocumentOperations.js +53 -11
  203. package/lib/hooks/useInputDialog.js +1 -1
  204. package/lib/hooks/useMultiMasterDetailDcmts.d.ts +113 -0
  205. package/lib/hooks/useMultiMasterDetailDcmts.js +760 -0
  206. package/lib/hooks/useQueryParametersDialog.js +1 -1
  207. package/lib/hooks/useRelatedDocuments.d.ts +1 -0
  208. package/lib/hooks/useRelatedDocuments.js +22 -27
  209. package/lib/hooks/useShowDossiersV5.d.ts +12 -0
  210. package/lib/hooks/useShowDossiersV5.js +37 -0
  211. package/lib/hooks/useTMDistinctValuesMetadataDisplay.d.ts +18 -0
  212. package/lib/hooks/useTMDistinctValuesMetadataDisplay.js +103 -0
  213. package/lib/hooks/useTMDistinctValuesQuickSearch.d.ts +49 -0
  214. package/lib/hooks/useTMDistinctValuesQuickSearch.js +307 -0
  215. package/lib/hooks/useTMDistinctValuesSelection.d.ts +42 -0
  216. package/lib/hooks/useTMDistinctValuesSelection.js +103 -0
  217. package/lib/hooks/useTMDistinctValuesSource.d.ts +29 -0
  218. package/lib/hooks/useTMDistinctValuesSource.js +105 -0
  219. package/lib/index.d.ts +2 -0
  220. package/lib/index.js +5 -2
  221. package/lib/services/caseflow/CaseFlowService.d.ts +247 -0
  222. package/lib/services/caseflow/CaseFlowService.js +720 -0
  223. package/lib/services/caseflow/CaseFlowTemplateCacheService.d.ts +28 -0
  224. package/lib/services/caseflow/CaseFlowTemplateCacheService.js +121 -0
  225. package/lib/services/caseflow/caseFlowNameCache.d.ts +32 -0
  226. package/lib/services/caseflow/caseFlowNameCache.js +116 -0
  227. package/lib/services/caseflow/caseFlowWorkItemUtils.d.ts +61 -0
  228. package/lib/services/caseflow/caseFlowWorkItemUtils.js +113 -0
  229. package/lib/services/index.d.ts +4 -0
  230. package/lib/services/index.js +4 -0
  231. package/lib/services/platform_services.d.ts +4 -4
  232. package/package.json +71 -68
@@ -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>): impor
271
271
  export declare function IconNew(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
272
272
  export declare function IconFileOpenOutline(props: Readonly<React.SVGProps<SVGSVGElement>>): import("react/jsx-runtime").JSX.Element;
273
273
  export declare function IconArchiveDetail(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
274
+ export declare function IconArchiveMultipleDetailDocuments(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
274
275
  export declare function IconArchiveMaster(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
275
276
  export declare function IconPair(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
276
277
  export declare function IconUnpair(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").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;
@@ -42,6 +42,12 @@ 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;
@@ -53,11 +59,18 @@ export declare const PDGS_COLORS: {
53
59
  DOSSIER: string;
54
60
  DOCUMENT: string;
55
61
  WORKING_GROUP: string;
62
+ /** Istanza di CaseFlow: viola, per non confonderla ne' con la pratica (arancio) ne' con il gruppo di lavoro (verde). */
63
+ CASEFLOW: string;
56
64
  };
57
65
  export declare const getPdgsIconMap: (fontSize?: number) => Map<PdGs, JSX.Element>;
58
66
  export declare const convertSearchResultDescriptorToFileItems: (documents: Array<SearchResultDescriptor>) => Array<FileItem>;
59
67
  export declare const getAppModuleGradient: (appModuleID: AppModules) => string;
60
68
  export declare const getPanelManagerToolbarColor: (appModuleID: AppModules) => string;
69
+ export declare const getAppModuleButtonColors: (appModuleID: AppModules) => {
70
+ base: string;
71
+ hover: string;
72
+ shadow: string;
73
+ };
61
74
  export declare const getFileManagerFolderColor: (appModuleID: AppModules) => string;
62
75
  type SearchToolbarVisibility = {
63
76
  tmSearchResult: boolean;
@@ -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, DataColumnTypes, DataListCacheService, DcmtTypeListCacheService, LicenseModuleStatus, MetadataDataDomains, MetadataFormats, 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:
@@ -44,7 +44,7 @@ export type DownloadSource = {
44
44
  };
45
45
  export declare const getCicoDownloadFileName: (source: DownloadSource, checkout: boolean, withTimestampAndExt: boolean) => string;
46
46
  export declare const cicoDownloadFilesCallback: (sources: Array<DownloadSource>, checkout: boolean, downloadDcmtsAsync: (params: DownloadDcmtsAsyncParams) => Promise<void>) => Promise<void>;
47
- export declare const updateCicoCheckoutStorageItem: (item: CheckoutInfo, type: "fileItem" | "dcmtInfo", action?: "addOrUpdate" | "remove") => void;
47
+ export declare const updateCicoCheckoutStorageItem: (item: CheckoutInfo, type: 'fileItem' | 'dcmtInfo', action?: "addOrUpdate" | "remove") => void;
48
48
  export declare const validateCicoFileName: (source: DownloadSource, fileName: string, checkoutDate?: string | null) => FileNameValidation;
49
49
  type ValidationResult = {
50
50
  expected: string | number | undefined;
@@ -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 { AccessLevels, CICO_MetadataNames, SDK_Globals, SystemMIDsAsNumber } from "@topconsultnpm/sdk-ts";
3
3
  import TMTooltip from "../components/base/TMTooltip";
4
4
  import { dcmtsFileCachePreview, Globalization, removeDcmtsFileCache, SDKUI_Globals, SDKUI_Localizator } from "./index";
@@ -0,0 +1,28 @@
1
+ import { MetadataFormats } from '@topconsultnpm/sdk-ts';
2
+ /** Testo mostrato in una colonna per una riga: è quello su cui va cercato ciò che l'utente digita */
3
+ export type SearchTextGetter = (rowData: any) => string;
4
+ /** Testo con cui una data viene mostrata nella griglia: è quello che l'utente vede e quindi quello che cerca */
5
+ export declare const getDateDisplayText: (value: any, format: MetadataFormats | undefined, formatCulture: string | undefined | null) => string;
6
+ /** Testo con cui un numero viene mostrato nella griglia (separatore delle migliaia, valuta, decimali) */
7
+ export declare const getNumberDisplayText: (value: any, format: MetadataFormats | undefined, formatCulture: string) => string;
8
+ /**
9
+ * Dirotta la ricerca della griglia sul testo mostrato, per le colonne indicate (chiave: il `dataField`).
10
+ *
11
+ * La ricerca di DevExtreme lavora sul valore archiviato, quindi non trova nulla dove il testo mostrato è
12
+ * diverso:
13
+ * - **date**, che nei dati sono stringhe ISO: DevExtreme prova a interpretare il testo digitato con il
14
+ * formato della colonna, non riesce (il formato è un formatter personalizzato, non un pattern) e scarta
15
+ * la colonna dalla ricerca — cercando `29/01/2023` non trova nulla;
16
+ * - **numeri formattati**, per lo stesso motivo (separatore delle migliaia, simbolo di valuta);
17
+ * - **liste dati e utenti**, dove viene confrontata la chiave archiviata invece della descrizione
18
+ * visualizzata — cercando `FATTURA` non trova nulla, cercando `TD01` sì.
19
+ *
20
+ * Da passare a `customizeColumns` della griglia. Va fatto lì perché solo lì è disponibile la
21
+ * `calculateFilterExpression` predefinita di DevExtreme, che resta in uso per il filtro di intestazione e
22
+ * per il generatore di filtri: quelli funzionano già correttamente e vanno lasciati intatti.
23
+ *
24
+ * @example
25
+ * const searchTextGetters = useMemo(() => new Map([['TM_1_2', (row) => getDateDisplayText(row?.TM_1_2, format, culture)]]), [...]);
26
+ * const customizeColumns = useMemo(() => customizeSearchByDisplayText(searchTextGetters), [searchTextGetters]);
27
+ */
28
+ export declare const customizeSearchByDisplayText: (searchTextGetters: Map<string, SearchTextGetter>) => (columns: Array<any>) => void;
@@ -0,0 +1,51 @@
1
+ import { formatDateTimeByMetadataFormat, formatNumberByMetadataFormat } from './TMUtils';
2
+ /** Testo con cui una data viene mostrata nella griglia: è quello che l'utente vede e quindi quello che cerca */
3
+ export const getDateDisplayText = (value, format, formatCulture) => {
4
+ if (value === undefined || value === null || value === '')
5
+ return '';
6
+ const date = value instanceof Date ? value : new Date(value);
7
+ return Number.isNaN(date.getTime()) ? '' : formatDateTimeByMetadataFormat(date, format, formatCulture);
8
+ };
9
+ /** Testo con cui un numero viene mostrato nella griglia (separatore delle migliaia, valuta, decimali) */
10
+ export const getNumberDisplayText = (value, format, formatCulture) => {
11
+ if (value === undefined || value === null || value === '')
12
+ return '';
13
+ return formatNumberByMetadataFormat(value, format, formatCulture);
14
+ };
15
+ /**
16
+ * Dirotta la ricerca della griglia sul testo mostrato, per le colonne indicate (chiave: il `dataField`).
17
+ *
18
+ * La ricerca di DevExtreme lavora sul valore archiviato, quindi non trova nulla dove il testo mostrato è
19
+ * diverso:
20
+ * - **date**, che nei dati sono stringhe ISO: DevExtreme prova a interpretare il testo digitato con il
21
+ * formato della colonna, non riesce (il formato è un formatter personalizzato, non un pattern) e scarta
22
+ * la colonna dalla ricerca — cercando `29/01/2023` non trova nulla;
23
+ * - **numeri formattati**, per lo stesso motivo (separatore delle migliaia, simbolo di valuta);
24
+ * - **liste dati e utenti**, dove viene confrontata la chiave archiviata invece della descrizione
25
+ * visualizzata — cercando `FATTURA` non trova nulla, cercando `TD01` sì.
26
+ *
27
+ * Da passare a `customizeColumns` della griglia. Va fatto lì perché solo lì è disponibile la
28
+ * `calculateFilterExpression` predefinita di DevExtreme, che resta in uso per il filtro di intestazione e
29
+ * per il generatore di filtri: quelli funzionano già correttamente e vanno lasciati intatti.
30
+ *
31
+ * @example
32
+ * const searchTextGetters = useMemo(() => new Map([['TM_1_2', (row) => getDateDisplayText(row?.TM_1_2, format, culture)]]), [...]);
33
+ * const customizeColumns = useMemo(() => customizeSearchByDisplayText(searchTextGetters), [searchTextGetters]);
34
+ */
35
+ export const customizeSearchByDisplayText = (searchTextGetters) => (columns) => {
36
+ columns.forEach((column) => {
37
+ const getSearchText = column?.dataField ? searchTextGetters.get(column.dataField) : undefined;
38
+ // customizeColumns viene richiamata a ogni aggiornamento delle colonne: senza il marcatore i wrapper si anniderebbero
39
+ if (!getSearchText || column.tmSearchByDisplayText)
40
+ return;
41
+ const defaultCalculateFilterExpression = column.calculateFilterExpression;
42
+ // Senza questo DevExtreme prova a convertire il testo digitato nel tipo della colonna e, non riuscendo, la scarta
43
+ column.parseValue = (text) => text;
44
+ column.calculateFilterExpression = function (filterValue, selectedFilterOperation, target) {
45
+ if (target === 'search')
46
+ return [getSearchText, 'contains', filterValue];
47
+ return defaultCalculateFilterExpression?.apply(this, arguments);
48
+ };
49
+ column.tmSearchByDisplayText = true;
50
+ });
51
+ };
@@ -1,8 +1,28 @@
1
+ import { DcmtTypeDescriptor, MetadataDataTypes, MetadataDescriptor, MetadataFormats, RelationDescriptor } from "@topconsultnpm/sdk-ts";
1
2
  import { MetadataValueDescriptorEx } from "../ts";
3
+ /** Metadati utente (esclusi quelli di sistema) del tipo documento, in ordine di visualizzazione */
4
+ export declare const getUserMetadataSorted: (dtd: DcmtTypeDescriptor | undefined) => Array<MetadataDescriptor>;
5
+ /** Formatta un valore scalare (non lista dati): date e numeri rispettano Format e FormatCulture del metadato */
6
+ export declare const formatScalarValue: (value: any, dataType: MetadataDataTypes | undefined, format: MetadataFormats | undefined, formatCulture: string | undefined) => string;
2
7
  /** Check if dcmtType (mTID) has configured Detail or Many-to-Many relations */
3
8
  export declare const hasDetailRelations: (mTID: number | undefined) => Promise<boolean>;
4
9
  /** Check if dcmtType (mTID) has configured Master or Many-to-Many relations */
5
10
  export declare const hasMasterRelations: (mTID: number | undefined) => Promise<boolean>;
11
+ export declare const getDcmtMetadataByMid: (dcmt: {
12
+ TID?: number;
13
+ DID?: number;
14
+ } | undefined) => Promise<Map<number, any>>;
15
+ export declare const mapAssociationsFromMetadata: (relation: RelationDescriptor, type: 'detail' | 'master', metadataByMid: Map<number, any>) => Array<{
16
+ mid: number;
17
+ value: string;
18
+ }>;
19
+ export declare const mapRelationAssociationsToMids: (relation: RelationDescriptor, type: 'detail' | 'master', dcmt: {
20
+ TID?: number;
21
+ DID?: number;
22
+ } | undefined) => Promise<Array<{
23
+ mid: number;
24
+ value: string;
25
+ }>>;
6
26
  export declare const isXMLFileExt: (fileExt: string | undefined) => boolean;
7
27
  export declare const getButtonAttributes: (args: string | undefined, formData: MetadataValueDescriptorEx[] | undefined, selectedItems: Array<any> | undefined) => Record<string, any> | undefined;
8
28
  export declare const getSelectedItem: (args: string | undefined, formData: MetadataValueDescriptorEx[] | undefined, item: any) => Record<string, any> | undefined;
@@ -1,4 +1,21 @@
1
- import { RelationCacheService, RelationTypes, SDK_Globals } from "@topconsultnpm/sdk-ts";
1
+ import { MetadataDataTypes, RelationCacheService, RelationTypes, SDK_Globals } from "@topconsultnpm/sdk-ts";
2
+ import { formatDateTimeByMetadataFormat, formatNumberByMetadataFormat } from "./TMUtils";
3
+ /** Metadati utente (esclusi quelli di sistema) del tipo documento, in ordine di visualizzazione */
4
+ export const getUserMetadataSorted = (dtd) => {
5
+ return (dtd?.metadata ?? [])
6
+ .filter(md => md.id !== undefined && md.id > 100 && md.isSystem !== 1)
7
+ .sort((a, b) => (a.ordinalPosition ?? 0) - (b.ordinalPosition ?? 0));
8
+ };
9
+ /** Formatta un valore scalare (non lista dati): date e numeri rispettano Format e FormatCulture del metadato */
10
+ export const formatScalarValue = (value, dataType, format, formatCulture) => {
11
+ if (value === undefined || value === null || value === '')
12
+ return '';
13
+ switch (dataType) {
14
+ case MetadataDataTypes.DateTime: return formatDateTimeByMetadataFormat(value instanceof Date ? value : new Date(value), format, formatCulture);
15
+ case MetadataDataTypes.Number: return formatNumberByMetadataFormat(value, format, formatCulture ?? window.navigator.language);
16
+ default: return String(value);
17
+ }
18
+ };
2
19
  /** Check if dcmtType (mTID) has configured Detail or Many-to-Many relations */
3
20
  export const hasDetailRelations = async (mTID) => {
4
21
  let allRelations = await RelationCacheService.GetAllAsync();
@@ -13,6 +30,46 @@ export const hasMasterRelations = async (mTID) => {
13
30
  let rdlManyToMany = allRelations?.filter(o => o.relationType == RelationTypes.ManyToMany && (o.masterTID == mTID || o.detailTID == mTID)) ?? [];
14
31
  return rdlManyToMany.length > 0 || rdlOneToMany.length > 0;
15
32
  };
33
+ // Legge i metadati di un documento
34
+ export const getDcmtMetadataByMid = async (dcmt) => {
35
+ const metadataMap = new Map();
36
+ if (!dcmt?.TID || !dcmt?.DID)
37
+ return metadataMap; // Documento non identificabile: mappa vuota
38
+ const searchEngine = SDK_Globals.tmSession?.NewSearchEngine();
39
+ if (!searchEngine)
40
+ return metadataMap; // Nessuna sessione attiva: mappa vuota
41
+ const allMetadata = await searchEngine.GetMetadataAsync(dcmt.TID, dcmt.DID, false);
42
+ const row = allMetadata?.dtdResult?.rows?.[0]; // Prima (e unica) riga = il documento richiesto
43
+ const mids = allMetadata?.selectMIDs; // MID nello stesso ordine dei valori di riga
44
+ if (row && mids)
45
+ mids.forEach((mid, index) => metadataMap.set(mid, row[index])); // Accoppia mid -> valore per posizione
46
+ return metadataMap;
47
+ };
48
+ // Mappa le associazioni della relazione nei MID di destinazione, usando i metadati sorgente già letti.
49
+ // 'detail' = archivio dettagli dal master (sorgente item1 -> destinazione item2); 'master' = archivio master dal dettaglio (item2 -> item1).
50
+ // Emette una voce per ogni associazione, anche vuota, per coprire tutti i collegamenti.
51
+ export const mapAssociationsFromMetadata = (relation, type, metadataByMid) => {
52
+ if (!relation.associations || relation.associations.length === 0)
53
+ return []; // Relazione senza collegamenti
54
+ return relation.associations.map(assoc => {
55
+ const sourceMid = type === 'detail' ? (assoc.item1 ?? 0) : (assoc.item2 ?? 0); // MID da cui leggere il valore
56
+ const targetMid = type === 'detail' ? (assoc.item2 ?? 0) : (assoc.item1 ?? 0); // MID da valorizzare
57
+ const value = metadataByMid.get(sourceMid); // Valore sorgente (può mancare)
58
+ return { mid: targetMid, value: value !== undefined && value !== null ? value.toString() : '' }; // Assente/null -> stringa vuota
59
+ });
60
+ };
61
+ // Legge il documento sorgente (master per 'detail', dettaglio per 'master') e mappa le associazioni nei MID di destinazione.
62
+ // Per letture ripetute dello stesso documento, riusare la mappa e chiamare direttamente `mapAssociationsFromMetadata`.
63
+ export const mapRelationAssociationsToMids = async (relation, type, dcmt) => {
64
+ if (!relation.associations || relation.associations.length === 0)
65
+ return []; // Relazione senza collegamenti
66
+ if (!dcmt?.TID || !dcmt?.DID)
67
+ return []; // Documento sorgente non identificabile
68
+ const metadataByMid = await getDcmtMetadataByMid(dcmt);
69
+ if (metadataByMid.size === 0)
70
+ return []; // Nessun metadato leggibile: [] come nel flusso originale (niente collegamenti a vuoto)
71
+ return mapAssociationsFromMetadata(relation, type, metadataByMid);
72
+ };
16
73
  export const isXMLFileExt = (fileExt) => {
17
74
  const fileExtension = fileExt?.toLowerCase() ?? '';
18
75
  switch (fileExtension) {
@@ -2,6 +2,15 @@ import { Colors as ColorsType } from "../components/base/TMEditorBase";
2
2
  import { DeviceType } from "../components";
3
3
  import { AppModules, DataColumnDescriptor, DcmtTypeDescriptor, ITopMediaSession, MetadataDescriptor, QueryDescriptor, SearchResultDescriptor, TaskDescriptor } from "@topconsultnpm/sdk-ts";
4
4
  import { FileExtensionHandler, FormModes, moduleTypes } from "../ts";
5
+ import React from "react";
6
+ /**
7
+ * Handler di hover per elementi con stili inline: applica `over` all'ingresso del mouse e `out` all'uscita.
8
+ * Da spandere sull'elemento: `{...hoverStyle({ background: 'red' }, { background: 'transparent' })}`
9
+ */
10
+ export declare const hoverStyle: (over: React.CSSProperties, out: React.CSSProperties) => {
11
+ onMouseEnter: (e: React.MouseEvent<HTMLElement>) => CSSStyleDeclaration & React.CSSProperties;
12
+ onMouseLeave: (e: React.MouseEvent<HTMLElement>) => CSSStyleDeclaration & React.CSSProperties;
13
+ };
5
14
  declare const calcResponsiveSizes: (deviceType: DeviceType | undefined, desktopSize: string, tabletSize: string, mobileSize: string) => string;
6
15
  declare const taskModalSizes: (deviceType: DeviceType | undefined, formMode: FormModes) => {
7
16
  width: string;
@@ -9,7 +18,7 @@ declare const taskModalSizes: (deviceType: DeviceType | undefined, formMode: For
9
18
  };
10
19
  declare const TABLET_WIDTH = 1024;
11
20
  declare const MOBILE_WIDTH = 640;
12
- declare const calcResponsiveDirection: (deviceType: DeviceType, desktopDir: "horizontal" | "vertical", tabletDir: "horizontal" | "vertical", mobileDir: "horizontal" | "vertical") => "horizontal" | "vertical";
21
+ declare const calcResponsiveDirection: (deviceType: DeviceType, desktopDir: 'horizontal' | 'vertical', tabletDir: 'horizontal' | 'vertical', mobileDir: 'horizontal' | 'vertical') => 'horizontal' | 'vertical';
13
22
  declare const openApps: (appModule: AppModules, tmSession: ITopMediaSession, appRoutes?: any[]) => Promise<void>;
14
23
  export declare const setSDK_GlobalsInfoAsync: (tms: ITopMediaSession | undefined) => Promise<ITopMediaSession | undefined>;
15
24
  declare const getColor: (color: ColorsType) => string;
@@ -53,6 +62,8 @@ export declare const getSystemMetadata: (withPerm?: boolean) => MetadataDescript
53
62
  export declare function deepCompare(obj1: any, obj2: any): boolean;
54
63
  export declare const extensionHandler: (fileExt: string | undefined) => FileExtensionHandler;
55
64
  export declare const downloadBase64File: (base64Data: string, fileName: string) => void;
65
+ export declare const WHATS_NEWS_FILE_NAME = "what's new";
66
+ export declare const WHATS_NEWS_LINK_URL = "https://www.topconsult.it/it/documentazionetopmedia";
56
67
  export declare const TASK_MORE_INFO_PREFIX_NAME: string;
57
68
  export declare const isTaskMoreInfo: (taskName: string | undefined) => boolean | undefined;
58
69
  export declare const getMoreInfoTasksForDocument: (allTasks: TaskDescriptor[], TID: number | null | undefined, DID: number | null | undefined) => TaskDescriptor[];
@@ -1,4 +1,4 @@
1
- import { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Colors } from "../utils/theme";
3
3
  import { ButtonNames, DeviceType, TMExceptionBoxManager, TMMessageBoxManager, TMSpinner } from "../components";
4
4
  import { AccessLevels, MetadataDataDomains, MetadataDataTypes, MetadataDescriptor, MetadataFormatDescriptor, MetadataFormats, MetadataPermission, SDK_Globals, SetGlobalsInfoAsync, SystemMIDs, SystemMIDsAsNumber, Task_States, TopMediaServer, WorkItemMetadataNames } from "@topconsultnpm/sdk-ts";
@@ -7,6 +7,15 @@ import { buildTypes, FileExtensionHandler, FormModes, moduleTypes } from "../ts"
7
7
  import { SDKUI_Localizator } from "./SDKUI_Localizator";
8
8
  import ReactDOMServer from "react-dom/server";
9
9
  import { DeepCompareHelper } from "./DeepCompareHelper";
10
+ import { UserSettings } from "./SDKUI_Globals";
11
+ /**
12
+ * Handler di hover per elementi con stili inline: applica `over` all'ingresso del mouse e `out` all'uscita.
13
+ * Da spandere sull'elemento: `{...hoverStyle({ background: 'red' }, { background: 'transparent' })}`
14
+ */
15
+ export const hoverStyle = (over, out) => ({
16
+ onMouseEnter: (e) => Object.assign(e.currentTarget.style, over),
17
+ onMouseLeave: (e) => Object.assign(e.currentTarget.style, out),
18
+ });
10
19
  const calcResponsiveSizes = (deviceType, desktopSize, tabletSize, mobileSize) => {
11
20
  if (deviceType === DeviceType.DESKTOP)
12
21
  return desktopSize;
@@ -62,7 +71,6 @@ export const setSDK_GlobalsInfoAsync = async (tms) => {
62
71
  try {
63
72
  const result = await SetGlobalsInfoAsync(tms);
64
73
  if (result?.SessionDescr?.userID && result?.SessionDescr?.archiveID) {
65
- const { UserSettings } = await import('./SDKUI_Globals');
66
74
  UserSettings.LoadSettings(result.SessionDescr.userID, result.SessionDescr.archiveID);
67
75
  }
68
76
  return result;
@@ -605,6 +613,8 @@ export const downloadBase64File = (base64Data, fileName) => {
605
613
  // Libera l'URL del Blob
606
614
  URL.revokeObjectURL(blobUrl);
607
615
  };
616
+ export const WHATS_NEWS_FILE_NAME = "what's new";
617
+ export const WHATS_NEWS_LINK_URL = 'https://www.topconsult.it/it/documentazionetopmedia';
608
618
  export const TASK_MORE_INFO_PREFIX_NAME = `${SDKUI_Localizator.MoreInformation} - `;
609
619
  export const isTaskMoreInfo = (taskName) => taskName?.startsWith(TASK_MORE_INFO_PREFIX_NAME);
610
620
  // Filtra i task di tipo "More Info" non completati associati a un documento specifico.
@@ -813,7 +823,21 @@ export var LandingPages;
813
823
  // #region Exception
814
824
  export function getExceptionMessage(ex) {
815
825
  let msg = ex.isApiException ? ex.response.title : ex.message;
816
- return msg ?? ex.toString();
826
+ if (msg !== undefined && msg !== null)
827
+ return msg;
828
+ let asString = ex.toString();
829
+ if (asString !== '[object Object]')
830
+ return asString;
831
+ if (ex.errorMessage)
832
+ return ex.errorMessage;
833
+ if (ex.title)
834
+ return ex.title;
835
+ try {
836
+ return JSON.stringify(ex) ?? asString;
837
+ }
838
+ catch {
839
+ return asString;
840
+ }
817
841
  }
818
842
  export function getContrastColor(inputColor) {
819
843
  let hex = inputColor;
@@ -5,6 +5,7 @@ export * from './Globalization';
5
5
  export * from './TMIcons';
6
6
  export * from './TMImageLibrary';
7
7
  export * from './helpers';
8
+ export * from './dataGridSearchHelper';
8
9
  export * from './queryHelper';
9
10
  export * from './TMUtils';
10
11
  export * from './TMCommandsContextMenu';
@@ -18,3 +19,4 @@ export * from './devextremeCustomMessages';
18
19
  export * from './ZipManager';
19
20
  export * from './certificateImportHelper';
20
21
  export * from './grafometricSignaturesCache';
22
+ export * from './TMAppUpdatedModal';
@@ -5,6 +5,7 @@ export * from './Globalization';
5
5
  export * from './TMIcons';
6
6
  export * from './TMImageLibrary';
7
7
  export * from './helpers';
8
+ export * from './dataGridSearchHelper';
8
9
  export * from './queryHelper';
9
10
  export * from './TMUtils';
10
11
  export * from './TMCommandsContextMenu';
@@ -18,3 +19,4 @@ export * from './devextremeCustomMessages';
18
19
  export * from './ZipManager';
19
20
  export * from './certificateImportHelper';
20
21
  export * from './grafometricSignaturesCache';
22
+ export * from './TMAppUpdatedModal';