@topconsultnpm/sdkui-react 6.20.0-test1 → 6.21.0-dev1.2

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 (125) hide show
  1. package/lib/components/NewComponents/ContextMenu/styles.d.ts +3 -1
  2. package/lib/components/NewComponents/ContextMenu/styles.js +7 -5
  3. package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +7 -1
  4. package/lib/components/base/Styled.d.ts +4 -1
  5. package/lib/components/base/Styled.js +11 -3
  6. package/lib/components/base/TMPanel.js +6 -4
  7. package/lib/components/base/TMPopUp.js +4 -0
  8. package/lib/components/base/TMTreeView.d.ts +3 -1
  9. package/lib/components/base/TMTreeView.js +68 -21
  10. package/lib/components/base/TMWaitPanel.js +6 -5
  11. package/lib/components/choosers/TMDataListItemChooser.js +1 -1
  12. package/lib/components/choosers/TMDataListItemEditor.d.ts +11 -0
  13. package/lib/components/choosers/TMDataListItemEditor.js +130 -0
  14. package/lib/components/choosers/TMDataListItemFields.d.ts +11 -0
  15. package/lib/components/choosers/TMDataListItemFields.js +61 -0
  16. package/lib/components/choosers/TMDataListItemPicker.d.ts +2 -0
  17. package/lib/components/choosers/TMDataListItemPicker.js +182 -18
  18. package/lib/components/choosers/TMDynDataListItemChooser.js +11 -6
  19. package/lib/components/choosers/TMImageIDChooser.d.ts +16 -0
  20. package/lib/components/choosers/TMImageIDChooser.js +53 -0
  21. package/lib/components/choosers/TMMetadataChooser.js +1 -1
  22. package/lib/components/choosers/TMUserChooser.js +1 -1
  23. package/lib/components/editors/TMDateBox.js +1 -1
  24. package/lib/components/editors/TMHtmlEditor.js +1 -1
  25. package/lib/components/editors/TMLocalizedTextBox.d.ts +1 -0
  26. package/lib/components/editors/TMLocalizedTextBox.js +3 -3
  27. package/lib/components/editors/TMMetadataValues.js +203 -41
  28. package/lib/components/editors/TMTextArea.d.ts +1 -0
  29. package/lib/components/editors/TMTextArea.js +6 -6
  30. package/lib/components/editors/TMTextBox.js +9 -10
  31. package/lib/components/features/archive/TMArchive.d.ts +3 -1
  32. package/lib/components/features/archive/TMArchive.js +31 -44
  33. package/lib/components/features/blog/TMBlogCommentForm.d.ts +3 -0
  34. package/lib/components/features/blog/TMBlogCommentForm.js +42 -36
  35. package/lib/components/features/documents/TMDcmtBlog.d.ts +1 -0
  36. package/lib/components/features/documents/TMDcmtBlog.js +2 -1
  37. package/lib/components/features/documents/TMDcmtForm.d.ts +44 -34
  38. package/lib/components/features/documents/TMDcmtForm.js +365 -563
  39. package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +34 -0
  40. package/lib/components/features/documents/TMDcmtFormActionButtons.js +124 -0
  41. package/lib/components/features/documents/TMDcmtPreview.js +66 -13
  42. package/lib/components/features/documents/TMDcmtTasks.d.ts +3 -1
  43. package/lib/components/features/documents/TMDcmtTasks.js +2 -2
  44. package/lib/components/features/documents/TMFileUploader.d.ts +5 -0
  45. package/lib/components/features/documents/TMFileUploader.js +28 -6
  46. package/lib/components/features/documents/TMMasterDetailDcmts.js +31 -85
  47. package/lib/components/features/documents/TMRelationViewer.d.ts +7 -1
  48. package/lib/components/features/documents/TMRelationViewer.js +497 -111
  49. package/lib/components/features/search/TMSearch.d.ts +2 -2
  50. package/lib/components/features/search/TMSearch.js +3 -3
  51. package/lib/components/features/search/TMSearchQueryPanel.js +6 -6
  52. package/lib/components/features/search/TMSearchResult.d.ts +28 -25
  53. package/lib/components/features/search/TMSearchResult.js +445 -562
  54. package/lib/components/features/search/TMSignatureInfoContent.js +10 -6
  55. package/lib/components/features/search/TMTreeSelector.js +1 -1
  56. package/lib/components/features/tasks/TMTaskForm.d.ts +3 -1
  57. package/lib/components/features/tasks/TMTaskForm.js +61 -193
  58. package/lib/components/features/tasks/TMTaskFormUtils.d.ts +80 -0
  59. package/lib/components/features/tasks/TMTaskFormUtils.js +559 -0
  60. package/lib/components/features/tasks/TMTasksUtils.d.ts +3 -1
  61. package/lib/components/features/tasks/TMTasksUtils.js +46 -16
  62. package/lib/components/features/tasks/TMTasksUtilsView.d.ts +0 -7
  63. package/lib/components/features/tasks/TMTasksUtilsView.js +7 -14
  64. package/lib/components/features/tasks/TMTasksView.js +5 -3
  65. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +20 -3
  66. package/lib/components/features/workflow/TMWorkflowPopup.js +21 -109
  67. package/lib/components/features/workflow/diagram/ConnectionComponent.d.ts +1 -0
  68. package/lib/components/features/workflow/diagram/ConnectionComponent.js +6 -2
  69. package/lib/components/features/workflow/diagram/DiagramItemForm.d.ts +2 -0
  70. package/lib/components/features/workflow/diagram/DiagramItemForm.js +32 -25
  71. package/lib/components/features/workflow/diagram/RecipientList.d.ts +3 -1
  72. package/lib/components/features/workflow/diagram/RecipientList.js +13 -9
  73. package/lib/components/features/workflow/diagram/WFDiagram.js +102 -5
  74. package/lib/components/features/workflow/diagram/workflowHelpers.js +31 -19
  75. package/lib/components/forms/Login/TMLoginForm.js +1 -1
  76. package/lib/components/forms/TMSaveForm.js +61 -13
  77. package/lib/components/grids/TMBlogsPost.js +8 -8
  78. package/lib/components/grids/TMBlogsPostUtils.js +2 -2
  79. package/lib/components/grids/TMRecentsManager.js +1 -1
  80. package/lib/components/index.d.ts +2 -0
  81. package/lib/components/index.js +2 -0
  82. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +3 -2
  83. package/lib/components/pages/TMPage.js +4 -0
  84. package/lib/components/query/TMQueryEditor.d.ts +1 -0
  85. package/lib/components/query/TMQueryEditor.js +3 -3
  86. package/lib/components/viewers/TMMidViewer.js +2 -1
  87. package/lib/components/viewers/TMTidViewer.js +7 -3
  88. package/lib/helper/Enum_Localizator.js +5 -0
  89. package/lib/helper/GlobalStyles.js +3 -0
  90. package/lib/helper/SDKUI_Globals.d.ts +12 -0
  91. package/lib/helper/SDKUI_Globals.js +21 -1
  92. package/lib/helper/SDKUI_Localizator.d.ts +31 -7
  93. package/lib/helper/SDKUI_Localizator.js +286 -46
  94. package/lib/helper/TMIcons.d.ts +2 -1
  95. package/lib/helper/TMIcons.js +4 -1
  96. package/lib/helper/TMUtils.d.ts +33 -41
  97. package/lib/helper/TMUtils.js +157 -170
  98. package/lib/helper/checkinCheckoutManager.js +6 -2
  99. package/lib/helper/helpers.d.ts +6 -2
  100. package/lib/helper/helpers.js +24 -8
  101. package/lib/helper/index.d.ts +1 -0
  102. package/lib/helper/index.js +1 -0
  103. package/lib/helper/queryHelper.js +1 -1
  104. package/lib/hooks/useBetaFeatures.d.ts +1 -0
  105. package/lib/hooks/useBetaFeatures.js +41 -0
  106. package/lib/hooks/useCheckInOutOperations.d.ts +7 -6
  107. package/lib/hooks/useCheckInOutOperations.js +9 -16
  108. package/lib/hooks/useDataUserIdItem.js +2 -2
  109. package/lib/hooks/useDcmtOperations.d.ts +3 -2
  110. package/lib/hooks/useDcmtOperations.js +16 -4
  111. package/lib/hooks/useDocumentOperations.d.ts +139 -0
  112. package/lib/hooks/useDocumentOperations.js +1275 -0
  113. package/lib/hooks/useRelatedDocuments.d.ts +1 -1
  114. package/lib/hooks/useRelatedDocuments.js +64 -42
  115. package/lib/index.d.ts +1 -0
  116. package/lib/index.js +1 -0
  117. package/lib/services/platform_services.d.ts +1 -1
  118. package/lib/services/platform_services.js +4 -0
  119. package/lib/ts/types.d.ts +5 -1
  120. package/lib/ts/types.js +1 -0
  121. package/package.json +55 -55
  122. package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +0 -11
  123. package/lib/components/features/search/TMSearchResultsMenuItems.js +0 -770
  124. package/lib/components/features/search/TMSignSettingsForm.d.ts +0 -9
  125. package/lib/components/features/search/TMSignSettingsForm.js +0 -621
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
3
3
  import { DcmtTypeListCacheService, SDK_Localizator } from '@topconsultnpm/sdk-ts';
4
4
  import TMRelationViewer from './TMRelationViewer';
5
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';
6
+ import { IconMultipleSelection, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, 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';
@@ -14,14 +14,15 @@ import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/p
14
14
  import TMSearchResult from '../search/TMSearchResult';
15
15
  import TMDcmtForm from './TMDcmtForm';
16
16
  import { TMNothingToShow } from './TMDcmtPreview';
17
+ import { Spinner } from '../..';
17
18
  const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, deviceType, inputDcmts, isForMaster, showCurrentDcmtIndicator = true, allowNavigation, canNext, canPrev, onNext, onPrev, onBack, appendMasterDcmts, onTaskCreateRequest }) => {
18
- const [id, setID] = useState('');
19
19
  const [focusedItem, setFocusedItem] = useState();
20
20
  const [selectedItems, setSelectedItems] = useState([]);
21
21
  const [showZeroDcmts, setShowZeroDcmts] = useState(false);
22
22
  const [allowMultipleSelection, setAllowMultipleSelection] = useState(false);
23
23
  const [dtdMaster, setDtdMaster] = useState();
24
- useEffect(() => { setID(genUniqueId()); }, []);
24
+ const [noRelationsOnFirstLoad, setNoRelationsOnFirstLoad] = useState(false);
25
+ const [isCheckingFirstLoad, setIsCheckingFirstLoad] = useState(true);
25
26
  // Load dtdMaster when inputDcmts changes
26
27
  useEffect(() => {
27
28
  const loadDtdMaster = async () => {
@@ -40,10 +41,31 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
40
41
  }, [inputDcmts?.length, inputDcmts?.[0]?.TID, isForMaster]);
41
42
  const handleFocusedItemChanged = useCallback((item) => {
42
43
  setFocusedItem(item);
44
+ if (item) {
45
+ setIsCheckingFirstLoad(false);
46
+ }
43
47
  }, []);
44
48
  const handleSelectedItemsChanged = useCallback((items) => {
45
49
  setSelectedItems(items);
46
50
  }, []);
51
+ const handleNoRelationsFound = useCallback(() => {
52
+ if (isCheckingFirstLoad) {
53
+ setNoRelationsOnFirstLoad(true);
54
+ }
55
+ }, [isCheckingFirstLoad]);
56
+ // Show warning alert and navigate back when no relations found on first load
57
+ useEffect(() => {
58
+ if (noRelationsOnFirstLoad) {
59
+ setNoRelationsOnFirstLoad(false);
60
+ ShowAlert({
61
+ message: SDKUI_Localizator.RelatedDcmtsNotFound,
62
+ title: SDKUI_Localizator.RelationsNotFound,
63
+ duration: 3000,
64
+ mode: 'warning',
65
+ });
66
+ onBack?.();
67
+ }
68
+ }, [noRelationsOnFirstLoad, onBack]);
47
69
  const commandsMenuItems = [
48
70
  {
49
71
  icon: _jsx(IconMultipleSelection, { color: allowMultipleSelection ? TMColors.tertiary : TMColors.text_normal }),
@@ -66,85 +88,9 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
66
88
  onClick: () => {
67
89
  appendMasterDcmts?.(focusedItem?.tid, focusedItem?.did);
68
90
  }
69
- },
70
- {
71
- icon: _jsx(IconMail, {}),
72
- name: "Invia per posta",
73
- disabled: false,
74
- beginGroup: true,
75
- submenu: [
76
- {
77
- icon: _jsx(IconMail, {}),
78
- name: "I documenti selezionati",
79
- disabled: false,
80
- onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
81
- },
82
- {
83
- icon: _jsx(IconMail, {}),
84
- name: "I documenti di primo livello e tutti i documenti correlati",
85
- disabled: false,
86
- onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
87
- },
88
- {
89
- icon: _jsx(IconMail, {}),
90
- name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
91
- disabled: false,
92
- onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
93
- },
94
- ]
95
- },
96
- {
97
- icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
98
- name: "Unisci in un file PDF",
99
- disabled: false,
100
- submenu: [
101
- {
102
- icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
103
- name: "I documenti selezionati",
104
- disabled: false,
105
- onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
106
- },
107
- {
108
- icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
109
- name: "I documenti di primo livello e tutti i documenti correlati",
110
- disabled: false,
111
- onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
112
- },
113
- {
114
- icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
115
- name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
116
- disabled: false,
117
- onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
118
- },
119
- ]
120
- },
121
- {
122
- icon: _jsx(IconCopy, {}),
123
- name: "Copia in una cartella",
124
- disabled: false,
125
- submenu: [
126
- {
127
- icon: _jsx(IconCopy, {}),
128
- name: "I documenti selezionati",
129
- disabled: false,
130
- onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
131
- },
132
- {
133
- icon: _jsx(IconCopy, {}),
134
- name: "I documenti di primo livello e tutti i documenti correlati",
135
- disabled: false,
136
- onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
137
- },
138
- {
139
- icon: _jsx(IconCopy, {}),
140
- name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
141
- disabled: false,
142
- onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
143
- },
144
- ]
145
91
  }
146
92
  ];
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' }) })] });
93
+ 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.filter(item => item.isDcmt).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' }) })] });
148
94
  const getTitle = () => isForMaster ? `${SDKUI_Localizator.DcmtsMaster} - ${dtdMaster?.nameLoc}` : SDKUI_Localizator.DcmtsDetail;
149
95
  const isMobile = deviceType === DeviceType.MOBILE;
150
96
  const tmTreeView = useMemo(() => _jsx(_Fragment, { children: !inputDcmts || inputDcmts.length === 0
@@ -153,7 +99,7 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
153
99
  :
154
100
  _jsx(TMRelationViewerWrapper, { inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, showZeroDcmts: showZeroDcmts,
155
101
  // customItemRender={customItemRender}
156
- allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: handleSelectedItemsChanged }) }), [inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, allowMultipleSelection, focusedItem, selectedItems, handleFocusedItemChanged, handleSelectedItemsChanged]);
102
+ allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: handleSelectedItemsChanged, onNoRelationsFound: handleNoRelationsFound }) }), [inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, allowMultipleSelection, focusedItem, selectedItems, handleFocusedItemChanged, handleSelectedItemsChanged, handleNoRelationsFound]);
157
103
  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]);
158
104
  const initialPanelDimensions = {
159
105
  'tmTreeView': { width: '50%', height: '100%' },
@@ -231,7 +177,7 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
231
177
  toolbarOptions: { icon: _jsx(IconSearchCheck, { fontSize: 24 }), visible: false, orderNumber: 2, isActive: allInitialPanelVisibility['tmFormOrResult'] }
232
178
  }
233
179
  ], [tmTreeView, tmFormOrResult, focusedItem?.isDcmt, dtdMaster]);
234
- return (_jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmTreeView', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true }) }));
180
+ return (_jsxs("div", { style: { width: '100%', height: '100%', position: 'relative' }, children: [isCheckingFirstLoad && (_jsx(Spinner, { description: SDKUI_Localizator.Loading, flat: true })), _jsx("div", { style: isCheckingFirstLoad ? { position: 'absolute', width: 0, height: 0, overflow: 'hidden', opacity: 0, pointerEvents: 'none' } : { width: '100%', height: '100%' }, children: _jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmTreeView', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", showToolbar: true }) }) })] }));
235
181
  };
236
182
  export default TMMasterDetailDcmts;
237
183
  /**
@@ -240,7 +186,7 @@ export default TMMasterDetailDcmts;
240
186
  * - Panel visibility toggling
241
187
  * - Focus delay handling
242
188
  */
243
- const TMRelationViewerWrapper = ({ inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, customItemRender, allowMultipleSelection, focusedItem, selectedItems, onFocusedItemChanged, onSelectedItemsChanged }) => {
189
+ const TMRelationViewerWrapper = ({ inputDcmts, isForMaster, showCurrentDcmtIndicator, showZeroDcmts, customItemRender, allowMultipleSelection, focusedItem, selectedItems, onFocusedItemChanged, onSelectedItemsChanged, onNoRelationsFound }) => {
244
190
  const { setPanelVisibilityById, setToolbarButtonVisibility } = useTMPanelManagerContext();
245
191
  // Handle focused item changes with panel visibility management
246
192
  const handleFocusedItemChanged = useCallback((item) => {
@@ -259,7 +205,7 @@ const TMRelationViewerWrapper = ({ inputDcmts, isForMaster, showCurrentDcmtIndic
259
205
  setToolbarButtonVisibility('tmDcmtForm', false);
260
206
  }
261
207
  }, [onFocusedItemChanged, setPanelVisibilityById, setToolbarButtonVisibility]);
262
- return (_jsx(TMRelationViewer, { inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, initialShowZeroDcmts: showZeroDcmts, customItemRender: customItemRender, allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: onSelectedItemsChanged, maxDepthLevel: 1, invertMasterNavigation: false }));
208
+ return (_jsx(TMRelationViewer, { inputDcmts: inputDcmts, isForMaster: isForMaster, showCurrentDcmtIndicator: showCurrentDcmtIndicator, initialShowZeroDcmts: showZeroDcmts, customItemRender: customItemRender, allowMultipleSelection: allowMultipleSelection, focusedItem: focusedItem, selectedItems: selectedItems, onFocusedItemChanged: handleFocusedItemChanged, onSelectedItemsChanged: onSelectedItemsChanged, maxDepthLevel: 1, invertMasterNavigation: false, onNoRelationsFound: onNoRelationsFound }));
263
209
  };
264
210
  const TMFormOrResultWrapper = ({ deviceType, focusedItem, onTaskCreateRequest, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers }) => {
265
211
  const { setPanelVisibilityById } = useTMPanelManagerContext();
@@ -267,7 +213,7 @@ const TMFormOrResultWrapper = ({ deviceType, focusedItem, onTaskCreateRequest, a
267
213
  _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: () => {
268
214
  setPanelVisibilityById('tmTreeView', true);
269
215
  }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, focusedItem?.tid, focusedItem?.did) }) :
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: () => {
216
+ _jsx(TMSearchResult, { groupId: 'tmFormOrResult', isClosable: deviceType !== DeviceType.MOBILE, context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, allowRelations: false, openDcmtFormAsModal: true, searchResults: focusedItem?.searchResult ?? [], showSearchResultSidebar: false, showDcmtFormSidebar: false, onTaskCreateRequest: onTaskCreateRequest, onClose: () => {
271
217
  setPanelVisibilityById('tmTreeView', true);
272
218
  }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }));
273
219
  };
@@ -16,8 +16,9 @@ export interface RelationTreeItem extends ITMTreeItem {
16
16
  isRoot?: boolean;
17
17
  isMaster?: boolean;
18
18
  isCorrelated?: boolean;
19
- isLoaded?: boolean;
20
19
  isSeparator?: boolean;
20
+ isInfoMessage?: boolean;
21
+ isLogDel?: number;
21
22
  values?: any;
22
23
  searchResult?: SearchResultDescriptor[];
23
24
  itemsCount?: number;
@@ -92,6 +93,11 @@ export interface TMRelationViewerProps {
92
93
  * If not provided, uses the document type name.
93
94
  */
94
95
  labelMainContainer?: string;
96
+ /**
97
+ * Callback invoked when no relations are found for any of the input documents.
98
+ * Useful to notify parent component that there are no correlated documents to display.
99
+ */
100
+ onNoRelationsFound?: () => void;
95
101
  }
96
102
  /**
97
103
  * Check if document type has detail relations