@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
@@ -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 { useCallback, useEffect, useState } from 'react';
3
3
  import { SDK_Localizator, AccessLevels, OnJoinItem, JoinTypes, PlatformObjectValidator, MetadataDataDomains, DcmtTypeListCacheService, JoinItem, MetadataDataTypes, OrderByItem, QueryFunctions, QueryOperators, ResultTypes, SelectItem, SDK_Globals, UserListCacheService, WhereItem, SearchEngine, SelectItemVisibilities, DataListCacheService, QueryValidatorOptions, TMPropertyNames, AppModules, LayoutModes } from '@topconsultnpm/sdk-ts';
4
4
  import styled from 'styled-components';
@@ -63,7 +63,7 @@ export function useQueryApplyForm(d, formMode, inputData, onApplied, parameters)
63
63
  const [validationItems, setValidationItems] = useState([]);
64
64
  return { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData };
65
65
  }
66
- const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDistinct = false, showToolbar = true, validateSelect = true, validateOrderBy = true, raiseWarningForOnlyMetadataDcmtTypes = false, onApplied, onClose, height = 'auto', borderRadius = '4px', searchText, showApply, showUndo, showBack, onFromTIDChanged, ShowOnlySAP, updateIsModalOpen, showSearchResultSidebar = true, showDcmtFormSidebar = true, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false }) => {
66
+ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDistinct = false, showToolbar = true, validateSelect = true, validateOrderBy = true, validateWhereRequired = false, raiseWarningForOnlyMetadataDcmtTypes = false, onApplied, onClose, height = 'auto', borderRadius = '4px', searchText, showApply, showUndo, showBack, onFromTIDChanged, ShowOnlySAP, updateIsModalOpen, showSearchResultSidebar = true, showDcmtFormSidebar = true, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false }) => {
67
67
  const [confirmQueryParams, ConfirmQueryParamsDialog] = useQueryParametersDialog();
68
68
  const { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData } = useQueryApplyForm(Descriptors.Query, formMode, inputData, onApplied);
69
69
  const [dcmtTypesList, setDcmtTypesList] = useState([]);
@@ -111,6 +111,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
111
111
  let qvo = new QueryValidatorOptions();
112
112
  qvo.DoSelectValidation = validateSelect;
113
113
  qvo.DoOrderByValidation = validateOrderBy;
114
+ qvo.DoWhereRequiredValidation = validateWhereRequired;
114
115
  qvo.RaiseWarningForOnlyMetadataDcmtTypes = raiseWarningForOnlyMetadataDcmtTypes;
115
116
  PlatformObjectValidator.QueryValidatorAsync(formData, vil, qvo).then(() => { setValidationItems(vil); });
116
117
  };
@@ -744,7 +745,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
744
745
  }
745
746
  }
746
747
  }
747
- }, children: [(!isReadOnly || fromCount > 0) && _jsx(Item, { title: SDKUI_Localizator.Source, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, fromCount, validationItems.filter((o) => [TMPropertyNames.fromTid, TMPropertyNames.join].includes(o.PropertyName))), children: _jsx(StyledAccordionItemContainer, { style: { maxHeight: fromCount > 0 ? '330px' : '100%' }, children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, style: { height: '100%' }, children: [_jsxs(StyledRowItem, { children: [!isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => { let qd = SearchEngine.NewQueryDescriptor(); setFormData({ ...qd }); } }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', elementStyle: { opacity: !formData?.from?.tid ? 0.4 : 1 }, disabled: !formData?.from?.tid, icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: onAdd_JoinItem }), _jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMQdDropDownMenu, { content: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }), items: [
748
+ }, children: [(!isReadOnly || fromCount > 0) && _jsx(Item, { title: SDKUI_Localizator.Source, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, fromCount, validationItems.filter((o) => [TMPropertyNames.fromTid, TMPropertyNames.join].includes(o.PropertyName))), children: _jsx(StyledAccordionItemContainer, { style: { maxHeight: fromCount > 0 ? '330px' : '100%' }, children: _jsxs(StyledAccordionItemContent, { $disabled: isReadOnly, style: { height: '100%' }, children: [_jsxs(StyledRowItem, { children: [!isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => { let qd = SearchEngine.NewQueryDescriptor(); setFormData({ ...qd }); } }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', elementStyle: { opacity: !formData?.from?.tid ? 0.4 : 1 }, disabled: !formData?.from?.tid, icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: onAdd_JoinItem }), _jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMQdDropDownMenu, { content: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }), items: [
748
749
  { icon: showId ? _jsx(IconHide, { color: TMColors.button_icon }) : _jsx(IconShow, { color: TMColors.button_icon }), name: showId ? SDKUI_Localizator.ID_Hide : SDKUI_Localizator.ID_Show, onClick: () => setShowId(!showId) },
749
750
  { icon: showCompleteMetadataName ? _jsx(IconHide, { color: TMColors.primary }) : _jsx(IconShow, { color: TMColors.primary }), name: showCompleteMetadataName ? SDKUI_Localizator.Hide_CompleteName : SDKUI_Localizator.Show_CompleteName, onClick: () => setShowCompleteMetadataName(!showCompleteMetadataName) }
750
751
  ] }) }), _jsx(TMDcmtTypeChooser, { disabled: isReadOnly, showEditButton: false, placeHolder: `<${SDKUI_Localizator.DcmtTypeSelect} ...>`, borderRadius: borderRadius, ShowOnlySAP: ShowOnlySAP, openEditorOnSummaryClick: true, showBorder: false, showId: showId, backgroundColor: getColorIndex({ tid: formData.from?.tid, alias: undefined }), values: [formData.from?.tid], validationItems: validationItems.filter((o) => o.PropertyName === TMPropertyNames.fromTid), onValueChanged: (tids) => { let qd = SearchEngine.NewQueryDescriptor(); qd.from.tid = tids[0]; setFormData({ ...qd }); onFromTIDChanged?.(tids[0]); }, updateIsModalOpen: updateIsModalOpen })] }), formData?.join?.map((ji, index) => {
@@ -774,12 +775,12 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
774
775
  { name: 'OR', onClick: () => onChange_OnJoinItem_Or(true, index, indexOn) }
775
776
  ] }), _jsx(TMQdEditableItem, { value: onItem.leftBrackets, allowedPattern: /\(/g, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_OnJoinItem_Brackets(value, true, index, indexOn); } }), _jsx(TMMetadataChooser, { disabled: isReadOnly, showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: onItem.leftTID, alias: onItem.leftAlias }), qd: formData, values: onItem.leftTID ? [{ tid: onItem.leftTID, mid: onItem.leftMID, aliasTID: onItem.leftAlias }] : [], onValueChanged: (values) => { values.length > 0 && onChange_OnJoinMetadatoLeft(values[0], index, indexOn); }, updateIsModalOpen: updateIsModalOpen }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(onItem.operator) }), items: [] }), _jsx(TMMetadataChooser, { disabled: isReadOnly, showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: onItem.rightTID, alias: onItem.rightAlias }), qd: formData, values: onItem.rightTID ? [{ tid: onItem.rightTID, mid: onItem.rightMID, aliasTID: onItem.rightAlias }] : [], onValueChanged: (values) => { values.length > 0 && onChange_OnJoinMetadatoRight(values[0], index, indexOn); }, updateIsModalOpen: updateIsModalOpen }), _jsx(TMQdEditableItem, { value: onItem.rightBrackets, allowedPattern: /\)/g, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_OnJoinItem_Brackets(value, false, index, indexOn); } })] }, indexOn));
776
777
  })] }, `${ji.tid}_${index}`));
777
- }), _jsx(TMVilViewer, { vil: validationItems.filter((o) => o.PropertyName === TMPropertyNames.join) })] }) }) }), canShowSelect && _jsx(Item, { title: SDK_Localizator.QuerySelect, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, selectCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.select)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [_jsx(TMVilViewer, { vil: validationItems.filter((o) => o.PropertyName === TMPropertyNames.select) }), (!formData?.select || formData?.select.length <= 0) && !isReadOnly &&
778
+ }), _jsx(TMVilViewer, { vil: validationItems.filter((o) => o.PropertyName === TMPropertyNames.join) })] }) }) }), canShowSelect && _jsx(Item, { title: SDK_Localizator.QuerySelect, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, selectCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.select)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { $disabled: isReadOnly, children: [_jsx(TMVilViewer, { vil: validationItems.filter((o) => o.PropertyName === TMPropertyNames.select) }), (!formData?.select || formData?.select.length <= 0) && !isReadOnly &&
778
779
  _jsxs(StyledRowItem, { children: [_jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.Add, onClick: onAdd_SelectItem }), dcmtTypesList.length == 1
779
780
  ? _jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.AddAlls, onClick: () => { onAddAll_SelectItem(qdTIDs[0]); } })
780
781
  : _jsx(TMQdDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.AddAlls }), items: qdTIDs.map((tid_alias) => ({ name: `${getDisplayAlias(getDcmtTypeName(tid_alias.tid), tid_alias.alias)}`, onClick: () => { onAddAll_SelectItem(tid_alias); } })) })] }), formData?.select?.map((si, index) => {
781
782
  return (_jsxs(StyledRowItem, { onDragEnd: dragEnd, onDragOver: dragOver, onDrop: (e) => dropSelect(e, si), children: [!isReadOnly && _jsx(StyledDraggableDiv, { draggable: true, onDragStart: (e) => dragStart(e, si), children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => onRemove_SelectItem(index) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: () => onAdd_SelectItem(index + 1) }), !isReadOnly && _jsx(TMQdDropDownMenu, { content: _jsx(TMTooltip, { content: SDK_Localizator.toCaseWord(SDKUI_Localizator.OneMore), children: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }) }), items: getSelectMenuItems(index) }), (!isReadOnly || (si.function && si.function != QueryFunctions.None)) && _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledItemWrapper, { children: si.function === QueryFunctions.None ? "..." : LocalizeQueryFunctions(si.function) }), items: getQueryFunctionsMenuItems(si, index) }), _jsx(TMMetadataChooser, { disabled: isReadOnly, filterMetadata: (o => o.perm?.canView === AccessLevels.Yes || o.perm?.canUpdate === AccessLevels.Yes), showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: si.tid, alias: si.alias }), qd: formData, values: [{ tid: si.tid, mid: si.mid, aliasTID: si.alias }], onValueChanged: (values) => { values.length > 0 && onChange_SelectItem_MID(values[0], index); }, updateIsModalOpen: updateIsModalOpen }), (!isReadOnly || si.as) && _jsx(TMQdEditableItem, { value: si.as, backgroundColor: colorValue, placeHolder: `<${SDKUI_Localizator.Query_EnterAlias}...>`, width: '100%', onValueChanged: (value) => { onChange_SelectItem_As(value, index); } })] }, `${si.tid}_${si.mid}_${index}`));
782
- })] }) }) }), fromCount > 0 && (!isReadOnly || whereCount > 0) && _jsx(Item, { title: SDK_Localizator.QueryWhere, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, whereCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.where)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [_jsx(TMVilViewer, { vil: validationItems.filter((o) => o.PropertyName === TMPropertyNames.where) }), (!formData?.where || formData?.where.length <= 0) && !isReadOnly &&
783
+ })] }) }) }), fromCount > 0 && (!isReadOnly || whereCount > 0) && _jsx(Item, { title: SDK_Localizator.QueryWhere, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, whereCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.where)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { $disabled: isReadOnly, children: [_jsx(TMVilViewer, { vil: validationItems.filter((o) => o.PropertyName === TMPropertyNames.where) }), (!formData?.where || formData?.where.length <= 0) && !isReadOnly &&
783
784
  _jsx(StyledRowItem, { children: _jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.Add, onClick: onAdd_WhereItem }) }), formData?.where?.map((wi, index) => {
784
785
  return (_jsxs(StyledRowItem, { onDragEnd: dragEnd, onDragOver: dragOver, onDrop: (e) => dropWhere(e, wi), children: [!isReadOnly && _jsx(StyledDraggableDiv, { draggable: true, onDragStart: (e) => dragStart(e, wi), children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => onRemove_WhereItem(index) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: () => onAdd_WhereItem(index + 1) }), !isReadOnly && _jsx(TMQdDropDownMenu, { content: _jsx(TMTooltip, { content: SDK_Localizator.toCaseWord(SDKUI_Localizator.OneMore), children: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }) }), items: [
785
786
  { name: SDKUI_Localizator.AddAbove, onClick: () => onAdd_WhereItem(index) },
@@ -797,7 +798,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
797
798
  { name: 'AND', onClick: () => onChange_WhereItem_Or(false, index) },
798
799
  { name: 'OR', onClick: () => onChange_WhereItem_Or(true, index) }
799
800
  ] }), _jsx(TMQdEditableItem, { value: wi.leftBrackets, allowedPattern: /\(/g, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, true, index); } }), _jsx(TMMetadataChooser, { disabled: isReadOnly, filterMetadata: (o => o.perm?.canSearch === AccessLevels.Yes), showEditButton: false, getColorIndex: getColorIndex, showCompleteMetadataName: showCompleteMetadataName, openEditorOnSummaryClick: true, showBorder: false, borderRadius: borderRadius, showId: showId, backgroundColor: getColorIndex({ tid: wi.tid, alias: wi.alias }), qd: formData, values: [{ tid: wi.tid, mid: wi.mid, aliasTID: wi.alias }], onValueChanged: (values) => { values.length > 0 && onChange_WhereItem_Metadato(values[0], index); }, updateIsModalOpen: updateIsModalOpen }), _jsx(TMQdDropDownMenu, { backgroundColor: colorOperator, color: 'green', borderRadius: borderRadius, content: _jsx(StyledDivHorizontal, { children: _jsx(StyledItemWrapper, { children: LocalizeQueryOperators(wi.operator) }) }), items: getQueryOperatorsMenuItems(wi, index) }), _jsx(TMQdWhereItemValue, { whereItem: wi, index: index, onValueChanged: (values) => { onChange_WhereItem_Values(values[0], values[1], index); }, updateIsModalOpen: updateIsModalOpen }), _jsx(TMQdEditableItem, { value: wi.rightBrackets, allowedPattern: /\)/g, backgroundColor: colorBrackets, onValueChanged: (value) => { onChange_WhereItem_Brackets(value, false, index); } })] }, `${wi.tid}_${wi.mid}_${index}`));
800
- })] }) }) }), fromCount > 0 && (!isReadOnly || orderByCount > 0) && _jsx(Item, { title: SDK_Localizator.QueryOrderBy, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, orderByCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.orderBy)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [(!formData?.orderBy || formData?.orderBy.length <= 0) && !isReadOnly &&
801
+ })] }) }) }), fromCount > 0 && (!isReadOnly || orderByCount > 0) && _jsx(Item, { title: SDK_Localizator.QueryOrderBy, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, orderByCount, validationItems.filter((o) => o.PropertyName == TMPropertyNames.orderBy)), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { $disabled: isReadOnly, children: [(!formData?.orderBy || formData?.orderBy.length <= 0) && !isReadOnly &&
801
802
  _jsx(StyledRowItem, { children: _jsx(TMButton, { btnStyle: 'normal', disabled: !formData?.from?.tid, caption: SDKUI_Localizator.Add, onClick: onAdd_OrderByItem }) }), formData?.orderBy?.map((oi, index) => {
802
803
  return (_jsxs(StyledRowItem, { onDragEnd: dragEnd, onDragOver: dragOver, onDrop: (e) => dropOrderBy(e, oi), children: [!isReadOnly && _jsx(StyledDraggableDiv, { draggable: true, onDragStart: (e) => dragStart(e, oi), children: _jsx(IconDraggabledots, { fontSize: 15, color: TMColors.button_icon }) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconClear, { color: TMColors.button_icon }), caption: SDKUI_Localizator.Remove, onClick: () => onRemove_OrderByItem(index) }), !isReadOnly && _jsx(TMButton, { btnStyle: 'icon', padding: '3px 0px', icon: _jsx(IconAddCircleOutline, { color: TMColors.button_icon }), caption: SDKUI_Localizator.AddBelow, onClick: () => onAdd_OrderByItem(index + 1) }), !isReadOnly && _jsx(TMQdDropDownMenu, { content: _jsx(TMTooltip, { content: SDK_Localizator.toCaseWord(SDKUI_Localizator.OneMore), children: _jsx(IconDotsVerticalCircleOutline, { color: TMColors.button_icon }) }), items: [
803
804
  { name: SDKUI_Localizator.AddAbove, onClick: () => onAdd_OrderByItem(index) },
@@ -808,7 +809,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
808
809
  { name: 'ASC', onClick: () => onChange_OrderByItem_Asc(true, oi, index) },
809
810
  { name: 'DESC', onClick: () => onChange_OrderByItem_Asc(false, oi, index) }
810
811
  ] })] }, `${oi.tid}_${oi.mid}_${index}`));
811
- })] }) }) }), fromCount > 0 && _jsx(Item, { title: SDKUI_Localizator.Options, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, undefined, []), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { "$disabled": isReadOnly, children: [showDistinct && _jsx(TMCheckBox, { label: SDK_Localizator.QueryDistinct, value: formData.isDistinct, onValueChanged: () => { setFormData({ ...formData, isDistinct: !formData.isDistinct }); } }), _jsx(TMTextBox, { type: 'number', width: '200px', label: SDKUI_Localizator.MaxDcmtsToBeReturned, validationItems: validationItems.filter((o) => o.PropertyName == TMPropertyNames.maxDcmtsToBeReturned), value: formData.maxDcmtsToBeReturned, onBlur: (newValue) => setFormData({ ...formData, maxDcmtsToBeReturned: Number(newValue) }) })] }) }) })] }), _jsx(ConfirmQueryParamsDialog, {})] }), showResultSearch && _jsxs(StyledModalContainer, { style: { backgroundColor: 'white' }, children: [" ", renderResultSearchForm, " "] })] }));
812
+ })] }) }) }), fromCount > 0 && _jsx(Item, { title: SDKUI_Localizator.Options, titleRender: (tabItemProps) => renderAccordionTitle(tabItemProps, undefined, []), children: _jsx(StyledAccordionItemContainer, { children: _jsxs(StyledAccordionItemContent, { $disabled: isReadOnly, children: [showDistinct && _jsx(TMCheckBox, { label: SDK_Localizator.QueryDistinct, value: formData.isDistinct, onValueChanged: () => { setFormData({ ...formData, isDistinct: !formData.isDistinct }); } }), _jsx(TMTextBox, { type: 'number', width: '200px', label: SDKUI_Localizator.MaxDcmtsToBeReturned, validationItems: validationItems.filter((o) => o.PropertyName == TMPropertyNames.maxDcmtsToBeReturned), value: formData.maxDcmtsToBeReturned, onBlur: (newValue) => setFormData({ ...formData, maxDcmtsToBeReturned: Number(newValue) }) })] }) }) })] }), _jsx(ConfirmQueryParamsDialog, {})] }), showResultSearch && _jsxs(StyledModalContainer, { style: { backgroundColor: 'white' }, children: [" ", renderResultSearchForm, " "] })] }));
812
813
  };
813
814
  export default TMQueryEditor;
814
815
  const TMQdEditableItem = ({ value, placeHolder, width, backgroundColor, allowedPattern, onValueChanged }) => {
@@ -1038,5 +1039,5 @@ const StyledContent = styled.div `
1038
1039
  const TMQdDropDownMenu = ({ content, items, disabled = false, color = TMColors.text_normal, backgroundColor = TMColors.default_background, borderRadius }) => {
1039
1040
  const [id, setID] = useState('');
1040
1041
  useEffect(() => { setID(genUniqueId()); }, [content]);
1041
- return (_jsx(ContextMenu, { target: `#idContainer${id}`, items: items || [], trigger: "left", children: _jsx(StyledContent, { id: `idContainer${id}`, tabIndex: disabled ? -1 : 0, "$disabled": disabled, "$color": color, "$backgroundColor": backgroundColor, "$borderRadius": borderRadius, children: content }) }));
1042
+ return (_jsx(ContextMenu, { target: `#idContainer${id}`, items: items || [], trigger: "left", children: _jsx(StyledContent, { id: `idContainer${id}`, tabIndex: disabled ? -1 : 0, $disabled: disabled, $color: color, $backgroundColor: backgroundColor, $borderRadius: borderRadius, children: content }) }));
1042
1043
  };
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- export declare const StyledCommandsPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$isMobile"> & {
2
+ export declare const StyledCommandsPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
+ style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
4
+ }, {
3
5
  $isMobile?: boolean;
4
- }, never> & Partial<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$isMobile"> & {
5
- $isMobile?: boolean;
6
- }, never>>> & string;
6
+ }>> & string;
7
7
  export interface TMCommandItemProps {
8
8
  icon: React.ReactNode;
9
9
  selected?: boolean;
@@ -11,7 +11,7 @@ export const StyledCommandsPanel = styled.div `
11
11
  padding: 10px;
12
12
  gap: 10px;
13
13
  `;
14
- const TMCommandsPanel = ({ isMobile, items }) => (_jsx(StyledCommandsPanel, { "$isMobile": isMobile, children: items.map((iconProps, idx) => (_jsx("span", { style: {
14
+ const TMCommandsPanel = ({ isMobile, items }) => (_jsx(StyledCommandsPanel, { $isMobile: isMobile, children: items.map((iconProps, idx) => (_jsx("span", { style: {
15
15
  background: iconProps.selected ? 'white' : 'transparent',
16
16
  borderRadius: '6px',
17
17
  color: iconProps.selected ? '#005B97' : 'white',
@@ -16,6 +16,7 @@ interface ITMHeader {
16
16
  searchContext?: TMSearchContext;
17
17
  settingsMenuContext?: React.ReactNode;
18
18
  customButtons?: React.ReactNode;
19
+ toppyButton?: React.ReactNode;
19
20
  onMenusOpen?: VoidFunction;
20
21
  onChangePassword?: VoidFunction;
21
22
  onLogout?: VoidFunction;
@@ -1,7 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useRef, useMemo } from 'react';
3
3
  import six from '../../assets/six.png';
4
- import { getAvatarColor, IconCloseOutline, IconCopy, openApps, SDKUI_Localizator } from '../../helper';
4
+ import { getAvatarColor, IconCloseOutline, IconCopy, IconOpenInNew, openApps, SDKUI_Localizator, WHATS_NEWS_LINK_URL } from '../../helper';
5
5
  import styled, { keyframes } from 'styled-components';
6
6
  import { SDK_Globals, AuthenticationModes, AppModules, UserLevels, CultureIDs } from '@topconsultnpm/sdk-ts';
7
7
  import { TMColors } from '../../utils/theme';
@@ -10,6 +10,7 @@ import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
10
10
  import { TMAboutApp } from './TMAboutApp';
11
11
  import ShowAlert from '../base/TMAlert';
12
12
  import TMResizableMenu from '../base/TMResizableMenu';
13
+ import TMTooltip from '../base/TMTooltip';
13
14
  import it from '../../assets/italy.svg';
14
15
  import de from '../../assets/german.svg';
15
16
  import fr from '../../assets/france.svg';
@@ -87,9 +88,9 @@ export const copyUserInfoToClipboard = (userName, cultureId, archiveId, archiveD
87
88
  };
88
89
  export const TMSearchBar = ({ searchValue, onSearchValueChanged, maxWidth, marginLeft }) => {
89
90
  const deviceType = useDeviceType();
90
- return (_jsxs(StyledSearchBarContainer, { style: { maxWidth: maxWidth ? maxWidth : deviceType === DeviceType.MOBILE ? '65%' : '650px', marginLeft: marginLeft ? marginLeft : deviceType === DeviceType.MOBILE ? '10px' : '20px' }, "$isMobile": deviceType === DeviceType.MOBILE, children: [" ", _jsx(StyledSearchBar, { placeholder: SDKUI_Localizator.Search + '...', type: "text", value: searchValue, onChange: (e) => onSearchValueChanged(e.target.value) }), searchValue.length > 0 && _jsx(IconCloseOutline, { onClick: () => onSearchValueChanged(''), color: '#00000060', style: { cursor: 'pointer', position: 'absolute', width: '20px', height: '20px', right: '5px', top: '5px', zIndex: 1 } })] }));
91
+ return (_jsxs(StyledSearchBarContainer, { style: { maxWidth: maxWidth ? maxWidth : deviceType === DeviceType.MOBILE ? '65%' : '650px', marginLeft: marginLeft ? marginLeft : deviceType === DeviceType.MOBILE ? '10px' : '20px' }, $isMobile: deviceType === DeviceType.MOBILE, children: [" ", _jsx(StyledSearchBar, { placeholder: SDKUI_Localizator.Search + '...', type: "text", value: searchValue, onChange: (e) => onSearchValueChanged(e.target.value) }), searchValue.length > 0 && _jsx(IconCloseOutline, { onClick: () => onSearchValueChanged(''), color: '#00000060', style: { cursor: 'pointer', position: 'absolute', width: '20px', height: '20px', right: '5px', top: '5px', zIndex: 1 } })] }));
91
92
  };
92
- const TMHeader = ({ customButtons = _jsx(_Fragment, {}), onMenusOpen, showSettingsMenu = true, showSearchBar = true, clearSearchJobValue, clearSearchQEValue, searchContext = TMSearchContext.JOBS, onChangePassword, onLogout, settingsMenuContext, onSeacrhJobsValueChange, onSeacrhJobslistValueChange, onSeacrhProcessMonitorValueChange, onSeacrhProcessValueChange, onSeacrhPlatformValueChange, onSeacrhQEValueChange, onSettingsClick }) => {
93
+ const TMHeader = ({ customButtons = _jsx(_Fragment, {}), toppyButton = _jsx(_Fragment, {}), onMenusOpen, showSettingsMenu = true, showSearchBar = true, clearSearchJobValue, clearSearchQEValue, searchContext = TMSearchContext.JOBS, onChangePassword, onLogout, settingsMenuContext, onSeacrhJobsValueChange, onSeacrhJobslistValueChange, onSeacrhProcessMonitorValueChange, onSeacrhProcessValueChange, onSeacrhPlatformValueChange, onSeacrhQEValueChange, onSettingsClick }) => {
93
94
  const [appRoutes, setAppRoutes] = useState();
94
95
  const [menuStatus, setMenuStatus] = useState(false);
95
96
  const [showAppMenu, setShowAppMenu] = useState(false);
@@ -240,23 +241,23 @@ const TMHeader = ({ customButtons = _jsx(_Fragment, {}), onMenusOpen, showSettin
240
241
  const isOfficeConnector = useMemo(() => {
241
242
  return SDK_Globals.appModule === AppModules.WORD_CONNECTOR || SDK_Globals.appModule === AppModules.EXCEL_CONNECTOR || SDK_Globals.appModule === AppModules.POWERPOINT_CONNECTOR || SDK_Globals.appModule === AppModules.OUTLOOK_CONNECTOR;
242
243
  }, [SDK_Globals.appModule]);
243
- return (_jsxs(StyledHeaderContainer, { "$appName": SDK_Globals.appModule, children: [(isAdministrativeLevel && !isOfficeConnector) &&
244
- _jsx(TMResizableMenu, { ref: appMenuRef, isVisible: showAppMenu, top: 58, left: 10, resizable: false, maxWidth: 215, minWidth: 215, maxHeight: 180, minHeight: 180, onClose: () => { }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: [_jsx("h5", { style: { color: TMColors.primary }, children: "Accessi ad altre applicazioni " }), _jsx("hr", {}), _jsxs("div", { style: { display: 'flex', gap: '10px', alignItems: 'center', width: '100%' }, children: [_jsxs(AppMenuButton, { onClick: () => openAppsHandler(appModuleHandler.app_1, tmSession, appRoutes), "$bgColor": '#482234', children: [_jsx("img", { src: six, alt: appModuleHandler.app_1, width: 30, height: 30 }), " ", appModuleHandler.app_1.toUpperCase()] }), _jsxs(AppMenuButton, { onClick: () => openAppsHandler(appModuleHandler.app_2, tmSession, appRoutes), "$bgColor": '#1d6f42', children: [_jsx("img", { src: six, alt: appModuleHandler.app_2, width: 30, height: 30 }), " ", appModuleHandler.app_2.toUpperCase()] })] })] }) }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', width: '100%', gap: isMobile ? 5 : 15 }, children: [_jsxs("div", { style: { height: '50px', display: 'flex', alignItems: 'center', gap: 20, justifyContent: 'center' }, children: [_jsx(StyledLogo, { ref: logoRef, style: { cursor: (isAdministrativeLevel && !isOfficeConnector) ? 'pointer' : 'default' }, onMouseEnter: () => {
244
+ return (_jsxs(StyledHeaderContainer, { $appName: SDK_Globals.appModule, children: [(isAdministrativeLevel && !isOfficeConnector) &&
245
+ _jsx(TMResizableMenu, { ref: appMenuRef, isVisible: showAppMenu, top: 58, left: 10, resizable: false, maxWidth: 215, minWidth: 215, maxHeight: 180, minHeight: 180, onClose: () => { }, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: [_jsx("h5", { style: { color: TMColors.primary }, children: "Accessi ad altre applicazioni " }), _jsx("hr", {}), _jsxs("div", { style: { display: 'flex', gap: '10px', alignItems: 'center', width: '100%' }, children: [_jsxs(AppMenuButton, { onClick: () => openAppsHandler(appModuleHandler.app_1, tmSession, appRoutes), $bgColor: '#482234', children: [_jsx("img", { src: six, alt: appModuleHandler.app_1, width: 30, height: 30 }), " ", appModuleHandler.app_1.toUpperCase()] }), _jsxs(AppMenuButton, { onClick: () => openAppsHandler(appModuleHandler.app_2, tmSession, appRoutes), $bgColor: '#1d6f42', children: [_jsx("img", { src: six, alt: appModuleHandler.app_2, width: 30, height: 30 }), " ", appModuleHandler.app_2.toUpperCase()] })] })] }) }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', width: '100%', gap: isMobile ? 5 : 15 }, children: [_jsxs("div", { style: { height: '50px', display: 'flex', alignItems: 'center', gap: 20, justifyContent: 'center' }, children: [_jsx(StyledLogo, { ref: logoRef, style: { cursor: (isAdministrativeLevel && !isOfficeConnector) ? 'pointer' : 'default' }, onMouseEnter: () => {
245
246
  if (openMenuTimer.current)
246
247
  clearTimeout(openMenuTimer.current);
247
248
  openMenuTimer.current = setTimeout(() => { setShowAppMenu(true); onMenusOpen?.(); }, 200);
248
249
  }, onMouseLeave: () => {
249
250
  if (openMenuTimer.current)
250
251
  clearTimeout(openMenuTimer.current);
251
- }, src: six, height: isMobile ? 35 : 40, alt: "" }), (!isMobile || SDK_Globals.appModule === AppModules.WORD_CONNECTOR) && _jsx(StyledHeaderAppText, { children: headerAppName })] }), showSearchBar && _jsxs(_Fragment, { children: [searchContext === TMSearchContext.JOBS_LIST && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobListValue(e), searchValue: searchJobListValue }), searchContext === TMSearchContext.JOBS && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobsValue(e), searchValue: searchJobsValue }), searchContext === TMSearchContext.PROCESSES && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessesValue(e), searchValue: searchProcessesValue }), searchContext === TMSearchContext.PROCESS_MONITOR && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessMonitorValue(e), searchValue: searchProcessMonitorValue }), searchContext === TMSearchContext.PLATFORM && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchPlatformValue(e), searchValue: searchPlatformValue }), searchContext === TMSearchContext.QE && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchQEValue(e), searchValue: searchQEValue })] }), customButtons] }), showSettingsMenu && _jsxs(StyledHeaderIcon, { onClick: () => onSettingsClick?.(), children: [" ", _jsx(IconHeaderSettings, { fontSize: 24 }), " "] }), _jsx(UserAvatarContainer, { "$isSelected": menuStatus, ref: userIcon, onClick: e => {
252
+ }, src: six, height: isMobile ? 35 : 40, alt: "" }), (!isMobile || SDK_Globals.appModule === AppModules.WORD_CONNECTOR) && _jsx(StyledHeaderAppText, { children: headerAppName })] }), showSearchBar && _jsxs(_Fragment, { children: [searchContext === TMSearchContext.JOBS_LIST && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobListValue(e), searchValue: searchJobListValue }), searchContext === TMSearchContext.JOBS && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchJobsValue(e), searchValue: searchJobsValue }), searchContext === TMSearchContext.PROCESSES && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessesValue(e), searchValue: searchProcessesValue }), searchContext === TMSearchContext.PROCESS_MONITOR && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchProcessMonitorValue(e), searchValue: searchProcessMonitorValue }), searchContext === TMSearchContext.PLATFORM && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchPlatformValue(e), searchValue: searchPlatformValue }), searchContext === TMSearchContext.QE && _jsx(TMSearchBar, { onSearchValueChanged: (e) => setSearchQEValue(e), searchValue: searchQEValue })] }), customButtons] }), toppyButton, showSettingsMenu && _jsxs(StyledHeaderIcon, { onClick: () => onSettingsClick?.(), children: [" ", _jsx(IconHeaderSettings, { fontSize: 24 }), " "] }), _jsx(UserAvatarContainer, { $isSelected: menuStatus, ref: userIcon, onClick: e => {
252
253
  e.stopPropagation();
253
254
  e.preventDefault();
254
255
  setMenuStatus(prev => !prev);
255
- }, children: _jsx(UserAvatar, { "$bgColor": avatarColor, children: userInitials }) }), menuStatus &&
256
- _jsx(TMResizableMenu, { ref: menuRef, isVisible: menuStatus, top: 60, right: 10, resizable: false, maxWidth: 300, minWidth: 300, maxHeight: 180, minHeight: 180, padding: 0, children: _jsxs(MenuContainer, { children: [_jsxs(UserProfileSection, { children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 12, height: 'max-content' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 12, height: 'max-content' }, children: [_jsx(AvatarContainer, { children: _jsx(UserAvatarLarge, { "$bgColor": avatarColor, children: userInitials }) }), _jsxs(UserInfo, { children: [_jsxs(UserNameContainer, { children: [_jsx(UserName, { children: userName }), _jsx(CultureFlag, { src: cultureFlag, alt: cultureName, title: cultureName })] }), domain && _jsx(SessionInfo, { style: { padding: 0, margin: 0 }, children: `(${domain})` })] })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start', justifyContent: 'center', gap: 5 }, children: [_jsx(SessionInfo, { children: endpoint }), _jsx(SessionInfo, { children: archiveId + ' (' + archiveDesc + ')' })] })] }), _jsx(CopyIcon, { onClick: (e) => {
257
- e.stopPropagation();
258
- copyUserInfoToClipboard(userName, cultureId, archiveId, archiveDesc, endpoint, domain);
259
- }, title: SDKUI_Localizator.CopyUserInfo, children: _jsx(IconCopy, { fontSize: 12 }) }), _jsx(LogoutButton, { onClick: () => {
256
+ }, children: _jsx(UserAvatar, { $bgColor: avatarColor, children: userInitials }) }), menuStatus &&
257
+ _jsx(TMResizableMenu, { ref: menuRef, isVisible: menuStatus, top: 60, right: 10, resizable: false, maxWidth: 300, minWidth: 300, maxHeight: 188, minHeight: 188, padding: 0, children: _jsxs(MenuContainer, { children: [_jsxs(UserProfileSection, { children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 12, height: 'max-content', flex: 1, minWidth: 0 }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 12, height: 'max-content' }, children: [_jsx(AvatarContainer, { children: _jsx(UserAvatarLarge, { $bgColor: avatarColor, children: userInitials }) }), _jsxs(UserInfo, { children: [_jsxs(UserNameContainer, { children: [_jsx(UserName, { children: userName }), _jsx(CultureFlag, { src: cultureFlag, alt: cultureName, title: cultureName })] }), domain && _jsx(SessionInfo, { style: { padding: 0, margin: 0 }, children: `(${domain})` })] })] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start', justifyContent: 'center', gap: 5, flex: 1, minWidth: 0 }, children: [_jsx(SessionInfo, { children: endpoint }), _jsx(SessionInfo, { children: archiveId + ' (' + archiveDesc + ')' })] }), _jsxs(HeaderMenuActions, { children: [_jsx(TMTooltip, { content: SDKUI_Localizator.CopyUserInfo, children: _jsx(HeaderMenuActionIcon, { $color: '#605e5c', onClick: (e) => {
258
+ e.stopPropagation();
259
+ copyUserInfoToClipboard(userName, cultureId, archiveId, archiveDesc, endpoint, domain);
260
+ }, children: _jsx(IconCopy, { fontSize: 14 }) }) }), _jsx(TMTooltip, { content: SDKUI_Localizator.ShowReleaseNotesInfo, children: _jsx(HeaderMenuActionIcon, { as: 'a', $color: TMColors.primary, href: WHATS_NEWS_LINK_URL, target: '_blank', rel: 'noopener noreferrer', onClick: (e) => e.stopPropagation(), children: _jsx(IconOpenInNew, { fontSize: 14 }) }) })] })] })] }), _jsx(LogoutButton, { onClick: () => {
260
261
  setMenuStatus(false);
261
262
  onLogout && onLogout();
262
263
  }, children: _jsx(LogoutText, { children: SDKUI_Localizator.Logout }) })] }), _jsxs(BottomActionsContainer, { children: [isTopMediaAuth && (_jsx(BottomActionButton, { onClick: () => {
@@ -468,8 +469,9 @@ const MenuContainer = styled.div `
468
469
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
469
470
  `;
470
471
  const UserProfileSection = styled.div `
472
+ position: relative;
471
473
  display: flex;
472
- padding: 20px;
474
+ padding: 16px 20px;
473
475
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
474
476
  border-bottom: 1px solid #e1e5e9;
475
477
  gap: 12px;
@@ -515,7 +517,7 @@ const CultureFlag = styled.img `
515
517
  `;
516
518
  const LogoutButton = styled.div `
517
519
  position: absolute;
518
- top: 20px;
520
+ top: 16px;
519
521
  right: 20px;
520
522
  cursor: pointer;
521
523
  transition: all 0.2s ease;
@@ -546,29 +548,37 @@ const AvatarContainer = styled.div `
546
548
  position: relative;
547
549
  flex-shrink: 0;
548
550
  `;
549
- const CopyIcon = styled.div `
550
- position: absolute;
551
- bottom: 50px;
552
- right: 15px;
553
- width: 20px;
554
- height: 20px;
551
+ const HeaderMenuActions = styled.div `
552
+ display: flex;
553
+ flex-direction: column;
554
+ gap: 6px;
555
+ flex-shrink: 0;
556
+ `;
557
+ const HeaderMenuActionIcon = styled.div `
558
+ width: 22px;
559
+ height: 22px;
555
560
  background: white;
556
- border: 1px solid #e1e5e9;
561
+ border: 1px solid ${props => props.$color}55;
557
562
  border-radius: 50%;
558
563
  display: flex;
559
564
  align-items: center;
560
565
  justify-content: center;
561
566
  cursor: pointer;
562
- color: #605e5c;
563
567
  transition: all 0.2s ease;
564
568
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
565
- z-index: 10;
566
- opacity: 0.6;
569
+ text-decoration: none;
567
570
 
568
- &:hover {
569
- background: #b7b7b7;
571
+ /* "&&" alza la specificita': un eventuale "a, a:visited { color: inherit }"
572
+ dell'app ospite vincerebbe sulla singola classe di styled-components */
573
+ &&,
574
+ &&:visited {
575
+ color: ${props => props.$color};
576
+ }
577
+
578
+ &&:hover {
579
+ background: ${props => props.$color};
580
+ border-color: ${props => props.$color};
570
581
  color: white;
571
- opacity: 1;
572
582
  }
573
583
 
574
584
  &:active {
@@ -22,7 +22,7 @@ const StyledTMSidebarContainer = styled.div `
22
22
  z-index: 100;
23
23
  `;
24
24
  const TMSidebar = ({ items, height, borderRightRadius, left, top, width }) => {
25
- return (_jsx(StyledTMSidebarContainer, { "$borderRightRadius": borderRightRadius, "$left": left, "$top": top, "$width": width, "$appName": SDK_Globals.appModule, "$height": height, children: _jsx(ScrollView, { height: "calc(100%)", width: "100%", useNative: true, children: _jsx("div", { style: {
25
+ return (_jsx(StyledTMSidebarContainer, { $borderRightRadius: borderRightRadius, $left: left, $top: top, $width: width, $appName: SDK_Globals.appModule, $height: height, children: _jsx(ScrollView, { height: "calc(100%)", width: "100%", useNative: true, children: _jsx("div", { style: {
26
26
  display: "flex",
27
27
  flexDirection: "column",
28
28
  alignItems: "center",
@@ -37,7 +37,7 @@ const StyledTMSidebarItemContainer = styled.div `
37
37
  `;
38
38
  const TMSidebarItem = (props) => {
39
39
  let app = SDK_Globals.appModule;
40
- return (_jsx(TMTooltip, { hideAfterDelay: true, content: props.tooltipContent ?? props.name, children: _jsxs(StyledTMSidebarItemContainer, { "$app": app, "$isApp": props.isAppIcon, onClick: () => props.onClick?.(props), "$isSelected": props.isSelected, children: [_jsxs("div", { children: [_jsx("i", { children: props.icon }), _jsx("p", { children: props.name })] }), props.badgeNumber > 0 && (_jsx("div", { style: {
40
+ return (_jsx(TMTooltip, { hideAfterDelay: true, content: props.tooltipContent ?? props.name, children: _jsxs(StyledTMSidebarItemContainer, { $app: app, $isApp: props.isAppIcon, onClick: () => props.onClick?.(props), $isSelected: props.isSelected, children: [_jsxs("div", { children: [_jsx("i", { children: props.icon }), _jsx("p", { children: props.name })] }), props.badgeNumber > 0 && (_jsx("div", { style: {
41
41
  position: 'absolute',
42
42
  top: '4px',
43
43
  right: '4px',
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
3
  import { IconLocked, IconMetadata_Computed, IconMetadata_DataList, IconMetadata_Date, IconMetadata_DynamicDataList, IconMetadata_Numerator, IconMetadata_Numeric, IconMetadata_Special, IconMetadata_Text, IconMetadata_User, LocalizeMetadataFormats, SDKUI_Localizator, getCompleteMetadataName, getTIDByMID } from '../../helper';
4
4
  import { DcmtTypeListCacheService, LayoutModes, MetadataDataDomains, MetadataDataTypes, MetadataFormats, ObjectClasses, SDK_Globals } from '@topconsultnpm/sdk-ts';
@@ -92,8 +92,11 @@ export const TMMetadataIcon = ({ tid, md, color, layoutMode = LayoutModes.Update
92
92
  break;
93
93
  }
94
94
  }
95
+ // color='inherit' serve solo all'icona (eredita il colore dell'editor): il tooltip è renderizzato in overlay,
96
+ // dove 'inherit' non risolverebbe al colore dell'editor, quindi lì manteniamo la palette normale
97
+ let tooltipColor = color === 'inherit' ? undefined : color;
95
98
  return (_jsx(_Fragment, { children: icon
96
- ? _jsx(TMMetadataTooltip, { tid: tid, md: md, layoutMode: layoutMode, color: color, children: icon })
99
+ ? _jsx(TMMetadataTooltip, { tid: tid, md: md, layoutMode: layoutMode, color: tooltipColor, children: icon })
97
100
  : null }));
98
101
  };
99
102
  export const TMMetadataTooltip = ({ tid, md, color, children, layoutMode = LayoutModes.Update }) => {
@@ -107,7 +110,7 @@ export const TMMetadataTooltip = ({ tid, md, color, children, layoutMode = Layou
107
110
  let isNumeratorInArk = md?.dataDomain === MetadataDataDomains.Numerator && layoutMode === LayoutModes.Ark;
108
111
  const renderTooltipContent = (tid, md) => {
109
112
  return (!md ? null
110
- : _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { "$color": color, children: `${SDK_Globals.useLocalizedName ? md.nameLoc : md.name} (TID: ${tid}, MID: ${md.id})` }), md.description && _jsx(StyledTooltipItem, { "$color": color, children: md.description }), _jsx(StyledTooltipSeparatorItem, { color: color }), md.objectClass === ObjectClasses.Permission && _jsx(StyledTooltipItem, { style: { fontWeight: 600 }, children: 'Tipo documento NON autorizzato' }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsxs(StyledTooltipItem, { "$color": color, children: [md.dataType, " ", md.dataType == MetadataDataTypes.Varchar ? `(${md.length ?? 0})` : md.dataType == MetadataDataTypes.Number ? `(${md.length ?? 0},${md.scale ?? 0})` : '', md.isPrimaryKey === 1 ? ' (PK)' : ''] }), _jsx(StyledTooltipItem, { style: { color: md.isRequired === 1 && !isNumeratorInArk ? TMColors.error : color }, children: md.isRequired === 1 && !isNumeratorInArk ? SDKUI_Localizator.Required : SDKUI_Localizator.RequiredNOT }), md.dataDomain && _jsx(StyledTooltipItem, { "$color": color, children: md.dataDomain }), md.isLexProt == 1 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), md.isLexProt == 2 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.MetadataFlag}` }), md.isLexProt == 3 && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes} (${SDKUI_Localizator.MetadataFlag})` }), md.isFreeSearchInput && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), md.isSpecialSearchOutput && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search_Special}: ${SDKUI_Localizator.Yes}` }), md.format?.format && md.format.format != MetadataFormats.None && _jsx(StyledTooltipItem, { color: color, children: `${SDKUI_Localizator.Format}: ${LocalizeMetadataFormats(md.format.format)}` }), md.defaultValue && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Default}: ${_setDefaultValueForUI(md.defaultValue)}` }), md.fromTID && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.MetadataRoot}: ${md.isRootMID == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), md.templateMID && _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Template}: ${md.templateMID}` }), md.perm && _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { "$color": 'primary', "$marginTop": '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Archive}: ${md.perm.canArchive ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.View_Metadato}: ${md.perm.canView ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Search}: ${md.perm.canSearch ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { "$color": color, children: `${SDKUI_Localizator.Update}: ${md.perm.canUpdate ?? SDKUI_Localizator.No}` })] })] }));
113
+ : _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { $color: color, children: `${SDK_Globals.useLocalizedName ? md.nameLoc : md.name} (TID: ${tid}, MID: ${md.id})` }), md.description && _jsx(StyledTooltipItem, { $color: color, children: md.description }), _jsx(StyledTooltipSeparatorItem, { color: color }), md.objectClass === ObjectClasses.Permission && _jsx(StyledTooltipItem, { style: { fontWeight: 600 }, children: 'Tipo documento NON autorizzato' }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsxs(StyledTooltipItem, { $color: color, children: [md.dataType, " ", md.dataType == MetadataDataTypes.Varchar ? `(${md.length ?? 0})` : md.dataType == MetadataDataTypes.Number ? `(${md.length ?? 0},${md.scale ?? 0})` : '', md.isPrimaryKey === 1 ? ' (PK)' : ''] }), _jsx(StyledTooltipItem, { style: { color: md.isRequired === 1 && !isNumeratorInArk ? TMColors.error : color }, children: md.isRequired === 1 && !isNumeratorInArk ? SDKUI_Localizator.Required : SDKUI_Localizator.RequiredNOT }), md.dataDomain && _jsx(StyledTooltipItem, { $color: color, children: md.dataDomain }), md.isLexProt == 1 && _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), md.isLexProt == 2 && _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.MetadataFlag}` }), md.isLexProt == 3 && _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes} (${SDKUI_Localizator.MetadataFlag})` }), md.isFreeSearchInput && _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), md.isSpecialSearchOutput && _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.Search_Special}: ${SDKUI_Localizator.Yes}` }), md.format?.format && md.format.format != MetadataFormats.None && _jsx(StyledTooltipItem, { color: color, children: `${SDKUI_Localizator.Format}: ${LocalizeMetadataFormats(md.format.format)}` }), md.format?.format === MetadataFormats.CustomRegEx && md.format.formatCustom && _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.PatternRegex}: ${md.format.formatCustom}` }), md.defaultValue && _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.Default}: ${_setDefaultValueForUI(md.defaultValue)}` }), md.fromTID && _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.MetadataRoot}: ${md.isRootMID == 1 ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), md.templateMID && _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.Template}: ${md.templateMID}` }), md.perm && _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { $color: 'primary', $marginTop: '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, { color: color }), _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.Archive}: ${md.perm.canArchive ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.View_Metadato}: ${md.perm.canView ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.Search}: ${md.perm.canSearch ?? SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { $color: color, children: `${SDKUI_Localizator.Update}: ${md.perm.canUpdate ?? SDKUI_Localizator.No}` })] })] }));
111
114
  };
112
115
  return (_jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMTooltip, { content: renderTooltipContent(tid, md), children: children }) }));
113
116
  };
@@ -1,11 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
- import { getDTDDisplayNameInfo, IconDcmtType, IconDcmtTypeOnlyMetadata, IconLocked, IconView, isCreateCertificateEnabled, isPdfEditorEnabled, isSign4TopEnabled, LocalizeArchiveConstraints, LocalizeParametricFilterTypes, SDKUI_Localizator, TMImageLibrary } from '../../helper';
3
+ import { getDTDDisplayNameInfo, IconDcmtType, IconDcmtTypeOnlyMetadata, IconLocked, IconView, isCreateCertificateEnabled, isPdfEditorEnabled, isSign4TopEnabled, LocalizeArchiveConstraints, isNotGrantedDTD, LocalizeParametricFilterTypes, SDKUI_Localizator, TMImageLibrary } from '../../helper';
4
4
  import { AccessLevels, AccessLevelsEx, ArchiveConstraints, DcmtTypeListCacheService, OwnershipLevels, ParametricFilterTypes, SDK_Globals, SDK_Localizator, TemplateTIDs } from '@topconsultnpm/sdk-ts';
5
5
  import TMSpinner from '../base/TMSpinner';
6
6
  import { StyledDivHorizontal, StyledTooltipContainer, StyledTooltipItem, StyledTooltipSeparatorItem } from '../base/Styled';
7
7
  import TMTooltip from '../base/TMTooltip';
8
8
  import { TMColors } from '../../utils/theme';
9
+ import styled, { keyframes } from 'styled-components';
9
10
  export var ImageIDList;
10
11
  (function (ImageIDList) {
11
12
  ImageIDList["arrow_001"] = "arrow_001";
@@ -242,7 +243,7 @@ export const TMDcmtTypeIcon = ({ dtd }) => {
242
243
  if (!dtd)
243
244
  return null;
244
245
  let icon = null;
245
- if (dtd.customData2 === "NOTGRANTED")
246
+ if (isNotGrantedDTD(dtd))
246
247
  icon = _jsx(IconLocked, { fontSize: 16 });
247
248
  else if (dtd.imageID && dtd.imageID.length > 0)
248
249
  icon = _jsx(TMImageLibrary, { imageID: dtd.imageID });
@@ -259,33 +260,77 @@ export const TMDcmtTypeIcon = ({ dtd }) => {
259
260
  return (_jsx(TMDcmtTypeTooltip, { dtd: dtd, children: icon }));
260
261
  };
261
262
  export const TMDcmtTypeTooltip = ({ dtd, children }) => {
262
- return (_jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMTooltip, { content: renderDTDTooltipContent(dtd), children: children }) }));
263
+ return (_jsx("div", { style: { pointerEvents: 'all' }, children: _jsx(TMTooltip, { allowContentInteraction: true, content: renderDTDTooltipContent(dtd), children: children }) }));
263
264
  };
265
+ /** Legge il tipo documento dalle cache dell'SDK senza passare dal mutex. Serve perché
266
+ * l'espansione di una cartella nell'albero ricrea tutte le celle: senza una lettura sincrona
267
+ * ogni riga tornerebbe a mostrare il testo di "nessuna selezione" fino alla fine delle
268
+ * richieste (una per TID, serializzate dal mutex).
269
+ * GetCache restituisce le mappe vive usate dall'SDK, quindi le invalidazioni
270
+ * (RemoveAllWithMetadata, RemoveAllWithoutMetadata, logout) hanno effetto immediato. */
271
+ const getCachedDTD = (tid, tmSession) => {
272
+ if (!tid || tid <= 0)
273
+ return undefined;
274
+ const accessToken = (tmSession ?? SDK_Globals.tmSession)?.SessionDescr?.accessToken;
275
+ if (!accessToken)
276
+ return undefined;
277
+ // La cache senza metadati è popolata dalla login: copre già i tipi documento autorizzati
278
+ return DcmtTypeListCacheService.GetCache(false).get(accessToken)?.find(o => o.id === tid)
279
+ ?? DcmtTypeListCacheService.GetCache(true).get(accessToken)?.find(o => o.id === tid);
280
+ };
281
+ const shimmer = keyframes `
282
+ 0% { background-position: 200% 0; }
283
+ 100% { background-position: -200% 0; }
284
+ `;
285
+ /** Segnaposto animato mostrato al posto del nome durante il caricamento.
286
+ * Grigio semitrasparente: leggibile sia su sfondo chiaro che scuro. */
287
+ const StyledTidSkeleton = styled.span `
288
+ display: inline-block;
289
+ flex: 0 0 auto;
290
+ width: 90px;
291
+ height: 0.9em;
292
+ border-radius: 4px;
293
+ background-image: linear-gradient(90deg, rgba(127, 127, 127, 0.12) 25%, rgba(127, 127, 127, 0.28) 50%, rgba(127, 127, 127, 0.12) 75%);
294
+ background-size: 200% 100%;
295
+ animation: ${shimmer} 1.4s ease-in-out infinite;
296
+
297
+ @media (prefers-reduced-motion: reduce) { animation: none; }
298
+ `;
264
299
  const TMTidViewer = ({ tmSession, tid, did, showIcon = false, color, showId = false, noneSelectionText = `<${SDKUI_Localizator.NoneSelection}>` }) => {
265
- const [dtd, setDtd] = useState();
300
+ const accessToken = (tmSession ?? SDK_Globals.tmSession)?.SessionDescr?.accessToken;
301
+ const [dtd, setDtd] = useState(() => getCachedDTD(tid, tmSession));
302
+ const [isLoading, setIsLoading] = useState(() => !!tid && tid > 0 && !getCachedDTD(tid, tmSession));
266
303
  const fetchData = async (tid, did) => {
267
304
  if (!tid || tid <= 0) {
268
305
  setDtd(undefined);
306
+ setIsLoading(false);
269
307
  return;
270
308
  }
309
+ const cached = getCachedDTD(tid, tmSession);
310
+ if (cached)
311
+ setDtd(cached);
312
+ setIsLoading(!cached);
271
313
  let count = DcmtTypeListCacheService.CacheCount(true, 'all', tmSession);
272
314
  if (count <= 0)
273
315
  TMSpinner.show({ description: `${SDKUI_Localizator.Loading} - ${SDK_Localizator.ListDcmtTypeOrView} ...` });
274
316
  try {
275
- let resultDTD = await DcmtTypeListCacheService.GetAsync(tid);
317
+ let resultDTD = await DcmtTypeListCacheService.GetAsync(tid, true, tmSession);
276
318
  if (!resultDTD) {
277
- resultDTD = await DcmtTypeListCacheService.GetWithNotGrantedAsync(tid, did);
319
+ resultDTD = await DcmtTypeListCacheService.GetWithNotGrantedAsync(tid, did, undefined, true, tmSession);
278
320
  }
279
321
  setDtd(resultDTD);
280
322
  }
281
323
  finally {
282
324
  if (count <= 0)
283
325
  TMSpinner.hide();
326
+ setIsLoading(false);
284
327
  }
285
328
  };
329
+ // accessToken e non tmSession: la sessione è un oggetto e un'identità nuova a ogni render
330
+ // del chiamante rifarebbe la richiesta senza motivo
286
331
  useEffect(() => {
287
332
  fetchData(tid, did);
288
- }, [tid, did]);
333
+ }, [tid, did, accessToken]);
289
334
  const displayName = () => {
290
335
  if (!dtd)
291
336
  return noneSelectionText;
@@ -295,31 +340,47 @@ const TMTidViewer = ({ tmSession, tid, did, showIcon = false, color, showId = fa
295
340
  whiteSpace: 'nowrap',
296
341
  overflow: 'hidden',
297
342
  textOverflow: 'ellipsis'
298
- }, children: [showIcon && dtd && _jsx(TMDcmtTypeIcon, { dtd: dtd }), _jsx("p", { title: displayName(), style: {
299
- textAlign: 'left',
300
- marginLeft: showIcon ? '5px' : '',
301
- color: color ?? (dtd?.isView ? 'red' : TMColors.primary),
302
- whiteSpace: 'nowrap',
303
- overflow: 'hidden',
304
- textOverflow: 'ellipsis',
305
- // paddingRight: '10px'
306
- }, children: displayName() }), showId && _jsx("p", { style: { padding: '0px 3px' }, children: `(TID: ${tid})` })] }));
343
+ }, children: [showIcon && dtd && _jsx(TMDcmtTypeIcon, { dtd: dtd }), isLoading && !dtd
344
+ ? _jsx(StyledTidSkeleton, { title: `${SDKUI_Localizator.Loading} ...`, style: { marginLeft: showIcon ? '5px' : undefined } })
345
+ : _jsx("p", { title: displayName(), style: {
346
+ textAlign: 'left',
347
+ margin: 0,
348
+ marginLeft: showIcon ? '5px' : '',
349
+ color: dtd?.isView ? 'red' : (color ?? TMColors.primary),
350
+ whiteSpace: 'nowrap',
351
+ overflow: 'hidden',
352
+ textOverflow: 'ellipsis',
353
+ // paddingRight: '10px'
354
+ }, children: displayName() }), showId && _jsx("p", { style: { padding: '0px 3px', margin: 0 }, children: `(TID: ${tid})` })] }));
307
355
  };
308
356
  export default TMTidViewer;
309
357
  export const cellRenderTID = (data, noneSelectionText) => {
310
358
  return (_jsx(TMTidViewer, { tid: data.value, noneSelectionText: noneSelectionText }));
311
359
  };
312
- /** Componente per mostrare il metodo di visualizzazione del nome documento (carica i metadati dalla cache se necessario) */
360
+ /** Metodi di visualizzazione già richiesti, per non ricaricare i metadati ad ogni riapertura del tooltip */
361
+ const displayNameMethodCache = new Map();
313
362
  const TMDisplayNameMethodItem = ({ dtd }) => {
314
- const [displayNameMethod, setDisplayNameMethod] = useState('...');
315
- useEffect(() => {
316
- const fetchDisplayNameMethod = async () => {
363
+ const [displayNameMethod, setDisplayNameMethod] = useState(() => dtd.id ? displayNameMethodCache.get(dtd.id) : undefined);
364
+ const [isLoading, setIsLoading] = useState(false);
365
+ const onShowClick = async (e) => {
366
+ /* Un click qualsiasi chiude il tooltip: senza questo il risultato non sarebbe mai visibile */
367
+ e.stopPropagation();
368
+ if (isLoading || displayNameMethod)
369
+ return;
370
+ setIsLoading(true);
371
+ try {
317
372
  const method = await getDTDDisplayNameInfo(dtd);
373
+ if (dtd.id)
374
+ displayNameMethodCache.set(dtd.id, method);
318
375
  setDisplayNameMethod(method);
319
- };
320
- fetchDisplayNameMethod();
321
- }, [dtd]);
322
- return _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.DisplayNameMethod}: ${displayNameMethod}` });
376
+ }
377
+ finally {
378
+ setIsLoading(false);
379
+ }
380
+ };
381
+ return (_jsxs(StyledTooltipItem, { children: [`${SDKUI_Localizator.DisplayNameMethod}: `, displayNameMethod ?? (isLoading
382
+ ? `${SDKUI_Localizator.Loading} ...`
383
+ : _jsx("span", { style: { color: TMColors.primary, cursor: 'pointer', textDecoration: 'underline' }, onClick: onShowClick, children: SDKUI_Localizator.Details }))] }));
323
384
  };
324
385
  export const renderDTDTooltipContent = (dtd) => {
325
386
  const mapAccessLevelToLocalizedString = (level) => {
@@ -341,13 +402,13 @@ export const renderDTDTooltipContent = (dtd) => {
341
402
  }
342
403
  };
343
404
  return (!dtd ? null
344
- : _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { children: `${SDK_Globals.useLocalizedName ? dtd.nameLoc : dtd.name} (${dtd.isView ? 'VID' : 'TID'}: ${dtd.id}, RootTID: ${dtd.rootTID ?? 0})` }), dtd.description && _jsx(StyledTooltipItem, { children: dtd.description }), _jsx(StyledTooltipSeparatorItem, {}), dtd.customData2 === "NOTGRANTED"
405
+ : _jsxs(StyledTooltipContainer, { children: [_jsx(StyledTooltipItem, { children: `${SDK_Globals.useLocalizedName ? dtd.nameLoc : dtd.name} (${dtd.isView ? 'VID' : 'TID'}: ${dtd.id}, RootTID: ${dtd.rootTID ?? 0})` }), dtd.description && _jsx(StyledTooltipItem, { children: dtd.description }), _jsx(StyledTooltipSeparatorItem, {}), isNotGrantedDTD(dtd)
345
406
  ? _jsx(StyledTooltipItem, { style: { fontWeight: 600 }, children: 'Tipo documento NON autorizzato' })
346
407
  :
347
408
  _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ArchiveConstraint}: ${LocalizeArchiveConstraints(dtd.archiveConstraint)}` }), dtd.isView && dtd.parametricFilterType != ParametricFilterTypes.None && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ParametricFilter}: ${LocalizeParametricFilterTypes(dtd.parametricFilterType)}` }), dtd.isView && dtd.withCheckOption && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ViewWithCheckOption}: ${SDKUI_Localizator.Yes}` }), dtd.isLexProt && dtd.isLexProt > 0 && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LexProt}: ${SDKUI_Localizator.Yes}` }), dtd.isFreeSearchable && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search_Free}: ${SDKUI_Localizator.Yes}` }), dtd.templateTID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Template}: ${dtd.templateTID}` }), dtd.traceTID && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Tracing}: ${SDKUI_Localizator.Yes} - ${dtd.templateTID == TemplateTIDs.Trace_DcmtType ? SDKUI_Localizator.Destination : SDKUI_Localizator.Source} ${dtd.traceTID < 0 ? SDKUI_Localizator.Disabled : ''}` }), dtd.wfAppr && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.WorkflowApproval}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.BlogCase}: ${dtd.hasBlog ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.CheckIn}: ${dtd.cico ? SDKUI_Localizator.Yes : SDKUI_Localizator.No}` }), dtd.perm ?
348
- _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { "$color": 'primary', "$marginTop": '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, {}), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Archive}: ${mapAccessLevelToLocalizedString(dtd.perm.canArchive)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.View_Metadato}: ${mapAccessLevelToLocalizedString(dtd.perm.canView)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search}: ${mapAccessLevelToLocalizedString(dtd.perm.canSearch)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Update}: ${mapAccessLevelToLocalizedString(dtd.perm.canUpdate)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.RetrieveFile}: ${mapAccessLevelToLocalizedString(dtd.perm.canRetrieveFile)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.AddOrSubstFile}: ${mapAccessLevelToLocalizedString(dtd.perm.canSubstFile)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LogDelete}: ${mapAccessLevelToLocalizedString(dtd.perm.canLogicalDelete)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.PhysDelete}: ${mapAccessLevelToLocalizedString(dtd.perm.canPhysicalDelete)}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Read}: ${mapAccessLevelToLocalizedString(dtd.perm.canReadBlog)}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Write}: ${mapAccessLevelToLocalizedString(dtd.perm.canWriteBlog)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.CheckIn}: ${mapAccessLevelToLocalizedString(dtd.perm.canCICO)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ChronologyDelete}: ${mapAccessLevelToLocalizedString(dtd.perm.canDelChron)}` })] })
409
+ _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { $color: 'primary', $marginTop: '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, {}), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Archive}: ${mapAccessLevelToLocalizedString(dtd.perm.canArchive)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.View_Metadato}: ${mapAccessLevelToLocalizedString(dtd.perm.canView)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search}: ${mapAccessLevelToLocalizedString(dtd.perm.canSearch)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Update}: ${mapAccessLevelToLocalizedString(dtd.perm.canUpdate)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.RetrieveFile}: ${mapAccessLevelToLocalizedString(dtd.perm.canRetrieveFile)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.AddOrSubstFile}: ${mapAccessLevelToLocalizedString(dtd.perm.canSubstFile)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LogDelete}: ${mapAccessLevelToLocalizedString(dtd.perm.canLogicalDelete)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.PhysDelete}: ${mapAccessLevelToLocalizedString(dtd.perm.canPhysicalDelete)}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Read}: ${mapAccessLevelToLocalizedString(dtd.perm.canReadBlog)}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Write}: ${mapAccessLevelToLocalizedString(dtd.perm.canWriteBlog)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.CheckIn}: ${mapAccessLevelToLocalizedString(dtd.perm.canCICO)}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ChronologyDelete}: ${mapAccessLevelToLocalizedString(dtd.perm.canDelChron)}` })] })
349
410
  : dtd.ownershipLevel == OwnershipLevels.DirectOwner || dtd.ownershipLevel == OwnershipLevels.IndirectOwner ?
350
- _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { "$color": 'primary', "$marginTop": '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, {}), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Archive}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.View_Metadato}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Update}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.RetrieveFile}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.AddOrSubstFile}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LogDelete}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.PhysDelete}: ${SDKUI_Localizator.Yes}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Read}: ${SDKUI_Localizator.Yes}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Write}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.CheckIn}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ChronologyDelete}: ${SDKUI_Localizator.Yes}` })] })
411
+ _jsxs(_Fragment, { children: [_jsx(StyledTooltipItem, { $color: 'primary', $marginTop: '5px', children: SDKUI_Localizator.Perms }), _jsx(StyledTooltipSeparatorItem, {}), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Archive}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.View_Metadato}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Search}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Update}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.RetrieveFile}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.AddOrSubstFile}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.LogDelete}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.PhysDelete}: ${SDKUI_Localizator.Yes}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Read}: ${SDKUI_Localizator.Yes}` }), dtd.hasBlog && _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.Blog_Write}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.CheckIn}: ${SDKUI_Localizator.Yes}` }), _jsx(StyledTooltipItem, { children: `${SDKUI_Localizator.ChronologyDelete}: ${SDKUI_Localizator.Yes}` })] })
351
412
  : _jsx(_Fragment, {}), (dtd.widgets && dtd.widgets.length > 0) ? (() => {
352
413
  const enabledWidgets = [
353
414
  isSign4TopEnabled(dtd.widgets) ? 'Sign4Top' : null,
@@ -141,7 +141,7 @@ const StepIndicator = ({ steps, currentStepIndex, stepValidityStatuses }) => {
141
141
  : 0;
142
142
  const errors = stepValidityStatuses[currentStepIndex].filter(v => v.ResultType === ResultTypes.ERROR);
143
143
  const isCurrentStepError = errors.length > 0;
144
- return (_jsxs(IndicatorContainer, { children: [_jsxs(StepBar, { children: [steps.length > 1 && (_jsxs(LineContainer, { "$numSteps": steps.length, children: [_jsx(BaseLine, {}), _jsx(ProgressLine, { "$widthPercentage": progressPercentage })] })), steps.map((step, index) => {
144
+ return (_jsxs(IndicatorContainer, { children: [_jsxs(StepBar, { children: [steps.length > 1 && (_jsxs(LineContainer, { $numSteps: steps.length, children: [_jsx(BaseLine, {}), _jsx(ProgressLine, { $widthPercentage: progressPercentage })] })), steps.map((step, index) => {
145
145
  const isCompleted = index < currentStepIndex;
146
146
  const isCurrent = index === currentStepIndex;
147
147
  // CORREZIONE: Controlla se l'array di ValidationItem per lo step contiene almeno un errore
@@ -159,7 +159,7 @@ const StepIndicator = ({ steps, currentStepIndex, stepValidityStatuses }) => {
159
159
  else {
160
160
  content = index + 1;
161
161
  }
162
- return (_jsx(StepItem, { children: _jsx(StepRhombusContainer, { "$isCompleted": isCompleted, "$isCurrent": isCurrent, "$isError": displayError, children: _jsx(StepContent, { "$isCompleted": isCompleted, "$isCurrent": isCurrent, "$isError": displayError, children: content }) }) }, index));
163
- })] }), _jsxs(StepTitle, { "$isError": isCurrentStepError, children: [steps[currentStepIndex]?.title, isCurrentStepError && (_jsx(IconWarning, { className: "error-icon" }))] })] }));
162
+ return (_jsx(StepItem, { children: _jsx(StepRhombusContainer, { $isCompleted: isCompleted, $isCurrent: isCurrent, $isError: displayError, children: _jsx(StepContent, { $isCompleted: isCompleted, $isCurrent: isCurrent, $isError: displayError, children: content }) }) }, index));
163
+ })] }), _jsxs(StepTitle, { $isError: isCurrentStepError, children: [steps[currentStepIndex]?.title, isCurrentStepError && (_jsx(IconWarning, { className: "error-icon" }))] })] }));
164
164
  };
165
165
  export default StepIndicator;