@topconsultnpm/sdkui-react 6.20.0-dev1.11 → 6.20.0-dev1.111

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 (177) hide show
  1. package/lib/assets/Toppy-help-center.png +0 -0
  2. package/lib/assets/headergradient.svg +87 -0
  3. package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +285 -28
  4. package/lib/components/NewComponents/ContextMenu/hooks.d.ts +8 -1
  5. package/lib/components/NewComponents/ContextMenu/hooks.js +80 -8
  6. package/lib/components/NewComponents/ContextMenu/index.d.ts +3 -0
  7. package/lib/components/NewComponents/ContextMenu/index.js +2 -0
  8. package/lib/components/NewComponents/ContextMenu/styles.d.ts +9 -1
  9. package/lib/components/NewComponents/ContextMenu/styles.js +157 -37
  10. package/lib/components/NewComponents/ContextMenu/types.d.ts +14 -1
  11. package/lib/components/NewComponents/ContextMenu/useLongPress.d.ts +21 -0
  12. package/lib/components/NewComponents/ContextMenu/useLongPress.js +112 -0
  13. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +563 -112
  14. package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +21 -5
  15. package/lib/components/NewComponents/FloatingMenuBar/styles.js +210 -58
  16. package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +8 -2
  17. package/lib/components/base/TMAccordionNew.js +35 -14
  18. package/lib/components/base/TMCustomButton.js +61 -17
  19. package/lib/components/base/TMDataGrid.d.ts +7 -4
  20. package/lib/components/base/TMDataGrid.js +153 -11
  21. package/lib/components/base/TMDropDownMenu.js +19 -18
  22. package/lib/components/base/TMFileManager.d.ts +4 -3
  23. package/lib/components/base/TMFileManager.js +32 -24
  24. package/lib/components/base/TMFileManagerDataGridView.d.ts +3 -2
  25. package/lib/components/base/TMFileManagerDataGridView.js +1 -11
  26. package/lib/components/base/TMFileManagerThumbnailItems.d.ts +7 -1
  27. package/lib/components/base/TMFileManagerThumbnailItems.js +5 -2
  28. package/lib/components/base/TMFileManagerThumbnailsView.d.ts +17 -4
  29. package/lib/components/base/TMFileManagerThumbnailsView.js +18 -6
  30. package/lib/components/base/TMFileManagerUtils.d.ts +0 -12
  31. package/lib/components/base/TMListView.js +33 -15
  32. package/lib/components/base/TMPanel.d.ts +1 -1
  33. package/lib/components/base/TMPanel.js +1 -1
  34. package/lib/components/base/TMTreeView.d.ts +2 -1
  35. package/lib/components/base/TMTreeView.js +33 -26
  36. package/lib/components/choosers/TMDistinctValues.js +2 -2
  37. package/lib/components/choosers/TMInvoiceRetrieveFormats.js +1 -1
  38. package/lib/components/choosers/TMMetadataChooser.js +8 -1
  39. package/lib/components/choosers/TMOrderRetrieveFormats.js +1 -1
  40. package/lib/components/choosers/TMUserChooser.d.ts +0 -5
  41. package/lib/components/choosers/TMUserChooser.js +25 -45
  42. package/lib/components/editors/TMDateBox.js +18 -9
  43. package/lib/components/editors/TMLocalizedTextBox.d.ts +3 -1
  44. package/lib/components/editors/TMLocalizedTextBox.js +16 -14
  45. package/lib/components/editors/TMMetadataTextBox.d.ts +9 -0
  46. package/lib/components/editors/TMMetadataTextBox.js +92 -0
  47. package/lib/components/editors/TMMetadataValues.js +23 -5
  48. package/lib/components/editors/TMTextArea.js +18 -30
  49. package/lib/components/editors/TMTextBox.d.ts +1 -1
  50. package/lib/components/editors/TMTextBox.js +6 -3
  51. package/lib/components/editors/TMTextExpression.js +6 -91
  52. package/lib/components/features/archive/TMArchive.js +2 -2
  53. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +15 -0
  54. package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +460 -0
  55. package/lib/components/features/assistant/TMToppySpeechBubble.d.ts +11 -0
  56. package/lib/components/features/assistant/TMToppySpeechBubble.js +126 -0
  57. package/lib/components/features/documents/TMDcmtForm.d.ts +14 -2
  58. package/lib/components/features/documents/TMDcmtForm.js +457 -206
  59. package/lib/components/features/documents/TMDcmtPreview.js +44 -110
  60. package/lib/components/features/documents/TMDcmtTasks.js +9 -9
  61. package/lib/components/features/documents/TMMasterDetailDcmts.js +38 -53
  62. package/lib/components/features/documents/TMRelationViewer.d.ts +1 -1
  63. package/lib/components/features/documents/TMRelationViewer.js +2 -2
  64. package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +8 -0
  65. package/lib/components/features/search/{TMSearchResultCheckoutInfoForm.js → TMDcmtCheckoutInfoForm.js} +2 -2
  66. package/lib/components/features/search/TMSavedQuerySelector.js +72 -67
  67. package/lib/components/features/search/TMSearch.d.ts +3 -0
  68. package/lib/components/features/search/TMSearch.js +50 -11
  69. package/lib/components/features/search/TMSearchQueryPanel.d.ts +1 -0
  70. package/lib/components/features/search/TMSearchQueryPanel.js +29 -21
  71. package/lib/components/features/search/TMSearchResult.d.ts +3 -0
  72. package/lib/components/features/search/TMSearchResult.js +208 -250
  73. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +3 -3
  74. package/lib/components/features/search/TMSearchResultsMenuItems.js +205 -169
  75. package/lib/components/features/search/TMSignSettingsForm.js +1 -1
  76. package/lib/components/features/search/TMSignatureInfoContent.d.ts +6 -0
  77. package/lib/components/features/search/TMSignatureInfoContent.js +140 -0
  78. package/lib/components/features/search/TMViewHistoryDcmt.js +2 -2
  79. package/lib/components/features/tasks/TMTaskForm.js +20 -1
  80. package/lib/components/features/tasks/TMTasksAgenda.d.ts +3 -1
  81. package/lib/components/features/tasks/TMTasksAgenda.js +48 -9
  82. package/lib/components/features/tasks/TMTasksCalendar.d.ts +2 -0
  83. package/lib/components/features/tasks/TMTasksCalendar.js +19 -7
  84. package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -2
  85. package/lib/components/features/tasks/TMTasksUtils.js +43 -36
  86. package/lib/components/features/tasks/TMTasksView.js +28 -19
  87. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +33 -2
  88. package/lib/components/features/workflow/TMWorkflowPopup.js +139 -34
  89. package/lib/components/features/workflow/diagram/DiagramItemComponent.d.ts +2 -0
  90. package/lib/components/features/workflow/diagram/DiagramItemComponent.js +12 -7
  91. package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
  92. package/lib/components/features/workflow/diagram/RecipientList.js +3 -2
  93. package/lib/components/features/workflow/diagram/WFDiagram.d.ts +4 -0
  94. package/lib/components/features/workflow/diagram/WFDiagram.js +164 -13
  95. package/lib/components/forms/Login/LoginValidatorService.d.ts +2 -0
  96. package/lib/components/forms/Login/LoginValidatorService.js +7 -2
  97. package/lib/components/forms/Login/TMLoginForm.js +34 -6
  98. package/lib/components/forms/TMChooserForm.js +1 -1
  99. package/lib/components/grids/TMBlogsPost.js +56 -31
  100. package/lib/components/grids/TMRecentsManager.js +20 -10
  101. package/lib/components/index.d.ts +6 -3
  102. package/lib/components/index.js +6 -3
  103. package/lib/components/query/TMQueryEditor.d.ts +2 -1
  104. package/lib/components/query/TMQueryEditor.js +92 -92
  105. package/lib/components/settings/SettingsAppearance.d.ts +2 -1
  106. package/lib/components/settings/SettingsAppearance.js +99 -30
  107. package/lib/components/sidebar/TMHeader.js +7 -7
  108. package/lib/components/sidebar/TMSidebar.d.ts +0 -1
  109. package/lib/components/sidebar/TMSidebar.js +16 -44
  110. package/lib/components/sidebar/TMSidebarItem.js +34 -17
  111. package/lib/components/viewers/TMDataListItemViewer.d.ts +2 -1
  112. package/lib/components/viewers/TMDataListItemViewer.js +35 -71
  113. package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +8 -0
  114. package/lib/components/viewers/TMDataUserIdItemViewer.js +39 -0
  115. package/lib/css/tm-sdkui.css +1 -1
  116. package/lib/helper/SDKUI_Globals.d.ts +22 -0
  117. package/lib/helper/SDKUI_Globals.js +10 -1
  118. package/lib/helper/SDKUI_Localizator.d.ts +17 -1
  119. package/lib/helper/SDKUI_Localizator.js +167 -1
  120. package/lib/helper/TMCommandsContextMenu.d.ts +4 -2
  121. package/lib/helper/TMCommandsContextMenu.js +15 -4
  122. package/lib/helper/TMIcons.d.ts +4 -0
  123. package/lib/helper/TMIcons.js +13 -3
  124. package/lib/helper/TMPdfViewer.d.ts +8 -0
  125. package/lib/helper/TMPdfViewer.js +373 -0
  126. package/lib/helper/checkinCheckoutManager.d.ts +31 -1
  127. package/lib/helper/checkinCheckoutManager.js +112 -30
  128. package/lib/helper/devextremeCustomMessages.d.ts +30 -0
  129. package/lib/helper/devextremeCustomMessages.js +30 -0
  130. package/lib/helper/helpers.d.ts +28 -1
  131. package/lib/helper/helpers.js +130 -3
  132. package/lib/helper/index.d.ts +2 -0
  133. package/lib/helper/index.js +2 -0
  134. package/lib/helper/queryHelper.d.ts +1 -1
  135. package/lib/helper/queryHelper.js +33 -3
  136. package/lib/helper/workItemsHelper.d.ts +6 -0
  137. package/lib/helper/workItemsHelper.js +230 -0
  138. package/lib/hooks/useCheckInOutOperations.d.ts +28 -0
  139. package/lib/hooks/useCheckInOutOperations.js +223 -0
  140. package/lib/hooks/useDataListItem.d.ts +12 -0
  141. package/lib/hooks/useDataListItem.js +132 -0
  142. package/lib/hooks/useDataUserIdItem.d.ts +10 -0
  143. package/lib/hooks/useDataUserIdItem.js +96 -0
  144. package/lib/hooks/useMetadataExpression.d.ts +19 -0
  145. package/lib/hooks/useMetadataExpression.js +99 -0
  146. package/lib/hooks/useSettingsFeedback.d.ts +11 -0
  147. package/lib/hooks/useSettingsFeedback.js +38 -0
  148. package/lib/hooks/useWorkflowApprove.d.ts +4 -0
  149. package/lib/hooks/useWorkflowApprove.js +14 -1
  150. package/lib/index.d.ts +1 -0
  151. package/lib/index.js +3 -2
  152. package/lib/services/platform_services.d.ts +3 -3
  153. package/lib/ts/types.d.ts +61 -1
  154. package/lib/utils/theme.d.ts +1 -1
  155. package/lib/utils/theme.js +1 -1
  156. package/package.json +7 -4
  157. package/lib/components/NewComponents/Notification/Notification.d.ts +0 -4
  158. package/lib/components/NewComponents/Notification/Notification.js +0 -60
  159. package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +0 -8
  160. package/lib/components/NewComponents/Notification/NotificationContainer.js +0 -33
  161. package/lib/components/NewComponents/Notification/index.d.ts +0 -2
  162. package/lib/components/NewComponents/Notification/index.js +0 -2
  163. package/lib/components/NewComponents/Notification/styles.d.ts +0 -21
  164. package/lib/components/NewComponents/Notification/styles.js +0 -180
  165. package/lib/components/NewComponents/Notification/types.d.ts +0 -18
  166. package/lib/components/NewComponents/Notification/types.js +0 -1
  167. package/lib/components/base/TMContextMenu.d.ts +0 -25
  168. package/lib/components/base/TMContextMenu.js +0 -109
  169. package/lib/components/base/TMContextMenuOLD.d.ts +0 -26
  170. package/lib/components/base/TMContextMenuOLD.js +0 -56
  171. package/lib/components/base/TMFloatingToolbar.d.ts +0 -9
  172. package/lib/components/base/TMFloatingToolbar.js +0 -101
  173. package/lib/components/features/assistant/ToppyDraggableHelpCenter.d.ts +0 -30
  174. package/lib/components/features/assistant/ToppyDraggableHelpCenter.js +0 -482
  175. package/lib/components/features/assistant/ToppySpeechBubble.d.ts +0 -9
  176. package/lib/components/features/assistant/ToppySpeechBubble.js +0 -117
  177. package/lib/components/features/search/TMSearchResultCheckoutInfoForm.d.ts +0 -8
@@ -2,19 +2,20 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, FileFormats } from '@topconsultnpm/sdk-ts';
5
- import { extensionHandler, sleep, getExceptionMessage, formatBytes, IconMenuVertical, IconCloseCircle, IconClear, IconCloseOutline, IconPreview, SDKUI_Globals, IconZoomOutLinear, IconZoomInLinear, IconPrintOutline, SDKUI_Localizator, IconRefresh } from '../../../helper';
5
+ import { extensionHandler, sleep, getExceptionMessage, formatBytes, IconMenuVertical, IconCloseCircle, IconClear, IconCloseOutline, IconPreview, SDKUI_Globals, IconZoomOutLinear, IconZoomInLinear, IconPrintOutline, SDKUI_Localizator, IconRefresh, IconCache } from '../../../helper';
6
6
  import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
7
7
  import { FileExtensionHandler, FormModes } from '../../../ts';
8
8
  import { TMColors } from '../../../utils/theme';
9
9
  import ShowAlert from '../../base/TMAlert';
10
10
  import TMButton from '../../base/TMButton';
11
- import TMDropDownMenu from '../../base/TMDropDownMenu';
12
11
  import { TMExceptionBoxManager } from '../../base/TMPopUp';
13
12
  import { TMLayoutWaitingContainer } from '../../base/TMWaitPanel';
14
13
  import { TMSaveFormButtonPrevious, TMSaveFormButtonNext } from '../../forms/TMSaveForm';
15
14
  import { StyledAnimatedComponentOpacity } from '../../base/Styled';
16
15
  import TMPanel from '../../base/TMPanel';
17
16
  import TMTooltip from '../../base/TMTooltip';
17
+ import { ContextMenu } from '../../NewComponents/ContextMenu';
18
+ import TMPdfViewer from '../../../helper/TMPdfViewer';
18
19
  const ErrorContent = ({ error, isAbortError, onRetry }) => {
19
20
  if (isAbortError) {
20
21
  return (_jsx(StyledAnimatedComponentOpacity, { style: { width: '100%', height: '100%' }, children: _jsxs(StyledPanelStatusContainer, { children: [_jsx(IconCloseOutline, { fontSize: 92, color: TMColors.error }), _jsxs(StyledPreviewNotAvailable, { children: [_jsx("div", { children: error }), _jsx("div", { children: SDKUI_Localizator.PreviewNotAvailable })] }), _jsx(TMButton, { caption: SDKUI_Localizator.TryAgain, onClick: onRetry, showTooltip: false })] }) }));
@@ -106,8 +107,9 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
106
107
  extensionInfo = '';
107
108
  title += extensionInfo;
108
109
  title += dcmtData.fileSize && dcmtData.fileSize > 0 ? formatBytes(dcmtData.fileSize) + ')' : '';
109
- if ((isDcmtFileInCache(cacheKey) && isFromCache)) {
110
- title += ' | da cache';
110
+ const isCached = isDcmtFileInCache(cacheKey) && isFromCache;
111
+ if (isCached) {
112
+ return (_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '3px' }, children: [title, _jsx(TMTooltip, { content: "da cache", children: _jsx(IconCache, { fontSize: 13 }) })] }));
111
113
  }
112
114
  return title;
113
115
  };
@@ -124,10 +126,11 @@ const TMDcmtPreview = ({ dcmtData, isResizingActive, isVisible, canNext, canPrev
124
126
  console.error('Error reopening document:', error);
125
127
  }
126
128
  };
127
- return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsx(TMPanel, { padding: '0', title: titleHandler(), onClose: onClosePanel, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, toolbar: _jsxs("div", { style: { width: 'max-content', display: 'flex', alignItems: 'center', gap: '10px' }, children: [onPrev && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), onNext && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(StyledHeaderIcon, { "$color": TMColors.primaryColor, children: _jsx(TMDropDownMenu, { backgroundColor: 'white', borderRadius: '3px', content: _jsx(TMButton, { btnStyle: 'icon', caption: 'Altro', icon: _jsx(IconMenuVertical, {}), showTooltip: false }), items: [
128
- { icon: _jsx(IconCloseCircle, {}), text: SDKUI_Localizator.RemoveFromCache, onClick: () => { removeDcmtsFileCache(cacheKey); setIsFromCache(false); } },
129
- { icon: _jsx(IconClear, {}), text: SDKUI_Localizator.ClearCache, onClick: () => { clearDcmtsFileCache(); setIsFromCache(false); } },
130
- ] }, "btn13") }), _jsx(StyledHeaderIcon, { onClick: reOpenDcmt, "$color": TMColors.primaryColor, children: _jsx(TMTooltip, { content: SDKUI_Localizator.ReopenDocument, children: _jsx(IconRefresh, {}) }) })] }), children: error
129
+ const cacheMenuItems = useMemo(() => [
130
+ { icon: _jsx(IconCloseCircle, {}), name: SDKUI_Localizator.RemoveFromCache, onClick: () => { removeDcmtsFileCache(cacheKey); setIsFromCache(false); } },
131
+ { icon: _jsx(IconClear, {}), name: SDKUI_Localizator.ClearCache, onClick: () => { clearDcmtsFileCache(); setIsFromCache(false); } },
132
+ ], [cacheKey, removeDcmtsFileCache, clearDcmtsFileCache, setIsFromCache]);
133
+ return (_jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsx(TMPanel, { padding: '0', title: titleHandler(), onClose: onClosePanel, allowMaximize: allowMaximize, onMaximize: onMaximizePanel, onHeaderDoubleClick: onMaximizePanel, toolbar: _jsxs("div", { style: { width: 'max-content', display: 'flex', alignItems: 'center', gap: '10px' }, children: [onPrev && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), onNext && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(StyledHeaderIcon, { "$color": TMColors.primaryColor, children: _jsx(ContextMenu, { items: cacheMenuItems, trigger: "left", children: _jsx(IconMenuVertical, {}) }) }), _jsx(StyledHeaderIcon, { onClick: reOpenDcmt, "$color": TMColors.primaryColor, children: _jsx(TMTooltip, { content: SDKUI_Localizator.ReopenDocument, children: _jsx(IconRefresh, {}) }) })] }), children: error
131
134
  ? _jsx(ErrorContent, { error: error, isAbortError: isAbortError, onRetry: reOpenDcmt })
132
135
  : renderedPreview(dcmtData?.tid, dcmtData?.did, dcmtData?.fileExt, dcmtData?.fileSize, dcmtData?.fileCount, extensionHandler(dcmtData?.fileExt), showPreview, isResizingActive, () => { loadDocumentWithCache(); setShowPreview(true); }, dcmtBlob) }) }));
133
136
  };
@@ -136,40 +139,15 @@ export const TMFileViewer = ({ fileBlob, isResizingActive }) => {
136
139
  const [blobUrl, setBlobUrl] = useState(undefined);
137
140
  const [fileType, setFileType] = useState(undefined);
138
141
  const [formattedXml, setFormattedXml] = useState(undefined);
139
- const [isMobile, setIsMobile] = useState(false);
140
- useEffect(() => {
141
- const checkIsMobile = () => {
142
- const userAgent = navigator.userAgent || navigator.vendor || window.opera;
143
- // Only detect actual mobile/tablet devices, NOT desktop browsers
144
- const isMobileDevice =
145
- // Traditional mobile detection (phones and tablets)
146
- /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent) ||
147
- // Additional Android tablet detection (covers tablets in landscape)
148
- /android.*tablet|android.*mobile/i.test(userAgent) ||
149
- // Touch-only devices (excludes laptops with touchscreen)
150
- (('ontouchstart' in window || navigator.maxTouchPoints > 0) &&
151
- !/Windows NT|Macintosh|Linux/.test(userAgent)) ||
152
- // Small screen mobile devices only
153
- (window.screen.width <= 768 && /Mobi|Android/i.test(userAgent));
154
- setIsMobile(isMobileDevice);
155
- };
156
- checkIsMobile();
157
- // Listen for orientation changes (important for tablets)
158
- window.addEventListener('orientationchange', checkIsMobile);
159
- window.addEventListener('resize', checkIsMobile);
160
- return () => {
161
- window.removeEventListener('orientationchange', checkIsMobile);
162
- window.removeEventListener('resize', checkIsMobile);
163
- };
164
- }, []);
165
142
  useEffect(() => {
166
143
  if (fileBlob) {
167
- setFileType(fileBlob.type);
144
+ const blobType = fileBlob.type;
145
+ setFileType(blobType);
168
146
  setFormattedXml(undefined);
169
147
  const fileName = fileBlob.name || '';
170
148
  const fileExtension = fileName.split('.').pop()?.toLowerCase() || '';
171
- const isConfigFile = ['config', 'cfg'].includes(fileExtension);
172
- if (fileBlob.type.includes("xml") && !isConfigFile) {
149
+ const isTextBasedFile = ['config', 'cfg', 'sql'].includes(fileExtension);
150
+ if (fileBlob.type.includes("xml") && !isTextBasedFile) {
173
151
  fileBlob.text().then((text) => {
174
152
  const parser = new DOMParser();
175
153
  const xmlDoc = parser.parseFromString(text, "application/xml");
@@ -188,7 +166,7 @@ export const TMFileViewer = ({ fileBlob, isResizingActive }) => {
188
166
  });
189
167
  setBlobUrl(undefined);
190
168
  }
191
- else if (isConfigFile) {
169
+ else if (isTextBasedFile) {
192
170
  fileBlob.text().then((text) => {
193
171
  const escapedText = text
194
172
  .replace(/&/g, "&amp;")
@@ -222,79 +200,10 @@ export const TMFileViewer = ({ fileBlob, isResizingActive }) => {
222
200
  if (fileBlob.type.includes('image')) {
223
201
  return (_jsx(ImageViewer, { fileBlob: fileBlob, alt: '' }));
224
202
  }
225
- // if (fileType === 'application/pdf' && isMobile) {
226
- // return (
227
- // <object
228
- // key={blobUrl}
229
- // data={blobUrl}
230
- // type="application/pdf"
231
- // width="100%"
232
- // height="100%"
233
- // style={{
234
- // border: 'none',
235
- // zIndex: 0,
236
- // pointerEvents: isResizingActive === true ? "none" : "auto"
237
- // }}
238
- // >
239
- // {/* Fallback UI if <object> tag fails to render PDF */}
240
- // <div style={{
241
- // padding: '40px',
242
- // textAlign: 'center',
243
- // display: 'flex',
244
- // flexDirection: 'column',
245
- // alignItems: 'center',
246
- // justifyContent: 'center',
247
- // height: '100%',
248
- // gap: '20px'
249
- // }}>
250
- // <IconPreview fontSize={96} />
251
- // <div>
252
- // <h3>{SDKUI_Localizator.PDFDocument}</h3>
253
- // <p>{SDKUI_Localizator.PreviewNotAvailableOnDevice}</p>
254
- // </div>
255
- // <div style={{ display: 'flex', gap: '10px', flexWrap: 'wrap', alignItems: 'center', justifyContent: 'center' }}>
256
- // <a
257
- // href={blobUrl}
258
- // download="document.pdf"
259
- // style={{
260
- // minWidth: '180px',
261
- // padding: '12px 24px',
262
- // backgroundColor: TMColors.primaryColor,
263
- // color: 'white',
264
- // textDecoration: 'none',
265
- // borderRadius: '4px',
266
- // display: 'inline-block'
267
- // }}
268
- // >
269
- // {SDKUI_Localizator.DownloadFile}
270
- // </a>
271
- // <a
272
- // href={blobUrl}
273
- // target="_blank"
274
- // rel="noopener noreferrer"
275
- // style={{
276
- // minWidth: '180px',
277
- // padding: '12px 24px',
278
- // backgroundColor: TMColors.primaryColor,
279
- // color: 'white',
280
- // textDecoration: 'none',
281
- // borderRadius: '4px',
282
- // display: 'inline-block'
283
- // }}
284
- // >
285
- // {SDKUI_Localizator.OpenInNewTab}
286
- // </a>
287
- // </div>
288
- // </div>
289
- // </object>
290
- // );
291
- // }
292
- if (fileType === 'application/pdf' && isMobile) {
293
- return (_jsx("iframe", { src: blobUrl, title: "File Viewer", width: "100%", height: "100%", style: { border: 'none', zIndex: 0, pointerEvents: isResizingActive === true ? "none" : "auto" } }, blobUrl));
203
+ if (fileType === 'application/pdf') {
204
+ return _jsx(TMPdfViewer, { pdfBlob: fileBlob, isResizingActive: isResizingActive, enableFitToWidth: true });
294
205
  }
295
- return (_jsx("iframe", { srcDoc: formattedXml ? `<html><body>${formattedXml}</body></html>` : undefined, src: !formattedXml
296
- ? (fileType === 'application/pdf' ? `${blobUrl}#view=FitH&scrollbar=1` : blobUrl)
297
- : undefined, title: "File Viewer", width: "100%", height: "100%", style: { border: 'none', zIndex: 0, pointerEvents: isResizingActive === true ? "none" : "auto" } }, blobUrl));
206
+ return (_jsx("iframe", { srcDoc: formattedXml ? `<html><body>${formattedXml}</body></html>` : undefined, src: !formattedXml ? blobUrl : undefined, title: "File Viewer", width: "100%", height: "100%", style: { border: 'none', zIndex: 0, pointerEvents: isResizingActive === true ? "none" : "auto" } }, blobUrl));
298
207
  };
299
208
  const ImageViewer = ({ fileBlob, alt = 'Image', className }) => {
300
209
  const containerRef = useRef(null);
@@ -513,3 +422,28 @@ const StyledImage = styled.img.attrs(props => ({
513
422
  pointer-events: none;
514
423
  position: absolute;
515
424
  `;
425
+ const PDFViewerContainer = styled.div `
426
+ width: 100%;
427
+ height: 100%;
428
+ overflow-y: auto;
429
+ overflow-x: hidden;
430
+ background-color: #f5f5f5;
431
+
432
+ .react-pdf__Document {
433
+ display: flex;
434
+ flex-direction: column;
435
+ align-items: center;
436
+ gap: 10px;
437
+ padding: 10px 0;
438
+ }
439
+
440
+ .react-pdf__Page {
441
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
442
+ margin: 0 auto;
443
+ }
444
+
445
+ .react-pdf__Page__canvas {
446
+ max-width: 100%;
447
+ height: auto !important;
448
+ }
449
+ `;
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
- import { IconMenuVertical, IconRefresh, SDKUI_Localizator, svgToString, TMCommandsContextMenu } from "../../../helper";
3
+ import { IconMenuVertical, IconRefresh, SDKUI_Localizator, TMCommandsContextMenu } from "../../../helper";
4
4
  import { DeviceType, useDeviceType } from "../../base/TMDeviceProvider";
5
5
  import { useTMPanelManagerContext } from "../../layout/panelManager/TMPanelManagerContext";
6
6
  import TMPanel from "../../base/TMPanel";
@@ -12,13 +12,13 @@ const TMDcmtTasks = (props) => {
12
12
  // This avoids unnecessary re-renders by only recalculating when deviceType changes.
13
13
  let isMobile = useMemo(() => { return deviceType === DeviceType.MOBILE; }, [deviceType]);
14
14
  const { togglePanelVisibility, toggleMaximize, countVisibleLeafPanels } = useTMPanelManagerContext();
15
- const toolbar = useMemo(() => _jsxs(_Fragment, { children: [_jsx(IconMenuVertical, { id: "TMTaksPanel-Commands-Header", color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: '#TMTaksPanel-Commands-Header', showEvent: "click", menuItems: [
16
- {
17
- icon: svgToString(_jsx(IconRefresh, {})),
18
- onClick: async () => await getAllTasks(),
19
- text: SDKUI_Localizator.Refresh,
20
- },
21
- ] })] }), []);
15
+ const toolbar = useMemo(() => _jsx(TMCommandsContextMenu, { target: '#TMTaksPanel-Commands-Header', showEvent: "click", menuItems: [
16
+ {
17
+ icon: _jsx(IconRefresh, {}),
18
+ onClick: async () => await getAllTasks(),
19
+ text: SDKUI_Localizator.Refresh,
20
+ },
21
+ ], children: _jsx(IconMenuVertical, { id: "TMTaksPanel-Commands-Header", color: 'white', cursor: 'pointer' }) }), []);
22
22
  return _jsx("div", { style: { width: "100%", height: "100%", position: 'relative' }, children: _jsx(TMPanel, { title: SDKUI_Localizator.Widget_Activities, allowMaximize: !isMobile && countVisibleLeafPanels() > 1, onClose: countVisibleLeafPanels() > 1 ? () => togglePanelVisibility("tmDcmtTasks") : undefined, onMaximize: countVisibleLeafPanels() > 1 ? () => toggleMaximize("tmDcmtTasks") : undefined, toolbar: toolbar, children: _jsx(TMTasksPanelContent, { id: "dcmtTasks", taskContext: taskContext, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: () => { return Promise.resolve(); }, handleNavigateToDossiers: () => { return Promise.resolve(); }, afterTaskSaved: afterTaskSaved }) }) });
23
23
  };
24
24
  export default TMDcmtTasks;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useMemo, useState } from 'react';
3
3
  import { DcmtTypeListCacheService, SDK_Localizator } from '@topconsultnpm/sdk-ts';
4
- import { ContextMenu } from 'devextreme-react';
5
4
  import TMRelationViewer from './TMRelationViewer';
6
- import { genUniqueId, svgToString, IconMultipleSelection, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, IconMail, IconDcmtTypeOnlyMetadata, IconCopy, IconMenuVertical, IconDataList, IconPreview, IconSearchCheck, IconBoard, IconDcmtTypeSys, IconShow } from '../../../helper';
5
+ import TMContextMenu from '../../NewComponents/ContextMenu/TMContextMenu';
6
+ import { genUniqueId, IconMultipleSelection, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, IconMail, IconDcmtTypeOnlyMetadata, IconCopy, IconMenuVertical, IconDataList, IconPreview, IconSearchCheck, IconBoard, IconDcmtTypeSys, IconShow, getMoreInfoTasksForDocument } from '../../../helper';
7
7
  import { FormModes, SearchResultContext } from '../../../ts';
8
8
  import { TMColors } from '../../../utils/theme';
9
9
  import ShowAlert from '../../base/TMAlert';
@@ -46,120 +46,105 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
46
46
  }, []);
47
47
  const commandsMenuItems = [
48
48
  {
49
- icon: svgToString(_jsx(IconMultipleSelection, { color: allowMultipleSelection ? TMColors.tertiary : TMColors.text_normal })),
50
- text: "Selezione multipla",
51
- operationType: 'singleRow',
49
+ icon: _jsx(IconMultipleSelection, { color: allowMultipleSelection ? TMColors.tertiary : TMColors.text_normal }),
50
+ name: "Selezione multipla",
52
51
  onClick: () => {
53
52
  setAllowMultipleSelection(prev => !prev);
54
53
  }
55
54
  },
56
55
  {
57
- icon: svgToString(_jsx(IconCheckFile, {})),
58
- text: "Consenti dettagli con 0 documenti",
59
- operationType: 'singleRow',
56
+ icon: _jsx(IconCheckFile, {}),
57
+ name: "Consenti dettagli con 0 documenti",
60
58
  onClick: () => {
61
59
  setShowZeroDcmts(prev => !prev);
62
60
  }
63
61
  },
64
62
  {
65
- icon: svgToString(_jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' })),
66
- text: SDKUI_Localizator.DcmtsMaster,
67
- operationType: 'singleRow',
63
+ icon: _jsx(IconDetailDcmts, { transform: 'scale(-1, 1)' }),
64
+ name: SDKUI_Localizator.DcmtsMaster,
68
65
  disabled: !focusedItem?.isDcmt || !isForMaster,
69
66
  onClick: () => {
70
67
  appendMasterDcmts?.(focusedItem?.tid, focusedItem?.did);
71
68
  }
72
69
  },
73
70
  {
74
- icon: svgToString(_jsx(IconMail, {})),
75
- text: "Invia per posta",
76
- operationType: 'multiRow',
71
+ icon: _jsx(IconMail, {}),
72
+ name: "Invia per posta",
77
73
  disabled: false,
78
74
  beginGroup: true,
79
- items: [
75
+ submenu: [
80
76
  {
81
- icon: svgToString(_jsx(IconMail, {})),
82
- text: "I documenti selezionati",
83
- operationType: 'multiRow',
77
+ icon: _jsx(IconMail, {}),
78
+ name: "I documenti selezionati",
84
79
  disabled: false,
85
80
  onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
86
81
  },
87
82
  {
88
- icon: svgToString(_jsx(IconMail, {})),
89
- text: "I documenti di primo livello e tutti i documenti correlati",
90
- operationType: 'multiRow',
83
+ icon: _jsx(IconMail, {}),
84
+ name: "I documenti di primo livello e tutti i documenti correlati",
91
85
  disabled: false,
92
86
  onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
93
87
  },
94
88
  {
95
- icon: svgToString(_jsx(IconMail, {})),
96
- text: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
97
- operationType: 'multiRow',
89
+ icon: _jsx(IconMail, {}),
90
+ name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
98
91
  disabled: false,
99
92
  onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
100
93
  },
101
94
  ]
102
95
  },
103
96
  {
104
- icon: svgToString(_jsx(IconDcmtTypeOnlyMetadata, {})),
105
- text: "Unisci in un file PDF",
106
- operationType: 'multiRow',
97
+ icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
98
+ name: "Unisci in un file PDF",
107
99
  disabled: false,
108
- items: [
100
+ submenu: [
109
101
  {
110
- icon: svgToString(_jsx(IconDcmtTypeOnlyMetadata, {})),
111
- text: "I documenti selezionati",
112
- operationType: 'multiRow',
102
+ icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
103
+ name: "I documenti selezionati",
113
104
  disabled: false,
114
105
  onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
115
106
  },
116
107
  {
117
- icon: svgToString(_jsx(IconDcmtTypeOnlyMetadata, {})),
118
- text: "I documenti di primo livello e tutti i documenti correlati",
119
- operationType: 'multiRow',
108
+ icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
109
+ name: "I documenti di primo livello e tutti i documenti correlati",
120
110
  disabled: false,
121
111
  onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
122
112
  },
123
113
  {
124
- icon: svgToString(_jsx(IconDcmtTypeOnlyMetadata, {})),
125
- text: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
126
- operationType: 'multiRow',
114
+ icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
115
+ name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
127
116
  disabled: false,
128
117
  onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
129
118
  },
130
119
  ]
131
120
  },
132
121
  {
133
- icon: svgToString(_jsx(IconCopy, {})),
134
- text: "Copia in una cartella",
135
- operationType: 'multiRow',
122
+ icon: _jsx(IconCopy, {}),
123
+ name: "Copia in una cartella",
136
124
  disabled: false,
137
- items: [
125
+ submenu: [
138
126
  {
139
- icon: svgToString(_jsx(IconCopy, {})),
140
- text: "I documenti selezionati",
141
- operationType: 'multiRow',
127
+ icon: _jsx(IconCopy, {}),
128
+ name: "I documenti selezionati",
142
129
  disabled: false,
143
130
  onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
144
131
  },
145
132
  {
146
- icon: svgToString(_jsx(IconCopy, {})),
147
- text: "I documenti di primo livello e tutti i documenti correlati",
148
- operationType: 'multiRow',
133
+ icon: _jsx(IconCopy, {}),
134
+ name: "I documenti di primo livello e tutti i documenti correlati",
149
135
  disabled: false,
150
136
  onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
151
137
  },
152
138
  {
153
- icon: svgToString(_jsx(IconCopy, {})),
154
- text: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
155
- operationType: 'multiRow',
139
+ icon: _jsx(IconCopy, {}),
140
+ name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
156
141
  disabled: false,
157
142
  onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
158
143
  },
159
144
  ]
160
145
  }
161
146
  ];
162
- const toolbar = _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [allowMultipleSelection && _jsx("p", { style: { color: TMColors.colorHeader, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${selectedItems.length} selezionati` }), allowNavigation && canPrev != undefined && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), allowNavigation && canNext != undefined && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(IconMenuVertical, { id: `commands-detail-${id}`, color: 'white', cursor: 'pointer' }), _jsx(ContextMenu, { showEvent: 'click', dataSource: commandsMenuItems, target: `#commands-detail-${id}` })] });
147
+ const toolbar = _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [allowMultipleSelection && _jsx("p", { style: { color: TMColors.colorHeader, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${selectedItems.length} selezionati` }), allowNavigation && canPrev != undefined && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), allowNavigation && canNext != undefined && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(TMContextMenu, { items: commandsMenuItems, trigger: 'left', children: _jsx(IconMenuVertical, { color: 'white', cursor: 'pointer' }) })] });
163
148
  const getTitle = () => isForMaster ? `${SDKUI_Localizator.DcmtsMaster} - ${dtdMaster?.nameLoc}` : SDKUI_Localizator.DcmtsDetail;
164
149
  const isMobile = deviceType === DeviceType.MOBILE;
165
150
  const tmTreeView = useMemo(() => _jsx(_Fragment, { children: !inputDcmts || inputDcmts.length === 0
@@ -169,7 +154,7 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
169
154
  _jsx(TMRelationViewerWrapper, { inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, showZeroDcmts: showZeroDcmts,
170
155
  // customItemRender={customItemRender}
171
156
  allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: handleSelectedItemsChanged }) }), [inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, allowMultipleSelection, focusedItem, selectedItems, handleFocusedItemChanged, handleSelectedItemsChanged]);
172
- const tmFormOrResult = useMemo(() => _jsx(TMFormOrResultWrapper, { deviceType: deviceType, focusedItem: focusedItem, onTaskCreateRequest: onTaskCreateRequest, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [focusedItem, deviceType, allTasks]);
157
+ const tmFormOrResult = useMemo(() => _jsx(TMFormOrResultWrapper, { deviceType: deviceType, focusedItem: focusedItem, onTaskCreateRequest: onTaskCreateRequest, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [focusedItem, deviceType, allTasks, handleNavigateToWGs, handleNavigateToDossiers]);
173
158
  const initialPanelDimensions = {
174
159
  'tmTreeView': { width: '50%', height: '100%' },
175
160
  'tmFormOrResult': { width: '50%', height: '100%' },
@@ -281,7 +266,7 @@ const TMFormOrResultWrapper = ({ deviceType, focusedItem, onTaskCreateRequest, a
281
266
  return (_jsx(_Fragment, { children: focusedItem?.isDcmt ?
282
267
  _jsx(TMDcmtForm, { groupId: 'tmFormOrResult', TID: focusedItem?.tid, DID: focusedItem.did, allowButtonsRefs: true, isClosable: deviceType !== DeviceType.MOBILE, allowNavigation: false, allowRelations: deviceType !== DeviceType.MOBILE, showDcmtFormSidebar: false, onClose: () => {
283
268
  setPanelVisibilityById('tmTreeView', true);
284
- }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) :
269
+ }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, focusedItem?.tid, focusedItem?.did) }) :
285
270
  _jsx(TMSearchResult, { groupId: 'tmFormOrResult', isClosable: deviceType !== DeviceType.MOBILE, context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, allowRelations: false, openDcmtFormAsModal: true, searchResults: focusedItem?.searchResult ?? [], showSearchResultSidebar: false, onTaskCreateRequest: onTaskCreateRequest, onClose: () => {
286
271
  setPanelVisibilityById('tmTreeView', true);
287
272
  }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }));
@@ -65,7 +65,7 @@ export interface TMRelationViewerProps {
65
65
  /**
66
66
  * Show metadata names before values (default: false).
67
67
  * When true, displays "MetadataName: Value", otherwise just "Value".
68
- * Value rendering respects DataDomain (uses TMDataListItemViewer for lists, TMUserIdViewer for users, etc.)
68
+ * Value rendering respects DataDomain (uses TMDataListItemViewer for lists, TMDataUserIdItemViewer for users, etc.)
69
69
  */
70
70
  showMetadataNames?: boolean;
71
71
  /** Maximum depth level for recursive loading (default: 2) */
@@ -6,9 +6,9 @@ import { TMColors } from '../../../utils/theme';
6
6
  import { StyledDivHorizontal, StyledBadge } from '../../base/Styled';
7
7
  import TMTreeView from '../../base/TMTreeView';
8
8
  import { TMWaitPanel } from '../../base/TMWaitPanel';
9
- import { TMUserIdViewer } from '../../choosers/TMUserChooser';
10
9
  import TMDataListItemViewer from '../../viewers/TMDataListItemViewer';
11
10
  import TMDcmtIcon from './TMDcmtIcon';
11
+ import TMDataUserIdItemViewer from '../../viewers/TMDataUserIdItemViewer';
12
12
  /**
13
13
  * Check if document type has detail relations
14
14
  */
@@ -685,7 +685,7 @@ const TMRelationViewer = ({ inputDcmts, isForMaster = false, showCurrentDcmtIndi
685
685
  flexShrink: isLast ? 1 : 0,
686
686
  minWidth: isLast ? 0 : 'auto',
687
687
  overflow: isLast ? 'hidden' : 'visible'
688
- }, children: [index > 0 && _jsx("span", { style: { margin: '0 5px', color: '#999' }, children: "\u2022" }), showMetadataNames && (_jsxs("span", { style: { color: '#666', marginRight: '5px' }, children: [md?.name || key, ":"] })), md?.dataDomain === MetadataDataDomains.DataList ? (_jsx(TMDataListItemViewer, { dataListId: md.dataListID, viewMode: md.dataListViewMode, value: value })) : md?.dataDomain === MetadataDataDomains.UserID ? (_jsx(TMUserIdViewer, { userId: value, showIcon: true, noneSelectionText: '' })) : (_jsx("span", { style: {
688
+ }, children: [index > 0 && _jsx("span", { style: { margin: '0 5px', color: '#999' }, children: "\u2022" }), showMetadataNames && (_jsxs("span", { style: { color: '#666', marginRight: '5px' }, children: [md?.name || key, ":"] })), md?.dataDomain === MetadataDataDomains.DataList ? (_jsx(TMDataListItemViewer, { dataListId: md.dataListID, viewMode: md.dataListViewMode, value: value })) : md?.dataDomain === MetadataDataDomains.UserID ? (_jsx(TMDataUserIdItemViewer, { userId: value, showIcon: true })) : (_jsx("span", { style: {
689
689
  fontWeight: 500,
690
690
  overflow: isLast ? 'hidden' : 'visible',
691
691
  textOverflow: isLast ? 'ellipsis' : 'clip',
@@ -0,0 +1,8 @@
1
+ import { DcmtInfo } from "../../../ts";
2
+ interface TMDcmtCheckoutInfoFormProps {
3
+ dtdName: string;
4
+ selectedDcmtOrFocused: DcmtInfo;
5
+ onClose: () => void;
6
+ }
7
+ declare const TMDcmtCheckoutInfoForm: (props: TMDcmtCheckoutInfoFormProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default TMDcmtCheckoutInfoForm;
@@ -12,7 +12,7 @@ import TMTooltip from "../../base/TMTooltip";
12
12
  import TMTextBox from "../../editors/TMTextBox";
13
13
  import ShowAlert from "../../base/TMAlert";
14
14
  import { TMExceptionBoxManager } from "../../base/TMPopUp";
15
- const TMSearchResultCheckoutInfoForm = (props) => {
15
+ const TMDcmtCheckoutInfoForm = (props) => {
16
16
  const { dtdName, selectedDcmtOrFocused, onClose } = props;
17
17
  const [initialDcmtCheckoutFolder, setInitialDcmtCheckoutFolder] = useState("");
18
18
  const [initialDcmtCheckoutName, setInitialDcmtCheckoutName] = useState("");
@@ -126,4 +126,4 @@ const TMSearchResultCheckoutInfoForm = (props) => {
126
126
  e.currentTarget.style.color = TMColors.primary;
127
127
  }, children: SDKUI_Localizator.Cancel })] })] }) }) }) }) });
128
128
  };
129
- export default TMSearchResultCheckoutInfoForm;
129
+ export default TMDcmtCheckoutInfoForm;