@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
@@ -0,0 +1,320 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import ReactDOM from 'react-dom/client';
3
+ import { SDKUI_Localizator } from '../../../helper';
4
+ import TMWaitPanelView from './TMWaitPanelView';
5
+ const Z_INDEX_BASE = 2147483601;
6
+ const RESOLVED = Promise.resolve();
7
+ const pad2 = (n) => (n < 10 ? '0' + n : String(n));
8
+ /** Formatta una durata in millisecondi come "42s", "3m 07s", "1h 12m". */
9
+ const formatDuration = (ms) => {
10
+ const totalSeconds = Math.max(0, Math.round(ms / 1000));
11
+ if (totalSeconds < 60)
12
+ return `${totalSeconds}s`;
13
+ const totalMinutes = Math.floor(totalSeconds / 60);
14
+ if (totalMinutes < 60)
15
+ return `${totalMinutes}m ${pad2(totalSeconds % 60)}s`;
16
+ return `${Math.floor(totalMinutes / 60)}h ${pad2(totalMinutes % 60)}m`;
17
+ };
18
+ class TMWaitPanelInstance {
19
+ constructor(options, zIndex) {
20
+ this.abortController = new AbortController();
21
+ this.nodes = null;
22
+ this.closed = false;
23
+ this.elapsedLabel = SDKUI_Localizator.Elapsed;
24
+ this.remainingLabel = SDKUI_Localizator.Remaining;
25
+ // Pausa in attesa della conferma di interruzione.
26
+ this._paused = false;
27
+ this.pauseGate = null;
28
+ this.resolvePauseGate = null;
29
+ this.pausedTotalMs = 0;
30
+ this.pauseStartedAt = 0;
31
+ this.startTime = performance.now();
32
+ this.rafId = 0;
33
+ this._value = 0;
34
+ this._max = 0;
35
+ this._ok = 0;
36
+ this._warning = 0;
37
+ this._error = 0;
38
+ this._secondaryValue = 0;
39
+ this._secondaryMax = 0;
40
+ // Ultimi valori scritti sul DOM: servono a non riscrivere testo identico.
41
+ this.lastPercentText = '';
42
+ this.lastSubtitleText = '';
43
+ this.lastElapsedText = '';
44
+ this.lastRemainingText = '';
45
+ this.lastOk = 0;
46
+ this.lastWarning = 0;
47
+ this.lastError = 0;
48
+ this.lastTitleText = '';
49
+ this.lastSecondaryPercentText = '';
50
+ this.lastSecondaryText = '';
51
+ this.waitWhilePaused = () => this.pauseGate ?? RESOLVED;
52
+ this.step = (delta = 1) => { this._value += delta; this.schedule(); return this.pauseGate ?? RESOLVED; };
53
+ this.setValue = (value) => { this._value = value; this.schedule(); };
54
+ this.setMax = (max) => { this._max = max; this.schedule(); };
55
+ this.setTitle = (title) => { this._title = title; this.schedule(); };
56
+ this.setSubtitle = (subtitle) => { this._subtitleOverride = subtitle; this.schedule(); };
57
+ this.ok = (delta = 1) => { this._ok += delta; this.schedule(); };
58
+ this.warning = (delta = 1) => { this._warning += delta; this.schedule(); };
59
+ this.error = (delta = 1) => { this._error += delta; this.schedule(); };
60
+ this.setSecondary = (patch) => {
61
+ if (patch.value !== undefined)
62
+ this._secondaryValue = patch.value;
63
+ if (patch.max !== undefined)
64
+ this._secondaryMax = patch.max;
65
+ if (patch.text !== undefined)
66
+ this._secondaryText = patch.text;
67
+ this.schedule();
68
+ };
69
+ this.update = (patch) => {
70
+ if (patch.title !== undefined)
71
+ this._title = patch.title;
72
+ if (patch.subtitle !== undefined)
73
+ this._subtitleOverride = patch.subtitle;
74
+ if (patch.value !== undefined)
75
+ this._value = patch.value;
76
+ if (patch.max !== undefined)
77
+ this._max = patch.max;
78
+ if (patch.ok !== undefined)
79
+ this._ok = patch.ok;
80
+ if (patch.warning !== undefined)
81
+ this._warning = patch.warning;
82
+ if (patch.error !== undefined)
83
+ this._error = patch.error;
84
+ this.schedule();
85
+ };
86
+ this.close = () => {
87
+ if (this.closed)
88
+ return;
89
+ this.closed = true;
90
+ // Sblocca un loop eventualmente fermo in attesa della conferma.
91
+ this.resume();
92
+ if (this.rafId) {
93
+ cancelAnimationFrame(this.rafId);
94
+ this.rafId = 0;
95
+ }
96
+ if (this.tickerId !== undefined) {
97
+ clearInterval(this.tickerId);
98
+ this.tickerId = undefined;
99
+ }
100
+ document.removeEventListener('keydown', this.handleKeyDown, true);
101
+ // Smonto fuori dal render corrente: close() puo' arrivare durante un render.
102
+ this.container.style.display = 'none';
103
+ const root = this.root;
104
+ const container = this.container;
105
+ setTimeout(() => { root.unmount(); container.remove(); }, 0);
106
+ TMWaitPanelManager._unregister(this);
107
+ };
108
+ // #endregion
109
+ this.handleMount = (nodes) => {
110
+ if (this.closed)
111
+ return;
112
+ this.nodes = nodes;
113
+ // Il chiamante puo' aver gia' avanzato prima del montaggio.
114
+ this.flush();
115
+ };
116
+ this.handleKeyDown = (e) => {
117
+ if (this.closed)
118
+ return;
119
+ // Con la conferma aperta la tastiera risponde a lei: Esc = No, Invio = Si.
120
+ if (this._paused) {
121
+ if (e.key === 'Escape') {
122
+ e.preventDefault();
123
+ e.stopPropagation();
124
+ this.resume();
125
+ }
126
+ else if (e.key === 'Enter') {
127
+ e.preventDefault();
128
+ e.stopPropagation();
129
+ this.confirmAbort();
130
+ }
131
+ return;
132
+ }
133
+ if (e.key !== 'Escape')
134
+ return;
135
+ e.preventDefault();
136
+ e.stopPropagation();
137
+ this.handleAbort();
138
+ };
139
+ /** Interrompi non annulla subito: mette in pausa il loop e chiede conferma. */
140
+ this.handleAbort = () => {
141
+ if (this.closed || this.aborted || this._paused)
142
+ return;
143
+ this.pause();
144
+ };
145
+ /** Risposta Si: interrompe davvero e lascia ripartire il loop, che uscira' subito. */
146
+ this.confirmAbort = () => {
147
+ if (this.closed || this.aborted)
148
+ return;
149
+ this.abortController.abort();
150
+ const abortButton = this.nodes?.abortButton;
151
+ if (abortButton) {
152
+ abortButton.disabled = true;
153
+ abortButton.textContent = SDKUI_Localizator.Aborting;
154
+ }
155
+ this.options.onAbort?.();
156
+ this.resume();
157
+ };
158
+ /** Risposta No, oppure chiusura del pannello: sblocca il loop e riprende. */
159
+ this.resume = () => {
160
+ if (!this._paused)
161
+ return;
162
+ this._paused = false;
163
+ this.pausedTotalMs += performance.now() - this.pauseStartedAt;
164
+ if (this.nodes)
165
+ this.nodes.confirm.style.display = 'none';
166
+ const resolve = this.resolvePauseGate;
167
+ this.pauseGate = null;
168
+ this.resolvePauseGate = null;
169
+ resolve?.();
170
+ this.schedule();
171
+ };
172
+ /** Programma al massimo un flush per frame. E' l'unico costo pagato da `step()`. */
173
+ this.schedule = () => {
174
+ if (this.closed || this.rafId || !this.nodes)
175
+ return;
176
+ this.rafId = requestAnimationFrame(this.flush);
177
+ };
178
+ /** Riversa sul DOM lo stato corrente (barra, percentuale, testi, contatori), saltando cio' che non e' cambiato. */
179
+ this.flush = () => {
180
+ this.rafId = 0;
181
+ const nodes = this.nodes;
182
+ if (this.closed || !nodes)
183
+ return;
184
+ const ratio = this._max > 0 ? Math.min(1, Math.max(0, this._value / this._max)) : 0;
185
+ // scaleX invece di width: resta sul compositor, niente layout.
186
+ nodes.fill.style.transform = `scaleX(${ratio})`;
187
+ const percentText = `${(ratio * 100).toFixed(2)}%`;
188
+ if (percentText !== this.lastPercentText) {
189
+ this.lastPercentText = percentText;
190
+ nodes.percent.textContent = percentText;
191
+ }
192
+ if (this._title !== this.lastTitleText) {
193
+ this.lastTitleText = this._title;
194
+ nodes.title.textContent = this._title;
195
+ }
196
+ const subtitleText = this.computeSubtitle();
197
+ if (subtitleText !== this.lastSubtitleText) {
198
+ this.lastSubtitleText = subtitleText;
199
+ nodes.subtitle.textContent = subtitleText;
200
+ }
201
+ if (this._ok !== this.lastOk) {
202
+ this.lastOk = this._ok;
203
+ nodes.okValue.textContent = String(this._ok);
204
+ }
205
+ if (this._warning !== this.lastWarning) {
206
+ this.lastWarning = this._warning;
207
+ nodes.warningValue.textContent = String(this._warning);
208
+ }
209
+ if (this._error !== this.lastError) {
210
+ this.lastError = this._error;
211
+ nodes.errorValue.textContent = String(this._error);
212
+ }
213
+ if (nodes.secondaryFill)
214
+ this.flushSecondary(nodes);
215
+ if (this.options.showEta ?? true)
216
+ this.flushEta(nodes, ratio);
217
+ };
218
+ this.options = options;
219
+ this._max = options.max ?? 0;
220
+ this._title = options.title ?? '';
221
+ this._secondaryText = options.secondaryText ?? '';
222
+ this.lastTitleText = this._title;
223
+ this.lastSecondaryText = this._secondaryText;
224
+ this.lastSubtitleText = this.computeSubtitle();
225
+ this.container = document.createElement('div');
226
+ document.body.appendChild(this.container);
227
+ this.root = ReactDOM.createRoot(this.container);
228
+ this.root.render(_jsx(TMWaitPanelView, { title: this._title, subtitle: this.lastSubtitleText, cancelable: options.cancelable ?? false, showEta: options.showEta ?? true, showCounters: options.showCounters ?? true, showSecondary: options.showSecondary ?? false, secondaryText: this._secondaryText, primaryLabel: options.primaryLabel ?? '', secondaryLabel: options.secondaryLabel ?? '', zIndex: zIndex, onAbort: this.handleAbort, onConfirmYes: this.confirmAbort, onConfirmNo: this.resume, onMount: this.handleMount }));
229
+ if (options.cancelable ?? false)
230
+ document.addEventListener('keydown', this.handleKeyDown, true);
231
+ if (options.showEta ?? true)
232
+ this.tickerId = setInterval(this.schedule, 500);
233
+ }
234
+ // #region API pubblica
235
+ get aborted() { return this.abortController.signal.aborted; }
236
+ get signal() { return this.abortController.signal; }
237
+ get value() { return this._value; }
238
+ get max() { return this._max; }
239
+ get counters() { return { ok: this._ok, warning: this._warning, error: this._error }; }
240
+ get isOpen() { return !this.closed; }
241
+ get paused() { return this._paused; }
242
+ pause() {
243
+ if (this._paused)
244
+ return;
245
+ this._paused = true;
246
+ this.pauseStartedAt = performance.now();
247
+ this.pauseGate = new Promise(resolve => { this.resolvePauseGate = resolve; });
248
+ if (this.nodes)
249
+ this.nodes.confirm.style.display = 'flex';
250
+ }
251
+ computeSubtitle() {
252
+ if (this._subtitleOverride !== undefined)
253
+ return this._subtitleOverride;
254
+ const template = this.options.subtitleTemplate;
255
+ if (template)
256
+ return template.replace('{{0}}', String(this._value)).replace('{{1}}', String(this._max));
257
+ return this.options.subtitle ?? '';
258
+ }
259
+ /** Riversa sul DOM la seconda barra. Invocata solo quando la view l'ha renderizzata. */
260
+ flushSecondary(nodes) {
261
+ const ratio = this._secondaryMax > 0 ? Math.min(1, Math.max(0, this._secondaryValue / this._secondaryMax)) : 0;
262
+ nodes.secondaryFill.style.transform = `scaleX(${ratio})`;
263
+ const percentText = `${(ratio * 100).toFixed(2)}%`;
264
+ if (percentText !== this.lastSecondaryPercentText) {
265
+ this.lastSecondaryPercentText = percentText;
266
+ nodes.secondaryPercent.textContent = percentText;
267
+ }
268
+ if (this._secondaryText !== this.lastSecondaryText) {
269
+ this.lastSecondaryText = this._secondaryText;
270
+ nodes.secondaryText.textContent = this._secondaryText;
271
+ }
272
+ }
273
+ /** Aggiorna la riga dei tempi: trascorso al netto delle pause e stima del rimanente. */
274
+ flushEta(nodes, ratio) {
275
+ const pausedMs = this.pausedTotalMs + (this._paused ? performance.now() - this.pauseStartedAt : 0);
276
+ const elapsedMs = performance.now() - this.startTime - pausedMs;
277
+ const elapsedText = `${formatDuration(elapsedMs)} ${this.elapsedLabel}`;
278
+ if (elapsedText !== this.lastElapsedText) {
279
+ this.lastElapsedText = elapsedText;
280
+ nodes.elapsed.textContent = elapsedText;
281
+ }
282
+ // Sotto 1s la stima balla troppo.
283
+ let remainingText = '';
284
+ if (ratio > 0 && ratio < 1 && elapsedMs > 1000) {
285
+ remainingText = `${formatDuration(elapsedMs / ratio - elapsedMs)} ${this.remainingLabel}`;
286
+ }
287
+ if (remainingText !== this.lastRemainingText) {
288
+ this.lastRemainingText = remainingText;
289
+ nodes.remaining.textContent = remainingText;
290
+ }
291
+ }
292
+ }
293
+ export class TMWaitPanelManager {
294
+ /** Apre un wait panel e restituisce l'handle con cui pilotarlo. */
295
+ static show(options = {}) {
296
+ const panel = new TMWaitPanelInstance(options, Z_INDEX_BASE + this._panels.length);
297
+ this._panels.push(panel);
298
+ return panel;
299
+ }
300
+ /** Pannello aperto piu' recente, se presente. */
301
+ static get current() {
302
+ return this._panels[this._panels.length - 1];
303
+ }
304
+ /** True finche' almeno un wait panel e' aperto: flag "operazione massiva in corso" per i refresh periodici. */
305
+ static get isBusy() {
306
+ return this._panels.length > 0;
307
+ }
308
+ /** Chiude tutti i pannelli aperti (rete di sicurezza in caso di unmount della pagina). */
309
+ static closeAll() {
310
+ [...this._panels].forEach(panel => panel.close());
311
+ }
312
+ /** @internal */
313
+ static _unregister(panel) {
314
+ const index = this._panels.indexOf(panel);
315
+ if (index >= 0)
316
+ this._panels.splice(index, 1);
317
+ }
318
+ }
319
+ TMWaitPanelManager._panels = [];
320
+ export default TMWaitPanelManager;
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ /** Guscio statico del wait panel: montato una sola volta e mai ri-renderizzato, il manager lo aggiorna via DOM. Le props sono valori iniziali. */
3
+ /** Nodi DOM mutabili di cui il manager ha bisogno per aggiornare il pannello senza React. */
4
+ export interface ITMWaitPanelNodes {
5
+ /** Layer di conferma dell'interruzione: il manager lo accende via style.display. */
6
+ confirm: HTMLElement;
7
+ title: HTMLElement;
8
+ subtitle: HTMLElement;
9
+ percent: HTMLElement;
10
+ fill: HTMLElement;
11
+ elapsed: HTMLElement;
12
+ remaining: HTMLElement;
13
+ okValue: HTMLElement;
14
+ warningValue: HTMLElement;
15
+ errorValue: HTMLElement;
16
+ abortButton: HTMLButtonElement | null;
17
+ /** Presenti solo con `showSecondary`: riga di avanzamento dell'operazione di dettaglio. */
18
+ secondaryText: HTMLElement | null;
19
+ secondaryPercent: HTMLElement | null;
20
+ secondaryFill: HTMLElement | null;
21
+ }
22
+ export interface ITMWaitPanelViewProps {
23
+ /** Valore iniziale del titolo. */
24
+ title?: string;
25
+ /** Valore iniziale del sottotitolo. */
26
+ subtitle?: string;
27
+ /** Mostra il bottone di interruzione. */
28
+ cancelable?: boolean;
29
+ /** Mostra la riga "trascorsi / rimanenti". */
30
+ showEta?: boolean;
31
+ /** Mostra le tre pill numeriche ok / warning / error, sempre visibili anche a 0. */
32
+ showCounters?: boolean;
33
+ /** Riserva la seconda barra, quella dell'operazione di dettaglio (es. i byte del file in corso). */
34
+ showSecondary?: boolean;
35
+ /** Valore iniziale del testo della barra secondaria. */
36
+ secondaryText?: string;
37
+ /** Didascalia fissa sopra la barra principale, es. "Documenti". Vuota: non viene resa. */
38
+ primaryLabel?: string;
39
+ /** Didascalia fissa sopra la barra secondaria, es. "File corrente". Vuota: non viene resa. */
40
+ secondaryLabel?: string;
41
+ /** z-index dell'overlay: il manager lo incrementa per i pannelli annidati. */
42
+ zIndex?: number;
43
+ /** L'utente ha premuto Interrompi: il manager chiede conferma. */
44
+ onAbort?: () => void;
45
+ /** Conferma data: interrompere davvero. */
46
+ onConfirmYes?: () => void;
47
+ /** Conferma negata: riprendere. */
48
+ onConfirmNo?: () => void;
49
+ /** Invocato dopo il commit con i nodi DOM da aggiornare imperativamente. */
50
+ onMount?: (nodes: ITMWaitPanelNodes) => void;
51
+ }
52
+ declare const TMWaitPanelView: ({ title, subtitle, cancelable, showEta, showCounters, showSecondary, secondaryText, primaryLabel, secondaryLabel, zIndex, onAbort, onConfirmYes, onConfirmNo, onMount }: ITMWaitPanelViewProps) => React.JSX.Element;
53
+ export default TMWaitPanelView;
@@ -0,0 +1,274 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useLayoutEffect, useRef } from 'react';
3
+ import styled, { keyframes } from 'styled-components';
4
+ import toppy from '../../../assets/Toppy-generico.png';
5
+ import { AppModules, SDK_Globals } from '@topconsultnpm/sdk-ts';
6
+ import { getAppModuleButtonColors, SDKUI_Localizator } from '../../../helper';
7
+ import TMWaitPanelConfirm from './TMWaitPanelConfirm';
8
+ /** Colore della barra per applicazione, da getAppModuleButtonColors. SDK_Globals.tmSession lancia senza sessione. */
9
+ const getProgressColor = () => {
10
+ let appModuleID = AppModules.SURFER;
11
+ try {
12
+ appModuleID = SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER;
13
+ }
14
+ catch { /* nessuna sessione: resta il default */ }
15
+ return getAppModuleButtonColors(appModuleID).base;
16
+ };
17
+ const fadeIn = keyframes `
18
+ from { opacity: 0; }
19
+ to { opacity: 1; }
20
+ `;
21
+ // Sfondo su uno pseudo-elemento: il layer composito dell'animazione sgranerebbe Toppy.
22
+ const StyledOverlay = styled.div `
23
+ position: fixed;
24
+ inset: 0;
25
+ z-index: ${props => props.$zIndex};
26
+
27
+ &::before {
28
+ content: '';
29
+ position: absolute;
30
+ inset: 0;
31
+ background-color: rgba(17, 24, 39, 0.16);
32
+ animation: ${fadeIn} 140ms ease-out;
33
+ }
34
+ `;
35
+ const StyledCard = styled.div `
36
+ position: absolute;
37
+ top: 50%;
38
+ left: 50%;
39
+ transform: translate(-50%, -50%);
40
+ width: 420px;
41
+ max-width: calc(100% - 24px);
42
+ max-height: calc(100% - 24px);
43
+ overflow-y: auto;
44
+ box-sizing: border-box;
45
+ padding: 22px 24px 18px 24px;
46
+ background: #ffffff;
47
+ border-radius: 16px;
48
+ box-shadow: 0 18px 48px rgba(16, 24, 40, 0.22);
49
+ font-family: inherit;
50
+ `;
51
+ const StyledHeader = styled.div `
52
+ display: flex;
53
+ flex-direction: row;
54
+ align-items: center;
55
+ gap: 16px;
56
+ `;
57
+ // Ritaglio dal contenitore, non object-fit: cover darebbe un'altezza frazionaria e sgranerebbe l'immagine.
58
+ const StyledToppyClip = styled.div `
59
+ height: 61px;
60
+ width: 68px;
61
+ overflow: hidden;
62
+ flex: 0 0 auto;
63
+ `;
64
+ const StyledToppy = styled.img `
65
+ display: block;
66
+ width: 68px;
67
+ height: 79px;
68
+ user-select: none;
69
+ -webkit-user-drag: none;
70
+ `;
71
+ const StyledHeaderText = styled.div `
72
+ flex: 1;
73
+ min-width: 0;
74
+ `;
75
+ const StyledTitle = styled.div `
76
+ font-size: 17px;
77
+ font-weight: 600;
78
+ color: #1f2937;
79
+ line-height: 1.3;
80
+ overflow-wrap: anywhere;
81
+ `;
82
+ const StyledSubtitle = styled.div `
83
+ margin-top: 3px;
84
+ font-size: 13px;
85
+ color: #6b7280;
86
+ line-height: 1.3;
87
+ font-variant-numeric: tabular-nums;
88
+ overflow-wrap: anywhere;
89
+ `;
90
+ // Didascalia di una barra: con due avanzamenti e' l'unica cosa che dice quale sia quale.
91
+ const StyledBarLabel = styled.div `
92
+ margin-top: 18px;
93
+ font-size: 11px;
94
+ font-weight: 700;
95
+ letter-spacing: 0.04em;
96
+ text-transform: uppercase;
97
+ color: #9aa3b2;
98
+ overflow: hidden;
99
+ text-overflow: ellipsis;
100
+ white-space: nowrap;
101
+ `;
102
+ const StyledPercentRow = styled.div `
103
+ display: flex;
104
+ flex-direction: row;
105
+ align-items: flex-end;
106
+ justify-content: space-between;
107
+ flex-wrap: wrap;
108
+ gap: 8px 12px;
109
+ margin-top: ${props => (props.$hasLabel ? '4px' : '18px')};
110
+ `;
111
+ const StyledPercent = styled.div `
112
+ font-size: 34px;
113
+ font-weight: 700;
114
+ color: #111827;
115
+ line-height: 1;
116
+ font-variant-numeric: tabular-nums;
117
+ `;
118
+ const StyledCounters = styled.div `
119
+ display: flex;
120
+ flex-direction: row;
121
+ align-items: center;
122
+ gap: 6px;
123
+ padding-bottom: 3px;
124
+ `;
125
+ const StyledPill = styled.span `
126
+ display: inline-flex;
127
+ flex-direction: row;
128
+ align-items: center;
129
+ gap: 4px;
130
+ padding: 2px 8px 2px 6px;
131
+ border-radius: 999px;
132
+ font-size: 12px;
133
+ font-weight: 600;
134
+ line-height: 18px;
135
+ color: ${props => props.$color};
136
+ background: ${props => props.$background};
137
+ font-variant-numeric: tabular-nums;
138
+
139
+ svg { flex: 0 0 auto; }
140
+ `;
141
+ const StyledTrack = styled.div `
142
+ margin-top: 12px;
143
+ width: 100%;
144
+ height: 8px;
145
+ border-radius: 999px;
146
+ background: #e8edf4;
147
+ overflow: hidden;
148
+ `;
149
+ const StyledFill = styled.div `
150
+ width: 100%;
151
+ height: 100%;
152
+ background: ${props => props.$color};
153
+ transform: scaleX(0);
154
+ transform-origin: left center;
155
+ transition: transform 120ms linear;
156
+ will-change: transform;
157
+ `;
158
+ const StyledTimeRow = styled.div `
159
+ display: flex;
160
+ flex-direction: row;
161
+ align-items: center;
162
+ justify-content: space-between;
163
+ gap: 12px;
164
+ margin-top: 8px;
165
+ font-size: 12px;
166
+ color: #8a94a6;
167
+ font-variant-numeric: tabular-nums;
168
+ `;
169
+ // Seconda barra: come la principale ma piu' piccola e in tono minore.
170
+ const StyledSecondary = styled.div `
171
+ margin-top: ${props => (props.$hasLabel ? '4px' : '14px')};
172
+ `;
173
+ const StyledSecondaryRow = styled.div `
174
+ display: flex;
175
+ flex-direction: row;
176
+ align-items: baseline;
177
+ justify-content: space-between;
178
+ gap: 12px;
179
+ font-size: 12px;
180
+ color: #6b7280;
181
+ font-variant-numeric: tabular-nums;
182
+ `;
183
+ const StyledSecondaryText = styled.span `
184
+ overflow: hidden;
185
+ text-overflow: ellipsis;
186
+ white-space: nowrap;
187
+ `;
188
+ const StyledSecondaryTrack = styled.div `
189
+ margin-top: 5px;
190
+ width: 100%;
191
+ height: 5px;
192
+ border-radius: 999px;
193
+ background: #eef1f6;
194
+ overflow: hidden;
195
+ `;
196
+ const StyledSecondaryFill = styled.div `
197
+ width: 100%;
198
+ height: 100%;
199
+ background: ${props => props.$color};
200
+ opacity: 0.55;
201
+ transform: scaleX(0);
202
+ transform-origin: left center;
203
+ transition: transform 120ms linear;
204
+ will-change: transform;
205
+ `;
206
+ const StyledFooter = styled.div `
207
+ display: flex;
208
+ flex-direction: row;
209
+ justify-content: flex-end;
210
+ margin-top: 18px;
211
+ `;
212
+ const StyledAbortButton = styled.button `
213
+ padding: 9px 18px;
214
+ border: 1px solid #d5dbe5;
215
+ border-radius: 10px;
216
+ background: #ffffff;
217
+ color: #374151;
218
+ font-size: 13px;
219
+ font-family: inherit;
220
+ cursor: pointer;
221
+ transition: background-color 120ms ease, border-color 120ms ease;
222
+
223
+ &:hover:not(:disabled) { background: #f3f5f9; border-color: #c3cbd8; }
224
+ &:active:not(:disabled) { background: #e9edf4; }
225
+ &:disabled { cursor: default; opacity: 0.55; }
226
+ `;
227
+ const IconOk = () => (_jsx("svg", { width: '13', height: '13', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '3', strokeLinecap: 'round', strokeLinejoin: 'round', children: _jsx("polyline", { points: '20 6 9 17 4 12' }) }));
228
+ const IconWarning = () => (_jsxs("svg", { width: '13', height: '13', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2.4', strokeLinecap: 'round', strokeLinejoin: 'round', children: [_jsx("path", { d: 'M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z' }), _jsx("line", { x1: '12', y1: '9', x2: '12', y2: '13' }), _jsx("line", { x1: '12', y1: '17', x2: '12.01', y2: '17' })] }));
229
+ const IconError = () => (_jsxs("svg", { width: '13', height: '13', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '3', strokeLinecap: 'round', strokeLinejoin: 'round', children: [_jsx("line", { x1: '18', y1: '6', x2: '6', y2: '18' }), _jsx("line", { x1: '6', y1: '6', x2: '18', y2: '18' })] }));
230
+ const TMWaitPanelView = ({ title = '', subtitle = '', cancelable = false, showEta = true, showCounters = true, showSecondary = false, secondaryText = '', primaryLabel = '', secondaryLabel = '', zIndex = 2147483601, onAbort, onConfirmYes, onConfirmNo, onMount }) => {
231
+ const confirmRef = useRef(null);
232
+ const titleRef = useRef(null);
233
+ const subtitleRef = useRef(null);
234
+ const percentRef = useRef(null);
235
+ const fillRef = useRef(null);
236
+ const elapsedRef = useRef(null);
237
+ const remainingRef = useRef(null);
238
+ const okValueRef = useRef(null);
239
+ const warningValueRef = useRef(null);
240
+ const errorValueRef = useRef(null);
241
+ const abortRef = useRef(null);
242
+ const secondaryTextRef = useRef(null);
243
+ const secondaryPercentRef = useRef(null);
244
+ const secondaryFillRef = useRef(null);
245
+ useLayoutEffect(() => {
246
+ if (!confirmRef.current || !titleRef.current || !subtitleRef.current || !percentRef.current || !fillRef.current)
247
+ return;
248
+ if (!elapsedRef.current || !remainingRef.current)
249
+ return;
250
+ if (!okValueRef.current || !warningValueRef.current || !errorValueRef.current)
251
+ return;
252
+ onMount?.({
253
+ confirm: confirmRef.current,
254
+ title: titleRef.current,
255
+ subtitle: subtitleRef.current,
256
+ percent: percentRef.current,
257
+ fill: fillRef.current,
258
+ elapsed: elapsedRef.current,
259
+ remaining: remainingRef.current,
260
+ okValue: okValueRef.current,
261
+ warningValue: warningValueRef.current,
262
+ errorValue: errorValueRef.current,
263
+ abortButton: abortRef.current,
264
+ secondaryText: secondaryTextRef.current,
265
+ secondaryPercent: secondaryPercentRef.current,
266
+ secondaryFill: secondaryFillRef.current,
267
+ });
268
+ // Montaggio una tantum: da qui in avanti il manager aggiorna il pannello via DOM, non via render.
269
+ }, []);
270
+ return (_jsxs(_Fragment, { children: [_jsx(StyledOverlay, { $zIndex: zIndex, children: _jsxs(StyledCard, { role: 'dialog', "aria-live": 'polite', children: [_jsxs(StyledHeader, { children: [_jsx(StyledToppyClip, { children: _jsx(StyledToppy, { src: toppy, alt: '', draggable: false }) }), _jsxs(StyledHeaderText, { children: [_jsx(StyledTitle, { ref: titleRef, children: title }), _jsx(StyledSubtitle, { ref: subtitleRef, children: subtitle })] })] }), primaryLabel && _jsx(StyledBarLabel, { children: primaryLabel }), _jsxs(StyledPercentRow, { $hasLabel: !!primaryLabel, children: [_jsx(StyledPercent, { ref: percentRef, children: "0.00%" }), _jsxs(StyledCounters, { style: { display: showCounters ? 'flex' : 'none' }, children: [_jsxs(StyledPill, { $color: '#3E7B1C', $background: '#E8F5E0', children: [_jsx(IconOk, {}), _jsx("span", { ref: okValueRef, children: "0" })] }), _jsxs(StyledPill, { $color: '#8A6D00', $background: '#FBF3CF', children: [_jsx(IconWarning, {}), _jsx("span", { ref: warningValueRef, children: "0" })] }), _jsxs(StyledPill, { $color: '#B00F2B', $background: '#FBE1E6', children: [_jsx(IconError, {}), _jsx("span", { ref: errorValueRef, children: "0" })] })] })] }), _jsx(StyledTrack, { children: _jsx(StyledFill, { ref: fillRef, $color: getProgressColor() }) }), _jsxs(StyledTimeRow, { style: { visibility: showEta ? 'visible' : 'hidden' }, children: [_jsx("span", { ref: elapsedRef }), _jsx("span", { ref: remainingRef })] }), showSecondary && secondaryLabel && _jsx(StyledBarLabel, { children: secondaryLabel }), showSecondary &&
271
+ _jsxs(StyledSecondary, { $hasLabel: !!secondaryLabel, children: [_jsxs(StyledSecondaryRow, { children: [_jsx(StyledSecondaryText, { ref: secondaryTextRef, children: secondaryText }), _jsx("span", { ref: secondaryPercentRef, children: "0.00%" })] }), _jsx(StyledSecondaryTrack, { children: _jsx(StyledSecondaryFill, { ref: secondaryFillRef, $color: getProgressColor() }) })] }), cancelable &&
272
+ _jsx(StyledFooter, { children: _jsx(StyledAbortButton, { ref: abortRef, type: 'button', onClick: onAbort, children: SDKUI_Localizator.Abort }) })] }) }), _jsx(TMWaitPanelConfirm, { ref: confirmRef, zIndex: zIndex + 1, onYes: onConfirmYes, onNo: onConfirmNo })] }));
273
+ };
274
+ export default TMWaitPanelView;
@@ -0,0 +1 @@
1
+ export * from './TMWaitPanelManager';
@@ -0,0 +1 @@
1
+ export * from './TMWaitPanelManager';
@@ -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 } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { IconSearch, SDKUI_Localizator } from '../../helper';
@@ -64,7 +64,7 @@ const TMCultureIDPicker = ({ selectedValue, onSelectCultureID, placeHolder, widt
64
64
  const isPlaceholder = selectedValue === placeHolder;
65
65
  return (_jsxs(StyledDivHorizontal, { style: { width: '100%', color: isPlaceholder ? '#a9a9a9' : 'inherit' }, children: [selectedValue && _jsx("img", { src: getCultureIDImg(selectedValue), alt: "Lang", width: 16, height: 16, style: { marginRight: '8px' } }), selectedValue && _jsx("p", { children: getCultureIDName(selectedValue) })] }));
66
66
  };
67
- return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { width: width, icon: icon, buttons: buttons, readOnly: readOnly, backgroundColor: backgroundColor, showBorder: true, hasValue: selectedValue !== undefined, showClearButton: showClearButton, iconEditButton: _jsx(IconSearch, { fontSize: 16 }), onEditorClick: () => !readOnly && setShowPicker(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, openEditorOnSummaryClick: openChooserBySingleClick, template: renderTemplate(), onClearClick: showClearButton ? () => { onValueChanged?.([]); } : undefined, validationItems: validationItems }), showPicker && _jsx(TMModal, { title: label || SDKUI_Localizator.Select, onClose: () => setShowPicker(false), isModal: true, width: "450px", height: "255px", children: _jsx(PickerContainer, { children: _jsx(ItemsContainer, { children: CULTUREIDs_DATASOURCE.map(item => (_jsxs(CultureItem, { "$isSelected": item.value === selectedValue, onClick: () => {
67
+ return (_jsxs(_Fragment, { children: [_jsx(TMSummary, { width: width, icon: icon, buttons: buttons, readOnly: readOnly, backgroundColor: backgroundColor, showBorder: true, hasValue: selectedValue !== undefined, showClearButton: showClearButton, iconEditButton: _jsx(IconSearch, { fontSize: 16 }), onEditorClick: () => !readOnly && setShowPicker(true), elementStyle: elementStyle, isModifiedWhen: isModifiedWhen, label: label, openEditorOnSummaryClick: openChooserBySingleClick, template: renderTemplate(), onClearClick: showClearButton ? () => { onValueChanged?.([]); } : undefined, validationItems: validationItems }), showPicker && _jsx(TMModal, { title: label || SDKUI_Localizator.Select, onClose: () => setShowPicker(false), isModal: true, width: "450px", height: "255px", children: _jsx(PickerContainer, { children: _jsx(ItemsContainer, { children: CULTUREIDs_DATASOURCE.map(item => (_jsxs(CultureItem, { $isSelected: item.value === selectedValue, onClick: () => {
68
68
  onSelectCultureID(item.value);
69
69
  setShowPicker(false);
70
70
  }, children: [_jsx(FlagIcon, { children: item.icon }), _jsx("span", { children: item.display })] }, item.value))) }) }) })] }));
@@ -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, useMemo, useRef, useState } from 'react';
3
3
  import { SDK_Localizator, DataListCacheService } from '@topconsultnpm/sdk-ts';
4
4
  import { StyledDivHorizontal } from '../base/Styled';