@topconsultnpm/sdkui-react 6.22.0-t2 → 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 (199) 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/FloatingMenuBar/TMFloatingMenuBar.js +6 -6
  4. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +15 -15
  5. package/lib/components/base/Styled.js +7 -5
  6. package/lib/components/base/TMAccordionNew.js +7 -7
  7. package/lib/components/base/TMAlert.d.ts +32 -32
  8. package/lib/components/base/TMAlert.js +6 -8
  9. package/lib/components/base/TMAreaManager.js +53 -55
  10. package/lib/components/base/TMButton.js +4 -4
  11. package/lib/components/base/TMClosableList.js +3 -3
  12. package/lib/components/base/TMCustomButton.js +40 -48
  13. package/lib/components/base/TMDataGrid.d.ts +2 -0
  14. package/lib/components/base/TMDataGrid.js +35 -7
  15. package/lib/components/base/TMDropDownMenu.js +1 -1
  16. package/lib/components/base/TMFileManagerDataGridView.js +1 -1
  17. package/lib/components/base/TMFileManagerThumbnailItems.js +2 -2
  18. package/lib/components/base/TMLayout.d.ts +2 -2
  19. package/lib/components/base/TMLayout.js +3 -3
  20. package/lib/components/base/TMList.js +1 -1
  21. package/lib/components/base/TMListView.js +3 -3
  22. package/lib/components/base/TMModal.js +1 -1
  23. package/lib/components/base/TMPanel.js +8 -8
  24. package/lib/components/base/TMPopUp.js +2 -2
  25. package/lib/components/base/TMResizableMenu.js +2 -2
  26. package/lib/components/base/TMRightSidebar.js +1 -1
  27. package/lib/components/base/TMShowAllOrMaxItemsButton.js +1 -1
  28. package/lib/components/base/TMSpinner.d.ts +2 -1
  29. package/lib/components/base/TMSpinner.js +9 -7
  30. package/lib/components/base/TMTab.js +2 -2
  31. package/lib/components/base/TMTabControl.d.ts +106 -0
  32. package/lib/components/base/TMTabControl.js +664 -0
  33. package/lib/components/base/TMToggleButton.js +2 -2
  34. package/lib/components/base/TMToolbarCard.js +3 -3
  35. package/lib/components/base/TMTreeView.js +35 -3
  36. package/lib/components/base/TMWaitPanel.js +3 -3
  37. package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
  38. package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
  39. package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +169 -0
  40. package/lib/components/base/waitPanel/TMWaitPanelManager.js +320 -0
  41. package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +53 -0
  42. package/lib/components/base/waitPanel/TMWaitPanelView.js +274 -0
  43. package/lib/components/base/waitPanel/index.d.ts +1 -0
  44. package/lib/components/base/waitPanel/index.js +1 -0
  45. package/lib/components/choosers/TMCultureIDPicker.js +2 -2
  46. package/lib/components/choosers/TMDataListItemChooser.js +1 -1
  47. package/lib/components/choosers/TMDataListItemPicker.js +2 -2
  48. package/lib/components/choosers/TMDcmtTypeChooser.js +1 -1
  49. package/lib/components/choosers/TMDiskChooser.js +1 -1
  50. package/lib/components/choosers/TMDistinctValues.js +28 -19
  51. package/lib/components/choosers/TMDynDataListItemChooser.js +1 -1
  52. package/lib/components/choosers/TMImageIDChooser.js +1 -1
  53. package/lib/components/choosers/TMMetadataChooser.js +2 -2
  54. package/lib/components/choosers/TMPathChooser.js +17 -34
  55. package/lib/components/choosers/TMQuickSearchInfo.js +4 -4
  56. package/lib/components/choosers/TMQuickSearchSettingsForm.js +1 -1
  57. package/lib/components/choosers/TMRelationChooser.js +1 -1
  58. package/lib/components/choosers/TMSelectedValuesSummary.js +1 -3
  59. package/lib/components/choosers/TMUserChooser.js +1 -1
  60. package/lib/components/editors/TMCheckBox.js +1 -1
  61. package/lib/components/editors/TMDropDown.js +7 -7
  62. package/lib/components/editors/TMEditorStyled.d.ts +1 -1
  63. package/lib/components/editors/TMFormulaEditor.js +1 -1
  64. package/lib/components/editors/TMHtmlContentDisplay.js +1 -1
  65. package/lib/components/editors/TMLocalizedTextBox.js +1 -1
  66. package/lib/components/editors/TMMetadataValues.js +6 -6
  67. package/lib/components/editors/TMRadioButton.js +2 -2
  68. package/lib/components/editors/TMSummary.js +3 -3
  69. package/lib/components/editors/TMTextArea.js +3 -3
  70. package/lib/components/editors/TMTextBox.js +3 -3
  71. package/lib/components/editors/TMTextExpression.js +1 -1
  72. package/lib/components/features/archive/TMArchive.js +7 -2
  73. package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +29 -0
  74. package/lib/components/features/assistant/TMHelpOnLineChat.js +1384 -0
  75. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +4 -4
  76. package/lib/components/features/assistant/TMToppySpeechBubble.js +1 -1
  77. package/lib/components/features/assistant/dataset/Designer-Suggested-Questions.json +102 -0
  78. package/lib/components/features/assistant/dataset/Login-Suggested-Questions.json +32 -0
  79. package/lib/components/features/assistant/dataset/Surfer-Suggested-Questions.json +102 -0
  80. package/lib/components/features/documents/TMBatchUpdateForm.js +4 -5
  81. package/lib/components/features/documents/TMCopyToFolderForm.js +50 -42
  82. package/lib/components/features/documents/TMDcmtForm.js +53 -64
  83. package/lib/components/features/documents/TMDcmtFormActionButtons.js +2 -2
  84. package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -3
  85. package/lib/components/features/documents/TMDcmtIcon.js +3 -5
  86. package/lib/components/features/documents/TMDcmtPreview.js +6 -4
  87. package/lib/components/features/documents/TMDcmtTasks.js +2 -9
  88. package/lib/components/features/documents/TMDownloadRelationViewerSection.js +1 -1
  89. package/lib/components/features/documents/TMFileUploader.js +7 -7
  90. package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
  91. package/lib/components/features/documents/TMMasterDetailDcmts.js +55 -130
  92. package/lib/components/features/documents/TMMasterInfoFields.js +4 -5
  93. package/lib/components/features/documents/TMMergeToPdfForm.js +56 -54
  94. package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +3 -6
  95. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +1 -1
  96. package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +4 -4
  97. package/lib/components/features/documents/TMRelationViewer.d.ts +16 -9
  98. package/lib/components/features/documents/TMRelationViewer.js +240 -168
  99. package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +1 -1
  100. package/lib/components/features/documents/relationTreeState.d.ts +32 -0
  101. package/lib/components/features/documents/relationTreeState.js +89 -0
  102. package/lib/components/features/search/TMMetadataOutputForm.js +1 -1
  103. package/lib/components/features/search/TMMetadataSorterForm.js +1 -1
  104. package/lib/components/features/search/TMSavedQuerySelector.js +2 -2
  105. package/lib/components/features/search/TMSearch.d.ts +1 -1
  106. package/lib/components/features/search/TMSearch.js +71 -12
  107. package/lib/components/features/search/TMSearchQueryEditor.js +2 -2
  108. package/lib/components/features/search/TMSearchQueryPanel.js +1 -5
  109. package/lib/components/features/search/TMSearchResult.d.ts +5 -0
  110. package/lib/components/features/search/TMSearchResult.js +34 -18
  111. package/lib/components/features/search/TMSignatureInfoContent.js +1 -1
  112. package/lib/components/features/search/TMTreeSelector.js +38 -36
  113. package/lib/components/features/search/TMViewHistoryDcmt.js +14 -25
  114. package/lib/components/features/tasks/TMTaskForm.js +1 -1
  115. package/lib/components/features/tasks/TMTaskFormUtils.js +3 -3
  116. package/lib/components/features/tasks/TMTasksAgenda.js +1 -1
  117. package/lib/components/features/tasks/TMTasksCalendar.js +1 -1
  118. package/lib/components/features/tasks/TMTasksHeader.js +1 -1
  119. package/lib/components/features/tasks/TMTasksUtilsView.js +1 -1
  120. package/lib/components/features/tasks/TMTasksView.js +97 -102
  121. package/lib/components/features/wg/TMWGsCopyMoveForm.js +92 -92
  122. package/lib/components/features/workflow/TMWorkflowPopup.js +2 -2
  123. package/lib/components/features/workflow/diagram/ConnectionComponent.js +3 -3
  124. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +3 -3
  125. package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
  126. package/lib/components/features/workflow/diagram/DiagramItemSvgContent.js +1 -1
  127. package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
  128. package/lib/components/features/workflow/diagram/WFDiagram.js +4 -4
  129. package/lib/components/forms/Login/Menu.js +1 -1
  130. package/lib/components/forms/Login/OTPReader.js +1 -1
  131. package/lib/components/forms/Login/PasswordStrengthChecker.js +1 -1
  132. package/lib/components/forms/Login/RapidAccessLogin.js +2 -2
  133. package/lib/components/forms/Login/RecoverPasswordFlow.js +2 -2
  134. package/lib/components/forms/Login/SelectBox.js +1 -1
  135. package/lib/components/forms/Login/StepIndicator.js +1 -1
  136. package/lib/components/forms/Login/TMLoginForm.js +7 -7
  137. package/lib/components/forms/Login/TextBox.js +1 -1
  138. package/lib/components/forms/TMApplyForm.js +3 -3
  139. package/lib/components/forms/TMChooserForm.js +1 -1
  140. package/lib/components/forms/TMResultDialog.js +1 -1
  141. package/lib/components/forms/TMSaveForm.js +3 -3
  142. package/lib/components/grids/TMBlogAttachments.js +1 -1
  143. package/lib/components/grids/TMBlogsPost.js +92 -96
  144. package/lib/components/grids/TMBlogsPostUtils.js +1 -1
  145. package/lib/components/grids/TMRecentsManager.js +4 -4
  146. package/lib/components/grids/TMValidationItemsList.js +1 -1
  147. package/lib/components/index.d.ts +6 -0
  148. package/lib/components/index.js +5 -0
  149. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +3 -3
  150. package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +1 -1
  151. package/lib/components/layout/panelManager/TMPanelWrapper.js +1 -1
  152. package/lib/components/pages/TMPage.js +30 -32
  153. package/lib/components/query/TMQueryCountButton.js +1 -1
  154. package/lib/components/query/TMQueryEditor.d.ts +3 -0
  155. package/lib/components/query/TMQueryEditor.js +9 -8
  156. package/lib/components/sidebar/TMCommandsPanel.js +1 -1
  157. package/lib/components/sidebar/TMHeader.d.ts +1 -0
  158. package/lib/components/sidebar/TMHeader.js +9 -9
  159. package/lib/components/sidebar/TMSidebar.js +1 -1
  160. package/lib/components/sidebar/TMSidebarItem.js +1 -1
  161. package/lib/components/viewers/TMMidViewer.js +2 -2
  162. package/lib/components/viewers/TMTidViewer.js +3 -3
  163. package/lib/components/wizard/TMStepIndicator.js +3 -3
  164. package/lib/helper/Enum_Localizator.d.ts +4 -4
  165. package/lib/helper/Enum_Localizator.js +1 -0
  166. package/lib/helper/Globalization.d.ts +1 -1
  167. package/lib/helper/SDKUI_Localizator.d.ts +736 -712
  168. package/lib/helper/SDKUI_Localizator.js +240 -0
  169. package/lib/helper/TMAppUpdatedModal.js +2 -2
  170. package/lib/helper/TMIcons.js +1 -3
  171. package/lib/helper/TMPdfViewer.js +1 -1
  172. package/lib/helper/TMToppyMessage.js +1 -1
  173. package/lib/helper/TMUtils.js +1 -1
  174. package/lib/helper/ZipManager.d.ts +1 -1
  175. package/lib/helper/ZipManager.js +2 -1
  176. package/lib/helper/checkinCheckoutManager.d.ts +1 -1
  177. package/lib/helper/checkinCheckoutManager.js +1 -1
  178. package/lib/helper/dcmtsHelper.d.ts +4 -2
  179. package/lib/helper/dcmtsHelper.js +3 -1
  180. package/lib/helper/helpers.d.ts +1 -1
  181. package/lib/helper/helpers.js +2 -2
  182. package/lib/hooks/tmDistinctValuesGridHelper.d.ts +1 -1
  183. package/lib/hooks/useCaseFlowApprove.d.ts +3 -3
  184. package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
  185. package/lib/hooks/useCheckInOutOperations.js +14 -34
  186. package/lib/hooks/useDcmtOperations.d.ts +3 -12
  187. package/lib/hooks/useDcmtOperations.js +187 -179
  188. package/lib/hooks/useDocumentOperations.d.ts +1 -0
  189. package/lib/hooks/useDocumentOperations.js +16 -27
  190. package/lib/hooks/useInputDialog.js +1 -1
  191. package/lib/hooks/useMultiMasterDetailDcmts.d.ts +1 -16
  192. package/lib/hooks/useMultiMasterDetailDcmts.js +65 -67
  193. package/lib/hooks/usePreventFileDrop.js +9 -0
  194. package/lib/hooks/useQueryParametersDialog.js +1 -1
  195. package/lib/hooks/useWorkflowApprove.js +33 -17
  196. package/lib/services/caseflow/CaseFlowService.d.ts +47 -6
  197. package/lib/services/caseflow/CaseFlowService.js +82 -14
  198. package/lib/services/platform_services.d.ts +4 -4
  199. package/package.json +9 -10
@@ -265,7 +265,7 @@ const TMListView = ({ customGroupingHeaders, headerBackGroundColor, header, show
265
265
  }
266
266
  // map memo
267
267
  const memoList = useMemo(() => currentDataSource.map((data, index) => {
268
- return (_jsx(StyledListItem, { "$isSelected": isSelected(data), "$color": getContrastColor(customColor).bgColor, "$textColor": getContrastColor(customColor).textColor, onClick: () => { onSelectionChanged && onSelectionChanged(data); onItemClick && onItemClick(data); }, onDoubleClick: () => onItemDblClick && onItemDblClick(data), children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start', justifyContent: 'flex-start', gap: 5, padding: '5px 5px' }, children: [localShowId && _jsxs("p", { style: { color: isSelected(data) ? 'red' : 'black', backgroundColor: `${customColor}20`, width: '100%', padding: '2px 5px', borderRadius: '5px', height: 'max-content', textAlign: 'left' }, children: [" ", exprKey + ' : ' + data[exprKey], " "] }), _jsxs("div", { style: { width: '100%', height: '100%' }, children: [" ", itemTemplate ? itemTemplate(data) : _jsx("div", {})] })] }) }, index));
268
+ return (_jsx(StyledListItem, { $isSelected: isSelected(data), $color: getContrastColor(customColor).bgColor, $textColor: getContrastColor(customColor).textColor, onClick: () => { onSelectionChanged && onSelectionChanged(data); onItemClick && onItemClick(data); }, onDoubleClick: () => onItemDblClick && onItemDblClick(data), children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start', justifyContent: 'flex-start', gap: 5, padding: '5px 5px' }, children: [localShowId && _jsxs("p", { style: { color: isSelected(data) ? 'red' : 'black', backgroundColor: `${customColor}20`, width: '100%', padding: '2px 5px', borderRadius: '5px', height: 'max-content', textAlign: 'left' }, children: [" ", exprKey + ' : ' + data[exprKey], " "] }), _jsxs("div", { style: { width: '100%', height: '100%' }, children: [" ", itemTemplate ? itemTemplate(data) : _jsx("div", {})] })] }) }, index));
269
269
  }), [currentDataSource, selectedItem, localShowId, customColor]);
270
270
  const groupedMemoList = useMemo(() => groupKeys.map((key, index) => {
271
271
  const groupingText = () => {
@@ -292,7 +292,7 @@ const TMListView = ({ customGroupingHeaders, headerBackGroundColor, header, show
292
292
  :
293
293
  _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 10 }, children: [_jsx("p", { children: groupingText() }), _jsx("div", { style: { width: '16px', height: '16px', display: 'flex', alignItems: 'center', justifyContent: 'center', backgroundColor: getContrastColor(customColor).textColor, color: getContrastColor(customColor).bgColor, boxShadow: '1px 1px 2px #00000020', borderRadius: '30px', fontWeight: 'bold' }, children: groupByKey(currentDataSource, grouping)[key].length })] })
294
294
  :
295
- _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 10 }, children: [_jsx("p", { children: groupingText() }), _jsx("div", { style: { width: '16px', height: '16px', display: 'flex', alignItems: 'center', justifyContent: 'center', backgroundColor: getContrastColor(customColor).textColor, color: getContrastColor(customColor).bgColor, boxShadow: '1px 1px 2px #00000020', borderRadius: '30px', fontWeight: 'bold' }, children: groupByKey(currentDataSource, grouping)[key].length })] }), _jsxs("div", { style: { cursor: 'pointer' }, onClick: () => { let arr = [...openList]; arr[index] = !arr[index]; setOpenList(arr); }, children: [" ", openList[index] ? _jsx(IconUp, { fontSize: 12 }) : _jsx(IconDown, { fontSize: 12 }), " "] })] }) }), openList[index] && _jsx("div", { style: { width: '100%', height: '100%' }, children: groupByKey(currentDataSource, grouping)[key].map((data, index2) => (_jsx(StyledListItem, { "$isSelected": data === selectedItem, "$color": getContrastColor(customColor).bgColor, "$textColor": getContrastColor(customColor).textColor, onClick: () => { onSelectionChanged && onSelectionChanged(data); onItemClick && onItemClick(data); }, onDoubleClick: () => { onItemDblClick && onItemDblClick(data); }, children: _jsxs("div", { style: { width: '100%', height: 'max-content', display: 'flex', flexDirection: 'column', padding: '5px 5px' }, children: [localShowId && _jsxs("p", { style: { color: data === selectedItem ? 'red' : 'black', backgroundColor: `${customColor}20`, width: '100%', padding: '2px 5px', borderRadius: '5px', height: 'max-content', textAlign: 'left' }, children: [" ", 'ID: ' + data.id, " "] }), _jsxs("div", { style: { width: '100%', height: '100%' }, children: [" ", itemTemplate ? itemTemplate(data) : _jsx("div", {})] })] }) }, index2))) })] }, index));
295
+ _jsxs("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 10 }, children: [_jsx("p", { children: groupingText() }), _jsx("div", { style: { width: '16px', height: '16px', display: 'flex', alignItems: 'center', justifyContent: 'center', backgroundColor: getContrastColor(customColor).textColor, color: getContrastColor(customColor).bgColor, boxShadow: '1px 1px 2px #00000020', borderRadius: '30px', fontWeight: 'bold' }, children: groupByKey(currentDataSource, grouping)[key].length })] }), _jsxs("div", { style: { cursor: 'pointer' }, onClick: () => { let arr = [...openList]; arr[index] = !arr[index]; setOpenList(arr); }, children: [" ", openList[index] ? _jsx(IconUp, { fontSize: 12 }) : _jsx(IconDown, { fontSize: 12 }), " "] })] }) }), openList[index] && _jsx("div", { style: { width: '100%', height: '100%' }, children: groupByKey(currentDataSource, grouping)[key].map((data, index2) => (_jsx(StyledListItem, { $isSelected: data === selectedItem, $color: getContrastColor(customColor).bgColor, $textColor: getContrastColor(customColor).textColor, onClick: () => { onSelectionChanged && onSelectionChanged(data); onItemClick && onItemClick(data); }, onDoubleClick: () => { onItemDblClick && onItemDblClick(data); }, children: _jsxs("div", { style: { width: '100%', height: 'max-content', display: 'flex', flexDirection: 'column', padding: '5px 5px' }, children: [localShowId && _jsxs("p", { style: { color: data === selectedItem ? 'red' : 'black', backgroundColor: `${customColor}20`, width: '100%', padding: '2px 5px', borderRadius: '5px', height: 'max-content', textAlign: 'left' }, children: [" ", 'ID: ' + data.id, " "] }), _jsxs("div", { style: { width: '100%', height: '100%' }, children: [" ", itemTemplate ? itemTemplate(data) : _jsx("div", {})] })] }) }, index2))) })] }, index));
296
296
  }), [currentDataSource, selectedItem, localShowId, customColor, openList, grouping, customGroupingHeaders]);
297
297
  // List height
298
298
  const listHeight = () => {
@@ -376,7 +376,7 @@ const TMListView = ({ customGroupingHeaders, headerBackGroundColor, header, show
376
376
  grouping.length === 0 ? memoList : groupedMemoList :
377
377
  searchValue.length > 0 ? _jsx("div", { style: { width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: "No data found" }) :
378
378
  _jsx("div", { style: { width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: "No data" }) }), (searchValue.length > 0 || showOrderMenu) &&
379
- _jsxs(StyledListViewFooter, { "$bgColor": `${customColor}20`, children: [showOrderMenu &&
379
+ _jsxs(StyledListViewFooter, { $bgColor: `${customColor}20`, children: [showOrderMenu &&
380
380
  _jsxs("div", { style: { width: 'max-content', display: 'flex', alignItems: 'center', gap: 5 }, children: [_jsx("div", { style: { width: 'max-content' }, children: "Ordinato per" }), _jsx("div", { ref: orderRef, onClick: () => { setShowOrderOptions(!showOrderOptions); setOrderMenuVisible(!orderMenuVisible); }, style: { cursor: 'pointer', fontWeight: 'bold' }, children: orderedBy.length > 0 ? orderedBy : 'Nulla' }), orderedBy.length > 0 && _jsxs(TMTooltip, { content: orderDir ? 'ASC' : 'DESC', children: [" ", orderDir ? _jsx(IconUp, { style: { cursor: 'pointer' }, onClick: () => setOrderDir(false), fontSize: 14 }) : _jsx(IconDown, { style: { cursor: 'pointer' }, onClick: () => setOrderDir(true), fontSize: 14 }), " "] }), _jsx(TMTooltip, { content: 'Annulla ordinamento', children: _jsx(IconCloseCircle, { style: { cursor: 'pointer' }, color: 'red', fontSize: 14, onClick: () => { setOrderedBy(''); setShowOrderMenu(false); setShowOrderOptions(false); } }) })] }), searchValue.length > 0 && _jsxs("div", { style: { display: 'flex', alignItems: 'center', width: '100%', justifyContent: 'flex-end', gap: 5 }, children: [_jsx(TMTooltip, { content: 'Visibili', children: _jsx(IconVisible, { fontSize: 14 }) }), currentDataSource.length] })] })] }));
381
381
  };
382
382
  export default TMListView;
@@ -144,6 +144,6 @@ const TMModal = ({ resizable = true, expandable = false, isModal = true, title =
144
144
  return (_jsx(_Fragment, { children: isModal ? (_jsxs(Popup, { ref: popupRef, showCloseButton: showHeader ? showCloseButton : false, showTitle: showHeader, animation: undefined, minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', dragEnabled: !isResizing && !isFullScreen, resizeEnabled: resizable && !isFullScreen, position: expandable && isFullScreen ? { my: 'center', at: 'center', of: window } : position, width: expandable && isFullScreen ? '95%' : initialWidth, height: expandable && isFullScreen ? '95%' : initialHeight, title: title, visible: showPopup, onShown: handleShown, onResizeStart: handleResizeStart, onResizeEnd: handleResizeEnd, onHiding: onHiding, children: [showHeader && titleActions && (_jsx(ToolbarItem, { toolbar: 'top', location: 'after', render: () => _jsx(_Fragment, { children: titleActions }) })), showHeader && expandable && (_jsx(ToolbarItem, { toolbar: 'top', location: 'after', widget: 'dxButton', options: {
145
145
  icon: isFullScreen ? svgToString(_jsx(IconWindowMinimize, {})) : svgToString(_jsx(IconWindowMaximize, {})),
146
146
  onClick: () => setIsFullScreen(!isFullScreen)
147
- } })), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', width: '100%' }, children: [toolbar && (_jsx(StyledModalToolbar, { children: toolbar })), _jsx("div", { style: { flex: 1, overflow: 'hidden', minHeight: 0 }, children: _jsx(TMCard, { showBorder: false, padding: false, scrollY: true, children: children }) })] })] })) : (_jsxs(StyledModal, { "$isModal": isModal, className: "temp-modal", "$fontSize": fontSize, "$width": initialWidth, "$height": initialHeight, children: [toolbar ? _jsx(StyledModalToolbar, { children: toolbar }) : _jsx(_Fragment, {}), _jsx(StyledModalContext, { children: children })] })) }));
147
+ } })), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', height: '100%', width: '100%' }, children: [toolbar && (_jsx(StyledModalToolbar, { children: toolbar })), _jsx("div", { style: { flex: 1, overflow: 'hidden', minHeight: 0 }, children: _jsx(TMCard, { showBorder: false, padding: false, scrollY: true, children: children }) })] })] })) : (_jsxs(StyledModal, { $isModal: isModal, className: "temp-modal", $fontSize: fontSize, $width: initialWidth, $height: initialHeight, children: [toolbar ? _jsx(StyledModalToolbar, { children: toolbar }) : _jsx(_Fragment, {}), _jsx(StyledModalContext, { children: children })] })) }));
148
148
  };
149
149
  export default TMModal;
@@ -3,7 +3,7 @@ import { useCallback, useRef, useState, forwardRef, useImperativeHandle } from '
3
3
  import styled, { css, keyframes } from 'styled-components';
4
4
  import { getAppModuleGradient, IconArrowLeft, IconClearButton, IconRefresh, IconWindowMaximize, IconWindowMinimize, isPositiveNumber, SDKUI_Localizator } from '../../helper';
5
5
  import TMButton from './TMButton';
6
- import { LoadIndicator } from 'devextreme-react/load-indicator';
6
+ import { SpinnerGraphic } from './TMSpinner';
7
7
  import { TMExceptionBoxManager } from './TMPopUp';
8
8
  import { Gutters, TMColors } from '../../utils/theme';
9
9
  const StyledBackButton = styled.button `
@@ -292,15 +292,15 @@ onRefresh, isRefreshing, onActivate, onBack, backCaption = SDKUI_Localizator.Bac
292
292
  return newValue;
293
293
  });
294
294
  };
295
- return (_jsxs(StyledPanelContainer, { ref: panelRef, "$isMaximized": onMaximize ? false : isMaximized, style: {
295
+ return (_jsxs(StyledPanelContainer, { ref: panelRef, $isMaximized: onMaximize ? false : isMaximized, style: {
296
296
  visibility: isVisible ? 'visible' : 'hidden',
297
297
  }, tabIndex: -1, onFocus: !isControlled ? handleFocusUncontrolled : undefined, onBlur: !isControlled ? handleBlurUncontrolled : undefined, onClick: handleActivation, onContextMenu: (e) => e.preventDefault(), children: [showHeader &&
298
- _jsx(StyledPanelHeader, { "$backgroundColor": backgroundColor, "$color": color, "$isActive": currentIsActive, onDoubleClick: () => {
298
+ _jsx(StyledPanelHeader, { $backgroundColor: backgroundColor, $color: color, $isActive: currentIsActive, onDoubleClick: () => {
299
299
  if (onHeaderDoubleClick)
300
300
  onHeaderDoubleClick();
301
301
  else
302
302
  allowMaximize && handleMaximize();
303
- }, "$activeGradient": getAppModuleGradient(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER), children: _jsxs("div", { style: {
303
+ }, $activeGradient: getAppModuleGradient(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER), children: _jsxs("div", { style: {
304
304
  display: 'flex',
305
305
  flexDirection: 'row',
306
306
  alignItems: 'center',
@@ -313,7 +313,7 @@ onRefresh, isRefreshing, onActivate, onBack, backCaption = SDKUI_Localizator.Bac
313
313
  flexDirection: 'row',
314
314
  alignItems: 'center',
315
315
  flexShrink: 0
316
- }, children: _jsxs(StyledBackButton, { "$isActive": currentIsActive, onClick: () => onBack ? onBack() : null, title: backCaption, children: [_jsx(IconArrowLeft, {}), !isMobile && _jsx("span", { children: backCaption })] }) }), _jsx(StyledPanelTitleViewport, { children: _jsx(StyledPanelTitleTrack, { "$marquee": enableTitleMarquee, children: _jsxs(StyledPanelTitle, { "$marquee": enableTitleMarquee, children: [title, isPositiveNumber(displayedItemsCount) && isPositiveNumber(totalItems)
316
+ }, children: _jsxs(StyledBackButton, { $isActive: currentIsActive, onClick: () => onBack ? onBack() : null, title: backCaption, children: [_jsx(IconArrowLeft, {}), !isMobile && _jsx("span", { children: backCaption })] }) }), _jsx(StyledPanelTitleViewport, { children: _jsx(StyledPanelTitleTrack, { $marquee: enableTitleMarquee, children: _jsxs(StyledPanelTitle, { $marquee: enableTitleMarquee, children: [title, isPositiveNumber(displayedItemsCount) && isPositiveNumber(totalItems)
317
317
  ? ` (${displayedItemsCount} / ${totalItems})`
318
318
  : isPositiveNumber(totalItems)
319
319
  ? ` (${totalItems})`
@@ -323,9 +323,9 @@ onRefresh, isRefreshing, onActivate, onBack, backCaption = SDKUI_Localizator.Bac
323
323
  alignItems: 'center',
324
324
  gap: '5px',
325
325
  flexShrink: 0
326
- }, children: [toolbar, onRefresh && _jsx(TMButton, { color: 'primaryOutline', caption: SDKUI_Localizator.Refresh, disabled: isBusy, icon: _jsx(StyledRefreshIcon, { "$isSpinning": isBusy, children: _jsx(IconRefresh, {}) }), btnStyle: 'icon', onClick: handleRefresh }), allowMaximize && _jsx(TMButton, { color: 'primaryOutline', caption: isMaximized ? SDKUI_Localizator.Minimize : SDKUI_Localizator.Maximize, icon: isMaximized
326
+ }, children: [toolbar, onRefresh && _jsx(TMButton, { color: 'primaryOutline', caption: SDKUI_Localizator.Refresh, disabled: isBusy, icon: _jsx(StyledRefreshIcon, { $isSpinning: isBusy, children: _jsx(IconRefresh, {}) }), btnStyle: 'icon', onClick: handleRefresh }), allowMaximize && _jsx(TMButton, { color: 'primaryOutline', caption: isMaximized ? SDKUI_Localizator.Minimize : SDKUI_Localizator.Maximize, icon: isMaximized
327
327
  ? _jsx(IconWindowMinimize, { fontSize: 16 })
328
- : _jsx(IconWindowMaximize, { fontSize: 16 }), btnStyle: 'icon', onClick: handleMaximize }), onClose && _jsx(TMButton, { color: 'primaryOutline', caption: SDKUI_Localizator.Close, icon: _jsx(IconClearButton, {}), btnStyle: 'icon', onClick: () => { setIsMaximized(false); onClose?.(); } })] })] }) }), _jsxs(StyledPanelContent, { "$height": showHeader ? "calc(100% - 40px)" : "100%", "$padding": padding, "$backgroundColor": backgroundColorContainer ?? `#FFFFFF`, children: [children, isBusy &&
329
- _jsxs(StyledPanelLoaderOverlay, { children: [_jsx(LoadIndicator, { height: 40, width: 40 }), _jsx("div", { children: SDKUI_Localizator.Loading })] })] })] }));
328
+ : _jsx(IconWindowMaximize, { fontSize: 16 }), btnStyle: 'icon', onClick: handleMaximize }), onClose && _jsx(TMButton, { color: 'primaryOutline', caption: SDKUI_Localizator.Close, icon: _jsx(IconClearButton, {}), btnStyle: 'icon', onClick: () => { setIsMaximized(false); onClose?.(); } })] })] }) }), _jsxs(StyledPanelContent, { $height: showHeader ? "calc(100% - 40px)" : "100%", $padding: padding, $backgroundColor: backgroundColorContainer ?? `#FFFFFF`, children: [children, isBusy &&
329
+ _jsxs(StyledPanelLoaderOverlay, { children: [_jsx(SpinnerGraphic, {}), _jsx("div", { children: SDKUI_Localizator.Loading })] })] })] }));
330
330
  });
331
331
  export default TMPanel;
@@ -212,7 +212,7 @@ const ResponsiveButton = (props) => {
212
212
  return _jsx(TMButton, { fontSize: customFontSize || 'clamp(12px, 2vw, 1.1rem)', padding: "clamp(2px, 1vw, 8px) clamp(4px, 2vw, 12px)", width: "clamp(30px, 10vw, 60px)", ...otherProps });
213
213
  };
214
214
  const ResponsiveMessageBody = ({ message, isMobile, MessageToolbar, showToppy }) => {
215
- return (_jsxs(ResponsiveMessageContainer, { children: [_jsxs(ResponsiveMessageContent, { "$isMobile": isMobile, children: [showToppy && _jsx(ResponsiveToppyImage, { "$isMobile": isMobile, src: toppy, alt: "Toppy" }), _jsx(ResponsiveMessageText, { "$isMobile": isMobile, children: typeof message === 'string' ? _jsx(Message, { msg: message }) : message })] }), _jsx(MessageToolbar, {})] }));
215
+ return (_jsxs(ResponsiveMessageContainer, { children: [_jsxs(ResponsiveMessageContent, { $isMobile: isMobile, children: [showToppy && _jsx(ResponsiveToppyImage, { $isMobile: isMobile, src: toppy, alt: "Toppy" }), _jsx(ResponsiveMessageText, { $isMobile: isMobile, children: typeof message === 'string' ? _jsx(Message, { msg: message }) : message })] }), _jsx(MessageToolbar, {})] }));
216
216
  };
217
217
  const TMMessageBox = ({ resizable = false, onButtonClick, title = 'TopMedia', message = '', buttons, onClose, confirmOnEnter = false, showToppy = true, initialWidth = 'clamp(100px, 90vw, 400px)', initialHeight = 'auto' }) => {
218
218
  let deviceType = useDeviceType();
@@ -374,7 +374,7 @@ const TMExceptionBox = ({ resizable = false, exception, title = `${SDK_Globals.a
374
374
  const ExceptionToolbar = () => {
375
375
  return (_jsxs(StyledExeptionToolbar, { children: [_jsx(TMButton, { color: 'primaryOutline', btnStyle: 'text', onClick: () => copyToClipBoard(getFullMessage()), caption: SDKUI_Localizator.CopyToClipboard, showTooltip: false }), _jsx(TMButton, { btnStyle: 'text', onClick: () => { onClose?.(); setIsVisible(false); }, caption: SDKUI_Localizator.Close, showTooltip: false, color: 'error' })] }));
376
376
  };
377
- return (_jsx(Popup, { ref: popupRef, resizeEnabled: resizable, visible: isVisible, onHidden: () => { onClose?.(); setIsVisible(false); }, onShown: handleShown, showCloseButton: true, width: calcResponsiveSizes(deviceType, '600px', '400px', '350px'), height: '350px', minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', title: title, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { height: 'calc(100% - 50px)', children: _jsxs(TMTabGroup, { validationItems: [], children: [_jsxs(TMTab, { label: SDKUI_Localizator.Error, children: [_jsxs(TabContextContainer, { style: { height: 'calc(100% - 68px )', paddingRight: '40px' }, children: [_jsxs("p", { children: [" ", _jsx("span", { style: { color: TMColors.primary }, children: "Messaggio: " }), " ", message] }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-start', gap: '5px', marginTop: '5px' }, children: _jsxs("div", { children: [_jsxs("span", { style: { color: TMColors.primary }, children: [SDKUI_Localizator.Date, " ", SDKUI_Localizator.Time.toLowerCase(), ": "] }), d.toString()] }) })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`Date: ${dateString}\nTime: ${timeString}\nMessage: ${message}`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.CompleteError, children: [_jsx(TabContextContainer, { style: { paddingRight: '40px' }, children: JSON.stringify(safeException).replaceAll('{', '').replaceAll('}', '').split(`,"`).map((t, index) => (_jsxs("div", { style: { padding: '5px', borderBottom: '1px solid rgb(180,180,180)' }, children: ["\u261B", ' ' + (t.toLowerCase().includes('detail') ? (t.replaceAll(`"`, '').replaceAll(`:`, ': ').replaceAll(String.fromCharCode(92), '')) : (t.replaceAll(`"`, '').replaceAll(`:`, ': ')))] }, index))) }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(JSON.stringify(safeException).replaceAll('{', '').replaceAll('}', '').replaceAll(',', '\n')), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.Details, children: [_jsxs(TabContextContainer, { children: [_jsxs(StyledAppVersionText, { "$color": TMColors.primary, children: [SDK_Globals.appModule, " ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.appVersion })] }), _jsxs(StyledAppVersionText, { "$color": TMColors.tertiary, children: ["SDKUI: ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkuiVersion })] }), _jsxs(StyledAppVersionText, { "$color": TMColors.success, children: ["SDK : ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkVersion })] })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`-${SDK_Globals.appModule}: ${SDK_Globals.appVersion}\n` + `-SDKUI: ${SDK_Globals.sdkuiVersion}\n` + `-SDK: ${SDK_Globals.sdkVersion}\n`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] })] }) }), _jsx(TMLayoutItem, { height: '40px', children: _jsx(ExceptionToolbar, {}) })] }) }));
377
+ return (_jsx(Popup, { ref: popupRef, resizeEnabled: resizable, visible: isVisible, onHidden: () => { onClose?.(); setIsVisible(false); }, onShown: handleShown, showCloseButton: true, width: calcResponsiveSizes(deviceType, '600px', '400px', '350px'), height: '350px', minWidth: minWidth, minHeight: minHeight, maxHeight: '95%', maxWidth: '95%', title: title, children: _jsxs(TMLayoutContainer, { children: [_jsx(TMLayoutItem, { height: 'calc(100% - 50px)', children: _jsxs(TMTabGroup, { validationItems: [], children: [_jsxs(TMTab, { label: SDKUI_Localizator.Error, children: [_jsxs(TabContextContainer, { style: { height: 'calc(100% - 68px )', paddingRight: '40px' }, children: [_jsxs("p", { children: [" ", _jsx("span", { style: { color: TMColors.primary }, children: "Messaggio: " }), " ", message] }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-start', gap: '5px', marginTop: '5px' }, children: _jsxs("div", { children: [_jsxs("span", { style: { color: TMColors.primary }, children: [SDKUI_Localizator.Date, " ", SDKUI_Localizator.Time.toLowerCase(), ": "] }), d.toString()] }) })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`Date: ${dateString}\nTime: ${timeString}\nMessage: ${message}`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.CompleteError, children: [_jsx(TabContextContainer, { style: { paddingRight: '40px' }, children: JSON.stringify(safeException).replaceAll('{', '').replaceAll('}', '').split(`,"`).map((t, index) => (_jsxs("div", { style: { padding: '5px', borderBottom: '1px solid rgb(180,180,180)' }, children: ["\u261B", ' ' + (t.toLowerCase().includes('detail') ? (t.replaceAll(`"`, '').replaceAll(`:`, ': ').replaceAll(String.fromCharCode(92), '')) : (t.replaceAll(`"`, '').replaceAll(`:`, ': ')))] }, index))) }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(JSON.stringify(safeException).replaceAll('{', '').replaceAll('}', '').replaceAll(',', '\n')), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] }), _jsxs(TMTab, { label: SDKUI_Localizator.Details, children: [_jsxs(TabContextContainer, { children: [_jsxs(StyledAppVersionText, { $color: TMColors.primary, children: [SDK_Globals.appModule, " ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.appVersion })] }), _jsxs(StyledAppVersionText, { $color: TMColors.tertiary, children: ["SDKUI: ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkuiVersion })] }), _jsxs(StyledAppVersionText, { $color: TMColors.success, children: ["SDK : ", _jsx("span", { style: { fontWeight: 'bold' }, children: SDK_Globals.sdkVersion })] })] }), _jsxs(StyledCopyInclipBoardButtonContainer, { children: [" ", _jsx(TMButton, { color: 'primaryOutline', onClick: () => copyToClipBoard(`-${SDK_Globals.appModule}: ${SDK_Globals.appVersion}\n` + `-SDKUI: ${SDK_Globals.sdkuiVersion}\n` + `-SDK: ${SDK_Globals.sdkVersion}\n`), btnStyle: 'toolbar', icon: _jsx(IconCopy, { fontSize: 18 }), caption: SDKUI_Localizator.CopyToClipboard }), " "] })] })] }) }), _jsx(TMLayoutItem, { height: '40px', children: _jsx(ExceptionToolbar, {}) })] }) }));
378
378
  };
379
379
  class TMExceptionBoxManager {
380
380
  static show({ title, exception, onClose }) {
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useRef, useEffect, useImperativeHandle, forwardRef } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { createPortal } from 'react-dom';
@@ -55,7 +55,7 @@ export const TMResizableMenu = forwardRef(({ isVisible, onClose, top, left, bott
55
55
  document.removeEventListener('mousedown', handleClickOutside);
56
56
  };
57
57
  }, [onClose]);
58
- const menuContent = (_jsxs(_Fragment, { children: [_jsxs(MenuContainer, { ref: menuRef, "$display": isVisible ? 'block' : 'none', style: { top, left, bottom, right, width, height, position: 'fixed' }, "$maxWidth": maxWidth, "$maxHeight": maxHeight, "$minHeight": minHeight, "$minWidth": minWidth, "$padding": padding, children: [children, resizable && _jsx(ResizeHandle, { onMouseDown: (e) => {
58
+ const menuContent = (_jsxs(_Fragment, { children: [_jsxs(MenuContainer, { ref: menuRef, $display: isVisible ? 'block' : 'none', style: { top, left, bottom, right, width, height, position: 'fixed' }, $maxWidth: maxWidth, $maxHeight: maxHeight, $minHeight: minHeight, $minWidth: minWidth, $padding: padding, children: [children, resizable && _jsx(ResizeHandle, { onMouseDown: (e) => {
59
59
  e.preventDefault();
60
60
  document.body.style.pointerEvents = 'none';
61
61
  isResizingRef.current = true;
@@ -32,7 +32,7 @@ const TMRightSidebar = ({ items = [], onItemClick, selectedItem, showPanel = fal
32
32
  onItemClick && onItemClick(item.id, activeItems.has(item.id));
33
33
  }
34
34
  };
35
- return (_jsx(SidebarContainer, { children: items.map((item, index) => (item.visible !== false && (_jsxs(StyledMenuItem, { "$disabled": item.disabled, style: { paddingTop: '10px', borderTop: item.beginGroup ? '2px solid #9c9c9c' : 'none' }, "$isHovered": hoveredItem === item.id, "$isSelected": item.isActive, onMouseEnter: () => setHoveredItem(item.id), onMouseLeave: () => setHoveredItem(null), onClick: () => !item.disabled && (item.onClick?.() ?? onClickHandler(item)), children: [_jsx(StyledAnimatedComponentScaleColor, { "$delay": `${(index * 150) + 650}ms`, children: item.icon }), _jsx("span", { children: item.visibleName })] }, item.id)))) }));
35
+ return (_jsx(SidebarContainer, { children: items.map((item, index) => (item.visible !== false && (_jsxs(StyledMenuItem, { $disabled: item.disabled, style: { paddingTop: '10px', borderTop: item.beginGroup ? '2px solid #9c9c9c' : 'none' }, $isHovered: hoveredItem === item.id, $isSelected: item.isActive, onMouseEnter: () => setHoveredItem(item.id), onMouseLeave: () => setHoveredItem(null), onClick: () => !item.disabled && (item.onClick?.() ?? onClickHandler(item)), children: [_jsx(StyledAnimatedComponentScaleColor, { $delay: `${(index * 150) + 650}ms`, children: item.icon }), _jsx("span", { children: item.visibleName })] }, item.id)))) }));
36
36
  };
37
37
  export default TMRightSidebar;
38
38
  // Styled Components
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { getListMaxItems, SDKUI_Localizator } from '../../helper';
3
3
  import { TMColors } from '../../utils/theme';
4
4
  import TMButton from './TMButton';
@@ -8,10 +8,11 @@ interface ITMSpinner {
8
8
  onCancel?: () => void;
9
9
  cancelText?: string;
10
10
  }
11
+ declare const SpinnerGraphic: () => React.JSX.Element;
11
12
  declare const Spinner: ({ backgroundColor, description, fontSize, width, flat, onCancel, cancelText }: ITMSpinner) => React.JSX.Element;
12
13
  declare class TMSpinner {
13
14
  static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText }?: ITMSpinner): void;
14
15
  static hide(): void;
15
16
  }
16
- export { Spinner };
17
+ export { Spinner, SpinnerGraphic };
17
18
  export default TMSpinner;
@@ -157,13 +157,15 @@ const StyledCancelButton = styled.button `
157
157
  transform: scale(0.98);
158
158
  }
159
159
  `;
160
+ // Grafica dello spinner (logo + 8 pallini animati), riusabile anche nei loader inline
161
+ const SpinnerGraphic = () => (_jsxs("div", { style: { position: 'relative', width: '80px', height: '80px' }, children: [_jsx("img", { style: {
162
+ position: 'absolute',
163
+ top: '50%',
164
+ left: '50%',
165
+ transform: 'translate(-54%, -54%)'
166
+ }, src: six, width: 35, alt: "" }), _jsxs(StyledSpinnerAnimation, { children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }));
160
167
  const Spinner = ({ backgroundColor = 'transparent', description = '', fontSize = FontSize.defaultFontSize, width = 'fit-content', flat = false, onCancel, cancelText = 'Annulla' }) => {
161
- return (_jsx(StyledSpinnerContainer, { "$backgroundColor": backgroundColor, children: _jsxs(StyledSpinnerWrapper, { "$width": width, "$flat": flat, "$hasCancel": !!onCancel, children: [_jsxs("div", { style: { position: 'relative', width: '80px', height: '80px' }, children: [_jsx("img", { style: {
162
- position: 'absolute',
163
- top: '50%',
164
- left: '50%',
165
- transform: 'translate(-54%, -54%)'
166
- }, src: six, width: 35, alt: "" }), _jsxs(StyledSpinnerAnimation, { children: [_jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {}), _jsx("div", {})] })] }), _jsx(StyledSpinnerDescription, { "$fontSize": fontSize, children: description }), onCancel && (_jsx(StyledCancelButton, { onClick: onCancel, children: cancelText }))] }) }));
168
+ return (_jsx(StyledSpinnerContainer, { $backgroundColor: backgroundColor, children: _jsxs(StyledSpinnerWrapper, { $width: width, $flat: flat, $hasCancel: !!onCancel, children: [_jsx(SpinnerGraphic, {}), _jsx(StyledSpinnerDescription, { $fontSize: fontSize, children: description }), onCancel && (_jsx(StyledCancelButton, { onClick: onCancel, children: cancelText }))] }) }));
167
169
  };
168
170
  class TMSpinner {
169
171
  static show({ description, backgroundColor, fontSize, flat, onCancel, cancelText } = {
@@ -183,5 +185,5 @@ class TMSpinner {
183
185
  container?.remove();
184
186
  }
185
187
  }
186
- export { Spinner };
188
+ export { Spinner, SpinnerGraphic };
187
189
  export default TMSpinner;
@@ -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 React, { useEffect, useState } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import TabPanel, { Item } from "devextreme-react/tab-panel";
@@ -22,7 +22,7 @@ const renderTabItems = (tabItemProps, tabs, vil) => {
22
22
  return (_jsxs(StyledDivHorizontal, { style: { fontSize: '1rem', fontWeight: '600' }, children: [_jsx("span", { children: tabItemProps.title }), tabs.map((tab, index) => { return (_jsx("div", { style: { display: 'flex' }, children: tabItemProps.title == tab.title && _jsx(TMTabItemBadge, { vil: vil?.filter(o => tab.propsToBeValidated?.some((s) => o.PropertyName == s || o.PropertyScopes.includes(s))) ?? [] }) }, index)); })] }));
23
23
  };
24
24
  export const TMTabItemBadge = ({ vil }) => {
25
- return (_jsxs(_Fragment, { children: [" ", vil.length > 0 && _jsx(StyledTabItemResultType, { "$backgroundColor": editorColorManager(vil), children: vil.length }), " "] }));
25
+ return (_jsxs(_Fragment, { children: [" ", vil.length > 0 && _jsx(StyledTabItemResultType, { $backgroundColor: editorColorManager(vil), children: vil.length }), " "] }));
26
26
  };
27
27
  const TMTabGroup = ({ children, fontSize, validationItems = [], onTabIndexChanged }) => {
28
28
  const [selectedIndex, setSelectedIndex] = useState(0);
@@ -0,0 +1,106 @@
1
+ import React from 'react';
2
+ import { TMContextMenuItemProps } from '../NewComponents/ContextMenu/types';
3
+ /** Stile della barra, sempre nei colori del modulo: 'module' con la striscia, 'card' senza fondo, 'moduleFilled' col tab pieno. */
4
+ export type TMTabControlVariant = 'card' | 'module' | 'moduleFilled';
5
+ /** Effetto del contenuto quando si cambia tab: 'fade' e il default, 'none' toglie l'animazione. */
6
+ export type TMTabControlAnimation = 'none' | 'fade' | 'slide' | 'zoom';
7
+ export interface TMTabPanelProps {
8
+ /** Identificativo univoco del tab. */
9
+ id: string;
10
+ /** Titolo mostrato nella barra: stringa se vuoi poterlo rinominare. */
11
+ label: React.ReactNode;
12
+ /** Numero nel badge accanto al titolo: nascosto se 0 o undefined. */
13
+ badge?: number;
14
+ /** Colore del badge, default rosso. */
15
+ badgeColor?: string;
16
+ /** Tab non cliccabile. */
17
+ disabled?: boolean;
18
+ /** Se false il tab non viene renderizzato: comodo per tab condizionali. Default true. */
19
+ visible?: boolean;
20
+ /** Se false nasconde la 'x' e la voce Chiudi su questo tab. Default true. */
21
+ closable?: boolean;
22
+ /** Se false disabilita la rinomina su questo tab. Default true. */
23
+ renamable?: boolean;
24
+ /** Se false il tab non si trascina e non accetta il rilascio di altri: resta al suo posto. Default true. */
25
+ movable?: boolean;
26
+ children?: React.ReactNode;
27
+ }
28
+ /** Contenitore dichiarativo di un tab: figlio diretto di TMTabControl, non renderizza nulla di suo. */
29
+ export declare const TMTabPanel: React.FC<TMTabPanelProps>;
30
+ export interface TMTabControlProps {
31
+ /** Id del tab attivo in modalita controllata. */
32
+ selectedId?: string;
33
+ /** Tab iniziale in modalita non controllata. Default: primo tab visibile. */
34
+ defaultSelectedId?: string;
35
+ /** Notifica il cambio tab in entrambe le modalita. */
36
+ onSelectedIdChange?: (id: string) => void;
37
+ /** Se true con un solo tab la barra non viene mostrata: resta solo il contenuto. Default false. */
38
+ hideBarWhenSingle?: boolean;
39
+ /** Se valorizzata mostra la 'x' sui tab e notifica la richiesta di chiusura. */
40
+ onTabClose?: (id: string) => void;
41
+ /** Se true anche l'ultimo tab rimasto e chiudibile, lasciando il controllo senza tab. Default false. */
42
+ closableWhenSingle?: boolean;
43
+ /** Se valorizzata abilita la rinomina del titolo. */
44
+ onTabRename?: (id: string, label: string) => void;
45
+ /** Se valorizzata abilita lo spostamento con trascinamento: sposta draggedId nella posizione di targetId. */
46
+ onTabReorder?: (draggedId: string, targetId: string) => void;
47
+ /** Se valorizzata il menu contestuale del tab mostra anche la voce per aggiungere un tab. */
48
+ onTabAdd?: () => void;
49
+ /** Voci del chiamante nel menu contestuale del tab: precedono quelle del controllo, che non ripete una voce con lo stesso testo (es. Chiudi). */
50
+ tabMenuItems?: (id: string) => TMContextMenuItemProps[];
51
+ /** Testo della voce di menu per l'aggiunta. */
52
+ addCaption?: string;
53
+ /** Testo della voce di menu per la rinomina. */
54
+ renameCaption?: string;
55
+ /** Testo della voce di menu per la chiusura. */
56
+ closeCaption?: string;
57
+ /** Testo della voce di menu per la chiusura degli altri tab. */
58
+ closeOtherCaption?: string;
59
+ /** Stile della barra: 'module' (default) con la striscia, 'card' senza fondo o 'moduleFilled' col tab pieno. */
60
+ variant?: TMTabControlVariant;
61
+ /** Colore del titolo del tab attivo: scavalca quello della variante. */
62
+ textColor?: string;
63
+ /** Colore del titolo dei tab inattivi: scavalca quello della variante. */
64
+ idleTextColor?: string;
65
+ /** Effetto del contenuto al cambio tab: 'fade' (default), 'slide' nel verso dello spostamento, 'zoom' o 'none'. */
66
+ contentAnimation?: TMTabControlAnimation;
67
+ /** Durata dell'effetto in millisecondi. Default 280. */
68
+ animationDuration?: number;
69
+ /** Se true su touch si cambia tab trascinando il contenuto di lato. Default false. */
70
+ swipeEnabled?: boolean;
71
+ /** Stile del contenitore del contenuto, es. altezza e overflow. */
72
+ contentStyle?: React.CSSProperties;
73
+ /** Stile del contenitore esterno. */
74
+ style?: React.CSSProperties;
75
+ /** Contenuto del chiamante in coda alla barra, a destra dei tab: es. i pulsanti di azione della pagina.
76
+ Fa parte della barra, quindi con hideBarWhenSingle e un solo tab non viene mostrato. */
77
+ toolbar?: React.ReactNode;
78
+ children: React.ReactNode;
79
+ }
80
+ declare const TMTabControl: React.FC<TMTabControlProps>;
81
+ export default TMTabControl;
82
+ export interface TMTabDescriptor {
83
+ id: string;
84
+ label: string;
85
+ }
86
+ export interface TMTabsController {
87
+ items: TMTabDescriptor[];
88
+ activeId: string;
89
+ setActiveId: (id: string) => void;
90
+ /** Aggiunge un tab e lo attiva. Torna l'id creato. */
91
+ add: (label?: string) => string;
92
+ /** Chiude un tab: se era attivo passa al precedente. */
93
+ close: (id: string) => void;
94
+ rename: (id: string, label: string) => void;
95
+ /** Sposta il tab trascinato nella posizione di quello di arrivo. */
96
+ move: (draggedId: string, targetId: string) => void;
97
+ /** TMTabControl: funzionalità selezione, chiusura, rinomina, spostamento e aggiunta. */
98
+ controlProps: Pick<TMTabControlProps, 'selectedId' | 'onSelectedIdChange' | 'onTabClose' | 'onTabRename' | 'onTabReorder' | 'onTabAdd'>;
99
+ }
100
+ export interface TMTabsOptions {
101
+ /** Titolo del primo tab e base per quelli aggiunti ("Ricerca", poi "Ricerca 2", "Ricerca 3"...). */
102
+ label: string;
103
+ /** Titolo personalizzato per i tab aggiunti, in alternativa alla numerazione automatica. */
104
+ newLabel?: (index: number) => string;
105
+ }
106
+ export declare const useTMTabs: ({ label, newLabel }: TMTabsOptions) => TMTabsController;