@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
@@ -1,4 +1,4 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from 'react';
3
3
  import styled, { keyframes } from 'styled-components';
4
4
  import { DataListCacheService, SDK_Localizator, ObjectClasses, JobTypes } from '@topconsultnpm/sdk-ts';
@@ -255,6 +255,6 @@ const TMDataListItemPicker = ({ dataListID, selectedValue, onItemSelect, onItemE
255
255
  if (!dataList || !items || items.length === 0) {
256
256
  return (_jsxs(PickerContainer, { children: [_jsx(Label, { children: dataList ? `${SDK_Localizator.DataList}: ${dataList.name}` : SDKUI_Localizator.NoDataToDisplay }), _jsx(ItemsContainer, { children: allowEdit && (_jsxs(AddButton, { onClick: handleCreateNew, children: ["+ ", SDKUI_Localizator.NewMale] })) }), !allowEdit && _jsx("p", { children: SDKUI_Localizator.NoDataToDisplay })] }));
257
257
  }
258
- return (_jsxs(PickerContainer, { children: [_jsx(Label, { children: `${SDK_Localizator.DataList}: ${dataList.name}` }), _jsxs(ItemsContainer, { children: [items.map((item, index) => (_jsxs(ItemWrapper, { children: [_jsxs(StatusItem, { "$isSelected": item.value === selectedValue, "$index": index, onClick: () => onItemSelect(item), onDoubleClick: () => allowEdit && handleEdit(item), children: [item.imageID && _jsx(TMImageLibrary, { imageID: item.imageID }), _jsx("span", { children: item.name })] }), allowEdit && (_jsx(DeleteButton, { onClick: (e) => handleDelete(item, e), title: SDKUI_Localizator.Delete || 'Delete', "aria-label": "Delete item", children: _jsx(IconDelete, { fontSize: 16 }) }))] }, item.value))), allowEdit && (_jsxs(AddButton, { onClick: handleCreateNew, children: ["+ ", SDKUI_Localizator.NewMale] }))] }), _jsx(TMDataListItemEditor, { isOpen: showEditDialog, item: editingItem, isCreating: isCreating, onClose: handleCloseDialog, onSave: handleSave })] }));
258
+ return (_jsxs(PickerContainer, { children: [_jsx(Label, { children: `${SDK_Localizator.DataList}: ${dataList.name}` }), _jsxs(ItemsContainer, { children: [items.map((item, index) => (_jsxs(ItemWrapper, { children: [_jsxs(StatusItem, { $isSelected: item.value === selectedValue, $index: index, onClick: () => onItemSelect(item), onDoubleClick: () => allowEdit && handleEdit(item), children: [item.imageID && _jsx(TMImageLibrary, { imageID: item.imageID }), _jsx("span", { children: item.name })] }), allowEdit && (_jsx(DeleteButton, { onClick: (e) => handleDelete(item, e), title: SDKUI_Localizator.Delete || 'Delete', "aria-label": "Delete item", children: _jsx(IconDelete, { fontSize: 16 }) }))] }, item.value))), allowEdit && (_jsxs(AddButton, { onClick: handleCreateNew, children: ["+ ", SDKUI_Localizator.NewMale] }))] }), _jsx(TMDataListItemEditor, { isOpen: showEditDialog, item: editingItem, isCreating: isCreating, onClose: handleCloseDialog, onSave: handleSave })] }));
259
259
  };
260
260
  export default TMDataListItemPicker;
@@ -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 { AccessLevelsEx, DcmtTypeListCacheService, SDK_Globals, SDK_Localizator } from '@topconsultnpm/sdk-ts';
4
4
  import TMSpinner from '../base/TMSpinner';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useState } from 'react';
3
3
  import { SDK_Localizator, SDK_Globals } from '@topconsultnpm/sdk-ts';
4
4
  import { StyledDivHorizontal } from '../base/Styled';
@@ -1,8 +1,8 @@
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, useMemo, useRef } from 'react';
3
3
  import { LayoutModes, SDK_Localizator } from '@topconsultnpm/sdk-ts';
4
4
  import styled from 'styled-components';
5
- import { calcResponsiveSizes, IconAll, IconDelete, IconPencil, IconRefresh, SDKUI_Localizator } from '../../helper';
5
+ import { calcResponsiveSizes, IconAll, IconDelete, IconPencil, IconRefresh, IconSelected, SDKUI_Localizator } from '../../helper';
6
6
  import TMButton from '../base/TMButton';
7
7
  import TMDataGrid from '../base/TMDataGrid';
8
8
  import { CounterItemKey } from '../base/TMCounterContainer';
@@ -56,6 +56,7 @@ const StyledGridContainer = styled.div `
56
56
  font-weight: 600;
57
57
  }
58
58
  `;
59
+ const NO_SELECTED_ROW_KEYS = [];
59
60
  /* Quota di larghezza attribuita a ciascuna colonna della griglia, oltre a una base fissa per la barra dei comandi.
60
61
  I limiti evitano i due estremi: sotto il 40% la barra dei comandi diventa illeggibile, oltre il 95% il modale esce dallo schermo */
61
62
  const QUICK_SEARCH_BASE_WIDTH_PERC = 16;
@@ -110,23 +111,31 @@ const TMDistinctValues = ({ tid, mid, layoutMode = LayoutModes.None, allowAppend
110
111
  const isGridReady = !isQuickSearchGridVisible || quickSearch.columns.length > 0;
111
112
  const counterConfig = useMemo(() => {
112
113
  const counts = isQuickSearchGridVisible ? quickSearch.counts : distinctValues.counts;
114
+ const items = new Map([
115
+ [CounterItemKey.selectedItems, {
116
+ key: CounterItemKey.selectedItems,
117
+ show: true,
118
+ caption: SDKUI_Localizator.SelectedItems,
119
+ value: selection.selectedValues.length,
120
+ icon: _jsx(IconSelected, {}),
121
+ order: 1
122
+ }]
123
+ ]);
113
124
  // Senza il totale resta il conteggio predefinito della griglia: un rapporto con totale a zero sarebbe fuorviante
114
- if (!counts?.found)
115
- return { show: true };
116
- return {
117
- show: true,
118
- items: new Map([
119
- [CounterItemKey.allItems, {
120
- key: CounterItemKey.allItems,
121
- show: true,
122
- caption: `${counts.returned} restituiti su ${counts.found} trovati`,
123
- value: `${counts.returned}/${counts.found}`,
124
- icon: _jsx(IconAll, {}),
125
- order: -1
126
- }]
127
- ])
128
- };
129
- }, [isQuickSearchGridVisible, quickSearch.counts, distinctValues.counts]);
125
+ if (counts?.found) {
126
+ items.set(CounterItemKey.allItems, {
127
+ key: CounterItemKey.allItems,
128
+ show: true,
129
+ caption: `${counts.returned} restituiti su ${counts.found} trovati`,
130
+ value: `${counts.returned}/${counts.found}`,
131
+ icon: _jsx(IconAll, {}),
132
+ order: -1
133
+ });
134
+ }
135
+ return { show: true, items: items };
136
+ }, [isQuickSearchGridVisible, quickSearch.counts, distinctValues.counts, selection.selectedValues]);
137
+ // Configurazione fissa: dal pannello si preleva un valore per volta, le caselle di selezione non servono
138
+ const gridSelection = useMemo(() => ({ showCheckBoxesMode: 'none' }), []);
130
139
  const modeDataSource = useMemo(() => ([
131
140
  { value: DistinctValuesModes.DistinctValues, display: SDKUI_Localizator.DistinctValues },
132
141
  { value: DistinctValuesModes.QuickSearch, display: SDK_Localizator.SavedQuery },
@@ -151,7 +160,7 @@ const TMDistinctValues = ({ tid, mid, layoutMode = LayoutModes.None, allowAppend
151
160
  _jsx(TMButton, { btnStyle: 'toolbar', color: 'error', caption: SDKUI_Localizator.Delete, icon: _jsx(IconDelete, {}), onClick: quickSearch.onDeleteSettingsClick }), _jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Refresh, icon: _jsx(IconRefresh, {}), onClick: () => refreshAsync() }), selection.isAppendVisible && _jsxs(StyledAppendBar, { children: [_jsx(TMCheckBox, { label: 'Accoda e separa con', value: selection.isAppendMode, onValueChanged: selection.onAppendModeChanged }), _jsx(TMTextBox, { width: '30px', readOnly: true, disabled: !selection.isAppendMode, value: separator })] })] }) }), _jsx(TMSelectedValuesSummary, { items: selection.selectedValues, onRemove: selection.onRemoveSelectedValue, onClear: selection.onClearSelectedValues }), _jsx(StyledGridContainer, { children: isGridReady && _jsx(TMDataGrid
152
161
  /* Le due modalità hanno colonne del tutto diverse: ognuna ha la propria istanza di griglia.
153
162
  Nei valori distinti l'intestazione è il nome del metadato, che arriva insieme al primo caricamento */
154
- , { focusedRowKey: selection.focusedItem ? selection.focusedItem.rowIndex : undefined, selection: { showCheckBoxesMode: 'none' }, searchPanel: { highlightCaseSensitive: true, visible: true }, dataColumns: isQuickSearchGridVisible ? quickSearch.columns : distinctValues.columns, dataSource: isQuickSearchGridVisible ? quickSearch.dataSource : distinctValues.dataSource, customizeColumns: isQuickSearchGridVisible ? quickSearch.customizeColumns : distinctValues.customizeColumns, keyExpr: 'rowIndex', height: 'calc(100%)', showHeaderColumnChooser: true, onFocusedRowChanged: selection.onFocusedRowChanged, onRowDblClick: () => onClosePanelCallback?.(), counterConfig: counterConfig }, isQuickSearchGridVisible ? 'quickSearch' : `distinctValues_${distinctValues.md?.id ?? 0}`) })] }));
163
+ , { focusedRowKey: selection.focusedItem ? selection.focusedItem.rowIndex : undefined, selection: gridSelection, selectedRowKeys: NO_SELECTED_ROW_KEYS, searchPanel: { highlightCaseSensitive: true, visible: true }, searchPanelFocusTrigger: 1, dataColumns: isQuickSearchGridVisible ? quickSearch.columns : distinctValues.columns, dataSource: isQuickSearchGridVisible ? quickSearch.dataSource : distinctValues.dataSource, customizeColumns: isQuickSearchGridVisible ? quickSearch.customizeColumns : distinctValues.customizeColumns, keyExpr: 'rowIndex', height: 'calc(100%)', showHeaderColumnChooser: true, onFocusedRowChanged: selection.onFocusedRowChanged, onRowDblClick: () => onClosePanelCallback?.(), counterConfig: counterConfig }, isQuickSearchGridVisible ? 'quickSearch' : `distinctValues_${distinctValues.md?.id ?? 0}`) })] }));
155
164
  };
156
165
  return (_jsxs(_Fragment, { children: [isModal
157
166
  ? isModalReady && _jsx(TMModal, { title: panelTitle, width: isQuickSearchGridVisible ? calcResponsiveSizes(deviceType, quickSearchModalWidth ?? calcQuickSearchModalWidth(0), '95%', '95%') : calcResponsiveSizes(deviceType, '700px', '95%', '95%'), height: isQuickSearchGridVisible ? '95%' : calcResponsiveSizes(deviceType, '600px', '95%', '95%'), resizable: true, expandable: true, onClose: onClosePanelCallback, children: renderContent() }, isQuickSearchGridVisible ? 'quickSearch' : 'distinctValues')
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from 'react';
3
3
  import { DataColumnTypes, SDK_Localizator, DataListCacheService, SDK_Globals, LayoutModes } from '@topconsultnpm/sdk-ts';
4
4
  import { IconDetails, IconSearch, generateUniqueColumnKeys, Globalization, SDKUI_Localizator, searchResultDescriptorToSimpleArray, IsParametricQuery, IconWarning } from '../../helper';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from 'react';
3
3
  import { TMImageLibrary, IconSearch } from '../../helper';
4
4
  import { StyledDivHorizontal } from '../base/Styled';
@@ -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, useMemo, useState } from 'react';
3
3
  import { DcmtTypeDescriptor, DcmtTypeListCacheService, SDK_Globals, SDK_Localizator } from '@topconsultnpm/sdk-ts';
4
4
  import { TMMetadataIcon, TMMidViewer, getDisplayAlias } from '../viewers/TMMidViewer';
@@ -142,7 +142,7 @@ export const TMMetadataChooserForm = ({ tmSession, tids, qd, filterMetadata, qdS
142
142
  const groupCellRender = useCallback((data) => {
143
143
  let tid_alias = JSON.parse(data.value);
144
144
  let dtd = dcmtTypes?.find(o => o.id == tid_alias.tid);
145
- return _jsxs(StyledDxGridGroupHeader, { "$backgroundColor": getColorIndex?.(tid_alias), children: [_jsx(TMDcmtTypeIcon, { dtd: dtd }), _jsx("p", { children: getDisplayAlias(SDK_Globals.useLocalizedName ? dtd?.nameLoc : dtd?.name, tid_alias.alias) }), data.summaryItems && data.summaryItems.length > 0 && _jsx(StyledBadge, { "$backgroundColor": TMColors.info, children: data.summaryItems[0].value })] });
145
+ return _jsxs(StyledDxGridGroupHeader, { $backgroundColor: getColorIndex?.(tid_alias), children: [_jsx(TMDcmtTypeIcon, { dtd: dtd }), _jsx("p", { children: getDisplayAlias(SDK_Globals.useLocalizedName ? dtd?.nameLoc : dtd?.name, tid_alias.alias) }), data.summaryItems && data.summaryItems.length > 0 && _jsx(StyledBadge, { $backgroundColor: TMColors.info, children: data.summaryItems[0].value })] });
146
146
  }, [dcmtTypes, getColorIndex]);
147
147
  const dataColumns = useMemo(() => {
148
148
  return [
@@ -6,12 +6,11 @@ import { TMColors } from '../../utils/theme';
6
6
  import ShowAlert from '../base/TMAlert';
7
7
  import TMAreaManager from '../base/TMAreaManager';
8
8
  import TMButton from '../base/TMButton';
9
- import { TMLayoutItem } from '../base/TMLayout';
9
+ import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
10
10
  import TMModal from '../base/TMModal';
11
11
  import { TMExceptionBoxManager } from '../base/TMPopUp';
12
- import { TMLayoutWaitingContainer } from '../base/TMWaitPanel';
12
+ import TMWaitPanelManager from '../base/waitPanel/TMWaitPanelManager';
13
13
  import TMTextBox from '../editors/TMTextBox';
14
- let abortController = new AbortController();
15
14
  const TMPathChooser = (props) => {
16
15
  //const [path, setPath] = useState<string>(props.value)
17
16
  const [elementStyle, setElementStyle] = useState(props.elementStyle);
@@ -22,12 +21,6 @@ const TMPathChooser = (props) => {
22
21
  const [showAreaManager, setShowAreaManager] = useState(false);
23
22
  const [downloadLink, setDownloadLink] = useState(null);
24
23
  const [file, setFile] = useState(null);
25
- const [showWaitPanel, setShowWaitPanel] = useState(false);
26
- const [waitPanelTitle, setWaitPanelTitle] = useState('');
27
- const [showSecondary, setShowSecondary] = useState(false);
28
- const [waitPanelTextSecondary, setWaitPanelTextSecondary] = useState('');
29
- const [waitPanelValueSecondary, setWaitPanelValueSecondary] = useState(0);
30
- const [waitPanelMaxValueSecondary, setWaitPanelMaxValueSecondary] = useState(0);
31
24
  const formulaItems = ['{@JobName}', '{@JobStartDate}', '{@JobStartDate_DDMMYYYY}', '{@JobStartDateTime}', '{@ProcessRunID}', '{@ProcessName}', '{@ProcessStartDate}', '{@ProcessStartDateTime}'];
32
25
  //useEffect(() => { setPath(props.value) }, [props.value])
33
26
  useEffect(() => {
@@ -98,30 +91,23 @@ const TMPathChooser = (props) => {
98
91
  return buttons;
99
92
  };
100
93
  const onFileDownloadHandler = async () => {
94
+ // Un solo file: la barra del pannello segue i byte scaricati
95
+ const waitPanel = TMWaitPanelManager.show({
96
+ title: "Download",
97
+ cancelable: true,
98
+ showCounters: false,
99
+ });
101
100
  try {
102
101
  let av = AreaHelper.ExtractAreaInfo_2(props.value, true);
103
102
  let doc;
104
103
  let tms = props.tmSession ?? SDK_Globals.tmSession;
105
- setShowWaitPanel(true);
106
- setShowSecondary(true);
107
- setWaitPanelTitle("Download");
108
- abortController = new AbortController();
109
- let firstBlock = true;
110
- let maxFileSize = 0;
111
- doc = await tms?.NewAreaEngine().RetrieveFileAsync(av.aid, av.subFolder, av.fileName, FileFormats.None, abortController.signal, (pd) => {
112
- if (firstBlock) {
113
- maxFileSize = pd.ProgressBarMaximum ?? 0;
114
- setWaitPanelMaxValueSecondary(maxFileSize);
115
- firstBlock = false;
116
- }
117
- setWaitPanelValueSecondary(pd.ProgressBarValue);
118
- setWaitPanelTextSecondary(`Downloading... ${Globalization.getNumberDisplayValue(pd.ProgressBarValue, true)} / ${Globalization.getNumberDisplayValue(maxFileSize, true)}`);
119
- if (pd.ProgressBarValue === pd.ProgressBarMaximum) {
120
- setWaitPanelMaxValueSecondary(0);
121
- setWaitPanelValueSecondary(0);
122
- setWaitPanelTextSecondary('');
123
- firstBlock = true;
124
- }
104
+ doc = await tms?.NewAreaEngine().RetrieveFileAsync(av.aid, av.subFolder, av.fileName, FileFormats.None, waitPanel.signal, (pd) => {
105
+ const total = pd.ProgressBarMaximum ?? 0;
106
+ waitPanel.update({
107
+ value: pd.ProgressBarValue,
108
+ max: total,
109
+ subtitle: `Downloading... ${Globalization.getNumberDisplayValue(pd.ProgressBarValue, true)} / ${Globalization.getNumberDisplayValue(total, true)}`
110
+ });
125
111
  });
126
112
  setFile(doc);
127
113
  }
@@ -135,13 +121,10 @@ const TMPathChooser = (props) => {
135
121
  setFile(null);
136
122
  }
137
123
  finally {
138
- setWaitPanelTextSecondary('');
139
- setWaitPanelMaxValueSecondary(0);
140
- setWaitPanelValueSecondary(0);
141
- setShowWaitPanel(false);
124
+ waitPanel.close();
142
125
  }
143
126
  };
144
- return (_jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: [_jsx(TMLayoutItem, { children: _jsx(TMTextBox, { buttons: renderButtons(), elementStyle: elementStyle, formulaItems: props.allowParametricPath ? formulaItems : [], isModifiedWhen: props.isModifiedWhen, label: props.label, value: props.value || '', onValueChanged: (e) => { /*setPath(e.target.value);*/ props.onValueChanged?.(e.target.value); }, validationItems: props.validationItems }) }), showAreaManager &&
127
+ return (_jsxs(TMLayoutContainer, { direction: 'vertical', children: [_jsx(TMLayoutItem, { children: _jsx(TMTextBox, { buttons: renderButtons(), elementStyle: elementStyle, formulaItems: props.allowParametricPath ? formulaItems : [], isModifiedWhen: props.isModifiedWhen, label: props.label, value: props.value || '', onValueChanged: (e) => { /*setPath(e.target.value);*/ props.onValueChanged?.(e.target.value); }, validationItems: props.validationItems }) }), showAreaManager &&
145
128
  _jsxs(TMModal, { resizable: true, width: '80%', onClose: () => setShowAreaManager(false), children: [_jsx(TMAreaManager, { showOnlyFolders: props.allowBrowseFolder_Area && !props.allowBrowseFile_Area, initialPath: props.value, onFolderChanged: (folder) => setAreaFolderPath(folder), onFileChanged: (file) => setAreaFilePath(file), isPathChooser: true, areaChoose: areaChoose, width: '98%', height: props.allowBrowseFile_Area ? '70vh' : '90%', tmSession: props.tmSession, selectionMode: 'single' }), _jsx("div", { style: { position: 'absolute', right: '22px', bottom: '8px' }, children: _jsx(TMButton, { caption: 'OK', onClick: () => areaChoose() }) })] })] }));
146
129
  };
147
130
  export default TMPathChooser;
@@ -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, useMemo, useRef, useState } from 'react';
3
3
  import { DcmtTypeListCacheService, PlatformObjectValidator, SavedQueryCacheService, SDK_Globals, SDK_Localizator, SearchEngine } from '@topconsultnpm/sdk-ts';
4
4
  import styled from 'styled-components';
@@ -207,16 +207,16 @@ const TMQuickSearchCondition = ({ condition }) => (_jsxs(StyledCondition, { chil
207
207
  /** Riepilogo mostrato nel tooltip e nel dettaglio: nel dettaglio il nome della ricerca è già nel titolo del modale */
208
208
  const TMQuickSearchSummary = ({ summary, isDetail = false }) => {
209
209
  if (!summary) {
210
- return (_jsx(StyledSummary, { "$isDetail": isDetail, children: _jsxs(StyledNote, { children: [SDKUI_Localizator.Loading, " ..."] }) }));
210
+ return (_jsx(StyledSummary, { $isDetail: isDetail, children: _jsxs(StyledNote, { children: [SDKUI_Localizator.Loading, " ..."] }) }));
211
211
  }
212
212
  if (summary.isUnavailable) {
213
- return (_jsxs(StyledSummary, { "$isDetail": isDetail, children: [!isDetail && _jsxs(StyledSummaryTitle, { children: [_jsx(IconSavedQuery, { fontSize: 19 }), summary.name] }), _jsxs(StyledNote, { children: [_jsx(IconInfo, { fontSize: 17 }), "La ricerca rapida configurata non \u00E8 pi\u00F9 disponibile"] })] }));
213
+ return (_jsxs(StyledSummary, { $isDetail: isDetail, children: [!isDetail && _jsxs(StyledSummaryTitle, { children: [_jsx(IconSavedQuery, { fontSize: 19 }), summary.name] }), _jsxs(StyledNote, { children: [_jsx(IconInfo, { fontSize: 17 }), "La ricerca rapida configurata non \u00E8 pi\u00F9 disponibile"] })] }));
214
214
  }
215
215
  // Nel tooltip le condizioni oltre il limite vengono troncate: il tooltip non è scorribile
216
216
  const shownConditions = isDetail ? summary.conditions : summary.conditions.slice(0, TOOLTIP_MAX_CONDITIONS);
217
217
  const hiddenConditionsCount = summary.conditions.length - shownConditions.length;
218
218
  const hasParameters = shownConditions.some(o => o.isParameter);
219
- return (_jsxs(StyledSummary, { "$isDetail": isDetail, children: [!isDetail && _jsxs(StyledSummaryTitle, { children: [_jsx(IconSavedQuery, { fontSize: 19 }), summary.name] }), summary.conditions.length <= 0
219
+ return (_jsxs(StyledSummary, { $isDetail: isDetail, children: [!isDetail && _jsxs(StyledSummaryTitle, { children: [_jsx(IconSavedQuery, { fontSize: 19 }), summary.name] }), summary.conditions.length <= 0
220
220
  ? _jsxs(StyledNote, { children: [_jsx(IconInfo, { fontSize: 17 }), "Nessun filtro: la ricerca restituisce tutti i documenti"] })
221
221
  : _jsxs(_Fragment, { children: [_jsxs(StyledSectionTitle, { children: [SDK_Localizator.QueryWhere, _jsx(StyledCounter, { children: summary.conditions.length })] }), _jsx(StyledConditions, { children: shownConditions.map((condition, index) => _jsx(TMQuickSearchCondition, { condition: condition }, index)) }), hiddenConditionsCount > 0 &&
222
222
  _jsxs(StyledNote, { children: [_jsx(IconInfo, { fontSize: 17 }), "Altre ", hiddenConditionsCount, " condizioni non mostrate"] })] }), hasParameters && _jsxs(StyledNote, { children: [_jsx(IconInfo, { fontSize: 17 }), "I valori tratteggiati vengono chiesti a ogni esecuzione della ricerca"] }), !isDetail && _jsxs(StyledHint, { children: [_jsx(IconInfo, { fontSize: 17 }), "Fare clic per aprire il dettaglio e leggerlo meglio"] })] }));
@@ -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, useMemo, useState } from 'react';
3
3
  import { ResultTypes, SavedQueryCacheService, SDK_Localizator, ValidationItem } from '@topconsultnpm/sdk-ts';
4
4
  import styled from 'styled-components';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useState } from 'react';
3
3
  import { SDK_Globals, RelationTypes, RelationCacheService, DcmtTypeListCacheService, SDK_Localizator } from '@topconsultnpm/sdk-ts';
4
4
  import { IconSearch, IconRelationManyToMany, IconRelationOneToMany, SDKUI_Localizator } from '../../helper';
@@ -84,8 +84,6 @@ const StyledSelectionActions = styled.div `display: flex; flex-shrink: 0; align-
84
84
  const TMSelectedValuesSummary = ({ items, onRemove, onClear }) => {
85
85
  if (items.length <= 0)
86
86
  return null;
87
- return (_jsxs(StyledSelectionSummary, { children: [_jsxs(StyledSelectionTitle, { children: [_jsx(IconSelected, { fontSize: 17, color: TMColors.primary }), _jsx("span", { children: SDKUI_Localizator.Selected }), _jsx(StyledSelectionCounter, { children: items.length })] }), _jsx(StyledSelectionChips, { children: items.map((item) =>
88
- /* Il valore lungo viene troncato nel chip: il tooltip è l'unico modo per leggerlo per intero */
89
- _jsx(TMTooltip, { content: item.display, children: _jsxs(StyledChip, { children: [_jsx(StyledChipLabel, { children: item.display }), _jsx(StyledChipRemove, { type: 'button', title: SDKUI_Localizator.Remove, onClick: () => onRemove(item.value), children: _jsx(IconCloseOutline, { fontSize: 13 }) })] }) }, item.value)) }), _jsx(StyledSelectionActions, { children: _jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Clear, icon: _jsx(IconEraser, {}), onClick: onClear }) })] }));
87
+ return (_jsxs(StyledSelectionSummary, { children: [_jsxs(StyledSelectionTitle, { children: [_jsx(IconSelected, { fontSize: 17, color: TMColors.primary }), _jsx("span", { children: SDKUI_Localizator.Selected }), _jsx(StyledSelectionCounter, { children: items.length })] }), _jsx(StyledSelectionChips, { children: items.map((item) => _jsx(TMTooltip, { content: item.display, children: _jsxs(StyledChip, { children: [_jsx(StyledChipLabel, { children: item.display }), _jsx(StyledChipRemove, { type: 'button', title: SDKUI_Localizator.Remove, onClick: () => onRemove(item.value), children: _jsx(IconCloseOutline, { fontSize: 13 }) })] }) }, item.value)) }), _jsx(StyledSelectionActions, { children: _jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Clear, icon: _jsx(IconEraser, {}), onClick: onClear }) })] }));
90
88
  };
91
89
  export default TMSelectedValuesSummary;
@@ -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, useMemo, useRef, useState } from 'react';
3
3
  import { OwnershipLevels, SDK_Localizator, UserLevels, UserListCacheService } from '@topconsultnpm/sdk-ts';
4
4
  import { SDKUI_Localizator, IconSearch, IconUserLevelMember, IconUserLevelAdministrator, IconUserLevelSystemAdministrator, IconUserLevelAutonomousAdministrator, LocalizeOwnershipLevels, LocalizeUserLevels, IconShowAllUsersOff, IconShowAllUsers } from '../../helper';
@@ -85,7 +85,7 @@ const TMCheckBox = ({ labelColor, isModifiedWhen, elementStyle, disabled = false
85
85
  return myBool;
86
86
  };
87
87
  const renderedCheckbox = () => {
88
- return (_jsxs(StyledCheckBoxContainer, { "$disabled": disabled, "$labelPosition": labelPosition, onKeyDown: (e) => e.code === 'Space' && !disabled && onValueChanged && onValueChanged(currentValue), onClick: () => { !disabled && onValueChanged && onValueChanged(currentValue); }, children: [label && _jsx(StyledCheckBoxLabel, { "$labelColor": labelColor, tabIndex: 0, "$isModifiedWhen": isModifiedWhen, "$disabled": disabled, "$labelPosition": labelPosition, "$fontSize": fontSize, children: label }), _jsx(StyledCheckbox, { tabIndex: -1, "$isModifiedWhen": isModifiedWhen, "$disabled": disabled, type: 'checkbox', checked: !isChecked(), onChange: () => { } })] }));
88
+ return (_jsxs(StyledCheckBoxContainer, { $disabled: disabled, $labelPosition: labelPosition, onKeyDown: (e) => e.code === 'Space' && !disabled && onValueChanged && onValueChanged(currentValue), onClick: () => { !disabled && onValueChanged && onValueChanged(currentValue); }, children: [label && _jsx(StyledCheckBoxLabel, { $labelColor: labelColor, tabIndex: 0, $isModifiedWhen: isModifiedWhen, $disabled: disabled, $labelPosition: labelPosition, $fontSize: fontSize, children: label }), _jsx(StyledCheckbox, { tabIndex: -1, $isModifiedWhen: isModifiedWhen, $disabled: disabled, type: 'checkbox', checked: !isChecked(), onChange: () => { } })] }));
89
89
  };
90
90
  return (_jsx("div", { style: elementStyle, children: renderedCheckbox() }));
91
91
  };
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from "react";
3
3
  import { createPortal } from "react-dom";
4
4
  import styled, { css } from "styled-components";
@@ -232,8 +232,8 @@ const TMDropDown = ({ validationItems = [], disabled = false, elementStyle, isMo
232
232
  }
233
233
  };
234
234
  const renderOptions = () => (filteredDataSource.length > 0
235
- ? filteredDataSource.map((data, index) => (_jsx(StyledOption, { "$fontSize": fontSize, "$isSelected": String(data.value) === String(value), "$isHighlighted": index === highlightedIndex, onMouseEnter: () => setHighlightedIndex(index), onClick: () => selectItem(data), children: itemRender ? itemRender(data) : data.display }, index)))
236
- : _jsx(StyledNoOptions, { "$fontSize": fontSize, children: SDKUI_Localizator.NoDataToDisplay }));
235
+ ? filteredDataSource.map((data, index) => (_jsx(StyledOption, { $fontSize: fontSize, $isSelected: String(data.value) === String(value), $isHighlighted: index === highlightedIndex, onMouseEnter: () => setHighlightedIndex(index), onClick: () => selectItem(data), children: itemRender ? itemRender(data) : data.display }, index)))
236
+ : _jsx(StyledNoOptions, { $fontSize: fontSize, children: SDKUI_Localizator.NoDataToDisplay }));
237
237
  // onMouseDown va bloccato: senza preventDefault il blur dell'input chiuderebbe l'elenco prima del click
238
238
  const renderOptionsPanel = () => {
239
239
  if (!isOpen)
@@ -243,12 +243,12 @@ const TMDropDown = ({ validationItems = [], disabled = false, elementStyle, isMo
243
243
  }
244
244
  if (!optionsPanelPosition)
245
245
  return null;
246
- return createPortal(_jsx(StyledPortalOptionsPanel, { ref: optionsPanelRef, "$left": optionsPanelPosition.left, "$top": optionsPanelPosition.top, "$bottom": optionsPanelPosition.bottom, "$width": optionsPanelPosition.width, "$maxHeight": optionsPanelPosition.maxHeight, onMouseDown: (e) => e.preventDefault(), children: renderOptions() }), document.body);
246
+ return createPortal(_jsx(StyledPortalOptionsPanel, { ref: optionsPanelRef, $left: optionsPanelPosition.left, $top: optionsPanelPosition.top, $bottom: optionsPanelPosition.bottom, $width: optionsPanelPosition.width, $maxHeight: optionsPanelPosition.maxHeight, onMouseDown: (e) => e.preventDefault(), children: renderOptions() }), document.body);
247
247
  };
248
- const renderSearchableDropDown = () => (_jsxs(_Fragment, { children: [_jsx(StyledSearchInput, { value: isOpen ? searchText : (selectedItem?.display ?? ''), placeholder: isOpen ? SDKUI_Localizator.Search : placeHolder, readOnly: disabled, disabled: disabled, "$disabled": disabled, "$fontSize": fontSize, "$isModified": isModifiedWhen, "$vil": validationItems, onFocus: () => { setIsFocused(true); openOptions(); }, onBlur: () => { setIsFocused(false); closeOptions(); }, onClick: () => { if (!isOpen)
248
+ const renderSearchableDropDown = () => (_jsxs(_Fragment, { children: [_jsx(StyledSearchInput, { value: isOpen ? searchText : (selectedItem?.display ?? ''), placeholder: isOpen ? SDKUI_Localizator.Search : placeHolder, readOnly: disabled, disabled: disabled, $disabled: disabled, $fontSize: fontSize, $isModified: isModifiedWhen, $vil: validationItems, onFocus: () => { setIsFocused(true); openOptions(); }, onBlur: () => { setIsFocused(false); closeOptions(); }, onClick: () => { if (!isOpen)
249
249
  openOptions(); }, onChange: (e) => { setSearchText(e.target.value); setIsOpen(true); setHighlightedIndex(0); }, onKeyDown: onSearchKeyDown }), renderOptionsPanel()] }));
250
- const renderNativeDropDown = () => (_jsxs(StyledDropDown, { value: value, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), "$disabled": disabled, disabled: disabled, "$fontSize": fontSize, "$isModified": isModifiedWhen, "$vil": validationItems, onChange: onValueChanged, children: [placeHolder && _jsx("option", { value: "", disabled: true, hidden: true, children: placeHolder }), dataSource?.map((data, index) => (_jsx("option", { value: data.value, children: data.display }, index)))] }));
251
- const renderedLeftLabelTextBox = () => (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { "$width": width, children: [label && _jsx(StyledEditorLabel, { "$isFocused": isFocused, "$labelPosition": labelPosition, "$disabled": disabled, children: label }), _jsxs(StyledDropDownWrapper, { ref: dropDownWrapperRef, "$width": width, children: [searchEnabled ? renderSearchableDropDown() : renderNativeDropDown(), buttons.length > 0 && (_jsx(ButtonsContainer, { children: buttons.map((buttonItem) => (_jsx(StyledDropDownEditorButton, { onClick: buttonItem.onClick, children: _jsx(TMTooltip, { content: buttonItem.tooltipContent ?? buttonItem.text, children: buttonItem.icon }) }, buttonItem.text))) })), _jsx(CustomArrow, {})] }), _jsx(TMVilViewer, { vil: validationItems })] }) })] }));
250
+ const renderNativeDropDown = () => (_jsxs(StyledDropDown, { value: value, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), $disabled: disabled, disabled: disabled, $fontSize: fontSize, $isModified: isModifiedWhen, $vil: validationItems, onChange: onValueChanged, children: [placeHolder && _jsx("option", { value: "", disabled: true, hidden: true, children: placeHolder }), dataSource?.map((data, index) => (_jsx("option", { value: data.value, children: data.display }, index)))] }));
251
+ const renderedLeftLabelTextBox = () => (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { $disabled: disabled, $vil: validationItems, $isModified: isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { $width: width, children: [label && _jsx(StyledEditorLabel, { $isFocused: isFocused, $labelPosition: labelPosition, $disabled: disabled, children: label }), _jsxs(StyledDropDownWrapper, { ref: dropDownWrapperRef, $width: width, children: [searchEnabled ? renderSearchableDropDown() : renderNativeDropDown(), buttons.length > 0 && (_jsx(ButtonsContainer, { children: buttons.map((buttonItem) => (_jsx(StyledDropDownEditorButton, { onClick: buttonItem.onClick, children: _jsx(TMTooltip, { content: buttonItem.tooltipContent ?? buttonItem.text, children: buttonItem.icon }) }, buttonItem.text))) })), _jsx(CustomArrow, {})] }), _jsx(TMVilViewer, { vil: validationItems })] }) })] }));
252
252
  return _jsx("div", { style: elementStyle, children: renderedLeftLabelTextBox() });
253
253
  };
254
254
  export default TMDropDown;
@@ -31,7 +31,7 @@ export declare const StyledEditorLabel: import("styled-components/dist/types").I
31
31
  style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
32
32
  }, {
33
33
  $isFocused: boolean;
34
- $labelPosition: "right" | "left" | "top";
34
+ $labelPosition: 'right' | 'left' | 'top';
35
35
  $disabled: boolean;
36
36
  $fontSize?: string;
37
37
  $color?: string;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import { ValidationItem, SDK_Globals, MetadataDataTypes, DBBrands, ResultTypes } from '@topconsultnpm/sdk-ts';
4
4
  import { TreeView } from 'devextreme-react';
@@ -73,6 +73,6 @@ const TMHtmlContentDisplay = (props) => {
73
73
  updatedMarkup = convertLinksToAnchors(updatedMarkup);
74
74
  updatedMarkup = addMentionStyling(updatedMarkup, usersName);
75
75
  updatedMarkup = highlightText(updatedMarkup, searchText);
76
- return (_jsx(Wrapper, { "$isSelected": isSelected, children: _jsx("div", { dangerouslySetInnerHTML: { __html: updatedMarkup } }) }));
76
+ return (_jsx(Wrapper, { $isSelected: isSelected, children: _jsx("div", { dangerouslySetInnerHTML: { __html: updatedMarkup } }) }));
77
77
  };
78
78
  export default TMHtmlContentDisplay;
@@ -122,6 +122,6 @@ const TMLocalizedTextBox = ({ label, value, value_IT, value_EN, value_FR, value_
122
122
  icon: (_jsxs(IconContainer, { children: [_jsx(IconLanguage, {}), localizedCount > 0 && _jsx(Badge, { children: localizedCount })] })),
123
123
  onClick: handleTogglePopover,
124
124
  };
125
- return (_jsxs(LocalizedContainer, { ref: containerRef, children: [(qd || tid) ? (_jsx(TMMetadataTextBox, { type: "text", label: label, value: value, isModifiedWhen: isModifiedWhen, buttons: [localizationButton], validationItems: validationItems, qd: qd, tid: tid, readOnly: readOnly, onValueChanged: (e) => onValueChanged(CultureIDs.None, e.target.value) })) : (_jsx(TMTextBox, { type: "text", label: label, value: value, isModifiedWhen: isModifiedWhen, buttons: [localizationButton], validationItems: validationItems, readOnly: readOnly, onValueChanged: (e) => onValueChanged(CultureIDs.None, e.target.value) })), isPopoverVisible && (_jsx(Portal, { popoverRef: popoverRef, children: _jsx(Popover, { ref: popoverRef, "$isVisible": isPopoverVisible, "$top": popoverPosition.top, "$left": popoverPosition.left, "$width": popoverPosition.width, onMouseDown: (e) => e.stopPropagation(), children: languages.map((lang) => ((qd || tid) ? (_jsx(TMMetadataTextBox, { label: `${lang.label}`, showClearButton: true, icon: _jsx("img", { src: getCultureIDImg(lang.code), alt: "Lang", width: 18, height: 18 }), value: lang.value || '', qd: qd, tid: tid, readOnly: readOnly, onValueChanged: (e) => onValueChanged(lang.code, e.target.value) }, lang.code)) : (_jsx(TMTextBox, { label: `${lang.label}`, showClearButton: true, icon: _jsx("img", { src: getCultureIDImg(lang.code), alt: "Lang", width: 18, height: 18 }), value: lang.value || '', readOnly: readOnly, onValueChanged: (e) => onValueChanged(lang.code, e.target.value) }, lang.code)))) }) }))] }));
125
+ return (_jsxs(LocalizedContainer, { ref: containerRef, children: [(qd || tid) ? (_jsx(TMMetadataTextBox, { type: "text", label: label, value: value, isModifiedWhen: isModifiedWhen, buttons: [localizationButton], validationItems: validationItems, qd: qd, tid: tid, readOnly: readOnly, onValueChanged: (e) => onValueChanged(CultureIDs.None, e.target.value) })) : (_jsx(TMTextBox, { type: "text", label: label, value: value, isModifiedWhen: isModifiedWhen, buttons: [localizationButton], validationItems: validationItems, readOnly: readOnly, onValueChanged: (e) => onValueChanged(CultureIDs.None, e.target.value) })), isPopoverVisible && (_jsx(Portal, { popoverRef: popoverRef, children: _jsx(Popover, { ref: popoverRef, $isVisible: isPopoverVisible, $top: popoverPosition.top, $left: popoverPosition.left, $width: popoverPosition.width, onMouseDown: (e) => e.stopPropagation(), children: languages.map((lang) => ((qd || tid) ? (_jsx(TMMetadataTextBox, { label: `${lang.label}`, showClearButton: true, icon: _jsx("img", { src: getCultureIDImg(lang.code), alt: "Lang", width: 18, height: 18 }), value: lang.value || '', qd: qd, tid: tid, readOnly: readOnly, onValueChanged: (e) => onValueChanged(lang.code, e.target.value) }, lang.code)) : (_jsx(TMTextBox, { label: `${lang.label}`, showClearButton: true, icon: _jsx("img", { src: getCultureIDImg(lang.code), alt: "Lang", width: 18, height: 18 }), value: lang.value || '', readOnly: readOnly, onValueChanged: (e) => onValueChanged(lang.code, e.target.value) }, lang.code)))) }) }))] }));
126
126
  };
127
127
  export default TMLocalizedTextBox;
@@ -1,8 +1,8 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useCallback, useEffect, useMemo, useState } from "react";
3
3
  import styled from "styled-components";
4
- import { AccessLevels, AppModules, DcmtTypeListCacheService, LayoutGroupBorderStyles, LayoutGroupOrientations, LayoutItemTypes, LayoutModes, MetadataDataDomains, MetadataDataTypes, SDK_Globals, SystemMIDsAsNumber, SystemTIDs, WorkItemMetadataNames } from '@topconsultnpm/sdk-ts';
5
- import { IconUndo, IconPencil, IconFunction, IconMenuVertical, IconDataList, SDKUI_Localizator, IconNull, stringIsNullOrEmpty, deepCompare, SDKUI_Globals, IconDcmtTypeSys, isApprovalWorkflowView, StyledTabItem, getAppModuleGradient } from "../../helper";
4
+ import { AccessLevels, DcmtTypeListCacheService, LayoutGroupBorderStyles, LayoutGroupOrientations, LayoutItemTypes, LayoutModes, MetadataDataDomains, MetadataDataTypes, SDK_Globals, SystemMIDsAsNumber, SystemTIDs, WorkItemMetadataNames } from '@topconsultnpm/sdk-ts';
5
+ import { IconUndo, IconPencil, IconFunction, IconMenuVertical, IconDataList, SDKUI_Localizator, IconNull, stringIsNullOrEmpty, deepCompare, SDKUI_Globals, IconDcmtTypeSys, isApprovalWorkflowView } from "../../helper";
6
6
  import { TMColors } from "../../utils/theme";
7
7
  import TMButton from "../base/TMButton";
8
8
  import TMDropDownMenu from "../base/TMDropDownMenu";
@@ -13,7 +13,7 @@ import { FormulaHelper } from "./TMFormulaEditor";
13
13
  import { ChronologyMIDs, DraftsMIDs, DSAttachsMIDs } from "../../ts";
14
14
  import { TMNothingToShow } from "../features/documents/TMDcmtPreview";
15
15
  import TMAccordion from "../base/TMAccordion";
16
- import TabPanel, { Item } from 'devextreme-react/tab-panel';
16
+ import TMTabControl, { TMTabPanel } from "../base/TMTabControl";
17
17
  import { TMExceptionBoxManager } from "../base/TMPopUp";
18
18
  // Costante per la minWidth degli elementi - garantisce coerenza tra layout orizzontale e verticale
19
19
  const ITEM_MIN_WIDTH = 200;
@@ -754,7 +754,7 @@ const TMLayoutTabPanel = React.memo(({ tabItems }) => {
754
754
  const handleSelectedIndexChange = useCallback((index) => {
755
755
  setActiveTabIndex(index);
756
756
  }, []);
757
- return (_jsx(TabPanel, { width: "100%", height: "100%", animationEnabled: false, swipeEnabled: false, loop: false, showNavButtons: true, repaintChangesOnly: true, stylingMode: "primary", iconPosition: 'start', tabsPosition: 'top', selectedIndex: activeTabIndex, onSelectedIndexChange: handleSelectedIndexChange, children: tabItems.map((tabItem, index) => (_jsx(Item, { title: tabItem.title, tabRender: () => (_jsxs(StyledTabItem, { "$isSelected": activeTabIndex === index, "$activeGradient": getAppModuleGradient(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER), children: [_jsx("span", { children: tabItem.title }), tabItem.errorCount !== undefined && tabItem.errorCount > 0 && (_jsx(TMTooltip, { content: _jsxs("div", { style: {
757
+ return (_jsx(TMTabControl, { variant: 'moduleFilled', contentAnimation: 'none', swipeEnabled: false, selectedId: String(activeTabIndex), onSelectedIdChange: (id) => handleSelectedIndexChange(Number(id)), style: { width: '100%', height: '100%' }, children: tabItems.map((tabItem, index) => (_jsx(TMTabPanel, { id: String(index), label: _jsxs(_Fragment, { children: [_jsx("span", { children: tabItem.title }), tabItem.errorCount !== undefined && tabItem.errorCount > 0 && (_jsx(TMTooltip, { content: _jsxs("div", { style: {
758
758
  minWidth: '240px',
759
759
  padding: '14px',
760
760
  borderRadius: '10px',
@@ -787,5 +787,5 @@ const TMLayoutTabPanel = React.memo(({ tabItems }) => {
787
787
  fontSize: '0.85em',
788
788
  color: '#7f1d1d',
789
789
  lineHeight: 1.4
790
- }, children: error.message })] }, idx))) })] }), children: _jsx(StyledErrorBadge, { children: tabItem.errorCount > 99 ? '99+' : tabItem.errorCount }) }))] })), children: _jsx("div", { style: { width: '100%', overflowX: 'auto' }, children: _jsx("div", { style: { minWidth: 'max-content' }, children: tabItem.content }) }) }, `tab-${tabItem.layoutItemID}`))) }));
790
+ }, children: error.message })] }, idx))) })] }), children: _jsx(StyledErrorBadge, { children: tabItem.errorCount > 99 ? '99+' : tabItem.errorCount }) }))] }), children: _jsx("div", { style: { width: '100%', overflowX: 'auto' }, children: _jsx("div", { style: { minWidth: 'max-content' }, children: tabItem.content }) }) }, `tab-${tabItem.layoutItemID}`))) }));
791
791
  });
@@ -54,8 +54,8 @@ const StyledradioButtonLabel = styled.label `
54
54
  `;
55
55
  const TMRadioButton = ({ isModifiedWhen, flexBase = 1, elementStyle, label, value, fontSize = FontSize.defaultFontSize, dataSource = [], direction = 'row', onValueChanged, disabled = false }) => {
56
56
  const renderedRadioButtons = () => {
57
- return (_jsx(StyledRadioButtonWrapper, { "$direction": direction, children: dataSource.map((data, index) => (_jsxs(StyledRadioButtoncontainer, { children: [_jsx(StyledRadioButton, { "$disabled": disabled, tabIndex: -1, name: makeID(8), checked: value === data.value ? true : false, onChange: () => onValueChanged(data.value), disabled: disabled, type: 'radio' }), _jsxs(StyledradioButtonLabel, { tabIndex: 0, onKeyDown: (e) => e.code === 'Space' && onValueChanged(data.value), onClick: () => onValueChanged(data.value), "$isModifiedWhen": isModifiedWhen, "$fontSize": fontSize, "$disabled": disabled, children: [" ", data.display, " "] })] }, index))) }));
57
+ return (_jsx(StyledRadioButtonWrapper, { $direction: direction, children: dataSource.map((data, index) => (_jsxs(StyledRadioButtoncontainer, { children: [_jsx(StyledRadioButton, { $disabled: disabled, tabIndex: -1, name: makeID(8), checked: value === data.value ? true : false, onChange: () => onValueChanged(data.value), disabled: disabled, type: 'radio' }), _jsxs(StyledradioButtonLabel, { tabIndex: 0, onKeyDown: (e) => e.code === 'Space' && onValueChanged(data.value), onClick: () => onValueChanged(data.value), $isModifiedWhen: isModifiedWhen, $fontSize: fontSize, $disabled: disabled, children: [" ", data.display, " "] })] }, index))) }));
58
58
  };
59
- return (_jsx("div", { style: elementStyle, children: _jsxs(StyledWrapper, { "$isModifiedWhen": isModifiedWhen, "$direction": direction, "$disabled": disabled, "$fontSize": fontSize, style: { display: 'flex', flexDirection: direction, alignItems: direction === 'row' ? 'center' : 'flex-start', fontSize: fontSize, gap: direction === 'row' ? '20px' : "10px" }, children: [label && _jsx(StyledRadioGroupLabel, { "$flexBase": flexBase, children: label }), _jsx(StyledRadioGroupContainer, { "$flexBase": flexBase, children: renderedRadioButtons() })] }) }));
59
+ return (_jsx("div", { style: elementStyle, children: _jsxs(StyledWrapper, { $isModifiedWhen: isModifiedWhen, $direction: direction, $disabled: disabled, $fontSize: fontSize, style: { display: 'flex', flexDirection: direction, alignItems: direction === 'row' ? 'center' : 'flex-start', fontSize: fontSize, gap: direction === 'row' ? '20px' : "10px" }, children: [label && _jsx(StyledRadioGroupLabel, { $flexBase: flexBase, children: label }), _jsx(StyledRadioGroupContainer, { $flexBase: flexBase, children: renderedRadioButtons() })] }) }));
60
60
  };
61
61
  export default TMRadioButton;
@@ -61,7 +61,7 @@ const TMSummary = forwardRef(({ placeHolder, readOnly, labelColor, hasValue, bor
61
61
  onClearClick?.();
62
62
  };
63
63
  const renderTemplateField = () => {
64
- return (_jsxs(StyledSummaryTemplateInput, { ref: summaryElementRef, "$readOnly": readOnly, tabIndex: 0, "$backgroundColor": backgroundColor, "$borderRadius": borderRadius, "$isModified": isModifiedWhen, "$vil": validationItems, "$disabled": disabled, "$showBorder": showBorder, "$fontSize": fontSize, "$width": width, "$height": height, onChange: onValueChanged, children: [_jsx("div", { onClick: () => { if (openEditorOnSummaryClick && !disabled)
64
+ return (_jsxs(StyledSummaryTemplateInput, { ref: summaryElementRef, $readOnly: readOnly, tabIndex: 0, $backgroundColor: backgroundColor, $borderRadius: borderRadius, $isModified: isModifiedWhen, $vil: validationItems, $disabled: disabled, $showBorder: showBorder, $fontSize: fontSize, $width: width, $height: height, onChange: onValueChanged, children: [_jsx("div", { onClick: () => { if (openEditorOnSummaryClick && !disabled)
65
65
  onEditorClick?.(); }, onDoubleClick: () => { if (!openEditorOnSummaryClick && !disabled)
66
66
  onEditorClick?.(); }, style: {
67
67
  display: 'flex',
@@ -82,10 +82,10 @@ const TMSummary = forwardRef(({ placeHolder, readOnly, labelColor, hasValue, bor
82
82
  })] })] }));
83
83
  };
84
84
  const renderLabel = () => {
85
- return (_jsx(StyledEditorLabel, { "$color": labelColor, "$isFocused": false, "$labelPosition": labelPosition, "$disabled": disabled, children: _jsx("div", { style: { flexDirection: "row", display: "flex", alignItems: "start", justifyContent: "start" }, children: label }) }));
85
+ return (_jsx(StyledEditorLabel, { $color: labelColor, $isFocused: false, $labelPosition: labelPosition, $disabled: disabled, children: _jsx("div", { style: { flexDirection: "row", display: "flex", alignItems: "start", justifyContent: "start" }, children: label }) }));
86
86
  };
87
87
  const renderSummary = () => {
88
- return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: icon && _jsx(StyledEditorIcon, { "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { "$width": width, children: [label && renderLabel(), renderTemplateField(), _jsx(TMVilViewer, { vil: validationItems })] }) })] }));
88
+ return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: icon && _jsx(StyledEditorIcon, { $disabled: disabled, $vil: validationItems, $isModified: isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { $width: width, children: [label && renderLabel(), renderTemplateField(), _jsx(TMVilViewer, { vil: validationItems })] }) })] }));
89
89
  };
90
90
  return (_jsx("div", { style: elementStyle, children: renderSummary() }));
91
91
  });
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useRef, useId } from 'react';
3
3
  import { StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, StyledTextareaEditor } from './TMEditorStyled';
4
4
  import { FontSize, TMColors } from '../../utils/theme';
@@ -160,7 +160,7 @@ const TMTextArea = (props) => {
160
160
  newValue = newValue.toUpperCase();
161
161
  setCurrentValue(newValue);
162
162
  onValueChanged?.({ ...e, target: { ...e.target, value: newValue } });
163
- }, "$isMobile": deviceType === DeviceType.MOBILE, "$maxHeight": maxHeight, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$width": width, "$resize": resize, style: fillHeight ? { flex: 1, height: 0 } : undefined }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'absolute', right: '6px', top: '50%', transform: 'translateY(-50%)', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [formulaItems.length > 0 &&
163
+ }, $isMobile: deviceType === DeviceType.MOBILE, $maxHeight: maxHeight, $disabled: disabled, $vil: validationItems, $isModified: isModifiedWhen, $fontSize: fontSize, $width: width, $resize: resize, style: fillHeight ? { flex: 1, height: 0 } : undefined }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'absolute', right: '6px', top: '50%', transform: 'translateY(-50%)', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [formulaItems.length > 0 &&
164
164
  _jsx(StyledTextAreaEditorButton, { onClick: () => {
165
165
  setShowFormulaItemsChooser(true);
166
166
  }, children: _jsx(IconDataList, {}) }), showClearButton && currentValue &&
@@ -181,7 +181,7 @@ const TMTextArea = (props) => {
181
181
  };
182
182
  // Layout for the textarea with a left-aligned label
183
183
  const renderedLeftLabelTextArea = () => {
184
- return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { "$width": width, style: fillHeight ? { height: '100%', display: 'flex', flexDirection: 'column' } : {}, children: [label && _jsx(StyledEditorLabel, { "$isFocused": isFocused, "$labelPosition": labelPosition, "$disabled": disabled, children: label ?? '' }), renderTextArea()] }) })] }));
184
+ return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { $disabled: disabled, $vil: validationItems, $isModified: isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { $width: width, style: fillHeight ? { height: '100%', display: 'flex', flexDirection: 'column' } : {}, children: [label && _jsx(StyledEditorLabel, { $isFocused: isFocused, $labelPosition: labelPosition, $disabled: disabled, children: label ?? '' }), renderTextArea()] }) })] }));
185
185
  };
186
186
  return (_jsx("div", { style: { ...elementStyle, ...(fillHeight ? { height: '100%' } : {}) }, children: renderedLeftLabelTextArea() }));
187
187
  };
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useRef } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { StyledEditor, StyledEditorContainer, StyledEditorIcon, StyledEditorLabel, editorColorManager } from './TMEditorStyled';
@@ -303,7 +303,7 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
303
303
  e.preventDefault();
304
304
  }
305
305
  onKeyDown?.(e);
306
- }, "$isMobile": deviceType === DeviceType.MOBILE, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, "$fontSize": fontSize, "$maxValue": maxValue, "$width": width, "$type": currentType, "$borderRadius": borderRadius, style: { paddingLeft: `${calculateLeftPadding()}px`, paddingRight: `${calculateRightPadding()}px`, cursor: onClick ? 'pointer' : undefined } }), (initialType === 'password' || initialType === 'secureText') && _jsx(StyledShowPasswordIcon, { onClick: toggleShowPassword, "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: showPasswordIcon() }), (formulaItems.length > 0 || (showClearButton && currentValue) || buttons.length > 0) &&
306
+ }, $isMobile: deviceType === DeviceType.MOBILE, $disabled: disabled, $vil: validationItems, $isModified: isModifiedWhen, $fontSize: fontSize, $maxValue: maxValue, $width: width, $type: currentType, $borderRadius: borderRadius, style: { paddingLeft: `${calculateLeftPadding()}px`, paddingRight: `${calculateRightPadding()}px`, cursor: onClick ? 'pointer' : undefined } }), (initialType === 'password' || initialType === 'secureText') && _jsx(StyledShowPasswordIcon, { onClick: toggleShowPassword, $disabled: disabled, $vil: validationItems, $isModified: isModifiedWhen, children: showPasswordIcon() }), (formulaItems.length > 0 || (showClearButton && currentValue) || buttons.length > 0) &&
307
307
  _jsxs("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'absolute', right: type === 'number' ? '25px' : (initialType === 'password' ? '34px' : '6px'), top: '50%', transform: 'translateY(-50%)', pointerEvents: disabled ? 'none' : 'auto', opacity: disabled ? 0.4 : 1 }, children: [formulaItems.length > 0 &&
308
308
  _jsx(StyledTextBoxEditorButton, { onClick: () => {
309
309
  setShowFormulaItemsChooser(true);
@@ -313,7 +313,7 @@ const TMTextBox = ({ autoComplete = 'off', autoFocus, maxLength, labelColor, pre
313
313
  })] }), openFormulaItemsChooser(), formulaItems.length > 0 && (_jsx(TMContextMenu, { items: formulaMenuItems, target: `#text-${id}` }))] }), _jsx(TMVilViewer, { vil: validationItems })] }) }));
314
314
  };
315
315
  const renderedLeftLabelTextBox = () => {
316
- return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { "$disabled": disabled, "$vil": validationItems, "$isModified": isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { "$width": width, children: [label && _jsx(StyledEditorLabel, { "$color": labelColor, "$isFocused": isFocused, "$labelPosition": labelPosition, "$disabled": disabled, children: label }), renderInputField()] }) })] }));
316
+ return (_jsxs(TMLayoutContainer, { direction: 'horizontal', children: [icon && _jsx(TMLayoutItem, { width: '20px', children: _jsx(StyledEditorIcon, { $disabled: disabled, $vil: validationItems, $isModified: isModifiedWhen, children: icon }) }), _jsx(TMLayoutItem, { children: _jsxs(StyledEditorContainer, { $width: width, children: [label && _jsx(StyledEditorLabel, { $color: labelColor, $isFocused: isFocused, $labelPosition: labelPosition, $disabled: disabled, children: label }), renderInputField()] }) })] }));
317
317
  };
318
318
  return (_jsx("div", { style: elementStyle, children: renderedLeftLabelTextBox() }));
319
319
  };
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from 'react';
3
3
  import { IconClear, IconColumns, SDKUI_Localizator, stringIsNullOrEmpty } from '../../helper';
4
4
  import { TMMetadataChooserForm } from '../choosers/TMMetadataChooser';
@@ -22,12 +22,17 @@ const TMArchive = ({ onDcmtTypeSelect = undefined, inputTID, inputFile = null, c
22
22
  const pendingMidsRef = React.useRef(null);
23
23
  const deviceType = useDeviceType();
24
24
  useEffect(() => { setMruTIDs(SDKUI_Globals.userSettings.archivingSettings.mruTIDs); }, []);
25
+ // Applica inputTID solo quando cambia davvero: non deve sovrascrivere il tipo documento
26
+ // selezionato dall'utente.
25
27
  useEffect(() => {
26
28
  if (!inputTID)
27
29
  return;
28
30
  setCurrentTID(inputTID);
29
- setCurrentMruTID(mruTIDs.includes(inputTID) ? inputTID : 0);
30
- }, [inputTID, mruTIDs]);
31
+ }, [inputTID]);
32
+ // Evidenzia la scorciatoia del tipo documento corrente, anche quando mruTIDs cambia.
33
+ useEffect(() => {
34
+ setCurrentMruTID(currentTID && mruTIDs.includes(currentTID) ? currentTID : 0);
35
+ }, [currentTID, mruTIDs]);
31
36
  useEffect(() => {
32
37
  pendingMidsRef.current = inputMids;
33
38
  if (currentTID && currentTID > 0 && inputMids && inputMids.length > 0) {